summaryrefslogtreecommitdiff
path: root/data/vim/patches
diff options
context:
space:
mode:
Diffstat (limited to 'data/vim/patches')
-rw-r--r--data/vim/patches/8.1.059156
-rw-r--r--data/vim/patches/8.1.059286
-rw-r--r--data/vim/patches/8.1.059392
-rw-r--r--data/vim/patches/8.1.059459
-rw-r--r--data/vim/patches/8.1.0595162
-rw-r--r--data/vim/patches/8.1.0596104
-rw-r--r--data/vim/patches/8.1.059766
-rw-r--r--data/vim/patches/8.1.059867
-rw-r--r--data/vim/patches/8.1.059981
-rw-r--r--data/vim/patches/8.1.060045
-rw-r--r--data/vim/patches/8.1.0601167
-rw-r--r--data/vim/patches/8.1.0602279
-rw-r--r--data/vim/patches/8.1.060390
-rw-r--r--data/vim/patches/8.1.060472
-rw-r--r--data/vim/patches/8.1.060559
-rw-r--r--data/vim/patches/8.1.060692
-rw-r--r--data/vim/patches/8.1.0607172
-rw-r--r--data/vim/patches/8.1.060853
-rw-r--r--data/vim/patches/8.1.0609105
-rw-r--r--data/vim/patches/8.1.0610167
-rw-r--r--data/vim/patches/8.1.061154
-rw-r--r--data/vim/patches/8.1.0612250
-rw-r--r--data/vim/patches/8.1.0613159
-rw-r--r--data/vim/patches/8.1.06143620
-rw-r--r--data/vim/patches/8.1.06158621
-rw-r--r--data/vim/patches/8.1.06165087
-rw-r--r--data/vim/patches/8.1.061753
-rw-r--r--data/vim/patches/8.1.061876
-rw-r--r--data/vim/patches/8.1.0619272
-rw-r--r--data/vim/patches/8.1.062078
-rw-r--r--data/vim/patches/8.1.0621121
-rw-r--r--data/vim/patches/8.1.0622176
-rw-r--r--data/vim/patches/8.1.0623634
-rw-r--r--data/vim/patches/8.1.062454
-rw-r--r--data/vim/patches/8.1.062564
-rw-r--r--data/vim/patches/8.1.062657
-rw-r--r--data/vim/patches/8.1.0627179
-rw-r--r--data/vim/patches/8.1.062851
-rw-r--r--data/vim/patches/8.1.0629454
-rw-r--r--data/vim/patches/8.1.0630124
-rw-r--r--data/vim/patches/8.1.063163
-rw-r--r--data/vim/patches/8.1.0632742
-rw-r--r--data/vim/patches/8.1.0633445
-rw-r--r--data/vim/patches/8.1.0634485
-rw-r--r--data/vim/patches/8.1.063552
-rw-r--r--data/vim/patches/8.1.0636319
-rw-r--r--data/vim/patches/8.1.063794
-rw-r--r--data/vim/patches/8.1.0638241
-rw-r--r--data/vim/patches/8.1.063946
-rw-r--r--data/vim/patches/8.1.0640103
-rw-r--r--data/vim/patches/8.1.064157
-rw-r--r--data/vim/patches/8.1.0642164
-rw-r--r--data/vim/patches/8.1.064379
-rw-r--r--data/vim/patches/8.1.0644520
-rw-r--r--data/vim/patches/8.1.064546
-rw-r--r--data/vim/patches/8.1.064695
-rw-r--r--data/vim/patches/8.1.0647326
-rw-r--r--data/vim/patches/8.1.0648203
-rw-r--r--data/vim/patches/8.1.0649121
-rw-r--r--data/vim/patches/8.1.065092
-rw-r--r--data/vim/patches/8.1.065171
-rw-r--r--data/vim/patches/8.1.0652148
-rw-r--r--data/vim/patches/8.1.065358
-rw-r--r--data/vim/patches/8.1.0654412
-rw-r--r--data/vim/patches/8.1.0655407
-rw-r--r--data/vim/patches/8.1.0656119
-rw-r--r--data/vim/patches/8.1.065754
-rw-r--r--data/vim/patches/8.1.06581382
-rw-r--r--data/vim/patches/8.1.065973
-rw-r--r--data/vim/patches/8.1.0660221
-rw-r--r--data/vim/patches/8.1.066194
-rw-r--r--data/vim/patches/8.1.066251
-rw-r--r--data/vim/patches/8.1.066370
-rw-r--r--data/vim/patches/8.1.0664172
-rw-r--r--data/vim/patches/8.1.0665234
-rw-r--r--data/vim/patches/8.1.066648
-rw-r--r--data/vim/patches/8.1.066748
-rw-r--r--data/vim/patches/8.1.066870
-rw-r--r--data/vim/patches/8.1.0669851
-rw-r--r--data/vim/patches/8.1.067045
-rw-r--r--data/vim/patches/8.1.0671209
-rw-r--r--data/vim/patches/8.1.067288
-rw-r--r--data/vim/patches/8.1.06734323
-rw-r--r--data/vim/patches/8.1.067452
-rw-r--r--data/vim/patches/8.1.0675670
-rw-r--r--data/vim/patches/8.1.067682
-rw-r--r--data/vim/patches/8.1.067754
-rw-r--r--data/vim/patches/8.1.0678305
-rw-r--r--data/vim/patches/8.1.0679262
-rw-r--r--data/vim/patches/8.1.068071
-rw-r--r--data/vim/patches/8.1.0681127
-rw-r--r--data/vim/patches/8.1.0682290
-rw-r--r--data/vim/patches/8.1.068357
-rw-r--r--data/vim/patches/8.1.0684161
-rw-r--r--data/vim/patches/8.1.0685434
-rw-r--r--data/vim/patches/8.1.0686102
-rw-r--r--data/vim/patches/8.1.068782
-rw-r--r--data/vim/patches/8.1.0688896
-rw-r--r--data/vim/patches/8.1.068997
-rw-r--r--data/vim/patches/8.1.069096
-rw-r--r--data/vim/patches/8.1.0691460
-rw-r--r--data/vim/patches/8.1.0692148
-rw-r--r--data/vim/patches/8.1.069372
-rw-r--r--data/vim/patches/8.1.069496
-rw-r--r--data/vim/patches/8.1.0695176
-rw-r--r--data/vim/patches/8.1.0696134
-rw-r--r--data/vim/patches/8.1.0697679
-rw-r--r--data/vim/patches/8.1.0698149
-rw-r--r--data/vim/patches/8.1.069953
-rw-r--r--data/vim/patches/8.1.070047
-rw-r--r--data/vim/patches/8.1.0701323
-rw-r--r--data/vim/patches/8.1.0702132
-rw-r--r--data/vim/patches/8.1.070386
-rw-r--r--data/vim/patches/8.1.070467
-rw-r--r--data/vim/patches/8.1.070564
-rw-r--r--data/vim/patches/8.1.0706330
-rw-r--r--data/vim/patches/8.1.0707135
-rw-r--r--data/vim/patches/8.1.0708173
-rw-r--r--data/vim/patches/8.1.0709328
-rw-r--r--data/vim/patches/8.1.0710193
-rw-r--r--data/vim/patches/8.1.07113578
-rw-r--r--data/vim/patches/8.1.0712304
-rw-r--r--data/vim/patches/8.1.0713bin0 -> 2879878 bytes
-rw-r--r--data/vim/patches/8.1.0714121
-rw-r--r--data/vim/patches/8.1.071566
-rw-r--r--data/vim/patches/8.1.0716310
-rw-r--r--data/vim/patches/8.1.0717863
-rw-r--r--data/vim/patches/8.1.071895
-rw-r--r--data/vim/patches/8.1.0719632
-rw-r--r--data/vim/patches/8.1.0720499
-rw-r--r--data/vim/patches/8.1.0721707
-rw-r--r--data/vim/patches/8.1.0722155
-rw-r--r--data/vim/patches/8.1.07231011
-rw-r--r--data/vim/patches/8.1.072487
-rw-r--r--data/vim/patches/8.1.0725162
-rw-r--r--data/vim/patches/8.1.0726294
-rw-r--r--data/vim/patches/8.1.072752
-rw-r--r--data/vim/patches/8.1.0728175
-rw-r--r--data/vim/patches/8.1.0729200
-rw-r--r--data/vim/patches/8.1.073054
-rw-r--r--data/vim/patches/8.1.0731228
-rw-r--r--data/vim/patches/8.1.073271
-rw-r--r--data/vim/patches/8.1.0733460
-rw-r--r--data/vim/patches/8.1.073477
-rw-r--r--data/vim/patches/8.1.07353392
-rw-r--r--data/vim/patches/8.1.0736735
-rw-r--r--data/vim/patches/8.1.073751
-rw-r--r--data/vim/patches/8.1.0738102
-rw-r--r--data/vim/patches/8.1.0739149
-rw-r--r--data/vim/patches/8.1.074055
-rw-r--r--data/vim/patches/8.1.0741292
-rw-r--r--data/vim/patches/8.1.0742186
-rw-r--r--data/vim/patches/8.1.074328463
-rw-r--r--data/vim/patches/8.1.0744246
-rw-r--r--data/vim/patches/8.1.074571
-rw-r--r--data/vim/patches/8.1.0746171
-rw-r--r--data/vim/patches/8.1.0747139
-rw-r--r--data/vim/patches/8.1.0748136
-rw-r--r--data/vim/patches/8.1.074962
-rw-r--r--data/vim/patches/8.1.0750115
-rw-r--r--data/vim/patches/8.1.075153
-rw-r--r--data/vim/patches/8.1.075253
-rw-r--r--data/vim/patches/8.1.0753548
-rw-r--r--data/vim/patches/8.1.075481
-rw-r--r--data/vim/patches/8.1.075596
-rw-r--r--data/vim/patches/8.1.075688
-rw-r--r--data/vim/patches/8.1.0757335
-rw-r--r--data/vim/patches/8.1.075853
-rw-r--r--data/vim/patches/8.1.0759572
-rw-r--r--data/vim/patches/8.1.0760295
-rw-r--r--data/vim/patches/8.1.076152
-rw-r--r--data/vim/patches/8.1.076252
-rw-r--r--data/vim/patches/8.1.07635153
-rw-r--r--data/vim/patches/8.1.076489
-rw-r--r--data/vim/patches/8.1.0765197
-rw-r--r--data/vim/patches/8.1.0766722
-rw-r--r--data/vim/patches/8.1.0767163
-rw-r--r--data/vim/patches/8.1.0768284
-rw-r--r--data/vim/patches/8.1.0769100
-rw-r--r--data/vim/patches/8.1.0770264
-rw-r--r--data/vim/patches/8.1.0771187
-rw-r--r--data/vim/patches/8.1.0772326
-rw-r--r--data/vim/patches/8.1.0773285
-rw-r--r--data/vim/patches/8.1.0774184
-rw-r--r--data/vim/patches/8.1.077599
-rw-r--r--data/vim/patches/8.1.077661
-rw-r--r--data/vim/patches/8.1.0777198
-rw-r--r--data/vim/patches/8.1.077855
-rw-r--r--data/vim/patches/8.1.07798160
-rw-r--r--data/vim/patches/8.1.078055
-rw-r--r--data/vim/patches/8.1.078153
-rw-r--r--data/vim/patches/8.1.078279
-rw-r--r--data/vim/patches/8.1.0783105
-rw-r--r--data/vim/patches/8.1.0784108
-rw-r--r--data/vim/patches/8.1.07851006
-rw-r--r--data/vim/patches/8.1.0786133
-rw-r--r--data/vim/patches/8.1.0787140
-rw-r--r--data/vim/patches/8.1.0788229
-rw-r--r--data/vim/patches/8.1.078975
-rw-r--r--data/vim/patches/8.1.079077
-rw-r--r--data/vim/patches/8.1.079179
-rw-r--r--data/vim/patches/8.1.079287
-rw-r--r--data/vim/patches/8.1.0793417
-rw-r--r--data/vim/patches/8.1.079471
-rw-r--r--data/vim/patches/8.1.079549
-rw-r--r--data/vim/patches/8.1.079698
-rw-r--r--data/vim/patches/8.1.079792
-rw-r--r--data/vim/patches/8.1.0798217
-rw-r--r--data/vim/patches/8.1.0799119
-rw-r--r--data/vim/patches/8.1.080079
-rw-r--r--data/vim/patches/8.1.080153
-rw-r--r--data/vim/patches/8.1.0802135
-rw-r--r--data/vim/patches/8.1.080380
-rw-r--r--data/vim/patches/8.1.080478
-rw-r--r--data/vim/patches/8.1.08057316
-rw-r--r--data/vim/patches/8.1.08067095
-rw-r--r--data/vim/patches/8.1.080750
-rw-r--r--data/vim/patches/8.1.080854
-rw-r--r--data/vim/patches/8.1.08095622
-rw-r--r--data/vim/patches/8.1.08105176
-rw-r--r--data/vim/patches/8.1.08111613
-rw-r--r--data/vim/patches/8.1.0812174
-rw-r--r--data/vim/patches/8.1.0813131
-rw-r--r--data/vim/patches/8.1.0814252
-rw-r--r--data/vim/patches/8.1.0815424
-rw-r--r--data/vim/patches/8.1.081650
-rw-r--r--data/vim/patches/8.1.081794
-rw-r--r--data/vim/patches/8.1.0818170
-rw-r--r--data/vim/patches/8.1.0819223
-rw-r--r--data/vim/patches/8.1.0820363
-rw-r--r--data/vim/patches/8.1.0821252
-rw-r--r--data/vim/patches/8.1.0822146
-rw-r--r--data/vim/patches/8.1.082384
-rw-r--r--data/vim/patches/8.1.0824676
-rw-r--r--data/vim/patches/8.1.08255747
-rw-r--r--data/vim/patches/8.1.08263149
-rw-r--r--data/vim/patches/8.1.082756
-rw-r--r--data/vim/patches/8.1.082859
-rw-r--r--data/vim/patches/8.1.0829129
-rw-r--r--data/vim/patches/8.1.083050
-rw-r--r--data/vim/patches/8.1.0831107
-rw-r--r--data/vim/patches/8.1.083298
-rw-r--r--data/vim/patches/8.1.083348
-rw-r--r--data/vim/patches/8.1.0834688
-rw-r--r--data/vim/patches/8.1.083557
-rw-r--r--data/vim/patches/8.1.083658
-rw-r--r--data/vim/patches/8.1.0837194
-rw-r--r--data/vim/patches/8.1.083855
-rw-r--r--data/vim/patches/8.1.083955
-rw-r--r--data/vim/patches/8.1.0840209
-rw-r--r--data/vim/patches/8.1.084165
-rw-r--r--data/vim/patches/8.1.084288
-rw-r--r--data/vim/patches/8.1.0843105
-rw-r--r--data/vim/patches/8.1.084464
-rw-r--r--data/vim/patches/8.1.0845375
-rw-r--r--data/vim/patches/8.1.0846285
-rw-r--r--data/vim/patches/8.1.084782
-rw-r--r--data/vim/patches/8.1.084854
-rw-r--r--data/vim/patches/8.1.0849131
-rw-r--r--data/vim/patches/8.1.0850116
-rw-r--r--data/vim/patches/8.1.0851144
-rw-r--r--data/vim/patches/8.1.0852235
-rw-r--r--data/vim/patches/8.1.085357
-rw-r--r--data/vim/patches/8.1.0854251
-rw-r--r--data/vim/patches/8.1.085558
-rw-r--r--data/vim/patches/8.1.0856104
-rw-r--r--data/vim/patches/8.1.08579872
-rw-r--r--data/vim/patches/8.1.0858146
-rw-r--r--data/vim/patches/8.1.0859153
-rw-r--r--data/vim/patches/8.1.086054
-rw-r--r--data/vim/patches/8.1.086152
-rw-r--r--data/vim/patches/8.1.0862276
-rw-r--r--data/vim/patches/8.1.0863191
-rw-r--r--data/vim/patches/8.1.08641239
-rw-r--r--data/vim/patches/8.1.0865105
-rw-r--r--data/vim/patches/8.1.0866211
-rw-r--r--data/vim/patches/8.1.0867139
-rw-r--r--data/vim/patches/8.1.086859
-rw-r--r--data/vim/patches/8.1.0869420
-rw-r--r--data/vim/patches/8.1.08701685
-rw-r--r--data/vim/patches/8.1.087150
-rw-r--r--data/vim/patches/8.1.087252
-rw-r--r--data/vim/patches/8.1.087347
-rw-r--r--data/vim/patches/8.1.08745682
-rw-r--r--data/vim/patches/8.1.0875116
-rw-r--r--data/vim/patches/8.1.087664
-rw-r--r--data/vim/patches/8.1.0877376
-rw-r--r--data/vim/patches/8.1.087846
-rw-r--r--data/vim/patches/8.1.087965
-rw-r--r--data/vim/patches/8.1.0880907
-rw-r--r--data/vim/patches/8.1.0881474
-rw-r--r--data/vim/patches/8.1.088252
-rw-r--r--data/vim/patches/8.1.0883232
-rw-r--r--data/vim/patches/8.1.088445
-rw-r--r--data/vim/patches/8.1.088550
-rw-r--r--data/vim/patches/8.1.0886122
-rw-r--r--data/vim/patches/8.1.0887105
-rw-r--r--data/vim/patches/8.1.0888385
-rw-r--r--data/vim/patches/8.1.0889112
-rw-r--r--data/vim/patches/8.1.0890219
-rw-r--r--data/vim/patches/8.1.0891131
-rw-r--r--data/vim/patches/8.1.0892518
-rw-r--r--data/vim/patches/8.1.089347
-rw-r--r--data/vim/patches/8.1.0894453
-rw-r--r--data/vim/patches/8.1.0895134
-rw-r--r--data/vim/patches/8.1.0896110
-rw-r--r--data/vim/patches/8.1.0897615
-rw-r--r--data/vim/patches/8.1.089888
-rw-r--r--data/vim/patches/8.1.089951
-rw-r--r--data/vim/patches/8.1.090059
-rw-r--r--data/vim/patches/8.1.0901115
-rw-r--r--data/vim/patches/8.1.0902485
-rw-r--r--data/vim/patches/8.1.090368
-rw-r--r--data/vim/patches/8.1.0904179
-rw-r--r--data/vim/patches/8.1.0905371
-rw-r--r--data/vim/patches/8.1.090676
-rw-r--r--data/vim/patches/8.1.090752
-rw-r--r--data/vim/patches/8.1.090881
-rw-r--r--data/vim/patches/8.1.0909201
-rw-r--r--data/vim/patches/8.1.0910140
-rw-r--r--data/vim/patches/8.1.0911167
-rw-r--r--data/vim/patches/8.1.091271
-rw-r--r--data/vim/patches/8.1.0913117
-rw-r--r--data/vim/patches/8.1.09146010
-rw-r--r--data/vim/patches/8.1.0915185
-rw-r--r--data/vim/patches/8.1.0916175
-rw-r--r--data/vim/patches/8.1.091779
-rw-r--r--data/vim/patches/8.1.0918430
-rw-r--r--data/vim/patches/8.1.091987
-rw-r--r--data/vim/patches/8.1.0920532
-rw-r--r--data/vim/patches/8.1.0921124
-rw-r--r--data/vim/patches/8.1.0922149
-rw-r--r--data/vim/patches/8.1.0923123
-rw-r--r--data/vim/patches/8.1.092460
-rw-r--r--data/vim/patches/8.1.0925191
-rw-r--r--data/vim/patches/8.1.0926163
-rw-r--r--data/vim/patches/8.1.0927695
-rw-r--r--data/vim/patches/8.1.092847
-rw-r--r--data/vim/patches/8.1.0929161
-rw-r--r--data/vim/patches/8.1.093070
-rw-r--r--data/vim/patches/8.1.093196
-rw-r--r--data/vim/patches/8.1.09326097
-rw-r--r--data/vim/patches/8.1.0933473
-rw-r--r--data/vim/patches/8.1.093469
-rw-r--r--data/vim/patches/8.1.093570
-rw-r--r--data/vim/patches/8.1.0936137
-rw-r--r--data/vim/patches/8.1.093768
-rw-r--r--data/vim/patches/8.1.093875
-rw-r--r--data/vim/patches/8.1.0939400
-rw-r--r--data/vim/patches/8.1.0940205
-rw-r--r--data/vim/patches/8.1.09418713
-rw-r--r--data/vim/patches/8.1.0942153
-rw-r--r--data/vim/patches/8.1.094370
-rw-r--r--data/vim/patches/8.1.0944144
-rw-r--r--data/vim/patches/8.1.094589
-rw-r--r--data/vim/patches/8.1.094664
-rw-r--r--data/vim/patches/8.1.094795
-rw-r--r--data/vim/patches/8.1.094893
-rw-r--r--data/vim/patches/8.1.0949296
-rw-r--r--data/vim/patches/8.1.0950126
-rw-r--r--data/vim/patches/8.1.095153
-rw-r--r--data/vim/patches/8.1.0952181
-rw-r--r--data/vim/patches/8.1.095396
-rw-r--r--data/vim/patches/8.1.0954137
-rw-r--r--data/vim/patches/8.1.095547
-rw-r--r--data/vim/patches/8.1.0956153
-rw-r--r--data/vim/patches/8.1.095754
-rw-r--r--data/vim/patches/8.1.0958239
-rw-r--r--data/vim/patches/8.1.0959199
-rw-r--r--data/vim/patches/8.1.0960127
-rw-r--r--data/vim/patches/8.1.096153
-rw-r--r--data/vim/patches/8.1.096251
-rw-r--r--data/vim/patches/8.1.096399
-rw-r--r--data/vim/patches/8.1.096474
-rw-r--r--data/vim/patches/8.1.096567
-rw-r--r--data/vim/patches/8.1.096645
-rw-r--r--data/vim/patches/8.1.096753
-rw-r--r--data/vim/patches/8.1.096870
-rw-r--r--data/vim/patches/8.1.096975
-rw-r--r--data/vim/patches/8.1.097077
-rw-r--r--data/vim/patches/8.1.0971242
-rw-r--r--data/vim/patches/8.1.0972134
-rw-r--r--data/vim/patches/8.1.0973121
-rw-r--r--data/vim/patches/8.1.0974169
-rw-r--r--data/vim/patches/8.1.0975125
-rw-r--r--data/vim/patches/8.1.0976454
-rw-r--r--data/vim/patches/8.1.097784
-rw-r--r--data/vim/patches/8.1.097871
-rw-r--r--data/vim/patches/8.1.097953
-rw-r--r--data/vim/patches/8.1.0980133
-rw-r--r--data/vim/patches/8.1.098159
-rw-r--r--data/vim/patches/8.1.098253
-rw-r--r--data/vim/patches/8.1.0983126
-rw-r--r--data/vim/patches/8.1.0984199
-rw-r--r--data/vim/patches/8.1.0985123
-rw-r--r--data/vim/patches/8.1.0986186
-rw-r--r--data/vim/patches/8.1.098772
-rw-r--r--data/vim/patches/8.1.0988129
-rw-r--r--data/vim/patches/8.1.0989533
-rw-r--r--data/vim/patches/8.1.0990221
-rw-r--r--data/vim/patches/8.1.099175
-rw-r--r--data/vim/patches/8.1.0992129
-rw-r--r--data/vim/patches/8.1.0993271
-rw-r--r--data/vim/patches/8.1.0994308
-rw-r--r--data/vim/patches/8.1.099596
-rw-r--r--data/vim/patches/8.1.0996102
-rw-r--r--data/vim/patches/8.1.099751
-rw-r--r--data/vim/patches/8.1.099890
-rw-r--r--data/vim/patches/8.1.0999176
-rw-r--r--data/vim/patches/8.1.1000439
-rw-r--r--data/vim/patches/8.1.1001116
-rw-r--r--data/vim/patches/8.1.1002101
-rw-r--r--data/vim/patches/8.1.100378
-rw-r--r--data/vim/patches/8.1.100450
-rw-r--r--data/vim/patches/8.1.100567
-rw-r--r--data/vim/patches/8.1.1006730
-rw-r--r--data/vim/patches/8.1.1007613
-rw-r--r--data/vim/patches/8.1.100862
-rw-r--r--data/vim/patches/8.1.100954
-rw-r--r--data/vim/patches/8.1.101092
-rw-r--r--data/vim/patches/8.1.101177
-rw-r--r--data/vim/patches/8.1.101245
-rw-r--r--data/vim/patches/8.1.1013130
-rw-r--r--data/vim/patches/8.1.101465
-rw-r--r--data/vim/patches/8.1.1015449
-rw-r--r--data/vim/patches/8.1.1016189
-rw-r--r--data/vim/patches/8.1.1017132
-rw-r--r--data/vim/patches/8.1.101856
-rw-r--r--data/vim/patches/8.1.1019671
-rw-r--r--data/vim/patches/8.1.102059
-rw-r--r--data/vim/patches/8.1.1021163
-rw-r--r--data/vim/patches/8.1.102246
-rw-r--r--data/vim/patches/8.1.102364
-rw-r--r--data/vim/patches/8.1.102465
-rw-r--r--data/vim/patches/8.1.102557
-rw-r--r--data/vim/patches/8.1.1026169
-rw-r--r--data/vim/patches/8.1.102754
-rw-r--r--data/vim/patches/8.1.102848
-rw-r--r--data/vim/patches/8.1.102971
-rw-r--r--data/vim/patches/8.1.1030889
-rw-r--r--data/vim/patches/8.1.1031128
-rw-r--r--data/vim/patches/8.1.1032387
-rw-r--r--data/vim/patches/8.1.103356
-rw-r--r--data/vim/patches/8.1.1034464
-rw-r--r--data/vim/patches/8.1.1035171
-rw-r--r--data/vim/patches/8.1.1036271
-rw-r--r--data/vim/patches/8.1.103757
-rw-r--r--data/vim/patches/8.1.10382458
-rw-r--r--data/vim/patches/8.1.1039773
-rw-r--r--data/vim/patches/8.1.1040240
-rw-r--r--data/vim/patches/8.1.104194
-rw-r--r--data/vim/patches/8.1.104253
-rw-r--r--data/vim/patches/8.1.1043680
-rw-r--r--data/vim/patches/8.1.1044296
-rw-r--r--data/vim/patches/8.1.1045262
-rw-r--r--data/vim/patches/8.1.104681
-rw-r--r--data/vim/patches/8.1.1047103
-rw-r--r--data/vim/patches/8.1.1048125
-rw-r--r--data/vim/patches/8.1.1049123
-rw-r--r--data/vim/patches/8.1.105057
-rw-r--r--data/vim/patches/8.1.105169
-rw-r--r--data/vim/patches/8.1.105255
-rw-r--r--data/vim/patches/8.1.105345
-rw-r--r--data/vim/patches/8.1.105476
-rw-r--r--data/vim/patches/8.1.1055301
-rw-r--r--data/vim/patches/8.1.10561973
-rw-r--r--data/vim/patches/8.1.105791
-rw-r--r--data/vim/patches/8.1.105857
-rw-r--r--data/vim/patches/8.1.105977
-rw-r--r--data/vim/patches/8.1.1060286
-rw-r--r--data/vim/patches/8.1.1061101
-rw-r--r--data/vim/patches/8.1.1062620
-rw-r--r--data/vim/patches/8.1.1063100
-rw-r--r--data/vim/patches/8.1.106460
-rw-r--r--data/vim/patches/8.1.106560
-rw-r--r--data/vim/patches/8.1.1066370
-rw-r--r--data/vim/patches/8.1.106795
-rw-r--r--data/vim/patches/8.1.1068588
-rw-r--r--data/vim/patches/8.1.1069415
-rw-r--r--data/vim/patches/8.1.1070140
-rw-r--r--data/vim/patches/8.1.1071321
-rw-r--r--data/vim/patches/8.1.10721388
-rw-r--r--data/vim/patches/8.1.1073104
-rw-r--r--data/vim/patches/8.1.1074183
-rw-r--r--data/vim/patches/8.1.107554
-rw-r--r--data/vim/patches/8.1.10769225
-rw-r--r--data/vim/patches/8.1.1077141
-rw-r--r--data/vim/patches/8.1.1078134
-rw-r--r--data/vim/patches/8.1.1079116
-rw-r--r--data/vim/patches/8.1.108074
-rw-r--r--data/vim/patches/8.1.10811264
-rw-r--r--data/vim/patches/8.1.108277
-rw-r--r--data/vim/patches/8.1.1083343
-rw-r--r--data/vim/patches/8.1.1084633
-rw-r--r--data/vim/patches/8.1.108579
-rw-r--r--data/vim/patches/8.1.10861395
-rw-r--r--data/vim/patches/8.1.1087167
-rw-r--r--data/vim/patches/8.1.1088116
-rw-r--r--data/vim/patches/8.1.1089132
-rw-r--r--data/vim/patches/8.1.109083
-rw-r--r--data/vim/patches/8.1.1091213
-rw-r--r--data/vim/patches/8.1.109298
-rw-r--r--data/vim/patches/8.1.1093291
-rw-r--r--data/vim/patches/8.1.1094141
-rw-r--r--data/vim/patches/8.1.1095124
-rw-r--r--data/vim/patches/8.1.109675
-rw-r--r--data/vim/patches/8.1.109764
-rw-r--r--data/vim/patches/8.1.1098470
-rw-r--r--data/vim/patches/8.1.10991326
-rw-r--r--data/vim/patches/8.1.110088
-rw-r--r--data/vim/patches/8.1.110150
-rw-r--r--data/vim/patches/8.1.1102138
-rw-r--r--data/vim/patches/8.1.11034150
-rw-r--r--data/vim/patches/8.1.1104239
-rw-r--r--data/vim/patches/8.1.1105133
-rw-r--r--data/vim/patches/8.1.110661
-rw-r--r--data/vim/patches/8.1.110753
-rw-r--r--data/vim/patches/8.1.110846
-rw-r--r--data/vim/patches/8.1.110945
-rw-r--r--data/vim/patches/8.1.1110189
-rw-r--r--data/vim/patches/8.1.1111164
-rw-r--r--data/vim/patches/8.1.1112614
-rw-r--r--data/vim/patches/8.1.1113431
-rw-r--r--data/vim/patches/8.1.1114273
-rw-r--r--data/vim/patches/8.1.1115100
-rw-r--r--data/vim/patches/8.1.1116772
-rw-r--r--data/vim/patches/8.1.111759
-rw-r--r--data/vim/patches/8.1.1118141
-rw-r--r--data/vim/patches/8.1.1119bin0 -> 150623 bytes
-rw-r--r--data/vim/patches/8.1.1120424
-rw-r--r--data/vim/patches/8.1.112180
-rw-r--r--data/vim/patches/8.1.1122334
-rw-r--r--data/vim/patches/8.1.1123354
-rw-r--r--data/vim/patches/8.1.1124901
-rw-r--r--data/vim/patches/8.1.1125355
-rw-r--r--data/vim/patches/8.1.112656
-rw-r--r--data/vim/patches/8.1.1127229
-rw-r--r--data/vim/patches/8.1.112855
-rw-r--r--data/vim/patches/8.1.112991
-rw-r--r--data/vim/patches/8.1.113045
-rw-r--r--data/vim/patches/8.1.1131201
-rw-r--r--data/vim/patches/8.1.113279
-rw-r--r--data/vim/patches/8.1.113352
-rw-r--r--data/vim/patches/8.1.113467
-rw-r--r--data/vim/patches/8.1.113546
-rw-r--r--data/vim/patches/8.1.1136160
-rw-r--r--data/vim/patches/8.1.1137107
-rw-r--r--data/vim/patches/8.1.1138414
-rw-r--r--data/vim/patches/8.1.113952
-rw-r--r--data/vim/patches/8.1.1140408
-rw-r--r--data/vim/patches/8.1.114163
-rw-r--r--data/vim/patches/8.1.114299
-rw-r--r--data/vim/patches/8.1.1143255
-rw-r--r--data/vim/patches/8.1.1144100
-rw-r--r--data/vim/patches/8.1.114557
-rw-r--r--data/vim/patches/8.1.114665
-rw-r--r--data/vim/patches/8.1.1147564
-rw-r--r--data/vim/patches/8.1.1148141
-rw-r--r--data/vim/patches/8.1.1149200
-rw-r--r--data/vim/patches/8.1.115051
-rw-r--r--data/vim/patches/8.1.115153
-rw-r--r--data/vim/patches/8.1.115252
-rw-r--r--data/vim/patches/8.1.115345
-rw-r--r--data/vim/patches/8.1.115468
-rw-r--r--data/vim/patches/8.1.1155372
-rw-r--r--data/vim/patches/8.1.115649
-rw-r--r--data/vim/patches/8.1.1157270
-rw-r--r--data/vim/patches/8.1.115882
-rw-r--r--data/vim/patches/8.1.115954
-rw-r--r--data/vim/patches/8.1.116067
-rw-r--r--data/vim/patches/8.1.1161135
-rw-r--r--data/vim/patches/8.1.116295
-rw-r--r--data/vim/patches/8.1.116348
-rw-r--r--data/vim/patches/8.1.1164109
-rw-r--r--data/vim/patches/8.1.1165173
-rw-r--r--data/vim/patches/8.1.116668
-rw-r--r--data/vim/patches/8.1.1167187
-rw-r--r--data/vim/patches/8.1.116852
-rw-r--r--data/vim/patches/8.1.116967
-rw-r--r--data/vim/patches/8.1.1170102
-rw-r--r--data/vim/patches/8.1.1171185
-rw-r--r--data/vim/patches/8.1.1172101
-rw-r--r--data/vim/patches/8.1.1173104
-rw-r--r--data/vim/patches/8.1.117456
-rw-r--r--data/vim/patches/8.1.1175142
-rw-r--r--data/vim/patches/8.1.117649
-rw-r--r--data/vim/patches/8.1.117775
-rw-r--r--data/vim/patches/8.1.1178470
-rw-r--r--data/vim/patches/8.1.1179100
-rw-r--r--data/vim/patches/8.1.1180524
-rw-r--r--data/vim/patches/8.1.1181267
-rw-r--r--data/vim/patches/8.1.1182172
-rw-r--r--data/vim/patches/8.1.1183124
-rw-r--r--data/vim/patches/8.1.118447
-rw-r--r--data/vim/patches/8.1.118556
-rw-r--r--data/vim/patches/8.1.118676
-rw-r--r--data/vim/patches/8.1.118783
-rw-r--r--data/vim/patches/8.1.1188201
-rw-r--r--data/vim/patches/8.1.1189120
-rw-r--r--data/vim/patches/8.1.119076
-rw-r--r--data/vim/patches/8.1.1191307
-rw-r--r--data/vim/patches/8.1.1192205
-rw-r--r--data/vim/patches/8.1.1193161
-rw-r--r--data/vim/patches/8.1.1194238
-rw-r--r--data/vim/patches/8.1.11952445
-rw-r--r--data/vim/patches/8.1.1196262
-rw-r--r--data/vim/patches/8.1.1197140
-rw-r--r--data/vim/patches/8.1.119883
-rw-r--r--data/vim/patches/8.1.119999
-rw-r--r--data/vim/patches/8.1.1200740
-rw-r--r--data/vim/patches/8.1.1201392
-rw-r--r--data/vim/patches/8.1.120260
-rw-r--r--data/vim/patches/8.1.1203477
-rw-r--r--data/vim/patches/8.1.1204287
-rw-r--r--data/vim/patches/8.1.1205209
-rw-r--r--data/vim/patches/8.1.1206181
-rw-r--r--data/vim/patches/8.1.1207112
-rw-r--r--data/vim/patches/8.1.120861
-rw-r--r--data/vim/patches/8.1.120993
-rw-r--r--data/vim/patches/8.1.12104639
-rw-r--r--data/vim/patches/8.1.1211161
-rw-r--r--data/vim/patches/8.1.1212148
-rw-r--r--data/vim/patches/8.1.1213106
-rw-r--r--data/vim/patches/8.1.1214486
-rw-r--r--data/vim/patches/8.1.121547
-rw-r--r--data/vim/patches/8.1.1216128
-rw-r--r--data/vim/patches/8.1.121752
-rw-r--r--data/vim/patches/8.1.12181232
-rw-r--r--data/vim/patches/8.1.1219480
-rw-r--r--data/vim/patches/8.1.122063
-rw-r--r--data/vim/patches/8.1.1221212
-rw-r--r--data/vim/patches/8.1.122265
-rw-r--r--data/vim/patches/8.1.122381
-rw-r--r--data/vim/patches/8.1.1224515
-rw-r--r--data/vim/patches/8.1.1225155
-rw-r--r--data/vim/patches/8.1.12264826
-rw-r--r--data/vim/patches/8.1.122780
-rw-r--r--data/vim/patches/8.1.12281467
-rw-r--r--data/vim/patches/8.1.122949
-rw-r--r--data/vim/patches/8.1.12305087
-rw-r--r--data/vim/patches/8.1.1231943
-rw-r--r--data/vim/patches/8.1.1232234
-rw-r--r--data/vim/patches/8.1.123355
-rw-r--r--data/vim/patches/8.1.123474
-rw-r--r--data/vim/patches/8.1.123569
-rw-r--r--data/vim/patches/8.1.123654
-rw-r--r--data/vim/patches/8.1.1237146
-rw-r--r--data/vim/patches/8.1.123852
-rw-r--r--data/vim/patches/8.1.1239114
-rw-r--r--data/vim/patches/8.1.124072
-rw-r--r--data/vim/patches/8.1.12414186
-rw-r--r--data/vim/patches/8.1.1242154
-rw-r--r--data/vim/patches/8.1.1243228
-rw-r--r--data/vim/patches/8.1.1244265
-rw-r--r--data/vim/patches/8.1.124576
-rw-r--r--data/vim/patches/8.1.124660
-rw-r--r--data/vim/patches/8.1.1247373
-rw-r--r--data/vim/patches/8.1.1248647
-rw-r--r--data/vim/patches/8.1.124976
-rw-r--r--data/vim/patches/8.1.1250130
-rw-r--r--data/vim/patches/8.1.1251217
-rw-r--r--data/vim/patches/8.1.125280
-rw-r--r--data/vim/patches/8.1.125370
-rw-r--r--data/vim/patches/8.1.125499
-rw-r--r--data/vim/patches/8.1.125562
-rw-r--r--data/vim/patches/8.1.1256810
-rw-r--r--data/vim/patches/8.1.125787
-rw-r--r--data/vim/patches/8.1.125856
-rw-r--r--data/vim/patches/8.1.1259273
-rw-r--r--data/vim/patches/8.1.126065
-rw-r--r--data/vim/patches/8.1.12611036
-rw-r--r--data/vim/patches/8.1.1262113
-rw-r--r--data/vim/patches/8.1.126391
-rw-r--r--data/vim/patches/8.1.126487
-rw-r--r--data/vim/patches/8.1.1265291
-rw-r--r--data/vim/patches/8.1.126684
-rw-r--r--data/vim/patches/8.1.1267129
-rw-r--r--data/vim/patches/8.1.126858
-rw-r--r--data/vim/patches/8.1.1269106
-rw-r--r--data/vim/patches/8.1.1270736
-rw-r--r--data/vim/patches/8.1.127180
-rw-r--r--data/vim/patches/8.1.1272126
-rw-r--r--data/vim/patches/8.1.127353
-rw-r--r--data/vim/patches/8.1.127491
-rw-r--r--data/vim/patches/8.1.12751026
-rw-r--r--data/vim/patches/8.1.1276307
-rw-r--r--data/vim/patches/8.1.127746
-rw-r--r--data/vim/patches/8.1.127864
-rw-r--r--data/vim/patches/8.1.127964
-rw-r--r--data/vim/patches/8.1.128018472
-rw-r--r--data/vim/patches/8.1.1281267
-rw-r--r--data/vim/patches/8.1.128249
-rw-r--r--data/vim/patches/8.1.1283191
-rw-r--r--data/vim/patches/8.1.128473
-rw-r--r--data/vim/patches/8.1.1285455
-rw-r--r--data/vim/patches/8.1.128652
-rw-r--r--data/vim/patches/8.1.128776
-rw-r--r--data/vim/patches/8.1.128899
-rw-r--r--data/vim/patches/8.1.1289140
-rw-r--r--data/vim/patches/8.1.1290273
-rw-r--r--data/vim/patches/8.1.1291561
-rw-r--r--data/vim/patches/8.1.1292135
-rw-r--r--data/vim/patches/8.1.12931036
-rw-r--r--data/vim/patches/8.1.129464
-rw-r--r--data/vim/patches/8.1.129586
-rw-r--r--data/vim/patches/8.1.1296186
-rw-r--r--data/vim/patches/8.1.129770
-rw-r--r--data/vim/patches/8.1.129852
-rw-r--r--data/vim/patches/8.1.129987
-rw-r--r--data/vim/patches/8.1.1300149
-rw-r--r--data/vim/patches/8.1.1301116
-rw-r--r--data/vim/patches/8.1.1302180
-rw-r--r--data/vim/patches/8.1.1303335
-rw-r--r--data/vim/patches/8.1.130475
-rw-r--r--data/vim/patches/8.1.1305437
-rw-r--r--data/vim/patches/8.1.13062891
-rw-r--r--data/vim/patches/8.1.1307278
-rw-r--r--data/vim/patches/8.1.130898
-rw-r--r--data/vim/patches/8.1.130958
-rw-r--r--data/vim/patches/8.1.1310619
-rw-r--r--data/vim/patches/8.1.131161
-rw-r--r--data/vim/patches/8.1.1312104
-rw-r--r--data/vim/patches/8.1.1313434
-rw-r--r--data/vim/patches/8.1.13141021
-rw-r--r--data/vim/patches/8.1.1315737
-rw-r--r--data/vim/patches/8.1.131647
-rw-r--r--data/vim/patches/8.1.1317120
-rw-r--r--data/vim/patches/8.1.13184962
-rw-r--r--data/vim/patches/8.1.1319455
-rw-r--r--data/vim/patches/8.1.1320233
-rw-r--r--data/vim/patches/8.1.1321405
-rw-r--r--data/vim/patches/8.1.13221196
-rw-r--r--data/vim/patches/8.1.132382
-rw-r--r--data/vim/patches/8.1.132454
-rw-r--r--data/vim/patches/8.1.1325140
-rw-r--r--data/vim/patches/8.1.1326276
-rw-r--r--data/vim/patches/8.1.1327111
-rw-r--r--data/vim/patches/8.1.132852
-rw-r--r--data/vim/patches/8.1.1329346
-rw-r--r--data/vim/patches/8.1.1330113
-rw-r--r--data/vim/patches/8.1.1331875
-rw-r--r--data/vim/patches/8.1.1332622
-rw-r--r--data/vim/patches/8.1.1333326
-rw-r--r--data/vim/patches/8.1.1334164
-rw-r--r--data/vim/patches/8.1.1335449
-rw-r--r--data/vim/patches/8.1.1336232
-rw-r--r--data/vim/patches/8.1.133789
-rw-r--r--data/vim/patches/8.1.1338111
-rw-r--r--data/vim/patches/8.1.133954
-rw-r--r--data/vim/patches/8.1.1340121
-rw-r--r--data/vim/patches/8.1.1341431
-rw-r--r--data/vim/patches/8.1.134255
-rw-r--r--data/vim/patches/8.1.1343274
-rw-r--r--data/vim/patches/8.1.1344124
-rw-r--r--data/vim/patches/8.1.1345116
-rw-r--r--data/vim/patches/8.1.1346152
-rw-r--r--data/vim/patches/8.1.1347122
-rw-r--r--data/vim/patches/8.1.134875
-rw-r--r--data/vim/patches/8.1.1349127
-rw-r--r--data/vim/patches/8.1.135080
-rw-r--r--data/vim/patches/8.1.1351290
-rw-r--r--data/vim/patches/8.1.135268
-rw-r--r--data/vim/patches/8.1.135357
-rw-r--r--data/vim/patches/8.1.1354275
-rw-r--r--data/vim/patches/8.1.1355460
-rw-r--r--data/vim/patches/8.1.1356206
-rw-r--r--data/vim/patches/8.1.1357493
-rw-r--r--data/vim/patches/8.1.135878
-rw-r--r--data/vim/patches/8.1.1359356
-rw-r--r--data/vim/patches/8.1.1360105
-rw-r--r--data/vim/patches/8.1.136172
-rw-r--r--data/vim/patches/8.1.13622891
-rw-r--r--data/vim/patches/8.1.136392
-rw-r--r--data/vim/patches/8.1.1364469
-rw-r--r--data/vim/patches/8.1.136567
-rw-r--r--data/vim/patches/8.1.1366929
-rw-r--r--data/vim/patches/8.1.136765
-rw-r--r--data/vim/patches/8.1.136852
-rw-r--r--data/vim/patches/8.1.1369154
-rw-r--r--data/vim/patches/8.1.137040
-rw-r--r--data/vim/patches/8.1.1371834
-rw-r--r--data/vim/patches/8.1.1372320
-rw-r--r--data/vim/patches/8.1.1373178
-rw-r--r--data/vim/patches/8.1.137453
-rw-r--r--data/vim/patches/8.1.1375401
-rw-r--r--data/vim/patches/8.1.1376107
-rw-r--r--data/vim/patches/8.1.137790
-rw-r--r--data/vim/patches/8.1.1378514
-rw-r--r--data/vim/patches/8.1.137977
-rw-r--r--data/vim/patches/8.1.138052
-rw-r--r--data/vim/patches/8.1.138184
-rw-r--r--data/vim/patches/8.1.138288
-rw-r--r--data/vim/patches/8.1.138352
-rw-r--r--data/vim/patches/8.1.13844519
-rw-r--r--data/vim/patches/8.1.138553
-rw-r--r--data/vim/patches/8.1.13861872
-rw-r--r--data/vim/patches/8.1.138792
-rw-r--r--data/vim/patches/8.1.1388182
-rw-r--r--data/vim/patches/8.1.1389128
-rw-r--r--data/vim/patches/8.1.1390181
-rw-r--r--data/vim/patches/8.1.13912800
-rw-r--r--data/vim/patches/8.1.139268
-rw-r--r--data/vim/patches/8.1.13931226
-rw-r--r--data/vim/patches/8.1.139457
-rw-r--r--data/vim/patches/8.1.139589
-rw-r--r--data/vim/patches/8.1.1396323
-rw-r--r--data/vim/patches/8.1.139760
-rw-r--r--data/vim/patches/8.1.139844
-rw-r--r--data/vim/patches/8.1.1399323
-rw-r--r--data/vim/patches/8.1.1400320
-rw-r--r--data/vim/patches/8.1.140181
-rw-r--r--data/vim/patches/8.1.1402304
-rw-r--r--data/vim/patches/8.1.1403122
-rw-r--r--data/vim/patches/8.1.140468
-rw-r--r--data/vim/patches/8.1.1405283
-rw-r--r--data/vim/patches/8.1.1406542
-rw-r--r--data/vim/patches/8.1.1407516
-rw-r--r--data/vim/patches/8.1.1408193
-rw-r--r--data/vim/patches/8.1.140980
-rw-r--r--data/vim/patches/8.1.1410553
-rw-r--r--data/vim/patches/8.1.141169
-rw-r--r--data/vim/patches/8.1.1412740
-rw-r--r--data/vim/patches/8.1.1413290
-rw-r--r--data/vim/patches/8.1.14145984
-rw-r--r--data/vim/patches/8.1.141551
-rw-r--r--data/vim/patches/8.1.1416178
-rw-r--r--data/vim/patches/8.1.141794
-rw-r--r--data/vim/patches/8.1.1418323
-rw-r--r--data/vim/patches/8.1.1419195
-rw-r--r--data/vim/patches/8.1.1420149
-rw-r--r--data/vim/patches/8.1.1421244
-rw-r--r--data/vim/patches/8.1.1422286
-rw-r--r--data/vim/patches/8.1.1423242
-rw-r--r--data/vim/patches/8.1.142456
-rw-r--r--data/vim/patches/8.1.1425189
-rw-r--r--data/vim/patches/8.1.1426184
-rw-r--r--data/vim/patches/8.1.142746
-rw-r--r--data/vim/patches/8.1.1428442
-rw-r--r--data/vim/patches/8.1.1429532
-rw-r--r--data/vim/patches/8.1.1430343
-rw-r--r--data/vim/patches/8.1.1431178
-rw-r--r--data/vim/patches/8.1.143252
-rw-r--r--data/vim/patches/8.1.143369
-rw-r--r--data/vim/patches/8.1.14349687
-rw-r--r--data/vim/patches/8.1.143567
-rw-r--r--data/vim/patches/8.1.143695
-rw-r--r--data/vim/patches/8.1.14371880
-rw-r--r--data/vim/patches/8.1.1438276
-rw-r--r--data/vim/patches/8.1.143958
-rw-r--r--data/vim/patches/8.1.144058
-rw-r--r--data/vim/patches/8.1.1441679
-rw-r--r--data/vim/patches/8.1.144281
-rw-r--r--data/vim/patches/8.1.1443501
-rw-r--r--data/vim/patches/8.1.1444218
-rw-r--r--data/vim/patches/8.1.1445391
-rw-r--r--data/vim/patches/8.1.1446291
-rw-r--r--data/vim/patches/8.1.1447110
-rw-r--r--data/vim/patches/8.1.1448170
-rw-r--r--data/vim/patches/8.1.1449669
-rw-r--r--data/vim/patches/8.1.1450168
-rw-r--r--data/vim/patches/8.1.145158
-rw-r--r--data/vim/patches/8.1.1452288
-rw-r--r--data/vim/patches/8.1.1453584
-rw-r--r--data/vim/patches/8.1.145457
-rw-r--r--data/vim/patches/8.1.1455341
-rw-r--r--data/vim/patches/8.1.145673
-rw-r--r--data/vim/patches/8.1.1457211
-rw-r--r--data/vim/patches/8.1.145856
-rw-r--r--data/vim/patches/8.1.145956
-rw-r--r--data/vim/patches/8.1.146085
-rw-r--r--data/vim/patches/8.1.1461139
-rw-r--r--data/vim/patches/8.1.146252
-rw-r--r--data/vim/patches/8.1.146359
-rw-r--r--data/vim/patches/8.1.146481
-rw-r--r--data/vim/patches/8.1.146552
-rw-r--r--data/vim/patches/8.1.1466136
-rw-r--r--data/vim/patches/8.1.146753
-rw-r--r--data/vim/patches/8.1.146887
-rw-r--r--data/vim/patches/8.1.1469229
-rw-r--r--data/vim/patches/8.1.147052
-rw-r--r--data/vim/patches/8.1.1471176
-rw-r--r--data/vim/patches/MD5SUMS1471
-rw-r--r--data/vim/patches/README1497
883 files changed, 412833 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.0591 b/data/vim/patches/8.1.0591
new file mode 100644
index 000000000..4c2395e27
--- /dev/null
+++ b/data/vim/patches/8.1.0591
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0591
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0591
+Problem: Channel sort test is flaky.
+Solution: Do not check if the job is running, it may have be done very fast.
+Files: src/testdir/test_channel.vim
+
+
+*** ../vim-8.1.0590/src/testdir/test_channel.vim 2018-10-12 22:15:06.593268156 +0200
+--- src/testdir/test_channel.vim 2018-12-14 22:40:21.688306402 +0100
+***************
+*** 922,930 ****
+ let options.in_bot = 4
+ endif
+ let g:job = job_start('sort', options)
+- call assert_equal("run", job_status(g:job))
+
+ if !a:use_buffer
+ call ch_sendraw(g:job, "ccc\naaa\nddd\nbbb\neee\n")
+ call ch_close_in(g:job)
+ endif
+--- 922,930 ----
+ let options.in_bot = 4
+ endif
+ let g:job = job_start('sort', options)
+
+ if !a:use_buffer
++ call assert_equal("run", job_status(g:job))
+ call ch_sendraw(g:job, "ccc\naaa\nddd\nbbb\neee\n")
+ call ch_close_in(g:job)
+ endif
+*** ../vim-8.1.0590/src/version.c 2018-12-14 21:31:58.012319694 +0100
+--- src/version.c 2018-12-14 22:41:41.239840257 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 591,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+4. Your eyeglasses have a web site burned in on 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.0592 b/data/vim/patches/8.1.0592
new file mode 100644
index 000000000..636358a9a
--- /dev/null
+++ b/data/vim/patches/8.1.0592
@@ -0,0 +1,86 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0592
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0592
+Problem: The libvterm tests are not run as part of Vim tests.
+Solution: Add testing libvterm.
+Files: src/Makefile, src/libvterm/Makefile
+
+
+*** ../vim-8.1.0591/src/Makefile 2018-12-13 22:17:52.869941530 +0100
+--- src/Makefile 2018-12-15 14:18:27.079141799 +0100
+***************
+*** 2107,2113 ****
+ # TESTING
+ #
+ # Execute the test scripts and the unittests.
+! test check: scripttests unittests
+
+ # Execute the test scripts. Run these after compiling Vim, before installing.
+ # This doesn't depend on $(VIMTARGET), because that won't work when configure
+--- 2109,2115 ----
+ # TESTING
+ #
+ # Execute the test scripts and the unittests.
+! test check: scripttests unittests test_libvterm
+
+ # Execute the test scripts. Run these after compiling Vim, before installing.
+ # This doesn't depend on $(VIMTARGET), because that won't work when configure
+***************
+*** 2159,2164 ****
+--- 2161,2170 ----
+ run_message_test: $(MESSAGE_TEST_TARGET)
+ $(VALGRIND) ./$(MESSAGE_TEST_TARGET) || exit 1; echo $* passed;
+
++ # Run the libvterm tests.
++ test_libvterm:
++ cd libvterm; $(MAKE) -f Makefile test CC="$(CC)"
++
+ # Run individual OLD style test.
+ # These do not depend on the executable, compile it when needed.
+ test1 \
+*** ../vim-8.1.0591/src/libvterm/Makefile 2018-03-25 14:58:44.000000000 +0200
+--- src/libvterm/Makefile 2018-12-15 14:23:00.733725116 +0100
+***************
+*** 8,15 ****
+ LIBTOOL +=--quiet
+ endif
+
+! # override CFLAGS +=-Wall -Iinclude -std=c99 -DINLINE="static inline" -DUSE_INLINE
+! override CFLAGS +=-Wall -Iinclude -std=c90 -Wpedantic -DINLINE=""
+
+ ifeq ($(shell uname),SunOS)
+ override CFLAGS +=-D__EXTENSIONS__ -D_XPG6 -D__XOPEN_OR_POSIX
+--- 8,14 ----
+ LIBTOOL +=--quiet
+ endif
+
+! override CFLAGS +=-Wall -Iinclude -std=c99 -Wpedantic -DINLINE=""
+
+ ifeq ($(shell uname),SunOS)
+ override CFLAGS +=-D__EXTENSIONS__ -D_XPG6 -D__XOPEN_OR_POSIX
+*** ../vim-8.1.0591/src/version.c 2018-12-14 22:42:10.191670447 +0100
+--- src/version.c 2018-12-15 14:24:03.701380097 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 592,
+ /**/
+
+--
+"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.0593 b/data/vim/patches/8.1.0593
new file mode 100644
index 000000000..512995fa1
--- /dev/null
+++ b/data/vim/patches/8.1.0593
@@ -0,0 +1,92 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0593
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0593
+Problem: Illegal memory access in libvterm test.
+Solution: Fix off-by-one error.
+Files: src/libvterm/src/vterm.c, src/libvterm/Makefile,
+ src/libvterm/t/run-test.pl
+
+
+*** ../vim-8.1.0592/src/libvterm/src/vterm.c 2018-04-24 18:23:45.000000000 +0200
+--- src/libvterm/src/vterm.c 2018-12-15 14:43:48.466327193 +0100
+***************
+*** 169,177 ****
+ #else
+ written = vsprintf(buffer, format, args);
+
+! if(written >= (int)(vt->outbuffer_len - vt->outbuffer_cur)) {
+ /* output was truncated */
+! written = vt->outbuffer_len - vt->outbuffer_cur;
+ }
+ if (written > 0)
+ {
+--- 169,177 ----
+ #else
+ written = vsprintf(buffer, format, args);
+
+! if(written >= (int)(vt->outbuffer_len - vt->outbuffer_cur - 1)) {
+ /* output was truncated */
+! written = vt->outbuffer_len - vt->outbuffer_cur - 1;
+ }
+ if (written > 0)
+ {
+*** ../vim-8.1.0592/src/libvterm/Makefile 2018-12-15 14:24:34.293210452 +0100
+--- src/libvterm/Makefile 2018-12-15 14:46:36.649289986 +0100
+***************
+*** 52,57 ****
+--- 52,60 ----
+ MANDIR=$(PREFIX)/share/man
+ MAN3DIR=$(MANDIR)/man3
+
++ # Uncomment to check for memory access errors with valgrind.
++ # VALGRIND=1
++
+ all: $(LIBRARY) $(BINFILES)
+
+ $(LIBRARY): $(OBJECTS)
+*** ../vim-8.1.0592/src/libvterm/t/run-test.pl 2017-06-24 16:44:02.000000000 +0200
+--- src/libvterm/t/run-test.pl 2018-12-15 14:38:07.328417529 +0100
+***************
+*** 16,22 ****
+ {
+ local $ENV{LD_LIBRARY_PATH} = ".libs";
+ my @command = "t/.libs/harness";
+! unshift @command, "valgrind", "--quiet", "--error-exitcode=126" if $VALGRIND;
+
+ $hpid = open2 $hout, $hin, @command or die "Cannot open2 harness - $!";
+ }
+--- 16,22 ----
+ {
+ local $ENV{LD_LIBRARY_PATH} = ".libs";
+ my @command = "t/.libs/harness";
+! unshift @command, "valgrind", "--tool=memcheck", "--leak-check=yes", "--num-callers=25", "--log-file=valgrind.out", "--error-exitcode=126" if $VALGRIND;
+
+ $hpid = open2 $hout, $hin, @command or die "Cannot open2 harness - $!";
+ }
+*** ../vim-8.1.0592/src/version.c 2018-12-15 14:24:34.293210452 +0100
+--- src/version.c 2018-12-15 14:45:09.285829163 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 593,
+ /**/
+
+--
+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.0594 b/data/vim/patches/8.1.0594
new file mode 100644
index 000000000..84e8d6caf
--- /dev/null
+++ b/data/vim/patches/8.1.0594
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0594
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0594
+Problem: Libvterm tests fail to run on Mac.
+Solution: Only run libvterm tests on Linux.
+Files: src/Makefile
+
+
+*** ../vim-8.1.0593/src/Makefile 2018-12-15 14:24:34.293210452 +0100
+--- src/Makefile 2018-12-15 15:32:57.755369207 +0100
+***************
+*** 2160,2167 ****
+ $(VALGRIND) ./$(MESSAGE_TEST_TARGET) || exit 1; echo $* passed;
+
+ # Run the libvterm tests.
+ test_libvterm:
+! cd libvterm; $(MAKE) -f Makefile test CC="$(CC)"
+
+ # Run individual OLD style test.
+ # These do not depend on the executable, compile it when needed.
+--- 2162,2173 ----
+ $(VALGRIND) ./$(MESSAGE_TEST_TARGET) || exit 1; echo $* passed;
+
+ # Run the libvterm tests.
++ # This currently doesn't work on Mac, only run on Linux for now.
+ test_libvterm:
+! @if test `uname` = "Linux"; then \
+! cd libvterm; $(MAKE) -f Makefile test \
+! CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"; \
+! fi
+
+ # Run individual OLD style test.
+ # These do not depend on the executable, compile it when needed.
+*** ../vim-8.1.0593/src/version.c 2018-12-15 14:49:30.800096933 +0100
+--- src/version.c 2018-12-15 15:34:09.922928207 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 594,
+ /**/
+
+--
+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.0595 b/data/vim/patches/8.1.0595
new file mode 100644
index 000000000..7777c51ff
--- /dev/null
+++ b/data/vim/patches/8.1.0595
@@ -0,0 +1,162 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0595
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0595
+Problem: Libvterm tests are not run with coverage.
+Solution: Adjust the Travis config. Show the actually run commands.
+Files: .travis.yml, src/libvterm/Makefile
+
+
+*** ../vim-8.1.0594/.travis.yml 2018-09-05 22:25:45.999112143 +0200
+--- .travis.yml 2018-12-15 15:28:26.969005105 +0100
+***************
+*** 15,21 ****
+ - 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
+--- 15,21 ----
+ - 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 test_libvterm" 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
+***************
+*** 26,32 ****
+
+ sudo: false
+
+! # instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
+ # exclude some builds on mac os x and linux
+ # linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
+ matrix:
+--- 26,32 ----
+
+ sudo: false
+
+! # instead of a 2*2*7 matrix (2*os + 2*compiler + 7*env),
+ # exclude some builds on mac os x and linux
+ # linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
+ matrix:
+***************
+*** 38,44 ****
+ - os: osx
+ env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ - os: osx
+! 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'"
+ - os: osx
+ env: BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
+--- 38,44 ----
+ - os: osx
+ env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ - os: osx
+! env: BUILD=yes TEST="scripttests test_libvterm" 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'"
+ - os: osx
+ env: BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
+***************
+*** 109,115 ****
+ - if [ -n "$err" ]; then exit 1; fi
+
+ after_success:
+! - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b ${SRCDIR} -x .xs -e ${SRCDIR}/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi
+ - if [ "$COVERAGE" = "yes" ]; then cd ${SRCDIR} && bash <(curl -s https://codecov.io/bash) ; fi
+
+ # vim:set sts=2 sw=2 tw=0 et:
+--- 109,115 ----
+ - if [ -n "$err" ]; then exit 1; fi
+
+ after_success:
+! - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b ${SRCDIR} -x .xs -e ${SRCDIR}/if_perl.c -e ${SRCDIR}/xxd -e ${SRCDIR}/libvterm/src --encodings utf-8 latin-1 EUC-KR; fi
+ - if [ "$COVERAGE" = "yes" ]; then cd ${SRCDIR} && bash <(curl -s https://codecov.io/bash) ; fi
+
+ # vim:set sts=2 sw=2 tw=0 et:
+*** ../vim-8.1.0594/src/libvterm/Makefile 2018-12-15 14:49:30.800096933 +0100
+--- src/libvterm/Makefile 2018-12-15 15:55:04.363124936 +0100
+***************
+*** 58,87 ****
+ all: $(LIBRARY) $(BINFILES)
+
+ $(LIBRARY): $(OBJECTS)
+! @echo LINK $@
+! @$(LIBTOOL) --mode=link --tag=CC $(CC) -rpath $(LIBDIR) -version-info $(VERSION_CURRENT):$(VERSION_REVISION):$(VERSION_AGE) -o $@ $^ $(LDFLAGS)
+
+ src/%.lo: src/%.c $(HFILES_INT)
+! @echo CC $<
+! @$(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -o $@ -c $<
+
+ src/encoding/%.inc: src/encoding/%.tbl
+! @echo TBL $<
+! @perl -CSD tbl2inc_c.pl $< >$@
+
+ src/encoding.lo: $(INCFILES)
+
+ bin/%: bin/%.c $(LIBRARY)
+! @echo CC $<
+! @$(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -o $@ $< -lvterm $(LDFLAGS)
+
+ t/harness.lo: t/harness.c $(HFILES)
+! @echo CC $<
+! @$(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -o $@ -c $<
+
+ t/harness: t/harness.lo $(LIBRARY)
+! @echo LINK $@
+! @$(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+ .PHONY: test
+ test: $(LIBRARY) t/harness
+--- 58,81 ----
+ all: $(LIBRARY) $(BINFILES)
+
+ $(LIBRARY): $(OBJECTS)
+! $(LIBTOOL) --mode=link --tag=CC $(CC) -rpath $(LIBDIR) -version-info $(VERSION_CURRENT):$(VERSION_REVISION):$(VERSION_AGE) -o $@ $^ $(LDFLAGS)
+
+ src/%.lo: src/%.c $(HFILES_INT)
+! $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -o $@ -c $<
+
+ src/encoding/%.inc: src/encoding/%.tbl
+! perl -CSD tbl2inc_c.pl $< >$@
+
+ src/encoding.lo: $(INCFILES)
+
+ bin/%: bin/%.c $(LIBRARY)
+! $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -o $@ $< -lvterm $(LDFLAGS)
+
+ t/harness.lo: t/harness.c $(HFILES)
+! $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -o $@ -c $<
+
+ t/harness: t/harness.lo $(LIBRARY)
+! $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+ .PHONY: test
+ test: $(LIBRARY) t/harness
+*** ../vim-8.1.0594/src/version.c 2018-12-15 15:39:25.328984639 +0100
+--- src/version.c 2018-12-15 15:55:29.506967393 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 595,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+13. You refer to going to the bathroom as downloading.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0596 b/data/vim/patches/8.1.0596
new file mode 100644
index 000000000..6514ac041
--- /dev/null
+++ b/data/vim/patches/8.1.0596
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0596
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0596
+Problem: Not all parts of printf() are tested.
+Solution: Add a few more test cases. (Dominique Pelle, closes #3691)
+Files: src/testdir/test_expr.vim
+
+
+*** ../vim-8.1.0595/src/testdir/test_expr.vim 2018-03-03 14:56:04.000000000 +0100
+--- src/testdir/test_expr.vim 2018-12-15 16:06:32.419291794 +0100
+***************
+*** 142,147 ****
+--- 142,163 ----
+ call assert_equal('173', printf('%O', 123))
+ call assert_equal('7b', printf('%x', 123))
+ call assert_equal('7B', printf('%X', 123))
++
++ call assert_equal('123', printf('%hd', 123))
++ call assert_equal('-123', printf('%hd', -123))
++ call assert_equal('-1', printf('%hd', 0xFFFF))
++ call assert_equal('-1', printf('%hd', 0x1FFFFF))
++
++ call assert_equal('123', printf('%hu', 123))
++ call assert_equal('65413', printf('%hu', -123))
++ call assert_equal('65535', printf('%hu', 0xFFFF))
++ call assert_equal('65535', printf('%hu', 0x1FFFFF))
++
++ call assert_equal('123', printf('%ld', 123))
++ call assert_equal('-123', printf('%ld', -123))
++ call assert_equal('65535', printf('%ld', 0xFFFF))
++ call assert_equal('131071', printf('%ld', 0x1FFFF))
++
+ if has('ebcdic')
+ call assert_equal('#', printf('%c', 123))
+ else
+***************
+*** 185,190 ****
+--- 201,211 ----
+ call assert_equal(' 123', printf('% *d', 5, 123))
+ call assert_equal(' +123', printf('%+ *d', 5, 123))
+
++ call assert_equal('foobar', printf('%.*s', 9, 'foobar'))
++ call assert_equal('foo', printf('%.*s', 3, 'foobar'))
++ call assert_equal('', printf('%.*s', 0, 'foobar'))
++ call assert_equal('foobar', printf('%.*s', -1, 'foobar'))
++
+ " Simple quote (thousand grouping char) is ignored.
+ call assert_equal('+00123456', printf("%+'09d", 123456))
+
+***************
+*** 207,212 ****
+--- 228,238 ----
+ call assert_equal(' 00123', printf('%6.5d', 123))
+ call assert_equal(' 0007b', printf('%6.5x', 123))
+
++ call assert_equal('123', printf('%.2d', 123))
++ call assert_equal('0123', printf('%.4d', 123))
++ call assert_equal('0000000123', printf('%.10d', 123))
++ call assert_equal('123', printf('%.0d', 123))
++
+ call assert_equal('abc', printf('%2s', 'abc'))
+ call assert_equal('abc', printf('%2S', 'abc'))
+ call assert_equal('abc', printf('%.4s', 'abc'))
+***************
+*** 305,310 ****
+--- 331,341 ----
+ call assert_equal('inf', printf('%s', 1.0/0.0))
+ call assert_equal('-inf', printf('%s', -1.0/0.0))
+
++ " Test special case where max precision is truncated at 340.
++ call assert_equal('1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', printf('%.330f', 1.0))
++ call assert_equal('1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', printf('%.340f', 1.0))
++ call assert_equal('1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', printf('%.350f', 1.0))
++
+ " Float nan (not a number) has no sign.
+ call assert_equal('nan', printf('%f', sqrt(-1.0)))
+ call assert_equal('nan', printf('%f', 0.0/0.0))
+*** ../vim-8.1.0595/src/version.c 2018-12-15 15:59:29.137676842 +0100
+--- src/version.c 2018-12-15 16:07:31.030949891 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 596,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+15. Your heart races faster and beats irregularly each time you see a new WWW
+ site address in print or on TV, even though you've never had heart
+ problems before.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0597 b/data/vim/patches/8.1.0597
new file mode 100644
index 000000000..b3f5ca366
--- /dev/null
+++ b/data/vim/patches/8.1.0597
@@ -0,0 +1,66 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0597
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0597
+Problem: Cannot run test_libvterm from the top directory.
+Solution: Add test target in toplevel Makefile.
+Files: Makefile
+
+
+*** ../vim-8.1.0596/Makefile 2018-05-17 16:27:04.000000000 +0200
+--- Makefile 2018-12-15 16:18:02.679176344 +0100
+***************
+*** 32,38 ****
+
+ # Some make programs use the last target for the $@ default; put the other
+ # targets separately to always let $@ expand to "first" by default.
+! all install uninstall tools config configure reconfig proto depend lint tags types test scripttests unittests testclean clean distclean:
+ @if test ! -f src/auto/config.mk; then \
+ cp src/config.mk.dist src/auto/config.mk; \
+ fi
+--- 32,38 ----
+
+ # Some make programs use the last target for the $@ default; put the other
+ # targets separately to always let $@ expand to "first" by default.
+! all install uninstall tools config configure reconfig proto depend lint tags types test scripttests test_libvterm unittests testclean clean distclean:
+ @if test ! -f src/auto/config.mk; then \
+ cp src/config.mk.dist src/auto/config.mk; \
+ fi
+***************
+*** 40,45 ****
+--- 40,49 ----
+ @echo "If there are problems, cd to the src directory and run make there"
+ cd src && $(MAKE) $@
+
++ test: all
++ cd src && $(MAKE) test
++ cd runtime/indent && $(MAKE) clean && $(MAKE) test
++
+
+ #########################################################################
+ # 2. Creating the various distribution files.
+*** ../vim-8.1.0596/src/version.c 2018-12-15 16:08:52.998468517 +0100
+--- src/version.c 2018-12-15 16:18:41.378941848 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 597,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+16. You step out of your room and realize that your parents have moved and
+ you don't have a clue when it happened.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0598 b/data/vim/patches/8.1.0598
new file mode 100644
index 000000000..d61b51b22
--- /dev/null
+++ b/data/vim/patches/8.1.0598
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0598
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0598
+Problem: Indent tests may use the wrong Vim binary.
+Solution: Pass in the just built Vim binary.
+Files: Makefile
+
+
+*** ../vim-8.1.0597/Makefile 2018-12-15 16:19:47.546540389 +0100
+--- Makefile 2018-12-15 17:18:55.488237689 +0100
+***************
+*** 39,48 ****
+ @echo "Starting make in the src directory."
+ @echo "If there are problems, cd to the src directory and run make there"
+ cd src && $(MAKE) $@
+!
+! test: all
+! cd src && $(MAKE) test
+! cd runtime/indent && $(MAKE) clean && $(MAKE) test
+
+
+ #########################################################################
+--- 39,56 ----
+ @echo "Starting make in the src directory."
+ @echo "If there are problems, cd to the src directory and run make there"
+ cd src && $(MAKE) $@
+! # When the target is "test" also run the indent tests.
+! @if test "$@" = "test"; then \
+! $(MAKE) indenttest; \
+! fi
+!
+! # Executable used for running the indent tests.
+! VIM_FOR_INDENTTEST = ../../src/vim
+!
+! indenttest:
+! cd runtime/indent && \
+! $(MAKE) clean VIM="$(VIM_FOR_INDENTTEST)" && \
+! $(MAKE) test VIM="$(VIM_FOR_INDENTTEST)"
+
+
+ #########################################################################
+*** ../vim-8.1.0597/src/version.c 2018-12-15 16:19:47.546540389 +0100
+--- src/version.c 2018-12-15 17:20:05.099803770 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 598,
+ /**/
+
+--
+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.0599 b/data/vim/patches/8.1.0599
new file mode 100644
index 000000000..06a3dc446
--- /dev/null
+++ b/data/vim/patches/8.1.0599
@@ -0,0 +1,81 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0599
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0599
+Problem: Without the +eval feature the indent tests don't work.
+Solution: Skip the body of the tests.
+Files: runtime/indent/testdir/cleantest.vim,
+ runtime/indent/testdir/runtest.vim
+
+
+*** ../vim-8.1.0598/runtime/indent/testdir/cleantest.vim 2018-10-25 16:52:46.839887739 +0200
+--- runtime/indent/testdir/cleantest.vim 2018-12-15 17:35:40.801969425 +0100
+***************
+*** 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
+--- 1,11 ----
+! " Only do this with the +eval feature
+! if 1
+!
+! " 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
+!
+! endif
+
+ quit
+*** ../vim-8.1.0598/runtime/indent/testdir/runtest.vim 2018-11-25 04:03:04.262574403 +0100
+--- runtime/indent/testdir/runtest.vim 2018-12-15 17:37:38.093237973 +0100
+***************
+*** 2,7 ****
+--- 2,10 ----
+ "
+ " Current directory must be runtime/indent.
+
++ " Only do this with the +eval feature
++ if 1
++
+ set nocp
+ filetype indent on
+ set nowrapscan
+***************
+*** 116,119 ****
+--- 119,125 ----
+ endif
+ endfor
+
++ " Matching "if 1" at the start.
++ endif
++
+ qall!
+*** ../vim-8.1.0598/src/version.c 2018-12-15 17:23:15.198618664 +0100
+--- src/version.c 2018-12-15 17:42:36.039306305 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 599,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+18. Your wife drapes a blond wig over your monitor to remind you of what she
+ looks like.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0600 b/data/vim/patches/8.1.0600
new file mode 100644
index 000000000..0ed331cb9
--- /dev/null
+++ b/data/vim/patches/8.1.0600
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0600
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0600
+Problem: Channel test is flaky.
+Solution: Add test to list of flaky tests.
+Files: src/testdir/runtest.vim
+
+
+*** ../vim-8.1.0599/src/testdir/runtest.vim 2018-11-16 18:50:13.346534543 +0100
+--- src/testdir/runtest.vim 2018-12-15 17:41:21.891787877 +0100
+***************
+*** 281,286 ****
+--- 281,287 ----
+ \ 'Test_close_callback()',
+ \ 'Test_close_handle()',
+ \ 'Test_close_lambda()',
++ \ 'Test_close_output_buffer()',
+ \ 'Test_close_partial()',
+ \ 'Test_collapse_buffers()',
+ \ 'Test_communicate()',
+*** ../vim-8.1.0599/src/version.c 2018-12-15 17:43:38.870899928 +0100
+--- src/version.c 2018-12-15 17:45:36.842140553 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 600,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+19. All of your friends have an @ in their names.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0601 b/data/vim/patches/8.1.0601
new file mode 100644
index 000000000..12f8c5864
--- /dev/null
+++ b/data/vim/patches/8.1.0601
@@ -0,0 +1,167 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0601
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0601
+Problem: A few compiler warnings.
+Solution: Add type casts. (Mike Williams)
+Files: src/GvimExt/gvimext.cpp, src/memline.c, src/textprop.c
+
+
+*** ../vim-8.1.0600/src/GvimExt/gvimext.cpp 2018-12-14 19:54:35.711994528 +0100
+--- src/GvimExt/gvimext.cpp 2018-12-16 14:31:38.691477523 +0100
+***************
+*** 1084,1090 ****
+ CloseHandle(pi.hProcess);
+ CloseHandle(pi.hThread);
+ }
+- theend:
+ free(cmdStrW);
+
+ return NOERROR;
+--- 1084,1089 ----
+*** ../vim-8.1.0600/src/memline.c 2018-12-13 23:16:32.808280772 +0100
+--- src/memline.c 2018-12-16 14:31:38.691477523 +0100
+***************
+*** 3146,3152 ****
+ colnr_T len = -1;
+
+ if (line != NULL)
+! len = STRLEN(line);
+ return ml_replace_len(lnum, line, len, copy);
+ }
+
+--- 3146,3152 ----
+ colnr_T len = -1;
+
+ if (line != NULL)
+! len = (colnr_T)STRLEN(line);
+ return ml_replace_len(lnum, line, len, copy);
+ }
+
+***************
+*** 3196,3209 ****
+ 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;
+ }
+ }
+ }
+--- 3196,3209 ----
+ size_t textproplen = curbuf->b_ml.ml_line_len - oldtextlen;
+
+ // Need to copy over text properties, stored after the text.
+! newline = alloc(len + 1 + (int)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 += (colnr_T)textproplen;
+ }
+ }
+ }
+*** ../vim-8.1.0600/src/textprop.c 2018-12-14 15:38:28.331597637 +0100
+--- src/textprop.c 2018-12-16 14:31:38.691477523 +0100
+***************
+*** 301,307 ****
+ }
+ if (proplen > 0)
+ *props = text + textlen;
+! return proplen / sizeof(textprop_T);
+ }
+
+ static proptype_T *
+--- 301,307 ----
+ }
+ if (proplen > 0)
+ *props = text + textlen;
+! return (int)(proplen / sizeof(textprop_T));
+ }
+
+ static proptype_T *
+***************
+*** 393,399 ****
+ 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);
+--- 393,399 ----
+ buf->b_ml.ml_line_ptr = newtext;
+ buf->b_ml.ml_flags |= ML_LINE_DIRTY;
+ }
+! buf->b_ml.ml_line_len = (int)len;
+ }
+ }
+ redraw_buf_later(buf, NOT_VALID);
+***************
+*** 423,430 ****
+ {
+ 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;
+--- 423,430 ----
+ {
+ char_u *text = ml_get_buf(buf, lnum, FALSE);
+ size_t textlen = STRLEN(text) + 1;
+! int count = (int)((buf->b_ml.ml_line_len - textlen)
+! / sizeof(textprop_T));
+ int i;
+ textprop_T prop;
+ proptype_T *pt;
+***************
+*** 607,613 ****
+ 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);
+--- 607,613 ----
+ EMSG2(_("E969: Property type %s already defined"), name);
+ return;
+ }
+! prop = (proptype_T *)alloc_clear((int)(sizeof(proptype_T) + STRLEN(name)));
+ if (prop == NULL)
+ return;
+ STRCPY(prop->pt_name, name);
+*** ../vim-8.1.0600/src/version.c 2018-12-15 17:46:18.913870718 +0100
+--- src/version.c 2018-12-16 14:32:28.159174538 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 601,
+ /**/
+
+--
+Computers are useless. They can only give you answers.
+ -- Pablo Picasso
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0602 b/data/vim/patches/8.1.0602
new file mode 100644
index 000000000..def89717a
--- /dev/null
+++ b/data/vim/patches/8.1.0602
@@ -0,0 +1,279 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0602
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0602
+Problem: DirChanged is also triggered when the directory didn't change.
+ (Daniel Hahler)
+Solution: Compare the current with the new directory. (closes #3697)
+Files: src/ex_docmd.c, src/testdir/test_autocmd.vim, src/misc2.c,
+ src/testdir/test_autochdir.vim
+
+
+*** ../vim-8.1.0601/src/ex_docmd.c 2018-12-14 18:52:57.165528788 +0100
+--- src/ex_docmd.c 2018-12-16 15:29:11.614092524 +0100
+***************
+*** 9126,9133 ****
+ void
+ ex_cd(exarg_T *eap)
+ {
+! char_u *new_dir;
+! char_u *tofree;
+
+ new_dir = eap->arg;
+ #if !defined(UNIX) && !defined(VMS)
+--- 9126,9134 ----
+ void
+ ex_cd(exarg_T *eap)
+ {
+! char_u *new_dir;
+! char_u *tofree;
+! int dir_differs;
+
+ new_dir = eap->arg;
+ #if !defined(UNIX) && !defined(VMS)
+***************
+*** 9183,9189 ****
+ new_dir = NameBuff;
+ }
+ #endif
+! if (new_dir == NULL || vim_chdir(new_dir))
+ EMSG(_(e_failed));
+ else
+ {
+--- 9184,9192 ----
+ new_dir = NameBuff;
+ }
+ #endif
+! dir_differs = new_dir == NULL || prev_dir == NULL
+! || STRCMP(prev_dir, new_dir) != 0;
+! if (new_dir == NULL || (dir_differs && vim_chdir(new_dir)))
+ EMSG(_(e_failed));
+ else
+ {
+***************
+*** 9195,9203 ****
+ /* Echo the new current directory if the command was typed. */
+ if (KeyTyped || p_verbose >= 5)
+ ex_pwd(eap);
+! apply_autocmds(EVENT_DIRCHANGED,
+! is_local_chdir ? (char_u *)"window" : (char_u *)"global",
+! new_dir, FALSE, curbuf);
+ }
+ vim_free(tofree);
+ }
+--- 9198,9208 ----
+ /* Echo the new current directory if the command was typed. */
+ if (KeyTyped || p_verbose >= 5)
+ ex_pwd(eap);
+!
+! if (dir_differs)
+! apply_autocmds(EVENT_DIRCHANGED,
+! is_local_chdir ? (char_u *)"window" : (char_u *)"global",
+! new_dir, FALSE, curbuf);
+ }
+ vim_free(tofree);
+ }
+*** ../vim-8.1.0601/src/testdir/test_autocmd.vim 2018-08-08 22:08:28.326846653 +0200
+--- src/testdir/test_autocmd.vim 2018-12-16 15:06:01.850719909 +0100
+***************
+*** 1205,1217 ****
+ augroup END
+ let s:li = []
+ let s:dir_this = getcwd()
+! let s:dir_other = s:dir_this . '/foo'
+! call mkdir(s:dir_other)
+ endfunc
+
+ function s:After_test_dirchanged()
+ exe 'cd' s:dir_this
+! call delete(s:dir_other, 'd')
+ augroup test_dirchanged
+ autocmd!
+ augroup END
+--- 1205,1220 ----
+ augroup END
+ let s:li = []
+ let s:dir_this = getcwd()
+! let s:dir_foo = s:dir_this . '/foo'
+! call mkdir(s:dir_foo)
+! let s:dir_bar = s:dir_this . '/bar'
+! call mkdir(s:dir_bar)
+ endfunc
+
+ function s:After_test_dirchanged()
+ exe 'cd' s:dir_this
+! call delete(s:dir_foo, 'd')
+! call delete(s:dir_bar, 'd')
+ augroup test_dirchanged
+ autocmd!
+ augroup END
+***************
+*** 1221,1230 ****
+ call s:Before_test_dirchanged()
+ autocmd test_dirchanged DirChanged global call add(s:li, "cd:")
+ autocmd test_dirchanged DirChanged global call add(s:li, expand("<afile>"))
+! exe 'cd' s:dir_other
+! call assert_equal(["cd:", s:dir_other], s:li)
+! exe 'lcd' s:dir_other
+! call assert_equal(["cd:", s:dir_other], s:li)
+ call s:After_test_dirchanged()
+ endfunc
+
+--- 1224,1235 ----
+ call s:Before_test_dirchanged()
+ autocmd test_dirchanged DirChanged global call add(s:li, "cd:")
+ autocmd test_dirchanged DirChanged global call add(s:li, expand("<afile>"))
+! exe 'cd' s:dir_foo
+! call assert_equal(["cd:", s:dir_foo], s:li)
+! exe 'cd' s:dir_foo
+! call assert_equal(["cd:", s:dir_foo], s:li)
+! exe 'lcd' s:dir_bar
+! call assert_equal(["cd:", s:dir_foo], s:li)
+ call s:After_test_dirchanged()
+ endfunc
+
+***************
+*** 1232,1241 ****
+ call s:Before_test_dirchanged()
+ autocmd test_dirchanged DirChanged window call add(s:li, "lcd:")
+ autocmd test_dirchanged DirChanged window call add(s:li, expand("<afile>"))
+! exe 'cd' s:dir_other
+ call assert_equal([], s:li)
+! exe 'lcd' s:dir_other
+! call assert_equal(["lcd:", s:dir_other], s:li)
+ call s:After_test_dirchanged()
+ endfunc
+
+--- 1237,1248 ----
+ call s:Before_test_dirchanged()
+ autocmd test_dirchanged DirChanged window call add(s:li, "lcd:")
+ autocmd test_dirchanged DirChanged window call add(s:li, expand("<afile>"))
+! exe 'cd' s:dir_foo
+ call assert_equal([], s:li)
+! exe 'lcd' s:dir_bar
+! call assert_equal(["lcd:", s:dir_bar], s:li)
+! exe 'lcd' s:dir_bar
+! call assert_equal(["lcd:", s:dir_bar], s:li)
+ call s:After_test_dirchanged()
+ endfunc
+
+***************
+*** 1250,1258 ****
+ set acd
+ exe 'cd ..'
+ call assert_equal([], s:li)
+! exe 'edit ' . s:dir_other . '/Xfile'
+! call assert_equal(s:dir_other, getcwd())
+! call assert_equal(["auto:", s:dir_other], s:li)
+ set noacd
+ bwipe!
+ call s:After_test_dirchanged()
+--- 1257,1265 ----
+ set acd
+ exe 'cd ..'
+ call assert_equal([], s:li)
+! exe 'edit ' . s:dir_foo . '/Xfile'
+! call assert_equal(s:dir_foo, getcwd())
+! call assert_equal(["auto:", s:dir_foo], s:li)
+ set noacd
+ bwipe!
+ call s:After_test_dirchanged()
+*** ../vim-8.1.0601/src/misc2.c 2018-12-14 21:31:58.012319694 +0100
+--- src/misc2.c 2018-12-16 15:12:14.376386072 +0100
+***************
+*** 3390,3406 ****
+ * Return OK or FAIL.
+ */
+ int
+! vim_chdirfile(char_u *fname, char *trigger_autocmd UNUSED)
+ {
+! char_u dir[MAXPATHL];
+ int res;
+
+! vim_strncpy(dir, fname, MAXPATHL - 1);
+! *gettail_sep(dir) = NUL;
+! res = mch_chdir((char *)dir) == 0 ? OK : FAIL;
+! if (res == OK && trigger_autocmd != NULL)
+! apply_autocmds(EVENT_DIRCHANGED, (char_u *)trigger_autocmd,
+! dir, FALSE, curbuf);
+ return res;
+ }
+ #endif
+--- 3390,3418 ----
+ * Return OK or FAIL.
+ */
+ int
+! vim_chdirfile(char_u *fname, char *trigger_autocmd)
+ {
+! char_u old_dir[MAXPATHL];
+! char_u new_dir[MAXPATHL];
+ int res;
+
+! if (mch_dirname(old_dir, MAXPATHL) != OK)
+! *old_dir = NUL;
+!
+! vim_strncpy(new_dir, fname, MAXPATHL - 1);
+! *gettail_sep(new_dir) = NUL;
+!
+! if (STRCMP(old_dir, new_dir) == 0)
+! // nothing to do
+! res = OK;
+! else
+! {
+! res = mch_chdir((char *)new_dir) == 0 ? OK : FAIL;
+!
+! if (res == OK && trigger_autocmd != NULL)
+! apply_autocmds(EVENT_DIRCHANGED, (char_u *)trigger_autocmd,
+! new_dir, FALSE, curbuf);
+! }
+ return res;
+ }
+ #endif
+*** ../vim-8.1.0601/src/testdir/test_autochdir.vim 2017-10-27 00:47:53.000000000 +0200
+--- src/testdir/test_autochdir.vim 2018-12-16 15:21:27.396965776 +0100
+***************
+*** 8,18 ****
+--- 8,26 ----
+ let cwd = getcwd()
+ call test_autochdir()
+ set acd
++
++ let s:li = []
++ autocmd DirChanged auto call add(s:li, "autocd")
++ autocmd DirChanged auto call add(s:li, expand("<afile>"))
++
+ new
+ w samples/Xtest
+ call assert_equal("Xtest", expand('%'))
+ call assert_equal("samples", substitute(getcwd(), '.*/\(\k*\)', '\1', ''))
++ call assert_equal(["autocd", getcwd()], s:li)
++
+ bwipe!
++ au! DirChanged
+ set noacd
+ exe 'cd ' . cwd
+ call delete('samples/Xtest')
+*** ../vim-8.1.0601/src/version.c 2018-12-16 14:37:35.845271247 +0100
+--- src/version.c 2018-12-16 15:37:07.343129132 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 602,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+26. You check your mail. It says "no new messages." So you check 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 ///
diff --git a/data/vim/patches/8.1.0603 b/data/vim/patches/8.1.0603
new file mode 100644
index 000000000..9fb690ae2
--- /dev/null
+++ b/data/vim/patches/8.1.0603
@@ -0,0 +1,90 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0603
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0603
+Problem: The :stop command is not tested.
+Solution: Test :stop using a terminal window.
+Files: src/testdir/test_terminal.vim, src/testdir/shared.vim
+
+
+*** ../vim-8.1.0602/src/testdir/test_terminal.vim 2018-11-12 21:42:20.678152930 +0100
+--- src/testdir/test_terminal.vim 2018-12-16 16:04:12.505230125 +0100
+***************
+*** 1683,1685 ****
+--- 1683,1716 ----
+
+ call delete('Xfile')
+ endfunc
++
++ func Test_stop_in_terminal()
++ " We can't expect this to work on all systems, just test on Linux for now.
++ if !has('unix') || system('uname') !~ 'Linux'
++ return
++ endif
++ term /bin/sh
++ let bufnr = bufnr('')
++ call WaitForAssert({-> assert_equal('running', term_getstatus(bufnr))})
++ let lastrow = term_getsize(bufnr)[0]
++
++ call term_sendkeys(bufnr, GetVimCommandClean() . "\r")
++ call term_sendkeys(bufnr, ":echo 'ready'\r")
++ call WaitForAssert({-> assert_match('ready', Get_terminal_text(bufnr, lastrow))})
++
++ call term_sendkeys(bufnr, ":stop\r")
++ " Not sure where "Stopped" shows up, assume in the first three lines.
++ call WaitForAssert({-> assert_match('Stopped',
++ \ Get_terminal_text(bufnr, 1) .
++ \ Get_terminal_text(bufnr, 2) .
++ \ Get_terminal_text(bufnr, 3))})
++
++ call term_sendkeys(bufnr, "fg\r")
++ call term_sendkeys(bufnr, ":echo 'back again'\r")
++ call WaitForAssert({-> assert_match('back again', Get_terminal_text(bufnr, lastrow))})
++
++ call term_sendkeys(bufnr, ":quit\r")
++ call term_wait(bufnr)
++ call Stop_shell_in_terminal(bufnr)
++ exe bufnr . 'bwipe'
++ endfunc
+*** ../vim-8.1.0602/src/testdir/shared.vim 2018-10-12 22:15:06.589268192 +0200
+--- src/testdir/shared.vim 2018-12-16 15:54:32.008715839 +0100
+***************
+*** 345,347 ****
+--- 345,357 ----
+ let job = term_getjob(a:buf)
+ call WaitFor({-> job_status(job) == "dead"})
+ endfunc
++
++ " Gets the text of a terminal line, using term_scrape()
++ func Get_terminal_text(bufnr, row)
++ let list = term_scrape(a:bufnr, a:row)
++ let text = ''
++ for item in list
++ let text .= item.chars
++ endfor
++ return text
++ endfunc
+*** ../vim-8.1.0602/src/version.c 2018-12-16 15:37:58.870807584 +0100
+--- src/version.c 2018-12-16 16:15:28.029084965 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 603,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+27. You refer to your age as 3.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.0604 b/data/vim/patches/8.1.0604
new file mode 100644
index 000000000..f81df4ab7
--- /dev/null
+++ b/data/vim/patches/8.1.0604
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0604
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0604
+Problem: Autocommand test fails on MS-Windows.
+Solution: Use pathcmp() instead of strcmp() to check if a directory differs.
+Files: src/ex_docmd.c, src/misc2.c
+
+
+*** ../vim-8.1.0603/src/ex_docmd.c 2018-12-16 15:37:58.866807609 +0100
+--- src/ex_docmd.c 2018-12-16 16:29:14.595233774 +0100
+***************
+*** 9185,9191 ****
+ }
+ #endif
+ dir_differs = new_dir == NULL || prev_dir == NULL
+! || STRCMP(prev_dir, new_dir) != 0;
+ if (new_dir == NULL || (dir_differs && vim_chdir(new_dir)))
+ EMSG(_(e_failed));
+ else
+--- 9185,9191 ----
+ }
+ #endif
+ dir_differs = new_dir == NULL || prev_dir == NULL
+! || pathcmp((char *)prev_dir, (char *)new_dir, -1) != 0;
+ if (new_dir == NULL || (dir_differs && vim_chdir(new_dir)))
+ EMSG(_(e_failed));
+ else
+*** ../vim-8.1.0603/src/misc2.c 2018-12-16 15:37:58.866807609 +0100
+--- src/misc2.c 2018-12-16 16:29:31.399095437 +0100
+***************
+*** 3402,3408 ****
+ vim_strncpy(new_dir, fname, MAXPATHL - 1);
+ *gettail_sep(new_dir) = NUL;
+
+! if (STRCMP(old_dir, new_dir) == 0)
+ // nothing to do
+ res = OK;
+ else
+--- 3402,3408 ----
+ vim_strncpy(new_dir, fname, MAXPATHL - 1);
+ *gettail_sep(new_dir) = NUL;
+
+! if (pathcmp((char *)old_dir, (char *)new_dir, -1) == 0)
+ // nothing to do
+ res = OK;
+ else
+*** ../vim-8.1.0603/src/version.c 2018-12-16 16:16:05.384854629 +0100
+--- src/version.c 2018-12-16 16:28:15.875724758 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 604,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+28. You have comandeered your teenager's phone line for the net and even his
+ friends know not to call on his line anymore.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0605 b/data/vim/patches/8.1.0605
new file mode 100644
index 000000000..9484770d3
--- /dev/null
+++ b/data/vim/patches/8.1.0605
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0605
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0605
+Problem: Running make in the top directory echoes a comment.
+Solution: Prefix with @. (closes #3698)
+Files: Makefile
+
+
+*** ../vim-8.1.0604/Makefile 2018-12-15 17:23:15.198618664 +0100
+--- Makefile 2018-12-16 16:46:36.695641219 +0100
+***************
+*** 39,45 ****
+ @echo "Starting make in the src directory."
+ @echo "If there are problems, cd to the src directory and run make there"
+ cd src && $(MAKE) $@
+! # When the target is "test" also run the indent tests.
+ @if test "$@" = "test"; then \
+ $(MAKE) indenttest; \
+ fi
+--- 39,45 ----
+ @echo "Starting make in the src directory."
+ @echo "If there are problems, cd to the src directory and run make there"
+ cd src && $(MAKE) $@
+! @# When the target is "test" also run the indent tests.
+ @if test "$@" = "test"; then \
+ $(MAKE) indenttest; \
+ fi
+*** ../vim-8.1.0604/src/version.c 2018-12-16 16:30:17.810717978 +0100
+--- src/version.c 2018-12-16 16:47:31.747268502 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 605,
+ /**/
+
+--
+Bypasses are devices that allow some people to dash from point A to
+point B very fast while other people dash from point B to point A very
+fast. People living at point C, being a point directly in between, are
+often given to wonder what's so great about point A that so many people
+from point B are so keen to get there and what's so great about point B
+that so many people from point A are so keen to get there. They often
+wish that people would just once and for all work out where the hell
+they wanted to be.
+ -- 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.0606 b/data/vim/patches/8.1.0606
new file mode 100644
index 000000000..84c762501
--- /dev/null
+++ b/data/vim/patches/8.1.0606
@@ -0,0 +1,92 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0606
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0606
+Problem: 'cryptmethod' defaults to a very old method.
+Solution: Default to "blowfish2", it is now widely available.
+Files: src/option.c, runtime/doc/options.txt
+
+
+*** ../vim-8.1.0605/src/option.c 2018-11-25 02:18:24.815772654 +0100
+--- src/option.c 2018-12-16 18:04:46.852785142 +0100
+***************
+*** 927,933 ****
+ {"cryptmethod", "cm", P_STRING|P_ALLOCED|P_VI_DEF,
+ #ifdef FEAT_CRYPT
+ (char_u *)&p_cm, PV_CM,
+! {(char_u *)"zip", (char_u *)0L}
+ #else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+--- 927,933 ----
+ {"cryptmethod", "cm", P_STRING|P_ALLOCED|P_VI_DEF,
+ #ifdef FEAT_CRYPT
+ (char_u *)&p_cm, PV_CM,
+! {(char_u *)"blowfish2", (char_u *)0L}
+ #else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+*** ../vim-8.1.0605/runtime/doc/options.txt 2018-11-20 13:32:30.276983764 +0100
+--- runtime/doc/options.txt 2018-12-16 18:06:09.756296470 +0100
+***************
+*** 2366,2372 ****
+
+
+ *'cryptmethod'* *'cm'*
+! 'cryptmethod' 'cm' string (default "zip")
+ global or local to buffer |global-local|
+ {not in Vi}
+ Method used for encryption when the buffer is written to a file:
+--- 2370,2376 ----
+
+
+ *'cryptmethod'* *'cm'*
+! 'cryptmethod' 'cm' string (default "blowfish2")
+ global or local to buffer |global-local|
+ {not in Vi}
+ Method used for encryption when the buffer is written to a file:
+***************
+*** 2397,2404 ****
+ modifications. Also see |:X|.
+
+ When setting the global value to an empty string, it will end up with
+! the value "zip". When setting the local value to an empty string the
+! buffer will use the global value.
+
+ When a new encryption method is added in a later version of Vim, and
+ the current version does not recognize it, you will get *E821* .
+--- 2401,2408 ----
+ modifications. Also see |:X|.
+
+ When setting the global value to an empty string, it will end up with
+! the value "blowfish2". When setting the local value to an empty
+! string the buffer will use the global value.
+
+ When a new encryption method is added in a later version of Vim, and
+ the current version does not recognize it, you will get *E821* .
+*** ../vim-8.1.0605/src/version.c 2018-12-16 16:48:44.282779192 +0100
+--- src/version.c 2018-12-16 18:07:52.371541864 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 606,
+ /**/
+
+--
+"Making it up? Why should I want to make anything up? Life's bad enough
+as it is without wanting to invent any more of it."
+ -- Marvin, the Paranoid Android 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.0607 b/data/vim/patches/8.1.0607
new file mode 100644
index 000000000..14baf9295
--- /dev/null
+++ b/data/vim/patches/8.1.0607
@@ -0,0 +1,172 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0607
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0607
+Problem: Proto files are not in sync with the source code.
+Solution: Update the proto files.
+Files: src/os_mswin.c, src/proto/buffer.pro, src/proto/ex_cmds.pro,
+ src/proto/ex_getln.pro, src/proto/misc2.pro,
+ src/proto/userfunc.pro
+
+
+*** ../vim-8.1.0606/src/os_mswin.c 2018-10-07 22:47:03.629199894 +0200
+--- src/os_mswin.c 2018-12-18 21:53:01.214508779 +0100
+***************
+*** 114,119 ****
+--- 114,120 ----
+ typedef int TEXTMETRIC;
+ typedef int UINT;
+ typedef int WCHAR;
++ typedef int WNDENUMPROC;
+ typedef int WORD;
+ typedef int WPARAM;
+ typedef void VOID;
+*** ../vim-8.1.0606/src/proto/buffer.pro 2018-08-01 17:53:04.689381294 +0200
+--- src/proto/buffer.pro 2018-12-18 21:53:41.878141278 +0100
+***************
+*** 16,22 ****
+ void no_write_message(void);
+ void no_write_message_nobang(buf_T *buf);
+ int curbuf_reusable(void);
+! buf_T *buflist_new(char_u *ffname, char_u *sfname, linenr_T lnum, int flags);
+ void free_buf_options(buf_T *buf, int free_p_ff);
+ int buflist_getfile(int n, linenr_T lnum, int options, int forceit);
+ void buflist_getfpos(void);
+--- 16,22 ----
+ void no_write_message(void);
+ void no_write_message_nobang(buf_T *buf);
+ int curbuf_reusable(void);
+! buf_T *buflist_new(char_u *ffname_arg, char_u *sfname_arg, linenr_T lnum, int flags);
+ void free_buf_options(buf_T *buf, int free_p_ff);
+ int buflist_getfile(int n, linenr_T lnum, int options, int forceit);
+ void buflist_getfpos(void);
+***************
+*** 31,37 ****
+ linenr_T buflist_findlnum(buf_T *buf);
+ void buflist_list(exarg_T *eap);
+ int buflist_name_nr(int fnum, char_u **fname, linenr_T *lnum);
+! int setfname(buf_T *buf, char_u *ffname, char_u *sfname, int message);
+ void buf_set_name(int fnum, char_u *name);
+ void buf_name_changed(buf_T *buf);
+ buf_T *setaltfname(char_u *ffname, char_u *sfname, linenr_T lnum);
+--- 31,37 ----
+ linenr_T buflist_findlnum(buf_T *buf);
+ void buflist_list(exarg_T *eap);
+ int buflist_name_nr(int fnum, char_u **fname, linenr_T *lnum);
+! int setfname(buf_T *buf, char_u *ffname_arg, char_u *sfname_arg, int message);
+ void buf_set_name(int fnum, char_u *name);
+ void buf_name_changed(buf_T *buf);
+ buf_T *setaltfname(char_u *ffname, char_u *sfname, linenr_T lnum);
+*** ../vim-8.1.0606/src/proto/ex_cmds.pro 2018-05-17 13:52:33.000000000 +0200
+--- src/proto/ex_cmds.pro 2018-12-18 21:53:44.294116258 +0100
+***************
+*** 30,36 ****
+ void ex_wnext(exarg_T *eap);
+ void do_wqall(exarg_T *eap);
+ int not_writing(void);
+! int getfile(int fnum, char_u *ffname, char_u *sfname, int setpm, linenr_T lnum, int forceit);
+ int do_ecmd(int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, linenr_T newlnum, int flags, win_T *oldwin);
+ void ex_append(exarg_T *eap);
+ void ex_change(exarg_T *eap);
+--- 30,36 ----
+ void ex_wnext(exarg_T *eap);
+ void do_wqall(exarg_T *eap);
+ int not_writing(void);
+! int getfile(int fnum, char_u *ffname_arg, char_u *sfname_arg, int setpm, linenr_T lnum, int forceit);
+ int do_ecmd(int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, linenr_T newlnum, int flags, win_T *oldwin);
+ void ex_append(exarg_T *eap);
+ void ex_change(exarg_T *eap);
+*** ../vim-8.1.0606/src/proto/ex_getln.pro 2018-09-30 17:11:45.301650017 +0200
+--- src/proto/ex_getln.pro 2018-12-18 21:53:45.258106280 +0100
+***************
+*** 1,4 ****
+--- 1,5 ----
+ /* ex_getln.c */
++ void cmdline_init(void);
+ char_u *getcmdline(int firstc, long count, int indent);
+ char_u *getcmdline_prompt(int firstc, char_u *prompt, int attr, int xp_context, char_u *xp_arg);
+ int text_locked(void);
+***************
+*** 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);
+--- 53,58 ----
+*** ../vim-8.1.0606/src/proto/misc2.pro 2018-11-11 15:20:32.436704418 +0100
+--- src/proto/misc2.pro 2018-12-18 21:53:51.330043518 +0100
+***************
+*** 20,27 ****
+ void adjust_cursor_col(void);
+ 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);
+--- 20,27 ----
+ void adjust_cursor_col(void);
+ int leftcol_changed(void);
+ void vim_mem_profile_dump(void);
+ int alloc_does_fail(long_u size);
++ char_u *alloc(unsigned 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.0606/src/proto/userfunc.pro 2018-10-14 21:40:57.352848455 +0200
+--- src/proto/userfunc.pro 2018-12-18 21:53:56.969985341 +0100
+***************
+*** 4,9 ****
+--- 4,11 ----
+ char_u *deref_func_name(char_u *name, int *lenp, partial_T **partialp, int no_autoload);
+ int get_func_tv(char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, partial_T *partial, dict_T *selfdict);
+ ufunc_T *find_func(char_u *name);
++ void save_funccal(funccal_entry_T *entry);
++ void restore_funccal(void);
+ void free_all_functions(void);
+ int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv);
+ int call_func(char_u *funcname, int len, typval_T *rettv, int argcount_in, typval_T *argvars_in, int (*argv_func)(int, typval_T *, int), linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, partial_T *partial, dict_T *selfdict_in);
+***************
+*** 39,46 ****
+ 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);
+--- 41,46 ----
+*** ../vim-8.1.0606/src/version.c 2018-12-16 18:19:56.142140712 +0100
+--- src/version.c 2018-12-18 21:55:37.112970736 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 607,
+ /**/
+
+--
+"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.0608 b/data/vim/patches/8.1.0608
new file mode 100644
index 000000000..c47d03086
--- /dev/null
+++ b/data/vim/patches/8.1.0608
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0608
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0608
+Problem: Coverals is not updating.
+Solution: Adjust path in Travis config.
+Files: .travis.yml
+
+
+*** ../vim-8.1.0607/.travis.yml 2018-12-15 15:59:29.137676842 +0100
+--- .travis.yml 2018-12-18 22:01:27.089630781 +0100
+***************
+*** 109,115 ****
+ - if [ -n "$err" ]; then exit 1; fi
+
+ after_success:
+! - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b ${SRCDIR} -x .xs -e ${SRCDIR}/if_perl.c -e ${SRCDIR}/xxd -e ${SRCDIR}/libvterm/src --encodings utf-8 latin-1 EUC-KR; fi
+ - if [ "$COVERAGE" = "yes" ]; then cd ${SRCDIR} && bash <(curl -s https://codecov.io/bash) ; fi
+
+ # vim:set sts=2 sw=2 tw=0 et:
+--- 109,115 ----
+ - if [ -n "$err" ]; then exit 1; fi
+
+ after_success:
+! - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b ${SRCDIR} -x .xs -e ${SRCDIR}/if_perl.c -e ${SRCDIR}/xxd -e ${SRCDIR}/libvterm --encodings utf-8 latin-1 EUC-KR; fi
+ - if [ "$COVERAGE" = "yes" ]; then cd ${SRCDIR} && bash <(curl -s https://codecov.io/bash) ; fi
+
+ # vim:set sts=2 sw=2 tw=0 et:
+*** ../vim-8.1.0607/src/version.c 2018-12-18 21:56:25.088495797 +0100
+--- src/version.c 2018-12-18 22:03:21.200589794 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 608,
+ /**/
+
+--
+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.0609 b/data/vim/patches/8.1.0609
new file mode 100644
index 000000000..5403f81a0
--- /dev/null
+++ b/data/vim/patches/8.1.0609
@@ -0,0 +1,105 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0609
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0609
+Problem: MS-Windows: unused variable, depending on the Ruby version.
+Solution: Put ruby_sysinit and NtInitialize inside #ifdef and make them
+ consistent. (Ken Takata)
+Files: src/if_ruby.c
+
+
+*** ../vim-8.1.0608/src/if_ruby.c 2018-09-13 17:26:31.091401618 +0200
+--- src/if_ruby.c 2018-12-19 20:45:35.033529992 +0100
+***************
+*** 326,333 ****
+ # define ruby_init dll_ruby_init
+ # define ruby_init_loadpath dll_ruby_init_loadpath
+ # ifdef WIN3264
+! # define NtInitialize dll_NtInitialize
+! # define ruby_sysinit dll_ruby_sysinit
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
+ # define rb_w32_snprintf dll_rb_w32_snprintf
+ # endif
+--- 326,336 ----
+ # define ruby_init dll_ruby_init
+ # define ruby_init_loadpath dll_ruby_init_loadpath
+ # ifdef WIN3264
+! # ifdef RUBY19_OR_LATER
+! # define ruby_sysinit dll_ruby_sysinit
+! # else
+! # define NtInitialize dll_NtInitialize
+! # endif
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
+ # define rb_w32_snprintf dll_rb_w32_snprintf
+ # endif
+***************
+*** 437,444 ****
+ static void (*dll_ruby_init) (void);
+ static void (*dll_ruby_init_loadpath) (void);
+ # ifdef WIN3264
+! static void (*dll_NtInitialize) (int*, char***);
+ static void (*dll_ruby_sysinit) (int*, char***);
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
+ static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
+ # endif
+--- 440,450 ----
+ static void (*dll_ruby_init) (void);
+ static void (*dll_ruby_init_loadpath) (void);
+ # ifdef WIN3264
+! # ifdef RUBY19_OR_LATER
+ static void (*dll_ruby_sysinit) (int*, char***);
++ # else
++ static void (*dll_NtInitialize) (int*, char***);
++ # endif
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
+ static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
+ # endif
+***************
+*** 637,646 ****
+ {"ruby_init", (RUBY_PROC*)&dll_ruby_init},
+ {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
+ # ifdef WIN3264
+! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19
+! {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize},
+! # else
+ {"ruby_sysinit", (RUBY_PROC*)&dll_ruby_sysinit},
+ # endif
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
+ {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
+--- 643,652 ----
+ {"ruby_init", (RUBY_PROC*)&dll_ruby_init},
+ {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
+ # ifdef WIN3264
+! # ifdef RUBY19_OR_LATER
+ {"ruby_sysinit", (RUBY_PROC*)&dll_ruby_sysinit},
++ # else
++ {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize},
+ # endif
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
+ {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
+*** ../vim-8.1.0608/src/version.c 2018-12-18 22:04:01.264228261 +0100
+--- src/version.c 2018-12-19 20:47:03.188835058 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 609,
+ /**/
+
+--
+Apparently, 1 in 5 people in the world are Chinese. And there are 5
+people in my family, so it must be one of them. It's either my mum
+or my dad. Or my older brother Colin. Or my younger brother
+Ho-Cha-Chu. But I think it's Colin.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0610 b/data/vim/patches/8.1.0610
new file mode 100644
index 000000000..e8257cf64
--- /dev/null
+++ b/data/vim/patches/8.1.0610
@@ -0,0 +1,167 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0610
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0610
+Problem: MS-Windows ctags file list differs from Unix.
+Solution: Define TAGS_FILES in the common makefile. (partly by Ken Takata)
+Files: src/Make_all.mak, src/Makefile, src/Make_mvc.mak,
+ src/Make_cyg_ming.mak
+
+
+*** ../vim-8.1.0609/src/Make_all.mak 2018-12-13 22:17:52.869941530 +0100
+--- src/Make_all.mak 2018-12-19 21:00:47.826888113 +0100
+***************
+*** 1,5 ****
+ #
+! # Common Makefile, defines the list of tests to run.
+ #
+
+ # Individual tests, including the ones part of test_alot.
+--- 1,5 ----
+ #
+! # Common Makefile, defines the list of tests to run and other things.
+ #
+
+ # Individual tests, including the ones part of test_alot.
+***************
+*** 210,212 ****
+--- 210,224 ----
+ test_alot_latin \
+ test_alot_utf8 \
+ test_alot
++
++ # Argument for running ctags.
++ TAGS_FILES = \
++ *.c \
++ *.cpp \
++ *.h \
++ auto/*.c \
++ libvterm/src/*.c \
++ libvterm/src/*.h \
++ libvterm/include/*.h \
++ xdiff/*.c \
++ xdiff/*.h
+*** ../vim-8.1.0609/src/Makefile 2018-12-15 15:39:25.328984639 +0100
+--- src/Makefile 2018-12-19 21:02:16.222281920 +0100
+***************
+*** 1573,1580 ****
+ # ALL_GUI_SRC: all GUI files for Unix
+ #
+ # SRC: files used for current configuration
+- # TAGS_SRC: source files used for make tags
+- # TAGS_INCL: include files used for make tags
+ # ALL_SRC: source files used for make depend and make lint
+
+ BASIC_SRC = \
+--- 1575,1580 ----
+***************
+*** 1656,1664 ****
+ $(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 \
+ gui_beval.c workshop.c wsdebug.c integration.c \
+--- 1656,1661 ----
+***************
+*** 2094,2105 ****
+ # 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
+! types.vim: $(TAGS_SRC) $(TAGS_INCL)
+! ctags --c-kinds=gstu -o- $(TAGS_SRC) $(TAGS_INCL) |\
+ awk 'BEGIN{printf("syntax keyword Type\t")}\
+ {printf("%s ", $$1)}END{print ""}' > $@
+ echo "syn keyword Constant OK FAIL TRUE FALSE MAYBE" >> $@
+--- 2091,2102 ----
+ # Motif and Athena GUI
+ # You can ignore error messages for missing files.
+ tags TAGS: notags
+! $(TAGPRG) $(TAGS_FILES)
+
+ # Make a highlight file for types. Requires Exuberant ctags and awk
+ types: types.vim
+! types.vim: $(TAGS_FILES)
+! ctags --c-kinds=gstu -o- $(TAGS_FILES) |\
+ awk 'BEGIN{printf("syntax keyword Type\t")}\
+ {printf("%s ", $$1)}END{print ""}' > $@
+ echo "syn keyword Constant OK FAIL TRUE FALSE MAYBE" >> $@
+*** ../vim-8.1.0609/src/Make_mvc.mak 2018-12-13 22:17:52.869941530 +0100
+--- src/Make_mvc.mak 2018-12-19 21:02:37.846134088 +0100
+***************
+*** 1270,1277 ****
+
+
+ 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
+--- 1270,1276 ----
+
+
+ tags: notags
+! $(CTAGS) $(TAGS_FILES)
+
+ notags:
+ - if exist tags del tags
+*** ../vim-8.1.0609/src/Make_cyg_ming.mak 2018-12-13 22:17:52.869941530 +0100
+--- src/Make_cyg_ming.mak 2018-12-19 21:02:28.958194833 +0100
+***************
+*** 983,993 ****
+ $(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
+--- 983,989 ----
+ $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) CXX='$(CXX)' STATIC_STDCPLUS=$(STATIC_STDCPLUS)
+
+ tags: notags
+! $(CTAGS) $(TAGS_FILES)
+
+ notags:
+ -$(DEL) tags
+*** ../vim-8.1.0609/src/version.c 2018-12-19 20:48:43.344066228 +0100
+--- src/version.c 2018-12-19 21:04:20.741432814 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 610,
+ /**/
+
+--
+This planet has -- or rather had -- a problem, which was this: most
+of the people living on it were unhappy for pretty much of the time.
+Many solutions were suggested for this problem, but most of these
+were largely concerned with the movements of small green pieces of
+paper, which is odd because on the whole it wasn't the small green
+pieces of paper that were unhappy.
+ -- 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.0611 b/data/vim/patches/8.1.0611
new file mode 100644
index 000000000..2e4868098
--- /dev/null
+++ b/data/vim/patches/8.1.0611
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0611
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0611
+Problem: Crash when using terminal with long composing characters.
+Solution: Make space for all characters. (Yasuhiro Matsumoto, closes #3619,
+ closes #3703)
+Files: src/terminal.c
+
+
+*** ../vim-8.1.0610/src/terminal.c 2018-12-14 15:38:28.331597637 +0100
+--- src/terminal.c 2018-12-20 20:44:17.571775136 +0100
+***************
+*** 1561,1567 ****
+
+ cell2cellattr(&cell, &p[pos.col]);
+
+! if (ga_grow(&ga, MB_MAXBYTES) == OK)
+ {
+ int i;
+ int c;
+--- 1561,1568 ----
+
+ cell2cellattr(&cell, &p[pos.col]);
+
+! // Each character can be up to 6 bytes.
+! if (ga_grow(&ga, VTERM_MAX_CHARS_PER_CELL * 6) == OK)
+ {
+ int i;
+ int c;
+*** ../vim-8.1.0610/src/version.c 2018-12-19 21:05:53.912800490 +0100
+--- src/version.c 2018-12-20 20:45:30.467340591 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 611,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+29. Your phone bill comes to your doorstep in a box.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0612 b/data/vim/patches/8.1.0612
new file mode 100644
index 000000000..9e172788e
--- /dev/null
+++ b/data/vim/patches/8.1.0612
@@ -0,0 +1,250 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0612
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0612
+Problem: Cannot use two global runtime dirs with configure.
+Solution: Support a comma in --with-global-runtime. (James McCoy,
+ closes #3704)
+Files: src/config.h.in, src/configure.ac, src/feature.h, src/os_unix.h,
+ src/auto/configure, src/Makefile
+
+
+*** ../vim-8.1.0611/src/config.h.in 2018-12-12 20:34:06.072356129 +0100
+--- src/config.h.in 2018-12-21 11:39:15.980806116 +0100
+***************
+*** 453,461 ****
+ /* Define if you want to include terminal emulator support. */
+ #undef FEAT_TERMINAL
+
+! /* Define default global runtime path */
+ #undef RUNTIME_GLOBAL
+
+ /* Define name of who modified a released Vim */
+ #undef MODIFIED_BY
+
+--- 453,464 ----
+ /* Define if you want to include terminal emulator support. */
+ #undef FEAT_TERMINAL
+
+! // Define default global runtime path.
+ #undef RUNTIME_GLOBAL
+
++ // Define default global runtime after path.
++ #undef RUNTIME_GLOBAL_AFTER
++
+ /* Define name of who modified a released Vim */
+ #undef MODIFIED_BY
+
+*** ../vim-8.1.0611/src/configure.ac 2018-12-12 20:34:06.072356129 +0100
+--- src/configure.ac 2018-12-21 11:36:38.369939450 +0100
+***************
+*** 345,354 ****
+ AC_SUBST(VIEWNAME)
+
+ AC_MSG_CHECKING(--with-global-runtime argument)
+! AC_ARG_WITH(global-runtime, [ --with-global-runtime=DIR global runtime directory in 'runtimepath'],
+! AC_MSG_RESULT($withval); AC_DEFINE_UNQUOTED(RUNTIME_GLOBAL, "$withval"),
+ AC_MSG_RESULT(no))
+
+ AC_MSG_CHECKING(--with-modified-by argument)
+ AC_ARG_WITH(modified-by, [ --with-modified-by=NAME name of who modified a release version],
+ AC_MSG_RESULT($withval); AC_DEFINE_UNQUOTED(MODIFIED_BY, "$withval"),
+--- 345,360 ----
+ AC_SUBST(VIEWNAME)
+
+ AC_MSG_CHECKING(--with-global-runtime argument)
+! AC_ARG_WITH(global-runtime, [ --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories],
+! RUNTIME_GLOBAL="$withval"; AC_MSG_RESULT($withval),
+ AC_MSG_RESULT(no))
+
++ if test "X$RUNTIME_GLOBAL" != "X"; then
++ RUNTIME_GLOBAL_AFTER=$(printf -- "$RUNTIME_GLOBAL\\n" | $AWK -F, 'BEGIN { comma=0 } { for (i = NF; i > 0; i--) { if (comma) { printf ",%s/after", $i } else { printf "%s/after", $i; comma=1 } } } END { printf "\n" }')
++ AC_DEFINE_UNQUOTED(RUNTIME_GLOBAL, "$RUNTIME_GLOBAL")
++ AC_DEFINE_UNQUOTED(RUNTIME_GLOBAL_AFTER, "$RUNTIME_GLOBAL_AFTER")
++ fi
++
+ AC_MSG_CHECKING(--with-modified-by argument)
+ AC_ARG_WITH(modified-by, [ --with-modified-by=NAME name of who modified a release version],
+ AC_MSG_RESULT($withval); AC_DEFINE_UNQUOTED(MODIFIED_BY, "$withval"),
+*** ../vim-8.1.0611/src/feature.h 2018-12-14 12:18:07.764091572 +0100
+--- src/feature.h 2018-12-21 11:36:38.369939450 +0100
+***************
+*** 973,979 ****
+ #endif
+
+ /*
+! * RUNTIME_GLOBAL Directory name for global Vim runtime directory.
+ * Don't define this if the preprocessor can't handle
+ * string concatenation.
+ * Also set by "--with-global-runtime" configure argument.
+--- 973,980 ----
+ #endif
+
+ /*
+! * RUNTIME_GLOBAL Comma-separated list of directory names for global Vim
+! * runtime directories.
+ * Don't define this if the preprocessor can't handle
+ * string concatenation.
+ * Also set by "--with-global-runtime" configure argument.
+***************
+*** 981,986 ****
+--- 982,996 ----
+ /* #define RUNTIME_GLOBAL "/etc/vim" */
+
+ /*
++ * RUNTIME_GLOBAL_AFTER Comma-separated list of directory names for global Vim
++ * runtime after directories.
++ * Don't define this if the preprocessor can't handle
++ * string concatenation.
++ * Also set by "--with-global-runtime" configure argument.
++ */
++ /* #define RUNTIME_GLOBAL_AFTER "/etc/vim/after" */
++
++ /*
+ * MODIFIED_BY Name of who modified Vim. Required when distributing
+ * a modified version of Vim.
+ * Also from the "--with-modified-by" configure argument.
+*** ../vim-8.1.0611/src/os_unix.h 2018-08-11 13:57:16.215969777 +0200
+--- src/os_unix.h 2018-12-21 11:36:38.369939450 +0100
+***************
+*** 369,376 ****
+ # define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
+ #else
+ # ifdef RUNTIME_GLOBAL
+! # define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after,~/.vim/after"
+! # define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after"
+ # else
+ # define DFLT_RUNTIMEPATH "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
+ # define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
+--- 369,381 ----
+ # define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
+ #else
+ # ifdef RUNTIME_GLOBAL
+! # ifdef RUNTIME_GLOBAL_AFTER
+! # define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER ",~/.vim/after"
+! # define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER
+! # else
+! # define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after,~/.vim/after"
+! # define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after"
+! # endif
+ # else
+ # define DFLT_RUNTIMEPATH "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
+ # define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
+*** ../vim-8.1.0611/src/auto/configure 2018-12-12 20:34:06.072356129 +0100
+--- src/auto/configure 2018-12-21 11:40:48.312141467 +0100
+***************
+*** 1533,1539 ****
+ --with-vim-name=NAME what to call the Vim executable
+ --with-ex-name=NAME what to call the Ex executable
+ --with-view-name=NAME what to call the View executable
+! --with-global-runtime=DIR global runtime directory in 'runtimepath'
+ --with-modified-by=NAME name of who modified a release version
+ --with-features=TYPE tiny, small, normal, big or huge (default: huge)
+ --with-compiledby=NAME name to show in :version message
+--- 1533,1539 ----
+ --with-vim-name=NAME what to call the Vim executable
+ --with-ex-name=NAME what to call the Ex executable
+ --with-view-name=NAME what to call the View executable
+! --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories
+ --with-modified-by=NAME name of who modified a release version
+ --with-features=TYPE tiny, small, normal, big or huge (default: huge)
+ --with-compiledby=NAME name to show in :version message
+***************
+*** 4890,4906 ****
+
+ # Check whether --with-global-runtime was given.
+ if test "${with_global_runtime+set}" = set; then :
+! withval=$with_global_runtime; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
+! $as_echo "$withval" >&6; }; cat >>confdefs.h <<_ACEOF
+! #define RUNTIME_GLOBAL "$withval"
+! _ACEOF
+!
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
+ $as_echo_n "checking --with-modified-by argument... " >&6; }
+
+--- 4890,4915 ----
+
+ # Check whether --with-global-runtime was given.
+ if test "${with_global_runtime+set}" = set; then :
+! withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
+! $as_echo "$withval" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+
+
++ if test "X$RUNTIME_GLOBAL" != "X"; then
++ RUNTIME_GLOBAL_AFTER=$(printf -- "$RUNTIME_GLOBAL\\n" | $AWK -F, 'BEGIN { comma=0 } { for (i = NF; i > 0; i--) { if (comma) { printf ",%s/after", $i } else { printf "%s/after", $i; comma=1 } } } END { printf "\n" }')
++ cat >>confdefs.h <<_ACEOF
++ #define RUNTIME_GLOBAL "$RUNTIME_GLOBAL"
++ _ACEOF
++
++ cat >>confdefs.h <<_ACEOF
++ #define RUNTIME_GLOBAL_AFTER "$RUNTIME_GLOBAL_AFTER"
++ _ACEOF
++
++ fi
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
+ $as_echo_n "checking --with-modified-by argument... " >&6; }
+
+*** ../vim-8.1.0611/src/Makefile 2018-12-19 21:05:53.912800490 +0100
+--- src/Makefile 2018-12-21 11:46:23.097728323 +0100
+***************
+*** 317,328 ****
+ # You can give a lot of options to configure.
+ # Change this to your desire and do 'make config' afterwards
+
+! # examples (can only use one!):
+! #CONF_ARGS = --exec-prefix=/usr
+! #CONF_ARGS = --with-vim-name=vim7 --with-ex-name=ex7 --with-view-name=view7
+! #CONF_ARGS = --with-global-runtime=/etc/vim
+! #CONF_ARGS = --with-local-dir=/usr/share
+! #CONF_ARGS = --without-local-dir
+
+ # Use this one if you distribute a modified version of Vim.
+ #CONF_ARGS = --with-modified-by="John Doe"
+--- 317,329 ----
+ # You can give a lot of options to configure.
+ # Change this to your desire and do 'make config' afterwards
+
+! # examples:
+! #CONF_ARGS1 = --exec-prefix=/usr
+! #CONF_ARGS2 = --with-vim-name=vim8 --with-ex-name=ex8 --with-view-name=view8
+! #CONF_ARGS3 = --with-global-runtime=/etc/vim,/usr/share/vim
+! #CONF_ARGS4 = --with-local-dir=/usr/share
+! #CONF_ARGS5 = --without-local-dir
+! CONF_ARGS = $(CONF_ARGS1) $(CONF_ARGS2) $(CONF_ARGS3) $(CONF_ARGS4) $(CONF_ARGS5)
+
+ # Use this one if you distribute a modified version of Vim.
+ #CONF_ARGS = --with-modified-by="John Doe"
+*** ../vim-8.1.0611/src/version.c 2018-12-20 20:47:28.462655566 +0100
+--- src/version.c 2018-12-21 11:46:36.993628084 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 612,
+ /**/
+
+--
+Due knot trussed yore spell chequer two fined awl miss steaks.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0613 b/data/vim/patches/8.1.0613
new file mode 100644
index 000000000..8b509b0cf
--- /dev/null
+++ b/data/vim/patches/8.1.0613
@@ -0,0 +1,159 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0613
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0613
+Problem: When executing an insecure function the secure flag is stuck.
+ (Gabriel Barta)
+Solution: Restore "secure" instead of decrementing it. (closes #3705)
+Files: src/testdir/test_autocmd.vim, src/option.c, src/buffer.c
+
+
+*** ../vim-8.1.0612/src/testdir/test_autocmd.vim 2018-12-16 15:37:58.866807609 +0100
+--- src/testdir/test_autocmd.vim 2018-12-21 12:56:42.539308810 +0100
+***************
+*** 650,655 ****
+--- 650,677 ----
+ "delfunc! AutoCommandOptionSet
+ endfunc
+
++ func Test_OptionSet_modeline()
++ call test_override('starting', 1)
++ au! OptionSet
++ augroup set_tabstop
++ au OptionSet tabstop call timer_start(1, {-> execute("echo 'Handler called'", "")})
++ augroup END
++ call writefile(['vim: set ts=7 sw=5 :', 'something'], 'XoptionsetModeline')
++ set modeline
++ let v:errmsg = ''
++ call assert_fails('split XoptionsetModeline', 'E12:')
++ call assert_equal(7, &ts)
++ call assert_equal('', v:errmsg)
++
++ augroup set_tabstop
++ au!
++ augroup END
++ bwipe!
++ set ts&
++ call delete('XoptionsetModeline')
++ call test_override('starting', 0)
++ endfunc
++
+ " Test for Bufleave autocommand that deletes the buffer we are about to edit.
+ func Test_BufleaveWithDelete()
+ new | edit Xfile1
+*** ../vim-8.1.0612/src/option.c 2018-12-16 18:19:56.138140742 +0100
+--- src/option.c 2018-12-21 12:54:17.032357226 +0100
+***************
+*** 5214,5220 ****
+
+ {
+ 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
+--- 5214,5220 ----
+
+ {
+ long_u *p = insecure_flag(opt_idx, opt_flags);
+! int secure_saved = secure;
+
+ // When an option is set in the sandbox, from a
+ // modeline or in secure mode, then deal with side
+***************
+*** 5227,5247 ****
+ #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, &value_checked);
+
+! if (did_inc_secure)
+! --secure;
+ }
+
+ #if defined(FEAT_EVAL)
+--- 5227,5244 ----
+ #endif
+ || (opt_flags & OPT_MODELINE)
+ || (!value_is_replaced && (*p & P_INSECURE)))
+ ++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, &value_checked);
+
+! secure = secure_saved;
+ }
+
+ #if defined(FEAT_EVAL)
+*** ../vim-8.1.0612/src/buffer.c 2018-12-13 22:17:52.873941502 +0100
+--- src/buffer.c 2018-12-21 12:55:36.679783373 +0100
+***************
+*** 5519,5524 ****
+--- 5519,5525 ----
+
+ if (*s != NUL) /* skip over an empty "::" */
+ {
++ int secure_save = secure;
+ #ifdef FEAT_EVAL
+ save_current_sctx = current_sctx;
+ current_sctx.sc_sid = SID_MODELINE;
+***************
+*** 5530,5536 ****
+
+ retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
+
+! --secure;
+ #ifdef FEAT_EVAL
+ current_sctx = save_current_sctx;
+ #endif
+--- 5531,5537 ----
+
+ retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
+
+! secure = secure_save;
+ #ifdef FEAT_EVAL
+ current_sctx = save_current_sctx;
+ #endif
+*** ../vim-8.1.0612/src/version.c 2018-12-21 11:48:48.324680461 +0100
+--- src/version.c 2018-12-21 12:52:28.649137990 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 613,
+ /**/
+
+--
+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.0614 b/data/vim/patches/8.1.0614
new file mode 100644
index 000000000..5a9db0ac0
--- /dev/null
+++ b/data/vim/patches/8.1.0614
@@ -0,0 +1,3620 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0614
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0614
+Problem: Placing signs can be complicated.
+Solution: Add functions for defining and placing signs. Introduce a group
+ name to avoid different plugins using the same signs. (Yegappan
+ Lakshmanan, closes #3652)
+Files: runtime/doc/eval.txt, runtime/doc/sign.txt,
+ runtime/doc/usr_41.txt, src/alloc.h, src/buffer.c, src/evalfunc.c,
+ src/ex_cmds.c, src/globals.h, src/list.c, src/misc2.c,
+ src/netbeans.c, src/proto/buffer.pro, src/proto/ex_cmds.pro,
+ src/proto/list.pro, src/proto/misc2.pro, src/structs.h,
+ src/testdir/test_signs.vim, src/workshop.c
+
+
+*** ../vim-8.1.0613/runtime/doc/eval.txt 2018-12-13 22:17:52.869941530 +0100
+--- runtime/doc/eval.txt 2018-12-21 14:49:21.627875310 +0100
+***************
+*** 2395,2400 ****
+--- 2408,2422 ----
+ String escape {string} for use as shell
+ command argument
+ shiftwidth([{col}]) Number effective value of 'shiftwidth'
++ sign_define({name} [, {dict}]) Number define or update a sign
++ sign_getdefined([{name}]) List get a list of defined signs
++ sign_getplaced([{expr} [, {dict}]])
++ List get a list of placed signs
++ sign_place({id}, {group}, {name}, {expr} [, {dict}])
++ Number place a sign
++ sign_undefine([{name}]) Number undefine a sign
++ sign_unplace({group} [, {dict}])
++ Number unplace a sign
+ simplify({filename}) String simplify filename as much as possible
+ sin({expr}) Float sine of {expr}
+ sinh({expr}) Float hyperbolic sine of {expr}
+***************
+*** 7841,7847 ****
+--- 7867,8083 ----
+ 'vartabstop' feature. If the 'vartabstop' setting is enabled and
+ no {col} argument is given, column 1 will be assumed.
+
++ sign_define({name} [, {dict}]) *sign_define()*
++ Define a new sign named {name} or modify the attributes of an
++ existing sign. This is similar to the |:sign-define| command.
+
++ Prefix {name} with a unique text to avoid name collisions.
++ There is no {group} like with placing signs.
++
++ The {name} can be a String or a Number. The optional {dict}
++ argument specifies the sign attributes. The following values
++ are supported:
++ icon full path to the bitmap file for the sign.
++ linehl highlight group used for the whole line the
++ sign is placed in.
++ text text that is displayed when there is no icon
++ or the GUI is not being used.
++ texthl highlight group used for the text item
++ For an existing sign, the attributes are updated.
++
++ Returns 0 on success and -1 on failure.
++
++ Examples: >
++ call sign_define("mySign", {"text" : "=>", "texthl" :
++ \ "Error", "linehl" : "Search"})
++ <
++ sign_getdefined([{name}]) *sign_getdefined()*
++ Get a list of defined signs and their attributes.
++ This is similar to the |:sign-list| command.
++
++ If the {name} is not supplied, then a list of all the defined
++ signs is returned. Otherwise the attribute of the specified
++ sign is returned.
++
++ Each list item in the returned value is a dictionary with the
++ following entries:
++ icon full path to the bitmap file of the sign
++ linehl highlight group used for the whole line the
++ sign is placed in.
++ name name of the sign
++ text text that is displayed when there is no icon
++ or the GUI is not being used.
++ texthl highlight group used for the text item
++
++ Returns an empty List if there are no signs and when {name} is
++ not found.
++
++ Examples: >
++ " Get a list of all the defined signs
++ echo sign_getdefined()
++
++ " Get the attribute of the sign named mySign
++ echo sign_getdefined("mySign")
++ <
++ sign_getplaced([{expr} [, {dict}]]) *sign_getplaced()*
++ Return a list of signs placed in a buffer or all the buffers.
++ This is similar to the |:sign-place-list| command.
++
++ If the optional buffer name {expr} is specified, then only the
++ list of signs placed in that buffer is returned. For the use
++ of {expr}, see |bufname()|. The optional {dict} can contain
++ the following entries:
++ group select only signs in this group
++ id select sign with this identifier
++ lnum select signs placed in this line. For the use
++ of {lnum}, see |line()|.
++ If {group} is '*', then signs in all the groups including the
++ global group are returned. If {group} is not supplied, then
++ only signs in the global group are returned. If no arguments
++ are supplied, then signs in the global group placed in all the
++ buffers are returned.
++
++ Each list item in the returned value is a dictionary with the
++ following entries:
++ bufnr number of the buffer with the sign
++ signs list of signs placed in {bufnr}. Each list
++ item is a dictionary with the below listed
++ entries
++
++ The dictionary for each sign contains the following entries:
++ group sign group. Set to '' for the global group.
++ id identifier of the sign
++ lnum line number where the sign is placed
++ name name of the defined sign
++ priority sign priority
++
++ Returns an empty list on failure.
++
++ Examples: >
++ " Get a List of signs placed in eval.c in the
++ " global group
++ echo sign_getplaced("eval.c")
++
++ " Get a List of signs in group 'g1' placed in eval.c
++ echo sign_getplaced("eval.c", {'group' : 'g1'})
++
++ " Get a List of signs placed at line 10 in eval.c
++ echo sign_getplaced("eval.c", {'lnum' : 10})
++
++ " Get sign with identifier 10 placed in a.py
++ echo sign_getplaced("a.py", {'id' : 10'})
++
++ " Get sign with id 20 in group 'g1' placed in a.py
++ echo sign_getplaced("a.py", {'group' : 'g1',
++ \ 'id' : 20'})
++
++ " Get a List of all the placed signs
++ echo sign_getplaced()
++ <
++ *sign_place()*
++ sign_place({id}, {group}, {name}, {expr} [, {dict}])
++ Place the sign defined as {name} at line {lnum} in file {expr}
++ and assign {id} and {group} to sign. This is similar to the
++ |:sign-place| command.
++
++ If the sign identifier {id} is zero, then a new identifier is
++ allocated. Otherwise the specified number is used. {group} is
++ the sign group name. To use the global sign group, use an
++ empty string. {group} functions as a namespace for {id}, thus
++ two groups can use the same IDs.
++
++ {name} refers to a defined sign.
++ {expr} refers to a buffer name or number. For the accepted
++ values, see |bufname()|.
++
++ The optional {dict} argument supports the following entries:
++ lnum line number in the buffer {expr} where
++ the sign is to be placed. For the
++ accepted values, see |line()|.
++ priority priority of the sign. See
++ |sign-priority| for more information.
++
++ If the optional {dict} is not specified, then it modifies the
++ placed sign {id} in group {group} to use the defined sign
++ {name}.
++
++ Returns the sign identifier on success and -1 on failure.
++
++ Examples: >
++ " Place a sign named sign1 with id 5 at line 20 in
++ " buffer json.c
++ call sign_place(5, '', 'sign1', 'json.c',
++ \ {'lnum' : 20})
++
++ " Updates sign 5 in buffer json.c to use sign2
++ call sign_place(5, '', 'sign2', 'json.c')
++
++ " Place a sign named sign3 at line 30 in
++ " buffer json.c with a new identifier
++ let id = sign_place(0, '', 'sign3', 'json.c',
++ \ {'lnum' : 30})
++
++ " Place a sign named sign4 with id 10 in group 'g3'
++ " at line 40 in buffer json.c with priority 90
++ call sign_place(10, 'g3', 'sign4', 'json.c',
++ \ {'lnum' : 40, 'priority' : 90})
++ <
++ sign_undefine([{name}]) *sign_undefine()*
++ Deletes a previously defined sign {name}. This is similar to
++ the |:sign-undefine| command. If {name} is not supplied, then
++ deletes all the defined signs.
++
++ Returns 0 on success and -1 on failure.
++
++ Examples: >
++ " Delete a sign named mySign
++ call sign_undefine("mySign")
++
++ " Delete all the signs
++ call sign_undefine()
++ <
++ sign_unplace({group} [, {dict}]) *sign_unplace()*
++ Remove a previously placed sign in one or more buffers. This
++ is similar to the |:sign-unplace()| command.
++
++ {group} is the sign group name. To use the global sign group,
++ use an empty string. If {group} is set to '*', then all the
++ groups including the global group are used.
++ The signs in {group} are selected based on the entries in
++ {dict}. The following optional entries in {dict} are
++ supported:
++ buffer buffer name or number. See |bufname()|.
++ id sign identifier
++ If {dict} is not supplied, then all the signs in {group} are
++ removed.
++
++ Returns 0 on success and -1 on failure.
++
++ Examples: >
++ " Remove sign 10 from buffer a.vim
++ call sign_unplace('', {'buffer' : "a.vim", 'id' : 10})
++
++ " Remove sign 20 in group 'g1' from buffer 3
++ call sign_unplace('g1', {'buffer' : 3, 'id' : 20})
++
++ " Remove all the signs in group 'g2' from buffer 10
++ call sign_unplace('g2', {'buffer' : 10})
++
++ " Remove sign 30 in group 'g3' from all the buffers
++ call sign_unplace('g3', {'id' : 30})
++
++ " Remove all the signs placed in buffer 5
++ call sign_unplace('*', {'buffer' : 5})
++
++ " Remove the signs in group 'g4' from all the buffers
++ call sign_unplace('g4')
++
++ " Remove sign 40 from all the buffers
++ call sign_unplace('*', {'id' : 40})
++
++ " Remove all the placed signs from all the buffers
++ call sign_unplace('*')
++ <
+ simplify({filename}) *simplify()*
+ Simplify the file name as much as possible without changing
+ the meaning. Shortcuts (on MS-Windows) or symbolic links (on
+*** ../vim-8.1.0613/runtime/doc/sign.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/sign.txt 2018-12-21 14:52:11.058495079 +0100
+***************
+*** 51,56 ****
+--- 51,70 ----
+ Example to set the color: >
+
+ :highlight SignColumn guibg=darkgrey
++ <
++ *sign-group*
++ Each sign can be assigned to either the global group or a named group. When
++ placing a sign, if a group name is not supplied, or an empty string is used,
++ then the sign is placed in the global group. Otherwise the sign is placed in
++ the named group. The sign identifier is unique within a group. The sign group
++ allows Vim plugins to use unique signs without interfering with other plugins
++ using signs.
++
++ *sign-priority*
++ Each placed sign is assigned a priority value. When multiple signs are placed
++ on the same line, the attributes of the sign with the highest priority is used
++ independent of the sign group. The default priority for a sign is 10. The
++ priority is assigned at the time of placing a sign.
+
+ ==============================================================================
+ 2. Commands *sign-commands* *:sig* *:sign*
+***************
+*** 69,74 ****
+--- 83,90 ----
+
+ DEFINING A SIGN. *:sign-define* *E255* *E160* *E612*
+
++ See |sign_define()| for the equivalent Vim script function.
++
+ :sign define {name} {argument}...
+ Define a new sign or set attributes for an existing sign.
+ The {name} can either be a number (all digits) or a name
+***************
+*** 106,118 ****
+--- 122,139 ----
+
+ DELETING A SIGN *:sign-undefine* *E155*
+
++ See |sign_undefine()| for the equivalent Vim script function.
++
+ :sign undefine {name}
+ Deletes a previously defined sign. If signs with this {name}
+ are still placed this will cause trouble.
+
+
++
+ LISTING SIGNS *:sign-list* *E156*
+
++ See |sign_getdefined()| for the equivalent Vim script function.
++
+ :sign list Lists all defined signs and their attributes.
+
+ :sign list {name}
+***************
+*** 121,126 ****
+--- 142,149 ----
+
+ PLACING SIGNS *:sign-place* *E158*
+
++ See |sign_place()| for the equivalent Vim script function.
++
+ :sign place {id} line={lnum} name={name} file={fname}
+ Place sign defined as {name} at line {lnum} in file {fname}.
+ *:sign-fname*
+***************
+*** 136,141 ****
+--- 159,183 ----
+ to be done several times and making changes may not work as
+ expected).
+
++ The following optional sign attributes can be specified before
++ "file=":
++ group={group} Place sign in sign group {group}
++ priority={prio} Assign priority {prio} to sign
++
++ By default, the sign is placed in the global sign group.
++
++ By default, the sign is assigned a default priority of 10. To
++ assign a different priority value, use "priority={prio}" to
++ specify a value. The priority is used to determine the
++ highlight group used when multiple signs are placed on the
++ same line.
++
++ Examples: >
++ :sign place 5 line=3 name=sign1 file=a.py
++ :sign place 6 group=g2 line=2 name=sign2 file=x.py
++ :sign place 9 group=g2 priority=50 line=5
++ \ name=sign1 file=a.py
++ <
+ :sign place {id} line={lnum} name={name} buffer={nr}
+ Same, but use buffer {nr}.
+
+***************
+*** 146,176 ****
+ This can be used to change the displayed sign without moving
+ it (e.g., when the debugger has stopped at a breakpoint).
+
+ :sign place {id} name={name} buffer={nr}
+ Same, but use buffer {nr}.
+
+
+ REMOVING SIGNS *:sign-unplace* *E159*
+
+ :sign unplace {id} file={fname}
+ Remove the previously placed sign {id} from file {fname}.
+ See remark above about {fname} |:sign-fname|.
+
+ :sign unplace * file={fname}
+ Remove all placed signs in file {fname}.
+
+ :sign unplace {id} buffer={nr}
+ Remove the previously placed sign {id} from buffer {nr}.
+
+ :sign unplace * buffer={nr}
+ Remove all placed signs in buffer {nr}.
+
+ :sign unplace {id}
+ Remove the previously placed sign {id} from all files it
+ appears in.
+
+ :sign unplace *
+! Remove all placed signs.
+
+ :sign unplace
+ Remove the placed sign at the cursor position.
+--- 188,260 ----
+ This can be used to change the displayed sign without moving
+ it (e.g., when the debugger has stopped at a breakpoint).
+
++ The optional "group={group}" attribute can be used before
++ "file=" to select a sign in a particular group.
++
+ :sign place {id} name={name} buffer={nr}
+ Same, but use buffer {nr}.
+
+
+ REMOVING SIGNS *:sign-unplace* *E159*
+
++ See |sign_unplace()| for the equivalent Vim script function.
++
+ :sign unplace {id} file={fname}
+ Remove the previously placed sign {id} from file {fname}.
+ See remark above about {fname} |:sign-fname|.
+
++ :sign unplace {id} group={group} file={fname}
++ Same but remove the sign {id} in sign group {group}.
++
++ :sign unplace {id} group=* file={fname}
++ Same but remove the sign {id} from all the sign groups.
++
+ :sign unplace * file={fname}
+ Remove all placed signs in file {fname}.
+
++ :sign unplace * group={group} file={fname}
++ Remove all placed signs in group {group} from file {fname}.
++
++ :sign unplace * group=* file={fname}
++ Remove all placed signs in all the groups from file {fname}.
++
+ :sign unplace {id} buffer={nr}
+ Remove the previously placed sign {id} from buffer {nr}.
+
++ :sign unplace {id} group={group} buffer={nr}
++ Remove the previously placed sign {id} in group {group} from
++ buffer {nr}.
++
++ :sign unplace {id} group=* buffer={nr}
++ Remove the previously placed sign {id} in all the groups from
++ buffer {nr}.
++
+ :sign unplace * buffer={nr}
+ Remove all placed signs in buffer {nr}.
+
++ :sign unplace * group={group} buffer={nr}
++ Remove all placed signs in group {group} from buffer {nr}.
++
++ :sign unplace * group=* buffer={nr}
++ Remove all placed signs in all the groups from buffer {nr}.
++
+ :sign unplace {id}
+ Remove the previously placed sign {id} from all files it
+ appears in.
+
++ :sign unplace {id} group={group}
++ Remove the previously placed sign {id} in group {group} from
++ all files it appears in.
++
++ :sign unplace {id} group=*
++ Remove the previously placed sign {id} in all the groups from
++ all the files it appears in.
++
+ :sign unplace *
+! Remove all placed signs in the global group.
+!
+! :sign unplace * group=*
+! Remove all placed signs in all the groups.
+
+ :sign unplace
+ Remove the placed sign at the cursor position.
+***************
+*** 178,192 ****
+--- 262,287 ----
+
+ LISTING PLACED SIGNS *:sign-place-list*
+
++ See |sign_getplaced()| for the equivalent Vim script function.
++
+ :sign place file={fname}
+ List signs placed in file {fname}.
+ See remark above about {fname} |:sign-fname|.
+
++ :sign place group={group} file={fname}
++ List signs in group {group} placed in file {fname}.
++
+ :sign place buffer={nr}
+ List signs placed in buffer {nr}.
+
++ :sign place group={group} buffer={nr}
++ List signs in group {group} placed in buffer {nr}.
++
+ :sign place List placed signs in all files.
+
++ :sign place group={group}
++ List placed signs in all sign groups in all the files.
++
+
+ JUMPING TO A SIGN *:sign-jump* *E157*
+
+***************
+*** 202,205 ****
+ have a name.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 297,300 ----
+ have a name.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0613/runtime/doc/usr_41.txt 2018-11-11 15:20:32.432704446 +0100
+--- runtime/doc/usr_41.txt 2018-12-21 14:36:57.238303578 +0100
+***************
+*** 973,978 ****
+--- 983,996 ----
+ job_info() get information about a job
+ job_setoptions() set options for a job
+
++ Signs: *sign-functions*
++ sign_define() define or update a sign
++ sign_getdefined() get a list of defined signs
++ sign_getplaced() get a list of placed signs
++ sign_place() place a sign
++ sign_undefine() undefine a sign
++ sign_unplace() unplace a sign
++
+ Terminal window: *terminal-functions*
+ term_start() open a terminal window and run a job
+ term_list() get the list of terminal buffers
+*** ../vim-8.1.0613/src/alloc.h 2018-11-11 15:20:32.432704446 +0100
+--- src/alloc.h 2018-12-21 14:36:57.238303578 +0100
+***************
+*** 21,25 ****
+--- 21,33 ----
+ aid_tagstack_items,
+ aid_tagstack_from,
+ aid_tagstack_details,
++ aid_sign_getdefined,
++ aid_sign_getplaced,
++ aid_sign_define_by_name,
++ aid_sign_getlist,
++ aid_sign_getplaced_dict,
++ aid_sign_getplaced_list,
++ aid_insert_sign,
++ aid_sign_getinfo,
+ aid_last
+ } alloc_id_T;
+*** ../vim-8.1.0613/src/buffer.c 2018-12-21 13:03:24.292337854 +0100
+--- src/buffer.c 2018-12-21 14:54:24.453442611 +0100
+***************
+*** 936,942 ****
+ uc_clear(&buf->b_ucmds); /* clear local user commands */
+ #endif
+ #ifdef FEAT_SIGNS
+! buf_delete_signs(buf); /* delete any signs */
+ #endif
+ #ifdef FEAT_NETBEANS_INTG
+ netbeans_file_killed(buf);
+--- 936,942 ----
+ uc_clear(&buf->b_ucmds); /* clear local user commands */
+ #endif
+ #ifdef FEAT_SIGNS
+! buf_delete_signs(buf, (char_u *)"*"); // delete any signs */
+ #endif
+ #ifdef FEAT_NETBEANS_INTG
+ netbeans_file_killed(buf);
+***************
+*** 5866,5890 ****
+
+ #if defined(FEAT_SIGNS) || defined(PROTO)
+ /*
+! * Insert the sign into the signlist.
+ */
+ static void
+ insert_sign(
+! buf_T *buf, /* buffer to store sign in */
+! signlist_T *prev, /* previous sign entry */
+! signlist_T *next, /* next sign entry */
+! int id, /* sign ID */
+! linenr_T lnum, /* line number which gets the mark */
+! int typenr) /* typenr of sign we are adding */
+ {
+ signlist_T *newsign;
+
+! newsign = (signlist_T *)lalloc((long_u)sizeof(signlist_T), FALSE);
+ if (newsign != NULL)
+ {
+ newsign->id = id;
+ newsign->lnum = lnum;
+ newsign->typenr = typenr;
+ newsign->next = next;
+ newsign->prev = prev;
+ if (next != NULL)
+--- 5866,5899 ----
+
+ #if defined(FEAT_SIGNS) || defined(PROTO)
+ /*
+! * Insert a new sign into the signlist for buffer 'buf' between the 'prev' and
+! * 'next' signs.
+ */
+ static void
+ insert_sign(
+! buf_T *buf, // buffer to store sign in
+! signlist_T *prev, // previous sign entry
+! signlist_T *next, // next sign entry
+! int id, // sign ID
+! char_u *group, // sign group; NULL for global group
+! int prio, // sign priority
+! linenr_T lnum, // line number which gets the mark
+! int typenr) // typenr of sign we are adding
+ {
+ signlist_T *newsign;
+
+! newsign = (signlist_T *)lalloc_id((long_u)sizeof(signlist_T), FALSE,
+! aid_insert_sign);
+ if (newsign != NULL)
+ {
+ newsign->id = id;
+ newsign->lnum = lnum;
+ newsign->typenr = typenr;
++ if (group != NULL)
++ newsign->group = vim_strsave(group);
++ else
++ newsign->group = NULL;
++ newsign->priority = prio;
+ newsign->next = next;
+ newsign->prev = prev;
+ if (next != NULL)
+***************
+*** 5892,5906 ****
+
+ if (prev == NULL)
+ {
+! /* When adding first sign need to redraw the windows to create the
+! * column for signs. */
+ if (buf->b_signlist == NULL)
+ {
+ redraw_buf_later(buf, NOT_VALID);
+ changed_cline_bef_curs();
+ }
+
+! /* first sign in signlist */
+ buf->b_signlist = newsign;
+ #ifdef FEAT_NETBEANS_INTG
+ if (netbeans_active())
+--- 5901,5915 ----
+
+ if (prev == NULL)
+ {
+! // When adding first sign need to redraw the windows to create the
+! // column for signs.
+ if (buf->b_signlist == NULL)
+ {
+ redraw_buf_later(buf, NOT_VALID);
+ changed_cline_bef_curs();
+ }
+
+! // first sign in signlist
+ buf->b_signlist = newsign;
+ #ifdef FEAT_NETBEANS_INTG
+ if (netbeans_active())
+***************
+*** 5913,5962 ****
+ }
+
+ /*
+ * Add the sign into the signlist. Find the right spot to do it though.
+ */
+ void
+ buf_addsign(
+! buf_T *buf, /* buffer to store sign in */
+! int id, /* sign ID */
+! linenr_T lnum, /* line number which gets the mark */
+! int typenr) /* typenr of sign we are adding */
+ {
+! signlist_T *sign; /* a sign in the signlist */
+! signlist_T *prev; /* the previous sign */
+
+ prev = NULL;
+! for (sign = buf->b_signlist; sign != NULL; sign = sign->next)
+ {
+! if (lnum == sign->lnum && id == sign->id)
+ {
+ 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;
+ }
+--- 5922,6021 ----
+ }
+
+ /*
++ * Insert a new sign sorted by line number and sign priority.
++ */
++ static void
++ insert_sign_by_lnum_prio(
++ buf_T *buf, // buffer to store sign in
++ signlist_T *prev, // previous sign entry
++ int id, // sign ID
++ char_u *group, // sign group; NULL for global group
++ int prio, // sign priority
++ linenr_T lnum, // line number which gets the mark
++ int typenr) // typenr of sign we are adding
++ {
++ signlist_T *sign;
++
++ // keep signs sorted by lnum and by priority: insert new sign at
++ // the proper position in the list for this lnum.
++ while (prev != NULL && prev->lnum == lnum && prev->priority <= prio)
++ prev = prev->prev;
++ if (prev == NULL)
++ sign = buf->b_signlist;
++ else
++ sign = prev->next;
++
++ insert_sign(buf, prev, sign, id, group, prio, lnum, typenr);
++ }
++
++ /*
++ * Returns TRUE if 'sign' is in 'group'.
++ * A sign can either be in the global group (sign->group == NULL)
++ * or in a named group. If 'group' is '*', then the sign is part of the group.
++ */
++ int
++ sign_in_group(signlist_T *sign, char_u *group)
++ {
++ return ((group != NULL && STRCMP(group, "*") == 0) ||
++ (group == NULL && sign->group == NULL) ||
++ (group != NULL && sign->group != NULL &&
++ STRCMP(group, sign->group) == 0));
++ }
++
++ /*
++ * Return information about a sign in a Dict
++ */
++ dict_T *
++ sign_get_info(signlist_T *sign)
++ {
++ dict_T *d;
++
++ if ((d = dict_alloc_id(aid_sign_getinfo)) == NULL)
++ return NULL;
++ dict_add_number(d, "id", sign->id);
++ dict_add_string(d, "group", (sign->group == NULL) ?
++ (char_u *)"" : sign->group);
++ dict_add_number(d, "lnum", sign->lnum);
++ dict_add_string(d, "name", sign_typenr2name(sign->typenr));
++ dict_add_number(d, "priority", sign->priority);
++
++ return d;
++ }
++
++ /*
+ * Add the sign into the signlist. Find the right spot to do it though.
+ */
+ void
+ buf_addsign(
+! buf_T *buf, // buffer to store sign in
+! int id, // sign ID
+! char_u *group, // sign group
+! int prio, // sign priority
+! linenr_T lnum, // line number which gets the mark
+! int typenr) // typenr of sign we are adding
+ {
+! signlist_T *sign; // a sign in the signlist
+! signlist_T *prev; // the previous sign
+
+ prev = NULL;
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+! if (lnum == sign->lnum && id == sign->id &&
+! sign_in_group(sign, group))
+ {
++ // Update an existing sign
+ sign->typenr = typenr;
+ return;
+ }
+ else if (lnum < sign->lnum)
+ {
+! insert_sign_by_lnum_prio(buf, prev, id, group, prio, lnum, typenr);
+ return;
+ }
+ prev = sign;
+ }
+
+! insert_sign_by_lnum_prio(buf, prev, id, group, prio, lnum, typenr);
+
+ return;
+ }
+***************
+*** 5967,5981 ****
+ */
+ linenr_T
+ buf_change_sign_type(
+! buf_T *buf, /* buffer to store sign in */
+! int markId, /* sign ID */
+! int typenr) /* typenr of sign we are adding */
+ {
+! signlist_T *sign; /* a sign in the signlist */
+
+! for (sign = buf->b_signlist; sign != NULL; sign = sign->next)
+ {
+! if (sign->id == markId)
+ {
+ sign->typenr = typenr;
+ return sign->lnum;
+--- 6026,6041 ----
+ */
+ linenr_T
+ buf_change_sign_type(
+! buf_T *buf, // buffer to store sign in
+! int markId, // sign ID
+! char_u *group, // sign group
+! int typenr) // typenr of sign we are adding
+ {
+! signlist_T *sign; // a sign in the signlist
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+! if (sign->id == markId && sign_in_group(sign, group))
+ {
+ sign->typenr = typenr;
+ return sign->lnum;
+***************
+*** 5985,5990 ****
+--- 6045,6055 ----
+ return (linenr_T)0;
+ }
+
++ /*
++ * Return the type number of the sign at line number 'lnum' in buffer 'buf'
++ * which has the attribute specifed by 'type'. Returns 0 if a sign is not found
++ * at the line number or it doesn't have the specified attribute.
++ */
+ int
+ buf_getsigntype(
+ buf_T *buf,
+***************
+*** 5993,5999 ****
+ {
+ signlist_T *sign; /* a sign in a b_signlist */
+
+! for (sign = buf->b_signlist; sign != NULL; sign = sign->next)
+ if (sign->lnum == lnum
+ && (type == SIGN_ANY
+ # ifdef FEAT_SIGN_ICONS
+--- 6058,6064 ----
+ {
+ signlist_T *sign; /* a sign in a b_signlist */
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ if (sign->lnum == lnum
+ && (type == SIGN_ANY
+ # ifdef FEAT_SIGN_ICONS
+***************
+*** 6008,6044 ****
+ return 0;
+ }
+
+!
+ linenr_T
+ buf_delsign(
+! buf_T *buf, /* buffer sign is stored in */
+! int id) /* sign id */
+! {
+! signlist_T **lastp; /* pointer to pointer to current sign */
+! signlist_T *sign; /* a sign in a b_signlist */
+! signlist_T *next; /* the next sign in a b_signlist */
+! linenr_T lnum; /* line number whose sign was deleted */
+
+ lastp = &buf->b_signlist;
+ lnum = 0;
+ for (sign = buf->b_signlist; sign != NULL; sign = next)
+ {
+ next = sign->next;
+! if (sign->id == id)
+ {
+ *lastp = next;
+ if (next != NULL)
+ next->prev = sign->prev;
+ lnum = sign->lnum;
+ vim_free(sign);
+! break;
+ }
+ else
+ lastp = &sign->next;
+ }
+
+! /* When deleted the last sign need to redraw the windows to remove the
+! * sign column. */
+ if (buf->b_signlist == NULL)
+ {
+ redraw_buf_later(buf, NOT_VALID);
+--- 6073,6123 ----
+ return 0;
+ }
+
+! /*
+! * Delete sign 'id' in group 'group' from buffer 'buf'.
+! * If 'id' is zero, then delete all the signs in group 'group'. Otherwise
+! * delete only the specified sign.
+! * If 'group' is '*', then delete the sign in all the groups. If 'group' is
+! * NULL, then delete the sign in the global group. Otherwise delete the sign in
+! * the specified group.
+! * Returns the line number of the deleted sign. If multiple signs are deleted,
+! * then returns the line number of the last sign deleted.
+! */
+ linenr_T
+ buf_delsign(
+! buf_T *buf, // buffer sign is stored in
+! int id, // sign id
+! char_u *group) // sign group
+! {
+! signlist_T **lastp; // pointer to pointer to current sign
+! signlist_T *sign; // a sign in a b_signlist
+! signlist_T *next; // the next sign in a b_signlist
+! linenr_T lnum; // line number whose sign was deleted
+
+ lastp = &buf->b_signlist;
+ lnum = 0;
+ for (sign = buf->b_signlist; sign != NULL; sign = next)
+ {
+ next = sign->next;
+! if ((id == 0 || sign->id == id) && sign_in_group(sign, group))
+!
+ {
+ *lastp = next;
+ if (next != NULL)
+ next->prev = sign->prev;
+ lnum = sign->lnum;
++ vim_free(sign->group);
+ vim_free(sign);
+! // Check whether only one sign needs to be deleted
+! if (group == NULL || (*group != '*' && id != 0))
+! break;
+ }
+ else
+ lastp = &sign->next;
+ }
+
+! // When deleted the last sign need to redraw the windows to remove the
+! // sign column.
+ if (buf->b_signlist == NULL)
+ {
+ redraw_buf_later(buf, NOT_VALID);
+***************
+*** 6050,6088 ****
+
+
+ /*
+! * Find the line number of the sign with the requested id. If the sign does
+! * not exist, return 0 as the line number. This will still let the correct file
+! * get loaded.
+ */
+ int
+ buf_findsign(
+! buf_T *buf, /* buffer to store sign in */
+! int id) /* sign ID */
+ {
+! signlist_T *sign; /* a sign in the signlist */
+
+! for (sign = buf->b_signlist; sign != NULL; sign = sign->next)
+! if (sign->id == id)
+ return sign->lnum;
+
+ return 0;
+ }
+
+ int
+ buf_findsign_id(
+! buf_T *buf, /* buffer whose sign we are searching for */
+! linenr_T lnum) /* line number of sign */
+ {
+! signlist_T *sign; /* a sign in the signlist */
+
+! for (sign = buf->b_signlist; sign != NULL; sign = sign->next)
+! if (sign->lnum == lnum)
+! return sign->id;
+
+ return 0;
+ }
+
+-
+ # if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
+ /*
+ * See if a given type of sign exists on a specific line.
+--- 6129,6206 ----
+
+
+ /*
+! * Find the line number of the sign with the requested id in group 'group'. If
+! * the sign does not exist, return 0 as the line number. This will still let
+! * the correct file get loaded.
+ */
+ int
+ buf_findsign(
+! buf_T *buf, // buffer to store sign in
+! int id, // sign ID
+! char_u *group) // sign group
+ {
+! signlist_T *sign; // a sign in the signlist
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+! if (sign->id == id && sign_in_group(sign, group))
+ return sign->lnum;
+
+ return 0;
+ }
+
++ /*
++ * Return the sign at line 'lnum' in buffer 'buf'. Returns NULL if a sign is
++ * not found at the line.
++ */
++ static signlist_T *
++ buf_getsign_at_line(
++ buf_T *buf, // buffer whose sign we are searching for
++ linenr_T lnum) // line number of sign
++ {
++ signlist_T *sign; // a sign in the signlist
++
++ FOR_ALL_SIGNS_IN_BUF(buf)
++ if (sign->lnum == lnum)
++ return sign;
++
++ return NULL;
++ }
++
++ /*
++ * Return the sign with identifier 'id' in group 'group' placed in buffer 'buf'
++ */
++ signlist_T *
++ buf_getsign_with_id(
++ buf_T *buf, // buffer whose sign we are searching for
++ int id, // sign identifier
++ char_u *group) // sign group
++ {
++ signlist_T *sign; // a sign in the signlist
++
++ FOR_ALL_SIGNS_IN_BUF(buf)
++ if (sign->id == id && sign_in_group(sign, group))
++ return sign;
++
++ return NULL;
++ }
++
++ /*
++ * Return the identifier of the sign at line number 'lnum' in buffer 'buf'.
++ */
+ int
+ buf_findsign_id(
+! buf_T *buf, // buffer whose sign we are searching for
+! linenr_T lnum) // line number of sign
+ {
+! signlist_T *sign; // a sign in the signlist
+
+! sign = buf_getsign_at_line(buf, lnum);
+! if (sign != NULL)
+! return sign->id;
+
+ return 0;
+ }
+
+ # if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
+ /*
+ * See if a given type of sign exists on a specific line.
+***************
+*** 6095,6101 ****
+ {
+ signlist_T *sign; /* a sign in the signlist */
+
+! for (sign = buf->b_signlist; sign != NULL; sign = sign->next)
+ if (sign->lnum == lnum && sign->typenr == typenr)
+ return sign->id;
+
+--- 6213,6219 ----
+ {
+ signlist_T *sign; /* a sign in the signlist */
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ if (sign->lnum == lnum && sign->typenr == typenr)
+ return sign->id;
+
+***************
+*** 6110,6119 ****
+ int
+ buf_signcount(buf_T *buf, linenr_T lnum)
+ {
+! signlist_T *sign; /* a sign in the signlist */
+ int count = 0;
+
+! for (sign = buf->b_signlist; sign != NULL; sign = sign->next)
+ if (sign->lnum == lnum)
+ if (sign_get_image(sign->typenr) != NULL)
+ count++;
+--- 6228,6237 ----
+ int
+ buf_signcount(buf_T *buf, linenr_T lnum)
+ {
+! signlist_T *sign; // a sign in the signlist
+ int count = 0;
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ if (sign->lnum == lnum)
+ if (sign_get_image(sign->typenr) != NULL)
+ count++;
+***************
+*** 6123,6150 ****
+ # endif /* FEAT_SIGN_ICONS */
+ # endif /* FEAT_NETBEANS_INTG */
+
+-
+ /*
+! * Delete signs in buffer "buf".
+ */
+ void
+! buf_delete_signs(buf_T *buf)
+ {
+ signlist_T *next;
+
+! /* When deleting the last sign need to redraw the windows to remove the
+! * sign column. Not when curwin is NULL (this means we're exiting). */
+ if (buf->b_signlist != NULL && curwin != NULL)
+ {
+ redraw_buf_later(buf, NOT_VALID);
+ changed_cline_bef_curs();
+ }
+
+! while (buf->b_signlist != NULL)
+ {
+! next = buf->b_signlist->next;
+! vim_free(buf->b_signlist);
+! buf->b_signlist = next;
+ }
+ }
+
+--- 6241,6279 ----
+ # endif /* FEAT_SIGN_ICONS */
+ # endif /* FEAT_NETBEANS_INTG */
+
+ /*
+! * Delete signs in group 'group' in buffer "buf". If 'group' is '*', then
+! * delete all the signs.
+ */
+ void
+! buf_delete_signs(buf_T *buf, char_u *group)
+ {
++ signlist_T *sign;
++ signlist_T **lastp; // pointer to pointer to current sign
+ signlist_T *next;
+
+! // When deleting the last sign need to redraw the windows to remove the
+! // sign column. Not when curwin is NULL (this means we're exiting).
+ if (buf->b_signlist != NULL && curwin != NULL)
+ {
+ redraw_buf_later(buf, NOT_VALID);
+ changed_cline_bef_curs();
+ }
+
+! lastp = &buf->b_signlist;
+! for (sign = buf->b_signlist; sign != NULL; sign = next)
+ {
+! next = sign->next;
+! if (sign_in_group(sign, group))
+! {
+! *lastp = next;
+! if (next != NULL)
+! next->prev = sign->prev;
+! vim_free(sign->group);
+! vim_free(sign);
+! }
+! else
+! lastp = &sign->next;
+ }
+ }
+
+***************
+*** 6158,6175 ****
+
+ FOR_ALL_BUFFERS(buf)
+ if (buf->b_signlist != NULL)
+! buf_delete_signs(buf);
+ }
+
+ /*
+ * List placed signs for "rbuf". If "rbuf" is NULL do it for all buffers.
+ */
+ void
+! sign_list_placed(buf_T *rbuf)
+ {
+ buf_T *buf;
+! signlist_T *p;
+ char lbuf[BUFSIZ];
+
+ MSG_PUTS_TITLE(_("\n--- Signs ---"));
+ msg_putchar('\n');
+--- 6287,6305 ----
+
+ FOR_ALL_BUFFERS(buf)
+ if (buf->b_signlist != NULL)
+! buf_delete_signs(buf, (char_u *)"*");
+ }
+
+ /*
+ * List placed signs for "rbuf". If "rbuf" is NULL do it for all buffers.
+ */
+ void
+! sign_list_placed(buf_T *rbuf, char_u *sign_group)
+ {
+ buf_T *buf;
+! signlist_T *sign;
+ char lbuf[BUFSIZ];
++ char group[BUFSIZ];
+
+ MSG_PUTS_TITLE(_("\n--- Signs ---"));
+ msg_putchar('\n');
+***************
+*** 6185,6194 ****
+ MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
+ msg_putchar('\n');
+ }
+! for (p = buf->b_signlist; p != NULL && !got_int; p = p->next)
+ {
+! vim_snprintf(lbuf, BUFSIZ, _(" line=%ld id=%d name=%s"),
+! (long)p->lnum, p->id, sign_typenr2name(p->typenr));
+ MSG_PUTS(lbuf);
+ msg_putchar('\n');
+ }
+--- 6315,6332 ----
+ MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
+ msg_putchar('\n');
+ }
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+! if (!sign_in_group(sign, sign_group))
+! continue;
+! if (sign->group != NULL)
+! vim_snprintf(group, BUFSIZ, " group=%s", sign->group);
+! else
+! group[0] = '\0';
+! vim_snprintf(lbuf, BUFSIZ, _(" line=%ld id=%d%s name=%s "
+! "priority=%d"),
+! (long)sign->lnum, sign->id, group,
+! sign_typenr2name(sign->typenr), sign->priority);
+ MSG_PUTS(lbuf);
+ msg_putchar('\n');
+ }
+***************
+*** 6210,6216 ****
+ {
+ signlist_T *sign; /* a sign in a b_signlist */
+
+! for (sign = curbuf->b_signlist; sign != NULL; sign = sign->next)
+ {
+ if (sign->lnum >= line1 && sign->lnum <= line2)
+ {
+--- 6348,6354 ----
+ {
+ signlist_T *sign; /* a sign in a b_signlist */
+
+! FOR_ALL_SIGNS_IN_BUF(curbuf)
+ {
+ if (sign->lnum >= line1 && sign->lnum <= line2)
+ {
+*** ../vim-8.1.0613/src/evalfunc.c 2018-12-14 15:38:28.327597664 +0100
+--- src/evalfunc.c 2018-12-21 14:36:57.242303552 +0100
+***************
+*** 367,372 ****
+--- 367,380 ----
+ #endif /* FEAT_CRYPT */
+ static void f_shellescape(typval_T *argvars, typval_T *rettv);
+ static void f_shiftwidth(typval_T *argvars, typval_T *rettv);
++ #ifdef FEAT_SIGNS
++ static void f_sign_define(typval_T *argvars, typval_T *rettv);
++ static void f_sign_getdefined(typval_T *argvars, typval_T *rettv);
++ static void f_sign_getplaced(typval_T *argvars, typval_T *rettv);
++ static void f_sign_place(typval_T *argvars, typval_T *rettv);
++ static void f_sign_undefine(typval_T *argvars, typval_T *rettv);
++ static void f_sign_unplace(typval_T *argvars, typval_T *rettv);
++ #endif
+ static void f_simplify(typval_T *argvars, typval_T *rettv);
+ #ifdef FEAT_FLOAT
+ static void f_sin(typval_T *argvars, typval_T *rettv);
+***************
+*** 847,852 ****
+--- 855,868 ----
+ #endif
+ {"shellescape", 1, 2, f_shellescape},
+ {"shiftwidth", 0, 1, f_shiftwidth},
++ #ifdef FEAT_SIGNS
++ {"sign_define", 1, 2, f_sign_define},
++ {"sign_getdefined", 0, 1, f_sign_getdefined},
++ {"sign_getplaced", 0, 2, f_sign_getplaced},
++ {"sign_place", 4, 5, f_sign_place},
++ {"sign_undefine", 0, 1, f_sign_undefine},
++ {"sign_unplace", 1, 2, f_sign_unplace},
++ #endif
+ {"simplify", 1, 1, f_simplify},
+ #ifdef FEAT_FLOAT
+ {"sin", 1, 1, f_sin},
+***************
+*** 4417,4435 ****
+ get_buffer_signs(buf_T *buf, list_T *l)
+ {
+ signlist_T *sign;
+
+! for (sign = buf->b_signlist; sign; sign = sign->next)
+ {
+! dict_T *d = dict_alloc();
+!
+! if (d != NULL)
+! {
+! dict_add_number(d, "id", sign->id);
+! dict_add_number(d, "lnum", sign->lnum);
+! dict_add_string(d, "name", sign_typenr2name(sign->typenr));
+!
+ list_append_dict(l, d);
+- }
+ }
+ }
+ #endif
+--- 4433,4444 ----
+ get_buffer_signs(buf_T *buf, list_T *l)
+ {
+ signlist_T *sign;
++ dict_T *d;
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+! if ((d = sign_get_info(sign)) != NULL)
+ list_append_dict(l, d);
+ }
+ }
+ #endif
+***************
+*** 11285,11290 ****
+--- 11294,11612 ----
+ rettv->vval.v_number = get_sw_value(curbuf);
+ }
+
++ #ifdef FEAT_SIGNS
++ /*
++ * "sign_define()" function
++ */
++ static void
++ f_sign_define(typval_T *argvars, typval_T *rettv)
++ {
++ char_u *name;
++ dict_T *dict;
++ char_u *icon = NULL;
++ char_u *linehl = NULL;
++ char_u *text = NULL;
++ char_u *texthl = NULL;
++
++ rettv->vval.v_number = -1;
++
++ name = get_tv_string_chk(&argvars[0]);
++ if (name == NULL)
++ return;
++
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ {
++ if (argvars[1].v_type != VAR_DICT)
++ {
++ EMSG(_(e_dictreq));
++ return;
++ }
++
++ // sign attributes
++ dict = argvars[1].vval.v_dict;
++ if (dict_find(dict, (char_u *)"icon", -1) != NULL)
++ icon = dict_get_string(dict, (char_u *)"icon", TRUE);
++ if (dict_find(dict, (char_u *)"linehl", -1) != NULL)
++ linehl = dict_get_string(dict, (char_u *)"linehl", TRUE);
++ if (dict_find(dict, (char_u *)"text", -1) != NULL)
++ text = dict_get_string(dict, (char_u *)"text", TRUE);
++ if (dict_find(dict, (char_u *)"texthl", -1) != NULL)
++ texthl = dict_get_string(dict, (char_u *)"texthl", TRUE);
++ }
++
++ if (sign_define_by_name(name, icon, linehl, text, texthl) == OK)
++ rettv->vval.v_number = 0;
++
++ vim_free(icon);
++ vim_free(linehl);
++ vim_free(text);
++ vim_free(texthl);
++ }
++
++ /*
++ * "sign_getdefined()" function
++ */
++ static void
++ f_sign_getdefined(typval_T *argvars, typval_T *rettv)
++ {
++ char_u *name = NULL;
++
++ if (rettv_list_alloc_id(rettv, aid_sign_getdefined) != OK)
++ return;
++
++ if (argvars[0].v_type != VAR_UNKNOWN)
++ name = get_tv_string(&argvars[0]);
++
++ sign_getlist(name, rettv->vval.v_list);
++ }
++
++ /*
++ * "sign_getplaced()" function
++ */
++ static void
++ f_sign_getplaced(typval_T *argvars, typval_T *rettv)
++ {
++ buf_T *buf = NULL;
++ dict_T *dict;
++ dictitem_T *di;
++ linenr_T lnum = 0;
++ int sign_id = 0;
++ char_u *group = NULL;
++ int notanum = FALSE;
++
++ if (rettv_list_alloc_id(rettv, aid_sign_getplaced) != OK)
++ return;
++
++ if (argvars[0].v_type != VAR_UNKNOWN)
++ {
++ // get signs placed in this buffer
++ buf = find_buffer(&argvars[0]);
++ if (buf == NULL)
++ {
++ EMSG2(_("E158: Invalid buffer name: %s"),
++ get_tv_string(&argvars[0]));
++ return;
++ }
++
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ {
++ if (argvars[1].v_type != VAR_DICT ||
++ ((dict = argvars[1].vval.v_dict) == NULL))
++ {
++ EMSG(_(e_dictreq));
++ return;
++ }
++ if ((di = dict_find(dict, (char_u *)"lnum", -1)) != NULL)
++ {
++ // get signs placed at this line
++ (void)get_tv_number_chk(&di->di_tv, &notanum);
++ if (notanum)
++ return;
++ lnum = get_tv_lnum(&di->di_tv);
++ }
++ if ((di = dict_find(dict, (char_u *)"id", -1)) != NULL)
++ {
++ // get sign placed with this identifier
++ sign_id = (int)get_tv_number_chk(&di->di_tv, &notanum);
++ if (notanum)
++ return;
++ }
++ if ((di = dict_find(dict, (char_u *)"group", -1)) != NULL)
++ {
++ group = get_tv_string_chk(&di->di_tv);
++ if (group == NULL)
++ return;
++ }
++ }
++ }
++
++ sign_get_placed(buf, lnum, sign_id, group, rettv->vval.v_list);
++ }
++
++ /*
++ * "sign_place()" function
++ */
++ static void
++ f_sign_place(typval_T *argvars, typval_T *rettv)
++ {
++ int sign_id;
++ char_u *group = NULL;
++ char_u *sign_name;
++ buf_T *buf;
++ dict_T *dict;
++ dictitem_T *di;
++ linenr_T lnum = 0;
++ int prio = SIGN_DEF_PRIO;
++ int notanum = FALSE;
++
++ rettv->vval.v_number = -1;
++
++ // Sign identifer
++ sign_id = (int)get_tv_number_chk(&argvars[0], &notanum);
++ if (notanum)
++ return;
++ if (sign_id < 0)
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ // Sign group
++ group = get_tv_string_chk(&argvars[1]);
++ if (group == NULL)
++ return;
++ if (group[0] == '\0')
++ group = NULL; // global sign group
++ else
++ {
++ group = vim_strsave(group);
++ if (group == NULL)
++ return;
++ }
++
++ // Sign name
++ sign_name = get_tv_string_chk(&argvars[2]);
++ if (sign_name == NULL)
++ goto cleanup;
++
++ // Buffer to place the sign
++ buf = find_buffer(&argvars[3]);
++ if (buf == NULL)
++ {
++ EMSG2(_("E158: Invalid buffer name: %s"), get_tv_string(&argvars[2]));
++ goto cleanup;
++ }
++
++ if (argvars[4].v_type != VAR_UNKNOWN)
++ {
++ if (argvars[4].v_type != VAR_DICT ||
++ ((dict = argvars[4].vval.v_dict) == NULL))
++ {
++ EMSG(_(e_dictreq));
++ goto cleanup;
++ }
++
++ // Line number where the sign is to be placed
++ if ((di = dict_find(dict, (char_u *)"lnum", -1)) != NULL)
++ {
++ (void)get_tv_number_chk(&di->di_tv, &notanum);
++ if (notanum)
++ goto cleanup;
++ lnum = get_tv_lnum(&di->di_tv);
++ }
++ if ((di = dict_find(dict, (char_u *)"priority", -1)) != NULL)
++ {
++ // Sign priority
++ prio = (int)get_tv_number_chk(&di->di_tv, &notanum);
++ if (notanum)
++ goto cleanup;
++ }
++ }
++
++ if (sign_place(&sign_id, group, sign_name, buf, lnum, prio) == OK)
++ rettv->vval.v_number = sign_id;
++
++ cleanup:
++ vim_free(group);
++ }
++
++ /*
++ * "sign_undefine()" function
++ */
++ static void
++ f_sign_undefine(typval_T *argvars, typval_T *rettv)
++ {
++ char_u *name;
++
++ rettv->vval.v_number = -1;
++
++ if (argvars[0].v_type == VAR_UNKNOWN)
++ {
++ // Free all the signs
++ free_signs();
++ rettv->vval.v_number = 0;
++ }
++ else
++ {
++ // Free only the specified sign
++ name = get_tv_string_chk(&argvars[0]);
++ if (name == NULL)
++ return;
++
++ if (sign_undefine_by_name(name) == OK)
++ rettv->vval.v_number = 0;
++ }
++ }
++
++ /*
++ * "sign_unplace()" function
++ */
++ static void
++ f_sign_unplace(typval_T *argvars, typval_T *rettv)
++ {
++ dict_T *dict;
++ dictitem_T *di;
++ int sign_id = 0;
++ buf_T *buf = NULL;
++ char_u *group = NULL;
++
++ rettv->vval.v_number = -1;
++
++ if (argvars[0].v_type != VAR_STRING)
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ group = get_tv_string(&argvars[0]);
++ if (group[0] == '\0')
++ group = NULL; // global sign group
++ else
++ {
++ group = vim_strsave(group);
++ if (group == NULL)
++ return;
++ }
++
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ {
++ if (argvars[1].v_type != VAR_DICT)
++ {
++ EMSG(_(e_dictreq));
++ return;
++ }
++ dict = argvars[1].vval.v_dict;
++
++ if ((di = dict_find(dict, (char_u *)"buffer", -1)) != NULL)
++ {
++ buf = find_buffer(&di->di_tv);
++ if (buf == NULL)
++ {
++ EMSG2(_("E158: Invalid buffer name: %s"),
++ get_tv_string(&di->di_tv));
++ return;
++ }
++ }
++ if (dict_find(dict, (char_u *)"id", -1) != NULL)
++ sign_id = dict_get_number(dict, (char_u *)"id");
++ }
++
++ if (buf == NULL)
++ {
++ // Delete the sign in all the buffers
++ FOR_ALL_BUFFERS(buf)
++ if (sign_unplace(sign_id, group, buf) == OK)
++ rettv->vval.v_number = 0;
++ }
++ else
++ {
++ if (sign_unplace(sign_id, group, buf) == OK)
++ rettv->vval.v_number = 0;
++ }
++ vim_free(group);
++ }
++ #endif
++
+ /*
+ * "simplify()" function
+ */
+*** ../vim-8.1.0613/src/ex_cmds.c 2018-12-14 19:37:03.677899412 +0100
+--- src/ex_cmds.c 2018-12-21 14:36:57.242303552 +0100
+***************
+*** 7644,7649 ****
+--- 7644,7932 ----
+ }
+
+ /*
++ * Find a sign by name. Also returns pointer to the previous sign.
++ */
++ static sign_T *
++ sign_find(char_u *name, sign_T **sp_prev)
++ {
++ sign_T *sp;
++
++ if (sp_prev != NULL)
++ *sp_prev = NULL;
++ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
++ {
++ if (STRCMP(sp->sn_name, name) == 0)
++ break;
++ if (sp_prev != NULL)
++ *sp_prev = sp;
++ }
++
++ return sp;
++ }
++
++ /*
++ * Define a new sign or update an existing sign
++ */
++ int
++ sign_define_by_name(
++ char_u *name,
++ char_u *icon,
++ char_u *linehl,
++ char_u *text,
++ char_u *texthl)
++ {
++ sign_T *sp_prev;
++ sign_T *sp;
++
++ sp = sign_find(name, &sp_prev);
++ if (sp == NULL)
++ {
++ sign_T *lp;
++ int start = next_sign_typenr;
++
++ // Allocate a new sign.
++ sp = (sign_T *)alloc_clear_id((unsigned)sizeof(sign_T),
++ aid_sign_define_by_name);
++ if (sp == NULL)
++ return FAIL;
++
++ // Check that next_sign_typenr is not already being used.
++ // This only happens after wrapping around. Hopefully
++ // another one got deleted and we can use its number.
++ for (lp = first_sign; lp != NULL; )
++ {
++ if (lp->sn_typenr == next_sign_typenr)
++ {
++ ++next_sign_typenr;
++ if (next_sign_typenr == MAX_TYPENR)
++ next_sign_typenr = 1;
++ if (next_sign_typenr == start)
++ {
++ vim_free(sp);
++ EMSG(_("E612: Too many signs defined"));
++ return FAIL;
++ }
++ lp = first_sign; // start all over
++ continue;
++ }
++ lp = lp->sn_next;
++ }
++
++ sp->sn_typenr = next_sign_typenr;
++ if (++next_sign_typenr == MAX_TYPENR)
++ next_sign_typenr = 1; // wrap around
++
++ sp->sn_name = vim_strsave(name);
++ if (sp->sn_name == NULL) // out of memory
++ {
++ vim_free(sp);
++ return FAIL;
++ }
++
++ // add the new sign to the list of signs
++ if (sp_prev == NULL)
++ first_sign = sp;
++ else
++ sp_prev->sn_next = sp;
++ }
++
++ // set values for a defined sign.
++ if (icon != NULL)
++ {
++ vim_free(sp->sn_icon);
++ sp->sn_icon = vim_strsave(icon);
++ backslash_halve(sp->sn_icon);
++ # ifdef FEAT_SIGN_ICONS
++ if (gui.in_use)
++ {
++ out_flush();
++ if (sp->sn_image != NULL)
++ gui_mch_destroy_sign(sp->sn_image);
++ sp->sn_image = gui_mch_register_sign(sp->sn_icon);
++ }
++ # endif
++ }
++
++ if (text != NULL)
++ {
++ char_u *s;
++ char_u *endp;
++ int cells;
++ int len;
++
++ endp = text + (int)STRLEN(text);
++ for (s = text; s + 1 < endp; ++s)
++ if (*s == '\\')
++ {
++ // Remove a backslash, so that it is possible
++ // to use a space.
++ STRMOVE(s, s + 1);
++ --endp;
++ }
++ # ifdef FEAT_MBYTE
++ // Count cells and check for non-printable chars
++ if (has_mbyte)
++ {
++ cells = 0;
++ for (s = text; s < endp; s += (*mb_ptr2len)(s))
++ {
++ if (!vim_isprintc((*mb_ptr2char)(s)))
++ break;
++ cells += (*mb_ptr2cells)(s);
++ }
++ }
++ else
++ # endif
++ {
++ for (s = text; s < endp; ++s)
++ if (!vim_isprintc(*s))
++ break;
++ cells = (int)(s - text);
++ }
++ // Currently must be one or two display cells
++ if (s != endp || cells < 1 || cells > 2)
++ {
++ EMSG2(_("E239: Invalid sign text: %s"), text);
++ return FAIL;
++ }
++
++ vim_free(sp->sn_text);
++ // Allocate one byte more if we need to pad up
++ // with a space.
++ len = (int)(endp - text + ((cells == 1) ? 1 : 0));
++ sp->sn_text = vim_strnsave(text, len);
++
++ if (sp->sn_text != NULL && cells == 1)
++ STRCPY(sp->sn_text + len - 1, " ");
++ }
++
++ if (linehl != NULL)
++ sp->sn_line_hl = syn_check_group(linehl, (int)STRLEN(linehl));
++
++ if (texthl != NULL)
++ sp->sn_text_hl = syn_check_group(texthl, (int)STRLEN(texthl));
++
++ return OK;
++ }
++
++ /*
++ * Free the sign specified by 'name'.
++ */
++ int
++ sign_undefine_by_name(char_u *name)
++ {
++ sign_T *sp_prev;
++ sign_T *sp;
++
++ sp = sign_find(name, &sp_prev);
++ if (sp == NULL)
++ {
++ EMSG2(_("E155: Unknown sign: %s"), name);
++ return FAIL;
++ }
++ sign_undefine(sp, sp_prev);
++
++ return OK;
++ }
++
++ /*
++ * List the signs matching 'name'
++ */
++ static void
++ sign_list_by_name(char_u *name)
++ {
++ sign_T *sp;
++
++ sp = sign_find(name, NULL);
++ if (sp != NULL)
++ sign_list_defined(sp);
++ else
++ EMSG2(_("E155: Unknown sign: %s"), name);
++ }
++
++ /*
++ * Place a sign at the specifed file location or update a sign.
++ */
++ int
++ sign_place(
++ int *sign_id,
++ char_u *sign_group,
++ char_u *sign_name,
++ buf_T *buf,
++ linenr_T lnum,
++ int prio)
++ {
++ sign_T *sp;
++
++ // Check for reserved character '*' in group name
++ if (sign_group != NULL && (*sign_group == '*' || *sign_group == '\0'))
++ return FAIL;
++
++ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
++ if (STRCMP(sp->sn_name, sign_name) == 0)
++ break;
++ if (sp == NULL)
++ {
++ EMSG2(_("E155: Unknown sign: %s"), sign_name);
++ return FAIL;
++ }
++ if (*sign_id == 0)
++ {
++ // Allocate a new sign id
++ int id = 1;
++ signlist_T *sign;
++
++ while ((sign = buf_getsign_with_id(buf, id, sign_group)) != NULL)
++ id++;
++
++ *sign_id = id;
++ }
++
++ if (lnum > 0)
++ // ":sign place {id} line={lnum} name={name} file={fname}":
++ // place a sign
++ buf_addsign(buf, *sign_id, sign_group, prio, lnum, sp->sn_typenr);
++ else
++ // ":sign place {id} file={fname}": change sign type
++ lnum = buf_change_sign_type(buf, *sign_id, sign_group, sp->sn_typenr);
++ if (lnum > 0)
++ update_debug_sign(buf, lnum);
++ else
++ {
++ EMSG2(_("E885: Not possible to change sign %s"), sign_name);
++ return FAIL;
++ }
++
++ return OK;
++ }
++
++ /*
++ * Unplace the specified sign
++ */
++ int
++ sign_unplace(int sign_id, char_u *sign_group, buf_T *buf)
++ {
++ if (sign_id == 0)
++ {
++ // Delete all the signs in the specified buffer
++ redraw_buf_later(buf, NOT_VALID);
++ buf_delete_signs(buf, sign_group);
++ }
++ else
++ {
++ linenr_T lnum;
++
++ // Delete only the specified signs
++ lnum = buf_delsign(buf, sign_id, sign_group);
++ if (lnum == 0)
++ return FAIL;
++ update_debug_sign(buf, lnum);
++ }
++
++ return OK;
++ }
++
++ /*
+ * ":sign" command
+ */
+ void
+***************
+*** 7653,7659 ****
+ char_u *p;
+ int idx;
+ sign_T *sp;
+- sign_T *sp_prev;
+ buf_T *buf = NULL;
+
+ /* Parse the subcommand. */
+--- 7936,7941 ----
+***************
+*** 7681,7686 ****
+--- 7963,7974 ----
+ EMSG(_("E156: Missing sign name"));
+ else
+ {
++ char_u *name;
++ char_u *icon = NULL;
++ char_u *text = NULL;
++ char_u *linehl = NULL;
++ char_u *texthl = NULL;
++
+ /* Isolate the sign name. If it's a number skip leading zeroes,
+ * so that "099" and "99" are the same sign. But keep "0". */
+ p = skiptowhite(arg);
+***************
+*** 7688,7753 ****
+ *p++ = NUL;
+ while (arg[0] == '0' && arg[1] != NUL)
+ ++arg;
+
+- sp_prev = NULL;
+- for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+- {
+- if (STRCMP(sp->sn_name, arg) == 0)
+- break;
+- sp_prev = sp;
+- }
+ if (idx == SIGNCMD_DEFINE)
+ {
+! /* ":sign define {name} ...": define a sign */
+! if (sp == NULL)
+! {
+! sign_T *lp;
+! int start = next_sign_typenr;
+!
+! /* Allocate a new sign. */
+! sp = (sign_T *)alloc_clear((unsigned)sizeof(sign_T));
+! if (sp == NULL)
+! return;
+!
+! /* Check that next_sign_typenr is not already being used.
+! * This only happens after wrapping around. Hopefully
+! * another one got deleted and we can use its number. */
+! for (lp = first_sign; lp != NULL; )
+! {
+! if (lp->sn_typenr == next_sign_typenr)
+! {
+! ++next_sign_typenr;
+! if (next_sign_typenr == MAX_TYPENR)
+! next_sign_typenr = 1;
+! if (next_sign_typenr == start)
+! {
+! vim_free(sp);
+! EMSG(_("E612: Too many signs defined"));
+! return;
+! }
+! lp = first_sign; /* start all over */
+! continue;
+! }
+! lp = lp->sn_next;
+! }
+!
+! sp->sn_typenr = next_sign_typenr;
+! if (++next_sign_typenr == MAX_TYPENR)
+! next_sign_typenr = 1; /* wrap around */
+!
+! sp->sn_name = vim_strsave(arg);
+! if (sp->sn_name == NULL) /* out of memory */
+! {
+! vim_free(sp);
+! return;
+! }
+
+! /* add the new sign to the list of signs */
+! if (sp_prev == NULL)
+! first_sign = sp;
+! else
+! sp_prev->sn_next = sp;
+! }
+
+ /* set values for a defined sign. */
+ for (;;)
+--- 7976,7988 ----
+ *p++ = NUL;
+ while (arg[0] == '0' && arg[1] != NUL)
+ ++arg;
++ name = vim_strsave(arg);
+
+ if (idx == SIGNCMD_DEFINE)
+ {
+! int failed = FALSE;
+
+! /* ":sign define {name} ...": define a sign */
+
+ /* set values for a defined sign. */
+ for (;;)
+***************
+*** 7759,7854 ****
+ if (STRNCMP(arg, "icon=", 5) == 0)
+ {
+ arg += 5;
+! vim_free(sp->sn_icon);
+! sp->sn_icon = vim_strnsave(arg, (int)(p - arg));
+! backslash_halve(sp->sn_icon);
+! # ifdef FEAT_SIGN_ICONS
+! if (gui.in_use)
+! {
+! out_flush();
+! if (sp->sn_image != NULL)
+! gui_mch_destroy_sign(sp->sn_image);
+! sp->sn_image = gui_mch_register_sign(sp->sn_icon);
+! }
+! # endif
+ }
+ else if (STRNCMP(arg, "text=", 5) == 0)
+ {
+- char_u *s;
+- int cells;
+- int len;
+-
+ arg += 5;
+! for (s = arg; s + 1 < p; ++s)
+! if (*s == '\\')
+! {
+! // Remove a backslash, so that it is possible
+! // to use a space.
+! STRMOVE(s, s + 1);
+! --p;
+! }
+! # ifdef FEAT_MBYTE
+! /* Count cells and check for non-printable chars */
+! if (has_mbyte)
+! {
+! cells = 0;
+! for (s = arg; s < p; s += (*mb_ptr2len)(s))
+! {
+! if (!vim_isprintc((*mb_ptr2char)(s)))
+! break;
+! cells += (*mb_ptr2cells)(s);
+! }
+! }
+! else
+! # endif
+! {
+! for (s = arg; s < p; ++s)
+! if (!vim_isprintc(*s))
+! break;
+! cells = (int)(s - arg);
+! }
+! /* Currently must be one or two display cells */
+! if (s != p || cells < 1 || cells > 2)
+! {
+! *p = NUL;
+! EMSG2(_("E239: Invalid sign text: %s"), arg);
+! return;
+! }
+!
+! vim_free(sp->sn_text);
+! /* Allocate one byte more if we need to pad up
+! * with a space. */
+! len = (int)(p - arg + ((cells == 1) ? 1 : 0));
+! sp->sn_text = vim_strnsave(arg, len);
+!
+! if (sp->sn_text != NULL && cells == 1)
+! STRCPY(sp->sn_text + len - 1, " ");
+ }
+ else if (STRNCMP(arg, "linehl=", 7) == 0)
+ {
+ arg += 7;
+! sp->sn_line_hl = syn_check_group(arg, (int)(p - arg));
+ }
+ else if (STRNCMP(arg, "texthl=", 7) == 0)
+ {
+ arg += 7;
+! sp->sn_text_hl = syn_check_group(arg, (int)(p - arg));
+ }
+ else
+ {
+ EMSG2(_(e_invarg2), arg);
+! return;
+ }
+ }
+ }
+- else if (sp == NULL)
+- EMSG2(_("E155: Unknown sign: %s"), arg);
+ else if (idx == SIGNCMD_LIST)
+ /* ":sign list {name}" */
+! sign_list_defined(sp);
+ else
+ /* ":sign undefine {name}" */
+! sign_undefine(sp, sp_prev);
+ }
+ }
+ else
+--- 7994,8041 ----
+ if (STRNCMP(arg, "icon=", 5) == 0)
+ {
+ arg += 5;
+! icon = vim_strnsave(arg, (int)(p - arg));
+ }
+ else if (STRNCMP(arg, "text=", 5) == 0)
+ {
+ arg += 5;
+! text = vim_strnsave(arg, (int)(p - arg));
+ }
+ else if (STRNCMP(arg, "linehl=", 7) == 0)
+ {
+ arg += 7;
+! linehl = vim_strnsave(arg, (int)(p - arg));
+ }
+ else if (STRNCMP(arg, "texthl=", 7) == 0)
+ {
+ arg += 7;
+! texthl = vim_strnsave(arg, (int)(p - arg));
+ }
+ else
+ {
+ EMSG2(_(e_invarg2), arg);
+! failed = TRUE;
+! break;
+ }
+ }
++
++ if (!failed)
++ sign_define_by_name(name, icon, linehl, text, texthl);
++
++ vim_free(icon);
++ vim_free(text);
++ vim_free(linehl);
++ vim_free(texthl);
+ }
+ else if (idx == SIGNCMD_LIST)
+ /* ":sign list {name}" */
+! sign_list_by_name(name);
+ else
+ /* ":sign undefine {name}" */
+! sign_undefine_by_name(name);
+!
+! vim_free(name);
+! return;
+ }
+ }
+ else
+***************
+*** 7856,7879 ****
+ int id = -1;
+ linenr_T lnum = -1;
+ char_u *sign_name = NULL;
+ char_u *arg1;
+
+ if (*arg == NUL)
+ {
+ if (idx == SIGNCMD_PLACE)
+ {
+ /* ":sign place": list placed signs in all buffers */
+! sign_list_placed(NULL);
+ }
+ else if (idx == SIGNCMD_UNPLACE)
+ {
+ /* ":sign unplace": remove placed sign at cursor */
+ id = buf_findsign_id(curwin->w_buffer, curwin->w_cursor.lnum);
+ if (id > 0)
+! {
+! buf_delsign(curwin->w_buffer, id);
+! update_debug_sign(curwin->w_buffer, curwin->w_cursor.lnum);
+! }
+ else
+ EMSG(_("E159: Missing sign number"));
+ }
+--- 8043,8066 ----
+ int id = -1;
+ linenr_T lnum = -1;
+ char_u *sign_name = NULL;
++ char_u *group = NULL;
++ int prio = SIGN_DEF_PRIO;
+ char_u *arg1;
++ int bufarg = FALSE;
+
+ if (*arg == NUL)
+ {
+ if (idx == SIGNCMD_PLACE)
+ {
+ /* ":sign place": list placed signs in all buffers */
+! sign_list_placed(NULL, NULL);
+ }
+ else if (idx == SIGNCMD_UNPLACE)
+ {
+ /* ":sign unplace": remove placed sign at cursor */
+ id = buf_findsign_id(curwin->w_buffer, curwin->w_cursor.lnum);
+ if (id > 0)
+! sign_unplace(id, NULL, curwin->w_buffer);
+ else
+ EMSG(_("E159: Missing sign number"));
+ }
+***************
+*** 7906,7923 ****
+ {
+ /* ":sign unplace {id}": remove placed sign by number */
+ FOR_ALL_BUFFERS(buf)
+! if ((lnum = buf_delsign(buf, id)) != 0)
+! update_debug_sign(buf, lnum);
+ return;
+ }
+ }
+ }
+
+ /*
+! * Check for line={lnum} name={name} and file={fname} or buffer={nr}.
+! * Leave "arg" pointing to {fname}.
+ */
+! for (;;)
+ {
+ if (STRNCMP(arg, "line=", 5) == 0)
+ {
+--- 8093,8109 ----
+ {
+ /* ":sign unplace {id}": remove placed sign by number */
+ FOR_ALL_BUFFERS(buf)
+! sign_unplace(id, NULL, buf);
+ return;
+ }
+ }
+ }
+
+ /*
+! * Check for line={lnum} name={name} group={group} priority={prio}
+! * and file={fname} or buffer={nr}. Leave "arg" pointing to {fname}.
+ */
+! while (*arg != NUL)
+ {
+ if (STRNCMP(arg, "line=", 5) == 0)
+ {
+***************
+*** 7945,7954 ****
+ while (sign_name[0] == '0' && sign_name[1] != NUL)
+ ++sign_name;
+ }
+ else if (STRNCMP(arg, "file=", 5) == 0)
+ {
+ arg += 5;
+! buf = buflist_findname(arg);
+ break;
+ }
+ else if (STRNCMP(arg, "buffer=", 7) == 0)
+--- 8131,8155 ----
+ while (sign_name[0] == '0' && sign_name[1] != NUL)
+ ++sign_name;
+ }
++ else if (STRNCMP(arg, "group=", 6) == 0)
++ {
++ arg += 6;
++ group = arg;
++ arg = skiptowhite(arg);
++ if (*arg != NUL)
++ *arg++ = NUL;
++ }
++ else if (STRNCMP(arg, "priority=", 9) == 0)
++ {
++ arg += 9;
++ prio = atoi((char *)arg);
++ arg = skiptowhite(arg);
++ }
+ else if (STRNCMP(arg, "file=", 5) == 0)
+ {
+ arg += 5;
+! buf = buflist_findname_exp(arg);
+! bufarg = TRUE;
+ break;
+ }
+ else if (STRNCMP(arg, "buffer=", 7) == 0)
+***************
+*** 7957,7962 ****
+--- 8158,8164 ----
+ buf = buflist_findnr((int)getdigits(&arg));
+ if (*skipwhite(arg) != NUL)
+ EMSG(_(e_trailing));
++ bufarg = TRUE;
+ break;
+ }
+ else
+***************
+*** 7967,7990 ****
+ arg = skipwhite(arg);
+ }
+
+! if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"), arg);
+ }
+ else if (id <= 0 && !(idx == SIGNCMD_UNPLACE && id == -2))
+ {
+! if (lnum >= 0 || sign_name != NULL)
+ EMSG(_(e_invarg));
+ else
+! /* ":sign place file={fname}": list placed signs in one file */
+! sign_list_placed(buf);
+ }
+ else if (idx == SIGNCMD_JUMP)
+ {
+ /* ":sign jump {id} file={fname}" */
+ if (lnum >= 0 || sign_name != NULL)
+ EMSG(_(e_invarg));
+! else if ((lnum = buf_findsign(buf, id)) > 0)
+ { /* goto a sign ... */
+ if (buf_jump_open_win(buf) != NULL)
+ { /* ... in a current window */
+--- 8169,8201 ----
+ arg = skipwhite(arg);
+ }
+
+! if ((!bufarg && group == NULL) || (group != NULL && *group == '\0'))
+! {
+! // File or buffer is not specified or an empty group is used
+! EMSG(_(e_invarg));
+! return;
+! }
+!
+! if (bufarg && buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"), arg);
+ }
+ else if (id <= 0 && !(idx == SIGNCMD_UNPLACE && id == -2))
+ {
+! if ((group == NULL) && (lnum >= 0 || sign_name != NULL))
+ EMSG(_(e_invarg));
+ else
+! // ":sign place file={fname}": list placed signs in one file
+! // ":sign place group={group} file={fname}"
+! // ":sign place group=* file={fname}"
+! sign_list_placed(buf, group);
+ }
+ else if (idx == SIGNCMD_JUMP)
+ {
+ /* ":sign jump {id} file={fname}" */
+ if (lnum >= 0 || sign_name != NULL)
+ EMSG(_(e_invarg));
+! else if ((lnum = buf_findsign(buf, id, group)) > 0)
+ { /* goto a sign ... */
+ if (buf_jump_open_win(buf) != NULL)
+ { /* ... in a current window */
+***************
+*** 8021,8065 ****
+ EMSG(_(e_invarg));
+ else if (id == -2)
+ {
+! /* ":sign unplace * file={fname}" */
+! redraw_buf_later(buf, NOT_VALID);
+! buf_delete_signs(buf);
+ }
+ else
+ {
+! /* ":sign unplace {id} file={fname}" */
+! lnum = buf_delsign(buf, id);
+! update_debug_sign(buf, lnum);
+ }
+ }
+ /* idx == SIGNCMD_PLACE */
+! else if (sign_name != NULL)
+! {
+! for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+! if (STRCMP(sp->sn_name, sign_name) == 0)
+! break;
+! if (sp == NULL)
+! {
+! EMSG2(_("E155: Unknown sign: %s"), sign_name);
+! return;
+! }
+! if (lnum > 0)
+! /* ":sign place {id} line={lnum} name={name} file={fname}":
+! * place a sign */
+! buf_addsign(buf, id, lnum, sp->sn_typenr);
+! else
+! /* ":sign place {id} file={fname}": change sign type */
+! lnum = buf_change_sign_type(buf, id, sp->sn_typenr);
+! if (lnum > 0)
+! update_debug_sign(buf, lnum);
+! else
+! EMSG2(_("E885: Not possible to change sign %s"), sign_name);
+! }
+ else
+ EMSG(_(e_invarg));
+ }
+ }
+
+ # if defined(FEAT_SIGN_ICONS) || defined(PROTO)
+ /*
+ * Allocate the icons. Called when the GUI has started. Allows defining
+--- 8232,8395 ----
+ EMSG(_(e_invarg));
+ else if (id == -2)
+ {
+! if (buf != NULL)
+! // ":sign unplace * file={fname}"
+! sign_unplace(0, group, buf);
+! else
+! // ":sign unplace * group=*": remove all placed signs
+! FOR_ALL_BUFFERS(buf)
+! if (buf->b_signlist != NULL)
+! buf_delete_signs(buf, group);
+ }
+ else
+ {
+! if (buf != NULL)
+! // ":sign unplace {id} file={fname}"
+! // ":sign unplace {id} group={group} file={fname}"
+! // ":sign unplace {id} group=* file={fname}"
+! sign_unplace(id, group, buf);
+! else
+! // ":sign unplace {id} group={group}":
+! // ":sign unplace {id} group=*":
+! // remove all placed signs in this group.
+! FOR_ALL_BUFFERS(buf)
+! if (buf->b_signlist != NULL)
+! sign_unplace(id, group, buf);
+ }
+ }
+ /* idx == SIGNCMD_PLACE */
+! else if (sign_name != NULL && buf != NULL)
+! sign_place(&id, group, sign_name, buf, lnum, prio);
+ else
+ EMSG(_(e_invarg));
+ }
+ }
+
++ /*
++ * Return information about a specified sign
++ */
++ static void
++ sign_getinfo(sign_T *sp, dict_T *retdict)
++ {
++ char_u *p;
++
++ dict_add_string(retdict, "name", (char_u *)sp->sn_name);
++ if (sp->sn_icon != NULL)
++ dict_add_string(retdict, "icon", (char_u *)sp->sn_icon);
++ if (sp->sn_text != NULL)
++ dict_add_string(retdict, "text", (char_u *)sp->sn_text);
++ if (sp->sn_line_hl > 0)
++ {
++ p = get_highlight_name_ext(NULL, sp->sn_line_hl - 1, FALSE);
++ if (p == NULL)
++ p = (char_u *)"NONE";
++ dict_add_string(retdict, "linehl", (char_u *)p);
++ }
++ if (sp->sn_text_hl > 0)
++ {
++ p = get_highlight_name_ext(NULL, sp->sn_text_hl - 1, FALSE);
++ if (p == NULL)
++ p = (char_u *)"NONE";
++ dict_add_string(retdict, "texthl", (char_u *)p);
++ }
++ }
++
++ /*
++ * If 'name' is NULL, return a list of all the defined signs.
++ * Otherwise, return information about the specified sign.
++ */
++ void
++ sign_getlist(char_u *name, list_T *retlist)
++ {
++ sign_T *sp = first_sign;
++ dict_T *dict;
++
++ if (name != NULL)
++ {
++ sp = sign_find(name, NULL);
++ if (sp == NULL)
++ return;
++ }
++
++ for (; sp != NULL && !got_int; sp = sp->sn_next)
++ {
++ if ((dict = dict_alloc_id(aid_sign_getlist)) == NULL)
++ return;
++ if (list_append_dict(retlist, dict) == FAIL)
++ return;
++ sign_getinfo(sp, dict);
++
++ if (name != NULL) // handle only the specified sign
++ break;
++ }
++ }
++
++ /*
++ * Return information about all the signs placed in a buffer
++ */
++ static void
++ sign_get_placed_in_buf(
++ buf_T *buf,
++ linenr_T lnum,
++ int sign_id,
++ char_u *sign_group,
++ list_T *retlist)
++ {
++ dict_T *d;
++ list_T *l;
++ signlist_T *sign;
++ dict_T *sdict;
++
++ if ((d = dict_alloc_id(aid_sign_getplaced_dict)) == NULL)
++ return;
++ list_append_dict(retlist, d);
++
++ dict_add_number(d, "bufnr", (long)buf->b_fnum);
++
++ if ((l = list_alloc_id(aid_sign_getplaced_list)) == NULL)
++ return;
++ dict_add_list(d, "signs", l);
++
++ FOR_ALL_SIGNS_IN_BUF(buf)
++ {
++ if (!sign_in_group(sign, sign_group))
++ continue;
++ if ((lnum == 0 && sign_id == 0) ||
++ (sign_id == 0 && lnum == sign->lnum) ||
++ (lnum == 0 && sign_id == sign->id) ||
++ (lnum == sign->lnum && sign_id == sign->id))
++ {
++ if ((sdict = sign_get_info(sign)) != NULL)
++ list_append_dict(l, sdict);
++ }
++ }
++ }
++
++ /*
++ * Get a list of signs placed in buffer 'buf'. If 'num' is non-zero, return the
++ * sign placed at the line number. If 'lnum' is zero, return all the signs
++ * placed in 'buf'. If 'buf' is NULL, return signs placed in all the buffers.
++ */
++ void
++ sign_get_placed(
++ buf_T *buf,
++ linenr_T lnum,
++ int sign_id,
++ char_u *sign_group,
++ list_T *retlist)
++ {
++ if (buf != NULL)
++ sign_get_placed_in_buf(buf, lnum, sign_id, sign_group, retlist);
++ else
++ {
++ FOR_ALL_BUFFERS(buf)
++ {
++ if (buf->b_signlist != NULL)
++ sign_get_placed_in_buf(buf, 0, sign_id, sign_group, retlist);
++ }
++ }
++ }
++
+ # if defined(FEAT_SIGN_ICONS) || defined(PROTO)
+ /*
+ * Allocate the icons. Called when the GUI has started. Allows defining
+***************
+*** 8214,8220 ****
+ return (char_u *)_("[Deleted]");
+ }
+
+- # if defined(EXITFREE) || defined(PROTO)
+ /*
+ * Undefine/free all signs.
+ */
+--- 8544,8549 ----
+***************
+*** 8224,8230 ****
+ while (first_sign != NULL)
+ sign_undefine(first_sign, NULL);
+ }
+- # endif
+
+ # if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ static enum
+--- 8553,8558 ----
+*** ../vim-8.1.0613/src/globals.h 2018-11-10 17:33:23.087518814 +0100
+--- src/globals.h 2018-12-21 14:36:57.242303552 +0100
+***************
+*** 606,611 ****
+--- 606,615 ----
+
+ #define FOR_ALL_BUFFERS(buf) for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+
++ // Iterate through all the signs placed in a buffer
++ #define FOR_ALL_SIGNS_IN_BUF(buf) \
++ for (sign = buf->b_signlist; sign != NULL; sign = sign->next)
++
+ /* Flag that is set when switching off 'swapfile'. It means that all blocks
+ * are to be loaded into memory. Shouldn't be global... */
+ EXTERN int mf_dont_release INIT(= FALSE); /* don't release blocks */
+*** ../vim-8.1.0613/src/list.c 2018-11-11 15:20:32.432704446 +0100
+--- src/list.c 2018-12-21 14:36:57.242303552 +0100
+***************
+*** 116,121 ****
+--- 116,135 ----
+ }
+
+ /*
++ * Same as rettv_list_alloc() but uses an allocation id for testing.
++ */
++ int
++ rettv_list_alloc_id(typval_T *rettv, alloc_id_T id UNUSED)
++ {
++ #ifdef FEAT_EVAL
++ if (alloc_fail_id == id && alloc_does_fail((long_u)sizeof(list_T)))
++ return FAIL;
++ #endif
++ return rettv_list_alloc(rettv);
++ }
++
++
++ /*
+ * Set a list as the return value
+ */
+ void
+*** ../vim-8.1.0613/src/misc2.c 2018-12-16 16:30:17.810717978 +0100
+--- src/misc2.c 2018-12-21 14:36:57.246303525 +0100
+***************
+*** 895,900 ****
+--- 895,913 ----
+ }
+
+ /*
++ * Same as alloc_clear() but with allocation id for testing
++ */
++ char_u *
++ alloc_clear_id(unsigned size, alloc_id_T id UNUSED)
++ {
++ #ifdef FEAT_EVAL
++ if (alloc_fail_id == id && alloc_does_fail((long_u)size))
++ return NULL;
++ #endif
++ return alloc_clear(size);
++ }
++
++ /*
+ * alloc() with check for maximum line length
+ */
+ char_u *
+*** ../vim-8.1.0613/src/netbeans.c 2018-09-30 21:43:17.199693265 +0200
+--- src/netbeans.c 2018-12-21 14:36:57.246303525 +0100
+***************
+*** 1042,1048 ****
+ cp = (char *)args;
+ serNum = strtol(cp, &cp, 10);
+ /* If the sign isn't found linenum will be zero. */
+! linenum = (long)buf_findsign(buf->bufp, serNum);
+ }
+ #endif
+ nb_reply_nr(cmdno, linenum);
+--- 1042,1048 ----
+ cp = (char *)args;
+ serNum = strtol(cp, &cp, 10);
+ /* If the sign isn't found linenum will be zero. */
+! linenum = (long)buf_findsign(buf->bufp, serNum, NULL);
+ }
+ #endif
+ nb_reply_nr(cmdno, linenum);
+***************
+*** 1256,1262 ****
+ {
+ nbdebug((" Deleting sign %d on line %d\n",
+ id, i));
+! buf_delsign(buf->bufp, id);
+ }
+ else
+ {
+--- 1256,1262 ----
+ {
+ nbdebug((" Deleting sign %d on line %d\n",
+ id, i));
+! buf_delsign(buf->bufp, id, NULL);
+ }
+ else
+ {
+*** ../vim-8.1.0613/src/proto/buffer.pro 2018-12-18 21:56:25.084495836 +0100
+--- src/proto/buffer.pro 2018-12-21 14:36:57.246303525 +0100
+***************
+*** 69,85 ****
+ void switch_to_win_for_buf(buf_T *buf, win_T **save_curwinp, tabpage_T **save_curtabp, bufref_T *save_curbuf);
+ void restore_win_for_buf(win_T *save_curwin, tabpage_T *save_curtab, bufref_T *save_curbuf);
+ int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
+! void buf_addsign(buf_T *buf, int id, linenr_T lnum, int typenr);
+! linenr_T buf_change_sign_type(buf_T *buf, int markId, int typenr);
+ int buf_getsigntype(buf_T *buf, linenr_T lnum, int type);
+! linenr_T buf_delsign(buf_T *buf, int id);
+! int buf_findsign(buf_T *buf, int id);
+ int buf_findsign_id(buf_T *buf, linenr_T lnum);
+ int buf_findsigntype_id(buf_T *buf, linenr_T lnum, int typenr);
+ int buf_signcount(buf_T *buf, linenr_T lnum);
+! void buf_delete_signs(buf_T *buf);
+ void buf_delete_all_signs(void);
+! void sign_list_placed(buf_T *rbuf);
+ void sign_mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_after);
+ void set_buflisted(int on);
+ int buf_contents_changed(buf_T *buf);
+--- 69,90 ----
+ void switch_to_win_for_buf(buf_T *buf, win_T **save_curwinp, tabpage_T **save_curtabp, bufref_T *save_curbuf);
+ void restore_win_for_buf(win_T *save_curwin, tabpage_T *save_curtab, bufref_T *save_curbuf);
+ int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
+! void buf_addsign(buf_T *buf, int id, char_u *group, int prio, linenr_T lnum, int typenr);
+! linenr_T buf_change_sign_type(buf_T *buf, int markId, char_u *group, int typenr);
+ int buf_getsigntype(buf_T *buf, linenr_T lnum, int type);
+! linenr_T buf_delsign(buf_T *buf, int id, char_u *group);
+! int buf_findsign(buf_T *buf, int id, char_u *group);
+! #ifdef FEAT_SIGNS
+! int sign_in_group(signlist_T *sign, char_u *group);
+! dict_T *sign_get_info(signlist_T *sign);
+! signlist_T *buf_getsign_with_id(buf_T *buf, int id, char_u *group);
+! #endif
+ int buf_findsign_id(buf_T *buf, linenr_T lnum);
+ int buf_findsigntype_id(buf_T *buf, linenr_T lnum, int typenr);
+ int buf_signcount(buf_T *buf, linenr_T lnum);
+! void buf_delete_signs(buf_T *buf, char_u *group);
+ void buf_delete_all_signs(void);
+! void sign_list_placed(buf_T *rbuf, char_u *sign_group);
+ void sign_mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_after);
+ void set_buflisted(int on);
+ int buf_contents_changed(buf_T *buf);
+*** ../vim-8.1.0613/src/proto/ex_cmds.pro 2018-12-18 21:56:25.084495836 +0100
+--- src/proto/ex_cmds.pro 2018-12-21 14:36:57.246303525 +0100
+***************
+*** 61,70 ****
+--- 61,77 ----
+ void *sign_get_image(int typenr);
+ char_u *sign_typenr2name(int typenr);
+ void free_signs(void);
++ void free_signs(void);
+ char_u *get_sign_name(expand_T *xp, int idx);
+ void set_context_in_sign_cmd(expand_T *xp, char_u *arg);
+ void ex_smile(exarg_T *eap);
+ void ex_drop(exarg_T *eap);
+ char_u *skip_vimgrep_pat(char_u *p, char_u **s, int *flags);
+ void ex_oldfiles(exarg_T *eap);
++ int sign_define_by_name(char_u *name, char_u *icon, char_u *linehl, char_u *text, char_u *texthl);
++ int sign_undefine_by_name(char_u *name);
++ void sign_getlist(char_u *name, list_T *retlist);
++ int sign_place(int *sign_id, char_u *group, char_u *sign_name, buf_T *buf, linenr_T lnum, int prio);
++ int sign_unplace(int id, char_u *group, buf_T *buf);
++ void sign_get_placed(buf_T *buf, linenr_T lnum, int id, char_u *group, list_T *retlist);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0613/src/proto/list.pro 2018-11-11 15:20:32.436704418 +0100
+--- src/proto/list.pro 2018-12-21 14:36:57.246303525 +0100
+***************
+*** 5,10 ****
+--- 5,11 ----
+ list_T *list_alloc(void);
+ list_T *list_alloc_id(alloc_id_T id);
+ int rettv_list_alloc(typval_T *rettv);
++ int rettv_list_alloc_id(typval_T *rettv, alloc_id_T id);
+ void rettv_list_set(typval_T *rettv, list_T *l);
+ void list_unref(list_T *l);
+ int list_free_nonref(int copyID);
+*** ../vim-8.1.0613/src/proto/misc2.pro 2018-12-18 21:56:25.084495836 +0100
+--- src/proto/misc2.pro 2018-12-21 14:36:57.246303525 +0100
+***************
+*** 24,29 ****
+--- 24,30 ----
+ char_u *alloc(unsigned size);
+ char_u *alloc_id(unsigned size, alloc_id_T id);
+ char_u *alloc_clear(unsigned size);
++ char_u * alloc_clear_id(unsigned size, alloc_id_T id);
+ char_u *alloc_check(unsigned size);
+ char_u *lalloc_clear(long_u size, int message);
+ char_u *lalloc(long_u size, int message);
+*** ../vim-8.1.0613/src/structs.h 2018-12-13 22:17:52.881941445 +0100
+--- src/structs.h 2018-12-21 14:36:57.246303525 +0100
+***************
+*** 740,749 ****
+--- 740,754 ----
+ int id; /* unique identifier for each placed sign */
+ linenr_T lnum; /* line number which has this sign */
+ int typenr; /* typenr of sign */
++ char_u *group; /* sign group */
++ int priority; /* priority for highlighting */
+ signlist_T *next; /* next signlist entry */
+ signlist_T *prev; /* previous entry -- for easy reordering */
+ };
+
++ // Default sign priority for highlighting
++ #define SIGN_DEF_PRIO 10
++
+ /* type argument for buf_getsigntype() */
+ #define SIGN_ANY 0
+ #define SIGN_LINEHL 1
+*** ../vim-8.1.0613/src/testdir/test_signs.vim 2018-12-14 19:37:03.677899412 +0100
+--- src/testdir/test_signs.vim 2018-12-21 14:44:27.834440393 +0100
+***************
+*** 16,23 ****
+ try
+ sign define Sign2 text=xy texthl=Title linehl=Error icon=../../pixmaps/stock_vim_find_help.png
+ catch /E255:/
+! " ignore error: E255: Couldn't read in sign data!
+! " This error can happen when running in gui.
+ " Some gui like Motif do not support the png icon format.
+ endtry
+
+--- 16,23 ----
+ try
+ sign define Sign2 text=xy texthl=Title linehl=Error icon=../../pixmaps/stock_vim_find_help.png
+ catch /E255:/
+! " Ignore error: E255: Couldn't read in sign data!
+! " This error can happen when running in the GUI.
+ " Some gui like Motif do not support the png icon format.
+ endtry
+
+***************
+*** 63,69 ****
+
+ " Check placed signs
+ let a=execute('sign place')
+! call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n line=3 id=41 name=Sign1\n", a)
+
+ " Unplace the sign and try jumping to it again should fail.
+ sign unplace 41
+--- 63,69 ----
+
+ " Check placed signs
+ let a=execute('sign place')
+! call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n line=3 id=41 name=Sign1 priority=10\n", a)
+
+ " Unplace the sign and try jumping to it again should fail.
+ sign unplace 41
+***************
+*** 112,118 ****
+ " Only 1 or 2 character text is allowed
+ call assert_fails("sign define Sign4 text=abc linehl=Comment", 'E239:')
+ call assert_fails("sign define Sign4 text= linehl=Comment", 'E239:')
+! call assert_fails("sign define Sign4 text=\ ab linehl=Comment", 'E239:')
+
+ " define sign with whitespace
+ sign define Sign4 text=\ X linehl=Comment
+--- 112,118 ----
+ " Only 1 or 2 character text is allowed
+ call assert_fails("sign define Sign4 text=abc linehl=Comment", 'E239:')
+ call assert_fails("sign define Sign4 text= linehl=Comment", 'E239:')
+! call assert_fails("sign define Sign4 text=\\ ab linehl=Comment", 'E239:')
+
+ " define sign with whitespace
+ sign define Sign4 text=\ X linehl=Comment
+***************
+*** 131,136 ****
+--- 131,158 ----
+ sign define Sign4 text=\\ linehl=Comment
+ sign undefine Sign4
+
++ " Error cases
++ call assert_fails("exe 'sign place abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ call assert_fails("exe 'sign unplace abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ call assert_fails("exe 'sign place 1abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ call assert_fails("exe 'sign unplace 2abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ call assert_fails("sign unplace 2 *", 'E474:')
++ call assert_fails("exe 'sign place 1 line=3 name=Sign1 buffer=' . bufnr('%') a", 'E488:')
++ call assert_fails("exe 'sign place name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ call assert_fails("exe 'sign place line=10 buffer=' . bufnr('%')", 'E474:')
++ call assert_fails("exe 'sign unplace 2 line=10 buffer=' . bufnr('%')", 'E474:')
++ call assert_fails("exe 'sign unplace 2 name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ call assert_fails("exe 'sign place 2 line=3 buffer=' . bufnr('%')", 'E474:')
++ call assert_fails("sign place 2", 'E474:')
++ call assert_fails("sign place abc", 'E474:')
++ call assert_fails("sign place 5 line=3", 'E474:')
++ call assert_fails("sign place 5 name=Sign1", 'E474:')
++ call assert_fails("sign place 5 group=g1", 'E474:')
++ call assert_fails("sign place 5 group=*", 'E474:')
++ call assert_fails("sign place 5 priority=10", 'E474:')
++ call assert_fails("sign place 5 line=3 name=Sign1", 'E474:')
++ call assert_fails("sign place 5 group=g1 line=3 name=Sign1", 'E474:')
++
+ " After undefining the sign, we should no longer be able to place it.
+ sign undefine Sign1
+ sign undefine Sign2
+***************
+*** 152,158 ****
+
+ " Listing placed sign should show that sign is deleted.
+ let a=execute('sign place')
+! call assert_equal("\n--- Signs ---\nSigns for foobar:\n line=1 id=41 name=[Deleted]\n", a)
+
+ sign unplace 41
+ let a=execute('sign place')
+--- 174,180 ----
+
+ " Listing placed sign should show that sign is deleted.
+ let a=execute('sign place')
+! call assert_equal("\n--- Signs ---\nSigns for foobar:\n line=1 id=41 name=[Deleted] priority=10\n", a)
+
+ sign unplace 41
+ let a=execute('sign place')
+***************
+*** 202,207 ****
+--- 224,231 ----
+ endfunc
+
+ func Test_sign_invalid_commands()
++ sign define Sign1 text=x
++
+ call assert_fails('sign', 'E471:')
+ call assert_fails('sign jump', 'E471:')
+ call assert_fails('sign xxx', 'E160:')
+***************
+*** 211,216 ****
+--- 235,286 ----
+ call assert_fails('sign list xxx', 'E155:')
+ call assert_fails('sign place 1 buffer=999', 'E158:')
+ call assert_fails('sign define Sign2 text=', 'E239:')
++ " Non-numeric identifier for :sign place
++ call assert_fails("exe 'sign place abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ " Non-numeric identifier for :sign unplace
++ call assert_fails("exe 'sign unplace abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ " Number followed by an alphabet as sign identifier for :sign place
++ call assert_fails("exe 'sign place 1abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ " Number followed by an alphabet as sign identifier for :sign unplace
++ call assert_fails("exe 'sign unplace 2abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ " Sign identifier and '*' for :sign unplace
++ call assert_fails("sign unplace 2 *", 'E474:')
++ " Trailing characters after buffer number for :sign place
++ call assert_fails("exe 'sign place 1 line=3 name=Sign1 buffer=' . bufnr('%') . 'xxx'", 'E488:')
++ " Trailing characters after buffer number for :sign unplace
++ call assert_fails("exe 'sign unplace 1 buffer=' . bufnr('%') . 'xxx'", 'E488:')
++ call assert_fails("exe 'sign unplace * buffer=' . bufnr('%') . 'xxx'", 'E488:')
++ call assert_fails("sign unplace 1 xxx", 'E474:')
++ call assert_fails("sign unplace * xxx", 'E474:')
++ call assert_fails("sign unplace xxx", 'E474:')
++ " Placing a sign without line number
++ call assert_fails("exe 'sign place name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ " Placing a sign without sign name
++ call assert_fails("exe 'sign place line=10 buffer=' . bufnr('%')", 'E474:')
++ " Unplacing a sign with line number
++ call assert_fails("exe 'sign unplace 2 line=10 buffer=' . bufnr('%')", 'E474:')
++ " Unplacing a sign with sign name
++ call assert_fails("exe 'sign unplace 2 name=Sign1 buffer=' . bufnr('%')", 'E474:')
++ " Placing a sign without sign name
++ call assert_fails("exe 'sign place 2 line=3 buffer=' . bufnr('%')", 'E474:')
++ " Placing a sign with only sign identifier
++ call assert_fails("sign place 2", 'E474:')
++ " Placing a sign with only a name
++ call assert_fails("sign place abc", 'E474:')
++ " Placing a sign with only line number
++ call assert_fails("sign place 5 line=3", 'E474:')
++ " Placing a sign with only sign name
++ call assert_fails("sign place 5 name=Sign1", 'E474:')
++ " Placing a sign with only sign group
++ call assert_fails("sign place 5 group=g1", 'E474:')
++ call assert_fails("sign place 5 group=*", 'E474:')
++ " Placing a sign with only sign priority
++ call assert_fails("sign place 5 priority=10", 'E474:')
++ " Placing a sign without buffer number or file name
++ call assert_fails("sign place 5 line=3 name=Sign1", 'E474:')
++ call assert_fails("sign place 5 group=g1 line=3 name=Sign1", 'E474:')
++
++ sign undefine Sign1
+ endfunc
+
+ func Test_sign_delete_buffer()
+***************
+*** 224,226 ****
+--- 294,842 ----
+ sign unplace 61
+ sign undefine Sign
+ endfunc
++
++ " Test for VimL functions for managing signs
++ func Test_sign_funcs()
++ " Remove all the signs
++ call sign_unplace('*')
++ call sign_undefine()
++
++ " Tests for sign_define()
++ let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'}
++ call assert_equal(0, sign_define("sign1", attr))
++ call assert_equal([{'name' : 'sign1', 'texthl' : 'Error',
++ \ 'linehl' : 'Search', 'text' : '=>'}], sign_getdefined())
++
++ " Define a new sign without attributes and then update it
++ call sign_define("sign2")
++ let attr = {'text' : '!!', 'linehl' : 'DiffAdd', 'texthl' : 'DiffChange',
++ \ 'icon' : 'sign2.ico'}
++ try
++ call sign_define("sign2", attr)
++ catch /E255:/
++ " ignore error: E255: Couldn't read in sign data!
++ " This error can happen when running in gui.
++ endtry
++ call assert_equal([{'name' : 'sign2', 'texthl' : 'DiffChange',
++ \ 'linehl' : 'DiffAdd', 'text' : '!!', 'icon' : 'sign2.ico'}],
++ \ sign_getdefined("sign2"))
++
++ " Test for a sign name with digits
++ call assert_equal(0, sign_define(0002, {'linehl' : 'StatusLine'}))
++ call assert_equal([{'name' : '2', 'linehl' : 'StatusLine'}],
++ \ sign_getdefined(0002))
++ call sign_undefine(0002)
++
++ " Tests for invalid arguments to sign_define()
++ call assert_fails('call sign_define("sign4", {"text" : "===>"})', 'E239:')
++ call assert_fails('call sign_define("sign5", {"text" : ""})', 'E239:')
++ call assert_fails('call sign_define([])', 'E730:')
++ call assert_fails('call sign_define("sign6", [])', 'E715:')
++
++ " Tests for sign_getdefined()
++ call assert_equal([], sign_getdefined("none"))
++ call assert_fails('call sign_getdefined({})', 'E731:')
++
++ " Tests for sign_place()
++ call writefile(repeat(["Sun is shining"], 30), "Xsign")
++ edit Xsign
++
++ call assert_equal(10, sign_place(10, '', 'sign1', 'Xsign',
++ \ {'lnum' : 20}))
++ call assert_equal([{'bufnr' : bufnr(''), 'signs' :
++ \ [{'id' : 10, 'group' : '', 'lnum' : 20, 'name' : 'sign1',
++ \ 'priority' : 10}]}], sign_getplaced('Xsign'))
++ call assert_equal([{'bufnr' : bufnr(''), 'signs' :
++ \ [{'id' : 10, 'group' : '', 'lnum' : 20, 'name' : 'sign1',
++ \ 'priority' : 10}]}],
++ \ sign_getplaced('Xsign', {'lnum' : 20}))
++ call assert_equal([{'bufnr' : bufnr(''), 'signs' :
++ \ [{'id' : 10, 'group' : '', 'lnum' : 20, 'name' : 'sign1',
++ \ 'priority' : 10}]}],
++ \ sign_getplaced('Xsign', {'id' : 10}))
++
++ " Tests for invalid arguments to sign_place()
++ call assert_fails('call sign_place([], "", "mySign", 1)', 'E745:')
++ call assert_fails('call sign_place(5, "", "mySign", -1)', 'E158:')
++ call assert_fails('call sign_place(-1, "", "sign1", "Xsign", [])',
++ \ 'E474:')
++ call assert_fails('call sign_place(-1, "", "sign1", "Xsign",
++ \ {"lnum" : 30})', 'E474:')
++ call assert_fails('call sign_place(10, "", "xsign1x", "Xsign",
++ \ {"lnum" : 30})', 'E155:')
++ call assert_fails('call sign_place(10, "", "", "Xsign",
++ \ {"lnum" : 30})', 'E155:')
++ call assert_fails('call sign_place(10, "", [], "Xsign",
++ \ {"lnum" : 30})', 'E730:')
++ call assert_fails('call sign_place(5, "", "sign1", "abcxyz.xxx",
++ \ {"lnum" : 10})', 'E158:')
++ call assert_fails('call sign_place(5, "", "sign1", "", {"lnum" : 10})',
++ \ 'E158:')
++ call assert_fails('call sign_place(5, "", "sign1", [], {"lnum" : 10})',
++ \ 'E158:')
++ call assert_fails('call sign_place(21, "", "sign1", "Xsign",
++ \ {"lnum" : -1})', 'E885:')
++ call assert_fails('call sign_place(22, "", "sign1", "Xsign",
++ \ {"lnum" : 0})', 'E885:')
++ call assert_equal(-1, sign_place(1, "*", "sign1", "Xsign", {"lnum" : 10}))
++
++ " Tests for sign_getplaced()
++ call assert_equal([{'bufnr' : bufnr(''), 'signs' :
++ \ [{'id' : 10, 'group' : '', 'lnum' : 20, 'name' : 'sign1',
++ \ 'priority' : 10}]}],
++ \ sign_getplaced(bufnr('Xsign')))
++ call assert_equal([{'bufnr' : bufnr(''), 'signs' :
++ \ [{'id' : 10, 'group' : '', 'lnum' : 20, 'name' : 'sign1',
++ \ 'priority' : 10}]}],
++ \ sign_getplaced())
++ call assert_fails("call sign_getplaced('dummy.sign')", 'E158:')
++ call assert_fails('call sign_getplaced("")', 'E158:')
++ call assert_fails('call sign_getplaced(-1)', 'E158:')
++ call assert_fails('call sign_getplaced("Xsign", [])', 'E715:')
++ call assert_equal([{'bufnr' : bufnr(''), 'signs' : []}],
++ \ sign_getplaced('Xsign', {'lnum' : 1000000}))
++ call assert_fails("call sign_getplaced('Xsign', {'lnum' : []})",
++ \ 'E745:')
++ call assert_equal([{'bufnr' : bufnr(''), 'signs' : []}],
++ \ sign_getplaced('Xsign', {'id' : 44}))
++ call assert_fails("call sign_getplaced('Xsign', {'id' : []})",
++ \ 'E745:')
++
++ " Tests for sign_unplace()
++ call sign_place(20, '', 'sign2', 'Xsign', {"lnum" : 30})
++ call assert_equal(0, sign_unplace('',
++ \ {'id' : 20, 'buffer' : 'Xsign'}))
++ call assert_equal(-1, sign_unplace('',
++ \ {'id' : 30, 'buffer' : 'Xsign'}))
++ call sign_place(20, '', 'sign2', 'Xsign', {"lnum" : 30})
++ call assert_fails("call sign_unplace('',
++ \ {'id' : 20, 'buffer' : 'buffer.c'})", 'E158:')
++ call assert_fails("call sign_unplace('',
++ \ {'id' : 20, 'buffer' : ''})", 'E158:')
++ call assert_fails("call sign_unplace('',
++ \ {'id' : 20, 'buffer' : 200})", 'E158:')
++ call assert_fails("call sign_unplace('', 'mySign')", 'E715:')
++
++ " Tests for sign_undefine()
++ call assert_equal(0, sign_undefine("sign1"))
++ call assert_equal([], sign_getdefined("sign1"))
++ call assert_fails('call sign_undefine("none")', 'E155:')
++ call assert_fails('call sign_undefine([])', 'E730:')
++
++ call delete("Xsign")
++ call sign_unplace('*')
++ call sign_undefine()
++ enew | only
++ endfunc
++
++ " Tests for sign groups
++ func Test_sign_group()
++ enew | only
++ " Remove all the signs
++ call sign_unplace('*')
++ call sign_undefine()
++
++ call writefile(repeat(["Sun is shining"], 30), "Xsign")
++
++ let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'}
++ call assert_equal(0, sign_define("sign1", attr))
++
++ edit Xsign
++ let bnum = bufnr('%')
++ let fname = fnamemodify('Xsign', ':p')
++
++ " Error case
++ call assert_fails("call sign_place(5, [], 'sign1', 'Xsign',
++ \ {'lnum' : 30})", 'E730:')
++
++ " place three signs with the same identifier. One in the global group and
++ " others in the named groups
++ call assert_equal(5, sign_place(5, '', 'sign1', 'Xsign',
++ \ {'lnum' : 10}))
++ call assert_equal(5, sign_place(5, 'g1', 'sign1', bnum, {'lnum' : 20}))
++ call assert_equal(5, sign_place(5, 'g2', 'sign1', bnum, {'lnum' : 30}))
++
++ " Test for sign_getplaced() with group
++ let s = sign_getplaced('Xsign')
++ call assert_equal(1, len(s[0].signs))
++ call assert_equal(s[0].signs[0].group, '')
++ let s = sign_getplaced(bnum, {'group' : 'g2'})
++ call assert_equal('g2', s[0].signs[0].group)
++ let s = sign_getplaced(bnum, {'group' : 'g3'})
++ call assert_equal([], s[0].signs)
++ let s = sign_getplaced(bnum, {'group' : '*'})
++ call assert_equal([{'id' : 5, 'group' : '', 'name' : 'sign1', 'lnum' : 10,
++ \ 'priority' : 10},
++ \ {'id' : 5, 'group' : 'g1', 'name' : 'sign1', 'lnum' : 20,
++ \ 'priority' : 10},
++ \ {'id' : 5, 'group' : 'g2', 'name' : 'sign1', 'lnum' : 30,
++ \ 'priority' : 10}],
++ \ s[0].signs)
++
++ " Test for sign_getplaced() with id
++ let s = sign_getplaced(bnum, {'id' : 5})
++ call assert_equal([{'id' : 5, 'group' : '', 'name' : 'sign1', 'lnum' : 10,
++ \ 'priority' : 10}],
++ \ s[0].signs)
++ let s = sign_getplaced(bnum, {'id' : 5, 'group' : 'g2'})
++ call assert_equal(
++ \ [{'id' : 5, 'name' : 'sign1', 'lnum' : 30, 'group' : 'g2',
++ \ 'priority' : 10}],
++ \ s[0].signs)
++ let s = sign_getplaced(bnum, {'id' : 5, 'group' : '*'})
++ call assert_equal([{'id' : 5, 'group' : '', 'name' : 'sign1', 'lnum' : 10,
++ \ 'priority' : 10},
++ \ {'id' : 5, 'group' : 'g1', 'name' : 'sign1', 'lnum' : 20,
++ \ 'priority' : 10},
++ \ {'id' : 5, 'group' : 'g2', 'name' : 'sign1', 'lnum' : 30,
++ \ 'priority' : 10}],
++ \ s[0].signs)
++ let s = sign_getplaced(bnum, {'id' : 5, 'group' : 'g3'})
++ call assert_equal([], s[0].signs)
++
++ " Test for sign_getplaced() with lnum
++ let s = sign_getplaced(bnum, {'lnum' : 20})
++ call assert_equal([], s[0].signs)
++ let s = sign_getplaced(bnum, {'lnum' : 20, 'group' : 'g1'})
++ call assert_equal(
++ \ [{'id' : 5, 'name' : 'sign1', 'lnum' : 20, 'group' : 'g1',
++ \ 'priority' : 10}],
++ \ s[0].signs)
++ let s = sign_getplaced(bnum, {'lnum' : 30, 'group' : '*'})
++ call assert_equal(
++ \ [{'id' : 5, 'name' : 'sign1', 'lnum' : 30, 'group' : 'g2',
++ \ 'priority' : 10}],
++ \ s[0].signs)
++ let s = sign_getplaced(bnum, {'lnum' : 40, 'group' : '*'})
++ call assert_equal([], s[0].signs)
++
++ " Error case
++ call assert_fails("call sign_getplaced(bnum, {'group' : []})",
++ \ 'E730:')
++
++ " Clear the sign in global group
++ call sign_unplace('', {'id' : 5, 'buffer' : bnum})
++ let s = sign_getplaced(bnum, {'group' : '*'})
++ call assert_equal([
++ \ {'id' : 5, 'name' : 'sign1', 'lnum' : 20, 'group' : 'g1',
++ \ 'priority' : 10},
++ \ {'id' : 5, 'name' : 'sign1', 'lnum' : 30, 'group' : 'g2',
++ \ 'priority' : 10}],
++ \ s[0].signs)
++
++ " Clear the sign in one of the groups
++ call sign_unplace('g1', {'buffer' : 'Xsign'})
++ let s = sign_getplaced(bnum, {'group' : '*'})
++ call assert_equal([
++ \ {'id' : 5, 'name' : 'sign1', 'lnum' : 30, 'group' : 'g2',
++ \ 'priority' : 10}],
++ \ s[0].signs)
++
++ " Clear all the signs from the buffer
++ call sign_unplace('*', {'buffer' : bnum})
++ call assert_equal([], sign_getplaced(bnum, {'group' : '*'})[0].signs)
++
++ " Clear sign across groups using an identifier
++ call sign_place(25, '', 'sign1', bnum, {'lnum' : 10})
++ call sign_place(25, 'g1', 'sign1', bnum, {'lnum' : 11})
++ call sign_place(25, 'g2', 'sign1', bnum, {'lnum' : 12})
++ call assert_equal(0, sign_unplace('*', {'id' : 25}))
++ call assert_equal([], sign_getplaced(bnum, {'group' : '*'})[0].signs)
++
++ " Error case
++ call assert_fails("call sign_unplace([])", 'E474:')
++
++ " Place a sign in the global group and try to delete it using a group
++ call assert_equal(5, sign_place(5, '', 'sign1', bnum, {'lnum' : 10}))
++ call assert_equal(-1, sign_unplace('g1', {'id' : 5}))
++
++ " Place signs in multiple groups and delete all the signs in one of the
++ " group
++ call assert_equal(5, sign_place(5, '', 'sign1', bnum, {'lnum' : 10}))
++ call assert_equal(6, sign_place(6, '', 'sign1', bnum, {'lnum' : 11}))
++ call assert_equal(5, sign_place(5, 'g1', 'sign1', bnum, {'lnum' : 10}))
++ call assert_equal(5, sign_place(5, 'g2', 'sign1', bnum, {'lnum' : 10}))
++ call assert_equal(6, sign_place(6, 'g1', 'sign1', bnum, {'lnum' : 11}))
++ call assert_equal(6, sign_place(6, 'g2', 'sign1', bnum, {'lnum' : 11}))
++ call assert_equal(0, sign_unplace('g1'))
++ let s = sign_getplaced(bnum, {'group' : 'g1'})
++ call assert_equal([], s[0].signs)
++ let s = sign_getplaced(bnum)
++ call assert_equal(2, len(s[0].signs))
++ let s = sign_getplaced(bnum, {'group' : 'g2'})
++ call assert_equal('g2', s[0].signs[0].group)
++ call assert_equal(0, sign_unplace('', {'id' : 5}))
++ call assert_equal(0, sign_unplace('', {'id' : 6}))
++ let s = sign_getplaced(bnum, {'group' : 'g2'})
++ call assert_equal('g2', s[0].signs[0].group)
++ call assert_equal(0, sign_unplace('', {'buffer' : bnum}))
++
++ call sign_unplace('*')
++
++ " Test for :sign command and groups
++ exe 'sign place 5 line=10 name=sign1 file=' . fname
++ exe 'sign place 5 group=g1 line=10 name=sign1 file=' . fname
++ exe 'sign place 5 group=g2 line=10 name=sign1 file=' . fname
++
++ " Test for :sign place group={group} file={fname}
++ let a = execute('sign place file=' . fname)
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 name=sign1 priority=10\n", a)
++
++ let a = execute('sign place group=g2 file=' . fname)
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 group=g2 name=sign1 priority=10\n", a)
++
++ let a = execute('sign place group=* file=' . fname)
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=10 id=5 group=g2 name=sign1 priority=10\n" .
++ \ " line=10 id=5 group=g1 name=sign1 priority=10\n" .
++ \ " line=10 id=5 name=sign1 priority=10\n", a)
++
++ let a = execute('sign place group=xyz file=' . fname)
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n", a)
++
++ call sign_unplace('*')
++
++ " Test for :sign place group={group} buffer={nr}
++ let bnum = bufnr('Xsign')
++ exe 'sign place 5 line=10 name=sign1 buffer=' . bnum
++ exe 'sign place 5 group=g1 line=11 name=sign1 buffer=' . bnum
++ exe 'sign place 5 group=g2 line=12 name=sign1 buffer=' . bnum
++
++ let a = execute('sign place buffer=' . bnum)
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 name=sign1 priority=10\n", a)
++
++ let a = execute('sign place group=g2 buffer=' . bnum)
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=12 id=5 group=g2 name=sign1 priority=10\n", a)
++
++ let a = execute('sign place group=* buffer=' . bnum)
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=10 id=5 name=sign1 priority=10\n" .
++ \ " line=11 id=5 group=g1 name=sign1 priority=10\n" .
++ \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
++
++ let a = execute('sign place group=xyz buffer=' . bnum)
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n", a)
++
++ let a = execute('sign place group=*')
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=10 id=5 name=sign1 priority=10\n" .
++ \ " line=11 id=5 group=g1 name=sign1 priority=10\n" .
++ \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
++
++ " Test for :sign unplace
++ exe 'sign unplace 5 group=g2 file=' . fname
++ call assert_equal([], sign_getplaced(bnum, {'group' : 'g2'})[0].signs)
++
++ exe 'sign unplace 5 group=g1 buffer=' . bnum
++ call assert_equal([], sign_getplaced(bnum, {'group' : 'g1'})[0].signs)
++
++ exe 'sign unplace 5 group=xy file=' . fname
++ call assert_equal(1, len(sign_getplaced(bnum, {'group' : '*'})[0].signs))
++
++ " Test for removing all the signs. Place the signs again for this test
++ exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
++ exe 'sign place 5 group=g2 line=12 name=sign1 file=' . fname
++ exe 'sign place 6 line=20 name=sign1 file=' . fname
++ exe 'sign place 6 group=g1 line=21 name=sign1 file=' . fname
++ exe 'sign place 6 group=g2 line=22 name=sign1 file=' . fname
++ exe 'sign unplace 5 group=* file=' . fname
++ let a = execute('sign place group=*')
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=20 id=6 name=sign1 priority=10\n" .
++ \ " line=21 id=6 group=g1 name=sign1 priority=10\n" .
++ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
++
++ " Remove all the signs from the global group
++ exe 'sign unplace * file=' . fname
++ let a = execute('sign place group=*')
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=21 id=6 group=g1 name=sign1 priority=10\n" .
++ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
++
++ " Remove all the signs from a particular group
++ exe 'sign place 5 line=10 name=sign1 file=' . fname
++ exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
++ exe 'sign place 5 group=g2 line=12 name=sign1 file=' . fname
++ exe 'sign unplace * group=g1 file=' . fname
++ let a = execute('sign place group=*')
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=10 id=5 name=sign1 priority=10\n" .
++ \ " line=12 id=5 group=g2 name=sign1 priority=10\n" .
++ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
++
++ " Remove all the signs from all the groups in a file
++ exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
++ exe 'sign place 6 line=20 name=sign1 file=' . fname
++ exe 'sign place 6 group=g1 line=21 name=sign1 file=' . fname
++ exe 'sign unplace * group=* file=' . fname
++ let a = execute('sign place group=*')
++ call assert_equal("\n--- Signs ---\n", a)
++
++ " Remove a particular sign id in a group from all the files
++ exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
++ sign unplace 5 group=g1
++ let a = execute('sign place group=*')
++ call assert_equal("\n--- Signs ---\n", a)
++
++ " Remove a particular sign id in all the groups from all the files
++ exe 'sign place 5 line=10 name=sign1 file=' . fname
++ exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
++ exe 'sign place 5 group=g2 line=12 name=sign1 file=' . fname
++ exe 'sign place 6 line=20 name=sign1 file=' . fname
++ exe 'sign place 6 group=g1 line=21 name=sign1 file=' . fname
++ exe 'sign place 6 group=g2 line=22 name=sign1 file=' . fname
++ sign unplace 5 group=*
++ let a = execute('sign place group=*')
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=20 id=6 name=sign1 priority=10\n" .
++ \ " line=21 id=6 group=g1 name=sign1 priority=10\n" .
++ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
++
++ " Remove all the signs from all the groups in all the files
++ exe 'sign place 5 line=10 name=sign1 file=' . fname
++ exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
++ sign unplace * group=*
++ let a = execute('sign place group=*')
++ call assert_equal("\n--- Signs ---\n", a)
++
++ " Error cases
++ call assert_fails("exe 'sign place 3 group= name=sign1 buffer=' . bnum", 'E474:')
++
++ call delete("Xsign")
++ call sign_unplace('*')
++ call sign_undefine()
++ enew | only
++ endfunc
++
++ " Tests for auto-generating the sign identifier
++ func Test_sign_id_autogen()
++ enew | only
++ call sign_unplace('*')
++ call sign_undefine()
++
++ let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'}
++ call assert_equal(0, sign_define("sign1", attr))
++
++ call writefile(repeat(["Sun is shining"], 30), "Xsign")
++ edit Xsign
++
++ call assert_equal(1, sign_place(0, '', 'sign1', 'Xsign',
++ \ {'lnum' : 10}))
++ call assert_equal(2, sign_place(2, '', 'sign1', 'Xsign',
++ \ {'lnum' : 12}))
++ call assert_equal(3, sign_place(0, '', 'sign1', 'Xsign',
++ \ {'lnum' : 14}))
++ call sign_unplace('', {'buffer' : 'Xsign', 'id' : 2})
++ call assert_equal(2, sign_place(0, '', 'sign1', 'Xsign',
++ \ {'lnum' : 12}))
++
++ call assert_equal(1, sign_place(0, 'g1', 'sign1', 'Xsign',
++ \ {'lnum' : 11}))
++ call assert_equal(0, sign_unplace('g1', {'id' : 1}))
++ call assert_equal(10,
++ \ sign_getplaced('Xsign', {'id' : 1})[0].signs[0].lnum)
++
++ call delete("Xsign")
++ call sign_unplace('*')
++ call sign_undefine()
++ enew | only
++ endfunc
++
++ " Test for sign priority
++ func Test_sign_priority()
++ enew | only
++ call sign_unplace('*')
++ call sign_undefine()
++
++ let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Search'}
++ call sign_define("sign1", attr)
++ call sign_define("sign2", attr)
++ call sign_define("sign3", attr)
++
++ " Place three signs with different priority in the same line
++ call writefile(repeat(["Sun is shining"], 30), "Xsign")
++ edit Xsign
++ let fname = fnamemodify('Xsign', ':p')
++
++ call sign_place(1, 'g1', 'sign1', 'Xsign',
++ \ {'lnum' : 11, 'priority' : 50})
++ call sign_place(2, 'g2', 'sign2', 'Xsign',
++ \ {'lnum' : 11, 'priority' : 100})
++ call sign_place(3, '', 'sign3', 'Xsign', {'lnum' : 11})
++ let s = sign_getplaced('Xsign', {'group' : '*'})
++ call assert_equal([
++ \ {'id' : 2, 'name' : 'sign2', 'lnum' : 11, 'group' : 'g2',
++ \ 'priority' : 100},
++ \ {'id' : 1, 'name' : 'sign1', 'lnum' : 11, 'group' : 'g1',
++ \ 'priority' : 50},
++ \ {'id' : 3, 'name' : 'sign3', 'lnum' : 11, 'group' : '',
++ \ 'priority' : 10}],
++ \ s[0].signs)
++
++ " Error case
++ call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign',
++ \ [])", 'E715:')
++ call sign_unplace('*')
++
++ " Tests for the :sign place command with priority
++ sign place 5 line=10 name=sign1 priority=30 file=Xsign
++ sign place 5 group=g1 line=10 name=sign1 priority=20 file=Xsign
++ sign place 5 group=g2 line=10 name=sign1 priority=25 file=Xsign
++ let a = execute('sign place group=*')
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=10 id=5 name=sign1 priority=30\n" .
++ \ " line=10 id=5 group=g2 name=sign1 priority=25\n" .
++ \ " line=10 id=5 group=g1 name=sign1 priority=20\n", a)
++
++ " Test for :sign place group={group}
++ let a = execute('sign place group=g1')
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=10 id=5 group=g1 name=sign1 priority=20\n", a)
++
++ call sign_unplace('*')
++ call sign_undefine()
++ enew | only
++ call delete("Xsign")
++ endfunc
++
++ " Tests for memory allocation failures in sign functions
++ func Test_sign_memfailures()
++ call writefile(repeat(["Sun is shining"], 30), "Xsign")
++ edit Xsign
++
++ call test_alloc_fail(GetAllocId('sign_getdefined'), 0, 0)
++ call assert_fails('call sign_getdefined("sign1")', 'E342:')
++ call test_alloc_fail(GetAllocId('sign_getplaced'), 0, 0)
++ call assert_fails('call sign_getplaced("Xsign")', 'E342:')
++ call test_alloc_fail(GetAllocId('sign_define_by_name'), 0, 0)
++ let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'}
++ call assert_fails('call sign_define("sign1", attr)', 'E342:')
++
++ let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'}
++ call sign_define("sign1", attr)
++ call test_alloc_fail(GetAllocId('sign_getlist'), 0, 0)
++ call assert_fails('call sign_getdefined("sign1")', 'E342:')
++
++ call sign_place(3, 'g1', 'sign1', 'Xsign', {'lnum' : 10})
++ call test_alloc_fail(GetAllocId('sign_getplaced_dict'), 0, 0)
++ call assert_fails('call sign_getplaced("Xsign")', 'E342:')
++ call test_alloc_fail(GetAllocId('sign_getplaced_list'), 0, 0)
++ call assert_fails('call sign_getplaced("Xsign")', 'E342:')
++
++ call test_alloc_fail(GetAllocId('insert_sign'), 0, 0)
++ call assert_fails('call sign_place(4, "g1", "sign1", "Xsign", {"lnum" : 11})',
++ \ 'E342:')
++
++ call test_alloc_fail(GetAllocId('sign_getinfo'), 0, 0)
++ call assert_fails('call getbufinfo()', 'E342:')
++ call sign_place(4, 'g1', 'sign1', 'Xsign', {'lnum' : 11})
++ call test_alloc_fail(GetAllocId('sign_getinfo'), 0, 0)
++ call assert_fails('let binfo=getbufinfo("Xsign")', 'E342:')
++ call assert_equal([{'lnum': 11, 'id': 4, 'name': 'sign1',
++ \ 'priority': 10, 'group': 'g1'}], binfo[0].signs)
++
++ call sign_unplace('*')
++ call sign_undefine()
++ enew | only
++ call delete("Xsign")
++ endfunc
+*** ../vim-8.1.0613/src/workshop.c 2018-09-30 21:43:17.207693209 +0200
+--- src/workshop.c 2018-12-21 14:36:57.246303525 +0100
+***************
+*** 491,497 ****
+ lineno = 0;
+ buf = buflist_findname((char_u *)filename);
+ if (buf != NULL)
+! lineno = buf_findsign(buf, markId);
+
+ return lineno;
+ }
+--- 491,497 ----
+ lineno = 0;
+ buf = buflist_findname((char_u *)filename);
+ if (buf != NULL)
+! lineno = buf_findsign(buf, markId, NULL);
+
+ return lineno;
+ }
+*** ../vim-8.1.0613/src/version.c 2018-12-21 13:03:24.296337825 +0100
+--- src/version.c 2018-12-21 14:37:53.945927817 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 614,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+31. You code your homework in HTML and give your instructor the URL.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0615 b/data/vim/patches/8.1.0615
new file mode 100644
index 000000000..19004a485
--- /dev/null
+++ b/data/vim/patches/8.1.0615
@@ -0,0 +1,8621 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0615
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0615
+Problem: Get_tv function names are not consistent.
+Solution: Rename to tv_get.
+Files: src/eval.c, src/proto/eval.pro, src/channel.c, src/dict.c,
+ src/evalfunc.c, src/list.c, src/message.c, src/tag.c,
+ src/terminal.c, src/textprop.c, src/window.c, src/ex_cmds.c,
+ src/os_unix.c, src/os_win32.c, src/json.c, src/regexp.c,
+ src/edit.c, src/misc2.c, src/popupmnu.c
+
+
+*** ../vim-8.1.0614/src/eval.c 2018-12-14 15:38:28.327597664 +0100
+--- src/eval.c 2018-12-21 15:59:46.202241682 +0100
+***************
+*** 681,687 ****
+ *error = FALSE;
+ if (!skip)
+ {
+! retval = (get_tv_number_chk(&tv, error) != 0);
+ clear_tv(&tv);
+ }
+ }
+--- 681,687 ----
+ *error = FALSE;
+ if (!skip)
+ {
+! retval = (tv_get_number_chk(&tv, error) != 0);
+ clear_tv(&tv);
+ }
+ }
+***************
+*** 720,726 ****
+ }
+ else
+ {
+! s = get_tv_string_buf_chk(expr, buf);
+ if (s == NULL)
+ return FAIL;
+ s = skipwhite(s);
+--- 720,726 ----
+ }
+ else
+ {
+! s = tv_get_string_buf_chk(expr, buf);
+ if (s == NULL)
+ return FAIL;
+ s = skipwhite(s);
+***************
+*** 751,757 ****
+ *error = TRUE;
+ return FALSE;
+ }
+! res = (get_tv_number_chk(&rettv, error) != 0);
+ clear_tv(&rettv);
+ return res;
+ }
+--- 751,757 ----
+ *error = TRUE;
+ return FALSE;
+ }
+! res = (tv_get_number_chk(&rettv, error) != 0);
+ clear_tv(&rettv);
+ return res;
+ }
+***************
+*** 776,782 ****
+ retval = NULL;
+ else
+ {
+! retval = vim_strsave(get_tv_string(&tv));
+ clear_tv(&tv);
+ }
+ if (skip)
+--- 776,782 ----
+ retval = NULL;
+ else
+ {
+! retval = vim_strsave(tv_get_string(&tv));
+ clear_tv(&tv);
+ }
+ if (skip)
+***************
+*** 841,847 ****
+ }
+ #endif
+ else
+! retval = vim_strsave(get_tv_string(&tv));
+ clear_tv(&tv);
+ }
+
+--- 841,847 ----
+ }
+ #endif
+ else
+! retval = vim_strsave(tv_get_string(&tv));
+ clear_tv(&tv);
+ }
+
+***************
+*** 891,897 ****
+ retval = -1;
+ else
+ {
+! retval = get_tv_number_chk(&rettv, NULL);
+ clear_tv(&rettv);
+ }
+ --emsg_off;
+--- 891,897 ----
+ retval = -1;
+ else
+ {
+! retval = tv_get_number_chk(&rettv, NULL);
+ clear_tv(&rettv);
+ }
+ --emsg_off;
+***************
+*** 982,993 ****
+ li = list->lv_first;
+ if (li == NULL)
+ return -1;
+! *pp = get_tv_string(&li->li_tv);
+
+ li = li->li_next;
+ if (li == NULL)
+ return -1;
+! return (int)get_tv_number(&li->li_tv);
+ }
+ #endif
+
+--- 982,993 ----
+ li = list->lv_first;
+ if (li == NULL)
+ return -1;
+! *pp = tv_get_string(&li->li_tv);
+
+ li = li->li_next;
+ if (li == NULL)
+ return -1;
+! return (int)tv_get_number(&li->li_tv);
+ }
+ #endif
+
+***************
+*** 1053,1059 ****
+ if (call_vim_function(func, argc, argv, &rettv) == FAIL)
+ return -1;
+
+! retval = get_tv_number_chk(&rettv, NULL);
+ clear_tv(&rettv);
+ return retval;
+ }
+--- 1053,1059 ----
+ if (call_vim_function(func, argc, argv, &rettv) == FAIL)
+ return -1;
+
+! retval = tv_get_number_chk(&rettv, NULL);
+ clear_tv(&rettv);
+ return retval;
+ }
+***************
+*** 1080,1086 ****
+ if (call_vim_function(func, argc, argv, &rettv) == FAIL)
+ return NULL;
+
+! retval = vim_strsave(get_tv_string(&rettv));
+ clear_tv(&rettv);
+ return retval;
+ }
+--- 1080,1086 ----
+ if (call_vim_function(func, argc, argv, &rettv) == FAIL)
+ return NULL;
+
+! retval = vim_strsave(tv_get_string(&rettv));
+ clear_tv(&rettv);
+ return retval;
+ }
+***************
+*** 1654,1660 ****
+ {
+ c1 = name[len];
+ name[len] = NUL;
+! p = get_tv_string_chk(tv);
+ if (p != NULL && op != NULL && *op == '.')
+ {
+ int mustfree = FALSE;
+--- 1654,1660 ----
+ {
+ c1 = name[len];
+ name[len] = NUL;
+! p = tv_get_string_chk(tv);
+ if (p != NULL && op != NULL && *op == '.')
+ {
+ int mustfree = FALSE;
+***************
+*** 1708,1715 ****
+ c1 = *p;
+ *p = NUL;
+
+! n = (long)get_tv_number(tv);
+! s = get_tv_string_chk(tv); /* != NULL if number or string */
+ if (s != NULL && op != NULL && *op != '=')
+ {
+ opt_type = get_option_value(arg, &numval,
+--- 1708,1715 ----
+ c1 = *p;
+ *p = NUL;
+
+! n = (long)tv_get_number(tv);
+! s = tv_get_string_chk(tv); /* != NULL if number or string */
+ if (s != NULL && op != NULL && *op != '=')
+ {
+ opt_type = get_option_value(arg, &numval,
+***************
+*** 1763,1769 ****
+ char_u *ptofree = NULL;
+ char_u *s;
+
+! p = get_tv_string_chk(tv);
+ if (p != NULL && op != NULL && *op == '.')
+ {
+ s = get_reg_contents(*arg == '@' ? '"' : *arg, GREG_EXPR_SRC);
+--- 1763,1769 ----
+ char_u *ptofree = NULL;
+ char_u *s;
+
+! p = tv_get_string_chk(tv);
+ if (p != NULL && op != NULL && *op == '.')
+ {
+ s = get_reg_contents(*arg == '@' ? '"' : *arg, GREG_EXPR_SRC);
+***************
+*** 1956,1962 ****
+ empty1 = FALSE;
+ if (eval1(&p, &var1, TRUE) == FAIL) /* recursive! */
+ return NULL;
+! if (get_tv_string_chk(&var1) == NULL)
+ {
+ /* not a number or string */
+ clear_tv(&var1);
+--- 1956,1962 ----
+ empty1 = FALSE;
+ if (eval1(&p, &var1, TRUE) == FAIL) /* recursive! */
+ return NULL;
+! if (tv_get_string_chk(&var1) == NULL)
+ {
+ /* not a number or string */
+ clear_tv(&var1);
+***************
+*** 1993,1999 ****
+ clear_tv(&var1);
+ return NULL;
+ }
+! if (get_tv_string_chk(&var2) == NULL)
+ {
+ /* not a number or string */
+ clear_tv(&var1);
+--- 1993,1999 ----
+ clear_tv(&var1);
+ return NULL;
+ }
+! if (tv_get_string_chk(&var2) == NULL)
+ {
+ /* not a number or string */
+ clear_tv(&var1);
+***************
+*** 2024,2030 ****
+ if (len == -1)
+ {
+ /* "[key]": get key from "var1" */
+! key = get_tv_string_chk(&var1); /* is number or string */
+ if (key == NULL)
+ {
+ clear_tv(&var1);
+--- 2024,2030 ----
+ if (len == -1)
+ {
+ /* "[key]": get key from "var1" */
+! key = tv_get_string_chk(&var1); /* is number or string */
+ if (key == NULL)
+ {
+ clear_tv(&var1);
+***************
+*** 2106,2112 ****
+ lp->ll_n1 = 0;
+ else
+ /* is number or string */
+! lp->ll_n1 = (long)get_tv_number(&var1);
+ clear_tv(&var1);
+
+ lp->ll_dict = NULL;
+--- 2106,2112 ----
+ lp->ll_n1 = 0;
+ else
+ /* is number or string */
+! lp->ll_n1 = (long)tv_get_number(&var1);
+ clear_tv(&var1);
+
+ lp->ll_dict = NULL;
+***************
+*** 2136,2142 ****
+ */
+ if (lp->ll_range && !lp->ll_empty2)
+ {
+! lp->ll_n2 = (long)get_tv_number(&var2);
+ /* is number or string */
+ clear_tv(&var2);
+ if (lp->ll_n2 < 0)
+--- 2136,2142 ----
+ */
+ if (lp->ll_range && !lp->ll_empty2)
+ {
+! lp->ll_n2 = (long)tv_get_number(&var2);
+ /* is number or string */
+ clear_tv(&var2);
+ if (lp->ll_n2 < 0)
+***************
+*** 2367,2373 ****
+ if (*op == '+' || *op == '-')
+ {
+ /* nr += nr or nr -= nr*/
+! n = get_tv_number(tv1);
+ #ifdef FEAT_FLOAT
+ if (tv2->v_type == VAR_FLOAT)
+ {
+--- 2367,2373 ----
+ if (*op == '+' || *op == '-')
+ {
+ /* nr += nr or nr -= nr*/
+! n = tv_get_number(tv1);
+ #ifdef FEAT_FLOAT
+ if (tv2->v_type == VAR_FLOAT)
+ {
+***************
+*** 2385,2393 ****
+ #endif
+ {
+ if (*op == '+')
+! n += get_tv_number(tv2);
+ else
+! n -= get_tv_number(tv2);
+ clear_tv(tv1);
+ tv1->v_type = VAR_NUMBER;
+ tv1->vval.v_number = n;
+--- 2385,2393 ----
+ #endif
+ {
+ if (*op == '+')
+! n += tv_get_number(tv2);
+ else
+! n -= tv_get_number(tv2);
+ clear_tv(tv1);
+ tv1->v_type = VAR_NUMBER;
+ tv1->vval.v_number = n;
+***************
+*** 2399,2406 ****
+ break;
+
+ /* str .= str */
+! s = get_tv_string(tv1);
+! s = concat_str(s, get_tv_string_buf(tv2, numbuf));
+ clear_tv(tv1);
+ tv1->v_type = VAR_STRING;
+ tv1->vval.v_string = s;
+--- 2399,2406 ----
+ break;
+
+ /* str .= str */
+! s = tv_get_string(tv1);
+! s = concat_str(s, tv_get_string_buf(tv2, numbuf));
+ clear_tv(tv1);
+ tv1->v_type = VAR_STRING;
+ tv1->vval.v_string = s;
+***************
+*** 2419,2425 ****
+ if (tv2->v_type == VAR_FLOAT)
+ f = tv2->vval.v_float;
+ else
+! f = get_tv_number(tv2);
+ if (*op == '+')
+ tv1->vval.v_float += f;
+ else
+--- 2419,2425 ----
+ if (tv2->v_type == VAR_FLOAT)
+ f = tv2->vval.v_float;
+ else
+! f = tv_get_number(tv2);
+ if (*op == '+')
+ tv1->vval.v_float += f;
+ else
+***************
+*** 3271,3277 ****
+ {
+ int error = FALSE;
+
+! if (get_tv_number_chk(rettv, &error) != 0)
+ result = TRUE;
+ clear_tv(rettv);
+ if (error)
+--- 3271,3277 ----
+ {
+ int error = FALSE;
+
+! if (tv_get_number_chk(rettv, &error) != 0)
+ result = TRUE;
+ clear_tv(rettv);
+ if (error)
+***************
+*** 3345,3351 ****
+ {
+ if (evaluate && first)
+ {
+! if (get_tv_number_chk(rettv, &error) != 0)
+ result = TRUE;
+ clear_tv(rettv);
+ if (error)
+--- 3345,3351 ----
+ {
+ if (evaluate && first)
+ {
+! if (tv_get_number_chk(rettv, &error) != 0)
+ result = TRUE;
+ clear_tv(rettv);
+ if (error)
+***************
+*** 3365,3371 ****
+ */
+ if (evaluate && !result)
+ {
+! if (get_tv_number_chk(&var2, &error) != 0)
+ result = TRUE;
+ clear_tv(&var2);
+ if (error)
+--- 3365,3371 ----
+ */
+ if (evaluate && !result)
+ {
+! if (tv_get_number_chk(&var2, &error) != 0)
+ result = TRUE;
+ clear_tv(&var2);
+ if (error)
+***************
+*** 3413,3419 ****
+ {
+ if (evaluate && first)
+ {
+! if (get_tv_number_chk(rettv, &error) == 0)
+ result = FALSE;
+ clear_tv(rettv);
+ if (error)
+--- 3413,3419 ----
+ {
+ if (evaluate && first)
+ {
+! if (tv_get_number_chk(rettv, &error) == 0)
+ result = FALSE;
+ clear_tv(rettv);
+ if (error)
+***************
+*** 3433,3439 ****
+ */
+ if (evaluate && result)
+ {
+! if (get_tv_number_chk(&var2, &error) == 0)
+ result = FALSE;
+ clear_tv(&var2);
+ if (error)
+--- 3433,3439 ----
+ */
+ if (evaluate && result)
+ {
+! if (tv_get_number_chk(&var2, &error) == 0)
+ result = FALSE;
+ clear_tv(&var2);
+ if (error)
+***************
+*** 3622,3628 ****
+ * we know that the first operand needs to be a string or number
+ * without evaluating the 2nd operand. So check before to avoid
+ * side effects after an error. */
+! if (evaluate && get_tv_string_chk(rettv) == NULL)
+ {
+ clear_tv(rettv);
+ return FAIL;
+--- 3622,3628 ----
+ * we know that the first operand needs to be a string or number
+ * without evaluating the 2nd operand. So check before to avoid
+ * side effects after an error. */
+! if (evaluate && tv_get_string_chk(rettv) == NULL)
+ {
+ clear_tv(rettv);
+ return FAIL;
+***************
+*** 3646,3653 ****
+ */
+ if (op == '.')
+ {
+! s1 = get_tv_string_buf(rettv, buf1); /* already checked */
+! s2 = get_tv_string_buf_chk(&var2, buf2);
+ if (s2 == NULL) /* type error ? */
+ {
+ clear_tv(rettv);
+--- 3646,3653 ----
+ */
+ if (op == '.')
+ {
+! s1 = tv_get_string_buf(rettv, buf1); /* already checked */
+! s2 = tv_get_string_buf_chk(&var2, buf2);
+ if (s2 == NULL) /* type error ? */
+ {
+ clear_tv(rettv);
+***************
+*** 3686,3692 ****
+ else
+ #endif
+ {
+! n1 = get_tv_number_chk(rettv, &error);
+ if (error)
+ {
+ /* This can only happen for "list + non-list". For
+--- 3686,3692 ----
+ else
+ #endif
+ {
+! n1 = tv_get_number_chk(rettv, &error);
+ if (error)
+ {
+ /* This can only happen for "list + non-list". For
+***************
+*** 3709,3715 ****
+ else
+ #endif
+ {
+! n2 = get_tv_number_chk(&var2, &error);
+ if (error)
+ {
+ clear_tv(rettv);
+--- 3709,3715 ----
+ else
+ #endif
+ {
+! n2 = tv_get_number_chk(&var2, &error);
+ if (error)
+ {
+ clear_tv(rettv);
+***************
+*** 3804,3810 ****
+ }
+ else
+ #endif
+! n1 = get_tv_number_chk(rettv, &error);
+ clear_tv(rettv);
+ if (error)
+ return FAIL;
+--- 3804,3810 ----
+ }
+ else
+ #endif
+! n1 = tv_get_number_chk(rettv, &error);
+ clear_tv(rettv);
+ if (error)
+ return FAIL;
+***************
+*** 3835,3841 ****
+ else
+ #endif
+ {
+! n2 = get_tv_number_chk(&var2, &error);
+ clear_tv(&var2);
+ if (error)
+ return FAIL;
+--- 3835,3841 ----
+ else
+ #endif
+ {
+! n2 = tv_get_number_chk(&var2, &error);
+ clear_tv(&var2);
+ if (error)
+ return FAIL;
+***************
+*** 4200,4206 ****
+ f = rettv->vval.v_float;
+ else
+ #endif
+! val = get_tv_number_chk(rettv, &error);
+ if (error)
+ {
+ clear_tv(rettv);
+--- 4200,4206 ----
+ f = rettv->vval.v_float;
+ else
+ #endif
+! val = tv_get_number_chk(rettv, &error);
+ if (error)
+ {
+ clear_tv(rettv);
+***************
+*** 4326,4332 ****
+ empty1 = TRUE;
+ else if (eval1(arg, &var1, evaluate) == FAIL) /* recursive! */
+ return FAIL;
+! else if (evaluate && get_tv_string_chk(&var1) == NULL)
+ {
+ /* not a number or string */
+ clear_tv(&var1);
+--- 4326,4332 ----
+ empty1 = TRUE;
+ else if (eval1(arg, &var1, evaluate) == FAIL) /* recursive! */
+ return FAIL;
+! else if (evaluate && tv_get_string_chk(&var1) == NULL)
+ {
+ /* not a number or string */
+ clear_tv(&var1);
+***************
+*** 4348,4354 ****
+ clear_tv(&var1);
+ return FAIL;
+ }
+! else if (evaluate && get_tv_string_chk(&var2) == NULL)
+ {
+ /* not a number or string */
+ if (!empty1)
+--- 4348,4354 ----
+ clear_tv(&var1);
+ return FAIL;
+ }
+! else if (evaluate && tv_get_string_chk(&var2) == NULL)
+ {
+ /* not a number or string */
+ if (!empty1)
+***************
+*** 4376,4382 ****
+ n1 = 0;
+ if (!empty1 && rettv->v_type != VAR_DICT)
+ {
+! n1 = get_tv_number(&var1);
+ clear_tv(&var1);
+ }
+ if (range)
+--- 4376,4382 ----
+ n1 = 0;
+ if (!empty1 && rettv->v_type != VAR_DICT)
+ {
+! n1 = tv_get_number(&var1);
+ clear_tv(&var1);
+ }
+ if (range)
+***************
+*** 4385,4391 ****
+ n2 = -1;
+ else
+ {
+! n2 = get_tv_number(&var2);
+ clear_tv(&var2);
+ }
+ }
+--- 4385,4391 ----
+ n2 = -1;
+ else
+ {
+! n2 = tv_get_number(&var2);
+ clear_tv(&var2);
+ }
+ }
+***************
+*** 4403,4409 ****
+
+ case VAR_NUMBER:
+ case VAR_STRING:
+! s = get_tv_string(rettv);
+ len = (long)STRLEN(s);
+ if (range)
+ {
+--- 4403,4409 ----
+
+ case VAR_NUMBER:
+ case VAR_STRING:
+! s = tv_get_string(rettv);
+ len = (long)STRLEN(s);
+ if (range)
+ {
+***************
+*** 4504,4510 ****
+
+ if (len == -1)
+ {
+! key = get_tv_string_chk(&var1);
+ if (key == NULL)
+ {
+ clear_tv(&var1);
+--- 4504,4510 ----
+
+ if (len == -1)
+ {
+! key = tv_get_string_chk(&var1);
+ if (key == NULL)
+ {
+ clear_tv(&var1);
+***************
+*** 4974,4981 ****
+ return tv1->vval.v_number == tv2->vval.v_number;
+
+ case VAR_STRING:
+! s1 = get_tv_string_buf(tv1, buf1);
+! s2 = get_tv_string_buf(tv2, buf2);
+ return ((ic ? MB_STRICMP(s1, s2) : STRCMP(s1, s2)) == 0);
+
+ case VAR_SPECIAL:
+--- 4974,4981 ----
+ return tv1->vval.v_number == tv2->vval.v_number;
+
+ case VAR_STRING:
+! s1 = tv_get_string_buf(tv1, buf1);
+! s2 = tv_get_string_buf(tv2, buf2);
+ return ((ic ? MB_STRICMP(s1, s2) : STRCMP(s1, s2)) == 0);
+
+ case VAR_SPECIAL:
+***************
+*** 5652,5664 ****
+ case VAR_NUMBER:
+ case VAR_UNKNOWN:
+ *tofree = NULL;
+! r = get_tv_string_buf(tv, numbuf);
+ break;
+
+ case VAR_JOB:
+ case VAR_CHANNEL:
+ *tofree = NULL;
+! r = get_tv_string_buf(tv, numbuf);
+ if (composite_val)
+ {
+ *tofree = string_quote(r, FALSE);
+--- 5652,5664 ----
+ case VAR_NUMBER:
+ case VAR_UNKNOWN:
+ *tofree = NULL;
+! r = tv_get_string_buf(tv, numbuf);
+ break;
+
+ case VAR_JOB:
+ case VAR_CHANNEL:
+ *tofree = NULL;
+! r = tv_get_string_buf(tv, numbuf);
+ if (composite_val)
+ {
+ *tofree = string_quote(r, FALSE);
+***************
+*** 5913,5919 ****
+ return &pos;
+ }
+
+! name = get_tv_string_chk(varp);
+ if (name == NULL)
+ return NULL;
+ if (name[0] == '.') /* cursor */
+--- 5913,5919 ----
+ return &pos;
+ }
+
+! name = tv_get_string_chk(varp);
+ if (name == NULL)
+ return NULL;
+ if (name[0] == '.') /* cursor */
+***************
+*** 6363,6369 ****
+ char_u *
+ get_vim_var_str(int idx)
+ {
+! return get_tv_string(&vimvars[idx].vv_tv);
+ }
+
+ /*
+--- 6363,6369 ----
+ char_u *
+ get_vim_var_str(int idx)
+ {
+! return tv_get_string(&vimvars[idx].vv_tv);
+ }
+
+ /*
+***************
+*** 6936,6955 ****
+ * Get the number value of a variable.
+ * If it is a String variable, uses vim_str2nr().
+ * For incompatible types, return 0.
+! * get_tv_number_chk() is similar to get_tv_number(), but informs the
+ * caller of incompatible types: it sets *denote to TRUE if "denote"
+ * is not NULL or returns -1 otherwise.
+ */
+ varnumber_T
+! get_tv_number(typval_T *varp)
+ {
+ int error = FALSE;
+
+! return get_tv_number_chk(varp, &error); /* return 0L on error */
+ }
+
+ varnumber_T
+! get_tv_number_chk(typval_T *varp, int *denote)
+ {
+ varnumber_T n = 0L;
+
+--- 6936,6955 ----
+ * Get the number value of a variable.
+ * If it is a String variable, uses vim_str2nr().
+ * For incompatible types, return 0.
+! * tv_get_number_chk() is similar to tv_get_number(), but informs the
+ * caller of incompatible types: it sets *denote to TRUE if "denote"
+ * is not NULL or returns -1 otherwise.
+ */
+ varnumber_T
+! tv_get_number(typval_T *varp)
+ {
+ int error = FALSE;
+
+! return tv_get_number_chk(varp, &error); /* return 0L on error */
+ }
+
+ varnumber_T
+! tv_get_number_chk(typval_T *varp, int *denote)
+ {
+ varnumber_T n = 0L;
+
+***************
+*** 6991,6997 ****
+ break;
+ #endif
+ case VAR_UNKNOWN:
+! internal_error("get_tv_number(UNKNOWN)");
+ break;
+ }
+ if (denote == NULL) /* useful for values that must be unsigned */
+--- 6991,6997 ----
+ break;
+ #endif
+ case VAR_UNKNOWN:
+! internal_error("tv_get_number(UNKNOWN)");
+ break;
+ }
+ if (denote == NULL) /* useful for values that must be unsigned */
+***************
+*** 7003,7009 ****
+
+ #ifdef FEAT_FLOAT
+ float_T
+! get_tv_float(typval_T *varp)
+ {
+ switch (varp->v_type)
+ {
+--- 7003,7009 ----
+
+ #ifdef FEAT_FLOAT
+ float_T
+! tv_get_float(typval_T *varp)
+ {
+ switch (varp->v_type)
+ {
+***************
+*** 7038,7044 ****
+ break;
+ # endif
+ case VAR_UNKNOWN:
+! internal_error("get_tv_float(UNKNOWN)");
+ break;
+ }
+ return 0;
+--- 7038,7044 ----
+ break;
+ # endif
+ case VAR_UNKNOWN:
+! internal_error("tv_get_float(UNKNOWN)");
+ break;
+ }
+ return 0;
+***************
+*** 7048,7072 ****
+ /*
+ * Get the string value of a variable.
+ * If it is a Number variable, the number is converted into a string.
+! * get_tv_string() uses a single, static buffer. YOU CAN ONLY USE IT ONCE!
+! * get_tv_string_buf() uses a given buffer.
+ * If the String variable has never been set, return an empty string.
+ * Never returns NULL;
+! * get_tv_string_chk() and get_tv_string_buf_chk() are similar, but return
+ * NULL on error.
+ */
+ char_u *
+! get_tv_string(typval_T *varp)
+ {
+ static char_u mybuf[NUMBUFLEN];
+
+! return get_tv_string_buf(varp, mybuf);
+ }
+
+ char_u *
+! get_tv_string_buf(typval_T *varp, char_u *buf)
+ {
+! char_u *res = get_tv_string_buf_chk(varp, buf);
+
+ return res != NULL ? res : (char_u *)"";
+ }
+--- 7048,7072 ----
+ /*
+ * Get the string value of a variable.
+ * If it is a Number variable, the number is converted into a string.
+! * tv_get_string() uses a single, static buffer. YOU CAN ONLY USE IT ONCE!
+! * tv_get_string_buf() uses a given buffer.
+ * If the String variable has never been set, return an empty string.
+ * Never returns NULL;
+! * tv_get_string_chk() and tv_get_string_buf_chk() are similar, but return
+ * NULL on error.
+ */
+ char_u *
+! tv_get_string(typval_T *varp)
+ {
+ static char_u mybuf[NUMBUFLEN];
+
+! return tv_get_string_buf(varp, mybuf);
+ }
+
+ char_u *
+! tv_get_string_buf(typval_T *varp, char_u *buf)
+ {
+! char_u *res = tv_get_string_buf_chk(varp, buf);
+
+ return res != NULL ? res : (char_u *)"";
+ }
+***************
+*** 7075,7089 ****
+ * Careful: This uses a single, static buffer. YOU CAN ONLY USE IT ONCE!
+ */
+ char_u *
+! get_tv_string_chk(typval_T *varp)
+ {
+ static char_u mybuf[NUMBUFLEN];
+
+! return get_tv_string_buf_chk(varp, mybuf);
+ }
+
+ char_u *
+! get_tv_string_buf_chk(typval_T *varp, char_u *buf)
+ {
+ switch (varp->v_type)
+ {
+--- 7075,7089 ----
+ * Careful: This uses a single, static buffer. YOU CAN ONLY USE IT ONCE!
+ */
+ char_u *
+! tv_get_string_chk(typval_T *varp)
+ {
+ static char_u mybuf[NUMBUFLEN];
+
+! return tv_get_string_buf_chk(varp, mybuf);
+ }
+
+ char_u *
+! tv_get_string_buf_chk(typval_T *varp, char_u *buf)
+ {
+ switch (varp->v_type)
+ {
+***************
+*** 7298,7304 ****
+
+ /*
+ * Get the string value of a (global/local) variable.
+! * Note: see get_tv_string() for how long the pointer remains valid.
+ * Returns NULL when it doesn't exist.
+ */
+ char_u *
+--- 7298,7304 ----
+
+ /*
+ * Get the string value of a (global/local) variable.
+! * Note: see tv_get_string() for how long the pointer remains valid.
+ * Returns NULL when it doesn't exist.
+ */
+ char_u *
+***************
+*** 7309,7315 ****
+ v = find_var(name, NULL, FALSE);
+ if (v == NULL)
+ return NULL;
+! return get_tv_string(&v->di_tv);
+ }
+
+ /*
+--- 7309,7315 ----
+ v = find_var(name, NULL, FALSE);
+ if (v == NULL)
+ return NULL;
+! return tv_get_string(&v->di_tv);
+ }
+
+ /*
+***************
+*** 7544,7550 ****
+ {
+ vim_free(v->di_tv.vval.v_string);
+ if (copy || tv->v_type != VAR_STRING)
+! v->di_tv.vval.v_string = vim_strsave(get_tv_string(tv));
+ else
+ {
+ /* Take over the string to avoid an extra alloc/free. */
+--- 7544,7550 ----
+ {
+ vim_free(v->di_tv.vval.v_string);
+ if (copy || tv->v_type != VAR_STRING)
+! v->di_tv.vval.v_string = vim_strsave(tv_get_string(tv));
+ else
+ {
+ /* Take over the string to avoid an extra alloc/free. */
+***************
+*** 7555,7561 ****
+ }
+ else if (v->di_tv.v_type == VAR_NUMBER)
+ {
+! v->di_tv.vval.v_number = get_tv_number(tv);
+ if (STRCMP(varname, "searchforward") == 0)
+ set_search_direction(v->di_tv.vval.v_number ? '/' : '?');
+ #ifdef FEAT_SEARCH_EXTRA
+--- 7555,7561 ----
+ }
+ else if (v->di_tv.v_type == VAR_NUMBER)
+ {
+! v->di_tv.vval.v_number = tv_get_number(tv);
+ if (STRCMP(varname, "searchforward") == 0)
+ set_search_direction(v->di_tv.vval.v_number ? '/' : '?');
+ #ifdef FEAT_SEARCH_EXTRA
+***************
+*** 7894,7900 ****
+ int inputdialog,
+ int secret)
+ {
+! char_u *prompt = get_tv_string_chk(&argvars[0]);
+ char_u *p = NULL;
+ int c;
+ char_u buf[NUMBUFLEN];
+--- 7894,7900 ----
+ int inputdialog,
+ int secret)
+ {
+! char_u *prompt = tv_get_string_chk(&argvars[0]);
+ char_u *p = NULL;
+ int c;
+ char_u buf[NUMBUFLEN];
+***************
+*** 7937,7943 ****
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! defstr = get_tv_string_buf_chk(&argvars[1], buf);
+ if (defstr != NULL)
+ stuffReadbuffSpec(defstr);
+
+--- 7937,7943 ----
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! defstr = tv_get_string_buf_chk(&argvars[1], buf);
+ if (defstr != NULL)
+ stuffReadbuffSpec(defstr);
+
+***************
+*** 7950,7956 ****
+ /* input() with a third argument: completion */
+ rettv->vval.v_string = NULL;
+
+! xp_name = get_tv_string_buf_chk(&argvars[2], buf);
+ if (xp_name == NULL)
+ return;
+
+--- 7950,7956 ----
+ /* input() with a third argument: completion */
+ rettv->vval.v_string = NULL;
+
+! xp_name = tv_get_string_buf_chk(&argvars[2], buf);
+ if (xp_name == NULL)
+ return;
+
+***************
+*** 7975,7981 ****
+ if (inputdialog && rettv->vval.v_string == NULL
+ && argvars[1].v_type != VAR_UNKNOWN
+ && argvars[2].v_type != VAR_UNKNOWN)
+! rettv->vval.v_string = vim_strsave(get_tv_string_buf(
+ &argvars[2], buf));
+
+ vim_free(xp_arg);
+--- 7975,7981 ----
+ if (inputdialog && rettv->vval.v_string == NULL
+ && argvars[1].v_type != VAR_UNKNOWN
+ && argvars[2].v_type != VAR_UNKNOWN)
+! rettv->vval.v_string = vim_strsave(tv_get_string_buf(
+ &argvars[2], buf));
+
+ vim_free(xp_arg);
+***************
+*** 8142,8148 ****
+
+ if (!eap->skip)
+ {
+! p = get_tv_string(&rettv);
+ len = (int)STRLEN(p);
+ if (ga_grow(&ga, len + 2) == FAIL)
+ {
+--- 8142,8148 ----
+
+ if (!eap->skip)
+ {
+! p = tv_get_string(&rettv);
+ len = (int)STRLEN(p);
+ if (ga_grow(&ga, len + 2) == FAIL)
+ {
+***************
+*** 8205,8211 ****
+ 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;
+--- 8205,8211 ----
+ tabpage_T *tp) /* NULL for current tab page */
+ {
+ win_T *wp;
+! int nr = (int)tv_get_number_chk(vp, NULL);
+
+ if (nr < 0)
+ return NULL;
+***************
+*** 8234,8240 ****
+ 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);
+--- 8234,8240 ----
+ win_T *
+ find_win_by_nr_or_id(typval_T *vp)
+ {
+! int nr = (int)tv_get_number_chk(vp, NULL);
+
+ if (nr >= LOWEST_WIN_ID)
+ return win_id2wp(vp);
+***************
+*** 8257,8263 ****
+ {
+ if (tvp->v_type != VAR_UNKNOWN)
+ {
+! n = (long)get_tv_number(tvp);
+ if (n >= 0)
+ tp = find_tabpage(n);
+ }
+--- 8257,8263 ----
+ {
+ if (tvp->v_type != VAR_UNKNOWN)
+ {
+! n = (long)tv_get_number(tvp);
+ if (n >= 0)
+ tp = find_tabpage(n);
+ }
+***************
+*** 8292,8302 ****
+ int need_switch_win;
+
+ if (off == 1)
+! tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
+ else
+ tp = curtab;
+ win = find_win_by_nr(&argvars[off], tp);
+! varname = get_tv_string_chk(&argvars[off + 1]);
+ ++emsg_off;
+
+ rettv->v_type = VAR_STRING;
+--- 8292,8302 ----
+ int need_switch_win;
+
+ if (off == 1)
+! tp = find_tabpage((int)tv_get_number_chk(&argvars[0], NULL));
+ else
+ tp = curtab;
+ win = find_win_by_nr(&argvars[off], tp);
+! varname = tv_get_string_chk(&argvars[off + 1]);
+ ++emsg_off;
+
+ rettv->v_type = VAR_STRING;
+***************
+*** 8373,8383 ****
+ return;
+
+ if (off == 1)
+! tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
+ else
+ tp = curtab;
+ win = find_win_by_nr(&argvars[off], tp);
+! varname = get_tv_string_chk(&argvars[off + 1]);
+ varp = &argvars[off + 2];
+
+ if (win != NULL && varname != NULL && varp != NULL)
+--- 8373,8383 ----
+ return;
+
+ if (off == 1)
+! tp = find_tabpage((int)tv_get_number_chk(&argvars[0], NULL));
+ else
+ tp = curtab;
+ win = find_win_by_nr(&argvars[off], tp);
+! varname = tv_get_string_chk(&argvars[off + 1]);
+ varp = &argvars[off + 2];
+
+ if (win != NULL && varname != NULL && varp != NULL)
+***************
+*** 8393,8400 ****
+ int error = FALSE;
+
+ ++varname;
+! numval = (long)get_tv_number_chk(varp, &error);
+! strval = get_tv_string_buf_chk(varp, nbuf);
+ if (!error && strval != NULL)
+ set_option_value(varname, numval, strval, OPT_LOCAL);
+ }
+--- 8393,8400 ----
+ int error = FALSE;
+
+ ++varname;
+! numval = (long)tv_get_number_chk(varp, &error);
+! strval = tv_get_string_buf_chk(varp, nbuf);
+ if (!error && strval != NULL)
+ set_option_value(varname, numval, strval, OPT_LOCAL);
+ }
+***************
+*** 8697,8703 ****
+ {
+ /* Escape special characters with a backslash. Turn a LF and
+ * CR into \n and \r. */
+! p = vim_strsave_escaped(get_tv_string(&this_var->di_tv),
+ (char_u *)"\\\"\n\r");
+ if (p == NULL) /* out of memory */
+ break;
+--- 8697,8703 ----
+ {
+ /* Escape special characters with a backslash. Turn a LF and
+ * CR into \n and \r. */
+! p = vim_strsave_escaped(tv_get_string(&this_var->di_tv),
+ (char_u *)"\\\"\n\r");
+ if (p == NULL) /* out of memory */
+ break;
+***************
+*** 8842,8849 ****
+ {
+ char_u buf1[NUMBUFLEN];
+ char_u buf2[NUMBUFLEN];
+! char_u *fname1 = get_tv_string_buf_chk(&argvars[0], buf1);
+! char_u *fname2 = get_tv_string_buf_chk(&argvars[1], buf2);
+ garray_T ga;
+ FILE *fd1;
+ FILE *fd2;
+--- 8842,8849 ----
+ {
+ char_u buf1[NUMBUFLEN];
+ char_u buf2[NUMBUFLEN];
+! char_u *fname1 = tv_get_string_buf_chk(&argvars[0], buf1);
+! char_u *fname2 = tv_get_string_buf_chk(&argvars[1], buf2);
+ garray_T ga;
+ FILE *fd1;
+ FILE *fd2;
+***************
+*** 8914,8921 ****
+ garray_T ga;
+ char_u buf1[NUMBUFLEN];
+ char_u buf2[NUMBUFLEN];
+! char_u *pat = get_tv_string_buf_chk(&argvars[0], buf1);
+! char_u *text = get_tv_string_buf_chk(&argvars[1], buf2);
+
+ if (pat == NULL || text == NULL)
+ EMSG(_(e_invarg));
+--- 8914,8921 ----
+ garray_T ga;
+ char_u buf1[NUMBUFLEN];
+ char_u buf2[NUMBUFLEN];
+! char_u *pat = tv_get_string_buf_chk(&argvars[0], buf1);
+! char_u *text = tv_get_string_buf_chk(&argvars[1], buf2);
+
+ if (pat == NULL || text == NULL)
+ EMSG(_(e_invarg));
+***************
+*** 8936,8944 ****
+ {
+ garray_T ga;
+ int error = FALSE;
+! varnumber_T lower = get_tv_number_chk(&argvars[0], &error);
+! varnumber_T upper = get_tv_number_chk(&argvars[1], &error);
+! varnumber_T actual = get_tv_number_chk(&argvars[2], &error);
+ char_u *tofree;
+ char msg[200];
+ char_u numbuf[NUMBUFLEN];
+--- 8936,8944 ----
+ {
+ garray_T ga;
+ int error = FALSE;
+! varnumber_T lower = tv_get_number_chk(&argvars[0], &error);
+! varnumber_T upper = tv_get_number_chk(&argvars[1], &error);
+! varnumber_T actual = tv_get_number_chk(&argvars[2], &error);
+ char_u *tofree;
+ char msg[200];
+ char_u numbuf[NUMBUFLEN];
+***************
+*** 8980,8986 ****
+ && argvars[0].vval.v_number == (isTrue ? VVAL_TRUE : VVAL_FALSE))
+ return 0;
+ if (argvars[0].v_type != VAR_NUMBER
+! || (get_tv_number_chk(&argvars[0], &error) == 0) == isTrue
+ || error)
+ {
+ prepare_assert_error(&ga);
+--- 8980,8986 ----
+ && argvars[0].vval.v_number == (isTrue ? VVAL_TRUE : VVAL_FALSE))
+ return 0;
+ if (argvars[0].v_type != VAR_NUMBER
+! || (tv_get_number_chk(&argvars[0], &error) == 0) == isTrue
+ || error)
+ {
+ prepare_assert_error(&ga);
+***************
+*** 9000,9006 ****
+ garray_T ga;
+
+ prepare_assert_error(&ga);
+! ga_concat(&ga, get_tv_string(&argvars[0]));
+ assert_error(&ga);
+ ga_clear(&ga);
+ return 1;
+--- 9000,9006 ----
+ garray_T ga;
+
+ prepare_assert_error(&ga);
+! ga_concat(&ga, tv_get_string(&argvars[0]));
+ assert_error(&ga);
+ ga_clear(&ga);
+ return 1;
+***************
+*** 9010,9016 ****
+ assert_exception(typval_T *argvars)
+ {
+ garray_T ga;
+! char_u *error = get_tv_string_chk(&argvars[0]);
+
+ if (vimvars[VV_EXCEPTION].vv_str == NULL)
+ {
+--- 9010,9016 ----
+ assert_exception(typval_T *argvars)
+ {
+ garray_T ga;
+! char_u *error = tv_get_string_chk(&argvars[0]);
+
+ if (vimvars[VV_EXCEPTION].vv_str == NULL)
+ {
+***************
+*** 9036,9042 ****
+ int
+ assert_beeps(typval_T *argvars)
+ {
+! char_u *cmd = get_tv_string_chk(&argvars[0]);
+ garray_T ga;
+ int ret = 0;
+
+--- 9036,9042 ----
+ int
+ assert_beeps(typval_T *argvars)
+ {
+! char_u *cmd = tv_get_string_chk(&argvars[0]);
+ garray_T ga;
+ int ret = 0;
+
+***************
+*** 9062,9068 ****
+ int
+ assert_fails(typval_T *argvars)
+ {
+! char_u *cmd = get_tv_string_chk(&argvars[0]);
+ garray_T ga;
+ int ret = 0;
+ char_u numbuf[NUMBUFLEN];
+--- 9062,9068 ----
+ int
+ assert_fails(typval_T *argvars)
+ {
+! char_u *cmd = tv_get_string_chk(&argvars[0]);
+ garray_T ga;
+ int ret = 0;
+ char_u numbuf[NUMBUFLEN];
+***************
+*** 9091,9097 ****
+ else if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+ char_u buf[NUMBUFLEN];
+! char *error = (char *)get_tv_string_buf_chk(&argvars[1], buf);
+
+ if (error == NULL
+ || strstr((char *)vimvars[VV_ERRMSG].vv_str, error) == NULL)
+--- 9091,9097 ----
+ else if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+ char_u buf[NUMBUFLEN];
+! char *error = (char *)tv_get_string_buf_chk(&argvars[1], buf);
+
+ if (error == NULL
+ || strstr((char *)vimvars[VV_ERRMSG].vv_str, error) == NULL)
+***************
+*** 9325,9335 ****
+ if (typ1->v_type == VAR_FLOAT)
+ f1 = typ1->vval.v_float;
+ else
+! f1 = get_tv_number(typ1);
+ if (typ2->v_type == VAR_FLOAT)
+ f2 = typ2->vval.v_float;
+ else
+! f2 = get_tv_number(typ2);
+ n1 = FALSE;
+ switch (type)
+ {
+--- 9325,9335 ----
+ if (typ1->v_type == VAR_FLOAT)
+ f1 = typ1->vval.v_float;
+ else
+! f1 = tv_get_number(typ1);
+ if (typ2->v_type == VAR_FLOAT)
+ f2 = typ2->vval.v_float;
+ else
+! f2 = tv_get_number(typ2);
+ n1 = FALSE;
+ switch (type)
+ {
+***************
+*** 9353,9360 ****
+ else if ((typ1->v_type == VAR_NUMBER || typ2->v_type == VAR_NUMBER)
+ && type != TYPE_MATCH && type != TYPE_NOMATCH)
+ {
+! n1 = get_tv_number(typ1);
+! n2 = get_tv_number(typ2);
+ switch (type)
+ {
+ case TYPE_EQUAL: n1 = (n1 == n2); break;
+--- 9353,9360 ----
+ else if ((typ1->v_type == VAR_NUMBER || typ2->v_type == VAR_NUMBER)
+ && type != TYPE_MATCH && type != TYPE_NOMATCH)
+ {
+! n1 = tv_get_number(typ1);
+! n2 = tv_get_number(typ2);
+ switch (type)
+ {
+ case TYPE_EQUAL: n1 = (n1 == n2); break;
+***************
+*** 9370,9377 ****
+ }
+ else
+ {
+! s1 = get_tv_string_buf(typ1, buf1);
+! s2 = get_tv_string_buf(typ2, buf2);
+ if (type != TYPE_MATCH && type != TYPE_NOMATCH)
+ i = ic ? MB_STRICMP(s1, s2) : STRCMP(s1, s2);
+ else
+--- 9370,9377 ----
+ }
+ else
+ {
+! s1 = tv_get_string_buf(typ1, buf1);
+! s2 = tv_get_string_buf(typ2, buf2);
+ if (type != TYPE_MATCH && type != TYPE_NOMATCH)
+ i = ic ? MB_STRICMP(s1, s2) : STRCMP(s1, s2);
+ else
+***************
+*** 10220,10229 ****
+ int error = FALSE;
+
+ /* filter(): when expr is zero remove the item */
+! *remp = (get_tv_number_chk(&rettv, &error) == 0);
+ clear_tv(&rettv);
+ /* On type error, nothing has been removed; return FAIL to stop the
+! * loop. The error message was given by get_tv_number_chk(). */
+ if (error)
+ goto theend;
+ }
+--- 10220,10229 ----
+ int error = FALSE;
+
+ /* filter(): when expr is zero remove the item */
+! *remp = (tv_get_number_chk(&rettv, &error) == 0);
+ clear_tv(&rettv);
+ /* On type error, nothing has been removed; return FAIL to stop the
+! * loop. The error message was given by tv_get_number_chk(). */
+ if (error)
+ goto theend;
+ }
+*** ../vim-8.1.0614/src/proto/eval.pro 2018-10-25 12:30:52.274659868 +0200
+--- src/proto/eval.pro 2018-12-21 16:01:29.181557577 +0100
+***************
+*** 82,94 ****
+ void free_tv(typval_T *varp);
+ void clear_tv(typval_T *varp);
+ void init_tv(typval_T *varp);
+! varnumber_T get_tv_number(typval_T *varp);
+! varnumber_T get_tv_number_chk(typval_T *varp, int *denote);
+! float_T get_tv_float(typval_T *varp);
+! char_u *get_tv_string(typval_T *varp);
+! char_u *get_tv_string_buf(typval_T *varp, char_u *buf);
+! char_u *get_tv_string_chk(typval_T *varp);
+! char_u *get_tv_string_buf_chk(typval_T *varp, char_u *buf);
+ dictitem_T *find_var(char_u *name, hashtab_T **htp, int no_autoload);
+ dictitem_T *find_var_in_ht(hashtab_T *ht, int htname, char_u *varname, int no_autoload);
+ hashtab_T *find_var_ht(char_u *name, char_u **varname);
+--- 82,94 ----
+ void free_tv(typval_T *varp);
+ void clear_tv(typval_T *varp);
+ void init_tv(typval_T *varp);
+! varnumber_T tv_get_number(typval_T *varp);
+! varnumber_T tv_get_number_chk(typval_T *varp, int *denote);
+! float_T tv_get_float(typval_T *varp);
+! char_u *tv_get_string(typval_T *varp);
+! char_u *tv_get_string_buf(typval_T *varp, char_u *buf);
+! char_u *tv_get_string_chk(typval_T *varp);
+! char_u *tv_get_string_buf_chk(typval_T *varp, char_u *buf);
+ dictitem_T *find_var(char_u *name, hashtab_T **htp, int no_autoload);
+ dictitem_T *find_var_in_ht(hashtab_T *ht, int htname, char_u *varname, int no_autoload);
+ hashtab_T *find_var_ht(char_u *name, char_u **varname);
+*** ../vim-8.1.0614/src/channel.c 2018-12-14 21:31:58.008319718 +0100
+--- src/channel.c 2018-12-21 15:59:11.838468714 +0100
+***************
+*** 938,944 ****
+ jobopt_T opt;
+ channel_T *channel = NULL;
+
+! address = get_tv_string(&argvars[0]);
+ if (argvars[1].v_type != VAR_UNKNOWN
+ && (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL))
+ {
+--- 938,944 ----
+ jobopt_T opt;
+ channel_T *channel = NULL;
+
+! address = tv_get_string(&argvars[0]);
+ if (argvars[1].v_type != VAR_UNKNOWN
+ && (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL))
+ {
+***************
+*** 4003,4009 ****
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+! text = get_tv_string_buf(&argvars[1], buf);
+ channel = send_common(argvars, text, 0, eval, &opt,
+ eval ? "ch_evalraw" : "ch_sendraw", &part_read);
+ if (channel != NULL && eval)
+--- 4003,4009 ----
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+! text = tv_get_string_buf(&argvars[1], buf);
+ channel = send_common(argvars, text, 0, eval, &opt,
+ eval ? "ch_evalraw" : "ch_sendraw", &part_read);
+ if (channel != NULL && eval)
+***************
+*** 4402,4408 ****
+ static int
+ handle_mode(typval_T *item, jobopt_T *opt, ch_mode_T *modep, int jo)
+ {
+! char_u *val = get_tv_string(item);
+
+ opt->jo_set |= jo;
+ if (STRCMP(val, "nl") == 0)
+--- 4402,4408 ----
+ static int
+ handle_mode(typval_T *item, jobopt_T *opt, ch_mode_T *modep, int jo)
+ {
+! char_u *val = tv_get_string(item);
+
+ opt->jo_set |= jo;
+ if (STRCMP(val, "nl") == 0)
+***************
+*** 4424,4430 ****
+ static int
+ handle_io(typval_T *item, ch_part_T part, jobopt_T *opt)
+ {
+! char_u *val = get_tv_string(item);
+
+ opt->jo_set |= JO_OUT_IO << (part - PART_OUT);
+ if (STRCMP(val, "null") == 0)
+--- 4424,4430 ----
+ static int
+ handle_io(typval_T *item, ch_part_T part, jobopt_T *opt)
+ {
+! char_u *val = tv_get_string(item);
+
+ opt->jo_set |= JO_OUT_IO << (part - PART_OUT);
+ if (STRCMP(val, "null") == 0)
+***************
+*** 4561,4567 ****
+ {
+ 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
+--- 4561,4567 ----
+ {
+ if (!(supported & JO_MODE))
+ break;
+! opt->jo_noblock = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "in_io") == 0
+ || STRCMP(hi->hi_key, "out_io") == 0
+***************
+*** 4582,4594 ****
+ break;
+ opt->jo_set |= JO_OUT_NAME << (part - PART_OUT);
+ opt->jo_io_name[part] =
+! get_tv_string_buf_chk(item, opt->jo_io_name_buf[part]);
+ }
+ else if (STRCMP(hi->hi_key, "pty") == 0)
+ {
+ if (!(supported & JO_MODE))
+ break;
+! opt->jo_pty = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "in_buf") == 0
+ || STRCMP(hi->hi_key, "out_buf") == 0
+--- 4582,4594 ----
+ break;
+ opt->jo_set |= JO_OUT_NAME << (part - PART_OUT);
+ opt->jo_io_name[part] =
+! tv_get_string_buf_chk(item, opt->jo_io_name_buf[part]);
+ }
+ else if (STRCMP(hi->hi_key, "pty") == 0)
+ {
+ if (!(supported & JO_MODE))
+ break;
+! opt->jo_pty = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "in_buf") == 0
+ || STRCMP(hi->hi_key, "out_buf") == 0
+***************
+*** 4599,4608 ****
+ if (!(supported & JO_OUT_IO))
+ break;
+ opt->jo_set |= JO_OUT_BUF << (part - PART_OUT);
+! opt->jo_io_buf[part] = get_tv_number(item);
+ if (opt->jo_io_buf[part] <= 0)
+ {
+! EMSG3(_(e_invargNval), hi->hi_key, get_tv_string(item));
+ return FAIL;
+ }
+ if (buflist_findnr(opt->jo_io_buf[part]) == NULL)
+--- 4599,4608 ----
+ if (!(supported & JO_OUT_IO))
+ break;
+ opt->jo_set |= JO_OUT_BUF << (part - PART_OUT);
+! opt->jo_io_buf[part] = tv_get_number(item);
+ if (opt->jo_io_buf[part] <= 0)
+ {
+! EMSG3(_(e_invargNval), hi->hi_key, tv_get_string(item));
+ return FAIL;
+ }
+ if (buflist_findnr(opt->jo_io_buf[part]) == NULL)
+***************
+*** 4619,4625 ****
+ if (!(supported & JO_OUT_IO))
+ break;
+ opt->jo_set |= JO_OUT_MODIFIABLE << (part - PART_OUT);
+! opt->jo_modifiable[part] = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "out_msg") == 0
+ || STRCMP(hi->hi_key, "err_msg") == 0)
+--- 4619,4625 ----
+ if (!(supported & JO_OUT_IO))
+ break;
+ opt->jo_set |= JO_OUT_MODIFIABLE << (part - PART_OUT);
+! opt->jo_modifiable[part] = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "out_msg") == 0
+ || STRCMP(hi->hi_key, "err_msg") == 0)
+***************
+*** 4629,4635 ****
+ if (!(supported & JO_OUT_IO))
+ break;
+ opt->jo_set2 |= JO2_OUT_MSG << (part - PART_OUT);
+! opt->jo_message[part] = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "in_top") == 0
+ || STRCMP(hi->hi_key, "in_bot") == 0)
+--- 4629,4635 ----
+ if (!(supported & JO_OUT_IO))
+ break;
+ opt->jo_set2 |= JO2_OUT_MSG << (part - PART_OUT);
+! opt->jo_message[part] = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "in_top") == 0
+ || STRCMP(hi->hi_key, "in_bot") == 0)
+***************
+*** 4648,4657 ****
+ lp = &opt->jo_in_bot;
+ opt->jo_set |= JO_IN_BOT;
+ }
+! *lp = get_tv_number(item);
+ if (*lp < 0)
+ {
+! EMSG3(_(e_invargNval), hi->hi_key, get_tv_string(item));
+ return FAIL;
+ }
+ }
+--- 4648,4657 ----
+ lp = &opt->jo_in_bot;
+ opt->jo_set |= JO_IN_BOT;
+ }
+! *lp = tv_get_number(item);
+ if (*lp < 0)
+ {
+! EMSG3(_(e_invargNval), hi->hi_key, tv_get_string(item));
+ return FAIL;
+ }
+ }
+***************
+*** 4718,4724 ****
+ else if (STRCMP(hi->hi_key, "drop") == 0)
+ {
+ int never = FALSE;
+! val = get_tv_string(item);
+
+ if (STRCMP(val, "never") == 0)
+ never = TRUE;
+--- 4718,4724 ----
+ else if (STRCMP(hi->hi_key, "drop") == 0)
+ {
+ int never = FALSE;
+! val = tv_get_string(item);
+
+ if (STRCMP(val, "never") == 0)
+ never = TRUE;
+***************
+*** 4747,4753 ****
+ if (!(supported2 & JO2_TERM_NAME))
+ break;
+ opt->jo_set2 |= JO2_TERM_NAME;
+! opt->jo_term_name = get_tv_string_chk(item);
+ if (opt->jo_term_name == NULL)
+ {
+ EMSG2(_(e_invargval), "term_name");
+--- 4747,4753 ----
+ if (!(supported2 & JO2_TERM_NAME))
+ break;
+ opt->jo_set2 |= JO2_TERM_NAME;
+! opt->jo_term_name = tv_get_string_chk(item);
+ if (opt->jo_term_name == NULL)
+ {
+ EMSG2(_(e_invargval), "term_name");
+***************
+*** 4758,4764 ****
+ {
+ if (!(supported2 & JO2_TERM_FINISH))
+ break;
+! val = get_tv_string(item);
+ if (STRCMP(val, "open") != 0 && STRCMP(val, "close") != 0)
+ {
+ EMSG3(_(e_invargNval), "term_finish", val);
+--- 4758,4764 ----
+ {
+ if (!(supported2 & JO2_TERM_FINISH))
+ break;
+! val = tv_get_string(item);
+ if (STRCMP(val, "open") != 0 && STRCMP(val, "close") != 0)
+ {
+ EMSG3(_(e_invargNval), "term_finish", val);
+***************
+*** 4774,4780 ****
+ if (!(supported2 & JO2_TERM_OPENCMD))
+ break;
+ opt->jo_set2 |= JO2_TERM_OPENCMD;
+! p = opt->jo_term_opencmd = get_tv_string_chk(item);
+ if (p != NULL)
+ {
+ /* Must have %d and no other %. */
+--- 4774,4780 ----
+ if (!(supported2 & JO2_TERM_OPENCMD))
+ break;
+ opt->jo_set2 |= JO2_TERM_OPENCMD;
+! p = opt->jo_term_opencmd = tv_get_string_chk(item);
+ if (p != NULL)
+ {
+ /* Must have %d and no other %. */
+***************
+*** 4796,4802 ****
+ if (!(supported2 & JO2_EOF_CHARS))
+ break;
+ opt->jo_set2 |= JO2_EOF_CHARS;
+! p = opt->jo_eof_chars = get_tv_string_chk(item);
+ if (p == NULL)
+ {
+ EMSG2(_(e_invargval), "eof_chars");
+--- 4796,4802 ----
+ if (!(supported2 & JO2_EOF_CHARS))
+ break;
+ opt->jo_set2 |= JO2_EOF_CHARS;
+! p = opt->jo_eof_chars = tv_get_string_chk(item);
+ if (p == NULL)
+ {
+ EMSG2(_(e_invargval), "eof_chars");
+***************
+*** 4808,4861 ****
+ if (!(supported2 & JO2_TERM_ROWS))
+ break;
+ opt->jo_set2 |= JO2_TERM_ROWS;
+! opt->jo_term_rows = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "term_cols") == 0)
+ {
+ if (!(supported2 & JO2_TERM_COLS))
+ break;
+ opt->jo_set2 |= JO2_TERM_COLS;
+! opt->jo_term_cols = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "vertical") == 0)
+ {
+ if (!(supported2 & JO2_VERTICAL))
+ break;
+ opt->jo_set2 |= JO2_VERTICAL;
+! opt->jo_vertical = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "curwin") == 0)
+ {
+ if (!(supported2 & JO2_CURWIN))
+ break;
+ opt->jo_set2 |= JO2_CURWIN;
+! opt->jo_curwin = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "hidden") == 0)
+ {
+ if (!(supported2 & JO2_HIDDEN))
+ break;
+ opt->jo_set2 |= JO2_HIDDEN;
+! opt->jo_hidden = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "norestore") == 0)
+ {
+ if (!(supported2 & JO2_NORESTORE))
+ break;
+ opt->jo_set2 |= JO2_NORESTORE;
+! opt->jo_term_norestore = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "term_kill") == 0)
+ {
+ if (!(supported2 & JO2_TERM_KILL))
+ break;
+ opt->jo_set2 |= JO2_TERM_KILL;
+! opt->jo_term_kill = get_tv_string_chk(item);
+ }
+ # if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ else if (STRCMP(hi->hi_key, "ansi_colors") == 0)
+ {
+! int n = 0;
+ listitem_T *li;
+ long_u rgb[16];
+
+--- 4808,4861 ----
+ if (!(supported2 & JO2_TERM_ROWS))
+ break;
+ opt->jo_set2 |= JO2_TERM_ROWS;
+! opt->jo_term_rows = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "term_cols") == 0)
+ {
+ if (!(supported2 & JO2_TERM_COLS))
+ break;
+ opt->jo_set2 |= JO2_TERM_COLS;
+! opt->jo_term_cols = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "vertical") == 0)
+ {
+ if (!(supported2 & JO2_VERTICAL))
+ break;
+ opt->jo_set2 |= JO2_VERTICAL;
+! opt->jo_vertical = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "curwin") == 0)
+ {
+ if (!(supported2 & JO2_CURWIN))
+ break;
+ opt->jo_set2 |= JO2_CURWIN;
+! opt->jo_curwin = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "hidden") == 0)
+ {
+ if (!(supported2 & JO2_HIDDEN))
+ break;
+ opt->jo_set2 |= JO2_HIDDEN;
+! opt->jo_hidden = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "norestore") == 0)
+ {
+ if (!(supported2 & JO2_NORESTORE))
+ break;
+ opt->jo_set2 |= JO2_NORESTORE;
+! opt->jo_term_norestore = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "term_kill") == 0)
+ {
+ if (!(supported2 & JO2_TERM_KILL))
+ break;
+ opt->jo_set2 |= JO2_TERM_KILL;
+! opt->jo_term_kill = tv_get_string_chk(item);
+ }
+ # if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ else if (STRCMP(hi->hi_key, "ansi_colors") == 0)
+ {
+! int n = 0;
+ listitem_T *li;
+ long_u rgb[16];
+
+***************
+*** 4873,4881 ****
+ for (; li != NULL && n < 16; li = li->li_next, n++)
+ {
+ char_u *color_name;
+! guicolor_T guicolor;
+
+! color_name = get_tv_string_chk(&li->li_tv);
+ if (color_name == NULL)
+ return FAIL;
+
+--- 4873,4881 ----
+ for (; li != NULL && n < 16; li = li->li_next, n++)
+ {
+ char_u *color_name;
+! guicolor_T guicolor;
+
+! color_name = tv_get_string_chk(&li->li_tv);
+ if (color_name == NULL)
+ return FAIL;
+
+***************
+*** 4915,4921 ****
+ {
+ 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)
+ #ifndef WIN32 // Win32 directories don't have the concept of "executable"
+ || mch_access((char *)opt->jo_cwd, X_OK) != 0
+--- 4915,4921 ----
+ {
+ if (!(supported2 & JO2_CWD))
+ break;
+! opt->jo_cwd = tv_get_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
+***************
+*** 4932,4966 ****
+ if (!(supported & JO_WAITTIME))
+ break;
+ opt->jo_set |= JO_WAITTIME;
+! opt->jo_waittime = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "timeout") == 0)
+ {
+ if (!(supported & JO_TIMEOUT))
+ break;
+ opt->jo_set |= JO_TIMEOUT;
+! opt->jo_timeout = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "out_timeout") == 0)
+ {
+ if (!(supported & JO_OUT_TIMEOUT))
+ break;
+ opt->jo_set |= JO_OUT_TIMEOUT;
+! opt->jo_out_timeout = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "err_timeout") == 0)
+ {
+ if (!(supported & JO_ERR_TIMEOUT))
+ break;
+ opt->jo_set |= JO_ERR_TIMEOUT;
+! opt->jo_err_timeout = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "part") == 0)
+ {
+ if (!(supported & JO_PART))
+ break;
+ opt->jo_set |= JO_PART;
+! val = get_tv_string(item);
+ if (STRCMP(val, "err") == 0)
+ opt->jo_part = PART_ERR;
+ else if (STRCMP(val, "out") == 0)
+--- 4932,4966 ----
+ if (!(supported & JO_WAITTIME))
+ break;
+ opt->jo_set |= JO_WAITTIME;
+! opt->jo_waittime = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "timeout") == 0)
+ {
+ if (!(supported & JO_TIMEOUT))
+ break;
+ opt->jo_set |= JO_TIMEOUT;
+! opt->jo_timeout = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "out_timeout") == 0)
+ {
+ if (!(supported & JO_OUT_TIMEOUT))
+ break;
+ opt->jo_set |= JO_OUT_TIMEOUT;
+! opt->jo_out_timeout = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "err_timeout") == 0)
+ {
+ if (!(supported & JO_ERR_TIMEOUT))
+ break;
+ opt->jo_set |= JO_ERR_TIMEOUT;
+! opt->jo_err_timeout = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "part") == 0)
+ {
+ if (!(supported & JO_PART))
+ break;
+ opt->jo_set |= JO_PART;
+! val = tv_get_string(item);
+ if (STRCMP(val, "err") == 0)
+ opt->jo_part = PART_ERR;
+ else if (STRCMP(val, "out") == 0)
+***************
+*** 4976,4989 ****
+ if (!(supported & JO_ID))
+ break;
+ opt->jo_set |= JO_ID;
+! opt->jo_id = get_tv_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "stoponexit") == 0)
+ {
+ if (!(supported & JO_STOPONEXIT))
+ break;
+ opt->jo_set |= JO_STOPONEXIT;
+! opt->jo_stoponexit = get_tv_string_buf_chk(item,
+ opt->jo_soe_buf);
+ if (opt->jo_stoponexit == NULL)
+ {
+--- 4976,4989 ----
+ if (!(supported & JO_ID))
+ break;
+ opt->jo_set |= JO_ID;
+! opt->jo_id = tv_get_number(item);
+ }
+ else if (STRCMP(hi->hi_key, "stoponexit") == 0)
+ {
+ if (!(supported & JO_STOPONEXIT))
+ break;
+ opt->jo_set |= JO_STOPONEXIT;
+! opt->jo_stoponexit = tv_get_string_buf_chk(item,
+ opt->jo_soe_buf);
+ if (opt->jo_stoponexit == NULL)
+ {
+***************
+*** 4996,5002 ****
+ if (!(supported & JO_BLOCK_WRITE))
+ break;
+ opt->jo_set |= JO_BLOCK_WRITE;
+! opt->jo_block_write = get_tv_number(item);
+ }
+ else
+ break;
+--- 4996,5002 ----
+ if (!(supported & JO_BLOCK_WRITE))
+ break;
+ opt->jo_set |= JO_BLOCK_WRITE;
+! opt->jo_block_write = tv_get_number(item);
+ }
+ else
+ break;
+***************
+*** 5035,5041 ****
+ }
+ else
+ {
+! EMSG2(_(e_invarg2), get_tv_string(tv));
+ return NULL;
+ }
+ if (channel != NULL && reading)
+--- 5035,5041 ----
+ }
+ else
+ {
+! EMSG2(_(e_invarg2), tv_get_string(tv));
+ return NULL;
+ }
+ if (channel != NULL && reading)
+***************
+*** 5262,5268 ****
+
+ for (li = l->lv_first; li != NULL; li = li->li_next)
+ {
+! s = get_tv_string_chk(&li->li_tv);
+ if (s == NULL)
+ return FAIL;
+ s = win32_escape_arg(s);
+--- 5262,5268 ----
+
+ for (li = l->lv_first; li != NULL; li = li->li_next)
+ {
+! s = tv_get_string_chk(&li->li_tv);
+ if (s == NULL)
+ return FAIL;
+ s = win32_escape_arg(s);
+***************
+*** 5832,5838 ****
+ arg = (char_u *)"";
+ else
+ {
+! arg = get_tv_string_chk(&argvars[1]);
+ if (arg == NULL)
+ {
+ EMSG(_(e_invarg));
+--- 5832,5838 ----
+ arg = (char_u *)"";
+ else
+ {
+! arg = tv_get_string_chk(&argvars[1]);
+ if (arg == NULL)
+ {
+ EMSG(_(e_invarg));
+*** ../vim-8.1.0614/src/dict.c 2018-12-14 15:38:28.323597695 +0100
+--- src/dict.c 2018-12-21 15:57:01.811321106 +0100
+***************
+*** 495,501 ****
+ di = dict_find(d, key, -1);
+ if (di == NULL)
+ return NULL;
+! s = get_tv_string(&di->di_tv);
+ if (save && s != NULL)
+ s = vim_strsave(s);
+ return s;
+--- 495,501 ----
+ di = dict_find(d, key, -1);
+ if (di == NULL)
+ return NULL;
+! s = tv_get_string(&di->di_tv);
+ if (save && s != NULL)
+ s = vim_strsave(s);
+ return s;
+***************
+*** 513,519 ****
+ di = dict_find(d, key, -1);
+ if (di == NULL)
+ return 0;
+! return get_tv_number(&di->di_tv);
+ }
+
+ /*
+--- 513,519 ----
+ di = dict_find(d, key, -1);
+ if (di == NULL)
+ return 0;
+! return tv_get_number(&di->di_tv);
+ }
+
+ /*
+***************
+*** 630,639 ****
+ }
+ if (evaluate)
+ {
+! key = get_tv_string_buf_chk(&tvkey, buf);
+ if (key == NULL)
+ {
+! /* "key" is NULL when get_tv_string_buf_chk() gave an errmsg */
+ clear_tv(&tvkey);
+ goto failret;
+ }
+--- 630,639 ----
+ }
+ if (evaluate)
+ {
+! key = tv_get_string_buf_chk(&tvkey, buf);
+ if (key == NULL)
+ {
+! /* "key" is NULL when tv_get_string_buf_chk() gave an errmsg */
+ clear_tv(&tvkey);
+ goto failret;
+ }
+*** ../vim-8.1.0614/src/evalfunc.c 2018-12-21 15:16:57.479579788 +0100
+--- src/evalfunc.c 2018-12-21 16:00:34.913918741 +0100
+***************
+*** 1133,1144 ****
+ * Returns -1 on error.
+ */
+ static linenr_T
+! get_tv_lnum(typval_T *argvars)
+ {
+ typval_T rettv;
+ linenr_T lnum;
+
+! lnum = (linenr_T)get_tv_number_chk(&argvars[0], NULL);
+ if (lnum == 0) /* no valid number, try using line() */
+ {
+ rettv.v_type = VAR_NUMBER;
+--- 1133,1144 ----
+ * Returns -1 on error.
+ */
+ static linenr_T
+! tv_get_lnum(typval_T *argvars)
+ {
+ typval_T rettv;
+ linenr_T lnum;
+
+! lnum = (linenr_T)tv_get_number_chk(&argvars[0], NULL);
+ if (lnum == 0) /* no valid number, try using line() */
+ {
+ rettv.v_type = VAR_NUMBER;
+***************
+*** 1149,1154 ****
+--- 1149,1170 ----
+ return lnum;
+ }
+
++ /*
++ * Get the lnum from the first argument.
++ * Also accepts "$", then "buf" is used.
++ * Returns 0 on error.
++ */
++ static linenr_T
++ tv_get_lnum_buf(typval_T *argvars, buf_T *buf)
++ {
++ if (argvars[0].v_type == VAR_STRING
++ && argvars[0].vval.v_string != NULL
++ && argvars[0].vval.v_string[0] == '$'
++ && buf != NULL)
++ return buf->b_ml.ml_line_count;
++ return (linenr_T)tv_get_number_chk(&argvars[0], NULL);
++ }
++
+ #ifdef FEAT_FLOAT
+ /*
+ * Get the float value of "argvars[0]" into "f".
+***************
+*** 1187,1193 ****
+ varnumber_T n;
+ int error = FALSE;
+
+! n = get_tv_number_chk(&argvars[0], &error);
+ if (error)
+ rettv->vval.v_number = -1;
+ else if (n > 0)
+--- 1203,1209 ----
+ varnumber_T n;
+ int error = FALSE;
+
+! n = tv_get_number_chk(&argvars[0], &error);
+ if (error)
+ rettv->vval.v_number = -1;
+ else if (n > 0)
+***************
+*** 1240,1263 ****
+ static void
+ f_and(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = get_tv_number_chk(&argvars[0], NULL)
+! & get_tv_number_chk(&argvars[1], NULL);
+! }
+!
+! /*
+! * Get the lnum from the first argument.
+! * Also accepts "$", then "buf" is used.
+! * Returns 0 on error.
+! */
+! static linenr_T
+! get_tv_lnum_buf(typval_T *argvars, buf_T *buf)
+! {
+! if (argvars[0].v_type == VAR_STRING
+! && argvars[0].vval.v_string != NULL
+! && argvars[0].vval.v_string[0] == '$'
+! && buf != NULL)
+! return buf->b_ml.ml_line_count;
+! return (linenr_T)get_tv_number_chk(&argvars[0], NULL);
+ }
+
+ /*
+--- 1256,1263 ----
+ static void
+ f_and(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = tv_get_number_chk(&argvars[0], NULL)
+! & tv_get_number_chk(&argvars[1], NULL);
+ }
+
+ /*
+***************
+*** 1330,1336 ****
+ li = l->lv_first;
+ }
+ else
+! line = get_tv_string_chk(lines);
+
+ /* default result is zero == OK */
+ for (;;)
+--- 1330,1336 ----
+ li = l->lv_first;
+ }
+ else
+! line = tv_get_string_chk(lines);
+
+ /* default result is zero == OK */
+ for (;;)
+***************
+*** 1340,1346 ****
+ /* list argument, get next string */
+ if (li == NULL)
+ break;
+! line = get_tv_string_chk(&li->li_tv);
+ li = li->li_next;
+ }
+
+--- 1340,1346 ----
+ /* list argument, get next string */
+ if (li == NULL)
+ break;
+! line = tv_get_string_chk(&li->li_tv);
+ li = li->li_next;
+ }
+
+***************
+*** 1411,1417 ****
+ static void
+ f_append(typval_T *argvars, typval_T *rettv)
+ {
+! linenr_T lnum = get_tv_lnum(&argvars[0]);
+
+ set_buffer_lines(curbuf, lnum, TRUE, &argvars[1], rettv);
+ }
+--- 1411,1417 ----
+ static void
+ f_append(typval_T *argvars, typval_T *rettv)
+ {
+! linenr_T lnum = tv_get_lnum(&argvars[0]);
+
+ set_buffer_lines(curbuf, lnum, TRUE, &argvars[1], rettv);
+ }
+***************
+*** 1430,1436 ****
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+ {
+! lnum = get_tv_lnum_buf(&argvars[1], buf);
+ set_buffer_lines(buf, lnum, TRUE, &argvars[2], rettv);
+ }
+ }
+--- 1430,1436 ----
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+ {
+! lnum = tv_get_lnum_buf(&argvars[1], buf);
+ set_buffer_lines(buf, lnum, TRUE, &argvars[2], rettv);
+ }
+ }
+***************
+*** 1447,1453 ****
+ // 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
+--- 1447,1453 ----
+ // use the current window
+ rettv->vval.v_number = ARGCOUNT;
+ else if (argvars[0].v_type == VAR_NUMBER
+! && tv_get_number(&argvars[0]) == -1)
+ // use the global argument list
+ rettv->vval.v_number = GARGCOUNT;
+ else
+***************
+*** 1516,1522 ****
+ argcount = ARGCOUNT;
+ }
+ else if (argvars[1].v_type == VAR_NUMBER
+! && get_tv_number(&argvars[1]) == -1)
+ {
+ arglist = GARGLIST;
+ argcount = GARGCOUNT;
+--- 1516,1522 ----
+ argcount = ARGCOUNT;
+ }
+ else if (argvars[1].v_type == VAR_NUMBER
+! && tv_get_number(&argvars[1]) == -1)
+ {
+ arglist = GARGLIST;
+ argcount = GARGCOUNT;
+***************
+*** 1535,1541 ****
+
+ 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)
+--- 1535,1541 ----
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+! idx = tv_get_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)
+***************
+*** 1717,1723 ****
+ )
+ post_balloon(balloonEval, NULL, argvars[0].vval.v_list);
+ else
+! post_balloon(balloonEval, get_tv_string_chk(&argvars[0]), NULL);
+ }
+ }
+
+--- 1717,1723 ----
+ )
+ post_balloon(balloonEval, NULL, argvars[0].vval.v_list);
+ else
+! post_balloon(balloonEval, tv_get_string_chk(&argvars[0]), NULL);
+ }
+ }
+
+***************
+*** 1727,1733 ****
+ {
+ if (rettv_list_alloc(rettv) == OK)
+ {
+! char_u *msg = get_tv_string_chk(&argvars[0]);
+
+ if (msg != NULL)
+ {
+--- 1727,1733 ----
+ {
+ if (rettv_list_alloc(rettv) == OK)
+ {
+! char_u *msg = tv_get_string_chk(&argvars[0]);
+
+ if (msg != NULL)
+ {
+***************
+*** 1762,1771 ****
+ char_u buf2[NUMBUFLEN];
+ int error = FALSE;
+
+! save = (int)get_tv_number_chk(&argvars[0], &error);
+! title = get_tv_string_chk(&argvars[1]);
+! initdir = get_tv_string_buf_chk(&argvars[2], buf);
+! defname = get_tv_string_buf_chk(&argvars[3], buf2);
+
+ if (error || title == NULL || initdir == NULL || defname == NULL)
+ rettv->vval.v_string = NULL;
+--- 1762,1771 ----
+ char_u buf2[NUMBUFLEN];
+ int error = FALSE;
+
+! save = (int)tv_get_number_chk(&argvars[0], &error);
+! title = tv_get_string_chk(&argvars[1]);
+! initdir = tv_get_string_buf_chk(&argvars[2], buf);
+! defname = tv_get_string_buf_chk(&argvars[3], buf2);
+
+ if (error || title == NULL || initdir == NULL || defname == NULL)
+ rettv->vval.v_string = NULL;
+***************
+*** 1790,1797 ****
+ char_u *initdir;
+ char_u buf[NUMBUFLEN];
+
+! title = get_tv_string_chk(&argvars[0]);
+! initdir = get_tv_string_buf_chk(&argvars[1], buf);
+
+ if (title == NULL || initdir == NULL)
+ rettv->vval.v_string = NULL;
+--- 1790,1797 ----
+ char_u *initdir;
+ char_u buf[NUMBUFLEN];
+
+! title = tv_get_string_chk(&argvars[0]);
+! initdir = tv_get_string_buf_chk(&argvars[1], buf);
+
+ if (title == NULL || initdir == NULL)
+ rettv->vval.v_string = NULL;
+***************
+*** 1924,1930 ****
+ {
+ buf_T *buf;
+
+! (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+ rettv->v_type = VAR_STRING;
+--- 1924,1930 ----
+ {
+ buf_T *buf;
+
+! (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+ rettv->v_type = VAR_STRING;
+***************
+*** 1945,1951 ****
+ int error = FALSE;
+ char_u *name;
+
+! (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+--- 1945,1951 ----
+ int error = FALSE;
+ char_u *name;
+
+! (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+***************
+*** 1954,1962 ****
+ * new buffer. */
+ if (buf == NULL
+ && argvars[1].v_type != VAR_UNKNOWN
+! && get_tv_number_chk(&argvars[1], &error) != 0
+ && !error
+! && (name = get_tv_string_chk(&argvars[0])) != NULL
+ && !error)
+ buf = buflist_new(name, NULL, (linenr_T)1, 0);
+
+--- 1954,1962 ----
+ * new buffer. */
+ if (buf == NULL
+ && argvars[1].v_type != VAR_UNKNOWN
+! && tv_get_number_chk(&argvars[1], &error) != 0
+ && !error
+! && (name = tv_get_string_chk(&argvars[0])) != NULL
+ && !error)
+ buf = buflist_new(name, NULL, (linenr_T)1, 0);
+
+***************
+*** 1973,1979 ****
+ int winnr = 0;
+ buf_T *buf;
+
+! (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], TRUE);
+ FOR_ALL_WINDOWS(wp)
+--- 1973,1979 ----
+ int winnr = 0;
+ buf_T *buf;
+
+! (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], TRUE);
+ FOR_ALL_WINDOWS(wp)
+***************
+*** 2015,2021 ****
+ #else
+ long boff = 0;
+
+! boff = get_tv_number(&argvars[0]) - 1; /* boff gets -1 on type error */
+ if (boff < 0)
+ rettv->vval.v_number = -1;
+ else
+--- 2015,2021 ----
+ #else
+ long boff = 0;
+
+! boff = tv_get_number(&argvars[0]) - 1; /* boff gets -1 on type error */
+ if (boff < 0)
+ rettv->vval.v_number = -1;
+ else
+***************
+*** 2033,2040 ****
+ char_u *str;
+ varnumber_T idx;
+
+! str = get_tv_string_chk(&argvars[0]);
+! idx = get_tv_number_chk(&argvars[1], NULL);
+ rettv->vval.v_number = -1;
+ if (str == NULL || idx < 0)
+ return;
+--- 2033,2040 ----
+ char_u *str;
+ varnumber_T idx;
+
+! str = tv_get_string_chk(&argvars[0]);
+! idx = tv_get_number_chk(&argvars[1], NULL);
+ rettv->vval.v_number = -1;
+ if (str == NULL || idx < 0)
+ return;
+***************
+*** 2101,2107 ****
+ func = partial_name(partial);
+ }
+ else
+! func = get_tv_string(&argvars[0]);
+ if (*func == NUL)
+ return; /* type error or empty name */
+
+--- 2101,2107 ----
+ func = partial_name(partial);
+ }
+ else
+! func = tv_get_string(&argvars[0]);
+ if (*func == NUL)
+ return; /* type error or empty name */
+
+***************
+*** 2189,2195 ****
+ rettv->vval.v_number = -1;
+ if (channel != NULL)
+ {
+! char_u *what = get_tv_string(&argvars[1]);
+ int part;
+
+ if (STRCMP(what, "err") == 0)
+--- 2189,2195 ----
+ rettv->vval.v_number = -1;
+ if (channel != NULL)
+ {
+! char_u *what = tv_get_string(&argvars[1]);
+ int part;
+
+ if (STRCMP(what, "err") == 0)
+***************
+*** 2241,2247 ****
+ static void
+ f_ch_log(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+! char_u *msg = get_tv_string(&argvars[0]);
+ channel_T *channel = NULL;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+--- 2241,2247 ----
+ static void
+ f_ch_log(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+! char_u *msg = tv_get_string(&argvars[0]);
+ channel_T *channel = NULL;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+***************
+*** 2263,2271 ****
+ /* Don't open a file in restricted mode. */
+ if (check_restricted() || check_secure())
+ return;
+! fname = get_tv_string(&argvars[0]);
+ if (argvars[1].v_type == VAR_STRING)
+! opt = get_tv_string_buf(&argvars[1], buf);
+ ch_logfile(fname, opt);
+ }
+
+--- 2263,2271 ----
+ /* Don't open a file in restricted mode. */
+ if (check_restricted() || check_secure())
+ return;
+! fname = tv_get_string(&argvars[0]);
+ if (argvars[1].v_type == VAR_STRING)
+! opt = tv_get_string_buf(&argvars[1], buf);
+ ch_logfile(fname, opt);
+ }
+
+***************
+*** 2403,2418 ****
+ int utf8 = 0;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! utf8 = (int)get_tv_number_chk(&argvars[1], NULL);
+
+ if (utf8)
+! rettv->vval.v_number = (*utf_ptr2char)(get_tv_string(&argvars[0]));
+ else
+! rettv->vval.v_number = (*mb_ptr2char)(get_tv_string(&argvars[0]));
+ }
+ else
+ #endif
+! rettv->vval.v_number = get_tv_string(&argvars[0])[0];
+ }
+
+ /*
+--- 2403,2418 ----
+ int utf8 = 0;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! utf8 = (int)tv_get_number_chk(&argvars[1], NULL);
+
+ if (utf8)
+! rettv->vval.v_number = (*utf_ptr2char)(tv_get_string(&argvars[0]));
+ else
+! rettv->vval.v_number = (*mb_ptr2char)(tv_get_string(&argvars[0]));
+ }
+ else
+ #endif
+! rettv->vval.v_number = tv_get_string(&argvars[0])[0];
+ }
+
+ /*
+***************
+*** 2426,2432 ****
+ linenr_T lnum;
+
+ pos = curwin->w_cursor;
+! lnum = get_tv_lnum(argvars);
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
+ {
+ curwin->w_cursor.lnum = lnum;
+--- 2426,2432 ----
+ linenr_T lnum;
+
+ pos = curwin->w_cursor;
+! lnum = tv_get_lnum(argvars);
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
+ {
+ curwin->w_cursor.lnum = lnum;
+***************
+*** 2526,2532 ****
+ return;
+ }
+
+! startcol = (int)get_tv_number_chk(&argvars[0], NULL);
+ if (startcol <= 0)
+ return;
+
+--- 2526,2532 ----
+ return;
+ }
+
+! startcol = (int)tv_get_number_chk(&argvars[0], NULL);
+ if (startcol <= 0)
+ return;
+
+***************
+*** 2573,2592 ****
+ char_u *typestr;
+ int error = FALSE;
+
+! message = get_tv_string_chk(&argvars[0]);
+ if (message == NULL)
+ error = TRUE;
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! buttons = get_tv_string_buf_chk(&argvars[1], buf);
+ if (buttons == NULL)
+ error = TRUE;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! def = (int)get_tv_number_chk(&argvars[2], &error);
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+! typestr = get_tv_string_buf_chk(&argvars[3], buf2);
+ if (typestr == NULL)
+ error = TRUE;
+ else
+--- 2573,2592 ----
+ char_u *typestr;
+ int error = FALSE;
+
+! message = tv_get_string_chk(&argvars[0]);
+ if (message == NULL)
+ error = TRUE;
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! buttons = tv_get_string_buf_chk(&argvars[1], buf);
+ if (buttons == NULL)
+ error = TRUE;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! def = (int)tv_get_number_chk(&argvars[2], &error);
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+! typestr = tv_get_string_buf_chk(&argvars[3], buf2);
+ if (typestr == NULL)
+ error = TRUE;
+ else
+***************
+*** 2665,2675 ****
+ int error = FALSE;
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! ic = (int)get_tv_number_chk(&argvars[2], &error);
+
+ if (argvars[0].v_type == VAR_STRING)
+ {
+! char_u *expr = get_tv_string_chk(&argvars[1]);
+ char_u *p = argvars[0].vval.v_string;
+ char_u *next;
+
+--- 2665,2675 ----
+ int error = FALSE;
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! ic = (int)tv_get_number_chk(&argvars[2], &error);
+
+ if (argvars[0].v_type == VAR_STRING)
+ {
+! char_u *expr = tv_get_string_chk(&argvars[1]);
+ char_u *p = argvars[0].vval.v_string;
+ char_u *next;
+
+***************
+*** 2713,2719 ****
+ {
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+! idx = (long)get_tv_number_chk(&argvars[3], &error);
+ if (!error)
+ {
+ li = list_find(l, idx);
+--- 2713,2719 ----
+ {
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+! idx = (long)tv_get_number_chk(&argvars[3], &error);
+ if (!error)
+ {
+ li = list_find(l, idx);
+***************
+*** 2778,2787 ****
+ if (argvars[0].v_type != VAR_UNKNOWN
+ && argvars[1].v_type != VAR_UNKNOWN)
+ {
+! num = (int)get_tv_number(&argvars[0]);
+! dbpath = get_tv_string(&argvars[1]);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! prepend = get_tv_string_buf(&argvars[2], buf);
+ }
+
+ rettv->vval.v_number = cs_connection(num, dbpath, prepend);
+--- 2778,2787 ----
+ if (argvars[0].v_type != VAR_UNKNOWN
+ && argvars[1].v_type != VAR_UNKNOWN)
+ {
+! num = (int)tv_get_number(&argvars[0]);
+! dbpath = tv_get_string(&argvars[1]);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! prepend = tv_get_string_buf(&argvars[2], buf);
+ }
+
+ rettv->vval.v_number = cs_connection(num, dbpath, prepend);
+***************
+*** 2828,2838 ****
+ }
+ else
+ {
+! line = get_tv_lnum(argvars);
+! col = (long)get_tv_number_chk(&argvars[1], NULL);
+ #ifdef FEAT_VIRTUALEDIT
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! coladd = (long)get_tv_number_chk(&argvars[2], NULL);
+ #endif
+ }
+ if (line < 0 || col < 0
+--- 2828,2838 ----
+ }
+ else
+ {
+! line = tv_get_lnum(argvars);
+! col = (long)tv_get_number_chk(&argvars[1], NULL);
+ #ifdef FEAT_VIRTUALEDIT
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! coladd = (long)tv_get_number_chk(&argvars[2], NULL);
+ #endif
+ }
+ if (line < 0 || col < 0
+***************
+*** 2871,2877 ****
+ int pid;
+
+ rettv->vval.v_number = FAIL;
+! pid = (int)get_tv_number(&argvars[0]);
+ if (pid == 0)
+ EMSG(_(e_invarg));
+ else
+--- 2871,2877 ----
+ int pid;
+
+ rettv->vval.v_number = FAIL;
+! pid = (int)tv_get_number(&argvars[0]);
+ if (pid == 0)
+ EMSG(_(e_invarg));
+ else
+***************
+*** 2898,2904 ****
+ int copyID;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! noref = (int)get_tv_number_chk(&argvars[1], NULL);
+ if (noref < 0 || noref > 1)
+ EMSG(_(e_invarg));
+ else
+--- 2898,2904 ----
+ int copyID;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! noref = (int)tv_get_number_chk(&argvars[1], NULL);
+ if (noref < 0 || noref > 1)
+ EMSG(_(e_invarg));
+ else
+***************
+*** 2922,2928 ****
+ if (check_restricted() || check_secure())
+ return;
+
+! name = get_tv_string(&argvars[0]);
+ if (name == NULL || *name == NUL)
+ {
+ EMSG(_(e_invarg));
+--- 2922,2928 ----
+ if (check_restricted() || check_secure())
+ return;
+
+! name = tv_get_string(&argvars[0]);
+ if (name == NULL || *name == NUL)
+ {
+ EMSG(_(e_invarg));
+***************
+*** 2930,2936 ****
+ }
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! flags = get_tv_string_buf(&argvars[1], nbuf);
+ else
+ flags = (char_u *)"";
+
+--- 2930,2936 ----
+ }
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! flags = tv_get_string_buf(&argvars[1], nbuf);
+ else
+ flags = (char_u *)"";
+
+***************
+*** 2971,2979 ****
+ }
+ is_curbuf = buf == curbuf;
+
+! first = get_tv_lnum_buf(&argvars[1], buf);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! last = get_tv_lnum_buf(&argvars[2], buf);
+ else
+ last = first;
+
+--- 2971,2979 ----
+ }
+ is_curbuf = buf == curbuf;
+
+! first = tv_get_lnum_buf(&argvars[1], buf);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! last = tv_get_lnum_buf(&argvars[2], buf);
+ else
+ last = first;
+
+***************
+*** 3048,3054 ****
+ f_diff_filler(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_DIFF
+! rettv->vval.v_number = diff_check_fill(curwin, get_tv_lnum(argvars));
+ #endif
+ }
+
+--- 3048,3054 ----
+ f_diff_filler(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_DIFF
+! rettv->vval.v_number = diff_check_fill(curwin, tv_get_lnum(argvars));
+ #endif
+ }
+
+***************
+*** 3059,3065 ****
+ f_diff_hlID(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_DIFF
+! linenr_T lnum = get_tv_lnum(argvars);
+ static linenr_T prev_lnum = 0;
+ static varnumber_T changedtick = 0;
+ static int fnum = 0;
+--- 3059,3065 ----
+ f_diff_hlID(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_DIFF
+! linenr_T lnum = tv_get_lnum(argvars);
+ static linenr_T prev_lnum = 0;
+ static varnumber_T changedtick = 0;
+ static int fnum = 0;
+***************
+*** 3100,3106 ****
+
+ if (hlID == HLF_CHD || hlID == HLF_TXD)
+ {
+! col = get_tv_number(&argvars[1]) - 1; /* ignore type error in {col} */
+ if (col >= change_start && col <= change_end)
+ hlID = HLF_TXD; /* changed text */
+ else
+--- 3100,3106 ----
+
+ if (hlID == HLF_CHD || hlID == HLF_TXD)
+ {
+! col = tv_get_number(&argvars[1]) - 1; /* ignore type error in {col} */
+ if (col >= change_start && col <= change_end)
+ hlID = HLF_TXD; /* changed text */
+ else
+***************
+*** 3177,3184 ****
+ {
+ char_u buf[NUMBUFLEN];
+
+! rettv->vval.v_string = vim_strsave_escaped(get_tv_string(&argvars[0]),
+! get_tv_string_buf(&argvars[1], buf));
+ rettv->v_type = VAR_STRING;
+ }
+
+--- 3177,3184 ----
+ {
+ char_u buf[NUMBUFLEN];
+
+! rettv->vval.v_string = vim_strsave_escaped(tv_get_string(&argvars[0]),
+! tv_get_string_buf(&argvars[1], buf));
+ rettv->v_type = VAR_STRING;
+ }
+
+***************
+*** 3190,3196 ****
+ {
+ char_u *s, *p;
+
+! s = get_tv_string_chk(&argvars[0]);
+ if (s != NULL)
+ s = skipwhite(s);
+
+--- 3190,3196 ----
+ {
+ char_u *s, *p;
+
+! s = tv_get_string_chk(&argvars[0]);
+ if (s != NULL)
+ s = skipwhite(s);
+
+***************
+*** 3222,3228 ****
+ static void
+ f_executable(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *name = get_tv_string(&argvars[0]);
+
+ /* Check in $PATH and also check directly if there is a directory name. */
+ rettv->vval.v_number = mch_can_exe(name, NULL, TRUE)
+--- 3222,3228 ----
+ static void
+ f_executable(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *name = tv_get_string(&argvars[0]);
+
+ /* Check in $PATH and also check directly if there is a directory name. */
+ rettv->vval.v_number = mch_can_exe(name, NULL, TRUE)
+***************
+*** 3270,3276 ****
+
+ if (item == NULL)
+ return NULL;
+! s = get_tv_string_buf_chk(&item->li_tv, buf);
+ *p = item->li_next;
+ return s == NULL ? NULL : vim_strsave(s);
+ }
+--- 3270,3276 ----
+
+ if (item == NULL)
+ return NULL;
+! s = tv_get_string_buf_chk(&item->li_tv, buf);
+ *p = item->li_next;
+ return s == NULL ? NULL : vim_strsave(s);
+ }
+***************
+*** 3305,3311 ****
+ }
+ else
+ {
+! cmd = get_tv_string_chk(&argvars[0]);
+ if (cmd == NULL)
+ return;
+ }
+--- 3305,3311 ----
+ }
+ else
+ {
+! cmd = tv_get_string_chk(&argvars[0]);
+ if (cmd == NULL)
+ return;
+ }
+***************
+*** 3313,3319 ****
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+ char_u buf[NUMBUFLEN];
+! char_u *s = get_tv_string_buf_chk(&argvars[1], buf);
+
+ if (s == NULL)
+ return;
+--- 3313,3319 ----
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+ char_u buf[NUMBUFLEN];
+! char_u *s = tv_get_string_buf_chk(&argvars[1], buf);
+
+ if (s == NULL)
+ return;
+***************
+*** 3388,3394 ****
+ {
+ char_u *p = NULL;
+
+! (void)mch_can_exe(get_tv_string(&argvars[0]), &p, TRUE);
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = p;
+ }
+--- 3388,3394 ----
+ {
+ char_u *p = NULL;
+
+! (void)mch_can_exe(tv_get_string(&argvars[0]), &p, TRUE);
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = p;
+ }
+***************
+*** 3402,3408 ****
+ char_u *p;
+ int n = FALSE;
+
+! p = get_tv_string(&argvars[0]);
+ if (*p == '$') /* environment variable */
+ {
+ /* first try "normal" environment variables (fast) */
+--- 3402,3408 ----
+ char_u *p;
+ int n = FALSE;
+
+! p = tv_get_string(&argvars[0]);
+ if (*p == '$') /* environment variable */
+ {
+ /* first try "normal" environment variables (fast) */
+***************
+*** 3480,3492 ****
+ rettv->v_type = VAR_STRING;
+ if (argvars[1].v_type != VAR_UNKNOWN
+ && argvars[2].v_type != VAR_UNKNOWN
+! && get_tv_number_chk(&argvars[2], &error)
+ && !error)
+ {
+ rettv_list_set(rettv, NULL);
+ }
+
+! s = get_tv_string(&argvars[0]);
+ if (*s == '%' || *s == '#' || *s == '<')
+ {
+ ++emsg_off;
+--- 3480,3492 ----
+ rettv->v_type = VAR_STRING;
+ if (argvars[1].v_type != VAR_UNKNOWN
+ && argvars[2].v_type != VAR_UNKNOWN
+! && tv_get_number_chk(&argvars[2], &error)
+ && !error)
+ {
+ rettv_list_set(rettv, NULL);
+ }
+
+! s = tv_get_string(&argvars[0]);
+ if (*s == '%' || *s == '#' || *s == '<')
+ {
+ ++emsg_off;
+***************
+*** 3507,3513 ****
+ /* When the optional second argument is non-zero, don't remove matches
+ * for 'wildignore' and don't put matches for 'suffixes' at the end. */
+ if (argvars[1].v_type != VAR_UNKNOWN
+! && get_tv_number_chk(&argvars[1], &error))
+ options |= WILD_KEEP_ALL;
+ if (!error)
+ {
+--- 3507,3513 ----
+ /* When the optional second argument is non-zero, don't remove matches
+ * for 'wildignore' and don't put matches for 'suffixes' at the end. */
+ if (argvars[1].v_type != VAR_UNKNOWN
+! && tv_get_number_chk(&argvars[1], &error))
+ options |= WILD_KEEP_ALL;
+ if (!error)
+ {
+***************
+*** 3556,3562 ****
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! before = (long)get_tv_number_chk(&argvars[2], &error);
+ if (error)
+ return; /* type error; errmsg already given */
+
+--- 3556,3562 ----
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! before = (long)tv_get_number_chk(&argvars[2], &error);
+ if (error)
+ return; /* type error; errmsg already given */
+
+***************
+*** 3595,3601 ****
+ {
+ static char *(av[]) = {"keep", "force", "error"};
+
+! action = get_tv_string_chk(&argvars[2]);
+ if (action == NULL)
+ return; /* type error; errmsg already given */
+ for (i = 0; i < 3; ++i)
+--- 3595,3601 ----
+ {
+ static char *(av[]) = {"keep", "force", "error"};
+
+! action = tv_get_string_chk(&argvars[2]);
+ if (action == NULL)
+ return; /* type error; errmsg already given */
+ for (i = 0; i < 3; ++i)
+***************
+*** 3640,3650 ****
+ if (check_secure())
+ return;
+
+! keys = get_tv_string(&argvars[0]);
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! flags = get_tv_string_buf(&argvars[1], nbuf);
+ for ( ; *flags != NUL; ++flags)
+ {
+ switch (*flags)
+--- 3640,3650 ----
+ if (check_secure())
+ return;
+
+! keys = tv_get_string(&argvars[0]);
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! flags = tv_get_string_buf(&argvars[1], nbuf);
+ for ( ; *flags != NUL; ++flags)
+ {
+ switch (*flags)
+***************
+*** 3707,3713 ****
+ #ifndef O_NONBLOCK
+ # define O_NONBLOCK 0
+ #endif
+! p = get_tv_string(&argvars[0]);
+ if (*p && !mch_isdir(p) && (fd = mch_open((char *)p,
+ O_RDONLY | O_NONBLOCK, 0)) >= 0)
+ {
+--- 3707,3713 ----
+ #ifndef O_NONBLOCK
+ # define O_NONBLOCK 0
+ #endif
+! p = tv_get_string(&argvars[0]);
+ if (*p && !mch_isdir(p) && (fd = mch_open((char *)p,
+ O_RDONLY | O_NONBLOCK, 0)) >= 0)
+ {
+***************
+*** 3727,3733 ****
+ static void
+ f_filewritable(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = filewritable(get_tv_string(&argvars[0]));
+ }
+
+ static void
+--- 3727,3733 ----
+ static void
+ f_filewritable(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = filewritable(tv_get_string(&argvars[0]));
+ }
+
+ static void
+***************
+*** 3751,3761 ****
+ rettv->v_type = VAR_STRING;
+
+ #ifdef FEAT_SEARCHPATH
+! fname = get_tv_string(&argvars[0]);
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! p = get_tv_string_buf_chk(&argvars[1], pathbuf);
+ if (p == NULL)
+ error = TRUE;
+ else
+--- 3751,3761 ----
+ rettv->v_type = VAR_STRING;
+
+ #ifdef FEAT_SEARCHPATH
+! fname = tv_get_string(&argvars[0]);
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! p = tv_get_string_buf_chk(&argvars[1], pathbuf);
+ if (p == NULL)
+ error = TRUE;
+ else
+***************
+*** 3764,3770 ****
+ path = p;
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! count = (int)get_tv_number_chk(&argvars[2], &error);
+ }
+ }
+
+--- 3764,3770 ----
+ path = p;
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! count = (int)tv_get_number_chk(&argvars[2], &error);
+ }
+ }
+
+***************
+*** 3883,3889 ****
+ f_fnameescape(typval_T *argvars, typval_T *rettv)
+ {
+ rettv->vval.v_string = vim_strsave_fnameescape(
+! get_tv_string(&argvars[0]), FALSE);
+ rettv->v_type = VAR_STRING;
+ }
+
+--- 3883,3889 ----
+ f_fnameescape(typval_T *argvars, typval_T *rettv)
+ {
+ rettv->vval.v_string = vim_strsave_fnameescape(
+! tv_get_string(&argvars[0]), FALSE);
+ rettv->v_type = VAR_STRING;
+ }
+
+***************
+*** 3900,3907 ****
+ char_u *fbuf = NULL;
+ char_u buf[NUMBUFLEN];
+
+! fname = get_tv_string_chk(&argvars[0]);
+! mods = get_tv_string_buf_chk(&argvars[1], buf);
+ if (fname == NULL || mods == NULL)
+ fname = NULL;
+ else
+--- 3900,3907 ----
+ char_u *fbuf = NULL;
+ char_u buf[NUMBUFLEN];
+
+! fname = tv_get_string_chk(&argvars[0]);
+! mods = tv_get_string_buf_chk(&argvars[1], buf);
+ if (fname == NULL || mods == NULL)
+ fname = NULL;
+ else
+***************
+*** 3931,3937 ****
+ linenr_T lnum;
+ linenr_T first, last;
+
+! lnum = get_tv_lnum(argvars);
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
+ {
+ if (hasFoldingWin(curwin, lnum, &first, &last, FALSE, NULL))
+--- 3931,3937 ----
+ linenr_T lnum;
+ linenr_T first, last;
+
+! lnum = tv_get_lnum(argvars);
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
+ {
+ if (hasFoldingWin(curwin, lnum, &first, &last, FALSE, NULL))
+***************
+*** 3974,3980 ****
+ #ifdef FEAT_FOLDING
+ linenr_T lnum;
+
+! lnum = get_tv_lnum(argvars);
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
+ rettv->vval.v_number = foldLevel(lnum);
+ #endif
+--- 3974,3980 ----
+ #ifdef FEAT_FOLDING
+ linenr_T lnum;
+
+! lnum = tv_get_lnum(argvars);
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
+ rettv->vval.v_number = foldLevel(lnum);
+ #endif
+***************
+*** 4067,4073 ****
+ return; /* reject recursive use */
+ entered = TRUE;
+
+! lnum = get_tv_lnum(argvars);
+ /* treat illegal types and illegal string values for {lnum} the same */
+ if (lnum < 0)
+ lnum = 0;
+--- 4067,4073 ----
+ return; /* reject recursive use */
+ entered = TRUE;
+
+! lnum = tv_get_lnum(argvars);
+ /* treat illegal types and illegal string values for {lnum} the same */
+ if (lnum < 0)
+ lnum = 0;
+***************
+*** 4125,4131 ****
+ else
+ {
+ /* function('MyFunc', [arg], dict) */
+! s = get_tv_string(&argvars[0]);
+ use_string = TRUE;
+ }
+
+--- 4125,4131 ----
+ else
+ {
+ /* function('MyFunc', [arg], dict) */
+! s = tv_get_string(&argvars[0]);
+ use_string = TRUE;
+ }
+
+***************
+*** 4140,4146 ****
+
+ if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s))
+ || (is_funcref && trans_name == NULL))
+! EMSG2(_(e_invarg2), use_string ? get_tv_string(&argvars[0]) : s);
+ /* Don't check an autoload name for existence here. */
+ else if (trans_name != NULL && (is_funcref
+ ? find_func(trans_name) == NULL
+--- 4140,4146 ----
+
+ if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s))
+ || (is_funcref && trans_name == NULL))
+! EMSG2(_(e_invarg2), use_string ? tv_get_string(&argvars[0]) : s);
+ /* Don't check an autoload name for existence here. */
+ else if (trans_name != NULL && (is_funcref
+ ? find_func(trans_name) == NULL
+***************
+*** 4327,4333 ****
+ * using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]". */
+ want_garbage_collect = TRUE;
+
+! if (argvars[0].v_type != VAR_UNKNOWN && get_tv_number(&argvars[0]) == 1)
+ garbage_collect_at_exit = TRUE;
+ }
+
+--- 4327,4333 ----
+ * using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]". */
+ want_garbage_collect = TRUE;
+
+! if (argvars[0].v_type != VAR_UNKNOWN && tv_get_number(&argvars[0]) == 1)
+ garbage_collect_at_exit = TRUE;
+ }
+
+***************
+*** 4349,4355 ****
+ {
+ int error = FALSE;
+
+! li = list_find(l, (long)get_tv_number_chk(&argvars[1], &error));
+ if (!error && li != NULL)
+ tv = &li->li_tv;
+ }
+--- 4349,4355 ----
+ {
+ int error = FALSE;
+
+! li = list_find(l, (long)tv_get_number_chk(&argvars[1], &error));
+ if (!error && li != NULL)
+ tv = &li->li_tv;
+ }
+***************
+*** 4358,4364 ****
+ {
+ if ((d = argvars[0].vval.v_dict) != NULL)
+ {
+! di = dict_find(d, get_tv_string(&argvars[1]), -1);
+ if (di != NULL)
+ tv = &di->di_tv;
+ }
+--- 4358,4364 ----
+ {
+ if ((d = argvars[0].vval.v_dict) != NULL)
+ {
+! di = dict_find(d, tv_get_string(&argvars[1]), -1);
+ if (di != NULL)
+ tv = &di->di_tv;
+ }
+***************
+*** 4379,4385 ****
+
+ if (pt != NULL)
+ {
+! char_u *what = get_tv_string(&argvars[1]);
+ char_u *n;
+
+ if (STRCMP(what, "func") == 0 || STRCMP(what, "name") == 0)
+--- 4379,4385 ----
+
+ if (pt != NULL)
+ {
+! char_u *what = tv_get_string(&argvars[1]);
+ char_u *n;
+
+ if (STRCMP(what, "func") == 0 || STRCMP(what, "name") == 0)
+***************
+*** 4527,4548 ****
+ filtered = TRUE;
+
+ di = dict_find(sel_d, (char_u *)"buflisted", -1);
+! if (di != NULL && get_tv_number(&di->di_tv))
+ sel_buflisted = TRUE;
+
+ di = dict_find(sel_d, (char_u *)"bufloaded", -1);
+! if (di != NULL && get_tv_number(&di->di_tv))
+ sel_bufloaded = TRUE;
+
+ di = dict_find(sel_d, (char_u *)"bufmodified", -1);
+! if (di != NULL && get_tv_number(&di->di_tv))
+ sel_bufmodified = TRUE;
+ }
+ }
+ else if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ /* Information about one buffer. Argument specifies the buffer */
+! (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ argbuf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+--- 4527,4548 ----
+ filtered = TRUE;
+
+ di = dict_find(sel_d, (char_u *)"buflisted", -1);
+! if (di != NULL && tv_get_number(&di->di_tv))
+ sel_buflisted = TRUE;
+
+ di = dict_find(sel_d, (char_u *)"bufloaded", -1);
+! if (di != NULL && tv_get_number(&di->di_tv))
+ sel_bufloaded = TRUE;
+
+ di = dict_find(sel_d, (char_u *)"bufmodified", -1);
+! if (di != NULL && tv_get_number(&di->di_tv))
+ sel_bufmodified = TRUE;
+ }
+ }
+ else if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ /* Information about one buffer. Argument specifies the buffer */
+! (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ argbuf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+***************
+*** 4626,4641 ****
+ linenr_T end;
+ buf_T *buf;
+
+! (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+
+! lnum = get_tv_lnum_buf(&argvars[1], buf);
+ if (argvars[2].v_type == VAR_UNKNOWN)
+ end = lnum;
+ else
+! end = get_tv_lnum_buf(&argvars[2], buf);
+
+ get_buffer_lines(buf, lnum, end, TRUE, rettv);
+ }
+--- 4626,4641 ----
+ linenr_T end;
+ buf_T *buf;
+
+! (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+
+! lnum = tv_get_lnum_buf(&argvars[1], buf);
+ if (argvars[2].v_type == VAR_UNKNOWN)
+ end = lnum;
+ else
+! end = tv_get_lnum_buf(&argvars[2], buf);
+
+ get_buffer_lines(buf, lnum, end, TRUE, rettv);
+ }
+***************
+*** 4652,4659 ****
+ dictitem_T *v;
+ int done = FALSE;
+
+! (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */
+! varname = get_tv_string_chk(&argvars[1]);
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+
+--- 4652,4659 ----
+ dictitem_T *v;
+ int done = FALSE;
+
+! (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+! varname = tv_get_string_chk(&argvars[1]);
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+
+***************
+*** 4724,4730 ****
+ return;
+
+ #ifdef FEAT_JUMPLIST
+! (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+--- 4724,4730 ----
+ return;
+
+ #ifdef FEAT_JUMPLIST
+! (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+***************
+*** 4788,4794 ****
+ if (argvars[0].v_type == VAR_UNKNOWN)
+ /* getchar(): blocking wait. */
+ n = plain_vgetc();
+! else if (get_tv_number_chk(&argvars[0], &error) == 1)
+ /* getchar(1): only check if char avail */
+ n = vpeekc_any();
+ else if (error || vpeekc_any() == NUL)
+--- 4788,4794 ----
+ if (argvars[0].v_type == VAR_UNKNOWN)
+ /* getchar(): blocking wait. */
+ n = plain_vgetc();
+! else if (tv_get_number_chk(&argvars[0], &error) == 1)
+ /* getchar(1): only check if char avail */
+ n = vpeekc_any();
+ else if (error || vpeekc_any() == NUL)
+***************
+*** 4960,4966 ****
+ | WILD_NO_BEEP;
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! filtered = get_tv_number_chk(&argvars[2], NULL);
+
+ if (p_wic)
+ options |= WILD_ICASE;
+--- 4960,4966 ----
+ | WILD_NO_BEEP;
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! filtered = tv_get_number_chk(&argvars[2], NULL);
+
+ if (p_wic)
+ options |= WILD_ICASE;
+***************
+*** 4970,4978 ****
+ options |= WILD_KEEP_ALL;
+
+ ExpandInit(&xpc);
+! xpc.xp_pattern = get_tv_string(&argvars[0]);
+ xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
+! xpc.xp_context = cmdcomplete_str_to_type(get_tv_string(&argvars[1]));
+ if (xpc.xp_context == EXPAND_NOTHING)
+ {
+ if (argvars[1].v_type == VAR_STRING)
+--- 4970,4978 ----
+ options |= WILD_KEEP_ALL;
+
+ ExpandInit(&xpc);
+! xpc.xp_pattern = tv_get_string(&argvars[0]);
+ xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
+! xpc.xp_context = cmdcomplete_str_to_type(tv_get_string(&argvars[1]));
+ if (xpc.xp_context == EXPAND_NOTHING)
+ {
+ if (argvars[1].v_type == VAR_STRING)
+***************
+*** 5083,5089 ****
+ }
+ else
+ {
+! name = get_tv_string(&argvars[0]);
+ if (STRCMP(name, "*") == 0) /* don't use font dialog */
+ return;
+ font = gui_mch_get_font(name, FALSE);
+--- 5083,5089 ----
+ }
+ else
+ {
+! name = tv_get_string(&argvars[0]);
+ if (STRCMP(name, "*") == 0) /* don't use font dialog */
+ return;
+ font = gui_mch_get_font(name, FALSE);
+***************
+*** 5109,5115 ****
+ char_u flags[] = "rwx";
+ int i;
+
+! fname = get_tv_string(&argvars[0]);
+
+ rettv->v_type = VAR_STRING;
+ if (mch_stat((char *)fname, &st) >= 0)
+--- 5109,5115 ----
+ char_u flags[] = "rwx";
+ int i;
+
+! fname = tv_get_string(&argvars[0]);
+
+ rettv->v_type = VAR_STRING;
+ if (mch_stat((char *)fname, &st) >= 0)
+***************
+*** 5136,5142 ****
+ char_u *fname;
+ stat_T st;
+
+! fname = get_tv_string(&argvars[0]);
+
+ rettv->v_type = VAR_NUMBER;
+
+--- 5136,5142 ----
+ char_u *fname;
+ stat_T st;
+
+! fname = tv_get_string(&argvars[0]);
+
+ rettv->v_type = VAR_NUMBER;
+
+***************
+*** 5166,5172 ****
+ char_u *fname;
+ stat_T st;
+
+! fname = get_tv_string(&argvars[0]);
+
+ if (mch_stat((char *)fname, &st) >= 0)
+ rettv->vval.v_number = (varnumber_T)st.st_mtime;
+--- 5166,5172 ----
+ char_u *fname;
+ stat_T st;
+
+! fname = tv_get_string(&argvars[0]);
+
+ if (mch_stat((char *)fname, &st) >= 0)
+ rettv->vval.v_number = (varnumber_T)st.st_mtime;
+***************
+*** 5185,5191 ****
+ char_u *type = NULL;
+ char *t;
+
+! fname = get_tv_string(&argvars[0]);
+
+ rettv->v_type = VAR_STRING;
+ if (mch_lstat((char *)fname, &st) >= 0)
+--- 5185,5191 ----
+ char_u *type = NULL;
+ char *t;
+
+! fname = tv_get_string(&argvars[0]);
+
+ rettv->v_type = VAR_STRING;
+ if (mch_lstat((char *)fname, &st) >= 0)
+***************
+*** 5272,5278 ****
+ linenr_T end;
+ int retlist;
+
+! lnum = get_tv_lnum(argvars);
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ {
+ end = 0;
+--- 5272,5278 ----
+ linenr_T end;
+ int retlist;
+
+! lnum = tv_get_lnum(argvars);
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ {
+ end = 0;
+***************
+*** 5280,5286 ****
+ }
+ else
+ {
+! end = get_tv_lnum(&argvars[1]);
+ retlist = TRUE;
+ }
+
+--- 5280,5286 ----
+ }
+ else
+ {
+! end = tv_get_lnum(&argvars[1]);
+ retlist = TRUE;
+ }
+
+***************
+*** 5490,5502 ****
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! strregname = get_tv_string_chk(&argvars[0]);
+ error = strregname == NULL;
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! arg2 = (int)get_tv_number_chk(&argvars[1], &error);
+ if (!error && argvars[2].v_type != VAR_UNKNOWN)
+! return_list = (int)get_tv_number_chk(&argvars[2], &error);
+ }
+ }
+ else
+--- 5490,5502 ----
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! strregname = tv_get_string_chk(&argvars[0]);
+ error = strregname == NULL;
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! arg2 = (int)tv_get_number_chk(&argvars[1], &error);
+ if (!error && argvars[2].v_type != VAR_UNKNOWN)
+! return_list = (int)tv_get_number_chk(&argvars[2], &error);
+ }
+ }
+ else
+***************
+*** 5540,5546 ****
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! strregname = get_tv_string_chk(&argvars[0]);
+ if (strregname == NULL) /* type error; errmsg already given */
+ {
+ rettv->v_type = VAR_STRING;
+--- 5540,5546 ----
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! strregname = tv_get_string_chk(&argvars[0]);
+ if (strregname == NULL) /* type error; errmsg already given */
+ {
+ rettv->v_type = VAR_STRING;
+***************
+*** 5619,5625 ****
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ /* Information about one tab page */
+! tparg = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
+ if (tparg == NULL)
+ return;
+ }
+--- 5619,5625 ----
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ /* Information about one tab page */
+! tparg = find_tabpage((int)tv_get_number_chk(&argvars[0], NULL));
+ if (tparg == NULL)
+ return;
+ }
+***************
+*** 5653,5660 ****
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+! varname = get_tv_string_chk(&argvars[1]);
+! tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
+ if (tp != NULL && varname != NULL)
+ {
+ /* Set tp to be our tabpage, temporarily. Also set the window to the
+--- 5653,5660 ----
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+! varname = tv_get_string_chk(&argvars[1]);
+! tp = find_tabpage((int)tv_get_number_chk(&argvars[0], NULL));
+ if (tp != NULL && varname != NULL)
+ {
+ /* Set tp to be our tabpage, temporarily. Also set the window to the
+***************
+*** 5879,5885 ****
+ varnumber_T timeout = 100;
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+! timeout = get_tv_number(&argvars[0]);
+ term_get_winpos(&x, &y, timeout);
+ }
+ #endif
+--- 5879,5885 ----
+ varnumber_T timeout = 100;
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+! timeout = tv_get_number(&argvars[0]);
+ term_get_winpos(&x, &y, timeout);
+ }
+ #endif
+***************
+*** 5966,5981 ****
+ rettv->v_type = VAR_STRING;
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! if (get_tv_number_chk(&argvars[1], &error))
+ options |= WILD_KEEP_ALL;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! if (get_tv_number_chk(&argvars[2], &error))
+ {
+ rettv_list_set(rettv, NULL);
+ }
+ if (argvars[3].v_type != VAR_UNKNOWN
+! && get_tv_number_chk(&argvars[3], &error))
+ options |= WILD_ALLLINKS;
+ }
+ }
+--- 5966,5981 ----
+ rettv->v_type = VAR_STRING;
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! if (tv_get_number_chk(&argvars[1], &error))
+ options |= WILD_KEEP_ALL;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! if (tv_get_number_chk(&argvars[2], &error))
+ {
+ rettv_list_set(rettv, NULL);
+ }
+ if (argvars[3].v_type != VAR_UNKNOWN
+! && tv_get_number_chk(&argvars[3], &error))
+ options |= WILD_ALLLINKS;
+ }
+ }
+***************
+*** 5986,5998 ****
+ if (p_wic)
+ options += WILD_ICASE;
+ if (rettv->v_type == VAR_STRING)
+! rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]),
+ NULL, options, WILD_ALL);
+ else if (rettv_list_alloc(rettv) != FAIL)
+ {
+ int i;
+
+! ExpandOne(&xpc, get_tv_string(&argvars[0]),
+ NULL, options, WILD_ALL_KEEP);
+ for (i = 0; i < xpc.xp_numfiles; i++)
+ list_append_string(rettv->vval.v_list, xpc.xp_files[i], -1);
+--- 5986,5998 ----
+ if (p_wic)
+ options += WILD_ICASE;
+ if (rettv->v_type == VAR_STRING)
+! rettv->vval.v_string = ExpandOne(&xpc, tv_get_string(&argvars[0]),
+ NULL, options, WILD_ALL);
+ else if (rettv_list_alloc(rettv) != FAIL)
+ {
+ int i;
+
+! ExpandOne(&xpc, tv_get_string(&argvars[0]),
+ NULL, options, WILD_ALL_KEEP);
+ for (i = 0; i < xpc.xp_numfiles; i++)
+ list_append_string(rettv->vval.v_list, xpc.xp_files[i], -1);
+***************
+*** 6012,6018 ****
+ {
+ int flags = 0;
+ char_u buf1[NUMBUFLEN];
+! char_u *file = get_tv_string_buf_chk(&argvars[1], buf1);
+ int error = FALSE;
+ garray_T ga;
+ int i;
+--- 6012,6018 ----
+ {
+ int flags = 0;
+ char_u buf1[NUMBUFLEN];
+! char_u *file = tv_get_string_buf_chk(&argvars[1], buf1);
+ int error = FALSE;
+ garray_T ga;
+ int i;
+***************
+*** 6022,6044 ****
+ rettv->v_type = VAR_STRING;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! if (get_tv_number_chk(&argvars[2], &error))
+ flags |= WILD_KEEP_ALL;
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+! if (get_tv_number_chk(&argvars[3], &error))
+ {
+ rettv_list_set(rettv, NULL);
+ }
+ if (argvars[4].v_type != VAR_UNKNOWN
+! && get_tv_number_chk(&argvars[4], &error))
+ flags |= WILD_ALLLINKS;
+ }
+ }
+ if (file != NULL && !error)
+ {
+ ga_init2(&ga, (int)sizeof(char_u *), 10);
+! globpath(get_tv_string(&argvars[0]), file, &ga, flags);
+ if (rettv->v_type == VAR_STRING)
+ rettv->vval.v_string = ga_concat_strings(&ga, "\n");
+ else if (rettv_list_alloc(rettv) != FAIL)
+--- 6022,6044 ----
+ rettv->v_type = VAR_STRING;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! if (tv_get_number_chk(&argvars[2], &error))
+ flags |= WILD_KEEP_ALL;
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+! if (tv_get_number_chk(&argvars[3], &error))
+ {
+ rettv_list_set(rettv, NULL);
+ }
+ if (argvars[4].v_type != VAR_UNKNOWN
+! && tv_get_number_chk(&argvars[4], &error))
+ flags |= WILD_ALLLINKS;
+ }
+ }
+ if (file != NULL && !error)
+ {
+ ga_init2(&ga, (int)sizeof(char_u *), 10);
+! globpath(tv_get_string(&argvars[0]), file, &ga, flags);
+ if (rettv->v_type == VAR_STRING)
+ rettv->vval.v_string = ga_concat_strings(&ga, "\n");
+ else if (rettv_list_alloc(rettv) != FAIL)
+***************
+*** 6057,6063 ****
+ static void
+ f_glob2regpat(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *pat = get_tv_string_chk(&argvars[0]);
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = (pat == NULL)
+--- 6057,6063 ----
+ static void
+ f_glob2regpat(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *pat = tv_get_string_chk(&argvars[0]);
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = (pat == NULL)
+***************
+*** 6583,6589 ****
+ NULL
+ };
+
+! name = get_tv_string(&argvars[0]);
+ for (i = 0; has_list[i] != NULL; ++i)
+ if (STRICMP(name, has_list[i]) == 0)
+ {
+--- 6583,6589 ----
+ NULL
+ };
+
+! name = tv_get_string(&argvars[0]);
+ for (i = 0; has_list[i] != NULL; ++i)
+ if (STRICMP(name, has_list[i]) == 0)
+ {
+***************
+*** 6721,6727 ****
+ return;
+
+ rettv->vval.v_number = dict_find(argvars[0].vval.v_dict,
+! get_tv_string(&argvars[1]), -1) != NULL;
+ }
+
+ /*
+--- 6721,6727 ----
+ return;
+
+ rettv->vval.v_number = dict_find(argvars[0].vval.v_dict,
+! tv_get_string(&argvars[1]), -1) != NULL;
+ }
+
+ /*
+***************
+*** 6747,6760 ****
+ char_u buf[NUMBUFLEN];
+ int abbr = FALSE;
+
+! name = get_tv_string(&argvars[0]);
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ mode = (char_u *)"nvo";
+ else
+ {
+! mode = get_tv_string_buf(&argvars[1], buf);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! abbr = (int)get_tv_number(&argvars[2]);
+ }
+
+ if (map_to_exists(name, mode, abbr))
+--- 6747,6760 ----
+ char_u buf[NUMBUFLEN];
+ int abbr = FALSE;
+
+! name = tv_get_string(&argvars[0]);
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ mode = (char_u *)"nvo";
+ else
+ {
+! mode = tv_get_string_buf(&argvars[1], buf);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! abbr = (int)tv_get_number(&argvars[2]);
+ }
+
+ if (map_to_exists(name, mode, abbr))
+***************
+*** 6779,6789 ****
+ if (check_restricted() || check_secure())
+ return;
+ #ifdef FEAT_CMDHIST
+! str = get_tv_string_chk(&argvars[0]); /* NULL on type error */
+ histype = str != NULL ? get_histtype(str) : -1;
+ if (histype >= 0)
+ {
+! str = get_tv_string_buf(&argvars[1], buf);
+ if (*str != NUL)
+ {
+ init_history();
+--- 6779,6789 ----
+ if (check_restricted() || check_secure())
+ return;
+ #ifdef FEAT_CMDHIST
+! str = tv_get_string_chk(&argvars[0]); /* NULL on type error */
+ histype = str != NULL ? get_histtype(str) : -1;
+ if (histype >= 0)
+ {
+! str = tv_get_string_buf(&argvars[1], buf);
+ if (*str != NUL)
+ {
+ init_history();
+***************
+*** 6806,6812 ****
+ char_u buf[NUMBUFLEN];
+ char_u *str;
+
+! str = get_tv_string_chk(&argvars[0]); /* NULL on type error */
+ if (str == NULL)
+ n = 0;
+ else if (argvars[1].v_type == VAR_UNKNOWN)
+--- 6806,6812 ----
+ char_u buf[NUMBUFLEN];
+ char_u *str;
+
+! str = tv_get_string_chk(&argvars[0]); /* NULL on type error */
+ if (str == NULL)
+ n = 0;
+ else if (argvars[1].v_type == VAR_UNKNOWN)
+***************
+*** 6815,6825 ****
+ else if (argvars[1].v_type == VAR_NUMBER)
+ /* index given: remove that entry */
+ n = del_history_idx(get_histtype(str),
+! (int)get_tv_number(&argvars[1]));
+ else
+ /* string given: remove all matching entries */
+ n = del_history_entry(get_histtype(str),
+! get_tv_string_buf(&argvars[1], buf));
+ rettv->vval.v_number = n;
+ #endif
+ }
+--- 6815,6825 ----
+ else if (argvars[1].v_type == VAR_NUMBER)
+ /* index given: remove that entry */
+ n = del_history_idx(get_histtype(str),
+! (int)tv_get_number(&argvars[1]));
+ else
+ /* string given: remove all matching entries */
+ n = del_history_entry(get_histtype(str),
+! tv_get_string_buf(&argvars[1], buf));
+ rettv->vval.v_number = n;
+ #endif
+ }
+***************
+*** 6835,6841 ****
+ int idx;
+ char_u *str;
+
+! str = get_tv_string_chk(&argvars[0]); /* NULL on type error */
+ if (str == NULL)
+ rettv->vval.v_string = NULL;
+ else
+--- 6835,6841 ----
+ int idx;
+ char_u *str;
+
+! str = tv_get_string_chk(&argvars[0]); /* NULL on type error */
+ if (str == NULL)
+ rettv->vval.v_string = NULL;
+ else
+***************
+*** 6844,6850 ****
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ idx = get_history_idx(type);
+ else
+! idx = (int)get_tv_number_chk(&argvars[1], NULL);
+ /* -1 on type error */
+ rettv->vval.v_string = vim_strsave(get_history_entry(type, idx));
+ }
+--- 6844,6850 ----
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ idx = get_history_idx(type);
+ else
+! idx = (int)tv_get_number_chk(&argvars[1], NULL);
+ /* -1 on type error */
+ rettv->vval.v_string = vim_strsave(get_history_entry(type, idx));
+ }
+***************
+*** 6863,6869 ****
+ int i;
+
+ #ifdef FEAT_CMDHIST
+! char_u *history = get_tv_string_chk(&argvars[0]);
+
+ i = history == NULL ? HIST_CMD - 1 : get_histtype(history);
+ if (i >= HIST_CMD && i < HIST_COUNT)
+--- 6863,6869 ----
+ int i;
+
+ #ifdef FEAT_CMDHIST
+! char_u *history = tv_get_string_chk(&argvars[0]);
+
+ i = history == NULL ? HIST_CMD - 1 : get_histtype(history);
+ if (i >= HIST_CMD && i < HIST_COUNT)
+***************
+*** 6880,6886 ****
+ static void
+ f_hlID(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = syn_name2id(get_tv_string(&argvars[0]));
+ }
+
+ /*
+--- 6880,6886 ----
+ static void
+ f_hlID(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = syn_name2id(tv_get_string(&argvars[0]));
+ }
+
+ /*
+***************
+*** 6889,6895 ****
+ static void
+ f_hlexists(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = highlight_exists(get_tv_string(&argvars[0]));
+ }
+
+ /*
+--- 6889,6895 ----
+ static void
+ f_hlexists(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = highlight_exists(tv_get_string(&argvars[0]));
+ }
+
+ /*
+***************
+*** 6922,6930 ****
+ rettv->vval.v_string = NULL;
+
+ #ifdef FEAT_MBYTE
+! str = get_tv_string(&argvars[0]);
+! from = enc_canonize(enc_skip(get_tv_string_buf(&argvars[1], buf1)));
+! to = enc_canonize(enc_skip(get_tv_string_buf(&argvars[2], buf2)));
+ vimconv.vc_type = CONV_NONE;
+ convert_setup(&vimconv, from, to);
+
+--- 6922,6930 ----
+ rettv->vval.v_string = NULL;
+
+ #ifdef FEAT_MBYTE
+! str = tv_get_string(&argvars[0]);
+! from = enc_canonize(enc_skip(tv_get_string_buf(&argvars[1], buf1)));
+! to = enc_canonize(enc_skip(tv_get_string_buf(&argvars[2], buf2)));
+ vimconv.vc_type = CONV_NONE;
+ convert_setup(&vimconv, from, to);
+
+***************
+*** 6948,6954 ****
+ {
+ linenr_T lnum;
+
+! lnum = get_tv_lnum(argvars);
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
+ rettv->vval.v_number = get_indent_lnum(lnum);
+ else
+--- 6948,6954 ----
+ {
+ linenr_T lnum;
+
+! lnum = tv_get_lnum(argvars);
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
+ rettv->vval.v_number = get_indent_lnum(lnum);
+ else
+***************
+*** 6982,6991 ****
+
+ /* Start at specified item. Use the cached index that list_find()
+ * sets, so that a negative number also works. */
+! item = list_find(l, (long)get_tv_number_chk(&argvars[2], &error));
+ idx = l->lv_idx;
+ if (argvars[3].v_type != VAR_UNKNOWN)
+! ic = (int)get_tv_number_chk(&argvars[3], &error);
+ if (error)
+ item = NULL;
+ }
+--- 6982,6991 ----
+
+ /* Start at specified item. Use the cached index that list_find()
+ * sets, so that a negative number also works. */
+! item = list_find(l, (long)tv_get_number_chk(&argvars[2], &error));
+ idx = l->lv_idx;
+ if (argvars[3].v_type != VAR_UNKNOWN)
+! ic = (int)tv_get_number_chk(&argvars[3], &error);
+ if (error)
+ item = NULL;
+ }
+***************
+*** 7025,7033 ****
+ char_u buf[NUMBUFLEN];
+ char_u *defstr = (char_u *)"";
+
+! message = get_tv_string_chk(&argvars[0]);
+ if (argvars[1].v_type != VAR_UNKNOWN
+! && (defstr = get_tv_string_buf_chk(&argvars[1], buf)) != NULL)
+ vim_strncpy(IObuff, defstr, IOSIZE - 1);
+ else
+ IObuff[0] = NUL;
+--- 7025,7033 ----
+ char_u buf[NUMBUFLEN];
+ char_u *defstr = (char_u *)"";
+
+! message = tv_get_string_chk(&argvars[0]);
+ if (argvars[1].v_type != VAR_UNKNOWN
+! && (defstr = tv_get_string_buf_chk(&argvars[1], buf)) != NULL)
+ vim_strncpy(IObuff, defstr, IOSIZE - 1);
+ else
+ IObuff[0] = NUL;
+***************
+*** 7041,7047 ****
+ && argvars[1].v_type != VAR_UNKNOWN
+ && argvars[2].v_type != VAR_UNKNOWN)
+ rettv->vval.v_string = vim_strsave(
+! get_tv_string_buf(&argvars[2], buf));
+ else
+ rettv->vval.v_string = NULL;
+ }
+--- 7041,7047 ----
+ && argvars[1].v_type != VAR_UNKNOWN
+ && argvars[2].v_type != VAR_UNKNOWN)
+ rettv->vval.v_string = vim_strsave(
+! tv_get_string_buf(&argvars[2], buf));
+ else
+ rettv->vval.v_string = NULL;
+ }
+***************
+*** 7082,7088 ****
+
+ for (li = argvars[0].vval.v_list->lv_first; li != NULL; li = li->li_next)
+ {
+! msg_puts(get_tv_string(&li->li_tv));
+ msg_putchar('\n');
+ }
+
+--- 7082,7088 ----
+
+ for (li = argvars[0].vval.v_list->lv_first; li != NULL; li = li->li_next)
+ {
+! msg_puts(tv_get_string(&li->li_tv));
+ msg_putchar('\n');
+ }
+
+***************
+*** 7164,7170 ****
+ && !tv_check_lock(l->lv_lock, (char_u *)N_("insert() argument"), TRUE))
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! before = (long)get_tv_number_chk(&argvars[2], &error);
+ if (error)
+ return; /* type error; errmsg already given */
+
+--- 7164,7170 ----
+ && !tv_check_lock(l->lv_lock, (char_u *)N_("insert() argument"), TRUE))
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! before = (long)tv_get_number_chk(&argvars[2], &error);
+ if (error)
+ return; /* type error; errmsg already given */
+
+***************
+*** 7193,7199 ****
+ static void
+ f_invert(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = ~get_tv_number_chk(&argvars[0], NULL);
+ }
+
+ /*
+--- 7193,7199 ----
+ static void
+ f_invert(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = ~tv_get_number_chk(&argvars[0], NULL);
+ }
+
+ /*
+***************
+*** 7202,7208 ****
+ static void
+ f_isdirectory(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = mch_isdir(get_tv_string(&argvars[0]));
+ }
+
+ /*
+--- 7202,7208 ----
+ static void
+ f_isdirectory(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = mch_isdir(tv_get_string(&argvars[0]));
+ }
+
+ /*
+***************
+*** 7232,7238 ****
+ dictitem_T *di;
+
+ rettv->vval.v_number = -1;
+! end = get_lval(get_tv_string(&argvars[0]), NULL, &lv, FALSE, FALSE,
+ GLV_NO_AUTOLOAD | GLV_READ_ONLY, FNE_CHECK_START);
+ if (end != NULL && lv.ll_name != NULL)
+ {
+--- 7232,7238 ----
+ dictitem_T *di;
+
+ rettv->vval.v_number = -1;
+! end = get_lval(tv_get_string(&argvars[0]), NULL, &lv, FALSE, FALSE,
+ GLV_NO_AUTOLOAD | GLV_READ_ONLY, FNE_CHECK_START);
+ if (end != NULL && lv.ll_name != NULL)
+ {
+***************
+*** 7303,7309 ****
+
+ if (tv->v_type != VAR_JOB)
+ {
+! EMSG2(_(e_invarg2), get_tv_string(tv));
+ return NULL;
+ }
+ job = tv->vval.v_job;
+--- 7303,7309 ----
+
+ if (tv->v_type != VAR_JOB)
+ {
+! EMSG2(_(e_invarg2), tv_get_string(tv));
+ return NULL;
+ }
+ job = tv->vval.v_job;
+***************
+*** 7423,7429 ****
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ sep = (char_u *)" ";
+ else
+! sep = get_tv_string_chk(&argvars[1]);
+
+ rettv->v_type = VAR_STRING;
+
+--- 7423,7429 ----
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ sep = (char_u *)" ";
+ else
+! sep = tv_get_string_chk(&argvars[1]);
+
+ rettv->v_type = VAR_STRING;
+
+***************
+*** 7446,7452 ****
+ {
+ js_read_T reader;
+
+! reader.js_buf = get_tv_string(&argvars[0]);
+ reader.js_fill = NULL;
+ reader.js_used = 0;
+ if (json_decode_all(&reader, rettv, JSON_JS) != OK)
+--- 7446,7452 ----
+ {
+ js_read_T reader;
+
+! reader.js_buf = tv_get_string(&argvars[0]);
+ reader.js_fill = NULL;
+ reader.js_used = 0;
+ if (json_decode_all(&reader, rettv, JSON_JS) != OK)
+***************
+*** 7471,7477 ****
+ {
+ js_read_T reader;
+
+! reader.js_buf = get_tv_string(&argvars[0]);
+ reader.js_fill = NULL;
+ reader.js_used = 0;
+ json_decode_all(&reader, rettv, 0);
+--- 7471,7477 ----
+ {
+ js_read_T reader;
+
+! reader.js_buf = tv_get_string(&argvars[0]);
+ reader.js_fill = NULL;
+ reader.js_used = 0;
+ json_decode_all(&reader, rettv, 0);
+***************
+*** 7523,7529 ****
+ case VAR_STRING:
+ case VAR_NUMBER:
+ rettv->vval.v_number = (varnumber_T)STRLEN(
+! get_tv_string(&argvars[0]));
+ break;
+ case VAR_LIST:
+ rettv->vval.v_number = list_len(argvars[0].vval.v_list);
+--- 7523,7529 ----
+ case VAR_STRING:
+ case VAR_NUMBER:
+ rettv->vval.v_number = (varnumber_T)STRLEN(
+! tv_get_string(&argvars[0]));
+ break;
+ case VAR_LIST:
+ rettv->vval.v_number = list_len(argvars[0].vval.v_list);
+***************
+*** 7627,7633 ****
+ #else
+ linenr_T lnum;
+
+! lnum = get_tv_lnum(argvars);
+ if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count + 1)
+ rettv->vval.v_number = -1;
+ else
+--- 7627,7633 ----
+ #else
+ linenr_T lnum;
+
+! lnum = tv_get_lnum(argvars);
+ if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count + 1)
+ rettv->vval.v_number = -1;
+ else
+***************
+*** 7648,7654 ****
+ linenr_T lnum;
+
+ pos = curwin->w_cursor;
+! lnum = get_tv_lnum(argvars);
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
+ {
+ curwin->w_cursor.lnum = lnum;
+--- 7648,7654 ----
+ linenr_T lnum;
+
+ pos = curwin->w_cursor;
+! lnum = tv_get_lnum(argvars);
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
+ {
+ curwin->w_cursor.lnum = lnum;
+***************
+*** 7687,7704 ****
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+! keys = get_tv_string(&argvars[0]);
+ if (*keys == NUL)
+ return;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! which = get_tv_string_buf_chk(&argvars[1], buf);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! abbr = (int)get_tv_number(&argvars[2]);
+ if (argvars[3].v_type != VAR_UNKNOWN)
+! get_dict = (int)get_tv_number(&argvars[3]);
+ }
+ }
+ else
+--- 7687,7704 ----
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+! keys = tv_get_string(&argvars[0]);
+ if (*keys == NUL)
+ return;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! which = tv_get_string_buf_chk(&argvars[1], buf);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! abbr = (int)tv_get_number(&argvars[2]);
+ if (argvars[3].v_type != VAR_UNKNOWN)
+! get_dict = (int)tv_get_number(&argvars[3]);
+ }
+ }
+ else
+***************
+*** 7789,7795 ****
+ char_u *str;
+ char_u buf[NUMBUFLEN];
+
+! str = get_tv_string_buf(&argvars[0], buf);
+ do_luaeval(str, argvars + 1, rettv);
+ }
+ #endif
+--- 7789,7795 ----
+ char_u *str;
+ char_u buf[NUMBUFLEN];
+
+! str = tv_get_string_buf(&argvars[0], buf);
+ do_luaeval(str, argvars + 1, rettv);
+ }
+ #endif
+***************
+*** 7890,7900 ****
+ }
+ else
+ {
+! expr = str = get_tv_string(&argvars[0]);
+ len = (long)STRLEN(str);
+ }
+
+! pat = get_tv_string_buf_chk(&argvars[1], patbuf);
+ if (pat == NULL)
+ goto theend;
+
+--- 7890,7900 ----
+ }
+ else
+ {
+! expr = str = tv_get_string(&argvars[0]);
+ len = (long)STRLEN(str);
+ }
+
+! pat = tv_get_string_buf_chk(&argvars[1], patbuf);
+ if (pat == NULL)
+ goto theend;
+
+***************
+*** 7902,7908 ****
+ {
+ int error = FALSE;
+
+! start = (long)get_tv_number_chk(&argvars[2], &error);
+ if (error)
+ goto theend;
+ if (l != NULL)
+--- 7902,7908 ----
+ {
+ int error = FALSE;
+
+! start = (long)tv_get_number_chk(&argvars[2], &error);
+ if (error)
+ goto theend;
+ if (l != NULL)
+***************
+*** 7931,7937 ****
+ }
+
+ if (argvars[3].v_type != VAR_UNKNOWN)
+! nth = (long)get_tv_number_chk(&argvars[3], &error);
+ if (error)
+ goto theend;
+ }
+--- 7931,7937 ----
+ }
+
+ if (argvars[3].v_type != VAR_UNKNOWN)
+! nth = (long)tv_get_number_chk(&argvars[3], &error);
+ if (error)
+ goto theend;
+ }
+***************
+*** 8106,8113 ****
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+ char_u buf[NUMBUFLEN];
+! char_u *grp = get_tv_string_buf_chk(&argvars[0], buf); /* group */
+! char_u *pat = get_tv_string_buf_chk(&argvars[1], buf); /* pattern */
+ int prio = 10; /* default priority */
+ int id = -1;
+ int error = FALSE;
+--- 8106,8113 ----
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+ char_u buf[NUMBUFLEN];
+! char_u *grp = tv_get_string_buf_chk(&argvars[0], buf); /* group */
+! char_u *pat = tv_get_string_buf_chk(&argvars[1], buf); /* pattern */
+ int prio = 10; /* default priority */
+ int id = -1;
+ int error = FALSE;
+***************
+*** 8120,8129 ****
+ return;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! prio = (int)get_tv_number_chk(&argvars[2], &error);
+ 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;
+--- 8120,8129 ----
+ return;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! prio = (int)tv_get_number_chk(&argvars[2], &error);
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+! id = (int)tv_get_number_chk(&argvars[3], &error);
+ if (argvars[4].v_type != VAR_UNKNOWN
+ && matchadd_dict_arg(&argvars[4], &conceal_char, &win) == FAIL)
+ return;
+***************
+*** 8160,8166 ****
+
+ rettv->vval.v_number = -1;
+
+! group = get_tv_string_buf_chk(&argvars[0], buf);
+ if (group == NULL)
+ return;
+
+--- 8160,8166 ----
+
+ rettv->vval.v_number = -1;
+
+! group = tv_get_string_buf_chk(&argvars[0], buf);
+ if (group == NULL)
+ return;
+
+***************
+*** 8175,8184 ****
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! prio = (int)get_tv_number_chk(&argvars[2], &error);
+ 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)
+--- 8175,8184 ----
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! prio = (int)tv_get_number_chk(&argvars[2], &error);
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+! id = (int)tv_get_number_chk(&argvars[3], &error);
+
+ if (argvars[4].v_type != VAR_UNKNOWN
+ && matchadd_dict_arg(&argvars[4], &conceal_char, &win) == FAIL)
+***************
+*** 8209,8215 ****
+ if (rettv_list_alloc(rettv) == OK)
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+! int id = (int)get_tv_number(&argvars[0]);
+ matchitem_T *m;
+
+ if (id >= 1 && id <= 3)
+--- 8209,8215 ----
+ if (rettv_list_alloc(rettv) == OK)
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+! int id = (int)tv_get_number(&argvars[0]);
+ matchitem_T *m;
+
+ if (id >= 1 && id <= 3)
+***************
+*** 8238,8244 ****
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+ rettv->vval.v_number = match_delete(curwin,
+! (int)get_tv_number(&argvars[0]), TRUE);
+ #endif
+ }
+
+--- 8238,8244 ----
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+ rettv->vval.v_number = match_delete(curwin,
+! (int)tv_get_number(&argvars[0]), TRUE);
+ #endif
+ }
+
+***************
+*** 8296,8308 ****
+ li = l->lv_first;
+ if (li != NULL)
+ {
+! n = get_tv_number_chk(&li->li_tv, &error);
+ for (;;)
+ {
+ li = li->li_next;
+ if (li == NULL)
+ break;
+! i = get_tv_number_chk(&li->li_tv, &error);
+ if (domax ? i > n : i < n)
+ n = i;
+ }
+--- 8296,8308 ----
+ li = l->lv_first;
+ if (li != NULL)
+ {
+! n = tv_get_number_chk(&li->li_tv, &error);
+ for (;;)
+ {
+ li = li->li_next;
+ if (li == NULL)
+ break;
+! i = tv_get_number_chk(&li->li_tv, &error);
+ if (domax ? i > n : i < n)
+ n = i;
+ }
+***************
+*** 8325,8331 ****
+ if (!HASHITEM_EMPTY(hi))
+ {
+ --todo;
+! i = get_tv_number_chk(&HI2DI(hi)->di_tv, &error);
+ if (first)
+ {
+ n = i;
+--- 8325,8331 ----
+ if (!HASHITEM_EMPTY(hi))
+ {
+ --todo;
+! i = tv_get_number_chk(&HI2DI(hi)->di_tv, &error);
+ if (first)
+ {
+ n = i;
+***************
+*** 8405,8411 ****
+ if (check_restricted() || check_secure())
+ return;
+
+! dir = get_tv_string_buf(&argvars[0], buf);
+ if (*dir == NUL)
+ return;
+
+--- 8405,8411 ----
+ if (check_restricted() || check_secure())
+ return;
+
+! dir = tv_get_string_buf(&argvars[0], buf);
+ if (*dir == NUL)
+ return;
+
+***************
+*** 8417,8427 ****
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! prot = (int)get_tv_number_chk(&argvars[2], NULL);
+ if (prot == -1)
+ return;
+ }
+! if (STRCMP(get_tv_string(&argvars[1]), "p") == 0)
+ {
+ if (mch_isdir(dir))
+ {
+--- 8417,8427 ----
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! prot = (int)tv_get_number_chk(&argvars[2], NULL);
+ if (prot == -1)
+ return;
+ }
+! if (STRCMP(tv_get_string(&argvars[1]), "p") == 0)
+ {
+ if (mch_isdir(dir))
+ {
+***************
+*** 8535,8541 ****
+ char_u *str;
+ char_u buf[NUMBUFLEN];
+
+! str = get_tv_string_buf(&argvars[0], buf);
+ do_mzeval(str, rettv);
+ }
+
+--- 8535,8541 ----
+ char_u *str;
+ char_u buf[NUMBUFLEN];
+
+! str = tv_get_string_buf(&argvars[0], buf);
+ do_mzeval(str, rettv);
+ }
+
+***************
+*** 8561,8567 ****
+ {
+ linenr_T lnum;
+
+! for (lnum = get_tv_lnum(argvars); ; ++lnum)
+ {
+ if (lnum < 0 || lnum > curbuf->b_ml.ml_line_count)
+ {
+--- 8561,8567 ----
+ {
+ linenr_T lnum;
+
+! for (lnum = tv_get_lnum(argvars); ; ++lnum)
+ {
+ if (lnum < 0 || lnum > curbuf->b_ml.ml_line_count)
+ {
+***************
+*** 8588,8603 ****
+ int utf8 = 0;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! utf8 = (int)get_tv_number_chk(&argvars[1], NULL);
+ if (utf8)
+! buf[(*utf_char2bytes)((int)get_tv_number(&argvars[0]), buf)] = NUL;
+ else
+! buf[(*mb_char2bytes)((int)get_tv_number(&argvars[0]), buf)] = NUL;
+ }
+ else
+ #endif
+ {
+! buf[0] = (char_u)get_tv_number(&argvars[0]);
+ buf[1] = NUL;
+ }
+ rettv->v_type = VAR_STRING;
+--- 8588,8603 ----
+ int utf8 = 0;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! utf8 = (int)tv_get_number_chk(&argvars[1], NULL);
+ if (utf8)
+! buf[(*utf_char2bytes)((int)tv_get_number(&argvars[0]), buf)] = NUL;
+ else
+! buf[(*mb_char2bytes)((int)tv_get_number(&argvars[0]), buf)] = NUL;
+ }
+ else
+ #endif
+ {
+! buf[0] = (char_u)tv_get_number(&argvars[0]);
+ buf[1] = NUL;
+ }
+ rettv->v_type = VAR_STRING;
+***************
+*** 8610,8617 ****
+ static void
+ f_or(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = get_tv_number_chk(&argvars[0], NULL)
+! | get_tv_number_chk(&argvars[1], NULL);
+ }
+
+ /*
+--- 8610,8617 ----
+ static void
+ f_or(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = tv_get_number_chk(&argvars[0], NULL)
+! | tv_get_number_chk(&argvars[1], NULL);
+ }
+
+ /*
+***************
+*** 8623,8629 ****
+ char_u *p;
+
+ rettv->v_type = VAR_STRING;
+! p = get_tv_string_chk(&argvars[0]);
+ if (p == NULL)
+ rettv->vval.v_string = NULL;
+ else
+--- 8623,8629 ----
+ char_u *p;
+
+ rettv->v_type = VAR_STRING;
+! p = tv_get_string_chk(&argvars[0]);
+ if (p == NULL)
+ rettv->vval.v_string = NULL;
+ else
+***************
+*** 8645,8651 ****
+ char_u *str;
+ char_u buf[NUMBUFLEN];
+
+! str = get_tv_string_buf(&argvars[0], buf);
+ do_perleval(str, rettv);
+ }
+ #endif
+--- 8645,8651 ----
+ char_u *str;
+ char_u buf[NUMBUFLEN];
+
+! str = tv_get_string_buf(&argvars[0], buf);
+ do_perleval(str, rettv);
+ }
+ #endif
+***************
+*** 8676,8682 ****
+ {
+ linenr_T lnum;
+
+! lnum = get_tv_lnum(argvars);
+ if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count)
+ lnum = 0;
+ else
+--- 8676,8682 ----
+ {
+ linenr_T lnum;
+
+! lnum = tv_get_lnum(argvars);
+ if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count)
+ lnum = 0;
+ else
+***************
+*** 8708,8714 ****
+
+ /* Get the required length, allocate the buffer and do it for real. */
+ did_emsg = FALSE;
+! fmt = (char *)get_tv_string_buf(&argvars[0], buf);
+ len = vim_vsnprintf_typval(NULL, 0, fmt, ap, argvars + 1);
+ if (!did_emsg)
+ {
+--- 8708,8714 ----
+
+ /* Get the required length, allocate the buffer and do it for real. */
+ did_emsg = FALSE;
+! fmt = (char *)tv_get_string_buf(&argvars[0], buf);
+ len = vim_vsnprintf_typval(NULL, 0, fmt, ap, argvars + 1);
+ if (!did_emsg)
+ {
+***************
+*** 8797,8803 ****
+ if (buf == NULL)
+ return;
+
+! text = get_tv_string(&argvars[1]);
+ vim_free(buf->b_prompt_text);
+ buf->b_prompt_text = vim_strsave(text);
+ }
+--- 8797,8803 ----
+ if (buf == NULL)
+ return;
+
+! text = tv_get_string(&argvars[1]);
+ vim_free(buf->b_prompt_text);
+ buf->b_prompt_text = vim_strsave(text);
+ }
+***************
+*** 8828,8834 ****
+ if (p_pyx == 0)
+ p_pyx = 3;
+
+! str = get_tv_string_buf(&argvars[0], buf);
+ do_py3eval(str, rettv);
+ }
+ #endif
+--- 8828,8834 ----
+ if (p_pyx == 0)
+ p_pyx = 3;
+
+! str = tv_get_string_buf(&argvars[0], buf);
+ do_py3eval(str, rettv);
+ }
+ #endif
+***************
+*** 8846,8852 ****
+ if (p_pyx == 0)
+ p_pyx = 2;
+
+! str = get_tv_string_buf(&argvars[0], buf);
+ do_pyeval(str, rettv);
+ }
+ #endif
+--- 8846,8852 ----
+ if (p_pyx == 0)
+ p_pyx = 2;
+
+! str = tv_get_string_buf(&argvars[0], buf);
+ do_pyeval(str, rettv);
+ }
+ #endif
+***************
+*** 8884,8890 ****
+ varnumber_T i;
+ int error = FALSE;
+
+! start = get_tv_number_chk(&argvars[0], &error);
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ {
+ end = start - 1;
+--- 8884,8890 ----
+ varnumber_T i;
+ int error = FALSE;
+
+! start = tv_get_number_chk(&argvars[0], &error);
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ {
+ end = start - 1;
+***************
+*** 8892,8900 ****
+ }
+ else
+ {
+! end = get_tv_number_chk(&argvars[1], &error);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! stride = get_tv_number_chk(&argvars[2], &error);
+ }
+
+ if (error)
+--- 8892,8900 ----
+ }
+ else
+ {
+! end = tv_get_number_chk(&argvars[1], &error);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! stride = tv_get_number_chk(&argvars[2], &error);
+ }
+
+ if (error)
+***************
+*** 8936,8945 ****
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! if (STRCMP(get_tv_string(&argvars[1]), "b") == 0)
+ binary = TRUE;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! maxline = (long)get_tv_number(&argvars[2]);
+ }
+
+ if (rettv_list_alloc(rettv) == FAIL)
+--- 8936,8945 ----
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! if (STRCMP(tv_get_string(&argvars[1]), "b") == 0)
+ binary = TRUE;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! maxline = (long)tv_get_number(&argvars[2]);
+ }
+
+ if (rettv_list_alloc(rettv) == FAIL)
+***************
+*** 8947,8953 ****
+
+ /* Always open the file in binary mode, library functions have a mind of
+ * their own about CR-LF conversion. */
+! fname = get_tv_string(&argvars[0]);
+ if (*fname == NUL || (fd = mch_fopen((char *)fname, READBIN)) == NULL)
+ {
+ EMSG2(_(e_notopen), *fname == NUL ? (char_u *)_("<empty>") : fname);
+--- 8947,8953 ----
+
+ /* Always open the file in binary mode, library functions have a mind of
+ * their own about CR-LF conversion. */
+! fname = tv_get_string(&argvars[0]);
+ if (*fname == NUL || (fd = mch_fopen((char *)fname, READBIN)) == NULL)
+ {
+ EMSG2(_(e_notopen), *fname == NUL ? (char_u *)_("<empty>") : fname);
+***************
+*** 9318,9329 ****
+ # endif
+ if (argvars[2].v_type != VAR_UNKNOWN
+ && argvars[3].v_type != VAR_UNKNOWN)
+! timeout = get_tv_number(&argvars[3]);
+
+! server_name = get_tv_string_chk(&argvars[0]);
+ if (server_name == NULL)
+ return; /* type error; errmsg already given */
+! keys = get_tv_string_buf(&argvars[1], buf);
+ # ifdef WIN32
+ if (serverSendToVim(server_name, keys, &r, &w, expr, timeout, TRUE) < 0)
+ # else
+--- 9318,9329 ----
+ # endif
+ if (argvars[2].v_type != VAR_UNKNOWN
+ && argvars[3].v_type != VAR_UNKNOWN)
+! timeout = tv_get_number(&argvars[3]);
+
+! server_name = tv_get_string_chk(&argvars[0]);
+ if (server_name == NULL)
+ return; /* type error; errmsg already given */
+! keys = tv_get_string_buf(&argvars[1], buf);
+ # ifdef WIN32
+ if (serverSendToVim(server_name, keys, &r, &w, expr, timeout, TRUE) < 0)
+ # else
+***************
+*** 9349,9355 ****
+ char_u str[30];
+ char_u *idvar;
+
+! idvar = get_tv_string_chk(&argvars[2]);
+ if (idvar != NULL && *idvar != NUL)
+ {
+ sprintf((char *)str, PRINTF_HEX_LONG_U, (long_u)w);
+--- 9349,9355 ----
+ char_u str[30];
+ char_u *idvar;
+
+! idvar = tv_get_string_chk(&argvars[2]);
+ if (idvar != NULL && *idvar != NUL)
+ {
+ sprintf((char *)str, PRINTF_HEX_LONG_U, (long_u)w);
+***************
+*** 9385,9391 ****
+ # ifdef WIN32
+ /* On Win32 it's done in this application. */
+ {
+! char_u *server_name = get_tv_string_chk(&argvars[0]);
+
+ if (server_name != NULL)
+ serverForeground(server_name);
+--- 9385,9391 ----
+ # ifdef WIN32
+ /* On Win32 it's done in this application. */
+ {
+! char_u *server_name = tv_get_string_chk(&argvars[0]);
+
+ if (server_name != NULL)
+ serverForeground(server_name);
+***************
+*** 9419,9425 ****
+ rettv->vval.v_number = -1;
+ return;
+ }
+! serverid = get_tv_string_chk(&argvars[0]);
+ if (serverid == NULL)
+ {
+ rettv->vval.v_number = -1;
+--- 9419,9425 ----
+ rettv->vval.v_number = -1;
+ return;
+ }
+! serverid = tv_get_string_chk(&argvars[0]);
+ if (serverid == NULL)
+ {
+ rettv->vval.v_number = -1;
+***************
+*** 9448,9454 ****
+
+ v.di_tv.v_type = VAR_STRING;
+ v.di_tv.vval.v_string = vim_strsave(s);
+! retvar = get_tv_string_chk(&argvars[1]);
+ if (retvar != NULL)
+ set_var(retvar, &v.di_tv, FALSE);
+ vim_free(v.di_tv.vval.v_string);
+--- 9448,9454 ----
+
+ v.di_tv.v_type = VAR_STRING;
+ v.di_tv.vval.v_string = vim_strsave(s);
+! retvar = tv_get_string_chk(&argvars[1]);
+ if (retvar != NULL)
+ set_var(retvar, &v.di_tv, FALSE);
+ vim_free(v.di_tv.vval.v_string);
+***************
+*** 9464,9470 ****
+ char_u *r = NULL;
+
+ #ifdef FEAT_CLIENTSERVER
+! char_u *serverid = get_tv_string_chk(&argvars[0]);
+
+ if (serverid != NULL && !check_restricted() && !check_secure())
+ {
+--- 9464,9470 ----
+ char_u *r = NULL;
+
+ #ifdef FEAT_CLIENTSERVER
+! char_u *serverid = tv_get_string_chk(&argvars[0]);
+
+ if (serverid != NULL && !check_restricted() && !check_secure())
+ {
+***************
+*** 9475,9481 ****
+ # endif
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! timeout = get_tv_number(&argvars[1]);
+
+ # ifdef WIN32
+ sscanf((char *)serverid, SCANF_HEX_LONG_U, &n);
+--- 9475,9481 ----
+ # endif
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! timeout = tv_get_number(&argvars[1]);
+
+ # ifdef WIN32
+ sscanf((char *)serverid, SCANF_HEX_LONG_U, &n);
+***************
+*** 9514,9520 ****
+ f_remote_startserver(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_CLIENTSERVER
+! char_u *server = get_tv_string_chk(&argvars[0]);
+
+ if (server == NULL)
+ return; /* type error; errmsg already given */
+--- 9514,9520 ----
+ f_remote_startserver(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_CLIENTSERVER
+! char_u *server = tv_get_string_chk(&argvars[0]);
+
+ if (server == NULL)
+ return; /* type error; errmsg already given */
+***************
+*** 9557,9563 ****
+ else if ((d = argvars[0].vval.v_dict) != NULL
+ && !tv_check_lock(d->dv_lock, arg_errmsg, TRUE))
+ {
+! key = get_tv_string_chk(&argvars[1]);
+ if (key != NULL)
+ {
+ di = dict_find(d, key, -1);
+--- 9557,9563 ----
+ else if ((d = argvars[0].vval.v_dict) != NULL
+ && !tv_check_lock(d->dv_lock, arg_errmsg, TRUE))
+ {
+! key = tv_get_string_chk(&argvars[1]);
+ if (key != NULL)
+ {
+ di = dict_find(d, key, -1);
+***************
+*** 9580,9586 ****
+ {
+ int error = FALSE;
+
+! idx = (long)get_tv_number_chk(&argvars[1], &error);
+ if (error)
+ ; /* type error: do nothing, errmsg already given */
+ else if ((item = list_find(l, idx)) == NULL)
+--- 9580,9586 ----
+ {
+ int error = FALSE;
+
+! idx = (long)tv_get_number_chk(&argvars[1], &error);
+ if (error)
+ ; /* type error: do nothing, errmsg already given */
+ else if ((item = list_find(l, idx)) == NULL)
+***************
+*** 9597,9603 ****
+ else
+ {
+ /* Remove range of items, return list with values. */
+! end = (long)get_tv_number_chk(&argvars[2], &error);
+ if (error)
+ ; /* type error: do nothing */
+ else if ((item2 = list_find(l, end)) == NULL)
+--- 9597,9603 ----
+ else
+ {
+ /* Remove range of items, return list with values. */
+! end = (long)tv_get_number_chk(&argvars[2], &error);
+ if (error)
+ ; /* type error: do nothing */
+ else if ((item2 = list_find(l, end)) == NULL)
+***************
+*** 9644,9651 ****
+ if (check_restricted() || check_secure())
+ rettv->vval.v_number = -1;
+ else
+! rettv->vval.v_number = vim_rename(get_tv_string(&argvars[0]),
+! get_tv_string_buf(&argvars[1], buf));
+ }
+
+ /*
+--- 9644,9651 ----
+ if (check_restricted() || check_secure())
+ rettv->vval.v_number = -1;
+ else
+! rettv->vval.v_number = vim_rename(tv_get_string(&argvars[0]),
+! tv_get_string_buf(&argvars[1], buf));
+ }
+
+ /*
+***************
+*** 9661,9667 ****
+ char_u *r;
+ int i;
+
+! n = (int)get_tv_number(&argvars[1]);
+ if (argvars[0].v_type == VAR_LIST)
+ {
+ if (rettv_list_alloc(rettv) == OK && argvars[0].vval.v_list != NULL)
+--- 9661,9667 ----
+ char_u *r;
+ int i;
+
+! n = (int)tv_get_number(&argvars[1]);
+ if (argvars[0].v_type == VAR_LIST)
+ {
+ if (rettv_list_alloc(rettv) == OK && argvars[0].vval.v_list != NULL)
+***************
+*** 9672,9678 ****
+ }
+ else
+ {
+! p = get_tv_string(&argvars[0]);
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+--- 9672,9678 ----
+ }
+ else
+ {
+! p = tv_get_string(&argvars[0]);
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+***************
+*** 9704,9710 ****
+ char_u *buf = NULL;
+ #endif
+
+! p = get_tv_string(&argvars[0]);
+ #ifdef FEAT_SHORTCUT
+ {
+ char_u *v = NULL;
+--- 9704,9710 ----
+ char_u *buf = NULL;
+ #endif
+
+! p = tv_get_string(&argvars[0]);
+ #ifdef FEAT_SHORTCUT
+ {
+ char_u *v = NULL;
+***************
+*** 9950,9956 ****
+
+ if (varp->v_type != VAR_UNKNOWN)
+ {
+! flags = get_tv_string_buf_chk(varp, nbuf);
+ if (flags == NULL)
+ return 0; /* type error; errmsg already given */
+ while (*flags != NUL)
+--- 9950,9956 ----
+
+ if (varp->v_type != VAR_UNKNOWN)
+ {
+! flags = tv_get_string_buf_chk(varp, nbuf);
+ if (flags == NULL)
+ return 0; /* type error; errmsg already given */
+ while (*flags != NUL)
+***************
+*** 10010,10016 ****
+ int options = SEARCH_KEEP;
+ int subpatnum;
+
+! pat = get_tv_string(&argvars[0]);
+ dir = get_search_arg(&argvars[1], flagsp); /* may set p_ws */
+ if (dir == 0)
+ goto theend;
+--- 10010,10016 ----
+ int options = SEARCH_KEEP;
+ int subpatnum;
+
+! pat = tv_get_string(&argvars[0]);
+ dir = get_search_arg(&argvars[1], flagsp); /* may set p_ws */
+ if (dir == 0)
+ goto theend;
+***************
+*** 10025,10037 ****
+ /* Optional arguments: line number to stop searching and timeout. */
+ if (argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN)
+ {
+! lnum_stop = (long)get_tv_number_chk(&argvars[2], NULL);
+ if (lnum_stop < 0)
+ goto theend;
+ #ifdef FEAT_RELTIME
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+! time_limit = (long)get_tv_number_chk(&argvars[3], NULL);
+ if (time_limit < 0)
+ goto theend;
+ }
+--- 10025,10037 ----
+ /* Optional arguments: line number to stop searching and timeout. */
+ if (argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN)
+ {
+! lnum_stop = (long)tv_get_number_chk(&argvars[2], NULL);
+ if (lnum_stop < 0)
+ goto theend;
+ #ifdef FEAT_RELTIME
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+! time_limit = (long)tv_get_number_chk(&argvars[3], NULL);
+ if (time_limit < 0)
+ goto theend;
+ }
+***************
+*** 10052,10058 ****
+ if (((flags & (SP_REPEAT | SP_RETCOUNT)) != 0)
+ || ((flags & SP_NOMOVE) && (flags & SP_SETPCMARK)))
+ {
+! EMSG2(_(e_invarg2), get_tv_string(&argvars[1]));
+ goto theend;
+ }
+
+--- 10052,10058 ----
+ if (((flags & (SP_REPEAT | SP_RETCOUNT)) != 0)
+ || ((flags & SP_NOMOVE) && (flags & SP_SETPCMARK)))
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[1]));
+ goto theend;
+ }
+
+***************
+*** 10127,10134 ****
+ int col;
+ int c;
+
+! row = (int)get_tv_number_chk(&argvars[0], NULL) - 1;
+! col = (int)get_tv_number_chk(&argvars[1], NULL) - 1;
+ if (row < 0 || row >= screen_Rows
+ || col < 0 || col >= screen_Columns)
+ c = -1;
+--- 10127,10134 ----
+ int col;
+ int c;
+
+! row = (int)tv_get_number_chk(&argvars[0], NULL) - 1;
+! col = (int)tv_get_number_chk(&argvars[1], NULL) - 1;
+ if (row < 0 || row >= screen_Rows
+ || col < 0 || col >= screen_Columns)
+ c = -1;
+***************
+*** 10148,10155 ****
+ int off;
+ int c;
+
+! row = (int)get_tv_number_chk(&argvars[0], NULL) - 1;
+! col = (int)get_tv_number_chk(&argvars[1], NULL) - 1;
+ if (row < 0 || row >= screen_Rows
+ || col < 0 || col >= screen_Columns)
+ c = -1;
+--- 10148,10155 ----
+ int off;
+ int c;
+
+! row = (int)tv_get_number_chk(&argvars[0], NULL) - 1;
+! col = (int)tv_get_number_chk(&argvars[1], NULL) - 1;
+ if (row < 0 || row >= screen_Rows
+ || col < 0 || col >= screen_Columns)
+ c = -1;
+***************
+*** 10210,10221 ****
+
+ rettv->vval.v_number = 1; /* default: FAIL */
+
+! name = get_tv_string_chk(&argvars[0]);
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! locally = (int)get_tv_number_chk(&argvars[1], &error) == 0;
+ if (!error && argvars[2].v_type != VAR_UNKNOWN)
+! thisblock = (int)get_tv_number_chk(&argvars[2], &error) != 0;
+ }
+ if (!error && name != NULL)
+ rettv->vval.v_number = find_decl(name, (int)STRLEN(name),
+--- 10210,10221 ----
+
+ rettv->vval.v_number = 1; /* default: FAIL */
+
+! name = tv_get_string_chk(&argvars[0]);
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! locally = (int)tv_get_number_chk(&argvars[1], &error) == 0;
+ if (!error && argvars[2].v_type != VAR_UNKNOWN)
+! thisblock = (int)tv_get_number_chk(&argvars[2], &error) != 0;
+ }
+ if (!error && name != NULL)
+ rettv->vval.v_number = find_decl(name, (int)STRLEN(name),
+***************
+*** 10241,10249 ****
+
+ /* Get the three pattern arguments: start, middle, end. Will result in an
+ * error if not a valid argument. */
+! spat = get_tv_string_chk(&argvars[0]);
+! mpat = get_tv_string_buf_chk(&argvars[1], nbuf1);
+! epat = get_tv_string_buf_chk(&argvars[2], nbuf2);
+ if (spat == NULL || mpat == NULL || epat == NULL)
+ goto theend; /* type error */
+
+--- 10241,10249 ----
+
+ /* Get the three pattern arguments: start, middle, end. Will result in an
+ * error if not a valid argument. */
+! spat = tv_get_string_chk(&argvars[0]);
+! mpat = tv_get_string_buf_chk(&argvars[1], nbuf1);
+! epat = tv_get_string_buf_chk(&argvars[2], nbuf2);
+ if (spat == NULL || mpat == NULL || epat == NULL)
+ goto theend; /* type error */
+
+***************
+*** 10258,10264 ****
+ if ((flags & (SP_END | SP_SUBPAT)) != 0
+ || ((flags & SP_NOMOVE) && (flags & SP_SETPCMARK)))
+ {
+! EMSG2(_(e_invarg2), get_tv_string(&argvars[3]));
+ goto theend;
+ }
+
+--- 10258,10264 ----
+ if ((flags & (SP_END | SP_SUBPAT)) != 0
+ || ((flags & SP_NOMOVE) && (flags & SP_SETPCMARK)))
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[3]));
+ goto theend;
+ }
+
+***************
+*** 10277,10300 ****
+ && skip->v_type != VAR_STRING)
+ {
+ /* Type error */
+! EMSG2(_(e_invarg2), get_tv_string(&argvars[4]));
+ goto theend;
+ }
+ if (argvars[5].v_type != VAR_UNKNOWN)
+ {
+! lnum_stop = (long)get_tv_number_chk(&argvars[5], NULL);
+ if (lnum_stop < 0)
+ {
+! EMSG2(_(e_invarg2), get_tv_string(&argvars[5]));
+ goto theend;
+ }
+ #ifdef FEAT_RELTIME
+ if (argvars[6].v_type != VAR_UNKNOWN)
+ {
+! time_limit = (long)get_tv_number_chk(&argvars[6], NULL);
+ if (time_limit < 0)
+ {
+! EMSG2(_(e_invarg2), get_tv_string(&argvars[6]));
+ goto theend;
+ }
+ }
+--- 10277,10300 ----
+ && skip->v_type != VAR_STRING)
+ {
+ /* Type error */
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[4]));
+ goto theend;
+ }
+ if (argvars[5].v_type != VAR_UNKNOWN)
+ {
+! lnum_stop = (long)tv_get_number_chk(&argvars[5], NULL);
+ if (lnum_stop < 0)
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[5]));
+ goto theend;
+ }
+ #ifdef FEAT_RELTIME
+ if (argvars[6].v_type != VAR_UNKNOWN)
+ {
+! time_limit = (long)tv_get_number_chk(&argvars[6], NULL);
+ if (time_limit < 0)
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[6]));
+ goto theend;
+ }
+ }
+***************
+*** 10544,10551 ****
+ {
+ #ifdef FEAT_CLIENTSERVER
+ char_u buf[NUMBUFLEN];
+! char_u *server = get_tv_string_chk(&argvars[0]);
+! char_u *reply = get_tv_string_buf_chk(&argvars[1], buf);
+
+ rettv->vval.v_number = -1;
+ if (server == NULL || reply == NULL)
+--- 10544,10551 ----
+ {
+ #ifdef FEAT_CLIENTSERVER
+ char_u buf[NUMBUFLEN];
+! char_u *server = tv_get_string_chk(&argvars[0]);
+! char_u *reply = tv_get_string_buf_chk(&argvars[1], buf);
+
+ rettv->vval.v_number = -1;
+ if (server == NULL || reply == NULL)
+***************
+*** 10600,10606 ****
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+ {
+! lnum = get_tv_lnum_buf(&argvars[1], buf);
+ set_buffer_lines(buf, lnum, FALSE, &argvars[2], rettv);
+ }
+ }
+--- 10600,10606 ----
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+ {
+! lnum = tv_get_lnum_buf(&argvars[1], buf);
+ set_buffer_lines(buf, lnum, FALSE, &argvars[2], rettv);
+ }
+ }
+***************
+*** 10618,10625 ****
+
+ if (check_restricted() || check_secure())
+ return;
+! (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */
+! varname = get_tv_string_chk(&argvars[1]);
+ buf = get_buf_tv(&argvars[0], FALSE);
+ varp = &argvars[2];
+
+--- 10618,10625 ----
+
+ if (check_restricted() || check_secure())
+ return;
+! (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+! varname = tv_get_string_chk(&argvars[1]);
+ buf = get_buf_tv(&argvars[0], FALSE);
+ varp = &argvars[2];
+
+***************
+*** 10636,10643 ****
+ aucmd_prepbuf(&aco, buf);
+
+ ++varname;
+! numval = (long)get_tv_number_chk(varp, &error);
+! strval = get_tv_string_buf_chk(varp, nbuf);
+ if (!error && strval != NULL)
+ set_option_value(varname, numval, strval, OPT_LOCAL);
+
+--- 10636,10643 ----
+ aucmd_prepbuf(&aco, buf);
+
+ ++varname;
+! numval = (long)tv_get_number_chk(varp, &error);
+! strval = tv_get_string_buf_chk(varp, nbuf);
+ if (!error && strval != NULL)
+ set_option_value(varname, numval, strval, OPT_LOCAL);
+
+***************
+*** 10696,10707 ****
+
+ di = dict_find(d, (char_u *)"forward", -1);
+ if (di != NULL)
+! set_csearch_direction((int)get_tv_number(&di->di_tv)
+ ? FORWARD : BACKWARD);
+
+ di = dict_find(d, (char_u *)"until", -1);
+ if (di != NULL)
+! set_csearch_until(!!get_tv_number(&di->di_tv));
+ }
+ }
+
+--- 10696,10707 ----
+
+ di = dict_find(d, (char_u *)"forward", -1);
+ if (di != NULL)
+! set_csearch_direction((int)tv_get_number(&di->di_tv)
+ ? FORWARD : BACKWARD);
+
+ di = dict_find(d, (char_u *)"until", -1);
+ if (di != NULL)
+! set_csearch_until(!!tv_get_number(&di->di_tv));
+ }
+ }
+
+***************
+*** 10711,10717 ****
+ static void
+ f_setcmdpos(typval_T *argvars, typval_T *rettv)
+ {
+! int pos = (int)get_tv_number(&argvars[0]) - 1;
+
+ if (pos >= 0)
+ rettv->vval.v_number = set_cmdline_pos(pos);
+--- 10711,10717 ----
+ static void
+ f_setcmdpos(typval_T *argvars, typval_T *rettv)
+ {
+! int pos = (int)tv_get_number(&argvars[0]) - 1;
+
+ if (pos >= 0)
+ rettv->vval.v_number = set_cmdline_pos(pos);
+***************
+*** 10731,10740 ****
+ int mode = 0;
+
+ rettv->vval.v_number = 0;
+! fname = get_tv_string_chk(&argvars[0]);
+ if (fname == NULL)
+ return;
+! mode_str = get_tv_string_buf_chk(&argvars[1], modebuf);
+ if (mode_str == NULL)
+ return;
+ if (STRLEN(mode_str) != 9)
+--- 10731,10740 ----
+ int mode = 0;
+
+ rettv->vval.v_number = 0;
+! fname = tv_get_string_chk(&argvars[0]);
+ if (fname == NULL)
+ return;
+! mode_str = tv_get_string_buf_chk(&argvars[1], modebuf);
+ if (mode_str == NULL)
+ return;
+ if (STRLEN(mode_str) != 9)
+***************
+*** 10759,10765 ****
+ static void
+ f_setline(typval_T *argvars, typval_T *rettv)
+ {
+! linenr_T lnum = get_tv_lnum(&argvars[0]);
+
+ set_buffer_lines(curbuf, lnum, FALSE, &argvars[1], rettv);
+ }
+--- 10759,10765 ----
+ static void
+ f_setline(typval_T *argvars, typval_T *rettv)
+ {
+! linenr_T lnum = tv_get_lnum(&argvars[0]);
+
+ set_buffer_lines(curbuf, lnum, FALSE, &argvars[1], rettv);
+ }
+***************
+*** 10797,10803 ****
+
+ if (action_arg->v_type == VAR_STRING)
+ {
+! act = get_tv_string_chk(action_arg);
+ if (act == NULL)
+ return; /* type error; errmsg already given */
+ if ((*act == 'a' || *act == 'r' || *act == ' ' || *act == 'f') &&
+--- 10797,10803 ----
+
+ if (action_arg->v_type == VAR_STRING)
+ {
+! act = tv_get_string_chk(action_arg);
+ if (act == NULL)
+ return; /* type error; errmsg already given */
+ if ((*act == 'a' || *act == 'r' || *act == ' ' || *act == 'f') &&
+***************
+*** 10971,10977 ****
+ colnr_T curswant = -1;
+
+ rettv->vval.v_number = -1;
+! name = get_tv_string_chk(argvars);
+ if (name != NULL)
+ {
+ if (list2fpos(&argvars[1], &pos, &fnum, &curswant) == OK)
+--- 10971,10977 ----
+ colnr_T curswant = -1;
+
+ rettv->vval.v_number = -1;
+! name = tv_get_string_chk(argvars);
+ if (name != NULL)
+ {
+ if (list2fpos(&argvars[1], &pos, &fnum, &curswant) == OK)
+***************
+*** 11029,11035 ****
+ yank_type = MAUTO;
+ append = FALSE;
+
+! strregname = get_tv_string_chk(argvars);
+ rettv->vval.v_number = 1; /* FAIL is default */
+
+ if (strregname == NULL)
+--- 11029,11035 ----
+ yank_type = MAUTO;
+ append = FALSE;
+
+! strregname = tv_get_string_chk(argvars);
+ rettv->vval.v_number = 1; /* FAIL is default */
+
+ if (strregname == NULL)
+***************
+*** 11040,11046 ****
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! stropt = get_tv_string_chk(&argvars[2]);
+ if (stropt == NULL)
+ return; /* type error */
+ for (; *stropt != NUL; ++stropt)
+--- 11040,11046 ----
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! stropt = tv_get_string_chk(&argvars[2]);
+ if (stropt == NULL)
+ return; /* type error */
+ for (; *stropt != NUL; ++stropt)
+***************
+*** 11093,11104 ****
+ for (li = ll == NULL ? NULL : ll->lv_first; li != NULL;
+ li = li->li_next)
+ {
+! strval = get_tv_string_buf_chk(&li->li_tv, buf);
+ if (strval == NULL)
+ goto free_lstval;
+ if (strval == buf)
+ {
+! /* Need to make a copy, next get_tv_string_buf_chk() will
+ * overwrite the string. */
+ strval = vim_strsave(buf);
+ if (strval == NULL)
+--- 11093,11104 ----
+ for (li = ll == NULL ? NULL : ll->lv_first; li != NULL;
+ li = li->li_next)
+ {
+! strval = tv_get_string_buf_chk(&li->li_tv, buf);
+ if (strval == NULL)
+ goto free_lstval;
+ if (strval == buf)
+ {
+! /* Need to make a copy, next tv_get_string_buf_chk() will
+ * overwrite the string. */
+ strval = vim_strsave(buf);
+ if (strval == NULL)
+***************
+*** 11118,11124 ****
+ }
+ else
+ {
+! strval = get_tv_string_chk(&argvars[1]);
+ if (strval == NULL)
+ return;
+ write_reg_contents_ex(regname, strval, -1,
+--- 11118,11124 ----
+ }
+ else
+ {
+! strval = tv_get_string_chk(&argvars[1]);
+ if (strval == NULL)
+ return;
+ write_reg_contents_ex(regname, strval, -1,
+***************
+*** 11143,11150 ****
+ if (check_restricted() || check_secure())
+ return;
+
+! tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
+! varname = get_tv_string_chk(&argvars[1]);
+ varp = &argvars[2];
+
+ if (varname != NULL && varp != NULL && tp != NULL)
+--- 11143,11150 ----
+ if (check_restricted() || check_secure())
+ return;
+
+! tp = find_tabpage((int)tv_get_number_chk(&argvars[0], NULL));
+! varname = tv_get_string_chk(&argvars[1]);
+ varp = &argvars[2];
+
+ if (varname != NULL && varp != NULL && tp != NULL)
+***************
+*** 11211,11217 ****
+ 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)
+--- 11211,11217 ----
+ else if (argvars[2].v_type == VAR_STRING)
+ {
+ char_u *actstr;
+! actstr = tv_get_string_chk(&argvars[2]);
+ if (actstr == NULL)
+ return;
+ if ((*actstr == 'r' || *actstr == 'a') && actstr[1] == NUL)
+***************
+*** 11250,11256 ****
+ {
+ char_u *p;
+
+! p = get_tv_string(&argvars[0]);
+ rettv->vval.v_string = vim_strsave(
+ sha256_bytes(p, (int)STRLEN(p), NULL, 0));
+ rettv->v_type = VAR_STRING;
+--- 11250,11256 ----
+ {
+ char_u *p;
+
+! p = tv_get_string(&argvars[0]);
+ rettv->vval.v_string = vim_strsave(
+ sha256_bytes(p, (int)STRLEN(p), NULL, 0));
+ rettv->v_type = VAR_STRING;
+***************
+*** 11266,11272 ****
+ int do_special = non_zero_arg(&argvars[1]);
+
+ rettv->vval.v_string = vim_strsave_shellescape(
+! get_tv_string(&argvars[0]), do_special, do_special);
+ rettv->v_type = VAR_STRING;
+ }
+
+--- 11266,11272 ----
+ int do_special = non_zero_arg(&argvars[1]);
+
+ rettv->vval.v_string = vim_strsave_shellescape(
+! tv_get_string(&argvars[0]), do_special, do_special);
+ rettv->v_type = VAR_STRING;
+ }
+
+***************
+*** 11282,11288 ****
+ {
+ long col;
+
+! col = (long)get_tv_number_chk(argvars, NULL);
+ if (col < 0)
+ return; // type error; errmsg already given
+ #ifdef FEAT_VARTABS
+--- 11282,11288 ----
+ {
+ long col;
+
+! col = (long)tv_get_number_chk(argvars, NULL);
+ if (col < 0)
+ return; // type error; errmsg already given
+ #ifdef FEAT_VARTABS
+***************
+*** 11310,11316 ****
+
+ rettv->vval.v_number = -1;
+
+! name = get_tv_string_chk(&argvars[0]);
+ if (name == NULL)
+ return;
+
+--- 11310,11316 ----
+
+ rettv->vval.v_number = -1;
+
+! name = tv_get_string_chk(&argvars[0]);
+ if (name == NULL)
+ return;
+
+***************
+*** 11355,11361 ****
+ return;
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+! name = get_tv_string(&argvars[0]);
+
+ sign_getlist(name, rettv->vval.v_list);
+ }
+--- 11355,11361 ----
+ return;
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+! name = tv_get_string(&argvars[0]);
+
+ sign_getlist(name, rettv->vval.v_list);
+ }
+***************
+*** 11384,11390 ****
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+! get_tv_string(&argvars[0]));
+ return;
+ }
+
+--- 11384,11390 ----
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+! tv_get_string(&argvars[0]));
+ return;
+ }
+
+***************
+*** 11399,11419 ****
+ if ((di = dict_find(dict, (char_u *)"lnum", -1)) != NULL)
+ {
+ // get signs placed at this line
+! (void)get_tv_number_chk(&di->di_tv, &notanum);
+ if (notanum)
+ return;
+! lnum = get_tv_lnum(&di->di_tv);
+ }
+ if ((di = dict_find(dict, (char_u *)"id", -1)) != NULL)
+ {
+ // get sign placed with this identifier
+! sign_id = (int)get_tv_number_chk(&di->di_tv, &notanum);
+ if (notanum)
+ return;
+ }
+ if ((di = dict_find(dict, (char_u *)"group", -1)) != NULL)
+ {
+! group = get_tv_string_chk(&di->di_tv);
+ if (group == NULL)
+ return;
+ }
+--- 11399,11419 ----
+ if ((di = dict_find(dict, (char_u *)"lnum", -1)) != NULL)
+ {
+ // get signs placed at this line
+! (void)tv_get_number_chk(&di->di_tv, &notanum);
+ if (notanum)
+ return;
+! lnum = tv_get_lnum(&di->di_tv);
+ }
+ if ((di = dict_find(dict, (char_u *)"id", -1)) != NULL)
+ {
+ // get sign placed with this identifier
+! sign_id = (int)tv_get_number_chk(&di->di_tv, &notanum);
+ if (notanum)
+ return;
+ }
+ if ((di = dict_find(dict, (char_u *)"group", -1)) != NULL)
+ {
+! group = tv_get_string_chk(&di->di_tv);
+ if (group == NULL)
+ return;
+ }
+***************
+*** 11442,11448 ****
+ rettv->vval.v_number = -1;
+
+ // Sign identifer
+! sign_id = (int)get_tv_number_chk(&argvars[0], &notanum);
+ if (notanum)
+ return;
+ if (sign_id < 0)
+--- 11442,11448 ----
+ rettv->vval.v_number = -1;
+
+ // Sign identifer
+! sign_id = (int)tv_get_number_chk(&argvars[0], &notanum);
+ if (notanum)
+ return;
+ if (sign_id < 0)
+***************
+*** 11452,11458 ****
+ }
+
+ // Sign group
+! group = get_tv_string_chk(&argvars[1]);
+ if (group == NULL)
+ return;
+ if (group[0] == '\0')
+--- 11452,11458 ----
+ }
+
+ // Sign group
+! group = tv_get_string_chk(&argvars[1]);
+ if (group == NULL)
+ return;
+ if (group[0] == '\0')
+***************
+*** 11465,11471 ****
+ }
+
+ // Sign name
+! sign_name = get_tv_string_chk(&argvars[2]);
+ if (sign_name == NULL)
+ goto cleanup;
+
+--- 11465,11471 ----
+ }
+
+ // Sign name
+! sign_name = tv_get_string_chk(&argvars[2]);
+ if (sign_name == NULL)
+ goto cleanup;
+
+***************
+*** 11473,11479 ****
+ buf = find_buffer(&argvars[3]);
+ if (buf == NULL)
+ {
+! EMSG2(_("E158: Invalid buffer name: %s"), get_tv_string(&argvars[2]));
+ goto cleanup;
+ }
+
+--- 11473,11479 ----
+ buf = find_buffer(&argvars[3]);
+ if (buf == NULL)
+ {
+! EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(&argvars[2]));
+ goto cleanup;
+ }
+
+***************
+*** 11489,11503 ****
+ // Line number where the sign is to be placed
+ if ((di = dict_find(dict, (char_u *)"lnum", -1)) != NULL)
+ {
+! (void)get_tv_number_chk(&di->di_tv, &notanum);
+ if (notanum)
+ goto cleanup;
+! lnum = get_tv_lnum(&di->di_tv);
+ }
+ if ((di = dict_find(dict, (char_u *)"priority", -1)) != NULL)
+ {
+ // Sign priority
+! prio = (int)get_tv_number_chk(&di->di_tv, &notanum);
+ if (notanum)
+ goto cleanup;
+ }
+--- 11489,11503 ----
+ // Line number where the sign is to be placed
+ if ((di = dict_find(dict, (char_u *)"lnum", -1)) != NULL)
+ {
+! (void)tv_get_number_chk(&di->di_tv, &notanum);
+ if (notanum)
+ goto cleanup;
+! lnum = tv_get_lnum(&di->di_tv);
+ }
+ if ((di = dict_find(dict, (char_u *)"priority", -1)) != NULL)
+ {
+ // Sign priority
+! prio = (int)tv_get_number_chk(&di->di_tv, &notanum);
+ if (notanum)
+ goto cleanup;
+ }
+***************
+*** 11529,11535 ****
+ else
+ {
+ // Free only the specified sign
+! name = get_tv_string_chk(&argvars[0]);
+ if (name == NULL)
+ return;
+
+--- 11529,11535 ----
+ else
+ {
+ // Free only the specified sign
+! name = tv_get_string_chk(&argvars[0]);
+ if (name == NULL)
+ return;
+
+***************
+*** 11558,11564 ****
+ return;
+ }
+
+! group = get_tv_string(&argvars[0]);
+ if (group[0] == '\0')
+ group = NULL; // global sign group
+ else
+--- 11558,11564 ----
+ return;
+ }
+
+! group = tv_get_string(&argvars[0]);
+ if (group[0] == '\0')
+ group = NULL; // global sign group
+ else
+***************
+*** 11583,11589 ****
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+! get_tv_string(&di->di_tv));
+ return;
+ }
+ }
+--- 11583,11589 ----
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+! tv_get_string(&di->di_tv));
+ return;
+ }
+ }
+***************
+*** 11615,11621 ****
+ {
+ char_u *p;
+
+! p = get_tv_string(&argvars[0]);
+ rettv->vval.v_string = vim_strsave(p);
+ simplify_filename(rettv->vval.v_string); /* simplify in place */
+ rettv->v_type = VAR_STRING;
+--- 11615,11621 ----
+ {
+ char_u *p;
+
+! p = tv_get_string(&argvars[0]);
+ rettv->vval.v_string = vim_strsave(p);
+ simplify_filename(rettv->vval.v_string); /* simplify in place */
+ rettv->v_type = VAR_STRING;
+***************
+*** 11713,11720 ****
+
+ if (sortinfo->item_compare_numbers)
+ {
+! varnumber_T v1 = get_tv_number(tv1);
+! varnumber_T v2 = get_tv_number(tv2);
+
+ return v1 == v2 ? 0 : v1 > v2 ? 1 : -1;
+ }
+--- 11713,11720 ----
+
+ if (sortinfo->item_compare_numbers)
+ {
+! varnumber_T v1 = tv_get_number(tv1);
+! varnumber_T v2 = tv_get_number(tv2);
+
+ return v1 == v2 ? 0 : v1 > v2 ? 1 : -1;
+ }
+***************
+*** 11722,11729 ****
+ #ifdef FEAT_FLOAT
+ if (sortinfo->item_compare_float)
+ {
+! float_T v1 = get_tv_float(tv1);
+! float_T v2 = get_tv_float(tv2);
+
+ return v1 == v2 ? 0 : v1 > v2 ? 1 : -1;
+ }
+--- 11722,11729 ----
+ #ifdef FEAT_FLOAT
+ if (sortinfo->item_compare_float)
+ {
+! float_T v1 = tv_get_float(tv1);
+! float_T v2 = tv_get_float(tv2);
+
+ return v1 == v2 ? 0 : v1 > v2 ? 1 : -1;
+ }
+***************
+*** 11820,11826 ****
+ if (res == FAIL)
+ res = ITEM_COMPARE_FAIL;
+ else
+! res = (int)get_tv_number_chk(&rettv, &sortinfo->item_compare_func_err);
+ if (sortinfo->item_compare_func_err)
+ res = ITEM_COMPARE_FAIL; /* return value has wrong type */
+ clear_tv(&rettv);
+--- 11820,11826 ----
+ if (res == FAIL)
+ res = ITEM_COMPARE_FAIL;
+ else
+! res = (int)tv_get_number_chk(&rettv, &sortinfo->item_compare_func_err);
+ if (sortinfo->item_compare_func_err)
+ res = ITEM_COMPARE_FAIL; /* return value has wrong type */
+ clear_tv(&rettv);
+***************
+*** 11887,11899 ****
+ {
+ int error = FALSE;
+
+! i = (long)get_tv_number_chk(&argvars[1], &error);
+ if (error)
+ goto theend; /* type error; errmsg already given */
+ if (i == 1)
+ info.item_compare_ic = TRUE;
+ else if (argvars[1].v_type != VAR_NUMBER)
+! info.item_compare_func = get_tv_string(&argvars[1]);
+ else if (i != 0)
+ {
+ EMSG(_(e_invarg));
+--- 11887,11899 ----
+ {
+ int error = FALSE;
+
+! i = (long)tv_get_number_chk(&argvars[1], &error);
+ if (error)
+ goto theend; /* type error; errmsg already given */
+ if (i == 1)
+ info.item_compare_ic = TRUE;
+ else if (argvars[1].v_type != VAR_NUMBER)
+! info.item_compare_func = tv_get_string(&argvars[1]);
+ else if (i != 0)
+ {
+ EMSG(_(e_invarg));
+***************
+*** 12059,12065 ****
+ char_u *s;
+
+ rettv->v_type = VAR_STRING;
+! s = get_tv_string(&argvars[0]);
+ #ifdef FEAT_SPELL
+ rettv->vval.v_string = eval_soundfold(s);
+ #else
+--- 12059,12065 ----
+ char_u *s;
+
+ rettv->v_type = VAR_STRING;
+! s = tv_get_string(&argvars[0]);
+ #ifdef FEAT_SPELL
+ rettv->vval.v_string = eval_soundfold(s);
+ #else
+***************
+*** 12093,12099 ****
+ }
+ else if (curwin->w_p_spell && *curbuf->b_s.b_p_spl != NUL)
+ {
+! char_u *str = get_tv_string_chk(&argvars[0]);
+ int capcol = -1;
+
+ if (str != NULL)
+--- 12093,12099 ----
+ }
+ else if (curwin->w_p_spell && *curbuf->b_s.b_p_spl != NUL)
+ {
+! char_u *str = tv_get_string_chk(&argvars[0]);
+ int capcol = -1;
+
+ if (str != NULL)
+***************
+*** 12145,12159 ****
+ #ifdef FEAT_SPELL
+ if (curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL)
+ {
+! str = get_tv_string(&argvars[0]);
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! maxcount = (int)get_tv_number_chk(&argvars[1], &typeerr);
+ if (maxcount <= 0)
+ return;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! need_capital = (int)get_tv_number_chk(&argvars[2], &typeerr);
+ if (typeerr)
+ return;
+ }
+--- 12145,12159 ----
+ #ifdef FEAT_SPELL
+ if (curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL)
+ {
+! str = tv_get_string(&argvars[0]);
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! maxcount = (int)tv_get_number_chk(&argvars[1], &typeerr);
+ if (maxcount <= 0)
+ return;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! need_capital = (int)tv_get_number_chk(&argvars[2], &typeerr);
+ if (typeerr)
+ return;
+ }
+***************
+*** 12201,12214 ****
+ save_cpo = p_cpo;
+ p_cpo = (char_u *)"";
+
+! str = get_tv_string(&argvars[0]);
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! pat = get_tv_string_buf_chk(&argvars[1], patbuf);
+ if (pat == NULL)
+ typeerr = TRUE;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! keepempty = (int)get_tv_number_chk(&argvars[2], &typeerr);
+ }
+ if (pat == NULL || *pat == NUL)
+ pat = (char_u *)"[\\x01- ]\\+";
+--- 12201,12214 ----
+ save_cpo = p_cpo;
+ p_cpo = (char_u *)"";
+
+! str = tv_get_string(&argvars[0]);
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! pat = tv_get_string_buf_chk(&argvars[1], patbuf);
+ if (pat == NULL)
+ typeerr = TRUE;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! keepempty = (int)tv_get_number_chk(&argvars[2], &typeerr);
+ }
+ if (pat == NULL || *pat == NUL)
+ pat = (char_u *)"[\\x01- ]\\+";
+***************
+*** 12284,12290 ****
+ static void
+ f_str2float(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *p = skipwhite(get_tv_string(&argvars[0]));
+ int isneg = (*p == '-');
+
+ if (*p == '+' || *p == '-')
+--- 12284,12290 ----
+ static void
+ f_str2float(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *p = skipwhite(tv_get_string(&argvars[0]));
+ int isneg = (*p == '-');
+
+ if (*p == '+' || *p == '-')
+***************
+*** 12310,12316 ****
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! base = (int)get_tv_number(&argvars[1]);
+ if (base != 2 && base != 8 && base != 10 && base != 16)
+ {
+ EMSG(_(e_invarg));
+--- 12310,12316 ----
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! base = (int)tv_get_number(&argvars[1]);
+ if (base != 2 && base != 8 && base != 10 && base != 16)
+ {
+ EMSG(_(e_invarg));
+***************
+*** 12318,12324 ****
+ }
+ }
+
+! p = skipwhite(get_tv_string(&argvars[0]));
+ isneg = (*p == '-');
+ if (*p == '+' || *p == '-')
+ p = skipwhite(p + 1);
+--- 12318,12324 ----
+ }
+ }
+
+! p = skipwhite(tv_get_string(&argvars[0]));
+ isneg = (*p == '-');
+ if (*p == '+' || *p == '-')
+ p = skipwhite(p + 1);
+***************
+*** 12351,12361 ****
+
+ rettv->v_type = VAR_STRING;
+
+! p = get_tv_string(&argvars[0]);
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ seconds = time(NULL);
+ else
+! seconds = (time_t)get_tv_number(&argvars[1]);
+ curtime = localtime(&seconds);
+ /* MSVC returns NULL for an invalid value of seconds. */
+ if (curtime == NULL)
+--- 12351,12361 ----
+
+ rettv->v_type = VAR_STRING;
+
+! p = tv_get_string(&argvars[0]);
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ seconds = time(NULL);
+ else
+! seconds = (time_t)tv_get_number(&argvars[1]);
+ curtime = localtime(&seconds);
+ /* MSVC returns NULL for an invalid value of seconds. */
+ if (curtime == NULL)
+***************
+*** 12409,12419 ****
+ int charidx;
+
+ rettv->vval.v_number = -1;
+! str = get_tv_string_chk(&argvars[0]);
+ if (str == NULL)
+ return;
+ len = (int)STRLEN(str);
+! charidx = (int)get_tv_number_chk(&argvars[1], &error);
+ if (error)
+ return;
+ #ifdef FEAT_MBYTE
+--- 12409,12419 ----
+ int charidx;
+
+ rettv->vval.v_number = -1;
+! str = tv_get_string_chk(&argvars[0]);
+ if (str == NULL)
+ return;
+ len = (int)STRLEN(str);
+! charidx = (int)tv_get_number_chk(&argvars[1], &error);
+ if (error)
+ return;
+ #ifdef FEAT_MBYTE
+***************
+*** 12450,12457 ****
+ char_u *pos;
+ int start_idx;
+
+! needle = get_tv_string_chk(&argvars[1]);
+! save_haystack = haystack = get_tv_string_buf_chk(&argvars[0], buf);
+ rettv->vval.v_number = -1;
+ if (needle == NULL || haystack == NULL)
+ return; /* type error; errmsg already given */
+--- 12450,12457 ----
+ char_u *pos;
+ int start_idx;
+
+! needle = tv_get_string_chk(&argvars[1]);
+! save_haystack = haystack = tv_get_string_buf_chk(&argvars[0], buf);
+ rettv->vval.v_number = -1;
+ if (needle == NULL || haystack == NULL)
+ return; /* type error; errmsg already given */
+***************
+*** 12460,12466 ****
+ {
+ int error = FALSE;
+
+! start_idx = (int)get_tv_number_chk(&argvars[2], &error);
+ if (error || start_idx >= (int)STRLEN(haystack))
+ return;
+ if (start_idx >= 0)
+--- 12460,12466 ----
+ {
+ int error = FALSE;
+
+! start_idx = (int)tv_get_number_chk(&argvars[2], &error);
+ if (error || start_idx >= (int)STRLEN(haystack))
+ return;
+ if (start_idx >= 0)
+***************
+*** 12496,12502 ****
+ f_strlen(typval_T *argvars, typval_T *rettv)
+ {
+ rettv->vval.v_number = (varnumber_T)(STRLEN(
+! get_tv_string(&argvars[0])));
+ }
+
+ /*
+--- 12496,12502 ----
+ f_strlen(typval_T *argvars, typval_T *rettv)
+ {
+ rettv->vval.v_number = (varnumber_T)(STRLEN(
+! tv_get_string(&argvars[0])));
+ }
+
+ /*
+***************
+*** 12505,12511 ****
+ static void
+ f_strchars(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *s = get_tv_string(&argvars[0]);
+ int skipcc = 0;
+ #ifdef FEAT_MBYTE
+ varnumber_T len = 0;
+--- 12505,12511 ----
+ static void
+ f_strchars(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *s = tv_get_string(&argvars[0]);
+ int skipcc = 0;
+ #ifdef FEAT_MBYTE
+ varnumber_T len = 0;
+***************
+*** 12513,12519 ****
+ #endif
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! skipcc = (int)get_tv_number_chk(&argvars[1], NULL);
+ if (skipcc < 0 || skipcc > 1)
+ EMSG(_(e_invarg));
+ else
+--- 12513,12519 ----
+ #endif
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! skipcc = (int)tv_get_number_chk(&argvars[1], NULL);
+ if (skipcc < 0 || skipcc > 1)
+ EMSG(_(e_invarg));
+ else
+***************
+*** 12538,12548 ****
+ static void
+ f_strdisplaywidth(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *s = get_tv_string(&argvars[0]);
+ int col = 0;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! col = (int)get_tv_number(&argvars[1]);
+
+ rettv->vval.v_number = (varnumber_T)(linetabsize_col(col, s) - col);
+ }
+--- 12538,12548 ----
+ static void
+ f_strdisplaywidth(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *s = tv_get_string(&argvars[0]);
+ int col = 0;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! col = (int)tv_get_number(&argvars[1]);
+
+ rettv->vval.v_number = (varnumber_T)(linetabsize_col(col, s) - col);
+ }
+***************
+*** 12553,12559 ****
+ static void
+ f_strwidth(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *s = get_tv_string(&argvars[0]);
+
+ rettv->vval.v_number = (varnumber_T)(
+ #ifdef FEAT_MBYTE
+--- 12553,12559 ----
+ static void
+ f_strwidth(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *s = tv_get_string(&argvars[0]);
+
+ rettv->vval.v_number = (varnumber_T)(
+ #ifdef FEAT_MBYTE
+***************
+*** 12579,12588 ****
+ int slen;
+ int error = FALSE;
+
+! p = get_tv_string(&argvars[0]);
+ slen = (int)STRLEN(p);
+
+! nchar = (int)get_tv_number_chk(&argvars[1], &error);
+ if (!error)
+ {
+ if (nchar > 0)
+--- 12579,12588 ----
+ int slen;
+ int error = FALSE;
+
+! p = tv_get_string(&argvars[0]);
+ slen = (int)STRLEN(p);
+
+! nchar = (int)tv_get_number_chk(&argvars[1], &error);
+ if (!error)
+ {
+ if (nchar > 0)
+***************
+*** 12595,12601 ****
+ nbyte = nchar;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! charlen = (int)get_tv_number(&argvars[2]);
+ while (charlen > 0 && nbyte + len < slen)
+ {
+ int off = nbyte + len;
+--- 12595,12601 ----
+ nbyte = nchar;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! charlen = (int)tv_get_number(&argvars[2]);
+ while (charlen > 0 && nbyte + len < slen)
+ {
+ int off = nbyte + len;
+***************
+*** 12646,12659 ****
+ int slen;
+ int error = FALSE;
+
+! p = get_tv_string(&argvars[0]);
+ slen = (int)STRLEN(p);
+
+! n = (int)get_tv_number_chk(&argvars[1], &error);
+ if (error)
+ len = 0;
+ else if (argvars[2].v_type != VAR_UNKNOWN)
+! len = (int)get_tv_number(&argvars[2]);
+ else
+ len = slen - n; /* default len: all bytes that are available. */
+
+--- 12646,12659 ----
+ int slen;
+ int error = FALSE;
+
+! p = tv_get_string(&argvars[0]);
+ slen = (int)STRLEN(p);
+
+! n = (int)tv_get_number_chk(&argvars[1], &error);
+ if (error)
+ len = 0;
+ else if (argvars[2].v_type != VAR_UNKNOWN)
+! len = (int)tv_get_number(&argvars[2]);
+ else
+ len = slen - n; /* default len: all bytes that are available. */
+
+***************
+*** 12690,12697 ****
+ char_u *lastmatch = NULL;
+ int haystack_len, end_idx;
+
+! needle = get_tv_string_chk(&argvars[1]);
+! haystack = get_tv_string_buf_chk(&argvars[0], buf);
+
+ rettv->vval.v_number = -1;
+ if (needle == NULL || haystack == NULL)
+--- 12690,12697 ----
+ char_u *lastmatch = NULL;
+ int haystack_len, end_idx;
+
+! needle = tv_get_string_chk(&argvars[1]);
+! haystack = tv_get_string_buf_chk(&argvars[0], buf);
+
+ rettv->vval.v_number = -1;
+ if (needle == NULL || haystack == NULL)
+***************
+*** 12701,12707 ****
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+ /* Third argument: upper limit for index */
+! end_idx = (int)get_tv_number_chk(&argvars[2], NULL);
+ if (end_idx < 0)
+ return; /* can never find a match */
+ }
+--- 12701,12707 ----
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+ /* Third argument: upper limit for index */
+! end_idx = (int)tv_get_number_chk(&argvars[2], NULL);
+ if (end_idx < 0)
+ return; /* can never find a match */
+ }
+***************
+*** 12737,12743 ****
+ f_strtrans(typval_T *argvars, typval_T *rettv)
+ {
+ rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = transstr(get_tv_string(&argvars[0]));
+ }
+
+ /*
+--- 12737,12743 ----
+ f_strtrans(typval_T *argvars, typval_T *rettv)
+ {
+ rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = transstr(tv_get_string(&argvars[0]));
+ }
+
+ /*
+***************
+*** 12750,12756 ****
+ int no;
+ int retList = 0;
+
+! no = (int)get_tv_number_chk(&argvars[0], &error);
+ if (error)
+ return;
+ if (no < 0 || no >= NSUBEXP)
+--- 12750,12756 ----
+ int no;
+ int retList = 0;
+
+! no = (int)tv_get_number_chk(&argvars[0], &error);
+ if (error)
+ return;
+ if (no < 0 || no >= NSUBEXP)
+***************
+*** 12759,12765 ****
+ return;
+ }
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! retList = (int)get_tv_number_chk(&argvars[1], &error);
+ if (error)
+ return;
+
+--- 12759,12765 ----
+ return;
+ }
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! retList = (int)tv_get_number_chk(&argvars[1], &error);
+ if (error)
+ return;
+
+***************
+*** 12785,12800 ****
+ char_u subbuf[NUMBUFLEN];
+ char_u flagsbuf[NUMBUFLEN];
+
+! char_u *str = get_tv_string_chk(&argvars[0]);
+! char_u *pat = get_tv_string_buf_chk(&argvars[1], patbuf);
+ char_u *sub = NULL;
+ typval_T *expr = NULL;
+! char_u *flg = get_tv_string_buf_chk(&argvars[3], flagsbuf);
+
+ if (argvars[2].v_type == VAR_FUNC || argvars[2].v_type == VAR_PARTIAL)
+ expr = &argvars[2];
+ else
+! sub = get_tv_string_buf_chk(&argvars[2], subbuf);
+
+ rettv->v_type = VAR_STRING;
+ if (str == NULL || pat == NULL || (sub == NULL && expr == NULL)
+--- 12785,12800 ----
+ char_u subbuf[NUMBUFLEN];
+ char_u flagsbuf[NUMBUFLEN];
+
+! char_u *str = tv_get_string_chk(&argvars[0]);
+! char_u *pat = tv_get_string_buf_chk(&argvars[1], patbuf);
+ char_u *sub = NULL;
+ typval_T *expr = NULL;
+! char_u *flg = tv_get_string_buf_chk(&argvars[3], flagsbuf);
+
+ if (argvars[2].v_type == VAR_FUNC || argvars[2].v_type == VAR_PARTIAL)
+ expr = &argvars[2];
+ else
+! sub = tv_get_string_buf_chk(&argvars[2], subbuf);
+
+ rettv->v_type = VAR_STRING;
+ if (str == NULL || pat == NULL || (sub == NULL && expr == NULL)
+***************
+*** 12811,12817 ****
+ 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);
+ }
+
+ /*
+--- 12811,12817 ----
+ f_swapinfo(typval_T *argvars, typval_T *rettv)
+ {
+ if (rettv_dict_alloc(rettv) == OK)
+! get_b0_dict(tv_get_string(argvars), rettv->vval.v_dict);
+ }
+
+ /*
+***************
+*** 12844,12852 ****
+ int trans;
+ int transerr = FALSE;
+
+! lnum = get_tv_lnum(argvars); /* -1 on type error */
+! col = (linenr_T)get_tv_number(&argvars[1]) - 1; /* -1 on type error */
+! trans = (int)get_tv_number_chk(&argvars[2], &transerr);
+
+ if (!transerr && lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
+ && col >= 0 && col < (long)STRLEN(ml_get(lnum)))
+--- 12844,12852 ----
+ int trans;
+ int transerr = FALSE;
+
+! lnum = tv_get_lnum(argvars); /* -1 on type error */
+! col = (linenr_T)tv_get_number(&argvars[1]) - 1; /* -1 on type error */
+! trans = (int)tv_get_number_chk(&argvars[2], &transerr);
+
+ if (!transerr && lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
+ && col >= 0 && col < (long)STRLEN(ml_get(lnum)))
+***************
+*** 12870,12880 ****
+ char_u modebuf[NUMBUFLEN];
+ int modec;
+
+! id = (int)get_tv_number(&argvars[0]);
+! what = get_tv_string(&argvars[1]);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! mode = get_tv_string_buf(&argvars[2], modebuf);
+ modec = TOLOWER_ASC(mode[0]);
+ if (modec != 't' && modec != 'c' && modec != 'g')
+ modec = 0; /* replace invalid with current */
+--- 12870,12880 ----
+ char_u modebuf[NUMBUFLEN];
+ int modec;
+
+! id = (int)tv_get_number(&argvars[0]);
+! what = tv_get_string(&argvars[1]);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! mode = tv_get_string_buf(&argvars[2], modebuf);
+ modec = TOLOWER_ASC(mode[0]);
+ if (modec != 't' && modec != 'c' && modec != 'g')
+ modec = 0; /* replace invalid with current */
+***************
+*** 12957,12963 ****
+ int id;
+
+ #ifdef FEAT_SYN_HL
+! id = (int)get_tv_number(&argvars[0]);
+
+ if (id > 0)
+ id = syn_get_final_id(id);
+--- 12957,12963 ----
+ int id;
+
+ #ifdef FEAT_SYN_HL
+! id = (int)tv_get_number(&argvars[0]);
+
+ if (id > 0)
+ id = syn_get_final_id(id);
+***************
+*** 12986,12993 ****
+ rettv_list_set(rettv, NULL);
+
+ #if defined(FEAT_SYN_HL) && defined(FEAT_CONCEAL)
+! lnum = get_tv_lnum(argvars); /* -1 on type error */
+! col = (colnr_T)get_tv_number(&argvars[1]) - 1; /* -1 on type error */
+
+ vim_memset(str, NUL, sizeof(str));
+
+--- 12986,12993 ----
+ rettv_list_set(rettv, NULL);
+
+ #if defined(FEAT_SYN_HL) && defined(FEAT_CONCEAL)
+! lnum = tv_get_lnum(argvars); /* -1 on type error */
+! col = (colnr_T)tv_get_number(&argvars[1]) - 1; /* -1 on type error */
+
+ vim_memset(str, NUL, sizeof(str));
+
+***************
+*** 13043,13050 ****
+ rettv_list_set(rettv, NULL);
+
+ #ifdef FEAT_SYN_HL
+! lnum = get_tv_lnum(argvars); /* -1 on type error */
+! col = (colnr_T)get_tv_number(&argvars[1]) - 1; /* -1 on type error */
+
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
+ && col >= 0 && col <= (long)STRLEN(ml_get(lnum))
+--- 13043,13050 ----
+ rettv_list_set(rettv, NULL);
+
+ #ifdef FEAT_SYN_HL
+! lnum = tv_get_lnum(argvars); /* -1 on type error */
+! col = (colnr_T)tv_get_number(&argvars[1]) - 1; /* -1 on type error */
+
+ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
+ && col >= 0 && col <= (long)STRLEN(ml_get(lnum))
+***************
+*** 13138,13144 ****
+ size_t len;
+ char_u buf[NUMBUFLEN];
+
+! p = get_tv_string_buf_chk(&argvars[1], buf);
+ if (p == NULL)
+ {
+ fclose(fd);
+--- 13138,13144 ----
+ size_t len;
+ char_u buf[NUMBUFLEN];
+
+! p = tv_get_string_buf_chk(&argvars[1], buf);
+ if (p == NULL)
+ {
+ fclose(fd);
+***************
+*** 13171,13177 ****
+ char_u *end;
+ int i;
+
+! res = get_cmd_output(get_tv_string(&argvars[0]), infile, flags, &len);
+ if (res == NULL)
+ goto errret;
+
+--- 13171,13177 ----
+ char_u *end;
+ int i;
+
+! res = get_cmd_output(tv_get_string(&argvars[0]), infile, flags, &len);
+ if (res == NULL)
+ goto errret;
+
+***************
+*** 13211,13217 ****
+ }
+ else
+ {
+! res = get_cmd_output(get_tv_string(&argvars[0]), infile, flags, NULL);
+ #ifdef USE_CR
+ /* translate <CR> into <NL> */
+ if (res != NULL)
+--- 13211,13217 ----
+ }
+ else
+ {
+! res = get_cmd_output(tv_get_string(&argvars[0]), infile, flags, NULL);
+ #ifdef USE_CR
+ /* translate <CR> into <NL> */
+ if (res != NULL)
+***************
+*** 13289,13295 ****
+ wp = firstwin;
+ else
+ {
+! tp = find_tabpage((int)get_tv_number(&argvars[0]));
+ if (tp != NULL)
+ wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
+ }
+--- 13289,13295 ----
+ wp = firstwin;
+ else
+ {
+! tp = find_tabpage((int)tv_get_number(&argvars[0]));
+ if (tp != NULL)
+ wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
+ }
+***************
+*** 13313,13319 ****
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! arg = get_tv_string_chk(&argvars[0]);
+ nr = 0;
+ if (arg != NULL)
+ {
+--- 13313,13319 ----
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! arg = tv_get_string_chk(&argvars[0]);
+ nr = 0;
+ if (arg != NULL)
+ {
+***************
+*** 13343,13349 ****
+ twin = (tp == curtab) ? curwin : tp->tp_curwin;
+ if (argvar->v_type != VAR_UNKNOWN)
+ {
+! arg = get_tv_string_chk(argvar);
+ if (arg == NULL)
+ nr = 0; /* type error; errmsg already given */
+ else if (STRCMP(arg, "$") == 0)
+--- 13343,13349 ----
+ twin = (tp == curtab) ? curwin : tp->tp_curwin;
+ if (argvar->v_type != VAR_UNKNOWN)
+ {
+! arg = tv_get_string_chk(argvar);
+ if (arg == NULL)
+ nr = 0; /* type error; errmsg already given */
+ else if (STRCMP(arg, "$") == 0)
+***************
+*** 13385,13391 ****
+ int nr = 1;
+ tabpage_T *tp;
+
+! tp = find_tabpage((int)get_tv_number(&argvars[0]));
+ if (tp == NULL)
+ nr = 0;
+ else
+--- 13385,13391 ----
+ int nr = 1;
+ tabpage_T *tp;
+
+! tp = find_tabpage((int)tv_get_number(&argvars[0]));
+ if (tp == NULL)
+ nr = 0;
+ else
+***************
+*** 13426,13439 ****
+ char_u *fname = NULL;
+ char_u *tag_pattern;
+
+! tag_pattern = get_tv_string(&argvars[0]);
+
+ rettv->vval.v_number = FALSE;
+ if (*tag_pattern == NUL)
+ return;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! fname = get_tv_string(&argvars[1]);
+ if (rettv_list_alloc(rettv) == OK)
+ (void)get_tags(rettv->vval.v_list, tag_pattern, fname);
+ }
+--- 13426,13439 ----
+ char_u *fname = NULL;
+ char_u *tag_pattern;
+
+! tag_pattern = tv_get_string(&argvars[0]);
+
+ rettv->vval.v_number = FALSE;
+ if (*tag_pattern == NUL)
+ return;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! fname = tv_get_string(&argvars[1]);
+ if (rettv_list_alloc(rettv) == OK)
+ (void)get_tags(rettv->vval.v_list, tag_pattern, fname);
+ }
+***************
+*** 13544,13550 ****
+ f_test_feedinput(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ #ifdef USE_INPUT_BUF
+! char_u *val = get_tv_string_chk(&argvars[0]);
+
+ if (val != NULL)
+ {
+--- 13544,13550 ----
+ f_test_feedinput(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ #ifdef USE_INPUT_BUF
+! char_u *val = tv_get_string_chk(&argvars[0]);
+
+ if (val != NULL)
+ {
+***************
+*** 13566,13572 ****
+ EMSG(_(e_invarg));
+ else
+ {
+! name = get_tv_string(&argvars[0]);
+ if (reset_option_was_set(name) == FAIL)
+ EMSG2(_(e_invarg2), name);
+ }
+--- 13566,13572 ----
+ EMSG(_(e_invarg));
+ else
+ {
+! name = tv_get_string(&argvars[0]);
+ if (reset_option_was_set(name) == FAIL)
+ EMSG2(_(e_invarg2), name);
+ }
+***************
+*** 13587,13594 ****
+ EMSG(_(e_invarg));
+ else
+ {
+! name = get_tv_string_chk(&argvars[0]);
+! val = (int)get_tv_number(&argvars[1]);
+
+ if (STRCMP(name, (char_u *)"redraw") == 0)
+ disable_redraw_for_testing = val;
+--- 13587,13594 ----
+ EMSG(_(e_invarg));
+ else
+ {
+! name = tv_get_string_chk(&argvars[0]);
+! val = (int)tv_get_number(&argvars[1]);
+
+ if (STRCMP(name, (char_u *)"redraw") == 0)
+ disable_redraw_for_testing = val;
+***************
+*** 13646,13652 ****
+ static void
+ f_test_ignore_error(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+! ignore_error_for_testing(get_tv_string(&argvars[0]));
+ }
+
+ #ifdef FEAT_JOB_CHANNEL
+--- 13646,13652 ----
+ static void
+ f_test_ignore_error(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+! ignore_error_for_testing(tv_get_string(&argvars[0]));
+ }
+
+ #ifdef FEAT_JOB_CHANNEL
+***************
+*** 13709,13717 ****
+ 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];
+--- 13709,13717 ----
+ EMSG(_(e_invarg));
+ return;
+ }
+! which = tv_get_string(&argvars[0]);
+! value = tv_get_number(&argvars[1]);
+! dragging = tv_get_number(&argvars[2]);
+
+ if (STRCMP(which, "left") == 0)
+ sb = &curwin->w_scrollbars[SBAR_LEFT];
+***************
+*** 13735,13741 ****
+ static void
+ f_test_settime(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+! time_for_testing = (time_t)get_tv_number(&argvars[0]);
+ }
+
+ #if defined(FEAT_JOB_CHANNEL) || defined(FEAT_TIMERS) || defined(PROTO)
+--- 13735,13741 ----
+ static void
+ f_test_settime(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+! time_for_testing = (time_t)tv_get_number(&argvars[0]);
+ }
+
+ #if defined(FEAT_JOB_CHANNEL) || defined(FEAT_TIMERS) || defined(PROTO)
+***************
+*** 13798,13804 ****
+ EMSG(_(e_number_exp));
+ else
+ {
+! timer = find_timer((int)get_tv_number(&argvars[0]));
+ if (timer != NULL)
+ add_timer_info(rettv, timer);
+ }
+--- 13798,13804 ----
+ EMSG(_(e_number_exp));
+ else
+ {
+! timer = find_timer((int)tv_get_number(&argvars[0]));
+ if (timer != NULL)
+ add_timer_info(rettv, timer);
+ }
+***************
+*** 13814,13826 ****
+ f_timer_pause(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ timer_T *timer = NULL;
+! int paused = (int)get_tv_number(&argvars[1]);
+
+ if (argvars[0].v_type != VAR_NUMBER)
+ EMSG(_(e_number_exp));
+ else
+ {
+! timer = find_timer((int)get_tv_number(&argvars[0]));
+ if (timer != NULL)
+ timer->tr_paused = paused;
+ }
+--- 13814,13826 ----
+ f_timer_pause(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ timer_T *timer = NULL;
+! int paused = (int)tv_get_number(&argvars[1]);
+
+ if (argvars[0].v_type != VAR_NUMBER)
+ EMSG(_(e_number_exp));
+ else
+ {
+! timer = find_timer((int)tv_get_number(&argvars[0]));
+ if (timer != NULL)
+ timer->tr_paused = paused;
+ }
+***************
+*** 13832,13838 ****
+ static void
+ f_timer_start(typval_T *argvars, typval_T *rettv)
+ {
+! long msec = (long)get_tv_number(&argvars[0]);
+ timer_T *timer;
+ int repeat = 0;
+ char_u *callback;
+--- 13832,13838 ----
+ static void
+ f_timer_start(typval_T *argvars, typval_T *rettv)
+ {
+! long msec = (long)tv_get_number(&argvars[0]);
+ timer_T *timer;
+ int repeat = 0;
+ char_u *callback;
+***************
+*** 13847,13853 ****
+ if (argvars[2].v_type != VAR_DICT
+ || (dict = argvars[2].vval.v_dict) == NULL)
+ {
+! EMSG2(_(e_invarg2), get_tv_string(&argvars[2]));
+ return;
+ }
+ if (dict_find(dict, (char_u *)"repeat", -1) != NULL)
+--- 13847,13853 ----
+ if (argvars[2].v_type != VAR_DICT
+ || (dict = argvars[2].vval.v_dict) == NULL)
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[2]));
+ return;
+ }
+ if (dict_find(dict, (char_u *)"repeat", -1) != NULL)
+***************
+*** 13886,13892 ****
+ EMSG(_(e_number_exp));
+ return;
+ }
+! timer = find_timer((int)get_tv_number(&argvars[0]));
+ if (timer != NULL)
+ stop_timer(timer);
+ }
+--- 13886,13892 ----
+ EMSG(_(e_number_exp));
+ return;
+ }
+! timer = find_timer((int)tv_get_number(&argvars[0]));
+ if (timer != NULL)
+ stop_timer(timer);
+ }
+***************
+*** 13908,13914 ****
+ f_tolower(typval_T *argvars, typval_T *rettv)
+ {
+ rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = strlow_save(get_tv_string(&argvars[0]));
+ }
+
+ /*
+--- 13908,13914 ----
+ f_tolower(typval_T *argvars, typval_T *rettv)
+ {
+ rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = strlow_save(tv_get_string(&argvars[0]));
+ }
+
+ /*
+***************
+*** 13918,13924 ****
+ f_toupper(typval_T *argvars, typval_T *rettv)
+ {
+ rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = strup_save(get_tv_string(&argvars[0]));
+ }
+
+ /*
+--- 13918,13924 ----
+ f_toupper(typval_T *argvars, typval_T *rettv)
+ {
+ rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = strup_save(tv_get_string(&argvars[0]));
+ }
+
+ /*
+***************
+*** 13944,13952 ****
+ char_u buf2[NUMBUFLEN];
+ garray_T ga;
+
+! in_str = get_tv_string(&argvars[0]);
+! fromstr = get_tv_string_buf_chk(&argvars[1], buf);
+! tostr = get_tv_string_buf_chk(&argvars[2], buf2);
+
+ /* Default return value: empty string. */
+ rettv->v_type = VAR_STRING;
+--- 13944,13952 ----
+ char_u buf2[NUMBUFLEN];
+ garray_T ga;
+
+! in_str = tv_get_string(&argvars[0]);
+! fromstr = tv_get_string_buf_chk(&argvars[1], buf);
+! tostr = tv_get_string_buf_chk(&argvars[2], buf2);
+
+ /* Default return value: empty string. */
+ rettv->v_type = VAR_STRING;
+***************
+*** 14050,14056 ****
+ {
+ char_u buf1[NUMBUFLEN];
+ char_u buf2[NUMBUFLEN];
+! char_u *head = get_tv_string_buf_chk(&argvars[0], buf1);
+ char_u *mask = NULL;
+ char_u *tail;
+ char_u *prev;
+--- 14050,14056 ----
+ {
+ char_u buf1[NUMBUFLEN];
+ char_u buf2[NUMBUFLEN];
+! char_u *head = tv_get_string_buf_chk(&argvars[0], buf1);
+ char_u *mask = NULL;
+ char_u *tail;
+ char_u *prev;
+***************
+*** 14065,14071 ****
+ }
+
+ if (argvars[1].v_type == VAR_STRING)
+! mask = get_tv_string_buf_chk(&argvars[1], buf2);
+
+ while (*head != NUL)
+ {
+--- 14065,14071 ----
+ }
+
+ if (argvars[1].v_type == VAR_STRING)
+! mask = tv_get_string_buf_chk(&argvars[1], buf2);
+
+ while (*head != NUL)
+ {
+***************
+*** 14169,14175 ****
+ rettv->v_type = VAR_STRING;
+ #ifdef FEAT_PERSISTENT_UNDO
+ {
+! char_u *fname = get_tv_string(&argvars[0]);
+
+ if (*fname == NUL)
+ {
+--- 14169,14175 ----
+ rettv->v_type = VAR_STRING;
+ #ifdef FEAT_PERSISTENT_UNDO
+ {
+! char_u *fname = tv_get_string(&argvars[0]);
+
+ if (*fname == NUL)
+ {
+***************
+*** 14332,14338 ****
+ tp = curtab;
+ else
+ {
+! tp = find_tabpage((int)get_tv_number(&argvars[0]));
+ if (tp == NULL)
+ return;
+ }
+--- 14332,14338 ----
+ tp = curtab;
+ else
+ {
+! tp = find_tabpage((int)tv_get_number(&argvars[0]));
+ if (tp == NULL)
+ return;
+ }
+***************
+*** 14525,14536 ****
+ if (list == NULL)
+ return;
+ for (li = list->lv_first; li != NULL; li = li->li_next)
+! if (get_tv_string_chk(&li->li_tv) == NULL)
+ return;
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! char_u *arg2 = get_tv_string_chk(&argvars[2]);
+
+ if (arg2 == NULL)
+ return;
+--- 14525,14536 ----
+ if (list == NULL)
+ return;
+ for (li = list->lv_first; li != NULL; li = li->li_next)
+! if (tv_get_string_chk(&li->li_tv) == NULL)
+ return;
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+! char_u *arg2 = tv_get_string_chk(&argvars[2]);
+
+ if (arg2 == NULL)
+ return;
+***************
+*** 14546,14552 ****
+ #endif
+ }
+
+! fname = get_tv_string_chk(&argvars[1]);
+ if (fname == NULL)
+ return;
+
+--- 14546,14552 ----
+ #endif
+ }
+
+! fname = tv_get_string_chk(&argvars[1]);
+ if (fname == NULL)
+ return;
+
+***************
+*** 14580,14587 ****
+ static void
+ f_xor(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = get_tv_number_chk(&argvars[0], NULL)
+! ^ get_tv_number_chk(&argvars[1], NULL);
+ }
+
+ #endif /* FEAT_EVAL */
+--- 14580,14587 ----
+ static void
+ f_xor(typval_T *argvars, typval_T *rettv)
+ {
+! rettv->vval.v_number = tv_get_number_chk(&argvars[0], NULL)
+! ^ tv_get_number_chk(&argvars[1], NULL);
+ }
+
+ #endif /* FEAT_EVAL */
+*** ../vim-8.1.0614/src/list.c 2018-12-21 15:16:57.479579788 +0100
+--- src/list.c 2018-12-21 15:52:39.696996337 +0100
+***************
+*** 403,409 ****
+ *errorp = TRUE;
+ return -1L;
+ }
+! return (long)get_tv_number_chk(&li->li_tv, errorp);
+ }
+
+ /*
+--- 403,409 ----
+ *errorp = TRUE;
+ return -1L;
+ }
+! return (long)tv_get_number_chk(&li->li_tv, errorp);
+ }
+
+ /*
+***************
+*** 420,426 ****
+ EMSGN(_(e_listidx), idx);
+ return NULL;
+ }
+! return get_tv_string(&li->li_tv);
+ }
+
+ /*
+--- 420,426 ----
+ EMSGN(_(e_listidx), idx);
+ return NULL;
+ }
+! return tv_get_string(&li->li_tv);
+ }
+
+ /*
+***************
+*** 949,955 ****
+
+ for (li = list->lv_first; li != NULL; li = li->li_next)
+ {
+! for (s = get_tv_string(&li->li_tv); *s != NUL; ++s)
+ {
+ if (*s == '\n')
+ c = putc(NUL, fd);
+--- 949,955 ----
+
+ for (li = list->lv_first; li != NULL; li = li->li_next)
+ {
+! for (s = tv_get_string(&li->li_tv); *s != NUL; ++s)
+ {
+ if (*s == '\n')
+ c = putc(NUL, fd);
+*** ../vim-8.1.0614/src/message.c 2018-11-28 20:38:34.560273411 +0100
+--- src/message.c 2018-12-21 16:00:44.977851866 +0100
+***************
+*** 4137,4143 ****
+ else
+ {
+ ++*idxp;
+! n = get_tv_number_chk(&tvs[idx], &err);
+ if (err)
+ n = 0;
+ }
+--- 4137,4143 ----
+ else
+ {
+ ++*idxp;
+! n = tv_get_number_chk(&tvs[idx], &err);
+ if (err)
+ n = 0;
+ }
+***************
+*** 4146,4152 ****
+
+ /*
+ * Get string argument from "idxp" entry in "tvs". First entry is 1.
+! * If "tofree" is NULL get_tv_string_chk() is used. Some types (e.g. List)
+ * are not converted to a string.
+ * If "tofree" is not NULL echo_string() is used. All types are converted to
+ * a string with the same format as ":echo". The caller must free "*tofree".
+--- 4146,4152 ----
+
+ /*
+ * Get string argument from "idxp" entry in "tvs". First entry is 1.
+! * If "tofree" is NULL tv_get_string_chk() is used. Some types (e.g. List)
+ * are not converted to a string.
+ * If "tofree" is not NULL echo_string() is used. All types are converted to
+ * a string with the same format as ":echo". The caller must free "*tofree".
+***************
+*** 4167,4173 ****
+ if (tofree != NULL)
+ s = (char *)echo_string(&tvs[idx], tofree, numbuf, get_copyID());
+ else
+! s = (char *)get_tv_string_chk(&tvs[idx]);
+ }
+ return s;
+ }
+--- 4167,4173 ----
+ if (tofree != NULL)
+ s = (char *)echo_string(&tvs[idx], tofree, numbuf, get_copyID());
+ else
+! s = (char *)tv_get_string_chk(&tvs[idx]);
+ }
+ return s;
+ }
+*** ../vim-8.1.0614/src/tag.c 2018-12-14 15:38:28.331597637 +0100
+--- src/tag.c 2018-12-21 15:46:40.487262414 +0100
+***************
+*** 4212,4218 ****
+ }
+
+ if ((di = dict_find(d, (char_u *)"curidx", -1)) != NULL)
+! tagstack_set_curidx(wp, (int)get_tv_number(&di->di_tv) - 1);
+
+ return OK;
+ }
+--- 4212,4218 ----
+ }
+
+ if ((di = dict_find(d, (char_u *)"curidx", -1)) != NULL)
+! tagstack_set_curidx(wp, (int)tv_get_number(&di->di_tv) - 1);
+
+ return OK;
+ }
+*** ../vim-8.1.0614/src/terminal.c 2018-12-20 20:47:28.462655566 +0100
+--- src/terminal.c 2018-12-21 16:01:24.609588053 +0100
+***************
+*** 496,502 ****
+ else if (argvar->v_type != VAR_LIST
+ || argvar->vval.v_list == NULL
+ || argvar->vval.v_list->lv_len < 1
+! || (cmd = get_tv_string_chk(
+ &argvar->vval.v_list->lv_first->li_tv)) == NULL)
+ cmd = (char_u*)"";
+
+--- 496,502 ----
+ else if (argvar->v_type != VAR_LIST
+ || argvar->vval.v_list == NULL
+ || argvar->vval.v_list->lv_len < 1
+! || (cmd = tv_get_string_chk(
+ &argvar->vval.v_list->lv_first->li_tv)) == NULL)
+ cmd = (char_u*)"";
+
+***************
+*** 569,575 ****
+ for (item = argvar->vval.v_list->lv_first;
+ item != NULL; item = item->li_next)
+ {
+! char_u *s = get_tv_string_chk(&item->li_tv);
+ char_u *p;
+
+ if (s == NULL)
+--- 569,575 ----
+ for (item = argvar->vval.v_list->lv_first;
+ item != NULL; item = item->li_next)
+ {
+! char_u *s = tv_get_string_chk(&item->li_tv);
+ char_u *p;
+
+ if (s == NULL)
+***************
+*** 1913,1919 ****
+ type = get_reg_type(c, &reglen);
+ for (item = l->lv_first; item != NULL; item = item->li_next)
+ {
+! char_u *s = get_tv_string(&item->li_tv);
+ #ifdef WIN3264
+ char_u *tmp = s;
+
+--- 1913,1919 ----
+ type = get_reg_type(c, &reglen);
+ for (item = l->lv_first; item != NULL; item = item->li_next)
+ {
+! char_u *s = tv_get_string(&item->li_tv);
+ #ifdef WIN3264
+ char_u *tmp = s;
+
+***************
+*** 3455,3461 ****
+ char_u *color_name;
+ guicolor_T guicolor;
+
+! color_name = get_tv_string_chk(&li->li_tv);
+ if (color_name == NULL)
+ return FAIL;
+
+--- 3455,3461 ----
+ char_u *color_name;
+ guicolor_T guicolor;
+
+! color_name = tv_get_string_chk(&li->li_tv);
+ if (color_name == NULL)
+ return FAIL;
+
+***************
+*** 3497,3503 ****
+ static void
+ handle_drop_command(listitem_T *item)
+ {
+! char_u *fname = get_tv_string(&item->li_tv);
+ listitem_T *opt_item = item->li_next;
+ int bufnr;
+ win_T *wp;
+--- 3497,3503 ----
+ static void
+ handle_drop_command(listitem_T *item)
+ {
+! char_u *fname = tv_get_string(&item->li_tv);
+ listitem_T *opt_item = item->li_next;
+ int bufnr;
+ win_T *wp;
+***************
+*** 3589,3595 ****
+ ch_log(channel, "Missing function arguments for call");
+ return;
+ }
+! func = get_tv_string(&item->li_tv);
+
+ if (STRNCMP(func, "Tapi_", 5) != 0)
+ {
+--- 3589,3595 ----
+ ch_log(channel, "Missing function arguments for call");
+ return;
+ }
+! func = tv_get_string(&item->li_tv);
+
+ if (STRNCMP(func, "Tapi_", 5) != 0)
+ {
+***************
+*** 3645,3651 ****
+ ch_log(channel, "Missing command");
+ else
+ {
+! char_u *cmd = get_tv_string(&item->li_tv);
+
+ /* Make sure an invoked command doesn't delete the buffer (and the
+ * terminal) under our fingers. */
+--- 3645,3651 ----
+ ch_log(channel, "Missing command");
+ else
+ {
+! char_u *cmd = tv_get_string(&item->li_tv);
+
+ /* Make sure an invoked command doesn't delete the buffer (and the
+ * terminal) under our fingers. */
+***************
+*** 3826,3832 ****
+ {
+ buf_T *buf;
+
+! (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+--- 3826,3832 ----
+ {
+ buf_T *buf;
+
+! (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+ buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+***************
+*** 3921,3927 ****
+ }
+ }
+
+! fname = get_tv_string_chk(&argvars[1]);
+ if (fname == NULL)
+ return;
+ if (mch_stat((char *)fname, &st) >= 0)
+--- 3921,3927 ----
+ }
+ }
+
+! fname = tv_get_string_chk(&argvars[1]);
+ if (fname == NULL)
+ return;
+ if (mch_stat((char *)fname, &st) >= 0)
+***************
+*** 4370,4378 ****
+ char_u *textline = NULL;
+
+ /* First open the files. If this fails bail out. */
+! fname1 = get_tv_string_buf_chk(&argvars[0], buf1);
+ if (do_diff)
+! fname2 = get_tv_string_buf_chk(&argvars[1], buf2);
+ if (fname1 == NULL || (do_diff && fname2 == NULL))
+ {
+ EMSG(_(e_invarg));
+--- 4370,4378 ----
+ char_u *textline = NULL;
+
+ /* First open the files. If this fails bail out. */
+! fname1 = tv_get_string_buf_chk(&argvars[0], buf1);
+ if (do_diff)
+! fname2 = tv_get_string_buf_chk(&argvars[1], buf2);
+ if (fname1 == NULL || (do_diff && fname2 == NULL))
+ {
+ EMSG(_(e_invarg));
+***************
+*** 4740,4747 ****
+ {"reverse", HL_INVERSE},
+ };
+
+! attr = get_tv_number(&argvars[0]);
+! name = get_tv_string_chk(&argvars[1]);
+ if (name == NULL)
+ return;
+
+--- 4740,4747 ----
+ {"reverse", HL_INVERSE},
+ };
+
+! attr = tv_get_number(&argvars[0]);
+! name = tv_get_string_chk(&argvars[1]);
+ if (name == NULL)
+ return;
+
+***************
+*** 4811,4817 ****
+ && tv->vval.v_string != NULL
+ && STRCMP(tv->vval.v_string, ".") == 0)
+ return term->tl_cursor_pos.row;
+! return (int)get_tv_number(tv) - 1;
+ }
+
+ /*
+--- 4811,4817 ----
+ && tv->vval.v_string != NULL
+ && STRCMP(tv->vval.v_string, ".") == 0)
+ return term->tl_cursor_pos.row;
+! return (int)tv_get_number(tv) - 1;
+ }
+
+ /*
+***************
+*** 4911,4919 ****
+ if (buf->b_term->tl_vterm == NULL)
+ return;
+ term = buf->b_term;
+! rows = get_tv_number(&argvars[1]);
+ rows = rows <= 0 ? term->tl_rows : rows;
+! cols = get_tv_number(&argvars[2]);
+ cols = cols <= 0 ? term->tl_cols : cols;
+ vterm_set_size(term->tl_vterm, rows, cols);
+ /* handle_resize() will resize the windows */
+--- 4911,4919 ----
+ if (buf->b_term->tl_vterm == NULL)
+ return;
+ term = buf->b_term;
+! rows = tv_get_number(&argvars[1]);
+ rows = rows <= 0 ? term->tl_rows : rows;
+! cols = tv_get_number(&argvars[2]);
+ cols = cols <= 0 ? term->tl_cols : cols;
+ vterm_set_size(term->tl_vterm, rows, cols);
+ /* handle_resize() will resize the windows */
+***************
+*** 4977,4983 ****
+ if (buf == NULL)
+ return;
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! num = get_tv_number(&argvars[1]);
+
+ switch (num)
+ {
+--- 4977,4983 ----
+ if (buf == NULL)
+ return;
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! num = tv_get_number(&argvars[1]);
+
+ switch (num)
+ {
+***************
+*** 4990,4996 ****
+ p = buf->b_term->tl_job->jv_tty_in;
+ break;
+ default:
+! EMSG2(_(e_invarg2), get_tv_string(&argvars[1]));
+ return;
+ }
+ if (p != NULL)
+--- 4990,4996 ----
+ p = buf->b_term->tl_job->jv_tty_in;
+ break;
+ default:
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[1]));
+ return;
+ }
+ if (p != NULL)
+***************
+*** 5139,5145 ****
+ if (buf == NULL)
+ return;
+
+! msg = get_tv_string_chk(&argvars[1]);
+ if (msg == NULL)
+ return;
+ term = buf->b_term;
+--- 5139,5145 ----
+ if (buf == NULL)
+ return;
+
+! msg = tv_get_string_chk(&argvars[1]);
+ if (msg == NULL)
+ return;
+ term = buf->b_term;
+***************
+*** 5241,5247 ****
+ return;
+ term = buf->b_term;
+ vim_free(term->tl_command);
+! cmd = get_tv_string_chk(&argvars[1]);
+ if (cmd != NULL)
+ term->tl_command = vim_strsave(cmd);
+ else
+--- 5241,5247 ----
+ return;
+ term = buf->b_term;
+ vim_free(term->tl_command);
+! cmd = tv_get_string_chk(&argvars[1]);
+ if (cmd != NULL)
+ term->tl_command = vim_strsave(cmd);
+ else
+***************
+*** 5263,5269 ****
+ return;
+ term = buf->b_term;
+ vim_free(term->tl_kill);
+! how = get_tv_string_chk(&argvars[1]);
+ if (how != NULL)
+ term->tl_kill = vim_strsave(how);
+ else
+--- 5263,5269 ----
+ return;
+ term = buf->b_term;
+ vim_free(term->tl_kill);
+! how = tv_get_string_chk(&argvars[1]);
+ if (how != NULL)
+ term->tl_kill = vim_strsave(how);
+ else
+***************
+*** 5347,5353 ****
+
+ /* Wait for some time for any channel I/O. */
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! wait = get_tv_number(&argvars[1]);
+ ui_delay(wait, TRUE);
+ mch_check_messages();
+
+--- 5347,5353 ----
+
+ /* Wait for some time for any channel I/O. */
+ if (argvars[1].v_type != VAR_UNKNOWN)
+! wait = tv_get_number(&argvars[1]);
+ ui_delay(wait, TRUE);
+ mch_check_messages();
+
+*** ../vim-8.1.0614/src/textprop.c 2018-12-16 14:37:35.845271247 +0100
+--- src/textprop.c 2018-12-21 15:53:27.052698970 +0100
+***************
+*** 154,161 ****
+ textprop_T tmp_prop;
+ int i;
+
+! lnum = get_tv_number(&argvars[0]);
+! col = get_tv_number(&argvars[1]);
+ if (col < 1)
+ {
+ EMSGN(_(e_invalid_col), (long)col);
+--- 154,161 ----
+ textprop_T tmp_prop;
+ int i;
+
+! lnum = tv_get_number(&argvars[0]);
+! col = tv_get_number(&argvars[1]);
+ if (col < 1)
+ {
+ EMSGN(_(e_invalid_col), (long)col);
+***************
+*** 352,365 ****
+ 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)
+--- 352,365 ----
+ void
+ f_prop_clear(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+! linenr_T start = tv_get_number(&argvars[0]);
+ linenr_T end = start;
+ linenr_T lnum;
+ buf_T *buf = curbuf;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! end = tv_get_number(&argvars[1]);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+ if (get_bufnr_from_arg(&argvars[2], &buf) == FAIL)
+***************
+*** 405,411 ****
+ 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)
+--- 405,411 ----
+ void
+ f_prop_list(typval_T *argvars, typval_T *rettv)
+ {
+! linenr_T lnum = tv_get_number(&argvars[0]);
+ buf_T *buf = curbuf;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+***************
+*** 476,485 ****
+
+ 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));
+--- 476,485 ----
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! start = tv_get_number(&argvars[1]);
+ end = start;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! end = tv_get_number(&argvars[2]);
+ if (start < 1 || end < 1)
+ {
+ EMSG(_(e_invrange));
+***************
+*** 586,592 ****
+ dictitem_T *di;
+ proptype_T *prop;
+
+! name = get_tv_string(&argvars[0]);
+ if (*name == NUL)
+ {
+ EMSG(_(e_invarg));
+--- 586,592 ----
+ dictitem_T *di;
+ proptype_T *prop;
+
+! name = tv_get_string(&argvars[0]);
+ if (*name == NUL)
+ {
+ EMSG(_(e_invarg));
+***************
+*** 656,667 ****
+
+ 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;
+--- 656,667 ----
+
+ di = dict_find(dict, (char_u *)"priority", -1);
+ if (di != NULL)
+! prop->pt_priority = tv_get_number(&di->di_tv);
+
+ di = dict_find(dict, (char_u *)"start_incl", -1);
+ if (di != NULL)
+ {
+! if (tv_get_number(&di->di_tv))
+ prop->pt_flags |= PT_FLAG_INS_START_INCL;
+ else
+ prop->pt_flags &= ~PT_FLAG_INS_START_INCL;
+***************
+*** 670,676 ****
+ 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;
+--- 670,676 ----
+ di = dict_find(dict, (char_u *)"end_incl", -1);
+ if (di != NULL)
+ {
+! if (tv_get_number(&di->di_tv))
+ prop->pt_flags |= PT_FLAG_INS_END_INCL;
+ else
+ prop->pt_flags &= ~PT_FLAG_INS_END_INCL;
+***************
+*** 706,712 ****
+ buf_T *buf = NULL;
+ hashitem_T *hi;
+
+! name = get_tv_string(&argvars[0]);
+ if (*name == NUL)
+ {
+ EMSG(_(e_invarg));
+--- 706,712 ----
+ buf_T *buf = NULL;
+ hashitem_T *hi;
+
+! name = tv_get_string(&argvars[0]);
+ if (*name == NUL)
+ {
+ EMSG(_(e_invarg));
+***************
+*** 740,746 ****
+ void
+ f_prop_type_get(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+! char_u *name = get_tv_string(&argvars[0]);
+
+ if (*name == NUL)
+ {
+--- 740,746 ----
+ void
+ f_prop_type_get(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+! char_u *name = tv_get_string(&argvars[0]);
+
+ if (*name == NUL)
+ {
+*** ../vim-8.1.0614/src/window.c 2018-11-10 16:01:23.335381858 +0100
+--- src/window.c 2018-12-21 15:50:18.737863579 +0100
+***************
+*** 6867,6873 ****
+ subli = subl->lv_first;
+ if (subli == NULL)
+ goto fail;
+! lnum = get_tv_number_chk(&subli->li_tv, &error);
+ if (error == TRUE)
+ goto fail;
+ if (lnum == 0)
+--- 6867,6873 ----
+ subli = subl->lv_first;
+ if (subli == NULL)
+ goto fail;
+! lnum = tv_get_number_chk(&subli->li_tv, &error);
+ if (error == TRUE)
+ goto fail;
+ if (lnum == 0)
+***************
+*** 6879,6891 ****
+ subli = subli->li_next;
+ if (subli != NULL)
+ {
+! col = get_tv_number_chk(&subli->li_tv, &error);
+ if (error == TRUE)
+ goto fail;
+ subli = subli->li_next;
+ if (subli != NULL)
+ {
+! len = get_tv_number_chk(&subli->li_tv, &error);
+ if (error == TRUE)
+ goto fail;
+ }
+--- 6879,6891 ----
+ subli = subli->li_next;
+ if (subli != NULL)
+ {
+! col = tv_get_number_chk(&subli->li_tv, &error);
+ if (error == TRUE)
+ goto fail;
+ subli = subli->li_next;
+ if (subli != NULL)
+ {
+! len = tv_get_number_chk(&subli->li_tv, &error);
+ if (error == TRUE)
+ goto fail;
+ }
+***************
+*** 7132,7138 ****
+
+ if (argvars[0].v_type == VAR_UNKNOWN)
+ return curwin->w_id;
+! winnr = get_tv_number(&argvars[0]);
+ if (winnr > 0)
+ {
+ if (argvars[1].v_type == VAR_UNKNOWN)
+--- 7132,7138 ----
+
+ if (argvars[0].v_type == VAR_UNKNOWN)
+ return curwin->w_id;
+! winnr = tv_get_number(&argvars[0]);
+ if (winnr > 0)
+ {
+ if (argvars[1].v_type == VAR_UNKNOWN)
+***************
+*** 7140,7146 ****
+ else
+ {
+ tabpage_T *tp;
+! int tabnr = get_tv_number(&argvars[1]);
+
+ FOR_ALL_TABPAGES(tp)
+ if (--tabnr == 0)
+--- 7140,7146 ----
+ else
+ {
+ tabpage_T *tp;
+! int tabnr = tv_get_number(&argvars[1]);
+
+ FOR_ALL_TABPAGES(tp)
+ if (--tabnr == 0)
+***************
+*** 7164,7170 ****
+ {
+ win_T *wp;
+ tabpage_T *tp;
+! int id = get_tv_number(&argvars[0]);
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ if (wp->w_id == id)
+--- 7164,7170 ----
+ {
+ win_T *wp;
+ tabpage_T *tp;
+! int id = tv_get_number(&argvars[0]);
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ if (wp->w_id == id)
+***************
+*** 7182,7188 ****
+ tabpage_T *tp;
+ int winnr = 1;
+ int tabnr = 1;
+! int id = get_tv_number(&argvars[0]);
+
+ FOR_ALL_TABPAGES(tp)
+ {
+--- 7182,7188 ----
+ tabpage_T *tp;
+ int winnr = 1;
+ int tabnr = 1;
+! int id = tv_get_number(&argvars[0]);
+
+ FOR_ALL_TABPAGES(tp)
+ {
+***************
+*** 7208,7214 ****
+ {
+ win_T *wp;
+ tabpage_T *tp;
+! int id = get_tv_number(&argvars[0]);
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ if (wp->w_id == id)
+--- 7208,7214 ----
+ {
+ win_T *wp;
+ tabpage_T *tp;
+! int id = tv_get_number(&argvars[0]);
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ if (wp->w_id == id)
+***************
+*** 7222,7228 ****
+ {
+ win_T *wp;
+ int nr = 1;
+! int id = get_tv_number(&argvars[0]);
+
+ FOR_ALL_WINDOWS(wp)
+ {
+--- 7222,7228 ----
+ {
+ win_T *wp;
+ int nr = 1;
+! int id = tv_get_number(&argvars[0]);
+
+ FOR_ALL_WINDOWS(wp)
+ {
+***************
+*** 7238,7244 ****
+ {
+ win_T *wp;
+ tabpage_T *tp;
+! int bufnr = get_tv_number(&argvars[0]);
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ if (wp->w_buffer->b_fnum == bufnr)
+--- 7238,7244 ----
+ {
+ win_T *wp;
+ tabpage_T *tp;
+! int bufnr = tv_get_number(&argvars[0]);
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ if (wp->w_buffer->b_fnum == bufnr)
+*** ../vim-8.1.0614/src/ex_cmds.c 2018-12-21 15:16:57.479579788 +0100
+--- src/ex_cmds.c 2018-12-21 15:52:31.953044706 +0100
+***************
+*** 8913,8919 ****
+ for (li = l->lv_first; li != NULL && !got_int; li = li->li_next)
+ {
+ ++nr;
+! fname = get_tv_string(&li->li_tv);
+ if (!message_filtered(fname))
+ {
+ msg_outnum((long)nr);
+--- 8913,8919 ----
+ for (li = l->lv_first; li != NULL && !got_int; li = li->li_next)
+ {
+ ++nr;
+! fname = tv_get_string(&li->li_tv);
+ if (!message_filtered(fname))
+ {
+ msg_outnum((long)nr);
+*** ../vim-8.1.0614/src/os_unix.c 2018-12-08 14:39:00.055120155 +0100
+--- src/os_unix.c 2018-12-21 15:52:50.360929614 +0100
+***************
+*** 1678,1690 ****
+ /*
+ * An X IO Error handler, used to catch terminal errors.
+ */
+! static int xterm_dpy_was_reset = FALSE;
+
+ static int
+ x_IOerror_handler(Display *dpy UNUSED)
+ {
+ xterm_dpy = NULL;
+! xterm_dpy_was_reset = TRUE;
+ x11_window = 0;
+ x11_display = NULL;
+ xterm_Shell = (Widget)0;
+--- 1678,1690 ----
+ /*
+ * An X IO Error handler, used to catch terminal errors.
+ */
+! static int xterm_dpy_retry_count = 0;
+
+ static int
+ x_IOerror_handler(Display *dpy UNUSED)
+ {
+ xterm_dpy = NULL;
+! xterm_dpy_retry_count = 5; // Try reconnecting five times
+ x11_window = 0;
+ x11_display = NULL;
+ xterm_Shell = (Widget)0;
+***************
+*** 1704,1712 ****
+ static void
+ may_restore_clipboard(void)
+ {
+! if (xterm_dpy_was_reset)
+ {
+! xterm_dpy_was_reset = FALSE;
+
+ # ifndef LESSTIF_VERSION
+ /* This has been reported to avoid Vim getting stuck. */
+--- 1704,1712 ----
+ static void
+ may_restore_clipboard(void)
+ {
+! if (xterm_dpy_retry_count > 0)
+ {
+! --xterm_dpy_retry_count;
+
+ # ifndef LESSTIF_VERSION
+ /* This has been reported to avoid Vim getting stuck. */
+***************
+*** 5553,5559 ****
+ {
+ typval_T *item = &dict_lookup(hi)->di_tv;
+
+! vim_setenv((char_u*)hi->hi_key, get_tv_string(item));
+ --todo;
+ }
+ }
+--- 5553,5559 ----
+ {
+ typval_T *item = &dict_lookup(hi)->di_tv;
+
+! vim_setenv((char_u*)hi->hi_key, tv_get_string(item));
+ --todo;
+ }
+ }
+***************
+*** 7494,7499 ****
+--- 7494,7501 ----
+ {
+ xterm_dpy = XtOpenDisplay(app_context, xterm_display,
+ "vim_xterm", "Vim_xterm", NULL, 0, &z, &strp);
++ if (xterm_dpy != NULL)
++ xterm_dpy_retry_count = 0;
+ #if defined(HAVE_SETJMP_H)
+ mch_endjmp();
+ #endif
+*** ../vim-8.1.0614/src/os_win32.c 2018-11-16 16:21:01.641310033 +0100
+--- src/os_win32.c 2018-12-21 15:52:57.296886140 +0100
+***************
+*** 5355,5361 ****
+ {
+ typval_T *item = &dict_lookup(hi)->di_tv;
+ WCHAR *wkey = enc_to_utf16((char_u *)hi->hi_key, NULL);
+! WCHAR *wval = enc_to_utf16(get_tv_string(item), NULL);
+ --todo;
+ if (wkey != NULL && wval != NULL)
+ {
+--- 5355,5361 ----
+ {
+ typval_T *item = &dict_lookup(hi)->di_tv;
+ WCHAR *wkey = enc_to_utf16((char_u *)hi->hi_key, NULL);
+! WCHAR *wval = enc_to_utf16(tv_get_string(item), NULL);
+ --todo;
+ if (wkey != NULL && wval != NULL)
+ {
+*** ../vim-8.1.0614/src/json.c 2018-09-30 21:43:17.195693290 +0200
+--- src/json.c 2018-12-21 15:57:46.355030394 +0100
+***************
+*** 873,879 ****
+ if (top_item != NULL && top_item->jd_type == JSON_OBJECT_KEY
+ && cur_item != NULL)
+ {
+! top_item->jd_key = get_tv_string_buf_chk(cur_item, key_buf);
+ if (top_item->jd_key == NULL)
+ {
+ clear_tv(cur_item);
+--- 873,879 ----
+ if (top_item != NULL && top_item->jd_type == JSON_OBJECT_KEY
+ && cur_item != NULL)
+ {
+! top_item->jd_key = tv_get_string_buf_chk(cur_item, key_buf);
+ if (top_item->jd_key == NULL)
+ {
+ clear_tv(cur_item);
+*** ../vim-8.1.0614/src/regexp.c 2018-09-30 21:43:17.203693237 +0200
+--- src/regexp.c 2018-12-21 15:58:23.750785268 +0100
+***************
+*** 7566,7572 ****
+ /* fill_submatch_list() was called */
+ clear_submatch_list(&matchList);
+
+! eval_result = get_tv_string_buf_chk(&rettv, buf);
+ if (eval_result != NULL)
+ eval_result = vim_strsave(eval_result);
+ clear_tv(&rettv);
+--- 7566,7572 ----
+ /* fill_submatch_list() was called */
+ clear_submatch_list(&matchList);
+
+! eval_result = tv_get_string_buf_chk(&rettv, buf);
+ if (eval_result != NULL)
+ eval_result = vim_strsave(eval_result);
+ clear_tv(&rettv);
+*** ../vim-8.1.0614/src/edit.c 2018-12-14 15:38:28.327597664 +0100
+--- src/edit.c 2018-12-21 15:59:19.326419307 +0100
+***************
+*** 4363,4369 ****
+ }
+ else
+ {
+! word = get_tv_string_chk(tv);
+ vim_memset(cptext, 0, sizeof(cptext));
+ }
+ if (word == NULL || (!aempty && *word == NUL))
+--- 4363,4369 ----
+ }
+ else
+ {
+! word = tv_get_string_chk(tv);
+ vim_memset(cptext, 0, sizeof(cptext));
+ }
+ if (word == NULL || (!aempty && *word == NUL))
+*** ../vim-8.1.0614/src/misc2.c 2018-12-21 15:16:57.479579788 +0100
+--- src/misc2.c 2018-12-21 16:00:56.985772017 +0100
+***************
+*** 6593,6599 ****
+ *argc = 0;
+ for (li = l->lv_first; li != NULL; li = li->li_next)
+ {
+! s = get_tv_string_chk(&li->li_tv);
+ if (s == NULL)
+ {
+ int i;
+--- 6593,6599 ----
+ *argc = 0;
+ for (li = l->lv_first; li != NULL; li = li->li_next)
+ {
+! s = tv_get_string_chk(&li->li_tv);
+ if (s == NULL)
+ {
+ int i;
+*** ../vim-8.1.0614/src/popupmnu.c 2018-12-01 11:58:44.415064948 +0100
+--- src/popupmnu.c 2018-12-21 16:01:04.985718779 +0100
+***************
+*** 1103,1109 ****
+ return;
+ for (idx = 0, li = list->lv_first; li != NULL; li = li->li_next, ++idx)
+ {
+! char_u *text = get_tv_string_chk(&li->li_tv);
+
+ balloon_array[idx].pum_text = vim_strsave(
+ text == NULL ? (char_u *)"" : text);
+--- 1103,1109 ----
+ return;
+ for (idx = 0, li = list->lv_first; li != NULL; li = li->li_next, ++idx)
+ {
+! char_u *text = tv_get_string_chk(&li->li_tv);
+
+ balloon_array[idx].pum_text = vim_strsave(
+ text == NULL ? (char_u *)"" : text);
+*** ../vim-8.1.0614/src/version.c 2018-12-21 15:16:57.483579762 +0100
+--- src/version.c 2018-12-21 16:03:51.828602235 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 615,
+ /**/
+
+--
+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.0616 b/data/vim/patches/8.1.0616
new file mode 100644
index 000000000..83f9b4b38
--- /dev/null
+++ b/data/vim/patches/8.1.0616
@@ -0,0 +1,5087 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0616
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0616
+Problem: NSIS installer is outdated.
+Solution: Use modern syntax, MUI2 and make it work better. Add translations.
+ (Ken Takata, closes #3501)
+Files: Filelist, nsis/gvim.nsi, nsis/icons/header.svg,
+ nsis/icons/welcome.svg, nsis/icons/header.bmp,
+ nsis/icons/un_header.bmp, nsis/icons/uninstall.bmp,
+ nsis/icons/welcome.bmp, nsis/lang/danish.nsi, nsis/lang/dutch.nsi,
+ nsis/lang/english.nsi, nsis/lang/german.nsi,
+ nsis/lang/italian.nsi, nsis/lang/japanese.nsi,
+ nsis/lang/simpchinese.nsi, nsis/lang/tradchinese.nsi,
+ src/dosinst.c
+
+
+*** ../vim-8.1.0615/Filelist 2018-12-13 22:17:52.865941558 +0100
+--- Filelist 2018-12-21 16:12:35.793045043 +0100
+***************
+*** 477,482 ****
+--- 477,483 ----
+ nsis/gvim_version.nsh \
+ nsis/vimrc.ini \
+ nsis/README.txt \
++ nsis/lang/*.nsi \
+ uninstal.txt \
+ src/VisVim/Commands.cpp \
+ src/VisVim/Commands.h \
+***************
+*** 517,522 ****
+--- 518,524 ----
+ src/xpm/x86/lib-vc14/libXpm.lib \
+ nsis/icons/*.bmp \
+ nsis/icons/*.ico \
++ nsis/icons/*.svg \
+
+ # source files for Amiga, DOS, etc. (also in the extra archive)
+ SRC_AMI_DOS = \
+*** ../vim-8.1.0615/nsis/gvim.nsi 2018-05-10 21:23:23.000000000 +0200
+--- nsis/gvim.nsi 2018-12-21 16:16:38.619382135 +0100
+***************
+*** 1,7 ****
+ # NSIS file to create a self-installing exe for Vim.
+! # It requires NSIS version 2.0 or later.
+ # Last Change: 2014 Nov 5
+
+ # WARNING: if you make changes to this script, look out for $0 to be valid,
+ # because uninstall deletes most files in $0.
+
+--- 1,9 ----
+ # NSIS file to create a self-installing exe for Vim.
+! # It requires NSIS version 3.0 or later.
+ # Last Change: 2014 Nov 5
+
++ Unicode true
++
+ # WARNING: if you make changes to this script, look out for $0 to be valid,
+ # because uninstall deletes most files in $0.
+
+***************
+*** 31,201 ****
+ # Get it at https://upx.github.io/
+ !define HAVE_UPX
+
+! # comment the next line if you do not want to add Native Language Support
+ !define HAVE_NLS
+
+ !include gvim_version.nsh # for version number
+
+ # ----------- No configurable settings below this line -----------
+
+! !include UpgradeDLL.nsh # for VisVim.dll
+! !include LogicLib.nsh
+! !include x64.nsh
+!
+! Name "Vim ${VER_MAJOR}.${VER_MINOR}"
+ OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
+ CRCCheck force
+ SetCompressor /SOLID lzma
+ SetDatablockOptimize on
+ RequestExecutionLevel highest
+- XPStyle on
+-
+- ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer."
+- DirText "Choose a directory to install Vim (should contain 'vim')"
+- Icon icons\vim_16c.ico
+- # NSIS2 uses a different strategy with six different images in a strip...
+- #EnabledBitmap icons\enabled.bmp
+- #DisabledBitmap icons\disabled.bmp
+- UninstallText "This will uninstall Vim ${VER_MAJOR}.${VER_MINOR} from your system."
+- UninstallIcon icons\vim_uninst_16c.ico
+-
+- # On NSIS 2 using the BGGradient causes trouble on Windows 98, in combination
+- # with the BringToFront.
+- # BGGradient 004000 008200 FFFFFF
+- LicenseText "You should read the following before installing:"
+- LicenseData ${VIMRT}\doc\uganda.nsis.txt
+
+ !ifdef HAVE_UPX
+ !packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
+ !endif
+
+! # This adds '\vim' to the user choice automagically. The actual value is
+! # obtained below with ReadINIStr.
+ InstallDir "$PROGRAMFILES\Vim"
+
+ # Types of installs we can perform:
+! InstType Typical
+! InstType Minimal
+! InstType Full
+
+ SilentInstall normal
+
+! # These are the pages we use
+! Page license
+! Page components
+! Page custom SetCustom ValidateCustom ": _vimrc setting"
+! Page directory "" "" CheckInstallDir
+! Page instfiles
+! UninstPage uninstConfirm
+! UninstPage instfiles
+!
+! # Reserve files
+! # Needed for showing the _vimrc setting page faster.
+! ReserveFile /plugin InstallOptions.dll
+! ReserveFile vimrc.ini
+
+ ##########################################################
+! # Functions
+!
+! Function .onInit
+! MessageBox MB_YESNO|MB_ICONQUESTION \
+! "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer.$\n Continue?" \
+! /SD IDYES \
+! IDYES NoAbort
+! Abort ; causes installer to quit.
+! NoAbort:
+!
+! # run the install program to check for already installed versions
+! SetOutPath $TEMP
+! File /oname=install.exe ${VIMSRC}\installw32.exe
+! ExecWait "$TEMP\install.exe -uninstall-check"
+! Delete $TEMP\install.exe
+!
+! # We may have been put to the background when uninstall did something.
+! BringToFront
+!
+! # Install will have created a file for us that contains the directory where
+! # we should install. This is $VIM if it's set. This appears to be the only
+! # way to get the value of $VIM here!?
+! ReadINIStr $INSTDIR $TEMP\vimini.ini vimini dir
+! Delete $TEMP\vimini.ini
+!
+! # If ReadINIStr failed or did not find a path: use the default dir.
+! StrCmp $INSTDIR "" 0 IniOK
+! StrCpy $INSTDIR "$PROGRAMFILES\Vim"
+! IniOK:
+!
+! # Should check for the value of $VIM and use it. Unfortunately I don't know
+! # how to obtain the value of $VIM
+! # IfFileExists "$VIM" 0 No_Vim
+! # StrCpy $INSTDIR "$VIM"
+! # No_Vim:
+
+! # User variables:
+! # $0 - holds the directory the executables are installed to
+! # $1 - holds the parameters to be passed to install.exe. Starts with OLE
+! # registration (since a non-OLE gvim will not complain, and we want to
+! # always register an OLE gvim).
+! # $2 - holds the names to create batch files for
+! StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
+! StrCpy $1 "-register-OLE"
+! StrCpy $2 "gvim evim gview gvimdiff vimtutor"
+
+! # Extract InstallOptions files
+! # $PLUGINSDIR will automatically be removed when the installer closes
+! InitPluginsDir
+! File /oname=$PLUGINSDIR\vimrc.ini "vimrc.ini"
+! FunctionEnd
+
+- Function .onUserAbort
+- MessageBox MB_YESNO|MB_ICONQUESTION "Abort install?" IDYES NoCancelAbort
+- Abort ; causes installer to not quit.
+- NoCancelAbort:
+- FunctionEnd
+
+! # We only accept the directory if it ends in "vim". Using .onVerifyInstDir has
+! # the disadvantage that the browse dialog is difficult to use.
+! Function CheckInstallDir
+! FunctionEnd
+
+- Function .onInstSuccess
+- WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe
+- MessageBox MB_YESNO|MB_ICONQUESTION \
+- "The installation process has been successful. Happy Vimming! \
+- $\n$\n Do you want to see the README file now?" IDNO NoReadme
+- Exec '$0\gvim.exe -R "$0\README.txt"'
+- NoReadme:
+- FunctionEnd
+
+! Function .onInstFailed
+! MessageBox MB_OK|MB_ICONEXCLAMATION "Installation failed. Better luck next time."
+! FunctionEnd
+
+! Function un.onUnInstSuccess
+! MessageBox MB_OK|MB_ICONINFORMATION \
+! "Vim ${VER_MAJOR}.${VER_MINOR} has been (partly) removed from your system"
+! FunctionEnd
+
+! Function un.GetParent
+ Exch $0 ; old $0 is on top of stack
+ Push $1
+ Push $2
+ StrCpy $1 -1
+! loop:
+ StrCpy $2 $0 1 $1
+! StrCmp $2 "" exit
+! StrCmp $2 "\" exit
+ IntOp $1 $1 - 1
+! Goto loop
+! exit:
+! StrCpy $0 $0 $1
+! Pop $2
+! Pop $1
+! Exch $0 ; put $0 on top of stack, restore $0 to original value
+ FunctionEnd
+
+ ##########################################################
+! Section "Vim executables and runtime files"
+ SectionIn 1 2 3 RO
+
+ # we need also this here if the user changes the instdir
+--- 33,320 ----
+ # Get it at https://upx.github.io/
+ !define HAVE_UPX
+
+! # Comment the next line if you do not want to add Native Language Support
+ !define HAVE_NLS
+
++ # Uncomment the next line if you want to include VisVim extension:
++ #!define HAVE_VIS_VIM
++
++ # Comment the following line to create a multilanguage installer:
++ !define HAVE_MULTI_LANG
++
++ # Uncomment the next line if you want to create a 64-bit installer.
++ #!define WIN64
++
+ !include gvim_version.nsh # for version number
+
+ # ----------- No configurable settings below this line -----------
+
+! !include "Library.nsh" # For DLL install
+! !ifdef HAVE_VIS_VIM
+! !include "UpgradeDLL.nsh" # for VisVim.dll
+! !endif
+! !include "LogicLib.nsh"
+! !include "MUI2.nsh"
+! !include "nsDialogs.nsh"
+! !include "Sections.nsh"
+! !include "x64.nsh"
+!
+! !define PRODUCT "Vim ${VER_MAJOR}.${VER_MINOR}"
+! !define UNINST_REG_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall"
+! !define UNINST_REG_KEY_VIM "${UNINST_REG_KEY}\${PRODUCT}"
+!
+! !ifdef WIN64
+! Name "${PRODUCT} (x64)"
+! !else
+! Name "${PRODUCT}"
+! !endif
+ OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
+ CRCCheck force
+ SetCompressor /SOLID lzma
++ SetCompressorDictSize 64
++ ManifestDPIAware true
+ SetDatablockOptimize on
+ RequestExecutionLevel highest
+
+ !ifdef HAVE_UPX
+ !packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
+ !endif
+
+! !ifdef WIN64
+! !define BIT 64
+! !else
+! !define BIT 32
+! !endif
+!
+! ##########################################################
+! # MUI2 settings
+!
+! !define MUI_ABORTWARNING
+! !define MUI_UNABORTWARNING
+!
+! !define MUI_ICON "icons\vim_16c.ico"
+! !define MUI_UNICON "icons\vim_uninst_16c.ico"
+!
+! # Show all languages, despite user's codepage:
+! !define MUI_LANGDLL_ALLLANGUAGES
+! !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
+! !define MUI_LANGDLL_REGISTRY_KEY "Software\Vim"
+! !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
+!
+! !define MUI_WELCOMEFINISHPAGE_BITMAP "icons\welcome.bmp"
+! !define MUI_UNWELCOMEFINISHPAGE_BITMAP "icons\uninstall.bmp"
+! !define MUI_HEADERIMAGE
+! !define MUI_HEADERIMAGE_BITMAP "icons\header.bmp"
+! !define MUI_HEADERIMAGE_UNBITMAP "icons\un_header.bmp"
+!
+! !define MUI_WELCOMEFINISHPAGE_BITMAP_STRETCH "AspectFitHeight"
+! !define MUI_UNWELCOMEFINISHPAGE_BITMAP_STRETCH "AspectFitHeight"
+! !define MUI_HEADERIMAGE_BITMAP_STRETCH "AspectFitHeight"
+! !define MUI_HEADERIMAGE_UNBITMAP_STRETCH "AspectFitHeight"
+!
+! !define MUI_COMPONENTSPAGE_SMALLDESC
+! !define MUI_LICENSEPAGE_CHECKBOX
+! !define MUI_FINISHPAGE_RUN "$0\gvim.exe"
+! !define MUI_FINISHPAGE_RUN_TEXT $(str_show_readme)
+! !define MUI_FINISHPAGE_RUN_PARAMETERS "-R $\"$0\README.txt$\""
+!
+! # This adds '\Vim' to the user choice automagically. The actual value is
+! # obtained below with CheckOldVim.
+! !ifdef WIN64
+! InstallDir "$PROGRAMFILES64\Vim"
+! !else
+ InstallDir "$PROGRAMFILES\Vim"
++ !endif
+
+ # Types of installs we can perform:
+! InstType $(str_type_typical)
+! InstType $(str_type_minimal)
+! InstType $(str_type_full)
+
+ SilentInstall normal
+
+! # General custom functions for MUI2:
+! #!define MUI_CUSTOMFUNCTION_ABORT VimOnUserAbort
+! #!define MUI_CUSTOMFUNCTION_UNABORT un.VimOnUserAbort
+!
+! # Installer pages
+! !insertmacro MUI_PAGE_WELCOME
+! !insertmacro MUI_PAGE_LICENSE "${VIMRT}\doc\uganda.nsis.txt"
+! !insertmacro MUI_PAGE_COMPONENTS
+! Page custom SetCustom ValidateCustom
+! #!define MUI_PAGE_CUSTOMFUNCTION_LEAVE VimFinalCheck
+! !insertmacro MUI_PAGE_DIRECTORY
+! !insertmacro MUI_PAGE_INSTFILES
+! !define MUI_FINISHPAGE_NOREBOOTSUPPORT
+! !insertmacro MUI_PAGE_FINISH
+!
+! # Uninstaller pages:
+! !insertmacro MUI_UNPAGE_CONFIRM
+! #!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.VimCheckRunning
+! !insertmacro MUI_UNPAGE_COMPONENTS
+! !insertmacro MUI_UNPAGE_INSTFILES
+! !define MUI_FINISHPAGE_NOREBOOTSUPPORT
+! !insertmacro MUI_UNPAGE_FINISH
+
+ ##########################################################
+! # Languages Files
+
+! !insertmacro MUI_RESERVEFILE_LANGDLL
+! !include "lang\english.nsi"
+
+! # Include support for other languages:
+! !ifdef HAVE_MULTI_LANG
+! !include "lang\danish.nsi"
+! !include "lang\dutch.nsi"
+! !include "lang\german.nsi"
+! !include "lang\italian.nsi"
+! !include "lang\japanese.nsi"
+! !include "lang\simpchinese.nsi"
+! !include "lang\tradchinese.nsi"
+! !endif
+
+
+! # Global variables
+! Var vim_dialog
+! Var vim_nsd_compat
+! Var vim_nsd_keymap
+! Var vim_nsd_mouse
+! Var vim_compat_stat
+! Var vim_keymap_stat
+! Var vim_mouse_stat
+
+
+! # Reserve files
+! ReserveFile ${VIMSRC}\installw32.exe
+
+! ##########################################################
+! # Functions
+
+! # Get parent directory
+! # Share this function both on installer and uninstaller
+! !macro GetParent un
+! Function ${un}GetParent
+ Exch $0 ; old $0 is on top of stack
+ Push $1
+ Push $2
+ StrCpy $1 -1
+! ${Do}
+ StrCpy $2 $0 1 $1
+! ${If} $2 == ""
+! ${OrIf} $2 == "\"
+! ${ExitDo}
+! ${EndIf}
+ IntOp $1 $1 - 1
+! ${Loop}
+! StrCpy $0 $0 $1
+! Pop $2
+! Pop $1
+! Exch $0 ; put $0 on top of stack, restore $0 to original value
+! FunctionEnd
+! !macroend
+!
+! !insertmacro GetParent ""
+! !insertmacro GetParent "un."
+!
+! # Check if Vim is already installed.
+! # return: Installed directory. If not found, it will be empty.
+! Function CheckOldVim
+! Push $0
+! Push $R0
+! Push $R1
+! Push $R2
+!
+! ${If} ${RunningX64}
+! SetRegView 64
+! ${EndIf}
+!
+! ClearErrors
+! StrCpy $0 "" # Installed directory
+! StrCpy $R0 0 # Sub-key index
+! StrCpy $R1 "" # Sub-key
+! ${Do}
+! # Eumerate the sub-key:
+! EnumRegKey $R1 HKLM ${UNINST_REG_KEY} $R0
+!
+! # Stop if no more sub-key:
+! ${If} ${Errors}
+! ${OrIf} $R1 == ""
+! ${ExitDo}
+! ${EndIf}
+!
+! # Move to the next sub-key:
+! IntOp $R0 $R0 + 1
+!
+! # Check if the key is Vim uninstall key or not:
+! StrCpy $R2 $R1 4
+! ${If} $R2 S!= "Vim "
+! ${Continue}
+! ${EndIf}
+!
+! # Verifies required sub-keys:
+! ReadRegStr $R2 HKLM "${UNINST_REG_KEY}\$R1" "DisplayName"
+! ${If} ${Errors}
+! ${OrIf} $R2 == ""
+! ${Continue}
+! ${EndIf}
+!
+! ReadRegStr $R2 HKLM "${UNINST_REG_KEY}\$R1" "UninstallString"
+! ${If} ${Errors}
+! ${OrIf} $R2 == ""
+! ${Continue}
+! ${EndIf}
+!
+! # Found
+! Push $R2
+! call GetParent
+! call GetParent
+! Pop $0 # Vim directory
+! ${ExitDo}
+!
+! ${Loop}
+!
+! ${If} ${RunningX64}
+! SetRegView lastused
+! ${EndIf}
+!
+! Pop $R2
+! Pop $R1
+! Pop $R0
+! Exch $0 # put $0 on top of stack, restore $0 to original value
+ FunctionEnd
+
+ ##########################################################
+! Section "$(str_section_old_ver)" id_section_old_ver
+! SectionIn 1 2 3 RO
+!
+! # run the install program to check for already installed versions
+! SetOutPath $TEMP
+! File /oname=install.exe ${VIMSRC}\installw32.exe
+! DetailPrint "$(str_msg_uninstalling)"
+! ${Do}
+! nsExec::Exec "$TEMP\install.exe -uninstall-check"
+! Pop $3
+!
+! call CheckOldVim
+! Pop $3
+! ${If} $3 == ""
+! ${ExitDo}
+! ${Else}
+! # It seems that the old version is still remaining.
+! # TODO: Should we show a warning and run the uninstaller again?
+!
+! ${ExitDo} # Just ignore for now.
+! ${EndIf}
+! ${Loop}
+! Delete $TEMP\install.exe
+! Delete $TEMP\vimini.ini # install.exe creates this, but we don't need it.
+!
+! # We may have been put to the background when uninstall did something.
+! BringToFront
+! SectionEnd
+!
+! ##########################################################
+! Section "$(str_section_exe)" id_section_exe
+ SectionIn 1 2 3 RO
+
+ # we need also this here if the user changes the instdir
+***************
+*** 215,221 ****
+ File ${VIMRT}\rgb.txt
+
+ File ${VIMTOOLS}\diff.exe
+! File ${VIMTOOLS}\winpty32.dll
+ File ${VIMTOOLS}\winpty-agent.exe
+
+ SetOutPath $0\colors
+--- 334,340 ----
+ File ${VIMRT}\rgb.txt
+
+ File ${VIMTOOLS}\diff.exe
+! File ${VIMTOOLS}\winpty${BIT}.dll
+ File ${VIMTOOLS}\winpty-agent.exe
+
+ SetOutPath $0\colors
+***************
+*** 299,418 ****
+ SectionEnd
+
+ ##########################################################
+! Section "Vim console program (vim.exe)"
+ SectionIn 1 3
+
+ SetOutPath $0
+! ReadRegStr $R0 HKLM \
+! "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
+! IfErrors 0 lbl_winnt
+! # Windows 95/98/ME: not supported
+! Goto lbl_done
+! lbl_winnt:
+! # Windows NT/2000/XP and later
+! File /oname=vim.exe ${VIMSRC}\vimw32.exe
+! lbl_done:
+ StrCpy $2 "$2 vim view vimdiff"
+ SectionEnd
+
+ ##########################################################
+! Section "Create .bat files for command line use"
+ SectionIn 3
+
+ StrCpy $1 "$1 -create-batfiles $2"
+ SectionEnd
+
+ ##########################################################
+! Section "Create icons on the Desktop"
+! SectionIn 1 3
+
+! StrCpy $1 "$1 -install-icons"
+! SectionEnd
+
+! ##########################################################
+! Section "Add Vim to the Start Menu"
+! SectionIn 1 3
+
+! StrCpy $1 "$1 -add-start-menu"
+! SectionEnd
+
+ ##########################################################
+! Section "Add an Edit-with-Vim context menu entry"
+ SectionIn 1 3
+
+- # Be aware of this sequence of events:
+- # - user uninstalls Vim, gvimext.dll can't be removed (it's in use) and
+- # is scheduled to be removed at next reboot.
+- # - user installs Vim in same directory, gvimext.dll still exists.
+- # If we now skip installing gvimext.dll, it will disappear at the next
+- # reboot. Thus when copying gvimext.dll fails always schedule it to be
+- # installed at the next reboot. Can't use UpgradeDLL!
+- # We don't ask the user to reboot, the old dll will keep on working.
+ SetOutPath $0
+- ClearErrors
+- SetOverwrite try
+
+ ${If} ${RunningX64}
+ # Install 64-bit gvimext.dll into the GvimExt64 directory.
+ SetOutPath $0\GvimExt64
+ ClearErrors
+! File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext64.dll
+! !ifdef HAVE_NLS
+! File ${GETTEXT}\gettext64\libintl-8.dll
+! File ${GETTEXT}\gettext64\libiconv-2.dll
+! !endif
+!
+! IfErrors 0 GvimExt64Done
+!
+! # Can't copy gvimext.dll, create it under another name and rename it
+! # on next reboot.
+! GetTempFileName $3 $0\GvimExt64
+! File /oname=$3 ${VIMSRC}\GvimExt\gvimext64.dll
+! Rename /REBOOTOK $3 $0\GvimExt64\gvimext.dll
+! !ifdef HAVE_NLS
+! GetTempFileName $3 $0\GvimExt64
+! File /oname=$3 ${GETTEXT}\gettext64\libintl-8.dll
+! Rename /REBOOTOK $3 $0\GvimExt64\libintl-8.dll
+! GetTempFileName $3 $0\GvimExt64
+! File /oname=$3 ${GETTEXT}\gettext64\libiconv-2.dll
+! Rename /REBOOTOK $3 $0\GvimExt64\libiconv-2.dll
+! !endif
+ ${EndIf}
+
+- GvimExt64Done:
+-
+ # Install 32-bit gvimext.dll into the GvimExt32 directory.
+ SetOutPath $0\GvimExt32
+ ClearErrors
+!
+! File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext.dll
+! !ifdef HAVE_NLS
+! File ${GETTEXT}\gettext32\libintl-8.dll
+! File ${GETTEXT}\gettext32\libiconv-2.dll
+! File ${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll
+! !endif
+!
+! IfErrors 0 GvimExt32Done
+!
+! # Can't copy gvimext.dll, create it under another name and rename it on
+! # next reboot.
+! GetTempFileName $3 $0\GvimExt32
+! File /oname=$3 ${VIMSRC}\GvimExt\gvimext.dll
+! Rename /REBOOTOK $3 $0\GvimExt32\gvimext.dll
+! !ifdef HAVE_NLS
+! GetTempFileName $3 $0\GvimExt32
+! File /oname=$3 ${GETTEXT}\gettext32\libintl-8.dll
+! Rename /REBOOTOK $3 $0\GvimExt32\libintl-8.dll
+! GetTempFileName $3 $0\GvimExt32
+! File /oname=$3 ${GETTEXT}\gettext32\libiconv-2.dll
+! Rename /REBOOTOK $3 $0\GvimExt32\libiconv-2.dll
+! GetTempFileName $3 $0\GvimExt32
+! File /oname=$3 ${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll
+! Rename /REBOOTOK $3 $0\GvimExt32\libgcc_s_sjlj-1.dll
+! !endif
+!
+! GvimExt32Done:
+! SetOverwrite lastused
+
+ # We don't have a separate entry for the "Open With..." menu, assume
+ # the user wants either both or none.
+--- 418,480 ----
+ SectionEnd
+
+ ##########################################################
+! Section "$(str_section_console)" id_section_console
+ SectionIn 1 3
+
+ SetOutPath $0
+! File /oname=vim.exe ${VIMSRC}\vimw32.exe
+ StrCpy $2 "$2 vim view vimdiff"
+ SectionEnd
+
+ ##########################################################
+! Section "$(str_section_batch)" id_section_batch
+ SectionIn 3
+
+ StrCpy $1 "$1 -create-batfiles $2"
+ SectionEnd
+
+ ##########################################################
+! SectionGroup $(str_group_icons) id_group_icons
+! Section "$(str_section_desktop)" id_section_desktop
+! SectionIn 1 3
+
+! StrCpy $1 "$1 -install-icons"
+! SectionEnd
+
+! Section "$(str_section_start_menu)" id_section_startmenu
+! SectionIn 1 3
+
+! StrCpy $1 "$1 -add-start-menu"
+! SectionEnd
+! SectionGroupEnd
+
+ ##########################################################
+! Section "$(str_section_edit_with)" id_section_editwith
+ SectionIn 1 3
+
+ SetOutPath $0
+
+ ${If} ${RunningX64}
+ # Install 64-bit gvimext.dll into the GvimExt64 directory.
+ SetOutPath $0\GvimExt64
+ ClearErrors
+! !define LIBRARY_SHELL_EXTENSION
+! !define LIBRARY_X64
+! !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "${VIMSRC}\GvimExt\gvimext64.dll" \
+! "$0\GvimExt64\gvimext.dll" "$0"
+! !undef LIBRARY_X64
+! !undef LIBRARY_SHELL_EXTENSION
+ ${EndIf}
+
+ # Install 32-bit gvimext.dll into the GvimExt32 directory.
+ SetOutPath $0\GvimExt32
+ ClearErrors
+! !define LIBRARY_SHELL_EXTENSION
+! !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "${VIMSRC}\GvimExt\gvimext.dll" \
+! "$0\GvimExt32\gvimext.dll" "$0"
+! !undef LIBRARY_SHELL_EXTENSION
+
+ # We don't have a separate entry for the "Open With..." menu, assume
+ # the user wants either both or none.
+***************
+*** 420,550 ****
+ SectionEnd
+
+ ##########################################################
+! Section "Create a _vimrc if it doesn't exist" sec_vimrc_id
+ SectionIn 1 3
+
+ StrCpy $1 "$1 -create-vimrc"
+- SectionEnd
+
+! ##########################################################
+! Section "Create plugin directories in HOME or VIM"
+! SectionIn 1 3
+
+- StrCpy $1 "$1 -create-directories home"
+ SectionEnd
+
+ ##########################################################
+! Section "Create plugin directories in VIM"
+! SectionIn 3
+
+! StrCpy $1 "$1 -create-directories vim"
+! SectionEnd
+
+ ##########################################################
+! Section "VisVim Extension for MS Visual Studio"
+ SectionIn 3
+
+ SetOutPath $0
+ !insertmacro UpgradeDLL "${VIMSRC}\VisVim\VisVim.dll" "$0\VisVim.dll" "$0"
+ File ${VIMSRC}\VisVim\README_VisVim.txt
+ SectionEnd
+
+ ##########################################################
+ !ifdef HAVE_NLS
+! Section "Native Language Support"
+! SectionIn 1 3
+
+! SetOutPath $0\lang
+! File /r ${VIMRT}\lang\*.*
+! SetOutPath $0\keymap
+! File ${VIMRT}\keymap\README.txt
+! File ${VIMRT}\keymap\*.vim
+! SetOutPath $0
+! File ${GETTEXT}\gettext32\libintl-8.dll
+! File ${GETTEXT}\gettext32\libiconv-2.dll
+! #File /nonfatal ${VIMRT}\libwinpthread-1.dll
+! File /nonfatal ${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll
+! SectionEnd
+ !endif
+
+ ##########################################################
+ Section -call_install_exe
+ SetOutPath $0
+! ExecWait "$0\install.exe $1"
+ SectionEnd
+
+ ##########################################################
+ Section -post
+ BringToFront
+ SectionEnd
+
+ ##########################################################
+ Function SetCustom
+! # Display the InstallOptions dialog
+
+ # Check if a _vimrc should be created
+! SectionGetFlags ${sec_vimrc_id} $3
+! IntOp $3 $3 & 1
+! StrCmp $3 "1" +2 0
+ Abort
+
+! InstallOptions::dialog "$PLUGINSDIR\vimrc.ini"
+ Pop $3
+ FunctionEnd
+
+ Function ValidateCustom
+! ReadINIStr $3 "$PLUGINSDIR\vimrc.ini" "Field 2" "State"
+! StrCmp $3 "1" 0 +3
+! StrCpy $1 "$1 -vimrc-remap no"
+! Goto behave
+
+! StrCpy $1 "$1 -vimrc-remap win"
+
+! behave:
+! ReadINIStr $3 "$PLUGINSDIR\vimrc.ini" "Field 5" "State"
+! StrCmp $3 "1" 0 +3
+! StrCpy $1 "$1 -vimrc-behave unix"
+! Goto done
+
+! ReadINIStr $3 "$PLUGINSDIR\vimrc.ini" "Field 6" "State"
+! StrCmp $3 "1" 0 +3
+! StrCpy $1 "$1 -vimrc-behave mswin"
+! Goto done
+
+- StrCpy $1 "$1 -vimrc-behave default"
+- done:
+- FunctionEnd
+
+ ##########################################################
+! Section Uninstall
+ # Apparently $INSTDIR is set to the directory where the uninstaller is
+ # created. Thus the "vim61" directory is included in it.
+ StrCpy $0 "$INSTDIR"
+
+ # If VisVim was installed, unregister the DLL.
+! IfFileExists "$0\VisVim.dll" Has_VisVim No_VisVim
+! Has_VisVim:
+! ExecWait "regsvr32.exe /u /s $0\VisVim.dll"
+!
+! No_VisVim:
+
+ # delete the context menu entry and batch files
+! ExecWait "$0\uninstal.exe -nsis"
+
+ # We may have been put to the background when uninstall did something.
+ BringToFront
+
+! # ask the user if the Vim version dir must be removed
+! MessageBox MB_YESNO|MB_ICONQUESTION \
+! "Would you like to delete $0?$\n \
+! $\nIt contains the Vim executables and runtime files." IDNO NoRemoveExes
+
+ Delete /REBOOTOK $0\*.dll
+! Delete /REBOOTOK $0\GvimExt32\*.dll
+ ${If} ${RunningX64}
+! Delete /REBOOTOK $0\GvimExt64\*.dll
+ ${EndIf}
+
+ ClearErrors
+ # Remove everything but *.dll files. Avoids that
+ # a lot remains when gvimext.dll cannot be deleted.
+--- 482,1045 ----
+ SectionEnd
+
+ ##########################################################
+! Section "$(str_section_vim_rc)" id_section_vimrc
+ SectionIn 1 3
+
+ StrCpy $1 "$1 -create-vimrc"
+
+! ${If} ${RunningX64}
+! SetRegView 64
+! ${EndIf}
+! WriteRegStr HKLM "${UNINST_REG_KEY_VIM}" "vim_compat" "$vim_compat_stat"
+! WriteRegStr HKLM "${UNINST_REG_KEY_VIM}" "vim_keyremap" "$vim_keymap_stat"
+! WriteRegStr HKLM "${UNINST_REG_KEY_VIM}" "vim_mouse" "$vim_mouse_stat"
+! ${If} ${RunningX64}
+! SetRegView lastused
+! ${EndIf}
+!
+! ${If} $vim_compat_stat == "vi"
+! StrCpy $1 "$1 -vimrc-compat vi"
+! ${ElseIf} $vim_compat_stat == "vim"
+! StrCpy $1 "$1 -vimrc-compat vim"
+! ${ElseIf} $vim_compat_stat == "defaults"
+! StrCpy $1 "$1 -vimrc-compat defaults"
+! ${Else}
+! StrCpy $1 "$1 -vimrc-compat all"
+! ${EndIf}
+!
+! ${If} $vim_keymap_stat == "default"
+! StrCpy $1 "$1 -vimrc-remap no"
+! ${Else}
+! StrCpy $1 "$1 -vimrc-remap win"
+! ${EndIf}
+!
+! ${If} $vim_mouse_stat == "default"
+! StrCpy $1 "$1 -vimrc-behave default"
+! ${ElseIf} $vim_mouse_stat == "windows"
+! StrCpy $1 "$1 -vimrc-behave mswin"
+! ${Else}
+! StrCpy $1 "$1 -vimrc-behave unix"
+! ${EndIf}
+
+ SectionEnd
+
+ ##########################################################
+! SectionGroup $(str_group_plugin) id_group_plugin
+! Section "$(str_section_plugin_home)" id_section_pluginhome
+! SectionIn 1 3
+
+! StrCpy $1 "$1 -create-directories home"
+! SectionEnd
+!
+! Section "$(str_section_plugin_vim)" id_section_pluginvim
+! SectionIn 3
+!
+! StrCpy $1 "$1 -create-directories vim"
+! SectionEnd
+! SectionGroupEnd
+
+ ##########################################################
+! !ifdef HAVE_VIS_VIM
+! Section "$(str_section_vis_vim)" id_section_visvim
+ SectionIn 3
+
+ SetOutPath $0
+ !insertmacro UpgradeDLL "${VIMSRC}\VisVim\VisVim.dll" "$0\VisVim.dll" "$0"
+ File ${VIMSRC}\VisVim\README_VisVim.txt
+ SectionEnd
++ !endif
+
+ ##########################################################
+ !ifdef HAVE_NLS
+! Section "$(str_section_nls)" id_section_nls
+! SectionIn 1 3
+
+! SetOutPath $0\lang
+! File /r ${VIMRT}\lang\*.*
+! SetOutPath $0\keymap
+! File ${VIMRT}\keymap\README.txt
+! File ${VIMRT}\keymap\*.vim
+! SetOutPath $0
+! !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "${GETTEXT}\gettext${BIT}\libintl-8.dll" \
+! "$0\libintl-8.dll" "$0"
+! !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "${GETTEXT}\gettext${BIT}\libiconv-2.dll" \
+! "$0\libiconv-2.dll" "$0"
+! !if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll"
+! # Install libgcc_s_sjlj-1.dll only if it is needed.
+! !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" \
+! "$0\libgcc_s_sjlj-1.dll" "$0"
+! !endif
+!
+! ${If} ${SectionIsSelected} ${id_section_editwith}
+! ${If} ${RunningX64}
+! # Install DLLs for 64-bit gvimext.dll into the GvimExt64 directory.
+! SetOutPath $0\GvimExt64
+! ClearErrors
+! !define LIBRARY_X64
+! !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "${GETTEXT}\gettext64\libintl-8.dll" \
+! "$0\GvimExt64\libintl-8.dll" "$0\GvimExt64"
+! !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "${GETTEXT}\gettext64\libiconv-2.dll" \
+! "$0\GvimExt64\libiconv-2.dll" "$0\GvimExt64"
+! !undef LIBRARY_X64
+! ${EndIf}
+!
+! # Install DLLs for 32-bit gvimext.dll into the GvimExt32 directory.
+! SetOutPath $0\GvimExt32
+! ClearErrors
+! !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "${GETTEXT}\gettext32\libintl-8.dll" \
+! "$0\GvimExt32\libintl-8.dll" "$0\GvimExt32"
+! !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "${GETTEXT}\gettext32\libiconv-2.dll" \
+! "$0\GvimExt32\libiconv-2.dll" "$0\GvimExt32"
+! !if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll"
+! # Install libgcc_s_sjlj-1.dll only if it is needed.
+! !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \
+! "$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32"
+! !endif
+! ${EndIf}
+! SectionEnd
+ !endif
+
+ ##########################################################
+ Section -call_install_exe
+ SetOutPath $0
+! DetailPrint "$(str_msg_registering)"
+! nsExec::Exec "$0\install.exe $1"
+! Pop $3
+ SectionEnd
+
+ ##########################################################
++ !macro SaveSectionSelection section_id reg_value
++ ${If} ${SectionIsSelected} ${section_id}
++ WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" ${reg_value} 1
++ ${Else}
++ WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" ${reg_value} 0
++ ${EndIf}
++ !macroend
++
+ Section -post
++
++ # Get estimated install size
++ SectionGetSize ${id_section_exe} $3
++ ${If} ${SectionIsSelected} ${id_section_console}
++ SectionGetSize ${id_section_console} $4
++ IntOp $3 $3 + $4
++ ${EndIf}
++ ${If} ${SectionIsSelected} ${id_section_editwith}
++ SectionGetSize ${id_section_editwith} $4
++ IntOp $3 $3 + $4
++ ${EndIf}
++ !ifdef HAVE_VIS_VIM
++ ${If} ${SectionIsSelected} ${id_section_visvim}
++ SectionGetSize ${id_section_visvim} $4
++ IntOp $3 $3 + $4
++ ${EndIf}
++ !endif
++ !ifdef HAVE_NLS
++ ${If} ${SectionIsSelected} ${id_section_nls}
++ SectionGetSize ${id_section_nls} $4
++ IntOp $3 $3 + $4
++ ${EndIf}
++ !endif
++
++ # Register EstimatedSize and AllowSilent.
++ # Other information will be set by the install.exe (dosinst.c).
++ ${If} ${RunningX64}
++ SetRegView 64
++ ${EndIf}
++ WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" "EstimatedSize" $3
++ WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" "AllowSilent" 1
++ ${If} ${RunningX64}
++ SetRegView lastused
++ ${EndIf}
++
++ # Store the selections to the registry.
++ ${If} ${RunningX64}
++ SetRegView 64
++ ${EndIf}
++ !insertmacro SaveSectionSelection ${id_section_console} "select_console"
++ !insertmacro SaveSectionSelection ${id_section_batch} "select_batch"
++ !insertmacro SaveSectionSelection ${id_section_desktop} "select_desktop"
++ !insertmacro SaveSectionSelection ${id_section_startmenu} "select_startmenu"
++ !insertmacro SaveSectionSelection ${id_section_editwith} "select_editwith"
++ !insertmacro SaveSectionSelection ${id_section_vimrc} "select_vimrc"
++ !insertmacro SaveSectionSelection ${id_section_pluginhome} "select_pluginhome"
++ !insertmacro SaveSectionSelection ${id_section_pluginvim} "select_pluginvim"
++ !ifdef HAVE_VIS_VIM
++ !insertmacro SaveSectionSelection ${id_section_visvim} "select_visvim"
++ !endif
++ !ifdef HAVE_NLS
++ !insertmacro SaveSectionSelection ${id_section_nls} "select_nls"
++ !endif
++ ${If} ${RunningX64}
++ SetRegView lastused
++ ${EndIf}
++
+ BringToFront
+ SectionEnd
+
+ ##########################################################
++ !macro LoadSectionSelection section_id reg_value
++ ClearErrors
++ ReadRegDWORD $3 HKLM "${UNINST_REG_KEY_VIM}" ${reg_value}
++ ${IfNot} ${Errors}
++ ${If} $3 = 1
++ !insertmacro SelectSection ${section_id}
++ ${Else}
++ !insertmacro UnselectSection ${section_id}
++ ${EndIf}
++ ${EndIf}
++ !macroend
++
++ Function .onInit
++ !ifdef HAVE_MULTI_LANG
++ # Select a language (or read from the registry).
++ !insertmacro MUI_LANGDLL_DISPLAY
++ !endif
++
++ # Check $VIM
++ ReadEnvStr $INSTDIR "VIM"
++
++ call CheckOldVim
++ Pop $3
++ ${If} $3 == ""
++ # No old versions of Vim found. Unselect and hide the section.
++ !insertmacro UnselectSection ${id_section_old_ver}
++ SectionSetInstTypes ${id_section_old_ver} 0
++ SectionSetText ${id_section_old_ver} ""
++ ${Else}
++ ${If} $INSTDIR == ""
++ StrCpy $INSTDIR $3
++ ${EndIf}
++ ${EndIf}
++
++ # If did not find a path: use the default dir.
++ ${If} $INSTDIR == ""
++ !ifdef WIN64
++ StrCpy $INSTDIR "$PROGRAMFILES64\Vim"
++ !else
++ StrCpy $INSTDIR "$PROGRAMFILES\Vim"
++ !endif
++ ${EndIf}
++
++ # Load the selections from the registry (if any).
++ ${If} ${RunningX64}
++ SetRegView 64
++ ${EndIf}
++ !insertmacro LoadSectionSelection ${id_section_console} "select_console"
++ !insertmacro LoadSectionSelection ${id_section_batch} "select_batch"
++ !insertmacro LoadSectionSelection ${id_section_desktop} "select_desktop"
++ !insertmacro LoadSectionSelection ${id_section_startmenu} "select_startmenu"
++ !insertmacro LoadSectionSelection ${id_section_editwith} "select_editwith"
++ !insertmacro LoadSectionSelection ${id_section_vimrc} "select_vimrc"
++ !insertmacro LoadSectionSelection ${id_section_pluginhome} "select_pluginhome"
++ !insertmacro LoadSectionSelection ${id_section_pluginvim} "select_pluginvim"
++ !ifdef HAVE_VIS_VIM
++ !insertmacro LoadSectionSelection ${id_section_visvim} "select_visvim"
++ !endif
++ !ifdef HAVE_NLS
++ !insertmacro LoadSectionSelection ${id_section_nls} "select_nls"
++ !endif
++ ${If} ${RunningX64}
++ SetRegView lastused
++ ${EndIf}
++
++ # User variables:
++ # $0 - holds the directory the executables are installed to
++ # $1 - holds the parameters to be passed to install.exe. Starts with OLE
++ # registration (since a non-OLE gvim will not complain, and we want to
++ # always register an OLE gvim).
++ # $2 - holds the names to create batch files for
++ StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
++ StrCpy $1 "-register-OLE"
++ StrCpy $2 "gvim evim gview gvimdiff vimtutor"
++ FunctionEnd
++
++ Function .onInstSuccess
++ WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe
++ FunctionEnd
++
++ Function .onInstFailed
++ MessageBox MB_OK|MB_ICONEXCLAMATION "$(str_msg_install_fail)" /SD IDOK
++ FunctionEnd
++
++ ##########################################################
+ Function SetCustom
+! # Display the _vimrc setting dialog using nsDialogs.
+
+ # Check if a _vimrc should be created
+! ${IfNot} ${SectionIsSelected} ${id_section_vimrc}
+! Abort
+! ${EndIf}
+!
+! !insertmacro MUI_HEADER_TEXT \
+! $(str_vimrc_page_title) $(str_vimrc_page_subtitle)
+!
+! nsDialogs::Create 1018
+! Pop $vim_dialog
+!
+! ${If} $vim_dialog == error
+ Abort
++ ${EndIf}
+
+! ${If} ${RunningX64}
+! SetRegView 64
+! ${EndIf}
+!
+! GetFunctionAddress $3 ValidateCustom
+! nsDialogs::OnBack $3
+!
+!
+! # 1st group - Compatibility
+! ${NSD_CreateGroupBox} 0 0 100% 32% $(str_msg_compat_title)
+! Pop $3
+!
+! ${NSD_CreateLabel} 5% 10% 35% 8% $(str_msg_compat_desc)
+! Pop $3
+! ${NSD_CreateDropList} 18% 19% 75% 8% ""
+! Pop $vim_nsd_compat
+! ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vi)
+! ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vim)
+! ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_defaults)
+! ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_all)
+!
+! # Default selection
+! ${If} $vim_compat_stat == ""
+! ReadRegStr $3 HKLM "${UNINST_REG_KEY_VIM}" "vim_compat"
+! ${Else}
+! StrCpy $3 $vim_compat_stat
+! ${EndIf}
+! ${If} $3 == "defaults"
+! StrCpy $4 2
+! ${ElseIf} $3 == "vim"
+! StrCpy $4 1
+! ${ElseIf} $3 == "vi"
+! StrCpy $4 0
+! ${Else} # default
+! StrCpy $4 3
+! ${EndIf}
+! ${NSD_CB_SetSelectionIndex} $vim_nsd_compat $4
+!
+!
+! # 2nd group - Key remapping
+! ${NSD_CreateGroupBox} 0 35% 100% 31% $(str_msg_keymap_title)
+ Pop $3
++
++ ${NSD_CreateLabel} 5% 45% 90% 8% $(str_msg_keymap_desc)
++ Pop $3
++ ${NSD_CreateDropList} 38% 54% 55% 8% ""
++ Pop $vim_nsd_keymap
++ ${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_default)
++ ${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_windows)
++
++ # Default selection
++ ${If} $vim_keymap_stat == ""
++ ReadRegStr $3 HKLM "${UNINST_REG_KEY_VIM}" "vim_keyremap"
++ ${Else}
++ StrCpy $3 $vim_keymap_stat
++ ${EndIf}
++ ${If} $3 == "windows"
++ StrCpy $4 1
++ ${Else} # default
++ StrCpy $4 0
++ ${EndIf}
++ ${NSD_CB_SetSelectionIndex} $vim_nsd_keymap $4
++
++
++ # 3rd group - Mouse behavior
++ ${NSD_CreateGroupBox} 0 69% 100% 31% $(str_msg_mouse_title)
++ Pop $3
++
++ ${NSD_CreateLabel} 5% 79% 90% 8% $(str_msg_mouse_desc)
++ Pop $3
++ ${NSD_CreateDropList} 23% 87% 70% 8% ""
++ Pop $vim_nsd_mouse
++ ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_default)
++ ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_windows)
++ ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_unix)
++
++ # Default selection
++ ${If} $vim_mouse_stat == ""
++ ReadRegStr $3 HKLM "${UNINST_REG_KEY_VIM}" "vim_mouse"
++ ${Else}
++ StrCpy $3 $vim_mouse_stat
++ ${EndIf}
++ ${If} $3 == "xterm"
++ StrCpy $4 2
++ ${ElseIf} $3 == "windows"
++ StrCpy $4 1
++ ${Else} # default
++ StrCpy $4 0
++ ${EndIf}
++ ${NSD_CB_SetSelectionIndex} $vim_nsd_mouse $4
++
++ ${If} ${RunningX64}
++ SetRegView lastused
++ ${EndIf}
++
++ nsDialogs::Show
+ FunctionEnd
+
+ Function ValidateCustom
+! ${NSD_CB_GetSelectionIndex} $vim_nsd_compat $3
+! ${If} $3 = 0
+! StrCpy $vim_compat_stat "vi"
+! ${ElseIf} $3 = 1
+! StrCpy $vim_compat_stat "vim"
+! ${ElseIf} $3 = 2
+! StrCpy $vim_compat_stat "defaults"
+! ${Else}
+! StrCpy $vim_compat_stat "all"
+! ${EndIf}
+
+! ${NSD_CB_GetSelectionIndex} $vim_nsd_keymap $3
+! ${If} $3 = 0
+! StrCpy $vim_keymap_stat "default"
+! ${Else}
+! StrCpy $vim_keymap_stat "windows"
+! ${EndIf}
+
+! ${NSD_CB_GetSelectionIndex} $vim_nsd_mouse $3
+! ${If} $3 = 0
+! StrCpy $vim_mouse_stat "default"
+! ${ElseIf} $3 = 1
+! StrCpy $vim_mouse_stat "windows"
+! ${Else}
+! StrCpy $vim_mouse_stat "xterm"
+! ${EndIf}
+! FunctionEnd
+
+! ##########################################################
+! # Description for Installer Sections
+!
+! !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_old_ver} $(str_desc_old_ver)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_exe} $(str_desc_exe)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_console} $(str_desc_console)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_batch} $(str_desc_batch)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_group_icons} $(str_desc_icons)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_desktop} $(str_desc_desktop)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_startmenu} $(str_desc_start_menu)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_editwith} $(str_desc_edit_with)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_vimrc} $(str_desc_vim_rc)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_group_plugin} $(str_desc_plugin)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginhome} $(str_desc_plugin_home)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginvim} $(str_desc_plugin_vim)
+! !ifdef HAVE_VIS_VIM
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_visvim} $(str_desc_vis_vim)
+! !endif
+! !ifdef HAVE_NLS
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_section_nls} $(str_desc_nls)
+! !endif
+! !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+
+ ##########################################################
+! # Uninstaller Functions and Sections
+!
+! Function un.onInit
+! !ifdef HAVE_MULTI_LANG
+! # Get the language from the registry.
+! !insertmacro MUI_UNGETLANGUAGE
+! !endif
+! FunctionEnd
+!
+! Section "un.$(str_unsection_register)" id_unsection_register
+! SectionIn RO
+!
+ # Apparently $INSTDIR is set to the directory where the uninstaller is
+ # created. Thus the "vim61" directory is included in it.
+ StrCpy $0 "$INSTDIR"
+
++ !ifdef HAVE_VIS_VIM
+ # If VisVim was installed, unregister the DLL.
+! ${If} ${FileExists} "$0\VisVim.dll"
+! ExecWait "regsvr32.exe /u /s $0\VisVim.dll"
+! ${EndIf}
+! !endif
+
+ # delete the context menu entry and batch files
+! DetailPrint "$(str_msg_unregistering)"
+! nsExec::Exec "$0\uninstal.exe -nsis"
+! Pop $3
+
+ # We may have been put to the background when uninstall did something.
+ BringToFront
+
+! # Delete the installer language setting.
+! DeleteRegKey ${MUI_LANGDLL_REGISTRY_ROOT} ${MUI_LANGDLL_REGISTRY_KEY}
+! SectionEnd
+!
+! Section "un.$(str_unsection_exe)" id_unsection_exe
+!
+! StrCpy $0 "$INSTDIR"
+!
+! # Delete gettext and iconv DLLs
+! ${If} ${FileExists} "$0\libiconv-2.dll"
+! !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "$0\libiconv-2.dll"
+! ${EndIf}
+! ${If} ${FileExists} "$0\libintl-8.dll"
+! !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "$0\libintl-8.dll"
+! ${EndIf}
+! ${If} ${FileExists} "$0\libgcc_s_sjlj-1.dll"
+! !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "$0\libgcc_s_sjlj-1.dll"
+! ${EndIf}
+
++ # Delete other DLLs
+ Delete /REBOOTOK $0\*.dll
+!
+! # Delete 64-bit GvimExt
+ ${If} ${RunningX64}
+! !define LIBRARY_X64
+! ${If} ${FileExists} "$0\GvimExt64\gvimext.dll"
+! !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "$0\GvimExt64\gvimext.dll"
+! ${EndIf}
+! ${If} ${FileExists} "$0\GvimExt64\libiconv-2.dll"
+! !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "$0\GvimExt64\libiconv-2.dll"
+! ${EndIf}
+! ${If} ${FileExists} "$0\GvimExt64\libintl-8.dll"
+! !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "$0\GvimExt64\libintl-8.dll"
+! ${EndIf}
+! ${If} ${FileExists} "$0\GvimExt64\libwinpthread-1.dll"
+! !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
+! "$0\GvimExt64\libwinpthread-1.dll"
+! ${EndIf}
+! !undef LIBRARY_X64
+! RMDir /r $0\GvimExt64
+ ${EndIf}
+
++ # Delete 32-bit GvimExt
++ ${If} ${FileExists} "$0\GvimExt32\gvimext.dll"
++ !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
++ "$0\GvimExt32\gvimext.dll"
++ ${EndIf}
++ ${If} ${FileExists} "$0\GvimExt32\libiconv-2.dll"
++ !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
++ "$0\GvimExt32\libiconv-2.dll"
++ ${EndIf}
++ ${If} ${FileExists} "$0\GvimExt32\libintl-8.dll"
++ !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
++ "$0\GvimExt32\libintl-8.dll"
++ ${EndIf}
++ ${If} ${FileExists} "$0\GvimExt32\libgcc_s_sjlj-1.dll"
++ !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
++ "$0\GvimExt32\libgcc_s_sjlj-1.dll"
++ ${EndIf}
++ RMDir /r $0\GvimExt32
++
+ ClearErrors
+ # Remove everything but *.dll files. Avoids that
+ # a lot remains when gvimext.dll cannot be deleted.
+***************
+*** 555,566 ****
+--- 1050,1064 ----
+ RMDir /r $0\ftplugin
+ RMDir /r $0\indent
+ RMDir /r $0\macros
++ RMDir /r $0\pack
+ RMDir /r $0\plugin
+ RMDir /r $0\spell
+ RMDir /r $0\syntax
+ RMDir /r $0\tools
+ RMDir /r $0\tutor
++ !ifdef HAVE_VIS_VIM
+ RMDir /r $0\VisVim
++ !endif
+ RMDir /r $0\lang
+ RMDir /r $0\keymap
+ Delete $0\*.exe
+***************
+*** 568,613 ****
+ Delete $0\*.vim
+ Delete $0\*.txt
+
+! IfErrors ErrorMess NoErrorMess
+! ErrorMess:
+! MessageBox MB_OK|MB_ICONEXCLAMATION \
+! "Some files in $0 have not been deleted!$\nYou must do it manually."
+! NoErrorMess:
+
+ # No error message if the "vim62" directory can't be removed, the
+ # gvimext.dll may still be there.
+ RMDir $0
+
+! NoRemoveExes:
+ # get the parent dir of the installation
+ Push $INSTDIR
+ Call un.GetParent
+ Pop $0
+- StrCpy $1 $0
+
+! # if a plugin dir was created at installation ask the user to remove it
+! # first look in the root of the installation then in HOME
+! IfFileExists $1\vimfiles AskRemove 0
+! ReadEnvStr $1 "HOME"
+! StrCmp $1 "" NoRemove 0
+!
+! IfFileExists $1\vimfiles 0 NoRemove
+!
+! AskRemove:
+! MessageBox MB_YESNO|MB_ICONQUESTION \
+! "Remove all files in your $1\vimfiles directory?$\n \
+! $\nCAREFUL: If you have created something there that you want to keep, click No" IDNO Fin
+! RMDir /r $1\vimfiles
+! NoRemove:
+!
+! # ask the user if the Vim root dir must be removed
+! MessageBox MB_YESNO|MB_ICONQUESTION \
+! "Would you like to remove $0?$\n \
+! $\nIt contains your Vim configuration files!" IDNO NoDelete
+! RMDir /r $0 ; skipped if no
+! NoDelete:
+
+! Fin:
+! Call un.onUnInstSuccess
+
+! SectionEnd
+--- 1066,1143 ----
+ Delete $0\*.vim
+ Delete $0\*.txt
+
+! ${If} ${Errors}
+! MessageBox MB_OK|MB_ICONEXCLAMATION $(str_msg_rm_exe_fail) /SD IDOK
+! ${EndIf}
+
+ # No error message if the "vim62" directory can't be removed, the
+ # gvimext.dll may still be there.
+ RMDir $0
++ SectionEnd
++
++ # Remove "vimfiles" directory under the specified directory.
++ !macro RemoveVimfiles dir
++ ${If} ${FileExists} ${dir}\vimfiles
++ RMDir ${dir}\vimfiles\colors
++ RMDir ${dir}\vimfiles\compiler
++ RMDir ${dir}\vimfiles\doc
++ RMDir ${dir}\vimfiles\ftdetect
++ RMDir ${dir}\vimfiles\ftplugin
++ RMDir ${dir}\vimfiles\indent
++ RMDir ${dir}\vimfiles\keymap
++ RMDir ${dir}\vimfiles\plugin
++ RMDir ${dir}\vimfiles\syntax
++ RMDir ${dir}\vimfiles
++ ${EndIf}
++ !macroend
++
++ SectionGroup "un.$(str_ungroup_plugin)" id_ungroup_plugin
++ Section /o "un.$(str_unsection_plugin_home)" id_unsection_plugin_home
++ # get the home dir
++ ReadEnvStr $0 "HOME"
++ ${If} $0 == ""
++ ReadEnvStr $0 "HOMEDRIVE"
++ ReadEnvStr $1 "HOMEPATH"
++ StrCpy $0 "$0$1"
++ ${If} $0 == ""
++ ReadEnvStr $0 "USERPROFILE"
++ ${EndIf}
++ ${EndIf}
++
++ ${If} $0 != ""
++ !insertmacro RemoveVimfiles $0
++ ${EndIf}
++ SectionEnd
+
+! Section "un.$(str_unsection_plugin_vim)" id_unsection_plugin_vim
+! # get the parent dir of the installation
+! Push $INSTDIR
+! Call un.GetParent
+! Pop $0
+!
+! # if a plugin dir was created at installation remove it
+! !insertmacro RemoveVimfiles $0
+! SectionEnd
+! SectionGroupEnd
+!
+! Section "un.$(str_unsection_rootdir)" id_unsection_rootdir
+ # get the parent dir of the installation
+ Push $INSTDIR
+ Call un.GetParent
+ Pop $0
+
+! Delete $0\_vimrc
+! RMDir $0
+! SectionEnd
+
+! ##########################################################
+! # Description for Uninstaller Sections
+
+! !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_register} $(str_desc_unregister)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_exe} $(str_desc_rm_exe)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_ungroup_plugin} $(str_desc_rm_plugin)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_plugin_home} $(str_desc_rm_plugin_home)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_plugin_vim} $(str_desc_rm_plugin_vim)
+! !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_rootdir} $(str_desc_rm_rootdir)
+! !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
+*** ../vim-8.1.0615/nsis/icons/header.svg 2018-12-21 16:21:13.997490884 +0100
+--- nsis/icons/header.svg 2018-12-21 16:12:48.520958036 +0100
+***************
+*** 0 ****
+--- 1,265 ----
++ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
++ <!-- Created with Inkscape (http://www.inkscape.org/) -->
++
++ <svg
++ xmlns:dc="http://purl.org/dc/elements/1.1/"
++ xmlns:cc="http://creativecommons.org/ns#"
++ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
++ xmlns:svg="http://www.w3.org/2000/svg"
++ xmlns="http://www.w3.org/2000/svg"
++ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
++ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
++ width="300"
++ height="114"
++ id="svg2"
++ version="1.1"
++ inkscape:version="0.47 r22583"
++ sodipodi:docname="header.svg"
++ inkscape:export-filename="header.png"
++ inkscape:export-xdpi="90"
++ inkscape:export-ydpi="90">
++ <defs
++ id="defs4">
++ <filter
++ id="filter2840"
++ inkscape:label="Drop shadow"
++ width="1.5"
++ height="1.5"
++ x="-.25"
++ y="-.25">
++ <feGaussianBlur
++ id="feGaussianBlur2842"
++ in="SourceAlpha"
++ stdDeviation="3.000000"
++ result="blur" />
++ <feColorMatrix
++ id="feColorMatrix2844"
++ result="bluralpha"
++ type="matrix"
++ values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.600000 0 " />
++ <feOffset
++ id="feOffset2846"
++ in="bluralpha"
++ dx="-5.000000"
++ dy="5.000000"
++ result="offsetBlur" />
++ <feMerge
++ id="feMerge2848">
++ <feMergeNode
++ id="feMergeNode2850"
++ in="offsetBlur" />
++ <feMergeNode
++ id="feMergeNode2852"
++ in="SourceGraphic" />
++ </feMerge>
++ </filter>
++ <filter
++ id="filter2910"
++ inkscape:label="Drop shadow"
++ width="1.5"
++ height="1.5"
++ x="-.25"
++ y="-.25">
++ <feGaussianBlur
++ id="feGaussianBlur2912"
++ in="SourceAlpha"
++ stdDeviation="2.500000"
++ result="blur" />
++ <feColorMatrix
++ id="feColorMatrix2914"
++ result="bluralpha"
++ type="matrix"
++ values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.600000 0 " />
++ <feOffset
++ id="feOffset2916"
++ in="bluralpha"
++ dx="-3.000000"
++ dy="3.000000"
++ result="offsetBlur" />
++ <feMerge
++ id="feMerge2918">
++ <feMergeNode
++ id="feMergeNode2920"
++ in="offsetBlur" />
++ <feMergeNode
++ id="feMergeNode2922"
++ in="SourceGraphic" />
++ </feMerge>
++ </filter>
++ </defs>
++ <sodipodi:namedview
++ id="base"
++ pagecolor="#ffffff"
++ bordercolor="#666666"
++ borderopacity="1.0"
++ inkscape:pageopacity="1"
++ inkscape:pageshadow="2"
++ inkscape:zoom="2.1369427"
++ inkscape:cx="130.27686"
++ inkscape:cy="77.09629"
++ inkscape:document-units="px"
++ inkscape:current-layer="header"
++ showgrid="false"
++ inkscape:window-width="1280"
++ inkscape:window-height="942"
++ inkscape:window-x="0"
++ inkscape:window-y="27"
++ inkscape:window-maximized="1"
++ inkscape:snap-global="true"
++ inkscape:showpageshadow="false" />
++ <metadata
++ id="metadata7">
++ <rdf:RDF>
++ <cc:Work
++ rdf:about="">
++ <dc:format>image/svg+xml</dc:format>
++ <dc:type
++ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
++ <dc:title></dc:title>
++ </cc:Work>
++ </rdf:RDF>
++ </metadata>
++ <g
++ inkscape:label="Layer 1"
++ inkscape:groupmode="layer"
++ id="header"
++ transform="translate(0,-938.36218)">
++ <text
++ xml:space="preserve"
++ style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
++ id="text3026"
++ x="4.0525044"
++ y="-8.7699928">The editor</text>
++ <text
++ xml:space="preserve"
++ style="font-size:40px;font-style:normal;font-weight:normal;line-height:100%;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;filter:url(#filter2910)"
++ x="178.45901"
++ y="988.47156"
++ id="text3198"
++ sodipodi:linespacing="100%"><tspan
++ sodipodi:role="line"
++ id="tspan3200"
++ x="178.45901"
++ y="988.47156"
++ style="font-size:36px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;font-family:Courier New;-inkscape-font-specification:Courier New Bold">The</tspan><tspan
++ sodipodi:role="line"
++ x="178.45901"
++ y="1024.4716"
++ id="tspan3202"
++ style="font-size:36px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;font-family:Courier New;-inkscape-font-specification:Courier New Bold">editor</tspan></text>
++ <g
++ id="g2916"
++ style="filter:url(#filter2840)">
++ <path
++ inkscape:connector-curvature="0"
++ id="path2999"
++ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="M 107.53604,994.85892 57.991535,946.32092 9.4535173,995.84025 57.991535,1044.4034 107.53604,994.85892" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3003"
++ style="fill:#006b05;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 102.57907,994.85892 2.96915,0 -47.556685,47.55668 0,-2.9691 44.587535,-44.58758" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3007"
++ style="fill:#007d17;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 11.441335,995.84025 2.969148,0 43.581052,43.60625 0,2.9691 -46.5502,-46.57535" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3011"
++ style="fill:#66ff99;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 57.991535,951.25272 0,-2.94398 -46.5502,47.53151 2.969148,0 43.581052,-44.58753" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3015"
++ style="fill:#45ff02;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 57.991535,948.30873 0,2.94399 44.587535,43.6062 2.96915,0 -47.556685,-46.55019" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3019"
++ style="fill:#009933;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 57.991535,1039.4465 44.587535,-44.58758 -44.587535,-43.6062 -43.581052,44.58753 43.581052,43.60625" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3023"
++ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 67.25125,961.16664 2.969146,2.99431 0,0 -20.482085,20.78405 0,-20.78405 1.987817,0 2.969148,-2.99431 0,-7.90094 -2.969148,-2.99431 -33.012896,0 -2.969149,2.99431 0,7.90094 2.969149,2.99431 2.314928,0 0,67.35935 3.623367,2.9692 10.241043,0 70.98276,-73.32286 0,-7.90094 -2.96915,-2.99431 -32.358674,0 -3.296256,2.99431 0,7.90094" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3027"
++ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 19.694561,962.17314 -1.987821,-1.98782 0,-5.9383 1.987821,-1.98782 31.05024,-0.0252 1.962656,2.01298 -1.962656,0.95617 -1.00649,-0.95617 -30.04375,4.9318 0,2.99432" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3031"
++ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 25.632856,1032.5017 -2.314928,-1.9878 0,-68.36592 2.314928,-1.96266 0,72.31638" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3035"
++ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 75.177364,962.17314 1.987819,-1.98782 0,3.97563 -33.038059,33.66712 3.64853,-7.9261 27.40171,-27.72883" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3039"
++ style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 26.312236,959.20399 -0.67938,0.98133 -2.314928,1.98782 -3.623367,0 0,-3.97563 6.617675,1.00648" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3043"
++ style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 47.775654,962.17314 0,27.72883 -3.64853,7.90094 0,-37.64275 5.611187,0 1.00649,-0.98133 -1.00649,-4.93181 2.969146,0 0,5.9383 -1.962656,1.98782 -2.969147,0" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3047"
++ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 71.201725,962.17314 -1.962656,-1.98782 0,-5.9383 2.289766,-1.98782 30.068915,0 2.31493,1.98782 -3.32142,2.96915 -29.389535,1.96265 0,2.99432" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3051"
++ style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 103.91268,960.18532 -69.699491,72.31638 -8.580333,0 0,-2.9692 6.290568,0 69.674326,-71.33499 -1.00649,-3.95049 3.32142,0 0,5.9383" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3055"
++ style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 77.819404,959.20399 -0.679382,0.98133 -1.962658,1.98782 -3.975639,0 0,-3.97563 6.617679,1.00648" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3059"
++ style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 44.127124,997.80291 0,-37.64275 5.611187,0 1.00649,-0.98134 0,-3.97563 -1.00649,-0.98133 -29.062421,0 -0.981329,0.98133 0,3.97563 0.981329,0.98134 4.956966,0 0,69.37234 1.283276,0.9814 5.661511,0 69.347217,-72.31639 0,-2.84335 -1.00649,-1.1323 -28.710153,0 -1.006492,0.98133 0,4.0008 1.006492,0.98133 4.956966,0 0,3.97563 -33.038059,33.64196" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3063"
++ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 62.143307,997.85323 2.31493,-1.98781 5.938295,0 1.660709,1.98781 -1.987817,5.93827 -2.289767,1.9879 -5.938295,0 -1.685872,-1.9879 1.987817,-5.93827" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3067"
++ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 64.131127,1030.539 5.963458,-17.8149 -1.987818,0 1.987818,-5.9634 8.882281,0 1.987818,1.9878 1.333602,0 1.962657,-1.9878 6.617676,0 1.98782,1.9878 1.308439,0 1.987818,-1.9878 7.246734,0 2.64204,3.9756 -4.32791,14.0909 1.96265,0 -1.91233,5.7118 -11.901751,0 4.655019,-13.8644 -2.969147,0 -2.742688,8.1023 1.962658,0 -1.862008,5.7621 -11.901753,0 4.629856,-13.8644 -2.969146,0 -2.767852,8.1526 1.987821,0 -1.862008,5.7118 -11.901754,0" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3071"
++ style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 102.50359,1008.7485 1.53489,2.1891 -4.881475,15.6509 1.962655,0 -0.65422,1.9627 -7.92611,0 4.629858,-13.8644 -6.944788,0 -3.950475,11.9017 1.962657,0 -0.654219,1.9627 -7.926114,0 4.629855,-13.8644 -6.944785,0 -3.950476,11.9017 1.987818,0 -0.67938,1.9627 -7.926116,0 5.963458,-17.8149 -1.987818,0 0.654217,-1.9878 7.271898,0 1.987818,1.9878 1.962657,0 1.987819,-1.9878 5.938295,0 1.987821,1.9878 1.987818,0 1.987821,-1.9878 5.988621,0" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3075"
++ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 69.088095,1006.7607 -6.064107,18.0413 2.063305,0 -1.962657,5.737 -11.876589,0 5.938295,-17.8149 -1.98782,0 13.889573,-5.9634 z m -13.889573,5.9634 1.98782,-5.9634 11.901753,0" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3079"
++ style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 61.816199,1028.5512 0.654219,-1.9627 -1.987819,0 5.963458,-17.84 -8.253225,0 -0.67938,1.9878 2.314928,0 -5.938297,17.8149 7.926116,0" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3083"
++ style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07548681;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ d="m 68.408713,1002.8102 1.333602,-3.97563 -0.65422,-0.98134 -3.975639,0 -1.308438,0.98134 -1.333601,3.97563 0.679382,0.9813 3.975639,0 1.283275,-0.9813" />
++ </g>
++ </g>
++ </svg>
+*** ../vim-8.1.0615/nsis/icons/welcome.svg 2018-12-21 16:21:14.001490856 +0100
+--- nsis/icons/welcome.svg 2018-12-21 16:12:48.520958036 +0100
+***************
+*** 0 ****
+--- 1,268 ----
++ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
++ <!-- Created with Inkscape (http://www.inkscape.org/) -->
++
++ <svg
++ xmlns:dc="http://purl.org/dc/elements/1.1/"
++ xmlns:cc="http://creativecommons.org/ns#"
++ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
++ xmlns:svg="http://www.w3.org/2000/svg"
++ xmlns="http://www.w3.org/2000/svg"
++ xmlns:xlink="http://www.w3.org/1999/xlink"
++ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
++ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
++ width="328"
++ height="628"
++ id="svg2"
++ version="1.1"
++ inkscape:version="0.47 r22583"
++ sodipodi:docname="welcome.svg"
++ inkscape:export-filename="welcome.png"
++ inkscape:export-xdpi="90"
++ inkscape:export-ydpi="90">
++ <defs
++ id="defs4">
++ <filter
++ id="filter3356"
++ inkscape:label="Drop shadow"
++ width="1.5"
++ height="1.5"
++ x="-.25"
++ y="-.25">
++ <feGaussianBlur
++ id="feGaussianBlur3358"
++ in="SourceAlpha"
++ stdDeviation="5.000000"
++ result="blur" />
++ <feColorMatrix
++ id="feColorMatrix3360"
++ result="bluralpha"
++ type="matrix"
++ values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.600000 0 " />
++ <feOffset
++ id="feOffset3362"
++ in="bluralpha"
++ dx="-10.000000"
++ dy="10.000000"
++ result="offsetBlur" />
++ <feMerge
++ id="feMerge3364">
++ <feMergeNode
++ id="feMergeNode3366"
++ in="offsetBlur" />
++ <feMergeNode
++ id="feMergeNode3368"
++ in="SourceGraphic" />
++ </feMerge>
++ </filter>
++ <filter
++ id="filter3496"
++ inkscape:label="Drop shadow"
++ width="1.5"
++ height="1.5"
++ x="-.25"
++ y="-.25">
++ <feGaussianBlur
++ id="feGaussianBlur3498"
++ in="SourceAlpha"
++ stdDeviation="3.000000"
++ result="blur" />
++ <feColorMatrix
++ id="feColorMatrix3500"
++ result="bluralpha"
++ type="matrix"
++ values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.600000 0 " />
++ <feOffset
++ id="feOffset3502"
++ in="bluralpha"
++ dx="-5.000000"
++ dy="5.000000"
++ result="offsetBlur" />
++ <feMerge
++ id="feMerge3504">
++ <feMergeNode
++ id="feMergeNode3506"
++ in="offsetBlur" />
++ <feMergeNode
++ id="feMergeNode3508"
++ in="SourceGraphic" />
++ </feMerge>
++ </filter>
++ </defs>
++ <sodipodi:namedview
++ id="base"
++ pagecolor="#ffffff"
++ bordercolor="#666666"
++ borderopacity="1.0"
++ inkscape:pageopacity="1"
++ inkscape:pageshadow="2"
++ inkscape:zoom="1.0716561"
++ inkscape:cx="122.81449"
++ inkscape:cy="381.22777"
++ inkscape:document-units="px"
++ inkscape:current-layer="layer1"
++ showgrid="false"
++ inkscape:window-width="1280"
++ inkscape:window-height="942"
++ inkscape:window-x="0"
++ inkscape:window-y="27"
++ inkscape:window-maximized="1"
++ inkscape:snap-global="true"
++ inkscape:showpageshadow="false" />
++ <metadata
++ id="metadata7">
++ <rdf:RDF>
++ <cc:Work
++ rdf:about="">
++ <dc:format>image/svg+xml</dc:format>
++ <dc:type
++ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
++ <dc:title></dc:title>
++ </cc:Work>
++ </rdf:RDF>
++ </metadata>
++ <g
++ inkscape:label="Layer 1"
++ inkscape:groupmode="layer"
++ id="layer1"
++ transform="translate(0,-424.36218)">
++ <rect
++ style="fill:#eeffcc;fill-opacity:1;stroke:#007f00;stroke-width:2.0138948;stroke-miterlimit:2.6099999;stroke-opacity:1;stroke-dasharray:none"
++ id="rect3510"
++ width="327.98608"
++ height="635.98608"
++ x="-0.99305254"
++ y="420.36914" />
++ <path
++ sodipodi:type="arc"
++ style="fill:#ffffff;fill-opacity:0;stroke:none"
++ id="path3795"
++ sodipodi:cx="92.889717"
++ sodipodi:cy="94.761551"
++ sodipodi:rx="83.062592"
++ sodipodi:ry="84.466469"
++ d="m 175.95231,94.761551 c 0,46.649539 -37.18839,84.466469 -83.062593,84.466469 -45.874202,0 -83.0625915,-37.81693 -83.0625915,-84.466469 0,-46.649543 37.1883895,-84.466469 83.0625915,-84.466469 45.874203,0 83.062593,37.816926 83.062593,84.466469 z"
++ transform="matrix(0,-2.3099964,-2.3548838,0,387.15244,952.93709)" />
++ <text
++ xml:space="preserve"
++ style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;filter:url(#filter3496)"
++ id="text3026"><textPath
++ xlink:href="#path3795"
++ startOffset="50%"
++ id="textPath3036"
++ style="font-size:58;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Courier New;-inkscape-font-specification:Courier New Bold;">The editor</textPath></text>
++ <g
++ id="g2968"
++ style="filter:url(#filter3356)">
++ <path
++ inkscape:connector-curvature="0"
++ id="path2999"
++ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="M 299.80052,736.9686 162.60646,602.56167 28.199478,739.68603 162.60646,874.16269 299.80052,736.9686" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3003"
++ style="fill:#006b05;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 286.07415,736.9686 8.22189,0 -131.68958,131.68962 0,-8.2219 123.46769,-123.46772" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3007"
++ style="fill:#007d17;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 33.703958,739.68603 8.221891,0 120.680611,120.75029 0,8.2219 L 33.703958,739.68603" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3011"
++ style="fill:#66ff99;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 162.60646,616.21837 0,-8.15223 -128.902502,131.61989 8.221891,0 120.680611,-123.46766" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3015"
++ style="fill:#45ff02;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 162.60646,608.06614 0,8.15223 123.46769,120.75023 8.22189,0 -131.68958,-128.90246" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3019"
++ style="fill:#009933;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="M 162.60646,860.43632 286.07415,736.9686 162.60646,616.21837 41.925849,739.68603 162.60646,860.43632" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3023"
++ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 188.24761,643.67106 8.22188,8.29158 0,0 -56.71709,57.55326 0,-57.55326 5.50448,0 8.22189,-8.29158 0,-21.87855 -8.22189,-8.29157 -91.416257,0 -8.221894,8.29157 0,21.87855 8.221894,8.29158 6.410285,0 0,186.52539 10.033492,8.22191 28.358547,0 196.558893,-203.03888 0,-21.87855 -8.22189,-8.29157 -89.60466,0 -9.12768,8.29157 0,21.87855" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3027"
++ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 56.558028,646.45817 -5.504489,-5.50448 0,-16.4438 5.504489,-5.50448 85.981452,-0.0697 5.4348,5.57416 -5.4348,2.64775 -2.78708,-2.64775 -83.194372,13.6567 0,8.29158" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3031"
++ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 73.001805,841.20547 -6.410285,-5.50448 0,-189.3125 6.410285,-5.4348 0,200.25178" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3035"
++ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 210.19587,646.45817 5.50448,-5.50448 0,11.00895 -91.48593,93.22786 10.10317,-21.94822 75.87828,-76.78411" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3039"
++ style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 74.883082,638.23626 -1.881277,2.71743 -6.410285,5.50448 -10.033492,0 0,-11.00895 18.325054,2.78704" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3043"
++ style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 134.31759,646.45817 0,76.78411 -10.10317,21.87855 0,-104.23681 15.53798,0 2.78708,-2.71743 -2.78708,-13.6567 8.22188,0 0,16.4438 -5.4348,5.50448 -8.22189,0" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3047"
++ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 199.1869,646.45817 -5.43481,-5.50448 0,-16.4438 6.34061,-5.50448 83.26404,0 6.41029,5.50448 -9.19736,8.2219 -81.38277,5.4348 0,8.29158" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3051"
++ style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 289.76703,640.95369 -193.005361,200.25177 -23.759864,0 0,-8.2219 17.419257,0 192.935678,-197.53434 -2.78707,-10.93933 9.19736,0 0,16.4438" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3055"
++ style="fill:#7f7f7f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 217.51196,638.23626 -1.88128,2.71743 -5.43481,5.50448 -11.00897,0 0,-11.00895 18.32506,2.78704" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3059"
++ style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 124.21442,745.12082 0,-104.23681 15.53798,0 2.78708,-2.71742 0,-11.00895 -2.78708,-2.71743 -80.476968,0 -2.717404,2.71743 0,11.00895 2.717404,2.71742 13.726373,0 0,192.09955 3.553528,2.71743 15.677333,0 192.029884,-200.25177 0,-7.87353 -2.78708,-3.13548 -79.50149,0 -2.78708,2.71743 0,11.07862 2.78708,2.71743 13.72637,0 0,11.00895 -91.48593,93.15818" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3063"
++ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 174.10317,745.26018 6.41029,-5.50448 16.44377,0 4.59868,5.50448 -5.50447,16.4438 -6.34062,5.50448 -16.44377,0 -4.66836,-5.50448 5.50448,-16.4438" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3067"
++ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 179.60765,835.77066 16.51346,-49.33135 -5.50448,0 5.50448,-16.51342 24.59599,0 5.50448,5.50447 3.69289,0 5.43481,-5.50447 18.32505,0 5.50449,5.50447 3.62321,0 5.50448,-5.50447 20.06698,0 7.31609,11.00895 -11.98445,39.01911 5.43481,0 -5.29546,15.81671 -32.95723,0 12.89025,-38.39208 -8.22189,0 -7.59479,22.43602 5.43481,0 -5.1561,15.95606 -32.95724,0 12.82057,-38.39208 -8.22188,0 -7.66448,22.57537 5.50449,0 -5.1561,15.81671 -32.95724,0" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3071"
++ style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 285.86512,775.43036 4.25029,6.06188 -13.51734,43.3391 5.43481,0 -1.8116,5.43485 -21.94826,0 12.82057,-38.39208 -19.23086,0 -10.93929,32.95723 5.43481,0 -1.81161,5.43485 -21.94826,0 12.82057,-38.39208 -19.23086,0 -10.93929,32.95723 5.50448,0 -1.88127,5.43485 -21.94827,0 16.51346,-49.33135 -5.50449,0 1.8116,-5.50448 20.13667,0 5.50448,5.50448 5.43481,0 5.50448,-5.50448 16.44378,0 5.50449,5.50448 5.50448,0 5.50449,-5.50448 16.58312,0" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3075"
++ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 193.33403,769.92588 -16.79216,49.95839 5.71351,0 -5.43481,15.88639 -32.88755,0 16.44378,-49.33135 -5.50449,0 38.46172,-16.51343 z m -38.46172,16.51343 5.50449,-16.51343 32.95723,0" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3079"
++ style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 173.19737,830.26619 1.8116,-5.43485 -5.50448,0 16.51345,-49.40098 -22.85406,0 -1.88128,5.50448 6.41028,0 -16.44378,49.33135 21.94827,0" />
++ <path
++ inkscape:connector-curvature="0"
++ id="path3083"
++ style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.20903109000000000;stroke-miterlimit:2.60999990000000004;stroke-opacity:1;stroke-dasharray:none;"
++ d="m 191.45275,758.98656 3.69288,-11.00896 -1.8116,-2.71743 -11.00897,0 -3.62321,2.71743 -3.69288,11.00896 1.88128,2.71742 11.00897,0 3.55353,-2.71742" />
++ </g>
++ </g>
++ </svg>
+*** ../vim-8.1.0615/nsis/icons/header.bmp 2018-12-21 16:21:14.005490828 +0100
+--- nsis/icons/header.bmp 2018-10-14 00:33:34.000000000 +0200
+***************
+*** 0 ****
+--- 1,56 ----
++ BMþ
++ 8
++
++
++
++
++
++
++ ÍÍÍêêêèèèÞÞÞÏÏÏ»»»‡‡‡kkkkkk
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ ooo¸¸¸ÇÇÇÑÑї——UUUµµµúúúýýýþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþþþþþþþýýýúúú÷÷÷òòòëëëàààÔÔÔÅÅŵµµ£££’’’………yyymmm
++
++
++
++ 
++ 7
++ 9
++ 9
++ 9
++ 9
++ 9
++ 9
++ 9
++ 9
++ „„,
++ üDÿEp
++ üDþEl
++
++ 
++
++
++ îîîûûûþþþþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþüüüúúúôôôëëëÞÞÞÍÍͺºº¦¦¦“““xxx
++ 
++
++
++
++ 
++
++
++
++
++ hòAÿE†$
+\ No newline at end of file
+*** ../vim-8.1.0615/nsis/icons/un_header.bmp 2018-12-21 16:21:14.009490802 +0100
+--- nsis/icons/un_header.bmp 2018-10-14 00:33:34.000000000 +0200
+***************
+*** 0 ****
+--- 1,46 ----
++ BMþ
++
++
++
++
++
++ ÍÍÍêêêèèèÞÞÞÏÏÏ»»»‡‡‡kkkkkk
++
++
++ YYYqqqqqqqqqqqqOOO
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ ooo¸¸¸ÇÇÇÑÑї——UUUµµµúúúýýýþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþþþþþþþýýýúúú÷÷÷òòòëëëàààÔÔÔÅÅŵµµ£££’’’………yyymmm
++
++
++
++
++
++ TTTqqqeee
++
++
++ lllqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq@@@LLLMMM###
++
++
++ ZZZqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpppRRRÅÅÅÁÁÁFFF}}}þþþþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþþþþüüüøøøóóóëëëàààÓÓÓÅÅÅ
++
++
++ îîîûûûþþþþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþüüüúúúôôôëëëÞÞÞÍÍͺºº¦¦¦“““xxx
++
++
++
++
++
++
+\ No newline at end of file
+*** ../vim-8.1.0615/nsis/icons/uninstall.bmp 2018-12-21 16:21:14.013490774 +0100
+--- nsis/icons/uninstall.bmp 2018-10-14 00:33:34.000000000 +0200
+***************
+*** 0 ****
+--- 1,160 ----
++ BMn
++
++
++
++
++
++
++
++
++
++
++
++ ååå÷÷÷øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø÷÷÷÷÷÷÷÷÷ööööööôôôóóóñññîîîëëëèèèãããÞÞÞÙÙÙÓÓÓÌÌÌÅÅÅ¿¿¿¸¸¸³³³®®®ªªª¨¨¨§§§¨¨¨ªªª­­­²²²···¾¾¾ÄÄÄËËËÒÒÒØØØÝÝÝâââçççëëëîîîðððóóóôôôõõõööö÷÷÷÷÷÷÷÷÷÷÷÷øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø÷÷÷÷÷÷õõõòòòíííçççÞÞÞÕÕÕÉÉɽ½½²²²>>>
++
++
++
++
++
++
++
++
++ lllqqq333
++
++
++ jjjqqqqqqqqqqqqqqqqqqqqq
++
++
++ ÓÓÓðððóóóõõõööö÷÷÷÷÷÷øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø[[[[[[øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø÷÷÷÷÷÷öööôôôòòòïïïêêêåååÞÞÞÖÖÖÌÌÌÁÁÁ¶¶¶ªªªžžž“““‰‰‰€€€xxxsssnnnjjjggg
++
++
++ jjjqqqqqqqqqqqqqqqqqqqqq
++
++
++ iiiqqqqqqqqqqqqqqqqqqqqq
++
++
++
++
++
++ TTTqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq222
++
++
++
++
++
++ FFFOOOOOOOOOOOOOOOOOOKKKEEEqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
++
++
++ RRRqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq```111MMMMMMMMMMMMMMMMMMKKK
++
++
++
++
++
++ ………××××××××××××××××××ÃÃÃGGG
++
++
++
++
++
++
++
++
++ ˜˜˜ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿééétttÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ̏xxxyyy"""
++
++
++
++
++
++
++
++
++ xxxºººÃÃÃËËËÒÒÒÙÙÙÞÞÞãããèèèëëëîîîñññóóóôôôöööööö÷÷÷÷÷÷÷÷÷øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø[[[[[[øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø÷÷÷÷÷÷öööôôôòòòïïïêêêåååÞÞÞÖÖÖÌÌÌÁÁÁ¶¶¶ªªªžžž“““‰‰‰€€€xxxsssnnnjjjggg
++
++
++
++
++
++ ###############:::qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmmm
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ JJJÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÑÑѹ¹¹ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌXXX
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ 
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ 000ÐÐÐÿÿÿÿÿÿÿÿÿÿÿÿ{{{ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÁÁÁrrriii
++
++
++ ”””ööööööõõõôôôóóóóóóñññðððïïïîîîííííííìììëëëëëëvvv
++
++
++
+\ No newline at end of file
+*** ../vim-8.1.0615/nsis/icons/welcome.bmp 2018-12-21 16:21:14.017490745 +0100
+--- nsis/icons/welcome.bmp 2018-10-14 00:33:34.000000000 +0200
+***************
+*** 0 ****
+--- 1,253 ----
++ BMn
++
++
++ 
++
++
++
++
++
++ ÇùèËþíËþíÊýìÊüëÈúéÆ÷çÂóã¿ïß¼ëÛ¹çصâÓ°ÜͪÔÆ È»–¼¯Œ¯£‚£˜{šy—|›‘ƒ¤™Ž²¦Zqi
++ ­ØÊÁñá½ìÜ·åÖ±ÝΜöL_Y
++
++ GYS8FA
++ t‘‡’·«ˆªŸ~“t‘‡=LG
++
++ ~“›Âµ–»¯Ž±¥„¥šz™Oc\
++
++ (2/Ujcd}u
++
++ ªÕÇËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîËþíËþíËþíËþíËþíËþíËþíËþíËþíËþíËþíËþíËþíËþíËþíËþíËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîËþíËþíÊýìÉûêÈúéÆøçÄõåÃôäÁñá¿ïߎ²¦
++
++
++ ¦ÏÁÂóãÆ÷çÆøçÆøçÆ÷çÆ÷çÆ÷çÆøçÈúéÉûêÊüëÊýìËþíËþíËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿî
++ Š¬¡ËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîËþíËþíËþíËþíËþíÊýìÊýìÊüëÉûêÈúéÈúéÇùèÆøçÆøçÆøçÆøçÆøçÇùèÈúéÈúéÉûêÊüëÊýìÊýìËþíËþíËþíËþíËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîËþíËþíËþíËþíËþíËþíËþíËþíËþíËþíËþíËþíÌÿîÌÿîËþíËþíÊýìÊüëÉûêÇùèÆ÷çÃôäÂòâÁñá©ÓÅ
++
++
++ ©ÓÅ®Ú˳àѶãÔ¶ãÔµâÓ±ÝΫÖȤͿšÁ´´¨†§œ~“y—y—~ž“ˆªŸ
++
++
++
++ gxr…t‘‡u’ˆv”Šy—|›‘€ •‡©ž³§™¿²•º®
++
++ ½ìÜËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîËþíËþíËþíÊýìÊýìÉûêÈúéÆøçÄõåÂòâ¿ïß»êÚ·åÖ²ßЮÙ˨ÒĢ˽žÅ¸˜¾±“¸¬³§Œ¯£Š­¡Š¬¡Š­¡Œ¯£Ž²¦’·«—½°Ä·¢Ê½§ÑíØʲÞ϶äÕºéÙ¾îÞÂòâÄõåÆ÷çÈúéÉûêÊüëÊýìËþíËþíËþíËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîËþíËþíËþíËþíËþíËþíËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîËþíËþíÊüëÇùèÃôä¾îÞ·åÖ¯Û̦ÏÁœÃ¶’·«3@<
++ FWQÀðàÊýìËþíÊýìÊüëÈúéÆ÷çÁñáºéÙ³àÑ©ÓŞŸ’¶ª†§œ-84
++ ~ž“›ÂµQe^
++
++ C
++ C
++ Yoh¢Ê¼¡É¼ È»žÅ¸Ä·›ÂµšÁ´šÁ´šÀ³™¿²™¿²™¿²™¿²™¿²™¿²™¿²™¿²™¿²™¿²™¿²šÀ³šÁ´›ÂµœÃ¶Ä·ŸÇº¡É¼£Ì¾¦ÐªÔÆ­ØÊ°ÜÍ´áÒ·åÖºéÙ¾îÞÁñáÃôäÆ÷çÇùèÈúéÊüëÊýìËþíËþíËþíËþíËþíËþíËþíÊýìÊýìÉûêÈúéÆøçÄõåÂòâ¿ïß»êÚ·åÖ²ßЭØʧÑáɼšÁ´“¸¬Œ¯£†§œ~ž“y—r…mˆh‚yc|t`xp]tlZpiXngVkdUjcTibShaRg`Rg`Rg`L_Y
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++
++ C
++ C
++ C
++
++
++
++ C
++ 
++ `xp_wo%.+
++ 
++ ?OJRg`Rg`Rg`Na[
++ AQLRg`Na[
++ 
++ 
++ 
++ 
++ 
++ 
++ 
++
++ 
++ 
++ ®ÙËÆ÷çÈúéÊüëÊýìËþíËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿî
++ 
++
++
++
++ C
++ C
++
++ C
++ ±ÝÎÆ÷çÈúéÊüëÊýìËþíËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿî
++ C
++
++ C
++ C
++ C
++ 
++
++
++
++
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++ C
++
++ C
++ C
++
++ C
++ C
++ C
++ C
++ 
++
++
++
++
++
++ 
++ 3™
++
++
++
++ fªD™ÿf™ÿf™ÿf™ÿf™ÿf3
++ 
++ pºK™ÿf3
++ ûCÿEÿEÿEÿEÿEÿE„$
++ r¾L3
++ ýEÿEÿEÿEÿEÿEÿE"
++ y—ÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿî
++ |›‘ÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿî
++ 
++ |ÿEÿEÿEÿEÿEÿEöCJ
++ 
++ ÿEÿEÿEÿEÿEÿEôBG
++ „ÿEÿEÿEÿEÿEÿEòAE
++
++
++
++ 
++ 
++
++
++ ˜˜˜ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿééétttÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ̏xxxyyy"""
++ c|tšÀ³¡É¼§ÑíØʲßзåÖ»êÚ¿ïßÂòâÄõåÆøçÈúéÉûêÊýìÊýìËþíËþíËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿî
++ f€wšÁ´¡É¼§ÑîÙ˲ßзåÖ¼ëÛ¿ïßÂòâÄõåÆøçÈúéÉûêÊýìÊýìËþíËþíËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿî
++
++
++ y—ÀðàÄõåÆøçÉûêÊýìÊýìËþíÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿîÌÿî
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ JJJÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÑÑѹ¹¹ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌXXX
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ 
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ 000ÐÐÐÿÿÿÿÿÿÿÿÿÿÿÿ{{{ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÁÁÁrrriii
++
++
++ ûCÿEÿEÿEÿEÿEÿE'
++ p»K™ÿf™ÿf™ÿf™ÿf™ÿf™ÿfZœ7's3™
++ z˜ŽÊýìÊýìÊüëÉûêÈúéÈúéÆøçÆ÷çÅöæÄõåÃôäÃôäÂóãÂòâÂòâayq
++ }œ’ËþíËþíËþíÊýìÊýìÊüëÉûêÉûêÈúéÇùèÆøçÆøçÆ÷çÆ÷çÆ÷çÅöæÅöærŽ…
++
+\ No newline at end of file
+*** ../vim-8.1.0615/nsis/lang/danish.nsi 1970-01-01 01:00:00.000000000 +0100
+--- nsis/lang/danish.nsi 2018-12-21 16:17:13.755141092 +0100
+***************
+*** 0 ****
+--- 1,175 ----
++ # vi:set ts=8 sts=4 sw=4 et fdm=marker:
++ #
++ # danish.nsi: Danish language strings for gvim NSIS installer.
++ #
++ # Locale ID : 1030
++ # fileencoding : UTF-8
++ # Author : scootergrisen
++
++ !insertmacro MUI_LANGUAGE "Danish"
++
++
++ # Overwrite the default translation.
++ # These string should be always English. Otherwise dosinst.c fails.
++ LangString ^SetupCaption ${LANG_DANISH} "$(^Name) Setup"
++ LangString ^UninstallCaption ${LANG_DANISH} "$(^Name) Uninstall"
++
++ ##############################################################################
++ # MUI Configuration Strings {{{1
++ ##############################################################################
++
++ #LangString str_dest_folder ${LANG_DANISH} "Destinationsmappe (skal slutte med $\"vim$\")"
++
++ LangString str_show_readme ${LANG_DANISH} "Vis README efter installationen er gennemført"
++
++ # Install types:
++ LangString str_type_typical ${LANG_DANISH} "Typisk"
++
++ LangString str_type_minimal ${LANG_DANISH} "Minimal"
++
++ LangString str_type_full ${LANG_DANISH} "Fuld"
++
++
++ ##############################################################################
++ # Section Titles & Description {{{1
++ ##############################################################################
++
++ LangString str_section_old_ver ${LANG_DANISH} "Afinstaller eksisterende version(er)"
++ LangString str_desc_old_ver ${LANG_DANISH} "Afinstaller eksisterende Vim-version(er) fra dit system."
++
++ LangString str_section_exe ${LANG_DANISH} "Vim GUI og afviklingsfiler"
++ LangString str_desc_exe ${LANG_DANISH} "Vim GUI-eksekverbare- og afviklingsfiler. Komponenten kræves."
++
++ LangString str_section_console ${LANG_DANISH} "Vim-konsolprogram"
++ LangString str_desc_console ${LANG_DANISH} "Konsolversion af Vim (vim.exe)."
++
++ LangString str_section_batch ${LANG_DANISH} "Opret .bat-filer"
++ LangString str_desc_batch ${LANG_DANISH} "Opret .bat-filer til Vim-varianter i Windows-mappen til brug fra kommandolinjen."
++
++ LangString str_group_icons ${LANG_DANISH} "Opret ikoner til Vim"
++ LangString str_desc_icons ${LANG_DANISH} "Opret ikoner til Vim diverse steder for at hjælpe med at gøre adgangen let."
++
++ LangString str_section_desktop ${LANG_DANISH} "PÃ¥ skrivebordet"
++ LangString str_desc_desktop ${LANG_DANISH} "Opret ikoner til gVim-eksekverbare på skrivebordet."
++
++ LangString str_section_start_menu ${LANG_DANISH} "I Programmer-mappen i menuen Start"
++ LangString str_desc_start_menu ${LANG_DANISH} "Tilføj Vim i Programmer-mappen i menuen Start."
++
++ #LangString str_section_quick_launch ${LANG_DANISH} "I værktøjslinjen Hurtig start"
++ #LangString str_desc_quick_launch ${LANG_DANISH} "Tilføj Vim-genvej i værktøjslinjen Hurtig start."
++
++ LangString str_section_edit_with ${LANG_DANISH} "Tilføj Vim-genvejsmenu"
++ LangString str_desc_edit_with ${LANG_DANISH} "Tilføj Vim til listen i $\"Åbn med...$\"-genvejsmenuen."
++
++ #LangString str_section_edit_with32 ${LANG_DANISH} "32-bit-version"
++ #LangString str_desc_edit_with32 ${LANG_DANISH} "Tilføj Vim til listen i $\"Åbn med...$\"-genvejsmenuen for 32-bit-programmer."
++
++ #LangString str_section_edit_with64 ${LANG_DANISH} "64-bit-version"
++ #LangString str_desc_edit_with64 ${LANG_DANISH} "Tilføj Vim til listen i $\"Åbn med...$\"-genvejsmenuen for 64-bit-programmer."
++
++ LangString str_section_vim_rc ${LANG_DANISH} "Opret standardkonfiguration"
++ LangString str_desc_vim_rc ${LANG_DANISH} "Opret en standardkonfigurationsfil (_vimrc) hvis der ikke allerede findes en."
++
++ LangString str_group_plugin ${LANG_DANISH} "Opret plugin-mapper"
++ LangString str_desc_plugin ${LANG_DANISH} "Opret plugin-mapper. Plugin-mapper giver mulighed for at udvide Vim ved at slippe en fil i en mappen."
++
++ LangString str_section_plugin_home ${LANG_DANISH} "Private"
++ LangString str_desc_plugin_home ${LANG_DANISH} "Opret plugin-mapper i HOME-mappen."
++
++ LangString str_section_plugin_vim ${LANG_DANISH} "Delte"
++ LangString str_desc_plugin_vim ${LANG_DANISH} "Opret plugin-mapper i Vim-installationsmappe, det bruges af alle på systemet."
++
++ LangString str_section_vis_vim ${LANG_DANISH} "VisVim-udvidelser"
++ LangString str_desc_vis_vim ${LANG_DANISH} "VisVim-udvidelser til integrering i Microsoft Visual Studio."
++
++ LangString str_section_nls ${LANG_DANISH} "Understøttelse af modersmål"
++ LangString str_desc_nls ${LANG_DANISH} "Installer filer til understøttelse af modersmål."
++
++ LangString str_unsection_register ${LANG_DANISH} "Afregistrer Vim"
++ LangString str_desc_unregister ${LANG_DANISH} "Afregistrer Vim fra systemet."
++
++ LangString str_unsection_exe ${LANG_DANISH} "Fjern Vim-eksekverbare-/afviklingsfiler"
++ LangString str_desc_rm_exe ${LANG_DANISH} "Fjern alle Vim-eksekverbare- og afviklingsfiler."
++
++ LangString str_ungroup_plugin ${LANG_DANISH} "Fjern plugin-mapper"
++ LangString str_desc_rm_plugin ${LANG_DANISH} "Fjern plugin-mapperne hvis de er tomme."
++
++ LangString str_unsection_plugin_home ${LANG_DANISH} "Privat"
++ LangString str_desc_rm_plugin_home ${LANG_DANISH} "Fjern plugin-mapperne fra HOME-mappen."
++
++ LangString str_unsection_plugin_vim ${LANG_DANISH} "Delte"
++ LangString str_desc_rm_plugin_vim ${LANG_DANISH} "Fjern plugin-mapperne fra Vim-installationsmappen."
++
++ LangString str_unsection_rootdir ${LANG_DANISH} "Fjern Vim-rodmappen"
++ LangString str_desc_rm_rootdir ${LANG_DANISH} "Fjern Vim-rodmappen. Den indeholder dine Vim-konfigurationsfiler!"
++
++
++ ##############################################################################
++ # Messages {{{1
++ ##############################################################################
++
++ #LangString str_msg_too_many_ver ${LANG_DANISH} "Fandt $vim_old_ver_count Vim-versioner på dit system.$\r$\nInstallationsguiden kan højst håndtere ${VIM_MAX_OLD_VER}-versioner.$\r$\nFjern venligst nogle versioner og start igen."
++
++ #LangString str_msg_invalid_root ${LANG_DANISH} "Ugyldig installationssti: $vim_install_root!$\r$\nDen skal slutte med $\"vim$\"."
++
++ #LangString str_msg_bin_mismatch ${LANG_DANISH} "Uoverensstemmelse i binære sti!$\r$\n$\r$\nForventede at den binære sti var $\"$vim_bin_path$\",$\r$\nmen systemet indikerer at den binære sti er $\"$INSTDIR$\"."
++
++ #LangString str_msg_vim_running ${LANG_DANISH} "Vim kører stadig på dit system.$\r$\nLuk venligst alle instanser af Vim inden du fortsætter."
++
++ #LangString str_msg_register_ole ${LANG_DANISH} "Forsøger at registrere Vim med OLE. Der er ingen meddelelse til at indikere om det virker eller ej."
++
++ #LangString str_msg_unreg_ole ${LANG_DANISH} "Forsøger at afregistrere Vim med OLE. Der er ingen meddelelse til at indikere om det virker eller ej."
++
++ #LangString str_msg_rm_start ${LANG_DANISH} "Afinstallerer følgende version:"
++
++ #LangString str_msg_rm_fail ${LANG_DANISH} "Kunne ikke afinstallere følgende version:"
++
++ #LangString str_msg_no_rm_key ${LANG_DANISH} "Kan ikke finde registreringsdatabasenøgle for afinstallationsguiden."
++
++ #LangString str_msg_no_rm_reg ${LANG_DANISH} "Kan ikke finde afinstallationsguiden fra registreringsdatabasen."
++
++ #LangString str_msg_no_rm_exe ${LANG_DANISH} "Kan ikke tilgå afinstallationsguide."
++
++ #LangString str_msg_rm_copy_fail ${LANG_DANISH} "Kunne ikke kopiere afinstallationsguide til midlertidig mappe."
++
++ #LangString str_msg_rm_run_fail ${LANG_DANISH} "Kunne ikke køre afinstallationsguide."
++
++ #LangString str_msg_abort_install ${LANG_DANISH} "Installationsguiden vil afbryde."
++
++ LangString str_msg_install_fail ${LANG_DANISH} "Installationen mislykkedes. Bedre held næste gang."
++
++ LangString str_msg_rm_exe_fail ${LANG_DANISH} "Nogle filer i $0 er ikke blevet slettet!$\r$\nDu skal gøre det manuelt."
++
++ #LangString str_msg_rm_root_fail ${LANG_DANISH} "ADVARSEL: Kan ikke fjerne $\"$vim_install_root$\", den er ikke tom!"
++
++ LangString str_msg_uninstalling ${LANG_DANISH} "Afinstallerer den gamle version..."
++
++ LangString str_msg_registering ${LANG_DANISH} "Registrerer..."
++
++ LangString str_msg_unregistering ${LANG_DANISH} "Afregistrerer..."
++
++
++ ##############################################################################
++ # Dialog Box {{{1
++ ##############################################################################
++
++ LangString str_vimrc_page_title ${LANG_DANISH} "Vælg _vimrc-indstillinger"
++ LangString str_vimrc_page_subtitle ${LANG_DANISH} "Vælg indstillingerne til forbedring, tastatur og mus."
++
++ LangString str_msg_compat_title ${LANG_DANISH} " Vi- / Vim-opførsel "
++ LangString str_msg_compat_desc ${LANG_DANISH} "&Kompatibilitet og forbedringer"
++ LangString str_msg_compat_vi ${LANG_DANISH} "Vi-kompatibel"
++ LangString str_msg_compat_vim ${LANG_DANISH} "Vim original"
++ LangString str_msg_compat_defaults ${LANG_DANISH} "Vim med nogle forbedringer (indlæs defaults.vim)"
++ LangString str_msg_compat_all ${LANG_DANISH} "Vim med alle forbedringer (indlæs vimrc_example.vim) (standard)"
++
++ LangString str_msg_keymap_title ${LANG_DANISH} " Tilknytninger "
++ LangString str_msg_keymap_desc ${LANG_DANISH} "&Gentilknyt nogle få taster (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F osv.)"
++ LangString str_msg_keymap_default ${LANG_DANISH} "Gentilknyt ikke taster (standard)"
++ LangString str_msg_keymap_windows ${LANG_DANISH} "Gentilknyt nogle få taster til Windows"
++
++ LangString str_msg_mouse_title ${LANG_DANISH} " Mus "
++ LangString str_msg_mouse_desc ${LANG_DANISH} "&Opførsel af højre og venstre knapper"
++ LangString str_msg_mouse_default ${LANG_DANISH} "Højre: genvejsmenu, venstre: visuel tilstand (standard)"
++ LangString str_msg_mouse_windows ${LANG_DANISH} "Højre: genvejsmenu, venstre: vælg-tilstand (Windows)"
++ LangString str_msg_mouse_unix ${LANG_DANISH} "Højre: udvider markering, venstre: visuel tilstand (Unix)"
+*** ../vim-8.1.0615/nsis/lang/dutch.nsi 1970-01-01 01:00:00.000000000 +0100
+--- nsis/lang/dutch.nsi 2018-12-21 16:17:24.363068302 +0100
+***************
+*** 0 ****
+--- 1,281 ----
++ # vi:set ts=8 sts=4 sw=4 et fdm=marker:
++ #
++ # dutch.nsi : Dutch language strings for gvim NSIS installer.
++ #
++ # Locale ID : 1043
++ # Locale Name : nl
++ # fileencoding : UTF-8
++ # Author : Peter Odding <peter@peterodding.com>
++
++ !insertmacro MUI_LANGUAGE "Dutch"
++
++
++ # Overwrite the default translation.
++ # These string should be always English. Otherwise dosinst.c fails.
++ LangString ^SetupCaption ${LANG_DUTCH} \
++ "$(^Name) Setup"
++ LangString ^UninstallCaption ${LANG_DUTCH} \
++ "$(^Name) Uninstall"
++
++ ##############################################################################
++ # MUI Configuration Strings {{{1
++ ##############################################################################
++
++ #LangString str_dest_folder ${LANG_DUTCH} \
++ # "Doelmap (moet eindigen op $\"vim$\")"
++
++ LangString str_show_readme ${LANG_DUTCH} \
++ "README weergeven na installatie"
++
++ # Install types:
++ LangString str_type_typical ${LANG_DUTCH} \
++ "Gebruikelijk"
++
++ LangString str_type_minimal ${LANG_DUTCH} \
++ "Minimaal"
++
++ LangString str_type_full ${LANG_DUTCH} \
++ "Volledig"
++
++
++ ##############################################################################
++ # Section Titles & Description {{{1
++ ##############################################################################
++
++ LangString str_section_old_ver ${LANG_DUTCH} \
++ "Bestaande versie(s) de-installeren"
++ LangString str_desc_old_ver ${LANG_DUTCH} \
++ "Bestaande Vim versie(s) van je systeem verwijderen."
++
++ LangString str_section_exe ${LANG_DUTCH} \
++ "Vim GUI"
++ LangString str_desc_exe ${LANG_DUTCH} \
++ "Vim GUI uitvoerbare bestanden en runtime bestanden. Dit component is vereist."
++
++ LangString str_section_console ${LANG_DUTCH} \
++ "Vim console programma"
++ LangString str_desc_console ${LANG_DUTCH} \
++ "Console versie van Vim (vim.exe)."
++
++ LangString str_section_batch ${LANG_DUTCH} \
++ "Creëer .bat bestanden"
++ LangString str_desc_batch ${LANG_DUTCH} \
++ "Creëer .bat bestanden voor Vim varianten in de Windows map voor \
++ commando regel gebruik."
++
++ LangString str_group_icons ${LANG_DUTCH} \
++ "Creëer pictogrammen for Vim"
++ LangString str_desc_icons ${LANG_DUTCH} \
++ "Creëer pictogrammen voor Vim op verschillende locaties voor gemakkelijke toegang."
++
++ LangString str_section_desktop ${LANG_DUTCH} \
++ "Op het bureaublad"
++ LangString str_desc_desktop ${LANG_DUTCH} \
++ "Creëer pictogrammen voor Vim uitvoerbare bestanden op het bureaublad."
++
++ LangString str_section_start_menu ${LANG_DUTCH} \
++ "In de Programma's map in het start menu"
++ LangString str_desc_start_menu ${LANG_DUTCH} \
++ "Voeg Vim toe aan de programma's map in het start menu. \
++ Van toepassing op Windows 95 en later."
++
++ #LangString str_section_quick_launch ${LANG_DUTCH} \
++ # "In de snel starten balk"
++ #LangString str_desc_quick_launch ${LANG_DUTCH} \
++ # "Voeg Vim snelkoppeling toe aan de snel starten balk."
++
++ LangString str_section_edit_with ${LANG_DUTCH} \
++ "Voeg Vim contextmenu toe"
++ LangString str_desc_edit_with ${LANG_DUTCH} \
++ "Voeg Vim toe aan de $\"Openen met...$\" contextmenu lijst."
++
++ #LangString str_section_edit_with32 ${LANG_DUTCH} \
++ # "32-bit versie"
++ #LangString str_desc_edit_with32 ${LANG_DUTCH} \
++ # "Voeg Vim toe aan de $\"Openen met...$\" contextmenu lijst \
++ # voor 32-bit toepassingen."
++
++ #LangString str_section_edit_with64 ${LANG_DUTCH} \
++ # "64-bit versie"
++ #LangString str_desc_edit_with64 ${LANG_DUTCH} \
++ # "Voeg Vim toe aan de $\"Openen met...$\" contextmenu lijst \
++ # voor 64-bit toepassingen."
++
++ LangString str_section_vim_rc ${LANG_DUTCH} \
++ "Creëer standaard configuratie"
++ LangString str_desc_vim_rc ${LANG_DUTCH} \
++ "Creëer een standaard configuratie bestand (_vimrc) als er nog geen bestaat."
++
++ LangString str_group_plugin ${LANG_DUTCH} \
++ "Creëer Plugin mappen"
++ LangString str_desc_plugin ${LANG_DUTCH} \
++ "Creëer plugin mappen. Plugin mappen maken het mogelijk om \
++ Vim uit te breiden door een bestand in een map te plaatsen."
++
++ LangString str_section_plugin_home ${LANG_DUTCH} \
++ "Privé"
++ LangString str_desc_plugin_home ${LANG_DUTCH} \
++ "Create plugin directories in HOME directory."
++
++ LangString str_section_plugin_vim ${LANG_DUTCH} \
++ "Gedeeld"
++ LangString str_desc_plugin_vim ${LANG_DUTCH} \
++ "Creëer plugin mappen in Vim installatie map, deze worden gebruikt \
++ voor iedereen op het systeem."
++
++ LangString str_section_vis_vim ${LANG_DUTCH} \
++ "VisVim extensie"
++ LangString str_desc_vis_vim ${LANG_DUTCH} \
++ "VisVim extensie voor Microsoft Visual Studio integratie."
++
++ LangString str_section_nls ${LANG_DUTCH} \
++ "Ondersteuning voor andere talen"
++ LangString str_desc_nls ${LANG_DUTCH} \
++ "Bestanden voor ondersteuning van andere talen dan Engels installeren."
++
++ LangString str_unsection_register ${LANG_DUTCH} \
++ "Vim afmelden"
++ LangString str_desc_unregister ${LANG_DUTCH} \
++ "Registratie van Vim in het systeem ongedaan maken."
++
++ LangString str_unsection_exe ${LANG_DUTCH} \
++ "Vim uitvoerbare/runtime bestanden verwijderen"
++ LangString str_desc_rm_exe ${LANG_DUTCH} \
++ "Verwijder alle Vim uitvoerbare bestanden en runtime bestanden."
++
++ LangString str_ungroup_plugin ${LANG_DUTCH} \
++ "Remove plugin directories"
++ LangString str_desc_rm_plugin ${LANG_DUTCH} \
++ "Remove the plugin directories if they are empty."
++
++ LangString str_unsection_plugin_home ${LANG_DUTCH} \
++ "Privé"
++ LangString str_desc_rm_plugin_home ${LANG_DUTCH} \
++ "Remove the plugin directories from HOME directory."
++
++ LangString str_unsection_plugin_vim ${LANG_DUTCH} \
++ "Gedeeld"
++ LangString str_desc_rm_plugin_vim ${LANG_DUTCH} \
++ "Remove the plugin directories from Vim install directory."
++
++ LangString str_unsection_rootdir ${LANG_DUTCH} \
++ "Remove the Vim root directory"
++ LangString str_desc_rm_rootdir ${LANG_DUTCH} \
++ "Remove the Vim root directory. It contains your Vim configuration files!"
++
++
++ ##############################################################################
++ # Messages {{{1
++ ##############################################################################
++
++ #LangString str_msg_too_many_ver ${LANG_DUTCH} \
++ # "Er zijn $vim_old_ver_count Vim versies op je systeem gevonden.$\r$\n\
++ # Deze installatie kan omgaan met maximaal ${VIM_MAX_OLD_VER} versies.$\r$\n\
++ # Verwijder a.u.b. wat versies en probeer het dan opnieuw."
++
++ #LangString str_msg_invalid_root ${LANG_DUTCH} \
++ # "Ongeldig installatiepad: $vim_install_root!$\r$\n\
++ # Het moet eindelijk op $\"vim$\"."
++
++ #LangString str_msg_bin_mismatch ${LANG_DUTCH} \
++ # "Binair pad onjuist!$\r$\n$\r$\n\
++ # Het binaire pad zou $\"$vim_bin_path$\" moeten zijn,$\r$\n\
++ # maar het systeem geeft aan dat het binaire pad $\"$INSTDIR$\" is."
++
++ #LangString str_msg_vim_running ${LANG_DUTCH} \
++ # "Vim is nog actief op je systeem.$\r$\n\
++ # Sluit a.u.b. alle instanties van Vim voordat je verder gaat."
++
++ #LangString str_msg_register_ole ${LANG_DUTCH} \
++ # "Bezig met proberen om Vim te registreren met OLE. \
++ # Er is geen bericht dat aangeeft of deze operatie slaagt."
++
++ #LangString str_msg_unreg_ole ${LANG_DUTCH} \
++ # "Bezig met proberen om Vim te de-registreren met OLE. \
++ # Er is geen bericht dat aangeeft of deze operatie slaagt."
++
++ #LangString str_msg_rm_start ${LANG_DUTCH} \
++ # "De volgende versies worden verwijderd:"
++
++ #LangString str_msg_rm_fail ${LANG_DUTCH} \
++ # "De volgende versies konden niet worden verwijderd:"
++
++ #LangString str_msg_no_rm_key ${LANG_DUTCH} \
++ # "Kan de uninstaller register sleutel niet vinden."
++
++ #LangString str_msg_no_rm_reg ${LANG_DUTCH} \
++ # "Kan de uninstaller niet vinden via het register."
++
++ #LangString str_msg_no_rm_exe ${LANG_DUTCH} \
++ # "Kan geen toegang krijgen tot de uninstaller."
++
++ #LangString str_msg_rm_copy_fail ${LANG_DUTCH} \
++ # "Kon de uninstaller niet naar een tijdelijke map kopiëren."
++
++ #LangString str_msg_rm_run_fail ${LANG_DUTCH} \
++ # "Kon de uninstaller niet uitvoeren."
++
++ #LangString str_msg_abort_install ${LANG_DUTCH} \
++ # "Installatie wordt gestopt."
++
++ LangString str_msg_install_fail ${LANG_DUTCH} \
++ "Installatie is mislukt."
++
++ LangString str_msg_rm_exe_fail ${LANG_DUTCH} \
++ "Sommige bestanden in $0 zijn niet verwijderd!$\r$\n\
++ Dit moet je handmatig doen."
++
++ #LangString str_msg_rm_root_fail ${LANG_DUTCH} \
++ # "WAARSCHUWING: Kan $\"$vim_install_root$\" niet verwijderen omdat het niet leeg is!"
++
++ LangString str_msg_uninstalling ${LANG_DUTCH} \
++ "Uninstalling the old version..."
++
++ LangString str_msg_registering ${LANG_DUTCH} \
++ "Registering..."
++
++ LangString str_msg_unregistering ${LANG_DUTCH} \
++ "Unregistering..."
++
++
++ ##############################################################################
++ # Dialog Box {{{1
++ ##############################################################################
++
++ LangString str_vimrc_page_title ${LANG_DUTCH} \
++ "Choose _vimrc settings"
++ LangString str_vimrc_page_subtitle ${LANG_DUTCH} \
++ "Choose the settings for enhancement, keyboard and mouse."
++
++ LangString str_msg_compat_title ${LANG_DUTCH} \
++ " Vi / Vim behavior "
++ LangString str_msg_compat_desc ${LANG_DUTCH} \
++ "&Compatibility and enhancements"
++ LangString str_msg_compat_vi ${LANG_DUTCH} \
++ "Vi compatible"
++ LangString str_msg_compat_vim ${LANG_DUTCH} \
++ "Vim original"
++ LangString str_msg_compat_defaults ${LANG_DUTCH} \
++ "Vim with some enhancements (load defaults.vim)"
++ LangString str_msg_compat_all ${LANG_DUTCH} \
++ "Vim with all enhancements (load vimrc_example.vim) (Default)"
++
++ LangString str_msg_keymap_title ${LANG_DUTCH} \
++ " Mappings "
++ LangString str_msg_keymap_desc ${LANG_DUTCH} \
++ "&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
++ LangString str_msg_keymap_default ${LANG_DUTCH} \
++ "Do not remap keys (Default)"
++ LangString str_msg_keymap_windows ${LANG_DUTCH} \
++ "Remap a few keys"
++
++ LangString str_msg_mouse_title ${LANG_DUTCH} \
++ " Mouse "
++ LangString str_msg_mouse_desc ${LANG_DUTCH} \
++ "&Behavior of right and left buttons"
++ LangString str_msg_mouse_default ${LANG_DUTCH} \
++ "Right: popup menu, Left: visual mode (Default)"
++ LangString str_msg_mouse_windows ${LANG_DUTCH} \
++ "Right: popup menu, Left: select mode (Windows)"
++ LangString str_msg_mouse_unix ${LANG_DUTCH} \
++ "Right: extends selection, Left: visual mode (Unix)"
+*** ../vim-8.1.0615/nsis/lang/english.nsi 1970-01-01 01:00:00.000000000 +0100
+--- nsis/lang/english.nsi 2018-12-21 16:17:34.131001267 +0100
+***************
+*** 0 ****
+--- 1,280 ----
++ # vi:set ts=8 sts=4 sw=4 et fdm=marker:
++ #
++ # english.nsi: English language strings for gvim NSIS installer.
++ #
++ # Locale ID : 1033
++ # fileencoding : UTF-8
++ # Author : Guopeng Wen, Ken Takata
++
++ !insertmacro MUI_LANGUAGE "English"
++
++
++ # Overwrite the default translation.
++ # These string should be always English. Otherwise dosinst.c fails.
++ LangString ^SetupCaption ${LANG_ENGLISH} \
++ "$(^Name) Setup"
++ LangString ^UninstallCaption ${LANG_ENGLISH} \
++ "$(^Name) Uninstall"
++
++ ##############################################################################
++ # MUI Configuration Strings {{{1
++ ##############################################################################
++
++ #LangString str_dest_folder ${LANG_ENGLISH} \
++ # "Destination Folder (Must end with $\"vim$\")"
++
++ LangString str_show_readme ${LANG_ENGLISH} \
++ "Show README after installation finish"
++
++ # Install types:
++ LangString str_type_typical ${LANG_ENGLISH} \
++ "Typical"
++
++ LangString str_type_minimal ${LANG_ENGLISH} \
++ "Minimal"
++
++ LangString str_type_full ${LANG_ENGLISH} \
++ "Full"
++
++
++ ##############################################################################
++ # Section Titles & Description {{{1
++ ##############################################################################
++
++ LangString str_section_old_ver ${LANG_ENGLISH} \
++ "Uninstall Existing Version(s)"
++ LangString str_desc_old_ver ${LANG_ENGLISH} \
++ "Uninstall existing Vim version(s) from your system."
++
++ LangString str_section_exe ${LANG_ENGLISH} \
++ "Vim GUI and runtime files"
++ LangString str_desc_exe ${LANG_ENGLISH} \
++ "Vim GUI executables and runtime files. This component is required."
++
++ LangString str_section_console ${LANG_ENGLISH} \
++ "Vim console program"
++ LangString str_desc_console ${LANG_ENGLISH} \
++ "Console version of Vim (vim.exe)."
++
++ LangString str_section_batch ${LANG_ENGLISH} \
++ "Create .bat files"
++ LangString str_desc_batch ${LANG_ENGLISH} \
++ "Create .bat files for Vim variants in the Windows directory for \
++ command line use."
++
++ LangString str_group_icons ${LANG_ENGLISH} \
++ "Create icons for Vim"
++ LangString str_desc_icons ${LANG_ENGLISH} \
++ "Create icons for Vim at various locations to facilitate easy access."
++
++ LangString str_section_desktop ${LANG_ENGLISH} \
++ "On the Desktop"
++ LangString str_desc_desktop ${LANG_ENGLISH} \
++ "Create icons for gVim executables on the desktop."
++
++ LangString str_section_start_menu ${LANG_ENGLISH} \
++ "In the Start Menu Programs Folder"
++ LangString str_desc_start_menu ${LANG_ENGLISH} \
++ "Add Vim in the programs folder of the start menu."
++
++ #LangString str_section_quick_launch ${LANG_ENGLISH} \
++ # "In the Quick Launch Bar"
++ #LangString str_desc_quick_launch ${LANG_ENGLISH} \
++ # "Add Vim shortcut in the quick launch bar."
++
++ LangString str_section_edit_with ${LANG_ENGLISH} \
++ "Add Vim Context Menu"
++ LangString str_desc_edit_with ${LANG_ENGLISH} \
++ "Add Vim to the $\"Open With...$\" context menu list."
++
++ #LangString str_section_edit_with32 ${LANG_ENGLISH} \
++ # "32-bit Version"
++ #LangString str_desc_edit_with32 ${LANG_ENGLISH} \
++ # "Add Vim to the $\"Open With...$\" context menu list \
++ # for 32-bit applications."
++
++ #LangString str_section_edit_with64 ${LANG_ENGLISH} \
++ # "64-bit Version"
++ #LangString str_desc_edit_with64 ${LANG_ENGLISH} \
++ # "Add Vim to the $\"Open With...$\" context menu list \
++ # for 64-bit applications."
++
++ LangString str_section_vim_rc ${LANG_ENGLISH} \
++ "Create Default Config"
++ LangString str_desc_vim_rc ${LANG_ENGLISH} \
++ "Create a default config file (_vimrc) if one does not already exist."
++
++ LangString str_group_plugin ${LANG_ENGLISH} \
++ "Create Plugin Directories"
++ LangString str_desc_plugin ${LANG_ENGLISH} \
++ "Create plugin directories. Plugin directories allow extending Vim \
++ by dropping a file into a directory."
++
++ LangString str_section_plugin_home ${LANG_ENGLISH} \
++ "Private"
++ LangString str_desc_plugin_home ${LANG_ENGLISH} \
++ "Create plugin directories in HOME directory."
++
++ LangString str_section_plugin_vim ${LANG_ENGLISH} \
++ "Shared"
++ LangString str_desc_plugin_vim ${LANG_ENGLISH} \
++ "Create plugin directories in Vim install directory, it is used for \
++ everybody on the system."
++
++ LangString str_section_vis_vim ${LANG_ENGLISH} \
++ "VisVim Extension"
++ LangString str_desc_vis_vim ${LANG_ENGLISH} \
++ "VisVim Extension for Microsoft Visual Studio integration."
++
++ LangString str_section_nls ${LANG_ENGLISH} \
++ "Native Language Support"
++ LangString str_desc_nls ${LANG_ENGLISH} \
++ "Install files for native language support."
++
++ LangString str_unsection_register ${LANG_ENGLISH} \
++ "Unregister Vim"
++ LangString str_desc_unregister ${LANG_ENGLISH} \
++ "Unregister Vim from the system."
++
++ LangString str_unsection_exe ${LANG_ENGLISH} \
++ "Remove Vim Executables/Runtime Files"
++ LangString str_desc_rm_exe ${LANG_ENGLISH} \
++ "Remove all Vim executables and runtime files."
++
++ LangString str_ungroup_plugin ${LANG_ENGLISH} \
++ "Remove plugin directories"
++ LangString str_desc_rm_plugin ${LANG_ENGLISH} \
++ "Remove the plugin directories if they are empty."
++
++ LangString str_unsection_plugin_home ${LANG_ENGLISH} \
++ "Private"
++ LangString str_desc_rm_plugin_home ${LANG_ENGLISH} \
++ "Remove the plugin directories from HOME directory."
++
++ LangString str_unsection_plugin_vim ${LANG_ENGLISH} \
++ "Shared"
++ LangString str_desc_rm_plugin_vim ${LANG_ENGLISH} \
++ "Remove the plugin directories from Vim install directory."
++
++ LangString str_unsection_rootdir ${LANG_ENGLISH} \
++ "Remove the Vim root directory"
++ LangString str_desc_rm_rootdir ${LANG_ENGLISH} \
++ "Remove the Vim root directory. It contains your Vim configuration files!"
++
++
++ ##############################################################################
++ # Messages {{{1
++ ##############################################################################
++
++ #LangString str_msg_too_many_ver ${LANG_ENGLISH} \
++ # "Found $vim_old_ver_count Vim versions on your system.$\r$\n\
++ # This installer can only handle ${VIM_MAX_OLD_VER} versions \
++ # at most.$\r$\n\
++ # Please remove some versions and start again."
++
++ #LangString str_msg_invalid_root ${LANG_ENGLISH} \
++ # "Invalid install path: $vim_install_root!$\r$\n\
++ # It should end with $\"vim$\"."
++
++ #LangString str_msg_bin_mismatch ${LANG_ENGLISH} \
++ # "Binary path mismatch!$\r$\n$\r$\n\
++ # Expect the binary path to be $\"$vim_bin_path$\",$\r$\n\
++ # but system indicates the binary path is $\"$INSTDIR$\"."
++
++ #LangString str_msg_vim_running ${LANG_ENGLISH} \
++ # "Vim is still running on your system.$\r$\n\
++ # Please close all instances of Vim before you continue."
++
++ #LangString str_msg_register_ole ${LANG_ENGLISH} \
++ # "Attempting to register Vim with OLE. \
++ # There is no message indicates whether this works or not."
++
++ #LangString str_msg_unreg_ole ${LANG_ENGLISH} \
++ # "Attempting to unregister Vim with OLE. \
++ # There is no message indicates whether this works or not."
++
++ #LangString str_msg_rm_start ${LANG_ENGLISH} \
++ # "Uninstalling the following version:"
++
++ #LangString str_msg_rm_fail ${LANG_ENGLISH} \
++ # "Fail to uninstall the following version:"
++
++ #LangString str_msg_no_rm_key ${LANG_ENGLISH} \
++ # "Cannot find uninstaller registry key."
++
++ #LangString str_msg_no_rm_reg ${LANG_ENGLISH} \
++ # "Cannot find uninstaller from registry."
++
++ #LangString str_msg_no_rm_exe ${LANG_ENGLISH} \
++ # "Cannot access uninstaller."
++
++ #LangString str_msg_rm_copy_fail ${LANG_ENGLISH} \
++ # "Fail to copy uninstaller to temporary directory."
++
++ #LangString str_msg_rm_run_fail ${LANG_ENGLISH} \
++ # "Fail to run uninstaller."
++
++ #LangString str_msg_abort_install ${LANG_ENGLISH} \
++ # "Installer will abort."
++
++ LangString str_msg_install_fail ${LANG_ENGLISH} \
++ "Installation failed. Better luck next time."
++
++ LangString str_msg_rm_exe_fail ${LANG_ENGLISH} \
++ "Some files in $0 have not been deleted!$\r$\n\
++ You must do it manually."
++
++ #LangString str_msg_rm_root_fail ${LANG_ENGLISH} \
++ # "WARNING: Cannot remove $\"$vim_install_root$\", it is not empty!"
++
++ LangString str_msg_uninstalling ${LANG_ENGLISH} \
++ "Uninstalling the old version..."
++
++ LangString str_msg_registering ${LANG_ENGLISH} \
++ "Registering..."
++
++ LangString str_msg_unregistering ${LANG_ENGLISH} \
++ "Unregistering..."
++
++
++ ##############################################################################
++ # Dialog Box {{{1
++ ##############################################################################
++
++ LangString str_vimrc_page_title ${LANG_ENGLISH} \
++ "Choose _vimrc settings"
++ LangString str_vimrc_page_subtitle ${LANG_ENGLISH} \
++ "Choose the settings for enhancement, keyboard and mouse."
++
++ LangString str_msg_compat_title ${LANG_ENGLISH} \
++ " Vi / Vim behavior "
++ LangString str_msg_compat_desc ${LANG_ENGLISH} \
++ "&Compatibility and enhancements"
++ LangString str_msg_compat_vi ${LANG_ENGLISH} \
++ "Vi compatible"
++ LangString str_msg_compat_vim ${LANG_ENGLISH} \
++ "Vim original"
++ LangString str_msg_compat_defaults ${LANG_ENGLISH} \
++ "Vim with some enhancements (load defaults.vim)"
++ LangString str_msg_compat_all ${LANG_ENGLISH} \
++ "Vim with all enhancements (load vimrc_example.vim) (Default)"
++
++ LangString str_msg_keymap_title ${LANG_ENGLISH} \
++ " Mappings "
++ LangString str_msg_keymap_desc ${LANG_ENGLISH} \
++ "&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
++ LangString str_msg_keymap_default ${LANG_ENGLISH} \
++ "Do not remap keys (Default)"
++ LangString str_msg_keymap_windows ${LANG_ENGLISH} \
++ "Remap a few keys"
++
++ LangString str_msg_mouse_title ${LANG_ENGLISH} \
++ " Mouse "
++ LangString str_msg_mouse_desc ${LANG_ENGLISH} \
++ "&Behavior of right and left buttons"
++ LangString str_msg_mouse_default ${LANG_ENGLISH} \
++ "Right: popup menu, Left: visual mode (Default)"
++ LangString str_msg_mouse_windows ${LANG_ENGLISH} \
++ "Right: popup menu, Left: select mode (Windows)"
++ LangString str_msg_mouse_unix ${LANG_ENGLISH} \
++ "Right: extends selection, Left: visual mode (Unix)"
+*** ../vim-8.1.0615/nsis/lang/german.nsi 1970-01-01 01:00:00.000000000 +0100
+--- nsis/lang/german.nsi 2018-12-21 16:17:42.970940595 +0100
+***************
+*** 0 ****
+--- 1,280 ----
++ # vi:set ts=8 sts=4 sw=4 et fdm=marker:
++ #
++ # german.nsi : German language strings for gvim NSIS installer.
++ #
++ # Locale ID : 1031
++ # fileencoding : UTF-8
++ # Author : Christian Brabandt, tux
++
++ !insertmacro MUI_LANGUAGE "German"
++
++
++ # Overwrite the default translation.
++ # These string should be always English. Otherwise dosinst.c fails.
++ LangString ^SetupCaption ${LANG_GERMAN} \
++ "$(^Name) Setup"
++ LangString ^UninstallCaption ${LANG_GERMAN} \
++ "$(^Name) Uninstall"
++
++ ##############################################################################
++ # MUI Configuration Strings {{{1
++ ##############################################################################
++
++ #LangString str_dest_folder ${LANG_GERMAN} \
++ # "Zielverzeichnis auswählen (muss auf $\"vim$\" enden)"
++
++ LangString str_show_readme ${LANG_GERMAN} \
++ "README-Datei nach der Installation anzeigen"
++
++ # Install types:
++ LangString str_type_typical ${LANG_GERMAN} \
++ "Typisch"
++
++ LangString str_type_minimal ${LANG_GERMAN} \
++ "Minimal"
++
++ LangString str_type_full ${LANG_GERMAN} \
++ "Vollständig"
++
++
++ ##############################################################################
++ # Section Titles & Description {{{1
++ ##############################################################################
++
++ LangString str_section_old_ver ${LANG_GERMAN} \
++ "Vorherige Version deinstallieren"
++ LangString str_desc_old_ver ${LANG_GERMAN} \
++ "Vorherige installierte Versionen auf diesem System deinstallieren."
++
++ LangString str_section_exe ${LANG_GERMAN} \
++ "Vim GUI"
++ LangString str_desc_exe ${LANG_GERMAN} \
++ "Vim (Anwendung) und Laufzeitdateien (Dieser Teil ist zwingend \
++ erforderlich)."
++
++ LangString str_section_console ${LANG_GERMAN} \
++ "Vim Konsolenanwendung"
++ LangString str_desc_console ${LANG_GERMAN} \
++ "Konsolenversion von Vim."
++
++ LangString str_section_batch ${LANG_GERMAN} \
++ ".bat-Dateien erstellen"
++ LangString str_desc_batch ${LANG_GERMAN} \
++ ".bat-Dateien erstellen, um Vim in der Konsole auszuführen."
++
++ LangString str_group_icons ${LANG_GERMAN} \
++ "Vim-Verknüpfungen erstellen"
++ LangString str_desc_icons ${LANG_GERMAN} \
++ "Verknüpfungen mit Vim für einfachen Aufruf erstellen."
++
++ LangString str_section_desktop ${LANG_GERMAN} \
++ "Auf dem Desktop"
++ LangString str_desc_desktop ${LANG_GERMAN} \
++ "Icons für GVim auf dem Desktop erstellen."
++
++ LangString str_section_start_menu ${LANG_GERMAN} \
++ "Im Startmenü"
++ LangString str_desc_start_menu ${LANG_GERMAN} \
++ "Vim im Programmverzeichnis des Startmenüs hinzufügen."
++
++ #LangString str_section_quick_launch ${LANG_GERMAN} \
++ # "In der Schnellstartleiste"
++ #LangString str_desc_quick_launch ${LANG_GERMAN} \
++ # "Verknüpfung zu Vim in der Schnellstartleiste ablegen."
++
++ LangString str_section_edit_with ${LANG_GERMAN} \
++ "Vim zum Kontextmenü hinzufügen"
++ LangString str_desc_edit_with ${LANG_GERMAN} \
++ "Vim in das $\"Öffnen mit...$\"-Kontextmenü einfügen."
++
++ #LangString str_section_edit_with32 ${LANG_GERMAN} \
++ # "32-Bit-Version"
++ #LangString str_desc_edit_with32 ${LANG_GERMAN} \
++ # "Vim in das $\"Öffnen mit...$\"-Kontextmenü \
++ # für 32-Bit-Anwendungen integrieren."
++
++ #LangString str_section_edit_with64 ${LANG_GERMAN} \
++ # "64-Bit-Version"
++ #LangString str_desc_edit_with64 ${LANG_GERMAN} \
++ # "Vim in das $\"Öffnen mit...$\"-Kontextmenü \
++ # für 64-Bit-Anwendungen integrieren."
++
++ LangString str_section_vim_rc ${LANG_GERMAN} \
++ "Standard-Konfigurationsdatei erstellen"
++ LangString str_desc_vim_rc ${LANG_GERMAN} \
++ "Eine Standard-Konfigurationsdatei (_vimrc) erstellen, \
++ falls noch keine existiert."
++
++ LangString str_group_plugin ${LANG_GERMAN} \
++ "Plugin-Verzeichnisse anlegen"
++ LangString str_desc_plugin ${LANG_GERMAN} \
++ "Plugin-Verzeichnisse anlegen. Plugins erlauben es, Vim \
++ um zusätzliche Funktionen zu erweitern."
++
++ LangString str_section_plugin_home ${LANG_GERMAN} \
++ "Privat"
++ LangString str_desc_plugin_home ${LANG_GERMAN} \
++ "Erstelle Plugin-Verzeichnis im HOME Benutzerverzeichnis."
++
++ LangString str_section_plugin_vim ${LANG_GERMAN} \
++ "Freigegeben"
++ LangString str_desc_plugin_vim ${LANG_GERMAN} \
++ "Plugin-Verzeichnisse im Vim-Installationsverzeichnis erstellen. Diese werden \
++ für alle Benutzer dieses Systems genutzt."
++
++ LangString str_section_vis_vim ${LANG_GERMAN} \
++ "VisVim-Erweiterung"
++ LangString str_desc_vis_vim ${LANG_GERMAN} \
++ "VisVim-Erweiterung zur Integration in Microsoft Visual Studio."
++
++ LangString str_section_nls ${LANG_GERMAN} \
++ "Unterstützung für andere Sprachen"
++ LangString str_desc_nls ${LANG_GERMAN} \
++ "Dateien zur Unterstützung anderer Sprachen als Englisch installieren."
++
++ LangString str_unsection_register ${LANG_GERMAN} \
++ "Vim deinstallieren"
++ LangString str_desc_unregister ${LANG_GERMAN} \
++ "Vim vom System entfernen."
++
++ LangString str_unsection_exe ${LANG_GERMAN} \
++ "Vim-Anwendung und Laufzeitdateien entfernen"
++ LangString str_desc_rm_exe ${LANG_GERMAN} \
++ "Alle Vim-Anwendungen und Laufzeitdateien von diesem System entfernen."
++
++ LangString str_ungroup_plugin ${LANG_GERMAN} \
++ "Entferne Plugin-Verzeichnisse"
++ LangString str_desc_rm_plugin ${LANG_GERMAN} \
++ "Entferne Plugin-Verzeichnisse, falls sie leer sind."
++
++ LangString str_unsection_plugin_home ${LANG_GERMAN} \
++ "Privat"
++ LangString str_desc_rm_plugin_home ${LANG_GERMAN} \
++ "Entfernt die Plugin-Verzeichnisse aus dem HOME Benutzerverzeichnis."
++
++ LangString str_unsection_plugin_vim ${LANG_GERMAN} \
++ "Freigegeben"
++ LangString str_desc_rm_plugin_vim ${LANG_GERMAN} \
++ "Entfernt das Plugin-Verzeichnis aus dem Vim-Installationsverzeichnis."
++
++ LangString str_unsection_rootdir ${LANG_GERMAN} \
++ "Entferne Vim Installationsverzeichnis"
++ LangString str_desc_rm_rootdir ${LANG_GERMAN} \
++ "Entfernt das Vim Installationsverzeichnis. Es enthält die Vim Konfigurationsdateien!"
++
++
++ ##############################################################################
++ # Messages {{{1
++ ##############################################################################
++
++ #LangString str_msg_too_many_ver ${LANG_GERMAN} \
++ # "$vim_old_ver_count Vim-Versionen auf diesem System gefunden..$\r$\n\
++ # Dieser Installer kann maximal ${VIM_MAX_OLD_VER} Versionen \
++ # handhaben.$\r$\n\
++ # Bitte alte Versionen entfernen und noch einmal probieren."
++
++ #LangString str_msg_invalid_root ${LANG_GERMAN} \
++ # "Nicht gültiges Installationsverzeichnis: $vim_install_root!$\r$\n\
++ # Der Pfad muss auf $\"vim$\" enden."
++
++ #LangString str_msg_bin_mismatch ${LANG_GERMAN} \
++ # "Pfaddiskrepanz!$\r$\n$\r$\n\
++ # Erwarte Anwendungsverzeichnis $\"$vim_bin_path$\",$\r$\n\
++ # aber fand Anwendungspfad $\"$INSTDIR$\" vor."
++
++ #LangString str_msg_vim_running ${LANG_GERMAN} \
++ # "Laufender Vim-Prozess erkannt.$\r$\n\
++ # Bitte alle laufenden Vim-Prozesse vor dem Fortfahren beenden."
++
++ #LangString str_msg_register_ole ${LANG_GERMAN} \
++ # "Versuche OLE-Registrierung durchzuführen."
++
++ #LangString str_msg_unreg_ole ${LANG_GERMAN} \
++ # "Versuche OLE-Registrierung zu löschen."
++
++ #LangString str_msg_rm_start ${LANG_GERMAN} \
++ # "Deinstalliere die folgende Version:"
++
++ #LangString str_msg_rm_fail ${LANG_GERMAN} \
++ # "Deinstallation der Version fehlgeschlagen:"
++
++ #LangString str_msg_no_rm_key ${LANG_GERMAN} \
++ # "Deinstallationsschlüssel in der Registrierungsdatenbank nicht gefunden."
++
++ #LangString str_msg_no_rm_reg ${LANG_GERMAN} \
++ # "Kein Uninstaller in der Registrierungsdatenbank gefunden."
++
++ #LangString str_msg_no_rm_exe ${LANG_GERMAN} \
++ # "Kein Zugriff auf den Uninstaller."
++
++ #LangString str_msg_rm_copy_fail ${LANG_GERMAN} \
++ # "Fehler beim Kopieren des Uninstallers in ein temporäres Verzeichnis."
++
++ #LangString str_msg_rm_run_fail ${LANG_GERMAN} \
++ # "Fehler beim Aufruf des Uninstallers."
++
++ #LangString str_msg_abort_install ${LANG_GERMAN} \
++ # "Installation wird abgebrochen."
++
++ LangString str_msg_install_fail ${LANG_GERMAN} \
++ "Installation fehlerhaft beendet."
++
++ LangString str_msg_rm_exe_fail ${LANG_GERMAN} \
++ "Einige Dateien im Pfad $0 konnten nicht gelöscht werden!$\r$\n\
++ Diese Dateien müssen manuell gelöscht werden."
++
++ #LangString str_msg_rm_root_fail ${LANG_GERMAN} \
++ # "Achtung: Kann Verzeichnis $\"$vim_install_root$\" nicht entfernen, \
++ # weil es nicht leer ist!"
++
++ LangString str_msg_uninstalling ${LANG_GERMAN} \
++ "Deinstalliere alte Version..."
++
++ LangString str_msg_registering ${LANG_GERMAN} \
++ "Registriere..."
++
++ LangString str_msg_unregistering ${LANG_GERMAN} \
++ "Entferne Registrierung..."
++
++
++ ##############################################################################
++ # Dialog Box {{{1
++ ##############################################################################
++
++ LangString str_vimrc_page_title ${LANG_GERMAN} \
++ "Wähle _vimrc Konfigurationsoptionen"
++ LangString str_vimrc_page_subtitle ${LANG_GERMAN} \
++ "Wähle Einstellungen zur Kompatibilität, Tastatur und Maus."
++
++ LangString str_msg_compat_title ${LANG_GERMAN} \
++ " Vi / Vim Verhalten "
++ LangString str_msg_compat_desc ${LANG_GERMAN} \
++ "&Kompatibilität und Erweiterungen"
++ LangString str_msg_compat_vi ${LANG_GERMAN} \
++ "Vi-kompatibel"
++ LangString str_msg_compat_vim ${LANG_GERMAN} \
++ "Vim Original"
++ LangString str_msg_compat_defaults ${LANG_GERMAN} \
++ "Vim mit einigen Erweiterungen (Lädt defaults.vim)"
++ LangString str_msg_compat_all ${LANG_GERMAN} \
++ "Vim mit allen Erweiterungen (Lädt vimrc_example.vim) (Standard)"
++
++ LangString str_msg_keymap_title ${LANG_GERMAN} \
++ " Mappings für Windows Standard Tastenkombinationen "
++ LangString str_msg_keymap_desc ${LANG_GERMAN} \
++ "&Einige Tasten umkonfigurieren (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
++ LangString str_msg_keymap_default ${LANG_GERMAN} \
++ "Keine Tasten umkonfigurieren (Standard)"
++ LangString str_msg_keymap_windows ${LANG_GERMAN} \
++ "Einige Tasten umkonfigurieren"
++
++ LangString str_msg_mouse_title ${LANG_GERMAN} \
++ " Maus "
++ LangString str_msg_mouse_desc ${LANG_GERMAN} \
++ "&Verhalten der linken und rechten Buttons"
++ LangString str_msg_mouse_default ${LANG_GERMAN} \
++ "Rechts: Popup Menü, Links: Visueller Modus (Standard)"
++ LangString str_msg_mouse_windows ${LANG_GERMAN} \
++ "Rechts: Popup Menü, Links: Auswahl Modus (Windows)"
++ LangString str_msg_mouse_unix ${LANG_GERMAN} \
++ "Rechts: Auswahl erweitern, Links: Visueller Modus (Unix)"
+*** ../vim-8.1.0615/nsis/lang/italian.nsi 1970-01-01 01:00:00.000000000 +0100
+--- nsis/lang/italian.nsi 2018-12-21 16:17:51.158884392 +0100
+***************
+*** 0 ****
+--- 1,290 ----
++ # vi:set ts=8 sts=4 sw=4 et fdm=marker:
++ #
++ # italian.nsi : Italian language strings for gvim NSIS installer.
++ #
++ # Locale ID : 1040
++ # Locale Name : it
++ # fileencoding : latin1
++ # Author : Antonio Colombo
++
++ !insertmacro MUI_LANGUAGE "Italian"
++
++
++ # Overwrite the default translation.
++ # These string should be always English. Otherwise dosinst.c fails.
++ LangString ^SetupCaption ${LANG_ITALIAN} \
++ "$(^Name) Setup"
++ LangString ^UninstallCaption ${LANG_ITALIAN} \
++ "$(^Name) Uninstall"
++
++ ##############################################################################
++ # MUI Configuration Strings {{{1
++ ##############################################################################
++
++ #LangString str_dest_folder ${LANG_ITALIAN} \
++ # "Cartella d'installazione (il nome deve finire con $\"vim$\")"
++
++ LangString str_show_readme ${LANG_ITALIAN} \
++ "Visualizza README al termine dell'installazione"
++
++ # Install types:
++ LangString str_type_typical ${LANG_ITALIAN} \
++ "Tipica"
++
++ LangString str_type_minimal ${LANG_ITALIAN} \
++ "Minima"
++
++ LangString str_type_full ${LANG_ITALIAN} \
++ "Completa"
++
++
++ ##############################################################################
++ # Section Titles & Description {{{1
++ ##############################################################################
++
++ LangString str_section_old_ver ${LANG_ITALIAN} \
++ "Disinstalla versione/i esistente/i"
++ LangString str_desc_old_ver ${LANG_ITALIAN} \
++ "Disinstalla versione/i esistente/i di Vim dal vostro sistema."
++
++ LangString str_section_exe ${LANG_ITALIAN} \
++ "Vim GUI (gvim.exe per Windows)"
++ LangString str_desc_exe ${LANG_ITALIAN} \
++ "Vim GUI programmi e file di supporto. Questa componente è indispensabile."
++
++ LangString str_section_console ${LANG_ITALIAN} \
++ "Vim console (vim.exe per MS-DOS)"
++ LangString str_desc_console ${LANG_ITALIAN} \
++ "Versione console di Vim (vim.exe)."
++
++ LangString str_section_batch ${LANG_ITALIAN} \
++ "Crea file di invocazione (MS-DOS) .bat"
++ LangString str_desc_batch ${LANG_ITALIAN} \
++ "Crea file di invocazione .bat per varianti di Vim nella directory \
++ di Windows, da utilizzare da linea di comando (MS-DOS)."
++
++ LangString str_group_icons ${LANG_ITALIAN} \
++ "Crea icone per Vim"
++ LangString str_desc_icons ${LANG_ITALIAN} \
++ "Crea icone per Vim in vari posti, per rendere facile l'accesso."
++
++ LangString str_section_desktop ${LANG_ITALIAN} \
++ "Sul Desktop"
++ LangString str_desc_desktop ${LANG_ITALIAN} \
++ "Crea icone per programma gvim sul desktop."
++
++ LangString str_section_start_menu ${LANG_ITALIAN} \
++ "Nella cartella del menù START"
++ LangString str_desc_start_menu ${LANG_ITALIAN} \
++ "Aggiungi Vim alle cartelle del menù START. \
++ Disponibile solo da Windows 95 in avanti."
++
++ #LangString str_section_quick_launch ${LANG_ITALIAN} \
++ # "Nella barra di Avvio Veloce"
++ #LangString str_desc_quick_launch ${LANG_ITALIAN} \
++ # "Aggiungi un puntatore a Vim nella barra di Avvio Veloce."
++
++ LangString str_section_edit_with ${LANG_ITALIAN} \
++ "Aggiungi Vim al Menù Contestuale"
++ LangString str_desc_edit_with ${LANG_ITALIAN} \
++ "Aggiungi Vim alla lista contestuale $\"Apri con...$\"."
++
++ #LangString str_section_edit_with32 ${LANG_ITALIAN} \
++ # "Versione a 32-bit"
++ #LangString str_desc_edit_with32 ${LANG_ITALIAN} \
++ # "Aggiungi Vim alla lista contestuale $\"Apri con...$\" \
++ # per applicazioni a 32-bit."
++
++ #LangString str_section_edit_with64 ${LANG_ITALIAN} \
++ # "Versione a 64-bit"
++ #LangString str_desc_edit_with64 ${LANG_ITALIAN} \
++ # "Aggiungi Vim alla lista contestuale $\"Apri con...$\" \
++ # per applicazioni a 64-bit."
++
++ LangString str_section_vim_rc ${LANG_ITALIAN} \
++ "Crea Configurazione di default"
++ LangString str_desc_vim_rc ${LANG_ITALIAN} \
++ "Crea file configurazione di default (_vimrc) se non ne \
++ esiste già uno."
++
++ LangString str_group_plugin ${LANG_ITALIAN} \
++ "Crea Directory per Plugin"
++ LangString str_desc_plugin ${LANG_ITALIAN} \
++ "Crea Directory per Plugin. Servono per aggiungere funzionalità \
++ a Vim aggiungendo file a una di queste directory."
++
++ LangString str_section_plugin_home ${LANG_ITALIAN} \
++ "Privato"
++ LangString str_desc_plugin_home ${LANG_ITALIAN} \
++ "Create plugin directories in HOME directory."
++
++ LangString str_section_plugin_vim ${LANG_ITALIAN} \
++ "Condiviso"
++ LangString str_desc_plugin_vim ${LANG_ITALIAN} \
++ "Crea Directory Plugin nella directory di installazione di Vim \
++ per uso da parte di tutti gli utenti di questo sistema."
++
++ LangString str_section_vis_vim ${LANG_ITALIAN} \
++ "Estensione VisVim"
++ LangString str_desc_vis_vim ${LANG_ITALIAN} \
++ "Estensione VisVim per integrazione con Microsoft Visual Studio."
++
++ LangString str_section_nls ${LANG_ITALIAN} \
++ "Supporto Multilingue (NLS)"
++ LangString str_desc_nls ${LANG_ITALIAN} \
++ "Installa file per supportare messaggi in diverse lingue."
++
++ LangString str_unsection_register ${LANG_ITALIAN} \
++ "Togli Vim dal Registry"
++ LangString str_desc_unregister ${LANG_ITALIAN} \
++ "Togli Vim dal Registry di configurazione sistema."
++
++ LangString str_unsection_exe ${LANG_ITALIAN} \
++ "Cancella programmi/file_ausiliari Vim"
++ LangString str_desc_rm_exe ${LANG_ITALIAN} \
++ "Cancella tutti i programmi/file_ausiliari di Vim."
++
++ LangString str_unsection_rc ${LANG_ITALIAN} \
++ "Cancella file di configurazione di Vim"
++ LangString str_desc_rm_rc ${LANG_ITALIAN} \
++ "Cancella file di configurazione di Vim $vim_install_root\_vimrc. \
++ Da saltare se avete personalizzato il file di configurazione."
++
++ LangString str_ungroup_plugin ${LANG_ITALIAN} \
++ "Remove plugin directories"
++ LangString str_desc_rm_plugin ${LANG_ITALIAN} \
++ "Remove the plugin directories if they are empty."
++
++ LangString str_unsection_plugin_home ${LANG_ITALIAN} \
++ "Privato"
++ LangString str_desc_rm_plugin_home ${LANG_ITALIAN} \
++ "Remove the plugin directories from HOME directory."
++
++ LangString str_unsection_plugin_vim ${LANG_ITALIAN} \
++ "Condiviso"
++ LangString str_desc_rm_plugin_vim ${LANG_ITALIAN} \
++ "Remove the plugin directories from Vim install directory."
++
++ LangString str_unsection_rootdir ${LANG_ITALIAN} \
++ "Remove the Vim root directory"
++ LangString str_desc_rm_rootdir ${LANG_ITALIAN} \
++ "Remove the Vim root directory. It contains your Vim configuration files!"
++
++
++ ##############################################################################
++ # Messages {{{1
++ ##############################################################################
++
++ #LangString str_msg_too_many_ver ${LANG_ITALIAN} \
++ # "Trovate $vim_old_ver_count versioni di Vim sul vostro sistema.$\r$\n\
++ # Questo programma di installazione può gestirne solo \
++ # ${VIM_MAX_OLD_VER}.$\r$\n\
++ # Disinstallate qualche versione precedente e ricominciate."
++
++ #LangString str_msg_invalid_root ${LANG_ITALIAN} \
++ # "Nome di directory di installazione non valida: $vim_install_root!$\r$\n\
++ # Dovrebbe terminare con $\"vim$\"."
++
++ #LangString str_msg_bin_mismatch ${LANG_ITALIAN} \
++ # "Incongruenza di installazione!$\r$\n$\r$\n\
++ # Cartella di installazione dev'essere $\"$vim_bin_path$\",$\r$\n\
++ # ma il sistema segnala invece $\"$INSTDIR$\"."
++
++ #LangString str_msg_vim_running ${LANG_ITALIAN} \
++ # "Vim ancora in esecuzione sul vostro sistema.$\r$\n\
++ # Chiudete tutte le sessioni attive di Vim per continuare."
++
++ #LangString str_msg_register_ole ${LANG_ITALIAN} \
++ # "Tentativo di registrazione di Vim con OLE. \
++ # Non ci sono messaggi che indicano se ha funzionato o no."
++
++ #LangString str_msg_unreg_ole ${LANG_ITALIAN} \
++ # "Tentativo di togliere da Registry Vim con OLE. \
++ # Non ci sono messaggi che indicano se ha funzionato o no."
++
++ #LangString str_msg_rm_start ${LANG_ITALIAN} \
++ # "Disinstallazione delle seguenti versioni:"
++
++ #LangString str_msg_rm_fail ${LANG_ITALIAN} \
++ # "Disinstallazione non riuscita per la seguente versione:"
++
++ #LangString str_msg_no_rm_key ${LANG_ITALIAN} \
++ # "Non riesco a trovare chiave di disinstallazione nel Registry."
++
++ #LangString str_msg_no_rm_reg ${LANG_ITALIAN} \
++ # "Non riesco a trovare programma disinstallazione nel Registry."
++
++ #LangString str_msg_no_rm_exe ${LANG_ITALIAN} \
++ # "Non riesco a utilizzare programma disinstallazione."
++
++ #LangString str_msg_rm_copy_fail ${LANG_ITALIAN} \
++ # "Non riesco a copiare programma disinstallazione a una \
++ # directory temporanea."
++
++ #LangString str_msg_rm_run_fail ${LANG_ITALIAN} \
++ # "Non riesco a eseguire programma disinstallazione."
++
++ #LangString str_msg_abort_install ${LANG_ITALIAN} \
++ # "Il programma di disinstallazione verrà chiuso senza aver fatto nulla."
++
++ LangString str_msg_install_fail ${LANG_ITALIAN} \
++ "Installazione non riuscita. Miglior fortuna alla prossima!"
++
++ LangString str_msg_rm_exe_fail ${LANG_ITALIAN} \
++ "Alcuni file in $0 non sono stati cancellati!$\r$\n\
++ Dovreste cancellarli voi stessi."
++
++ #LangString str_msg_rm_root_fail ${LANG_ITALIAN} \
++ # "AVVISO: Non posso cancellare $\"$vim_install_root$\", non è vuota!"
++
++ LangString str_msg_uninstalling ${LANG_ITALIAN} \
++ "Uninstalling the old version..."
++
++ LangString str_msg_registering ${LANG_ITALIAN} \
++ "Registering..."
++
++ LangString str_msg_unregistering ${LANG_ITALIAN} \
++ "Unregistering..."
++
++
++ ##############################################################################
++ # Dialog Box {{{1
++ ##############################################################################
++
++ LangString str_vimrc_page_title ${LANG_ITALIAN} \
++ "Choose _vimrc settings"
++ LangString str_vimrc_page_subtitle ${LANG_ITALIAN} \
++ "Choose the settings for enhancement, keyboard and mouse."
++
++ LangString str_msg_compat_title ${LANG_ITALIAN} \
++ " Vi / Vim behavior "
++ LangString str_msg_compat_desc ${LANG_ITALIAN} \
++ "&Compatibility and enhancements"
++ LangString str_msg_compat_vi ${LANG_ITALIAN} \
++ "Vi compatible"
++ LangString str_msg_compat_vim ${LANG_ITALIAN} \
++ "Vim original"
++ LangString str_msg_compat_defaults ${LANG_ITALIAN} \
++ "Vim with some enhancements (load defaults.vim)"
++ LangString str_msg_compat_all ${LANG_ITALIAN} \
++ "Vim with all enhancements (load vimrc_example.vim) (Default)"
++
++ LangString str_msg_keymap_title ${LANG_ITALIAN} \
++ " Mappings "
++ LangString str_msg_keymap_desc ${LANG_ITALIAN} \
++ "&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
++ LangString str_msg_keymap_default ${LANG_ITALIAN} \
++ "Do not remap keys (Default)"
++ LangString str_msg_keymap_windows ${LANG_ITALIAN} \
++ "Remap a few keys"
++
++ LangString str_msg_mouse_title ${LANG_ITALIAN} \
++ " Mouse "
++ LangString str_msg_mouse_desc ${LANG_ITALIAN} \
++ "&Behavior of right and left buttons"
++ LangString str_msg_mouse_default ${LANG_ITALIAN} \
++ "Right: popup menu, Left: visual mode (Default)"
++ LangString str_msg_mouse_windows ${LANG_ITALIAN} \
++ "Right: popup menu, Left: select mode (Windows)"
++ LangString str_msg_mouse_unix ${LANG_ITALIAN} \
++ "Right: extends selection, Left: visual mode (Unix)"
+*** ../vim-8.1.0615/nsis/lang/japanese.nsi 1970-01-01 01:00:00.000000000 +0100
+--- nsis/lang/japanese.nsi 2018-12-21 16:18:00.150822667 +0100
+***************
+*** 0 ****
+--- 1,287 ----
++ # vi:set ts=8 sts=4 sw=4 et fdm=marker:
++ #
++ # japanese.nsi: Japanese language strings for gvim NSIS installer.
++ #
++ # Locale ID : 1041
++ # fileencoding : UTF-8
++ # Author : Ken Takata
++
++ !insertmacro MUI_LANGUAGE "Japanese"
++
++
++ # Overwrite the default translation.
++ # These string should be always English. Otherwise dosinst.c fails.
++ LangString ^SetupCaption ${LANG_JAPANESE} \
++ "$(^Name) Setup"
++ LangString ^UninstallCaption ${LANG_JAPANESE} \
++ "$(^Name) Uninstall"
++
++ # Workarounds for NSIS Japanese translation. The messages are too long.
++ # These should be better to be fixed by the NSIS upstream.
++ LangString ^SpaceAvailable ${LANG_JAPANESE} \
++ "利用可能なディスク容量:"
++ LangString ^SpaceRequired ${LANG_JAPANESE} \
++ "必要なディスク容量:"
++ # Fix another NSIS Japanese translation. The access key was missing.
++ LangString ^InstallBtn ${LANG_JAPANESE} \
++ "インストール(&I)"
++
++ ##############################################################################
++ # MUI Configuration Strings {{{1
++ ##############################################################################
++
++ #LangString str_dest_folder ${LANG_JAPANESE} \
++ # "Destination Folder (Must end with $\"vim$\")"
++
++ LangString str_show_readme ${LANG_JAPANESE} \
++ "インストール完了後に README を表示する"
++
++ # Install types:
++ LangString str_type_typical ${LANG_JAPANESE} \
++ "通常"
++
++ LangString str_type_minimal ${LANG_JAPANESE} \
++ "最小"
++
++ LangString str_type_full ${LANG_JAPANESE} \
++ "全て"
++
++
++ ##############################################################################
++ # Section Titles & Description {{{1
++ ##############################################################################
++
++ LangString str_section_old_ver ${LANG_JAPANESE} \
++ "既存のバージョンをアンインストール"
++ LangString str_desc_old_ver ${LANG_JAPANESE} \
++ "すでにインストールされている Vim をシステムから削除します。"
++
++ LangString str_section_exe ${LANG_JAPANESE} \
++ "Vim GUI とランタイムファイル"
++ LangString str_desc_exe ${LANG_JAPANESE} \
++ "Vim GUI 実行ファイルとラインタイムファイル。このコンポーネントは必須です。"
++
++ LangString str_section_console ${LANG_JAPANESE} \
++ "Vim コンソールプログラム"
++ LangString str_desc_console ${LANG_JAPANESE} \
++ "コンソール版の Vim (vim.exe)。"
++
++ LangString str_section_batch ${LANG_JAPANESE} \
++ ".bat ファイルを作成"
++ LangString str_desc_batch ${LANG_JAPANESE} \
++ "コマンドラインから Vim と関連コマンドを実行できるように、.bat ファイルを Windows ディレクトリに作成します。"
++
++ LangString str_group_icons ${LANG_JAPANESE} \
++ "Vim のアイコンを作成"
++ LangString str_desc_icons ${LANG_JAPANESE} \
++ "Vim を簡単に実行できるように、いくつかの場所にアイコンを作成します。"
++
++ LangString str_section_desktop ${LANG_JAPANESE} \
++ "デスクトップ上"
++ LangString str_desc_desktop ${LANG_JAPANESE} \
++ "gVim 実行ファイルのアイコンをデスクトップ上に作成します。"
++
++ LangString str_section_start_menu ${LANG_JAPANESE} \
++ "スタートメニューのプログラムフォルダー上"
++ LangString str_desc_start_menu ${LANG_JAPANESE} \
++ "Vim のアイコンをスタートメニューのプログラムフォルダー上に作成します。"
++
++ #LangString str_section_quick_launch ${LANG_JAPANESE} \
++ # "In the Quick Launch Bar"
++ #LangString str_desc_quick_launch ${LANG_JAPANESE} \
++ # "Add Vim shortcut in the quick launch bar."
++
++ LangString str_section_edit_with ${LANG_JAPANESE} \
++ "Vim のコンテキストメニューを追加"
++ LangString str_desc_edit_with ${LANG_JAPANESE} \
++ "$\"Vimで編集する$\" をコンテキストメニューに追加します。"
++
++ #LangString str_section_edit_with32 ${LANG_JAPANESE} \
++ # "32-bit Version"
++ #LangString str_desc_edit_with32 ${LANG_JAPANESE} \
++ # "Add Vim to the $\"Open With...$\" context menu list \
++ # for 32-bit applications."
++
++ #LangString str_section_edit_with64 ${LANG_JAPANESE} \
++ # "64-bit Version"
++ #LangString str_desc_edit_with64 ${LANG_JAPANESE} \
++ # "Add Vim to the $\"Open With...$\" context menu list \
++ # for 64-bit applications."
++
++ LangString str_section_vim_rc ${LANG_JAPANESE} \
++ "既定のコンフィグを作成"
++ LangString str_desc_vim_rc ${LANG_JAPANESE} \
++ "もし無ければ、既定のコンフィグファイル (_vimrc) を作成します。"
++
++ LangString str_group_plugin ${LANG_JAPANESE} \
++ "プラグインディレクトリを作成"
++ LangString str_desc_plugin ${LANG_JAPANESE} \
++ "プラグインディレクトリを作成します。そこにプラグインファイルを置くことで Vim を拡張することができます。"
++
++ LangString str_section_plugin_home ${LANG_JAPANESE} \
++ "個人用"
++ LangString str_desc_plugin_home ${LANG_JAPANESE} \
++ "プラグインディレクトリをホームディレクトリに作成します。"
++
++ LangString str_section_plugin_vim ${LANG_JAPANESE} \
++ "共用"
++ LangString str_desc_plugin_vim ${LANG_JAPANESE} \
++ "プラグインディレクトリを Vim のインストールディレクトリに作成します。システムの全員で共有されます。"
++
++ LangString str_section_vis_vim ${LANG_JAPANESE} \
++ "VisVim 拡張"
++ LangString str_desc_vis_vim ${LANG_JAPANESE} \
++ "Microsoft Visual Studio 統合用の VisVim 拡張。"
++
++ LangString str_section_nls ${LANG_JAPANESE} \
++ "多言語サポート"
++ LangString str_desc_nls ${LANG_JAPANESE} \
++ "多言語サポート用のファイルをインストールします。"
++
++ LangString str_unsection_register ${LANG_JAPANESE} \
++ "Vim を登録解除"
++ LangString str_desc_unregister ${LANG_JAPANESE} \
++ "Vim をシステムから登録解除します。"
++
++ LangString str_unsection_exe ${LANG_JAPANESE} \
++ "Vim の実行ファイル/ランタイムファイルを削除"
++ LangString str_desc_rm_exe ${LANG_JAPANESE} \
++ "全ての Vim の実行ファイルとランタイムファイルを削除します。"
++
++ LangString str_ungroup_plugin ${LANG_JAPANESE} \
++ "プラグインディレクトリを削除"
++ LangString str_desc_rm_plugin ${LANG_JAPANESE} \
++ "プラグインディレクトリが空であればそれを削除します。"
++
++ LangString str_unsection_plugin_home ${LANG_JAPANESE} \
++ "個人用"
++ LangString str_desc_rm_plugin_home ${LANG_JAPANESE} \
++ "プラグインディレクトリをホームディレクトリから削除します。"
++
++ LangString str_unsection_plugin_vim ${LANG_JAPANESE} \
++ "共用"
++ LangString str_desc_rm_plugin_vim ${LANG_JAPANESE} \
++ "プラグインディレクトリを Vim のインストールディレクトリから削除します。"
++
++ LangString str_unsection_rootdir ${LANG_JAPANESE} \
++ "Vim のトップディレクトリを削除"
++ LangString str_desc_rm_rootdir ${LANG_JAPANESE} \
++ "Vim のトップディレクトリを削除します。あなたの Vim の設定ファイルも含まれていることに注意してください!"
++
++
++ ##############################################################################
++ # Messages {{{1
++ ##############################################################################
++
++ #LangString str_msg_too_many_ver ${LANG_JAPANESE} \
++ # "Found $vim_old_ver_count Vim versions on your system.$\r$\n\
++ # This installer can only handle ${VIM_MAX_OLD_VER} versions \
++ # at most.$\r$\n\
++ # Please remove some versions and start again."
++
++ #LangString str_msg_invalid_root ${LANG_JAPANESE} \
++ # "Invalid install path: $vim_install_root!$\r$\n\
++ # It should end with $\"vim$\"."
++
++ #LangString str_msg_bin_mismatch ${LANG_JAPANESE} \
++ # "Binary path mismatch!$\r$\n$\r$\n\
++ # Expect the binary path to be $\"$vim_bin_path$\",$\r$\n\
++ # but system indicates the binary path is $\"$INSTDIR$\"."
++
++ #LangString str_msg_vim_running ${LANG_JAPANESE} \
++ # "Vim is still running on your system.$\r$\n\
++ # Please close all instances of Vim before you continue."
++
++ #LangString str_msg_register_ole ${LANG_JAPANESE} \
++ # "Attempting to register Vim with OLE. \
++ # There is no message indicates whether this works or not."
++
++ #LangString str_msg_unreg_ole ${LANG_JAPANESE} \
++ # "Attempting to unregister Vim with OLE. \
++ # There is no message indicates whether this works or not."
++
++ #LangString str_msg_rm_start ${LANG_JAPANESE} \
++ # "Uninstalling the following version:"
++
++ #LangString str_msg_rm_fail ${LANG_JAPANESE} \
++ # "Fail to uninstall the following version:"
++
++ #LangString str_msg_no_rm_key ${LANG_JAPANESE} \
++ # "Cannot find uninstaller registry key."
++
++ #LangString str_msg_no_rm_reg ${LANG_JAPANESE} \
++ # "Cannot find uninstaller from registry."
++
++ #LangString str_msg_no_rm_exe ${LANG_JAPANESE} \
++ # "Cannot access uninstaller."
++
++ #LangString str_msg_rm_copy_fail ${LANG_JAPANESE} \
++ # "Fail to copy uninstaller to temporary directory."
++
++ #LangString str_msg_rm_run_fail ${LANG_JAPANESE} \
++ # "Fail to run uninstaller."
++
++ #LangString str_msg_abort_install ${LANG_JAPANESE} \
++ # "Installer will abort."
++
++ LangString str_msg_install_fail ${LANG_JAPANESE} \
++ "インストールに失敗しました。次はうまくいくことを祈ります。"
++
++ LangString str_msg_rm_exe_fail ${LANG_JAPANESE} \
++ "$0 内の一部のファイルは削除できませんでした!$\r$\n\
++ 手動で削除する必要があります。"
++
++ #LangString str_msg_rm_root_fail ${LANG_JAPANESE} \
++ # "WARNING: Cannot remove $\"$vim_install_root$\", it is not empty!"
++
++ LangString str_msg_uninstalling ${LANG_JAPANESE} \
++ "古いバージョンをアンインストールしています..."
++
++ LangString str_msg_registering ${LANG_JAPANESE} \
++ "登録中..."
++
++ LangString str_msg_unregistering ${LANG_JAPANESE} \
++ "登録解除中..."
++
++
++ ##############################################################################
++ # Dialog Box {{{1
++ ##############################################################################
++
++ LangString str_vimrc_page_title ${LANG_JAPANESE} \
++ "_vimrc の設定を選んでください"
++ LangString str_vimrc_page_subtitle ${LANG_JAPANESE} \
++ "拡張やキーボード、マウスの設定を選んでください。"
++
++ LangString str_msg_compat_title ${LANG_JAPANESE} \
++ " Vi / Vim の動作 "
++ LangString str_msg_compat_desc ${LANG_JAPANESE} \
++ "互換性と拡張(&C)"
++ LangString str_msg_compat_vi ${LANG_JAPANESE} \
++ "Vi 互換"
++ LangString str_msg_compat_vim ${LANG_JAPANESE} \
++ "Vim 独自"
++ LangString str_msg_compat_defaults ${LANG_JAPANESE} \
++ "Vim 独自と多少の拡張 (defaults.vim を読み込み)"
++ LangString str_msg_compat_all ${LANG_JAPANESE} \
++ "Vim 独自と全ての拡張 (vimrc_example.vim を読み込み) (既定)"
++
++ LangString str_msg_keymap_title ${LANG_JAPANESE} \
++ " マッピング "
++ LangString str_msg_keymap_desc ${LANG_JAPANESE} \
++ "Windows用に一部のキーをリマップする(&R) (例: Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F など)"
++ LangString str_msg_keymap_default ${LANG_JAPANESE} \
++ "リマップしない (既定)"
++ LangString str_msg_keymap_windows ${LANG_JAPANESE} \
++ "リマップする"
++
++ LangString str_msg_mouse_title ${LANG_JAPANESE} \
++ " マウス "
++ LangString str_msg_mouse_desc ${LANG_JAPANESE} \
++ "右ボタンと左ボタンの動作(&B)"
++ LangString str_msg_mouse_default ${LANG_JAPANESE} \
++ "右:ポップアップメニュー、左:ビジュアルモード (既定)"
++ LangString str_msg_mouse_windows ${LANG_JAPANESE} \
++ "右:ポップアップメニュー、左:選択モード (Windows)"
++ LangString str_msg_mouse_unix ${LANG_JAPANESE} \
++ "右:選択を拡張、左:ビジュアルモード (Unix)"
+*** ../vim-8.1.0615/nsis/lang/simpchinese.nsi 1970-01-01 01:00:00.000000000 +0100
+--- nsis/lang/simpchinese.nsi 2018-12-21 16:18:13.326732217 +0100
+***************
+*** 0 ****
+--- 1,277 ----
++ # vi:set ts=8 sts=4 sw=4 et fdm=marker:
++ #
++ # simpchinese.nsi: Simplified Chinese language strings for gvim NSIS
++ # installer.
++ #
++ # Locale ID : 2052
++ # fileencoding : UTF-8
++ # Author : Guopeng Wen
++
++ !insertmacro MUI_LANGUAGE "SimpChinese"
++
++
++ # Overwrite the default translation.
++ # These string should be always English. Otherwise dosinst.c fails.
++ LangString ^SetupCaption ${LANG_SIMPCHINESE} \
++ "$(^Name) Setup"
++ LangString ^UninstallCaption ${LANG_SIMPCHINESE} \
++ "$(^Name) Uninstall"
++
++ ##############################################################################
++ # MUI Configuration Strings {{{1
++ ##############################################################################
++
++ #LangString str_dest_folder ${LANG_SIMPCHINESE} \
++ # "安装路径 (必须以 vim 结尾)"
++
++ LangString str_show_readme ${LANG_SIMPCHINESE} \
++ "安装完成后显示 README 文件"
++
++ # Install types:
++ LangString str_type_typical ${LANG_SIMPCHINESE} \
++ "典型安装"
++
++ LangString str_type_minimal ${LANG_SIMPCHINESE} \
++ "最小安装"
++
++ LangString str_type_full ${LANG_SIMPCHINESE} \
++ "完全安装"
++
++
++ ##############################################################################
++ # Section Titles & Description {{{1
++ ##############################################################################
++
++ LangString str_section_old_ver ${LANG_SIMPCHINESE} \
++ "卸载旧版本"
++ LangString str_desc_old_ver ${LANG_SIMPCHINESE} \
++ "卸载系统上旧版本的 Vim。"
++
++ LangString str_section_exe ${LANG_SIMPCHINESE} \
++ "安装 Vim 图形界面"
++ LangString str_desc_exe ${LANG_SIMPCHINESE} \
++ "安装 Vim 图形界面及脚本。此为必选安装。"
++
++ LangString str_section_console ${LANG_SIMPCHINESE} \
++ "安装 Vim 命令行程序"
++ LangString str_desc_console ${LANG_SIMPCHINESE} \
++ "安装 Vim 命令行程序 (vim.exe)。该程序在命令行窗口中运行。"
++
++ LangString str_section_batch ${LANG_SIMPCHINESE} \
++ "安装批处理文件"
++ LangString str_desc_batch ${LANG_SIMPCHINESE} \
++ "为 Vim 的各种变体创建批处理程序,以便在命令行下运行 Vim。"
++
++ LangString str_group_icons ${LANG_SIMPCHINESE} \
++ "创建 Vim 图标"
++ LangString str_desc_icons ${LANG_SIMPCHINESE} \
++ "为 Vim 创建若干图标,以方便使用 Vim。"
++
++ LangString str_section_desktop ${LANG_SIMPCHINESE} \
++ "在桌面上"
++ LangString str_desc_desktop ${LANG_SIMPCHINESE} \
++ "在桌面上为 Vim 创建若干图标,以方便启动 Vim。"
++
++ LangString str_section_start_menu ${LANG_SIMPCHINESE} \
++ "在启动菜单的程序菜单下"
++ LangString str_desc_start_menu ${LANG_SIMPCHINESE} \
++ "在启动菜单的程序菜单下添加 Vim 组。适用于 Windows 95 及以上版本。"
++
++ #LangString str_section_quick_launch ${LANG_SIMPCHINESE} \
++ # "在快速启动启动栏中"
++ #LangString str_desc_quick_launch ${LANG_SIMPCHINESE} \
++ # "在快速启动栏中添加 Vim 图标。"
++
++ LangString str_section_edit_with ${LANG_SIMPCHINESE} \
++ "安装快捷菜单"
++ LangString str_desc_edit_with ${LANG_SIMPCHINESE} \
++ "将 Vim 添加到“打开方式”快捷菜单中。"
++
++ #LangString str_section_edit_with32 ${LANG_SIMPCHINESE} \
++ # "32 位版本"
++ #LangString str_desc_edit_with32 ${LANG_SIMPCHINESE} \
++ # "将 Vim 添加到 32 位程序的“打开方式”快捷菜单中。"
++
++ #LangString str_section_edit_with64 ${LANG_SIMPCHINESE} \
++ # "64 位版本"
++ #LangString str_desc_edit_with64 ${LANG_SIMPCHINESE} \
++ # "将 Vim 添加到 64 位程序的“打开方式”快捷菜单中。"
++
++ LangString str_section_vim_rc ${LANG_SIMPCHINESE} \
++ "创建缺省配置文件"
++ LangString str_desc_vim_rc ${LANG_SIMPCHINESE} \
++ "在安装目录下生成缺省的 Vim 配置文件(_vimrc)。\
++ 如果该文件已经存在,则略过此项。"
++
++ LangString str_group_plugin ${LANG_SIMPCHINESE} \
++ "创建插件目录"
++ LangString str_desc_plugin ${LANG_SIMPCHINESE} \
++ "创建(空的)插件目录结构。插件目录用于安装 Vim 扩展插件,\
++ 只要将文件复制到相关的子目录中即可。"
++
++ LangString str_section_plugin_home ${LANG_SIMPCHINESE} \
++ "私有插件目录"
++ LangString str_desc_plugin_home ${LANG_SIMPCHINESE} \
++ "Create plugin directories in HOME directory."
++
++ LangString str_section_plugin_vim ${LANG_SIMPCHINESE} \
++ "公共插件目录"
++ LangString str_desc_plugin_vim ${LANG_SIMPCHINESE} \
++ "在 Vim 安装目录下创建(空的)插件目录结构,系统上所有用户都能使用安装在\
++ 该目录下的扩展插件。"
++
++ LangString str_section_vis_vim ${LANG_SIMPCHINESE} \
++ "安装 VisVim 插件"
++ LangString str_desc_vis_vim ${LANG_SIMPCHINESE} \
++ "安装用于与微软 Microsoft Visual Studio 进行集成的 VisVim 插件。"
++
++ LangString str_section_nls ${LANG_SIMPCHINESE} \
++ "安装多语言支持"
++ LangString str_desc_nls ${LANG_SIMPCHINESE} \
++ "安装用于多语言支持的文件。"
++
++ LangString str_unsection_register ${LANG_SIMPCHINESE} \
++ "删除 Vim 系统配置"
++ LangString str_desc_unregister ${LANG_SIMPCHINESE} \
++ "删除和 Vim 相关的系统配置。"
++
++ LangString str_unsection_exe ${LANG_SIMPCHINESE} \
++ "删除 Vim 执行文件以及脚本"
++ LangString str_desc_rm_exe ${LANG_SIMPCHINESE} \
++ "删除 Vim 的所有执行文件及脚本。"
++
++ LangString str_ungroup_plugin ${LANG_SIMPCHINESE} \
++ "Remove plugin directories"
++ LangString str_desc_rm_plugin ${LANG_SIMPCHINESE} \
++ "Remove the plugin directories if they are empty."
++
++ LangString str_unsection_plugin_home ${LANG_SIMPCHINESE} \
++ "私有插件目录"
++ LangString str_desc_rm_plugin_home ${LANG_SIMPCHINESE} \
++ "Remove the plugin directories from HOME directory."
++
++ LangString str_unsection_plugin_vim ${LANG_SIMPCHINESE} \
++ "公共插件目录"
++ LangString str_desc_rm_plugin_vim ${LANG_SIMPCHINESE} \
++ "Remove the plugin directories from Vim install directory."
++
++ LangString str_unsection_rootdir ${LANG_SIMPCHINESE} \
++ "Remove the Vim root directory"
++ LangString str_desc_rm_rootdir ${LANG_SIMPCHINESE} \
++ "Remove the Vim root directory. It contains your Vim configuration files!"
++
++
++ ##############################################################################
++ # Messages {{{1
++ ##############################################################################
++
++ #LangString str_msg_too_many_ver ${LANG_SIMPCHINESE} \
++ # "您的系统上安装了 $vim_old_ver_count 个不同版本的 Vim,$\r$\n\
++ # 但本安装程序最多只能处理 ${VIM_MAX_OLD_VER} 个版本。$\r$\n\
++ # 请您手工删除一些旧版本以后再运行本安装程序。"
++
++ #LangString str_msg_invalid_root ${LANG_SIMPCHINESE} \
++ # "安装路径“$vim_install_root”无效!$\r$\n\
++ # 该路径必须以 vim 结尾。"
++
++ #LangString str_msg_bin_mismatch ${LANG_SIMPCHINESE} \
++ # "Vim 执行程序安装路径异常!$\r$\n$\r$\n\
++ # 该版本 Vim 的执行程序安装路径应该是“$vim_bin_path”,$\r$\n\
++ # 而系统却指示该路径为“$INSTDIR”。"
++
++ #LangString str_msg_vim_running ${LANG_SIMPCHINESE} \
++ # "您的系统上仍有 Vim 在运行,$\r$\n\
++ # 请您在执行后续步骤前退出这些 Vim。"
++
++ #LangString str_msg_register_ole ${LANG_SIMPCHINESE} \
++ # "试图注册 Vim OLE 服务器。请注意无论成功与否都不再显示进一步的信息。"
++
++ #LangString str_msg_unreg_ole ${LANG_SIMPCHINESE} \
++ # "试图注销 Vim OLE 服务器。请注意无论成功与否都不再显示进一步的信息。"
++
++ #LangString str_msg_rm_start ${LANG_SIMPCHINESE} \
++ # "开始卸载以下版本:"
++
++ #LangString str_msg_rm_fail ${LANG_SIMPCHINESE} \
++ # "以下版本卸载失败:"
++
++ #LangString str_msg_no_rm_key ${LANG_SIMPCHINESE} \
++ # "找不到卸载程序的注册表键。"
++
++ #LangString str_msg_no_rm_reg ${LANG_SIMPCHINESE} \
++ # "在注册表中未找到卸载程序路径。"
++
++ #LangString str_msg_no_rm_exe ${LANG_SIMPCHINESE} \
++ # "找不到卸载程序。"
++
++ #LangString str_msg_rm_copy_fail ${LANG_SIMPCHINESE} \
++ # "无法将卸载程序复制到临时目录。"
++
++ #LangString str_msg_rm_run_fail ${LANG_SIMPCHINESE} \
++ # "执行卸载程序失败。"
++
++ #LangString str_msg_abort_install ${LANG_SIMPCHINESE} \
++ # "安装程序将退出。"
++
++ LangString str_msg_install_fail ${LANG_SIMPCHINESE} \
++ "安装失败。祝您下次好运。"
++
++ LangString str_msg_rm_exe_fail ${LANG_SIMPCHINESE} \
++ "目录“$0”下有部分文件删除失败!$\r$\n\
++ 您只能手工删除该目录。"
++
++ #LangString str_msg_rm_root_fail ${LANG_SIMPCHINESE} \
++ # "警告:无法删除 Vim 安装目录“$vim_install_root”,\
++ # 该目录下仍有其他文件。"
++
++ LangString str_msg_uninstalling ${LANG_SIMPCHINESE} \
++ "Uninstalling the old version..."
++
++ LangString str_msg_registering ${LANG_SIMPCHINESE} \
++ "Registering..."
++
++ LangString str_msg_unregistering ${LANG_SIMPCHINESE} \
++ "Unregistering..."
++
++
++ ##############################################################################
++ # Dialog Box {{{1
++ ##############################################################################
++
++ LangString str_vimrc_page_title ${LANG_SIMPCHINESE} \
++ "Choose _vimrc settings"
++ LangString str_vimrc_page_subtitle ${LANG_SIMPCHINESE} \
++ "Choose the settings for enhancement, keyboard and mouse."
++
++ LangString str_msg_compat_title ${LANG_SIMPCHINESE} \
++ " Vi / Vim behavior "
++ LangString str_msg_compat_desc ${LANG_SIMPCHINESE} \
++ "&Compatibility and enhancements"
++ LangString str_msg_compat_vi ${LANG_SIMPCHINESE} \
++ "Vi compatible"
++ LangString str_msg_compat_vim ${LANG_SIMPCHINESE} \
++ "Vim original"
++ LangString str_msg_compat_defaults ${LANG_SIMPCHINESE} \
++ "Vim with some enhancements (load defaults.vim)"
++ LangString str_msg_compat_all ${LANG_SIMPCHINESE} \
++ "Vim with all enhancements (load vimrc_example.vim) (Default)"
++
++ LangString str_msg_keymap_title ${LANG_SIMPCHINESE} \
++ " Mappings "
++ LangString str_msg_keymap_desc ${LANG_SIMPCHINESE} \
++ "&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
++ LangString str_msg_keymap_default ${LANG_SIMPCHINESE} \
++ "Do not remap keys (Default)"
++ LangString str_msg_keymap_windows ${LANG_SIMPCHINESE} \
++ "Remap a few keys"
++
++ LangString str_msg_mouse_title ${LANG_SIMPCHINESE} \
++ " Mouse "
++ LangString str_msg_mouse_desc ${LANG_SIMPCHINESE} \
++ "&Behavior of right and left buttons"
++ LangString str_msg_mouse_default ${LANG_SIMPCHINESE} \
++ "Right: popup menu, Left: visual mode (Default)"
++ LangString str_msg_mouse_windows ${LANG_SIMPCHINESE} \
++ "Right: popup menu, Left: select mode (Windows)"
++ LangString str_msg_mouse_unix ${LANG_SIMPCHINESE} \
++ "Right: extends selection, Left: visual mode (Unix)"
+*** ../vim-8.1.0615/nsis/lang/tradchinese.nsi 1970-01-01 01:00:00.000000000 +0100
+--- nsis/lang/tradchinese.nsi 2018-12-21 16:18:21.790674102 +0100
+***************
+*** 0 ****
+--- 1,278 ----
++ # vi:set ts=8 sts=4 sw=4 et fdm=marker:
++ #
++ # tradchinese.nsi: Traditional Chinese language strings for gvim NSIS
++ # installer.
++ #
++ # Locale ID : 1028
++ # fileencoding : UTF-8
++ # Author : Guopeng Wen
++
++ !insertmacro MUI_LANGUAGE "TradChinese"
++
++
++ # Overwrite the default translation.
++ # These string should be always English. Otherwise dosinst.c fails.
++ LangString ^SetupCaption ${LANG_TRADCHINESE} \
++ "$(^Name) Setup"
++ LangString ^UninstallCaption ${LANG_TRADCHINESE} \
++ "$(^Name) Uninstall"
++
++ ##############################################################################
++ # MUI Configuration Strings {{{1
++ ##############################################################################
++
++ #LangString str_dest_folder ${LANG_TRADCHINESE} \
++ # "安裝資料夾 (必須以 vim 結尾)"
++
++ LangString str_show_readme ${LANG_TRADCHINESE} \
++ "安裝完成後顯示 README 檔案"
++
++ # Install types:
++ LangString str_type_typical ${LANG_TRADCHINESE} \
++ "典型安裝"
++
++ LangString str_type_minimal ${LANG_TRADCHINESE} \
++ "最小安裝"
++
++ LangString str_type_full ${LANG_TRADCHINESE} \
++ "完全安裝"
++
++
++ ##############################################################################
++ # Section Titles & Description {{{1
++ ##############################################################################
++
++ LangString str_section_old_ver ${LANG_TRADCHINESE} \
++ "移除舊版本"
++ LangString str_desc_old_ver ${LANG_TRADCHINESE} \
++ "移除閣下電腦上舊版本的 Vim。"
++
++ LangString str_section_exe ${LANG_TRADCHINESE} \
++ "安裝 Vim 圖形界面程式"
++ LangString str_desc_exe ${LANG_TRADCHINESE} \
++ "安裝 Vim 圖形界面程式及腳本。此為必選安裝。"
++
++ LangString str_section_console ${LANG_TRADCHINESE} \
++ "安裝 Vim 命令行程式"
++ LangString str_desc_console ${LANG_TRADCHINESE} \
++ "安裝 Vim 命令行程式 (vim.exe)。該程式在控制臺窗口中運行。"
++
++ LangString str_section_batch ${LANG_TRADCHINESE} \
++ "安裝批次檔案"
++ LangString str_desc_batch ${LANG_TRADCHINESE} \
++ "為 Vim 的各種變體創建批次檔,以便在命令行下啟動 Vim。"
++
++ LangString str_group_icons ${LANG_TRADCHINESE} \
++ "建立 Vim 圖示"
++ LangString str_desc_icons ${LANG_TRADCHINESE} \
++ "建立若干 Vim 圖示,以便于使用 Vim。"
++
++ LangString str_section_desktop ${LANG_TRADCHINESE} \
++ "於桌面"
++ LangString str_desc_desktop ${LANG_TRADCHINESE} \
++ "建立若干 Vim 圖示於桌面上,以方便啟動 Vim。"
++
++ LangString str_section_start_menu ${LANG_TRADCHINESE} \
++ "於「開始」功能表的「程式」集"
++ LangString str_desc_start_menu ${LANG_TRADCHINESE} \
++ "在「開始」功能表的「程式」集中建立 Vim 啟動組。\
++ 適用于 Windows 95 及以上版本。"
++
++ #LangString str_section_quick_launch ${LANG_TRADCHINESE} \
++ # "於快速啟動列"
++ #LangString str_desc_quick_launch ${LANG_TRADCHINESE} \
++ # "在快速啟動列中建立 Vim 圖示。"
++
++ LangString str_section_edit_with ${LANG_TRADCHINESE} \
++ "安裝快捷選單"
++ LangString str_desc_edit_with ${LANG_TRADCHINESE} \
++ "在「打開方式」快捷選單中添加 Vim 項。"
++
++ #LangString str_section_edit_with32 ${LANG_TRADCHINESE} \
++ # "32 位元版本"
++ #LangString str_desc_edit_with32 ${LANG_TRADCHINESE} \
++ # "在 32 位元程式的「打開方式」快捷選單中添加 Vim 項。"
++
++ #LangString str_section_edit_with64 ${LANG_TRADCHINESE} \
++ # "64 位元版本"
++ #LangString str_desc_edit_with64 ${LANG_TRADCHINESE} \
++ # "在 64 位元程式的「打開方式」快捷選單中添加 Vim 項。"
++
++ LangString str_section_vim_rc ${LANG_TRADCHINESE} \
++ "建立默認設定檔"
++ LangString str_desc_vim_rc ${LANG_TRADCHINESE} \
++ "在安裝資料夾下建立默認的 Vim 設定檔(_vimrc)。\
++ 若該設定檔已經存在,則略過此項。"
++
++ LangString str_group_plugin ${LANG_TRADCHINESE} \
++ "建立插件資料夾"
++ LangString str_desc_plugin ${LANG_TRADCHINESE} \
++ "建立(空的)插件資料夾結構。插件資料夾用于安裝 Vim 的擴展插件,\
++ 只要將檔案復制到相關的子資料夾中即可。"
++
++ LangString str_section_plugin_home ${LANG_TRADCHINESE} \
++ "建立插件資料夾"
++ LangString str_desc_plugin_home ${LANG_TRADCHINESE} \
++ "Create plugin directories in HOME directory."
++
++ LangString str_section_plugin_vim ${LANG_TRADCHINESE} \
++ "建立共享插件資料夾"
++ LangString str_desc_plugin_vim ${LANG_TRADCHINESE} \
++ "在 Vim 安裝資料夾下建立(空的)插件資料夾結構,電腦上所有用戶都能使用安裝\
++ 在該資料夾里的擴展插件。"
++
++ LangString str_section_vis_vim ${LANG_TRADCHINESE} \
++ "安裝 VisVim 插件"
++ LangString str_desc_vis_vim ${LANG_TRADCHINESE} \
++ "VisVim 是用于與微軟 Microsoft Visual Studio 軟體進行整合的插件。"
++
++ LangString str_section_nls ${LANG_TRADCHINESE} \
++ "安裝本地語言支持"
++ LangString str_desc_nls ${LANG_TRADCHINESE} \
++ "安裝用于支持本地語言的檔案。"
++
++ LangString str_unsection_register ${LANG_TRADCHINESE} \
++ "移除 Vim 系統設定"
++ LangString str_desc_unregister ${LANG_TRADCHINESE} \
++ "移除與 Vim 相關的系統設定。"
++
++ LangString str_unsection_exe ${LANG_TRADCHINESE} \
++ "移除 Vim 程式及腳本"
++ LangString str_desc_rm_exe ${LANG_TRADCHINESE} \
++ "移除所有的 Vim 程式及腳本。"
++
++ LangString str_ungroup_plugin ${LANG_TRADCHINESE} \
++ "Remove plugin directories"
++ LangString str_desc_rm_plugin ${LANG_TRADCHINESE} \
++ "Remove the plugin directories if they are empty."
++
++ LangString str_unsection_plugin_home ${LANG_TRADCHINESE} \
++ "Private"
++ LangString str_desc_rm_plugin_home ${LANG_TRADCHINESE} \
++ "Remove the vimfiles directory in HOME directory."
++
++ LangString str_unsection_plugin_vim ${LANG_TRADCHINESE} \
++ "Shared"
++ LangString str_desc_rm_plugin_vim ${LANG_TRADCHINESE} \
++ "Remove the vimfiles directory in Vim install directory."
++
++ LangString str_unsection_rootdir ${LANG_TRADCHINESE} \
++ "Remove the Vim root directory"
++ LangString str_desc_rm_rootdir ${LANG_TRADCHINESE} \
++ "Remove the Vim root directory. It contains your Vim configuration files!"
++
++
++ ##############################################################################
++ # Messages {{{1
++ ##############################################################################
++
++ #LangString str_msg_too_many_ver ${LANG_TRADCHINESE} \
++ # "閣下的電腦上安裝了 $vim_old_ver_count 個不同版本的 Vim,$\r$\n\
++ # 但是本安裝程式最多只能處理 ${VIM_MAX_OLD_VER} 個版本。$\r$\n\
++ # 煩請閣下手工移除一些版本以后再運行本安裝程式。"
++
++ #LangString str_msg_invalid_root ${LANG_TRADCHINESE} \
++ # "安裝資料夾「$vim_install_root」無效!$\r$\n\
++ # 該資料夾必須以「vim」結尾。"
++
++ #LangString str_msg_bin_mismatch ${LANG_TRADCHINESE} \
++ # "Vim 執行程式安裝路徑異常!$\r$\n$\r$\n\
++ # 該版本 Vim 的執行程式安裝路徑應該是「$vim_bin_path」,$\r$\n\
++ # 而系統卻指示該路徑為「$INSTDIR」。"
++
++ #LangString str_msg_vim_running ${LANG_TRADCHINESE} \
++ # "閣下的電腦上尚有正在運行之 Vim,$\r$\n\
++ # 煩請閣下在執行后續步驟前將其全部退出。"
++
++ #LangString str_msg_register_ole ${LANG_TRADCHINESE} \
++ # "試圖注冊 Vim OLE 伺服程式。請注意不論成功與否都不再顯示進一步的信息。"
++
++ #LangString str_msg_unreg_ole ${LANG_TRADCHINESE} \
++ # "試圖注銷 Vim OLE 伺服程式。請注意不論成功與否都不再顯示進一步的信息。"
++
++ #LangString str_msg_rm_start ${LANG_TRADCHINESE} \
++ # "正移除如下版本:"
++
++ #LangString str_msg_rm_fail ${LANG_TRADCHINESE} \
++ # "以下版本移除失敗:"
++
++ #LangString str_msg_no_rm_key ${LANG_TRADCHINESE} \
++ # "找不到反安裝程式的登錄檔入口。"
++
++ #LangString str_msg_no_rm_reg ${LANG_TRADCHINESE} \
++ # "在登錄檔中未找到反安裝程式路徑。"
++
++ #LangString str_msg_no_rm_exe ${LANG_TRADCHINESE} \
++ # "找不到反安裝程式。"
++
++ #LangString str_msg_rm_copy_fail ${LANG_TRADCHINESE} \
++ # "無法將法將反安裝程式复制到臨時目錄。"
++
++ #LangString str_msg_rm_run_fail ${LANG_TRADCHINESE} \
++ # "執行反安裝程式失敗。"
++
++ #LangString str_msg_abort_install ${LANG_TRADCHINESE} \
++ # "安裝程式將退出。"
++
++ LangString str_msg_install_fail ${LANG_TRADCHINESE} \
++ "安裝失敗。預祝下次好運。"
++
++ LangString str_msg_rm_exe_fail ${LANG_TRADCHINESE} \
++ "資料夾「$0」下有部分檔案未能移除!$\r$\n\
++ 閣下只能手工移除該資料夾。"
++
++ #LangString str_msg_rm_root_fail ${LANG_TRADCHINESE} \
++ # "警告:無法刪除 Vim 安裝資料夾「$vim_install_root」,\
++ # 該資料夾下仍有其他檔案。"
++
++ LangString str_msg_uninstalling ${LANG_TRADCHINESE} \
++ "Uninstalling the old version..."
++
++ LangString str_msg_registering ${LANG_TRADCHINESE} \
++ "Registering..."
++
++ LangString str_msg_unregistering ${LANG_TRADCHINESE} \
++ "Unregistering..."
++
++
++ ##############################################################################
++ # Dialog Box {{{1
++ ##############################################################################
++
++ LangString str_vimrc_page_title ${LANG_TRADCHINESE} \
++ "Choose _vimrc settings"
++ LangString str_vimrc_page_subtitle ${LANG_TRADCHINESE} \
++ "Choose the settings for enhancement, keyboard and mouse."
++
++ LangString str_msg_compat_title ${LANG_TRADCHINESE} \
++ " Vi / Vim behavior "
++ LangString str_msg_compat_desc ${LANG_TRADCHINESE} \
++ "&Compatibility and enhancements"
++ LangString str_msg_compat_vi ${LANG_TRADCHINESE} \
++ "Vi compatible"
++ LangString str_msg_compat_vim ${LANG_TRADCHINESE} \
++ "Vim original"
++ LangString str_msg_compat_defaults ${LANG_TRADCHINESE} \
++ "Vim with some enhancements (load defaults.vim)"
++ LangString str_msg_compat_all ${LANG_TRADCHINESE} \
++ "Vim with all enhancements (load vimrc_example.vim) (Default)"
++
++ LangString str_msg_keymap_title ${LANG_TRADCHINESE} \
++ " Mappings "
++ LangString str_msg_keymap_desc ${LANG_TRADCHINESE} \
++ "&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
++ LangString str_msg_keymap_default ${LANG_TRADCHINESE} \
++ "Do not remap keys (Default)"
++ LangString str_msg_keymap_windows ${LANG_TRADCHINESE} \
++ "Remap a few keys"
++
++ LangString str_msg_mouse_title ${LANG_TRADCHINESE} \
++ " Mouse "
++ LangString str_msg_mouse_desc ${LANG_TRADCHINESE} \
++ "&Behavior of right and left buttons"
++ LangString str_msg_mouse_default ${LANG_TRADCHINESE} \
++ "Right: popup menu, Left: visual mode (Default)"
++ LangString str_msg_mouse_windows ${LANG_TRADCHINESE} \
++ "Right: popup menu, Left: select mode (Windows)"
++ LangString str_msg_mouse_unix ${LANG_TRADCHINESE} \
++ "Right: extends selection, Left: visual mode (Unix)"
+*** ../vim-8.1.0615/src/dosinst.c 2018-12-14 19:54:35.711994528 +0100
+--- src/dosinst.c 2018-12-21 16:12:48.524958008 +0100
+***************
+*** 444,455 ****
+
+ title[0] = 0;
+ GetWindowText(hwnd, title, 256);
+! if (strstr(title, "Vim ") != NULL && strstr(title, "Uninstall:") != NULL)
+ ++num_windows;
+ return TRUE;
+ }
+
+ /*
+ * Check for already installed Vims.
+ * Return non-zero when found one.
+ */
+--- 444,499 ----
+
+ title[0] = 0;
+ GetWindowText(hwnd, title, 256);
+! if (strstr(title, "Vim ") != NULL && strstr(title, " Uninstall") != NULL)
+ ++num_windows;
+ return TRUE;
+ }
+
+ /*
++ * Run the uninstaller silently.
++ */
++ static int
++ run_silent_uninstall(char *uninst_exe)
++ {
++ char vimrt_dir[BUFSIZE];
++ char temp_uninst[BUFSIZE];
++ char temp_dir[MAX_PATH];
++ char buf[BUFSIZE * 2 + 10];
++ int i;
++ DWORD tick;
++
++ strcpy(vimrt_dir, uninst_exe);
++ remove_tail(vimrt_dir);
++
++ if (!GetTempPath(sizeof(temp_dir), temp_dir))
++ return FAIL;
++
++ /* Copy the uninstaller to a temporary exe. */
++ tick = GetTickCount();
++ for (i = 0; ; i++)
++ {
++ sprintf(temp_uninst, "%s\\vimun%04X.exe", temp_dir,
++ (i + tick) & 0xFFFF);
++ if (CopyFile(uninst_exe, temp_uninst, TRUE))
++ break;
++ if (GetLastError() != ERROR_FILE_EXISTS)
++ return FAIL;
++ if (i == 65535)
++ return FAIL;
++ }
++
++ /* Run the copied uninstaller silently. */
++ if (strchr(temp_uninst, ' ') != NULL)
++ sprintf(buf, "\"%s\" /S _?=%s", temp_uninst, vimrt_dir);
++ else
++ sprintf(buf, "%s /S _?=%s", temp_uninst, vimrt_dir);
++ run_command(buf);
++
++ DeleteFile(temp_uninst);
++ return OK;
++ }
++
++ /*
+ * Check for already installed Vims.
+ * Return non-zero when found one.
+ */
+***************
+*** 469,474 ****
+--- 513,519 ----
+ DWORD value_type;
+ DWORD orig_num_keys;
+ DWORD new_num_keys;
++ DWORD allow_silent;
+ int foundone = 0;
+
+ code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, uninstall_key, 0,
+***************
+*** 495,500 ****
+--- 540,555 ----
+ local_bufsize = BUFSIZE;
+ CHECK_REG_ERROR(code);
+
++ allow_silent = 0;
++ if (skip_question)
++ {
++ DWORD varsize = sizeof(DWORD);
++
++ RegQueryValueEx(uninstall_key_handle, "AllowSilent", 0,
++ &value_type, (LPBYTE)&allow_silent,
++ &varsize);
++ }
++
+ foundone = 1;
+ printf("\n*********************************************************\n");
+ printf("Vim Install found what looks like an existing Vim version.\n");
+***************
+*** 549,593 ****
+ /* Find existing .bat files before deleting them. */
+ find_bat_exe(TRUE);
+
+! /* Execute the uninstall program. Put it in double
+! * quotes if there is an embedded space. */
+! {
+! char buf[BUFSIZE];
+!
+! if (strchr(temp_string_buffer, ' ') != NULL)
+! sprintf(buf, "\"%s\"", temp_string_buffer);
+! else
+! strcpy(buf, temp_string_buffer);
+! run_command(buf);
+! }
+!
+! /* Count the number of windows with a title that match
+! * the installer, so that we can check when it's done.
+! * The uninstaller copies itself, executes the copy
+! * and exits, thus we can't wait for the process to
+! * finish. */
+! sleep(1); /* wait for uninstaller to start up */
+! num_windows = 0;
+! EnumWindows(window_cb, 0);
+! if (num_windows == 0)
+ {
+! /* Did not find the uninstaller, ask user to press
+! * Enter when done. Just in case. */
+! printf("Press Enter when the uninstaller is finished\n");
+! rewind(stdin);
+! (void)getchar();
+ }
+! else
+ {
+! printf("Waiting for the uninstaller to finish (press CTRL-C to abort).");
+! do
+ {
+! 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");
+
+--- 604,657 ----
+ /* Find existing .bat files before deleting them. */
+ find_bat_exe(TRUE);
+
+! if (allow_silent)
+ {
+! if (run_silent_uninstall(temp_string_buffer)
+! == FAIL)
+! allow_silent = 0; /* Retry with non silent. */
+ }
+! if (!allow_silent)
+ {
+! /* Execute the uninstall program. Put it in double
+! * quotes if there is an embedded space. */
+! {
+! char buf[BUFSIZE];
+!
+! if (strchr(temp_string_buffer, ' ') != NULL)
+! sprintf(buf, "\"%s\"", temp_string_buffer);
+! else
+! strcpy(buf, temp_string_buffer);
+! run_command(buf);
+! }
+!
+! /* Count the number of windows with a title that match
+! * the installer, so that we can check when it's done.
+! * The uninstaller copies itself, executes the copy
+! * and exits, thus we can't wait for the process to
+! * finish. */
+! sleep(1); /* wait for uninstaller to start up */
+! num_windows = 0;
+! EnumWindows(window_cb, 0);
+! if (num_windows == 0)
+! {
+! /* Did not find the uninstaller, ask user to press
+! * Enter when done. Just in case. */
+! printf("Press Enter when the uninstaller is finished\n");
+! rewind(stdin);
+! (void)getchar();
+! }
+! else
+ {
+! printf("Waiting for the uninstaller to finish (press CTRL-C to abort).");
+! do
+! {
+! 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");
+
+***************
+*** 1609,1615 ****
+ }
+
+ printf("Creating an uninstall entry\n");
+! sprintf(display_name, "Vim " VIM_VERSION_SHORT);
+
+ /* For the NSIS installer use the generated uninstaller. */
+ if (interactive)
+--- 1673,1683 ----
+ }
+
+ printf("Creating an uninstall entry\n");
+! sprintf(display_name, "Vim " VIM_VERSION_SHORT
+! #ifdef _WIN64
+! " (x64)"
+! #endif
+! );
+
+ /* For the NSIS installer use the generated uninstaller. */
+ if (interactive)
+*** ../vim-8.1.0615/src/version.c 2018-12-21 16:04:16.324437435 +0100
+--- src/version.c 2018-12-21 16:20:01.809987067 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 616,
+ /**/
+
+--
+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.0617 b/data/vim/patches/8.1.0617
new file mode 100644
index 000000000..de4edf6b5
--- /dev/null
+++ b/data/vim/patches/8.1.0617
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0617
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0617 (after 8.1.0616)
+Problem: NSIS installer gets two files from the wrong directory.
+Solution: Change ${VIMRT} to "..\".
+Files: nsis/gvim.nsi
+
+
+*** ../vim-8.1.0616/nsis/gvim.nsi 2018-12-21 16:21:50.529239692 +0100
+--- nsis/gvim.nsi 2018-12-21 17:37:21.972800533 +0100
+***************
+*** 327,334 ****
+ File ${VIMSRC}\vimrun.exe
+ File /oname=tee.exe ${VIMSRC}\teew32.exe
+ File /oname=xxd.exe ${VIMSRC}\xxdw32.exe
+! File ${VIMRT}\vimtutor.bat
+! File ${VIMRT}\README.txt
+ File ..\uninstal.txt
+ File ${VIMRT}\*.vim
+ File ${VIMRT}\rgb.txt
+--- 327,334 ----
+ File ${VIMSRC}\vimrun.exe
+ File /oname=tee.exe ${VIMSRC}\teew32.exe
+ File /oname=xxd.exe ${VIMSRC}\xxdw32.exe
+! File ..\vimtutor.bat
+! File ..\README.txt
+ File ..\uninstal.txt
+ File ${VIMRT}\*.vim
+ File ${VIMRT}\rgb.txt
+*** ../vim-8.1.0616/src/version.c 2018-12-21 16:21:50.537239636 +0100
+--- src/version.c 2018-12-21 17:56:09.789466679 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 617,
+ /**/
+
+--
+To define recursion, we must first define recursion.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0618 b/data/vim/patches/8.1.0618
new file mode 100644
index 000000000..c3da9a41b
--- /dev/null
+++ b/data/vim/patches/8.1.0618
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0618
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0618
+Problem: term_getjob() does not return v:null as documented.
+Solution: Do return v:null. (Damien) Add a test.
+Files: src/terminal.c, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0617/src/terminal.c 2018-12-21 16:04:16.316437487 +0100
+--- src/terminal.c 2018-12-21 20:45:39.984928633 +0100
+***************
+*** 4794,4804 ****
+ {
+ buf_T *buf = term_get_buf(argvars, "term_getjob()");
+
+- rettv->v_type = VAR_JOB;
+- rettv->vval.v_job = NULL;
+ if (buf == NULL)
+ return;
+
+ rettv->vval.v_job = buf->b_term->tl_job;
+ if (rettv->vval.v_job != NULL)
+ ++rettv->vval.v_job->jv_refcount;
+--- 4794,4807 ----
+ {
+ buf_T *buf = term_get_buf(argvars, "term_getjob()");
+
+ if (buf == NULL)
++ {
++ rettv->v_type = VAR_SPECIAL;
++ rettv->vval.v_number = VVAL_NULL;
+ return;
++ }
+
++ rettv->v_type = VAR_JOB;
+ rettv->vval.v_job = buf->b_term->tl_job;
+ if (rettv->vval.v_job != NULL)
+ ++rettv->vval.v_job->jv_refcount;
+*** ../vim-8.1.0617/src/testdir/test_terminal.vim 2018-12-16 16:16:05.384854629 +0100
+--- src/testdir/test_terminal.vim 2018-12-21 20:44:48.205306549 +0100
+***************
+*** 1714,1716 ****
+--- 1714,1721 ----
+ call Stop_shell_in_terminal(bufnr)
+ exe bufnr . 'bwipe'
+ endfunc
++
++ func Test_terminal_no_job()
++ let term = term_start('false', {'term_finish': 'close'})
++ call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) })
++ endfunc
+*** ../vim-8.1.0617/src/version.c 2018-12-21 17:59:30.100109769 +0100
+--- src/version.c 2018-12-21 20:55:03.092853384 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 618,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+37. You start looking for hot HTML addresses in public restrooms.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0619 b/data/vim/patches/8.1.0619
new file mode 100644
index 000000000..e3a5293af
--- /dev/null
+++ b/data/vim/patches/8.1.0619
@@ -0,0 +1,272 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0619
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0619
+Problem: :echomsg and :echoerr do not handle List and Dict like :echo does.
+ (Daniel Hahler)
+Solution: Be more tolerant about the expression result type.
+Files: src/eval.c, src/proto/eval.pro, src/evalfunc.c,
+ src/proto/evalfunc.pro, runtime/doc/eval.txt,
+ src/testdir/test_messages.vim, src/message.c
+
+
+*** ../vim-8.1.0618/src/eval.c 2018-12-21 16:04:16.312437516 +0100
+--- src/eval.c 2018-12-22 12:25:00.231184150 +0100
+***************
+*** 7163,7168 ****
+--- 7163,7192 ----
+ }
+
+ /*
++ * Turn a typeval into a string. Similar to tv_get_string_buf() but uses
++ * string() on Dict, List, etc.
++ */
++ char_u *
++ tv_stringify(typval_T *varp, char_u *buf)
++ {
++ if (varp->v_type == VAR_LIST
++ || varp->v_type == VAR_DICT
++ || varp->v_type == VAR_FUNC
++ || varp->v_type == VAR_PARTIAL
++ || varp->v_type == VAR_FLOAT)
++ {
++ typval_T tmp;
++
++ f_string(varp, &tmp);
++ tv_get_string_buf(&tmp, buf);
++ clear_tv(varp);
++ *varp = tmp;
++ return tmp.vval.v_string;
++ }
++ return tv_get_string_buf(varp, buf);
++ }
++
++ /*
+ * Find variable "name" in the list of variables.
+ * Return a pointer to it if found, NULL if not found.
+ * Careful: "a:0" variables don't have a name.
+***************
+*** 8142,8148 ****
+
+ if (!eap->skip)
+ {
+! p = tv_get_string(&rettv);
+ len = (int)STRLEN(p);
+ if (ga_grow(&ga, len + 2) == FAIL)
+ {
+--- 8166,8177 ----
+
+ if (!eap->skip)
+ {
+! char_u buf[NUMBUFLEN];
+!
+! if (eap->cmdidx == CMD_execute)
+! p = tv_get_string_buf(&rettv, buf);
+! else
+! p = tv_stringify(&rettv, buf);
+ len = (int)STRLEN(p);
+ if (ga_grow(&ga, len + 2) == FAIL)
+ {
+*** ../vim-8.1.0618/src/proto/eval.pro 2018-12-21 16:04:16.312437516 +0100
+--- src/proto/eval.pro 2018-12-22 12:17:39.702552883 +0100
+***************
+*** 89,94 ****
+--- 89,95 ----
+ char_u *tv_get_string_buf(typval_T *varp, char_u *buf);
+ char_u *tv_get_string_chk(typval_T *varp);
+ char_u *tv_get_string_buf_chk(typval_T *varp, char_u *buf);
++ char_u *tv_stringify(typval_T *varp, char_u *buf);
+ dictitem_T *find_var(char_u *name, hashtab_T **htp, int no_autoload);
+ dictitem_T *find_var_in_ht(hashtab_T *ht, int htname, char_u *varname, int no_autoload);
+ hashtab_T *find_var_ht(char_u *name, char_u **varname);
+*** ../vim-8.1.0618/src/evalfunc.c 2018-12-21 16:04:16.316437487 +0100
+--- src/evalfunc.c 2018-12-22 12:18:56.357958445 +0100
+***************
+*** 396,402 ****
+ #endif
+ static void f_strgetchar(typval_T *argvars, typval_T *rettv);
+ static void f_stridx(typval_T *argvars, typval_T *rettv);
+- static void f_string(typval_T *argvars, typval_T *rettv);
+ static void f_strlen(typval_T *argvars, typval_T *rettv);
+ static void f_strcharpart(typval_T *argvars, typval_T *rettv);
+ static void f_strpart(typval_T *argvars, typval_T *rettv);
+--- 396,401 ----
+***************
+*** 12475,12481 ****
+ /*
+ * "string()" function
+ */
+! static void
+ f_string(typval_T *argvars, typval_T *rettv)
+ {
+ char_u *tofree;
+--- 12474,12480 ----
+ /*
+ * "string()" function
+ */
+! void
+ f_string(typval_T *argvars, typval_T *rettv)
+ {
+ char_u *tofree;
+*** ../vim-8.1.0618/src/proto/evalfunc.pro 2018-05-17 13:52:33.000000000 +0200
+--- src/proto/evalfunc.pro 2018-12-22 12:19:00.705924858 +0100
+***************
+*** 9,14 ****
+--- 9,15 ----
+ void mzscheme_call_vim(char_u *name, typval_T *args, typval_T *rettv);
+ float_T vim_round(float_T f);
+ long do_searchpair(char_u *spat, char_u *mpat, char_u *epat, int dir, typval_T *skip, int flags, pos_T *match_pos, linenr_T lnum_stop, long time_limit);
++ void f_string(typval_T *argvars, typval_T *rettv);
+ char_u *get_callback(typval_T *arg, partial_T **pp);
+ void free_callback(char_u *callback, partial_T *partial);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0618/runtime/doc/eval.txt 2018-12-21 15:16:57.475579814 +0100
+--- runtime/doc/eval.txt 2018-12-22 13:13:03.694052571 +0100
+***************
+*** 9214,9220 ****
+ error with try/catch cannot be used (because it skips over
+ following code).
+ {expr} is used literally, not as a pattern.
+! There is currently no way to revert this.
+
+ test_null_channel() *test_null_channel()*
+ Return a Channel that is null. Only useful for testing.
+--- 9233,9240 ----
+ error with try/catch cannot be used (because it skips over
+ following code).
+ {expr} is used literally, not as a pattern.
+! When the {expr} is the string "RESET" then the list of ignored
+! errors is made empty.
+
+ test_null_channel() *test_null_channel()*
+ Return a Channel that is null. Only useful for testing.
+***************
+*** 10978,10985 ****
+ The parsing works slightly different from |:echo|,
+ more like |:execute|. All the expressions are first
+ evaluated and concatenated before echoing anything.
+! The expressions must evaluate to a Number or String, a
+! Dictionary or List causes an error.
+ Uses the highlighting set by the |:echohl| command.
+ Example: >
+ :echomsg "It's a Zizzer Zazzer Zuzz, as you can plainly see."
+--- 11000,11007 ----
+ The parsing works slightly different from |:echo|,
+ more like |:execute|. All the expressions are first
+ evaluated and concatenated before echoing anything.
+! If expressions does not evaluate to a Number or
+! String, string() is used to turn it into a string.
+ Uses the highlighting set by the |:echohl| command.
+ Example: >
+ :echomsg "It's a Zizzer Zazzer Zuzz, as you can plainly see."
+***************
+*** 10990,10996 ****
+ message in the |message-history|. When used in a
+ script or function the line number will be added.
+ Spaces are placed between the arguments as with the
+! :echo command. When used inside a try conditional,
+ the message is raised as an error exception instead
+ (see |try-echoerr|).
+ Example: >
+--- 11012,11018 ----
+ message in the |message-history|. When used in a
+ script or function the line number will be added.
+ Spaces are placed between the arguments as with the
+! |:echomsg| command. When used inside a try conditional,
+ the message is raised as an error exception instead
+ (see |try-echoerr|).
+ Example: >
+*** ../vim-8.1.0618/src/testdir/test_messages.vim 2018-12-02 14:55:04.904731741 +0100
+--- src/testdir/test_messages.vim 2018-12-22 13:16:02.344747032 +0100
+***************
+*** 1,4 ****
+! " Tests for :messages
+
+ function Test_messages()
+ let oldmore = &more
+--- 1,4 ----
+! " Tests for :messages, :echomsg, :echoerr
+
+ function Test_messages()
+ let oldmore = &more
+***************
+*** 64,66 ****
+--- 64,94 ----
+ call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"message clear', @:)
+ endfunc
++
++ func Test_echomsg()
++ call assert_equal("\nhello", execute(':echomsg "hello"'))
++ call assert_equal("\n", execute(':echomsg ""'))
++ call assert_equal("\n12345", execute(':echomsg 12345'))
++ call assert_equal("\n[]", execute(':echomsg []'))
++ call assert_equal("\n[1, 2, 3]", execute(':echomsg [1, 2, 3]'))
++ call assert_equal("\n{}", execute(':echomsg {}'))
++ call assert_equal("\n{'a': 1, 'b': 2}", execute(':echomsg {"a": 1, "b": 2}'))
++ if has('float')
++ call assert_equal("\n1.23", execute(':echomsg 1.23'))
++ endif
++ call assert_match("function('<lambda>\\d*')", execute(':echomsg {-> 1234}'))
++ endfunc
++
++ func Test_echoerr()
++ call test_ignore_error('IgNoRe')
++ call assert_equal("\nIgNoRe hello", execute(':echoerr "IgNoRe hello"'))
++ call assert_equal("\n12345 IgNoRe", execute(':echoerr 12345 "IgNoRe"'))
++ call assert_equal("\n[1, 2, 'IgNoRe']", execute(':echoerr [1, 2, "IgNoRe"]'))
++ call assert_equal("\n{'IgNoRe': 2, 'a': 1}", execute(':echoerr {"a": 1, "IgNoRe": 2}'))
++ if has('float')
++ call assert_equal("\n1.23 IgNoRe", execute(':echoerr 1.23 "IgNoRe"'))
++ endif
++ call test_ignore_error('<lambda>')
++ call assert_match("function('<lambda>\\d*')", execute(':echoerr {-> 1234}'))
++ call test_ignore_error('RESET')
++ endfunc
+*** ../vim-8.1.0618/src/message.c 2018-12-21 16:04:16.316437487 +0100
+--- src/message.c 2018-12-22 13:13:16.209961171 +0100
+***************
+*** 553,559 ****
+ if (ignore_error_list.ga_itemsize == 0)
+ ga_init2(&ignore_error_list, sizeof(char_u *), 1);
+
+! ga_add_string(&ignore_error_list, error);
+ }
+
+ static int
+--- 553,562 ----
+ if (ignore_error_list.ga_itemsize == 0)
+ ga_init2(&ignore_error_list, sizeof(char_u *), 1);
+
+! if (STRCMP("RESET", error) == 0)
+! ga_clear_strings(&ignore_error_list);
+! else
+! ga_add_string(&ignore_error_list, error);
+ }
+
+ static int
+*** ../vim-8.1.0618/src/version.c 2018-12-21 20:55:18.892739645 +0100
+--- src/version.c 2018-12-22 13:16:38.876479919 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 619,
+ /**/
+
+--
+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.0620 b/data/vim/patches/8.1.0620
new file mode 100644
index 000000000..50f614317
--- /dev/null
+++ b/data/vim/patches/8.1.0620
@@ -0,0 +1,78 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0620
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0620
+Problem: Overuling CONF_ARGS from the environment no longer works. (Tony
+ Mechelynck)
+Solution: Do not define any CONF_ARGS by default.
+Files: src/Makefile
+
+
+*** ../vim-8.1.0619/src/Makefile 2018-12-21 11:48:48.324680461 +0100
+--- src/Makefile 2018-12-22 14:56:51.415425263 +0100
+***************
+*** 323,332 ****
+ #CONF_ARGS3 = --with-global-runtime=/etc/vim,/usr/share/vim
+ #CONF_ARGS4 = --with-local-dir=/usr/share
+ #CONF_ARGS5 = --without-local-dir
+- CONF_ARGS = $(CONF_ARGS1) $(CONF_ARGS2) $(CONF_ARGS3) $(CONF_ARGS4) $(CONF_ARGS5)
+
+ # Use this one if you distribute a modified version of Vim.
+! #CONF_ARGS = --with-modified-by="John Doe"
+
+ # GUI - For creating Vim with GUI (gvim) (B)
+ # Uncomment this line when you don't want to get the GUI version, although you
+--- 323,331 ----
+ #CONF_ARGS3 = --with-global-runtime=/etc/vim,/usr/share/vim
+ #CONF_ARGS4 = --with-local-dir=/usr/share
+ #CONF_ARGS5 = --without-local-dir
+
+ # Use this one if you distribute a modified version of Vim.
+! #CONF_ARGS6 = --with-modified-by="John Doe"
+
+ # GUI - For creating Vim with GUI (gvim) (B)
+ # Uncomment this line when you don't want to get the GUI version, although you
+***************
+*** 1933,1939 ****
+ $(CONF_OPT_FEAT) $(CONF_TERM_LIB) \
+ $(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
+ $(CONF_OPT_CHANNEL) $(CONF_OPT_TERMINAL) \
+! $(CONF_ARGS) $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
+ $(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \
+ $(CONF_OPT_SYSMOUSE); \
+ fi
+--- 1934,1942 ----
+ $(CONF_OPT_FEAT) $(CONF_TERM_LIB) \
+ $(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
+ $(CONF_OPT_CHANNEL) $(CONF_OPT_TERMINAL) \
+! $(CONF_ARGS1) $(CONF_ARGS2) $(CONF_ARGS3) $(CONF_ARGS4) \
+! $(CONF_ARGS5) $(CONF_ARGS6) \
+! $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
+ $(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \
+ $(CONF_OPT_SYSMOUSE); \
+ fi
+*** ../vim-8.1.0619/src/version.c 2018-12-22 13:27:59.119503967 +0100
+--- src/version.c 2018-12-22 14:58:08.474835913 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 620,
+ /**/
+
+--
+Micro$oft: where do you want to go today?
+ Linux: where do you want to go tomorrow?
+ FreeBSD: are you guys coming, or what?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0621 b/data/vim/patches/8.1.0621
new file mode 100644
index 000000000..0c2a9594c
--- /dev/null
+++ b/data/vim/patches/8.1.0621
@@ -0,0 +1,121 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0621
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0621
+Problem: Terminal debugger does not handle unexpected debugger exit.
+Solution: Check for debugger job ended and close unused buffers. (Damien)
+Files: runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+
+
+*** ../vim-8.1.0620/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim 2018-12-09 15:52:57.091463593 +0100
+--- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim 2018-12-22 15:10:55.681015048 +0100
+***************
+*** 142,147 ****
+--- 142,154 ----
+ endif
+ endfunc
+
++ " Use when debugger didn't start or ended.
++ func s:CloseBuffers()
++ exe 'bwipe! ' . s:ptybuf
++ exe 'bwipe! ' . s:commbuf
++ unlet! s:gdbwin
++ endfunc
++
+ func s:StartDebug_term(dict)
+ " Open a terminal window without a job, to run the debugged program in.
+ let s:ptybuf = term_start('NONE', {
+***************
+*** 181,193 ****
+ 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
+! exe 'bwipe! ' . s:commbuf
+ return
+ endif
+ let s:gdbwin = win_getid(winnr())
+--- 188,198 ----
+ let cmd = [g:termdebugger, '-quiet', '-tty', pty] + gdb_args
+ call ch_log('executing "' . join(cmd) . '"')
+ let s:gdbbuf = term_start(cmd, {
+ \ 'term_finish': 'close',
+ \ })
+ if s:gdbbuf == 0
+ echoerr 'Failed to open the gdb terminal window'
+! call s:CloseBuffers()
+ return
+ endif
+ let s:gdbwin = win_getid(winnr())
+***************
+*** 204,209 ****
+--- 209,221 ----
+ " why the debugger doesn't work.
+ let try_count = 0
+ while 1
++ let gdbproc = term_getjob(s:gdbbuf)
++ if gdbproc == v:null || job_status(gdbproc) !=# 'run'
++ echoerr string(g:termdebugger) . ' exited unexpectedly'
++ call s:CloseBuffers()
++ return
++ endif
++
+ let response = ''
+ for lnum in range(1,200)
+ if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi '
+***************
+*** 211,218 ****
+ 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'
+--- 223,229 ----
+ 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'
+! call s:CloseBuffers()
+ return
+ endif
+ if response =~ 'New UI allocated'
+***************
+*** 243,248 ****
+--- 254,260 ----
+ " "Type <return> to continue" prompt.
+ call s:SendCommand('set pagination off')
+
++ call job_setoptions(gdbproc, {'exit_cb': function('s:EndTermDebug')})
+ call s:StartDebugCommon(a:dict)
+ endfunc
+
+*** ../vim-8.1.0620/src/version.c 2018-12-22 14:58:58.750451917 +0100
+--- src/version.c 2018-12-22 15:14:08.407563485 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 621,
+ /**/
+
+--
+A day without sunshine is like, well, 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.0622 b/data/vim/patches/8.1.0622
new file mode 100644
index 000000000..06fce113f
--- /dev/null
+++ b/data/vim/patches/8.1.0622
@@ -0,0 +1,176 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0622
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0622
+Problem: Adding quickfix items marks items as valid errors. (Daniel Hahler)
+Solution: Check when items are valid. (Yegappan Lakshmanan, closes #3683,
+ closes #3633)
+Files: src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0621/src/quickfix.c 2018-12-14 15:38:28.331597637 +0100
+--- src/quickfix.c 2018-12-22 16:42:35.335504536 +0100
+***************
+*** 6241,6254 ****
+
+ /*
+ * 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;
+--- 6241,6256 ----
+
+ /*
+ * Add a new quickfix entry to list at 'qf_idx' in the stack 'qi' from the
+! * items in the dict 'd'. If it is a valid error entry, then set 'valid_entry'
+! * to TRUE.
+ */
+ static int
+ qf_add_entry_from_dict(
+ qf_info_T *qi,
+ int qf_idx,
+ dict_T *d,
+! int first_entry,
+! int *valid_entry)
+ {
+ static int did_bufnr_emsg;
+ char_u *filename, *module, *pattern, *text, *type;
+***************
+*** 6313,6318 ****
+--- 6315,6323 ----
+ vim_free(text);
+ vim_free(type);
+
++ if (valid)
++ *valid_entry = TRUE;
++
+ return status;
+ }
+
+***************
+*** 6333,6338 ****
+--- 6338,6344 ----
+ dict_T *d;
+ qfline_T *old_last = NULL;
+ int retval = OK;
++ int valid_entry = FALSE;
+
+ if (action == ' ' || qf_idx == qi->qf_listcount)
+ {
+***************
+*** 6359,6380 ****
+ if (d == NULL)
+ continue;
+
+! retval = qf_add_entry_from_dict(qi, qf_idx, d, li == list->lv_first);
+ if (retval == FAIL)
+ 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
+ qf_update_buffer(qi, old_last);
+--- 6365,6391 ----
+ if (d == NULL)
+ continue;
+
+! retval = qf_add_entry_from_dict(qi, qf_idx, d, li == list->lv_first,
+! &valid_entry);
+ if (retval == FAIL)
+ break;
+ }
+
+! // Check if any valid error entries are added to the list.
+! if (valid_entry)
+! qfl->qf_nonevalid = FALSE;
+! else if (qfl->qf_index == 0)
+ // no valid entry
+ qfl->qf_nonevalid = TRUE;
+!
+! // If not appending to the list, set the current error to the first entry
+ if (action != 'a')
+ qfl->qf_ptr = qfl->qf_start;
+!
+! // Update the current error index if not appending to the list or if the
+! // list was empty before and it is not empty now.
+! if ((action != 'a' || qfl->qf_index == 0) && !qf_list_empty(qi, qf_idx))
+! qfl->qf_index = 1;
+
+ // Don't update the cursor in quickfix window when appending entries
+ qf_update_buffer(qi, old_last);
+*** ../vim-8.1.0621/src/testdir/test_quickfix.vim 2018-11-11 22:50:20.810297803 +0100
+--- src/testdir/test_quickfix.vim 2018-12-22 16:42:35.335504536 +0100
+***************
+*** 1299,1304 ****
+--- 1299,1326 ----
+ let l = g:Xgetlist()
+ call g:Xsetlist(l)
+ call assert_equal(0, g:Xgetlist()[0].valid)
++ " Adding a non-valid entry should not mark the list as having valid entries
++ call g:Xsetlist([{'bufnr':a:bnum, 'lnum':5, 'valid':0}], 'a')
++ Xwindow
++ call assert_equal(1, winnr('$'))
++
++ " :cnext/:cprev should still work even with invalid entries in the list
++ let l = [{'bufnr' : a:bnum, 'lnum' : 1, 'text' : '1', 'valid' : 0},
++ \ {'bufnr' : a:bnum, 'lnum' : 2, 'text' : '2', 'valid' : 0}]
++ call g:Xsetlist(l)
++ Xnext
++ call assert_equal(2, g:Xgetlist({'idx' : 0}).idx)
++ Xprev
++ call assert_equal(1, g:Xgetlist({'idx' : 0}).idx)
++ " :cnext/:cprev should still work after appending invalid entries to an
++ " empty list
++ call g:Xsetlist([])
++ call g:Xsetlist(l, 'a')
++ Xnext
++ call assert_equal(2, g:Xgetlist({'idx' : 0}).idx)
++ Xprev
++ call assert_equal(1, g:Xgetlist({'idx' : 0}).idx)
++
+ call g:Xsetlist([{'text':'Text1', 'valid':1}])
+ Xwindow
+ call assert_equal(2, winnr('$'))
+*** ../vim-8.1.0621/src/version.c 2018-12-22 15:14:45.587283340 +0100
+--- src/version.c 2018-12-22 16:45:12.206329187 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 622,
+ /**/
+
+--
+The users that I support would double-click on a landmine to find out
+what happens. -- A system administrator
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0623 b/data/vim/patches/8.1.0623
new file mode 100644
index 000000000..fc2657d72
--- /dev/null
+++ b/data/vim/patches/8.1.0623
@@ -0,0 +1,634 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0623
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0623
+Problem: Iterating through window frames is repeated.
+Solution: Define FOR_ALL_FRAMES. (Yegappan Lakshmanan)
+Files: src/ex_docmd.c, src/globals.h, src/screen.c, src/window.c
+
+
+*** ../vim-8.1.0622/src/ex_docmd.c 2018-12-16 16:30:17.810717978 +0100
+--- src/ex_docmd.c 2018-12-22 17:01:06.186531011 +0100
+***************
+*** 11688,11694 ****
+ {
+ frame_T *frc;
+
+! for (frc = fr; frc != NULL; frc = frc->fr_next)
+ if (ses_do_frame(frc))
+ break;
+ return frc;
+--- 11688,11694 ----
+ {
+ frame_T *frc;
+
+! FOR_ALL_FRAMES(frc, fr)
+ if (ses_do_frame(frc))
+ break;
+ return frc;
+***************
+*** 11705,11711 ****
+
+ if (fr->fr_layout == FR_LEAF)
+ return ses_do_win(fr->fr_win);
+! for (frc = fr->fr_child; frc != NULL; frc = frc->fr_next)
+ if (ses_do_frame(frc))
+ return TRUE;
+ return FALSE;
+--- 11705,11711 ----
+
+ if (fr->fr_layout == FR_LEAF)
+ return ses_do_win(fr->fr_win);
+! FOR_ALL_FRAMES(frc, fr->fr_child)
+ if (ses_do_frame(frc))
+ return TRUE;
+ return FALSE;
+*** ../vim-8.1.0622/src/globals.h 2018-12-21 15:16:57.479579788 +0100
+--- src/globals.h 2018-12-22 17:01:06.186531011 +0100
+***************
+*** 564,569 ****
+--- 564,571 ----
+ # define ONE_WINDOW (firstwin == lastwin)
+ # define W_NEXT(wp) ((wp)->w_next)
+ # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
++ # define FOR_ALL_FRAMES(frp, first_frame) \
++ for (frp = first_frame; frp != NULL; frp = frp->fr_next)
+ # define FOR_ALL_TABPAGES(tp) for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
+ # define FOR_ALL_WINDOWS_IN_TAB(tp, wp) \
+ for ((wp) = ((tp) == NULL || (tp) == curtab) \
+*** ../vim-8.1.0622/src/screen.c 2018-12-13 22:17:52.881941445 +0100
+--- src/screen.c 2018-12-22 17:01:06.186531011 +0100
+***************
+*** 6681,6687 ****
+ frp->fr_win->w_redr_status = TRUE;
+ else if (frp->fr_layout == FR_ROW)
+ {
+! for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ win_redraw_last_status(frp);
+ }
+ else /* frp->fr_layout == FR_COL */
+--- 6681,6687 ----
+ frp->fr_win->w_redr_status = TRUE;
+ else if (frp->fr_layout == FR_ROW)
+ {
+! FOR_ALL_FRAMES(frp, frp->fr_child)
+ win_redraw_last_status(frp);
+ }
+ else /* frp->fr_layout == FR_COL */
+*** ../vim-8.1.0622/src/window.c 2018-12-21 16:04:16.320437461 +0100
+--- src/window.c 2018-12-22 17:01:06.186531011 +0100
+***************
+*** 836,843 ****
+ frp = frp->fr_parent)
+ {
+ if (frp->fr_layout == FR_ROW)
+! for (frp2 = frp->fr_child; frp2 != NULL;
+! frp2 = frp2->fr_next)
+ if (frp2 != prevfrp)
+ minwidth += frame_minwidth(frp2, NOWIN);
+ prevfrp = frp;
+--- 836,842 ----
+ frp = frp->fr_parent)
+ {
+ if (frp->fr_layout == FR_ROW)
+! FOR_ALL_FRAMES(frp2, frp->fr_child)
+ if (frp2 != prevfrp)
+ minwidth += frame_minwidth(frp2, NOWIN);
+ prevfrp = frp;
+***************
+*** 920,927 ****
+ frp = frp->fr_parent)
+ {
+ if (frp->fr_layout == FR_COL)
+! for (frp2 = frp->fr_child; frp2 != NULL;
+! frp2 = frp2->fr_next)
+ if (frp2 != prevfrp)
+ minheight += frame_minheight(frp2, NOWIN);
+ prevfrp = frp;
+--- 919,925 ----
+ frp = frp->fr_parent)
+ {
+ if (frp->fr_layout == FR_COL)
+! FOR_ALL_FRAMES(frp2, frp->fr_child)
+ if (frp2 != prevfrp)
+ minheight += frame_minheight(frp2, NOWIN);
+ prevfrp = frp;
+***************
+*** 1078,1084 ****
+ if (frp->fr_win != NULL)
+ oldwin->w_frame = frp;
+ else
+! for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ frp->fr_parent = curfrp;
+ }
+
+--- 1076,1082 ----
+ if (frp->fr_win != NULL)
+ oldwin->w_frame = frp;
+ else
+! FOR_ALL_FRAMES(frp, frp->fr_child)
+ frp->fr_parent = curfrp;
+ }
+
+***************
+*** 1605,1612 ****
+ #endif
+
+ /* Check if all frames in this row/col have one window. */
+! for (frp = curwin->w_frame->fr_parent->fr_child; frp != NULL;
+! frp = frp->fr_next)
+ if (frp->fr_win == NULL)
+ {
+ EMSG(_("E443: Cannot rotate when another window is split"));
+--- 1603,1609 ----
+ #endif
+
+ /* Check if all frames in this row/col have one window. */
+! FOR_ALL_FRAMES(frp, curwin->w_frame->fr_parent->fr_child)
+ if (frp->fr_win == NULL)
+ {
+ EMSG(_("E443: Cannot rotate when another window is split"));
+***************
+*** 1856,1862 ****
+ else
+ {
+ next_curwin_size = -1;
+! for (fr = topfr->fr_child; fr != NULL; fr = fr->fr_next)
+ {
+ /* If 'winfixwidth' set keep the window width if
+ * possible.
+--- 1853,1859 ----
+ else
+ {
+ next_curwin_size = -1;
+! FOR_ALL_FRAMES(fr, topfr->fr_child)
+ {
+ /* If 'winfixwidth' set keep the window width if
+ * possible.
+***************
+*** 1909,1915 ****
+ --totwincount; /* don't count curwin */
+ }
+
+! for (fr = topfr->fr_child; fr != NULL; fr = fr->fr_next)
+ {
+ wincount = 1;
+ if (fr->fr_next == NULL)
+--- 1906,1912 ----
+ --totwincount; /* don't count curwin */
+ }
+
+! FOR_ALL_FRAMES(fr, topfr->fr_child)
+ {
+ wincount = 1;
+ if (fr->fr_next == NULL)
+***************
+*** 1997,2003 ****
+ else
+ {
+ next_curwin_size = -1;
+! for (fr = topfr->fr_child; fr != NULL; fr = fr->fr_next)
+ {
+ /* If 'winfixheight' set keep the window height if
+ * possible.
+--- 1994,2000 ----
+ else
+ {
+ next_curwin_size = -1;
+! FOR_ALL_FRAMES(fr, topfr->fr_child)
+ {
+ /* If 'winfixheight' set keep the window height if
+ * possible.
+***************
+*** 2050,2056 ****
+ --totwincount; /* don't count curwin */
+ }
+
+! for (fr = topfr->fr_child; fr != NULL; fr = fr->fr_next)
+ {
+ wincount = 1;
+ if (fr->fr_next == NULL)
+--- 2047,2053 ----
+ --totwincount; /* don't count curwin */
+ }
+
+! FOR_ALL_FRAMES(fr, topfr->fr_child)
+ {
+ wincount = 1;
+ if (fr->fr_next == NULL)
+***************
+*** 2751,2757 ****
+ * and remove it. */
+ frp2->fr_parent->fr_layout = frp2->fr_layout;
+ frp2->fr_parent->fr_child = frp2->fr_child;
+! for (frp = frp2->fr_child; frp != NULL; frp = frp->fr_next)
+ frp->fr_parent = frp2->fr_parent;
+ frp2->fr_parent->fr_win = frp2->fr_win;
+ if (frp2->fr_win != NULL)
+--- 2748,2754 ----
+ * and remove it. */
+ frp2->fr_parent->fr_layout = frp2->fr_layout;
+ frp2->fr_parent->fr_child = frp2->fr_child;
+! FOR_ALL_FRAMES(frp, frp2->fr_child)
+ frp->fr_parent = frp2->fr_parent;
+ frp2->fr_parent->fr_win = frp2->fr_win;
+ if (frp2->fr_win != NULL)
+***************
+*** 2883,2889 ****
+ if (frp->fr_layout == FR_LEAF)
+ return frp->fr_win == wp;
+
+! for (p = frp->fr_child; p != NULL; p = p->fr_next)
+ if (frame_has_win(p, wp))
+ return TRUE;
+ return FALSE;
+--- 2880,2886 ----
+ if (frp->fr_layout == FR_LEAF)
+ return frp->fr_win == wp;
+
+! FOR_ALL_FRAMES(p, frp->fr_child)
+ if (frame_has_win(p, wp))
+ return TRUE;
+ return FALSE;
+***************
+*** 2917,2923 ****
+ do
+ {
+ /* All frames in this row get the same new height. */
+! for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ {
+ frame_new_height(frp, height, topfirst, wfh);
+ if (frp->fr_height > height)
+--- 2914,2920 ----
+ do
+ {
+ /* All frames in this row get the same new height. */
+! FOR_ALL_FRAMES(frp, topfrp->fr_child)
+ {
+ frame_new_height(frp, height, topfirst, wfh);
+ if (frp->fr_height > height)
+***************
+*** 3014,3020 ****
+ {
+ /* The frame is fixed height if one of the frames in the row is fixed
+ * height. */
+! for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ if (frame_fixed_height(frp))
+ return TRUE;
+ return FALSE;
+--- 3011,3017 ----
+ {
+ /* The frame is fixed height if one of the frames in the row is fixed
+ * height. */
+! FOR_ALL_FRAMES(frp, frp->fr_child)
+ if (frame_fixed_height(frp))
+ return TRUE;
+ return FALSE;
+***************
+*** 3022,3028 ****
+
+ /* frp->fr_layout == FR_COL: The frame is fixed height if all of the
+ * frames in the row are fixed height. */
+! for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ if (!frame_fixed_height(frp))
+ return FALSE;
+ return TRUE;
+--- 3019,3025 ----
+
+ /* frp->fr_layout == FR_COL: The frame is fixed height if all of the
+ * frames in the row are fixed height. */
+! FOR_ALL_FRAMES(frp, frp->fr_child)
+ if (!frame_fixed_height(frp))
+ return FALSE;
+ return TRUE;
+***************
+*** 3043,3049 ****
+ {
+ /* The frame is fixed width if one of the frames in the row is fixed
+ * width. */
+! for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ if (frame_fixed_width(frp))
+ return TRUE;
+ return FALSE;
+--- 3040,3046 ----
+ {
+ /* The frame is fixed width if one of the frames in the row is fixed
+ * width. */
+! FOR_ALL_FRAMES(frp, frp->fr_child)
+ if (frame_fixed_width(frp))
+ return TRUE;
+ return FALSE;
+***************
+*** 3051,3057 ****
+
+ /* frp->fr_layout == FR_ROW: The frame is fixed width if all of the
+ * frames in the row are fixed width. */
+! for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ if (!frame_fixed_width(frp))
+ return FALSE;
+ return TRUE;
+--- 3048,3054 ----
+
+ /* frp->fr_layout == FR_ROW: The frame is fixed width if all of the
+ * frames in the row are fixed width. */
+! FOR_ALL_FRAMES(frp, frp->fr_child)
+ if (!frame_fixed_width(frp))
+ return FALSE;
+ return TRUE;
+***************
+*** 3079,3085 ****
+ else if (frp->fr_layout == FR_ROW)
+ {
+ /* Handle all the frames in the row. */
+! for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ frame_add_statusline(frp);
+ }
+ else /* frp->fr_layout == FR_COL */
+--- 3076,3082 ----
+ else if (frp->fr_layout == FR_ROW)
+ {
+ /* Handle all the frames in the row. */
+! FOR_ALL_FRAMES(frp, frp->fr_child)
+ frame_add_statusline(frp);
+ }
+ else /* frp->fr_layout == FR_COL */
+***************
+*** 3125,3131 ****
+ do
+ {
+ /* All frames in this column get the same new width. */
+! for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ {
+ frame_new_width(frp, width, leftfirst, wfw);
+ if (frp->fr_width > width)
+--- 3122,3128 ----
+ do
+ {
+ /* All frames in this column get the same new width. */
+! FOR_ALL_FRAMES(frp, topfrp->fr_child)
+ {
+ frame_new_width(frp, width, leftfirst, wfw);
+ if (frp->fr_width > width)
+***************
+*** 3228,3234 ****
+ else if (frp->fr_layout == FR_COL)
+ {
+ /* Handle all the frames in the column. */
+! for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ frame_add_vsep(frp);
+ }
+ else /* frp->fr_layout == FR_ROW */
+--- 3225,3231 ----
+ else if (frp->fr_layout == FR_COL)
+ {
+ /* Handle all the frames in the column. */
+! FOR_ALL_FRAMES(frp, frp->fr_child)
+ frame_add_vsep(frp);
+ }
+ else /* frp->fr_layout == FR_ROW */
+***************
+*** 3295,3301 ****
+ {
+ /* get the minimal height from each frame in this row */
+ m = 0;
+! for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ {
+ n = frame_minheight(frp, next_curwin);
+ if (n > m)
+--- 3292,3298 ----
+ {
+ /* get the minimal height from each frame in this row */
+ m = 0;
+! FOR_ALL_FRAMES(frp, topfrp->fr_child)
+ {
+ n = frame_minheight(frp, next_curwin);
+ if (n > m)
+***************
+*** 3306,3312 ****
+ {
+ /* Add up the minimal heights for all frames in this column. */
+ m = 0;
+! for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ m += frame_minheight(frp, next_curwin);
+ }
+
+--- 3303,3309 ----
+ {
+ /* Add up the minimal heights for all frames in this column. */
+ m = 0;
+! FOR_ALL_FRAMES(frp, topfrp->fr_child)
+ m += frame_minheight(frp, next_curwin);
+ }
+
+***************
+*** 3344,3350 ****
+ {
+ /* get the minimal width from each frame in this column */
+ m = 0;
+! for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ {
+ n = frame_minwidth(frp, next_curwin);
+ if (n > m)
+--- 3341,3347 ----
+ {
+ /* get the minimal width from each frame in this column */
+ m = 0;
+! FOR_ALL_FRAMES(frp, topfrp->fr_child)
+ {
+ n = frame_minwidth(frp, next_curwin);
+ if (n > m)
+***************
+*** 3355,3361 ****
+ {
+ /* Add up the minimal widths for all frames in this row. */
+ m = 0;
+! for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ m += frame_minwidth(frp, next_curwin);
+ }
+
+--- 3352,3358 ----
+ {
+ /* Add up the minimal widths for all frames in this row. */
+ m = 0;
+! FOR_ALL_FRAMES(frp, topfrp->fr_child)
+ m += frame_minwidth(frp, next_curwin);
+ }
+
+***************
+*** 5023,5029 ****
+ {
+ startrow = *row;
+ startcol = *col;
+! for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ {
+ if (topfrp->fr_layout == FR_ROW)
+ *row = startrow; /* all frames are at the same row */
+--- 5020,5026 ----
+ {
+ startrow = *row;
+ startcol = *col;
+! FOR_ALL_FRAMES(frp, topfrp->fr_child)
+ {
+ if (topfrp->fr_layout == FR_ROW)
+ *row = startrow; /* all frames are at the same row */
+***************
+*** 5143,5150 ****
+ {
+ room = 0;
+ room_reserved = 0;
+! for (frp = curfrp->fr_parent->fr_child; frp != NULL;
+! frp = frp->fr_next)
+ {
+ if (frp != curfrp
+ && frp->fr_win != NULL
+--- 5140,5146 ----
+ {
+ room = 0;
+ room_reserved = 0;
+! FOR_ALL_FRAMES(frp, curfrp->fr_parent->fr_child)
+ {
+ if (frp != curfrp
+ && frp->fr_win != NULL
+***************
+*** 5337,5344 ****
+ {
+ room = 0;
+ room_reserved = 0;
+! for (frp = curfrp->fr_parent->fr_child; frp != NULL;
+! frp = frp->fr_next)
+ {
+ if (frp != curfrp
+ && frp->fr_win != NULL
+--- 5333,5339 ----
+ {
+ room = 0;
+ room_reserved = 0;
+! FOR_ALL_FRAMES(frp, curfrp->fr_parent->fr_child)
+ {
+ if (frp != curfrp
+ && frp->fr_win != NULL
+***************
+*** 5562,5568 ****
+ if (room < 0)
+ room = 0;
+ /* sum up the room of frames below of the current one */
+! for (fr = curfr->fr_next; fr != NULL; fr = fr->fr_next)
+ room += fr->fr_height - frame_minheight(fr, NULL);
+ fr = curfr; /* put fr at window that grows */
+ }
+--- 5557,5563 ----
+ if (room < 0)
+ room = 0;
+ /* sum up the room of frames below of the current one */
+! FOR_ALL_FRAMES(fr, curfr->fr_next)
+ room += fr->fr_height - frame_minheight(fr, NULL);
+ fr = curfr; /* put fr at window that grows */
+ }
+***************
+*** 5676,5682 ****
+ left = FALSE;
+ /* sum up the room of frames right of the current one */
+ room = 0;
+! for (fr = curfr->fr_next; fr != NULL; fr = fr->fr_next)
+ room += fr->fr_width - frame_minwidth(fr, NULL);
+ fr = curfr; /* put fr at window that grows */
+ }
+--- 5671,5677 ----
+ left = FALSE;
+ /* sum up the room of frames right of the current one */
+ room = 0;
+! FOR_ALL_FRAMES(fr, curfr->fr_next)
+ room += fr->fr_width - frame_minwidth(fr, NULL);
+ fr = curfr; /* put fr at window that grows */
+ }
+***************
+*** 6073,6079 ****
+ else if (fr->fr_layout == FR_ROW)
+ {
+ /* vertically split windows, set status line for each one */
+! for (fp = fr->fr_child; fp != NULL; fp = fp->fr_next)
+ last_status_rec(fp, statusline);
+ }
+ else
+--- 6068,6074 ----
+ else if (fr->fr_layout == FR_ROW)
+ {
+ /* vertically split windows, set status line for each one */
+! FOR_ALL_FRAMES(fp, fr->fr_child)
+ last_status_rec(fp, statusline);
+ }
+ else
+***************
+*** 6751,6757 ****
+ return TRUE;
+
+ if (topframe->fr_layout == FR_COL)
+! for (fr = topframe->fr_child; fr != NULL; fr = fr->fr_next)
+ if (fr->fr_layout == FR_ROW)
+ return TRUE;
+
+--- 6746,6752 ----
+ return TRUE;
+
+ if (topframe->fr_layout == FR_COL)
+! FOR_ALL_FRAMES(fr, topframe->fr_child)
+ if (fr->fr_layout == FR_ROW)
+ return TRUE;
+
+***************
+*** 7097,7103 ****
+ return FALSE;
+
+ if (topfrp->fr_layout == FR_ROW)
+! for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ if (frp->fr_height != height)
+ return FALSE;
+
+--- 7092,7098 ----
+ return FALSE;
+
+ if (topfrp->fr_layout == FR_ROW)
+! FOR_ALL_FRAMES(frp, topfrp->fr_child)
+ if (frp->fr_height != height)
+ return FALSE;
+
+***************
+*** 7116,7122 ****
+ return FALSE;
+
+ if (topfrp->fr_layout == FR_COL)
+! for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ if (frp->fr_width != width)
+ return FALSE;
+
+--- 7111,7117 ----
+ return FALSE;
+
+ if (topfrp->fr_layout == FR_COL)
+! FOR_ALL_FRAMES(frp, topfrp->fr_child)
+ if (frp->fr_width != width)
+ return FALSE;
+
+*** ../vim-8.1.0622/src/version.c 2018-12-22 16:49:11.348536036 +0100
+--- src/version.c 2018-12-22 17:01:53.558148676 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 623,
+ /**/
+
+--
+Change is inevitable, except from a vending machine.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0624 b/data/vim/patches/8.1.0624
new file mode 100644
index 000000000..1b540e3e4
--- /dev/null
+++ b/data/vim/patches/8.1.0624
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0624
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0624 (after 8.2.0620)
+Problem: Overuling CONF_ARGS from the environment still does not work. (Tony
+ Mechelynck)
+Solution: Add back CONF_ARGS next to the new numbered ones.
+Files: src/Makefile
+
+
+*** ../vim-8.1.0623/src/Makefile 2018-12-22 14:58:58.750451917 +0100
+--- src/Makefile 2018-12-22 17:24:17.635641682 +0100
+***************
+*** 1932,1939 ****
+ $(CONF_OPT_FEAT) $(CONF_TERM_LIB) \
+ $(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
+ $(CONF_OPT_CHANNEL) $(CONF_OPT_TERMINAL) \
+! $(CONF_ARGS1) $(CONF_ARGS2) $(CONF_ARGS3) $(CONF_ARGS4) \
+! $(CONF_ARGS5) $(CONF_ARGS6) \
+ $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
+ $(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \
+ $(CONF_OPT_SYSMOUSE); \
+--- 1934,1941 ----
+ $(CONF_OPT_FEAT) $(CONF_TERM_LIB) \
+ $(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
+ $(CONF_OPT_CHANNEL) $(CONF_OPT_TERMINAL) \
+! $(CONF_ARGS) $(CONF_ARGS1) $(CONF_ARGS2) $(CONF_ARGS3) \
+! $(CONF_ARGS4) $(CONF_ARGS5) $(CONF_ARGS6) \
+ $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
+ $(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \
+ $(CONF_OPT_SYSMOUSE); \
+*** ../vim-8.1.0623/src/version.c 2018-12-22 17:07:45.771347741 +0100
+--- src/version.c 2018-12-22 17:25:54.895005094 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 624,
+ /**/
+
+--
+Those who live by the sword get shot by those who don'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.0625 b/data/vim/patches/8.1.0625
new file mode 100644
index 000000000..3a5963695
--- /dev/null
+++ b/data/vim/patches/8.1.0625
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0625
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0625
+Problem: MS-Windows: terminal test fails in white console.
+Solution: Accept both white and black background colors.
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0624/src/testdir/test_terminal.vim 2018-12-21 20:55:18.892739645 +0100
+--- src/testdir/test_terminal.vim 2018-12-22 18:23:32.821544966 +0100
+***************
+*** 159,168 ****
+ call assert_equal('2', l[1].chars)
+ call assert_equal('3', l[2].chars)
+ call assert_equal('#00e000', l[0].fg)
+! if &background == 'light'
+! call assert_equal('#ffffff', l[0].bg)
+ else
+! call assert_equal('#000000', l[0].bg)
+ endif
+
+ let l = term_getline(a:buf, -1)
+--- 159,174 ----
+ call assert_equal('2', l[1].chars)
+ call assert_equal('3', l[2].chars)
+ call assert_equal('#00e000', l[0].fg)
+! if has('win32')
+! " On Windows 'background' always defaults to dark, even though the terminal
+! " may use a light background. Therefore accept both white and black.
+! call assert_match('#ffffff\|#000000', l[0].bg)
+ else
+! if &background == 'light'
+! call assert_equal('#ffffff', l[0].bg)
+! else
+! call assert_equal('#000000', l[0].bg)
+! endif
+ endif
+
+ let l = term_getline(a:buf, -1)
+*** ../vim-8.1.0624/src/version.c 2018-12-22 17:27:08.982517207 +0100
+--- src/version.c 2018-12-22 18:24:54.488931363 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 625,
+ /**/
+
+--
+You have the right to remain silent. Anything you say will be
+misquoted, then used against 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.0626 b/data/vim/patches/8.1.0626
new file mode 100644
index 000000000..cf3733009
--- /dev/null
+++ b/data/vim/patches/8.1.0626
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0626
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0626
+Problem: MS-Windows: no resize to fit parent when using --windowid.
+Solution: Pass FALSE for "mustset" in gui_set_shellsize(). (Agorgianitis
+ Loukas, closes #3616)
+Files: src/gui.c
+
+
+*** ../vim-8.1.0625/src/gui.c 2018-12-11 20:39:15.446937049 +0100
+--- src/gui.c 2018-12-22 18:42:17.817660355 +0100
+***************
+*** 687,695 ****
+ gui.shell_created = TRUE;
+
+ #ifndef FEAT_GUI_GTK
+! /* Set the shell size, adjusted for the screen size. For GTK this only
+! * works after the shell has been opened, thus it is further down. */
+! gui_set_shellsize(TRUE, TRUE, RESIZE_BOTH);
+ #endif
+ #if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU)
+ /* Need to set the size of the menubar after all the menus have been
+--- 687,696 ----
+ gui.shell_created = TRUE;
+
+ #ifndef FEAT_GUI_GTK
+! // Set the shell size, adjusted for the screen size. For GTK this only
+! // works after the shell has been opened, thus it is further down.
+! // For MS-Windows pass FALSE for "mustset" to make --windowid work.
+! gui_set_shellsize(FALSE, TRUE, RESIZE_BOTH);
+ #endif
+ #if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU)
+ /* Need to set the size of the menubar after all the menus have been
+*** ../vim-8.1.0625/src/version.c 2018-12-22 18:25:25.900695322 +0100
+--- src/version.c 2018-12-22 18:44:04.220925033 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 626,
+ /**/
+
+--
+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.0627 b/data/vim/patches/8.1.0627
new file mode 100644
index 000000000..c3b1524df
--- /dev/null
+++ b/data/vim/patches/8.1.0627
@@ -0,0 +1,179 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0627
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0627
+Problem: Python cannot handle function name of script-local function.
+Solution: Use <SNR> instead of the special byte code. (Ozaki Kiichi, closes
+ #3681)
+Files: src/if_py_both.h, src/testdir/test_python2.vim,
+ src/testdir/test_python3.vim
+
+
+*** ../vim-8.1.0626/src/if_py_both.h 2018-08-07 19:45:22.619218432 +0200
+--- src/if_py_both.h 2018-12-22 18:54:43.284392984 +0100
+***************
+*** 2922,2929 ****
+ {
+ FunctionObject *self;
+
+! self = (FunctionObject *) subtype->tp_alloc(subtype, 0);
+!
+ if (self == NULL)
+ return NULL;
+
+--- 2922,2928 ----
+ {
+ FunctionObject *self;
+
+! self = (FunctionObject *)subtype->tp_alloc(subtype, 0);
+ if (self == NULL)
+ return NULL;
+
+***************
+*** 2938,2952 ****
+ self->name = vim_strsave(name);
+ }
+ else
+! if ((self->name = get_expanded_name(name,
+! vim_strchr(name, AUTOLOAD_CHAR) == NULL))
+! == NULL)
+ {
+ PyErr_FORMAT(PyExc_ValueError,
+ N_("function %s does not exist"), name);
+ return NULL;
+ }
+
+ func_ref(self->name);
+ self->argc = argc;
+ self->argv = argv;
+--- 2937,2972 ----
+ self->name = vim_strsave(name);
+ }
+ else
+! {
+! char_u *p;
+!
+! if ((p = get_expanded_name(name,
+! vim_strchr(name, AUTOLOAD_CHAR) == NULL)) == NULL)
+ {
+ PyErr_FORMAT(PyExc_ValueError,
+ N_("function %s does not exist"), name);
+ return NULL;
+ }
+
++ if (p[0] == K_SPECIAL && p[1] == KS_EXTRA && p[2] == (int)KE_SNR)
++ {
++ char_u *np;
++ size_t len = STRLEN(p) + 1;
++
++ if ((np = alloc(len + 2)) == NULL)
++ {
++ vim_free(p);
++ return NULL;
++ }
++ mch_memmove(np, "<SNR>", 5);
++ mch_memmove(np + 5, p + 3, len - 3);
++ vim_free(p);
++ self->name = np;
++ }
++ else
++ self->name = p;
++ }
++
+ func_ref(self->name);
+ self->argc = argc;
+ self->argv = argv;
+*** ../vim-8.1.0626/src/testdir/test_python2.vim 2018-07-25 22:02:32.235966277 +0200
+--- src/testdir/test_python2.vim 2018-12-22 18:54:43.284392984 +0100
+***************
+*** 36,38 ****
+--- 36,65 ----
+ normal j
+ call assert_equal([2, 6], [line('.'), col('.')])
+ endfunc
++
++ func Test_vim_function()
++ " Check creating vim.Function object
++ py import vim
++
++ func s:foo()
++ return matchstr(expand('<sfile>'), '<SNR>\zs\d\+_foo$')
++ endfunc
++ let name = '<SNR>' . s:foo()
++
++ try
++ py f = vim.bindeval('function("s:foo")')
++ call assert_equal(name, pyeval('f.name'))
++ catch
++ call assert_false(v:exception)
++ endtry
++
++ try
++ py f = vim.Function('\x80\xfdR' + vim.eval('s:foo()'))
++ call assert_equal(name, pyeval('f.name'))
++ catch
++ call assert_false(v:exception)
++ endtry
++
++ py del f
++ delfunc s:foo
++ endfunc
+*** ../vim-8.1.0626/src/testdir/test_python3.vim 2018-07-25 22:02:32.235966277 +0200
+--- src/testdir/test_python3.vim 2018-12-22 18:54:43.284392984 +0100
+***************
+*** 36,38 ****
+--- 36,65 ----
+ normal j
+ call assert_equal([2, 6], [line('.'), col('.')])
+ endfunc
++
++ func Test_vim_function()
++ " Check creating vim.Function object
++ py3 import vim
++
++ func s:foo()
++ return matchstr(expand('<sfile>'), '<SNR>\zs\d\+_foo$')
++ endfunc
++ let name = '<SNR>' . s:foo()
++
++ try
++ py3 f = vim.bindeval('function("s:foo")')
++ call assert_equal(name, py3eval('f.name'))
++ catch
++ call assert_false(v:exception)
++ endtry
++
++ try
++ py3 f = vim.Function(b'\x80\xfdR' + vim.eval('s:foo()').encode())
++ call assert_equal(name, py3eval('f.name'))
++ catch
++ call assert_false(v:exception)
++ endtry
++
++ py3 del f
++ delfunc s:foo
++ endfunc
+*** ../vim-8.1.0626/src/version.c 2018-12-22 18:44:49.104612525 +0100
+--- src/version.c 2018-12-22 18:58:31.154751073 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 627,
+ /**/
+
+--
+Portable Computer: A device invented to force businessmen
+to work at home, on vacation, and on business trips.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0628 b/data/vim/patches/8.1.0628
new file mode 100644
index 000000000..7309bf3b2
--- /dev/null
+++ b/data/vim/patches/8.1.0628
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0628
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0628
+Problem: Compiler warning on MS-Windows.
+Solution: Add type cast. (Mike Williams)
+Files: src/if_py_both.h
+
+
+*** ../vim-8.1.0627/src/if_py_both.h 2018-12-22 18:59:00.790537016 +0100
+--- src/if_py_both.h 2018-12-23 13:32:46.185006565 +0100
+***************
+*** 2953,2959 ****
+ char_u *np;
+ size_t len = STRLEN(p) + 1;
+
+! if ((np = alloc(len + 2)) == NULL)
+ {
+ vim_free(p);
+ return NULL;
+--- 2953,2959 ----
+ char_u *np;
+ size_t len = STRLEN(p) + 1;
+
+! if ((np = alloc((int)len + 2)) == NULL)
+ {
+ vim_free(p);
+ return NULL;
+*** ../vim-8.1.0627/src/version.c 2018-12-22 18:59:00.790537016 +0100
+--- src/version.c 2018-12-23 13:35:16.083829310 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 628,
+ /**/
+
+--
+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.0629 b/data/vim/patches/8.1.0629
new file mode 100644
index 000000000..66cb9650f
--- /dev/null
+++ b/data/vim/patches/8.1.0629
@@ -0,0 +1,454 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0629
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0629
+Problem: "gn" selects the wrong text with a multi-line match.
+Solution: Get the end position from searchit() directly. (closes #3695)
+Files: src/testdir/test_gn.vim, src/search.c, src/proto/search.pro,
+ src/edit.c, src/evalfunc.c, src/ex_docmd.c, ex_getln.c,
+ src/normal.c
+
+
+*** ../vim-8.1.0628/src/testdir/test_gn.vim 2018-05-22 17:50:38.683980716 +0200
+--- src/testdir/test_gn.vim 2018-12-22 20:09:51.629267209 +0100
+***************
+*** 131,134 ****
+--- 131,153 ----
+ set wrapscan&vim
+ endfu
+
++ func Test_gn_multi_line()
++ new
++ call setline(1, [
++ \ 'func Tm1()',
++ \ ' echo "one"',
++ \ 'endfunc',
++ \ 'func Tm2()',
++ \ ' echo "two"',
++ \ 'endfunc',
++ \ 'func Tm3()',
++ \ ' echo "three"',
++ \ 'endfunc',
++ \])
++ /\v^func Tm\d\(\)\n.*\zs".*"\ze$
++ normal jgnrx
++ call assert_equal(' echo xxxxx', getline(5))
++ bwipe!
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.0628/src/search.c 2018-12-01 21:08:18.019648483 +0100
+--- src/search.c 2018-12-23 19:08:55.834869939 +0100
+***************
+*** 610,617 ****
+
+ /*
+ * Lowest level search function.
+! * Search for 'count'th occurrence of pattern 'pat' in direction 'dir'.
+! * Start at position 'pos' and return the found position in 'pos'.
+ *
+ * if (options & SEARCH_MSG) == 0 don't give any messages
+ * if (options & SEARCH_MSG) == SEARCH_NFMSG don't give 'notfound' messages
+--- 610,617 ----
+
+ /*
+ * Lowest level search function.
+! * Search for 'count'th occurrence of pattern "pat" in direction "dir".
+! * Start at position "pos" and return the found position in "pos".
+ *
+ * if (options & SEARCH_MSG) == 0 don't give any messages
+ * if (options & SEARCH_MSG) == SEARCH_NFMSG don't give 'notfound' messages
+***************
+*** 634,639 ****
+--- 634,640 ----
+ buffer without a window! */
+ buf_T *buf,
+ pos_T *pos,
++ pos_T *end_pos, // set to end of the match, unless NULL
+ int dir,
+ char_u *pat,
+ long count,
+***************
+*** 1035,1048 ****
+--- 1036,1061 ----
+ }
+ #endif
+ }
++ if (end_pos != NULL)
++ {
++ end_pos->lnum = lnum + matchpos.lnum;
++ end_pos->col = matchpos.col;
++ }
+ }
+ else
+ {
+ pos->lnum = lnum + matchpos.lnum;
+ pos->col = matchpos.col;
++ if (end_pos != NULL)
++ {
++ end_pos->lnum = lnum + endpos.lnum;
++ end_pos->col = endpos.col;
++ }
+ }
+ #ifdef FEAT_VIRTUALEDIT
+ pos->coladd = 0;
++ if (end_pos != NULL)
++ end_pos->coladd = 0;
+ #endif
+ found = 1;
+ first_match = FALSE;
+***************
+*** 1496,1502 ****
+ lrFswap(searchstr,0);
+ #endif
+
+! c = searchit(curwin, curbuf, &pos, dirc == '/' ? FORWARD : BACKWARD,
+ searchstr, count, spats[0].off.end + (options &
+ (SEARCH_KEEP + SEARCH_PEEK + SEARCH_HIS
+ + SEARCH_MSG + SEARCH_START
+--- 1509,1515 ----
+ lrFswap(searchstr,0);
+ #endif
+
+! c = searchit(curwin, curbuf, &pos, NULL, dirc == '/' ? FORWARD : BACKWARD,
+ searchstr, count, spats[0].off.end + (options &
+ (SEARCH_KEEP + SEARCH_PEEK + SEARCH_HIS
+ + SEARCH_MSG + SEARCH_START
+***************
+*** 4665,4684 ****
+ int
+ current_search(
+ long count,
+! int forward) /* move forward or backwards */
+ {
+! pos_T start_pos; /* position before the pattern */
+! pos_T orig_pos; /* position of the cursor at beginning */
+! pos_T first_match; /* position of first match */
+! pos_T pos; /* position after the pattern */
+ int i;
+ int dir;
+! int result; /* result of various function calls */
+ char_u old_p_ws = p_ws;
+ int flags = 0;
+ pos_T save_VIsual = VIsual;
+ int one_char;
+- int direction = forward ? FORWARD : BACKWARD;
+
+ /* wrapping should not occur */
+ p_ws = FALSE;
+--- 4678,4696 ----
+ int
+ current_search(
+ long count,
+! int forward) // TRUE for forward, FALSE for backward
+ {
+! pos_T start_pos; // start position of the pattern match
+! pos_T end_pos; // end position of the pattern match
+! pos_T orig_pos; // position of the cursor at beginning
+! pos_T pos; // position after the pattern
+ int i;
+ int dir;
+! int result; // result of various function calls
+ char_u old_p_ws = p_ws;
+ int flags = 0;
+ pos_T save_VIsual = VIsual;
+ int one_char;
+
+ /* wrapping should not occur */
+ p_ws = FALSE;
+***************
+*** 4730,4737 ****
+ flags = 0;
+ if (!dir && !one_char)
+ flags = SEARCH_END;
+
+! result = searchit(curwin, curbuf, &pos, (dir ? FORWARD : BACKWARD),
+ spats[last_idx].pat, (long) (i ? count : 1),
+ SEARCH_KEEP | flags, RE_SEARCH, 0, NULL, NULL);
+
+--- 4742,4751 ----
+ flags = 0;
+ if (!dir && !one_char)
+ flags = SEARCH_END;
++ end_pos = pos;
+
+! result = searchit(curwin, curbuf, &pos, &end_pos,
+! (dir ? FORWARD : BACKWARD),
+ spats[last_idx].pat, (long) (i ? count : 1),
+ SEARCH_KEEP | flags, RE_SEARCH, 0, NULL, NULL);
+
+***************
+*** 4739,4745 ****
+ * beginning of the file (cursor might be on the search match)
+ * except when Visual mode is active, so that extending the visual
+ * selection works. */
+! if (!result && i) /* not found, abort */
+ {
+ curwin->w_cursor = orig_pos;
+ if (VIsual_active)
+--- 4753,4759 ----
+ * beginning of the file (cursor might be on the search match)
+ * except when Visual mode is active, so that extending the visual
+ * selection works. */
+! if (i == 1 && !result) /* not found, abort */
+ {
+ curwin->w_cursor = orig_pos;
+ if (VIsual_active)
+***************
+*** 4747,4753 ****
+ p_ws = old_p_ws;
+ return FAIL;
+ }
+! else if (!i && !result)
+ {
+ if (forward)
+ {
+--- 4761,4767 ----
+ p_ws = old_p_ws;
+ return FAIL;
+ }
+! else if (i == 0 && !result)
+ {
+ if (forward)
+ {
+***************
+*** 4763,4810 ****
+ ml_get(curwin->w_buffer->b_ml.ml_line_count));
+ }
+ }
+- if (i == 0)
+- first_match = pos;
+ p_ws = old_p_ws;
+ }
+
+ start_pos = pos;
+- flags = forward ? SEARCH_END : SEARCH_START;
+-
+- /* Check again from the current cursor position,
+- * since the next match might actually by only one char wide */
+- one_char = is_one_char(spats[last_idx].pat, FALSE, &pos, direction);
+- if (one_char < 0)
+- /* search failed, abort */
+- return FAIL;
+-
+- /* move to match, except for zero-width matches, in which case, we are
+- * already on the next match */
+- if (!one_char)
+- {
+- p_ws = FALSE;
+- for (i = 0; i < 2; i++)
+- {
+- result = searchit(curwin, curbuf, &pos, direction,
+- spats[last_idx].pat, 0L, flags | SEARCH_KEEP, RE_SEARCH, 0,
+- NULL, NULL);
+- /* Search successfull, break out from the loop */
+- if (result)
+- break;
+- /* search failed, try again from the last search position match */
+- pos = first_match;
+- }
+- }
+-
+ p_ws = old_p_ws;
+- /* not found */
+- if (!result)
+- return FAIL;
+
+ if (!VIsual_active)
+ VIsual = start_pos;
+
+! curwin->w_cursor = pos;
+ VIsual_active = TRUE;
+ VIsual_mode = 'v';
+
+--- 4777,4795 ----
+ ml_get(curwin->w_buffer->b_ml.ml_line_count));
+ }
+ }
+ p_ws = old_p_ws;
+ }
+
+ start_pos = pos;
+ p_ws = old_p_ws;
+
+ if (!VIsual_active)
+ VIsual = start_pos;
+
+! // put cursor on last character of match
+! curwin->w_cursor = end_pos;
+! if (LT_POS(VIsual, end_pos))
+! dec_cursor();
+ VIsual_active = TRUE;
+ VIsual_mode = 'v';
+
+***************
+*** 4880,4886 ****
+ flag = SEARCH_START;
+ }
+
+! if (searchit(curwin, curbuf, &pos, direction, pattern, 1,
+ SEARCH_KEEP + flag, RE_SEARCH, 0, NULL, NULL) != FAIL)
+ {
+ /* Zero-width pattern should match somewhere, then we can check if
+--- 4865,4871 ----
+ flag = SEARCH_START;
+ }
+
+! if (searchit(curwin, curbuf, &pos, NULL, direction, pattern, 1,
+ SEARCH_KEEP + flag, RE_SEARCH, 0, NULL, NULL) != FAIL)
+ {
+ /* Zero-width pattern should match somewhere, then we can check if
+*** ../vim-8.1.0628/src/proto/search.pro 2018-05-17 13:52:50.000000000 +0200
+--- src/proto/search.pro 2018-12-22 19:28:05.421217008 +0100
+***************
+*** 22,28 ****
+ void reset_search_dir(void);
+ void set_last_search_pat(char_u *s, int idx, int magic, int setlast);
+ void last_pat_prog(regmmatch_T *regmatch);
+! int searchit(win_T *win, buf_T *buf, pos_T *pos, int dir, char_u *pat, long count, int options, int pat_use, linenr_T stop_lnum, proftime_T *tm, int *timed_out);
+ void set_search_direction(int cdir);
+ int do_search(oparg_T *oap, int dirc, char_u *pat, long count, int options, proftime_T *tm, int *timed_out);
+ int search_for_exact_line(buf_T *buf, pos_T *pos, int dir, char_u *pat);
+--- 22,28 ----
+ void reset_search_dir(void);
+ void set_last_search_pat(char_u *s, int idx, int magic, int setlast);
+ void last_pat_prog(regmmatch_T *regmatch);
+! int searchit(win_T *win, buf_T *buf, pos_T *pos, pos_T *end_pos, int dir, char_u *pat, long count, int options, int pat_use, linenr_T stop_lnum, proftime_T *tm, int *timed_out);
+ void set_search_direction(int cdir);
+ int do_search(oparg_T *oap, int dirc, char_u *pat, long count, int options, proftime_T *tm, int *timed_out);
+ int search_for_exact_line(buf_T *buf, pos_T *pos, int dir, char_u *pat);
+*** ../vim-8.1.0628/src/edit.c 2018-12-21 16:04:16.324437435 +0100
+--- src/edit.c 2018-12-22 19:28:18.801116799 +0100
+***************
+*** 4653,4659 ****
+ found_new_match = search_for_exact_line(ins_buf, pos,
+ compl_direction, compl_pattern);
+ else
+! found_new_match = searchit(NULL, ins_buf, pos,
+ compl_direction,
+ compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
+ RE_LAST, (linenr_T)0, NULL, NULL);
+--- 4653,4659 ----
+ found_new_match = search_for_exact_line(ins_buf, pos,
+ compl_direction, compl_pattern);
+ else
+! found_new_match = searchit(NULL, ins_buf, pos, NULL,
+ compl_direction,
+ compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
+ RE_LAST, (linenr_T)0, NULL, NULL);
+*** ../vim-8.1.0628/src/evalfunc.c 2018-12-22 13:27:59.115503998 +0100
+--- src/evalfunc.c 2018-12-22 19:29:14.056703170 +0100
+***************
+*** 10056,10062 ****
+ }
+
+ pos = save_cursor = curwin->w_cursor;
+! subpatnum = searchit(curwin, curbuf, &pos, dir, pat, 1L,
+ options, RE_SEARCH, (linenr_T)lnum_stop, &tm, NULL);
+ if (subpatnum != FAIL)
+ {
+--- 10056,10062 ----
+ }
+
+ pos = save_cursor = curwin->w_cursor;
+! subpatnum = searchit(curwin, curbuf, &pos, NULL, dir, pat, 1L,
+ options, RE_SEARCH, (linenr_T)lnum_stop, &tm, NULL);
+ if (subpatnum != FAIL)
+ {
+***************
+*** 10414,10420 ****
+ pat = pat3;
+ for (;;)
+ {
+! n = searchit(curwin, curbuf, &pos, dir, pat, 1L,
+ options, RE_SEARCH, lnum_stop, &tm, NULL);
+ if (n == FAIL || (firstpos.lnum != 0 && EQUAL_POS(pos, firstpos)))
+ /* didn't find it or found the first match again: FAIL */
+--- 10414,10420 ----
+ pat = pat3;
+ for (;;)
+ {
+! n = searchit(curwin, curbuf, &pos, NULL, dir, pat, 1L,
+ options, RE_SEARCH, lnum_stop, &tm, NULL);
+ if (n == FAIL || (firstpos.lnum != 0 && EQUAL_POS(pos, firstpos)))
+ /* didn't find it or found the first match again: FAIL */
+*** ../vim-8.1.0628/src/ex_docmd.c 2018-12-22 17:07:45.771347741 +0100
+--- src/ex_docmd.c 2018-12-22 19:29:20.004658681 +0100
+***************
+*** 4669,4675 ****
+ #ifdef FEAT_VIRTUALEDIT
+ pos.coladd = 0;
+ #endif
+! if (searchit(curwin, curbuf, &pos,
+ *cmd == '?' ? BACKWARD : FORWARD,
+ (char_u *)"", 1L, SEARCH_MSG,
+ i, (linenr_T)0, NULL, NULL) != FAIL)
+--- 4669,4675 ----
+ #ifdef FEAT_VIRTUALEDIT
+ pos.coladd = 0;
+ #endif
+! if (searchit(curwin, curbuf, &pos, NULL,
+ *cmd == '?' ? BACKWARD : FORWARD,
+ (char_u *)"", 1L, SEARCH_MSG,
+ i, (linenr_T)0, NULL, NULL) != FAIL)
+*** ../vim-8.1.0628/src/ex_getln.c 2018-12-13 22:17:52.877941474 +0100
+--- src/ex_getln.c 2018-12-22 19:29:46.224462639 +0100
+***************
+*** 675,681 ****
+ ++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);
+--- 675,681 ----
+ ++emsg_off;
+ save = pat[patlen];
+ pat[patlen] = NUL;
+! i = searchit(curwin, curbuf, &t, NULL,
+ c == Ctrl_G ? FORWARD : BACKWARD,
+ pat, count, search_flags,
+ RE_SEARCH, 0, NULL, NULL);
+*** ../vim-8.1.0628/src/normal.c 2018-11-22 03:07:30.944596219 +0100
+--- src/normal.c 2018-12-22 19:30:21.432199427 +0100
+***************
+*** 4338,4344 ****
+ for (;;)
+ {
+ valid = FALSE;
+! t = searchit(curwin, curbuf, &curwin->w_cursor, FORWARD,
+ pat, 1L, searchflags, RE_LAST, (linenr_T)0, NULL, NULL);
+ if (curwin->w_cursor.lnum >= old_pos.lnum)
+ t = FAIL; /* match after start is failure too */
+--- 4338,4344 ----
+ for (;;)
+ {
+ valid = FALSE;
+! t = searchit(curwin, curbuf, &curwin->w_cursor, NULL, FORWARD,
+ pat, 1L, searchflags, RE_LAST, (linenr_T)0, NULL, NULL);
+ if (curwin->w_cursor.lnum >= old_pos.lnum)
+ t = FAIL; /* match after start is failure too */
+*** ../vim-8.1.0628/src/version.c 2018-12-23 13:36:36.671194499 +0100
+--- src/version.c 2018-12-23 19:06:08.800075128 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 629,
+ /**/
+
+--
+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.0630 b/data/vim/patches/8.1.0630
new file mode 100644
index 000000000..8cc1e92e9
--- /dev/null
+++ b/data/vim/patches/8.1.0630
@@ -0,0 +1,124 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0630
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0630
+Problem: "wincmd p" does not work after using an autocmd window.
+Solution: Store "prevwin" in aco_save_T. (Christian Brabandt, closes #3690)
+Files: src/fileio.c, src/structs.h, src/testdir/test_window_cmd.vim
+
+
+*** ../vim-8.1.0629/src/fileio.c 2018-11-16 16:21:01.629310081 +0100
+--- src/fileio.c 2018-12-23 23:53:39.133259452 +0100
+***************
+*** 9017,9022 ****
+--- 9017,9023 ----
+
+ aco->save_curwin = curwin;
+ aco->save_curbuf = curbuf;
++ aco->save_prevwin = prevwin;
+ if (win != NULL)
+ {
+ /* There is a window for "buf" in the current tab page, make it the
+***************
+*** 9127,9132 ****
+--- 9128,9135 ----
+ else
+ /* Hmm, original window disappeared. Just use the first one. */
+ curwin = firstwin;
++ if (win_valid(aco->save_prevwin))
++ prevwin = aco->save_prevwin;
+ #ifdef FEAT_EVAL
+ vars_clear(&aucmd_win->w_vars->dv_hashtab); /* free all w: variables */
+ hash_init(&aucmd_win->w_vars->dv_hashtab); /* re-use the hashtab */
+***************
+*** 9177,9182 ****
+--- 9180,9187 ----
+
+ curwin = aco->save_curwin;
+ curbuf = curwin->w_buffer;
++ if (win_valid(aco->save_prevwin))
++ prevwin = aco->save_prevwin;
+ /* In case the autocommand move the cursor to a position that that
+ * not exist in curbuf. */
+ check_cursor();
+*** ../vim-8.1.0629/src/structs.h 2018-12-21 15:16:57.483579762 +0100
+--- src/structs.h 2018-12-23 23:54:09.861011969 +0100
+***************
+*** 3252,3257 ****
+--- 3252,3258 ----
+ int use_aucmd_win; /* using aucmd_win */
+ win_T *save_curwin; /* saved curwin */
+ win_T *new_curwin; /* new curwin */
++ win_T *save_prevwin; /* saved prevwin */
+ bufref_T new_curbuf; /* new curbuf */
+ char_u *globaldir; /* saved value of globaldir */
+ } aco_save_T;
+*** ../vim-8.1.0629/src/testdir/test_window_cmd.vim 2018-11-10 20:47:43.394262832 +0100
+--- src/testdir/test_window_cmd.vim 2018-12-23 23:51:10.570457916 +0100
+***************
+*** 578,581 ****
+--- 578,618 ----
+ only
+ endfunc
+
++ function! Fun_RenewFile()
++ sleep 2
++ silent execute '!echo "1" > tmp.txt'
++ sp
++ wincmd p
++ edit! tmp.txt
++ endfunction
++
++ func Test_window_prevwin()
++ " Can we make this work on MS-Windows?
++ if !has('unix')
++ return
++ endif
++
++ set hidden autoread
++ call writefile(['2'], 'tmp.txt')
++ new tmp.txt
++ q
++ " Need to wait a bit for the timestamp to be older.
++ call Fun_RenewFile()
++ call assert_equal(2, winnr())
++ wincmd p
++ call assert_equal(1, winnr())
++ wincmd p
++ q
++ call Fun_RenewFile()
++ call assert_equal(2, winnr())
++ wincmd p
++ call assert_equal(1, winnr())
++ wincmd p
++ " reset
++ q
++ call delete('tmp.txt')
++ set hidden&vim autoread&vim
++ delfunc Fun_RenewFile
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.0629/src/version.c 2018-12-23 19:10:05.014359877 +0100
+--- src/version.c 2018-12-23 19:59:59.298394002 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 630,
+ /**/
+
+--
+Never overestimate a man's ability to underestimate a woman.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0631 b/data/vim/patches/8.1.0631
new file mode 100644
index 000000000..2d5b3a316
--- /dev/null
+++ b/data/vim/patches/8.1.0631
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0631
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0631
+Problem: Test for :stop fails on Arch.
+Solution: Check five lines for the expected output. (closes #3714)
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0630/src/testdir/test_terminal.vim 2018-12-22 18:25:25.900695322 +0100
+--- src/testdir/test_terminal.vim 2018-12-24 19:12:42.380643043 +0100
+***************
+*** 1705,1715 ****
+ call WaitForAssert({-> assert_match('ready', Get_terminal_text(bufnr, lastrow))})
+
+ call term_sendkeys(bufnr, ":stop\r")
+! " Not sure where "Stopped" shows up, assume in the first three lines.
+ call WaitForAssert({-> assert_match('Stopped',
+ \ Get_terminal_text(bufnr, 1) .
+ \ Get_terminal_text(bufnr, 2) .
+! \ Get_terminal_text(bufnr, 3))})
+
+ call term_sendkeys(bufnr, "fg\r")
+ call term_sendkeys(bufnr, ":echo 'back again'\r")
+--- 1705,1717 ----
+ call WaitForAssert({-> assert_match('ready', Get_terminal_text(bufnr, lastrow))})
+
+ call term_sendkeys(bufnr, ":stop\r")
+! " Not sure where "Stopped" shows up, need five lines for Arch.
+ call WaitForAssert({-> assert_match('Stopped',
+ \ Get_terminal_text(bufnr, 1) .
+ \ Get_terminal_text(bufnr, 2) .
+! \ Get_terminal_text(bufnr, 3) .
+! \ Get_terminal_text(bufnr, 4) .
+! \ Get_terminal_text(bufnr, 5))})
+
+ call term_sendkeys(bufnr, "fg\r")
+ call term_sendkeys(bufnr, ":echo 'back again'\r")
+*** ../vim-8.1.0630/src/version.c 2018-12-24 00:22:35.739150151 +0100
+--- src/version.c 2018-12-24 19:14:35.583652861 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 631,
+ /**/
+
+--
+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.0632 b/data/vim/patches/8.1.0632
new file mode 100644
index 000000000..7c2c0b098
--- /dev/null
+++ b/data/vim/patches/8.1.0632
@@ -0,0 +1,742 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0632
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0632
+Problem: Using sign group names is inefficient.
+Solution: Store group names in a hash table and use a reference to them.
+ Also remove unnecessary use of ":exe" from the tests. (Yegappan
+ Lakshmanan, closes #3715)
+Files: src/buffer.c, src/ex_cmds.c, src/structs.h,
+ src/testdir/test_signs.vim
+
+
+*** ../vim-8.1.0631/src/buffer.c 2018-12-21 15:16:57.475579814 +0100
+--- src/buffer.c 2018-12-24 20:15:59.744514267 +0100
+***************
+*** 5865,5870 ****
+--- 5865,5937 ----
+ #endif
+
+ #if defined(FEAT_SIGNS) || defined(PROTO)
++ static hashtab_T sg_table; // sign group (signgroup_T) hashtable
++
++ /*
++ * A new sign in group 'groupname' is added. If the group is not present,
++ * create it. Otherwise reference the group.
++ */
++ static signgroup_T *
++ sign_group_ref(char_u *groupname)
++ {
++ static int initialized = FALSE;
++ hash_T hash;
++ hashitem_T *hi;
++ signgroup_T *group;
++
++ if (!initialized)
++ {
++ initialized = TRUE;
++ hash_init(&sg_table);
++ }
++
++ hash = hash_hash(groupname);
++ hi = hash_lookup(&sg_table, groupname, hash);
++ if (HASHITEM_EMPTY(hi))
++ {
++ // new group
++ group = (signgroup_T *)alloc(
++ (unsigned)(sizeof(signgroup_T) + STRLEN(groupname)));
++ if (group == NULL)
++ return NULL;
++ STRCPY(group->sg_name, groupname);
++ group->refcount = 1;
++ hash_add_item(&sg_table, hi, group->sg_name, hash);
++ }
++ else
++ {
++ // existing group
++ group = HI2SG(hi);
++ group->refcount++;
++ }
++
++ return group;
++ }
++
++ /*
++ * A sign in group 'groupname' is removed. If all the signs in this group are
++ * removed, then remove the group.
++ */
++ static void
++ sign_group_unref(char_u *groupname)
++ {
++ hashitem_T *hi;
++ signgroup_T *group;
++
++ hi = hash_find(&sg_table, groupname);
++ if (!HASHITEM_EMPTY(hi))
++ {
++ group = HI2SG(hi);
++ group->refcount--;
++ if (group->refcount == 0)
++ {
++ // All the signs in this group are removed
++ hash_remove(&sg_table, hi);
++ vim_free(group);
++ }
++ }
++ }
++
+ /*
+ * Insert a new sign into the signlist for buffer 'buf' between the 'prev' and
+ * 'next' signs.
+***************
+*** 5890,5896 ****
+ newsign->lnum = lnum;
+ newsign->typenr = typenr;
+ if (group != NULL)
+! newsign->group = vim_strsave(group);
+ else
+ newsign->group = NULL;
+ newsign->priority = prio;
+--- 5957,5970 ----
+ newsign->lnum = lnum;
+ newsign->typenr = typenr;
+ if (group != NULL)
+! {
+! newsign->group = sign_group_ref(group);
+! if (newsign->group == NULL)
+! {
+! vim_free(newsign);
+! return;
+! }
+! }
+ else
+ newsign->group = NULL;
+ newsign->priority = prio;
+***************
+*** 5959,5965 ****
+ return ((group != NULL && STRCMP(group, "*") == 0) ||
+ (group == NULL && sign->group == NULL) ||
+ (group != NULL && sign->group != NULL &&
+! STRCMP(group, sign->group) == 0));
+ }
+
+ /*
+--- 6033,6039 ----
+ return ((group != NULL && STRCMP(group, "*") == 0) ||
+ (group == NULL && sign->group == NULL) ||
+ (group != NULL && sign->group != NULL &&
+! STRCMP(group, sign->group->sg_name) == 0));
+ }
+
+ /*
+***************
+*** 5974,5980 ****
+ return NULL;
+ dict_add_number(d, "id", sign->id);
+ dict_add_string(d, "group", (sign->group == NULL) ?
+! (char_u *)"" : sign->group);
+ dict_add_number(d, "lnum", sign->lnum);
+ dict_add_string(d, "name", sign_typenr2name(sign->typenr));
+ dict_add_number(d, "priority", sign->priority);
+--- 6048,6054 ----
+ return NULL;
+ dict_add_number(d, "id", sign->id);
+ dict_add_string(d, "group", (sign->group == NULL) ?
+! (char_u *)"" : sign->group->sg_name);
+ dict_add_number(d, "lnum", sign->lnum);
+ dict_add_string(d, "name", sign_typenr2name(sign->typenr));
+ dict_add_number(d, "priority", sign->priority);
+***************
+*** 5989,5995 ****
+ buf_addsign(
+ buf_T *buf, // buffer to store sign in
+ int id, // sign ID
+! char_u *group, // sign group
+ int prio, // sign priority
+ linenr_T lnum, // line number which gets the mark
+ int typenr) // typenr of sign we are adding
+--- 6063,6069 ----
+ buf_addsign(
+ buf_T *buf, // buffer to store sign in
+ int id, // sign ID
+! char_u *groupname, // sign group
+ int prio, // sign priority
+ linenr_T lnum, // line number which gets the mark
+ int typenr) // typenr of sign we are adding
+***************
+*** 6001,6007 ****
+ FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+ if (lnum == sign->lnum && id == sign->id &&
+! sign_in_group(sign, group))
+ {
+ // Update an existing sign
+ sign->typenr = typenr;
+--- 6075,6081 ----
+ FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+ if (lnum == sign->lnum && id == sign->id &&
+! sign_in_group(sign, groupname))
+ {
+ // Update an existing sign
+ sign->typenr = typenr;
+***************
+*** 6009,6022 ****
+ }
+ else if (lnum < sign->lnum)
+ {
+! insert_sign_by_lnum_prio(buf, prev, id, group, prio, lnum, typenr);
+ return;
+ }
+ prev = sign;
+ }
+
+! insert_sign_by_lnum_prio(buf, prev, id, group, prio, lnum, typenr);
+!
+ return;
+ }
+
+--- 6083,6096 ----
+ }
+ else if (lnum < sign->lnum)
+ {
+! insert_sign_by_lnum_prio(buf, prev, id, groupname, prio,
+! lnum, typenr);
+ return;
+ }
+ prev = sign;
+ }
+
+! insert_sign_by_lnum_prio(buf, prev, id, groupname, prio, lnum, typenr);
+ return;
+ }
+
+***************
+*** 6106,6112 ****
+ if (next != NULL)
+ next->prev = sign->prev;
+ lnum = sign->lnum;
+! vim_free(sign->group);
+ vim_free(sign);
+ // Check whether only one sign needs to be deleted
+ if (group == NULL || (*group != '*' && id != 0))
+--- 6180,6187 ----
+ if (next != NULL)
+ next->prev = sign->prev;
+ lnum = sign->lnum;
+! if (sign->group != NULL)
+! sign_group_unref(sign->group->sg_name);
+ vim_free(sign);
+ // Check whether only one sign needs to be deleted
+ if (group == NULL || (*group != '*' && id != 0))
+***************
+*** 6269,6275 ****
+ *lastp = next;
+ if (next != NULL)
+ next->prev = sign->prev;
+! vim_free(sign->group);
+ vim_free(sign);
+ }
+ else
+--- 6344,6351 ----
+ *lastp = next;
+ if (next != NULL)
+ next->prev = sign->prev;
+! if (sign->group != NULL)
+! sign_group_unref(sign->group->sg_name);
+ vim_free(sign);
+ }
+ else
+***************
+*** 6317,6326 ****
+ }
+ FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+ if (!sign_in_group(sign, sign_group))
+ continue;
+ if (sign->group != NULL)
+! vim_snprintf(group, BUFSIZ, " group=%s", sign->group);
+ else
+ group[0] = '\0';
+ vim_snprintf(lbuf, BUFSIZ, _(" line=%ld id=%d%s name=%s "
+--- 6393,6405 ----
+ }
+ FOR_ALL_SIGNS_IN_BUF(buf)
+ {
++ if (got_int)
++ break;
+ if (!sign_in_group(sign, sign_group))
+ continue;
+ if (sign->group != NULL)
+! vim_snprintf(group, BUFSIZ, " group=%s",
+! sign->group->sg_name);
+ else
+ group[0] = '\0';
+ vim_snprintf(lbuf, BUFSIZ, _(" line=%ld id=%d%s name=%s "
+*** ../vim-8.1.0631/src/ex_cmds.c 2018-12-21 16:04:16.320437461 +0100
+--- src/ex_cmds.c 2018-12-24 20:15:59.744514267 +0100
+***************
+*** 8180,8186 ****
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"), arg);
+ }
+! else if (id <= 0 && !(idx == SIGNCMD_UNPLACE && id == -2))
+ {
+ if ((group == NULL) && (lnum >= 0 || sign_name != NULL))
+ EMSG(_(e_invarg));
+--- 8180,8186 ----
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"), arg);
+ }
+! else if (id <= 0 && idx == SIGNCMD_PLACE)
+ {
+ if ((group == NULL) && (lnum >= 0 || sign_name != NULL))
+ EMSG(_(e_invarg));
+*** ../vim-8.1.0631/src/structs.h 2018-12-24 00:22:35.739150151 +0100
+--- src/structs.h 2018-12-24 20:15:59.744514267 +0100
+***************
+*** 733,738 ****
+--- 733,749 ----
+
+
+ #if defined(FEAT_SIGNS) || defined(PROTO)
++ // Sign group
++ typedef struct signgroup_S
++ {
++ short_u refcount; // number of signs in this group
++ char_u sg_name[1]; // sign group name
++ } signgroup_T;
++
++ // Macros to get the sign group structure from the group name
++ #define SGN_KEY_OFF offsetof(signgroup_T, sg_name)
++ #define HI2SG(hi) ((signgroup_T *)((hi)->hi_key - SGN_KEY_OFF))
++
+ typedef struct signlist signlist_T;
+
+ struct signlist
+***************
+*** 740,746 ****
+ int id; /* unique identifier for each placed sign */
+ linenr_T lnum; /* line number which has this sign */
+ int typenr; /* typenr of sign */
+! char_u *group; /* sign group */
+ int priority; /* priority for highlighting */
+ signlist_T *next; /* next signlist entry */
+ signlist_T *prev; /* previous entry -- for easy reordering */
+--- 751,757 ----
+ int id; /* unique identifier for each placed sign */
+ linenr_T lnum; /* line number which has this sign */
+ int typenr; /* typenr of sign */
+! signgroup_T *group; /* sign group */
+ int priority; /* priority for highlighting */
+ signlist_T *next; /* next signlist entry */
+ signlist_T *prev; /* previous entry -- for easy reordering */
+*** ../vim-8.1.0631/src/testdir/test_signs.vim 2018-12-21 15:16:57.483579762 +0100
+--- src/testdir/test_signs.vim 2018-12-24 20:15:59.744514267 +0100
+***************
+*** 59,65 ****
+ redraw
+
+ " Check that we can't change sign.
+! call assert_fails("exe 'sign place 40 name=Sign1 buffer=' . bufnr('%')", 'E885:')
+
+ " Check placed signs
+ let a=execute('sign place')
+--- 59,65 ----
+ redraw
+
+ " Check that we can't change sign.
+! call assert_fails("sign place 40 name=Sign1 buffer=" . bufnr('%'), 'E885:')
+
+ " Check placed signs
+ let a=execute('sign place')
+***************
+*** 68,74 ****
+ " Unplace the sign and try jumping to it again should fail.
+ sign unplace 41
+ 1
+! call assert_fails("exe 'sign jump 41 buffer=' . bufnr('%')", 'E157:')
+ call assert_equal('a', getline('.'))
+
+ " Unplace sign on current line.
+--- 68,74 ----
+ " Unplace the sign and try jumping to it again should fail.
+ sign unplace 41
+ 1
+! call assert_fails("sign jump 41 buffer=" . bufnr('%'), 'E157:')
+ call assert_equal('a', getline('.'))
+
+ " Unplace sign on current line.
+***************
+*** 132,148 ****
+ sign undefine Sign4
+
+ " Error cases
+! call assert_fails("exe 'sign place abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
+! call assert_fails("exe 'sign unplace abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
+! call assert_fails("exe 'sign place 1abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
+! call assert_fails("exe 'sign unplace 2abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
+ call assert_fails("sign unplace 2 *", 'E474:')
+! call assert_fails("exe 'sign place 1 line=3 name=Sign1 buffer=' . bufnr('%') a", 'E488:')
+! call assert_fails("exe 'sign place name=Sign1 buffer=' . bufnr('%')", 'E474:')
+! call assert_fails("exe 'sign place line=10 buffer=' . bufnr('%')", 'E474:')
+! call assert_fails("exe 'sign unplace 2 line=10 buffer=' . bufnr('%')", 'E474:')
+! call assert_fails("exe 'sign unplace 2 name=Sign1 buffer=' . bufnr('%')", 'E474:')
+! call assert_fails("exe 'sign place 2 line=3 buffer=' . bufnr('%')", 'E474:')
+ call assert_fails("sign place 2", 'E474:')
+ call assert_fails("sign place abc", 'E474:')
+ call assert_fails("sign place 5 line=3", 'E474:')
+--- 132,153 ----
+ sign undefine Sign4
+
+ " Error cases
+! call assert_fails("sign place abc line=3 name=Sign1 buffer=" .
+! \ bufnr('%'), 'E474:')
+! call assert_fails("sign unplace abc name=Sign1 buffer=" .
+! \ bufnr('%'), 'E474:')
+! call assert_fails("sign place 1abc line=3 name=Sign1 buffer=" .
+! \ bufnr('%'), 'E474:')
+! call assert_fails("sign unplace 2abc name=Sign1 buffer=" .
+! \ bufnr('%'), 'E474:')
+ call assert_fails("sign unplace 2 *", 'E474:')
+! call assert_fails("sign place 1 line=3 name=Sign1 buffer=" .
+! \ bufnr('%') . " a", 'E488:')
+! call assert_fails("sign place name=Sign1 buffer=" . bufnr('%'), 'E474:')
+! call assert_fails("sign place line=10 buffer=" . bufnr('%'), 'E474:')
+! call assert_fails("sign unplace 2 line=10 buffer=" . bufnr('%'), 'E474:')
+! call assert_fails("sign unplace 2 name=Sign1 buffer=" . bufnr('%'), 'E474:')
+! call assert_fails("sign place 2 line=3 buffer=" . bufnr('%'), 'E474:')
+ call assert_fails("sign place 2", 'E474:')
+ call assert_fails("sign place abc", 'E474:')
+ call assert_fails("sign place 5 line=3", 'E474:')
+***************
+*** 157,163 ****
+ sign undefine Sign1
+ sign undefine Sign2
+ sign undefine Sign3
+! call assert_fails("exe 'sign place 41 line=3 name=Sign1 buffer=' . bufnr('%')", 'E155:')
+ endfunc
+
+ " Undefining placed sign is not recommended.
+--- 162,169 ----
+ sign undefine Sign1
+ sign undefine Sign2
+ sign undefine Sign3
+! call assert_fails("sign place 41 line=3 name=Sign1 buffer=" .
+! \ bufnr('%'), 'E155:')
+ endfunc
+
+ " Undefining placed sign is not recommended.
+***************
+*** 236,268 ****
+ call assert_fails('sign place 1 buffer=999', 'E158:')
+ call assert_fails('sign define Sign2 text=', 'E239:')
+ " Non-numeric identifier for :sign place
+! call assert_fails("exe 'sign place abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
+ " Non-numeric identifier for :sign unplace
+! call assert_fails("exe 'sign unplace abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
+ " Number followed by an alphabet as sign identifier for :sign place
+! call assert_fails("exe 'sign place 1abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
+ " Number followed by an alphabet as sign identifier for :sign unplace
+! call assert_fails("exe 'sign unplace 2abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
+ " Sign identifier and '*' for :sign unplace
+ call assert_fails("sign unplace 2 *", 'E474:')
+ " Trailing characters after buffer number for :sign place
+! call assert_fails("exe 'sign place 1 line=3 name=Sign1 buffer=' . bufnr('%') . 'xxx'", 'E488:')
+ " Trailing characters after buffer number for :sign unplace
+! call assert_fails("exe 'sign unplace 1 buffer=' . bufnr('%') . 'xxx'", 'E488:')
+! call assert_fails("exe 'sign unplace * buffer=' . bufnr('%') . 'xxx'", 'E488:')
+ call assert_fails("sign unplace 1 xxx", 'E474:')
+ call assert_fails("sign unplace * xxx", 'E474:')
+ call assert_fails("sign unplace xxx", 'E474:')
+ " Placing a sign without line number
+! call assert_fails("exe 'sign place name=Sign1 buffer=' . bufnr('%')", 'E474:')
+ " Placing a sign without sign name
+! call assert_fails("exe 'sign place line=10 buffer=' . bufnr('%')", 'E474:')
+ " Unplacing a sign with line number
+! call assert_fails("exe 'sign unplace 2 line=10 buffer=' . bufnr('%')", 'E474:')
+ " Unplacing a sign with sign name
+! call assert_fails("exe 'sign unplace 2 name=Sign1 buffer=' . bufnr('%')", 'E474:')
+ " Placing a sign without sign name
+! call assert_fails("exe 'sign place 2 line=3 buffer=' . bufnr('%')", 'E474:')
+ " Placing a sign with only sign identifier
+ call assert_fails("sign place 2", 'E474:')
+ " Placing a sign with only a name
+--- 242,274 ----
+ call assert_fails('sign place 1 buffer=999', 'E158:')
+ call assert_fails('sign define Sign2 text=', 'E239:')
+ " Non-numeric identifier for :sign place
+! call assert_fails("sign place abc line=3 name=Sign1 buffer=" . bufnr('%'), 'E474:')
+ " Non-numeric identifier for :sign unplace
+! call assert_fails("sign unplace abc name=Sign1 buffer=" . bufnr('%'), 'E474:')
+ " Number followed by an alphabet as sign identifier for :sign place
+! call assert_fails("sign place 1abc line=3 name=Sign1 buffer=" . bufnr('%'), 'E474:')
+ " Number followed by an alphabet as sign identifier for :sign unplace
+! call assert_fails("sign unplace 2abc name=Sign1 buffer=" . bufnr('%'), 'E474:')
+ " Sign identifier and '*' for :sign unplace
+ call assert_fails("sign unplace 2 *", 'E474:')
+ " Trailing characters after buffer number for :sign place
+! call assert_fails("sign place 1 line=3 name=Sign1 buffer=" . bufnr('%') . 'xxx', 'E488:')
+ " Trailing characters after buffer number for :sign unplace
+! call assert_fails("sign unplace 1 buffer=" . bufnr('%') . 'xxx', 'E488:')
+! call assert_fails("sign unplace * buffer=" . bufnr('%') . 'xxx', 'E488:')
+ call assert_fails("sign unplace 1 xxx", 'E474:')
+ call assert_fails("sign unplace * xxx", 'E474:')
+ call assert_fails("sign unplace xxx", 'E474:')
+ " Placing a sign without line number
+! call assert_fails("sign place name=Sign1 buffer=" . bufnr('%'), 'E474:')
+ " Placing a sign without sign name
+! call assert_fails("sign place line=10 buffer=" . bufnr('%'), 'E474:')
+ " Unplacing a sign with line number
+! call assert_fails("sign unplace 2 line=10 buffer=" . bufnr('%'), 'E474:')
+ " Unplacing a sign with sign name
+! call assert_fails("sign unplace 2 name=Sign1 buffer=" . bufnr('%'), 'E474:')
+ " Placing a sign without sign name
+! call assert_fails("sign place 2 line=3 buffer=" . bufnr('%'), 'E474:')
+ " Placing a sign with only sign identifier
+ call assert_fails("sign place 2", 'E474:')
+ " Placing a sign with only a name
+***************
+*** 574,597 ****
+ call sign_unplace('*')
+
+ " Test for :sign command and groups
+! exe 'sign place 5 line=10 name=sign1 file=' . fname
+! exe 'sign place 5 group=g1 line=10 name=sign1 file=' . fname
+! exe 'sign place 5 group=g2 line=10 name=sign1 file=' . fname
+
+ " Test for :sign place group={group} file={fname}
+! let a = execute('sign place file=' . fname)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 name=sign1 priority=10\n", a)
+
+! let a = execute('sign place group=g2 file=' . fname)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 group=g2 name=sign1 priority=10\n", a)
+
+! let a = execute('sign place group=* file=' . fname)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=10 id=5 group=g2 name=sign1 priority=10\n" .
+ \ " line=10 id=5 group=g1 name=sign1 priority=10\n" .
+ \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+! let a = execute('sign place group=xyz file=' . fname)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n", a)
+
+ call sign_unplace('*')
+--- 580,603 ----
+ call sign_unplace('*')
+
+ " Test for :sign command and groups
+! sign place 5 line=10 name=sign1 file=Xsign
+! sign place 5 group=g1 line=10 name=sign1 file=Xsign
+! sign place 5 group=g2 line=10 name=sign1 file=Xsign
+
+ " Test for :sign place group={group} file={fname}
+! let a = execute('sign place file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 name=sign1 priority=10\n", a)
+
+! let a = execute('sign place group=g2 file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 group=g2 name=sign1 priority=10\n", a)
+
+! let a = execute('sign place group=* file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=10 id=5 group=g2 name=sign1 priority=10\n" .
+ \ " line=10 id=5 group=g1 name=sign1 priority=10\n" .
+ \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+! let a = execute('sign place group=xyz file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n", a)
+
+ call sign_unplace('*')
+***************
+*** 624,645 ****
+ \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " Test for :sign unplace
+! exe 'sign unplace 5 group=g2 file=' . fname
+ call assert_equal([], sign_getplaced(bnum, {'group' : 'g2'})[0].signs)
+
+ exe 'sign unplace 5 group=g1 buffer=' . bnum
+ call assert_equal([], sign_getplaced(bnum, {'group' : 'g1'})[0].signs)
+
+! exe 'sign unplace 5 group=xy file=' . fname
+ call assert_equal(1, len(sign_getplaced(bnum, {'group' : '*'})[0].signs))
+
+ " Test for removing all the signs. Place the signs again for this test
+! exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
+! exe 'sign place 5 group=g2 line=12 name=sign1 file=' . fname
+! exe 'sign place 6 line=20 name=sign1 file=' . fname
+! exe 'sign place 6 group=g1 line=21 name=sign1 file=' . fname
+! exe 'sign place 6 group=g2 line=22 name=sign1 file=' . fname
+! exe 'sign unplace 5 group=* file=' . fname
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=20 id=6 name=sign1 priority=10\n" .
+--- 630,651 ----
+ \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " Test for :sign unplace
+! sign unplace 5 group=g2 file=Xsign
+ call assert_equal([], sign_getplaced(bnum, {'group' : 'g2'})[0].signs)
+
+ exe 'sign unplace 5 group=g1 buffer=' . bnum
+ call assert_equal([], sign_getplaced(bnum, {'group' : 'g1'})[0].signs)
+
+! sign unplace 5 group=xy file=Xsign
+ call assert_equal(1, len(sign_getplaced(bnum, {'group' : '*'})[0].signs))
+
+ " Test for removing all the signs. Place the signs again for this test
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+! sign place 5 group=g2 line=12 name=sign1 file=Xsign
+! sign place 6 line=20 name=sign1 file=Xsign
+! sign place 6 group=g1 line=21 name=sign1 file=Xsign
+! sign place 6 group=g2 line=22 name=sign1 file=Xsign
+! sign unplace 5 group=* file=Xsign
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=20 id=6 name=sign1 priority=10\n" .
+***************
+*** 647,663 ****
+ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+ " Remove all the signs from the global group
+! exe 'sign unplace * file=' . fname
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=21 id=6 group=g1 name=sign1 priority=10\n" .
+ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+ " Remove all the signs from a particular group
+! exe 'sign place 5 line=10 name=sign1 file=' . fname
+! exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
+! exe 'sign place 5 group=g2 line=12 name=sign1 file=' . fname
+! exe 'sign unplace * group=g1 file=' . fname
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=10 id=5 name=sign1 priority=10\n" .
+--- 653,669 ----
+ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+ " Remove all the signs from the global group
+! sign unplace * file=Xsign
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=21 id=6 group=g1 name=sign1 priority=10\n" .
+ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+ " Remove all the signs from a particular group
+! sign place 5 line=10 name=sign1 file=Xsign
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+! sign place 5 group=g2 line=12 name=sign1 file=Xsign
+! sign unplace * group=g1 file=Xsign
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=10 id=5 name=sign1 priority=10\n" .
+***************
+*** 665,690 ****
+ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+ " Remove all the signs from all the groups in a file
+! exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
+! exe 'sign place 6 line=20 name=sign1 file=' . fname
+! exe 'sign place 6 group=g1 line=21 name=sign1 file=' . fname
+! exe 'sign unplace * group=* file=' . fname
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\n", a)
+
+ " Remove a particular sign id in a group from all the files
+! exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
+ sign unplace 5 group=g1
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\n", a)
+
+ " Remove a particular sign id in all the groups from all the files
+! exe 'sign place 5 line=10 name=sign1 file=' . fname
+! exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
+! exe 'sign place 5 group=g2 line=12 name=sign1 file=' . fname
+! exe 'sign place 6 line=20 name=sign1 file=' . fname
+! exe 'sign place 6 group=g1 line=21 name=sign1 file=' . fname
+! exe 'sign place 6 group=g2 line=22 name=sign1 file=' . fname
+ sign unplace 5 group=*
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+--- 671,696 ----
+ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+ " Remove all the signs from all the groups in a file
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+! sign place 6 line=20 name=sign1 file=Xsign
+! sign place 6 group=g1 line=21 name=sign1 file=Xsign
+! sign unplace * group=* file=Xsign
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\n", a)
+
+ " Remove a particular sign id in a group from all the files
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+ sign unplace 5 group=g1
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\n", a)
+
+ " Remove a particular sign id in all the groups from all the files
+! sign place 5 line=10 name=sign1 file=Xsign
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+! sign place 5 group=g2 line=12 name=sign1 file=Xsign
+! sign place 6 line=20 name=sign1 file=Xsign
+! sign place 6 group=g1 line=21 name=sign1 file=Xsign
+! sign place 6 group=g2 line=22 name=sign1 file=Xsign
+ sign unplace 5 group=*
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+***************
+*** 693,706 ****
+ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+ " Remove all the signs from all the groups in all the files
+! exe 'sign place 5 line=10 name=sign1 file=' . fname
+! exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
+ sign unplace * group=*
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\n", a)
+
+ " Error cases
+! call assert_fails("exe 'sign place 3 group= name=sign1 buffer=' . bnum", 'E474:')
+
+ call delete("Xsign")
+ call sign_unplace('*')
+--- 699,712 ----
+ \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+ " Remove all the signs from all the groups in all the files
+! sign place 5 line=10 name=sign1 file=Xsign
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+ sign unplace * group=*
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\n", a)
+
+ " Error cases
+! call assert_fails("sign place 3 group= name=sign1 buffer=" . bnum, 'E474:')
+
+ call delete("Xsign")
+ call sign_unplace('*')
+*** ../vim-8.1.0631/src/version.c 2018-12-24 19:15:15.551304134 +0100
+--- src/version.c 2018-12-24 20:18:15.011404035 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 632,
+ /**/
+
+--
+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.0633 b/data/vim/patches/8.1.0633
new file mode 100644
index 000000000..dff65b41f
--- /dev/null
+++ b/data/vim/patches/8.1.0633
@@ -0,0 +1,445 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0633
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0633
+Problem: Crash when out of memory while opening a terminal window.
+Solution: Handle out-of-memory more gracefully.
+Files: src/terminal.c, src/libvterm/src/vterm.c,
+ src/libvterm/src/state.c, src/libvterm/src/termscreen.c
+
+
+*** ../vim-8.1.0632/src/terminal.c 2018-12-21 20:55:18.892739645 +0100
+--- src/terminal.c 2018-12-24 21:22:28.150773840 +0100
+***************
+*** 3430,3435 ****
+--- 3430,3436 ----
+ {
+ int index = 0;
+ VTermState *state = vterm_obtain_state(vterm);
++
+ for (; index < 16; index++)
+ {
+ VTermColor color;
+***************
+*** 3703,3710 ****
+
+ /*
+ * Create a new vterm and initialize it.
+ */
+! static void
+ create_vterm(term_T *term, int rows, int cols)
+ {
+ VTerm *vterm;
+--- 3704,3712 ----
+
+ /*
+ * Create a new vterm and initialize it.
++ * Return FAIL when out of memory.
+ */
+! static int
+ create_vterm(term_T *term, int rows, int cols)
+ {
+ VTerm *vterm;
+***************
+*** 3714,3720 ****
+--- 3716,3733 ----
+
+ vterm = vterm_new_with_allocator(rows, cols, &vterm_allocator, NULL);
+ term->tl_vterm = vterm;
++ if (vterm == NULL)
++ return FAIL;
++
++ // Allocate screen and state here, so we can bail out if that fails.
++ state = vterm_obtain_state(vterm);
+ screen = vterm_obtain_screen(vterm);
++ if (state == NULL || screen == NULL)
++ {
++ vterm_free(vterm);
++ return FAIL;
++ }
++
+ vterm_screen_set_callbacks(screen, &screen_callbacks, term);
+ /* TODO: depends on 'encoding'. */
+ vterm_set_utf8(vterm, 1);
+***************
+*** 3722,3728 ****
+ init_default_colors(term);
+
+ vterm_state_set_default_colors(
+! vterm_obtain_state(vterm),
+ &term->tl_default_color.fg,
+ &term->tl_default_color.bg);
+
+--- 3735,3741 ----
+ init_default_colors(term);
+
+ vterm_state_set_default_colors(
+! state,
+ &term->tl_default_color.fg,
+ &term->tl_default_color.bg);
+
+***************
+*** 3746,3754 ****
+ #else
+ value.boolean = 0;
+ #endif
+- state = vterm_obtain_state(vterm);
+ vterm_state_set_termprop(state, VTERM_PROP_CURSORBLINK, &value);
+ vterm_state_set_unrecognised_fallbacks(state, &parser_fallbacks, term);
+ }
+
+ /*
+--- 3759,3768 ----
+ #else
+ value.boolean = 0;
+ #endif
+ vterm_state_set_termprop(state, VTERM_PROP_CURSORBLINK, &value);
+ vterm_state_set_unrecognised_fallbacks(state, &parser_fallbacks, term);
++
++ return OK;
+ }
+
+ /*
+***************
+*** 5629,5635 ****
+ vim_free(cwd_wchar);
+ vim_free(env_wchar);
+
+! create_vterm(term, term->tl_rows, term->tl_cols);
+
+ #if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ if (opt->jo_set2 & JO2_ANSI_COLORS)
+--- 5643,5650 ----
+ vim_free(cwd_wchar);
+ vim_free(env_wchar);
+
+! if (create_vterm(term, term->tl_rows, term->tl_cols) == FAIL)
+! goto failed;
+
+ #if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ if (opt->jo_set2 & JO2_ANSI_COLORS)
+***************
+*** 5710,5716 ****
+ char in_name[80], out_name[80];
+ channel_T *channel = NULL;
+
+! create_vterm(term, term->tl_rows, term->tl_cols);
+
+ vim_snprintf(in_name, sizeof(in_name), "\\\\.\\pipe\\vim-%d-in-%d",
+ GetCurrentProcessId(),
+--- 5725,5732 ----
+ char in_name[80], out_name[80];
+ channel_T *channel = NULL;
+
+! if (create_vterm(term, term->tl_rows, term->tl_cols) == FAIL)
+! return FAIL;
+
+ vim_snprintf(in_name, sizeof(in_name), "\\\\.\\pipe\\vim-%d-in-%d",
+ GetCurrentProcessId(),
+***************
+*** 5822,5828 ****
+ jobopt_T *opt,
+ jobopt_T *orig_opt UNUSED)
+ {
+! create_vterm(term, term->tl_rows, term->tl_cols);
+
+ #if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ if (opt->jo_set2 & JO2_ANSI_COLORS)
+--- 5838,5845 ----
+ jobopt_T *opt,
+ jobopt_T *orig_opt UNUSED)
+ {
+! if (create_vterm(term, term->tl_rows, term->tl_cols) == FAIL)
+! return FAIL;
+
+ #if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ if (opt->jo_set2 & JO2_ANSI_COLORS)
+***************
+*** 5844,5850 ****
+ static int
+ create_pty_only(term_T *term, jobopt_T *opt)
+ {
+! create_vterm(term, term->tl_rows, term->tl_cols);
+
+ term->tl_job = job_alloc();
+ if (term->tl_job == NULL)
+--- 5861,5868 ----
+ static int
+ create_pty_only(term_T *term, jobopt_T *opt)
+ {
+! if (create_vterm(term, term->tl_rows, term->tl_cols) == FAIL)
+! return FAIL;
+
+ term->tl_job = job_alloc();
+ if (term->tl_job == NULL)
+*** ../vim-8.1.0632/src/libvterm/src/vterm.c 2018-12-15 14:49:30.800096933 +0100
+--- src/libvterm/src/vterm.c 2018-12-24 21:26:14.100725256 +0100
+***************
+*** 1,5 ****
+--- 1,6 ----
+ #define DEFINE_INLINES
+
++ /* vim: set sw=2 : */
+ #include "vterm_internal.h"
+
+ #include <stdio.h>
+***************
+*** 41,46 ****
+--- 42,49 ----
+ /* Need to bootstrap using the allocator function directly */
+ VTerm *vt = (*funcs->malloc)(sizeof(VTerm), allocdata);
+
++ if (vt == NULL)
++ return NULL;
+ vt->allocator = funcs;
+ vt->allocdata = allocdata;
+
+***************
+*** 55,64 ****
+--- 58,78 ----
+ vt->parser.strbuffer_len = 500; /* should be able to hold an OSC string */
+ vt->parser.strbuffer_cur = 0;
+ vt->parser.strbuffer = vterm_allocator_malloc(vt, vt->parser.strbuffer_len);
++ if (vt->parser.strbuffer == NULL)
++ {
++ vterm_allocator_free(vt, vt);
++ return NULL;
++ }
+
+ vt->outbuffer_len = 200;
+ vt->outbuffer_cur = 0;
+ vt->outbuffer = vterm_allocator_malloc(vt, vt->outbuffer_len);
++ if (vt->outbuffer == NULL)
++ {
++ vterm_allocator_free(vt, vt->parser.strbuffer);
++ vterm_allocator_free(vt, vt);
++ return NULL;
++ }
+
+ return vt;
+ }
+***************
+*** 82,90 ****
+ return (*vt->allocator->malloc)(size, vt->allocdata);
+ }
+
+ INTERNAL void vterm_allocator_free(VTerm *vt, void *ptr)
+ {
+! (*vt->allocator->free)(ptr, vt->allocdata);
+ }
+
+ void vterm_get_size(const VTerm *vt, int *rowsp, int *colsp)
+--- 96,108 ----
+ return (*vt->allocator->malloc)(size, vt->allocdata);
+ }
+
++ /*
++ * Free "ptr" unless it is NULL.
++ */
+ INTERNAL void vterm_allocator_free(VTerm *vt, void *ptr)
+ {
+! if (ptr)
+! (*vt->allocator->free)(ptr, vt->allocdata);
+ }
+
+ void vterm_get_size(const VTerm *vt, int *rowsp, int *colsp)
+*** ../vim-8.1.0632/src/libvterm/src/state.c 2018-07-09 20:39:12.824845063 +0200
+--- src/libvterm/src/state.c 2018-12-24 20:45:42.697972984 +0100
+***************
+*** 53,58 ****
+--- 53,60 ----
+ {
+ VTermState *state = vterm_allocator_malloc(vt, sizeof(VTermState));
+
++ if (state == NULL)
++ return NULL;
+ state->vt = vt;
+
+ state->rows = vt->rows;
+***************
+*** 1693,1698 ****
+--- 1695,1704 ----
+ on_resize /* resize */
+ };
+
++ /*
++ * Return the existing state or create a new one.
++ * Returns NULL when out of memory.
++ */
+ VTermState *vterm_obtain_state(VTerm *vt)
+ {
+ VTermState *state;
+***************
+*** 1700,1705 ****
+--- 1706,1713 ----
+ return vt->state;
+
+ state = vterm_state_new(vt);
++ if (state == NULL)
++ return NULL;
+ vt->state = state;
+
+ state->combine_chars_size = 16;
+*** ../vim-8.1.0632/src/libvterm/src/termscreen.c 2018-09-13 17:23:05.169150892 +0200
+--- src/libvterm/src/termscreen.c 2018-12-24 21:29:52.730781805 +0100
+***************
+*** 1,5 ****
+--- 1,6 ----
+ #include "vterm_internal.h"
+
++ /* vim: set sw=2 : */
+ #include <stdio.h>
+ #include <string.h>
+
+***************
+*** 95,102 ****
+ }
+ }
+
+! if(buffer)
+! vterm_allocator_free(screen->vt, buffer);
+
+ return new_buffer;
+ }
+--- 96,102 ----
+ }
+ }
+
+! vterm_allocator_free(screen->vt, buffer);
+
+ return new_buffer;
+ }
+***************
+*** 518,525 ****
+ 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);
+
+--- 518,524 ----
+ screen->rows = new_rows;
+ screen->cols = new_cols;
+
+! vterm_allocator_free(screen->vt, screen->sb_buffer);
+
+ screen->sb_buffer = vterm_allocator_malloc(screen->vt, sizeof(VTermScreenCell) * new_cols);
+
+***************
+*** 619,634 ****
+ &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);
+
+--- 618,638 ----
+ &setlineinfo /* setlineinfo */
+ };
+
++ /*
++ * Allocate a new screen and return it.
++ * Return NULL when out of memory.
++ */
+ static VTermScreen *screen_new(VTerm *vt)
+ {
+ VTermState *state = vterm_obtain_state(vt);
+ VTermScreen *screen;
+ int rows, cols;
+
+! if (state == NULL)
+ return NULL;
+ screen = vterm_allocator_malloc(vt, sizeof(VTermScreen));
++ if (screen == NULL)
++ return NULL;
+
+ vterm_get_size(vt, &rows, &cols);
+
+***************
+*** 646,655 ****
+ 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);
+
+--- 650,662 ----
+ 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);
++ if (screen->buffer == NULL || screen->sb_buffer == NULL)
++ {
++ vterm_screen_free(screen);
++ return NULL;
++ }
+
+ vterm_state_set_callbacks(screen->state, &state_cbs, screen);
+
+***************
+*** 659,669 ****
+ 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);
+ }
+
+--- 666,673 ----
+ INTERNAL void vterm_screen_free(VTermScreen *screen)
+ {
+ vterm_allocator_free(screen->vt, screen->buffers[0]);
+! vterm_allocator_free(screen->vt, screen->buffers[1]);
+ vterm_allocator_free(screen->vt, screen->sb_buffer);
+ vterm_allocator_free(screen->vt, screen);
+ }
+
+*** ../vim-8.1.0632/src/version.c 2018-12-24 20:23:39.440716979 +0100
+--- src/version.c 2018-12-24 21:34:22.808414341 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 633,
+ /**/
+
+--
+"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.0634 b/data/vim/patches/8.1.0634
new file mode 100644
index 000000000..1f1c150bc
--- /dev/null
+++ b/data/vim/patches/8.1.0634
@@ -0,0 +1,485 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0634
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0634
+Problem: Text properties cannot cross line boundaries.
+Solution: Support multi-line text properties.
+Files: src/textprop.c, src/testdir/test_textprop.vim,
+ runtime/doc/eval.txt
+
+
+*** ../vim-8.1.0633/src/textprop.c 2018-12-21 16:04:16.316437487 +0100
+--- src/textprop.c 2018-12-24 22:50:21.446758177 +0100
+***************
+*** 17,26 ****
+ * 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.
+ */
+
+--- 17,28 ----
+ * Text properties have a type, which can be used to specify highlighting.
+ *
+ * TODO:
++ * - When deleting a line where a prop ended, adjust flag of previous line.
++ * - When deleting a line where a prop started, adjust flag of next line.
++ * - When inserting a line add props that continue from previous line.
++ * - Adjust property column and length when text is inserted/deleted
+ * - 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
+ * - add mechanism to keep track of changed lines.
+ */
+
+***************
+*** 47,52 ****
+--- 49,55 ----
+
+ 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");
++ static char_u e_invalid_lnum[] = N_("E966: Invalid line number: %ld");
+
+ /*
+ * Find a property type by name, return the hashitem.
+***************
+*** 139,147 ****
+ 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;
+--- 142,152 ----
+ f_prop_add(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ linenr_T lnum;
+! linenr_T start_lnum;
+! linenr_T end_lnum;
+! colnr_T start_col;
+! colnr_T end_col;
+ dict_T *dict;
+ char_u *type_name;
+ proptype_T *type;
+ buf_T *buf = curbuf;
+***************
+*** 154,164 ****
+ textprop_T tmp_prop;
+ int i;
+
+! lnum = tv_get_number(&argvars[0]);
+! col = tv_get_number(&argvars[1]);
+! if (col < 1)
+ {
+! EMSGN(_(e_invalid_col), (long)col);
+ return;
+ }
+ if (argvars[2].v_type != VAR_DICT)
+--- 159,169 ----
+ textprop_T tmp_prop;
+ int i;
+
+! start_lnum = tv_get_number(&argvars[0]);
+! start_col = tv_get_number(&argvars[1]);
+! if (start_col < 1)
+ {
+! EMSGN(_(e_invalid_col), (long)start_col);
+ return;
+ }
+ if (argvars[2].v_type != VAR_DICT)
+***************
+*** 177,198 ****
+
+ 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 = dict_get_number(dict, (char_u *)"length");
+ else if (dict_find(dict, (char_u *)"end_col", -1) != NULL)
+ {
+! length = dict_get_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 = dict_get_number(dict, (char_u *)"id");
+--- 182,221 ----
+
+ if (dict_find(dict, (char_u *)"end_lnum", -1) != NULL)
+ {
+! end_lnum = dict_get_number(dict, (char_u *)"end_lnum");
+! if (end_lnum < start_lnum)
+! {
+! EMSG2(_(e_invargval), "end_lnum");
+! return;
+! }
+ }
++ else
++ end_lnum = start_lnum;
+
+ if (dict_find(dict, (char_u *)"length", -1) != NULL)
+! {
+! long length = dict_get_number(dict, (char_u *)"length");
+!
+! if (length < 1 || end_lnum > start_lnum)
+! {
+! EMSG2(_(e_invargval), "length");
+! return;
+! }
+! end_col = start_col + length - 1;
+! }
+ else if (dict_find(dict, (char_u *)"end_col", -1) != NULL)
+ {
+! end_col = dict_get_number(dict, (char_u *)"end_col");
+! if (end_col <= 0)
+ {
+ EMSG2(_(e_invargval), "end_col");
+ return;
+ }
+ }
++ else if (start_lnum == end_lnum)
++ end_col = start_col;
++ else
++ end_col = 1;
+
+ if (dict_find(dict, (char_u *)"id", -1) != NULL)
+ id = dict_get_number(dict, (char_u *)"id");
+***************
+*** 204,264 ****
+ 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);
+! textlen = buf->b_ml.ml_line_len - proplen * sizeof(textprop_T);
+!
+! if (col >= (colnr_T)textlen - 1)
+ {
+! 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.
+! 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(textprop_T),
+! sizeof(textprop_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);
+ }
+--- 227,312 ----
+ if (type == NULL)
+ return;
+
+! if (start_lnum < 1 || start_lnum > buf->b_ml.ml_line_count)
+ {
+! EMSGN(_(e_invalid_lnum), (long)start_lnum);
+ return;
+ }
+! if (end_lnum < start_lnum || end_lnum > buf->b_ml.ml_line_count)
+ {
+! EMSGN(_(e_invalid_lnum), (long)end_lnum);
+ return;
+ }
+
+! for (lnum = start_lnum; lnum <= end_lnum; ++lnum)
+ {
+! colnr_T col; // start column
+! long length; // in bytes
+
+! // Fetch the line to get the ml_line_len field updated.
+! proplen = get_text_props(buf, lnum, &props, TRUE);
+! textlen = buf->b_ml.ml_line_len - proplen * sizeof(textprop_T);
+!
+! if (lnum == start_lnum)
+! col = start_col;
+! else
+! col = 1;
+! if (col - 1 > (colnr_T)textlen)
+! {
+! EMSGN(_(e_invalid_col), (long)start_col);
+! return;
+! }
+
+! if (lnum == end_lnum)
+! length = end_col - col + 1;
+! else
+! length = textlen - col + 1;
+! if (length > textlen)
+! length = textlen; // can include the end-of-line
+! if (length < 1)
+! length = 1;
+!
+! // 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.
+! 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(textprop_T),
+! sizeof(textprop_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 = (lnum > start_lnum ? TP_FLAG_CONT_PREV : 0)
+! | (lnum < end_lnum ? TP_FLAG_CONT_NEXT : 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);
+ }
+*** ../vim-8.1.0633/src/testdir/test_textprop.vim 2018-12-13 22:17:52.881941445 +0100
+--- src/testdir/test_textprop.vim 2018-12-24 22:54:55.192278005 +0100
+***************
+*** 197,200 ****
+--- 197,230 ----
+ bwipe!
+ endfunc
+
++ func Test_prop_multiline()
++ call prop_type_add('comment', {'highlight': 'Directory'})
++ new
++ call setline(1, ['xxxxxxx', 'yyyyyyyyy', 'zzzzzzzz'])
++
++ " start halfway line 1, end halfway line 3
++ call prop_add(1, 3, {'end_lnum': 3, 'end_col': 5, 'type': 'comment'})
++ let expect1 = {'col': 3, 'length': 6, 'type': 'comment', 'start': 1, 'end': 0, 'id': 0}
++ call assert_equal([expect1], prop_list(1))
++ let expect2 = {'col': 1, 'length': 10, 'type': 'comment', 'start': 0, 'end': 0, 'id': 0}
++ call assert_equal([expect2], prop_list(2))
++ let expect3 = {'col': 1, 'length': 5, 'type': 'comment', 'start': 0, 'end': 1, 'id': 0}
++ call assert_equal([expect3], prop_list(3))
++ call prop_clear(1, 3)
++
++ " include all three lines
++ call prop_add(1, 1, {'end_lnum': 3, 'end_col': 999, 'type': 'comment'})
++ let expect1.col = 1
++ let expect1.length = 8
++ call assert_equal([expect1], prop_list(1))
++ call assert_equal([expect2], prop_list(2))
++ let expect3.length = 9
++ call assert_equal([expect3], prop_list(3))
++ call prop_clear(1, 3)
++
++ bwipe!
++ call prop_type_delete('comment')
++ endfunc
++
++
+ " TODO: screenshot test with highlighting
+*** ../vim-8.1.0633/runtime/doc/eval.txt 2018-12-22 13:27:59.119503967 +0100
+--- runtime/doc/eval.txt 2018-12-24 23:04:04.175009945 +0100
+***************
+*** 2304,2310 ****
+ 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
+--- 2318,2324 ----
+ 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} [, {props}]])
+ none remove all text properties
+ prop_find({props} [, {direction}])
+ Dict search for a text property
+***************
+*** 6679,6687 ****
+ 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
+--- 6695,6703 ----
+ used for a property that does not
+ continue in another line
+ "end_lnum" - line number for end of text
+! "end_col" - last column of the 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
+***************
+*** 6692,6699 ****
+ 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.
+--- 6708,6719 ----
+ 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" nor "end_col" are passed the property
+ will apply to one character.
++ The property can end exactly at the last character of the
++ text, or just after it. In the last case, if text is appended
++ to the line, the text property size will increase, also when
++ the property type does not have "end_incl" set.
+
+ "type" will first be looked up in the buffer the property is
+ added to. When not found, the global property types are used.
+***************
+*** 6702,6711 ****
+ 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.
+--- 6722,6731 ----
+ 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.
+***************
+*** 6765,6771 ****
+
+
+ *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).
+--- 6785,6791 ----
+
+
+ *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).
+***************
+*** 10011,10016 ****
+--- 10035,10041 ----
+ terminfo Compiled with terminfo instead of termcap.
+ termresponse Compiled with support for |t_RV| and |v:termresponse|.
+ textobjects Compiled with support for |text-objects|.
++ textprop Compiled with support for |text-properties|.
+ tgetent Compiled with tgetent support, able to use a termcap
+ or terminfo file.
+ timers Compiled with |timer_start()| support.
+*** ../vim-8.1.0633/src/version.c 2018-12-24 21:38:40.814173687 +0100
+--- src/version.c 2018-12-24 22:59:33.909541573 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 634,
+ /**/
+
+--
+Microsoft is to software what McDonalds is to gourmet cooking
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0635 b/data/vim/patches/8.1.0635
new file mode 100644
index 000000000..8a317fef6
--- /dev/null
+++ b/data/vim/patches/8.1.0635
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0635
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0635
+Problem: Coverity complains about null pointer use.
+Solution: Avoid using a null pointer.
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.0634/src/evalfunc.c 2018-12-23 19:10:05.010359907 +0100
+--- src/evalfunc.c 2018-12-24 23:28:15.362204919 +0100
+***************
+*** 13586,13592 ****
+ EMSG(_(e_invarg));
+ else
+ {
+! name = tv_get_string_chk(&argvars[0]);
+ val = (int)tv_get_number(&argvars[1]);
+
+ if (STRCMP(name, (char_u *)"redraw") == 0)
+--- 13586,13592 ----
+ EMSG(_(e_invarg));
+ else
+ {
+! name = tv_get_string(&argvars[0]);
+ val = (int)tv_get_number(&argvars[1]);
+
+ if (STRCMP(name, (char_u *)"redraw") == 0)
+*** ../vim-8.1.0634/src/version.c 2018-12-24 23:05:08.550418628 +0100
+--- src/version.c 2018-12-24 23:34:30.975524602 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 635,
+ /**/
+
+--
+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.0636 b/data/vim/patches/8.1.0636
new file mode 100644
index 000000000..658e123c9
--- /dev/null
+++ b/data/vim/patches/8.1.0636
@@ -0,0 +1,319 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0636
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0636
+Problem: line2byte() gives wrong values with text properties. (Bjorn Linse)
+Solution: Compute byte offsets differently when text properties were added.
+ (closes #3718)
+Files: src/structs.h, src/textprop.c, src/proto/textprop.pro,
+ src/memline.c, src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.0635/src/structs.h 2018-12-24 20:23:39.440716979 +0100
+--- src/structs.h 2018-12-25 21:40:12.265965208 +0100
+***************
+*** 2411,2417 ****
+ 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)
+--- 2411,2418 ----
+ dict_T *b_vars; /* internal variables, local to buffer */
+ #endif
+ #ifdef FEAT_TEXT_PROP
+! int b_has_textprop; // TRUE when text props were added
+! hashtab_T *b_proptypes; // text property types local to buffer
+ #endif
+
+ #if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
+*** ../vim-8.1.0635/src/textprop.c 2018-12-24 23:05:08.546418665 +0100
+--- src/textprop.c 2018-12-25 23:14:13.892679752 +0100
+***************
+*** 17,28 ****
+--- 17,32 ----
+ * Text properties have a type, which can be used to specify highlighting.
+ *
+ * TODO:
++ * - mismatch in column 1 being the first column
++ * - Let props overrule syntax HL.
+ * - When deleting a line where a prop ended, adjust flag of previous line.
+ * - When deleting a line where a prop started, adjust flag of next line.
+ * - When inserting a line add props that continue from previous line.
+ * - Adjust property column and length when text is inserted/deleted
+ * - 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
++ * - Also test line2byte() with many lines, so that ml_updatechunk() is taken
++ * into account.
+ * - add mechanism to keep track of changed lines.
+ */
+
+***************
+*** 261,267 ****
+ length = end_col - col + 1;
+ else
+ length = textlen - col + 1;
+! if (length > textlen)
+ length = textlen; // can include the end-of-line
+ if (length < 1)
+ length = 1;
+--- 265,271 ----
+ length = end_col - col + 1;
+ else
+ length = textlen - col + 1;
+! if (length > (long)textlen)
+ length = textlen; // can include the end-of-line
+ if (length < 1)
+ length = 1;
+***************
+*** 308,327 ****
+ 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
+--- 312,322 ----
+ buf->b_ml.ml_flags |= ML_LINE_DIRTY;
+ }
+
++ buf->b_has_textprop = TRUE; // this is never reset
+ redraw_buf_later(buf, NOT_VALID);
+ }
+
+ /*
+ * 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
+***************
+*** 334,341 ****
+ 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.
+--- 329,337 ----
+ size_t textlen;
+ size_t proplen;
+
+! // Be quick when no text property types have been defined or the buffer,
+! // unless we are adding one.
+! if (!buf->b_has_textprop && !will_change)
+ return 0;
+
+ // Fetch the line to get the ml_line_len field updated.
+*** ../vim-8.1.0635/src/proto/textprop.pro 2018-12-13 22:17:52.877941474 +0100
+--- src/proto/textprop.pro 2018-12-25 21:49:21.845257609 +0100
+***************
+*** 1,6 ****
+ /* 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);
+--- 1,5 ----
+*** ../vim-8.1.0635/src/memline.c 2018-12-16 14:37:35.845271247 +0100
+--- src/memline.c 2018-12-25 23:10:04.682706053 +0100
+***************
+*** 3179,3192 ****
+ curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
+
+ #ifdef FEAT_TEXT_PROP
+! 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;
+
+--- 3179,3192 ----
+ curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
+
+ #ifdef FEAT_TEXT_PROP
+! if (curbuf->b_has_textprop)
+ // Need to fetch the old line to copy over any text properties.
+ ml_get_buf(curbuf, lnum, TRUE);
+ #endif
+ }
+
+ #ifdef FEAT_TEXT_PROP
+! if (curbuf->b_has_textprop)
+ {
+ size_t oldtextlen = STRLEN(curbuf->b_ml.ml_line_ptr) + 1;
+
+***************
+*** 5131,5136 ****
+--- 5131,5137 ----
+ {
+ int count; /* number of entries in block */
+ int idx;
++ int end_idx;
+ int text_end;
+ int linecnt;
+
+***************
+*** 5154,5176 ****
+ (long)(buf->b_ml.ml_locked_low) + 1;
+ idx = curline - buf->b_ml.ml_locked_low;
+ curline = buf->b_ml.ml_locked_high + 1;
+! if (idx == 0)/* first line in block, text at the end */
+! text_end = dp->db_txt_end;
+! else
+! text_end = ((dp->db_index[idx - 1]) & DB_INDEX_MASK);
+! /* Compute index of last line to use in this MEMLINE */
+ rest = count - idx;
+ if (linecnt + rest > MLCS_MINL)
+ {
+! idx += MLCS_MINL - linecnt - 1;
+ linecnt = MLCS_MINL;
+ }
+ else
+ {
+! idx = count - 1;
+ linecnt += rest;
+ }
+! size += text_end - ((dp->db_index[idx]) & DB_INDEX_MASK);
+ }
+ buf->b_ml.ml_chunksize[curix].mlcs_numlines = linecnt;
+ buf->b_ml.ml_chunksize[curix + 1].mlcs_numlines -= linecnt;
+--- 5155,5193 ----
+ (long)(buf->b_ml.ml_locked_low) + 1;
+ idx = curline - buf->b_ml.ml_locked_low;
+ curline = buf->b_ml.ml_locked_high + 1;
+!
+! // compute index of last line to use in this MEMLINE
+ rest = count - idx;
+ if (linecnt + rest > MLCS_MINL)
+ {
+! end_idx = idx + MLCS_MINL - linecnt - 1;
+ linecnt = MLCS_MINL;
+ }
+ else
+ {
+! end_idx = count - 1;
+ linecnt += rest;
+ }
+! #ifdef FEAT_TEXT_PROP
+! if (buf->b_has_textprop)
+! {
+! int i;
+!
+! // We cannot use the text pointers to get the text length,
+! // the text prop info would also be counted. Go over the
+! // lines.
+! for (i = end_idx; i < idx; ++i)
+! size += STRLEN((char_u *)dp + (dp->db_index[i] & DB_INDEX_MASK)) + 1;
+! }
+! else
+! #endif
+! {
+! if (idx == 0)/* first line in block, text at the end */
+! text_end = dp->db_txt_end;
+! else
+! text_end = ((dp->db_index[idx - 1]) & DB_INDEX_MASK);
+! size += text_end - ((dp->db_index[end_idx]) & DB_INDEX_MASK);
+! }
+ }
+ buf->b_ml.ml_chunksize[curix].mlcs_numlines = linecnt;
+ buf->b_ml.ml_chunksize[curix + 1].mlcs_numlines -= linecnt;
+***************
+*** 5360,5366 ****
+ idx++;
+ }
+ }
+! len = text_end - ((dp->db_index[idx]) & DB_INDEX_MASK);
+ size += len;
+ if (offset != 0 && size >= offset)
+ {
+--- 5377,5396 ----
+ idx++;
+ }
+ }
+! #ifdef FEAT_TEXT_PROP
+! if (buf->b_has_textprop)
+! {
+! int i;
+!
+! // cannot use the db_index pointer, need to get the actual text
+! // lengths.
+! len = 0;
+! for (i = start_idx; i <= idx; ++i)
+! len += STRLEN((char_u *)dp + ((dp->db_index[idx]) & DB_INDEX_MASK)) + 1;
+! }
+! else
+! #endif
+! len = text_end - ((dp->db_index[idx]) & DB_INDEX_MASK);
+ size += len;
+ if (offset != 0 && size >= offset)
+ {
+*** ../vim-8.1.0635/src/testdir/test_textprop.vim 2018-12-24 23:05:08.546418665 +0100
+--- src/testdir/test_textprop.vim 2018-12-25 22:43:20.588109002 +0100
+***************
+*** 226,230 ****
+--- 226,242 ----
+ call prop_type_delete('comment')
+ endfunc
+
++ func Test_prop_byteoff()
++ call prop_type_add('comment', {'highlight': 'Directory'})
++ new
++ call setline(1, ['line1', 'line2', ''])
++ call assert_equal(13, line2byte(3))
++ call prop_add(1, 1, {'end_col': 3, 'type': 'comment'})
++ call assert_equal(13, line2byte(3))
++
++ bwipe!
++ call prop_type_delete('comment')
++ endfunc
++
+
+ " TODO: screenshot test with highlighting
+*** ../vim-8.1.0635/src/version.c 2018-12-24 23:35:09.119234692 +0100
+--- src/version.c 2018-12-25 23:14:27.288571042 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 636,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+44. Your friends no longer send you e-mail...they just log on to your 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.0637 b/data/vim/patches/8.1.0637
new file mode 100644
index 000000000..41d516940
--- /dev/null
+++ b/data/vim/patches/8.1.0637
@@ -0,0 +1,94 @@
+*** ../vim-8.1.0636/nsis/vimrc.ini 2018-12-26 00:54:07.179611231 +0100
+--- nsis/vimrc.ini 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,68 ****
+- [Settings]
+- NumFields=7
+-
+- [Field 1]
+- Type=GroupBox
+- Left=0
+- Right=-1
+- Top=0
+- Bottom=53
+- Text=" Key remapping "
+-
+- [Field 2]
+- Type=radiobutton
+- Text=Do not remap keys for Windows behavior (Default)
+- Left=10
+- Right=-10
+- Top=17
+- Bottom=25
+- State=1
+- Flags=GROUP
+-
+- [Field 3]
+- Type=radiobutton
+- Text=Remap a few keys for Windows behavior (<C-V>, <C-C>, <C-A>, <C-S>, <C-F>, etc)
+- Left=10
+- Right=-10
+- Top=30
+- Bottom=47
+- State=0
+- Flags=NOTABSTOP
+-
+- [Field 4]
+- Type=GroupBox
+- Left=0
+- Right=-1
+- Top=55
+- Bottom=-5
+- Text=" Mouse behavior "
+-
+- [Field 5]
+- Type=radiobutton
+- Text=Right button extends selection, left button starts visual mode (Unix)
+- Left=10
+- Right=-5
+- Top=72
+- Bottom=80
+- State=0
+- Flags=GROUP
+-
+- [Field 6]
+- Type=radiobutton
+- Text=Right button has a popup menu, left button starts select mode (Windows)
+- Left=10
+- Right=-5
+- Top=85
+- Bottom=93
+- State=0
+- Flags=NOTABSTOP
+-
+- [Field 7]
+- Type=radiobutton
+- Text=Right button has a popup menu, left button starts visual mode (Default)
+- Left=10
+- Right=-5
+- Top=98
+- Bottom=106
+- State=1
+- Flags=NOTABSTOP
+--- 0 ----
+*** ../vim-8.1.0636/Filelist 2018-12-26 00:50:01.545441998 +0100
+--- Filelist 2018-12-25 23:29:33.713480102 +0100
+***************
+*** 475,481 ****
+ src/xxd/Make_mvc.mak \
+ nsis/gvim.nsi \
+ nsis/gvim_version.nsh \
+- nsis/vimrc.ini \
+ nsis/README.txt \
+ nsis/lang/*.nsi \
+ uninstal.txt \
+--- 475,480 ----
+*** ../vim-8.1.0636/src/version.c 2018-12-26 00:54:26.347467800 +0100
+--- src/version.c 2018-12-26 00:55:15.735097933 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 637,
+ /**/
diff --git a/data/vim/patches/8.1.0638 b/data/vim/patches/8.1.0638
new file mode 100644
index 000000000..a88d7b2cb
--- /dev/null
+++ b/data/vim/patches/8.1.0638
@@ -0,0 +1,241 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0638
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0638
+Problem: Text property highlighting is off by one column. (Bjorn Linse)
+Solution: Update text property highlighting earlier. Let it overrule syntax
+ highlighting.
+Files: src/structs.h, src/screen.c
+
+
+*** ../vim-8.1.0637/src/structs.h 2018-12-25 23:15:41.795966567 +0100
+--- src/structs.h 2018-12-25 23:48:14.284675586 +0100
+***************
+*** 705,711 ****
+ */
+ 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
+--- 705,711 ----
+ */
+ typedef struct textprop_S
+ {
+! colnr_T tp_col; // start column (one based)
+ colnr_T tp_len; // length in bytes
+ int tp_id; // identifier
+ int tp_type; // property type
+*** ../vim-8.1.0637/src/screen.c 2018-12-22 17:07:45.771347741 +0100
+--- src/screen.c 2018-12-26 00:19:53.558481875 +0100
+***************
+*** 4294,4299 ****
+--- 4294,4359 ----
+ }
+ #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
++
+ /* Decide which of the highlight attributes to use. */
+ attr_pri = TRUE;
+ #ifdef LINE_ATTR
+***************
+*** 4653,4660 ****
+ #endif
+
+ #ifdef FEAT_SYN_HL
+! /* Get syntax attribute, unless still at the start of the line
+! * (double-wide char that doesn't fit). */
+ v = (long)(ptr - line);
+ if (has_syntax && v > 0)
+ {
+--- 4713,4720 ----
+ #endif
+
+ #ifdef FEAT_SYN_HL
+! // Get syntax attribute, unless still at the start of the line
+! // (double-wide char that doesn't fit).
+ v = (long)(ptr - line);
+ if (has_syntax && v > 0)
+ {
+***************
+*** 4686,4695 ****
+ line = ml_get_buf(wp->w_buffer, lnum, FALSE);
+ ptr = line + v;
+
+! if (!attr_pri)
+! char_attr = syntax_attr;
+! else
+! char_attr = hl_combine_attr(syntax_attr, char_attr);
+ # ifdef FEAT_CONCEAL
+ /* no concealing past the end of the line, it interferes
+ * with line highlighting */
+--- 4746,4761 ----
+ line = ml_get_buf(wp->w_buffer, lnum, FALSE);
+ ptr = line + v;
+
+! # ifdef FEAT_TEXT_PROP
+! // Text properties overrule syntax highlighting.
+! if (text_prop_attr == 0)
+! #endif
+! {
+! if (!attr_pri)
+! char_attr = syntax_attr;
+! else
+! char_attr = hl_combine_attr(syntax_attr, char_attr);
+! }
+ # ifdef FEAT_CONCEAL
+ /* no concealing past the end of the line, it interferes
+ * with line highlighting */
+***************
+*** 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
+--- 4767,4772 ----
+*** ../vim-8.1.0637/src/version.c 2018-12-25 23:36:44.942120387 +0100
+--- src/version.c 2018-12-26 00:18:03.287330017 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 638,
+ /**/
+
+--
+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.0639 b/data/vim/patches/8.1.0639
new file mode 100644
index 000000000..5a8686930
--- /dev/null
+++ b/data/vim/patches/8.1.0639
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.06
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0639
+Problem: text properties test fails on MS-Windows
+Solution: Set fileformat to "unix".
+Files: src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.0638/src/testdir/test_textprop.vim 2018-12-25 23:15:41.795966567 +0100
+--- src/testdir/test_textprop.vim 2018-12-26 01:07:38.665038274 +0100
+***************
+*** 230,235 ****
+--- 230,236 ----
+ call prop_type_add('comment', {'highlight': 'Directory'})
+ new
+ call setline(1, ['line1', 'line2', ''])
++ set ff=unix
+ call assert_equal(13, line2byte(3))
+ call prop_add(1, 1, {'end_col': 3, 'type': 'comment'})
+ call assert_equal(13, line2byte(3))
+*** ../vim-8.1.0638/src/version.c 2018-12-26 00:59:44.221080957 +0100
+--- src/version.c 2018-12-26 01:08:35.708503961 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 639,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+48. You get a tatoo that says "This body best viewed with Netscape 3.1 or
+ higher."
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0640 b/data/vim/patches/8.1.0640
new file mode 100644
index 000000000..bd6b4cce6
--- /dev/null
+++ b/data/vim/patches/8.1.0640
@@ -0,0 +1,103 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0640
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0640
+Problem: Get E14 while typing command :tab with 'incsearch' set.
+Solution: Do not give an error when looking for the command. (Yasuhiro
+ Higashi)
+Files: src/testdir/test_search.vim, src/ex_docmd.c
+
+
+*** ../vim-8.1.0639/src/testdir/test_search.vim 2018-12-14 15:46:59.519914793 +0100
+--- src/testdir/test_search.vim 2018-12-26 21:33:59.884818533 +0100
+***************
+*** 783,788 ****
+--- 783,802 ----
+ bwipe!
+ endfunc
+
++ func Test_incsearch_cmdline_modifier()
++ if !exists('+incsearch')
++ return
++ endif
++ call test_override("char_avail", 1)
++ new
++ call setline(1, ['foo'])
++ set incsearch
++ " Test that error E14 does not occur in parsing command modifier.
++ call feedkeys("V:tab", 'tx')
++
++ call Incsearch_cleanup()
++ endfunc
++
+ func Test_incsearch_scrolling()
+ if !CanRunVimInTerminal()
+ return
+*** ../vim-8.1.0639/src/ex_docmd.c 2018-12-23 19:10:05.010359907 +0100
+--- src/ex_docmd.c 2018-12-26 21:39:50.810259883 +0100
+***************
+*** 2827,2844 ****
+
+ 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
+ {
+! if (tabnr < 0 || tabnr > LAST_TAB_NR)
+ {
+! *errormsg = (char_u *)_(e_invrange);
+! return FAIL;
+ }
+- cmdmod.tab = tabnr + 1;
+ }
+ eap->cmd = p;
+ continue;
+--- 2827,2848 ----
+
+ case 't': if (checkforcmd(&p, "tab", 3))
+ {
+! if (!skip_only)
+ {
+! 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
+ {
+! if (tabnr < 0 || tabnr > LAST_TAB_NR)
+! {
+! *errormsg = (char_u *)_(e_invrange);
+! return FAIL;
+! }
+! cmdmod.tab = tabnr + 1;
+ }
+ }
+ eap->cmd = p;
+ continue;
+*** ../vim-8.1.0639/src/version.c 2018-12-26 01:08:56.344312939 +0100
+--- src/version.c 2018-12-26 21:44:08.068293990 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 640,
+ /**/
+
+--
+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.0641 b/data/vim/patches/8.1.0641
new file mode 100644
index 000000000..de6786a07
--- /dev/null
+++ b/data/vim/patches/8.1.0641
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0641
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0641
+Problem: No check for out-of-memory when converting regexp.
+Solution: Bail out when lalloc() returns NULL. (John Marriott)
+Files: src/regexp_nfa.c
+
+
+*** ../vim-8.1.0640/src/regexp_nfa.c 2018-07-17 05:43:50.483214748 +0200
+--- src/regexp_nfa.c 2018-12-26 21:52:12.684487595 +0100
+***************
+*** 3218,3225 ****
+
+ if (nfa_calc_size == FALSE)
+ {
+! /* Allocate space for the stack. Max states on the stack : nstate */
+ stack = (Frag_T *)lalloc((nstate + 1) * sizeof(Frag_T), TRUE);
+ stackp = stack;
+ stack_end = stack + (nstate + 1);
+ }
+--- 3218,3227 ----
+
+ if (nfa_calc_size == FALSE)
+ {
+! // Allocate space for the stack. Max states on the stack: "nstate'.
+ stack = (Frag_T *)lalloc((nstate + 1) * sizeof(Frag_T), TRUE);
++ if (stack == NULL)
++ return NULL;
+ stackp = stack;
+ stack_end = stack + (nstate + 1);
+ }
+*** ../vim-8.1.0640/src/version.c 2018-12-26 21:44:49.815970351 +0100
+--- src/version.c 2018-12-26 21:53:31.975857388 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 641,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+53. To find out what time it is, you send yourself an e-mail and check the
+ "Date:" field.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0642 b/data/vim/patches/8.1.0642
new file mode 100644
index 000000000..40f7adc8f
--- /dev/null
+++ b/data/vim/patches/8.1.0642
@@ -0,0 +1,164 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0642
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0642
+Problem: swapinfo() leaks memory. (Christian Brabandt)
+Solution: Avoid allocating the strings twice.
+Files: src/memline.c, src/dict.c, src/proto/dict.pro
+
+
+*** ../vim-8.1.0641/src/memline.c 2018-12-25 23:15:41.795966567 +0100
+--- src/memline.c 2018-12-26 22:51:14.081259880 +0100
+***************
+*** 2055,2075 ****
+ 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 */
+! 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));
+--- 2055,2070 ----
+ if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0))
+ {
+ if (ml_check_b0_id(&b0) == FAIL)
+! dict_add_string(d, "error", (char_u *)"Not a swap file");
+ else if (b0_magic_wrong(&b0))
+! dict_add_string(d, "error", (char_u *)"Magic number mismatch");
+ else
+ {
+ /* we have swap information */
+! dict_add_string_len(d, "version", b0.b0_version, 10);
+! dict_add_string_len(d, "user", b0.b0_uname, B0_UNAME_SIZE);
+! dict_add_string_len(d, "host", b0.b0_hname, B0_HNAME_SIZE);
+! dict_add_string_len(d, "fname", 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));
+***************
+*** 2080,2091 ****
+ }
+ }
+ 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"));
+ }
+ #endif
+
+--- 2075,2085 ----
+ }
+ }
+ else
+! dict_add_string(d, "error", (char_u *)"Cannot read file");
+ close(fd);
+ }
+ else
+! dict_add_string(d, "error", (char_u *)"Cannot open file");
+ }
+ #endif
+
+*** ../vim-8.1.0641/src/dict.c 2018-12-21 16:04:16.312437516 +0100
+--- src/dict.c 2018-12-26 22:46:22.175314033 +0100
+***************
+*** 370,382 ****
+ int
+ dict_add_string(dict_T *d, char *key, char_u *str)
+ {
+ dictitem_T *item;
+
+ item = dictitem_alloc((char_u *)key);
+ if (item == NULL)
+ return FAIL;
+ item->di_tv.v_type = VAR_STRING;
+! item->di_tv.vval.v_string = str != NULL ? vim_strsave(str) : NULL;
+ if (dict_add(d, item) == FAIL)
+ {
+ dictitem_free(item);
+--- 370,402 ----
+ int
+ dict_add_string(dict_T *d, char *key, char_u *str)
+ {
++ return dict_add_string_len(d, key, str, -1);
++ }
++
++ /*
++ * Add a string entry to dictionary "d".
++ * "str" will be copied to allocated memory.
++ * When "len" is -1 use the whole string, otherwise only this many bytes.
++ * Returns FAIL when out of memory and when key already exists.
++ */
++ int
++ dict_add_string_len(dict_T *d, char *key, char_u *str, int len)
++ {
+ dictitem_T *item;
++ char_u *val = NULL;
+
+ item = dictitem_alloc((char_u *)key);
+ if (item == NULL)
+ return FAIL;
+ item->di_tv.v_type = VAR_STRING;
+! if (str != NULL)
+! {
+! if (len == -1)
+! val = vim_strsave(str);
+! else
+! val = vim_strnsave(str, len);
+! }
+! item->di_tv.vval.v_string = val;
+ if (dict_add(d, item) == FAIL)
+ {
+ dictitem_free(item);
+*** ../vim-8.1.0641/src/proto/dict.pro 2018-12-14 15:38:28.323597695 +0100
+--- src/proto/dict.pro 2018-12-26 22:46:26.863281096 +0100
+***************
+*** 15,20 ****
+--- 15,21 ----
+ int dict_add(dict_T *d, dictitem_T *item);
+ int dict_add_number(dict_T *d, char *key, varnumber_T nr);
+ int dict_add_string(dict_T *d, char *key, char_u *str);
++ int dict_add_string_len(dict_T *d, char *key, char_u *str, int len);
+ int dict_add_list(dict_T *d, char *key, list_T *list);
+ int dict_add_dict(dict_T *d, char *key, dict_T *dict);
+ long dict_len(dict_T *d);
+*** ../vim-8.1.0641/src/version.c 2018-12-26 22:04:35.494546386 +0100
+--- src/version.c 2018-12-26 22:56:06.859194439 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 642,
+ /**/
+
+--
+"I simultaneously try to keep my head in the clouds and my feet on the
+ground. Sometimes it's a stretch, though." -- Larry Wall
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0643 b/data/vim/patches/8.1.0643
new file mode 100644
index 000000000..b3f467ea3
--- /dev/null
+++ b/data/vim/patches/8.1.0643
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0643
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0643
+Problem: Computing byte offset wrong. (Bjorn Linse)
+Solution: Use the right variable for array index.
+Files: src/memline.c, src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.0642/src/memline.c 2018-12-26 22:57:37.978550895 +0100
+--- src/memline.c 2018-12-26 23:41:19.484193715 +0100
+***************
+*** 5380,5386 ****
+ // lengths.
+ len = 0;
+ for (i = start_idx; i <= idx; ++i)
+! len += STRLEN((char_u *)dp + ((dp->db_index[idx]) & DB_INDEX_MASK)) + 1;
+ }
+ else
+ #endif
+--- 5380,5386 ----
+ // lengths.
+ len = 0;
+ for (i = start_idx; i <= idx; ++i)
+! len += STRLEN((char_u *)dp + ((dp->db_index[i]) & DB_INDEX_MASK)) + 1;
+ }
+ else
+ #endif
+*** ../vim-8.1.0642/src/testdir/test_textprop.vim 2018-12-26 01:08:56.344312939 +0100
+--- src/testdir/test_textprop.vim 2018-12-26 23:39:15.261354947 +0100
+***************
+*** 229,239 ****
+ func Test_prop_byteoff()
+ call prop_type_add('comment', {'highlight': 'Directory'})
+ new
+! call setline(1, ['line1', 'line2', ''])
+ set ff=unix
+! call assert_equal(13, line2byte(3))
+ call prop_add(1, 1, {'end_col': 3, 'type': 'comment'})
+! call assert_equal(13, line2byte(3))
+
+ bwipe!
+ call prop_type_delete('comment')
+--- 229,239 ----
+ func Test_prop_byteoff()
+ call prop_type_add('comment', {'highlight': 'Directory'})
+ new
+! call setline(1, ['line1', 'second line', ''])
+ set ff=unix
+! call assert_equal(19, line2byte(3))
+ call prop_add(1, 1, {'end_col': 3, 'type': 'comment'})
+! call assert_equal(19, line2byte(3))
+
+ bwipe!
+ call prop_type_delete('comment')
+*** ../vim-8.1.0642/src/version.c 2018-12-26 22:57:37.978550895 +0100
+--- src/version.c 2018-12-26 23:41:36.016040461 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 643,
+ /**/
+
+--
+"I don’t know how to make a screenshot" - Richard Stallman, July 2002
+(when asked to send a screenshot of his desktop for unix.se)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0644 b/data/vim/patches/8.1.0644
new file mode 100644
index 000000000..0c77967c9
--- /dev/null
+++ b/data/vim/patches/8.1.0644
@@ -0,0 +1,520 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0644
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0644
+Problem: Finding next sign ID is inefficient.
+Solution: Add next_sign_id. (Yegappan Lakshmanan, closes #3717)
+Files: runtime/doc/eval.txt, src/buffer.c, src/evalfunc.c, src/ex_cmds.c,
+ src/globals.h, src/main.c, src/proto/buffer.pro, src/structs.h,
+ src/testdir/test_signs.vim
+
+
+*** ../vim-8.1.0643/runtime/doc/eval.txt 2018-12-24 23:05:08.546418665 +0100
+--- runtime/doc/eval.txt 2018-12-27 00:19:40.089578543 +0100
+***************
+*** 7919,7928 ****
+ lnum select signs placed in this line. For the use
+ of {lnum}, see |line()|.
+ If {group} is '*', then signs in all the groups including the
+! global group are returned. If {group} is not supplied, then
+! only signs in the global group are returned. If no arguments
+! are supplied, then signs in the global group placed in all the
+! buffers are returned.
+
+ Each list item in the returned value is a dictionary with the
+ following entries:
+--- 7936,7945 ----
+ lnum select signs placed in this line. For the use
+ of {lnum}, see |line()|.
+ If {group} is '*', then signs in all the groups including the
+! global group are returned. If {group} is not supplied or is an
+! empty string, then only signs in the global group are
+! returned. If no arguments are supplied, then signs in the
+! global group placed in all the buffers are returned.
+
+ Each list item in the returned value is a dictionary with the
+ following entries:
+*** ../vim-8.1.0643/src/buffer.c 2018-12-24 20:23:39.440716979 +0100
+--- src/buffer.c 2018-12-27 00:19:40.089578543 +0100
+***************
+*** 5866,5871 ****
+--- 5866,5881 ----
+
+ #if defined(FEAT_SIGNS) || defined(PROTO)
+ static hashtab_T sg_table; // sign group (signgroup_T) hashtable
++ static int next_sign_id = 1; // next sign id in the global group
++
++ /*
++ * Initialize data needed for managing signs
++ */
++ void
++ init_signs(void)
++ {
++ hash_init(&sg_table); // sign group hash table
++ }
+
+ /*
+ * A new sign in group 'groupname' is added. If the group is not present,
+***************
+*** 5874,5890 ****
+ static signgroup_T *
+ sign_group_ref(char_u *groupname)
+ {
+- static int initialized = FALSE;
+ hash_T hash;
+ hashitem_T *hi;
+ signgroup_T *group;
+
+- if (!initialized)
+- {
+- initialized = TRUE;
+- hash_init(&sg_table);
+- }
+-
+ hash = hash_hash(groupname);
+ hi = hash_lookup(&sg_table, groupname, hash);
+ if (HASHITEM_EMPTY(hi))
+--- 5884,5893 ----
+***************
+*** 5896,5901 ****
+--- 5899,5905 ----
+ return NULL;
+ STRCPY(group->sg_name, groupname);
+ group->refcount = 1;
++ group->next_sign_id = 1;
+ hash_add_item(&sg_table, hi, group->sg_name, hash);
+ }
+ else
+***************
+*** 5933,5938 ****
+--- 5937,5985 ----
+ }
+
+ /*
++ * Get the next free sign identifier in the specified group
++ */
++ int
++ sign_group_get_next_signid(buf_T *buf, char_u *groupname)
++ {
++ int id = 1;
++ signgroup_T *group = NULL;
++ signlist_T *sign;
++ hashitem_T *hi;
++ int found = FALSE;
++
++ if (groupname != NULL)
++ {
++ hi = hash_find(&sg_table, groupname);
++ if (HASHITEM_EMPTY(hi))
++ return id;
++ group = HI2SG(hi);
++ }
++
++ // Search for the next usuable sign identifier
++ while (!found)
++ {
++ if (group == NULL)
++ id = next_sign_id++; // global group
++ else
++ id = group->next_sign_id++;
++
++ // Check whether this sign is already placed in the buffer
++ found = TRUE;
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ {
++ if (id == sign->id && sign_in_group(sign, groupname))
++ {
++ found = FALSE; // sign identifier is in use
++ break;
++ }
++ }
++ }
++
++ return id;
++ }
++
++ /*
+ * Insert a new sign into the signlist for buffer 'buf' between the 'prev' and
+ * 'next' signs.
+ */
+***************
+*** 6072,6078 ****
+ signlist_T *prev; // the previous sign
+
+ prev = NULL;
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+ if (lnum == sign->lnum && id == sign->id &&
+ sign_in_group(sign, groupname))
+--- 6119,6125 ----
+ signlist_T *prev; // the previous sign
+
+ prev = NULL;
+! FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ {
+ if (lnum == sign->lnum && id == sign->id &&
+ sign_in_group(sign, groupname))
+***************
+*** 6107,6113 ****
+ {
+ signlist_T *sign; // a sign in the signlist
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+ if (sign->id == markId && sign_in_group(sign, group))
+ {
+--- 6154,6160 ----
+ {
+ signlist_T *sign; // a sign in the signlist
+
+! FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ {
+ if (sign->id == markId && sign_in_group(sign, group))
+ {
+***************
+*** 6132,6138 ****
+ {
+ signlist_T *sign; /* a sign in a b_signlist */
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ if (sign->lnum == lnum
+ && (type == SIGN_ANY
+ # ifdef FEAT_SIGN_ICONS
+--- 6179,6185 ----
+ {
+ signlist_T *sign; /* a sign in a b_signlist */
+
+! FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ if (sign->lnum == lnum
+ && (type == SIGN_ANY
+ # ifdef FEAT_SIGN_ICONS
+***************
+*** 6216,6222 ****
+ {
+ signlist_T *sign; // a sign in the signlist
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ if (sign->id == id && sign_in_group(sign, group))
+ return sign->lnum;
+
+--- 6263,6269 ----
+ {
+ signlist_T *sign; // a sign in the signlist
+
+! FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ if (sign->id == id && sign_in_group(sign, group))
+ return sign->lnum;
+
+***************
+*** 6234,6240 ****
+ {
+ signlist_T *sign; // a sign in the signlist
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ if (sign->lnum == lnum)
+ return sign;
+
+--- 6281,6287 ----
+ {
+ signlist_T *sign; // a sign in the signlist
+
+! FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ if (sign->lnum == lnum)
+ return sign;
+
+***************
+*** 6252,6258 ****
+ {
+ signlist_T *sign; // a sign in the signlist
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ if (sign->id == id && sign_in_group(sign, group))
+ return sign;
+
+--- 6299,6305 ----
+ {
+ signlist_T *sign; // a sign in the signlist
+
+! FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ if (sign->id == id && sign_in_group(sign, group))
+ return sign;
+
+***************
+*** 6288,6294 ****
+ {
+ signlist_T *sign; /* a sign in the signlist */
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ if (sign->lnum == lnum && sign->typenr == typenr)
+ return sign->id;
+
+--- 6335,6341 ----
+ {
+ signlist_T *sign; /* a sign in the signlist */
+
+! FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ if (sign->lnum == lnum && sign->typenr == typenr)
+ return sign->id;
+
+***************
+*** 6306,6312 ****
+ signlist_T *sign; // a sign in the signlist
+ int count = 0;
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ if (sign->lnum == lnum)
+ if (sign_get_image(sign->typenr) != NULL)
+ count++;
+--- 6353,6359 ----
+ signlist_T *sign; // a sign in the signlist
+ int count = 0;
+
+! FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ if (sign->lnum == lnum)
+ if (sign_get_image(sign->typenr) != NULL)
+ count++;
+***************
+*** 6391,6397 ****
+ MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
+ msg_putchar('\n');
+ }
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+ if (got_int)
+ break;
+--- 6438,6444 ----
+ MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
+ msg_putchar('\n');
+ }
+! FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ {
+ if (got_int)
+ break;
+***************
+*** 6427,6433 ****
+ {
+ signlist_T *sign; /* a sign in a b_signlist */
+
+! FOR_ALL_SIGNS_IN_BUF(curbuf)
+ {
+ if (sign->lnum >= line1 && sign->lnum <= line2)
+ {
+--- 6474,6480 ----
+ {
+ signlist_T *sign; /* a sign in a b_signlist */
+
+! FOR_ALL_SIGNS_IN_BUF(curbuf, sign)
+ {
+ if (sign->lnum >= line1 && sign->lnum <= line2)
+ {
+*** ../vim-8.1.0643/src/evalfunc.c 2018-12-24 23:35:09.119234692 +0100
+--- src/evalfunc.c 2018-12-27 00:19:40.089578543 +0100
+***************
+*** 4434,4440 ****
+ signlist_T *sign;
+ dict_T *d;
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+ if ((d = sign_get_info(sign)) != NULL)
+ list_append_dict(l, d);
+--- 4434,4440 ----
+ signlist_T *sign;
+ dict_T *d;
+
+! FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ {
+ if ((d = sign_get_info(sign)) != NULL)
+ list_append_dict(l, d);
+***************
+*** 11415,11420 ****
+--- 11415,11422 ----
+ group = tv_get_string_chk(&di->di_tv);
+ if (group == NULL)
+ return;
++ if (*group == '\0') // empty string means global group
++ group = NULL;
+ }
+ }
+ }
+*** ../vim-8.1.0643/src/ex_cmds.c 2018-12-24 20:23:39.440716979 +0100
+--- src/ex_cmds.c 2018-12-27 00:19:40.089578543 +0100
+***************
+*** 7871,7886 ****
+ return FAIL;
+ }
+ if (*sign_id == 0)
+! {
+! // Allocate a new sign id
+! int id = 1;
+! signlist_T *sign;
+!
+! while ((sign = buf_getsign_with_id(buf, id, sign_group)) != NULL)
+! id++;
+!
+! *sign_id = id;
+! }
+
+ if (lnum > 0)
+ // ":sign place {id} line={lnum} name={name} file={fname}":
+--- 7871,7877 ----
+ return FAIL;
+ }
+ if (*sign_id == 0)
+! *sign_id = sign_group_get_next_signid(buf, sign_group);
+
+ if (lnum > 0)
+ // ":sign place {id} line={lnum} name={name} file={fname}":
+***************
+*** 8193,8199 ****
+ else if (idx == SIGNCMD_JUMP)
+ {
+ /* ":sign jump {id} file={fname}" */
+! if (lnum >= 0 || sign_name != NULL)
+ EMSG(_(e_invarg));
+ else if ((lnum = buf_findsign(buf, id, group)) > 0)
+ { /* goto a sign ... */
+--- 8184,8190 ----
+ else if (idx == SIGNCMD_JUMP)
+ {
+ /* ":sign jump {id} file={fname}" */
+! if (lnum >= 0 || sign_name != NULL || buf == NULL)
+ EMSG(_(e_invarg));
+ else if ((lnum = buf_findsign(buf, id, group)) > 0)
+ { /* goto a sign ... */
+***************
+*** 8350,8356 ****
+ return;
+ dict_add_list(d, "signs", l);
+
+! FOR_ALL_SIGNS_IN_BUF(buf)
+ {
+ if (!sign_in_group(sign, sign_group))
+ continue;
+--- 8341,8347 ----
+ return;
+ dict_add_list(d, "signs", l);
+
+! FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ {
+ if (!sign_in_group(sign, sign_group))
+ continue;
+*** ../vim-8.1.0643/src/globals.h 2018-12-22 17:07:45.771347741 +0100
+--- src/globals.h 2018-12-27 00:19:40.089578543 +0100
+***************
+*** 609,615 ****
+ #define FOR_ALL_BUFFERS(buf) for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+
+ // Iterate through all the signs placed in a buffer
+! #define FOR_ALL_SIGNS_IN_BUF(buf) \
+ for (sign = buf->b_signlist; sign != NULL; sign = sign->next)
+
+ /* Flag that is set when switching off 'swapfile'. It means that all blocks
+--- 609,615 ----
+ #define FOR_ALL_BUFFERS(buf) for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+
+ // Iterate through all the signs placed in a buffer
+! #define FOR_ALL_SIGNS_IN_BUF(buf, sign) \
+ for (sign = buf->b_signlist; sign != NULL; sign = sign->next)
+
+ /* Flag that is set when switching off 'swapfile'. It means that all blocks
+*** ../vim-8.1.0643/src/main.c 2018-11-10 17:33:23.087518814 +0100
+--- src/main.c 2018-12-27 00:19:40.093578509 +0100
+***************
+*** 1032,1037 ****
+--- 1032,1041 ----
+ #ifdef FEAT_EVAL
+ set_lang_var(); /* set v:lang and v:ctype */
+ #endif
++
++ #ifdef FEAT_SIGNS
++ init_signs();
++ #endif
+ }
+
+ /*
+*** ../vim-8.1.0643/src/proto/buffer.pro 2018-12-21 15:16:57.479579788 +0100
+--- src/proto/buffer.pro 2018-12-27 00:19:40.093578509 +0100
+***************
+*** 75,80 ****
+--- 75,82 ----
+ linenr_T buf_delsign(buf_T *buf, int id, char_u *group);
+ int buf_findsign(buf_T *buf, int id, char_u *group);
+ #ifdef FEAT_SIGNS
++ void init_signs(void);
++ int sign_group_get_next_signid(buf_T *buf, char_u *groupname);
+ int sign_in_group(signlist_T *sign, char_u *group);
+ dict_T *sign_get_info(signlist_T *sign);
+ signlist_T *buf_getsign_with_id(buf_T *buf, int id, char_u *group);
+*** ../vim-8.1.0643/src/structs.h 2018-12-26 00:25:15.547995294 +0100
+--- src/structs.h 2018-12-27 00:19:40.093578509 +0100
+***************
+*** 737,742 ****
+--- 737,743 ----
+ typedef struct signgroup_S
+ {
+ short_u refcount; // number of signs in this group
++ int next_sign_id; // next sign id for this group
+ char_u sg_name[1]; // sign group name
+ } signgroup_T;
+
+*** ../vim-8.1.0643/src/testdir/test_signs.vim 2018-12-24 20:23:39.440716979 +0100
+--- src/testdir/test_signs.vim 2018-12-27 00:19:40.093578509 +0100
+***************
+*** 301,307 ****
+ sign undefine Sign
+ endfunc
+
+! " Test for VimL functions for managing signs
+ func Test_sign_funcs()
+ " Remove all the signs
+ call sign_unplace('*')
+--- 301,307 ----
+ sign undefine Sign
+ endfunc
+
+! " Test for Vim script functions for managing signs
+ func Test_sign_funcs()
+ " Remove all the signs
+ call sign_unplace('*')
+***************
+*** 733,739 ****
+ call assert_equal(3, sign_place(0, '', 'sign1', 'Xsign',
+ \ {'lnum' : 14}))
+ call sign_unplace('', {'buffer' : 'Xsign', 'id' : 2})
+! call assert_equal(2, sign_place(0, '', 'sign1', 'Xsign',
+ \ {'lnum' : 12}))
+
+ call assert_equal(1, sign_place(0, 'g1', 'sign1', 'Xsign',
+--- 733,739 ----
+ call assert_equal(3, sign_place(0, '', 'sign1', 'Xsign',
+ \ {'lnum' : 14}))
+ call sign_unplace('', {'buffer' : 'Xsign', 'id' : 2})
+! call assert_equal(4, sign_place(0, '', 'sign1', 'Xsign',
+ \ {'lnum' : 12}))
+
+ call assert_equal(1, sign_place(0, 'g1', 'sign1', 'Xsign',
+*** ../vim-8.1.0643/src/version.c 2018-12-26 23:42:05.331769359 +0100
+--- src/version.c 2018-12-27 00:22:10.868312009 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 644,
+ /**/
+
+--
+Over the years, I've developed my sense of deja vu so acutely that now
+I can remember things that *have* happened before ...
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0645 b/data/vim/patches/8.1.0645
new file mode 100644
index 000000000..78507ced7
--- /dev/null
+++ b/data/vim/patches/8.1.0645
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0645
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0645
+Problem: Coverity warns for possible use of NULL pointer.
+Solution: Check return value of vterm_obtain_screen().
+Files: src/terminal.c
+
+
+*** ../vim-8.1.0644/src/terminal.c 2018-12-24 21:38:40.810173720 +0100
+--- src/terminal.c 2018-12-27 21:24:23.119509320 +0100
+***************
+*** 5060,5065 ****
+--- 5060,5067 ----
+ if (term->tl_vterm != NULL)
+ {
+ screen = vterm_obtain_screen(term->tl_vterm);
++ if (screen == NULL) // can't really happen
++ return;
+ p = NULL;
+ line = NULL;
+ }
+*** ../vim-8.1.0644/src/version.c 2018-12-27 00:28:27.501299292 +0100
+--- src/version.c 2018-12-27 21:25:52.570775301 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 645,
+ /**/
+
+--
+Q: Should I clean my house or work on Vim?
+A: Whatever contains more bugs.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0646 b/data/vim/patches/8.1.0646
new file mode 100644
index 000000000..87baecaf9
--- /dev/null
+++ b/data/vim/patches/8.1.0646
@@ -0,0 +1,95 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0646
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0646
+Problem: Cannot build with Ruby 2.6.0.
+Solution: Add rb_ary_detransient(). (Ozaki Kiichi, closes #3724)
+Files: src/if_ruby.c
+
+
+*** ../vim-8.1.0645/src/if_ruby.c 2018-12-19 20:48:43.344066228 +0100
+--- src/if_ruby.c 2018-12-27 22:08:13.730597860 +0100
+***************
+*** 123,128 ****
+--- 123,132 ----
+ # define rb_gc_writebarrier_unprotect rb_gc_writebarrier_unprotect_stub
+ #endif
+
++ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 26
++ # define rb_ary_detransient (*dll_rb_ary_detransient)
++ #endif
++
+ #include <ruby.h>
+ #ifdef RUBY19_OR_LATER
+ # include <ruby/encoding.h>
+***************
+*** 455,460 ****
+--- 459,467 ----
+ 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 DYNAMIC_RUBY_VER >= 26
++ static void (*dll_rb_ary_detransient) (VALUE);
++ # endif
+ # if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK)
+ # ifdef __ia64
+ static void * (*dll_rb_ia64_bsp) (void);
+***************
+*** 666,671 ****
+--- 673,681 ----
+ {"rb_ary_new4", (RUBY_PROC*)&dll_rb_ary_new4},
+ # endif
+ {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push},
++ # if DYNAMIC_RUBY_VER >= 26
++ {"rb_ary_detransient", (RUBY_PROC*)&dll_rb_ary_detransient},
++ # endif
+ # endif
+ # ifdef RUBY19_OR_LATER
+ {"rb_int2big", (RUBY_PROC*)&dll_rb_int2big},
+***************
+*** 966,977 ****
+
+ static void error_print(int state)
+ {
+! #ifndef DYNAMIC_RUBY
+! #if !(defined(RUBY_VERSION) && RUBY_VERSION >= 19) \
+! && !(defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19)
+ RUBYEXTERN VALUE ruby_errinfo;
+ #endif
+- #endif
+ VALUE error;
+ VALUE eclass;
+ VALUE einfo;
+--- 976,984 ----
+
+ static void error_print(int state)
+ {
+! #if !defined(DYNAMIC_RUBY) && !defined(RUBY19_OR_LATER)
+ RUBYEXTERN VALUE ruby_errinfo;
+ #endif
+ VALUE error;
+ VALUE eclass;
+ VALUE einfo;
+*** ../vim-8.1.0645/src/version.c 2018-12-27 21:26:56.426251398 +0100
+--- src/version.c 2018-12-27 22:09:50.109859974 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 646,
+ /**/
+
+--
+Time is money. Especially if you make clocks.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0647 b/data/vim/patches/8.1.0647
new file mode 100644
index 000000000..5427d8dc7
--- /dev/null
+++ b/data/vim/patches/8.1.0647
@@ -0,0 +1,326 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0647
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0647
+Problem: MS-Windows: balloon_show() does not handle wide characters.
+Solution: Use CreateWindowExW(). (Yasuhiro Matsumoto, closes #3708)
+Files: src/gui_w32.c
+
+
+*** ../vim-8.1.0646/src/gui_w32.c 2018-11-16 16:21:01.641310033 +0100
+--- src/gui_w32.c 2018-12-27 22:36:34.745105652 +0100
+***************
+*** 4367,4380 ****
+
+ typedef struct tagTOOLINFOA_NEW
+ {
+! UINT cbSize;
+! UINT uFlags;
+! HWND hwnd;
+! UINT_PTR uId;
+! RECT rect;
+! HINSTANCE hinst;
+! LPSTR lpszText;
+! LPARAM lParam;
+ } TOOLINFO_NEW;
+
+ typedef struct tagNMTTDISPINFO_NEW
+--- 4367,4380 ----
+
+ typedef struct tagTOOLINFOA_NEW
+ {
+! UINT cbSize;
+! UINT uFlags;
+! HWND hwnd;
+! UINT_PTR uId;
+! RECT rect;
+! HINSTANCE hinst;
+! LPSTR lpszText;
+! LPARAM lParam;
+ } TOOLINFO_NEW;
+
+ typedef struct tagNMTTDISPINFO_NEW
+***************
+*** 4387,4392 ****
+--- 4387,4418 ----
+ LPARAM lParam;
+ } NMTTDISPINFO_NEW;
+
++ #ifdef FEAT_MBYTE
++ typedef struct tagTOOLINFOW_NEW
++ {
++ UINT cbSize;
++ UINT uFlags;
++ HWND hwnd;
++ UINT_PTR uId;
++ RECT rect;
++ HINSTANCE hinst;
++ LPWSTR lpszText;
++ LPARAM lParam;
++ void *lpReserved;
++ } TOOLINFOW_NEW;
++
++ typedef struct tagNMTTDISPINFOW_NEW
++ {
++ NMHDR hdr;
++ LPWSTR lpszText;
++ WCHAR szText[80];
++ HINSTANCE hinst;
++ UINT uFlags;
++ LPARAM lParam;
++ } NMTTDISPINFOW_NEW;
++
++ #endif
++
+ typedef HRESULT (WINAPI* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
+ #ifndef TTM_SETMAXTIPWIDTH
+ # define TTM_SETMAXTIPWIDTH (WM_USER+24)
+***************
+*** 5502,5507 ****
+--- 5528,5542 ----
+ if (RegisterClassW(&wndclassw) == 0)
+ return FAIL;
+ }
++
++ s_textArea = CreateWindowExW(
++ 0,
++ szTextAreaClassW, L"Vim text area",
++ WS_CHILD | WS_VISIBLE, 0, 0,
++ 100, // Any value will do for now
++ 100, // Any value will do for now
++ s_hwnd, NULL,
++ s_hinst, NULL);
+ }
+ else
+ #endif
+***************
+*** 5520,5534 ****
+
+ if (RegisterClass(&wndclass) == 0)
+ return FAIL;
+ }
+- s_textArea = CreateWindowEx(
+- 0,
+- szTextAreaClass, "Vim text area",
+- WS_CHILD | WS_VISIBLE, 0, 0,
+- 100, /* Any value will do for now */
+- 100, /* Any value will do for now */
+- s_hwnd, NULL,
+- s_hinst, NULL);
+
+ if (s_textArea == NULL)
+ return FAIL;
+--- 5555,5570 ----
+
+ if (RegisterClass(&wndclass) == 0)
+ return FAIL;
++
++ s_textArea = CreateWindowEx(
++ 0,
++ szTextAreaClass, "Vim text area",
++ WS_CHILD | WS_VISIBLE, 0, 0,
++ 100, // Any value will do for now
++ 100, // Any value will do for now
++ s_hwnd, NULL,
++ s_hinst, NULL);
+ }
+
+ if (s_textArea == NULL)
+ return FAIL;
+***************
+*** 6218,6226 ****
+ static void
+ draw_line(
+ int x1,
+! int y1,
+! int x2,
+! int y2,
+ COLORREF color)
+ {
+ #if defined(FEAT_DIRECTX)
+--- 6254,6262 ----
+ static void
+ draw_line(
+ int x1,
+! int y1,
+! int x2,
+! int y2,
+ COLORREF color)
+ {
+ #if defined(FEAT_DIRECTX)
+***************
+*** 6241,6247 ****
+ static void
+ set_pixel(
+ int x,
+! int y,
+ COLORREF color)
+ {
+ #if defined(FEAT_DIRECTX)
+--- 6277,6283 ----
+ static void
+ set_pixel(
+ int x,
+! int y,
+ COLORREF color)
+ {
+ #if defined(FEAT_DIRECTX)
+***************
+*** 6255,6261 ****
+ static void
+ fill_rect(
+ const RECT *rcp,
+! HBRUSH hbr,
+ COLORREF color)
+ {
+ #if defined(FEAT_DIRECTX)
+--- 6291,6297 ----
+ static void
+ fill_rect(
+ const RECT *rcp,
+! HBRUSH hbr,
+ COLORREF color)
+ {
+ #if defined(FEAT_DIRECTX)
+***************
+*** 8745,8756 ****
+--- 8781,8875 ----
+ return multiline_tip;
+ }
+
++ #ifdef FEAT_MBYTE
++ static void
++ make_tooltipw(BalloonEval *beval, char *text, POINT pt)
++ {
++ TOOLINFOW *pti;
++ int ToolInfoSize;
++ WCHAR *tofree = NULL;
++
++ if (multiline_balloon_available() == TRUE)
++ ToolInfoSize = sizeof(TOOLINFOW_NEW);
++ else
++ ToolInfoSize = sizeof(TOOLINFOW);
++
++ pti = (TOOLINFOW *)alloc(ToolInfoSize);
++ if (pti == NULL)
++ return;
++
++ beval->balloon = CreateWindowExW(WS_EX_TOPMOST, TOOLTIPS_CLASSW,
++ NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
++ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
++ beval->target, NULL, s_hinst, NULL);
++
++ SetWindowPos(beval->balloon, HWND_TOPMOST, 0, 0, 0, 0,
++ SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
++
++ pti->cbSize = ToolInfoSize;
++ pti->uFlags = TTF_SUBCLASS;
++ pti->hwnd = beval->target;
++ pti->hinst = 0; // Don't use string resources
++ pti->uId = ID_BEVAL_TOOLTIP;
++
++ if (multiline_balloon_available() == TRUE)
++ {
++ RECT rect;
++ TOOLINFOW_NEW *ptin = (TOOLINFOW_NEW *)pti;
++ pti->lpszText = LPSTR_TEXTCALLBACKW;
++ tofree = enc_to_utf16((char_u*)text, NULL);
++ ptin->lParam = (LPARAM)tofree;
++ // switch multiline tooltips on
++ if (GetClientRect(s_textArea, &rect))
++ SendMessageW(beval->balloon, TTM_SETMAXTIPWIDTH, 0,
++ (LPARAM)rect.right);
++ }
++ else
++ {
++ // do this old way
++ tofree = enc_to_utf16((char_u*)text, NULL);
++ pti->lpszText = tofree;
++ }
++
++ // Limit ballooneval bounding rect to CursorPos neighbourhood.
++ pti->rect.left = pt.x - 3;
++ pti->rect.top = pt.y - 3;
++ pti->rect.right = pt.x + 3;
++ pti->rect.bottom = pt.y + 3;
++
++ SendMessageW(beval->balloon, TTM_ADDTOOLW, 0, (LPARAM)pti);
++ // Make tooltip appear sooner.
++ SendMessageW(beval->balloon, TTM_SETDELAYTIME, TTDT_INITIAL, 10);
++ // I've performed some tests and it seems the longest possible life time
++ // of tooltip is 30 seconds.
++ SendMessageW(beval->balloon, TTM_SETDELAYTIME, TTDT_AUTOPOP, 30000);
++ /*
++ * HACK: force tooltip to appear, because it'll not appear until
++ * first mouse move. D*mn M$
++ * Amazingly moving (2, 2) and then (-1, -1) the mouse doesn't move.
++ */
++ mouse_event(MOUSEEVENTF_MOVE, 2, 2, 0, 0);
++ mouse_event(MOUSEEVENTF_MOVE, (DWORD)-1, (DWORD)-1, 0, 0);
++ vim_free(pti);
++ if (tofree != NULL)
++ vim_free(tofree);
++ }
++ #endif
++
+ static void
+ make_tooltip(BalloonEval *beval, char *text, POINT pt)
+ {
+ TOOLINFO *pti;
+ int ToolInfoSize;
+
++ #ifdef FEAT_MBYTE
++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
++ {
++ make_tooltipw(beval, text, pt);
++ return;
++ }
++ #endif
++
+ if (multiline_balloon_available() == TRUE)
+ ToolInfoSize = sizeof(TOOLINFO_NEW);
+ else
+***************
+*** 8961,8966 ****
+--- 9080,9095 ----
+ info->uFlags |= TTF_DI_SETITEM;
+ }
+ break;
++ #ifdef FEAT_MBYTE
++ case TTN_GETDISPINFOW:
++ {
++ // if we get here then we have new common controls
++ NMTTDISPINFOW_NEW *info = (NMTTDISPINFOW_NEW *)pnmh;
++ info->lpszText = (LPWSTR)info->lParam;
++ info->uFlags |= TTF_DI_SETITEM;
++ }
++ break;
++ #endif
+ }
+ }
+ }
+*** ../vim-8.1.0646/src/version.c 2018-12-27 22:10:57.797337989 +0100
+--- src/version.c 2018-12-27 22:42:39.585979851 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 647,
+ /**/
+
+--
+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.0648 b/data/vim/patches/8.1.0648
new file mode 100644
index 000000000..f9a593efd
--- /dev/null
+++ b/data/vim/patches/8.1.0648
@@ -0,0 +1,203 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0648
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0648
+Problem: Custom operators can't act upon a forced motion. (Christian
+ Wellenbrock)
+Solution: Add the forced motion to the mode() result. (Christian Brabandt,
+ closes #3490)
+Files: runtime/doc/eval.txt, src/evalfunc.c, src/globals.h, src/normal.c,
+ src/testdir/test_mapping.vim
+
+
+*** ../vim-8.1.0647/runtime/doc/eval.txt 2018-12-27 00:28:27.493299355 +0100
+--- runtime/doc/eval.txt 2018-12-27 23:13:51.631271146 +0100
+***************
+*** 6308,6313 ****
+--- 6324,6333 ----
+
+ n Normal, Terminal-Normal
+ no Operator-pending
++ nov Operator-pending (forced characterwise |o_v|)
++ noV Operator-pending (forced linewise |o_V|)
++ noCTRL-V Operator-pending (forced blockwise |o_CTRL-V|);
++ CTRL-V is one character
+ 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|
+*** ../vim-8.1.0647/src/evalfunc.c 2018-12-27 00:28:27.497299324 +0100
+--- src/evalfunc.c 2018-12-27 23:06:25.098224834 +0100
+***************
+*** 8506,8512 ****
+--- 8506,8516 ----
+ {
+ buf[0] = 'n';
+ if (finish_op)
++ {
+ buf[1] = 'o';
++ // to be able to detect force-linewise/blockwise/characterwise operations
++ buf[2] = motion_force;
++ }
+ else if (restart_edit == 'I' || restart_edit == 'R'
+ || restart_edit == 'V')
+ {
+*** ../vim-8.1.0647/src/globals.h 2018-12-27 00:28:27.497299324 +0100
+--- src/globals.h 2018-12-27 23:06:25.098224834 +0100
+***************
+*** 928,933 ****
+--- 928,934 ----
+ * "Visual_mode" When State is NORMAL or INSERT.
+ * "finish_op" When State is NORMAL, after typing the operator and before
+ * typing the motion command.
++ * "motion_force" Last motion_force from do_pending_operator()
+ * "debug_mode" Debug mode.
+ */
+ EXTERN int State INIT(= NORMAL); /* This is the current state of the
+***************
+*** 938,943 ****
+--- 939,945 ----
+
+ EXTERN int finish_op INIT(= FALSE);/* TRUE while an operator is pending */
+ EXTERN long opcount INIT(= 0); /* count for pending operator */
++ EXTERN int motion_force INIT(= 0); // motion force for pending operator
+
+ /*
+ * Ex mode (Q) state
+*** ../vim-8.1.0647/src/normal.c 2018-12-23 19:10:05.010359907 +0100
+--- src/normal.c 2018-12-27 23:06:25.098224834 +0100
+***************
+*** 1395,1402 ****
+ else if (oap->motion_force == Ctrl_V)
+ {
+ /* Change line- or characterwise motion into Visual block mode. */
+! VIsual_active = TRUE;
+! VIsual = oap->start;
+ VIsual_mode = Ctrl_V;
+ VIsual_select = FALSE;
+ VIsual_reselect = FALSE;
+--- 1395,1405 ----
+ else if (oap->motion_force == Ctrl_V)
+ {
+ /* Change line- or characterwise motion into Visual block mode. */
+! if (!VIsual_active)
+! {
+! VIsual_active = TRUE;
+! VIsual = oap->start;
+! }
+ VIsual_mode = Ctrl_V;
+ VIsual_select = FALSE;
+ VIsual_reselect = FALSE;
+***************
+*** 2129,2134 ****
+--- 2132,2138 ----
+ }
+ oap->block_mode = FALSE;
+ clearop(oap);
++ motion_force = NUL;
+ }
+ #ifdef FEAT_LINEBREAK
+ curwin->w_p_lbr = lbr_saved;
+***************
+*** 7689,7695 ****
+ * characterwise, linewise, or blockwise. */
+ if (cap->oap->op_type != OP_NOP)
+ {
+! cap->oap->motion_force = cap->cmdchar;
+ finish_op = FALSE; /* operator doesn't finish now but later */
+ return;
+ }
+--- 7693,7699 ----
+ * characterwise, linewise, or blockwise. */
+ if (cap->oap->op_type != OP_NOP)
+ {
+! motion_force = cap->oap->motion_force = cap->cmdchar;
+ finish_op = FALSE; /* operator doesn't finish now but later */
+ return;
+ }
+*** ../vim-8.1.0647/src/testdir/test_mapping.vim 2018-05-13 18:29:43.000000000 +0200
+--- src/testdir/test_mapping.vim 2018-12-27 23:06:25.098224834 +0100
+***************
+*** 230,232 ****
+--- 230,286 ----
+ call assert_equal(expected, getreg(':'))
+ cunabbr s
+ endfunc
++
++ func Test_motionforce_omap()
++ func GetCommand()
++ let g:m=mode(1)
++ let [g:lnum1, g:col1] = searchpos('-', 'Wb')
++ if g:lnum1 == 0
++ return "\<Esc>"
++ endif
++ let [g:lnum2, g:col2] = searchpos('-', 'W')
++ if g:lnum2 == 0
++ return "\<Esc>"
++ endif
++ return ":call Select()\<CR>"
++ endfunc
++ func Select()
++ call cursor([g:lnum1, g:col1])
++ exe "normal! 1 ". (strlen(g:m) == 2 ? 'v' : g:m[2])
++ call cursor([g:lnum2, g:col2])
++ execute "normal! \<BS>"
++ endfunc
++ new
++ onoremap <buffer><expr> i- GetCommand()
++ " 1) default omap mapping
++ %d_
++ call setline(1, ['aaa - bbb', 'x', 'ddd - eee'])
++ call cursor(2, 1)
++ norm di-
++ call assert_equal('no', g:m)
++ call assert_equal(['aaa -- eee'], getline(1, '$'))
++ " 2) forced characterwise operation
++ %d_
++ call setline(1, ['aaa - bbb', 'x', 'ddd - eee'])
++ call cursor(2, 1)
++ norm dvi-
++ call assert_equal('nov', g:m)
++ call assert_equal(['aaa -- eee'], getline(1, '$'))
++ " 3) forced linewise operation
++ %d_
++ call setline(1, ['aaa - bbb', 'x', 'ddd - eee'])
++ call cursor(2, 1)
++ norm dVi-
++ call assert_equal('noV', g:m)
++ call assert_equal([''], getline(1, '$'))
++ " 4) forced blockwise operation
++ %d_
++ call setline(1, ['aaa - bbb', 'x', 'ddd - eee'])
++ call cursor(2, 1)
++ exe "norm d\<C-V>i-"
++ call assert_equal("no\<C-V>", g:m)
++ call assert_equal(['aaabbb', 'x', 'dddeee'], getline(1, '$'))
++ bwipe!
++ delfunc Select
++ delfunc GetCommand
++ endfunc
+*** ../vim-8.1.0647/src/version.c 2018-12-27 22:43:03.901774877 +0100
+--- src/version.c 2018-12-27 23:25:22.866659463 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 648,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+61. Your best friends know your e-mail address, but neither your phone number
+ nor the address where 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.0649 b/data/vim/patches/8.1.0649
new file mode 100644
index 000000000..68c447905
--- /dev/null
+++ b/data/vim/patches/8.1.0649
@@ -0,0 +1,121 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0649
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0649
+Problem: setjmp() variables defined globally are used in one file.
+Solution: Move the declarations to that file.
+Files: src/globals.h, src/os_unix.c
+
+
+*** ../vim-8.1.0648/src/globals.h 2018-12-27 23:44:34.797953474 +0100
+--- src/globals.h 2018-12-28 16:54:10.327379790 +0100
+***************
+*** 798,818 ****
+ EXTERN JMP_BUF x_jump_env;
+ #endif
+
+- #if defined(HAVE_SETJMP_H)
+- /*
+- * Stuff for setjmp() and longjmp().
+- * Used to protect areas where we could crash.
+- */
+- 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)
+ /*
+ * These flags are set based upon 'fileencoding'.
+--- 798,803 ----
+*** ../vim-8.1.0648/src/os_unix.c 2018-12-21 16:04:16.320437461 +0100
+--- src/os_unix.c 2018-12-28 17:00:11.740193430 +0100
+***************
+*** 980,992 ****
+ }
+ #endif
+
+! #if (defined(HAVE_SETJMP_H) \
+! && ((defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)) \
+! || defined(FEAT_LIBCALL))) \
+! || defined(PROTO)
+ /*
+ * A simplistic version of setjmp() that only allows one level of using.
+ * Don't call twice before calling mch_endjmp()!.
+ * Usage:
+ * mch_startjmp();
+ * if (SETJMP(lc_jump_env) != 0)
+--- 980,1004 ----
+ }
+ #endif
+
+! #if defined(HAVE_SETJMP_H) || defined(PROTO)
+! // argument to SETJMP()
+! static JMP_BUF lc_jump_env;
+!
+! # ifdef SIGHASARG
+! // Caught signal number, 0 when no was signal caught; used for mch_libcall().
+! // Volatile because it is used in signal handlers.
+! static volatile sig_atomic_t lc_signal;
+! # endif
+!
+! // TRUE when lc_jump_env is valid.
+! // Volatile because it is used in signal handler deathtrap().
+! static volatile sig_atomic_t lc_active INIT(= FALSE);
+!
+ /*
+ * A simplistic version of setjmp() that only allows one level of using.
++ * Used to protect areas where we could crash.
+ * Don't call twice before calling mch_endjmp()!.
++ *
+ * Usage:
+ * mch_startjmp();
+ * if (SETJMP(lc_jump_env) != 0)
+***************
+*** 1023,1030 ****
+ mch_didjmp(void)
+ {
+ # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
+! /* On FreeBSD the signal stack has to be reset after using siglongjmp(),
+! * otherwise catching the signal only works once. */
+ init_signal_stack();
+ # endif
+ }
+--- 1035,1042 ----
+ mch_didjmp(void)
+ {
+ # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
+! // On FreeBSD the signal stack has to be reset after using siglongjmp(),
+! // otherwise catching the signal only works once.
+ init_signal_stack();
+ # endif
+ }
+*** ../vim-8.1.0648/src/version.c 2018-12-27 23:44:34.797953474 +0100
+--- src/version.c 2018-12-28 16:53:54.427521974 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 649,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+64. The remote to the T.V. is missing...and you don't even 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.0650 b/data/vim/patches/8.1.0650
new file mode 100644
index 000000000..e8c17b745
--- /dev/null
+++ b/data/vim/patches/8.1.0650
@@ -0,0 +1,92 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0650
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0650
+Problem: Command line argument -q [errorfile] is not tested.
+Solution: Add a test. (Dominique Pelle, closes #3730)
+Files: src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.0649/src/testdir/test_startup.vim 2018-09-22 14:08:41.926157823 +0200
+--- src/testdir/test_startup.vim 2018-12-28 18:24:58.428636622 +0100
+***************
+*** 269,274 ****
+--- 269,321 ----
+ call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\r\nline 1: \" The default vimrc file\..* verbose=15\n", out)
+ endfunc
+
++ " Test the '-q [errorfile]' argument.
++ func Test_q_arg()
++ let source_file = has('win32') ? '..\memfile.c' : '../memfile.c'
++ let after = [
++ \ 'call writefile([&errorfile, string(getpos("."))], "Xtestout")',
++ \ 'copen',
++ \ 'w >> Xtestout',
++ \ 'qall'
++ \ ]
++
++ " Test with default argument '-q'.
++ call assert_equal('errors.err', &errorfile)
++ call writefile(["../memfile.c:1482:5: error: expected ';' before '}' token"], 'errors.err')
++ if RunVim([], after, '-q')
++ let lines = readfile('Xtestout')
++ call assert_equal(['errors.err',
++ \ '[0, 1482, 5, 0]',
++ \ source_file . "|1482 col 5| error: expected ';' before '}' token"],
++ \ lines)
++ endif
++ call delete('Xtestout')
++ call delete('errors.err')
++
++ " Test with explicit argument '-q Xerrors' (with space).
++ call writefile(["../memfile.c:1482:5: error: expected ';' before '}' token"], 'Xerrors')
++ if RunVim([], after, '-q Xerrors')
++ let lines = readfile('Xtestout')
++ call assert_equal(['Xerrors',
++ \ '[0, 1482, 5, 0]',
++ \ source_file . "|1482 col 5| error: expected ';' before '}' token"],
++ \ lines)
++ endif
++ call delete('Xtestout')
++
++ " Test with explicit argument '-qXerrors' (without space).
++ if RunVim([], after, '-qXerrors')
++ let lines = readfile('Xtestout')
++ call assert_equal(['Xerrors',
++ \ '[0, 1482, 5, 0]',
++ \ source_file . "|1482 col 5| error: expected ';' before '}' token"],
++ \ lines)
++ endif
++
++ call delete('Xtestout')
++ call delete('Xerrors')
++ endfunc
++
+ " Test the -V[N]{filename} argument to set the 'verbose' option to N
+ " and set 'verbosefile' to filename.
+ func Test_V_file_arg()
+*** ../vim-8.1.0649/src/version.c 2018-12-28 17:01:55.307292166 +0100
+--- src/version.c 2018-12-28 18:26:26.363883925 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 650,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+66. You create a homepage with the impression to cure the afflicted...but
+ your hidden agenda is to receive more 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.0651 b/data/vim/patches/8.1.0651
new file mode 100644
index 000000000..9a8a043fc
--- /dev/null
+++ b/data/vim/patches/8.1.0651
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0651
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0651
+Problem: :args \"foo works like :args without argument.
+Solution: Fix check for empty argument. (closes #3728)
+Files: src/ex_cmds2.c, src/testdir/test_arglist.vim
+
+
+*** ../vim-8.1.0650/src/ex_cmds2.c 2018-11-30 22:40:09.098211991 +0100
+--- src/ex_cmds2.c 2018-12-28 18:55:15.509073197 +0100
+***************
+*** 2738,2744 ****
+ alist_new();
+ }
+
+! if (!ends_excmd(*eap->arg))
+ {
+ /*
+ * ":args file ..": define new argument list, handle like ":next"
+--- 2738,2744 ----
+ alist_new();
+ }
+
+! if (*eap->arg != NUL)
+ {
+ /*
+ * ":args file ..": define new argument list, handle like ":next"
+*** ../vim-8.1.0650/src/testdir/test_arglist.vim 2018-12-02 14:55:04.904731741 +0100
+--- src/testdir/test_arglist.vim 2018-12-28 19:03:22.480907692 +0100
+***************
+*** 217,222 ****
+--- 217,228 ----
+ %argdelete
+ endfunc
+
++ func Test_args_with_quote()
++ args \"foobar
++ call assert_equal('"foobar', argv(0))
++ %argdelete
++ endfunc
++
+ " Test for 0argadd and 0argedit
+ " Ported from the test_argument_0count.in test script
+ func Test_zero_argadd()
+*** ../vim-8.1.0650/src/version.c 2018-12-28 18:32:52.464575534 +0100
+--- src/version.c 2018-12-28 19:00:37.582318144 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 651,
+ /**/
+
+--
+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.0652 b/data/vim/patches/8.1.0652
new file mode 100644
index 000000000..99bdd7da2
--- /dev/null
+++ b/data/vim/patches/8.1.0652
@@ -0,0 +1,148 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0652
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0652
+Problem: Freeing memory for balloon eval too early.
+Solution: Store the pointer in BalloonEval and free it later. (Yasuhiro
+ Matsumoto, closes #3725)
+Files: src/beval.h, src/gui_w32.c
+
+
+*** ../vim-8.1.0651/src/beval.h 2018-06-23 19:22:45.598486362 +0200
+--- src/beval.h 2018-12-28 19:10:21.049387746 +0100
+***************
+*** 76,81 ****
+--- 76,84 ----
+ int *vts; // vartabstop setting for this buffer
+ #endif
+ char_u *msg;
++ #ifdef FEAT_GUI_W32
++ void *tofree;
++ #endif
+ } BalloonEval;
+
+ #define EVAL_OFFSET_X 15 /* displacement of beval topleft corner from pointer */
+*** ../vim-8.1.0651/src/gui_w32.c 2018-12-27 22:43:03.901774877 +0100
+--- src/gui_w32.c 2018-12-28 19:12:47.316154820 +0100
+***************
+*** 8787,8793 ****
+ {
+ TOOLINFOW *pti;
+ int ToolInfoSize;
+- WCHAR *tofree = NULL;
+
+ if (multiline_balloon_available() == TRUE)
+ ToolInfoSize = sizeof(TOOLINFOW_NEW);
+--- 8787,8792 ----
+***************
+*** 8817,8824 ****
+ RECT rect;
+ TOOLINFOW_NEW *ptin = (TOOLINFOW_NEW *)pti;
+ pti->lpszText = LPSTR_TEXTCALLBACKW;
+! tofree = enc_to_utf16((char_u*)text, NULL);
+! ptin->lParam = (LPARAM)tofree;
+ // switch multiline tooltips on
+ if (GetClientRect(s_textArea, &rect))
+ SendMessageW(beval->balloon, TTM_SETMAXTIPWIDTH, 0,
+--- 8816,8823 ----
+ RECT rect;
+ TOOLINFOW_NEW *ptin = (TOOLINFOW_NEW *)pti;
+ pti->lpszText = LPSTR_TEXTCALLBACKW;
+! beval->tofree = enc_to_utf16((char_u*)text, NULL);
+! ptin->lParam = (LPARAM)beval->tofree;
+ // switch multiline tooltips on
+ if (GetClientRect(s_textArea, &rect))
+ SendMessageW(beval->balloon, TTM_SETMAXTIPWIDTH, 0,
+***************
+*** 8827,8834 ****
+ else
+ {
+ // do this old way
+! tofree = enc_to_utf16((char_u*)text, NULL);
+! pti->lpszText = tofree;
+ }
+
+ // Limit ballooneval bounding rect to CursorPos neighbourhood.
+--- 8826,8833 ----
+ else
+ {
+ // do this old way
+! beval->tofree = enc_to_utf16((char_u*)text, NULL);
+! pti->lpszText = (LPWSTR)beval->tofree;
+ }
+
+ // Limit ballooneval bounding rect to CursorPos neighbourhood.
+***************
+*** 8851,8858 ****
+ mouse_event(MOUSEEVENTF_MOVE, 2, 2, 0, 0);
+ mouse_event(MOUSEEVENTF_MOVE, (DWORD)-1, (DWORD)-1, 0, 0);
+ vim_free(pti);
+- if (tofree != NULL)
+- vim_free(tofree);
+ }
+ #endif
+
+--- 8850,8855 ----
+***************
+*** 8898,8904 ****
+ RECT rect;
+ TOOLINFO_NEW *ptin = (TOOLINFO_NEW *)pti;
+ pti->lpszText = LPSTR_TEXTCALLBACK;
+! ptin->lParam = (LPARAM)text;
+ if (GetClientRect(s_textArea, &rect)) /* switch multiline tooltips on */
+ SendMessage(beval->balloon, TTM_SETMAXTIPWIDTH, 0,
+ (LPARAM)rect.right);
+--- 8895,8902 ----
+ RECT rect;
+ TOOLINFO_NEW *ptin = (TOOLINFO_NEW *)pti;
+ pti->lpszText = LPSTR_TEXTCALLBACK;
+! beval->tofree = vim_strsave((char_u*)text);
+! ptin->lParam = (LPARAM)beval->tofree;
+ if (GetClientRect(s_textArea, &rect)) /* switch multiline tooltips on */
+ SendMessage(beval->balloon, TTM_SETMAXTIPWIDTH, 0,
+ (LPARAM)rect.right);
+***************
+*** 9106,9114 ****
+ gui_mch_destroy_beval_area(BalloonEval *beval)
+ {
+ #ifdef FEAT_VARTABS
+! if (beval->vts)
+! vim_free(beval->vts);
+ #endif
+ vim_free(beval);
+ }
+ #endif /* FEAT_BEVAL_GUI */
+--- 9104,9112 ----
+ gui_mch_destroy_beval_area(BalloonEval *beval)
+ {
+ #ifdef FEAT_VARTABS
+! vim_free(beval->vts);
+ #endif
++ vim_free(beval->tofree);
+ vim_free(beval);
+ }
+ #endif /* FEAT_BEVAL_GUI */
+*** ../vim-8.1.0651/src/version.c 2018-12-28 19:06:43.095216722 +0100
+--- src/version.c 2018-12-28 19:12:09.156476825 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 652,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+68. Your cat always puts viruses on your dogs homepage
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0653 b/data/vim/patches/8.1.0653
new file mode 100644
index 000000000..88f28875c
--- /dev/null
+++ b/data/vim/patches/8.1.0653
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0653
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0653 (after 8.1.0651)
+Problem: Arglist test fails on MS-windows.
+Solution: Only use a file name with a double quote on Unix.
+Files: src/testdir/test_arglist.vim
+
+
+*** ../vim-8.1.0652/src/testdir/test_arglist.vim 2018-12-28 19:06:43.095216722 +0100
+--- src/testdir/test_arglist.vim 2018-12-28 19:28:02.284394775 +0100
+***************
+*** 218,226 ****
+ endfunc
+
+ func Test_args_with_quote()
+! args \"foobar
+! call assert_equal('"foobar', argv(0))
+! %argdelete
+ endfunc
+
+ " Test for 0argadd and 0argedit
+--- 218,229 ----
+ endfunc
+
+ func Test_args_with_quote()
+! " Only on Unix can a file name include a double quote.
+! if has('unix')
+! args \"foobar
+! call assert_equal('"foobar', argv(0))
+! %argdelete
+! endif
+ endfunc
+
+ " Test for 0argadd and 0argedit
+*** ../vim-8.1.0652/src/version.c 2018-12-28 19:13:28.591806287 +0100
+--- src/version.c 2018-12-28 19:29:15.439772627 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 653,
+ /**/
+
+--
+I got a new desk stapler. It broke on the first desk I tried.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0654 b/data/vim/patches/8.1.0654
new file mode 100644
index 000000000..53efd08dc
--- /dev/null
+++ b/data/vim/patches/8.1.0654
@@ -0,0 +1,412 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0654
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0654
+Problem: When deleting a line text property flags are not adjusted.
+Solution: Adjust text property flags in preceding and following lines.
+Files: src/memline.c, src/misc2.c, src/proto/misc2.pro,
+ src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.0653/src/memline.c 2018-12-26 23:42:05.331769359 +0100
+--- src/memline.c 2018-12-28 21:43:27.380673476 +0100
+***************
+*** 3214,3219 ****
+--- 3214,3317 ----
+ return OK;
+ }
+
++ #ifdef FEAT_TEXT_PROP
++ /*
++ * Adjust text properties in line "lnum" for a deleted line.
++ * When "above" is true this is the line above the deleted line.
++ * "del_props" are the properties of the deleted line.
++ */
++ static void
++ adjust_text_props_for_delete(
++ buf_T *buf,
++ linenr_T lnum,
++ char_u *del_props,
++ int del_props_len,
++ int above)
++ {
++ int did_get_line = FALSE;
++ int done_del;
++ int done_this;
++ textprop_T prop_del;
++ textprop_T prop_this;
++ bhdr_T *hp;
++ DATA_BL *dp;
++ int idx;
++ int line_start;
++ long line_size;
++ int this_props_len;
++ char_u *text;
++ size_t textlen;
++ int found;
++
++ for (done_del = 0; done_del < del_props_len; done_del += sizeof(textprop_T))
++ {
++ mch_memmove(&prop_del, del_props + done_del, sizeof(textprop_T));
++ if ((above && (prop_del.tp_flags & TP_FLAG_CONT_PREV)
++ && !(prop_del.tp_flags & TP_FLAG_CONT_NEXT))
++ || (!above && (prop_del.tp_flags & TP_FLAG_CONT_NEXT)
++ && !(prop_del.tp_flags & TP_FLAG_CONT_PREV)))
++ {
++ if (!did_get_line)
++ {
++ did_get_line = TRUE;
++ if ((hp = ml_find_line(buf, lnum, ML_FIND)) == NULL)
++ return;
++
++ dp = (DATA_BL *)(hp->bh_data);
++ idx = lnum - buf->b_ml.ml_locked_low;
++ line_start = ((dp->db_index[idx]) & DB_INDEX_MASK);
++ if (idx == 0) // first line in block, text at the end
++ line_size = dp->db_txt_end - line_start;
++ else
++ line_size = ((dp->db_index[idx - 1]) & DB_INDEX_MASK) - line_start;
++ text = (char_u *)dp + line_start;
++ textlen = STRLEN(text) + 1;
++ if ((long)textlen >= line_size)
++ {
++ if (above)
++ internal_error("no text property above deleted line");
++ else
++ internal_error("no text property below deleted line");
++ return;
++ }
++ this_props_len = line_size - textlen;
++ }
++
++ found = FALSE;
++ for (done_this = 0; done_this < this_props_len; done_this += sizeof(textprop_T))
++ {
++ mch_memmove(&prop_this, text + textlen + done_del, sizeof(textprop_T));
++ if (prop_del.tp_id == prop_this.tp_id
++ && prop_del.tp_type == prop_this.tp_type)
++ {
++ int flag = above ? TP_FLAG_CONT_NEXT : TP_FLAG_CONT_PREV;
++
++ found = TRUE;
++ if (prop_this.tp_flags & flag)
++ {
++ prop_this.tp_flags &= ~flag;
++ mch_memmove(text + textlen + done_del, &prop_this, sizeof(textprop_T));
++ }
++ else if (above)
++ internal_error("text property above deleted line does not continue");
++ else
++ internal_error("text property below deleted line does not continue");
++ }
++ }
++ if (!found)
++ {
++ if (above)
++ internal_error("text property above deleted line not found");
++ else
++ internal_error("text property below deleted line not found");
++ }
++
++ buf->b_ml.ml_flags |= (ML_LOCKED_DIRTY | ML_LOCKED_POS);
++ }
++ }
++ }
++ #endif
++
+ /*
+ * Delete line "lnum" in the current buffer.
+ * When "message" is TRUE may give a "No lines in buffer" message.
+***************
+*** 3245,3250 ****
+--- 3343,3353 ----
+ int line_start;
+ long line_size;
+ int i;
++ int ret = FAIL;
++ #ifdef FEAT_TEXT_PROP
++ char_u *textprop_save = NULL;
++ int textprop_save_len;
++ #endif
+
+ if (lnum < 1 || lnum > buf->b_ml.ml_line_count)
+ return FAIL;
+***************
+*** 3272,3280 ****
+ }
+
+ /*
+! * find the data block containing the line
+! * This also fills the stack with the blocks from the root to the data block
+! * This also releases any locked block.
+ */
+ mfp = buf->b_ml.ml_mfp;
+ if (mfp == NULL)
+--- 3375,3383 ----
+ }
+
+ /*
+! * Find the data block containing the line.
+! * This also fills the stack with the blocks from the root to the data block.
+! * This also releases any locked block..
+ */
+ mfp = buf->b_ml.ml_mfp;
+ if (mfp == NULL)
+***************
+*** 3301,3306 ****
+--- 3404,3424 ----
+ if (netbeans_active())
+ netbeans_removed(buf, lnum, 0, (long)line_size);
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ // If there are text properties, make a copy, so that we can update
++ // properties in preceding and following lines.
++ if (buf->b_has_textprop)
++ {
++ size_t textlen = STRLEN((char_u *)dp + line_start) + 1;
++
++ if ((long)textlen < line_size)
++ {
++ textprop_save_len = line_size - textlen;
++ textprop_save = vim_memsave((char_u *)dp + line_start + textlen,
++ textprop_save_len);
++ }
++ }
++ #endif
+
+ /*
+ * special case: If there is only one line in the data block it becomes empty.
+***************
+*** 3322,3334 ****
+ ip = &(buf->b_ml.ml_stack[stack_idx]);
+ idx = ip->ip_index;
+ if ((hp = mf_get(mfp, ip->ip_bnum, 1)) == NULL)
+! return FAIL;
+ pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
+ if (pp->pb_id != PTR_ID)
+ {
+ IEMSG(_("E317: pointer block id wrong 4"));
+ mf_put(mfp, hp, FALSE, FALSE);
+! return FAIL;
+ }
+ count = --(pp->pb_count);
+ if (count == 0) /* the pointer block becomes empty! */
+--- 3440,3452 ----
+ ip = &(buf->b_ml.ml_stack[stack_idx]);
+ idx = ip->ip_index;
+ if ((hp = mf_get(mfp, ip->ip_bnum, 1)) == NULL)
+! goto theend;
+ pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
+ if (pp->pb_id != PTR_ID)
+ {
+ IEMSG(_("E317: pointer block id wrong 4"));
+ mf_put(mfp, hp, FALSE, FALSE);
+! goto theend;
+ }
+ count = --(pp->pb_count);
+ if (count == 0) /* the pointer block becomes empty! */
+***************
+*** 3384,3394 ****
+ #ifdef FEAT_BYTEOFF
+ ml_updatechunk(buf, lnum, line_size, ML_CHNK_DELLINE);
+ #endif
+! return OK;
+ }
+
+ /*
+! * set the B_MARKED flag for line 'lnum'
+ */
+ void
+ ml_setmarked(linenr_T lnum)
+--- 3502,3526 ----
+ #ifdef FEAT_BYTEOFF
+ ml_updatechunk(buf, lnum, line_size, ML_CHNK_DELLINE);
+ #endif
+! ret = OK;
+!
+! theend:
+! #ifdef FEAT_TEXT_PROP
+! if (textprop_save != NULL)
+! {
+! // Adjust text properties in the line above and below.
+! if (lnum > 1)
+! adjust_text_props_for_delete(buf, lnum - 1, textprop_save, textprop_save_len, TRUE);
+! if (lnum <= buf->b_ml.ml_line_count)
+! adjust_text_props_for_delete(buf, lnum, textprop_save, textprop_save_len, FALSE);
+! }
+! vim_free(textprop_save);
+! #endif
+! return ret;
+ }
+
+ /*
+! * set the DB_MARKED flag for line 'lnum'
+ */
+ void
+ ml_setmarked(linenr_T lnum)
+***************
+*** 3417,3423 ****
+ }
+
+ /*
+! * find the first line with its B_MARKED flag set
+ */
+ linenr_T
+ ml_firstmarked(void)
+--- 3549,3555 ----
+ }
+
+ /*
+! * find the first line with its DB_MARKED flag set
+ */
+ linenr_T
+ ml_firstmarked(void)
+***************
+*** 3650,3656 ****
+ }
+
+ /*
+! * lookup line 'lnum' in a memline
+ *
+ * action: if ML_DELETE or ML_INSERT the line count is updated while searching
+ * if ML_FLUSH only flush a locked block
+--- 3782,3788 ----
+ }
+
+ /*
+! * Lookup line 'lnum' in a memline.
+ *
+ * action: if ML_DELETE or ML_INSERT the line count is updated while searching
+ * if ML_FLUSH only flush a locked block
+*** ../vim-8.1.0653/src/misc2.c 2018-12-21 16:04:16.324437435 +0100
+--- src/misc2.c 2018-12-28 20:48:07.184432933 +0100
+***************
+*** 1351,1356 ****
+--- 1351,1370 ----
+ }
+
+ /*
++ * Copy "p[len]" into allocated memory, ignoring NUL characters.
++ * Returns NULL when out of memory.
++ */
++ char_u *
++ vim_memsave(char_u *p, int len)
++ {
++ char_u *ret = alloc((unsigned)len);
++
++ if (ret != NULL)
++ mch_memmove(ret, p, (size_t)len);
++ return ret;
++ }
++
++ /*
+ * Same as vim_strsave(), but any characters found in esc_chars are preceded
+ * by a backslash.
+ */
+*** ../vim-8.1.0653/src/proto/misc2.pro 2018-12-21 15:16:57.483579762 +0100
+--- src/proto/misc2.pro 2018-12-28 20:48:14.680374028 +0100
+***************
+*** 24,30 ****
+ char_u *alloc(unsigned size);
+ char_u *alloc_id(unsigned size, alloc_id_T id);
+ char_u *alloc_clear(unsigned size);
+! char_u * alloc_clear_id(unsigned size, alloc_id_T id);
+ char_u *alloc_check(unsigned size);
+ char_u *lalloc_clear(long_u size, int message);
+ char_u *lalloc(long_u size, int message);
+--- 24,30 ----
+ char_u *alloc(unsigned size);
+ char_u *alloc_id(unsigned size, alloc_id_T id);
+ char_u *alloc_clear(unsigned size);
+! char_u *alloc_clear_id(unsigned size, alloc_id_T id);
+ char_u *alloc_check(unsigned size);
+ char_u *lalloc_clear(long_u size, int message);
+ char_u *lalloc(long_u size, int message);
+***************
+*** 34,39 ****
+--- 34,40 ----
+ void free_all_mem(void);
+ char_u *vim_strsave(char_u *string);
+ char_u *vim_strnsave(char_u *string, int len);
++ char_u *vim_memsave(char_u *p, int len);
+ char_u *vim_strsave_escaped(char_u *string, char_u *esc_chars);
+ char_u *vim_strsave_escaped_ext(char_u *string, char_u *esc_chars, int cc, int bsl);
+ int csh_like_shell(void);
+*** ../vim-8.1.0653/src/testdir/test_textprop.vim 2018-12-26 23:42:05.331769359 +0100
+--- src/testdir/test_textprop.vim 2018-12-28 21:56:36.550153919 +0100
+***************
+*** 197,202 ****
+--- 197,212 ----
+ bwipe!
+ endfunc
+
++ " Setup a three line prop in lines 2 - 4.
++ " Add short props in line 1 and 5.
++ func Setup_three_line_prop()
++ new
++ call setline(1, ['one', 'twotwo', 'three', 'fourfour', 'five'])
++ call prop_add(1, 2, {'length': 1, 'type': 'comment'})
++ call prop_add(2, 4, {'end_lnum': 4, 'end_col': 5, 'type': 'comment'})
++ call prop_add(5, 2, {'length': 1, 'type': 'comment'})
++ endfunc
++
+ func Test_prop_multiline()
+ call prop_type_add('comment', {'highlight': 'Directory'})
+ new
+***************
+*** 223,228 ****
+--- 233,262 ----
+ call prop_clear(1, 3)
+
+ bwipe!
++
++ " Test deleting the first line with a prop.
++ call Setup_three_line_prop()
++ let expect2 = {'col': 4, 'length': 4, 'type': 'comment', 'start': 1, 'end': 0, 'id': 0}
++ call assert_equal([expect2], prop_list(2))
++ 2del
++ let expect_short = {'col': 2, 'length': 1, 'type': 'comment', 'start': 1, 'end': 1, 'id': 0}
++ call assert_equal([expect_short], prop_list(1))
++ let expect2 = {'col': 1, 'length': 6, 'type': 'comment', 'start': 1, 'end': 0, 'id': 0}
++ call assert_equal([expect2], prop_list(2))
++ bwipe!
++
++ " Test deleting the last line with a prop.
++ call Setup_three_line_prop()
++ let expect3 = {'col': 1, 'length': 6, 'type': 'comment', 'start': 0, 'end': 0, 'id': 0}
++ call assert_equal([expect3], prop_list(3))
++ let expect4 = {'col': 1, 'length': 5, 'type': 'comment', 'start': 0, 'end': 1, 'id': 0}
++ call assert_equal([expect4], prop_list(4))
++ 4del
++ let expect3 = {'col': 1, 'length': 6, 'type': 'comment', 'start': 0, 'end': 1, 'id': 0}
++ call assert_equal([expect3], prop_list(3))
++ call assert_equal([expect_short], prop_list(4))
++ bwipe!
++
+ call prop_type_delete('comment')
+ endfunc
+
+*** ../vim-8.1.0653/src/version.c 2018-12-28 19:29:31.743633958 +0100
+--- src/version.c 2018-12-28 20:47:21.172793725 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 654,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+69. Yahoo welcomes you with your own start 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.0655 b/data/vim/patches/8.1.0655
new file mode 100644
index 000000000..661d93b5c
--- /dev/null
+++ b/data/vim/patches/8.1.0655
@@ -0,0 +1,407 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0655
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0655
+Problem: When appending a line text property flags are not added.
+Solution: Add text properties to a newly added line.
+Files: src/memline.c, src/testdir/test_textprop.vim, src/textprop.c
+
+
+*** ../vim-8.1.0654/src/memline.c 2018-12-28 21:59:24.508993022 +0100
+--- src/memline.c 2018-12-28 22:55:57.259280353 +0100
+***************
+*** 2568,2573 ****
+--- 2568,2633 ----
+ return (curbuf->b_ml.ml_flags & ML_LINE_DIRTY);
+ }
+
++ #ifdef FEAT_TEXT_PROP
++ static void
++ add_text_props_for_append(
++ buf_T *buf,
++ linenr_T lnum,
++ char_u **line,
++ int *len,
++ char_u **tofree)
++ {
++ int round;
++ int new_prop_count = 0;
++ int count;
++ int n;
++ char_u *props;
++ int new_len;
++ char_u *new_line;
++ textprop_T prop;
++
++ // Make two rounds:
++ // 1. calculate the extra space needed
++ // 2. allocate the space and fill it
++ for (round = 1; round <= 2; ++round)
++ {
++ if (round == 2)
++ {
++ if (new_prop_count == 0)
++ return; // nothing to do
++ new_len = *len + new_prop_count * sizeof(textprop_T);
++ new_line = alloc((unsigned)new_len);
++ if (new_line == NULL)
++ return;
++ mch_memmove(new_line, *line, *len);
++ new_prop_count = 0;
++ }
++
++ // Get the line above to find any props that continue in the next
++ // line.
++ count = get_text_props(buf, lnum, &props, FALSE);
++ for (n = 0; n < count; ++n)
++ {
++ mch_memmove(&prop, props + n * sizeof(textprop_T), sizeof(textprop_T));
++ if (prop.tp_flags & TP_FLAG_CONT_NEXT)
++ {
++ if (round == 2)
++ {
++ prop.tp_flags |= TP_FLAG_CONT_PREV;
++ prop.tp_col = 1;
++ prop.tp_len = *len;
++ mch_memmove(new_line + *len + new_prop_count * sizeof(textprop_T), &prop, sizeof(textprop_T));
++ }
++ ++new_prop_count;
++ }
++ }
++ }
++ *line = new_line;
++ *tofree = new_line;
++ *len = new_len;
++ }
++ #endif
++
+ /*
+ * Append a line after lnum (may be 0 to insert a line in front of the file).
+ * "line" does not need to be allocated, but can't be another line in a
+***************
+*** 2622,2633 ****
+ 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;
+--- 2682,2694 ----
+ ml_append_int(
+ buf_T *buf,
+ linenr_T lnum, // append after this line (can be 0)
+! char_u *line_arg, // 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
+ {
+! char_u *line = line_arg;
+! colnr_T len = len_arg;
+ int i;
+ int line_count; // number of indexes in current block
+ int offset;
+***************
+*** 2641,2656 ****
+ DATA_BL *dp;
+ PTR_BL *pp;
+ infoptr_T *ip;
+
+- /* lnum out of range */
+ if (lnum > buf->b_ml.ml_line_count || buf->b_ml.ml_mfp == NULL)
+! return FAIL;
+
+ if (lowest_marked && lowest_marked > lnum)
+ 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;
+--- 2702,2727 ----
+ DATA_BL *dp;
+ PTR_BL *pp;
+ infoptr_T *ip;
++ #ifdef FEAT_TEXT_PROP
++ char_u *tofree = NULL;
++ #endif
++ int ret = FAIL;
+
+ if (lnum > buf->b_ml.ml_line_count || buf->b_ml.ml_mfp == NULL)
+! return FAIL; // lnum out of range
+
+ if (lowest_marked && lowest_marked > lnum)
+ lowest_marked = lnum + 1;
+
+ if (len == 0)
+ len = (colnr_T)STRLEN(line) + 1; // space needed for the text
++
++ #ifdef FEAT_TEXT_PROP
++ if (curbuf->b_has_textprop && lnum > 0)
++ // Add text properties that continue from the previous line.
++ add_text_props_for_append(buf, lnum, &line, &len, &tofree);
++ #endif
++
+ space_needed = len + INDEX_SIZE; // space needed for text + index
+
+ mfp = buf->b_ml.ml_mfp;
+***************
+*** 2663,2669 ****
+ */
+ if ((hp = ml_find_line(buf, lnum == 0 ? (linenr_T)1 : lnum,
+ ML_INSERT)) == NULL)
+! return FAIL;
+
+ buf->b_ml.ml_flags &= ~ML_EMPTY;
+
+--- 2734,2740 ----
+ */
+ if ((hp = ml_find_line(buf, lnum == 0 ? (linenr_T)1 : lnum,
+ ML_INSERT)) == NULL)
+! goto theend;
+
+ buf->b_ml.ml_flags &= ~ML_EMPTY;
+
+***************
+*** 2694,2700 ****
+ --(buf->b_ml.ml_locked_lineadd);
+ --(buf->b_ml.ml_locked_high);
+ if ((hp = ml_find_line(buf, lnum + 1, ML_INSERT)) == NULL)
+! return FAIL;
+
+ db_idx = -1; /* careful, it is negative! */
+ /* get line count before the insertion */
+--- 2765,2771 ----
+ --(buf->b_ml.ml_locked_lineadd);
+ --(buf->b_ml.ml_locked_high);
+ if ((hp = ml_find_line(buf, lnum + 1, ML_INSERT)) == NULL)
+! goto theend;
+
+ db_idx = -1; /* careful, it is negative! */
+ /* get line count before the insertion */
+***************
+*** 2708,2716 ****
+
+ if ((int)dp->db_free >= space_needed) /* enough room in data block */
+ {
+! /*
+! * Insert new line in existing data block, or in data block allocated above.
+! */
+ dp->db_txt_start -= len;
+ dp->db_free -= space_needed;
+ ++(dp->db_line_count);
+--- 2779,2788 ----
+
+ if ((int)dp->db_free >= space_needed) /* enough room in data block */
+ {
+! /*
+! * Insert the new line in an existing data block, or in the data block
+! * allocated above.
+! */
+ dp->db_txt_start -= len;
+ dp->db_free -= space_needed;
+ ++(dp->db_line_count);
+***************
+*** 2756,2770 ****
+ }
+ else /* not enough space in data block */
+ {
+- /*
+- * If there is not enough room we have to create a new data block and copy some
+- * lines into it.
+- * Then we have to insert an entry in the pointer block.
+- * If this pointer block also is full, we go up another block, and so on, up
+- * to the root if necessary.
+- * The line counts in the pointer blocks have already been adjusted by
+- * ml_find_line().
+- */
+ long line_count_left, line_count_right;
+ int page_count_left, page_count_right;
+ bhdr_T *hp_left;
+--- 2828,2833 ----
+***************
+*** 2783,2788 ****
+--- 2846,2859 ----
+ PTR_BL *pp_new;
+
+ /*
++ * There is not enough room, we have to create a new data block and
++ * copy some lines into it.
++ * Then we have to insert an entry in the pointer block.
++ * If this pointer block also is full, we go up another block, and so
++ * on, up to the root if necessary.
++ * The line counts in the pointer blocks have already been adjusted by
++ * ml_find_line().
++ *
+ * We are going to allocate a new data block. Depending on the
+ * situation it will be put to the left or right of the existing
+ * block. If possible we put the new line in the left block and move
+***************
+*** 2826,2832 ****
+ /* correct line counts in pointer blocks */
+ --(buf->b_ml.ml_locked_lineadd);
+ --(buf->b_ml.ml_locked_high);
+! return FAIL;
+ }
+ if (db_idx < 0) /* left block is new */
+ {
+--- 2897,2903 ----
+ /* correct line counts in pointer blocks */
+ --(buf->b_ml.ml_locked_lineadd);
+ --(buf->b_ml.ml_locked_high);
+! goto theend;
+ }
+ if (db_idx < 0) /* left block is new */
+ {
+***************
+*** 2951,2963 ****
+ ip = &(buf->b_ml.ml_stack[stack_idx]);
+ pb_idx = ip->ip_index;
+ if ((hp = mf_get(mfp, ip->ip_bnum, 1)) == NULL)
+! return FAIL;
+ pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
+ if (pp->pb_id != PTR_ID)
+ {
+ IEMSG(_("E317: pointer block id wrong 3"));
+ mf_put(mfp, hp, FALSE, FALSE);
+! return FAIL;
+ }
+ /*
+ * TODO: If the pointer block is full and we are adding at the end
+--- 3022,3034 ----
+ ip = &(buf->b_ml.ml_stack[stack_idx]);
+ pb_idx = ip->ip_index;
+ if ((hp = mf_get(mfp, ip->ip_bnum, 1)) == NULL)
+! goto theend;
+ pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
+ if (pp->pb_id != PTR_ID)
+ {
+ IEMSG(_("E317: pointer block id wrong 3"));
+ mf_put(mfp, hp, FALSE, FALSE);
+! goto theend;
+ }
+ /*
+ * TODO: If the pointer block is full and we are adding at the end
+***************
+*** 3014,3020 ****
+ {
+ hp_new = ml_new_ptr(mfp);
+ if (hp_new == NULL) /* TODO: try to fix tree */
+! return FAIL;
+ pp_new = (PTR_BL *)(hp_new->bh_data);
+
+ if (hp->bh_bnum != 1)
+--- 3085,3091 ----
+ {
+ hp_new = ml_new_ptr(mfp);
+ if (hp_new == NULL) /* TODO: try to fix tree */
+! goto theend;
+ pp_new = (PTR_BL *)(hp_new->bh_data);
+
+ if (hp->bh_bnum != 1)
+***************
+*** 3119,3126 ****
+ if (buf->b_write_to_channel)
+ channel_write_new_lines(buf);
+ #endif
+
+! return OK;
+ }
+
+ /*
+--- 3190,3202 ----
+ if (buf->b_write_to_channel)
+ channel_write_new_lines(buf);
+ #endif
++ ret = OK;
+
+! theend:
+! #ifdef FEAT_TEXT_PROP
+! vim_free(tofree);
+! #endif
+! return ret;
+ }
+
+ /*
+*** ../vim-8.1.0654/src/testdir/test_textprop.vim 2018-12-28 21:59:24.512992993 +0100
+--- src/testdir/test_textprop.vim 2018-12-28 23:18:00.504921000 +0100
+***************
+*** 257,262 ****
+--- 257,272 ----
+ call assert_equal([expect_short], prop_list(4))
+ bwipe!
+
++ " Test appending a line below the text prop start.
++ call Setup_three_line_prop()
++ let expect2 = {'col': 4, 'length': 4, 'type': 'comment', 'start': 1, 'end': 0, 'id': 0}
++ call assert_equal([expect2], prop_list(2))
++ call append(2, "new line")
++ call assert_equal([expect2], prop_list(2))
++ let expect3 = {'col': 1, 'length': 9, 'type': 'comment', 'start': 0, 'end': 0, 'id': 0}
++ call assert_equal([expect3], prop_list(3))
++ bwipe!
++
+ call prop_type_delete('comment')
+ endfunc
+
+*** ../vim-8.1.0654/src/textprop.c 2018-12-25 23:15:41.795966567 +0100
+--- src/textprop.c 2018-12-28 23:19:17.068318767 +0100
+***************
+*** 17,30 ****
+ * Text properties have a type, which can be used to specify highlighting.
+ *
+ * TODO:
+! * - mismatch in column 1 being the first column
+! * - Let props overrule syntax HL.
+! * - When deleting a line where a prop ended, adjust flag of previous line.
+! * - When deleting a line where a prop started, adjust flag of next line.
+! * - When inserting a line add props that continue from previous line.
+! * - Adjust property column and length when text is inserted/deleted
+! * - 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
+ * - Also test line2byte() with many lines, so that ml_updatechunk() is taken
+ * into account.
+ * - add mechanism to keep track of changed lines.
+--- 17,28 ----
+ * Text properties have a type, which can be used to specify highlighting.
+ *
+ * TODO:
+! * - Perhaps we only need TP_FLAG_CONT_NEXT ?
+! * - Adjust text property column and length when text is inserted/deleted
+! * - Add an arrray for global_proptypes, to quickly lookup a prop type by ID
+! * - Add an arrray for b_proptypes, to quickly lookup a prop type by ID
+! * - Checking the text length to detect text properties is slow. Use a flag in
+! * the index, like DB_MARKED?
+ * - Also test line2byte() with many lines, so that ml_updatechunk() is taken
+ * into account.
+ * - add mechanism to keep track of changed lines.
+*** ../vim-8.1.0654/src/version.c 2018-12-28 21:59:24.512992993 +0100
+--- src/version.c 2018-12-28 22:58:21.238154315 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 655,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+71. You wonder how people walk
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0656 b/data/vim/patches/8.1.0656
new file mode 100644
index 000000000..b01446ce3
--- /dev/null
+++ b/data/vim/patches/8.1.0656
@@ -0,0 +1,119 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0656
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0656
+Problem: Trying to reconnect to X server may cause problems.
+Solution: Do no try reconnecting when exiting. (James McCoy)
+Files: src/os_unix.c
+
+
+*** ../vim-8.1.0655/src/os_unix.c 2018-12-28 17:01:55.307292166 +0100
+--- src/os_unix.c 2018-12-29 10:55:01.706850859 +0100
+***************
+*** 1671,1676 ****
+--- 1671,1702 ----
+ return 0;
+ }
+
++ /*
++ * Return TRUE when connection to the X server is desired.
++ */
++ static int
++ x_connect_to_server(void)
++ {
++ // No point in connecting if we are exiting or dying.
++ if (exiting || v_dying)
++ return FALSE;
++
++ #if defined(FEAT_CLIENTSERVER)
++ if (x_force_connect)
++ return TRUE;
++ #endif
++ if (x_no_connect)
++ return FALSE;
++
++ /* Check for a match with "exclude:" from 'clipboard'. */
++ if (clip_exclude_prog != NULL)
++ {
++ if (vim_regexec_prog(&clip_exclude_prog, FALSE, T_NAME, (colnr_T)0))
++ return FALSE;
++ }
++ return TRUE;
++ }
++
+ #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
+ # if defined(HAVE_SETJMP_H)
+ /*
+***************
+*** 1716,1722 ****
+ static void
+ may_restore_clipboard(void)
+ {
+! if (xterm_dpy_retry_count > 0)
+ {
+ --xterm_dpy_retry_count;
+
+--- 1742,1749 ----
+ static void
+ may_restore_clipboard(void)
+ {
+! // Only try restoring if we want the connection.
+! if (x_connect_to_server() && xterm_dpy_retry_count > 0)
+ {
+ --xterm_dpy_retry_count;
+
+***************
+*** 1737,1764 ****
+ #endif
+
+ /*
+- * Return TRUE when connection to the X server is desired.
+- */
+- static int
+- x_connect_to_server(void)
+- {
+- #if defined(FEAT_CLIENTSERVER)
+- if (x_force_connect)
+- return TRUE;
+- #endif
+- if (x_no_connect)
+- return FALSE;
+-
+- /* Check for a match with "exclude:" from 'clipboard'. */
+- if (clip_exclude_prog != NULL)
+- {
+- if (vim_regexec_prog(&clip_exclude_prog, FALSE, T_NAME, (colnr_T)0))
+- return FALSE;
+- }
+- return TRUE;
+- }
+-
+- /*
+ * Test if "dpy" and x11_window are valid by getting the window title.
+ * I don't actually want it yet, so there may be a simpler call to use, but
+ * this will cause the error handler x_error_check() to be called if anything
+--- 1764,1769 ----
+*** ../vim-8.1.0655/src/version.c 2018-12-28 23:22:36.270750732 +0100
+--- src/version.c 2018-12-29 10:59:48.804432411 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 656,
+ /**/
+
+--
+"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.0657 b/data/vim/patches/8.1.0657
new file mode 100644
index 000000000..a8402e1a0
--- /dev/null
+++ b/data/vim/patches/8.1.0657
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0657
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0657 (after 8.1.0656)
+Problem: Get error for using regexp recursively. (Dominique Pelle)
+Solution: Do no check if connection is desired.
+Files: src/os_unix.c
+
+
+*** ../vim-8.1.0656/src/os_unix.c 2018-12-29 11:03:19.158409090 +0100
+--- src/os_unix.c 2018-12-29 13:07:34.475428967 +0100
+***************
+*** 1742,1749 ****
+ static void
+ may_restore_clipboard(void)
+ {
+! // Only try restoring if we want the connection.
+! if (x_connect_to_server() && xterm_dpy_retry_count > 0)
+ {
+ --xterm_dpy_retry_count;
+
+--- 1742,1749 ----
+ static void
+ may_restore_clipboard(void)
+ {
+! // No point in restoring the connecting if we are exiting or dying.
+! if (!exiting && !v_dying && xterm_dpy_retry_count > 0)
+ {
+ --xterm_dpy_retry_count;
+
+*** ../vim-8.1.0656/src/version.c 2018-12-29 11:03:19.158409090 +0100
+--- src/version.c 2018-12-29 13:09:23.998509304 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 657,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+74. Your most erotic dreams are about cybersex
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0658 b/data/vim/patches/8.1.0658
new file mode 100644
index 000000000..6048cc5fd
--- /dev/null
+++ b/data/vim/patches/8.1.0658
@@ -0,0 +1,1382 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0658
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0658
+Problem: Deleting signs and completion for :sign is insufficient.
+Solution: Add deleting signs in a specified or any group from the current
+ cursor location. Add group and priority to sign command
+ completion. Add tests for different sign unplace commands. Update
+ help text. Add tests for sign jump with group. Update help for
+ sign jump. (Yegappan Lakshmanan, closes #3731)
+Files: runtime/doc/sign.txt, src/buffer.c, src/evalfunc.c, src/ex_cmds.c,
+ src/netbeans.c, src/proto/buffer.pro, src/proto/ex_cmds.pro,
+ src/testdir/test_signs.vim
+
+
+*** ../vim-8.1.0657/runtime/doc/sign.txt 2018-12-21 15:16:57.475579814 +0100
+--- runtime/doc/sign.txt 2018-12-29 18:36:00.268781805 +0100
+***************
+*** 251,263 ****
+ all the files it appears in.
+
+ :sign unplace *
+! Remove all placed signs in the global group.
+
+ :sign unplace * group=*
+! Remove all placed signs in all the groups.
+
+ :sign unplace
+! Remove the placed sign at the cursor position.
+
+
+ LISTING PLACED SIGNS *:sign-place-list*
+--- 251,274 ----
+ all the files it appears in.
+
+ :sign unplace *
+! Remove placed signs in the global group from all the files.
+!
+! :sign unplace * group={group}
+! Remove placed signs in group {group} from all the files.
+
+ :sign unplace * group=*
+! Remove placed signs in all the groups from all the files.
+
+ :sign unplace
+! Remove a placed sign at the cursor position. If multiple signs
+! are placed in the line, then only one is removed.
+!
+! :sign unplace group={group}
+! Remove a placed sign in group {group} at the cursor
+! position.
+!
+! :sign unplace group=*
+! Remove a placed sign in any group at the cursor position.
+
+
+ LISTING PLACED SIGNS *:sign-place-list*
+***************
+*** 271,286 ****
+ :sign place group={group} file={fname}
+ List signs in group {group} placed in file {fname}.
+
+ :sign place buffer={nr}
+ List signs placed in buffer {nr}.
+
+ :sign place group={group} buffer={nr}
+ List signs in group {group} placed in buffer {nr}.
+
+! :sign place List placed signs in all files.
+
+ :sign place group={group}
+! List placed signs in all sign groups in all the files.
+
+
+ JUMPING TO A SIGN *:sign-jump* *E157*
+--- 282,306 ----
+ :sign place group={group} file={fname}
+ List signs in group {group} placed in file {fname}.
+
++ :sign place group=* file={fname}
++ List signs in all the groups placed in file {fname}.
++
+ :sign place buffer={nr}
+ List signs placed in buffer {nr}.
+
+ :sign place group={group} buffer={nr}
+ List signs in group {group} placed in buffer {nr}.
+
+! :sign place group=* buffer={nr}
+! List signs in all the groups placed in buffer {nr}.
+!
+! :sign place List placed signs in the global group in all files.
+
+ :sign place group={group}
+! List placed signs with sign group {group} in all files.
+!
+! :sign place group=*
+! List placed signs in all sign groups in all files.
+
+
+ JUMPING TO A SIGN *:sign-jump* *E157*
+***************
+*** 292,300 ****
+--- 312,326 ----
+ If the file isn't displayed in window and the current file can
+ not be |abandon|ed this fails.
+
++ :sign jump {id} group={group} file={fname}
++ Same but jump to the sign in group {group}
++
+ :sign jump {id} buffer={nr} *E934*
+ Same, but use buffer {nr}. This fails if buffer {nr} does not
+ have a name.
+
++ :sign jump {id} group={group} buffer={nr}
++ Same but jump to the sign in group {group}
++
+
+ vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0657/src/buffer.c 2018-12-27 00:28:27.497299324 +0100
+--- src/buffer.c 2018-12-29 18:38:43.291325605 +0100
+***************
+*** 6077,6086 ****
+ int
+ sign_in_group(signlist_T *sign, char_u *group)
+ {
+! return ((group != NULL && STRCMP(group, "*") == 0) ||
+! (group == NULL && sign->group == NULL) ||
+! (group != NULL && sign->group != NULL &&
+! STRCMP(group, sign->group->sg_name) == 0));
+ }
+
+ /*
+--- 6077,6086 ----
+ int
+ sign_in_group(signlist_T *sign, char_u *group)
+ {
+! return ((group != NULL && STRCMP(group, "*") == 0)
+! || (group == NULL && sign->group == NULL)
+! || (group != NULL && sign->group != NULL
+! && STRCMP(group, sign->group->sg_name) == 0));
+ }
+
+ /*
+***************
+*** 6207,6212 ****
+--- 6207,6213 ----
+ linenr_T
+ buf_delsign(
+ buf_T *buf, // buffer sign is stored in
++ linenr_T atlnum, // sign at this line, 0 - at any line
+ int id, // sign id
+ char_u *group) // sign group
+ {
+***************
+*** 6220,6226 ****
+ for (sign = buf->b_signlist; sign != NULL; sign = next)
+ {
+ next = sign->next;
+! if ((id == 0 || sign->id == id) && sign_in_group(sign, group))
+
+ {
+ *lastp = next;
+--- 6221,6229 ----
+ for (sign = buf->b_signlist; sign != NULL; sign = next)
+ {
+ next = sign->next;
+! if ((id == 0 || sign->id == id) &&
+! (atlnum == 0 || sign->lnum == atlnum) &&
+! sign_in_group(sign, group))
+
+ {
+ *lastp = next;
+***************
+*** 6230,6237 ****
+ if (sign->group != NULL)
+ sign_group_unref(sign->group->sg_name);
+ vim_free(sign);
+ // Check whether only one sign needs to be deleted
+! if (group == NULL || (*group != '*' && id != 0))
+ break;
+ }
+ else
+--- 6233,6246 ----
+ if (sign->group != NULL)
+ sign_group_unref(sign->group->sg_name);
+ vim_free(sign);
++ update_debug_sign(buf, lnum);
+ // Check whether only one sign needs to be deleted
+! // If deleting a sign with a specific identifer in a particular
+! // group or deleting any sign at a particular line number, delete
+! // only one sign.
+! if (group == NULL
+! || (*group != '*' && id != 0)
+! || (*group == '*' && atlnum != 0))
+ break;
+ }
+ else
+***************
+*** 6272,6288 ****
+
+ /*
+ * Return the sign at line 'lnum' in buffer 'buf'. Returns NULL if a sign is
+! * not found at the line.
+ */
+ static signlist_T *
+ buf_getsign_at_line(
+ buf_T *buf, // buffer whose sign we are searching for
+! linenr_T lnum) // line number of sign
+ {
+ signlist_T *sign; // a sign in the signlist
+
+ FOR_ALL_SIGNS_IN_BUF(buf, sign)
+! if (sign->lnum == lnum)
+ return sign;
+
+ return NULL;
+--- 6281,6298 ----
+
+ /*
+ * Return the sign at line 'lnum' in buffer 'buf'. Returns NULL if a sign is
+! * not found at the line. If 'groupname' is NULL, searches in the global group.
+ */
+ static signlist_T *
+ buf_getsign_at_line(
+ buf_T *buf, // buffer whose sign we are searching for
+! linenr_T lnum, // line number of sign
+! char_u *groupname) // sign group name
+ {
+ signlist_T *sign; // a sign in the signlist
+
+ FOR_ALL_SIGNS_IN_BUF(buf, sign)
+! if (sign->lnum == lnum && sign_in_group(sign, groupname))
+ return sign;
+
+ return NULL;
+***************
+*** 6312,6322 ****
+ int
+ buf_findsign_id(
+ buf_T *buf, // buffer whose sign we are searching for
+! linenr_T lnum) // line number of sign
+ {
+ signlist_T *sign; // a sign in the signlist
+
+! sign = buf_getsign_at_line(buf, lnum);
+ if (sign != NULL)
+ return sign->id;
+
+--- 6322,6333 ----
+ int
+ buf_findsign_id(
+ buf_T *buf, // buffer whose sign we are searching for
+! linenr_T lnum, // line number of sign
+! char_u *groupname) // sign group name
+ {
+ signlist_T *sign; // a sign in the signlist
+
+! sign = buf_getsign_at_line(buf, lnum, groupname);
+ if (sign != NULL)
+ return sign->id;
+
+***************
+*** 6401,6416 ****
+ }
+
+ /*
+! * Delete all signs in all buffers.
+ */
+ void
+! buf_delete_all_signs(void)
+ {
+ buf_T *buf; /* buffer we are checking for signs */
+
+ FOR_ALL_BUFFERS(buf)
+ if (buf->b_signlist != NULL)
+! buf_delete_signs(buf, (char_u *)"*");
+ }
+
+ /*
+--- 6412,6427 ----
+ }
+
+ /*
+! * Delete all the signs in the specified group in all the buffers.
+ */
+ void
+! buf_delete_all_signs(char_u *groupname)
+ {
+ buf_T *buf; /* buffer we are checking for signs */
+
+ FOR_ALL_BUFFERS(buf)
+ if (buf->b_signlist != NULL)
+! buf_delete_signs(buf, groupname);
+ }
+
+ /*
+*** ../vim-8.1.0657/src/evalfunc.c 2018-12-27 23:44:34.797953474 +0100
+--- src/evalfunc.c 2018-12-29 18:36:00.272781771 +0100
+***************
+*** 11600,11611 ****
+ {
+ // Delete the sign in all the buffers
+ FOR_ALL_BUFFERS(buf)
+! if (sign_unplace(sign_id, group, buf) == OK)
+ rettv->vval.v_number = 0;
+ }
+ else
+ {
+! if (sign_unplace(sign_id, group, buf) == OK)
+ rettv->vval.v_number = 0;
+ }
+ vim_free(group);
+--- 11600,11611 ----
+ {
+ // Delete the sign in all the buffers
+ FOR_ALL_BUFFERS(buf)
+! if (sign_unplace(sign_id, group, buf, 0) == OK)
+ rettv->vval.v_number = 0;
+ }
+ else
+ {
+! if (sign_unplace(sign_id, group, buf, 0) == OK)
+ rettv->vval.v_number = 0;
+ }
+ vim_free(group);
+*** ../vim-8.1.0657/src/ex_cmds.c 2018-12-27 00:28:27.497299324 +0100
+--- src/ex_cmds.c 2018-12-29 18:36:00.272781771 +0100
+***************
+*** 7895,7901 ****
+ * Unplace the specified sign
+ */
+ int
+! sign_unplace(int sign_id, char_u *sign_group, buf_T *buf)
+ {
+ if (sign_id == 0)
+ {
+--- 7895,7901 ----
+ * Unplace the specified sign
+ */
+ int
+! sign_unplace(int sign_id, char_u *sign_group, buf_T *buf, linenr_T atlnum)
+ {
+ if (sign_id == 0)
+ {
+***************
+*** 7908,7923 ****
+ linenr_T lnum;
+
+ // Delete only the specified signs
+! lnum = buf_delsign(buf, sign_id, sign_group);
+ if (lnum == 0)
+ return FAIL;
+- update_debug_sign(buf, lnum);
+ }
+
+ return OK;
+ }
+
+ /*
+ * ":sign" command
+ */
+ void
+--- 7908,7937 ----
+ linenr_T lnum;
+
+ // Delete only the specified signs
+! lnum = buf_delsign(buf, atlnum, sign_id, sign_group);
+ if (lnum == 0)
+ return FAIL;
+ }
+
+ return OK;
+ }
+
+ /*
++ * Unplace the sign at the current cursor line.
++ */
++ static void
++ sign_unplace_at_cursor(char_u *groupname)
++ {
++ int id = -1;
++
++ id = buf_findsign_id(curwin->w_buffer, curwin->w_cursor.lnum, groupname);
++ if (id > 0)
++ sign_unplace(id, groupname, curwin->w_buffer, curwin->w_cursor.lnum);
++ else
++ EMSG(_("E159: Missing sign number"));
++ }
++
++ /*
+ * ":sign" command
+ */
+ void
+***************
+*** 8047,8060 ****
+ sign_list_placed(NULL, NULL);
+ }
+ else if (idx == SIGNCMD_UNPLACE)
+- {
+ /* ":sign unplace": remove placed sign at cursor */
+! id = buf_findsign_id(curwin->w_buffer, curwin->w_cursor.lnum);
+! if (id > 0)
+! sign_unplace(id, NULL, curwin->w_buffer);
+! else
+! EMSG(_("E159: Missing sign number"));
+! }
+ else
+ EMSG(_(e_argreq));
+ return;
+--- 8061,8068 ----
+ sign_list_placed(NULL, NULL);
+ }
+ else if (idx == SIGNCMD_UNPLACE)
+ /* ":sign unplace": remove placed sign at cursor */
+! sign_unplace_at_cursor(NULL);
+ else
+ EMSG(_(e_argreq));
+ return;
+***************
+*** 8063,8069 ****
+ if (idx == SIGNCMD_UNPLACE && arg[0] == '*' && arg[1] == NUL)
+ {
+ /* ":sign unplace *": remove all placed signs */
+! buf_delete_all_signs();
+ return;
+ }
+
+--- 8071,8077 ----
+ if (idx == SIGNCMD_UNPLACE && arg[0] == '*' && arg[1] == NUL)
+ {
+ /* ":sign unplace *": remove all placed signs */
+! buf_delete_all_signs(NULL);
+ return;
+ }
+
+***************
+*** 8084,8090 ****
+ {
+ /* ":sign unplace {id}": remove placed sign by number */
+ FOR_ALL_BUFFERS(buf)
+! sign_unplace(id, NULL, buf);
+ return;
+ }
+ }
+--- 8092,8098 ----
+ {
+ /* ":sign unplace {id}": remove placed sign by number */
+ FOR_ALL_BUFFERS(buf)
+! sign_unplace(id, NULL, buf, 0);
+ return;
+ }
+ }
+***************
+*** 8183,8189 ****
+ }
+ else if (idx == SIGNCMD_JUMP)
+ {
+! /* ":sign jump {id} file={fname}" */
+ if (lnum >= 0 || sign_name != NULL || buf == NULL)
+ EMSG(_(e_invarg));
+ else if ((lnum = buf_findsign(buf, id, group)) > 0)
+--- 8191,8198 ----
+ }
+ else if (idx == SIGNCMD_JUMP)
+ {
+! // ":sign jump {id} file={fname}"
+! // ":sign jump {id} group={group} file={fname}"
+ if (lnum >= 0 || sign_name != NULL || buf == NULL)
+ EMSG(_(e_invarg));
+ else if ((lnum = buf_findsign(buf, id, group)) > 0)
+***************
+*** 8225,8231 ****
+ {
+ if (buf != NULL)
+ // ":sign unplace * file={fname}"
+! sign_unplace(0, group, buf);
+ else
+ // ":sign unplace * group=*": remove all placed signs
+ FOR_ALL_BUFFERS(buf)
+--- 8234,8240 ----
+ {
+ if (buf != NULL)
+ // ":sign unplace * file={fname}"
+! sign_unplace(0, group, buf, 0);
+ else
+ // ":sign unplace * group=*": remove all placed signs
+ FOR_ALL_BUFFERS(buf)
+***************
+*** 8238,8251 ****
+ // ":sign unplace {id} file={fname}"
+ // ":sign unplace {id} group={group} file={fname}"
+ // ":sign unplace {id} group=* file={fname}"
+! sign_unplace(id, group, buf);
+ else
+! // ":sign unplace {id} group={group}":
+! // ":sign unplace {id} group=*":
+! // remove all placed signs in this group.
+! FOR_ALL_BUFFERS(buf)
+! if (buf->b_signlist != NULL)
+! sign_unplace(id, group, buf);
+ }
+ }
+ /* idx == SIGNCMD_PLACE */
+--- 8247,8272 ----
+ // ":sign unplace {id} file={fname}"
+ // ":sign unplace {id} group={group} file={fname}"
+ // ":sign unplace {id} group=* file={fname}"
+! sign_unplace(id, group, buf, 0);
+ else
+! {
+! if (id == -1)
+! {
+! // ":sign unplace group={group}":
+! // ":sign unplace group=*":
+! // remove sign in the current line in specified group
+! sign_unplace_at_cursor(group);
+! }
+! else
+! {
+! // ":sign unplace {id} group={group}":
+! // ":sign unplace {id} group=*":
+! // remove all placed signs in this group.
+! FOR_ALL_BUFFERS(buf)
+! if (buf->b_signlist != NULL)
+! sign_unplace(id, group, buf, 0);
+! }
+! }
+ }
+ }
+ /* idx == SIGNCMD_PLACE */
+***************
+*** 8581,8593 ****
+ {
+ char *place_arg[] =
+ {
+! "line=", "name=", "file=", "buffer=", NULL
+ };
+ return (char_u *)place_arg[idx];
+ }
+ case EXP_UNPLACE:
+ {
+! char *unplace_arg[] = { "file=", "buffer=", NULL };
+ return (char_u *)unplace_arg[idx];
+ }
+ case EXP_SIGN_NAMES:
+--- 8602,8615 ----
+ {
+ char *place_arg[] =
+ {
+! "line=", "name=", "group=", "priority=", "file=",
+! "buffer=", NULL
+ };
+ return (char_u *)place_arg[idx];
+ }
+ case EXP_UNPLACE:
+ {
+! char *unplace_arg[] = { "group=", "file=", "buffer=", NULL };
+ return (char_u *)unplace_arg[idx];
+ }
+ case EXP_SIGN_NAMES:
+*** ../vim-8.1.0657/src/netbeans.c 2018-12-21 15:16:57.479579788 +0100
+--- src/netbeans.c 2018-12-29 18:36:00.272781771 +0100
+***************
+*** 1251,1262 ****
+ /* delete signs from the lines being deleted */
+ for (i = del_from_lnum; i <= del_to_lnum; i++)
+ {
+! int id = buf_findsign_id(buf->bufp, (linenr_T)i);
+ if (id > 0)
+ {
+ nbdebug((" Deleting sign %d on line %d\n",
+ id, i));
+! buf_delsign(buf->bufp, id, NULL);
+ }
+ else
+ {
+--- 1251,1262 ----
+ /* delete signs from the lines being deleted */
+ for (i = del_from_lnum; i <= del_to_lnum; i++)
+ {
+! int id = buf_findsign_id(buf->bufp, (linenr_T)i, NULL);
+ if (id > 0)
+ {
+ nbdebug((" Deleting sign %d on line %d\n",
+ id, i));
+! buf_delsign(buf->bufp, 0, id, NULL);
+ }
+ else
+ {
+*** ../vim-8.1.0657/src/proto/buffer.pro 2018-12-27 00:28:27.501299292 +0100
+--- src/proto/buffer.pro 2018-12-29 18:40:08.310566333 +0100
+***************
+*** 69,91 ****
+ void switch_to_win_for_buf(buf_T *buf, win_T **save_curwinp, tabpage_T **save_curtabp, bufref_T *save_curbuf);
+ void restore_win_for_buf(win_T *save_curwin, tabpage_T *save_curtab, bufref_T *save_curbuf);
+ int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
+- void buf_addsign(buf_T *buf, int id, char_u *group, int prio, linenr_T lnum, int typenr);
+- linenr_T buf_change_sign_type(buf_T *buf, int markId, char_u *group, int typenr);
+- int buf_getsigntype(buf_T *buf, linenr_T lnum, int type);
+- linenr_T buf_delsign(buf_T *buf, int id, char_u *group);
+- int buf_findsign(buf_T *buf, int id, char_u *group);
+- #ifdef FEAT_SIGNS
+ void init_signs(void);
+ int sign_group_get_next_signid(buf_T *buf, char_u *groupname);
+ int sign_in_group(signlist_T *sign, char_u *group);
+ dict_T *sign_get_info(signlist_T *sign);
+ signlist_T *buf_getsign_with_id(buf_T *buf, int id, char_u *group);
+! #endif
+! int buf_findsign_id(buf_T *buf, linenr_T lnum);
+ int buf_findsigntype_id(buf_T *buf, linenr_T lnum, int typenr);
+ int buf_signcount(buf_T *buf, linenr_T lnum);
+ void buf_delete_signs(buf_T *buf, char_u *group);
+! void buf_delete_all_signs(void);
+ void sign_list_placed(buf_T *rbuf, char_u *sign_group);
+ void sign_mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_after);
+ void set_buflisted(int on);
+--- 69,89 ----
+ void switch_to_win_for_buf(buf_T *buf, win_T **save_curwinp, tabpage_T **save_curtabp, bufref_T *save_curbuf);
+ void restore_win_for_buf(win_T *save_curwin, tabpage_T *save_curtab, bufref_T *save_curbuf);
+ int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
+ void init_signs(void);
+ int sign_group_get_next_signid(buf_T *buf, char_u *groupname);
+ int sign_in_group(signlist_T *sign, char_u *group);
+ dict_T *sign_get_info(signlist_T *sign);
++ void buf_addsign(buf_T *buf, int id, char_u *groupname, int prio, linenr_T lnum, int typenr);
++ linenr_T buf_change_sign_type(buf_T *buf, int markId, char_u *group, int typenr);
++ int buf_getsigntype(buf_T *buf, linenr_T lnum, int type);
++ linenr_T buf_delsign(buf_T *buf, linenr_T atlnum, int id, char_u *group);
++ int buf_findsign(buf_T *buf, int id, char_u *group);
+ signlist_T *buf_getsign_with_id(buf_T *buf, int id, char_u *group);
+! int buf_findsign_id(buf_T *buf, linenr_T lnum, char_u *groupname);
+ int buf_findsigntype_id(buf_T *buf, linenr_T lnum, int typenr);
+ int buf_signcount(buf_T *buf, linenr_T lnum);
+ void buf_delete_signs(buf_T *buf, char_u *group);
+! void buf_delete_all_signs(char_u *groupname);
+ void sign_list_placed(buf_T *rbuf, char_u *sign_group);
+ void sign_mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_after);
+ void set_buflisted(int on);
+*** ../vim-8.1.0657/src/proto/ex_cmds.pro 2018-12-21 15:16:57.479579788 +0100
+--- src/proto/ex_cmds.pro 2018-12-29 18:40:16.218495713 +0100
+***************
+*** 54,77 ****
+ void ex_exusage(exarg_T *eap);
+ void ex_viusage(exarg_T *eap);
+ void ex_helptags(exarg_T *eap);
+ void ex_sign(exarg_T *eap);
+ void sign_gui_started(void);
+ int sign_get_attr(int typenr, int line);
+ char_u *sign_get_text(int typenr);
+ void *sign_get_image(int typenr);
+ char_u *sign_typenr2name(int typenr);
+ void free_signs(void);
+- void free_signs(void);
+ char_u *get_sign_name(expand_T *xp, int idx);
+ void set_context_in_sign_cmd(expand_T *xp, char_u *arg);
+ void ex_smile(exarg_T *eap);
+ void ex_drop(exarg_T *eap);
+ char_u *skip_vimgrep_pat(char_u *p, char_u **s, int *flags);
+ void ex_oldfiles(exarg_T *eap);
+- int sign_define_by_name(char_u *name, char_u *icon, char_u *linehl, char_u *text, char_u *texthl);
+- int sign_undefine_by_name(char_u *name);
+- void sign_getlist(char_u *name, list_T *retlist);
+- int sign_place(int *sign_id, char_u *group, char_u *sign_name, buf_T *buf, linenr_T lnum, int prio);
+- int sign_unplace(int id, char_u *group, buf_T *buf);
+- void sign_get_placed(buf_T *buf, linenr_T lnum, int id, char_u *group, list_T *retlist);
+ /* vim: set ft=c : */
+--- 54,76 ----
+ void ex_exusage(exarg_T *eap);
+ void ex_viusage(exarg_T *eap);
+ void ex_helptags(exarg_T *eap);
++ int sign_define_by_name(char_u *name, char_u *icon, char_u *linehl, char_u *text, char_u *texthl);
++ int sign_undefine_by_name(char_u *name);
++ int sign_place(int *sign_id, char_u *sign_group, char_u *sign_name, buf_T *buf, linenr_T lnum, int prio);
++ int sign_unplace(int sign_id, char_u *sign_group, buf_T *buf, linenr_T atlnum);
+ void ex_sign(exarg_T *eap);
++ void sign_getlist(char_u *name, list_T *retlist);
++ void sign_get_placed(buf_T *buf, linenr_T lnum, int sign_id, char_u *sign_group, list_T *retlist);
+ void sign_gui_started(void);
+ int sign_get_attr(int typenr, int line);
+ char_u *sign_get_text(int typenr);
+ void *sign_get_image(int typenr);
+ char_u *sign_typenr2name(int typenr);
+ void free_signs(void);
+ char_u *get_sign_name(expand_T *xp, int idx);
+ void set_context_in_sign_cmd(expand_T *xp, char_u *arg);
+ void ex_smile(exarg_T *eap);
+ void ex_drop(exarg_T *eap);
+ char_u *skip_vimgrep_pat(char_u *p, char_u **s, int *flags);
+ void ex_oldfiles(exarg_T *eap);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0657/src/testdir/test_signs.vim 2018-12-27 00:28:27.501299292 +0100
+--- src/testdir/test_signs.vim 2018-12-29 18:36:00.272781771 +0100
+***************
+*** 28,35 ****
+ let a=execute('sign list Sign1')
+ call assert_equal("\nsign Sign1 text=x ", a)
+
+! " Split the window to the bottom to verify sign jump will stay in the current window
+! " if the buffer is displayed there.
+ let bn = bufnr('%')
+ let wn = winnr()
+ exe 'sign place 41 line=3 name=Sign1 buffer=' . bn
+--- 28,35 ----
+ let a=execute('sign list Sign1')
+ call assert_equal("\nsign Sign1 text=x ", a)
+
+! " Split the window to the bottom to verify sign jump will stay in the
+! " current window if the buffer is displayed there.
+ let bn = bufnr('%')
+ let wn = winnr()
+ exe 'sign place 41 line=3 name=Sign1 buffer=' . bn
+***************
+*** 211,229 ****
+ call assert_equal('"sign undefine Sign1 Sign2', @:)
+
+ call feedkeys(":sign place 1 \<C-A>\<C-B>\"\<CR>", 'tx')
+! call assert_equal('"sign place 1 buffer= file= line= name=', @:)
+
+ call feedkeys(":sign place 1 name=\<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign place 1 name=Sign1 Sign2', @:)
+
+ call feedkeys(":sign unplace 1 \<C-A>\<C-B>\"\<CR>", 'tx')
+! call assert_equal('"sign unplace 1 buffer= file=', @:)
+
+ call feedkeys(":sign list \<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign list Sign1 Sign2', @:)
+
+ call feedkeys(":sign jump 1 \<C-A>\<C-B>\"\<CR>", 'tx')
+! call assert_equal('"sign jump 1 buffer= file=', @:)
+
+ sign undefine Sign1
+ sign undefine Sign2
+--- 211,230 ----
+ call assert_equal('"sign undefine Sign1 Sign2', @:)
+
+ call feedkeys(":sign place 1 \<C-A>\<C-B>\"\<CR>", 'tx')
+! call assert_equal('"sign place 1 buffer= file= group= line= name= priority=',
+! \ @:)
+
+ call feedkeys(":sign place 1 name=\<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign place 1 name=Sign1 Sign2', @:)
+
+ call feedkeys(":sign unplace 1 \<C-A>\<C-B>\"\<CR>", 'tx')
+! call assert_equal('"sign unplace 1 buffer= file= group=', @:)
+
+ call feedkeys(":sign list \<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign list Sign1 Sign2', @:)
+
+ call feedkeys(":sign jump 1 \<C-A>\<C-B>\"\<CR>", 'tx')
+! call assert_equal('"sign jump 1 buffer= file= group=', @:)
+
+ sign undefine Sign1
+ sign undefine Sign2
+***************
+*** 449,455 ****
+
+ edit Xsign
+ let bnum = bufnr('%')
+- let fname = fnamemodify('Xsign', ':p')
+
+ " Error case
+ call assert_fails("call sign_place(5, [], 'sign1', 'Xsign',
+--- 450,455 ----
+***************
+*** 466,471 ****
+--- 466,475 ----
+ let s = sign_getplaced('Xsign')
+ call assert_equal(1, len(s[0].signs))
+ call assert_equal(s[0].signs[0].group, '')
++ let s = sign_getplaced(bnum, {'group' : ''})
++ call assert_equal([{'id' : 5, 'group' : '', 'name' : 'sign1', 'lnum' : 10,
++ \ 'priority' : 10}], s[0].signs)
++ call assert_equal(1, len(s[0].signs))
+ let s = sign_getplaced(bnum, {'group' : 'g2'})
+ call assert_equal('g2', s[0].signs[0].group)
+ let s = sign_getplaced(bnum, {'group' : 'g3'})
+***************
+*** 584,717 ****
+ sign place 5 group=g1 line=10 name=sign1 file=Xsign
+ sign place 5 group=g2 line=10 name=sign1 file=Xsign
+
+! " Test for :sign place group={group} file={fname}
+ let a = execute('sign place file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 name=sign1 priority=10\n", a)
+
+ let a = execute('sign place group=g2 file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ let a = execute('sign place group=* file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=10 id=5 group=g2 name=sign1 priority=10\n" .
+ \ " line=10 id=5 group=g1 name=sign1 priority=10\n" .
+ \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+ let a = execute('sign place group=xyz file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n", a)
+
+ call sign_unplace('*')
+-
+- " Test for :sign place group={group} buffer={nr}
+ let bnum = bufnr('Xsign')
+ exe 'sign place 5 line=10 name=sign1 buffer=' . bnum
+ exe 'sign place 5 group=g1 line=11 name=sign1 buffer=' . bnum
+ exe 'sign place 5 group=g2 line=12 name=sign1 buffer=' . bnum
+
+ let a = execute('sign place buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 name=sign1 priority=10\n", a)
+
+ let a = execute('sign place group=g2 buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ let a = execute('sign place group=* buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=10 id=5 name=sign1 priority=10\n" .
+ \ " line=11 id=5 group=g1 name=sign1 priority=10\n" .
+ \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ let a = execute('sign place group=xyz buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n", a)
+
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=10 id=5 name=sign1 priority=10\n" .
+ \ " line=11 id=5 group=g1 name=sign1 priority=10\n" .
+ \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+! " Test for :sign unplace
+! sign unplace 5 group=g2 file=Xsign
+! call assert_equal([], sign_getplaced(bnum, {'group' : 'g2'})[0].signs)
+!
+! exe 'sign unplace 5 group=g1 buffer=' . bnum
+! call assert_equal([], sign_getplaced(bnum, {'group' : 'g1'})[0].signs)
+!
+! sign unplace 5 group=xy file=Xsign
+! call assert_equal(1, len(sign_getplaced(bnum, {'group' : '*'})[0].signs))
+!
+! " Test for removing all the signs. Place the signs again for this test
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+! sign place 5 group=g2 line=12 name=sign1 file=Xsign
+! sign place 6 line=20 name=sign1 file=Xsign
+! sign place 6 group=g1 line=21 name=sign1 file=Xsign
+! sign place 6 group=g2 line=22 name=sign1 file=Xsign
+! sign unplace 5 group=* file=Xsign
+! let a = execute('sign place group=*')
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=20 id=6 name=sign1 priority=10\n" .
+! \ " line=21 id=6 group=g1 name=sign1 priority=10\n" .
+! \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+! " Remove all the signs from the global group
+! sign unplace * file=Xsign
+! let a = execute('sign place group=*')
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=21 id=6 group=g1 name=sign1 priority=10\n" .
+! \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+! " Remove all the signs from a particular group
+! sign place 5 line=10 name=sign1 file=Xsign
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+! sign place 5 group=g2 line=12 name=sign1 file=Xsign
+! sign unplace * group=g1 file=Xsign
+! let a = execute('sign place group=*')
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n" .
+! \ " line=12 id=5 group=g2 name=sign1 priority=10\n" .
+! \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+! " Remove all the signs from all the groups in a file
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+! sign place 6 line=20 name=sign1 file=Xsign
+! sign place 6 group=g1 line=21 name=sign1 file=Xsign
+! sign unplace * group=* file=Xsign
+! let a = execute('sign place group=*')
+! call assert_equal("\n--- Signs ---\n", a)
+
+! " Remove a particular sign id in a group from all the files
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+! sign unplace 5 group=g1
+! let a = execute('sign place group=*')
+! call assert_equal("\n--- Signs ---\n", a)
+
+! " Remove a particular sign id in all the groups from all the files
+! sign place 5 line=10 name=sign1 file=Xsign
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+! sign place 5 group=g2 line=12 name=sign1 file=Xsign
+! sign place 6 line=20 name=sign1 file=Xsign
+! sign place 6 group=g1 line=21 name=sign1 file=Xsign
+! sign place 6 group=g2 line=22 name=sign1 file=Xsign
+ sign unplace 5 group=*
+! let a = execute('sign place group=*')
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=20 id=6 name=sign1 priority=10\n" .
+! \ " line=21 id=6 group=g1 name=sign1 priority=10\n" .
+! \ " line=22 id=6 group=g2 name=sign1 priority=10\n", a)
+
+! " Remove all the signs from all the groups in all the files
+! sign place 5 line=10 name=sign1 file=Xsign
+! sign place 5 group=g1 line=11 name=sign1 file=Xsign
+ sign unplace * group=*
+! let a = execute('sign place group=*')
+! call assert_equal("\n--- Signs ---\n", a)
+
+! " Error cases
+! call assert_fails("sign place 3 group= name=sign1 buffer=" . bnum, 'E474:')
+
+- call delete("Xsign")
+ call sign_unplace('*')
+ call sign_undefine()
+ enew | only
+ endfunc
+
+ " Tests for auto-generating the sign identifier
+--- 588,1021 ----
+ sign place 5 group=g1 line=10 name=sign1 file=Xsign
+ sign place 5 group=g2 line=10 name=sign1 file=Xsign
+
+! " Tests for the ':sign place' command
+!
+! " :sign place file={fname}
+ let a = execute('sign place file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 name=sign1 priority=10\n", a)
+
++ " :sign place group={group} file={fname}
+ let a = execute('sign place group=g2 file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 group=g2 name=sign1 priority=10\n", a)
+
++ " :sign place group=* file={fname}
+ let a = execute('sign place group=* file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=10 id=5 group=g2 name=sign1 priority=10\n" .
+ \ " line=10 id=5 group=g1 name=sign1 priority=10\n" .
+ \ " line=10 id=5 name=sign1 priority=10\n", a)
+
++ " Error case: non-existing group
+ let a = execute('sign place group=xyz file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n", a)
+
+ call sign_unplace('*')
+ let bnum = bufnr('Xsign')
+ exe 'sign place 5 line=10 name=sign1 buffer=' . bnum
+ exe 'sign place 5 group=g1 line=11 name=sign1 buffer=' . bnum
+ exe 'sign place 5 group=g2 line=12 name=sign1 buffer=' . bnum
+
++ " :sign place buffer={fname}
+ let a = execute('sign place buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 name=sign1 priority=10\n", a)
+
++ " :sign place group={group} buffer={fname}
+ let a = execute('sign place group=g2 buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
++ " :sign place group=* buffer={fname}
+ let a = execute('sign place group=* buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=10 id=5 name=sign1 priority=10\n" .
+ \ " line=11 id=5 group=g1 name=sign1 priority=10\n" .
+ \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
++ " Error case: non-existing group
+ let a = execute('sign place group=xyz buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n", a)
+
++ " :sign place
++ let a = execute('sign place')
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=10 id=5 name=sign1 priority=10\n", a)
++
++ " :sign place group={group}
++ let a = execute('sign place group=g1')
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=11 id=5 group=g1 name=sign1 priority=10\n", a)
++
++ " :sign place group=*
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=10 id=5 name=sign1 priority=10\n" .
+ \ " line=11 id=5 group=g1 name=sign1 priority=10\n" .
+ \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+! " Test for ':sign jump' command with groups
+! sign jump 5 group=g1 file=Xsign
+! call assert_equal(11, line('.'))
+! call assert_equal('Xsign', bufname(''))
+! sign jump 5 group=g2 file=Xsign
+! call assert_equal(12, line('.'))
+
+! " Error cases
+! call assert_fails("sign place 3 group= name=sign1 buffer=" . bnum, 'E474:')
+
+! call delete("Xsign")
+! call sign_unplace('*')
+! call sign_undefine()
+! enew | only
+! endfunc
+
+! " Place signs used for ":sign unplace" command test
+! func Place_signs_for_test()
+! call sign_unplace('*')
+
+! sign place 3 line=10 name=sign1 file=Xsign1
+! sign place 3 group=g1 line=11 name=sign1 file=Xsign1
+! sign place 3 group=g2 line=12 name=sign1 file=Xsign1
+! sign place 4 line=15 name=sign1 file=Xsign1
+! sign place 4 group=g1 line=16 name=sign1 file=Xsign1
+! sign place 4 group=g2 line=17 name=sign1 file=Xsign1
+! sign place 5 line=20 name=sign1 file=Xsign2
+! sign place 5 group=g1 line=21 name=sign1 file=Xsign2
+! sign place 5 group=g2 line=22 name=sign1 file=Xsign2
+! sign place 6 line=25 name=sign1 file=Xsign2
+! sign place 6 group=g1 line=26 name=sign1 file=Xsign2
+! sign place 6 group=g2 line=27 name=sign1 file=Xsign2
+! endfunc
+
+! " Place multiple signs in a single line for test
+! func Place_signs_at_line_for_test()
+! call sign_unplace('*')
+! sign place 3 line=13 name=sign1 file=Xsign1
+! sign place 3 group=g1 line=13 name=sign1 file=Xsign1
+! sign place 3 group=g2 line=13 name=sign1 file=Xsign1
+! sign place 4 line=13 name=sign1 file=Xsign1
+! sign place 4 group=g1 line=13 name=sign1 file=Xsign1
+! sign place 4 group=g2 line=13 name=sign1 file=Xsign1
+! endfunc
+!
+! " Tests for the ':sign unplace' command
+! func Test_sign_unplace()
+! enew | only
+! " Remove all the signs
+! call sign_unplace('*')
+! call sign_undefine()
+!
+! " Create two files and define signs
+! call writefile(repeat(["Sun is shining"], 30), "Xsign1")
+! call writefile(repeat(["It is beautiful"], 30), "Xsign2")
+!
+! let attr = {'text' : '=>', 'linehl' : 'Search', 'texthl' : 'Error'}
+! call sign_define("sign1", attr)
+!
+! edit Xsign1
+! let bnum1 = bufnr('%')
+! split Xsign2
+! let bnum2 = bufnr('%')
+!
+! let signs1 = [{'id' : 3, 'name' : 'sign1', 'lnum' : 10, 'group' : '',
+! \ 'priority' : 10},
+! \ {'id' : 3, 'name' : 'sign1', 'lnum' : 11, 'group' : 'g1',
+! \ 'priority' : 10},
+! \ {'id' : 3, 'name' : 'sign1', 'lnum' : 12, 'group' : 'g2',
+! \ 'priority' : 10},
+! \ {'id' : 4, 'name' : 'sign1', 'lnum' : 15, 'group' : '',
+! \ 'priority' : 10},
+! \ {'id' : 4, 'name' : 'sign1', 'lnum' : 16, 'group' : 'g1',
+! \ 'priority' : 10},
+! \ {'id' : 4, 'name' : 'sign1', 'lnum' : 17, 'group' : 'g2',
+! \ 'priority' : 10},]
+! let signs2 = [{'id' : 5, 'name' : 'sign1', 'lnum' : 20, 'group' : '',
+! \ 'priority' : 10},
+! \ {'id' : 5, 'name' : 'sign1', 'lnum' : 21, 'group' : 'g1',
+! \ 'priority' : 10},
+! \ {'id' : 5, 'name' : 'sign1', 'lnum' : 22, 'group' : 'g2',
+! \ 'priority' : 10},
+! \ {'id' : 6, 'name' : 'sign1', 'lnum' : 25, 'group' : '',
+! \ 'priority' : 10},
+! \ {'id' : 6, 'name' : 'sign1', 'lnum' : 26, 'group' : 'g1',
+! \ 'priority' : 10},
+! \ {'id' : 6, 'name' : 'sign1', 'lnum' : 27, 'group' : 'g2',
+! \ 'priority' : 10},]
+!
+! " Test for :sign unplace {id} file={fname}
+! call Place_signs_for_test()
+! sign unplace 3 file=Xsign1
+! sign unplace 6 file=Xsign2
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 3 || val.group != ''}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.id != 6 || val.group != ''}),
+! \ sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace {id} group={group} file={fname}
+! call Place_signs_for_test()
+! sign unplace 4 group=g1 file=Xsign1
+! sign unplace 5 group=g2 file=Xsign2
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 4 || val.group != 'g1'}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.id != 5 || val.group != 'g2'}),
+! \ sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace {id} group=* file={fname}
+! call Place_signs_for_test()
+! sign unplace 3 group=* file=Xsign1
+! sign unplace 6 group=* file=Xsign2
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 3}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.id != 6}),
+! \ sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace * file={fname}
+! call Place_signs_for_test()
+! sign unplace * file=Xsign1
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.group != ''}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal(signs2, sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace * group={group} file={fname}
+! call Place_signs_for_test()
+! sign unplace * group=g1 file=Xsign1
+! sign unplace * group=g2 file=Xsign2
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.group != 'g1'}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.group != 'g2'}),
+! \ sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace * group=* file={fname}
+! call Place_signs_for_test()
+! sign unplace * group=* file=Xsign2
+! call assert_equal(signs1, sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal([], sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace {id} buffer={nr}
+! call Place_signs_for_test()
+! exe 'sign unplace 3 buffer=' . bnum1
+! exe 'sign unplace 6 buffer=' . bnum2
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 3 || val.group != ''}),
+! \ sign_getplaced(bnum1, {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.id != 6 || val.group != ''}),
+! \ sign_getplaced(bnum2, {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace {id} group={group} buffer={nr}
+! call Place_signs_for_test()
+! exe 'sign unplace 4 group=g1 buffer=' . bnum1
+! exe 'sign unplace 5 group=g2 buffer=' . bnum2
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 4 || val.group != 'g1'}),
+! \ sign_getplaced(bnum1, {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.id != 5 || val.group != 'g2'}),
+! \ sign_getplaced(bnum2, {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace {id} group=* buffer={nr}
+! call Place_signs_for_test()
+! exe 'sign unplace 3 group=* buffer=' . bnum1
+! exe 'sign unplace 6 group=* buffer=' . bnum2
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 3}),
+! \ sign_getplaced(bnum1, {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.id != 6}),
+! \ sign_getplaced(bnum2, {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace * buffer={nr}
+! call Place_signs_for_test()
+! exe 'sign unplace * buffer=' . bnum1
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.group != ''}),
+! \ sign_getplaced(bnum1, {'group' : '*'})[0].signs)
+! call assert_equal(signs2, sign_getplaced(bnum2, {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace * group={group} buffer={nr}
+! call Place_signs_for_test()
+! exe 'sign unplace * group=g1 buffer=' . bnum1
+! exe 'sign unplace * group=g2 buffer=' . bnum2
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.group != 'g1'}),
+! \ sign_getplaced(bnum1, {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.group != 'g2'}),
+! \ sign_getplaced(bnum2, {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace * group=* buffer={nr}
+! call Place_signs_for_test()
+! exe 'sign unplace * group=* buffer=' . bnum2
+! call assert_equal(signs1, sign_getplaced(bnum1, {'group' : '*'})[0].signs)
+! call assert_equal([], sign_getplaced(bnum2, {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace {id}
+! call Place_signs_for_test()
+! sign unplace 4
+! sign unplace 6
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 4 || val.group != ''}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.id != 6 || val.group != ''}),
+! \ sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace {id} group={group}
+! call Place_signs_for_test()
+! sign unplace 4 group=g1
+! sign unplace 6 group=g2
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 4 || val.group != 'g1'}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.id != 6 || val.group != 'g2'}),
+! \ sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace {id} group=*
+! call Place_signs_for_test()
+! sign unplace 3 group=*
+ sign unplace 5 group=*
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 3}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.id != 5}),
+! \ sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+
+! " Test for :sign unplace *
+! call Place_signs_for_test()
+! sign unplace *
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.group != ''}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.group != ''}),
+! \ sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace * group={group}
+! call Place_signs_for_test()
+! sign unplace * group=g1
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.group != 'g1'}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal(
+! \ filter(copy(signs2),
+! \ {idx, val -> val.group != 'g1'}),
+! \ sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+!
+! " Test for :sign unplace * group=*
+! call Place_signs_for_test()
+ sign unplace * group=*
+! call assert_equal([], sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal([], sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+
+! " Negative test cases
+! call Place_signs_for_test()
+! sign unplace 3 group=xy file=Xsign1
+! sign unplace * group=xy file=Xsign1
+! silent! sign unplace * group=* file=FileNotPresent
+! call assert_equal(signs1, sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! call assert_equal(signs2, sign_getplaced('Xsign2', {'group' : '*'})[0].signs)
+!
+! " Tests for removing sign at the current cursor position
+!
+! " Test for ':sign unplace'
+! let signs1 = [{'id' : 4, 'name' : 'sign1', 'lnum' : 13, 'group' : 'g2',
+! \ 'priority' : 10},
+! \ {'id' : 4, 'name' : 'sign1', 'lnum' : 13, 'group' : 'g1',
+! \ 'priority' : 10},
+! \ {'id' : 4, 'name' : 'sign1', 'lnum' : 13, 'group' : '',
+! \ 'priority' : 10},
+! \ {'id' : 3, 'name' : 'sign1', 'lnum' : 13, 'group' : 'g2',
+! \ 'priority' : 10},
+! \ {'id' : 3, 'name' : 'sign1', 'lnum' : 13, 'group' : 'g1',
+! \ 'priority' : 10},
+! \ {'id' : 3, 'name' : 'sign1', 'lnum' : 13, 'group' : '',
+! \ 'priority' : 10},]
+! exe bufwinnr('Xsign1') . 'wincmd w'
+! call cursor(13, 1)
+!
+! " Should remove only one sign in the global group
+! call Place_signs_at_line_for_test()
+! sign unplace
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 4 || val.group != ''}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! " Should remove the second sign in the global group
+! sign unplace
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.group != ''}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+!
+! " Test for ':sign unplace group={group}'
+! call Place_signs_at_line_for_test()
+! " Should remove only one sign in group g1
+! sign unplace group=g1
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 4 || val.group != 'g1'}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! sign unplace group=g2
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 4 || val.group == ''}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+!
+! " Test for ':sign unplace group=*'
+! call Place_signs_at_line_for_test()
+! sign unplace group=*
+! sign unplace group=*
+! sign unplace group=*
+! call assert_equal(
+! \ filter(copy(signs1),
+! \ {idx, val -> val.id != 4}),
+! \ sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+! sign unplace group=*
+! sign unplace group=*
+! sign unplace group=*
+! call assert_equal([], sign_getplaced('Xsign1', {'group' : '*'})[0].signs)
+
+ call sign_unplace('*')
+ call sign_undefine()
+ enew | only
++ call delete("Xsign1")
++ call delete("Xsign2")
+ endfunc
+
+ " Tests for auto-generating the sign identifier
+***************
+*** 762,768 ****
+ " Place three signs with different priority in the same line
+ call writefile(repeat(["Sun is shining"], 30), "Xsign")
+ edit Xsign
+- let fname = fnamemodify('Xsign', ':p')
+
+ call sign_place(1, 'g1', 'sign1', 'Xsign',
+ \ {'lnum' : 11, 'priority' : 50})
+--- 1066,1071 ----
+*** ../vim-8.1.0657/src/version.c 2018-12-29 13:09:43.242347695 +0100
+--- src/version.c 2018-12-29 18:51:45.504342343 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 658,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+76. Your ISP regards you as a business partner rather than as a customer.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0659 b/data/vim/patches/8.1.0659
new file mode 100644
index 000000000..c9a1953e5
--- /dev/null
+++ b/data/vim/patches/8.1.0659
@@ -0,0 +1,73 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0659
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0659 (after 8.1.0658)
+Problem: Build failure without the sign feature.
+Solution: Put the sign struct declarations outside of the #ifdef.
+Files: src/structs.h
+
+
+*** ../vim-8.1.0658/src/structs.h 2018-12-27 00:28:27.501299292 +0100
+--- src/structs.h 2018-12-29 20:00:42.683438234 +0100
+***************
+*** 731,738 ****
+ #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)
+ // Sign group
+ typedef struct signgroup_S
+ {
+--- 731,736 ----
+***************
+*** 741,750 ****
+ char_u sg_name[1]; // sign group name
+ } signgroup_T;
+
+- // Macros to get the sign group structure from the group name
+- #define SGN_KEY_OFF offsetof(signgroup_T, sg_name)
+- #define HI2SG(hi) ((signgroup_T *)((hi)->hi_key - SGN_KEY_OFF))
+-
+ typedef struct signlist signlist_T;
+
+ struct signlist
+--- 739,744 ----
+***************
+*** 758,763 ****
+--- 752,762 ----
+ signlist_T *prev; /* previous entry -- for easy reordering */
+ };
+
++ #if defined(FEAT_SIGNS) || defined(PROTO)
++ // Macros to get the sign group structure from the group name
++ #define SGN_KEY_OFF offsetof(signgroup_T, sg_name)
++ #define HI2SG(hi) ((signgroup_T *)((hi)->hi_key - SGN_KEY_OFF))
++
+ // Default sign priority for highlighting
+ #define SIGN_DEF_PRIO 10
+
+*** ../vim-8.1.0658/src/version.c 2018-12-29 18:53:07.847607399 +0100
+--- src/version.c 2018-12-29 20:03:12.542203100 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 659,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+78. You find yourself dialing IP numbers on the phone.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0660 b/data/vim/patches/8.1.0660
new file mode 100644
index 000000000..d30a83b30
--- /dev/null
+++ b/data/vim/patches/8.1.0660
@@ -0,0 +1,221 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0660
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0660
+Problem: sign_unplace() may leak memory.
+Solution: Free the group name before returning. Add a few more tests.
+ (Yegappan Lakshmanan)
+Files: src/evalfunc.c, src/testdir/test_signs.vim
+
+
+*** ../vim-8.1.0659/src/evalfunc.c 2018-12-29 18:53:07.843607433 +0100
+--- src/evalfunc.c 2018-12-29 20:42:30.370357956 +0100
+***************
+*** 11578,11584 ****
+ if (argvars[1].v_type != VAR_DICT)
+ {
+ EMSG(_(e_dictreq));
+! return;
+ }
+ dict = argvars[1].vval.v_dict;
+
+--- 11578,11584 ----
+ if (argvars[1].v_type != VAR_DICT)
+ {
+ EMSG(_(e_dictreq));
+! goto cleanup;
+ }
+ dict = argvars[1].vval.v_dict;
+
+***************
+*** 11589,11595 ****
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+ tv_get_string(&di->di_tv));
+! return;
+ }
+ }
+ if (dict_find(dict, (char_u *)"id", -1) != NULL)
+--- 11589,11595 ----
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+ tv_get_string(&di->di_tv));
+! goto cleanup;
+ }
+ }
+ if (dict_find(dict, (char_u *)"id", -1) != NULL)
+***************
+*** 11608,11613 ****
+--- 11608,11615 ----
+ if (sign_unplace(sign_id, group, buf, 0) == OK)
+ rettv->vval.v_number = 0;
+ }
++
++ cleanup:
+ vim_free(group);
+ }
+ #endif
+*** ../vim-8.1.0659/src/testdir/test_signs.vim 2018-12-29 18:53:07.843607433 +0100
+--- src/testdir/test_signs.vim 2018-12-29 20:48:20.911472019 +0100
+***************
+*** 385,390 ****
+--- 385,392 ----
+ \ {"lnum" : -1})', 'E885:')
+ call assert_fails('call sign_place(22, "", "sign1", "Xsign",
+ \ {"lnum" : 0})', 'E885:')
++ call assert_fails('call sign_place(22, "", "sign1", "Xsign",
++ \ {"lnum" : []})', 'E745:')
+ call assert_equal(-1, sign_place(1, "*", "sign1", "Xsign", {"lnum" : 10}))
+
+ " Tests for sign_getplaced()
+***************
+*** 420,428 ****
+ \ {'id' : 20, 'buffer' : 'buffer.c'})", 'E158:')
+ call assert_fails("call sign_unplace('',
+ \ {'id' : 20, 'buffer' : ''})", 'E158:')
+! call assert_fails("call sign_unplace('',
+ \ {'id' : 20, 'buffer' : 200})", 'E158:')
+! call assert_fails("call sign_unplace('', 'mySign')", 'E715:')
+
+ " Tests for sign_undefine()
+ call assert_equal(0, sign_undefine("sign1"))
+--- 422,430 ----
+ \ {'id' : 20, 'buffer' : 'buffer.c'})", 'E158:')
+ call assert_fails("call sign_unplace('',
+ \ {'id' : 20, 'buffer' : ''})", 'E158:')
+! call assert_fails("call sign_unplace('g1',
+ \ {'id' : 20, 'buffer' : 200})", 'E158:')
+! call assert_fails("call sign_unplace('g1', 'mySign')", 'E715:')
+
+ " Tests for sign_undefine()
+ call assert_equal(0, sign_undefine("sign1"))
+***************
+*** 664,670 ****
+ call delete("Xsign")
+ call sign_unplace('*')
+ call sign_undefine()
+! enew | only
+ endfunc
+
+ " Place signs used for ":sign unplace" command test
+--- 666,672 ----
+ call delete("Xsign")
+ call sign_unplace('*')
+ call sign_undefine()
+! enew | only
+ endfunc
+
+ " Place signs used for ":sign unplace" command test
+***************
+*** 1013,1019 ****
+
+ call sign_unplace('*')
+ call sign_undefine()
+! enew | only
+ call delete("Xsign1")
+ call delete("Xsign2")
+ endfunc
+--- 1015,1021 ----
+
+ call sign_unplace('*')
+ call sign_undefine()
+! enew | only
+ call delete("Xsign1")
+ call delete("Xsign2")
+ endfunc
+***************
+*** 1042,1047 ****
+--- 1044,1052 ----
+
+ call assert_equal(1, sign_place(0, 'g1', 'sign1', 'Xsign',
+ \ {'lnum' : 11}))
++ " Check for the next generated sign id in this group
++ call assert_equal(2, sign_place(0, 'g1', 'sign1', 'Xsign',
++ \ {'lnum' : 12}))
+ call assert_equal(0, sign_unplace('g1', {'id' : 1}))
+ call assert_equal(10,
+ \ sign_getplaced('Xsign', {'id' : 1})[0].signs[0].lnum)
+***************
+*** 1049,1055 ****
+ call delete("Xsign")
+ call sign_unplace('*')
+ call sign_undefine()
+! enew | only
+ endfunc
+
+ " Test for sign priority
+--- 1054,1060 ----
+ call delete("Xsign")
+ call sign_unplace('*')
+ call sign_undefine()
+! enew | only
+ endfunc
+
+ " Test for sign priority
+***************
+*** 1085,1090 ****
+--- 1090,1097 ----
+ " Error case
+ call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign',
+ \ [])", 'E715:')
++ call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign',
++ \ {'priority' : []})", 'E745:')
+ call sign_unplace('*')
+
+ " Tests for the :sign place command with priority
+***************
+*** 1104,1110 ****
+
+ call sign_unplace('*')
+ call sign_undefine()
+! enew | only
+ call delete("Xsign")
+ endfunc
+
+--- 1111,1117 ----
+
+ call sign_unplace('*')
+ call sign_undefine()
+! enew | only
+ call delete("Xsign")
+ endfunc
+
+***************
+*** 1146,1151 ****
+
+ call sign_unplace('*')
+ call sign_undefine()
+! enew | only
+ call delete("Xsign")
+ endfunc
+--- 1153,1158 ----
+
+ call sign_unplace('*')
+ call sign_undefine()
+! enew | only
+ call delete("Xsign")
+ endfunc
+*** ../vim-8.1.0659/src/version.c 2018-12-29 20:04:36.257512068 +0100
+--- src/version.c 2018-12-29 20:57:28.734930503 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 660,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+81. At social functions you introduce your husband as "my domain server."
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0661 b/data/vim/patches/8.1.0661
new file mode 100644
index 000000000..65d28fae7
--- /dev/null
+++ b/data/vim/patches/8.1.0661
@@ -0,0 +1,94 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0661
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0661
+Problem: Clipboard regexp might be used recursively.
+Solution: Check for recursive use and bail out.
+Files: src/regexp.c, src/proto/regexp.pro, src/os_unix.c
+
+
+*** ../vim-8.1.0660/src/regexp.c 2018-12-21 16:04:16.324437435 +0100
+--- src/regexp.c 2018-12-29 22:24:58.276693199 +0100
+***************
+*** 8210,8215 ****
+--- 8210,8224 ----
+ #endif
+
+ /*
++ * Return whether "prog" is currently being executed.
++ */
++ int
++ regprog_in_use(regprog_T *prog)
++ {
++ return prog->re_in_use;
++ }
++
++ /*
+ * Match a regexp against a string.
+ * "rmp->regprog" is a compiled regexp as returned by vim_regcomp().
+ * Note: "rmp->regprog" may be freed and changed.
+*** ../vim-8.1.0660/src/proto/regexp.pro 2018-05-17 13:52:49.000000000 +0200
+--- src/proto/regexp.pro 2018-12-29 22:25:02.584654266 +0100
+***************
+*** 13,18 ****
+--- 13,19 ----
+ list_T *reg_submatch_list(int no);
+ regprog_T *vim_regcomp(char_u *expr_arg, int re_flags);
+ void vim_regfree(regprog_T *prog);
++ int regprog_in_use(regprog_T *prog);
+ int vim_regexec_prog(regprog_T **prog, int ignore_case, char_u *line, colnr_T col);
+ int vim_regexec(regmatch_T *rmp, char_u *line, colnr_T col);
+ int vim_regexec_nl(regmatch_T *rmp, char_u *line, colnr_T col);
+*** ../vim-8.1.0660/src/os_unix.c 2018-12-29 13:09:43.242347695 +0100
+--- src/os_unix.c 2018-12-29 22:22:20.674036581 +0100
+***************
+*** 1688,1696 ****
+ if (x_no_connect)
+ return FALSE;
+
+! /* Check for a match with "exclude:" from 'clipboard'. */
+ if (clip_exclude_prog != NULL)
+ {
+ if (vim_regexec_prog(&clip_exclude_prog, FALSE, T_NAME, (colnr_T)0))
+ return FALSE;
+ }
+--- 1688,1702 ----
+ if (x_no_connect)
+ return FALSE;
+
+! // Check for a match with "exclude:" from 'clipboard'.
+ if (clip_exclude_prog != NULL)
+ {
++ // Just in case we get called recursively, return FALSE. This could
++ // happen if vpeekc() is used while executing the prog and it causes a
++ // related callback to be invoked.
++ if (regprog_in_use(clip_exclude_prog))
++ return FALSE;
++
+ if (vim_regexec_prog(&clip_exclude_prog, FALSE, T_NAME, (colnr_T)0))
+ return FALSE;
+ }
+*** ../vim-8.1.0660/src/version.c 2018-12-29 21:00:20.953498877 +0100
+--- src/version.c 2018-12-29 22:27:56.171107925 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 661,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+82. AT&T names you Customer of the Month for the third consecutive 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.0662 b/data/vim/patches/8.1.0662
new file mode 100644
index 000000000..66ce67412
--- /dev/null
+++ b/data/vim/patches/8.1.0662
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0662
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0662
+Problem: Needlessly searching for tilde in string.
+Solution: Only check the first character. (James McCoy, closes #3734)
+Files: src/misc1.c
+
+
+*** ../vim-8.1.0661/src/misc1.c 2018-12-13 22:17:52.877941474 +0100
+--- src/misc1.c 2018-12-30 11:17:58.580223853 +0100
+***************
+*** 4924,4930 ****
+ homedir_env = NULL;
+
+ #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL)
+! if (homedir_env != NULL && vim_strchr(homedir_env, '~') != NULL)
+ {
+ int usedlen = 0;
+ int flen;
+--- 4924,4930 ----
+ homedir_env = NULL;
+
+ #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL)
+! if (homedir_env != NULL && *homedir_env == '~')
+ {
+ int usedlen = 0;
+ int flen;
+*** ../vim-8.1.0661/src/version.c 2018-12-29 22:28:42.754699093 +0100
+--- src/version.c 2018-12-30 11:19:48.163285950 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 662,
+ /**/
+
+--
+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.0663 b/data/vim/patches/8.1.0663
new file mode 100644
index 000000000..b6b0c1ce3
--- /dev/null
+++ b/data/vim/patches/8.1.0663
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0663
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0663
+Problem: Text property display wrong when 'number' is set. (Dominique
+ Pelle)
+Solution: Compare with "vcol" instead of "col".
+Files: src/screen.c
+
+
+*** ../vim-8.1.0662/src/screen.c 2018-12-26 00:25:15.551995263 +0100
+--- src/screen.c 2018-12-30 22:03:13.855095189 +0100
+***************
+*** 4304,4310 ****
+ {
+ 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)
+--- 4304,4310 ----
+ {
+ int tpi = text_prop_idxs[pi];
+
+! if (vcol >= text_props[tpi].tp_col - 1
+ + text_props[tpi].tp_len)
+ {
+ if (pi + 1 < text_props_active)
+***************
+*** 4319,4325 ****
+
+ // 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;
+--- 4319,4325 ----
+
+ // Add any text property that starts in this column.
+ while (text_prop_next < text_prop_count
+! && vcol >= text_props[text_prop_next].tp_col - 1)
+ text_prop_idxs[text_props_active++] = text_prop_next++;
+
+ text_prop_type = NULL;
+*** ../vim-8.1.0662/src/version.c 2018-12-30 11:38:49.933270875 +0100
+--- src/version.c 2018-12-30 22:04:27.178469489 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 663,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+86. E-mail Deficiency Depression (EDD) forces you to e-mail yourself.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0664 b/data/vim/patches/8.1.0664
new file mode 100644
index 000000000..1002ffe3c
--- /dev/null
+++ b/data/vim/patches/8.1.0664
@@ -0,0 +1,172 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0664
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0664
+Problem: Configure "fail-if-missing" does not apply to the enable-gui
+ argument. (Rhialto)
+Solution: Make configure fail if a GUI was specifified and "fail-if-missing"
+ is enabled and the GUI test fails.
+Files: src/configure.ac, src/auto/configure
+
+
+*** ../vim-8.1.0663/src/configure.ac 2018-12-21 11:48:48.320680492 +0100
+--- src/configure.ac 2018-12-30 22:50:41.033968462 +0100
+***************
+*** 2366,2373 ****
+ case "$enable_gui_canon" in
+ no) AC_MSG_RESULT(no GUI support)
+ SKIP_PHOTON=YES ;;
+! yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;;
+! auto) AC_MSG_RESULT(auto - automatic GUI support) ;;
+ photon) AC_MSG_RESULT(Photon GUI support) ;;
+ *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported])
+ SKIP_PHOTON=YES ;;
+--- 2366,2373 ----
+ case "$enable_gui_canon" in
+ no) AC_MSG_RESULT(no GUI support)
+ SKIP_PHOTON=YES ;;
+! yes|""|auto) AC_MSG_RESULT(automatic GUI support)
+! gui_auto=yes ;;
+ photon) AC_MSG_RESULT(Photon GUI support) ;;
+ *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported])
+ SKIP_PHOTON=YES ;;
+***************
+*** 2378,2384 ****
+ case "$enable_gui_canon" in
+ no) AC_MSG_RESULT(no GUI support)
+ SKIP_CARBON=YES ;;
+! yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;;
+ auto) AC_MSG_RESULT(auto - Carbon GUI is outdated - disable GUI support)
+ SKIP_CARBON=YES ;;
+ carbon) AC_MSG_RESULT(Carbon GUI support) ;;
+--- 2378,2385 ----
+ case "$enable_gui_canon" in
+ no) AC_MSG_RESULT(no GUI support)
+ SKIP_CARBON=YES ;;
+! yes|"") AC_MSG_RESULT(yes - automatic GUI support)
+! gui_auto=yes ;;
+ auto) AC_MSG_RESULT(auto - Carbon GUI is outdated - disable GUI support)
+ SKIP_CARBON=YES ;;
+ carbon) AC_MSG_RESULT(Carbon GUI support) ;;
+***************
+*** 2391,2396 ****
+--- 2392,2398 ----
+ case "$enable_gui_canon" in
+ no|none) AC_MSG_RESULT(no GUI support) ;;
+ yes|""|auto) AC_MSG_RESULT(yes/auto - automatic GUI support)
++ gui_auto=yes
+ SKIP_GTK2=
+ SKIP_GNOME=
+ SKIP_MOTIF=
+***************
+*** 2638,2643 ****
+--- 2640,2648 ----
+ GTK_CFLAGS=""
+ GTK_LIBS=""
+ ifelse([$3], , :, [$3])
++ if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
++ AC_MSG_ERROR([could not configure GTK])
++ fi
+ }
+ fi
+ }
+*** ../vim-8.1.0663/src/auto/configure 2018-12-21 11:48:48.320680492 +0100
+--- src/auto/configure 2018-12-30 22:51:45.169474227 +0100
+***************
+*** 9115,9124 ****
+ no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
+ $as_echo "no GUI support" >&6; }
+ SKIP_PHOTON=YES ;;
+! yes|"") { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
+! $as_echo "yes - automatic GUI support" >&6; } ;;
+! auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
+! $as_echo "auto - automatic GUI support" >&6; } ;;
+ photon) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
+ $as_echo "Photon GUI support" >&6; } ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
+--- 9115,9123 ----
+ no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
+ $as_echo "no GUI support" >&6; }
+ SKIP_PHOTON=YES ;;
+! yes|""|auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
+! $as_echo "automatic GUI support" >&6; }
+! gui_auto=yes ;;
+ photon) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
+ $as_echo "Photon GUI support" >&6; } ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
+***************
+*** 9133,9139 ****
+ $as_echo "no GUI support" >&6; }
+ SKIP_CARBON=YES ;;
+ yes|"") { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
+! $as_echo "yes - automatic GUI support" >&6; } ;;
+ auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - Carbon GUI is outdated - disable GUI support" >&5
+ $as_echo "auto - Carbon GUI is outdated - disable GUI support" >&6; }
+ SKIP_CARBON=YES ;;
+--- 9132,9139 ----
+ $as_echo "no GUI support" >&6; }
+ SKIP_CARBON=YES ;;
+ yes|"") { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
+! $as_echo "yes - automatic GUI support" >&6; }
+! gui_auto=yes ;;
+ auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - Carbon GUI is outdated - disable GUI support" >&5
+ $as_echo "auto - Carbon GUI is outdated - disable GUI support" >&6; }
+ SKIP_CARBON=YES ;;
+***************
+*** 9151,9156 ****
+--- 9151,9157 ----
+ $as_echo "no GUI support" >&6; } ;;
+ yes|""|auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
+ $as_echo "yes/auto - automatic GUI support" >&6; }
++ gui_auto=yes
+ SKIP_GTK2=
+ SKIP_GNOME=
+ SKIP_MOTIF=
+***************
+*** 9582,9587 ****
+--- 9583,9591 ----
+ GTK_CFLAGS=""
+ GTK_LIBS=""
+ :
++ if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
++ as_fn_error $? "could not configure GTK" "$LINENO" 5
++ fi
+ }
+ fi
+ }
+***************
+*** 9933,9938 ****
+--- 9937,9945 ----
+ GTK_CFLAGS=""
+ GTK_LIBS=""
+ :
++ if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
++ as_fn_error $? "could not configure GTK" "$LINENO" 5
++ fi
+ }
+ fi
+ }
+*** ../vim-8.1.0663/src/version.c 2018-12-30 22:07:35.596868093 +0100
+--- src/version.c 2018-12-30 22:51:54.173404811 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 664,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+88. Every single time you press the 'Get mail' button...it does get new 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.0665 b/data/vim/patches/8.1.0665
new file mode 100644
index 000000000..ec258e96f
--- /dev/null
+++ b/data/vim/patches/8.1.0665
@@ -0,0 +1,234 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0665
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0665
+Problem: Text property display wrong when 'spell' is set. (Dominique Pelle)
+Solution: Remove unnecessary assignment to char_attr. Combine attributes if
+ needed. Add a screenshot test.
+Files: src/screen.c, src/testdir/test_textprop.vim,
+ src/testdir/dumps/Test_textprop_01.dump
+
+
+*** ../vim-8.1.0664/src/screen.c 2018-12-30 22:07:35.596868093 +0100
+--- src/screen.c 2018-12-31 13:38:32.001788595 +0100
+***************
+*** 3051,3056 ****
+--- 3051,3088 ----
+ }
+ #endif /* FEAT_FOLDING */
+
++ #ifdef FEAT_TEXT_PROP
++ static textprop_T *current_text_props = NULL;
++ static buf_T *current_buf = NULL;
++
++ static int
++ #ifdef __BORLANDC__
++ _RTLENTRYF
++ #endif
++ text_prop_compare(const void *s1, const void *s2)
++ {
++ int idx1, idx2;
++ proptype_T *pt1, *pt2;
++ colnr_T col1, col2;
++
++ idx1 = *(int *)s1;
++ idx2 = *(int *)s2;
++ pt1 = text_prop_type_by_id(current_buf, current_text_props[idx1].tp_type);
++ pt2 = text_prop_type_by_id(current_buf, current_text_props[idx2].tp_type);
++ if (pt1 == pt2)
++ return 0;
++ if (pt1 == NULL)
++ return -1;
++ if (pt2 == NULL)
++ return 1;
++ if (pt1->pt_priority != pt2->pt_priority)
++ return pt1->pt_priority > pt2->pt_priority ? 1 : -1;
++ col1 = current_text_props[idx1].tp_col;
++ col2 = current_text_props[idx2].tp_col;
++ return col1 == col2 ? 0 : col1 > col2 ? 1 : -1;
++ }
++ #endif
++
+ /*
+ * Display line "lnum" of window 'wp' on the screen.
+ * Start at row "startrow", stop when "endrow" is reached.
+***************
+*** 4322,4355 ****
+ && vcol >= 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
+--- 4354,4385 ----
+ && vcol >= text_props[text_prop_next].tp_col - 1)
+ text_prop_idxs[text_props_active++] = text_prop_next++;
+
+! text_prop_attr = 0;
+ if (text_props_active > 0)
+ {
+! // Sort the properties on priority and/or starting last.
+! // Then combine the attributes, highest priority last.
+! current_text_props = text_props;
+! current_buf = wp->w_buffer;
+! qsort((void *)text_prop_idxs, (size_t)text_props_active,
+! sizeof(int), text_prop_compare);
+
+ for (pi = 0; pi < text_props_active; ++pi)
+ {
+! int tpi = text_prop_idxs[pi];
+! proptype_T *pt = text_prop_type_by_id(wp->w_buffer, text_props[tpi].tp_type);
+
+! if (pt != NULL)
+ {
++ int pt_attr = syn_id2attr(pt->pt_hl_id);
++
+ text_prop_type = pt;
+! if (text_prop_attr == 0)
+! text_prop_attr = pt_attr;
+! else
+! text_prop_attr = hl_combine_attr(text_prop_attr, pt_attr);
+ }
+ }
+ }
+ }
+ #endif
+***************
+*** 4775,4784 ****
+ if (has_spell && v >= word_end && v > cur_checked_col)
+ {
+ spell_attr = 0;
+- # ifdef FEAT_SYN_HL
+- if (!attr_pri)
+- char_attr = syntax_attr;
+- # endif
+ if (c != 0 && (
+ # ifdef FEAT_SYN_HL
+ !has_syntax ||
+--- 4805,4810 ----
+*** ../vim-8.1.0664/src/testdir/test_textprop.vim 2018-12-28 23:22:36.270750732 +0100
+--- src/testdir/test_textprop.vim 2018-12-31 12:41:37.979473855 +0100
+***************
+*** 5,10 ****
+--- 5,12 ----
+ finish
+ endif
+
++ source screendump.vim
++
+ func Test_proptype_global()
+ call prop_type_add('comment', {'highlight': 'Directory', 'priority': 123, 'start_incl': 1, 'end_incl': 1})
+ let proptypes = prop_type_list()
+***************
+*** 283,287 ****
+ call prop_type_delete('comment')
+ endfunc
+
+!
+! " TODO: screenshot test with highlighting
+--- 285,311 ----
+ call prop_type_delete('comment')
+ endfunc
+
+! " screenshot test with textprop highlighting
+! funct Test_textprop_screenshots()
+! if !CanRunVimInTerminal()
+! return
+! endif
+! call writefile([
+! \ "call setline(1, ['One two', 'Number 123 and then 4567.', 'Three'])",
+! \ "hi NumberProp ctermfg=blue",
+! \ "hi LongProp ctermbg=yellow",
+! \ "call prop_type_add('number', {'highlight': 'NumberProp'})",
+! \ "call prop_type_add('long', {'highlight': 'LongProp'})",
+! \ "call prop_add(1, 4, {'end_lnum': 3, 'end_col': 3, 'type': 'long'})",
+! \ "call prop_add(2, 8, {'length': 3, 'type': 'number'})",
+! \ "call prop_add(2, 21, {'length': 4, 'type': 'number'})",
+! \ "set number",
+! \ "set spell",
+! \], 'XtestProp')
+! let buf = RunVimInTerminal('-S XtestProp', {})
+! call VerifyScreenDump(buf, 'Test_textprop_01', {})
+!
+! " clean up
+! call StopVimInTerminal(buf)
+! call delete('Xtest_folds_with_rnu')
+! endfunc
+*** ../vim-8.1.0664/src/testdir/dumps/Test_textprop_01.dump 2018-12-31 13:54:54.313537883 +0100
+--- src/testdir/dumps/Test_textprop_01.dump 2018-12-31 12:43:50.366431472 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#af5f00255#ffffff0@1|1| >O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
++ | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|e|r| |1+0#4040ff13#ffffff0|2|3| +0#0000000#ffff4012|a|n|d| |t|h|e|n| |4+0#4040ff13#ffffff0|5|6|7|.+0#0000000#ffff4012| +0&#ffffff0@45
++ | +0#af5f00255&@1|3| |T+0#0000000#ffff4012|h|r|e+0&#ffffff0@1| @65
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ | +0#0000000&@56|1|,|1| @10|A|l@1|
+*** ../vim-8.1.0664/src/version.c 2018-12-30 22:55:43.671136682 +0100
+--- src/version.c 2018-12-31 12:16:31.671760142 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 665,
+ /**/
+
+--
+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.0666 b/data/vim/patches/8.1.0666
new file mode 100644
index 000000000..49b8ab580
--- /dev/null
+++ b/data/vim/patches/8.1.0666
@@ -0,0 +1,48 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0666
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0666 (after 8.1.0665)
+Problem: Text property test fails.
+Solution: Update screenshot.
+Files: src/testdir/dumps/Test_textprop_01.dump
+
+
+*** ../vim-8.1.0665/src/testdir/dumps/Test_textprop_01.dump 2018-12-31 13:55:31.257223600 +0100
+--- src/testdir/dumps/Test_textprop_01.dump 2018-12-31 14:30:11.256302639 +0100
+***************
+*** 1,5 ****
+ | +0#af5f00255#ffffff0@1|1| >O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
+! | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|e|r| |1+0#4040ff13#ffffff0|2|3| +0#0000000#ffff4012|a|n|d| |t|h|e|n| |4+0#4040ff13#ffffff0|5|6|7|.+0#0000000#ffff4012| +0&#ffffff0@45
+ | +0#af5f00255&@1|3| |T+0#0000000#ffff4012|h|r|e+0&#ffffff0@1| @65
+ |~+0#4040ff13&| @73
+ |~| @73
+--- 1,5 ----
+ | +0#af5f00255#ffffff0@1|1| >O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
+! | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|e|r| |1+0#4040ff13&|2|3| +0#0000000&|a|n|d| |t|h|e|n| |4+0#4040ff13&|5|6|7|.+0#0000000&| +0&#ffffff0@45
+ | +0#af5f00255&@1|3| |T+0#0000000#ffff4012|h|r|e+0&#ffffff0@1| @65
+ |~+0#4040ff13&| @73
+ |~| @73
+*** ../vim-8.1.0665/src/version.c 2018-12-31 13:55:31.257223600 +0100
+--- src/version.c 2018-12-31 14:32:20.311255276 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 666,
+ /**/
+
+--
+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.0667 b/data/vim/patches/8.1.0667
new file mode 100644
index 000000000..ef65bf2b1
--- /dev/null
+++ b/data/vim/patches/8.1.0667
@@ -0,0 +1,48 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0667
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0667 (after 8.1.0665)
+Problem: Textprop test leaves file behind.
+Solution: Delete the file. (Dominique Pelle, closes #3743)
+Files: src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.0666/src/testdir/test_textprop.vim 2018-12-31 13:55:31.257223600 +0100
+--- src/testdir/test_textprop.vim 2018-12-31 20:02:44.004966460 +0100
+***************
+*** 307,311 ****
+
+ " clean up
+ call StopVimInTerminal(buf)
+! call delete('Xtest_folds_with_rnu')
+ endfunc
+--- 307,311 ----
+
+ " clean up
+ call StopVimInTerminal(buf)
+! call delete('XtestProp')
+ endfunc
+*** ../vim-8.1.0666/src/version.c 2018-12-31 14:34:00.466438581 +0100
+--- src/version.c 2018-12-31 20:04:30.587966818 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 667,
+ /**/
+
+--
+From "know your smileys":
+ :-O>-o Smiley American tourist (note big mouth and camera)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0668 b/data/vim/patches/8.1.0668
new file mode 100644
index 000000000..a9a5cd848
--- /dev/null
+++ b/data/vim/patches/8.1.0668
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0668
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0668
+Problem: No test for overstrike mode in the command line.
+Solution: Add a test. (Dominique Pelle, closes #3742)
+Files: src/testdir/test_cmdline.vim
+
+
+*** ../vim-8.1.0667/src/testdir/test_cmdline.vim 2018-07-28 19:20:09.787586245 +0200
+--- src/testdir/test_cmdline.vim 2018-12-31 21:02:00.554947899 +0100
+***************
+*** 581,584 ****
+--- 581,613 ----
+ call assert_equal(1, setcmdpos(3))
+ endfunc
+
++ func Test_cmdline_overstrike()
++ let encodings = has('multi_byte') ? [ 'latin1', 'utf8' ] : [ 'latin1' ]
++ let encoding_save = &encoding
++
++ for e in encodings
++ exe 'set encoding=' . e
++
++ " Test overstrike in the middle of the command line.
++ call feedkeys(":\"01234\<home>\<right>\<right>ab\<right>\<insert>cd\<enter>", 'xt')
++ call assert_equal('"0ab1cd4', @:)
++
++ " Test overstrike going beyond end of command line.
++ call feedkeys(":\"01234\<home>\<right>\<right>ab\<right>\<insert>cdefgh\<enter>", 'xt')
++ call assert_equal('"0ab1cdefgh', @:)
++
++ " Test toggling insert/overstrike a few times.
++ call feedkeys(":\"01234\<home>\<right>ab\<right>\<insert>cd\<right>\<insert>ef\<enter>", 'xt')
++ call assert_equal('"ab0cd3ef4', @:)
++ endfor
++
++ if has('multi_byte')
++ " Test overstrike with multi-byte characters.
++ call feedkeys(":\"テキストエディタ\<home>\<right>\<right>ab\<right>\<insert>cd\<enter>", 'xt')
++ call assert_equal('"テabキcdエディタ', @:)
++ endif
++
++ let &encoding = encoding_save
++ endfunc
++
+ set cpo&
+*** ../vim-8.1.0667/src/version.c 2018-12-31 20:05:50.783224479 +0100
+--- src/version.c 2018-12-31 21:00:26.507734786 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 668,
+ /**/
+
+--
+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.0669 b/data/vim/patches/8.1.0669
new file mode 100644
index 000000000..47113fd46
--- /dev/null
+++ b/data/vim/patches/8.1.0669
@@ -0,0 +1,851 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0669
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0669
+Problem: The ex_sign() function is too long.
+Solution: Refactor the function. Add a bit more testing. (Yegappan
+ Lakshmanan, closes #3745)
+Files: src/testdir/test_signs.vim, src/ex_cmds.c
+
+
+*** ../vim-8.1.0668/src/testdir/test_signs.vim 2018-12-29 21:00:20.953498877 +0100
+--- src/testdir/test_signs.vim 2018-12-31 21:51:47.815155503 +0100
+***************
+*** 104,109 ****
+--- 104,119 ----
+ exe 'sign jump 43 file=' . fn
+ call assert_equal('B', getline('.'))
+
++ " Check for jumping to a sign in a hidden buffer
++ enew! | only!
++ edit foo
++ call setline(1, ['A', 'B', 'C', 'D'])
++ let fn = expand('%:p')
++ exe 'sign place 21 line=3 name=Sign3 file=' . fn
++ hide edit bar
++ exe 'sign jump 21 file=' . fn
++ call assert_equal('C', getline('.'))
++
+ " can't define a sign with a non-printable character as text
+ call assert_fails("sign define Sign4 text=\e linehl=Comment", 'E239:')
+ call assert_fails("sign define Sign4 text=a\e linehl=Comment", 'E239:')
+***************
+*** 131,136 ****
+--- 141,158 ----
+ sign define Sign4 text=\\ linehl=Comment
+ sign undefine Sign4
+
++ " define a sign with a leading 0 in the name
++ sign unplace *
++ sign define 004 text=#> linehl=Comment
++ let a = execute('sign list 4')
++ call assert_equal("\nsign 4 text=#> linehl=Comment", a)
++ exe 'sign place 20 line=3 name=004 buffer=' . bufnr('')
++ let a = execute('sign place')
++ call assert_equal("\n--- Signs ---\nSigns for foo:\n line=3 id=20 name=4 priority=10\n", a)
++ exe 'sign unplace 20 buffer=' . bufnr('')
++ sign undefine 004
++ call assert_fails('sign list 4', 'E155:')
++
+ " Error cases
+ call assert_fails("sign place abc line=3 name=Sign1 buffer=" .
+ \ bufnr('%'), 'E474:')
+***************
+*** 241,246 ****
+--- 263,276 ----
+ call assert_fails('sign undefine', 'E156:')
+ call assert_fails('sign list xxx', 'E155:')
+ call assert_fails('sign place 1 buffer=999', 'E158:')
++ call assert_fails('sign place 1 name=Sign1 buffer=999', 'E158:')
++ call assert_fails('sign place buffer=999', 'E158:')
++ call assert_fails('sign jump buffer=999', 'E158:')
++ call assert_fails('sign jump 1 file=', 'E158:')
++ call assert_fails('sign jump 1 group=', 'E474:')
++ call assert_fails('sign jump 1 name=', 'E474:')
++ call assert_fails('sign jump 1 name=Sign1', 'E474:')
++ call assert_fails('sign jump 1 line=100', '474:')
+ call assert_fails('sign define Sign2 text=', 'E239:')
+ " Non-numeric identifier for :sign place
+ call assert_fails("sign place abc line=3 name=Sign1 buffer=" . bufnr('%'), 'E474:')
+*** ../vim-8.1.0668/src/ex_cmds.c 2018-12-29 18:53:07.843607433 +0100
+--- src/ex_cmds.c 2018-12-31 21:57:40.300234709 +0100
+***************
+*** 7897,7902 ****
+--- 7897,7905 ----
+ int
+ sign_unplace(int sign_id, char_u *sign_group, buf_T *buf, linenr_T atlnum)
+ {
++ if (buf->b_signlist == NULL) // No signs in the buffer
++ return OK;
++
+ if (sign_id == 0)
+ {
+ // Delete all the signs in the specified buffer
+***************
+*** 7932,7937 ****
+--- 7935,8283 ----
+ }
+
+ /*
++ * sign define command
++ * ":sign define {name} ..."
++ */
++ static void
++ sign_define_cmd(char_u *sign_name, char_u *cmdline)
++ {
++ char_u *arg;
++ char_u *p = cmdline;
++ char_u *icon = NULL;
++ char_u *text = NULL;
++ char_u *linehl = NULL;
++ char_u *texthl = NULL;
++ int failed = FALSE;
++
++ // set values for a defined sign.
++ for (;;)
++ {
++ arg = skipwhite(p);
++ if (*arg == NUL)
++ break;
++ p = skiptowhite_esc(arg);
++ if (STRNCMP(arg, "icon=", 5) == 0)
++ {
++ arg += 5;
++ icon = vim_strnsave(arg, (int)(p - arg));
++ }
++ else if (STRNCMP(arg, "text=", 5) == 0)
++ {
++ arg += 5;
++ text = vim_strnsave(arg, (int)(p - arg));
++ }
++ else if (STRNCMP(arg, "linehl=", 7) == 0)
++ {
++ arg += 7;
++ linehl = vim_strnsave(arg, (int)(p - arg));
++ }
++ else if (STRNCMP(arg, "texthl=", 7) == 0)
++ {
++ arg += 7;
++ texthl = vim_strnsave(arg, (int)(p - arg));
++ }
++ else
++ {
++ EMSG2(_(e_invarg2), arg);
++ failed = TRUE;
++ break;
++ }
++ }
++
++ if (!failed)
++ sign_define_by_name(sign_name, icon, linehl, text, texthl);
++
++ vim_free(icon);
++ vim_free(text);
++ vim_free(linehl);
++ vim_free(texthl);
++ }
++
++ /*
++ * :sign place command
++ */
++ static void
++ sign_place_cmd(
++ buf_T *buf,
++ linenr_T lnum,
++ char_u *sign_name,
++ int id,
++ char_u *group,
++ int prio)
++ {
++ if (id <= 0)
++ {
++ // List signs placed in a file/buffer
++ // :sign place file={fname}
++ // :sign place group={group} file={fname}
++ // :sign place group=* file={fname}
++ // :sign place buffer={nr}
++ // :sign place group={group} buffer={nr}
++ // :sign place group=* buffer={nr}
++ // :sign place
++ // :sign place group={group}
++ // :sign place group=*
++ if (lnum >= 0 || sign_name != NULL ||
++ (group != NULL && *group == '\0'))
++ EMSG(_(e_invarg));
++ else
++ sign_list_placed(buf, group);
++ }
++ else
++ {
++ // Place a new sign
++ if (sign_name == NULL || buf == NULL ||
++ (group != NULL && *group == '\0'))
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ sign_place(&id, group, sign_name, buf, lnum, prio);
++ }
++ }
++
++ /*
++ * :sign unplace command
++ */
++ static void
++ sign_unplace_cmd(
++ buf_T *buf,
++ linenr_T lnum,
++ char_u *sign_name,
++ int id,
++ char_u *group)
++ {
++ if (lnum >= 0 || sign_name != NULL || (group != NULL && *group == '\0'))
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ if (id == -2)
++ {
++ if (buf != NULL)
++ // :sign unplace * file={fname}
++ // :sign unplace * group={group} file={fname}
++ // :sign unplace * group=* file={fname}
++ // :sign unplace * buffer={nr}
++ // :sign unplace * group={group} buffer={nr}
++ // :sign unplace * group=* buffer={nr}
++ sign_unplace(0, group, buf, 0);
++ else
++ // :sign unplace *
++ // :sign unplace * group={group}
++ // :sign unplace * group=*
++ FOR_ALL_BUFFERS(buf)
++ if (buf->b_signlist != NULL)
++ buf_delete_signs(buf, group);
++ }
++ else
++ {
++ if (buf != NULL)
++ // :sign unplace {id} file={fname}
++ // :sign unplace {id} group={group} file={fname}
++ // :sign unplace {id} group=* file={fname}
++ // :sign unplace {id} buffer={nr}
++ // :sign unplace {id} group={group} buffer={nr}
++ // :sign unplace {id} group=* buffer={nr}
++ sign_unplace(id, group, buf, 0);
++ else
++ {
++ if (id == -1)
++ {
++ // :sign unplace group={group}
++ // :sign unplace group=*
++ sign_unplace_at_cursor(group);
++ }
++ else
++ {
++ // :sign unplace {id}
++ // :sign unplace {id} group={group}
++ // :sign unplace {id} group=*
++ FOR_ALL_BUFFERS(buf)
++ sign_unplace(id, group, buf, 0);
++ }
++ }
++ }
++ }
++
++ /*
++ * Jump to a placed sign
++ * :sign jump {id} file={fname}
++ * :sign jump {id} buffer={nr}
++ * :sign jump {id} group={group} file={fname}
++ * :sign jump {id} group={group} buffer={nr}
++ */
++ static void
++ sign_jump_cmd(
++ buf_T *buf,
++ linenr_T lnum,
++ char_u *sign_name,
++ int id,
++ char_u *group)
++ {
++ if (buf == NULL && sign_name == NULL && group == NULL && id == -1)
++ {
++ EMSG(_(e_argreq));
++ return;
++ }
++
++ if (buf == NULL || (group != NULL && *group == '\0') ||
++ lnum >= 0 || sign_name != NULL)
++ {
++ // File or buffer is not specified or an empty group is used
++ // or a line number or a sign name is specified.
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ if ((lnum = buf_findsign(buf, id, group)) <= 0)
++ {
++ EMSGN(_("E157: Invalid sign ID: %ld"), id);
++ return;
++ }
++
++ // goto a sign ...
++ if (buf_jump_open_win(buf) != NULL)
++ { // ... in a current window
++ curwin->w_cursor.lnum = lnum;
++ check_cursor_lnum();
++ beginline(BL_WHITE);
++ }
++ else
++ { // ... not currently in a window
++ char_u *cmd;
++
++ if (buf->b_fname == NULL)
++ {
++ EMSG(_("E934: Cannot jump to a buffer that does not have a name"));
++ return;
++ }
++ cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
++ if (cmd == NULL)
++ return;
++ sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname);
++ do_cmdline_cmd(cmd);
++ vim_free(cmd);
++ }
++ # ifdef FEAT_FOLDING
++ foldOpenCursor();
++ # endif
++ }
++
++ /*
++ * Parse the command line arguments for the ":sign place", ":sign unplace" and
++ * ":sign jump" commands.
++ * The supported arguments are: line={lnum} name={name} group={group}
++ * priority={prio} and file={fname} or buffer={nr}.
++ */
++ static int
++ parse_sign_cmd_args(
++ int cmd,
++ char_u *arg,
++ char_u **sign_name,
++ int *signid,
++ char_u **group,
++ int *prio,
++ buf_T **buf,
++ linenr_T *lnum)
++ {
++ char_u *arg1;
++ char_u *name;
++ char_u *filename = NULL;
++
++ // first arg could be placed sign id
++ arg1 = arg;
++ if (VIM_ISDIGIT(*arg))
++ {
++ *signid = getdigits(&arg);
++ if (!VIM_ISWHITE(*arg) && *arg != NUL)
++ {
++ *signid = -1;
++ arg = arg1;
++ }
++ else
++ arg = skipwhite(arg);
++ }
++
++ while (*arg != NUL)
++ {
++ if (STRNCMP(arg, "line=", 5) == 0)
++ {
++ arg += 5;
++ *lnum = atoi((char *)arg);
++ arg = skiptowhite(arg);
++ }
++ else if (STRNCMP(arg, "*", 1) == 0 && cmd == SIGNCMD_UNPLACE)
++ {
++ if (*signid != -1)
++ {
++ EMSG(_(e_invarg));
++ return FAIL;
++ }
++ *signid = -2;
++ arg = skiptowhite(arg + 1);
++ }
++ else if (STRNCMP(arg, "name=", 5) == 0)
++ {
++ arg += 5;
++ name = arg;
++ arg = skiptowhite(arg);
++ if (*arg != NUL)
++ *arg++ = NUL;
++ while (name[0] == '0' && name[1] != NUL)
++ ++name;
++ *sign_name = name;
++ }
++ else if (STRNCMP(arg, "group=", 6) == 0)
++ {
++ arg += 6;
++ *group = arg;
++ arg = skiptowhite(arg);
++ if (*arg != NUL)
++ *arg++ = NUL;
++ }
++ else if (STRNCMP(arg, "priority=", 9) == 0)
++ {
++ arg += 9;
++ *prio = atoi((char *)arg);
++ arg = skiptowhite(arg);
++ }
++ else if (STRNCMP(arg, "file=", 5) == 0)
++ {
++ arg += 5;
++ filename = arg;
++ *buf = buflist_findname_exp(arg);
++ break;
++ }
++ else if (STRNCMP(arg, "buffer=", 7) == 0)
++ {
++ arg += 7;
++ filename = arg;
++ *buf = buflist_findnr((int)getdigits(&arg));
++ if (*skipwhite(arg) != NUL)
++ EMSG(_(e_trailing));
++ break;
++ }
++ else
++ {
++ EMSG(_(e_invarg));
++ return FAIL;
++ }
++ arg = skipwhite(arg);
++ }
++
++ if (filename != NULL && *buf == NULL)
++ {
++ EMSG2(_("E158: Invalid buffer name: %s"), filename);
++ return FAIL;
++ }
++
++ return OK;
++ }
++
++ /*
+ * ":sign" command
+ */
+ void
+***************
+*** 7943,7949 ****
+ sign_T *sp;
+ buf_T *buf = NULL;
+
+! /* Parse the subcommand. */
+ p = skiptowhite(arg);
+ idx = sign_cmd_idx(arg, p);
+ if (idx == SIGNCMD_LAST)
+--- 8289,8295 ----
+ sign_T *sp;
+ buf_T *buf = NULL;
+
+! // Parse the subcommand.
+ p = skiptowhite(arg);
+ idx = sign_cmd_idx(arg, p);
+ if (idx == SIGNCMD_LAST)
+***************
+*** 7955,7966 ****
+
+ if (idx <= SIGNCMD_LIST)
+ {
+! /*
+! * Define, undefine or list signs.
+! */
+ if (idx == SIGNCMD_LIST && *arg == NUL)
+ {
+! /* ":sign list": list all defined signs */
+ for (sp = first_sign; sp != NULL && !got_int; sp = sp->sn_next)
+ sign_list_defined(sp);
+ }
+--- 8301,8310 ----
+
+ if (idx <= SIGNCMD_LIST)
+ {
+! // Define, undefine or list signs.
+ if (idx == SIGNCMD_LIST && *arg == NUL)
+ {
+! // ":sign list": list all defined signs
+ for (sp = first_sign; sp != NULL && !got_int; sp = sp->sn_next)
+ sign_list_defined(sp);
+ }
+***************
+*** 7969,7981 ****
+ else
+ {
+ char_u *name;
+- char_u *icon = NULL;
+- char_u *text = NULL;
+- char_u *linehl = NULL;
+- char_u *texthl = NULL;
+
+! /* Isolate the sign name. If it's a number skip leading zeroes,
+! * so that "099" and "99" are the same sign. But keep "0". */
+ p = skiptowhite(arg);
+ if (*p != NUL)
+ *p++ = NUL;
+--- 8313,8321 ----
+ else
+ {
+ char_u *name;
+
+! // Isolate the sign name. If it's a number skip leading zeroes,
+! // so that "099" and "99" are the same sign. But keep "0".
+ p = skiptowhite(arg);
+ if (*p != NUL)
+ *p++ = NUL;
+***************
+*** 7984,8042 ****
+ name = vim_strsave(arg);
+
+ if (idx == SIGNCMD_DEFINE)
+! {
+! int failed = FALSE;
+!
+! /* ":sign define {name} ...": define a sign */
+!
+! /* set values for a defined sign. */
+! for (;;)
+! {
+! arg = skipwhite(p);
+! if (*arg == NUL)
+! break;
+! p = skiptowhite_esc(arg);
+! if (STRNCMP(arg, "icon=", 5) == 0)
+! {
+! arg += 5;
+! icon = vim_strnsave(arg, (int)(p - arg));
+! }
+! else if (STRNCMP(arg, "text=", 5) == 0)
+! {
+! arg += 5;
+! text = vim_strnsave(arg, (int)(p - arg));
+! }
+! else if (STRNCMP(arg, "linehl=", 7) == 0)
+! {
+! arg += 7;
+! linehl = vim_strnsave(arg, (int)(p - arg));
+! }
+! else if (STRNCMP(arg, "texthl=", 7) == 0)
+! {
+! arg += 7;
+! texthl = vim_strnsave(arg, (int)(p - arg));
+! }
+! else
+! {
+! EMSG2(_(e_invarg2), arg);
+! failed = TRUE;
+! break;
+! }
+! }
+!
+! if (!failed)
+! sign_define_by_name(name, icon, linehl, text, texthl);
+!
+! vim_free(icon);
+! vim_free(text);
+! vim_free(linehl);
+! vim_free(texthl);
+! }
+ else if (idx == SIGNCMD_LIST)
+! /* ":sign list {name}" */
+ sign_list_by_name(name);
+ else
+! /* ":sign undefine {name}" */
+ sign_undefine_by_name(name);
+
+ vim_free(name);
+--- 8324,8335 ----
+ name = vim_strsave(arg);
+
+ if (idx == SIGNCMD_DEFINE)
+! sign_define_cmd(name, p);
+ else if (idx == SIGNCMD_LIST)
+! // ":sign list {name}"
+ sign_list_by_name(name);
+ else
+! // ":sign undefine {name}"
+ sign_undefine_by_name(name);
+
+ vim_free(name);
+***************
+*** 8050,8279 ****
+ char_u *sign_name = NULL;
+ char_u *group = NULL;
+ int prio = SIGN_DEF_PRIO;
+- char_u *arg1;
+- int bufarg = FALSE;
+
+! if (*arg == NUL)
+! {
+! if (idx == SIGNCMD_PLACE)
+! {
+! /* ":sign place": list placed signs in all buffers */
+! sign_list_placed(NULL, NULL);
+! }
+! else if (idx == SIGNCMD_UNPLACE)
+! /* ":sign unplace": remove placed sign at cursor */
+! sign_unplace_at_cursor(NULL);
+! else
+! EMSG(_(e_argreq));
+ return;
+- }
+
+! if (idx == SIGNCMD_UNPLACE && arg[0] == '*' && arg[1] == NUL)
+! {
+! /* ":sign unplace *": remove all placed signs */
+! buf_delete_all_signs(NULL);
+! return;
+! }
+!
+! /* first arg could be placed sign id */
+! arg1 = arg;
+! if (VIM_ISDIGIT(*arg))
+! {
+! id = getdigits(&arg);
+! if (!VIM_ISWHITE(*arg) && *arg != NUL)
+! {
+! id = -1;
+! arg = arg1;
+! }
+! else
+! {
+! arg = skipwhite(arg);
+! if (idx == SIGNCMD_UNPLACE && *arg == NUL)
+! {
+! /* ":sign unplace {id}": remove placed sign by number */
+! FOR_ALL_BUFFERS(buf)
+! sign_unplace(id, NULL, buf, 0);
+! return;
+! }
+! }
+! }
+!
+! /*
+! * Check for line={lnum} name={name} group={group} priority={prio}
+! * and file={fname} or buffer={nr}. Leave "arg" pointing to {fname}.
+! */
+! while (*arg != NUL)
+! {
+! if (STRNCMP(arg, "line=", 5) == 0)
+! {
+! arg += 5;
+! lnum = atoi((char *)arg);
+! arg = skiptowhite(arg);
+! }
+! else if (STRNCMP(arg, "*", 1) == 0 && idx == SIGNCMD_UNPLACE)
+! {
+! if (id != -1)
+! {
+! EMSG(_(e_invarg));
+! return;
+! }
+! id = -2;
+! arg = skiptowhite(arg + 1);
+! }
+! else if (STRNCMP(arg, "name=", 5) == 0)
+! {
+! arg += 5;
+! sign_name = arg;
+! arg = skiptowhite(arg);
+! if (*arg != NUL)
+! *arg++ = NUL;
+! while (sign_name[0] == '0' && sign_name[1] != NUL)
+! ++sign_name;
+! }
+! else if (STRNCMP(arg, "group=", 6) == 0)
+! {
+! arg += 6;
+! group = arg;
+! arg = skiptowhite(arg);
+! if (*arg != NUL)
+! *arg++ = NUL;
+! }
+! else if (STRNCMP(arg, "priority=", 9) == 0)
+! {
+! arg += 9;
+! prio = atoi((char *)arg);
+! arg = skiptowhite(arg);
+! }
+! else if (STRNCMP(arg, "file=", 5) == 0)
+! {
+! arg += 5;
+! buf = buflist_findname_exp(arg);
+! bufarg = TRUE;
+! break;
+! }
+! else if (STRNCMP(arg, "buffer=", 7) == 0)
+! {
+! arg += 7;
+! buf = buflist_findnr((int)getdigits(&arg));
+! if (*skipwhite(arg) != NUL)
+! EMSG(_(e_trailing));
+! bufarg = TRUE;
+! break;
+! }
+! else
+! {
+! EMSG(_(e_invarg));
+! return;
+! }
+! arg = skipwhite(arg);
+! }
+!
+! if ((!bufarg && group == NULL) || (group != NULL && *group == '\0'))
+! {
+! // File or buffer is not specified or an empty group is used
+! EMSG(_(e_invarg));
+! return;
+! }
+!
+! if (bufarg && buf == NULL)
+! {
+! EMSG2(_("E158: Invalid buffer name: %s"), arg);
+! }
+! else if (id <= 0 && idx == SIGNCMD_PLACE)
+! {
+! if ((group == NULL) && (lnum >= 0 || sign_name != NULL))
+! EMSG(_(e_invarg));
+! else
+! // ":sign place file={fname}": list placed signs in one file
+! // ":sign place group={group} file={fname}"
+! // ":sign place group=* file={fname}"
+! sign_list_placed(buf, group);
+! }
+! else if (idx == SIGNCMD_JUMP)
+! {
+! // ":sign jump {id} file={fname}"
+! // ":sign jump {id} group={group} file={fname}"
+! if (lnum >= 0 || sign_name != NULL || buf == NULL)
+! EMSG(_(e_invarg));
+! else if ((lnum = buf_findsign(buf, id, group)) > 0)
+! { /* goto a sign ... */
+! if (buf_jump_open_win(buf) != NULL)
+! { /* ... in a current window */
+! curwin->w_cursor.lnum = lnum;
+! check_cursor_lnum();
+! beginline(BL_WHITE);
+! }
+! else
+! { /* ... not currently in a window */
+! char_u *cmd;
+!
+! if (buf->b_fname == NULL)
+! {
+! EMSG(_("E934: Cannot jump to a buffer that does not have a name"));
+! return;
+! }
+! cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
+! if (cmd == NULL)
+! return;
+! sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname);
+! do_cmdline_cmd(cmd);
+! vim_free(cmd);
+! }
+! # ifdef FEAT_FOLDING
+! foldOpenCursor();
+! # endif
+! }
+! else
+! EMSGN(_("E157: Invalid sign ID: %ld"), id);
+! }
+ else if (idx == SIGNCMD_UNPLACE)
+! {
+! if (lnum >= 0 || sign_name != NULL)
+! EMSG(_(e_invarg));
+! else if (id == -2)
+! {
+! if (buf != NULL)
+! // ":sign unplace * file={fname}"
+! sign_unplace(0, group, buf, 0);
+! else
+! // ":sign unplace * group=*": remove all placed signs
+! FOR_ALL_BUFFERS(buf)
+! if (buf->b_signlist != NULL)
+! buf_delete_signs(buf, group);
+! }
+! else
+! {
+! if (buf != NULL)
+! // ":sign unplace {id} file={fname}"
+! // ":sign unplace {id} group={group} file={fname}"
+! // ":sign unplace {id} group=* file={fname}"
+! sign_unplace(id, group, buf, 0);
+! else
+! {
+! if (id == -1)
+! {
+! // ":sign unplace group={group}":
+! // ":sign unplace group=*":
+! // remove sign in the current line in specified group
+! sign_unplace_at_cursor(group);
+! }
+! else
+! {
+! // ":sign unplace {id} group={group}":
+! // ":sign unplace {id} group=*":
+! // remove all placed signs in this group.
+! FOR_ALL_BUFFERS(buf)
+! if (buf->b_signlist != NULL)
+! sign_unplace(id, group, buf, 0);
+! }
+! }
+! }
+! }
+! /* idx == SIGNCMD_PLACE */
+! else if (sign_name != NULL && buf != NULL)
+! sign_place(&id, group, sign_name, buf, lnum, prio);
+! else
+! EMSG(_(e_invarg));
+ }
+ }
+
+--- 8343,8360 ----
+ char_u *sign_name = NULL;
+ char_u *group = NULL;
+ int prio = SIGN_DEF_PRIO;
+
+! // Parse command line arguments
+! if (parse_sign_cmd_args(idx, arg, &sign_name, &id, &group, &prio,
+! &buf, &lnum) == FAIL)
+ return;
+
+! if (idx == SIGNCMD_PLACE)
+! sign_place_cmd(buf, lnum, sign_name, id, group, prio);
+ else if (idx == SIGNCMD_UNPLACE)
+! sign_unplace_cmd(buf, lnum, sign_name, id, group);
+! else if (idx == SIGNCMD_JUMP)
+! sign_jump_cmd(buf, lnum, sign_name, id, group);
+ }
+ }
+
+*** ../vim-8.1.0668/src/version.c 2018-12-31 21:02:58.334464236 +0100
+--- src/version.c 2018-12-31 21:54:07.105999672 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 669,
+ /**/
+
+--
+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.0670 b/data/vim/patches/8.1.0670
new file mode 100644
index 000000000..fd1492378
--- /dev/null
+++ b/data/vim/patches/8.1.0670
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0670
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0670
+Problem: Macro for popup menu width is unused.
+Solution: Remove it. (Hirohito Higashi)
+Files: src/popupmnu.c
+
+
+*** ../vim-8.1.0669/src/popupmnu.c 2018-12-21 16:04:16.324437435 +0100
+--- src/popupmnu.c 2018-12-31 22:08:03.667089888 +0100
+***************
+*** 41,47 ****
+ static int pum_set_selected(int n, int repeat);
+
+ #define PUM_DEF_HEIGHT 10
+- #define PUM_DEF_WIDTH 15
+
+ static void
+ pum_compute_size(void)
+--- 41,46 ----
+*** ../vim-8.1.0669/src/version.c 2018-12-31 22:02:24.081890522 +0100
+--- src/version.c 2018-12-31 22:08:59.354630921 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 670,
+ /**/
+
+--
+Warning label on a superhero Halloween costume:
+"Caution: Cape does not enable user to fly."
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0671 b/data/vim/patches/8.1.0671
new file mode 100644
index 000000000..6ce7786ec
--- /dev/null
+++ b/data/vim/patches/8.1.0671
@@ -0,0 +1,209 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.06
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0671
+Problem: Cursor in the wrong column after auto-formatting.
+Solution: Check for deleting more spaces than adding. (closes #3748)
+Files: src/ops.c, src/testdir/test_textformat.vim, src/mark.c,
+ src/proto/mark.pro, src/misc1.c
+
+
+*** ../vim-8.1.0670/src/ops.c 2018-11-22 03:07:30.948596188 +0100
+--- src/ops.c 2018-12-31 23:28:36.009220367 +0100
+***************
+*** 4707,4712 ****
+--- 4707,4714 ----
+ */
+ for (t = count - 1; ; --t)
+ {
++ int spaces_removed;
++
+ cend -= currsize;
+ mch_memmove(cend, curr, (size_t)currsize);
+ if (spaces[t] > 0)
+***************
+*** 4714,4721 ****
+ cend -= spaces[t];
+ vim_memset(cend, ' ', (size_t)(spaces[t]));
+ }
+ mark_col_adjust(curwin->w_cursor.lnum + t, (colnr_T)0, (linenr_T)-t,
+! (long)(cend - newp + spaces[t] - (curr - curr_start)));
+ if (t == 0)
+ break;
+ curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1));
+--- 4716,4728 ----
+ cend -= spaces[t];
+ vim_memset(cend, ' ', (size_t)(spaces[t]));
+ }
++
++ // If deleting more spaces than adding, the cursor moves no more than
++ // what is added if it is inside these spaces.
++ spaces_removed = (curr - curr_start) - spaces[t];
++
+ mark_col_adjust(curwin->w_cursor.lnum + t, (colnr_T)0, (linenr_T)-t,
+! (long)(cend - newp - spaces_removed), spaces_removed);
+ if (t == 0)
+ break;
+ curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1));
+***************
+*** 5225,5231 ****
+ {
+ (void)del_bytes((long)next_leader_len, FALSE, FALSE);
+ mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L,
+! (long)-next_leader_len);
+ } else
+ #endif
+ if (second_indent > 0) /* the "leader" for FO_Q_SECOND */
+--- 5232,5238 ----
+ {
+ (void)del_bytes((long)next_leader_len, FALSE, FALSE);
+ mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L,
+! (long)-next_leader_len, 0);
+ } else
+ #endif
+ if (second_indent > 0) /* the "leader" for FO_Q_SECOND */
+***************
+*** 5236,5242 ****
+ {
+ (void)del_bytes(indent, FALSE, FALSE);
+ mark_col_adjust(curwin->w_cursor.lnum,
+! (colnr_T)0, 0L, (long)-indent);
+ }
+ }
+ curwin->w_cursor.lnum--;
+--- 5243,5249 ----
+ {
+ (void)del_bytes(indent, FALSE, FALSE);
+ mark_col_adjust(curwin->w_cursor.lnum,
+! (colnr_T)0, 0L, (long)-indent, 0);
+ }
+ }
+ curwin->w_cursor.lnum--;
+*** ../vim-8.1.0670/src/testdir/test_textformat.vim 2018-01-31 19:23:08.000000000 +0100
+--- src/testdir/test_textformat.vim 2018-12-31 23:53:25.517721631 +0100
+***************
+*** 450,454 ****
+--- 450,465 ----
+ \ ], getline(1, '$'))
+
+ unmap gg
++ set tw&
+ enew!
+ endfunc
++
++ func Test_format_list_auto()
++ new
++ call setline(1, ['1. abc', '2. def', '3. ghi'])
++ set fo=tan ai bs=2
++ call feedkeys("3G0lli\<BS>\<BS>x\<Esc>", 'tx')
++ call assert_equal('2. defx ghi', getline(2))
++ bwipe!
++ set fo& ai& bs&
++ endfunc
+*** ../vim-8.1.0670/src/mark.c 2018-10-25 13:31:33.829906902 +0200
+--- src/mark.c 2018-12-31 23:31:10.716045773 +0100
+***************
+*** 1211,1216 ****
+--- 1211,1218 ----
+ posp->lnum += lnum_amount; \
+ if (col_amount < 0 && posp->col <= (colnr_T)-col_amount) \
+ posp->col = 0; \
++ else if (posp->col < spaces_removed) \
++ posp->col = col_amount + spaces_removed; \
+ else \
+ posp->col += col_amount; \
+ } \
+***************
+*** 1220,1232 ****
+ * Adjust marks in line "lnum" at column "mincol" and further: add
+ * "lnum_amount" to the line number and add "col_amount" to the column
+ * position.
+ */
+ void
+ mark_col_adjust(
+ linenr_T lnum,
+ colnr_T mincol,
+ long lnum_amount,
+! long col_amount)
+ {
+ int i;
+ int fnum = curbuf->b_fnum;
+--- 1222,1237 ----
+ * Adjust marks in line "lnum" at column "mincol" and further: add
+ * "lnum_amount" to the line number and add "col_amount" to the column
+ * position.
++ * "spaces_removed" is the number of spaces that were removed, matters when the
++ * cursor is inside them.
+ */
+ void
+ mark_col_adjust(
+ linenr_T lnum,
+ colnr_T mincol,
+ long lnum_amount,
+! long col_amount,
+! int spaces_removed)
+ {
+ int i;
+ int fnum = curbuf->b_fnum;
+*** ../vim-8.1.0670/src/proto/mark.pro 2018-05-17 13:52:43.000000000 +0200
+--- src/proto/mark.pro 2018-12-31 23:24:07.791228166 +0100
+***************
+*** 21,27 ****
+ void ex_changes(exarg_T *eap);
+ void mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_after);
+ void mark_adjust_nofold(linenr_T line1, linenr_T line2, long amount, long amount_after);
+! void mark_col_adjust(linenr_T lnum, colnr_T mincol, long lnum_amount, long col_amount);
+ void cleanup_jumplist(win_T *wp, int loadfiles);
+ void copy_jumplist(win_T *from, win_T *to);
+ void free_jumplist(win_T *wp);
+--- 21,27 ----
+ void ex_changes(exarg_T *eap);
+ void mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_after);
+ void mark_adjust_nofold(linenr_T line1, linenr_T line2, long amount, long amount_after);
+! void mark_col_adjust(linenr_T lnum, colnr_T mincol, long lnum_amount, long col_amount, int spaces_removed);
+ void cleanup_jumplist(win_T *wp, int loadfiles);
+ void copy_jumplist(win_T *from, win_T *to);
+ void free_jumplist(win_T *wp);
+*** ../vim-8.1.0670/src/misc1.c 2018-12-30 11:38:49.933270875 +0100
+--- src/misc1.c 2018-12-31 23:24:32.519045003 +0100
+***************
+*** 1705,1711 ****
+ if (flags & OPENLINE_MARKFIX)
+ mark_col_adjust(curwin->w_cursor.lnum,
+ curwin->w_cursor.col + less_cols_off,
+! 1L, (long)-less_cols);
+ }
+ else
+ changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
+--- 1705,1711 ----
+ if (flags & OPENLINE_MARKFIX)
+ mark_col_adjust(curwin->w_cursor.lnum,
+ curwin->w_cursor.col + less_cols_off,
+! 1L, (long)-less_cols, 0);
+ }
+ else
+ changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
+*** ../vim-8.1.0670/src/version.c 2018-12-31 22:09:53.106187962 +0100
+--- src/version.c 2018-12-31 23:56:32.647983178 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 671,
+ /**/
+
+--
+You can't have everything. Where would you put it?
+ -- 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.0672 b/data/vim/patches/8.1.0672
new file mode 100644
index 000000000..0867f40bf
--- /dev/null
+++ b/data/vim/patches/8.1.0672
@@ -0,0 +1,88 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0672
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0672
+Problem: The Lua interface doesn't know about v:null.
+Solution: Add Lua support for v:null. (Uji, closes #3744)
+Files: src/if_lua.c, src/testdir/test_lua.vim
+
+
+*** ../vim-8.1.0671/src/if_lua.c 2018-08-21 14:23:31.418606007 +0200
+--- src/if_lua.c 2019-01-01 00:36:06.099146358 +0100
+***************
+*** 562,567 ****
+--- 562,571 ----
+ tv->v_type = VAR_SPECIAL;
+ tv->vval.v_number = (varnumber_T) lua_toboolean(L, pos);
+ break;
++ case LUA_TNIL:
++ tv->v_type = VAR_SPECIAL;
++ tv->vval.v_number = VVAL_NULL;
++ break;
+ case LUA_TSTRING:
+ tv->v_type = VAR_STRING;
+ tv->vval.v_string = vim_strsave((char_u *) lua_tostring(L, pos));
+*** ../vim-8.1.0671/src/testdir/test_lua.vim 2018-07-25 22:02:32.235966277 +0200
+--- src/testdir/test_lua.vim 2019-01-01 00:36:06.099146358 +0100
+***************
+*** 298,314 ****
+ lua l:add('abc')
+ lua l:add(true)
+ lua l:add(false)
+ lua l:add(vim.eval("[1, 2, 3]"))
+ lua l:add(vim.eval("{'a':1, 'b':2, 'c':3}"))
+! call assert_equal([123.0, 'abc', v:true, v:false, [1, 2, 3], {'a': 1, 'b': 2, 'c': 3}], l)
+! call assert_equal(6.0, luaeval('#l'))
+ call assert_match('^list: \%(0x\)\?\x\+$', luaeval('tostring(l)'))
+
+ lua l[0] = 124
+! lua l[4] = nil
+ lua l:insert('first')
+ lua l:insert('xx', 3)
+! call assert_equal(['first', 124.0, 'abc', 'xx', v:true, v:false, {'a': 1, 'b': 2, 'c': 3}], l)
+
+ lockvar 1 l
+ call assert_fails('lua l:add("x")', '[string "vim chunk"]:1: list is locked')
+--- 298,315 ----
+ lua l:add('abc')
+ lua l:add(true)
+ lua l:add(false)
++ lua l:add(nil)
+ lua l:add(vim.eval("[1, 2, 3]"))
+ lua l:add(vim.eval("{'a':1, 'b':2, 'c':3}"))
+! call assert_equal([123.0, 'abc', v:true, v:false, v:null, [1, 2, 3], {'a': 1, 'b': 2, 'c': 3}], l)
+! call assert_equal(7.0, luaeval('#l'))
+ call assert_match('^list: \%(0x\)\?\x\+$', luaeval('tostring(l)'))
+
+ lua l[0] = 124
+! lua l[5] = nil
+ lua l:insert('first')
+ lua l:insert('xx', 3)
+! call assert_equal(['first', 124.0, 'abc', 'xx', v:true, v:false, v:null, {'a': 1, 'b': 2, 'c': 3}], l)
+
+ lockvar 1 l
+ call assert_fails('lua l:add("x")', '[string "vim chunk"]:1: list is locked')
+*** ../vim-8.1.0671/src/version.c 2018-12-31 23:58:20.250887178 +0100
+--- src/version.c 2019-01-01 00:41:29.936347640 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 672,
+ /**/
+
+--
+From "know your smileys":
+ <<<:-{ Worf (Never smiles anyways, so he's a bad smiley)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0673 b/data/vim/patches/8.1.0673
new file mode 100644
index 000000000..1e98b0e1d
--- /dev/null
+++ b/data/vim/patches/8.1.0673
@@ -0,0 +1,4323 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0673
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0673
+Problem: Functionality for signs is spread out over several files.
+Solution: Move most of the sign functionality into sign.c. (Yegappan
+ Lakshmanan, closes #3751)
+Files: Filelist, src/Make_bc5.mak, src/Make_cyg_ming.mak,
+ src/Make_dice.mak, src/Make_ivc.mak, src/Make_manx.mak,
+ src/Make_morph.mak, src/Make_mvc.mak, src/Make_sas.mak,
+ src/Make_vms.mms, src/Makefile, src/README.txt, src/buffer.c,
+ src/evalfunc.c, src/ex_cmds.c, src/proto.h, src/proto/buffer.pro,
+ src/proto/ex_cmds.pro, src/proto/sign.pro, src/sign.c
+
+
+*** ../vim-8.1.0672/Filelist 2018-12-26 00:59:53.449011480 +0100
+--- Filelist 2019-01-01 13:01:50.678246698 +0100
+***************
+*** 81,90 ****
+ src/screen.c \
+ src/search.c \
+ src/sha256.c \
+! src/structs.h \
+ src/spell.c \
+ src/spell.h \
+ src/spellfile.c \
+ src/syntax.c \
+ src/tag.c \
+ src/term.c \
+--- 81,91 ----
+ src/screen.c \
+ src/search.c \
+ src/sha256.c \
+! src/sign.c \
+ src/spell.c \
+ src/spell.h \
+ src/spellfile.c \
++ src/structs.h \
+ src/syntax.c \
+ src/tag.c \
+ src/term.c \
+***************
+*** 192,197 ****
+--- 193,199 ----
+ src/proto/screen.pro \
+ src/proto/search.pro \
+ src/proto/sha256.pro \
++ src/proto/sign.pro \
+ src/proto/spell.pro \
+ src/proto/spellfile.pro \
+ src/proto/syntax.pro \
+*** ../vim-8.1.0672/src/Make_bc5.mak 2018-10-14 16:25:04.904583951 +0200
+--- src/Make_bc5.mak 2019-01-01 12:47:49.509502791 +0100
+***************
+*** 581,586 ****
+--- 581,587 ----
+ $(OBJDIR)\screen.obj \
+ $(OBJDIR)\search.obj \
+ $(OBJDIR)\sha256.obj \
++ $(OBJDIR)\sign.obj \
+ $(OBJDIR)\spell.obj \
+ $(OBJDIR)\spellfile.obj \
+ $(OBJDIR)\syntax.obj \
+*** ../vim-8.1.0672/src/Make_cyg_ming.mak 2018-12-19 21:05:53.912800490 +0100
+--- src/Make_cyg_ming.mak 2019-01-01 12:47:49.513502757 +0100
+***************
+*** 746,751 ****
+--- 746,752 ----
+ $(OUTDIR)/screen.o \
+ $(OUTDIR)/search.o \
+ $(OUTDIR)/sha256.o \
++ $(OUTDIR)/sign.o \
+ $(OUTDIR)/spell.o \
+ $(OUTDIR)/spellfile.o \
+ $(OUTDIR)/syntax.o \
+*** ../vim-8.1.0672/src/Make_dice.mak 2016-07-19 13:51:24.000000000 +0200
+--- src/Make_dice.mak 2019-01-01 12:47:49.513502757 +0100
+***************
+*** 71,76 ****
+--- 71,77 ----
+ screen.c \
+ search.c \
+ sha256.c \
++ sign.c \
+ spell.c \
+ spellfile.c \
+ syntax.c \
+***************
+*** 127,132 ****
+--- 128,134 ----
+ o/screen.o \
+ o/search.o \
+ o/sha256.o \
++ o/sign.o \
+ o/spell.o \
+ o/spellfile.o \
+ o/syntax.o \
+***************
+*** 252,257 ****
+--- 254,261 ----
+
+ o/sha256.o: sha256.c $(SYMS)
+
++ o/sign.o: sign.c $(SYMS)
++
+ o/spell.o: spell.c $(SYMS) spell.h
+
+ o/spellfile.o: spellfile.c $(SYMS) spell.h
+*** ../vim-8.1.0672/src/Make_ivc.mak 2018-06-19 18:58:04.006489842 +0200
+--- src/Make_ivc.mak 2019-01-01 12:55:40.869451744 +0100
+***************
+*** 257,262 ****
+--- 257,263 ----
+ "$(INTDIR)/screen.obj" \
+ "$(INTDIR)/search.obj" \
+ "$(INTDIR)/sha256.obj" \
++ "$(INTDIR)/sign.obj" \
+ "$(INTDIR)/spell.obj" \
+ "$(INTDIR)/spellfile.obj" \
+ "$(INTDIR)/syntax.obj" \
+***************
+*** 675,680 ****
+--- 676,685 ----
+ # End Source File
+ # Begin Source File
+
++ SOURCE=.\sign.c
++ # End Source File
++ # Begin Source File
++
+ SOURCE=.\spell.c
+ # End Source File
+ # Begin Source File
+*** ../vim-8.1.0672/src/Make_manx.mak 2016-07-19 13:52:17.000000000 +0200
+--- src/Make_manx.mak 2019-01-01 12:47:49.513502757 +0100
+***************
+*** 81,86 ****
+--- 81,87 ----
+ screen.c \
+ search.c \
+ sha256.c \
++ sign.c \
+ spell.c \
+ spellfile.c \
+ syntax.c \
+***************
+*** 139,144 ****
+--- 140,146 ----
+ obj/screen.o \
+ obj/search.o \
+ obj/sha256.o \
++ obj/sign.o \
+ obj/spell.o \
+ obj/spellfile.o \
+ obj/syntax.o \
+***************
+*** 195,200 ****
+--- 197,203 ----
+ proto/screen.pro \
+ proto/search.pro \
+ proto/sha256.pro \
++ proto/sign.pro \
+ proto/spell.pro \
+ proto/spellfile.pro \
+ proto/syntax.pro \
+***************
+*** 389,394 ****
+--- 392,400 ----
+ obj/sha256.o: sha256.c
+ $(CCSYM) $@ sha256.c
+
++ obj/sign.o: sign.c
++ $(CCSYM) $@ sign.c
++
+ obj/spell.o: spell.c
+ $(CCSYM) $@ spell.c
+
+*** ../vim-8.1.0672/src/Make_morph.mak 2016-07-19 13:52:32.000000000 +0200
+--- src/Make_morph.mak 2019-01-01 12:47:49.513502757 +0100
+***************
+*** 69,74 ****
+--- 69,75 ----
+ screen.c \
+ search.c \
+ sha256.c \
++ sign.c \
+ spell.c \
+ spellfile.c \
+ syntax.c \
+*** ../vim-8.1.0672/src/Make_mvc.mak 2018-12-19 21:05:53.912800490 +0100
+--- src/Make_mvc.mak 2019-01-01 12:47:49.513502757 +0100
+***************
+*** 749,754 ****
+--- 749,755 ----
+ $(OUTDIR)\screen.obj \
+ $(OUTDIR)\search.obj \
+ $(OUTDIR)\sha256.obj \
++ $(OUTDIR)\sign.obj \
+ $(OUTDIR)\spell.obj \
+ $(OUTDIR)\spellfile.obj \
+ $(OUTDIR)\syntax.obj \
+***************
+*** 1519,1524 ****
+--- 1520,1527 ----
+
+ $(OUTDIR)/sha256.obj: $(OUTDIR) sha256.c $(INCL)
+
++ $(OUTDIR)/sign.obj: $(OUTDIR) sign.c $(INCL)
++
+ $(OUTDIR)/spell.obj: $(OUTDIR) spell.c $(INCL)
+
+ $(OUTDIR)/spellfile.obj: $(OUTDIR) spellfile.c $(INCL)
+***************
+*** 1664,1669 ****
+--- 1667,1673 ----
+ proto/screen.pro \
+ proto/search.pro \
+ proto/sha256.pro \
++ proto/sign.pro \
+ proto/spell.pro \
+ proto/spellfile.pro \
+ proto/syntax.pro \
+*** ../vim-8.1.0672/src/Make_sas.mak 2016-07-19 13:53:24.000000000 +0200
+--- src/Make_sas.mak 2019-01-01 12:57:19.092606414 +0100
+***************
+*** 134,139 ****
+--- 134,140 ----
+ screen.c \
+ search.c \
+ sha256.c \
++ sign.c \
+ spell.c \
+ spellfile.c \
+ syntax.c \
+***************
+*** 191,196 ****
+--- 192,198 ----
+ screen.o \
+ search.o \
+ sha256.o \
++ sign.o \
+ spell.o \
+ spellfile.o \
+ syntax.o \
+***************
+*** 248,253 ****
+--- 250,256 ----
+ proto/screen.pro \
+ proto/search.pro \
+ proto/sha256.pro \
++ proto/sign.pro \
+ proto/spell.pro \
+ proto/spellfile.pro \
+ proto/syntax.pro \
+***************
+*** 404,409 ****
+--- 407,414 ----
+ proto/search.pro: search.c
+ sha256.o: sha256.c
+ proto/sha256.pro: sha256.c
++ sign.o: sign.c
++ proto/sign.pro: sign.c
+ spell.o: spell.c
+ proto/spell.pro: spell.c
+ spellfile.o: spellfile.c
+*** ../vim-8.1.0672/src/Make_vms.mms 2017-11-18 21:08:23.000000000 +0100
+--- src/Make_vms.mms 2019-01-01 12:47:49.513502757 +0100
+***************
+*** 302,308 ****
+ SRC = arabic.c beval.obj blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
+ ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
+ hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
+! misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c\
+ spell.c spellfile.c syntax.c tag.c term.c termlib.c ui.c undo.c userfunc.c version.c screen.c \
+ window.c os_unix.c os_vms.c pathdef.c \
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+--- 302,308 ----
+ SRC = arabic.c beval.obj blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
+ ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
+ hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
+! misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+ spell.c spellfile.c syntax.c tag.c term.c termlib.c ui.c undo.c userfunc.c version.c screen.c \
+ window.c os_unix.c os_vms.c pathdef.c \
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+***************
+*** 313,319 ****
+ if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
+! regexp.obj search.obj sha256.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj \
+ ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj os_unix.obj \
+ os_vms.obj pathdef.obj if_mzsch.obj\
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+--- 313,319 ----
+ if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
+! regexp.obj search.obj sha256.obj sign.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj \
+ ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj os_unix.obj \
+ os_vms.obj pathdef.obj if_mzsch.obj\
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+***************
+*** 677,682 ****
+--- 677,686 ----
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+ globals.h farsi.h arabic.h
++ sign.obj : sign.c vim.h [.auto]config.h feature.h os_unix.h \
++ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
++ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
++ globals.h farsi.h arabic.h
+ spell.obj : spell.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+*** ../vim-8.1.0672/src/Makefile 2018-12-22 17:27:08.982517207 +0100
+--- src/Makefile 2019-01-01 12:47:49.513502757 +0100
+***************
+*** 1626,1631 ****
+--- 1628,1634 ----
+ screen.c \
+ search.c \
+ sha256.c \
++ sign.c \
+ spell.c \
+ spellfile.c \
+ syntax.c \
+***************
+*** 1736,1741 ****
+--- 1739,1745 ----
+ objects/screen.o \
+ objects/search.o \
+ objects/sha256.o \
++ objects/sign.o \
+ objects/spell.o \
+ objects/spellfile.o \
+ objects/syntax.o \
+***************
+*** 1870,1875 ****
+--- 1874,1880 ----
+ screen.pro \
+ search.pro \
+ sha256.pro \
++ sign.pro \
+ spell.pro \
+ spellfile.pro \
+ syntax.pro \
+***************
+*** 3200,3205 ****
+--- 3205,3213 ----
+ objects/sha256.o: sha256.c
+ $(CCC) -o $@ sha256.c
+
++ objects/sign.o: sign.c
++ $(CCC) -o $@ sign.c
++
+ objects/spell.o: spell.c
+ $(CCC) -o $@ spell.c
+
+***************
+*** 3586,3591 ****
+--- 3594,3603 ----
+ 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/sign.o: sign.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 \
+*** ../vim-8.1.0672/src/README.txt 2017-11-12 16:49:36.000000000 +0100
+--- src/README.txt 2019-01-01 12:47:49.513502757 +0100
+***************
+*** 35,40 ****
+--- 35,41 ----
+ regexp.c pattern matching
+ screen.c updating the windows
+ search.c pattern searching
++ sign.c signs
+ spell.c spell checking
+ syntax.c syntax and other highlighting
+ tag.c tags
+*** ../vim-8.1.0672/src/buffer.c 2018-12-29 18:53:07.839607468 +0100
+--- src/buffer.c 2019-01-01 12:47:49.513502757 +0100
+***************
+*** 5864,6505 ****
+ }
+ #endif
+
+- #if defined(FEAT_SIGNS) || defined(PROTO)
+- static hashtab_T sg_table; // sign group (signgroup_T) hashtable
+- static int next_sign_id = 1; // next sign id in the global group
+-
+- /*
+- * Initialize data needed for managing signs
+- */
+- void
+- init_signs(void)
+- {
+- hash_init(&sg_table); // sign group hash table
+- }
+-
+- /*
+- * A new sign in group 'groupname' is added. If the group is not present,
+- * create it. Otherwise reference the group.
+- */
+- static signgroup_T *
+- sign_group_ref(char_u *groupname)
+- {
+- hash_T hash;
+- hashitem_T *hi;
+- signgroup_T *group;
+-
+- hash = hash_hash(groupname);
+- hi = hash_lookup(&sg_table, groupname, hash);
+- if (HASHITEM_EMPTY(hi))
+- {
+- // new group
+- group = (signgroup_T *)alloc(
+- (unsigned)(sizeof(signgroup_T) + STRLEN(groupname)));
+- if (group == NULL)
+- return NULL;
+- STRCPY(group->sg_name, groupname);
+- group->refcount = 1;
+- group->next_sign_id = 1;
+- hash_add_item(&sg_table, hi, group->sg_name, hash);
+- }
+- else
+- {
+- // existing group
+- group = HI2SG(hi);
+- group->refcount++;
+- }
+-
+- return group;
+- }
+-
+- /*
+- * A sign in group 'groupname' is removed. If all the signs in this group are
+- * removed, then remove the group.
+- */
+- static void
+- sign_group_unref(char_u *groupname)
+- {
+- hashitem_T *hi;
+- signgroup_T *group;
+-
+- hi = hash_find(&sg_table, groupname);
+- if (!HASHITEM_EMPTY(hi))
+- {
+- group = HI2SG(hi);
+- group->refcount--;
+- if (group->refcount == 0)
+- {
+- // All the signs in this group are removed
+- hash_remove(&sg_table, hi);
+- vim_free(group);
+- }
+- }
+- }
+-
+- /*
+- * Get the next free sign identifier in the specified group
+- */
+- int
+- sign_group_get_next_signid(buf_T *buf, char_u *groupname)
+- {
+- int id = 1;
+- signgroup_T *group = NULL;
+- signlist_T *sign;
+- hashitem_T *hi;
+- int found = FALSE;
+-
+- if (groupname != NULL)
+- {
+- hi = hash_find(&sg_table, groupname);
+- if (HASHITEM_EMPTY(hi))
+- return id;
+- group = HI2SG(hi);
+- }
+-
+- // Search for the next usuable sign identifier
+- while (!found)
+- {
+- if (group == NULL)
+- id = next_sign_id++; // global group
+- else
+- id = group->next_sign_id++;
+-
+- // Check whether this sign is already placed in the buffer
+- found = TRUE;
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- {
+- if (id == sign->id && sign_in_group(sign, groupname))
+- {
+- found = FALSE; // sign identifier is in use
+- break;
+- }
+- }
+- }
+-
+- return id;
+- }
+-
+- /*
+- * Insert a new sign into the signlist for buffer 'buf' between the 'prev' and
+- * 'next' signs.
+- */
+- static void
+- insert_sign(
+- buf_T *buf, // buffer to store sign in
+- signlist_T *prev, // previous sign entry
+- signlist_T *next, // next sign entry
+- int id, // sign ID
+- char_u *group, // sign group; NULL for global group
+- int prio, // sign priority
+- linenr_T lnum, // line number which gets the mark
+- int typenr) // typenr of sign we are adding
+- {
+- signlist_T *newsign;
+-
+- newsign = (signlist_T *)lalloc_id((long_u)sizeof(signlist_T), FALSE,
+- aid_insert_sign);
+- if (newsign != NULL)
+- {
+- newsign->id = id;
+- newsign->lnum = lnum;
+- newsign->typenr = typenr;
+- if (group != NULL)
+- {
+- newsign->group = sign_group_ref(group);
+- if (newsign->group == NULL)
+- {
+- vim_free(newsign);
+- return;
+- }
+- }
+- else
+- newsign->group = NULL;
+- newsign->priority = prio;
+- newsign->next = next;
+- newsign->prev = prev;
+- if (next != NULL)
+- next->prev = newsign;
+-
+- if (prev == NULL)
+- {
+- // When adding first sign need to redraw the windows to create the
+- // column for signs.
+- if (buf->b_signlist == NULL)
+- {
+- redraw_buf_later(buf, NOT_VALID);
+- changed_cline_bef_curs();
+- }
+-
+- // first sign in signlist
+- buf->b_signlist = newsign;
+- #ifdef FEAT_NETBEANS_INTG
+- if (netbeans_active())
+- buf->b_has_sign_column = TRUE;
+- #endif
+- }
+- else
+- prev->next = newsign;
+- }
+- }
+-
+- /*
+- * Insert a new sign sorted by line number and sign priority.
+- */
+- static void
+- insert_sign_by_lnum_prio(
+- buf_T *buf, // buffer to store sign in
+- signlist_T *prev, // previous sign entry
+- int id, // sign ID
+- char_u *group, // sign group; NULL for global group
+- int prio, // sign priority
+- linenr_T lnum, // line number which gets the mark
+- int typenr) // typenr of sign we are adding
+- {
+- signlist_T *sign;
+-
+- // keep signs sorted by lnum and by priority: insert new sign at
+- // the proper position in the list for this lnum.
+- while (prev != NULL && prev->lnum == lnum && prev->priority <= prio)
+- prev = prev->prev;
+- if (prev == NULL)
+- sign = buf->b_signlist;
+- else
+- sign = prev->next;
+-
+- insert_sign(buf, prev, sign, id, group, prio, lnum, typenr);
+- }
+-
+- /*
+- * Returns TRUE if 'sign' is in 'group'.
+- * A sign can either be in the global group (sign->group == NULL)
+- * or in a named group. If 'group' is '*', then the sign is part of the group.
+- */
+- int
+- sign_in_group(signlist_T *sign, char_u *group)
+- {
+- return ((group != NULL && STRCMP(group, "*") == 0)
+- || (group == NULL && sign->group == NULL)
+- || (group != NULL && sign->group != NULL
+- && STRCMP(group, sign->group->sg_name) == 0));
+- }
+-
+- /*
+- * Return information about a sign in a Dict
+- */
+- dict_T *
+- sign_get_info(signlist_T *sign)
+- {
+- dict_T *d;
+-
+- if ((d = dict_alloc_id(aid_sign_getinfo)) == NULL)
+- return NULL;
+- dict_add_number(d, "id", sign->id);
+- dict_add_string(d, "group", (sign->group == NULL) ?
+- (char_u *)"" : sign->group->sg_name);
+- dict_add_number(d, "lnum", sign->lnum);
+- dict_add_string(d, "name", sign_typenr2name(sign->typenr));
+- dict_add_number(d, "priority", sign->priority);
+-
+- return d;
+- }
+-
+- /*
+- * Add the sign into the signlist. Find the right spot to do it though.
+- */
+- void
+- buf_addsign(
+- buf_T *buf, // buffer to store sign in
+- int id, // sign ID
+- char_u *groupname, // sign group
+- int prio, // sign priority
+- linenr_T lnum, // line number which gets the mark
+- int typenr) // typenr of sign we are adding
+- {
+- signlist_T *sign; // a sign in the signlist
+- signlist_T *prev; // the previous sign
+-
+- prev = NULL;
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- {
+- if (lnum == sign->lnum && id == sign->id &&
+- sign_in_group(sign, groupname))
+- {
+- // Update an existing sign
+- sign->typenr = typenr;
+- return;
+- }
+- else if (lnum < sign->lnum)
+- {
+- insert_sign_by_lnum_prio(buf, prev, id, groupname, prio,
+- lnum, typenr);
+- return;
+- }
+- prev = sign;
+- }
+-
+- insert_sign_by_lnum_prio(buf, prev, id, groupname, prio, lnum, typenr);
+- return;
+- }
+-
+- /*
+- * For an existing, placed sign "markId" change the type to "typenr".
+- * Returns the line number of the sign, or zero if the sign is not found.
+- */
+- linenr_T
+- buf_change_sign_type(
+- buf_T *buf, // buffer to store sign in
+- int markId, // sign ID
+- char_u *group, // sign group
+- int typenr) // typenr of sign we are adding
+- {
+- signlist_T *sign; // a sign in the signlist
+-
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- {
+- if (sign->id == markId && sign_in_group(sign, group))
+- {
+- sign->typenr = typenr;
+- return sign->lnum;
+- }
+- }
+-
+- return (linenr_T)0;
+- }
+-
+- /*
+- * Return the type number of the sign at line number 'lnum' in buffer 'buf'
+- * which has the attribute specifed by 'type'. Returns 0 if a sign is not found
+- * at the line number or it doesn't have the specified attribute.
+- */
+- int
+- buf_getsigntype(
+- buf_T *buf,
+- linenr_T lnum,
+- int type) /* SIGN_ICON, SIGN_TEXT, SIGN_ANY, SIGN_LINEHL */
+- {
+- signlist_T *sign; /* a sign in a b_signlist */
+-
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- if (sign->lnum == lnum
+- && (type == SIGN_ANY
+- # ifdef FEAT_SIGN_ICONS
+- || (type == SIGN_ICON
+- && sign_get_image(sign->typenr) != NULL)
+- # endif
+- || (type == SIGN_TEXT
+- && sign_get_text(sign->typenr) != NULL)
+- || (type == SIGN_LINEHL
+- && sign_get_attr(sign->typenr, TRUE) != 0)))
+- return sign->typenr;
+- return 0;
+- }
+-
+- /*
+- * Delete sign 'id' in group 'group' from buffer 'buf'.
+- * If 'id' is zero, then delete all the signs in group 'group'. Otherwise
+- * delete only the specified sign.
+- * If 'group' is '*', then delete the sign in all the groups. If 'group' is
+- * NULL, then delete the sign in the global group. Otherwise delete the sign in
+- * the specified group.
+- * Returns the line number of the deleted sign. If multiple signs are deleted,
+- * then returns the line number of the last sign deleted.
+- */
+- linenr_T
+- buf_delsign(
+- buf_T *buf, // buffer sign is stored in
+- linenr_T atlnum, // sign at this line, 0 - at any line
+- int id, // sign id
+- char_u *group) // sign group
+- {
+- signlist_T **lastp; // pointer to pointer to current sign
+- signlist_T *sign; // a sign in a b_signlist
+- signlist_T *next; // the next sign in a b_signlist
+- linenr_T lnum; // line number whose sign was deleted
+-
+- lastp = &buf->b_signlist;
+- lnum = 0;
+- for (sign = buf->b_signlist; sign != NULL; sign = next)
+- {
+- next = sign->next;
+- if ((id == 0 || sign->id == id) &&
+- (atlnum == 0 || sign->lnum == atlnum) &&
+- sign_in_group(sign, group))
+-
+- {
+- *lastp = next;
+- if (next != NULL)
+- next->prev = sign->prev;
+- lnum = sign->lnum;
+- if (sign->group != NULL)
+- sign_group_unref(sign->group->sg_name);
+- vim_free(sign);
+- update_debug_sign(buf, lnum);
+- // Check whether only one sign needs to be deleted
+- // If deleting a sign with a specific identifer in a particular
+- // group or deleting any sign at a particular line number, delete
+- // only one sign.
+- if (group == NULL
+- || (*group != '*' && id != 0)
+- || (*group == '*' && atlnum != 0))
+- break;
+- }
+- else
+- lastp = &sign->next;
+- }
+-
+- // When deleted the last sign need to redraw the windows to remove the
+- // sign column.
+- if (buf->b_signlist == NULL)
+- {
+- redraw_buf_later(buf, NOT_VALID);
+- changed_cline_bef_curs();
+- }
+-
+- return lnum;
+- }
+-
+-
+- /*
+- * Find the line number of the sign with the requested id in group 'group'. If
+- * the sign does not exist, return 0 as the line number. This will still let
+- * the correct file get loaded.
+- */
+- int
+- buf_findsign(
+- buf_T *buf, // buffer to store sign in
+- int id, // sign ID
+- char_u *group) // sign group
+- {
+- signlist_T *sign; // a sign in the signlist
+-
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- if (sign->id == id && sign_in_group(sign, group))
+- return sign->lnum;
+-
+- return 0;
+- }
+-
+- /*
+- * Return the sign at line 'lnum' in buffer 'buf'. Returns NULL if a sign is
+- * not found at the line. If 'groupname' is NULL, searches in the global group.
+- */
+- static signlist_T *
+- buf_getsign_at_line(
+- buf_T *buf, // buffer whose sign we are searching for
+- linenr_T lnum, // line number of sign
+- char_u *groupname) // sign group name
+- {
+- signlist_T *sign; // a sign in the signlist
+-
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- if (sign->lnum == lnum && sign_in_group(sign, groupname))
+- return sign;
+-
+- return NULL;
+- }
+-
+- /*
+- * Return the sign with identifier 'id' in group 'group' placed in buffer 'buf'
+- */
+- signlist_T *
+- buf_getsign_with_id(
+- buf_T *buf, // buffer whose sign we are searching for
+- int id, // sign identifier
+- char_u *group) // sign group
+- {
+- signlist_T *sign; // a sign in the signlist
+-
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- if (sign->id == id && sign_in_group(sign, group))
+- return sign;
+-
+- return NULL;
+- }
+-
+- /*
+- * Return the identifier of the sign at line number 'lnum' in buffer 'buf'.
+- */
+- int
+- buf_findsign_id(
+- buf_T *buf, // buffer whose sign we are searching for
+- linenr_T lnum, // line number of sign
+- char_u *groupname) // sign group name
+- {
+- signlist_T *sign; // a sign in the signlist
+-
+- sign = buf_getsign_at_line(buf, lnum, groupname);
+- if (sign != NULL)
+- return sign->id;
+-
+- return 0;
+- }
+-
+- # 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 */
+- linenr_T lnum, /* line number of sign */
+- int typenr) /* sign type number */
+- {
+- signlist_T *sign; /* a sign in the signlist */
+-
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- if (sign->lnum == lnum && sign->typenr == typenr)
+- return sign->id;
+-
+- return 0;
+- }
+-
+-
+- # 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)
+- {
+- signlist_T *sign; // a sign in the signlist
+- int count = 0;
+-
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- if (sign->lnum == lnum)
+- if (sign_get_image(sign->typenr) != NULL)
+- count++;
+-
+- return count;
+- }
+- # endif /* FEAT_SIGN_ICONS */
+- # endif /* FEAT_NETBEANS_INTG */
+-
+- /*
+- * Delete signs in group 'group' in buffer "buf". If 'group' is '*', then
+- * delete all the signs.
+- */
+- void
+- buf_delete_signs(buf_T *buf, char_u *group)
+- {
+- signlist_T *sign;
+- signlist_T **lastp; // pointer to pointer to current sign
+- signlist_T *next;
+-
+- // When deleting the last sign need to redraw the windows to remove the
+- // sign column. Not when curwin is NULL (this means we're exiting).
+- if (buf->b_signlist != NULL && curwin != NULL)
+- {
+- redraw_buf_later(buf, NOT_VALID);
+- changed_cline_bef_curs();
+- }
+-
+- lastp = &buf->b_signlist;
+- for (sign = buf->b_signlist; sign != NULL; sign = next)
+- {
+- next = sign->next;
+- if (sign_in_group(sign, group))
+- {
+- *lastp = next;
+- if (next != NULL)
+- next->prev = sign->prev;
+- if (sign->group != NULL)
+- sign_group_unref(sign->group->sg_name);
+- vim_free(sign);
+- }
+- else
+- lastp = &sign->next;
+- }
+- }
+-
+- /*
+- * Delete all the signs in the specified group in all the buffers.
+- */
+- void
+- buf_delete_all_signs(char_u *groupname)
+- {
+- buf_T *buf; /* buffer we are checking for signs */
+-
+- FOR_ALL_BUFFERS(buf)
+- if (buf->b_signlist != NULL)
+- buf_delete_signs(buf, groupname);
+- }
+-
+- /*
+- * List placed signs for "rbuf". If "rbuf" is NULL do it for all buffers.
+- */
+- void
+- sign_list_placed(buf_T *rbuf, char_u *sign_group)
+- {
+- buf_T *buf;
+- signlist_T *sign;
+- char lbuf[BUFSIZ];
+- char group[BUFSIZ];
+-
+- MSG_PUTS_TITLE(_("\n--- Signs ---"));
+- msg_putchar('\n');
+- if (rbuf == NULL)
+- buf = firstbuf;
+- else
+- buf = rbuf;
+- while (buf != NULL && !got_int)
+- {
+- if (buf->b_signlist != NULL)
+- {
+- vim_snprintf(lbuf, BUFSIZ, _("Signs for %s:"), buf->b_fname);
+- MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
+- msg_putchar('\n');
+- }
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- {
+- if (got_int)
+- break;
+- if (!sign_in_group(sign, sign_group))
+- continue;
+- if (sign->group != NULL)
+- vim_snprintf(group, BUFSIZ, " group=%s",
+- sign->group->sg_name);
+- else
+- group[0] = '\0';
+- vim_snprintf(lbuf, BUFSIZ, _(" line=%ld id=%d%s name=%s "
+- "priority=%d"),
+- (long)sign->lnum, sign->id, group,
+- sign_typenr2name(sign->typenr), sign->priority);
+- MSG_PUTS(lbuf);
+- msg_putchar('\n');
+- }
+- if (rbuf != NULL)
+- break;
+- buf = buf->b_next;
+- }
+- }
+-
+- /*
+- * Adjust a placed sign for inserted/deleted lines.
+- */
+- void
+- sign_mark_adjust(
+- linenr_T line1,
+- linenr_T line2,
+- long amount,
+- long amount_after)
+- {
+- signlist_T *sign; /* a sign in a b_signlist */
+-
+- FOR_ALL_SIGNS_IN_BUF(curbuf, sign)
+- {
+- if (sign->lnum >= line1 && sign->lnum <= line2)
+- {
+- if (amount == MAXLNUM)
+- sign->lnum = line1;
+- else
+- sign->lnum += amount;
+- }
+- else if (sign->lnum > line2)
+- sign->lnum += amount_after;
+- }
+- }
+- #endif /* FEAT_SIGNS */
+-
+ /*
+ * Set 'buflisted' for curbuf to "on" and trigger autocommands if it changed.
+ */
+--- 5864,5869 ----
+*** ../vim-8.1.0672/src/evalfunc.c 2018-12-29 21:00:20.953498877 +0100
+--- src/evalfunc.c 2019-01-01 12:47:49.517502724 +0100
+***************
+*** 4424,4447 ****
+ copy_tv(tv, rettv);
+ }
+
+- #ifdef FEAT_SIGNS
+- /*
+- * Returns information about signs placed in a buffer as list of dicts.
+- */
+- static void
+- get_buffer_signs(buf_T *buf, list_T *l)
+- {
+- signlist_T *sign;
+- dict_T *d;
+-
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- {
+- if ((d = sign_get_info(sign)) != NULL)
+- list_append_dict(l, d);
+- }
+- }
+- #endif
+-
+ /*
+ * Returns buffer options, variables and other attributes in a dictionary.
+ */
+--- 4424,4429 ----
+*** ../vim-8.1.0672/src/ex_cmds.c 2018-12-31 22:02:24.081890522 +0100
+--- src/ex_cmds.c 2019-01-01 12:47:49.517502724 +0100
+***************
+*** 7579,8830 ****
+ }
+ }
+
+- #if defined(FEAT_SIGNS) || defined(PROTO)
+-
+- /*
+- * Struct to hold the sign properties.
+- */
+- typedef struct sign sign_T;
+-
+- struct sign
+- {
+- sign_T *sn_next; /* next sign in list */
+- int sn_typenr; /* type number of sign */
+- char_u *sn_name; /* name of sign */
+- char_u *sn_icon; /* name of pixmap */
+- # ifdef FEAT_SIGN_ICONS
+- void *sn_image; /* icon image */
+- # endif
+- char_u *sn_text; /* text used instead of pixmap */
+- int sn_line_hl; /* highlight ID for line */
+- int sn_text_hl; /* highlight ID for text */
+- };
+-
+- static sign_T *first_sign = NULL;
+- static int next_sign_typenr = 1;
+-
+- static void sign_list_defined(sign_T *sp);
+- static void sign_undefine(sign_T *sp, sign_T *sp_prev);
+-
+- static char *cmds[] = {
+- "define",
+- # define SIGNCMD_DEFINE 0
+- "undefine",
+- # define SIGNCMD_UNDEFINE 1
+- "list",
+- # define SIGNCMD_LIST 2
+- "place",
+- # define SIGNCMD_PLACE 3
+- "unplace",
+- # define SIGNCMD_UNPLACE 4
+- "jump",
+- # define SIGNCMD_JUMP 5
+- NULL
+- # define SIGNCMD_LAST 6
+- };
+-
+- /*
+- * Find index of a ":sign" subcmd from its name.
+- * "*end_cmd" must be writable.
+- */
+- static int
+- sign_cmd_idx(
+- char_u *begin_cmd, /* begin of sign subcmd */
+- char_u *end_cmd) /* just after sign subcmd */
+- {
+- int idx;
+- char save = *end_cmd;
+-
+- *end_cmd = NUL;
+- for (idx = 0; ; ++idx)
+- if (cmds[idx] == NULL || STRCMP(begin_cmd, cmds[idx]) == 0)
+- break;
+- *end_cmd = save;
+- return idx;
+- }
+-
+- /*
+- * Find a sign by name. Also returns pointer to the previous sign.
+- */
+- static sign_T *
+- sign_find(char_u *name, sign_T **sp_prev)
+- {
+- sign_T *sp;
+-
+- if (sp_prev != NULL)
+- *sp_prev = NULL;
+- for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+- {
+- if (STRCMP(sp->sn_name, name) == 0)
+- break;
+- if (sp_prev != NULL)
+- *sp_prev = sp;
+- }
+-
+- return sp;
+- }
+-
+- /*
+- * Define a new sign or update an existing sign
+- */
+- int
+- sign_define_by_name(
+- char_u *name,
+- char_u *icon,
+- char_u *linehl,
+- char_u *text,
+- char_u *texthl)
+- {
+- sign_T *sp_prev;
+- sign_T *sp;
+-
+- sp = sign_find(name, &sp_prev);
+- if (sp == NULL)
+- {
+- sign_T *lp;
+- int start = next_sign_typenr;
+-
+- // Allocate a new sign.
+- sp = (sign_T *)alloc_clear_id((unsigned)sizeof(sign_T),
+- aid_sign_define_by_name);
+- if (sp == NULL)
+- return FAIL;
+-
+- // Check that next_sign_typenr is not already being used.
+- // This only happens after wrapping around. Hopefully
+- // another one got deleted and we can use its number.
+- for (lp = first_sign; lp != NULL; )
+- {
+- if (lp->sn_typenr == next_sign_typenr)
+- {
+- ++next_sign_typenr;
+- if (next_sign_typenr == MAX_TYPENR)
+- next_sign_typenr = 1;
+- if (next_sign_typenr == start)
+- {
+- vim_free(sp);
+- EMSG(_("E612: Too many signs defined"));
+- return FAIL;
+- }
+- lp = first_sign; // start all over
+- continue;
+- }
+- lp = lp->sn_next;
+- }
+-
+- sp->sn_typenr = next_sign_typenr;
+- if (++next_sign_typenr == MAX_TYPENR)
+- next_sign_typenr = 1; // wrap around
+-
+- sp->sn_name = vim_strsave(name);
+- if (sp->sn_name == NULL) // out of memory
+- {
+- vim_free(sp);
+- return FAIL;
+- }
+-
+- // add the new sign to the list of signs
+- if (sp_prev == NULL)
+- first_sign = sp;
+- else
+- sp_prev->sn_next = sp;
+- }
+-
+- // set values for a defined sign.
+- if (icon != NULL)
+- {
+- vim_free(sp->sn_icon);
+- sp->sn_icon = vim_strsave(icon);
+- backslash_halve(sp->sn_icon);
+- # ifdef FEAT_SIGN_ICONS
+- if (gui.in_use)
+- {
+- out_flush();
+- if (sp->sn_image != NULL)
+- gui_mch_destroy_sign(sp->sn_image);
+- sp->sn_image = gui_mch_register_sign(sp->sn_icon);
+- }
+- # endif
+- }
+-
+- if (text != NULL)
+- {
+- char_u *s;
+- char_u *endp;
+- int cells;
+- int len;
+-
+- endp = text + (int)STRLEN(text);
+- for (s = text; s + 1 < endp; ++s)
+- if (*s == '\\')
+- {
+- // Remove a backslash, so that it is possible
+- // to use a space.
+- STRMOVE(s, s + 1);
+- --endp;
+- }
+- # ifdef FEAT_MBYTE
+- // Count cells and check for non-printable chars
+- if (has_mbyte)
+- {
+- cells = 0;
+- for (s = text; s < endp; s += (*mb_ptr2len)(s))
+- {
+- if (!vim_isprintc((*mb_ptr2char)(s)))
+- break;
+- cells += (*mb_ptr2cells)(s);
+- }
+- }
+- else
+- # endif
+- {
+- for (s = text; s < endp; ++s)
+- if (!vim_isprintc(*s))
+- break;
+- cells = (int)(s - text);
+- }
+- // Currently must be one or two display cells
+- if (s != endp || cells < 1 || cells > 2)
+- {
+- EMSG2(_("E239: Invalid sign text: %s"), text);
+- return FAIL;
+- }
+-
+- vim_free(sp->sn_text);
+- // Allocate one byte more if we need to pad up
+- // with a space.
+- len = (int)(endp - text + ((cells == 1) ? 1 : 0));
+- sp->sn_text = vim_strnsave(text, len);
+-
+- if (sp->sn_text != NULL && cells == 1)
+- STRCPY(sp->sn_text + len - 1, " ");
+- }
+-
+- if (linehl != NULL)
+- sp->sn_line_hl = syn_check_group(linehl, (int)STRLEN(linehl));
+-
+- if (texthl != NULL)
+- sp->sn_text_hl = syn_check_group(texthl, (int)STRLEN(texthl));
+-
+- return OK;
+- }
+-
+- /*
+- * Free the sign specified by 'name'.
+- */
+- int
+- sign_undefine_by_name(char_u *name)
+- {
+- sign_T *sp_prev;
+- sign_T *sp;
+-
+- sp = sign_find(name, &sp_prev);
+- if (sp == NULL)
+- {
+- EMSG2(_("E155: Unknown sign: %s"), name);
+- return FAIL;
+- }
+- sign_undefine(sp, sp_prev);
+-
+- return OK;
+- }
+-
+- /*
+- * List the signs matching 'name'
+- */
+- static void
+- sign_list_by_name(char_u *name)
+- {
+- sign_T *sp;
+-
+- sp = sign_find(name, NULL);
+- if (sp != NULL)
+- sign_list_defined(sp);
+- else
+- EMSG2(_("E155: Unknown sign: %s"), name);
+- }
+-
+- /*
+- * Place a sign at the specifed file location or update a sign.
+- */
+- int
+- sign_place(
+- int *sign_id,
+- char_u *sign_group,
+- char_u *sign_name,
+- buf_T *buf,
+- linenr_T lnum,
+- int prio)
+- {
+- sign_T *sp;
+-
+- // Check for reserved character '*' in group name
+- if (sign_group != NULL && (*sign_group == '*' || *sign_group == '\0'))
+- return FAIL;
+-
+- for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+- if (STRCMP(sp->sn_name, sign_name) == 0)
+- break;
+- if (sp == NULL)
+- {
+- EMSG2(_("E155: Unknown sign: %s"), sign_name);
+- return FAIL;
+- }
+- if (*sign_id == 0)
+- *sign_id = sign_group_get_next_signid(buf, sign_group);
+-
+- if (lnum > 0)
+- // ":sign place {id} line={lnum} name={name} file={fname}":
+- // place a sign
+- buf_addsign(buf, *sign_id, sign_group, prio, lnum, sp->sn_typenr);
+- else
+- // ":sign place {id} file={fname}": change sign type
+- lnum = buf_change_sign_type(buf, *sign_id, sign_group, sp->sn_typenr);
+- if (lnum > 0)
+- update_debug_sign(buf, lnum);
+- else
+- {
+- EMSG2(_("E885: Not possible to change sign %s"), sign_name);
+- return FAIL;
+- }
+-
+- return OK;
+- }
+-
+- /*
+- * Unplace the specified sign
+- */
+- int
+- sign_unplace(int sign_id, char_u *sign_group, buf_T *buf, linenr_T atlnum)
+- {
+- if (buf->b_signlist == NULL) // No signs in the buffer
+- return OK;
+-
+- if (sign_id == 0)
+- {
+- // Delete all the signs in the specified buffer
+- redraw_buf_later(buf, NOT_VALID);
+- buf_delete_signs(buf, sign_group);
+- }
+- else
+- {
+- linenr_T lnum;
+-
+- // Delete only the specified signs
+- lnum = buf_delsign(buf, atlnum, sign_id, sign_group);
+- if (lnum == 0)
+- return FAIL;
+- }
+-
+- return OK;
+- }
+-
+- /*
+- * Unplace the sign at the current cursor line.
+- */
+- static void
+- sign_unplace_at_cursor(char_u *groupname)
+- {
+- int id = -1;
+-
+- id = buf_findsign_id(curwin->w_buffer, curwin->w_cursor.lnum, groupname);
+- if (id > 0)
+- sign_unplace(id, groupname, curwin->w_buffer, curwin->w_cursor.lnum);
+- else
+- EMSG(_("E159: Missing sign number"));
+- }
+-
+- /*
+- * sign define command
+- * ":sign define {name} ..."
+- */
+- static void
+- sign_define_cmd(char_u *sign_name, char_u *cmdline)
+- {
+- char_u *arg;
+- char_u *p = cmdline;
+- char_u *icon = NULL;
+- char_u *text = NULL;
+- char_u *linehl = NULL;
+- char_u *texthl = NULL;
+- int failed = FALSE;
+-
+- // set values for a defined sign.
+- for (;;)
+- {
+- arg = skipwhite(p);
+- if (*arg == NUL)
+- break;
+- p = skiptowhite_esc(arg);
+- if (STRNCMP(arg, "icon=", 5) == 0)
+- {
+- arg += 5;
+- icon = vim_strnsave(arg, (int)(p - arg));
+- }
+- else if (STRNCMP(arg, "text=", 5) == 0)
+- {
+- arg += 5;
+- text = vim_strnsave(arg, (int)(p - arg));
+- }
+- else if (STRNCMP(arg, "linehl=", 7) == 0)
+- {
+- arg += 7;
+- linehl = vim_strnsave(arg, (int)(p - arg));
+- }
+- else if (STRNCMP(arg, "texthl=", 7) == 0)
+- {
+- arg += 7;
+- texthl = vim_strnsave(arg, (int)(p - arg));
+- }
+- else
+- {
+- EMSG2(_(e_invarg2), arg);
+- failed = TRUE;
+- break;
+- }
+- }
+-
+- if (!failed)
+- sign_define_by_name(sign_name, icon, linehl, text, texthl);
+-
+- vim_free(icon);
+- vim_free(text);
+- vim_free(linehl);
+- vim_free(texthl);
+- }
+-
+- /*
+- * :sign place command
+- */
+- static void
+- sign_place_cmd(
+- buf_T *buf,
+- linenr_T lnum,
+- char_u *sign_name,
+- int id,
+- char_u *group,
+- int prio)
+- {
+- if (id <= 0)
+- {
+- // List signs placed in a file/buffer
+- // :sign place file={fname}
+- // :sign place group={group} file={fname}
+- // :sign place group=* file={fname}
+- // :sign place buffer={nr}
+- // :sign place group={group} buffer={nr}
+- // :sign place group=* buffer={nr}
+- // :sign place
+- // :sign place group={group}
+- // :sign place group=*
+- if (lnum >= 0 || sign_name != NULL ||
+- (group != NULL && *group == '\0'))
+- EMSG(_(e_invarg));
+- else
+- sign_list_placed(buf, group);
+- }
+- else
+- {
+- // Place a new sign
+- if (sign_name == NULL || buf == NULL ||
+- (group != NULL && *group == '\0'))
+- {
+- EMSG(_(e_invarg));
+- return;
+- }
+-
+- sign_place(&id, group, sign_name, buf, lnum, prio);
+- }
+- }
+-
+- /*
+- * :sign unplace command
+- */
+- static void
+- sign_unplace_cmd(
+- buf_T *buf,
+- linenr_T lnum,
+- char_u *sign_name,
+- int id,
+- char_u *group)
+- {
+- if (lnum >= 0 || sign_name != NULL || (group != NULL && *group == '\0'))
+- {
+- EMSG(_(e_invarg));
+- return;
+- }
+-
+- if (id == -2)
+- {
+- if (buf != NULL)
+- // :sign unplace * file={fname}
+- // :sign unplace * group={group} file={fname}
+- // :sign unplace * group=* file={fname}
+- // :sign unplace * buffer={nr}
+- // :sign unplace * group={group} buffer={nr}
+- // :sign unplace * group=* buffer={nr}
+- sign_unplace(0, group, buf, 0);
+- else
+- // :sign unplace *
+- // :sign unplace * group={group}
+- // :sign unplace * group=*
+- FOR_ALL_BUFFERS(buf)
+- if (buf->b_signlist != NULL)
+- buf_delete_signs(buf, group);
+- }
+- else
+- {
+- if (buf != NULL)
+- // :sign unplace {id} file={fname}
+- // :sign unplace {id} group={group} file={fname}
+- // :sign unplace {id} group=* file={fname}
+- // :sign unplace {id} buffer={nr}
+- // :sign unplace {id} group={group} buffer={nr}
+- // :sign unplace {id} group=* buffer={nr}
+- sign_unplace(id, group, buf, 0);
+- else
+- {
+- if (id == -1)
+- {
+- // :sign unplace group={group}
+- // :sign unplace group=*
+- sign_unplace_at_cursor(group);
+- }
+- else
+- {
+- // :sign unplace {id}
+- // :sign unplace {id} group={group}
+- // :sign unplace {id} group=*
+- FOR_ALL_BUFFERS(buf)
+- sign_unplace(id, group, buf, 0);
+- }
+- }
+- }
+- }
+-
+- /*
+- * Jump to a placed sign
+- * :sign jump {id} file={fname}
+- * :sign jump {id} buffer={nr}
+- * :sign jump {id} group={group} file={fname}
+- * :sign jump {id} group={group} buffer={nr}
+- */
+- static void
+- sign_jump_cmd(
+- buf_T *buf,
+- linenr_T lnum,
+- char_u *sign_name,
+- int id,
+- char_u *group)
+- {
+- if (buf == NULL && sign_name == NULL && group == NULL && id == -1)
+- {
+- EMSG(_(e_argreq));
+- return;
+- }
+-
+- if (buf == NULL || (group != NULL && *group == '\0') ||
+- lnum >= 0 || sign_name != NULL)
+- {
+- // File or buffer is not specified or an empty group is used
+- // or a line number or a sign name is specified.
+- EMSG(_(e_invarg));
+- return;
+- }
+-
+- if ((lnum = buf_findsign(buf, id, group)) <= 0)
+- {
+- EMSGN(_("E157: Invalid sign ID: %ld"), id);
+- return;
+- }
+-
+- // goto a sign ...
+- if (buf_jump_open_win(buf) != NULL)
+- { // ... in a current window
+- curwin->w_cursor.lnum = lnum;
+- check_cursor_lnum();
+- beginline(BL_WHITE);
+- }
+- else
+- { // ... not currently in a window
+- char_u *cmd;
+-
+- if (buf->b_fname == NULL)
+- {
+- EMSG(_("E934: Cannot jump to a buffer that does not have a name"));
+- return;
+- }
+- cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
+- if (cmd == NULL)
+- return;
+- sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname);
+- do_cmdline_cmd(cmd);
+- vim_free(cmd);
+- }
+- # ifdef FEAT_FOLDING
+- foldOpenCursor();
+- # endif
+- }
+-
+- /*
+- * Parse the command line arguments for the ":sign place", ":sign unplace" and
+- * ":sign jump" commands.
+- * The supported arguments are: line={lnum} name={name} group={group}
+- * priority={prio} and file={fname} or buffer={nr}.
+- */
+- static int
+- parse_sign_cmd_args(
+- int cmd,
+- char_u *arg,
+- char_u **sign_name,
+- int *signid,
+- char_u **group,
+- int *prio,
+- buf_T **buf,
+- linenr_T *lnum)
+- {
+- char_u *arg1;
+- char_u *name;
+- char_u *filename = NULL;
+-
+- // first arg could be placed sign id
+- arg1 = arg;
+- if (VIM_ISDIGIT(*arg))
+- {
+- *signid = getdigits(&arg);
+- if (!VIM_ISWHITE(*arg) && *arg != NUL)
+- {
+- *signid = -1;
+- arg = arg1;
+- }
+- else
+- arg = skipwhite(arg);
+- }
+-
+- while (*arg != NUL)
+- {
+- if (STRNCMP(arg, "line=", 5) == 0)
+- {
+- arg += 5;
+- *lnum = atoi((char *)arg);
+- arg = skiptowhite(arg);
+- }
+- else if (STRNCMP(arg, "*", 1) == 0 && cmd == SIGNCMD_UNPLACE)
+- {
+- if (*signid != -1)
+- {
+- EMSG(_(e_invarg));
+- return FAIL;
+- }
+- *signid = -2;
+- arg = skiptowhite(arg + 1);
+- }
+- else if (STRNCMP(arg, "name=", 5) == 0)
+- {
+- arg += 5;
+- name = arg;
+- arg = skiptowhite(arg);
+- if (*arg != NUL)
+- *arg++ = NUL;
+- while (name[0] == '0' && name[1] != NUL)
+- ++name;
+- *sign_name = name;
+- }
+- else if (STRNCMP(arg, "group=", 6) == 0)
+- {
+- arg += 6;
+- *group = arg;
+- arg = skiptowhite(arg);
+- if (*arg != NUL)
+- *arg++ = NUL;
+- }
+- else if (STRNCMP(arg, "priority=", 9) == 0)
+- {
+- arg += 9;
+- *prio = atoi((char *)arg);
+- arg = skiptowhite(arg);
+- }
+- else if (STRNCMP(arg, "file=", 5) == 0)
+- {
+- arg += 5;
+- filename = arg;
+- *buf = buflist_findname_exp(arg);
+- break;
+- }
+- else if (STRNCMP(arg, "buffer=", 7) == 0)
+- {
+- arg += 7;
+- filename = arg;
+- *buf = buflist_findnr((int)getdigits(&arg));
+- if (*skipwhite(arg) != NUL)
+- EMSG(_(e_trailing));
+- break;
+- }
+- else
+- {
+- EMSG(_(e_invarg));
+- return FAIL;
+- }
+- arg = skipwhite(arg);
+- }
+-
+- if (filename != NULL && *buf == NULL)
+- {
+- EMSG2(_("E158: Invalid buffer name: %s"), filename);
+- return FAIL;
+- }
+-
+- return OK;
+- }
+-
+- /*
+- * ":sign" command
+- */
+- void
+- ex_sign(exarg_T *eap)
+- {
+- char_u *arg = eap->arg;
+- char_u *p;
+- int idx;
+- sign_T *sp;
+- buf_T *buf = NULL;
+-
+- // Parse the subcommand.
+- p = skiptowhite(arg);
+- idx = sign_cmd_idx(arg, p);
+- if (idx == SIGNCMD_LAST)
+- {
+- EMSG2(_("E160: Unknown sign command: %s"), arg);
+- return;
+- }
+- arg = skipwhite(p);
+-
+- if (idx <= SIGNCMD_LIST)
+- {
+- // Define, undefine or list signs.
+- if (idx == SIGNCMD_LIST && *arg == NUL)
+- {
+- // ":sign list": list all defined signs
+- for (sp = first_sign; sp != NULL && !got_int; sp = sp->sn_next)
+- sign_list_defined(sp);
+- }
+- else if (*arg == NUL)
+- EMSG(_("E156: Missing sign name"));
+- else
+- {
+- char_u *name;
+-
+- // Isolate the sign name. If it's a number skip leading zeroes,
+- // so that "099" and "99" are the same sign. But keep "0".
+- p = skiptowhite(arg);
+- if (*p != NUL)
+- *p++ = NUL;
+- while (arg[0] == '0' && arg[1] != NUL)
+- ++arg;
+- name = vim_strsave(arg);
+-
+- if (idx == SIGNCMD_DEFINE)
+- sign_define_cmd(name, p);
+- else if (idx == SIGNCMD_LIST)
+- // ":sign list {name}"
+- sign_list_by_name(name);
+- else
+- // ":sign undefine {name}"
+- sign_undefine_by_name(name);
+-
+- vim_free(name);
+- return;
+- }
+- }
+- else
+- {
+- int id = -1;
+- linenr_T lnum = -1;
+- char_u *sign_name = NULL;
+- char_u *group = NULL;
+- int prio = SIGN_DEF_PRIO;
+-
+- // Parse command line arguments
+- if (parse_sign_cmd_args(idx, arg, &sign_name, &id, &group, &prio,
+- &buf, &lnum) == FAIL)
+- return;
+-
+- if (idx == SIGNCMD_PLACE)
+- sign_place_cmd(buf, lnum, sign_name, id, group, prio);
+- else if (idx == SIGNCMD_UNPLACE)
+- sign_unplace_cmd(buf, lnum, sign_name, id, group);
+- else if (idx == SIGNCMD_JUMP)
+- sign_jump_cmd(buf, lnum, sign_name, id, group);
+- }
+- }
+-
+- /*
+- * Return information about a specified sign
+- */
+- static void
+- sign_getinfo(sign_T *sp, dict_T *retdict)
+- {
+- char_u *p;
+-
+- dict_add_string(retdict, "name", (char_u *)sp->sn_name);
+- if (sp->sn_icon != NULL)
+- dict_add_string(retdict, "icon", (char_u *)sp->sn_icon);
+- if (sp->sn_text != NULL)
+- dict_add_string(retdict, "text", (char_u *)sp->sn_text);
+- if (sp->sn_line_hl > 0)
+- {
+- p = get_highlight_name_ext(NULL, sp->sn_line_hl - 1, FALSE);
+- if (p == NULL)
+- p = (char_u *)"NONE";
+- dict_add_string(retdict, "linehl", (char_u *)p);
+- }
+- if (sp->sn_text_hl > 0)
+- {
+- p = get_highlight_name_ext(NULL, sp->sn_text_hl - 1, FALSE);
+- if (p == NULL)
+- p = (char_u *)"NONE";
+- dict_add_string(retdict, "texthl", (char_u *)p);
+- }
+- }
+-
+- /*
+- * If 'name' is NULL, return a list of all the defined signs.
+- * Otherwise, return information about the specified sign.
+- */
+- void
+- sign_getlist(char_u *name, list_T *retlist)
+- {
+- sign_T *sp = first_sign;
+- dict_T *dict;
+-
+- if (name != NULL)
+- {
+- sp = sign_find(name, NULL);
+- if (sp == NULL)
+- return;
+- }
+-
+- for (; sp != NULL && !got_int; sp = sp->sn_next)
+- {
+- if ((dict = dict_alloc_id(aid_sign_getlist)) == NULL)
+- return;
+- if (list_append_dict(retlist, dict) == FAIL)
+- return;
+- sign_getinfo(sp, dict);
+-
+- if (name != NULL) // handle only the specified sign
+- break;
+- }
+- }
+-
+- /*
+- * Return information about all the signs placed in a buffer
+- */
+- static void
+- sign_get_placed_in_buf(
+- buf_T *buf,
+- linenr_T lnum,
+- int sign_id,
+- char_u *sign_group,
+- list_T *retlist)
+- {
+- dict_T *d;
+- list_T *l;
+- signlist_T *sign;
+- dict_T *sdict;
+-
+- if ((d = dict_alloc_id(aid_sign_getplaced_dict)) == NULL)
+- return;
+- list_append_dict(retlist, d);
+-
+- dict_add_number(d, "bufnr", (long)buf->b_fnum);
+-
+- if ((l = list_alloc_id(aid_sign_getplaced_list)) == NULL)
+- return;
+- dict_add_list(d, "signs", l);
+-
+- FOR_ALL_SIGNS_IN_BUF(buf, sign)
+- {
+- if (!sign_in_group(sign, sign_group))
+- continue;
+- if ((lnum == 0 && sign_id == 0) ||
+- (sign_id == 0 && lnum == sign->lnum) ||
+- (lnum == 0 && sign_id == sign->id) ||
+- (lnum == sign->lnum && sign_id == sign->id))
+- {
+- if ((sdict = sign_get_info(sign)) != NULL)
+- list_append_dict(l, sdict);
+- }
+- }
+- }
+-
+- /*
+- * Get a list of signs placed in buffer 'buf'. If 'num' is non-zero, return the
+- * sign placed at the line number. If 'lnum' is zero, return all the signs
+- * placed in 'buf'. If 'buf' is NULL, return signs placed in all the buffers.
+- */
+- void
+- sign_get_placed(
+- buf_T *buf,
+- linenr_T lnum,
+- int sign_id,
+- char_u *sign_group,
+- list_T *retlist)
+- {
+- if (buf != NULL)
+- sign_get_placed_in_buf(buf, lnum, sign_id, sign_group, retlist);
+- else
+- {
+- FOR_ALL_BUFFERS(buf)
+- {
+- if (buf->b_signlist != NULL)
+- sign_get_placed_in_buf(buf, 0, sign_id, sign_group, retlist);
+- }
+- }
+- }
+-
+- # if defined(FEAT_SIGN_ICONS) || defined(PROTO)
+- /*
+- * Allocate the icons. Called when the GUI has started. Allows defining
+- * signs before it starts.
+- */
+- void
+- sign_gui_started(void)
+- {
+- sign_T *sp;
+-
+- for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+- if (sp->sn_icon != NULL)
+- sp->sn_image = gui_mch_register_sign(sp->sn_icon);
+- }
+- # endif
+-
+- /*
+- * List one sign.
+- */
+- static void
+- sign_list_defined(sign_T *sp)
+- {
+- char_u *p;
+-
+- smsg((char_u *)"sign %s", sp->sn_name);
+- if (sp->sn_icon != NULL)
+- {
+- MSG_PUTS(" icon=");
+- msg_outtrans(sp->sn_icon);
+- # ifdef FEAT_SIGN_ICONS
+- if (sp->sn_image == NULL)
+- MSG_PUTS(_(" (NOT FOUND)"));
+- # else
+- MSG_PUTS(_(" (not supported)"));
+- # endif
+- }
+- if (sp->sn_text != NULL)
+- {
+- MSG_PUTS(" text=");
+- msg_outtrans(sp->sn_text);
+- }
+- if (sp->sn_line_hl > 0)
+- {
+- MSG_PUTS(" linehl=");
+- p = get_highlight_name_ext(NULL, sp->sn_line_hl - 1, FALSE);
+- if (p == NULL)
+- MSG_PUTS("NONE");
+- else
+- msg_puts(p);
+- }
+- if (sp->sn_text_hl > 0)
+- {
+- MSG_PUTS(" texthl=");
+- p = get_highlight_name_ext(NULL, sp->sn_text_hl - 1, FALSE);
+- if (p == NULL)
+- MSG_PUTS("NONE");
+- else
+- msg_puts(p);
+- }
+- }
+-
+- /*
+- * Undefine a sign and free its memory.
+- */
+- static void
+- sign_undefine(sign_T *sp, sign_T *sp_prev)
+- {
+- vim_free(sp->sn_name);
+- vim_free(sp->sn_icon);
+- # ifdef FEAT_SIGN_ICONS
+- if (sp->sn_image != NULL)
+- {
+- out_flush();
+- gui_mch_destroy_sign(sp->sn_image);
+- }
+- # endif
+- vim_free(sp->sn_text);
+- if (sp_prev == NULL)
+- first_sign = sp->sn_next;
+- else
+- sp_prev->sn_next = sp->sn_next;
+- vim_free(sp);
+- }
+-
+- /*
+- * Get highlighting attribute for sign "typenr".
+- * If "line" is TRUE: line highl, if FALSE: text highl.
+- */
+- int
+- sign_get_attr(int typenr, int line)
+- {
+- sign_T *sp;
+-
+- for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+- if (sp->sn_typenr == typenr)
+- {
+- if (line)
+- {
+- if (sp->sn_line_hl > 0)
+- return syn_id2attr(sp->sn_line_hl);
+- }
+- else
+- {
+- if (sp->sn_text_hl > 0)
+- return syn_id2attr(sp->sn_text_hl);
+- }
+- break;
+- }
+- return 0;
+- }
+-
+- /*
+- * Get text mark for sign "typenr".
+- * Returns NULL if there isn't one.
+- */
+- char_u *
+- sign_get_text(int typenr)
+- {
+- sign_T *sp;
+-
+- for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+- if (sp->sn_typenr == typenr)
+- return sp->sn_text;
+- return NULL;
+- }
+-
+- # if defined(FEAT_SIGN_ICONS) || defined(PROTO)
+- void *
+- sign_get_image(
+- int typenr) /* the attribute which may have a sign */
+- {
+- sign_T *sp;
+-
+- for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+- if (sp->sn_typenr == typenr)
+- return sp->sn_image;
+- return NULL;
+- }
+- # endif
+-
+- /*
+- * Get the name of a sign by its typenr.
+- */
+- char_u *
+- sign_typenr2name(int typenr)
+- {
+- sign_T *sp;
+-
+- for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+- if (sp->sn_typenr == typenr)
+- return sp->sn_name;
+- return (char_u *)_("[Deleted]");
+- }
+-
+- /*
+- * Undefine/free all signs.
+- */
+- void
+- free_signs(void)
+- {
+- while (first_sign != NULL)
+- sign_undefine(first_sign, NULL);
+- }
+-
+- # if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+- static enum
+- {
+- EXP_SUBCMD, /* expand :sign sub-commands */
+- EXP_DEFINE, /* expand :sign define {name} args */
+- EXP_PLACE, /* expand :sign place {id} args */
+- EXP_UNPLACE, /* expand :sign unplace" */
+- EXP_SIGN_NAMES /* expand with name of placed signs */
+- } expand_what;
+-
+- /*
+- * Function given to ExpandGeneric() to obtain the sign command
+- * expansion.
+- */
+- char_u *
+- get_sign_name(expand_T *xp UNUSED, int idx)
+- {
+- sign_T *sp;
+- int current_idx;
+-
+- switch (expand_what)
+- {
+- case EXP_SUBCMD:
+- return (char_u *)cmds[idx];
+- case EXP_DEFINE:
+- {
+- char *define_arg[] =
+- {
+- "icon=", "linehl=", "text=", "texthl=", NULL
+- };
+- return (char_u *)define_arg[idx];
+- }
+- case EXP_PLACE:
+- {
+- char *place_arg[] =
+- {
+- "line=", "name=", "group=", "priority=", "file=",
+- "buffer=", NULL
+- };
+- return (char_u *)place_arg[idx];
+- }
+- case EXP_UNPLACE:
+- {
+- char *unplace_arg[] = { "group=", "file=", "buffer=", NULL };
+- return (char_u *)unplace_arg[idx];
+- }
+- case EXP_SIGN_NAMES:
+- /* Complete with name of signs already defined */
+- current_idx = 0;
+- for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+- if (current_idx++ == idx)
+- return sp->sn_name;
+- return NULL;
+- default:
+- return NULL;
+- }
+- }
+-
+- /*
+- * Handle command line completion for :sign command.
+- */
+- void
+- set_context_in_sign_cmd(expand_T *xp, char_u *arg)
+- {
+- char_u *p;
+- char_u *end_subcmd;
+- char_u *last;
+- int cmd_idx;
+- char_u *begin_subcmd_args;
+-
+- /* Default: expand subcommands. */
+- xp->xp_context = EXPAND_SIGN;
+- expand_what = EXP_SUBCMD;
+- xp->xp_pattern = arg;
+-
+- end_subcmd = skiptowhite(arg);
+- if (*end_subcmd == NUL)
+- /* expand subcmd name
+- * :sign {subcmd}<CTRL-D>*/
+- return;
+-
+- cmd_idx = sign_cmd_idx(arg, end_subcmd);
+-
+- /* :sign {subcmd} {subcmd_args}
+- * |
+- * begin_subcmd_args */
+- begin_subcmd_args = skipwhite(end_subcmd);
+- p = skiptowhite(begin_subcmd_args);
+- if (*p == NUL)
+- {
+- /*
+- * Expand first argument of subcmd when possible.
+- * For ":jump {id}" and ":unplace {id}", we could
+- * possibly expand the ids of all signs already placed.
+- */
+- xp->xp_pattern = begin_subcmd_args;
+- switch (cmd_idx)
+- {
+- case SIGNCMD_LIST:
+- case SIGNCMD_UNDEFINE:
+- /* :sign list <CTRL-D>
+- * :sign undefine <CTRL-D> */
+- expand_what = EXP_SIGN_NAMES;
+- break;
+- default:
+- xp->xp_context = EXPAND_NOTHING;
+- }
+- return;
+- }
+-
+- /* expand last argument of subcmd */
+-
+- /* :sign define {name} {args}...
+- * |
+- * p */
+-
+- /* Loop until reaching last argument. */
+- do
+- {
+- p = skipwhite(p);
+- last = p;
+- p = skiptowhite(p);
+- } while (*p != NUL);
+-
+- p = vim_strchr(last, '=');
+-
+- /* :sign define {name} {args}... {last}=
+- * | |
+- * last p */
+- if (p == NULL)
+- {
+- /* Expand last argument name (before equal sign). */
+- xp->xp_pattern = last;
+- switch (cmd_idx)
+- {
+- case SIGNCMD_DEFINE:
+- expand_what = EXP_DEFINE;
+- break;
+- case SIGNCMD_PLACE:
+- expand_what = EXP_PLACE;
+- break;
+- case SIGNCMD_JUMP:
+- case SIGNCMD_UNPLACE:
+- expand_what = EXP_UNPLACE;
+- break;
+- default:
+- xp->xp_context = EXPAND_NOTHING;
+- }
+- }
+- else
+- {
+- /* Expand last argument value (after equal sign). */
+- xp->xp_pattern = p + 1;
+- switch (cmd_idx)
+- {
+- case SIGNCMD_DEFINE:
+- if (STRNCMP(last, "texthl", p - last) == 0 ||
+- STRNCMP(last, "linehl", p - last) == 0)
+- xp->xp_context = EXPAND_HIGHLIGHT;
+- else if (STRNCMP(last, "icon", p - last) == 0)
+- xp->xp_context = EXPAND_FILES;
+- else
+- xp->xp_context = EXPAND_NOTHING;
+- break;
+- case SIGNCMD_PLACE:
+- if (STRNCMP(last, "name", p - last) == 0)
+- expand_what = EXP_SIGN_NAMES;
+- else
+- xp->xp_context = EXPAND_NOTHING;
+- break;
+- default:
+- xp->xp_context = EXPAND_NOTHING;
+- }
+- }
+- }
+- # endif
+- #endif
+-
+ /*
+ * Make the user happy.
+ */
+--- 7579,7584 ----
+*** ../vim-8.1.0672/src/proto.h 2018-12-13 22:17:52.877941474 +0100
+--- src/proto.h 2019-01-01 12:47:49.517502724 +0100
+***************
+*** 172,177 ****
+--- 172,180 ----
+ # include "sha256.pro"
+ # endif
+ # include "search.pro"
++ # ifdef FEAT_SIGNS
++ # include "sign.pro"
++ # endif
+ # include "spell.pro"
+ # include "spellfile.pro"
+ # include "syntax.pro"
+*** ../vim-8.1.0672/src/proto/buffer.pro 2018-12-29 18:53:07.843607433 +0100
+--- src/proto/buffer.pro 2019-01-01 13:07:45.075144726 +0100
+***************
+*** 69,91 ****
+ void switch_to_win_for_buf(buf_T *buf, win_T **save_curwinp, tabpage_T **save_curtabp, bufref_T *save_curbuf);
+ void restore_win_for_buf(win_T *save_curwin, tabpage_T *save_curtab, bufref_T *save_curbuf);
+ int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
+- void init_signs(void);
+- int sign_group_get_next_signid(buf_T *buf, char_u *groupname);
+- int sign_in_group(signlist_T *sign, char_u *group);
+- dict_T *sign_get_info(signlist_T *sign);
+- void buf_addsign(buf_T *buf, int id, char_u *groupname, int prio, linenr_T lnum, int typenr);
+- linenr_T buf_change_sign_type(buf_T *buf, int markId, char_u *group, int typenr);
+- int buf_getsigntype(buf_T *buf, linenr_T lnum, int type);
+- linenr_T buf_delsign(buf_T *buf, linenr_T atlnum, int id, char_u *group);
+- int buf_findsign(buf_T *buf, int id, char_u *group);
+- signlist_T *buf_getsign_with_id(buf_T *buf, int id, char_u *group);
+- int buf_findsign_id(buf_T *buf, linenr_T lnum, char_u *groupname);
+- int buf_findsigntype_id(buf_T *buf, linenr_T lnum, int typenr);
+- int buf_signcount(buf_T *buf, linenr_T lnum);
+- void buf_delete_signs(buf_T *buf, char_u *group);
+- void buf_delete_all_signs(char_u *groupname);
+- void sign_list_placed(buf_T *rbuf, char_u *sign_group);
+- void sign_mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_after);
+ void set_buflisted(int on);
+ int buf_contents_changed(buf_T *buf);
+ void wipe_buffer(buf_T *buf, int aucmd);
+--- 69,74 ----
+*** ../vim-8.1.0672/src/proto/ex_cmds.pro 2018-12-29 18:53:07.843607433 +0100
+--- src/proto/ex_cmds.pro 2019-01-01 12:47:49.517502724 +0100
+***************
+*** 54,74 ****
+ void ex_exusage(exarg_T *eap);
+ void ex_viusage(exarg_T *eap);
+ void ex_helptags(exarg_T *eap);
+- int sign_define_by_name(char_u *name, char_u *icon, char_u *linehl, char_u *text, char_u *texthl);
+- int sign_undefine_by_name(char_u *name);
+- int sign_place(int *sign_id, char_u *sign_group, char_u *sign_name, buf_T *buf, linenr_T lnum, int prio);
+- int sign_unplace(int sign_id, char_u *sign_group, buf_T *buf, linenr_T atlnum);
+- void ex_sign(exarg_T *eap);
+- void sign_getlist(char_u *name, list_T *retlist);
+- void sign_get_placed(buf_T *buf, linenr_T lnum, int sign_id, char_u *sign_group, list_T *retlist);
+- void sign_gui_started(void);
+- int sign_get_attr(int typenr, int line);
+- char_u *sign_get_text(int typenr);
+- void *sign_get_image(int typenr);
+- char_u *sign_typenr2name(int typenr);
+- void free_signs(void);
+- char_u *get_sign_name(expand_T *xp, int idx);
+- void set_context_in_sign_cmd(expand_T *xp, char_u *arg);
+ void ex_smile(exarg_T *eap);
+ void ex_drop(exarg_T *eap);
+ char_u *skip_vimgrep_pat(char_u *p, char_u **s, int *flags);
+--- 54,59 ----
+*** ../vim-8.1.0672/src/proto/sign.pro 2019-01-01 13:18:57.745301984 +0100
+--- src/proto/sign.pro 2019-01-01 12:47:49.517502724 +0100
+***************
+*** 0 ****
+--- 1,25 ----
++ /* sign.c */
++ void init_signs(void);
++ int buf_getsigntype(buf_T *buf, linenr_T lnum, int type);
++ linenr_T buf_delsign(buf_T *buf, linenr_T atlnum, int id, char_u *group);
++ int buf_findsign(buf_T *buf, int id, char_u *group);
++ int buf_findsign_id(buf_T *buf, linenr_T lnum, char_u *groupname);
++ int buf_findsigntype_id(buf_T *buf, linenr_T lnum, int typenr);
++ int buf_signcount(buf_T *buf, linenr_T lnum);
++ void buf_delete_signs(buf_T *buf, char_u *group);
++ void sign_mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_after);
++ int sign_define_by_name(char_u *name, char_u *icon, char_u *linehl, char_u *text, char_u *texthl);
++ int sign_undefine_by_name(char_u *name);
++ int sign_place(int *sign_id, char_u *sign_group, char_u *sign_name, buf_T *buf, linenr_T lnum, int prio);
++ int sign_unplace(int sign_id, char_u *sign_group, buf_T *buf, linenr_T atlnum);
++ void ex_sign(exarg_T *eap);
++ void sign_getlist(char_u *name, list_T *retlist);
++ void get_buffer_signs(buf_T *buf, list_T *l);
++ void sign_get_placed(buf_T *buf, linenr_T lnum, int sign_id, char_u *sign_group, list_T *retlist);
++ void sign_gui_started(void);
++ int sign_get_attr(int typenr, int line);
++ char_u *sign_get_text(int typenr);
++ void *sign_get_image(int typenr);
++ void free_signs(void);
++ char_u *get_sign_name(expand_T *xp, int idx);
++ void set_context_in_sign_cmd(expand_T *xp, char_u *arg);
+*** ../vim-8.1.0672/src/sign.c 2019-01-01 13:18:57.749301949 +0100
+--- src/sign.c 2019-01-01 12:47:49.517502724 +0100
+***************
+*** 0 ****
+--- 1,1880 ----
++ /* 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.
++ */
++
++ /*
++ * sign.c: functions for managing signs
++ */
++
++ #include "vim.h"
++
++ #if defined(FEAT_SIGNS) || defined(PROTO)
++
++ /*
++ * Struct to hold the sign properties.
++ */
++ typedef struct sign sign_T;
++
++ struct sign
++ {
++ sign_T *sn_next; /* next sign in list */
++ int sn_typenr; /* type number of sign */
++ char_u *sn_name; /* name of sign */
++ char_u *sn_icon; /* name of pixmap */
++ # ifdef FEAT_SIGN_ICONS
++ void *sn_image; /* icon image */
++ # endif
++ char_u *sn_text; /* text used instead of pixmap */
++ int sn_line_hl; /* highlight ID for line */
++ int sn_text_hl; /* highlight ID for text */
++ };
++
++ static sign_T *first_sign = NULL;
++ static int next_sign_typenr = 1;
++
++ static void sign_list_defined(sign_T *sp);
++ static void sign_undefine(sign_T *sp, sign_T *sp_prev);
++
++ static char *cmds[] = {
++ "define",
++ # define SIGNCMD_DEFINE 0
++ "undefine",
++ # define SIGNCMD_UNDEFINE 1
++ "list",
++ # define SIGNCMD_LIST 2
++ "place",
++ # define SIGNCMD_PLACE 3
++ "unplace",
++ # define SIGNCMD_UNPLACE 4
++ "jump",
++ # define SIGNCMD_JUMP 5
++ NULL
++ # define SIGNCMD_LAST 6
++ };
++
++ static hashtab_T sg_table; // sign group (signgroup_T) hashtable
++ static int next_sign_id = 1; // next sign id in the global group
++
++ /*
++ * Initialize data needed for managing signs
++ */
++ void
++ init_signs(void)
++ {
++ hash_init(&sg_table); // sign group hash table
++ }
++
++ /*
++ * A new sign in group 'groupname' is added. If the group is not present,
++ * create it. Otherwise reference the group.
++ */
++ static signgroup_T *
++ sign_group_ref(char_u *groupname)
++ {
++ hash_T hash;
++ hashitem_T *hi;
++ signgroup_T *group;
++
++ hash = hash_hash(groupname);
++ hi = hash_lookup(&sg_table, groupname, hash);
++ if (HASHITEM_EMPTY(hi))
++ {
++ // new group
++ group = (signgroup_T *)alloc(
++ (unsigned)(sizeof(signgroup_T) + STRLEN(groupname)));
++ if (group == NULL)
++ return NULL;
++ STRCPY(group->sg_name, groupname);
++ group->refcount = 1;
++ group->next_sign_id = 1;
++ hash_add_item(&sg_table, hi, group->sg_name, hash);
++ }
++ else
++ {
++ // existing group
++ group = HI2SG(hi);
++ group->refcount++;
++ }
++
++ return group;
++ }
++
++ /*
++ * A sign in group 'groupname' is removed. If all the signs in this group are
++ * removed, then remove the group.
++ */
++ static void
++ sign_group_unref(char_u *groupname)
++ {
++ hashitem_T *hi;
++ signgroup_T *group;
++
++ hi = hash_find(&sg_table, groupname);
++ if (!HASHITEM_EMPTY(hi))
++ {
++ group = HI2SG(hi);
++ group->refcount--;
++ if (group->refcount == 0)
++ {
++ // All the signs in this group are removed
++ hash_remove(&sg_table, hi);
++ vim_free(group);
++ }
++ }
++ }
++
++ /*
++ * Returns TRUE if 'sign' is in 'group'.
++ * A sign can either be in the global group (sign->group == NULL)
++ * or in a named group. If 'group' is '*', then the sign is part of the group.
++ */
++ static int
++ sign_in_group(signlist_T *sign, char_u *group)
++ {
++ return ((group != NULL && STRCMP(group, "*") == 0)
++ || (group == NULL && sign->group == NULL)
++ || (group != NULL && sign->group != NULL
++ && STRCMP(group, sign->group->sg_name) == 0));
++ }
++
++ /*
++ * Get the next free sign identifier in the specified group
++ */
++ static int
++ sign_group_get_next_signid(buf_T *buf, char_u *groupname)
++ {
++ int id = 1;
++ signgroup_T *group = NULL;
++ signlist_T *sign;
++ hashitem_T *hi;
++ int found = FALSE;
++
++ if (groupname != NULL)
++ {
++ hi = hash_find(&sg_table, groupname);
++ if (HASHITEM_EMPTY(hi))
++ return id;
++ group = HI2SG(hi);
++ }
++
++ // Search for the next usuable sign identifier
++ while (!found)
++ {
++ if (group == NULL)
++ id = next_sign_id++; // global group
++ else
++ id = group->next_sign_id++;
++
++ // Check whether this sign is already placed in the buffer
++ found = TRUE;
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ {
++ if (id == sign->id && sign_in_group(sign, groupname))
++ {
++ found = FALSE; // sign identifier is in use
++ break;
++ }
++ }
++ }
++
++ return id;
++ }
++
++ /*
++ * Insert a new sign into the signlist for buffer 'buf' between the 'prev' and
++ * 'next' signs.
++ */
++ static void
++ insert_sign(
++ buf_T *buf, // buffer to store sign in
++ signlist_T *prev, // previous sign entry
++ signlist_T *next, // next sign entry
++ int id, // sign ID
++ char_u *group, // sign group; NULL for global group
++ int prio, // sign priority
++ linenr_T lnum, // line number which gets the mark
++ int typenr) // typenr of sign we are adding
++ {
++ signlist_T *newsign;
++
++ newsign = (signlist_T *)lalloc_id((long_u)sizeof(signlist_T), FALSE,
++ aid_insert_sign);
++ if (newsign != NULL)
++ {
++ newsign->id = id;
++ newsign->lnum = lnum;
++ newsign->typenr = typenr;
++ if (group != NULL)
++ {
++ newsign->group = sign_group_ref(group);
++ if (newsign->group == NULL)
++ {
++ vim_free(newsign);
++ return;
++ }
++ }
++ else
++ newsign->group = NULL;
++ newsign->priority = prio;
++ newsign->next = next;
++ newsign->prev = prev;
++ if (next != NULL)
++ next->prev = newsign;
++
++ if (prev == NULL)
++ {
++ // When adding first sign need to redraw the windows to create the
++ // column for signs.
++ if (buf->b_signlist == NULL)
++ {
++ redraw_buf_later(buf, NOT_VALID);
++ changed_cline_bef_curs();
++ }
++
++ // first sign in signlist
++ buf->b_signlist = newsign;
++ #ifdef FEAT_NETBEANS_INTG
++ if (netbeans_active())
++ buf->b_has_sign_column = TRUE;
++ #endif
++ }
++ else
++ prev->next = newsign;
++ }
++ }
++
++ /*
++ * Insert a new sign sorted by line number and sign priority.
++ */
++ static void
++ insert_sign_by_lnum_prio(
++ buf_T *buf, // buffer to store sign in
++ signlist_T *prev, // previous sign entry
++ int id, // sign ID
++ char_u *group, // sign group; NULL for global group
++ int prio, // sign priority
++ linenr_T lnum, // line number which gets the mark
++ int typenr) // typenr of sign we are adding
++ {
++ signlist_T *sign;
++
++ // keep signs sorted by lnum and by priority: insert new sign at
++ // the proper position in the list for this lnum.
++ while (prev != NULL && prev->lnum == lnum && prev->priority <= prio)
++ prev = prev->prev;
++ if (prev == NULL)
++ sign = buf->b_signlist;
++ else
++ sign = prev->next;
++
++ insert_sign(buf, prev, sign, id, group, prio, lnum, typenr);
++ }
++
++ /*
++ * Get the name of a sign by its typenr.
++ */
++ static char_u *
++ sign_typenr2name(int typenr)
++ {
++ sign_T *sp;
++
++ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
++ if (sp->sn_typenr == typenr)
++ return sp->sn_name;
++ return (char_u *)_("[Deleted]");
++ }
++
++ /*
++ * Return information about a sign in a Dict
++ */
++ static dict_T *
++ sign_get_info(signlist_T *sign)
++ {
++ dict_T *d;
++
++ if ((d = dict_alloc_id(aid_sign_getinfo)) == NULL)
++ return NULL;
++ dict_add_number(d, "id", sign->id);
++ dict_add_string(d, "group", (sign->group == NULL) ?
++ (char_u *)"" : sign->group->sg_name);
++ dict_add_number(d, "lnum", sign->lnum);
++ dict_add_string(d, "name", sign_typenr2name(sign->typenr));
++ dict_add_number(d, "priority", sign->priority);
++
++ return d;
++ }
++
++ /*
++ * Add the sign into the signlist. Find the right spot to do it though.
++ */
++ static void
++ buf_addsign(
++ buf_T *buf, // buffer to store sign in
++ int id, // sign ID
++ char_u *groupname, // sign group
++ int prio, // sign priority
++ linenr_T lnum, // line number which gets the mark
++ int typenr) // typenr of sign we are adding
++ {
++ signlist_T *sign; // a sign in the signlist
++ signlist_T *prev; // the previous sign
++
++ prev = NULL;
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ {
++ if (lnum == sign->lnum && id == sign->id &&
++ sign_in_group(sign, groupname))
++ {
++ // Update an existing sign
++ sign->typenr = typenr;
++ return;
++ }
++ else if (lnum < sign->lnum)
++ {
++ insert_sign_by_lnum_prio(buf, prev, id, groupname, prio,
++ lnum, typenr);
++ return;
++ }
++ prev = sign;
++ }
++
++ insert_sign_by_lnum_prio(buf, prev, id, groupname, prio, lnum, typenr);
++ return;
++ }
++
++ /*
++ * For an existing, placed sign "markId" change the type to "typenr".
++ * Returns the line number of the sign, or zero if the sign is not found.
++ */
++ static linenr_T
++ buf_change_sign_type(
++ buf_T *buf, // buffer to store sign in
++ int markId, // sign ID
++ char_u *group, // sign group
++ int typenr) // typenr of sign we are adding
++ {
++ signlist_T *sign; // a sign in the signlist
++
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ {
++ if (sign->id == markId && sign_in_group(sign, group))
++ {
++ sign->typenr = typenr;
++ return sign->lnum;
++ }
++ }
++
++ return (linenr_T)0;
++ }
++
++ /*
++ * Return the type number of the sign at line number 'lnum' in buffer 'buf'
++ * which has the attribute specifed by 'type'. Returns 0 if a sign is not found
++ * at the line number or it doesn't have the specified attribute.
++ */
++ int
++ buf_getsigntype(
++ buf_T *buf,
++ linenr_T lnum,
++ int type) /* SIGN_ICON, SIGN_TEXT, SIGN_ANY, SIGN_LINEHL */
++ {
++ signlist_T *sign; /* a sign in a b_signlist */
++
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ if (sign->lnum == lnum
++ && (type == SIGN_ANY
++ # ifdef FEAT_SIGN_ICONS
++ || (type == SIGN_ICON
++ && sign_get_image(sign->typenr) != NULL)
++ # endif
++ || (type == SIGN_TEXT
++ && sign_get_text(sign->typenr) != NULL)
++ || (type == SIGN_LINEHL
++ && sign_get_attr(sign->typenr, TRUE) != 0)))
++ return sign->typenr;
++ return 0;
++ }
++
++ /*
++ * Delete sign 'id' in group 'group' from buffer 'buf'.
++ * If 'id' is zero, then delete all the signs in group 'group'. Otherwise
++ * delete only the specified sign.
++ * If 'group' is '*', then delete the sign in all the groups. If 'group' is
++ * NULL, then delete the sign in the global group. Otherwise delete the sign in
++ * the specified group.
++ * Returns the line number of the deleted sign. If multiple signs are deleted,
++ * then returns the line number of the last sign deleted.
++ */
++ linenr_T
++ buf_delsign(
++ buf_T *buf, // buffer sign is stored in
++ linenr_T atlnum, // sign at this line, 0 - at any line
++ int id, // sign id
++ char_u *group) // sign group
++ {
++ signlist_T **lastp; // pointer to pointer to current sign
++ signlist_T *sign; // a sign in a b_signlist
++ signlist_T *next; // the next sign in a b_signlist
++ linenr_T lnum; // line number whose sign was deleted
++
++ lastp = &buf->b_signlist;
++ lnum = 0;
++ for (sign = buf->b_signlist; sign != NULL; sign = next)
++ {
++ next = sign->next;
++ if ((id == 0 || sign->id == id) &&
++ (atlnum == 0 || sign->lnum == atlnum) &&
++ sign_in_group(sign, group))
++
++ {
++ *lastp = next;
++ if (next != NULL)
++ next->prev = sign->prev;
++ lnum = sign->lnum;
++ if (sign->group != NULL)
++ sign_group_unref(sign->group->sg_name);
++ vim_free(sign);
++ update_debug_sign(buf, lnum);
++ // Check whether only one sign needs to be deleted
++ // If deleting a sign with a specific identifer in a particular
++ // group or deleting any sign at a particular line number, delete
++ // only one sign.
++ if (group == NULL
++ || (*group != '*' && id != 0)
++ || (*group == '*' && atlnum != 0))
++ break;
++ }
++ else
++ lastp = &sign->next;
++ }
++
++ // When deleted the last sign need to redraw the windows to remove the
++ // sign column.
++ if (buf->b_signlist == NULL)
++ {
++ redraw_buf_later(buf, NOT_VALID);
++ changed_cline_bef_curs();
++ }
++
++ return lnum;
++ }
++
++
++ /*
++ * Find the line number of the sign with the requested id in group 'group'. If
++ * the sign does not exist, return 0 as the line number. This will still let
++ * the correct file get loaded.
++ */
++ int
++ buf_findsign(
++ buf_T *buf, // buffer to store sign in
++ int id, // sign ID
++ char_u *group) // sign group
++ {
++ signlist_T *sign; // a sign in the signlist
++
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ if (sign->id == id && sign_in_group(sign, group))
++ return sign->lnum;
++
++ return 0;
++ }
++
++ /*
++ * Return the sign at line 'lnum' in buffer 'buf'. Returns NULL if a sign is
++ * not found at the line. If 'groupname' is NULL, searches in the global group.
++ */
++ static signlist_T *
++ buf_getsign_at_line(
++ buf_T *buf, // buffer whose sign we are searching for
++ linenr_T lnum, // line number of sign
++ char_u *groupname) // sign group name
++ {
++ signlist_T *sign; // a sign in the signlist
++
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ if (sign->lnum == lnum && sign_in_group(sign, groupname))
++ return sign;
++
++ return NULL;
++ }
++
++ /*
++ * Return the identifier of the sign at line number 'lnum' in buffer 'buf'.
++ */
++ int
++ buf_findsign_id(
++ buf_T *buf, // buffer whose sign we are searching for
++ linenr_T lnum, // line number of sign
++ char_u *groupname) // sign group name
++ {
++ signlist_T *sign; // a sign in the signlist
++
++ sign = buf_getsign_at_line(buf, lnum, groupname);
++ if (sign != NULL)
++ return sign->id;
++
++ return 0;
++ }
++
++ # 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 */
++ linenr_T lnum, /* line number of sign */
++ int typenr) /* sign type number */
++ {
++ signlist_T *sign; /* a sign in the signlist */
++
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ if (sign->lnum == lnum && sign->typenr == typenr)
++ return sign->id;
++
++ return 0;
++ }
++
++
++ # 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)
++ {
++ signlist_T *sign; // a sign in the signlist
++ int count = 0;
++
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ if (sign->lnum == lnum)
++ if (sign_get_image(sign->typenr) != NULL)
++ count++;
++
++ return count;
++ }
++ # endif /* FEAT_SIGN_ICONS */
++ # endif /* FEAT_NETBEANS_INTG */
++
++ /*
++ * Delete signs in group 'group' in buffer "buf". If 'group' is '*', then
++ * delete all the signs.
++ */
++ void
++ buf_delete_signs(buf_T *buf, char_u *group)
++ {
++ signlist_T *sign;
++ signlist_T **lastp; // pointer to pointer to current sign
++ signlist_T *next;
++
++ // When deleting the last sign need to redraw the windows to remove the
++ // sign column. Not when curwin is NULL (this means we're exiting).
++ if (buf->b_signlist != NULL && curwin != NULL)
++ {
++ redraw_buf_later(buf, NOT_VALID);
++ changed_cline_bef_curs();
++ }
++
++ lastp = &buf->b_signlist;
++ for (sign = buf->b_signlist; sign != NULL; sign = next)
++ {
++ next = sign->next;
++ if (sign_in_group(sign, group))
++ {
++ *lastp = next;
++ if (next != NULL)
++ next->prev = sign->prev;
++ if (sign->group != NULL)
++ sign_group_unref(sign->group->sg_name);
++ vim_free(sign);
++ }
++ else
++ lastp = &sign->next;
++ }
++ }
++
++ /*
++ * List placed signs for "rbuf". If "rbuf" is NULL do it for all buffers.
++ */
++ static void
++ sign_list_placed(buf_T *rbuf, char_u *sign_group)
++ {
++ buf_T *buf;
++ signlist_T *sign;
++ char lbuf[BUFSIZ];
++ char group[BUFSIZ];
++
++ MSG_PUTS_TITLE(_("\n--- Signs ---"));
++ msg_putchar('\n');
++ if (rbuf == NULL)
++ buf = firstbuf;
++ else
++ buf = rbuf;
++ while (buf != NULL && !got_int)
++ {
++ if (buf->b_signlist != NULL)
++ {
++ vim_snprintf(lbuf, BUFSIZ, _("Signs for %s:"), buf->b_fname);
++ MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
++ msg_putchar('\n');
++ }
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ {
++ if (got_int)
++ break;
++ if (!sign_in_group(sign, sign_group))
++ continue;
++ if (sign->group != NULL)
++ vim_snprintf(group, BUFSIZ, " group=%s",
++ sign->group->sg_name);
++ else
++ group[0] = '\0';
++ vim_snprintf(lbuf, BUFSIZ, _(" line=%ld id=%d%s name=%s "
++ "priority=%d"),
++ (long)sign->lnum, sign->id, group,
++ sign_typenr2name(sign->typenr), sign->priority);
++ MSG_PUTS(lbuf);
++ msg_putchar('\n');
++ }
++ if (rbuf != NULL)
++ break;
++ buf = buf->b_next;
++ }
++ }
++
++ /*
++ * Adjust a placed sign for inserted/deleted lines.
++ */
++ void
++ sign_mark_adjust(
++ linenr_T line1,
++ linenr_T line2,
++ long amount,
++ long amount_after)
++ {
++ signlist_T *sign; /* a sign in a b_signlist */
++
++ FOR_ALL_SIGNS_IN_BUF(curbuf, sign)
++ {
++ if (sign->lnum >= line1 && sign->lnum <= line2)
++ {
++ if (amount == MAXLNUM)
++ sign->lnum = line1;
++ else
++ sign->lnum += amount;
++ }
++ else if (sign->lnum > line2)
++ sign->lnum += amount_after;
++ }
++ }
++
++ /*
++ * Find index of a ":sign" subcmd from its name.
++ * "*end_cmd" must be writable.
++ */
++ static int
++ sign_cmd_idx(
++ char_u *begin_cmd, /* begin of sign subcmd */
++ char_u *end_cmd) /* just after sign subcmd */
++ {
++ int idx;
++ char save = *end_cmd;
++
++ *end_cmd = NUL;
++ for (idx = 0; ; ++idx)
++ if (cmds[idx] == NULL || STRCMP(begin_cmd, cmds[idx]) == 0)
++ break;
++ *end_cmd = save;
++ return idx;
++ }
++
++ /*
++ * Find a sign by name. Also returns pointer to the previous sign.
++ */
++ static sign_T *
++ sign_find(char_u *name, sign_T **sp_prev)
++ {
++ sign_T *sp;
++
++ if (sp_prev != NULL)
++ *sp_prev = NULL;
++ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
++ {
++ if (STRCMP(sp->sn_name, name) == 0)
++ break;
++ if (sp_prev != NULL)
++ *sp_prev = sp;
++ }
++
++ return sp;
++ }
++
++ /*
++ * Define a new sign or update an existing sign
++ */
++ int
++ sign_define_by_name(
++ char_u *name,
++ char_u *icon,
++ char_u *linehl,
++ char_u *text,
++ char_u *texthl)
++ {
++ sign_T *sp_prev;
++ sign_T *sp;
++
++ sp = sign_find(name, &sp_prev);
++ if (sp == NULL)
++ {
++ sign_T *lp;
++ int start = next_sign_typenr;
++
++ // Allocate a new sign.
++ sp = (sign_T *)alloc_clear_id((unsigned)sizeof(sign_T),
++ aid_sign_define_by_name);
++ if (sp == NULL)
++ return FAIL;
++
++ // Check that next_sign_typenr is not already being used.
++ // This only happens after wrapping around. Hopefully
++ // another one got deleted and we can use its number.
++ for (lp = first_sign; lp != NULL; )
++ {
++ if (lp->sn_typenr == next_sign_typenr)
++ {
++ ++next_sign_typenr;
++ if (next_sign_typenr == MAX_TYPENR)
++ next_sign_typenr = 1;
++ if (next_sign_typenr == start)
++ {
++ vim_free(sp);
++ EMSG(_("E612: Too many signs defined"));
++ return FAIL;
++ }
++ lp = first_sign; // start all over
++ continue;
++ }
++ lp = lp->sn_next;
++ }
++
++ sp->sn_typenr = next_sign_typenr;
++ if (++next_sign_typenr == MAX_TYPENR)
++ next_sign_typenr = 1; // wrap around
++
++ sp->sn_name = vim_strsave(name);
++ if (sp->sn_name == NULL) // out of memory
++ {
++ vim_free(sp);
++ return FAIL;
++ }
++
++ // add the new sign to the list of signs
++ if (sp_prev == NULL)
++ first_sign = sp;
++ else
++ sp_prev->sn_next = sp;
++ }
++
++ // set values for a defined sign.
++ if (icon != NULL)
++ {
++ vim_free(sp->sn_icon);
++ sp->sn_icon = vim_strsave(icon);
++ backslash_halve(sp->sn_icon);
++ # ifdef FEAT_SIGN_ICONS
++ if (gui.in_use)
++ {
++ out_flush();
++ if (sp->sn_image != NULL)
++ gui_mch_destroy_sign(sp->sn_image);
++ sp->sn_image = gui_mch_register_sign(sp->sn_icon);
++ }
++ # endif
++ }
++
++ if (text != NULL)
++ {
++ char_u *s;
++ char_u *endp;
++ int cells;
++ int len;
++
++ endp = text + (int)STRLEN(text);
++ for (s = text; s + 1 < endp; ++s)
++ if (*s == '\\')
++ {
++ // Remove a backslash, so that it is possible
++ // to use a space.
++ STRMOVE(s, s + 1);
++ --endp;
++ }
++ # ifdef FEAT_MBYTE
++ // Count cells and check for non-printable chars
++ if (has_mbyte)
++ {
++ cells = 0;
++ for (s = text; s < endp; s += (*mb_ptr2len)(s))
++ {
++ if (!vim_isprintc((*mb_ptr2char)(s)))
++ break;
++ cells += (*mb_ptr2cells)(s);
++ }
++ }
++ else
++ # endif
++ {
++ for (s = text; s < endp; ++s)
++ if (!vim_isprintc(*s))
++ break;
++ cells = (int)(s - text);
++ }
++ // Currently must be one or two display cells
++ if (s != endp || cells < 1 || cells > 2)
++ {
++ EMSG2(_("E239: Invalid sign text: %s"), text);
++ return FAIL;
++ }
++
++ vim_free(sp->sn_text);
++ // Allocate one byte more if we need to pad up
++ // with a space.
++ len = (int)(endp - text + ((cells == 1) ? 1 : 0));
++ sp->sn_text = vim_strnsave(text, len);
++
++ if (sp->sn_text != NULL && cells == 1)
++ STRCPY(sp->sn_text + len - 1, " ");
++ }
++
++ if (linehl != NULL)
++ sp->sn_line_hl = syn_check_group(linehl, (int)STRLEN(linehl));
++
++ if (texthl != NULL)
++ sp->sn_text_hl = syn_check_group(texthl, (int)STRLEN(texthl));
++
++ return OK;
++ }
++
++ /*
++ * Free the sign specified by 'name'.
++ */
++ int
++ sign_undefine_by_name(char_u *name)
++ {
++ sign_T *sp_prev;
++ sign_T *sp;
++
++ sp = sign_find(name, &sp_prev);
++ if (sp == NULL)
++ {
++ EMSG2(_("E155: Unknown sign: %s"), name);
++ return FAIL;
++ }
++ sign_undefine(sp, sp_prev);
++
++ return OK;
++ }
++
++ /*
++ * List the signs matching 'name'
++ */
++ static void
++ sign_list_by_name(char_u *name)
++ {
++ sign_T *sp;
++
++ sp = sign_find(name, NULL);
++ if (sp != NULL)
++ sign_list_defined(sp);
++ else
++ EMSG2(_("E155: Unknown sign: %s"), name);
++ }
++
++ /*
++ * Place a sign at the specifed file location or update a sign.
++ */
++ int
++ sign_place(
++ int *sign_id,
++ char_u *sign_group,
++ char_u *sign_name,
++ buf_T *buf,
++ linenr_T lnum,
++ int prio)
++ {
++ sign_T *sp;
++
++ // Check for reserved character '*' in group name
++ if (sign_group != NULL && (*sign_group == '*' || *sign_group == '\0'))
++ return FAIL;
++
++ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
++ if (STRCMP(sp->sn_name, sign_name) == 0)
++ break;
++ if (sp == NULL)
++ {
++ EMSG2(_("E155: Unknown sign: %s"), sign_name);
++ return FAIL;
++ }
++ if (*sign_id == 0)
++ *sign_id = sign_group_get_next_signid(buf, sign_group);
++
++ if (lnum > 0)
++ // ":sign place {id} line={lnum} name={name} file={fname}":
++ // place a sign
++ buf_addsign(buf, *sign_id, sign_group, prio, lnum, sp->sn_typenr);
++ else
++ // ":sign place {id} file={fname}": change sign type
++ lnum = buf_change_sign_type(buf, *sign_id, sign_group, sp->sn_typenr);
++ if (lnum > 0)
++ update_debug_sign(buf, lnum);
++ else
++ {
++ EMSG2(_("E885: Not possible to change sign %s"), sign_name);
++ return FAIL;
++ }
++
++ return OK;
++ }
++
++ /*
++ * Unplace the specified sign
++ */
++ int
++ sign_unplace(int sign_id, char_u *sign_group, buf_T *buf, linenr_T atlnum)
++ {
++ if (buf->b_signlist == NULL) // No signs in the buffer
++ return OK;
++
++ if (sign_id == 0)
++ {
++ // Delete all the signs in the specified buffer
++ redraw_buf_later(buf, NOT_VALID);
++ buf_delete_signs(buf, sign_group);
++ }
++ else
++ {
++ linenr_T lnum;
++
++ // Delete only the specified signs
++ lnum = buf_delsign(buf, atlnum, sign_id, sign_group);
++ if (lnum == 0)
++ return FAIL;
++ }
++
++ return OK;
++ }
++
++ /*
++ * Unplace the sign at the current cursor line.
++ */
++ static void
++ sign_unplace_at_cursor(char_u *groupname)
++ {
++ int id = -1;
++
++ id = buf_findsign_id(curwin->w_buffer, curwin->w_cursor.lnum, groupname);
++ if (id > 0)
++ sign_unplace(id, groupname, curwin->w_buffer, curwin->w_cursor.lnum);
++ else
++ EMSG(_("E159: Missing sign number"));
++ }
++
++ /*
++ * sign define command
++ * ":sign define {name} ..."
++ */
++ static void
++ sign_define_cmd(char_u *sign_name, char_u *cmdline)
++ {
++ char_u *arg;
++ char_u *p = cmdline;
++ char_u *icon = NULL;
++ char_u *text = NULL;
++ char_u *linehl = NULL;
++ char_u *texthl = NULL;
++ int failed = FALSE;
++
++ // set values for a defined sign.
++ for (;;)
++ {
++ arg = skipwhite(p);
++ if (*arg == NUL)
++ break;
++ p = skiptowhite_esc(arg);
++ if (STRNCMP(arg, "icon=", 5) == 0)
++ {
++ arg += 5;
++ icon = vim_strnsave(arg, (int)(p - arg));
++ }
++ else if (STRNCMP(arg, "text=", 5) == 0)
++ {
++ arg += 5;
++ text = vim_strnsave(arg, (int)(p - arg));
++ }
++ else if (STRNCMP(arg, "linehl=", 7) == 0)
++ {
++ arg += 7;
++ linehl = vim_strnsave(arg, (int)(p - arg));
++ }
++ else if (STRNCMP(arg, "texthl=", 7) == 0)
++ {
++ arg += 7;
++ texthl = vim_strnsave(arg, (int)(p - arg));
++ }
++ else
++ {
++ EMSG2(_(e_invarg2), arg);
++ failed = TRUE;
++ break;
++ }
++ }
++
++ if (!failed)
++ sign_define_by_name(sign_name, icon, linehl, text, texthl);
++
++ vim_free(icon);
++ vim_free(text);
++ vim_free(linehl);
++ vim_free(texthl);
++ }
++
++ /*
++ * :sign place command
++ */
++ static void
++ sign_place_cmd(
++ buf_T *buf,
++ linenr_T lnum,
++ char_u *sign_name,
++ int id,
++ char_u *group,
++ int prio)
++ {
++ if (id <= 0)
++ {
++ // List signs placed in a file/buffer
++ // :sign place file={fname}
++ // :sign place group={group} file={fname}
++ // :sign place group=* file={fname}
++ // :sign place buffer={nr}
++ // :sign place group={group} buffer={nr}
++ // :sign place group=* buffer={nr}
++ // :sign place
++ // :sign place group={group}
++ // :sign place group=*
++ if (lnum >= 0 || sign_name != NULL ||
++ (group != NULL && *group == '\0'))
++ EMSG(_(e_invarg));
++ else
++ sign_list_placed(buf, group);
++ }
++ else
++ {
++ // Place a new sign
++ if (sign_name == NULL || buf == NULL ||
++ (group != NULL && *group == '\0'))
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ sign_place(&id, group, sign_name, buf, lnum, prio);
++ }
++ }
++
++ /*
++ * :sign unplace command
++ */
++ static void
++ sign_unplace_cmd(
++ buf_T *buf,
++ linenr_T lnum,
++ char_u *sign_name,
++ int id,
++ char_u *group)
++ {
++ if (lnum >= 0 || sign_name != NULL || (group != NULL && *group == '\0'))
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ if (id == -2)
++ {
++ if (buf != NULL)
++ // :sign unplace * file={fname}
++ // :sign unplace * group={group} file={fname}
++ // :sign unplace * group=* file={fname}
++ // :sign unplace * buffer={nr}
++ // :sign unplace * group={group} buffer={nr}
++ // :sign unplace * group=* buffer={nr}
++ sign_unplace(0, group, buf, 0);
++ else
++ // :sign unplace *
++ // :sign unplace * group={group}
++ // :sign unplace * group=*
++ FOR_ALL_BUFFERS(buf)
++ if (buf->b_signlist != NULL)
++ buf_delete_signs(buf, group);
++ }
++ else
++ {
++ if (buf != NULL)
++ // :sign unplace {id} file={fname}
++ // :sign unplace {id} group={group} file={fname}
++ // :sign unplace {id} group=* file={fname}
++ // :sign unplace {id} buffer={nr}
++ // :sign unplace {id} group={group} buffer={nr}
++ // :sign unplace {id} group=* buffer={nr}
++ sign_unplace(id, group, buf, 0);
++ else
++ {
++ if (id == -1)
++ {
++ // :sign unplace group={group}
++ // :sign unplace group=*
++ sign_unplace_at_cursor(group);
++ }
++ else
++ {
++ // :sign unplace {id}
++ // :sign unplace {id} group={group}
++ // :sign unplace {id} group=*
++ FOR_ALL_BUFFERS(buf)
++ sign_unplace(id, group, buf, 0);
++ }
++ }
++ }
++ }
++
++ /*
++ * Jump to a placed sign
++ * :sign jump {id} file={fname}
++ * :sign jump {id} buffer={nr}
++ * :sign jump {id} group={group} file={fname}
++ * :sign jump {id} group={group} buffer={nr}
++ */
++ static void
++ sign_jump_cmd(
++ buf_T *buf,
++ linenr_T lnum,
++ char_u *sign_name,
++ int id,
++ char_u *group)
++ {
++ if (buf == NULL && sign_name == NULL && group == NULL && id == -1)
++ {
++ EMSG(_(e_argreq));
++ return;
++ }
++
++ if (buf == NULL || (group != NULL && *group == '\0') ||
++ lnum >= 0 || sign_name != NULL)
++ {
++ // File or buffer is not specified or an empty group is used
++ // or a line number or a sign name is specified.
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ if ((lnum = buf_findsign(buf, id, group)) <= 0)
++ {
++ EMSGN(_("E157: Invalid sign ID: %ld"), id);
++ return;
++ }
++
++ // goto a sign ...
++ if (buf_jump_open_win(buf) != NULL)
++ { // ... in a current window
++ curwin->w_cursor.lnum = lnum;
++ check_cursor_lnum();
++ beginline(BL_WHITE);
++ }
++ else
++ { // ... not currently in a window
++ char_u *cmd;
++
++ if (buf->b_fname == NULL)
++ {
++ EMSG(_("E934: Cannot jump to a buffer that does not have a name"));
++ return;
++ }
++ cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
++ if (cmd == NULL)
++ return;
++ sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname);
++ do_cmdline_cmd(cmd);
++ vim_free(cmd);
++ }
++ # ifdef FEAT_FOLDING
++ foldOpenCursor();
++ # endif
++ }
++
++ /*
++ * Parse the command line arguments for the ":sign place", ":sign unplace" and
++ * ":sign jump" commands.
++ * The supported arguments are: line={lnum} name={name} group={group}
++ * priority={prio} and file={fname} or buffer={nr}.
++ */
++ static int
++ parse_sign_cmd_args(
++ int cmd,
++ char_u *arg,
++ char_u **sign_name,
++ int *signid,
++ char_u **group,
++ int *prio,
++ buf_T **buf,
++ linenr_T *lnum)
++ {
++ char_u *arg1;
++ char_u *name;
++ char_u *filename = NULL;
++
++ // first arg could be placed sign id
++ arg1 = arg;
++ if (VIM_ISDIGIT(*arg))
++ {
++ *signid = getdigits(&arg);
++ if (!VIM_ISWHITE(*arg) && *arg != NUL)
++ {
++ *signid = -1;
++ arg = arg1;
++ }
++ else
++ arg = skipwhite(arg);
++ }
++
++ while (*arg != NUL)
++ {
++ if (STRNCMP(arg, "line=", 5) == 0)
++ {
++ arg += 5;
++ *lnum = atoi((char *)arg);
++ arg = skiptowhite(arg);
++ }
++ else if (STRNCMP(arg, "*", 1) == 0 && cmd == SIGNCMD_UNPLACE)
++ {
++ if (*signid != -1)
++ {
++ EMSG(_(e_invarg));
++ return FAIL;
++ }
++ *signid = -2;
++ arg = skiptowhite(arg + 1);
++ }
++ else if (STRNCMP(arg, "name=", 5) == 0)
++ {
++ arg += 5;
++ name = arg;
++ arg = skiptowhite(arg);
++ if (*arg != NUL)
++ *arg++ = NUL;
++ while (name[0] == '0' && name[1] != NUL)
++ ++name;
++ *sign_name = name;
++ }
++ else if (STRNCMP(arg, "group=", 6) == 0)
++ {
++ arg += 6;
++ *group = arg;
++ arg = skiptowhite(arg);
++ if (*arg != NUL)
++ *arg++ = NUL;
++ }
++ else if (STRNCMP(arg, "priority=", 9) == 0)
++ {
++ arg += 9;
++ *prio = atoi((char *)arg);
++ arg = skiptowhite(arg);
++ }
++ else if (STRNCMP(arg, "file=", 5) == 0)
++ {
++ arg += 5;
++ filename = arg;
++ *buf = buflist_findname_exp(arg);
++ break;
++ }
++ else if (STRNCMP(arg, "buffer=", 7) == 0)
++ {
++ arg += 7;
++ filename = arg;
++ *buf = buflist_findnr((int)getdigits(&arg));
++ if (*skipwhite(arg) != NUL)
++ EMSG(_(e_trailing));
++ break;
++ }
++ else
++ {
++ EMSG(_(e_invarg));
++ return FAIL;
++ }
++ arg = skipwhite(arg);
++ }
++
++ if (filename != NULL && *buf == NULL)
++ {
++ EMSG2(_("E158: Invalid buffer name: %s"), filename);
++ return FAIL;
++ }
++
++ return OK;
++ }
++
++ /*
++ * ":sign" command
++ */
++ void
++ ex_sign(exarg_T *eap)
++ {
++ char_u *arg = eap->arg;
++ char_u *p;
++ int idx;
++ sign_T *sp;
++ buf_T *buf = NULL;
++
++ // Parse the subcommand.
++ p = skiptowhite(arg);
++ idx = sign_cmd_idx(arg, p);
++ if (idx == SIGNCMD_LAST)
++ {
++ EMSG2(_("E160: Unknown sign command: %s"), arg);
++ return;
++ }
++ arg = skipwhite(p);
++
++ if (idx <= SIGNCMD_LIST)
++ {
++ // Define, undefine or list signs.
++ if (idx == SIGNCMD_LIST && *arg == NUL)
++ {
++ // ":sign list": list all defined signs
++ for (sp = first_sign; sp != NULL && !got_int; sp = sp->sn_next)
++ sign_list_defined(sp);
++ }
++ else if (*arg == NUL)
++ EMSG(_("E156: Missing sign name"));
++ else
++ {
++ char_u *name;
++
++ // Isolate the sign name. If it's a number skip leading zeroes,
++ // so that "099" and "99" are the same sign. But keep "0".
++ p = skiptowhite(arg);
++ if (*p != NUL)
++ *p++ = NUL;
++ while (arg[0] == '0' && arg[1] != NUL)
++ ++arg;
++ name = vim_strsave(arg);
++
++ if (idx == SIGNCMD_DEFINE)
++ sign_define_cmd(name, p);
++ else if (idx == SIGNCMD_LIST)
++ // ":sign list {name}"
++ sign_list_by_name(name);
++ else
++ // ":sign undefine {name}"
++ sign_undefine_by_name(name);
++
++ vim_free(name);
++ return;
++ }
++ }
++ else
++ {
++ int id = -1;
++ linenr_T lnum = -1;
++ char_u *sign_name = NULL;
++ char_u *group = NULL;
++ int prio = SIGN_DEF_PRIO;
++
++ // Parse command line arguments
++ if (parse_sign_cmd_args(idx, arg, &sign_name, &id, &group, &prio,
++ &buf, &lnum) == FAIL)
++ return;
++
++ if (idx == SIGNCMD_PLACE)
++ sign_place_cmd(buf, lnum, sign_name, id, group, prio);
++ else if (idx == SIGNCMD_UNPLACE)
++ sign_unplace_cmd(buf, lnum, sign_name, id, group);
++ else if (idx == SIGNCMD_JUMP)
++ sign_jump_cmd(buf, lnum, sign_name, id, group);
++ }
++ }
++
++ /*
++ * Return information about a specified sign
++ */
++ static void
++ sign_getinfo(sign_T *sp, dict_T *retdict)
++ {
++ char_u *p;
++
++ dict_add_string(retdict, "name", (char_u *)sp->sn_name);
++ if (sp->sn_icon != NULL)
++ dict_add_string(retdict, "icon", (char_u *)sp->sn_icon);
++ if (sp->sn_text != NULL)
++ dict_add_string(retdict, "text", (char_u *)sp->sn_text);
++ if (sp->sn_line_hl > 0)
++ {
++ p = get_highlight_name_ext(NULL, sp->sn_line_hl - 1, FALSE);
++ if (p == NULL)
++ p = (char_u *)"NONE";
++ dict_add_string(retdict, "linehl", (char_u *)p);
++ }
++ if (sp->sn_text_hl > 0)
++ {
++ p = get_highlight_name_ext(NULL, sp->sn_text_hl - 1, FALSE);
++ if (p == NULL)
++ p = (char_u *)"NONE";
++ dict_add_string(retdict, "texthl", (char_u *)p);
++ }
++ }
++
++ /*
++ * If 'name' is NULL, return a list of all the defined signs.
++ * Otherwise, return information about the specified sign.
++ */
++ void
++ sign_getlist(char_u *name, list_T *retlist)
++ {
++ sign_T *sp = first_sign;
++ dict_T *dict;
++
++ if (name != NULL)
++ {
++ sp = sign_find(name, NULL);
++ if (sp == NULL)
++ return;
++ }
++
++ for (; sp != NULL && !got_int; sp = sp->sn_next)
++ {
++ if ((dict = dict_alloc_id(aid_sign_getlist)) == NULL)
++ return;
++ if (list_append_dict(retlist, dict) == FAIL)
++ return;
++ sign_getinfo(sp, dict);
++
++ if (name != NULL) // handle only the specified sign
++ break;
++ }
++ }
++
++ /*
++ * Returns information about signs placed in a buffer as list of dicts.
++ */
++ void
++ get_buffer_signs(buf_T *buf, list_T *l)
++ {
++ signlist_T *sign;
++ dict_T *d;
++
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ {
++ if ((d = sign_get_info(sign)) != NULL)
++ list_append_dict(l, d);
++ }
++ }
++
++ /*
++ * Return information about all the signs placed in a buffer
++ */
++ static void
++ sign_get_placed_in_buf(
++ buf_T *buf,
++ linenr_T lnum,
++ int sign_id,
++ char_u *sign_group,
++ list_T *retlist)
++ {
++ dict_T *d;
++ list_T *l;
++ signlist_T *sign;
++ dict_T *sdict;
++
++ if ((d = dict_alloc_id(aid_sign_getplaced_dict)) == NULL)
++ return;
++ list_append_dict(retlist, d);
++
++ dict_add_number(d, "bufnr", (long)buf->b_fnum);
++
++ if ((l = list_alloc_id(aid_sign_getplaced_list)) == NULL)
++ return;
++ dict_add_list(d, "signs", l);
++
++ FOR_ALL_SIGNS_IN_BUF(buf, sign)
++ {
++ if (!sign_in_group(sign, sign_group))
++ continue;
++ if ((lnum == 0 && sign_id == 0) ||
++ (sign_id == 0 && lnum == sign->lnum) ||
++ (lnum == 0 && sign_id == sign->id) ||
++ (lnum == sign->lnum && sign_id == sign->id))
++ {
++ if ((sdict = sign_get_info(sign)) != NULL)
++ list_append_dict(l, sdict);
++ }
++ }
++ }
++
++ /*
++ * Get a list of signs placed in buffer 'buf'. If 'num' is non-zero, return the
++ * sign placed at the line number. If 'lnum' is zero, return all the signs
++ * placed in 'buf'. If 'buf' is NULL, return signs placed in all the buffers.
++ */
++ void
++ sign_get_placed(
++ buf_T *buf,
++ linenr_T lnum,
++ int sign_id,
++ char_u *sign_group,
++ list_T *retlist)
++ {
++ if (buf != NULL)
++ sign_get_placed_in_buf(buf, lnum, sign_id, sign_group, retlist);
++ else
++ {
++ FOR_ALL_BUFFERS(buf)
++ {
++ if (buf->b_signlist != NULL)
++ sign_get_placed_in_buf(buf, 0, sign_id, sign_group, retlist);
++ }
++ }
++ }
++
++ # if defined(FEAT_SIGN_ICONS) || defined(PROTO)
++ /*
++ * Allocate the icons. Called when the GUI has started. Allows defining
++ * signs before it starts.
++ */
++ void
++ sign_gui_started(void)
++ {
++ sign_T *sp;
++
++ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
++ if (sp->sn_icon != NULL)
++ sp->sn_image = gui_mch_register_sign(sp->sn_icon);
++ }
++ # endif
++
++ /*
++ * List one sign.
++ */
++ static void
++ sign_list_defined(sign_T *sp)
++ {
++ char_u *p;
++
++ smsg((char_u *)"sign %s", sp->sn_name);
++ if (sp->sn_icon != NULL)
++ {
++ MSG_PUTS(" icon=");
++ msg_outtrans(sp->sn_icon);
++ # ifdef FEAT_SIGN_ICONS
++ if (sp->sn_image == NULL)
++ MSG_PUTS(_(" (NOT FOUND)"));
++ # else
++ MSG_PUTS(_(" (not supported)"));
++ # endif
++ }
++ if (sp->sn_text != NULL)
++ {
++ MSG_PUTS(" text=");
++ msg_outtrans(sp->sn_text);
++ }
++ if (sp->sn_line_hl > 0)
++ {
++ MSG_PUTS(" linehl=");
++ p = get_highlight_name_ext(NULL, sp->sn_line_hl - 1, FALSE);
++ if (p == NULL)
++ MSG_PUTS("NONE");
++ else
++ msg_puts(p);
++ }
++ if (sp->sn_text_hl > 0)
++ {
++ MSG_PUTS(" texthl=");
++ p = get_highlight_name_ext(NULL, sp->sn_text_hl - 1, FALSE);
++ if (p == NULL)
++ MSG_PUTS("NONE");
++ else
++ msg_puts(p);
++ }
++ }
++
++ /*
++ * Undefine a sign and free its memory.
++ */
++ static void
++ sign_undefine(sign_T *sp, sign_T *sp_prev)
++ {
++ vim_free(sp->sn_name);
++ vim_free(sp->sn_icon);
++ # ifdef FEAT_SIGN_ICONS
++ if (sp->sn_image != NULL)
++ {
++ out_flush();
++ gui_mch_destroy_sign(sp->sn_image);
++ }
++ # endif
++ vim_free(sp->sn_text);
++ if (sp_prev == NULL)
++ first_sign = sp->sn_next;
++ else
++ sp_prev->sn_next = sp->sn_next;
++ vim_free(sp);
++ }
++
++ /*
++ * Get highlighting attribute for sign "typenr".
++ * If "line" is TRUE: line highl, if FALSE: text highl.
++ */
++ int
++ sign_get_attr(int typenr, int line)
++ {
++ sign_T *sp;
++
++ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
++ if (sp->sn_typenr == typenr)
++ {
++ if (line)
++ {
++ if (sp->sn_line_hl > 0)
++ return syn_id2attr(sp->sn_line_hl);
++ }
++ else
++ {
++ if (sp->sn_text_hl > 0)
++ return syn_id2attr(sp->sn_text_hl);
++ }
++ break;
++ }
++ return 0;
++ }
++
++ /*
++ * Get text mark for sign "typenr".
++ * Returns NULL if there isn't one.
++ */
++ char_u *
++ sign_get_text(int typenr)
++ {
++ sign_T *sp;
++
++ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
++ if (sp->sn_typenr == typenr)
++ return sp->sn_text;
++ return NULL;
++ }
++
++ # if defined(FEAT_SIGN_ICONS) || defined(PROTO)
++ void *
++ sign_get_image(
++ int typenr) /* the attribute which may have a sign */
++ {
++ sign_T *sp;
++
++ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
++ if (sp->sn_typenr == typenr)
++ return sp->sn_image;
++ return NULL;
++ }
++ # endif
++
++ /*
++ * Undefine/free all signs.
++ */
++ void
++ free_signs(void)
++ {
++ while (first_sign != NULL)
++ sign_undefine(first_sign, NULL);
++ }
++
++ # if defined(FEAT_CMDL_COMPL) || defined(PROTO)
++ static enum
++ {
++ EXP_SUBCMD, /* expand :sign sub-commands */
++ EXP_DEFINE, /* expand :sign define {name} args */
++ EXP_PLACE, /* expand :sign place {id} args */
++ EXP_UNPLACE, /* expand :sign unplace" */
++ EXP_SIGN_NAMES /* expand with name of placed signs */
++ } expand_what;
++
++ /*
++ * Function given to ExpandGeneric() to obtain the sign command
++ * expansion.
++ */
++ char_u *
++ get_sign_name(expand_T *xp UNUSED, int idx)
++ {
++ sign_T *sp;
++ int current_idx;
++
++ switch (expand_what)
++ {
++ case EXP_SUBCMD:
++ return (char_u *)cmds[idx];
++ case EXP_DEFINE:
++ {
++ char *define_arg[] =
++ {
++ "icon=", "linehl=", "text=", "texthl=", NULL
++ };
++ return (char_u *)define_arg[idx];
++ }
++ case EXP_PLACE:
++ {
++ char *place_arg[] =
++ {
++ "line=", "name=", "group=", "priority=", "file=",
++ "buffer=", NULL
++ };
++ return (char_u *)place_arg[idx];
++ }
++ case EXP_UNPLACE:
++ {
++ char *unplace_arg[] = { "group=", "file=", "buffer=", NULL };
++ return (char_u *)unplace_arg[idx];
++ }
++ case EXP_SIGN_NAMES:
++ /* Complete with name of signs already defined */
++ current_idx = 0;
++ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
++ if (current_idx++ == idx)
++ return sp->sn_name;
++ return NULL;
++ default:
++ return NULL;
++ }
++ }
++
++ /*
++ * Handle command line completion for :sign command.
++ */
++ void
++ set_context_in_sign_cmd(expand_T *xp, char_u *arg)
++ {
++ char_u *p;
++ char_u *end_subcmd;
++ char_u *last;
++ int cmd_idx;
++ char_u *begin_subcmd_args;
++
++ /* Default: expand subcommands. */
++ xp->xp_context = EXPAND_SIGN;
++ expand_what = EXP_SUBCMD;
++ xp->xp_pattern = arg;
++
++ end_subcmd = skiptowhite(arg);
++ if (*end_subcmd == NUL)
++ /* expand subcmd name
++ * :sign {subcmd}<CTRL-D>*/
++ return;
++
++ cmd_idx = sign_cmd_idx(arg, end_subcmd);
++
++ /* :sign {subcmd} {subcmd_args}
++ * |
++ * begin_subcmd_args */
++ begin_subcmd_args = skipwhite(end_subcmd);
++ p = skiptowhite(begin_subcmd_args);
++ if (*p == NUL)
++ {
++ /*
++ * Expand first argument of subcmd when possible.
++ * For ":jump {id}" and ":unplace {id}", we could
++ * possibly expand the ids of all signs already placed.
++ */
++ xp->xp_pattern = begin_subcmd_args;
++ switch (cmd_idx)
++ {
++ case SIGNCMD_LIST:
++ case SIGNCMD_UNDEFINE:
++ /* :sign list <CTRL-D>
++ * :sign undefine <CTRL-D> */
++ expand_what = EXP_SIGN_NAMES;
++ break;
++ default:
++ xp->xp_context = EXPAND_NOTHING;
++ }
++ return;
++ }
++
++ /* expand last argument of subcmd */
++
++ /* :sign define {name} {args}...
++ * |
++ * p */
++
++ /* Loop until reaching last argument. */
++ do
++ {
++ p = skipwhite(p);
++ last = p;
++ p = skiptowhite(p);
++ } while (*p != NUL);
++
++ p = vim_strchr(last, '=');
++
++ /* :sign define {name} {args}... {last}=
++ * | |
++ * last p */
++ if (p == NULL)
++ {
++ /* Expand last argument name (before equal sign). */
++ xp->xp_pattern = last;
++ switch (cmd_idx)
++ {
++ case SIGNCMD_DEFINE:
++ expand_what = EXP_DEFINE;
++ break;
++ case SIGNCMD_PLACE:
++ expand_what = EXP_PLACE;
++ break;
++ case SIGNCMD_JUMP:
++ case SIGNCMD_UNPLACE:
++ expand_what = EXP_UNPLACE;
++ break;
++ default:
++ xp->xp_context = EXPAND_NOTHING;
++ }
++ }
++ else
++ {
++ /* Expand last argument value (after equal sign). */
++ xp->xp_pattern = p + 1;
++ switch (cmd_idx)
++ {
++ case SIGNCMD_DEFINE:
++ if (STRNCMP(last, "texthl", p - last) == 0 ||
++ STRNCMP(last, "linehl", p - last) == 0)
++ xp->xp_context = EXPAND_HIGHLIGHT;
++ else if (STRNCMP(last, "icon", p - last) == 0)
++ xp->xp_context = EXPAND_FILES;
++ else
++ xp->xp_context = EXPAND_NOTHING;
++ break;
++ case SIGNCMD_PLACE:
++ if (STRNCMP(last, "name", p - last) == 0)
++ expand_what = EXP_SIGN_NAMES;
++ else
++ xp->xp_context = EXPAND_NOTHING;
++ break;
++ default:
++ xp->xp_context = EXPAND_NOTHING;
++ }
++ }
++ }
++ # endif
++
++ #endif /* FEAT_SIGNS */
+*** ../vim-8.1.0672/src/version.c 2019-01-01 00:41:50.040176062 +0100
+--- src/version.c 2019-01-01 12:50:56.371898216 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 673,
+ /**/
+
+--
+From "know your smileys":
+ 8-O "Omigod!!" (done "rm -rf *" ?)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0674 b/data/vim/patches/8.1.0674
new file mode 100644
index 000000000..42f9fcc60
--- /dev/null
+++ b/data/vim/patches/8.1.0674
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0674
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0674
+Problem: Leaking memory when updating a single line.
+Solution: Do not call start_search_hl() twice.
+Files: src/screen.c
+
+
+*** ../vim-8.1.0673/src/screen.c 2018-12-31 13:55:31.257223600 +0100
+--- src/screen.c 2019-01-01 15:06:29.357969030 +0100
+***************
+*** 961,974 ****
+ screen_start(); /* not sure of screen cursor */
+ # ifdef FEAT_SEARCH_EXTRA
+ init_search_hl(wp);
+- 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
+ break;
+ }
+ row += wp->w_lines[j].wl_size;
+--- 961,970 ----
+*** ../vim-8.1.0673/src/version.c 2019-01-01 13:20:05.944711187 +0100
+--- src/version.c 2019-01-01 15:14:20.021810003 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 674,
+ /**/
+
+--
+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.0675 b/data/vim/patches/8.1.0675
new file mode 100644
index 000000000..ab61e5fa0
--- /dev/null
+++ b/data/vim/patches/8.1.0675
@@ -0,0 +1,670 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0675
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0675
+Problem: Text property column is screen columns is not practical.
+Solution: Use byte values for the column.
+Files: src/structs.h, src/textprop.c, src/proto/textprop.pro,
+ runtime/doc/eval.txt, runtime/doc/textprop.txt,
+ src/testdir/test_textprop.vim,
+ src/testdir/dumps/Test_textprop_01.dump
+
+
+*** ../vim-8.1.0674/src/structs.h 2018-12-29 20:04:36.257512068 +0100
+--- src/structs.h 2019-01-01 18:32:54.838693737 +0100
+***************
+*** 705,711 ****
+ */
+ typedef struct textprop_S
+ {
+! colnr_T tp_col; // start column (one based)
+ colnr_T tp_len; // length in bytes
+ int tp_id; // identifier
+ int tp_type; // property type
+--- 705,711 ----
+ */
+ typedef struct textprop_S
+ {
+! colnr_T tp_col; // start column (one based, in bytes)
+ colnr_T tp_len; // length in bytes
+ int tp_id; // identifier
+ int tp_type; // property type
+*** ../vim-8.1.0674/src/textprop.c 2018-12-28 23:22:36.270750732 +0100
+--- src/textprop.c 2019-01-01 18:56:37.259319158 +0100
+***************
+*** 17,24 ****
+ * Text properties have a type, which can be used to specify highlighting.
+ *
+ * TODO:
+! * - Perhaps we only need TP_FLAG_CONT_NEXT ?
+! * - Adjust text property column and length when text is inserted/deleted
+ * - Add an arrray for global_proptypes, to quickly lookup a prop type by ID
+ * - Add an arrray for b_proptypes, to quickly lookup a prop type by ID
+ * - Checking the text length to detect text properties is slow. Use a flag in
+--- 17,24 ----
+ * Text properties have a type, which can be used to specify highlighting.
+ *
+ * TODO:
+! * - Adjust text property column and length when text is inserted/deleted.
+! * - Perhaps we only need TP_FLAG_CONT_NEXT and can drop TP_FLAG_CONT_PREV?
+ * - Add an arrray for global_proptypes, to quickly lookup a prop type by ID
+ * - Add an arrray for b_proptypes, to quickly lookup a prop type by ID
+ * - Checking the text length to detect text properties is slow. Use a flag in
+***************
+*** 198,209 ****
+ {
+ long length = dict_get_number(dict, (char_u *)"length");
+
+! if (length < 1 || end_lnum > start_lnum)
+ {
+ EMSG2(_(e_invargval), "length");
+ return;
+ }
+! end_col = start_col + length - 1;
+ }
+ else if (dict_find(dict, (char_u *)"end_col", -1) != NULL)
+ {
+--- 198,209 ----
+ {
+ long length = dict_get_number(dict, (char_u *)"length");
+
+! if (length < 0 || end_lnum > start_lnum)
+ {
+ EMSG2(_(e_invargval), "length");
+ return;
+ }
+! end_col = start_col + length;
+ }
+ else if (dict_find(dict, (char_u *)"end_col", -1) != NULL)
+ {
+***************
+*** 260,272 ****
+ }
+
+ if (lnum == end_lnum)
+! length = end_col - col + 1;
+ else
+ length = textlen - col + 1;
+ if (length > (long)textlen)
+! length = textlen; // can include the end-of-line
+! if (length < 1)
+! length = 1;
+
+ // Allocate the new line with space for the new proprety.
+ newtext = alloc(buf->b_ml.ml_line_len + sizeof(textprop_T));
+--- 260,272 ----
+ }
+
+ if (lnum == end_lnum)
+! length = end_col - col;
+ else
+ length = textlen - col + 1;
+ if (length > (long)textlen)
+! length = textlen; // can include the end-of-line
+! if (length < 0)
+! length = 0; // zero-width property
+
+ // Allocate the new line with space for the new proprety.
+ newtext = alloc(buf->b_ml.ml_line_len + sizeof(textprop_T));
+***************
+*** 912,915 ****
+--- 912,925 ----
+ buf->b_proptypes = NULL;
+ }
+
++ /*
++ * Adjust the columns of text properties in line "lnum" after position "col" to
++ * shift by "bytes_added" (can be negative).
++ */
++ void
++ adjust_prop_columns(linenr_T lnum UNUSED, colnr_T col UNUSED, int bytes_added UNUSED)
++ {
++ // TODO
++ }
++
+ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.0674/src/proto/textprop.pro 2018-12-25 23:15:41.795966567 +0100
+--- src/proto/textprop.pro 2019-01-01 18:48:26.811215254 +0100
+***************
+*** 13,16 ****
+--- 13,17 ----
+ 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);
++ void adjust_prop_columns(linenr_T lnum, colnr_T col, int bytes_added);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0674/runtime/doc/eval.txt 2018-12-27 23:44:34.793953506 +0100
+--- runtime/doc/eval.txt 2019-01-01 19:43:11.660184779 +0100
+***************
+*** 2309,2315 ****
+ 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})
+--- 2323,2329 ----
+ 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})
+***************
+*** 6673,6703 ****
+ <
+ *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" - last column of the 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" nor "end_col" are passed the property
+! will apply to one character.
+ The property can end exactly at the last character of the
+ text, or just after it. In the last case, if text is appended
+ to the line, the text property size will increase, also when
+--- 6689,6721 ----
+ <
+ *prop_add()* *E965*
+ prop_add({lnum}, {col}, {props})
+! Attach a text property at position {lnum}, {col}. {col} is
+! counted in bytes, 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 bytes, can only be used
+! for a property that does not continue in
+! another line; can be zero
+! end_lnum line number for the end of text
+! end_col column just after the text; not used when "length"
+! is present; when {col} and "end_col" are equal
+! this is a zero-width text property
+! 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 given. 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" nor "end_col" are given the property
+! will be zero-width. That means it will not be highlighted but
+! will move with the text, as a kind of mark.
+ The property can end exactly at the last character of the
+ text, or just after it. In the last case, if text is appended
+ to the line, the text property size will increase, also when
+***************
+*** 6724,6742 ****
+ 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.
+--- 6742,6760 ----
+ 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.
+***************
+*** 6756,6768 ****
+
+ 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.
+--- 6774,6787 ----
+
+ The properties are ordered by starting column and priority.
+ Each property is a Dict with these entries:
+! col starting column
+! length length in bytes, one more if line break is
+! included
+! 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.
+***************
+*** 6773,6791 ****
+
+
+ *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.
+--- 6792,6810 ----
+
+
+ *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.
+***************
+*** 6797,6818 ****
+ 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.
+
+--- 6816,6834 ----
+ 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.
+
+*** ../vim-8.1.0674/runtime/doc/textprop.txt 2018-12-13 22:17:52.869941530 +0100
+--- runtime/doc/textprop.txt 2018-12-30 22:07:01.985153172 +0100
+***************
+*** 1,4 ****
+! *textprop.txt* For Vim version 8.1. Last change: 2018 Dec 13
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *textprop.txt* For Vim version 8.1. Last change: 2018 Dec 30
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 70,79 ****
+
+ 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
+--- 70,82 ----
+
+ The number 123 is smaller than 4567.
+
+! To highlight the numbers in this text: >
+ 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'})
+!
+! Try inserting or deleting lines above the text, you will see that the text
+! properties stick to the text, thus the line number is adjusted as needed.
+
+ 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
+***************
+*** 86,92 ****
+ ^^^^^^ 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*
+--- 89,95 ----
+ ^^^^^^ 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 asynchronously.
+
+ ==============================================================================
+ 2. Functions *text-prop-functions*
+***************
+*** 103,113 ****
+ 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
+
+
+--- 106,116 ----
+ 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-8.1.0674/src/testdir/test_textprop.vim 2018-12-31 20:05:50.779224516 +0100
+--- src/testdir/test_textprop.vim 2019-01-01 19:39:24.906080572 +0100
+***************
+*** 7,12 ****
+--- 7,14 ----
+
+ source screendump.vim
+
++ " test length zero
++
+ func Test_proptype_global()
+ call prop_type_add('comment', {'highlight': 'Directory', 'priority': 123, 'start_incl': 1, 'end_incl': 1})
+ let proptypes = prop_type_list()
+***************
+*** 112,117 ****
+--- 114,125 ----
+ 1del
+ call assert_equal(s:expected_props, prop_list(1))
+
++ " Prop without length or end column is zero length
++ call prop_clear(1)
++ call prop_add(1, 5, {'type': 'two'})
++ let expected = [{'col': 5, 'length': 0, 'type': 'two', 'id': 0, 'start': 1, 'end': 1}]
++ call assert_equal(expected, prop_list(1))
++
+ call DeletePropTypes()
+ bwipe!
+ endfunc
+***************
+*** 220,226 ****
+ call assert_equal([expect1], prop_list(1))
+ let expect2 = {'col': 1, 'length': 10, 'type': 'comment', 'start': 0, 'end': 0, 'id': 0}
+ call assert_equal([expect2], prop_list(2))
+! let expect3 = {'col': 1, 'length': 5, 'type': 'comment', 'start': 0, 'end': 1, 'id': 0}
+ call assert_equal([expect3], prop_list(3))
+ call prop_clear(1, 3)
+
+--- 228,234 ----
+ call assert_equal([expect1], prop_list(1))
+ let expect2 = {'col': 1, 'length': 10, 'type': 'comment', 'start': 0, 'end': 0, 'id': 0}
+ call assert_equal([expect2], prop_list(2))
+! let expect3 = {'col': 1, 'length': 4, 'type': 'comment', 'start': 0, 'end': 1, 'id': 0}
+ call assert_equal([expect3], prop_list(3))
+ call prop_clear(1, 3)
+
+***************
+*** 236,265 ****
+
+ bwipe!
+
+! " Test deleting the first line with a prop.
+ call Setup_three_line_prop()
+ let expect2 = {'col': 4, 'length': 4, 'type': 'comment', 'start': 1, 'end': 0, 'id': 0}
+ call assert_equal([expect2], prop_list(2))
+ 2del
+- let expect_short = {'col': 2, 'length': 1, 'type': 'comment', 'start': 1, 'end': 1, 'id': 0}
+ call assert_equal([expect_short], prop_list(1))
+ let expect2 = {'col': 1, 'length': 6, 'type': 'comment', 'start': 1, 'end': 0, 'id': 0}
+ call assert_equal([expect2], prop_list(2))
+ bwipe!
+
+! " Test deleting the last line with a prop.
+ call Setup_three_line_prop()
+ let expect3 = {'col': 1, 'length': 6, 'type': 'comment', 'start': 0, 'end': 0, 'id': 0}
+ call assert_equal([expect3], prop_list(3))
+! let expect4 = {'col': 1, 'length': 5, 'type': 'comment', 'start': 0, 'end': 1, 'id': 0}
+ call assert_equal([expect4], prop_list(4))
+ 4del
+! let expect3 = {'col': 1, 'length': 6, 'type': 'comment', 'start': 0, 'end': 1, 'id': 0}
+ call assert_equal([expect3], prop_list(3))
+ call assert_equal([expect_short], prop_list(4))
+ bwipe!
+
+! " Test appending a line below the text prop start.
+ call Setup_three_line_prop()
+ let expect2 = {'col': 4, 'length': 4, 'type': 'comment', 'start': 1, 'end': 0, 'id': 0}
+ call assert_equal([expect2], prop_list(2))
+--- 244,274 ----
+
+ bwipe!
+
+! " Test deleting the first line of a multi-line prop.
+ call Setup_three_line_prop()
++ let expect_short = {'col': 2, 'length': 1, 'type': 'comment', 'start': 1, 'end': 1, 'id': 0}
++ call assert_equal([expect_short], prop_list(1))
+ let expect2 = {'col': 4, 'length': 4, 'type': 'comment', 'start': 1, 'end': 0, 'id': 0}
+ call assert_equal([expect2], prop_list(2))
+ 2del
+ call assert_equal([expect_short], prop_list(1))
+ let expect2 = {'col': 1, 'length': 6, 'type': 'comment', 'start': 1, 'end': 0, 'id': 0}
+ call assert_equal([expect2], prop_list(2))
+ bwipe!
+
+! " Test deleting the last line of a multi-line prop.
+ call Setup_three_line_prop()
+ let expect3 = {'col': 1, 'length': 6, 'type': 'comment', 'start': 0, 'end': 0, 'id': 0}
+ call assert_equal([expect3], prop_list(3))
+! let expect4 = {'col': 1, 'length': 4, 'type': 'comment', 'start': 0, 'end': 1, 'id': 0}
+ call assert_equal([expect4], prop_list(4))
+ 4del
+! let expect3.end = 1
+ call assert_equal([expect3], prop_list(3))
+ call assert_equal([expect_short], prop_list(4))
+ bwipe!
+
+! " Test appending a line below the multi-line text prop start.
+ call Setup_three_line_prop()
+ let expect2 = {'col': 4, 'length': 4, 'type': 'comment', 'start': 1, 'end': 0, 'id': 0}
+ call assert_equal([expect2], prop_list(2))
+***************
+*** 287,308 ****
+
+ " screenshot test with textprop highlighting
+ funct Test_textprop_screenshots()
+! if !CanRunVimInTerminal()
+ return
+ endif
+ call writefile([
+! \ "call setline(1, ['One two', 'Number 123 and then 4567.', 'Three'])",
+ \ "hi NumberProp ctermfg=blue",
+ \ "hi LongProp ctermbg=yellow",
+ \ "call prop_type_add('number', {'highlight': 'NumberProp'})",
+ \ "call prop_type_add('long', {'highlight': 'LongProp'})",
+ \ "call prop_add(1, 4, {'end_lnum': 3, 'end_col': 3, 'type': 'long'})",
+! \ "call prop_add(2, 8, {'length': 3, 'type': 'number'})",
+! \ "call prop_add(2, 21, {'length': 4, 'type': 'number'})",
+ \ "set number",
+ \ "set spell",
+ \], 'XtestProp')
+! let buf = RunVimInTerminal('-S XtestProp', {})
+ call VerifyScreenDump(buf, 'Test_textprop_01', {})
+
+ " clean up
+--- 296,318 ----
+
+ " screenshot test with textprop highlighting
+ funct Test_textprop_screenshots()
+! if !CanRunVimInTerminal() || &encoding != 'utf-8'
+ return
+ endif
+ call writefile([
+! \ "call setline(1, ['One two', 'Numbér 123 änd thœn 4¾7.', 'Three'])",
+ \ "hi NumberProp ctermfg=blue",
+ \ "hi LongProp ctermbg=yellow",
+ \ "call prop_type_add('number', {'highlight': 'NumberProp'})",
+ \ "call prop_type_add('long', {'highlight': 'LongProp'})",
+ \ "call prop_add(1, 4, {'end_lnum': 3, 'end_col': 3, 'type': 'long'})",
+! \ "call prop_add(2, 9, {'length': 3, 'type': 'number'})",
+! \ "call prop_add(2, 24, {'length': 4, 'type': 'number'})",
+ \ "set number",
++ \ "hi clear SpellBad",
+ \ "set spell",
+ \], 'XtestProp')
+! let buf = RunVimInTerminal('-S XtestProp', {'rows': 6})
+ call VerifyScreenDump(buf, 'Test_textprop_01', {})
+
+ " clean up
+*** ../vim-8.1.0674/src/testdir/dumps/Test_textprop_01.dump 2018-12-31 14:34:00.466438581 +0100
+--- src/testdir/dumps/Test_textprop_01.dump 2019-01-01 19:29:48.618878036 +0100
+***************
+*** 1,20 ****
+ | +0#af5f00255#ffffff0@1|1| >O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
+! | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|e|r| |1+0#4040ff13&|2|3| +0#0000000&|a|n|d| |t|h|e|n| |4+0#4040ff13&|5|6|7|.+0#0000000&| +0&#ffffff0@45
+! | +0#af5f00255&@1|3| |T+0#0000000#ffff4012|h|r|e+0&#ffffff0@1| @65
+ |~+0#4040ff13&| @73
+ |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+- |~| @73
+ | +0#0000000&@56|1|,|1| @10|A|l@1|
+--- 1,6 ----
+ | +0#af5f00255#ffffff0@1|1| >O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
+! | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| +0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
+! | +0#af5f00255&@1|3| |T+0#0000000#ffff4012|h|r+0&#ffffff0|e@1| @65
+ |~+0#4040ff13&| @73
+ |~| @73
+ | +0#0000000&@56|1|,|1| @10|A|l@1|
+*** ../vim-8.1.0674/src/version.c 2019-01-01 15:15:43.165078543 +0100
+--- src/version.c 2019-01-01 18:30:12.944106089 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 675,
+ /**/
+
+--
+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.0676 b/data/vim/patches/8.1.0676
new file mode 100644
index 000000000..790482a7f
--- /dev/null
+++ b/data/vim/patches/8.1.0676
@@ -0,0 +1,82 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0676
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0676
+Problem: Textprop screendump test fails.
+Solution: Add missing changes.
+Files: src/screen.c
+
+
+*** ../vim-8.1.0675/src/screen.c 2019-01-01 15:15:43.165078543 +0100
+--- src/screen.c 2019-01-01 19:24:48.669350932 +0100
+***************
+*** 4326,4338 ****
+ 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 (vcol >= text_props[tpi].tp_col - 1
+ + text_props[tpi].tp_len)
+ {
+ if (pi + 1 < text_props_active)
+--- 4326,4339 ----
+ if (text_props != NULL)
+ {
+ int pi;
++ int bcol = (int)(ptr - line);
+
+ // Check if any active property ends.
+ for (pi = 0; pi < text_props_active; ++pi)
+ {
+ int tpi = text_prop_idxs[pi];
+
+! if (bcol >= text_props[tpi].tp_col - 1
+ + text_props[tpi].tp_len)
+ {
+ if (pi + 1 < text_props_active)
+***************
+*** 4347,4353 ****
+
+ // Add any text property that starts in this column.
+ while (text_prop_next < text_prop_count
+! && vcol >= text_props[text_prop_next].tp_col - 1)
+ text_prop_idxs[text_props_active++] = text_prop_next++;
+
+ text_prop_attr = 0;
+--- 4348,4354 ----
+
+ // Add any text property that starts in this column.
+ while (text_prop_next < text_prop_count
+! && bcol >= text_props[text_prop_next].tp_col - 1)
+ text_prop_idxs[text_props_active++] = text_prop_next++;
+
+ text_prop_attr = 0;
+*** ../vim-8.1.0675/src/version.c 2019-01-01 19:47:17.858123911 +0100
+--- src/version.c 2019-01-01 20:31:14.587675729 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 676,
+ /**/
+
+--
+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.0677 b/data/vim/patches/8.1.0677
new file mode 100644
index 000000000..3f0f6f5a6
--- /dev/null
+++ b/data/vim/patches/8.1.0677
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0677
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0677
+Problem: Look-behind match may use the wrong line number. (Dominique Pelle)
+Solution: Use the line number in regsave instead of the one in behind_pos,
+ we may be looking at the previous line. (closes #3749)
+Files: src/regexp.c
+
+
+*** ../vim-8.1.0676/src/regexp.c 2018-12-29 22:28:42.750699129 +0100
+--- src/regexp.c 2019-01-01 22:04:07.123755375 +0100
+***************
+*** 5582,5588 ****
+ if (has_mbyte)
+ {
+ char_u *line =
+! reg_getline(behind_pos.rs_u.pos.lnum);
+
+ rp->rs_un.regsave.rs_u.pos.col -=
+ (*mb_head_off)(line, line
+--- 5582,5588 ----
+ if (has_mbyte)
+ {
+ char_u *line =
+! reg_getline(rp->rs_un.regsave.rs_u.pos.lnum);
+
+ rp->rs_un.regsave.rs_u.pos.col -=
+ (*mb_head_off)(line, line
+*** ../vim-8.1.0676/src/version.c 2019-01-01 20:31:26.887563043 +0100
+--- src/version.c 2019-01-01 22:07:11.682251001 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 677,
+ /**/
+
+--
+I AM THANKFUL...
+...for the clothes that fit a little too snug because it
+means I have more than enough to eat.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0678 b/data/vim/patches/8.1.0678
new file mode 100644
index 000000000..97ea5d0fd
--- /dev/null
+++ b/data/vim/patches/8.1.0678
@@ -0,0 +1,305 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0678
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0678
+Problem: Text properties as not adjusted for inserted text.
+Solution: Adjust text properties when inserting text.
+Files: src/misc1.c, src/proto/misc1.pro, src/textprop.c,
+ src/testdir/test_textprop.vim,
+ src/testdir/dumps/Test_textprop_01.dump
+
+
+*** ../vim-8.1.0677/src/misc1.c 2018-12-31 23:58:20.246887218 +0100
+--- src/misc1.c 2019-01-01 23:58:07.685325391 +0100
+***************
+*** 2322,2328 ****
+ for (i = 0; i < len; i += n)
+ {
+ if (enc_utf8)
+! /* avoid reading past p[len] */
+ n = utfc_ptr2len_len(p + i, len - i);
+ else
+ n = (*mb_ptr2len)(p + i);
+--- 2322,2328 ----
+ for (i = 0; i < len; i += n)
+ {
+ if (enc_utf8)
+! // avoid reading past p[len]
+ n = utfc_ptr2len_len(p + i, len - i);
+ else
+ n = (*mb_ptr2len)(p + i);
+***************
+*** 2365,2376 ****
+ ins_char_bytes(char_u *buf, int charlen)
+ {
+ int c = buf[0];
+! int newlen; /* nr of bytes inserted */
+! int oldlen; /* nr of bytes deleted (0 when not replacing) */
+ char_u *p;
+ char_u *newp;
+ char_u *oldp;
+! int linelen; /* length of old line including NUL */
+ colnr_T col;
+ linenr_T lnum = curwin->w_cursor.lnum;
+ int i;
+--- 2365,2376 ----
+ ins_char_bytes(char_u *buf, int charlen)
+ {
+ int c = buf[0];
+! int newlen; // nr of bytes inserted
+! int oldlen; // nr of bytes deleted (0 when not replacing)
+ char_u *p;
+ char_u *newp;
+ char_u *oldp;
+! int linelen; // length of old line including NUL
+ colnr_T col;
+ linenr_T lnum = curwin->w_cursor.lnum;
+ int i;
+***************
+*** 2439,2446 ****
+ }
+ curwin->w_p_list = old_list;
+ }
+! else
+! if (oldp[col] != NUL)
+ {
+ /* normal replace */
+ #ifdef FEAT_MBYTE
+--- 2439,2445 ----
+ }
+ curwin->w_p_list = old_list;
+ }
+! else if (oldp[col] != NUL)
+ {
+ /* normal replace */
+ #ifdef FEAT_MBYTE
+***************
+*** 2494,2504 ****
+ while (i < newlen)
+ p[i++] = ' ';
+
+! /* Replace the line in the buffer. */
+ ml_replace(lnum, newp, FALSE);
+
+! /* mark the buffer as changed and prepare for displaying */
+! changed_bytes(lnum, col);
+
+ /*
+ * If we're in Insert or Replace mode and 'showmatch' is set, then briefly
+--- 2493,2503 ----
+ while (i < newlen)
+ p[i++] = ' ';
+
+! // Replace the line in the buffer.
+ ml_replace(lnum, newp, FALSE);
+
+! // mark the buffer as changed and prepare for displaying
+! inserted_bytes(lnum, col, newlen - oldlen);
+
+ /*
+ * If we're in Insert or Replace mode and 'showmatch' is set, then briefly
+***************
+*** 2566,2572 ****
+ mch_memmove(newp + col, s, (size_t)newlen);
+ mch_memmove(newp + col + newlen, oldp + col, (size_t)(oldlen - col + 1));
+ ml_replace(lnum, newp, FALSE);
+! changed_bytes(lnum, col);
+ curwin->w_cursor.col += newlen;
+ }
+
+--- 2565,2571 ----
+ mch_memmove(newp + col, s, (size_t)newlen);
+ mch_memmove(newp + col + newlen, oldp + col, (size_t)(oldlen - col + 1));
+ ml_replace(lnum, newp, FALSE);
+! inserted_bytes(lnum, col, newlen);
+ curwin->w_cursor.col += newlen;
+ }
+
+***************
+*** 3016,3021 ****
+--- 3015,3035 ----
+ #endif
+ }
+
++ /*
++ * Like changed_bytes() but also adjust text properties for "added" bytes.
++ * When "added" is negative text was deleted.
++ */
++ void
++ inserted_bytes(linenr_T lnum, colnr_T col, int added)
++ {
++ changed_bytes(lnum, col);
++
++ #ifdef FEAT_TEXT_PROP
++ if (curbuf->b_has_textprop && added != 0)
++ adjust_prop_columns(lnum, col, added);
++ #endif
++ }
++
+ static void
+ changedOneline(buf_T *buf, linenr_T lnum)
+ {
+*** ../vim-8.1.0677/src/proto/misc1.pro 2018-06-23 19:22:45.614486258 +0200
+--- src/proto/misc1.pro 2019-01-01 23:01:52.739596275 +0100
+***************
+*** 35,40 ****
+--- 35,41 ----
+ void changed(void);
+ void changed_int(void);
+ void changed_bytes(linenr_T lnum, colnr_T col);
++ void inserted_bytes(linenr_T lnum, colnr_T col, int added);
+ void appended_lines(linenr_T lnum, long count);
+ void appended_lines_mark(linenr_T lnum, long count);
+ void deleted_lines(linenr_T lnum, long count);
+*** ../vim-8.1.0677/src/textprop.c 2019-01-01 19:47:17.854123944 +0100
+--- src/textprop.c 2019-01-01 23:30:08.638101345 +0100
+***************
+*** 915,925 ****
+ /*
+ * Adjust the columns of text properties in line "lnum" after position "col" to
+ * shift by "bytes_added" (can be negative).
+ */
+ void
+! adjust_prop_columns(linenr_T lnum UNUSED, colnr_T col UNUSED, int bytes_added UNUSED)
+ {
+! // TODO
+ }
+
+ #endif // FEAT_TEXT_PROP
+--- 915,961 ----
+ /*
+ * Adjust the columns of text properties in line "lnum" after position "col" to
+ * shift by "bytes_added" (can be negative).
++ * Note that "col" is zero-based, while tp_col is one-based.
++ * Only for the current buffer.
++ * Called is expected to check b_has_textprop and "bytes_added" being non-zero.
+ */
+ void
+! adjust_prop_columns(linenr_T lnum, colnr_T col, int bytes_added)
+ {
+! int proplen;
+! char_u *props;
+! textprop_T tmp_prop;
+! proptype_T *pt;
+! int dirty = FALSE;
+! int i;
+!
+! proplen = get_text_props(curbuf, lnum, &props, TRUE);
+! if (proplen == 0)
+! return;
+!
+! for (i = 0; i < proplen; ++i)
+! {
+! mch_memmove(&tmp_prop, props + i * sizeof(textprop_T),
+! sizeof(textprop_T));
+! pt = text_prop_type_by_id(curbuf, tmp_prop.tp_type);
+!
+! if (tmp_prop.tp_col >= col + (pt != NULL && (pt->pt_flags & PT_FLAG_INS_START_INCL) ? 2 : 1))
+! {
+! tmp_prop.tp_col += bytes_added;
+! dirty = TRUE;
+! }
+! else if (tmp_prop.tp_col + tmp_prop.tp_len > col + (pt != NULL && (pt->pt_flags & PT_FLAG_INS_END_INCL) ? 0 : 1))
+! {
+! tmp_prop.tp_len += bytes_added;
+! dirty = TRUE;
+! }
+! if (dirty)
+! {
+! curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
+! mch_memmove(props + i * sizeof(textprop_T), &tmp_prop,
+! sizeof(textprop_T));
+! }
+! }
+ }
+
+ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.0677/src/testdir/test_textprop.vim 2019-01-01 19:47:17.854123944 +0100
+--- src/testdir/test_textprop.vim 2019-01-01 23:44:18.167348741 +0100
+***************
+*** 300,316 ****
+ return
+ endif
+ call writefile([
+! \ "call setline(1, ['One two', 'Numbér 123 änd thœn 4¾7.', 'Three'])",
+ \ "hi NumberProp ctermfg=blue",
+ \ "hi LongProp ctermbg=yellow",
+ \ "call prop_type_add('number', {'highlight': 'NumberProp'})",
+ \ "call prop_type_add('long', {'highlight': 'LongProp'})",
+ \ "call prop_add(1, 4, {'end_lnum': 3, 'end_col': 3, 'type': 'long'})",
+ \ "call prop_add(2, 9, {'length': 3, 'type': 'number'})",
+ \ "call prop_add(2, 24, {'length': 4, 'type': 'number'})",
+ \ "set number",
+ \ "hi clear SpellBad",
+ \ "set spell",
+ \], 'XtestProp')
+ let buf = RunVimInTerminal('-S XtestProp', {'rows': 6})
+ call VerifyScreenDump(buf, 'Test_textprop_01', {})
+--- 300,324 ----
+ return
+ endif
+ call writefile([
+! \ "call setline(1, ['One two', 'Numbér 123 änd thœn 4¾7.', '--aa--bb--cc--dd--'])",
+ \ "hi NumberProp ctermfg=blue",
+ \ "hi LongProp ctermbg=yellow",
+ \ "call prop_type_add('number', {'highlight': 'NumberProp'})",
+ \ "call prop_type_add('long', {'highlight': 'LongProp'})",
++ \ "call prop_type_add('start', {'highlight': 'NumberProp', 'start_incl': 1})",
++ \ "call prop_type_add('end', {'highlight': 'NumberProp', 'end_incl': 1})",
++ \ "call prop_type_add('both', {'highlight': 'NumberProp', 'start_incl': 1, 'end_incl': 1})",
+ \ "call prop_add(1, 4, {'end_lnum': 3, 'end_col': 3, 'type': 'long'})",
+ \ "call prop_add(2, 9, {'length': 3, 'type': 'number'})",
+ \ "call prop_add(2, 24, {'length': 4, 'type': 'number'})",
++ \ "call prop_add(3, 3, {'length': 2, 'type': 'number'})",
++ \ "call prop_add(3, 7, {'length': 2, 'type': 'start'})",
++ \ "call prop_add(3, 11, {'length': 2, 'type': 'end'})",
++ \ "call prop_add(3, 15, {'length': 2, 'type': 'both'})",
+ \ "set number",
+ \ "hi clear SpellBad",
+ \ "set spell",
++ \ "normal 3G0llix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>",
+ \], 'XtestProp')
+ let buf = RunVimInTerminal('-S XtestProp', {'rows': 6})
+ call VerifyScreenDump(buf, 'Test_textprop_01', {})
+*** ../vim-8.1.0677/src/testdir/dumps/Test_textprop_01.dump 2019-01-01 19:47:17.854123944 +0100
+--- src/testdir/dumps/Test_textprop_01.dump 2019-01-01 23:59:16.492821920 +0100
+***************
+*** 1,6 ****
+! | +0#af5f00255#ffffff0@1|1| >O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
+ | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| +0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
+! | +0#af5f00255&@1|3| |T+0#0000000#ffff4012|h|r+0&#ffffff0|e@1| @65
+ |~+0#4040ff13&| @73
+ |~| @73
+! | +0#0000000&@56|1|,|1| @10|A|l@1|
+--- 1,6 ----
+! | +0#af5f00255#ffffff0@1|1| |O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
+ | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| +0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
+! | +0#af5f00255&@1|3| |-+0#0000000#ffff4012@1|x+0&#ffffff0|a+0#4040ff13&@1|x+0#0000000&|-@1|x+0#4040ff13&|b@1|x+0#0000000&|-@1|x|c+0#4040ff13&@1|x|-+0#0000000&@1|x+0#4040ff13&|d@1>x|-+0#0000000&@1| @44
+ |~+0#4040ff13&| @73
+ |~| @73
+! | +0#0000000&@56|3|,|2|4| @9|A|l@1|
+*** ../vim-8.1.0677/src/version.c 2019-01-01 22:18:59.808136916 +0100
+--- src/version.c 2019-01-02 00:00:20.584349916 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 678,
+ /**/
+
+--
+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.0679 b/data/vim/patches/8.1.0679
new file mode 100644
index 000000000..52bed26d3
--- /dev/null
+++ b/data/vim/patches/8.1.0679
@@ -0,0 +1,262 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0679
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0679
+Problem: Sign functions do not take buffer argument as documented.
+Solution: Use get_buf_tv(). (Yegappan Lakshmanan, closes #3755)
+Files: src/evalfunc.c, src/testdir/test_signs.vim
+
+
+*** ../vim-8.1.0678/src/evalfunc.c 2019-01-01 13:20:05.940711222 +0100
+--- src/evalfunc.c 2019-01-02 13:37:14.702974769 +0100
+***************
+*** 11365,11371 ****
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ // get signs placed in this buffer
+! buf = find_buffer(&argvars[0]);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+--- 11365,11371 ----
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ // get signs placed in this buffer
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+***************
+*** 11457,11463 ****
+ goto cleanup;
+
+ // Buffer to place the sign
+! buf = find_buffer(&argvars[3]);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(&argvars[2]));
+--- 11457,11463 ----
+ goto cleanup;
+
+ // Buffer to place the sign
+! buf = get_buf_tv(&argvars[3], FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(&argvars[2]));
+***************
+*** 11566,11572 ****
+
+ if ((di = dict_find(dict, (char_u *)"buffer", -1)) != NULL)
+ {
+! buf = find_buffer(&di->di_tv);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+--- 11566,11572 ----
+
+ if ((di = dict_find(dict, (char_u *)"buffer", -1)) != NULL)
+ {
+! buf = get_buf_tv(&di->di_tv, FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+*** ../vim-8.1.0678/src/testdir/test_signs.vim 2018-12-31 22:02:24.077890554 +0100
+--- src/testdir/test_signs.vim 2019-01-02 13:37:14.702974769 +0100
+***************
+*** 32,38 ****
+ " current window if the buffer is displayed there.
+ let bn = bufnr('%')
+ let wn = winnr()
+! exe 'sign place 41 line=3 name=Sign1 buffer=' . bn
+ 1
+ bot split
+ exe 'sign jump 41 buffer=' . bufnr('%')
+--- 32,38 ----
+ " current window if the buffer is displayed there.
+ let bn = bufnr('%')
+ let wn = winnr()
+! exe 'sign place 41 line=3 name=Sign1 buffer=' . bn
+ 1
+ bot split
+ exe 'sign jump 41 buffer=' . bufnr('%')
+***************
+*** 77,83 ****
+ sign unplace
+ let a=execute('sign place')
+ call assert_equal("\n--- Signs ---\n", a)
+!
+ " Try again to unplace sign on current line, it should fail this time.
+ call assert_fails('sign unplace', 'E159:')
+
+--- 77,83 ----
+ sign unplace
+ let a=execute('sign place')
+ call assert_equal("\n--- Signs ---\n", a)
+!
+ " Try again to unplace sign on current line, it should fail this time.
+ call assert_fails('sign unplace', 'E159:')
+
+***************
+*** 386,396 ****
+ call assert_equal([{'bufnr' : bufnr(''), 'signs' :
+ \ [{'id' : 10, 'group' : '', 'lnum' : 20, 'name' : 'sign1',
+ \ 'priority' : 10}]}],
+! \ sign_getplaced('Xsign', {'lnum' : 20}))
+ call assert_equal([{'bufnr' : bufnr(''), 'signs' :
+ \ [{'id' : 10, 'group' : '', 'lnum' : 20, 'name' : 'sign1',
+ \ 'priority' : 10}]}],
+! \ sign_getplaced('Xsign', {'id' : 10}))
+
+ " Tests for invalid arguments to sign_place()
+ call assert_fails('call sign_place([], "", "mySign", 1)', 'E745:')
+--- 386,396 ----
+ call assert_equal([{'bufnr' : bufnr(''), 'signs' :
+ \ [{'id' : 10, 'group' : '', 'lnum' : 20, 'name' : 'sign1',
+ \ 'priority' : 10}]}],
+! \ sign_getplaced('%', {'lnum' : 20}))
+ call assert_equal([{'bufnr' : bufnr(''), 'signs' :
+ \ [{'id' : 10, 'group' : '', 'lnum' : 20, 'name' : 'sign1',
+ \ 'priority' : 10}]}],
+! \ sign_getplaced('', {'id' : 10}))
+
+ " Tests for invalid arguments to sign_place()
+ call assert_fails('call sign_place([], "", "mySign", 1)', 'E745:')
+***************
+*** 407,413 ****
+ \ {"lnum" : 30})', 'E730:')
+ call assert_fails('call sign_place(5, "", "sign1", "abcxyz.xxx",
+ \ {"lnum" : 10})', 'E158:')
+! call assert_fails('call sign_place(5, "", "sign1", "", {"lnum" : 10})',
+ \ 'E158:')
+ call assert_fails('call sign_place(5, "", "sign1", [], {"lnum" : 10})',
+ \ 'E158:')
+--- 407,413 ----
+ \ {"lnum" : 30})', 'E730:')
+ call assert_fails('call sign_place(5, "", "sign1", "abcxyz.xxx",
+ \ {"lnum" : 10})', 'E158:')
+! call assert_fails('call sign_place(5, "", "sign1", "@", {"lnum" : 10})',
+ \ 'E158:')
+ call assert_fails('call sign_place(5, "", "sign1", [], {"lnum" : 10})',
+ \ 'E158:')
+***************
+*** 429,435 ****
+ \ 'priority' : 10}]}],
+ \ sign_getplaced())
+ call assert_fails("call sign_getplaced('dummy.sign')", 'E158:')
+! call assert_fails('call sign_getplaced("")', 'E158:')
+ call assert_fails('call sign_getplaced(-1)', 'E158:')
+ call assert_fails('call sign_getplaced("Xsign", [])', 'E715:')
+ call assert_equal([{'bufnr' : bufnr(''), 'signs' : []}],
+--- 429,435 ----
+ \ 'priority' : 10}]}],
+ \ sign_getplaced())
+ call assert_fails("call sign_getplaced('dummy.sign')", 'E158:')
+! call assert_fails('call sign_getplaced("&")', 'E158:')
+ call assert_fails('call sign_getplaced(-1)', 'E158:')
+ call assert_fails('call sign_getplaced("Xsign", [])', 'E715:')
+ call assert_equal([{'bufnr' : bufnr(''), 'signs' : []}],
+***************
+*** 451,457 ****
+ call assert_fails("call sign_unplace('',
+ \ {'id' : 20, 'buffer' : 'buffer.c'})", 'E158:')
+ call assert_fails("call sign_unplace('',
+! \ {'id' : 20, 'buffer' : ''})", 'E158:')
+ call assert_fails("call sign_unplace('g1',
+ \ {'id' : 20, 'buffer' : 200})", 'E158:')
+ call assert_fails("call sign_unplace('g1', 'mySign')", 'E715:')
+--- 451,457 ----
+ call assert_fails("call sign_unplace('',
+ \ {'id' : 20, 'buffer' : 'buffer.c'})", 'E158:')
+ call assert_fails("call sign_unplace('',
+! \ {'id' : 20, 'buffer' : '&'})", 'E158:')
+ call assert_fails("call sign_unplace('g1',
+ \ {'id' : 20, 'buffer' : 200})", 'E158:')
+ call assert_fails("call sign_unplace('g1', 'mySign')", 'E715:')
+***************
+*** 1186,1188 ****
+--- 1186,1247 ----
+ enew | only
+ call delete("Xsign")
+ endfunc
++
++ " Test for auto-adjusting the line number of a placed sign.
++ func Test_sign_lnum_adjust()
++ enew! | only!
++
++ sign define sign1 text=#> linehl=Comment
++ call setline(1, ['A', 'B', 'C', 'D'])
++ exe 'sign place 5 line=3 name=sign1 buffer=' . bufnr('')
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal(3, l[0].signs[0].lnum)
++
++ " Add some lines before the sign and check the sign line number
++ call append(2, ['AA', 'AB', 'AC'])
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal(6, l[0].signs[0].lnum)
++
++ " Delete some lines before the sign and check the sign line number
++ call deletebufline('%', 1, 2)
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal(4, l[0].signs[0].lnum)
++
++ sign unplace * group=*
++ sign undefine sign1
++ enew!
++ endfunc
++
++ " Test for changing the type of a placed sign
++ func Test_sign_change_type()
++ enew! | only!
++
++ sign define sign1 text=#> linehl=Comment
++ sign define sign2 text=@@ linehl=Comment
++
++ call setline(1, ['A', 'B', 'C', 'D'])
++ exe 'sign place 4 line=3 name=sign1 buffer=' . bufnr('')
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal('sign1', l[0].signs[0].name)
++ exe 'sign place 4 name=sign2 buffer=' . bufnr('')
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal('sign2', l[0].signs[0].name)
++ call sign_place(4, '', 'sign1', '')
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal('sign1', l[0].signs[0].name)
++
++ exe 'sign place 4 group=g1 line=4 name=sign1 buffer=' . bufnr('')
++ let l = sign_getplaced(bufnr(''), {'group' : 'g1'})
++ call assert_equal('sign1', l[0].signs[0].name)
++ exe 'sign place 4 group=g1 name=sign2 buffer=' . bufnr('')
++ let l = sign_getplaced(bufnr(''), {'group' : 'g1'})
++ call assert_equal('sign2', l[0].signs[0].name)
++ call sign_place(4, 'g1', 'sign1', '')
++ let l = sign_getplaced(bufnr(''), {'group' : 'g1'})
++ call assert_equal('sign1', l[0].signs[0].name)
++
++ sign unplace * group=*
++ sign undefine sign1
++ sign undefine sign2
++ enew!
++ endfunc
+*** ../vim-8.1.0678/src/version.c 2019-01-02 00:02:07.607556145 +0100
+--- src/version.c 2019-01-02 13:39:21.357897656 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 679,
+ /**/
+
+--
+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.0680 b/data/vim/patches/8.1.0680
new file mode 100644
index 000000000..5ae987e34
--- /dev/null
+++ b/data/vim/patches/8.1.0680
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0680
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0680
+Problem: Not easy to see what features are unavailable.
+Solution: Highlight disabled features in the :version output. (Nazri Ramliy,
+ closes #3756)
+Files: src/version.c
+
+
+*** ../vim-8.1.0679/src/version.c 2019-01-02 13:40:26.993339467 +0100
+--- src/version.c 2019-01-02 17:25:49.200826306 +0100
+***************
+*** 2266,2271 ****
+--- 2268,2276 ----
+ int nrow;
+ int item_count = 0;
+ int width = 0;
++ #ifdef FEAT_SYN_HL
++ int use_highlight = (items == (char_u **)features);
++ #endif
+
+ /* Find the length of the longest item, use that + 1 as the column
+ * width. */
+***************
+*** 2307,2313 ****
+
+ if (idx == current)
+ msg_putchar('[');
+! msg_puts(items[idx]);
+ if (idx == current)
+ msg_putchar(']');
+ if (last_col)
+--- 2312,2323 ----
+
+ if (idx == current)
+ msg_putchar('[');
+! #ifdef FEAT_SYN_HL
+! if (use_highlight && items[idx][0] == '-')
+! msg_puts_attr(items[idx], HL_ATTR(HLF_W));
+! else
+! #endif
+! msg_puts(items[idx]);
+ if (idx == current)
+ msg_putchar(']');
+ if (last_col)
+*** ../vim-8.1.0679/src/version.c 2019-01-02 13:40:26.993339467 +0100
+--- src/version.c 2019-01-02 17:25:49.200826306 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 680,
+ /**/
+
+--
+I AM THANKFUL...
+...for all the complaining I hear about the government
+because it means we have freedom of speech.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0681 b/data/vim/patches/8.1.0681
new file mode 100644
index 000000000..8a94021f5
--- /dev/null
+++ b/data/vim/patches/8.1.0681
@@ -0,0 +1,127 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0681
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0681
+Problem: Text properties as not adjusted for deleted text.
+Solution: Adjust text properties when backspacing to delete text.
+Files: src/edit.c, src/misc1.c, src/testdir/test_textprop.vim,
+ src/testdir/dumps/Test_textprop_01.dump
+
+
+*** ../vim-8.1.0680/src/edit.c 2018-12-23 19:10:05.006359935 +0100
+--- src/edit.c 2019-01-02 17:56:21.973343178 +0100
+***************
+*** 6737,6743 ****
+ * comment leader for the numbered list. */
+ for (i = 0; i < padding; i++)
+ ins_str((char_u *)" ");
+- changed_bytes(curwin->w_cursor.lnum, leader_len);
+ }
+ else
+ {
+--- 6737,6742 ----
+*** ../vim-8.1.0680/src/misc1.c 2019-01-02 00:02:07.603556175 +0100
+--- src/misc1.c 2019-01-02 17:34:00.404745509 +0100
+***************
+*** 2749,2755 ****
+ #endif
+
+ // mark the buffer as changed and prepare for displaying
+! changed_bytes(lnum, curwin->w_cursor.col);
+
+ return OK;
+ }
+--- 2749,2755 ----
+ #endif
+
+ // mark the buffer as changed and prepare for displaying
+! inserted_bytes(lnum, curwin->w_cursor.col, -count);
+
+ return OK;
+ }
+*** ../vim-8.1.0680/src/testdir/test_textprop.vim 2019-01-02 00:02:07.607556145 +0100
+--- src/testdir/test_textprop.vim 2019-01-02 17:48:09.373558703 +0100
+***************
+*** 177,182 ****
+--- 177,205 ----
+ bwipe!
+ endfunc
+
++ func Test_prop_backspace()
++ new
++ set bs=2
++ call setline(1, 'xonex xtwoxx')
++ call AddPropTypes()
++ call prop_add(1, 2, {'length': 3, 'id': 11, 'type': 'one'})
++ call prop_add(1, 8, {'length': 3, 'id': 12, 'type': 'two'})
++ let expected = [
++ \ {'col': 2, 'length': 3, 'id': 11, 'type': 'one', 'start': 1, 'end': 1},
++ \ {'col': 8, 'length': 3, 'id': 12, 'type': 'two', 'start': 1, 'end': 1},
++ \]
++ call assert_equal(expected, prop_list(1))
++
++ exe "normal 0li\<BS>\<Esc>fxli\<BS>\<Esc>"
++ call assert_equal('one xtwoxx', getline(1))
++ let expected[0].col = 1
++ let expected[1].col = 6
++ call assert_equal(expected, prop_list(1))
++
++ call DeletePropTypes()
++ bwipe!
++ set bs&
++ endfunc
+
+ func Test_prop_clear()
+ new
+***************
+*** 319,324 ****
+--- 342,348 ----
+ \ "hi clear SpellBad",
+ \ "set spell",
+ \ "normal 3G0llix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>",
++ \ "normal 3G0lli\<BS>\<Esc>",
+ \], 'XtestProp')
+ let buf = RunVimInTerminal('-S XtestProp', {'rows': 6})
+ call VerifyScreenDump(buf, 'Test_textprop_01', {})
+*** ../vim-8.1.0680/src/testdir/dumps/Test_textprop_01.dump 2019-01-02 00:02:07.607556145 +0100
+--- src/testdir/dumps/Test_textprop_01.dump 2019-01-02 17:48:15.413507112 +0100
+***************
+*** 1,6 ****
+ | +0#af5f00255#ffffff0@1|1| |O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
+ | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| +0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
+! | +0#af5f00255&@1|3| |-+0#0000000#ffff4012@1|x+0&#ffffff0|a+0#4040ff13&@1|x+0#0000000&|-@1|x+0#4040ff13&|b@1|x+0#0000000&|-@1|x|c+0#4040ff13&@1|x|-+0#0000000&@1|x+0#4040ff13&|d@1>x|-+0#0000000&@1| @44
+ |~+0#4040ff13&| @73
+ |~| @73
+! | +0#0000000&@56|3|,|2|4| @9|A|l@1|
+--- 1,6 ----
+ | +0#af5f00255#ffffff0@1|1| |O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
+ | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| +0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
+! | +0#af5f00255&@1|3| >-+0#0000000#ffff4012|x+0&#ffffff0|a+0#4040ff13&@1|x+0#0000000&|-@1|x+0#4040ff13&|b@1|x+0#0000000&|-@1|x|c+0#4040ff13&@1|x|-+0#0000000&@1|x+0#4040ff13&|d@1|x|-+0#0000000&@1| @45
+ |~+0#4040ff13&| @73
+ |~| @73
+! | +0#0000000&@56|3|,|1| @10|A|l@1|
+*** ../vim-8.1.0680/src/version.c 2019-01-02 17:26:25.552510223 +0100
+--- src/version.c 2019-01-02 17:35:06.640192315 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 681,
+ /**/
+
+--
+I AM THANKFUL...
+...for the piles of laundry and ironing because it means I
+have plenty of clothes to wear.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0682 b/data/vim/patches/8.1.0682
new file mode 100644
index 000000000..7ad5b8752
--- /dev/null
+++ b/data/vim/patches/8.1.0682
@@ -0,0 +1,290 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0682
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0682
+Problem: Text properties are not adjusted when backspacing replaced text.
+Solution: Keep text properties on text restored in replace mode.
+Files: src/edit.c, src/textprop.c, src/globals.h,
+ src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.0681/src/edit.c 2019-01-02 18:00:22.639279766 +0100
+--- src/edit.c 2019-01-02 23:33:44.586707292 +0100
+***************
+*** 7962,7967 ****
+--- 7962,7978 ----
+ cc = replace_pop();
+ if (cc > 0)
+ {
++ #ifdef FEAT_TEXT_PROP
++ size_t len_before;
++
++ if (curbuf->b_has_textprop)
++ {
++ // Do not adjust text properties for individual delete and insert
++ // operations, do it afterwards on the resulting text.
++ len_before = STRLEN(ml_get_curline());
++ ++text_prop_frozen;
++ }
++ #endif
+ if (State & VREPLACE_FLAG)
+ {
+ /* Get the number of screen cells used by the character we are
+***************
+*** 8012,8019 ****
+ curwin->w_cursor.col -= ins_len;
+ }
+
+! /* mark the buffer as changed and prepare for displaying */
+ changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
+ }
+ else if (cc == 0)
+ (void)del_char_after_col(limit_col);
+--- 8023,8041 ----
+ curwin->w_cursor.col -= ins_len;
+ }
+
+! // mark the buffer as changed and prepare for displaying
+ changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
++
++ #ifdef FEAT_TEXT_PROP
++ if (curbuf->b_has_textprop)
++ {
++ size_t len_now = STRLEN(ml_get_curline());
++
++ --text_prop_frozen;
++ adjust_prop_columns(curwin->w_cursor.lnum, curwin->w_cursor.col,
++ (int)(len_now - len_before));
++ }
++ #endif
+ }
+ else if (cc == 0)
+ (void)del_char_after_col(limit_col);
+*** ../vim-8.1.0681/src/textprop.c 2019-01-02 00:02:07.607556145 +0100
+--- src/textprop.c 2019-01-02 23:38:12.916624592 +0100
+***************
+*** 920,960 ****
+ * Called is expected to check b_has_textprop and "bytes_added" being non-zero.
+ */
+ void
+! adjust_prop_columns(linenr_T lnum, colnr_T col, int bytes_added)
+ {
+ int proplen;
+ char_u *props;
+ textprop_T tmp_prop;
+ proptype_T *pt;
+ int dirty = FALSE;
+! int i;
+
+ proplen = get_text_props(curbuf, lnum, &props, TRUE);
+ if (proplen == 0)
+ return;
+
+! for (i = 0; i < proplen; ++i)
+ {
+! mch_memmove(&tmp_prop, props + i * sizeof(textprop_T),
+ sizeof(textprop_T));
+ pt = text_prop_type_by_id(curbuf, tmp_prop.tp_type);
+
+! if (tmp_prop.tp_col >= col + (pt != NULL && (pt->pt_flags & PT_FLAG_INS_START_INCL) ? 2 : 1))
+ {
+ tmp_prop.tp_col += bytes_added;
+ dirty = TRUE;
+ }
+! else if (tmp_prop.tp_col + tmp_prop.tp_len > col + (pt != NULL && (pt->pt_flags & PT_FLAG_INS_END_INCL) ? 0 : 1))
+ {
+ tmp_prop.tp_len += bytes_added;
+ dirty = TRUE;
+ }
+! if (dirty)
+! {
+! curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
+! mch_memmove(props + i * sizeof(textprop_T), &tmp_prop,
+ sizeof(textprop_T));
+! }
+ }
+ }
+
+--- 920,978 ----
+ * Called is expected to check b_has_textprop and "bytes_added" being non-zero.
+ */
+ void
+! adjust_prop_columns(
+! linenr_T lnum,
+! colnr_T col,
+! int bytes_added)
+ {
+ int proplen;
+ char_u *props;
+ textprop_T tmp_prop;
+ proptype_T *pt;
+ int dirty = FALSE;
+! int ri, wi;
+! size_t textlen;
+!
+! if (text_prop_frozen > 0)
+! return;
+
+ proplen = get_text_props(curbuf, lnum, &props, TRUE);
+ if (proplen == 0)
+ return;
++ textlen = curbuf->b_ml.ml_line_len - proplen * sizeof(textprop_T);
+
+! wi = 0; // write index
+! for (ri = 0; ri < proplen; ++ri)
+ {
+! mch_memmove(&tmp_prop, props + ri * sizeof(textprop_T),
+ sizeof(textprop_T));
+ pt = text_prop_type_by_id(curbuf, tmp_prop.tp_type);
+
+! if (bytes_added > 0
+! ? (tmp_prop.tp_col >= col + (pt != NULL && (pt->pt_flags & PT_FLAG_INS_START_INCL) ? 2 : 1))
+! : (tmp_prop.tp_col > col + 1))
+ {
+ tmp_prop.tp_col += bytes_added;
+ dirty = TRUE;
+ }
+! else if (tmp_prop.tp_len > 0
+! && tmp_prop.tp_col + tmp_prop.tp_len > col
+! + ((pt != NULL && (pt->pt_flags & PT_FLAG_INS_END_INCL))
+! ? 0 : 1))
+ {
+ tmp_prop.tp_len += bytes_added;
+ dirty = TRUE;
++ if (tmp_prop.tp_len <= 0)
++ continue; // drop this text property
+ }
+! mch_memmove(props + wi * sizeof(textprop_T), &tmp_prop,
+ sizeof(textprop_T));
+! ++wi;
+! }
+! if (dirty)
+! {
+! curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
+! curbuf->b_ml.ml_line_len = textlen + wi * sizeof(textprop_T);
+ }
+ }
+
+*** ../vim-8.1.0681/src/globals.h 2018-12-28 17:01:55.307292166 +0100
+--- src/globals.h 2019-01-02 23:34:48.578210818 +0100
+***************
+*** 1658,1663 ****
+--- 1658,1667 ----
+ EXTERN int ctrl_break_was_pressed INIT(= FALSE);
+ #endif
+
++ #ifdef FEAT_TEXT_PROP
++ EXTERN int text_prop_frozen INIT(= 0);
++ #endif
++
+ /*
+ * Optional Farsi support. Include it here, so EXTERN and INIT are defined.
+ */
+*** ../vim-8.1.0681/src/testdir/test_textprop.vim 2019-01-02 18:00:22.639279766 +0100
+--- src/testdir/test_textprop.vim 2019-01-02 23:40:51.275394461 +0100
+***************
+*** 145,150 ****
+--- 145,163 ----
+ bwipe!
+ endfunc
+
++ func SetupOneLine()
++ call setline(1, 'xonex xtwoxx')
++ call AddPropTypes()
++ call prop_add(1, 2, {'length': 3, 'id': 11, 'type': 'one'})
++ call prop_add(1, 8, {'length': 3, 'id': 12, 'type': 'two'})
++ let expected = [
++ \ {'col': 2, 'length': 3, 'id': 11, 'type': 'one', 'start': 1, 'end': 1},
++ \ {'col': 8, 'length': 3, 'id': 12, 'type': 'two', 'start': 1, 'end': 1},
++ \]
++ call assert_equal(expected, prop_list(1))
++ return expected
++ endfunc
++
+ func Test_prop_add_remove_buf()
+ new
+ let bufnr = bufnr('')
+***************
+*** 180,194 ****
+ func Test_prop_backspace()
+ new
+ set bs=2
+! call setline(1, 'xonex xtwoxx')
+! call AddPropTypes()
+! call prop_add(1, 2, {'length': 3, 'id': 11, 'type': 'one'})
+! call prop_add(1, 8, {'length': 3, 'id': 12, 'type': 'two'})
+! let expected = [
+! \ {'col': 2, 'length': 3, 'id': 11, 'type': 'one', 'start': 1, 'end': 1},
+! \ {'col': 8, 'length': 3, 'id': 12, 'type': 'two', 'start': 1, 'end': 1},
+! \]
+! call assert_equal(expected, prop_list(1))
+
+ exe "normal 0li\<BS>\<Esc>fxli\<BS>\<Esc>"
+ call assert_equal('one xtwoxx', getline(1))
+--- 193,199 ----
+ func Test_prop_backspace()
+ new
+ set bs=2
+! let expected = SetupOneLine() " 'xonex xtwoxx'
+
+ exe "normal 0li\<BS>\<Esc>fxli\<BS>\<Esc>"
+ call assert_equal('one xtwoxx', getline(1))
+***************
+*** 197,202 ****
+--- 202,233 ----
+ call assert_equal(expected, prop_list(1))
+
+ call DeletePropTypes()
++ bwipe!
++ set bs&
++ endfunc
++
++ func Test_prop_replace()
++ new
++ set bs=2
++ let expected = SetupOneLine() " 'xonex xtwoxx'
++
++ exe "normal 0Ryyy\<Esc>"
++ call assert_equal('yyyex xtwoxx', getline(1))
++ call assert_equal(expected, prop_list(1))
++
++ exe "normal ftRyy\<BS>"
++ call assert_equal('yyyex xywoxx', getline(1))
++ call assert_equal(expected, prop_list(1))
++
++ exe "normal 0fwRyy\<BS>"
++ call assert_equal('yyyex xyyoxx', getline(1))
++ call assert_equal(expected, prop_list(1))
++
++ exe "normal 0foRyy\<BS>\<BS>"
++ call assert_equal('yyyex xyyoxx', getline(1))
++ call assert_equal(expected, prop_list(1))
++
++ call DeletePropTypes()
+ bwipe!
+ set bs&
+ endfunc
+*** ../vim-8.1.0681/src/version.c 2019-01-02 18:00:22.643279731 +0100
+--- src/version.c 2019-01-02 20:08:26.854766257 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 682,
+ /**/
+
+--
+From "know your smileys":
+ :-| :-| Deja' vu!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0683 b/data/vim/patches/8.1.0683
new file mode 100644
index 000000000..6749e457d
--- /dev/null
+++ b/data/vim/patches/8.1.0683
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0683
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0683
+Problem: Spell highlighting does not always end. (Gary Johnson)
+Solution: Also reset char_attr when spell errors are highlighted.
+Files: src/screen.c
+
+
+*** ../vim-8.1.0682/src/screen.c 2019-01-01 20:31:26.887563043 +0100
+--- src/screen.c 2019-01-03 21:38:38.393891286 +0100
+***************
+*** 4161,4167 ****
+ break;
+ }
+
+! if (draw_state == WL_LINE && area_highlighting)
+ {
+ /* handle Visual or match highlighting in this line */
+ if (vcol == fromcol
+--- 4161,4171 ----
+ break;
+ }
+
+! if (draw_state == WL_LINE && (area_highlighting
+! #ifdef FEAT_SPELL
+! || has_spell
+! #endif
+! ))
+ {
+ /* handle Visual or match highlighting in this line */
+ if (vcol == fromcol
+*** ../vim-8.1.0682/src/version.c 2019-01-02 23:47:14.360433274 +0100
+--- src/version.c 2019-01-03 21:41:13.152654216 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 683,
+ /**/
+
+--
+# echo reboot >universe
+# chmod +x universe
+# ./universe
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0684 b/data/vim/patches/8.1.0684
new file mode 100644
index 000000000..a7a3a6b84
--- /dev/null
+++ b/data/vim/patches/8.1.0684
@@ -0,0 +1,161 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0684
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0684
+Problem: Warnings from 64-bit compiler.
+Solution: Add type casts. (Mike Williams)
+Files: src/memline.c, src/textprop.c
+
+
+*** ../vim-8.1.0683/src/memline.c 2018-12-28 23:22:36.270750732 +0100
+--- src/memline.c 2019-01-03 21:53:17.378822555 +0100
+***************
+*** 562,568 ****
+ /* Skip data block with negative block number.
+ * Should not happen, because of the ml_preserve()
+ * above. Get same block again for next index. */
+! ++idx;
+ continue;
+ }
+
+--- 562,568 ----
+ /* Skip data block with negative block number.
+ * Should not happen, because of the ml_preserve()
+ * above. Get same block again for next index. */
+! ++idx;
+ continue;
+ }
+
+***************
+*** 3350,3356 ****
+ internal_error("no text property below deleted line");
+ return;
+ }
+! this_props_len = line_size - textlen;
+ }
+
+ found = FALSE;
+--- 3350,3356 ----
+ internal_error("no text property below deleted line");
+ return;
+ }
+! this_props_len = line_size - (int)textlen;
+ }
+
+ found = FALSE;
+***************
+*** 3489,3495 ****
+
+ if ((long)textlen < line_size)
+ {
+! textprop_save_len = line_size - textlen;
+ textprop_save = vim_memsave((char_u *)dp + line_start + textlen,
+ textprop_save_len);
+ }
+--- 3489,3495 ----
+
+ if ((long)textlen < line_size)
+ {
+! textprop_save_len = line_size - (int)textlen;
+ textprop_save = vim_memsave((char_u *)dp + line_start + textlen,
+ textprop_save_len);
+ }
+***************
+*** 5379,5385 ****
+ // the text prop info would also be counted. Go over the
+ // lines.
+ for (i = end_idx; i < idx; ++i)
+! size += STRLEN((char_u *)dp + (dp->db_index[i] & DB_INDEX_MASK)) + 1;
+ }
+ else
+ #endif
+--- 5379,5385 ----
+ // the text prop info would also be counted. Go over the
+ // lines.
+ for (i = end_idx; i < idx; ++i)
+! size += (int)STRLEN((char_u *)dp + (dp->db_index[i] & DB_INDEX_MASK)) + 1;
+ }
+ else
+ #endif
+***************
+*** 5588,5594 ****
+ // lengths.
+ len = 0;
+ for (i = start_idx; i <= idx; ++i)
+! len += STRLEN((char_u *)dp + ((dp->db_index[i]) & DB_INDEX_MASK)) + 1;
+ }
+ else
+ #endif
+--- 5588,5594 ----
+ // lengths.
+ len = 0;
+ for (i = start_idx; i <= idx; ++i)
+! len += (int)STRLEN((char_u *)dp + ((dp->db_index[i]) & DB_INDEX_MASK)) + 1;
+ }
+ else
+ #endif
+*** ../vim-8.1.0683/src/textprop.c 2019-01-02 23:47:14.360433274 +0100
+--- src/textprop.c 2019-01-03 21:53:17.378822555 +0100
+***************
+*** 262,270 ****
+ if (lnum == end_lnum)
+ length = end_col - col;
+ else
+! length = textlen - col + 1;
+ if (length > (long)textlen)
+! length = textlen; // can include the end-of-line
+ if (length < 0)
+ length = 0; // zero-width property
+
+--- 262,270 ----
+ if (lnum == end_lnum)
+ length = end_col - col;
+ else
+! length = (int)textlen - col + 1;
+ if (length > (long)textlen)
+! length = (int)textlen; // can include the end-of-line
+ if (length < 0)
+ length = 0; // zero-width property
+
+***************
+*** 972,978 ****
+ if (dirty)
+ {
+ curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
+! curbuf->b_ml.ml_line_len = textlen + wi * sizeof(textprop_T);
+ }
+ }
+
+--- 972,978 ----
+ if (dirty)
+ {
+ curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
+! curbuf->b_ml.ml_line_len = (int)textlen + wi * sizeof(textprop_T);
+ }
+ }
+
+*** ../vim-8.1.0683/src/version.c 2019-01-03 21:44:30.267072385 +0100
+--- src/version.c 2019-01-03 21:54:19.434321091 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 684,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+94. Now admit it... How many of you have made "modem noises" into
+ the phone just to see if it was possible? :-)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0685 b/data/vim/patches/8.1.0685
new file mode 100644
index 000000000..e209adde5
--- /dev/null
+++ b/data/vim/patches/8.1.0685
@@ -0,0 +1,434 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0685
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0685
+Problem: get_buf_tv() is named inconsistently.
+Solution: Rename it to tv_get_buf(). (Yegappan Lakshmanan, closes #3759)
+Files: src/evalfunc.c, src/proto/evalfunc.pro, src/terminal.c,
+ src/textprop.c
+
+
+*** ../vim-8.1.0684/src/evalfunc.c 2019-01-02 13:40:26.989339500 +0100
+--- src/evalfunc.c 2019-01-03 22:17:14.412655875 +0100
+***************
+*** 1424,1430 ****
+ linenr_T lnum;
+ buf_T *buf;
+
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+--- 1424,1430 ----
+ linenr_T lnum;
+ buf_T *buf;
+
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+***************
+*** 1892,1898 ****
+ * Get buffer by number or pattern.
+ */
+ buf_T *
+! get_buf_tv(typval_T *tv, int curtab_only)
+ {
+ char_u *name = tv->vval.v_string;
+ buf_T *buf;
+--- 1892,1898 ----
+ * Get buffer by number or pattern.
+ */
+ buf_T *
+! tv_get_buf(typval_T *tv, int curtab_only)
+ {
+ char_u *name = tv->vval.v_string;
+ buf_T *buf;
+***************
+*** 1925,1931 ****
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ rettv->v_type = VAR_STRING;
+ if (buf != NULL && buf->b_fname != NULL)
+ rettv->vval.v_string = vim_strsave(buf->b_fname);
+--- 1925,1931 ----
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ rettv->v_type = VAR_STRING;
+ if (buf != NULL && buf->b_fname != NULL)
+ rettv->vval.v_string = vim_strsave(buf->b_fname);
+***************
+*** 1946,1952 ****
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+
+ /* If the buffer isn't found and the second argument is not zero create a
+--- 1946,1952 ----
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ --emsg_off;
+
+ /* If the buffer isn't found and the second argument is not zero create a
+***************
+*** 1974,1980 ****
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], TRUE);
+ FOR_ALL_WINDOWS(wp)
+ {
+ ++winnr;
+--- 1974,1980 ----
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], TRUE);
+ FOR_ALL_WINDOWS(wp)
+ {
+ ++winnr;
+***************
+*** 2962,2968 ****
+ tabpage_T *tp;
+ win_T *wp;
+
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ {
+ rettv->vval.v_number = 1; /* FAIL */
+--- 2962,2968 ----
+ tabpage_T *tp;
+ win_T *wp;
+
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ {
+ rettv->vval.v_number = 1; /* FAIL */
+***************
+*** 4525,4531 ****
+ /* Information about one buffer. Argument specifies the buffer */
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! argbuf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+ if (argbuf == NULL)
+ return;
+--- 4525,4531 ----
+ /* Information about one buffer. Argument specifies the buffer */
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! argbuf = tv_get_buf(&argvars[0], FALSE);
+ --emsg_off;
+ if (argbuf == NULL)
+ return;
+***************
+*** 4609,4615 ****
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+
+ lnum = tv_get_lnum_buf(&argvars[1], buf);
+--- 4609,4615 ----
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ --emsg_off;
+
+ lnum = tv_get_lnum_buf(&argvars[1], buf);
+***************
+*** 4636,4642 ****
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ varname = tv_get_string_chk(&argvars[1]);
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+--- 4636,4642 ----
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ varname = tv_get_string_chk(&argvars[1]);
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+***************
+*** 4707,4713 ****
+ #ifdef FEAT_JUMPLIST
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+ if (buf == NULL)
+ return;
+--- 4707,4713 ----
+ #ifdef FEAT_JUMPLIST
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ --emsg_off;
+ if (buf == NULL)
+ return;
+***************
+*** 8721,8727 ****
+
+ if (check_secure())
+ return;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+--- 8721,8727 ----
+
+ if (check_secure())
+ return;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+***************
+*** 8750,8756 ****
+
+ if (check_secure())
+ return;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+--- 8750,8756 ----
+
+ if (check_secure())
+ return;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+***************
+*** 8778,8784 ****
+
+ if (check_secure())
+ return;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+--- 8778,8784 ----
+
+ if (check_secure())
+ return;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+***************
+*** 10580,10586 ****
+ linenr_T lnum;
+ buf_T *buf;
+
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+--- 10580,10586 ----
+ linenr_T lnum;
+ buf_T *buf;
+
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+***************
+*** 10605,10611 ****
+ return;
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ varname = tv_get_string_chk(&argvars[1]);
+! buf = get_buf_tv(&argvars[0], FALSE);
+ varp = &argvars[2];
+
+ if (buf != NULL && varname != NULL && varp != NULL)
+--- 10605,10611 ----
+ return;
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ varname = tv_get_string_chk(&argvars[1]);
+! buf = tv_get_buf(&argvars[0], FALSE);
+ varp = &argvars[2];
+
+ if (buf != NULL && varname != NULL && varp != NULL)
+***************
+*** 11365,11371 ****
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ // get signs placed in this buffer
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+--- 11365,11371 ----
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ // get signs placed in this buffer
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+***************
+*** 11457,11463 ****
+ goto cleanup;
+
+ // Buffer to place the sign
+! buf = get_buf_tv(&argvars[3], FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(&argvars[2]));
+--- 11457,11463 ----
+ goto cleanup;
+
+ // Buffer to place the sign
+! buf = tv_get_buf(&argvars[3], FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(&argvars[2]));
+***************
+*** 11566,11572 ****
+
+ if ((di = dict_find(dict, (char_u *)"buffer", -1)) != NULL)
+ {
+! buf = get_buf_tv(&di->di_tv, FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+--- 11566,11572 ----
+
+ if ((di = dict_find(dict, (char_u *)"buffer", -1)) != NULL)
+ {
+! buf = tv_get_buf(&di->di_tv, FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+***************
+*** 12812,12818 ****
+ 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;
+--- 12812,12818 ----
+ buf_T *buf;
+
+ rettv->v_type = VAR_STRING;
+! buf = tv_get_buf(&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;
+*** ../vim-8.1.0684/src/proto/evalfunc.pro 2018-12-22 13:27:59.115503998 +0100
+--- src/proto/evalfunc.pro 2019-01-03 22:17:14.412655875 +0100
+***************
+*** 4,10 ****
+ int find_internal_func(char_u *name);
+ int call_internal_func(char_u *name, int argcount, typval_T *argvars, typval_T *rettv);
+ buf_T *buflist_find_by_name(char_u *name, int curtab_only);
+! buf_T *get_buf_tv(typval_T *tv, int curtab_only);
+ void execute_redir_str(char_u *value, int value_len);
+ void mzscheme_call_vim(char_u *name, typval_T *args, typval_T *rettv);
+ float_T vim_round(float_T f);
+--- 4,10 ----
+ int find_internal_func(char_u *name);
+ int call_internal_func(char_u *name, int argcount, typval_T *argvars, typval_T *rettv);
+ buf_T *buflist_find_by_name(char_u *name, int curtab_only);
+! buf_T *tv_get_buf(typval_T *tv, int curtab_only);
+ void execute_redir_str(char_u *value, int value_len);
+ void mzscheme_call_vim(char_u *name, typval_T *args, typval_T *rettv);
+ float_T vim_round(float_T f);
+*** ../vim-8.1.0684/src/terminal.c 2018-12-27 21:26:56.426251398 +0100
+--- src/terminal.c 2019-01-03 22:17:14.412655875 +0100
+***************
+*** 3842,3848 ****
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+ if (buf == NULL || buf->b_term == NULL)
+ {
+--- 3842,3848 ----
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ --emsg_off;
+ if (buf == NULL || buf->b_term == NULL)
+ {
+*** ../vim-8.1.0684/src/textprop.c 2019-01-03 21:55:28.445763264 +0100
+--- src/textprop.c 2019-01-03 22:17:14.412655875 +0100
+***************
+*** 130,136 ****
+ 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;
+ }
+--- 130,136 ----
+ di = dict_find(arg->vval.v_dict, (char_u *)"bufnr", -1);
+ if (di != NULL)
+ {
+! *buf = tv_get_buf(&di->di_tv, FALSE);
+ if (*buf == NULL)
+ return FAIL;
+ }
+***************
+*** 533,539 ****
+ di = dict_find(dict, (char_u *)"bufnr", -1);
+ if (di != NULL)
+ {
+! buf = get_buf_tv(&di->di_tv, FALSE);
+ if (buf == NULL)
+ return;
+ }
+--- 533,539 ----
+ di = dict_find(dict, (char_u *)"bufnr", -1);
+ if (di != NULL)
+ {
+! buf = tv_get_buf(&di->di_tv, FALSE);
+ if (buf == NULL)
+ return;
+ }
+*** ../vim-8.1.0684/src/version.c 2019-01-03 21:55:28.445763264 +0100
+--- src/version.c 2019-01-03 22:16:39.124922332 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 685,
+ /**/
+
+--
+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.0686 b/data/vim/patches/8.1.0686
new file mode 100644
index 000000000..f55350a6a
--- /dev/null
+++ b/data/vim/patches/8.1.0686
@@ -0,0 +1,102 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0686
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0686
+Problem: When 'y' is in 'cpoptions' yanking for the clipboard changes redo.
+Solution: Do not use the 'y' flag when "gui_yank" is TRUE. (Andy Massimino,
+ closes #3760)
+Files: src/normal.c
+
+
+*** ../vim-8.1.0685/src/normal.c 2018-12-27 23:44:34.797953474 +0100
+--- src/normal.c 2019-01-03 22:44:19.691216710 +0100
+***************
+*** 1326,1332 ****
+ #endif
+
+ /*
+! * Handle an operator after visual mode or when the movement is finished
+ */
+ void
+ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
+--- 1326,1333 ----
+ #endif
+
+ /*
+! * Handle an operator after Visual mode or when the movement is finished.
+! * "gui_yank" is true when yanking text for the clipboard.
+ */
+ void
+ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
+***************
+*** 1372,1377 ****
+--- 1373,1382 ----
+ */
+ if ((finish_op || VIsual_active) && oap->op_type != OP_NOP)
+ {
++ // Yank can be redone when 'y' is in 'cpoptions', but not when yanking
++ // for the clipboard.
++ int redo_yank = vim_strchr(p_cpo, CPO_YANK) != NULL && !gui_yank;
++
+ #ifdef FEAT_LINEBREAK
+ /* Avoid a problem with unwanted linebreaks in block mode. */
+ if (curwin->w_p_lbr)
+***************
+*** 1407,1413 ****
+
+ /* Only redo yank when 'y' flag is in 'cpoptions'. */
+ /* Never redo "zf" (define fold). */
+! if ((vim_strchr(p_cpo, CPO_YANK) != NULL || oap->op_type != OP_YANK)
+ && ((!VIsual_active || oap->motion_force)
+ /* Also redo Operator-pending Visual mode mappings */
+ || (VIsual_active && cap->cmdchar == ':'
+--- 1412,1418 ----
+
+ /* Only redo yank when 'y' flag is in 'cpoptions'. */
+ /* Never redo "zf" (define fold). */
+! if ((redo_yank || oap->op_type != OP_YANK)
+ && ((!VIsual_active || oap->motion_force)
+ /* Also redo Operator-pending Visual mode mappings */
+ || (VIsual_active && cap->cmdchar == ':'
+***************
+*** 1628,1634 ****
+ }
+
+ /* can't redo yank (unless 'y' is in 'cpoptions') and ":" */
+! if ((vim_strchr(p_cpo, CPO_YANK) != NULL || oap->op_type != OP_YANK)
+ && oap->op_type != OP_COLON
+ #ifdef FEAT_FOLDING
+ && oap->op_type != OP_FOLD
+--- 1633,1639 ----
+ }
+
+ /* can't redo yank (unless 'y' is in 'cpoptions') and ":" */
+! if ((redo_yank || oap->op_type != OP_YANK)
+ && oap->op_type != OP_COLON
+ #ifdef FEAT_FOLDING
+ && oap->op_type != OP_FOLD
+*** ../vim-8.1.0685/src/version.c 2019-01-03 22:19:22.231686171 +0100
+--- src/version.c 2019-01-03 22:49:06.824825954 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 686,
+ /**/
+
+--
+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.0687 b/data/vim/patches/8.1.0687
new file mode 100644
index 000000000..e8e59c134
--- /dev/null
+++ b/data/vim/patches/8.1.0687
@@ -0,0 +1,82 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0687
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0687
+Problem: Sentence text object in Visual mode is not tested.
+Solution: Add a test. (Dominique Pelle, closes #3758)
+Files: src/testdir/test_visual.vim
+
+
+*** ../vim-8.1.0686/src/testdir/test_visual.vim 2018-05-20 14:06:34.506186527 +0200
+--- src/testdir/test_visual.vim 2019-01-03 23:07:00.840215683 +0100
+***************
+*** 273,275 ****
+--- 273,316 ----
+ %d_
+ set bs&vim
+ endfunc
++
++ func Test_Visual_sentence_textobject()
++ new
++ call setline(1, ['First sentence. Second sentence. Third', 'sentence. Fouth sentence'])
++
++ " When start and end of visual area are identical, 'as' or 'is' select
++ " the whole sentence.
++ norm! 1gofdvasy
++ call assert_equal('Second sentence. ', @")
++ norm! 1gofdvisy
++ call assert_equal('Second sentence.', @")
++
++ " When start and end of visual area are not identical, 'as' or 'is'
++ " extend the sentence in direction of the end of the visual area.
++ norm! 1gofdvlasy
++ call assert_equal('d sentence. ', @")
++ norm! gvasy
++ call assert_equal("d sentence. Third\nsentence. ", @")
++
++ norm! 1gofdvlisy
++ call assert_equal('d sentence.', @")
++ norm! gvisy
++ call assert_equal('d sentence. ', @")
++ norm! gvisy
++ call assert_equal("d sentence. Third\nsentence.", @")
++
++ " Extend visual area in opposite direction.
++ norm! 1gofdvhasy
++ call assert_equal(' Second', @")
++ norm! gvasy
++ call assert_equal("First sentence. Second", @")
++
++ norm! 1gofdvhisy
++ call assert_equal('Second', @")
++ norm! gvisy
++ call assert_equal(' Second', @")
++ norm! gvisy
++ call assert_equal('First sentence. Second', @")
++
++ bwipe!
++ endfunc
+*** ../vim-8.1.0686/src/version.c 2019-01-03 22:57:59.540478092 +0100
+--- src/version.c 2019-01-03 23:10:17.406875504 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 687,
+ /**/
+
+--
+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.0688 b/data/vim/patches/8.1.0688
new file mode 100644
index 000000000..283d8700e
--- /dev/null
+++ b/data/vim/patches/8.1.0688
@@ -0,0 +1,896 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0688
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0688
+Problem: Text properties are not restored by undo.
+Solution: Also save text properties for undo.
+Files: src/structs.h, src/undo.c, src/memline.c, src/proto/memline.pro
+
+
+*** ../vim-8.1.0687/src/structs.h 2019-01-01 19:47:17.854123944 +0100
+--- src/structs.h 2019-01-04 00:16:36.240809643 +0100
+***************
+*** 347,352 ****
+--- 347,360 ----
+ * structures used for undo
+ */
+
++ // One line saved for undo. After the NUL terminated text there might be text
++ // properties, thus ul_len can be larger than STRLEN(ul_line) + 1.
++ typedef struct {
++ char_u *ul_line; // text of the line
++ long ul_len; // length of the line including NUL, plus text
++ // properties
++ } undoline_T;
++
+ typedef struct u_entry u_entry_T;
+ typedef struct u_header u_header_T;
+ struct u_entry
+***************
+*** 355,361 ****
+ linenr_T ue_top; /* number of line above undo block */
+ linenr_T ue_bot; /* number of line below undo block */
+ linenr_T ue_lcount; /* linecount when u_save called */
+! char_u **ue_array; /* array of lines in undo block */
+ long ue_size; /* number of lines in ue_array */
+ #ifdef U_DEBUG
+ int ue_magic; /* magic number to check allocation */
+--- 363,369 ----
+ linenr_T ue_top; /* number of line above undo block */
+ linenr_T ue_bot; /* number of line below undo block */
+ linenr_T ue_lcount; /* linecount when u_save called */
+! undoline_T *ue_array; /* array of lines in undo block */
+ long ue_size; /* number of lines in ue_array */
+ #ifdef U_DEBUG
+ int ue_magic; /* magic number to check allocation */
+***************
+*** 2167,2173 ****
+ /*
+ * variables for "U" command in undo.c
+ */
+! char_u *b_u_line_ptr; /* saved line for "U" command */
+ linenr_T b_u_line_lnum; /* line number of line in u_line */
+ colnr_T b_u_line_colnr; /* optional column number */
+
+--- 2175,2181 ----
+ /*
+ * variables for "U" command in undo.c
+ */
+! undoline_T b_u_line_ptr; /* saved line for "U" command */
+ linenr_T b_u_line_lnum; /* line number of line in u_line */
+ colnr_T b_u_line_colnr; /* optional column number */
+
+*** ../vim-8.1.0687/src/undo.c 2018-09-30 21:43:17.207693209 +0200
+--- src/undo.c 2019-01-04 14:57:06.670029116 +0100
+***************
+*** 125,131 ****
+ #endif
+
+ #define U_ALLOC_LINE(size) lalloc((long_u)(size), FALSE)
+- static char_u *u_save_line(linenr_T);
+
+ /* used in undo_end() to report number of added and deleted lines */
+ static long u_newcount, u_oldcount;
+--- 125,130 ----
+***************
+*** 353,358 ****
+--- 352,379 ----
+ }
+
+ /*
++ * u_save_line(): save an allocated copy of line "lnum" into "ul".
++ * Returns FAIL when out of memory.
++ */
++ static int
++ u_save_line(undoline_T *ul, linenr_T lnum)
++ {
++ char_u *line = ml_get(lnum);
++
++ if (curbuf->b_ml.ml_line_len == 0)
++ {
++ ul->ul_len = 1;
++ ul->ul_line = vim_strsave((char_u *)"");
++ }
++ else
++ {
++ ul->ul_len = curbuf->b_ml.ml_line_len;
++ ul->ul_line = vim_memsave(line, ul->ul_len);
++ }
++ return ul->ul_line == NULL ? FAIL : OK;
++ }
++
++ /*
+ * Common code for various ways to save text before a change.
+ * "top" is the line above the first changed line.
+ * "bot" is the line below the last changed line.
+***************
+*** 664,671 ****
+
+ if (size > 0)
+ {
+! if ((uep->ue_array = (char_u **)U_ALLOC_LINE(
+! sizeof(char_u *) * size)) == NULL)
+ {
+ u_freeentry(uep, 0L);
+ goto nomem;
+--- 685,692 ----
+
+ if (size > 0)
+ {
+! if ((uep->ue_array = (undoline_T *)U_ALLOC_LINE(
+! sizeof(undoline_T) * size)) == NULL)
+ {
+ u_freeentry(uep, 0L);
+ goto nomem;
+***************
+*** 678,684 ****
+ u_freeentry(uep, i);
+ return FAIL;
+ }
+! if ((uep->ue_array[i] = u_save_line(lnum++)) == NULL)
+ {
+ u_freeentry(uep, i);
+ goto nomem;
+--- 699,705 ----
+ u_freeentry(uep, i);
+ return FAIL;
+ }
+! if (u_save_line(&uep->ue_array[i], lnum++) == FAIL)
+ {
+ u_freeentry(uep, i);
+ goto nomem;
+***************
+*** 1111,1116 ****
+--- 1132,1139 ----
+ vim_free(ptr);
+ return NULL;
+ }
++ // In case there are text properties there already is a NUL, but
++ // checking for that is more expensive than just adding a dummy byte.
+ ptr[len] = NUL;
+ #ifdef FEAT_CRYPT
+ if (bi->bi_state != NULL && bi->bi_buffer == NULL)
+***************
+*** 1126,1132 ****
+ static int
+ serialize_header(bufinfo_T *bi, char_u *hash)
+ {
+! int len;
+ buf_T *buf = bi->bi_buf;
+ FILE *fp = bi->bi_fp;
+ char_u time_buf[8];
+--- 1149,1155 ----
+ static int
+ serialize_header(bufinfo_T *bi, char_u *hash)
+ {
+! long len;
+ buf_T *buf = bi->bi_buf;
+ FILE *fp = bi->bi_fp;
+ char_u time_buf[8];
+***************
+*** 1148,1154 ****
+ buf->b_p_key, &header, &header_len);
+ if (bi->bi_state == NULL)
+ return FAIL;
+! len = (int)fwrite(header, (size_t)header_len, (size_t)1, fp);
+ vim_free(header);
+ if (len != 1)
+ {
+--- 1171,1177 ----
+ buf->b_p_key, &header, &header_len);
+ if (bi->bi_state == NULL)
+ return FAIL;
+! len = (long)fwrite(header, (size_t)header_len, (size_t)1, fp);
+ vim_free(header);
+ if (len != 1)
+ {
+***************
+*** 1181,1189 ****
+
+ /* buffer-specific data */
+ undo_write_bytes(bi, (long_u)buf->b_ml.ml_line_count, 4);
+! len = buf->b_u_line_ptr != NULL ? (int)STRLEN(buf->b_u_line_ptr) : 0;
+ undo_write_bytes(bi, (long_u)len, 4);
+! if (len > 0 && fwrite_crypt(bi, buf->b_u_line_ptr, (size_t)len) == FAIL)
+ return FAIL;
+ undo_write_bytes(bi, (long_u)buf->b_u_line_lnum, 4);
+ undo_write_bytes(bi, (long_u)buf->b_u_line_colnr, 4);
+--- 1204,1213 ----
+
+ /* buffer-specific data */
+ undo_write_bytes(bi, (long_u)buf->b_ml.ml_line_count, 4);
+! len = buf->b_u_line_ptr.ul_line == NULL
+! ? 0 : STRLEN(buf->b_u_line_ptr.ul_line);
+ undo_write_bytes(bi, (long_u)len, 4);
+! if (len > 0 && fwrite_crypt(bi, buf->b_u_line_ptr.ul_line, (size_t)len) == FAIL)
+ return FAIL;
+ undo_write_bytes(bi, (long_u)buf->b_u_line_lnum, 4);
+ undo_write_bytes(bi, (long_u)buf->b_u_line_colnr, 4);
+***************
+*** 1360,1369 ****
+ undo_write_bytes(bi, (long_u)uep->ue_size, 4);
+ for (i = 0; i < uep->ue_size; ++i)
+ {
+! len = STRLEN(uep->ue_array[i]);
+ if (undo_write_bytes(bi, (long_u)len, 4) == FAIL)
+ return FAIL;
+! if (len > 0 && fwrite_crypt(bi, uep->ue_array[i], len) == FAIL)
+ return FAIL;
+ }
+ return OK;
+--- 1384,1395 ----
+ undo_write_bytes(bi, (long_u)uep->ue_size, 4);
+ for (i = 0; i < uep->ue_size; ++i)
+ {
+! // Text is written without the text properties, since we cannot restore
+! // the text property types.
+! len = STRLEN(uep->ue_array[i].ul_line);
+ if (undo_write_bytes(bi, (long_u)len, 4) == FAIL)
+ return FAIL;
+! if (len > 0 && fwrite_crypt(bi, uep->ue_array[i].ul_line, len) == FAIL)
+ return FAIL;
+ }
+ return OK;
+***************
+*** 1374,1380 ****
+ {
+ int i;
+ u_entry_T *uep;
+! char_u **array = NULL;
+ char_u *line;
+ int line_len;
+
+--- 1400,1406 ----
+ {
+ int i;
+ u_entry_T *uep;
+! undoline_T *array = NULL;
+ char_u *line;
+ int line_len;
+
+***************
+*** 1392,1404 ****
+ if (uep->ue_size > 0)
+ {
+ if (uep->ue_size < LONG_MAX / (int)sizeof(char_u *))
+! array = (char_u **)U_ALLOC_LINE(sizeof(char_u *) * uep->ue_size);
+ if (array == NULL)
+ {
+ *error = TRUE;
+ return uep;
+ }
+! vim_memset(array, 0, sizeof(char_u *) * uep->ue_size);
+ }
+ uep->ue_array = array;
+
+--- 1418,1430 ----
+ if (uep->ue_size > 0)
+ {
+ if (uep->ue_size < LONG_MAX / (int)sizeof(char_u *))
+! array = (undoline_T *)U_ALLOC_LINE(sizeof(undoline_T) * uep->ue_size);
+ if (array == NULL)
+ {
+ *error = TRUE;
+ return uep;
+ }
+! vim_memset(array, 0, sizeof(undoline_T) * uep->ue_size);
+ }
+ uep->ue_array = array;
+
+***************
+*** 1417,1423 ****
+ *error = TRUE;
+ return uep;
+ }
+! array[i] = line;
+ }
+ return uep;
+ }
+--- 1443,1450 ----
+ *error = TRUE;
+ return uep;
+ }
+! array[i].ul_line = line;
+! array[i].ul_len = line_len + 1;
+ }
+ return uep;
+ }
+***************
+*** 1610,1616 ****
+
+ /* If there is no undo information at all, quit here after deleting any
+ * existing undo file. */
+! if (buf->b_u_numhead == 0 && buf->b_u_line_ptr == NULL)
+ {
+ if (p_verbose > 0)
+ verb_msg((char_u *)_("Skipping undo file write, nothing to undo"));
+--- 1637,1643 ----
+
+ /* If there is no undo information at all, quit here after deleting any
+ * existing undo file. */
+! if (buf->b_u_numhead == 0 && buf->b_u_line_ptr.ul_line == NULL)
+ {
+ if (p_verbose > 0)
+ verb_msg((char_u *)_("Skipping undo file write, nothing to undo"));
+***************
+*** 1771,1777 ****
+ char_u *file_name;
+ FILE *fp;
+ long version, str_len;
+! char_u *line_ptr = NULL;
+ linenr_T line_lnum;
+ colnr_T line_colnr;
+ linenr_T line_count;
+--- 1798,1804 ----
+ char_u *file_name;
+ FILE *fp;
+ long version, str_len;
+! undoline_T line_ptr;
+ linenr_T line_lnum;
+ colnr_T line_colnr;
+ linenr_T line_count;
+***************
+*** 1798,1803 ****
+--- 1825,1833 ----
+ bufinfo_T bi;
+
+ vim_memset(&bi, 0, sizeof(bi));
++ line_ptr.ul_len = 0;
++ line_ptr.ul_line = NULL;
++
+ if (name == NULL)
+ {
+ file_name = u_get_undo_file_name(curbuf->b_ffname, TRUE);
+***************
+*** 1917,1923 ****
+ if (str_len < 0)
+ goto error;
+ if (str_len > 0)
+! line_ptr = read_string_decrypt(&bi, str_len);
+ line_lnum = (linenr_T)undo_read_4c(&bi);
+ line_colnr = (colnr_T)undo_read_4c(&bi);
+ if (line_lnum < 0 || line_colnr < 0)
+--- 1947,1956 ----
+ if (str_len < 0)
+ goto error;
+ if (str_len > 0)
+! {
+! line_ptr.ul_line = read_string_decrypt(&bi, str_len);
+! line_ptr.ul_len = str_len + 1;
+! }
+ line_lnum = (linenr_T)undo_read_4c(&bi);
+ line_colnr = (colnr_T)undo_read_4c(&bi);
+ if (line_lnum < 0 || line_colnr < 0)
+***************
+*** 2098,2104 ****
+ goto theend;
+
+ error:
+! vim_free(line_ptr);
+ if (uhp_table != NULL)
+ {
+ for (i = 0; i < num_read_uhps; i++)
+--- 2131,2137 ----
+ goto theend;
+
+ error:
+! vim_free(line_ptr.ul_line);
+ if (uhp_table != NULL)
+ {
+ for (i = 0; i < num_read_uhps; i++)
+***************
+*** 2596,2602 ****
+ static void
+ u_undoredo(int undo)
+ {
+! char_u **newarray = NULL;
+ linenr_T oldsize;
+ linenr_T newsize;
+ linenr_T top, bot;
+--- 2629,2635 ----
+ static void
+ u_undoredo(int undo)
+ {
+! undoline_T *newarray = NULL;
+ linenr_T oldsize;
+ linenr_T newsize;
+ linenr_T top, bot;
+***************
+*** 2669,2676 ****
+ * undoing auto-formatting puts the cursor in the previous
+ * line. */
+ for (i = 0; i < newsize && i < oldsize; ++i)
+! if (STRCMP(uep->ue_array[i], ml_get(top + 1 + i)) != 0)
+ break;
+ if (i == newsize && newlnum == MAXLNUM && uep->ue_next == NULL)
+ {
+ newlnum = top;
+--- 2702,2714 ----
+ * undoing auto-formatting puts the cursor in the previous
+ * line. */
+ for (i = 0; i < newsize && i < oldsize; ++i)
+! {
+! char_u *p = ml_get(top + 1 + i);
+!
+! if (curbuf->b_ml.ml_line_len != uep->ue_array[i].ul_len
+! || memcmp(uep->ue_array[i].ul_line, p, curbuf->b_ml.ml_line_len) != 0)
+ break;
++ }
+ if (i == newsize && newlnum == MAXLNUM && uep->ue_next == NULL)
+ {
+ newlnum = top;
+***************
+*** 2689,2698 ****
+ /* delete the lines between top and bot and save them in newarray */
+ if (oldsize > 0)
+ {
+! if ((newarray = (char_u **)U_ALLOC_LINE(
+! sizeof(char_u *) * oldsize)) == NULL)
+ {
+! do_outofmem_msg((long_u)(sizeof(char_u *) * oldsize));
+ /*
+ * We have messed up the entry list, repair is impossible.
+ * we have to free the rest of the list.
+--- 2727,2736 ----
+ /* delete the lines between top and bot and save them in newarray */
+ if (oldsize > 0)
+ {
+! if ((newarray = (undoline_T *)U_ALLOC_LINE(
+! sizeof(undoline_T) * oldsize)) == NULL)
+ {
+! do_outofmem_msg((long_u)(sizeof(undoline_T) * oldsize));
+ /*
+ * We have messed up the entry list, repair is impossible.
+ * we have to free the rest of the list.
+***************
+*** 2709,2715 ****
+ for (lnum = bot - 1, i = oldsize; --i >= 0; --lnum)
+ {
+ /* what can we do when we run out of memory? */
+! if ((newarray[i] = u_save_line(lnum)) == NULL)
+ do_outofmem_msg((long_u)0);
+ /* remember we deleted the last line in the buffer, and a
+ * dummy empty line will be inserted */
+--- 2747,2753 ----
+ for (lnum = bot - 1, i = oldsize; --i >= 0; --lnum)
+ {
+ /* what can we do when we run out of memory? */
+! if (u_save_line(&newarray[i], lnum) == FAIL)
+ do_outofmem_msg((long_u)0);
+ /* remember we deleted the last line in the buffer, and a
+ * dummy empty line will be inserted */
+***************
+*** 2726,2740 ****
+ {
+ for (lnum = top, i = 0; i < newsize; ++i, ++lnum)
+ {
+! /*
+! * If the file is empty, there is an empty line 1 that we
+! * should get rid of, by replacing it with the new line
+! */
+ if (empty_buffer && lnum == 0)
+! ml_replace((linenr_T)1, uep->ue_array[i], TRUE);
+ else
+! ml_append(lnum, uep->ue_array[i], (colnr_T)0, FALSE);
+! vim_free(uep->ue_array[i]);
+ }
+ vim_free((char_u *)uep->ue_array);
+ }
+--- 2764,2776 ----
+ {
+ for (lnum = top, i = 0; i < newsize; ++i, ++lnum)
+ {
+! // If the file is empty, there is an empty line 1 that we
+! // should get rid of, by replacing it with the new line.
+ if (empty_buffer && lnum == 0)
+! ml_replace_len((linenr_T)1, uep->ue_array[i].ul_line, uep->ue_array[i].ul_len, TRUE, TRUE);
+ else
+! ml_append(lnum, uep->ue_array[i].ul_line, (colnr_T)uep->ue_array[i].ul_len, FALSE);
+! vim_free(uep->ue_array[i].ul_line);
+ }
+ vim_free((char_u *)uep->ue_array);
+ }
+***************
+*** 3172,3184 ****
+
+ for (lnum = 1; lnum < curbuf->b_ml.ml_line_count
+ && lnum <= uep->ue_size; ++lnum)
+! if (STRCMP(ml_get_buf(curbuf, lnum, FALSE),
+! uep->ue_array[lnum - 1]) != 0)
+ {
+ CLEAR_POS(&(uhp->uh_cursor));
+ uhp->uh_cursor.lnum = lnum;
+ return;
+ }
+ if (curbuf->b_ml.ml_line_count != uep->ue_size)
+ {
+ /* lines added or deleted at the end, put the cursor there */
+--- 3208,3224 ----
+
+ for (lnum = 1; lnum < curbuf->b_ml.ml_line_count
+ && lnum <= uep->ue_size; ++lnum)
+! {
+! char_u *p = ml_get_buf(curbuf, lnum, FALSE);
+!
+! if (uep->ue_array[lnum - 1].ul_len != curbuf->b_ml.ml_line_len
+! || memcmp(p, uep->ue_array[lnum - 1].ul_line, uep->ue_array[lnum - 1].ul_len) != 0)
+ {
+ CLEAR_POS(&(uhp->uh_cursor));
+ uhp->uh_cursor.lnum = lnum;
+ return;
+ }
++ }
+ if (curbuf->b_ml.ml_line_count != uep->ue_size)
+ {
+ /* lines added or deleted at the end, put the cursor there */
+***************
+*** 3383,3389 ****
+ u_freeentry(u_entry_T *uep, long n)
+ {
+ while (n > 0)
+! vim_free(uep->ue_array[--n]);
+ vim_free((char_u *)uep->ue_array);
+ #ifdef U_DEBUG
+ uep->ue_magic = 0;
+--- 3423,3429 ----
+ u_freeentry(u_entry_T *uep, long n)
+ {
+ while (n > 0)
+! vim_free(uep->ue_array[--n].ul_line);
+ vim_free((char_u *)uep->ue_array);
+ #ifdef U_DEBUG
+ uep->ue_magic = 0;
+***************
+*** 3400,3411 ****
+ buf->b_u_newhead = buf->b_u_oldhead = buf->b_u_curhead = NULL;
+ buf->b_u_synced = TRUE;
+ buf->b_u_numhead = 0;
+! buf->b_u_line_ptr = NULL;
+ buf->b_u_line_lnum = 0;
+ }
+
+ /*
+! * save the line "lnum" for the "U" command
+ */
+ void
+ u_saveline(linenr_T lnum)
+--- 3440,3452 ----
+ buf->b_u_newhead = buf->b_u_oldhead = buf->b_u_curhead = NULL;
+ buf->b_u_synced = TRUE;
+ buf->b_u_numhead = 0;
+! buf->b_u_line_ptr.ul_line = NULL;
+! buf->b_u_line_ptr.ul_len = 0;
+ buf->b_u_line_lnum = 0;
+ }
+
+ /*
+! * Save the line "lnum" for the "U" command.
+ */
+ void
+ u_saveline(linenr_T lnum)
+***************
+*** 3420,3426 ****
+ curbuf->b_u_line_colnr = curwin->w_cursor.col;
+ else
+ curbuf->b_u_line_colnr = 0;
+! if ((curbuf->b_u_line_ptr = u_save_line(lnum)) == NULL)
+ do_outofmem_msg((long_u)0);
+ }
+
+--- 3461,3467 ----
+ curbuf->b_u_line_colnr = curwin->w_cursor.col;
+ else
+ curbuf->b_u_line_colnr = 0;
+! if (u_save_line(&curbuf->b_u_line_ptr, lnum) == FAIL)
+ do_outofmem_msg((long_u)0);
+ }
+
+***************
+*** 3431,3439 ****
+ void
+ u_clearline(void)
+ {
+! if (curbuf->b_u_line_ptr != NULL)
+ {
+! VIM_CLEAR(curbuf->b_u_line_ptr);
+ curbuf->b_u_line_lnum = 0;
+ }
+ }
+--- 3472,3481 ----
+ void
+ u_clearline(void)
+ {
+! if (curbuf->b_u_line_ptr.ul_line != NULL)
+ {
+! VIM_CLEAR(curbuf->b_u_line_ptr.ul_line);
+! curbuf->b_u_line_ptr.ul_len = 0;
+ curbuf->b_u_line_lnum = 0;
+ }
+ }
+***************
+*** 3447,3478 ****
+ void
+ u_undoline(void)
+ {
+! colnr_T t;
+! char_u *oldp;
+
+ if (undo_off)
+ return;
+
+! if (curbuf->b_u_line_ptr == NULL
+ || curbuf->b_u_line_lnum > curbuf->b_ml.ml_line_count)
+ {
+ beep_flush();
+ return;
+ }
+
+! /* first save the line for the 'u' command */
+ if (u_savecommon(curbuf->b_u_line_lnum - 1,
+ curbuf->b_u_line_lnum + 1, (linenr_T)0, FALSE) == FAIL)
+ return;
+! oldp = u_save_line(curbuf->b_u_line_lnum);
+! if (oldp == NULL)
+ {
+ do_outofmem_msg((long_u)0);
+ return;
+ }
+! ml_replace(curbuf->b_u_line_lnum, curbuf->b_u_line_ptr, TRUE);
+ changed_bytes(curbuf->b_u_line_lnum, 0);
+- vim_free(curbuf->b_u_line_ptr);
+ curbuf->b_u_line_ptr = oldp;
+
+ t = curbuf->b_u_line_colnr;
+--- 3489,3518 ----
+ void
+ u_undoline(void)
+ {
+! colnr_T t;
+! undoline_T oldp;
+
+ if (undo_off)
+ return;
+
+! if (curbuf->b_u_line_ptr.ul_line == NULL
+ || curbuf->b_u_line_lnum > curbuf->b_ml.ml_line_count)
+ {
+ beep_flush();
+ return;
+ }
+
+! // first save the line for the 'u' command
+ if (u_savecommon(curbuf->b_u_line_lnum - 1,
+ curbuf->b_u_line_lnum + 1, (linenr_T)0, FALSE) == FAIL)
+ return;
+! if (u_save_line(&oldp, curbuf->b_u_line_lnum) == FAIL)
+ {
+ do_outofmem_msg((long_u)0);
+ return;
+ }
+! ml_replace_len(curbuf->b_u_line_lnum, curbuf->b_u_line_ptr.ul_line, curbuf->b_u_line_ptr.ul_len, TRUE, FALSE);
+ changed_bytes(curbuf->b_u_line_lnum, 0);
+ curbuf->b_u_line_ptr = oldp;
+
+ t = curbuf->b_u_line_colnr;
+***************
+*** 3491,3507 ****
+ {
+ while (buf->b_u_oldhead != NULL)
+ u_freeheader(buf, buf->b_u_oldhead, NULL);
+! vim_free(buf->b_u_line_ptr);
+! }
+!
+! /*
+! * u_save_line(): allocate memory and copy line 'lnum' into it.
+! * Returns NULL when out of memory.
+! */
+! static char_u *
+! u_save_line(linenr_T lnum)
+! {
+! return vim_strsave(ml_get(lnum));
+ }
+
+ /*
+--- 3531,3537 ----
+ {
+ while (buf->b_u_oldhead != NULL)
+ u_freeheader(buf, buf->b_u_oldhead, NULL);
+! vim_free(buf->b_u_line_ptr.ul_line);
+ }
+
+ /*
+*** ../vim-8.1.0687/src/memline.c 2019-01-03 21:55:28.441763295 +0100
+--- src/memline.c 2019-01-04 12:26:05.397062087 +0100
+***************
+*** 3217,3227 ****
+
+ if (line != NULL)
+ len = (colnr_T)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;
+--- 3217,3238 ----
+
+ if (line != NULL)
+ len = (colnr_T)STRLEN(line);
+! return ml_replace_len(lnum, line, len, FALSE, copy);
+ }
+
++ /*
++ * Replace a line for the current buffer. Like ml_replace() with:
++ * "len_arg" is the length of the text, excluding NUL.
++ * If "has_props" is TRUE then "line_arg" includes the text properties and
++ * "len_arg" includes the NUL of the text.
++ */
+ int
+! ml_replace_len(
+! linenr_T lnum,
+! char_u *line_arg,
+! colnr_T len_arg,
+! int has_props,
+! int copy)
+ {
+ char_u *line = line_arg;
+ colnr_T len = len_arg;
+***************
+*** 3233,3240 ****
+ 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())
+ {
+--- 3244,3264 ----
+ if (curbuf->b_ml.ml_mfp == NULL && open_buffer(FALSE, NULL, 0) == FAIL)
+ return FAIL;
+
+! if (!has_props)
+! ++len; // include the NUL after the text
+! if (copy)
+! {
+! // copy the line to allocated memory
+! #ifdef FEAT_TEXT_PROP
+! if (has_props)
+! line = vim_memsave(line, len);
+! else
+! #endif
+! line = vim_strnsave(line, len - 1);
+! if (line == NULL)
+! return FAIL;
+! }
+!
+ #ifdef FEAT_NETBEANS_INTG
+ if (netbeans_active())
+ {
+***************
+*** 3249,3262 ****
+ curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
+
+ #ifdef FEAT_TEXT_PROP
+! if (curbuf->b_has_textprop)
+ // Need to fetch the old line to copy over any text properties.
+ ml_get_buf(curbuf, lnum, TRUE);
+ #endif
+ }
+
+ #ifdef FEAT_TEXT_PROP
+! if (curbuf->b_has_textprop)
+ {
+ size_t oldtextlen = STRLEN(curbuf->b_ml.ml_line_ptr) + 1;
+
+--- 3273,3286 ----
+ curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
+
+ #ifdef FEAT_TEXT_PROP
+! if (curbuf->b_has_textprop && !has_props)
+ // Need to fetch the old line to copy over any text properties.
+ ml_get_buf(curbuf, lnum, TRUE);
+ #endif
+ }
+
+ #ifdef FEAT_TEXT_PROP
+! if (curbuf->b_has_textprop && !has_props)
+ {
+ size_t oldtextlen = STRLEN(curbuf->b_ml.ml_line_ptr) + 1;
+
+***************
+*** 3266,3276 ****
+ size_t textproplen = curbuf->b_ml.ml_line_len - oldtextlen;
+
+ // Need to copy over text properties, stored after the text.
+! newline = alloc(len + 1 + (int)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 += (colnr_T)textproplen;
+--- 3290,3300 ----
+ size_t textproplen = curbuf->b_ml.ml_line_len - oldtextlen;
+
+ // Need to copy over text properties, stored after the text.
+! newline = alloc(len + (int)textproplen);
+ if (newline != NULL)
+ {
+! mch_memmove(newline, line, len);
+! mch_memmove(newline + len, curbuf->b_ml.ml_line_ptr + oldtextlen, textproplen);
+ vim_free(line);
+ line = newline;
+ len += (colnr_T)textproplen;
+***************
+*** 3279,3289 ****
+ }
+ #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;
+
+--- 3303,3313 ----
+ }
+ #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;
+ curbuf->b_ml.ml_line_lnum = lnum;
+ curbuf->b_ml.ml_flags = (curbuf->b_ml.ml_flags | ML_LINE_DIRTY) & ~ML_EMPTY;
+
+*** ../vim-8.1.0687/src/proto/memline.pro 2018-12-13 22:17:52.877941474 +0100
+--- src/proto/memline.pro 2019-01-04 12:01:57.866003664 +0100
+***************
+*** 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);
+--- 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 has_props, int copy);
+ int ml_delete(linenr_T lnum, int message);
+ void ml_setmarked(linenr_T lnum);
+ linenr_T ml_firstmarked(void);
+*** ../vim-8.1.0687/src/version.c 2019-01-03 23:10:28.338798991 +0100
+--- src/version.c 2019-01-03 23:49:46.821265249 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 688,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+102. When filling out your driver's license application, you give
+ your IP 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.0689 b/data/vim/patches/8.1.0689
new file mode 100644
index 000000000..f06edc042
--- /dev/null
+++ b/data/vim/patches/8.1.0689
@@ -0,0 +1,97 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0689
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0689 (after 8.1.0688)
+Problem: Undo with text properties not tested.
+Solution: Add a test function.
+Files: src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.0688/src/testdir/test_textprop.vim 2019-01-02 23:47:14.360433274 +0100
+--- src/testdir/test_textprop.vim 2019-01-04 17:19:52.549408306 +0100
+***************
+*** 348,353 ****
+--- 348,406 ----
+ call prop_type_delete('comment')
+ endfunc
+
++ func Test_prop_undo()
++ new
++ call prop_type_add('comment', {'highlight': 'Directory'})
++ call setline(1, ['oneone', 'twotwo', 'three'])
++ " Set 'undolevels' to break changes into undo-able pieces.
++ set ul&
++
++ call prop_add(1, 3, {'end_col': 5, 'type': 'comment'})
++ let expected = [{'col': 3, 'length': 2, 'id': 0, 'type': 'comment', 'start': 1, 'end': 1} ]
++ call assert_equal(expected, prop_list(1))
++
++ " Insert a character, then undo.
++ exe "normal 0lllix\<Esc>"
++ set ul&
++ let expected[0].length = 3
++ call assert_equal(expected, prop_list(1))
++ undo
++ let expected[0].length = 2
++ call assert_equal(expected, prop_list(1))
++
++ " Delete a character, then undo
++ exe "normal 0lllx"
++ set ul&
++ let expected[0].length = 1
++ call assert_equal(expected, prop_list(1))
++ undo
++ let expected[0].length = 2
++ call assert_equal(expected, prop_list(1))
++
++ " Delete the line, then undo
++ 1d
++ set ul&
++ call assert_equal([], prop_list(1))
++ undo
++ call assert_equal(expected, prop_list(1))
++
++ " Insert a character, delete two characters, then undo with "U"
++ exe "normal 0lllix\<Esc>"
++ set ul&
++ let expected[0].length = 3
++ call assert_equal(expected, prop_list(1))
++ exe "normal 0lllxx"
++ set ul&
++ let expected[0].length = 1
++ call assert_equal(expected, prop_list(1))
++ normal U
++ let expected[0].length = 2
++ call assert_equal(expected, prop_list(1))
++
++ bwipe!
++ call prop_type_delete('comment')
++ endfunc
++
+ " screenshot test with textprop highlighting
+ funct Test_textprop_screenshots()
+ if !CanRunVimInTerminal() || &encoding != 'utf-8'
+*** ../vim-8.1.0688/src/version.c 2019-01-04 15:09:52.922373054 +0100
+--- src/version.c 2019-01-04 17:20:55.164995001 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 689,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+104. When people ask about the Presidential Election you ask "Which country?"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0690 b/data/vim/patches/8.1.0690
new file mode 100644
index 000000000..bf719a3ea
--- /dev/null
+++ b/data/vim/patches/8.1.0690
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0690
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0690
+Problem: setline() and setbufline() do not clear text properties.
+Solution: Clear text properties when setting the text.
+Files: src/evalfunc.c, src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.0689/src/evalfunc.c 2019-01-03 22:19:22.227686199 +0100
+--- src/evalfunc.c 2019-01-04 18:02:36.548302845 +0100
+***************
+*** 1357,1364 ****
+
+ if (!append && lnum <= curbuf->b_ml.ml_line_count)
+ {
+! /* existing line, replace it */
+! if (u_savesub(lnum) == OK && ml_replace(lnum, line, TRUE) == OK)
+ {
+ changed_bytes(lnum, 0);
+ if (is_curbuf && lnum == curwin->w_cursor.lnum)
+--- 1357,1366 ----
+
+ if (!append && lnum <= curbuf->b_ml.ml_line_count)
+ {
+! // Existing line, replace it.
+! // Removes any existing text properties.
+! if (u_savesub(lnum) == OK && ml_replace_len(
+! lnum, line, (colnr_T)STRLEN(line) + 1, TRUE, TRUE) == OK)
+ {
+ changed_bytes(lnum, 0);
+ if (is_curbuf && lnum == curwin->w_cursor.lnum)
+*** ../vim-8.1.0689/src/testdir/test_textprop.vim 2019-01-04 17:21:19.144832959 +0100
+--- src/testdir/test_textprop.vim 2019-01-04 18:00:00.365686883 +0100
+***************
+*** 261,266 ****
+--- 261,295 ----
+ bwipe!
+ endfunc
+
++ func Test_prop_setline()
++ new
++ call AddPropTypes()
++ call SetupPropsInFirstLine()
++ call assert_equal(s:expected_props, prop_list(1))
++
++ call setline(1, 'foobar')
++ call assert_equal([], prop_list(1))
++
++ call DeletePropTypes()
++ bwipe!
++ endfunc
++
++ func Test_prop_setbufline()
++ new
++ call AddPropTypes()
++ call SetupPropsInFirstLine()
++ let bufnr = bufnr('')
++ wincmd w
++ call assert_equal(s:expected_props, prop_list(1, {'bufnr': bufnr}))
++
++ call setbufline(bufnr, 1, 'foobar')
++ call assert_equal([], prop_list(1, {'bufnr': bufnr}))
++
++ wincmd w
++ call DeletePropTypes()
++ bwipe!
++ endfunc
++
+ " Setup a three line prop in lines 2 - 4.
+ " Add short props in line 1 and 5.
+ func Setup_three_line_prop()
+*** ../vim-8.1.0689/src/version.c 2019-01-04 17:21:19.144832959 +0100
+--- src/version.c 2019-01-04 17:58:33.190465147 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 690,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+105. When someone asks you for your address, you tell them your URL.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0691 b/data/vim/patches/8.1.0691
new file mode 100644
index 000000000..4b41350fe
--- /dev/null
+++ b/data/vim/patches/8.1.0691
@@ -0,0 +1,460 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0691
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0691
+Problem: Text properties are not adjusted for :substitute.
+Solution: Adjust text properties as well as possible.
+Files: src/ex_cmds.c, src/textprop.c, src/proto/textprop.pro,
+ src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.0690/src/ex_cmds.c 2019-01-01 13:20:05.940711222 +0100
+--- src/ex_cmds.c 2019-01-04 21:45:26.793312693 +0100
+***************
+*** 5628,5636 ****
+--- 5628,5646 ----
+ * - original text up to match
+ * - length of substituted part
+ * - original text after match
++ * Adjust text properties here, since we have all information
++ * needed.
+ */
+ if (nmatch == 1)
++ {
+ p1 = sub_firstline;
++ #ifdef FEAT_TEXT_PROP
++ if (curbuf->b_has_textprop)
++ adjust_prop_columns(lnum, regmatch.startpos[0].col,
++ sublen - 1 - (regmatch.endpos[0].col
++ - regmatch.startpos[0].col));
++ #endif
++ }
+ else
+ {
+ p1 = ml_get(sub_firstlnum + nmatch - 1);
+***************
+*** 5732,5742 ****
+ STRMOVE(p1, p1 + 1);
+ else if (*p1 == CAR)
+ {
+! if (u_inssub(lnum) == OK) /* prepare for undo */
+ {
+! *p1 = NUL; /* truncate up to the CR */
+! ml_append(lnum - 1, new_start,
+! (colnr_T)(p1 - new_start + 1), FALSE);
+ mark_adjust(lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
+ if (subflags.do_ask)
+ appended_lines(lnum - 1, 1L);
+--- 5742,5753 ----
+ STRMOVE(p1, p1 + 1);
+ else if (*p1 == CAR)
+ {
+! if (u_inssub(lnum) == OK) // prepare for undo
+ {
+! colnr_T plen = (colnr_T)(p1 - new_start + 1);
+!
+! *p1 = NUL; // truncate up to the CR
+! ml_append(lnum - 1, new_start, plen, FALSE);
+ mark_adjust(lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
+ if (subflags.do_ask)
+ appended_lines(lnum - 1, 1L);
+***************
+*** 5746,5758 ****
+ first_line = lnum;
+ last_line = lnum + 1;
+ }
+! /* All line numbers increase. */
+ ++sub_firstlnum;
+ ++lnum;
+ ++line2;
+! /* move the cursor to the new line, like Vi */
+ ++curwin->w_cursor.lnum;
+! /* copy the rest */
+ STRMOVE(new_start, p1 + 1);
+ p1 = new_start - 1;
+ }
+--- 5757,5772 ----
+ first_line = lnum;
+ last_line = lnum + 1;
+ }
+! #ifdef FEAT_TEXT_PROP
+! adjust_props_for_split(lnum, plen, 1);
+! #endif
+! // all line numbers increase
+ ++sub_firstlnum;
+ ++lnum;
+ ++line2;
+! // move the cursor to the new line, like Vi
+ ++curwin->w_cursor.lnum;
+! // copy the rest
+ STRMOVE(new_start, p1 + 1);
+ p1 = new_start - 1;
+ }
+*** ../vim-8.1.0690/src/textprop.c 2019-01-03 22:19:22.231686171 +0100
+--- src/textprop.c 2019-01-04 23:07:43.454356479 +0100
+***************
+*** 18,23 ****
+--- 18,25 ----
+ *
+ * TODO:
+ * - Adjust text property column and length when text is inserted/deleted.
++ * -> a :substitute with a multi-line match
++ * -> search for changed_bytes() from ex_cmds.c
+ * - Perhaps we only need TP_FLAG_CONT_NEXT and can drop TP_FLAG_CONT_PREV?
+ * - Add an arrray for global_proptypes, to quickly lookup a prop type by ID
+ * - Add an arrray for b_proptypes, to quickly lookup a prop type by ID
+***************
+*** 346,351 ****
+--- 348,381 ----
+ return (int)(proplen / sizeof(textprop_T));
+ }
+
++ /*
++ * Set the text properties for line "lnum" to "props" with length "len".
++ * If "len" is zero text properties are removed, "props" is not used.
++ * Any existing text properties are dropped.
++ * Only works for the current buffer.
++ */
++ static void
++ set_text_props(linenr_T lnum, char_u *props, int len)
++ {
++ char_u *text;
++ char_u *newtext;
++ size_t textlen;
++
++ text = ml_get(lnum);
++ textlen = STRLEN(text) + 1;
++ newtext = alloc(textlen + len);
++ if (newtext == NULL)
++ return;
++ mch_memmove(newtext, text, textlen);
++ if (len > 0)
++ mch_memmove(newtext + textlen, props, len);
++ if (curbuf->b_ml.ml_flags & ML_LINE_DIRTY)
++ vim_free(curbuf->b_ml.ml_line_ptr);
++ curbuf->b_ml.ml_line_ptr = newtext;
++ curbuf->b_ml.ml_line_len = textlen + len;
++ curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
++ }
++
+ static proptype_T *
+ find_type_by_id(hashtab_T *ht, int id)
+ {
+***************
+*** 976,979 ****
+--- 1006,1074 ----
+ }
+ }
+
++ /*
++ * Adjust text properties for a line that was split in two.
++ * "lnum" is the newly inserted line. The text properties are now on the line
++ * below it. "kept" is the number of bytes kept in the first line, while
++ * "deleted" is the number of bytes deleted.
++ */
++ void
++ adjust_props_for_split(linenr_T lnum, int kept, int deleted)
++ {
++ char_u *props;
++ int count;
++ garray_T prevprop;
++ garray_T nextprop;
++ int i;
++ int skipped = kept + deleted;
++
++ if (!curbuf->b_has_textprop)
++ return;
++ count = get_text_props(curbuf, lnum + 1, &props, FALSE);
++ ga_init2(&prevprop, sizeof(textprop_T), 10);
++ ga_init2(&nextprop, sizeof(textprop_T), 10);
++
++ // Get the text properties, which are at "lnum + 1".
++ // Keep the relevant ones in the first line, reducing the length if needed.
++ // Copy the ones that include the split to the second line.
++ // Move the ones after the split to the second line.
++ for (i = 0; i < count; ++i)
++ {
++ textprop_T prop;
++ textprop_T *p;
++
++ // copy the prop to an aligned structure
++ mch_memmove(&prop, props + i * sizeof(textprop_T), sizeof(textprop_T));
++
++ if (prop.tp_col < kept && ga_grow(&prevprop, 1) == OK)
++ {
++ p = ((textprop_T *)prevprop.ga_data) + prevprop.ga_len;
++ *p = prop;
++ if (p->tp_col + p->tp_len >= kept)
++ p->tp_len = kept - p->tp_col;
++ ++prevprop.ga_len;
++ }
++
++ if (prop.tp_col + prop.tp_len >= skipped && ga_grow(&nextprop, 1) == OK)
++ {
++ p = ((textprop_T *)nextprop.ga_data) + nextprop.ga_len;
++ *p = prop;
++ if (p->tp_col > skipped)
++ p->tp_col -= skipped - 1;
++ else
++ {
++ p->tp_len -= skipped - p->tp_col;
++ p->tp_col = 1;
++ }
++ ++nextprop.ga_len;
++ }
++ }
++
++ set_text_props(lnum, prevprop.ga_data, prevprop.ga_len * sizeof(textprop_T));
++ ga_clear(&prevprop);
++
++ set_text_props(lnum + 1, nextprop.ga_data, nextprop.ga_len * sizeof(textprop_T));
++ ga_clear(&nextprop);
++ }
++
+ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.0690/src/proto/textprop.pro 2019-01-01 19:47:17.854123944 +0100
+--- src/proto/textprop.pro 2019-01-04 21:47:36.892257155 +0100
+***************
+*** 14,17 ****
+--- 14,18 ----
+ void clear_global_prop_types(void);
+ void clear_buf_prop_types(buf_T *buf);
+ void adjust_prop_columns(linenr_T lnum, colnr_T col, int bytes_added);
++ void adjust_props_for_split(linenr_T lnum, int kept, int deleted);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0690/src/testdir/test_textprop.vim 2019-01-04 18:07:20.981806698 +0100
+--- src/testdir/test_textprop.vim 2019-01-04 22:54:06.720964163 +0100
+***************
+*** 89,118 ****
+ 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))
+
+ " Prop without length or end column is zero length
+ call prop_clear(1)
+--- 89,122 ----
+ 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, 9, {'length': 5, 'id': 13, 'type': 'three'})
+ call prop_add(1, 1, {'length': 13, 'id': 14, 'type': 'whole'})
+ endfunc
+
+! func Get_expected_props()
+! return [
+! \ {'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': 9, 'length': 5, 'id': 13, 'type': 'three', 'start': 1, 'end': 1},
+ \ ]
++ endfunc
+
+ func Test_prop_add()
+ new
+ call AddPropTypes()
+ call SetupPropsInFirstLine()
+! let expected_props = Get_expected_props()
+! call assert_equal(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(expected_props, prop_list(2))
+ " Delete a line above, text props must still be there.
+ 1del
+! call assert_equal(expected_props, prop_list(1))
+
+ " Prop without length or end column is zero length
+ call prop_clear(1)
+***************
+*** 128,134 ****
+ new
+ call AddPropTypes()
+ call SetupPropsInFirstLine()
+! let props = deepcopy(s:expected_props)
+ call assert_equal(props, prop_list(1))
+
+ " remove by id
+--- 132,138 ----
+ new
+ call AddPropTypes()
+ call SetupPropsInFirstLine()
+! let props = Get_expected_props()
+ call assert_equal(props, prop_list(1))
+
+ " remove by id
+***************
+*** 236,242 ****
+ new
+ call AddPropTypes()
+ call SetupPropsInFirstLine()
+! call assert_equal(s:expected_props, prop_list(1))
+
+ call prop_clear(1)
+ call assert_equal([], prop_list(1))
+--- 240,246 ----
+ new
+ call AddPropTypes()
+ call SetupPropsInFirstLine()
+! call assert_equal(Get_expected_props(), prop_list(1))
+
+ call prop_clear(1)
+ call assert_equal([], prop_list(1))
+***************
+*** 251,257 ****
+ 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}))
+--- 255,261 ----
+ call SetupPropsInFirstLine()
+ let bufnr = bufnr('')
+ wincmd w
+! call assert_equal(Get_expected_props(), prop_list(1, {'bufnr': bufnr}))
+
+ call prop_clear(1, 1, {'bufnr': bufnr})
+ call assert_equal([], prop_list(1, {'bufnr': bufnr}))
+***************
+*** 265,271 ****
+ new
+ call AddPropTypes()
+ call SetupPropsInFirstLine()
+! call assert_equal(s:expected_props, prop_list(1))
+
+ call setline(1, 'foobar')
+ call assert_equal([], prop_list(1))
+--- 269,275 ----
+ new
+ call AddPropTypes()
+ call SetupPropsInFirstLine()
+! call assert_equal(Get_expected_props(), prop_list(1))
+
+ call setline(1, 'foobar')
+ call assert_equal([], prop_list(1))
+***************
+*** 280,286 ****
+ call SetupPropsInFirstLine()
+ let bufnr = bufnr('')
+ wincmd w
+! call assert_equal(s:expected_props, prop_list(1, {'bufnr': bufnr}))
+
+ call setbufline(bufnr, 1, 'foobar')
+ call assert_equal([], prop_list(1, {'bufnr': bufnr}))
+--- 284,290 ----
+ call SetupPropsInFirstLine()
+ let bufnr = bufnr('')
+ wincmd w
+! call assert_equal(Get_expected_props(), prop_list(1, {'bufnr': bufnr}))
+
+ call setbufline(bufnr, 1, 'foobar')
+ call assert_equal([], prop_list(1, {'bufnr': bufnr}))
+***************
+*** 289,294 ****
+--- 293,346 ----
+ call DeletePropTypes()
+ bwipe!
+ endfunc
++
++ func Test_prop_substitute()
++ new
++ " Set first line to 'one two three'
++ call AddPropTypes()
++ call SetupPropsInFirstLine()
++ let expected_props = Get_expected_props()
++ call assert_equal(expected_props, prop_list(1))
++
++ " Change "n" in "one" to XX: 'oXXe two three'
++ s/n/XX/
++ let expected_props[0].length += 1
++ let expected_props[1].length += 1
++ let expected_props[2].col += 1
++ let expected_props[3].col += 1
++ call assert_equal(expected_props, prop_list(1))
++
++ " Delete "t" in "two" and "three" to XX: 'oXXe wo hree'
++ s/t//g
++ let expected_props[0].length -= 2
++ let expected_props[2].length -= 1
++ let expected_props[3].length -= 1
++ let expected_props[3].col -= 1
++ call assert_equal(expected_props, prop_list(1))
++
++ " Split the line by changing w to line break: 'oXXe ', 'o hree'
++ " The long prop is split and spans both lines.
++ " The props on "two" and "three" move to the next line.
++ s/w/\r/
++ let new_props = [
++ \ copy(expected_props[0]),
++ \ copy(expected_props[2]),
++ \ copy(expected_props[3]),
++ \ ]
++ let expected_props[0].length = 5
++ unlet expected_props[3]
++ unlet expected_props[2]
++ call assert_equal(expected_props, prop_list(1))
++
++ let new_props[0].length = 6
++ let new_props[1].col = 1
++ let new_props[1].length = 1
++ let new_props[2].col = 3
++ call assert_equal(new_props, prop_list(2))
++
++ call DeletePropTypes()
++ bwipe!
++ endfunc
+
+ " Setup a three line prop in lines 2 - 4.
+ " Add short props in line 1 and 5.
+*** ../vim-8.1.0690/src/version.c 2019-01-04 18:07:20.981806698 +0100
+--- src/version.c 2019-01-04 18:39:18.369177640 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 691,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+106. When told to "go to your room" you inform your parents that you
+ can't...because you were kicked out and banned.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0692 b/data/vim/patches/8.1.0692
new file mode 100644
index 000000000..103577179
--- /dev/null
+++ b/data/vim/patches/8.1.0692
@@ -0,0 +1,148 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0692
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0692
+Problem: If a buffer was deleted a channel can't write to it.
+Solution: When the buffer exists but was unloaded, prepare it for writing.
+ (closes #3764)
+Files: src/channel.c, src/testdir/test_channel.vim
+
+
+*** ../vim-8.1.0691/src/channel.c 2018-12-21 16:04:16.312437516 +0100
+--- src/channel.c 2019-01-04 23:59:05.527410601 +0100
+***************
+*** 1099,1104 ****
+--- 1099,1123 ----
+ }
+
+ /*
++ * Prepare buffer "buf" for writing channel output to.
++ */
++ static void
++ prepare_buffer(buf_T *buf)
++ {
++ buf_T *save_curbuf = curbuf;
++
++ buf_copy_options(buf, BCO_ENTER);
++ curbuf = buf;
++ #ifdef FEAT_QUICKFIX
++ set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL);
++ set_option_value((char_u *)"bh", 0L, (char_u *)"hide", OPT_LOCAL);
++ #endif
++ if (curbuf->b_ml.ml_mfp == NULL)
++ ml_open(curbuf);
++ curbuf = save_curbuf;
++ }
++
++ /*
+ * Find a buffer matching "name" or create a new one.
+ * Returns NULL if there is something very wrong (error already reported).
+ */
+***************
+*** 1120,1133 ****
+ NULL, (linenr_T)0, BLN_LISTED | BLN_NEW);
+ if (buf == NULL)
+ return NULL;
+! buf_copy_options(buf, BCO_ENTER);
+ curbuf = buf;
+- #ifdef FEAT_QUICKFIX
+- set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL);
+- set_option_value((char_u *)"bh", 0L, (char_u *)"hide", OPT_LOCAL);
+- #endif
+- if (curbuf->b_ml.ml_mfp == NULL)
+- ml_open(curbuf);
+ if (msg)
+ ml_replace(1, (char_u *)(err ? "Reading from channel error..."
+ : "Reading from channel output..."), TRUE);
+--- 1139,1147 ----
+ NULL, (linenr_T)0, BLN_LISTED | BLN_NEW);
+ if (buf == NULL)
+ return NULL;
+! prepare_buffer(buf);
+!
+ curbuf = buf;
+ if (msg)
+ ml_replace(1, (char_u *)(err ? "Reading from channel error..."
+ : "Reading from channel output..."), TRUE);
+***************
+*** 1244,1249 ****
+--- 1258,1266 ----
+ ch_log(channel, "writing out to buffer '%s'",
+ (char *)buf->b_ffname);
+ set_bufref(&channel->ch_part[PART_OUT].ch_bufref, buf);
++ // if the buffer was deleted or unloaded resurrect it
++ if (buf->b_ml.ml_mfp == NULL)
++ prepare_buffer(buf);
+ }
+ }
+ }
+***************
+*** 1287,1292 ****
+--- 1304,1312 ----
+ ch_log(channel, "writing err to buffer '%s'",
+ (char *)buf->b_ffname);
+ set_bufref(&channel->ch_part[PART_ERR].ch_bufref, buf);
++ // if the buffer was deleted or unloaded resurrect it
++ if (buf->b_ml.ml_mfp == NULL)
++ prepare_buffer(buf);
+ }
+ }
+ }
+*** ../vim-8.1.0691/src/testdir/test_channel.vim 2018-12-14 22:42:10.191670447 +0100
+--- src/testdir/test_channel.vim 2019-01-04 23:58:11.943811833 +0100
+***************
+*** 1645,1650 ****
+--- 1645,1672 ----
+ bwipe!
+ endfunc
+
++ func Test_write_to_deleted_buffer()
++ if !executable('echo') || !has('job')
++ return
++ endif
++ let job = job_start('echo hello', {'out_io': 'buffer', 'out_name': 'test_buffer', 'out_msg': 0})
++ call WaitForAssert({-> assert_equal("dead", job_status(job))})
++ let bufnr = bufnr('test_buffer')
++ call assert_equal(['hello'], getbufline(bufnr, 1, '$'))
++ call assert_equal('nofile', getbufvar(bufnr, '&buftype'))
++ call assert_equal('hide', getbufvar(bufnr, '&bufhidden'))
++ bdel test_buffer
++ call assert_equal([], getbufline(bufnr, 1, '$'))
++
++ let job = job_start('echo hello', {'out_io': 'buffer', 'out_name': 'test_buffer', 'out_msg': 0})
++ call WaitForAssert({-> assert_equal("dead", job_status(job))})
++ call assert_equal(['hello'], getbufline(bufnr, 1, '$'))
++ call assert_equal('nofile', getbufvar(bufnr, '&buftype'))
++ call assert_equal('hide', getbufvar(bufnr, '&bufhidden'))
++
++ bwipe! test_buffer
++ endfunc
++
+ func Test_cmd_parsing()
+ if !has('unix')
+ return
+*** ../vim-8.1.0691/src/version.c 2019-01-04 23:09:45.249360567 +0100
+--- src/version.c 2019-01-05 00:02:09.446027308 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 692,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+107. When using your phone you forget that you don't have to use your
+ keyboard.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0693 b/data/vim/patches/8.1.0693
new file mode 100644
index 000000000..97896398f
--- /dev/null
+++ b/data/vim/patches/8.1.0693
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0693
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0693 (after 8.1.0692)
+Problem: Channel test fails sometimes.
+Solution: Avoid race condition.
+Files: src/testdir/test_channel.vim
+
+
+*** ../vim-8.1.0692/src/testdir/test_channel.vim 2019-01-05 00:02:52.045705776 +0100
+--- src/testdir/test_channel.vim 2019-01-05 00:33:36.075280989 +0100
+***************
+*** 1650,1666 ****
+ return
+ endif
+ let job = job_start('echo hello', {'out_io': 'buffer', 'out_name': 'test_buffer', 'out_msg': 0})
+- call WaitForAssert({-> assert_equal("dead", job_status(job))})
+ let bufnr = bufnr('test_buffer')
+! call assert_equal(['hello'], getbufline(bufnr, 1, '$'))
+ call assert_equal('nofile', getbufvar(bufnr, '&buftype'))
+ call assert_equal('hide', getbufvar(bufnr, '&bufhidden'))
+ bdel test_buffer
+ call assert_equal([], getbufline(bufnr, 1, '$'))
+
+ let job = job_start('echo hello', {'out_io': 'buffer', 'out_name': 'test_buffer', 'out_msg': 0})
+! call WaitForAssert({-> assert_equal("dead", job_status(job))})
+! call assert_equal(['hello'], getbufline(bufnr, 1, '$'))
+ call assert_equal('nofile', getbufvar(bufnr, '&buftype'))
+ call assert_equal('hide', getbufvar(bufnr, '&bufhidden'))
+
+--- 1650,1665 ----
+ return
+ endif
+ let job = job_start('echo hello', {'out_io': 'buffer', 'out_name': 'test_buffer', 'out_msg': 0})
+ let bufnr = bufnr('test_buffer')
+! call WaitForAssert({-> assert_equal(['hello'], getbufline(bufnr, 1, '$'))})
+ call assert_equal('nofile', getbufvar(bufnr, '&buftype'))
+ call assert_equal('hide', getbufvar(bufnr, '&bufhidden'))
++
+ bdel test_buffer
+ call assert_equal([], getbufline(bufnr, 1, '$'))
+
+ let job = job_start('echo hello', {'out_io': 'buffer', 'out_name': 'test_buffer', 'out_msg': 0})
+! call WaitForAssert({-> assert_equal(['hello'], getbufline(bufnr, 1, '$'))})
+ call assert_equal('nofile', getbufvar(bufnr, '&buftype'))
+ call assert_equal('hide', getbufvar(bufnr, '&bufhidden'))
+
+*** ../vim-8.1.0692/src/version.c 2019-01-05 00:02:52.045705776 +0100
+--- src/version.c 2019-01-05 00:34:35.610820071 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 693,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+108. While reading a magazine, you look for the Zoom icon for a better
+ look at a photograph.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0694 b/data/vim/patches/8.1.0694
new file mode 100644
index 000000000..537dbef13
--- /dev/null
+++ b/data/vim/patches/8.1.0694
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0694
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0694
+Problem: When using text props may free memory that is not allocated.
+ (Andy Massimino)
+Solution: Allocate the line when adjusting text props. (closes #3766)
+Files: src/textprop.c
+
+
+*** ../vim-8.1.0693/src/textprop.c 2019-01-04 23:09:45.249360567 +0100
+--- src/textprop.c 2019-01-06 12:53:20.159681468 +0100
+***************
+*** 979,985 ****
+ pt = text_prop_type_by_id(curbuf, tmp_prop.tp_type);
+
+ if (bytes_added > 0
+! ? (tmp_prop.tp_col >= col + (pt != NULL && (pt->pt_flags & PT_FLAG_INS_START_INCL) ? 2 : 1))
+ : (tmp_prop.tp_col > col + 1))
+ {
+ tmp_prop.tp_col += bytes_added;
+--- 979,987 ----
+ pt = text_prop_type_by_id(curbuf, tmp_prop.tp_type);
+
+ if (bytes_added > 0
+! ? (tmp_prop.tp_col >= col
+! + (pt != NULL && (pt->pt_flags & PT_FLAG_INS_START_INCL)
+! ? 2 : 1))
+ : (tmp_prop.tp_col > col + 1))
+ {
+ tmp_prop.tp_col += bytes_added;
+***************
+*** 987,993 ****
+ }
+ else if (tmp_prop.tp_len > 0
+ && tmp_prop.tp_col + tmp_prop.tp_len > col
+! + ((pt != NULL && (pt->pt_flags & PT_FLAG_INS_END_INCL))
+ ? 0 : 1))
+ {
+ tmp_prop.tp_len += bytes_added;
+--- 989,995 ----
+ }
+ else if (tmp_prop.tp_len > 0
+ && tmp_prop.tp_col + tmp_prop.tp_len > col
+! + ((pt != NULL && (pt->pt_flags & PT_FLAG_INS_END_INCL))
+ ? 0 : 1))
+ {
+ tmp_prop.tp_len += bytes_added;
+***************
+*** 1001,1008 ****
+ }
+ if (dirty)
+ {
+ curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
+! curbuf->b_ml.ml_line_len = (int)textlen + wi * sizeof(textprop_T);
+ }
+ }
+
+--- 1003,1015 ----
+ }
+ if (dirty)
+ {
++ colnr_T newlen = (int)textlen + wi * (colnr_T)sizeof(textprop_T);
++
++ if ((curbuf->b_ml.ml_flags & ML_LINE_DIRTY) == 0)
++ curbuf->b_ml.ml_line_ptr =
++ vim_memsave(curbuf->b_ml.ml_line_ptr, newlen);
+ curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
+! curbuf->b_ml.ml_line_len = newlen;
+ }
+ }
+
+*** ../vim-8.1.0693/src/version.c 2019-01-05 00:35:17.298497431 +0100
+--- src/version.c 2019-01-06 12:53:52.163454756 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 694,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+110. You actually volunteer to become your employer's webmaster.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0695 b/data/vim/patches/8.1.0695
new file mode 100644
index 000000000..5c94aaf62
--- /dev/null
+++ b/data/vim/patches/8.1.0695
@@ -0,0 +1,176 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.06
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0695
+Problem: Internal error when using :popup.
+Solution: When a menu only exists in Terminal mode give an error. (Naruhiko
+ Nishino, closes #3765)
+Files: runtime/doc/gui.txt, src/globals.h, src/menu.c, src/popupmnu.c,
+ src/testdir/test_popup.vim
+
+
+*** ../vim-8.1.0694/runtime/doc/gui.txt 2018-10-19 22:35:04.885189994 +0200
+--- runtime/doc/gui.txt 2019-01-06 13:03:08.707558482 +0100
+***************
+*** 878,884 ****
+ '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
+--- 878,884 ----
+ '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
+***************
+*** 914,920 ****
+ To remove all menus use: *:unmenu-all* >
+ :unmenu * " remove all menus in Normal and visual mode
+ :unmenu! * " remove all menus in Insert and Command-line mode
+! :aunmenu * " remove all menus in all modes
+
+ If you want to get rid of the menu bar: >
+ :set guioptions-=m
+--- 914,922 ----
+ To remove all menus use: *:unmenu-all* >
+ :unmenu * " remove all menus in Normal and visual mode
+ :unmenu! * " remove all menus in Insert and Command-line mode
+! :aunmenu * " remove all menus in all modes, except for Terminal
+! " mode
+! :tlunmenu * " remove all menus in Terminal mode
+
+ If you want to get rid of the menu bar: >
+ :set guioptions-=m
+*** ../vim-8.1.0694/src/globals.h 2019-01-02 23:47:14.360433274 +0100
+--- src/globals.h 2019-01-06 13:04:18.315075186 +0100
+***************
+*** 1583,1588 ****
+--- 1583,1591 ----
+ #endif
+ EXTERN char_u e_dirnotf[] INIT(= N_("E919: Directory not found in '%s': \"%s\""));
+ EXTERN char_u e_au_recursive[] INIT(= N_("E952: Autocommand caused recursive behavior"));
++ #ifdef FEAT_MENU
++ EXTERN char_u e_menuothermode[] INIT(= N_("E328: Menu only exists in another mode"));
++ #endif
+
+ #ifdef FEAT_GUI_MAC
+ EXTERN short disallow_gui INIT(= FALSE);
+*** ../vim-8.1.0694/src/menu.c 2018-10-19 22:35:04.885189994 +0200
+--- src/menu.c 2019-01-06 13:04:44.590892904 +0100
+***************
+*** 61,67 ****
+ 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");
+ static char_u e_nomenu[] = N_("E329: No menu \"%s\"");
+
+ #ifdef FEAT_TOOLBAR
+--- 61,66 ----
+***************
+*** 956,962 ****
+ else if (*name != NUL)
+ {
+ if (!silent)
+! EMSG(_(e_othermode));
+ return FAIL;
+ }
+
+--- 955,961 ----
+ else if (*name != NUL)
+ {
+ if (!silent)
+! EMSG(_(e_menuothermode));
+ return FAIL;
+ }
+
+***************
+*** 1130,1136 ****
+ }
+ else if ((menu->modes & modes) == 0x0)
+ {
+! EMSG(_(e_othermode));
+ vim_free(path_name);
+ return FAIL;
+ }
+--- 1129,1135 ----
+ }
+ else if ((menu->modes & modes) == 0x0)
+ {
+! EMSG(_(e_menuothermode));
+ vim_free(path_name);
+ return FAIL;
+ }
+*** ../vim-8.1.0694/src/popupmnu.c 2018-12-31 22:09:53.106187962 +0100
+--- src/popupmnu.c 2019-01-06 13:06:14.690268391 +0100
+***************
+*** 1195,1200 ****
+--- 1195,1208 ----
+ || (mp->modes & mp->enabled & mode))
+ ++pum_size;
+
++ // When there are only Terminal mode menus, using "popup Edit" results in
++ // pum_size being zero.
++ if (pum_size <= 0)
++ {
++ EMSG(e_menuothermode);
++ return;
++ }
++
+ array = (pumitem_T *)alloc_clear((unsigned)sizeof(pumitem_T) * pum_size);
+ if (array == NULL)
+ return;
+*** ../vim-8.1.0694/src/testdir/test_popup.vim 2018-12-01 11:58:44.415064948 +0100
+--- src/testdir/test_popup.vim 2019-01-06 13:00:33.244640253 +0100
+***************
+*** 882,886 ****
+--- 882,899 ----
+ delfunc s:act_on_text_changed
+ endfunc
+
++ func Test_menu_only_exists_in_terminal()
++ if !exists(':tlmenu') || has('gui_running')
++ return
++ endif
++ tlnoremenu &Edit.&Paste<Tab>"+gP <C-W>"+
++ aunmenu *
++ try
++ popup Edit
++ call assert_false(1, 'command should have failed')
++ catch
++ call assert_exception('E328:')
++ endtry
++ endfunc
+
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.0694/src/version.c 2019-01-06 12:54:51.823033166 +0100
+--- src/version.c 2019-01-06 13:09:53.512833815 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 695,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+111. You and your friends get together regularly on IRC, even though
+ all of you live in the same city.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0696 b/data/vim/patches/8.1.0696
new file mode 100644
index 000000000..82202943b
--- /dev/null
+++ b/data/vim/patches/8.1.0696
@@ -0,0 +1,134 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0696
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0696
+Problem: When test_edit fails 'insertmode' may not be reset and the next
+ test may get stuck. (James McCoy)
+Solution: Always reset 'insertmode' after executing a test. Avoid that an
+ InsertCharPre autocommand or a 'complete' function can change the
+ state. (closes #3768)
+Files: src/testdir/runtest.vim, src/edit.c
+
+
+*** ../vim-8.1.0695/src/testdir/runtest.vim 2018-12-15 17:46:18.909870746 +0100
+--- src/testdir/runtest.vim 2019-01-06 15:23:08.248156368 +0100
+***************
+*** 26,32 ****
+ " It will be called after each Test_ function.
+ "
+ " When debugging a test it can be useful to add messages to v:errors:
+! " call add(v:errors, "this happened")
+
+
+ " Without the +eval feature we can't run these tests, bail out.
+--- 26,32 ----
+ " It will be called after each Test_ function.
+ "
+ " When debugging a test it can be useful to add messages to v:errors:
+! " call add(v:errors, "this happened")
+
+
+ " Without the +eval feature we can't run these tests, bail out.
+***************
+*** 149,154 ****
+--- 149,158 ----
+ endtry
+ endif
+
++ " In case 'insertmode' was set and something went wrong, make sure it is
++ " reset to avoid trouble with anything else.
++ set noinsertmode
++
+ if exists("*TearDown")
+ try
+ call TearDown()
+*** ../vim-8.1.0695/src/edit.c 2019-01-02 23:47:14.360433274 +0100
+--- src/edit.c 2019-01-06 15:21:36.636912346 +0100
+***************
+*** 4219,4224 ****
+--- 4219,4225 ----
+ win_T *curwin_save;
+ buf_T *curbuf_save;
+ typval_T rettv;
++ int save_State = State;
+
+ funcname = (type == CTRL_X_FUNCTION) ? curbuf->b_p_cfu : curbuf->b_p_ofu;
+ if (*funcname == NUL)
+***************
+*** 4272,4277 ****
+--- 4273,4281 ----
+ ins_compl_add_dict(matchdict);
+
+ theend:
++ // Restore State, it might have been changed.
++ State = save_State;
++
+ if (matchdict != NULL)
+ dict_unref(matchdict);
+ if (matchlist != NULL)
+***************
+*** 5549,5554 ****
+--- 5553,5559 ----
+ pos_T pos;
+ win_T *curwin_save;
+ buf_T *curbuf_save;
++ int save_State = State;
+
+ /* Call 'completefunc' or 'omnifunc' and get pattern length as a
+ * string */
+***************
+*** 5572,5577 ****
+--- 5577,5584 ----
+ curwin_save = curwin;
+ curbuf_save = curbuf;
+ col = call_func_retnr(funcname, 2, args);
++
++ State = save_State;
+ if (curwin_save != curwin || curbuf_save != curbuf)
+ {
+ EMSG(_(e_complwin));
+***************
+*** 10730,10735 ****
+--- 10737,10743 ----
+ {
+ char_u *res;
+ char_u buf[MB_MAXBYTES + 1];
++ int save_State = State;
+
+ /* Return quickly when there is nothing to do. */
+ if (!has_insertcharpre())
+***************
+*** 10762,10767 ****
+--- 10770,10778 ----
+ set_vim_var_string(VV_CHAR, NULL, -1); /* clear v:char */
+ --textlock;
+
++ // Restore the State, it may have been changed.
++ State = save_State;
++
+ return res;
+ }
+ #endif
+*** ../vim-8.1.0695/src/version.c 2019-01-06 13:10:46.332499076 +0100
+--- src/version.c 2019-01-06 14:27:17.537077362 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 696,
+ /**/
+
+--
+Corduroy pillows: They're making headlines!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0697 b/data/vim/patches/8.1.0697
new file mode 100644
index 000000000..06fbcf63e
--- /dev/null
+++ b/data/vim/patches/8.1.0697
@@ -0,0 +1,679 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0697
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0697
+Problem: ":sign place" requires the buffer argument.
+Solution: Make the argument optional. Also update the help and clean up the
+ sign test. (Yegappan Lakshmanan, closes #3767)
+Files: runtime/doc/eval.txt, runtime/doc/sign.txt, src/sign.c,
+ src/testdir/test_signs.vim
+
+
+*** ../vim-8.1.0696/runtime/doc/eval.txt 2019-01-01 19:47:17.854123944 +0100
+--- runtime/doc/eval.txt 2019-01-06 16:19:00.281105655 +0100
+***************
+*** 7868,7880 ****
+ The {name} can be a String or a Number. The optional {dict}
+ argument specifies the sign attributes. The following values
+ are supported:
+! icon full path to the bitmap file for the sign.
+! linehl highlight group used for the whole line the
+ sign is placed in.
+! text text that is displayed when there is no icon
+ or the GUI is not being used.
+! texthl highlight group used for the text item
+! For an existing sign, the attributes are updated.
+
+ Returns 0 on success and -1 on failure.
+
+--- 7894,7908 ----
+ The {name} can be a String or a Number. The optional {dict}
+ argument specifies the sign attributes. The following values
+ are supported:
+! icon full path to the bitmap file for the sign.
+! linehl highlight group used for the whole line the
+ sign is placed in.
+! text text that is displayed when there is no icon
+ or the GUI is not being used.
+! texthl highlight group used for the text item
+!
+! If the sign named {name} already exists, then the attributes
+! of the sign are updated.
+
+ Returns 0 on success and -1 on failure.
+
+***************
+*** 7892,7904 ****
+
+ Each list item in the returned value is a dictionary with the
+ following entries:
+! icon full path to the bitmap file of the sign
+! linehl highlight group used for the whole line the
+ sign is placed in.
+! name name of the sign
+! text text that is displayed when there is no icon
+ or the GUI is not being used.
+! texthl highlight group used for the text item
+
+ Returns an empty List if there are no signs and when {name} is
+ not found.
+--- 7920,7932 ----
+
+ Each list item in the returned value is a dictionary with the
+ following entries:
+! icon full path to the bitmap file of the sign
+! linehl highlight group used for the whole line the
+ sign is placed in.
+! name name of the sign
+! text text that is displayed when there is no icon
+ or the GUI is not being used.
+! texthl highlight group used for the text item
+
+ Returns an empty List if there are no signs and when {name} is
+ not found.
+***************
+*** 7918,7932 ****
+ list of signs placed in that buffer is returned. For the use
+ of {expr}, see |bufname()|. The optional {dict} can contain
+ the following entries:
+! group select only signs in this group
+! id select sign with this identifier
+! lnum select signs placed in this line. For the use
+ of {lnum}, see |line()|.
+ If {group} is '*', then signs in all the groups including the
+ global group are returned. If {group} is not supplied or is an
+ empty string, then only signs in the global group are
+ returned. If no arguments are supplied, then signs in the
+ global group placed in all the buffers are returned.
+
+ Each list item in the returned value is a dictionary with the
+ following entries:
+--- 7946,7961 ----
+ list of signs placed in that buffer is returned. For the use
+ of {expr}, see |bufname()|. The optional {dict} can contain
+ the following entries:
+! group select only signs in this group
+! id select sign with this identifier
+! lnum select signs placed in this line. For the use
+ of {lnum}, see |line()|.
+ If {group} is '*', then signs in all the groups including the
+ global group are returned. If {group} is not supplied or is an
+ empty string, then only signs in the global group are
+ returned. If no arguments are supplied, then signs in the
+ global group placed in all the buffers are returned.
++ See |sign-group|.
+
+ Each list item in the returned value is a dictionary with the
+ following entries:
+***************
+*** 7942,7948 ****
+ name name of the defined sign
+ priority sign priority
+
+! Returns an empty list on failure.
+
+ Examples: >
+ " Get a List of signs placed in eval.c in the
+--- 7971,7978 ----
+ name name of the defined sign
+ priority sign priority
+
+! Returns an empty list on failure or if there are no placed
+! signs.
+
+ Examples: >
+ " Get a List of signs placed in eval.c in the
+***************
+*** 7956,7966 ****
+ echo sign_getplaced("eval.c", {'lnum' : 10})
+
+ " Get sign with identifier 10 placed in a.py
+! echo sign_getplaced("a.py", {'id' : 10'})
+
+ " Get sign with id 20 in group 'g1' placed in a.py
+ echo sign_getplaced("a.py", {'group' : 'g1',
+! \ 'id' : 20'})
+
+ " Get a List of all the placed signs
+ echo sign_getplaced()
+--- 7986,7996 ----
+ echo sign_getplaced("eval.c", {'lnum' : 10})
+
+ " Get sign with identifier 10 placed in a.py
+! echo sign_getplaced("a.py", {'id' : 10})
+
+ " Get sign with id 20 in group 'g1' placed in a.py
+ echo sign_getplaced("a.py", {'group' : 'g1',
+! \ 'id' : 20})
+
+ " Get a List of all the placed signs
+ echo sign_getplaced()
+***************
+*** 7975,7982 ****
+ allocated. Otherwise the specified number is used. {group} is
+ the sign group name. To use the global sign group, use an
+ empty string. {group} functions as a namespace for {id}, thus
+! two groups can use the same IDs.
+!
+ {name} refers to a defined sign.
+ {expr} refers to a buffer name or number. For the accepted
+ values, see |bufname()|.
+--- 8005,8013 ----
+ allocated. Otherwise the specified number is used. {group} is
+ the sign group name. To use the global sign group, use an
+ empty string. {group} functions as a namespace for {id}, thus
+! two groups can use the same IDs. Refer to |sign-identifier|
+! for more information.
+!
+ {name} refers to a defined sign.
+ {expr} refers to a buffer name or number. For the accepted
+ values, see |bufname()|.
+***************
+*** 8029,8035 ****
+ <
+ sign_unplace({group} [, {dict}]) *sign_unplace()*
+ Remove a previously placed sign in one or more buffers. This
+! is similar to the |:sign-unplace()| command.
+
+ {group} is the sign group name. To use the global sign group,
+ use an empty string. If {group} is set to '*', then all the
+--- 8060,8066 ----
+ <
+ sign_unplace({group} [, {dict}]) *sign_unplace()*
+ Remove a previously placed sign in one or more buffers. This
+! is similar to the |:sign-unplace| command.
+
+ {group} is the sign group name. To use the global sign group,
+ use an empty string. If {group} is set to '*', then all the
+*** ../vim-8.1.0696/runtime/doc/sign.txt 2018-12-29 18:53:07.839607468 +0100
+--- runtime/doc/sign.txt 2019-01-06 16:20:59.548314309 +0100
+***************
+*** 52,64 ****
+
+ :highlight SignColumn guibg=darkgrey
+ <
+ *sign-group*
+! Each sign can be assigned to either the global group or a named group. When
+! placing a sign, if a group name is not supplied, or an empty string is used,
+! then the sign is placed in the global group. Otherwise the sign is placed in
+! the named group. The sign identifier is unique within a group. The sign group
+! allows Vim plugins to use unique signs without interfering with other plugins
+! using signs.
+
+ *sign-priority*
+ Each placed sign is assigned a priority value. When multiple signs are placed
+--- 52,74 ----
+
+ :highlight SignColumn guibg=darkgrey
+ <
++ *sign-identifier*
++ Each placed sign is identified by a number called the sign identifier. This
++ identifier is used to jump to the sign or to remove the sign. The identifier
++ is assigned when placing the sign using the |sign-place| command or the
++ |sign_place()| function. Each sign identifier should be a unique number. If
++ multiple placed signs use the same identifier, then jumping to or removing a
++ sign becomes unpredictable. To avoid overlapping identifiers, sign groups can
++ be used. The |sign_place()| function can be called with a zero sign identifier
++ to allocate the next available identifier.
++
+ *sign-group*
+! Each placed sign can be assigned to either the global group or a named group.
+! When placing a sign, if a group name is not supplied, or an empty string is
+! used, then the sign is placed in the global group. Otherwise the sign is
+! placed in the named group. The sign identifier is unique within a group. The
+! sign group allows Vim plugins to use unique signs without interfering with
+! other plugins using signs.
+
+ *sign-priority*
+ Each placed sign is assigned a priority value. When multiple signs are placed
+***************
+*** 88,94 ****
+ :sign define {name} {argument}...
+ Define a new sign or set attributes for an existing sign.
+ The {name} can either be a number (all digits) or a name
+! starting with a non-digit. Leading digits are ignored, thus
+ "0012", "012" and "12" are considered the same name.
+ About 120 different signs can be defined.
+
+--- 98,104 ----
+ :sign define {name} {argument}...
+ Define a new sign or set attributes for an existing sign.
+ The {name} can either be a number (all digits) or a name
+! starting with a non-digit. Leading zeros are ignored, thus
+ "0012", "012" and "12" are considered the same name.
+ About 120 different signs can be defined.
+
+***************
+*** 178,185 ****
+ :sign place 9 group=g2 priority=50 line=5
+ \ name=sign1 file=a.py
+ <
+! :sign place {id} line={lnum} name={name} buffer={nr}
+! Same, but use buffer {nr}.
+
+ *E885*
+ :sign place {id} name={name} file={fname}
+--- 188,196 ----
+ :sign place 9 group=g2 priority=50 line=5
+ \ name=sign1 file=a.py
+ <
+! :sign place {id} line={lnum} name={name} [buffer={nr}]
+! Same, but use buffer {nr}. If the buffer argument is not
+! given, place the sign in the current buffer.
+
+ *E885*
+ :sign place {id} name={name} file={fname}
+***************
+*** 191,198 ****
+ The optional "group={group}" attribute can be used before
+ "file=" to select a sign in a particular group.
+
+! :sign place {id} name={name} buffer={nr}
+! Same, but use buffer {nr}.
+
+
+ REMOVING SIGNS *:sign-unplace* *E159*
+--- 202,210 ----
+ The optional "group={group}" attribute can be used before
+ "file=" to select a sign in a particular group.
+
+! :sign place {id} name={name} [buffer={nr}]
+! Same, but use buffer {nr}. If the buffer argument is not
+! given, use the current buffer.
+
+
+ REMOVING SIGNS *:sign-unplace* *E159*
+***************
+*** 315,325 ****
+ :sign jump {id} group={group} file={fname}
+ Same but jump to the sign in group {group}
+
+! :sign jump {id} buffer={nr} *E934*
+ Same, but use buffer {nr}. This fails if buffer {nr} does not
+! have a name.
+
+! :sign jump {id} group={group} buffer={nr}
+ Same but jump to the sign in group {group}
+
+
+--- 327,338 ----
+ :sign jump {id} group={group} file={fname}
+ Same but jump to the sign in group {group}
+
+! :sign jump {id} [buffer={nr}] *E934*
+ Same, but use buffer {nr}. This fails if buffer {nr} does not
+! have a name. If the buffer argument is not given, use the
+! current buffer.
+
+! :sign jump {id} group={group} [buffer={nr}]
+ Same but jump to the sign in group {group}
+
+
+*** ../vim-8.1.0696/src/sign.c 2019-01-01 13:20:05.944711187 +0100
+--- src/sign.c 2019-01-06 16:19:00.281105655 +0100
+***************
+*** 1168,1174 ****
+ int id,
+ char_u *group)
+ {
+! if (buf == NULL && sign_name == NULL && group == NULL && id == -1)
+ {
+ EMSG(_(e_argreq));
+ return;
+--- 1168,1174 ----
+ int id,
+ char_u *group)
+ {
+! if (sign_name == NULL && group == NULL && id == -1)
+ {
+ EMSG(_(e_argreq));
+ return;
+***************
+*** 1325,1330 ****
+--- 1325,1335 ----
+ return FAIL;
+ }
+
++ // If the filename is not supplied for the sign place or the sign jump
++ // command, then use the current buffer.
++ if (filename == NULL && (cmd == SIGNCMD_PLACE || cmd == SIGNCMD_JUMP))
++ *buf = curwin->w_buffer;
++
+ return OK;
+ }
+
+*** ../vim-8.1.0696/src/testdir/test_signs.vim 2019-01-02 13:40:26.989339500 +0100
+--- src/testdir/test_signs.vim 2019-01-06 16:19:00.281105655 +0100
+***************
+*** 14,20 ****
+ " the icon name when listing signs.
+ sign define Sign1 text=x
+ try
+! sign define Sign2 text=xy texthl=Title linehl=Error icon=../../pixmaps/stock_vim_find_help.png
+ catch /E255:/
+ " Ignore error: E255: Couldn't read in sign data!
+ " This error can happen when running in the GUI.
+--- 14,21 ----
+ " the icon name when listing signs.
+ sign define Sign1 text=x
+ try
+! sign define Sign2 text=xy texthl=Title linehl=Error
+! \ icon=../../pixmaps/stock_vim_find_help.png
+ catch /E255:/
+ " Ignore error: E255: Couldn't read in sign data!
+ " This error can happen when running in the GUI.
+***************
+*** 23,29 ****
+
+ " Test listing signs.
+ let a=execute('sign list')
+! call assert_match("^\nsign Sign1 text=x \nsign Sign2 icon=../../pixmaps/stock_vim_find_help.png .*text=xy linehl=Error texthl=Title$", a)
+
+ let a=execute('sign list Sign1')
+ call assert_equal("\nsign Sign1 text=x ", a)
+--- 24,32 ----
+
+ " Test listing signs.
+ let a=execute('sign list')
+! call assert_match('^\nsign Sign1 text=x \nsign Sign2 ' .
+! \ 'icon=../../pixmaps/stock_vim_find_help.png .*text=xy ' .
+! \ 'linehl=Error texthl=Title$', a)
+
+ let a=execute('sign list Sign1')
+ call assert_equal("\nsign Sign1 text=x ", a)
+***************
+*** 63,69 ****
+
+ " Check placed signs
+ let a=execute('sign place')
+! call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n line=3 id=41 name=Sign1 priority=10\n", a)
+
+ " Unplace the sign and try jumping to it again should fail.
+ sign unplace 41
+--- 66,73 ----
+
+ " Check placed signs
+ let a=execute('sign place')
+! call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n" .
+! \ " line=3 id=41 name=Sign1 priority=10\n", a)
+
+ " Unplace the sign and try jumping to it again should fail.
+ sign unplace 41
+***************
+*** 87,98 ****
+ let a=execute('sign place')
+ call assert_equal("\n--- Signs ---\n", a)
+
+ " Check :jump with file=...
+ edit foo
+ call setline(1, ['A', 'B', 'C', 'D'])
+
+ try
+! sign define Sign3 text=y texthl=DoesNotExist linehl=DoesNotExist icon=doesnotexist.xpm
+ catch /E255:/
+ " ignore error: E255: it can happens for guis.
+ endtry
+--- 91,110 ----
+ let a=execute('sign place')
+ call assert_equal("\n--- Signs ---\n", a)
+
++ " Place a sign without specifying the filename or buffer
++ sign place 77 line=9 name=Sign2
++ let a=execute('sign place')
++ call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n" .
++ \ " line=9 id=77 name=Sign2 priority=10\n", a)
++ sign unplace *
++
+ " Check :jump with file=...
+ edit foo
+ call setline(1, ['A', 'B', 'C', 'D'])
+
+ try
+! sign define Sign3 text=y texthl=DoesNotExist linehl=DoesNotExist
+! \ icon=doesnotexist.xpm
+ catch /E255:/
+ " ignore error: E255: it can happens for guis.
+ endtry
+***************
+*** 148,185 ****
+ call assert_equal("\nsign 4 text=#> linehl=Comment", a)
+ exe 'sign place 20 line=3 name=004 buffer=' . bufnr('')
+ let a = execute('sign place')
+! call assert_equal("\n--- Signs ---\nSigns for foo:\n line=3 id=20 name=4 priority=10\n", a)
+ exe 'sign unplace 20 buffer=' . bufnr('')
+ sign undefine 004
+ call assert_fails('sign list 4', 'E155:')
+
+- " Error cases
+- call assert_fails("sign place abc line=3 name=Sign1 buffer=" .
+- \ bufnr('%'), 'E474:')
+- call assert_fails("sign unplace abc name=Sign1 buffer=" .
+- \ bufnr('%'), 'E474:')
+- call assert_fails("sign place 1abc line=3 name=Sign1 buffer=" .
+- \ bufnr('%'), 'E474:')
+- call assert_fails("sign unplace 2abc name=Sign1 buffer=" .
+- \ bufnr('%'), 'E474:')
+- call assert_fails("sign unplace 2 *", 'E474:')
+- call assert_fails("sign place 1 line=3 name=Sign1 buffer=" .
+- \ bufnr('%') . " a", 'E488:')
+- call assert_fails("sign place name=Sign1 buffer=" . bufnr('%'), 'E474:')
+- call assert_fails("sign place line=10 buffer=" . bufnr('%'), 'E474:')
+- call assert_fails("sign unplace 2 line=10 buffer=" . bufnr('%'), 'E474:')
+- call assert_fails("sign unplace 2 name=Sign1 buffer=" . bufnr('%'), 'E474:')
+- call assert_fails("sign place 2 line=3 buffer=" . bufnr('%'), 'E474:')
+- call assert_fails("sign place 2", 'E474:')
+- call assert_fails("sign place abc", 'E474:')
+- call assert_fails("sign place 5 line=3", 'E474:')
+- call assert_fails("sign place 5 name=Sign1", 'E474:')
+- call assert_fails("sign place 5 group=g1", 'E474:')
+- call assert_fails("sign place 5 group=*", 'E474:')
+- call assert_fails("sign place 5 priority=10", 'E474:')
+- call assert_fails("sign place 5 line=3 name=Sign1", 'E474:')
+- call assert_fails("sign place 5 group=g1 line=3 name=Sign1", 'E474:')
+-
+ " After undefining the sign, we should no longer be able to place it.
+ sign undefine Sign1
+ sign undefine Sign2
+--- 160,171 ----
+ call assert_equal("\nsign 4 text=#> linehl=Comment", a)
+ exe 'sign place 20 line=3 name=004 buffer=' . bufnr('')
+ let a = execute('sign place')
+! call assert_equal("\n--- Signs ---\nSigns for foo:\n" .
+! \ " line=3 id=20 name=4 priority=10\n", a)
+ exe 'sign unplace 20 buffer=' . bufnr('')
+ sign undefine 004
+ call assert_fails('sign list 4', 'E155:')
+
+ " After undefining the sign, we should no longer be able to place it.
+ sign undefine Sign1
+ sign undefine Sign2
+***************
+*** 202,208 ****
+
+ " Listing placed sign should show that sign is deleted.
+ let a=execute('sign place')
+! call assert_equal("\n--- Signs ---\nSigns for foobar:\n line=1 id=41 name=[Deleted] priority=10\n", a)
+
+ sign unplace 41
+ let a=execute('sign place')
+--- 188,195 ----
+
+ " Listing placed sign should show that sign is deleted.
+ let a=execute('sign place')
+! call assert_equal("\n--- Signs ---\nSigns for foobar:\n" .
+! \ " line=1 id=41 name=[Deleted] priority=10\n", a)
+
+ sign unplace 41
+ let a=execute('sign place')
+***************
+*** 220,226 ****
+ call assert_equal('"sign define Sign icon= linehl= text= texthl=', @:)
+
+ call feedkeys(":sign define Sign linehl=Spell\<C-A>\<C-B>\"\<CR>", 'tx')
+! call assert_equal('"sign define Sign linehl=SpellBad SpellCap SpellLocal SpellRare', @:)
+
+ call writefile(['foo'], 'XsignOne')
+ call writefile(['bar'], 'XsignTwo')
+--- 207,214 ----
+ call assert_equal('"sign define Sign icon= linehl= text= texthl=', @:)
+
+ call feedkeys(":sign define Sign linehl=Spell\<C-A>\<C-B>\"\<CR>", 'tx')
+! call assert_equal('"sign define Sign linehl=SpellBad SpellCap ' .
+! \ 'SpellLocal SpellRare', @:)
+
+ call writefile(['foo'], 'XsignOne')
+ call writefile(['bar'], 'XsignTwo')
+***************
+*** 273,289 ****
+ call assert_fails('sign jump 1 line=100', '474:')
+ call assert_fails('sign define Sign2 text=', 'E239:')
+ " Non-numeric identifier for :sign place
+! call assert_fails("sign place abc line=3 name=Sign1 buffer=" . bufnr('%'), 'E474:')
+ " Non-numeric identifier for :sign unplace
+! call assert_fails("sign unplace abc name=Sign1 buffer=" . bufnr('%'), 'E474:')
+ " Number followed by an alphabet as sign identifier for :sign place
+! call assert_fails("sign place 1abc line=3 name=Sign1 buffer=" . bufnr('%'), 'E474:')
+ " Number followed by an alphabet as sign identifier for :sign unplace
+! call assert_fails("sign unplace 2abc name=Sign1 buffer=" . bufnr('%'), 'E474:')
+ " Sign identifier and '*' for :sign unplace
+ call assert_fails("sign unplace 2 *", 'E474:')
+ " Trailing characters after buffer number for :sign place
+! call assert_fails("sign place 1 line=3 name=Sign1 buffer=" . bufnr('%') . 'xxx', 'E488:')
+ " Trailing characters after buffer number for :sign unplace
+ call assert_fails("sign unplace 1 buffer=" . bufnr('%') . 'xxx', 'E488:')
+ call assert_fails("sign unplace * buffer=" . bufnr('%') . 'xxx', 'E488:')
+--- 261,282 ----
+ call assert_fails('sign jump 1 line=100', '474:')
+ call assert_fails('sign define Sign2 text=', 'E239:')
+ " Non-numeric identifier for :sign place
+! call assert_fails("sign place abc line=3 name=Sign1 buffer=" . bufnr(''),
+! \ 'E474:')
+ " Non-numeric identifier for :sign unplace
+! call assert_fails("sign unplace abc name=Sign1 buffer=" . bufnr(''),
+! \ 'E474:')
+ " Number followed by an alphabet as sign identifier for :sign place
+! call assert_fails("sign place 1abc line=3 name=Sign1 buffer=" . bufnr(''),
+! \ 'E474:')
+ " Number followed by an alphabet as sign identifier for :sign unplace
+! call assert_fails("sign unplace 2abc name=Sign1 buffer=" . bufnr(''),
+! \ 'E474:')
+ " Sign identifier and '*' for :sign unplace
+ call assert_fails("sign unplace 2 *", 'E474:')
+ " Trailing characters after buffer number for :sign place
+! call assert_fails("sign place 1 line=3 name=Sign1 buffer=" .
+! \ bufnr('%') . 'xxx', 'E488:')
+ " Trailing characters after buffer number for :sign unplace
+ call assert_fails("sign unplace 1 buffer=" . bufnr('%') . 'xxx', 'E488:')
+ call assert_fails("sign unplace * buffer=" . bufnr('%') . 'xxx', 'E488:')
+***************
+*** 306,321 ****
+ call assert_fails("sign place abc", 'E474:')
+ " Placing a sign with only line number
+ call assert_fails("sign place 5 line=3", 'E474:')
+- " Placing a sign with only sign name
+- call assert_fails("sign place 5 name=Sign1", 'E474:')
+ " Placing a sign with only sign group
+ call assert_fails("sign place 5 group=g1", 'E474:')
+ call assert_fails("sign place 5 group=*", 'E474:')
+ " Placing a sign with only sign priority
+ call assert_fails("sign place 5 priority=10", 'E474:')
+- " Placing a sign without buffer number or file name
+- call assert_fails("sign place 5 line=3 name=Sign1", 'E474:')
+- call assert_fails("sign place 5 group=g1 line=3 name=Sign1", 'E474:')
+
+ sign undefine Sign1
+ endfunc
+--- 299,309 ----
+***************
+*** 624,634 ****
+
+ " :sign place file={fname}
+ let a = execute('sign place file=Xsign')
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 name=sign1 priority=10\n", a)
+
+ " :sign place group={group} file={fname}
+ let a = execute('sign place group=g2 file=Xsign')
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " :sign place group=* file={fname}
+ let a = execute('sign place group=* file=Xsign')
+--- 612,624 ----
+
+ " :sign place file={fname}
+ let a = execute('sign place file=Xsign')
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+ " :sign place group={group} file={fname}
+ let a = execute('sign place group=g2 file=Xsign')
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " :sign place group=* file={fname}
+ let a = execute('sign place group=* file=Xsign')
+***************
+*** 649,659 ****
+
+ " :sign place buffer={fname}
+ let a = execute('sign place buffer=' . bnum)
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=10 id=5 name=sign1 priority=10\n", a)
+
+ " :sign place group={group} buffer={fname}
+ let a = execute('sign place group=g2 buffer=' . bnum)
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " :sign place group=* buffer={fname}
+ let a = execute('sign place group=* buffer=' . bnum)
+--- 639,651 ----
+
+ " :sign place buffer={fname}
+ let a = execute('sign place buffer=' . bnum)
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+ " :sign place group={group} buffer={fname}
+ let a = execute('sign place group=g2 buffer=' . bnum)
+! call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " :sign place group=* buffer={fname}
+ let a = execute('sign place group=* buffer=' . bnum)
+***************
+*** 690,695 ****
+--- 682,693 ----
+ sign jump 5 group=g2 file=Xsign
+ call assert_equal(12, line('.'))
+
++ " Test for :sign jump command without the filename or buffer
++ sign jump 5
++ call assert_equal(10, line('.'))
++ sign jump 5 group=g1
++ call assert_equal(11, line('.'))
++
+ " Error cases
+ call assert_fails("sign place 3 group= name=sign1 buffer=" . bnum, 'E474:')
+
+*** ../vim-8.1.0696/src/version.c 2019-01-06 15:29:52.540852980 +0100
+--- src/version.c 2019-01-06 16:22:21.751771330 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 697,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+114. You are counting items, you go "0,1,2,3,4,5,6,7,8,9,A,B,C,D...".
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0698 b/data/vim/patches/8.1.0698
new file mode 100644
index 000000000..83763e833
--- /dev/null
+++ b/data/vim/patches/8.1.0698
@@ -0,0 +1,149 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0698
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0698
+Problem: Clearing the window is used too often, causing the command line
+ to be cleared when opening a tab. (Miroslav Koškár)
+Solution: Use NOT_VALID instead of CLEAR. (suggested by Jason Franklin,
+ closes #630) Also do this for a few other places where clearing
+ the screen isn't really needed.
+Files: src/window.c
+
+
+*** ../vim-8.1.0697/src/window.c 2018-12-22 17:07:45.771347741 +0100
+--- src/window.c 2019-01-06 17:06:42.216917047 +0100
+***************
+*** 1577,1583 ****
+ (void)win_comp_pos(); /* recompute window positions */
+
+ win_enter(wp, TRUE);
+! redraw_later(CLEAR);
+ }
+
+ /*
+--- 1577,1583 ----
+ (void)win_comp_pos(); /* recompute window positions */
+
+ win_enter(wp, TRUE);
+! redraw_all_later(NOT_VALID);
+ }
+
+ /*
+***************
+*** 1660,1666 ****
+ (void)win_comp_pos();
+ }
+
+! redraw_later(CLEAR);
+ }
+
+ /*
+--- 1660,1666 ----
+ (void)win_comp_pos();
+ }
+
+! redraw_all_later(NOT_VALID);
+ }
+
+ /*
+***************
+*** 1817,1823 ****
+ frame_new_height(topfr, height, FALSE, FALSE);
+ topfr->fr_win->w_wincol = col;
+ frame_new_width(topfr, width, FALSE, FALSE);
+! redraw_all_later(CLEAR);
+ }
+ }
+ else if (topfr->fr_layout == FR_ROW)
+--- 1817,1823 ----
+ frame_new_height(topfr, height, FALSE, FALSE);
+ topfr->fr_win->w_wincol = col;
+ frame_new_width(topfr, width, FALSE, FALSE);
+! redraw_all_later(NOT_VALID);
+ }
+ }
+ else if (topfr->fr_layout == FR_ROW)
+***************
+*** 3702,3708 ****
+ entering_window(curwin);
+ #endif
+
+! redraw_all_later(CLEAR);
+ apply_autocmds(EVENT_WINNEW, NULL, NULL, FALSE, curbuf);
+ apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf);
+ apply_autocmds(EVENT_TABNEW, NULL, NULL, FALSE, curbuf);
+--- 3702,3708 ----
+ entering_window(curwin);
+ #endif
+
+! redraw_all_later(NOT_VALID);
+ apply_autocmds(EVENT_WINNEW, NULL, NULL, FALSE, curbuf);
+ apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf);
+ apply_autocmds(EVENT_TABNEW, NULL, NULL, FALSE, curbuf);
+***************
+*** 3939,3945 ****
+
+ last_status(FALSE); /* status line may appear or disappear */
+ (void)win_comp_pos(); /* recompute w_winrow for all windows */
+- must_redraw = CLEAR; /* need to redraw everything */
+ #ifdef FEAT_DIFF
+ diff_need_scrollbind = TRUE;
+ #endif
+--- 3939,3944 ----
+***************
+*** 3973,3979 ****
+ apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
+ }
+
+! redraw_all_later(CLEAR);
+ }
+
+ /*
+--- 3972,3978 ----
+ apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
+ }
+
+! redraw_all_later(NOT_VALID);
+ }
+
+ /*
+***************
+*** 6569,6575 ****
+ win_comp_pos();
+ if (wp != NULL && close_curwin)
+ win_goto(wp);
+! redraw_all_later(CLEAR);
+ }
+ clear_snapshot(curtab, idx);
+ }
+--- 6568,6574 ----
+ win_comp_pos();
+ if (wp != NULL && close_curwin)
+ win_goto(wp);
+! redraw_all_later(NOT_VALID);
+ }
+ clear_snapshot(curtab, idx);
+ }
+*** ../vim-8.1.0697/src/version.c 2019-01-06 16:23:29.499325079 +0100
+--- src/version.c 2019-01-06 17:04:09.853949947 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 698,
+ /**/
+
+--
+Two percent of zero is almost 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.0699 b/data/vim/patches/8.1.0699
new file mode 100644
index 000000000..fd483b7ed
--- /dev/null
+++ b/data/vim/patches/8.1.0699
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0699
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0699
+Problem: Compiler warning for uninitialized variable. (Tony Mechelynck)
+Solution: Add a dummy init.
+Files: src/edit.c
+
+
+*** ../vim-8.1.0698/src/edit.c 2019-01-06 15:29:52.540852980 +0100
+--- src/edit.c 2019-01-06 17:42:36.649397395 +0100
+***************
+*** 7970,7976 ****
+ if (cc > 0)
+ {
+ #ifdef FEAT_TEXT_PROP
+! size_t len_before;
+
+ if (curbuf->b_has_textprop)
+ {
+--- 7970,7976 ----
+ if (cc > 0)
+ {
+ #ifdef FEAT_TEXT_PROP
+! size_t len_before = 0; // init to shut up GCC
+
+ if (curbuf->b_has_textprop)
+ {
+*** ../vim-8.1.0698/src/version.c 2019-01-06 17:25:23.876557968 +0100
+--- src/version.c 2019-01-06 17:44:27.488666435 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 699,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+116. You are living with your boyfriend who networks your respective
+ computers so you can sit in separate rooms and email each other
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0700 b/data/vim/patches/8.1.0700
new file mode 100644
index 000000000..fbb3bd38a
--- /dev/null
+++ b/data/vim/patches/8.1.0700
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0700
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0700 (after 8.1.0698)
+Problem: Using "gt" sometimes does not redraw a tab. (Jason Franklin)
+Solution: Always set must_redraw in redraw_all_later().
+Files: src/screen.c
+
+
+*** ../vim-8.1.0699/src/screen.c 2019-01-03 21:44:30.267072385 +0100
+--- src/screen.c 2019-01-06 22:17:49.441496329 +0100
+***************
+*** 238,243 ****
+--- 238,246 ----
+ {
+ redraw_win_later(wp, type);
+ }
++ // This may be needed when switching tabs.
++ if (must_redraw < type)
++ must_redraw = type;
+ }
+
+ /*
+*** ../vim-8.1.0699/src/version.c 2019-01-06 17:44:34.304621294 +0100
+--- src/version.c 2019-01-06 22:21:57.035885053 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 700,
+ /**/
+
+--
+An actual excerpt from a classified section of a city newspaper:
+"Illiterate? Write today for free help!"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0701 b/data/vim/patches/8.1.0701
new file mode 100644
index 000000000..de3d606ee
--- /dev/null
+++ b/data/vim/patches/8.1.0701
@@ -0,0 +1,323 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0701
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0701
+Problem: Sign message not translated and inconsistent spacing.
+Solution: Add _() for translation. Add a space. (Ken Takata) Also use
+ MSG_BUF_LEN instead of BUFSIZ.
+Files: src/sign.c, src/testdir/test_signs.vim
+
+
+*** ../vim-8.1.0700/src/sign.c 2019-01-06 16:23:29.499325079 +0100
+--- src/sign.c 2019-01-07 20:42:22.384390285 +0100
+***************
+*** 607,614 ****
+ {
+ buf_T *buf;
+ signlist_T *sign;
+! char lbuf[BUFSIZ];
+! char group[BUFSIZ];
+
+ MSG_PUTS_TITLE(_("\n--- Signs ---"));
+ msg_putchar('\n');
+--- 607,614 ----
+ {
+ buf_T *buf;
+ signlist_T *sign;
+! char lbuf[MSG_BUF_LEN];
+! char group[MSG_BUF_LEN];
+
+ MSG_PUTS_TITLE(_("\n--- Signs ---"));
+ msg_putchar('\n');
+***************
+*** 620,626 ****
+ {
+ if (buf->b_signlist != NULL)
+ {
+! vim_snprintf(lbuf, BUFSIZ, _("Signs for %s:"), buf->b_fname);
+ MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
+ msg_putchar('\n');
+ }
+--- 620,626 ----
+ {
+ if (buf->b_signlist != NULL)
+ {
+! vim_snprintf(lbuf, MSG_BUF_LEN, _("Signs for %s:"), buf->b_fname);
+ MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
+ msg_putchar('\n');
+ }
+***************
+*** 631,642 ****
+ if (!sign_in_group(sign, sign_group))
+ continue;
+ if (sign->group != NULL)
+! vim_snprintf(group, BUFSIZ, " group=%s",
+ sign->group->sg_name);
+ else
+ group[0] = '\0';
+! vim_snprintf(lbuf, BUFSIZ, _(" line=%ld id=%d%s name=%s "
+! "priority=%d"),
+ (long)sign->lnum, sign->id, group,
+ sign_typenr2name(sign->typenr), sign->priority);
+ MSG_PUTS(lbuf);
+--- 631,642 ----
+ if (!sign_in_group(sign, sign_group))
+ continue;
+ if (sign->group != NULL)
+! vim_snprintf(group, MSG_BUF_LEN, _(" group=%s"),
+ sign->group->sg_name);
+ else
+ group[0] = '\0';
+! vim_snprintf(lbuf, MSG_BUF_LEN,
+! _(" line=%ld id=%d%s name=%s priority=%d"),
+ (long)sign->lnum, sign->id, group,
+ sign_typenr2name(sign->typenr), sign->priority);
+ MSG_PUTS(lbuf);
+*** ../vim-8.1.0700/src/testdir/test_signs.vim 2019-01-06 16:23:29.499325079 +0100
+--- src/testdir/test_signs.vim 2019-01-07 20:48:20.517760217 +0100
+***************
+*** 67,73 ****
+ " Check placed signs
+ let a=execute('sign place')
+ call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n" .
+! \ " line=3 id=41 name=Sign1 priority=10\n", a)
+
+ " Unplace the sign and try jumping to it again should fail.
+ sign unplace 41
+--- 67,73 ----
+ " Check placed signs
+ let a=execute('sign place')
+ call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n" .
+! \ " line=3 id=41 name=Sign1 priority=10\n", a)
+
+ " Unplace the sign and try jumping to it again should fail.
+ sign unplace 41
+***************
+*** 95,101 ****
+ sign place 77 line=9 name=Sign2
+ let a=execute('sign place')
+ call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n" .
+! \ " line=9 id=77 name=Sign2 priority=10\n", a)
+ sign unplace *
+
+ " Check :jump with file=...
+--- 95,101 ----
+ sign place 77 line=9 name=Sign2
+ let a=execute('sign place')
+ call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n" .
+! \ " line=9 id=77 name=Sign2 priority=10\n", a)
+ sign unplace *
+
+ " Check :jump with file=...
+***************
+*** 161,167 ****
+ exe 'sign place 20 line=3 name=004 buffer=' . bufnr('')
+ let a = execute('sign place')
+ call assert_equal("\n--- Signs ---\nSigns for foo:\n" .
+! \ " line=3 id=20 name=4 priority=10\n", a)
+ exe 'sign unplace 20 buffer=' . bufnr('')
+ sign undefine 004
+ call assert_fails('sign list 4', 'E155:')
+--- 161,167 ----
+ exe 'sign place 20 line=3 name=004 buffer=' . bufnr('')
+ let a = execute('sign place')
+ call assert_equal("\n--- Signs ---\nSigns for foo:\n" .
+! \ " line=3 id=20 name=4 priority=10\n", a)
+ exe 'sign unplace 20 buffer=' . bufnr('')
+ sign undefine 004
+ call assert_fails('sign list 4', 'E155:')
+***************
+*** 189,195 ****
+ " Listing placed sign should show that sign is deleted.
+ let a=execute('sign place')
+ call assert_equal("\n--- Signs ---\nSigns for foobar:\n" .
+! \ " line=1 id=41 name=[Deleted] priority=10\n", a)
+
+ sign unplace 41
+ let a=execute('sign place')
+--- 189,195 ----
+ " Listing placed sign should show that sign is deleted.
+ let a=execute('sign place')
+ call assert_equal("\n--- Signs ---\nSigns for foobar:\n" .
+! \ " line=1 id=41 name=[Deleted] priority=10\n", a)
+
+ sign unplace 41
+ let a=execute('sign place')
+***************
+*** 613,631 ****
+ " :sign place file={fname}
+ let a = execute('sign place file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+ " :sign place group={group} file={fname}
+ let a = execute('sign place group=g2 file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " :sign place group=* file={fname}
+ let a = execute('sign place group=* file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 group=g2 name=sign1 priority=10\n" .
+! \ " line=10 id=5 group=g1 name=sign1 priority=10\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+ " Error case: non-existing group
+ let a = execute('sign place group=xyz file=Xsign')
+--- 613,631 ----
+ " :sign place file={fname}
+ let a = execute('sign place file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+ " :sign place group={group} file={fname}
+ let a = execute('sign place group=g2 file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " :sign place group=* file={fname}
+ let a = execute('sign place group=* file=Xsign')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 group=g2 name=sign1 priority=10\n" .
+! \ " line=10 id=5 group=g1 name=sign1 priority=10\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+ " Error case: non-existing group
+ let a = execute('sign place group=xyz file=Xsign')
+***************
+*** 640,658 ****
+ " :sign place buffer={fname}
+ let a = execute('sign place buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+ " :sign place group={group} buffer={fname}
+ let a = execute('sign place group=g2 buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " :sign place group=* buffer={fname}
+ let a = execute('sign place group=* buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n" .
+! \ " line=11 id=5 group=g1 name=sign1 priority=10\n" .
+! \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " Error case: non-existing group
+ let a = execute('sign place group=xyz buffer=' . bnum)
+--- 640,658 ----
+ " :sign place buffer={fname}
+ let a = execute('sign place buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+ " :sign place group={group} buffer={fname}
+ let a = execute('sign place group=g2 buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " :sign place group=* buffer={fname}
+ let a = execute('sign place group=* buffer=' . bnum)
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n" .
+! \ " line=11 id=5 group=g1 name=sign1 priority=10\n" .
+! \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " Error case: non-existing group
+ let a = execute('sign place group=xyz buffer=' . bnum)
+***************
+*** 661,679 ****
+ " :sign place
+ let a = execute('sign place')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+ " :sign place group={group}
+ let a = execute('sign place group=g1')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=11 id=5 group=g1 name=sign1 priority=10\n", a)
+
+ " :sign place group=*
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n" .
+! \ " line=11 id=5 group=g1 name=sign1 priority=10\n" .
+! \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " Test for ':sign jump' command with groups
+ sign jump 5 group=g1 file=Xsign
+--- 661,679 ----
+ " :sign place
+ let a = execute('sign place')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n", a)
+
+ " :sign place group={group}
+ let a = execute('sign place group=g1')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=11 id=5 group=g1 name=sign1 priority=10\n", a)
+
+ " :sign place group=*
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=10\n" .
+! \ " line=11 id=5 group=g1 name=sign1 priority=10\n" .
+! \ " line=12 id=5 group=g2 name=sign1 priority=10\n", a)
+
+ " Test for ':sign jump' command with groups
+ sign jump 5 group=g1 file=Xsign
+***************
+*** 1128,1141 ****
+ sign place 5 group=g2 line=10 name=sign1 priority=25 file=Xsign
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=30\n" .
+! \ " line=10 id=5 group=g2 name=sign1 priority=25\n" .
+! \ " line=10 id=5 group=g1 name=sign1 priority=20\n", a)
+
+ " Test for :sign place group={group}
+ let a = execute('sign place group=g1')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 group=g1 name=sign1 priority=20\n", a)
+
+ call sign_unplace('*')
+ call sign_undefine()
+--- 1128,1141 ----
+ sign place 5 group=g2 line=10 name=sign1 priority=25 file=Xsign
+ let a = execute('sign place group=*')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 name=sign1 priority=30\n" .
+! \ " line=10 id=5 group=g2 name=sign1 priority=25\n" .
+! \ " line=10 id=5 group=g1 name=sign1 priority=20\n", a)
+
+ " Test for :sign place group={group}
+ let a = execute('sign place group=g1')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+! \ " line=10 id=5 group=g1 name=sign1 priority=20\n", a)
+
+ call sign_unplace('*')
+ call sign_undefine()
+*** ../vim-8.1.0700/src/version.c 2019-01-06 22:22:03.323843894 +0100
+--- src/version.c 2019-01-07 20:43:30.323886492 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 701,
+ /**/
+
+--
+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.0702 b/data/vim/patches/8.1.0702
new file mode 100644
index 000000000..1711cbccf
--- /dev/null
+++ b/data/vim/patches/8.1.0702
@@ -0,0 +1,132 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0702
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0702
+Problem: ":sign place" only uses the current buffer.
+Solution: List signs for all buffers when there is no buffer argument.
+ Fix error message for invalid buffer name in sign_place().
+ (Yegappan Lakshmanan, closes #3774)
+Files: runtime/doc/eval.txt, src/evalfunc.c, src/sign.c,
+ src/testdir/test_signs.vim
+
+
+*** ../vim-8.1.0701/runtime/doc/eval.txt 2019-01-06 16:23:29.495325106 +0100
+--- runtime/doc/eval.txt 2019-01-07 21:55:34.129662097 +0100
+***************
+*** 7945,7950 ****
+--- 7971,7979 ----
+ name name of the defined sign
+ priority sign priority
+
++ The returned signs in a buffer are ordered by their line
++ number.
++
+ Returns an empty list on failure or if there are no placed
+ signs.
+
+*** ../vim-8.1.0701/src/evalfunc.c 2019-01-04 18:07:20.981806698 +0100
+--- src/evalfunc.c 2019-01-07 21:55:34.129662097 +0100
+***************
+*** 11462,11468 ****
+ buf = tv_get_buf(&argvars[3], FALSE);
+ if (buf == NULL)
+ {
+! EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(&argvars[2]));
+ goto cleanup;
+ }
+
+--- 11462,11468 ----
+ buf = tv_get_buf(&argvars[3], FALSE);
+ if (buf == NULL)
+ {
+! EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(&argvars[3]));
+ goto cleanup;
+ }
+
+*** ../vim-8.1.0701/src/sign.c 2019-01-07 21:16:49.329347583 +0100
+--- src/sign.c 2019-01-07 21:55:34.129662097 +0100
+***************
+*** 1237,1242 ****
+--- 1237,1243 ----
+ char_u *arg1;
+ char_u *name;
+ char_u *filename = NULL;
++ int lnum_arg = FALSE;
+
+ // first arg could be placed sign id
+ arg1 = arg;
+***************
+*** 1259,1264 ****
+--- 1260,1266 ----
+ arg += 5;
+ *lnum = atoi((char *)arg);
+ arg = skiptowhite(arg);
++ lnum_arg = TRUE;
+ }
+ else if (STRNCMP(arg, "*", 1) == 0 && cmd == SIGNCMD_UNPLACE)
+ {
+***************
+*** 1327,1333 ****
+
+ // If the filename is not supplied for the sign place or the sign jump
+ // command, then use the current buffer.
+! if (filename == NULL && (cmd == SIGNCMD_PLACE || cmd == SIGNCMD_JUMP))
+ *buf = curwin->w_buffer;
+
+ return OK;
+--- 1329,1336 ----
+
+ // If the filename is not supplied for the sign place or the sign jump
+ // command, then use the current buffer.
+! if (filename == NULL && ((cmd == SIGNCMD_PLACE && lnum_arg)
+! || cmd == SIGNCMD_JUMP))
+ *buf = curwin->w_buffer;
+
+ return OK;
+*** ../vim-8.1.0701/src/testdir/test_signs.vim 2019-01-07 21:16:49.329347583 +0100
+--- src/testdir/test_signs.vim 2019-01-07 21:55:34.129662097 +0100
+***************
+*** 663,668 ****
+--- 663,680 ----
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+ \ " line=10 id=5 name=sign1 priority=10\n", a)
+
++ " Place signs in more than one buffer and list the signs
++ split foo
++ set buftype=nofile
++ sign place 25 line=76 name=sign1 priority=99 file=foo
++ let a = execute('sign place')
++ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
++ \ " line=10 id=5 name=sign1 priority=10\n" .
++ \ "Signs for foo:\n" .
++ \ " line=76 id=25 name=sign1 priority=99\n", a)
++ close
++ bwipe foo
++
+ " :sign place group={group}
+ let a = execute('sign place group=g1')
+ call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
+*** ../vim-8.1.0701/src/version.c 2019-01-07 21:16:49.329347583 +0100
+--- src/version.c 2019-01-07 22:01:25.163266068 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 702,
+ /**/
+
+--
+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.0703 b/data/vim/patches/8.1.0703
new file mode 100644
index 000000000..ef671abcf
--- /dev/null
+++ b/data/vim/patches/8.1.0703
@@ -0,0 +1,86 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0703
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0703
+Problem: Compiler warnings with 64-bit compiler.
+Solution: Change types, add type casts. (Mike Williams)
+Files: src/textprop.c, src/undo.c
+
+
+*** ../vim-8.1.0702/src/textprop.c 2019-01-06 12:54:51.823033166 +0100
+--- src/textprop.c 2019-01-08 20:11:08.036374758 +0100
+***************
+*** 357,368 ****
+ static void
+ set_text_props(linenr_T lnum, char_u *props, int len)
+ {
+! char_u *text;
+! char_u *newtext;
+! size_t textlen;
+
+ text = ml_get(lnum);
+! textlen = STRLEN(text) + 1;
+ newtext = alloc(textlen + len);
+ if (newtext == NULL)
+ return;
+--- 357,368 ----
+ static void
+ set_text_props(linenr_T lnum, char_u *props, int len)
+ {
+! char_u *text;
+! char_u *newtext;
+! int textlen;
+
+ text = ml_get(lnum);
+! textlen = (int)STRLEN(text) + 1;
+ newtext = alloc(textlen + len);
+ if (newtext == NULL)
+ return;
+*** ../vim-8.1.0702/src/undo.c 2019-01-04 15:09:52.918373097 +0100
+--- src/undo.c 2019-01-08 20:12:48.227677401 +0100
+***************
+*** 1205,1213 ****
+ /* buffer-specific data */
+ undo_write_bytes(bi, (long_u)buf->b_ml.ml_line_count, 4);
+ len = buf->b_u_line_ptr.ul_line == NULL
+! ? 0 : STRLEN(buf->b_u_line_ptr.ul_line);
+ undo_write_bytes(bi, (long_u)len, 4);
+! if (len > 0 && fwrite_crypt(bi, buf->b_u_line_ptr.ul_line, (size_t)len) == FAIL)
+ return FAIL;
+ undo_write_bytes(bi, (long_u)buf->b_u_line_lnum, 4);
+ undo_write_bytes(bi, (long_u)buf->b_u_line_colnr, 4);
+--- 1205,1214 ----
+ /* buffer-specific data */
+ undo_write_bytes(bi, (long_u)buf->b_ml.ml_line_count, 4);
+ len = buf->b_u_line_ptr.ul_line == NULL
+! ? 0L : (long)STRLEN(buf->b_u_line_ptr.ul_line);
+ undo_write_bytes(bi, (long_u)len, 4);
+! if (len > 0 && fwrite_crypt(bi, buf->b_u_line_ptr.ul_line, (size_t)len)
+! == FAIL)
+ return FAIL;
+ undo_write_bytes(bi, (long_u)buf->b_u_line_lnum, 4);
+ undo_write_bytes(bi, (long_u)buf->b_u_line_colnr, 4);
+*** ../vim-8.1.0702/src/version.c 2019-01-07 22:09:54.439460880 +0100
+--- src/version.c 2019-01-08 20:13:34.287356560 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 703,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+131. You challenge authority and society by portnuking people
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0704 b/data/vim/patches/8.1.0704
new file mode 100644
index 000000000..46eaad29b
--- /dev/null
+++ b/data/vim/patches/8.1.0704
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0704
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0704
+Problem: Building with Ruby 2.6 gives compiler warnings.
+Solution: Define a stub for rb_ary_detransient. (Ozaki Kiichi, closes #3779)
+Files: src/if_ruby.c
+
+
+*** ../vim-8.1.0703/src/if_ruby.c 2018-12-27 22:10:57.797337989 +0100
+--- src/if_ruby.c 2019-01-08 20:24:05.178582966 +0100
+***************
+*** 124,130 ****
+ #endif
+
+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 26
+! # define rb_ary_detransient (*dll_rb_ary_detransient)
+ #endif
+
+ #include <ruby.h>
+--- 124,130 ----
+ #endif
+
+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 26
+! # define rb_ary_detransient rb_ary_detransient_stub
+ #endif
+
+ #include <ruby.h>
+***************
+*** 549,554 ****
+--- 549,561 ----
+ # endif
+ # endif
+
++ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 26
++ void rb_ary_detransient_stub(VALUE x)
++ {
++ dll_rb_ary_detransient(x);
++ }
++ # endif
++
+ static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */
+
+ /*
+*** ../vim-8.1.0703/src/version.c 2019-01-08 20:14:31.614957028 +0100
+--- src/version.c 2019-01-08 20:27:03.553087076 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 704,
+ /**/
+
+--
+Why is it called "Windows"? "Gates" would be more appropriate...
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0705 b/data/vim/patches/8.1.0705
new file mode 100644
index 000000000..d188ed239
--- /dev/null
+++ b/data/vim/patches/8.1.0705
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0705
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0705
+Problem: :colorscheme isn't tested enough
+Solution: Improve test coverage of :colorscheme. (Dominique Pelle, closes
+ #3777) Remove unnecessary sleep.
+Files: src/testdir/test_gui.vim
+
+
+*** ../vim-8.1.0704/src/testdir/test_gui.vim 2018-09-14 21:27:02.775741320 +0200
+--- src/testdir/test_gui.vim 2019-01-08 21:03:52.214110621 +0100
+***************
+*** 42,51 ****
+
+ colorscheme torte
+ redraw!
+- sleep 200m
+ call assert_equal('dark', &background)
+ call assert_equal(1, g:before_colors)
+ call assert_equal(2, g:after_colors)
+
+ exec 'colorscheme' colorscheme_saved
+ augroup TestColors
+--- 42,56 ----
+
+ colorscheme torte
+ redraw!
+ call assert_equal('dark', &background)
+ call assert_equal(1, g:before_colors)
+ call assert_equal(2, g:after_colors)
++ call assert_equal("\ntorte", execute('colorscheme'))
++
++ let a = substitute(execute('hi Search'), "\n\\s\\+", ' ', 'g')
++ call assert_match("\nSearch xxx term=reverse ctermfg=0 ctermbg=12 gui=bold guifg=Black guibg=Red", a)
++
++ call assert_fails('colorscheme does_not_exist', 'E185:')
+
+ exec 'colorscheme' colorscheme_saved
+ augroup TestColors
+*** ../vim-8.1.0704/src/version.c 2019-01-08 20:29:29.339909743 +0100
+--- src/version.c 2019-01-08 21:05:08.905336740 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 705,
+ /**/
+
+--
+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.0706 b/data/vim/patches/8.1.0706
new file mode 100644
index 000000000..fcc74c740
--- /dev/null
+++ b/data/vim/patches/8.1.0706
@@ -0,0 +1,330 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0706
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0706
+Problem: Tabline is not always redrawn when something that is used in
+ 'tabline' changes.
+Solution: Add ":redrawtabline" so that a plugin can at least cause the
+ redraw when needed.
+Files: runtime/doc/various.txt, runtime/doc/options.txt, src/ex_docmd.c,
+ src/ex_cmds.h, src/screen.c, src/proto/screen.pro,
+ src/ex_cmdidxs.h, src/testdir/test_tabline.vim
+
+
+*** ../vim-8.1.0705/runtime/doc/various.txt 2018-10-25 13:31:33.825906932 +0200
+--- runtime/doc/various.txt 2019-01-08 21:30:41.024061801 +0100
+***************
+*** 30,35 ****
+--- 30,40 ----
+ includes an item that doesn't cause automatic
+ updating.
+
++ *:redrawt* *:redrawtabline*
++ :redrawt[abline] Redraw the tabline. Useful to update the tabline when
++ 'tabline' includes an item that doesn't trigger
++ automatic updating.
++
+ *N<Del>*
+ <Del> When entering a number: Remove the last digit.
+ Note: if you like to use <BS> for this, add this
+***************
+*** 448,453 ****
+--- 453,459 ----
+ N *+termresponse* support for |t_RV| and |v:termresponse|
+ B *+termguicolors* 24-bit color in xterm-compatible terminals support
+ N *+textobjects* |text-objects| selection
++ N *+textprop* |text-properties|
+ *+tgetent* non-Unix only: able to use external termcap
+ N *+timers* the |timer_start()| function
+ N *+title* Setting the window 'title' and 'icon'
+*** ../vim-8.1.0705/runtime/doc/options.txt 2018-12-16 18:19:56.142140712 +0100
+--- runtime/doc/options.txt 2019-01-08 21:33:05.538835954 +0100
+***************
+*** 7716,7721 ****
+--- 7761,7769 ----
+ the text to be displayed. Use "%1T" for the first label, "%2T" for
+ the second one, etc. Use "%X" items for closing labels.
+
++ When changing something that is used in 'tabline' that does not
++ trigger it to be updated, use |:redrawtabline|.
++
+ Keep in mind that only one of the tab pages is the current one, others
+ are invisible and you can't jump to their windows.
+
+*** ../vim-8.1.0705/src/ex_docmd.c 2018-12-26 21:44:49.815970351 +0100
+--- src/ex_docmd.c 2019-01-08 21:37:20.140705263 +0100
+***************
+*** 296,301 ****
+--- 296,302 ----
+ static void ex_later(exarg_T *eap);
+ static void ex_redir(exarg_T *eap);
+ static void ex_redrawstatus(exarg_T *eap);
++ static void ex_redrawtabline(exarg_T *eap);
+ static void close_redir(void);
+ static void ex_mkrc(exarg_T *eap);
+ static void ex_mark(exarg_T *eap);
+***************
+*** 9916,9921 ****
+--- 9917,9941 ----
+ RedrawingDisabled = r;
+ p_lz = p;
+ out_flush();
++ }
++
++ /*
++ * ":redrawtabline": force redraw of the tabline
++ */
++ static void
++ ex_redrawtabline(exarg_T *eap UNUSED)
++ {
++ int r = RedrawingDisabled;
++ int p = p_lz;
++
++ RedrawingDisabled = 0;
++ p_lz = FALSE;
++
++ draw_tabline();
++
++ RedrawingDisabled = r;
++ p_lz = p;
++ out_flush();
+ }
+
+ static void
+*** ../vim-8.1.0705/src/ex_cmds.h 2018-12-14 18:52:57.169528762 +0100
+--- src/ex_cmds.h 2019-01-08 21:37:55.296413236 +0100
+***************
+*** 1175,1180 ****
+--- 1175,1183 ----
+ EX(CMD_redrawstatus, "redrawstatus", ex_redrawstatus,
+ BANG|TRLBAR|CMDWIN,
+ ADDR_LINES),
++ EX(CMD_redrawtabline, "redrawtabline", ex_redrawtabline,
++ TRLBAR|CMDWIN,
++ ADDR_LINES),
+ EX(CMD_registers, "registers", ex_display,
+ EXTRA|NOTRLCOM|TRLBAR|CMDWIN,
+ ADDR_LINES),
+*** ../vim-8.1.0705/src/screen.c 2019-01-06 22:22:03.323843894 +0100
+--- src/screen.c 2019-01-08 21:39:59.155387564 +0100
+***************
+*** 154,160 ****
+ static void win_rest_invalid(win_T *wp);
+ static void msg_pos_mode(void);
+ static void recording_mode(int attr);
+- static void draw_tabline(void);
+ static int fillchar_status(int *attr, win_T *wp);
+ static int fillchar_vsep(int *attr);
+ #ifdef FEAT_MENU
+--- 154,159 ----
+***************
+*** 10693,10699 ****
+ /*
+ * Draw the tab pages line at the top of the Vim window.
+ */
+! static void
+ draw_tabline(void)
+ {
+ int tabcount = 0;
+--- 10692,10698 ----
+ /*
+ * Draw the tab pages line at the top of the Vim window.
+ */
+! void
+ draw_tabline(void)
+ {
+ int tabcount = 0;
+*** ../vim-8.1.0705/src/proto/screen.pro 2018-09-12 21:52:14.323799725 +0200
+--- src/proto/screen.pro 2019-01-08 21:40:02.323361391 +0100
+***************
+*** 52,57 ****
+--- 52,58 ----
+ int showmode(void);
+ void unshowmode(int force);
+ void clearmode(void);
++ void draw_tabline(void);
+ void get_trans_bufname(buf_T *buf);
+ int redrawing(void);
+ int messaging(void);
+*** ../vim-8.1.0705/src/ex_cmdidxs.h 2018-10-19 22:35:04.885189994 +0200
+--- src/ex_cmdidxs.h 2019-01-08 21:41:34.674599461 +0100
+***************
+*** 23,36 ****
+ /* p */ 309,
+ /* q */ 348,
+ /* r */ 351,
+! /* s */ 370,
+! /* t */ 437,
+! /* u */ 480,
+! /* v */ 491,
+! /* w */ 509,
+! /* x */ 524,
+! /* y */ 533,
+! /* z */ 534
+ };
+
+ /*
+--- 23,36 ----
+ /* p */ 309,
+ /* q */ 348,
+ /* r */ 351,
+! /* s */ 371,
+! /* t */ 438,
+! /* u */ 481,
+! /* v */ 492,
+! /* w */ 510,
+! /* x */ 525,
+! /* y */ 534,
+! /* z */ 535
+ };
+
+ /*
+***************
+*** 58,64 ****
+ /* o */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 0, 0, 0, 0, 0, 0, 9, 0, 11, 0, 0, 0 },
+ /* p */ { 1, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 0, 0, 16, 17, 26, 0, 27, 0, 28, 0 },
+ /* 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 },
+--- 58,64 ----
+ /* o */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 0, 0, 0, 0, 0, 0, 9, 0, 11, 0, 0, 0 },
+ /* p */ { 1, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 0, 0, 16, 17, 26, 0, 27, 0, 28, 0 },
+ /* 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, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 19, 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 },
+***************
+*** 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;
+--- 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 = 548;
+*** ../vim-8.1.0705/src/testdir/test_tabline.vim 2016-04-11 22:47:00.000000000 +0200
+--- src/testdir/test_tabline.vim 2019-01-08 21:58:51.558123995 +0100
+***************
+*** 1,19 ****
+! function! TablineWithCaughtError()
+ let s:func_in_tabline_called = 1
+ try
+ call eval('unknown expression')
+ catch
+ endtry
+ return ''
+! endfunction
+
+! function! TablineWithError()
+ let s:func_in_tabline_called = 1
+ call eval('unknown expression')
+ return ''
+! endfunction
+
+! function! Test_caught_error_in_tabline()
+ if has('gui')
+ set guioptions-=e
+ endif
+--- 1,22 ----
+!
+! source shared.vim
+!
+! func TablineWithCaughtError()
+ let s:func_in_tabline_called = 1
+ try
+ call eval('unknown expression')
+ catch
+ endtry
+ return ''
+! endfunc
+
+! func TablineWithError()
+ let s:func_in_tabline_called = 1
+ call eval('unknown expression')
+ return ''
+! endfunc
+
+! func Test_caught_error_in_tabline()
+ if has('gui')
+ set guioptions-=e
+ endif
+***************
+*** 27,35 ****
+ call assert_equal(tabline, &tabline)
+ set tabline=
+ let &showtabline = showtabline_save
+! endfunction
+
+! function! Test_tabline_will_be_disabled_with_error()
+ if has('gui')
+ set guioptions-=e
+ endif
+--- 30,38 ----
+ call assert_equal(tabline, &tabline)
+ set tabline=
+ let &showtabline = showtabline_save
+! endfunc
+
+! func Test_tabline_will_be_disabled_with_error()
+ if has('gui')
+ set guioptions-=e
+ endif
+***************
+*** 46,49 ****
+ call assert_equal('', &tabline)
+ set tabline=
+ let &showtabline = showtabline_save
+! endfunction
+--- 49,72 ----
+ call assert_equal('', &tabline)
+ set tabline=
+ let &showtabline = showtabline_save
+! endfunc
+!
+! func Test_redrawtabline()
+! if has('gui')
+! set guioptions-=e
+! endif
+! let showtabline_save = &showtabline
+! set showtabline=2
+! set tabline=%{bufnr('$')}
+! edit Xtabline1
+! edit Xtabline2
+! redraw
+! call assert_match(bufnr('$') . '', Screenline(1))
+! au BufAdd * redrawtabline
+! badd Xtabline3
+! call assert_match(bufnr('$') . '', Screenline(1))
+!
+! set tabline=
+! let &showtabline = showtabline_save
+! au! Bufadd
+! endfunc
+*** ../vim-8.1.0705/src/version.c 2019-01-08 21:05:47.820952657 +0100
+--- src/version.c 2019-01-08 21:53:43.416634012 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 706,
+ /**/
+
+--
+Never eat yellow snow.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0707 b/data/vim/patches/8.1.0707
new file mode 100644
index 000000000..285ad7b17
--- /dev/null
+++ b/data/vim/patches/8.1.0707
@@ -0,0 +1,135 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0707
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0707
+Problem: Text property columns are not adjusted for changed indent.
+Solution: Adjust text properties.
+Files: src/misc1.c, src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.0706/src/misc1.c 2019-01-02 18:00:22.639279766 +0100
+--- src/misc1.c 2019-01-08 22:59:28.733218404 +0100
+***************
+*** 411,434 ****
+ }
+ mch_memmove(s, p, (size_t)line_len);
+
+! /* Replace the line (unless undo fails). */
+ if (!(flags & SIN_UNDO) || u_savesub(curwin->w_cursor.lnum) == OK)
+ {
+ ml_replace(curwin->w_cursor.lnum, newline, FALSE);
+ if (flags & SIN_CHANGED)
+ changed_bytes(curwin->w_cursor.lnum, 0);
+! /* Correct saved cursor position if it is in this line. */
+ if (saved_cursor.lnum == curwin->w_cursor.lnum)
+ {
+ if (saved_cursor.col >= (colnr_T)(p - oldline))
+! /* cursor was after the indent, adjust for the number of
+! * bytes added/removed */
+ saved_cursor.col += ind_len - (colnr_T)(p - oldline);
+ else if (saved_cursor.col >= (colnr_T)(s - newline))
+! /* cursor was in the indent, and is now after it, put it back
+! * at the start of the indent (replacing spaces with TAB) */
+ saved_cursor.col = (colnr_T)(s - newline);
+ }
+ retval = TRUE;
+ }
+ else
+--- 411,439 ----
+ }
+ mch_memmove(s, p, (size_t)line_len);
+
+! // Replace the line (unless undo fails).
+ if (!(flags & SIN_UNDO) || u_savesub(curwin->w_cursor.lnum) == OK)
+ {
+ ml_replace(curwin->w_cursor.lnum, newline, FALSE);
+ if (flags & SIN_CHANGED)
+ changed_bytes(curwin->w_cursor.lnum, 0);
+!
+! // Correct saved cursor position if it is in this line.
+ if (saved_cursor.lnum == curwin->w_cursor.lnum)
+ {
+ if (saved_cursor.col >= (colnr_T)(p - oldline))
+! // cursor was after the indent, adjust for the number of
+! // bytes added/removed
+ saved_cursor.col += ind_len - (colnr_T)(p - oldline);
+ else if (saved_cursor.col >= (colnr_T)(s - newline))
+! // cursor was in the indent, and is now after it, put it back
+! // at the start of the indent (replacing spaces with TAB)
+ saved_cursor.col = (colnr_T)(s - newline);
+ }
++ #ifdef FEAT_TEXT_PROP
++ adjust_prop_columns(curwin->w_cursor.lnum, (colnr_T)(p - oldline),
++ ind_len - (colnr_T)(p - oldline));
++ #endif
+ retval = TRUE;
+ }
+ else
+*** ../vim-8.1.0706/src/testdir/test_textprop.vim 2019-01-04 23:09:45.249360567 +0100
+--- src/testdir/test_textprop.vim 2019-01-08 23:03:16.283370904 +0100
+***************
+*** 342,347 ****
+--- 342,381 ----
+ bwipe!
+ endfunc
+
++ func Test_prop_change_indent()
++ call prop_type_add('comment', {'highlight': 'Directory'})
++ new
++ call setline(1, [' xxx', 'yyyyy'])
++ call prop_add(2, 2, {'length': 2, 'type': 'comment'})
++ let expect = {'col': 2, 'length': 2, 'type': 'comment', 'start': 1, 'end': 1, 'id': 0}
++ call assert_equal([expect], prop_list(2))
++
++ set shiftwidth=3
++ normal 2G>>
++ call assert_equal(' yyyyy', getline(2))
++ let expect.col += 3
++ call assert_equal([expect], prop_list(2))
++
++ normal 2G==
++ call assert_equal(' yyyyy', getline(2))
++ let expect.col = 6
++ call assert_equal([expect], prop_list(2))
++
++ call prop_clear(2)
++ call prop_add(2, 2, {'length': 5, 'type': 'comment'})
++ let expect.col = 2
++ let expect.length = 5
++ call assert_equal([expect], prop_list(2))
++
++ normal 2G<<
++ call assert_equal(' yyyyy', getline(2))
++ let expect.length = 2
++ call assert_equal([expect], prop_list(2))
++
++ set shiftwidth&
++ call prop_type_delete('comment')
++ endfunc
++
+ " Setup a three line prop in lines 2 - 4.
+ " Add short props in line 1 and 5.
+ func Setup_three_line_prop()
+*** ../vim-8.1.0706/src/version.c 2019-01-08 22:02:36.044297306 +0100
+--- src/version.c 2019-01-08 23:06:09.505967326 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 707,
+ /**/
+
+--
+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.0708 b/data/vim/patches/8.1.0708
new file mode 100644
index 000000000..c91407668
--- /dev/null
+++ b/data/vim/patches/8.1.0708
@@ -0,0 +1,173 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0708
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0708
+Problem: Third argument for redrawWinline() is always FALSE.
+Solution: Drop the argument. (neovim #9479)
+Files: src/edit.c, src/move.c, src/screen.c, src/proto/screen.pro
+
+
+*** ../vim-8.1.0707/src/edit.c 2019-01-06 17:44:34.304621294 +0100
+--- src/edit.c 2019-01-09 20:49:07.042640158 +0100
+***************
+*** 1955,1961 ****
+ 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);
+--- 1955,1961 ----
+ 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);
+ else
+ #endif
+ screen_puts(pc_bytes, pc_row - msg_scrolled, pc_col, pc_attr);
+***************
+*** 2006,2012 ****
+ if (dollar_vcol >= 0)
+ {
+ dollar_vcol = -1;
+! redrawWinline(curwin, curwin->w_cursor.lnum, FALSE);
+ }
+ }
+
+--- 2006,2012 ----
+ if (dollar_vcol >= 0)
+ {
+ dollar_vcol = -1;
+! redrawWinline(curwin, curwin->w_cursor.lnum);
+ }
+ }
+
+***************
+*** 7074,7080 ****
+ linenr_T lnum = spell_redraw_lnum;
+
+ spell_redraw_lnum = 0;
+! redrawWinline(curwin, lnum, FALSE);
+ }
+ }
+
+--- 7074,7080 ----
+ linenr_T lnum = spell_redraw_lnum;
+
+ spell_redraw_lnum = 0;
+! redrawWinline(curwin, lnum);
+ }
+ }
+
+*** ../vim-8.1.0707/src/move.c 2018-11-24 14:27:36.988474753 +0100
+--- src/move.c 2019-01-09 20:49:22.266468754 +0100
+***************
+*** 153,160 ****
+ // "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
+--- 153,160 ----
+ // "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);
+! redrawWinline(wp, wp->w_cursor.lnum);
+ redraw_win_later(wp, VALID);
+ }
+ else
+*** ../vim-8.1.0707/src/screen.c 2019-01-08 22:02:36.044297306 +0100
+--- src/screen.c 2019-01-09 20:49:59.438056453 +0100
+***************
+*** 492,519 ****
+ void
+ redrawWinline(
+ win_T *wp,
+! linenr_T lnum,
+! int invalid UNUSED) /* window line height is invalid now */
+ {
+- #ifdef FEAT_FOLDING
+- 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
+ }
+
+ void
+--- 492,504 ----
+ void
+ redrawWinline(
+ win_T *wp,
+! linenr_T lnum)
+ {
+ 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);
+ }
+
+ void
+*** ../vim-8.1.0707/src/proto/screen.pro 2019-01-08 22:02:36.044297306 +0100
+--- src/proto/screen.pro 2019-01-09 20:50:15.181884364 +0100
+***************
+*** 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);
+--- 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);
+ void reset_updating_screen(int may_resize_shell);
+ void update_curbuf(int type);
+ int update_screen(int type_arg);
+*** ../vim-8.1.0707/src/version.c 2019-01-08 23:07:21.309386047 +0100
+--- src/version.c 2019-01-09 20:50:27.605749582 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 708,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+136. You decide to stay in a low-paying job teaching just for the
+ free Internet access.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0709 b/data/vim/patches/8.1.0709
new file mode 100644
index 000000000..db0b58cb2
--- /dev/null
+++ b/data/vim/patches/8.1.0709
@@ -0,0 +1,328 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0709
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0709
+Problem: Windows are updated for every added/deleted sign.
+Solution: Do not call update_debug_sign(). Only redraw when the line with
+ the sign is visible. (idea from neovim #9479)
+Files: src/sign.c, src/screen.c, src/proto/screen.pro
+
+
+*** ../vim-8.1.0708/src/sign.c 2019-01-07 22:09:54.439460880 +0100
+--- src/sign.c 2019-01-09 21:39:13.363740272 +0100
+***************
+*** 327,334 ****
+ prev = NULL;
+ FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ {
+! if (lnum == sign->lnum && id == sign->id &&
+! sign_in_group(sign, groupname))
+ {
+ // Update an existing sign
+ sign->typenr = typenr;
+--- 327,334 ----
+ prev = NULL;
+ FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ {
+! if (lnum == sign->lnum && id == sign->id
+! && sign_in_group(sign, groupname))
+ {
+ // Update an existing sign
+ sign->typenr = typenr;
+***************
+*** 427,435 ****
+ for (sign = buf->b_signlist; sign != NULL; sign = next)
+ {
+ next = sign->next;
+! if ((id == 0 || sign->id == id) &&
+! (atlnum == 0 || sign->lnum == atlnum) &&
+! sign_in_group(sign, group))
+
+ {
+ *lastp = next;
+--- 427,435 ----
+ for (sign = buf->b_signlist; sign != NULL; sign = next)
+ {
+ next = sign->next;
+! if ((id == 0 || sign->id == id)
+! && (atlnum == 0 || sign->lnum == atlnum)
+! && sign_in_group(sign, group))
+
+ {
+ *lastp = next;
+***************
+*** 439,445 ****
+ if (sign->group != NULL)
+ sign_group_unref(sign->group->sg_name);
+ vim_free(sign);
+! update_debug_sign(buf, lnum);
+ // Check whether only one sign needs to be deleted
+ // If deleting a sign with a specific identifer in a particular
+ // group or deleting any sign at a particular line number, delete
+--- 439,446 ----
+ if (sign->group != NULL)
+ sign_group_unref(sign->group->sg_name);
+ vim_free(sign);
+! redraw_buf_line_later(buf, lnum);
+!
+ // Check whether only one sign needs to be deleted
+ // If deleting a sign with a specific identifer in a particular
+ // group or deleting any sign at a particular line number, delete
+***************
+*** 453,465 ****
+ lastp = &sign->next;
+ }
+
+! // When deleted the last sign need to redraw the windows to remove the
+! // sign column.
+ if (buf->b_signlist == NULL)
+- {
+- redraw_buf_later(buf, NOT_VALID);
+ changed_cline_bef_curs();
+- }
+
+ return lnum;
+ }
+--- 454,463 ----
+ lastp = &sign->next;
+ }
+
+! // When deleting the last sign the cursor position may change, because the
+! // sign columns no longer shows.
+ if (buf->b_signlist == NULL)
+ changed_cline_bef_curs();
+
+ return lnum;
+ }
+***************
+*** 932,938 ****
+ // ":sign place {id} file={fname}": change sign type
+ lnum = buf_change_sign_type(buf, *sign_id, sign_group, sp->sn_typenr);
+ if (lnum > 0)
+! update_debug_sign(buf, lnum);
+ else
+ {
+ EMSG2(_("E885: Not possible to change sign %s"), sign_name);
+--- 930,936 ----
+ // ":sign place {id} file={fname}": change sign type
+ lnum = buf_change_sign_type(buf, *sign_id, sign_group, sp->sn_typenr);
+ if (lnum > 0)
+! redraw_buf_line_later(buf, lnum);
+ else
+ {
+ EMSG2(_("E885: Not possible to change sign %s"), sign_name);
+***************
+*** 1068,1075 ****
+ // :sign place
+ // :sign place group={group}
+ // :sign place group=*
+! if (lnum >= 0 || sign_name != NULL ||
+! (group != NULL && *group == '\0'))
+ EMSG(_(e_invarg));
+ else
+ sign_list_placed(buf, group);
+--- 1066,1073 ----
+ // :sign place
+ // :sign place group={group}
+ // :sign place group=*
+! if (lnum >= 0 || sign_name != NULL
+! || (group != NULL && *group == '\0'))
+ EMSG(_(e_invarg));
+ else
+ sign_list_placed(buf, group);
+***************
+*** 1077,1084 ****
+ else
+ {
+ // Place a new sign
+! if (sign_name == NULL || buf == NULL ||
+! (group != NULL && *group == '\0'))
+ {
+ EMSG(_(e_invarg));
+ return;
+--- 1075,1082 ----
+ else
+ {
+ // Place a new sign
+! if (sign_name == NULL || buf == NULL
+! || (group != NULL && *group == '\0'))
+ {
+ EMSG(_(e_invarg));
+ return;
+***************
+*** 1174,1181 ****
+ return;
+ }
+
+! if (buf == NULL || (group != NULL && *group == '\0') ||
+! lnum >= 0 || sign_name != NULL)
+ {
+ // File or buffer is not specified or an empty group is used
+ // or a line number or a sign name is specified.
+--- 1172,1179 ----
+ return;
+ }
+
+! if (buf == NULL || (group != NULL && *group == '\0')
+! || lnum >= 0 || sign_name != NULL)
+ {
+ // File or buffer is not specified or an empty group is used
+ // or a line number or a sign name is specified.
+***************
+*** 1330,1336 ****
+ // If the filename is not supplied for the sign place or the sign jump
+ // command, then use the current buffer.
+ if (filename == NULL && ((cmd == SIGNCMD_PLACE && lnum_arg)
+! || cmd == SIGNCMD_JUMP))
+ *buf = curwin->w_buffer;
+
+ return OK;
+--- 1328,1334 ----
+ // If the filename is not supplied for the sign place or the sign jump
+ // command, then use the current buffer.
+ if (filename == NULL && ((cmd == SIGNCMD_PLACE && lnum_arg)
+! || cmd == SIGNCMD_JUMP))
+ *buf = curwin->w_buffer;
+
+ return OK;
+***************
+*** 1522,1531 ****
+ {
+ if (!sign_in_group(sign, sign_group))
+ continue;
+! if ((lnum == 0 && sign_id == 0) ||
+! (sign_id == 0 && lnum == sign->lnum) ||
+! (lnum == 0 && sign_id == sign->id) ||
+! (lnum == sign->lnum && sign_id == sign->id))
+ {
+ if ((sdict = sign_get_info(sign)) != NULL)
+ list_append_dict(l, sdict);
+--- 1520,1529 ----
+ {
+ if (!sign_in_group(sign, sign_group))
+ continue;
+! if ((lnum == 0 && sign_id == 0)
+! || (sign_id == 0 && lnum == sign->lnum)
+! || (lnum == 0 && sign_id == sign->id)
+! || (lnum == sign->lnum && sign_id == sign->id))
+ {
+ if ((sdict = sign_get_info(sign)) != NULL)
+ list_append_dict(l, sdict);
+***************
+*** 1864,1871 ****
+ switch (cmd_idx)
+ {
+ case SIGNCMD_DEFINE:
+! if (STRNCMP(last, "texthl", p - last) == 0 ||
+! STRNCMP(last, "linehl", p - last) == 0)
+ xp->xp_context = EXPAND_HIGHLIGHT;
+ else if (STRNCMP(last, "icon", p - last) == 0)
+ xp->xp_context = EXPAND_FILES;
+--- 1862,1869 ----
+ switch (cmd_idx)
+ {
+ case SIGNCMD_DEFINE:
+! if (STRNCMP(last, "texthl", p - last) == 0
+! || STRNCMP(last, "linehl", p - last) == 0)
+ xp->xp_context = EXPAND_HIGHLIGHT;
+ else if (STRNCMP(last, "icon", p - last) == 0)
+ xp->xp_context = EXPAND_FILES;
+*** ../vim-8.1.0708/src/screen.c 2019-01-09 20:51:00.321398815 +0100
+--- src/screen.c 2019-01-09 21:47:15.772416499 +0100
+***************
+*** 264,269 ****
+--- 264,280 ----
+ }
+
+ void
++ redraw_buf_line_later(buf_T *buf, linenr_T lnum)
++ {
++ win_T *wp;
++
++ FOR_ALL_WINDOWS(wp)
++ if (wp->w_buffer == buf && lnum >= wp->w_topline
++ && lnum < wp->w_botline)
++ redrawWinline(wp, lnum);
++ }
++
++ void
+ redraw_buf_and_status_later(buf_T *buf, int type)
+ {
+ win_T *wp;
+***************
+*** 978,1003 ****
+ win_foldinfo.fi_level = 0;
+ # endif
+
+! /* update/delete a specific mark */
+ FOR_ALL_WINDOWS(wp)
+- {
+- if (buf != NULL && lnum > 0)
+- {
+- if (wp->w_buffer == buf && lnum >= wp->w_topline
+- && lnum < wp->w_botline)
+- {
+- 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);
+- }
+- }
+- else
+- redraw_win_later(wp, VALID);
+ if (wp->w_redr_type != 0)
+ doit = TRUE;
+- }
+
+ /* Return when there is nothing to do, screen updating is already
+ * happening (recursive call), messages on the screen or still starting up.
+--- 989,1001 ----
+ win_foldinfo.fi_level = 0;
+ # endif
+
+! // update/delete a specific sign
+! redraw_buf_line_later(buf, lnum);
+!
+! // check if it resulted in the need to redraw a window
+ FOR_ALL_WINDOWS(wp)
+ if (wp->w_redr_type != 0)
+ doit = TRUE;
+
+ /* Return when there is nothing to do, screen updating is already
+ * happening (recursive call), messages on the screen or still starting up.
+*** ../vim-8.1.0708/src/proto/screen.pro 2019-01-09 20:51:00.321398815 +0100
+--- src/proto/screen.pro 2019-01-09 21:39:29.319633988 +0100
+***************
+*** 5,10 ****
+--- 5,11 ----
+ void redraw_all_later(int type);
+ void redraw_curbuf_later(int type);
+ void redraw_buf_later(buf_T *buf, int type);
++ void redraw_buf_line_later(buf_T *buf, linenr_T lnum);
+ void redraw_buf_and_status_later(buf_T *buf, int type);
+ int redraw_asap(int type);
+ void redraw_after_callback(int call_update_screen);
+*** ../vim-8.1.0708/src/version.c 2019-01-09 20:51:00.321398815 +0100
+--- src/version.c 2019-01-09 21:25:07.452472773 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 709,
+ /**/
+
+--
+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.0710 b/data/vim/patches/8.1.0710
new file mode 100644
index 000000000..7e0a47ba7
--- /dev/null
+++ b/data/vim/patches/8.1.0710
@@ -0,0 +1,193 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0710
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0710
+Problem: When using timers may wait for job exit quite long.
+Solution: Return from ui_wait_for_chars_or_timer() when a job or channel
+ needs to be handled. (Ozaki Kiichi, closes #3783)
+Files: src/ui.c, src/testdir/test_channel.vim
+
+
+*** ../vim-8.1.0709/src/ui.c 2018-11-26 21:19:08.045334122 +0100
+--- src/ui.c 2019-01-09 22:23:58.532511473 +0100
+***************
+*** 205,211 ****
+ return retval;
+ }
+
+! #if defined(FEAT_TIMERS) || defined(PROT)
+ /*
+ * Wait for a timer to fire or "wait_func" to return non-zero.
+ * Returns OK when something was read.
+--- 205,211 ----
+ return retval;
+ }
+
+! #if defined(FEAT_TIMERS) || defined(PROTO)
+ /*
+ * Wait for a timer to fire or "wait_func" to return non-zero.
+ * Returns OK when something was read.
+***************
+*** 221,235 ****
+ int due_time;
+ long remaining = wtime;
+ int tb_change_cnt = typebuf.tb_change_cnt;
+
+! /* When waiting very briefly don't trigger timers. */
+ if (wtime >= 0 && wtime < 10L)
+ return wait_func(wtime, NULL, ignore_input);
+
+ while (wtime < 0 || remaining > 0)
+ {
+! /* Trigger timers and then get the time in wtime until the next one is
+! * due. Wait up to that time. */
+ due_time = check_due_timer();
+ if (typebuf.tb_change_cnt != tb_change_cnt)
+ {
+--- 221,238 ----
+ int due_time;
+ long remaining = wtime;
+ int tb_change_cnt = typebuf.tb_change_cnt;
++ # ifdef FEAT_JOB_CHANNEL
++ int brief_wait = TRUE;
++ # endif
+
+! // When waiting very briefly don't trigger timers.
+ if (wtime >= 0 && wtime < 10L)
+ return wait_func(wtime, NULL, ignore_input);
+
+ while (wtime < 0 || remaining > 0)
+ {
+! // Trigger timers and then get the time in wtime until the next one is
+! // due. Wait up to that time.
+ due_time = check_due_timer();
+ if (typebuf.tb_change_cnt != tb_change_cnt)
+ {
+***************
+*** 238,248 ****
+ }
+ if (due_time <= 0 || (wtime > 0 && due_time > remaining))
+ due_time = remaining;
+ if (wait_func(due_time, interrupted, ignore_input))
+ return OK;
+! if (interrupted != NULL && *interrupted)
+! /* Nothing available, but need to return so that side effects get
+! * handled, such as handling a message on a channel. */
+ return FAIL;
+ if (wtime > 0)
+ remaining -= due_time;
+--- 241,268 ----
+ }
+ if (due_time <= 0 || (wtime > 0 && due_time > remaining))
+ due_time = remaining;
++ # ifdef FEAT_JOB_CHANNEL
++ if ((due_time < 0 || due_time > 10L)
++ # ifdef FEAT_GUI
++ && !gui.in_use
++ # endif
++ && (has_pending_job() || channel_any_readahead()))
++ {
++ // There is a pending job or channel, should return soon in order
++ // to handle them ASAP. Do check for input briefly.
++ due_time = 10L;
++ brief_wait = TRUE;
++ }
++ # endif
+ if (wait_func(due_time, interrupted, ignore_input))
+ return OK;
+! if ((interrupted != NULL && *interrupted)
+! # ifdef FEAT_JOB_CHANNEL
+! || brief_wait
+! # endif
+! )
+! // Nothing available, but need to return so that side effects get
+! // handled, such as handling a message on a channel.
+ return FAIL;
+ if (wtime > 0)
+ remaining -= due_time;
+***************
+*** 252,258 ****
+ #endif
+
+ /*
+! * return non-zero if a character is available
+ */
+ int
+ ui_char_avail(void)
+--- 272,278 ----
+ #endif
+
+ /*
+! * Return non-zero if a character is available.
+ */
+ int
+ ui_char_avail(void)
+*** ../vim-8.1.0709/src/testdir/test_channel.vim 2019-01-05 00:35:17.298497431 +0100
+--- src/testdir/test_channel.vim 2019-01-09 22:22:45.001047737 +0100
+***************
+*** 1893,1895 ****
+--- 1893,1932 ----
+ call assert_inrange(200, 1000, elapsed)
+ call job_stop(job)
+ endfunc
++
++ func Test_job_start_in_timer()
++ if !has('job') || !has('timers')
++ return
++ endif
++
++ func OutCb(chan, msg)
++ endfunc
++
++ func ExitCb(job, status)
++ let g:val = 1
++ call Resume()
++ endfunc
++
++ func TimerCb(timer)
++ if has('win32')
++ let cmd = ['cmd', '/c', 'echo.']
++ else
++ let cmd = ['echo']
++ endif
++ let g:job = job_start(cmd, {'out_cb': 'OutCb', 'exit_cb': 'ExitCb'})
++ call substitute(repeat('a', 100000), '.', '', 'g')
++ endfunc
++
++ " We should be interrupted before 'updatetime' elapsed.
++ let g:val = 0
++ call timer_start(1, 'TimerCb')
++ let elapsed = Standby(&ut)
++ call assert_inrange(1, &ut / 2, elapsed)
++ call job_stop(g:job)
++
++ delfunc OutCb
++ delfunc ExitCb
++ delfunc TimerCb
++ unlet! g:val
++ unlet! g:job
++ endfunc
+*** ../vim-8.1.0709/src/version.c 2019-01-09 21:47:26.356341693 +0100
+--- src/version.c 2019-01-09 22:24:17.488373212 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 710,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+138. You develop a liking for cold coffee.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0711 b/data/vim/patches/8.1.0711
new file mode 100644
index 000000000..8415f6ad8
--- /dev/null
+++ b/data/vim/patches/8.1.0711
@@ -0,0 +1,3578 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0711
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0711
+Problem: Test files still use function!.
+Solution: Remove the exclamation mark. Fix overwriting a function.
+Files: src/testdir/test49.vim, src/testdir/test_autocmd.vim,
+ src/testdir/test_charsearch.vim,
+ src/testdir/test_charsearch_utf8.vim,
+ src/testdir/test_display.vim, src/testdir/test_edit.vim,
+ src/testdir/test_eval_func.vim, src/testdir/test_fnameescape.vim,
+ src/testdir/test_getcwd.vim, src/testdir/test_highlight.vim,
+ src/testdir/test_hlsearch.vim, src/testdir/test_ins_complete.vim,
+ src/testdir/test_lambda.vim, src/testdir/test_listdict.vim,
+ src/testdir/test_listlbr.vim, src/testdir/test_listlbr_utf8.vim,
+ src/testdir/test_marks.vim, src/testdir/test_matchadd_conceal.vim,
+ src/testdir/test_matchadd_conceal_utf8.vim,
+ src/testdir/test_messages.vim, src/testdir/test_number.vim,
+ src/testdir/test_options.vim, src/testdir/test_partial.vim,
+ src/testdir/test_smartindent.vim, src/testdir/test_substitute.vim,
+ src/testdir/test_system.vim, src/testdir/test_terminal.vim,
+ src/testdir/test_textobjects.vim, src/testdir/test_utf8.vim,
+ src/testdir/test_utf8_comparisons.vim,
+ src/testdir/test_vartabs.vim, src/testdir/test_vimscript.vim,
+ src/testdir/test_window_cmd.vim, src/testdir/test_xxd.vim
+
+
+*** ../vim-8.1.0710/src/testdir/test49.vim 2017-02-23 18:49:31.000000000 +0100
+--- src/testdir/test49.vim 2019-01-09 22:29:59.429878275 +0100
+***************
+*** 1,6 ****
+ " Vim script language tests
+ " Author: Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com>
+! " Last Change: 2016 Feb 07
+
+ "-------------------------------------------------------------------------------
+ " Test environment {{{1
+--- 1,6 ----
+ " Vim script language tests
+ " Author: Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com>
+! " Last Change: 2019 Jan 09
+
+ "-------------------------------------------------------------------------------
+ " Test environment {{{1
+***************
+*** 318,324 ****
+ let ExtraVimBase = expand("<sfile>")
+ let ExtraVimTestEnv = ""
+ "
+! function! ExtraVim(...)
+ " Count how often this function is called.
+ let g:ExtraVimCount = g:ExtraVimCount + 1
+
+--- 318,324 ----
+ let ExtraVimBase = expand("<sfile>")
+ let ExtraVimTestEnv = ""
+ "
+! function ExtraVim(...)
+ " Count how often this function is called.
+ let g:ExtraVimCount = g:ExtraVimCount + 1
+
+***************
+*** 500,506 ****
+ " an ExtraVim script as passed by ExtraVim() in ExtraVimBegin.
+ "
+ " EXTRA_VIM_START - do not change or remove this line.
+! function! ExtraVimThrowpoint()
+ if !exists("g:ExtraVimBegin")
+ Xout "ExtraVimThrowpoint() used outside ExtraVim() script."
+ return v:throwpoint
+--- 500,506 ----
+ " an ExtraVim script as passed by ExtraVim() in ExtraVimBegin.
+ "
+ " EXTRA_VIM_START - do not change or remove this line.
+! function ExtraVimThrowpoint()
+ if !exists("g:ExtraVimBegin")
+ Xout "ExtraVimThrowpoint() used outside ExtraVim() script."
+ return v:throwpoint
+***************
+*** 530,536 ****
+ " as a script file, use ExecAsScript below.
+ "
+ " EXTRA_VIM_START - do not change or remove this line.
+! function! MakeScript(funcname, ...)
+ let script = tempname()
+ execute "redir! >" . script
+ execute "function" a:funcname
+--- 530,536 ----
+ " as a script file, use ExecAsScript below.
+ "
+ " EXTRA_VIM_START - do not change or remove this line.
+! function MakeScript(funcname, ...)
+ let script = tempname()
+ execute "redir! >" . script
+ execute "function" a:funcname
+***************
+*** 568,574 ****
+ " location specified in the function.
+ "
+ " EXTRA_VIM_START - do not change or remove this line.
+! function! ExecAsScript(funcname)
+ " Make a script from the function passed as argument.
+ let script = MakeScript(a:funcname)
+
+--- 568,574 ----
+ " location specified in the function.
+ "
+ " EXTRA_VIM_START - do not change or remove this line.
+! function ExecAsScript(funcname)
+ " Make a script from the function passed as argument.
+ let script = MakeScript(a:funcname)
+
+***************
+*** 8548,8554 ****
+
+ " Remove the autocommands for the events specified as arguments in all used
+ " autogroups.
+! function! Delete_autocommands(...)
+ let augfile = tempname()
+ while 1
+ try
+--- 8548,8554 ----
+
+ " Remove the autocommands for the events specified as arguments in all used
+ " autogroups.
+! function Delete_autocommands(...)
+ let augfile = tempname()
+ while 1
+ try
+*** ../vim-8.1.0710/src/testdir/test_autocmd.vim 2018-12-21 13:03:24.292337854 +0100
+--- src/testdir/test_autocmd.vim 2019-01-09 22:30:57.069457594 +0100
+***************
+*** 2,8 ****
+
+ source shared.vim
+
+! func! s:cleanup_buffers() abort
+ for bnr in range(1, bufnr('$'))
+ if bufloaded(bnr) && bufnr('%') != bnr
+ execute 'bd! ' . bnr
+--- 2,8 ----
+
+ source shared.vim
+
+! func s:cleanup_buffers() abort
+ for bnr in range(1, bufnr('$'))
+ if bufloaded(bnr) && bufnr('%') != bnr
+ execute 'bd! ' . bnr
+***************
+*** 1343,1349 ****
+ endfunc
+
+ let g:setline_handled = v:false
+! func! SetLineOne()
+ if !g:setline_handled
+ call setline(1, "(x)")
+ let g:setline_handled = v:true
+--- 1343,1349 ----
+ endfunc
+
+ let g:setline_handled = v:false
+! func SetLineOne()
+ if !g:setline_handled
+ call setline(1, "(x)")
+ let g:setline_handled = v:true
+*** ../vim-8.1.0710/src/testdir/test_charsearch.vim 2016-09-07 20:37:01.000000000 +0200
+--- src/testdir/test_charsearch.vim 2019-01-09 22:31:27.609160734 +0100
+***************
+*** 1,5 ****
+
+! function! Test_charsearch()
+ enew!
+ call append(0, ['Xabcdefghijkemnopqretuvwxyz',
+ \ 'Yabcdefghijkemnopqretuvwxyz',
+--- 1,5 ----
+
+! func Test_charsearch()
+ enew!
+ call append(0, ['Xabcdefghijkemnopqretuvwxyz',
+ \ 'Yabcdefghijkemnopqretuvwxyz',
+***************
+*** 29,38 ****
+ normal! ;;p
+ call assert_equal('ZabcdeZfghijkZZemnokqretkZvwxyz', getline(3))
+ enew!
+! endfunction
+
+ " Test for t,f,F,T movement commands and 'cpo-;' setting
+! function! Test_search_cmds()
+ enew!
+ call append(0, ["aaa two three four", " zzz", "yyy ",
+ \ "bbb yee yoo four", "ccc two three four",
+--- 29,38 ----
+ normal! ;;p
+ call assert_equal('ZabcdeZfghijkZZemnokqretkZvwxyz', getline(3))
+ enew!
+! endfunc
+
+ " Test for t,f,F,T movement commands and 'cpo-;' setting
+! func Test_search_cmds()
+ enew!
+ call append(0, ["aaa two three four", " zzz", "yyy ",
+ \ "bbb yee yoo four", "ccc two three four",
+***************
+*** 59,62 ****
+ call assert_equal('ccc', getline(5))
+ call assert_equal('ddd yee y', getline(6))
+ enew!
+! endfunction
+--- 59,62 ----
+ call assert_equal('ccc', getline(5))
+ call assert_equal('ddd yee y', getline(6))
+ enew!
+! endfunc
+*** ../vim-8.1.0710/src/testdir/test_charsearch_utf8.vim 2017-03-12 16:16:51.000000000 +0100
+--- src/testdir/test_charsearch_utf8.vim 2019-01-09 22:31:48.896914212 +0100
+***************
+*** 4,10 ****
+ endif
+
+ " Test for t,f,F,T movement commands
+! function! Test_search_cmds()
+ new!
+ call setline(1, "・最初から最後まで最強のVimは最高")
+ 1
+--- 4,10 ----
+ endif
+
+ " Test for t,f,F,T movement commands
+! func Test_search_cmds()
+ new!
+ call setline(1, "・最初から最後まで最強のVimは最高")
+ 1
+***************
+*** 17,22 ****
+ normal! ,
+ call assert_equal([0, 1, 28, 0], getpos('.'))
+ bw!
+! endfunction
+
+ " vim: shiftwidth=2 sts=2 expandtab
+--- 17,22 ----
+ normal! ,
+ call assert_equal([0, 1, 28, 0], getpos('.'))
+ bw!
+! endfunc
+
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.0710/src/testdir/test_display.vim 2017-08-13 20:14:30.000000000 +0200
+--- src/testdir/test_display.vim 2019-01-09 22:32:22.280533816 +0100
+***************
+*** 5,11 ****
+
+ source view_util.vim
+
+! func! Test_display_foldcolumn()
+ if !has("folding")
+ return
+ endif
+--- 5,11 ----
+
+ source view_util.vim
+
+! func Test_display_foldcolumn()
+ if !has("folding")
+ return
+ endif
+***************
+*** 38,44 ****
+ quit!
+ endfunc
+
+! func! Test_display_foldtext_mbyte()
+ if !has("folding") || !has("multi_byte")
+ return
+ endif
+--- 38,44 ----
+ quit!
+ endfunc
+
+! func Test_display_foldtext_mbyte()
+ if !has("folding") || !has("multi_byte")
+ return
+ endif
+*** ../vim-8.1.0710/src/testdir/test_edit.vim 2018-11-02 11:59:11.555438565 +0100
+--- src/testdir/test_edit.vim 2019-01-09 22:34:16.315285600 +0100
+***************
+*** 9,15 ****
+
+ " Needs to come first until the bug in getchar() is
+ " fixed: https://groups.google.com/d/msg/vim_dev/fXL9yme4H4c/bOR-U6_bAQAJ
+! func! Test_edit_00b()
+ new
+ call setline(1, ['abc '])
+ inoreabbr <buffer> h here some more
+--- 9,15 ----
+
+ " Needs to come first until the bug in getchar() is
+ " fixed: https://groups.google.com/d/msg/vim_dev/fXL9yme4H4c/bOR-U6_bAQAJ
+! func Test_edit_00b()
+ new
+ call setline(1, ['abc '])
+ inoreabbr <buffer> h here some more
+***************
+*** 21,27 ****
+ bw!
+ endfunc
+
+! func! Test_edit_01()
+ " set for Travis CI?
+ " set nocp noesckeys
+ new
+--- 21,27 ----
+ bw!
+ endfunc
+
+! func Test_edit_01()
+ " set for Travis CI?
+ " set nocp noesckeys
+ new
+***************
+*** 61,67 ****
+ bw!
+ endfunc
+
+! func! Test_edit_02()
+ " Change cursor position in InsertCharPre command
+ new
+ call setline(1, 'abc')
+--- 61,67 ----
+ bw!
+ endfunc
+
+! func Test_edit_02()
+ " Change cursor position in InsertCharPre command
+ new
+ call setline(1, 'abc')
+***************
+*** 101,107 ****
+ bw!
+ endfunc
+
+! func! Test_edit_03()
+ " Change cursor after <c-o> command to end of line
+ new
+ call setline(1, 'abc')
+--- 101,107 ----
+ bw!
+ endfunc
+
+! func Test_edit_03()
+ " Change cursor after <c-o> command to end of line
+ new
+ call setline(1, 'abc')
+***************
+*** 120,126 ****
+ bw!
+ endfunc
+
+! func! Test_edit_04()
+ " test for :stopinsert
+ new
+ call setline(1, 'abc')
+--- 120,126 ----
+ bw!
+ endfunc
+
+! func Test_edit_04()
+ " test for :stopinsert
+ new
+ call setline(1, 'abc')
+***************
+*** 132,138 ****
+ bw!
+ endfunc
+
+! func! Test_edit_05()
+ " test for folds being opened
+ new
+ call setline(1, ['abcX', 'abcX', 'zzzZ'])
+--- 132,138 ----
+ bw!
+ endfunc
+
+! func Test_edit_05()
+ " test for folds being opened
+ new
+ call setline(1, ['abcX', 'abcX', 'zzzZ'])
+***************
+*** 154,160 ****
+ bw!
+ endfunc
+
+! func! Test_edit_06()
+ " Test in diff mode
+ if !has("diff") || !executable("diff")
+ return
+--- 154,160 ----
+ bw!
+ endfunc
+
+! func Test_edit_06()
+ " Test in diff mode
+ if !has("diff") || !executable("diff")
+ return
+***************
+*** 176,182 ****
+ bw!
+ endfunc
+
+! func! Test_edit_07()
+ " 1) Test with completion <c-l> when popupmenu is visible
+ new
+ call setline(1, 'J')
+--- 176,182 ----
+ bw!
+ endfunc
+
+! func Test_edit_07()
+ " 1) Test with completion <c-l> when popupmenu is visible
+ new
+ call setline(1, 'J')
+***************
+*** 213,219 ****
+ bw!
+ endfunc
+
+! func! Test_edit_08()
+ " reset insertmode from i_ctrl-r_=
+ let g:bufnr = bufnr('%')
+ new
+--- 213,219 ----
+ bw!
+ endfunc
+
+! func Test_edit_08()
+ " reset insertmode from i_ctrl-r_=
+ let g:bufnr = bufnr('%')
+ new
+***************
+*** 227,233 ****
+ unlet g:bufnr
+ endfunc
+
+! func! Test_edit_09()
+ " test i_CTRL-\ combinations
+ new
+ call setline(1, ['abc', 'def', 'ghi'])
+--- 227,233 ----
+ unlet g:bufnr
+ endfunc
+
+! func Test_edit_09()
+ " test i_CTRL-\ combinations
+ new
+ call setline(1, ['abc', 'def', 'ghi'])
+***************
+*** 257,263 ****
+ bw!
+ endfunc
+
+! func! Test_edit_10()
+ " Test for starting selectmode
+ new
+ set selectmode=key keymodel=startsel
+--- 257,263 ----
+ bw!
+ endfunc
+
+! func Test_edit_10()
+ " Test for starting selectmode
+ new
+ set selectmode=key keymodel=startsel
+***************
+*** 269,275 ****
+ bw!
+ endfunc
+
+! func! Test_edit_11()
+ " Test that indenting kicks in
+ new
+ set cindent
+--- 269,275 ----
+ bw!
+ endfunc
+
+! func Test_edit_11()
+ " Test that indenting kicks in
+ new
+ set cindent
+***************
+*** 313,319 ****
+ bw!
+ endfunc
+
+! func! Test_edit_11_indentexpr()
+ " Test that indenting kicks in
+ new
+ " Use indentexpr instead of cindenting
+--- 313,319 ----
+ bw!
+ endfunc
+
+! func Test_edit_11_indentexpr()
+ " Test that indenting kicks in
+ new
+ " Use indentexpr instead of cindenting
+***************
+*** 340,346 ****
+ bw!
+ endfunc
+
+! func! Test_edit_12()
+ " Test changing indent in replace mode
+ new
+ call setline(1, ["\tabc", "\tdef"])
+--- 340,346 ----
+ bw!
+ endfunc
+
+! func Test_edit_12()
+ " Test changing indent in replace mode
+ new
+ call setline(1, ["\tabc", "\tdef"])
+***************
+*** 392,398 ****
+ bw!
+ endfunc
+
+! func! Test_edit_13()
+ " Test smartindenting
+ if exists("+smartindent")
+ new
+--- 392,398 ----
+ bw!
+ endfunc
+
+! func Test_edit_13()
+ " Test smartindenting
+ if exists("+smartindent")
+ new
+***************
+*** 405,411 ****
+ endif
+ endfunc
+
+! func! Test_edit_CR()
+ " Test for <CR> in insert mode
+ " basically only in quickfix mode ist tested, the rest
+ " has been taken care of by other tests
+--- 405,411 ----
+ endif
+ endfunc
+
+! func Test_edit_CR()
+ " Test for <CR> in insert mode
+ " basically only in quickfix mode ist tested, the rest
+ " has been taken care of by other tests
+***************
+*** 438,444 ****
+ call delete('Xqflist.txt')
+ endfunc
+
+! func! Test_edit_CTRL_()
+ " disabled for Windows builds, why?
+ if !has("multi_byte") || !has("rightleft") || has("win32")
+ return
+--- 438,444 ----
+ call delete('Xqflist.txt')
+ endfunc
+
+! func Test_edit_CTRL_()
+ " disabled for Windows builds, why?
+ if !has("multi_byte") || !has("rightleft") || has("win32")
+ return
+***************
+*** 469,475 ****
+ endfunc
+
+ " needs to come first, to have the @. register empty
+! func! Test_edit_00a_CTRL_A()
+ " Test pressing CTRL-A
+ new
+ call setline(1, repeat([''], 5))
+--- 469,475 ----
+ endfunc
+
+ " needs to come first, to have the @. register empty
+! func Test_edit_00a_CTRL_A()
+ " Test pressing CTRL-A
+ new
+ call setline(1, repeat([''], 5))
+***************
+*** 489,495 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_EY()
+ " Ctrl-E/ Ctrl-Y in insert mode completion to scroll
+ 10new
+ call setline(1, range(1, 100))
+--- 489,495 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_EY()
+ " Ctrl-E/ Ctrl-Y in insert mode completion to scroll
+ 10new
+ call setline(1, range(1, 100))
+***************
+*** 505,511 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_G()
+ new
+ call setline(1, ['foobar', 'foobar', 'foobar'])
+ call cursor(2, 4)
+--- 505,511 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_G()
+ new
+ call setline(1, ['foobar', 'foobar', 'foobar'])
+ call cursor(2, 4)
+***************
+*** 523,529 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_I()
+ " Tab in completion mode
+ let path=expand("%:p:h")
+ new
+--- 523,529 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_I()
+ " Tab in completion mode
+ let path=expand("%:p:h")
+ new
+***************
+*** 547,553 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_K()
+ " Test pressing CTRL-K (basically only dictionary completion and digraphs
+ " the rest is already covered
+ call writefile(['A', 'AA', 'AAA', 'AAAA'], 'Xdictionary.txt')
+--- 547,553 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_K()
+ " Test pressing CTRL-K (basically only dictionary completion and digraphs
+ " the rest is already covered
+ call writefile(['A', 'AA', 'AAA', 'AAAA'], 'Xdictionary.txt')
+***************
+*** 620,626 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_L()
+ " Test Ctrl-X Ctrl-L (line completion)
+ new
+ set complete=.
+--- 620,626 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_L()
+ " Test Ctrl-X Ctrl-L (line completion)
+ new
+ set complete=.
+***************
+*** 676,682 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_N()
+ " Check keyword completion
+ new
+ set complete=.
+--- 676,682 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_N()
+ " Check keyword completion
+ new
+ set complete=.
+***************
+*** 697,703 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_O()
+ " Check for CTRL-O in insert mode
+ new
+ inoreabbr <buffer> h here some more
+--- 697,703 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_O()
+ " Check for CTRL-O in insert mode
+ new
+ inoreabbr <buffer> h here some more
+***************
+*** 722,728 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_R()
+ " Insert Register
+ new
+ call test_override("ALL", 1)
+--- 722,728 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_R()
+ " Insert Register
+ new
+ call test_override("ALL", 1)
+***************
+*** 737,743 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_S()
+ " Test pressing CTRL-S (basically only spellfile completion)
+ " the rest is already covered
+ new
+--- 737,743 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_S()
+ " Test pressing CTRL-S (basically only spellfile completion)
+ " the rest is already covered
+ new
+***************
+*** 781,787 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_T()
+ " Check for CTRL-T and CTRL-X CTRL-T in insert mode
+ " 1) increase indent
+ new
+--- 781,787 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_T()
+ " Check for CTRL-T and CTRL-X CTRL-T in insert mode
+ " 1) increase indent
+ new
+***************
+*** 858,864 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_U()
+ " Test 'completefunc'
+ new
+ " -1, -2 and -3 are special return values
+--- 858,864 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_U()
+ " Test 'completefunc'
+ new
+ " -1, -2 and -3 are special return values
+***************
+*** 917,923 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_Z()
+ " Ctrl-Z when insertmode is not set inserts it literally
+ new
+ call setline(1, 'abc')
+--- 917,923 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_Z()
+ " Ctrl-Z when insertmode is not set inserts it literally
+ new
+ call setline(1, 'abc')
+***************
+*** 927,933 ****
+ " TODO: How to Test Ctrl-Z in insert mode, e.g. suspend?
+ endfunc
+
+! func! Test_edit_DROP()
+ if !has("dnd")
+ return
+ endif
+--- 927,933 ----
+ " TODO: How to Test Ctrl-Z in insert mode, e.g. suspend?
+ endfunc
+
+! func Test_edit_DROP()
+ if !has("dnd")
+ return
+ endif
+***************
+*** 943,949 ****
+ bw!
+ endfunc
+
+! func! Test_edit_CTRL_V()
+ if has("ebcdic")
+ return
+ endif
+--- 943,949 ----
+ bw!
+ endfunc
+
+! func Test_edit_CTRL_V()
+ if has("ebcdic")
+ return
+ endif
+***************
+*** 971,977 ****
+ bw!
+ endfunc
+
+! func! Test_edit_F1()
+ " Pressing <f1>
+ new
+ call feedkeys(":set im\<cr>\<f1>\<c-l>", 'tnix')
+--- 971,977 ----
+ bw!
+ endfunc
+
+! func Test_edit_F1()
+ " Pressing <f1>
+ new
+ call feedkeys(":set im\<cr>\<f1>\<c-l>", 'tnix')
+***************
+*** 981,987 ****
+ bw
+ endfunc
+
+! func! Test_edit_F21()
+ " Pressing <f21>
+ " sends a netbeans command
+ if has("netbeans_intg")
+--- 981,987 ----
+ bw
+ endfunc
+
+! func Test_edit_F21()
+ " Pressing <f21>
+ " sends a netbeans command
+ if has("netbeans_intg")
+***************
+*** 992,998 ****
+ endif
+ endfunc
+
+! func! Test_edit_HOME_END()
+ " Test Home/End Keys
+ new
+ set foldopen+=hor
+--- 992,998 ----
+ endif
+ endfunc
+
+! func Test_edit_HOME_END()
+ " Test Home/End Keys
+ new
+ set foldopen+=hor
+***************
+*** 1007,1013 ****
+ bw!
+ endfunc
+
+! func! Test_edit_INS()
+ " Test for Pressing <Insert>
+ new
+ call setline(1, ['abc', 'def'])
+--- 1007,1013 ----
+ bw!
+ endfunc
+
+! func Test_edit_INS()
+ " Test for Pressing <Insert>
+ new
+ call setline(1, ['abc', 'def'])
+***************
+*** 1021,1027 ****
+ bw!
+ endfunc
+
+! func! Test_edit_LEFT_RIGHT()
+ " Left, Shift-Left, Right, Shift-Right
+ new
+ call setline(1, ['abc def ghi', 'ABC DEF GHI', 'ZZZ YYY XXX'])
+--- 1021,1027 ----
+ bw!
+ endfunc
+
+! func Test_edit_LEFT_RIGHT()
+ " Left, Shift-Left, Right, Shift-Right
+ new
+ call setline(1, ['abc def ghi', 'ABC DEF GHI', 'ZZZ YYY XXX'])
+***************
+*** 1068,1074 ****
+ bw!
+ endfunc
+
+! func! Test_edit_MOUSE()
+ " This is a simple test, since we not really using the mouse here
+ if !has("mouse")
+ return
+--- 1068,1074 ----
+ bw!
+ endfunc
+
+! func Test_edit_MOUSE()
+ " This is a simple test, since we not really using the mouse here
+ if !has("mouse")
+ return
+***************
+*** 1123,1129 ****
+ bw!
+ endfunc
+
+! func! Test_edit_PAGEUP_PAGEDOWN()
+ 10new
+ call setline(1, repeat(['abc def ghi'], 30))
+ call cursor(1, 1)
+--- 1123,1129 ----
+ bw!
+ endfunc
+
+! func Test_edit_PAGEUP_PAGEDOWN()
+ 10new
+ call setline(1, repeat(['abc def ghi'], 30))
+ call cursor(1, 1)
+***************
+*** 1222,1228 ****
+ bw!
+ endfunc
+
+! func! Test_edit_forbidden()
+ new
+ " 1) edit in the sandbox is not allowed
+ call setline(1, 'a')
+--- 1222,1228 ----
+ bw!
+ endfunc
+
+! func Test_edit_forbidden()
+ new
+ " 1) edit in the sandbox is not allowed
+ call setline(1, 'a')
+***************
+*** 1282,1288 ****
+ bw!
+ endfunc
+
+! func! Test_edit_rightleft()
+ " Cursor in rightleft mode moves differently
+ if !exists("+rightleft")
+ return
+--- 1282,1288 ----
+ bw!
+ endfunc
+
+! func Test_edit_rightleft()
+ " Cursor in rightleft mode moves differently
+ if !exists("+rightleft")
+ return
+*** ../vim-8.1.0710/src/testdir/test_eval_func.vim 2014-04-29 13:57:34.000000000 +0200
+--- src/testdir/test_eval_func.vim 2019-01-09 22:34:29.947141160 +0100
+***************
+*** 1,6 ****
+ " Vim script used in test_eval.in. Needed for script-local function.
+
+! func! s:Testje()
+ return "foo"
+ endfunc
+ let Bar = function('s:Testje')
+--- 1,6 ----
+ " Vim script used in test_eval.in. Needed for script-local function.
+
+! func s:Testje()
+ return "foo"
+ endfunc
+ let Bar = function('s:Testje')
+*** ../vim-8.1.0710/src/testdir/test_fnameescape.vim 2016-09-07 20:37:01.000000000 +0200
+--- src/testdir/test_fnameescape.vim 2019-01-09 22:35:06.338760034 +0100
+***************
+*** 1,6 ****
+
+ " Test if fnameescape is correct for special chars like !
+! function! Test_fnameescape()
+ let fname = 'Xspa ce'
+ let status = v:false
+ try
+--- 1,6 ----
+
+ " Test if fnameescape is correct for special chars like !
+! func Test_fnameescape()
+ let fname = 'Xspa ce'
+ let status = v:false
+ try
+***************
+*** 18,21 ****
+ endtry
+ call assert_true(status, "ExclamationMark")
+ call delete(fname)
+! endfunction
+--- 18,21 ----
+ endtry
+ call assert_true(status, "ExclamationMark")
+ call delete(fname)
+! endfunc
+*** ../vim-8.1.0710/src/testdir/test_getcwd.vim 2018-09-23 19:36:10.215763496 +0200
+--- src/testdir/test_getcwd.vim 2019-01-09 22:35:35.954454435 +0100
+***************
+*** 1,112 ****
+! function! GetCwdInfo(win, tab)
+! let tab_changed = 0
+! let mod = ":t"
+! if a:tab > 0 && a:tab != tabpagenr()
+! let tab_changed = 1
+! exec "tabnext " . a:tab
+! endif
+! let bufname = fnamemodify(bufname(winbufnr(a:win)), mod)
+! if tab_changed
+! tabprevious
+! endif
+! if a:win == 0 && a:tab == 0
+! let dirname = fnamemodify(getcwd(), mod)
+! let lflag = haslocaldir()
+! elseif a:tab == 0
+! let dirname = fnamemodify(getcwd(a:win), mod)
+! let lflag = haslocaldir(a:win)
+! else
+! let dirname = fnamemodify(getcwd(a:win, a:tab), mod)
+! let lflag = haslocaldir(a:win, a:tab)
+! endif
+! return bufname . ' ' . dirname . ' ' . lflag
+! endfunction
+
+ " Do all test in a separate window to avoid E211 when we recursively
+ " delete the Xtopdir directory during cleanup
+ function SetUp()
+! set visualbell
+! set nocp viminfo+=nviminfo
+
+! " On windows a swapfile in Xtopdir prevents it from being cleaned up.
+! set noswapfile
+
+! " On windows a stale "Xtopdir" directory may exist, remove it so that
+! " we start from a clean state.
+! call delete("Xtopdir", "rf")
+! new
+! call mkdir('Xtopdir')
+! cd Xtopdir
+! let g:topdir = getcwd()
+! call mkdir('Xdir1')
+! call mkdir('Xdir2')
+! call mkdir('Xdir3')
+ endfunction
+
+ let g:cwd=getcwd()
+ function TearDown()
+! q
+! exec "cd " . g:cwd
+! call delete("Xtopdir", "rf")
+ endfunction
+
+ function Test_GetCwd()
+! new a
+! new b
+! new c
+! 3wincmd w
+! lcd Xdir1
+! call assert_equal("a Xdir1 1", GetCwdInfo(0, 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! wincmd W
+! call assert_equal("b Xtopdir 0", GetCwdInfo(0, 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! wincmd W
+! lcd Xdir3
+! call assert_equal("c Xdir3 1", GetCwdInfo(0, 0))
+! call assert_equal("a Xdir1 1", GetCwdInfo(bufwinnr("a"), 0))
+! call assert_equal("b Xtopdir 0", GetCwdInfo(bufwinnr("b"), 0))
+! call assert_equal("c Xdir3 1", GetCwdInfo(bufwinnr("c"), 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! wincmd W
+! call assert_equal("a Xdir1 1", GetCwdInfo(bufwinnr("a"), tabpagenr()))
+! call assert_equal("b Xtopdir 0", GetCwdInfo(bufwinnr("b"), tabpagenr()))
+! call assert_equal("c Xdir3 1", GetCwdInfo(bufwinnr("c"), tabpagenr()))
+! call assert_equal(g:topdir, getcwd(-1))
+!
+! tabnew x
+! new y
+! new z
+! 3wincmd w
+! call assert_equal("x Xtopdir 0", GetCwdInfo(0, 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! wincmd W
+! lcd Xdir2
+! call assert_equal("y Xdir2 1", GetCwdInfo(0, 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! wincmd W
+! lcd Xdir3
+! call assert_equal("z Xdir3 1", GetCwdInfo(0, 0))
+! call assert_equal("x Xtopdir 0", GetCwdInfo(bufwinnr("x"), 0))
+! call assert_equal("y Xdir2 1", GetCwdInfo(bufwinnr("y"), 0))
+! call assert_equal("z Xdir3 1", GetCwdInfo(bufwinnr("z"), 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! let tp_nr = tabpagenr()
+! tabrewind
+! call assert_equal("x Xtopdir 0", GetCwdInfo(3, tp_nr))
+! call assert_equal("y Xdir2 1", GetCwdInfo(2, tp_nr))
+! 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
+--- 1,112 ----
+! func GetCwdInfo(win, tab)
+! let tab_changed = 0
+! let mod = ":t"
+! if a:tab > 0 && a:tab != tabpagenr()
+! let tab_changed = 1
+! exec "tabnext " . a:tab
+! endif
+! let bufname = fnamemodify(bufname(winbufnr(a:win)), mod)
+! if tab_changed
+! tabprevious
+! endif
+! if a:win == 0 && a:tab == 0
+! let dirname = fnamemodify(getcwd(), mod)
+! let lflag = haslocaldir()
+! elseif a:tab == 0
+! let dirname = fnamemodify(getcwd(a:win), mod)
+! let lflag = haslocaldir(a:win)
+! else
+! let dirname = fnamemodify(getcwd(a:win, a:tab), mod)
+! let lflag = haslocaldir(a:win, a:tab)
+! endif
+! return bufname . ' ' . dirname . ' ' . lflag
+! endfunc
+
+ " Do all test in a separate window to avoid E211 when we recursively
+ " delete the Xtopdir directory during cleanup
+ function SetUp()
+! set visualbell
+! set nocp viminfo+=nviminfo
+
+! " On windows a swapfile in Xtopdir prevents it from being cleaned up.
+! set noswapfile
+
+! " On windows a stale "Xtopdir" directory may exist, remove it so that
+! " we start from a clean state.
+! call delete("Xtopdir", "rf")
+! new
+! call mkdir('Xtopdir')
+! cd Xtopdir
+! let g:topdir = getcwd()
+! call mkdir('Xdir1')
+! call mkdir('Xdir2')
+! call mkdir('Xdir3')
+ endfunction
+
+ let g:cwd=getcwd()
+ function TearDown()
+! q
+! exec "cd " . g:cwd
+! call delete("Xtopdir", "rf")
+ endfunction
+
+ function Test_GetCwd()
+! new a
+! new b
+! new c
+! 3wincmd w
+! lcd Xdir1
+! call assert_equal("a Xdir1 1", GetCwdInfo(0, 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! wincmd W
+! call assert_equal("b Xtopdir 0", GetCwdInfo(0, 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! wincmd W
+! lcd Xdir3
+! call assert_equal("c Xdir3 1", GetCwdInfo(0, 0))
+! call assert_equal("a Xdir1 1", GetCwdInfo(bufwinnr("a"), 0))
+! call assert_equal("b Xtopdir 0", GetCwdInfo(bufwinnr("b"), 0))
+! call assert_equal("c Xdir3 1", GetCwdInfo(bufwinnr("c"), 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! wincmd W
+! call assert_equal("a Xdir1 1", GetCwdInfo(bufwinnr("a"), tabpagenr()))
+! call assert_equal("b Xtopdir 0", GetCwdInfo(bufwinnr("b"), tabpagenr()))
+! call assert_equal("c Xdir3 1", GetCwdInfo(bufwinnr("c"), tabpagenr()))
+! call assert_equal(g:topdir, getcwd(-1))
+!
+! tabnew x
+! new y
+! new z
+! 3wincmd w
+! call assert_equal("x Xtopdir 0", GetCwdInfo(0, 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! wincmd W
+! lcd Xdir2
+! call assert_equal("y Xdir2 1", GetCwdInfo(0, 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! wincmd W
+! lcd Xdir3
+! call assert_equal("z Xdir3 1", GetCwdInfo(0, 0))
+! call assert_equal("x Xtopdir 0", GetCwdInfo(bufwinnr("x"), 0))
+! call assert_equal("y Xdir2 1", GetCwdInfo(bufwinnr("y"), 0))
+! call assert_equal("z Xdir3 1", GetCwdInfo(bufwinnr("z"), 0))
+! call assert_equal(g:topdir, getcwd(-1))
+! let tp_nr = tabpagenr()
+! tabrewind
+! call assert_equal("x Xtopdir 0", GetCwdInfo(3, tp_nr))
+! call assert_equal("y Xdir2 1", GetCwdInfo(2, tp_nr))
+! 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.0710/src/testdir/test_highlight.vim 2018-03-12 22:16:02.000000000 +0100
+--- src/testdir/test_highlight.vim 2019-01-09 22:36:26.589940740 +0100
+***************
+*** 38,52 ****
+ call assert_fails("hi Crash term='asdf", "E475:")
+ endfunc
+
+! function! HighlightArgs(name)
+ return 'hi ' . substitute(split(execute('hi ' . a:name), '\n')[0], '\<xxx\>', '', '')
+! endfunction
+
+! function! IsColorable()
+ return has('gui_running') || str2nr(&t_Co) >= 8
+! endfunction
+
+! function! HiCursorLine()
+ let hiCursorLine = HighlightArgs('CursorLine')
+ if has('gui_running')
+ let guibg = matchstr(hiCursorLine, 'guibg=\w\+')
+--- 38,52 ----
+ call assert_fails("hi Crash term='asdf", "E475:")
+ endfunc
+
+! func HighlightArgs(name)
+ return 'hi ' . substitute(split(execute('hi ' . a:name), '\n')[0], '\<xxx\>', '', '')
+! endfunc
+
+! func IsColorable()
+ return has('gui_running') || str2nr(&t_Co) >= 8
+! endfunc
+
+! func HiCursorLine()
+ let hiCursorLine = HighlightArgs('CursorLine')
+ if has('gui_running')
+ let guibg = matchstr(hiCursorLine, 'guibg=\w\+')
+***************
+*** 57,65 ****
+ let hi_bg = 'hi CursorLine cterm=NONE ctermbg=Gray'
+ endif
+ return [hiCursorLine, hi_ul, hi_bg]
+! endfunction
+
+! function! Check_lcs_eol_attrs(attrs, row, col)
+ let save_lcs = &lcs
+ set list
+
+--- 57,65 ----
+ let hi_bg = 'hi CursorLine cterm=NONE ctermbg=Gray'
+ endif
+ return [hiCursorLine, hi_ul, hi_bg]
+! endfunc
+
+! func Check_lcs_eol_attrs(attrs, row, col)
+ let save_lcs = &lcs
+ set list
+
+***************
+*** 67,73 ****
+
+ set nolist
+ let &lcs = save_lcs
+! endfunction
+
+ func Test_highlight_eol_with_cursorline()
+ let [hiCursorLine, hi_ul, hi_bg] = HiCursorLine()
+--- 67,73 ----
+
+ set nolist
+ let &lcs = save_lcs
+! endfunc
+
+ func Test_highlight_eol_with_cursorline()
+ let [hiCursorLine, hi_ul, hi_bg] = HiCursorLine()
+*** ../vim-8.1.0710/src/testdir/test_hlsearch.vim 2018-09-02 15:07:21.977655529 +0200
+--- src/testdir/test_hlsearch.vim 2019-01-09 22:36:38.901817415 +0100
+***************
+*** 1,6 ****
+ " Test for v:hlsearch
+
+! function! Test_hlsearch()
+ new
+ call setline(1, repeat(['aaa'], 10))
+ set hlsearch nolazyredraw
+--- 1,6 ----
+ " Test for v:hlsearch
+
+! func Test_hlsearch()
+ new
+ call setline(1, repeat(['aaa'], 10))
+ set hlsearch nolazyredraw
+***************
+*** 30,36 ****
+ call garbagecollect(1)
+ call getchar(1)
+ enew!
+! endfunction
+
+ func Test_hlsearch_hangs()
+ if !has('reltime') || !has('float')
+--- 30,36 ----
+ call garbagecollect(1)
+ call getchar(1)
+ enew!
+! endfunc
+
+ func Test_hlsearch_hangs()
+ if !has('reltime') || !has('float')
+*** ../vim-8.1.0710/src/testdir/test_ins_complete.vim 2018-08-08 22:55:38.030420901 +0200
+--- src/testdir/test_ins_complete.vim 2019-01-09 22:37:57.473043665 +0100
+***************
+*** 142,148 ****
+ delfunc CompleteFunc
+ endfunc
+
+! function! s:CompleteDone_CompleteFuncDict( findstart, base )
+ if a:findstart
+ return 0
+ endif
+--- 142,148 ----
+ delfunc CompleteFunc
+ endfunc
+
+! func s:CompleteDone_CompleteFuncDict( findstart, base )
+ if a:findstart
+ return 0
+ endif
+***************
+*** 159,167 ****
+ \ }
+ \ ]
+ \ }
+! endfunction
+
+! function! s:CompleteDone_CheckCompletedItemDict()
+ call assert_equal( 'aword', v:completed_item[ 'word' ] )
+ call assert_equal( 'wrd', v:completed_item[ 'abbr' ] )
+ call assert_equal( 'extra text', v:completed_item[ 'menu' ] )
+--- 159,167 ----
+ \ }
+ \ ]
+ \ }
+! endfunc
+
+! func s:CompleteDone_CheckCompletedItemDict()
+ call assert_equal( 'aword', v:completed_item[ 'word' ] )
+ call assert_equal( 'wrd', v:completed_item[ 'abbr' ] )
+ call assert_equal( 'extra text', v:completed_item[ 'menu' ] )
+***************
+*** 170,176 ****
+ call assert_equal( 'test', v:completed_item[ 'user_data' ] )
+
+ let s:called_completedone = 1
+! endfunction
+
+ function Test_CompleteDoneDict()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemDict()
+--- 170,176 ----
+ call assert_equal( 'test', v:completed_item[ 'user_data' ] )
+
+ let s:called_completedone = 1
+! endfunc
+
+ function Test_CompleteDoneDict()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemDict()
+***************
+*** 186,192 ****
+ au! CompleteDone
+ endfunc
+
+! function! s:CompleteDone_CompleteFuncDictNoUserData( findstart, base )
+ if a:findstart
+ return 0
+ endif
+--- 186,192 ----
+ au! CompleteDone
+ endfunc
+
+! func s:CompleteDone_CompleteFuncDictNoUserData( findstart, base )
+ if a:findstart
+ return 0
+ endif
+***************
+*** 202,210 ****
+ \ }
+ \ ]
+ \ }
+! endfunction
+
+! function! s:CompleteDone_CheckCompletedItemDictNoUserData()
+ call assert_equal( 'aword', v:completed_item[ 'word' ] )
+ call assert_equal( 'wrd', v:completed_item[ 'abbr' ] )
+ call assert_equal( 'extra text', v:completed_item[ 'menu' ] )
+--- 202,210 ----
+ \ }
+ \ ]
+ \ }
+! endfunc
+
+! func s:CompleteDone_CheckCompletedItemDictNoUserData()
+ call assert_equal( 'aword', v:completed_item[ 'word' ] )
+ call assert_equal( 'wrd', v:completed_item[ 'abbr' ] )
+ call assert_equal( 'extra text', v:completed_item[ 'menu' ] )
+***************
+*** 213,219 ****
+ call assert_equal( '', v:completed_item[ 'user_data' ] )
+
+ let s:called_completedone = 1
+! endfunction
+
+ function Test_CompleteDoneDictNoUserData()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemDictNoUserData()
+--- 213,219 ----
+ call assert_equal( '', v:completed_item[ 'user_data' ] )
+
+ let s:called_completedone = 1
+! endfunc
+
+ function Test_CompleteDoneDictNoUserData()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemDictNoUserData()
+***************
+*** 229,243 ****
+ au! CompleteDone
+ endfunc
+
+! function! s:CompleteDone_CompleteFuncList( findstart, base )
+ if a:findstart
+ return 0
+ endif
+
+ return [ 'aword' ]
+! endfunction
+
+! function! s:CompleteDone_CheckCompletedItemList()
+ call assert_equal( 'aword', v:completed_item[ 'word' ] )
+ call assert_equal( '', v:completed_item[ 'abbr' ] )
+ call assert_equal( '', v:completed_item[ 'menu' ] )
+--- 229,243 ----
+ au! CompleteDone
+ endfunc
+
+! func s:CompleteDone_CompleteFuncList( findstart, base )
+ if a:findstart
+ return 0
+ endif
+
+ return [ 'aword' ]
+! endfunc
+
+! func s:CompleteDone_CheckCompletedItemList()
+ call assert_equal( 'aword', v:completed_item[ 'word' ] )
+ call assert_equal( '', v:completed_item[ 'abbr' ] )
+ call assert_equal( '', v:completed_item[ 'menu' ] )
+***************
+*** 246,252 ****
+ call assert_equal( '', v:completed_item[ 'user_data' ] )
+
+ let s:called_completedone = 1
+! endfunction
+
+ function Test_CompleteDoneList()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemList()
+--- 246,252 ----
+ call assert_equal( '', v:completed_item[ 'user_data' ] )
+
+ let s:called_completedone = 1
+! endfunc
+
+ function Test_CompleteDoneList()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemList()
+*** ../vim-8.1.0710/src/testdir/test_lambda.vim 2018-05-22 18:31:30.001365739 +0200
+--- src/testdir/test_lambda.vim 2019-01-09 22:40:53.407381391 +0100
+***************
+*** 1,34 ****
+ " Test for lambda and closure
+
+! function! Test_lambda_feature()
+ call assert_equal(1, has('lambda'))
+! endfunction
+
+! function! Test_lambda_with_filter()
+ let s:x = 2
+ call assert_equal([2, 3], filter([1, 2, 3], {i, v -> v >= s:x}))
+! endfunction
+
+! function! Test_lambda_with_map()
+ let s:x = 1
+ call assert_equal([2, 3, 4], map([1, 2, 3], {i, v -> v + s:x}))
+! endfunction
+
+! function! Test_lambda_with_sort()
+ call assert_equal([1, 2, 3, 4, 7], sort([3,7,2,1,4], {a, b -> a - b}))
+! endfunction
+
+! function! Test_lambda_with_timer()
+ if !has('timers')
+ return
+ endif
+
+ let s:n = 0
+ let s:timer_id = 0
+! function! s:Foo()
+ "let n = 0
+ let s:timer_id = timer_start(50, {-> execute("let s:n += 1 | echo s:n", "")}, {"repeat": -1})
+! endfunction
+
+ call s:Foo()
+ sleep 200ms
+--- 1,34 ----
+ " Test for lambda and closure
+
+! func Test_lambda_feature()
+ call assert_equal(1, has('lambda'))
+! endfunc
+
+! func Test_lambda_with_filter()
+ let s:x = 2
+ call assert_equal([2, 3], filter([1, 2, 3], {i, v -> v >= s:x}))
+! endfunc
+
+! func Test_lambda_with_map()
+ let s:x = 1
+ call assert_equal([2, 3, 4], map([1, 2, 3], {i, v -> v + s:x}))
+! endfunc
+
+! func Test_lambda_with_sort()
+ call assert_equal([1, 2, 3, 4, 7], sort([3,7,2,1,4], {a, b -> a - b}))
+! endfunc
+
+! func Test_lambda_with_timer()
+ if !has('timers')
+ return
+ endif
+
+ let s:n = 0
+ let s:timer_id = 0
+! func! s:Foo()
+ "let n = 0
+ let s:timer_id = timer_start(50, {-> execute("let s:n += 1 | echo s:n", "")}, {"repeat": -1})
+! endfunc
+
+ call s:Foo()
+ sleep 200ms
+***************
+*** 40,51 ****
+ call assert_true(m > 1)
+ call assert_true(s:n > m + 1)
+ call assert_true(s:n < 9)
+! endfunction
+
+! function! Test_lambda_with_partial()
+ let l:Cb = function({... -> ['zero', a:1, a:2, a:3]}, ['one', 'two'])
+ call assert_equal(['zero', 'one', 'two', 'three'], l:Cb('three'))
+! endfunction
+
+ function Test_lambda_fails()
+ call assert_equal(3, {a, b -> a + b}(1, 2))
+--- 40,51 ----
+ call assert_true(m > 1)
+ call assert_true(s:n > m + 1)
+ call assert_true(s:n < 9)
+! endfunc
+
+! func Test_lambda_with_partial()
+ let l:Cb = function({... -> ['zero', a:1, a:2, a:3]}, ['one', 'two'])
+ call assert_equal(['zero', 'one', 'two', 'three'], l:Cb('three'))
+! endfunc
+
+ function Test_lambda_fails()
+ call assert_equal(3, {a, b -> a + b}(1, 2))
+***************
+*** 58,116 ****
+ call assert_equal('foo', x['>'])
+ endfunc
+
+! function! Test_lambda_capture_by_reference()
+ let v = 1
+ let l:F = {x -> x + v}
+ let v = 2
+ call assert_equal(12, l:F(10))
+! endfunction
+
+! function! Test_lambda_side_effect()
+! function! s:update_and_return(arr)
+ let a:arr[1] = 5
+ return a:arr
+! endfunction
+
+! function! s:foo(arr)
+ return {-> s:update_and_return(a:arr)}
+! endfunction
+
+ let arr = [3,2,1]
+ call assert_equal([3, 5, 1], s:foo(arr)())
+! endfunction
+
+! function! Test_lambda_refer_local_variable_from_other_scope()
+! function! s:foo(X)
+ return a:X() " refer l:x in s:bar()
+! endfunction
+
+! function! s:bar()
+ let x = 123
+ return s:foo({-> x})
+! endfunction
+
+ call assert_equal(123, s:bar())
+! endfunction
+
+! function! Test_lambda_do_not_share_local_variable()
+! function! s:define_funcs()
+ let l:One = {-> split(execute("let a = 'abc' | echo a"))[0]}
+ let l:Two = {-> exists("a") ? a : "no"}
+ return [l:One, l:Two]
+! endfunction
+
+ let l:F = s:define_funcs()
+
+ call assert_equal('no', l:F[1]())
+ call assert_equal('abc', l:F[0]())
+ call assert_equal('no', l:F[1]())
+! endfunction
+
+! function! Test_lambda_closure_counter()
+! function! s:foo()
+ let x = 0
+ return {-> [execute("let x += 1"), x][-1]}
+! endfunction
+
+ let l:F = s:foo()
+ call test_garbagecollect_now()
+--- 58,116 ----
+ call assert_equal('foo', x['>'])
+ endfunc
+
+! func Test_lambda_capture_by_reference()
+ let v = 1
+ let l:F = {x -> x + v}
+ let v = 2
+ call assert_equal(12, l:F(10))
+! endfunc
+
+! func Test_lambda_side_effect()
+! func! s:update_and_return(arr)
+ let a:arr[1] = 5
+ return a:arr
+! endfunc
+
+! func! s:foo(arr)
+ return {-> s:update_and_return(a:arr)}
+! endfunc
+
+ let arr = [3,2,1]
+ call assert_equal([3, 5, 1], s:foo(arr)())
+! endfunc
+
+! func Test_lambda_refer_local_variable_from_other_scope()
+! func! s:foo(X)
+ return a:X() " refer l:x in s:bar()
+! endfunc
+
+! func! s:bar()
+ let x = 123
+ return s:foo({-> x})
+! endfunc
+
+ call assert_equal(123, s:bar())
+! endfunc
+
+! func Test_lambda_do_not_share_local_variable()
+! func! s:define_funcs()
+ let l:One = {-> split(execute("let a = 'abc' | echo a"))[0]}
+ let l:Two = {-> exists("a") ? a : "no"}
+ return [l:One, l:Two]
+! endfunc
+
+ let l:F = s:define_funcs()
+
+ call assert_equal('no', l:F[1]())
+ call assert_equal('abc', l:F[0]())
+ call assert_equal('no', l:F[1]())
+! endfunc
+
+! func Test_lambda_closure_counter()
+! func! s:foo()
+ let x = 0
+ return {-> [execute("let x += 1"), x][-1]}
+! endfunc
+
+ let l:F = s:foo()
+ call test_garbagecollect_now()
+***************
+*** 118,169 ****
+ call assert_equal(2, l:F())
+ call assert_equal(3, l:F())
+ call assert_equal(4, l:F())
+! endfunction
+
+! function! Test_lambda_with_a_var()
+! function! s:foo()
+ let x = 2
+ return {... -> a:000 + [x]}
+! endfunction
+! function! s:bar()
+ return s:foo()(1)
+! endfunction
+
+ call assert_equal([1, 2], s:bar())
+! endfunction
+
+! function! Test_lambda_call_lambda_from_lambda()
+! function! s:foo(x)
+ let l:F1 = {-> {-> a:x}}
+ return {-> l:F1()}
+! endfunction
+
+ let l:F = s:foo(1)
+ call assert_equal(1, l:F()())
+! endfunction
+
+! function! Test_lambda_delfunc()
+! function! s:gen()
+ let pl = l:
+ let l:Foo = {-> get(pl, "Foo", get(pl, "Bar", {-> 0}))}
+ let l:Bar = l:Foo
+ delfunction l:Foo
+ return l:Bar
+! endfunction
+
+ let l:F = s:gen()
+ call assert_fails(':call l:F()', 'E933:')
+! endfunction
+
+! function! Test_lambda_scope()
+! function! s:NewCounter()
+ let c = 0
+ return {-> [execute('let c += 1'), c][-1]}
+! endfunction
+
+! function! s:NewCounter2()
+ return {-> [execute('let c += 100'), c][-1]}
+! endfunction
+
+ let l:C = s:NewCounter()
+ let l:D = s:NewCounter2()
+--- 118,169 ----
+ call assert_equal(2, l:F())
+ call assert_equal(3, l:F())
+ call assert_equal(4, l:F())
+! endfunc
+
+! func Test_lambda_with_a_var()
+! func! s:foo()
+ let x = 2
+ return {... -> a:000 + [x]}
+! endfunc
+! func! s:bar()
+ return s:foo()(1)
+! endfunc
+
+ call assert_equal([1, 2], s:bar())
+! endfunc
+
+! func Test_lambda_call_lambda_from_lambda()
+! func! s:foo(x)
+ let l:F1 = {-> {-> a:x}}
+ return {-> l:F1()}
+! endfunc
+
+ let l:F = s:foo(1)
+ call assert_equal(1, l:F()())
+! endfunc
+
+! func Test_lambda_delfunc()
+! func! s:gen()
+ let pl = l:
+ let l:Foo = {-> get(pl, "Foo", get(pl, "Bar", {-> 0}))}
+ let l:Bar = l:Foo
+ delfunction l:Foo
+ return l:Bar
+! endfunc
+
+ let l:F = s:gen()
+ call assert_fails(':call l:F()', 'E933:')
+! endfunc
+
+! func Test_lambda_scope()
+! func! s:NewCounter()
+ let c = 0
+ return {-> [execute('let c += 1'), c][-1]}
+! endfunc
+
+! func! s:NewCounter2()
+ return {-> [execute('let c += 100'), c][-1]}
+! endfunc
+
+ let l:C = s:NewCounter()
+ let l:D = s:NewCounter2()
+***************
+*** 171,207 ****
+ call assert_equal(1, l:C())
+ call assert_fails(':call l:D()', 'E15:') " E121: then E15:
+ call assert_equal(2, l:C())
+! endfunction
+
+! function! Test_lambda_share_scope()
+! function! s:New()
+ let c = 0
+ let l:Inc0 = {-> [execute('let c += 1'), c][-1]}
+ let l:Dec0 = {-> [execute('let c -= 1'), c][-1]}
+ return [l:Inc0, l:Dec0]
+! endfunction
+
+ let [l:Inc, l:Dec] = s:New()
+
+ call assert_equal(1, l:Inc())
+ call assert_equal(2, l:Inc())
+ call assert_equal(1, l:Dec())
+! endfunction
+
+! function! Test_lambda_circular_reference()
+! function! s:Foo()
+ let d = {}
+ let d.f = {-> d}
+ return d.f
+! endfunction
+
+ call s:Foo()
+ call test_garbagecollect_now()
+ let i = 0 | while i < 10000 | call s:Foo() | let i+= 1 | endwhile
+ call test_garbagecollect_now()
+! endfunction
+
+! function! Test_lambda_combination()
+ call assert_equal(2, {x -> {x -> x}}(1)(2))
+ call assert_equal(10, {y -> {x -> x(y)(10)}({y -> y})}({z -> z}))
+ call assert_equal(5.0, {x -> {y -> x / y}}(10)(2.0))
+--- 171,207 ----
+ call assert_equal(1, l:C())
+ call assert_fails(':call l:D()', 'E15:') " E121: then E15:
+ call assert_equal(2, l:C())
+! endfunc
+
+! func Test_lambda_share_scope()
+! func! s:New()
+ let c = 0
+ let l:Inc0 = {-> [execute('let c += 1'), c][-1]}
+ let l:Dec0 = {-> [execute('let c -= 1'), c][-1]}
+ return [l:Inc0, l:Dec0]
+! endfunc
+
+ let [l:Inc, l:Dec] = s:New()
+
+ call assert_equal(1, l:Inc())
+ call assert_equal(2, l:Inc())
+ call assert_equal(1, l:Dec())
+! endfunc
+
+! func Test_lambda_circular_reference()
+! func! s:Foo()
+ let d = {}
+ let d.f = {-> d}
+ return d.f
+! endfunc
+
+ call s:Foo()
+ call test_garbagecollect_now()
+ let i = 0 | while i < 10000 | call s:Foo() | let i+= 1 | endwhile
+ call test_garbagecollect_now()
+! endfunc
+
+! func Test_lambda_combination()
+ call assert_equal(2, {x -> {x -> x}}(1)(2))
+ call assert_equal(10, {y -> {x -> x(y)(10)}({y -> y})}({z -> z}))
+ call assert_equal(5.0, {x -> {y -> x / y}}(10)(2.0))
+***************
+*** 214,230 ****
+ let Z = {f -> {x -> f({y -> x(x)(y)})}({x -> f({y -> x(x)(y)})})}
+ let Fact = {f -> {x -> x == 0 ? 1 : x * f(x - 1)}}
+ call assert_equal(120, Z(Fact)(5))
+! endfunction
+
+! function! Test_closure_counter()
+! function! s:foo()
+ let x = 0
+! function! s:bar() closure
+ let x += 1
+ return x
+! endfunction
+ return function('s:bar')
+! endfunction
+
+ let l:F = s:foo()
+ call test_garbagecollect_now()
+--- 214,230 ----
+ let Z = {f -> {x -> f({y -> x(x)(y)})}({x -> f({y -> x(x)(y)})})}
+ let Fact = {f -> {x -> x == 0 ? 1 : x * f(x - 1)}}
+ call assert_equal(120, Z(Fact)(5))
+! endfunc
+
+! func Test_closure_counter()
+! func! s:foo()
+ let x = 0
+! func! s:bar() closure
+ let x += 1
+ return x
+! endfunc
+ return function('s:bar')
+! endfunc
+
+ let l:F = s:foo()
+ call test_garbagecollect_now()
+***************
+*** 232,261 ****
+ call assert_equal(2, l:F())
+ call assert_equal(3, l:F())
+ call assert_equal(4, l:F())
+! endfunction
+
+! function! Test_closure_unlet()
+! function! s:foo()
+ let x = 1
+! function! s:bar() closure
+ unlet x
+! endfunction
+ call s:bar()
+ return l:
+! endfunction
+
+ call assert_false(has_key(s:foo(), 'x'))
+ call test_garbagecollect_now()
+! endfunction
+
+! function! LambdaFoo()
+ let x = 0
+! function! LambdaBar() closure
+ let x += 1
+ return x
+! endfunction
+ return function('LambdaBar')
+! endfunction
+
+ func Test_closure_refcount()
+ let g:Count = LambdaFoo()
+--- 232,261 ----
+ call assert_equal(2, l:F())
+ call assert_equal(3, l:F())
+ call assert_equal(4, l:F())
+! endfunc
+
+! func Test_closure_unlet()
+! func! s:foo()
+ let x = 1
+! func! s:bar() closure
+ unlet x
+! endfunc
+ call s:bar()
+ return l:
+! endfunc
+
+ call assert_false(has_key(s:foo(), 'x'))
+ call test_garbagecollect_now()
+! endfunc
+
+! func LambdaFoo()
+ let x = 0
+! func! LambdaBar() closure
+ let x += 1
+ return x
+! endfunc
+ return function('LambdaBar')
+! endfunc
+
+ func Test_closure_refcount()
+ let g:Count = LambdaFoo()
+*** ../vim-8.1.0710/src/testdir/test_listdict.vim 2018-09-30 17:16:22.199142095 +0200
+--- src/testdir/test_listdict.vim 2019-01-09 22:55:10.776013666 +0100
+***************
+*** 499,517 ****
+ endfunc
+
+ " No remove() of write-protected scope-level variable
+! func! Tfunc(this_is_a_long_parameter_name)
+ call assert_fails("call remove(a:, 'this_is_a_long_parameter_name')", 'E795')
+! endfun
+ func Test_dict_scope_var_remove()
+! call Tfunc('testval')
+ endfunc
+
+ " No extend() of write-protected scope-level variable
+! func! Tfunc(this_is_a_long_parameter_name)
+ call assert_fails("call extend(a:, {'this_is_a_long_parameter_name': 1234})", 'E742')
+ endfunc
+ func Test_dict_scope_var_extend()
+! call Tfunc('testval')
+ endfunc
+
+ " No :unlet of variable in locked scope
+--- 499,517 ----
+ endfunc
+
+ " No remove() of write-protected scope-level variable
+! func Tfunc1(this_is_a_long_parameter_name)
+ call assert_fails("call remove(a:, 'this_is_a_long_parameter_name')", 'E795')
+! endfunc
+ func Test_dict_scope_var_remove()
+! call Tfunc1('testval')
+ endfunc
+
+ " No extend() of write-protected scope-level variable
+! func Tfunc2(this_is_a_long_parameter_name)
+ call assert_fails("call extend(a:, {'this_is_a_long_parameter_name': 1234})", 'E742')
+ endfunc
+ func Test_dict_scope_var_extend()
+! call Tfunc2('testval')
+ endfunc
+
+ " No :unlet of variable in locked scope
+*** ../vim-8.1.0710/src/testdir/test_listlbr.vim 2017-03-01 17:12:54.000000000 +0100
+--- src/testdir/test_listlbr.vim 2019-01-09 22:41:37.282979294 +0100
+***************
+*** 13,21 ****
+ return ScreenLines(a:lnum, a:width)
+ endfunction
+
+! function! s:compare_lines(expect, actual)
+ call assert_equal(join(a:expect, "\n"), join(a:actual, "\n"))
+! endfunction
+
+ function s:test_windows(...)
+ call NewWindow(10, 20)
+--- 13,21 ----
+ return ScreenLines(a:lnum, a:width)
+ endfunction
+
+! func s:compare_lines(expect, actual)
+ call assert_equal(join(a:expect, "\n"), join(a:actual, "\n"))
+! endfunc
+
+ function s:test_windows(...)
+ call NewWindow(10, 20)
+*** ../vim-8.1.0710/src/testdir/test_listlbr_utf8.vim 2017-06-25 17:52:58.000000000 +0200
+--- src/testdir/test_listlbr_utf8.vim 2019-01-09 22:42:04.510731883 +0100
+***************
+*** 9,23 ****
+
+ source view_util.vim
+
+! function s:screen_lines(lnum, width) abort
+ return ScreenLines(a:lnum, a:width)
+! endfunction
+
+! function! s:compare_lines(expect, actual)
+ call assert_equal(a:expect, a:actual)
+! endfunction
+
+! function s:screen_attr(lnum, chars, ...) abort
+ let line = getline(a:lnum)
+ let attr = []
+ let prefix = get(a:000, 0, 0)
+--- 9,23 ----
+
+ source view_util.vim
+
+! func s:screen_lines(lnum, width) abort
+ return ScreenLines(a:lnum, a:width)
+! endfunc
+
+! func s:compare_lines(expect, actual)
+ call assert_equal(a:expect, a:actual)
+! endfunc
+
+! func s:screen_attr(lnum, chars, ...) abort
+ let line = getline(a:lnum)
+ let attr = []
+ let prefix = get(a:000, 0, 0)
+***************
+*** 26,43 ****
+ let attr += [screenattr(a:lnum, scol + prefix)]
+ endfor
+ return attr
+! endfunction
+
+! function s:test_windows(...)
+ call NewWindow(10, 20)
+ setl ts=4 sw=4 sts=4 linebreak sbr=+ wrap
+ exe get(a:000, 0, '')
+! endfunction
+
+! function s:close_windows(...)
+ call CloseWindow()
+ exe get(a:000, 0, '')
+! endfunction
+
+ func Test_linebreak_with_fancy_listchars()
+ call s:test_windows("setl list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6")
+--- 26,43 ----
+ let attr += [screenattr(a:lnum, scol + prefix)]
+ endfor
+ return attr
+! endfunc
+
+! func s:test_windows(...)
+ call NewWindow(10, 20)
+ setl ts=4 sw=4 sts=4 linebreak sbr=+ wrap
+ exe get(a:000, 0, '')
+! endfunc
+
+! func s:close_windows(...)
+ call CloseWindow()
+ exe get(a:000, 0, '')
+! endfunc
+
+ func Test_linebreak_with_fancy_listchars()
+ call s:test_windows("setl list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6")
+*** ../vim-8.1.0710/src/testdir/test_marks.vim 2018-07-10 15:22:28.710142328 +0200
+--- src/testdir/test_marks.vim 2019-01-09 22:42:25.030546439 +0100
+***************
+*** 1,6 ****
+
+ " Test that a deleted mark is restored after delete-undo-redo-undo.
+! function! Test_Restore_DelMark()
+ enew!
+ call append(0, [" textline A", " textline B", " textline C"])
+ normal! 2gg
+--- 1,6 ----
+
+ " Test that a deleted mark is restored after delete-undo-redo-undo.
+! func Test_Restore_DelMark()
+ enew!
+ call append(0, [" textline A", " textline B", " textline C"])
+ normal! 2gg
+***************
+*** 11,20 ****
+ call assert_equal(2, pos[1])
+ call assert_equal(1, pos[2])
+ enew!
+! endfunction
+
+ " Test that CTRL-A and CTRL-X updates last changed mark '[, '].
+! function! Test_Incr_Marks()
+ enew!
+ call append(0, ["123 123 123", "123 123 123", "123 123 123"])
+ normal! gg
+--- 11,20 ----
+ call assert_equal(2, pos[1])
+ call assert_equal(1, pos[2])
+ enew!
+! endfunc
+
+ " Test that CTRL-A and CTRL-X updates last changed mark '[, '].
+! func Test_Incr_Marks()
+ enew!
+ call append(0, ["123 123 123", "123 123 123", "123 123 123"])
+ normal! gg
+***************
+*** 23,29 ****
+ call assert_equal("123 XXXXXXX", getline(2))
+ call assert_equal("XXX 123 123", getline(3))
+ enew!
+! endfunction
+
+ func Test_setpos()
+ new one
+--- 23,29 ----
+ call assert_equal("123 XXXXXXX", getline(2))
+ call assert_equal("XXX 123 123", getline(3))
+ enew!
+! endfunc
+
+ func Test_setpos()
+ new one
+*** ../vim-8.1.0710/src/testdir/test_matchadd_conceal.vim 2018-02-27 20:11:53.000000000 +0100
+--- src/testdir/test_matchadd_conceal.vim 2019-01-09 22:43:19.454058524 +0100
+***************
+*** 9,15 ****
+
+ source shared.vim
+
+! function! Test_simple_matchadd()
+ new
+
+ 1put='# This is a Test'
+--- 9,15 ----
+
+ source shared.vim
+
+! func Test_simple_matchadd()
+ new
+
+ 1put='# This is a Test'
+***************
+*** 29,37 ****
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ quit!
+! endfunction
+
+! function! Test_simple_matchadd_and_conceal()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+--- 29,37 ----
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ quit!
+! endfunc
+
+! func Test_simple_matchadd_and_conceal()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+***************
+*** 51,59 ****
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ quit!
+! endfunction
+
+! function! Test_matchadd_and_conceallevel_3()
+ new
+
+ setlocal conceallevel=3
+--- 51,59 ----
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ quit!
+! endfunc
+
+! func Test_matchadd_and_conceallevel_3()
+ new
+
+ setlocal conceallevel=3
+***************
+*** 92,100 ****
+
+ syntax off
+ quit!
+! endfunction
+
+! function! Test_default_conceal_char()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+--- 92,100 ----
+
+ syntax off
+ quit!
+! endfunc
+
+! func Test_default_conceal_char()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+***************
+*** 128,136 ****
+
+ let &listchars = listchars_save
+ quit!
+! endfunction
+
+! function! Test_syn_and_match_conceal()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+--- 128,136 ----
+
+ let &listchars = listchars_save
+ quit!
+! endfunc
+
+! func Test_syn_and_match_conceal()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+***************
+*** 164,172 ****
+
+ syntax off
+ quit!
+! endfunction
+
+! function! Test_clearmatches()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+--- 164,172 ----
+
+ syntax off
+ quit!
+! endfunc
+
+! func Test_clearmatches()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+***************
+*** 203,211 ****
+ call assert_equal({'group': 'Conceal', 'pattern': '\%2l ', 'priority': 10, 'id': a[0].id, 'conceal': 'Z'}, a[0])
+
+ quit!
+! endfunction
+
+! function! Test_using_matchaddpos()
+ new
+ setlocal concealcursor=n conceallevel=1
+ " set filetype and :syntax on to change screenattr()
+--- 203,211 ----
+ call assert_equal({'group': 'Conceal', 'pattern': '\%2l ', 'priority': 10, 'id': a[0].id, 'conceal': 'Z'}, a[0])
+
+ quit!
+! endfunc
+
+! func Test_using_matchaddpos()
+ new
+ setlocal concealcursor=n conceallevel=1
+ " set filetype and :syntax on to change screenattr()
+***************
+*** 234,242 ****
+
+ syntax off
+ quit!
+! endfunction
+
+! function! Test_matchadd_repeat_conceal_with_syntax_off()
+ new
+
+ " To test targets in the same line string is replaced with conceal char
+--- 234,242 ----
+
+ syntax off
+ quit!
+! endfunc
+
+! func Test_matchadd_repeat_conceal_with_syntax_off()
+ new
+
+ " To test targets in the same line string is replaced with conceal char
+***************
+*** 253,261 ****
+ call assert_equal('t_tt', Screenline(2))
+
+ quit!
+! endfunction
+
+! function! Test_matchadd_and_syn_conceal()
+ new
+ let cnt='Inductive bool : Type := | true : bool | false : bool.'
+ let expect = 'Inductive - : Type := | true : - | false : -.'
+--- 253,261 ----
+ call assert_equal('t_tt', Screenline(2))
+
+ quit!
+! endfunc
+
+! func Test_matchadd_and_syn_conceal()
+ new
+ let cnt='Inductive bool : Type := | true : bool | false : bool.'
+ let expect = 'Inductive - : Type := | true : - | false : -.'
+***************
+*** 276,279 ****
+ call assert_notequal(screenattr(1, 10) , screenattr(1, 11))
+ call assert_notequal(screenattr(1, 11) , screenattr(1, 12))
+ call assert_equal(screenattr(1, 11) , screenattr(1, 32))
+! endfunction
+--- 276,279 ----
+ call assert_notequal(screenattr(1, 10) , screenattr(1, 11))
+ call assert_notequal(screenattr(1, 11) , screenattr(1, 12))
+ call assert_equal(screenattr(1, 11) , screenattr(1, 32))
+! endfunc
+*** ../vim-8.1.0710/src/testdir/test_matchadd_conceal_utf8.vim 2016-07-21 20:10:48.000000000 +0200
+--- src/testdir/test_matchadd_conceal_utf8.vim 2019-01-09 22:43:42.721851560 +0100
+***************
+*** 7,25 ****
+ set term=ansi
+ endif
+
+! function! s:screenline(lnum) abort
+ let line = []
+ for c in range(1, winwidth(0))
+ call add(line, nr2char(screenchar(a:lnum, c)))
+ endfor
+ return s:trim(join(line, ''))
+! endfunction
+
+! function! s:trim(str) abort
+ return matchstr(a:str,'^\s*\zs.\{-}\ze\s*$')
+! endfunction
+
+! function! Test_match_using_multibyte_conceal_char()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+--- 7,25 ----
+ set term=ansi
+ endif
+
+! func s:screenline(lnum) abort
+ let line = []
+ for c in range(1, winwidth(0))
+ call add(line, nr2char(screenchar(a:lnum, c)))
+ endfor
+ return s:trim(join(line, ''))
+! endfunc
+
+! func s:trim(str) abort
+ return matchstr(a:str,'^\s*\zs.\{-}\ze\s*$')
+! endfunc
+
+! func Test_match_using_multibyte_conceal_char()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+***************
+*** 40,43 ****
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ quit!
+! endfunction
+--- 40,43 ----
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ quit!
+! endfunc
+*** ../vim-8.1.0710/src/testdir/test_messages.vim 2018-12-22 13:27:59.119503967 +0100
+--- src/testdir/test_messages.vim 2019-01-09 22:44:04.793656085 +0100
+***************
+*** 43,49 ****
+ " indicator (e.g., "-- INSERT --") when ":stopinsert" is invoked. Message
+ " output could then be disturbed when 'cmdheight' was greater than one.
+ " This test ensures that the bugfix for this issue remains in place.
+! function! Test_stopinsert_does_not_break_message_output()
+ set cmdheight=2
+ redraw!
+
+--- 43,49 ----
+ " indicator (e.g., "-- INSERT --") when ":stopinsert" is invoked. Message
+ " output could then be disturbed when 'cmdheight' was greater than one.
+ " This test ensures that the bugfix for this issue remains in place.
+! func Test_stopinsert_does_not_break_message_output()
+ set cmdheight=2
+ redraw!
+
+***************
+*** 58,64 ****
+ redraw!
+
+ set cmdheight&
+! endfunction
+
+ func Test_message_completion()
+ call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx')
+--- 58,64 ----
+ redraw!
+
+ set cmdheight&
+! endfunc
+
+ func Test_message_completion()
+ call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx')
+*** ../vim-8.1.0710/src/testdir/test_number.vim 2017-02-23 18:23:28.000000000 +0100
+--- src/testdir/test_number.vim 2019-01-09 22:44:44.669304914 +0100
+***************
+*** 2,24 ****
+
+ source view_util.vim
+
+! func! s:screen_lines(start, end) abort
+ return ScreenLines([a:start, a:end], 8)
+ endfunc
+
+! func! s:compare_lines(expect, actual)
+ call assert_equal(a:expect, a:actual)
+ endfunc
+
+! func! s:test_windows(h, w) abort
+ call NewWindow(a:h, a:w)
+ endfunc
+
+! func! s:close_windows() abort
+ call CloseWindow()
+ endfunc
+
+! func! s:validate_cursor() abort
+ " update skipcol.
+ " wincol():
+ " f_wincol
+--- 2,24 ----
+
+ source view_util.vim
+
+! func s:screen_lines(start, end) abort
+ return ScreenLines([a:start, a:end], 8)
+ endfunc
+
+! func s:compare_lines(expect, actual)
+ call assert_equal(a:expect, a:actual)
+ endfunc
+
+! func s:test_windows(h, w) abort
+ call NewWindow(a:h, a:w)
+ endfunc
+
+! func s:close_windows() abort
+ call CloseWindow()
+ endfunc
+
+! func s:validate_cursor() abort
+ " update skipcol.
+ " wincol():
+ " f_wincol
+*** ../vim-8.1.0710/src/testdir/test_options.vim 2018-10-02 15:06:36.761478333 +0200
+--- src/testdir/test_options.vim 2019-01-09 22:45:10.113082099 +0100
+***************
+*** 1,6 ****
+ " Test for options
+
+! function! Test_whichwrap()
+ set whichwrap=b,s
+ call assert_equal('b,s', &whichwrap)
+
+--- 1,6 ----
+ " Test for options
+
+! func Test_whichwrap()
+ set whichwrap=b,s
+ call assert_equal('b,s', &whichwrap)
+
+***************
+*** 20,35 ****
+ call assert_equal('h', &whichwrap)
+
+ set whichwrap&
+! endfunction
+
+! function! Test_isfname()
+ " This used to cause Vim to access uninitialized memory.
+ set isfname=
+ call assert_equal("~X", expand("~X"))
+ set isfname&
+! endfunction
+
+! function Test_wildchar()
+ " Empty 'wildchar' used to access invalid memory.
+ call assert_fails('set wildchar=', 'E521:')
+ call assert_fails('set wildchar=abc', 'E521:')
+--- 20,35 ----
+ call assert_equal('h', &whichwrap)
+
+ set whichwrap&
+! endfunc
+
+! func Test_isfname()
+ " This used to cause Vim to access uninitialized memory.
+ set isfname=
+ call assert_equal("~X", expand("~X"))
+ set isfname&
+! endfunc
+
+! func Test_wildchar()
+ " Empty 'wildchar' used to access invalid memory.
+ call assert_fails('set wildchar=', 'E521:')
+ call assert_fails('set wildchar=abc', 'E521:')
+***************
+*** 40,48 ****
+ let a=execute('set wildchar?')
+ call assert_equal("\n wildchar=<Esc>", a)
+ set wildchar&
+! endfunction
+
+! function Test_options()
+ let caught = 'ok'
+ try
+ options
+--- 40,48 ----
+ let a=execute('set wildchar?')
+ call assert_equal("\n wildchar=<Esc>", a)
+ set wildchar&
+! endfunc
+
+! func Test_options()
+ let caught = 'ok'
+ try
+ options
+***************
+*** 53,61 ****
+
+ " close option-window
+ close
+! endfunction
+
+! function Test_path_keep_commas()
+ " Test that changing 'path' keeps two commas.
+ set path=foo,,bar
+ set path-=bar
+--- 53,61 ----
+
+ " close option-window
+ close
+! endfunc
+
+! func Test_path_keep_commas()
+ " Test that changing 'path' keeps two commas.
+ set path=foo,,bar
+ set path-=bar
+***************
+*** 63,69 ****
+ call assert_equal('foo,,bar', &path)
+
+ set path&
+! endfunction
+
+ func Test_signcolumn()
+ if has('signs')
+--- 63,69 ----
+ call assert_equal('foo,,bar', &path)
+
+ set path&
+! endfunc
+
+ func Test_signcolumn()
+ if has('signs')
+*** ../vim-8.1.0710/src/testdir/test_partial.vim 2016-08-11 22:46:37.000000000 +0200
+--- src/testdir/test_partial.vim 2019-01-09 22:45:36.684850393 +0100
+***************
+*** 114,122 ****
+ call OuterCall()
+ endfunc
+
+! function! s:cache_clear() dict
+ return self.name
+! endfunction
+
+ func Test_script_function_in_dict()
+ let s:obj = {'name': 'foo'}
+--- 114,122 ----
+ call OuterCall()
+ endfunc
+
+! func s:cache_clear() dict
+ return self.name
+! endfunc
+
+ func Test_script_function_in_dict()
+ let s:obj = {'name': 'foo'}
+***************
+*** 136,145 ****
+ call assert_equal('bar', B())
+ endfunc
+
+! function! s:cache_arg(arg) dict
+ let s:result = self.name . '/' . a:arg
+ return s:result
+! endfunction
+
+ func Test_script_function_in_dict_arg()
+ let s:obj = {'name': 'foo'}
+--- 136,145 ----
+ call assert_equal('bar', B())
+ endfunc
+
+! func s:cache_arg(arg) dict
+ let s:result = self.name . '/' . a:arg
+ return s:result
+! endfunc
+
+ func Test_script_function_in_dict_arg()
+ let s:obj = {'name': 'foo'}
+*** ../vim-8.1.0710/src/testdir/test_smartindent.vim 2017-08-03 17:53:54.000000000 +0200
+--- src/testdir/test_smartindent.vim 2019-01-09 22:46:34.496349516 +0100
+***************
+*** 1,24 ****
+ " Tests for smartindent
+
+ " Tests for not doing smart indenting when it isn't set.
+! function! Test_nosmartindent()
+ new
+ call append(0, [" some test text",
+! \ " test text",
+! \ "test text",
+! \ " test text"])
+ set nocindent nosmartindent autoindent
+ exe "normal! gg/some\<CR>"
+ exe "normal! 2cc#test\<Esc>"
+ call assert_equal(" #test", getline(1))
+ enew! | close
+! endfunction
+
+! function MyIndent()
+! endfunction
+
+ " When 'indentexpr' is set, setting 'si' has no effect.
+! function Test_smartindent_has_no_effect()
+ new
+ exe "normal! i\<Tab>one\<Esc>"
+ set noautoindent
+--- 1,24 ----
+ " Tests for smartindent
+
+ " Tests for not doing smart indenting when it isn't set.
+! func Test_nosmartindent()
+ new
+ call append(0, [" some test text",
+! \ " test text",
+! \ "test text",
+! \ " test text"])
+ set nocindent nosmartindent autoindent
+ exe "normal! gg/some\<CR>"
+ exe "normal! 2cc#test\<Esc>"
+ call assert_equal(" #test", getline(1))
+ enew! | close
+! endfunc
+
+! func MyIndent()
+! endfunc
+
+ " When 'indentexpr' is set, setting 'si' has no effect.
+! func Test_smartindent_has_no_effect()
+ new
+ exe "normal! i\<Tab>one\<Esc>"
+ set noautoindent
+***************
+*** 36,41 ****
+ set smartindent&
+ set indentexpr&
+ bwipe!
+! endfunction
+
+ " vim: shiftwidth=2 sts=2 expandtab
+--- 36,41 ----
+ set smartindent&
+ set indentexpr&
+ bwipe!
+! endfunc
+
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.0710/src/testdir/test_substitute.vim 2017-10-26 19:57:28.000000000 +0200
+--- src/testdir/test_substitute.vim 2019-01-09 22:47:00.292127354 +0100
+***************
+*** 1,6 ****
+ " Tests for multi-line regexps with ":s".
+
+! function! Test_multiline_subst()
+ enew!
+ call append(0, ["1 aa",
+ \ "bb",
+--- 1,6 ----
+ " Tests for multi-line regexps with ":s".
+
+! func Test_multiline_subst()
+ enew!
+ call append(0, ["1 aa",
+ \ "bb",
+***************
+*** 38,46 ****
+ call assert_equal('7x7f', getline(12))
+ call assert_equal('xxxxx', getline(13))
+ enew!
+! endfunction
+
+! function! Test_substitute_variants()
+ " Validate that all the 2-/3-letter variants which embed the flags into the
+ " command name actually work.
+ enew!
+--- 38,46 ----
+ call assert_equal('7x7f', getline(12))
+ call assert_equal('xxxxx', getline(13))
+ enew!
+! endfunc
+
+! func Test_substitute_variants()
+ " Validate that all the 2-/3-letter variants which embed the flags into the
+ " command name actually work.
+ enew!
+***************
+*** 105,111 ****
+ call assert_equal(var.exp, getline('.'), msg)
+ endfor
+ endfor
+! endfunction
+
+ func Test_substitute_repeat()
+ " This caused an invalid memory access.
+--- 105,111 ----
+ call assert_equal(var.exp, getline('.'), msg)
+ endfor
+ endfor
+! endfunc
+
+ func Test_substitute_repeat()
+ " This caused an invalid memory access.
+***************
+*** 401,409 ****
+
+ " List entry format: [input, cmd, output]
+ let tests = [ ['aAa', "s/A/\\=substitute(submatch(0), '.', '\\', '')/",
+! \ ['a\a']],
+ \ ['bBb', "s/B/\\=substitute(submatch(0), '.', '\\', '')/",
+! \ ['b\b']],
+ \ ['cCc', "s/C/\\=substitute(submatch(0), '.', '\<C-V>\<C-M>', '')/",
+ \ ["c\<C-V>", 'c']],
+ \ ['dDd', "s/D/\\=substitute(submatch(0), '.', '\\\<C-V>\<C-M>', '')/",
+--- 401,409 ----
+
+ " List entry format: [input, cmd, output]
+ let tests = [ ['aAa', "s/A/\\=substitute(submatch(0), '.', '\\', '')/",
+! \ ['a\a']],
+ \ ['bBb', "s/B/\\=substitute(submatch(0), '.', '\\', '')/",
+! \ ['b\b']],
+ \ ['cCc', "s/C/\\=substitute(submatch(0), '.', '\<C-V>\<C-M>', '')/",
+ \ ["c\<C-V>", 'c']],
+ \ ['dDd', "s/D/\\=substitute(submatch(0), '.', '\\\<C-V>\<C-M>', '')/",
+*** ../vim-8.1.0710/src/testdir/test_system.vim 2017-12-20 22:05:10.000000000 +0100
+--- src/testdir/test_system.vim 2019-01-09 22:47:27.771891532 +0100
+***************
+*** 1,6 ****
+ " Tests for system() and systemlist()
+
+! function! Test_System()
+ if !executable('echo') || !executable('cat') || !executable('wc')
+ return
+ endif
+--- 1,6 ----
+ " Tests for system() and systemlist()
+
+! func Test_System()
+ if !executable('echo') || !executable('cat') || !executable('wc')
+ return
+ endif
+***************
+*** 45,53 ****
+ bwipe!
+
+ call assert_fails('call system("wc -l", 99999)', 'E86:')
+! endfunction
+
+! function! Test_system_exmode()
+ if has('unix') " echo $? only works on Unix
+ let cmd = ' -es -u NONE -c "source Xscript" +q; echo "result=$?"'
+ " Need to put this in a script, "catch" isn't found after an unknown
+--- 45,53 ----
+ bwipe!
+
+ call assert_fails('call system("wc -l", 99999)', 'E86:')
+! endfunc
+
+! func Test_system_exmode()
+ if has('unix') " echo $? only works on Unix
+ let cmd = ' -es -u NONE -c "source Xscript" +q; echo "result=$?"'
+ " Need to put this in a script, "catch" isn't found after an unknown
+*** ../vim-8.1.0710/src/testdir/test_terminal.vim 2018-12-24 19:15:15.551304134 +0100
+--- src/testdir/test_terminal.vim 2019-01-09 22:47:35.611824406 +0100
+***************
+*** 122,128 ****
+ unlet g:job
+ endfunc
+
+! func! s:Nasty_exit_cb(job, st)
+ exe g:buf . 'bwipe!'
+ let g:buf = 0
+ endfunc
+--- 122,128 ----
+ unlet g:job
+ endfunc
+
+! func s:Nasty_exit_cb(job, st)
+ exe g:buf . 'bwipe!'
+ let g:buf = 0
+ endfunc
+***************
+*** 1727,1729 ****
+--- 1727,1753 ----
+ let term = term_start('false', {'term_finish': 'close'})
+ call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) })
+ endfunc
++
++ func Test_term_gettitle()
++ if !has('title') || empty(&t_ts)
++ return
++ endif
++ " TODO: this fails on Travis
++ return
++
++ " term_gettitle() returns an empty string for a non-terminal buffer
++ " or for a non-existing buffer.
++ call assert_equal('', term_gettitle(bufnr('%')))
++ call assert_equal('', term_gettitle(bufnr('$') + 1))
++
++ let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'])
++ call WaitForAssert({-> assert_equal('[No Name] - VIM', term_gettitle(term)) })
++
++ call term_sendkeys(term, ":e Xfoo\r")
++ call WaitForAssert({-> assert_match('Xfoo (.*[/\\]testdir) - VIM', term_gettitle(term)) })
++
++ call term_sendkeys(term, ":set titlestring=foo\r")
++ call WaitForAssert({-> assert_equal('foo', term_gettitle(term)) })
++
++ exe term . 'bwipe!'
++ endfunc
+*** ../vim-8.1.0710/src/testdir/test_textobjects.vim 2018-08-16 21:37:46.389318767 +0200
+--- src/testdir/test_textobjects.vim 2019-01-09 22:47:49.067709349 +0100
+***************
+*** 236,242 ****
+ %delete _
+ endfunc
+
+! func! Test_sentence_with_cursor_on_delimiter()
+ enew!
+ call setline(1, "A '([sentence.])' A sentence.")
+
+--- 236,242 ----
+ %delete _
+ endfunc
+
+! func Test_sentence_with_cursor_on_delimiter()
+ enew!
+ call setline(1, "A '([sentence.])' A sentence.")
+
+*** ../vim-8.1.0710/src/testdir/test_utf8.vim 2017-03-18 22:49:29.000000000 +0100
+--- src/testdir/test_utf8.vim 2019-01-09 22:48:16.191477993 +0100
+***************
+*** 25,41 ****
+ endfunc
+
+ " Test for customlist completion
+! function! CustomComplete1(lead, line, pos)
+ return ['あ', 'い']
+! endfunction
+
+! function! CustomComplete2(lead, line, pos)
+ return ['あたし', 'あたま', 'あたりめ']
+! endfunction
+
+! function! CustomComplete3(lead, line, pos)
+ return ['Nこ', 'Nん', 'Nぶ']
+! endfunction
+
+ func Test_customlist_completion()
+ command -nargs=1 -complete=customlist,CustomComplete1 Test1 echo
+--- 25,41 ----
+ endfunc
+
+ " Test for customlist completion
+! func CustomComplete1(lead, line, pos)
+ return ['あ', 'い']
+! endfunc
+
+! func CustomComplete2(lead, line, pos)
+ return ['あたし', 'あたま', 'あたりめ']
+! endfunc
+
+! func CustomComplete3(lead, line, pos)
+ return ['Nこ', 'Nん', 'Nぶ']
+! endfunc
+
+ func Test_customlist_completion()
+ command -nargs=1 -complete=customlist,CustomComplete1 Test1 echo
+*** ../vim-8.1.0710/src/testdir/test_utf8_comparisons.vim 2017-06-27 18:20:28.000000000 +0200
+--- src/testdir/test_utf8_comparisons.vim 2019-01-09 22:48:57.287128840 +0100
+***************
+*** 5,16 ****
+ finish
+ endif
+
+! function! Ch(a, op, b, expected)
+ call assert_equal(eval(printf('"%s" %s "%s"', a:a, a:op, a:b)), a:expected,
+ \ printf('"%s" %s "%s" should return %d', a:a, a:op, a:b, a:expected))
+! endfunction
+
+! function! Chk(a, b, result)
+ if a:result == 0
+ call Ch(a:a, '==?', a:b, 1)
+ call Ch(a:a, '!=?', a:b, 0)
+--- 5,16 ----
+ finish
+ endif
+
+! func Ch(a, op, b, expected)
+ call assert_equal(eval(printf('"%s" %s "%s"', a:a, a:op, a:b)), a:expected,
+ \ printf('"%s" %s "%s" should return %d', a:a, a:op, a:b, a:expected))
+! endfunc
+
+! func Chk(a, b, result)
+ if a:result == 0
+ call Ch(a:a, '==?', a:b, 1)
+ call Ch(a:a, '!=?', a:b, 0)
+***************
+*** 33,58 ****
+ call Ch(a:a, '<?', a:b, 1)
+ call Ch(a:a, '>?', a:b, 0)
+ endif
+! endfunction
+
+! function! Check(a, b, result)
+ call Chk(a:a, a:b, a:result)
+ call Chk(a:b, a:a, -a:result)
+! endfunction
+
+! function! LT(a, b)
+ call Check(a:a, a:b, -1)
+! endfunction
+
+! function! GT(a, b)
+ call Check(a:a, a:b, 1)
+! endfunction
+
+! function! EQ(a, b)
+ call Check(a:a, a:b, 0)
+! endfunction
+
+! function Test_comparisons()
+ call EQ('', '')
+ call LT('', 'a')
+ call EQ('abc', 'abc')
+--- 33,58 ----
+ call Ch(a:a, '<?', a:b, 1)
+ call Ch(a:a, '>?', a:b, 0)
+ endif
+! endfunc
+
+! func Check(a, b, result)
+ call Chk(a:a, a:b, a:result)
+ call Chk(a:b, a:a, -a:result)
+! endfunc
+
+! func LT(a, b)
+ call Check(a:a, a:b, -1)
+! endfunc
+
+! func GT(a, b)
+ call Check(a:a, a:b, 1)
+! endfunc
+
+! func EQ(a, b)
+ call Check(a:a, a:b, 0)
+! endfunc
+
+! func Test_comparisons()
+ call EQ('', '')
+ call LT('', 'a')
+ call EQ('abc', 'abc')
+***************
+*** 85,95 ****
+ for n in range(0xC0, 0xFF)
+ call LT(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n))
+ endfor
+! endfunction
+
+ " test that g~ap changes one paragraph only.
+! function Test_gap()
+ new
+ call feedkeys("iabcd\n\ndefggg0g~ap", "tx")
+ call assert_equal(["ABCD", "", "defg"], getline(1,3))
+! endfunction
+--- 85,95 ----
+ for n in range(0xC0, 0xFF)
+ call LT(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n))
+ endfor
+! endfunc
+
+ " test that g~ap changes one paragraph only.
+! func Test_gap()
+ new
+ call feedkeys("iabcd\n\ndefggg0g~ap", "tx")
+ call assert_equal(["ABCD", "", "defg"], getline(1,3))
+! endfunc
+*** ../vim-8.1.0710/src/testdir/test_vartabs.vim 2018-11-22 03:07:30.948596188 +0100
+--- src/testdir/test_vartabs.vim 2019-01-09 22:49:05.211061699 +0100
+***************
+*** 134,140 ****
+ bwipeout!
+ endfunc
+
+! func! Test_vartabs_breakindent()
+ if !exists("+breakindent")
+ return
+ endif
+--- 134,140 ----
+ bwipeout!
+ endfunc
+
+! func Test_vartabs_breakindent()
+ if !exists("+breakindent")
+ return
+ endif
+*** ../vim-8.1.0710/src/testdir/test_vimscript.vim 2017-09-23 18:58:18.000000000 +0200
+--- src/testdir/test_vimscript.vim 2019-01-09 22:50:51.474166455 +0100
+***************
+*** 5,15 ****
+ " Test environment {{{1
+ "-------------------------------------------------------------------------------
+
+! com! XpathINIT let g:Xpath = ''
+ com! -nargs=1 -bar Xpath let g:Xpath = g:Xpath . <args>
+
+ " Append a message to the "messages" file
+! func! Xout(text)
+ split messages
+ $put =a:text
+ wq
+--- 5,15 ----
+ " Test environment {{{1
+ "-------------------------------------------------------------------------------
+
+! com! XpathINIT let g:Xpath = ''
+ com! -nargs=1 -bar Xpath let g:Xpath = g:Xpath . <args>
+
+ " Append a message to the "messages" file
+! func Xout(text)
+ split messages
+ $put =a:text
+ wq
+***************
+*** 25,31 ****
+ " in the variable argument list. This function is useful if similar tests are
+ " to be made for a ":return" from a function call or a ":finish" in a script
+ " file.
+! function! MakeScript(funcname, ...)
+ let script = tempname()
+ execute "redir! >" . script
+ execute "function" a:funcname
+--- 25,31 ----
+ " in the variable argument list. This function is useful if similar tests are
+ " to be made for a ":return" from a function call or a ":finish" in a script
+ " file.
+! func MakeScript(funcname, ...)
+ let script = tempname()
+ execute "redir! >" . script
+ execute "function" a:funcname
+***************
+*** 50,56 ****
+ write
+ bwipeout
+ return script
+! endfunction
+
+ " ExecAsScript - Source a temporary script made from a function. {{{2
+ "
+--- 50,56 ----
+ write
+ bwipeout
+ return script
+! endfunc
+
+ " ExecAsScript - Source a temporary script made from a function. {{{2
+ "
+***************
+*** 301,309 ****
+ "
+ let calls = ""
+ com! -nargs=1 CALL
+! \ if !exists("calls") && !exists("outer") |
+! \ let g:calls = g:calls . <args> |
+! \ endif
+
+ let i = 0
+ while i < 3
+--- 301,309 ----
+ "
+ let calls = ""
+ com! -nargs=1 CALL
+! \ if !exists("calls") && !exists("outer") |
+! \ let g:calls = g:calls . <args> |
+! \ endif
+
+ let i = 0
+ while i < 3
+***************
+*** 357,363 ****
+ if exists("*F1")
+ call F1("F1")
+ if exists("*G1")
+! call G1("G1")
+ endif
+ endif
+
+--- 357,363 ----
+ if exists("*F1")
+ call F1("F1")
+ if exists("*G1")
+! call G1("G1")
+ endif
+ endif
+
+***************
+*** 367,379 ****
+ if exists("*F2")
+ call F2(2, "F2")
+ if exists("*G21")
+! call G21("G21")
+ endif
+ if exists("*G22")
+! call G22("G22")
+ endif
+ if exists("*G23")
+! call G23("G23")
+ endif
+ endif
+
+--- 367,379 ----
+ if exists("*F2")
+ call F2(2, "F2")
+ if exists("*G21")
+! call G21("G21")
+ endif
+ if exists("*G22")
+! call G22("G22")
+ endif
+ if exists("*G23")
+! call G23("G23")
+ endif
+ endif
+
+***************
+*** 383,395 ****
+ if exists("*F3")
+ call F3(3, "F3")
+ if exists("*G31")
+! call G31("G31")
+ endif
+ if exists("*G32")
+! call G32("G32")
+ endif
+ if exists("*G33")
+! call G33("G33")
+ endif
+ endif
+
+--- 383,395 ----
+ if exists("*F3")
+ call F3(3, "F3")
+ if exists("*G31")
+! call G31("G31")
+ endif
+ if exists("*G32")
+! call G32("G32")
+ endif
+ if exists("*G33")
+! call G33("G33")
+ endif
+ endif
+
+***************
+*** 640,646 ****
+ endif
+ endif
+ return match
+! endfunction
+
+ if 1 || strlen("\"") | Xpath 'a'
+ Xpath 'b'
+--- 640,646 ----
+ endif
+ endif
+ return match
+! endfunc
+
+ if 1 || strlen("\"") | Xpath 'a'
+ Xpath 'b'
+***************
+*** 1032,1042 ****
+ call assert_true(empty(v:none))
+
+ func ChangeYourMind()
+! try
+! return v:true
+! finally
+! return 'something else'
+! endtry
+ endfunc
+
+ call ChangeYourMind()
+--- 1032,1042 ----
+ call assert_true(empty(v:none))
+
+ func ChangeYourMind()
+! try
+! return v:true
+! finally
+! return 'something else'
+! endtry
+ endfunc
+
+ call ChangeYourMind()
+***************
+*** 1250,1319 ****
+ func Test_script_lines()
+ " :append
+ try
+! call DefineFunction('T_Append', [
+! \ 'append',
+! \ 'py <<EOS',
+! \ '.',
+! \ ])
+ catch
+! call assert_report("Can't define function")
+ endtry
+ try
+! call DefineFunction('T_Append', [
+! \ 'append',
+! \ 'abc',
+! \ ])
+! call assert_report("Shouldn't be able to define function")
+ catch
+! call assert_exception('Vim(function):E126: Missing :endfunction')
+ endtry
+
+ " :change
+ try
+! call DefineFunction('T_Change', [
+! \ 'change',
+! \ 'py <<EOS',
+! \ '.',
+! \ ])
+ catch
+! call assert_report("Can't define function")
+ endtry
+ try
+! call DefineFunction('T_Change', [
+! \ 'change',
+! \ 'abc',
+! \ ])
+! call assert_report("Shouldn't be able to define function")
+ catch
+! call assert_exception('Vim(function):E126: Missing :endfunction')
+ endtry
+
+ " :insert
+ try
+! call DefineFunction('T_Insert', [
+! \ 'insert',
+! \ 'py <<EOS',
+! \ '.',
+! \ ])
+ catch
+! call assert_report("Can't define function")
+ endtry
+ try
+! call DefineFunction('T_Insert', [
+! \ 'insert',
+! \ 'abc',
+! \ ])
+! call assert_report("Shouldn't be able to define function")
+ catch
+! call assert_exception('Vim(function):E126: Missing :endfunction')
+ endtry
+ endfunc
+
+ "-------------------------------------------------------------------------------
+ " Test 96: line continuation {{{1
+ "
+! " Undefined behavior was detected by ubsan with line continuation
+! " after an empty line.
+ "-------------------------------------------------------------------------------
+ func Test_script_emty_line_continuation()
+
+--- 1250,1319 ----
+ func Test_script_lines()
+ " :append
+ try
+! call DefineFunction('T_Append', [
+! \ 'append',
+! \ 'py <<EOS',
+! \ '.',
+! \ ])
+ catch
+! call assert_report("Can't define function")
+ endtry
+ try
+! call DefineFunction('T_Append', [
+! \ 'append',
+! \ 'abc',
+! \ ])
+! call assert_report("Shouldn't be able to define function")
+ catch
+! call assert_exception('Vim(function):E126: Missing :endfunction')
+ endtry
+
+ " :change
+ try
+! call DefineFunction('T_Change', [
+! \ 'change',
+! \ 'py <<EOS',
+! \ '.',
+! \ ])
+ catch
+! call assert_report("Can't define function")
+ endtry
+ try
+! call DefineFunction('T_Change', [
+! \ 'change',
+! \ 'abc',
+! \ ])
+! call assert_report("Shouldn't be able to define function")
+ catch
+! call assert_exception('Vim(function):E126: Missing :endfunction')
+ endtry
+
+ " :insert
+ try
+! call DefineFunction('T_Insert', [
+! \ 'insert',
+! \ 'py <<EOS',
+! \ '.',
+! \ ])
+ catch
+! call assert_report("Can't define function")
+ endtry
+ try
+! call DefineFunction('T_Insert', [
+! \ 'insert',
+! \ 'abc',
+! \ ])
+! call assert_report("Shouldn't be able to define function")
+ catch
+! call assert_exception('Vim(function):E126: Missing :endfunction')
+ endtry
+ endfunc
+
+ "-------------------------------------------------------------------------------
+ " Test 96: line continuation {{{1
+ "
+! " Undefined behavior was detected by ubsan with line continuation
+! " after an empty line.
+ "-------------------------------------------------------------------------------
+ func Test_script_emty_line_continuation()
+
+*** ../vim-8.1.0710/src/testdir/test_window_cmd.vim 2018-12-24 00:22:35.739150151 +0100
+--- src/testdir/test_window_cmd.vim 2019-01-09 22:51:15.453965638 +0100
+***************
+*** 578,590 ****
+ only
+ endfunc
+
+! function! Fun_RenewFile()
+ sleep 2
+ silent execute '!echo "1" > tmp.txt'
+ sp
+ wincmd p
+ edit! tmp.txt
+! endfunction
+
+ func Test_window_prevwin()
+ " Can we make this work on MS-Windows?
+--- 578,590 ----
+ only
+ endfunc
+
+! func Fun_RenewFile()
+ sleep 2
+ silent execute '!echo "1" > tmp.txt'
+ sp
+ wincmd p
+ edit! tmp.txt
+! endfunc
+
+ func Test_window_prevwin()
+ " Can we make this work on MS-Windows?
+*** ../vim-8.1.0710/src/testdir/test_xxd.vim 2018-05-17 15:49:14.000000000 +0200
+--- src/testdir/test_xxd.vim 2019-01-09 22:51:36.965785833 +0100
+***************
+*** 7,23 ****
+ let s:xxd_cmd = $XXD
+ endif
+
+! func! PrepareBuffer(lines)
+ new
+ call append(0, a:lines)
+ $d
+ endfunc
+
+! func! s:Mess(counter)
+ return printf("Failed xxd test %d:", a:counter)
+ endfunc
+
+! func! Test_xxd()
+ call PrepareBuffer(range(1,30))
+ set ff=unix
+ w XXDfile
+--- 7,23 ----
+ let s:xxd_cmd = $XXD
+ endif
+
+! func PrepareBuffer(lines)
+ new
+ call append(0, a:lines)
+ $d
+ endfunc
+
+! func s:Mess(counter)
+ return printf("Failed xxd test %d:", a:counter)
+ endfunc
+
+! func Test_xxd()
+ call PrepareBuffer(range(1,30))
+ set ff=unix
+ w XXDfile
+*** ../vim-8.1.0710/src/version.c 2019-01-09 22:24:46.568161097 +0100
+--- src/version.c 2019-01-09 22:58:02.562605011 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 711,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+140. You'd rather catch a score on the web than watch the game as
+ it is being played 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.0712 b/data/vim/patches/8.1.0712
new file mode 100644
index 000000000..16638c87b
--- /dev/null
+++ b/data/vim/patches/8.1.0712
@@ -0,0 +1,304 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0712
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0712
+Problem: MS-Windows build instructions are a bit outdated.
+Solution: Update the instructions. (Ken Takata)
+Files: src/INSTALLpc.txt
+
+
+*** ../vim-8.1.0711/src/INSTALLpc.txt 2018-09-18 22:58:36.999976835 +0200
+--- src/INSTALLpc.txt 2019-01-09 22:56:48.743208990 +0100
+***************
+*** 496,501 ****
+--- 496,521 ----
+ nmake -f Make_mvc.mak
+ PYTHON=C:\Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27
+
++ When using MinGW and link with the official Python (as one line):
++
++ mingw32-make -f Make_ming.mak
++ PYTHON=C:/Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27
++
++ When using msys2 and link with Python2 bundled with msys2 (as one line):
++
++ mingw32-make -f Make_ming.mak PYTHON=c:/msys64/mingw64
++ PYTHON_HOME=c:/msys64/mingw64
++ PYTHONINC=-Ic:/msys64/mingw64/include/python2.7
++ DYNAMIC_PYTHON=yes
++ PYTHON_VER=27
++ DYNAMIC_PYTHON_DLL=libpython2.7.dll
++ STATIC_STDCPLUS=yes
++
++ (This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.)
++ (STATIC_STDCPLUS is optional. Set to yes if you don't want to require
++ libstdc++-6.dll.)
++
++
+ (rest written by Ron Aaron: <ronaharon@yahoo.com>)
+
+ Building with the mingw32 compiler, and the ActiveState ActivePython:
+***************
+*** 517,533 ****
+ Now just do:
+ make -f Make_ming.mak gvim.exe
+
+- And if you use msys2 to build python support (as one line):
+-
+- mingw32-make -f Make_ming.mak PYTHON=c:/msys64/mingw64
+- PYTHON_HOME=c:/msys64/mingw64
+- PYTHONINC=-Ic:/msys64/mingw64/include/python2.7
+- DYNAMIC_PYTHON=yes
+- PYTHON_VER=27
+- DYNAMIC_PYTHON_DLL=libpython2.7.dll
+- STATIC_STDCPLUS=yes
+-
+- (This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.)
+ You will end up with a Python-enabled, Win32 version. Enjoy!
+
+
+--- 537,542 ----
+***************
+*** 548,553 ****
+--- 557,566 ----
+ nmake -f Make_mvc.mak
+ PYTHON3=C:\Python36 DYNAMIC_PYTHON3=yes PYTHON3_VER=36
+
++ When using MinGW and link with the official Python3 (as one line):
++
++ mingw32-make -f Make_ming.mak
++ PYTHON3=C:/Python36 DYNAMIC_PYTHON3=yes PYTHON3_VER=36
+
+ When using msys2 and link with Python3 bundled with msys2 (as one line):
+
+***************
+*** 560,565 ****
+--- 573,580 ----
+ STATIC_STDCPLUS=yes
+
+ (This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.)
++ (STATIC_STDCPLUS is optional. Set to yes if you don't want to require
++ libstdc++-6.dll.)
+
+
+ 9. Building with Racket or MzScheme support
+***************
+*** 833,843 ****
+
+ mingw32-make -f Make_ming.mak
+ RUBY=C:/Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0
+! WINVER=0x501
+
+ For 64-bit version, replace RUBY=C:/Ruby24 with RUBY=C:/Ruby24-x64.
+ If you set WINVER explicitly, it must be set to >=0x500, when building with
+! Ruby 2.1 or later. (Default is 0x501.)
+
+
+
+--- 848,858 ----
+
+ mingw32-make -f Make_ming.mak
+ RUBY=C:/Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0
+! WINVER=0x600
+
+ For 64-bit version, replace RUBY=C:/Ruby24 with RUBY=C:/Ruby24-x64.
+ If you set WINVER explicitly, it must be set to >=0x500, when building with
+! Ruby 2.1 or later. (Default is 0x600.)
+
+
+
+***************
+*** 849,855 ****
+
+ http://www.activestate.com/activetcl
+
+! For MSVC 2015 use version 8.6.6 or later.
+ When building, you need to set the following variables:
+
+ TCL: Where tcl is installed. E.g. C:\Tcl86
+--- 864,877 ----
+
+ http://www.activestate.com/activetcl
+
+! Alternatively, you can use the binaries provided by IronTcl from
+!
+! https://www.irontcl.com/
+!
+! They might lack behind the latest version a bit, but should provide 64bit
+! and 32bit versions even if ActiveTcl does not provide them anymore.
+!
+! For building with MSVC 2015 use version 8.6.6 or later.
+ When building, you need to set the following variables:
+
+ TCL: Where tcl is installed. E.g. C:\Tcl86
+***************
+*** 944,987 ****
+ After you've built the Vim binaries as described above, you're ready to
+ install Vim on your system. However, if you've obtained the Vim sources
+ using Git, Mercurial or by downloading them as a unix tar file, you must
+! first create a "vim80" directory. If you instead downloaded the sources as
+ zip files, you can skip this setup as the zip archives already have the
+ correct directory structure.
+
+! A. Create a Vim "runtime" subdirectory named "vim80"
+ -----------------------------------------------------
+ If you obtained your Vim sources as zip files, you can skip this step.
+ Otherwise, continue reading.
+
+ Go to the directory that contains the Vim "src" and "runtime"
+! directories and create a new subdirectory named "vim80".
+
+! Copy the "runtime" files into "vim80":
+! copy runtime\* vim80
+
+! B. Copy the new binaries into the "vim80" directory
+ ----------------------------------------------------
+ Regardless of how you installed the Vim sources, you need to copy the
+! new binaries you created above into "vim80":
+
+! copy src\*.exe vim80
+! copy src\tee\tee.exe vim80
+! copy src\xxd\xxd.exe vim80
+
+ To install the "Edit with Vim" popup menu, you need both 32-bit and 64-bit
+! versions of gvimext.dll. They should be copied to "vim80\GvimExt32" and
+! "vim80\GvimExt64" respectively.
+ First, build the 32-bit version, then:
+
+! mkdir vim80\GvimExt32
+! copy src\GvimExt\gvimext.dll vim80\GvimExt32
+
+ Next, clean the 32-bit version and build the 64-bit version, then:
+
+! mkdir vim80\GvimExt64
+! copy src\GvimExt\gvimext.dll vim80\GvimExt64
+
+! C. Copy gettext and iconv DLLs into the "vim80" directory
+ ----------------------------------------------------------
+ Get gettext and iconv DLLs from the following site:
+ https://github.com/mlocati/gettext-iconv-windows/releases
+--- 966,1009 ----
+ After you've built the Vim binaries as described above, you're ready to
+ install Vim on your system. However, if you've obtained the Vim sources
+ using Git, Mercurial or by downloading them as a unix tar file, you must
+! first create a "vim81" directory. If you instead downloaded the sources as
+ zip files, you can skip this setup as the zip archives already have the
+ correct directory structure.
+
+! A. Create a Vim "runtime" subdirectory named "vim81"
+ -----------------------------------------------------
+ If you obtained your Vim sources as zip files, you can skip this step.
+ Otherwise, continue reading.
+
+ Go to the directory that contains the Vim "src" and "runtime"
+! directories and create a new subdirectory named "vim81".
+
+! Copy the "runtime" files into "vim81":
+! copy runtime\* vim81
+
+! B. Copy the new binaries into the "vim81" directory
+ ----------------------------------------------------
+ Regardless of how you installed the Vim sources, you need to copy the
+! new binaries you created above into "vim81":
+
+! copy src\*.exe vim81
+! copy src\tee\tee.exe vim81
+! copy src\xxd\xxd.exe vim81
+
+ To install the "Edit with Vim" popup menu, you need both 32-bit and 64-bit
+! versions of gvimext.dll. They should be copied to "vim81\GvimExt32" and
+! "vim81\GvimExt64" respectively.
+ First, build the 32-bit version, then:
+
+! mkdir vim81\GvimExt32
+! copy src\GvimExt\gvimext.dll vim81\GvimExt32
+
+ Next, clean the 32-bit version and build the 64-bit version, then:
+
+! mkdir vim81\GvimExt64
+! copy src\GvimExt\gvimext.dll vim81\GvimExt64
+
+! C. Copy gettext and iconv DLLs into the "vim81" directory
+ ----------------------------------------------------------
+ Get gettext and iconv DLLs from the following site:
+ https://github.com/mlocati/gettext-iconv-windows/releases
+***************
+*** 989,995 ****
+ Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract
+ DLLs and place them as follows:
+
+! vim80\
+ | libintl-8.dll
+ | libiconv-2.dll
+ | libgcc_s_sjlj-1.dll (only for 32-bit)
+--- 1011,1017 ----
+ Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract
+ DLLs and place them as follows:
+
+! vim81\
+ | libintl-8.dll
+ | libiconv-2.dll
+ | libgcc_s_sjlj-1.dll (only for 32-bit)
+***************
+*** 1003,1020 ****
+ libintl-8.dll
+ libiconv-2.dll
+
+! The DLLs in the "vim80" should be the same bitness with the (g)vim.exe.
+
+! D. Move the "vim80" directory into the Vim installation subdirectory
+ ---------------------------------------------------------------------
+! Move the "vim80" subdirectory into the subdirectory where you want Vim
+ to be installed. Typically, this subdirectory will be named "vim".
+! If you already have a "vim80" subdirectory in "vim", delete it first
+ by running its uninstal.exe program.
+
+ E. Install Vim
+ ---------------
+! "cd" to your Vim installation subdirectory "vim\vim80" and run the
+ "install.exe" program. It will ask you a number of questions about
+ how you would like to have your Vim setup. Among these are:
+ - You can tell it to write a "_vimrc" file with your preferences in the
+--- 1025,1042 ----
+ libintl-8.dll
+ libiconv-2.dll
+
+! The DLLs in the "vim81" should be the same bitness with the (g)vim.exe.
+
+! D. Move the "vim81" directory into the Vim installation subdirectory
+ ---------------------------------------------------------------------
+! Move the "vim81" subdirectory into the subdirectory where you want Vim
+ to be installed. Typically, this subdirectory will be named "vim".
+! If you already have a "vim81" subdirectory in "vim", delete it first
+ by running its uninstal.exe program.
+
+ E. Install Vim
+ ---------------
+! "cd" to your Vim installation subdirectory "vim\vim81" and run the
+ "install.exe" program. It will ask you a number of questions about
+ how you would like to have your Vim setup. Among these are:
+ - You can tell it to write a "_vimrc" file with your preferences in the
+*** ../vim-8.1.0711/src/version.c 2019-01-09 23:00:58.001176090 +0100
+--- src/version.c 2019-01-09 23:01:56.816698716 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 712,
+ /**/
+
+--
+I wish there was a knob on the TV to turn up the intelligence.
+There's a knob called "brightness", but it doesn't seem to 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.0713 b/data/vim/patches/8.1.0713
new file mode 100644
index 000000000..8677de49a
--- /dev/null
+++ b/data/vim/patches/8.1.0713
Binary files differ
diff --git a/data/vim/patches/8.1.0714 b/data/vim/patches/8.1.0714
new file mode 100644
index 000000000..918ab54c3
--- /dev/null
+++ b/data/vim/patches/8.1.0714
@@ -0,0 +1,121 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0714
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0714
+Problem: Unessesary #if lines in GTK code.
+Solution: Remove the #if. (Ken Takata, closes #3785)
+Files: src/gui_beval.c, src/if_mzsch.c
+
+
+*** ../vim-8.1.0713/src/gui_beval.c 2018-09-18 22:29:59.888041388 +0200
+--- src/gui_beval.c 2019-01-10 22:49:49.532211558 +0100
+***************
+*** 60,70 ****
+ static gint mainwin_event_cb(GtkWidget *, GdkEvent *, gpointer);
+ static void pointer_event(BalloonEval *, int, int, unsigned);
+ static void key_event(BalloonEval *, unsigned, int);
+- # if GTK_CHECK_VERSION(3,0,0)
+ static gboolean timeout_cb(gpointer);
+- # else
+- static gint timeout_cb(gpointer);
+- # endif
+ # if GTK_CHECK_VERSION(3,0,0)
+ static gboolean balloon_draw_event_cb (GtkWidget *, cairo_t *, gpointer);
+ # else
+--- 60,66 ----
+***************
+*** 444,454 ****
+ cancelBalloon(beval);
+ }
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ static gboolean
+- # else
+- static gint
+- # endif
+ timeout_cb(gpointer data)
+ {
+ BalloonEval *beval = (BalloonEval *)data;
+--- 440,446 ----
+*** ../vim-8.1.0713/src/if_mzsch.c 2018-09-30 21:43:17.195693290 +0200
+--- src/if_mzsch.c 2019-01-10 22:49:49.532211558 +0100
+***************
+*** 811,821 ****
+ static void CALLBACK timer_proc(HWND, UINT, UINT_PTR, DWORD);
+ static UINT timer_id = 0;
+ #elif defined(FEAT_GUI_GTK)
+- # if GTK_CHECK_VERSION(3,0,0)
+ static gboolean timer_proc(gpointer);
+- # else
+- static gint timer_proc(gpointer);
+- # endif
+ static guint timer_id = 0;
+ #elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
+ static void timer_proc(XtPointer, XtIntervalId *);
+--- 811,817 ----
+***************
+*** 855,865 ****
+ static void CALLBACK
+ timer_proc(HWND hwnd UNUSED, UINT uMsg UNUSED, UINT_PTR idEvent UNUSED, DWORD dwTime UNUSED)
+ # elif defined(FEAT_GUI_GTK)
+- # if GTK_CHECK_VERSION(3,0,0)
+ static gboolean
+- # else
+- static gint
+- # endif
+ timer_proc(gpointer data UNUSED)
+ # elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
+ static void
+--- 851,857 ----
+***************
+*** 886,896 ****
+ # if defined(FEAT_GUI_W32)
+ timer_id = SetTimer(NULL, 0, p_mzq, timer_proc);
+ # elif defined(FEAT_GUI_GTK)
+- # if GTK_CHECK_VERSION(3,0,0)
+ timer_id = g_timeout_add((guint)p_mzq, (GSourceFunc)timer_proc, NULL);
+- # else
+- timer_id = gtk_timeout_add((guint32)p_mzq, (GtkFunction)timer_proc, NULL);
+- # endif
+ # elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
+ timer_id = XtAppAddTimeOut(app_context, p_mzq, timer_proc, NULL);
+ # elif defined(FEAT_GUI_MAC)
+--- 878,884 ----
+***************
+*** 906,916 ****
+ # if defined(FEAT_GUI_W32)
+ KillTimer(NULL, timer_id);
+ # elif defined(FEAT_GUI_GTK)
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_source_remove(timer_id);
+- # else
+- gtk_timeout_remove(timer_id);
+- # endif
+ # elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
+ XtRemoveTimeOut(timer_id);
+ # elif defined(FEAT_GUI_MAC)
+--- 894,900 ----
+*** ../vim-8.1.0713/src/version.c 2019-01-10 21:49:51.982405995 +0100
+--- src/version.c 2019-01-10 22:56:13.965337845 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 714,
+ /**/
+
+--
+We are the Borg of GNU GPL. We will assimilate your source code.
+Resistance is futile.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0715 b/data/vim/patches/8.1.0715
new file mode 100644
index 000000000..a54360c12
--- /dev/null
+++ b/data/vim/patches/8.1.0715
@@ -0,0 +1,66 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0715
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0715
+Problem: Superfluous call to redraw_win_later().
+Solution: Remove the call.
+Files: src/move.c
+
+
+*** ../vim-8.1.0714/src/move.c 2019-01-09 20:51:00.321398815 +0100
+--- src/move.c 2019-01-11 11:52:12.679300598 +0100
+***************
+*** 137,145 ****
+ #endif
+ )
+ && (wp->w_valid & VALID_CROW) == 0
+! # ifdef FEAT_INS_EXPAND
+ && !pum_visible()
+! # endif
+ )
+ {
+ if (wp->w_p_rnu)
+--- 137,145 ----
+ #endif
+ )
+ && (wp->w_valid & VALID_CROW) == 0
+! #ifdef FEAT_INS_EXPAND
+ && !pum_visible()
+! #endif
+ )
+ {
+ if (wp->w_p_rnu)
+***************
+*** 155,161 ****
+ // the current window.
+ redrawWinline(wp, wp->w_last_cursorline);
+ redrawWinline(wp, wp->w_cursor.lnum);
+- redraw_win_later(wp, VALID);
+ }
+ else
+ redraw_win_later(wp, SOME_VALID);
+--- 155,160 ----
+*** ../vim-8.1.0714/src/version.c 2019-01-10 22:56:25.525250963 +0100
+--- src/version.c 2019-01-11 11:54:43.518268024 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 715,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+147. You finally give up smoking...because it made the monitor dirty.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0716 b/data/vim/patches/8.1.0716
new file mode 100644
index 000000000..ec287c7ee
--- /dev/null
+++ b/data/vim/patches/8.1.0716
@@ -0,0 +1,310 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0716
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0716
+Problem: Get warning message when 'completefunc' returns nothing.
+Solution: Allow for returning v:none to suppress the warning message.
+ (Yasuhiro Matsumoto, closes #3789)
+Files: runtime/doc/insert.txt, src/edit.c,
+ src/testdir/test_ins_complete.vim
+
+
+
+*** ../vim-8.1.0715/runtime/doc/insert.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/insert.txt 2019-01-11 12:51:28.486353875 +0100
+***************
+*** 1076,1081 ****
+--- 1076,1085 ----
+ The only value currently recognized is "always", the
+ effect is that the function is called whenever the
+ leading text is changed.
++
++ If you want to suppress the warning message for an empty result, return
++ v:none. This is useful to implement asynchronous completion with complete().
++
+ Other items are ignored.
+
+ For acting upon end of completion, see the |CompleteDone| autocommand event.
+*** ../vim-8.1.0715/src/edit.c 2019-01-09 20:51:00.321398815 +0100
+--- src/edit.c 2019-01-11 12:53:41.697357871 +0100
+***************
+*** 150,155 ****
+--- 150,156 ----
+ static expand_T compl_xp;
+
+ static int compl_opt_refresh_always = FALSE;
++ static int compl_opt_suppress_empty = FALSE;
+
+ static void ins_ctrl_x(void);
+ static int has_compl_option(int dict_opt);
+***************
+*** 4247,4254 ****
+ case VAR_DICT:
+ matchdict = rettv.vval.v_dict;
+ break;
+ default:
+! /* TODO: Give error message? */
+ clear_tv(&rettv);
+ break;
+ }
+--- 4248,4259 ----
+ case VAR_DICT:
+ matchdict = rettv.vval.v_dict;
+ break;
++ case VAR_SPECIAL:
++ if (rettv.vval.v_number == VVAL_NONE)
++ compl_opt_suppress_empty = TRUE;
++ // FALLTHROUGH
+ default:
+! // TODO: Give error message?
+ clear_tv(&rettv);
+ break;
+ }
+***************
+*** 5611,5616 ****
+--- 5616,5622 ----
+ * completion.
+ */
+ compl_opt_refresh_always = FALSE;
++ compl_opt_suppress_empty = FALSE;
+
+ if (col < 0)
+ col = curs_col;
+***************
+*** 5860,5878 ****
+ }
+ }
+
+! /* Show a message about what (completion) mode we're in. */
+! showmode();
+! if (!shortmess(SHM_COMPLETIONMENU))
+! {
+! if (edit_submode_extra != NULL)
+! {
+! if (!p_smd)
+! msg_attr(edit_submode_extra,
+! edit_submode_highl < HLF_COUNT
+! ? HL_ATTR(edit_submode_highl) : 0);
+ }
+- else
+- msg_clr_cmdline(); /* necessary for "noshowmode" */
+ }
+
+ /* Show the popup menu, unless we got interrupted. */
+--- 5866,5887 ----
+ }
+ }
+
+! // Show a message about what (completion) mode we're in.
+! if (!compl_opt_suppress_empty)
+! {
+! showmode();
+! if (!shortmess(SHM_COMPLETIONMENU))
+! {
+! if (edit_submode_extra != NULL)
+! {
+! if (!p_smd)
+! msg_attr(edit_submode_extra,
+! edit_submode_highl < HLF_COUNT
+! ? HL_ATTR(edit_submode_highl) : 0);
+! }
+! else
+! msg_clr_cmdline(); // necessary for "noshowmode"
+ }
+ }
+
+ /* Show the popup menu, unless we got interrupted. */
+*** ../vim-8.1.0715/src/testdir/test_ins_complete.vim 2019-01-09 23:00:57.997176121 +0100
+--- src/testdir/test_ins_complete.vim 2019-01-11 12:55:51.700396748 +0100
+***************
+*** 142,147 ****
+--- 142,155 ----
+ delfunc CompleteFunc
+ endfunc
+
++ func s:CompleteDone_CompleteFuncNone( findstart, base )
++ if a:findstart
++ return 0
++ endif
++
++ return v:none
++ endfunc
++
+ func s:CompleteDone_CompleteFuncDict( findstart, base )
+ if a:findstart
+ return 0
+***************
+*** 161,166 ****
+--- 169,178 ----
+ \ }
+ endfunc
+
++ func s:CompleteDone_CheckCompletedItemNone()
++ let s:called_completedone = 1
++ endfunc
++
+ func s:CompleteDone_CheckCompletedItemDict()
+ call assert_equal( 'aword', v:completed_item[ 'word' ] )
+ call assert_equal( 'wrd', v:completed_item[ 'abbr' ] )
+***************
+*** 172,192 ****
+ let s:called_completedone = 1
+ endfunc
+
+! function Test_CompleteDoneDict()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemDict()
+
+ set completefunc=<SID>CompleteDone_CompleteFuncDict
+ execute "normal a\<C-X>\<C-U>\<C-Y>"
+ set completefunc&
+
+! call assert_equal( 'test', v:completed_item[ 'user_data' ] )
+! call assert_true( s:called_completedone )
+
+ let s:called_completedone = 0
+ au! CompleteDone
+ endfunc
+
+! func s:CompleteDone_CompleteFuncDictNoUserData( findstart, base )
+ if a:findstart
+ return 0
+ endif
+--- 184,217 ----
+ let s:called_completedone = 1
+ endfunc
+
+! func Test_CompleteDoneNone()
+! au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemNone()
+!
+! set completefunc=<SID>CompleteDone_CompleteFuncNone
+! execute "normal a\<C-X>\<C-U>\<C-Y>"
+! set completefunc&
+!
+! call assert_true(s:called_completedone)
+!
+! let s:called_completedone = 0
+! au! CompleteDone
+! endfunc
+!
+! func Test_CompleteDoneDict()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemDict()
+
+ set completefunc=<SID>CompleteDone_CompleteFuncDict
+ execute "normal a\<C-X>\<C-U>\<C-Y>"
+ set completefunc&
+
+! call assert_equal('test', v:completed_item[ 'user_data' ])
+! call assert_true(s:called_completedone)
+
+ let s:called_completedone = 0
+ au! CompleteDone
+ endfunc
+
+! func s:CompleteDone_CompleteFuncDictNoUserData(findstart, base)
+ if a:findstart
+ return 0
+ endif
+***************
+*** 215,235 ****
+ let s:called_completedone = 1
+ endfunc
+
+! function Test_CompleteDoneDictNoUserData()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemDictNoUserData()
+
+ set completefunc=<SID>CompleteDone_CompleteFuncDictNoUserData
+ execute "normal a\<C-X>\<C-U>\<C-Y>"
+ set completefunc&
+
+! call assert_equal( '', v:completed_item[ 'user_data' ] )
+! call assert_true( s:called_completedone )
+
+ let s:called_completedone = 0
+ au! CompleteDone
+ endfunc
+
+! func s:CompleteDone_CompleteFuncList( findstart, base )
+ if a:findstart
+ return 0
+ endif
+--- 240,260 ----
+ let s:called_completedone = 1
+ endfunc
+
+! func Test_CompleteDoneDictNoUserData()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemDictNoUserData()
+
+ set completefunc=<SID>CompleteDone_CompleteFuncDictNoUserData
+ execute "normal a\<C-X>\<C-U>\<C-Y>"
+ set completefunc&
+
+! call assert_equal('', v:completed_item[ 'user_data' ])
+! call assert_true(s:called_completedone)
+
+ let s:called_completedone = 0
+ au! CompleteDone
+ endfunc
+
+! func s:CompleteDone_CompleteFuncList(findstart, base)
+ if a:findstart
+ return 0
+ endif
+***************
+*** 248,262 ****
+ let s:called_completedone = 1
+ endfunc
+
+! function Test_CompleteDoneList()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemList()
+
+ set completefunc=<SID>CompleteDone_CompleteFuncList
+ execute "normal a\<C-X>\<C-U>\<C-Y>"
+ set completefunc&
+
+! call assert_equal( '', v:completed_item[ 'user_data' ] )
+! call assert_true( s:called_completedone )
+
+ let s:called_completedone = 0
+ au! CompleteDone
+--- 273,287 ----
+ let s:called_completedone = 1
+ endfunc
+
+! func Test_CompleteDoneList()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemList()
+
+ set completefunc=<SID>CompleteDone_CompleteFuncList
+ execute "normal a\<C-X>\<C-U>\<C-Y>"
+ set completefunc&
+
+! call assert_equal('', v:completed_item[ 'user_data' ])
+! call assert_true(s:called_completedone)
+
+ let s:called_completedone = 0
+ au! CompleteDone
+*** ../vim-8.1.0715/src/version.c 2019-01-11 11:55:12.930066044 +0100
+--- src/version.c 2019-01-11 12:52:49.509746564 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 716,
+ /**/
+
+--
+Although the scythe isn't pre-eminent among the weapons of war, anyone who
+has been on the wrong end of, say, a peasants' revolt will know that in
+skilled hands it is fearsome.
+ -- (Terry Pratchett, Mort)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0717 b/data/vim/patches/8.1.0717
new file mode 100644
index 000000000..2a8d6d3d3
--- /dev/null
+++ b/data/vim/patches/8.1.0717
@@ -0,0 +1,863 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0717
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0717
+Problem: There is no function for the ":sign jump" command.
+Solution: Add the sign_jump() function. (Yegappan Lakshmanan, closes #3780)
+Files: runtime/doc/eval.txt, runtime/doc/sign.txt,
+ runtime/doc/usr_41.txt, src/evalfunc.c, src/proto/sign.pro,
+ src/sign.c, src/testdir/test_signs.vim
+
+
+*** ../vim-8.1.0716/runtime/doc/eval.txt 2019-01-07 22:09:54.435460918 +0100
+--- runtime/doc/eval.txt 2019-01-11 13:27:08.166911415 +0100
+***************
+*** 2399,2404 ****
+--- 2412,2419 ----
+ sign_getdefined([{name}]) List get a list of defined signs
+ sign_getplaced([{expr} [, {dict}]])
+ List get a list of placed signs
++ sign_jump({id}, {group}, {expr})
++ Number jump to a sign
+ sign_place({id}, {group}, {name}, {expr} [, {dict}])
+ Number place a sign
+ sign_undefine([{name}]) Number undefine a sign
+***************
+*** 7972,7977 ****
+--- 8000,8020 ----
+ " Get a List of all the placed signs
+ echo sign_getplaced()
+ <
++ *sign_jump()*
++ sign_jump({id}, {group}, {expr})
++ Open the buffer {expr} or jump to the window that contains
++ {expr} and position the cursor at sign {id} in group {group}.
++ This is similar to the |:sign-jump| command.
++
++ For the use of {expr}, see |bufname()|.
++
++ Returns the line number of the sign. Returns -1 if the
++ arguments are invalid.
++
++ Example: >
++ " Jump to sign 10 in the current buffer
++ call sign_jump(10, '', '')
++ <
+ *sign_place()*
+ sign_place({id}, {group}, {name}, {expr} [, {dict}])
+ Place the sign defined as {name} at line {lnum} in file {expr}
+*** ../vim-8.1.0716/runtime/doc/sign.txt 2019-01-06 16:23:29.495325106 +0100
+--- runtime/doc/sign.txt 2019-01-11 13:27:08.166911415 +0100
+***************
+*** 263,275 ****
+ all the files it appears in.
+
+ :sign unplace *
+! Remove placed signs in the global group from all the files.
+
+ :sign unplace * group={group}
+! Remove placed signs in group {group} from all the files.
+
+ :sign unplace * group=*
+! Remove placed signs in all the groups from all the files.
+
+ :sign unplace
+ Remove a placed sign at the cursor position. If multiple signs
+--- 263,275 ----
+ all the files it appears in.
+
+ :sign unplace *
+! Remove all placed signs in the global group from all the files.
+
+ :sign unplace * group={group}
+! Remove all placed signs in group {group} from all the files.
+
+ :sign unplace * group=*
+! Remove all placed signs in all the groups from all the files.
+
+ :sign unplace
+ Remove a placed sign at the cursor position. If multiple signs
+***************
+*** 317,322 ****
+--- 317,324 ----
+
+ JUMPING TO A SIGN *:sign-jump* *E157*
+
++ See |sign_jump()| for the equivalent Vim script function.
++
+ :sign jump {id} file={fname}
+ Open the file {fname} or jump to the window that contains
+ {fname} and position the cursor at sign {id}.
+*** ../vim-8.1.0716/runtime/doc/usr_41.txt 2018-12-21 15:16:57.475579814 +0100
+--- runtime/doc/usr_41.txt 2019-01-11 13:27:08.166911415 +0100
+***************
+*** 977,982 ****
+--- 987,993 ----
+ sign_define() define or update a sign
+ sign_getdefined() get a list of defined signs
+ sign_getplaced() get a list of placed signs
++ sign_jump() jump to a sign
+ sign_place() place a sign
+ sign_undefine() undefine a sign
+ sign_unplace() unplace a sign
+*** ../vim-8.1.0716/src/evalfunc.c 2019-01-07 22:09:54.439460880 +0100
+--- src/evalfunc.c 2019-01-11 13:35:27.055355680 +0100
+***************
+*** 371,376 ****
+--- 371,377 ----
+ static void f_sign_define(typval_T *argvars, typval_T *rettv);
+ static void f_sign_getdefined(typval_T *argvars, typval_T *rettv);
+ static void f_sign_getplaced(typval_T *argvars, typval_T *rettv);
++ static void f_sign_jump(typval_T *argvars, typval_T *rettv);
+ static void f_sign_place(typval_T *argvars, typval_T *rettv);
+ static void f_sign_undefine(typval_T *argvars, typval_T *rettv);
+ static void f_sign_unplace(typval_T *argvars, typval_T *rettv);
+***************
+*** 858,863 ****
+--- 859,865 ----
+ {"sign_define", 1, 2, f_sign_define},
+ {"sign_getdefined", 0, 1, f_sign_getdefined},
+ {"sign_getplaced", 0, 2, f_sign_getplaced},
++ {"sign_jump", 3, 3, f_sign_jump},
+ {"sign_place", 4, 5, f_sign_place},
+ {"sign_undefine", 0, 1, f_sign_undefine},
+ {"sign_unplace", 1, 2, f_sign_unplace},
+***************
+*** 1918,1923 ****
+--- 1920,1942 ----
+ }
+
+ /*
++ * Get the buffer from "arg" and give an error and return NULL if it is not
++ * valid.
++ */
++ static buf_T *
++ get_buf_arg(typval_T *arg)
++ {
++ buf_T *buf;
++
++ ++emsg_off;
++ buf = tv_get_buf(arg, FALSE);
++ --emsg_off;
++ if (buf == NULL)
++ EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(arg));
++ return buf;
++ }
++
++ /*
+ * "bufname(expr)" function
+ */
+ static void
+***************
+*** 11366,11379 ****
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! // get signs placed in this buffer
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+- {
+- EMSG2(_("E158: Invalid buffer name: %s"),
+- tv_get_string(&argvars[0]));
+ return;
+- }
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+--- 11385,11394 ----
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! // get signs placed in the specified buffer
+! buf = get_buf_arg(&argvars[0]);
+ if (buf == NULL)
+ return;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+***************
+*** 11413,11418 ****
+--- 11428,11480 ----
+ }
+
+ /*
++ * "sign_jump()" function
++ */
++ static void
++ f_sign_jump(typval_T *argvars, typval_T *rettv)
++ {
++ int sign_id;
++ char_u *sign_group = NULL;
++ buf_T *buf;
++ int notanum = FALSE;
++
++ rettv->vval.v_number = -1;
++
++ // Sign identifer
++ sign_id = (int)tv_get_number_chk(&argvars[0], &notanum);
++ if (notanum)
++ return;
++ if (sign_id <= 0)
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ // Sign group
++ sign_group = tv_get_string_chk(&argvars[1]);
++ if (sign_group == NULL)
++ return;
++ if (sign_group[0] == '\0')
++ sign_group = NULL; // global sign group
++ else
++ {
++ sign_group = vim_strsave(sign_group);
++ if (sign_group == NULL)
++ return;
++ }
++
++ // Buffer to place the sign
++ buf = get_buf_arg(&argvars[2]);
++ if (buf == NULL)
++ goto cleanup;
++
++ rettv->vval.v_number = sign_jump(sign_id, sign_group, buf);
++
++ cleanup:
++ vim_free(sign_group);
++ }
++
++ /*
+ * "sign_place()" function
+ */
+ static void
+***************
+*** 11459,11470 ****
+ goto cleanup;
+
+ // Buffer to place the sign
+! buf = tv_get_buf(&argvars[3], FALSE);
+ if (buf == NULL)
+- {
+- EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(&argvars[3]));
+ goto cleanup;
+- }
+
+ if (argvars[4].v_type != VAR_UNKNOWN)
+ {
+--- 11521,11529 ----
+ goto cleanup;
+
+ // Buffer to place the sign
+! buf = get_buf_arg(&argvars[3]);
+ if (buf == NULL)
+ goto cleanup;
+
+ if (argvars[4].v_type != VAR_UNKNOWN)
+ {
+***************
+*** 11568,11580 ****
+
+ if ((di = dict_find(dict, (char_u *)"buffer", -1)) != NULL)
+ {
+! buf = tv_get_buf(&di->di_tv, FALSE);
+ if (buf == NULL)
+- {
+- EMSG2(_("E158: Invalid buffer name: %s"),
+- tv_get_string(&di->di_tv));
+ goto cleanup;
+- }
+ }
+ if (dict_find(dict, (char_u *)"id", -1) != NULL)
+ sign_id = dict_get_number(dict, (char_u *)"id");
+--- 11627,11635 ----
+
+ if ((di = dict_find(dict, (char_u *)"buffer", -1)) != NULL)
+ {
+! buf = get_buf_arg(&di->di_tv);
+ if (buf == NULL)
+ goto cleanup;
+ }
+ if (dict_find(dict, (char_u *)"id", -1) != NULL)
+ sign_id = dict_get_number(dict, (char_u *)"id");
+*** ../vim-8.1.0716/src/proto/sign.pro 2019-01-01 13:20:05.944711187 +0100
+--- src/proto/sign.pro 2019-01-11 13:27:08.170911387 +0100
+***************
+*** 11,16 ****
+--- 11,17 ----
+ int sign_define_by_name(char_u *name, char_u *icon, char_u *linehl, char_u *text, char_u *texthl);
+ int sign_undefine_by_name(char_u *name);
+ int sign_place(int *sign_id, char_u *sign_group, char_u *sign_name, buf_T *buf, linenr_T lnum, int prio);
++ linenr_T sign_jump(int sign_id, char_u *sign_group, buf_T *buf);
+ int sign_unplace(int sign_id, char_u *sign_group, buf_T *buf, linenr_T atlnum);
+ void ex_sign(exarg_T *eap);
+ void sign_getlist(char_u *name, list_T *retlist);
+*** ../vim-8.1.0716/src/sign.c 2019-01-09 21:47:26.352341721 +0100
+--- src/sign.c 2019-01-11 13:37:14.114593014 +0100
+***************
+*** 22,37 ****
+
+ struct sign
+ {
+! sign_T *sn_next; /* next sign in list */
+! int sn_typenr; /* type number of sign */
+! char_u *sn_name; /* name of sign */
+! char_u *sn_icon; /* name of pixmap */
+ # ifdef FEAT_SIGN_ICONS
+! void *sn_image; /* icon image */
+ # endif
+! char_u *sn_text; /* text used instead of pixmap */
+! int sn_line_hl; /* highlight ID for line */
+! int sn_text_hl; /* highlight ID for text */
+ };
+
+ static sign_T *first_sign = NULL;
+--- 22,37 ----
+
+ struct sign
+ {
+! sign_T *sn_next; // next sign in list
+! int sn_typenr; // type number of sign
+! char_u *sn_name; // name of sign
+! char_u *sn_icon; // name of pixmap
+ # ifdef FEAT_SIGN_ICONS
+! void *sn_image; // icon image
+ # endif
+! char_u *sn_text; // text used instead of pixmap
+! int sn_line_hl; // highlight ID for line
+! int sn_text_hl; // highlight ID for text
+ };
+
+ static sign_T *first_sign = NULL;
+***************
+*** 381,389 ****
+ buf_getsigntype(
+ buf_T *buf,
+ linenr_T lnum,
+! int type) /* SIGN_ICON, SIGN_TEXT, SIGN_ANY, SIGN_LINEHL */
+ {
+! signlist_T *sign; /* a sign in a b_signlist */
+
+ FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ if (sign->lnum == lnum
+--- 381,389 ----
+ buf_getsigntype(
+ buf_T *buf,
+ linenr_T lnum,
+! int type) // SIGN_ICON, SIGN_TEXT, SIGN_ANY, SIGN_LINEHL
+ {
+! signlist_T *sign; // a sign in a b_signlist
+
+ FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ if (sign->lnum == lnum
+***************
+*** 526,536 ****
+ */
+ int
+ buf_findsigntype_id(
+! buf_T *buf, /* buffer whose sign we are searching for */
+! linenr_T lnum, /* line number of sign */
+! int typenr) /* sign type number */
+ {
+! signlist_T *sign; /* a sign in the signlist */
+
+ FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ if (sign->lnum == lnum && sign->typenr == typenr)
+--- 526,536 ----
+ */
+ int
+ buf_findsigntype_id(
+! buf_T *buf, // buffer whose sign we are searching for
+! linenr_T lnum, // line number of sign
+! int typenr) // sign type number
+ {
+! signlist_T *sign; // a sign in the signlist
+
+ FOR_ALL_SIGNS_IN_BUF(buf, sign)
+ if (sign->lnum == lnum && sign->typenr == typenr)
+***************
+*** 656,662 ****
+ long amount,
+ long amount_after)
+ {
+! signlist_T *sign; /* a sign in a b_signlist */
+
+ FOR_ALL_SIGNS_IN_BUF(curbuf, sign)
+ {
+--- 656,662 ----
+ long amount,
+ long amount_after)
+ {
+! signlist_T *sign; // a sign in a b_signlist
+
+ FOR_ALL_SIGNS_IN_BUF(curbuf, sign)
+ {
+***************
+*** 678,685 ****
+ */
+ static int
+ sign_cmd_idx(
+! char_u *begin_cmd, /* begin of sign subcmd */
+! char_u *end_cmd) /* just after sign subcmd */
+ {
+ int idx;
+ char save = *end_cmd;
+--- 678,685 ----
+ */
+ static int
+ sign_cmd_idx(
+! char_u *begin_cmd, // begin of sign subcmd
+! char_u *end_cmd) // just after sign subcmd
+ {
+ int idx;
+ char save = *end_cmd;
+***************
+*** 984,991 ****
+ }
+
+ /*
+! * sign define command
+! * ":sign define {name} ..."
+ */
+ static void
+ sign_define_cmd(char_u *sign_name, char_u *cmdline)
+--- 984,1034 ----
+ }
+
+ /*
+! * Jump to a sign.
+! */
+! linenr_T
+! sign_jump(int sign_id, char_u *sign_group, buf_T *buf)
+! {
+! linenr_T lnum;
+!
+! if ((lnum = buf_findsign(buf, sign_id, sign_group)) <= 0)
+! {
+! EMSGN(_("E157: Invalid sign ID: %ld"), sign_id);
+! return -1;
+! }
+!
+! // goto a sign ...
+! if (buf_jump_open_win(buf) != NULL)
+! { // ... in a current window
+! curwin->w_cursor.lnum = lnum;
+! check_cursor_lnum();
+! beginline(BL_WHITE);
+! }
+! else
+! { // ... not currently in a window
+! char_u *cmd;
+!
+! if (buf->b_fname == NULL)
+! {
+! EMSG(_("E934: Cannot jump to a buffer that does not have a name"));
+! return -1;
+! }
+! cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
+! if (cmd == NULL)
+! return -1;
+! sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname);
+! do_cmdline_cmd(cmd);
+! vim_free(cmd);
+! }
+! # ifdef FEAT_FOLDING
+! foldOpenCursor();
+! # endif
+!
+! return lnum;
+! }
+!
+! /*
+! * ":sign define {name} ..." command
+ */
+ static void
+ sign_define_cmd(char_u *sign_name, char_u *cmdline)
+***************
+*** 1043,1049 ****
+ }
+
+ /*
+! * :sign place command
+ */
+ static void
+ sign_place_cmd(
+--- 1086,1092 ----
+ }
+
+ /*
+! * ":sign place" command
+ */
+ static void
+ sign_place_cmd(
+***************
+*** 1087,1093 ****
+ }
+
+ /*
+! * :sign unplace command
+ */
+ static void
+ sign_unplace_cmd(
+--- 1130,1136 ----
+ }
+
+ /*
+! * ":sign unplace" command
+ */
+ static void
+ sign_unplace_cmd(
+***************
+*** 1152,1158 ****
+ }
+
+ /*
+! * Jump to a placed sign
+ * :sign jump {id} file={fname}
+ * :sign jump {id} buffer={nr}
+ * :sign jump {id} group={group} file={fname}
+--- 1195,1201 ----
+ }
+
+ /*
+! * Jump to a placed sign commands:
+ * :sign jump {id} file={fname}
+ * :sign jump {id} buffer={nr}
+ * :sign jump {id} group={group} file={fname}
+***************
+*** 1180,1218 ****
+ EMSG(_(e_invarg));
+ return;
+ }
+!
+! if ((lnum = buf_findsign(buf, id, group)) <= 0)
+! {
+! EMSGN(_("E157: Invalid sign ID: %ld"), id);
+! return;
+! }
+!
+! // goto a sign ...
+! if (buf_jump_open_win(buf) != NULL)
+! { // ... in a current window
+! curwin->w_cursor.lnum = lnum;
+! check_cursor_lnum();
+! beginline(BL_WHITE);
+! }
+! else
+! { // ... not currently in a window
+! char_u *cmd;
+!
+! if (buf->b_fname == NULL)
+! {
+! EMSG(_("E934: Cannot jump to a buffer that does not have a name"));
+! return;
+! }
+! cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
+! if (cmd == NULL)
+! return;
+! sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname);
+! do_cmdline_cmd(cmd);
+! vim_free(cmd);
+! }
+! # ifdef FEAT_FOLDING
+! foldOpenCursor();
+! # endif
+ }
+
+ /*
+--- 1223,1229 ----
+ EMSG(_(e_invarg));
+ return;
+ }
+! (void)sign_jump(id, group, buf);
+ }
+
+ /*
+***************
+*** 1685,1691 ****
+ # if defined(FEAT_SIGN_ICONS) || defined(PROTO)
+ void *
+ sign_get_image(
+! int typenr) /* the attribute which may have a sign */
+ {
+ sign_T *sp;
+
+--- 1696,1702 ----
+ # if defined(FEAT_SIGN_ICONS) || defined(PROTO)
+ void *
+ sign_get_image(
+! int typenr) // the attribute which may have a sign
+ {
+ sign_T *sp;
+
+***************
+*** 1709,1719 ****
+ # if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ static enum
+ {
+! EXP_SUBCMD, /* expand :sign sub-commands */
+! EXP_DEFINE, /* expand :sign define {name} args */
+! EXP_PLACE, /* expand :sign place {id} args */
+! EXP_UNPLACE, /* expand :sign unplace" */
+! EXP_SIGN_NAMES /* expand with name of placed signs */
+ } expand_what;
+
+ /*
+--- 1720,1730 ----
+ # if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ static enum
+ {
+! EXP_SUBCMD, // expand :sign sub-commands
+! EXP_DEFINE, // expand :sign define {name} args
+! EXP_PLACE, // expand :sign place {id} args
+! EXP_UNPLACE, // expand :sign unplace"
+! EXP_SIGN_NAMES // expand with name of placed signs
+ } expand_what;
+
+ /*
+***************
+*** 1753,1759 ****
+ return (char_u *)unplace_arg[idx];
+ }
+ case EXP_SIGN_NAMES:
+! /* Complete with name of signs already defined */
+ current_idx = 0;
+ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+ if (current_idx++ == idx)
+--- 1764,1770 ----
+ return (char_u *)unplace_arg[idx];
+ }
+ case EXP_SIGN_NAMES:
+! // Complete with name of signs already defined
+ current_idx = 0;
+ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+ if (current_idx++ == idx)
+***************
+*** 1776,1813 ****
+ int cmd_idx;
+ char_u *begin_subcmd_args;
+
+! /* Default: expand subcommands. */
+ xp->xp_context = EXPAND_SIGN;
+ expand_what = EXP_SUBCMD;
+ xp->xp_pattern = arg;
+
+ end_subcmd = skiptowhite(arg);
+ if (*end_subcmd == NUL)
+! /* expand subcmd name
+! * :sign {subcmd}<CTRL-D>*/
+ return;
+
+ cmd_idx = sign_cmd_idx(arg, end_subcmd);
+
+! /* :sign {subcmd} {subcmd_args}
+! * |
+! * begin_subcmd_args */
+ begin_subcmd_args = skipwhite(end_subcmd);
+ p = skiptowhite(begin_subcmd_args);
+ if (*p == NUL)
+ {
+! /*
+! * Expand first argument of subcmd when possible.
+! * For ":jump {id}" and ":unplace {id}", we could
+! * possibly expand the ids of all signs already placed.
+! */
+ xp->xp_pattern = begin_subcmd_args;
+ switch (cmd_idx)
+ {
+ case SIGNCMD_LIST:
+ case SIGNCMD_UNDEFINE:
+! /* :sign list <CTRL-D>
+! * :sign undefine <CTRL-D> */
+ expand_what = EXP_SIGN_NAMES;
+ break;
+ default:
+--- 1787,1824 ----
+ int cmd_idx;
+ char_u *begin_subcmd_args;
+
+! // Default: expand subcommands.
+ xp->xp_context = EXPAND_SIGN;
+ expand_what = EXP_SUBCMD;
+ xp->xp_pattern = arg;
+
+ end_subcmd = skiptowhite(arg);
+ if (*end_subcmd == NUL)
+! // expand subcmd name
+! // :sign {subcmd}<CTRL-D>
+ return;
+
+ cmd_idx = sign_cmd_idx(arg, end_subcmd);
+
+! // :sign {subcmd} {subcmd_args}
+! // |
+! // begin_subcmd_args
+ begin_subcmd_args = skipwhite(end_subcmd);
+ p = skiptowhite(begin_subcmd_args);
+ if (*p == NUL)
+ {
+! //
+! // Expand first argument of subcmd when possible.
+! // For ":jump {id}" and ":unplace {id}", we could
+! // possibly expand the ids of all signs already placed.
+! //
+ xp->xp_pattern = begin_subcmd_args;
+ switch (cmd_idx)
+ {
+ case SIGNCMD_LIST:
+ case SIGNCMD_UNDEFINE:
+! // :sign list <CTRL-D>
+! // :sign undefine <CTRL-D>
+ expand_what = EXP_SIGN_NAMES;
+ break;
+ default:
+***************
+*** 1816,1828 ****
+ return;
+ }
+
+! /* expand last argument of subcmd */
+
+! /* :sign define {name} {args}...
+! * |
+! * p */
+
+! /* Loop until reaching last argument. */
+ do
+ {
+ p = skipwhite(p);
+--- 1827,1839 ----
+ return;
+ }
+
+! // expand last argument of subcmd
+
+! // :sign define {name} {args}...
+! // |
+! // p
+
+! // Loop until reaching last argument.
+ do
+ {
+ p = skipwhite(p);
+***************
+*** 1832,1843 ****
+
+ p = vim_strchr(last, '=');
+
+! /* :sign define {name} {args}... {last}=
+! * | |
+! * last p */
+ if (p == NULL)
+ {
+! /* Expand last argument name (before equal sign). */
+ xp->xp_pattern = last;
+ switch (cmd_idx)
+ {
+--- 1843,1854 ----
+
+ p = vim_strchr(last, '=');
+
+! // :sign define {name} {args}... {last}=
+! // | |
+! // last p
+ if (p == NULL)
+ {
+! // Expand last argument name (before equal sign).
+ xp->xp_pattern = last;
+ switch (cmd_idx)
+ {
+***************
+*** 1857,1863 ****
+ }
+ else
+ {
+! /* Expand last argument value (after equal sign). */
+ xp->xp_pattern = p + 1;
+ switch (cmd_idx)
+ {
+--- 1868,1874 ----
+ }
+ else
+ {
+! // Expand last argument value (after equal sign).
+ xp->xp_pattern = p + 1;
+ switch (cmd_idx)
+ {
+*** ../vim-8.1.0716/src/testdir/test_signs.vim 2019-01-07 22:09:54.439460880 +0100
+--- src/testdir/test_signs.vim 2019-01-11 13:27:08.170911387 +0100
+***************
+*** 1255,1257 ****
+--- 1255,1302 ----
+ sign undefine sign2
+ enew!
+ endfunc
++
++ " Test for the sign_jump() function
++ func Test_sign_jump_func()
++ enew! | only!
++
++ sign define sign1 text=#> linehl=Comment
++
++ edit foo
++ set buftype=nofile
++ call setline(1, ['A', 'B', 'C', 'D', 'E'])
++ call sign_place(5, '', 'sign1', '', {'lnum' : 2})
++ call sign_place(5, 'g1', 'sign1', '', {'lnum' : 3})
++ call sign_place(6, '', 'sign1', '', {'lnum' : 4})
++ call sign_place(6, 'g1', 'sign1', '', {'lnum' : 5})
++ split bar
++ set buftype=nofile
++ call setline(1, ['P', 'Q', 'R', 'S', 'T'])
++ call sign_place(5, '', 'sign1', '', {'lnum' : 2})
++ call sign_place(5, 'g1', 'sign1', '', {'lnum' : 3})
++ call sign_place(6, '', 'sign1', '', {'lnum' : 4})
++ call sign_place(6, 'g1', 'sign1', '', {'lnum' : 5})
++
++ let r = sign_jump(5, '', 'foo')
++ call assert_equal(2, r)
++ call assert_equal(2, line('.'))
++ let r = sign_jump(6, 'g1', 'foo')
++ call assert_equal(5, r)
++ call assert_equal(5, line('.'))
++ let r = sign_jump(5, '', 'bar')
++ call assert_equal(2, r)
++ call assert_equal(2, line('.'))
++
++ " Error cases
++ call assert_fails("call sign_jump(99, '', 'bar')", 'E157:')
++ call assert_fails("call sign_jump(0, '', 'foo')", 'E474:')
++ call assert_fails("call sign_jump(5, 'g5', 'foo')", 'E157:')
++ call assert_fails('call sign_jump([], "", "foo")', 'E745:')
++ call assert_fails('call sign_jump(2, [], "foo")', 'E730:')
++ call assert_fails('call sign_jump(2, "", {})', 'E158:')
++ call assert_fails('call sign_jump(2, "", "baz")', 'E158:')
++
++ sign unplace * group=*
++ sign undefine sign1
++ enew! | only!
++ endfunc
+*** ../vim-8.1.0716/src/version.c 2019-01-11 13:02:20.105567884 +0100
+--- src/version.c 2019-01-11 13:28:07.266489981 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 717,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+155. You forget to eat because you're too busy surfing the net.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0718 b/data/vim/patches/8.1.0718
new file mode 100644
index 000000000..7332e7793
--- /dev/null
+++ b/data/vim/patches/8.1.0718
@@ -0,0 +1,95 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0718
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0718
+Problem: A couple compiler warnings.
+Solution: Rename shadowed variables. Add UNUSED.
+Files: src/misc1.c
+
+
+*** ../vim-8.1.0717/src/misc1.c 2019-01-08 23:07:21.305386078 +0100
+--- src/misc1.c 2019-01-11 13:59:45.785088325 +0100
+***************
+*** 2402,2408 ****
+ colnr_T vcol;
+ int old_list;
+ #ifndef FEAT_MBYTE
+! char_u buf[2];
+ #endif
+
+ /*
+--- 2402,2408 ----
+ colnr_T vcol;
+ int old_list;
+ #ifndef FEAT_MBYTE
+! char_u cbuf[2];
+ #endif
+
+ /*
+***************
+*** 2422,2431 ****
+ */
+ getvcol(curwin, &curwin->w_cursor, NULL, &vcol, NULL);
+ #ifndef FEAT_MBYTE
+! buf[0] = c;
+! buf[1] = NUL;
+! #endif
+ new_vcol = vcol + chartabsize(buf, vcol);
+ while (oldp[col + oldlen] != NUL && vcol < new_vcol)
+ {
+ vcol += chartabsize(oldp + col + oldlen, vcol);
+--- 2422,2433 ----
+ */
+ getvcol(curwin, &curwin->w_cursor, NULL, &vcol, NULL);
+ #ifndef FEAT_MBYTE
+! cbuf[0] = c;
+! cbuf[1] = NUL;
+! new_vcol = vcol + chartabsize(cbuf, vcol);
+! #else
+ new_vcol = vcol + chartabsize(buf, vcol);
++ #endif
+ while (oldp[col + oldlen] != NUL && vcol < new_vcol)
+ {
+ vcol += chartabsize(oldp + col + oldlen, vcol);
+***************
+*** 3025,3031 ****
+ * When "added" is negative text was deleted.
+ */
+ void
+! inserted_bytes(linenr_T lnum, colnr_T col, int added)
+ {
+ changed_bytes(lnum, col);
+
+--- 3027,3033 ----
+ * When "added" is negative text was deleted.
+ */
+ void
+! inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED)
+ {
+ changed_bytes(lnum, col);
+
+*** ../vim-8.1.0717/src/version.c 2019-01-11 13:42:31.680331155 +0100
+--- src/version.c 2019-01-11 14:09:42.388876776 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 718,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+157. You fum through a magazine, you first check to see if it has a web
+ 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.0719 b/data/vim/patches/8.1.0719
new file mode 100644
index 000000000..2debaec80
--- /dev/null
+++ b/data/vim/patches/8.1.0719
@@ -0,0 +1,632 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0719
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0719
+Problem: Too many #ifdefs.
+Solution: Always build with the +visualextra feature.
+Files: src/evalfunc.c, src/version.c, src/normal.c, src/ops.c,
+ src/feature.h, runtime/doc/various.txt
+
+
+*** ../vim-8.1.0718/src/evalfunc.c 2019-01-11 13:42:31.680331155 +0100
+--- src/evalfunc.c 2019-01-11 14:13:58.623063385 +0100
+***************
+*** 6533,6541 ****
+ "virtualedit",
+ #endif
+ "visual",
+- #ifdef FEAT_VISUALEXTRA
+ "visualextra",
+- #endif
+ "vreplace",
+ #ifdef FEAT_VTP
+ "vtp",
+--- 6533,6539 ----
+*** ../vim-8.1.0718/src/version.c 2019-01-11 14:10:00.348749729 +0100
+--- src/version.c 2019-01-11 14:23:42.578954675 +0100
+***************
+*** 709,719 ****
+ "-virtualedit",
+ #endif
+ "+visual",
+- #ifdef FEAT_VISUALEXTRA
+ "+visualextra",
+- #else
+- "-visualextra",
+- #endif
+ #ifdef FEAT_VIMINFO
+ "+viminfo",
+ #else
+--- 709,715 ----
+*** ../vim-8.1.0718/src/normal.c 2019-01-03 22:57:59.540478092 +0100
+--- src/normal.c 2019-01-11 14:14:52.426682428 +0100
+***************
+*** 1998,2004 ****
+ case OP_INSERT:
+ case OP_APPEND:
+ VIsual_reselect = FALSE; /* don't reselect now */
+- #ifdef FEAT_VISUALEXTRA
+ if (empty_region_error)
+ {
+ vim_beep(BO_OPER);
+--- 1998,2003 ----
+***************
+*** 2035,2058 ****
+ else
+ cap->retval |= CA_COMMAND_BUSY;
+ }
+- #else
+- vim_beep(BO_OPER);
+- #endif
+ break;
+
+ case OP_REPLACE:
+ VIsual_reselect = FALSE; /* don't reselect now */
+- #ifdef FEAT_VISUALEXTRA
+ if (empty_region_error)
+- #endif
+ {
+ vim_beep(BO_OPER);
+ CancelRedo();
+ }
+- #ifdef FEAT_VISUALEXTRA
+ else
+ {
+! # ifdef FEAT_LINEBREAK
+ /* Restore linebreak, so that when the user edits it looks as
+ * before. */
+ if (curwin->w_p_lbr != lbr_saved)
+--- 2034,2051 ----
+ else
+ cap->retval |= CA_COMMAND_BUSY;
+ }
+ break;
+
+ case OP_REPLACE:
+ VIsual_reselect = FALSE; /* don't reselect now */
+ if (empty_region_error)
+ {
+ vim_beep(BO_OPER);
+ CancelRedo();
+ }
+ else
+ {
+! #ifdef FEAT_LINEBREAK
+ /* Restore linebreak, so that when the user edits it looks as
+ * before. */
+ if (curwin->w_p_lbr != lbr_saved)
+***************
+*** 2060,2069 ****
+ curwin->w_p_lbr = lbr_saved;
+ get_op_vcol(oap, redo_VIsual_mode, FALSE);
+ }
+! # endif
+ op_replace(oap, cap->nchar);
+ }
+- #endif
+ break;
+
+ #ifdef FEAT_FOLDING
+--- 2053,2061 ----
+ curwin->w_p_lbr = lbr_saved;
+ get_op_vcol(oap, redo_VIsual_mode, FALSE);
+ }
+! #endif
+ op_replace(oap, cap->nchar);
+ }
+ break;
+
+ #ifdef FEAT_FOLDING
+*** ../vim-8.1.0718/src/ops.c 2018-12-31 23:58:20.246887218 +0100
+--- src/ops.c 2019-01-11 14:21:13.747985991 +0100
+***************
+*** 82,101 ****
+ colnr_T textcol; /* index of chars (partially) in block */
+ colnr_T start_vcol; /* start col of 1st char wholly inside block */
+ colnr_T end_vcol; /* start col of 1st char wholly after block */
+- #ifdef FEAT_VISUALEXTRA
+ int is_short; /* TRUE if line is too short to fit in block */
+ int is_MAX; /* TRUE if curswant==MAXCOL when starting */
+ int is_oneChar; /* TRUE if block within one character */
+ int pre_whitesp; /* screen cols of ws before block */
+ int pre_whitesp_c; /* chars of ws before block */
+ colnr_T end_char_vcols; /* number of vcols of post-block char */
+- #endif
+ colnr_T start_char_vcols; /* number of vcols of pre-block char */
+ };
+
+- #ifdef FEAT_VISUALEXTRA
+ static void shift_block(oparg_T *oap, int amount);
+- #endif
+ static int stuff_yank(int, char_u *);
+ static void put_reedit_in_typebuf(int silent);
+ static int put_in_typebuf(char_u *s, int esc, int colon,
+--- 82,97 ----
+***************
+*** 255,264 ****
+ first_char = *ml_get_curline();
+ if (first_char == NUL) /* empty line */
+ curwin->w_cursor.col = 0;
+- #ifdef FEAT_VISUALEXTRA
+ else if (oap->block_mode)
+ shift_block(oap, amount);
+- #endif
+ else
+ /* Move the line right if it doesn't start with '#', 'smartindent'
+ * isn't set or 'cindent' isn't set or '#' isn't in 'cino'. */
+--- 251,258 ----
+***************
+*** 322,329 ****
+ }
+
+ /*
+! * shift the current line one shiftwidth left (if left != 0) or right
+! * leaves cursor on first blank in the line
+ */
+ void
+ shift_line(
+--- 316,323 ----
+ }
+
+ /*
+! * Shift the current line one shiftwidth left (if left != 0) or right
+! * leaves cursor on first blank in the line.
+ */
+ void
+ shift_line(
+***************
+*** 373,379 ****
+ (void)set_indent(count, call_changed_bytes ? SIN_CHANGED : 0);
+ }
+
+- #if defined(FEAT_VISUALEXTRA) || defined(PROTO)
+ /*
+ * Shift one line of the current block one shiftwidth right or left.
+ * Leaves cursor on first character in block.
+--- 367,372 ----
+***************
+*** 577,585 ****
+ p_ri = old_p_ri;
+ #endif
+ }
+- #endif
+
+- #ifdef FEAT_VISUALEXTRA
+ /*
+ * Insert string "s" (b_insert ? before : after) block :AKelly
+ * Caller must prepare for undo.
+--- 570,576 ----
+***************
+*** 703,709 ****
+
+ State = oldstate;
+ }
+- #endif
+
+ #if defined(FEAT_LISP) || defined(FEAT_CINDENT) || defined(PROTO)
+ /*
+--- 694,699 ----
+***************
+*** 2132,2140 ****
+ }
+ #endif
+
+- #if defined(FEAT_VISUALEXTRA) || defined(PROTO)
+
+! # ifdef FEAT_MBYTE
+ /*
+ * Replace the character under the cursor with "c".
+ * This takes care of multi-byte characters.
+--- 2122,2129 ----
+ }
+ #endif
+
+
+! #ifdef FEAT_MBYTE
+ /*
+ * Replace the character under the cursor with "c".
+ * This takes care of multi-byte characters.
+***************
+*** 2150,2157 ****
+ /* Backup to the replaced character. */
+ dec_cursor();
+ }
+
+- # endif
+ /*
+ * Replace a whole area with one character.
+ */
+--- 2139,2146 ----
+ /* Backup to the replaced character. */
+ dec_cursor();
+ }
++ #endif
+
+ /*
+ * Replace a whole area with one character.
+ */
+***************
+*** 2378,2388 ****
+ curwin->w_cursor.col -= (virtcols + 1);
+ for (; virtcols >= 0; virtcols--)
+ {
+! #ifdef FEAT_MBYTE
+ if ((*mb_char2len)(c) > 1)
+ replace_character(c);
+ else
+! #endif
+ PBYTE(curwin->w_cursor, c);
+ if (inc(&curwin->w_cursor) == -1)
+ break;
+--- 2367,2377 ----
+ curwin->w_cursor.col -= (virtcols + 1);
+ for (; virtcols >= 0; virtcols--)
+ {
+! # ifdef FEAT_MBYTE
+ if ((*mb_char2len)(c) > 1)
+ replace_character(c);
+ else
+! # endif
+ PBYTE(curwin->w_cursor, c);
+ if (inc(&curwin->w_cursor) == -1)
+ break;
+***************
+*** 2406,2412 ****
+
+ return OK;
+ }
+- #endif
+
+ static int swapchars(int op_type, pos_T *pos, int length);
+
+--- 2395,2400 ----
+***************
+*** 2627,2633 ****
+ return FALSE;
+ }
+
+- #if defined(FEAT_VISUALEXTRA) || defined(PROTO)
+ /*
+ * op_insert - Insert and append operators for Visual mode.
+ */
+--- 2615,2620 ----
+***************
+*** 2844,2850 ****
+ }
+ }
+ }
+- #endif
+
+ /*
+ * op_change - handle a change operation
+--- 2831,2836 ----
+***************
+*** 2856,2862 ****
+ {
+ colnr_T l;
+ int retval;
+- #ifdef FEAT_VISUALEXTRA
+ long offset;
+ linenr_T linenr;
+ long ins_len;
+--- 2842,2847 ----
+***************
+*** 2865,2871 ****
+ char_u *firstline;
+ char_u *ins_text, *newp, *oldp;
+ struct block_def bd;
+- #endif
+
+ l = oap->start.col;
+ if (oap->motion_type == MLINE)
+--- 2850,2855 ----
+***************
+*** 2895,2917 ****
+ && !virtual_op)
+ inc_cursor();
+
+- #ifdef FEAT_VISUALEXTRA
+ /* check for still on same line (<CR> in inserted text meaningless) */
+ /* skip blank lines too */
+ if (oap->block_mode)
+ {
+! # ifdef FEAT_VIRTUALEDIT
+ /* Add spaces before getting the current line length. */
+ if (virtual_op && (curwin->w_cursor.coladd > 0
+ || gchar_cursor() == NUL))
+ coladvance_force(getviscol());
+! # endif
+ firstline = ml_get(oap->start.lnum);
+ pre_textlen = (long)STRLEN(firstline);
+ pre_indent = (long)getwhitecols(firstline);
+ bd.textcol = curwin->w_cursor.col;
+ }
+- #endif
+
+ #if defined(FEAT_LISP) || defined(FEAT_CINDENT)
+ if (oap->motion_type == MLINE)
+--- 2879,2899 ----
+ && !virtual_op)
+ inc_cursor();
+
+ /* check for still on same line (<CR> in inserted text meaningless) */
+ /* skip blank lines too */
+ if (oap->block_mode)
+ {
+! #ifdef FEAT_VIRTUALEDIT
+ /* Add spaces before getting the current line length. */
+ if (virtual_op && (curwin->w_cursor.coladd > 0
+ || gchar_cursor() == NUL))
+ coladvance_force(getviscol());
+! #endif
+ firstline = ml_get(oap->start.lnum);
+ pre_textlen = (long)STRLEN(firstline);
+ pre_indent = (long)getwhitecols(firstline);
+ bd.textcol = curwin->w_cursor.col;
+ }
+
+ #if defined(FEAT_LISP) || defined(FEAT_CINDENT)
+ if (oap->motion_type == MLINE)
+***************
+*** 2920,2926 ****
+
+ retval = edit(NUL, FALSE, (linenr_T)1);
+
+- #ifdef FEAT_VISUALEXTRA
+ /*
+ * In Visual block mode, handle copying the new text to all lines of the
+ * block.
+--- 2902,2907 ----
+***************
+*** 2953,2959 ****
+ block_prep(oap, &bd, linenr, TRUE);
+ if (!bd.is_short || virtual_op)
+ {
+! # ifdef FEAT_VIRTUALEDIT
+ pos_T vpos;
+
+ /* If the block starts in virtual space, count the
+--- 2934,2940 ----
+ block_prep(oap, &bd, linenr, TRUE);
+ if (!bd.is_short || virtual_op)
+ {
+! #ifdef FEAT_VIRTUALEDIT
+ pos_T vpos;
+
+ /* If the block starts in virtual space, count the
+***************
+*** 2965,2986 ****
+ }
+ else
+ vpos.coladd = 0;
+! # endif
+ oldp = ml_get(linenr);
+ newp = alloc_check((unsigned)(STRLEN(oldp)
+! # ifdef FEAT_VIRTUALEDIT
+ + vpos.coladd
+! # endif
+ + ins_len + 1));
+ if (newp == NULL)
+ continue;
+ /* copy up to block start */
+ mch_memmove(newp, oldp, (size_t)bd.textcol);
+ offset = bd.textcol;
+! # ifdef FEAT_VIRTUALEDIT
+ vim_memset(newp + offset, ' ', (size_t)vpos.coladd);
+ offset += vpos.coladd;
+! # endif
+ mch_memmove(newp + offset, ins_text, (size_t)ins_len);
+ offset += ins_len;
+ oldp += bd.textcol;
+--- 2946,2967 ----
+ }
+ else
+ vpos.coladd = 0;
+! #endif
+ oldp = ml_get(linenr);
+ newp = alloc_check((unsigned)(STRLEN(oldp)
+! #ifdef FEAT_VIRTUALEDIT
+ + vpos.coladd
+! #endif
+ + ins_len + 1));
+ if (newp == NULL)
+ continue;
+ /* copy up to block start */
+ mch_memmove(newp, oldp, (size_t)bd.textcol);
+ offset = bd.textcol;
+! #ifdef FEAT_VIRTUALEDIT
+ vim_memset(newp + offset, ' ', (size_t)vpos.coladd);
+ offset += vpos.coladd;
+! #endif
+ mch_memmove(newp + offset, ins_text, (size_t)ins_len);
+ offset += ins_len;
+ oldp += bd.textcol;
+***************
+*** 2995,3001 ****
+ vim_free(ins_text);
+ }
+ }
+- #endif
+
+ return retval;
+ }
+--- 2976,2981 ----
+***************
+*** 5415,5427 ****
+ bdp->textlen = 0;
+ bdp->start_vcol = 0;
+ bdp->end_vcol = 0;
+- #ifdef FEAT_VISUALEXTRA
+ bdp->is_short = FALSE;
+ bdp->is_oneChar = FALSE;
+ bdp->pre_whitesp = 0;
+ bdp->pre_whitesp_c = 0;
+ bdp->end_char_vcols = 0;
+- #endif
+ bdp->start_char_vcols = 0;
+
+ line = ml_get(lnum);
+--- 5395,5405 ----
+***************
+*** 5432,5438 ****
+ /* Count a tab for what it's worth (if list mode not on) */
+ incr = lbr_chartabsize(line, pstart, (colnr_T)bdp->start_vcol);
+ bdp->start_vcol += incr;
+- #ifdef FEAT_VISUALEXTRA
+ if (VIM_ISWHITE(*pstart))
+ {
+ bdp->pre_whitesp += incr;
+--- 5410,5415 ----
+***************
+*** 5443,5449 ****
+ bdp->pre_whitesp = 0;
+ bdp->pre_whitesp_c = 0;
+ }
+- #endif
+ prev_pstart = pstart;
+ MB_PTR_ADV(pstart);
+ }
+--- 5420,5425 ----
+***************
+*** 5451,5459 ****
+ if (bdp->start_vcol < oap->start_vcol) /* line too short */
+ {
+ bdp->end_vcol = bdp->start_vcol;
+- #ifdef FEAT_VISUALEXTRA
+ bdp->is_short = TRUE;
+- #endif
+ if (!is_del || oap->op_type == OP_APPEND)
+ bdp->endspaces = oap->end_vcol - oap->start_vcol + 1;
+ }
+--- 5427,5433 ----
+***************
+*** 5468,5476 ****
+ bdp->end_vcol = bdp->start_vcol;
+ if (bdp->end_vcol > oap->end_vcol) /* it's all in one character */
+ {
+- #ifdef FEAT_VISUALEXTRA
+ bdp->is_oneChar = TRUE;
+- #endif
+ if (oap->op_type == OP_INSERT)
+ bdp->endspaces = bdp->start_char_vcols - bdp->startspaces;
+ else if (oap->op_type == OP_APPEND)
+--- 5442,5448 ----
+***************
+*** 5507,5515 ****
+ || oap->op_type == OP_APPEND
+ || oap->op_type == OP_REPLACE)) /* line too short */
+ {
+- #ifdef FEAT_VISUALEXTRA
+ bdp->is_short = TRUE;
+- #endif
+ /* Alternative: include spaces to fill up the block.
+ * Disadvantage: can lead to trailing spaces when the line is
+ * short where the text is put */
+--- 5479,5485 ----
+***************
+*** 5531,5539 ****
+ }
+ }
+ }
+- #ifdef FEAT_VISUALEXTRA
+ bdp->end_char_vcols = incr;
+- #endif
+ if (is_del && bdp->startspaces)
+ pstart = prev_pstart;
+ bdp->textlen = (int)(pend - pstart);
+--- 5501,5507 ----
+***************
+*** 6624,6630 ****
+ }
+
+ /*
+! * Get the selected text and put it in the gui selection register '*' or '+'.
+ */
+ void
+ clip_get_selection(VimClipboard *cbd)
+--- 6592,6598 ----
+ }
+
+ /*
+! * Get the selected text and put it in register '*' or '+'.
+ */
+ void
+ clip_get_selection(VimClipboard *cbd)
+*** ../vim-8.1.0718/src/feature.h 2018-12-21 11:48:48.320680492 +0100
+--- src/feature.h 2019-01-11 14:24:15.922722850 +0100
+***************
+*** 194,203 ****
+ /*
+ * +visual Visual mode - now always included.
+ * +visualextra Extra features for Visual mode (mostly block operators).
+ */
+- #ifdef FEAT_NORMAL
+- # define FEAT_VISUALEXTRA
+- #endif
+
+ /*
+ * +virtualedit 'virtualedit' option and its implementation
+--- 194,201 ----
+ /*
+ * +visual Visual mode - now always included.
+ * +visualextra Extra features for Visual mode (mostly block operators).
++ * Now always included.
+ */
+
+ /*
+ * +virtualedit 'virtualedit' option and its implementation
+*** ../vim-8.1.0718/runtime/doc/various.txt 2019-01-08 22:02:36.040297337 +0100
+--- runtime/doc/various.txt 2019-01-11 14:23:23.643086212 +0100
+***************
+*** 465,477 ****
+ since 8.0.1118.
+ in sync with the |+windows| feature
+ 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'|
+! *+windows* more than one window; Always enabled since 8.0.1118.
+ m *+writebackup* |'writebackup'| is default on
+ m *+xim* X input method |xim|
+ *+xfontset* X fontset support |xfontset|
+--- 465,477 ----
+ since 8.0.1118.
+ in sync with the |+windows| feature
+ N *+virtualedit* |'virtualedit'|
+! T *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200.
+! T *+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'|
+! T *+windows* more than one window; Always enabled since 8.0.1118.
+ m *+writebackup* |'writebackup'| is default on
+ m *+xim* X input method |xim|
+ *+xfontset* X fontset support |xfontset|
+*** ../vim-8.1.0718/src/version.c 2019-01-11 14:10:00.348749729 +0100
+--- src/version.c 2019-01-11 14:23:42.578954675 +0100
+***************
+*** 801,802 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 719,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+158. You get a tuner card so you can watch TV while surfing.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0720 b/data/vim/patches/8.1.0720
new file mode 100644
index 000000000..dae2d975d
--- /dev/null
+++ b/data/vim/patches/8.1.0720
@@ -0,0 +1,499 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0720
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0720
+Problem: Cannot easily change the current quickfx list index.
+Solution: Add the "idx" argument to setqflist(). (Yegappan Lakshmanan,
+ closes #3701)
+Files: runtime/doc/eval.txt, runtime/doc/quickfix.txt, src/quickfix.c,
+ src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0719/runtime/doc/eval.txt 2019-01-11 13:42:31.676331183 +0100
+--- runtime/doc/eval.txt 2019-01-11 14:44:08.978341403 +0100
+***************
+*** 4862,4868 ****
+ id get information for the quickfix list with
+ |quickfix-ID|; zero means the id for the
+ current list or the list specified by "nr"
+! idx index of the current entry in the list
+ items quickfix list entries
+ lines parse a list of lines using 'efm' and return
+ the resulting entries. Only a |List| type is
+--- 4885,4893 ----
+ id get information for the quickfix list with
+ |quickfix-ID|; zero means the id for the
+ current list or the list specified by "nr"
+! idx index of the current entry in the quickfix
+! list specified by 'id' or 'nr'.
+! See |quickfix-index|
+ items quickfix list entries
+ lines parse a list of lines using 'efm' and return
+ the resulting entries. Only a |List| type is
+***************
+*** 5032,5039 ****
+ Each List item is a Dictionary with the following entries:
+ bufnr number of buffer in the window
+ height window height (excluding winbar)
+- winbar 1 if the window has a toolbar, 0
+- otherwise
+ loclist 1 if showing a location list
+ {only with the +quickfix feature}
+ quickfix 1 if quickfix or location list window
+--- 5057,5062 ----
+***************
+*** 5044,5049 ****
+--- 5067,5074 ----
+ variables a reference to the dictionary with
+ window-local variables
+ width window width
++ winbar 1 if the window has a toolbar, 0
++ otherwise
+ wincol leftmost screen column of the window,
+ col from |win_screenpos()|
+ winid |window-ID|
+***************
+*** 7675,7690 ****
+ efm errorformat to use when parsing text from
+ "lines". If this is not present, then the
+ 'errorformat' option value is used.
+ id quickfix list identifier |quickfix-ID|
+ items list of quickfix entries. Same as the {list}
+ argument.
+ lines use 'errorformat' to parse a list of lines and
+ add the resulting entries to the quickfix list
+ {nr} or {id}. Only a |List| value is supported.
+ nr list number in the quickfix stack; zero
+ means the current quickfix list and "$" means
+! the last quickfix list
+! title quickfix list title text
+ Unsupported keys in {what} are ignored.
+ If the "nr" item is not present, then the current quickfix list
+ is modified. When creating a new quickfix list, "nr" can be
+--- 7703,7724 ----
+ efm errorformat to use when parsing text from
+ "lines". If this is not present, then the
+ 'errorformat' option value is used.
++ See |quickfix-parse|
+ id quickfix list identifier |quickfix-ID|
++ idx index of the current entry in the quickfix
++ list specified by 'id' or 'nr'. If set to '$',
++ then the last entry in the list is set as the
++ current entry. See |quickfix-index|
+ items list of quickfix entries. Same as the {list}
+ argument.
+ lines use 'errorformat' to parse a list of lines and
+ add the resulting entries to the quickfix list
+ {nr} or {id}. Only a |List| value is supported.
++ See |quickfix-parse|
+ nr list number in the quickfix stack; zero
+ means the current quickfix list and "$" means
+! the last quickfix list.
+! title quickfix list title text. See |quickfix-title|
+ Unsupported keys in {what} are ignored.
+ If the "nr" item is not present, then the current quickfix list
+ is modified. When creating a new quickfix list, "nr" can be
+*** ../vim-8.1.0719/runtime/doc/quickfix.txt 2018-08-21 19:22:00.366591999 +0200
+--- runtime/doc/quickfix.txt 2019-01-11 14:44:08.978341403 +0100
+***************
+*** 46,52 ****
+
+ *quickfix-ID*
+ Each quickfix list has a unique identifier called the quickfix ID and this
+! number will not change within a Vim session. The getqflist() function can be
+ used to get the identifier assigned to a list. There is also a quickfix list
+ number which may change whenever more than ten lists are added to a quickfix
+ stack.
+--- 46,52 ----
+
+ *quickfix-ID*
+ Each quickfix list has a unique identifier called the quickfix ID and this
+! number will not change within a Vim session. The |getqflist()| function can be
+ used to get the identifier assigned to a list. There is also a quickfix list
+ number which may change whenever more than ten lists are added to a quickfix
+ stack.
+***************
+*** 56,61 ****
+--- 56,62 ----
+ like `:lvimgrep`, `:lgrep`, `:lhelpgrep`, `:lmake`, etc., which create a
+ location list instead of a quickfix list as the corresponding `:vimgrep`,
+ `:grep`, `:helpgrep`, `:make` do.
++ *location-list-file-window*
+ A location list is associated with a window and each window can have a
+ separate location list. A location list can be associated with only one
+ window. The location list is independent of the quickfix list.
+***************
+*** 68,74 ****
+ Every quickfix and location list has a read-only changedtick variable that
+ tracks the total number of changes made to the list. Every time the quickfix
+ list is modified, this count is incremented. This can be used to perform an
+! action only when the list has changed. The getqflist() and getloclist()
+ functions can be used to query the current value of changedtick. You cannot
+ change the changedtick variable.
+
+--- 69,75 ----
+ Every quickfix and location list has a read-only changedtick variable that
+ tracks the total number of changes made to the list. Every time the quickfix
+ list is modified, this count is incremented. This can be used to perform an
+! action only when the list has changed. The |getqflist()| and |getloclist()|
+ functions can be used to query the current value of changedtick. You cannot
+ change the changedtick variable.
+
+***************
+*** 364,369 ****
+--- 365,387 ----
+ call setloclist(3, [], 'a', {'title' : 'Cmd output'})
+ echo getloclist(3, {'title' : 1})
+ <
++ *quickfix-index*
++ When you jump to a quickfix/location list entry using any of the quickfix
++ commands (e.g. |cc|, |cnext|, |cprev|, etc.), that entry becomes the currently
++ selected entry. The index of the currently selected entry in a
++ quickfix/location list can be obtained using the getqflist()/getloclist()
++ functions. Examples: >
++ echo getqflist({'idx' : 0}).idx
++ echo getqflist({'id' : qfid, 'idx' : 0}).idx
++ echo getloclist(2, {'idx' : 0}).idx
++ <
++ For a new quickfix list, the first entry is selected and the index is 1. Any
++ entry in any quickfix/location list can be set as the currently selected entry
++ using the setqflist() function. Examples: >
++ call setqflist([], 'a', {'idx' : 12})
++ call setqflist([], 'a', {'id' : qfid, 'idx' : 7})
++ call setloclist(1, [], 'a', {'idx' : 7})
++ <
+ *quickfix-size*
+ You can get the number of entries (size) in a quickfix and a location list
+ using the |getqflist()| and |getloclist()| functions respectively. Examples: >
+***************
+*** 602,608 ****
+ echo getloclist(2, {'winid' : 1}).winid
+ <
+ *getqflist-examples*
+! The getqflist() and getloclist() functions can be used to get the various
+ attributes of a quickfix and location list respectively. Some examples for
+ using these functions are below:
+ >
+--- 620,626 ----
+ echo getloclist(2, {'winid' : 1}).winid
+ <
+ *getqflist-examples*
+! The |getqflist()| and |getloclist()| functions can be used to get the various
+ attributes of a quickfix and location list respectively. Some examples for
+ using these functions are below:
+ >
+***************
+*** 657,665 ****
+
+ " get the location list window id of the third window
+ :echo getloclist(3, {'winid' : 0}).winid
+ <
+ *setqflist-examples*
+! The setqflist() and setloclist() functions can be used to set the various
+ attributes of a quickfix and location list respectively. Some examples for
+ using these functions are below:
+ >
+--- 675,686 ----
+
+ " get the location list window id of the third window
+ :echo getloclist(3, {'winid' : 0}).winid
++
++ " get the file window id of a location list window (winnr: 4)
++ :echo getloclist(4, {'filewinid' : 0}).filewinid
+ <
+ *setqflist-examples*
+! The |setqflist()| and |setloclist()| functions can be used to set the various
+ attributes of a quickfix and location list respectively. Some examples for
+ using these functions are below:
+ >
+***************
+*** 671,676 ****
+--- 692,700 ----
+ " set the title of the current quickfix list
+ :call setqflist([], 'a', {'title' : 'Mytitle'})
+
++ " change the current entry in the list specified by an identifier
++ :call setqflist([], 'a', {'id' : qfid, 'idx' : 10})
++
+ " set the context of a quickfix list specified by an identifier
+ :call setqflist([], 'a', {'id' : qfid, 'context' : {'val' : 100}})
+
+***************
+*** 898,904 ****
+ 'smartcase' is not used.
+ If {pattern} is empty (e.g. // is specified), the last
+ used search pattern is used. |last-pattern|
+!
+ When a number is put before the command this is used
+ as the maximum number of matches to find. Use
+ ":1vimgrep pattern file" to find only the first.
+--- 922,928 ----
+ 'smartcase' is not used.
+ If {pattern} is empty (e.g. // is specified), the last
+ used search pattern is used. |last-pattern|
+! :{count}vim[grep] ...
+ When a number is put before the command this is used
+ as the maximum number of matches to find. Use
+ ":1vimgrep pattern file" to find only the first.
+***************
+*** 1551,1564 ****
+ 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
+--- 1575,1588 ----
+ recognized as a command separator. The backslash before each space is
+ required for the set command.
+
+! *cfilter-plugin* *:Cfilter* *:Lfilter*
+ 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
+*** ../vim-8.1.0719/src/quickfix.c 2018-12-22 16:49:11.348536036 +0100
+--- src/quickfix.c 2019-01-11 14:44:08.978341403 +0100
+***************
+*** 3266,3278 ****
+ }
+
+ /*
+! * 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,
+--- 3266,3272 ----
+ }
+
+ /*
+! * Jump to a quickfix line and try to use an existing window.
+ */
+ void
+ qf_jump(qf_info_T *qi,
+***************
+*** 3284,3290 ****
+ }
+
+ /*
+! * As qf_info().
+ * If 'newwin' is TRUE, then open the file in a new window.
+ */
+ void
+--- 3278,3291 ----
+ }
+
+ /*
+! * Jump to a quickfix line.
+! * If dir == 0 go to entry "errornr".
+! * 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
+! * If 'forceit' is TRUE, then can discard changes to the current buffer.
+ * If 'newwin' is TRUE, then open the file in a new window.
+ */
+ void
+***************
+*** 3687,3693 ****
+
+ 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)
+--- 3688,3694 ----
+
+ if (is_loclist_cmd(eap->cmdidx))
+ qi = GET_LOC_LIST(curwin);
+! if (qf_stack_empty(qi))
+ MSG(_("No entries"));
+ else
+ for (i = 0; i < qi->qf_listcount; ++i)
+***************
+*** 6549,6554 ****
+--- 6550,6599 ----
+ }
+
+ /*
++ * Set the current index in the specified quickfix list
++ */
++ static int
++ qf_setprop_curidx(qf_info_T *qi, qf_list_T *qfl, dictitem_T *di)
++ {
++ int denote = FALSE;
++ int newidx;
++ int old_qfidx;
++ qfline_T *qf_ptr;
++
++ // If the specified index is '$', then use the last entry
++ if (di->di_tv.v_type == VAR_STRING
++ && di->di_tv.vval.v_string != NULL
++ && STRCMP(di->di_tv.vval.v_string, "$") == 0)
++ newidx = qfl->qf_count;
++ else
++ {
++ // Otherwise use the specified index
++ newidx = tv_get_number_chk(&di->di_tv, &denote);
++ if (denote)
++ return FAIL;
++ }
++
++ if (newidx < 1) // sanity check
++ return FAIL;
++ if (newidx > qfl->qf_count)
++ newidx = qfl->qf_count;
++
++ old_qfidx = qfl->qf_index;
++ qf_ptr = get_nth_entry(qfl, newidx, &newidx);
++ if (qf_ptr == NULL)
++ return FAIL;
++ qfl->qf_ptr = qf_ptr;
++ qfl->qf_index = newidx;
++
++ // If the current list is modified and it is displayed in the quickfix
++ // window, then Update it.
++ if (qi->qf_lists[qi->qf_curlist].qf_id == qfl->qf_id)
++ qf_win_pos_update(qi, old_qfidx);
++
++ return OK;
++ }
++
++ /*
+ * Set quickfix/location list properties (title, items, context).
+ * Also used to add items from parsing a list of lines.
+ * Used by the setqflist() and setloclist() Vim script functions.
+***************
+*** 6585,6590 ****
+--- 6630,6637 ----
+ 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 ((di = dict_find(what, (char_u *)"idx", -1)) != NULL)
++ retval = qf_setprop_curidx(qi, qfl, di);
+
+ if (retval == OK)
+ qf_list_changed(qfl);
+*** ../vim-8.1.0719/src/testdir/test_quickfix.vim 2018-12-22 16:49:11.348536036 +0100
+--- src/testdir/test_quickfix.vim 2019-01-11 14:44:08.978341403 +0100
+***************
+*** 1811,1816 ****
+--- 1811,1823 ----
+ call g:Xsetlist([], 'f')
+ let l = split(execute(a:cchar . 'hist'), "\n")
+ call assert_equal('No entries', l[0])
++
++ " An empty list should still show the stack history
++ call g:Xsetlist([])
++ let res = split(execute(a:cchar . 'hist'), "\n")
++ call assert_equal('> error list 1 of 1; 0 ' . common, res[0])
++
++ call g:Xsetlist([], 'f')
+ endfunc
+
+ func Test_history()
+***************
+*** 2068,2073 ****
+--- 2075,2130 ----
+ call Xproperty_tests('l')
+ endfunc
+
++ " Test for setting the current index in the location/quickfix list
++ func Xtest_setqfidx(cchar)
++ call s:setup_commands(a:cchar)
++
++ Xgetexpr "F1:10:1:Line1\nF2:20:2:Line2\nF3:30:3:Line3"
++ Xgetexpr "F4:10:1:Line1\nF5:20:2:Line2\nF6:30:3:Line3"
++ Xgetexpr "F7:10:1:Line1\nF8:20:2:Line2\nF9:30:3:Line3"
++
++ call g:Xsetlist([], 'a', {'nr' : 3, 'idx' : 2})
++ call g:Xsetlist([], 'a', {'nr' : 2, 'idx' : 2})
++ call g:Xsetlist([], 'a', {'nr' : 1, 'idx' : 3})
++ Xolder 2
++ Xopen
++ call assert_equal(3, line('.'))
++ Xnewer
++ call assert_equal(2, line('.'))
++ Xnewer
++ call assert_equal(2, line('.'))
++ " Update the current index with the quickfix window open
++ wincmd w
++ call g:Xsetlist([], 'a', {'nr' : 3, 'idx' : 3})
++ Xopen
++ call assert_equal(3, line('.'))
++ Xclose
++
++ " Set the current index to the last entry
++ call g:Xsetlist([], 'a', {'nr' : 1, 'idx' : '$'})
++ call assert_equal(3, g:Xgetlist({'nr' : 1, 'idx' : 0}).idx)
++ " A large value should set the index to the last index
++ call g:Xsetlist([], 'a', {'nr' : 1, 'idx' : 1})
++ call g:Xsetlist([], 'a', {'nr' : 1, 'idx' : 999})
++ call assert_equal(3, g:Xgetlist({'nr' : 1, 'idx' : 0}).idx)
++ " Invalid index values
++ call g:Xsetlist([], 'a', {'nr' : 1, 'idx' : -1})
++ call assert_equal(3, g:Xgetlist({'nr' : 1, 'idx' : 0}).idx)
++ call g:Xsetlist([], 'a', {'nr' : 1, 'idx' : 0})
++ call assert_equal(3, g:Xgetlist({'nr' : 1, 'idx' : 0}).idx)
++ call g:Xsetlist([], 'a', {'nr' : 1, 'idx' : 'xx'})
++ call assert_equal(3, g:Xgetlist({'nr' : 1, 'idx' : 0}).idx)
++ call assert_fails("call g:Xsetlist([], 'a', {'nr':1, 'idx':[]})", 'E745:')
++
++ call g:Xsetlist([], 'f')
++ new | only
++ endfunc
++
++ func Test_setqfidx()
++ call Xtest_setqfidx('c')
++ call Xtest_setqfidx('l')
++ endfunc
++
+ " Tests for the QuickFixCmdPre/QuickFixCmdPost autocommands
+ func QfAutoCmdHandler(loc, cmd)
+ call add(g:acmds, a:loc . a:cmd)
+*** ../vim-8.1.0719/src/version.c 2019-01-11 14:37:16.689248837 +0100
+--- src/version.c 2019-01-11 14:47:06.281089738 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 720,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+159. You get excited whenever discussing your hard drive.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0721 b/data/vim/patches/8.1.0721
new file mode 100644
index 000000000..a9581bae7
--- /dev/null
+++ b/data/vim/patches/8.1.0721
@@ -0,0 +1,707 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0721
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0721
+Problem: Conceal mode is not sufficiently tested.
+Solution: Add screendump tests. Check all 'concealcursor' values.
+Files: src/testdir/test_conceal.vim, src/Make_all.mak,
+ src/testdir/Make_all.mak
+ src/testdir/dumps/Test_conceal_two_windows_01.dump,
+ src/testdir/dumps/Test_conceal_two_windows_02.dump,
+ src/testdir/dumps/Test_conceal_two_windows_03.dump,
+ src/testdir/dumps/Test_conceal_two_windows_04.dump,
+ src/testdir/dumps/Test_conceal_two_windows_05.dump,
+ src/testdir/dumps/Test_conceal_two_windows_06i.dump,
+ src/testdir/dumps/Test_conceal_two_windows_06v.dump,
+ src/testdir/dumps/Test_conceal_two_windows_06c.dump,
+ src/testdir/dumps/Test_conceal_two_windows_06n.dump,
+ src/testdir/dumps/Test_conceal_two_windows_07i.dump,
+ src/testdir/dumps/Test_conceal_two_windows_07v.dump,
+ src/testdir/dumps/Test_conceal_two_windows_07c.dump,
+ src/testdir/dumps/Test_conceal_two_windows_07n.dump,
+ src/testdir/dumps/Test_conceal_two_windows_08i.dump,
+ src/testdir/dumps/Test_conceal_two_windows_08v.dump,
+ src/testdir/dumps/Test_conceal_two_windows_08c.dump,
+ src/testdir/dumps/Test_conceal_two_windows_08n.dump,
+ src/testdir/dumps/Test_conceal_two_windows_09i.dump,
+ src/testdir/dumps/Test_conceal_two_windows_09v.dump,
+ src/testdir/dumps/Test_conceal_two_windows_09c.dump,
+ src/testdir/dumps/Test_conceal_two_windows_09n.dump
+
+
+*** ../vim-8.1.0720/src/testdir/test_conceal.vim 2019-01-11 15:52:17.828883422 +0100
+--- src/testdir/test_conceal.vim 2019-01-11 15:52:58.940581601 +0100
+***************
+*** 0 ****
+--- 1,97 ----
++ " Tests for 'conceal'.
++ " Also see test88.in (should be converted to a test function here).
++
++ if !has('conceal')
++ finish
++ endif
++
++ source screendump.vim
++ if !CanRunVimInTerminal()
++ finish
++ endif
++
++ func Test_conceal_two_windows()
++ call writefile([
++ \ 'let lines = ["one one one one one", "two |hidden| here", "three |hidden| three"]',
++ \ 'call setline(1, lines)',
++ \ 'syntax match test /|hidden|/ conceal',
++ \ 'set conceallevel=2',
++ \ 'set concealcursor=',
++ \ 'exe "normal /here\r"',
++ \ 'new',
++ \ 'call setline(1, lines)',
++ \ 'call setline(4, "Second window")',
++ \ 'syntax match test /|hidden|/ conceal',
++ \ 'set conceallevel=2',
++ \ 'set concealcursor=nc',
++ \ 'exe "normal /here\r"',
++ \ ], 'XTest_conceal')
++ " Check that cursor line is concealed
++ let buf = RunVimInTerminal('-S XTest_conceal', {})
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_01', {})
++
++ " Check that with concealed text vertical cursor movement is correct.
++ call term_sendkeys(buf, "k")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_02', {})
++
++ " Check that with cursor line is not concealed
++ call term_sendkeys(buf, "j")
++ call term_sendkeys(buf, ":set concealcursor=\r")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_03', {})
++
++ " Check that with cursor line is not concealed when moving cursor down
++ call term_sendkeys(buf, "j")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_04', {})
++
++ " Check that with cursor line is not concealed when switching windows
++ call term_sendkeys(buf, "\<C-W>\<C-W>")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_05', {})
++
++ " Check that with cursor line is only concealed in Normal mode
++ call term_sendkeys(buf, ":set concealcursor=n\r")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_06n', {})
++ call term_sendkeys(buf, "a")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_06i', {})
++ call term_sendkeys(buf, "\<Esc>/e")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_06c', {})
++ call term_sendkeys(buf, "\<Esc>v")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_06v', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ " Check that with cursor line is only concealed in Insert mode
++ call term_sendkeys(buf, ":set concealcursor=i\r")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_07n', {})
++ call term_sendkeys(buf, "a")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_07i', {})
++ call term_sendkeys(buf, "\<Esc>/e")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_07c', {})
++ call term_sendkeys(buf, "\<Esc>v")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_07v', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ " Check that with cursor line is only concealed in Command mode
++ call term_sendkeys(buf, ":set concealcursor=c\r")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_08n', {})
++ call term_sendkeys(buf, "a")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_08i', {})
++ call term_sendkeys(buf, "\<Esc>/e")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_08c', {})
++ call term_sendkeys(buf, "\<Esc>v")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_08v', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ " Check that with cursor line is only concealed in Visual mode
++ call term_sendkeys(buf, ":set concealcursor=v\r")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_09n', {})
++ call term_sendkeys(buf, "a")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_09i', {})
++ call term_sendkeys(buf, "\<Esc>/e")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_09c', {})
++ call term_sendkeys(buf, "\<Esc>v")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_09v', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XTest_conceal')
++ endfunc
+*** ../vim-8.1.0720/src/Make_all.mak 2018-12-19 21:05:53.908800514 +0100
+--- src/Make_all.mak 2019-01-11 15:21:14.402913540 +0100
+***************
+*** 33,38 ****
+--- 33,39 ----
+ test_command_count \
+ test_comparators \
+ test_compiler \
++ test_conceal \
+ test_crypt \
+ test_cscope \
+ test_cursor_func \
+*** ../vim-8.1.0720/src/testdir/Make_all.mak 2018-12-13 22:17:52.881941445 +0100
+--- src/testdir/Make_all.mak 2019-01-11 15:21:58.686603771 +0100
+***************
+*** 84,89 ****
+--- 84,90 ----
+ test_cmdline.res \
+ test_command_count.res \
+ test_comparators.res \
++ test_conceal.res \
+ test_crypt.res \
+ test_cscope.res \
+ test_curswant.res \
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_01.dump 2019-01-11 15:52:17.840883334 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_01.dump 2019-01-11 15:23:29.585967705 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1>h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |/+0&&|h|e|r|e| @69
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_02.dump 2019-01-11 15:52:17.844883304 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_02.dump 2019-01-11 15:23:30.641960314 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o>n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |/+0&&|h|e|r|e| @69
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_03.dump 2019-01-11 15:52:17.848883274 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_03.dump 2019-01-11 15:23:31.693952951 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| >h|e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |:+0&&|s|e|t| |c|o|n|c|e|a|l|c|u|r|s|o|r|=| @55
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_04.dump 2019-01-11 15:52:17.848883274 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_04.dump 2019-01-11 15:32:38.541840325 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| |||h|i|d@1|e|n>|| |t|h|r|e@1| @54
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |:+0&&|s|e|t| |c|o|n|c|e|a|l|c|u|r|s|o|r|=| @55
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_05.dump 2019-01-11 15:52:17.852883246 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_05.dump 2019-01-11 15:31:02.522628265 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| >h|e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |:+0&&|s|e|t| |c|o|n|c|e|a|l|c|u|r|s|o|r|=| @55
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_06i.dump 2019-01-11 15:52:17.856883216 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_06i.dump 2019-01-11 15:43:16.416896159 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| |h>e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|5| @10|A|l@1
++ |-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@62
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_06v.dump 2019-01-11 15:52:17.860883186 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_06v.dump 2019-01-11 15:43:18.512880427 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| >h|e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |-+2&&@1| |V|I|S|U|A|L| |-@1| +0&&@51|1| @9
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_06c.dump 2019-01-11 15:52:17.864883158 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_06c.dump 2019-01-11 15:43:17.464888293 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| |h|e+1&&|r+0&&|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|5| @10|A|l@1
++ |/+0&&|e> @72
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_06n.dump 2019-01-11 15:52:17.868883128 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_06n.dump 2019-01-11 15:43:15.364904056 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1>h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |:+0&&|s|e|t| |c|o|n|c|e|a|l|c|u|r|s|o|r|=|n| @54
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_07i.dump 2019-01-11 15:52:17.868883128 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_07i.dump 2019-01-11 15:43:20.616864637 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h>e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|5| @10|A|l@1
++ |-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@62
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_07v.dump 2019-01-11 15:52:17.872883098 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_07v.dump 2019-01-11 15:43:22.728848789 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| >h|e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |-+2&&@1| |V|I|S|U|A|L| |-@1| +0&&@51|1| @9
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_07c.dump 2019-01-11 15:52:17.876883070 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_07c.dump 2019-01-11 15:43:21.672856713 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| |h|e+1&&|r+0&&|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|5| @10|A|l@1
++ |/+0&&|e> @72
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_07n.dump 2019-01-11 15:52:17.880883040 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_07n.dump 2019-01-11 15:43:19.564872531 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| >h|e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |:+0&&|s|e|t| |c|o|n|c|e|a|l|c|u|r|s|o|r|=|i| @54
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_08i.dump 2019-01-11 15:52:17.884883010 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_08i.dump 2019-01-11 15:43:24.832833003 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| |h>e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|5| @10|A|l@1
++ |-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@62
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_08v.dump 2019-01-11 15:52:17.888882980 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_08v.dump 2019-01-11 15:43:26.936817220 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| >h|e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |-+2&&@1| |V|I|S|U|A|L| |-@1| +0&&@51|1| @9
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_08c.dump 2019-01-11 15:52:17.892882952 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_08c.dump 2019-01-11 15:43:25.884825111 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e+1&&|r+0&&|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|5| @10|A|l@1
++ |/+0&&|e> @72
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_08n.dump 2019-01-11 15:52:17.892882952 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_08n.dump 2019-01-11 15:43:23.780840895 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| >h|e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |:+0&&|s|e|t| |c|o|n|c|e|a|l|c|u|r|s|o|r|=|c| @54
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_09i.dump 2019-01-11 15:52:17.896882922 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_09i.dump 2019-01-11 15:43:29.040801437 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| |h>e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|5| @10|A|l@1
++ |-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@62
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_09v.dump 2019-01-11 15:52:17.900882892 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_09v.dump 2019-01-11 15:43:31.132785748 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1>h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |-+2&&@1| |V|I|S|U|A|L| |-@1| +0&&@51|1| @9
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_09c.dump 2019-01-11 15:52:17.904882864 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_09c.dump 2019-01-11 15:43:30.092793549 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| |h|e+1&&|r+0&&|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|5| @10|A|l@1
++ |/+0&&|e> @72
+*** ../vim-8.1.0720/src/testdir/dumps/Test_conceal_two_windows_09n.dump 2019-01-11 15:52:17.908882834 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_09n.dump 2019-01-11 15:43:27.988809328 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| >h|e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |:+0&&|s|e|t| |c|o|n|c|e|a|l|c|u|r|s|o|r|=|v| @54
+*** ../vim-8.1.0720/src/version.c 2019-01-11 14:49:25.380107431 +0100
+--- src/version.c 2019-01-11 15:06:45.432963118 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 721,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+160. You get in the elevator and double-click the button for the floor
+ you want.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0722 b/data/vim/patches/8.1.0722
new file mode 100644
index 000000000..c30eeaedf
--- /dev/null
+++ b/data/vim/patches/8.1.0722
@@ -0,0 +1,155 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0722
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0722
+Problem: Cannot build without the virtualedit feature.
+Solution: Make getviscol2() always available.
+Files: src/misc2.c, src/proto/misc2.pro, src/ops.c
+
+
+*** ../vim-8.1.0721/src/misc2.c 2018-12-28 21:59:24.512992993 +0100
+--- src/misc2.c 2019-01-11 16:07:09.994655012 +0100
+***************
+*** 48,69 ****
+ }
+
+ /*
+- * Get the screen position of character col with a coladd in the cursor line.
+- */
+- int
+- getviscol2(colnr_T col, colnr_T coladd)
+- {
+- colnr_T x;
+- pos_T pos;
+-
+- pos.lnum = curwin->w_cursor.lnum;
+- pos.col = col;
+- pos.coladd = coladd;
+- getvvcol(curwin, &pos, &x, NULL, NULL);
+- return (int)x;
+- }
+-
+- /*
+ * Go to column "wcol", and add/insert white space as necessary to get the
+ * cursor in that column.
+ * The caller must have saved the cursor line for undo!
+--- 48,53 ----
+***************
+*** 86,91 ****
+--- 70,93 ----
+ #endif
+
+ /*
++ * Get the screen position of character col with a coladd in the cursor line.
++ */
++ int
++ getviscol2(colnr_T col, colnr_T coladd)
++ {
++ colnr_T x;
++ pos_T pos;
++
++ pos.lnum = curwin->w_cursor.lnum;
++ pos.col = col;
++ #ifdef FEAT_VIRTUALEDIT
++ pos.coladd = coladd;
++ #endif
++ getvvcol(curwin, &pos, &x, NULL, NULL);
++ return (int)x;
++ }
++
++ /*
+ * Try to advance the Cursor to the specified screen column.
+ * If virtual editing: fine tune the cursor position.
+ * Note that all virtual positions off the end of a line should share
+*** ../vim-8.1.0721/src/proto/misc2.pro 2018-12-28 21:59:24.512992993 +0100
+--- src/proto/misc2.pro 2019-01-11 16:08:07.810288364 +0100
+***************
+*** 1,8 ****
+ /* misc2.c */
+ int virtual_active(void);
+ int getviscol(void);
+- int getviscol2(colnr_T col, colnr_T coladd);
+ int coladvance_force(colnr_T wcol);
+ int coladvance(colnr_T wcol);
+ int getvpos(pos_T *pos, colnr_T wcol);
+ int inc_cursor(void);
+--- 1,8 ----
+ /* misc2.c */
+ int virtual_active(void);
+ int getviscol(void);
+ int coladvance_force(colnr_T wcol);
++ int getviscol2(colnr_T col, colnr_T coladd);
+ int coladvance(colnr_T wcol);
+ int getvpos(pos_T *pos, colnr_T wcol);
+ int inc_cursor(void);
+*** ../vim-8.1.0721/src/ops.c 2019-01-11 14:37:16.689248837 +0100
+--- src/ops.c 2019-01-11 16:09:04.201926229 +0100
+***************
+*** 2754,2760 ****
+ )
+ {
+ int t = getviscol2(curbuf->b_op_start_orig.col,
+! curbuf->b_op_start_orig.coladd);
+ oap->start.col = curbuf->b_op_start_orig.col;
+ pre_textlen -= t - oap->start_vcol;
+ oap->start_vcol = t;
+--- 2754,2765 ----
+ )
+ {
+ int t = getviscol2(curbuf->b_op_start_orig.col,
+! #ifdef FEAT_VIRTUALEDIT
+! curbuf->b_op_start_orig.coladd
+! #else
+! 0
+! #endif
+! );
+ oap->start.col = curbuf->b_op_start_orig.col;
+ pre_textlen -= t - oap->start_vcol;
+ oap->start_vcol = t;
+***************
+*** 2771,2777 ****
+ )
+ {
+ int t = getviscol2(curbuf->b_op_start_orig.col,
+! curbuf->b_op_start_orig.coladd);
+ oap->start.col = curbuf->b_op_start_orig.col;
+ /* reset pre_textlen to the value of OP_INSERT */
+ pre_textlen += bd.textlen;
+--- 2776,2787 ----
+ )
+ {
+ int t = getviscol2(curbuf->b_op_start_orig.col,
+! #ifdef FEAT_VIRTUALEDIT
+! curbuf->b_op_start_orig.coladd
+! #else
+! 0
+! #endif
+! );
+ oap->start.col = curbuf->b_op_start_orig.col;
+ /* reset pre_textlen to the value of OP_INSERT */
+ pre_textlen += bd.textlen;
+*** ../vim-8.1.0721/src/version.c 2019-01-11 15:54:12.940038982 +0100
+--- src/version.c 2019-01-11 16:08:04.106312000 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 722,
+ /**/
+
+--
+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.0723 b/data/vim/patches/8.1.0723
new file mode 100644
index 000000000..c18ac4cbc
--- /dev/null
+++ b/data/vim/patches/8.1.0723
@@ -0,0 +1,1011 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0723
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0723
+Problem: Cannot run specific test when in src/testdir the same was as in
+ the src directory.
+Solution: Move build rule to src/testdir/Makefile.
+Files: src/testdir/Make_all.mak, src/testdir/Make_amiga.mak,
+ src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
+ src/Makefile, src/Make_all.mak, src/testdir/Makefile,
+ src/testdir/README.txt, src/Make_mvc.mak
+
+
+*** ../vim-8.1.0722/src/testdir/Make_all.mak 2019-01-11 15:54:12.936039012 +0100
+--- src/testdir/Make_all.mak 2019-01-11 16:47:54.054148517 +0100
+***************
+*** 60,201 ****
+ # Tests for the GUI.
+ SCRIPTS_GUI =
+
+
+! # Tests using runtest.vim
+ # Keep test_alot*.res as the last one, sort the others.
+ # test_largefile.res is omitted, it uses too much resources to run on CI.
+! NEW_TESTS = test_arabic.res \
+! test_arglist.res \
+! test_assert.res \
+! test_autochdir.res \
+! test_autocmd.res \
+! test_autoload.res \
+! test_backspace_opt.res \
+! test_blockedit.res \
+! test_breakindent.res \
+! test_bufwintabinfo.res \
+! test_cdo.res \
+! test_changelist.res \
+! test_channel.res \
+! test_charsearch.res \
+! test_cindent.res \
+! test_clientserver.res \
+! test_close_count.res \
+! test_cmdline.res \
+! test_command_count.res \
+! test_comparators.res \
+! test_conceal.res \
+! test_crypt.res \
+! test_cscope.res \
+! test_curswant.res \
+! test_diffmode.res \
+! test_digraph.res \
+! test_display.res \
+! test_edit.res \
+! test_erasebackword.res \
+! test_escaped_glob.res \
+! test_eval_stuff.res \
+! test_exec_while_if.res \
+! test_exists.res \
+! test_exists_autocmd.res \
+! test_exit.res \
+! test_farsi.res \
+! test_file_size.res \
+! test_find_complete.res \
+! test_fixeol.res \
+! test_fnameescape.res \
+! test_fold.res \
+! test_getcwd.res \
+! test_getvar.res \
+! test_gf.res \
+! test_gn.res \
+! test_gui.res \
+! test_gui_init.res \
+! test_hardcopy.res \
+! test_help.res \
+! test_hide.res \
+! test_highlight.res \
+! test_history.res \
+! test_hlsearch.res \
+! test_iminsert.res \
+! test_increment.res \
+! test_increment_dbcs.res \
+! test_ins_complete.res \
+! test_job_fails.res \
+! test_json.res \
+! test_jumplist.res \
+! test_langmap.res \
+! test_let.res \
+! test_lineending.res \
+! test_listchars.res \
+! test_listdict.res \
+! test_listlbr.res \
+! test_lua.res \
+! test_makeencoding.res \
+! test_man.res \
+! test_maparg.res \
+! test_marks.res \
+! test_matchadd_conceal.res \
+! test_mksession.res \
+! test_nested_function.res \
+! test_netbeans.res \
+! test_normal.res \
+! test_number.res \
+! test_options.res \
+! test_packadd.res \
+! test_paste.res \
+! test_perl.res \
+! test_plus_arg_edit.res \
+! test_preview.res \
+! test_profile.res \
+! test_prompt_buffer.res \
+! test_python2.res \
+! test_python3.res \
+! test_pyx2.res \
+! test_pyx3.res \
+! test_quickfix.res \
+! test_quotestar.res \
+! test_regex_char_classes.res \
+! test_registers.res \
+! test_retab.res \
+! test_ruby.res \
+! test_scriptnames.res \
+! test_scrollbind.res \
+! test_search.res \
+! test_shortpathname.res \
+! test_signs.res \
+! test_smartindent.res \
+! test_spell.res \
+! test_startup.res \
+! test_stat.res \
+! test_substitute.res \
+! test_swap.res \
+! test_syntax.res \
+! test_system.res \
+! test_tab.res \
+! test_tcl.res \
+! test_terminal.res \
+! test_terminal_fail.res \
+! test_textformat.res \
+! test_textobjects.res \
+! test_textprop.res \
+! test_undo.res \
+! test_user_func.res \
+! test_usercommands.res \
+! test_vartabs.res \
+! test_viminfo.res \
+! test_vimscript.res \
+! test_visual.res \
+! test_winbar.res \
+! test_winbuf_close.res \
+! test_window_id.res \
+! test_windows_home.res \
+! test_wordcount.res \
+! test_writefile.res \
+! test_xxd.res \
+! test_alot_latin.res \
+! test_alot_utf8.res \
+! test_alot.res
+
+
+ # Explicit dependencies.
+--- 60,412 ----
+ # Tests for the GUI.
+ SCRIPTS_GUI =
+
++ # Individual tests, including the ones part of test_alot.
++ # Please keep sorted up to test_alot.
++ NEW_TESTS = \
++ test_arglist \
++ test_arabic \
++ test_assert \
++ test_assign \
++ test_autochdir \
++ test_autocmd \
++ test_autoload \
++ test_backspace_opt \
++ test_backup \
++ test_behave \
++ test_blockedit \
++ test_breakindent \
++ test_bufline \
++ test_bufwintabinfo \
++ test_cd \
++ test_cdo \
++ test_changedtick \
++ test_changelist \
++ test_channel \
++ test_charsearch \
++ test_charsearch_utf8 \
++ test_cindent \
++ test_clientserver \
++ test_close_count \
++ test_cmdline \
++ test_command_count \
++ test_comparators \
++ test_compiler \
++ test_conceal \
++ test_crypt \
++ test_cscope \
++ test_cursor_func \
++ test_curswant \
++ test_delete \
++ test_diffmode \
++ test_digraph \
++ test_display \
++ test_edit \
++ test_erasebackword \
++ test_escaped_glob \
++ test_eval_stuff \
++ test_ex_undo \
++ test_ex_z \
++ test_exit \
++ test_exec_while_if \
++ test_execute_func \
++ test_exists \
++ test_exists_autocmd \
++ test_expand \
++ test_expand_dllpath \
++ test_expand_func \
++ test_expr \
++ test_expr_utf8 \
++ test_farsi \
++ test_feedkeys \
++ test_file_perm \
++ test_file_size \
++ test_fileformat \
++ test_filetype \
++ test_filter_cmd \
++ test_filter_map \
++ test_find_complete \
++ test_findfile \
++ test_fixeol \
++ test_float_func \
++ test_fnameescape \
++ test_fnamemodify \
++ test_fold \
++ test_functions \
++ test_ga \
++ test_getcwd \
++ test_getvar \
++ test_gf \
++ test_glob2regpat \
++ test_global \
++ test_gn \
++ test_goto \
++ test_gui \
++ test_gui_init \
++ test_hardcopy \
++ test_help \
++ test_help_tagjump \
++ test_hide \
++ test_highlight \
++ test_history \
++ test_hlsearch \
++ test_iminsert \
++ test_increment \
++ test_increment_dbcs \
++ test_ins_complete \
++ test_job_fails \
++ test_join \
++ test_json \
++ test_jumplist \
++ test_jumps \
++ test_lambda \
++ test_langmap \
++ test_largefile \
++ test_let \
++ test_lineending \
++ test_lispwords \
++ test_listchars \
++ test_listdict \
++ test_listlbr \
++ test_listlbr_utf8 \
++ test_lua \
++ test_makeencoding \
++ test_man \
++ test_maparg \
++ test_mapping \
++ test_marks \
++ test_match \
++ test_matchadd_conceal \
++ test_matchadd_conceal_utf8 \
++ test_menu \
++ test_messages \
++ test_mksession \
++ test_mksession_utf8 \
++ test_modeline \
++ test_move \
++ test_nested_function \
++ test_netbeans \
++ test_normal \
++ test_number \
++ test_options \
++ test_packadd \
++ test_partial \
++ test_paste \
++ test_perl \
++ test_plus_arg_edit \
++ test_popup \
++ test_preview \
++ test_profile \
++ test_prompt_buffer \
++ test_put \
++ test_python2 \
++ test_python3 \
++ test_pyx2 \
++ test_pyx3 \
++ test_quickfix \
++ test_quotestar \
++ test_recover \
++ test_regex_char_classes \
++ test_regexp_latin \
++ test_regexp_utf8 \
++ test_registers \
++ test_reltime \
++ test_retab \
++ test_ruby \
++ test_scriptnames \
++ test_scroll_opt \
++ test_scrollbind \
++ test_search \
++ test_searchpos \
++ test_set \
++ test_sha256 \
++ test_signs \
++ test_smartindent \
++ test_sort \
++ test_source_utf8 \
++ test_spell \
++ test_startup \
++ test_startup_utf8 \
++ test_stat \
++ test_statusline \
++ test_substitute \
++ test_suspend \
++ test_swap \
++ test_syn_attr \
++ test_syntax \
++ test_system \
++ test_tab \
++ test_tabline \
++ test_tabpage \
++ test_tagcase \
++ test_tagjump \
++ test_taglist \
++ test_tcl \
++ test_terminal \
++ test_terminal_fail \
++ test_textformat \
++ test_textobjects \
++ test_textprop \
++ test_timers \
++ test_true_false \
++ test_undo \
++ test_unlet \
++ test_usercommands \
++ test_utf8 \
++ test_utf8_comparisons \
++ test_vartabs \
++ test_viminfo \
++ test_vimscript \
++ test_virtualedit \
++ test_visual \
++ test_winbar \
++ test_winbuf_close \
++ test_window_cmd \
++ test_window_id \
++ test_windows_home \
++ test_wordcount \
++ test_writefile \
++ test_xxd \
++ test_alot_latin \
++ test_alot_utf8 \
++ test_alot
+
+!
+! # Test targets that use runtest.vim.
+ # Keep test_alot*.res as the last one, sort the others.
+ # test_largefile.res is omitted, it uses too much resources to run on CI.
+! NEW_TESTS_RES = \
+! test_arabic.res \
+! test_arglist.res \
+! test_assert.res \
+! test_autochdir.res \
+! test_autocmd.res \
+! test_autoload.res \
+! test_backspace_opt.res \
+! test_blockedit.res \
+! test_breakindent.res \
+! test_bufwintabinfo.res \
+! test_cdo.res \
+! test_changelist.res \
+! test_channel.res \
+! test_charsearch.res \
+! test_cindent.res \
+! test_clientserver.res \
+! test_close_count.res \
+! test_cmdline.res \
+! test_command_count.res \
+! test_comparators.res \
+! test_conceal.res \
+! test_crypt.res \
+! test_cscope.res \
+! test_curswant.res \
+! test_diffmode.res \
+! test_digraph.res \
+! test_display.res \
+! test_edit.res \
+! test_erasebackword.res \
+! test_escaped_glob.res \
+! test_eval_stuff.res \
+! test_exec_while_if.res \
+! test_exists.res \
+! test_exists_autocmd.res \
+! test_exit.res \
+! test_farsi.res \
+! test_file_size.res \
+! test_find_complete.res \
+! test_fixeol.res \
+! test_fnameescape.res \
+! test_fold.res \
+! test_getcwd.res \
+! test_getvar.res \
+! test_gf.res \
+! test_gn.res \
+! test_gui.res \
+! test_gui_init.res \
+! test_hardcopy.res \
+! test_help.res \
+! test_hide.res \
+! test_highlight.res \
+! test_history.res \
+! test_hlsearch.res \
+! test_iminsert.res \
+! test_increment.res \
+! test_increment_dbcs.res \
+! test_ins_complete.res \
+! test_job_fails.res \
+! test_json.res \
+! test_jumplist.res \
+! test_langmap.res \
+! test_let.res \
+! test_lineending.res \
+! test_listchars.res \
+! test_listdict.res \
+! test_listlbr.res \
+! test_lua.res \
+! test_makeencoding.res \
+! test_man.res \
+! test_maparg.res \
+! test_marks.res \
+! test_matchadd_conceal.res \
+! test_mksession.res \
+! test_nested_function.res \
+! test_netbeans.res \
+! test_normal.res \
+! test_number.res \
+! test_options.res \
+! test_packadd.res \
+! test_paste.res \
+! test_perl.res \
+! test_plus_arg_edit.res \
+! test_preview.res \
+! test_profile.res \
+! test_prompt_buffer.res \
+! test_python2.res \
+! test_python3.res \
+! test_pyx2.res \
+! test_pyx3.res \
+! test_quickfix.res \
+! test_quotestar.res \
+! test_regex_char_classes.res \
+! test_registers.res \
+! test_retab.res \
+! test_ruby.res \
+! test_scriptnames.res \
+! test_scrollbind.res \
+! test_search.res \
+! test_shortpathname.res \
+! test_signs.res \
+! test_smartindent.res \
+! test_spell.res \
+! test_startup.res \
+! test_stat.res \
+! test_substitute.res \
+! test_swap.res \
+! test_syntax.res \
+! test_system.res \
+! test_tab.res \
+! test_tcl.res \
+! test_terminal.res \
+! test_terminal_fail.res \
+! test_textformat.res \
+! test_textobjects.res \
+! test_textprop.res \
+! test_undo.res \
+! test_user_func.res \
+! test_usercommands.res \
+! test_vartabs.res \
+! test_viminfo.res \
+! test_vimscript.res \
+! test_visual.res \
+! test_winbar.res \
+! test_winbuf_close.res \
+! test_window_id.res \
+! test_windows_home.res \
+! test_wordcount.res \
+! test_writefile.res \
+! test_xxd.res \
+! test_alot_latin.res \
+! test_alot_utf8.res \
+! test_alot.res
+
+
+ # Explicit dependencies.
+*** ../vim-8.1.0722/src/testdir/Make_amiga.mak 2018-06-30 21:50:16.856674912 +0200
+--- src/testdir/Make_amiga.mak 2019-01-11 16:33:06.515994512 +0100
+***************
+*** 19,25 ****
+ SCRIPTS = $(SCRIPTS_ALL) $(SCRIPTS_MORE4)
+
+ # Must run test1 first to create small.vim.
+! $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS): $(SCRIPTS_FIRST)
+
+ .SUFFIXES: .in .out
+
+--- 19,25 ----
+ SCRIPTS = $(SCRIPTS_ALL) $(SCRIPTS_MORE4)
+
+ # Must run test1 first to create small.vim.
+! $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
+
+ .SUFFIXES: .in .out
+
+*** ../vim-8.1.0722/src/testdir/Make_dos.mak 2018-09-20 21:39:29.643309960 +0200
+--- src/testdir/Make_dos.mak 2019-01-11 16:33:48.383698798 +0100
+***************
+*** 66,72 ****
+ # Must run test1 first to create small.vim.
+ # This rule must come after the one that copies the input files to dostmp to
+ # allow for running an individual test.
+! $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS): $(SCRIPTS_FIRST)
+
+ report:
+ @echo ""
+--- 66,72 ----
+ # Must run test1 first to create small.vim.
+ # This rule must come after the one that copies the input files to dostmp to
+ # allow for running an individual test.
+! $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
+
+ report:
+ @echo ""
+***************
+*** 115,121 ****
+ newtests: newtestssilent
+ @if exist messages (findstr "SKIPPED FAILED" messages > nul) && type messages
+
+! newtestssilent: $(NEW_TESTS)
+
+ .vim.res:
+ @echo $(VIMPROG) > vimcmd
+--- 115,121 ----
+ newtests: newtestssilent
+ @if exist messages (findstr "SKIPPED FAILED" messages > nul) && type messages
+
+! newtestssilent: $(NEW_TESTS_RES)
+
+ .vim.res:
+ @echo $(VIMPROG) > vimcmd
+*** ../vim-8.1.0722/src/testdir/Make_ming.mak 2018-07-14 21:48:42.444978086 +0200
+--- src/testdir/Make_ming.mak 2019-01-11 16:34:11.931532423 +0100
+***************
+*** 38,44 ****
+ SCRIPTS_BENCH = bench_re_freeze.out
+
+ # Must run test1 first to create small.vim.
+! $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS): $(SCRIPTS_FIRST)
+
+ .SUFFIXES: .in .out .res .vim
+
+--- 38,44 ----
+ SCRIPTS_BENCH = bench_re_freeze.out
+
+ # Must run test1 first to create small.vim.
+! $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
+
+ .SUFFIXES: .in .out .res .vim
+
+***************
+*** 110,116 ****
+ # 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
+--- 110,116 ----
+ # to write and a lot easier to read and debug.
+ # Limitation: Only works with the +eval feature.
+
+! newtests: $(NEW_TESTS_RES)
+
+ .vim.res:
+ @echo $(VIMPROG) > vimcmd
+*** ../vim-8.1.0722/src/Makefile 2019-01-01 13:20:05.936711257 +0100
+--- src/Makefile 2019-01-11 16:45:37.099057444 +0100
+***************
+*** 1565,1573 ****
+ DEST_MAN_RU = $(DEST_MAN_TOP)/ru.KOI8-R$(MAN1DIR)
+ DEST_MAN_RU_U = $(DEST_MAN_TOP)/ru.UTF-8$(MAN1DIR)
+
+! # The list of tests is common to all systems.
+ include Make_all.mak
+
+ # BASIC_SRC: files that are always used
+ # GUI_SRC: extra GUI files for current configuration
+ # ALL_GUI_SRC: all GUI files for Unix
+--- 1567,1578 ----
+ DEST_MAN_RU = $(DEST_MAN_TOP)/ru.KOI8-R$(MAN1DIR)
+ DEST_MAN_RU_U = $(DEST_MAN_TOP)/ru.UTF-8$(MAN1DIR)
+
+! # stuff common to all systems
+ include Make_all.mak
+
++ # get the list of tests
++ include testdir/Make_all.mak
++
+ # BASIC_SRC: files that are always used
+ # GUI_SRC: extra GUI files for current configuration
+ # ALL_GUI_SRC: all GUI files for Unix
+***************
+*** 2184,2194 ****
+ # Run individual NEW style test.
+ # These do not depend on the executable, compile it when needed.
+ $(NEW_TESTS):
+! cd testdir; rm -f $@.res test.log messages; $(MAKE) -f Makefile $@.res VIMPROG=../$(VIMTESTTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
+! @if test -f testdir/test.log; then \
+! cat testdir/test.log; \
+! fi
+! cat testdir/messages
+
+ newtests:
+ cd testdir; rm -f $@.res test.log messages; $(MAKE) -f Makefile newtestssilent VIMPROG=../$(VIMTESTTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
+--- 2189,2195 ----
+ # Run individual NEW style test.
+ # These do not depend on the executable, compile it when needed.
+ $(NEW_TESTS):
+! cd testdir; $(MAKE) $@ VIMPROG=../$(VIMTESTTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
+
+ newtests:
+ cd testdir; rm -f $@.res test.log messages; $(MAKE) -f Makefile newtestssilent VIMPROG=../$(VIMTESTTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
+*** ../vim-8.1.0722/src/Make_all.mak 2019-01-11 15:54:12.936039012 +0100
+--- src/Make_all.mak 2019-01-11 16:46:30.678703334 +0100
+***************
+*** 2,217 ****
+ # Common Makefile, defines the list of tests to run and other things.
+ #
+
+- # Individual tests, including the ones part of test_alot.
+- # Please keep sorted up to test_alot.
+- NEW_TESTS = \
+- test_arglist \
+- test_arabic \
+- test_assert \
+- test_assign \
+- test_autochdir \
+- test_autocmd \
+- test_autoload \
+- test_backspace_opt \
+- test_backup \
+- test_behave \
+- test_blockedit \
+- test_breakindent \
+- test_bufline \
+- test_bufwintabinfo \
+- test_cd \
+- test_cdo \
+- test_changedtick \
+- test_changelist \
+- test_channel \
+- test_charsearch \
+- test_charsearch_utf8 \
+- test_cindent \
+- test_clientserver \
+- test_close_count \
+- test_cmdline \
+- test_command_count \
+- test_comparators \
+- test_compiler \
+- test_conceal \
+- test_crypt \
+- test_cscope \
+- test_cursor_func \
+- test_curswant \
+- test_delete \
+- test_diffmode \
+- test_digraph \
+- test_display \
+- test_edit \
+- test_erasebackword \
+- test_escaped_glob \
+- test_eval_stuff \
+- test_ex_undo \
+- test_ex_z \
+- test_exit \
+- test_exec_while_if \
+- test_execute_func \
+- test_exists \
+- test_exists_autocmd \
+- test_expand \
+- test_expand_dllpath \
+- test_expand_func \
+- test_expr \
+- test_expr_utf8 \
+- test_farsi \
+- test_feedkeys \
+- test_file_perm \
+- test_file_size \
+- test_fileformat \
+- test_filetype \
+- test_filter_cmd \
+- test_filter_map \
+- test_find_complete \
+- test_findfile \
+- test_fixeol \
+- test_float_func \
+- test_fnameescape \
+- test_fnamemodify \
+- test_fold \
+- test_functions \
+- test_ga \
+- test_getcwd \
+- test_getvar \
+- test_gf \
+- test_glob2regpat \
+- test_global \
+- test_gn \
+- test_goto \
+- test_gui \
+- test_gui_init \
+- test_hardcopy \
+- test_help \
+- test_help_tagjump \
+- test_hide \
+- test_highlight \
+- test_history \
+- test_hlsearch \
+- test_iminsert \
+- test_increment \
+- test_increment_dbcs \
+- test_ins_complete \
+- test_job_fails \
+- test_join \
+- test_json \
+- test_jumplist \
+- test_jumps \
+- test_lambda \
+- test_langmap \
+- test_largefile \
+- test_let \
+- test_lineending \
+- test_lispwords \
+- test_listchars \
+- test_listdict \
+- test_listlbr \
+- test_listlbr_utf8 \
+- test_lua \
+- test_makeencoding \
+- test_man \
+- test_maparg \
+- test_mapping \
+- test_marks \
+- test_match \
+- test_matchadd_conceal \
+- test_matchadd_conceal_utf8 \
+- test_menu \
+- test_messages \
+- test_mksession \
+- test_mksession_utf8 \
+- test_modeline \
+- test_move \
+- test_nested_function \
+- test_netbeans \
+- test_normal \
+- test_number \
+- test_options \
+- test_packadd \
+- test_partial \
+- test_paste \
+- test_perl \
+- test_plus_arg_edit \
+- test_popup \
+- test_preview \
+- test_profile \
+- test_prompt_buffer \
+- test_put \
+- test_python2 \
+- test_python3 \
+- test_pyx2 \
+- test_pyx3 \
+- test_quickfix \
+- test_quotestar \
+- test_recover \
+- test_regex_char_classes \
+- test_regexp_latin \
+- test_regexp_utf8 \
+- test_registers \
+- test_reltime \
+- test_retab \
+- test_ruby \
+- test_scriptnames \
+- test_scroll_opt \
+- test_scrollbind \
+- test_search \
+- test_searchpos \
+- test_set \
+- test_sha256 \
+- test_signs \
+- test_smartindent \
+- test_sort \
+- test_source_utf8 \
+- test_spell \
+- test_startup \
+- test_startup_utf8 \
+- test_stat \
+- test_statusline \
+- test_substitute \
+- test_suspend \
+- test_swap \
+- test_syn_attr \
+- test_syntax \
+- test_system \
+- test_tab \
+- test_tabline \
+- test_tabpage \
+- test_tagcase \
+- test_tagjump \
+- test_taglist \
+- test_tcl \
+- test_terminal \
+- test_terminal_fail \
+- test_textformat \
+- test_textobjects \
+- test_textprop \
+- test_timers \
+- test_true_false \
+- test_undo \
+- test_unlet \
+- test_usercommands \
+- test_utf8 \
+- test_utf8_comparisons \
+- test_vartabs \
+- test_viminfo \
+- test_vimscript \
+- test_virtualedit \
+- test_visual \
+- test_winbar \
+- test_winbuf_close \
+- test_window_cmd \
+- test_window_id \
+- test_windows_home \
+- test_wordcount \
+- test_writefile \
+- test_xxd \
+- test_alot_latin \
+- test_alot_utf8 \
+- test_alot
+-
+ # Argument for running ctags.
+ TAGS_FILES = \
+ *.c \
+--- 2,7 ----
+*** ../vim-8.1.0722/src/testdir/Makefile 2018-10-07 15:42:04.279309175 +0200
+--- src/testdir/Makefile 2019-01-11 16:47:24.358346618 +0100
+***************
+*** 23,29 ****
+ default: nongui
+
+ # The list of tests is common to all systems.
+! # This defines NEW_TESTS, SCRIPTS_ALL, SCRIPTS_MORE* and SCRIPTS_GUI.
+ include Make_all.mak
+
+
+--- 23,30 ----
+ default: nongui
+
+ # The list of tests is common to all systems.
+! # This defines NEW_TESTS, NEW_TESTS_RES, SCRIPTS_ALL, SCRIPTS_MORE* and
+! # SCRIPTS_GUI.
+ include Make_all.mak
+
+
+***************
+*** 50,59 ****
+ else echo ALL DONE; \
+ fi"
+
+! $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS): $(VIMPROG)
+
+ # Must run test1 first to create small.vim.
+! $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS): $(SCRIPTS_FIRST)
+
+ RM_ON_RUN = test.out X* viminfo
+ RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim test.ok benchmark.out
+--- 51,71 ----
+ else echo ALL DONE; \
+ fi"
+
+! $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS_RES): $(VIMPROG)
+
+ # Must run test1 first to create small.vim.
+! $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
+!
+!
+! # Execute an individual new style test, e.g.:
+! # make test_largefile
+! $(NEW_TESTS):
+! rm -f $@.res test.log messages
+! $(MAKE) -f Makefile $@.res
+! @if test -f test.log; then \
+! cat test.log; \
+! fi
+! cat messages
+
+ RM_ON_RUN = test.out X* viminfo
+ RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim test.ok benchmark.out
+***************
+*** 128,134 ****
+ newtests: newtestssilent
+ @/bin/sh -c "if test -f messages && grep -q 'SKIPPED\|FAILED' messages; then cat messages; fi"
+
+! newtestssilent: $(NEW_TESTS)
+
+
+ .vim.res: writevimcmd
+--- 140,146 ----
+ newtests: newtestssilent
+ @/bin/sh -c "if test -f messages && grep -q 'SKIPPED\|FAILED' messages; then cat messages; fi"
+
+! newtestssilent: $(NEW_TESTS_RES)
+
+
+ .vim.res: writevimcmd
+*** ../vim-8.1.0722/src/testdir/README.txt 2018-11-16 16:21:01.637310049 +0100
+--- src/testdir/README.txt 2019-01-11 16:35:29.402984805 +0100
+***************
+*** 1,4 ****
+--- 1,5 ----
+ This directory contains tests for various Vim features.
++ For testing an indent script see runtime/indent/testdir/README.txt.
+
+ If it makes sense, add a new test method to an already existing file. You may
+ want to separate it from other tests with comment lines.
+***************
+*** 14,23 ****
+ TO ADD A NEW STYLE TEST:
+
+ 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
+--- 15,24 ----
+ TO ADD A NEW STYLE TEST:
+
+ 1) Create a test_<subject>.vim file.
+! 2) Add test_<subject>.res to NEW_TESTS_RES in Make_all.mak in alphabetical
+! order.
+! 3) Also add an entry "test_<subject>" to NEW_TESTS in Make_all.mak.
+! 4) Use make test_<subject> to run a single test.
+
+ 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
+*** ../vim-8.1.0722/src/Make_mvc.mak 2019-01-01 13:20:05.936711257 +0100
+--- src/Make_mvc.mak 2019-01-11 16:48:35.413871765 +0100
+***************
+*** 694,699 ****
+--- 694,700 ----
+ !endif # DEBUG
+
+ !include Make_all.mak
++ !include testdir\Make_all.mak
+
+ INCL = vim.h alloc.h arabic.h ascii.h ex_cmds.h farsi.h feature.h globals.h \
+ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
+*** ../vim-8.1.0722/src/version.c 2019-01-11 16:15:57.895171010 +0100
+--- src/version.c 2019-01-11 17:28:18.674893726 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 723,
+ /**/
+
+--
+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.0724 b/data/vim/patches/8.1.0724
new file mode 100644
index 000000000..ffdbf0fbe
--- /dev/null
+++ b/data/vim/patches/8.1.0724
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0724
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0724
+Problem: Build for MinGW fails.
+Solution: Avoid specifying dependencies in included makefile.
+Files: src/testdir/Make_all.mak, src/testdir/Makefile,
+ src/testdir/Make_dos.mak, src/testdir/Make_ming.mak
+
+
+*** ../vim-8.1.0723/src/testdir/Make_all.mak 2019-01-11 17:30:13.290241872 +0100
+--- src/testdir/Make_all.mak 2019-01-11 18:30:57.777664231 +0100
+***************
+*** 407,415 ****
+ test_alot_latin.res \
+ test_alot_utf8.res \
+ test_alot.res
+-
+-
+- # Explicit dependencies.
+- test49.out: test49.vim
+-
+- test_options.res test_alot.res: opt_test.vim
+--- 407,409 ----
+*** ../vim-8.1.0723/src/testdir/Makefile 2019-01-11 17:30:13.294241849 +0100
+--- src/testdir/Makefile 2019-01-11 18:26:46.839346268 +0100
+***************
+*** 33,38 ****
+--- 33,43 ----
+ $(SCRIPTS_MORE2) \
+ $(SCRIPTS_MORE4)
+
++ # Explicit dependencies.
++ test49.out: test49.vim
++
++ test_options.res test_alot.res: opt_test.vim
++
+ SCRIPTS_BENCH = bench_re_freeze.out
+
+ .SUFFIXES: .in .out .res .vim
+*** ../vim-8.1.0723/src/testdir/Make_dos.mak 2019-01-11 17:30:13.290241872 +0100
+--- src/testdir/Make_dos.mak 2019-01-11 18:29:21.286304144 +0100
+***************
+*** 132,136 ****
+--- 132,138 ----
+ $(VIMPROG) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $*.vim
+ @del vimcmd
+
++ test_options.res test_alot.res: opt_test.vim
++
+ opt_test.vim: ../option.c gen_opt_test.vim
+ $(VIMPROG) -u NONE -S gen_opt_test.vim --noplugin --not-a-term ../option.c
+*** ../vim-8.1.0723/src/testdir/Make_ming.mak 2019-01-11 17:30:13.290241872 +0100
+--- src/testdir/Make_ming.mak 2019-01-11 18:29:42.194164839 +0100
+***************
+*** 127,131 ****
+--- 127,133 ----
+ $(VIMPROG) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $<
+ @$(DEL) vimcmd
+
++ test_options.res test_alot.res: opt_test.vim
++
+ opt_test.vim: ../option.c gen_opt_test.vim
+ $(VIMPROG) -u NONE -S gen_opt_test.vim --noplugin --not-a-term ../option.c
+*** ../vim-8.1.0723/src/version.c 2019-01-11 17:30:13.294241849 +0100
+--- src/version.c 2019-01-11 19:18:49.969911340 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 724,
+ /**/
+
+--
+If you feel lonely, try schizophrenia.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0725 b/data/vim/patches/8.1.0725
new file mode 100644
index 000000000..66435792e
--- /dev/null
+++ b/data/vim/patches/8.1.0725
@@ -0,0 +1,162 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0725
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0725
+Problem: Conceal mode is not completely tested.
+Solution: Add tests for moving the cursor in Insert mode.
+Files: src/testdir/test_conceal.vim,
+ src/testdir/dumps/Test_conceal_two_windows_10.dump,
+ src/testdir/dumps/Test_conceal_two_windows_11.dump,
+ src/testdir/dumps/Test_conceal_two_windows_12.dump,
+ src/testdir/dumps/Test_conceal_two_windows_13.dump
+
+
+*** ../vim-8.1.0724/src/testdir/test_conceal.vim 2019-01-11 15:54:12.936039012 +0100
+--- src/testdir/test_conceal.vim 2019-01-11 20:02:46.339421547 +0100
+***************
+*** 91,96 ****
+--- 91,110 ----
+ call VerifyScreenDump(buf, 'Test_conceal_two_windows_09v', {})
+ call term_sendkeys(buf, "\<Esc>")
+
++ " Check moving the cursor while in insert mode.
++ call term_sendkeys(buf, ":set concealcursor=\r")
++ call term_sendkeys(buf, "a")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_10', {})
++ call term_sendkeys(buf, "\<Down>")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_11', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ " Check the "o" command
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_12', {})
++ call term_sendkeys(buf, "o")
++ call VerifyScreenDump(buf, 'Test_conceal_two_windows_13', {})
++ call term_sendkeys(buf, "\<Esc>")
++
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XTest_conceal')
+*** ../vim-8.1.0724/src/testdir/dumps/Test_conceal_two_windows_10.dump 2019-01-11 20:12:51.354918070 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_10.dump 2019-01-11 17:37:43.627513311 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| |||h|i|d@1|e|n||| |h>e|r|e| @57
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|5| @10|A|l@1
++ |-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@62
+*** ../vim-8.1.0724/src/testdir/dumps/Test_conceal_two_windows_11.dump 2019-01-11 20:12:51.354918070 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_11.dump 2019-01-11 17:37:44.679505186 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| |||h|i|d@1|e|n||> |t|h|r|e@1| @54
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|5| @10|A|l@1
++ |-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@62
+*** ../vim-8.1.0724/src/testdir/dumps/Test_conceal_two_windows_12.dump 2019-01-11 20:12:51.358918039 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_12.dump 2019-01-11 20:03:24.431125384 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| |||h|i|d@1|e|n>|| |t|h|r|e@1| @54
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ | +0&&@74
+*** ../vim-8.1.0724/src/testdir/dumps/Test_conceal_two_windows_13.dump 2019-01-11 20:12:51.362918012 +0100
+--- src/testdir/dumps/Test_conceal_two_windows_13.dump 2019-01-11 20:03:25.483117238 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
++ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
++ |t|w|o| @1|h|e|r|e| @65
++ |t|h|r|e@1| @1|t|h|r|e@1| @62
++ > @74
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|4|,|1| @11|A|l@1
++ |-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@62
+*** ../vim-8.1.0724/src/version.c 2019-01-11 19:19:40.685585822 +0100
+--- src/version.c 2019-01-11 19:59:10.601152008 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 725,
+ /**/
+
+--
+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.0726 b/data/vim/patches/8.1.0726
new file mode 100644
index 000000000..334ad6d18
--- /dev/null
+++ b/data/vim/patches/8.1.0726
@@ -0,0 +1,294 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0726
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0726
+Problem: Redrawing specifically for conceal feature.
+Solution: Use generic redrawing methods.
+Files: src/edit.c, src/gui.c, src/main.c, src/normal.c, src/screen.c,
+ src/proto/screen.pro, src/window.c
+
+
+*** ../vim-8.1.0725/src/edit.c 2019-01-11 13:02:20.101567912 +0100
+--- src/edit.c 2019-01-11 20:18:13.240623579 +0100
+***************
+*** 1745,1767 ****
+ }
+ #endif
+
+! if (must_redraw)
+! update_screen(0);
+! else if (clear_cmdline || redraw_cmdline)
+! showmode(); /* clear cmdline and show mode */
+! # if defined(FEAT_CONCEAL)
+ if ((conceal_update_lines
+ && (conceal_old_cursor_line != conceal_new_cursor_line
+ || conceal_cursor_line(curwin)))
+ || need_cursor_line_redraw)
+ {
+ if (conceal_old_cursor_line != conceal_new_cursor_line)
+! update_single_line(curwin, conceal_old_cursor_line);
+! update_single_line(curwin, conceal_new_cursor_line == 0
+! ? curwin->w_cursor.lnum : conceal_new_cursor_line);
+ curwin->w_valid &= ~VALID_CROW;
+ }
+! # endif
+ showruler(FALSE);
+ setcursor();
+ emsg_on_display = FALSE; /* may remove error message now */
+--- 1745,1768 ----
+ }
+ #endif
+
+! #if defined(FEAT_CONCEAL)
+ if ((conceal_update_lines
+ && (conceal_old_cursor_line != conceal_new_cursor_line
+ || conceal_cursor_line(curwin)))
+ || need_cursor_line_redraw)
+ {
+ if (conceal_old_cursor_line != conceal_new_cursor_line)
+! redrawWinline(curwin, conceal_old_cursor_line);
+! redrawWinline(curwin, conceal_new_cursor_line == 0
+! ? curwin->w_cursor.lnum : conceal_new_cursor_line);
+ curwin->w_valid &= ~VALID_CROW;
++ need_cursor_line_redraw = FALSE;
+ }
+! #endif
+! if (must_redraw)
+! update_screen(0);
+! else if (clear_cmdline || redraw_cmdline)
+! showmode(); /* clear cmdline and show mode */
+ showruler(FALSE);
+ setcursor();
+ emsg_on_display = FALSE; /* may remove error message now */
+*** ../vim-8.1.0725/src/gui.c 2018-12-22 18:44:49.100612553 +0100
+--- src/gui.c 2019-01-11 20:17:32.756910113 +0100
+***************
+*** 5166,5173 ****
+ last_cursormoved = curwin->w_cursor;
+ }
+
+- update_screen(0); /* may need to update the screen */
+- setcursor();
+ # ifdef FEAT_CONCEAL
+ if (conceal_update_lines
+ && (conceal_old_cursor_line != conceal_new_cursor_line
+--- 5166,5171 ----
+***************
+*** 5175,5185 ****
+ || need_cursor_line_redraw))
+ {
+ if (conceal_old_cursor_line != conceal_new_cursor_line)
+! update_single_line(curwin, conceal_old_cursor_line);
+! update_single_line(curwin, conceal_new_cursor_line);
+ curwin->w_valid &= ~VALID_CROW;
+ }
+ # endif
+ out_flush_cursor(TRUE, FALSE);
+ }
+ #endif
+--- 5173,5186 ----
+ || need_cursor_line_redraw))
+ {
+ if (conceal_old_cursor_line != conceal_new_cursor_line)
+! redrawWinline(curwin, conceal_old_cursor_line);
+! redrawWinline(curwin, conceal_new_cursor_line);
+ curwin->w_valid &= ~VALID_CROW;
++ need_cursor_line_redraw = FALSE;
+ }
+ # endif
++ update_screen(0); /* may need to update the screen */
++ setcursor();
+ out_flush_cursor(TRUE, FALSE);
+ }
+ #endif
+*** ../vim-8.1.0725/src/main.c 2018-12-27 00:28:27.497299324 +0100
+--- src/main.c 2019-01-11 20:22:02.995005173 +0100
+***************
+*** 1194,1199 ****
+--- 1194,1215 ----
+ last_cursormoved = curwin->w_cursor;
+ }
+
++ #if defined(FEAT_CONCEAL)
++ if (conceal_update_lines
++ && (conceal_old_cursor_line != conceal_new_cursor_line
++ || conceal_cursor_line(curwin)
++ || need_cursor_line_redraw))
++ {
++ if (conceal_old_cursor_line != conceal_new_cursor_line
++ && conceal_old_cursor_line
++ <= curbuf->b_ml.ml_line_count)
++ redrawWinline(curwin, conceal_old_cursor_line);
++ redrawWinline(curwin, conceal_new_cursor_line);
++ curwin->w_valid &= ~VALID_CROW;
++ need_cursor_line_redraw = FALSE;
++ }
++ #endif
++
+ /* Trigger TextChanged if b:changedtick differs. */
+ if (!finish_op && has_textchanged()
+ && curbuf->b_last_changedtick != CHANGEDTICK(curbuf))
+***************
+*** 1288,1309 ****
+ may_clear_sb_text(); /* clear scroll-back text on next msg */
+ showruler(FALSE);
+
+- #if defined(FEAT_CONCEAL)
+- if (conceal_update_lines
+- && (conceal_old_cursor_line != conceal_new_cursor_line
+- || conceal_cursor_line(curwin)
+- || need_cursor_line_redraw))
+- {
+- mch_disable_flush(); /* Stop issuing gui_mch_flush(). */
+- if (conceal_old_cursor_line != conceal_new_cursor_line
+- && conceal_old_cursor_line
+- <= curbuf->b_ml.ml_line_count)
+- update_single_line(curwin, conceal_old_cursor_line);
+- update_single_line(curwin, conceal_new_cursor_line);
+- mch_enable_flush();
+- curwin->w_valid &= ~VALID_CROW;
+- }
+- #endif
+ setcursor();
+ cursor_on();
+
+--- 1304,1309 ----
+*** ../vim-8.1.0725/src/normal.c 2019-01-11 14:37:16.689248837 +0100
+--- src/normal.c 2019-01-11 20:22:27.958829978 +0100
+***************
+*** 8512,8518 ****
+ {
+ #ifdef FEAT_CONCEAL
+ if (curwin->w_p_cole > 0 && oldline != curwin->w_cursor.lnum)
+! update_single_line(curwin, oldline);
+ #endif
+ /* When '#' is in 'cpoptions' ignore the count. */
+ if (vim_strchr(p_cpo, CPO_HASH) != NULL)
+--- 8512,8518 ----
+ {
+ #ifdef FEAT_CONCEAL
+ if (curwin->w_p_cole > 0 && oldline != curwin->w_cursor.lnum)
+! redrawWinline(curwin, oldline);
+ #endif
+ /* When '#' is in 'cpoptions' ignore the count. */
+ if (vim_strchr(p_cpo, CPO_HASH) != NULL)
+*** ../vim-8.1.0725/src/screen.c 2019-01-09 21:47:26.356341693 +0100
+--- src/screen.c 2019-01-11 20:23:24.722432006 +0100
+***************
+*** 927,981 ****
+ curs_columns(TRUE);
+ }
+ }
+-
+- void
+- update_single_line(win_T *wp, linenr_T lnum)
+- {
+- int row;
+- int j;
+- #ifdef SYN_TIME_LIMIT
+- proftime_T syntax_tm;
+- #endif
+-
+- /* Don't do anything if the screen structures are (not yet) valid. */
+- if (!screen_valid(TRUE) || updating_screen)
+- return;
+-
+- if (lnum >= wp->w_topline && lnum < wp->w_botline
+- && foldedCount(wp, lnum, &win_foldinfo) == 0)
+- {
+- #ifdef SYN_TIME_LIMIT
+- /* Set the time limit to 'redrawtime'. */
+- profile_setlimit(p_rdt, &syntax_tm);
+- syn_set_timeout(&syntax_tm);
+- #endif
+- update_prepare();
+-
+- row = 0;
+- for (j = 0; j < wp->w_lines_valid; ++j)
+- {
+- if (lnum == wp->w_lines[j].wl_lnum)
+- {
+- screen_start(); /* not sure of screen cursor */
+- # ifdef FEAT_SEARCH_EXTRA
+- init_search_hl(wp);
+- prepare_search_hl(wp, lnum);
+- # endif
+- win_line(wp, lnum, row, row + wp->w_lines[j].wl_size,
+- FALSE, FALSE);
+- break;
+- }
+- row += wp->w_lines[j].wl_size;
+- }
+-
+- update_finish();
+-
+- #ifdef SYN_TIME_LIMIT
+- syn_set_timeout(NULL);
+- #endif
+- }
+- need_cursor_line_redraw = FALSE;
+- }
+ #endif
+
+ #if defined(FEAT_SIGNS) || defined(PROTO)
+--- 927,932 ----
+*** ../vim-8.1.0725/src/proto/screen.pro 2019-01-09 21:47:26.356341693 +0100
+--- src/proto/screen.pro 2019-01-11 20:24:12.926094436 +0100
+***************
+*** 15,21 ****
+ int update_screen(int type_arg);
+ int conceal_cursor_line(win_T *wp);
+ void conceal_check_cursor_line(void);
+- void update_single_line(win_T *wp, linenr_T lnum);
+ void update_debug_sign(buf_T *buf, linenr_T lnum);
+ void updateWindow(win_T *wp);
+ int screen_get_current_line_off(void);
+--- 15,20 ----
+*** ../vim-8.1.0725/src/window.c 2019-01-06 17:25:23.876557968 +0100
+--- src/window.c 2019-01-11 20:24:06.470139628 +0100
+***************
+*** 4177,4185 ****
+ win_enter(wp, TRUE);
+
+ #ifdef FEAT_CONCEAL
+! /* Conceal cursor line in previous window, unconceal in current window. */
+ if (win_valid(owp) && owp->w_p_cole > 0 && !msg_scrolled)
+! update_single_line(owp, owp->w_cursor.lnum);
+ if (curwin->w_p_cole > 0 && !msg_scrolled)
+ need_cursor_line_redraw = TRUE;
+ #endif
+--- 4177,4185 ----
+ win_enter(wp, TRUE);
+
+ #ifdef FEAT_CONCEAL
+! // Conceal cursor line in previous window, unconceal in current window.
+ if (win_valid(owp) && owp->w_p_cole > 0 && !msg_scrolled)
+! redrawWinline(owp, owp->w_cursor.lnum);
+ if (curwin->w_p_cole > 0 && !msg_scrolled)
+ need_cursor_line_redraw = TRUE;
+ #endif
+*** ../vim-8.1.0725/src/version.c 2019-01-11 20:12:57.066876963 +0100
+--- src/version.c 2019-01-11 20:24:42.153889913 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 726,
+ /**/
+
+--
+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.0727 b/data/vim/patches/8.1.0727
new file mode 100644
index 000000000..9578ad4a2
--- /dev/null
+++ b/data/vim/patches/8.1.0727
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0727
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0727
+Problem: Compiler warning for sprintf() argument.
+Solution: Add type cast.
+Files: src/dosinst.c
+
+
+*** ../vim-8.1.0726/src/dosinst.c 2018-12-21 16:21:50.537239636 +0100
+--- src/dosinst.c 2019-01-11 18:17:23.239479753 +0100
+***************
+*** 473,479 ****
+ for (i = 0; ; i++)
+ {
+ sprintf(temp_uninst, "%s\\vimun%04X.exe", temp_dir,
+! (i + tick) & 0xFFFF);
+ if (CopyFile(uninst_exe, temp_uninst, TRUE))
+ break;
+ if (GetLastError() != ERROR_FILE_EXISTS)
+--- 473,479 ----
+ for (i = 0; ; i++)
+ {
+ sprintf(temp_uninst, "%s\\vimun%04X.exe", temp_dir,
+! (unsigned int)((i + tick) & 0xFFFF));
+ if (CopyFile(uninst_exe, temp_uninst, TRUE))
+ break;
+ if (GetLastError() != ERROR_FILE_EXISTS)
+*** ../vim-8.1.0726/src/version.c 2019-01-11 20:34:18.300314693 +0100
+--- src/version.c 2019-01-11 20:36:25.827157228 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 727,
+ /**/
+
+--
+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.0728 b/data/vim/patches/8.1.0728
new file mode 100644
index 000000000..a77e6647f
--- /dev/null
+++ b/data/vim/patches/8.1.0728
@@ -0,0 +1,175 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0728
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0728
+Problem: Cannot avoid breaking after a single space.
+Solution: Add the 'p' flag to 'formatoptions'. (Tom Ryder)
+Files: runtime/doc/change.txt, src/edit.c, src/option.h,
+ src/testdir/test_textformat.vim
+
+
+*** ../vim-8.1.0727/runtime/doc/change.txt 2018-11-22 03:07:30.940596247 +0100
+--- runtime/doc/change.txt 2019-01-11 21:16:00.361692960 +0100
+***************
+*** 1716,1721 ****
+--- 1720,1736 ----
+ // in the list ~
+ Becomes:
+ int i; // the index in the list ~
++ p Don't break lines at single spaces that follow periods. This is
++ intended to complement 'joinspaces' and |cpo-J|, for prose with
++ sentences separated by two spaces. For example, with 'textwidth' set
++ to 28: >
++ Surely you're joking, Mr. Feynman!
++ < Becomes: >
++ Surely you're joking,
++ Mr. Feynman!
++ < Instead of: >
++ Surely you're joking, Mr.
++ Feynman!
+
+
+ With 't' and 'c' you can specify when Vim performs auto-wrapping:
+*** ../vim-8.1.0727/src/edit.c 2019-01-11 20:34:18.296314730 +0100
+--- src/edit.c 2019-01-11 21:20:05.523988403 +0100
+***************
+*** 6498,6503 ****
+--- 6498,6504 ----
+ char_u *saved_text = NULL;
+ colnr_T col;
+ colnr_T end_col;
++ int wcc; // counter for whitespace chars
+
+ virtcol = get_nolist_virtcol()
+ + char2cells(c != NUL ? c : gchar_cursor());
+***************
+*** 6559,6572 ****
+ /* remember position of blank just before text */
+ end_col = curwin->w_cursor.col;
+
+! /* find start of sequence of blanks */
+ while (curwin->w_cursor.col > 0 && WHITECHAR(cc))
+ {
+ dec_cursor();
+ cc = gchar_cursor();
+ }
+ if (curwin->w_cursor.col == 0 && WHITECHAR(cc))
+ break; /* only spaces in front of text */
+ #ifdef FEAT_COMMENTS
+ /* Don't break until after the comment leader */
+ if (curwin->w_cursor.col < leader_len)
+--- 6560,6585 ----
+ /* remember position of blank just before text */
+ end_col = curwin->w_cursor.col;
+
+! // find start of sequence of blanks
+! wcc = 0;
+ while (curwin->w_cursor.col > 0 && WHITECHAR(cc))
+ {
+ dec_cursor();
+ cc = gchar_cursor();
++
++ // Increment count of how many whitespace chars in this
++ // group; we only need to know if it's more than one.
++ if (wcc < 2)
++ wcc++;
+ }
+ if (curwin->w_cursor.col == 0 && WHITECHAR(cc))
+ break; /* only spaces in front of text */
++
++ // Don't break after a period when 'formatoptions' has 'p' and
++ // there are less than two spaces.
++ if (has_format_option(FO_PERIOD_ABBR) && cc == '.' && wcc < 2)
++ continue;
++
+ #ifdef FEAT_COMMENTS
+ /* Don't break until after the comment leader */
+ if (curwin->w_cursor.col < leader_len)
+*** ../vim-8.1.0727/src/option.h 2018-12-03 20:49:58.767291066 +0100
+--- src/option.h 2019-01-11 21:16:00.365692934 +0100
+***************
+*** 101,110 ****
+ #define FO_WHITE_PAR 'w' /* trailing white space continues paragr. */
+ #define FO_AUTO 'a' /* automatic formatting */
+ #define FO_REMOVE_COMS 'j' /* remove comment leaders when joining lines */
+
+ #define DFLT_FO_VI "vt"
+ #define DFLT_FO_VIM "tcq"
+! #define FO_ALL "tcroq2vlb1mMBn,awj" /* for do_set() */
+
+ /* characters for the p_cpo option: */
+ #define CPO_ALTREAD 'a' /* ":read" sets alternate file name */
+--- 101,111 ----
+ #define FO_WHITE_PAR 'w' /* trailing white space continues paragr. */
+ #define FO_AUTO 'a' /* automatic formatting */
+ #define FO_REMOVE_COMS 'j' /* remove comment leaders when joining lines */
++ #define FO_PERIOD_ABBR 'p' /* don't break a single space after a period */
+
+ #define DFLT_FO_VI "vt"
+ #define DFLT_FO_VIM "tcq"
+! #define FO_ALL "tcroq2vlb1mMBn,awjp" /* for do_set() */
+
+ /* characters for the p_cpo option: */
+ #define CPO_ALTREAD 'a' /* ":read" sets alternate file name */
+*** ../vim-8.1.0727/src/testdir/test_textformat.vim 2018-12-31 23:58:20.246887218 +0100
+--- src/testdir/test_textformat.vim 2019-01-11 21:16:00.365692934 +0100
+***************
+*** 163,168 ****
+--- 163,194 ----
+ \ '# 1 xxxxx',
+ \ '# foobar'], getline(1, 2))
+
++ " Test the 'p' flag for 'formatoptions'
++ " First test without the flag: that it will break "Mr. Feynman" at the space
++ normal ggdG
++ setl tw=28 fo=tcq
++ call setline('.', 'Surely you''re joking, Mr. Feynman!')
++ normal gqq
++ call assert_equal([
++ \ 'Surely you''re joking, Mr.',
++ \ 'Feynman!'], getline(1, 2))
++ " Now test with the flag: that it will push the name with the title onto the
++ " next line
++ normal ggdG
++ setl fo+=p
++ call setline('.', 'Surely you''re joking, Mr. Feynman!')
++ normal gqq
++ call assert_equal([
++ \ 'Surely you''re joking,',
++ \ 'Mr. Feynman!'], getline(1, 2))
++ " Ensure that it will still break if two spaces are entered
++ normal ggdG
++ call setline('.', 'Surely you''re joking, Mr. Feynman!')
++ normal gqq
++ call assert_equal([
++ \ 'Surely you''re joking, Mr.',
++ \ 'Feynman!'], getline(1, 2))
++
+ setl ai& tw& fo& si& comments&
+ enew!
+ endfunc
+*** ../vim-8.1.0727/src/version.c 2019-01-11 20:37:07.714787395 +0100
+--- src/version.c 2019-01-11 21:17:56.504888657 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 728,
+ /**/
+
+--
+Microsoft says that MS-Windows is much better for you than Linux.
+That's like the Pope saying that catholicism is much better for
+you than protestantism.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0729 b/data/vim/patches/8.1.0729
new file mode 100644
index 000000000..8cae7bd59
--- /dev/null
+++ b/data/vim/patches/8.1.0729
@@ -0,0 +1,200 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0729
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0729
+Problem: There is a SourcePre autocommand event but not a SourcePost.
+Solution: Add the SourcePost autocommand event. (closes #3739)
+Files: src/vim.h, src/fileio.c, src/ex_cmds2.c, runtime/doc/autocmd.txt,
+ src/testdir/test_source.vim, src/testdir/Make_all.mak
+
+
+*** ../vim-8.1.0728/src/vim.h 2018-11-16 16:21:01.637310049 +0100
+--- src/vim.h 2019-01-11 22:36:50.325271889 +0100
+***************
+*** 1324,1329 ****
+--- 1324,1330 ----
+ 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_SOURCEPOST, // after sourcing a Vim script
+ EVENT_SPELLFILEMISSING, // spell file missing
+ EVENT_STDINREADPOST, // after reading from stdin
+ EVENT_STDINREADPRE, // before reading from stdin
+*** ../vim-8.1.0728/src/fileio.c 2018-12-24 00:22:35.739150151 +0100
+--- src/fileio.c 2019-01-12 13:24:18.082143365 +0100
+***************
+*** 7795,7802 ****
+ {"SessionLoadPost", EVENT_SESSIONLOADPOST},
+ {"ShellCmdPost", EVENT_SHELLCMDPOST},
+ {"ShellFilterPost", EVENT_SHELLFILTERPOST},
+- {"SourcePre", EVENT_SOURCEPRE},
+ {"SourceCmd", EVENT_SOURCECMD},
+ {"SpellFileMissing",EVENT_SPELLFILEMISSING},
+ {"StdinReadPost", EVENT_STDINREADPOST},
+ {"StdinReadPre", EVENT_STDINREADPRE},
+--- 7795,7803 ----
+ {"SessionLoadPost", EVENT_SESSIONLOADPOST},
+ {"ShellCmdPost", EVENT_SHELLCMDPOST},
+ {"ShellFilterPost", EVENT_SHELLFILTERPOST},
+ {"SourceCmd", EVENT_SOURCECMD},
++ {"SourcePre", EVENT_SOURCEPRE},
++ {"SourcePost", EVENT_SOURCEPOST},
+ {"SpellFileMissing",EVENT_SPELLFILEMISSING},
+ {"StdinReadPost", EVENT_STDINREADPOST},
+ {"StdinReadPre", EVENT_STDINREADPRE},
+*** ../vim-8.1.0728/src/ex_cmds2.c 2018-12-28 19:06:43.095216722 +0100
+--- src/ex_cmds2.c 2019-01-11 23:16:51.542941756 +0100
+***************
+*** 4360,4365 ****
+--- 4360,4366 ----
+ #ifdef FEAT_PROFILE
+ proftime_T wait_start;
+ #endif
++ int trigger_source_post = FALSE;
+
+ p = expand_env_save(fname);
+ if (p == NULL)
+***************
+*** 4384,4389 ****
+--- 4385,4394 ----
+ #else
+ retval = OK;
+ #endif
++ if (retval == OK)
++ // Apply SourcePost autocommands.
++ apply_autocmds(EVENT_SOURCEPOST, fname_exp, fname_exp,
++ FALSE, curbuf);
+ goto theend;
+ }
+
+***************
+*** 4653,4658 ****
+--- 4658,4666 ----
+ }
+ #endif
+
++ if (!got_int)
++ trigger_source_post = TRUE;
++
+ #ifdef FEAT_EVAL
+ /*
+ * After a "finish" in debug mode, need to break at first command of next
+***************
+*** 4679,4684 ****
+--- 4687,4696 ----
+ convert_setup(&cookie.conv, NULL, NULL);
+ #endif
+
++ if (trigger_source_post)
++ apply_autocmds(EVENT_SOURCEPOST, si->sn_name, si->sn_name,
++ FALSE, curbuf);
++
+ theend:
+ vim_free(fname_exp);
+ return retval;
+*** ../vim-8.1.0728/runtime/doc/autocmd.txt 2018-10-19 22:35:04.885189994 +0200
+--- runtime/doc/autocmd.txt 2019-01-11 22:49:53.065508811 +0100
+***************
+*** 917,922 ****
+--- 925,936 ----
+ *SourcePre*
+ SourcePre Before sourcing a Vim script. |:source|
+ <afile> is the name of the file being sourced.
++ *SourcePost*
++ SourcePost After sourcing a Vim script. |:source|
++ <afile> is the name of the file being sourced.
++ Not triggered when sourcing was interrupted.
++ Also triggered after a SourceCmd autocommand
++ was triggered.
+ *SourceCmd*
+ SourceCmd When sourcing a Vim script. |:source|
+ <afile> is the name of the file being sourced.
+*** ../vim-8.1.0728/src/testdir/test_source.vim 2019-01-12 13:24:41.469959774 +0100
+--- src/testdir/test_source.vim 2019-01-11 23:21:39.817674439 +0100
+***************
+*** 0 ****
+--- 1,38 ----
++ " Tests for the :source command.
++
++ func Test_source_autocmd()
++ call writefile([
++ \ 'let did_source = 1',
++ \ ], 'Xsourced')
++ au SourcePre *source* let did_source_pre = 1
++ au SourcePost *source* let did_source_post = 1
++
++ source Xsourced
++
++ call assert_equal(g:did_source, 1)
++ call assert_equal(g:did_source_pre, 1)
++ call assert_equal(g:did_source_post, 1)
++
++ call delete('Xsourced')
++ au! SourcePre
++ au! SourcePost
++ unlet g:did_source
++ unlet g:did_source_pre
++ unlet g:did_source_post
++ endfunc
++
++ func Test_source_cmd()
++ au SourceCmd *source* let did_source = expand('<afile>')
++ au SourcePre *source* let did_source_pre = 2
++ au SourcePost *source* let did_source_post = 2
++
++ source Xsourced
++
++ call assert_equal(g:did_source, 'Xsourced')
++ call assert_false(exists('g:did_source_pre'))
++ call assert_equal(g:did_source_post, 2)
++
++ au! SourceCmd
++ au! SourcePre
++ au! SourcePost
++ endfunc
+*** ../vim-8.1.0728/src/testdir/Make_all.mak 2019-01-11 19:19:40.685585822 +0100
+--- src/testdir/Make_all.mak 2019-01-11 22:41:31.703179473 +0100
+***************
+*** 222,227 ****
+--- 222,228 ----
+ test_signs \
+ test_smartindent \
+ test_sort \
++ test_source \
+ test_source_utf8 \
+ test_spell \
+ test_startup \
+***************
+*** 376,381 ****
+--- 377,383 ----
+ test_shortpathname.res \
+ test_signs.res \
+ test_smartindent.res \
++ test_source.res \
+ test_spell.res \
+ test_startup.res \
+ test_stat.res \
+*** ../vim-8.1.0728/src/version.c 2019-01-11 22:15:00.519123428 +0100
+--- src/version.c 2019-01-12 13:21:41.247375355 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 729,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+168. You have your own domain name.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0730 b/data/vim/patches/8.1.0730
new file mode 100644
index 000000000..a0c165722
--- /dev/null
+++ b/data/vim/patches/8.1.0730
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0730
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0730
+Problem: Compiler warning for get_buf_arg() unused.
+Solution: Add #ifdef. (John Marriott)
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.0729/src/evalfunc.c 2019-01-11 14:37:16.685248865 +0100
+--- src/evalfunc.c 2019-01-12 13:47:24.689298093 +0100
+***************
+*** 1919,1924 ****
+--- 1919,1925 ----
+ return buf;
+ }
+
++ #ifdef FEAT_SIGNS
+ /*
+ * Get the buffer from "arg" and give an error and return NULL if it is not
+ * valid.
+***************
+*** 1935,1940 ****
+--- 1936,1942 ----
+ EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(arg));
+ return buf;
+ }
++ #endif
+
+ /*
+ * "bufname(expr)" function
+*** ../vim-8.1.0729/src/version.c 2019-01-12 13:25:42.633479785 +0100
+--- src/version.c 2019-01-12 13:48:19.016923761 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 730,
+ /**/
+
+--
+Keep America beautiful. Swallow your beer cans.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0731 b/data/vim/patches/8.1.0731
new file mode 100644
index 000000000..ee9223a98
--- /dev/null
+++ b/data/vim/patches/8.1.0731
@@ -0,0 +1,228 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0731
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0731
+Problem: JS encoding does not handle negative infinity.
+Solution: Add support for negative infinity for JS encoding. (Dominique
+ Pelle, closes #3792)
+Files: runtime/doc/eval.txt, src/json.c, src/testdir/test_json.vim
+
+
+*** ../vim-8.1.0730/runtime/doc/eval.txt 2019-01-11 14:49:25.380107431 +0100
+--- runtime/doc/eval.txt 2019-01-12 14:20:11.501189651 +0100
+***************
+*** 5706,5712 ****
+ "[1, 2, ]" is the same as "[1, 2]".
+ - More floating point numbers are recognized, e.g. "1." for
+ "1.0", or "001.2" for "1.2". Special floating point values
+! "Infinity" and "NaN" (capitalization ignored) are accepted.
+ - Leading zeroes in integer numbers are ignored, e.g. "012"
+ for "12" or "-012" for "-12".
+ - Capitalization is ignored in literal names null, true or
+--- 5726,5733 ----
+ "[1, 2, ]" is the same as "[1, 2]".
+ - More floating point numbers are recognized, e.g. "1." for
+ "1.0", or "001.2" for "1.2". Special floating point values
+! "Infinity", "-Infinity" and "NaN" (capitalization ignored)
+! are accepted.
+ - Leading zeroes in integer numbers are ignored, e.g. "012"
+ for "12" or "-012" for "-12".
+ - Capitalization is ignored in literal names null, true or
+***************
+*** 5735,5740 ****
+--- 5756,5762 ----
+ Float floating point number
+ Float nan "NaN"
+ Float inf "Infinity"
++ Float -inf "-Infinity"
+ String in double quotes (possibly null)
+ Funcref not possible, error
+ List as an array (possibly null); when
+*** ../vim-8.1.0730/src/json.c 2018-12-21 16:04:16.324437435 +0100
+--- src/json.c 2019-01-12 14:20:11.501189651 +0100
+***************
+*** 316,322 ****
+ if (isnan(val->vval.v_float))
+ ga_concat(gap, (char_u *)"NaN");
+ else if (isinf(val->vval.v_float))
+! ga_concat(gap, (char_u *)"Infinity");
+ else
+ # endif
+ {
+--- 316,327 ----
+ if (isnan(val->vval.v_float))
+ ga_concat(gap, (char_u *)"NaN");
+ else if (isinf(val->vval.v_float))
+! {
+! if (val->vval.v_float < 0.0)
+! ga_concat(gap, (char_u *)"-Infinity");
+! else
+! ga_concat(gap, (char_u *)"Infinity");
+! }
+ else
+ # endif
+ {
+***************
+*** 736,742 ****
+ break;
+
+ default:
+! if (VIM_ISDIGIT(*p) || *p == '-')
+ {
+ #ifdef FEAT_FLOAT
+ char_u *sp = p;
+--- 741,747 ----
+ break;
+
+ default:
+! if (VIM_ISDIGIT(*p) || (*p == '-' && VIM_ISDIGIT(p[1])))
+ {
+ #ifdef FEAT_FLOAT
+ char_u *sp = p;
+***************
+*** 834,839 ****
+--- 839,855 ----
+ retval = OK;
+ break;
+ }
++ if (STRNICMP((char *)p, "-Infinity", 9) == 0)
++ {
++ reader->js_used += 9;
++ if (cur_item != NULL)
++ {
++ cur_item->v_type = VAR_FLOAT;
++ cur_item->vval.v_float = -INFINITY;
++ }
++ retval = OK;
++ break;
++ }
+ if (STRNICMP((char *)p, "Infinity", 8) == 0)
+ {
+ reader->js_used += 8;
+***************
+*** 851,856 ****
+--- 867,873 ----
+ if (
+ (len < 5 && STRNICMP((char *)p, "false", len) == 0)
+ #ifdef FEAT_FLOAT
++ || (len < 9 && STRNICMP((char *)p, "-Infinity", len) == 0)
+ || (len < 8 && STRNICMP((char *)p, "Infinity", len) == 0)
+ || (len < 3 && STRNICMP((char *)p, "NaN", len) == 0)
+ #endif
+***************
+*** 1072,1078 ****
+ * Return FAIL if the message has a decoding error.
+ * Return MAYBE if the message is truncated, need to read more.
+ * This only works reliable if the message contains an object, array or
+! * string. A number might be trucated without knowing.
+ * Does not advance the reader.
+ */
+ int
+--- 1089,1095 ----
+ * Return FAIL if the message has a decoding error.
+ * Return MAYBE if the message is truncated, need to read more.
+ * This only works reliable if the message contains an object, array or
+! * string. A number might be truncated without knowing.
+ * Does not advance the reader.
+ */
+ int
+*** ../vim-8.1.0730/src/testdir/test_json.vim 2018-03-13 13:06:11.000000000 +0100
+--- src/testdir/test_json.vim 2019-01-12 14:20:11.501189651 +0100
+***************
+*** 29,36 ****
+ if has('float')
+ let s:jsonfl = '12.34'
+ let s:varfl = 12.34
+! let s:jsoninf = 'Infinity'
+! let s:varinf = 1.0 / 0.0
+ let s:jsonnan = 'NaN'
+ let s:varnan = 0.0 / 0.0
+ endif
+--- 29,38 ----
+ if has('float')
+ let s:jsonfl = '12.34'
+ let s:varfl = 12.34
+! let s:jsonneginf = '-Infinity'
+! let s:jsonposinf = 'Infinity'
+! let s:varneginf = -1.0 / 0.0
+! let s:varposinf = 1.0 / 0.0
+ let s:jsonnan = 'NaN'
+ let s:varnan = 0.0 / 0.0
+ endif
+***************
+*** 85,91 ****
+ call assert_equal(s:jsonnr, json_encode(s:varnr))
+ if has('float')
+ call assert_equal(s:jsonfl, json_encode(s:varfl))
+! call assert_equal(s:jsoninf, json_encode(s:varinf))
+ call assert_equal(s:jsonnan, json_encode(s:varnan))
+ endif
+
+--- 87,94 ----
+ call assert_equal(s:jsonnr, json_encode(s:varnr))
+ if has('float')
+ call assert_equal(s:jsonfl, json_encode(s:varfl))
+! call assert_equal(s:jsonneginf, json_encode(s:varneginf))
+! call assert_equal(s:jsonposinf, json_encode(s:varposinf))
+ call assert_equal(s:jsonnan, json_encode(s:varnan))
+ endif
+
+***************
+*** 202,208 ****
+ call assert_equal(s:jsonnr, js_encode(s:varnr))
+ if has('float')
+ call assert_equal(s:jsonfl, js_encode(s:varfl))
+! call assert_equal(s:jsoninf, js_encode(s:varinf))
+ call assert_equal(s:jsonnan, js_encode(s:varnan))
+ endif
+
+--- 205,212 ----
+ call assert_equal(s:jsonnr, js_encode(s:varnr))
+ if has('float')
+ call assert_equal(s:jsonfl, js_encode(s:varfl))
+! call assert_equal(s:jsonneginf, js_encode(s:varneginf))
+! call assert_equal(s:jsonposinf, js_encode(s:varposinf))
+ call assert_equal(s:jsonnan, js_encode(s:varnan))
+ endif
+
+***************
+*** 242,248 ****
+ call assert_equal(s:varnr, js_decode(s:jsonnr))
+ if has('float')
+ call assert_equal(s:varfl, js_decode(s:jsonfl))
+! call assert_equal(s:varinf, js_decode(s:jsoninf))
+ call assert_true(isnan(js_decode(s:jsonnan)))
+ endif
+
+--- 246,253 ----
+ call assert_equal(s:varnr, js_decode(s:jsonnr))
+ if has('float')
+ call assert_equal(s:varfl, js_decode(s:jsonfl))
+! call assert_equal(s:varneginf, js_decode(s:jsonneginf))
+! call assert_equal(s:varposinf, js_decode(s:jsonposinf))
+ call assert_true(isnan(js_decode(s:jsonnan)))
+ endif
+
+*** ../vim-8.1.0730/src/version.c 2019-01-12 13:50:27.712026891 +0100
+--- src/version.c 2019-01-12 14:21:33.808675256 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 731,
+ /**/
+
+--
+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.0732 b/data/vim/patches/8.1.0732
new file mode 100644
index 000000000..e6454120a
--- /dev/null
+++ b/data/vim/patches/8.1.0732
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0732
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0732
+Problem: Cannot build without the eval feature.
+Solution: Make a copy of the sourced file name.
+Files: src/ex_cmds2.c
+
+
+*** ../vim-8.1.0731/src/ex_cmds2.c 2019-01-12 13:25:42.633479785 +0100
+--- src/ex_cmds2.c 2019-01-12 15:00:20.296170451 +0100
+***************
+*** 4556,4562 ****
+ }
+ si = &SCRIPT_ITEM(current_sctx.sc_sid);
+ si->sn_name = fname_exp;
+! fname_exp = NULL;
+ # ifdef UNIX
+ if (stat_ok)
+ {
+--- 4556,4562 ----
+ }
+ si = &SCRIPT_ITEM(current_sctx.sc_sid);
+ si->sn_name = fname_exp;
+! fname_exp = vim_strsave(si->sn_name); // used for autocmd
+ # ifdef UNIX
+ if (stat_ok)
+ {
+***************
+*** 4688,4695 ****
+ #endif
+
+ if (trigger_source_post)
+! apply_autocmds(EVENT_SOURCEPOST, si->sn_name, si->sn_name,
+! FALSE, curbuf);
+
+ theend:
+ vim_free(fname_exp);
+--- 4688,4694 ----
+ #endif
+
+ if (trigger_source_post)
+! apply_autocmds(EVENT_SOURCEPOST, fname_exp, fname_exp, FALSE, curbuf);
+
+ theend:
+ vim_free(fname_exp);
+*** ../vim-8.1.0731/src/version.c 2019-01-12 14:24:22.627597552 +0100
+--- src/version.c 2019-01-12 15:14:48.038083702 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 732,
+ /**/
+
+--
+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.0733 b/data/vim/patches/8.1.0733
new file mode 100644
index 000000000..05552af2d
--- /dev/null
+++ b/data/vim/patches/8.1.0733
@@ -0,0 +1,460 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0733
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0733
+Problem: Too many #ifdefs for the multi-byte feature.
+Solution: Tentatively always enable the multi-byte feature. If you have a
+ problem with this, please discuss on the Vim maillist.
+Files: src/configure.ac, src/auto/configure, src/feature.h, src/Makefile,
+ src/Make_bc5.mak, src/Make_cyg_ming.mak, src/Make_mvc.mak
+
+
+*** ../vim-8.1.0732/src/configure.ac 2018-12-30 22:55:43.667136719 +0100
+--- src/configure.ac 2019-01-12 15:44:12.958057422 +0100
+***************
+*** 2138,2147 ****
+ AC_MSG_CHECKING(--enable-multibyte argument)
+ AC_ARG_ENABLE(multibyte,
+ [ --enable-multibyte Include multibyte editing support.], ,
+! [enable_multibyte="no"])
+ AC_MSG_RESULT($enable_multibyte)
+ if test "$enable_multibyte" = "yes"; then
+ AC_DEFINE(FEAT_MBYTE)
+ fi
+
+ dnl Right-to-Left language support for Vim will be included with big features,
+--- 2138,2150 ----
+ AC_MSG_CHECKING(--enable-multibyte argument)
+ AC_ARG_ENABLE(multibyte,
+ [ --enable-multibyte Include multibyte editing support.], ,
+! [enable_multibyte="yes"])
+ AC_MSG_RESULT($enable_multibyte)
+ if test "$enable_multibyte" = "yes"; then
+ AC_DEFINE(FEAT_MBYTE)
++ else
++ AC_MSG_ERROR([The multi-byte feature can no longer be disabled. If you have
++ a problem with this, discuss on the Vim mailing list.])
+ fi
+
+ dnl Right-to-Left language support for Vim will be included with big features,
+***************
+*** 4416,4442 ****
+ dnl Since no FEAT_CLIPBOARD, no longer need for os_macosx.m.
+ OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
+ OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
+! if test "$enable_multibyte" = "yes"; then
+! AC_MSG_RESULT([yes, we need CoreServices])
+! LIBS="$LIBS -framework CoreServices"
+! else
+! dnl Since no FEAT_MBYTE, no longer need for os_mac_conv.c.
+! AC_MSG_RESULT([no])
+! OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_mac_conv.c++'`
+! OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_mac_conv.o++'`
+! CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's+-DMACOS_X_DARWIN++'`
+! fi
+ else
+ AC_MSG_RESULT([yes, we need AppKit])
+ LIBS="$LIBS -framework AppKit"
+- if test "$features" = "small" -a "$enable_multibyte" = "no"; then
+- dnl Since FEAT_CLIPBOARD is to be defined in vim.h for FEAT_SMALL, define
+- dnl FEAT_MBYTE in order not to compromise the interoperability of the
+- dnl clipboard.
+- AC_MSG_NOTICE([+multi_byte will be set in favor of +clipboard])
+- enable_multibyte=yes
+- AC_DEFINE(FEAT_MBYTE)
+- fi
+ fi
+ else
+ AC_MSG_RESULT([no])
+--- 4419,4429 ----
+ dnl Since no FEAT_CLIPBOARD, no longer need for os_macosx.m.
+ OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
+ OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
+! AC_MSG_RESULT([yes, we need CoreServices])
+! LIBS="$LIBS -framework CoreServices"
+ else
+ AC_MSG_RESULT([yes, we need AppKit])
+ LIBS="$LIBS -framework AppKit"
+ fi
+ else
+ AC_MSG_RESULT([no])
+*** ../vim-8.1.0732/src/auto/configure 2018-12-30 22:55:43.671136682 +0100
+--- src/auto/configure 2019-01-12 15:45:50.097385205 +0100
+***************
+*** 7959,7965 ****
+ if test "${enable_multibyte+set}" = set; then :
+ enableval=$enable_multibyte;
+ else
+! enable_multibyte="no"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
+--- 7959,7965 ----
+ if test "${enable_multibyte+set}" = set; then :
+ enableval=$enable_multibyte;
+ else
+! enable_multibyte="yes"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
+***************
+*** 7967,7972 ****
+--- 7967,7975 ----
+ if test "$enable_multibyte" = "yes"; then
+ $as_echo "#define FEAT_MBYTE 1" >>confdefs.h
+
++ else
++ as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
++ a problem with this, discuss on the Vim mailing list." "$LINENO" 5
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
+***************
+*** 14813,14840 ****
+ if test "$features" = "tiny"; then
+ OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
+ OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
+! if test "$enable_multibyte" = "yes"; then
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
+ $as_echo "yes, we need CoreServices" >&6; }
+! LIBS="$LIBS -framework CoreServices"
+! else
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+! $as_echo "no" >&6; }
+! OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_mac_conv.c++'`
+! OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_mac_conv.o++'`
+! CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's+-DMACOS_X_DARWIN++'`
+! fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
+ $as_echo "yes, we need AppKit" >&6; }
+ LIBS="$LIBS -framework AppKit"
+- if test "$features" = "small" -a "$enable_multibyte" = "no"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: +multi_byte will be set in favor of +clipboard" >&5
+- $as_echo "$as_me: +multi_byte will be set in favor of +clipboard" >&6;}
+- enable_multibyte=yes
+- $as_echo "#define FEAT_MBYTE 1" >>confdefs.h
+-
+- fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+--- 14816,14828 ----
+ if test "$features" = "tiny"; then
+ OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
+ OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
+ $as_echo "yes, we need CoreServices" >&6; }
+! LIBS="$LIBS -framework CoreServices"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
+ $as_echo "yes, we need AppKit" >&6; }
+ LIBS="$LIBS -framework AppKit"
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+*** ../vim-8.1.0732/src/feature.h 2019-01-11 14:37:16.689248837 +0100
+--- src/feature.h 2019-01-12 15:53:11.678485195 +0100
+***************
+*** 282,288 ****
+
+ /*
+ * +arabic Arabic keymap and shaping support.
+! * Requires FEAT_RIGHTLEFT and FEAT_MBYTE.
+ *
+ * Disabled for EBCDIC as it requires multibyte.
+ */
+--- 282,288 ----
+
+ /*
+ * +arabic Arabic keymap and shaping support.
+! * Requires FEAT_RIGHTLEFT
+ *
+ * Disabled for EBCDIC as it requires multibyte.
+ */
+***************
+*** 597,612 ****
+ #endif
+
+ /*
+! * +multi_byte Generic multi-byte character handling. Doesn't work
+! * with 16 bit ints. Required for GTK+ 2.
+! *
+! * Disabled for EBCDIC:
+! * Multibyte support doesn't work on z/OS Unix currently.
+ */
+! #if (defined(FEAT_NORMAL) || defined(FEAT_GUI_GTK) || defined(FEAT_ARABIC)) \
+! && !defined(FEAT_MBYTE) && VIM_SIZEOF_INT >= 4 && !defined(EBCDIC)
+ # define FEAT_MBYTE
+ #endif
+
+ /* Define this if you want to use 16 bit Unicode only, reduces memory used for
+ * the screen structures. */
+--- 597,611 ----
+ #endif
+
+ /*
+! * +multi_byte Generic multi-byte character handling.
+! * Now always enabled.
+ */
+! #if !defined(FEAT_MBYTE)
+ # define FEAT_MBYTE
+ #endif
++ #if VIM_SIZEOF_INT < 4 && !defined(PROTO)
++ Error: Vim only works with 32 bit int or larger
++ #endif
+
+ /* Define this if you want to use 16 bit Unicode only, reduces memory used for
+ * the screen structures. */
+***************
+*** 621,638 ****
+ /* #define FEAT_MBYTE_IME */
+ # endif
+
+- /* Input methods are only useful with +multi_byte. */
+- #if (defined(FEAT_MBYTE_IME) || defined(FEAT_XIM)) && !defined(FEAT_MBYTE)
+- # define FEAT_MBYTE
+- #endif
+-
+- #if defined(FEAT_MBYTE) && VIM_SIZEOF_INT < 4 && !defined(PROTO)
+- Error: Can only handle multi-byte feature with 32 bit int or larger
+- #endif
+-
+ /* Use iconv() when it's available. */
+! #if defined(FEAT_MBYTE) && ((defined(HAVE_ICONV_H) && defined(HAVE_ICONV)) \
+! || defined(DYNAMIC_ICONV))
+ # define USE_ICONV
+ #endif
+
+--- 620,627 ----
+ /* #define FEAT_MBYTE_IME */
+ # endif
+
+ /* Use iconv() when it's available. */
+! #if (defined(HAVE_ICONV_H) && defined(HAVE_ICONV)) || defined(DYNAMIC_ICONV)
+ # define USE_ICONV
+ #endif
+
+***************
+*** 669,675 ****
+ * +xfontset X fontset support. For outputting wide characters.
+ */
+ #ifndef FEAT_XFONTSET
+! # if defined(FEAT_MBYTE) && defined(HAVE_X11) && !defined(FEAT_GUI_GTK)
+ # define FEAT_XFONTSET
+ # else
+ /* # define FEAT_XFONTSET */
+--- 658,664 ----
+ * +xfontset X fontset support. For outputting wide characters.
+ */
+ #ifndef FEAT_XFONTSET
+! # if defined(HAVE_X11) && !defined(FEAT_GUI_GTK)
+ # define FEAT_XFONTSET
+ # else
+ /* # define FEAT_XFONTSET */
+***************
+*** 1277,1286 ****
+
+ /*
+ * +terminal ":terminal" command. Runs a terminal in a window.
+! * requires +channel and +multibyte
+ */
+! #if defined(FEAT_TERMINAL) && \
+! !(defined(FEAT_JOB_CHANNEL) && defined(FEAT_MBYTE))
+ # undef FEAT_TERMINAL
+ #endif
+ #if defined(FEAT_TERMINAL) && !defined(CURSOR_SHAPE)
+--- 1266,1274 ----
+
+ /*
+ * +terminal ":terminal" command. Runs a terminal in a window.
+! * requires +channel
+ */
+! #if defined(FEAT_TERMINAL) && !defined(FEAT_JOB_CHANNEL)
+ # undef FEAT_TERMINAL
+ #endif
+ #if defined(FEAT_TERMINAL) && !defined(CURSOR_SHAPE)
+*** ../vim-8.1.0732/src/Makefile 2019-01-11 17:30:13.290241872 +0100
+--- src/Makefile 2019-01-12 15:49:10.156058435 +0100
+***************
+*** 493,503 ****
+ #CONF_OPT_TERMINAL = --disable-terminal
+
+ # MULTIBYTE - To edit multi-byte characters.
+! # Uncomment this when you want to edit a multibyte language.
+! # It's automatically enabled with normal features, GTK or IME support.
+! # Note: Compile on a machine where setlocale() actually works, otherwise the
+! # 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.
+--- 493,499 ----
+ #CONF_OPT_TERMINAL = --disable-terminal
+
+ # MULTIBYTE - To edit multi-byte characters.
+! # This is now always enabled.
+
+ # When building with at least "big" features, right-left, Arabic and Farsi
+ # features are enabled. Use this to disable them.
+*** ../vim-8.1.0732/src/Make_bc5.mak 2019-01-01 13:20:05.936711257 +0100
+--- src/Make_bc5.mak 2019-01-12 15:54:39.013907703 +0100
+***************
+*** 61,70 ****
+ # of Ruby will cause a compile error on these systems.
+ # RUBY_VER_LONG same, but in format with dot. (1.6)
+ # DYNAMIC_RUBY no or yes: use yes to load the Ruby DLL dynamically (no)
+- # MBYTE no or yes: set to yes for multi-byte support (yes)
+- # NOTE: multi-byte support is broken in the Borland libraries,
+- # not everything will work properly! Esp. handling multi-byte
+- # file names.
+ # IME no or yes: set to yes for multi-byte IME support (yes)
+ # DYNAMIC_IME no or yes: set to yes to load imm32.dll dynamically (yes)
+ # GETTEXT no or yes: set to yes for multi-language support (yes)
+--- 61,66 ----
+***************
+*** 104,114 ****
+ GUI = yes
+ !endif
+
+- ### MBYTE: yes for multibyte support, no to disable it.
+- !if ("$(MBYTE)"=="")
+- MBYTE = yes
+- !endif
+-
+ ### IME: yes for multibyte support, no to disable it.
+ !if ("$(IME)"=="")
+ IME = yes
+--- 100,105 ----
+***************
+*** 216,222 ****
+ ("$(RUBY)"=="") && \
+ ("$(ICONV)"!="yes") && \
+ ("$(IME)"!="yes") && \
+- ("$(MBYTE)"!="yes") && \
+ ("$(XPM)"=="")
+ FASTCALL = yes
+ !endif
+--- 207,212 ----
+***************
+*** 397,405 ****
+ DEFINES = $(DEFINES) -DFEAT_OLE
+ !endif
+ #
+- !if ("$(MBYTE)"=="yes")
+- MBDEFINES = $(MBDEFINES) -DFEAT_MBYTE
+- !endif
+ !if ("$(IME)"=="yes")
+ MBDEFINES = $(MBDEFINES) -DFEAT_MBYTE_IME
+ !if ("$(DYNAMIC_IME)" == "yes")
+--- 387,392 ----
+***************
+*** 687,695 ****
+ !if ("$(FASTCALL)"=="yes")
+ MSG = $(MSG) FASTCALL
+ !endif
+- !if ("$(MBYTE)"=="yes")
+- MSG = $(MSG) MBYTE
+- !endif
+ !if ("$(IME)"=="yes")
+ MSG = $(MSG) IME
+ ! if "$(DYNAMIC_IME)" == "yes"
+--- 674,679 ----
+*** ../vim-8.1.0732/src/Make_cyg_ming.mak 2019-01-01 13:20:05.936711257 +0100
+--- src/Make_cyg_ming.mak 2019-01-12 15:55:03.373745987 +0100
+***************
+*** 65,73 ****
+ ICONV=yes
+ GETTEXT=yes
+
+- # Set to yes to include multibyte support.
+- MBYTE=yes
+-
+ # Set to yes to include IME support.
+ IME=yes
+ DYNAMIC_IME=yes
+--- 65,70 ----
+***************
+*** 911,920 ****
+ USE_STDCPLUS = yes
+ endif
+
+- ifeq (yes, $(MBYTE))
+- DEFINES += -DFEAT_MBYTE
+- endif
+-
+ ifeq (yes, $(IME))
+ DEFINES += -DFEAT_MBYTE_IME
+ ifeq (yes, $(DYNAMIC_IME))
+--- 908,913 ----
+*** ../vim-8.1.0732/src/Make_mvc.mak 2019-01-11 17:30:13.294241849 +0100
+--- src/Make_mvc.mak 2019-01-12 15:55:35.133534759 +0100
+***************
+*** 26,40 ****
+ # GUI interface: GUI=yes (default is no)
+ #
+ # GUI with DirectWrite (DirectX): DIRECTX=yes
+! # (default is yes if GUI=yes, requires GUI=yes and MBYTE=yes)
+ #
+ # Color emoji support: COLOR_EMOJI=yes
+ # (default is yes if DIRECTX=yes, requires WinSDK 8.1 or later.)
+ #
+ # OLE interface: OLE=yes (usually with GUI=yes)
+ #
+- # Multibyte support: MBYTE=yes (default is yes for NORMAL, BIG, HUGE)
+- #
+ # IME support: IME=yes (requires GUI=yes)
+ # DYNAMIC_IME=[yes or no] (to load the imm32.dll dynamically, default
+ # is yes)
+--- 26,38 ----
+ # GUI interface: GUI=yes (default is no)
+ #
+ # GUI with DirectWrite (DirectX): DIRECTX=yes
+! # (default is yes if GUI=yes, requires GUI=yes)
+ #
+ # Color emoji support: COLOR_EMOJI=yes
+ # (default is yes if DIRECTX=yes, requires WinSDK 8.1 or later.)
+ #
+ # OLE interface: OLE=yes (usually with GUI=yes)
+ #
+ # IME support: IME=yes (requires GUI=yes)
+ # DYNAMIC_IME=[yes or no] (to load the imm32.dll dynamically, default
+ # is yes)
+***************
+*** 786,796 ****
+ !if "$(GIME)" == "yes"
+ CFLAGS = $(CFLAGS) -DGLOBAL_IME
+ OBJ = $(OBJ) $(OUTDIR)\dimm_i.obj $(OUTDIR)\glbl_ime.obj
+- MBYTE = yes
+- !endif
+-
+- !if "$(MBYTE)" == "yes"
+- CFLAGS = $(CFLAGS) -DFEAT_MBYTE
+ !endif
+
+ !if "$(GUI)" == "yes"
+--- 784,789 ----
+*** ../vim-8.1.0732/src/version.c 2019-01-12 15:15:34.089783011 +0100
+--- src/version.c 2019-01-12 16:08:27.332316512 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 733,
+ /**/
+
+--
+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.0734 b/data/vim/patches/8.1.0734
new file mode 100644
index 000000000..62dd90f27
--- /dev/null
+++ b/data/vim/patches/8.1.0734
@@ -0,0 +1,77 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0734
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0734
+Problem: The hlsearch state is not stored in a session file.
+Solution: Add "nohlsearch" if appropriate. (Jason Franklin)
+Files: src/ex_docmd.c, src/testdir/test_mksession.vim
+
+
+*** ../vim-8.1.0733/src/ex_docmd.c 2019-01-08 22:02:36.044297306 +0100
+--- src/ex_docmd.c 2019-01-12 16:26:37.281066688 +0100
+***************
+*** 10144,10149 ****
+--- 10144,10153 ----
+ if (put_line(fd, "let &so = s:so_save | let &siso = s:siso_save")
+ == FAIL)
+ failed = TRUE;
++ # ifdef FEAT_SEARCH_EXTRA
++ if (no_hlsearch && put_line(fd, "nohlsearch") == FAIL)
++ failed = TRUE;
++ # endif
+ if (put_line(fd, "doautoall SessionLoadPost") == FAIL)
+ failed = TRUE;
+ if (eap->cmdidx == CMD_mksession)
+*** ../vim-8.1.0733/src/testdir/test_mksession.vim 2018-08-30 14:15:56.858667449 +0200
+--- src/testdir/test_mksession.vim 2019-01-12 16:24:14.553959907 +0100
+***************
+*** 198,203 ****
+--- 198,221 ----
+ call delete('Xtest_mks.out')
+ endfunc
+
++ if has('extra_search')
++
++ func Test_mksession_hlsearch()
++ set hlsearch
++ mksession! Xtest_mks.out
++ nohlsearch
++ source Xtest_mks.out
++ call assert_equal(1, v:hlsearch, 'session should restore search highlighting state')
++ nohlsearch
++ mksession! Xtest_mks.out
++ source Xtest_mks.out
++ call assert_equal(0, v:hlsearch, 'session should restore search highlighting state')
++ call delete('Xtest_mks.out')
++ endfunc
++
++ endif
++
++
+ func Test_mksession_blank_windows()
+ split
+ split
+*** ../vim-8.1.0733/src/version.c 2019-01-12 16:10:47.415360504 +0100
+--- src/version.c 2019-01-12 16:27:53.592581589 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 734,
+ /**/
+
+--
+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.0735 b/data/vim/patches/8.1.0735
new file mode 100644
index 000000000..945f91e9e
--- /dev/null
+++ b/data/vim/patches/8.1.0735
@@ -0,0 +1,3392 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0735
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0735
+Problem: Cannot handle binary data.
+Solution: Add the Blob type. (Yasuhiro Matsumoto, closes #3638)
+Files: runtime/doc/eval.txt, runtime/doc/if_perl.txt,
+ runtime/doc/if_ruby.txt, src/Make_cyg_ming.mak, src/Make_mvc.mak,
+ src/Makefile, src/blob.c, src/channel.c, src/eval.c,
+ src/evalfunc.c, src/if_perl.xs, src/if_py_both.h, src/if_python.c,
+ src/if_python3.c, src/if_ruby.c, src/json.c, src/netbeans.c,
+ src/proto.h, src/proto/blob.pro, src/proto/channel.pro,
+ src/structs.h, src/testdir/Make_all.mak, src/vim.h, src/globals.h,
+ src/testdir/test_blob.vim, src/testdir/test_channel.vim
+
+
+*** ../vim-8.1.0734/runtime/doc/eval.txt 2019-01-12 14:24:22.627597552 +0100
+--- runtime/doc/eval.txt 2019-01-12 22:41:51.485097473 +0100
+***************
+*** 72,77 ****
+--- 72,81 ----
+
+ Channel Used for a channel, see |ch_open()|. *Channel* *Channels*
+
++ Blob Binary Large Object. Stores any sequence of bytes. *Blob*
++ Example: 0zFF00ED015DAF
++ 0z is an empty Blob.
++
+ The Number and String types are converted automatically, depending on how they
+ are used.
+
+***************
+*** 124,130 ****
+ A List, Dictionary or Float is not a Number or String, thus evaluate to FALSE.
+
+ *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910* *E913*
+! List, Dictionary, Funcref, Job and Channel types are not automatically
+ converted.
+
+ *E805* *E806* *E808*
+--- 128,135 ----
+ A List, Dictionary or Float is not a Number or String, thus evaluate to FALSE.
+
+ *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910* *E913*
+! *E974* *E975* *E976*
+! List, Dictionary, Funcref, Job, Channel and Blob types are not automatically
+ converted.
+
+ *E805* *E806* *E808*
+***************
+*** 1010,1015 ****
+--- 1022,1033 ----
+ :let l = mylist[4:4] " List with one item
+ :let l = mylist[:] " shallow copy of a List
+
++ If expr8 is a |Blob| this results in a new |Blob| with the bytes in the
++ indexes expr1a and expr1b, inclusive. Examples: >
++ :let b = 0zDEADBEEF
++ :let bs = b[1:2] " 0zADBE
++ :let bs = b[] " copy ov 0zDEADBEEF
++
+ Using expr8[expr1] or expr8[expr1a : expr1b] on a |Funcref| results in an
+ error.
+
+***************
+*** 1145,1150 ****
+--- 1167,1180 ----
+ Note that "\000" and "\x00" force the end of the string.
+
+
++ blob-literal *blob-literal* *E973* *E977* *E978*
++ ------------
++
++ Hexadecimal starting with 0z or 0Z, with an arbitrary number of bytes.
++ The sequence must be an even number of hex characters. Example: >
++ :let b = 0zFF00ED015DAF
++
++
+ literal-string *literal-string* *E115*
+ ---------------
+ 'string' string constant *expr-'*
+***************
+*** 1898,1903 ****
+--- 1930,1937 ----
+ v:t_number Value of Number type. Read-only. See: |type()|
+ *v:t_string* *t_string-variable*
+ v:t_string Value of String type. Read-only. See: |type()|
++ *v:t_blob* *t_blob-variable*
++ v:t_blob Value of Blob type. Read-only. See: |type()|
+
+ *v:termresponse* *termresponse-variable*
+ v:termresponse The escape sequence returned by the terminal for the |t_RV|
+***************
+*** 2080,2091 ****
+ ch_open({address} [, {options}])
+ Channel open a channel to {address}
+ ch_read({handle} [, {options}]) String read from {handle}
+ ch_readraw({handle} [, {options}])
+ String read raw from {handle}
+ ch_sendexpr({handle}, {expr} [, {options}])
+ any send {expr} over JSON {handle}
+! ch_sendraw({handle}, {string} [, {options}])
+! any send {string} over raw {handle}
+ ch_setoptions({handle}, {options})
+ none set options for {handle}
+ ch_status({handle} [, {options}])
+--- 2115,2128 ----
+ ch_open({address} [, {options}])
+ Channel open a channel to {address}
+ ch_read({handle} [, {options}]) String read from {handle}
++ ch_readblob({handle} [, {options}])
++ Blob read Blob from {handle}
+ ch_readraw({handle} [, {options}])
+ String read raw from {handle}
+ ch_sendexpr({handle}, {expr} [, {options}])
+ any send {expr} over JSON {handle}
+! ch_sendraw({handle}, {expr} [, {options}])
+! any send {expr} over raw {handle}
+ ch_setoptions({handle}, {options})
+ none set options for {handle}
+ ch_status({handle} [, {options}])
+***************
+*** 2225,2232 ****
+ hostname() String name of the machine Vim is running on
+ iconv({expr}, {from}, {to}) String convert encoding of {expr}
+ indent({lnum}) Number indent of line {lnum}
+! index({list}, {expr} [, {start} [, {ic}]])
+! Number index in {list} where {expr} appears
+ input({prompt} [, {text} [, {completion}]])
+ String get input from the user
+ inputdialog({prompt} [, {text} [, {completion}]])
+--- 2262,2269 ----
+ hostname() String name of the machine Vim is running on
+ iconv({expr}, {from}, {to}) String convert encoding of {expr}
+ indent({lnum}) Number indent of line {lnum}
+! index({object}, {expr} [, {start} [, {ic}]])
+! Number index in {object} where {expr} appears
+ input({prompt} [, {text} [, {completion}]])
+ String get input from the user
+ inputdialog({prompt} [, {text} [, {completion}]])
+***************
+*** 2235,2241 ****
+ inputrestore() Number restore typeahead
+ inputsave() Number save and clear typeahead
+ inputsecret({prompt} [, {text}]) String like input() but hiding the text
+! insert({list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}]
+ invert({expr}) Number bitwise invert
+ isdirectory({directory}) Number |TRUE| if {directory} is a directory
+ islocked({expr}) Number |TRUE| if {expr} is locked
+--- 2272,2278 ----
+ inputrestore() Number restore typeahead
+ inputsave() Number save and clear typeahead
+ inputsecret({prompt} [, {text}]) String like input() but hiding the text
+! insert({object}, {item} [, {idx}]) List insert {item} in {object} [before {idx}]
+ invert({expr}) Number bitwise invert
+ isdirectory({directory}) Number |TRUE| if {directory} is a directory
+ islocked({expr}) Number |TRUE| if {expr} is locked
+***************
+*** 2325,2331 ****
+ pyxeval({expr}) any evaluate |python_x| expression
+ range({expr} [, {max} [, {stride}]])
+ List items from {expr} to {max}
+! readfile({fname} [, {binary} [, {max}]])
+ List get list of lines from file {fname}
+ reg_executing() String get the executing register name
+ reg_recording() String get the recording register name
+--- 2362,2368 ----
+ pyxeval({expr}) any evaluate |python_x| expression
+ range({expr} [, {max} [, {stride}]])
+ List items from {expr} to {max}
+! readfile({fname} [, {type} [, {max}]])
+ List get list of lines from file {fname}
+ reg_executing() String get the executing register name
+ reg_recording() String get the recording register name
+***************
+*** 2541,2548 ****
+ winsaveview() Dict save view of current window
+ winwidth({nr}) Number width of window {nr}
+ wordcount() Dict get byte/char/word statistics
+! writefile({list}, {fname} [, {flags}])
+! Number write list of lines to file {fname}
+ xor({expr}, {expr}) Number bitwise XOR
+
+
+--- 2577,2584 ----
+ winsaveview() Dict save view of current window
+ winwidth({nr}) Number width of window {nr}
+ wordcount() Dict get byte/char/word statistics
+! writefile({object}, {fname} [, {flags}])
+! Number write |Blob| or |List| of lines to file
+ xor({expr}, {expr}) Number bitwise XOR
+
+
+***************
+*** 3185,3190 ****
+--- 3222,3232 ----
+ See |channel-more|.
+ {only available when compiled with the |+channel| feature}
+
++ ch_readblob({handle} [, {options}]) *ch_readblob()*
++ Like ch_read() but reads binary data and returns a Blob.
++ See |channel-more|.
++ {only available when compiled with the |+channel| feature}
++
+ ch_readraw({handle} [, {options}]) *ch_readraw()*
+ Like ch_read() but for a JS and JSON channel does not decode
+ the message. For a NL channel it does not block waiting for
+***************
+*** 3201,3208 ****
+
+ {only available when compiled with the |+channel| feature}
+
+! ch_sendraw({handle}, {string} [, {options}]) *ch_sendraw()*
+! Send {string} over {handle}.
+ Works like |ch_sendexpr()|, but does not encode the request or
+ decode the response. The caller is responsible for the
+ correct contents. Also does not add a newline for a channel
+--- 3243,3250 ----
+
+ {only available when compiled with the |+channel| feature}
+
+! ch_sendraw({handle}, {expr} [, {options}]) *ch_sendraw()*
+! Send string or Blob {expr} over {handle}.
+ Works like |ch_sendexpr()|, but does not encode the request or
+ decode the response. The caller is responsible for the
+ correct contents. Also does not add a newline for a channel
+***************
+*** 5355,5371 ****
+ When {lnum} is invalid -1 is returned.
+
+
+! index({list}, {expr} [, {start} [, {ic}]]) *index()*
+! Return the lowest index in |List| {list} where the item has a
+! value equal to {expr}. There is no automatic conversion, so
+! the String "4" is different from the Number 4. And the number
+! 4 is different from the Float 4.0. The value of 'ignorecase'
+! is not used here, case always matters.
+ If {start} is given then start looking at the item with index
+ {start} (may be negative for an item relative to the end).
+ When {ic} is given and it is |TRUE|, ignore case. Otherwise
+ case must match.
+! -1 is returned when {expr} is not found in {list}.
+ Example: >
+ :let idx = index(words, "the")
+ :if index(numbers, 123) >= 0
+--- 5403,5423 ----
+ When {lnum} is invalid -1 is returned.
+
+
+! index({object}, {expr} [, {start} [, {ic}]]) *index()*
+! If {object} is a |List| return the lowest index where the item
+! has a value equal to {expr}. There is no automatic
+! conversion, so the String "4" is different from the Number 4.
+! And the number 4 is different from the Float 4.0. The value
+! of 'ignorecase' is not used here, case always matters.
+!
+! If {object} is |Blob| return the lowest index where the byte
+! value is equal to {expr}.
+!
+ If {start} is given then start looking at the item with index
+ {start} (may be negative for an item relative to the end).
+ When {ic} is given and it is |TRUE|, ignore case. Otherwise
+ case must match.
+! -1 is returned when {expr} is not found in {object}.
+ Example: >
+ :let idx = index(words, "the")
+ :if index(numbers, 123) >= 0
+***************
+*** 5471,5483 ****
+ typed on the command-line in response to the issued prompt.
+ NOTE: Command-line completion is not supported.
+
+! insert({list}, {item} [, {idx}]) *insert()*
+! Insert {item} at the start of |List| {list}.
+ If {idx} is specified insert {item} before the item with index
+ {idx}. If {idx} is zero it goes before the first item, just
+ like omitting {idx}. A negative {idx} is also possible, see
+ |list-index|. -1 inserts just before the last item.
+! Returns the resulting |List|. Examples: >
+ :let mylist = insert([2, 3, 5], 1)
+ :call insert(mylist, 4, -1)
+ :call insert(mylist, 6, len(mylist))
+--- 5523,5538 ----
+ typed on the command-line in response to the issued prompt.
+ NOTE: Command-line completion is not supported.
+
+! insert({object}, {item} [, {idx}]) *insert()*
+! When {object} is a |List| or a |Blob| insert {item} at the start
+! of it.
+!
+ If {idx} is specified insert {item} before the item with index
+ {idx}. If {idx} is zero it goes before the first item, just
+ like omitting {idx}. A negative {idx} is also possible, see
+ |list-index|. -1 inserts just before the last item.
+!
+! Returns the resulting |List| or |Blob|. Examples: >
+ :let mylist = insert([2, 3, 5], 1)
+ :call insert(mylist, 4, -1)
+ :call insert(mylist, 6, len(mylist))
+***************
+*** 5743,5748 ****
+--- 5798,5804 ----
+ used recursively: []
+ Dict as an object (possibly null); when
+ used recursively: {}
++ Blob as an array of the individual bytes
+ v:false "false"
+ v:true "true"
+ v:none "null"
+***************
+*** 6923,6938 ****
+ range(2, 0) " error!
+ <
+ *readfile()*
+! readfile({fname} [, {binary} [, {max}]])
+ Read file {fname} and return a |List|, each line of the file
+ as an item. Lines are broken at NL characters. Macintosh
+ files separated with CR will result in a single long line
+ (unless a NL appears somewhere).
+ All NUL characters are replaced with a NL character.
+! When {binary} contains "b" binary mode is used:
+ - When the last line ends in a NL an extra empty list item is
+ added.
+ - No CR characters are removed.
+ Otherwise:
+ - CR characters that appear before a NL are removed.
+ - Whether the last line ends in a NL or not does not matter.
+--- 6983,7000 ----
+ range(2, 0) " error!
+ <
+ *readfile()*
+! readfile({fname} [, {type} [, {max}]])
+ Read file {fname} and return a |List|, each line of the file
+ as an item. Lines are broken at NL characters. Macintosh
+ files separated with CR will result in a single long line
+ (unless a NL appears somewhere).
+ All NUL characters are replaced with a NL character.
+! When {type} contains "b" binary mode is used:
+ - When the last line ends in a NL an extra empty list item is
+ added.
+ - No CR characters are removed.
++ When {type} contains "B" a |Blob| is returned with the binary
++ data of the file unmodified.
+ Otherwise:
+ - CR characters that appear before a NL are removed.
+ - Whether the last line ends in a NL or not does not matter.
+***************
+*** 7108,7113 ****
+--- 7170,7185 ----
+ Example: >
+ :echo "last item: " . remove(mylist, -1)
+ :call remove(mylist, 0, 9)
++ remove({blob}, {idx} [, {end}])
++ Without {end}: Remove the byte at {idx} from |Blob| {blob} and
++ return the byte.
++ With {end}: Remove bytes from {idx} to {end} (inclusive) and
++ return a |Blob| with these bytes. When {idx} points to the same
++ byte as {end} a |Blob| with one byte is returned. When {end}
++ points to a byte before {idx} this is an error.
++ Example: >
++ :echo "last byte: " . remove(myblob, -1)
++ :call remove(mylist, 0, 9)
+ remove({dict}, {key})
+ Remove the entry from {dict} with key {key}. Example: >
+ :echo "removed " . remove(dict, "one")
+***************
+*** 7148,7156 ****
+ path name) and also keeps a trailing path separator.
+
+ *reverse()*
+! reverse({list}) Reverse the order of items in {list} in-place. Returns
+! {list}.
+! If you want a list to remain unmodified make a copy first: >
+ :let revlist = reverse(copy(mylist))
+
+ round({expr}) *round()*
+--- 7220,7230 ----
+ path name) and also keeps a trailing path separator.
+
+ *reverse()*
+! reverse({object})
+! Reverse the order of items in {object} in-place.
+! {object} can be a |List| or a |Blob|.
+! Returns {object}.
+! If you want an object to remain unmodified make a copy first: >
+ :let revlist = reverse(copy(mylist))
+
+ round({expr}) *round()*
+***************
+*** 9490,9495 ****
+--- 9568,9574 ----
+ None 7 |v:t_none| (v:null and v:none)
+ Job 8 |v:t_job|
+ Channel 9 |v:t_channel|
++ Blob 10 |v:t_blob|
+ For backward compatibility, this method can be used: >
+ :if type(myvar) == type(0)
+ :if type(myvar) == type("")
+***************
+*** 9837,9850 ****
+
+
+ *writefile()*
+! writefile({list}, {fname} [, {flags}])
+! Write |List| {list} to file {fname}. Each list item is
+! separated with a NL. Each list item must be a String or
+! Number.
+ When {flags} contains "b" then binary mode is used: There will
+ not be a NL after the last list item. An empty item at the
+ end does cause the last line in the file to end in a NL.
+
+ When {flags} contains "a" then append mode is used, lines are
+ appended to the file: >
+ :call writefile(["foo"], "event.log", "a")
+--- 9916,9932 ----
+
+
+ *writefile()*
+! writefile({object}, {fname} [, {flags}])
+! When {object} is a |List| write it to file {fname}. Each list
+! item is separated with a NL. Each list item must be a String
+! or Number.
+ When {flags} contains "b" then binary mode is used: There will
+ not be a NL after the last list item. An empty item at the
+ end does cause the last line in the file to end in a NL.
+
++ When {object} is a |Blob| write the bytes to file {fname}
++ unmodified.
++
+ When {flags} contains "a" then append mode is used, lines are
+ appended to the file: >
+ :call writefile(["foo"], "event.log", "a")
+***************
+*** 10546,10552 ****
+ This cannot be used to set a byte in a String. You
+ can do that like this: >
+ :let var = var[0:2] . 'X' . var[4:]
+! <
+ *E711* *E719*
+ :let {var-name}[{idx1}:{idx2}] = {expr1} *E708* *E709* *E710*
+ Set a sequence of items in a |List| to the result of
+--- 10629,10638 ----
+ This cannot be used to set a byte in a String. You
+ can do that like this: >
+ :let var = var[0:2] . 'X' . var[4:]
+! < When {var-name} is a |Blob| then {idx} can be the
+! length of the blob, in which case one byte is
+! appended.
+!
+ *E711* *E719*
+ :let {var-name}[{idx1}:{idx2}] = {expr1} *E708* *E709* *E710*
+ Set a sequence of items in a |List| to the result of
+*** ../vim-8.1.0734/runtime/doc/if_perl.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/if_perl.txt 2019-01-12 18:52:14.238595885 +0100
+***************
+*** 190,195 ****
+--- 191,199 ----
+ A |List| is turned into a string by joining the items
+ and inserting line breaks.
+
++ *perl-Blob*
++ VIM::Blob({expr}) Return Blob literal string 0zXXXX from scalar value.
++
+ *perl-SetHeight*
+ Window->SetHeight({height})
+ Sets the Window height to {height}, within screen
+*** ../vim-8.1.0734/runtime/doc/if_ruby.txt 2018-07-28 17:29:15.757096343 +0200
+--- runtime/doc/if_ruby.txt 2019-01-12 18:52:14.238595885 +0100
+***************
+*** 110,115 ****
+--- 110,119 ----
+ Vim::message({msg})
+ Displays the message {msg}.
+
++ *ruby-blob*
++ Vim::blob({arg})
++ Return Blob literal string from {arg}.
++
+ *ruby-set_option*
+ Vim::set_option({arg})
+ Sets a vim option. {arg} can be any argument that the ":set" command
+*** ../vim-8.1.0734/src/Make_cyg_ming.mak 2019-01-12 16:10:47.415360504 +0100
+--- src/Make_cyg_ming.mak 2019-01-12 18:52:14.238595885 +0100
+***************
+*** 696,701 ****
+--- 696,702 ----
+ OBJ = \
+ $(OUTDIR)/arabic.o \
+ $(OUTDIR)/beval.o \
++ $(OUTDIR)/blob.o \
+ $(OUTDIR)/blowfish.o \
+ $(OUTDIR)/buffer.o \
+ $(OUTDIR)/charset.o \
+*** ../vim-8.1.0734/src/Make_mvc.mak 2019-01-12 16:10:47.415360504 +0100
+--- src/Make_mvc.mak 2019-01-12 18:52:14.238595885 +0100
+***************
+*** 701,706 ****
+--- 701,707 ----
+ OBJ = \
+ $(OUTDIR)\arabic.obj \
+ $(OUTDIR)\beval.obj \
++ $(OUTDIR)\blob.obj \
+ $(OUTDIR)\blowfish.obj \
+ $(OUTDIR)\buffer.obj \
+ $(OUTDIR)\charset.obj \
+***************
+*** 1346,1351 ****
+--- 1347,1354 ----
+
+ $(OUTDIR)/beval.obj: $(OUTDIR) beval.c $(INCL)
+
++ $(OUTDIR)/blob.obj: $(OUTDIR) blob.c $(INCL)
++
+ $(OUTDIR)/blowfish.obj: $(OUTDIR) blowfish.c $(INCL)
+
+ $(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)
+***************
+*** 1616,1621 ****
+--- 1619,1625 ----
+ # End Custom Build
+ proto.h: \
+ proto/arabic.pro \
++ proto/blob.pro \
+ proto/blowfish.pro \
+ proto/buffer.pro \
+ proto/charset.pro \
+*** ../vim-8.1.0734/src/Makefile 2019-01-12 16:10:47.415360504 +0100
+--- src/Makefile 2019-01-12 18:52:14.238595885 +0100
+***************
+*** 1577,1582 ****
+--- 1579,1585 ----
+ BASIC_SRC = \
+ arabic.c \
+ beval.c \
++ blob.c \
+ blowfish.c \
+ buffer.c \
+ charset.c \
+***************
+*** 1693,1698 ****
+--- 1696,1702 ----
+ objects/arabic.o \
+ objects/beval.o \
+ objects/buffer.o \
++ objects/blob.o \
+ objects/blowfish.o \
+ objects/crypt.o \
+ objects/crypt_zip.o \
+***************
+*** 2943,2948 ****
+--- 2947,2955 ----
+ objects/arabic.o: arabic.c
+ $(CCC) -o $@ arabic.c
+
++ objects/blob.o: blob.c
++ $(CCC) -o $@ blob.c
++
+ objects/blowfish.o: blowfish.c
+ $(CCC) -o $@ blowfish.c
+
+***************
+*** 3395,3400 ****
+--- 3402,3411 ----
+ 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/blob.o: blob.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 \
+*** ../vim-8.1.0734/src/blob.c 2019-01-12 22:40:58.041219177 +0100
+--- src/blob.c 2019-01-12 20:30:51.295186522 +0100
+***************
+*** 0 ****
+--- 1,167 ----
++ /* 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.
++ */
++
++ /*
++ * blob.c: Blob support by Yasuhiro Matsumoto
++ */
++
++ #include "vim.h"
++
++ #if defined(FEAT_EVAL) || defined(PROTO)
++
++ /*
++ * Allocate an empty blob.
++ * Caller should take care of the reference count.
++ */
++ blob_T *
++ blob_alloc(void)
++ {
++ blob_T *blob = (blob_T *)alloc_clear(sizeof(blob_T));
++
++ if (blob != NULL)
++ ga_init2(&blob->bv_ga, 1, 100);
++ return blob;
++ }
++
++ /*
++ * Allocate an empty blob for a return value, with reference count set.
++ * Returns OK or FAIL.
++ */
++ int
++ rettv_blob_alloc(typval_T *rettv)
++ {
++ blob_T *b = blob_alloc();
++
++ if (b == NULL)
++ return FAIL;
++
++ rettv_blob_set(rettv, b);
++ return OK;
++ }
++
++ /*
++ * Set a blob as the return value.
++ */
++ void
++ rettv_blob_set(typval_T *rettv, blob_T *b)
++ {
++ rettv->v_type = VAR_BLOB;
++ rettv->vval.v_blob = b;
++ if (b != NULL)
++ ++b->bv_refcount;
++ }
++
++ void
++ blob_free(blob_T *b)
++ {
++ ga_clear(&b->bv_ga);
++ vim_free(b);
++ }
++
++ /*
++ * Unreference a blob: decrement the reference count and free it when it
++ * becomes zero.
++ */
++ void
++ blob_unref(blob_T *b)
++ {
++ if (b != NULL && --b->bv_refcount <= 0)
++ blob_free(b);
++ }
++
++ /*
++ * Get the length of data.
++ */
++ long
++ blob_len(blob_T *b)
++ {
++ if (b == NULL)
++ return 0L;
++ return b->bv_ga.ga_len;
++ }
++
++ /*
++ * Get byte "idx" in blob "b".
++ * Caller must check that "idx" is valid.
++ */
++ char_u
++ blob_get(blob_T *b, int idx)
++ {
++ return ((char_u*)b->bv_ga.ga_data)[idx];
++ }
++
++ /*
++ * Store one byte "c" in blob "b" at "idx".
++ * Caller must make sure that "idx" is valid.
++ */
++ void
++ blob_set(blob_T *b, int idx, char_u c)
++ {
++ ((char_u*)b->bv_ga.ga_data)[idx] = c;
++ }
++
++ /*
++ * Return TRUE when two blobs have exactly the same values.
++ */
++ int
++ blob_equal(
++ blob_T *b1,
++ blob_T *b2)
++ {
++ int i;
++
++ if (b1 == NULL || b2 == NULL)
++ return FALSE;
++ if (b1 == b2)
++ return TRUE;
++ if (blob_len(b1) != blob_len(b2))
++ return FALSE;
++
++ for (i = 0; i < b1->bv_ga.ga_len; i++)
++ if (blob_get(b1, i) != blob_get(b2, i)) return FALSE;
++ return TRUE;
++ }
++
++ /*
++ * Read "blob" from file "fd".
++ * Return OK or FAIL.
++ */
++ int
++ read_blob(FILE *fd, blob_T *blob)
++ {
++ struct stat st;
++
++ if (fstat(fileno(fd), &st) < 0)
++ return FAIL;
++ if (ga_grow(&blob->bv_ga, st.st_size) == FAIL)
++ return FAIL;
++ blob->bv_ga.ga_len = st.st_size;
++ if (fread(blob->bv_ga.ga_data, 1, blob->bv_ga.ga_len, fd)
++ < (size_t)blob->bv_ga.ga_len)
++ return FAIL;
++ return OK;
++ }
++
++ /*
++ * Write "blob" to file "fd".
++ * Return OK or FAIL.
++ */
++ int
++ write_blob(FILE *fd, blob_T *blob)
++ {
++ if (fwrite(blob->bv_ga.ga_data, 1, blob->bv_ga.ga_len, fd)
++ < (size_t)blob->bv_ga.ga_len)
++ {
++ EMSG(_(e_write));
++ return FAIL;
++ }
++ return OK;
++ }
++
++ #endif /* defined(FEAT_EVAL) */
+*** ../vim-8.1.0734/src/channel.c 2019-01-05 00:02:52.045705776 +0100
+--- src/channel.c 2019-01-12 20:58:35.124077325 +0100
+***************
+*** 1665,1671 ****
+ * Returns NULL if there is nothing.
+ */
+ char_u *
+! channel_get(channel_T *channel, ch_part_T part)
+ {
+ readq_T *head = &channel->ch_part[part].ch_head;
+ readq_T *node = head->rq_next;
+--- 1665,1671 ----
+ * Returns NULL if there is nothing.
+ */
+ char_u *
+! channel_get(channel_T *channel, ch_part_T part, int *outlen)
+ {
+ readq_T *head = &channel->ch_part[part].ch_head;
+ readq_T *node = head->rq_next;
+***************
+*** 1673,1678 ****
+--- 1673,1680 ----
+
+ if (node == NULL)
+ return NULL;
++ if (outlen != NULL)
++ *outlen += node->rq_buflen;
+ /* dispose of the node but keep the buffer */
+ p = node->rq_buffer;
+ head->rq_next = node->rq_next;
+***************
+*** 1689,1695 ****
+ * Replaces NUL bytes with NL.
+ */
+ static char_u *
+! channel_get_all(channel_T *channel, ch_part_T part)
+ {
+ readq_T *head = &channel->ch_part[part].ch_head;
+ readq_T *node = head->rq_next;
+--- 1691,1697 ----
+ * Replaces NUL bytes with NL.
+ */
+ static char_u *
+! channel_get_all(channel_T *channel, ch_part_T part, int *outlen)
+ {
+ readq_T *head = &channel->ch_part[part].ch_head;
+ readq_T *node = head->rq_next;
+***************
+*** 1699,1705 ****
+
+ /* If there is only one buffer just get that one. */
+ if (head->rq_next == NULL || head->rq_next->rq_next == NULL)
+! return channel_get(channel, part);
+
+ /* Concatenate everything into one buffer. */
+ for (node = head->rq_next; node != NULL; node = node->rq_next)
+--- 1701,1707 ----
+
+ /* If there is only one buffer just get that one. */
+ if (head->rq_next == NULL || head->rq_next->rq_next == NULL)
+! return channel_get(channel, part, outlen);
+
+ /* Concatenate everything into one buffer. */
+ for (node = head->rq_next; node != NULL; node = node->rq_next)
+***************
+*** 1718,1727 ****
+ /* Free all buffers */
+ do
+ {
+! p = channel_get(channel, part);
+ vim_free(p);
+ } while (p != NULL);
+
+ /* turn all NUL into NL */
+ while (len > 0)
+ {
+--- 1720,1735 ----
+ /* Free all buffers */
+ do
+ {
+! p = channel_get(channel, part, NULL);
+ vim_free(p);
+ } while (p != NULL);
+
++ if (outlen != NULL)
++ {
++ *outlen += len;
++ return res;
++ }
++
+ /* turn all NUL into NL */
+ while (len > 0)
+ {
+***************
+*** 1893,1899 ****
+ {
+ channel_T *channel = (channel_T *)reader->js_cookie;
+ ch_part_T part = reader->js_cookie_arg;
+! char_u *next = channel_get(channel, part);
+ int keeplen;
+ int addlen;
+ char_u *p;
+--- 1901,1907 ----
+ {
+ channel_T *channel = (channel_T *)reader->js_cookie;
+ ch_part_T part = reader->js_cookie_arg;
+! char_u *next = channel_get(channel, part, NULL);
+ int keeplen;
+ int addlen;
+ char_u *p;
+***************
+*** 1942,1948 ****
+ if (channel_peek(channel, part) == NULL)
+ return FALSE;
+
+! reader.js_buf = channel_get(channel, part);
+ reader.js_used = 0;
+ reader.js_fill = channel_fill;
+ reader.js_cookie = channel;
+--- 1950,1956 ----
+ if (channel_peek(channel, part) == NULL)
+ return FALSE;
+
+! reader.js_buf = channel_get(channel, part, NULL);
+ reader.js_used = 0;
+ reader.js_fill = channel_fill;
+ reader.js_cookie = channel;
+***************
+*** 2475,2481 ****
+ {
+ char_u *msg;
+
+! while ((msg = channel_get(channel, part)) != NULL)
+ {
+ ch_log(channel, "Dropping message '%s'", (char *)msg);
+ vim_free(msg);
+--- 2483,2489 ----
+ {
+ char_u *msg;
+
+! while ((msg = channel_get(channel, part, NULL)) != NULL)
+ {
+ ch_log(channel, "Dropping message '%s'", (char *)msg);
+ vim_free(msg);
+***************
+*** 2639,2645 ****
+ if (nl + 1 == buf + node->rq_buflen)
+ {
+ /* get the whole buffer, drop the NL */
+! msg = channel_get(channel, part);
+ *nl = NUL;
+ }
+ else
+--- 2647,2653 ----
+ if (nl + 1 == buf + node->rq_buflen)
+ {
+ /* get the whole buffer, drop the NL */
+! msg = channel_get(channel, part, NULL);
+ *nl = NUL;
+ }
+ else
+***************
+*** 2655,2661 ****
+ /* For a raw channel we don't know where the message ends, just
+ * get everything we have.
+ * Convert NUL to NL, the internal representation. */
+! msg = channel_get_all(channel, part);
+ }
+
+ if (msg == NULL)
+--- 2663,2669 ----
+ /* For a raw channel we don't know where the message ends, just
+ * get everything we have.
+ * Convert NUL to NL, the internal representation. */
+! msg = channel_get_all(channel, part, NULL);
+ }
+
+ if (msg == NULL)
+***************
+*** 3007,3013 ****
+ cbq_T *cb_head = &ch_part->ch_cb_head;
+
+ while (channel_peek(channel, part) != NULL)
+! vim_free(channel_get(channel, part));
+
+ while (cb_head->cq_next != NULL)
+ {
+--- 3015,3021 ----
+ cbq_T *cb_head = &ch_part->ch_cb_head;
+
+ while (channel_peek(channel, part) != NULL)
+! vim_free(channel_get(channel, part, NULL));
+
+ while (cb_head->cq_next != NULL)
+ {
+***************
+*** 3381,3387 ****
+ * Returns NULL in case of error or timeout.
+ */
+ static char_u *
+! channel_read_block(channel_T *channel, ch_part_T part, int timeout, int raw)
+ {
+ char_u *buf;
+ char_u *msg;
+--- 3389,3396 ----
+ * Returns NULL in case of error or timeout.
+ */
+ static char_u *
+! channel_read_block(
+! channel_T *channel, ch_part_T part, int timeout, int raw, int *outlen)
+ {
+ char_u *buf;
+ char_u *msg;
+***************
+*** 3422,3430 ****
+ }
+
+ /* We have a complete message now. */
+! if (mode == MODE_RAW)
+ {
+! msg = channel_get_all(channel, part);
+ }
+ else
+ {
+--- 3431,3439 ----
+ }
+
+ /* We have a complete message now. */
+! if (mode == MODE_RAW || outlen != NULL)
+ {
+! msg = channel_get_all(channel, part, outlen);
+ }
+ else
+ {
+***************
+*** 3441,3452 ****
+ if (nl == NULL)
+ {
+ /* must be a closed channel with missing NL */
+! msg = channel_get(channel, part);
+ }
+ else if (nl + 1 == buf + node->rq_buflen)
+ {
+ /* get the whole buffer */
+! msg = channel_get(channel, part);
+ *nl = NUL;
+ }
+ else
+--- 3450,3461 ----
+ if (nl == NULL)
+ {
+ /* must be a closed channel with missing NL */
+! msg = channel_get(channel, part, NULL);
+ }
+ else if (nl + 1 == buf + node->rq_buflen)
+ {
+ /* get the whole buffer */
+! msg = channel_get(channel, part, NULL);
+ *nl = NUL;
+ }
+ else
+***************
+*** 3554,3560 ****
+ * Common for ch_read() and ch_readraw().
+ */
+ void
+! common_channel_read(typval_T *argvars, typval_T *rettv, int raw)
+ {
+ channel_T *channel;
+ ch_part_T part = PART_COUNT;
+--- 3563,3569 ----
+ * Common for ch_read() and ch_readraw().
+ */
+ void
+! common_channel_read(typval_T *argvars, typval_T *rettv, int raw, int blob)
+ {
+ channel_T *channel;
+ ch_part_T part = PART_COUNT;
+***************
+*** 3585,3593 ****
+ if (opt.jo_set & JO_TIMEOUT)
+ timeout = opt.jo_timeout;
+
+! if (raw || mode == MODE_RAW || mode == MODE_NL)
+ rettv->vval.v_string = channel_read_block(channel, part,
+! timeout, raw);
+ else
+ {
+ if (opt.jo_set & JO_ID)
+--- 3594,3625 ----
+ if (opt.jo_set & JO_TIMEOUT)
+ timeout = opt.jo_timeout;
+
+! if (blob)
+! {
+! int outlen = 0;
+! char_u *p = channel_read_block(channel, part,
+! timeout, TRUE, &outlen);
+! if (p != NULL)
+! {
+! blob_T *b = blob_alloc();
+!
+! if (b != NULL)
+! {
+! b->bv_ga.ga_len = outlen;
+! if (ga_grow(&b->bv_ga, outlen) == FAIL)
+! blob_free(b);
+! else
+! {
+! memcpy(b->bv_ga.ga_data, p, outlen);
+! rettv_blob_set(rettv, b);
+! }
+! }
+! vim_free(p);
+! }
+! }
+! else if (raw || mode == MODE_RAW || mode == MODE_NL)
+ rettv->vval.v_string = channel_read_block(channel, part,
+! timeout, raw, NULL);
+ else
+ {
+ if (opt.jo_set & JO_ID)
+***************
+*** 3905,3910 ****
+--- 3937,3943 ----
+ send_common(
+ typval_T *argvars,
+ char_u *text,
++ int len,
+ int id,
+ int eval,
+ jobopt_T *opt,
+***************
+*** 3938,3944 ****
+ opt->jo_callback, opt->jo_partial, id);
+ }
+
+! if (channel_send(channel, part_send, text, (int)STRLEN(text), fun) == OK
+ && opt->jo_callback == NULL)
+ return channel;
+ return NULL;
+--- 3971,3977 ----
+ opt->jo_callback, opt->jo_partial, id);
+ }
+
+! if (channel_send(channel, part_send, text, len, fun) == OK
+ && opt->jo_callback == NULL)
+ return channel;
+ return NULL;
+***************
+*** 3982,3988 ****
+ if (text == NULL)
+ return;
+
+! channel = send_common(argvars, text, id, eval, &opt,
+ eval ? "ch_evalexpr" : "ch_sendexpr", &part_read);
+ vim_free(text);
+ if (channel != NULL && eval)
+--- 4015,4021 ----
+ if (text == NULL)
+ return;
+
+! channel = send_common(argvars, text, (int)STRLEN(text), id, eval, &opt,
+ eval ? "ch_evalexpr" : "ch_sendexpr", &part_read);
+ vim_free(text);
+ if (channel != NULL && eval)
+***************
+*** 4014,4019 ****
+--- 4047,4053 ----
+ {
+ char_u buf[NUMBUFLEN];
+ char_u *text;
++ int len;
+ channel_T *channel;
+ ch_part_T part_read;
+ jobopt_T opt;
+***************
+*** 4023,4030 ****
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+! text = tv_get_string_buf(&argvars[1], buf);
+! channel = send_common(argvars, text, 0, eval, &opt,
+ eval ? "ch_evalraw" : "ch_sendraw", &part_read);
+ if (channel != NULL && eval)
+ {
+--- 4057,4073 ----
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+! if (argvars[1].v_type == VAR_BLOB)
+! {
+! text = argvars[1].vval.v_blob->bv_ga.ga_data;
+! len = argvars[1].vval.v_blob->bv_ga.ga_len;
+! }
+! else
+! {
+! text = tv_get_string_buf(&argvars[1], buf);
+! len = STRLEN(text);
+! }
+! channel = send_common(argvars, text, len, 0, eval, &opt,
+ eval ? "ch_evalraw" : "ch_sendraw", &part_read);
+ if (channel != NULL && eval)
+ {
+***************
+*** 4033,4039 ****
+ else
+ timeout = channel_get_timeout(channel, part_read);
+ rettv->vval.v_string = channel_read_block(channel, part_read,
+! timeout, TRUE);
+ }
+ free_job_options(&opt);
+ }
+--- 4076,4082 ----
+ else
+ timeout = channel_get_timeout(channel, part_read);
+ rettv->vval.v_string = channel_read_block(channel, part_read,
+! timeout, TRUE, NULL);
+ }
+ free_job_options(&opt);
+ }
+*** ../vim-8.1.0734/src/eval.c 2018-12-22 13:27:59.115503998 +0100
+--- src/eval.c 2019-01-12 22:02:53.262933357 +0100
+***************
+*** 78,83 ****
+--- 78,85 ----
+ int fi_varcount; /* nr of variables in the list */
+ listwatch_T fi_lw; /* keep an eye on the item used. */
+ list_T *fi_list; /* list being used */
++ int fi_bi; /* index of blob */
++ blob_T *fi_blob; /* blob being used */
+ } forinfo_T;
+
+
+***************
+*** 187,192 ****
+--- 189,195 ----
+ {VV_NAME("t_none", VAR_NUMBER), VV_RO},
+ {VV_NAME("t_job", VAR_NUMBER), VV_RO},
+ {VV_NAME("t_channel", VAR_NUMBER), VV_RO},
++ {VV_NAME("t_blob", VAR_NUMBER), VV_RO},
+ {VV_NAME("termrfgresp", VAR_STRING), VV_RO},
+ {VV_NAME("termrbgresp", VAR_STRING), VV_RO},
+ {VV_NAME("termu7resp", VAR_STRING), VV_RO},
+***************
+*** 202,207 ****
+--- 205,211 ----
+ #define vv_str vv_di.di_tv.vval.v_string
+ #define vv_list vv_di.di_tv.vval.v_list
+ #define vv_dict vv_di.di_tv.vval.v_dict
++ #define vv_blob vv_di.di_tv.vval.v_blob
+ #define vv_tv vv_di.di_tv
+
+ static dictitem_T vimvars_var; /* variable used for v: */
+***************
+*** 338,343 ****
+--- 342,348 ----
+ set_vim_var_nr(VV_TYPE_NONE, VAR_TYPE_NONE);
+ set_vim_var_nr(VV_TYPE_JOB, VAR_TYPE_JOB);
+ set_vim_var_nr(VV_TYPE_CHANNEL, VAR_TYPE_CHANNEL);
++ set_vim_var_nr(VV_TYPE_BLOB, VAR_TYPE_BLOB);
+
+ set_reg_var(0); /* default for v:register is not 0 but '"' */
+
+***************
+*** 1918,1927 ****
+ {
+ if (!(lp->ll_tv->v_type == VAR_LIST && lp->ll_tv->vval.v_list != NULL)
+ && !(lp->ll_tv->v_type == VAR_DICT
+! && lp->ll_tv->vval.v_dict != NULL))
+ {
+ if (!quiet)
+! EMSG(_("E689: Can only index a List or Dictionary"));
+ return NULL;
+ }
+ if (lp->ll_range)
+--- 1923,1934 ----
+ {
+ if (!(lp->ll_tv->v_type == VAR_LIST && lp->ll_tv->vval.v_list != NULL)
+ && !(lp->ll_tv->v_type == VAR_DICT
+! && lp->ll_tv->vval.v_dict != NULL)
+! && !(lp->ll_tv->v_type == VAR_BLOB
+! && lp->ll_tv->vval.v_blob != NULL))
+ {
+ if (!quiet)
+! EMSG(_("E689: Can only index a List, Dictionary or Blob"));
+ return NULL;
+ }
+ if (lp->ll_range)
+***************
+*** 1974,1984 ****
+ clear_tv(&var1);
+ return NULL;
+ }
+! if (rettv != NULL && (rettv->v_type != VAR_LIST
+! || rettv->vval.v_list == NULL))
+ {
+ if (!quiet)
+! EMSG(_("E709: [:] requires a List value"));
+ clear_tv(&var1);
+ return NULL;
+ }
+--- 1981,1994 ----
+ clear_tv(&var1);
+ return NULL;
+ }
+! if (rettv != NULL
+! && !(rettv->v_type == VAR_LIST
+! || rettv->vval.v_list != NULL)
+! && !(rettv->v_type == VAR_BLOB
+! || rettv->vval.v_blob != NULL))
+ {
+ if (!quiet)
+! EMSG(_("E709: [:] requires a List or Blob value"));
+ clear_tv(&var1);
+ return NULL;
+ }
+***************
+*** 2097,2102 ****
+--- 2107,2139 ----
+ clear_tv(&var1);
+ lp->ll_tv = &lp->ll_di->di_tv;
+ }
++ else if (lp->ll_tv->v_type == VAR_BLOB)
++ {
++ /*
++ * Get the number and item for the only or first index of the List.
++ */
++ if (empty1)
++ lp->ll_n1 = 0;
++ else
++ // is number or string
++ lp->ll_n1 = (long)tv_get_number(&var1);
++ clear_tv(&var1);
++
++ if (lp->ll_n1 < 0
++ || lp->ll_n1 > blob_len(lp->ll_tv->vval.v_blob))
++ {
++ if (!quiet)
++ EMSGN(_(e_listidx), lp->ll_n1);
++ return NULL;
++ }
++ if (lp->ll_range && !lp->ll_empty2)
++ {
++ lp->ll_n2 = (long)tv_get_number(&var2);
++ clear_tv(&var2);
++ }
++ lp->ll_blob = lp->ll_tv->vval.v_blob;
++ lp->ll_tv = NULL;
++ }
+ else
+ {
+ /*
+***************
+*** 2201,2207 ****
+ {
+ cc = *endp;
+ *endp = NUL;
+! if (op != NULL && *op != '=')
+ {
+ typval_T tv;
+
+--- 2238,2289 ----
+ {
+ cc = *endp;
+ *endp = NUL;
+! if (lp->ll_blob != NULL)
+! {
+! int error = FALSE, val;
+! if (op != NULL && *op != '=')
+! {
+! EMSG2(_(e_letwrong), op);
+! return;
+! }
+!
+! if (lp->ll_range && rettv->v_type == VAR_BLOB)
+! {
+! int i;
+!
+! if (blob_len(rettv->vval.v_blob) != blob_len(lp->ll_blob))
+! {
+! EMSG(_("E972: Blob value has more items than target"));
+! return;
+! }
+!
+! for (i = lp->ll_n1; i <= lp->ll_n2; i++)
+! blob_set(lp->ll_blob, i,
+! blob_get(rettv->vval.v_blob, i));
+! }
+! else
+! {
+! val = (int)tv_get_number_chk(rettv, &error);
+! if (!error)
+! {
+! garray_T *gap = &lp->ll_blob->bv_ga;
+!
+! // Allow for appending a byte. Setting a byte beyond
+! // the end is an error otherwise.
+! if (lp->ll_n1 < gap->ga_len
+! || (lp->ll_n1 == gap->ga_len
+! && ga_grow(&lp->ll_blob->bv_ga, 1) == OK))
+! {
+! blob_set(lp->ll_blob, lp->ll_n1, val);
+! if (lp->ll_n1 == gap->ga_len)
+! ++gap->ga_len;
+! }
+! else
+! EMSG(_(e_invrange));
+! }
+! }
+! }
+! else if (op != NULL && *op != '=')
+ {
+ typval_T tv;
+
+***************
+*** 2352,2357 ****
+--- 2434,2453 ----
+ case VAR_CHANNEL:
+ break;
+
++ case VAR_BLOB:
++ if (*op != '+' || tv2->v_type != VAR_BLOB)
++ break;
++ // BLOB += BLOB
++ if (tv1->vval.v_blob != NULL && tv2->vval.v_blob != NULL)
++ {
++ blob_T *b1 = tv1->vval.v_blob;
++ blob_T *b2 = tv2->vval.v_blob;
++ int i, len = blob_len(b2);
++ for (i = 0; i < len; i++)
++ ga_append(&b1->bv_ga, blob_get(b2, i));
++ }
++ return OK;
++
+ case VAR_LIST:
+ if (*op != '+' || tv2->v_type != VAR_LIST)
+ break;
+***************
+*** 2451,2456 ****
+--- 2547,2553 ----
+ char_u *expr;
+ typval_T tv;
+ list_T *l;
++ blob_T *b;
+
+ *errp = TRUE; /* default: there is an error */
+
+***************
+*** 2476,2499 ****
+ *errp = FALSE;
+ if (!skip)
+ {
+! l = tv.vval.v_list;
+! if (tv.v_type != VAR_LIST)
+ {
+! EMSG(_(e_listreq));
+! clear_tv(&tv);
+ }
+! else if (l == NULL)
+ {
+! /* a null list is like an empty list: do nothing */
+! clear_tv(&tv);
+ }
+ else
+ {
+! /* No need to increment the refcount, it's already set for the
+! * list being used in "tv". */
+! fi->fi_list = l;
+! list_add_watch(l, &fi->fi_lw);
+! fi->fi_lw.lw_item = l->lv_first;
+ }
+ }
+ }
+--- 2573,2610 ----
+ *errp = FALSE;
+ if (!skip)
+ {
+! if (tv.v_type == VAR_LIST)
+ {
+! l = tv.vval.v_list;
+! if (l == NULL)
+! {
+! // a null list is like an empty list: do nothing
+! clear_tv(&tv);
+! }
+! else
+! {
+! // No need to increment the refcount, it's already set for
+! // the list being used in "tv".
+! fi->fi_list = l;
+! list_add_watch(l, &fi->fi_lw);
+! fi->fi_lw.lw_item = l->lv_first;
+! }
+ }
+! else if (tv.v_type == VAR_BLOB)
+ {
+! b = tv.vval.v_blob;
+! if (b == NULL)
+! clear_tv(&tv);
+! else
+! {
+! fi->fi_blob = b;
+! fi->fi_bi = 0;
+! }
+ }
+ else
+ {
+! EMSG(_(e_listreq));
+! clear_tv(&tv);
+ }
+ }
+ }
+***************
+*** 2516,2521 ****
+--- 2627,2646 ----
+ int result;
+ listitem_T *item;
+
++ if (fi->fi_blob != NULL)
++ {
++ typval_T tv;
++
++ if (fi->fi_bi >= blob_len(fi->fi_blob))
++ return FALSE;
++ tv.v_type = VAR_NUMBER;
++ tv.v_lock = VAR_FIXED;
++ tv.vval.v_number = blob_get(fi->fi_blob, fi->fi_bi);
++ ++fi->fi_bi;
++ return ex_let_vars(arg, &tv, TRUE,
++ fi->fi_semicolon, fi->fi_varcount, NULL) == OK;
++ }
++
+ item = fi->fi_lw.lw_item;
+ if (item == NULL)
+ result = FALSE;
+***************
+*** 2955,2960 ****
+--- 3080,3086 ----
+ list_T *l;
+ listitem_T *li;
+ dict_T *d;
++ blob_T *b;
+ hashitem_T *hi;
+ int todo;
+
+***************
+*** 2986,2991 ****
+--- 3112,3126 ----
+ case VAR_CHANNEL:
+ break;
+
++ case VAR_BLOB:
++ if ((b = tv->vval.v_blob) != NULL)
++ {
++ if (lock)
++ b->bv_lock |= VAR_LOCKED;
++ else
++ b->bv_lock &= ~VAR_LOCKED;
++ }
++ break;
+ case VAR_LIST:
+ if ((l = tv->vval.v_list) != NULL)
+ {
+***************
+*** 3609,3615 ****
+ if (op != '+' && op != '-' && op != '.')
+ break;
+
+! if ((op != '+' || rettv->v_type != VAR_LIST)
+ #ifdef FEAT_FLOAT
+ && (op == '.' || rettv->v_type != VAR_FLOAT)
+ #endif
+--- 3744,3751 ----
+ if (op != '+' && op != '-' && op != '.')
+ break;
+
+! if ((op != '+' || (rettv->v_type != VAR_LIST
+! && rettv->v_type != VAR_BLOB))
+ #ifdef FEAT_FLOAT
+ && (op == '.' || rettv->v_type != VAR_FLOAT)
+ #endif
+***************
+*** 3659,3664 ****
+--- 3795,3819 ----
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = p;
+ }
++ else if (op == '+' && rettv->v_type == VAR_BLOB
++ && var2.v_type == VAR_BLOB)
++ {
++ blob_T *b1 = rettv->vval.v_blob;
++ blob_T *b2 = var2.vval.v_blob;
++ blob_T *b = blob_alloc();
++ int i;
++
++ if (b != NULL)
++ {
++ for (i = 0; i < blob_len(b1); i++)
++ ga_append(&b->bv_ga, blob_get(b1, i));
++ for (i = 0; i < blob_len(b2); i++)
++ ga_append(&b->bv_ga, blob_get(b2, i));
++
++ clear_tv(rettv);
++ rettv_blob_set(rettv, b);
++ }
++ }
+ else if (op == '+' && rettv->v_type == VAR_LIST
+ && var2.v_type == VAR_LIST)
+ {
+***************
+*** 3921,3926 ****
+--- 4076,4082 ----
+ /*
+ * Handle sixth level expression:
+ * number number constant
++ * 0zFFFFFFFF Blob constant
+ * "string" string constant
+ * 'string' literal string constant
+ * &option-name option value
+***************
+*** 4027,4033 ****
+--- 4183,4220 ----
+ }
+ else
+ #endif
++ if (**arg == '0' && ((*arg)[1] == 'z' || (*arg)[1] == 'Z'))
+ {
++ char_u *bp;
++ blob_T *blob;
++
++ // Blob constant: 0z0123456789abcdef
++ if (evaluate)
++ blob = blob_alloc();
++ for (bp = *arg + 2; vim_isxdigit(bp[0]); bp += 2)
++ {
++ if (!vim_isxdigit(bp[1]))
++ {
++ EMSG(_("E973: Blob literal should have an even number of hex characters'"));
++ vim_free(blob);
++ ret = FAIL;
++ break;
++ }
++ if (blob != NULL)
++ ga_append(&blob->bv_ga,
++ (hex2nr(*bp) << 4) + hex2nr(*(bp+1)));
++ }
++ if (blob != NULL)
++ {
++ ++blob->bv_refcount;
++ rettv->v_type = VAR_BLOB;
++ rettv->vval.v_blob = blob;
++ }
++ *arg = bp;
++ }
++ else
++ {
++ // decimal, hex or octal number
+ vim_str2nr(*arg, NULL, &len, STR2NR_ALL, &n, NULL, 0);
+ *arg += len;
+ if (evaluate)
+***************
+*** 4263,4268 ****
+--- 4450,4456 ----
+ {
+ int empty1 = FALSE, empty2 = FALSE;
+ typval_T var1, var2;
++ long i;
+ long n1, n2 = 0;
+ long len = -1;
+ int range = FALSE;
+***************
+*** 4297,4302 ****
+--- 4485,4491 ----
+ case VAR_NUMBER:
+ case VAR_LIST:
+ case VAR_DICT:
++ case VAR_BLOB:
+ break;
+ }
+
+***************
+*** 4439,4444 ****
+--- 4628,4694 ----
+ rettv->vval.v_string = s;
+ break;
+
++ case VAR_BLOB:
++ len = blob_len(rettv->vval.v_blob);
++ if (range)
++ {
++ // The resulting variable is a substring. If the indexes
++ // are out of range the result is empty.
++ if (n1 < 0)
++ {
++ n1 = len + n1;
++ if (n1 < 0)
++ n1 = 0;
++ }
++ if (n2 < 0)
++ n2 = len + n2;
++ else if (n2 >= len)
++ n2 = len - 1;
++ if (n1 >= len || n2 < 0 || n1 > n2)
++ {
++ clear_tv(rettv);
++ rettv->v_type = VAR_BLOB;
++ rettv->vval.v_blob = NULL;
++ }
++ else
++ {
++ blob_T *blob = blob_alloc();
++
++ if (blob != NULL)
++ {
++ if (ga_grow(&blob->bv_ga, n2 - n1 + 1) == FAIL)
++ {
++ blob_free(blob);
++ return FAIL;
++ }
++ blob->bv_ga.ga_len = n2 - n1 + 1;
++ for (i = n1; i <= n2; i++)
++ blob_set(blob, i - n1,
++ blob_get(rettv->vval.v_blob, i));
++
++ clear_tv(rettv);
++ rettv_blob_set(rettv, blob);
++ }
++ }
++ }
++ else
++ {
++ // The resulting variable is a string of a single
++ // character. If the index is too big or negative the
++ // result is empty.
++ if (n1 < len && n1 >= 0)
++ {
++ int v = (int)blob_get(rettv->vval.v_blob, n1);
++
++ clear_tv(rettv);
++ rettv->v_type = VAR_NUMBER;
++ rettv->vval.v_number = v;
++ }
++ else
++ EMSGN(_(e_blobidx), n1);
++ }
++ break;
++
+ case VAR_LIST:
+ len = list_len(rettv->vval.v_list);
+ if (n1 < 0)
+***************
+*** 4970,4975 ****
+--- 5220,5228 ----
+ --recursive_cnt;
+ return r;
+
++ case VAR_BLOB:
++ return blob_equal(tv1->vval.v_blob, tv2->vval.v_blob);
++
+ case VAR_NUMBER:
+ return tv1->vval.v_number == tv2->vval.v_number;
+
+***************
+*** 5602,5607 ****
+--- 5855,5890 ----
+ break;
+ }
+
++ case VAR_BLOB:
++ if (tv->vval.v_blob == NULL)
++ {
++ *tofree = NULL;
++ r = (char_u *)"[]";
++ }
++ else
++ {
++ blob_T *b;
++ int i;
++ garray_T ga;
++
++ // Store bytes in the growarray.
++ ga_init2(&ga, 1, 4000);
++ b = tv->vval.v_blob;
++ ga_append(&ga, '[');
++ for (i = 0; i < blob_len(b); i++)
++ {
++ if (i > 0)
++ ga_concat(&ga, (char_u *)",");
++ vim_snprintf((char *)numbuf, NUMBUFLEN, "0x%02X",
++ (int)blob_get(b, i));
++ ga_concat(&ga, numbuf);
++ }
++ ga_append(&ga, ']');
++ *tofree = ga.ga_data;
++ r = *tofree;
++ }
++ break;
++
+ case VAR_LIST:
+ if (tv->vval.v_list == NULL)
+ {
+***************
+*** 6841,6846 ****
+--- 7124,7132 ----
+ case VAR_PARTIAL:
+ partial_unref(varp->vval.v_partial);
+ break;
++ case VAR_BLOB:
++ blob_unref(varp->vval.v_blob);
++ break;
+ case VAR_LIST:
+ list_unref(varp->vval.v_list);
+ break;
+***************
+*** 6887,6892 ****
+--- 7173,7182 ----
+ partial_unref(varp->vval.v_partial);
+ varp->vval.v_partial = NULL;
+ break;
++ case VAR_BLOB:
++ blob_unref(varp->vval.v_blob);
++ varp->vval.v_blob = NULL;
++ break;
+ case VAR_LIST:
+ list_unref(varp->vval.v_list);
+ varp->vval.v_list = NULL;
+***************
+*** 6990,6995 ****
+--- 7280,7288 ----
+ EMSG(_("E913: Using a Channel as a Number"));
+ break;
+ #endif
++ case VAR_BLOB:
++ EMSG(_("E974: Using a Blob as a Number"));
++ break;
+ case VAR_UNKNOWN:
+ internal_error("tv_get_number(UNKNOWN)");
+ break;
+***************
+*** 7037,7042 ****
+--- 7330,7338 ----
+ EMSG(_("E914: Using a Channel as a Float"));
+ break;
+ # endif
++ case VAR_BLOB:
++ EMSG(_("E975: Using a Blob as a Float"));
++ break;
+ case VAR_UNKNOWN:
+ internal_error("tv_get_float(UNKNOWN)");
+ break;
+***************
+*** 7113,7118 ****
+--- 7409,7417 ----
+ case VAR_SPECIAL:
+ STRCPY(buf, get_var_special_name(varp->vval.v_number));
+ return buf;
++ case VAR_BLOB:
++ EMSG(_("E976: using Blob as a String"));
++ break;
+ case VAR_JOB:
+ #ifdef FEAT_JOB_CHANNEL
+ {
+***************
+*** 7805,7810 ****
+--- 8104,8118 ----
+ ++to->vval.v_partial->pt_refcount;
+ }
+ break;
++ case VAR_BLOB:
++ if (from->vval.v_blob == NULL)
++ to->vval.v_blob = NULL;
++ else
++ {
++ to->vval.v_blob = from->vval.v_blob;
++ ++to->vval.v_blob->bv_refcount;
++ }
++ break;
+ case VAR_LIST:
+ if (from->vval.v_list == NULL)
+ to->vval.v_list = NULL;
+***************
+*** 7863,7868 ****
+--- 8171,8177 ----
+ case VAR_SPECIAL:
+ case VAR_JOB:
+ case VAR_CHANNEL:
++ case VAR_BLOB:
+ copy_tv(from, to);
+ break;
+ case VAR_LIST:
+***************
+*** 8601,8606 ****
+--- 8910,8916 ----
+ #endif
+ case 'D': type = VAR_DICT; break;
+ case 'L': type = VAR_LIST; break;
++ case 'B': type = VAR_BLOB; break;
+ case 'X': type = VAR_SPECIAL; break;
+ }
+
+***************
+*** 8608,8614 ****
+ if (tab != NULL)
+ {
+ tv.v_type = type;
+! if (type == VAR_STRING || type == VAR_DICT || type == VAR_LIST)
+ tv.vval.v_string = viminfo_readstring(virp,
+ (int)(tab - virp->vir_line + 1), TRUE);
+ #ifdef FEAT_FLOAT
+--- 8918,8925 ----
+ if (tab != NULL)
+ {
+ tv.v_type = type;
+! if (type == VAR_STRING || type == VAR_DICT ||
+! type == VAR_LIST || type == VAR_BLOB)
+ tv.vval.v_string = viminfo_readstring(virp,
+ (int)(tab - virp->vir_line + 1), TRUE);
+ #ifdef FEAT_FLOAT
+***************
+*** 8617,8623 ****
+ #endif
+ else
+ tv.vval.v_number = atol((char *)tab + 1);
+! if (type == VAR_DICT || type == VAR_LIST)
+ {
+ typval_T *etv = eval_expr(tv.vval.v_string, NULL);
+
+--- 8928,8934 ----
+ #endif
+ else
+ tv.vval.v_number = atol((char *)tab + 1);
+! if (type == VAR_DICT || type == VAR_LIST || type == VAR_BLOB)
+ {
+ typval_T *etv = eval_expr(tv.vval.v_string, NULL);
+
+***************
+*** 8640,8646 ****
+
+ if (tv.v_type == VAR_STRING)
+ vim_free(tv.vval.v_string);
+! else if (tv.v_type == VAR_DICT || tv.v_type == VAR_LIST)
+ clear_tv(&tv);
+ }
+ }
+--- 8951,8958 ----
+
+ if (tv.v_type == VAR_STRING)
+ vim_free(tv.vval.v_string);
+! else if (tv.v_type == VAR_DICT || tv.v_type == VAR_LIST ||
+! tv.v_type == VAR_BLOB)
+ clear_tv(&tv);
+ }
+ }
+***************
+*** 8684,8689 ****
+--- 8996,9002 ----
+ case VAR_FLOAT: s = "FLO"; break;
+ case VAR_DICT: s = "DIC"; break;
+ case VAR_LIST: s = "LIS"; break;
++ case VAR_BLOB: s = "BLO"; break;
+ case VAR_SPECIAL: s = "XPL"; break;
+
+ case VAR_UNKNOWN:
+***************
+*** 9250,9255 ****
+--- 9563,9595 ----
+ * it means TRUE. */
+ n1 = (type == TYPE_NEQUAL);
+ }
++ else if (typ1->v_type == VAR_BLOB || typ2->v_type == VAR_BLOB)
++ {
++ if (type_is)
++ {
++ n1 = (typ1->v_type == typ2->v_type
++ && typ1->vval.v_blob == typ2->vval.v_blob);
++ if (type == TYPE_NEQUAL)
++ n1 = !n1;
++ }
++ else if (typ1->v_type != typ2->v_type
++ || (type != TYPE_EQUAL && type != TYPE_NEQUAL))
++ {
++ if (typ1->v_type != typ2->v_type)
++ EMSG(_("E977: Can only compare Blob with Blob"));
++ else
++ EMSG(_(e_invalblob));
++ clear_tv(typ1);
++ return FAIL;
++ }
++ else
++ {
++ // Compare two Blobs for being equal or unequal.
++ n1 = blob_equal(typ1->vval.v_blob, typ2->vval.v_blob);
++ if (type == TYPE_NEQUAL)
++ n1 = !n1;
++ }
++ }
+ else if (typ1->v_type == VAR_LIST || typ2->v_type == VAR_LIST)
+ {
+ if (type_is)
+***************
+*** 10278,10283 ****
+--- 10618,10624 ----
+ dict_T *d = NULL;
+ typval_T save_val;
+ typval_T save_key;
++ blob_T *b = NULL;
+ int rem;
+ int todo;
+ char_u *ermsg = (char_u *)(map ? "map()" : "filter()");
+***************
+*** 10286,10292 ****
+ int save_did_emsg;
+ int idx = 0;
+
+! if (argvars[0].v_type == VAR_LIST)
+ {
+ if ((l = argvars[0].vval.v_list) == NULL
+ || (!map && tv_check_lock(l->lv_lock, arg_errmsg, TRUE)))
+--- 10627,10638 ----
+ int save_did_emsg;
+ int idx = 0;
+
+! if (argvars[0].v_type == VAR_BLOB)
+! {
+! if ((b = argvars[0].vval.v_blob) == NULL)
+! return;
+! }
+! else if (argvars[0].v_type == VAR_LIST)
+ {
+ if ((l = argvars[0].vval.v_list) == NULL
+ || (!map && tv_check_lock(l->lv_lock, arg_errmsg, TRUE)))
+***************
+*** 10353,10358 ****
+--- 10699,10735 ----
+ }
+ hash_unlock(ht);
+ }
++ else if (argvars[0].v_type == VAR_BLOB)
++ {
++ int i;
++ typval_T tv;
++
++ vimvars[VV_KEY].vv_type = VAR_NUMBER;
++ for (i = 0; i < b->bv_ga.ga_len; i++)
++ {
++ tv.v_type = VAR_NUMBER;
++ tv.vval.v_number = blob_get(b, i);
++ vimvars[VV_KEY].vv_nr = idx;
++ if (filter_map_one(&tv, expr, map, &rem) == FAIL || did_emsg)
++ break;
++ if (tv.v_type != VAR_NUMBER)
++ {
++ EMSG(_(e_invalblob));
++ return;
++ }
++ tv.v_type = VAR_NUMBER;
++ blob_set(b, i, tv.vval.v_number);
++ if (!map && rem)
++ {
++ char_u *p = (char_u *)argvars[0].vval.v_blob->bv_ga.ga_data;
++
++ mch_memmove(p + idx, p + i + 1,
++ (size_t)b->bv_ga.ga_len - i - 1);
++ --b->bv_ga.ga_len;
++ --i;
++ }
++ }
++ }
+ else
+ {
+ vimvars[VV_KEY].vv_type = VAR_NUMBER;
+*** ../vim-8.1.0734/src/evalfunc.c 2019-01-12 13:50:27.712026891 +0100
+--- src/evalfunc.c 2019-01-12 22:21:55.631440482 +0100
+***************
+*** 96,101 ****
+--- 96,102 ----
+ static void f_ch_logfile(typval_T *argvars, typval_T *rettv);
+ static void f_ch_open(typval_T *argvars, typval_T *rettv);
+ static void f_ch_read(typval_T *argvars, typval_T *rettv);
++ static void f_ch_readblob(typval_T *argvars, typval_T *rettv);
+ static void f_ch_readraw(typval_T *argvars, typval_T *rettv);
+ static void f_ch_sendexpr(typval_T *argvars, typval_T *rettv);
+ static void f_ch_sendraw(typval_T *argvars, typval_T *rettv);
+***************
+*** 570,575 ****
+--- 571,577 ----
+ {"ch_logfile", 1, 2, f_ch_logfile},
+ {"ch_open", 1, 2, f_ch_open},
+ {"ch_read", 1, 2, f_ch_read},
++ {"ch_readblob", 1, 2, f_ch_readblob},
+ {"ch_readraw", 1, 2, f_ch_readraw},
+ {"ch_sendexpr", 2, 3, f_ch_sendexpr},
+ {"ch_sendraw", 2, 3, f_ch_sendraw},
+***************
+*** 1237,1242 ****
+--- 1239,1245 ----
+ f_add(typval_T *argvars, typval_T *rettv)
+ {
+ list_T *l;
++ blob_T *b;
+
+ rettv->vval.v_number = 1; /* Default: Failed */
+ if (argvars[0].v_type == VAR_LIST)
+***************
+*** 1247,1252 ****
+--- 1250,1265 ----
+ && list_append_tv(l, &argvars[1]) == OK)
+ copy_tv(&argvars[0], rettv);
+ }
++ else if (argvars[0].v_type == VAR_BLOB)
++ {
++ if ((b = argvars[0].vval.v_blob) != NULL
++ && !tv_check_lock(b->bv_lock,
++ (char_u *)N_("add() argument"), TRUE))
++ {
++ ga_append(&b->bv_ga, (char_u)tv_get_number(&argvars[1]));
++ copy_tv(&argvars[0], rettv);
++ }
++ }
+ else
+ EMSG(_(e_listreq));
+ }
+***************
+*** 2309,2315 ****
+ static void
+ f_ch_read(typval_T *argvars, typval_T *rettv)
+ {
+! common_channel_read(argvars, rettv, FALSE);
+ }
+
+ /*
+--- 2322,2337 ----
+ static void
+ f_ch_read(typval_T *argvars, typval_T *rettv)
+ {
+! common_channel_read(argvars, rettv, FALSE, FALSE);
+! }
+!
+! /*
+! * "ch_readblob()" function
+! */
+! static void
+! f_ch_readblob(typval_T *argvars, typval_T *rettv)
+! {
+! common_channel_read(argvars, rettv, TRUE, TRUE);
+ }
+
+ /*
+***************
+*** 2318,2324 ****
+ static void
+ f_ch_readraw(typval_T *argvars, typval_T *rettv)
+ {
+! common_channel_read(argvars, rettv, TRUE);
+ }
+
+ /*
+--- 2340,2346 ----
+ static void
+ f_ch_readraw(typval_T *argvars, typval_T *rettv)
+ {
+! common_channel_read(argvars, rettv, TRUE, FALSE);
+ }
+
+ /*
+***************
+*** 3170,3175 ****
+--- 3192,3203 ----
+ n = argvars[0].vval.v_number != VVAL_TRUE;
+ break;
+
++ case VAR_BLOB:
++ n = argvars[0].vval.v_blob == NULL
++ || argvars[0].vval.v_blob->bv_ga.ga_data == NULL
++ || argvars[0].vval.v_blob->bv_ga.ga_len == 0;
++ break;
++
+ case VAR_JOB:
+ #ifdef FEAT_JOB_CHANNEL
+ n = argvars[0].vval.v_job == NULL
+***************
+*** 4365,4371 ****
+ dict_T *d;
+ typval_T *tv = NULL;
+
+! if (argvars[0].v_type == VAR_LIST)
+ {
+ if ((l = argvars[0].vval.v_list) != NULL)
+ {
+--- 4393,4413 ----
+ dict_T *d;
+ typval_T *tv = NULL;
+
+! if (argvars[0].v_type == VAR_BLOB)
+! {
+! int error = FALSE;
+! int idx = tv_get_number_chk(&argvars[1], &error);
+!
+! if (!error)
+! {
+! rettv->v_type = VAR_NUMBER;
+! if (idx >= blob_len(argvars[0].vval.v_blob))
+! EMSGN(_(e_blobidx), idx);
+! else
+! rettv->vval.v_number = blob_get(argvars[0].vval.v_blob, idx);
+! }
+! }
+! else if (argvars[0].v_type == VAR_LIST)
+ {
+ if ((l = argvars[0].vval.v_list) != NULL)
+ {
+***************
+*** 6965,6987 ****
+ {
+ list_T *l;
+ listitem_T *item;
+ long idx = 0;
+ int ic = FALSE;
+
+ rettv->vval.v_number = -1;
+! if (argvars[0].v_type != VAR_LIST)
+ {
+ EMSG(_(e_listreq));
+ return;
+ }
+ l = argvars[0].vval.v_list;
+ if (l != NULL)
+ {
+ item = l->lv_first;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+- int error = FALSE;
+-
+ /* Start at specified item. Use the cached index that list_find()
+ * sets, so that a negative number also works. */
+ item = list_find(l, (long)tv_get_number_chk(&argvars[2], &error));
+--- 7007,7056 ----
+ {
+ list_T *l;
+ listitem_T *item;
++ blob_T *b;
+ long idx = 0;
+ int ic = FALSE;
++ int error = FALSE;
+
+ rettv->vval.v_number = -1;
+! if (argvars[0].v_type == VAR_BLOB)
+! {
+! typval_T tv;
+! int start = 0;
+!
+! if (argvars[2].v_type != VAR_UNKNOWN)
+! {
+! start = tv_get_number_chk(&argvars[2], &error);
+! if (error)
+! return;
+! }
+! b = argvars[0].vval.v_blob;
+! if (b == NULL)
+! return;
+! for (idx = start; idx < blob_len(b); ++idx)
+! {
+! tv.v_type = VAR_NUMBER;
+! tv.vval.v_number = blob_get(b, idx);
+! if (tv_equal(&tv, &argvars[1], ic, FALSE))
+! {
+! rettv->vval.v_number = idx;
+! return;
+! }
+! }
+! return;
+! }
+! else if (argvars[0].v_type != VAR_LIST)
+ {
+ EMSG(_(e_listreq));
+ return;
+ }
++
+ l = argvars[0].vval.v_list;
+ if (l != NULL)
+ {
+ item = l->lv_first;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+ /* Start at specified item. Use the cached index that list_find()
+ * sets, so that a negative number also works. */
+ item = list_find(l, (long)tv_get_number_chk(&argvars[2], &error));
+***************
+*** 7160,7169 ****
+ list_T *l;
+ int error = FALSE;
+
+! if (argvars[0].v_type != VAR_LIST)
+ EMSG2(_(e_listarg), "insert()");
+! else if ((l = argvars[0].vval.v_list) != NULL
+! && !tv_check_lock(l->lv_lock, (char_u *)N_("insert() argument"), TRUE))
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ before = (long)tv_get_number_chk(&argvars[2], &error);
+--- 7229,7273 ----
+ list_T *l;
+ int error = FALSE;
+
+! if (argvars[0].v_type == VAR_BLOB)
+! {
+! int val, len;
+! char_u *p;
+!
+! len = blob_len(argvars[0].vval.v_blob);
+! if (argvars[2].v_type != VAR_UNKNOWN)
+! {
+! before = (long)tv_get_number_chk(&argvars[2], &error);
+! if (error)
+! return; // type error; errmsg already given
+! if (before < 0 || before > len)
+! {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[2]));
+! return;
+! }
+! }
+! val = tv_get_number_chk(&argvars[1], &error);
+! if (error)
+! return;
+! if (val < 0 || val > 255)
+! {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[1]));
+! return;
+! }
+!
+! if (ga_grow(&argvars[0].vval.v_blob->bv_ga, 1) == FAIL)
+! return;
+! p = (char_u *)argvars[0].vval.v_blob->bv_ga.ga_data;
+! mch_memmove(p + before + 1, p + before, (size_t)len - before);
+! *(p + before) = val;
+! ++argvars[0].vval.v_blob->bv_ga.ga_len;
+!
+! copy_tv(&argvars[0], rettv);
+! }
+! else if (argvars[0].v_type != VAR_LIST)
+ EMSG2(_(e_listarg), "insert()");
+! else if ((l = argvars[0].vval.v_list) != NULL && !tv_check_lock(l->lv_lock,
+! (char_u *)N_("insert() argument"), TRUE))
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ before = (long)tv_get_number_chk(&argvars[2], &error);
+***************
+*** 7527,7532 ****
+--- 7631,7639 ----
+ rettv->vval.v_number = (varnumber_T)STRLEN(
+ tv_get_string(&argvars[0]));
+ break;
++ case VAR_BLOB:
++ rettv->vval.v_number = blob_len(argvars[0].vval.v_blob);
++ break;
+ case VAR_LIST:
+ rettv->vval.v_number = list_len(argvars[0].vval.v_list);
+ break;
+***************
+*** 8926,8931 ****
+--- 9033,9039 ----
+ f_readfile(typval_T *argvars, typval_T *rettv)
+ {
+ int binary = FALSE;
++ int blob = FALSE;
+ int failed = FALSE;
+ char_u *fname;
+ FILE *fd;
+***************
+*** 8944,8955 ****
+ {
+ if (STRCMP(tv_get_string(&argvars[1]), "b") == 0)
+ binary = TRUE;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ maxline = (long)tv_get_number(&argvars[2]);
+ }
+
+! if (rettv_list_alloc(rettv) == FAIL)
+! return;
+
+ /* Always open the file in binary mode, library functions have a mind of
+ * their own about CR-LF conversion. */
+--- 9052,9074 ----
+ {
+ if (STRCMP(tv_get_string(&argvars[1]), "b") == 0)
+ binary = TRUE;
++ if (STRCMP(tv_get_string(&argvars[1]), "B") == 0)
++ blob = TRUE;
++
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ maxline = (long)tv_get_number(&argvars[2]);
+ }
+
+! if (blob)
+! {
+! if (rettv_blob_alloc(rettv) == FAIL)
+! return;
+! }
+! else
+! {
+! if (rettv_list_alloc(rettv) == FAIL)
+! return;
+! }
+
+ /* Always open the file in binary mode, library functions have a mind of
+ * their own about CR-LF conversion. */
+***************
+*** 8960,8965 ****
+--- 9079,9095 ----
+ return;
+ }
+
++ if (blob)
++ {
++ if (read_blob(fd, rettv->vval.v_blob) == FAIL)
++ {
++ EMSG("cannot read file");
++ blob_free(rettv->vval.v_blob);
++ }
++ fclose(fd);
++ return;
++ }
++
+ while (cnt < maxline || maxline < 0)
+ {
+ readlen = (int)fread(buf, 1, io_size, fd);
+***************
+*** 9555,9560 ****
+--- 9685,9691 ----
+ dict_T *d;
+ dictitem_T *di;
+ char_u *arg_errmsg = (char_u *)N_("remove() argument");
++ int error = FALSE;
+
+ if (argvars[0].v_type == VAR_DICT)
+ {
+***************
+*** 9579,9594 ****
+ }
+ }
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+ EMSG2(_(e_listdictarg), "remove()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+! && !tv_check_lock(l->lv_lock, arg_errmsg, TRUE))
+ {
+- int error = FALSE;
+-
+ idx = (long)tv_get_number_chk(&argvars[1], &error);
+ if (error)
+! ; /* type error: do nothing, errmsg already given */
+ else if ((item = list_find(l, idx)) == NULL)
+ EMSGN(_(e_listidx), idx);
+ else
+--- 9710,9785 ----
+ }
+ }
+ }
++ else if (argvars[0].v_type == VAR_BLOB)
++ {
++ idx = (long)tv_get_number_chk(&argvars[1], &error);
++ if (!error)
++ {
++ blob_T *b = argvars[0].vval.v_blob;
++ int len = blob_len(b);
++ char_u *p;
++
++ if (idx < 0)
++ // count from the end
++ idx = len + idx;
++ if (idx < 0 || idx >= len)
++ {
++ EMSGN(_(e_blobidx), idx);
++ return;
++ }
++ if (argvars[2].v_type == VAR_UNKNOWN)
++ {
++ // Remove one item, return its value.
++ p = (char_u *)b->bv_ga.ga_data;
++ rettv->vval.v_number = (varnumber_T) *(p + idx);
++ mch_memmove(p + idx, p + idx + 1, (size_t)len - idx - 1);
++ --b->bv_ga.ga_len;
++ }
++ else
++ {
++ blob_T *blob;
++
++ // Remove range of items, return list with values.
++ end = (long)tv_get_number_chk(&argvars[2], &error);
++ if (error)
++ return;
++ if (end < 0)
++ // count from the end
++ end = len + end;
++ if (end >= len || idx > end)
++ {
++ EMSGN(_(e_blobidx), end);
++ return;
++ }
++ blob = blob_alloc();
++ if (blob == NULL)
++ return;
++ blob->bv_ga.ga_len = end - idx + 1;
++ if (ga_grow(&blob->bv_ga, end - idx + 1) == FAIL)
++ {
++ vim_free(blob);
++ return;
++ }
++ p = (char_u *)b->bv_ga.ga_data;
++ mch_memmove((char_u *)blob->bv_ga.ga_data, p + idx,
++ (size_t)(end - idx + 1));
++ ++blob->bv_refcount;
++ rettv->v_type = VAR_BLOB;
++ rettv->vval.v_blob = blob;
++
++ mch_memmove(p + idx, p + end + 1, (size_t)(len - end));
++ b->bv_ga.ga_len -= end - idx + 1;
++ }
++ }
++ }
+ else if (argvars[0].v_type != VAR_LIST)
+ EMSG2(_(e_listdictarg), "remove()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+! && !tv_check_lock(l->lv_lock, arg_errmsg, TRUE))
+ {
+ idx = (long)tv_get_number_chk(&argvars[1], &error);
+ if (error)
+! ; // type error: do nothing, errmsg already given
+ else if ((item = list_find(l, idx)) == NULL)
+ EMSGN(_(e_listidx), idx);
+ else
+***************
+*** 9602,9611 ****
+ }
+ else
+ {
+! /* Remove range of items, return list with values. */
+ end = (long)tv_get_number_chk(&argvars[2], &error);
+ if (error)
+! ; /* type error: do nothing */
+ else if ((item2 = list_find(l, end)) == NULL)
+ EMSGN(_(e_listidx), end);
+ else
+--- 9793,9802 ----
+ }
+ else
+ {
+! // Remove range of items, return list with values.
+ end = (long)tv_get_number_chk(&argvars[2], &error);
+ if (error)
+! ; // type error: do nothing
+ else if ((item2 = list_find(l, end)) == NULL)
+ EMSGN(_(e_listidx), end);
+ else
+***************
+*** 9912,9917 ****
+--- 10103,10124 ----
+ list_T *l;
+ listitem_T *li, *ni;
+
++ if (argvars[0].v_type == VAR_BLOB)
++ {
++ blob_T *b = argvars[0].vval.v_blob;
++ int i, len = blob_len(b);
++
++ for (i = 0; i < len / 2; i++)
++ {
++ int tmp = blob_get(b, i);
++
++ blob_set(b, i, blob_get(b, len - i - 1));
++ blob_set(b, len - i - 1, tmp);
++ }
++ rettv_blob_set(rettv, b);
++ return;
++ }
++
+ if (argvars[0].v_type != VAR_LIST)
+ EMSG2(_(e_listarg), "reverse()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+***************
+*** 14198,14203 ****
+--- 14405,14411 ----
+ break;
+ case VAR_JOB: n = VAR_TYPE_JOB; break;
+ case VAR_CHANNEL: n = VAR_TYPE_CHANNEL; break;
++ case VAR_BLOB: n = VAR_TYPE_BLOB; break;
+ case VAR_UNKNOWN:
+ internal_error("f_type(UNKNOWN)");
+ n = -1;
+***************
+*** 14556,14578 ****
+ FILE *fd;
+ int ret = 0;
+ listitem_T *li;
+! list_T *list;
+
+ rettv->vval.v_number = -1;
+ if (check_restricted() || check_secure())
+ return;
+
+! if (argvars[0].v_type != VAR_LIST)
+ {
+! EMSG2(_(e_listarg), "writefile()");
+! return;
+ }
+! list = argvars[0].vval.v_list;
+! if (list == NULL)
+! return;
+! for (li = list->lv_first; li != NULL; li = li->li_next)
+! if (tv_get_string_chk(&li->li_tv) == NULL)
+ return;
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+--- 14764,14796 ----
+ FILE *fd;
+ int ret = 0;
+ listitem_T *li;
+! list_T *list = NULL;
+! blob_T *blob = NULL;
+
+ rettv->vval.v_number = -1;
+ if (check_restricted() || check_secure())
+ return;
+
+! if (argvars[0].v_type == VAR_LIST)
+ {
+! list = argvars[0].vval.v_list;
+! if (list == NULL)
+! return;
+! for (li = list->lv_first; li != NULL; li = li->li_next)
+! if (tv_get_string_chk(&li->li_tv) == NULL)
+! return;
+ }
+! else if (argvars[0].v_type == VAR_BLOB)
+! {
+! blob = argvars[0].vval.v_blob;
+! if (blob == NULL)
+ return;
++ }
++ else
++ {
++ EMSG2(_(e_invarg2), "writefile()");
++ return;
++ }
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+***************
+*** 14604,14609 ****
+--- 14822,14839 ----
+ EMSG2(_(e_notcreate), *fname == NUL ? (char_u *)_("<empty>") : fname);
+ ret = -1;
+ }
++ else if (blob)
++ {
++ if (write_blob(fd, blob) == FAIL)
++ ret = -1;
++ #ifdef HAVE_FSYNC
++ 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);
++ }
+ else
+ {
+ if (write_list(fd, list, binary) == FAIL)
+*** ../vim-8.1.0734/src/if_perl.xs 2018-09-21 14:01:23.148405740 +0200
+--- src/if_perl.xs 2019-01-12 18:52:14.242595860 +0100
+***************
+*** 236,241 ****
+--- 236,242 ----
+ # else
+ # define Perl_sv_2pv dll_Perl_sv_2pv
+ # endif
++ # define Perl_sv_2pvbyte dll_Perl_sv_2pvbyte
+ # define Perl_sv_bless dll_Perl_sv_bless
+ # if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
+ # define Perl_sv_catpvn_flags dll_Perl_sv_catpvn_flags
+***************
+*** 388,393 ****
+--- 389,395 ----
+ # else
+ static char* (*Perl_sv_2pv)(pTHX_ SV*, STRLEN*);
+ # endif
++ static char* (*Perl_sv_2pvbyte)(pTHX_ SV*, STRLEN*);
+ static SV* (*Perl_sv_bless)(pTHX_ SV*, HV*);
+ # if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
+ static void (*Perl_sv_catpvn_flags)(pTHX_ SV* , const char*, STRLEN, I32);
+***************
+*** 543,548 ****
+--- 545,551 ----
+ # else
+ {"Perl_sv_2pv", (PERL_PROC*)&Perl_sv_2pv},
+ # endif
++ {"Perl_sv_2pvbyte", (PERL_PROC*)&Perl_sv_2pvbyte},
+ # ifdef PERL589_OR_LATER
+ {"Perl_sv_2iv_flags", (PERL_PROC*)&Perl_sv_2iv_flags},
+ {"Perl_newXS_flags", (PERL_PROC*)&Perl_newXS_flags},
+***************
+*** 1556,1561 ****
+--- 1559,1585 ----
+ vim_free(value);
+ }
+
++ SV*
++ Blob(SV* sv)
++ PREINIT:
++ STRLEN len;
++ char *s;
++ int i;
++ char buf[3];
++ SV* newsv;
++
++ CODE:
++ s = SvPVbyte(sv, len);
++ newsv = newSVpv("0z", 2);
++ for (i = 0; i < len; i++)
++ {
++ sprintf(buf, "%02X", s[i]);
++ sv_catpvn(newsv, buf, 2);
++ }
++ RETVAL = newsv;
++ OUTPUT:
++ RETVAL
++
+ void
+ Buffers(...)
+
+*** ../vim-8.1.0734/src/if_py_both.h 2018-12-23 13:36:36.671194499 +0100
+--- src/if_py_both.h 2019-01-12 18:52:14.242595860 +0100
+***************
+*** 867,872 ****
+--- 867,876 ----
+ }
+ return ret;
+ }
++ else if (our_tv->v_type == VAR_BLOB)
++ ret = PyBytes_FromStringAndSize(
++ (char*) our_tv->vval.v_blob->bv_ga.ga_data,
++ (Py_ssize_t) our_tv->vval.v_blob->bv_ga.ga_len);
+ else
+ {
+ Py_INCREF(Py_None);
+***************
+*** 6394,6399 ****
+--- 6398,6407 ----
+ tv->vval.v_partial->pt_argc, argv,
+ tv->vval.v_partial->pt_dict,
+ tv->vval.v_partial->pt_auto);
++ case VAR_BLOB:
++ return PyBytes_FromStringAndSize(
++ (char*) tv->vval.v_blob->bv_ga.ga_data,
++ (Py_ssize_t) tv->vval.v_blob->bv_ga.ga_len);
+ case VAR_UNKNOWN:
+ case VAR_CHANNEL:
+ case VAR_JOB:
+*** ../vim-8.1.0734/src/if_python.c 2018-03-29 18:08:42.000000000 +0200
+--- src/if_python.c 2019-01-12 18:52:14.242595860 +0100
+***************
+*** 1575,1580 ****
+--- 1575,1581 ----
+ case VAR_SPECIAL:
+ case VAR_JOB:
+ case VAR_CHANNEL:
++ case VAR_BLOB:
+ break;
+ }
+ }
+*** ../vim-8.1.0734/src/if_python3.c 2018-09-30 21:43:17.195693290 +0200
+--- src/if_python3.c 2019-01-12 18:52:14.242595860 +0100
+***************
+*** 232,237 ****
+--- 232,239 ----
+ # endif
+ # undef PyBytes_FromString
+ # define PyBytes_FromString py3_PyBytes_FromString
++ # undef PyBytes_FromStringAndSize
++ # define PyBytes_FromStringAndSize py3_PyBytes_FromStringAndSize
+ # define PyFloat_FromDouble py3_PyFloat_FromDouble
+ # define PyFloat_AsDouble py3_PyFloat_AsDouble
+ # define PyObject_GenericGetAttr py3_PyObject_GenericGetAttr
+***************
+*** 394,399 ****
+--- 396,402 ----
+ static char* (*py3_PyBytes_AsString)(PyObject *bytes);
+ static int (*py3_PyBytes_AsStringAndSize)(PyObject *bytes, char **buffer, Py_ssize_t *length);
+ static PyObject* (*py3_PyBytes_FromString)(char *str);
++ static PyObject* (*py3_PyBytes_FromStringAndSize)(char *str, Py_ssize_t length);
+ static PyObject* (*py3_PyFloat_FromDouble)(double num);
+ static double (*py3_PyFloat_AsDouble)(PyObject *);
+ static PyObject* (*py3_PyObject_GenericGetAttr)(PyObject *obj, PyObject *name);
+***************
+*** 559,564 ****
+--- 562,568 ----
+ {"PyBytes_AsString", (PYTHON_PROC*)&py3_PyBytes_AsString},
+ {"PyBytes_AsStringAndSize", (PYTHON_PROC*)&py3_PyBytes_AsStringAndSize},
+ {"PyBytes_FromString", (PYTHON_PROC*)&py3_PyBytes_FromString},
++ {"PyBytes_FromStringAndSize", (PYTHON_PROC*)&py3_PyBytes_FromStringAndSize},
+ {"PyFloat_FromDouble", (PYTHON_PROC*)&py3_PyFloat_FromDouble},
+ {"PyFloat_AsDouble", (PYTHON_PROC*)&py3_PyFloat_AsDouble},
+ {"PyObject_GenericGetAttr", (PYTHON_PROC*)&py3_PyObject_GenericGetAttr},
+***************
+*** 1680,1685 ****
+--- 1684,1690 ----
+ case VAR_SPECIAL:
+ case VAR_JOB:
+ case VAR_CHANNEL:
++ case VAR_BLOB:
+ break;
+ }
+ }
+*** ../vim-8.1.0734/src/if_ruby.c 2019-01-08 20:29:29.339909743 +0100
+--- src/if_ruby.c 2019-01-12 18:52:14.242595860 +0100
+***************
+*** 51,56 ****
+--- 51,57 ----
+ # define rb_cFloat (*dll_rb_cFloat)
+ # endif
+ # define rb_cNilClass (*dll_rb_cNilClass)
++ # define rb_cString (*dll_rb_cString)
+ # define rb_cSymbol (*dll_rb_cSymbol)
+ # define rb_cTrueClass (*dll_rb_cTrueClass)
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
+***************
+*** 219,224 ****
+--- 220,226 ----
+ */
+ # define rb_assoc_new dll_rb_assoc_new
+ # define rb_cObject (*dll_rb_cObject)
++ # define rb_class_new_instance dll_rb_class_new_instance
+ # define rb_check_type dll_rb_check_type
+ # ifdef USE_TYPEDDATA
+ # define rb_check_typeddata dll_rb_check_typeddata
+***************
+*** 365,372 ****
+--- 367,376 ----
+ # endif
+ VALUE *dll_rb_cNilClass;
+ static VALUE *dll_rb_cObject;
++ VALUE *dll_rb_cString;
+ VALUE *dll_rb_cSymbol;
+ VALUE *dll_rb_cTrueClass;
++ static VALUE (*dll_rb_class_new_instance) (int,VALUE*,VALUE);
+ static void (*dll_rb_check_type) (VALUE,int);
+ # ifdef USE_TYPEDDATA
+ static void *(*dll_rb_check_typeddata) (VALUE,const rb_data_type_t *);
+***************
+*** 579,586 ****
+--- 583,592 ----
+ # endif
+ {"rb_cNilClass", (RUBY_PROC*)&dll_rb_cNilClass},
+ {"rb_cObject", (RUBY_PROC*)&dll_rb_cObject},
++ {"rb_cString", (RUBY_PROC*)&dll_rb_cString},
+ {"rb_cSymbol", (RUBY_PROC*)&dll_rb_cSymbol},
+ {"rb_cTrueClass", (RUBY_PROC*)&dll_rb_cTrueClass},
++ {"rb_class_new_instance", (RUBY_PROC*)&dll_rb_class_new_instance},
+ {"rb_check_type", (RUBY_PROC*)&dll_rb_check_type},
+ # ifdef USE_TYPEDDATA
+ {"rb_check_typeddata", (RUBY_PROC*)&dll_rb_check_typeddata},
+***************
+*** 1164,1170 ****
+ result = Qtrue;
+ else if (tv->vval.v_number == VVAL_FALSE)
+ result = Qfalse;
+! } /* else return Qnil; */
+
+ return result;
+ }
+--- 1170,1182 ----
+ result = Qtrue;
+ else if (tv->vval.v_number == VVAL_FALSE)
+ result = Qfalse;
+! }
+! else if (tv->v_type == VAR_BLOB)
+! {
+! result = rb_str_new(tv->vval.v_blob->bv_ga.ga_data,
+! tv->vval.v_blob->bv_ga.ga_len);
+! }
+! /* else return Qnil; */
+
+ return result;
+ }
+***************
+*** 1242,1247 ****
+--- 1254,1272 ----
+ return buf;
+ }
+
++ static VALUE vim_blob(VALUE self UNUSED, VALUE str)
++ {
++ VALUE result = rb_str_new("0z", 2);
++ char buf[4];
++ int i;
++ for (i = 0; i < RSTRING_LEN(str); i++)
++ {
++ sprintf(buf, "%02X", RSTRING_PTR(str)[i]);
++ rb_str_concat(result, rb_str_new_cstr(buf));
++ }
++ return result;
++ }
++
+ static VALUE buffer_s_current(void)
+ {
+ return buffer_new(curbuf);
+***************
+*** 1662,1667 ****
+--- 1687,1693 ----
+ rb_define_module_function(mVIM, "set_option", vim_set_option, 1);
+ rb_define_module_function(mVIM, "command", vim_command, 1);
+ rb_define_module_function(mVIM, "evaluate", vim_evaluate, 1);
++ rb_define_module_function(mVIM, "blob", vim_blob, 1);
+
+ eDeletedBufferError = rb_define_class_under(mVIM, "DeletedBufferError",
+ rb_eStandardError);
+*** ../vim-8.1.0734/src/json.c 2019-01-12 14:24:22.627597552 +0100
+--- src/json.c 2019-01-12 18:52:14.242595860 +0100
+***************
+*** 195,202 ****
+--- 195,204 ----
+ {
+ char_u numbuf[NUMBUFLEN];
+ char_u *res;
++ blob_T *b;
+ list_T *l;
+ dict_T *d;
++ int i;
+
+ switch (val->v_type)
+ {
+***************
+*** 233,238 ****
+--- 235,259 ----
+ EMSG(_(e_invarg));
+ return FAIL;
+
++ case VAR_BLOB:
++ b = val->vval.v_blob;
++ if (b == NULL || b->bv_ga.ga_len == 0)
++ ga_concat(gap, (char_u *)"[]");
++ else
++ {
++ ga_append(gap, '[');
++ for (i = 0; i < b->bv_ga.ga_len; i++)
++ {
++ if (i > 0)
++ ga_concat(gap, (char_u *)",");
++ vim_snprintf((char *)numbuf, NUMBUFLEN, "%d",
++ (int)blob_get(b, i));
++ ga_concat(gap, numbuf);
++ }
++ ga_append(gap, ']');
++ }
++ break;
++
+ case VAR_LIST:
+ l = val->vval.v_list;
+ if (l == NULL)
+*** ../vim-8.1.0734/src/netbeans.c 2018-12-29 18:53:07.843607433 +0100
+--- src/netbeans.c 2019-01-12 18:52:14.242595860 +0100
+***************
+*** 404,410 ****
+ if (*p == NUL)
+ {
+ own_node = TRUE;
+! buffer = channel_get(nb_channel, PART_SOCK);
+ /* "node" is now invalid! */
+ }
+ else
+--- 404,410 ----
+ if (*p == NUL)
+ {
+ own_node = TRUE;
+! buffer = channel_get(nb_channel, PART_SOCK, NULL);
+ /* "node" is now invalid! */
+ }
+ else
+*** ../vim-8.1.0734/src/proto.h 2019-01-01 13:20:05.940711222 +0100
+--- src/proto.h 2019-01-12 18:52:14.242595860 +0100
+***************
+*** 88,93 ****
+--- 88,94 ----
+ # include "hashtab.pro"
+ # include "json.pro"
+ # include "list.pro"
++ # include "blob.pro"
+ # include "main.pro"
+ # include "mark.pro"
+ # include "memfile.pro"
+*** ../vim-8.1.0734/src/proto/blob.pro 2019-01-12 22:40:58.105219042 +0100
+--- src/proto/blob.pro 2019-01-12 20:31:31.262919660 +0100
+***************
+*** 0 ****
+--- 1,13 ----
++ /* blob.c */
++ blob_T *blob_alloc(void);
++ int rettv_blob_alloc(typval_T *rettv);
++ void rettv_blob_set(typval_T *rettv, blob_T *b);
++ void blob_free(blob_T *b);
++ void blob_unref(blob_T *b);
++ long blob_len(blob_T *b);
++ char_u blob_get(blob_T *b, int idx);
++ void blob_set(blob_T *b, int idx, char_u c);
++ int blob_equal(blob_T *b1, blob_T *b2);
++ int read_blob(FILE *fd, blob_T *blob);
++ int write_blob(FILE *fd, blob_T *blob);
++ /* vim: set ft=c : */
+*** ../vim-8.1.0734/src/proto/channel.pro 2018-12-14 21:31:58.008319718 +0100
+--- src/proto/channel.pro 2019-01-12 18:52:14.242595860 +0100
+***************
+*** 18,24 ****
+ void channel_write_new_lines(buf_T *buf);
+ readq_T *channel_peek(channel_T *channel, ch_part_T part);
+ char_u *channel_first_nl(readq_T *node);
+! char_u *channel_get(channel_T *channel, ch_part_T part);
+ void channel_consume(channel_T *channel, ch_part_T part, int len);
+ int channel_collapse(channel_T *channel, ch_part_T part, int want_nl);
+ int channel_can_write_to(channel_T *channel);
+--- 18,24 ----
+ void channel_write_new_lines(buf_T *buf);
+ readq_T *channel_peek(channel_T *channel, ch_part_T part);
+ char_u *channel_first_nl(readq_T *node);
+! char_u *channel_get(channel_T *channel, ch_part_T part, int *outlen);
+ void channel_consume(channel_T *channel, ch_part_T part, int len);
+ int channel_collapse(channel_T *channel, ch_part_T part, int want_nl);
+ int channel_can_write_to(channel_T *channel);
+***************
+*** 30,36 ****
+ void channel_close_in(channel_T *channel);
+ void channel_clear(channel_T *channel);
+ void channel_free_all(void);
+! void common_channel_read(typval_T *argvars, typval_T *rettv, int raw);
+ channel_T *channel_fd2channel(sock_T fd, ch_part_T *partp);
+ void channel_handle_events(int only_keep_open);
+ int channel_any_keep_open(void);
+--- 30,36 ----
+ void channel_close_in(channel_T *channel);
+ void channel_clear(channel_T *channel);
+ void channel_free_all(void);
+! void common_channel_read(typval_T *argvars, typval_T *rettv, int raw, int blob);
+ channel_T *channel_fd2channel(sock_T fd, ch_part_T *partp);
+ void channel_handle_events(int only_keep_open);
+ int channel_any_keep_open(void);
+*** ../vim-8.1.0734/src/structs.h 2019-01-04 15:09:52.918373097 +0100
+--- src/structs.h 2019-01-12 18:56:15.668991755 +0100
+***************
+*** 1251,1256 ****
+--- 1251,1257 ----
+ typedef struct listvar_S list_T;
+ typedef struct dictvar_S dict_T;
+ typedef struct partial_S partial_T;
++ typedef struct blobvar_S blob_T;
+
+ typedef struct jobvar_S job_T;
+ typedef struct readq_S readq_T;
+***************
+*** 1272,1277 ****
+--- 1273,1279 ----
+ VAR_SPECIAL, // "v_number" is used
+ VAR_JOB, // "v_job" is used
+ VAR_CHANNEL, // "v_channel" is used
++ VAR_BLOB, // "v_blob" is used
+ } vartype_T;
+
+ /*
+***************
+*** 1295,1300 ****
+--- 1297,1303 ----
+ job_T *v_job; /* job value (can be NULL!) */
+ channel_T *v_channel; /* channel value (can be NULL!) */
+ #endif
++ blob_T *v_blob; /* blob value (can be NULL!) */
+ } vval;
+ } typval_T;
+
+***************
+*** 1401,1406 ****
+--- 1404,1419 ----
+ dict_T *dv_used_prev; /* previous dict in used dicts list */
+ };
+
++ /*
++ * Structure to hold info about a blob.
++ */
++ struct blobvar_S
++ {
++ garray_T bv_ga; // growarray with the data
++ int bv_refcount; // reference count
++ char bv_lock; // zero, VAR_LOCKED, VAR_FIXED
++ };
++
+ #if defined(FEAT_EVAL) || defined(PROTO)
+ typedef struct funccall_S funccall_T;
+
+***************
+*** 3526,3531 ****
+--- 3539,3545 ----
+ dict_T *ll_dict; /* The Dictionary or NULL */
+ dictitem_T *ll_di; /* The dictitem or NULL */
+ char_u *ll_newkey; /* New key for Dict in alloc. mem or NULL. */
++ blob_T *ll_blob; /* The Blob or NULL */
+ } lval_T;
+
+ /* Structure used to save the current state. Used when executing Normal mode
+*** ../vim-8.1.0734/src/testdir/Make_all.mak 2019-01-12 13:25:42.633479785 +0100
+--- src/testdir/Make_all.mak 2019-01-12 18:54:17.729776157 +0100
+***************
+*** 73,78 ****
+--- 73,79 ----
+ test_backspace_opt \
+ test_backup \
+ test_behave \
++ test_blob \
+ test_blockedit \
+ test_breakindent \
+ test_bufline \
+***************
+*** 283,288 ****
+--- 284,290 ----
+ test_autocmd.res \
+ test_autoload.res \
+ test_backspace_opt.res \
++ test_blob.res \
+ test_blockedit.res \
+ test_breakindent.res \
+ test_bufwintabinfo.res \
+*** ../vim-8.1.0734/src/vim.h 2019-01-12 13:25:42.633479785 +0100
+--- src/vim.h 2019-01-12 18:52:14.242595860 +0100
+***************
+*** 1994,2006 ****
+ #define VV_TYPE_NONE 78
+ #define VV_TYPE_JOB 79
+ #define VV_TYPE_CHANNEL 80
+! #define VV_TERMRFGRESP 81
+! #define VV_TERMRBGRESP 82
+! #define VV_TERMU7RESP 83
+! #define VV_TERMSTYLERESP 84
+! #define VV_TERMBLINKRESP 85
+! #define VV_EVENT 86
+! #define VV_LEN 87 /* number of v: vars */
+
+ /* used for v_number in VAR_SPECIAL */
+ #define VVAL_FALSE 0L
+--- 1994,2007 ----
+ #define VV_TYPE_NONE 78
+ #define VV_TYPE_JOB 79
+ #define VV_TYPE_CHANNEL 80
+! #define VV_TYPE_BLOB 81
+! #define VV_TERMRFGRESP 82
+! #define VV_TERMRBGRESP 83
+! #define VV_TERMU7RESP 84
+! #define VV_TERMSTYLERESP 85
+! #define VV_TERMBLINKRESP 86
+! #define VV_EVENT 87
+! #define VV_LEN 88 /* number of v: vars */
+
+ /* used for v_number in VAR_SPECIAL */
+ #define VVAL_FALSE 0L
+***************
+*** 2019,2024 ****
+--- 2020,2026 ----
+ #define VAR_TYPE_NONE 7
+ #define VAR_TYPE_JOB 8
+ #define VAR_TYPE_CHANNEL 9
++ #define VAR_TYPE_BLOB 10
+
+ #ifdef FEAT_CLIPBOARD
+
+*** ../vim-8.1.0734/src/globals.h 2019-01-06 13:10:46.324499127 +0100
+--- src/globals.h 2019-01-12 19:44:10.389888679 +0100
+***************
+*** 1524,1529 ****
+--- 1524,1531 ----
+ EXTERN char_u e_emptykey[] INIT(= N_("E713: Cannot use empty key for Dictionary"));
+ EXTERN char_u e_dictreq[] INIT(= N_("E715: Dictionary required"));
+ EXTERN char_u e_listidx[] INIT(= N_("E684: list index out of range: %ld"));
++ EXTERN char_u e_blobidx[] INIT(= N_("E979: Blob index out of range: %ld"));
++ EXTERN char_u e_invalblob[] INIT(= N_("E978: Invalid operation for Blob"));
+ EXTERN char_u e_toomanyarg[] INIT(= N_("E118: Too many arguments for function: %s"));
+ EXTERN char_u e_dictkey[] INIT(= N_("E716: Key not present in Dictionary: %s"));
+ EXTERN char_u e_listreq[] INIT(= N_("E714: List required"));
+*** ../vim-8.1.0734/src/testdir/test_blob.vim 2019-01-12 22:40:58.129218991 +0100
+--- src/testdir/test_blob.vim 2019-01-12 22:24:32.278412344 +0100
+***************
+*** 0 ****
+--- 1,179 ----
++ " Tests for the Blob types
++
++ func TearDown()
++ " Run garbage collection after every test
++ call test_garbagecollect_now()
++ endfunc
++
++ " Tests for Blob type
++
++ " Blob creation from constant
++ func Test_blob_create()
++ let b = 0zDEADBEEF
++ call assert_equal(v:t_blob, type(b))
++ call assert_equal(4, len(b))
++ call assert_equal(0xDE, b[0])
++ call assert_equal(0xAD, b[1])
++ call assert_equal(0xBE, b[2])
++ call assert_equal(0xEF, b[3])
++ call assert_fails('let x = b[4]')
++
++ call assert_equal(0xDE, get(b, 0))
++ call assert_equal(0xEF, get(b, 3))
++ call assert_fails('let x = get(b, 4)')
++ endfunc
++
++ " assignment to a blob
++ func Test_blob_assign()
++ let b = 0zDEADBEEF
++ let b2 = b[1:2]
++ call assert_equal(0zADBE, b2)
++
++ let bcopy = b[:]
++ call assert_equal(b, bcopy)
++ call assert_false(b is bcopy)
++ endfunc
++
++ func Test_blob_to_string()
++ let b = 0zDEADBEEF
++ call assert_equal('[0xDE,0xAD,0xBE,0xEF]', string(b))
++ call remove(b, 0, 3)
++ call assert_equal('[]', string(b))
++ endfunc
++
++ func Test_blob_compare()
++ let b1 = 0z0011
++ let b2 = 0z1100
++ call assert_false(b1 == b2)
++ call assert_true(b1 != b2)
++ call assert_true(b1 == 0z0011)
++
++ call assert_false(b1 is b2)
++ let b2 = b1
++ call assert_true(b1 is b2)
++
++ call assert_fails('let x = b1 > b2')
++ call assert_fails('let x = b1 < b2')
++ call assert_fails('let x = b1 - b2')
++ call assert_fails('let x = b1 / b2')
++ call assert_fails('let x = b1 * b2')
++ endfunc
++
++ " test for range assign
++ func Test_blob_range_assign()
++ let b = 0z00
++ let b[1] = 0x11
++ let b[2] = 0x22
++ call assert_equal(0z001122, b)
++ call assert_fails('let b[4] = 0x33')
++ endfunc
++
++ func Test_blob_for_loop()
++ let blob = 0z00010203
++ let i = 0
++ for byte in blob
++ call assert_equal(i, byte)
++ let i += 1
++ endfor
++
++ let blob = 0z00
++ call remove(blob, 0)
++ call assert_equal(0, len(blob))
++ for byte in blob
++ call assert_error('loop over empty blob')
++ endfor
++ endfunc
++
++ func Test_blob_concatenate()
++ let b = 0z0011
++ let b += 0z2233
++ call assert_equal(0z00112233, b)
++
++ call assert_fails('let b += "a"')
++ call assert_fails('let b += 88')
++
++ let b = 0zDEAD + 0zBEEF
++ call assert_equal(0zDEADBEEF, b)
++ endfunc
++
++ " Test removing items in blob
++ func Test_blob_func_remove()
++ " Test removing 1 element
++ let b = 0zDEADBEEF
++ call assert_equal(0xDE, remove(b, 0))
++ call assert_equal(0zADBEEF, b)
++
++ let b = 0zDEADBEEF
++ call assert_equal(0xEF, remove(b, -1))
++ call assert_equal(0zDEADBE, b)
++
++ let b = 0zDEADBEEF
++ call assert_equal(0xAD, remove(b, 1))
++ call assert_equal(0zDEBEEF, b)
++
++ " Test removing range of element(s)
++ let b = 0zDEADBEEF
++ call assert_equal(0zBE, remove(b, 2, 2))
++ call assert_equal(0zDEADEF, b)
++
++ let b = 0zDEADBEEF
++ call assert_equal(0zADBE, remove(b, 1, 2))
++ call assert_equal(0zDEEF, b)
++
++ " Test invalid cases
++ let b = 0zDEADBEEF
++ call assert_fails("call remove(b, 5)", 'E979:')
++ call assert_fails("call remove(b, 1, 5)", 'E979:')
++ call assert_fails("call remove(b, 3, 2)", 'E979:')
++ call assert_fails("call remove(1, 0)", 'E712:')
++ call assert_fails("call remove(b, b)", 'E974:')
++ endfunc
++
++ func Test_blob_read_write()
++ let b = 0zDEADBEEF
++ call writefile(b, 'Xblob')
++ let br = readfile('Xblob', 'B')
++ call assert_equal(b, br)
++ call delete('Xblob')
++ endfunc
++
++ " filter() item in blob
++ func Test_blob_filter()
++ let b = 0zDEADBEEF
++ call filter(b, 'v:val != 0xEF')
++ call assert_equal(0zDEADBE, b)
++ endfunc
++
++ " map() item in blob
++ func Test_blob_map()
++ let b = 0zDEADBEEF
++ call map(b, 'v:val + 1')
++ call assert_equal(0zDFAEBFF0, b)
++ endfunc
++
++ func Test_blob_index()
++ call assert_equal(2, index(0zDEADBEEF, 0xBE))
++ call assert_equal(-1, index(0zDEADBEEF, 0))
++ endfunc
++
++ func Test_blob_insert()
++ let b = 0zDEADBEEF
++ call insert(b, 0x33)
++ call assert_equal(0z33DEADBEEF, b)
++
++ let b = 0zDEADBEEF
++ call insert(b, 0x33, 2)
++ call assert_equal(0zDEAD33BEEF, b)
++ endfunc
++
++ func Test_blob_reverse()
++ call assert_equal(0zEFBEADDE, reverse(0zDEADBEEF))
++ call assert_equal(0zBEADDE, reverse(0zDEADBE))
++ call assert_equal(0zADDE, reverse(0zDEAD))
++ call assert_equal(0zDE, reverse(0zDE))
++ endfunc
++
++ func Test_blob_json_encode()
++ call assert_equal('[222,173,190,239]', json_encode(0zDEADBEEF))
++ call assert_equal('[]', json_encode(0z))
++ endfunc
+*** ../vim-8.1.0734/src/testdir/test_channel.vim 2019-01-09 22:24:46.568161097 +0100
+--- src/testdir/test_channel.vim 2019-01-12 21:27:24.348531499 +0100
+***************
+*** 516,521 ****
+--- 516,566 ----
+ call assert_equal(1, found)
+ endfunc
+
++ func Test_raw_pipe_blob()
++ if !has('job')
++ return
++ endif
++ call ch_log('Test_raw_pipe_blob()')
++ " 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))
++
++ call assert_equal("open", ch_status(job))
++ call assert_equal("open", ch_status(job), {"part": "out"})
++
++ try
++ " Create a blob with the echo command and write it.
++ let blob = 0z00
++ let cmd = "echo something\n"
++ for i in range(0, len(cmd) - 1)
++ let blob[i] = char2nr(cmd[i])
++ endfor
++ call assert_equal(len(cmd), len(blob))
++ call ch_sendraw(job, blob)
++
++ " Read a blob with the reply.
++ let msg = ch_readblob(job)
++ let expected = 'something'
++ for i in range(0, len(expected) - 1)
++ call assert_equal(char2nr(expected[i]), msg[i])
++ endfor
++
++ let reply = ch_evalraw(job, "quit\n", {'timeout': 100})
++ call assert_equal("Goodbye!\n", substitute(reply, "\r", "", 'g'))
++ finally
++ call job_stop(job)
++ endtry
++
++ let g:Ch_job = job
++ call WaitForAssert({-> assert_equal("dead", job_status(g:Ch_job))})
++ let info = job_info(job)
++ call assert_equal("dead", info.status)
++ endfunc
++
+ func Test_nl_pipe()
+ if !has('job')
+ return
+*** ../vim-8.1.0734/src/version.c 2019-01-12 16:29:26.327986331 +0100
+--- src/version.c 2019-01-12 18:48:53.379924473 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 735,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+180. You maintain more than six e-mail addresses.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0736 b/data/vim/patches/8.1.0736
new file mode 100644
index 000000000..33f3eae24
--- /dev/null
+++ b/data/vim/patches/8.1.0736
@@ -0,0 +1,735 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0736
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0736
+Problem: Code for Blob not sufficiently tested.
+Solution: Add more tests. Fix uncovered crash. Add test_null_blob().
+Files: src/testdir/test_blob.vim, src/testdir/test_assign.vim, src/eval.c,
+ src/testdir/test_eval_stuff.vim, src/testdir/test_lambda.vim,
+ runtime/doc/eval.txt, src/evalfunc.c, src/blob.c,
+ src/testdir/test49.vim
+
+
+*** ../vim-8.1.0735/src/testdir/test_blob.vim 2019-01-12 22:47:01.264088074 +0100
+--- src/testdir/test_blob.vim 2019-01-13 15:05:51.133009938 +0100
+***************
+*** 21,26 ****
+--- 21,32 ----
+ call assert_equal(0xDE, get(b, 0))
+ call assert_equal(0xEF, get(b, 3))
+ call assert_fails('let x = get(b, 4)')
++
++ call assert_fails('let b = 0z1', 'E973:')
++ call assert_fails('let b = 0z1x', 'E973:')
++ call assert_fails('let b = 0z12345', 'E973:')
++
++ call assert_equal(0z, test_null_blob())
+ endfunc
+
+ " assignment to a blob
+***************
+*** 32,37 ****
+--- 38,82 ----
+ let bcopy = b[:]
+ call assert_equal(b, bcopy)
+ call assert_false(b is bcopy)
++
++ let b = 0zDEADBEEF
++ let b2 = b
++ call assert_true(b is b2)
++ let b[:] = 0z11223344
++ call assert_equal(0z11223344, b)
++ call assert_equal(0z11223344, b2)
++ call assert_true(b is b2)
++
++ let b = 0zDEADBEEF
++ let b[3:] = 0z66
++ call assert_equal(0zDEADBE66, b)
++ let b[:1] = 0z8899
++ call assert_equal(0z8899BE66, b)
++
++ call assert_fails('let b[2:3] = 0z112233', 'E972:')
++ call assert_fails('let b[2:3] = 0z11', 'E972:')
++ call assert_fails('let b[3:2] = 0z', 'E979:')
++
++ let b = 0zDEADBEEF
++ let b += 0z99
++ call assert_equal(0zDEADBEEF99, b)
++
++ call assert_fails('let b .= 0z33', 'E734:')
++ call assert_fails('let b .= "xx"', 'E734:')
++ call assert_fails('let b += "xx"', 'E734:')
++ call assert_fails('let b[1:1] .= 0z55', 'E734:')
++ endfunc
++
++ func Test_blob_get_range()
++ let b = 0z0011223344
++ call assert_equal(0z2233, b[2:3])
++ call assert_equal(0z223344, b[2:-1])
++ call assert_equal(0z00, b[0:-5])
++ call assert_equal(0z, b[0:-11])
++ call assert_equal(0z44, b[-1:])
++ call assert_equal(0z0011223344, b[:])
++ call assert_equal(0z0011223344, b[:-1])
++ call assert_equal(0z, b[5:6])
+ endfunc
+
+ func Test_blob_to_string()
+***************
+*** 44,51 ****
+--- 89,100 ----
+ func Test_blob_compare()
+ let b1 = 0z0011
+ let b2 = 0z1100
++ let b3 = 0z001122
++ call assert_true(b1 == b1)
+ call assert_false(b1 == b2)
++ call assert_false(b1 == b3)
+ call assert_true(b1 != b2)
++ call assert_true(b1 != b3)
+ call assert_true(b1 == 0z0011)
+
+ call assert_false(b1 is b2)
+***************
+*** 65,71 ****
+ let b[1] = 0x11
+ let b[2] = 0x22
+ call assert_equal(0z001122, b)
+! call assert_fails('let b[4] = 0x33')
+ endfunc
+
+ func Test_blob_for_loop()
+--- 114,120 ----
+ let b[1] = 0x11
+ let b[2] = 0x22
+ call assert_equal(0z001122, b)
+! call assert_fails('let b[4] = 0x33', 'E979:')
+ endfunc
+
+ func Test_blob_for_loop()
+***************
+*** 177,179 ****
+--- 226,240 ----
+ call assert_equal('[222,173,190,239]', json_encode(0zDEADBEEF))
+ call assert_equal('[]', json_encode(0z))
+ endfunc
++
++ func Test_blob_lock()
++ let b = 0z112233
++ lockvar b
++ call assert_fails('let b = 0z44', 'E741:')
++ unlockvar b
++ let b = 0z44
++ endfunc
++
++ func Test_blob_sort()
++ call assert_fails('call sort([1.0, 0z11], "f")', 'E975:')
++ endfunc
+*** ../vim-8.1.0735/src/testdir/test_assign.vim 2017-10-02 19:28:43.000000000 +0200
+--- src/testdir/test_assign.vim 2019-01-13 14:41:55.754889476 +0100
+***************
+*** 23,33 ****
+ let &t_k1 = old_t_k1
+ endif
+
+! call assert_fails('let x = &t_xx', 'E15')
+ let &t_xx = "yes"
+ call assert_equal("yes", &t_xx)
+ let &t_xx = ""
+! call assert_fails('let x = &t_xx', 'E15')
+ endfunc
+
+ func Test_let_option_error()
+--- 23,33 ----
+ let &t_k1 = old_t_k1
+ endif
+
+! call assert_fails('let x = &t_xx', 'E113')
+ let &t_xx = "yes"
+ call assert_equal("yes", &t_xx)
+ let &t_xx = ""
+! call assert_fails('let x = &t_xx', 'E113')
+ endfunc
+
+ func Test_let_option_error()
+***************
+*** 43,45 ****
+--- 43,53 ----
+ call assert_equal("vert:|", &fillchars)
+ let &fillchars = _w
+ endfunc
++
++ func Test_let_errors()
++ let s = 'abcd'
++ call assert_fails('let s[1] = 5', 'E689:')
++
++ let l = [1, 2, 3]
++ call assert_fails('let l[:] = 5', 'E709:')
++ endfunc
+*** ../vim-8.1.0735/src/eval.c 2019-01-12 22:47:01.260088089 +0100
+--- src/eval.c 2019-01-13 14:43:52.298118934 +0100
+***************
+*** 1983,1991 ****
+ }
+ if (rettv != NULL
+ && !(rettv->v_type == VAR_LIST
+! || rettv->vval.v_list != NULL)
+ && !(rettv->v_type == VAR_BLOB
+! || rettv->vval.v_blob != NULL))
+ {
+ if (!quiet)
+ EMSG(_("E709: [:] requires a List or Blob value"));
+--- 1983,1991 ----
+ }
+ if (rettv != NULL
+ && !(rettv->v_type == VAR_LIST
+! && rettv->vval.v_list != NULL)
+ && !(rettv->v_type == VAR_BLOB
+! && rettv->vval.v_blob != NULL))
+ {
+ if (!quiet)
+ EMSG(_("E709: [:] requires a List or Blob value"));
+***************
+*** 2109,2114 ****
+--- 2109,2116 ----
+ }
+ else if (lp->ll_tv->v_type == VAR_BLOB)
+ {
++ long bloblen = blob_len(lp->ll_tv->vval.v_blob);
++
+ /*
+ * Get the number and item for the only or first index of the List.
+ */
+***************
+*** 2120,2135 ****
+ clear_tv(&var1);
+
+ if (lp->ll_n1 < 0
+! || lp->ll_n1 > blob_len(lp->ll_tv->vval.v_blob))
+ {
+ if (!quiet)
+! EMSGN(_(e_listidx), lp->ll_n1);
+ return NULL;
+ }
+ if (lp->ll_range && !lp->ll_empty2)
+ {
+ lp->ll_n2 = (long)tv_get_number(&var2);
+ clear_tv(&var2);
+ }
+ lp->ll_blob = lp->ll_tv->vval.v_blob;
+ lp->ll_tv = NULL;
+--- 2122,2147 ----
+ clear_tv(&var1);
+
+ if (lp->ll_n1 < 0
+! || lp->ll_n1 > bloblen
+! || (lp->ll_range && lp->ll_n1 == bloblen))
+ {
+ if (!quiet)
+! EMSGN(_(e_blobidx), lp->ll_n1);
+! clear_tv(&var2);
+ return NULL;
+ }
+ if (lp->ll_range && !lp->ll_empty2)
+ {
+ lp->ll_n2 = (long)tv_get_number(&var2);
+ clear_tv(&var2);
++ if (lp->ll_n2 < 0
++ || lp->ll_n2 >= bloblen
++ || lp->ll_n2 < lp->ll_n1)
++ {
++ if (!quiet)
++ EMSGN(_(e_blobidx), lp->ll_n2);
++ return NULL;
++ }
+ }
+ lp->ll_blob = lp->ll_tv->vval.v_blob;
+ lp->ll_tv = NULL;
+***************
+*** 2241,2246 ****
+--- 2253,2259 ----
+ if (lp->ll_blob != NULL)
+ {
+ int error = FALSE, val;
++
+ if (op != NULL && *op != '=')
+ {
+ EMSG2(_(e_letwrong), op);
+***************
+*** 2249,2265 ****
+
+ if (lp->ll_range && rettv->v_type == VAR_BLOB)
+ {
+! int i;
+
+! if (blob_len(rettv->vval.v_blob) != blob_len(lp->ll_blob))
+ {
+! EMSG(_("E972: Blob value has more items than target"));
+ return;
+ }
+
+! for (i = lp->ll_n1; i <= lp->ll_n2; i++)
+! blob_set(lp->ll_blob, i,
+! blob_get(rettv->vval.v_blob, i));
+ }
+ else
+ {
+--- 2262,2284 ----
+
+ if (lp->ll_range && rettv->v_type == VAR_BLOB)
+ {
+! int il, ir;
+
+! if (lp->ll_empty2)
+! lp->ll_n2 = blob_len(lp->ll_blob) - 1;
+!
+! if (lp->ll_n2 - lp->ll_n1 + 1 != blob_len(rettv->vval.v_blob))
+ {
+! EMSG(_("E972: Blob value does not have the right number of bytes"));
+ return;
+ }
++ if (lp->ll_empty2)
++ lp->ll_n2 = blob_len(lp->ll_blob);
+
+! ir = 0;
+! for (il = lp->ll_n1; il <= lp->ll_n2; il++)
+! blob_set(lp->ll_blob, il,
+! blob_get(rettv->vval.v_blob, ir++));
+ }
+ else
+ {
+***************
+*** 2278,2285 ****
+ if (lp->ll_n1 == gap->ga_len)
+ ++gap->ga_len;
+ }
+! else
+! EMSG(_(e_invrange));
+ }
+ }
+ }
+--- 2297,2303 ----
+ if (lp->ll_n1 == gap->ga_len)
+ ++gap->ga_len;
+ }
+! // error for invalid range was already given in get_lval()
+ }
+ }
+ }
+***************
+*** 2312,2318 ****
+ else if (lp->ll_range)
+ {
+ listitem_T *ll_li = lp->ll_li;
+! int ll_n1 = lp->ll_n1;
+
+ /*
+ * Check whether any of the list items is locked
+--- 2330,2336 ----
+ else if (lp->ll_range)
+ {
+ listitem_T *ll_li = lp->ll_li;
+! int ll_n1 = lp->ll_n1;
+
+ /*
+ * Check whether any of the list items is locked
+***************
+*** 3354,3359 ****
+--- 3372,3379 ----
+ {
+ int ret;
+ char_u *p;
++ int did_emsg_before = did_emsg;
++ int called_emsg_before = called_emsg;
+
+ p = skipwhite(arg);
+ ret = eval1(&p, rettv, evaluate);
+***************
+*** 3364,3372 ****
+ /*
+ * Report the invalid expression unless the expression evaluation has
+ * been cancelled due to an aborting error, an interrupt, or an
+! * exception.
+ */
+! if (!aborting())
+ EMSG2(_(e_invexpr2), arg);
+ ret = FAIL;
+ }
+--- 3384,3394 ----
+ /*
+ * Report the invalid expression unless the expression evaluation has
+ * been cancelled due to an aborting error, an interrupt, or an
+! * exception, or we already gave a more specific error.
+! * Also check called_emsg for when using assert_fails().
+ */
+! if (!aborting() && did_emsg == did_emsg_before
+! && called_emsg == called_emsg_before)
+ EMSG2(_(e_invexpr2), arg);
+ ret = FAIL;
+ }
+***************
+*** 4195,4201 ****
+ {
+ if (!vim_isxdigit(bp[1]))
+ {
+! EMSG(_("E973: Blob literal should have an even number of hex characters'"));
+ vim_free(blob);
+ ret = FAIL;
+ break;
+--- 4217,4223 ----
+ {
+ if (!vim_isxdigit(bp[1]))
+ {
+! EMSG(_("E973: Blob literal should have an even number of hex characters"));
+ vim_free(blob);
+ ret = FAIL;
+ break;
+***************
+*** 4632,4638 ****
+ len = blob_len(rettv->vval.v_blob);
+ if (range)
+ {
+! // The resulting variable is a substring. If the indexes
+ // are out of range the result is empty.
+ if (n1 < 0)
+ {
+--- 4654,4660 ----
+ len = blob_len(rettv->vval.v_blob);
+ if (range)
+ {
+! // The resulting variable is a sub-blob. If the indexes
+ // are out of range the result is empty.
+ if (n1 < 0)
+ {
+***************
+*** 8336,8341 ****
+--- 8358,8364 ----
+ int atstart = TRUE;
+ char_u numbuf[NUMBUFLEN];
+ int did_emsg_before = did_emsg;
++ int called_emsg_before = called_emsg;
+
+ if (eap->skip)
+ ++emsg_skip;
+***************
+*** 8353,8359 ****
+ * 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;
+--- 8376,8383 ----
+ * has been cancelled due to an aborting error, an interrupt, or an
+ * exception.
+ */
+! if (!aborting() && did_emsg == did_emsg_before
+! && called_emsg == called_emsg_before)
+ EMSG2(_(e_invexpr2), p);
+ need_clr_eos = FALSE;
+ break;
+*** ../vim-8.1.0735/src/testdir/test_eval_stuff.vim 2018-12-05 18:43:24.489493117 +0100
+--- src/testdir/test_eval_stuff.vim 2019-01-13 14:14:28.258162292 +0100
+***************
+*** 63,65 ****
+--- 63,71 ----
+ call assert_fails("let v:oldfiles=''", 'E963:')
+ call assert_equal(v_o, v:oldfiles)
+ endfunc
++
++ func Test_for_invalid()
++ call assert_fails("for x in 99", 'E714:')
++ call assert_fails("for x in 'asdf'", 'E714:')
++ call assert_fails("for x in {'a': 9}", 'E714:')
++ endfunc
+*** ../vim-8.1.0735/src/testdir/test_lambda.vim 2019-01-09 23:00:57.997176121 +0100
+--- src/testdir/test_lambda.vim 2019-01-13 14:40:58.051266393 +0100
+***************
+*** 49,55 ****
+
+ function Test_lambda_fails()
+ call assert_equal(3, {a, b -> a + b}(1, 2))
+! call assert_fails('echo {a, a -> a + a}(1, 2)', 'E15:')
+ call assert_fails('echo {a, b -> a + b)}(1, 2)', 'E15:')
+ endfunc
+
+--- 49,55 ----
+
+ function Test_lambda_fails()
+ call assert_equal(3, {a, b -> a + b}(1, 2))
+! call assert_fails('echo {a, a -> a + a}(1, 2)', 'E853:')
+ call assert_fails('echo {a, b -> a + b)}(1, 2)', 'E15:')
+ endfunc
+
+***************
+*** 169,175 ****
+ let l:D = s:NewCounter2()
+
+ call assert_equal(1, l:C())
+! call assert_fails(':call l:D()', 'E15:') " E121: then E15:
+ call assert_equal(2, l:C())
+ endfunc
+
+--- 169,175 ----
+ let l:D = s:NewCounter2()
+
+ call assert_equal(1, l:C())
+! call assert_fails(':call l:D()', 'E121:')
+ call assert_equal(2, l:C())
+ endfunc
+
+*** ../vim-8.1.0735/runtime/doc/eval.txt 2019-01-12 22:47:01.256088105 +0100
+--- runtime/doc/eval.txt 2019-01-13 14:49:35.755795777 +0100
+***************
+*** 2507,2528 ****
+ term_setrestore({buf}, {command}) none set command to restore terminal
+ term_setsize({buf}, {rows}, {cols})
+ none set the size of a terminal
+! term_start({cmd}, {options}) Job open a terminal window and run a job
+ term_wait({buf} [, {time}]) Number wait for screen to be updated
+ test_alloc_fail({id}, {countdown}, {repeat})
+ none make memory allocation fail
+ test_autochdir() none enable 'autochdir' during startup
+! test_feedinput() none add key sequence to input buffer
+ test_garbagecollect_now() none free memory right now for testing
+ test_ignore_error({expr}) none ignore a specific error
+ test_null_channel() Channel null value for testing
+ test_null_dict() Dict null value for testing
+ test_null_job() Job null value for testing
+ 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_scrollbar({which}, {value}, {dragging})
+ none scroll in the GUI for testing
+ test_settime({expr}) none set current time for testing
+--- 2520,2542 ----
+ term_setrestore({buf}, {command}) none set command to restore terminal
+ term_setsize({buf}, {rows}, {cols})
+ none set the size of a terminal
+! term_start({cmd}, {options}) Number open a terminal window and run a job
+ term_wait({buf} [, {time}]) Number wait for screen to be updated
+ test_alloc_fail({id}, {countdown}, {repeat})
+ none make memory allocation fail
+ test_autochdir() none enable 'autochdir' during startup
+! test_feedinput({string}) none add key sequence to input buffer
+ test_garbagecollect_now() none free memory right now for testing
+ test_ignore_error({expr}) none ignore a specific error
++ test_null_blob() Blob null value for testing
+ test_null_channel() Channel null value for testing
+ test_null_dict() Dict null value for testing
+ test_null_job() Job null value for testing
+ 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_scrollbar({which}, {value}, {dragging})
+ none scroll in the GUI for testing
+ test_settime({expr}) none set current time for testing
+***************
+*** 9310,9334 ****
+ When the {expr} is the string "RESET" then the list of ignored
+ errors is made empty.
+
+ test_null_channel() *test_null_channel()*
+! Return a Channel that is null. Only useful for testing.
+ {only available when compiled with the +channel feature}
+
+ test_null_dict() *test_null_dict()*
+! Return a Dict that is null. Only useful for testing.
+
+ test_null_job() *test_null_job()*
+! Return a Job that is null. Only useful for testing.
+ {only available when compiled with the +job feature}
+
+ test_null_list() *test_null_list()*
+! Return a List that is null. Only useful for testing.
+
+ test_null_partial() *test_null_partial()*
+! Return a Partial that is null. Only useful for testing.
+
+ 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
+--- 9339,9366 ----
+ When the {expr} is the string "RESET" then the list of ignored
+ errors is made empty.
+
++ test_null_blob() *test_null_blob()*
++ Return a |Blob| that is null. Only useful for testing.
++
+ test_null_channel() *test_null_channel()*
+! Return a |Channel| that is null. Only useful for testing.
+ {only available when compiled with the +channel feature}
+
+ test_null_dict() *test_null_dict()*
+! Return a |Dict| that is null. Only useful for testing.
+
+ test_null_job() *test_null_job()*
+! Return a |Job| that is null. Only useful for testing.
+ {only available when compiled with the +job feature}
+
+ test_null_list() *test_null_list()*
+! Return a |List| that is null. Only useful for testing.
+
+ test_null_partial() *test_null_partial()*
+! Return a |Partial| that is null. Only useful for testing.
+
+ 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
+*** ../vim-8.1.0735/src/evalfunc.c 2019-01-12 22:47:01.260088089 +0100
+--- src/evalfunc.c 2019-01-13 14:51:50.650868801 +0100
+***************
+*** 429,434 ****
+--- 429,435 ----
+ 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);
++ static void f_test_null_blob(typval_T *argvars, typval_T *rettv);
+ #ifdef FEAT_JOB_CHANNEL
+ static void f_test_null_channel(typval_T *argvars, typval_T *rettv);
+ #endif
+***************
+*** 950,955 ****
+--- 951,957 ----
+ {"test_feedinput", 1, 1, f_test_feedinput},
+ {"test_garbagecollect_now", 0, 0, f_test_garbagecollect_now},
+ {"test_ignore_error", 1, 1, f_test_ignore_error},
++ {"test_null_blob", 0, 0, f_test_null_blob},
+ #ifdef FEAT_JOB_CHANNEL
+ {"test_null_channel", 0, 0, f_test_null_channel},
+ #endif
+***************
+*** 13902,13907 ****
+--- 13904,13916 ----
+ ignore_error_for_testing(tv_get_string(&argvars[0]));
+ }
+
++ static void
++ f_test_null_blob(typval_T *argvars UNUSED, typval_T *rettv)
++ {
++ rettv->v_type = VAR_BLOB;
++ rettv->vval.v_blob = NULL;
++ }
++
+ #ifdef FEAT_JOB_CHANNEL
+ static void
+ f_test_null_channel(typval_T *argvars UNUSED, typval_T *rettv)
+*** ../vim-8.1.0735/src/blob.c 2019-01-12 22:47:01.256088105 +0100
+--- src/blob.c 2019-01-13 14:55:40.973274231 +0100
+***************
+*** 114,126 ****
+ blob_T *b1,
+ blob_T *b2)
+ {
+! int i;
+
+! if (b1 == NULL || b2 == NULL)
+! return FALSE;
+ if (b1 == b2)
+ return TRUE;
+! if (blob_len(b1) != blob_len(b2))
+ return FALSE;
+
+ for (i = 0; i < b1->bv_ga.ga_len; i++)
+--- 114,129 ----
+ blob_T *b1,
+ blob_T *b2)
+ {
+! int i;
+! int len1 = blob_len(b1);
+! int len2 = blob_len(b2);
+
+! // empty and NULL are considered the same
+! if (len1 == 0 && len2 == 0)
+! return TRUE;
+ if (b1 == b2)
+ return TRUE;
+! if (len1 != len2)
+ return FALSE;
+
+ for (i = 0; i < b1->bv_ga.ga_len; i++)
+*** ../vim-8.1.0735/src/testdir/test49.vim 2019-01-09 23:00:57.997176121 +0100
+--- src/testdir/test49.vim 2019-01-13 15:11:40.054554337 +0100
+***************
+*** 1,6 ****
+ " Vim script language tests
+ " Author: Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com>
+! " Last Change: 2019 Jan 09
+
+ "-------------------------------------------------------------------------------
+ " Test environment {{{1
+--- 1,6 ----
+ " Vim script language tests
+ " Author: Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com>
+! " Last Change: 2019 Jan 13
+
+ "-------------------------------------------------------------------------------
+ " Test environment {{{1
+***************
+*** 3694,3700 ****
+ if ExtraVim(msgfile)
+ try
+ Xpath 4194304 " X: 4194304
+! let x = novar " error E121/E15; exception: E121
+ catch /E15:/ " should not catch
+ Xpath 8388608 " X: 0
+ endtry
+--- 3694,3700 ----
+ if ExtraVim(msgfile)
+ try
+ Xpath 4194304 " X: 4194304
+! let x = novar " error E121; exception: E121
+ catch /E15:/ " should not catch
+ Xpath 8388608 " X: 0
+ endtry
+***************
+*** 3702,3708 ****
+ endif
+
+ Xpath 33554432 " X: 33554432
+! if !MESSAGES('E121', "Undefined variable", 'E15', "Invalid expression")
+ Xpath 67108864 " X: 0
+ endif
+
+--- 3702,3708 ----
+ endif
+
+ Xpath 33554432 " X: 33554432
+! if !MESSAGES('E121', "Undefined variable")
+ Xpath 67108864 " X: 0
+ endif
+
+*** ../vim-8.1.0735/src/version.c 2019-01-12 22:47:01.264088074 +0100
+--- src/version.c 2019-01-13 14:14:53.593982643 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 736,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+182. You may not know what is happening in the world, but you know
+ every bit of net-gossip there 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.0737 b/data/vim/patches/8.1.0737
new file mode 100644
index 000000000..2313774ed
--- /dev/null
+++ b/data/vim/patches/8.1.0737
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0737
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0737
+Problem: Compiler warning for uninitialized variable.
+Solution: Add initialization. (John Marriott)
+Files: src/eval.c
+
+
+*** ../vim-8.1.0736/src/eval.c 2019-01-13 15:15:54.388762907 +0100
+--- src/eval.c 2019-01-13 15:40:24.858404094 +0100
+***************
+*** 4208,4214 ****
+ if (**arg == '0' && ((*arg)[1] == 'z' || (*arg)[1] == 'Z'))
+ {
+ char_u *bp;
+! blob_T *blob;
+
+ // Blob constant: 0z0123456789abcdef
+ if (evaluate)
+--- 4208,4214 ----
+ if (**arg == '0' && ((*arg)[1] == 'z' || (*arg)[1] == 'Z'))
+ {
+ char_u *bp;
+! blob_T *blob = NULL; // init for gcc
+
+ // Blob constant: 0z0123456789abcdef
+ if (evaluate)
+*** ../vim-8.1.0736/src/version.c 2019-01-13 15:15:54.392762879 +0100
+--- src/version.c 2019-01-13 15:41:10.610081487 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 737,
+ /**/
+
+--
+A bad peace is better than a good war. - Yiddish Proverb
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0738 b/data/vim/patches/8.1.0738
new file mode 100644
index 000000000..be3f614bf
--- /dev/null
+++ b/data/vim/patches/8.1.0738
@@ -0,0 +1,102 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0738
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0738
+Problem: Using freed memory, for loop over blob leaks memory.
+Solution: Clear pointer after freeing memory. Decrement reference count
+ after for loop over blob.
+Files: src/eval.c
+
+
+*** ../vim-8.1.0737/src/eval.c 2019-01-13 15:41:58.937718637 +0100
+--- src/eval.c 2019-01-13 16:01:12.357352208 +0100
+***************
+*** 2615,2620 ****
+--- 2615,2622 ----
+ clear_tv(&tv);
+ else
+ {
++ // No need to increment the refcount, it's already set for
++ // the blob being used in "tv".
+ fi->fi_blob = b;
+ fi->fi_bi = 0;
+ }
+***************
+*** 2684,2689 ****
+--- 2686,2693 ----
+ list_rem_watch(fi->fi_list, &fi->fi_lw);
+ list_unref(fi->fi_list);
+ }
++ if (fi != NULL && fi->fi_blob != NULL)
++ blob_unref(fi->fi_blob);
+ vim_free(fi);
+ }
+
+***************
+*** 4217,4224 ****
+ {
+ if (!vim_isxdigit(bp[1]))
+ {
+! EMSG(_("E973: Blob literal should have an even number of hex characters"));
+! vim_free(blob);
+ ret = FAIL;
+ break;
+ }
+--- 4221,4232 ----
+ {
+ if (!vim_isxdigit(bp[1]))
+ {
+! if (blob != NULL)
+! {
+! EMSG(_("E973: Blob literal should have an even number of hex characters"));
+! ga_clear(&blob->bv_ga);
+! VIM_CLEAR(blob);
+! }
+ ret = FAIL;
+ break;
+ }
+***************
+*** 4227,4237 ****
+ (hex2nr(*bp) << 4) + hex2nr(*(bp+1)));
+ }
+ if (blob != NULL)
+! {
+! ++blob->bv_refcount;
+! rettv->v_type = VAR_BLOB;
+! rettv->vval.v_blob = blob;
+! }
+ *arg = bp;
+ }
+ else
+--- 4235,4241 ----
+ (hex2nr(*bp) << 4) + hex2nr(*(bp+1)));
+ }
+ if (blob != NULL)
+! rettv_blob_set(rettv, blob);
+ *arg = bp;
+ }
+ else
+*** ../vim-8.1.0737/src/version.c 2019-01-13 15:41:58.937718637 +0100
+--- src/version.c 2019-01-13 15:46:25.263747024 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 738,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+186. You overstay in the office so you can have more time surfing the net.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0739 b/data/vim/patches/8.1.0739
new file mode 100644
index 000000000..b31a6f107
--- /dev/null
+++ b/data/vim/patches/8.1.0739
@@ -0,0 +1,149 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0739
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0739
+Problem: Text objects in not sufficiently tested.
+Solution: Add a few more test cases. (Dominique Pelle, closes #3795)
+Files: src/testdir/test_visual.vim
+
+
+*** ../vim-8.1.0738/src/testdir/test_visual.vim 2019-01-03 23:10:28.338798991 +0100
+--- src/testdir/test_visual.vim 2019-01-13 16:12:12.572650446 +0100
+***************
+*** 274,282 ****
+ set bs&vim
+ endfunc
+
+ func Test_Visual_sentence_textobject()
+ new
+! call setline(1, ['First sentence. Second sentence. Third', 'sentence. Fouth sentence'])
+
+ " When start and end of visual area are identical, 'as' or 'is' select
+ " the whole sentence.
+--- 274,319 ----
+ set bs&vim
+ endfunc
+
++ func Test_Visual_word_textobject()
++ new
++ call setline(1, ['First sentence. Second sentence.'])
++
++ " When start and end of visual area are identical, 'aw' or 'iw' select
++ " the whole word.
++ norm! 1go2fcvawy
++ call assert_equal('Second ', @")
++ norm! 1go2fcviwy
++ call assert_equal('Second', @")
++
++ " When start and end of visual area are not identical, 'aw' or 'iw'
++ " extend the word in direction of the end of the visual area.
++ norm! 1go2fcvlawy
++ call assert_equal('cond ', @")
++ norm! gv2awy
++ call assert_equal('cond sentence.', @")
++
++ norm! 1go2fcvliwy
++ call assert_equal('cond', @")
++ norm! gv2iwy
++ call assert_equal('cond sentence', @")
++
++ " Extend visual area in opposite direction.
++ norm! 1go2fcvhawy
++ call assert_equal(' Sec', @")
++ norm! gv2awy
++ call assert_equal(' sentence. Sec', @")
++
++ norm! 1go2fcvhiwy
++ call assert_equal('Sec', @")
++ norm! gv2iwy
++ call assert_equal('. Sec', @")
++
++ bwipe!
++ endfunc
++
+ func Test_Visual_sentence_textobject()
+ new
+! call setline(1, ['First sentence. Second sentence. Third', 'sentence. Fourth sentence'])
+
+ " When start and end of visual area are identical, 'as' or 'is' select
+ " the whole sentence.
+***************
+*** 314,316 ****
+--- 351,402 ----
+
+ bwipe!
+ endfunc
++
++ func Test_Visual_paragraph_textobject()
++ new
++ call setline(1, ['First line.',
++ \ '',
++ \ 'Second line.',
++ \ 'Third line.',
++ \ 'Fourth line.',
++ \ 'Fifth line.',
++ \ '',
++ \ 'Sixth line.'])
++
++ " When start and end of visual area are identical, 'ap' or 'ip' select
++ " the whole paragraph.
++ norm! 4ggvapy
++ call assert_equal("Second line.\nThird line.\nFourth line.\nFifth line.\n\n", @")
++ norm! 4ggvipy
++ call assert_equal("Second line.\nThird line.\nFourth line.\nFifth line.\n", @")
++
++ " When start and end of visual area are not identical, 'ap' or 'ip'
++ " extend the sentence in direction of the end of the visual area.
++ " FIXME: actually, it is not sufficient to have different start and
++ " end of visual selection, the start line and end line have to differ,
++ " which is not consistent with the documentation.
++ norm! 4ggVjapy
++ call assert_equal("Third line.\nFourth line.\nFifth line.\n\n", @")
++ norm! gvapy
++ call assert_equal("Third line.\nFourth line.\nFifth line.\n\nSixth line.\n", @")
++ norm! 4ggVjipy
++ call assert_equal("Third line.\nFourth line.\nFifth line.\n", @")
++ norm! gvipy
++ call assert_equal("Third line.\nFourth line.\nFifth line.\n\n", @")
++ norm! gvipy
++ call assert_equal("Third line.\nFourth line.\nFifth line.\n\nSixth line.\n", @")
++
++ " Extend visual area in opposite direction.
++ norm! 5ggVkapy
++ call assert_equal("\nSecond line.\nThird line.\nFourth line.\n", @")
++ norm! gvapy
++ call assert_equal("First line.\n\nSecond line.\nThird line.\nFourth line.\n", @")
++ norm! 5ggVkipy
++ call assert_equal("Second line.\nThird line.\nFourth line.\n", @")
++ norma gvipy
++ call assert_equal("\nSecond line.\nThird line.\nFourth line.\n", @")
++ norm! gvipy
++ call assert_equal("First line.\n\nSecond line.\nThird line.\nFourth line.\n", @")
++
++ bwipe!
++ endfunc
+*** ../vim-8.1.0738/src/version.c 2019-01-13 16:07:17.522749372 +0100
+--- src/version.c 2019-01-13 16:10:15.469483193 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 739,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+187. You promise yourself that you'll only stay online for another
+ 15 minutes...at least once every 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.0740 b/data/vim/patches/8.1.0740
new file mode 100644
index 000000000..48ed6a19f
--- /dev/null
+++ b/data/vim/patches/8.1.0740
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0740
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0740
+Problem: Tcl test fails.
+Solution: When the argument is empty don't give an error, instead rely on
+ the error reporting higher up.
+Files: src/eval.c
+
+
+*** ../vim-8.1.0739/src/eval.c 2019-01-13 16:07:17.522749372 +0100
+--- src/eval.c 2019-01-13 16:41:19.517340430 +0100
+***************
+*** 6462,6468 ****
+ }
+
+ len += get_id_len(arg);
+! if (len == 0 && verbose)
+ EMSG2(_(e_invexpr2), *arg);
+
+ return len;
+--- 6462,6470 ----
+ }
+
+ len += get_id_len(arg);
+! // Only give an error when there is something, otherwise it will be
+! // reported at a higher level.
+! if (len == 0 && verbose && **arg != NUL)
+ EMSG2(_(e_invexpr2), *arg);
+
+ return len;
+*** ../vim-8.1.0739/src/version.c 2019-01-13 16:12:37.600472512 +0100
+--- src/version.c 2019-01-13 16:42:46.964747959 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 740,
+ /**/
+
+--
+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.0741 b/data/vim/patches/8.1.0741
new file mode 100644
index 000000000..0f485f98b
--- /dev/null
+++ b/data/vim/patches/8.1.0741
@@ -0,0 +1,292 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0741
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0741
+Problem: Viminfo with Blob is not tested.
+Solution: Extend the viminfo test. Fix reading a blob. Fixed storing a
+ special variable value.
+Files: src/testdir/test_viminfo.vim, src/eval.c, src/blob.c,
+ src/proto/blob.pro
+
+
+*** ../vim-8.1.0740/src/testdir/test_viminfo.vim 2017-08-30 20:45:28.000000000 +0200
+--- src/testdir/test_viminfo.vim 2019-01-13 17:13:36.651426379 +0100
+***************
+*** 39,52 ****
+--- 39,74 ----
+ " store a really long list, so line wrapping will occur in viminfo file
+ let test_list = range(1,100)
+ let g:MY_GLOBAL_LIST = test_list
++ let test_blob = 0z00112233445566778899aabbccddeeff
++ let g:MY_GLOBAL_BLOB = test_blob
++ let test_false = v:false
++ let g:MY_GLOBAL_FALSE = test_false
++ let test_true = v:true
++ let g:MY_GLOBAL_TRUE = test_true
++ let test_null = v:null
++ let g:MY_GLOBAL_NULL = test_null
++ let test_none = v:none
++ let g:MY_GLOBAL_NONE = test_none
++
+ set viminfo='100,<50,s10,h,!,nviminfo
+ wv! Xviminfo
++
+ unlet g:MY_GLOBAL_DICT
+ unlet g:MY_GLOBAL_LIST
++ unlet g:MY_GLOBAL_BLOB
++ unlet g:MY_GLOBAL_FALSE
++ unlet g:MY_GLOBAL_TRUE
++ unlet g:MY_GLOBAL_NULL
++ unlet g:MY_GLOBAL_NONE
+
+ rv! Xviminfo
+ call assert_equal(test_dict, g:MY_GLOBAL_DICT)
+ call assert_equal(test_list, g:MY_GLOBAL_LIST)
++ call assert_equal(test_blob, g:MY_GLOBAL_BLOB)
++ call assert_equal(test_false, g:MY_GLOBAL_FALSE)
++ call assert_equal(test_true, g:MY_GLOBAL_TRUE)
++ call assert_equal(test_null, g:MY_GLOBAL_NULL)
++ call assert_equal(test_none, g:MY_GLOBAL_NONE)
+
+ call delete('Xviminfo')
+ set viminfo-=!
+*** ../vim-8.1.0740/src/eval.c 2019-01-13 16:46:18.807309467 +0100
+--- src/eval.c 2019-01-13 17:45:45.167029149 +0100
+***************
+*** 5882,5914 ****
+ }
+
+ case VAR_BLOB:
+! if (tv->vval.v_blob == NULL)
+! {
+! *tofree = NULL;
+! r = (char_u *)"[]";
+! }
+! else
+! {
+! blob_T *b;
+! int i;
+! garray_T ga;
+!
+! // Store bytes in the growarray.
+! ga_init2(&ga, 1, 4000);
+! b = tv->vval.v_blob;
+! ga_append(&ga, '[');
+! for (i = 0; i < blob_len(b); i++)
+! {
+! if (i > 0)
+! ga_concat(&ga, (char_u *)",");
+! vim_snprintf((char *)numbuf, NUMBUFLEN, "0x%02X",
+! (int)blob_get(b, i));
+! ga_concat(&ga, numbuf);
+! }
+! ga_append(&ga, ']');
+! *tofree = ga.ga_data;
+! r = *tofree;
+! }
+ break;
+
+ case VAR_LIST:
+--- 5882,5888 ----
+ }
+
+ case VAR_BLOB:
+! r = blob2string(tv->vval.v_blob, tofree, numbuf);
+ break;
+
+ case VAR_LIST:
+***************
+*** 8948,8955 ****
+ if (tab != NULL)
+ {
+ tv.v_type = type;
+! if (type == VAR_STRING || type == VAR_DICT ||
+! type == VAR_LIST || type == VAR_BLOB)
+ tv.vval.v_string = viminfo_readstring(virp,
+ (int)(tab - virp->vir_line + 1), TRUE);
+ #ifdef FEAT_FLOAT
+--- 8922,8929 ----
+ if (tab != NULL)
+ {
+ tv.v_type = type;
+! if (type == VAR_STRING || type == VAR_DICT
+! || type == VAR_LIST || type == VAR_BLOB)
+ tv.vval.v_string = viminfo_readstring(virp,
+ (int)(tab - virp->vir_line + 1), TRUE);
+ #ifdef FEAT_FLOAT
+***************
+*** 8958,8964 ****
+ #endif
+ else
+ tv.vval.v_number = atol((char *)tab + 1);
+! if (type == VAR_DICT || type == VAR_LIST || type == VAR_BLOB)
+ {
+ typval_T *etv = eval_expr(tv.vval.v_string, NULL);
+
+--- 8932,8938 ----
+ #endif
+ else
+ tv.vval.v_number = atol((char *)tab + 1);
+! if (type == VAR_DICT || type == VAR_LIST)
+ {
+ typval_T *etv = eval_expr(tv.vval.v_string, NULL);
+
+***************
+*** 8973,8978 ****
+--- 8947,8966 ----
+ vim_free(etv);
+ }
+ }
++ else if (type == VAR_BLOB)
++ {
++ blob_T *blob = string2blob(tv.vval.v_string);
++
++ if (blob == NULL)
++ // Failed to parse back the blob, use it as a string.
++ tv.v_type = VAR_STRING;
++ else
++ {
++ vim_free(tv.vval.v_string);
++ tv.v_type = VAR_BLOB;
++ tv.vval.v_blob = blob;
++ }
++ }
+
+ /* when in a function use global variables */
+ save_funccal(&funccal_entry);
+***************
+*** 9037,9043 ****
+ continue;
+ }
+ fprintf(fp, "!%s\t%s\t", this_var->di_key, s);
+! p = echo_string(&this_var->di_tv, &tofree, numbuf, 0);
+ if (p != NULL)
+ viminfo_writestring(fp, p);
+ vim_free(tofree);
+--- 9025,9039 ----
+ continue;
+ }
+ fprintf(fp, "!%s\t%s\t", this_var->di_key, s);
+! if (this_var->di_tv.v_type == VAR_SPECIAL)
+! {
+! sprintf((char *)numbuf, "%ld",
+! (long)this_var->di_tv.vval.v_number);
+! p = numbuf;
+! tofree = NULL;
+! }
+! else
+! p = echo_string(&this_var->di_tv, &tofree, numbuf, 0);
+ if (p != NULL)
+ viminfo_writestring(fp, p);
+ vim_free(tofree);
+*** ../vim-8.1.0740/src/blob.c 2019-01-13 15:15:54.392762879 +0100
+--- src/blob.c 2019-01-13 17:42:19.000391564 +0100
+***************
+*** 167,170 ****
+--- 167,237 ----
+ return OK;
+ }
+
++ /*
++ * Convert a blob to a readable form: "[0x11,0x34]"
++ */
++ char_u *
++ blob2string(blob_T *blob, char_u **tofree, char_u *numbuf)
++ {
++ int i;
++ garray_T ga;
++
++ if (blob == NULL)
++ {
++ *tofree = NULL;
++ return (char_u *)"[]";
++ }
++
++ // Store bytes in the growarray.
++ ga_init2(&ga, 1, 4000);
++ ga_append(&ga, '[');
++ for (i = 0; i < blob_len(blob); i++)
++ {
++ if (i > 0)
++ ga_concat(&ga, (char_u *)",");
++ vim_snprintf((char *)numbuf, NUMBUFLEN, "0x%02X", (int)blob_get(blob, i));
++ ga_concat(&ga, numbuf);
++ }
++ ga_append(&ga, ']');
++ *tofree = ga.ga_data;
++ return *tofree;
++ }
++
++ /*
++ * Convert a string variable, in the format of blob2string(), to a blob.
++ * Return NULL when conversion failed.
++ */
++ blob_T *
++ string2blob(char_u *str)
++ {
++ blob_T *blob = blob_alloc();
++ char_u *s = str;
++
++ if (*s != '[')
++ goto failed;
++ s = skipwhite(s + 1);
++ while (*s != ']')
++ {
++ if (s[0] != '0' || s[1] != 'x'
++ || !vim_isxdigit(s[2]) || !vim_isxdigit(s[3]))
++ goto failed;
++ ga_append(&blob->bv_ga, (hex2nr(s[2]) << 4) + hex2nr(s[3]));
++ s += 4;
++ if (*s == ',')
++ s = skipwhite(s + 1);
++ else if (*s != ']')
++ goto failed;
++ }
++ s = skipwhite(s + 1);
++ if (*s != NUL)
++ goto failed; // text after final ']'
++
++ ++blob->bv_refcount;
++ return blob;
++
++ failed:
++ blob_free(blob);
++ return NULL;
++ }
++
+ #endif /* defined(FEAT_EVAL) */
+*** ../vim-8.1.0740/src/proto/blob.pro 2019-01-12 22:47:01.264088074 +0100
+--- src/proto/blob.pro 2019-01-13 17:34:42.075344422 +0100
+***************
+*** 10,13 ****
+--- 10,15 ----
+ int blob_equal(blob_T *b1, blob_T *b2);
+ int read_blob(FILE *fd, blob_T *blob);
+ int write_blob(FILE *fd, blob_T *blob);
++ char_u *blob2string(blob_T *blob, char_u **tofree, char_u *numbuf);
++ blob_T *string2blob(char_u *str);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0740/src/version.c 2019-01-13 16:46:18.807309467 +0100
+--- src/version.c 2019-01-13 17:47:30.098331505 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 741,
+ /**/
+
+--
+What is the difference between a professional and an amateur?
+The ark was built by an amateur; professionals gave us the Titanic.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0742 b/data/vim/patches/8.1.0742
new file mode 100644
index 000000000..006fd271e
--- /dev/null
+++ b/data/vim/patches/8.1.0742
@@ -0,0 +1,186 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0742
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0742
+Problem: Not all Blob operations are tested.
+Solution: Add more testing for Blob.
+Files: src/testdir/test_blob.vim, src/evalfunc.c,
+ src/testdir/test_eval_stuff.vim
+
+
+*** ../vim-8.1.0741/src/testdir/test_blob.vim 2019-01-13 15:15:54.384762935 +0100
+--- src/testdir/test_blob.vim 2019-01-13 18:54:54.701693701 +0100
+***************
+*** 96,101 ****
+--- 96,103 ----
+ call assert_true(b1 != b2)
+ call assert_true(b1 != b3)
+ call assert_true(b1 == 0z0011)
++ call assert_fails('echo b1 == 9', 'E977:')
++ call assert_fails('echo b1 != 9', 'E977:')
+
+ call assert_false(b1 is b2)
+ let b2 = b1
+***************
+*** 145,150 ****
+--- 147,168 ----
+ call assert_equal(0zDEADBEEF, b)
+ endfunc
+
++ func Test_blob_add()
++ let b = 0z0011
++ call add(b, 0x22)
++ call assert_equal(0z001122, b)
++ call add(b, '51')
++ call assert_equal(0z00112233, b)
++
++ call assert_fails('call add(b, [9])', 'E745:')
++ endfunc
++
++ func Test_blob_empty()
++ call assert_false(empty(0z001122))
++ call assert_true(empty(0z))
++ call assert_true(empty(test_null_blob()))
++ endfunc
++
+ " Test removing items in blob
+ func Test_blob_func_remove()
+ " Test removing 1 element
+***************
+*** 198,208 ****
+--- 216,234 ----
+ let b = 0zDEADBEEF
+ call map(b, 'v:val + 1')
+ call assert_equal(0zDFAEBFF0, b)
++
++ call assert_fails("call map(b, '[9]')", 'E978:')
+ endfunc
+
+ func Test_blob_index()
+ call assert_equal(2, index(0zDEADBEEF, 0xBE))
+ call assert_equal(-1, index(0zDEADBEEF, 0))
++ call assert_equal(2, index(0z11111111, 0x11, 2))
++ call assert_equal(3, index(0z11110111, 0x11, 2))
++ call assert_equal(2, index(0z11111111, 0x11, -2))
++ call assert_equal(3, index(0z11110111, 0x11, -2))
++
++ call assert_fails('call index("asdf", 0)', 'E714:')
+ endfunc
+
+ func Test_blob_insert()
+***************
+*** 213,218 ****
+--- 239,248 ----
+ let b = 0zDEADBEEF
+ call insert(b, 0x33, 2)
+ call assert_equal(0zDEAD33BEEF, b)
++
++ call assert_fails('call insert(b, -1)', 'E475:')
++ call assert_fails('call insert(b, 257)', 'E475:')
++ call assert_fails('call insert(b, 0, [9])', 'E745:')
+ endfunc
+
+ func Test_blob_reverse()
+*** ../vim-8.1.0741/src/evalfunc.c 2019-01-13 15:15:54.392762879 +0100
+--- src/evalfunc.c 2019-01-13 18:49:36.803924354 +0100
+***************
+*** 1258,1265 ****
+ && !tv_check_lock(b->bv_lock,
+ (char_u *)N_("add() argument"), TRUE))
+ {
+! ga_append(&b->bv_ga, (char_u)tv_get_number(&argvars[1]));
+! copy_tv(&argvars[0], rettv);
+ }
+ }
+ else
+--- 1258,1271 ----
+ && !tv_check_lock(b->bv_lock,
+ (char_u *)N_("add() argument"), TRUE))
+ {
+! int error = FALSE;
+! varnumber_T n = tv_get_number_chk(&argvars[1], &error);
+!
+! if (!error)
+! {
+! ga_append(&b->bv_ga, (int)n);
+! copy_tv(&argvars[0], rettv);
+! }
+ }
+ }
+ else
+***************
+*** 3196,3202 ****
+
+ case VAR_BLOB:
+ n = argvars[0].vval.v_blob == NULL
+- || argvars[0].vval.v_blob->bv_ga.ga_data == NULL
+ || argvars[0].vval.v_blob->bv_ga.ga_len == 0;
+ break;
+
+--- 3202,3207 ----
+***************
+*** 7029,7034 ****
+--- 7034,7046 ----
+ b = argvars[0].vval.v_blob;
+ if (b == NULL)
+ return;
++ if (start < 0)
++ {
++ start = blob_len(b) + start;
++ if (start < 0)
++ start = 0;
++ }
++
+ for (idx = start; idx < blob_len(b); ++idx)
+ {
+ tv.v_type = VAR_NUMBER;
+*** ../vim-8.1.0741/src/testdir/test_eval_stuff.vim 2019-01-13 15:15:54.388762907 +0100
+--- src/testdir/test_eval_stuff.vim 2019-01-13 19:02:58.546308961 +0100
+***************
+*** 69,71 ****
+--- 69,89 ----
+ call assert_fails("for x in 'asdf'", 'E714:')
+ call assert_fails("for x in {'a': 9}", 'E714:')
+ endfunc
++
++ func Test_readfile_binary()
++ new
++ call setline(1, ['one', 'two', 'three'])
++ setlocal ff=dos
++ write XReadfile
++ let lines = readfile('XReadfile')
++ call assert_equal(['one', 'two', 'three'], lines)
++ let lines = readfile('XReadfile', '', 2)
++ call assert_equal(['one', 'two'], lines)
++ let lines = readfile('XReadfile', 'b')
++ call assert_equal(["one\r", "two\r", "three\r", ""], lines)
++ let lines = readfile('XReadfile', 'b', 2)
++ call assert_equal(["one\r", "two\r"], lines)
++
++ bwipe!
++ call delete('XReadfile')
++ endfunc
+*** ../vim-8.1.0741/src/version.c 2019-01-13 17:48:00.994125660 +0100
+--- src/version.c 2019-01-13 17:57:14.646414996 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 742,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+192. Your boss asks you to "go fer" coffee and you come up with 235 FTP 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.0743 b/data/vim/patches/8.1.0743
new file mode 100644
index 000000000..83fda7e13
--- /dev/null
+++ b/data/vim/patches/8.1.0743
@@ -0,0 +1,28463 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.07
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0743
+Problem: Giving error messages is not flexible.
+Solution: Add semsg(). Change argument from "char_u *" to "char *", also
+ for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
+ #3302) Also make emsg() accept a "char *" argument. Get rid of
+ an enormous number of type casts.
+Files: src/blob.c, src/blowfish.c, src/buffer.c, src/channel.c,
+ src/crypt.c, src/dict.c, src/diff.c, src/digraph.c, src/edit.c,
+ src/eval.c, src/evalfunc.c, src/ex_cmds.c, src/ex_cmds.h,
+ src/ex_cmds2.c, src/ex_docmd.c, src/ex_eval.c, src/ex_getln.c,
+ src/farsi.h, src/fileio.c, src/fold.c, src/getchar.c,
+ src/globals.h, src/gui.c, src/gui_at_fs.c, src/gui_at_sb.c,
+ src/gui_beval.c, src/gui_gtk_x11.c, src/gui_mac.c,
+ src/gui_photon.c, src/gui_w32.c, src/gui_x11.c, src/hangulin.c,
+ src/hardcopy.c, src/hashtab.c, src/if_cscope.c, src/if_lua.c,
+ src/if_mzsch.c, src/if_perl.xs, src/if_py_both.h, src/if_python.c,
+ src/if_python3.c, src/if_ruby.c, src/if_tcl.c, src/if_xcmdsrv.c,
+ src/json.c, src/list.c, src/main.c, src/mark.c, src/mbyte.c,
+ src/memfile.c, src/memline.c, src/menu.c, src/message.c,
+ src/misc1.c, src/misc2.c, src/netbeans.c, src/normal.c, src/ops.c,
+ src/option.c, src/os_amiga.c, src/os_mswin.c, src/os_unix.c,
+ src/os_win32.c, src/popupmnu.c, src/proto.h, src/proto/buffer.pro,
+ src/proto/digraph.pro, src/proto/ex_docmd.pro,
+ src/proto/ex_eval.pro, src/proto/ex_getln.pro,
+ src/proto/hardcopy.pro, src/proto/mbyte.pro,
+ src/proto/message.pro, src/proto/misc2.pro, src/proto/option.pro,
+ src/proto/spell.pro, src/quickfix.c, src/regexp.c,
+ src/regexp_nfa.c, src/search.c, src/sign.c, src/spell.c,
+ src/spellfile.c, src/structs.h, src/syntax.c, src/tag.c,
+ src/term.c, src/terminal.c, src/textprop.c, src/ui.c, src/undo.c,
+ src/userfunc.c, src/version.c, src/vim.h, src/window.c,
+
+
+*** ../vim-8.1.0742/src/blob.c 2019-01-13 17:48:00.994125660 +0100
+--- src/blob.c 2019-01-13 19:41:46.622522001 +0100
+***************
+*** 161,167 ****
+ if (fwrite(blob->bv_ga.ga_data, 1, blob->bv_ga.ga_len, fd)
+ < (size_t)blob->bv_ga.ga_len)
+ {
+! EMSG(_(e_write));
+ return FAIL;
+ }
+ return OK;
+--- 161,167 ----
+ if (fwrite(blob->bv_ga.ga_data, 1, blob->bv_ga.ga_len, fd)
+ < (size_t)blob->bv_ga.ga_len)
+ {
+! emsg(_(e_write));
+ return FAIL;
+ }
+ return OK;
+*** ../vim-8.1.0742/src/blowfish.c 2018-09-30 21:43:17.175693433 +0200
+--- src/blowfish.c 2019-01-13 19:42:48.281805731 +0100
+***************
+*** 419,425 ****
+ keylen = (int)STRLEN(key) / 2;
+ if (keylen == 0)
+ {
+! IEMSG(_("E831: bf_key_init() called with empty password"));
+ return;
+ }
+ for (i = 0; i < keylen; i++)
+--- 419,425 ----
+ keylen = (int)STRLEN(key) / 2;
+ if (keylen == 0)
+ {
+! iemsg(_("E831: bf_key_init() called with empty password"));
+ return;
+ }
+ for (i = 0; i < keylen; i++)
+***************
+*** 522,528 ****
+ * warning. */
+ if (ui != 0xffffffffUL || ui + 1 != 0) {
+ err++;
+! EMSG(_("E820: sizeof(uint32_t) != 4"));
+ }
+
+ if (!bf_check_tables(pax_init, sbx_init, 0x6ffa520a))
+--- 522,528 ----
+ * warning. */
+ if (ui != 0xffffffffUL || ui + 1 != 0) {
+ err++;
+! emsg(_("E820: sizeof(uint32_t) != 4"));
+ }
+
+ if (!bf_check_tables(pax_init, sbx_init, 0x6ffa520a))
+***************
+*** 543,549 ****
+ if (memcmp(bk.uc, bf_test_data[i].cryptxt, 8) != 0)
+ {
+ if (err == 0 && memcmp(bk.uc, bf_test_data[i].badcryptxt, 8) == 0)
+! EMSG(_("E817: Blowfish big/little endian use wrong"));
+ err++;
+ }
+ }
+--- 543,549 ----
+ if (memcmp(bk.uc, bf_test_data[i].cryptxt, 8) != 0)
+ {
+ if (err == 0 && memcmp(bk.uc, bf_test_data[i].badcryptxt, 8) == 0)
+! emsg(_("E817: Blowfish big/little endian use wrong"));
+ err++;
+ }
+ }
+***************
+*** 669,680 ****
+ {
+ if (sha256_self_test() == FAIL)
+ {
+! EMSG(_("E818: sha256 test failed"));
+ return FAIL;
+ }
+ if (bf_self_test() == FAIL)
+ {
+! EMSG(_("E819: Blowfish test failed"));
+ return FAIL;
+ }
+ return OK;
+--- 669,680 ----
+ {
+ if (sha256_self_test() == FAIL)
+ {
+! emsg(_("E818: sha256 test failed"));
+ return FAIL;
+ }
+ if (bf_self_test() == FAIL)
+ {
+! emsg(_("E819: Blowfish test failed"));
+ return FAIL;
+ }
+ return OK;
+*** ../vim-8.1.0742/src/buffer.c 2019-01-01 13:20:05.940711222 +0100
+--- src/buffer.c 2019-01-13 22:46:39.950915356 +0100
+***************
+*** 162,171 ****
+ */
+ if (curbuf == NULL)
+ {
+! EMSG(_("E82: Cannot allocate any buffer, exiting..."));
+ getout(2);
+ }
+! EMSG(_("E83: Cannot allocate buffer, using other one..."));
+ enter_buffer(curbuf);
+ #ifdef FEAT_SYN_HL
+ if (old_tw != curbuf->b_p_tw)
+--- 162,171 ----
+ */
+ if (curbuf == NULL)
+ {
+! emsg(_("E82: Cannot allocate any buffer, exiting..."));
+ getout(2);
+ }
+! emsg(_("E83: Cannot allocate buffer, using other one..."));
+ enter_buffer(curbuf);
+ #ifdef FEAT_SYN_HL
+ if (old_tw != curbuf->b_p_tw)
+***************
+*** 396,402 ****
+ {
+ sprintf((char *)buf->b_key, "%x", buf->b_fnum);
+ if (hash_add(&buf_hashtab, buf->b_key) == FAIL)
+! EMSG(_("E931: Buffer cannot be registered"));
+ }
+
+ static void
+--- 396,402 ----
+ {
+ sprintf((char *)buf->b_key, "%x", buf->b_fnum);
+ if (hash_add(&buf_hashtab, buf->b_key) == FAIL)
+! emsg(_("E931: Buffer cannot be registered"));
+ }
+
+ static void
+***************
+*** 430,436 ****
+ }
+ }
+ if (!can_unload)
+! EMSG(_("E937: Attempt to delete a buffer that is in use"));
+ return can_unload;
+ }
+
+--- 430,436 ----
+ }
+ }
+ if (!can_unload)
+! emsg(_("E937: Attempt to delete a buffer that is in use"));
+ return can_unload;
+ }
+
+***************
+*** 548,554 ****
+ {
+ /* Autocommands deleted the buffer. */
+ aucmd_abort:
+! EMSG(_(e_auabort));
+ return;
+ }
+ --buf->b_locked;
+--- 548,554 ----
+ {
+ /* Autocommands deleted the buffer. */
+ aucmd_abort:
+! emsg(_(e_auabort));
+ return;
+ }
+ --buf->b_locked;
+***************
+*** 1115,1121 ****
+ *
+ * Returns error message or NULL
+ */
+! char_u *
+ do_bufdel(
+ int command,
+ char_u *arg, /* pointer to extra arguments */
+--- 1115,1121 ----
+ *
+ * Returns error message or NULL
+ */
+! char *
+ do_bufdel(
+ int command,
+ char_u *arg, /* pointer to extra arguments */
+***************
+*** 1126,1132 ****
+ {
+ int do_current = 0; /* delete current buffer? */
+ int deleted = 0; /* number of buffers deleted */
+! char_u *errormsg = NULL; /* return value */
+ int bnr; /* buffer number */
+ char_u *p;
+
+--- 1126,1132 ----
+ {
+ int do_current = 0; /* delete current buffer? */
+ int deleted = 0; /* number of buffers deleted */
+! char *errormsg = NULL; /* return value */
+ int bnr; /* buffer number */
+ char_u *p;
+
+***************
+*** 1139,1145 ****
+ if (addr_count == 2)
+ {
+ if (*arg) /* both range and argument is not allowed */
+! return (char_u *)_(e_trailing);
+ bnr = start_bnr;
+ }
+ else /* addr_count == 1 */
+--- 1139,1145 ----
+ if (addr_count == 2)
+ {
+ if (*arg) /* both range and argument is not allowed */
+! return _(e_trailing);
+ bnr = start_bnr;
+ }
+ else /* addr_count == 1 */
+***************
+*** 1197,1214 ****
+ STRCPY(IObuff, _("E516: No buffers were deleted"));
+ else
+ STRCPY(IObuff, _("E517: No buffers were wiped out"));
+! errormsg = IObuff;
+ }
+ 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);
+ }
+ }
+--- 1197,1214 ----
+ STRCPY(IObuff, _("E516: No buffers were deleted"));
+ else
+ STRCPY(IObuff, _("E517: No buffers were wiped out"));
+! errormsg = (char *)IObuff;
+ }
+ else if (deleted >= p_report)
+ {
+ if (command == DOBUF_UNLOAD)
+! smsg(NGETTEXT("%d buffer unloaded",
+ "%d buffers unloaded", deleted), deleted);
+ else if (command == DOBUF_DEL)
+! smsg(NGETTEXT("%d buffer deleted",
+ "%d buffers deleted", deleted), deleted);
+ else
+! smsg(NGETTEXT("%d buffer wiped out",
+ "%d buffers wiped out", deleted), deleted);
+ }
+ }
+***************
+*** 1233,1239 ****
+
+ if (action == DOBUF_UNLOAD)
+ {
+! EMSG(_("E90: Cannot unload last buffer"));
+ return FAIL;
+ }
+
+--- 1233,1239 ----
+
+ if (action == DOBUF_UNLOAD)
+ {
+! emsg(_("E90: Cannot unload last buffer"));
+ return FAIL;
+ }
+
+***************
+*** 1307,1313 ****
+ }
+ if (!bufIsChanged(buf))
+ {
+! EMSG(_("E84: No modified buffer found"));
+ return FAIL;
+ }
+ }
+--- 1307,1313 ----
+ }
+ if (!bufIsChanged(buf))
+ {
+! emsg(_("E84: No modified buffer found"));
+ return FAIL;
+ }
+ }
+***************
+*** 1346,1352 ****
+ if (bp == buf)
+ {
+ /* back where we started, didn't find anything. */
+! EMSG(_("E85: There is no listed buffer"));
+ return FAIL;
+ }
+ }
+--- 1346,1352 ----
+ if (bp == buf)
+ {
+ /* back where we started, didn't find anything. */
+! emsg(_("E85: There is no listed buffer"));
+ return FAIL;
+ }
+ }
+***************
+*** 1358,1369 ****
+ {
+ /* don't warn when deleting */
+ if (!unload)
+! EMSGN(_(e_nobufnr), count);
+ }
+ else if (dir == FORWARD)
+! EMSG(_("E87: Cannot go beyond last buffer"));
+ else
+! EMSG(_("E88: Cannot go before first buffer"));
+ return FAIL;
+ }
+
+--- 1358,1369 ----
+ {
+ /* don't warn when deleting */
+ if (!unload)
+! semsg(_(e_nobufnr), count);
+ }
+ else if (dir == FORWARD)
+! emsg(_("E87: Cannot go beyond last buffer"));
+ else
+! emsg(_("E88: Cannot go before first buffer"));
+ return FAIL;
+ }
+
+***************
+*** 1407,1413 ****
+ else
+ #endif
+ {
+! EMSGN(_("E89: No write since last change for buffer %ld (add ! to override)"),
+ buf->b_fnum);
+ return FAIL;
+ }
+--- 1407,1413 ----
+ else
+ #endif
+ {
+! semsg(_("E89: No write since last change for buffer %ld (add ! to override)"),
+ buf->b_fnum);
+ return FAIL;
+ }
+***************
+*** 1832,1841 ****
+ {
+ #ifdef FEAT_TERMINAL
+ if (term_job_running(curbuf->b_term))
+! EMSG(_("E948: Job still running (add ! to end the job)"));
+ else
+ #endif
+! EMSG(_("E37: No write since last change (add ! to override)"));
+ }
+
+ void
+--- 1832,1841 ----
+ {
+ #ifdef FEAT_TERMINAL
+ if (term_job_running(curbuf->b_term))
+! emsg(_("E948: Job still running (add ! to end the job)"));
+ else
+ #endif
+! emsg(_("E37: No write since last change (add ! to override)"));
+ }
+
+ void
+***************
+*** 1843,1852 ****
+ {
+ #ifdef FEAT_TERMINAL
+ if (term_job_running(buf->b_term))
+! EMSG(_("E948: Job still running"));
+ else
+ #endif
+! EMSG(_("E37: No write since last change"));
+ }
+
+ /*
+--- 1843,1852 ----
+ {
+ #ifdef FEAT_TERMINAL
+ if (term_job_running(buf->b_term))
+! emsg(_("E948: Job still running"));
+ else
+ #endif
+! emsg(_("E37: No write since last change"));
+ }
+
+ /*
+***************
+*** 2057,2063 ****
+ buf->b_fnum = top_file_num++;
+ if (top_file_num < 0) /* wrap around (may cause duplicates) */
+ {
+! EMSG(_("W14: Warning: List of file names overflow"));
+ if (emsg_silent == 0)
+ {
+ out_flush();
+--- 2057,2063 ----
+ buf->b_fnum = top_file_num++;
+ if (top_file_num < 0) /* wrap around (may cause duplicates) */
+ {
+! emsg(_("W14: Warning: List of file names overflow"));
+ if (emsg_silent == 0)
+ {
+ out_flush();
+***************
+*** 2281,2289 ****
+ if (buf == NULL)
+ {
+ if ((options & GETF_ALT) && n == 0)
+! EMSG(_(e_noalt));
+ else
+! EMSGN(_("E92: Buffer %ld not found"), n);
+ return FAIL;
+ }
+
+--- 2281,2289 ----
+ if (buf == NULL)
+ {
+ if ((options & GETF_ALT) && n == 0)
+! emsg(_(e_noalt));
+ else
+! semsg(_("E92: Buffer %ld not found"), n);
+ return FAIL;
+ }
+
+***************
+*** 2568,2576 ****
+ }
+
+ if (match == -2)
+! EMSG2(_("E93: More than one match for %s"), pattern);
+ else if (match < 0)
+! EMSG2(_("E94: No matching buffer for %s"), pattern);
+ return match;
+ }
+
+--- 2568,2576 ----
+ }
+
+ if (match == -2)
+! semsg(_("E93: More than one match for %s"), pattern);
+ else if (match < 0)
+! semsg(_("E94: No matching buffer for %s"), pattern);
+ return match;
+ }
+
+***************
+*** 3172,3178 ****
+ if (obuf->b_ml.ml_mfp != NULL) /* it's loaded, fail */
+ {
+ if (message)
+! EMSG(_("E95: Buffer with this name already exists"));
+ vim_free(ffname);
+ return FAIL;
+ }
+--- 3172,3178 ----
+ if (obuf->b_ml.ml_mfp != NULL) /* it's loaded, fail */
+ {
+ if (message)
+! emsg(_("E95: Buffer with this name already exists"));
+ vim_free(ffname);
+ return FAIL;
+ }
+***************
+*** 3298,3304 ****
+ if (buflist_name_nr(0, &fname, &dummy) == FAIL)
+ {
+ if (errmsg)
+! EMSG(_(e_noalt));
+ return NULL;
+ }
+ return fname;
+--- 3298,3304 ----
+ if (buflist_name_nr(0, &fname, &dummy) == FAIL)
+ {
+ if (errmsg)
+! emsg(_(e_noalt));
+ return NULL;
+ }
+ return fname;
+***************
+*** 5730,5736 ****
+ {
+ if (bt_dontwrite(buf))
+ {
+! EMSG(_("E382: Cannot write, 'buftype' option is set"));
+ return TRUE;
+ }
+ return FALSE;
+--- 5730,5736 ----
+ {
+ if (bt_dontwrite(buf))
+ {
+! emsg(_("E382: Cannot write, 'buftype' option is set"));
+ return TRUE;
+ }
+ return FALSE;
+*** ../vim-8.1.0742/src/channel.c 2019-01-12 22:47:01.256088105 +0100
+--- src/channel.c 2019-01-13 19:45:23.292118673 +0100
+***************
+*** 116,122 ****
+ file = fopen((char *)fname, *opt == 'w' ? "w" : "a");
+ if (file == NULL)
+ {
+! EMSG2(_(e_notopen), fname);
+ return;
+ }
+ }
+--- 116,122 ----
+ file = fopen((char *)fname, *opt == 'w' ? "w" : "a");
+ if (file == NULL)
+ {
+! semsg(_(e_notopen), fname);
+ return;
+ }
+ }
+***************
+*** 209,216 ****
+
+ #ifdef _WIN32
+ # undef PERROR
+! # define PERROR(msg) (void)emsg3((char_u *)"%s: %s", \
+! (char_u *)msg, (char_u *)strerror_win32(errno))
+
+ static char *
+ strerror_win32(int eno)
+--- 209,215 ----
+
+ #ifdef _WIN32
+ # undef PERROR
+! # define PERROR(msg) (void)semsg("%s: %s", msg, strerror_win32(errno))
+
+ static char *
+ strerror_win32(int eno)
+***************
+*** 942,948 ****
+ if (argvars[1].v_type != VAR_UNKNOWN
+ && (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL))
+ {
+! EMSG(_(e_invarg));
+ return NULL;
+ }
+
+--- 941,947 ----
+ if (argvars[1].v_type != VAR_UNKNOWN
+ && (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL))
+ {
+! emsg(_(e_invarg));
+ return NULL;
+ }
+
+***************
+*** 950,956 ****
+ p = vim_strchr(address, ':');
+ if (p == NULL)
+ {
+! EMSG2(_(e_invarg2), address);
+ return NULL;
+ }
+ *p++ = NUL;
+--- 949,955 ----
+ p = vim_strchr(address, ':');
+ if (p == NULL)
+ {
+! semsg(_(e_invarg2), address);
+ return NULL;
+ }
+ *p++ = NUL;
+***************
+*** 958,964 ****
+ if (*address == NUL || port <= 0 || *rest != NUL)
+ {
+ p[-1] = ':';
+! EMSG2(_(e_invarg2), address);
+ return NULL;
+ }
+
+--- 957,963 ----
+ if (*address == NUL || port <= 0 || *rest != NUL)
+ {
+ p[-1] = ':';
+! semsg(_(e_invarg2), address);
+ return NULL;
+ }
+
+***************
+*** 971,977 ****
+ goto theend;
+ if (opt.jo_timeout < 0)
+ {
+! EMSG(_(e_invarg));
+ goto theend;
+ }
+
+--- 970,976 ----
+ goto theend;
+ if (opt.jo_timeout < 0)
+ {
+! emsg(_(e_invarg));
+ goto theend;
+ }
+
+***************
+*** 1233,1239 ****
+ {
+ buf = buflist_findnr(opt->jo_io_buf[PART_OUT]);
+ if (buf == NULL)
+! EMSGN(_(e_nobufnr), (long)opt->jo_io_buf[PART_OUT]);
+ }
+ else
+ {
+--- 1232,1238 ----
+ {
+ buf = buflist_findnr(opt->jo_io_buf[PART_OUT]);
+ if (buf == NULL)
+! semsg(_(e_nobufnr), (long)opt->jo_io_buf[PART_OUT]);
+ }
+ else
+ {
+***************
+*** 1251,1257 ****
+
+ if (!buf->b_p_ma && !channel->ch_part[PART_OUT].ch_nomodifiable)
+ {
+! EMSG(_(e_modifiable));
+ }
+ else
+ {
+--- 1250,1256 ----
+
+ if (!buf->b_p_ma && !channel->ch_part[PART_OUT].ch_nomodifiable)
+ {
+! emsg(_(e_modifiable));
+ }
+ else
+ {
+***************
+*** 1280,1286 ****
+ {
+ buf = buflist_findnr(opt->jo_io_buf[PART_ERR]);
+ if (buf == NULL)
+! EMSGN(_(e_nobufnr), (long)opt->jo_io_buf[PART_ERR]);
+ }
+ else
+ {
+--- 1279,1285 ----
+ {
+ buf = buflist_findnr(opt->jo_io_buf[PART_ERR]);
+ if (buf == NULL)
+! semsg(_(e_nobufnr), (long)opt->jo_io_buf[PART_ERR]);
+ }
+ else
+ {
+***************
+*** 1297,1303 ****
+ !opt->jo_modifiable[PART_ERR];
+ if (!buf->b_p_ma && !channel->ch_part[PART_ERR].ch_nomodifiable)
+ {
+! EMSG(_(e_modifiable));
+ }
+ else
+ {
+--- 1296,1302 ----
+ !opt->jo_modifiable[PART_ERR];
+ if (!buf->b_p_ma && !channel->ch_part[PART_ERR].ch_nomodifiable)
+ {
+! emsg(_(e_modifiable));
+ }
+ else
+ {
+***************
+*** 1619,1625 ****
+ int dummy;
+
+ if (safe_to_invoke_callback == 0)
+! IEMSG("INTERNAL: Invoking callback when it is not safe");
+
+ argv[0].v_type = VAR_CHANNEL;
+ argv[0].vval.v_channel = channel;
+--- 1618,1624 ----
+ int dummy;
+
+ if (safe_to_invoke_callback == 0)
+! iemsg("INTERNAL: Invoking callback when it is not safe");
+
+ argv[0].v_type = VAR_CHANNEL;
+ argv[0].vval.v_channel = channel;
+***************
+*** 2237,2243 ****
+ {
+ ch_error(channel, "received command with non-string argument");
+ if (p_verbose > 2)
+! EMSG(_("E903: received command with non-string argument"));
+ return;
+ }
+ arg = argv[1].vval.v_string;
+--- 2236,2242 ----
+ {
+ ch_error(channel, "received command with non-string argument");
+ if (p_verbose > 2)
+! emsg(_("E903: received command with non-string argument"));
+ return;
+ }
+ arg = argv[1].vval.v_string;
+***************
+*** 2289,2301 ****
+ {
+ ch_error(channel, "last argument for expr/call must be a number");
+ if (p_verbose > 2)
+! EMSG(_("E904: last argument for expr/call must be a number"));
+ }
+ else if (is_call && argv[2].v_type != VAR_LIST)
+ {
+ ch_error(channel, "third argument for call must be a list");
+ if (p_verbose > 2)
+! EMSG(_("E904: third argument for call must be a list"));
+ }
+ else
+ {
+--- 2288,2300 ----
+ {
+ ch_error(channel, "last argument for expr/call must be a number");
+ if (p_verbose > 2)
+! emsg(_("E904: last argument for expr/call must be a number"));
+ }
+ else if (is_call && argv[2].v_type != VAR_LIST)
+ {
+ ch_error(channel, "third argument for call must be a list");
+ if (p_verbose > 2)
+! emsg(_("E904: third argument for call must be a list"));
+ }
+ else
+ {
+***************
+*** 2351,2357 ****
+ else if (p_verbose > 2)
+ {
+ ch_error(channel, "Received unknown command: %s", (char *)cmd);
+! EMSG2(_("E905: received unknown command: %s"), cmd);
+ }
+ }
+
+--- 2350,2356 ----
+ else if (p_verbose > 2)
+ {
+ ch_error(channel, "Received unknown command: %s", (char *)cmd);
+! semsg(_("E905: received unknown command: %s"), cmd);
+ }
+ }
+
+***************
+*** 3769,3775 ****
+ if (!channel->ch_error && fun != NULL)
+ {
+ ch_error(channel, "%s(): write while not connected", fun);
+! EMSG2(_("E630: %s(): write while not connected"), fun);
+ }
+ channel->ch_error = TRUE;
+ return FAIL;
+--- 3768,3774 ----
+ if (!channel->ch_error && fun != NULL)
+ {
+ ch_error(channel, "%s(): write while not connected", fun);
+! semsg(_("E630: %s(): write while not connected"), fun);
+ }
+ channel->ch_error = TRUE;
+ return FAIL;
+***************
+*** 3916,3922 ****
+ if (!channel->ch_error && fun != NULL)
+ {
+ ch_error(channel, "%s(): write failed", fun);
+! EMSG2(_("E631: %s(): write failed"), fun);
+ }
+ channel->ch_error = TRUE;
+ return FAIL;
+--- 3915,3921 ----
+ if (!channel->ch_error && fun != NULL)
+ {
+ ch_error(channel, "%s(): write failed", fun);
+! semsg(_("E631: %s(): write failed"), fun);
+ }
+ channel->ch_error = TRUE;
+ return FAIL;
+***************
+*** 3964,3970 ****
+ {
+ if (eval)
+ {
+! EMSG2(_("E917: Cannot use a callback with %s()"), fun);
+ return NULL;
+ }
+ channel_set_req_callback(channel, *part_read,
+--- 3963,3969 ----
+ {
+ if (eval)
+ {
+! semsg(_("E917: Cannot use a callback with %s()"), fun);
+ return NULL;
+ }
+ channel_set_req_callback(channel, *part_read,
+***************
+*** 4005,4011 ****
+ ch_mode = channel_get_mode(channel, part_send);
+ if (ch_mode == MODE_RAW || ch_mode == MODE_NL)
+ {
+! EMSG(_("E912: cannot use ch_evalexpr()/ch_sendexpr() with a raw or nl channel"));
+ return;
+ }
+
+--- 4004,4010 ----
+ ch_mode = channel_get_mode(channel, part_send);
+ if (ch_mode == MODE_RAW || ch_mode == MODE_NL)
+ {
+! emsg(_("E912: cannot use ch_evalexpr()/ch_sendexpr() with a raw or nl channel"));
+ return;
+ }
+
+***************
+*** 4478,4484 ****
+ *modep = MODE_JSON;
+ else
+ {
+! EMSG2(_(e_invarg2), val);
+ return FAIL;
+ }
+ return OK;
+--- 4477,4483 ----
+ *modep = MODE_JSON;
+ else
+ {
+! semsg(_(e_invarg2), val);
+ return FAIL;
+ }
+ return OK;
+***************
+*** 4502,4508 ****
+ opt->jo_io[part] = JIO_OUT;
+ else
+ {
+! EMSG2(_(e_invarg2), val);
+ return FAIL;
+ }
+ return OK;
+--- 4501,4507 ----
+ opt->jo_io[part] = JIO_OUT;
+ else
+ {
+! semsg(_(e_invarg2), val);
+ return FAIL;
+ }
+ return OK;
+***************
+*** 4576,4582 ****
+ return OK;
+ if (tv->v_type != VAR_DICT)
+ {
+! EMSG(_(e_dictreq));
+ return FAIL;
+ }
+ dict = tv->vval.v_dict;
+--- 4575,4581 ----
+ return OK;
+ if (tv->v_type != VAR_DICT)
+ {
+! emsg(_(e_dictreq));
+ return FAIL;
+ }
+ dict = tv->vval.v_dict;
+***************
+*** 4665,4676 ****
+ opt->jo_io_buf[part] = tv_get_number(item);
+ if (opt->jo_io_buf[part] <= 0)
+ {
+! EMSG3(_(e_invargNval), hi->hi_key, tv_get_string(item));
+ return FAIL;
+ }
+ if (buflist_findnr(opt->jo_io_buf[part]) == NULL)
+ {
+! EMSGN(_(e_nobufnr), (long)opt->jo_io_buf[part]);
+ return FAIL;
+ }
+ }
+--- 4664,4675 ----
+ opt->jo_io_buf[part] = tv_get_number(item);
+ if (opt->jo_io_buf[part] <= 0)
+ {
+! semsg(_(e_invargNval), hi->hi_key, tv_get_string(item));
+ return FAIL;
+ }
+ if (buflist_findnr(opt->jo_io_buf[part]) == NULL)
+ {
+! semsg(_(e_nobufnr), (long)opt->jo_io_buf[part]);
+ return FAIL;
+ }
+ }
+***************
+*** 4714,4720 ****
+ *lp = tv_get_number(item);
+ if (*lp < 0)
+ {
+! EMSG3(_(e_invargNval), hi->hi_key, tv_get_string(item));
+ return FAIL;
+ }
+ }
+--- 4713,4719 ----
+ *lp = tv_get_number(item);
+ if (*lp < 0)
+ {
+! semsg(_(e_invargNval), hi->hi_key, tv_get_string(item));
+ return FAIL;
+ }
+ }
+***************
+*** 4725,4731 ****
+ opt->jo_set |= JO_CHANNEL;
+ if (item->v_type != VAR_CHANNEL)
+ {
+! EMSG2(_(e_invargval), "channel");
+ return FAIL;
+ }
+ opt->jo_channel = item->vval.v_channel;
+--- 4724,4730 ----
+ opt->jo_set |= JO_CHANNEL;
+ if (item->v_type != VAR_CHANNEL)
+ {
+! semsg(_(e_invargval), "channel");
+ return FAIL;
+ }
+ opt->jo_channel = item->vval.v_channel;
+***************
+*** 4738,4744 ****
+ opt->jo_callback = get_callback(item, &opt->jo_partial);
+ if (opt->jo_callback == NULL)
+ {
+! EMSG2(_(e_invargval), "callback");
+ return FAIL;
+ }
+ }
+--- 4737,4743 ----
+ opt->jo_callback = get_callback(item, &opt->jo_partial);
+ if (opt->jo_callback == NULL)
+ {
+! semsg(_(e_invargval), "callback");
+ return FAIL;
+ }
+ }
+***************
+*** 4750,4756 ****
+ opt->jo_out_cb = get_callback(item, &opt->jo_out_partial);
+ if (opt->jo_out_cb == NULL)
+ {
+! EMSG2(_(e_invargval), "out_cb");
+ return FAIL;
+ }
+ }
+--- 4749,4755 ----
+ opt->jo_out_cb = get_callback(item, &opt->jo_out_partial);
+ if (opt->jo_out_cb == NULL)
+ {
+! semsg(_(e_invargval), "out_cb");
+ return FAIL;
+ }
+ }
+***************
+*** 4762,4768 ****
+ opt->jo_err_cb = get_callback(item, &opt->jo_err_partial);
+ if (opt->jo_err_cb == NULL)
+ {
+! EMSG2(_(e_invargval), "err_cb");
+ return FAIL;
+ }
+ }
+--- 4761,4767 ----
+ opt->jo_err_cb = get_callback(item, &opt->jo_err_partial);
+ if (opt->jo_err_cb == NULL)
+ {
+! semsg(_(e_invargval), "err_cb");
+ return FAIL;
+ }
+ }
+***************
+*** 4774,4780 ****
+ opt->jo_close_cb = get_callback(item, &opt->jo_close_partial);
+ if (opt->jo_close_cb == NULL)
+ {
+! EMSG2(_(e_invargval), "close_cb");
+ return FAIL;
+ }
+ }
+--- 4773,4779 ----
+ opt->jo_close_cb = get_callback(item, &opt->jo_close_partial);
+ if (opt->jo_close_cb == NULL)
+ {
+! semsg(_(e_invargval), "close_cb");
+ return FAIL;
+ }
+ }
+***************
+*** 4787,4793 ****
+ never = TRUE;
+ else if (STRCMP(val, "auto") != 0)
+ {
+! EMSG3(_(e_invargNval), "drop", val);
+ return FAIL;
+ }
+ opt->jo_drop_never = never;
+--- 4786,4792 ----
+ never = TRUE;
+ else if (STRCMP(val, "auto") != 0)
+ {
+! semsg(_(e_invargNval), "drop", val);
+ return FAIL;
+ }
+ opt->jo_drop_never = never;
+***************
+*** 4800,4806 ****
+ opt->jo_exit_cb = get_callback(item, &opt->jo_exit_partial);
+ if (opt->jo_exit_cb == NULL)
+ {
+! EMSG2(_(e_invargval), "exit_cb");
+ return FAIL;
+ }
+ }
+--- 4799,4805 ----
+ opt->jo_exit_cb = get_callback(item, &opt->jo_exit_partial);
+ if (opt->jo_exit_cb == NULL)
+ {
+! semsg(_(e_invargval), "exit_cb");
+ return FAIL;
+ }
+ }
+***************
+*** 4813,4819 ****
+ opt->jo_term_name = tv_get_string_chk(item);
+ if (opt->jo_term_name == NULL)
+ {
+! EMSG2(_(e_invargval), "term_name");
+ return FAIL;
+ }
+ }
+--- 4812,4818 ----
+ opt->jo_term_name = tv_get_string_chk(item);
+ if (opt->jo_term_name == NULL)
+ {
+! semsg(_(e_invargval), "term_name");
+ return FAIL;
+ }
+ }
+***************
+*** 4824,4830 ****
+ val = tv_get_string(item);
+ if (STRCMP(val, "open") != 0 && STRCMP(val, "close") != 0)
+ {
+! EMSG3(_(e_invargNval), "term_finish", val);
+ return FAIL;
+ }
+ opt->jo_set2 |= JO2_TERM_FINISH;
+--- 4823,4829 ----
+ val = tv_get_string(item);
+ if (STRCMP(val, "open") != 0 && STRCMP(val, "close") != 0)
+ {
+! semsg(_(e_invargNval), "term_finish", val);
+ return FAIL;
+ }
+ opt->jo_set2 |= JO2_TERM_FINISH;
+***************
+*** 4848,4854 ****
+ }
+ if (p == NULL)
+ {
+! EMSG2(_(e_invargval), "term_opencmd");
+ return FAIL;
+ }
+ }
+--- 4847,4853 ----
+ }
+ if (p == NULL)
+ {
+! semsg(_(e_invargval), "term_opencmd");
+ return FAIL;
+ }
+ }
+***************
+*** 4862,4868 ****
+ p = opt->jo_eof_chars = tv_get_string_chk(item);
+ if (p == NULL)
+ {
+! EMSG2(_(e_invargval), "eof_chars");
+ return FAIL;
+ }
+ }
+--- 4861,4867 ----
+ p = opt->jo_eof_chars = tv_get_string_chk(item);
+ if (p == NULL)
+ {
+! semsg(_(e_invargval), "eof_chars");
+ return FAIL;
+ }
+ }
+***************
+*** 4928,4934 ****
+ if (item == NULL || item->v_type != VAR_LIST
+ || item->vval.v_list == NULL)
+ {
+! EMSG2(_(e_invargval), "ansi_colors");
+ return FAIL;
+ }
+
+--- 4927,4933 ----
+ if (item == NULL || item->v_type != VAR_LIST
+ || item->vval.v_list == NULL)
+ {
+! semsg(_(e_invargval), "ansi_colors");
+ return FAIL;
+ }
+
+***************
+*** 4951,4957 ****
+
+ if (n != 16 || li != NULL)
+ {
+! EMSG2(_(e_invargval), "ansi_colors");
+ return FAIL;
+ }
+
+--- 4950,4956 ----
+
+ if (n != 16 || li != NULL)
+ {
+! semsg(_(e_invargval), "ansi_colors");
+ return FAIL;
+ }
+
+***************
+*** 4966,4972 ****
+ break;
+ if (item->v_type != VAR_DICT)
+ {
+! EMSG2(_(e_invargval), "env");
+ return FAIL;
+ }
+ opt->jo_set2 |= JO2_ENV;
+--- 4965,4971 ----
+ break;
+ if (item->v_type != VAR_DICT)
+ {
+! semsg(_(e_invargval), "env");
+ return FAIL;
+ }
+ opt->jo_set2 |= JO2_ENV;
+***************
+*** 4985,4991 ****
+ #endif
+ )
+ {
+! EMSG2(_(e_invargval), "cwd");
+ return FAIL;
+ }
+ opt->jo_set2 |= JO2_CWD;
+--- 4984,4990 ----
+ #endif
+ )
+ {
+! semsg(_(e_invargval), "cwd");
+ return FAIL;
+ }
+ opt->jo_set2 |= JO2_CWD;
+***************
+*** 5030,5036 ****
+ opt->jo_part = PART_OUT;
+ else
+ {
+! EMSG3(_(e_invargNval), "part", val);
+ return FAIL;
+ }
+ }
+--- 5029,5035 ----
+ opt->jo_part = PART_OUT;
+ else
+ {
+! semsg(_(e_invargNval), "part", val);
+ return FAIL;
+ }
+ }
+***************
+*** 5050,5056 ****
+ opt->jo_soe_buf);
+ if (opt->jo_stoponexit == NULL)
+ {
+! EMSG2(_(e_invargval), "stoponexit");
+ return FAIL;
+ }
+ }
+--- 5049,5055 ----
+ opt->jo_soe_buf);
+ if (opt->jo_stoponexit == NULL)
+ {
+! semsg(_(e_invargval), "stoponexit");
+ return FAIL;
+ }
+ }
+***************
+*** 5067,5073 ****
+ }
+ if (todo > 0)
+ {
+! EMSG2(_(e_invarg2), hi->hi_key);
+ return FAIL;
+ }
+
+--- 5066,5072 ----
+ }
+ if (todo > 0)
+ {
+! semsg(_(e_invarg2), hi->hi_key);
+ return FAIL;
+ }
+
+***************
+*** 5098,5104 ****
+ }
+ else
+ {
+! EMSG2(_(e_invarg2), tv_get_string(tv));
+ return NULL;
+ }
+ if (channel != NULL && reading)
+--- 5097,5103 ----
+ }
+ else
+ {
+! semsg(_(e_invarg2), tv_get_string(tv));
+ return NULL;
+ }
+ if (channel != NULL && reading)
+***************
+*** 5108,5114 ****
+ if (check_open && (channel == NULL || (!channel_is_open(channel)
+ && !(reading && has_readahead))))
+ {
+! EMSG(_("E906: not an open channel"));
+ return NULL;
+ }
+ return channel;
+--- 5107,5113 ----
+ if (check_open && (channel == NULL || (!channel_is_open(channel)
+ && !(reading && has_readahead))))
+ {
+! emsg(_("E906: not an open channel"));
+ return NULL;
+ }
+ return channel;
+***************
+*** 5662,5668 ****
+ && (!(opt.jo_set & (JO_OUT_NAME << (part - PART_OUT)))
+ || *opt.jo_io_name[part] == NUL))
+ {
+! EMSG(_("E920: _io file requires _name to be set"));
+ goto theend;
+ }
+
+--- 5661,5667 ----
+ && (!(opt.jo_set & (JO_OUT_NAME << (part - PART_OUT)))
+ || *opt.jo_io_name[part] == NUL))
+ {
+! emsg(_("E920: _io file requires _name to be set"));
+ goto theend;
+ }
+
+***************
+*** 5675,5685 ****
+ {
+ buf = buflist_findnr(opt.jo_io_buf[PART_IN]);
+ if (buf == NULL)
+! EMSGN(_(e_nobufnr), (long)opt.jo_io_buf[PART_IN]);
+ }
+ else if (!(opt.jo_set & JO_IN_NAME))
+ {
+! EMSG(_("E915: in_io buffer requires in_buf or in_name to be set"));
+ }
+ else
+ buf = buflist_find_by_name(opt.jo_io_name[PART_IN], FALSE);
+--- 5674,5684 ----
+ {
+ buf = buflist_findnr(opt.jo_io_buf[PART_IN]);
+ if (buf == NULL)
+! semsg(_(e_nobufnr), (long)opt.jo_io_buf[PART_IN]);
+ }
+ else if (!(opt.jo_set & JO_IN_NAME))
+ {
+! emsg(_("E915: in_io buffer requires in_buf or in_name to be set"));
+ }
+ else
+ buf = buflist_find_by_name(opt.jo_io_name[PART_IN], FALSE);
+***************
+*** 5697,5703 ****
+ }
+ else
+ s = opt.jo_io_name[PART_IN];
+! EMSG2(_("E918: buffer must be loaded: %s"), s);
+ goto theend;
+ }
+ job->jv_in_buf = buf;
+--- 5696,5702 ----
+ }
+ else
+ s = opt.jo_io_name[PART_IN];
+! semsg(_("E918: buffer must be loaded: %s"), s);
+ goto theend;
+ }
+ job->jv_in_buf = buf;
+***************
+*** 5726,5732 ****
+ cmd = argvars[0].vval.v_string;
+ if (cmd == NULL || *cmd == NUL)
+ {
+! EMSG(_(e_invarg));
+ goto theend;
+ }
+
+--- 5725,5731 ----
+ cmd = argvars[0].vval.v_string;
+ if (cmd == NULL || *cmd == NUL)
+ {
+! emsg(_(e_invarg));
+ goto theend;
+ }
+
+***************
+*** 5737,5743 ****
+ || argvars[0].vval.v_list == NULL
+ || argvars[0].vval.v_list->lv_len < 1)
+ {
+! EMSG(_(e_invarg));
+ goto theend;
+ }
+ else
+--- 5736,5742 ----
+ || argvars[0].vval.v_list == NULL
+ || argvars[0].vval.v_list->lv_len < 1)
+ {
+! emsg(_(e_invarg));
+ goto theend;
+ }
+ else
+***************
+*** 5898,5904 ****
+ arg = tv_get_string_chk(&argvars[1]);
+ if (arg == NULL)
+ {
+! EMSG(_(e_invarg));
+ return 0;
+ }
+ }
+--- 5897,5903 ----
+ arg = tv_get_string_chk(&argvars[1]);
+ if (arg == NULL)
+ {
+! emsg(_(e_invarg));
+ return 0;
+ }
+ }
+*** ../vim-8.1.0742/src/crypt.c 2018-02-10 18:34:22.000000000 +0100
+--- src/crypt.c 2019-01-13 19:44:56.116404066 +0100
+***************
+*** 162,168 ****
+
+ i = (int)STRLEN(crypt_magic_head);
+ if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0)
+! EMSG(_("E821: File is encrypted with unknown method"));
+
+ return -1;
+ }
+--- 162,168 ----
+
+ i = (int)STRLEN(crypt_magic_head);
+ if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0)
+! emsg(_("E821: File is encrypted with unknown method"));
+
+ return -1;
+ }
+*** ../vim-8.1.0742/src/dict.c 2018-12-26 22:57:37.978550895 +0100
+--- src/dict.c 2019-01-13 19:45:30.144047338 +0100
+***************
+*** 644,650 ****
+ goto failret;
+ if (**arg != ':')
+ {
+! EMSG2(_("E720: Missing colon in Dictionary: %s"), *arg);
+ clear_tv(&tvkey);
+ goto failret;
+ }
+--- 644,650 ----
+ goto failret;
+ if (**arg != ':')
+ {
+! semsg(_("E720: Missing colon in Dictionary: %s"), *arg);
+ clear_tv(&tvkey);
+ goto failret;
+ }
+***************
+*** 671,677 ****
+ item = dict_find(d, key, -1);
+ if (item != NULL)
+ {
+! EMSG2(_("E721: Duplicate key in Dictionary: \"%s\""), key);
+ clear_tv(&tvkey);
+ clear_tv(&tv);
+ goto failret;
+--- 671,677 ----
+ item = dict_find(d, key, -1);
+ if (item != NULL)
+ {
+! semsg(_("E721: Duplicate key in Dictionary: \"%s\""), key);
+ clear_tv(&tvkey);
+ clear_tv(&tv);
+ goto failret;
+***************
+*** 691,697 ****
+ break;
+ if (**arg != ',')
+ {
+! EMSG2(_("E722: Missing comma in Dictionary: %s"), *arg);
+ goto failret;
+ }
+ *arg = skipwhite(*arg + 1);
+--- 691,697 ----
+ break;
+ if (**arg != ',')
+ {
+! semsg(_("E722: Missing comma in Dictionary: %s"), *arg);
+ goto failret;
+ }
+ *arg = skipwhite(*arg + 1);
+***************
+*** 699,705 ****
+
+ if (**arg != '}')
+ {
+! EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg);
+ failret:
+ if (evaluate)
+ dict_free(d);
+--- 699,705 ----
+
+ if (**arg != '}')
+ {
+! semsg(_("E723: Missing end of Dictionary '}': %s"), *arg);
+ failret:
+ if (evaluate)
+ dict_free(d);
+***************
+*** 753,759 ****
+ }
+ else if (*action == 'e')
+ {
+! EMSG2(_("E737: Key already exists: %s"), hi2->hi_key);
+ break;
+ }
+ else if (*action == 'f' && HI2DI(hi2) != di1)
+--- 753,759 ----
+ }
+ else if (*action == 'e')
+ {
+! semsg(_("E737: Key already exists: %s"), hi2->hi_key);
+ break;
+ }
+ else if (*action == 'f' && HI2DI(hi2) != di1)
+***************
+*** 835,841 ****
+
+ if (argvars[0].v_type != VAR_DICT)
+ {
+! EMSG(_(e_dictreq));
+ return;
+ }
+ if ((d = argvars[0].vval.v_dict) == NULL)
+--- 835,841 ----
+
+ if (argvars[0].v_type != VAR_DICT)
+ {
+! emsg(_(e_dictreq));
+ return;
+ }
+ if ((d = argvars[0].vval.v_dict) == NULL)
+*** ../vim-8.1.0742/src/diff.c 2018-12-04 22:24:12.189693629 +0100
+--- src/diff.c 2019-01-13 19:45:48.871853608 +0100
+***************
+*** 173,179 ****
+ return;
+ }
+
+! EMSGN(_("E96: Cannot diff more than %ld buffers"), DB_COUNT);
+ }
+
+ /*
+--- 173,179 ----
+ return;
+ }
+
+! semsg(_("E96: Cannot diff more than %ld buffers"), DB_COUNT);
+ }
+
+ /*
+***************
+*** 724,731 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg((char_u *)
+! _("Not enough memory to use internal diff for buffer \"%s\""),
+ buf->b_fname);
+ verbose_leave();
+ }
+--- 724,730 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg(_("Not enough memory to use internal diff for buffer \"%s\""),
+ buf->b_fname);
+ verbose_leave();
+ }
+***************
+*** 1050,1057 ****
+ if (!ok)
+ {
+ if (io_error)
+! EMSG(_("E810: Cannot read or write temp files"));
+! EMSG(_("E97: Cannot create diffs"));
+ diff_a_works = MAYBE;
+ #if defined(MSWIN)
+ diff_bin_works = MAYBE;
+--- 1049,1056 ----
+ if (!ok)
+ {
+ if (io_error)
+! emsg(_("E810: Cannot read or write temp files"));
+! emsg(_("E97: Cannot create diffs"));
+ diff_a_works = MAYBE;
+ #if defined(MSWIN)
+ diff_bin_works = MAYBE;
+***************
+*** 1093,1099 ****
+ &diffio->dio_new.din_mmfile,
+ &param, &emit_cfg, &emit_cb) < 0)
+ {
+! EMSG(_("E960: Problem creating the internal diff"));
+ return FAIL;
+ }
+ return OK;
+--- 1092,1098 ----
+ &diffio->dio_new.din_mmfile,
+ &param, &emit_cfg, &emit_cb) < 0)
+ {
+! emsg(_("E960: Problem creating the internal diff"));
+ return FAIL;
+ }
+ return OK;
+***************
+*** 1273,1279 ****
+ if (dirbuf[0] != NUL)
+ {
+ if (mch_chdir((char *)dirbuf) != 0)
+! EMSG(_(e_prev_dir));
+ shorten_fnames(TRUE);
+ }
+ #endif
+--- 1272,1278 ----
+ if (dirbuf[0] != NUL)
+ {
+ if (mch_chdir((char *)dirbuf) != 0)
+! emsg(_(e_prev_dir));
+ shorten_fnames(TRUE);
+ }
+ #endif
+***************
+*** 1291,1297 ****
+
+ /* Only continue if the output file was created. */
+ if (mch_stat((char *)tmp_new, &st) < 0 || st.st_size == 0)
+! EMSG(_("E816: Cannot read patch output"));
+ else
+ {
+ if (curbuf->b_fname != NULL)
+--- 1290,1296 ----
+
+ /* Only continue if the output file was created. */
+ if (mch_stat((char *)tmp_new, &st) < 0 || st.st_size == 0)
+! emsg(_("E816: Cannot read patch output"));
+ else
+ {
+ if (curbuf->b_fname != NULL)
+***************
+*** 1596,1602 ****
+ fd = mch_fopen((char *)dout->dout_fname, "r");
+ if (fd == NULL)
+ {
+! EMSG(_("E98: Cannot read diff output"));
+ return;
+ }
+ }
+--- 1595,1601 ----
+ fd = mch_fopen((char *)dout->dout_fname, "r");
+ if (fd == NULL)
+ {
+! emsg(_("E98: Cannot read diff output"));
+ return;
+ }
+ }
+***************
+*** 1662,1668 ****
+ }
+ else
+ {
+! EMSG(_("E959: Invalid diff format."));
+ break;
+ }
+
+--- 1661,1667 ----
+ }
+ else
+ {
+! emsg(_("E959: Invalid diff format."));
+ break;
+ }
+
+***************
+*** 2572,2578 ****
+ idx_cur = diff_buf_idx(curbuf);
+ if (idx_cur == DB_COUNT)
+ {
+! EMSG(_("E99: Current buffer is not in diff mode"));
+ return;
+ }
+
+--- 2571,2577 ----
+ idx_cur = diff_buf_idx(curbuf);
+ if (idx_cur == DB_COUNT)
+ {
+! emsg(_("E99: Current buffer is not in diff mode"));
+ return;
+ }
+
+***************
+*** 2591,2599 ****
+ if (idx_other == DB_COUNT)
+ {
+ if (found_not_ma)
+! EMSG(_("E793: No other buffer in diff mode is modifiable"));
+ else
+! EMSG(_("E100: No other buffer in diff mode"));
+ return;
+ }
+
+--- 2590,2598 ----
+ if (idx_other == DB_COUNT)
+ {
+ if (found_not_ma)
+! emsg(_("E793: No other buffer in diff mode is modifiable"));
+ else
+! emsg(_("E100: No other buffer in diff mode"));
+ return;
+ }
+
+***************
+*** 2603,2609 ****
+ && curtab->tp_diffbuf[i] != NULL
+ && (eap->cmdidx != CMD_diffput || curtab->tp_diffbuf[i]->b_p_ma))
+ {
+! EMSG(_("E101: More than two buffers in diff mode, don't know which one to use"));
+ return;
+ }
+ }
+--- 2602,2608 ----
+ && curtab->tp_diffbuf[i] != NULL
+ && (eap->cmdidx != CMD_diffput || curtab->tp_diffbuf[i]->b_p_ma))
+ {
+! emsg(_("E101: More than two buffers in diff mode, don't know which one to use"));
+ return;
+ }
+ }
+***************
+*** 2626,2632 ****
+ buf = buflist_findnr(i);
+ if (buf == NULL)
+ {
+! EMSG2(_("E102: Can't find buffer \"%s\""), eap->arg);
+ return;
+ }
+ if (buf == curbuf)
+--- 2625,2631 ----
+ buf = buflist_findnr(i);
+ if (buf == NULL)
+ {
+! semsg(_("E102: Can't find buffer \"%s\""), eap->arg);
+ return;
+ }
+ if (buf == curbuf)
+***************
+*** 2634,2640 ****
+ idx_other = diff_buf_idx(buf);
+ if (idx_other == DB_COUNT)
+ {
+! EMSG2(_("E103: Buffer \"%s\" is not in diff mode"), eap->arg);
+ return;
+ }
+ }
+--- 2633,2639 ----
+ idx_other = diff_buf_idx(buf);
+ if (idx_other == DB_COUNT)
+ {
+! semsg(_("E103: Buffer \"%s\" is not in diff mode"), eap->arg);
+ return;
+ }
+ }
+***************
+*** 2678,2684 ****
+ change_warning(0);
+ if (diff_buf_idx(curbuf) != idx_to)
+ {
+! EMSG(_("E787: Buffer changed unexpectedly"));
+ goto theend;
+ }
+ }
+--- 2677,2683 ----
+ change_warning(0);
+ if (diff_buf_idx(curbuf) != idx_to)
+ {
+! emsg(_("E787: Buffer changed unexpectedly"));
+ goto theend;
+ }
+ }
+*** ../vim-8.1.0742/src/digraph.c 2018-12-14 18:52:57.169528762 +0100
+--- src/digraph.c 2019-01-13 20:13:21.377826929 +0100
+***************
+*** 2218,2235 ****
+ char2 = *str++;
+ if (char2 == 0)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+ if (char1 == ESC || char2 == ESC)
+ {
+! EMSG(_("E104: Escape not allowed in digraph"));
+ return;
+ }
+ str = skipwhite(str);
+ if (!VIM_ISDIGIT(*str))
+ {
+! EMSG(_(e_number_exp));
+ return;
+ }
+ n = getdigits(&str);
+--- 2218,2235 ----
+ char2 = *str++;
+ if (char2 == 0)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+ if (char1 == ESC || char2 == ESC)
+ {
+! emsg(_("E104: Escape not allowed in digraph"));
+ return;
+ }
+ str = skipwhite(str);
+ if (!VIM_ISDIGIT(*str))
+ {
+! emsg(_(e_number_exp));
+ return;
+ }
+ n = getdigits(&str);
+***************
+*** 2446,2452 ****
+ * used when setting the option, not later when the value has already been
+ * checked.
+ */
+! char_u *
+ keymap_init(void)
+ {
+ curbuf->b_kmap_state &= ~KEYMAP_INIT;
+--- 2446,2452 ----
+ * used when setting the option, not later when the value has already been
+ * checked.
+ */
+! char *
+ keymap_init(void)
+ {
+ curbuf->b_kmap_state &= ~KEYMAP_INIT;
+***************
+*** 2487,2493 ****
+ if (source_runtime(buf, 0) == FAIL)
+ {
+ vim_free(buf);
+! return (char_u *)N_("E544: Keymap file not found");
+ }
+ }
+ vim_free(buf);
+--- 2487,2493 ----
+ if (source_runtime(buf, 0) == FAIL)
+ {
+ vim_free(buf);
+! return N_("E544: Keymap file not found");
+ }
+ }
+ vim_free(buf);
+***************
+*** 2513,2519 ****
+
+ if (!getline_equal(eap->getline, eap->cookie, getsourceline))
+ {
+! EMSG(_("E105: Using :loadkeymap not in a sourced file"));
+ return;
+ }
+
+--- 2513,2519 ----
+
+ if (!getline_equal(eap->getline, eap->cookie, getsourceline))
+ {
+! emsg(_("E105: Using :loadkeymap not in a sourced file"));
+ return;
+ }
+
+***************
+*** 2552,2558 ****
+ || *kp->from == NUL || *kp->to == NUL)
+ {
+ if (kp->to != NULL && *kp->to == NUL)
+! EMSG(_("E791: Empty keymap entry"));
+ vim_free(kp->from);
+ vim_free(kp->to);
+ }
+--- 2552,2558 ----
+ || *kp->from == NUL || *kp->to == NUL)
+ {
+ if (kp->to != NULL && *kp->to == NUL)
+! emsg(_("E791: Empty keymap entry"));
+ vim_free(kp->from);
+ vim_free(kp->to);
+ }
+*** ../vim-8.1.0742/src/edit.c 2019-01-11 22:15:00.519123428 +0100
+--- src/edit.c 2019-01-13 19:46:26.947465113 +0100
+***************
+*** 360,366 ****
+ /* Don't allow inserting in the sandbox. */
+ if (sandbox != 0)
+ {
+! EMSG(_(e_sandbox));
+ return FALSE;
+ }
+ #endif
+--- 360,366 ----
+ /* Don't allow inserting in the sandbox. */
+ if (sandbox != 0)
+ {
+! emsg(_(e_sandbox));
+ return FALSE;
+ }
+ #endif
+***************
+*** 368,374 ****
+ * caller of getcmdline() may get confused. */
+ if (textlock != 0)
+ {
+! EMSG(_(e_secure));
+ return FALSE;
+ }
+
+--- 368,374 ----
+ * caller of getcmdline() may get confused. */
+ if (textlock != 0)
+ {
+! emsg(_(e_secure));
+ return FALSE;
+ }
+
+***************
+*** 376,382 ****
+ /* Don't allow recursive insert mode when busy with completion. */
+ if (compl_started || compl_busy || pum_visible())
+ {
+! EMSG(_(e_secure));
+ return FALSE;
+ }
+ ins_compl_clear(); /* clear stuff for CTRL-X mode */
+--- 376,382 ----
+ /* Don't allow recursive insert mode when busy with completion. */
+ if (compl_started || compl_busy || pum_visible())
+ {
+! emsg(_(e_secure));
+ return FALSE;
+ }
+ ins_compl_clear(); /* clear stuff for CTRL-X mode */
+***************
+*** 476,482 ****
+ if (p_fkmap && p_ri)
+ {
+ beep_flush();
+! EMSG(farsi_text_3); /* encoded in Farsi */
+ State = INSERT;
+ }
+ else
+--- 476,482 ----
+ if (p_fkmap && p_ri)
+ {
+ beep_flush();
+! emsg(farsi_text_3); /* encoded in Farsi */
+ State = INSERT;
+ }
+ else
+***************
+*** 4262,4275 ****
+
+ if (curwin_save != curwin || curbuf_save != curbuf)
+ {
+! EMSG(_(e_complwin));
+ goto theend;
+ }
+ curwin->w_cursor = pos; /* restore the cursor position */
+ validate_cursor();
+ if (!EQUAL_POS(curwin->w_cursor, pos))
+ {
+! EMSG(_(e_compldel));
+ goto theend;
+ }
+
+--- 4262,4275 ----
+
+ if (curwin_save != curwin || curbuf_save != curbuf)
+ {
+! emsg(_(e_complwin));
+ goto theend;
+ }
+ curwin->w_cursor = pos; /* restore the cursor position */
+ validate_cursor();
+ if (!EQUAL_POS(curwin->w_cursor, pos))
+ {
+! emsg(_(e_compldel));
+ goto theend;
+ }
+
+***************
+*** 5567,5573 ****
+ ? curbuf->b_p_cfu : curbuf->b_p_ofu;
+ if (*funcname == NUL)
+ {
+! EMSG2(_(e_notset), ctrl_x_mode == CTRL_X_FUNCTION
+ ? "completefunc" : "omnifunc");
+ /* restore did_ai, so that adding comment leader works */
+ did_ai = save_did_ai;
+--- 5567,5573 ----
+ ? curbuf->b_p_cfu : curbuf->b_p_ofu;
+ if (*funcname == NUL)
+ {
+! semsg(_(e_notset), ctrl_x_mode == CTRL_X_FUNCTION
+ ? "completefunc" : "omnifunc");
+ /* restore did_ai, so that adding comment leader works */
+ did_ai = save_did_ai;
+***************
+*** 5587,5600 ****
+ State = save_State;
+ if (curwin_save != curwin || curbuf_save != curbuf)
+ {
+! EMSG(_(e_complwin));
+ return FAIL;
+ }
+ curwin->w_cursor = pos; /* restore the cursor position */
+ validate_cursor();
+ if (!EQUAL_POS(curwin->w_cursor, pos))
+ {
+! EMSG(_(e_compldel));
+ return FAIL;
+ }
+
+--- 5587,5600 ----
+ State = save_State;
+ if (curwin_save != curwin || curbuf_save != curbuf)
+ {
+! emsg(_(e_complwin));
+ return FAIL;
+ }
+ curwin->w_cursor = pos; /* restore the cursor position */
+ validate_cursor();
+ if (!EQUAL_POS(curwin->w_cursor, pos))
+ {
+! emsg(_(e_compldel));
+ return FAIL;
+ }
+
+***************
+*** 7678,7684 ****
+ ptr = get_last_insert();
+ if (ptr == NULL)
+ {
+! EMSG(_(e_noinstext));
+ return FAIL;
+ }
+
+--- 7678,7684 ----
+ ptr = get_last_insert();
+ if (ptr == NULL)
+ {
+! emsg(_(e_noinstext));
+ return FAIL;
+ }
+
+***************
+*** 8969,8975 ****
+ if (p_fkmap && p_ri)
+ {
+ beep_flush();
+! EMSG(farsi_text_3); /* encoded in Farsi */
+ return;
+ }
+ #endif
+--- 8969,8975 ----
+ if (p_fkmap && p_ri)
+ {
+ beep_flush();
+! emsg(farsi_text_3); /* encoded in Farsi */
+ return;
+ }
+ #endif
+*** ../vim-8.1.0742/src/eval.c 2019-01-13 17:48:00.994125660 +0100
+--- src/eval.c 2019-01-13 19:47:04.091092657 +0100
+***************
+*** 301,307 ****
+ p = &vimvars[i];
+ if (STRLEN(p->vv_name) > 16)
+ {
+! IEMSG("INTERNAL: name too long, increase size of dictitem16_T");
+ getout(1);
+ }
+ STRCPY(p->vv_di.di_key, p->vv_name);
+--- 301,307 ----
+ p = &vimvars[i];
+ if (STRLEN(p->vv_name) > 16)
+ {
+! iemsg("INTERNAL: name too long, increase size of dictitem16_T");
+ getout(1);
+ }
+ STRCPY(p->vv_di.di_key, p->vv_name);
+***************
+*** 448,454 ****
+ /* Catch a bad name early. */
+ if (!eval_isnamec1(*name))
+ {
+! EMSG(_(e_invarg));
+ return FAIL;
+ }
+
+--- 448,454 ----
+ /* Catch a bad name early. */
+ if (!eval_isnamec1(*name))
+ {
+! emsg(_(e_invarg));
+ return FAIL;
+ }
+
+***************
+*** 475,483 ****
+ clear_lval(redir_lval);
+ if (redir_endp != NULL && *redir_endp != NUL)
+ /* Trailing characters are present after the variable name */
+! EMSG(_(e_trailing));
+ else
+! EMSG(_(e_invarg));
+ redir_endp = NULL; /* don't store a value, only cleanup */
+ var_redir_stop();
+ return FAIL;
+--- 475,483 ----
+ clear_lval(redir_lval);
+ if (redir_endp != NULL && *redir_endp != NUL)
+ /* Trailing characters are present after the variable name */
+! emsg(_(e_trailing));
+ else
+! emsg(_(e_invarg));
+ redir_endp = NULL; /* don't store a value, only cleanup */
+ var_redir_stop();
+ return FAIL;
+***************
+*** 734,740 ****
+ if (*s != NUL) /* check for trailing chars after expr */
+ {
+ clear_tv(rettv);
+! EMSG2(_(e_invexpr2), s);
+ return FAIL;
+ }
+ }
+--- 734,740 ----
+ if (*s != NUL) /* check for trailing chars after expr */
+ {
+ clear_tv(rettv);
+! semsg(_(e_invexpr2), s);
+ return FAIL;
+ }
+ }
+***************
+*** 1202,1208 ****
+ * ":let" without "=": list variables
+ */
+ if (*arg == '[')
+! EMSG(_(e_invarg));
+ else if (!ends_excmd(*arg))
+ /* ":let var1 var2" */
+ arg = list_arg_vars(eap, arg, &first);
+--- 1202,1208 ----
+ * ":let" without "=": list variables
+ */
+ if (*arg == '[')
+! emsg(_(e_invarg));
+ else if (!ends_excmd(*arg))
+ /* ":let var1 var2" */
+ arg = list_arg_vars(eap, arg, &first);
+***************
+*** 1288,1306 ****
+ */
+ if (tv->v_type != VAR_LIST || (l = tv->vval.v_list) == NULL)
+ {
+! EMSG(_(e_listreq));
+ return FAIL;
+ }
+
+ i = list_len(l);
+ if (semicolon == 0 && var_count < i)
+ {
+! EMSG(_("E687: Less targets than List items"));
+ return FAIL;
+ }
+ if (var_count - semicolon > i)
+ {
+! EMSG(_("E688: More targets than List items"));
+ return FAIL;
+ }
+
+--- 1288,1306 ----
+ */
+ if (tv->v_type != VAR_LIST || (l = tv->vval.v_list) == NULL)
+ {
+! emsg(_(e_listreq));
+ return FAIL;
+ }
+
+ i = list_len(l);
+ if (semicolon == 0 && var_count < i)
+ {
+! emsg(_("E687: Less targets than List items"));
+ return FAIL;
+ }
+ if (var_count - semicolon > i)
+ {
+! emsg(_("E688: More targets than List items"));
+ return FAIL;
+ }
+
+***************
+*** 1374,1380 ****
+ s = skip_var_one(p);
+ if (s == p)
+ {
+! EMSG2(_(e_invarg2), p);
+ return NULL;
+ }
+ ++*var_count;
+--- 1374,1380 ----
+ s = skip_var_one(p);
+ if (s == p)
+ {
+! semsg(_(e_invarg2), p);
+ return NULL;
+ }
+ ++*var_count;
+***************
+*** 1386,1399 ****
+ {
+ if (*semicolon == 1)
+ {
+! EMSG(_("Double ; in list of variables"));
+ return NULL;
+ }
+ *semicolon = 1;
+ }
+ else if (*p != ',')
+ {
+! EMSG2(_(e_invarg2), p);
+ return NULL;
+ }
+ }
+--- 1386,1399 ----
+ {
+ if (*semicolon == 1)
+ {
+! emsg(_("Double ; in list of variables"));
+ return NULL;
+ }
+ *semicolon = 1;
+ }
+ else if (*p != ',')
+ {
+! semsg(_(e_invarg2), p);
+ return NULL;
+ }
+ }
+***************
+*** 1534,1540 ****
+ if (!VIM_ISWHITE(*arg) && !ends_excmd(*arg))
+ {
+ emsg_severe = TRUE;
+! EMSG(_(e_trailing));
+ break;
+ }
+ }
+--- 1534,1540 ----
+ if (!VIM_ISWHITE(*arg) && !ends_excmd(*arg))
+ {
+ emsg_severe = TRUE;
+! emsg(_(e_trailing));
+ break;
+ }
+ }
+***************
+*** 1550,1556 ****
+ if (len < 0 && !aborting())
+ {
+ emsg_severe = TRUE;
+! EMSG2(_(e_invarg2), arg);
+ break;
+ }
+ error = TRUE;
+--- 1550,1556 ----
+ if (len < 0 && !aborting())
+ {
+ emsg_severe = TRUE;
+! semsg(_(e_invarg2), arg);
+ break;
+ }
+ error = TRUE;
+***************
+*** 1581,1587 ****
+ case 's': list_script_vars(first); break;
+ case 'l': list_func_vars(first); break;
+ default:
+! EMSG2(_("E738: Can't list variables for %s"), name);
+ }
+ }
+ else
+--- 1581,1587 ----
+ case 's': list_script_vars(first); break;
+ case 'l': list_func_vars(first); break;
+ default:
+! semsg(_("E738: Can't list variables for %s"), name);
+ }
+ }
+ else
+***************
+*** 1647,1660 ****
+ name = arg;
+ len = get_env_len(&arg);
+ if (len == 0)
+! EMSG2(_(e_invarg2), name - 1);
+ else
+ {
+ if (op != NULL && (*op == '+' || *op == '-'))
+! EMSG2(_(e_letwrong), op);
+ else if (endchars != NULL
+ && vim_strchr(endchars, *skipwhite(arg)) == NULL)
+! EMSG(_(e_letunexp));
+ else if (!check_secure())
+ {
+ c1 = name[len];
+--- 1647,1660 ----
+ name = arg;
+ len = get_env_len(&arg);
+ if (len == 0)
+! semsg(_(e_invarg2), name - 1);
+ else
+ {
+ if (op != NULL && (*op == '+' || *op == '-'))
+! semsg(_(e_letwrong), op);
+ else if (endchars != NULL
+ && vim_strchr(endchars, *skipwhite(arg)) == NULL)
+! emsg(_(e_letunexp));
+ else if (!check_secure())
+ {
+ c1 = name[len];
+***************
+*** 1701,1707 ****
+ p = find_option_end(&arg, &opt_flags);
+ if (p == NULL || (endchars != NULL
+ && vim_strchr(endchars, *skipwhite(p)) == NULL))
+! EMSG(_(e_letunexp));
+ else
+ {
+ long n;
+--- 1701,1707 ----
+ p = find_option_end(&arg, &opt_flags);
+ if (p == NULL || (endchars != NULL
+ && vim_strchr(endchars, *skipwhite(p)) == NULL))
+! emsg(_(e_letunexp));
+ else
+ {
+ long n;
+***************
+*** 1722,1728 ****
+ if ((opt_type == 1 && *op == '.')
+ || (opt_type == 0 && *op != '.'))
+ {
+! EMSG2(_(e_letwrong), op);
+ s = NULL; /* don't set the value */
+ }
+ else
+--- 1722,1728 ----
+ if ((opt_type == 1 && *op == '.')
+ || (opt_type == 0 && *op != '.'))
+ {
+! semsg(_(e_letwrong), op);
+ s = NULL; /* don't set the value */
+ }
+ else
+***************
+*** 1759,1768 ****
+ {
+ ++arg;
+ if (op != NULL && (*op == '+' || *op == '-'))
+! EMSG2(_(e_letwrong), op);
+ else if (endchars != NULL
+ && vim_strchr(endchars, *skipwhite(arg + 1)) == NULL)
+! EMSG(_(e_letunexp));
+ else
+ {
+ char_u *ptofree = NULL;
+--- 1759,1768 ----
+ {
+ ++arg;
+ if (op != NULL && (*op == '+' || *op == '-'))
+! semsg(_(e_letwrong), op);
+ else if (endchars != NULL
+ && vim_strchr(endchars, *skipwhite(arg + 1)) == NULL)
+! emsg(_(e_letunexp));
+ else
+ {
+ char_u *ptofree = NULL;
+***************
+*** 1799,1805 ****
+ if (p != NULL && lv.ll_name != NULL)
+ {
+ if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL)
+! EMSG(_(e_letunexp));
+ else
+ {
+ set_var_lval(&lv, p, tv, copy, op);
+--- 1799,1805 ----
+ if (p != NULL && lv.ll_name != NULL)
+ {
+ if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL)
+! emsg(_(e_letunexp));
+ else
+ {
+ set_var_lval(&lv, p, tv, copy, op);
+***************
+*** 1810,1816 ****
+ }
+
+ else
+! EMSG2(_(e_invarg2), arg);
+
+ return arg_end;
+ }
+--- 1810,1816 ----
+ }
+
+ else
+! semsg(_(e_invarg2), arg);
+
+ return arg_end;
+ }
+***************
+*** 1875,1881 ****
+ if (unlet && !VIM_ISWHITE(*p) && !ends_excmd(*p)
+ && *p != '[' && *p != '.')
+ {
+! EMSG(_(e_trailing));
+ return NULL;
+ }
+
+--- 1875,1881 ----
+ if (unlet && !VIM_ISWHITE(*p) && !ends_excmd(*p)
+ && *p != '[' && *p != '.')
+ {
+! emsg(_(e_trailing));
+ return NULL;
+ }
+
+***************
+*** 1888,1894 ****
+ if (!aborting() && !quiet)
+ {
+ emsg_severe = TRUE;
+! EMSG2(_(e_invarg2), name);
+ return NULL;
+ }
+ }
+--- 1888,1894 ----
+ if (!aborting() && !quiet)
+ {
+ emsg_severe = TRUE;
+! semsg(_(e_invarg2), name);
+ return NULL;
+ }
+ }
+***************
+*** 1908,1914 ****
+ v = find_var(lp->ll_name, (flags & GLV_READ_ONLY) ? NULL : &ht,
+ flags & GLV_NO_AUTOLOAD);
+ if (v == NULL && !quiet)
+! EMSG2(_(e_undefvar), lp->ll_name);
+ *p = cc;
+ if (v == NULL)
+ return NULL;
+--- 1908,1914 ----
+ v = find_var(lp->ll_name, (flags & GLV_READ_ONLY) ? NULL : &ht,
+ flags & GLV_NO_AUTOLOAD);
+ if (v == NULL && !quiet)
+! semsg(_(e_undefvar), lp->ll_name);
+ *p = cc;
+ if (v == NULL)
+ return NULL;
+***************
+*** 1928,1940 ****
+ && lp->ll_tv->vval.v_blob != NULL))
+ {
+ if (!quiet)
+! EMSG(_("E689: Can only index a List, Dictionary or Blob"));
+ return NULL;
+ }
+ if (lp->ll_range)
+ {
+ if (!quiet)
+! EMSG(_("E708: [:] must come last"));
+ return NULL;
+ }
+
+--- 1928,1940 ----
+ && lp->ll_tv->vval.v_blob != NULL))
+ {
+ if (!quiet)
+! emsg(_("E689: Can only index a List, Dictionary or Blob"));
+ return NULL;
+ }
+ if (lp->ll_range)
+ {
+ if (!quiet)
+! emsg(_("E708: [:] must come last"));
+ return NULL;
+ }
+
+***************
+*** 1947,1953 ****
+ if (len == 0)
+ {
+ if (!quiet)
+! EMSG(_(e_emptykey));
+ return NULL;
+ }
+ p = key + len;
+--- 1947,1953 ----
+ if (len == 0)
+ {
+ if (!quiet)
+! emsg(_(e_emptykey));
+ return NULL;
+ }
+ p = key + len;
+***************
+*** 1977,1983 ****
+ if (lp->ll_tv->v_type == VAR_DICT)
+ {
+ if (!quiet)
+! EMSG(_(e_dictrange));
+ clear_tv(&var1);
+ return NULL;
+ }
+--- 1977,1983 ----
+ if (lp->ll_tv->v_type == VAR_DICT)
+ {
+ if (!quiet)
+! emsg(_(e_dictrange));
+ clear_tv(&var1);
+ return NULL;
+ }
+***************
+*** 1988,1994 ****
+ && rettv->vval.v_blob != NULL))
+ {
+ if (!quiet)
+! EMSG(_("E709: [:] requires a List or Blob value"));
+ clear_tv(&var1);
+ return NULL;
+ }
+--- 1988,1994 ----
+ && rettv->vval.v_blob != NULL))
+ {
+ if (!quiet)
+! emsg(_("E709: [:] requires a List or Blob value"));
+ clear_tv(&var1);
+ return NULL;
+ }
+***************
+*** 2019,2025 ****
+ if (*p != ']')
+ {
+ if (!quiet)
+! EMSG(_(e_missbrac));
+ clear_tv(&var1);
+ clear_tv(&var2);
+ return NULL;
+--- 2019,2025 ----
+ if (*p != ']')
+ {
+ if (!quiet)
+! emsg(_(e_missbrac));
+ clear_tv(&var1);
+ clear_tv(&var2);
+ return NULL;
+***************
+*** 2075,2081 ****
+ /* Can't add "v:" variable. */
+ if (lp->ll_dict == &vimvardict)
+ {
+! EMSG2(_(e_illvar), name);
+ return NULL;
+ }
+
+--- 2075,2081 ----
+ /* Can't add "v:" variable. */
+ if (lp->ll_dict == &vimvardict)
+ {
+! semsg(_(e_illvar), name);
+ return NULL;
+ }
+
+***************
+*** 2083,2089 ****
+ if (*p == '[' || *p == '.' || unlet)
+ {
+ if (!quiet)
+! EMSG2(_(e_dictkey), key);
+ clear_tv(&var1);
+ return NULL;
+ }
+--- 2083,2089 ----
+ if (*p == '[' || *p == '.' || unlet)
+ {
+ if (!quiet)
+! semsg(_(e_dictkey), key);
+ clear_tv(&var1);
+ return NULL;
+ }
+***************
+*** 2126,2132 ****
+ || (lp->ll_range && lp->ll_n1 == bloblen))
+ {
+ if (!quiet)
+! EMSGN(_(e_blobidx), lp->ll_n1);
+ clear_tv(&var2);
+ return NULL;
+ }
+--- 2126,2132 ----
+ || (lp->ll_range && lp->ll_n1 == bloblen))
+ {
+ if (!quiet)
+! semsg(_(e_blobidx), lp->ll_n1);
+ clear_tv(&var2);
+ return NULL;
+ }
+***************
+*** 2139,2145 ****
+ || lp->ll_n2 < lp->ll_n1)
+ {
+ if (!quiet)
+! EMSGN(_(e_blobidx), lp->ll_n2);
+ return NULL;
+ }
+ }
+--- 2139,2145 ----
+ || lp->ll_n2 < lp->ll_n1)
+ {
+ if (!quiet)
+! semsg(_(e_blobidx), lp->ll_n2);
+ return NULL;
+ }
+ }
+***************
+*** 2173,2179 ****
+ {
+ clear_tv(&var2);
+ if (!quiet)
+! EMSGN(_(e_listidx), lp->ll_n1);
+ return NULL;
+ }
+
+--- 2173,2179 ----
+ {
+ clear_tv(&var2);
+ if (!quiet)
+! semsg(_(e_listidx), lp->ll_n1);
+ return NULL;
+ }
+
+***************
+*** 2194,2200 ****
+ if (ni == NULL)
+ {
+ if (!quiet)
+! EMSGN(_(e_listidx), lp->ll_n2);
+ return NULL;
+ }
+ lp->ll_n2 = list_idx_of_item(lp->ll_list, ni);
+--- 2194,2200 ----
+ if (ni == NULL)
+ {
+ if (!quiet)
+! semsg(_(e_listidx), lp->ll_n2);
+ return NULL;
+ }
+ lp->ll_n2 = list_idx_of_item(lp->ll_list, ni);
+***************
+*** 2206,2212 ****
+ if (lp->ll_n2 < lp->ll_n1)
+ {
+ if (!quiet)
+! EMSGN(_(e_listidx), lp->ll_n2);
+ return NULL;
+ }
+ }
+--- 2206,2212 ----
+ if (lp->ll_n2 < lp->ll_n1)
+ {
+ if (!quiet)
+! semsg(_(e_listidx), lp->ll_n2);
+ return NULL;
+ }
+ }
+***************
+*** 2256,2262 ****
+
+ if (op != NULL && *op != '=')
+ {
+! EMSG2(_(e_letwrong), op);
+ return;
+ }
+
+--- 2256,2262 ----
+
+ if (op != NULL && *op != '=')
+ {
+! semsg(_(e_letwrong), op);
+ return;
+ }
+
+***************
+*** 2269,2275 ****
+
+ if (lp->ll_n2 - lp->ll_n1 + 1 != blob_len(rettv->vval.v_blob))
+ {
+! EMSG(_("E972: Blob value does not have the right number of bytes"));
+ return;
+ }
+ if (lp->ll_empty2)
+--- 2269,2275 ----
+
+ if (lp->ll_n2 - lp->ll_n1 + 1 != blob_len(rettv->vval.v_blob))
+ {
+! emsg(_("E972: Blob value does not have the right number of bytes"));
+ return;
+ }
+ if (lp->ll_empty2)
+***************
+*** 2374,2384 ****
+ ++lp->ll_n1;
+ }
+ if (ri != NULL)
+! EMSG(_("E710: List value has more items than target"));
+ else if (lp->ll_empty2
+ ? (lp->ll_li != NULL && lp->ll_li->li_next != NULL)
+ : lp->ll_n1 != lp->ll_n2)
+! EMSG(_("E711: List value has not enough items"));
+ }
+ else
+ {
+--- 2374,2384 ----
+ ++lp->ll_n1;
+ }
+ if (ri != NULL)
+! emsg(_("E710: List value has more items than target"));
+ else if (lp->ll_empty2
+ ? (lp->ll_li != NULL && lp->ll_li->li_next != NULL)
+ : lp->ll_n1 != lp->ll_n2)
+! emsg(_("E711: List value has not enough items"));
+ }
+ else
+ {
+***************
+*** 2389,2395 ****
+ {
+ if (op != NULL && *op != '=')
+ {
+! EMSG2(_(e_letwrong), op);
+ return;
+ }
+
+--- 2389,2395 ----
+ {
+ if (op != NULL && *op != '=')
+ {
+! semsg(_(e_letwrong), op);
+ return;
+ }
+
+***************
+*** 2544,2550 ****
+ }
+ }
+
+! EMSG2(_(e_letwrong), op);
+ return FAIL;
+ }
+
+--- 2544,2550 ----
+ }
+ }
+
+! semsg(_(e_letwrong), op);
+ return FAIL;
+ }
+
+***************
+*** 2580,2586 ****
+ expr = skipwhite(expr);
+ if (expr[0] != 'i' || expr[1] != 'n' || !VIM_ISWHITE(expr[2]))
+ {
+! EMSG(_("E690: Missing \"in\" after :for"));
+ return fi;
+ }
+
+--- 2580,2586 ----
+ expr = skipwhite(expr);
+ if (expr[0] != 'i' || expr[1] != 'n' || !VIM_ISWHITE(expr[2]))
+ {
+! emsg(_("E690: Missing \"in\" after :for"));
+ return fi;
+ }
+
+***************
+*** 2623,2629 ****
+ }
+ else
+ {
+! EMSG(_(e_listreq));
+ clear_tv(&tv);
+ }
+ }
+--- 2623,2629 ----
+ }
+ else
+ {
+! emsg(_(e_listreq));
+ clear_tv(&tv);
+ }
+ }
+***************
+*** 2860,2866 ****
+
+ if (get_env_len(&arg) == 0)
+ {
+! EMSG2(_(e_invarg2), name - 1);
+ return;
+ }
+ vim_unsetenv(name);
+--- 2860,2866 ----
+
+ if (get_env_len(&arg) == 0)
+ {
+! semsg(_(e_invarg2), name - 1);
+ return;
+ }
+ vim_unsetenv(name);
+***************
+*** 2879,2885 ****
+ if (name_end != NULL)
+ {
+ emsg_severe = TRUE;
+! EMSG(_(e_trailing));
+ }
+ if (!(eap->skip || error))
+ clear_lval(&lv);
+--- 2879,2885 ----
+ if (name_end != NULL)
+ {
+ emsg_severe = TRUE;
+! emsg(_(e_trailing));
+ }
+ if (!(eap->skip || error))
+ clear_lval(&lv);
+***************
+*** 3022,3028 ****
+ }
+ if (forceit)
+ return OK;
+! EMSG2(_("E108: No such variable: \"%s\""), name);
+ return FAIL;
+ }
+
+--- 3022,3028 ----
+ }
+ if (forceit)
+ return OK;
+! semsg(_("E108: No such variable: \"%s\""), name);
+ return FAIL;
+ }
+
+***************
+*** 3059,3065 ****
+ && di->di_tv.v_type != VAR_LIST)
+ /* For historic reasons this error is not given for a list or dict.
+ * E.g., the b: dict could be locked/unlocked. */
+! EMSG2(_("E940: Cannot lock or unlock variable %s"), lp->ll_name);
+ else
+ {
+ if (lock)
+--- 3059,3065 ----
+ && di->di_tv.v_type != VAR_LIST)
+ /* For historic reasons this error is not given for a list or dict.
+ * E.g., the b: dict could be locked/unlocked. */
+! semsg(_("E940: Cannot lock or unlock variable %s"), lp->ll_name);
+ else
+ {
+ if (lock)
+***************
+*** 3108,3114 ****
+
+ if (recurse >= DICT_MAXNEST)
+ {
+! EMSG(_("E743: variable nested too deep for (un)lock"));
+ return;
+ }
+ if (deep == 0)
+--- 3108,3114 ----
+
+ if (recurse >= DICT_MAXNEST)
+ {
+! emsg(_("E743: variable nested too deep for (un)lock"));
+ return;
+ }
+ if (deep == 0)
+***************
+*** 3393,3399 ****
+ */
+ if (!aborting() && did_emsg == did_emsg_before
+ && called_emsg == called_emsg_before)
+! EMSG2(_(e_invexpr2), arg);
+ ret = FAIL;
+ }
+ if (nextcmd != NULL)
+--- 3393,3399 ----
+ */
+ if (!aborting() && did_emsg == did_emsg_before
+ && called_emsg == called_emsg_before)
+! semsg(_(e_invexpr2), arg);
+ ret = FAIL;
+ }
+ if (nextcmd != NULL)
+***************
+*** 3451,3457 ****
+ */
+ if ((*arg)[0] != ':')
+ {
+! EMSG(_("E109: Missing ':' after '?'"));
+ if (evaluate && result)
+ clear_tv(rettv);
+ return FAIL;
+--- 3451,3457 ----
+ */
+ if ((*arg)[0] != ':')
+ {
+! emsg(_("E109: Missing ':' after '?'"));
+ if (evaluate && result)
+ clear_tv(rettv);
+ return FAIL;
+***************
+*** 4058,4064 ****
+ }
+ else
+ {
+! EMSG(_("E804: Cannot use '%' with Float"));
+ return FAIL;
+ }
+ rettv->v_type = VAR_FLOAT;
+--- 4058,4064 ----
+ }
+ else
+ {
+! emsg(_("E804: Cannot use '%' with Float"));
+ return FAIL;
+ }
+ rettv->v_type = VAR_FLOAT;
+***************
+*** 4223,4229 ****
+ {
+ if (blob != NULL)
+ {
+! EMSG(_("E973: Blob literal should have an even number of hex characters"));
+ ga_clear(&blob->bv_ga);
+ VIM_CLEAR(blob);
+ }
+--- 4223,4229 ----
+ {
+ if (blob != NULL)
+ {
+! emsg(_("E973: Blob literal should have an even number of hex characters"));
+ ga_clear(&blob->bv_ga);
+ VIM_CLEAR(blob);
+ }
+***************
+*** 4314,4320 ****
+ ++*arg;
+ else if (ret == OK)
+ {
+! EMSG(_("E110: Missing ')'"));
+ clear_tv(rettv);
+ ret = FAIL;
+ }
+--- 4314,4320 ----
+ ++*arg;
+ else if (ret == OK)
+ {
+! emsg(_("E110: Missing ')'"));
+ clear_tv(rettv);
+ ret = FAIL;
+ }
+***************
+*** 4488,4506 ****
+ case VAR_FUNC:
+ case VAR_PARTIAL:
+ if (verbose)
+! EMSG(_("E695: Cannot index a Funcref"));
+ return FAIL;
+ case VAR_FLOAT:
+ #ifdef FEAT_FLOAT
+ if (verbose)
+! EMSG(_(e_float_as_string));
+ return FAIL;
+ #endif
+ case VAR_SPECIAL:
+ case VAR_JOB:
+ case VAR_CHANNEL:
+ if (verbose)
+! EMSG(_("E909: Cannot index a special variable"));
+ return FAIL;
+ case VAR_UNKNOWN:
+ if (evaluate)
+--- 4488,4506 ----
+ case VAR_FUNC:
+ case VAR_PARTIAL:
+ if (verbose)
+! emsg(_("E695: Cannot index a Funcref"));
+ return FAIL;
+ case VAR_FLOAT:
+ #ifdef FEAT_FLOAT
+ if (verbose)
+! emsg(_(e_float_as_string));
+ return FAIL;
+ #endif
+ case VAR_SPECIAL:
+ case VAR_JOB:
+ case VAR_CHANNEL:
+ if (verbose)
+! emsg(_("E909: Cannot index a special variable"));
+ return FAIL;
+ case VAR_UNKNOWN:
+ if (evaluate)
+***************
+*** 4577,4583 ****
+ if (**arg != ']')
+ {
+ if (verbose)
+! EMSG(_(e_missbrac));
+ clear_tv(&var1);
+ if (range)
+ clear_tv(&var2);
+--- 4577,4583 ----
+ if (**arg != ']')
+ {
+ if (verbose)
+! emsg(_(e_missbrac));
+ clear_tv(&var1);
+ if (range)
+ clear_tv(&var2);
+***************
+*** 4711,4717 ****
+ rettv->vval.v_number = v;
+ }
+ else
+! EMSGN(_(e_blobidx), n1);
+ }
+ break;
+
+--- 4711,4717 ----
+ rettv->vval.v_number = v;
+ }
+ else
+! semsg(_(e_blobidx), n1);
+ }
+ break;
+
+***************
+*** 4726,4732 ****
+ if (!range)
+ {
+ if (verbose)
+! EMSGN(_(e_listidx), n1);
+ return FAIL;
+ }
+ n1 = len;
+--- 4726,4732 ----
+ if (!range)
+ {
+ if (verbose)
+! semsg(_(e_listidx), n1);
+ return FAIL;
+ }
+ n1 = len;
+***************
+*** 4770,4776 ****
+ if (range)
+ {
+ if (verbose)
+! EMSG(_(e_dictrange));
+ if (len == -1)
+ clear_tv(&var1);
+ return FAIL;
+--- 4770,4776 ----
+ if (range)
+ {
+ if (verbose)
+! emsg(_(e_dictrange));
+ if (len == -1)
+ clear_tv(&var1);
+ return FAIL;
+***************
+*** 4791,4797 ****
+ item = dict_find(rettv->vval.v_dict, key, (int)len);
+
+ if (item == NULL && verbose)
+! EMSG2(_(e_dictkey), key);
+ if (len == -1)
+ clear_tv(&var1);
+ if (item == NULL)
+--- 4791,4797 ----
+ item = dict_find(rettv->vval.v_dict, key, (int)len);
+
+ if (item == NULL && verbose)
+! semsg(_(e_dictkey), key);
+ if (len == -1)
+ clear_tv(&var1);
+ if (item == NULL)
+***************
+*** 4836,4842 ****
+ if (option_end == NULL)
+ {
+ if (rettv != NULL)
+! EMSG2(_("E112: Option name missing: %s"), *arg);
+ return FAIL;
+ }
+
+--- 4836,4842 ----
+ if (option_end == NULL)
+ {
+ if (rettv != NULL)
+! semsg(_("E112: Option name missing: %s"), *arg);
+ return FAIL;
+ }
+
+***************
+*** 4854,4860 ****
+ if (opt_type == -3) /* invalid name */
+ {
+ if (rettv != NULL)
+! EMSG2(_("E113: Unknown option: %s"), *arg);
+ ret = FAIL;
+ }
+ else if (rettv != NULL)
+--- 4854,4860 ----
+ if (opt_type == -3) /* invalid name */
+ {
+ if (rettv != NULL)
+! semsg(_("E113: Unknown option: %s"), *arg);
+ ret = FAIL;
+ }
+ else if (rettv != NULL)
+***************
+*** 4917,4923 ****
+
+ if (*p != '"')
+ {
+! EMSG2(_("E114: Missing quote: %s"), *arg);
+ return FAIL;
+ }
+
+--- 4917,4923 ----
+
+ if (*p != '"')
+ {
+! semsg(_("E114: Missing quote: %s"), *arg);
+ return FAIL;
+ }
+
+***************
+*** 5054,5060 ****
+
+ if (*p != '\'')
+ {
+! EMSG2(_("E115: Missing quote: %s"), *arg);
+ return FAIL;
+ }
+
+--- 5054,5060 ----
+
+ if (*p != '\'')
+ {
+! semsg(_("E115: Missing quote: %s"), *arg);
+ return FAIL;
+ }
+
+***************
+*** 5798,5804 ****
+ * flooding the user with errors. And stop iterating over lists
+ * and dicts. */
+ did_echo_string_emsg = TRUE;
+! EMSG(_("E724: variable nested too deep for displaying"));
+ }
+ *tofree = NULL;
+ return (char_u *)"{E724}";
+--- 5798,5804 ----
+ * flooding the user with errors. And stop iterating over lists
+ * and dicts. */
+ did_echo_string_emsg = TRUE;
+! emsg(_("E724: variable nested too deep for displaying"));
+ }
+ *tofree = NULL;
+ return (char_u *)"{E724}";
+***************
+*** 6439,6445 ****
+ // Only give an error when there is something, otherwise it will be
+ // reported at a higher level.
+ if (len == 0 && verbose && **arg != NUL)
+! EMSG2(_(e_invexpr2), *arg);
+
+ return len;
+ }
+--- 6439,6445 ----
+ // Only give an error when there is something, otherwise it will be
+ // reported at a higher level.
+ if (len == 0 && verbose && **arg != NUL)
+! semsg(_(e_invexpr2), *arg);
+
+ return len;
+ }
+***************
+*** 6937,6943 ****
+ if (tv == NULL)
+ {
+ if (rettv != NULL && verbose)
+! EMSG2(_(e_undefvar), name);
+ ret = FAIL;
+ }
+ else if (rettv != NULL)
+--- 6937,6943 ----
+ if (tv == NULL)
+ {
+ if (rettv != NULL && verbose)
+! semsg(_(e_undefvar), name);
+ ret = FAIL;
+ }
+ else if (rettv != NULL)
+***************
+*** 7251,7262 ****
+ return varp->vval.v_number;
+ case VAR_FLOAT:
+ #ifdef FEAT_FLOAT
+! EMSG(_("E805: Using a Float as a Number"));
+ break;
+ #endif
+ case VAR_FUNC:
+ case VAR_PARTIAL:
+! EMSG(_("E703: Using a Funcref as a Number"));
+ break;
+ case VAR_STRING:
+ if (varp->vval.v_string != NULL)
+--- 7251,7262 ----
+ return varp->vval.v_number;
+ case VAR_FLOAT:
+ #ifdef FEAT_FLOAT
+! emsg(_("E805: Using a Float as a Number"));
+ break;
+ #endif
+ case VAR_FUNC:
+ case VAR_PARTIAL:
+! emsg(_("E703: Using a Funcref as a Number"));
+ break;
+ case VAR_STRING:
+ if (varp->vval.v_string != NULL)
+***************
+*** 7264,7289 ****
+ STR2NR_ALL, &n, NULL, 0);
+ return n;
+ case VAR_LIST:
+! EMSG(_("E745: Using a List as a Number"));
+ break;
+ case VAR_DICT:
+! EMSG(_("E728: Using a Dictionary as a Number"));
+ break;
+ case VAR_SPECIAL:
+ return varp->vval.v_number == VVAL_TRUE ? 1 : 0;
+ break;
+ case VAR_JOB:
+ #ifdef FEAT_JOB_CHANNEL
+! EMSG(_("E910: Using a Job as a Number"));
+ break;
+ #endif
+ case VAR_CHANNEL:
+ #ifdef FEAT_JOB_CHANNEL
+! EMSG(_("E913: Using a Channel as a Number"));
+ break;
+ #endif
+ case VAR_BLOB:
+! EMSG(_("E974: Using a Blob as a Number"));
+ break;
+ case VAR_UNKNOWN:
+ internal_error("tv_get_number(UNKNOWN)");
+--- 7264,7289 ----
+ STR2NR_ALL, &n, NULL, 0);
+ return n;
+ case VAR_LIST:
+! emsg(_("E745: Using a List as a Number"));
+ break;
+ case VAR_DICT:
+! emsg(_("E728: Using a Dictionary as a Number"));
+ break;
+ case VAR_SPECIAL:
+ return varp->vval.v_number == VVAL_TRUE ? 1 : 0;
+ break;
+ case VAR_JOB:
+ #ifdef FEAT_JOB_CHANNEL
+! emsg(_("E910: Using a Job as a Number"));
+ break;
+ #endif
+ case VAR_CHANNEL:
+ #ifdef FEAT_JOB_CHANNEL
+! emsg(_("E913: Using a Channel as a Number"));
+ break;
+ #endif
+ case VAR_BLOB:
+! emsg(_("E974: Using a Blob as a Number"));
+ break;
+ case VAR_UNKNOWN:
+ internal_error("tv_get_number(UNKNOWN)");
+***************
+*** 7308,7339 ****
+ return varp->vval.v_float;
+ case VAR_FUNC:
+ case VAR_PARTIAL:
+! EMSG(_("E891: Using a Funcref as a Float"));
+ break;
+ case VAR_STRING:
+! EMSG(_("E892: Using a String as a Float"));
+ break;
+ case VAR_LIST:
+! EMSG(_("E893: Using a List as a Float"));
+ break;
+ case VAR_DICT:
+! EMSG(_("E894: Using a Dictionary as a Float"));
+ break;
+ case VAR_SPECIAL:
+! EMSG(_("E907: Using a special value as a Float"));
+ break;
+ case VAR_JOB:
+ # ifdef FEAT_JOB_CHANNEL
+! EMSG(_("E911: Using a Job as a Float"));
+ break;
+ # endif
+ case VAR_CHANNEL:
+ # ifdef FEAT_JOB_CHANNEL
+! EMSG(_("E914: Using a Channel as a Float"));
+ break;
+ # endif
+ case VAR_BLOB:
+! EMSG(_("E975: Using a Blob as a Float"));
+ break;
+ case VAR_UNKNOWN:
+ internal_error("tv_get_float(UNKNOWN)");
+--- 7308,7339 ----
+ return varp->vval.v_float;
+ case VAR_FUNC:
+ case VAR_PARTIAL:
+! emsg(_("E891: Using a Funcref as a Float"));
+ break;
+ case VAR_STRING:
+! emsg(_("E892: Using a String as a Float"));
+ break;
+ case VAR_LIST:
+! emsg(_("E893: Using a List as a Float"));
+ break;
+ case VAR_DICT:
+! emsg(_("E894: Using a Dictionary as a Float"));
+ break;
+ case VAR_SPECIAL:
+! emsg(_("E907: Using a special value as a Float"));
+ break;
+ case VAR_JOB:
+ # ifdef FEAT_JOB_CHANNEL
+! emsg(_("E911: Using a Job as a Float"));
+ break;
+ # endif
+ case VAR_CHANNEL:
+ # ifdef FEAT_JOB_CHANNEL
+! emsg(_("E914: Using a Channel as a Float"));
+ break;
+ # endif
+ case VAR_BLOB:
+! emsg(_("E975: Using a Blob as a Float"));
+ break;
+ case VAR_UNKNOWN:
+ internal_error("tv_get_float(UNKNOWN)");
+***************
+*** 7391,7407 ****
+ return buf;
+ case VAR_FUNC:
+ case VAR_PARTIAL:
+! EMSG(_("E729: using Funcref as a String"));
+ break;
+ case VAR_LIST:
+! EMSG(_("E730: using List as a String"));
+ break;
+ case VAR_DICT:
+! EMSG(_("E731: using Dictionary as a String"));
+ break;
+ case VAR_FLOAT:
+ #ifdef FEAT_FLOAT
+! EMSG(_(e_float_as_string));
+ break;
+ #endif
+ case VAR_STRING:
+--- 7391,7407 ----
+ return buf;
+ case VAR_FUNC:
+ case VAR_PARTIAL:
+! emsg(_("E729: using Funcref as a String"));
+ break;
+ case VAR_LIST:
+! emsg(_("E730: using List as a String"));
+ break;
+ case VAR_DICT:
+! emsg(_("E731: using Dictionary as a String"));
+ break;
+ case VAR_FLOAT:
+ #ifdef FEAT_FLOAT
+! emsg(_(e_float_as_string));
+ break;
+ #endif
+ case VAR_STRING:
+***************
+*** 7412,7418 ****
+ STRCPY(buf, get_var_special_name(varp->vval.v_number));
+ return buf;
+ case VAR_BLOB:
+! EMSG(_("E976: using Blob as a String"));
+ break;
+ case VAR_JOB:
+ #ifdef FEAT_JOB_CHANNEL
+--- 7412,7418 ----
+ STRCPY(buf, get_var_special_name(varp->vval.v_number));
+ return buf;
+ case VAR_BLOB:
+! emsg(_("E976: using Blob as a String"));
+ break;
+ case VAR_JOB:
+ #ifdef FEAT_JOB_CHANNEL
+***************
+*** 7457,7463 ****
+ #endif
+ break;
+ case VAR_UNKNOWN:
+! EMSG(_("E908: using an invalid value as a String"));
+ break;
+ }
+ return NULL;
+--- 7457,7463 ----
+ #endif
+ break;
+ case VAR_UNKNOWN:
+! emsg(_("E908: using an invalid value as a String"));
+ break;
+ }
+ return NULL;
+***************
+*** 7839,7845 ****
+ ht = find_var_ht(name, &varname);
+ if (ht == NULL || *varname == NUL)
+ {
+! EMSG2(_(e_illvar), name);
+ return;
+ }
+ v = find_var_in_ht(ht, 0, varname, TRUE);
+--- 7839,7845 ----
+ ht = find_var_ht(name, &varname);
+ if (ht == NULL || *varname == NUL)
+ {
+! semsg(_(e_illvar), name);
+ return;
+ }
+ v = find_var_in_ht(ht, 0, varname, TRUE);
+***************
+*** 7894,7900 ****
+ }
+ else if (v->di_tv.v_type != tv->v_type)
+ {
+! EMSG2(_("E963: setting %s to value with wrong type"), name);
+ return;
+ }
+ }
+--- 7894,7900 ----
+ }
+ else if (v->di_tv.v_type != tv->v_type)
+ {
+! semsg(_("E963: setting %s to value with wrong type"), name);
+ return;
+ }
+ }
+***************
+*** 7906,7912 ****
+ /* Can't add "v:" variable. */
+ if (ht == &vimvarht)
+ {
+! EMSG2(_(e_illvar), name);
+ return;
+ }
+
+--- 7906,7912 ----
+ /* Can't add "v:" variable. */
+ if (ht == &vimvarht)
+ {
+! semsg(_(e_illvar), name);
+ return;
+ }
+
+***************
+*** 7946,7957 ****
+ {
+ if (flags & DI_FLAGS_RO)
+ {
+! EMSG2(_(e_readonlyvar), use_gettext ? (char_u *)_(name) : name);
+ return TRUE;
+ }
+ if ((flags & DI_FLAGS_RO_SBX) && sandbox)
+ {
+! EMSG2(_(e_readonlysbx), use_gettext ? (char_u *)_(name) : name);
+ return TRUE;
+ }
+ return FALSE;
+--- 7946,7957 ----
+ {
+ if (flags & DI_FLAGS_RO)
+ {
+! semsg(_(e_readonlyvar), use_gettext ? (char_u *)_(name) : name);
+ return TRUE;
+ }
+ if ((flags & DI_FLAGS_RO_SBX) && sandbox)
+ {
+! semsg(_(e_readonlysbx), use_gettext ? (char_u *)_(name) : name);
+ return TRUE;
+ }
+ return FALSE;
+***************
+*** 7966,7972 ****
+ {
+ if (flags & DI_FLAGS_FIX)
+ {
+! EMSG2(_("E795: Cannot delete variable %s"),
+ use_gettext ? (char_u *)_(name) : name);
+ return TRUE;
+ }
+--- 7966,7972 ----
+ {
+ if (flags & DI_FLAGS_FIX)
+ {
+! semsg(_("E795: Cannot delete variable %s"),
+ use_gettext ? (char_u *)_(name) : name);
+ return TRUE;
+ }
+***************
+*** 7987,7993 ****
+ && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':')
+ ? name[2] : name[0]))
+ {
+! EMSG2(_("E704: Funcref variable name must start with a capital: %s"),
+ name);
+ return TRUE;
+ }
+--- 7987,7993 ----
+ && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':')
+ ? name[2] : name[0]))
+ {
+! semsg(_("E704: Funcref variable name must start with a capital: %s"),
+ name);
+ return TRUE;
+ }
+***************
+*** 7996,8002 ****
+ * below. */
+ if (new_var && function_exists(name, FALSE))
+ {
+! EMSG2(_("E705: Variable name conflicts with existing function: %s"),
+ name);
+ return TRUE;
+ }
+--- 7996,8002 ----
+ * below. */
+ if (new_var && function_exists(name, FALSE))
+ {
+! semsg(_("E705: Variable name conflicts with existing function: %s"),
+ name);
+ return TRUE;
+ }
+***************
+*** 8016,8022 ****
+ if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p))
+ && *p != AUTOLOAD_CHAR)
+ {
+! EMSG2(_(e_illvar), varname);
+ return FALSE;
+ }
+ return TRUE;
+--- 8016,8022 ----
+ if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p))
+ && *p != AUTOLOAD_CHAR)
+ {
+! semsg(_(e_illvar), varname);
+ return FALSE;
+ }
+ return TRUE;
+***************
+*** 8032,8038 ****
+ {
+ if (lock & VAR_LOCKED)
+ {
+! EMSG2(_("E741: Value is locked: %s"),
+ name == NULL ? (char_u *)_("Unknown")
+ : use_gettext ? (char_u *)_(name)
+ : name);
+--- 8032,8038 ----
+ {
+ if (lock & VAR_LOCKED)
+ {
+! semsg(_("E741: Value is locked: %s"),
+ name == NULL ? (char_u *)_("Unknown")
+ : use_gettext ? (char_u *)_(name)
+ : name);
+***************
+*** 8040,8046 ****
+ }
+ if (lock & VAR_FIXED)
+ {
+! EMSG2(_("E742: Cannot change value of %s"),
+ name == NULL ? (char_u *)_("Unknown")
+ : use_gettext ? (char_u *)_(name)
+ : name);
+--- 8040,8046 ----
+ }
+ if (lock & VAR_FIXED)
+ {
+! semsg(_("E742: Cannot change value of %s"),
+ name == NULL ? (char_u *)_("Unknown")
+ : use_gettext ? (char_u *)_(name)
+ : name);
+***************
+*** 8158,8164 ****
+
+ if (recurse >= DICT_MAXNEST)
+ {
+! EMSG(_("E698: variable nested too deep for making a copy"));
+ return FAIL;
+ }
+ ++recurse;
+--- 8158,8164 ----
+
+ if (recurse >= DICT_MAXNEST)
+ {
+! emsg(_("E698: variable nested too deep for making a copy"));
+ return FAIL;
+ }
+ ++recurse;
+***************
+*** 8358,8364 ****
+ */
+ if (!aborting() && did_emsg == did_emsg_before
+ && called_emsg == called_emsg_before)
+! EMSG2(_(e_invexpr2), p);
+ need_clr_eos = FALSE;
+ break;
+ }
+--- 8358,8364 ----
+ */
+ if (!aborting() && did_emsg == did_emsg_before
+ && called_emsg == called_emsg_before)
+! semsg(_(e_invexpr2), p);
+ need_clr_eos = FALSE;
+ break;
+ }
+***************
+*** 8472,8478 ****
+ * exception.
+ */
+ if (!aborting() && did_emsg == save_did_emsg)
+! EMSG2(_(e_invexpr2), p);
+ ret = FAIL;
+ break;
+ }
+--- 8472,8478 ----
+ * exception.
+ */
+ if (!aborting() && did_emsg == save_did_emsg)
+! semsg(_(e_invexpr2), p);
+ ret = FAIL;
+ break;
+ }
+***************
+*** 8521,8527 ****
+ {
+ /* We don't want to abort following commands, restore did_emsg. */
+ save_did_emsg = did_emsg;
+! EMSG((char_u *)ga.ga_data);
+ if (!force_abort)
+ did_emsg = save_did_emsg;
+ }
+--- 8521,8527 ----
+ {
+ /* We don't want to abort following commands, restore did_emsg. */
+ save_did_emsg = did_emsg;
+! emsg(ga.ga_data);
+ if (!force_abort)
+ did_emsg = save_did_emsg;
+ }
+***************
+*** 9286,9292 ****
+ char_u *text = tv_get_string_buf_chk(&argvars[1], buf2);
+
+ if (pat == NULL || text == NULL)
+! EMSG(_(e_invarg));
+ else if (pattern_match(pat, text, FALSE) != (atype == ASSERT_MATCH))
+ {
+ prepare_assert_error(&ga);
+--- 9286,9292 ----
+ char_u *text = tv_get_string_buf_chk(&argvars[1], buf2);
+
+ if (pat == NULL || text == NULL)
+! emsg(_(e_invarg));
+ else if (pattern_match(pat, text, FALSE) != (atype == ASSERT_MATCH))
+ {
+ prepare_assert_error(&ga);
+***************
+*** 9602,9610 ****
+ || (type != TYPE_EQUAL && type != TYPE_NEQUAL))
+ {
+ if (typ1->v_type != typ2->v_type)
+! EMSG(_("E977: Can only compare Blob with Blob"));
+ else
+! EMSG(_(e_invalblob));
+ clear_tv(typ1);
+ return FAIL;
+ }
+--- 9602,9610 ----
+ || (type != TYPE_EQUAL && type != TYPE_NEQUAL))
+ {
+ if (typ1->v_type != typ2->v_type)
+! emsg(_("E977: Can only compare Blob with Blob"));
+ else
+! emsg(_(e_invalblob));
+ clear_tv(typ1);
+ return FAIL;
+ }
+***************
+*** 9629,9637 ****
+ || (type != TYPE_EQUAL && type != TYPE_NEQUAL))
+ {
+ if (typ1->v_type != typ2->v_type)
+! EMSG(_("E691: Can only compare List with List"));
+ else
+! EMSG(_("E692: Invalid operation for List"));
+ clear_tv(typ1);
+ return FAIL;
+ }
+--- 9629,9637 ----
+ || (type != TYPE_EQUAL && type != TYPE_NEQUAL))
+ {
+ if (typ1->v_type != typ2->v_type)
+! emsg(_("E691: Can only compare List with List"));
+ else
+! emsg(_("E692: Invalid operation for List"));
+ clear_tv(typ1);
+ return FAIL;
+ }
+***************
+*** 9658,9666 ****
+ || (type != TYPE_EQUAL && type != TYPE_NEQUAL))
+ {
+ if (typ1->v_type != typ2->v_type)
+! EMSG(_("E735: Can only compare Dictionary with Dictionary"));
+ else
+! EMSG(_("E736: Invalid operation for Dictionary"));
+ clear_tv(typ1);
+ return FAIL;
+ }
+--- 9658,9666 ----
+ || (type != TYPE_EQUAL && type != TYPE_NEQUAL))
+ {
+ if (typ1->v_type != typ2->v_type)
+! emsg(_("E735: Can only compare Dictionary with Dictionary"));
+ else
+! emsg(_("E736: Invalid operation for Dictionary"));
+ clear_tv(typ1);
+ return FAIL;
+ }
+***************
+*** 9679,9685 ****
+ {
+ if (type != TYPE_EQUAL && type != TYPE_NEQUAL)
+ {
+! EMSG(_("E694: Invalid operation for Funcrefs"));
+ clear_tv(typ1);
+ return FAIL;
+ }
+--- 9679,9685 ----
+ {
+ if (type != TYPE_EQUAL && type != TYPE_NEQUAL)
+ {
+! emsg(_("E694: Invalid operation for Funcrefs"));
+ clear_tv(typ1);
+ return FAIL;
+ }
+***************
+*** 10672,10678 ****
+ }
+ else
+ {
+! EMSG2(_(e_listdictarg), ermsg);
+ return;
+ }
+
+--- 10672,10678 ----
+ }
+ else
+ {
+! semsg(_(e_listdictarg), ermsg);
+ return;
+ }
+
+***************
+*** 10740,10746 ****
+ break;
+ if (tv.v_type != VAR_NUMBER)
+ {
+! EMSG(_(e_invalblob));
+ return;
+ }
+ tv.v_type = VAR_NUMBER;
+--- 10740,10746 ----
+ break;
+ if (tv.v_type != VAR_NUMBER)
+ {
+! emsg(_(e_invalblob));
+ return;
+ }
+ tv.v_type = VAR_NUMBER;
+*** ../vim-8.1.0742/src/evalfunc.c 2019-01-13 19:10:28.963419901 +0100
+--- src/evalfunc.c 2019-01-13 21:39:30.890113621 +0100
+***************
+*** 1188,1194 ****
+ *f = (float_T)argvars[0].vval.v_number;
+ return OK;
+ }
+! EMSG(_("E808: Number or Float required"));
+ return FAIL;
+ }
+
+--- 1188,1194 ----
+ *f = (float_T)argvars[0].vval.v_number;
+ return OK;
+ }
+! emsg(_("E808: Number or Float required"));
+ return FAIL;
+ }
+
+***************
+*** 1269,1275 ****
+ }
+ }
+ else
+! EMSG(_(e_listreq));
+ }
+
+ /*
+--- 1269,1275 ----
+ }
+ }
+ else
+! emsg(_(e_listreq));
+ }
+
+ /*
+***************
+*** 1954,1960 ****
+ buf = tv_get_buf(arg, FALSE);
+ --emsg_off;
+ if (buf == NULL)
+! EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(arg));
+ return buf;
+ }
+ #endif
+--- 1954,1960 ----
+ buf = tv_get_buf(arg, FALSE);
+ --emsg_off;
+ if (buf == NULL)
+! semsg(_("E158: Invalid buffer name: %s"), tv_get_string(arg));
+ return buf;
+ }
+ #endif
+***************
+*** 2130,2136 ****
+
+ if (argvars[1].v_type != VAR_LIST)
+ {
+! EMSG(_(e_listreq));
+ return;
+ }
+ if (argvars[1].vval.v_list == NULL)
+--- 2130,2136 ----
+
+ if (argvars[1].v_type != VAR_LIST)
+ {
+! emsg(_(e_listreq));
+ return;
+ }
+ if (argvars[1].vval.v_list == NULL)
+***************
+*** 2152,2158 ****
+ {
+ if (argvars[2].v_type != VAR_DICT)
+ {
+! EMSG(_(e_dictreq));
+ return;
+ }
+ selfdict = argvars[2].vval.v_dict;
+--- 2152,2158 ----
+ {
+ if (argvars[2].v_type != VAR_DICT)
+ {
+! emsg(_(e_dictreq));
+ return;
+ }
+ selfdict = argvars[2].vval.v_dict;
+***************
+*** 2563,2569 ****
+
+ if ((State & INSERT) == 0)
+ {
+! EMSG(_("E785: complete() can only be used in Insert mode"));
+ return;
+ }
+
+--- 2563,2569 ----
+
+ if ((State & INSERT) == 0)
+ {
+! emsg(_("E785: complete() can only be used in Insert mode"));
+ return;
+ }
+
+***************
+*** 2574,2580 ****
+
+ if (argvars[1].v_type != VAR_LIST || argvars[1].vval.v_list == NULL)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 2574,2580 ----
+
+ if (argvars[1].v_type != VAR_LIST || argvars[1].vval.v_list == NULL)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 2770,2776 ****
+ {
+ li = list_find(l, idx);
+ if (li == NULL)
+! EMSGN(_(e_listidx), idx);
+ }
+ }
+ if (error)
+--- 2770,2776 ----
+ {
+ li = list_find(l, idx);
+ if (li == NULL)
+! semsg(_(e_listidx), idx);
+ }
+ }
+ if (error)
+***************
+*** 2793,2799 ****
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+ if (argvars[3].v_type != VAR_UNKNOWN)
+! EMSG(_(e_invarg));
+ }
+
+ todo = error ? 0 : (int)d->dv_hashtab.ht_used;
+--- 2793,2799 ----
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+ if (argvars[3].v_type != VAR_UNKNOWN)
+! emsg(_(e_invarg));
+ }
+
+ todo = error ? 0 : (int)d->dv_hashtab.ht_used;
+***************
+*** 2809,2815 ****
+ }
+ }
+ else
+! EMSG2(_(e_listdictarg), "count()");
+ rettv->vval.v_number = n;
+ }
+
+--- 2809,2815 ----
+ }
+ }
+ else
+! semsg(_(e_listdictarg), "count()");
+ rettv->vval.v_number = n;
+ }
+
+***************
+*** 2864,2870 ****
+
+ if (list2fpos(argvars, &pos, NULL, &curswant) == FAIL)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+ line = pos.lnum;
+--- 2864,2870 ----
+
+ if (list2fpos(argvars, &pos, NULL, &curswant) == FAIL)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+ line = pos.lnum;
+***************
+*** 2925,2931 ****
+ rettv->vval.v_number = FAIL;
+ pid = (int)tv_get_number(&argvars[0]);
+ if (pid == 0)
+! EMSG(_(e_invarg));
+ else
+ {
+ HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
+--- 2925,2931 ----
+ rettv->vval.v_number = FAIL;
+ pid = (int)tv_get_number(&argvars[0]);
+ if (pid == 0)
+! emsg(_(e_invarg));
+ else
+ {
+ HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
+***************
+*** 2952,2958 ****
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ noref = (int)tv_get_number_chk(&argvars[1], NULL);
+ if (noref < 0 || noref > 1)
+! EMSG(_(e_invarg));
+ else
+ {
+ copyID = get_copyID();
+--- 2952,2958 ----
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ noref = (int)tv_get_number_chk(&argvars[1], NULL);
+ if (noref < 0 || noref > 1)
+! emsg(_(e_invarg));
+ else
+ {
+ copyID = get_copyID();
+***************
+*** 2977,2983 ****
+ name = tv_get_string(&argvars[0]);
+ if (name == NULL || *name == NUL)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 2977,2983 ----
+ name = tv_get_string(&argvars[0]);
+ if (name == NULL || *name == NUL)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 2996,3002 ****
+ /* delete a directory recursively */
+ rettv->vval.v_number = delete_recursive(name);
+ else
+! EMSG2(_(e_invexpr2), flags);
+ }
+
+ /*
+--- 2996,3002 ----
+ /* delete a directory recursively */
+ rettv->vval.v_number = delete_recursive(name);
+ else
+! semsg(_(e_invexpr2), flags);
+ }
+
+ /*
+***************
+*** 3255,3267 ****
+ if (s == NULL || eval1(&s, rettv, TRUE) == FAIL)
+ {
+ if (p != NULL && !aborting())
+! EMSG2(_(e_invexpr2), p);
+ need_clr_eos = FALSE;
+ rettv->v_type = VAR_NUMBER;
+ rettv->vval.v_number = 0;
+ }
+ else if (*s != NUL)
+! EMSG(_(e_trailing));
+ }
+
+ /*
+--- 3255,3267 ----
+ if (s == NULL || eval1(&s, rettv, TRUE) == FAIL)
+ {
+ if (p != NULL && !aborting())
+! semsg(_(e_invexpr2), p);
+ need_clr_eos = FALSE;
+ rettv->v_type = VAR_NUMBER;
+ rettv->vval.v_number = 0;
+ }
+ else if (*s != NUL)
+! emsg(_(e_trailing));
+ }
+
+ /*
+***************
+*** 3528,3534 ****
+ {
+ char_u *s;
+ int len;
+! char_u *errormsg;
+ int options = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND;
+ expand_T xpc;
+ int error = FALSE;
+--- 3528,3534 ----
+ {
+ char_u *s;
+ int len;
+! char *errormsg;
+ int options = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND;
+ expand_T xpc;
+ int error = FALSE;
+***************
+*** 3624,3630 ****
+ item = list_find(l1, before);
+ if (item == NULL)
+ {
+! EMSGN(_(e_listidx), before);
+ return;
+ }
+ }
+--- 3624,3630 ----
+ item = list_find(l1, before);
+ if (item == NULL)
+ {
+! semsg(_(e_listidx), before);
+ return;
+ }
+ }
+***************
+*** 3660,3666 ****
+ break;
+ if (i == 3)
+ {
+! EMSG2(_(e_invarg2), action);
+ return;
+ }
+ }
+--- 3660,3666 ----
+ break;
+ if (i == 3)
+ {
+! semsg(_(e_invarg2), action);
+ return;
+ }
+ }
+***************
+*** 3673,3679 ****
+ }
+ }
+ else
+! EMSG2(_(e_listdictarg), "extend()");
+ }
+
+ /*
+--- 3673,3679 ----
+ }
+ }
+ else
+! semsg(_(e_listdictarg), "extend()");
+ }
+
+ /*
+***************
+*** 4197,4208 ****
+
+ if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s))
+ || (is_funcref && trans_name == NULL))
+! EMSG2(_(e_invarg2), use_string ? tv_get_string(&argvars[0]) : s);
+ /* Don't check an autoload name for existence here. */
+ else if (trans_name != NULL && (is_funcref
+ ? find_func(trans_name) == NULL
+ : !translated_function_exists(trans_name)))
+! EMSG2(_("E700: Unknown function: %s"), s);
+ else
+ {
+ int dict_idx = 0;
+--- 4197,4208 ----
+
+ if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s))
+ || (is_funcref && trans_name == NULL))
+! semsg(_(e_invarg2), use_string ? tv_get_string(&argvars[0]) : s);
+ /* Don't check an autoload name for existence here. */
+ else if (trans_name != NULL && (is_funcref
+ ? find_func(trans_name) == NULL
+ : !translated_function_exists(trans_name)))
+! semsg(_("E700: Unknown function: %s"), s);
+ else
+ {
+ int dict_idx = 0;
+***************
+*** 4247,4253 ****
+ {
+ if (argvars[dict_idx].v_type != VAR_DICT)
+ {
+! EMSG(_("E922: expected a dict"));
+ vim_free(name);
+ goto theend;
+ }
+--- 4247,4253 ----
+ {
+ if (argvars[dict_idx].v_type != VAR_DICT)
+ {
+! emsg(_("E922: expected a dict"));
+ vim_free(name);
+ goto theend;
+ }
+***************
+*** 4258,4264 ****
+ {
+ if (argvars[arg_idx].v_type != VAR_LIST)
+ {
+! EMSG(_("E923: Second argument of function() must be a list or a dict"));
+ vim_free(name);
+ goto theend;
+ }
+--- 4258,4264 ----
+ {
+ if (argvars[arg_idx].v_type != VAR_LIST)
+ {
+! emsg(_("E923: Second argument of function() must be a list or a dict"));
+ vim_free(name);
+ goto theend;
+ }
+***************
+*** 4409,4415 ****
+ {
+ rettv->v_type = VAR_NUMBER;
+ if (idx >= blob_len(argvars[0].vval.v_blob))
+! EMSGN(_(e_blobidx), idx);
+ else
+ rettv->vval.v_number = blob_get(argvars[0].vval.v_blob, idx);
+ }
+--- 4409,4415 ----
+ {
+ rettv->v_type = VAR_NUMBER;
+ if (idx >= blob_len(argvars[0].vval.v_blob))
+! semsg(_(e_blobidx), idx);
+ else
+ rettv->vval.v_number = blob_get(argvars[0].vval.v_blob, idx);
+ }
+***************
+*** 4480,4491 ****
+ }
+ }
+ else
+! EMSG2(_(e_invarg2), what);
+ return;
+ }
+ }
+ else
+! EMSG2(_(e_listdictarg), "get()");
+
+ if (tv == NULL)
+ {
+--- 4480,4491 ----
+ }
+ }
+ else
+! semsg(_(e_invarg2), what);
+ return;
+ }
+ }
+ else
+! semsg(_(e_listdictarg), "get()");
+
+ if (tv == NULL)
+ {
+***************
+*** 5029,5037 ****
+ if (xpc.xp_context == EXPAND_NOTHING)
+ {
+ if (argvars[1].v_type == VAR_STRING)
+! EMSG2(_(e_invarg2), argvars[1].vval.v_string);
+ else
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 5029,5037 ----
+ if (xpc.xp_context == EXPAND_NOTHING)
+ {
+ if (argvars[1].v_type == VAR_STRING)
+! semsg(_(e_invarg2), argvars[1].vval.v_string);
+ else
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 5363,5369 ****
+ qf_get_properties(wp, d, rettv->vval.v_dict);
+ }
+ else
+! EMSG(_(e_dictreq));
+ }
+ }
+ }
+--- 5363,5369 ----
+ qf_get_properties(wp, d, rettv->vval.v_dict);
+ }
+ else
+! emsg(_(e_dictreq));
+ }
+ }
+ }
+***************
+*** 6765,6771 ****
+ {
+ if (argvars[0].v_type != VAR_DICT)
+ {
+! EMSG(_(e_dictreq));
+ return;
+ }
+ if (argvars[0].vval.v_dict == NULL)
+--- 6765,6771 ----
+ {
+ if (argvars[0].v_type != VAR_DICT)
+ {
+! emsg(_(e_dictreq));
+ return;
+ }
+ if (argvars[0].vval.v_dict == NULL)
+***************
+*** 7055,7061 ****
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+ {
+! EMSG(_(e_listreq));
+ return;
+ }
+
+--- 7055,7061 ----
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+ {
+! emsg(_(e_listreq));
+ return;
+ }
+
+***************
+*** 7155,7161 ****
+ #endif
+ if (argvars[0].v_type != VAR_LIST || argvars[0].vval.v_list == NULL)
+ {
+! EMSG2(_(e_listarg), "inputlist()");
+ return;
+ }
+
+--- 7155,7161 ----
+ #endif
+ if (argvars[0].v_type != VAR_LIST || argvars[0].vval.v_list == NULL)
+ {
+! semsg(_(e_listarg), "inputlist()");
+ return;
+ }
+
+***************
+*** 7256,7262 ****
+ return; // type error; errmsg already given
+ if (before < 0 || before > len)
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[2]));
+ return;
+ }
+ }
+--- 7256,7262 ----
+ return; // type error; errmsg already given
+ if (before < 0 || before > len)
+ {
+! semsg(_(e_invarg2), tv_get_string(&argvars[2]));
+ return;
+ }
+ }
+***************
+*** 7265,7271 ****
+ return;
+ if (val < 0 || val > 255)
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[1]));
+ return;
+ }
+
+--- 7265,7271 ----
+ return;
+ if (val < 0 || val > 255)
+ {
+! semsg(_(e_invarg2), tv_get_string(&argvars[1]));
+ return;
+ }
+
+***************
+*** 7279,7285 ****
+ copy_tv(&argvars[0], rettv);
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+! EMSG2(_(e_listarg), "insert()");
+ else if ((l = argvars[0].vval.v_list) != NULL && !tv_check_lock(l->lv_lock,
+ (char_u *)N_("insert() argument"), TRUE))
+ {
+--- 7279,7285 ----
+ copy_tv(&argvars[0], rettv);
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+! semsg(_(e_listarg), "insert()");
+ else if ((l = argvars[0].vval.v_list) != NULL && !tv_check_lock(l->lv_lock,
+ (char_u *)N_("insert() argument"), TRUE))
+ {
+***************
+*** 7295,7301 ****
+ item = list_find(l, before);
+ if (item == NULL)
+ {
+! EMSGN(_(e_listidx), before);
+ l = NULL;
+ }
+ }
+--- 7295,7301 ----
+ item = list_find(l, before);
+ if (item == NULL)
+ {
+! semsg(_(e_listidx), before);
+ l = NULL;
+ }
+ }
+***************
+*** 7357,7363 ****
+ if (end != NULL && lv.ll_name != NULL)
+ {
+ if (*end != NUL)
+! EMSG(_(e_trailing));
+ else
+ {
+ if (lv.ll_tv == NULL)
+--- 7357,7363 ----
+ if (end != NULL && lv.ll_name != NULL)
+ {
+ if (*end != NUL)
+! emsg(_(e_trailing));
+ else
+ {
+ if (lv.ll_tv == NULL)
+***************
+*** 7375,7383 ****
+ }
+ }
+ else if (lv.ll_range)
+! EMSG(_("E786: Range not allowed"));
+ else if (lv.ll_newkey != NULL)
+! EMSG2(_(e_dictkey), lv.ll_newkey);
+ else if (lv.ll_list != NULL)
+ /* List item. */
+ rettv->vval.v_number = tv_islocked(&lv.ll_li->li_tv);
+--- 7375,7383 ----
+ }
+ }
+ else if (lv.ll_range)
+! emsg(_("E786: Range not allowed"));
+ else if (lv.ll_newkey != NULL)
+! semsg(_(e_dictkey), lv.ll_newkey);
+ else if (lv.ll_list != NULL)
+ /* List item. */
+ rettv->vval.v_number = tv_islocked(&lv.ll_li->li_tv);
+***************
+*** 7423,7435 ****
+
+ if (tv->v_type != VAR_JOB)
+ {
+! EMSG2(_(e_invarg2), tv_get_string(tv));
+ return NULL;
+ }
+ job = tv->vval.v_job;
+
+ if (job == NULL)
+! EMSG(_("E916: not a valid job"));
+ return job;
+ }
+
+--- 7423,7435 ----
+
+ if (tv->v_type != VAR_JOB)
+ {
+! semsg(_(e_invarg2), tv_get_string(tv));
+ return NULL;
+ }
+ job = tv->vval.v_job;
+
+ if (job == NULL)
+! emsg(_("E916: not a valid job"));
+ return job;
+ }
+
+***************
+*** 7535,7541 ****
+
+ if (argvars[0].v_type != VAR_LIST)
+ {
+! EMSG(_(e_listreq));
+ return;
+ }
+ if (argvars[0].vval.v_list == NULL)
+--- 7535,7541 ----
+
+ if (argvars[0].v_type != VAR_LIST)
+ {
+! emsg(_(e_listreq));
+ return;
+ }
+ if (argvars[0].vval.v_list == NULL)
+***************
+*** 7570,7576 ****
+ reader.js_fill = NULL;
+ reader.js_used = 0;
+ if (json_decode_all(&reader, rettv, JSON_JS) != OK)
+! EMSG(_(e_invarg));
+ }
+
+ /*
+--- 7570,7576 ----
+ reader.js_fill = NULL;
+ reader.js_used = 0;
+ if (json_decode_all(&reader, rettv, JSON_JS) != OK)
+! emsg(_(e_invarg));
+ }
+
+ /*
+***************
+*** 7661,7667 ****
+ case VAR_PARTIAL:
+ case VAR_JOB:
+ case VAR_CHANNEL:
+! EMSG(_("E701: Invalid type for len()"));
+ break;
+ }
+ }
+--- 7661,7667 ----
+ case VAR_PARTIAL:
+ case VAR_JOB:
+ case VAR_CHANNEL:
+! emsg(_("E701: Invalid type for len()"));
+ break;
+ }
+ }
+***************
+*** 8199,8205 ****
+
+ if (tv->v_type != VAR_DICT)
+ {
+! EMSG(_(e_dictreq));
+ return FAIL;
+ }
+
+--- 8199,8205 ----
+
+ if (tv->v_type != VAR_DICT)
+ {
+! emsg(_(e_dictreq));
+ return FAIL;
+ }
+
+***************
+*** 8212,8218 ****
+ *win = find_win_by_nr_or_id(&di->di_tv);
+ if (*win == NULL)
+ {
+! EMSG(_("E957: Invalid window number"));
+ return FAIL;
+ }
+ }
+--- 8212,8218 ----
+ *win = find_win_by_nr_or_id(&di->di_tv);
+ if (*win == NULL)
+ {
+! emsg(_("E957: Invalid window number"));
+ return FAIL;
+ }
+ }
+***************
+*** 8256,8262 ****
+ return;
+ if (id >= 1 && id <= 3)
+ {
+! EMSGN(_("E798: ID is reserved for \":match\": %ld"), id);
+ return;
+ }
+
+--- 8256,8262 ----
+ return;
+ if (id >= 1 && id <= 3)
+ {
+! semsg(_("E798: ID is reserved for \":match\": %ld"), id);
+ return;
+ }
+
+***************
+*** 8289,8295 ****
+
+ if (argvars[1].v_type != VAR_LIST)
+ {
+! EMSG2(_(e_listarg), "matchaddpos()");
+ return;
+ }
+ l = argvars[1].vval.v_list;
+--- 8289,8295 ----
+
+ if (argvars[1].v_type != VAR_LIST)
+ {
+! semsg(_(e_listarg), "matchaddpos()");
+ return;
+ }
+ l = argvars[1].vval.v_list;
+***************
+*** 8314,8320 ****
+ /* id == 3 is ok because matchaddpos() is supposed to substitute :3match */
+ if (id == 1 || id == 2)
+ {
+! EMSGN(_("E798: ID is reserved for \":match\": %ld"), id);
+ return;
+ }
+
+--- 8314,8320 ----
+ /* id == 3 is ok because matchaddpos() is supposed to substitute :3match */
+ if (id == 1 || id == 2)
+ {
+! semsg(_("E798: ID is reserved for \":match\": %ld"), id);
+ return;
+ }
+
+***************
+*** 8461,8467 ****
+ }
+ }
+ else
+! EMSG2(_(e_listdictarg), domax ? "max()" : "min()");
+ rettv->vval.v_number = error ? 0 : n;
+ }
+
+--- 8461,8467 ----
+ }
+ }
+ else
+! semsg(_(e_listdictarg), domax ? "max()" : "min()");
+ rettv->vval.v_number = error ? 0 : n;
+ }
+
+***************
+*** 9027,9035 ****
+ if (error)
+ return; /* type error; errmsg already given */
+ if (stride == 0)
+! EMSG(_("E726: Stride is zero"));
+ else if (stride > 0 ? end + 1 < start : end - 1 > start)
+! EMSG(_("E727: Start past end"));
+ else
+ {
+ if (rettv_list_alloc(rettv) == OK)
+--- 9027,9035 ----
+ if (error)
+ return; /* type error; errmsg already given */
+ if (stride == 0)
+! emsg(_("E726: Stride is zero"));
+ else if (stride > 0 ? end + 1 < start : end - 1 > start)
+! emsg(_("E727: Start past end"));
+ else
+ {
+ if (rettv_list_alloc(rettv) == OK)
+***************
+*** 9089,9095 ****
+ fname = tv_get_string(&argvars[0]);
+ if (*fname == NUL || (fd = mch_fopen((char *)fname, READBIN)) == NULL)
+ {
+! EMSG2(_(e_notopen), *fname == NUL ? (char_u *)_("<empty>") : fname);
+ return;
+ }
+
+--- 9089,9095 ----
+ fname = tv_get_string(&argvars[0]);
+ if (*fname == NUL || (fd = mch_fopen((char *)fname, READBIN)) == NULL)
+ {
+! semsg(_(e_notopen), *fname == NUL ? (char_u *)_("<empty>") : fname);
+ return;
+ }
+
+***************
+*** 9097,9103 ****
+ {
+ if (read_blob(fd, rettv->vval.v_blob) == FAIL)
+ {
+! EMSG("cannot read file");
+ blob_free(rettv->vval.v_blob);
+ }
+ fclose(fd);
+--- 9097,9103 ----
+ {
+ if (read_blob(fd, rettv->vval.v_blob) == FAIL)
+ {
+! emsg("cannot read file");
+ blob_free(rettv->vval.v_blob);
+ }
+ fclose(fd);
+***************
+*** 9437,9443 ****
+ make_connection();
+ if (X_DISPLAY == NULL)
+ {
+! EMSG(_("E240: No connection to the X server"));
+ return FAIL;
+ }
+ return OK;
+--- 9437,9443 ----
+ make_connection();
+ if (X_DISPLAY == NULL)
+ {
+! emsg(_("E240: No connection to the X server"));
+ return FAIL;
+ }
+ return OK;
+***************
+*** 9483,9493 ****
+ {
+ if (r != NULL)
+ {
+! EMSG(r); /* sending worked but evaluation failed */
+ vim_free(r);
+ }
+ else
+! EMSG2(_("E241: Unable to send to %s"), server_name);
+ return;
+ }
+
+--- 9483,9493 ----
+ {
+ if (r != NULL)
+ {
+! emsg((char *)r); // sending worked but evaluation failed
+ vim_free(r);
+ }
+ else
+! semsg(_("E241: Unable to send to %s"), server_name);
+ return;
+ }
+
+***************
+*** 9637,9643 ****
+ || serverReadReply(X_DISPLAY, serverStrToWin(serverid),
+ &r, FALSE, timeout) < 0)
+ # endif
+! EMSG(_("E277: Unable to read a server reply"));
+ }
+ #endif
+ rettv->v_type = VAR_STRING;
+--- 9637,9643 ----
+ || serverReadReply(X_DISPLAY, serverStrToWin(serverid),
+ &r, FALSE, timeout) < 0)
+ # endif
+! emsg(_("E277: Unable to read a server reply"));
+ }
+ #endif
+ rettv->v_type = VAR_STRING;
+***************
+*** 9669,9675 ****
+ if (server == NULL)
+ return; /* type error; errmsg already given */
+ if (serverName != NULL)
+! EMSG(_("E941: already started a server"));
+ else
+ {
+ # ifdef FEAT_X11
+--- 9669,9675 ----
+ if (server == NULL)
+ return; /* type error; errmsg already given */
+ if (serverName != NULL)
+! emsg(_("E941: already started a server"));
+ else
+ {
+ # ifdef FEAT_X11
+***************
+*** 9680,9686 ****
+ # endif
+ }
+ #else
+! EMSG(_("E942: +clientserver feature not available"));
+ #endif
+ }
+
+--- 9680,9686 ----
+ # endif
+ }
+ #else
+! emsg(_("E942: +clientserver feature not available"));
+ #endif
+ }
+
+***************
+*** 9704,9710 ****
+ if (argvars[0].v_type == VAR_DICT)
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! EMSG2(_(e_toomanyarg), "remove()");
+ else if ((d = argvars[0].vval.v_dict) != NULL
+ && !tv_check_lock(d->dv_lock, arg_errmsg, TRUE))
+ {
+--- 9704,9710 ----
+ if (argvars[0].v_type == VAR_DICT)
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+! semsg(_(e_toomanyarg), "remove()");
+ else if ((d = argvars[0].vval.v_dict) != NULL
+ && !tv_check_lock(d->dv_lock, arg_errmsg, TRUE))
+ {
+***************
+*** 9713,9719 ****
+ {
+ di = dict_find(d, key, -1);
+ if (di == NULL)
+! EMSG2(_(e_dictkey), key);
+ else if (!var_check_fixed(di->di_flags, arg_errmsg, TRUE)
+ && !var_check_ro(di->di_flags, arg_errmsg, TRUE))
+ {
+--- 9713,9719 ----
+ {
+ di = dict_find(d, key, -1);
+ if (di == NULL)
+! semsg(_(e_dictkey), key);
+ else if (!var_check_fixed(di->di_flags, arg_errmsg, TRUE)
+ && !var_check_ro(di->di_flags, arg_errmsg, TRUE))
+ {
+***************
+*** 9738,9744 ****
+ idx = len + idx;
+ if (idx < 0 || idx >= len)
+ {
+! EMSGN(_(e_blobidx), idx);
+ return;
+ }
+ if (argvars[2].v_type == VAR_UNKNOWN)
+--- 9738,9744 ----
+ idx = len + idx;
+ if (idx < 0 || idx >= len)
+ {
+! semsg(_(e_blobidx), idx);
+ return;
+ }
+ if (argvars[2].v_type == VAR_UNKNOWN)
+***************
+*** 9762,9768 ****
+ end = len + end;
+ if (end >= len || idx > end)
+ {
+! EMSGN(_(e_blobidx), end);
+ return;
+ }
+ blob = blob_alloc();
+--- 9762,9768 ----
+ end = len + end;
+ if (end >= len || idx > end)
+ {
+! semsg(_(e_blobidx), end);
+ return;
+ }
+ blob = blob_alloc();
+***************
+*** 9787,9793 ****
+ }
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+! EMSG2(_(e_listdictarg), "remove()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+ && !tv_check_lock(l->lv_lock, arg_errmsg, TRUE))
+ {
+--- 9787,9793 ----
+ }
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+! semsg(_(e_listdictarg), "remove()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+ && !tv_check_lock(l->lv_lock, arg_errmsg, TRUE))
+ {
+***************
+*** 9795,9801 ****
+ if (error)
+ ; // type error: do nothing, errmsg already given
+ else if ((item = list_find(l, idx)) == NULL)
+! EMSGN(_(e_listidx), idx);
+ else
+ {
+ if (argvars[2].v_type == VAR_UNKNOWN)
+--- 9795,9801 ----
+ if (error)
+ ; // type error: do nothing, errmsg already given
+ else if ((item = list_find(l, idx)) == NULL)
+! semsg(_(e_listidx), idx);
+ else
+ {
+ if (argvars[2].v_type == VAR_UNKNOWN)
+***************
+*** 9812,9818 ****
+ if (error)
+ ; // type error: do nothing
+ else if ((item2 = list_find(l, end)) == NULL)
+! EMSGN(_(e_listidx), end);
+ else
+ {
+ int cnt = 0;
+--- 9812,9818 ----
+ if (error)
+ ; // type error: do nothing
+ else if ((item2 = list_find(l, end)) == NULL)
+! semsg(_(e_listidx), end);
+ else
+ {
+ int cnt = 0;
+***************
+*** 9824,9830 ****
+ break;
+ }
+ if (li == NULL) /* didn't find "item2" after "item" */
+! EMSG(_(e_invrange));
+ else
+ {
+ vimlist_remove(l, item, item2);
+--- 9824,9830 ----
+ break;
+ }
+ if (li == NULL) /* didn't find "item2" after "item" */
+! emsg(_(e_invrange));
+ else
+ {
+ vimlist_remove(l, item, item2);
+***************
+*** 9976,9982 ****
+ {
+ vim_free(p);
+ vim_free(remain);
+! EMSG(_("E655: Too many symbolic links (cycle?)"));
+ rettv->vval.v_string = NULL;
+ goto fail;
+ }
+--- 9976,9982 ----
+ {
+ vim_free(p);
+ vim_free(remain);
+! emsg(_("E655: Too many symbolic links (cycle?)"));
+ rettv->vval.v_string = NULL;
+ goto fail;
+ }
+***************
+*** 10134,10140 ****
+ }
+
+ if (argvars[0].v_type != VAR_LIST)
+! EMSG2(_(e_listarg), "reverse()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+ && !tv_check_lock(l->lv_lock,
+ (char_u *)N_("reverse() argument"), TRUE))
+--- 10134,10140 ----
+ }
+
+ if (argvars[0].v_type != VAR_LIST)
+! semsg(_(e_listarg), "reverse()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+ && !tv_check_lock(l->lv_lock,
+ (char_u *)N_("reverse() argument"), TRUE))
+***************
+*** 10202,10208 ****
+ }
+ if (mask == 0)
+ {
+! EMSG2(_(e_invarg2), flags);
+ dir = 0;
+ }
+ else
+--- 10202,10208 ----
+ }
+ if (mask == 0)
+ {
+! semsg(_(e_invarg2), flags);
+ dir = 0;
+ }
+ else
+***************
+*** 10279,10285 ****
+ if (((flags & (SP_REPEAT | SP_RETCOUNT)) != 0)
+ || ((flags & SP_NOMOVE) && (flags & SP_SETPCMARK)))
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[1]));
+ goto theend;
+ }
+
+--- 10279,10285 ----
+ if (((flags & (SP_REPEAT | SP_RETCOUNT)) != 0)
+ || ((flags & SP_NOMOVE) && (flags & SP_SETPCMARK)))
+ {
+! semsg(_(e_invarg2), tv_get_string(&argvars[1]));
+ goto theend;
+ }
+
+***************
+*** 10485,10491 ****
+ if ((flags & (SP_END | SP_SUBPAT)) != 0
+ || ((flags & SP_NOMOVE) && (flags & SP_SETPCMARK)))
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[3]));
+ goto theend;
+ }
+
+--- 10485,10491 ----
+ if ((flags & (SP_END | SP_SUBPAT)) != 0
+ || ((flags & SP_NOMOVE) && (flags & SP_SETPCMARK)))
+ {
+! semsg(_(e_invarg2), tv_get_string(&argvars[3]));
+ goto theend;
+ }
+
+***************
+*** 10504,10510 ****
+ && skip->v_type != VAR_STRING)
+ {
+ /* Type error */
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[4]));
+ goto theend;
+ }
+ if (argvars[5].v_type != VAR_UNKNOWN)
+--- 10504,10510 ----
+ && skip->v_type != VAR_STRING)
+ {
+ /* Type error */
+! semsg(_(e_invarg2), tv_get_string(&argvars[4]));
+ goto theend;
+ }
+ if (argvars[5].v_type != VAR_UNKNOWN)
+***************
+*** 10512,10518 ****
+ lnum_stop = (long)tv_get_number_chk(&argvars[5], NULL);
+ if (lnum_stop < 0)
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[5]));
+ goto theend;
+ }
+ #ifdef FEAT_RELTIME
+--- 10512,10518 ----
+ lnum_stop = (long)tv_get_number_chk(&argvars[5], NULL);
+ if (lnum_stop < 0)
+ {
+! semsg(_(e_invarg2), tv_get_string(&argvars[5]));
+ goto theend;
+ }
+ #ifdef FEAT_RELTIME
+***************
+*** 10521,10527 ****
+ time_limit = (long)tv_get_number_chk(&argvars[6], NULL);
+ if (time_limit < 0)
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[6]));
+ goto theend;
+ }
+ }
+--- 10521,10527 ----
+ time_limit = (long)tv_get_number_chk(&argvars[6], NULL);
+ if (time_limit < 0)
+ {
+! semsg(_(e_invarg2), tv_get_string(&argvars[6]));
+ goto theend;
+ }
+ }
+***************
+*** 10786,10792 ****
+
+ if (serverSendReply(server, reply) < 0)
+ {
+! EMSG(_("E258: Unable to send to client"));
+ return;
+ }
+ rettv->vval.v_number = 0;
+--- 10786,10792 ----
+
+ if (serverSendReply(server, reply) < 0)
+ {
+! emsg(_("E258: Unable to send to client"));
+ return;
+ }
+ rettv->vval.v_number = 0;
+***************
+*** 10898,10904 ****
+
+ if (argvars[0].v_type != VAR_DICT)
+ {
+! EMSG(_(e_dictreq));
+ return;
+ }
+
+--- 10898,10904 ----
+
+ if (argvars[0].v_type != VAR_DICT)
+ {
+! emsg(_(e_dictreq));
+ return;
+ }
+
+***************
+*** 10966,10972 ****
+ return;
+ if (STRLEN(mode_str) != 9)
+ {
+! EMSG2(_(e_invarg2), mode_str);
+ return;
+ }
+
+--- 10966,10972 ----
+ return;
+ if (STRLEN(mode_str) != 9)
+ {
+! semsg(_(e_invarg2), mode_str);
+ return;
+ }
+
+***************
+*** 11013,11021 ****
+
+ #ifdef FEAT_QUICKFIX
+ if (list_arg->v_type != VAR_LIST)
+! EMSG(_(e_listreq));
+ else if (recursive != 0)
+! EMSG(_(e_au_recursive));
+ else
+ {
+ list_T *l = list_arg->vval.v_list;
+--- 11013,11021 ----
+
+ #ifdef FEAT_QUICKFIX
+ if (list_arg->v_type != VAR_LIST)
+! emsg(_(e_listreq));
+ else if (recursive != 0)
+! emsg(_(e_au_recursive));
+ else
+ {
+ list_T *l = list_arg->vval.v_list;
+***************
+*** 11031,11042 ****
+ act[1] == NUL)
+ action = *act;
+ else
+! EMSG2(_(e_invact), act);
+ }
+ else if (action_arg->v_type == VAR_UNKNOWN)
+ action = ' ';
+ else
+! EMSG(_(e_stringreq));
+
+ if (action_arg->v_type != VAR_UNKNOWN
+ && what_arg->v_type != VAR_UNKNOWN)
+--- 11031,11042 ----
+ act[1] == NUL)
+ action = *act;
+ else
+! semsg(_(e_invact), act);
+ }
+ else if (action_arg->v_type == VAR_UNKNOWN)
+ action = ' ';
+ else
+! emsg(_(e_stringreq));
+
+ if (action_arg->v_type != VAR_UNKNOWN
+ && what_arg->v_type != VAR_UNKNOWN)
+***************
+*** 11045,11051 ****
+ d = what_arg->vval.v_dict;
+ else
+ {
+! EMSG(_(e_dictreq));
+ valid_dict = FALSE;
+ }
+ }
+--- 11045,11051 ----
+ d = what_arg->vval.v_dict;
+ else
+ {
+! emsg(_(e_dictreq));
+ valid_dict = FALSE;
+ }
+ }
+***************
+*** 11090,11096 ****
+ rettv->vval.v_number = -1;
+ if (argvars[0].v_type != VAR_LIST)
+ {
+! EMSG(_(e_listreq));
+ return;
+ }
+ if ((l = argvars[0].vval.v_list) != NULL)
+--- 11090,11096 ----
+ rettv->vval.v_number = -1;
+ if (argvars[0].v_type != VAR_LIST)
+ {
+! emsg(_(e_listreq));
+ return;
+ }
+ if ((l = argvars[0].vval.v_list) != NULL)
+***************
+*** 11104,11110 ****
+ if (li->li_tv.v_type != VAR_DICT
+ || (d = li->li_tv.vval.v_dict) == NULL)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+ if (!(dict_find(d, (char_u *)"group", -1) != NULL
+--- 11104,11110 ----
+ if (li->li_tv.v_type != VAR_DICT
+ || (d = li->li_tv.vval.v_dict) == NULL)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+ if (!(dict_find(d, (char_u *)"group", -1) != NULL
+***************
+*** 11113,11119 ****
+ && dict_find(d, (char_u *)"priority", -1) != NULL
+ && dict_find(d, (char_u *)"id", -1) != NULL))
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+ li = li->li_next;
+--- 11113,11119 ----
+ && dict_find(d, (char_u *)"priority", -1) != NULL
+ && dict_find(d, (char_u *)"id", -1) != NULL))
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+ li = li->li_next;
+***************
+*** 11224,11230 ****
+ rettv->vval.v_number = 0;
+ }
+ else
+! EMSG(_(e_invarg));
+ }
+ }
+ }
+--- 11224,11230 ----
+ rettv->vval.v_number = 0;
+ }
+ else
+! emsg(_(e_invarg));
+ }
+ }
+ }
+***************
+*** 11424,11430 ****
+ // 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;
+--- 11424,11430 ----
+ // 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;
+***************
+*** 11445,11457 ****
+ action = *actstr;
+ else
+ {
+! EMSG2(_(e_invact2), actstr);
+ return;
+ }
+ }
+ else
+ {
+! EMSG(_(e_stringreq));
+ return;
+ }
+
+--- 11445,11457 ----
+ action = *actstr;
+ else
+ {
+! semsg(_(e_invact2), actstr);
+ return;
+ }
+ }
+ else
+ {
+! emsg(_(e_stringreq));
+ return;
+ }
+
+***************
+*** 11545,11551 ****
+ {
+ if (argvars[1].v_type != VAR_DICT)
+ {
+! EMSG(_(e_dictreq));
+ return;
+ }
+
+--- 11545,11551 ----
+ {
+ if (argvars[1].v_type != VAR_DICT)
+ {
+! emsg(_(e_dictreq));
+ return;
+ }
+
+***************
+*** 11616,11622 ****
+ if (argvars[1].v_type != VAR_DICT ||
+ ((dict = argvars[1].vval.v_dict) == NULL))
+ {
+! EMSG(_(e_dictreq));
+ return;
+ }
+ if ((di = dict_find(dict, (char_u *)"lnum", -1)) != NULL)
+--- 11616,11622 ----
+ if (argvars[1].v_type != VAR_DICT ||
+ ((dict = argvars[1].vval.v_dict) == NULL))
+ {
+! emsg(_(e_dictreq));
+ return;
+ }
+ if ((di = dict_find(dict, (char_u *)"lnum", -1)) != NULL)
+***************
+*** 11667,11673 ****
+ return;
+ if (sign_id <= 0)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 11667,11673 ----
+ return;
+ if (sign_id <= 0)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 11719,11725 ****
+ return;
+ if (sign_id < 0)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 11719,11725 ----
+ return;
+ if (sign_id < 0)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 11751,11757 ****
+ if (argvars[4].v_type != VAR_DICT ||
+ ((dict = argvars[4].vval.v_dict) == NULL))
+ {
+! EMSG(_(e_dictreq));
+ goto cleanup;
+ }
+
+--- 11751,11757 ----
+ if (argvars[4].v_type != VAR_DICT ||
+ ((dict = argvars[4].vval.v_dict) == NULL))
+ {
+! emsg(_(e_dictreq));
+ goto cleanup;
+ }
+
+***************
+*** 11823,11829 ****
+
+ if (argvars[0].v_type != VAR_STRING)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 11823,11829 ----
+
+ if (argvars[0].v_type != VAR_STRING)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 11841,11847 ****
+ {
+ if (argvars[1].v_type != VAR_DICT)
+ {
+! EMSG(_(e_dictreq));
+ goto cleanup;
+ }
+ dict = argvars[1].vval.v_dict;
+--- 11841,11847 ----
+ {
+ if (argvars[1].v_type != VAR_DICT)
+ {
+! emsg(_(e_dictreq));
+ goto cleanup;
+ }
+ dict = argvars[1].vval.v_dict;
+***************
+*** 12120,12126 ****
+ sortinfo = &info;
+
+ if (argvars[0].v_type != VAR_LIST)
+! EMSG2(_(e_listarg), sort ? "sort()" : "uniq()");
+ else
+ {
+ l = argvars[0].vval.v_list;
+--- 12120,12126 ----
+ sortinfo = &info;
+
+ if (argvars[0].v_type != VAR_LIST)
+! semsg(_(e_listarg), sort ? "sort()" : "uniq()");
+ else
+ {
+ l = argvars[0].vval.v_list;
+***************
+*** 12163,12169 ****
+ info.item_compare_func = tv_get_string(&argvars[1]);
+ else if (i != 0)
+ {
+! EMSG(_(e_invarg));
+ goto theend;
+ }
+ if (info.item_compare_func != NULL)
+--- 12163,12169 ----
+ info.item_compare_func = tv_get_string(&argvars[1]);
+ else if (i != 0)
+ {
+! emsg(_(e_invarg));
+ goto theend;
+ }
+ if (info.item_compare_func != NULL)
+***************
+*** 12203,12209 ****
+ /* optional third argument: {dict} */
+ if (argvars[2].v_type != VAR_DICT)
+ {
+! EMSG(_(e_dictreq));
+ goto theend;
+ }
+ info.item_compare_selfdict = argvars[2].vval.v_dict;
+--- 12203,12209 ----
+ /* optional third argument: {dict} */
+ if (argvars[2].v_type != VAR_DICT)
+ {
+! emsg(_(e_dictreq));
+ goto theend;
+ }
+ info.item_compare_selfdict = argvars[2].vval.v_dict;
+***************
+*** 12233,12239 ****
+ || info.item_compare_partial != NULL)
+ && item_compare2((void *)&ptrs[0], (void *)&ptrs[1])
+ == ITEM_COMPARE_FAIL)
+! EMSG(_("E702: Sort compare function failed"));
+ else
+ {
+ /* Sort the array with item pointers. */
+--- 12233,12239 ----
+ || info.item_compare_partial != NULL)
+ && item_compare2((void *)&ptrs[0], (void *)&ptrs[1])
+ == ITEM_COMPARE_FAIL)
+! emsg(_("E702: Sort compare function failed"));
+ else
+ {
+ /* Sort the array with item pointers. */
+***************
+*** 12271,12277 ****
+ ptrs[i++].item = li;
+ if (info.item_compare_func_err)
+ {
+! EMSG(_("E882: Uniq compare function failed"));
+ break;
+ }
+ }
+--- 12271,12277 ----
+ ptrs[i++].item = li;
+ if (info.item_compare_func_err)
+ {
+! emsg(_("E882: Uniq compare function failed"));
+ break;
+ }
+ }
+***************
+*** 12580,12586 ****
+ base = (int)tv_get_number(&argvars[1]);
+ if (base != 2 && base != 8 && base != 10 && base != 16)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+ }
+--- 12580,12586 ----
+ base = (int)tv_get_number(&argvars[1]);
+ if (base != 2 && base != 8 && base != 10 && base != 16)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+ }
+***************
+*** 12782,12788 ****
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ skipcc = (int)tv_get_number_chk(&argvars[1], NULL);
+ if (skipcc < 0 || skipcc > 1)
+! EMSG(_(e_invarg));
+ else
+ {
+ #ifdef FEAT_MBYTE
+--- 12782,12788 ----
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ skipcc = (int)tv_get_number_chk(&argvars[1], NULL);
+ if (skipcc < 0 || skipcc > 1)
+! emsg(_(e_invarg));
+ else
+ {
+ #ifdef FEAT_MBYTE
+***************
+*** 13022,13028 ****
+ return;
+ if (no < 0 || no >= NSUBEXP)
+ {
+! EMSGN(_("E935: invalid submatch number: %d"), no);
+ return;
+ }
+ if (argvars[1].v_type != VAR_UNKNOWN)
+--- 13022,13028 ----
+ return;
+ if (no < 0 || no >= NSUBEXP)
+ {
+! semsg(_("E935: invalid submatch number: %d"), no);
+ return;
+ }
+ if (argvars[1].v_type != VAR_UNKNOWN)
+***************
+*** 13357,13370 ****
+ */
+ if ((infile = vim_tempname('i', TRUE)) == NULL)
+ {
+! EMSG(_(e_notmp));
+ goto errret;
+ }
+
+ fd = mch_fopen((char *)infile, WRITEBIN);
+ if (fd == NULL)
+ {
+! EMSG2(_(e_notopen), infile);
+ goto errret;
+ }
+ if (argvars[1].v_type == VAR_NUMBER)
+--- 13357,13370 ----
+ */
+ if ((infile = vim_tempname('i', TRUE)) == NULL)
+ {
+! emsg(_(e_notmp));
+ goto errret;
+ }
+
+ fd = mch_fopen((char *)infile, WRITEBIN);
+ if (fd == NULL)
+ {
+! semsg(_(e_notopen), infile);
+ goto errret;
+ }
+ if (argvars[1].v_type == VAR_NUMBER)
+***************
+*** 13375,13381 ****
+ buf = buflist_findnr(argvars[1].vval.v_number);
+ if (buf == NULL)
+ {
+! EMSGN(_(e_nobufnr), argvars[1].vval.v_number);
+ fclose(fd);
+ goto errret;
+ }
+--- 13375,13381 ----
+ buf = buflist_findnr(argvars[1].vval.v_number);
+ if (buf == NULL)
+ {
+! semsg(_(e_nobufnr), argvars[1].vval.v_number);
+ fclose(fd);
+ goto errret;
+ }
+***************
+*** 13419,13425 ****
+ err = TRUE;
+ if (err)
+ {
+! EMSG(_("E677: Error writing temp file"));
+ goto errret;
+ }
+ }
+--- 13419,13425 ----
+ err = TRUE;
+ if (err)
+ {
+! emsg(_("E677: Error writing temp file"));
+ goto errret;
+ }
+ }
+***************
+*** 13587,13593 ****
+ if (STRCMP(arg, "$") == 0)
+ nr = tabpage_index(NULL) - 1;
+ else
+! EMSG2(_(e_invexpr2), arg);
+ }
+ }
+ else
+--- 13587,13593 ----
+ if (STRCMP(arg, "$") == 0)
+ nr = tabpage_index(NULL) - 1;
+ else
+! semsg(_(e_invexpr2), arg);
+ }
+ }
+ else
+***************
+*** 13623,13629 ****
+ }
+ else
+ {
+! EMSG2(_(e_invexpr2), arg);
+ nr = 0;
+ }
+ }
+--- 13623,13629 ----
+ }
+ else
+ {
+! semsg(_(e_invexpr2), arg);
+ nr = 0;
+ }
+ }
+***************
+*** 13781,13792 ****
+ || argvars[1].v_type != VAR_NUMBER
+ || argvars[1].vval.v_number < 0
+ || argvars[2].v_type != VAR_NUMBER)
+! EMSG(_(e_invarg));
+ else
+ {
+ alloc_fail_id = argvars[0].vval.v_number;
+ if (alloc_fail_id >= aid_last)
+! EMSG(_(e_invarg));
+ alloc_fail_countdown = argvars[1].vval.v_number;
+ alloc_fail_repeat = argvars[2].vval.v_number;
+ did_outofmem_msg = FALSE;
+--- 13781,13792 ----
+ || argvars[1].v_type != VAR_NUMBER
+ || argvars[1].vval.v_number < 0
+ || argvars[2].v_type != VAR_NUMBER)
+! emsg(_(e_invarg));
+ else
+ {
+ alloc_fail_id = argvars[0].vval.v_number;
+ if (alloc_fail_id >= aid_last)
+! emsg(_(e_invarg));
+ alloc_fail_countdown = argvars[1].vval.v_number;
+ alloc_fail_repeat = argvars[2].vval.v_number;
+ did_outofmem_msg = FALSE;
+***************
+*** 13830,13841 ****
+ char_u *name = (char_u *)"";
+
+ if (argvars[0].v_type != VAR_STRING)
+! EMSG(_(e_invarg));
+ else
+ {
+ name = tv_get_string(&argvars[0]);
+ if (reset_option_was_set(name) == FAIL)
+! EMSG2(_(e_invarg2), name);
+ }
+ }
+
+--- 13830,13841 ----
+ char_u *name = (char_u *)"";
+
+ if (argvars[0].v_type != VAR_STRING)
+! emsg(_(e_invarg));
+ else
+ {
+ name = tv_get_string(&argvars[0]);
+ if (reset_option_was_set(name) == FAIL)
+! semsg(_(e_invarg2), name);
+ }
+ }
+
+***************
+*** 13851,13857 ****
+
+ if (argvars[0].v_type != VAR_STRING
+ || (argvars[1].v_type) != VAR_NUMBER)
+! EMSG(_(e_invarg));
+ else
+ {
+ name = tv_get_string(&argvars[0]);
+--- 13851,13857 ----
+
+ if (argvars[0].v_type != VAR_STRING
+ || (argvars[1].v_type) != VAR_NUMBER)
+! emsg(_(e_invarg));
+ else
+ {
+ name = tv_get_string(&argvars[0]);
+***************
+*** 13892,13898 ****
+ }
+ }
+ else
+! EMSG2(_(e_invarg2), name);
+ }
+ }
+
+--- 13892,13898 ----
+ }
+ }
+ else
+! semsg(_(e_invarg2), name);
+ }
+ }
+
+***************
+*** 13980,13986 ****
+ || (argvars[1].v_type) != VAR_NUMBER
+ || (argvars[2].v_type) != VAR_NUMBER)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+ which = tv_get_string(&argvars[0]);
+--- 13980,13986 ----
+ || (argvars[1].v_type) != VAR_NUMBER
+ || (argvars[2].v_type) != VAR_NUMBER)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+ which = tv_get_string(&argvars[0]);
+***************
+*** 13995,14001 ****
+ sb = &gui.bottom_sbar;
+ if (sb == NULL)
+ {
+! EMSG2(_(e_invarg2), which);
+ return;
+ }
+ gui_drag_scrollbar(sb, value, dragging);
+--- 13995,14001 ----
+ sb = &gui.bottom_sbar;
+ if (sb == NULL)
+ {
+! semsg(_(e_invarg2), which);
+ return;
+ }
+ gui_drag_scrollbar(sb, value, dragging);
+***************
+*** 14035,14041 ****
+ }
+ if (arg->v_type == VAR_NUMBER && arg->vval.v_number == 0)
+ return (char_u *)"";
+! EMSG(_("E921: Invalid callback argument"));
+ return NULL;
+ }
+
+--- 14035,14041 ----
+ }
+ if (arg->v_type == VAR_NUMBER && arg->vval.v_number == 0)
+ return (char_u *)"";
+! emsg(_("E921: Invalid callback argument"));
+ return NULL;
+ }
+
+***************
+*** 14069,14075 ****
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ if (argvars[0].v_type != VAR_NUMBER)
+! EMSG(_(e_number_exp));
+ else
+ {
+ timer = find_timer((int)tv_get_number(&argvars[0]));
+--- 14069,14075 ----
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ if (argvars[0].v_type != VAR_NUMBER)
+! emsg(_(e_number_exp));
+ else
+ {
+ timer = find_timer((int)tv_get_number(&argvars[0]));
+***************
+*** 14091,14097 ****
+ int paused = (int)tv_get_number(&argvars[1]);
+
+ if (argvars[0].v_type != VAR_NUMBER)
+! EMSG(_(e_number_exp));
+ else
+ {
+ timer = find_timer((int)tv_get_number(&argvars[0]));
+--- 14091,14097 ----
+ int paused = (int)tv_get_number(&argvars[1]);
+
+ if (argvars[0].v_type != VAR_NUMBER)
+! emsg(_(e_number_exp));
+ else
+ {
+ timer = find_timer((int)tv_get_number(&argvars[0]));
+***************
+*** 14121,14127 ****
+ if (argvars[2].v_type != VAR_DICT
+ || (dict = argvars[2].vval.v_dict) == NULL)
+ {
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[2]));
+ return;
+ }
+ if (dict_find(dict, (char_u *)"repeat", -1) != NULL)
+--- 14121,14127 ----
+ if (argvars[2].v_type != VAR_DICT
+ || (dict = argvars[2].vval.v_dict) == NULL)
+ {
+! semsg(_(e_invarg2), tv_get_string(&argvars[2]));
+ return;
+ }
+ if (dict_find(dict, (char_u *)"repeat", -1) != NULL)
+***************
+*** 14157,14163 ****
+
+ if (argvars[0].v_type != VAR_NUMBER)
+ {
+! EMSG(_(e_number_exp));
+ return;
+ }
+ timer = find_timer((int)tv_get_number(&argvars[0]));
+--- 14157,14163 ----
+
+ if (argvars[0].v_type != VAR_NUMBER)
+ {
+! emsg(_(e_number_exp));
+ return;
+ }
+ timer = find_timer((int)tv_get_number(&argvars[0]));
+***************
+*** 14238,14244 ****
+ #ifdef FEAT_MBYTE
+ error:
+ #endif
+! EMSG2(_(e_invarg2), fromstr);
+ ga_clear(&ga);
+ return;
+ }
+--- 14238,14244 ----
+ #ifdef FEAT_MBYTE
+ error:
+ #endif
+! semsg(_(e_invarg2), fromstr);
+ ga_clear(&ga);
+ return;
+ }
+***************
+*** 14673,14679 ****
+
+ if (argvars[0].v_type != VAR_DICT
+ || (dict = argvars[0].vval.v_dict) == NULL)
+! EMSG(_(e_invarg));
+ else
+ {
+ if (dict_find(dict, (char_u *)"lnum", -1) != NULL)
+--- 14673,14679 ----
+
+ if (argvars[0].v_type != VAR_DICT
+ || (dict = argvars[0].vval.v_dict) == NULL)
+! emsg(_(e_invarg));
+ else
+ {
+ if (dict_find(dict, (char_u *)"lnum", -1) != NULL)
+***************
+*** 14809,14815 ****
+ }
+ else
+ {
+! EMSG2(_(e_invarg2), "writefile()");
+ return;
+ }
+
+--- 14809,14815 ----
+ }
+ else
+ {
+! semsg(_(e_invarg2), "writefile()");
+ return;
+ }
+
+***************
+*** 14840,14846 ****
+ if (*fname == NUL || (fd = mch_fopen((char *)fname,
+ append ? APPENDBIN : WRITEBIN)) == NULL)
+ {
+! EMSG2(_(e_notcreate), *fname == NUL ? (char_u *)_("<empty>") : fname);
+ ret = -1;
+ }
+ else if (blob)
+--- 14840,14846 ----
+ if (*fname == NUL || (fd = mch_fopen((char *)fname,
+ append ? APPENDBIN : WRITEBIN)) == NULL)
+ {
+! semsg(_(e_notcreate), *fname == NUL ? (char_u *)_("<empty>") : fname);
+ ret = -1;
+ }
+ else if (blob)
+*** ../vim-8.1.0742/src/ex_cmds.c 2019-01-04 23:09:45.249360567 +0100
+--- src/ex_cmds.c 2019-01-13 20:01:49.527319274 +0100
+***************
+*** 467,473 ****
+ s = skip_regexp(p + 1, *p, TRUE, NULL);
+ if (*s != *p)
+ {
+! EMSG(_(e_invalpat));
+ goto sortend;
+ }
+ *s = NUL;
+--- 467,473 ----
+ s = skip_regexp(p + 1, *p, TRUE, NULL);
+ if (*s != *p)
+ {
+! emsg(_(e_invalpat));
+ goto sortend;
+ }
+ *s = NUL;
+***************
+*** 476,482 ****
+ {
+ if (last_search_pat() == NULL)
+ {
+! EMSG(_(e_noprevre));
+ goto sortend;
+ }
+ regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
+--- 476,482 ----
+ {
+ if (last_search_pat() == NULL)
+ {
+! emsg(_(e_noprevre));
+ goto sortend;
+ }
+ regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
+***************
+*** 490,496 ****
+ }
+ else
+ {
+! EMSG2(_(e_invarg2), p);
+ goto sortend;
+ }
+ }
+--- 490,496 ----
+ }
+ else
+ {
+! semsg(_(e_invarg2), p);
+ goto sortend;
+ }
+ }
+***************
+*** 498,504 ****
+ /* Can only have one of 'n', 'b', 'o' and 'x'. */
+ if (format_found > 1)
+ {
+! EMSG(_(e_invarg));
+ goto sortend;
+ }
+
+--- 498,504 ----
+ /* Can only have one of 'n', 'b', 'o' and 'x'. */
+ if (format_found > 1)
+ {
+! emsg(_(e_invarg));
+ goto sortend;
+ }
+
+***************
+*** 668,674 ****
+ vim_free(sortbuf2);
+ vim_regfree(regmatch.regprog);
+ if (got_int)
+! EMSG(_(e_interr));
+ }
+
+ /*
+--- 668,674 ----
+ vim_free(sortbuf2);
+ vim_regfree(regmatch.regprog);
+ if (got_int)
+! emsg(_(e_interr));
+ }
+
+ /*
+***************
+*** 725,731 ****
+ new_ts = getdigits(&(eap->arg));
+ if (new_ts < 0)
+ {
+! EMSG(_(e_positive));
+ return;
+ }
+ if (new_ts == 0)
+--- 725,731 ----
+ new_ts = getdigits(&(eap->arg));
+ if (new_ts < 0)
+ {
+! emsg(_(e_positive));
+ return;
+ }
+ if (new_ts == 0)
+***************
+*** 835,841 ****
+ line_breakcheck();
+ }
+ if (got_int)
+! EMSG(_(e_interr));
+
+ #ifdef FEAT_VARTABS
+ // If a single value was given then it can be considered equal to
+--- 835,841 ----
+ line_breakcheck();
+ }
+ if (got_int)
+! emsg(_(e_interr));
+
+ #ifdef FEAT_VARTABS
+ // If a single value was given then it can be considered equal to
+***************
+*** 909,915 ****
+
+ if (dest >= line1 && dest < line2)
+ {
+! EMSG(_("E134: Cannot move a range of lines into itself"));
+ return FAIL;
+ }
+
+--- 909,915 ----
+
+ if (dest >= line1 && dest < line2)
+ {
+! emsg(_("E134: Cannot move a range of lines into itself"));
+ return FAIL;
+ }
+
+***************
+*** 1002,1008 ****
+ 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);
+
+ /*
+--- 1002,1008 ----
+ ml_delete(line1 + extra, TRUE);
+
+ if (!global_busy && num_lines > p_report)
+! smsg(NGETTEXT("%ld line moved", "%ld lines moved", num_lines),
+ (long)num_lines);
+
+ /*
+***************
+*** 1147,1153 ****
+ {
+ if (prevcmd == NULL)
+ {
+! EMSG(_(e_noprev));
+ vim_free(newcmd);
+ return;
+ }
+--- 1147,1153 ----
+ {
+ if (prevcmd == NULL)
+ {
+! emsg(_(e_noprev));
+ vim_free(newcmd);
+ return;
+ }
+***************
+*** 1334,1340 ****
+ if ((do_in && (itmp = vim_tempname('i', FALSE)) == NULL)
+ || (do_out && (otmp = vim_tempname('o', FALSE)) == NULL))
+ {
+! EMSG(_(e_notmp));
+ goto filterend;
+ }
+
+--- 1334,1340 ----
+ if ((do_in && (itmp = vim_tempname('i', FALSE)) == NULL)
+ || (do_out && (otmp = vim_tempname('o', FALSE)) == NULL))
+ {
+! emsg(_(e_notmp));
+ goto filterend;
+ }
+
+***************
+*** 1351,1357 ****
+ #if defined(FEAT_EVAL)
+ if (!aborting())
+ #endif
+! (void)EMSG2(_(e_notcreate), itmp); /* will call wait_return */
+ goto filterend;
+ }
+ if (curbuf != old_curbuf)
+--- 1351,1357 ----
+ #if defined(FEAT_EVAL)
+ if (!aborting())
+ #endif
+! (void)semsg(_(e_notcreate), itmp); /* will call wait_return */
+ goto filterend;
+ }
+ if (curbuf != old_curbuf)
+***************
+*** 1426,1432 ****
+ #endif
+ {
+ msg_putchar('\n');
+! EMSG2(_(e_notread), otmp);
+ }
+ goto error;
+ }
+--- 1426,1432 ----
+ #endif
+ {
+ msg_putchar('\n');
+! semsg(_(e_notread), otmp);
+ }
+ goto error;
+ }
+***************
+*** 1514,1520 ****
+ if (curbuf != old_curbuf)
+ {
+ --no_wait_return;
+! EMSG(_("E135: *Filter* Autocommands must not change current buffer"));
+ }
+ if (itmp != NULL)
+ mch_remove(itmp);
+--- 1514,1520 ----
+ if (curbuf != old_curbuf)
+ {
+ --no_wait_return;
+! emsg(_("E135: *Filter* Autocommands must not change current buffer"));
+ }
+ if (itmp != NULL)
+ mch_remove(itmp);
+***************
+*** 1871,1880 ****
+ STRNCAT(IObuff, line, IOSIZE - STRLEN(IObuff) - 1);
+ if (IObuff[STRLEN(IObuff) - 1] == '\n')
+ IObuff[STRLEN(IObuff) - 1] = NUL;
+! emsg(IObuff);
+ if (++viminfo_errcnt >= 10)
+ {
+! EMSG(_("E136: viminfo: Too many errors, skipping rest of file"));
+ return TRUE;
+ }
+ return FALSE;
+--- 1871,1880 ----
+ STRNCAT(IObuff, line, IOSIZE - STRLEN(IObuff) - 1);
+ if (IObuff[STRLEN(IObuff) - 1] == '\n')
+ IObuff[STRLEN(IObuff) - 1] = NUL;
+! emsg((char *)IObuff);
+ if (++viminfo_errcnt >= 10)
+ {
+! emsg(_("E136: viminfo: Too many errors, skipping rest of file"));
+ return TRUE;
+ }
+ return FALSE;
+***************
+*** 1903,1909 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Reading viminfo file \"%s\"%s%s%s"),
+ fname,
+ (flags & VIF_WANT_INFO) ? _(" info") : "",
+ (flags & VIF_WANT_MARKS) ? _(" marks") : "",
+--- 1903,1909 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg(_("Reading viminfo file \"%s\"%s%s%s"),
+ fname,
+ (flags & VIF_WANT_INFO) ? _(" info") : "",
+ (flags & VIF_WANT_MARKS) ? _(" marks") : "",
+***************
+*** 2003,2009 ****
+ int tt = msg_didany;
+
+ /* avoid a wait_return for this message, it's annoying */
+! EMSG2(_("E137: Viminfo file is not writable: %s"), fname);
+ msg_didany = tt;
+ fclose(fp_in);
+ goto end;
+--- 2003,2009 ----
+ int tt = msg_didany;
+
+ /* avoid a wait_return for this message, it's annoying */
+! semsg(_("E137: Viminfo file is not writable: %s"), fname);
+ msg_didany = tt;
+ fclose(fp_in);
+ goto end;
+***************
+*** 2126,2132 ****
+ {
+ /* They all exist? Must be something wrong! Don't write
+ * the viminfo file then. */
+! EMSG2(_("E929: Too many viminfo temp files, like %s!"),
+ tempname);
+ break;
+ }
+--- 2126,2132 ----
+ {
+ /* They all exist? Must be something wrong! Don't write
+ * the viminfo file then. */
+! semsg(_("E929: Too many viminfo temp files, like %s!"),
+ tempname);
+ break;
+ }
+***************
+*** 2172,2178 ****
+ */
+ if (fp_out == NULL)
+ {
+! EMSG2(_("E138: Can't write viminfo file %s!"),
+ (fp_in == NULL || tempname == NULL) ? fname : tempname);
+ if (fp_in != NULL)
+ fclose(fp_in);
+--- 2172,2178 ----
+ */
+ if (fp_out == NULL)
+ {
+! semsg(_("E138: Can't write viminfo file %s!"),
+ (fp_in == NULL || tempname == NULL) ? fname : tempname);
+ if (fp_in != NULL)
+ fclose(fp_in);
+***************
+*** 2182,2188 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Writing viminfo file \"%s\""), fname);
+ verbose_leave();
+ }
+
+--- 2182,2188 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg(_("Writing viminfo file \"%s\""), fname);
+ verbose_leave();
+ }
+
+***************
+*** 2203,2209 ****
+ if (vim_rename(tempname, fname) == -1)
+ {
+ ++viminfo_errcnt;
+! EMSG2(_("E886: Can't rename viminfo file to %s!"), fname);
+ }
+ # ifdef WIN3264
+ /* If the viminfo file was hidden then also hide the new file. */
+--- 2203,2209 ----
+ if (vim_rename(tempname, fname) == -1)
+ {
+ ++viminfo_errcnt;
+! semsg(_("E886: Can't rename viminfo file to %s!"), fname);
+ }
+ # ifdef WIN3264
+ /* If the viminfo file was hidden then also hide the new file. */
+***************
+*** 3127,3133 ****
+ || eap->line2 > 0
+ || eap->addr_count > 1))
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 3127,3133 ----
+ || eap->line2 > 0
+ || eap->addr_count > 1))
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 3205,3211 ****
+ {
+ if (eap->cmdidx == CMD_saveas)
+ {
+! EMSG(_(e_argreq));
+ goto theend;
+ }
+ other = FALSE;
+--- 3205,3211 ----
+ {
+ if (eap->cmdidx == CMD_saveas)
+ {
+! emsg(_(e_argreq));
+ goto theend;
+ }
+ other = FALSE;
+***************
+*** 3237,3243 ****
+ {
+ /* Overwriting a file that is loaded in another buffer is not a
+ * good idea. */
+! EMSG(_(e_bufloaded));
+ goto theend;
+ }
+ }
+--- 3237,3243 ----
+ {
+ /* Overwriting a file that is loaded in another buffer is not a
+ * good idea. */
+! emsg(_(e_bufloaded));
+ goto theend;
+ }
+ }
+***************
+*** 3278,3284 ****
+ else
+ #endif
+ {
+! EMSG(_("E140: Use ! to write partial buffer"));
+ goto theend;
+ }
+ }
+--- 3278,3284 ----
+ else
+ #endif
+ {
+! emsg(_("E140: Use ! to write partial buffer"));
+ goto theend;
+ }
+ }
+***************
+*** 3417,3423 ****
+ /* with UNIX it is possible to open a directory */
+ if (mch_isdir(ffname))
+ {
+! EMSG2(_(e_isadir2), ffname);
+ return FAIL;
+ }
+ #endif
+--- 3417,3423 ----
+ /* with UNIX it is possible to open a directory */
+ if (mch_isdir(ffname))
+ {
+! semsg(_(e_isadir2), ffname);
+ return FAIL;
+ }
+ #endif
+***************
+*** 3434,3440 ****
+ else
+ #endif
+ {
+! EMSG(_(e_exists));
+ return FAIL;
+ }
+ }
+--- 3434,3440 ----
+ else
+ #endif
+ {
+! emsg(_(e_exists));
+ return FAIL;
+ }
+ }
+***************
+*** 3491,3497 ****
+ else
+ #endif
+ {
+! EMSG2(_("E768: Swap file exists: %s (:silent! overrides)"),
+ swapname);
+ vim_free(swapname);
+ return FAIL;
+--- 3491,3497 ----
+ else
+ #endif
+ {
+! semsg(_("E768: Swap file exists: %s (:silent! overrides)"),
+ swapname);
+ vim_free(swapname);
+ return FAIL;
+***************
+*** 3565,3571 ****
+ #endif
+ if (buf->b_ffname == NULL)
+ {
+! EMSGN(_("E141: No file name for buffer %ld"), (long)buf->b_fnum);
+ ++error;
+ }
+ else if (check_readonly(&eap->forceit, buf)
+--- 3565,3571 ----
+ #endif
+ if (buf->b_ffname == NULL)
+ {
+! semsg(_("E141: No file name for buffer %ld"), (long)buf->b_fnum);
+ ++error;
+ }
+ else if (check_readonly(&eap->forceit, buf)
+***************
+*** 3605,3611 ****
+ {
+ if (p_write)
+ return FALSE;
+! EMSG(_("E142: File not written: Writing is disabled by 'write' option"));
+ return TRUE;
+ }
+
+--- 3605,3611 ----
+ {
+ if (p_write)
+ return FALSE;
+! emsg(_("E142: File not written: Writing is disabled by 'write' option"));
+ return TRUE;
+ }
+
+***************
+*** 3651,3659 ****
+ else
+ #endif
+ if (buf->b_p_ro)
+! EMSG(_(e_readonly));
+ else
+! EMSG2(_("E505: \"%s\" is read-only (add ! to override)"),
+ buf->b_fname);
+ return TRUE;
+ }
+--- 3651,3659 ----
+ else
+ #endif
+ if (buf->b_p_ro)
+! emsg(_(e_readonly));
+ else
+! semsg(_("E505: \"%s\" is read-only (add ! to override)"),
+ buf->b_fname);
+ return TRUE;
+ }
+***************
+*** 4488,4494 ****
+ static void
+ delbuf_msg(char_u *name)
+ {
+! EMSG2(_("E143: Autocommands unexpectedly deleted new buffer %s"),
+ name == NULL ? (char_u *)"" : name);
+ vim_free(name);
+ au_new_curbuf.br_buf = NULL;
+--- 4488,4494 ----
+ static void
+ delbuf_msg(char_u *name)
+ {
+! semsg(_("E143: Autocommands unexpectedly deleted new buffer %s"),
+ name == NULL ? (char_u *)"" : name);
+ vim_free(name);
+ au_new_curbuf.br_buf = NULL;
+***************
+*** 4707,4713 ****
+ {
+ if (!VIM_ISDIGIT(*x))
+ {
+! EMSG(_("E144: non-numeric argument to :z"));
+ return;
+ }
+ else
+--- 4707,4713 ----
+ {
+ if (!VIM_ISDIGIT(*x))
+ {
+! emsg(_("E144: non-numeric argument to :z"));
+ return;
+ }
+ else
+***************
+*** 4817,4823 ****
+ {
+ if (restricted)
+ {
+! EMSG(_("E145: Shell commands not allowed in rvim"));
+ return TRUE;
+ }
+ return FALSE;
+--- 4817,4823 ----
+ {
+ if (restricted)
+ {
+! emsg(_("E145: Shell commands not allowed in rvim"));
+ return TRUE;
+ }
+ return FALSE;
+***************
+*** 4834,4840 ****
+ if (secure)
+ {
+ secure = 2;
+! EMSG(_(e_curdir));
+ return TRUE;
+ }
+ #ifdef HAVE_SANDBOX
+--- 4834,4840 ----
+ if (secure)
+ {
+ secure = 2;
+! emsg(_(e_curdir));
+ return TRUE;
+ }
+ #ifdef HAVE_SANDBOX
+***************
+*** 4844,4850 ****
+ */
+ if (sandbox != 0)
+ {
+! EMSG(_(e_sandbox));
+ return TRUE;
+ }
+ #endif
+--- 4844,4850 ----
+ */
+ if (sandbox != 0)
+ {
+! emsg(_(e_sandbox));
+ return TRUE;
+ }
+ #endif
+***************
+*** 4933,4939 ****
+ /* don't accept alphanumeric for separator */
+ if (isalpha(*cmd))
+ {
+! EMSG(_("E146: Regular expressions can't be delimited by letters"));
+ return;
+ }
+ /*
+--- 4933,4939 ----
+ /* don't accept alphanumeric for separator */
+ if (isalpha(*cmd))
+ {
+! emsg(_("E146: Regular expressions can't be delimited by letters"));
+ return;
+ }
+ /*
+***************
+*** 4946,4952 ****
+ ++cmd;
+ if (vim_strchr((char_u *)"/?&", *cmd) == NULL)
+ {
+! EMSG(_(e_backslash));
+ return;
+ }
+ if (*cmd != '&')
+--- 4946,4952 ----
+ ++cmd;
+ if (vim_strchr((char_u *)"/?&", *cmd) == NULL)
+ {
+! emsg(_(e_backslash));
+ return;
+ }
+ if (*cmd != '&')
+***************
+*** 4994,5000 ****
+ {
+ if (old_sub == NULL) /* there is no previous command */
+ {
+! EMSG(_(e_nopresub));
+ return;
+ }
+ sub = old_sub;
+--- 4994,5000 ----
+ {
+ if (old_sub == NULL) /* there is no previous command */
+ {
+! emsg(_(e_nopresub));
+ return;
+ }
+ sub = old_sub;
+***************
+*** 5010,5016 ****
+ {
+ if (old_sub == NULL) /* there is no previous command */
+ {
+! EMSG(_(e_nopresub));
+ return;
+ }
+ pat = NULL; /* search_regcomp() will use previous pattern */
+--- 5010,5016 ----
+ {
+ if (old_sub == NULL) /* there is no previous command */
+ {
+! emsg(_(e_nopresub));
+ return;
+ }
+ pat = NULL; /* search_regcomp() will use previous pattern */
+***************
+*** 5137,5143 ****
+ i = getdigits(&cmd);
+ if (i <= 0 && !eap->skip && subflags.do_error)
+ {
+! EMSG(_(e_zerocount));
+ return;
+ }
+ eap->line1 = eap->line2;
+--- 5137,5143 ----
+ i = getdigits(&cmd);
+ if (i <= 0 && !eap->skip && subflags.do_error)
+ {
+! emsg(_(e_zerocount));
+ return;
+ }
+ eap->line1 = eap->line2;
+***************
+*** 5155,5161 ****
+ eap->nextcmd = check_nextcmd(cmd);
+ if (eap->nextcmd == NULL)
+ {
+! EMSG(_(e_trailing));
+ return;
+ }
+ }
+--- 5155,5161 ----
+ eap->nextcmd = check_nextcmd(cmd);
+ if (eap->nextcmd == NULL)
+ {
+! emsg(_(e_trailing));
+ return;
+ }
+ }
+***************
+*** 5166,5179 ****
+ if (!subflags.do_count && !curbuf->b_p_ma)
+ {
+ /* Substitution is not allowed in non-'modifiable' buffer */
+! EMSG(_(e_modifiable));
+ return;
+ }
+
+ if (search_regcomp(pat, RE_SUBST, which_pat, SEARCH_HIS, &regmatch) == FAIL)
+ {
+ if (subflags.do_error)
+! EMSG(_(e_invcmd));
+ return;
+ }
+
+--- 5166,5179 ----
+ if (!subflags.do_count && !curbuf->b_p_ma)
+ {
+ /* Substitution is not allowed in non-'modifiable' buffer */
+! emsg(_(e_modifiable));
+ return;
+ }
+
+ if (search_regcomp(pat, RE_SUBST, which_pat, SEARCH_HIS, &regmatch) == FAIL)
+ {
+ if (subflags.do_error)
+! emsg(_(e_invcmd));
+ return;
+ }
+
+***************
+*** 5496,5502 ****
+ /* write message same highlighting as for
+ * wait_return */
+ smsg_attr(HL_ATTR(HLF_R),
+! (char_u *)_("replace with %s (y/n/a/q/l/^E/^Y)?"), sub);
+ msg_no_more = FALSE;
+ msg_scroll = i;
+ showruler(TRUE);
+--- 5496,5502 ----
+ /* write message same highlighting as for
+ * wait_return */
+ smsg_attr(HL_ATTR(HLF_R),
+! _("replace with %s (y/n/a/q/l/^E/^Y)?"), sub);
+ msg_no_more = FALSE;
+ msg_scroll = i;
+ showruler(TRUE);
+***************
+*** 5949,5959 ****
+ else if (!global_busy)
+ {
+ if (got_int) /* interrupted */
+! EMSG(_(e_interr));
+ else if (got_match) /* did find something but nothing substituted */
+ MSG("");
+ else if (subflags.do_error) /* nothing found */
+! EMSG2(_(e_patnotf2), get_search_pat());
+ }
+
+ #ifdef FEAT_FOLDING
+--- 5949,5959 ----
+ else if (!global_busy)
+ {
+ if (got_int) /* interrupted */
+! emsg(_(e_interr));
+ else if (got_match) /* did find something but nothing substituted */
+ MSG("");
+ else if (subflags.do_error) /* nothing found */
+! semsg(_(e_patnotf2), get_search_pat());
+ }
+
+ #ifdef FEAT_FOLDING
+***************
+*** 6018,6024 ****
+ }
+ if (got_int)
+ {
+! EMSG(_(e_interr));
+ return TRUE;
+ }
+ return FALSE;
+--- 6018,6024 ----
+ }
+ if (got_int)
+ {
+! emsg(_(e_interr));
+ return TRUE;
+ }
+ return FALSE;
+***************
+*** 6071,6077 ****
+ || eap->line2 != curbuf->b_ml.ml_line_count))
+ {
+ /* will increment global_busy to break out of the loop */
+! EMSG(_("E147: Cannot do :global recursive with a range"));
+ return;
+ }
+
+--- 6071,6077 ----
+ || eap->line2 != curbuf->b_ml.ml_line_count))
+ {
+ /* will increment global_busy to break out of the loop */
+! emsg(_("E147: Cannot do :global recursive with a range"));
+ return;
+ }
+
+***************
+*** 6092,6098 ****
+ ++cmd;
+ if (vim_strchr((char_u *)"/?&", *cmd) == NULL)
+ {
+! EMSG(_(e_backslash));
+ return;
+ }
+ if (*cmd == '&')
+--- 6092,6098 ----
+ ++cmd;
+ if (vim_strchr((char_u *)"/?&", *cmd) == NULL)
+ {
+! emsg(_(e_backslash));
+ return;
+ }
+ if (*cmd == '&')
+***************
+*** 6104,6110 ****
+ }
+ else if (*cmd == NUL)
+ {
+! EMSG(_("E148: Regular expression missing from global"));
+ return;
+ }
+ else
+--- 6104,6110 ----
+ }
+ else if (*cmd == NUL)
+ {
+! emsg(_("E148: Regular expression missing from global"));
+ return;
+ }
+ else
+***************
+*** 6125,6131 ****
+
+ if (search_regcomp(pat, RE_BOTH, which_pat, SEARCH_HIS, &regmatch) == FAIL)
+ {
+! EMSG(_(e_invcmd));
+ return;
+ }
+
+--- 6125,6131 ----
+
+ if (search_regcomp(pat, RE_BOTH, which_pat, SEARCH_HIS, &regmatch) == FAIL)
+ {
+! emsg(_(e_invcmd));
+ return;
+ }
+
+***************
+*** 6163,6171 ****
+ else if (ndone == 0)
+ {
+ if (type == 'v')
+! smsg((char_u *)_("Pattern found in every line: %s"), pat);
+ else
+! smsg((char_u *)_("Pattern not found: %s"), pat);
+ }
+ else
+ {
+--- 6163,6171 ----
+ else if (ndone == 0)
+ {
+ if (type == 'v')
+! smsg(_("Pattern found in every line: %s"), pat);
+ else
+! smsg(_("Pattern not found: %s"), pat);
+ }
+ else
+ {
+***************
+*** 6366,6372 ****
+
+ if (eap->forceit && *arg == NUL && !curbuf->b_help)
+ {
+! EMSG(_("E478: Don't panic!"));
+ return;
+ }
+
+--- 6366,6372 ----
+
+ if (eap->forceit && *arg == NUL && !curbuf->b_help)
+ {
+! emsg(_("E478: Don't panic!"));
+ return;
+ }
+
+***************
+*** 6412,6421 ****
+ {
+ #ifdef FEAT_MULTI_LANG
+ if (lang != NULL)
+! EMSG3(_("E661: Sorry, no '%s' help for %s"), lang, arg);
+ else
+ #endif
+! EMSG2(_("E149: Sorry, no help for %s"), arg);
+ if (n != FAIL)
+ FreeWild(num_matches, matches);
+ return;
+--- 6412,6421 ----
+ {
+ #ifdef FEAT_MULTI_LANG
+ if (lang != NULL)
+! semsg(_("E661: Sorry, no '%s' help for %s"), lang, arg);
+ else
+ #endif
+! semsg(_("E149: Sorry, no help for %s"), arg);
+ if (n != FAIL)
+ FreeWild(num_matches, matches);
+ return;
+***************
+*** 6451,6457 ****
+ */
+ if ((helpfd = mch_fopen((char *)p_hf, READBIN)) == NULL)
+ {
+! smsg((char_u *)_("Sorry, help file \"%s\" not found"), p_hf);
+ goto erret;
+ }
+ fclose(helpfd);
+--- 6451,6457 ----
+ */
+ if ((helpfd = mch_fopen((char *)p_hf, READBIN)) == NULL)
+ {
+! smsg(_("Sorry, help file \"%s\" not found"), p_hf);
+ goto erret;
+ }
+ fclose(helpfd);
+***************
+*** 7230,7236 ****
+ || filecount == 0)
+ {
+ if (!got_int)
+! EMSG2(_("E151: No match: %s"), NameBuff);
+ return;
+ }
+
+--- 7230,7236 ----
+ || filecount == 0)
+ {
+ if (!got_int)
+! semsg(_("E151: No match: %s"), NameBuff);
+ return;
+ }
+
+***************
+*** 7244,7250 ****
+ fd_tags = mch_fopen((char *)NameBuff, "w");
+ if (fd_tags == NULL)
+ {
+! EMSG2(_("E152: Cannot open %s for writing"), NameBuff);
+ FreeWild(filecount, files);
+ return;
+ }
+--- 7244,7250 ----
+ fd_tags = mch_fopen((char *)NameBuff, "w");
+ if (fd_tags == NULL)
+ {
+! semsg(_("E152: Cannot open %s for writing"), NameBuff);
+ FreeWild(filecount, files);
+ return;
+ }
+***************
+*** 7281,7287 ****
+ fd = mch_fopen((char *)files[fi], "r");
+ if (fd == NULL)
+ {
+! EMSG2(_("E153: Unable to open %s for reading"), files[fi]);
+ continue;
+ }
+ fname = files[fi] + dirlen + 1;
+--- 7281,7287 ----
+ fd = mch_fopen((char *)files[fi], "r");
+ if (fd == NULL)
+ {
+! semsg(_("E153: Unable to open %s for reading"), files[fi]);
+ continue;
+ }
+ fname = files[fi] + dirlen + 1;
+***************
+*** 7317,7323 ****
+ utf8 = this_utf8;
+ else if (utf8 != this_utf8)
+ {
+! EMSG2(_("E670: Mix of help file encodings within a language: %s"), files[fi]);
+ mix = !got_int;
+ got_int = TRUE;
+ }
+--- 7317,7323 ----
+ utf8 = this_utf8;
+ else if (utf8 != this_utf8)
+ {
+! semsg(_("E670: Mix of help file encodings within a language: %s"), files[fi]);
+ mix = !got_int;
+ got_int = TRUE;
+ }
+***************
+*** 7401,7407 ****
+ vim_snprintf((char *)NameBuff, MAXPATHL,
+ _("E154: Duplicate tag \"%s\" in file %s/%s"),
+ ((char_u **)ga.ga_data)[i], dir, p2 + 1);
+! EMSG(NameBuff);
+ *p2 = '\t';
+ break;
+ }
+--- 7401,7407 ----
+ vim_snprintf((char *)NameBuff, MAXPATHL,
+ _("E154: Duplicate tag \"%s\" in file %s/%s"),
+ ((char_u **)ga.ga_data)[i], dir, p2 + 1);
+! emsg((char *)NameBuff);
+ *p2 = '\t';
+ break;
+ }
+***************
+*** 7473,7479 ****
+ EW_FILE|EW_SILENT) == FAIL
+ || filecount == 0)
+ {
+! EMSG2(_("E151: No match: %s"), NameBuff);
+ return;
+ }
+
+--- 7473,7479 ----
+ EW_FILE|EW_SILENT) == FAIL
+ || filecount == 0)
+ {
+! semsg(_("E151: No match: %s"), NameBuff);
+ return;
+ }
+
+***************
+*** 7586,7592 ****
+ dirname = ExpandOne(&xpc, eap->arg, NULL,
+ WILD_LIST_NOTFOUND|WILD_SILENT, WILD_EXPAND_FREE);
+ if (dirname == NULL || !mch_isdir(dirname))
+! EMSG2(_("E150: Not a directory: %s"), eap->arg);
+ else
+ do_helptags(dirname, add_help_tags);
+ vim_free(dirname);
+--- 7586,7592 ----
+ dirname = ExpandOne(&xpc, eap->arg, NULL,
+ WILD_LIST_NOTFOUND|WILD_SILENT, WILD_EXPAND_FREE);
+ if (dirname == NULL || !mch_isdir(dirname))
+! semsg(_("E150: Not a directory: %s"), eap->arg);
+ else
+ do_helptags(dirname, add_help_tags);
+ vim_free(dirname);
+*** ../vim-8.1.0742/src/ex_cmds.h 2019-01-08 22:02:36.044297306 +0100
+--- src/ex_cmds.h 2019-01-13 20:24:01.272847911 +0100
+***************
+*** 1799,1805 ****
+ #ifdef FEAT_USR_CMDS
+ int useridx; /* user command index */
+ #endif
+! char_u *errmsg; /* returned error message */
+ char_u *(*getline)(int, void *, int);
+ void *cookie; /* argument for getline() */
+ #ifdef FEAT_EVAL
+--- 1799,1805 ----
+ #ifdef FEAT_USR_CMDS
+ int useridx; /* user command index */
+ #endif
+! char *errmsg; /* returned error message */
+ char_u *(*getline)(int, void *, int);
+ void *cookie; /* argument for getline() */
+ #ifdef FEAT_EVAL
+*** ../vim-8.1.0742/src/ex_cmds2.c 2019-01-12 15:15:34.089783011 +0100
+--- src/ex_cmds2.c 2019-01-13 19:48:43.978119627 +0100
+***************
+*** 146,167 ****
+ MSG(_("Entering Debug mode. Type \"cont\" to continue."));
+ if (debug_oldval != NULL)
+ {
+! smsg((char_u *)_("Oldval = \"%s\""), debug_oldval);
+ vim_free(debug_oldval);
+ debug_oldval = NULL;
+ }
+ if (debug_newval != NULL)
+ {
+! smsg((char_u *)_("Newval = \"%s\""), debug_newval);
+ vim_free(debug_newval);
+ debug_newval = NULL;
+ }
+ if (sourcing_name != NULL)
+ msg(sourcing_name);
+ if (sourcing_lnum != 0)
+! smsg((char_u *)_("line %ld: %s"), (long)sourcing_lnum, cmd);
+ else
+! smsg((char_u *)_("cmd: %s"), cmd);
+ /*
+ * Repeat getting a command and executing it.
+ */
+--- 146,167 ----
+ MSG(_("Entering Debug mode. Type \"cont\" to continue."));
+ if (debug_oldval != NULL)
+ {
+! smsg(_("Oldval = \"%s\""), debug_oldval);
+ vim_free(debug_oldval);
+ debug_oldval = NULL;
+ }
+ if (debug_newval != NULL)
+ {
+! smsg(_("Newval = \"%s\""), debug_newval);
+ vim_free(debug_newval);
+ debug_newval = NULL;
+ }
+ if (sourcing_name != NULL)
+ msg(sourcing_name);
+ if (sourcing_lnum != 0)
+! smsg(_("line %ld: %s"), (long)sourcing_lnum, cmd);
+ else
+! smsg(_("cmd: %s"), cmd);
+ /*
+ * Repeat getting a command and executing it.
+ */
+***************
+*** 399,405 ****
+ if (debug_backtrace_level > max)
+ {
+ debug_backtrace_level = max;
+! smsg((char_u *)_("frame at highest level: %d"), max);
+ }
+ }
+ }
+--- 399,405 ----
+ if (debug_backtrace_level > max)
+ {
+ debug_backtrace_level = max;
+! smsg(_("frame at highest level: %d"), max);
+ }
+ }
+ }
+***************
+*** 421,429 ****
+ if (next != NULL)
+ *next = NUL;
+ if (i == max - debug_backtrace_level)
+! smsg((char_u *)"->%d %s", max - i, cur);
+ else
+! smsg((char_u *)" %d %s", max - i, cur);
+ ++i;
+ if (next == NULL)
+ break;
+--- 421,429 ----
+ if (next != NULL)
+ *next = NUL;
+ if (i == max - debug_backtrace_level)
+! smsg("->%d %s", max - i, cur);
+ else
+! smsg(" %d %s", max - i, cur);
+ ++i;
+ if (next == NULL)
+ break;
+***************
+*** 432,440 ****
+ }
+ }
+ if (sourcing_lnum != 0)
+! smsg((char_u *)_("line %ld: %s"), (long)sourcing_lnum, cmd);
+ else
+! smsg((char_u *)_("cmd: %s"), cmd);
+ }
+
+ /*
+--- 432,440 ----
+ }
+ }
+ if (sourcing_lnum != 0)
+! smsg(_("line %ld: %s"), (long)sourcing_lnum, cmd);
+ else
+! smsg(_("cmd: %s"), cmd);
+ }
+
+ /*
+***************
+*** 487,493 ****
+ p = (char_u *)"<SNR>";
+ else
+ p = (char_u *)"";
+! smsg((char_u *)_("Breakpoint in \"%s%s\" line %ld"),
+ p,
+ debug_breakpoint_name + (*p == NUL ? 0 : 3),
+ (long)debug_breakpoint_lnum);
+--- 487,493 ----
+ p = (char_u *)"<SNR>";
+ else
+ p = (char_u *)"";
+! smsg(_("Breakpoint in \"%s%s\" line %ld"),
+ p,
+ debug_breakpoint_name + (*p == NUL ? 0 : 3),
+ (long)debug_breakpoint_lnum);
+***************
+*** 607,613 ****
+ {
+ if (curbuf->b_ffname == NULL)
+ {
+! EMSG(_(e_noname));
+ return FAIL;
+ }
+ bp->dbg_type = DBG_FILE;
+--- 607,613 ----
+ {
+ if (curbuf->b_ffname == NULL)
+ {
+! emsg(_(e_noname));
+ return FAIL;
+ }
+ bp->dbg_type = DBG_FILE;
+***************
+*** 621,627 ****
+ bp->dbg_type = DBG_EXPR;
+ else
+ {
+! EMSG2(_(e_invarg2), p);
+ return FAIL;
+ }
+ p = skipwhite(p + 4);
+--- 621,627 ----
+ bp->dbg_type = DBG_EXPR;
+ else
+ {
+! semsg(_(e_invarg2), p);
+ return FAIL;
+ }
+ p = skipwhite(p + 4);
+***************
+*** 646,652 ****
+ || (here && *p != NUL)
+ || (bp->dbg_type == DBG_FUNC && strstr((char *)p, "()") != NULL))
+ {
+! EMSG2(_(e_invarg2), arg);
+ return FAIL;
+ }
+
+--- 646,652 ----
+ || (here && *p != NUL)
+ || (bp->dbg_type == DBG_FUNC && strstr((char *)p, "()") != NULL))
+ {
+! semsg(_(e_invarg2), arg);
+ return FAIL;
+ }
+
+***************
+*** 817,823 ****
+ }
+
+ if (todel < 0)
+! EMSG2(_("E161: Breakpoint not found: %s"), eap->arg);
+ else
+ {
+ while (gap->ga_len > 0)
+--- 817,823 ----
+ }
+
+ if (todel < 0)
+! semsg(_("E161: Breakpoint not found: %s"), eap->arg);
+ else
+ {
+ while (gap->ga_len > 0)
+***************
+*** 865,877 ****
+ if (bp->dbg_type == DBG_FILE)
+ home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE);
+ if (bp->dbg_type != DBG_EXPR)
+! smsg((char_u *)_("%3d %s %s line %ld"),
+ bp->dbg_nr,
+ bp->dbg_type == DBG_FUNC ? "func" : "file",
+ bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff,
+ (long)bp->dbg_lnum);
+ else
+! smsg((char_u *)_("%3d expr %s"),
+ bp->dbg_nr, bp->dbg_name);
+ }
+ }
+--- 865,877 ----
+ if (bp->dbg_type == DBG_FILE)
+ home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE);
+ if (bp->dbg_type != DBG_EXPR)
+! smsg(_("%3d %s %s line %ld"),
+ bp->dbg_nr,
+ bp->dbg_type == DBG_FUNC ? "func" : "file",
+ bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff,
+ (long)bp->dbg_lnum);
+ else
+! smsg(_("%3d expr %s"),
+ bp->dbg_nr, bp->dbg_name);
+ }
+ }
+***************
+*** 1726,1732 ****
+ set_vim_var_nr(VV_PROFILING, 1L);
+ }
+ else if (do_profiling == PROF_NONE)
+! EMSG(_("E750: First use \":profile start {fname}\""));
+ else if (STRCMP(eap->arg, "pause") == 0)
+ {
+ if (do_profiling == PROF_YES)
+--- 1726,1732 ----
+ set_vim_var_nr(VV_PROFILING, 1L);
+ }
+ else if (do_profiling == PROF_NONE)
+! emsg(_("E750: First use \":profile start {fname}\""));
+ else if (STRCMP(eap->arg, "pause") == 0)
+ {
+ if (do_profiling == PROF_YES)
+***************
+*** 1828,1834 ****
+ {
+ fd = mch_fopen((char *)profile_fname, "w");
+ if (fd == NULL)
+! EMSG2(_(e_notopen), profile_fname);
+ else
+ {
+ script_dump_profile(fd);
+--- 1828,1834 ----
+ {
+ fd = mch_fopen((char *)profile_fname, "w");
+ if (fd == NULL)
+! semsg(_(e_notopen), profile_fname);
+ else
+ {
+ script_dump_profile(fd);
+***************
+*** 2357,2367 ****
+ if (
+ #ifdef FEAT_TERMINAL
+ term_job_running(buf->b_term)
+! ? EMSG2(_("E947: Job still running in buffer \"%s\""),
+ buf->b_fname)
+ :
+ #endif
+! EMSG2(_("E162: No write since last change for buffer \"%s\""),
+ buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname))
+ {
+ save = no_wait_return;
+--- 2357,2367 ----
+ if (
+ #ifdef FEAT_TERMINAL
+ term_job_running(buf->b_term)
+! ? semsg(_("E947: Job still running in buffer \"%s\""),
+ buf->b_fname)
+ :
+ #endif
+! semsg(_("E162: No write since last change for buffer \"%s\""),
+ buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname))
+ {
+ save = no_wait_return;
+***************
+*** 2407,2413 ****
+ {
+ if (curbuf->b_ffname == NULL)
+ {
+! EMSG(_(e_noname));
+ return FAIL;
+ }
+ return OK;
+--- 2407,2413 ----
+ {
+ if (curbuf->b_ffname == NULL)
+ {
+! emsg(_(e_noname));
+ return FAIL;
+ }
+ return OK;
+***************
+*** 2629,2635 ****
+ vim_regfree(regmatch.regprog);
+ vim_free(p);
+ if (!didone)
+! EMSG2(_(e_nomatch2), ((char_u **)new_ga.ga_data)[i]);
+ }
+ ga_clear(&new_ga);
+ }
+--- 2629,2635 ----
+ vim_regfree(regmatch.regprog);
+ vim_free(p);
+ if (!didone)
+! semsg(_(e_nomatch2), ((char_u **)new_ga.ga_data)[i]);
+ }
+ ga_clear(&new_ga);
+ }
+***************
+*** 2640,2646 ****
+ ga_clear(&new_ga);
+ if (i == FAIL || exp_count == 0)
+ {
+! EMSG(_(e_nomatch));
+ return FAIL;
+ }
+
+--- 2640,2646 ----
+ ga_clear(&new_ga);
+ if (i == FAIL || exp_count == 0)
+ {
+! emsg(_(e_nomatch));
+ return FAIL;
+ }
+
+***************
+*** 2847,2857 ****
+ if (argn < 0 || argn >= ARGCOUNT)
+ {
+ if (ARGCOUNT <= 1)
+! EMSG(_("E163: There is only one file to edit"));
+ else if (argn < 0)
+! EMSG(_("E164: Cannot go before first file"));
+ else
+! EMSG(_("E165: Cannot go beyond last file"));
+ }
+ else
+ {
+--- 2847,2857 ----
+ if (argn < 0 || argn >= ARGCOUNT)
+ {
+ if (ARGCOUNT <= 1)
+! emsg(_("E163: There is only one file to edit"));
+ else if (argn < 0)
+! emsg(_("E164: Cannot go before first file"));
+ else
+! emsg(_("E165: Cannot go beyond last file"));
+ }
+ else
+ {
+***************
+*** 2992,3003 ****
+ n = eap->line2 - eap->line1 + 1;
+ if (*eap->arg != NUL)
+ /* Can't have both a range and an argument. */
+! EMSG(_(e_invarg));
+ else if (n <= 0)
+ {
+ /* Don't give an error for ":%argdel" if the list is empty. */
+ if (eap->line1 != 1 || eap->line2 != 0)
+! EMSG(_(e_invrange));
+ }
+ else
+ {
+--- 2992,3003 ----
+ n = eap->line2 - eap->line1 + 1;
+ if (*eap->arg != NUL)
+ /* Can't have both a range and an argument. */
+! emsg(_(e_invarg));
+ else if (n <= 0)
+ {
+ /* Don't give an error for ":%argdel" if the list is empty. */
+ if (eap->line1 != 1 || eap->line2 != 0)
+! emsg(_(e_invrange));
+ }
+ else
+ {
+***************
+*** 3017,3023 ****
+ }
+ }
+ else if (*eap->arg == NUL)
+! EMSG(_(e_argreq));
+ else
+ do_arglist(eap->arg, AL_DEL, 0, FALSE);
+ #ifdef FEAT_TITLE
+--- 3017,3023 ----
+ }
+ }
+ else if (*eap->arg == NUL)
+! emsg(_(e_argreq));
+ else
+ do_arglist(eap->arg, AL_DEL, 0, FALSE);
+ #ifdef FEAT_TITLE
+***************
+*** 3364,3370 ****
+
+ sprintf((char *)buf, "compiler/%s.vim", eap->arg);
+ if (source_runtime(buf, DIP_ALL) == FAIL)
+! EMSG2(_("E666: compiler not supported: %s"), eap->arg);
+ vim_free(buf);
+
+ do_cmdline_cmd((char_u *)":delcommand CompilerSet");
+--- 3364,3370 ----
+
+ sprintf((char *)buf, "compiler/%s.vim", eap->arg);
+ if (source_runtime(buf, DIP_ALL) == FAIL)
+! semsg(_("E666: compiler not supported: %s"), eap->arg);
+ vim_free(buf);
+
+ do_cmdline_cmd((char_u *)":delcommand CompilerSet");
+***************
+*** 3476,3482 ****
+ if (p_verbose > 1 && name != NULL)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Searching for \"%s\" in \"%s\""),
+ (char *)name, (char *)path);
+ verbose_leave();
+ }
+--- 3476,3482 ----
+ if (p_verbose > 1 && name != NULL)
+ {
+ verbose_enter();
+! smsg(_("Searching for \"%s\" in \"%s\""),
+ (char *)name, (char *)path);
+ verbose_leave();
+ }
+***************
+*** 3524,3530 ****
+ if (p_verbose > 2)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Searching for \"%s\""), buf);
+ verbose_leave();
+ }
+
+--- 3524,3530 ----
+ if (p_verbose > 2)
+ {
+ verbose_enter();
+! smsg(_("Searching for \"%s\""), buf);
+ verbose_leave();
+ }
+
+***************
+*** 3552,3562 ****
+ char *basepath = path == p_rtp ? "runtimepath" : "packpath";
+
+ if (flags & DIP_ERR)
+! EMSG3(_(e_dirnotf), basepath, name);
+ else if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg((char_u *)_("not found in '%s': \"%s\""), basepath, name);
+ verbose_leave();
+ }
+ }
+--- 3552,3562 ----
+ char *basepath = path == p_rtp ? "runtimepath" : "packpath";
+
+ if (flags & DIP_ERR)
+! semsg(_(e_dirnotf), basepath, name);
+ else if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg(_("not found in '%s': \"%s\""), basepath, name);
+ verbose_leave();
+ }
+ }
+***************
+*** 4208,4214 ****
+ cmd_source(char_u *fname, exarg_T *eap)
+ {
+ if (*fname == NUL)
+! EMSG(_(e_argreq));
+
+ else if (eap != NULL && eap->forceit)
+ /* ":source!": read Normal mode commands
+--- 4208,4214 ----
+ cmd_source(char_u *fname, exarg_T *eap)
+ {
+ if (*fname == NUL)
+! emsg(_(e_argreq));
+
+ else if (eap != NULL && eap->forceit)
+ /* ":source!": read Normal mode commands
+***************
+*** 4227,4233 ****
+
+ /* ":source" read ex commands */
+ else if (do_source(fname, FALSE, DOSO_NONE) == FAIL)
+! EMSG2(_(e_notopen), fname);
+ }
+
+ /*
+--- 4227,4233 ----
+
+ /* ":source" read ex commands */
+ else if (do_source(fname, FALSE, DOSO_NONE) == FAIL)
+! semsg(_(e_notopen), fname);
+ }
+
+ /*
+***************
+*** 4371,4377 ****
+ return retval;
+ if (mch_isdir(fname_exp))
+ {
+! smsg((char_u *)_("Cannot source a directory: \"%s\""), fname);
+ goto theend;
+ }
+
+--- 4371,4377 ----
+ return retval;
+ if (mch_isdir(fname_exp))
+ {
+! smsg(_("Cannot source a directory: \"%s\""), fname);
+ goto theend;
+ }
+
+***************
+*** 4430,4438 ****
+ {
+ verbose_enter();
+ if (sourcing_name == NULL)
+! smsg((char_u *)_("could not source \"%s\""), fname);
+ else
+! smsg((char_u *)_("line %ld: could not source \"%s\""),
+ sourcing_lnum, fname);
+ verbose_leave();
+ }
+--- 4430,4438 ----
+ {
+ verbose_enter();
+ if (sourcing_name == NULL)
+! smsg(_("could not source \"%s\""), fname);
+ else
+! smsg(_("line %ld: could not source \"%s\""),
+ sourcing_lnum, fname);
+ verbose_leave();
+ }
+***************
+*** 4448,4456 ****
+ {
+ verbose_enter();
+ if (sourcing_name == NULL)
+! smsg((char_u *)_("sourcing \"%s\""), fname);
+ else
+! smsg((char_u *)_("line %ld: sourcing \"%s\""),
+ sourcing_lnum, fname);
+ verbose_leave();
+ }
+--- 4448,4456 ----
+ {
+ verbose_enter();
+ if (sourcing_name == NULL)
+! smsg(_("sourcing \"%s\""), fname);
+ else
+! smsg(_("line %ld: sourcing \"%s\""),
+ sourcing_lnum, fname);
+ verbose_leave();
+ }
+***************
+*** 4638,4652 ****
+ #endif
+
+ if (got_int)
+! EMSG(_(e_interr));
+ sourcing_name = save_sourcing_name;
+ sourcing_lnum = save_sourcing_lnum;
+ if (p_verbose > 1)
+ {
+ verbose_enter();
+! smsg((char_u *)_("finished sourcing %s"), fname);
+ if (sourcing_name != NULL)
+! smsg((char_u *)_("continuing in %s"), sourcing_name);
+ verbose_leave();
+ }
+ #ifdef STARTUPTIME
+--- 4638,4652 ----
+ #endif
+
+ if (got_int)
+! emsg(_(e_interr));
+ sourcing_name = save_sourcing_name;
+ sourcing_lnum = save_sourcing_lnum;
+ if (p_verbose > 1)
+ {
+ verbose_enter();
+! smsg(_("finished sourcing %s"), fname);
+ if (sourcing_name != NULL)
+! smsg(_("continuing in %s"), sourcing_name);
+ verbose_leave();
+ }
+ #ifdef STARTUPTIME
+***************
+*** 4709,4715 ****
+ {
+ // :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;
+--- 4709,4715 ----
+ {
+ // :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;
+***************
+*** 4723,4729 ****
+ {
+ home_replace(NULL, SCRIPT_ITEM(i).sn_name,
+ NameBuff, MAXPATHL, TRUE);
+! smsg((char_u *)"%3d: %s", i, NameBuff);
+ }
+ }
+
+--- 4723,4729 ----
+ {
+ home_replace(NULL, SCRIPT_ITEM(i).sn_name,
+ NameBuff, MAXPATHL, TRUE);
+! smsg("%3d: %s", i, NameBuff);
+ }
+ }
+
+***************
+*** 5067,5073 ****
+ if (!sp->error)
+ {
+ msg_source(HL_ATTR(HLF_W));
+! EMSG(_("W15: Warning: Wrong line separator, ^M may be missing"));
+ }
+ sp->error = TRUE;
+ sp->fileformat = EOL_UNIX;
+--- 5067,5073 ----
+ if (!sp->error)
+ {
+ msg_source(HL_ATTR(HLF_W));
+! emsg(_("W15: Warning: Wrong line separator, ^M may be missing"));
+ }
+ sp->error = TRUE;
+ sp->fileformat = EOL_UNIX;
+***************
+*** 5200,5206 ****
+
+ if (!getline_equal(eap->getline, eap->cookie, getsourceline))
+ {
+! EMSG(_("E167: :scriptencoding used outside of a sourced file"));
+ return;
+ }
+
+--- 5200,5206 ----
+
+ if (!getline_equal(eap->getline, eap->cookie, getsourceline))
+ {
+! emsg(_("E167: :scriptencoding used outside of a sourced file"));
+ return;
+ }
+
+***************
+*** 5232,5238 ****
+ if (getline_equal(eap->getline, eap->cookie, getsourceline))
+ do_finish(eap, FALSE);
+ else
+! EMSG(_("E168: :finish used outside of a sourced file"));
+ }
+
+ /*
+--- 5232,5238 ----
+ if (getline_equal(eap->getline, eap->cookie, getsourceline))
+ do_finish(eap, FALSE);
+ else
+! emsg(_("E168: :finish used outside of a sourced file"));
+ }
+
+ /*
+***************
+*** 5553,5559 ****
+ p = (char_u *)setlocale(what, NULL);
+ if (p == NULL || *p == NUL)
+ p = (char_u *)"Unknown";
+! smsg((char_u *)_("Current %slanguage: \"%s\""), whatstr, p);
+ }
+ else
+ {
+--- 5553,5559 ----
+ p = (char_u *)setlocale(what, NULL);
+ if (p == NULL || *p == NUL)
+ p = (char_u *)"Unknown";
+! smsg(_("Current %slanguage: \"%s\""), whatstr, p);
+ }
+ else
+ {
+***************
+*** 5570,5576 ****
+ #endif
+ }
+ if (loc == NULL)
+! EMSG2(_("E197: Cannot set language to \"%s\""), name);
+ else
+ {
+ #ifdef HAVE_NL_MSG_CAT_CNTR
+--- 5570,5576 ----
+ #endif
+ }
+ if (loc == NULL)
+! semsg(_("E197: Cannot set language to \"%s\""), name);
+ else
+ {
+ #ifdef HAVE_NL_MSG_CAT_CNTR
+*** ../vim-8.1.0742/src/ex_docmd.c 2019-01-12 16:29:26.327986331 +0100
+--- src/ex_docmd.c 2019-01-13 22:47:57.066356116 +0100
+***************
+*** 126,132 ****
+ # define HAVE_EX_SCRIPT_NI
+ static void ex_script_ni(exarg_T *eap);
+ #endif
+! static char_u *invalid_range(exarg_T *eap);
+ static void correct_range(exarg_T *eap);
+ #ifdef FEAT_QUICKFIX
+ static char_u *replace_makeprg(exarg_T *eap, char_u *p, char_u **cmdlinep);
+--- 126,132 ----
+ # define HAVE_EX_SCRIPT_NI
+ static void ex_script_ni(exarg_T *eap);
+ #endif
+! static char *invalid_range(exarg_T *eap);
+ static void correct_range(exarg_T *eap);
+ #ifdef FEAT_QUICKFIX
+ static char_u *replace_makeprg(exarg_T *eap, char_u *p, char_u **cmdlinep);
+***************
+*** 301,307 ****
+ static void ex_mkrc(exarg_T *eap);
+ static void ex_mark(exarg_T *eap);
+ #ifdef FEAT_USR_CMDS
+! static char_u *uc_fun_cmd(void);
+ static char_u *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int *compl);
+ #endif
+ static void ex_startinsert(exarg_T *eap);
+--- 301,307 ----
+ static void ex_mkrc(exarg_T *eap);
+ static void ex_mark(exarg_T *eap);
+ #ifdef FEAT_USR_CMDS
+! static char *uc_fun_cmd(void);
+ static char_u *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int *compl);
+ #endif
+ static void ex_startinsert(exarg_T *eap);
+***************
+*** 594,600 ****
+ || changedtick != CHANGEDTICK(curbuf)) && !ex_no_reprint)
+ {
+ if (curbuf->b_ml.ml_flags & ML_EMPTY)
+! EMSG(_(e_emptybuf));
+ else
+ {
+ if (ex_pressedreturn)
+--- 594,600 ----
+ || changedtick != CHANGEDTICK(curbuf)) && !ex_no_reprint)
+ {
+ if (curbuf->b_ml.ml_flags & ML_EMPTY)
+! emsg(_(e_emptybuf));
+ else
+ {
+ if (ex_pressedreturn)
+***************
+*** 613,621 ****
+ else if (ex_pressedreturn && !ex_no_reprint) /* must be at EOF */
+ {
+ if (curbuf->b_ml.ml_flags & ML_EMPTY)
+! EMSG(_(e_emptybuf));
+ else
+! EMSG(_("E501: At end-of-file"));
+ }
+ }
+
+--- 613,621 ----
+ else if (ex_pressedreturn && !ex_no_reprint) /* must be at EOF */
+ {
+ if (curbuf->b_ml.ml_flags & ML_EMPTY)
+! emsg(_(e_emptybuf));
+ else
+! emsg(_("E501: At end-of-file"));
+ }
+ }
+
+***************
+*** 718,724 ****
+ #endif
+ )
+ {
+! EMSG(_("E169: Command too recursive"));
+ #ifdef FEAT_EVAL
+ /* When converting to an exception, we do not include the command name
+ * since this is not an error of the specific command. */
+--- 718,724 ----
+ #endif
+ )
+ {
+! emsg(_("E169: Command too recursive"));
+ #ifdef FEAT_EVAL
+ /* When converting to an exception, we do not include the command name
+ * since this is not an error of the specific command. */
+***************
+*** 967,973 ****
+ next_cmdline = vim_strsave(next_cmdline);
+ if (next_cmdline == NULL)
+ {
+! EMSG(_(e_outofmem));
+ retval = FAIL;
+ break;
+ }
+--- 967,973 ----
+ next_cmdline = vim_strsave(next_cmdline);
+ if (next_cmdline == NULL)
+ {
+! emsg(_(e_outofmem));
+ retval = FAIL;
+ break;
+ }
+***************
+*** 1019,1025 ****
+ ++no_wait_return;
+ verbose_enter_scroll();
+
+! smsg((char_u *)_("line %ld: %s"),
+ (long)sourcing_lnum, cmdline_copy);
+ if (msg_silent == 0)
+ msg_puts((char_u *)"\n"); /* don't overwrite this */
+--- 1019,1025 ----
+ ++no_wait_return;
+ verbose_enter_scroll();
+
+! smsg(_("line %ld: %s"),
+ (long)sourcing_lnum, cmdline_copy);
+ if (msg_silent == 0)
+ msg_puts((char_u *)"\n"); /* don't overwrite this */
+***************
+*** 1251,1263 ****
+ && !func_has_ended(real_cookie))))
+ {
+ if (cstack.cs_flags[cstack.cs_idx] & CSF_TRY)
+! EMSG(_(e_endtry));
+ else if (cstack.cs_flags[cstack.cs_idx] & CSF_WHILE)
+! EMSG(_(e_endwhile));
+ else if (cstack.cs_flags[cstack.cs_idx] & CSF_FOR)
+! EMSG(_(e_endfor));
+ else
+! EMSG(_(e_endif));
+ }
+
+ /*
+--- 1251,1263 ----
+ && !func_has_ended(real_cookie))))
+ {
+ if (cstack.cs_flags[cstack.cs_idx] & CSF_TRY)
+! emsg(_(e_endtry));
+ else if (cstack.cs_flags[cstack.cs_idx] & CSF_WHILE)
+! emsg(_(e_endwhile));
+ else if (cstack.cs_flags[cstack.cs_idx] & CSF_FOR)
+! emsg(_(e_endfor));
+ else
+! emsg(_(e_endif));
+ }
+
+ /*
+***************
+*** 1347,1353 ****
+ }
+ else if (p != NULL)
+ {
+! emsg(p);
+ vim_free(p);
+ }
+ vim_free(sourcing_name);
+--- 1347,1353 ----
+ }
+ else if (p != NULL)
+ {
+! semsg(p);
+ vim_free(p);
+ }
+ vim_free(sourcing_name);
+***************
+*** 1700,1706 ****
+ char_u *p;
+ linenr_T lnum;
+ long n;
+! char_u *errormsg = NULL; /* error message */
+ char_u *after_modifier = NULL;
+ exarg_T ea; /* Ex command arguments */
+ int save_msg_scroll = msg_scroll;
+--- 1700,1706 ----
+ char_u *p;
+ linenr_T lnum;
+ long n;
+! char *errormsg = NULL; /* error message */
+ char_u *after_modifier = NULL;
+ exarg_T ea; /* Ex command arguments */
+ int save_msg_scroll = msg_scroll;
+***************
+*** 1898,1904 ****
+ }
+
+ if (ea.line2 < 0)
+! errormsg = (char_u *)_(e_invrange);
+ else
+ {
+ if (ea.line2 == 0)
+--- 1898,1904 ----
+ }
+
+ if (ea.line2 < 0)
+! errormsg = _(e_invrange);
+ else
+ {
+ if (ea.line2 == 0)
+***************
+*** 1938,1944 ****
+ if (p == NULL)
+ {
+ if (!ea.skip)
+! errormsg = (char_u *)_("E464: Ambiguous use of user-defined command");
+ goto doend;
+ }
+ /* Check for wrong commands. */
+--- 1938,1944 ----
+ if (p == NULL)
+ {
+ if (!ea.skip)
+! errormsg = _("E464: Ambiguous use of user-defined command");
+ goto doend;
+ }
+ /* Check for wrong commands. */
+***************
+*** 1963,1969 ****
+ else
+ append_command(*cmdlinep);
+ }
+! errormsg = IObuff;
+ did_emsg_syntax = TRUE;
+ }
+ goto doend;
+--- 1963,1969 ----
+ else
+ append_command(*cmdlinep);
+ }
+! errormsg = (char *)IObuff;
+ did_emsg_syntax = TRUE;
+ }
+ goto doend;
+***************
+*** 2014,2027 ****
+ if (sandbox != 0 && !(ea.argt & SBOXOK))
+ {
+ /* Command not allowed in sandbox. */
+! errormsg = (char_u *)_(e_sandbox);
+ goto doend;
+ }
+ #endif
+ if (!curbuf->b_p_ma && (ea.argt & MODIFY))
+ {
+ /* Command not allowed in non-'modifiable' buffer */
+! errormsg = (char_u *)_(e_modifiable);
+ goto doend;
+ }
+
+--- 2014,2027 ----
+ if (sandbox != 0 && !(ea.argt & SBOXOK))
+ {
+ /* Command not allowed in sandbox. */
+! errormsg = _(e_sandbox);
+ goto doend;
+ }
+ #endif
+ if (!curbuf->b_p_ma && (ea.argt & MODIFY))
+ {
+ /* Command not allowed in non-'modifiable' buffer */
+! errormsg = _(e_modifiable);
+ goto doend;
+ }
+
+***************
+*** 2029,2035 ****
+ && !IS_USER_CMDIDX(ea.cmdidx))
+ {
+ /* Command not allowed when editing the command line. */
+! errormsg = (char_u *)_(get_text_locked_msg());
+ goto doend;
+ }
+
+--- 2029,2035 ----
+ && !IS_USER_CMDIDX(ea.cmdidx))
+ {
+ /* Command not allowed when editing the command line. */
+! errormsg = _(get_text_locked_msg());
+ goto doend;
+ }
+
+***************
+*** 2048,2061 ****
+ if (!ni && !(ea.argt & RANGE) && ea.addr_count > 0)
+ {
+ /* no range allowed */
+! errormsg = (char_u *)_(e_norange);
+ goto doend;
+ }
+ }
+
+ if (!ni && !(ea.argt & BANG) && ea.forceit) /* no <!> allowed */
+ {
+! errormsg = (char_u *)_(e_nobang);
+ goto doend;
+ }
+
+--- 2048,2061 ----
+ if (!ni && !(ea.argt & RANGE) && ea.addr_count > 0)
+ {
+ /* no range allowed */
+! errormsg = _(e_norange);
+ goto doend;
+ }
+ }
+
+ if (!ni && !(ea.argt & BANG) && ea.forceit) /* no <!> allowed */
+ {
+! errormsg = _(e_nobang);
+ goto doend;
+ }
+
+***************
+*** 2076,2082 ****
+ {
+ if (sourcing || exmode_active)
+ {
+! errormsg = (char_u *)_("E493: Backwards range given");
+ goto doend;
+ }
+ if (ask_yesno((char_u *)
+--- 2076,2082 ----
+ {
+ if (sourcing || exmode_active)
+ {
+! errormsg = _("E493: Backwards range given");
+ goto doend;
+ }
+ if (ask_yesno((char_u *)
+***************
+*** 2138,2144 ****
+ while (ea.arg[0] == '+' && ea.arg[1] == '+')
+ if (getargopt(&ea) == FAIL && !ni)
+ {
+! errormsg = (char_u *)_(e_invarg);
+ goto doend;
+ }
+
+--- 2138,2144 ----
+ while (ea.arg[0] == '+' && ea.arg[1] == '+')
+ if (getargopt(&ea) == FAIL && !ni)
+ {
+! errormsg = _(e_invarg);
+ goto doend;
+ }
+
+***************
+*** 2148,2154 ****
+ {
+ if (*++ea.arg != '>') /* typed wrong */
+ {
+! errormsg = (char_u *)_("E494: Use w or w>>");
+ goto doend;
+ }
+ ea.arg = skipwhite(ea.arg + 1);
+--- 2148,2154 ----
+ {
+ if (*++ea.arg != '>') /* typed wrong */
+ {
+! errormsg = _("E494: Use w or w>>");
+ goto doend;
+ }
+ ea.arg = skipwhite(ea.arg + 1);
+***************
+*** 2322,2328 ****
+ ea.arg = skipwhite(ea.arg);
+ if (n <= 0 && !ni && (ea.argt & ZEROR) == 0)
+ {
+! errormsg = (char_u *)_(e_zerocount);
+ goto doend;
+ }
+ if (ea.argt & NOTADR) /* e.g. :buffer 2, :sleep 3 */
+--- 2322,2328 ----
+ ea.arg = skipwhite(ea.arg);
+ if (n <= 0 && !ni && (ea.argt & ZEROR) == 0)
+ {
+! errormsg = _(e_zerocount);
+ goto doend;
+ }
+ if (ea.argt & NOTADR) /* e.g. :buffer 2, :sleep 3 */
+***************
+*** 2354,2366 ****
+ if (!ni && !(ea.argt & EXTRA) && *ea.arg != NUL
+ && *ea.arg != '"' && (*ea.arg != '|' || (ea.argt & TRLBAR) == 0))
+ {
+! errormsg = (char_u *)_(e_trailing);
+ goto doend;
+ }
+
+ if (!ni && (ea.argt & NEEDARG) && *ea.arg == NUL)
+ {
+! errormsg = (char_u *)_(e_argreq);
+ goto doend;
+ }
+
+--- 2354,2366 ----
+ if (!ni && !(ea.argt & EXTRA) && *ea.arg != NUL
+ && *ea.arg != '"' && (*ea.arg != '|' || (ea.argt & TRLBAR) == 0))
+ {
+! errormsg = _(e_trailing);
+ goto doend;
+ }
+
+ if (!ni && (ea.argt & NEEDARG) && *ea.arg == NUL)
+ {
+! errormsg = _(e_argreq);
+ goto doend;
+ }
+
+***************
+*** 2525,2531 ****
+ ea.errmsg = NULL;
+ (cmdnames[ea.cmdidx].cmd_func)(&ea);
+ if (ea.errmsg != NULL)
+! errormsg = (char_u *)_(ea.errmsg);
+ }
+
+ #ifdef FEAT_EVAL
+--- 2525,2531 ----
+ ea.errmsg = NULL;
+ (cmdnames[ea.cmdidx].cmd_func)(&ea);
+ if (ea.errmsg != NULL)
+! errormsg = _(ea.errmsg);
+ }
+
+ #ifdef FEAT_EVAL
+***************
+*** 2560,2569 ****
+ {
+ if (sourcing)
+ {
+! if (errormsg != IObuff)
+ {
+ STRCPY(IObuff, errormsg);
+! errormsg = IObuff;
+ }
+ append_command(*cmdlinep);
+ }
+--- 2560,2569 ----
+ {
+ if (sourcing)
+ {
+! if (errormsg != (char *)IObuff)
+ {
+ STRCPY(IObuff, errormsg);
+! errormsg = (char *)IObuff;
+ }
+ append_command(*cmdlinep);
+ }
+***************
+*** 2633,2639 ****
+ * May set "errormsg" to an error message.
+ */
+ int
+! parse_command_modifiers(exarg_T *eap, char_u **errormsg, int skip_only)
+ {
+ char_u *p;
+
+--- 2633,2639 ----
+ * May set "errormsg" to an error message.
+ */
+ int
+! parse_command_modifiers(exarg_T *eap, char **errormsg, int skip_only)
+ {
+ char_u *p;
+
+***************
+*** 2839,2845 ****
+ {
+ if (tabnr < 0 || tabnr > LAST_TAB_NR)
+ {
+! *errormsg = (char_u *)_(e_invrange);
+ return FAIL;
+ }
+ cmdmod.tab = tabnr + 1;
+--- 2839,2845 ----
+ {
+ if (tabnr < 0 || tabnr > LAST_TAB_NR)
+ {
+! *errormsg = _(e_invrange);
+ return FAIL;
+ }
+ cmdmod.tab = tabnr + 1;
+***************
+*** 2912,2918 ****
+ * 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;
+--- 2912,2918 ----
+ * Return FAIL and set "errormsg" or return OK.
+ */
+ int
+! parse_cmd_address(exarg_T *eap, char **errormsg, int silent)
+ {
+ int address_count = 1;
+ linenr_T lnum;
+***************
+*** 2998,3010 ****
+ {
+ // 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:
+ case ADDR_OTHER:
+! *errormsg = (char_u *)_(e_invrange);
+ return FAIL;
+ case ADDR_ARGUMENTS:
+ if (ARGCOUNT == 0)
+--- 2998,3010 ----
+ {
+ // there is no Vim command which uses '%' and
+ // ADDR_WINDOWS or ADDR_TABS
+! *errormsg = _(e_invrange);
+ return FAIL;
+ }
+ break;
+ case ADDR_TABS_RELATIVE:
+ case ADDR_OTHER:
+! *errormsg = _(e_invrange);
+ return FAIL;
+ case ADDR_ARGUMENTS:
+ if (ARGCOUNT == 0)
+***************
+*** 3033,3039 ****
+ // '*' - visual area
+ if (eap->addr_type != ADDR_LINES)
+ {
+! *errormsg = (char_u *)_(e_invrange);
+ return FAIL;
+ }
+
+--- 3033,3039 ----
+ // '*' - visual area
+ if (eap->addr_type != ADDR_LINES)
+ {
+! *errormsg = _(e_invrange);
+ return FAIL;
+ }
+
+***************
+*** 3216,3222 ****
+
+ if (command_count != (int)CMD_SIZE)
+ {
+! iemsg((char_u *)_("E943: Command table needs to be updated, run 'make cmdidxs'"));
+ getout(1);
+ }
+
+--- 3216,3222 ----
+
+ if (command_count != (int)CMD_SIZE)
+ {
+! iemsg(_("E943: Command table needs to be updated, run 'make cmdidxs'"));
+ getout(1);
+ }
+
+***************
+*** 4491,4497 ****
+ lnum = CURRENT_TAB_NR;
+ break;
+ case ADDR_TABS_RELATIVE:
+! EMSG(_(e_invrange));
+ cmd = NULL;
+ goto error;
+ break;
+--- 4491,4497 ----
+ lnum = CURRENT_TAB_NR;
+ break;
+ case ADDR_TABS_RELATIVE:
+! emsg(_(e_invrange));
+ cmd = NULL;
+ goto error;
+ break;
+***************
+*** 4533,4539 ****
+ lnum = LAST_TAB_NR;
+ break;
+ case ADDR_TABS_RELATIVE:
+! EMSG(_(e_invrange));
+ cmd = NULL;
+ goto error;
+ break;
+--- 4533,4539 ----
+ lnum = LAST_TAB_NR;
+ break;
+ case ADDR_TABS_RELATIVE:
+! emsg(_(e_invrange));
+ cmd = NULL;
+ goto error;
+ break;
+***************
+*** 4555,4561 ****
+ }
+ if (addr_type != ADDR_LINES)
+ {
+! EMSG(_(e_invaddr));
+ cmd = NULL;
+ goto error;
+ }
+--- 4555,4561 ----
+ }
+ if (addr_type != ADDR_LINES)
+ {
+! emsg(_(e_invaddr));
+ cmd = NULL;
+ goto error;
+ }
+***************
+*** 4587,4593 ****
+ c = *cmd++;
+ if (addr_type != ADDR_LINES)
+ {
+! EMSG(_(e_invaddr));
+ cmd = NULL;
+ goto error;
+ }
+--- 4587,4593 ----
+ c = *cmd++;
+ if (addr_type != ADDR_LINES)
+ {
+! emsg(_(e_invaddr));
+ cmd = NULL;
+ goto error;
+ }
+***************
+*** 4637,4643 ****
+ ++cmd;
+ if (addr_type != ADDR_LINES)
+ {
+! EMSG(_(e_invaddr));
+ cmd = NULL;
+ goto error;
+ }
+--- 4637,4643 ----
+ ++cmd;
+ if (addr_type != ADDR_LINES)
+ {
+! emsg(_(e_invaddr));
+ cmd = NULL;
+ goto error;
+ }
+***************
+*** 4647,4653 ****
+ i = RE_SEARCH;
+ else
+ {
+! EMSG(_(e_backslash));
+ cmd = NULL;
+ goto error;
+ }
+--- 4647,4653 ----
+ i = RE_SEARCH;
+ else
+ {
+! emsg(_(e_backslash));
+ cmd = NULL;
+ goto error;
+ }
+***************
+*** 4742,4748 ****
+
+ if (addr_type == ADDR_TABS_RELATIVE)
+ {
+! EMSG(_(e_invrange));
+ cmd = NULL;
+ goto error;
+ }
+--- 4742,4748 ----
+
+ if (addr_type == ADDR_TABS_RELATIVE)
+ {
+! emsg(_(e_invrange));
+ cmd = NULL;
+ goto error;
+ }
+***************
+*** 4797,4803 ****
+ ex_ni(exarg_T *eap)
+ {
+ if (!eap->skip)
+! eap->errmsg = (char_u *)N_("E319: Sorry, the command is not available in this version");
+ }
+
+ #ifdef HAVE_EX_SCRIPT_NI
+--- 4797,4803 ----
+ ex_ni(exarg_T *eap)
+ {
+ if (!eap->skip)
+! eap->errmsg = N_("E319: Sorry, the command is not available in this version");
+ }
+
+ #ifdef HAVE_EX_SCRIPT_NI
+***************
+*** 4819,4832 ****
+ * Check range in Ex command for validity.
+ * Return NULL when valid, error message when invalid.
+ */
+! static char_u *
+ invalid_range(exarg_T *eap)
+ {
+ buf_T *buf;
+ if ( eap->line1 < 0
+ || eap->line2 < 0
+ || eap->line1 > eap->line2)
+! return (char_u *)_(e_invrange);
+
+ if (eap->argt & RANGE)
+ {
+--- 4819,4832 ----
+ * Check range in Ex command for validity.
+ * Return NULL when valid, error message when invalid.
+ */
+! static char *
+ invalid_range(exarg_T *eap)
+ {
+ buf_T *buf;
+ if ( eap->line1 < 0
+ || eap->line2 < 0
+ || eap->line1 > eap->line2)
+! return _(e_invrange);
+
+ if (eap->argt & RANGE)
+ {
+***************
+*** 4839,4883 ****
+ + (eap->cmdidx == CMD_diffget)
+ #endif
+ )
+! return (char_u *)_(e_invrange);
+ break;
+ case ADDR_ARGUMENTS:
+ /* add 1 if ARGCOUNT is 0 */
+ if (eap->line2 > ARGCOUNT + (!ARGCOUNT))
+! return (char_u *)_(e_invrange);
+ break;
+ case ADDR_BUFFERS:
+ if (eap->line1 < firstbuf->b_fnum
+ || eap->line2 > lastbuf->b_fnum)
+! return (char_u *)_(e_invrange);
+ break;
+ case ADDR_LOADED_BUFFERS:
+ buf = firstbuf;
+ while (buf->b_ml.ml_mfp == NULL)
+ {
+ if (buf->b_next == NULL)
+! return (char_u *)_(e_invrange);
+ buf = buf->b_next;
+ }
+ if (eap->line1 < buf->b_fnum)
+! return (char_u *)_(e_invrange);
+ buf = lastbuf;
+ while (buf->b_ml.ml_mfp == NULL)
+ {
+ if (buf->b_prev == NULL)
+! return (char_u *)_(e_invrange);
+ buf = buf->b_prev;
+ }
+ if (eap->line2 > buf->b_fnum)
+! return (char_u *)_(e_invrange);
+ break;
+ case ADDR_WINDOWS:
+ if (eap->line2 > LAST_WIN_NR)
+! return (char_u *)_(e_invrange);
+ break;
+ case ADDR_TABS:
+ if (eap->line2 > LAST_TAB_NR)
+! return (char_u *)_(e_invrange);
+ break;
+ case ADDR_TABS_RELATIVE:
+ /* Do nothing */
+--- 4839,4883 ----
+ + (eap->cmdidx == CMD_diffget)
+ #endif
+ )
+! return _(e_invrange);
+ break;
+ case ADDR_ARGUMENTS:
+ /* add 1 if ARGCOUNT is 0 */
+ if (eap->line2 > ARGCOUNT + (!ARGCOUNT))
+! return _(e_invrange);
+ break;
+ case ADDR_BUFFERS:
+ if (eap->line1 < firstbuf->b_fnum
+ || eap->line2 > lastbuf->b_fnum)
+! return _(e_invrange);
+ break;
+ case ADDR_LOADED_BUFFERS:
+ buf = firstbuf;
+ while (buf->b_ml.ml_mfp == NULL)
+ {
+ if (buf->b_next == NULL)
+! return _(e_invrange);
+ buf = buf->b_next;
+ }
+ if (eap->line1 < buf->b_fnum)
+! return _(e_invrange);
+ buf = lastbuf;
+ while (buf->b_ml.ml_mfp == NULL)
+ {
+ if (buf->b_prev == NULL)
+! return _(e_invrange);
+ buf = buf->b_prev;
+ }
+ if (eap->line2 > buf->b_fnum)
+! return _(e_invrange);
+ break;
+ case ADDR_WINDOWS:
+ if (eap->line2 > LAST_WIN_NR)
+! return _(e_invrange);
+ break;
+ case ADDR_TABS:
+ if (eap->line2 > LAST_TAB_NR)
+! return _(e_invrange);
+ break;
+ case ADDR_TABS_RELATIVE:
+ /* Do nothing */
+***************
+*** 4885,4891 ****
+ #ifdef FEAT_QUICKFIX
+ case ADDR_QUICKFIX:
+ if (eap->line2 != 1 && eap->line2 > qf_get_size(eap))
+! return (char_u *)_(e_invrange);
+ break;
+ #endif
+ }
+--- 4885,4891 ----
+ #ifdef FEAT_QUICKFIX
+ case ADDR_QUICKFIX:
+ if (eap->line2 != 1 && eap->line2 > qf_get_size(eap))
+! return _(e_invrange);
+ break;
+ #endif
+ }
+***************
+*** 5020,5026 ****
+ expand_filename(
+ exarg_T *eap,
+ char_u **cmdlinep,
+! char_u **errormsgp)
+ {
+ int has_wildcards; /* need to expand wildcards */
+ char_u *repl;
+--- 5020,5026 ----
+ expand_filename(
+ exarg_T *eap,
+ char_u **cmdlinep,
+! char **errormsgp)
+ {
+ int has_wildcards; /* need to expand wildcards */
+ char_u *repl;
+***************
+*** 5788,5794 ****
+ 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 */
+ }
+--- 5788,5794 ----
+ return FAIL;
+ }
+ #endif
+! semsg(NGETTEXT("E173: %ld more file to edit",
+ "E173: %ld more files to edit", n), n);
+ quitmore = 2; /* next try to quit is allowed */
+ }
+***************
+*** 5879,5885 ****
+ 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;
+ }
+--- 5879,5885 ----
+ if (!force && (cmd->uc_script_ctx.sc_sid != current_sctx.sc_sid
+ || cmd->uc_script_ctx.sc_seq == current_sctx.sc_seq))
+ {
+! semsg(_("E174: Command already exists: add ! to replace it: %s"),
+ name);
+ goto fail;
+ }
+***************
+*** 6156,6162 ****
+ MSG(_("No user-defined commands found"));
+ }
+
+! static char_u *
+ uc_fun_cmd(void)
+ {
+ static char_u fcmd[] = {0x84, 0xaf, 0x60, 0xb9, 0xaf, 0xb5, 0x60, 0xa4,
+--- 6156,6162 ----
+ MSG(_("No user-defined commands found"));
+ }
+
+! static char *
+ uc_fun_cmd(void)
+ {
+ static char_u fcmd[] = {0x84, 0xaf, 0x60, 0xb9, 0xaf, 0xb5, 0x60, 0xa4,
+***************
+*** 6168,6174 ****
+ for (i = 0; fcmd[i]; ++i)
+ IObuff[i] = fcmd[i] - 0x40;
+ IObuff[i] = 0;
+! return IObuff;
+ }
+
+ static int
+--- 6168,6174 ----
+ for (i = 0; fcmd[i]; ++i)
+ IObuff[i] = fcmd[i] - 0x40;
+ IObuff[i] = 0;
+! return (char *)IObuff;
+ }
+
+ static int
+***************
+*** 6186,6192 ****
+
+ if (len == 0)
+ {
+! EMSG(_("E175: No attribute specified"));
+ return FAIL;
+ }
+
+--- 6186,6192 ----
+
+ if (len == 0)
+ {
+! emsg(_("E175: No attribute specified"));
+ return FAIL;
+ }
+
+***************
+*** 6238,6244 ****
+ else
+ {
+ wrong_nargs:
+! EMSG(_("E176: Invalid number of arguments"));
+ return FAIL;
+ }
+ }
+--- 6238,6244 ----
+ else
+ {
+ wrong_nargs:
+! emsg(_("E176: Invalid number of arguments"));
+ return FAIL;
+ }
+ }
+***************
+*** 6253,6259 ****
+ if (*def >= 0)
+ {
+ two_count:
+! EMSG(_("E177: Count cannot be specified twice"));
+ return FAIL;
+ }
+
+--- 6253,6259 ----
+ if (*def >= 0)
+ {
+ two_count:
+! emsg(_("E177: Count cannot be specified twice"));
+ return FAIL;
+ }
+
+***************
+*** 6263,6269 ****
+ if (p != val + vallen || vallen == 0)
+ {
+ invalid_count:
+! EMSG(_("E178: Invalid default value for count"));
+ return FAIL;
+ }
+ }
+--- 6263,6269 ----
+ if (p != val + vallen || vallen == 0)
+ {
+ invalid_count:
+! emsg(_("E178: Invalid default value for count"));
+ return FAIL;
+ }
+ }
+***************
+*** 6291,6297 ****
+ {
+ if (val == NULL)
+ {
+! EMSG(_("E179: argument required for -complete"));
+ return FAIL;
+ }
+
+--- 6291,6297 ----
+ {
+ if (val == NULL)
+ {
+! emsg(_("E179: argument required for -complete"));
+ return FAIL;
+ }
+
+***************
+*** 6304,6310 ****
+ *argt |= RANGE;
+ if (val == NULL)
+ {
+! EMSG(_("E179: argument required for -addr"));
+ return FAIL;
+ }
+ if (parse_addr_type_arg(val, (int)vallen, argt, addr_type_arg)
+--- 6304,6310 ----
+ *argt |= RANGE;
+ if (val == NULL)
+ {
+! emsg(_("E179: argument required for -addr"));
+ return FAIL;
+ }
+ if (parse_addr_type_arg(val, (int)vallen, argt, addr_type_arg)
+***************
+*** 6317,6323 ****
+ {
+ char_u ch = attr[len];
+ attr[len] = '\0';
+! EMSG2(_("E181: Invalid attribute: %s"), attr);
+ attr[len] = ch;
+ return FAIL;
+ }
+--- 6317,6323 ----
+ {
+ char_u ch = attr[len];
+ attr[len] = '\0';
+! semsg(_("E181: Invalid attribute: %s"), attr);
+ attr[len] = ch;
+ return FAIL;
+ }
+***************
+*** 6365,6371 ****
+ ++p;
+ if (!ends_excmd(*p) && !VIM_ISWHITE(*p))
+ {
+! EMSG(_("E182: Invalid command name"));
+ return;
+ }
+ end = p;
+--- 6365,6371 ----
+ ++p;
+ if (!ends_excmd(*p) && !VIM_ISWHITE(*p))
+ {
+! emsg(_("E182: Invalid command name"));
+ return;
+ }
+ end = p;
+***************
+*** 6381,6394 ****
+ }
+ else if (!ASCII_ISUPPER(*name))
+ {
+! EMSG(_("E183: User defined commands must start with an uppercase letter"));
+ return;
+ }
+ else if ((name_len == 1 && *name == 'X')
+ || (name_len <= 4
+ && STRNCMP(name, "Next", name_len > 4 ? 4 : name_len) == 0))
+ {
+! EMSG(_("E841: Reserved name, cannot be used for user defined command"));
+ return;
+ }
+ else
+--- 6381,6394 ----
+ }
+ else if (!ASCII_ISUPPER(*name))
+ {
+! emsg(_("E183: User defined commands must start with an uppercase letter"));
+ return;
+ }
+ else if ((name_len == 1 && *name == 'X')
+ || (name_len <= 4
+ && STRNCMP(name, "Next", name_len > 4 ? 4 : name_len) == 0))
+ {
+! emsg(_("E841: Reserved name, cannot be used for user defined command"));
+ return;
+ }
+ else
+***************
+*** 6453,6459 ****
+
+ if (cmp != 0)
+ {
+! EMSG2(_("E184: No such user-defined command: %s"), eap->arg);
+ return;
+ }
+
+--- 6453,6459 ----
+
+ if (cmp != 0)
+ {
+! semsg(_("E184: No such user-defined command: %s"), eap->arg);
+ return;
+ }
+
+***************
+*** 7116,7122 ****
+ for (i = 0; err[i] != NUL && !VIM_ISWHITE(err[i]); i++)
+ ;
+ err[i] = NUL;
+! EMSG2(_("E180: Invalid address type value: %s"), err);
+ return FAIL;
+ }
+
+--- 7116,7122 ----
+ for (i = 0; err[i] != NUL && !VIM_ISWHITE(err[i]); i++)
+ ;
+ err[i] = NUL;
+! semsg(_("E180: Invalid address type value: %s"), err);
+ return FAIL;
+ }
+
+***************
+*** 7182,7188 ****
+
+ if (command_complete[i].expand == 0)
+ {
+! EMSG2(_("E180: Invalid complete value: %s"), value);
+ return FAIL;
+ }
+
+--- 7182,7188 ----
+
+ if (command_complete[i].expand == 0)
+ {
+! semsg(_("E180: Invalid complete value: %s"), value);
+ return FAIL;
+ }
+
+***************
+*** 7193,7199 ****
+ if (arg != NULL)
+ # endif
+ {
+! EMSG(_("E468: Completion argument only allowed for custom completion"));
+ return FAIL;
+ }
+
+--- 7193,7199 ----
+ if (arg != NULL)
+ # endif
+ {
+! emsg(_("E468: Completion argument only allowed for custom completion"));
+ return FAIL;
+ }
+
+***************
+*** 7201,7207 ****
+ if ((*complp == EXPAND_USER_DEFINED || *complp == EXPAND_USER_LIST)
+ && arg == NULL)
+ {
+! EMSG(_("E467: Custom completion requires a function argument"));
+ return FAIL;
+ }
+
+--- 7201,7207 ----
+ if ((*complp == EXPAND_USER_DEFINED || *complp == EXPAND_USER_LIST)
+ && arg == NULL)
+ {
+! emsg(_("E467: Custom completion requires a function argument"));
+ return FAIL;
+ }
+
+***************
+*** 7252,7258 ****
+ #endif
+ }
+ else if (load_colors(eap->arg) == FAIL)
+! EMSG2(_("E185: Cannot find color scheme '%s'"), eap->arg);
+ }
+
+ static void
+--- 7252,7258 ----
+ #endif
+ }
+ else if (load_colors(eap->arg) == FAIL)
+! semsg(_("E185: Cannot find color scheme '%s'"), eap->arg);
+ }
+
+ static void
+***************
+*** 7636,7642 ****
+ else
+ # endif
+ if (first_tabpage->tp_next == NULL)
+! EMSG(_("E784: Cannot close last tab page"));
+ else
+ {
+ tab_number = get_tabpage_arg(eap);
+--- 7636,7642 ----
+ else
+ # endif
+ if (first_tabpage->tp_next == NULL)
+! emsg(_("E784: Cannot close last tab page"));
+ else
+ {
+ tab_number = get_tabpage_arg(eap);
+***************
+*** 7909,7915 ****
+ ex_print(exarg_T *eap)
+ {
+ if (curbuf->b_ml.ml_flags & ML_EMPTY)
+! EMSG(_(e_emptybuf));
+ else
+ {
+ for ( ;!got_int; ui_breakcheck())
+--- 7909,7915 ----
+ ex_print(exarg_T *eap)
+ {
+ if (curbuf->b_ml.ml_flags & ML_EMPTY)
+! emsg(_(e_emptybuf));
+ else
+ {
+ for ( ;!got_int; ui_breakcheck())
+***************
+*** 8199,8205 ****
+
+ if (recursive)
+ {
+! EMSG(_(e_au_recursive));
+ return;
+ }
+ ++recursive;
+--- 8199,8205 ----
+
+ if (recursive)
+ {
+! emsg(_(e_au_recursive));
+ return;
+ }
+ ++recursive;
+***************
+*** 8692,8698 ****
+ if (vim_regexec(&regmatch, p, (colnr_T)0))
+ curwin->w_cursor.col = (colnr_T)(regmatch.startp[0] - p);
+ else
+! EMSG(_(e_nomatch));
+ vim_regfree(regmatch.regprog);
+ }
+ /* Move to the NUL, ignore any other arguments. */
+--- 8692,8698 ----
+ if (vim_regexec(&regmatch, p, (colnr_T)0))
+ curwin->w_cursor.col = (colnr_T)(regmatch.startp[0] - p);
+ else
+! emsg(_(e_nomatch));
+ vim_regfree(regmatch.regprog);
+ }
+ /* Move to the NUL, ignore any other arguments. */
+***************
+*** 9059,9065 ****
+ #if defined(FEAT_EVAL)
+ if (!aborting())
+ #endif
+! EMSG2(_(e_notopen), eap->arg);
+ }
+ else
+ {
+--- 9059,9065 ----
+ #if defined(FEAT_EVAL)
+ if (!aborting())
+ #endif
+! semsg(_(e_notopen), eap->arg);
+ }
+ else
+ {
+***************
+*** 9148,9154 ****
+ if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged()
+ && !eap->forceit)
+ {
+! EMSG(_("E747: Cannot change directory, buffer is modified (add ! to override)"));
+ return;
+ }
+
+--- 9148,9154 ----
+ if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged()
+ && !eap->forceit)
+ {
+! emsg(_("E747: Cannot change directory, buffer is modified (add ! to override)"));
+ return;
+ }
+
+***************
+*** 9157,9163 ****
+ {
+ if (prev_dir == NULL)
+ {
+! EMSG(_("E186: No previous directory"));
+ return;
+ }
+ new_dir = prev_dir;
+--- 9157,9163 ----
+ {
+ if (prev_dir == NULL)
+ {
+! emsg(_("E186: No previous directory"));
+ return;
+ }
+ new_dir = prev_dir;
+***************
+*** 9192,9198 ****
+ dir_differs = new_dir == NULL || prev_dir == NULL
+ || pathcmp((char *)prev_dir, (char *)new_dir, -1) != 0;
+ if (new_dir == NULL || (dir_differs && vim_chdir(new_dir)))
+! EMSG(_(e_failed));
+ else
+ {
+ int is_local_chdir = eap->cmdidx == CMD_lcd
+--- 9192,9198 ----
+ dir_differs = new_dir == NULL || prev_dir == NULL
+ || pathcmp((char *)prev_dir, (char *)new_dir, -1) != 0;
+ if (new_dir == NULL || (dir_differs && vim_chdir(new_dir)))
+! emsg(_(e_failed));
+ else
+ {
+ int is_local_chdir = eap->cmdidx == CMD_lcd
+***************
+*** 9227,9233 ****
+ msg(NameBuff);
+ }
+ else
+! EMSG(_("E187: Unknown"));
+ }
+
+ /*
+--- 9227,9233 ----
+ msg(NameBuff);
+ }
+ else
+! emsg(_("E187: Unknown"));
+ }
+
+ /*
+***************
+*** 9236,9242 ****
+ static void
+ ex_equal(exarg_T *eap)
+ {
+! smsg((char_u *)"%ld", (long)eap->line2);
+ ex_may_print(eap);
+ }
+
+--- 9236,9242 ----
+ static void
+ ex_equal(exarg_T *eap)
+ {
+! smsg("%ld", (long)eap->line2);
+ ex_may_print(eap);
+ }
+
+***************
+*** 9258,9264 ****
+ {
+ case 'm': break;
+ case NUL: len *= 1000L; break;
+! default: EMSG2(_(e_invarg2), eap->arg); return;
+ }
+ do_sleep(len);
+ }
+--- 9258,9264 ----
+ {
+ case 'm': break;
+ case NUL: len *= 1000L; break;
+! default: semsg(_(e_invarg2), eap->arg); return;
+ }
+ do_sleep(len);
+ }
+***************
+*** 9322,9330 ****
+ switch (do_map((*cmdp == 'n') ? 2 : (*cmdp == 'u'),
+ eap->arg, mode, isabbrev))
+ {
+! case 1: EMSG(_(e_invarg));
+ break;
+! case 2: EMSG(isabbrev ? _(e_noabbr) : _(e_nomap));
+ break;
+ }
+ }
+--- 9322,9330 ----
+ switch (do_map((*cmdp == 'n') ? 2 : (*cmdp == 'u'),
+ eap->arg, mode, isabbrev))
+ {
+! case 1: emsg(_(e_invarg));
+ break;
+! case 2: emsg((isabbrev ? _(e_noabbr) : _(e_nomap)));
+ break;
+ }
+ }
+***************
+*** 9346,9352 ****
+ if (*p != NUL && *arg == NUL)
+ set_shellsize(w, h, TRUE);
+ else
+! EMSG(_("E465: :winsize requires two number arguments"));
+ }
+
+ static void
+--- 9346,9352 ----
+ if (*p != NUL && *arg == NUL)
+ set_shellsize(w, h, TRUE);
+ else
+! emsg(_("E465: :winsize requires two number arguments"));
+ }
+
+ static void
+***************
+*** 9360,9366 ****
+ /* CTRL-W g and CTRL-W CTRL-G have an extra command character */
+ if (eap->arg[1] == NUL)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+ xchar = eap->arg[1];
+--- 9360,9366 ----
+ /* CTRL-W g and CTRL-W CTRL-G have an extra command character */
+ if (eap->arg[1] == NUL)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+ xchar = eap->arg[1];
+***************
+*** 9372,9378 ****
+ eap->nextcmd = check_nextcmd(p);
+ p = skipwhite(p);
+ if (*p != NUL && *p != '"' && eap->nextcmd == NULL)
+! EMSG(_(e_invarg));
+ else if (!eap->skip)
+ {
+ /* Pass flags on for ":vertical wincmd ]". */
+--- 9372,9378 ----
+ eap->nextcmd = check_nextcmd(p);
+ p = skipwhite(p);
+ if (*p != NUL && *p != '"' && eap->nextcmd == NULL)
+! emsg(_(e_invarg));
+ else if (!eap->skip)
+ {
+ /* Pass flags on for ":vertical wincmd ]". */
+***************
+*** 9409,9415 ****
+ }
+ else
+ # endif
+! EMSG(_("E188: Obtaining window position not implemented for this platform"));
+ }
+ else
+ {
+--- 9409,9415 ----
+ }
+ else
+ # endif
+! emsg(_("E188: Obtaining window position not implemented for this platform"));
+ }
+ else
+ {
+***************
+*** 9419,9425 ****
+ y = getdigits(&arg);
+ if (*p == NUL || *arg != NUL)
+ {
+! EMSG(_("E466: :winpos requires two number arguments"));
+ return;
+ }
+ # ifdef FEAT_GUI
+--- 9419,9425 ----
+ y = getdigits(&arg);
+ if (*p == NUL || *arg != NUL)
+ {
+! emsg(_("E466: :winpos requires two number arguments"));
+ return;
+ }
+ # ifdef FEAT_GUI
+***************
+*** 9544,9550 ****
+ */
+ if (n == MAXLNUM || n < 0 || n > curbuf->b_ml.ml_line_count)
+ {
+! EMSG(_(e_invaddr));
+ return;
+ }
+
+--- 9544,9550 ----
+ */
+ if (n == MAXLNUM || n < 0 || n > curbuf->b_ml.ml_line_count)
+ {
+! emsg(_(e_invaddr));
+ return;
+ }
+
+***************
+*** 9731,9737 ****
+ }
+
+ if (*p != NUL)
+! EMSG2(_(e_invarg2), eap->arg);
+ else
+ undo_time(eap->cmdidx == CMD_earlier ? -count : count,
+ sec, file, FALSE);
+--- 9731,9737 ----
+ }
+
+ if (*p != NUL)
+! semsg(_(e_invarg2), eap->arg);
+ else
+ undo_time(eap->cmdidx == CMD_earlier ? -count : count,
+ sec, file, FALSE);
+***************
+*** 9750,9756 ****
+ #ifdef FEAT_EVAL
+ if (redir_execute)
+ {
+! EMSG(_("E930: Cannot use :redir inside execute()"));
+ return;
+ }
+ #endif
+--- 9750,9756 ----
+ #ifdef FEAT_EVAL
+ if (redir_execute)
+ {
+! emsg(_("E930: Cannot use :redir inside execute()"));
+ return;
+ }
+ #endif
+***************
+*** 9827,9833 ****
+ if (*arg != NUL)
+ {
+ redir_reg = 0;
+! EMSG2(_(e_invarg2), eap->arg);
+ }
+ }
+ else if (*arg == '=' && arg[1] == '>')
+--- 9827,9833 ----
+ if (*arg != NUL)
+ {
+ redir_reg = 0;
+! semsg(_(e_invarg2), eap->arg);
+ }
+ }
+ else if (*arg == '=' && arg[1] == '>')
+***************
+*** 9854,9860 ****
+ /* TODO: redirect to a buffer */
+
+ else
+! EMSG2(_(e_invarg2), eap->arg);
+ }
+
+ /* Make sure redirection is not off. Can happen for cmdline completion
+--- 9854,9860 ----
+ /* TODO: redirect to a buffer */
+
+ else
+! semsg(_(e_invarg2), eap->arg);
+ }
+
+ /* Make sure redirection is not off. Can happen for cmdline completion
+***************
+*** 10130,10136 ****
+ || ((ssop_flags & SSOP_CURDIR) && globaldir != NULL)))
+ {
+ if (mch_chdir((char *)dirnow) != 0)
+! EMSG(_(e_prev_dir));
+ shorten_fnames(TRUE);
+ }
+ vim_free(dirnow);
+--- 10130,10136 ----
+ || ((ssop_flags & SSOP_CURDIR) && globaldir != NULL)))
+ {
+ if (mch_chdir((char *)dirnow) != 0)
+! emsg(_(e_prev_dir));
+ shorten_fnames(TRUE);
+ }
+ vim_free(dirnow);
+***************
+*** 10163,10169 ****
+ failed |= fclose(fd);
+
+ if (failed)
+! EMSG(_(e_write));
+ #if defined(FEAT_EVAL) && defined(FEAT_SESSION)
+ else if (eap->cmdidx == CMD_mksession)
+ {
+--- 10163,10169 ----
+ failed |= fclose(fd);
+
+ if (failed)
+! emsg(_(e_write));
+ #if defined(FEAT_EVAL) && defined(FEAT_SESSION)
+ else if (eap->cmdidx == CMD_mksession)
+ {
+***************
+*** 10200,10206 ****
+ {
+ if (vim_mkdir(name, prot) != 0)
+ {
+! EMSG2(_("E739: Cannot create directory: %s"), name);
+ return FAIL;
+ }
+ return OK;
+--- 10200,10206 ----
+ {
+ if (vim_mkdir(name, prot) != 0)
+ {
+! semsg(_("E739: Cannot create directory: %s"), name);
+ return FAIL;
+ }
+ return OK;
+***************
+*** 10223,10240 ****
+ /* with Unix it is possible to open a directory */
+ if (mch_isdir(fname))
+ {
+! EMSG2(_(e_isadir2), fname);
+ return NULL;
+ }
+ #endif
+ if (!forceit && *mode != 'a' && vim_fexists(fname))
+ {
+! EMSG2(_("E189: \"%s\" exists (add ! to override)"), fname);
+ return NULL;
+ }
+
+ if ((fd = mch_fopen((char *)fname, mode)) == NULL)
+! EMSG2(_("E190: Cannot open \"%s\" for writing"), fname);
+
+ return fd;
+ }
+--- 10223,10240 ----
+ /* with Unix it is possible to open a directory */
+ if (mch_isdir(fname))
+ {
+! semsg(_(e_isadir2), fname);
+ return NULL;
+ }
+ #endif
+ if (!forceit && *mode != 'a' && vim_fexists(fname))
+ {
+! semsg(_("E189: \"%s\" exists (add ! to override)"), fname);
+ return NULL;
+ }
+
+ if ((fd = mch_fopen((char *)fname, mode)) == NULL)
+! semsg(_("E190: Cannot open \"%s\" for writing"), fname);
+
+ return fd;
+ }
+***************
+*** 10248,10263 ****
+ pos_T pos;
+
+ if (*eap->arg == NUL) /* No argument? */
+! EMSG(_(e_argreq));
+ else if (eap->arg[1] != NUL) /* more than one character? */
+! EMSG(_(e_trailing));
+ else
+ {
+ pos = curwin->w_cursor; /* save curwin->w_cursor */
+ curwin->w_cursor.lnum = eap->line2;
+ beginline(BL_WHITE | BL_FIX);
+ if (setmark(*eap->arg) == FAIL) /* set mark */
+! EMSG(_("E191: Argument must be a letter or forward/backward quote"));
+ curwin->w_cursor = pos; /* restore curwin->w_cursor */
+ }
+ }
+--- 10248,10263 ----
+ pos_T pos;
+
+ if (*eap->arg == NUL) /* No argument? */
+! emsg(_(e_argreq));
+ else if (eap->arg[1] != NUL) /* more than one character? */
+! emsg(_(e_trailing));
+ else
+ {
+ pos = curwin->w_cursor; /* save curwin->w_cursor */
+ curwin->w_cursor.lnum = eap->line2;
+ beginline(BL_WHITE | BL_FIX);
+ if (setmark(*eap->arg) == FAIL) /* set mark */
+! emsg(_("E191: Argument must be a letter or forward/backward quote"));
+ curwin->w_cursor = pos; /* restore curwin->w_cursor */
+ }
+ }
+***************
+*** 10339,10350 ****
+
+ if (ex_normal_lock > 0)
+ {
+! EMSG(_(e_secure));
+ return;
+ }
+ if (ex_normal_busy >= p_mmd)
+ {
+! EMSG(_("E192: Recursive use of :normal too deep"));
+ return;
+ }
+
+--- 10339,10350 ----
+
+ if (ex_normal_lock > 0)
+ {
+! emsg(_(e_secure));
+ return;
+ }
+ if (ex_normal_busy >= p_mmd)
+ {
+! emsg(_("E192: Recursive use of :normal too deep"));
+ return;
+ }
+
+***************
+*** 10817,10823 ****
+ char_u *srcstart, /* beginning of valid memory for src */
+ int *usedlen, /* characters after src that are used */
+ linenr_T *lnump, /* line number for :e command, or NULL */
+! char_u **errormsg, /* pointer to error message */
+ int *escaped) /* return value has escaped white space (can
+ * be NULL) */
+ {
+--- 10817,10823 ----
+ char_u *srcstart, /* beginning of valid memory for src */
+ int *usedlen, /* characters after src that are used */
+ linenr_T *lnump, /* line number for :e command, or NULL */
+! char **errormsg, /* pointer to error message */
+ int *escaped) /* return value has escaped white space (can
+ * be NULL) */
+ {
+***************
+*** 10872,10878 ****
+ : FIND_STRING);
+ if (resultlen == 0)
+ {
+! *errormsg = (char_u *)"";
+ return NULL;
+ }
+ }
+--- 10872,10878 ----
+ : FIND_STRING);
+ if (resultlen == 0)
+ {
+! *errormsg = "";
+ return NULL;
+ }
+ }
+***************
+*** 10938,10944 ****
+ (long)i);
+ if (result == NULL)
+ {
+! *errormsg = (char_u *)"";
+ return NULL;
+ }
+ #else
+--- 10938,10944 ----
+ (long)i);
+ if (result == NULL)
+ {
+! *errormsg = "";
+ return NULL;
+ }
+ #else
+***************
+*** 10953,10959 ****
+ buf = buflist_findnr(i);
+ if (buf == NULL)
+ {
+! *errormsg = (char_u *)_("E194: No alternate file name to substitute for '#'");
+ return NULL;
+ }
+ if (lnump != NULL)
+--- 10953,10959 ----
+ buf = buflist_findnr(i);
+ if (buf == NULL)
+ {
+! *errormsg = _("E194: No alternate file name to substitute for '#'");
+ return NULL;
+ }
+ if (lnump != NULL)
+***************
+*** 10978,10984 ****
+ result = file_name_at_cursor(FNAME_MESS|FNAME_HYP, 1L, NULL);
+ if (result == NULL)
+ {
+! *errormsg = (char_u *)"";
+ return NULL;
+ }
+ resultbuf = result; /* remember allocated string */
+--- 10978,10984 ----
+ result = file_name_at_cursor(FNAME_MESS|FNAME_HYP, 1L, NULL);
+ if (result == NULL)
+ {
+! *errormsg = "";
+ return NULL;
+ }
+ resultbuf = result; /* remember allocated string */
+***************
+*** 10998,11004 ****
+ }
+ if (result == NULL)
+ {
+! *errormsg = (char_u *)_("E495: no autocommand file name to substitute for \"<afile>\"");
+ return NULL;
+ }
+ result = shorten_fname1(result);
+--- 10998,11004 ----
+ }
+ if (result == NULL)
+ {
+! *errormsg = _("E495: no autocommand file name to substitute for \"<afile>\"");
+ return NULL;
+ }
+ result = shorten_fname1(result);
+***************
+*** 11007,11013 ****
+ case SPEC_ABUF: /* buffer number for autocommand */
+ if (autocmd_bufnr <= 0)
+ {
+! *errormsg = (char_u *)_("E496: no autocommand buffer number to substitute for \"<abuf>\"");
+ return NULL;
+ }
+ sprintf((char *)strbuf, "%d", autocmd_bufnr);
+--- 11007,11013 ----
+ case SPEC_ABUF: /* buffer number for autocommand */
+ if (autocmd_bufnr <= 0)
+ {
+! *errormsg = _("E496: no autocommand buffer number to substitute for \"<abuf>\"");
+ return NULL;
+ }
+ sprintf((char *)strbuf, "%d", autocmd_bufnr);
+***************
+*** 11018,11024 ****
+ result = autocmd_match;
+ if (result == NULL)
+ {
+! *errormsg = (char_u *)_("E497: no autocommand match name to substitute for \"<amatch>\"");
+ return NULL;
+ }
+ break;
+--- 11018,11024 ----
+ result = autocmd_match;
+ if (result == NULL)
+ {
+! *errormsg = _("E497: no autocommand match name to substitute for \"<amatch>\"");
+ return NULL;
+ }
+ break;
+***************
+*** 11027,11033 ****
+ result = sourcing_name;
+ if (result == NULL)
+ {
+! *errormsg = (char_u *)_("E498: no :source file name to substitute for \"<sfile>\"");
+ return NULL;
+ }
+ break;
+--- 11027,11033 ----
+ result = sourcing_name;
+ if (result == NULL)
+ {
+! *errormsg = _("E498: no :source file name to substitute for \"<sfile>\"");
+ return NULL;
+ }
+ break;
+***************
+*** 11035,11041 ****
+ case SPEC_SLNUM: /* line in file for ":so" command */
+ if (sourcing_name == NULL || sourcing_lnum == 0)
+ {
+! *errormsg = (char_u *)_("E842: no line number to use for \"<slnum>\"");
+ return NULL;
+ }
+ sprintf((char *)strbuf, "%ld", (long)sourcing_lnum);
+--- 11035,11041 ----
+ case SPEC_SLNUM: /* line in file for ":so" command */
+ if (sourcing_name == NULL || sourcing_lnum == 0)
+ {
+! *errormsg = _("E842: no line number to use for \"<slnum>\"");
+ return NULL;
+ }
+ sprintf((char *)strbuf, "%ld", (long)sourcing_lnum);
+***************
+*** 11046,11052 ****
+ 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",
+--- 11046,11052 ----
+ case SPEC_SFLNUM: /* line in script file */
+ if (current_sctx.sc_lnum + sourcing_lnum == 0)
+ {
+! *errormsg = _("E961: no line number to use for \"<sflnum>\"");
+ return NULL;
+ }
+ sprintf((char *)strbuf, "%ld",
+***************
+*** 11082,11088 ****
+ &resultlen);
+ if (result == NULL)
+ {
+! *errormsg = (char_u *)"";
+ return NULL;
+ }
+ }
+--- 11082,11088 ----
+ &resultlen);
+ if (result == NULL)
+ {
+! *errormsg = "";
+ return NULL;
+ }
+ }
+***************
+*** 11093,11101 ****
+ {
+ if (valid != VALID_HEAD + VALID_PATH)
+ /* xgettext:no-c-format */
+! *errormsg = (char_u *)_("E499: Empty file name for '%' or '#', only works with \":p:h\"");
+ else
+! *errormsg = (char_u *)_("E500: Evaluates to an empty string");
+ result = NULL;
+ }
+ else
+--- 11093,11101 ----
+ {
+ if (valid != VALID_HEAD + VALID_PATH)
+ /* xgettext:no-c-format */
+! *errormsg = _("E499: Empty file name for '%' or '#', only works with \":p:h\"");
+ else
+! *errormsg = _("E500: Evaluates to an empty string");
+ result = NULL;
+ }
+ else
+***************
+*** 11182,11188 ****
+ char_u *
+ expand_sfile(char_u *arg)
+ {
+! char_u *errormsg;
+ int len;
+ char_u *result;
+ char_u *newres;
+--- 11182,11188 ----
+ char_u *
+ expand_sfile(char_u *arg)
+ {
+! char *errormsg;
+ int len;
+ char_u *result;
+ char_u *newres;
+***************
+*** 12139,12145 ****
+
+ if (curbuf->b_ffname == NULL)
+ {
+! EMSG(_(e_noname));
+ return NULL;
+ }
+ sname = home_replace_save(NULL, curbuf->b_ffname);
+--- 12139,12145 ----
+
+ if (curbuf->b_ffname == NULL)
+ {
+! emsg(_(e_noname));
+ return NULL;
+ }
+ sname = home_replace_save(NULL, curbuf->b_ffname);
+***************
+*** 12242,12248 ****
+ {
+ if (read_viminfo(eap->arg, VIF_WANT_INFO | VIF_WANT_MARKS
+ | (eap->forceit ? VIF_FORCEIT : 0)) == FAIL)
+! EMSG(_("E195: Cannot open viminfo file for reading"));
+ }
+ else
+ write_viminfo(eap->arg, eap->forceit);
+--- 12242,12248 ----
+ {
+ if (read_viminfo(eap->arg, VIF_WANT_INFO | VIF_WANT_MARKS
+ | (eap->forceit ? VIF_FORCEIT : 0)) == FAIL)
+! emsg(_("E195: Cannot open viminfo file for reading"));
+ }
+ else
+ write_viminfo(eap->arg, eap->forceit);
+***************
+*** 12286,12292 ****
+ set_option_value((char_u *)"keymodel", 0L, (char_u *)"", 0);
+ }
+ else
+! EMSG2(_(e_invarg2), eap->arg);
+ }
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+--- 12286,12292 ----
+ set_option_value((char_u *)"keymodel", 0L, (char_u *)"", 0);
+ }
+ else
+! semsg(_(e_invarg2), eap->arg);
+ }
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+***************
+*** 12348,12354 ****
+ if (*eap->arg == NUL)
+ {
+ /* Print current status. */
+! smsg((char_u *)"filetype detection:%s plugin:%s indent:%s",
+ filetype_detect ? "ON" : "OFF",
+ filetype_plugin ? (filetype_detect ? "ON" : "(on)") : "OFF",
+ filetype_indent ? (filetype_detect ? "ON" : "(on)") : "OFF");
+--- 12348,12354 ----
+ if (*eap->arg == NUL)
+ {
+ /* Print current status. */
+! smsg("filetype detection:%s plugin:%s indent:%s",
+ filetype_detect ? "ON" : "OFF",
+ filetype_plugin ? (filetype_detect ? "ON" : "(on)") : "OFF",
+ filetype_indent ? (filetype_detect ? "ON" : "(on)") : "OFF");
+***************
+*** 12417,12423 ****
+ }
+ }
+ else
+! EMSG2(_(e_invarg2), arg);
+ }
+
+ /*
+--- 12417,12423 ----
+ }
+ }
+ else
+! semsg(_(e_invarg2), arg);
+ }
+
+ /*
+***************
+*** 12448,12454 ****
+ else
+ listdigraphs(eap->forceit);
+ #else
+! EMSG(_("E196: No digraphs in this version"));
+ #endif
+ }
+
+--- 12448,12454 ----
+ else
+ listdigraphs(eap->forceit);
+ #else
+! emsg(_("E196: No digraphs in this version"));
+ #endif
+ }
+
+***************
+*** 12507,12513 ****
+ id = eap->line2;
+ else
+ {
+! EMSG(e_invcmd);
+ return;
+ }
+
+--- 12507,12513 ----
+ id = eap->line2;
+ else
+ {
+! emsg(_(e_invcmd));
+ return;
+ }
+
+***************
+*** 12530,12536 ****
+ {
+ /* There must be two arguments. */
+ vim_free(g);
+! EMSG2(_(e_invarg2), eap->arg);
+ return;
+ }
+ end = skip_regexp(p + 1, *p, TRUE, NULL);
+--- 12530,12536 ----
+ {
+ /* There must be two arguments. */
+ vim_free(g);
+! semsg(_(e_invarg2), eap->arg);
+ return;
+ }
+ end = skip_regexp(p + 1, *p, TRUE, NULL);
+***************
+*** 12545,12551 ****
+ if (*end != *p)
+ {
+ vim_free(g);
+! EMSG2(_(e_invarg2), p);
+ return;
+ }
+
+--- 12545,12551 ----
+ if (*end != *p)
+ {
+ vim_free(g);
+! semsg(_(e_invarg2), p);
+ return;
+ }
+
+*** ../vim-8.1.0742/src/ex_eval.c 2018-09-30 21:43:17.187693348 +0200
+--- src/ex_eval.c 2019-01-13 22:58:42.321795761 +0100
+***************
+*** 16,22 ****
+ #if defined(FEAT_EVAL) || defined(PROTO)
+
+ static int throw_exception(void *, except_type_T, char_u *);
+! static char_u *get_end_emsg(struct condstack *cstack);
+
+ /*
+ * Exception handling terms:
+--- 16,22 ----
+ #if defined(FEAT_EVAL) || defined(PROTO)
+
+ static int throw_exception(void *, except_type_T, char_u *);
+! static char *get_end_emsg(struct condstack *cstack);
+
+ /*
+ * Exception handling terms:
+***************
+*** 255,270 ****
+ if (elem == NULL)
+ {
+ suppress_errthrow = TRUE;
+! EMSG(_(e_outofmem));
+ }
+ else
+ {
+! elem->msg = vim_strsave(mesg);
+ if (elem->msg == NULL)
+ {
+ vim_free(elem);
+ suppress_errthrow = TRUE;
+! EMSG(_(e_outofmem));
+ }
+ else
+ {
+--- 255,270 ----
+ if (elem == NULL)
+ {
+ suppress_errthrow = TRUE;
+! emsg(_(e_outofmem));
+ }
+ else
+ {
+! elem->msg = (char *)vim_strsave(mesg);
+ if (elem->msg == NULL)
+ {
+ vim_free(elem);
+ suppress_errthrow = TRUE;
+! emsg(_(e_outofmem));
+ }
+ else
+ {
+***************
+*** 273,279 ****
+ *plist = elem;
+ if (plist == msg_list || severe)
+ {
+! char_u *tmsg;
+
+ /* Skip the extra "Vim " prefix for message "E458". */
+ tmsg = elem->msg;
+--- 273,279 ----
+ *plist = elem;
+ if (plist == msg_list || severe)
+ {
+! char *tmsg;
+
+ /* Skip the extra "Vim " prefix for message "E458". */
+ tmsg = elem->msg;
+***************
+*** 413,428 ****
+ /*
+ * Get an exception message that is to be stored in current_exception->value.
+ */
+! char_u *
+ get_exception_string(
+ void *value,
+ except_type_T type,
+ char_u *cmdname,
+ int *should_free)
+ {
+! char_u *ret, *mesg;
+ int cmdlen;
+! char_u *p, *val;
+
+ if (type == ET_ERROR)
+ {
+--- 413,429 ----
+ /*
+ * Get an exception message that is to be stored in current_exception->value.
+ */
+! char *
+ get_exception_string(
+ void *value,
+ except_type_T type,
+ char_u *cmdname,
+ int *should_free)
+ {
+! char *ret;
+! char *mesg;
+ int cmdlen;
+! char *p, *val;
+
+ if (type == ET_ERROR)
+ {
+***************
+*** 431,437 ****
+ if (cmdname != NULL && *cmdname != NUL)
+ {
+ cmdlen = (int)STRLEN(cmdname);
+! ret = vim_strnsave((char_u *)"Vim(",
+ 4 + cmdlen + 2 + (int)STRLEN(mesg));
+ if (ret == NULL)
+ return ret;
+--- 432,438 ----
+ if (cmdname != NULL && *cmdname != NUL)
+ {
+ cmdlen = (int)STRLEN(cmdname);
+! ret = (char *)vim_strnsave((char_u *)"Vim(",
+ 4 + cmdlen + 2 + (int)STRLEN(mesg));
+ if (ret == NULL)
+ return ret;
+***************
+*** 441,447 ****
+ }
+ else
+ {
+! ret = vim_strnsave((char_u *)"Vim:", 4 + (int)STRLEN(mesg));
+ if (ret == NULL)
+ return ret;
+ val = ret + 4;
+--- 442,448 ----
+ }
+ else
+ {
+! ret = (char *)vim_strnsave((char_u *)"Vim:", 4 + (int)STRLEN(mesg));
+ if (ret == NULL)
+ return ret;
+ val = ret + 4;
+***************
+*** 483,489 ****
+ else
+ {
+ *should_free = FALSE;
+! ret = (char_u *)value;
+ }
+
+ return ret;
+--- 484,490 ----
+ else
+ {
+ *should_free = FALSE;
+! ret = value;
+ }
+
+ return ret;
+***************
+*** 513,519 ****
+ && (((char_u *)value)[3] == NUL || ((char_u *)value)[3] == ':'
+ || ((char_u *)value)[3] == '('))
+ {
+! EMSG(_("E608: Cannot :throw exceptions with 'Vim' prefix"));
+ goto fail;
+ }
+ }
+--- 514,520 ----
+ && (((char_u *)value)[3] == NUL || ((char_u *)value)[3] == ':'
+ || ((char_u *)value)[3] == '('))
+ {
+! emsg(_("E608: Cannot :throw exceptions with 'Vim' prefix"));
+ goto fail;
+ }
+ }
+***************
+*** 554,560 ****
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+
+! smsg((char_u *)_("Exception thrown: %s"), excp->value);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+ if (debug_break_level > 0 || *p_vfile == NUL)
+--- 555,561 ----
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+
+! smsg(_("Exception thrown: %s"), excp->value);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+ if (debug_break_level > 0 || *p_vfile == NUL)
+***************
+*** 572,578 ****
+ nomem:
+ vim_free(excp);
+ suppress_errthrow = TRUE;
+! EMSG(_(e_outofmem));
+ fail:
+ current_exception = NULL;
+ return FAIL;
+--- 573,579 ----
+ nomem:
+ vim_free(excp);
+ suppress_errthrow = TRUE;
+! emsg(_(e_outofmem));
+ fail:
+ current_exception = NULL;
+ return FAIL;
+***************
+*** 606,613 ****
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+ smsg(was_finished
+! ? (char_u *)_("Exception finished: %s")
+! : (char_u *)_("Exception discarded: %s"),
+ excp->value);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ if (debug_break_level > 0 || *p_vfile == NUL)
+--- 607,614 ----
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+ smsg(was_finished
+! ? _("Exception finished: %s")
+! : _("Exception discarded: %s"),
+ excp->value);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ if (debug_break_level > 0 || *p_vfile == NUL)
+***************
+*** 651,657 ****
+ {
+ excp->caught = caught_stack;
+ caught_stack = excp;
+! set_vim_var_string(VV_EXCEPTION, excp->value, -1);
+ if (*excp->throw_name != NUL)
+ {
+ if (excp->throw_lnum != 0)
+--- 652,658 ----
+ {
+ excp->caught = caught_stack;
+ caught_stack = excp;
+! set_vim_var_string(VV_EXCEPTION, (char_u *)excp->value, -1);
+ if (*excp->throw_name != NUL)
+ {
+ if (excp->throw_lnum != 0)
+***************
+*** 677,683 ****
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+
+! smsg((char_u *)_("Exception caught: %s"), excp->value);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+ if (debug_break_level > 0 || *p_vfile == NUL)
+--- 678,684 ----
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+
+! smsg(_("Exception caught: %s"), excp->value);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+ if (debug_break_level > 0 || *p_vfile == NUL)
+***************
+*** 701,707 ****
+ caught_stack = caught_stack->caught;
+ if (caught_stack != NULL)
+ {
+! set_vim_var_string(VV_EXCEPTION, caught_stack->value, -1);
+ if (*caught_stack->throw_name != NUL)
+ {
+ if (caught_stack->throw_lnum != 0)
+--- 702,708 ----
+ caught_stack = caught_stack->caught;
+ if (caught_stack != NULL)
+ {
+! set_vim_var_string(VV_EXCEPTION, (char_u *)caught_stack->value, -1);
+ if (*caught_stack->throw_name != NUL)
+ {
+ if (caught_stack->throw_lnum != 0)
+***************
+*** 745,751 ****
+ static void
+ report_pending(int action, int pending, void *value)
+ {
+! char_u *mesg;
+ char *s;
+ int save_msg_silent;
+
+--- 746,752 ----
+ static void
+ report_pending(int action, int pending, void *value)
+ {
+! char *mesg;
+ char *s;
+ int save_msg_silent;
+
+***************
+*** 753,766 ****
+ switch (action)
+ {
+ case RP_MAKE:
+! mesg = (char_u *)_("%s made pending");
+ break;
+ case RP_RESUME:
+! mesg = (char_u *)_("%s resumed");
+ break;
+ /* case RP_DISCARD: */
+ default:
+! mesg = (char_u *)_("%s discarded");
+ break;
+ }
+
+--- 754,767 ----
+ switch (action)
+ {
+ case RP_MAKE:
+! mesg = _("%s made pending");
+ break;
+ case RP_RESUME:
+! mesg = _("%s resumed");
+ break;
+ /* case RP_DISCARD: */
+ default:
+! mesg = _("%s discarded");
+ break;
+ }
+
+***************
+*** 786,794 ****
+ default:
+ if (pending & CSTP_THROW)
+ {
+! vim_snprintf((char *)IObuff, IOSIZE,
+! (char *)mesg, _("Exception"));
+! mesg = vim_strnsave(IObuff, (int)STRLEN(IObuff) + 4);
+ STRCAT(mesg, ": %s");
+ s = (char *)((except_T *)value)->value;
+ }
+--- 787,794 ----
+ default:
+ if (pending & CSTP_THROW)
+ {
+! vim_snprintf((char *)IObuff, IOSIZE, mesg, _("Exception"));
+! mesg = (char *)vim_strnsave(IObuff, (int)STRLEN(IObuff) + 4);
+ STRCAT(mesg, ": %s");
+ s = (char *)((except_T *)value)->value;
+ }
+***************
+*** 805,811 ****
+ msg_silent = FALSE; /* display messages */
+ ++no_wait_return;
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+! smsg(mesg, (char_u *)s);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ cmdline_row = msg_row;
+ --no_wait_return;
+--- 805,811 ----
+ msg_silent = FALSE; /* display messages */
+ ++no_wait_return;
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+! smsg(mesg, s);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ cmdline_row = msg_row;
+ --no_wait_return;
+***************
+*** 882,888 ****
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_idx == CSTACK_LEN - 1)
+! eap->errmsg = (char_u *)N_("E579: :if nesting too deep");
+ else
+ {
+ ++cstack->cs_idx;
+--- 882,888 ----
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_idx == CSTACK_LEN - 1)
+! eap->errmsg = N_("E579: :if nesting too deep");
+ else
+ {
+ ++cstack->cs_idx;
+***************
+*** 918,924 ****
+ if (eap->cstack->cs_idx < 0
+ || (eap->cstack->cs_flags[eap->cstack->cs_idx]
+ & (CSF_WHILE | CSF_FOR | CSF_TRY)))
+! eap->errmsg = (char_u *)N_("E580: :endif without :if");
+ else
+ {
+ /*
+--- 918,924 ----
+ if (eap->cstack->cs_idx < 0
+ || (eap->cstack->cs_flags[eap->cstack->cs_idx]
+ & (CSF_WHILE | CSF_FOR | CSF_TRY)))
+! eap->errmsg = N_("E580: :endif without :if");
+ else
+ {
+ /*
+***************
+*** 962,981 ****
+ {
+ if (eap->cmdidx == CMD_else)
+ {
+! eap->errmsg = (char_u *)N_("E581: :else without :if");
+ return;
+ }
+! eap->errmsg = (char_u *)N_("E582: :elseif without :if");
+ skip = TRUE;
+ }
+ else if (cstack->cs_flags[cstack->cs_idx] & CSF_ELSE)
+ {
+ if (eap->cmdidx == CMD_else)
+ {
+! eap->errmsg = (char_u *)N_("E583: multiple :else");
+ return;
+ }
+! eap->errmsg = (char_u *)N_("E584: :elseif after :else");
+ skip = TRUE;
+ }
+
+--- 962,981 ----
+ {
+ if (eap->cmdidx == CMD_else)
+ {
+! eap->errmsg = N_("E581: :else without :if");
+ return;
+ }
+! eap->errmsg = N_("E582: :elseif without :if");
+ skip = TRUE;
+ }
+ else if (cstack->cs_flags[cstack->cs_idx] & CSF_ELSE)
+ {
+ if (eap->cmdidx == CMD_else)
+ {
+! eap->errmsg = N_("E583: multiple :else");
+ return;
+ }
+! eap->errmsg = N_("E584: :elseif after :else");
+ skip = TRUE;
+ }
+
+***************
+*** 1041,1047 ****
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_idx == CSTACK_LEN - 1)
+! eap->errmsg = (char_u *)N_("E585: :while/:for nesting too deep");
+ else
+ {
+ /*
+--- 1041,1047 ----
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_idx == CSTACK_LEN - 1)
+! eap->errmsg = N_("E585: :while/:for nesting too deep");
+ else
+ {
+ /*
+***************
+*** 1138,1144 ****
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_looplevel <= 0 || cstack->cs_idx < 0)
+! eap->errmsg = (char_u *)N_("E586: :continue without :while or :for");
+ else
+ {
+ /* Try to find the matching ":while". This might stop at a try
+--- 1138,1144 ----
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_looplevel <= 0 || cstack->cs_idx < 0)
+! eap->errmsg = N_("E586: :continue without :while or :for");
+ else
+ {
+ /* Try to find the matching ":while". This might stop at a try
+***************
+*** 1176,1182 ****
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_looplevel <= 0 || cstack->cs_idx < 0)
+! eap->errmsg = (char_u *)N_("E587: :break without :while or :for");
+ else
+ {
+ /* Inactivate conditionals until the matching ":while" or a try
+--- 1176,1182 ----
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_looplevel <= 0 || cstack->cs_idx < 0)
+! eap->errmsg = N_("E587: :break without :while or :for");
+ else
+ {
+ /* Inactivate conditionals until the matching ":while" or a try
+***************
+*** 1200,1206 ****
+ {
+ struct condstack *cstack = eap->cstack;
+ int idx;
+! char_u *err;
+ int csf;
+ int fl;
+
+--- 1200,1206 ----
+ {
+ struct condstack *cstack = eap->cstack;
+ int idx;
+! char *err;
+ int csf;
+ int fl;
+
+***************
+*** 1225,1233 ****
+ /* If we are in a ":while" or ":for" but used the wrong endloop
+ * command, do not rewind to the next enclosing ":for"/":while". */
+ if (fl & CSF_WHILE)
+! eap->errmsg = (char_u *)_("E732: Using :endfor with :while");
+ else if (fl & CSF_FOR)
+! eap->errmsg = (char_u *)_("E733: Using :endwhile with :for");
+ }
+ if (!(fl & (CSF_WHILE | CSF_FOR)))
+ {
+--- 1225,1233 ----
+ /* If we are in a ":while" or ":for" but used the wrong endloop
+ * command, do not rewind to the next enclosing ":for"/":while". */
+ if (fl & CSF_WHILE)
+! eap->errmsg = _("E732: Using :endfor with :while");
+ else if (fl & CSF_FOR)
+! eap->errmsg = _("E733: Using :endwhile with :for");
+ }
+ if (!(fl & (CSF_WHILE | CSF_FOR)))
+ {
+***************
+*** 1291,1297 ****
+ value = eval_to_string_skip(arg, &eap->nextcmd, eap->skip);
+ else
+ {
+! EMSG(_(e_argreq));
+ value = NULL;
+ }
+
+--- 1291,1297 ----
+ value = eval_to_string_skip(arg, &eap->nextcmd, eap->skip);
+ else
+ {
+! emsg(_(e_argreq));
+ value = NULL;
+ }
+
+***************
+*** 1399,1405 ****
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_idx == CSTACK_LEN - 1)
+! eap->errmsg = (char_u *)N_("E601: :try nesting too deep");
+ else
+ {
+ ++cstack->cs_idx;
+--- 1399,1405 ----
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_idx == CSTACK_LEN - 1)
+! eap->errmsg = N_("E601: :try nesting too deep");
+ else
+ {
+ ++cstack->cs_idx;
+***************
+*** 1443,1449 ****
+
+ elem = (eslist_T *)alloc((unsigned)sizeof(struct eslist_elem));
+ if (elem == NULL)
+! EMSG(_(e_outofmem));
+ else
+ {
+ elem->saved_emsg_silent = emsg_silent;
+--- 1443,1449 ----
+
+ elem = (eslist_T *)alloc((unsigned)sizeof(struct eslist_elem));
+ if (elem == NULL)
+! emsg(_(e_outofmem));
+ else
+ {
+ elem->saved_emsg_silent = emsg_silent;
+***************
+*** 1478,1484 ****
+
+ if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0)
+ {
+! eap->errmsg = (char_u *)N_("E603: :catch without :try");
+ give_up = TRUE;
+ }
+ else
+--- 1478,1484 ----
+
+ if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0)
+ {
+! eap->errmsg = N_("E603: :catch without :try");
+ give_up = TRUE;
+ }
+ else
+***************
+*** 1497,1503 ****
+ {
+ /* Give up for a ":catch" after ":finally" and ignore it.
+ * Just parse. */
+! eap->errmsg = (char_u *)N_("E604: :catch after :finally");
+ give_up = TRUE;
+ }
+ else
+--- 1497,1503 ----
+ {
+ /* Give up for a ":catch" after ":finally" and ignore it.
+ * Just parse. */
+! eap->errmsg = N_("E604: :catch after :finally");
+ give_up = TRUE;
+ }
+ else
+***************
+*** 1537,1543 ****
+ {
+ if (end != NULL && *end != NUL && !ends_excmd(*skipwhite(end + 1)))
+ {
+! EMSG(_(e_trailing));
+ return;
+ }
+
+--- 1537,1543 ----
+ {
+ if (end != NULL && *end != NUL && !ends_excmd(*skipwhite(end + 1)))
+ {
+! emsg(_(e_trailing));
+ return;
+ }
+
+***************
+*** 1569,1575 ****
+ *end = save_char;
+ p_cpo = save_cpo;
+ if (regmatch.regprog == NULL)
+! EMSG2(_(e_invarg2), pat);
+ else
+ {
+ /*
+--- 1569,1575 ----
+ *end = save_char;
+ p_cpo = save_cpo;
+ if (regmatch.regprog == NULL)
+! semsg(_(e_invarg2), pat);
+ else
+ {
+ /*
+***************
+*** 1579,1586 ****
+ */
+ prev_got_int = got_int;
+ got_int = FALSE;
+! caught = vim_regexec_nl(&regmatch, current_exception->value,
+! (colnr_T)0);
+ got_int |= prev_got_int;
+ vim_regfree(regmatch.regprog);
+ }
+--- 1579,1586 ----
+ */
+ prev_got_int = got_int;
+ got_int = FALSE;
+! caught = vim_regexec_nl(&regmatch,
+! (char_u *)current_exception->value, (colnr_T)0);
+ got_int |= prev_got_int;
+ vim_regfree(regmatch.regprog);
+ }
+***************
+*** 1634,1640 ****
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0)
+! eap->errmsg = (char_u *)N_("E606: :finally without :try");
+ else
+ {
+ if (!(cstack->cs_flags[cstack->cs_idx] & CSF_TRY))
+--- 1634,1640 ----
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0)
+! eap->errmsg = N_("E606: :finally without :try");
+ else
+ {
+ if (!(cstack->cs_flags[cstack->cs_idx] & CSF_TRY))
+***************
+*** 1654,1660 ****
+ if (cstack->cs_flags[idx] & CSF_FINALLY)
+ {
+ /* Give up for a multiple ":finally" and ignore it. */
+! eap->errmsg = (char_u *)N_("E607: multiple :finally");
+ return;
+ }
+ rewind_conditionals(cstack, idx, CSF_WHILE | CSF_FOR,
+--- 1654,1660 ----
+ if (cstack->cs_flags[idx] & CSF_FINALLY)
+ {
+ /* Give up for a multiple ":finally" and ignore it. */
+! eap->errmsg = N_("E607: multiple :finally");
+ return;
+ }
+ rewind_conditionals(cstack, idx, CSF_WHILE | CSF_FOR,
+***************
+*** 1763,1769 ****
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0)
+! eap->errmsg = (char_u *)N_("E602: :endtry without :try");
+ else
+ {
+ /*
+--- 1763,1769 ----
+ struct condstack *cstack = eap->cstack;
+
+ if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0)
+! eap->errmsg = N_("E602: :endtry without :try");
+ else
+ {
+ /*
+***************
+*** 2223,2229 ****
+ /*
+ * Return an appropriate error message for a missing endwhile/endfor/endif.
+ */
+! static char_u *
+ get_end_emsg(struct condstack *cstack)
+ {
+ if (cstack->cs_flags[cstack->cs_idx] & CSF_WHILE)
+--- 2223,2229 ----
+ /*
+ * Return an appropriate error message for a missing endwhile/endfor/endif.
+ */
+! static char *
+ get_end_emsg(struct condstack *cstack)
+ {
+ if (cstack->cs_flags[cstack->cs_idx] & CSF_WHILE)
+***************
+*** 2264,2270 ****
+ void
+ ex_endfunction(exarg_T *eap UNUSED)
+ {
+! EMSG(_("E193: :endfunction not inside a function"));
+ }
+
+ /*
+--- 2264,2270 ----
+ void
+ ex_endfunction(exarg_T *eap UNUSED)
+ {
+! emsg(_("E193: :endfunction not inside a function"));
+ }
+
+ /*
+*** ../vim-8.1.0742/src/ex_getln.c 2018-12-23 19:10:05.010359907 +0100
+--- src/ex_getln.c 2019-01-13 22:59:08.661612380 +0100
+***************
+*** 275,281 ****
+ int delim_optional = FALSE;
+ int delim;
+ char_u *end;
+! char_u *dummy;
+ exarg_T ea;
+ pos_T save_cursor;
+ int use_last_pat;
+--- 275,281 ----
+ int delim_optional = FALSE;
+ int delim;
+ char_u *end;
+! char *dummy;
+ exarg_T ea;
+ pos_T save_cursor;
+ int use_last_pat;
+***************
+*** 2601,2610 ****
+ void
+ text_locked_msg(void)
+ {
+! EMSG(_(get_text_locked_msg()));
+ }
+
+! char_u *
+ get_text_locked_msg(void)
+ {
+ #ifdef FEAT_CMDWIN
+--- 2601,2610 ----
+ void
+ text_locked_msg(void)
+ {
+! emsg(_(get_text_locked_msg()));
+ }
+
+! char *
+ get_text_locked_msg(void)
+ {
+ #ifdef FEAT_CMDWIN
+***************
+*** 2623,2629 ****
+ {
+ if (curbuf_lock > 0)
+ {
+! EMSG(_("E788: Not allowed to edit another buffer now"));
+ return TRUE;
+ }
+ return allbuf_locked();
+--- 2623,2629 ----
+ {
+ if (curbuf_lock > 0)
+ {
+! emsg(_("E788: Not allowed to edit another buffer now"));
+ return TRUE;
+ }
+ return allbuf_locked();
+***************
+*** 2638,2644 ****
+ {
+ if (allbuf_lock > 0)
+ {
+! EMSG(_("E811: Not allowed to change buffer information now"));
+ return TRUE;
+ }
+ return FALSE;
+--- 2638,2644 ----
+ {
+ if (allbuf_lock > 0)
+ {
+! emsg(_("E811: Not allowed to change buffer information now"));
+ return TRUE;
+ }
+ return FALSE;
+***************
+*** 4174,4186 ****
+ * causing the pattern to be added, which has illegal characters.
+ */
+ if (!(options & WILD_SILENT) && (options & WILD_LIST_NOTFOUND))
+! EMSG2(_(e_nomatch2), str);
+ #endif
+ }
+ else if (xp->xp_numfiles == 0)
+ {
+ if (!(options & WILD_SILENT))
+! EMSG2(_(e_nomatch2), str);
+ }
+ else
+ {
+--- 4174,4186 ----
+ * causing the pattern to be added, which has illegal characters.
+ */
+ if (!(options & WILD_SILENT) && (options & WILD_LIST_NOTFOUND))
+! semsg(_(e_nomatch2), str);
+ #endif
+ }
+ else if (xp->xp_numfiles == 0)
+ {
+ if (!(options & WILD_SILENT))
+! semsg(_(e_nomatch2), str);
+ }
+ else
+ {
+***************
+*** 4219,4225 ****
+ * (and possibly have to hit return to continue!).
+ */
+ if (!(options & WILD_SILENT))
+! EMSG(_(e_toomany));
+ else if (!(options & WILD_NO_BEEP))
+ beep_flush();
+ }
+--- 4219,4225 ----
+ * (and possibly have to hit return to continue!).
+ */
+ if (!(options & WILD_SILENT))
+! emsg(_(e_toomany));
+ else if (!(options & WILD_NO_BEEP))
+ beep_flush();
+ }
+***************
+*** 6658,6664 ****
+ else
+ {
+ *end = i;
+! EMSG(_(e_trailing));
+ return;
+ }
+ }
+--- 6658,6664 ----
+ else
+ {
+ *end = i;
+! emsg(_(e_trailing));
+ return;
+ }
+ }
+***************
+*** 6670,6676 ****
+ end = arg;
+ if (!get_list_range(&end, &hisidx1, &hisidx2) || *end != NUL)
+ {
+! EMSG(_(e_trailing));
+ return;
+ }
+
+--- 6670,6676 ----
+ end = arg;
+ if (!get_list_range(&end, &hisidx1, &hisidx2) || *end != NUL)
+ {
+! emsg(_(e_trailing));
+ return;
+ }
+
+***************
+*** 7201,7207 ****
+ {
+ if (ccline.cmdpos + offset >= ccline.cmdlen || ccline.cmdpos + offset < 0)
+ {
+! EMSG(_("E198: cmd_pchar beyond the command length"));
+ return;
+ }
+ ccline.cmdbuff[ccline.cmdpos + offset] = (char_u)c;
+--- 7201,7207 ----
+ {
+ if (ccline.cmdpos + offset >= ccline.cmdlen || ccline.cmdpos + offset < 0)
+ {
+! emsg(_("E198: cmd_pchar beyond the command length"));
+ return;
+ }
+ ccline.cmdbuff[ccline.cmdpos + offset] = (char_u)c;
+***************
+*** 7213,7219 ****
+ {
+ if (ccline.cmdpos + offset >= ccline.cmdlen || ccline.cmdpos + offset < 0)
+ {
+! /* EMSG(_("cmd_gchar beyond the command length")); */
+ return NUL;
+ }
+ return (int)ccline.cmdbuff[ccline.cmdpos + offset];
+--- 7213,7219 ----
+ {
+ if (ccline.cmdpos + offset >= ccline.cmdlen || ccline.cmdpos + offset < 0)
+ {
+! // emsg(_("cmd_gchar beyond the command length"));
+ return NUL;
+ }
+ return (int)ccline.cmdbuff[ccline.cmdpos + offset];
+***************
+*** 7392,7398 ****
+ if (!win_valid(old_curwin) || !bufref_valid(&old_curbuf))
+ {
+ cmdwin_result = Ctrl_C;
+! EMSG(_("E199: Active window or buffer deleted"));
+ }
+ else
+ {
+--- 7392,7398 ----
+ if (!win_valid(old_curwin) || !bufref_valid(&old_curbuf))
+ {
+ cmdwin_result = Ctrl_C;
+! emsg(_("E199: Active window or buffer deleted"));
+ }
+ else
+ {
+*** ../vim-8.1.0742/src/farsi.h 2016-08-29 22:42:20.000000000 +0200
+--- src/farsi.h 2019-01-13 20:00:13.856099533 +0100
+***************
+*** 203,209 ****
+ #endif
+ ;
+
+! EXTERN char_u farsi_text_3[]
+ #ifdef DO_INIT
+ = { DAL, WAW, _SHIN, _YE, _MIM, _NOON, ' ', YE_, _NOON,
+ ALEF_,_BE, _YE, _TE, _SHIN, _PE, ' ', 'R','E','P','L',
+--- 203,209 ----
+ #endif
+ ;
+
+! EXTERN char farsi_text_3[]
+ #ifdef DO_INIT
+ = { DAL, WAW, _SHIN, _YE, _MIM, _NOON, ' ', YE_, _NOON,
+ ALEF_,_BE, _YE, _TE, _SHIN, _PE, ' ', 'R','E','P','L',
+*** ../vim-8.1.0742/src/fileio.c 2019-01-12 13:25:42.633479785 +0100
+--- src/fileio.c 2019-01-13 23:00:47.592924735 +0100
+***************
+*** 595,601 ****
+ || (using_b_fname
+ && (old_b_fname != curbuf->b_fname)))
+ {
+! EMSG(_(e_auchangedbuf));
+ return FAIL;
+ }
+ }
+--- 595,601 ----
+ || (using_b_fname
+ && (old_b_fname != curbuf->b_fname)))
+ {
+! emsg(_(e_auchangedbuf));
+ return FAIL;
+ }
+ }
+***************
+*** 676,682 ****
+ || (using_b_ffname && (old_b_ffname != curbuf->b_ffname))
+ || (using_b_fname && (old_b_fname != curbuf->b_fname))))
+ {
+! EMSG(_(e_auchangedbuf));
+ if (!read_buffer)
+ close(fd);
+ return FAIL;
+--- 676,682 ----
+ || (using_b_ffname && (old_b_ffname != curbuf->b_ffname))
+ || (using_b_fname && (old_b_fname != curbuf->b_fname))))
+ {
+! emsg(_(e_auchangedbuf));
+ if (!read_buffer)
+ close(fd);
+ return FAIL;
+***************
+*** 798,806 ****
+ --no_wait_return;
+ msg_scroll = msg_save;
+ if (fd < 0)
+! EMSG(_("E200: *ReadPre autocommands made the file unreadable"));
+ else
+! EMSG(_("E201: *ReadPre autocommands must not change current buffer"));
+ curbuf->b_p_ro = TRUE; /* must use "w!" now */
+ return FAIL;
+ }
+--- 798,806 ----
+ --no_wait_return;
+ msg_scroll = msg_save;
+ if (fd < 0)
+! emsg(_("E200: *ReadPre autocommands made the file unreadable"));
+ else
+! emsg(_("E201: *ReadPre autocommands must not change current buffer"));
+ curbuf->b_p_ro = TRUE; /* must use "w!" now */
+ return FAIL;
+ }
+***************
+*** 1128,1134 ****
+ if (fd < 0)
+ {
+ /* Re-opening the original file failed! */
+! EMSG(_("E202: Conversion made file unreadable!"));
+ error = TRUE;
+ goto failed;
+ }
+--- 1128,1134 ----
+ if (fd < 0)
+ {
+ /* Re-opening the original file failed! */
+! emsg(_("E202: Conversion made file unreadable!"));
+ error = TRUE;
+ goto failed;
+ }
+***************
+*** 2993,2999 ****
+ * option and don't free it. bf needs hash of the key saved.
+ * Don't ask for the key again when first time Enter was hit.
+ * Happens when retrying to detect encoding. */
+! smsg((char_u *)_(need_key_msg), fname);
+ msg_scroll = TRUE;
+ crypt_check_method(method);
+ cryptkey = crypt_get_key(newfile, FALSE);
+--- 2993,2999 ----
+ * option and don't free it. bf needs hash of the key saved.
+ * Don't ask for the key again when first time Enter was hit.
+ * Happens when retrying to detect encoding. */
+! smsg(_(need_key_msg), fname);
+ msg_scroll = TRUE;
+ crypt_check_method(method);
+ cryptkey = crypt_get_key(newfile, FALSE);
+***************
+*** 3197,3203 ****
+ {
+ /* This can happen during startup when there is a stray "w" in the
+ * vimrc file. */
+! EMSG(_(e_emptybuf));
+ return FAIL;
+ }
+
+--- 3197,3203 ----
+ {
+ /* This can happen during startup when there is a stray "w" in the
+ * vimrc file. */
+! emsg(_(e_emptybuf));
+ return FAIL;
+ }
+
+***************
+*** 3211,3217 ****
+ /* Avoid a crash for a long name. */
+ if (STRLEN(fname) >= MAXPATHL)
+ {
+! EMSG(_(e_longname));
+ return FAIL;
+ }
+
+--- 3211,3217 ----
+ /* Avoid a crash for a long name. */
+ if (STRLEN(fname) >= MAXPATHL)
+ {
+! emsg(_(e_longname));
+ return FAIL;
+ }
+
+***************
+*** 3399,3405 ****
+ --no_wait_return;
+ msg_scroll = msg_save;
+ if (nofile_err)
+! EMSG(_("E676: No matching autocommands for acwrite buffer"));
+
+ if (nofile_err
+ #ifdef FEAT_EVAL
+--- 3399,3405 ----
+ --no_wait_return;
+ msg_scroll = msg_save;
+ if (nofile_err)
+! emsg(_("E676: No matching autocommands for acwrite buffer"));
+
+ if (nofile_err
+ #ifdef FEAT_EVAL
+***************
+*** 3434,3440 ****
+ #ifdef FEAT_EVAL
+ if (!aborting())
+ #endif
+! EMSG(_("E203: Autocommands deleted or unloaded buffer to be written"));
+ return FAIL;
+ }
+
+--- 3434,3440 ----
+ #ifdef FEAT_EVAL
+ if (!aborting())
+ #endif
+! emsg(_("E203: Autocommands deleted or unloaded buffer to be written"));
+ return FAIL;
+ }
+
+***************
+*** 3457,3463 ****
+ {
+ --no_wait_return;
+ msg_scroll = msg_save;
+! EMSG(_("E204: Autocommand changed number of lines in unexpected way"));
+ return FAIL;
+ }
+ }
+--- 3457,3463 ----
+ {
+ --no_wait_return;
+ msg_scroll = msg_save;
+! emsg(_("E204: Autocommand changed number of lines in unexpected way"));
+ return FAIL;
+ }
+ }
+***************
+*** 5055,5061 ****
+ * the current backup file becomes the original file
+ */
+ if (org == NULL)
+! EMSG(_("E205: Patchmode: can't save original file"));
+ else if (mch_stat(org, &st) < 0)
+ {
+ vim_rename(backup, (char_u *)org);
+--- 5055,5061 ----
+ * the current backup file becomes the original file
+ */
+ if (org == NULL)
+! emsg(_("E205: Patchmode: can't save original file"));
+ else if (mch_stat(org, &st) < 0)
+ {
+ vim_rename(backup, (char_u *)org);
+***************
+*** 5077,5083 ****
+ || (empty_fd = mch_open(org,
+ O_CREAT | O_EXTRA | O_EXCL | O_NOFOLLOW,
+ perm < 0 ? 0666 : (perm & 0777))) < 0)
+! EMSG(_("E206: patchmode: can't touch empty original file"));
+ else
+ close(empty_fd);
+ }
+--- 5077,5083 ----
+ || (empty_fd = mch_open(org,
+ O_CREAT | O_EXTRA | O_EXCL | O_NOFOLLOW,
+ perm < 0 ? 0666 : (perm & 0777))) < 0)
+! emsg(_("E206: patchmode: can't touch empty original file"));
+ else
+ close(empty_fd);
+ }
+***************
+*** 5092,5098 ****
+ * Remove the backup unless 'backup' option is set
+ */
+ if (!p_bk && backup != NULL && mch_remove(backup) != 0)
+! EMSG(_("E207: Can't delete backup file"));
+
+ #ifdef FEAT_SUN_WORKSHOP
+ if (usingSunWorkShop)
+--- 5092,5098 ----
+ * Remove the backup unless 'backup' option is set
+ */
+ if (!p_bk && backup != NULL && mch_remove(backup) != 0)
+! emsg(_("E207: Can't delete backup file"));
+
+ #ifdef FEAT_SUN_WORKSHOP
+ if (usingSunWorkShop)
+***************
+*** 5151,5157 ****
+ mch_memmove(IObuff, errnum, (size_t)numlen);
+ }
+ STRCAT(IObuff, errmsg);
+! emsg(IObuff);
+ if (errmsg_allocated)
+ vim_free(errmsg);
+
+--- 5151,5157 ----
+ mch_memmove(IObuff, errnum, (size_t)numlen);
+ }
+ STRCAT(IObuff, errmsg);
+! emsg((char *)IObuff);
+ if (errmsg_allocated)
+ vim_free(errmsg);
+
+***************
+*** 5251,5257 ****
+ if (curbuf != buf)
+ {
+ /* We are in another buffer now, don't do the renaming. */
+! EMSG(_(e_auchangedbuf));
+ return FAIL;
+ }
+
+--- 5251,5257 ----
+ if (curbuf != buf)
+ {
+ /* We are in another buffer now, don't do the renaming. */
+! emsg(_(e_auchangedbuf));
+ return FAIL;
+ }
+
+***************
+*** 6732,6738 ****
+ #endif
+ if (errmsg != NULL)
+ {
+! EMSG2(errmsg, to);
+ return -1;
+ }
+ mch_remove(from);
+--- 6732,6738 ----
+ #endif
+ if (errmsg != NULL)
+ {
+! semsg(errmsg, to);
+ return -1;
+ }
+ mch_remove(from);
+***************
+*** 6872,6878 ****
+ int stat_res;
+ int retval = 0;
+ char_u *path;
+! char_u *tbuf;
+ char *mesg = NULL;
+ char *mesg2 = "";
+ int helpmesg = FALSE;
+--- 6872,6878 ----
+ int stat_res;
+ int retval = 0;
+ char_u *path;
+! char *tbuf;
+ char *mesg = NULL;
+ char *mesg2 = "";
+ int helpmesg = FALSE;
+***************
+*** 6983,6989 ****
+ if (n)
+ {
+ if (!bufref_valid(&bufref))
+! EMSG(_("E246: FileChangedShell autocommand deleted buffer"));
+ #ifdef FEAT_EVAL
+ s = get_vim_var_str(VV_FCS_CHOICE);
+ if (STRCMP(s, "reload") == 0 && *reason != 'd')
+--- 6983,6989 ----
+ if (n)
+ {
+ if (!bufref_valid(&bufref))
+! emsg(_("E246: FileChangedShell autocommand deleted buffer"));
+ #ifdef FEAT_EVAL
+ s = get_vim_var_str(VV_FCS_CHOICE);
+ if (STRCMP(s, "reload") == 0 && *reason != 'd')
+***************
+*** 7052,7064 ****
+ {
+ if (!helpmesg)
+ mesg2 = "";
+! tbuf = alloc((unsigned)(STRLEN(path) + STRLEN(mesg)
+ + STRLEN(mesg2) + 2));
+! sprintf((char *)tbuf, mesg, path);
+ #ifdef FEAT_EVAL
+ /* Set warningmsg here, before the unimportant and output-specific
+ * mesg2 has been appended. */
+! set_vim_var_string(VV_WARNINGMSG, tbuf, -1);
+ #endif
+ #if defined(FEAT_CON_DIALOG) || defined(FEAT_GUI_DIALOG)
+ if (can_reload)
+--- 7052,7064 ----
+ {
+ if (!helpmesg)
+ mesg2 = "";
+! tbuf = (char *)alloc((unsigned)(STRLEN(path) + STRLEN(mesg)
+ + STRLEN(mesg2) + 2));
+! sprintf(tbuf, mesg, path);
+ #ifdef FEAT_EVAL
+ /* Set warningmsg here, before the unimportant and output-specific
+ * mesg2 has been appended. */
+! set_vim_var_string(VV_WARNINGMSG, (char_u *)tbuf, -1);
+ #endif
+ #if defined(FEAT_CON_DIALOG) || defined(FEAT_GUI_DIALOG)
+ if (can_reload)
+***************
+*** 7068,7074 ****
+ STRCAT(tbuf, "\n");
+ STRCAT(tbuf, mesg2);
+ }
+! if (do_dialog(VIM_WARNING, (char_u *)_("Warning"), tbuf,
+ (char_u *)_("&OK\n&Load File"), 1, NULL, TRUE) == 2)
+ reload = TRUE;
+ }
+--- 7068,7075 ----
+ STRCAT(tbuf, "\n");
+ STRCAT(tbuf, mesg2);
+ }
+! if (do_dialog(VIM_WARNING, (char_u *)_("Warning"),
+! (char_u *)tbuf,
+ (char_u *)_("&OK\n&Load File"), 1, NULL, TRUE) == 2)
+ reload = TRUE;
+ }
+***************
+*** 7081,7087 ****
+ STRCAT(tbuf, "; ");
+ STRCAT(tbuf, mesg2);
+ }
+! EMSG(tbuf);
+ retval = 2;
+ }
+ else
+--- 7082,7088 ----
+ STRCAT(tbuf, "; ");
+ STRCAT(tbuf, mesg2);
+ }
+! emsg(tbuf);
+ retval = 2;
+ }
+ else
+***************
+*** 7089,7095 ****
+ if (!autocmd_busy)
+ {
+ msg_start();
+! msg_puts_attr(tbuf, HL_ATTR(HLF_E) + MSG_HIST);
+ if (*mesg2 != NUL)
+ msg_puts_attr((char_u *)mesg2,
+ HL_ATTR(HLF_W) + MSG_HIST);
+--- 7090,7096 ----
+ if (!autocmd_busy)
+ {
+ msg_start();
+! msg_puts_attr((char_u *)tbuf, HL_ATTR(HLF_E) + MSG_HIST);
+ if (*mesg2 != NUL)
+ msg_puts_attr((char_u *)mesg2,
+ HL_ATTR(HLF_W) + MSG_HIST);
+***************
+*** 7213,7219 ****
+ if (savebuf == NULL || saved == FAIL || buf != curbuf
+ || move_lines(buf, savebuf) == FAIL)
+ {
+! EMSG2(_("E462: Could not prepare for reloading \"%s\""),
+ buf->b_fname);
+ saved = FAIL;
+ }
+--- 7214,7220 ----
+ if (savebuf == NULL || saved == FAIL || buf != curbuf
+ || move_lines(buf, savebuf) == FAIL)
+ {
+! semsg(_("E462: Could not prepare for reloading \"%s\""),
+ buf->b_fname);
+ saved = FAIL;
+ }
+***************
+*** 7230,7236 ****
+ #if defined(FEAT_EVAL)
+ if (!aborting())
+ #endif
+! EMSG2(_("E321: Could not reload \"%s\""), buf->b_fname);
+ if (savebuf != NULL && bufref_valid(&bufref) && buf == curbuf)
+ {
+ /* Put the text back from the save buffer. First
+--- 7231,7237 ----
+ #if defined(FEAT_EVAL)
+ if (!aborting())
+ #endif
+! semsg(_("E321: Could not reload \"%s\""), buf->b_fname);
+ if (savebuf != NULL && bufref_valid(&bufref) && buf == curbuf)
+ {
+ /* Put the text back from the save buffer. First
+***************
+*** 8076,8083 ****
+ if (p_verbose >= 6)
+ {
+ verbose_enter();
+! smsg((char_u *)
+! _("auto-removing autocommand: %s <buffer=%d>"),
+ event_nr2name(event), buf->b_fnum);
+ verbose_leave();
+ }
+--- 8077,8083 ----
+ if (p_verbose >= 6)
+ {
+ verbose_enter();
+! smsg(_("auto-removing autocommand: %s <buffer=%d>"),
+ event_nr2name(event), buf->b_fnum);
+ verbose_leave();
+ }
+***************
+*** 8121,8129 ****
+
+ i = au_find_group(name);
+ if (i == AUGROUP_ERROR) /* the group doesn't exist */
+! EMSG2(_("E367: No such group: \"%s\""), name);
+ else if (i == current_augroup)
+! EMSG(_("E936: Cannot delete the current group"));
+ else
+ {
+ event_T event;
+--- 8121,8129 ----
+
+ i = au_find_group(name);
+ if (i == AUGROUP_ERROR) /* the group doesn't exist */
+! semsg(_("E367: No such group: \"%s\""), name);
+ else if (i == current_augroup)
+! emsg(_("E936: Cannot delete the current group"));
+ else
+ {
+ event_T event;
+***************
+*** 8188,8194 ****
+ if (del_group)
+ {
+ if (*arg == NUL)
+! EMSG(_(e_argreq));
+ else
+ au_del_group(arg);
+ }
+--- 8188,8194 ----
+ if (del_group)
+ {
+ if (*arg == NUL)
+! emsg(_(e_argreq));
+ else
+ au_del_group(arg);
+ }
+***************
+*** 8295,8301 ****
+ {
+ if (arg[1] && !VIM_ISWHITE(arg[1]))
+ {
+! EMSG2(_("E215: Illegal character after *: %s"), arg);
+ return NULL;
+ }
+ pat = arg + 1;
+--- 8295,8301 ----
+ {
+ if (arg[1] && !VIM_ISWHITE(arg[1]))
+ {
+! semsg(_("E215: Illegal character after *: %s"), arg);
+ return NULL;
+ }
+ pat = arg + 1;
+***************
+*** 8307,8315 ****
+ if ((int)event_name2nr(pat, &p) >= (int)NUM_EVENTS)
+ {
+ if (have_group)
+! EMSG2(_("E216: No such event: %s"), pat);
+ else
+! EMSG2(_("E216: No such group or event: %s"), pat);
+ return NULL;
+ }
+ }
+--- 8307,8315 ----
+ if ((int)event_name2nr(pat, &p) >= (int)NUM_EVENTS)
+ {
+ if (have_group)
+! semsg(_("E216: No such event: %s"), pat);
+ else
+! semsg(_("E216: No such group or event: %s"), pat);
+ return NULL;
+ }
+ }
+***************
+*** 8773,8779 ****
+ if (is_buflocal && (buflocal_nr == 0
+ || buflist_findnr(buflocal_nr) == NULL))
+ {
+! EMSGN(_("E680: <buffer=%d>: invalid buffer number "),
+ buflocal_nr);
+ return FAIL;
+ }
+--- 8773,8779 ----
+ if (is_buflocal && (buflocal_nr == 0
+ || buflist_findnr(buflocal_nr) == NULL))
+ {
+! semsg(_("E680: <buffer=%d>: invalid buffer number "),
+ buflocal_nr);
+ return FAIL;
+ }
+***************
+*** 8876,8882 ****
+
+ if (*arg == '*')
+ {
+! EMSG(_("E217: Can't execute autocommands for ALL events"));
+ return FAIL;
+ }
+
+--- 8876,8882 ----
+
+ if (*arg == '*')
+ {
+! emsg(_("E217: Can't execute autocommands for ALL events"));
+ return FAIL;
+ }
+
+***************
+*** 9461,9467 ****
+ */
+ if (nesting == 10)
+ {
+! EMSG(_("E218: autocommand nesting too deep"));
+ goto BYPASS_AU;
+ }
+
+--- 9461,9467 ----
+ */
+ if (nesting == 10)
+ {
+! emsg(_("E218: autocommand nesting too deep"));
+ goto BYPASS_AU;
+ }
+
+***************
+*** 9869,9875 ****
+ if (p_verbose >= 8)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Executing %s"), sourcing_name);
+ verbose_leave();
+ }
+ }
+--- 9869,9875 ----
+ if (p_verbose >= 8)
+ {
+ verbose_enter();
+! smsg(_("Executing %s"), sourcing_name);
+ verbose_leave();
+ }
+ }
+***************
+*** 9935,9941 ****
+ if (p_verbose >= 9)
+ {
+ verbose_enter_scroll();
+! smsg((char_u *)_("autocommand %s"), ac->cmd);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ verbose_leave_scroll();
+ }
+--- 9935,9941 ----
+ if (p_verbose >= 9)
+ {
+ verbose_enter_scroll();
+! smsg(_("autocommand %s"), ac->cmd);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ verbose_leave_scroll();
+ }
+***************
+*** 10483,10491 ****
+ if (nested != 0)
+ {
+ if (nested < 0)
+! EMSG(_("E219: Missing {."));
+ else
+! EMSG(_("E220: Missing }."));
+ VIM_CLEAR(reg_pat);
+ }
+ return reg_pat;
+--- 10483,10491 ----
+ if (nested != 0)
+ {
+ if (nested < 0)
+! emsg(_("E219: Missing {."));
+ else
+! emsg(_("E220: Missing }."));
+ VIM_CLEAR(reg_pat);
+ }
+ return reg_pat;
+*** ../vim-8.1.0742/src/fold.c 2018-11-14 21:45:28.996589969 +0100
+--- src/fold.c 2019-01-13 19:49:46.021533677 +0100
+***************
+*** 410,416 ****
+ (void)hasFolding(lnum, NULL, &lnum_next);
+ }
+ if (done == DONE_NOTHING)
+! EMSG(_(e_nofold));
+ /* Force a redraw to remove the Visual highlighting. */
+ if (had_visual)
+ redraw_curbuf_later(INVERTED);
+--- 410,416 ----
+ (void)hasFolding(lnum, NULL, &lnum_next);
+ }
+ if (done == DONE_NOTHING)
+! emsg(_(e_nofold));
+ /* Force a redraw to remove the Visual highlighting. */
+ if (had_visual)
+ redraw_curbuf_later(INVERTED);
+***************
+*** 561,569 ****
+ if (foldmethodIsManual(curwin) || foldmethodIsMarker(curwin))
+ return TRUE;
+ if (create)
+! EMSG(_("E350: Cannot create fold with current 'foldmethod'"));
+ else
+! EMSG(_("E351: Cannot delete fold with current 'foldmethod'"));
+ return FALSE;
+ }
+
+--- 561,569 ----
+ if (foldmethodIsManual(curwin) || foldmethodIsMarker(curwin))
+ return TRUE;
+ if (create)
+! emsg(_("E350: Cannot create fold with current 'foldmethod'"));
+ else
+! emsg(_("E351: Cannot delete fold with current 'foldmethod'"));
+ return FALSE;
+ }
+
+***************
+*** 775,781 ****
+ }
+ if (!did_one)
+ {
+! EMSG(_(e_nofold));
+ /* Force a redraw to remove the Visual highlighting. */
+ if (had_visual)
+ redraw_curbuf_later(INVERTED);
+--- 775,781 ----
+ }
+ if (!did_one)
+ {
+! emsg(_(e_nofold));
+ /* Force a redraw to remove the Visual highlighting. */
+ if (had_visual)
+ redraw_curbuf_later(INVERTED);
+***************
+*** 1211,1217 ****
+ {
+ /* Only give an error message when no fold could be opened. */
+ if (n == 0 && !(done & DONE_FOLD))
+! EMSG(_(e_nofold));
+ break;
+ }
+ }
+--- 1211,1217 ----
+ {
+ /* Only give an error message when no fold could be opened. */
+ if (n == 0 && !(done & DONE_FOLD))
+! emsg(_(e_nofold));
+ break;
+ }
+ }
+***************
+*** 1363,1369 ****
+ done |= DONE_FOLD;
+ }
+ else if (donep == NULL && wp == curwin)
+! EMSG(_(e_nofold));
+
+ if (donep != NULL)
+ *donep |= done;
+--- 1363,1369 ----
+ done |= DONE_FOLD;
+ }
+ else if (donep == NULL && wp == curwin)
+! emsg(_(e_nofold));
+
+ if (donep != NULL)
+ *donep |= done;
+***************
+*** 1735,1741 ****
+ {
+ if (!curbuf->b_p_ma)
+ {
+! EMSG(_(e_modifiable));
+ return;
+ }
+ parseMarker(curwin);
+--- 1735,1741 ----
+ {
+ if (!curbuf->b_p_ma)
+ {
+! emsg(_(e_modifiable));
+ return;
+ }
+ parseMarker(curwin);
+*** ../vim-8.1.0742/src/getchar.c 2018-10-07 23:16:33.134616234 +0200
+--- src/getchar.c 2019-01-13 19:49:56.993431369 +0100
+***************
+*** 237,243 ****
+ }
+ else if (buf->bh_curr == NULL) /* buffer has already been read */
+ {
+! IEMSG(_("E222: Add to read buffer"));
+ return;
+ }
+ else if (buf->bh_index != 0)
+--- 237,243 ----
+ }
+ else if (buf->bh_curr == NULL) /* buffer has already been read */
+ {
+! iemsg(_("E222: Add to read buffer"));
+ return;
+ }
+ else if (buf->bh_index != 0)
+***************
+*** 998,1004 ****
+ newlen = typebuf.tb_len + addlen + newoff + 4 * (MAXMAPLEN + 4);
+ if (newlen < 0) /* string is getting too long */
+ {
+! EMSG(_(e_toocompl)); /* also calls flush_buffers */
+ setcursor();
+ return FAIL;
+ }
+--- 998,1004 ----
+ newlen = typebuf.tb_len + addlen + newoff + 4 * (MAXMAPLEN + 4);
+ if (newlen < 0) /* string is getting too long */
+ {
+! emsg(_(e_toocompl)); /* also calls flush_buffers */
+ setcursor();
+ return FAIL;
+ }
+***************
+*** 1431,1437 ****
+ {
+ if (curscript + 1 == NSCRIPT)
+ {
+! EMSG(_(e_nesting));
+ return;
+ }
+ #ifdef FEAT_EVAL
+--- 1431,1437 ----
+ {
+ if (curscript + 1 == NSCRIPT)
+ {
+! emsg(_(e_nesting));
+ return;
+ }
+ #ifdef FEAT_EVAL
+***************
+*** 1446,1452 ****
+ expand_env(name, NameBuff, MAXPATHL);
+ if ((scriptin[curscript] = mch_fopen((char *)NameBuff, READBIN)) == NULL)
+ {
+! EMSG2(_(e_notopen), name);
+ if (curscript)
+ --curscript;
+ return;
+--- 1446,1452 ----
+ expand_env(name, NameBuff, MAXPATHL);
+ if ((scriptin[curscript] = mch_fopen((char *)NameBuff, READBIN)) == NULL)
+ {
+! semsg(_(e_notopen), name);
+ if (curscript)
+ --curscript;
+ return;
+***************
+*** 2508,2514 ****
+ */
+ if (++mapdepth >= p_mmd)
+ {
+! EMSG(_("E223: recursive mapping"));
+ if (State & CMDLINE)
+ redrawcmdline();
+ else
+--- 2508,2514 ----
+ */
+ if (++mapdepth >= p_mmd)
+ {
+! emsg(_("E223: recursive mapping"));
+ if (State & CMDLINE)
+ redrawcmdline();
+ else
+***************
+*** 3508,3517 ****
+ && STRNCMP(mp->m_keys, keys, (size_t)len) == 0)
+ {
+ if (abbrev)
+! EMSG2(_("E224: global abbreviation already exists for %s"),
+ mp->m_keys);
+ else
+! EMSG2(_("E225: global mapping already exists for %s"),
+ mp->m_keys);
+ retval = 5;
+ goto theend;
+--- 3508,3517 ----
+ && STRNCMP(mp->m_keys, keys, (size_t)len) == 0)
+ {
+ if (abbrev)
+! semsg(_("E224: global abbreviation already exists for %s"),
+ mp->m_keys);
+ else
+! semsg(_("E225: global mapping already exists for %s"),
+ mp->m_keys);
+ retval = 5;
+ goto theend;
+***************
+*** 3643,3652 ****
+ else if (unique)
+ {
+ if (abbrev)
+! EMSG2(_("E226: abbreviation already exists for %s"),
+ p);
+ else
+! EMSG2(_("E227: mapping already exists for %s"), p);
+ retval = 5;
+ goto theend;
+ }
+--- 3643,3652 ----
+ else if (unique)
+ {
+ if (abbrev)
+! semsg(_("E226: abbreviation already exists for %s"),
+ p);
+ else
+! semsg(_("E227: mapping already exists for %s"), p);
+ retval = 5;
+ goto theend;
+ }
+***************
+*** 3892,3898 ****
+ local = (STRCMP(arg, "<buffer>") == 0);
+ if (!local && *arg != NUL)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+ #endif
+--- 3892,3898 ----
+ local = (STRCMP(arg, "<buffer>") == 0);
+ if (!local && *arg != NUL)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+ #endif
+***************
+*** 4920,4926 ****
+ c1 = 't';
+ break;
+ default:
+! IEMSG(_("E228: makemap: Illegal mode"));
+ return FAIL;
+ }
+ do /* do this twice if c2 is set, 3 times with c3 */
+--- 4920,4926 ----
+ c1 = 't';
+ break;
+ default:
+! iemsg(_("E228: makemap: Illegal mode"));
+ return FAIL;
+ }
+ do /* do this twice if c2 is set, 3 times with c3 */
+*** ../vim-8.1.0742/src/globals.h 2019-01-12 22:47:01.264088074 +0100
+--- src/globals.h 2019-01-13 20:05:39.345471559 +0100
+***************
+*** 1391,1444 ****
+ * The error messages that can be shared are included here.
+ * Excluded are errors that are only used once and debugging messages.
+ */
+! EXTERN char_u e_abort[] INIT(= N_("E470: Command aborted"));
+! EXTERN char_u e_argreq[] INIT(= N_("E471: Argument required"));
+! EXTERN char_u e_backslash[] INIT(= N_("E10: \\ should be followed by /, ? or &"));
+ #ifdef FEAT_CMDWIN
+! EXTERN char_u e_cmdwin[] INIT(= N_("E11: Invalid in command-line window; <CR> executes, CTRL-C quits"));
+ #endif
+! EXTERN char_u e_curdir[] INIT(= N_("E12: Command not allowed from exrc/vimrc in current dir or tag search"));
+ #ifdef FEAT_EVAL
+! EXTERN char_u e_endif[] INIT(= N_("E171: Missing :endif"));
+! EXTERN char_u e_endtry[] INIT(= N_("E600: Missing :endtry"));
+! EXTERN char_u e_endwhile[] INIT(= N_("E170: Missing :endwhile"));
+! EXTERN char_u e_endfor[] INIT(= N_("E170: Missing :endfor"));
+! EXTERN char_u e_while[] INIT(= N_("E588: :endwhile without :while"));
+! EXTERN char_u e_for[] INIT(= N_("E588: :endfor without :for"));
+ #endif
+! EXTERN char_u e_exists[] INIT(= N_("E13: File exists (add ! to override)"));
+! EXTERN char_u e_failed[] INIT(= N_("E472: Command failed"));
+ #if defined(FEAT_GUI) && defined(FEAT_XFONTSET)
+! EXTERN char_u e_fontset[] INIT(= N_("E234: Unknown fontset: %s"));
+ #endif
+ #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MAC) \
+ || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN)
+! EXTERN char_u e_font[] INIT(= N_("E235: Unknown font: %s"));
+ #endif
+ #if defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK)
+! EXTERN char_u e_fontwidth[] INIT(= N_("E236: Font \"%s\" is not fixed-width"));
+ #endif
+! EXTERN char_u e_internal[] INIT(= N_("E473: Internal error"));
+! EXTERN char_u e_intern2[] INIT(= N_("E685: Internal error: %s"));
+! EXTERN char_u e_interr[] INIT(= N_("Interrupted"));
+! EXTERN char_u e_invaddr[] INIT(= N_("E14: Invalid address"));
+! EXTERN char_u e_invarg[] INIT(= N_("E474: Invalid argument"));
+! EXTERN char_u e_invarg2[] INIT(= N_("E475: Invalid argument: %s"));
+! EXTERN char_u e_invargval[] INIT(= N_("E475: Invalid value for argument %s"));
+! EXTERN char_u e_invargNval[] INIT(= N_("E475: Invalid value for argument %s: %s"));
+ #ifdef FEAT_EVAL
+! EXTERN char_u e_invexpr2[] INIT(= N_("E15: Invalid expression: %s"));
+ #endif
+! EXTERN char_u e_invrange[] INIT(= N_("E16: Invalid range"));
+! EXTERN char_u e_invcmd[] INIT(= N_("E476: Invalid command"));
+ #if defined(UNIX) || defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
+! EXTERN char_u e_isadir2[] INIT(= N_("E17: \"%s\" is a directory"));
+ #endif
+ #ifdef FEAT_LIBCALL
+! EXTERN char_u e_libcall[] INIT(= N_("E364: Library call failed for \"%s()\""));
+ #endif
+ #ifdef HAVE_FSYNC
+! EXTERN char_u e_fsync[] INIT(= N_("E667: Fsync failed"));
+ #endif
+ #if defined(DYNAMIC_PERL) \
+ || defined(DYNAMIC_PYTHON) || defined(DYNAMIC_PYTHON3) \
+--- 1391,1444 ----
+ * The error messages that can be shared are included here.
+ * Excluded are errors that are only used once and debugging messages.
+ */
+! EXTERN char e_abort[] INIT(= N_("E470: Command aborted"));
+! EXTERN char e_argreq[] INIT(= N_("E471: Argument required"));
+! EXTERN char e_backslash[] INIT(= N_("E10: \\ should be followed by /, ? or &"));
+ #ifdef FEAT_CMDWIN
+! EXTERN char e_cmdwin[] INIT(= N_("E11: Invalid in command-line window; <CR> executes, CTRL-C quits"));
+ #endif
+! EXTERN char e_curdir[] INIT(= N_("E12: Command not allowed from exrc/vimrc in current dir or tag search"));
+ #ifdef FEAT_EVAL
+! EXTERN char e_endif[] INIT(= N_("E171: Missing :endif"));
+! EXTERN char e_endtry[] INIT(= N_("E600: Missing :endtry"));
+! EXTERN char e_endwhile[] INIT(= N_("E170: Missing :endwhile"));
+! EXTERN char e_endfor[] INIT(= N_("E170: Missing :endfor"));
+! EXTERN char e_while[] INIT(= N_("E588: :endwhile without :while"));
+! EXTERN char e_for[] INIT(= N_("E588: :endfor without :for"));
+ #endif
+! EXTERN char e_exists[] INIT(= N_("E13: File exists (add ! to override)"));
+! EXTERN char e_failed[] INIT(= N_("E472: Command failed"));
+ #if defined(FEAT_GUI) && defined(FEAT_XFONTSET)
+! EXTERN char e_fontset[] INIT(= N_("E234: Unknown fontset: %s"));
+ #endif
+ #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MAC) \
+ || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN)
+! EXTERN char e_font[] INIT(= N_("E235: Unknown font: %s"));
+ #endif
+ #if defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK)
+! EXTERN char e_fontwidth[] INIT(= N_("E236: Font \"%s\" is not fixed-width"));
+ #endif
+! EXTERN char e_internal[] INIT(= N_("E473: Internal error"));
+! EXTERN char e_intern2[] INIT(= N_("E685: Internal error: %s"));
+! EXTERN char e_interr[] INIT(= N_("Interrupted"));
+! EXTERN char e_invaddr[] INIT(= N_("E14: Invalid address"));
+! EXTERN char e_invarg[] INIT(= N_("E474: Invalid argument"));
+! EXTERN char e_invarg2[] INIT(= N_("E475: Invalid argument: %s"));
+! EXTERN char e_invargval[] INIT(= N_("E475: Invalid value for argument %s"));
+! EXTERN char e_invargNval[] INIT(= N_("E475: Invalid value for argument %s: %s"));
+ #ifdef FEAT_EVAL
+! EXTERN char e_invexpr2[] INIT(= N_("E15: Invalid expression: %s"));
+ #endif
+! EXTERN char e_invrange[] INIT(= N_("E16: Invalid range"));
+! EXTERN char e_invcmd[] INIT(= N_("E476: Invalid command"));
+ #if defined(UNIX) || defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
+! EXTERN char e_isadir2[] INIT(= N_("E17: \"%s\" is a directory"));
+ #endif
+ #ifdef FEAT_LIBCALL
+! EXTERN char e_libcall[] INIT(= N_("E364: Library call failed for \"%s()\""));
+ #endif
+ #ifdef HAVE_FSYNC
+! EXTERN char e_fsync[] INIT(= N_("E667: Fsync failed"));
+ #endif
+ #if defined(DYNAMIC_PERL) \
+ || defined(DYNAMIC_PYTHON) || defined(DYNAMIC_PYTHON3) \
+***************
+*** 1448,1592 ****
+ || defined(DYNAMIC_GETTEXT) \
+ || defined(DYNAMIC_MZSCHEME) \
+ || defined(DYNAMIC_LUA)
+! EXTERN char_u e_loadlib[] INIT(= N_("E370: Could not load library %s"));
+! EXTERN char_u e_loadfunc[] INIT(= N_("E448: Could not load library function %s"));
+ #endif
+! EXTERN char_u e_markinval[] INIT(= N_("E19: Mark has invalid line number"));
+! EXTERN char_u e_marknotset[] INIT(= N_("E20: Mark not set"));
+! EXTERN char_u e_modifiable[] INIT(= N_("E21: Cannot make changes, 'modifiable' is off"));
+! EXTERN char_u e_nesting[] INIT(= N_("E22: Scripts nested too deep"));
+! EXTERN char_u e_noalt[] INIT(= N_("E23: No alternate file"));
+! EXTERN char_u e_noabbr[] INIT(= N_("E24: No such abbreviation"));
+! EXTERN char_u e_nobang[] INIT(= N_("E477: No ! allowed"));
+ #ifndef FEAT_GUI
+! EXTERN char_u e_nogvim[] INIT(= N_("E25: GUI cannot be used: Not enabled at compile time"));
+ #endif
+ #ifndef FEAT_RIGHTLEFT
+! EXTERN char_u e_nohebrew[] INIT(= N_("E26: Hebrew cannot be used: Not enabled at compile time\n"));
+ #endif
+ #ifndef FEAT_FKMAP
+! EXTERN char_u e_nofarsi[] INIT(= N_("E27: Farsi cannot be used: Not enabled at compile time\n"));
+ #endif
+ #ifndef FEAT_ARABIC
+! EXTERN char_u e_noarabic[] INIT(= N_("E800: Arabic cannot be used: Not enabled at compile time\n"));
+ #endif
+ #if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_SYN_HL)
+! EXTERN char_u e_nogroup[] INIT(= N_("E28: No such highlight group name: %s"));
+ #endif
+! EXTERN char_u e_noinstext[] INIT(= N_("E29: No inserted text yet"));
+! EXTERN char_u e_nolastcmd[] INIT(= N_("E30: No previous command line"));
+! EXTERN char_u e_nomap[] INIT(= N_("E31: No such mapping"));
+! EXTERN char_u e_nomatch[] INIT(= N_("E479: No match"));
+! EXTERN char_u e_nomatch2[] INIT(= N_("E480: No match: %s"));
+! EXTERN char_u e_noname[] INIT(= N_("E32: No file name"));
+! EXTERN char_u e_nopresub[] INIT(= N_("E33: No previous substitute regular expression"));
+! EXTERN char_u e_noprev[] INIT(= N_("E34: No previous command"));
+! EXTERN char_u e_noprevre[] INIT(= N_("E35: No previous regular expression"));
+! EXTERN char_u e_norange[] INIT(= N_("E481: No range allowed"));
+! EXTERN char_u e_noroom[] INIT(= N_("E36: Not enough room"));
+ #ifdef FEAT_CLIENTSERVER
+! EXTERN char_u e_noserver[] INIT(= N_("E247: no registered server named \"%s\""));
+ #endif
+! EXTERN char_u e_notcreate[] INIT(= N_("E482: Can't create file %s"));
+! EXTERN char_u e_notmp[] INIT(= N_("E483: Can't get temp file name"));
+! EXTERN char_u e_notopen[] INIT(= N_("E484: Can't open file %s"));
+! EXTERN char_u e_notread[] INIT(= N_("E485: Can't read file %s"));
+! EXTERN char_u e_null[] INIT(= N_("E38: Null argument"));
+ #if defined(FEAT_DIGRAPHS) || defined(FEAT_TIMERS)
+! EXTERN char_u e_number_exp[] INIT(= N_("E39: Number expected"));
+ #endif
+ #ifdef FEAT_QUICKFIX
+! EXTERN char_u e_openerrf[] INIT(= N_("E40: Can't open errorfile %s"));
+ #endif
+ #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
+! EXTERN char_u e_opendisp[] INIT(= N_("E233: cannot open display"));
+ #endif
+! EXTERN char_u e_outofmem[] INIT(= N_("E41: Out of memory!"));
+ #ifdef FEAT_INS_EXPAND
+! EXTERN char_u e_patnotf[] INIT(= N_("Pattern not found"));
+ #endif
+! EXTERN char_u e_patnotf2[] INIT(= N_("E486: Pattern not found: %s"));
+! EXTERN char_u e_positive[] INIT(= N_("E487: Argument must be positive"));
+ #if defined(UNIX) || defined(FEAT_SESSION)
+! EXTERN char_u e_prev_dir[] INIT(= N_("E459: Cannot go back to previous directory"));
+ #endif
+
+ #ifdef FEAT_QUICKFIX
+! EXTERN char_u e_quickfix[] INIT(= N_("E42: No Errors"));
+! EXTERN char_u e_loclist[] INIT(= N_("E776: No location list"));
+ #endif
+! EXTERN char_u e_re_damg[] INIT(= N_("E43: Damaged match string"));
+! EXTERN char_u e_re_corr[] INIT(= N_("E44: Corrupted regexp program"));
+! EXTERN char_u e_readonly[] INIT(= N_("E45: 'readonly' option is set (add ! to override)"));
+ #ifdef FEAT_EVAL
+! EXTERN char_u e_readonlyvar[] INIT(= N_("E46: Cannot change read-only variable \"%s\""));
+! EXTERN char_u e_readonlysbx[] INIT(= N_("E794: Cannot set variable in the sandbox: \"%s\""));
+! EXTERN char_u e_emptykey[] INIT(= N_("E713: Cannot use empty key for Dictionary"));
+! EXTERN char_u e_dictreq[] INIT(= N_("E715: Dictionary required"));
+! EXTERN char_u e_listidx[] INIT(= N_("E684: list index out of range: %ld"));
+! EXTERN char_u e_blobidx[] INIT(= N_("E979: Blob index out of range: %ld"));
+! EXTERN char_u e_invalblob[] INIT(= N_("E978: Invalid operation for Blob"));
+! EXTERN char_u e_toomanyarg[] INIT(= N_("E118: Too many arguments for function: %s"));
+! EXTERN char_u e_dictkey[] INIT(= N_("E716: Key not present in Dictionary: %s"));
+! EXTERN char_u e_listreq[] INIT(= N_("E714: List required"));
+! EXTERN char_u e_listdictarg[] INIT(= N_("E712: Argument of %s must be a List or Dictionary"));
+ #endif
+ #ifdef FEAT_QUICKFIX
+! EXTERN char_u e_readerrf[] INIT(= N_("E47: Error while reading errorfile"));
+ #endif
+ #ifdef HAVE_SANDBOX
+! EXTERN char_u e_sandbox[] INIT(= N_("E48: Not allowed in sandbox"));
+ #endif
+! EXTERN char_u e_secure[] INIT(= N_("E523: Not allowed here"));
+ #if defined(AMIGA) || defined(MACOS_X) || defined(MSWIN) \
+ || defined(UNIX) || defined(VMS)
+! EXTERN char_u e_screenmode[] INIT(= N_("E359: Screen mode setting not supported"));
+ #endif
+! EXTERN char_u e_scroll[] INIT(= N_("E49: Invalid scroll size"));
+! EXTERN char_u e_shellempty[] INIT(= N_("E91: 'shell' option is empty"));
+ #if defined(FEAT_SIGN_ICONS) && !defined(FEAT_GUI_GTK)
+! EXTERN char_u e_signdata[] INIT(= N_("E255: Couldn't read in sign data!"));
+ #endif
+! EXTERN char_u e_swapclose[] INIT(= N_("E72: Close error on swap file"));
+! EXTERN char_u e_tagstack[] INIT(= N_("E73: tag stack empty"));
+! EXTERN char_u e_toocompl[] INIT(= N_("E74: Command too complex"));
+! EXTERN char_u e_longname[] INIT(= N_("E75: Name too long"));
+! EXTERN char_u e_toomsbra[] INIT(= N_("E76: Too many ["));
+! EXTERN char_u e_toomany[] INIT(= N_("E77: Too many file names"));
+! EXTERN char_u e_trailing[] INIT(= N_("E488: Trailing characters"));
+! EXTERN char_u e_umark[] INIT(= N_("E78: Unknown mark"));
+! EXTERN char_u e_wildexpand[] INIT(= N_("E79: Cannot expand wildcards"));
+! EXTERN char_u e_winheight[] INIT(= N_("E591: 'winheight' cannot be smaller than 'winminheight'"));
+! EXTERN char_u e_winwidth[] INIT(= N_("E592: 'winwidth' cannot be smaller than 'winminwidth'"));
+! EXTERN char_u e_write[] INIT(= N_("E80: Error while writing"));
+! EXTERN char_u e_zerocount[] INIT(= N_("E939: Positive count required"));
+ #ifdef FEAT_EVAL
+! EXTERN char_u e_usingsid[] INIT(= N_("E81: Using <SID> not in a script context"));
+ #endif
+ #ifdef FEAT_CLIENTSERVER
+! EXTERN char_u e_invexprmsg[] INIT(= N_("E449: Invalid expression received"));
+ #endif
+ #ifdef FEAT_NETBEANS_INTG
+! EXTERN char_u e_guarded[] INIT(= N_("E463: Region is guarded, cannot modify"));
+! EXTERN char_u e_nbreadonly[] INIT(= N_("E744: NetBeans does not allow changes in read-only files"));
+ #endif
+! EXTERN char_u e_maxmempat[] INIT(= N_("E363: pattern uses more memory than 'maxmempattern'"));
+! EXTERN char_u e_emptybuf[] INIT(= N_("E749: empty buffer"));
+! EXTERN char_u e_nobufnr[] INIT(= N_("E86: Buffer %ld does not exist"));
+
+! EXTERN char_u e_invalpat[] INIT(= N_("E682: Invalid search pattern or delimiter"));
+! EXTERN char_u e_bufloaded[] INIT(= N_("E139: File is loaded in another buffer"));
+ #if defined(FEAT_SYN_HL) || \
+ (defined(FEAT_INS_EXPAND) && defined(FEAT_COMPL_FUNC))
+! EXTERN char_u e_notset[] INIT(= N_("E764: Option '%s' is not set"));
+ #endif
+ #ifndef FEAT_CLIPBOARD
+! EXTERN char_u e_invalidreg[] INIT(= N_("E850: Invalid register name"));
+ #endif
+! EXTERN char_u e_dirnotf[] INIT(= N_("E919: Directory not found in '%s': \"%s\""));
+! EXTERN char_u e_au_recursive[] INIT(= N_("E952: Autocommand caused recursive behavior"));
+ #ifdef FEAT_MENU
+! EXTERN char_u e_menuothermode[] INIT(= N_("E328: Menu only exists in another mode"));
+ #endif
+
+ #ifdef FEAT_GUI_MAC
+--- 1448,1592 ----
+ || defined(DYNAMIC_GETTEXT) \
+ || defined(DYNAMIC_MZSCHEME) \
+ || defined(DYNAMIC_LUA)
+! EXTERN char e_loadlib[] INIT(= N_("E370: Could not load library %s"));
+! EXTERN char e_loadfunc[] INIT(= N_("E448: Could not load library function %s"));
+ #endif
+! EXTERN char e_markinval[] INIT(= N_("E19: Mark has invalid line number"));
+! EXTERN char e_marknotset[] INIT(= N_("E20: Mark not set"));
+! EXTERN char e_modifiable[] INIT(= N_("E21: Cannot make changes, 'modifiable' is off"));
+! EXTERN char e_nesting[] INIT(= N_("E22: Scripts nested too deep"));
+! EXTERN char e_noalt[] INIT(= N_("E23: No alternate file"));
+! EXTERN char e_noabbr[] INIT(= N_("E24: No such abbreviation"));
+! EXTERN char e_nobang[] INIT(= N_("E477: No ! allowed"));
+ #ifndef FEAT_GUI
+! EXTERN char e_nogvim[] INIT(= N_("E25: GUI cannot be used: Not enabled at compile time"));
+ #endif
+ #ifndef FEAT_RIGHTLEFT
+! EXTERN char e_nohebrew[] INIT(= N_("E26: Hebrew cannot be used: Not enabled at compile time\n"));
+ #endif
+ #ifndef FEAT_FKMAP
+! EXTERN char e_nofarsi[] INIT(= N_("E27: Farsi cannot be used: Not enabled at compile time\n"));
+ #endif
+ #ifndef FEAT_ARABIC
+! EXTERN char e_noarabic[] INIT(= N_("E800: Arabic cannot be used: Not enabled at compile time\n"));
+ #endif
+ #if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_SYN_HL)
+! EXTERN char e_nogroup[] INIT(= N_("E28: No such highlight group name: %s"));
+ #endif
+! EXTERN char e_noinstext[] INIT(= N_("E29: No inserted text yet"));
+! EXTERN char e_nolastcmd[] INIT(= N_("E30: No previous command line"));
+! EXTERN char e_nomap[] INIT(= N_("E31: No such mapping"));
+! EXTERN char e_nomatch[] INIT(= N_("E479: No match"));
+! EXTERN char e_nomatch2[] INIT(= N_("E480: No match: %s"));
+! EXTERN char e_noname[] INIT(= N_("E32: No file name"));
+! EXTERN char e_nopresub[] INIT(= N_("E33: No previous substitute regular expression"));
+! EXTERN char e_noprev[] INIT(= N_("E34: No previous command"));
+! EXTERN char e_noprevre[] INIT(= N_("E35: No previous regular expression"));
+! EXTERN char e_norange[] INIT(= N_("E481: No range allowed"));
+! EXTERN char e_noroom[] INIT(= N_("E36: Not enough room"));
+ #ifdef FEAT_CLIENTSERVER
+! EXTERN char e_noserver[] INIT(= N_("E247: no registered server named \"%s\""));
+ #endif
+! EXTERN char e_notcreate[] INIT(= N_("E482: Can't create file %s"));
+! EXTERN char e_notmp[] INIT(= N_("E483: Can't get temp file name"));
+! EXTERN char e_notopen[] INIT(= N_("E484: Can't open file %s"));
+! EXTERN char e_notread[] INIT(= N_("E485: Can't read file %s"));
+! EXTERN char e_null[] INIT(= N_("E38: Null argument"));
+ #if defined(FEAT_DIGRAPHS) || defined(FEAT_TIMERS)
+! EXTERN char e_number_exp[] INIT(= N_("E39: Number expected"));
+ #endif
+ #ifdef FEAT_QUICKFIX
+! EXTERN char e_openerrf[] INIT(= N_("E40: Can't open errorfile %s"));
+ #endif
+ #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
+! EXTERN char e_opendisp[] INIT(= N_("E233: cannot open display"));
+ #endif
+! EXTERN char e_outofmem[] INIT(= N_("E41: Out of memory!"));
+ #ifdef FEAT_INS_EXPAND
+! EXTERN char e_patnotf[] INIT(= N_("Pattern not found"));
+ #endif
+! EXTERN char e_patnotf2[] INIT(= N_("E486: Pattern not found: %s"));
+! EXTERN char e_positive[] INIT(= N_("E487: Argument must be positive"));
+ #if defined(UNIX) || defined(FEAT_SESSION)
+! EXTERN char e_prev_dir[] INIT(= N_("E459: Cannot go back to previous directory"));
+ #endif
+
+ #ifdef FEAT_QUICKFIX
+! EXTERN char e_quickfix[] INIT(= N_("E42: No Errors"));
+! EXTERN char e_loclist[] INIT(= N_("E776: No location list"));
+ #endif
+! EXTERN char e_re_damg[] INIT(= N_("E43: Damaged match string"));
+! EXTERN char e_re_corr[] INIT(= N_("E44: Corrupted regexp program"));
+! EXTERN char e_readonly[] INIT(= N_("E45: 'readonly' option is set (add ! to override)"));
+ #ifdef FEAT_EVAL
+! EXTERN char e_readonlyvar[] INIT(= N_("E46: Cannot change read-only variable \"%s\""));
+! EXTERN char e_readonlysbx[] INIT(= N_("E794: Cannot set variable in the sandbox: \"%s\""));
+! EXTERN char e_emptykey[] INIT(= N_("E713: Cannot use empty key for Dictionary"));
+! EXTERN char e_dictreq[] INIT(= N_("E715: Dictionary required"));
+! EXTERN char e_listidx[] INIT(= N_("E684: list index out of range: %ld"));
+! EXTERN char e_blobidx[] INIT(= N_("E979: Blob index out of range: %ld"));
+! EXTERN char e_invalblob[] INIT(= N_("E978: Invalid operation for Blob"));
+! EXTERN char e_toomanyarg[] INIT(= N_("E118: Too many arguments for function: %s"));
+! EXTERN char e_dictkey[] INIT(= N_("E716: Key not present in Dictionary: %s"));
+! EXTERN char e_listreq[] INIT(= N_("E714: List required"));
+! EXTERN char e_listdictarg[] INIT(= N_("E712: Argument of %s must be a List or Dictionary"));
+ #endif
+ #ifdef FEAT_QUICKFIX
+! EXTERN char e_readerrf[] INIT(= N_("E47: Error while reading errorfile"));
+ #endif
+ #ifdef HAVE_SANDBOX
+! EXTERN char e_sandbox[] INIT(= N_("E48: Not allowed in sandbox"));
+ #endif
+! EXTERN char e_secure[] INIT(= N_("E523: Not allowed here"));
+ #if defined(AMIGA) || defined(MACOS_X) || defined(MSWIN) \
+ || defined(UNIX) || defined(VMS)
+! EXTERN char e_screenmode[] INIT(= N_("E359: Screen mode setting not supported"));
+ #endif
+! EXTERN char e_scroll[] INIT(= N_("E49: Invalid scroll size"));
+! EXTERN char e_shellempty[] INIT(= N_("E91: 'shell' option is empty"));
+ #if defined(FEAT_SIGN_ICONS) && !defined(FEAT_GUI_GTK)
+! EXTERN char e_signdata[] INIT(= N_("E255: Couldn't read in sign data!"));
+ #endif
+! EXTERN char e_swapclose[] INIT(= N_("E72: Close error on swap file"));
+! EXTERN char e_tagstack[] INIT(= N_("E73: tag stack empty"));
+! EXTERN char e_toocompl[] INIT(= N_("E74: Command too complex"));
+! EXTERN char e_longname[] INIT(= N_("E75: Name too long"));
+! EXTERN char e_toomsbra[] INIT(= N_("E76: Too many ["));
+! EXTERN char e_toomany[] INIT(= N_("E77: Too many file names"));
+! EXTERN char e_trailing[] INIT(= N_("E488: Trailing characters"));
+! EXTERN char e_umark[] INIT(= N_("E78: Unknown mark"));
+! EXTERN char e_wildexpand[] INIT(= N_("E79: Cannot expand wildcards"));
+! EXTERN char e_winheight[] INIT(= N_("E591: 'winheight' cannot be smaller than 'winminheight'"));
+! EXTERN char e_winwidth[] INIT(= N_("E592: 'winwidth' cannot be smaller than 'winminwidth'"));
+! EXTERN char e_write[] INIT(= N_("E80: Error while writing"));
+! EXTERN char e_zerocount[] INIT(= N_("E939: Positive count required"));
+ #ifdef FEAT_EVAL
+! EXTERN char e_usingsid[] INIT(= N_("E81: Using <SID> not in a script context"));
+ #endif
+ #ifdef FEAT_CLIENTSERVER
+! EXTERN char e_invexprmsg[] INIT(= N_("E449: Invalid expression received"));
+ #endif
+ #ifdef FEAT_NETBEANS_INTG
+! EXTERN char e_guarded[] INIT(= N_("E463: Region is guarded, cannot modify"));
+! EXTERN char e_nbreadonly[] INIT(= N_("E744: NetBeans does not allow changes in read-only files"));
+ #endif
+! EXTERN char e_maxmempat[] INIT(= N_("E363: pattern uses more memory than 'maxmempattern'"));
+! EXTERN char e_emptybuf[] INIT(= N_("E749: empty buffer"));
+! EXTERN char e_nobufnr[] INIT(= N_("E86: Buffer %ld does not exist"));
+
+! EXTERN char e_invalpat[] INIT(= N_("E682: Invalid search pattern or delimiter"));
+! EXTERN char e_bufloaded[] INIT(= N_("E139: File is loaded in another buffer"));
+ #if defined(FEAT_SYN_HL) || \
+ (defined(FEAT_INS_EXPAND) && defined(FEAT_COMPL_FUNC))
+! EXTERN char e_notset[] INIT(= N_("E764: Option '%s' is not set"));
+ #endif
+ #ifndef FEAT_CLIPBOARD
+! EXTERN char e_invalidreg[] INIT(= N_("E850: Invalid register name"));
+ #endif
+! EXTERN char e_dirnotf[] INIT(= N_("E919: Directory not found in '%s': \"%s\""));
+! EXTERN char e_au_recursive[] INIT(= N_("E952: Autocommand caused recursive behavior"));
+ #ifdef FEAT_MENU
+! EXTERN char e_menuothermode[] INIT(= N_("E328: Menu only exists in another mode"));
+ #endif
+
+ #ifdef FEAT_GUI_MAC
+*** ../vim-8.1.0742/src/gui.c 2019-01-11 20:34:18.296314730 +0100
+--- src/gui.c 2019-01-13 19:50:04.537361241 +0100
+***************
+*** 215,221 ****
+ pid = fork();
+ if (pid < 0) /* Fork error */
+ {
+! EMSG(_("E851: Failed to create a new process for the GUI"));
+ return;
+ }
+ else if (pid > 0) /* Parent */
+--- 215,221 ----
+ pid = fork();
+ if (pid < 0) /* Fork error */
+ {
+! emsg(_("E851: Failed to create a new process for the GUI"));
+ return;
+ }
+ else if (pid > 0) /* Parent */
+***************
+*** 239,245 ****
+ # else
+ waitpid(pid, &exit_status, 0);
+ # endif
+! EMSG(_("E852: The child process failed to start the GUI"));
+ return;
+ }
+ else if (status == GUI_CHILD_IO_ERROR)
+--- 239,245 ----
+ # else
+ waitpid(pid, &exit_status, 0);
+ # endif
+! emsg(_("E852: The child process failed to start the GUI"));
+ return;
+ }
+ else if (status == GUI_CHILD_IO_ERROR)
+***************
+*** 362,368 ****
+ if (result != MAYBE)
+ {
+ if (result == FAIL)
+! EMSG(_("E229: Cannot start the GUI"));
+ return result;
+ }
+
+--- 362,368 ----
+ if (result != MAYBE)
+ {
+ if (result == FAIL)
+! emsg(_("E229: Cannot start the GUI"));
+ return result;
+ }
+
+***************
+*** 515,521 ****
+ if (STRCMP(use_gvimrc, "NONE") != 0
+ && STRCMP(use_gvimrc, "NORC") != 0
+ && do_source(use_gvimrc, FALSE, DOSO_NONE) != OK)
+! EMSG2(_("E230: Cannot read from \"%s\""), use_gvimrc);
+ }
+ else
+ {
+--- 515,521 ----
+ if (STRCMP(use_gvimrc, "NONE") != 0
+ && STRCMP(use_gvimrc, "NORC") != 0
+ && do_source(use_gvimrc, FALSE, DOSO_NONE) != OK)
+! semsg(_("E230: Cannot read from \"%s\""), use_gvimrc);
+ }
+ else
+ {
+***************
+*** 649,660 ****
+ gui_init_font(*p_guifont == NUL ? hl_get_font_name()
+ : p_guifont, FALSE) == FAIL)
+ {
+! EMSG(_("E665: Cannot start GUI, no valid font found"));
+ goto error2;
+ }
+ #ifdef FEAT_MBYTE
+ if (gui_get_wide_font() == FAIL)
+! EMSG(_("E231: 'guifontwide' invalid"));
+ #endif
+
+ gui.num_cols = Columns;
+--- 649,660 ----
+ gui_init_font(*p_guifont == NUL ? hl_get_font_name()
+ : p_guifont, FALSE) == FAIL)
+ {
+! emsg(_("E665: Cannot start GUI, no valid font found"));
+ goto error2;
+ }
+ #ifdef FEAT_MBYTE
+ if (gui_get_wide_font() == FAIL)
+! emsg(_("E231: 'guifontwide' invalid"));
+ #endif
+
+ gui.num_cols = Columns;
+***************
+*** 769,775 ****
+
+ #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
+ if (!im_xim_isvalid_imactivate())
+! EMSG(_("E599: Value of 'imactivatekey' is invalid"));
+ #endif
+ /* When 'cmdheight' was set during startup it may not have taken
+ * effect yet. */
+--- 769,775 ----
+
+ #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
+ if (!im_xim_isvalid_imactivate())
+! emsg(_("E599: Value of 'imactivatekey' is invalid"));
+ #endif
+ /* When 'cmdheight' was set during startup it may not have taken
+ * effect yet. */
+***************
+*** 4785,4791 ****
+ && gui.in_use
+ #endif
+ )
+! EMSG2(_("E254: Cannot allocate color %s"), name);
+ return t;
+ }
+
+--- 4785,4791 ----
+ && gui.in_use
+ #endif
+ )
+! semsg(_("E254: Cannot allocate color %s"), name);
+ return t;
+ }
+
+*** ../vim-8.1.0742/src/gui_at_fs.c 2018-09-30 21:43:17.191693320 +0200
+--- src/gui_at_fs.c 2019-01-13 19:50:14.181271847 +0100
+***************
+*** 1063,1069 ****
+ #endif
+ if (!SFfont)
+ {
+! EMSG2(_("E616: vim_SelFile: can't get font %s"), SF_DEFAULT_FONT);
+ SFstatus = SEL_FILE_CANCEL;
+ return;
+ }
+--- 1063,1069 ----
+ #endif
+ if (!SFfont)
+ {
+! semsg(_("E616: vim_SelFile: can't get font %s"), SF_DEFAULT_FONT);
+ SFstatus = SEL_FILE_CANCEL;
+ return;
+ }
+***************
+*** 2629,2635 ****
+ XtRemoveTimeOut(SFdirModTimerId);
+ if (SFchdir(SFstartDir))
+ {
+! EMSG(_("E614: vim_SelFile: can't return to current directory"));
+ SFstatus = SEL_FILE_CANCEL;
+ }
+ }
+--- 2629,2635 ----
+ XtRemoveTimeOut(SFdirModTimerId);
+ if (SFchdir(SFstartDir))
+ {
+! emsg(_("E614: vim_SelFile: can't return to current directory"));
+ SFstatus = SEL_FILE_CANCEL;
+ }
+ }
+***************
+*** 2658,2664 ****
+
+ if (mch_dirname((char_u *)SFstartDir, MAXPATHL) == FAIL)
+ {
+! EMSG(_("E615: vim_SelFile: can't get current directory"));
+ return NULL;
+ }
+
+--- 2658,2664 ----
+
+ if (mch_dirname((char_u *)SFstartDir, MAXPATHL) == FAIL)
+ {
+! emsg(_("E615: vim_SelFile: can't get current directory"));
+ return NULL;
+ }
+
+*** ../vim-8.1.0742/src/gui_at_sb.c 2018-04-10 18:37:19.000000000 +0200
+--- src/gui_at_sb.c 2019-01-13 19:50:42.105014555 +0100
+***************
+*** 485,491 ****
+
+ if (XGetGeometry (XtDisplay(w), sbw->scrollbar.thumb, &root, &x, &y,
+ &width, &height, &bw, &depth) == 0)
+! EMSG(_("Scrollbar Widget: Could not get geometry of thumb pixmap."));
+ }
+
+ gcValues.foreground = sbw->scrollbar.foreground;
+--- 485,491 ----
+
+ if (XGetGeometry (XtDisplay(w), sbw->scrollbar.thumb, &root, &x, &y,
+ &width, &height, &bw, &depth) == 0)
+! emsg(_("Scrollbar Widget: Could not get geometry of thumb pixmap."));
+ }
+
+ gcValues.foreground = sbw->scrollbar.foreground;
+*** ../vim-8.1.0742/src/gui_beval.c 2019-01-10 22:56:25.521250993 +0100
+--- src/gui_beval.c 2019-01-13 19:33:46.394150608 +0100
+***************
+*** 103,109 ****
+
+ if (mesg != NULL && mesgCB != NULL)
+ {
+! IEMSG(_("E232: Cannot create BalloonEval with both message and callback"));
+ return NULL;
+ }
+
+--- 103,109 ----
+
+ if (mesg != NULL && mesgCB != NULL)
+ {
+! iemsg(_("E232: Cannot create BalloonEval with both message and callback"));
+ return NULL;
+ }
+
+*** ../vim-8.1.0742/src/gui_gtk_x11.c 2018-12-11 20:39:15.442937076 +0100
+--- src/gui_gtk_x11.c 2019-01-13 19:50:51.804925705 +0100
+***************
+*** 1664,1670 ****
+ {
+ gui.dying = TRUE;
+ if (give_message)
+! EMSG(_((char *)e_opendisp));
+ return FAIL;
+ }
+ return OK;
+--- 1664,1670 ----
+ {
+ gui.dying = TRUE;
+ if (give_message)
+! emsg(_((char *)e_opendisp));
+ return FAIL;
+ }
+ return OK;
+***************
+*** 1710,1716 ****
+ if (!gtk_init_check(&gui_argc, &gui_argv))
+ {
+ gui.dying = TRUE;
+! EMSG(_((char *)e_opendisp));
+ return FAIL;
+ }
+
+--- 1710,1716 ----
+ if (!gtk_init_check(&gui_argc, &gui_argv))
+ {
+ gui.dying = TRUE;
+! emsg(_((char *)e_opendisp));
+ return FAIL;
+ }
+
+***************
+*** 5247,5253 ****
+ if (font == NULL)
+ {
+ if (report_error)
+! EMSG2(_((char *)e_font), name);
+ return NULL;
+ }
+
+--- 5247,5253 ----
+ if (font == NULL)
+ {
+ if (report_error)
+! semsg(_((char *)e_font), name);
+ return NULL;
+ }
+
+***************
+*** 7138,7144 ****
+ {
+ /* The error message is already translated and will be more
+ * descriptive than anything we could possibly do ourselves. */
+! EMSG2("E255: %s", message);
+
+ if (input_conv.vc_type != CONV_NONE)
+ vim_free(message);
+--- 7138,7144 ----
+ {
+ /* The error message is already translated and will be more
+ * descriptive than anything we could possibly do ourselves. */
+! semsg("E255: %s", message);
+
+ if (input_conv.vc_type != CONV_NONE)
+ vim_free(message);
+*** ../vim-8.1.0742/src/gui_mac.c 2018-12-11 20:39:15.442937076 +0100
+--- src/gui_mac.c 2019-01-13 19:27:43.420614022 +0100
+***************
+*** 3556,3562 ****
+ if (font == NOFONT)
+ {
+ if (giveErrorIfMissing)
+! EMSG2(_(e_font), name);
+ return NOFONT;
+ }
+ /*
+--- 3556,3562 ----
+ if (font == NOFONT)
+ {
+ if (giveErrorIfMissing)
+! semsg(_(e_font), name);
+ return NOFONT;
+ }
+ /*
+*** ../vim-8.1.0742/src/gui_photon.c 2018-09-30 21:43:17.191693320 +0200
+--- src/gui_photon.c 2019-01-13 19:27:43.420614022 +0100
+***************
+*** 2937,2943 ****
+ }
+
+ if (report_error)
+! EMSG2(e_font, vim_font_name);
+
+ return FAIL;
+ }
+--- 2937,2943 ----
+ }
+
+ if (report_error)
+! semsg(e_font, vim_font_name);
+
+ return FAIL;
+ }
+*** ../vim-8.1.0742/src/gui_w32.c 2018-12-28 19:13:28.591806287 +0100
+--- src/gui_w32.c 2019-01-13 19:50:58.588863721 +0100
+***************
+*** 1582,1588 ****
+ if (get_logfont(&lf, name, NULL, giveErrorIfMissing) == OK)
+ font = get_font_handle(&lf);
+ if (font == NOFONT && giveErrorIfMissing)
+! EMSG2(_(e_font), name);
+ return font;
+ }
+
+--- 1582,1588 ----
+ if (get_logfont(&lf, name, NULL, giveErrorIfMissing) == OK)
+ font = get_font_handle(&lf);
+ if (font == NOFONT && giveErrorIfMissing)
+! semsg(_(e_font), name);
+ return font;
+ }
+
+***************
+*** 5235,5241 ****
+ EnumWindows(FindWindowTitle, (LPARAM)title);
+ if (vim_parent_hwnd == NULL)
+ {
+! EMSG2(_("E671: Cannot find window title \"%s\""), title);
+ mch_exit(2);
+ }
+ }
+--- 5235,5241 ----
+ EnumWindows(FindWindowTitle, (LPARAM)title);
+ if (vim_parent_hwnd == NULL)
+ {
+! semsg(_("E671: Cannot find window title \"%s\""), title);
+ mch_exit(2);
+ }
+ }
+***************
+*** 5246,5252 ****
+ {
+ char buf[IOSIZE];
+
+! /* Can't use EMSG() here, we have not finished initialisation yet. */
+ vim_snprintf(buf, IOSIZE,
+ _("E243: Argument not supported: \"-%s\"; Use the OLE version."),
+ arg);
+--- 5246,5252 ----
+ {
+ char buf[IOSIZE];
+
+! /* Can't use emsg() here, we have not finished initialisation yet. */
+ vim_snprintf(buf, IOSIZE,
+ _("E243: Argument not supported: \"-%s\"; Use the OLE version."),
+ arg);
+***************
+*** 5468,5474 ****
+ #endif
+ if (s_hwnd == NULL)
+ {
+! EMSG(_("E672: Unable to open window inside MDI application"));
+ mch_exit(2);
+ }
+ }
+--- 5468,5474 ----
+ #endif
+ if (s_hwnd == NULL)
+ {
+! emsg(_("E672: Unable to open window inside MDI application"));
+ mch_exit(2);
+ }
+ }
+***************
+*** 8671,8677 ****
+ {
+ if (sign.hImage)
+ close_signicon_image(&sign);
+! EMSG(_(e_signdata));
+ }
+ return (void *)psign;
+
+--- 8671,8677 ----
+ {
+ if (sign.hImage)
+ close_signicon_image(&sign);
+! emsg(_(e_signdata));
+ }
+ return (void *)psign;
+
+***************
+*** 9025,9031 ****
+
+ if (mesg != NULL && mesgCB != NULL)
+ {
+! IEMSG(_("E232: Cannot create BalloonEval with both message and callback"));
+ return NULL;
+ }
+
+--- 9025,9031 ----
+
+ if (mesg != NULL && mesgCB != NULL)
+ {
+! iemsg(_("E232: Cannot create BalloonEval with both message and callback"));
+ return NULL;
+ }
+
+*** ../vim-8.1.0742/src/gui_x11.c 2018-09-30 21:43:17.191693320 +0200
+--- src/gui_x11.c 2019-01-13 19:51:08.964769156 +0100
+***************
+*** 1295,1301 ****
+ if (app_context == NULL || gui.dpy == NULL)
+ {
+ gui.dying = TRUE;
+! EMSG(_(e_opendisp));
+ return FAIL;
+ }
+ return OK;
+--- 1295,1301 ----
+ if (app_context == NULL || gui.dpy == NULL)
+ {
+ gui.dying = TRUE;
+! emsg(_(e_opendisp));
+ return FAIL;
+ }
+ return OK;
+***************
+*** 1541,1547 ****
+ }
+
+ if (gui.color_approx)
+! EMSG(_("Vim E458: Cannot allocate colormap entry, some colors may be incorrect"));
+
+ #ifdef FEAT_SUN_WORKSHOP
+ if (usingSunWorkShop)
+--- 1541,1547 ----
+ }
+
+ if (gui.color_approx)
+! emsg(_("Vim E458: Cannot allocate colormap entry, some colors may be incorrect"));
+
+ #ifdef FEAT_SUN_WORKSHOP
+ if (usingSunWorkShop)
+***************
+*** 1970,1976 ****
+ if (font == NULL)
+ {
+ if (giveErrorIfMissing)
+! EMSG2(_(e_font), name);
+ return NOFONT;
+ }
+
+--- 1970,1976 ----
+ if (font == NULL)
+ {
+ if (giveErrorIfMissing)
+! semsg(_(e_font), name);
+ return NOFONT;
+ }
+
+***************
+*** 1994,2000 ****
+
+ if (font->max_bounds.width != font->min_bounds.width)
+ {
+! EMSG2(_(e_fontwidth), name);
+ XFreeFont(gui.dpy, font);
+ return NOFONT;
+ }
+--- 1994,2000 ----
+
+ if (font->max_bounds.width != font->min_bounds.width)
+ {
+! semsg(_(e_fontwidth), name);
+ XFreeFont(gui.dpy, font);
+ return NOFONT;
+ }
+***************
+*** 2145,2153 ****
+
+ if (giveErrorIfMissing)
+ {
+! EMSG2(_("E250: Fonts for the following charsets are missing in fontset %s:"), name);
+ for (i = 0; i < num_missing; i++)
+! EMSG2("%s", missing[i]);
+ }
+ XFreeStringList(missing);
+ }
+--- 2145,2153 ----
+
+ if (giveErrorIfMissing)
+ {
+! semsg(_("E250: Fonts for the following charsets are missing in fontset %s:"), name);
+ for (i = 0; i < num_missing; i++)
+! semsg("%s", missing[i]);
+ }
+ XFreeStringList(missing);
+ }
+***************
+*** 2155,2161 ****
+ if (fontset == NULL)
+ {
+ if (giveErrorIfMissing)
+! EMSG2(_(e_fontset), name);
+ return NOFONTSET;
+ }
+
+--- 2155,2161 ----
+ if (fontset == NULL)
+ {
+ if (giveErrorIfMissing)
+! semsg(_(e_fontset), name);
+ return NOFONTSET;
+ }
+
+***************
+*** 2187,2194 ****
+ {
+ if (xfs[i]->max_bounds.width != xfs[i]->min_bounds.width)
+ {
+! EMSG2(_("E252: Fontset name: %s"), base_name);
+! EMSG2(_("Font '%s' is not fixed-width"), font_name[i]);
+ return FAIL;
+ }
+ }
+--- 2187,2194 ----
+ {
+ if (xfs[i]->max_bounds.width != xfs[i]->min_bounds.width)
+ {
+! semsg(_("E252: Fontset name: %s"), base_name);
+! semsg(_("Font '%s' is not fixed-width"), font_name[i]);
+ return FAIL;
+ }
+ }
+***************
+*** 2207,2218 ****
+ if ( xfs[i]->max_bounds.width != 2 * min_width
+ && xfs[i]->max_bounds.width != min_width)
+ {
+! EMSG2(_("E253: Fontset name: %s"), base_name);
+! EMSG2(_("Font0: %s"), font_name[min_font_idx]);
+! EMSG2(_("Font1: %s"), font_name[i]);
+! EMSGN(_("Font%ld width is not twice that of font0"), i);
+! EMSGN(_("Font0 width: %ld"), xfs[min_font_idx]->max_bounds.width);
+! EMSGN(_("Font1 width: %ld"), xfs[i]->max_bounds.width);
+ return FAIL;
+ }
+ }
+--- 2207,2218 ----
+ if ( xfs[i]->max_bounds.width != 2 * min_width
+ && xfs[i]->max_bounds.width != min_width)
+ {
+! semsg(_("E253: Fontset name: %s"), base_name);
+! semsg(_("Font0: %s"), font_name[min_font_idx]);
+! semsg(_("Font1: %s"), font_name[i]);
+! semsg(_("Font%ld width is not twice that of font0"), i);
+! semsg(_("Font0 width: %ld"), xfs[min_font_idx]->max_bounds.width);
+! semsg(_("Font1 width: %ld"), xfs[i]->max_bounds.width);
+ return FAIL;
+ }
+ }
+***************
+*** 3326,3332 ****
+ gui.sign_width = sign->width + 8; */
+ }
+ else
+! EMSG(_(e_signdata));
+ }
+
+ return (void *)sign;
+--- 3326,3332 ----
+ gui.sign_width = sign->width + 8; */
+ }
+ else
+! emsg(_(e_signdata));
+ }
+
+ return (void *)sign;
+*** ../vim-8.1.0742/src/hangulin.c 2018-09-30 21:43:17.191693320 +0200
+--- src/hangulin.c 2019-01-13 19:34:02.178043188 +0100
+***************
+*** 588,594 ****
+ return AUTOMATA_CORRECT_NEW;
+
+ default:
+! IEMSG(_("E256: Hangul automata ERROR"));
+ break;
+ }
+ return AUTOMATA_ERROR; /* RrEeAaLlLlYy EeRrRrOoRr */
+--- 588,594 ----
+ return AUTOMATA_CORRECT_NEW;
+
+ default:
+! iemsg(_("E256: Hangul automata ERROR"));
+ break;
+ }
+ return AUTOMATA_ERROR; /* RrEeAaLlLlYy EeRrRrOoRr */
+*** ../vim-8.1.0742/src/hardcopy.c 2018-09-30 21:43:17.191693320 +0200
+--- src/hardcopy.c 2019-01-13 20:19:02.819164649 +0100
+***************
+*** 135,141 ****
+ int ff; /* seen form feed character */
+ } prt_pos_T;
+
+! static char_u *parse_list_options(char_u *option_str, option_table_T *table, int table_size);
+
+ static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T *ppos);
+
+--- 135,141 ----
+ int ff; /* seen form feed character */
+ } prt_pos_T;
+
+! static char *parse_list_options(char_u *option_str, option_table_T *table, int table_size);
+
+ static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T *ppos);
+
+***************
+*** 143,149 ****
+ * Parse 'printoptions' and set the flags in "printer_opts".
+ * Returns an error message or NULL;
+ */
+! char_u *
+ parse_printoptions(void)
+ {
+ return parse_list_options(p_popt, printer_opts, OPT_PRINT_NUM_OPTIONS);
+--- 143,149 ----
+ * Parse 'printoptions' and set the flags in "printer_opts".
+ * Returns an error message or NULL;
+ */
+! char *
+ parse_printoptions(void)
+ {
+ return parse_list_options(p_popt, printer_opts, OPT_PRINT_NUM_OPTIONS);
+***************
+*** 154,160 ****
+ * Parse 'printmbfont' and set the flags in "mbfont_opts".
+ * Returns an error message or NULL;
+ */
+! char_u *
+ parse_printmbfont(void)
+ {
+ return parse_list_options(p_pmfn, mbfont_opts, OPT_MBFONT_NUM_OPTIONS);
+--- 154,160 ----
+ * Parse 'printmbfont' and set the flags in "mbfont_opts".
+ * Returns an error message or NULL;
+ */
+! char *
+ parse_printmbfont(void)
+ {
+ return parse_list_options(p_pmfn, mbfont_opts, OPT_MBFONT_NUM_OPTIONS);
+***************
+*** 170,183 ****
+ * Returns an error message for an illegal option, NULL otherwise.
+ * Only used for the printer at the moment...
+ */
+! static char_u *
+ parse_list_options(
+ char_u *option_str,
+ option_table_T *table,
+ int table_size)
+ {
+ option_table_T *old_opts;
+! char_u *ret = NULL;
+ char_u *stringp;
+ char_u *colonp;
+ char_u *commap;
+--- 170,183 ----
+ * Returns an error message for an illegal option, NULL otherwise.
+ * Only used for the printer at the moment...
+ */
+! static char *
+ parse_list_options(
+ char_u *option_str,
+ option_table_T *table,
+ int table_size)
+ {
+ option_table_T *old_opts;
+! char *ret = NULL;
+ char_u *stringp;
+ char_u *colonp;
+ char_u *commap;
+***************
+*** 205,211 ****
+ colonp = vim_strchr(stringp, ':');
+ if (colonp == NULL)
+ {
+! ret = (char_u *)N_("E550: Missing colon");
+ break;
+ }
+ commap = vim_strchr(stringp, ',');
+--- 205,211 ----
+ colonp = vim_strchr(stringp, ':');
+ if (colonp == NULL)
+ {
+! ret = N_("E550: Missing colon");
+ break;
+ }
+ commap = vim_strchr(stringp, ',');
+***************
+*** 220,226 ****
+
+ if (idx == table_size)
+ {
+! ret = (char_u *)N_("E551: Illegal component");
+ break;
+ }
+ p = colonp + 1;
+--- 220,226 ----
+
+ if (idx == table_size)
+ {
+! ret = N_("E551: Illegal component");
+ break;
+ }
+ p = colonp + 1;
+***************
+*** 230,236 ****
+ {
+ if (!VIM_ISDIGIT(*p))
+ {
+! ret = (char_u *)N_("E552: digit expected");
+ break;
+ }
+
+--- 230,236 ----
+ {
+ if (!VIM_ISDIGIT(*p))
+ {
+! ret = N_("E552: digit expected");
+ break;
+ }
+
+***************
+*** 576,588 ****
+ # ifdef FEAT_POSTSCRIPT
+ if (*eap->arg == '>')
+ {
+! char_u *errormsg = NULL;
+
+ /* Expand things like "%.ps". */
+ if (expand_filename(eap, eap->cmdlinep, &errormsg) == FAIL)
+ {
+ if (errormsg != NULL)
+! EMSG(errormsg);
+ return;
+ }
+ settings.outfile = skipwhite(eap->arg + 1);
+--- 576,588 ----
+ # ifdef FEAT_POSTSCRIPT
+ if (*eap->arg == '>')
+ {
+! char *errormsg = NULL;
+
+ /* Expand things like "%.ps". */
+ if (expand_filename(eap, eap->cmdlinep, &errormsg) == FAIL)
+ {
+ if (errormsg != NULL)
+! emsg(errormsg);
+ return;
+ }
+ settings.outfile = skipwhite(eap->arg + 1);
+***************
+*** 1431,1437 ****
+ && fwrite(buffer, sizeof(char_u), bytes, prt_ps_fd)
+ != (size_t)bytes)
+ {
+! EMSG(_("E455: Error writing to PostScript output file"));
+ prt_file_error = TRUE;
+ }
+ }
+--- 1431,1437 ----
+ && fwrite(buffer, sizeof(char_u), bytes, prt_ps_fd)
+ != (size_t)bytes)
+ {
+! emsg(_("E455: Error writing to PostScript output file"));
+ prt_file_error = TRUE;
+ }
+ }
+***************
+*** 1873,1879 ****
+ fd_resource = mch_fopen((char *)resource->filename, READBIN);
+ if (fd_resource == NULL)
+ {
+! EMSG2(_("E624: Can't open file \"%s\""), resource->filename);
+ return FALSE;
+ }
+ vim_memset(prt_resfile.buffer, NUL, PRT_FILE_BUFFER_LEN);
+--- 1873,1879 ----
+ fd_resource = mch_fopen((char *)resource->filename, READBIN);
+ if (fd_resource == NULL)
+ {
+! semsg(_("E624: Can't open file \"%s\""), resource->filename);
+ return FALSE;
+ }
+ vim_memset(prt_resfile.buffer, NUL, PRT_FILE_BUFFER_LEN);
+***************
+*** 1883,1889 ****
+ PRT_FILE_BUFFER_LEN, fd_resource);
+ if (ferror(fd_resource))
+ {
+! EMSG2(_("E457: Can't read PostScript resource file \"%s\""),
+ resource->filename);
+ fclose(fd_resource);
+ return FALSE;
+--- 1883,1889 ----
+ PRT_FILE_BUFFER_LEN, fd_resource);
+ if (ferror(fd_resource))
+ {
+! semsg(_("E457: Can't read PostScript resource file \"%s\""),
+ resource->filename);
+ fclose(fd_resource);
+ return FALSE;
+***************
+*** 1900,1906 ****
+ if (prt_resfile_strncmp(offset, PRT_RESOURCE_HEADER,
+ (int)STRLEN(PRT_RESOURCE_HEADER)) != 0)
+ {
+! EMSG2(_("E618: file \"%s\" is not a PostScript resource file"),
+ resource->filename);
+ return FALSE;
+ }
+--- 1900,1906 ----
+ if (prt_resfile_strncmp(offset, PRT_RESOURCE_HEADER,
+ (int)STRLEN(PRT_RESOURCE_HEADER)) != 0)
+ {
+! semsg(_("E618: file \"%s\" is not a PostScript resource file"),
+ resource->filename);
+ return FALSE;
+ }
+***************
+*** 1917,1923 ****
+ if (prt_resfile_strncmp(offset, PRT_RESOURCE_RESOURCE,
+ (int)STRLEN(PRT_RESOURCE_RESOURCE)) != 0)
+ {
+! EMSG2(_("E619: file \"%s\" is not a supported PostScript resource file"),
+ resource->filename);
+ return FALSE;
+ }
+--- 1917,1923 ----
+ if (prt_resfile_strncmp(offset, PRT_RESOURCE_RESOURCE,
+ (int)STRLEN(PRT_RESOURCE_RESOURCE)) != 0)
+ {
+! semsg(_("E619: file \"%s\" is not a supported PostScript resource file"),
+ resource->filename);
+ return FALSE;
+ }
+***************
+*** 1935,1941 ****
+ resource->type = PRT_RESOURCE_TYPE_CMAP;
+ else
+ {
+! EMSG2(_("E619: file \"%s\" is not a supported PostScript resource file"),
+ resource->filename);
+ return FALSE;
+ }
+--- 1935,1941 ----
+ resource->type = PRT_RESOURCE_TYPE_CMAP;
+ else
+ {
+! semsg(_("E619: file \"%s\" is not a supported PostScript resource file"),
+ resource->filename);
+ return FALSE;
+ }
+***************
+*** 1977,1983 ****
+
+ if (!seen_title || !seen_version)
+ {
+! EMSG2(_("E619: file \"%s\" is not a supported PostScript resource file"),
+ resource->filename);
+ return FALSE;
+ }
+--- 1977,1983 ----
+
+ if (!seen_title || !seen_version)
+ {
+! semsg(_("E619: file \"%s\" is not a supported PostScript resource file"),
+ resource->filename);
+ return FALSE;
+ }
+***************
+*** 1991,1997 ****
+ /* Version number m.n should match, the revision number does not matter */
+ if (STRNCMP(resource->version, version, STRLEN(version)))
+ {
+! EMSG2(_("E621: \"%s\" resource file has wrong version"),
+ resource->name);
+ return FALSE;
+ }
+--- 1991,1997 ----
+ /* Version number m.n should match, the revision number does not matter */
+ if (STRNCMP(resource->version, version, STRLEN(version)))
+ {
+! semsg(_("E621: \"%s\" resource file has wrong version"),
+ resource->name);
+ return FALSE;
+ }
+***************
+*** 2465,2471 ****
+ /* Check encoding and character set are compatible */
+ if ((p_mbenc->needs_charset & p_mbchar->has_charset) == 0)
+ {
+! EMSG(_("E673: Incompatible multi-byte encoding and character set."));
+ return FALSE;
+ }
+
+--- 2465,2471 ----
+ /* Check encoding and character set are compatible */
+ if ((p_mbenc->needs_charset & p_mbchar->has_charset) == 0)
+ {
+! emsg(_("E673: Incompatible multi-byte encoding and character set."));
+ return FALSE;
+ }
+
+***************
+*** 2482,2488 ****
+ /* Add custom CMap character set name */
+ if (*p_pmcs == NUL)
+ {
+! EMSG(_("E674: printmbcharset cannot be empty with multi-byte encoding."));
+ return FALSE;
+ }
+ vim_strncpy((char_u *)prt_cmap, p_pmcs, sizeof(prt_cmap) - 3);
+--- 2482,2488 ----
+ /* Add custom CMap character set name */
+ if (*p_pmcs == NUL)
+ {
+! emsg(_("E674: printmbcharset cannot be empty with multi-byte encoding."));
+ return FALSE;
+ }
+ vim_strncpy((char_u *)prt_cmap, p_pmcs, sizeof(prt_cmap) - 3);
+***************
+*** 2500,2506 ****
+
+ if (!mbfont_opts[OPT_MBFONT_REGULAR].present)
+ {
+! EMSG(_("E675: No default font specified for multi-byte printing."));
+ return FALSE;
+ }
+
+--- 2500,2506 ----
+
+ if (!mbfont_opts[OPT_MBFONT_REGULAR].present)
+ {
+! emsg(_("E675: No default font specified for multi-byte printing."));
+ return FALSE;
+ }
+
+***************
+*** 2677,2683 ****
+ prt_ps_file_name = vim_tempname('p', TRUE);
+ if (prt_ps_file_name == NULL)
+ {
+! EMSG(_(e_notmp));
+ return FAIL;
+ }
+ prt_ps_fd = mch_fopen((char *)prt_ps_file_name, WRITEBIN);
+--- 2677,2683 ----
+ prt_ps_file_name = vim_tempname('p', TRUE);
+ if (prt_ps_file_name == NULL)
+ {
+! emsg(_(e_notmp));
+ return FAIL;
+ }
+ prt_ps_fd = mch_fopen((char *)prt_ps_file_name, WRITEBIN);
+***************
+*** 2693,2699 ****
+ }
+ if (prt_ps_fd == NULL)
+ {
+! EMSG(_("E324: Can't open PostScript output file"));
+ mch_print_cleanup();
+ return FAIL;
+ }
+--- 2693,2699 ----
+ }
+ if (prt_ps_fd == NULL)
+ {
+! emsg(_("E324: Can't open PostScript output file"));
+ mch_print_cleanup();
+ return FAIL;
+ }
+***************
+*** 2729,2735 ****
+ fd_resource = mch_fopen((char *)resource->filename, READBIN);
+ if (fd_resource == NULL)
+ {
+! EMSG2(_("E456: Can't open file \"%s\""), resource->filename);
+ return FALSE;
+ }
+ prt_dsc_resources("BeginResource", prt_resource_types[resource->type],
+--- 2729,2735 ----
+ fd_resource = mch_fopen((char *)resource->filename, READBIN);
+ if (fd_resource == NULL)
+ {
+! semsg(_("E456: Can't open file \"%s\""), resource->filename);
+ return FALSE;
+ }
+ prt_dsc_resources("BeginResource", prt_resource_types[resource->type],
+***************
+*** 2743,2749 ****
+ sizeof(resource_buffer), fd_resource);
+ if (ferror(fd_resource))
+ {
+! EMSG2(_("E457: Can't read PostScript resource file \"%s\""),
+ resource->filename);
+ fclose(fd_resource);
+ return FALSE;
+--- 2743,2749 ----
+ sizeof(resource_buffer), fd_resource);
+ if (ferror(fd_resource))
+ {
+! semsg(_("E457: Can't read PostScript resource file \"%s\""),
+ resource->filename);
+ fclose(fd_resource);
+ return FALSE;
+***************
+*** 2880,2886 ****
+ /* Search for external resources VIM supplies */
+ if (!prt_find_resource("prolog", res_prolog))
+ {
+! EMSG(_("E456: Can't find PostScript resource file \"prolog.ps\""));
+ goto theend;
+ }
+ if (!prt_open_resource(res_prolog))
+--- 2880,2886 ----
+ /* Search for external resources VIM supplies */
+ if (!prt_find_resource("prolog", res_prolog))
+ {
+! emsg(_("E456: Can't find PostScript resource file \"prolog.ps\""));
+ goto theend;
+ }
+ if (!prt_open_resource(res_prolog))
+***************
+*** 2893,2899 ****
+ /* Look for required version of multi-byte printing procset */
+ if (!prt_find_resource("cidfont", res_cidfont))
+ {
+! EMSG(_("E456: Can't find PostScript resource file \"cidfont.ps\""));
+ goto theend;
+ }
+ if (!prt_open_resource(res_cidfont))
+--- 2893,2899 ----
+ /* Look for required version of multi-byte printing procset */
+ if (!prt_find_resource("cidfont", res_cidfont))
+ {
+! emsg(_("E456: Can't find PostScript resource file \"cidfont.ps\""));
+ goto theend;
+ }
+ if (!prt_open_resource(res_cidfont))
+***************
+*** 2931,2937 ****
+ p_encoding = (char_u *)"latin1";
+ if (!prt_find_resource((char *)p_encoding, res_encoding))
+ {
+! EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""),
+ p_encoding);
+ goto theend;
+ }
+--- 2931,2937 ----
+ p_encoding = (char_u *)"latin1";
+ if (!prt_find_resource((char *)p_encoding, res_encoding))
+ {
+! semsg(_("E456: Can't find PostScript resource file \"%s.ps\""),
+ p_encoding);
+ goto theend;
+ }
+***************
+*** 2953,2959 ****
+ /* Include ASCII range encoding vector */
+ if (!prt_find_resource(prt_ascii_encoding, res_encoding))
+ {
+! EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""),
+ prt_ascii_encoding);
+ goto theend;
+ }
+--- 2953,2959 ----
+ /* Include ASCII range encoding vector */
+ if (!prt_find_resource(prt_ascii_encoding, res_encoding))
+ {
+! semsg(_("E456: Can't find PostScript resource file \"%s.ps\""),
+ prt_ascii_encoding);
+ goto theend;
+ }
+***************
+*** 2969,2975 ****
+ /* Set up encoding conversion if required */
+ if (FAIL == convert_setup(&prt_conv, p_enc, p_encoding))
+ {
+! EMSG2(_("E620: Unable to convert to print encoding \"%s\""),
+ p_encoding);
+ goto theend;
+ }
+--- 2969,2975 ----
+ /* Set up encoding conversion if required */
+ if (FAIL == convert_setup(&prt_conv, p_enc, p_encoding))
+ {
+! semsg(_("E620: Unable to convert to print encoding \"%s\""),
+ p_encoding);
+ goto theend;
+ }
+***************
+*** 2982,2988 ****
+ /* Find user supplied CMap */
+ if (!prt_find_resource(prt_cmap, res_cmap))
+ {
+! EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""),
+ prt_cmap);
+ goto theend;
+ }
+--- 2982,2988 ----
+ /* Find user supplied CMap */
+ if (!prt_find_resource(prt_cmap, res_cmap))
+ {
+! semsg(_("E456: Can't find PostScript resource file \"%s.ps\""),
+ prt_cmap);
+ goto theend;
+ }
+***************
+*** 3236,3242 ****
+
+ /* Not printing to a file: use 'printexpr' to print the file. */
+ if (eval_printexpr(prt_ps_file_name, psettings->arguments) == FAIL)
+! EMSG(_("E365: Failed to print PostScript file"));
+ else
+ prt_message((char_u *)_("Print job sent."));
+ }
+--- 3236,3242 ----
+
+ /* Not printing to a file: use 'printexpr' to print the file. */
+ if (eval_printexpr(prt_ps_file_name, psettings->arguments) == FAIL)
+! emsg(_("E365: Failed to print PostScript file"));
+ else
+ prt_message((char_u *)_("Print job sent."));
+ }
+*** ../vim-8.1.0742/src/hashtab.c 2017-01-15 17:16:08.000000000 +0100
+--- src/hashtab.c 2019-01-13 19:51:33.364547920 +0100
+***************
+*** 334,342 ****
+
+ #ifdef HT_DEBUG
+ if (ht->ht_used > ht->ht_filled)
+! EMSG("hash_may_resize(): more used than filled");
+ if (ht->ht_filled >= ht->ht_mask + 1)
+! EMSG("hash_may_resize(): table completely filled");
+ #endif
+
+ if (minitems == 0)
+--- 334,342 ----
+
+ #ifdef HT_DEBUG
+ if (ht->ht_used > ht->ht_filled)
+! emsg("hash_may_resize(): more used than filled");
+ if (ht->ht_filled >= ht->ht_mask + 1)
+! emsg("hash_may_resize(): table completely filled");
+ #endif
+
+ if (minitems == 0)
+*** ../vim-8.1.0742/src/if_cscope.c 2018-09-30 21:43:17.195693290 +0200
+--- src/if_cscope.c 2019-01-13 19:51:40.908479830 +0100
+***************
+*** 76,82 ****
+ static void
+ cs_usage_msg(csid_e x)
+ {
+! (void)EMSG2(_("E560: Usage: cs[cope] %s"), cs_cmds[(int)x].usage);
+ }
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+--- 76,82 ----
+ static void
+ cs_usage_msg(csid_e x)
+ {
+! (void)semsg(_("E560: Usage: cs[cope] %s"), cs_cmds[(int)x].usage);
+ }
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+***************
+*** 254,260 ****
+
+ if (*eap->arg == NUL)
+ {
+! (void)EMSG(_("E562: Usage: cstag <ident>"));
+ return;
+ }
+
+--- 254,260 ----
+
+ if (*eap->arg == NUL)
+ {
+! (void)emsg(_("E562: Usage: cstag <ident>"));
+ return;
+ }
+
+***************
+*** 312,318 ****
+
+ if (!ret)
+ {
+! (void)EMSG(_("E257: cstag: tag not found"));
+ #if defined(FEAT_QUICKFIX)
+ g_do_tagpreview = 0;
+ #endif
+--- 312,318 ----
+
+ if (!ret)
+ {
+! (void)emsg(_("E257: cstag: tag not found"));
+ #if defined(FEAT_QUICKFIX)
+ g_do_tagpreview = 0;
+ #endif
+***************
+*** 471,481 ****
+ if (buf != NULL)
+ {
+ (void)sprintf(buf, stat_emsg, fname, errno);
+! (void)EMSG(buf);
+ vim_free(buf);
+ }
+ else
+! (void)EMSG(_("E563: stat error"));
+ }
+
+
+--- 471,481 ----
+ if (buf != NULL)
+ {
+ (void)sprintf(buf, stat_emsg, fname, errno);
+! (void)emsg(buf);
+ vim_free(buf);
+ }
+ else
+! (void)emsg(_("E563: stat error"));
+ }
+
+
+***************
+*** 579,585 ****
+ else
+ {
+ if (p_csverbose)
+! (void)EMSG2(
+ _("E564: %s is not a directory or a valid cscope database"),
+ fname);
+ goto add_err;
+--- 579,585 ----
+ else
+ {
+ if (p_csverbose)
+! (void)semsg(
+ _("E564: %s is not a directory or a valid cscope database"),
+ fname);
+ goto add_err;
+***************
+*** 598,604 ****
+ {
+ msg_clr_eos();
+ (void)smsg_attr(HL_ATTR(HLF_R),
+! (char_u *)_("Added cscope database %s"),
+ csinfo[i].fname);
+ }
+ }
+--- 598,604 ----
+ {
+ msg_clr_eos();
+ (void)smsg_attr(HL_ATTR(HLF_R),
+! _("Added cscope database %s"),
+ csinfo[i].fname);
+ }
+ }
+***************
+*** 651,657 ****
+ cs_reading_emsg(
+ int idx) /* connection index */
+ {
+! EMSGN(_("E262: error reading cscope connection %ld"), idx);
+ }
+
+ #define CSREAD_BUFSIZE 2048
+--- 651,657 ----
+ cs_reading_emsg(
+ int idx) /* connection index */
+ {
+! semsg(_("E262: error reading cscope connection %ld"), idx);
+ }
+
+ #define CSREAD_BUFSIZE 2048
+***************
+*** 757,763 ****
+ search = 9;
+ break;
+ default :
+! (void)EMSG(_("E561: unknown cscope search type"));
+ cs_usage_msg(Find);
+ return NULL;
+ }
+--- 757,763 ----
+ search = 9;
+ break;
+ default :
+! (void)emsg(_("E561: unknown cscope search type"));
+ cs_usage_msg(Find);
+ return NULL;
+ }
+***************
+*** 814,820 ****
+ to_cs[0] = to_cs[1] = from_cs[0] = from_cs[1] = -1;
+ if (pipe(to_cs) < 0 || pipe(from_cs) < 0)
+ {
+! (void)EMSG(_("E566: Could not create cscope pipes"));
+ err_closing:
+ if (to_cs[0] != -1)
+ (void)close(to_cs[0]);
+--- 814,820 ----
+ to_cs[0] = to_cs[1] = from_cs[0] = from_cs[1] = -1;
+ if (pipe(to_cs) < 0 || pipe(from_cs) < 0)
+ {
+! (void)emsg(_("E566: Could not create cscope pipes"));
+ err_closing:
+ if (to_cs[0] != -1)
+ (void)close(to_cs[0]);
+***************
+*** 830,836 ****
+ switch (csinfo[i].pid = fork())
+ {
+ case -1:
+! (void)EMSG(_("E622: Could not fork for cscope"));
+ goto err_closing;
+ case 0: /* child: run cscope. */
+ if (dup2(to_cs[0], STDIN_FILENO) == -1)
+--- 830,836 ----
+ switch (csinfo[i].pid = fork())
+ {
+ case -1:
+! (void)emsg(_("E622: Could not fork for cscope"));
+ goto err_closing;
+ case 0: /* child: run cscope. */
+ if (dup2(to_cs[0], STDIN_FILENO) == -1)
+***************
+*** 853,859 ****
+ if (!(pipe_stdin = CreatePipe(&stdin_rd, &stdin_wr, &sa, 0))
+ || !(pipe_stdout = CreatePipe(&stdout_rd, &stdout_wr, &sa, 0)))
+ {
+! (void)EMSG(_("E566: Could not create cscope pipes"));
+ err_closing:
+ if (pipe_stdin)
+ {
+--- 853,859 ----
+ if (!(pipe_stdin = CreatePipe(&stdin_rd, &stdin_wr, &sa, 0))
+ || !(pipe_stdout = CreatePipe(&stdout_rd, &stdout_wr, &sa, 0)))
+ {
+! (void)emsg(_("E566: Could not create cscope pipes"));
+ err_closing:
+ if (pipe_stdin)
+ {
+***************
+*** 987,993 ****
+ if (!created)
+ {
+ PERROR(_("cs_create_connection exec failed"));
+! (void)EMSG(_("E623: Could not spawn cscope process"));
+ goto err_closing;
+ }
+ /* else */
+--- 987,993 ----
+ if (!created)
+ {
+ PERROR(_("cs_create_connection exec failed"));
+! (void)emsg(_("E623: Could not spawn cscope process"));
+ goto err_closing;
+ }
+ /* else */
+***************
+*** 1029,1035 ****
+
+ if (cs_check_for_connections() == FALSE)
+ {
+! (void)EMSG(_("E567: no cscope connections"));
+ return FALSE;
+ }
+
+--- 1029,1035 ----
+
+ if (cs_check_for_connections() == FALSE)
+ {
+! (void)emsg(_("E567: no cscope connections"));
+ return FALSE;
+ }
+
+***************
+*** 1127,1133 ****
+ if (buf != NULL)
+ {
+ sprintf(buf, nf, *qfpos, *(qfpos-1));
+! (void)EMSG(buf);
+ vim_free(buf);
+ }
+ return FALSE;
+--- 1127,1133 ----
+ if (buf != NULL)
+ {
+ sprintf(buf, nf, *qfpos, *(qfpos-1));
+! (void)emsg(buf);
+ vim_free(buf);
+ }
+ return FALSE;
+***************
+*** 1194,1204 ****
+
+ buf = (char *)alloc((unsigned)(strlen(opt) + strlen(pat) + strlen(nf)));
+ if (buf == NULL)
+! (void)EMSG(nf);
+ else
+ {
+ sprintf(buf, nf, opt, pat);
+! (void)EMSG(buf);
+ vim_free(buf);
+ }
+ vim_free(nummatches);
+--- 1194,1204 ----
+
+ buf = (char *)alloc((unsigned)(strlen(opt) + strlen(pat) + strlen(nf)));
+ if (buf == NULL)
+! (void)emsg(nf);
+ else
+ {
+ sprintf(buf, nf, opt, pat);
+! (void)emsg(buf);
+ vim_free(buf);
+ }
+ vim_free(nummatches);
+***************
+*** 1216,1222 ****
+
+ f = mch_fopen((char *)tmp, "w");
+ if (f == NULL)
+! EMSG2(_(e_notopen), tmp);
+ else
+ {
+ cs_file_results(f, nummatches);
+--- 1216,1222 ----
+
+ f = mch_fopen((char *)tmp, "w");
+ if (f == NULL)
+! semsg(_(e_notopen), tmp);
+ else
+ {
+ cs_file_results(f, nummatches);
+***************
+*** 1289,1295 ****
+ /* Use %*s rather than %30s to ensure proper alignment in utf-8 */
+ if (space_cnt < 0)
+ space_cnt = 0;
+! (void)smsg((char_u *)_("%-5s: %s%*s (Usage: %s)"),
+ cmdp->name,
+ help, space_cnt, " ",
+ cmdp->usage);
+--- 1289,1295 ----
+ /* Use %*s rather than %30s to ensure proper alignment in utf-8 */
+ if (space_cnt < 0)
+ space_cnt = 0;
+! (void)smsg(_("%-5s: %s%*s (Usage: %s)"),
+ cmdp->name,
+ help, space_cnt, " ",
+ cmdp->usage);
+***************
+*** 1378,1395 ****
+
+ if (winmsg != NULL)
+ {
+! (void)EMSG2(cant_msg, winmsg);
+ LocalFree(winmsg);
+ }
+ else
+ /* subst filename if can't get error text */
+! (void)EMSG2(cant_msg, fname);
+ }
+ return -1;
+
+ case FILEINFO_INFO_FAIL: /* GetFileInformationByHandle() failed */
+ if (p_csverbose)
+! (void)EMSG(_("E626: cannot get cscope database information"));
+ return -1;
+ }
+ #endif
+--- 1378,1395 ----
+
+ if (winmsg != NULL)
+ {
+! (void)semsg(cant_msg, winmsg);
+ LocalFree(winmsg);
+ }
+ else
+ /* subst filename if can't get error text */
+! (void)semsg(cant_msg, fname);
+ }
+ return -1;
+
+ case FILEINFO_INFO_FAIL: /* GetFileInformationByHandle() failed */
+ if (p_csverbose)
+! (void)emsg(_("E626: cannot get cscope database information"));
+ return -1;
+ }
+ #endif
+***************
+*** 1412,1418 ****
+ )
+ {
+ if (p_csverbose)
+! (void)EMSG(_("E568: duplicate cscope database not added"));
+ return -1;
+ }
+
+--- 1412,1418 ----
+ )
+ {
+ if (p_csverbose)
+! (void)emsg(_("E568: duplicate cscope database not added"));
+ return -1;
+ }
+
+***************
+*** 1555,1561 ****
+ if ((i != -1) && (i >= csinfo_size || i < -1 || csinfo[i].fname == NULL))
+ {
+ if (p_csverbose)
+! (void)EMSG2(_("E261: cscope connection %s not found"), stok);
+ }
+ else
+ {
+--- 1555,1561 ----
+ if ((i != -1) && (i >= csinfo_size || i < -1 || csinfo[i].fname == NULL))
+ {
+ if (p_csverbose)
+! (void)semsg(_("E261: cscope connection %s not found"), stok);
+ }
+ else
+ {
+***************
+*** 1587,1593 ****
+ {
+ msg_clr_eos();
+ (void)smsg_attr(HL_ATTR(HLF_R) | MSG_HIST,
+! (char_u *)_("cscope connection %s closed"), cname);
+ }
+ cs_release_csp(i, TRUE);
+ }
+--- 1587,1593 ----
+ {
+ msg_clr_eos();
+ (void)smsg_attr(HL_ATTR(HLF_R) | MSG_HIST,
+! _("cscope connection %s closed"), cname);
+ }
+ cs_release_csp(i, TRUE);
+ }
+***************
+*** 1723,1729 ****
+ cs_print_tags_priv(mp, cp, cnt);
+ break;
+ default: /* should not reach here */
+! IEMSG(_("E570: fatal error in cs_manage_matches"));
+ return NULL;
+ }
+
+--- 1723,1729 ----
+ cs_print_tags_priv(mp, cp, cnt);
+ break;
+ default: /* should not reach here */
+! iemsg(_("E570: fatal error in cs_manage_matches"));
+ return NULL;
+ }
+
+***************
+*** 2141,2147 ****
+ buf[bufpos - epromptlen] = NUL;
+
+ /* print message to user */
+! (void)EMSG2(cs_emsg, buf);
+
+ /* send RETURN to cscope */
+ (void)putc('\n', csinfo[i].to_fp);
+--- 2141,2147 ----
+ buf[bufpos - epromptlen] = NUL;
+
+ /* print message to user */
+! (void)semsg(cs_emsg, buf);
+
+ /* send RETURN to cscope */
+ (void)putc('\n', csinfo[i].to_fp);
+***************
+*** 2162,2168 ****
+ {
+ PERROR("cs_read_prompt EOF");
+ if (buf != NULL && buf[0] != NUL)
+! (void)EMSG2(cs_emsg, buf);
+ else if (p_csverbose)
+ cs_reading_emsg(i); /* don't have additional information */
+ cs_release_csp(i, TRUE);
+--- 2162,2168 ----
+ {
+ PERROR("cs_read_prompt EOF");
+ if (buf != NULL && buf[0] != NUL)
+! (void)semsg(cs_emsg, buf);
+ else if (p_csverbose)
+ cs_reading_emsg(i); /* don't have additional information */
+ cs_release_csp(i, TRUE);
+***************
+*** 2476,2485 ****
+ continue;
+
+ if (csinfo[i].ppath != NULL)
+! (void)smsg((char_u *)"%2d %-5ld %-34s %-32s",
+ i, (long)csinfo[i].pid, csinfo[i].fname, csinfo[i].ppath);
+ else
+! (void)smsg((char_u *)"%2d %-5ld %-34s <none>",
+ i, (long)csinfo[i].pid, csinfo[i].fname);
+ }
+ }
+--- 2476,2485 ----
+ continue;
+
+ if (csinfo[i].ppath != NULL)
+! (void)smsg("%2d %-5ld %-34s %-32s",
+ i, (long)csinfo[i].pid, csinfo[i].fname, csinfo[i].ppath);
+ else
+! (void)smsg("%2d %-5ld %-34s <none>",
+ i, (long)csinfo[i].pid, csinfo[i].fname);
+ }
+ }
+*** ../vim-8.1.0742/src/if_lua.c 2019-01-01 00:41:50.040176062 +0100
+--- src/if_lua.c 2019-01-13 19:51:49.644401160 +0100
+***************
+*** 415,421 ****
+ if (!hinstLua)
+ {
+ if (verbose)
+! EMSG2(_(e_loadlib), libname);
+ return FAIL;
+ }
+ for (reg = luaV_dll; reg->func; reg++)
+--- 415,421 ----
+ if (!hinstLua)
+ {
+ if (verbose)
+! semsg(_(e_loadlib), libname);
+ return FAIL;
+ }
+ for (reg = luaV_dll; reg->func; reg++)
+***************
+*** 425,431 ****
+ close_dll(hinstLua);
+ hinstLua = 0;
+ if (verbose)
+! EMSG2(_(e_loadfunc), reg->name);
+ return FAIL;
+ }
+ }
+--- 425,431 ----
+ close_dll(hinstLua);
+ hinstLua = 0;
+ if (verbose)
+! semsg(_(e_loadfunc), reg->name);
+ return FAIL;
+ }
+ }
+***************
+*** 1795,1801 ****
+ return 0;
+ }
+ if (luaV_totypval(L, -1, rettv) == FAIL)
+! EMSG("luaeval: cannot convert value");
+ return 0;
+ }
+
+--- 1795,1801 ----
+ return 0;
+ }
+ if (luaV_totypval(L, -1, rettv) == FAIL)
+! emsg("luaeval: cannot convert value");
+ return 0;
+ }
+
+***************
+*** 1926,1932 ****
+ #ifdef DYNAMIC_LUA
+ if (!lua_enabled(TRUE))
+ {
+! EMSG(_("Lua library cannot be loaded."));
+ return FAIL;
+ }
+ #endif
+--- 1926,1932 ----
+ #ifdef DYNAMIC_LUA
+ if (!lua_enabled(TRUE))
+ {
+! emsg(_("Lua library cannot be loaded."));
+ return FAIL;
+ }
+ #endif
+***************
+*** 1978,1984 ****
+ if (lua_init() == FAIL) return;
+ if (u_save(eap->line1 - 1, eap->line2 + 1) == FAIL)
+ {
+! EMSG(_("cannot save undo information"));
+ return;
+ }
+ luaV_setrange(L, eap->line1, eap->line2);
+--- 1978,1984 ----
+ if (lua_init() == FAIL) return;
+ if (u_save(eap->line1 - 1, eap->line2 + 1) == FAIL)
+ {
+! emsg(_("cannot save undo information"));
+ return;
+ }
+ luaV_setrange(L, eap->line1, eap->line2);
+*** ../vim-8.1.0742/src/if_mzsch.c 2019-01-10 22:56:25.525250963 +0100
+--- src/if_mzsch.c 2019-01-13 19:51:58.384322647 +0100
+***************
+*** 672,685 ****
+ if (!hMzGC)
+ {
+ if (verbose)
+! EMSG2(_(e_loadlib), gc_dll);
+ return FAIL;
+ }
+
+ if (!hMzSch)
+ {
+ if (verbose)
+! EMSG2(_(e_loadlib), sch_dll);
+ return FAIL;
+ }
+
+--- 672,685 ----
+ if (!hMzGC)
+ {
+ if (verbose)
+! semsg(_(e_loadlib), gc_dll);
+ return FAIL;
+ }
+
+ if (!hMzSch)
+ {
+ if (verbose)
+! semsg(_(e_loadlib), sch_dll);
+ return FAIL;
+ }
+
+***************
+*** 693,699 ****
+ FreeLibrary(hMzGC);
+ hMzGC = 0;
+ if (verbose)
+! EMSG2(_(e_loadfunc), thunk->name);
+ return FAIL;
+ }
+ }
+--- 693,699 ----
+ FreeLibrary(hMzGC);
+ hMzGC = 0;
+ if (verbose)
+! semsg(_(e_loadfunc), thunk->name);
+ return FAIL;
+ }
+ }
+***************
+*** 707,713 ****
+ FreeLibrary(hMzGC);
+ hMzGC = 0;
+ if (verbose)
+! EMSG2(_(e_loadfunc), thunk->name);
+ return FAIL;
+ }
+ }
+--- 707,713 ----
+ FreeLibrary(hMzGC);
+ hMzGC = 0;
+ if (verbose)
+! semsg(_(e_loadfunc), thunk->name);
+ return FAIL;
+ }
+ }
+***************
+*** 1260,1272 ****
+ #ifdef DYNAMIC_MZSCHEME
+ if (disabled || !mzscheme_enabled(TRUE))
+ {
+! EMSG(_("E815: Sorry, this command is disabled, the MzScheme libraries could not be loaded."));
+ return -1;
+ }
+ #endif
+ if (load_base_module_failed || startup_mzscheme())
+ {
+! EMSG(_("E895: Sorry, this command is disabled, the MzScheme's racket/base module could not be loaded."));
+ return -1;
+ }
+ initialized = TRUE;
+--- 1260,1272 ----
+ #ifdef DYNAMIC_MZSCHEME
+ if (disabled || !mzscheme_enabled(TRUE))
+ {
+! emsg(_("E815: Sorry, this command is disabled, the MzScheme libraries could not be loaded."));
+ return -1;
+ }
+ #endif
+ if (load_base_module_failed || startup_mzscheme())
+ {
+! emsg(_("E895: Sorry, this command is disabled, the MzScheme's racket/base module could not be loaded."));
+ return -1;
+ }
+ initialized = TRUE;
+***************
+*** 1572,1578 ****
+ {
+ *p = '\0';
+ if (error)
+! EMSG(prev);
+ else
+ MSG(prev);
+ prev = p + 1;
+--- 1572,1578 ----
+ {
+ *p = '\0';
+ if (error)
+! emsg(prev);
+ else
+ MSG(prev);
+ prev = p + 1;
+***************
+*** 1580,1586 ****
+ }
+
+ if (error)
+! EMSG(prev);
+ else
+ MSG(prev);
+ }
+--- 1580,1586 ----
+ }
+
+ if (error)
+! emsg(prev);
+ else
+ MSG(prev);
+ }
+*** ../vim-8.1.0742/src/if_perl.xs 2019-01-12 22:47:01.260088089 +0100
+--- src/if_perl.xs 2019-01-13 19:58:15.057080455 +0100
+***************
+*** 695,701 ****
+ if ((hPerlLib = load_dll(libname)) == NULL)
+ {
+ if (verbose)
+! EMSG2(_("E370: Could not load library %s"), libname);
+ return FAIL;
+ }
+ for (i = 0; perl_funcname_table[i].ptr; ++i)
+--- 695,701 ----
+ if ((hPerlLib = load_dll(libname)) == NULL)
+ {
+ if (verbose)
+! semsg(_("E370: Could not load library %s"), libname);
+ return FAIL;
+ }
+ for (i = 0; perl_funcname_table[i].ptr; ++i)
+***************
+*** 706,712 ****
+ close_dll(hPerlLib);
+ hPerlLib = NULL;
+ if (verbose)
+! EMSG2(_(e_loadfunc), perl_funcname_table[i].name);
+ return FAIL;
+ }
+ }
+--- 706,712 ----
+ close_dll(hPerlLib);
+ hPerlLib = NULL;
+ if (verbose)
+! semsg((const char *)_(e_loadfunc), perl_funcname_table[i].name);
+ return FAIL;
+ }
+ }
+***************
+*** 998,1004 ****
+ #ifdef DYNAMIC_PERL
+ if (!perl_enabled(TRUE))
+ {
+! EMSG(_(e_noperl));
+ vim_free(script);
+ return;
+ }
+--- 998,1004 ----
+ #ifdef DYNAMIC_PERL
+ if (!perl_enabled(TRUE))
+ {
+! emsg(_(e_noperl));
+ vim_free(script);
+ return;
+ }
+***************
+*** 1025,1031 ****
+ safe = perl_get_sv("VIM::safe", FALSE);
+ # ifndef MAKE_TEST /* avoid a warning for unreachable code */
+ if (safe == NULL || !SvTRUE(safe))
+! EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
+ else
+ # endif
+ {
+--- 1025,1031 ----
+ safe = perl_get_sv("VIM::safe", FALSE);
+ # ifndef MAKE_TEST /* avoid a warning for unreachable code */
+ if (safe == NULL || !SvTRUE(safe))
+! emsg(_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
+ else
+ # endif
+ {
+***************
+*** 1235,1241 ****
+ key = hv_iterkey(entry, &key_len);
+
+ if (!key || !key_len || strlen(key) < (size_t)key_len) {
+! EMSG2("Malformed key Dictionary '%s'", key && *key ? key : "(empty)");
+ break;
+ }
+
+--- 1235,1241 ----
+ key = hv_iterkey(entry, &key_len);
+
+ if (!key || !key_len || strlen(key) < (size_t)key_len) {
+! semsg("Malformed key Dictionary '%s'", key && *key ? key : "(empty)");
+ break;
+ }
+
+***************
+*** 1286,1292 ****
+ #ifdef DYNAMIC_PERL
+ if (!perl_enabled(TRUE))
+ {
+! EMSG(_(e_noperl));
+ return;
+ }
+ #endif
+--- 1286,1292 ----
+ #ifdef DYNAMIC_PERL
+ if (!perl_enabled(TRUE))
+ {
+! emsg(_(e_noperl));
+ return;
+ }
+ #endif
+***************
+*** 1304,1310 ****
+ safe = get_sv("VIM::safe", FALSE);
+ # ifndef MAKE_TEST /* avoid a warning for unreachable code */
+ if (safe == NULL || !SvTRUE(safe))
+! EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
+ else
+ # endif
+ {
+--- 1304,1310 ----
+ safe = get_sv("VIM::safe", FALSE);
+ # ifndef MAKE_TEST /* avoid a warning for unreachable code */
+ if (safe == NULL || !SvTRUE(safe))
+! emsg(_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
+ else
+ # endif
+ {
+***************
+*** 1356,1362 ****
+ #ifdef DYNAMIC_PERL
+ if (!perl_enabled(TRUE))
+ {
+! EMSG(_(e_noperl));
+ return;
+ }
+ #endif
+--- 1356,1362 ----
+ #ifdef DYNAMIC_PERL
+ if (!perl_enabled(TRUE))
+ {
+! emsg(_(e_noperl));
+ return;
+ }
+ #endif
+*** ../vim-8.1.0742/src/if_py_both.h 2019-01-12 22:47:01.260088089 +0100
+--- src/if_py_both.h 2019-01-13 19:58:18.909048411 +0100
+***************
+*** 536,542 ****
+
+ if (PyErr_Occurred())
+ {
+! EMSG(_("E264: Python: Error initialising I/O objects"));
+ return -1;
+ }
+
+--- 536,542 ----
+
+ if (PyErr_Occurred())
+ {
+! emsg(_("E264: Python: Error initialising I/O objects"));
+ return -1;
+ }
+
+***************
+*** 5664,5670 ****
+ }
+ else if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_SystemExit))
+ {
+! EMSG2(_(e_py_systemexit), "python");
+ PyErr_Clear();
+ }
+ else
+--- 5664,5670 ----
+ }
+ else if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_SystemExit))
+ {
+! semsg(_(e_py_systemexit), "python");
+ PyErr_Clear();
+ }
+ else
+***************
+*** 5691,5697 ****
+
+ if (u_save((linenr_T)RangeStart - 1, (linenr_T)RangeEnd + 1) != OK)
+ {
+! EMSG(_("cannot save undo information"));
+ return;
+ }
+
+--- 5691,5697 ----
+
+ if (u_save((linenr_T)RangeStart - 1, (linenr_T)RangeEnd + 1) != OK)
+ {
+! emsg(_("cannot save undo information"));
+ return;
+ }
+
+***************
+*** 5709,5715 ****
+ else if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_SystemExit))
+ {
+ PyMem_Free(code);
+! EMSG2(_(e_py_systemexit), "python");
+ PyErr_Clear();
+ return;
+ }
+--- 5709,5715 ----
+ else if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_SystemExit))
+ {
+ PyMem_Free(code);
+! semsg(_(e_py_systemexit), "python");
+ PyErr_Clear();
+ return;
+ }
+***************
+*** 5720,5726 ****
+
+ if (status)
+ {
+! EMSG(_("failed to run the code"));
+ return;
+ }
+
+--- 5720,5726 ----
+
+ if (status)
+ {
+! emsg(_("failed to run the code"));
+ return;
+ }
+
+***************
+*** 5810,5829 ****
+ {
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_SystemExit))
+ {
+! EMSG2(_(e_py_systemexit), "python");
+ PyErr_Clear();
+ }
+ else
+ {
+ if (PyErr_Occurred() && !msg_silent)
+ PyErr_PrintEx(0);
+! EMSG(_("E858: Eval did not return a valid python object"));
+ }
+ }
+ else
+ {
+ if (ConvertFromPyObject(run_ret, rettv) == -1)
+! EMSG(_("E859: Failed to convert returned python object to vim value"));
+ Py_DECREF(run_ret);
+ }
+ PyErr_Clear();
+--- 5810,5829 ----
+ {
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_SystemExit))
+ {
+! semsg(_(e_py_systemexit), "python");
+ PyErr_Clear();
+ }
+ else
+ {
+ if (PyErr_Occurred() && !msg_silent)
+ PyErr_PrintEx(0);
+! emsg(_("E858: Eval did not return a valid python object"));
+ }
+ }
+ else
+ {
+ if (ConvertFromPyObject(run_ret, rettv) == -1)
+! emsg(_("E859: Failed to convert returned python object to vim value"));
+ Py_DECREF(run_ret);
+ }
+ PyErr_Clear();
+***************
+*** 6727,6733 ****
+ else
+ {
+ VimTryStart();
+! EMSG(_("Failed to set path hook: sys.path_hooks is not a list\n"
+ "You should now do the following:\n"
+ "- append vim.path_hook to sys.path_hooks\n"
+ "- append vim.VIM_SPECIAL_PATH to sys.path\n"));
+--- 6727,6733 ----
+ else
+ {
+ VimTryStart();
+! emsg(_("Failed to set path hook: sys.path_hooks is not a list\n"
+ "You should now do the following:\n"
+ "- append vim.path_hook to sys.path_hooks\n"
+ "- append vim.VIM_SPECIAL_PATH to sys.path\n"));
+***************
+*** 6757,6763 ****
+ else
+ {
+ VimTryStart();
+! EMSG(_("Failed to set path: sys.path is not a list\n"
+ "You should now append vim.VIM_SPECIAL_PATH to sys.path"));
+ VimTryEnd(); /* Discard the error */
+ }
+--- 6757,6763 ----
+ else
+ {
+ VimTryStart();
+! emsg(_("Failed to set path: sys.path is not a list\n"
+ "You should now append vim.VIM_SPECIAL_PATH to sys.path"));
+ VimTryEnd(); /* Discard the error */
+ }
+*** ../vim-8.1.0742/src/if_python.c 2019-01-12 22:47:01.260088089 +0100
+--- src/if_python.c 2019-01-13 19:52:08.008236404 +0100
+***************
+*** 685,691 ****
+ if (python3_loaded())
+ {
+ if (verbose)
+! EMSG(_("E836: This Vim cannot execute :python after using :py3"));
+ return FAIL;
+ }
+ #endif
+--- 685,691 ----
+ if (python3_loaded())
+ {
+ if (verbose)
+! emsg(_("E836: This Vim cannot execute :python after using :py3"));
+ return FAIL;
+ }
+ #endif
+***************
+*** 696,702 ****
+ if (!hinstPython)
+ {
+ if (verbose)
+! EMSG2(_(e_loadlib), libname);
+ return FAIL;
+ }
+
+--- 696,702 ----
+ if (!hinstPython)
+ {
+ if (verbose)
+! semsg(_(e_loadlib), libname);
+ return FAIL;
+ }
+
+***************
+*** 708,714 ****
+ close_dll(hinstPython);
+ hinstPython = 0;
+ if (verbose)
+! EMSG2(_(e_loadfunc), python_funcname_table[i].name);
+ return FAIL;
+ }
+ }
+--- 708,714 ----
+ close_dll(hinstPython);
+ hinstPython = 0;
+ if (verbose)
+! semsg(_(e_loadfunc), python_funcname_table[i].name);
+ return FAIL;
+ }
+ }
+***************
+*** 725,731 ****
+ close_dll(hinstPython);
+ hinstPython = 0;
+ if (verbose)
+! EMSG2(_(e_loadfunc), "PyUnicode_UCSX_*");
+ return FAIL;
+ }
+
+--- 725,731 ----
+ close_dll(hinstPython);
+ hinstPython = 0;
+ if (verbose)
+! semsg(_(e_loadfunc), "PyUnicode_UCSX_*");
+ return FAIL;
+ }
+
+***************
+*** 928,934 ****
+ #ifdef DYNAMIC_PYTHON
+ if (!python_enabled(TRUE))
+ {
+! EMSG(_("E263: Sorry, this command is disabled, the Python library could not be loaded."));
+ goto fail;
+ }
+ #endif
+--- 928,934 ----
+ #ifdef DYNAMIC_PYTHON
+ if (!python_enabled(TRUE))
+ {
+! emsg(_("E263: Sorry, this command is disabled, the Python library could not be loaded."));
+ goto fail;
+ }
+ #endif
+***************
+*** 960,966 ****
+ site = PyImport_ImportModule("site");
+ if (site == NULL)
+ {
+! EMSG(_("E887: Sorry, this command is disabled, the Python's site module could not be loaded."));
+ goto fail;
+ }
+ Py_DECREF(site);
+--- 960,966 ----
+ site = PyImport_ImportModule("site");
+ if (site == NULL)
+ {
+! emsg(_("E887: Sorry, this command is disabled, the Python's site module could not be loaded."));
+ goto fail;
+ }
+ Py_DECREF(site);
+***************
+*** 1035,1041 ****
+ #ifndef PY_CAN_RECURSE
+ if (recursive)
+ {
+! EMSG(_("E659: Cannot invoke Python recursively"));
+ return;
+ }
+ ++recursive;
+--- 1035,1041 ----
+ #ifndef PY_CAN_RECURSE
+ if (recursive)
+ {
+! emsg(_("E659: Cannot invoke Python recursively"));
+ return;
+ }
+ ++recursive;
+*** ../vim-8.1.0742/src/if_python3.c 2019-01-12 22:47:01.260088089 +0100
+--- src/if_python3.c 2019-01-13 19:52:20.724122796 +0100
+***************
+*** 634,640 ****
+ if (python_loaded())
+ {
+ if (verbose)
+! EMSG(_("E837: This Vim cannot execute :py3 after using :python"));
+ return FAIL;
+ }
+ # endif
+--- 634,640 ----
+ if (python_loaded())
+ {
+ if (verbose)
+! emsg(_("E837: This Vim cannot execute :py3 after using :python"));
+ return FAIL;
+ }
+ # endif
+***************
+*** 646,652 ****
+ if (!hinstPy3)
+ {
+ if (verbose)
+! EMSG2(_(e_loadlib), libname);
+ return FAIL;
+ }
+
+--- 646,652 ----
+ if (!hinstPy3)
+ {
+ if (verbose)
+! semsg(_(e_loadlib), libname);
+ return FAIL;
+ }
+
+***************
+*** 658,664 ****
+ close_dll(hinstPy3);
+ hinstPy3 = 0;
+ if (verbose)
+! EMSG2(_(e_loadfunc), py3_funcname_table[i].name);
+ return FAIL;
+ }
+ }
+--- 658,664 ----
+ close_dll(hinstPy3);
+ hinstPy3 = 0;
+ if (verbose)
+! semsg(_(e_loadfunc), py3_funcname_table[i].name);
+ return FAIL;
+ }
+ }
+***************
+*** 693,699 ****
+ close_dll(hinstPy3);
+ hinstPy3 = 0;
+ if (verbose)
+! EMSG2(_(e_loadfunc), "PyUnicode_UCSX_*");
+ return FAIL;
+ }
+
+--- 693,699 ----
+ close_dll(hinstPy3);
+ hinstPy3 = 0;
+ if (verbose)
+! semsg(_(e_loadfunc), "PyUnicode_UCSX_*");
+ return FAIL;
+ }
+
+***************
+*** 864,870 ****
+ #ifdef DYNAMIC_PYTHON3
+ if (!python3_enabled(TRUE))
+ {
+! EMSG(_("E263: Sorry, this command is disabled, the Python library could not be loaded."));
+ goto fail;
+ }
+ #endif
+--- 864,870 ----
+ #ifdef DYNAMIC_PYTHON3
+ if (!python3_enabled(TRUE))
+ {
+! emsg(_("E263: Sorry, this command is disabled, the Python library could not be loaded."));
+ goto fail;
+ }
+ #endif
+*** ../vim-8.1.0742/src/if_ruby.c 2019-01-12 22:47:01.264088074 +0100
+--- src/if_ruby.c 2019-01-13 19:52:26.720069358 +0100
+***************
+*** 745,751 ****
+ if (!hinstRuby)
+ {
+ if (verbose)
+! EMSG2(_(e_loadlib), libname);
+ return FAIL;
+ }
+
+--- 745,751 ----
+ if (!hinstRuby)
+ {
+ if (verbose)
+! semsg(_(e_loadlib), libname);
+ return FAIL;
+ }
+
+***************
+*** 757,763 ****
+ close_dll(hinstRuby);
+ hinstRuby = NULL;
+ if (verbose)
+! EMSG2(_(e_loadfunc), ruby_funcname_table[i].name);
+ return FAIL;
+ }
+ }
+--- 757,763 ----
+ close_dll(hinstRuby);
+ hinstRuby = NULL;
+ if (verbose)
+! semsg(_(e_loadfunc), ruby_funcname_table[i].name);
+ return FAIL;
+ }
+ }
+***************
+*** 885,891 ****
+ {
+ if (TYPE(line) != T_STRING)
+ {
+! EMSG(_("E265: $_ must be an instance of String"));
+ return;
+ }
+ ml_replace(i, (char_u *) StringValuePtr(line), 1);
+--- 885,891 ----
+ {
+ if (TYPE(line) != T_STRING)
+ {
+! emsg(_("E265: $_ must be an instance of String"));
+ return;
+ }
+ ml_replace(i, (char_u *) StringValuePtr(line), 1);
+***************
+*** 979,985 ****
+ }
+ else
+ {
+! EMSG(_("E266: Sorry, this command is disabled, the Ruby library could not be loaded."));
+ return 0;
+ }
+ #endif
+--- 979,985 ----
+ }
+ else
+ {
+! emsg(_("E266: Sorry, this command is disabled, the Ruby library could not be loaded."));
+ return 0;
+ }
+ #endif
+***************
+*** 1013,1031 ****
+ switch (state)
+ {
+ case TAG_RETURN:
+! EMSG(_("E267: unexpected return"));
+ break;
+ case TAG_NEXT:
+! EMSG(_("E268: unexpected next"));
+ break;
+ case TAG_BREAK:
+! EMSG(_("E269: unexpected break"));
+ break;
+ case TAG_REDO:
+! EMSG(_("E270: unexpected redo"));
+ break;
+ case TAG_RETRY:
+! EMSG(_("E271: retry outside of rescue clause"));
+ break;
+ case TAG_RAISE:
+ case TAG_FATAL:
+--- 1013,1031 ----
+ switch (state)
+ {
+ case TAG_RETURN:
+! emsg(_("E267: unexpected return"));
+ break;
+ case TAG_NEXT:
+! emsg(_("E268: unexpected next"));
+ break;
+ case TAG_BREAK:
+! emsg(_("E269: unexpected break"));
+ break;
+ case TAG_REDO:
+! emsg(_("E270: unexpected redo"));
+ break;
+ case TAG_RETRY:
+! emsg(_("E271: retry outside of rescue clause"));
+ break;
+ case TAG_RAISE:
+ case TAG_FATAL:
+***************
+*** 1038,1044 ****
+ einfo = rb_obj_as_string(error);
+ if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0)
+ {
+! EMSG(_("E272: unhandled exception"));
+ }
+ else
+ {
+--- 1038,1044 ----
+ einfo = rb_obj_as_string(error);
+ if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0)
+ {
+! emsg(_("E272: unhandled exception"));
+ }
+ else
+ {
+***************
+*** 1050,1056 ****
+ RSTRING_PTR(epath), RSTRING_PTR(einfo));
+ p = strchr(buff, '\n');
+ if (p) *p = '\0';
+! EMSG(buff);
+ }
+
+ attr = syn_name2attr((char_u *)"Error");
+--- 1050,1056 ----
+ RSTRING_PTR(epath), RSTRING_PTR(einfo));
+ p = strchr(buff, '\n');
+ if (p) *p = '\0';
+! emsg(buff);
+ }
+
+ attr = syn_name2attr((char_u *)"Error");
+***************
+*** 1066,1072 ****
+ break;
+ default:
+ vim_snprintf(buff, BUFSIZ, _("E273: unknown longjmp status %d"), state);
+! EMSG(buff);
+ break;
+ }
+ }
+--- 1066,1072 ----
+ break;
+ default:
+ vim_snprintf(buff, BUFSIZ, _("E273: unknown longjmp status %d"), state);
+! emsg(buff);
+ break;
+ }
+ }
+*** ../vim-8.1.0742/src/if_tcl.c 2018-11-16 16:21:01.641310033 +0100
+--- src/if_tcl.c 2019-01-13 19:52:34.236002492 +0100
+***************
+*** 213,219 ****
+ if (!(hTclLib = load_dll(libname)))
+ {
+ if (verbose)
+! EMSG2(_(e_loadlib), libname);
+ return FAIL;
+ }
+ for (i = 0; tcl_funcname_table[i].ptr; ++i)
+--- 213,219 ----
+ if (!(hTclLib = load_dll(libname)))
+ {
+ if (verbose)
+! semsg(_(e_loadlib), libname);
+ return FAIL;
+ }
+ for (i = 0; tcl_funcname_table[i].ptr; ++i)
+***************
+*** 224,230 ****
+ close_dll(hTclLib);
+ hTclLib = NULL;
+ if (verbose)
+! EMSG2(_(e_loadfunc), tcl_funcname_table[i].name);
+ return FAIL;
+ }
+ }
+--- 224,230 ----
+ close_dll(hTclLib);
+ hTclLib = NULL;
+ if (verbose)
+! semsg(_(e_loadfunc), tcl_funcname_table[i].name);
+ return FAIL;
+ }
+ }
+***************
+*** 1539,1545 ****
+ reflist = reflist->next;
+ }
+ /* This should never happen. Famous last word? */
+! EMSG(_("E280: TCL FATAL ERROR: reflist corrupt!? Please report this to vim-dev@vim.org"));
+ Tcl_SetResult(interp, _("cannot register callback command: buffer/window reference not found"), TCL_STATIC);
+ return TCL_ERROR;
+ }
+--- 1539,1545 ----
+ reflist = reflist->next;
+ }
+ /* This should never happen. Famous last word? */
+! emsg(_("E280: TCL FATAL ERROR: reflist corrupt!? Please report this to vim-dev@vim.org"));
+ Tcl_SetResult(interp, _("cannot register callback command: buffer/window reference not found"), TCL_STATIC);
+ return TCL_ERROR;
+ }
+***************
+*** 1709,1715 ****
+ #ifdef DYNAMIC_TCL
+ if (!tcl_enabled(TRUE))
+ {
+! EMSG(_("E571: Sorry, this command is disabled: the Tcl library could not be loaded."));
+ return FAIL;
+ }
+ #endif
+--- 1709,1715 ----
+ #ifdef DYNAMIC_TCL
+ if (!tcl_enabled(TRUE))
+ {
+! emsg(_("E571: Sorry, this command is disabled: the Tcl library could not be loaded."));
+ return FAIL;
+ }
+ #endif
+***************
+*** 1817,1827 ****
+ while ((next=strchr(text, '\n')))
+ {
+ *next++ = '\0';
+! EMSG(text);
+ text = next;
+ }
+ if (*text)
+! EMSG(text);
+ }
+
+ static void
+--- 1817,1827 ----
+ while ((next=strchr(text, '\n')))
+ {
+ *next++ = '\0';
+! emsg(text);
+ text = next;
+ }
+ if (*text)
+! emsg(text);
+ }
+
+ static void
+*** ../vim-8.1.0742/src/if_xcmdsrv.c 2018-09-30 21:43:17.195693290 +0200
+--- src/if_xcmdsrv.c 2019-01-13 19:52:40.651945512 +0100
+***************
+*** 427,433 ****
+ if (w == None)
+ {
+ if (!silent)
+! EMSG2(_(e_noserver), name);
+ return -1;
+ }
+ else if (loosename != NULL)
+--- 427,433 ----
+ if (w == None)
+ {
+ if (!silent)
+! semsg(_(e_noserver), name);
+ return -1;
+ }
+ else if (loosename != NULL)
+***************
+*** 467,473 ****
+ vim_free(property);
+ if (res < 0)
+ {
+! EMSG(_("E248: Failed to send command to the destination program"));
+ return -1;
+ }
+
+--- 467,473 ----
+ vim_free(property);
+ if (res < 0)
+ {
+! emsg(_("E248: Failed to send command to the destination program"));
+ return -1;
+ }
+
+***************
+*** 732,738 ****
+
+ sscanf((char *)str, "0x%x", &id);
+ if (id == None)
+! EMSG2(_("E573: Invalid server id used: %s"), str);
+
+ return (Window)id;
+ }
+--- 732,738 ----
+
+ sscanf((char *)str, "0x%x", &id);
+ if (id == None)
+! semsg(_("E573: Invalid server id used: %s"), str);
+
+ return (Window)id;
+ }
+***************
+*** 1110,1116 ****
+ XFree(*regPropp);
+ XDeleteProperty(dpy, RootWindow(dpy, 0), registryProperty);
+ if (domsg)
+! EMSG(_("E251: VIM instance registry property is badly formed. Deleted!"));
+ return FAIL;
+ }
+ return OK;
+--- 1110,1116 ----
+ XFree(*regPropp);
+ XDeleteProperty(dpy, RootWindow(dpy, 0), registryProperty);
+ if (domsg)
+! emsg(_("E251: VIM instance registry property is badly formed. Deleted!"));
+ return FAIL;
+ }
+ return OK;
+*** ../vim-8.1.0742/src/json.c 2019-01-12 22:47:01.264088074 +0100
+--- src/json.c 2019-01-13 19:52:49.323868645 +0100
+***************
+*** 232,238 ****
+ case VAR_JOB:
+ case VAR_CHANNEL:
+ /* no JSON equivalent TODO: better error */
+! EMSG(_(e_invarg));
+ return FAIL;
+
+ case VAR_BLOB:
+--- 232,238 ----
+ case VAR_JOB:
+ case VAR_CHANNEL:
+ /* no JSON equivalent TODO: better error */
+! emsg(_(e_invarg));
+ return FAIL;
+
+ case VAR_BLOB:
+***************
+*** 739,745 ****
+ retval = json_decode_string(reader, cur_item, *p);
+ else
+ {
+! EMSG(_(e_invarg));
+ retval = FAIL;
+ }
+ break;
+--- 739,745 ----
+ retval = json_decode_string(reader, cur_item, *p);
+ else
+ {
+! emsg(_(e_invarg));
+ retval = FAIL;
+ }
+ break;
+***************
+*** 747,753 ****
+ case ',': /* comma: empty item */
+ if ((options & JSON_JS) == 0)
+ {
+! EMSG(_(e_invarg));
+ retval = FAIL;
+ break;
+ }
+--- 747,753 ----
+ case ',': /* comma: empty item */
+ if ((options & JSON_JS) == 0)
+ {
+! emsg(_(e_invarg));
+ retval = FAIL;
+ break;
+ }
+***************
+*** 777,783 ****
+ }
+ if (!VIM_ISDIGIT(*sp))
+ {
+! EMSG(_(e_invarg));
+ retval = FAIL;
+ break;
+ }
+--- 777,783 ----
+ }
+ if (!VIM_ISDIGIT(*sp))
+ {
+! emsg(_(e_invarg));
+ retval = FAIL;
+ break;
+ }
+***************
+*** 915,921 ****
+ if (top_item->jd_key == NULL)
+ {
+ clear_tv(cur_item);
+! EMSG(_(e_invarg));
+ retval = FAIL;
+ goto theend;
+ }
+--- 915,921 ----
+ if (top_item->jd_key == NULL)
+ {
+ clear_tv(cur_item);
+! emsg(_(e_invarg));
+ retval = FAIL;
+ goto theend;
+ }
+***************
+*** 953,959 ****
+ retval = MAYBE;
+ else
+ {
+! EMSG(_(e_invarg));
+ retval = FAIL;
+ }
+ goto theend;
+--- 953,959 ----
+ retval = MAYBE;
+ else
+ {
+! emsg(_(e_invarg));
+ retval = FAIL;
+ }
+ goto theend;
+***************
+*** 971,977 ****
+ retval = MAYBE;
+ else
+ {
+! EMSG(_(e_invarg));
+ retval = FAIL;
+ }
+ goto theend;
+--- 971,977 ----
+ retval = MAYBE;
+ else
+ {
+! emsg(_(e_invarg));
+ retval = FAIL;
+ }
+ goto theend;
+***************
+*** 988,994 ****
+ && dict_find(top_item->jd_tv.vval.v_dict,
+ top_item->jd_key, -1) != NULL)
+ {
+! EMSG2(_("E938: Duplicate key in JSON: \"%s\""),
+ top_item->jd_key);
+ clear_tv(&top_item->jd_key_tv);
+ clear_tv(cur_item);
+--- 988,994 ----
+ && dict_find(top_item->jd_tv.vval.v_dict,
+ top_item->jd_key, -1) != NULL)
+ {
+! semsg(_("E938: Duplicate key in JSON: \"%s\""),
+ top_item->jd_key);
+ clear_tv(&top_item->jd_key_tv);
+ clear_tv(cur_item);
+***************
+*** 1027,1033 ****
+ retval = MAYBE;
+ else
+ {
+! EMSG(_(e_invarg));
+ retval = FAIL;
+ }
+ goto theend;
+--- 1027,1033 ----
+ retval = MAYBE;
+ else
+ {
+! emsg(_(e_invarg));
+ retval = FAIL;
+ }
+ goto theend;
+***************
+*** 1046,1052 ****
+ res->v_type = VAR_SPECIAL;
+ res->vval.v_number = VVAL_NONE;
+ }
+! EMSG(_(e_invarg));
+
+ theend:
+ ga_clear(&stack);
+--- 1046,1052 ----
+ res->v_type = VAR_SPECIAL;
+ res->vval.v_number = VVAL_NONE;
+ }
+! emsg(_(e_invarg));
+
+ theend:
+ ga_clear(&stack);
+***************
+*** 1070,1082 ****
+ if (ret != OK)
+ {
+ if (ret == MAYBE)
+! EMSG(_(e_invarg));
+ return FAIL;
+ }
+ json_skip_white(reader);
+ if (reader->js_buf[reader->js_used] != NUL)
+ {
+! EMSG(_(e_trailing));
+ return FAIL;
+ }
+ return OK;
+--- 1070,1082 ----
+ if (ret != OK)
+ {
+ if (ret == MAYBE)
+! emsg(_(e_invarg));
+ return FAIL;
+ }
+ json_skip_white(reader);
+ if (reader->js_buf[reader->js_used] != NUL)
+ {
+! emsg(_(e_trailing));
+ return FAIL;
+ }
+ return OK;
+*** ../vim-8.1.0742/src/list.c 2018-12-21 16:04:16.316437487 +0100
+--- src/list.c 2019-01-13 19:52:56.739803042 +0100
+***************
+*** 417,423 ****
+ li = list_find(l, idx - 1);
+ if (li == NULL)
+ {
+! EMSGN(_(e_listidx), idx);
+ return NULL;
+ }
+ return tv_get_string(&li->li_tv);
+--- 417,423 ----
+ li = list_find(l, idx - 1);
+ if (li == NULL)
+ {
+! semsg(_(e_listidx), idx);
+ return NULL;
+ }
+ return tv_get_string(&li->li_tv);
+***************
+*** 914,920 ****
+ break;
+ if (**arg != ',')
+ {
+! EMSG2(_("E696: Missing comma in List: %s"), *arg);
+ goto failret;
+ }
+ *arg = skipwhite(*arg + 1);
+--- 914,920 ----
+ break;
+ if (**arg != ',')
+ {
+! semsg(_("E696: Missing comma in List: %s"), *arg);
+ goto failret;
+ }
+ *arg = skipwhite(*arg + 1);
+***************
+*** 922,928 ****
+
+ if (**arg != ']')
+ {
+! EMSG2(_("E697: Missing end of List ']': %s"), *arg);
+ failret:
+ if (evaluate)
+ list_free(l);
+--- 922,928 ----
+
+ if (**arg != ']')
+ {
+! semsg(_("E697: Missing end of List ']': %s"), *arg);
+ failret:
+ if (evaluate)
+ list_free(l);
+***************
+*** 969,975 ****
+ }
+ if (ret == FAIL)
+ {
+! EMSG(_(e_write));
+ break;
+ }
+ }
+--- 969,975 ----
+ }
+ if (ret == FAIL)
+ {
+! emsg(_(e_write));
+ break;
+ }
+ }
+*** ../vim-8.1.0742/src/main.c 2019-01-11 20:34:18.296314730 +0100
+--- src/main.c 2019-01-13 19:27:43.424613996 +0100
+***************
+*** 945,951 ****
+
+ /*
+ * Allocate space for the generic buffers (needed for set_init_1() and
+! * EMSG2()).
+ */
+ if ((IObuff = alloc(IOSIZE)) == NULL
+ || (NameBuff = alloc(MAXPATHL)) == NULL)
+--- 945,951 ----
+
+ /*
+ * Allocate space for the generic buffers (needed for set_init_1() and
+! * emsg()).
+ */
+ if ((IObuff = alloc(IOSIZE)) == NULL
+ || (NameBuff = alloc(MAXPATHL)) == NULL)
+***************
+*** 3020,3026 ****
+ else
+ {
+ if (do_source(parmp->use_vimrc, FALSE, DOSO_NONE) != OK)
+! EMSG2(_("E282: Cannot read from \"%s\""), parmp->use_vimrc);
+ }
+ }
+ else if (!silent_mode)
+--- 3020,3026 ----
+ else
+ {
+ if (do_source(parmp->use_vimrc, FALSE, DOSO_NONE) != OK)
+! semsg(_("E282: Cannot read from \"%s\""), parmp->use_vimrc);
+ }
+ }
+ else if (!silent_mode)
+*** ../vim-8.1.0742/src/mark.c 2018-12-31 23:58:20.246887218 +0100
+--- src/mark.c 2019-01-13 19:55:26.054505500 +0100
+***************
+*** 606,612 ****
+ {
+ if (pos == NULL)
+ {
+! EMSG(_(e_umark));
+ return FAIL;
+ }
+ if (pos->lnum <= 0)
+--- 606,612 ----
+ {
+ if (pos == NULL)
+ {
+! emsg(_(e_umark));
+ return FAIL;
+ }
+ if (pos->lnum <= 0)
+***************
+*** 614,625 ****
+ /* lnum is negative if mark is in another file can can't get that
+ * file, error message already give then. */
+ if (pos->lnum == 0)
+! EMSG(_(e_marknotset));
+ return FAIL;
+ }
+ if (pos->lnum > curbuf->b_ml.ml_line_count)
+ {
+! EMSG(_(e_markinval));
+ return FAIL;
+ }
+ return OK;
+--- 614,625 ----
+ /* lnum is negative if mark is in another file can can't get that
+ * file, error message already give then. */
+ if (pos->lnum == 0)
+! emsg(_(e_marknotset));
+ return FAIL;
+ }
+ if (pos->lnum > curbuf->b_ml.ml_line_count)
+ {
+! emsg(_(e_markinval));
+ return FAIL;
+ }
+ return OK;
+***************
+*** 763,769 ****
+ if (arg == NULL)
+ MSG(_("No marks set"));
+ else
+! EMSG2(_("E283: No marks matching \"%s\""), arg);
+ }
+ }
+ /* don't output anything if 'q' typed at --more-- prompt */
+--- 763,769 ----
+ if (arg == NULL)
+ MSG(_("No marks set"));
+ else
+! semsg(_("E283: No marks matching \"%s\""), arg);
+ }
+ }
+ /* don't output anything if 'q' typed at --more-- prompt */
+***************
+*** 815,823 ****
+ /* clear all marks */
+ clrallmarks(curbuf);
+ else if (eap->forceit)
+! EMSG(_(e_invarg));
+ else if (*eap->arg == NUL)
+! EMSG(_(e_argreq));
+ else
+ {
+ /* clear specified marks only */
+--- 815,823 ----
+ /* clear all marks */
+ clrallmarks(curbuf);
+ else if (eap->forceit)
+! emsg(_(e_invarg));
+ else if (*eap->arg == NUL)
+! emsg(_(e_argreq));
+ else
+ {
+ /* clear specified marks only */
+***************
+*** 837,843 ****
+ : ASCII_ISUPPER(p[2])))
+ || to < from)
+ {
+! EMSG2(_(e_invarg2), p);
+ return;
+ }
+ p += 2;
+--- 837,843 ----
+ : ASCII_ISUPPER(p[2])))
+ || to < from)
+ {
+! semsg(_(e_invarg2), p);
+ return;
+ }
+ p += 2;
+***************
+*** 875,881 ****
+ case '<': curbuf->b_visual.vi_start.lnum = 0; break;
+ case '>': curbuf->b_visual.vi_end.lnum = 0; break;
+ case ' ': break;
+! default: EMSG2(_(e_invarg2), p);
+ return;
+ }
+ }
+--- 875,881 ----
+ case '<': curbuf->b_visual.vi_start.lnum = 0; break;
+ case '>': curbuf->b_visual.vi_end.lnum = 0; break;
+ case ' ': break;
+! default: semsg(_(e_invarg2), p);
+ return;
+ }
+ }
+*** ../vim-8.1.0742/src/mbyte.c 2018-09-30 21:43:17.195693290 +0200
+--- src/mbyte.c 2019-01-13 20:12:29.878230171 +0100
+***************
+*** 199,205 ****
+ fd = mch_fopen("xim.log", "w");
+ if (fd == NULL)
+ {
+! EMSG("Cannot open xim.log");
+ fd = (FILE *)-1;
+ return;
+ }
+--- 199,205 ----
+ fd = mch_fopen("xim.log", "w");
+ if (fd == NULL)
+ {
+! emsg("Cannot open xim.log");
+ fd = (FILE *)-1;
+ return;
+ }
+***************
+*** 509,515 ****
+ * When there is something wrong: Returns an error message and doesn't change
+ * anything.
+ */
+! char_u *
+ mb_init(void)
+ {
+ int i;
+--- 509,515 ----
+ * When there is something wrong: Returns an error message and doesn't change
+ * anything.
+ */
+! char *
+ mb_init(void)
+ {
+ int i;
+***************
+*** 4749,4755 ****
+ if (verbose && p_verbose > 0)
+ {
+ verbose_enter();
+! EMSG2(_(e_loadlib),
+ hIconvDLL == 0 ? DYNAMIC_ICONV_DLL : DYNAMIC_MSVCRT_DLL);
+ verbose_leave();
+ }
+--- 4749,4755 ----
+ if (verbose && p_verbose > 0)
+ {
+ verbose_enter();
+! semsg(_(e_loadlib),
+ hIconvDLL == 0 ? DYNAMIC_ICONV_DLL : DYNAMIC_MSVCRT_DLL);
+ verbose_leave();
+ }
+***************
+*** 4771,4777 ****
+ if (verbose && p_verbose > 0)
+ {
+ verbose_enter();
+! EMSG2(_(e_loadfunc), "for libiconv");
+ verbose_leave();
+ }
+ return FALSE;
+--- 4771,4777 ----
+ if (verbose && p_verbose > 0)
+ {
+ verbose_enter();
+! semsg(_(e_loadfunc), "for libiconv");
+ verbose_leave();
+ }
+ return FALSE;
+***************
+*** 6028,6034 ****
+ XNLineSpace, line_space,
+ NULL);
+ if (XSetICValues(xic, XNPreeditAttributes, attr_list, NULL))
+! EMSG(_("E284: Cannot set IC values"));
+ XFree(attr_list);
+ }
+ }
+--- 6028,6034 ----
+ XNLineSpace, line_space,
+ NULL);
+ if (XSetICValues(xic, XNPreeditAttributes, attr_list, NULL))
+! emsg(_("E284: Cannot set IC values"));
+ XFree(attr_list);
+ }
+ }
+***************
+*** 6187,6193 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! EMSG(_("E286: Failed to open input method"));
+ verbose_leave();
+ }
+ return FALSE;
+--- 6187,6193 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! emsg(_("E286: Failed to open input method"));
+ verbose_leave();
+ }
+ return FALSE;
+***************
+*** 6200,6212 ****
+ destroy_cb.callback = xim_destroy_cb;
+ destroy_cb.client_data = NULL;
+ if (XSetIMValues(xim, XNDestroyCallback, &destroy_cb, NULL))
+! EMSG(_("E287: Warning: Could not set destroy callback to IM"));
+ }
+ # endif
+
+ if (XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL) || !xim_styles)
+ {
+! EMSG(_("E288: input method doesn't support any style"));
+ XCloseIM(xim);
+ return FALSE;
+ }
+--- 6200,6212 ----
+ destroy_cb.callback = xim_destroy_cb;
+ destroy_cb.client_data = NULL;
+ if (XSetIMValues(xim, XNDestroyCallback, &destroy_cb, NULL))
+! emsg(_("E287: Warning: Could not set destroy callback to IM"));
+ }
+ # endif
+
+ if (XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL) || !xim_styles)
+ {
+! emsg(_("E288: input method doesn't support any style"));
+ XCloseIM(xim);
+ return FALSE;
+ }
+***************
+*** 6265,6271 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! EMSG(_("E289: input method doesn't support my preedit type"));
+ verbose_leave();
+ }
+ XCloseIM(xim);
+--- 6265,6271 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! emsg(_("E289: input method doesn't support my preedit type"));
+ verbose_leave();
+ }
+ XCloseIM(xim);
+***************
+*** 6329,6335 ****
+ else
+ {
+ if (!is_not_a_term())
+! EMSG(_(e_xim));
+ XCloseIM(xim);
+ return FALSE;
+ }
+--- 6329,6335 ----
+ else
+ {
+ if (!is_not_a_term())
+! emsg(_(e_xim));
+ XCloseIM(xim);
+ return FALSE;
+ }
+*** ../vim-8.1.0742/src/memfile.c 2018-09-21 14:48:49.644214400 +0200
+--- src/memfile.c 2019-01-13 19:55:35.550424328 +0100
+***************
+*** 245,251 ****
+ if (mfp->mf_fd >= 0)
+ {
+ if (close(mfp->mf_fd) < 0)
+! EMSG(_(e_swapclose));
+ }
+ if (del_file && mfp->mf_fname != NULL)
+ mch_remove(mfp->mf_fname);
+--- 245,251 ----
+ if (mfp->mf_fd >= 0)
+ {
+ if (close(mfp->mf_fd) < 0)
+! emsg(_(e_swapclose));
+ }
+ if (del_file && mfp->mf_fname != NULL)
+ mch_remove(mfp->mf_fname);
+***************
+*** 291,297 ****
+ }
+
+ if (close(mfp->mf_fd) < 0) /* close the file */
+! EMSG(_(e_swapclose));
+ mfp->mf_fd = -1;
+
+ if (mfp->mf_fname != NULL)
+--- 291,297 ----
+ }
+
+ if (close(mfp->mf_fd) < 0) /* close the file */
+! emsg(_(e_swapclose));
+ mfp->mf_fd = -1;
+
+ if (mfp->mf_fname != NULL)
+***************
+*** 480,486 ****
+ flags = hp->bh_flags;
+
+ if ((flags & BH_LOCKED) == 0)
+! IEMSG(_("E293: block was not locked"));
+ flags &= ~BH_LOCKED;
+ if (dirty)
+ {
+--- 480,486 ----
+ flags = hp->bh_flags;
+
+ if ((flags & BH_LOCKED) == 0)
+! iemsg(_("E293: block was not locked"));
+ flags &= ~BH_LOCKED;
+ if (dirty)
+ {
+***************
+*** 1040,1046 ****
+ * space becomes available.
+ */
+ if (!did_swapwrite_msg)
+! EMSG(_("E297: Write error in swap file"));
+ did_swapwrite_msg = TRUE;
+ return FAIL;
+ }
+--- 1040,1046 ----
+ * space becomes available.
+ */
+ if (!did_swapwrite_msg)
+! emsg(_("E297: Write error in swap file"));
+ did_swapwrite_msg = TRUE;
+ return FAIL;
+ }
+***************
+*** 1256,1262 ****
+ if ((flags & O_CREAT) && mch_lstat((char *)mfp->mf_fname, &sb) >= 0)
+ {
+ mfp->mf_fd = -1;
+! EMSG(_("E300: Swap file already exists (symlink attack?)"));
+ }
+ else
+ #endif
+--- 1256,1262 ----
+ if ((flags & O_CREAT) && mch_lstat((char *)mfp->mf_fname, &sb) >= 0)
+ {
+ mfp->mf_fd = -1;
+! emsg(_("E300: Swap file already exists (symlink attack?)"));
+ }
+ else
+ #endif
+*** ../vim-8.1.0742/src/memline.c 2019-01-04 15:09:52.918373097 +0100
+--- src/memline.c 2019-01-13 19:55:40.714380247 +0100
+***************
+*** 8,14 ****
+ */
+
+ /* for debugging */
+! /* #define CHECK(c, s) do { if (c) EMSG(s); } while (0) */
+ #define CHECK(c, s) do { /**/ } while (0)
+
+ /*
+--- 8,14 ----
+ */
+
+ /* for debugging */
+! /* #define CHECK(c, s) do { if (c) emsg((s)); } while (0) */
+ #define CHECK(c, s) do { /**/ } while (0)
+
+ /*
+***************
+*** 328,334 ****
+ goto error;
+ if (hp->bh_bnum != 0)
+ {
+! IEMSG(_("E298: Didn't get block nr 0?"));
+ goto error;
+ }
+ b0p = (ZERO_BL *)(hp->bh_data);
+--- 328,334 ----
+ goto error;
+ if (hp->bh_bnum != 0)
+ {
+! iemsg(_("E298: Didn't get block nr 0?"));
+ goto error;
+ }
+ b0p = (ZERO_BL *)(hp->bh_data);
+***************
+*** 378,384 ****
+ goto error;
+ if (hp->bh_bnum != 1)
+ {
+! IEMSG(_("E298: Didn't get block nr 1?"));
+ goto error;
+ }
+ pp = (PTR_BL *)(hp->bh_data);
+--- 378,384 ----
+ goto error;
+ if (hp->bh_bnum != 1)
+ {
+! iemsg(_("E298: Didn't get block nr 1?"));
+ goto error;
+ }
+ pp = (PTR_BL *)(hp->bh_data);
+***************
+*** 396,402 ****
+ goto error;
+ if (hp->bh_bnum != 2)
+ {
+! IEMSG(_("E298: Didn't get block nr 2?"));
+ goto error;
+ }
+
+--- 396,402 ----
+ goto error;
+ if (hp->bh_bnum != 2)
+ {
+! iemsg(_("E298: Didn't get block nr 2?"));
+ goto error;
+ }
+
+***************
+*** 610,616 ****
+ mf_put(mfp, hp, FALSE, FALSE); /* release previous block */
+
+ if (error > 0)
+! EMSG(_("E843: Error while updating swap file crypt"));
+ }
+
+ mfp->mf_old_key = NULL;
+--- 610,616 ----
+ mf_put(mfp, hp, FALSE, FALSE); /* release previous block */
+
+ if (error > 0)
+! emsg(_("E843: Error while updating swap file crypt"));
+ }
+
+ mfp->mf_old_key = NULL;
+***************
+*** 708,714 ****
+ if (mfp->mf_fd < 0)
+ {
+ /* could not (re)open the swap file, what can we do???? */
+! EMSG(_("E301: Oops, lost the swap file!!!"));
+ return;
+ }
+ #ifdef HAVE_FD_CLOEXEC
+--- 708,714 ----
+ if (mfp->mf_fd < 0)
+ {
+ /* could not (re)open the swap file, what can we do???? */
+! emsg(_("E301: Oops, lost the swap file!!!"));
+ return;
+ }
+ #ifdef HAVE_FD_CLOEXEC
+***************
+*** 720,726 ****
+ #endif
+ }
+ if (!success)
+! EMSG(_("E302: Could not rename swap file"));
+ }
+
+ /*
+--- 720,726 ----
+ #endif
+ }
+ if (!success)
+! emsg(_("E302: Could not rename swap file"));
+ }
+
+ /*
+***************
+*** 811,817 ****
+ {
+ need_wait_return = TRUE; /* call wait_return later */
+ ++no_wait_return;
+! (void)EMSG2(_("E303: Unable to open swap file for \"%s\", recovery impossible"),
+ buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname);
+ --no_wait_return;
+ }
+--- 811,817 ----
+ {
+ need_wait_return = TRUE; /* call wait_return later */
+ ++no_wait_return;
+! (void)semsg(_("E303: Unable to open swap file for \"%s\", recovery impossible"),
+ buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname);
+ --no_wait_return;
+ }
+***************
+*** 946,952 ****
+
+ b0p = (ZERO_BL *)(hp->bh_data);
+ if (ml_check_b0_id(b0p) == FAIL)
+! IEMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
+ else
+ {
+ if (what == UB_FNAME)
+--- 946,952 ----
+
+ b0p = (ZERO_BL *)(hp->bh_data);
+ if (ml_check_b0_id(b0p) == FAIL)
+! iemsg(_("E304: ml_upd_block0(): Didn't get block 0??"));
+ else
+ {
+ if (what == UB_FNAME)
+***************
+*** 1164,1170 ****
+ len = recover_names(fname, FALSE, 0, NULL);
+ if (len == 0) /* no swap files found */
+ {
+! EMSG2(_("E305: No swap file found for %s"), fname);
+ goto theend;
+ }
+ if (len == 1) /* one swap file found, use it */
+--- 1164,1170 ----
+ len = recover_names(fname, FALSE, 0, NULL);
+ if (len == 0) /* no swap files found */
+ {
+! semsg(_("E305: No swap file found for %s"), fname);
+ goto theend;
+ }
+ if (len == 1) /* one swap file found, use it */
+***************
+*** 1221,1227 ****
+ if (mfp == NULL || mfp->mf_fd < 0)
+ {
+ if (fname_used != NULL)
+! EMSG2(_("E306: Cannot open %s"), fname_used);
+ goto theend;
+ }
+ buf->b_ml.ml_mfp = mfp;
+--- 1221,1227 ----
+ if (mfp == NULL || mfp->mf_fd < 0)
+ {
+ if (fname_used != NULL)
+! semsg(_("E306: Cannot open %s"), fname_used);
+ goto theend;
+ }
+ buf->b_ml.ml_mfp = mfp;
+***************
+*** 1263,1269 ****
+ }
+ if (ml_check_b0_id(b0p) == FAIL)
+ {
+! EMSG2(_("E307: %s does not look like a Vim swap file"), mfp->mf_fname);
+ goto theend;
+ }
+ if (b0_magic_wrong(b0p))
+--- 1263,1269 ----
+ }
+ if (ml_check_b0_id(b0p) == FAIL)
+ {
+! semsg(_("E307: %s does not look like a Vim swap file"), mfp->mf_fname);
+ goto theend;
+ }
+ if (b0_magic_wrong(b0p))
+***************
+*** 1297,1303 ****
+ #else
+ if (b0p->b0_id[1] != BLOCK0_ID1)
+ {
+! EMSG2(_("E833: %s is encrypted and this version of Vim does not support encryption"), mfp->mf_fname);
+ goto theend;
+ }
+ #endif
+--- 1297,1303 ----
+ #else
+ if (b0p->b0_id[1] != BLOCK0_ID1)
+ {
+! semsg(_("E833: %s is encrypted and this version of Vim does not support encryption"), mfp->mf_fname);
+ goto theend;
+ }
+ #endif
+***************
+*** 1347,1359 ****
+ }
+
+ home_replace(NULL, mfp->mf_fname, NameBuff, MAXPATHL, TRUE);
+! smsg((char_u *)_("Using swap file \"%s\""), NameBuff);
+
+ if (buf_spname(curbuf) != NULL)
+ vim_strncpy(NameBuff, buf_spname(curbuf), MAXPATHL - 1);
+ else
+ home_replace(NULL, curbuf->b_ffname, NameBuff, MAXPATHL, TRUE);
+! smsg((char_u *)_("Original file \"%s\""), NameBuff);
+ msg_putchar('\n');
+
+ /*
+--- 1347,1359 ----
+ }
+
+ home_replace(NULL, mfp->mf_fname, NameBuff, MAXPATHL, TRUE);
+! smsg(_("Using swap file \"%s\""), NameBuff);
+
+ if (buf_spname(curbuf) != NULL)
+ vim_strncpy(NameBuff, buf_spname(curbuf), MAXPATHL - 1);
+ else
+ home_replace(NULL, curbuf->b_ffname, NameBuff, MAXPATHL, TRUE);
+! smsg(_("Original file \"%s\""), NameBuff);
+ msg_putchar('\n');
+
+ /*
+***************
+*** 1366,1372 ****
+ && org_stat.st_mtime > swp_stat.st_mtime)
+ || org_stat.st_mtime != mtime))
+ {
+! EMSG(_("E308: Warning: Original file may have been changed"));
+ }
+ out_flush();
+
+--- 1366,1372 ----
+ && org_stat.st_mtime > swp_stat.st_mtime)
+ || org_stat.st_mtime != mtime))
+ {
+! emsg(_("E308: Warning: Original file may have been changed"));
+ }
+ out_flush();
+
+***************
+*** 1412,1425 ****
+ * without a key, will probably get garbage text. */
+ if (*curbuf->b_p_key != NUL)
+ {
+! smsg((char_u *)_("Swap file is encrypted: \"%s\""), fname_used);
+ MSG_PUTS(_("\nIf you entered a new crypt key but did not write the text file,"));
+ MSG_PUTS(_("\nenter the new crypt key."));
+ MSG_PUTS(_("\nIf you wrote the text file after changing the crypt key press enter"));
+ MSG_PUTS(_("\nto use the same key for text file and swap file"));
+ }
+ else
+! smsg((char_u *)_(need_key_msg), fname_used);
+ buf->b_p_key = crypt_get_key(FALSE, FALSE);
+ if (buf->b_p_key == NULL)
+ buf->b_p_key = curbuf->b_p_key;
+--- 1412,1425 ----
+ * without a key, will probably get garbage text. */
+ if (*curbuf->b_p_key != NUL)
+ {
+! smsg(_("Swap file is encrypted: \"%s\""), fname_used);
+ MSG_PUTS(_("\nIf you entered a new crypt key but did not write the text file,"));
+ MSG_PUTS(_("\nenter the new crypt key."));
+ MSG_PUTS(_("\nIf you wrote the text file after changing the crypt key press enter"));
+ MSG_PUTS(_("\nto use the same key for text file and swap file"));
+ }
+ else
+! smsg(_(need_key_msg), fname_used);
+ buf->b_p_key = crypt_get_key(FALSE, FALSE);
+ if (buf->b_p_key == NULL)
+ buf->b_p_key = curbuf->b_p_key;
+***************
+*** 1471,1477 ****
+ {
+ if (bnum == 1)
+ {
+! EMSG2(_("E309: Unable to read block 1 from %s"), mfp->mf_fname);
+ goto theend;
+ }
+ ++error;
+--- 1471,1477 ----
+ {
+ if (bnum == 1)
+ {
+! semsg(_("E309: Unable to read block 1 from %s"), mfp->mf_fname);
+ goto theend;
+ }
+ ++error;
+***************
+*** 1557,1563 ****
+ {
+ if (bnum == 1)
+ {
+! EMSG2(_("E310: Block 1 ID wrong (%s not a .swp file?)"),
+ mfp->mf_fname);
+ goto theend;
+ }
+--- 1557,1563 ----
+ {
+ if (bnum == 1)
+ {
+! semsg(_("E310: Block 1 ID wrong (%s not a .swp file?)"),
+ mfp->mf_fname);
+ goto theend;
+ }
+***************
+*** 1677,1688 ****
+
+ recoverymode = FALSE;
+ if (got_int)
+! EMSG(_("E311: Recovery Interrupted"));
+ else if (error)
+ {
+ ++no_wait_return;
+ MSG(">>>>>>>>>>>>>");
+! EMSG(_("E312: Errors detected while recovering; look for lines starting with ???"));
+ --no_wait_return;
+ MSG(_("See \":help E312\" for more information."));
+ MSG(">>>>>>>>>>>>>");
+--- 1677,1688 ----
+
+ recoverymode = FALSE;
+ if (got_int)
+! emsg(_("E311: Recovery Interrupted"));
+ else if (error)
+ {
+ ++no_wait_return;
+ MSG(">>>>>>>>>>>>>");
+! emsg(_("E312: Errors detected while recovering; look for lines starting with ???"));
+ --no_wait_return;
+ MSG(_("See \":help E312\" for more information."));
+ MSG(">>>>>>>>>>>>>");
+***************
+*** 2361,2367 ****
+ if (mfp == NULL || mfp->mf_fname == NULL)
+ {
+ if (message)
+! EMSG(_("E313: Cannot preserve, there is no swap file"));
+ return;
+ }
+
+--- 2361,2367 ----
+ if (mfp == NULL || mfp->mf_fname == NULL)
+ {
+ if (message)
+! emsg(_("E313: Cannot preserve, there is no swap file"));
+ return;
+ }
+
+***************
+*** 2416,2422 ****
+ if (status == OK)
+ MSG(_("File preserved"));
+ else
+! EMSG(_("E314: Preserve failed"));
+ }
+ }
+
+--- 2416,2422 ----
+ if (status == OK)
+ MSG(_("File preserved"));
+ else
+! emsg(_("E314: Preserve failed"));
+ }
+ }
+
+***************
+*** 2490,2496 ****
+ /* Avoid giving this message for a recursive call, may happen when
+ * the GUI redraws part of the text. */
+ ++recursive;
+! IEMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
+ --recursive;
+ }
+ errorret:
+--- 2490,2496 ----
+ /* Avoid giving this message for a recursive call, may happen when
+ * the GUI redraws part of the text. */
+ ++recursive;
+! siemsg(_("E315: ml_get: invalid lnum: %ld"), lnum);
+ --recursive;
+ }
+ errorret:
+***************
+*** 2529,2535 ****
+ /* Avoid giving this message for a recursive call, may happen
+ * when the GUI redraws part of the text. */
+ ++recursive;
+! IEMSGN(_("E316: ml_get: cannot find line %ld"), lnum);
+ --recursive;
+ }
+ goto errorret;
+--- 2529,2535 ----
+ /* Avoid giving this message for a recursive call, may happen
+ * when the GUI redraws part of the text. */
+ ++recursive;
+! siemsg(_("E316: ml_get: cannot find line %ld"), lnum);
+ --recursive;
+ }
+ goto errorret;
+***************
+*** 3026,3032 ****
+ pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
+ if (pp->pb_id != PTR_ID)
+ {
+! IEMSG(_("E317: pointer block id wrong 3"));
+ mf_put(mfp, hp, FALSE, FALSE);
+ goto theend;
+ }
+--- 3026,3032 ----
+ pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
+ if (pp->pb_id != PTR_ID)
+ {
+! iemsg(_("E317: pointer block id wrong 3"));
+ mf_put(mfp, hp, FALSE, FALSE);
+ goto theend;
+ }
+***************
+*** 3168,3174 ****
+ */
+ if (stack_idx < 0)
+ {
+! IEMSG(_("E318: Updated too many blocks?"));
+ buf->b_ml.ml_stack_top = 0; /* invalidate stack */
+ }
+ }
+--- 3168,3174 ----
+ */
+ if (stack_idx < 0)
+ {
+! iemsg(_("E318: Updated too many blocks?"));
+ buf->b_ml.ml_stack_top = 0; /* invalidate stack */
+ }
+ }
+***************
+*** 3544,3550 ****
+ pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
+ if (pp->pb_id != PTR_ID)
+ {
+! IEMSG(_("E317: pointer block id wrong 4"));
+ mf_put(mfp, hp, FALSE, FALSE);
+ goto theend;
+ }
+--- 3544,3550 ----
+ pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
+ if (pp->pb_id != PTR_ID)
+ {
+! iemsg(_("E317: pointer block id wrong 4"));
+ mf_put(mfp, hp, FALSE, FALSE);
+ goto theend;
+ }
+***************
+*** 3770,3776 ****
+
+ hp = ml_find_line(buf, lnum, ML_FIND);
+ if (hp == NULL)
+! IEMSGN(_("E320: Cannot find line %ld"), lnum);
+ else
+ {
+ dp = (DATA_BL *)(hp->bh_data);
+--- 3770,3776 ----
+
+ hp = ml_find_line(buf, lnum, ML_FIND);
+ if (hp == NULL)
+! siemsg(_("E320: Cannot find line %ld"), lnum);
+ else
+ {
+ dp = (DATA_BL *)(hp->bh_data);
+***************
+*** 4012,4018 ****
+ pp = (PTR_BL *)(dp); /* must be pointer block */
+ if (pp->pb_id != PTR_ID)
+ {
+! IEMSG(_("E317: pointer block id wrong"));
+ goto error_block;
+ }
+
+--- 4012,4018 ----
+ pp = (PTR_BL *)(dp); /* must be pointer block */
+ if (pp->pb_id != PTR_ID)
+ {
+! iemsg(_("E317: pointer block id wrong"));
+ goto error_block;
+ }
+
+***************
+*** 4057,4067 ****
+ if (idx >= (int)pp->pb_count) /* past the end: something wrong! */
+ {
+ if (lnum > buf->b_ml.ml_line_count)
+! IEMSGN(_("E322: line number out of range: %ld past the end"),
+ lnum - buf->b_ml.ml_line_count);
+
+ else
+! IEMSGN(_("E323: line count wrong in block %ld"), bnum);
+ goto error_block;
+ }
+ if (action == ML_DELETE)
+--- 4057,4067 ----
+ if (idx >= (int)pp->pb_count) /* past the end: something wrong! */
+ {
+ if (lnum > buf->b_ml.ml_line_count)
+! siemsg(_("E322: line number out of range: %ld past the end"),
+ lnum - buf->b_ml.ml_line_count);
+
+ else
+! siemsg(_("E323: line count wrong in block %ld"), bnum);
+ goto error_block;
+ }
+ if (action == ML_DELETE)
+***************
+*** 4155,4161 ****
+ if (pp->pb_id != PTR_ID)
+ {
+ mf_put(mfp, hp, FALSE, FALSE);
+! IEMSG(_("E317: pointer block id wrong 2"));
+ break;
+ }
+ pp->pb_pointer[ip->ip_index].pe_line_count += count;
+--- 4155,4161 ----
+ if (pp->pb_id != PTR_ID)
+ {
+ mf_put(mfp, hp, FALSE, FALSE);
+! iemsg(_("E317: pointer block id wrong 2"));
+ break;
+ }
+ pp->pb_pointer[ip->ip_index].pe_line_count += count;
+***************
+*** 4190,4196 ****
+ /* Limit symlink depth to 100, catch recursive loops. */
+ if (++depth == 100)
+ {
+! EMSG2(_("E773: Symlink loop for \"%s\""), fname);
+ return FAIL;
+ }
+
+--- 4190,4196 ----
+ /* Limit symlink depth to 100, catch recursive loops. */
+ if (++depth == 100)
+ {
+! semsg(_("E773: Symlink loop for \"%s\""), fname);
+ return FAIL;
+ }
+
+***************
+*** 4372,4378 ****
+ char *p;
+
+ ++no_wait_return;
+! (void)EMSG(_("E325: ATTENTION"));
+ MSG_PUTS(_("\nFound a swap file by the name \""));
+ msg_home_replace(fname);
+ MSG_PUTS("\"\n");
+--- 4372,4378 ----
+ char *p;
+
+ ++no_wait_return;
+! (void)emsg(_("E325: ATTENTION"));
+ MSG_PUTS(_("\nFound a swap file by the name \""));
+ msg_home_replace(fname);
+ MSG_PUTS("\"\n");
+***************
+*** 4915,4921 ****
+ {
+ if (fname[n - 2] == 'a') /* ".saa": tried enough, give up */
+ {
+! EMSG(_("E326: Too many swap files found"));
+ VIM_CLEAR(fname);
+ break;
+ }
+--- 4915,4921 ----
+ {
+ if (fname[n - 2] == 'a') /* ".saa": tried enough, give up */
+ {
+! emsg(_("E326: Too many swap files found"));
+ VIM_CLEAR(fname);
+ break;
+ }
+*** ../vim-8.1.0742/src/menu.c 2019-01-06 13:10:46.328499104 +0100
+--- src/menu.c 2019-01-13 19:55:44.242350157 +0100
+***************
+*** 274,280 ****
+ menu_path = arg;
+ if (*menu_path == '.')
+ {
+! EMSG2(_(e_invarg2), menu_path);
+ goto theend;
+ }
+
+--- 274,280 ----
+ menu_path = arg;
+ if (*menu_path == '.')
+ {
+! semsg(_(e_invarg2), menu_path);
+ goto theend;
+ }
+
+***************
+*** 290,296 ****
+ }
+ else if (*map_to != NUL && (unmenu || enable != MAYBE))
+ {
+! EMSG(_(e_trailing));
+ goto theend;
+ }
+ #if defined(FEAT_GUI) && !(defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON))
+--- 290,296 ----
+ }
+ else if (*map_to != NUL && (unmenu || enable != MAYBE))
+ {
+! emsg(_(e_trailing));
+ goto theend;
+ }
+ #if defined(FEAT_GUI) && !(defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON))
+***************
+*** 515,521 ****
+ if (*dname == NUL)
+ {
+ /* Only a mnemonic or accelerator is not valid. */
+! EMSG(_("E792: Empty menu name"));
+ goto erret;
+ }
+
+--- 515,521 ----
+ if (*dname == NUL)
+ {
+ /* Only a mnemonic or accelerator is not valid. */
+! emsg(_("E792: Empty menu name"));
+ goto erret;
+ }
+
+***************
+*** 533,539 ****
+ if (*next_name == NUL && menu->children != NULL)
+ {
+ if (!sys_menu)
+! EMSG(_("E330: Menu path must not lead to a sub-menu"));
+ goto erret;
+ }
+ if (*next_name != NUL && menu->children == NULL
+--- 533,539 ----
+ if (*next_name == NUL && menu->children != NULL)
+ {
+ if (!sys_menu)
+! emsg(_("E330: Menu path must not lead to a sub-menu"));
+ goto erret;
+ }
+ if (*next_name != NUL && menu->children == NULL
+***************
+*** 543,549 ****
+ )
+ {
+ if (!sys_menu)
+! EMSG(_(e_notsubmenu));
+ goto erret;
+ }
+ break;
+--- 543,549 ----
+ )
+ {
+ if (!sys_menu)
+! emsg(_(e_notsubmenu));
+ goto erret;
+ }
+ break;
+***************
+*** 572,584 ****
+ {
+ if (*next_name == NUL && parent == NULL)
+ {
+! EMSG(_("E331: Must not add menu items directly to menu bar"));
+ goto erret;
+ }
+
+ if (menu_is_separator(dname) && *next_name != NUL)
+ {
+! EMSG(_("E332: Separator cannot be part of a menu path"));
+ goto erret;
+ }
+
+--- 572,584 ----
+ {
+ if (*next_name == NUL && parent == NULL)
+ {
+! emsg(_("E331: Must not add menu items directly to menu bar"));
+ goto erret;
+ }
+
+ if (menu_is_separator(dname) && *next_name != NUL)
+ {
+! emsg(_("E332: Separator cannot be part of a menu path"));
+ goto erret;
+ }
+
+***************
+*** 867,873 ****
+ {
+ if (menu->children == NULL)
+ {
+! EMSG(_(e_notsubmenu));
+ return FAIL;
+ }
+ if (menu_nable_recurse(menu->children, p, modes, enable)
+--- 867,873 ----
+ {
+ if (menu->children == NULL)
+ {
+! emsg(_(e_notsubmenu));
+ return FAIL;
+ }
+ if (menu_nable_recurse(menu->children, p, modes, enable)
+***************
+*** 892,898 ****
+ }
+ if (*name != NUL && *name != '*' && menu == NULL)
+ {
+! EMSG2(_(e_nomenu), name);
+ return FAIL;
+ }
+
+--- 892,898 ----
+ }
+ if (*name != NUL && *name != '*' && menu == NULL)
+ {
+! semsg(_(e_nomenu), name);
+ return FAIL;
+ }
+
+***************
+*** 933,939 ****
+ if (*p != NUL && menu->children == NULL)
+ {
+ if (!silent)
+! EMSG(_(e_notsubmenu));
+ return FAIL;
+ }
+ if ((menu->modes & modes) != 0x0)
+--- 933,939 ----
+ if (*p != NUL && menu->children == NULL)
+ {
+ if (!silent)
+! emsg(_(e_notsubmenu));
+ return FAIL;
+ }
+ if ((menu->modes & modes) != 0x0)
+***************
+*** 955,961 ****
+ else if (*name != NUL)
+ {
+ if (!silent)
+! EMSG(_(e_menuothermode));
+ return FAIL;
+ }
+
+--- 955,961 ----
+ else if (*name != NUL)
+ {
+ if (!silent)
+! emsg(_(e_menuothermode));
+ return FAIL;
+ }
+
+***************
+*** 985,991 ****
+ if (menu == NULL)
+ {
+ if (!silent)
+! EMSG2(_(e_nomenu), name);
+ return FAIL;
+ }
+
+--- 985,991 ----
+ if (menu == NULL)
+ {
+ if (!silent)
+! semsg(_(e_nomenu), name);
+ return FAIL;
+ }
+
+***************
+*** 1123,1135 ****
+ /* Found menu */
+ if (*p != NUL && menu->children == NULL)
+ {
+! EMSG(_(e_notsubmenu));
+ vim_free(path_name);
+ return FAIL;
+ }
+ else if ((menu->modes & modes) == 0x0)
+ {
+! EMSG(_(e_menuothermode));
+ vim_free(path_name);
+ return FAIL;
+ }
+--- 1123,1135 ----
+ /* Found menu */
+ if (*p != NUL && menu->children == NULL)
+ {
+! emsg(_(e_notsubmenu));
+ vim_free(path_name);
+ return FAIL;
+ }
+ else if ((menu->modes & modes) == 0x0)
+ {
+! emsg(_(e_menuothermode));
+ vim_free(path_name);
+ return FAIL;
+ }
+***************
+*** 1139,1145 ****
+ }
+ if (menu == NULL)
+ {
+! EMSG2(_(e_nomenu), name);
+ vim_free(path_name);
+ return FAIL;
+ }
+--- 1139,1145 ----
+ }
+ if (menu == NULL)
+ {
+! semsg(_(e_nomenu), name);
+ vim_free(path_name);
+ return FAIL;
+ }
+***************
+*** 2400,2406 ****
+ default:
+ mode = (char_u *)"Normal";
+ }
+! EMSG2(_("E335: Menu not defined for %s mode"), mode);
+ }
+ }
+
+--- 2400,2406 ----
+ default:
+ mode = (char_u *)"Normal";
+ }
+! semsg(_("E335: Menu not defined for %s mode"), mode);
+ }
+ }
+
+***************
+*** 2430,2436 ****
+ 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);
+--- 2430,2436 ----
+ 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: semsg(_(e_invarg2), arg);
+ return;
+ }
+ arg = skipwhite(arg + 2);
+***************
+*** 2453,2465 ****
+ {
+ 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)
+ {
+! EMSG(_(e_notsubmenu));
+ menu = NULL;
+ }
+ break;
+--- 2453,2465 ----
+ {
+ 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)
+ {
+! emsg(_(e_notsubmenu));
+ menu = NULL;
+ }
+ break;
+***************
+*** 2475,2481 ****
+ if (menu == NULL)
+ {
+ if (!gave_emsg)
+! EMSG2(_("E334: Menu not found: %s"), arg);
+ return;
+ }
+
+--- 2475,2481 ----
+ if (menu == NULL)
+ {
+ if (!gave_emsg)
+! semsg(_("E334: Menu not found: %s"), arg);
+ return;
+ }
+
+***************
+*** 2567,2575 ****
+ {
+ /* found a menu item instead of a sub-menu */
+ if (*p == NUL)
+! EMSG(_("E336: Menu path must lead to a sub-menu"));
+ else
+! EMSG(_(e_notsubmenu));
+ menu = NULL;
+ goto theend;
+ }
+--- 2567,2575 ----
+ {
+ /* found a menu item instead of a sub-menu */
+ if (*p == NUL)
+! emsg(_("E336: Menu path must lead to a sub-menu"));
+ else
+! emsg(_(e_notsubmenu));
+ menu = NULL;
+ goto theend;
+ }
+***************
+*** 2588,2594 ****
+ }
+
+ if (menu == NULL)
+! EMSG(_("E337: Menu not found - check menu names"));
+ theend:
+ vim_free(saved_name);
+ return menu;
+--- 2588,2594 ----
+ }
+
+ if (menu == NULL)
+! emsg(_("E337: Menu not found - check menu names"));
+ theend:
+ vim_free(saved_name);
+ return menu;
+***************
+*** 2654,2660 ****
+ *arg = NUL;
+ arg = menu_skip_part(to);
+ if (arg == to)
+! EMSG(_(e_invarg));
+ else
+ {
+ if (ga_grow(&menutrans_ga, 1) == OK)
+--- 2654,2660 ----
+ *arg = NUL;
+ arg = menu_skip_part(to);
+ if (arg == to)
+! emsg(_(e_invarg));
+ else
+ {
+ if (ga_grow(&menutrans_ga, 1) == OK)
+*** ../vim-8.1.0742/src/message.c 2018-12-22 13:27:59.119503967 +0100
+--- src/message.c 2019-01-13 23:00:36.661000639 +0100
+***************
+*** 358,380 ****
+
+ /*
+ * Automatic prototype generation does not understand this function.
+! * Note: Caller of smgs() and smsg_attr() must check the resulting string is
+ * shorter than IOSIZE!!!
+ */
+ #ifndef PROTO
+
+! int vim_snprintf(char *str, size_t str_m, char *fmt, ...);
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg(char_u *s, ...)
+ {
+ va_list arglist;
+
+ va_start(arglist, s);
+! vim_vsnprintf((char *)IObuff, IOSIZE, (char *)s, arglist);
+ va_end(arglist);
+ return msg(IObuff);
+ }
+--- 358,380 ----
+
+ /*
+ * Automatic prototype generation does not understand this function.
+! * Note: Caller of smsg() and smsg_attr() must check the resulting string is
+ * shorter than IOSIZE!!!
+ */
+ #ifndef PROTO
+
+! int vim_snprintf(char *str, size_t str_m, const char *fmt, ...);
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg(const char *s, ...)
+ {
+ va_list arglist;
+
+ va_start(arglist, s);
+! vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
+ va_end(arglist);
+ return msg(IObuff);
+ }
+***************
+*** 383,394 ****
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr(int attr, char_u *s, ...)
+ {
+ va_list arglist;
+
+ va_start(arglist, s);
+! vim_vsnprintf((char *)IObuff, IOSIZE, (char *)s, arglist);
+ va_end(arglist);
+ return msg_attr(IObuff, attr);
+ }
+--- 383,394 ----
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr(int attr, const char *s, ...)
+ {
+ va_list arglist;
+
+ va_start(arglist, s);
+! vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
+ va_end(arglist);
+ return msg_attr(IObuff, attr);
+ }
+***************
+*** 397,408 ****
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr_keep(int attr, char_u *s, ...)
+ {
+ va_list arglist;
+
+ va_start(arglist, s);
+! vim_vsnprintf((char *)IObuff, IOSIZE, (char *)s, arglist);
+ va_end(arglist);
+ return msg_attr_keep(IObuff, attr, TRUE);
+ }
+--- 397,408 ----
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr_keep(int attr, const char *s, ...)
+ {
+ va_list arglist;
+
+ va_start(arglist, s);
+! vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
+ va_end(arglist);
+ return msg_attr_keep(IObuff, attr, TRUE);
+ }
+***************
+*** 582,602 ****
+ {
+ perror(msg);
+ ++emsg_silent;
+! emsg((char_u *)msg);
+ --emsg_silent;
+ }
+ #endif
+
+ /*
+! * emsg() - display an error message
+ *
+ * Rings the bell, if appropriate, and calls message() to do the real work
+ * When terminal not initialized (yet) mch_errmsg(..) is used.
+ *
+! * return TRUE if wait_return not called
+ */
+! int
+! emsg(char_u *s)
+ {
+ int attr;
+ char_u *p;
+--- 582,603 ----
+ {
+ perror(msg);
+ ++emsg_silent;
+! emsg(msg);
+ --emsg_silent;
+ }
+ #endif
+
+ /*
+! * emsg_core() - display an error message
+ *
+ * Rings the bell, if appropriate, and calls message() to do the real work
+ * When terminal not initialized (yet) mch_errmsg(..) is used.
+ *
+! * Return TRUE if wait_return not called.
+! * Note: caller must check 'emsg_not_now()' before calling this.
+ */
+! static int
+! emsg_core(char_u *s)
+ {
+ int attr;
+ char_u *p;
+***************
+*** 606,615 ****
+ int severe;
+ #endif
+
+- /* Skip this if not giving error messages at the moment. */
+- if (emsg_not_now())
+- return TRUE;
+-
+ #ifdef FEAT_EVAL
+ /* When testing some errors are turned into a normal message. */
+ if (ignore_error(s))
+--- 607,612 ----
+***************
+*** 727,766 ****
+ return r;
+ }
+
+-
+ /*
+! * Print an error message with one "%s" and one string argument.
+ */
+ int
+! emsg2(char_u *s, char_u *a1)
+ {
+! return emsg3(s, a1, NULL);
+ }
+
+ /*
+! * Print an error message with one or two "%s" and one or two string arguments.
+! * This is not in message.c to avoid a warning for prototypes.
+ */
+ int
+! emsg3(char_u *s, char_u *a1, char_u *a2)
+ {
+! if (emsg_not_now())
+! return TRUE; /* no error messages at the moment */
+! vim_snprintf((char *)IObuff, IOSIZE, (char *)s, a1, a2);
+! return emsg(IObuff);
+! }
+
+! /*
+! * Print an error message with one "%ld" and one long int argument.
+! * This is not in message.c to avoid a warning for prototypes.
+! */
+! int
+! emsgn(char_u *s, long n)
+! {
+! if (emsg_not_now())
+! return TRUE; /* no error messages at the moment */
+! vim_snprintf((char *)IObuff, IOSIZE, (char *)s, n);
+! return emsg(IObuff);
+ }
+
+ /*
+--- 724,759 ----
+ return r;
+ }
+
+ /*
+! * Print an error message.
+ */
+ int
+! emsg(char *s)
+ {
+! /* Skip this if not giving error messages at the moment. */
+! if (!emsg_not_now())
+! return emsg_core((char_u *)s);
+! return TRUE; /* no error messages at the moment */
+ }
+
+ /*
+! * Print an error message with format string and variable arguments.
+! * Note: caller must not pass 'IObuff' as 1st argument.
+ */
+ int
+! semsg(const char *s, ...)
+ {
+! /* Skip this if not giving error messages at the moment. */
+! if (!emsg_not_now())
+! {
+! va_list ap;
+
+! va_start(ap, s);
+! vim_vsnprintf((char *)IObuff, IOSIZE, s, ap);
+! va_end(ap);
+! return emsg_core(IObuff);
+! }
+! return TRUE; /* no error messages at the moment */
+ }
+
+ /*
+***************
+*** 769,806 ****
+ * detected when fuzzing vim.
+ */
+ void
+! iemsg(char_u *s)
+ {
+! emsg(s);
+ #ifdef ABORT_ON_INTERNAL_ERROR
+ abort();
+ #endif
+ }
+
+-
+ /*
+! * Same as emsg2(...) but abort on error when ABORT_ON_INTERNAL_ERROR is
+ * defined. It is used for internal errors only, so that they can be
+ * detected when fuzzing vim.
+ */
+ void
+! iemsg2(char_u *s, char_u *a1)
+ {
+! emsg2(s, a1);
+! #ifdef ABORT_ON_INTERNAL_ERROR
+! abort();
+! #endif
+! }
+
+! /*
+! * Same as emsgn(...) but abort on error when ABORT_ON_INTERNAL_ERROR is
+! * defined. It is used for internal errors only, so that they can be
+! * detected when fuzzing vim.
+! */
+! void
+! iemsgn(char_u *s, long n)
+! {
+! emsgn(s, n);
+ #ifdef ABORT_ON_INTERNAL_ERROR
+ abort();
+ #endif
+--- 762,794 ----
+ * detected when fuzzing vim.
+ */
+ void
+! iemsg(char *s)
+ {
+! if (!emsg_not_now())
+! emsg_core((char_u *)s);
+ #ifdef ABORT_ON_INTERNAL_ERROR
+ abort();
+ #endif
+ }
+
+ /*
+! * Same as semsg(...) but abort on error when ABORT_ON_INTERNAL_ERROR is
+ * defined. It is used for internal errors only, so that they can be
+ * detected when fuzzing vim.
++ * Note: caller must not pass 'IObuff' as 1st argument.
+ */
+ void
+! siemsg(const char *s, ...)
+ {
+! if (!emsg_not_now())
+! {
+! va_list ap;
+
+! va_start(ap, s);
+! vim_vsnprintf((char *)IObuff, IOSIZE, s, ap);
+! va_end(ap);
+! emsg_core(IObuff);
+! }
+ #ifdef ABORT_ON_INTERNAL_ERROR
+ abort();
+ #endif
+***************
+*** 812,818 ****
+ void
+ internal_error(char *where)
+ {
+! IEMSG2(_(e_intern2), where);
+ }
+
+ /* emsg3() and emsgn() are in misc2.c to avoid warnings for the prototypes. */
+--- 800,806 ----
+ void
+ internal_error(char *where)
+ {
+! siemsg(_(e_intern2), where);
+ }
+
+ /* emsg3() and emsgn() are in misc2.c to avoid warnings for the prototypes. */
+***************
+*** 820,826 ****
+ void
+ emsg_invreg(int name)
+ {
+! EMSG2(_("E354: Invalid register name: '%s'"), transchar(name));
+ }
+
+ /*
+--- 808,814 ----
+ void
+ emsg_invreg(int name)
+ {
+! semsg(_("E354: Invalid register name: '%s'"), transchar(name));
+ }
+
+ /*
+***************
+*** 969,975 ****
+
+ if (*eap->arg != NUL)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 957,963 ----
+
+ if (*eap->arg != NUL)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 3473,3479 ****
+ verbose_fd = mch_fopen((char *)p_vfile, "a");
+ if (verbose_fd == NULL)
+ {
+! EMSG2(_(e_notopen), p_vfile);
+ return FAIL;
+ }
+ }
+--- 3461,3467 ----
+ verbose_fd = mch_fopen((char *)p_vfile, "a");
+ if (verbose_fd == NULL)
+ {
+! semsg(_(e_notopen), p_vfile);
+ return FAIL;
+ }
+ }
+***************
+*** 4092,4098 ****
+ # endif
+ {
+ /* TODO: non-GUI file selector here */
+! EMSG(_("E338: Sorry, no file browser in console mode"));
+ fname = NULL;
+ }
+
+--- 4080,4086 ----
+ # endif
+ {
+ /* TODO: non-GUI file selector here */
+! emsg(_("E338: Sorry, no file browser in console mode"));
+ fname = NULL;
+ }
+
+***************
+*** 4136,4142 ****
+ int err = FALSE;
+
+ if (tvs[idx].v_type == VAR_UNKNOWN)
+! EMSG(_(e_printf));
+ else
+ {
+ ++*idxp;
+--- 4124,4130 ----
+ int err = FALSE;
+
+ if (tvs[idx].v_type == VAR_UNKNOWN)
+! emsg(_(e_printf));
+ else
+ {
+ ++*idxp;
+***************
+*** 4163,4169 ****
+ static char_u numbuf[NUMBUFLEN];
+
+ if (tvs[idx].v_type == VAR_UNKNOWN)
+! EMSG(_(e_printf));
+ else
+ {
+ ++*idxp;
+--- 4151,4157 ----
+ static char_u numbuf[NUMBUFLEN];
+
+ if (tvs[idx].v_type == VAR_UNKNOWN)
+! emsg(_(e_printf));
+ else
+ {
+ ++*idxp;
+***************
+*** 4186,4192 ****
+ double f = 0;
+
+ if (tvs[idx].v_type == VAR_UNKNOWN)
+! EMSG(_(e_printf));
+ else
+ {
+ ++*idxp;
+--- 4174,4180 ----
+ double f = 0;
+
+ if (tvs[idx].v_type == VAR_UNKNOWN)
+! emsg(_(e_printf));
+ else
+ {
+ ++*idxp;
+***************
+*** 4195,4201 ****
+ else if (tvs[idx].v_type == VAR_NUMBER)
+ f = (double)tvs[idx].vval.v_number;
+ else
+! EMSG(_("E807: Expected Float argument for printf()"));
+ }
+ return f;
+ }
+--- 4183,4189 ----
+ else if (tvs[idx].v_type == VAR_NUMBER)
+ f = (double)tvs[idx].vval.v_number;
+ else
+! emsg(_("E807: Expected Float argument for printf()"));
+ }
+ return f;
+ }
+***************
+*** 4274,4280 ****
+
+ /* Like vim_vsnprintf() but append to the string. */
+ int
+! vim_snprintf_add(char *str, size_t str_m, char *fmt, ...)
+ {
+ va_list ap;
+ int str_l;
+--- 4262,4268 ----
+
+ /* Like vim_vsnprintf() but append to the string. */
+ int
+! vim_snprintf_add(char *str, size_t str_m, const char *fmt, ...)
+ {
+ va_list ap;
+ int str_l;
+***************
+*** 4292,4298 ****
+ }
+
+ int
+! vim_snprintf(char *str, size_t str_m, char *fmt, ...)
+ {
+ va_list ap;
+ int str_l;
+--- 4280,4286 ----
+ }
+
+ int
+! vim_snprintf(char *str, size_t str_m, const char *fmt, ...)
+ {
+ va_list ap;
+ int str_l;
+***************
+*** 4307,4313 ****
+ vim_vsnprintf(
+ char *str,
+ size_t str_m,
+! char *fmt,
+ va_list ap)
+ {
+ return vim_vsnprintf_typval(str, str_m, fmt, ap, NULL);
+--- 4295,4301 ----
+ vim_vsnprintf(
+ char *str,
+ size_t str_m,
+! const char *fmt,
+ va_list ap)
+ {
+ return vim_vsnprintf_typval(str, str_m, fmt, ap, NULL);
+***************
+*** 4317,4328 ****
+ vim_vsnprintf_typval(
+ char *str,
+ size_t str_m,
+! char *fmt,
+ va_list ap,
+ typval_T *tvs)
+ {
+ size_t str_l = 0;
+! char *p = fmt;
+ int arg_idx = 1;
+
+ if (p == NULL)
+--- 4305,4316 ----
+ vim_vsnprintf_typval(
+ char *str,
+ size_t str_m,
+! const char *fmt,
+ va_list ap,
+ typval_T *tvs)
+ {
+ size_t str_l = 0;
+! const char *p = fmt;
+ int arg_idx = 1;
+
+ if (p == NULL)
+***************
+*** 4370,4376 ****
+ char tmp[TMP_LEN];
+
+ /* string address in case of string argument */
+! char *str_arg;
+
+ /* natural field width of arg without padding and sign */
+ size_t str_arg_l;
+--- 4358,4364 ----
+ char tmp[TMP_LEN];
+
+ /* string address in case of string argument */
+! const char *str_arg = NULL;
+
+ /* natural field width of arg without padding and sign */
+ size_t str_arg_l;
+***************
+*** 4394,4400 ****
+ char_u *tofree = NULL;
+
+
+- str_arg = NULL;
+ p++; /* skip '%' */
+
+ /* parse flags */
+--- 4382,4387 ----
+***************
+*** 5239,5245 ****
+ }
+
+ if (tvs != NULL && tvs[arg_idx - 1].v_type != VAR_UNKNOWN)
+! EMSG(_("E767: Too many arguments to printf()"));
+
+ /* Return the number of characters formatted (excluding trailing nul
+ * character), that is, the number of characters that would have been
+--- 5226,5232 ----
+ }
+
+ if (tvs != NULL && tvs[arg_idx - 1].v_type != VAR_UNKNOWN)
+! emsg(_("E767: Too many arguments to printf()"));
+
+ /* Return the number of characters formatted (excluding trailing nul
+ * character), that is, the number of characters that would have been
+*** ../vim-8.1.0742/src/misc1.c 2019-01-11 14:10:00.344749757 +0100
+--- src/misc1.c 2019-01-13 23:00:56.632861979 +0100
+***************
+*** 2658,2664 ****
+ /* If "count" is negative the caller must be doing something wrong. */
+ if (count < 1)
+ {
+! IEMSGN("E950: Invalid count for del_bytes(): %ld", count);
+ return FAIL;
+ }
+
+--- 2658,2664 ----
+ /* If "count" is negative the caller must be doing something wrong. */
+ if (count < 1)
+ {
+! siemsg("E950: Invalid count for del_bytes(): %ld", count);
+ return FAIL;
+ }
+
+***************
+*** 3521,3527 ****
+ while (r != 'y' && r != 'n')
+ {
+ /* same highlighting as for wait_return */
+! smsg_attr(HL_ATTR(HLF_R), (char_u *)"%s (y/n)?", str);
+ if (direct)
+ r = get_keystroke();
+ else
+--- 3521,3527 ----
+ while (r != 'y' && r != 'n')
+ {
+ /* same highlighting as for wait_return */
+! smsg_attr(HL_ATTR(HLF_R), "%s (y/n)?", str);
+ if (direct)
+ r = get_keystroke();
+ else
+***************
+*** 4060,4066 ****
+ if (!mch_chdir((char *)var) && mch_dirname(IObuff, IOSIZE) == OK)
+ var = IObuff;
+ if (mch_chdir((char *)NameBuff) != 0)
+! EMSG(_(e_prev_dir));
+ }
+ #endif
+ homedir = vim_strsave(var);
+--- 4060,4066 ----
+ if (!mch_chdir((char *)var) && mch_dirname(IObuff, IOSIZE) == OK)
+ var = IObuff;
+ if (mch_chdir((char *)NameBuff) != 0)
+! emsg(_(e_prev_dir));
+ }
+ #endif
+ homedir = vim_strsave(var);
+***************
+*** 9942,9948 ****
+ int ret = FAIL;
+ char_u *eval_pat = NULL;
+ char_u *exp_pat = *pat;
+! char_u *ignored_msg;
+ int usedlen;
+
+ if (*exp_pat == '%' || *exp_pat == '#' || *exp_pat == '<')
+--- 9942,9948 ----
+ int ret = FAIL;
+ char_u *eval_pat = NULL;
+ char_u *exp_pat = *pat;
+! char *ignored_msg;
+ int usedlen;
+
+ if (*exp_pat == '%' || *exp_pat == '#' || *exp_pat == '<')
+***************
+*** 11434,11440 ****
+ /* get a name for the temp file */
+ if ((tempname = vim_tempname('o', FALSE)) == NULL)
+ {
+! EMSG(_(e_notmp));
+ return NULL;
+ }
+
+--- 11434,11440 ----
+ /* get a name for the temp file */
+ if ((tempname = vim_tempname('o', FALSE)) == NULL)
+ {
+! emsg(_(e_notmp));
+ return NULL;
+ }
+
+***************
+*** 11465,11471 ****
+
+ if (fd == NULL)
+ {
+! EMSG2(_(e_notopen), tempname);
+ goto done;
+ }
+
+--- 11465,11471 ----
+
+ if (fd == NULL)
+ {
+! semsg(_(e_notopen), tempname);
+ goto done;
+ }
+
+***************
+*** 11485,11491 ****
+ #endif
+ if (i != len)
+ {
+! EMSG2(_(e_notread), tempname);
+ VIM_CLEAR(buffer);
+ }
+ else if (ret_len == NULL)
+--- 11485,11491 ----
+ #endif
+ if (i != len)
+ {
+! semsg(_(e_notread), tempname);
+ VIM_CLEAR(buffer);
+ }
+ else if (ret_len == NULL)
+*** ../vim-8.1.0742/src/misc2.c 2019-01-11 16:15:57.891171040 +0100
+--- src/misc2.c 2019-01-13 20:17:36.527835979 +0100
+***************
+*** 920,926 ****
+ {
+ /* Don't hide this message */
+ emsg_silent = 0;
+! EMSG(_("E340: Line is becoming too long"));
+ return NULL;
+ }
+ #endif
+--- 920,926 ----
+ {
+ /* Don't hide this message */
+ emsg_silent = 0;
+! emsg(_("E340: Line is becoming too long"));
+ return NULL;
+ }
+ #endif
+***************
+*** 960,966 ****
+ {
+ /* Don't hide this message */
+ emsg_silent = 0;
+! IEMSGN(_("E341: Internal error: lalloc(%ld, )"), size);
+ return NULL;
+ }
+
+--- 960,966 ----
+ {
+ /* Don't hide this message */
+ emsg_silent = 0;
+! siemsg(_("E341: Internal error: lalloc(%ld, )"), size);
+ return NULL;
+ }
+
+***************
+*** 1079,1085 ****
+ * message fails, e.g. when setting v:errmsg. */
+ did_outofmem_msg = TRUE;
+
+! EMSGN(_("E342: Out of memory! (allocating %lu bytes)"), size);
+ }
+ }
+
+--- 1079,1085 ----
+ * message fails, e.g. when setting v:errmsg. */
+ did_outofmem_msg = TRUE;
+
+! semsg(_("E342: Out of memory! (allocating %lu bytes)"), size);
+ }
+ }
+
+***************
+*** 3272,3278 ****
+ if (p_verbose > 3)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Calling shell to execute: \"%s\""),
+ cmd == NULL ? p_sh : cmd);
+ out_char('\n');
+ cursor_on();
+--- 3272,3278 ----
+ if (p_verbose > 3)
+ {
+ verbose_enter();
+! smsg(_("Calling shell to execute: \"%s\""),
+ cmd == NULL ? p_sh : cmd);
+ out_char('\n');
+ cursor_on();
+***************
+*** 3286,3292 ****
+
+ if (*p_sh == NUL)
+ {
+! EMSG(_(e_shellempty));
+ retval = -1;
+ }
+ else
+--- 3286,3292 ----
+
+ if (*p_sh == NUL)
+ {
+! emsg(_(e_shellempty));
+ retval = -1;
+ }
+ else
+***************
+*** 3538,3544 ****
+ * ("what" is SHAPE_MOUSE).
+ * Returns error message for an illegal option, NULL otherwise.
+ */
+! char_u *
+ parse_shape_opt(int what)
+ {
+ char_u *modep;
+--- 3538,3544 ----
+ * ("what" is SHAPE_MOUSE).
+ * Returns error message for an illegal option, NULL otherwise.
+ */
+! char *
+ parse_shape_opt(int what)
+ {
+ char_u *modep;
+***************
+*** 3574,3582 ****
+ commap = vim_strchr(modep, ',');
+
+ if (colonp == NULL || (commap != NULL && commap < colonp))
+! return (char_u *)N_("E545: Missing colon");
+ if (colonp == modep)
+! return (char_u *)N_("E546: Illegal mode");
+
+ /*
+ * Repeat for all mode's before the colon.
+--- 3574,3582 ----
+ commap = vim_strchr(modep, ',');
+
+ if (colonp == NULL || (commap != NULL && commap < colonp))
+! return N_("E545: Missing colon");
+ if (colonp == modep)
+! return N_("E546: Illegal mode");
+
+ /*
+ * Repeat for all mode's before the colon.
+***************
+*** 3602,3608 ****
+ break;
+ if (idx == SHAPE_IDX_COUNT
+ || (shape_table[idx].used_for & what) == 0)
+! return (char_u *)N_("E546: Illegal mode");
+ if (len == 2 && modep[0] == 'v' && modep[1] == 'e')
+ found_ve = TRUE;
+ }
+--- 3602,3608 ----
+ break;
+ if (idx == SHAPE_IDX_COUNT
+ || (shape_table[idx].used_for & what) == 0)
+! return N_("E546: Illegal mode");
+ if (len == 2 && modep[0] == 'v' && modep[1] == 'e')
+ found_ve = TRUE;
+ }
+***************
+*** 3641,3647 ****
+ if (mshape_names[i] == NULL)
+ {
+ if (!VIM_ISDIGIT(*p))
+! return (char_u *)N_("E547: Illegal mouseshape");
+ if (round == 2)
+ shape_table[idx].mshape =
+ getdigits(&p) + MSHAPE_NUMBERED;
+--- 3641,3647 ----
+ if (mshape_names[i] == NULL)
+ {
+ if (!VIM_ISDIGIT(*p))
+! return N_("E547: Illegal mouseshape");
+ if (round == 2)
+ shape_table[idx].mshape =
+ getdigits(&p) + MSHAPE_NUMBERED;
+***************
+*** 3681,3692 ****
+ {
+ p += len;
+ if (!VIM_ISDIGIT(*p))
+! return (char_u *)N_("E548: digit expected");
+ n = getdigits(&p);
+ if (len == 3) /* "ver" or "hor" */
+ {
+ if (n == 0)
+! return (char_u *)N_("E549: Illegal percentage");
+ if (round == 2)
+ {
+ if (TOLOWER_ASC(i) == 'v')
+--- 3681,3692 ----
+ {
+ p += len;
+ if (!VIM_ISDIGIT(*p))
+! return N_("E548: digit expected");
+ n = getdigits(&p);
+ if (len == 3) /* "ver" or "hor" */
+ {
+ if (n == 0)
+! return N_("E549: Illegal percentage");
+ if (round == 2)
+ {
+ if (TOLOWER_ASC(i) == 'v')
+***************
+*** 4385,4391 ****
+ {
+ if (len + 5 >= MAXPATHL)
+ {
+! EMSG(_(e_pathtoolong));
+ break;
+ }
+ if (STRNCMP(wc_part, "**", 2) == 0)
+--- 4385,4391 ----
+ {
+ if (len + 5 >= MAXPATHL)
+ {
+! emsg(_(e_pathtoolong));
+ break;
+ }
+ if (STRNCMP(wc_part, "**", 2) == 0)
+***************
+*** 4404,4410 ****
+ wc_part = (char_u *)errpt;
+ if (*wc_part != NUL && !vim_ispathsep(*wc_part))
+ {
+! EMSG2(_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."), PATHSEPSTR);
+ goto error_return;
+ }
+ }
+--- 4404,4410 ----
+ wc_part = (char_u *)errpt;
+ if (*wc_part != NUL && !vim_ispathsep(*wc_part))
+ {
+! semsg(_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."), PATHSEPSTR);
+ goto error_return;
+ }
+ }
+***************
+*** 4436,4442 ****
+ if (STRLEN(search_ctx->ffsc_start_dir)
+ + STRLEN(search_ctx->ffsc_fix_path) + 3 >= MAXPATHL)
+ {
+! EMSG(_(e_pathtoolong));
+ goto error_return;
+ }
+ STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
+--- 4436,4442 ----
+ if (STRLEN(search_ctx->ffsc_start_dir)
+ + STRLEN(search_ctx->ffsc_fix_path) + 3 >= MAXPATHL)
+ {
+! emsg(_(e_pathtoolong));
+ goto error_return;
+ }
+ STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
+***************
+*** 4667,4673 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg((char_u *)"Already Searched: %s (%s)",
+ stackp->ffs_fix_path, stackp->ffs_wc_path);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+--- 4667,4673 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg("Already Searched: %s (%s)",
+ stackp->ffs_fix_path, stackp->ffs_wc_path);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+***************
+*** 4681,4687 ****
+ else if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg((char_u *)"Searching: %s (%s)",
+ stackp->ffs_fix_path, stackp->ffs_wc_path);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+--- 4681,4687 ----
+ else if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg("Searching: %s (%s)",
+ stackp->ffs_fix_path, stackp->ffs_wc_path);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+***************
+*** 4900,4906 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg((char_u *)"Already: %s",
+ file_path);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+--- 4900,4906 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg("Already: %s",
+ file_path);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+***************
+*** 4928,4934 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg((char_u *)"HIT: %s", file_path);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+ verbose_leave_scroll();
+--- 4928,4934 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg("HIT: %s", file_path);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+ verbose_leave_scroll();
+***************
+*** 5128,5134 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg((char_u *)"ff_get_visited_list: FOUND list for %s",
+ filename);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+--- 5128,5134 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg("ff_get_visited_list: FOUND list for %s",
+ filename);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+***************
+*** 5145,5151 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg((char_u *)"ff_get_visited_list: new list for %s", filename);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+ verbose_leave_scroll();
+--- 5145,5151 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter_scroll();
+! smsg("ff_get_visited_list: new list for %s", filename);
+ /* don't overwrite this either */
+ msg_puts((char_u *)"\n");
+ verbose_leave_scroll();
+***************
+*** 5766,5784 ****
+ if (first == TRUE)
+ {
+ if (find_what == FINDFILE_DIR)
+! EMSG2(_("E344: Can't find directory \"%s\" in cdpath"),
+ ff_file_to_find);
+ else
+! EMSG2(_("E345: Can't find file \"%s\" in path"),
+ ff_file_to_find);
+ }
+ else
+ {
+ if (find_what == FINDFILE_DIR)
+! EMSG2(_("E346: No more directory \"%s\" found in cdpath"),
+ ff_file_to_find);
+ else
+! EMSG2(_("E347: No more file \"%s\" found in path"),
+ ff_file_to_find);
+ }
+ }
+--- 5766,5784 ----
+ if (first == TRUE)
+ {
+ if (find_what == FINDFILE_DIR)
+! semsg(_("E344: Can't find directory \"%s\" in cdpath"),
+ ff_file_to_find);
+ else
+! semsg(_("E345: Can't find file \"%s\" in path"),
+ ff_file_to_find);
+ }
+ else
+ {
+ if (find_what == FINDFILE_DIR)
+! semsg(_("E346: No more directory \"%s\" found in cdpath"),
+ ff_file_to_find);
+ else
+! semsg(_("E347: No more file \"%s\" found in path"),
+ ff_file_to_find);
+ }
+ }
+*** ../vim-8.1.0742/src/netbeans.c 2019-01-12 22:47:01.264088074 +0100
+--- src/netbeans.c 2019-01-13 23:16:36.741428594 +0100
+***************
+*** 257,263 ****
+ {
+ nbdebug(("Wrong access mode for NetBeans connection info file: \"%s\"\n",
+ file));
+! EMSG2(_("E668: Wrong access mode for NetBeans connection info file: \"%s\""),
+ file);
+ return FAIL;
+ }
+--- 257,263 ----
+ {
+ nbdebug(("Wrong access mode for NetBeans connection info file: \"%s\"\n",
+ file));
+! semsg(_("E668: Wrong access mode for NetBeans connection info file: \"%s\""),
+ file);
+ return FAIL;
+ }
+***************
+*** 477,483 ****
+ if (*verb != ':')
+ {
+ nbdebug((" missing colon: %s\n", cmd));
+! EMSG2("E627: missing colon: %s", cmd);
+ return;
+ }
+ ++verb; /* skip colon */
+--- 477,483 ----
+ if (*verb != ':')
+ {
+ nbdebug((" missing colon: %s\n", cmd));
+! semsg("E627: missing colon: %s", cmd);
+ return;
+ }
+ ++verb; /* skip colon */
+***************
+*** 501,507 ****
+ if (isfunc < 0)
+ {
+ nbdebug((" missing ! or / in: %s\n", cmd));
+! EMSG2("E628: missing ! or / in: %s", cmd);
+ return;
+ }
+
+--- 501,507 ----
+ if (isfunc < 0)
+ {
+ nbdebug((" missing ! or / in: %s\n", cmd));
+! semsg("E628: missing ! or / in: %s", cmd);
+ return;
+ }
+
+***************
+*** 518,524 ****
+ * so I'm disabling it except for debugging.
+ */
+ nbdebug(("nb_parse_cmd: Command error for \"%s\"\n", cmd));
+! EMSG("E629: bad return from nb_do_cmd");
+ #endif
+ }
+ }
+--- 518,524 ----
+ * so I'm disabling it except for debugging.
+ */
+ nbdebug(("nb_parse_cmd: Command error for \"%s\"\n", cmd));
+! emsg("E629: bad return from nb_do_cmd");
+ #endif
+ }
+ }
+***************
+*** 1032,1038 ****
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" Invalid buffer identifier in getAnno\n"));
+! EMSG("E652: Invalid buffer identifier in getAnno");
+ retval = FAIL;
+ }
+ else
+--- 1032,1038 ----
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" Invalid buffer identifier in getAnno\n"));
+! emsg("E652: Invalid buffer identifier in getAnno");
+ retval = FAIL;
+ }
+ else
+***************
+*** 1055,1061 ****
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in getLength\n"));
+! EMSG("E632: invalid buffer identifier in getLength");
+ retval = FAIL;
+ }
+ else
+--- 1055,1061 ----
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in getLength\n"));
+! emsg("E632: invalid buffer identifier in getLength");
+ retval = FAIL;
+ }
+ else
+***************
+*** 1077,1083 ****
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in getText\n"));
+! EMSG("E633: invalid buffer identifier in getText");
+ retval = FAIL;
+ }
+ else
+--- 1077,1083 ----
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in getText\n"));
+! emsg("E633: invalid buffer identifier in getText");
+ retval = FAIL;
+ }
+ else
+***************
+*** 1141,1147 ****
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in remove\n"));
+! EMSG("E634: invalid buffer identifier in remove");
+ retval = FAIL;
+ }
+ else
+--- 1141,1147 ----
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in remove\n"));
+! emsg("E634: invalid buffer identifier in remove");
+ retval = FAIL;
+ }
+ else
+***************
+*** 1311,1317 ****
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in insert\n"));
+! EMSG("E635: invalid buffer identifier in insert");
+ retval = FAIL;
+ }
+ else if (args != NULL)
+--- 1311,1317 ----
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in insert\n"));
+! emsg("E635: invalid buffer identifier in insert");
+ retval = FAIL;
+ }
+ else if (args != NULL)
+***************
+*** 1471,1477 ****
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in create\n"));
+! EMSG("E636: invalid buffer identifier in create");
+ return FAIL;
+ }
+ VIM_CLEAR(buf->displayname);
+--- 1471,1477 ----
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in create\n"));
+! emsg("E636: invalid buffer identifier in create");
+ return FAIL;
+ }
+ VIM_CLEAR(buf->displayname);
+***************
+*** 1521,1527 ****
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in startDocumentListen\n"));
+! EMSG("E637: invalid buffer identifier in startDocumentListen");
+ return FAIL;
+ }
+ buf->fireChanges = 1;
+--- 1521,1527 ----
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in startDocumentListen\n"));
+! emsg("E637: invalid buffer identifier in startDocumentListen");
+ return FAIL;
+ }
+ buf->fireChanges = 1;
+***************
+*** 1532,1538 ****
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in stopDocumentListen\n"));
+! EMSG("E638: invalid buffer identifier in stopDocumentListen");
+ return FAIL;
+ }
+ buf->fireChanges = 0;
+--- 1532,1538 ----
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in stopDocumentListen\n"));
+! emsg("E638: invalid buffer identifier in stopDocumentListen");
+ return FAIL;
+ }
+ buf->fireChanges = 0;
+***************
+*** 1541,1547 ****
+ if (!buf->bufp->b_netbeans_file)
+ {
+ nbdebug(("E658: NetBeans connection lost for buffer %ld\n", buf->bufp->b_fnum));
+! EMSGN(_("E658: NetBeans connection lost for buffer %ld"),
+ buf->bufp->b_fnum);
+ }
+ else
+--- 1541,1547 ----
+ if (!buf->bufp->b_netbeans_file)
+ {
+ nbdebug(("E658: NetBeans connection lost for buffer %ld\n", buf->bufp->b_fnum));
+! semsg(_("E658: NetBeans connection lost for buffer %ld"),
+ buf->bufp->b_fnum);
+ }
+ else
+***************
+*** 1561,1567 ****
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in setTitle\n"));
+! EMSG("E639: invalid buffer identifier in setTitle");
+ return FAIL;
+ }
+ vim_free(buf->displayname);
+--- 1561,1567 ----
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in setTitle\n"));
+! emsg("E639: invalid buffer identifier in setTitle");
+ return FAIL;
+ }
+ vim_free(buf->displayname);
+***************
+*** 1573,1579 ****
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in initDone\n"));
+! EMSG("E640: invalid buffer identifier in initDone");
+ return FAIL;
+ }
+ do_update = 1;
+--- 1573,1579 ----
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in initDone\n"));
+! emsg("E640: invalid buffer identifier in initDone");
+ return FAIL;
+ }
+ do_update = 1;
+***************
+*** 1594,1600 ****
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in setBufferNumber\n"));
+! EMSG("E641: invalid buffer identifier in setBufferNumber");
+ return FAIL;
+ }
+ path = (char_u *)nb_unquote(args, NULL);
+--- 1594,1600 ----
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in setBufferNumber\n"));
+! emsg("E641: invalid buffer identifier in setBufferNumber");
+ return FAIL;
+ }
+ path = (char_u *)nb_unquote(args, NULL);
+***************
+*** 1605,1611 ****
+ if (bufp == NULL)
+ {
+ nbdebug((" File %s not found in setBufferNumber\n", args));
+! EMSG2("E642: File %s not found in setBufferNumber", args);
+ return FAIL;
+ }
+ buf->bufp = bufp;
+--- 1605,1611 ----
+ if (bufp == NULL)
+ {
+ nbdebug((" File %s not found in setBufferNumber\n", args));
+! semsg("E642: File %s not found in setBufferNumber", args);
+ return FAIL;
+ }
+ buf->bufp = bufp;
+***************
+*** 1630,1636 ****
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in setFullName\n"));
+! EMSG("E643: invalid buffer identifier in setFullName");
+ return FAIL;
+ }
+ vim_free(buf->displayname);
+--- 1630,1636 ----
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in setFullName\n"));
+! emsg("E643: invalid buffer identifier in setFullName");
+ return FAIL;
+ }
+ vim_free(buf->displayname);
+***************
+*** 1653,1659 ****
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in editFile\n"));
+! EMSG("E644: invalid buffer identifier in editFile");
+ return FAIL;
+ }
+ /* Edit a file: like create + setFullName + read the file. */
+--- 1653,1659 ----
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in editFile\n"));
+! emsg("E644: invalid buffer identifier in editFile");
+ return FAIL;
+ }
+ /* Edit a file: like create + setFullName + read the file. */
+***************
+*** 1681,1687 ****
+ /* This message was commented out, probably because it can
+ * happen when shutting down. */
+ if (p_verbose > 0)
+! EMSG("E645: invalid buffer identifier in setVisible");
+ return FAIL;
+ }
+ if (streq((char *)args, "T") && buf->bufp != curbuf)
+--- 1681,1687 ----
+ /* This message was commented out, probably because it can
+ * happen when shutting down. */
+ if (p_verbose > 0)
+! emsg("E645: invalid buffer identifier in setVisible");
+ return FAIL;
+ }
+ if (streq((char *)args, "T") && buf->bufp != curbuf)
+***************
+*** 1721,1727 ****
+ /* This message was commented out, probably because it can
+ * happen when shutting down. */
+ if (p_verbose > 0)
+! EMSG("E646: invalid buffer identifier in setModified");
+ return FAIL;
+ }
+ prev_b_changed = buf->bufp->b_changed;
+--- 1721,1727 ----
+ /* This message was commented out, probably because it can
+ * happen when shutting down. */
+ if (p_verbose > 0)
+! emsg("E646: invalid buffer identifier in setModified");
+ return FAIL;
+ }
+ prev_b_changed = buf->bufp->b_changed;
+***************
+*** 1803,1809 ****
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in setDot\n"));
+! EMSG("E647: invalid buffer identifier in setDot");
+ return FAIL;
+ }
+
+--- 1803,1809 ----
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in setDot\n"));
+! emsg("E647: invalid buffer identifier in setDot");
+ return FAIL;
+ }
+
+***************
+*** 1856,1862 ****
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in close\n"));
+! EMSG("E648: invalid buffer identifier in close");
+ return FAIL;
+ }
+
+--- 1856,1862 ----
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in close\n"));
+! emsg("E648: invalid buffer identifier in close");
+ return FAIL;
+ }
+
+***************
+*** 1870,1876 ****
+ /* This message was commented out, probably because it can
+ * happen when shutting down. */
+ if (p_verbose > 0)
+! EMSG("E649: invalid buffer identifier in close");
+ }
+ nbdebug((" CLOSE %d: %s\n", bufno, name));
+ #ifdef FEAT_GUI
+--- 1870,1876 ----
+ /* This message was commented out, probably because it can
+ * happen when shutting down. */
+ if (p_verbose > 0)
+! emsg("E649: invalid buffer identifier in close");
+ }
+ nbdebug((" CLOSE %d: %s\n", bufno, name));
+ #ifdef FEAT_GUI
+***************
+*** 1909,1915 ****
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in defineAnnoType\n"));
+! EMSG("E650: invalid buffer identifier in defineAnnoType");
+ return FAIL;
+ }
+
+--- 1909,1915 ----
+ if (buf == NULL)
+ {
+ nbdebug((" invalid buffer identifier in defineAnnoType\n"));
+! emsg("E650: invalid buffer identifier in defineAnnoType");
+ return FAIL;
+ }
+
+***************
+*** 1937,1943 ****
+ bg = vim_strsave(p);
+ if (STRLEN(fg) > MAX_COLOR_LENGTH || STRLEN(bg) > MAX_COLOR_LENGTH)
+ {
+! EMSG("E532: highlighting color name too long in defineAnnoType");
+ vim_free(typeName);
+ parse_error = TRUE;
+ }
+--- 1937,1943 ----
+ bg = vim_strsave(p);
+ if (STRLEN(fg) > MAX_COLOR_LENGTH || STRLEN(bg) > MAX_COLOR_LENGTH)
+ {
+! emsg("E532: highlighting color name too long in defineAnnoType");
+ vim_free(typeName);
+ parse_error = TRUE;
+ }
+***************
+*** 1968,1974 ****
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in addAnno\n"));
+! EMSG("E651: invalid buffer identifier in addAnno");
+ return FAIL;
+ }
+
+--- 1968,1974 ----
+ if (buf == NULL || buf->bufp == NULL)
+ {
+ nbdebug((" invalid buffer identifier in addAnno\n"));
+! emsg("E651: invalid buffer identifier in addAnno");
+ return FAIL;
+ }
+
+***************
+*** 2352,2358 ****
+ && !defined(FEAT_GUI_W32)
+ if (gui.in_use)
+ {
+! EMSG(_("E838: netbeans is not supported with this GUI"));
+ return;
+ }
+ # endif
+--- 2352,2358 ----
+ && !defined(FEAT_GUI_W32)
+ if (gui.in_use)
+ {
+! emsg(_("E838: netbeans is not supported with this GUI"));
+ return;
+ }
+ # endif
+***************
+*** 2517,2523 ****
+
+ if (NETBEANS_OPEN)
+ {
+! EMSG(_("E511: netbeans already connected"));
+ return;
+ }
+
+--- 2517,2523 ----
+
+ if (NETBEANS_OPEN)
+ {
+! emsg(_("E511: netbeans already connected"));
+ return;
+ }
+
+***************
+*** 3482,3491 ****
+ }
+ else
+ {
+! char_u msgbuf[IOSIZE];
+
+! vim_snprintf((char *)msgbuf, IOSIZE,
+! _("E505: %s is read-only (add ! to override)"), IObuff);
+ nbdebug((" %s\n", msgbuf));
+ emsg(msgbuf);
+ }
+--- 3482,3491 ----
+ }
+ else
+ {
+! char msgbuf[IOSIZE];
+
+! vim_snprintf(msgbuf, IOSIZE,
+! _("E505: %s is read-only (add ! to override)"), IObuff);
+ nbdebug((" %s\n", msgbuf));
+ emsg(msgbuf);
+ }
+*** ../vim-8.1.0742/src/normal.c 2019-01-11 20:34:18.300314693 +0100
+--- src/normal.c 2019-01-13 19:56:01.662201860 +0100
+***************
+*** 2211,2217 ****
+ # endif
+
+ if (*p_opfunc == NUL)
+! EMSG(_("E774: 'operatorfunc' is empty"));
+ else
+ {
+ /* Set '[ and '] marks to text to be operated on. */
+--- 2211,2217 ----
+ # endif
+
+ if (*p_opfunc == NUL)
+! emsg(_("E774: 'operatorfunc' is empty"));
+ else
+ {
+ /* Set '[ and '] marks to text to be operated on. */
+***************
+*** 2243,2249 ****
+ # endif
+ }
+ #else
+! EMSG(_("E775: Eval feature not available"));
+ #endif
+ }
+
+--- 2243,2249 ----
+ # endif
+ }
+ #else
+! emsg(_("E775: Eval feature not available"));
+ #endif
+ }
+
+***************
+*** 3542,3550 ****
+ * didn't find an identifier or string
+ */
+ if (find_type & FIND_STRING)
+! EMSG(_("E348: No string under cursor"));
+ else
+! EMSG(_(e_noident));
+ return 0;
+ }
+ ptr += col;
+--- 3542,3550 ----
+ * didn't find an identifier or string
+ */
+ if (find_type & FIND_STRING)
+! emsg(_("E348: No string under cursor"));
+ else
+! emsg(_(e_noident));
+ return 0;
+ }
+ ptr += col;
+***************
+*** 5016,5022 ****
+ deleteFold((linenr_T)1, curbuf->b_ml.ml_line_count,
+ TRUE, FALSE);
+ else
+! EMSG(_("E352: Cannot erase folds with current 'foldmethod'"));
+ break;
+
+ /* "zn": fold none: reset 'foldenable' */
+--- 5016,5022 ----
+ deleteFold((linenr_T)1, curbuf->b_ml.ml_line_count,
+ TRUE, FALSE);
+ else
+! emsg(_("E352: Cannot erase folds with current 'foldmethod'"));
+ break;
+
+ /* "zn": fold none: reset 'foldenable' */
+***************
+*** 5616,5622 ****
+ || STRCMP(kp, ":help") == 0);
+ if (kp_help && *skipwhite(ptr) == NUL)
+ {
+! EMSG(_(e_noident)); /* found white space only */
+ return;
+ }
+ kp_ex = (*kp == ':');
+--- 5616,5622 ----
+ || STRCMP(kp, ":help") == 0);
+ if (kp_help && *skipwhite(ptr) == NUL)
+ {
+! emsg(_(e_noident)); /* found white space only */
+ return;
+ }
+ kp_ex = (*kp == ':');
+***************
+*** 5667,5673 ****
+ }
+ if (n == 0)
+ {
+! EMSG(_(e_noident)); /* found dashes only */
+ vim_free(buf);
+ return;
+ }
+--- 5667,5673 ----
+ }
+ if (n == 0)
+ {
+! emsg(_(e_noident)); /* found dashes only */
+ vim_free(buf);
+ return;
+ }
+***************
+*** 7275,7281 ****
+ else if (!checkclearopq(cap->oap))
+ {
+ if (!curbuf->b_p_ma)
+! EMSG(_(e_modifiable));
+ else
+ {
+ #ifdef FEAT_VIRTUALEDIT
+--- 7275,7281 ----
+ else if (!checkclearopq(cap->oap))
+ {
+ if (!curbuf->b_p_ma)
+! emsg(_(e_modifiable));
+ else
+ {
+ #ifdef FEAT_VIRTUALEDIT
+***************
+*** 7302,7308 ****
+ else if (!checkclearopq(cap->oap))
+ {
+ if (!curbuf->b_p_ma)
+! EMSG(_(e_modifiable));
+ else
+ {
+ if (cap->extra_char == Ctrl_V) /* get another character */
+--- 7302,7308 ----
+ else if (!checkclearopq(cap->oap))
+ {
+ if (!curbuf->b_p_ma)
+! emsg(_(e_modifiable));
+ else
+ {
+ if (cap->extra_char == Ctrl_V) /* get another character */
+***************
+*** 7629,7639 ****
+ else if (cap->cmdchar == 'g')
+ {
+ if (curbuf->b_changelistlen == 0)
+! EMSG(_("E664: changelist is empty"));
+ else if (cap->count1 < 0)
+! EMSG(_("E662: At start of changelist"));
+ else
+! EMSG(_("E663: At end of changelist"));
+ }
+ else
+ clearopbeep(cap->oap);
+--- 7629,7639 ----
+ else if (cap->cmdchar == 'g')
+ {
+ if (curbuf->b_changelistlen == 0)
+! emsg(_("E664: changelist is empty"));
+ else if (cap->count1 < 0)
+! emsg(_("E662: At start of changelist"));
+ else
+! emsg(_("E663: At end of changelist"));
+ }
+ else
+ clearopbeep(cap->oap);
+***************
+*** 8514,8527 ****
+ if (curwin->w_p_cole > 0 && oldline != curwin->w_cursor.lnum)
+ redrawWinline(curwin, oldline);
+ #endif
+- /* When '#' is in 'cpoptions' ignore the count. */
+- if (vim_strchr(p_cpo, CPO_HASH) != NULL)
+- cap->count1 = 1;
+ #ifdef FEAT_SYN_HL
+ if (curwin->w_p_cul)
+ /* force redraw of cursorline */
+ curwin->w_valid &= ~VALID_CROW;
+ #endif
+ invoke_edit(cap, FALSE, cap->cmdchar, TRUE);
+ }
+ }
+--- 8514,8527 ----
+ if (curwin->w_p_cole > 0 && oldline != curwin->w_cursor.lnum)
+ redrawWinline(curwin, oldline);
+ #endif
+ #ifdef FEAT_SYN_HL
+ if (curwin->w_p_cul)
+ /* force redraw of cursorline */
+ curwin->w_valid &= ~VALID_CROW;
+ #endif
++ /* When '#' is in 'cpoptions' ignore the count. */
++ if (vim_strchr(p_cpo, CPO_HASH) != NULL)
++ cap->count1 = 1;
+ invoke_edit(cap, FALSE, cap->cmdchar, TRUE);
+ }
+ }
+***************
+*** 9107,9113 ****
+ else if (!curbuf->b_p_ma && !p_im)
+ {
+ /* Only give this error when 'insertmode' is off. */
+! EMSG(_(e_modifiable));
+ clearop(cap->oap);
+ if (cap->cmdchar == K_PS)
+ /* drop the pasted text */
+--- 9107,9113 ----
+ else if (!curbuf->b_p_ma && !p_im)
+ {
+ /* Only give this error when 'insertmode' is off. */
+! emsg(_(e_modifiable));
+ clearop(cap->oap);
+ if (cap->cmdchar == K_PS)
+ /* drop the pasted text */
+*** ../vim-8.1.0742/src/ops.c 2019-01-11 16:15:57.895171010 +0100
+--- src/ops.c 2019-01-13 19:56:05.486169368 +0100
+***************
+*** 712,718 ****
+ /* Don't even try when 'modifiable' is off. */
+ if (!curbuf->b_p_ma)
+ {
+! EMSG(_(e_modifiable));
+ return;
+ }
+
+--- 712,718 ----
+ /* Don't even try when 'modifiable' is off. */
+ if (!curbuf->b_p_ma)
+ {
+! emsg(_(e_modifiable));
+ return;
+ }
+
+***************
+*** 724,730 ****
+ if (i > 1
+ && (i % 50 == 0 || i == oap->line_count - 1)
+ && oap->line_count > p_report)
+! smsg((char_u *)_("%ld lines to indent... "), i);
+
+ /*
+ * Be vi-compatible: For lisp indenting the first line is not
+--- 724,730 ----
+ if (i > 1
+ && (i % 50 == 0 || i == oap->line_count - 1)
+ && oap->line_count > p_report)
+! smsg(_("%ld lines to indent... "), i);
+
+ /*
+ * Be vi-compatible: For lisp indenting the first line is not
+***************
+*** 770,776 ****
+ 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 */
+--- 770,776 ----
+ if (oap->line_count > p_report)
+ {
+ i = oap->line_count - (i + 1);
+! smsg(NGETTEXT("%ld line indented ",
+ "%ld lines indented ", i), i);
+ }
+ /* set '[ and '] marks */
+***************
+*** 1218,1224 ****
+ {
+ if (execreg_lastc == NUL)
+ {
+! EMSG(_("E748: No previously used register"));
+ return FAIL;
+ }
+ regname = execreg_lastc;
+--- 1218,1224 ----
+ {
+ if (execreg_lastc == NUL)
+ {
+! emsg(_("E748: No previously used register"));
+ return FAIL;
+ }
+ regname = execreg_lastc;
+***************
+*** 1243,1249 ****
+ {
+ if (last_cmdline == NULL)
+ {
+! EMSG(_(e_nolastcmd));
+ return FAIL;
+ }
+ VIM_CLEAR(new_last_cmdline); /* don't keep the cmdline containing @: */
+--- 1243,1249 ----
+ {
+ if (last_cmdline == NULL)
+ {
+! emsg(_(e_nolastcmd));
+ return FAIL;
+ }
+ VIM_CLEAR(new_last_cmdline); /* don't keep the cmdline containing @: */
+***************
+*** 1277,1283 ****
+ p = get_last_insert_save();
+ if (p == NULL)
+ {
+! EMSG(_(e_noinstext));
+ return FAIL;
+ }
+ retval = put_in_typebuf(p, FALSE, colon, silent);
+--- 1277,1283 ----
+ p = get_last_insert_save();
+ if (p == NULL)
+ {
+! emsg(_(e_noinstext));
+ return FAIL;
+ }
+ retval = put_in_typebuf(p, FALSE, colon, silent);
+***************
+*** 1535,1547 ****
+
+ case ':': /* last command line */
+ if (last_cmdline == NULL && errmsg)
+! EMSG(_(e_nolastcmd));
+ *argp = last_cmdline;
+ return TRUE;
+
+ case '/': /* last search-pattern */
+ if (last_search_pat() == NULL && errmsg)
+! EMSG(_(e_noprevre));
+ *argp = last_search_pat();
+ return TRUE;
+
+--- 1535,1547 ----
+
+ case ':': /* last command line */
+ if (last_cmdline == NULL && errmsg)
+! emsg(_(e_nolastcmd));
+ *argp = last_cmdline;
+ return TRUE;
+
+ case '/': /* last search-pattern */
+ if (last_search_pat() == NULL && errmsg)
+! emsg(_(e_noprevre));
+ *argp = last_search_pat();
+ return TRUE;
+
+***************
+*** 1549,1555 ****
+ *argp = get_last_insert_save();
+ *allocated = TRUE;
+ if (*argp == NULL && errmsg)
+! EMSG(_(e_noinstext));
+ return TRUE;
+
+ #ifdef FEAT_SEARCHPATH
+--- 1549,1555 ----
+ *argp = get_last_insert_save();
+ *allocated = TRUE;
+ if (*argp == NULL && errmsg)
+! emsg(_(e_noinstext));
+ return TRUE;
+
+ #ifdef FEAT_SEARCHPATH
+***************
+*** 1761,1767 ****
+
+ if (!curbuf->b_p_ma)
+ {
+! EMSG(_(e_modifiable));
+ return FAIL;
+ }
+
+--- 1761,1767 ----
+
+ if (!curbuf->b_p_ma)
+ {
+! emsg(_(e_modifiable));
+ return FAIL;
+ }
+
+***************
+*** 1884,1890 ****
+ msg_silent = msg_silent_save;
+ if (n != 'y')
+ {
+! EMSG(_(e_abort));
+ return FAIL;
+ }
+ }
+--- 1884,1890 ----
+ msg_silent = msg_silent_save;
+ if (n != 'y')
+ {
+! emsg(_(e_abort));
+ return FAIL;
+ }
+ }
+***************
+*** 2506,2512 ****
+ 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);
+ }
+
+--- 2506,2512 ----
+ curbuf->b_op_end = oap->end;
+
+ if (oap->line_count > p_report)
+! smsg(NGETTEXT("%ld line changed", "%ld lines changed",
+ oap->line_count), oap->line_count);
+ }
+
+***************
+*** 3038,3044 ****
+ * Overwrite this message with any next message.
+ */
+ ++no_wait_return;
+! smsg((char_u *)_("freeing %ld lines"), i + 1);
+ --no_wait_return;
+ msg_didout = FALSE;
+ msg_col = 0;
+--- 3038,3044 ----
+ * Overwrite this message with any next message.
+ */
+ ++no_wait_return;
+! smsg(_("freeing %ld lines"), i + 1);
+ --no_wait_return;
+ msg_didout = FALSE;
+ msg_col = 0;
+***************
+*** 3325,3337 ****
+ 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);
+ }
+--- 3325,3337 ----
+ update_topline_redraw();
+ if (oap->block_mode)
+ {
+! smsg(NGETTEXT("block of %ld line yanked%s",
+ "block of %ld lines yanked%s", yanklines),
+ yanklines, namebuf);
+ }
+ else
+ {
+! smsg(NGETTEXT("%ld line yanked%s",
+ "%ld lines yanked%s", yanklines),
+ yanklines, namebuf);
+ }
+***************
+*** 3649,3655 ****
+
+ if (y_size == 0 || y_array == NULL)
+ {
+! EMSG2(_("E353: Nothing in register %s"),
+ regname == 0 ? (char_u *)"\"" : transchar(regname));
+ goto end;
+ }
+--- 3649,3655 ----
+
+ if (y_size == 0 || y_array == NULL)
+ {
+! semsg(_("E353: Nothing in register %s"),
+ regname == 0 ? (char_u *)"\"" : transchar(regname));
+ goto end;
+ }
+***************
+*** 5646,5652 ****
+ curbuf->b_op_start = startpos;
+
+ if (change_cnt > p_report)
+! smsg((char_u *)NGETTEXT("%ld line changed", "%ld lines changed",
+ change_cnt), change_cnt);
+ }
+ }
+--- 5646,5652 ----
+ curbuf->b_op_start = startpos;
+
+ if (change_cnt > p_report)
+! smsg(NGETTEXT("%ld line changed", "%ld lines changed",
+ change_cnt), change_cnt);
+ }
+ }
+***************
+*** 6423,6431 ****
+ type = (char_u *)"BLOCK";
+ break;
+ default:
+! sprintf((char *)IObuff, _("E574: Unknown register type %d"),
+! y_ptr->y_type);
+! emsg(IObuff);
+ type = (char_u *)"LINE";
+ break;
+ }
+--- 6423,6429 ----
+ type = (char_u *)"BLOCK";
+ break;
+ default:
+! semsg(_("E574: Unknown register type %d"), y_ptr->y_type);
+ type = (char_u *)"LINE";
+ break;
+ }
+***************
+*** 7054,7060 ****
+ s = (char_u *)"";
+ else if (strings[1] != NULL)
+ {
+! EMSG(_("E883: search pattern and expression register may not "
+ "contain two or more lines"));
+ return;
+ }
+--- 7052,7058 ----
+ s = (char_u *)"";
+ else if (strings[1] != NULL)
+ {
+! emsg(_("E883: search pattern and expression register may not "
+ "contain two or more lines"));
+ return;
+ }
+***************
+*** 7110,7116 ****
+
+ buf = buflist_findnr(num);
+ if (buf == NULL)
+! EMSGN(_(e_nobufnr), (long)num);
+ }
+ else
+ buf = buflist_findnr(buflist_findpat(str, str + STRLEN(str),
+--- 7108,7114 ----
+
+ buf = buflist_findnr(num);
+ if (buf == NULL)
+! semsg(_(e_nobufnr), (long)num);
+ }
+ else
+ buf = buflist_findnr(buflist_findpat(str, str + STRLEN(str),
+*** ../vim-8.1.0742/src/option.c 2018-12-21 13:03:24.292337854 +0100
+--- src/option.c 2019-01-13 23:05:44.642834290 +0100
+***************
+*** 3295,3314 ****
+ # 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);
+ #endif
+ #ifdef FEAT_SPELL
+! static char_u *did_set_spell_option(int is_spellfile);
+! 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);
+ static void check_redraw(long_u flags);
+ static int findoption(char_u *);
+ static int find_key_option(char_u *arg_arg, int has_lt);
+--- 3295,3314 ----
+ # 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 *did_set_string_option(int opt_idx, char_u **varp, int new_value_alloced, char_u *oldval, char *errbuf, int opt_flags, int *value_checked);
+! static char *set_chars_option(char_u **varp);
+ #ifdef FEAT_CLIPBOARD
+! static char *check_clipboard_option(void);
+ #endif
+ #ifdef FEAT_SPELL
+! static char *did_set_spell_option(int is_spellfile);
+! static char *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 *set_bool_option(int opt_idx, char_u *varp, int value, int opt_flags);
+! static char *set_num_option(int opt_idx, char_u *varp, long value, char *errbuf, size_t errbuflen, int opt_flags);
+ static void check_redraw(long_u flags);
+ static int findoption(char_u *);
+ static int find_key_option(char_u *arg_arg, int has_lt);
+***************
+*** 3708,3718 ****
+ }
+
+ #if defined(MSWIN) || defined(MACOS_X) || defined(VMS)
+! if (STRCMP(p_enc, "latin1") == 0
+! # ifdef FEAT_MBYTE
+! || enc_utf8
+! # endif
+! )
+ {
+ /* Adjust the default for 'isprint' and 'iskeyword' to match
+ * latin1. Also set the defaults for when 'nocompatible' is
+--- 3708,3714 ----
+ }
+
+ #if defined(MSWIN) || defined(MACOS_X) || defined(VMS)
+! if (STRCMP(p_enc, "latin1") == 0 || enc_utf8)
+ {
+ /* Adjust the default for 'isprint' and 'iskeyword' to match
+ * latin1. Also set the defaults for when 'nocompatible' is
+***************
+*** 4393,4400 ****
+ int opt_flags)
+ {
+ int opt_idx;
+! char_u *errmsg;
+! char_u errbuf[80];
+ char_u *startarg;
+ int prefix; /* 1: nothing, 0: "no", 2: "inv" in front of name */
+ int nextchar; /* next non-white char after option name */
+--- 4389,4396 ----
+ int opt_flags)
+ {
+ int opt_idx;
+! char *errmsg;
+! char errbuf[80];
+ char_u *startarg;
+ int prefix; /* 1: nothing, 0: "no", 2: "inv" in front of name */
+ int nextchar; /* next non-white char after option name */
+***************
+*** 4546,4552 ****
+
+ if (opt_idx == -1 && key == 0) /* found a mismatch: skip */
+ {
+! errmsg = (char_u *)N_("E518: Unknown option");
+ goto skip;
+ }
+
+--- 4542,4548 ----
+
+ if (opt_idx == -1 && key == 0) /* found a mismatch: skip */
+ {
+! errmsg = N_("E518: Unknown option");
+ goto skip;
+ }
+
+***************
+*** 4559,4565 ****
+ if (vim_strchr((char_u *)"=:!&<", nextchar) == NULL
+ && (!(options[opt_idx].flags & P_BOOL)
+ || nextchar == '?'))
+! errmsg = (char_u *)N_("E519: Option not supported");
+ goto skip;
+ }
+
+--- 4555,4561 ----
+ if (vim_strchr((char_u *)"=:!&<", nextchar) == NULL
+ && (!(options[opt_idx].flags & P_BOOL)
+ || nextchar == '?'))
+! errmsg = N_("E519: Option not supported");
+ goto skip;
+ }
+
+***************
+*** 4597,4603 ****
+ {
+ if (flags & (P_SECURE | P_NO_ML))
+ {
+! errmsg = (char_u *)_("E520: Not allowed in a modeline");
+ goto skip;
+ }
+ #ifdef FEAT_DIFF
+--- 4593,4599 ----
+ {
+ if (flags & (P_SECURE | P_NO_ML))
+ {
+! errmsg = _("E520: Not allowed in a modeline");
+ goto skip;
+ }
+ #ifdef FEAT_DIFF
+***************
+*** 4619,4625 ****
+ /* Disallow changing some options in the sandbox */
+ if (sandbox != 0 && (flags & P_SECURE))
+ {
+! errmsg = (char_u *)_(e_sandbox);
+ goto skip;
+ }
+ #endif
+--- 4615,4621 ----
+ /* Disallow changing some options in the sandbox */
+ if (sandbox != 0 && (flags & P_SECURE))
+ {
+! errmsg = _(e_sandbox);
+ goto skip;
+ }
+ #endif
+***************
+*** 4693,4699 ****
+ p = find_termcode(key_name);
+ if (p == NULL)
+ {
+! errmsg = (char_u *)N_("E846: Key code not set");
+ goto skip;
+ }
+ else
+--- 4689,4695 ----
+ p = find_termcode(key_name);
+ if (p == NULL)
+ {
+! errmsg = N_("E846: Key code not set");
+ goto skip;
+ }
+ else
+***************
+*** 4822,4828 ****
+ }
+ else
+ {
+! errmsg = (char_u *)N_("E521: Number required after =");
+ goto skip;
+ }
+
+--- 4818,4824 ----
+ }
+ else
+ {
+! errmsg = N_("E521: Number required after =");
+ goto skip;
+ }
+
+***************
+*** 4923,4929 ****
+ {
+ STRCPY(errbuf, ":help");
+ save_arg = arg;
+! arg = errbuf;
+ }
+ /*
+ * Convert 'backspace' number to string, for
+--- 4919,4925 ----
+ {
+ STRCPY(errbuf, ":help");
+ save_arg = arg;
+! arg = (char_u *)errbuf;
+ }
+ /*
+ * Convert 'backspace' number to string, for
+***************
+*** 4975,4981 ****
+ if (*errbuf != NUL) /* remove trailing , */
+ errbuf[STRLEN(errbuf) - 1] = NUL;
+ save_arg = arg;
+! arg = errbuf;
+ }
+ /*
+ * Remove '>' before 'dir' and 'bdir', for
+--- 4971,4977 ----
+ if (*errbuf != NUL) /* remove trailing , */
+ errbuf[STRLEN(errbuf) - 1] = NUL;
+ save_arg = arg;
+! arg = (char_u *)errbuf;
+ }
+ /*
+ * Remove '>' before 'dir' and 'bdir', for
+***************
+*** 5259,5265 ****
+ if (nextchar == '&')
+ {
+ if (add_termcap_entry(key_name, TRUE) == FAIL)
+! errmsg = (char_u *)N_("E522: Not found in termcap");
+ }
+ else
+ {
+--- 5255,5261 ----
+ if (nextchar == '&')
+ {
+ if (add_termcap_entry(key_name, TRUE) == FAIL)
+! errmsg = N_("E522: Not found in termcap");
+ }
+ else
+ {
+***************
+*** 5315,5322 ****
+ /* make sure all characters are printable */
+ trans_characters(IObuff, IOSIZE);
+
+! ++no_wait_return; /* wait_return done later */
+! emsg(IObuff); /* show error highlighted */
+ --no_wait_return;
+
+ return FAIL;
+--- 5311,5318 ----
+ /* make sure all characters are printable */
+ trans_characters(IObuff, IOSIZE);
+
+! ++no_wait_return; // wait_return done later
+! emsg((char *)IObuff); // show error highlighted
+ --no_wait_return;
+
+ return FAIL;
+***************
+*** 5371,5381 ****
+ *p = *p & ~P_INSECURE;
+ }
+
+! static char_u *
+! illegal_char(char_u *errbuf, int c)
+ {
+ if (errbuf == NULL)
+! return (char_u *)"";
+ sprintf((char *)errbuf, _("E539: Illegal character <%s>"),
+ (char *)transchar(c));
+ return errbuf;
+--- 5367,5377 ----
+ *p = *p & ~P_INSECURE;
+ }
+
+! static char *
+! illegal_char(char *errbuf, int c)
+ {
+ if (errbuf == NULL)
+! return "";
+ sprintf((char *)errbuf, _("E539: Illegal character <%s>"),
+ (char *)transchar(c));
+ return errbuf;
+***************
+*** 5403,5409 ****
+ * Check value of 'cedit' and set cedit_key.
+ * Returns NULL if value is OK, error message otherwise.
+ */
+! static char_u *
+ check_cedit(void)
+ {
+ int n;
+--- 5399,5405 ----
+ * Check value of 'cedit' and set cedit_key.
+ * Returns NULL if value is OK, error message otherwise.
+ */
+! static char *
+ check_cedit(void)
+ {
+ int n;
+***************
+*** 5945,5952 ****
+ idx = findoption(name);
+ if (idx < 0) /* not found (should not happen) */
+ {
+! EMSG2(_(e_intern2), "set_string_option_direct()");
+! IEMSG2(_("For option %s"), name);
+ return;
+ }
+ }
+--- 5941,5948 ----
+ idx = findoption(name);
+ if (idx < 0) /* not found (should not happen) */
+ {
+! semsg(_(e_intern2), "set_string_option_direct()");
+! siemsg(_("For option %s"), name);
+ return;
+ }
+ }
+***************
+*** 6024,6030 ****
+ *
+ * Returns NULL on success or error message on error.
+ */
+! static char_u *
+ set_string_option(
+ int opt_idx,
+ char_u *value,
+--- 6020,6026 ----
+ *
+ * Returns NULL on success or error message on error.
+ */
+! static char *
+ set_string_option(
+ int opt_idx,
+ char_u *value,
+***************
+*** 6037,6043 ****
+ char_u *saved_oldval = NULL;
+ 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 */
+--- 6033,6039 ----
+ char_u *saved_oldval = NULL;
+ char_u *saved_newval = NULL;
+ #endif
+! char *r = NULL;
+ int value_checked = FALSE;
+
+ if (options[opt_idx].var == NULL) /* don't set hidden option */
+***************
+*** 6100,6117 ****
+ * Handle string options that need some action to perform when changed.
+ * Returns NULL for success, or an error message for an error.
+ */
+! 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;
+ int did_chartab = FALSE;
+ char_u **gvarp;
+--- 6096,6113 ----
+ * Handle string options that need some action to perform when changed.
+ * Returns NULL for success, or an error message for an error.
+ */
+! static char *
+ 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 *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 *errmsg = NULL;
+ char_u *s, *p;
+ int did_chartab = FALSE;
+ char_u **gvarp;
+***************
+*** 6155,6169 ****
+ else if (varp == &T_NAME)
+ {
+ if (T_NAME[0] == NUL)
+! errmsg = (char_u *)N_("E529: Cannot set 'term' to empty string");
+ #ifdef FEAT_GUI
+ if (gui.in_use)
+! errmsg = (char_u *)N_("E530: Cannot change term in GUI");
+ else if (term_is_gui(T_NAME))
+! errmsg = (char_u *)N_("E531: Use \":gui\" to start the GUI");
+ #endif
+ else if (set_termname(T_NAME) == FAIL)
+! errmsg = (char_u *)N_("E522: Not found in termcap");
+ else
+ {
+ /* Screen colors may have changed. */
+--- 6151,6165 ----
+ else if (varp == &T_NAME)
+ {
+ if (T_NAME[0] == NUL)
+! errmsg = N_("E529: Cannot set 'term' to empty string");
+ #ifdef FEAT_GUI
+ if (gui.in_use)
+! errmsg = N_("E530: Cannot change term in GUI");
+ else if (term_is_gui(T_NAME))
+! errmsg = N_("E531: Use \":gui\" to start the GUI");
+ #endif
+ else if (set_termname(T_NAME) == FAIL)
+! errmsg = N_("E522: Not found in termcap");
+ else
+ {
+ /* Screen colors may have changed. */
+***************
+*** 6211,6217 ****
+ {
+ if (STRCMP(*p_bex == '.' ? p_bex + 1 : p_bex,
+ *p_pm == '.' ? p_pm + 1 : p_pm) == 0)
+! errmsg = (char_u *)N_("E589: 'backupext' and 'patchmode' are equal");
+ }
+ #ifdef FEAT_LINEBREAK
+ /* 'breakindentopt' */
+--- 6207,6213 ----
+ {
+ if (STRCMP(*p_bex == '.' ? p_bex + 1 : p_bex,
+ *p_pm == '.' ? p_pm + 1 : p_pm) == 0)
+! errmsg = N_("E589: 'backupext' and 'patchmode' are equal");
+ }
+ #ifdef FEAT_LINEBREAK
+ /* 'breakindentopt' */
+***************
+*** 6328,6336 ****
+ if (check_opt_strings(p_ambw, p_ambw_values, FALSE) != OK)
+ errmsg = e_invarg;
+ else if (set_chars_option(&p_lcs) != NULL)
+! errmsg = (char_u *)_("E834: Conflicts with value of 'listchars'");
+ else if (set_chars_option(&p_fcs) != NULL)
+! errmsg = (char_u *)_("E835: Conflicts with value of 'fillchars'");
+ }
+ #endif
+
+--- 6324,6332 ----
+ if (check_opt_strings(p_ambw, p_ambw_values, FALSE) != OK)
+ errmsg = e_invarg;
+ else if (set_chars_option(&p_lcs) != NULL)
+! errmsg = _("E834: Conflicts with value of 'listchars'");
+ else if (set_chars_option(&p_fcs) != NULL)
+! errmsg = _("E835: Conflicts with value of 'fillchars'");
+ }
+ #endif
+
+***************
+*** 6454,6460 ****
+ {
+ /* GTK+ 2 uses only a single encoding, and that is UTF-8. */
+ if (STRCMP(p_tenc, "utf-8") != 0)
+! errmsg = (char_u *)N_("E617: Cannot be changed in the GTK+ 2 GUI");
+ }
+ # endif
+
+--- 6450,6456 ----
+ {
+ /* GTK+ 2 uses only a single encoding, and that is UTF-8. */
+ if (STRCMP(p_tenc, "utf-8") != 0)
+! errmsg = N_("E617: Cannot be changed in the GTK+ 2 GUI");
+ }
+ # endif
+
+***************
+*** 6475,6481 ****
+ if (convert_setup(&input_conv, p_tenc, p_enc) == FAIL
+ || convert_setup(&output_conv, p_enc, p_tenc) == FAIL)
+ {
+! EMSG3(_("E950: Cannot convert between %s and %s"),
+ p_tenc, p_enc);
+ errmsg = e_invarg;
+ }
+--- 6471,6477 ----
+ if (convert_setup(&input_conv, p_tenc, p_enc) == FAIL
+ || convert_setup(&output_conv, p_enc, p_tenc) == FAIL)
+ {
+! semsg(_("E950: Cannot convert between %s and %s"),
+ p_tenc, p_enc);
+ errmsg = e_invarg;
+ }
+***************
+*** 6748,6756 ****
+ ++s;
+ }
+ if (*s++ == NUL)
+! errmsg = (char_u *)N_("E524: Missing colon");
+ else if (*s == ',' || *s == NUL)
+! errmsg = (char_u *)N_("E525: Zero length string");
+ if (errmsg != NULL)
+ break;
+ while (*s && *s != ',')
+--- 6744,6752 ----
+ ++s;
+ }
+ if (*s++ == NUL)
+! errmsg = N_("E524: Missing colon");
+ else if (*s == ',' || *s == NUL)
+! errmsg = N_("E525: Zero length string");
+ if (errmsg != NULL)
+ break;
+ while (*s && *s != ',')
+***************
+*** 6830,6842 ****
+ {
+ if (errbuf != NULL)
+ {
+! sprintf((char *)errbuf,
+! _("E526: Missing number after <%s>"),
+ transchar_byte(*(s - 1)));
+ errmsg = errbuf;
+ }
+ else
+! errmsg = (char_u *)"";
+ break;
+ }
+ }
+--- 6826,6837 ----
+ {
+ if (errbuf != NULL)
+ {
+! sprintf(errbuf, _("E526: Missing number after <%s>"),
+ transchar_byte(*(s - 1)));
+ errmsg = errbuf;
+ }
+ else
+! errmsg = "";
+ break;
+ }
+ }
+***************
+*** 6845,6858 ****
+ else if (*s)
+ {
+ if (errbuf != NULL)
+! errmsg = (char_u *)N_("E527: Missing comma");
+ else
+! errmsg = (char_u *)"";
+ break;
+ }
+ }
+ if (*p_viminfo && errmsg == NULL && get_viminfo_parameter('\'') < 0)
+! errmsg = (char_u *)N_("E528: Must specify a ' value");
+ }
+ #endif /* FEAT_VIMINFO */
+
+--- 6840,6853 ----
+ else if (*s)
+ {
+ if (errbuf != NULL)
+! errmsg = N_("E527: Missing comma");
+ else
+! errmsg = "";
+ break;
+ }
+ }
+ if (*p_viminfo && errmsg == NULL && get_viminfo_parameter('\'') < 0)
+! errmsg = N_("E528: Must specify a ' value");
+ }
+ #endif /* FEAT_VIMINFO */
+
+***************
+*** 6917,6923 ****
+ for (s = p_sbr; *s; )
+ {
+ if (ptr2cells(s) != 1)
+! errmsg = (char_u *)N_("E595: contains unprintable or wide character");
+ MB_PTR_ADV(s);
+ }
+ }
+--- 6912,6918 ----
+ for (s = p_sbr; *s; )
+ {
+ if (ptr2cells(s) != 1)
+! errmsg = N_("E595: contains unprintable or wide character");
+ MB_PTR_ADV(s);
+ }
+ }
+***************
+*** 6961,6967 ****
+ }
+ else
+ # endif
+! errmsg = (char_u *)N_("E596: Invalid font(s)");
+ }
+ }
+ redraw_gui_only = TRUE;
+--- 6956,6962 ----
+ }
+ else
+ # endif
+! errmsg = N_("E596: Invalid font(s)");
+ }
+ }
+ redraw_gui_only = TRUE;
+***************
+*** 6980,6988 ****
+ else if (varp == &p_guifontwide)
+ {
+ if (STRCMP(p_guifontwide, "*") == 0)
+! errmsg = (char_u *)N_("E533: can't select wide font");
+ else if (gui_get_wide_font() == FAIL)
+! errmsg = (char_u *)N_("E534: Invalid wide font");
+ redraw_gui_only = TRUE;
+ }
+ # endif
+--- 6975,6983 ----
+ else if (varp == &p_guifontwide)
+ {
+ if (STRCMP(p_guifontwide, "*") == 0)
+! errmsg = N_("E533: can't select wide font");
+ else if (gui_get_wide_font() == FAIL)
+! errmsg = N_("E534: Invalid wide font");
+ redraw_gui_only = TRUE;
+ }
+ # endif
+***************
+*** 7285,7291 ****
+ errmsg = errbuf;
+ }
+ else
+! errmsg = (char_u *)"";
+ break;
+ }
+ }
+--- 7280,7286 ----
+ errmsg = errbuf;
+ }
+ else
+! errmsg = "";
+ break;
+ }
+ }
+***************
+*** 7445,7451 ****
+ {
+ p = vim_strchr(*varp, ',');
+ if (p == NULL)
+! errmsg = (char_u *)N_("E536: comma required");
+ else if (p == *varp || p[1] == NUL)
+ errmsg = e_invarg;
+ else if (foldmethodIsMarker(curwin))
+--- 7440,7446 ----
+ {
+ p = vim_strchr(*varp, ',');
+ if (p == NULL)
+! errmsg = N_("E536: comma required");
+ else if (p == *varp || p[1] == NUL)
+ errmsg = e_invarg;
+ else if (foldmethodIsMarker(curwin))
+***************
+*** 7455,7461 ****
+ else if (gvarp == &p_cms)
+ {
+ if (**varp != NUL && strstr((char *)*varp, "%s") == NULL)
+! errmsg = (char_u *)N_("E537: 'commentstring' must be empty or contain %s");
+ }
+ /* 'foldopen' */
+ else if (varp == &p_fdo)
+--- 7450,7456 ----
+ else if (gvarp == &p_cms)
+ {
+ if (**varp != NUL && strstr((char *)*varp, "%s") == NULL)
+! errmsg = N_("E537: 'commentstring' must be empty or contain %s");
+ }
+ /* 'foldopen' */
+ else if (varp == &p_fdo)
+***************
+*** 7878,7884 ****
+ * Handle setting 'colorcolumn' or 'textwidth' in window "wp".
+ * Returns error message, NULL if it's OK.
+ */
+! char_u *
+ check_colorcolumn(win_T *wp)
+ {
+ char_u *s;
+--- 7873,7879 ----
+ * Handle setting 'colorcolumn' or 'textwidth' in window "wp".
+ * Returns error message, NULL if it's OK.
+ */
+! char *
+ check_colorcolumn(win_T *wp)
+ {
+ char_u *s;
+***************
+*** 7949,7955 ****
+ * Handle setting 'listchars' or 'fillchars'.
+ * Returns error message, NULL if it's OK.
+ */
+! static char_u *
+ set_chars_option(char_u **varp)
+ {
+ int round, i, len, entries;
+--- 7944,7950 ----
+ * Handle setting 'listchars' or 'fillchars'.
+ * Returns error message, NULL if it's OK.
+ */
+! static char *
+ set_chars_option(char_u **varp)
+ {
+ int round, i, len, entries;
+***************
+*** 8075,8086 ****
+ * Check validity of options with the 'statusline' format.
+ * Return error message or NULL.
+ */
+! char_u *
+ check_stl_option(char_u *s)
+ {
+ int itemcnt = 0;
+ int groupdepth = 0;
+! static char_u errbuf[80];
+
+ while (*s && itemcnt < STL_MAX_ITEM)
+ {
+--- 8070,8081 ----
+ * Check validity of options with the 'statusline' format.
+ * Return error message or NULL.
+ */
+! char *
+ check_stl_option(char_u *s)
+ {
+ int itemcnt = 0;
+ int groupdepth = 0;
+! static char errbuf[80];
+
+ while (*s && itemcnt < STL_MAX_ITEM)
+ {
+***************
+*** 8131,8143 ****
+ while (*s != '}' && *s)
+ s++;
+ if (*s != '}')
+! return (char_u *)N_("E540: Unclosed expression sequence");
+ }
+ }
+ if (itemcnt >= STL_MAX_ITEM)
+! return (char_u *)N_("E541: too many items");
+ if (groupdepth != 0)
+! return (char_u *)N_("E542: unbalanced groups");
+ return NULL;
+ }
+ #endif
+--- 8126,8138 ----
+ while (*s != '}' && *s)
+ s++;
+ if (*s != '}')
+! return N_("E540: Unclosed expression sequence");
+ }
+ }
+ if (itemcnt >= STL_MAX_ITEM)
+! return N_("E541: too many items");
+ if (groupdepth != 0)
+! return N_("E542: unbalanced groups");
+ return NULL;
+ }
+ #endif
+***************
+*** 8145,8152 ****
+ #ifdef FEAT_CLIPBOARD
+ /*
+ * Extract the items in the 'clipboard' option and set global values.
+ */
+! static char_u *
+ check_clipboard_option(void)
+ {
+ int new_unnamed = 0;
+--- 8140,8148 ----
+ #ifdef FEAT_CLIPBOARD
+ /*
+ * Extract the items in the 'clipboard' option and set global values.
++ * Return an error message or NULL for success.
+ */
+! static char *
+ check_clipboard_option(void)
+ {
+ int new_unnamed = 0;
+***************
+*** 8155,8161 ****
+ int new_autoselectml = FALSE;
+ int new_html = FALSE;
+ regprog_T *new_exclude_prog = NULL;
+! char_u *errmsg = NULL;
+ char_u *p;
+
+ for (p = p_cb; *p != NUL; )
+--- 8151,8157 ----
+ int new_autoselectml = FALSE;
+ int new_html = FALSE;
+ regprog_T *new_exclude_prog = NULL;
+! char *errmsg = NULL;
+ char_u *p;
+
+ for (p = p_cb; *p != NUL; )
+***************
+*** 8235,8244 ****
+ #endif
+
+ #ifdef FEAT_SPELL
+! static char_u *
+ did_set_spell_option(int is_spellfile)
+ {
+! char_u *errmsg = NULL;
+ win_T *wp;
+ int l;
+
+--- 8231,8244 ----
+ #endif
+
+ #ifdef FEAT_SPELL
+! /*
+! * Handle side effects of setting 'spell'.
+! * Return an error message or NULL for success.
+! */
+! static char *
+ did_set_spell_option(int is_spellfile)
+ {
+! char *errmsg = NULL;
+ win_T *wp;
+ int l;
+
+***************
+*** 8266,8272 ****
+ * Set curbuf->b_cap_prog to the regexp program for 'spellcapcheck'.
+ * Return error message when failed, NULL when OK.
+ */
+! static char_u *
+ compile_cap_prog(synblock_T *synblock)
+ {
+ regprog_T *rp = synblock->b_cap_prog;
+--- 8266,8272 ----
+ * Set curbuf->b_cap_prog to the regexp program for 'spellcapcheck'.
+ * Return error message when failed, NULL when OK.
+ */
+! static char *
+ compile_cap_prog(synblock_T *synblock)
+ {
+ regprog_T *rp = synblock->b_cap_prog;
+***************
+*** 8353,8359 ****
+ * Set the value of a boolean option, and take care of side effects.
+ * Returns NULL for success, or an error message for an error.
+ */
+! static char_u *
+ set_bool_option(
+ int opt_idx, /* index in options[] table */
+ char_u *varp, /* pointer to the option variable */
+--- 8353,8359 ----
+ * Set the value of a boolean option, and take care of side effects.
+ * Returns NULL for success, or an error message for an error.
+ */
+! static char *
+ set_bool_option(
+ int opt_idx, /* index in options[] table */
+ char_u *varp, /* pointer to the option variable */
+***************
+*** 8471,8477 ****
+ && curbuf->b_term != NULL && !term_is_finished(curbuf))))
+ {
+ curbuf->b_p_ma = FALSE;
+! return (char_u *)N_("E946: Cannot make a terminal with running job modifiable");
+ }
+ # endif
+ # ifdef FEAT_TITLE
+--- 8471,8477 ----
+ && curbuf->b_term != NULL && !term_is_finished(curbuf))))
+ {
+ curbuf->b_p_ma = FALSE;
+! return N_("E946: Cannot make a terminal with running job modifiable");
+ }
+ # endif
+ # ifdef FEAT_TITLE
+***************
+*** 8607,8613 ****
+ if (win->w_p_pvw && win != curwin)
+ {
+ curwin->w_p_pvw = FALSE;
+! return (char_u *)N_("E590: A preview window already exists");
+ }
+ }
+ }
+--- 8607,8613 ----
+ if (win->w_p_pvw && win != curwin)
+ {
+ curwin->w_p_pvw = FALSE;
+! return N_("E590: A preview window already exists");
+ }
+ }
+ }
+***************
+*** 8765,8773 ****
+ {
+ if (curwin->w_p_spell)
+ {
+! char_u *errmsg = did_set_spelllang(curwin);
+ if (errmsg != NULL)
+! EMSG(_(errmsg));
+ }
+ }
+ #endif
+--- 8765,8774 ----
+ {
+ if (curwin->w_p_spell)
+ {
+! char *errmsg = did_set_spelllang(curwin);
+!
+ if (errmsg != NULL)
+! emsg(_(errmsg));
+ }
+ }
+ #endif
+***************
+*** 8989,9005 ****
+ * Set the value of a number option, and take care of side effects.
+ * Returns NULL for success, or an error message for an error.
+ */
+! static char_u *
+ set_num_option(
+ int opt_idx, /* index in options[] table */
+ char_u *varp, /* pointer to the option variable */
+ long value, /* new value */
+! char_u *errbuf, /* buffer for error messages */
+ size_t errbuflen, /* length of "errbuf" */
+ int opt_flags) /* OPT_LOCAL, OPT_GLOBAL and
+ OPT_MODELINE */
+ {
+! char_u *errmsg = NULL;
+ long old_value = *(long *)varp;
+ long old_Rows = Rows; /* remember old Rows */
+ long old_Columns = Columns; /* remember old Columns */
+--- 8990,9006 ----
+ * Set the value of a number option, and take care of side effects.
+ * Returns NULL for success, or an error message for an error.
+ */
+! static char *
+ set_num_option(
+ int opt_idx, /* index in options[] table */
+ char_u *varp, /* pointer to the option variable */
+ long value, /* new value */
+! char *errbuf, /* buffer for error messages */
+ size_t errbuflen, /* length of "errbuf" */
+ int opt_flags) /* OPT_LOCAL, OPT_GLOBAL and
+ OPT_MODELINE */
+ {
+! char *errmsg = NULL;
+ long old_value = *(long *)varp;
+ long old_Rows = Rows; /* remember old Rows */
+ long old_Columns = Columns; /* remember old Columns */
+***************
+*** 9937,9943 ****
+ *
+ * Returns NULL on success or error message on error.
+ */
+! char_u *
+ set_option_value(
+ char_u *name,
+ long number,
+--- 9938,9944 ----
+ *
+ * Returns NULL on success or error message on error.
+ */
+! char *
+ set_option_value(
+ char_u *name,
+ long number,
+***************
+*** 9975,9981 ****
+ return NULL;
+ }
+
+! EMSG2(_("E355: Unknown option: %s"), name);
+ }
+ else
+ {
+--- 9976,9982 ----
+ return NULL;
+ }
+
+! semsg(_("E355: Unknown option: %s"), name);
+ }
+ else
+ {
+***************
+*** 9984,9990 ****
+ /* Disallow changing some options in the sandbox */
+ if (sandbox > 0 && (flags & P_SECURE))
+ {
+! EMSG(_(e_sandbox));
+ return NULL;
+ }
+ #endif
+--- 9985,9991 ----
+ /* Disallow changing some options in the sandbox */
+ if (sandbox > 0 && (flags & P_SECURE))
+ {
+! emsg(_(e_sandbox));
+ return NULL;
+ }
+ #endif
+***************
+*** 10008,10014 ****
+ /* There's another character after zeros or the string
+ * is empty. In both cases, we are trying to set a
+ * num option using a string. */
+! EMSG3(_("E521: Number required: &%s = '%s'"),
+ name, string);
+ return NULL; /* do nothing as we hit an error */
+
+--- 10009,10015 ----
+ /* There's another character after zeros or the string
+ * is empty. In both cases, we are trying to set a
+ * num option using a string. */
+! semsg(_("E521: Number required: &%s = '%s'"),
+ name, string);
+ return NULL; /* do nothing as we hit an error */
+
+***************
+*** 11086,11092 ****
+ case PV_VSTS: return (char_u *)&(curbuf->b_p_vsts);
+ case PV_VTS: return (char_u *)&(curbuf->b_p_vts);
+ #endif
+! default: IEMSG(_("E356: get_varp ERROR"));
+ }
+ /* always return a valid pointer to avoid a crash! */
+ return (char_u *)&(curbuf->b_p_wm);
+--- 11087,11093 ----
+ case PV_VSTS: return (char_u *)&(curbuf->b_p_vsts);
+ case PV_VTS: return (char_u *)&(curbuf->b_p_vts);
+ #endif
+! default: iemsg(_("E356: get_varp ERROR"));
+ }
+ /* always return a valid pointer to avoid a crash! */
+ return (char_u *)&(curbuf->b_p_wm);
+***************
+*** 12283,12289 ****
+ }
+ if (to == NUL)
+ {
+! EMSG2(_("E357: 'langmap': Matching character missing for %s"),
+ transchar(from));
+ return;
+ }
+--- 12284,12290 ----
+ }
+ if (to == NUL)
+ {
+! semsg(_("E357: 'langmap': Matching character missing for %s"),
+ transchar(from));
+ return;
+ }
+***************
+*** 12307,12313 ****
+ {
+ if (p[0] != ',')
+ {
+! EMSG2(_("E358: 'langmap': Extra characters after semicolon: %s"), p);
+ return;
+ }
+ ++p;
+--- 12308,12314 ----
+ {
+ if (p[0] != ',')
+ {
+! semsg(_("E358: 'langmap': Extra characters after semicolon: %s"), p);
+ return;
+ }
+ ++p;
+***************
+*** 12877,12885 ****
+ if (strtol((char *)cp, (char **)&end, 10) <= 0)
+ {
+ if (cp != end)
+! EMSG(_(e_positive));
+ else
+! EMSG(_(e_invarg));
+ return FALSE;
+ }
+ }
+--- 12878,12886 ----
+ if (strtol((char *)cp, (char **)&end, 10) <= 0)
+ {
+ if (cp != end)
+! emsg(_(e_positive));
+ else
+! emsg(_(e_invarg));
+ return FALSE;
+ }
+ }
+***************
+*** 12891,12897 ****
+ ++valcount;
+ continue;
+ }
+! EMSG(_(e_invarg));
+ return FALSE;
+ }
+
+--- 12892,12898 ----
+ ++valcount;
+ continue;
+ }
+! emsg(_(e_invarg));
+ return FALSE;
+ }
+
+*** ../vim-8.1.0742/src/os_amiga.c 2018-11-16 16:21:01.641310033 +0100
+--- src/os_amiga.c 2019-01-13 19:56:11.854115310 +0100
+***************
+*** 963,969 ****
+ int
+ mch_screenmode(char_u *arg)
+ {
+! EMSG(_(e_screenmode));
+ return FAIL;
+ }
+
+--- 963,969 ----
+ int
+ mch_screenmode(char_u *arg)
+ {
+! emsg(_(e_screenmode));
+ return FAIL;
+ }
+
+***************
+*** 1189,1195 ****
+ if (close_win)
+ {
+ /* if Vim opened a window: Executing a shell may cause crashes */
+! EMSG(_("E360: Cannot execute shell with -f option"));
+ return -1;
+ }
+
+--- 1189,1195 ----
+ if (close_win)
+ {
+ /* if Vim opened a window: Executing a shell may cause crashes */
+! emsg(_("E360: Cannot execute shell with -f option"));
+ return -1;
+ }
+
+***************
+*** 1517,1527 ****
+ matches = gap->ga_len - start_len;
+
+ if (Result == ERROR_BUFFER_OVERFLOW)
+! EMSG(_("ANCHOR_BUF_SIZE too small."));
+ else if (matches == 0 && Result != ERROR_OBJECT_NOT_FOUND
+ && Result != ERROR_DEVICE_NOT_MOUNTED
+ && Result != ERROR_NO_MORE_ENTRIES)
+! EMSG(_("I/O ERROR"));
+
+ /*
+ * Sort the files for this pattern.
+--- 1517,1527 ----
+ matches = gap->ga_len - start_len;
+
+ if (Result == ERROR_BUFFER_OVERFLOW)
+! emsg(_("ANCHOR_BUF_SIZE too small."));
+ else if (matches == 0 && Result != ERROR_OBJECT_NOT_FOUND
+ && Result != ERROR_DEVICE_NOT_MOUNTED
+ && Result != ERROR_NO_MORE_ENTRIES)
+! emsg(_("I/O ERROR"));
+
+ /*
+ * Sort the files for this pattern.
+*** ../vim-8.1.0742/src/os_mswin.c 2018-12-18 21:56:25.084495836 +0100
+--- src/os_mswin.c 2019-01-13 19:56:15.186087048 +0100
+***************
+*** 776,782 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! smsg((char_u *)"chdir(%s)", path);
+ verbose_leave();
+ }
+ if (isalpha(path[0]) && path[1] == ':') /* has a drive name */
+--- 776,782 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! smsg("chdir(%s)", path);
+ verbose_leave();
+ }
+ if (isalpha(path[0]) && path[1] == ':') /* has a drive name */
+***************
+*** 841,847 ****
+ int
+ mch_screenmode(char_u *arg UNUSED)
+ {
+! EMSG(_(e_screenmode));
+ return FAIL;
+ }
+
+--- 841,847 ----
+ int
+ mch_screenmode(char_u *arg UNUSED)
+ {
+! emsg(_(e_screenmode));
+ return FAIL;
+ }
+
+***************
+*** 1004,1010 ****
+
+ if (!fRunTimeLinkSuccess)
+ {
+! EMSG2(_(e_libcall), funcname);
+ return FAIL;
+ }
+
+--- 1004,1010 ----
+
+ if (!fRunTimeLinkSuccess)
+ {
+! semsg(_(e_libcall), funcname);
+ return FAIL;
+ }
+
+***************
+*** 1524,1530 ****
+
+ if (prt_dlg.hDC == NULL)
+ {
+! EMSG(_("E237: Printer selection failed"));
+ mch_print_cleanup();
+ return FALSE;
+ }
+--- 1524,1530 ----
+
+ if (prt_dlg.hDC == NULL)
+ {
+! emsg(_("E237: Printer selection failed"));
+ mch_print_cleanup();
+ return FALSE;
+ }
+***************
+*** 1601,1607 ****
+ vim_memset(&fLogFont, 0, sizeof(fLogFont));
+ if (get_logfont(&fLogFont, p_pfn, prt_dlg.hDC, TRUE) == FAIL)
+ {
+! EMSG2(_("E613: Unknown printer font: %s"), p_pfn);
+ mch_print_cleanup();
+ return FALSE;
+ }
+--- 1601,1607 ----
+ vim_memset(&fLogFont, 0, sizeof(fLogFont));
+ if (get_logfont(&fLogFont, p_pfn, prt_dlg.hDC, TRUE) == FAIL)
+ {
+! semsg(_("E613: Unknown printer font: %s"), p_pfn);
+ mch_print_cleanup();
+ return FALSE;
+ }
+***************
+*** 1662,1668 ****
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL, err, 0, (LPTSTR)(&buf), 0, NULL);
+! EMSG2(_("E238: Print error: %s"),
+ buf == NULL ? (char_u *)_("Unknown") : buf);
+ LocalFree((LPVOID)(buf));
+ }
+--- 1662,1668 ----
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL, err, 0, (LPTSTR)(&buf), 0, NULL);
+! semsg(_("E238: Print error: %s"),
+ buf == NULL ? (char_u *)_("Unknown") : buf);
+ LocalFree((LPVOID)(buf));
+ }
+***************
+*** 2504,2510 ****
+ if (target == 0)
+ {
+ if (!silent)
+! EMSG2(_(e_noserver), name);
+ return -1;
+ }
+
+--- 2504,2510 ----
+ if (target == 0)
+ {
+ if (!silent)
+! semsg(_(e_noserver), name);
+ return -1;
+ }
+
+***************
+*** 3070,3078 ****
+ }
+ if (cp->name == NULL && verbose)
+ {
+! vim_snprintf((char *)IObuff, IOSIZE,
+! _("E244: Illegal charset name \"%s\" in font name \"%s\""), p, name);
+! EMSG(IObuff);
+ break;
+ }
+ break;
+--- 3070,3076 ----
+ }
+ if (cp->name == NULL && verbose)
+ {
+! semsg(_("E244: Illegal charset name \"%s\" in font name \"%s\""), p, name);
+ break;
+ }
+ break;
+***************
+*** 3090,3110 ****
+ }
+ if (qp->name == NULL && verbose)
+ {
+! vim_snprintf((char *)IObuff, IOSIZE,
+! _("E244: Illegal quality name \"%s\" in font name \"%s\""), p, name);
+! EMSG(IObuff);
+ break;
+ }
+ break;
+ }
+ default:
+ if (verbose)
+! {
+! vim_snprintf((char *)IObuff, IOSIZE,
+! _("E245: Illegal char '%c' in font name \"%s\""),
+! p[-1], name);
+! EMSG(IObuff);
+! }
+ goto theend;
+ }
+ while (*p == ':')
+--- 3088,3101 ----
+ }
+ if (qp->name == NULL && verbose)
+ {
+! semsg(_("E244: Illegal quality name \"%s\" in font name \"%s\""), p, name);
+ break;
+ }
+ break;
+ }
+ default:
+ if (verbose)
+! semsg(_("E245: Illegal char '%c' in font name \"%s\""), p[-1], name);
+ goto theend;
+ }
+ while (*p == ':')
+*** ../vim-8.1.0742/src/os_unix.c 2018-12-29 22:28:42.750699129 +0100
+--- src/os_unix.c 2019-01-13 19:56:18.662057582 +0100
+***************
+*** 327,333 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! smsg((char_u *)"chdir(%s)", path);
+ verbose_leave();
+ }
+ # ifdef VMS
+--- 327,333 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! smsg("chdir(%s)", path);
+ verbose_leave();
+ }
+ # ifdef VMS
+***************
+*** 1004,1010 ****
+ * if (SETJMP(lc_jump_env) != 0)
+ * {
+ * mch_didjmp();
+! * EMSG("crash!");
+ * }
+ * else
+ * {
+--- 1004,1010 ----
+ * if (SETJMP(lc_jump_env) != 0)
+ * {
+ * mch_didjmp();
+! * emsg("crash!");
+ * }
+ * else
+ * {
+***************
+*** 1632,1638 ****
+ static void
+ xopen_message(long elapsed_msec)
+ {
+! smsg((char_u *)_("Opening the X display took %ld msec"), elapsed_msec);
+ }
+ # endif
+ #endif
+--- 1632,1638 ----
+ static void
+ xopen_message(long elapsed_msec)
+ {
+! smsg(_("Opening the X display took %ld msec"), elapsed_msec);
+ }
+ # endif
+ #endif
+***************
+*** 2670,2676 ****
+ #endif
+ l = mch_chdir((char *)olddir);
+ if (l != 0)
+! EMSG(_(e_prev_dir));
+ }
+
+ l = STRLEN(buf);
+--- 2670,2676 ----
+ #endif
+ l = mch_chdir((char *)olddir);
+ if (l != 0)
+! emsg(_(e_prev_dir));
+ }
+
+ l = STRLEN(buf);
+***************
+*** 3974,3980 ****
+ int
+ mch_screenmode(char_u *arg UNUSED)
+ {
+! EMSG(_(e_screenmode));
+ return FAIL;
+ }
+
+--- 3974,3980 ----
+ int
+ mch_screenmode(char_u *arg UNUSED)
+ {
+! emsg(_(e_screenmode));
+ return FAIL;
+ }
+
+***************
+*** 5454,5460 ****
+ fd_in[0] = mch_open((char *)fname, O_RDONLY, 0);
+ if (fd_in[0] < 0)
+ {
+! EMSG2(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+--- 5454,5460 ----
+ fd_in[0] = mch_open((char *)fname, O_RDONLY, 0);
+ if (fd_in[0] < 0)
+ {
+! semsg(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+***************
+*** 5472,5478 ****
+ fd_out[1] = mch_open((char *)fname, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+ if (fd_out[1] < 0)
+ {
+! EMSG2(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+--- 5472,5478 ----
+ fd_out[1] = mch_open((char *)fname, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+ if (fd_out[1] < 0)
+ {
+! semsg(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+***************
+*** 5486,5492 ****
+ fd_err[1] = mch_open((char *)fname, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+ if (fd_err[1] < 0)
+ {
+! EMSG2(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+--- 5486,5492 ----
+ fd_err[1] = mch_open((char *)fname, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+ if (fd_err[1] < 0)
+ {
+! semsg(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+***************
+*** 6509,6515 ****
+ */
+ if ((tempname = vim_tempname('o', FALSE)) == NULL)
+ {
+! EMSG(_(e_notmp));
+ return FAIL;
+ }
+
+--- 6509,6515 ----
+ */
+ if ((tempname = vim_tempname('o', FALSE)) == NULL)
+ {
+! emsg(_(e_notmp));
+ return FAIL;
+ }
+
+***************
+*** 6763,6769 ****
+ if (i != (int)len)
+ {
+ /* unexpected read error */
+! EMSG2(_(e_notread), tempname);
+ vim_free(tempname);
+ vim_free(buffer);
+ return FAIL;
+--- 6763,6769 ----
+ if (i != (int)len)
+ {
+ /* unexpected read error */
+! semsg(_(e_notread), tempname);
+ vim_free(tempname);
+ vim_free(buffer);
+ return FAIL;
+***************
+*** 7347,7353 ****
+ /* "dlerr" must be used before dlclose() */
+ dlerr = (char *)dlerror();
+ if (dlerr != NULL)
+! EMSG2(_("dlerror = \"%s\""), dlerr);
+ }
+ # else
+ hinstLib = shl_load((const char*)libname, BIND_IMMEDIATE|BIND_VERBOSE, 0L);
+--- 7347,7353 ----
+ /* "dlerr" must be used before dlclose() */
+ dlerr = (char *)dlerror();
+ if (dlerr != NULL)
+! semsg(_("dlerror = \"%s\""), dlerr);
+ }
+ # else
+ hinstLib = shl_load((const char*)libname, BIND_IMMEDIATE|BIND_VERBOSE, 0L);
+***************
+*** 7442,7448 ****
+ for (i = 0; signal_info[i].sig != -1; i++)
+ if (lc_signal == signal_info[i].sig)
+ break;
+! EMSG2("E368: got SIG%s in libcall()", signal_info[i].name);
+ }
+ # endif
+ # endif
+--- 7442,7448 ----
+ for (i = 0; signal_info[i].sig != -1; i++)
+ if (lc_signal == signal_info[i].sig)
+ break;
+! semsg("E368: got SIG%s in libcall()", signal_info[i].name);
+ }
+ # endif
+ # endif
+***************
+*** 7450,7456 ****
+ # if defined(USE_DLOPEN)
+ /* "dlerr" must be used before dlclose() */
+ if (dlerr != NULL)
+! EMSG2(_("dlerror = \"%s\""), dlerr);
+
+ /* Free the DLL module. */
+ (void)dlclose(hinstLib);
+--- 7450,7456 ----
+ # if defined(USE_DLOPEN)
+ /* "dlerr" must be used before dlclose() */
+ if (dlerr != NULL)
+! semsg(_("dlerror = \"%s\""), dlerr);
+
+ /* Free the DLL module. */
+ (void)dlclose(hinstLib);
+***************
+*** 7461,7467 ****
+
+ if (!success)
+ {
+! EMSG2(_(e_libcall), funcname);
+ return FAIL;
+ }
+
+--- 7461,7467 ----
+
+ if (!success)
+ {
+! semsg(_(e_libcall), funcname);
+ return FAIL;
+ }
+
+*** ../vim-8.1.0742/src/os_win32.c 2018-12-21 16:04:16.320437461 +0100
+--- src/os_win32.c 2019-01-13 19:56:23.834013773 +0100
+***************
+*** 633,639 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! EMSG2(_(e_loadlib), GETTEXT_DLL);
+ verbose_leave();
+ }
+ return 0;
+--- 633,639 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! semsg(_(e_loadlib), GETTEXT_DLL);
+ verbose_leave();
+ }
+ return 0;
+***************
+*** 648,654 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! EMSG2(_(e_loadfunc), libintl_entry[i].name);
+ verbose_leave();
+ }
+ return 0;
+--- 648,654 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! semsg(_(e_loadfunc), libintl_entry[i].name);
+ verbose_leave();
+ }
+ return 0;
+***************
+*** 5182,5188 ****
+ {
+ x = -1;
+ #ifdef FEAT_GUI_W32
+! EMSG(_("E371: Command not found"));
+ #endif
+ }
+
+--- 5182,5188 ----
+ {
+ x = -1;
+ #ifdef FEAT_GUI_W32
+! emsg(_("E371: Command not found"));
+ #endif
+ }
+
+***************
+*** 5260,5266 ****
+ #endif
+ )
+ {
+! smsg((char_u *)_("shell returned %d"), x);
+ msg_putchar('\n');
+ }
+ #ifdef FEAT_TITLE
+--- 5260,5266 ----
+ #endif
+ )
+ {
+! smsg(_("shell returned %d"), x);
+ msg_putchar('\n');
+ }
+ #ifdef FEAT_TITLE
+***************
+*** 5489,5495 ****
+ &saAttr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL);
+ if (ifd[0] == INVALID_HANDLE_VALUE)
+ {
+! EMSG2(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+--- 5489,5495 ----
+ &saAttr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL);
+ if (ifd[0] == INVALID_HANDLE_VALUE)
+ {
+! semsg(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+***************
+*** 5507,5513 ****
+ &saAttr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL);
+ if (ofd[1] == INVALID_HANDLE_VALUE)
+ {
+! EMSG2(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+--- 5507,5513 ----
+ &saAttr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL);
+ if (ofd[1] == INVALID_HANDLE_VALUE)
+ {
+! semsg(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+***************
+*** 5525,5531 ****
+ &saAttr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL);
+ if (efd[1] == INVALID_HANDLE_VALUE)
+ {
+! EMSG2(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+--- 5525,5531 ----
+ &saAttr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL);
+ if (efd[1] == INVALID_HANDLE_VALUE)
+ {
+! semsg(_(e_notopen), fname);
+ goto failed;
+ }
+ }
+*** ../vim-8.1.0742/src/popupmnu.c 2019-01-06 13:10:46.328499104 +0100
+--- src/popupmnu.c 2019-01-13 19:27:43.432613941 +0100
+***************
+*** 1199,1205 ****
+ // pum_size being zero.
+ if (pum_size <= 0)
+ {
+! EMSG(e_menuothermode);
+ return;
+ }
+
+--- 1199,1205 ----
+ // pum_size being zero.
+ if (pum_size <= 0)
+ {
+! emsg(e_menuothermode);
+ return;
+ }
+
+*** ../vim-8.1.0742/src/proto.h 2019-01-12 22:47:01.264088074 +0100
+--- src/proto.h 2019-01-13 19:27:43.432613941 +0100
+***************
+*** 108,132 ****
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg(char_u *, ...);
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr(int, char_u *, ...);
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr_keep(int, char_u *, ...);
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! vim_snprintf_add(char *, size_t, char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 3, 4)))
+ #endif
+--- 108,132 ----
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg(const char *, ...);
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr(int, const char *, ...);
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr_keep(int, const char *, ...);
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! vim_snprintf_add(char *, size_t, const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 3, 4)))
+ #endif
+***************
+*** 136,149 ****
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! vim_snprintf(char *, size_t, char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 3, 4)))
+ #endif
+ ;
+
+! int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap);
+! int vim_vsnprintf_typval(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs);
+
+ # include "message.pro"
+ # include "misc1.pro"
+--- 136,149 ----
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! vim_snprintf(char *, size_t, const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 3, 4)))
+ #endif
+ ;
+
+! int vim_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
+! int vim_vsnprintf_typval(char *str, size_t str_m, const char *fmt, va_list ap, typval_T *tvs);
+
+ # include "message.pro"
+ # include "misc1.pro"
+*** ../vim-8.1.0742/src/proto/buffer.pro 2019-01-01 13:20:05.940711222 +0100
+--- src/proto/buffer.pro 2019-01-13 22:46:17.263080785 +0100
+***************
+*** 8,14 ****
+ void buf_freeall(buf_T *buf, int flags);
+ void goto_buffer(exarg_T *eap, int start, int dir, int count);
+ void handle_swap_exists(bufref_T *old_curbuf);
+! char_u *do_bufdel(int command, char_u *arg, int addr_count, int start_bnr, int end_bnr, int forceit);
+ int do_buffer(int action, int start, int dir, int count, int forceit);
+ void set_curbuf(buf_T *buf, int action);
+ void enter_buffer(buf_T *buf);
+--- 8,14 ----
+ void buf_freeall(buf_T *buf, int flags);
+ void goto_buffer(exarg_T *eap, int start, int dir, int count);
+ void handle_swap_exists(bufref_T *old_curbuf);
+! char *do_bufdel(int command, char_u *arg, int addr_count, int start_bnr, int end_bnr, int forceit);
+ int do_buffer(int action, int start, int dir, int count, int forceit);
+ void set_curbuf(buf_T *buf, int action);
+ void enter_buffer(buf_T *buf);
+*** ../vim-8.1.0742/src/proto/digraph.pro 2018-12-14 18:52:57.169528762 +0100
+--- src/proto/digraph.pro 2019-01-13 20:13:03.721965113 +0100
+***************
+*** 5,11 ****
+ int getdigraph(int char1, int char2, int meta_char);
+ void putdigraph(char_u *str);
+ void listdigraphs(int use_headers);
+! char_u *keymap_init(void);
+ void ex_loadkeymap(exarg_T *eap);
+ void keymap_clear(garray_T *kmap);
+ /* vim: set ft=c : */
+--- 5,11 ----
+ int getdigraph(int char1, int char2, int meta_char);
+ void putdigraph(char_u *str);
+ void listdigraphs(int use_headers);
+! char *keymap_init(void);
+ void ex_loadkeymap(exarg_T *eap);
+ void keymap_clear(garray_T *kmap);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0742/src/proto/ex_docmd.pro 2018-10-02 16:23:55.323037143 +0200
+--- src/proto/ex_docmd.pro 2019-01-13 20:23:38.337025724 +0100
+***************
+*** 4,18 ****
+ 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 silent);
+ int checkforcmd(char_u **pp, char *cmd, int len);
+ int modifier_len(char_u *cmd);
+ int cmd_exists(char_u *name);
+ char_u *set_one_cmd_context(expand_T *xp, char_u *buff);
+ char_u *skip_range(char_u *cmd, int *ctx);
+ void ex_ni(exarg_T *eap);
+! int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp);
+ void separate_nextcmd(exarg_T *eap);
+ int get_bad_opt(char_u *p, exarg_T *eap);
+ int ends_excmd(int c);
+--- 4,18 ----
+ 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 **errormsg, int skip_only);
+! int parse_cmd_address(exarg_T *eap, char **errormsg, int silent);
+ int checkforcmd(char_u **pp, char *cmd, int len);
+ int modifier_len(char_u *cmd);
+ int cmd_exists(char_u *name);
+ char_u *set_one_cmd_context(expand_T *xp, char_u *buff);
+ char_u *skip_range(char_u *cmd, int *ctx);
+ void ex_ni(exarg_T *eap);
+! int expand_filename(exarg_T *eap, char_u **cmdlinep, char **errormsgp);
+ void separate_nextcmd(exarg_T *eap);
+ int get_bad_opt(char_u *p, exarg_T *eap);
+ int ends_excmd(int c);
+***************
+*** 61,67 ****
+ 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);
+ int put_eol(FILE *fd);
+ int put_line(FILE *fd, char *s);
+--- 61,67 ----
+ 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 **errormsg, int *escaped);
+ char_u *expand_sfile(char_u *arg);
+ int put_eol(FILE *fd);
+ int put_line(FILE *fd, char *s);
+*** ../vim-8.1.0742/src/proto/ex_eval.pro 2018-05-17 13:52:34.000000000 +0200
+--- src/proto/ex_eval.pro 2019-01-13 22:53:40.539908765 +0100
+***************
+*** 7,13 ****
+ void free_global_msglist(void);
+ void do_errthrow(struct condstack *cstack, char_u *cmdname);
+ int do_intthrow(struct condstack *cstack);
+! char_u *get_exception_string(void *value, except_type_T type, char_u *cmdname, int *should_free);
+ void discard_current_exception(void);
+ void report_make_pending(int pending, void *value);
+ void report_resume_pending(int pending, void *value);
+--- 7,13 ----
+ void free_global_msglist(void);
+ void do_errthrow(struct condstack *cstack, char_u *cmdname);
+ int do_intthrow(struct condstack *cstack);
+! char *get_exception_string(void *value, except_type_T type, char_u *cmdname, int *should_free);
+ void discard_current_exception(void);
+ void report_make_pending(int pending, void *value);
+ void report_resume_pending(int pending, void *value);
+*** ../vim-8.1.0742/src/proto/ex_getln.pro 2018-12-18 21:56:25.084495836 +0100
+--- src/proto/ex_getln.pro 2019-01-13 22:59:13.405579368 +0100
+***************
+*** 4,10 ****
+ char_u *getcmdline_prompt(int firstc, char_u *prompt, int attr, int xp_context, char_u *xp_arg);
+ int text_locked(void);
+ void text_locked_msg(void);
+! char_u *get_text_locked_msg(void);
+ int curbuf_locked(void);
+ int allbuf_locked(void);
+ char_u *getexline(int c, void *cookie, int indent);
+--- 4,10 ----
+ char_u *getcmdline_prompt(int firstc, char_u *prompt, int attr, int xp_context, char_u *xp_arg);
+ int text_locked(void);
+ void text_locked_msg(void);
+! char *get_text_locked_msg(void);
+ int curbuf_locked(void);
+ int allbuf_locked(void);
+ char_u *getexline(int c, void *cookie, int indent);
+*** ../vim-8.1.0742/src/proto/hardcopy.pro 2018-09-13 17:26:31.091401618 +0200
+--- src/proto/hardcopy.pro 2019-01-13 20:18:29.391424616 +0100
+***************
+*** 1,6 ****
+ /* hardcopy.c */
+! char_u *parse_printoptions(void);
+! char_u *parse_printmbfont(void);
+ int prt_header_height(void);
+ int prt_use_number(void);
+ int prt_get_unit(int idx);
+--- 1,6 ----
+ /* hardcopy.c */
+! char *parse_printoptions(void);
+! char *parse_printmbfont(void);
+ int prt_header_height(void);
+ int prt_use_number(void);
+ int prt_get_unit(int idx);
+*** ../vim-8.1.0742/src/proto/mbyte.pro 2018-05-17 13:52:43.000000000 +0200
+--- src/proto/mbyte.pro 2019-01-13 20:12:33.254203719 +0100
+***************
+*** 1,6 ****
+ /* mbyte.c */
+ int enc_canon_props(char_u *name);
+! char_u *mb_init(void);
+ int bomb_size(void);
+ void remove_bom(char_u *s);
+ int mb_get_class(char_u *p);
+--- 1,6 ----
+ /* mbyte.c */
+ int enc_canon_props(char_u *name);
+! char *mb_init(void);
+ int bomb_size(void);
+ void remove_bom(char_u *s);
+ int mb_get_class(char_u *p);
+*** ../vim-8.1.0742/src/proto/message.pro 2018-05-17 13:52:45.000000000 +0200
+--- src/proto/message.pro 2019-01-13 19:44:21.016778813 +0100
+***************
+*** 10,22 ****
+ int emsg_not_now(void);
+ void ignore_error_for_testing(char_u *error);
+ void do_perror(char *msg);
+! int emsg(char_u *s);
+! int emsg2(char_u *s, char_u *a1);
+! int emsg3(char_u *s, char_u *a1, char_u *a2);
+! int emsgn(char_u *s, long n);
+! void iemsg(char_u *s);
+! void iemsg2(char_u *s, char_u *a1);
+! void iemsgn(char_u *s, long n);
+ void internal_error(char *where);
+ void emsg_invreg(int name);
+ char_u *msg_trunc_attr(char_u *s, int force, int attr);
+--- 10,19 ----
+ int emsg_not_now(void);
+ void ignore_error_for_testing(char_u *error);
+ void do_perror(char *msg);
+! int emsg(char *s);
+! int semsg(const char *s, ...);
+! void iemsg(char *s);
+! void siemsg(const char *s, ...);
+ void internal_error(char *where);
+ void emsg_invreg(int name);
+ char_u *msg_trunc_attr(char_u *s, int force, int attr);
+*** ../vim-8.1.0742/src/proto/misc2.pro 2019-01-11 16:15:57.891171040 +0100
+--- src/proto/misc2.pro 2019-01-13 20:17:06.076073097 +0100
+***************
+*** 87,93 ****
+ int same_directory(char_u *f1, char_u *f2);
+ int vim_chdirfile(char_u *fname, char *trigger_autocmd);
+ int vim_stat(const char *name, stat_T *stp);
+! char_u *parse_shape_opt(int what);
+ int get_shape_idx(int mouse);
+ void update_mouseshape(int shape_idx);
+ void *vim_findfile_init(char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname);
+--- 87,93 ----
+ int same_directory(char_u *f1, char_u *f2);
+ int vim_chdirfile(char_u *fname, char *trigger_autocmd);
+ int vim_stat(const char *name, stat_T *stp);
+! char *parse_shape_opt(int what);
+ int get_shape_idx(int mouse);
+ void update_mouseshape(int shape_idx);
+ void *vim_findfile_init(char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname);
+*** ../vim-8.1.0742/src/proto/option.pro 2018-11-22 03:07:30.948596188 +0100
+--- src/proto/option.pro 2019-01-13 23:05:48.282800884 +0100
+***************
+*** 21,33 ****
+ 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);
+! char_u *set_option_value(char_u *name, long number, char_u *string, int opt_flags);
+ char_u *get_term_code(char_u *tname);
+ char_u *get_highlight_default(void);
+ char_u *get_encoding_default(void);
+--- 21,33 ----
+ 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 *check_colorcolumn(win_T *wp);
+! char *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);
+! char *set_option_value(char_u *name, long number, char_u *string, int opt_flags);
+ char_u *get_term_code(char_u *tname);
+ char_u *get_highlight_default(void);
+ char_u *get_encoding_default(void);
+*** ../vim-8.1.0742/src/proto/spell.pro 2018-05-17 13:52:51.000000000 +0200
+--- src/proto/spell.pro 2019-01-13 23:02:21.472273624 +0100
+***************
+*** 10,16 ****
+ void count_common_word(slang_T *lp, char_u *word, int len, int count);
+ int byte_in_str(char_u *str, int n);
+ int init_syl_tab(slang_T *slang);
+! char_u *did_set_spelllang(win_T *wp);
+ int captype(char_u *word, char_u *end);
+ void spell_delete_wordlist(void);
+ void spell_free_all(void);
+--- 10,16 ----
+ void count_common_word(slang_T *lp, char_u *word, int len, int count);
+ int byte_in_str(char_u *str, int n);
+ int init_syl_tab(slang_T *slang);
+! char *did_set_spelllang(win_T *wp);
+ int captype(char_u *word, char_u *end);
+ void spell_delete_wordlist(void);
+ void spell_free_all(void);
+*** ../vim-8.1.0742/src/quickfix.c 2019-01-11 14:49:25.380107431 +0100
+--- src/quickfix.c 2019-01-13 23:12:52.299190164 +0100
+***************
+*** 239,255 ****
+ 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
+--- 239,252 ----
+ char_u *regpat,
+ efm_T *efminfo,
+ int idx,
+! int round)
+ {
+ char_u *srcptr;
+
+ if (efminfo->addr[idx])
+ {
+ // Each errorformat pattern can occur only once
+! semsg(_("E372: Too many %%%c in format string"), *efmpat);
+ return NULL;
+ }
+ if ((idx && idx < 6
+***************
+*** 257,265 ****
+ || (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;
+--- 254,260 ----
+ || (idx == 6
+ && vim_strchr((char_u *)"OPQ", efminfo->prefix) == NULL))
+ {
+! semsg(_("E373: Unexpected %%%c in format string"), *efmpat);
+ return NULL;
+ }
+ efminfo->addr[idx] = (char_u)++round;
+***************
+*** 316,323 ****
+ char_u **pefmp,
+ char_u *efm,
+ int len,
+! char_u *regpat,
+! char_u *errmsg)
+ {
+ char_u *efmp = *pefmp;
+
+--- 311,317 ----
+ char_u **pefmp,
+ char_u *efm,
+ int len,
+! char_u *regpat)
+ {
+ char_u *efmp = *pefmp;
+
+***************
+*** 335,341 ****
+ // skip ;
+ if (efmp == efm + len)
+ {
+! EMSG(_("E374: Missing ] in format string"));
+ return NULL;
+ }
+ }
+--- 329,335 ----
+ // skip ;
+ if (efmp == efm + len)
+ {
+! emsg(_("E374: Missing ] in format string"));
+ return NULL;
+ }
+ }
+***************
+*** 348,356 ****
+ else
+ {
+ // TODO: scanf()-like: %*ud, %*3c, %*f, ... ?
+! sprintf((char *)errmsg,
+! _("E375: Unsupported %%%c in format string"), *efmp);
+! EMSG(errmsg);
+ return NULL;
+ }
+
+--- 342,348 ----
+ else
+ {
+ // TODO: scanf()-like: %*ud, %*3c, %*f, ... ?
+! semsg(_("E375: Unsupported %%%c in format string"), *efmp);
+ return NULL;
+ }
+
+***************
+*** 363,369 ****
+ * 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++;
+--- 355,361 ----
+ * Analyze/parse an errorformat prefix.
+ */
+ static char_u *
+! efm_analyze_prefix(char_u *efmp, efm_T *efminfo)
+ {
+ if (vim_strchr((char_u *)"+-", *efmp) != NULL)
+ efminfo->flags = *efmp++;
+***************
+*** 371,379 ****
+ efminfo->prefix = *efmp;
+ else
+ {
+! sprintf((char *)errmsg,
+! _("E376: Invalid %%%c in format string prefix"), *efmp);
+! EMSG(errmsg);
+ return NULL;
+ }
+
+--- 363,369 ----
+ efminfo->prefix = *efmp;
+ else
+ {
+! semsg(_("E376: Invalid %%%c in format string prefix"), *efmp);
+ return NULL;
+ }
+
+***************
+*** 391,398 ****
+ char_u *efm,
+ int len,
+ efm_T *fmt_ptr,
+! char_u *regpat,
+! char_u *errmsg)
+ {
+ char_u *ptr;
+ char_u *efmp;
+--- 381,387 ----
+ char_u *efm,
+ int len,
+ efm_T *fmt_ptr,
+! char_u *regpat)
+ {
+ char_u *ptr;
+ char_u *efmp;
+***************
+*** 413,420 ****
+ break;
+ if (idx < FMT_PATTERNS)
+ {
+! ptr = efmpat_to_regpat(efmp, ptr, fmt_ptr, idx, round,
+! errmsg);
+ if (ptr == NULL)
+ return FAIL;
+ round++;
+--- 402,408 ----
+ break;
+ if (idx < FMT_PATTERNS)
+ {
+! ptr = efmpat_to_regpat(efmp, ptr, fmt_ptr, idx, round);
+ if (ptr == NULL)
+ return FAIL;
+ round++;
+***************
+*** 422,428 ****
+ else if (*efmp == '*')
+ {
+ ++efmp;
+! ptr = scanf_fmt_to_regpat(&efmp, efm, len, ptr, errmsg);
+ if (ptr == NULL)
+ return FAIL;
+ }
+--- 410,416 ----
+ else if (*efmp == '*')
+ {
+ ++efmp;
+! ptr = scanf_fmt_to_regpat(&efmp, efm, len, ptr);
+ if (ptr == NULL)
+ return FAIL;
+ }
+***************
+*** 436,450 ****
+ {
+ // 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;
+ }
+ }
+--- 424,436 ----
+ {
+ // prefix is allowed only at the beginning of the errorformat
+ // option part
+! efmp = efm_analyze_prefix(efmp, fmt_ptr);
+ if (efmp == NULL)
+ return FAIL;
+ }
+ else
+ {
+! semsg(_("E377: Invalid %%%c in format string"), *efmp);
+ return FAIL;
+ }
+ }
+***************
+*** 526,533 ****
+ static efm_T *
+ parse_efm_option(char_u *efm)
+ {
+- char_u *errmsg = NULL;
+- int errmsglen;
+ efm_T *fmt_ptr = NULL;
+ efm_T *fmt_first = NULL;
+ efm_T *fmt_last = NULL;
+--- 512,517 ----
+***************
+*** 535,545 ****
+ int len;
+ int sz;
+
+- errmsglen = CMDBUFFSIZE + 1;
+- errmsg = alloc_id(errmsglen, aid_qf_errmsg);
+- 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.
+
+--- 519,524 ----
+***************
+*** 563,569 ****
+ // 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;
+--- 542,548 ----
+ // Isolate one part in the 'errorformat' option
+ len = efm_option_part_len(efm);
+
+! if (efm_to_regpat(efm, len, fmt_ptr, fmtstr) == FAIL)
+ goto parse_efm_error;
+ if ((fmt_ptr->prog = vim_regcomp(fmtstr, RE_MAGIC + RE_STRING)) == NULL)
+ goto parse_efm_error;
+***************
+*** 572,578 ****
+ }
+
+ if (fmt_first == NULL) // nothing found
+! EMSG(_("E378: 'errorformat' contains no pattern"));
+
+ goto parse_efm_end;
+
+--- 551,557 ----
+ }
+
+ if (fmt_first == NULL) // nothing found
+! emsg(_("E378: 'errorformat' contains no pattern"));
+
+ goto parse_efm_end;
+
+***************
+*** 581,587 ****
+
+ parse_efm_end:
+ vim_free(fmtstr);
+- vim_free(errmsg);
+
+ return fmt_first;
+ }
+--- 560,565 ----
+***************
+*** 1271,1277 ****
+ {
+ if (*fields->namebuf == NUL)
+ {
+! EMSG(_("E379: Missing or empty directory name"));
+ return QF_FAIL;
+ }
+ qfl->qf_directory =
+--- 1249,1255 ----
+ {
+ if (*fields->namebuf == NUL)
+ {
+! emsg(_("E379: Missing or empty directory name"));
+ return QF_FAIL;
+ }
+ qfl->qf_directory =
+***************
+*** 1568,1574 ****
+
+ if (efile != NULL && (pstate->fd = mch_fopen((char *)efile, "r")) == NULL)
+ {
+! EMSG2(_(e_openerrf), efile);
+ return FAIL;
+ }
+
+--- 1546,1552 ----
+
+ if (efile != NULL && (pstate->fd = mch_fopen((char *)efile, "r")) == NULL)
+ {
+! semsg(_(e_openerrf), efile);
+ return FAIL;
+ }
+
+***************
+*** 1751,1757 ****
+ retval = qfl->qf_count;
+ goto qf_init_end;
+ }
+! EMSG(_(e_readerrf));
+ error2:
+ if (!adding)
+ {
+--- 1729,1735 ----
+ retval = qfl->qf_count;
+ goto qf_init_end;
+ }
+! emsg(_(e_readerrf));
+ error2:
+ if (!adding)
+ {
+***************
+*** 1968,1974 ****
+ #ifdef ABORT_ON_INTERNAL_ERROR
+ if (quickfix_busy < 0)
+ {
+! EMSG("quickfix_busy has become negative");
+ abort();
+ }
+ #endif
+--- 1946,1952 ----
+ #ifdef ABORT_ON_INTERNAL_ERROR
+ if (quickfix_busy < 0)
+ {
+! emsg("quickfix_busy has become negative");
+ abort();
+ }
+ #endif
+***************
+*** 1980,1986 ****
+ {
+ if (quickfix_busy != 0)
+ {
+! EMSGN("quickfix_busy not zero on exit: %ld", (long)quickfix_busy);
+ # ifdef ABORT_ON_INTERNAL_ERROR
+ abort();
+ # endif
+--- 1958,1964 ----
+ {
+ if (quickfix_busy != 0)
+ {
+! semsg("quickfix_busy not zero on exit: %ld", (long)quickfix_busy);
+ # ifdef ABORT_ON_INTERNAL_ERROR
+ abort();
+ # endif
+***************
+*** 2635,2641 ****
+ qf_idx = prev_index;
+ if (err != NULL)
+ {
+! EMSG(_(err));
+ return NULL;
+ }
+ break;
+--- 2613,2619 ----
+ qf_idx = prev_index;
+ if (err != NULL)
+ {
+! emsg(_(err));
+ return NULL;
+ }
+ break;
+***************
+*** 3041,3054 ****
+ // 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;
+ }
+
+--- 3019,3032 ----
+ // 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;
+ }
+
+***************
+*** 3056,3064 ****
+ || !is_qf_entry_present(qfl, qf_ptr))
+ {
+ if (qfl_type == QFLT_QUICKFIX)
+! EMSG(_("E925: Current quickfix was changed"));
+ else
+! EMSG(_(e_loc_list_changed));
+ return NOTDONE;
+ }
+
+--- 3034,3042 ----
+ || !is_qf_entry_present(qfl, qf_ptr))
+ {
+ if (qfl_type == QFLT_QUICKFIX)
+! emsg(_("E925: Current quickfix was changed"));
+ else
+! emsg(_(e_loc_list_changed));
+ return NOTDONE;
+ }
+
+***************
+*** 3315,3321 ****
+
+ if (qf_stack_empty(qi) || qf_list_empty(qi, qi->qf_curlist))
+ {
+! EMSG(_(e_quickfix));
+ return;
+ }
+
+--- 3293,3299 ----
+
+ if (qf_stack_empty(qi) || qf_list_empty(qi, qi->qf_curlist))
+ {
+! emsg(_(e_quickfix));
+ return;
+ }
+
+***************
+*** 3497,3510 ****
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! EMSG(_(e_loclist));
+ return;
+ }
+ }
+
+ if (qf_stack_empty(qi) || qf_list_empty(qi, qi->qf_curlist))
+ {
+! EMSG(_(e_quickfix));
+ return;
+ }
+ if (*arg == '+')
+--- 3475,3488 ----
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! emsg(_(e_loclist));
+ return;
+ }
+ }
+
+ if (qf_stack_empty(qi) || qf_list_empty(qi, qi->qf_curlist))
+ {
+! emsg(_(e_quickfix));
+ return;
+ }
+ if (*arg == '+')
+***************
+*** 3514,3520 ****
+ }
+ if (!get_list_range(&arg, &idx1, &idx2) || *arg != NUL)
+ {
+! EMSG(_(e_trailing));
+ return;
+ }
+ qfl = &qi->qf_lists[qi->qf_curlist];
+--- 3492,3498 ----
+ }
+ if (!get_list_range(&arg, &idx1, &idx2) || *arg != NUL)
+ {
+! emsg(_(e_trailing));
+ return;
+ }
+ qfl = &qi->qf_lists[qi->qf_curlist];
+***************
+*** 3643,3649 ****
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! EMSG(_(e_loclist));
+ return;
+ }
+ }
+--- 3621,3627 ----
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! emsg(_(e_loclist));
+ return;
+ }
+ }
+***************
+*** 3658,3664 ****
+ {
+ if (qi->qf_curlist == 0)
+ {
+! EMSG(_("E380: At bottom of quickfix stack"));
+ break;
+ }
+ --qi->qf_curlist;
+--- 3636,3642 ----
+ {
+ if (qi->qf_curlist == 0)
+ {
+! emsg(_("E380: At bottom of quickfix stack"));
+ break;
+ }
+ --qi->qf_curlist;
+***************
+*** 3667,3673 ****
+ {
+ if (qi->qf_curlist >= qi->qf_listcount - 1)
+ {
+! EMSG(_("E381: At top of quickfix stack"));
+ break;
+ }
+ ++qi->qf_curlist;
+--- 3645,3651 ----
+ {
+ if (qi->qf_curlist >= qi->qf_listcount - 1)
+ {
+! emsg(_("E381: At top of quickfix stack"));
+ break;
+ }
+ ++qi->qf_curlist;
+***************
+*** 3870,3876 ****
+
+ if (qf_list_empty(qi, qi->qf_curlist))
+ {
+! EMSG(_(e_quickfix));
+ return;
+ }
+
+--- 3848,3854 ----
+
+ if (qf_list_empty(qi, qi->qf_curlist))
+ {
+! emsg(_(e_quickfix));
+ return;
+ }
+
+***************
+*** 4081,4087 ****
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! EMSG(_(e_loclist));
+ return;
+ }
+ }
+--- 4059,4065 ----
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! emsg(_(e_loclist));
+ return;
+ }
+ }
+***************
+*** 4163,4169 ****
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! EMSG(_(e_loclist));
+ return;
+ }
+ }
+--- 4141,4147 ----
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! emsg(_(e_loclist));
+ return;
+ }
+ }
+***************
+*** 4609,4615 ****
+ {
+ name = vim_tempname('e', FALSE);
+ if (name == NULL)
+! EMSG(_(e_notmp));
+ return name;
+ }
+
+--- 4587,4593 ----
+ {
+ name = vim_tempname('e', FALSE);
+ if (name == NULL)
+! emsg(_(e_notmp));
+ return name;
+ }
+
+***************
+*** 4941,4947 ****
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! EMSG(_(e_loclist));
+ return;
+ }
+ }
+--- 4919,4925 ----
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! emsg(_(e_loclist));
+ return;
+ }
+ }
+***************
+*** 4992,4998 ****
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! EMSG(_(e_loclist));
+ return;
+ }
+ }
+--- 4970,4976 ----
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ {
+! emsg(_(e_loclist));
+ return;
+ }
+ }
+***************
+*** 5148,5154 ****
+ // Pattern is empty, use last search pattern.
+ if (last_search_pat() == NULL)
+ {
+! EMSG(_(e_noprevre));
+ return;
+ }
+ regmatch->regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
+--- 5126,5132 ----
+ // Pattern is empty, use last search pattern.
+ if (last_search_pat() == NULL)
+ {
+! emsg(_(e_noprevre));
+ return;
+ }
+ regmatch->regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
+***************
+*** 5238,5244 ****
+ if (wp != NULL)
+ {
+ // An autocmd has freed the location list.
+! EMSG(_(e_loc_list_changed));
+ return FALSE;
+ }
+ else
+--- 5216,5222 ----
+ if (wp != NULL)
+ {
+ // An autocmd has freed the location list.
+! emsg(_(e_loc_list_changed));
+ return FALSE;
+ }
+ else
+***************
+*** 5417,5423 ****
+ p = skip_vimgrep_pat(eap->arg, &s, &flags);
+ if (p == NULL)
+ {
+! EMSG(_(e_invalpat));
+ goto theend;
+ }
+
+--- 5395,5401 ----
+ p = skip_vimgrep_pat(eap->arg, &s, &flags);
+ if (p == NULL)
+ {
+! emsg(_(e_invalpat));
+ goto theend;
+ }
+
+***************
+*** 5428,5434 ****
+ p = skipwhite(p);
+ if (*p == NUL)
+ {
+! EMSG(_("E683: File name missing or invalid pattern"));
+ goto theend;
+ }
+
+--- 5406,5412 ----
+ p = skipwhite(p);
+ if (*p == NUL)
+ {
+! emsg(_("E683: File name missing or invalid pattern"));
+ goto theend;
+ }
+
+***************
+*** 5444,5450 ****
+ goto theend;
+ if (fcount == 0)
+ {
+! EMSG(_(e_nomatch));
+ goto theend;
+ }
+
+--- 5422,5428 ----
+ goto theend;
+ if (fcount == 0)
+ {
+! emsg(_(e_nomatch));
+ goto theend;
+ }
+
+***************
+*** 5505,5511 ****
+ if (buf == NULL)
+ {
+ if (!got_int)
+! smsg((char_u *)_("Cannot open file \"%s\""), fname);
+ }
+ else
+ {
+--- 5483,5489 ----
+ if (buf == NULL)
+ {
+ if (!got_int)
+! smsg(_("Cannot open file \"%s\""), fname);
+ }
+ else
+ {
+***************
+*** 5608,5614 ****
+ first_match_buf, target_dir);
+ }
+ else
+! EMSG2(_(e_nomatch2), s);
+
+ decr_quickfix_busy();
+
+--- 5586,5592 ----
+ first_match_buf, target_dir);
+ }
+ else
+! semsg(_(e_nomatch2), s);
+
+ decr_quickfix_busy();
+
+***************
+*** 6285,6291 ****
+ if (!did_bufnr_emsg)
+ {
+ did_bufnr_emsg = TRUE;
+! EMSGN(_("E92: Buffer %ld not found"), bufnum);
+ }
+ valid = FALSE;
+ bufnum = 0;
+--- 6263,6269 ----
+ if (!did_bufnr_emsg)
+ {
+ did_bufnr_emsg = TRUE;
+! semsg(_("E92: Buffer %ld not found"), bufnum);
+ }
+ valid = FALSE;
+ bufnum = 0;
+***************
+*** 6864,6872 ****
+ else if (*skipwhite(skipdigits(eap->arg)) == NUL)
+ buf = buflist_findnr(atoi((char *)eap->arg));
+ if (buf == NULL)
+! EMSG(_(e_invarg));
+ else if (buf->b_ml.ml_mfp == NULL)
+! EMSG(_("E681: Buffer is not loaded"));
+ else
+ {
+ if (eap->addr_count == 0)
+--- 6842,6850 ----
+ else if (*skipwhite(skipdigits(eap->arg)) == NUL)
+ buf = buflist_findnr(atoi((char *)eap->arg));
+ if (buf == NULL)
+! emsg(_(e_invarg));
+ else if (buf->b_ml.ml_mfp == NULL)
+! emsg(_("E681: Buffer is not loaded"));
+ else
+ {
+ if (eap->addr_count == 0)
+***************
+*** 6876,6882 ****
+ }
+ if (eap->line1 < 1 || eap->line1 > buf->b_ml.ml_line_count
+ || eap->line2 < 1 || eap->line2 > buf->b_ml.ml_line_count)
+! EMSG(_(e_invrange));
+ else
+ {
+ char_u *qf_title = qf_cmdtitle(*eap->cmdlinep);
+--- 6854,6860 ----
+ }
+ if (eap->line1 < 1 || eap->line1 > buf->b_ml.ml_line_count
+ || eap->line2 < 1 || eap->line2 > buf->b_ml.ml_line_count)
+! emsg(_(e_invrange));
+ else
+ {
+ char_u *qf_title = qf_cmdtitle(*eap->cmdlinep);
+***************
+*** 7011,7017 ****
+ decr_quickfix_busy();
+ }
+ else
+! EMSG(_("E777: String or List expected"));
+ cleanup:
+ free_tv(tv);
+ }
+--- 6989,6995 ----
+ decr_quickfix_busy();
+ }
+ else
+! emsg(_("E777: String or List expected"));
+ cleanup:
+ free_tv(tv);
+ }
+***************
+*** 7310,7316 ****
+ if (!qf_list_empty(qi, qi->qf_curlist))
+ qf_jump(qi, 0, 0, FALSE);
+ else
+! EMSG2(_(e_nomatch2), eap->arg);
+
+ decr_quickfix_busy();
+
+--- 7288,7294 ----
+ if (!qf_list_empty(qi, qi->qf_curlist))
+ qf_jump(qi, 0, 0, FALSE);
+ else
+! semsg(_(e_nomatch2), eap->arg);
+
+ decr_quickfix_busy();
+
+*** ../vim-8.1.0742/src/regexp.c 2019-01-01 22:18:59.808136916 +0100
+--- src/regexp.c 2019-01-13 23:14:56.250208631 +0100
+***************
+*** 334,344 ****
+
+ /* Used for an error (down from) vim_regcomp(): give the error message, set
+ * rc_did_emsg and return NULL */
+! #define EMSG_RET_NULL(m) return (EMSG(m), rc_did_emsg = TRUE, (void *)NULL)
+! #define IEMSG_RET_NULL(m) return (IEMSG(m), rc_did_emsg = TRUE, (void *)NULL)
+! #define EMSG_RET_FAIL(m) return (EMSG(m), rc_did_emsg = TRUE, FAIL)
+! #define EMSG2_RET_NULL(m, c) return (EMSG2((m), (c) ? "" : "\\"), rc_did_emsg = TRUE, (void *)NULL)
+! #define EMSG2_RET_FAIL(m, c) return (EMSG2((m), (c) ? "" : "\\"), rc_did_emsg = TRUE, FAIL)
+ #define EMSG_ONE_RET_NULL EMSG2_RET_NULL(_("E369: invalid item in %s%%[]"), reg_magic == MAGIC_ALL)
+
+
+--- 334,344 ----
+
+ /* Used for an error (down from) vim_regcomp(): give the error message, set
+ * rc_did_emsg and return NULL */
+! #define EMSG_RET_NULL(m) return (emsg((m)), rc_did_emsg = TRUE, (void *)NULL)
+! #define IEMSG_RET_NULL(m) return (iemsg((m)), rc_did_emsg = TRUE, (void *)NULL)
+! #define EMSG_RET_FAIL(m) return (emsg((m)), rc_did_emsg = TRUE, FAIL)
+! #define EMSG2_RET_NULL(m, c) return (semsg((const char *)(m), (c) ? "" : "\\"), rc_did_emsg = TRUE, (void *)NULL)
+! #define EMSG2_RET_FAIL(m, c) return (semsg((const char *)(m), (c) ? "" : "\\"), rc_did_emsg = TRUE, FAIL)
+ #define EMSG_ONE_RET_NULL EMSG2_RET_NULL(_("E369: invalid item in %s%%[]"), reg_magic == MAGIC_ALL)
+
+
+***************
+*** 1304,1310 ****
+ break;
+ if (*p == NUL)
+ {
+! EMSG(_("E65: Illegal back reference"));
+ rc_did_emsg = TRUE;
+ return FALSE;
+ }
+--- 1304,1310 ----
+ break;
+ if (*p == NUL)
+ {
+! emsg(_("E65: Illegal back reference"));
+ rc_did_emsg = TRUE;
+ return FALSE;
+ }
+***************
+*** 1902,1908 ****
+ else
+ sprintf((char *)IObuff, _("E62: Nested %s%c"),
+ reg_magic == MAGIC_ALL ? "" : "\\", no_Magic(peekchr()));
+! EMSG_RET_NULL(IObuff);
+ }
+
+ return ret;
+--- 1902,1908 ----
+ else
+ sprintf((char *)IObuff, _("E62: Nested %s%c"),
+ reg_magic == MAGIC_ALL ? "" : "\\", no_Magic(peekchr()));
+! EMSG_RET_NULL((char *)IObuff);
+ }
+
+ return ret;
+***************
+*** 2078,2084 ****
+ sprintf((char *)IObuff, _("E64: %s%c follows nothing"),
+ (c == '*' ? reg_magic >= MAGIC_ON : reg_magic == MAGIC_ALL)
+ ? "" : "\\", c);
+! EMSG_RET_NULL(IObuff);
+ /* NOTREACHED */
+
+ case Magic('~'): /* previous substitute pattern */
+--- 2078,2084 ----
+ sprintf((char *)IObuff, _("E64: %s%c follows nothing"),
+ (c == '*' ? reg_magic >= MAGIC_ON : reg_magic == MAGIC_ALL)
+ ? "" : "\\", c);
+! EMSG_RET_NULL((char *)IObuff);
+ /* NOTREACHED */
+
+ case Magic('~'): /* previous substitute pattern */
+***************
+*** 3406,3412 ****
+ {
+ sprintf((char *)IObuff, _("E554: Syntax error in %s{...}"),
+ reg_magic == MAGIC_ALL ? "" : "\\");
+! EMSG_RET_FAIL(IObuff);
+ }
+
+ /*
+--- 3406,3412 ----
+ {
+ sprintf((char *)IObuff, _("E554: Syntax error in %s{...}"),
+ reg_magic == MAGIC_ALL ? "" : "\\");
+! EMSG_RET_FAIL((char *)IObuff);
+ }
+
+ /*
+***************
+*** 3826,3832 ****
+ /* Be paranoid... */
+ if (prog == NULL || line == NULL)
+ {
+! EMSG(_(e_null));
+ goto theend;
+ }
+
+--- 3826,3832 ----
+ /* Be paranoid... */
+ if (prog == NULL || line == NULL)
+ {
+! emsg(_(e_null));
+ goto theend;
+ }
+
+***************
+*** 5241,5247 ****
+ * a regstar_T on the regstack. */
+ if ((long)((unsigned)regstack.ga_len >> 10) >= p_mmp)
+ {
+! EMSG(_(e_maxmempat));
+ status = RA_FAIL;
+ }
+ else if (ga_grow(&regstack, sizeof(regstar_T)) == FAIL)
+--- 5241,5247 ----
+ * a regstar_T on the regstack. */
+ if ((long)((unsigned)regstack.ga_len >> 10) >= p_mmp)
+ {
+! emsg(_(e_maxmempat));
+ status = RA_FAIL;
+ }
+ else if (ga_grow(&regstack, sizeof(regstar_T)) == FAIL)
+***************
+*** 5286,5292 ****
+ /* Need a bit of room to store extra positions. */
+ if ((long)((unsigned)regstack.ga_len >> 10) >= p_mmp)
+ {
+! EMSG(_(e_maxmempat));
+ status = RA_FAIL;
+ }
+ else if (ga_grow(&regstack, sizeof(regbehind_T)) == FAIL)
+--- 5286,5292 ----
+ /* Need a bit of room to store extra positions. */
+ if ((long)((unsigned)regstack.ga_len >> 10) >= p_mmp)
+ {
+! emsg(_(e_maxmempat));
+ status = RA_FAIL;
+ }
+ else if (ga_grow(&regstack, sizeof(regbehind_T)) == FAIL)
+***************
+*** 5338,5344 ****
+ break;
+
+ default:
+! EMSG(_(e_re_corr));
+ #ifdef DEBUG
+ printf("Illegal op code %d\n", op);
+ #endif
+--- 5338,5344 ----
+ break;
+
+ default:
+! emsg(_(e_re_corr));
+ #ifdef DEBUG
+ printf("Illegal op code %d\n", op);
+ #endif
+***************
+*** 5748,5754 ****
+ * We get here only if there's trouble -- normally "case END" is
+ * the terminating point.
+ */
+! EMSG(_(e_re_corr));
+ #ifdef DEBUG
+ printf("Premature EOL\n");
+ #endif
+--- 5748,5754 ----
+ * We get here only if there's trouble -- normally "case END" is
+ * the terminating point.
+ */
+! emsg(_(e_re_corr));
+ #ifdef DEBUG
+ printf("Premature EOL\n");
+ #endif
+***************
+*** 5772,5778 ****
+
+ if ((long)((unsigned)regstack.ga_len >> 10) >= p_mmp)
+ {
+! EMSG(_(e_maxmempat));
+ return NULL;
+ }
+ if (ga_grow(&regstack, sizeof(regitem_T)) == FAIL)
+--- 5772,5778 ----
+
+ if ((long)((unsigned)regstack.ga_len >> 10) >= p_mmp)
+ {
+! emsg(_(e_maxmempat));
+ return NULL;
+ }
+ if (ga_grow(&regstack, sizeof(regitem_T)) == FAIL)
+***************
+*** 6185,6191 ****
+ break;
+
+ default: /* Oh dear. Called inappropriately. */
+! EMSG(_(e_re_corr));
+ #ifdef DEBUG
+ printf("Called regrepeat with op code %d\n", OP(p));
+ #endif
+--- 6185,6191 ----
+ break;
+
+ default: /* Oh dear. Called inappropriately. */
+! emsg(_(e_re_corr));
+ #ifdef DEBUG
+ printf("Called regrepeat with op code %d\n", OP(p));
+ #endif
+***************
+*** 6236,6242 ****
+
+ if (UCHARAT(((bt_regprog_T *)prog)->program) != REGMAGIC)
+ {
+! EMSG(_(e_re_corr));
+ return TRUE;
+ }
+ return FALSE;
+--- 6236,6242 ----
+
+ if (UCHARAT(((bt_regprog_T *)prog)->program) != REGMAGIC)
+ {
+! emsg(_(e_re_corr));
+ return TRUE;
+ }
+ return FALSE;
+***************
+*** 7487,7493 ****
+ /* Be paranoid... */
+ if ((source == NULL && expr == NULL) || dest == NULL)
+ {
+! EMSG(_(e_null));
+ return 0;
+ }
+ if (prog_magic_wrong())
+--- 7487,7493 ----
+ /* Be paranoid... */
+ if ((source == NULL && expr == NULL) || dest == NULL)
+ {
+! emsg(_(e_null));
+ return 0;
+ }
+ if (prog_magic_wrong())
+***************
+*** 7790,7796 ****
+ else if (*s == NUL) /* we hit NUL. */
+ {
+ if (copy)
+! EMSG(_(e_re_damg));
+ goto exit;
+ }
+ else
+--- 7790,7796 ----
+ else if (*s == NUL) /* we hit NUL. */
+ {
+ if (copy)
+! emsg(_(e_re_damg));
+ goto exit;
+ }
+ else
+***************
+*** 8120,8132 ****
+ regexp_engine = expr[4] - '0';
+ expr += 5;
+ #ifdef DEBUG
+! smsg((char_u *)"New regexp mode selected (%d): %s",
+ regexp_engine, regname[newengine]);
+ #endif
+ }
+ else
+ {
+! EMSG(_("E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be used "));
+ regexp_engine = AUTOMATIC_ENGINE;
+ }
+ }
+--- 8120,8132 ----
+ regexp_engine = expr[4] - '0';
+ expr += 5;
+ #ifdef DEBUG
+! smsg("New regexp mode selected (%d): %s",
+ regexp_engine, regname[newengine]);
+ #endif
+ }
+ else
+ {
+! emsg(_("E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be used "));
+ regexp_engine = AUTOMATIC_ENGINE;
+ }
+ }
+***************
+*** 8158,8164 ****
+ fclose(f);
+ }
+ else
+! EMSG2("(NFA) Could not open \"%s\" to write !!!",
+ BT_REGEXP_DEBUG_LOG_NAME);
+ }
+ #endif
+--- 8158,8164 ----
+ fclose(f);
+ }
+ else
+! semsg("(NFA) Could not open \"%s\" to write !!!",
+ BT_REGEXP_DEBUG_LOG_NAME);
+ }
+ #endif
+***************
+*** 8241,8247 ****
+ // Cannot use the same prog recursively, it contains state.
+ if (rmp->regprog->re_in_use)
+ {
+! EMSG(_(e_recursive));
+ return FALSE;
+ }
+ rmp->regprog->re_in_use = TRUE;
+--- 8241,8247 ----
+ // Cannot use the same prog recursively, it contains state.
+ if (rmp->regprog->re_in_use)
+ {
+! emsg(_(e_recursive));
+ return FALSE;
+ }
+ rmp->regprog->re_in_use = TRUE;
+***************
+*** 8365,8371 ****
+ // Cannot use the same prog recursively, it contains state.
+ if (rmp->regprog->re_in_use)
+ {
+! EMSG(_(e_recursive));
+ return FALSE;
+ }
+ rmp->regprog->re_in_use = TRUE;
+--- 8365,8371 ----
+ // Cannot use the same prog recursively, it contains state.
+ if (rmp->regprog->re_in_use)
+ {
+! emsg(_(e_recursive));
+ return FALSE;
+ }
+ rmp->regprog->re_in_use = TRUE;
+*** ../vim-8.1.0742/src/regexp_nfa.c 2018-12-26 22:04:35.494546386 +0100
+--- src/regexp_nfa.c 2019-01-13 19:56:58.425721744 +0100
+***************
+*** 1303,1313 ****
+ {
+ if (extra == NFA_ADD_NL)
+ {
+! EMSGN(_(e_ill_char_class), c);
+ rc_did_emsg = TRUE;
+ return FAIL;
+ }
+! IEMSGN("INTERNAL: Unknown character class char: %ld", c);
+ return FAIL;
+ }
+ #ifdef FEAT_MBYTE
+--- 1303,1313 ----
+ {
+ if (extra == NFA_ADD_NL)
+ {
+! semsg(_(e_ill_char_class), c);
+ rc_did_emsg = TRUE;
+ return FAIL;
+ }
+! siemsg("INTERNAL: Unknown character class char: %ld", c);
+ return FAIL;
+ }
+ #ifdef FEAT_MBYTE
+***************
+*** 1349,1355 ****
+ case Magic('|'):
+ case Magic('&'):
+ case Magic(')'):
+! EMSGN(_(e_misplaced), no_Magic(c));
+ return FAIL;
+
+ case Magic('='):
+--- 1349,1355 ----
+ case Magic('|'):
+ case Magic('&'):
+ case Magic(')'):
+! semsg(_(e_misplaced), no_Magic(c));
+ return FAIL;
+
+ case Magic('='):
+***************
+*** 1359,1365 ****
+ case Magic('*'):
+ case Magic('{'):
+ /* these should follow an atom, not form an atom */
+! EMSGN(_(e_misplaced), no_Magic(c));
+ return FAIL;
+
+ case Magic('~'):
+--- 1359,1365 ----
+ case Magic('*'):
+ case Magic('{'):
+ /* these should follow an atom, not form an atom */
+! semsg(_(e_misplaced), no_Magic(c));
+ return FAIL;
+
+ case Magic('~'):
+***************
+*** 1370,1376 ****
+ * Generated as "\%(pattern\)". */
+ if (reg_prev_sub == NULL)
+ {
+! EMSG(_(e_nopresub));
+ return FAIL;
+ }
+ for (lp = reg_prev_sub; *lp != NUL; MB_CPTR_ADV(lp))
+--- 1370,1376 ----
+ * Generated as "\%(pattern\)". */
+ if (reg_prev_sub == NULL)
+ {
+! emsg(_(e_nopresub));
+ return FAIL;
+ }
+ for (lp = reg_prev_sub; *lp != NUL; MB_CPTR_ADV(lp))
+***************
+*** 1445,1451 ****
+ break;
+ #endif
+ default:
+! EMSGN(_("E867: (NFA) Unknown operator '\\z%c'"),
+ no_Magic(c));
+ return FAIL;
+ }
+--- 1445,1451 ----
+ break;
+ #endif
+ default:
+! semsg(_("E867: (NFA) Unknown operator '\\z%c'"),
+ no_Magic(c));
+ return FAIL;
+ }
+***************
+*** 1577,1583 ****
+ #if VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+ if (n > INT_MAX)
+ {
+! EMSG(_("E951: \\% value too large"));
+ return FAIL;
+ }
+ #endif
+--- 1577,1583 ----
+ #if VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+ if (n > INT_MAX)
+ {
+! emsg(_("E951: \\% value too large"));
+ return FAIL;
+ }
+ #endif
+***************
+*** 1593,1599 ****
+ break;
+ }
+ }
+! EMSGN(_("E867: (NFA) Unknown operator '\\%%%c'"),
+ no_Magic(c));
+ return FAIL;
+ }
+--- 1593,1599 ----
+ break;
+ }
+ }
+! semsg(_("E867: (NFA) Unknown operator '\\%%%c'"),
+ no_Magic(c));
+ return FAIL;
+ }
+***************
+*** 2071,2077 ****
+ }
+ if (i == 0)
+ {
+! EMSGN(_("E869: (NFA) Unknown operator '\\@%c'"), op);
+ return FAIL;
+ }
+ EMIT(i);
+--- 2071,2077 ----
+ }
+ if (i == 0)
+ {
+! semsg(_("E869: (NFA) Unknown operator '\\@%c'"), op);
+ return FAIL;
+ }
+ EMIT(i);
+***************
+*** 2928,2934 ****
+ fclose(df);
+ }
+ #endif
+! EMSG(_("E874: (NFA) Could not pop the stack!"));
+ }
+
+ /*
+--- 2928,2934 ----
+ fclose(df);
+ }
+ #endif
+! emsg(_("E874: (NFA) Could not pop the stack!"));
+ }
+
+ /*
+***************
+*** 4877,4883 ****
+
+ default:
+ /* should not be here :P */
+! IEMSGN(_(e_ill_char_class), class);
+ return FAIL;
+ }
+ return FAIL;
+--- 4877,4883 ----
+
+ default:
+ /* should not be here :P */
+! siemsg(_(e_ill_char_class), class);
+ return FAIL;
+ }
+ return FAIL;
+***************
+*** 5146,5152 ****
+ *listids = (int *)lalloc(sizeof(int) * prog->nstate, TRUE);
+ if (*listids == NULL)
+ {
+! EMSG(_("E878: (NFA) Could not allocate memory for branch traversal!"));
+ return 0;
+ }
+ *listids_len = prog->nstate;
+--- 5146,5152 ----
+ *listids = (int *)lalloc(sizeof(int) * prog->nstate, TRUE);
+ if (*listids == NULL)
+ {
+! emsg(_("E878: (NFA) Could not allocate memory for branch traversal!"));
+ return 0;
+ }
+ *listids_len = prog->nstate;
+***************
+*** 5201,5207 ****
+ }
+ else
+ {
+! EMSG(_(e_log_open_failed));
+ log_fd = stderr;
+ }
+ #endif
+--- 5201,5207 ----
+ }
+ else
+ {
+! emsg(_(e_log_open_failed));
+ log_fd = stderr;
+ }
+ #endif
+***************
+*** 5521,5527 ****
+ debug = fopen(NFA_REGEXP_DEBUG_LOG, "a");
+ if (debug == NULL)
+ {
+! EMSG2("(NFA) COULD NOT OPEN %s!", NFA_REGEXP_DEBUG_LOG);
+ return FALSE;
+ }
+ #endif
+--- 5521,5527 ----
+ debug = fopen(NFA_REGEXP_DEBUG_LOG, "a");
+ if (debug == NULL)
+ {
+! semsg("(NFA) COULD NOT OPEN %s!", NFA_REGEXP_DEBUG_LOG);
+ return FALSE;
+ }
+ #endif
+***************
+*** 5549,5555 ****
+ }
+ else
+ {
+! EMSG(_(e_log_open_failed));
+ log_fd = stderr;
+ }
+ #endif
+--- 5549,5555 ----
+ }
+ else
+ {
+! emsg(_(e_log_open_failed));
+ log_fd = stderr;
+ }
+ #endif
+***************
+*** 6670,6676 ****
+
+ #ifdef DEBUG
+ if (c < 0)
+! IEMSGN("INTERNAL: Negative state char: %ld", c);
+ #endif
+ result = (c == curc);
+
+--- 6670,6676 ----
+
+ #ifdef DEBUG
+ if (c < 0)
+! siemsg("INTERNAL: Negative state char: %ld", c);
+ #endif
+ result = (c == curc);
+
+***************
+*** 6961,6967 ****
+ fclose(f);
+ }
+ else
+! EMSG("Could not open temporary log file for writing");
+ #endif
+
+ clear_sub(&subs.norm);
+--- 6961,6967 ----
+ fclose(f);
+ }
+ else
+! emsg("Could not open temporary log file for writing");
+ #endif
+
+ clear_sub(&subs.norm);
+***************
+*** 7094,7100 ****
+ /* Be paranoid... */
+ if (prog == NULL || line == NULL)
+ {
+! EMSG(_(e_null));
+ goto theend;
+ }
+
+--- 7094,7100 ----
+ /* Be paranoid... */
+ if (prog == NULL || line == NULL)
+ {
+! emsg(_(e_null));
+ goto theend;
+ }
+
+***************
+*** 7212,7218 ****
+ {
+ /* TODO: only give this error for debugging? */
+ if (post_ptr >= post_end)
+! IEMSGN("Internal error: estimated max number of states insufficient: %ld", post_end - post_start);
+ goto fail; /* Cascaded (syntax?) error */
+ }
+
+--- 7212,7218 ----
+ {
+ /* TODO: only give this error for debugging? */
+ if (post_ptr >= post_end)
+! siemsg("Internal error: estimated max number of states insufficient: %ld", post_end - post_start);
+ goto fail; /* Cascaded (syntax?) error */
+ }
+
+*** ../vim-8.1.0742/src/search.c 2018-12-23 19:10:05.006359935 +0100
+--- src/search.c 2019-01-13 19:57:22.949515704 +0100
+***************
+*** 156,164 ****
+ if (spats[i].pat == NULL) /* pattern was never defined */
+ {
+ if (pat_use == RE_SUBST)
+! EMSG(_(e_nopresub));
+ else
+! EMSG(_(e_noprevre));
+ rc_did_emsg = TRUE;
+ return FAIL;
+ }
+--- 156,164 ----
+ if (spats[i].pat == NULL) /* pattern was never defined */
+ {
+ if (pat_use == RE_SUBST)
+! emsg(_(e_nopresub));
+ else
+! emsg(_(e_noprevre));
+ rc_did_emsg = TRUE;
+ return FAIL;
+ }
+***************
+*** 369,375 ****
+ 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;
+
+--- 369,375 ----
+ 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;
+
+***************
+*** 385,391 ****
+ {
+ if (did_save_last_search_spat != 1)
+ {
+! IEMSG("did_save_last_search_spat is not one");
+ return;
+ }
+ --did_save_last_search_spat;
+--- 385,391 ----
+ {
+ if (did_save_last_search_spat != 1)
+ {
+! iemsg("did_save_last_search_spat is not one");
+ return;
+ }
+ --did_save_last_search_spat;
+***************
+*** 670,676 ****
+ (options & (SEARCH_HIS + SEARCH_KEEP)), &regmatch) == FAIL)
+ {
+ if ((options & SEARCH_MSG) && !rc_did_emsg)
+! EMSG2(_("E383: Invalid search string: %s"), mr_pattern);
+ return FAIL;
+ }
+
+--- 670,676 ----
+ (options & (SEARCH_HIS + SEARCH_KEEP)), &regmatch) == FAIL)
+ {
+ if ((options & SEARCH_MSG) && !rc_did_emsg)
+! semsg(_("E383: Invalid search string: %s"), mr_pattern);
+ return FAIL;
+ }
+
+***************
+*** 1136,1151 ****
+ if (!found) /* did not find it */
+ {
+ if (got_int)
+! EMSG(_(e_interr));
+ else if ((options & SEARCH_MSG) == SEARCH_MSG)
+ {
+ if (p_ws)
+! EMSG2(_(e_patnotf2), mr_pattern);
+ else if (lnum == 0)
+! EMSG2(_("E384: search hit TOP without match for: %s"),
+ mr_pattern);
+ else
+! EMSG2(_("E385: search hit BOTTOM without match for: %s"),
+ mr_pattern);
+ }
+ return FAIL;
+--- 1136,1151 ----
+ if (!found) /* did not find it */
+ {
+ if (got_int)
+! emsg(_(e_interr));
+ else if ((options & SEARCH_MSG) == SEARCH_MSG)
+ {
+ if (p_ws)
+! semsg(_(e_patnotf2), mr_pattern);
+ else if (lnum == 0)
+! semsg(_("E384: search hit TOP without match for: %s"),
+ mr_pattern);
+ else
+! semsg(_("E385: search hit BOTTOM without match for: %s"),
+ mr_pattern);
+ }
+ return FAIL;
+***************
+*** 1324,1330 ****
+ searchstr = spats[RE_SUBST].pat;
+ if (searchstr == NULL)
+ {
+! EMSG(_(e_noprevre));
+ retval = 0;
+ goto end_do_search;
+ }
+--- 1324,1330 ----
+ searchstr = spats[RE_SUBST].pat;
+ if (searchstr == NULL)
+ {
+! emsg(_(e_noprevre));
+ retval = 0;
+ goto end_do_search;
+ }
+***************
+*** 1581,1587 ****
+ if (dirc != '?' && dirc != '/')
+ {
+ retval = 0;
+! EMSG(_("E386: Expected '?' or '/' after ';'"));
+ goto end_do_search;
+ }
+ ++pat;
+--- 1581,1587 ----
+ if (dirc != '?' && dirc != '/')
+ {
+ retval = 0;
+! emsg(_("E386: Expected '?' or '/' after ';'"));
+ goto end_do_search;
+ }
+ ++pat;
+***************
+*** 5219,5225 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Searching included file %s"),
+ (char *)new_fname);
+ verbose_leave();
+ }
+--- 5219,5225 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! smsg(_("Searching included file %s"),
+ (char *)new_fname);
+ verbose_leave();
+ }
+***************
+*** 5442,5448 ****
+ && g_do_tagpreview == 0
+ #endif
+ )
+! EMSG(_("E387: Match is on current line"));
+ else if (action == ACTION_SHOW)
+ {
+ show_pat_in_path(line, type, did_show, action,
+--- 5442,5448 ----
+ && g_do_tagpreview == 0
+ #endif
+ )
+! emsg(_("E387: Match is on current line"));
+ else if (action == ACTION_SHOW)
+ {
+ show_pat_in_path(line, type, did_show, action,
+***************
+*** 5609,5619 ****
+ #else
+ if (got_int)
+ #endif
+! EMSG(_(e_interr));
+ else if (type == FIND_DEFINE)
+! EMSG(_("E388: Couldn't find definition"));
+ else
+! EMSG(_("E389: Couldn't find pattern"));
+ }
+ if (action == ACTION_SHOW || action == ACTION_SHOW_ALL)
+ msg_end();
+--- 5609,5619 ----
+ #else
+ if (got_int)
+ #endif
+! emsg(_(e_interr));
+ else if (type == FIND_DEFINE)
+! emsg(_("E388: Couldn't find definition"));
+ else
+! emsg(_("E389: Couldn't find pattern"));
+ }
+ if (action == ACTION_SHOW || action == ACTION_SHOW_ALL)
+ msg_end();
+*** ../vim-8.1.0742/src/sign.c 2019-01-11 13:42:31.680331155 +0100
+--- src/sign.c 2019-01-13 19:57:27.513477447 +0100
+***************
+*** 752,758 ****
+ if (next_sign_typenr == start)
+ {
+ vim_free(sp);
+! EMSG(_("E612: Too many signs defined"));
+ return FAIL;
+ }
+ lp = first_sign; // start all over
+--- 752,758 ----
+ if (next_sign_typenr == start)
+ {
+ vim_free(sp);
+! emsg(_("E612: Too many signs defined"));
+ return FAIL;
+ }
+ lp = first_sign; // start all over
+***************
+*** 835,841 ****
+ // Currently must be one or two display cells
+ if (s != endp || cells < 1 || cells > 2)
+ {
+! EMSG2(_("E239: Invalid sign text: %s"), text);
+ return FAIL;
+ }
+
+--- 835,841 ----
+ // Currently must be one or two display cells
+ if (s != endp || cells < 1 || cells > 2)
+ {
+! semsg(_("E239: Invalid sign text: %s"), text);
+ return FAIL;
+ }
+
+***************
+*** 870,876 ****
+ sp = sign_find(name, &sp_prev);
+ if (sp == NULL)
+ {
+! EMSG2(_("E155: Unknown sign: %s"), name);
+ return FAIL;
+ }
+ sign_undefine(sp, sp_prev);
+--- 870,876 ----
+ sp = sign_find(name, &sp_prev);
+ if (sp == NULL)
+ {
+! semsg(_("E155: Unknown sign: %s"), name);
+ return FAIL;
+ }
+ sign_undefine(sp, sp_prev);
+***************
+*** 890,896 ****
+ if (sp != NULL)
+ sign_list_defined(sp);
+ else
+! EMSG2(_("E155: Unknown sign: %s"), name);
+ }
+
+ /*
+--- 890,896 ----
+ if (sp != NULL)
+ sign_list_defined(sp);
+ else
+! semsg(_("E155: Unknown sign: %s"), name);
+ }
+
+ /*
+***************
+*** 916,922 ****
+ break;
+ if (sp == NULL)
+ {
+! EMSG2(_("E155: Unknown sign: %s"), sign_name);
+ return FAIL;
+ }
+ if (*sign_id == 0)
+--- 916,922 ----
+ break;
+ if (sp == NULL)
+ {
+! semsg(_("E155: Unknown sign: %s"), sign_name);
+ return FAIL;
+ }
+ if (*sign_id == 0)
+***************
+*** 933,939 ****
+ redraw_buf_line_later(buf, lnum);
+ else
+ {
+! EMSG2(_("E885: Not possible to change sign %s"), sign_name);
+ return FAIL;
+ }
+
+--- 933,939 ----
+ redraw_buf_line_later(buf, lnum);
+ else
+ {
+! semsg(_("E885: Not possible to change sign %s"), sign_name);
+ return FAIL;
+ }
+
+***************
+*** 980,986 ****
+ if (id > 0)
+ sign_unplace(id, groupname, curwin->w_buffer, curwin->w_cursor.lnum);
+ else
+! EMSG(_("E159: Missing sign number"));
+ }
+
+ /*
+--- 980,986 ----
+ if (id > 0)
+ sign_unplace(id, groupname, curwin->w_buffer, curwin->w_cursor.lnum);
+ else
+! emsg(_("E159: Missing sign number"));
+ }
+
+ /*
+***************
+*** 993,999 ****
+
+ if ((lnum = buf_findsign(buf, sign_id, sign_group)) <= 0)
+ {
+! EMSGN(_("E157: Invalid sign ID: %ld"), sign_id);
+ return -1;
+ }
+
+--- 993,999 ----
+
+ if ((lnum = buf_findsign(buf, sign_id, sign_group)) <= 0)
+ {
+! semsg(_("E157: Invalid sign ID: %ld"), sign_id);
+ return -1;
+ }
+
+***************
+*** 1010,1016 ****
+
+ if (buf->b_fname == NULL)
+ {
+! EMSG(_("E934: Cannot jump to a buffer that does not have a name"));
+ return -1;
+ }
+ cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
+--- 1010,1016 ----
+
+ if (buf->b_fname == NULL)
+ {
+! emsg(_("E934: Cannot jump to a buffer that does not have a name"));
+ return -1;
+ }
+ cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
+***************
+*** 1070,1076 ****
+ }
+ else
+ {
+! EMSG2(_(e_invarg2), arg);
+ failed = TRUE;
+ break;
+ }
+--- 1070,1076 ----
+ }
+ else
+ {
+! semsg(_(e_invarg2), arg);
+ failed = TRUE;
+ break;
+ }
+***************
+*** 1111,1117 ****
+ // :sign place group=*
+ if (lnum >= 0 || sign_name != NULL
+ || (group != NULL && *group == '\0'))
+! EMSG(_(e_invarg));
+ else
+ sign_list_placed(buf, group);
+ }
+--- 1111,1117 ----
+ // :sign place group=*
+ if (lnum >= 0 || sign_name != NULL
+ || (group != NULL && *group == '\0'))
+! emsg(_(e_invarg));
+ else
+ sign_list_placed(buf, group);
+ }
+***************
+*** 1121,1127 ****
+ if (sign_name == NULL || buf == NULL
+ || (group != NULL && *group == '\0'))
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 1121,1127 ----
+ if (sign_name == NULL || buf == NULL
+ || (group != NULL && *group == '\0'))
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 1142,1148 ****
+ {
+ if (lnum >= 0 || sign_name != NULL || (group != NULL && *group == '\0'))
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 1142,1148 ----
+ {
+ if (lnum >= 0 || sign_name != NULL || (group != NULL && *group == '\0'))
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 1211,1217 ****
+ {
+ if (sign_name == NULL && group == NULL && id == -1)
+ {
+! EMSG(_(e_argreq));
+ return;
+ }
+
+--- 1211,1217 ----
+ {
+ if (sign_name == NULL && group == NULL && id == -1)
+ {
+! emsg(_(e_argreq));
+ return;
+ }
+
+***************
+*** 1220,1226 ****
+ {
+ // File or buffer is not specified or an empty group is used
+ // or a line number or a sign name is specified.
+! EMSG(_(e_invarg));
+ return;
+ }
+ (void)sign_jump(id, group, buf);
+--- 1220,1226 ----
+ {
+ // File or buffer is not specified or an empty group is used
+ // or a line number or a sign name is specified.
+! emsg(_(e_invarg));
+ return;
+ }
+ (void)sign_jump(id, group, buf);
+***************
+*** 1275,1281 ****
+ {
+ if (*signid != -1)
+ {
+! EMSG(_(e_invarg));
+ return FAIL;
+ }
+ *signid = -2;
+--- 1275,1281 ----
+ {
+ if (*signid != -1)
+ {
+! emsg(_(e_invarg));
+ return FAIL;
+ }
+ *signid = -2;
+***************
+*** 1319,1330 ****
+ filename = arg;
+ *buf = buflist_findnr((int)getdigits(&arg));
+ if (*skipwhite(arg) != NUL)
+! EMSG(_(e_trailing));
+ break;
+ }
+ else
+ {
+! EMSG(_(e_invarg));
+ return FAIL;
+ }
+ arg = skipwhite(arg);
+--- 1319,1330 ----
+ filename = arg;
+ *buf = buflist_findnr((int)getdigits(&arg));
+ if (*skipwhite(arg) != NUL)
+! emsg(_(e_trailing));
+ break;
+ }
+ else
+ {
+! emsg(_(e_invarg));
+ return FAIL;
+ }
+ arg = skipwhite(arg);
+***************
+*** 1332,1338 ****
+
+ if (filename != NULL && *buf == NULL)
+ {
+! EMSG2(_("E158: Invalid buffer name: %s"), filename);
+ return FAIL;
+ }
+
+--- 1332,1338 ----
+
+ if (filename != NULL && *buf == NULL)
+ {
+! semsg(_("E158: Invalid buffer name: %s"), filename);
+ return FAIL;
+ }
+
+***************
+*** 1362,1368 ****
+ idx = sign_cmd_idx(arg, p);
+ if (idx == SIGNCMD_LAST)
+ {
+! EMSG2(_("E160: Unknown sign command: %s"), arg);
+ return;
+ }
+ arg = skipwhite(p);
+--- 1362,1368 ----
+ idx = sign_cmd_idx(arg, p);
+ if (idx == SIGNCMD_LAST)
+ {
+! semsg(_("E160: Unknown sign command: %s"), arg);
+ return;
+ }
+ arg = skipwhite(p);
+***************
+*** 1377,1383 ****
+ sign_list_defined(sp);
+ }
+ else if (*arg == NUL)
+! EMSG(_("E156: Missing sign name"));
+ else
+ {
+ char_u *name;
+--- 1377,1383 ----
+ sign_list_defined(sp);
+ }
+ else if (*arg == NUL)
+! emsg(_("E156: Missing sign name"));
+ else
+ {
+ char_u *name;
+***************
+*** 1591,1597 ****
+ {
+ char_u *p;
+
+! smsg((char_u *)"sign %s", sp->sn_name);
+ if (sp->sn_icon != NULL)
+ {
+ MSG_PUTS(" icon=");
+--- 1591,1597 ----
+ {
+ char_u *p;
+
+! smsg("sign %s", sp->sn_name);
+ if (sp->sn_icon != NULL)
+ {
+ MSG_PUTS(" icon=");
+*** ../vim-8.1.0742/src/spell.c 2018-11-16 16:21:01.633310065 +0100
+--- src/spell.c 2019-01-13 23:15:15.534057954 +0100
+***************
+*** 717,723 ****
+ if (endidxcnt == MAXWLEN)
+ {
+ /* Must be a corrupted spell file. */
+! EMSG(_(e_format));
+ return;
+ }
+ endlen[endidxcnt] = wlen;
+--- 717,723 ----
+ if (endidxcnt == MAXWLEN)
+ {
+ /* Must be a corrupted spell file. */
+! emsg(_(e_format));
+ return;
+ }
+ endlen[endidxcnt] = wlen;
+***************
+*** 1537,1543 ****
+ if (!wp->w_p_spell || *wp->w_s->b_p_spl == NUL
+ || wp->w_s->b_langp.ga_len == 0)
+ {
+! EMSG(_("E756: Spell checking is not enabled"));
+ return TRUE;
+ }
+ return FALSE;
+--- 1537,1543 ----
+ if (!wp->w_p_spell || *wp->w_s->b_p_spl == NUL
+ || wp->w_s->b_langp.ga_len == 0)
+ {
+! emsg(_("E756: Spell checking is not enabled"));
+ return TRUE;
+ }
+ return FALSE;
+***************
+*** 1888,1894 ****
+
+ if (r == FAIL)
+ {
+! smsg((char_u *)
+ #ifdef VMS
+ _("Warning: Cannot find word list \"%s_%s.spl\" or \"%s_ascii.spl\""),
+ #else
+--- 1888,1894 ----
+
+ if (r == FAIL)
+ {
+! smsg(
+ #ifdef VMS
+ _("Warning: Cannot find word list \"%s_%s.spl\" or \"%s_ascii.spl\""),
+ #else
+***************
+*** 2307,2313 ****
+ * Parse 'spelllang' and set w_s->b_langp accordingly.
+ * Returns NULL if it's OK, an error message otherwise.
+ */
+! char_u *
+ did_set_spelllang(win_T *wp)
+ {
+ garray_T ga;
+--- 2307,2313 ----
+ * Parse 'spelllang' and set w_s->b_langp accordingly.
+ * Returns NULL if it's OK, an error message otherwise.
+ */
+! char *
+ did_set_spelllang(win_T *wp)
+ {
+ garray_T ga;
+***************
+*** 2330,2336 ****
+ int i, j;
+ langp_T *lp, *lp2;
+ static int recursive = FALSE;
+! char_u *ret_msg = NULL;
+ char_u *spl_copy;
+ bufref_T bufref;
+
+--- 2330,2336 ----
+ int i, j;
+ langp_T *lp, *lp2;
+ static int recursive = FALSE;
+! char *ret_msg = NULL;
+ char_u *spl_copy;
+ bufref_T bufref;
+
+***************
+*** 2435,2441 ****
+ * destroying the buffer we are using... */
+ if (!bufref_valid(&bufref))
+ {
+! ret_msg = (char_u *)N_("E797: SpellFileMissing autocommand deleted buffer");
+ goto theend;
+ }
+ }
+--- 2435,2441 ----
+ * destroying the buffer we are using... */
+ if (!bufref_valid(&bufref))
+ {
+! ret_msg = N_("E797: SpellFileMissing autocommand deleted buffer");
+ goto theend;
+ }
+ }
+***************
+*** 2464,2471 ****
+ else
+ /* This is probably an error. Give a warning and
+ * accept the words anyway. */
+! smsg((char_u *)
+! _("Warning: region %s not supported"),
+ region);
+ }
+ else
+--- 2464,2470 ----
+ else
+ /* This is probably an error. Give a warning and
+ * accept the words anyway. */
+! smsg(_("Warning: region %s not supported"),
+ region);
+ }
+ else
+***************
+*** 3380,3386 ****
+ else if (count > 0)
+ {
+ if (count > sug.su_ga.ga_len)
+! smsg((char_u *)_("Sorry, only %ld suggestions"),
+ (long)sug.su_ga.ga_len);
+ }
+ else
+--- 3379,3385 ----
+ else if (count > 0)
+ {
+ if (count > sug.su_ga.ga_len)
+! smsg(_("Sorry, only %ld suggestions"),
+ (long)sug.su_ga.ga_len);
+ }
+ else
+***************
+*** 3615,3621 ****
+
+ if (repl_from == NULL || repl_to == NULL)
+ {
+! EMSG(_("E752: No previous spell replacement"));
+ return;
+ }
+ addlen = (int)(STRLEN(repl_to) - STRLEN(repl_from));
+--- 3614,3620 ----
+
+ if (repl_from == NULL || repl_to == NULL)
+ {
+! emsg(_("E752: No previous spell replacement"));
+ return;
+ }
+ addlen = (int)(STRLEN(repl_to) - STRLEN(repl_from));
+***************
+*** 3665,3671 ****
+ vim_free(frompat);
+
+ if (sub_nsubs == 0)
+! EMSG2(_("E753: Not found: %s"), repl_from);
+ else
+ do_sub_msg(FALSE);
+ }
+--- 3664,3670 ----
+ vim_free(frompat);
+
+ if (sub_nsubs == 0)
+! semsg(_("E753: Not found: %s"), repl_from);
+ else
+ do_sub_msg(FALSE);
+ }
+***************
+*** 3905,3911 ****
+ fd = mch_fopen((char *)fname, "r");
+ if (fd == NULL)
+ {
+! EMSG2(_(e_notopen), fname);
+ return;
+ }
+
+--- 3904,3910 ----
+ fd = mch_fopen((char *)fname, "r");
+ if (fd == NULL)
+ {
+! semsg(_(e_notopen), fname);
+ return;
+ }
+
+*** ../vim-8.1.0742/src/spellfile.c 2018-11-16 16:21:01.637310049 +0100
+--- src/spellfile.c 2019-01-13 19:57:34.861415906 +0100
+***************
+*** 359,369 ****
+ if (fd == NULL)
+ {
+ if (!silent)
+! EMSG2(_(e_notopen), fname);
+ else if (p_verbose > 2)
+ {
+ verbose_enter();
+! smsg((char_u *)e_notopen, fname);
+ verbose_leave();
+ }
+ goto endFAIL;
+--- 359,369 ----
+ if (fd == NULL)
+ {
+ if (!silent)
+! semsg(_(e_notopen), fname);
+ else if (p_verbose > 2)
+ {
+ verbose_enter();
+! smsg((const char *)e_notopen, fname);
+ verbose_leave();
+ }
+ goto endFAIL;
+***************
+*** 371,377 ****
+ if (p_verbose > 2)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Reading spell file \"%s\""), fname);
+ verbose_leave();
+ }
+
+--- 371,377 ----
+ if (p_verbose > 2)
+ {
+ verbose_enter();
+! smsg(_("Reading spell file \"%s\""), fname);
+ verbose_leave();
+ }
+
+***************
+*** 403,420 ****
+ buf[i] = getc(fd); /* <fileID> */
+ if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0)
+ {
+! EMSG(_("E757: This does not look like a spell file"));
+ goto endFAIL;
+ }
+ c = getc(fd); /* <versionnr> */
+ if (c < VIMSPELLVERSION)
+ {
+! EMSG(_("E771: Old spell file, needs to be updated"));
+ goto endFAIL;
+ }
+ else if (c > VIMSPELLVERSION)
+ {
+! EMSG(_("E772: Spell file is for newer version of Vim"));
+ goto endFAIL;
+ }
+
+--- 403,420 ----
+ buf[i] = getc(fd); /* <fileID> */
+ if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0)
+ {
+! emsg(_("E757: This does not look like a spell file"));
+ goto endFAIL;
+ }
+ c = getc(fd); /* <versionnr> */
+ if (c < VIMSPELLVERSION)
+ {
+! emsg(_("E771: Old spell file, needs to be updated"));
+ goto endFAIL;
+ }
+ else if (c > VIMSPELLVERSION)
+ {
+! emsg(_("E772: Spell file is for newer version of Vim"));
+ goto endFAIL;
+ }
+
+***************
+*** 521,527 ****
+ * message. When it's not required skip the contents. */
+ if (c & SNF_REQUIRED)
+ {
+! EMSG(_("E770: Unsupported section in spell file"));
+ goto endFAIL;
+ }
+ while (--len >= 0)
+--- 521,527 ----
+ * message. When it's not required skip the contents. */
+ if (c & SNF_REQUIRED)
+ {
+! emsg(_("E770: Unsupported section in spell file"));
+ goto endFAIL;
+ }
+ while (--len >= 0)
+***************
+*** 532,544 ****
+ someerror:
+ if (res == SP_FORMERROR)
+ {
+! EMSG(_(e_format));
+ goto endFAIL;
+ }
+ if (res == SP_TRUNCERROR)
+ {
+ truncerr:
+! EMSG(_(e_spell_trunc));
+ goto endFAIL;
+ }
+ if (res == SP_OTHERERROR)
+--- 532,544 ----
+ someerror:
+ if (res == SP_FORMERROR)
+ {
+! emsg(_(e_format));
+ goto endFAIL;
+ }
+ if (res == SP_TRUNCERROR)
+ {
+ truncerr:
+! emsg(_(e_spell_trunc));
+ goto endFAIL;
+ }
+ if (res == SP_OTHERERROR)
+***************
+*** 695,714 ****
+ buf[i] = getc(fd); /* <fileID> */
+ if (STRNCMP(buf, VIMSUGMAGIC, VIMSUGMAGICL) != 0)
+ {
+! EMSG2(_("E778: This does not look like a .sug file: %s"),
+ slang->sl_fname);
+ goto nextone;
+ }
+ c = getc(fd); /* <versionnr> */
+ if (c < VIMSUGVERSION)
+ {
+! EMSG2(_("E779: Old .sug file, needs to be updated: %s"),
+ slang->sl_fname);
+ goto nextone;
+ }
+ else if (c > VIMSUGVERSION)
+ {
+! EMSG2(_("E780: .sug file is for newer version of Vim: %s"),
+ slang->sl_fname);
+ goto nextone;
+ }
+--- 695,714 ----
+ buf[i] = getc(fd); /* <fileID> */
+ if (STRNCMP(buf, VIMSUGMAGIC, VIMSUGMAGICL) != 0)
+ {
+! semsg(_("E778: This does not look like a .sug file: %s"),
+ slang->sl_fname);
+ goto nextone;
+ }
+ c = getc(fd); /* <versionnr> */
+ if (c < VIMSUGVERSION)
+ {
+! semsg(_("E779: Old .sug file, needs to be updated: %s"),
+ slang->sl_fname);
+ goto nextone;
+ }
+ else if (c > VIMSUGVERSION)
+ {
+! semsg(_("E780: .sug file is for newer version of Vim: %s"),
+ slang->sl_fname);
+ goto nextone;
+ }
+***************
+*** 718,724 ****
+ timestamp = get8ctime(fd); /* <timestamp> */
+ if (timestamp != slang->sl_sugtime)
+ {
+! EMSG2(_("E781: .sug file doesn't match .spl file: %s"),
+ slang->sl_fname);
+ goto nextone;
+ }
+--- 718,724 ----
+ timestamp = get8ctime(fd); /* <timestamp> */
+ if (timestamp != slang->sl_sugtime)
+ {
+! semsg(_("E781: .sug file doesn't match .spl file: %s"),
+ slang->sl_fname);
+ goto nextone;
+ }
+***************
+*** 731,737 ****
+ FALSE, 0) != 0)
+ {
+ someerror:
+! EMSG2(_("E782: error while reading .sug file: %s"),
+ slang->sl_fname);
+ slang_clear_sug(slang);
+ goto nextone;
+--- 731,737 ----
+ FALSE, 0) != 0)
+ {
+ someerror:
+! semsg(_("E782: error while reading .sug file: %s"),
+ slang->sl_fname);
+ slang_clear_sug(slang);
+ goto nextone;
+***************
+*** 2225,2231 ****
+ fd = mch_fopen((char *)fname, "r");
+ if (fd == NULL)
+ {
+! EMSG2(_(e_notopen), fname);
+ return NULL;
+ }
+
+--- 2225,2231 ----
+ fd = mch_fopen((char *)fname, "r");
+ if (fd == NULL)
+ {
+! semsg(_(e_notopen), fname);
+ return NULL;
+ }
+
+***************
+*** 2277,2283 ****
+ pc = string_convert(&spin->si_conv, rline, NULL);
+ if (pc == NULL)
+ {
+! smsg((char_u *)_("Conversion failure for word in %s line %d: %s"),
+ fname, lnum, rline);
+ continue;
+ }
+--- 2277,2283 ----
+ pc = string_convert(&spin->si_conv, rline, NULL);
+ if (pc == NULL)
+ {
+! smsg(_("Conversion failure for word in %s line %d: %s"),
+ fname, lnum, rline);
+ continue;
+ }
+***************
+*** 2325,2335 ****
+ if (aff->af_enc != NULL && !spin->si_ascii
+ && convert_setup(&spin->si_conv, aff->af_enc,
+ p_enc) == FAIL)
+! smsg((char_u *)_("Conversion in %s not supported: from %s to %s"),
+ fname, aff->af_enc, p_enc);
+ spin->si_conv.vc_fail = TRUE;
+ #else
+! smsg((char_u *)_("Conversion in %s not supported"), fname);
+ #endif
+ }
+ else if (is_aff_rule(items, itemcnt, "FLAG", 2)
+--- 2325,2335 ----
+ if (aff->af_enc != NULL && !spin->si_ascii
+ && convert_setup(&spin->si_conv, aff->af_enc,
+ p_enc) == FAIL)
+! smsg(_("Conversion in %s not supported: from %s to %s"),
+ fname, aff->af_enc, p_enc);
+ spin->si_conv.vc_fail = TRUE;
+ #else
+! smsg(_("Conversion in %s not supported"), fname);
+ #endif
+ }
+ else if (is_aff_rule(items, itemcnt, "FLAG", 2)
+***************
+*** 2342,2348 ****
+ else if (STRCMP(items[1], "caplong") == 0)
+ aff->af_flagtype = AFT_CAPLONG;
+ else
+! smsg((char_u *)_("Invalid value for FLAG in %s line %d: %s"),
+ fname, lnum, items[1]);
+ if (aff->af_rare != 0
+ || aff->af_keepcase != 0
+--- 2342,2348 ----
+ else if (STRCMP(items[1], "caplong") == 0)
+ aff->af_flagtype = AFT_CAPLONG;
+ else
+! smsg(_("Invalid value for FLAG in %s line %d: %s"),
+ fname, lnum, items[1]);
+ if (aff->af_rare != 0
+ || aff->af_keepcase != 0
+***************
+*** 2355,2361 ****
+ || compflags != NULL
+ || aff->af_suff.ht_used > 0
+ || aff->af_pref.ht_used > 0)
+! smsg((char_u *)_("FLAG after using flags in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (spell_info_item(items[0]))
+--- 2355,2361 ----
+ || compflags != NULL
+ || aff->af_suff.ht_used > 0
+ || aff->af_pref.ht_used > 0)
+! smsg(_("FLAG after using flags in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (spell_info_item(items[0]))
+***************
+*** 2446,2452 ****
+ aff->af_compforbid = affitem2flag(aff->af_flagtype, items[1],
+ fname, lnum);
+ if (aff->af_pref.ht_used > 0)
+! smsg((char_u *)_("Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line %d"),
+ fname, lnum);
+ }
+ else if (is_aff_rule(items, itemcnt, "COMPOUNDPERMITFLAG", 2)
+--- 2446,2452 ----
+ aff->af_compforbid = affitem2flag(aff->af_flagtype, items[1],
+ fname, lnum);
+ if (aff->af_pref.ht_used > 0)
+! smsg(_("Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line %d"),
+ fname, lnum);
+ }
+ else if (is_aff_rule(items, itemcnt, "COMPOUNDPERMITFLAG", 2)
+***************
+*** 2455,2461 ****
+ aff->af_comppermit = affitem2flag(aff->af_flagtype, items[1],
+ fname, lnum);
+ if (aff->af_pref.ht_used > 0)
+! smsg((char_u *)_("Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line %d"),
+ fname, lnum);
+ }
+ else if (is_aff_rule(items, itemcnt, "COMPOUNDFLAG", 2)
+--- 2455,2461 ----
+ aff->af_comppermit = affitem2flag(aff->af_flagtype, items[1],
+ fname, lnum);
+ if (aff->af_pref.ht_used > 0)
+! smsg(_("Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line %d"),
+ fname, lnum);
+ }
+ else if (is_aff_rule(items, itemcnt, "COMPOUNDFLAG", 2)
+***************
+*** 2476,2482 ****
+ /* We don't use the count, but do check that it's a number and
+ * not COMPOUNDRULE mistyped. */
+ if (atoi((char *)items[1]) == 0)
+! smsg((char_u *)_("Wrong COMPOUNDRULES value in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (is_aff_rule(items, itemcnt, "COMPOUNDRULE", 2))
+--- 2476,2482 ----
+ /* We don't use the count, but do check that it's a number and
+ * not COMPOUNDRULE mistyped. */
+ if (atoi((char *)items[1]) == 0)
+! smsg(_("Wrong COMPOUNDRULES value in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (is_aff_rule(items, itemcnt, "COMPOUNDRULE", 2))
+***************
+*** 2507,2513 ****
+ {
+ compmax = atoi((char *)items[1]);
+ if (compmax == 0)
+! smsg((char_u *)_("Wrong COMPOUNDWORDMAX value in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (is_aff_rule(items, itemcnt, "COMPOUNDMIN", 2)
+--- 2507,2513 ----
+ {
+ compmax = atoi((char *)items[1]);
+ if (compmax == 0)
+! smsg(_("Wrong COMPOUNDWORDMAX value in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (is_aff_rule(items, itemcnt, "COMPOUNDMIN", 2)
+***************
+*** 2515,2521 ****
+ {
+ compminlen = atoi((char *)items[1]);
+ if (compminlen == 0)
+! smsg((char_u *)_("Wrong COMPOUNDMIN value in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (is_aff_rule(items, itemcnt, "COMPOUNDSYLMAX", 2)
+--- 2515,2521 ----
+ {
+ compminlen = atoi((char *)items[1]);
+ if (compminlen == 0)
+! smsg(_("Wrong COMPOUNDMIN value in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (is_aff_rule(items, itemcnt, "COMPOUNDSYLMAX", 2)
+***************
+*** 2523,2529 ****
+ {
+ compsylmax = atoi((char *)items[1]);
+ if (compsylmax == 0)
+! smsg((char_u *)_("Wrong COMPOUNDSYLMAX value in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDDUP", 1))
+--- 2523,2529 ----
+ {
+ compsylmax = atoi((char *)items[1]);
+ if (compsylmax == 0)
+! smsg(_("Wrong COMPOUNDSYLMAX value in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDDUP", 1))
+***************
+*** 2545,2551 ****
+ else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 2))
+ {
+ if (atoi((char *)items[1]) == 0)
+! smsg((char_u *)_("Wrong CHECKCOMPOUNDPATTERN value in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 3))
+--- 2545,2551 ----
+ else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 2))
+ {
+ if (atoi((char *)items[1]) == 0)
+! smsg(_("Wrong CHECKCOMPOUNDPATTERN value in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 3))
+***************
+*** 2619,2628 ****
+ {
+ cur_aff = HI2AH(hi);
+ if (cur_aff->ah_combine != (*items[2] == 'Y'))
+! smsg((char_u *)_("Different combining flag in continued affix block in %s line %d: %s"),
+ fname, lnum, items[1]);
+ if (!cur_aff->ah_follows)
+! smsg((char_u *)_("Duplicate affix in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else
+--- 2619,2628 ----
+ {
+ cur_aff = HI2AH(hi);
+ if (cur_aff->ah_combine != (*items[2] == 'Y'))
+! smsg(_("Different combining flag in continued affix block in %s line %d: %s"),
+ fname, lnum, items[1]);
+ if (!cur_aff->ah_follows)
+! smsg(_("Duplicate affix in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
+ else
+***************
+*** 2644,2650 ****
+ || cur_aff->ah_flag == aff->af_nosuggest
+ || cur_aff->ah_flag == aff->af_needcomp
+ || cur_aff->ah_flag == aff->af_comproot)
+! smsg((char_u *)_("Affix also used for BAD/RARE/KEEPCASE/NEEDAFFIX/NEEDCOMPOUND/NOSUGGEST in %s line %d: %s"),
+ fname, lnum, items[1]);
+ STRCPY(cur_aff->ah_key, items[1]);
+ hash_add(tp, cur_aff->ah_key);
+--- 2644,2650 ----
+ || cur_aff->ah_flag == aff->af_nosuggest
+ || cur_aff->ah_flag == aff->af_needcomp
+ || cur_aff->ah_flag == aff->af_comproot)
+! smsg(_("Affix also used for BAD/RARE/KEEPCASE/NEEDAFFIX/NEEDCOMPOUND/NOSUGGEST in %s line %d: %s"),
+ fname, lnum, items[1]);
+ STRCPY(cur_aff->ah_key, items[1]);
+ hash_add(tp, cur_aff->ah_key);
+***************
+*** 2665,2674 ****
+ /* Myspell allows extra text after the item, but that might
+ * mean mistakes go unnoticed. Require a comment-starter. */
+ if (itemcnt > lasti && *items[lasti] != '#')
+! smsg((char_u *)_(e_afftrailing), fname, lnum, items[lasti]);
+
+ if (STRCMP(items[2], "Y") != 0 && STRCMP(items[2], "N") != 0)
+! smsg((char_u *)_("Expected Y or N in %s line %d: %s"),
+ fname, lnum, items[2]);
+
+ if (*items[0] == 'P' && aff->af_pfxpostpone)
+--- 2665,2674 ----
+ /* Myspell allows extra text after the item, but that might
+ * mean mistakes go unnoticed. Require a comment-starter. */
+ if (itemcnt > lasti && *items[lasti] != '#')
+! smsg(_(e_afftrailing), fname, lnum, items[lasti]);
+
+ if (STRCMP(items[2], "Y") != 0 && STRCMP(items[2], "N") != 0)
+! smsg(_("Expected Y or N in %s line %d: %s"),
+ fname, lnum, items[2]);
+
+ if (*items[0] == 'P' && aff->af_pfxpostpone)
+***************
+*** 2710,2716 ****
+ && *items[lasti] != '#'
+ && (STRCMP(items[lasti], "-") != 0
+ || itemcnt != lasti + 1))
+! smsg((char_u *)_(e_afftrailing), fname, lnum, items[lasti]);
+
+ /* New item for an affix letter. */
+ --aff_todo;
+--- 2710,2716 ----
+ && *items[lasti] != '#'
+ && (STRCMP(items[lasti], "-") != 0
+ || itemcnt != lasti + 1))
+! smsg(_(e_afftrailing), fname, lnum, items[lasti]);
+
+ /* New item for an affix letter. */
+ --aff_todo;
+***************
+*** 2754,2760 ****
+ aff_entry->ae_prog = vim_regcomp(buf,
+ RE_MAGIC + RE_STRING + RE_STRICT);
+ if (aff_entry->ae_prog == NULL)
+! smsg((char_u *)_("Broken condition in %s line %d: %s"),
+ fname, lnum, items[4]);
+ }
+
+--- 2754,2760 ----
+ aff_entry->ae_prog = vim_regcomp(buf,
+ RE_MAGIC + RE_STRING + RE_STRICT);
+ if (aff_entry->ae_prog == NULL)
+! smsg(_("Broken condition in %s line %d: %s"),
+ fname, lnum, items[4]);
+ }
+
+***************
+*** 2902,2908 ****
+ {
+ /* Ignore REP/REPSAL count */;
+ if (!isdigit(*items[1]))
+! smsg((char_u *)_("Expected REP(SAL) count in %s line %d"),
+ fname, lnum);
+ }
+ else if ((STRCMP(items[0], "REP") == 0
+--- 2902,2908 ----
+ {
+ /* Ignore REP/REPSAL count */;
+ if (!isdigit(*items[1]))
+! smsg(_("Expected REP(SAL) count in %s line %d"),
+ fname, lnum);
+ }
+ else if ((STRCMP(items[0], "REP") == 0
+***************
+*** 2913,2919 ****
+ /* Myspell ignores extra arguments, we require it starts with
+ * # to detect mistakes. */
+ if (itemcnt > 3 && items[3][0] != '#')
+! smsg((char_u *)_(e_afftrailing), fname, lnum, items[3]);
+ if (items[0][3] == 'S' ? do_repsal : do_rep)
+ {
+ /* Replace underscore with space (can't include a space
+--- 2913,2919 ----
+ /* Myspell ignores extra arguments, we require it starts with
+ * # to detect mistakes. */
+ if (itemcnt > 3 && items[3][0] != '#')
+! smsg(_(e_afftrailing), fname, lnum, items[3]);
+ if (items[0][3] == 'S' ? do_repsal : do_rep)
+ {
+ /* Replace underscore with space (can't include a space
+***************
+*** 2937,2943 ****
+ /* First line contains the count. */
+ found_map = TRUE;
+ if (!isdigit(*items[1]))
+! smsg((char_u *)_("Expected MAP count in %s line %d"),
+ fname, lnum);
+ }
+ else if (do_mapline)
+--- 2937,2943 ----
+ /* First line contains the count. */
+ found_map = TRUE;
+ if (!isdigit(*items[1]))
+! smsg(_("Expected MAP count in %s line %d"),
+ fname, lnum);
+ }
+ else if (do_mapline)
+***************
+*** 2956,2962 ****
+ && vim_strchr(spin->si_map.ga_data, c)
+ != NULL)
+ || vim_strchr(p, c) != NULL)
+! smsg((char_u *)_("Duplicate character in MAP in %s line %d"),
+ fname, lnum);
+ }
+
+--- 2956,2962 ----
+ && vim_strchr(spin->si_map.ga_data, c)
+ != NULL)
+ || vim_strchr(p, c) != NULL)
+! smsg(_("Duplicate character in MAP in %s line %d"),
+ fname, lnum);
+ }
+
+***************
+*** 3013,3019 ****
+ }
+ }
+ else
+! smsg((char_u *)_("Unrecognized or duplicate item in %s line %d: %s"),
+ fname, lnum, items[0]);
+ }
+ }
+--- 3013,3019 ----
+ }
+ }
+ else
+! smsg(_("Unrecognized or duplicate item in %s line %d: %s"),
+ fname, lnum, items[0]);
+ }
+ }
+***************
+*** 3041,3047 ****
+ )
+ {
+ if (fol == NULL || low == NULL || upp == NULL)
+! smsg((char_u *)_("Missing FOL/LOW/UPP line in %s"), fname);
+ else
+ (void)set_spell_chartab(fol, low, upp);
+ }
+--- 3041,3047 ----
+ )
+ {
+ if (fol == NULL || low == NULL || upp == NULL)
+! smsg(_("Missing FOL/LOW/UPP line in %s"), fname);
+ else
+ (void)set_spell_chartab(fol, low, upp);
+ }
+***************
+*** 3067,3073 ****
+ if (compsylmax != 0)
+ {
+ if (syllable == NULL)
+! smsg((char_u *)_("COMPOUNDSYLMAX used without SYLLABLE"));
+ aff_check_number(spin->si_compsylmax, compsylmax, "COMPOUNDSYLMAX");
+ spin->si_compsylmax = compsylmax;
+ }
+--- 3067,3073 ----
+ if (compsylmax != 0)
+ {
+ if (syllable == NULL)
+! smsg(_("COMPOUNDSYLMAX used without SYLLABLE"));
+ aff_check_number(spin->si_compsylmax, compsylmax, "COMPOUNDSYLMAX");
+ spin->si_compsylmax = compsylmax;
+ }
+***************
+*** 3101,3110 ****
+ if (sofofrom != NULL || sofoto != NULL)
+ {
+ if (sofofrom == NULL || sofoto == NULL)
+! smsg((char_u *)_("Missing SOFO%s line in %s"),
+ sofofrom == NULL ? "FROM" : "TO", fname);
+ else if (spin->si_sal.ga_len > 0)
+! smsg((char_u *)_("Both SAL and SOFO lines in %s"), fname);
+ else
+ {
+ aff_check_string(spin->si_sofofr, sofofrom, "SOFOFROM");
+--- 3101,3110 ----
+ if (sofofrom != NULL || sofoto != NULL)
+ {
+ if (sofofrom == NULL || sofoto == NULL)
+! smsg(_("Missing SOFO%s line in %s"),
+ sofofrom == NULL ? "FROM" : "TO", fname);
+ else if (spin->si_sal.ga_len > 0)
+! smsg(_("Both SAL and SOFO lines in %s"), fname);
+ else
+ {
+ aff_check_string(spin->si_sofofr, sofofrom, "SOFOFROM");
+***************
+*** 3208,3222 ****
+ if (res == 0)
+ {
+ if (flagtype == AFT_NUM)
+! smsg((char_u *)_("Flag is not a number in %s line %d: %s"),
+ fname, lnum, item);
+ else
+! smsg((char_u *)_("Illegal flag in %s line %d: %s"),
+ fname, lnum, item);
+ }
+ if (*p != NUL)
+ {
+! smsg((char_u *)_(e_affname), fname, lnum, item);
+ return 0;
+ }
+
+--- 3208,3222 ----
+ if (res == 0)
+ {
+ if (flagtype == AFT_NUM)
+! smsg(_("Flag is not a number in %s line %d: %s"),
+ fname, lnum, item);
+ else
+! smsg(_("Illegal flag in %s line %d: %s"),
+ fname, lnum, item);
+ }
+ if (*p != NUL)
+ {
+! smsg(_(e_affname), fname, lnum, item);
+ return 0;
+ }
+
+***************
+*** 3419,3425 ****
+ aff_check_number(int spinval, int affval, char *name)
+ {
+ if (spinval != 0 && spinval != affval)
+! smsg((char_u *)_("%s value differs from what is used in another .aff file"), name);
+ }
+
+ /*
+--- 3419,3425 ----
+ aff_check_number(int spinval, int affval, char *name)
+ {
+ if (spinval != 0 && spinval != affval)
+! smsg(_("%s value differs from what is used in another .aff file"), name);
+ }
+
+ /*
+***************
+*** 3429,3435 ****
+ aff_check_string(char_u *spinval, char_u *affval, char *name)
+ {
+ if (spinval != NULL && STRCMP(spinval, affval) != 0)
+! smsg((char_u *)_("%s value differs from what is used in another .aff file"), name);
+ }
+
+ /*
+--- 3429,3435 ----
+ aff_check_string(char_u *spinval, char_u *affval, char *name)
+ {
+ if (spinval != NULL && STRCMP(spinval, affval) != 0)
+! smsg(_("%s value differs from what is used in another .aff file"), name);
+ }
+
+ /*
+***************
+*** 3549,3555 ****
+ fd = mch_fopen((char *)fname, "r");
+ if (fd == NULL)
+ {
+! EMSG2(_(e_notopen), fname);
+ return FAIL;
+ }
+
+--- 3549,3555 ----
+ fd = mch_fopen((char *)fname, "r");
+ if (fd == NULL)
+ {
+! semsg(_(e_notopen), fname);
+ return FAIL;
+ }
+
+***************
+*** 3566,3572 ****
+ /* Read and ignore the first line: word count. */
+ (void)vim_fgets(line, MAXLINELEN, fd);
+ if (!vim_isdigit(*skipwhite(line)))
+! EMSG2(_("E760: No word count in %s"), fname);
+
+ /*
+ * Read all the lines in the file one by one.
+--- 3566,3572 ----
+ /* Read and ignore the first line: word count. */
+ (void)vim_fgets(line, MAXLINELEN, fd);
+ if (!vim_isdigit(*skipwhite(line)))
+! semsg(_("E760: No word count in %s"), fname);
+
+ /*
+ * Read all the lines in the file one by one.
+***************
+*** 3596,3602 ****
+ pc = string_convert(&spin->si_conv, line, NULL);
+ if (pc == NULL)
+ {
+! smsg((char_u *)_("Conversion failure for word in %s line %d: %s"),
+ fname, lnum, line);
+ continue;
+ }
+--- 3596,3602 ----
+ pc = string_convert(&spin->si_conv, line, NULL);
+ if (pc == NULL)
+ {
+! smsg(_("Conversion failure for word in %s line %d: %s"),
+ fname, lnum, line);
+ continue;
+ }
+***************
+*** 3661,3670 ****
+ if (!HASHITEM_EMPTY(hi))
+ {
+ if (p_verbose > 0)
+! smsg((char_u *)_("Duplicate word in %s line %d: %s"),
+ fname, lnum, dw);
+ else if (duplicate == 0)
+! smsg((char_u *)_("First duplicate word in %s line %d: %s"),
+ fname, lnum, dw);
+ ++duplicate;
+ }
+--- 3661,3670 ----
+ if (!HASHITEM_EMPTY(hi))
+ {
+ if (p_verbose > 0)
+! smsg(_("Duplicate word in %s line %d: %s"),
+ fname, lnum, dw);
+ else if (duplicate == 0)
+! smsg(_("First duplicate word in %s line %d: %s"),
+ fname, lnum, dw);
+ ++duplicate;
+ }
+***************
+*** 3719,3727 ****
+ }
+
+ if (duplicate > 0)
+! smsg((char_u *)_("%d duplicate word(s) in %s"), duplicate, fname);
+ if (spin->si_ascii && non_ascii > 0)
+! smsg((char_u *)_("Ignored %d word(s) with non-ASCII characters in %s"),
+ non_ascii, fname);
+ hash_clear(&ht);
+
+--- 3719,3727 ----
+ }
+
+ if (duplicate > 0)
+! smsg(_("%d duplicate word(s) in %s"), duplicate, fname);
+ if (spin->si_ascii && non_ascii > 0)
+! smsg(_("Ignored %d word(s) with non-ASCII characters in %s"),
+ non_ascii, fname);
+ hash_clear(&ht);
+
+***************
+*** 4133,4139 ****
+ fd = mch_fopen((char *)fname, "r");
+ if (fd == NULL)
+ {
+! EMSG2(_(e_notopen), fname);
+ return FAIL;
+ }
+
+--- 4133,4139 ----
+ fd = mch_fopen((char *)fname, "r");
+ if (fd == NULL)
+ {
+! semsg(_(e_notopen), fname);
+ return FAIL;
+ }
+
+***************
+*** 4168,4174 ****
+ pc = string_convert(&spin->si_conv, rline, NULL);
+ if (pc == NULL)
+ {
+! smsg((char_u *)_("Conversion failure for word in %s line %d: %s"),
+ fname, lnum, rline);
+ continue;
+ }
+--- 4168,4174 ----
+ pc = string_convert(&spin->si_conv, rline, NULL);
+ if (pc == NULL)
+ {
+! smsg(_("Conversion failure for word in %s line %d: %s"),
+ fname, lnum, rline);
+ continue;
+ }
+***************
+*** 4187,4196 ****
+ if (STRNCMP(line, "encoding=", 9) == 0)
+ {
+ if (spin->si_conv.vc_type != CONV_NONE)
+! smsg((char_u *)_("Duplicate /encoding= line ignored in %s line %d: %s"),
+ fname, lnum, line - 1);
+ else if (did_word)
+! smsg((char_u *)_("/encoding= line after word ignored in %s line %d: %s"),
+ fname, lnum, line - 1);
+ else
+ {
+--- 4187,4196 ----
+ if (STRNCMP(line, "encoding=", 9) == 0)
+ {
+ if (spin->si_conv.vc_type != CONV_NONE)
+! smsg(_("Duplicate /encoding= line ignored in %s line %d: %s"),
+ fname, lnum, line - 1);
+ else if (did_word)
+! smsg(_("/encoding= line after word ignored in %s line %d: %s"),
+ fname, lnum, line - 1);
+ else
+ {
+***************
+*** 4203,4214 ****
+ if (enc != NULL && !spin->si_ascii
+ && convert_setup(&spin->si_conv, enc,
+ p_enc) == FAIL)
+! smsg((char_u *)_("Conversion in %s not supported: from %s to %s"),
+ fname, line, p_enc);
+ vim_free(enc);
+ spin->si_conv.vc_fail = TRUE;
+ #else
+! smsg((char_u *)_("Conversion in %s not supported"), fname);
+ #endif
+ }
+ continue;
+--- 4203,4214 ----
+ if (enc != NULL && !spin->si_ascii
+ && convert_setup(&spin->si_conv, enc,
+ p_enc) == FAIL)
+! smsg(_("Conversion in %s not supported: from %s to %s"),
+ fname, line, p_enc);
+ vim_free(enc);
+ spin->si_conv.vc_fail = TRUE;
+ #else
+! smsg(_("Conversion in %s not supported"), fname);
+ #endif
+ }
+ continue;
+***************
+*** 4217,4229 ****
+ if (STRNCMP(line, "regions=", 8) == 0)
+ {
+ if (spin->si_region_count > 1)
+! smsg((char_u *)_("Duplicate /regions= line ignored in %s line %d: %s"),
+ fname, lnum, line);
+ else
+ {
+ line += 8;
+ if (STRLEN(line) > MAXREGIONS * 2)
+! smsg((char_u *)_("Too many regions in %s line %d: %s"),
+ fname, lnum, line);
+ else
+ {
+--- 4217,4229 ----
+ if (STRNCMP(line, "regions=", 8) == 0)
+ {
+ if (spin->si_region_count > 1)
+! smsg(_("Duplicate /regions= line ignored in %s line %d: %s"),
+ fname, lnum, line);
+ else
+ {
+ line += 8;
+ if (STRLEN(line) > MAXREGIONS * 2)
+! smsg(_("Too many regions in %s line %d: %s"),
+ fname, lnum, line);
+ else
+ {
+***************
+*** 4237,4243 ****
+ continue;
+ }
+
+! smsg((char_u *)_("/ line ignored in %s line %d: %s"),
+ fname, lnum, line - 1);
+ continue;
+ }
+--- 4237,4243 ----
+ continue;
+ }
+
+! smsg(_("/ line ignored in %s line %d: %s"),
+ fname, lnum, line - 1);
+ continue;
+ }
+***************
+*** 4267,4273 ****
+ l = *p - '0';
+ if (l == 0 || l > spin->si_region_count)
+ {
+! smsg((char_u *)_("Invalid region nr in %s line %d: %s"),
+ fname, lnum, p);
+ break;
+ }
+--- 4267,4273 ----
+ l = *p - '0';
+ if (l == 0 || l > spin->si_region_count)
+ {
+! smsg(_("Invalid region nr in %s line %d: %s"),
+ fname, lnum, p);
+ break;
+ }
+***************
+*** 4275,4281 ****
+ }
+ else
+ {
+! smsg((char_u *)_("Unrecognized flags in %s line %d: %s"),
+ fname, lnum, p);
+ break;
+ }
+--- 4275,4281 ----
+ }
+ else
+ {
+! smsg(_("Unrecognized flags in %s line %d: %s"),
+ fname, lnum, p);
+ break;
+ }
+***************
+*** 4346,4352 ****
+ {
+ if (!spin->si_did_emsg)
+ {
+! EMSG(_("E845: Insufficient memory, word list will be incomplete"));
+ spin->si_did_emsg = TRUE;
+ }
+ return NULL;
+--- 4346,4352 ----
+ {
+ if (!spin->si_did_emsg)
+ {
+! emsg(_("E845: Insufficient memory, word list will be incomplete"));
+ spin->si_did_emsg = TRUE;
+ }
+ return NULL;
+***************
+*** 4576,4582 ****
+ node = *prev;
+ }
+ #ifdef SPELL_PRINTTREE
+! smsg((char_u *)"Added \"%s\"", word);
+ spell_print_tree(root->wn_sibling);
+ #endif
+
+--- 4576,4582 ----
+ node = *prev;
+ }
+ #ifdef SPELL_PRINTTREE
+! smsg("Added \"%s\"", word);
+ spell_print_tree(root->wn_sibling);
+ #endif
+
+***************
+*** 4916,4922 ****
+ fd = mch_fopen((char *)fname, "w");
+ if (fd == NULL)
+ {
+! EMSG2(_(e_notopen), fname);
+ return FAIL;
+ }
+
+--- 4916,4922 ----
+ fd = mch_fopen((char *)fname, "w");
+ if (fd == NULL)
+ {
+! semsg(_(e_notopen), fname);
+ return FAIL;
+ }
+
+***************
+*** 5305,5311 ****
+ if (fwv != (size_t)1)
+ retval = FAIL;
+ if (retval == FAIL)
+! EMSG(_(e_write));
+
+ return retval;
+ }
+--- 5305,5311 ----
+ if (fwv != (size_t)1)
+ retval = FAIL;
+ if (retval == FAIL)
+! emsg(_(e_write));
+
+ return retval;
+ }
+***************
+*** 5450,5456 ****
+ if (fd != NULL)
+ if (putc(np->wn_byte, fd) == EOF) /* <byte> or <xbyte> */
+ {
+! EMSG(_(e_write));
+ return 0;
+ }
+ }
+--- 5450,5456 ----
+ if (fd != NULL)
+ if (putc(np->wn_byte, fd) == EOF) /* <byte> or <xbyte> */
+ {
+! emsg(_(e_write));
+ return 0;
+ }
+ }
+***************
+*** 5555,5561 ****
+ if (sug_maketable(spin) == FAIL)
+ goto theend;
+
+! smsg((char_u *)_("Number of words after soundfolding: %ld"),
+ (long)spin->si_spellbuf->b_ml.ml_line_count);
+
+ /*
+--- 5555,5561 ----
+ if (sug_maketable(spin) == FAIL)
+ goto theend;
+
+! smsg(_("Number of words after soundfolding: %ld"),
+ (long)spin->si_spellbuf->b_ml.ml_line_count);
+
+ /*
+***************
+*** 5682,5688 ****
+ }
+ }
+
+! smsg((char_u *)_("Total number of words: %d"), words_done);
+
+ return OK;
+ }
+--- 5682,5688 ----
+ }
+ }
+
+! smsg(_("Total number of words: %d"), words_done);
+
+ return OK;
+ }
+***************
+*** 5848,5854 ****
+ fd = mch_fopen((char *)fname, "w");
+ if (fd == NULL)
+ {
+! EMSG2(_(e_notopen), fname);
+ return;
+ }
+
+--- 5848,5854 ----
+ fd = mch_fopen((char *)fname, "w");
+ if (fd == NULL)
+ {
+! semsg(_(e_notopen), fname);
+ return;
+ }
+
+***************
+*** 5861,5867 ****
+ */
+ if (fwrite(VIMSUGMAGIC, VIMSUGMAGICL, (size_t)1, fd) != 1) /* <fileID> */
+ {
+! EMSG(_(e_write));
+ goto theend;
+ }
+ putc(VIMSUGVERSION, fd); /* <versionnr> */
+--- 5861,5867 ----
+ */
+ if (fwrite(VIMSUGMAGIC, VIMSUGMAGICL, (size_t)1, fd) != 1) /* <fileID> */
+ {
+! emsg(_(e_write));
+ goto theend;
+ }
+ putc(VIMSUGVERSION, fd); /* <versionnr> */
+***************
+*** 5903,5909 ****
+ len = (int)STRLEN(line) + 1;
+ if (fwrite(line, (size_t)len, (size_t)1, fd) == 0)
+ {
+! EMSG(_(e_write));
+ goto theend;
+ }
+ spin->si_memtot += len;
+--- 5903,5909 ----
+ len = (int)STRLEN(line) + 1;
+ if (fwrite(line, (size_t)len, (size_t)1, fd) == 0)
+ {
+! emsg(_(e_write));
+ goto theend;
+ }
+ spin->si_memtot += len;
+***************
+*** 5911,5917 ****
+
+ /* Write another byte to check for errors. */
+ if (putc(0, fd) == EOF)
+! EMSG(_(e_write));
+
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("Estimated runtime memory use: %d bytes"), spin->si_memtot);
+--- 5911,5917 ----
+
+ /* Write another byte to check for errors. */
+ if (putc(0, fd) == EOF)
+! emsg(_(e_write));
+
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("Estimated runtime memory use: %d bytes"), spin->si_memtot);
+***************
+*** 6010,6032 ****
+ }
+
+ if (incount <= 0)
+! EMSG(_(e_invarg)); /* need at least output and input names */
+ else if (vim_strchr(gettail(wfname), '_') != NULL)
+! EMSG(_("E751: Output file name must not have region name"));
+ else if (incount > MAXREGIONS)
+! EMSGN(_("E754: Only up to %ld regions supported"), MAXREGIONS);
+ else
+ {
+ /* Check for overwriting before doing things that may take a lot of
+ * time. */
+ if (!over_write && mch_stat((char *)wfname, &st) >= 0)
+ {
+! EMSG(_(e_exists));
+ goto theend;
+ }
+ if (mch_isdir(wfname))
+ {
+! EMSG2(_(e_isadir2), wfname);
+ goto theend;
+ }
+
+--- 6010,6032 ----
+ }
+
+ if (incount <= 0)
+! emsg(_(e_invarg)); /* need at least output and input names */
+ else if (vim_strchr(gettail(wfname), '_') != NULL)
+! emsg(_("E751: Output file name must not have region name"));
+ else if (incount > MAXREGIONS)
+! semsg(_("E754: Only up to %ld regions supported"), MAXREGIONS);
+ else
+ {
+ /* Check for overwriting before doing things that may take a lot of
+ * time. */
+ if (!over_write && mch_stat((char *)wfname, &st) >= 0)
+ {
+! emsg(_(e_exists));
+ goto theend;
+ }
+ if (mch_isdir(wfname))
+ {
+! semsg(_(e_isadir2), wfname);
+ goto theend;
+ }
+
+***************
+*** 6048,6054 ****
+ if (STRLEN(gettail(innames[i])) < 5
+ || innames[i][len - 3] != '_')
+ {
+! EMSG2(_("E755: Invalid region in %s"), innames[i]);
+ goto theend;
+ }
+ spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]);
+--- 6048,6054 ----
+ if (STRLEN(gettail(innames[i])) < 5
+ || innames[i][len - 3] != '_')
+ {
+! semsg(_("E755: Invalid region in %s"), innames[i]);
+ goto theend;
+ }
+ spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]);
+***************
+*** 6260,6266 ****
+
+ if (*curwin->w_s->b_p_spf == NUL)
+ {
+! EMSG2(_(e_notset), "spellfile");
+ return;
+ }
+ fnamebuf = alloc(MAXPATHL);
+--- 6260,6266 ----
+
+ if (*curwin->w_s->b_p_spf == NUL)
+ {
+! semsg(_(e_notset), "spellfile");
+ return;
+ }
+ fnamebuf = alloc(MAXPATHL);
+***************
+*** 6274,6280 ****
+ break;
+ if (*spf == NUL)
+ {
+! EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx);
+ vim_free(fnamebuf);
+ return;
+ }
+--- 6274,6280 ----
+ break;
+ if (*spf == NUL)
+ {
+! semsg(_("E765: 'spellfile' does not have %ld entries"), idx);
+ vim_free(fnamebuf);
+ return;
+ }
+***************
+*** 6286,6292 ****
+ buf = NULL;
+ if (buf != NULL && bufIsChanged(buf))
+ {
+! EMSG(_(e_bufloaded));
+ vim_free(fnamebuf);
+ return;
+ }
+--- 6286,6292 ----
+ buf = NULL;
+ if (buf != NULL && bufIsChanged(buf))
+ {
+! emsg(_(e_bufloaded));
+ vim_free(fnamebuf);
+ return;
+ }
+***************
+*** 6321,6327 ****
+ if (undo)
+ {
+ home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
+! smsg((char_u *)_("Word '%.*s' removed from %s"),
+ len, word, NameBuff);
+ }
+ }
+--- 6321,6327 ----
+ if (undo)
+ {
+ home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
+! smsg(_("Word '%.*s' removed from %s"),
+ len, word, NameBuff);
+ }
+ }
+***************
+*** 6358,6364 ****
+ }
+
+ if (fd == NULL)
+! EMSG2(_(e_notopen), fname);
+ else
+ {
+ if (bad)
+--- 6358,6364 ----
+ }
+
+ if (fd == NULL)
+! semsg(_(e_notopen), fname);
+ else
+ {
+ if (bad)
+***************
+*** 6368,6374 ****
+ fclose(fd);
+
+ home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
+! smsg((char_u *)_("Word '%.*s' added to %s"), len, word, NameBuff);
+ }
+ }
+
+--- 6368,6374 ----
+ fclose(fd);
+
+ home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
+! smsg(_("Word '%.*s' added to %s"), len, word, NameBuff);
+ }
+ }
+
+***************
+*** 6485,6491 ****
+ {
+ if (*pl == NUL || *pu == NUL)
+ {
+! EMSG(_(e_affform));
+ return FAIL;
+ }
+ #ifdef FEAT_MBYTE
+--- 6485,6491 ----
+ {
+ if (*pl == NUL || *pu == NUL)
+ {
+! emsg(_(e_affform));
+ return FAIL;
+ }
+ #ifdef FEAT_MBYTE
+***************
+*** 6511,6517 ****
+ {
+ if (f >= 256)
+ {
+! EMSG(_(e_affrange));
+ return FAIL;
+ }
+ new_st.st_fold[l] = f;
+--- 6511,6517 ----
+ {
+ if (f >= 256)
+ {
+! emsg(_(e_affrange));
+ return FAIL;
+ }
+ new_st.st_fold[l] = f;
+***************
+*** 6524,6530 ****
+ {
+ if (f >= 256)
+ {
+! EMSG(_(e_affrange));
+ return FAIL;
+ }
+ new_st.st_fold[u] = f;
+--- 6524,6530 ----
+ {
+ if (f >= 256)
+ {
+! emsg(_(e_affrange));
+ return FAIL;
+ }
+ new_st.st_fold[u] = f;
+***************
+*** 6535,6541 ****
+
+ if (*pl != NUL || *pu != NUL)
+ {
+! EMSG(_(e_affform));
+ return FAIL;
+ }
+
+--- 6535,6541 ----
+
+ if (*pl != NUL || *pu != NUL)
+ {
+! emsg(_(e_affform));
+ return FAIL;
+ }
+
+***************
+*** 6599,6605 ****
+ || spelltab.st_fold[i] != new_st->st_fold[i]
+ || spelltab.st_upper[i] != new_st->st_upper[i])
+ {
+! EMSG(_("E763: Word characters differ between spell files"));
+ return FAIL;
+ }
+ }
+--- 6599,6605 ----
+ || spelltab.st_fold[i] != new_st->st_fold[i]
+ || spelltab.st_upper[i] != new_st->st_upper[i])
+ {
+! emsg(_("E763: Word characters differ between spell files"));
+ return FAIL;
+ }
+ }
+***************
+*** 6725,6731 ****
+ {
+ /* This should have been checked when generating the .spl
+ * file. */
+! EMSG(_("E783: duplicate char in MAP entry"));
+ vim_free(b);
+ }
+ }
+--- 6725,6731 ----
+ {
+ /* This should have been checked when generating the .spl
+ * file. */
+! emsg(_("E783: duplicate char in MAP entry"));
+ vim_free(b);
+ }
+ }
+*** ../vim-8.1.0742/src/structs.h 2019-01-12 22:47:01.264088074 +0100
+--- src/structs.h 2019-01-13 22:54:25.947589147 +0100
+***************
+*** 889,896 ****
+ */
+ struct msglist
+ {
+! char_u *msg; /* original message */
+! char_u *throw_msg; /* msg to throw: usually original one */
+ struct msglist *next; /* next of several messages in a row */
+ };
+
+--- 889,896 ----
+ */
+ struct msglist
+ {
+! char *msg; /* original message */
+! char *throw_msg; /* msg to throw: usually original one */
+ struct msglist *next; /* next of several messages in a row */
+ };
+
+***************
+*** 912,918 ****
+ struct vim_exception
+ {
+ except_type_T type; /* exception type */
+! char_u *value; /* exception value */
+ struct msglist *messages; /* message(s) causing error exception */
+ char_u *throw_name; /* name of the throw point */
+ linenr_T throw_lnum; /* line number of the throw point */
+--- 912,918 ----
+ struct vim_exception
+ {
+ except_type_T type; /* exception type */
+! char *value; /* exception value */
+ struct msglist *messages; /* message(s) causing error exception */
+ char_u *throw_name; /* name of the throw point */
+ linenr_T throw_lnum; /* line number of the throw point */
+*** ../vim-8.1.0742/src/syntax.c 2018-10-25 13:31:33.829906902 +0200
+--- src/syntax.c 2019-01-13 23:15:25.553979855 +0100
+***************
+*** 3444,3450 ****
+ else if (STRNICMP(arg, "off", 3) == 0 && next - arg == 3)
+ curwin->w_s->b_syn_conceal = FALSE;
+ else
+! EMSG2(_("E390: Illegal argument: %s"), arg);
+ #endif
+ }
+
+--- 3444,3450 ----
+ else if (STRNICMP(arg, "off", 3) == 0 && next - arg == 3)
+ curwin->w_s->b_syn_conceal = FALSE;
+ else
+! semsg(_("E390: Illegal argument: %s"), arg);
+ #endif
+ }
+
+***************
+*** 3474,3480 ****
+ else if (STRNICMP(arg, "ignore", 6) == 0 && next - arg == 6)
+ curwin->w_s->b_syn_ic = TRUE;
+ else
+! EMSG2(_("E390: Illegal argument: %s"), arg);
+ }
+
+ /*
+--- 3474,3480 ----
+ else if (STRNICMP(arg, "ignore", 6) == 0 && next - arg == 6)
+ curwin->w_s->b_syn_ic = TRUE;
+ else
+! semsg(_("E390: Illegal argument: %s"), arg);
+ }
+
+ /*
+***************
+*** 3508,3514 ****
+ curwin->w_s->b_syn_spell = SYNSPL_DEFAULT;
+ else
+ {
+! EMSG2(_("E390: Illegal argument: %s"), arg);
+ return;
+ }
+
+--- 3508,3514 ----
+ curwin->w_s->b_syn_spell = SYNSPL_DEFAULT;
+ else
+ {
+! semsg(_("E390: Illegal argument: %s"), arg);
+ return;
+ }
+
+***************
+*** 3764,3770 ****
+ id = syn_scl_namen2id(arg + 1, (int)(arg_end - arg - 1));
+ if (id == 0)
+ {
+! EMSG2(_("E391: No such syntax cluster: %s"), arg);
+ break;
+ }
+ else
+--- 3764,3770 ----
+ id = syn_scl_namen2id(arg + 1, (int)(arg_end - arg - 1));
+ if (id == 0)
+ {
+! semsg(_("E391: No such syntax cluster: %s"), arg);
+ break;
+ }
+ else
+***************
+*** 3784,3790 ****
+ id = syn_namen2id(arg, (int)(arg_end - arg));
+ if (id == 0)
+ {
+! EMSG2(_(e_nogroup), arg);
+ break;
+ }
+ else
+--- 3784,3790 ----
+ id = syn_namen2id(arg, (int)(arg_end - arg));
+ if (id == 0)
+ {
+! semsg(_(e_nogroup), arg);
+ break;
+ }
+ else
+***************
+*** 3969,3975 ****
+ {
+ id = syn_scl_namen2id(arg + 1, (int)(arg_end - arg - 1));
+ if (id == 0)
+! EMSG2(_("E392: No such syntax cluster: %s"), arg);
+ else
+ syn_list_cluster(id - SYNID_CLUSTER);
+ }
+--- 3969,3975 ----
+ {
+ id = syn_scl_namen2id(arg + 1, (int)(arg_end - arg - 1));
+ if (id == 0)
+! semsg(_("E392: No such syntax cluster: %s"), arg);
+ else
+ syn_list_cluster(id - SYNID_CLUSTER);
+ }
+***************
+*** 3977,3983 ****
+ {
+ id = syn_namen2id(arg, (int)(arg_end - arg));
+ if (id == 0)
+! EMSG2(_(e_nogroup), arg);
+ else
+ syn_list_one(id, syncing, TRUE);
+ }
+--- 3977,3983 ----
+ {
+ id = syn_namen2id(arg, (int)(arg_end - arg));
+ if (id == 0)
+! semsg(_(e_nogroup), arg);
+ else
+ syn_list_one(id, syncing, TRUE);
+ }
+***************
+*** 4650,4656 ****
+ {
+ if (!opt->has_cont_list)
+ {
+! EMSG(_("E395: contains argument not accepted here"));
+ return NULL;
+ }
+ if (get_id_list(&arg, 8, &opt->cont_list, skip) == FAIL)
+--- 4650,4656 ----
+ {
+ if (!opt->has_cont_list)
+ {
+! emsg(_("E395: contains argument not accepted here"));
+ return NULL;
+ }
+ if (get_id_list(&arg, 8, &opt->cont_list, skip) == FAIL)
+***************
+*** 4689,4695 ****
+ #ifdef FEAT_CONCEAL
+ if (!vim_isprintc_strict(*conceal_char))
+ {
+! EMSG(_("E844: invalid cchar value"));
+ return NULL;
+ }
+ #endif
+--- 4689,4695 ----
+ #ifdef FEAT_CONCEAL
+ if (!vim_isprintc_strict(*conceal_char))
+ {
+! emsg(_("E844: invalid cchar value"));
+ return NULL;
+ }
+ #endif
+***************
+*** 4705,4711 ****
+ {
+ if (opt->sync_idx == NULL)
+ {
+! EMSG(_("E393: group[t]here not accepted here"));
+ return NULL;
+ }
+ gname_start = arg;
+--- 4705,4711 ----
+ {
+ if (opt->sync_idx == NULL)
+ {
+! emsg(_("E393: group[t]here not accepted here"));
+ return NULL;
+ }
+ gname_start = arg;
+***************
+*** 4729,4735 ****
+ }
+ if (i < 0)
+ {
+! EMSG2(_("E394: Didn't find region item for %s"), gname);
+ vim_free(gname);
+ return NULL;
+ }
+--- 4729,4735 ----
+ }
+ if (i < 0)
+ {
+! semsg(_("E394: Didn't find region item for %s"), gname);
+ vim_free(gname);
+ return NULL;
+ }
+***************
+*** 4787,4793 ****
+ int sgl_id = 1;
+ char_u *group_name_end;
+ char_u *rest;
+! char_u *errormsg = NULL;
+ int prev_toplvl_grp;
+ int prev_syn_inc_tag;
+ int source = FALSE;
+--- 4787,4793 ----
+ int sgl_id = 1;
+ char_u *group_name_end;
+ char_u *rest;
+! char *errormsg = NULL;
+ int prev_toplvl_grp;
+ int prev_syn_inc_tag;
+ int source = FALSE;
+***************
+*** 4802,4808 ****
+ rest = get_group_name(arg, &group_name_end);
+ if (rest == NULL)
+ {
+! EMSG((char_u *)_("E397: Filename required"));
+ return;
+ }
+ sgl_id = syn_check_cluster(arg, (int)(group_name_end - arg));
+--- 4802,4808 ----
+ rest = get_group_name(arg, &group_name_end);
+ if (rest == NULL)
+ {
+! emsg(_("E397: Filename required"));
+ return;
+ }
+ sgl_id = syn_check_cluster(arg, (int)(group_name_end - arg));
+***************
+*** 4827,4833 ****
+ if (expand_filename(eap, syn_cmdlinep, &errormsg) == FAIL)
+ {
+ if (errormsg != NULL)
+! EMSG(errormsg);
+ return;
+ }
+ }
+--- 4827,4833 ----
+ if (expand_filename(eap, syn_cmdlinep, &errormsg) == FAIL)
+ {
+ if (errormsg != NULL)
+! emsg(errormsg);
+ return;
+ }
+ }
+***************
+*** 4838,4844 ****
+ */
+ if (running_syn_inc_tag >= MAX_SYN_INC_TAG)
+ {
+! EMSG((char_u *)_("E847: Too many syntax includes"));
+ return;
+ }
+ prev_syn_inc_tag = current_syn_inc_tag;
+--- 4838,4844 ----
+ */
+ if (running_syn_inc_tag >= MAX_SYN_INC_TAG)
+ {
+! emsg(_("E847: Too many syntax includes"));
+ return;
+ }
+ prev_syn_inc_tag = current_syn_inc_tag;
+***************
+*** 4847,4853 ****
+ curwin->w_s->b_syn_topgrp = sgl_id;
+ if (source ? do_source(eap->arg, FALSE, DOSO_NONE) == FAIL
+ : source_runtime(eap->arg, DIP_ALL) == FAIL)
+! EMSG2(_(e_notopen), eap->arg);
+ curwin->w_s->b_syn_topgrp = prev_toplvl_grp;
+ current_syn_inc_tag = prev_syn_inc_tag;
+ }
+--- 4847,4853 ----
+ curwin->w_s->b_syn_topgrp = sgl_id;
+ if (source ? do_source(eap->arg, FALSE, DOSO_NONE) == FAIL
+ : source_runtime(eap->arg, DIP_ALL) == FAIL)
+! semsg(_(e_notopen), eap->arg);
+ curwin->w_s->b_syn_topgrp = prev_toplvl_grp;
+ current_syn_inc_tag = prev_syn_inc_tag;
+ }
+***************
+*** 4934,4947 ****
+ break;
+ if (p[1] == NUL)
+ {
+! EMSG2(_("E789: Missing ']': %s"), kw);
+ goto error;
+ }
+ if (p[1] == ']')
+ {
+ if (p[2] != NUL)
+ {
+! EMSG3(_("E890: trailing char after ']': %s]%s"),
+ kw, &p[2]);
+ goto error;
+ }
+--- 4934,4947 ----
+ break;
+ if (p[1] == NUL)
+ {
+! semsg(_("E789: Missing ']': %s"), kw);
+ goto error;
+ }
+ if (p[1] == ']')
+ {
+ if (p[2] != NUL)
+ {
+! semsg(_("E890: trailing char after ']': %s]%s"),
+ kw, &p[2]);
+ goto error;
+ }
+***************
+*** 4975,4981 ****
+ if (rest != NULL)
+ eap->nextcmd = check_nextcmd(rest);
+ else
+! EMSG2(_(e_invarg2), arg);
+
+ redraw_curbuf_later(SOME_VALID);
+ syn_stack_free_all(curwin->w_s); /* Need to recompute all syntax. */
+--- 4975,4981 ----
+ if (rest != NULL)
+ eap->nextcmd = check_nextcmd(rest);
+ else
+! semsg(_(e_invarg2), arg);
+
+ redraw_curbuf_later(SOME_VALID);
+ syn_stack_free_all(curwin->w_s); /* Need to recompute all syntax. */
+***************
+*** 5083,5089 ****
+ vim_free(syn_opt_arg.next_list);
+
+ if (rest == NULL)
+! EMSG2(_(e_invarg2), arg);
+ }
+
+ /*
+--- 5083,5089 ----
+ vim_free(syn_opt_arg.next_list);
+
+ if (rest == NULL)
+! semsg(_(e_invarg2), arg);
+ }
+
+ /*
+***************
+*** 5184,5190 ****
+ if (*rest != '=')
+ {
+ rest = NULL;
+! EMSG2(_("E398: Missing '=': %s"), arg);
+ break;
+ }
+ rest = skipwhite(rest + 1);
+--- 5184,5190 ----
+ if (*rest != '=')
+ {
+ rest = NULL;
+! semsg(_("E398: Missing '=': %s"), arg);
+ break;
+ }
+ rest = skipwhite(rest + 1);
+***************
+*** 5347,5355 ****
+ vim_free(syn_opt_arg.cont_in_list);
+ vim_free(syn_opt_arg.next_list);
+ if (not_enough)
+! EMSG2(_("E399: Not enough arguments: syntax region %s"), arg);
+ else if (illegal || rest == NULL)
+! EMSG2(_(e_invarg2), arg);
+ }
+ }
+
+--- 5347,5355 ----
+ vim_free(syn_opt_arg.cont_in_list);
+ vim_free(syn_opt_arg.next_list);
+ if (not_enough)
+! semsg(_("E399: Not enough arguments: syntax region %s"), arg);
+ else if (illegal || rest == NULL)
+! semsg(_(e_invarg2), arg);
+ }
+ }
+
+***************
+*** 5578,5584 ****
+ len = curwin->w_s->b_syn_clusters.ga_len;
+ if (len >= MAX_CLUSTER_ID)
+ {
+! EMSG((char_u *)_("E848: Too many syntax clusters"));
+ vim_free(name);
+ return 0;
+ }
+--- 5578,5584 ----
+ len = curwin->w_s->b_syn_clusters.ga_len;
+ if (len >= MAX_CLUSTER_ID)
+ {
+! emsg(_("E848: Too many syntax clusters"));
+ vim_free(name);
+ return 0;
+ }
+***************
+*** 5661,5667 ****
+ clstr_list = NULL;
+ if (get_id_list(&rest, opt_len, &clstr_list, eap->skip) == FAIL)
+ {
+! EMSG2(_(e_invarg2), rest);
+ break;
+ }
+ if (scl_id >= 0)
+--- 5661,5667 ----
+ clstr_list = NULL;
+ if (get_id_list(&rest, opt_len, &clstr_list, eap->skip) == FAIL)
+ {
+! semsg(_(e_invarg2), rest);
+ break;
+ }
+ if (scl_id >= 0)
+***************
+*** 5680,5688 ****
+ }
+
+ if (!got_clstr)
+! EMSG(_("E400: No cluster specified"));
+ if (rest == NULL || !ends_excmd(*rest))
+! EMSG2(_(e_invarg2), arg);
+ }
+
+ /*
+--- 5680,5688 ----
+ }
+
+ if (!got_clstr)
+! emsg(_("E400: No cluster specified"));
+ if (rest == NULL || !ends_excmd(*rest))
+! semsg(_(e_invarg2), arg);
+ }
+
+ /*
+***************
+*** 5715,5721 ****
+ end = skip_regexp(arg + 1, *arg, TRUE, NULL);
+ if (*end != *arg) /* end delimiter not found */
+ {
+! EMSG2(_("E401: Pattern delimiter not found: %s"), arg);
+ return NULL;
+ }
+ /* store the pattern and compiled regexp program */
+--- 5715,5721 ----
+ end = skip_regexp(arg + 1, *arg, TRUE, NULL);
+ if (*end != *arg) /* end delimiter not found */
+ {
+! semsg(_("E401: Pattern delimiter not found: %s"), arg);
+ return NULL;
+ }
+ /* store the pattern and compiled regexp program */
+***************
+*** 5793,5799 ****
+
+ if (!ends_excmd(*end) && !VIM_ISWHITE(*end))
+ {
+! EMSG2(_("E402: Garbage after pattern: %s"), arg);
+ return NULL;
+ }
+ return skipwhite(end);
+--- 5793,5799 ----
+
+ if (!ends_excmd(*end) && !VIM_ISWHITE(*end))
+ {
+! semsg(_("E402: Garbage after pattern: %s"), arg);
+ return NULL;
+ }
+ return skipwhite(end);
+***************
+*** 5885,5891 ****
+ }
+ if (curwin->w_s->b_syn_linecont_pat != NULL)
+ {
+! EMSG(_("E403: syntax sync: line continuations pattern specified twice"));
+ finished = TRUE;
+ break;
+ }
+--- 5885,5891 ----
+ }
+ if (curwin->w_s->b_syn_linecont_pat != NULL)
+ {
+! emsg(_("E403: syntax sync: line continuations pattern specified twice"));
+ finished = TRUE;
+ break;
+ }
+***************
+*** 5944,5950 ****
+ }
+ vim_free(key);
+ if (illegal)
+! EMSG2(_("E404: Illegal arguments: %s"), arg_start);
+ else if (!finished)
+ {
+ eap->nextcmd = check_nextcmd(arg_start);
+--- 5944,5950 ----
+ }
+ vim_free(key);
+ if (illegal)
+! semsg(_("E404: Illegal arguments: %s"), arg_start);
+ else if (!finished)
+ {
+ eap->nextcmd = check_nextcmd(arg_start);
+***************
+*** 5995,6007 ****
+ p = skipwhite(*arg + keylen);
+ if (*p != '=')
+ {
+! EMSG2(_("E405: Missing equal sign: %s"), *arg);
+ break;
+ }
+ p = skipwhite(p + 1);
+ if (ends_excmd(*p))
+ {
+! EMSG2(_("E406: Empty argument: %s"), *arg);
+ break;
+ }
+
+--- 5995,6007 ----
+ p = skipwhite(*arg + keylen);
+ if (*p != '=')
+ {
+! semsg(_("E405: Missing equal sign: %s"), *arg);
+ break;
+ }
+ p = skipwhite(p + 1);
+ if (ends_excmd(*p))
+ {
+! semsg(_("E406: Empty argument: %s"), *arg);
+ break;
+ }
+
+***************
+*** 6027,6040 ****
+ {
+ if (TOUPPER_ASC(**arg) != 'C')
+ {
+! EMSG2(_("E407: %s not allowed here"), name + 1);
+ failed = TRUE;
+ vim_free(name);
+ break;
+ }
+ if (count != 0)
+ {
+! EMSG2(_("E408: %s must be first in contains list"),
+ name + 1);
+ failed = TRUE;
+ vim_free(name);
+--- 6027,6040 ----
+ {
+ if (TOUPPER_ASC(**arg) != 'C')
+ {
+! semsg(_("E407: %s not allowed here"), name + 1);
+ failed = TRUE;
+ vim_free(name);
+ break;
+ }
+ if (count != 0)
+ {
+! semsg(_("E408: %s must be first in contains list"),
+ name + 1);
+ failed = TRUE;
+ vim_free(name);
+***************
+*** 6108,6114 ****
+ vim_free(name);
+ if (id == 0)
+ {
+! EMSG2(_("E409: Unknown group name: %s"), p);
+ failed = TRUE;
+ break;
+ }
+--- 6108,6114 ----
+ vim_free(name);
+ if (id == 0)
+ {
+! semsg(_("E409: Unknown group name: %s"), p);
+ failed = TRUE;
+ break;
+ }
+***************
+*** 6343,6349 ****
+ {
+ if (subcommands[i].name == NULL)
+ {
+! EMSG2(_("E410: Invalid :syntax subcommand: %s"), subcmd_name);
+ break;
+ }
+ if (STRCMP(subcmd_name, (char_u *)subcommands[i].name) == 0)
+--- 6343,6349 ----
+ {
+ if (subcommands[i].name == NULL)
+ {
+! semsg(_("E410: Invalid :syntax subcommand: %s"), subcmd_name);
+ break;
+ }
+ if (STRCMP(subcmd_name, (char_u *)subcommands[i].name) == 0)
+***************
+*** 6648,6654 ****
+ else if (STRCMP(eap->arg, "report") == 0)
+ syntime_report();
+ else
+! EMSG2(_(e_invarg2), eap->arg);
+ }
+
+ static void
+--- 6648,6654 ----
+ else if (STRCMP(eap->arg, "report") == 0)
+ syntime_report();
+ else
+! semsg(_(e_invarg2), eap->arg);
+ }
+
+ static void
+***************
+*** 7158,7164 ****
+ static int recursive = 0;
+
+ if (recursive >= 5)
+! EMSG(_("E679: recursive loop loading syncolor.vim"));
+ else
+ {
+ ++recursive;
+--- 7158,7164 ----
+ static int recursive = 0;
+
+ if (recursive >= 5)
+! emsg(_("E679: recursive loop loading syncolor.vim"));
+ else
+ {
+ ++recursive;
+***************
+*** 7407,7413 ****
+ {
+ id = syn_namen2id(line, (int)(name_end - line));
+ if (id == 0)
+! EMSG2(_("E411: highlight group not found: %s"), line);
+ else
+ highlight_list_one(id);
+ return;
+--- 7407,7413 ----
+ {
+ id = syn_namen2id(line, (int)(name_end - line));
+ if (id == 0)
+! semsg(_("E411: highlight group not found: %s"), line);
+ else
+ highlight_list_one(id);
+ return;
+***************
+*** 7431,7444 ****
+
+ if (ends_excmd(*from_start) || ends_excmd(*to_start))
+ {
+! EMSG2(_("E412: Not enough arguments: \":highlight link %s\""),
+ from_start);
+ return;
+ }
+
+ if (!ends_excmd(*skipwhite(to_end)))
+ {
+! EMSG2(_("E413: Too many arguments: \":highlight link %s\""), from_start);
+ return;
+ }
+
+--- 7431,7444 ----
+
+ if (ends_excmd(*from_start) || ends_excmd(*to_start))
+ {
+! semsg(_("E412: Not enough arguments: \":highlight link %s\""),
+ from_start);
+ return;
+ }
+
+ if (!ends_excmd(*skipwhite(to_end)))
+ {
+! semsg(_("E413: Too many arguments: \":highlight link %s\""), from_start);
+ return;
+ }
+
+***************
+*** 7458,7464 ****
+ && hl_has_settings(from_id - 1, dodefault))
+ {
+ if (sourcing_name == NULL && !dodefault)
+! EMSG(_("E414: group has settings, highlight link ignored"));
+ }
+ else if (HL_TABLE()[from_id - 1].sg_link != to_id
+ #ifdef FEAT_EVAL
+--- 7458,7464 ----
+ && hl_has_settings(from_id - 1, dodefault))
+ {
+ if (sourcing_name == NULL && !dodefault)
+! emsg(_("E414: group has settings, highlight link ignored"));
+ }
+ else if (HL_TABLE()[from_id - 1].sg_link != to_id
+ #ifdef FEAT_EVAL
+***************
+*** 7605,7611 ****
+ key_start = linep;
+ if (*linep == '=')
+ {
+! EMSG2(_("E415: unexpected equal sign: %s"), key_start);
+ error = TRUE;
+ break;
+ }
+--- 7605,7611 ----
+ key_start = linep;
+ if (*linep == '=')
+ {
+! semsg(_("E415: unexpected equal sign: %s"), key_start);
+ error = TRUE;
+ break;
+ }
+***************
+*** 7641,7647 ****
+ */
+ if (*linep != '=')
+ {
+! EMSG2(_("E416: missing equal sign: %s"), key_start);
+ error = TRUE;
+ break;
+ }
+--- 7641,7647 ----
+ */
+ if (*linep != '=')
+ {
+! semsg(_("E416: missing equal sign: %s"), key_start);
+ error = TRUE;
+ break;
+ }
+***************
+*** 7657,7663 ****
+ linep = vim_strchr(linep, '\'');
+ if (linep == NULL)
+ {
+! EMSG2(_(e_invarg2), key_start);
+ error = TRUE;
+ break;
+ }
+--- 7657,7663 ----
+ linep = vim_strchr(linep, '\'');
+ if (linep == NULL)
+ {
+! semsg(_(e_invarg2), key_start);
+ error = TRUE;
+ break;
+ }
+***************
+*** 7669,7675 ****
+ }
+ if (linep == arg_start)
+ {
+! EMSG2(_("E417: missing argument: %s"), key_start);
+ error = TRUE;
+ break;
+ }
+--- 7669,7675 ----
+ }
+ if (linep == arg_start)
+ {
+! semsg(_("E417: missing argument: %s"), key_start);
+ error = TRUE;
+ break;
+ }
+***************
+*** 7706,7712 ****
+ }
+ if (i < 0)
+ {
+! EMSG2(_("E418: Illegal value: %s"), arg);
+ error = TRUE;
+ break;
+ }
+--- 7706,7712 ----
+ }
+ if (i < 0)
+ {
+! semsg(_("E418: Illegal value: %s"), arg);
+ error = TRUE;
+ break;
+ }
+***************
+*** 7831,7837 ****
+ color = cterm_normal_fg_color - 1;
+ else
+ {
+! EMSG(_("E419: FG color unknown"));
+ error = TRUE;
+ break;
+ }
+--- 7831,7837 ----
+ color = cterm_normal_fg_color - 1;
+ else
+ {
+! emsg(_("E419: FG color unknown"));
+ error = TRUE;
+ break;
+ }
+***************
+*** 7842,7848 ****
+ color = cterm_normal_bg_color - 1;
+ else
+ {
+! EMSG(_("E420: BG color unknown"));
+ error = TRUE;
+ break;
+ }
+--- 7842,7848 ----
+ color = cterm_normal_bg_color - 1;
+ else
+ {
+! emsg(_("E420: BG color unknown"));
+ error = TRUE;
+ break;
+ }
+***************
+*** 7866,7872 ****
+ break;
+ if (i < 0)
+ {
+! EMSG2(_("E421: Color name or number not recognized: %s"), key_start);
+ error = TRUE;
+ break;
+ }
+--- 7866,7872 ----
+ break;
+ if (i < 0)
+ {
+! semsg(_("E421: Color name or number not recognized: %s"), key_start);
+ error = TRUE;
+ break;
+ }
+***************
+*** 8113,8119 ****
+ /* Append it to the already found stuff */
+ if ((int)(STRLEN(buf) + STRLEN(p)) >= 99)
+ {
+! EMSG2(_("E422: terminal code too long: %s"), arg);
+ error = TRUE;
+ break;
+ }
+--- 8113,8119 ----
+ /* Append it to the already found stuff */
+ if ((int)(STRLEN(buf) + STRLEN(p)) >= 99)
+ {
+! semsg(_("E422: terminal code too long: %s"), arg);
+ error = TRUE;
+ break;
+ }
+***************
+*** 8160,8166 ****
+ }
+ else
+ {
+! EMSG2(_("E423: Illegal argument: %s"), key_start);
+ error = TRUE;
+ break;
+ }
+--- 8160,8166 ----
+ }
+ else
+ {
+! semsg(_("E423: Illegal argument: %s"), key_start);
+ error = TRUE;
+ break;
+ }
+***************
+*** 8827,8833 ****
+ */
+ if (recursive)
+ {
+! EMSG(_("E424: Too many different highlighting attributes in use"));
+ return 0;
+ }
+ recursive = TRUE;
+--- 8827,8833 ----
+ */
+ if (recursive)
+ {
+! emsg(_("E424: Too many different highlighting attributes in use"));
+ return 0;
+ }
+ recursive = TRUE;
+***************
+*** 9716,9722 ****
+ {
+ if (!vim_isprintc(*p))
+ {
+! EMSG(_("E669: Unprintable character in group name"));
+ vim_free(name);
+ return 0;
+ }
+--- 9716,9722 ----
+ {
+ if (!vim_isprintc(*p))
+ {
+! emsg(_("E669: Unprintable character in group name"));
+ vim_free(name);
+ return 0;
+ }
+***************
+*** 9741,9747 ****
+
+ if (highlight_ga.ga_len >= MAX_HL_ID)
+ {
+! EMSG(_("E849: Too many highlight and syntax groups"));
+ vim_free(name);
+ return 0;
+ }
+--- 9741,9747 ----
+
+ if (highlight_ga.ga_len >= MAX_HL_ID)
+ {
+! emsg(_("E849: Too many highlight and syntax groups"));
+ vim_free(name);
+ return 0;
+ }
+*** ../vim-8.1.0742/src/tag.c 2018-12-21 16:04:16.316437487 +0100
+--- src/tag.c 2019-01-13 19:57:42.397352867 +0100
+***************
+*** 279,285 ****
+ tagstacklen == 0)
+ {
+ /* empty stack */
+! EMSG(_(e_tagstack));
+ goto end_do_tag;
+ }
+
+--- 279,285 ----
+ tagstacklen == 0)
+ {
+ /* empty stack */
+! emsg(_(e_tagstack));
+ goto end_do_tag;
+ }
+
+***************
+*** 290,296 ****
+ #endif
+ if ((tagstackidx -= count) < 0)
+ {
+! EMSG(_(bottommsg));
+ if (tagstackidx + count == 0)
+ {
+ /* We did [num]^T from the bottom of the stack */
+--- 290,296 ----
+ #endif
+ if ((tagstackidx -= count) < 0)
+ {
+! emsg(_(bottommsg));
+ if (tagstackidx + count == 0)
+ {
+ /* We did [num]^T from the bottom of the stack */
+***************
+*** 304,310 ****
+ }
+ else if (tagstackidx >= tagstacklen) /* count == 0? */
+ {
+! EMSG(_(topmsg));
+ goto end_do_tag;
+ }
+
+--- 304,310 ----
+ }
+ else if (tagstackidx >= tagstacklen) /* count == 0? */
+ {
+! emsg(_(topmsg));
+ goto end_do_tag;
+ }
+
+***************
+*** 375,386 ****
+ * position.
+ */
+ tagstackidx = tagstacklen - 1;
+! EMSG(_(topmsg));
+ save_pos = FALSE;
+ }
+ else if (tagstackidx < 0) /* must have been count == 0 */
+ {
+! EMSG(_(bottommsg));
+ tagstackidx = 0;
+ goto end_do_tag;
+ }
+--- 375,386 ----
+ * position.
+ */
+ tagstackidx = tagstacklen - 1;
+! emsg(_(topmsg));
+ save_pos = FALSE;
+ }
+ else if (tagstackidx < 0) /* must have been count == 0 */
+ {
+! emsg(_(bottommsg));
+ tagstackidx = 0;
+ goto end_do_tag;
+ }
+***************
+*** 424,430 ****
+ cur_match = MAXCOL - 1;
+ else if (cur_match < 0)
+ {
+! EMSG(_("E425: Cannot go before first matching tag"));
+ skip_msg = TRUE;
+ cur_match = 0;
+ cur_fnum = curbuf->b_fnum;
+--- 424,430 ----
+ cur_match = MAXCOL - 1;
+ else if (cur_match < 0)
+ {
+! emsg(_("E425: Cannot go before first matching tag"));
+ skip_msg = TRUE;
+ cur_match = 0;
+ cur_fnum = curbuf->b_fnum;
+***************
+*** 566,572 ****
+ if (num_matches <= 0)
+ {
+ if (verbose)
+! EMSG2(_("E426: tag not found: %s"), name);
+ #if defined(FEAT_QUICKFIX)
+ g_do_tagpreview = 0;
+ #endif
+--- 566,572 ----
+ if (num_matches <= 0)
+ {
+ if (verbose)
+! semsg(_("E426: tag not found: %s"), name);
+ #if defined(FEAT_QUICKFIX)
+ g_do_tagpreview = 0;
+ #endif
+***************
+*** 950,963 ****
+ {
+ /* Avoid giving this error when a file wasn't found and we're
+ * looking for a match in another file, which wasn't found.
+! * There will be an EMSG("file doesn't exist") below then. */
+ if ((type == DT_NEXT || type == DT_FIRST)
+ && nofile_fname == NULL)
+ {
+ if (num_matches == 1)
+! EMSG(_("E427: There is only one matching tag"));
+ else
+! EMSG(_("E428: Cannot go beyond last matching tag"));
+ skip_msg = TRUE;
+ }
+ cur_match = num_matches - 1;
+--- 950,963 ----
+ {
+ /* Avoid giving this error when a file wasn't found and we're
+ * looking for a match in another file, which wasn't found.
+! * There will be an emsg("file doesn't exist") below then. */
+ if ((type == DT_NEXT || type == DT_FIRST)
+ && nofile_fname == NULL)
+ {
+ if (num_matches == 1)
+! emsg(_("E427: There is only one matching tag"));
+ else
+! emsg(_("E428: Cannot go beyond last matching tag"));
+ skip_msg = TRUE;
+ }
+ cur_match = num_matches - 1;
+***************
+*** 978,987 ****
+
+ /*
+ * Only when going to try the next match, report that the previous
+! * file didn't exist. Otherwise an EMSG() is given below.
+ */
+ if (nofile_fname != NULL && error_cur_match != cur_match)
+! smsg((char_u *)_("File \"%s\" does not exist"), nofile_fname);
+
+
+ ic = (matches[cur_match][0] & MT_IC_OFF);
+--- 978,987 ----
+
+ /*
+ * Only when going to try the next match, report that the previous
+! * file didn't exist. Otherwise an emsg() is given below.
+ */
+ if (nofile_fname != NULL && error_cur_match != cur_match)
+! smsg(_("File \"%s\" does not exist"), nofile_fname);
+
+
+ ic = (matches[cur_match][0] & MT_IC_OFF);
+***************
+*** 1053,1059 ****
+ }
+ continue;
+ }
+! EMSG2(_("E429: File \"%s\" does not exist"), nofile_fname);
+ }
+ else
+ {
+--- 1053,1059 ----
+ }
+ continue;
+ }
+! semsg(_("E429: File \"%s\" does not exist"), nofile_fname);
+ }
+ else
+ {
+***************
+*** 1577,1583 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Searching tags file %s"), tag_fname);
+ verbose_leave();
+ }
+ }
+--- 1577,1583 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! smsg(_("Searching tags file %s"), tag_fname);
+ verbose_leave();
+ }
+ }
+***************
+*** 1801,1807 ****
+ if (fp != NULL)
+ {
+ if (STRLEN(fullpath_ebuf) > LSIZE)
+! EMSG2(_("E430: Tag file path truncated for %s\n"), ebuf);
+ vim_strncpy(tag_fname, fullpath_ebuf,
+ MAXPATHL);
+ ++incstack_idx;
+--- 1801,1807 ----
+ if (fp != NULL)
+ {
+ if (STRLEN(fullpath_ebuf) > LSIZE)
+! semsg(_("E430: Tag file path truncated for %s\n"), ebuf);
+ vim_strncpy(tag_fname, fullpath_ebuf,
+ MAXPATHL);
+ ++incstack_idx;
+***************
+*** 2451,2461 ****
+
+ if (line_error)
+ {
+! EMSG2(_("E431: Format error in tags file \"%s\""), tag_fname);
+ #ifdef FEAT_CSCOPE
+ if (!use_cscope)
+ #endif
+! EMSGN(_("Before byte %ld"), (long)vim_ftell(fp));
+ stop_searching = TRUE;
+ line_error = FALSE;
+ }
+--- 2451,2461 ----
+
+ if (line_error)
+ {
+! semsg(_("E431: Format error in tags file \"%s\""), tag_fname);
+ #ifdef FEAT_CSCOPE
+ if (!use_cscope)
+ #endif
+! semsg(_("Before byte %ld"), (long)vim_ftell(fp));
+ stop_searching = TRUE;
+ line_error = FALSE;
+ }
+***************
+*** 2481,2487 ****
+ tag_file_sorted = NUL;
+ if (sort_error)
+ {
+! EMSG2(_("E432: Tags file not sorted: %s"), tag_fname);
+ sort_error = FALSE;
+ }
+ #endif
+--- 2481,2487 ----
+ tag_file_sorted = NUL;
+ if (sort_error)
+ {
+! semsg(_("E432: Tags file not sorted: %s"), tag_fname);
+ sort_error = FALSE;
+ }
+ #endif
+***************
+*** 2525,2531 ****
+ if (!stop_searching)
+ {
+ if (!did_open && verbose) /* never opened any tags file */
+! EMSG(_("E433: No tags file"));
+ retval = OK; /* It's OK even when no tag found */
+ }
+
+--- 2525,2531 ----
+ if (!stop_searching)
+ {
+ if (!did_open && verbose) /* never opened any tags file */
+! emsg(_("E433: No tags file"));
+ retval = OK; /* It's OK even when no tag found */
+ }
+
+***************
+*** 3370,3376 ****
+ }
+ if (found == 0)
+ {
+! EMSG(_("E434: Can't find tag pattern"));
+ curwin->w_cursor.lnum = save_lnum;
+ }
+ else
+--- 3370,3376 ----
+ }
+ if (found == 0)
+ {
+! emsg(_("E434: Can't find tag pattern"));
+ curwin->w_cursor.lnum = save_lnum;
+ }
+ else
+***************
+*** 3895,3901 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Duplicate field name: %s"), field_name);
+ verbose_leave();
+ }
+ return FAIL;
+--- 3895,3901 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg(_("Duplicate field name: %s"), field_name);
+ verbose_leave();
+ }
+ return FAIL;
+***************
+*** 4200,4206 ****
+ {
+ if (di->di_tv.v_type != VAR_LIST)
+ {
+! EMSG(_(e_listreq));
+ return FAIL;
+ }
+ l = di->di_tv.vval.v_list;
+--- 4200,4206 ----
+ {
+ if (di->di_tv.v_type != VAR_LIST)
+ {
+! emsg(_(e_listreq));
+ return FAIL;
+ }
+ l = di->di_tv.vval.v_list;
+*** ../vim-8.1.0742/src/term.c 2018-12-07 13:18:16.611655653 +0100
+--- src/term.c 2019-01-13 23:17:25.865051566 +0100
+***************
+*** 92,98 ****
+ static int term_7to8bit(char_u *p);
+
+ #ifdef HAVE_TGETENT
+! static char_u *tgetent_error(char_u *, char_u *);
+
+ /*
+ * Here is our own prototype for tgetstr(), any prototypes from the include
+--- 92,98 ----
+ static int term_7to8bit(char_u *p);
+
+ #ifdef HAVE_TGETENT
+! static char *tgetent_error(char_u *, char_u *);
+
+ /*
+ * Here is our own prototype for tgetstr(), any prototypes from the include
+***************
+*** 1357,1363 ****
+ t = termgui_mch_get_color(name);
+
+ if (t == INVALCOLOR)
+! EMSG2(_("E254: Cannot allocate color %s"), name);
+ return t;
+ }
+
+--- 1357,1363 ----
+ t = termgui_mch_get_color(name);
+
+ if (t == INVALCOLOR)
+! semsg(_("E254: Cannot allocate color %s"), name);
+ return t;
+ }
+
+***************
+*** 1696,1709 ****
+ #endif
+
+ static void
+! report_term_error(char_u *error_msg, char_u *term)
+ {
+ struct builtin_term *termp;
+
+ mch_errmsg("\r\n");
+ if (error_msg != NULL)
+ {
+! mch_errmsg((char *)error_msg);
+ mch_errmsg("\r\n");
+ }
+ mch_errmsg("'");
+--- 1696,1709 ----
+ #endif
+
+ static void
+! report_term_error(char *error_msg, char_u *term)
+ {
+ struct builtin_term *termp;
+
+ mch_errmsg("\r\n");
+ if (error_msg != NULL)
+ {
+! mch_errmsg(error_msg);
+ mch_errmsg("\r\n");
+ }
+ mch_errmsg("'");
+***************
+*** 1756,1762 ****
+ int termcap_cleared = FALSE;
+ #endif
+ int width = 0, height = 0;
+! char_u *error_msg = NULL;
+ char_u *bs_p, *del_p;
+
+ /* In silect mode (ex -s) we don't use the 'term' option. */
+--- 1756,1762 ----
+ int termcap_cleared = FALSE;
+ #endif
+ int width = 0, height = 0;
+! char *error_msg = NULL;
+ char_u *bs_p, *del_p;
+
+ /* In silect mode (ex -s) we don't use the 'term' option. */
+***************
+*** 2191,2197 ****
+ * Call tgetent()
+ * Return error message if it fails, NULL if it's OK.
+ */
+! static char_u *
+ tgetent_error(char_u *tbuf, char_u *term)
+ {
+ int i;
+--- 2191,2197 ----
+ * Call tgetent()
+ * Return error message if it fails, NULL if it's OK.
+ */
+! static char *
+ tgetent_error(char_u *tbuf, char_u *term)
+ {
+ int i;
+***************
+*** 2210,2222 ****
+
+ if (i < 0)
+ # ifdef TGETENT_ZERO_ERR
+! return (char_u *)_("E557: Cannot open termcap file");
+ if (i == 0)
+ # endif
+ #ifdef TERMINFO
+! return (char_u *)_("E558: Terminal entry not found in terminfo");
+ #else
+! return (char_u *)_("E559: Terminal entry not found in termcap");
+ #endif
+ }
+ return NULL;
+--- 2210,2222 ----
+
+ if (i < 0)
+ # ifdef TGETENT_ZERO_ERR
+! return _("E557: Cannot open termcap file");
+ if (i == 0)
+ # endif
+ #ifdef TERMINFO
+! return _("E558: Terminal entry not found in terminfo");
+ #else
+! return _("E559: Terminal entry not found in termcap");
+ #endif
+ }
+ return NULL;
+***************
+*** 2282,2288 ****
+ char_u tbuf[TBUFSZ];
+ char_u tstrbuf[TBUFSZ];
+ char_u *tp = tstrbuf;
+! char_u *error_msg = NULL;
+ #endif
+
+ /*
+--- 2282,2288 ----
+ char_u tbuf[TBUFSZ];
+ char_u tstrbuf[TBUFSZ];
+ char_u *tp = tstrbuf;
+! char *error_msg = NULL;
+ #endif
+
+ /*
+***************
+*** 2369,2378 ****
+ {
+ #ifdef HAVE_TGETENT
+ if (error_msg != NULL)
+! EMSG(error_msg);
+ else
+ #endif
+! EMSG2(_("E436: No \"%s\" entry in termcap"), name);
+ }
+ return FAIL;
+ }
+--- 2369,2378 ----
+ {
+ #ifdef HAVE_TGETENT
+ if (error_msg != NULL)
+! emsg(error_msg);
+ else
+ #endif
+! semsg(_("E436: No \"%s\" entry in termcap"), name);
+ }
+ return FAIL;
+ }
+***************
+*** 3055,3061 ****
+ * MUST have "cm": cursor motion.
+ */
+ if (*T_CM == NUL)
+! EMSG(_("E437: terminal capability \"cm\" required"));
+
+ /*
+ * if "cs" defined, use a scroll region, it's faster.
+--- 3055,3061 ----
+ * MUST have "cm": cursor motion.
+ */
+ if (*T_CM == NUL)
+! emsg(_("E437: terminal capability \"cm\" required"));
+
+ /*
+ * if "cs" defined, use a scroll region, it's faster.
+***************
+*** 6153,6159 ****
+ if (STRNICMP(src, "<SID>", 5) == 0)
+ {
+ if (current_sctx.sc_sid <= 0)
+! EMSG(_(e_usingsid));
+ else
+ {
+ src += 5;
+--- 6153,6159 ----
+ if (STRNICMP(src, "<SID>", 5) == 0)
+ {
+ if (current_sctx.sc_sid <= 0)
+! emsg(_(e_usingsid));
+ else
+ {
+ src += 5;
+*** ../vim-8.1.0742/src/terminal.c 2019-01-03 22:19:22.231686171 +0100
+--- src/terminal.c 2019-01-13 19:57:49.569292936 +0100
+***************
+*** 377,383 ****
+ || (!(opt->jo_set & JO_OUT_IO) && (opt->jo_set & JO_OUT_BUF))
+ || (!(opt->jo_set & JO_ERR_IO) && (opt->jo_set & JO_ERR_BUF)))
+ {
+! EMSG(_(e_invarg));
+ return NULL;
+ }
+
+--- 377,383 ----
+ || (!(opt->jo_set & JO_OUT_IO) && (opt->jo_set & JO_OUT_BUF))
+ || (!(opt->jo_set & JO_ERR_IO) && (opt->jo_set & JO_ERR_BUF)))
+ {
+! emsg(_(e_invarg));
+ return NULL;
+ }
+
+***************
+*** 719,725 ****
+ {
+ if (*p)
+ *p = NUL;
+! EMSG2(_("E181: Invalid attribute: %s"), cmd);
+ goto theend;
+ }
+ cmd = skipwhite(p);
+--- 719,725 ----
+ {
+ if (*p)
+ *p = NUL;
+! semsg(_("E181: Invalid attribute: %s"), cmd);
+ goto theend;
+ }
+ cmd = skipwhite(p);
+***************
+*** 3487,3493 ****
+ && (var->di_tv.v_type != VAR_LIST
+ || var->di_tv.vval.v_list == NULL
+ || set_ansi_colors_list(vterm, var->di_tv.vval.v_list) == FAIL))
+! EMSG2(_(e_invarg2), "g:terminal_ansi_colors");
+ }
+ #endif
+
+--- 3487,3493 ----
+ && (var->di_tv.v_type != VAR_LIST
+ || var->di_tv.vval.v_list == NULL
+ || set_ansi_colors_list(vterm, var->di_tv.vval.v_list) == FAIL))
+! semsg(_(e_invarg2), "g:terminal_ansi_colors");
+ }
+ #endif
+
+***************
+*** 3914,3920 ****
+ term = buf->b_term;
+ if (term->tl_vterm == NULL)
+ {
+! EMSG(_("E958: Job already finished"));
+ return;
+ }
+
+--- 3914,3920 ----
+ term = buf->b_term;
+ if (term->tl_vterm == NULL)
+ {
+! emsg(_("E958: Job already finished"));
+ return;
+ }
+
+***************
+*** 3924,3930 ****
+
+ if (argvars[2].v_type != VAR_DICT)
+ {
+! EMSG(_(e_dictreq));
+ return;
+ }
+ d = argvars[2].vval.v_dict;
+--- 3924,3930 ----
+
+ if (argvars[2].v_type != VAR_DICT)
+ {
+! emsg(_(e_dictreq));
+ return;
+ }
+ d = argvars[2].vval.v_dict;
+***************
+*** 3940,3952 ****
+ return;
+ if (mch_stat((char *)fname, &st) >= 0)
+ {
+! EMSG2(_("E953: File exists: %s"), fname);
+ return;
+ }
+
+ if (*fname == NUL || (fd = mch_fopen((char *)fname, WRITEBIN)) == NULL)
+ {
+! EMSG2(_(e_notcreate), *fname == NUL ? (char_u *)_("<empty>") : fname);
+ return;
+ }
+
+--- 3940,3952 ----
+ return;
+ if (mch_stat((char *)fname, &st) >= 0)
+ {
+! semsg(_("E953: File exists: %s"), fname);
+ return;
+ }
+
+ if (*fname == NUL || (fd = mch_fopen((char *)fname, WRITEBIN)) == NULL)
+ {
+! semsg(_(e_notcreate), *fname == NUL ? (char_u *)_("<empty>") : fname);
+ return;
+ }
+
+***************
+*** 4389,4401 ****
+ fname2 = tv_get_string_buf_chk(&argvars[1], buf2);
+ if (fname1 == NULL || (do_diff && fname2 == NULL))
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+ fd1 = mch_fopen((char *)fname1, READBIN);
+ if (fd1 == NULL)
+ {
+! EMSG2(_(e_notread), fname1);
+ return;
+ }
+ if (do_diff)
+--- 4389,4401 ----
+ fname2 = tv_get_string_buf_chk(&argvars[1], buf2);
+ if (fname1 == NULL || (do_diff && fname2 == NULL))
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+ fd1 = mch_fopen((char *)fname1, READBIN);
+ if (fd1 == NULL)
+ {
+! semsg(_(e_notread), fname1);
+ return;
+ }
+ if (do_diff)
+***************
+*** 4404,4410 ****
+ if (fd2 == NULL)
+ {
+ fclose(fd1);
+! EMSG2(_(e_notread), fname2);
+ return;
+ }
+ }
+--- 4404,4410 ----
+ if (fd2 == NULL)
+ {
+ fclose(fd1);
+! semsg(_(e_notread), fname2);
+ return;
+ }
+ }
+***************
+*** 4922,4928 ****
+
+ if (buf == NULL)
+ {
+! EMSG(_("E955: Not a terminal buffer"));
+ return;
+ }
+ if (buf->b_term->tl_vterm == NULL)
+--- 4922,4928 ----
+
+ if (buf == NULL)
+ {
+! emsg(_("E955: Not a terminal buffer"));
+ return;
+ }
+ if (buf->b_term->tl_vterm == NULL)
+***************
+*** 5007,5013 ****
+ p = buf->b_term->tl_job->jv_tty_in;
+ break;
+ default:
+! EMSG2(_(e_invarg2), tv_get_string(&argvars[1]));
+ return;
+ }
+ if (p != NULL)
+--- 5007,5013 ----
+ p = buf->b_term->tl_job->jv_tty_in;
+ break;
+ default:
+! semsg(_(e_invarg2), tv_get_string(&argvars[1]));
+ return;
+ }
+ if (p != NULL)
+***************
+*** 5236,5247 ****
+
+ if (argvars[1].v_type != VAR_LIST || argvars[1].vval.v_list == NULL)
+ {
+! EMSG(_(e_listreq));
+ return;
+ }
+
+ if (set_ansi_colors_list(term->tl_vterm, argvars[1].vval.v_list) == FAIL)
+! EMSG(_(e_invarg));
+ }
+ #endif
+
+--- 5236,5247 ----
+
+ if (argvars[1].v_type != VAR_LIST || argvars[1].vval.v_list == NULL)
+ {
+! emsg(_(e_listreq));
+ return;
+ }
+
+ if (set_ansi_colors_list(term->tl_vterm, argvars[1].vval.v_list) == FAIL)
+! emsg(_(e_invarg));
+ }
+ #endif
+
+***************
+*** 5485,5491 ****
+ if (!hWinPtyDLL)
+ {
+ if (verbose)
+! EMSG2(_(e_loadlib), *p_winptydll != NUL ? p_winptydll
+ : (char_u *)WINPTY_DLL);
+ return FAIL;
+ }
+--- 5485,5491 ----
+ if (!hWinPtyDLL)
+ {
+ if (verbose)
+! semsg(_(e_loadlib), *p_winptydll != NUL ? p_winptydll
+ : (char_u *)WINPTY_DLL);
+ return FAIL;
+ }
+***************
+*** 5496,5502 ****
+ winpty_entry[i].name)) == NULL)
+ {
+ if (verbose)
+! EMSG2(_(e_loadfunc), winpty_entry[i].name);
+ return FAIL;
+ }
+ }
+--- 5496,5502 ----
+ winpty_entry[i].name)) == NULL)
+ {
+ if (verbose)
+! semsg(_(e_loadfunc), winpty_entry[i].name);
+ return FAIL;
+ }
+ }
+***************
+*** 5548,5554 ****
+ }
+ if (cmd == NULL || *cmd == NUL)
+ {
+! EMSG(_(e_invarg));
+ goto failed;
+ }
+
+--- 5548,5554 ----
+ }
+ if (cmd == NULL || *cmd == NUL)
+ {
+! emsg(_(e_invarg));
+ goto failed;
+ }
+
+***************
+*** 5680,5686 ****
+ ch_log(channel, "Opening output file %s", fname);
+ term->tl_out_fd = mch_fopen((char *)fname, WRITEBIN);
+ if (term->tl_out_fd == NULL)
+! EMSG2(_(e_notopen), fname);
+ }
+
+ return OK;
+--- 5680,5686 ----
+ ch_log(channel, "Opening output file %s", fname);
+ term->tl_out_fd = mch_fopen((char *)fname, WRITEBIN);
+ if (term->tl_out_fd == NULL)
+! semsg(_(e_notopen), fname);
+ }
+
+ return OK;
+***************
+*** 5713,5719 ****
+ char_u *msg = utf16_to_enc(
+ (short_u *)winpty_error_msg(winpty_err), NULL);
+
+! EMSG(msg);
+ winpty_error_free(winpty_err);
+ }
+ return FAIL;
+--- 5713,5719 ----
+ char_u *msg = utf16_to_enc(
+ (short_u *)winpty_error_msg(winpty_err), NULL);
+
+! emsg(msg);
+ winpty_error_free(winpty_err);
+ }
+ return FAIL;
+*** ../vim-8.1.0742/src/textprop.c 2019-01-08 20:14:31.614957028 +0100
+--- src/textprop.c 2019-01-13 19:57:53.269262041 +0100
+***************
+*** 19,25 ****
+ * TODO:
+ * - Adjust text property column and length when text is inserted/deleted.
+ * -> a :substitute with a multi-line match
+! * -> search for changed_bytes() from ex_cmds.c
+ * - Perhaps we only need TP_FLAG_CONT_NEXT and can drop TP_FLAG_CONT_PREV?
+ * - Add an arrray for global_proptypes, to quickly lookup a prop type by ID
+ * - Add an arrray for b_proptypes, to quickly lookup a prop type by ID
+--- 19,25 ----
+ * TODO:
+ * - Adjust text property column and length when text is inserted/deleted.
+ * -> a :substitute with a multi-line match
+! * -> search for changed_bytes() from misc1.c
+ * - Perhaps we only need TP_FLAG_CONT_NEXT and can drop TP_FLAG_CONT_PREV?
+ * - Add an arrray for global_proptypes, to quickly lookup a prop type by ID
+ * - Add an arrray for b_proptypes, to quickly lookup a prop type by ID
+***************
+*** 106,112 ****
+ if (type == NULL)
+ type = find_prop(name, NULL);
+ if (type == NULL)
+! EMSG2(_(e_type_not_exist), name);
+ return type;
+ }
+
+--- 106,112 ----
+ if (type == NULL)
+ type = find_prop(name, NULL);
+ if (type == NULL)
+! semsg(_(e_type_not_exist), name);
+ return type;
+ }
+
+***************
+*** 124,130 ****
+
+ if (arg->v_type != VAR_DICT)
+ {
+! EMSG(_(e_dictreq));
+ return FAIL;
+ }
+ if (arg->vval.v_dict == NULL)
+--- 124,130 ----
+
+ if (arg->v_type != VAR_DICT)
+ {
+! emsg(_(e_dictreq));
+ return FAIL;
+ }
+ if (arg->vval.v_dict == NULL)
+***************
+*** 167,185 ****
+ start_col = tv_get_number(&argvars[1]);
+ if (start_col < 1)
+ {
+! EMSGN(_(e_invalid_col), (long)start_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 = dict_get_string(dict, (char_u *)"type", FALSE);
+--- 167,185 ----
+ start_col = tv_get_number(&argvars[1]);
+ if (start_col < 1)
+ {
+! semsg(_(e_invalid_col), (long)start_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 = dict_get_string(dict, (char_u *)"type", FALSE);
+***************
+*** 189,195 ****
+ end_lnum = dict_get_number(dict, (char_u *)"end_lnum");
+ if (end_lnum < start_lnum)
+ {
+! EMSG2(_(e_invargval), "end_lnum");
+ return;
+ }
+ }
+--- 189,195 ----
+ end_lnum = dict_get_number(dict, (char_u *)"end_lnum");
+ if (end_lnum < start_lnum)
+ {
+! semsg(_(e_invargval), "end_lnum");
+ return;
+ }
+ }
+***************
+*** 202,208 ****
+
+ if (length < 0 || end_lnum > start_lnum)
+ {
+! EMSG2(_(e_invargval), "length");
+ return;
+ }
+ end_col = start_col + length;
+--- 202,208 ----
+
+ if (length < 0 || end_lnum > start_lnum)
+ {
+! semsg(_(e_invargval), "length");
+ return;
+ }
+ end_col = start_col + length;
+***************
+*** 212,218 ****
+ end_col = dict_get_number(dict, (char_u *)"end_col");
+ if (end_col <= 0)
+ {
+! EMSG2(_(e_invargval), "end_col");
+ return;
+ }
+ }
+--- 212,218 ----
+ end_col = dict_get_number(dict, (char_u *)"end_col");
+ if (end_col <= 0)
+ {
+! semsg(_(e_invargval), "end_col");
+ return;
+ }
+ }
+***************
+*** 233,244 ****
+
+ if (start_lnum < 1 || start_lnum > buf->b_ml.ml_line_count)
+ {
+! EMSGN(_(e_invalid_lnum), (long)start_lnum);
+ return;
+ }
+ if (end_lnum < start_lnum || end_lnum > buf->b_ml.ml_line_count)
+ {
+! EMSGN(_(e_invalid_lnum), (long)end_lnum);
+ return;
+ }
+
+--- 233,244 ----
+
+ if (start_lnum < 1 || start_lnum > buf->b_ml.ml_line_count)
+ {
+! semsg(_(e_invalid_lnum), (long)start_lnum);
+ return;
+ }
+ if (end_lnum < start_lnum || end_lnum > buf->b_ml.ml_line_count)
+ {
+! semsg(_(e_invalid_lnum), (long)end_lnum);
+ return;
+ }
+
+***************
+*** 257,263 ****
+ col = 1;
+ if (col - 1 > (colnr_T)textlen)
+ {
+! EMSGN(_(e_invalid_col), (long)start_col);
+ return;
+ }
+
+--- 257,263 ----
+ col = 1;
+ if (col - 1 > (colnr_T)textlen)
+ {
+! semsg(_(e_invalid_col), (long)start_col);
+ return;
+ }
+
+***************
+*** 340,346 ****
+ 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)
+--- 340,346 ----
+ 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)
+***************
+*** 440,446 ****
+ }
+ if (start < 1 || end < 1)
+ {
+! EMSG(_(e_invrange));
+ return;
+ }
+
+--- 440,446 ----
+ }
+ if (start < 1 || end < 1)
+ {
+! emsg(_(e_invrange));
+ return;
+ }
+
+***************
+*** 487,493 ****
+ }
+ if (lnum < 1 || lnum > buf->b_ml.ml_line_count)
+ {
+! EMSG(_(e_invrange));
+ return;
+ }
+
+--- 487,493 ----
+ }
+ if (lnum < 1 || lnum > buf->b_ml.ml_line_count)
+ {
+! emsg(_(e_invrange));
+ return;
+ }
+
+***************
+*** 542,548 ****
+ rettv->vval.v_number = 0;
+ if (argvars[0].v_type != VAR_DICT || argvars[0].vval.v_dict == NULL)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 542,548 ----
+ rettv->vval.v_number = 0;
+ if (argvars[0].v_type != VAR_DICT || argvars[0].vval.v_dict == NULL)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 554,560 ****
+ end = tv_get_number(&argvars[2]);
+ if (start < 1 || end < 1)
+ {
+! EMSG(_(e_invrange));
+ return;
+ }
+ }
+--- 554,560 ----
+ end = tv_get_number(&argvars[2]);
+ if (start < 1 || end < 1)
+ {
+! emsg(_(e_invrange));
+ return;
+ }
+ }
+***************
+*** 585,591 ****
+ }
+ if (id == -1 && type_id == -1)
+ {
+! EMSG(_("E968: Need at least one of 'id' or 'type'"));
+ return;
+ }
+
+--- 585,591 ----
+ }
+ if (id == -1 && type_id == -1)
+ {
+! emsg(_("E968: Need at least one of 'id' or 'type'"));
+ return;
+ }
+
+***************
+*** 661,667 ****
+ name = tv_get_string(&argvars[0]);
+ if (*name == NUL)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 661,667 ----
+ name = tv_get_string(&argvars[0]);
+ if (*name == NUL)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 676,682 ****
+
+ if (prop != NULL)
+ {
+! EMSG2(_("E969: Property type %s already defined"), name);
+ return;
+ }
+ prop = (proptype_T *)alloc_clear((int)(sizeof(proptype_T) + STRLEN(name)));
+--- 676,682 ----
+
+ if (prop != NULL)
+ {
+! semsg(_("E969: Property type %s already defined"), name);
+ return;
+ }
+ prop = (proptype_T *)alloc_clear((int)(sizeof(proptype_T) + STRLEN(name)));
+***************
+*** 701,707 ****
+ {
+ if (prop == NULL)
+ {
+! EMSG2(_(e_type_not_exist), name);
+ return;
+ }
+ }
+--- 701,707 ----
+ {
+ if (prop == NULL)
+ {
+! semsg(_(e_type_not_exist), name);
+ return;
+ }
+ }
+***************
+*** 719,725 ****
+ hl_id = syn_name2id(highlight);
+ if (hl_id <= 0)
+ {
+! EMSG2(_("E970: Unknown highlight group name: '%s'"),
+ highlight == NULL ? (char_u *)"" : highlight);
+ return;
+ }
+--- 719,725 ----
+ hl_id = syn_name2id(highlight);
+ if (hl_id <= 0)
+ {
+! semsg(_("E970: Unknown highlight group name: '%s'"),
+ highlight == NULL ? (char_u *)"" : highlight);
+ return;
+ }
+***************
+*** 781,787 ****
+ name = tv_get_string(&argvars[0]);
+ if (*name == NUL)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+
+--- 781,787 ----
+ name = tv_get_string(&argvars[0]);
+ if (*name == NUL)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+
+***************
+*** 816,822 ****
+
+ if (*name == NUL)
+ {
+! EMSG(_(e_invarg));
+ return;
+ }
+ if (rettv_dict_alloc(rettv) == OK)
+--- 816,822 ----
+
+ if (*name == NUL)
+ {
+! emsg(_(e_invarg));
+ return;
+ }
+ if (rettv_dict_alloc(rettv) == OK)
+*** ../vim-8.1.0742/src/ui.c 2019-01-09 22:24:46.568161097 +0100
+--- src/ui.c 2019-01-13 19:57:57.093230132 +0100
+***************
+*** 337,343 ****
+ suspend_shell(void)
+ {
+ if (*p_sh == NUL)
+! EMSG(_(e_shellempty));
+ else
+ {
+ MSG_PUTS(_("new shell started\n"));
+--- 337,343 ----
+ suspend_shell(void)
+ {
+ if (*p_sh == NUL)
+! emsg(_(e_shellempty));
+ else
+ {
+ MSG_PUTS(_("new shell started\n"));
+*** ../vim-8.1.0742/src/undo.c 2019-01-08 20:14:31.614957028 +0100
+--- src/undo.c 2019-01-13 19:58:00.577201071 +0100
+***************
+*** 158,187 ****
+ ++header_count;
+ if (uhp == curbuf->b_u_curhead && ++seen_b_u_curhead > 1)
+ {
+! EMSG("b_u_curhead found twice (looping?)");
+ return;
+ }
+ if (uhp == curbuf->b_u_newhead && ++seen_b_u_newhead > 1)
+ {
+! EMSG("b_u_newhead found twice (looping?)");
+ return;
+ }
+
+ if (uhp->uh_magic != UH_MAGIC)
+! EMSG("uh_magic wrong (may be using freed memory)");
+ else
+ {
+ /* Check pointers back are correct. */
+ if (uhp->uh_next.ptr != exp_uh_next)
+ {
+! EMSG("uh_next wrong");
+! smsg((char_u *)"expected: 0x%x, actual: 0x%x",
+ exp_uh_next, uhp->uh_next.ptr);
+ }
+ if (uhp->uh_alt_prev.ptr != exp_uh_alt_prev)
+ {
+! EMSG("uh_alt_prev wrong");
+! smsg((char_u *)"expected: 0x%x, actual: 0x%x",
+ exp_uh_alt_prev, uhp->uh_alt_prev.ptr);
+ }
+
+--- 158,187 ----
+ ++header_count;
+ if (uhp == curbuf->b_u_curhead && ++seen_b_u_curhead > 1)
+ {
+! emsg("b_u_curhead found twice (looping?)");
+ return;
+ }
+ if (uhp == curbuf->b_u_newhead && ++seen_b_u_newhead > 1)
+ {
+! emsg("b_u_newhead found twice (looping?)");
+ return;
+ }
+
+ if (uhp->uh_magic != UH_MAGIC)
+! emsg("uh_magic wrong (may be using freed memory)");
+ else
+ {
+ /* Check pointers back are correct. */
+ if (uhp->uh_next.ptr != exp_uh_next)
+ {
+! emsg("uh_next wrong");
+! smsg("expected: 0x%x, actual: 0x%x",
+ exp_uh_next, uhp->uh_next.ptr);
+ }
+ if (uhp->uh_alt_prev.ptr != exp_uh_alt_prev)
+ {
+! emsg("uh_alt_prev wrong");
+! smsg("expected: 0x%x, actual: 0x%x",
+ exp_uh_alt_prev, uhp->uh_alt_prev.ptr);
+ }
+
+***************
+*** 190,196 ****
+ {
+ if (uep->ue_magic != UE_MAGIC)
+ {
+! EMSG("ue_magic wrong (may be using freed memory)");
+ break;
+ }
+ }
+--- 190,196 ----
+ {
+ if (uep->ue_magic != UE_MAGIC)
+ {
+! emsg("ue_magic wrong (may be using freed memory)");
+ break;
+ }
+ }
+***************
+*** 214,226 ****
+
+ if (seen_b_u_newhead == 0 && curbuf->b_u_oldhead != NULL
+ && !(newhead_may_be_NULL && curbuf->b_u_newhead == NULL))
+! EMSGN("b_u_newhead invalid: 0x%x", curbuf->b_u_newhead);
+ if (curbuf->b_u_curhead != NULL && seen_b_u_curhead == 0)
+! EMSGN("b_u_curhead invalid: 0x%x", curbuf->b_u_curhead);
+ if (header_count != curbuf->b_u_numhead)
+ {
+! EMSG("b_u_numhead invalid");
+! smsg((char_u *)"expected: %ld, actual: %ld",
+ (long)header_count, (long)curbuf->b_u_numhead);
+ }
+ }
+--- 214,226 ----
+
+ if (seen_b_u_newhead == 0 && curbuf->b_u_oldhead != NULL
+ && !(newhead_may_be_NULL && curbuf->b_u_newhead == NULL))
+! semsg("b_u_newhead invalid: 0x%x", curbuf->b_u_newhead);
+ if (curbuf->b_u_curhead != NULL && seen_b_u_curhead == 0)
+! semsg("b_u_curhead invalid: 0x%x", curbuf->b_u_curhead);
+ if (header_count != curbuf->b_u_numhead)
+ {
+! emsg("b_u_numhead invalid");
+! smsg("expected: %ld, actual: %ld",
+ (long)header_count, (long)curbuf->b_u_numhead);
+ }
+ }
+***************
+*** 316,322 ****
+ /* Don't allow changes when 'modifiable' is off. */
+ if (!curbuf->b_p_ma)
+ {
+! EMSG(_(e_modifiable));
+ return FALSE;
+ }
+
+--- 316,322 ----
+ /* Don't allow changes when 'modifiable' is off. */
+ if (!curbuf->b_p_ma)
+ {
+! emsg(_(e_modifiable));
+ return FALSE;
+ }
+
+***************
+*** 324,330 ****
+ /* In the sandbox it's not allowed to change the text. */
+ if (sandbox != 0)
+ {
+! EMSG(_(e_sandbox));
+ return FALSE;
+ }
+ #endif
+--- 324,330 ----
+ /* In the sandbox it's not allowed to change the text. */
+ if (sandbox != 0)
+ {
+! emsg(_(e_sandbox));
+ return FALSE;
+ }
+ #endif
+***************
+*** 333,339 ****
+ * caller of getcmdline() may get confused. */
+ if (textlock != 0)
+ {
+! EMSG(_(e_secure));
+ return FALSE;
+ }
+
+--- 333,339 ----
+ * caller of getcmdline() may get confused. */
+ if (textlock != 0)
+ {
+! emsg(_(e_secure));
+ return FALSE;
+ }
+
+***************
+*** 413,424 ****
+ {
+ if (netbeans_is_guarded(top, bot))
+ {
+! EMSG(_(e_guarded));
+ return FAIL;
+ }
+ if (curbuf->b_p_ro)
+ {
+! EMSG(_(e_nbreadonly));
+ return FAIL;
+ }
+ }
+--- 413,424 ----
+ {
+ if (netbeans_is_guarded(top, bot))
+ {
+! emsg(_(e_guarded));
+ return FAIL;
+ }
+ if (curbuf->b_p_ro)
+ {
+! emsg(_(e_nbreadonly));
+ return FAIL;
+ }
+ }
+***************
+*** 439,445 ****
+ {
+ /* This happens when the FileChangedRO autocommand changes the
+ * file in a way it becomes shorter. */
+! EMSG(_("E881: Line count changed unexpectedly"));
+ return FAIL;
+ }
+ }
+--- 439,445 ----
+ {
+ /* This happens when the FileChangedRO autocommand changes the
+ * file in a way it becomes shorter. */
+! emsg(_("E881: Line count changed unexpectedly"));
+ return FAIL;
+ }
+ }
+***************
+*** 861,867 ****
+ static void
+ corruption_error(char *mesg, char_u *file_name)
+ {
+! EMSG3(_("E825: Corrupted undo file (%s): %s"), mesg, file_name);
+ }
+
+ static void
+--- 861,867 ----
+ static void
+ corruption_error(char *mesg, char_u *file_name)
+ {
+! semsg(_("E825: Corrupted undo file (%s): %s"), mesg, file_name);
+ }
+
+ static void
+***************
+*** 1553,1559 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg((char_u *)
+ _("Cannot write undo file in any directory in 'undodir'"));
+ verbose_leave();
+ }
+--- 1553,1559 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg(
+ _("Cannot write undo file in any directory in 'undodir'"));
+ verbose_leave();
+ }
+***************
+*** 1601,1607 ****
+ {
+ if (name == NULL)
+ verbose_enter();
+! smsg((char_u *)
+ _("Will not overwrite with undo file, cannot read: %s"),
+ file_name);
+ if (name == NULL)
+--- 1601,1607 ----
+ {
+ if (name == NULL)
+ verbose_enter();
+! smsg(
+ _("Will not overwrite with undo file, cannot read: %s"),
+ file_name);
+ if (name == NULL)
+***************
+*** 1623,1629 ****
+ {
+ if (name == NULL)
+ verbose_enter();
+! smsg((char_u *)
+ _("Will not overwrite, this is not an undo file: %s"),
+ file_name);
+ if (name == NULL)
+--- 1623,1629 ----
+ {
+ if (name == NULL)
+ verbose_enter();
+! smsg(
+ _("Will not overwrite, this is not an undo file: %s"),
+ file_name);
+ if (name == NULL)
+***************
+*** 1649,1662 ****
+ O_CREAT|O_EXTRA|O_WRONLY|O_EXCL|O_NOFOLLOW, perm);
+ if (fd < 0)
+ {
+! EMSG2(_(e_not_open), file_name);
+ goto theend;
+ }
+ (void)mch_setperm(file_name, perm);
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Writing undo file: %s"), file_name);
+ verbose_leave();
+ }
+
+--- 1649,1662 ----
+ O_CREAT|O_EXTRA|O_WRONLY|O_EXCL|O_NOFOLLOW, perm);
+ if (fd < 0)
+ {
+! semsg(_(e_not_open), file_name);
+ goto theend;
+ }
+ (void)mch_setperm(file_name, perm);
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg(_("Writing undo file: %s"), file_name);
+ verbose_leave();
+ }
+
+***************
+*** 1688,1694 ****
+ fp = fdopen(fd, "w");
+ if (fp == NULL)
+ {
+! EMSG2(_(e_not_open), file_name);
+ close(fd);
+ mch_remove(file_name);
+ goto theend;
+--- 1688,1694 ----
+ fp = fdopen(fd, "w");
+ if (fp == NULL)
+ {
+! semsg(_(e_not_open), file_name);
+ close(fd);
+ mch_remove(file_name);
+ goto theend;
+***************
+*** 1743,1750 ****
+ #ifdef U_DEBUG
+ if (headers_written != buf->b_u_numhead)
+ {
+! EMSGN("Written %ld headers, ...", headers_written);
+! EMSGN("... but numhead is %ld", buf->b_u_numhead);
+ }
+ #endif
+
+--- 1743,1750 ----
+ #ifdef U_DEBUG
+ if (headers_written != buf->b_u_numhead)
+ {
+! semsg("Written %ld headers, ...", headers_written);
+! semsg("... but numhead is %ld", buf->b_u_numhead);
+ }
+ #endif
+
+***************
+*** 1756,1762 ****
+ write_error:
+ fclose(fp);
+ if (!write_ok)
+! EMSG2(_("E829: write error in undo file: %s"), file_name);
+
+ #if defined(WIN3264)
+ /* Copy file attributes; for systems where this can only be done after
+--- 1756,1762 ----
+ write_error:
+ fclose(fp);
+ if (!write_ok)
+! semsg(_("E829: write error in undo file: %s"), file_name);
+
+ #if defined(WIN3264)
+ /* Copy file attributes; for systems where this can only be done after
+***************
+*** 1846,1852 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Not reading undo file, owner differs: %s"),
+ file_name);
+ verbose_leave();
+ }
+--- 1846,1852 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg(_("Not reading undo file, owner differs: %s"),
+ file_name);
+ verbose_leave();
+ }
+***************
+*** 1860,1866 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg((char_u *)_("Reading undo file: %s"), file_name);
+ verbose_leave();
+ }
+
+--- 1860,1866 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! smsg(_("Reading undo file: %s"), file_name);
+ verbose_leave();
+ }
+
+***************
+*** 1868,1874 ****
+ if (fp == NULL)
+ {
+ if (name != NULL || p_verbose > 0)
+! EMSG2(_("E822: Cannot open undo file for reading: %s"), file_name);
+ goto error;
+ }
+ bi.bi_buf = curbuf;
+--- 1868,1874 ----
+ if (fp == NULL)
+ {
+ if (name != NULL || p_verbose > 0)
+! semsg(_("E822: Cannot open undo file for reading: %s"), file_name);
+ goto error;
+ }
+ bi.bi_buf = curbuf;
+***************
+*** 1880,1886 ****
+ if (fread(magic_buf, UF_START_MAGIC_LEN, 1, fp) != 1
+ || memcmp(magic_buf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0)
+ {
+! EMSG2(_("E823: Not an undo file: %s"), file_name);
+ goto error;
+ }
+ version = get2c(fp);
+--- 1880,1886 ----
+ if (fread(magic_buf, UF_START_MAGIC_LEN, 1, fp) != 1
+ || memcmp(magic_buf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0)
+ {
+! semsg(_("E823: Not an undo file: %s"), file_name);
+ goto error;
+ }
+ version = get2c(fp);
+***************
+*** 1889,1902 ****
+ #ifdef FEAT_CRYPT
+ if (*curbuf->b_p_key == NUL)
+ {
+! EMSG2(_("E832: Non-encrypted file has encrypted undo file: %s"),
+ file_name);
+ goto error;
+ }
+ bi.bi_state = crypt_create_from_file(fp, curbuf->b_p_key);
+ if (bi.bi_state == NULL)
+ {
+! EMSG2(_("E826: Undo file decryption failed: %s"), file_name);
+ goto error;
+ }
+ if (crypt_whole_undofile(bi.bi_state->method_nr))
+--- 1889,1902 ----
+ #ifdef FEAT_CRYPT
+ if (*curbuf->b_p_key == NUL)
+ {
+! semsg(_("E832: Non-encrypted file has encrypted undo file: %s"),
+ file_name);
+ goto error;
+ }
+ bi.bi_state = crypt_create_from_file(fp, curbuf->b_p_key);
+ if (bi.bi_state == NULL)
+ {
+! semsg(_("E826: Undo file decryption failed: %s"), file_name);
+ goto error;
+ }
+ if (crypt_whole_undofile(bi.bi_state->method_nr))
+***************
+*** 1912,1924 ****
+ bi.bi_used = 0;
+ }
+ #else
+! EMSG2(_("E827: Undo file is encrypted: %s"), file_name);
+ goto error;
+ #endif
+ }
+ else if (version != UF_VERSION)
+ {
+! EMSG2(_("E824: Incompatible undo file: %s"), file_name);
+ goto error;
+ }
+
+--- 1912,1924 ----
+ bi.bi_used = 0;
+ }
+ #else
+! semsg(_("E827: Undo file is encrypted: %s"), file_name);
+ goto error;
+ #endif
+ }
+ else if (version != UF_VERSION)
+ {
+! semsg(_("E824: Incompatible undo file: %s"), file_name);
+ goto error;
+ }
+
+***************
+*** 2122,2134 ****
+ #ifdef U_DEBUG
+ for (i = 0; i < num_head; ++i)
+ if (uhp_table_used[i] == 0)
+! EMSGN("uhp_table entry %ld not used, leaking memory", i);
+ vim_free(uhp_table_used);
+ u_check(TRUE);
+ #endif
+
+ if (name != NULL)
+! smsg((char_u *)_("Finished reading undo file %s"), file_name);
+ goto theend;
+
+ error:
+--- 2122,2134 ----
+ #ifdef U_DEBUG
+ for (i = 0; i < num_head; ++i)
+ if (uhp_table_used[i] == 0)
+! semsg("uhp_table entry %ld not used, leaking memory", i);
+ vim_free(uhp_table_used);
+ u_check(TRUE);
+ #endif
+
+ if (name != NULL)
+! smsg(_("Finished reading undo file %s"), file_name);
+ goto theend;
+
+ error:
+***************
+*** 2488,2494 ****
+
+ if (absolute)
+ {
+! EMSGN(_("E830: Undo number %ld not found"), step);
+ return;
+ }
+
+--- 2488,2494 ----
+
+ if (absolute)
+ {
+! semsg(_("E830: Undo number %ld not found"), step);
+ return;
+ }
+
+***************
+*** 2678,2684 ****
+ || bot > curbuf->b_ml.ml_line_count + 1)
+ {
+ unblock_autocmds();
+! IEMSG(_("E438: u_undo: line numbers wrong"));
+ changed(); /* don't want UNCHANGED now */
+ return;
+ }
+--- 2678,2684 ----
+ || bot > curbuf->b_ml.ml_line_count + 1)
+ {
+ unblock_autocmds();
+! iemsg(_("E438: u_undo: line numbers wrong"));
+ changed(); /* don't want UNCHANGED now */
+ return;
+ }
+***************
+*** 2988,2994 ****
+ }
+ #endif
+
+! smsg_attr_keep(0, (char_u *)_("%ld %s; %s #%ld %s"),
+ u_oldcount < 0 ? -u_oldcount : u_oldcount,
+ _(msgstr),
+ did_undo ? _("before") : _("after"),
+--- 2988,2994 ----
+ }
+ #endif
+
+! smsg_attr_keep(0, _("%ld %s; %s #%ld %s"),
+ u_oldcount < 0 ? -u_oldcount : u_oldcount,
+ _(msgstr),
+ did_undo ? _("before") : _("after"),
+***************
+*** 3165,3171 ****
+ return; /* nothing changed before */
+ if (curbuf->b_u_curhead != NULL)
+ {
+! EMSG(_("E790: undojoin is not allowed after undo"));
+ return;
+ }
+ if (!curbuf->b_u_synced)
+--- 3165,3171 ----
+ return; /* nothing changed before */
+ if (curbuf->b_u_curhead != NULL)
+ {
+! emsg(_("E790: undojoin is not allowed after undo"));
+ return;
+ }
+ if (!curbuf->b_u_synced)
+***************
+*** 3270,3276 ****
+ {
+ if (curbuf->b_u_newhead == NULL || curbuf->b_u_newhead->uh_entry == NULL)
+ {
+! IEMSG(_("E439: undo list corrupt"));
+ return NULL;
+ }
+ return curbuf->b_u_newhead->uh_entry;
+--- 3270,3276 ----
+ {
+ if (curbuf->b_u_newhead == NULL || curbuf->b_u_newhead->uh_entry == NULL)
+ {
+! iemsg(_("E439: undo list corrupt"));
+ return NULL;
+ }
+ return curbuf->b_u_newhead->uh_entry;
+***************
+*** 3302,3308 ****
+ uep->ue_bot = uep->ue_top + uep->ue_size + 1 + extra;
+ if (uep->ue_bot < 1 || uep->ue_bot > curbuf->b_ml.ml_line_count)
+ {
+! IEMSG(_("E440: undo line missing"));
+ uep->ue_bot = uep->ue_top + 1; /* assume all lines deleted, will
+ * get all the old lines back
+ * without deleting the current
+--- 3302,3308 ----
+ uep->ue_bot = uep->ue_top + uep->ue_size + 1 + extra;
+ if (uep->ue_bot < 1 || uep->ue_bot > curbuf->b_ml.ml_line_count)
+ {
+! iemsg(_("E440: undo line missing"));
+ uep->ue_bot = uep->ue_top + 1; /* assume all lines deleted, will
+ * get all the old lines back
+ * without deleting the current
+*** ../vim-8.1.0742/src/userfunc.c 2018-12-13 22:17:52.881941445 +0100
+--- src/userfunc.c 2019-01-13 19:58:05.537159726 +0100
+***************
+*** 119,125 ****
+ || (p - arg == 8 && STRNCMP(arg, "lastline", 8) == 0))
+ {
+ if (!skip)
+! EMSG2(_("E125: Illegal argument: %s"), arg);
+ break;
+ }
+ if (newargs != NULL && ga_grow(newargs, 1) == FAIL)
+--- 119,125 ----
+ || (p - arg == 8 && STRNCMP(arg, "lastline", 8) == 0))
+ {
+ if (!skip)
+! semsg(_("E125: Illegal argument: %s"), arg);
+ break;
+ }
+ if (newargs != NULL && ga_grow(newargs, 1) == FAIL)
+***************
+*** 139,145 ****
+ for (i = 0; i < newargs->ga_len; ++i)
+ if (STRCMP(((char_u **)(newargs->ga_data))[i], arg) == 0)
+ {
+! EMSG2(_("E853: Duplicate argument name: %s"), arg);
+ vim_free(arg);
+ goto err_ret;
+ }
+--- 139,145 ----
+ for (i = 0; i < newargs->ga_len; ++i)
+ if (STRCMP(((char_u **)(newargs->ga_data))[i], arg) == 0)
+ {
+! semsg(_("E853: Duplicate argument name: %s"), arg);
+ vim_free(arg);
+ goto err_ret;
+ }
+***************
+*** 157,163 ****
+ if (mustend && *p != endchar)
+ {
+ if (!skip)
+! EMSG2(_(e_invarg2), *argp);
+ break;
+ }
+ }
+--- 157,163 ----
+ if (mustend && *p != endchar)
+ {
+ if (!skip)
+! semsg(_(e_invarg2), *argp);
+ break;
+ }
+ }
+***************
+*** 386,392 ****
+ p = concat_str((char_u *)"<SNR>", name + 3);
+ else
+ p = name;
+! EMSG2(_(ermsg), p);
+ if (p != name)
+ vim_free(p);
+ }
+--- 386,392 ----
+ p = concat_str((char_u *)"<SNR>", name + 3);
+ else
+ p = name;
+! semsg(_(ermsg), p);
+ if (p != name)
+ vim_free(p);
+ }
+***************
+*** 713,719 ****
+ /* If depth of calling is getting too high, don't execute the function */
+ if (depth >= p_mfd)
+ {
+! EMSG(_("E132: Function call depth is higher than 'maxfuncdepth'"));
+ rettv->v_type = VAR_NUMBER;
+ rettv->vval.v_number = -1;
+ return;
+--- 713,719 ----
+ /* If depth of calling is getting too high, don't execute the function */
+ if (depth >= p_mfd)
+ {
+! emsg(_("E132: Function call depth is higher than 'maxfuncdepth'"));
+ rettv->v_type = VAR_NUMBER;
+ rettv->vval.v_number = -1;
+ return;
+***************
+*** 885,891 ****
+ ++no_wait_return;
+ verbose_enter_scroll();
+
+! smsg((char_u *)_("calling %s"), sourcing_name);
+ if (p_verbose >= 14)
+ {
+ char_u buf[MSG_BUF_LEN];
+--- 885,891 ----
+ ++no_wait_return;
+ verbose_enter_scroll();
+
+! smsg(_("calling %s"), sourcing_name);
+ if (p_verbose >= 14)
+ {
+ char_u buf[MSG_BUF_LEN];
+***************
+*** 990,998 ****
+ verbose_enter_scroll();
+
+ if (aborting())
+! smsg((char_u *)_("%s aborted"), sourcing_name);
+ else if (fc->rettv->v_type == VAR_NUMBER)
+! smsg((char_u *)_("%s returning #%ld"), sourcing_name,
+ (long)fc->rettv->vval.v_number);
+ else
+ {
+--- 990,998 ----
+ verbose_enter_scroll();
+
+ if (aborting())
+! smsg(_("%s aborted"), sourcing_name);
+ else if (fc->rettv->v_type == VAR_NUMBER)
+! smsg(_("%s returning #%ld"), sourcing_name,
+ (long)fc->rettv->vval.v_number);
+ else
+ {
+***************
+*** 1014,1020 ****
+ trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN);
+ s = buf;
+ }
+! smsg((char_u *)_("%s returning %s"), sourcing_name, s);
+ vim_free(tofree);
+ }
+ }
+--- 1014,1020 ----
+ trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN);
+ s = buf;
+ }
+! smsg(_("%s returning %s"), sourcing_name, s);
+ vim_free(tofree);
+ }
+ }
+***************
+*** 1040,1046 ****
+ ++no_wait_return;
+ verbose_enter_scroll();
+
+! smsg((char_u *)_("continuing in %s"), sourcing_name);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+ verbose_leave_scroll();
+--- 1040,1046 ----
+ ++no_wait_return;
+ verbose_enter_scroll();
+
+! smsg(_("continuing in %s"), sourcing_name);
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+ verbose_leave_scroll();
+***************
+*** 1194,1200 ****
+ restore_funccal(void)
+ {
+ if (funccal_stack == NULL)
+! IEMSG("INTERNAL: restore_funccal()");
+ else
+ {
+ current_funccal = funccal_stack->top_funccal;
+--- 1194,1200 ----
+ restore_funccal(void)
+ {
+ if (funccal_stack == NULL)
+! iemsg("INTERNAL: restore_funccal()");
+ else
+ {
+ current_funccal = funccal_stack->top_funccal;
+***************
+*** 1312,1318 ****
+ {
+ if (argc == MAX_FUNC_ARGS - (partial == NULL ? 0 : partial->pt_argc))
+ {
+! EMSG(_("E699: Too many arguments"));
+ break;
+ }
+ /* Make a copy of each argument. This is needed to be able to set
+--- 1312,1318 ----
+ {
+ if (argc == MAX_FUNC_ARGS - (partial == NULL ? 0 : partial->pt_argc))
+ {
+! emsg(_("E699: Too many arguments"));
+ break;
+ }
+ /* Make a copy of each argument. This is needed to be able to set
+***************
+*** 1660,1666 ****
+ if (end == start)
+ {
+ if (!skip)
+! EMSG(_("E129: Function name required"));
+ goto theend;
+ }
+ if (end == NULL || (lv.ll_tv != NULL && (lead > 2 || lv.ll_range)))
+--- 1660,1666 ----
+ if (end == start)
+ {
+ if (!skip)
+! emsg(_("E129: Function name required"));
+ goto theend;
+ }
+ if (end == NULL || (lv.ll_tv != NULL && (lead > 2 || lv.ll_range)))
+***************
+*** 1673,1679 ****
+ if (!aborting())
+ {
+ if (end != NULL)
+! EMSG2(_(e_invarg2), start);
+ }
+ else
+ *pp = find_name_end(start, NULL, NULL, FNE_INCL_BR);
+--- 1673,1679 ----
+ if (!aborting())
+ {
+ if (end != NULL)
+! semsg(_(e_invarg2), start);
+ }
+ else
+ *pp = find_name_end(start, NULL, NULL, FNE_INCL_BR);
+***************
+*** 1706,1712 ****
+ {
+ if (!skip && !(flags & TFN_QUIET) && (fdp == NULL
+ || lv.ll_dict == NULL || fdp->fd_newkey == NULL))
+! EMSG(_(e_funcref));
+ else
+ *pp = end;
+ name = NULL;
+--- 1706,1712 ----
+ {
+ if (!skip && !(flags & TFN_QUIET) && (fdp == NULL
+ || lv.ll_dict == NULL || fdp->fd_newkey == NULL))
+! emsg(_(e_funcref));
+ else
+ *pp = end;
+ name = NULL;
+***************
+*** 1789,1795 ****
+ /* 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);
+--- 1789,1795 ----
+ /* 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);
+***************
+*** 1798,1804 ****
+ }
+ else if (!(flags & TFN_INT) && builtin_function(lv.ll_name, len))
+ {
+! EMSG2(_("E128: Function name must start with a capital or \"s:\": %s"),
+ start);
+ goto theend;
+ }
+--- 1798,1804 ----
+ }
+ else if (!(flags & TFN_INT) && builtin_function(lv.ll_name, len))
+ {
+! semsg(_("E128: Function name must start with a capital or \"s:\": %s"),
+ start);
+ goto theend;
+ }
+***************
+*** 1808,1814 ****
+
+ if (cp != NULL && cp < end)
+ {
+! EMSG2(_("E884: Function name cannot contain a colon: %s"), start);
+ goto theend;
+ }
+ }
+--- 1808,1814 ----
+
+ if (cp != NULL && cp < end)
+ {
+! semsg(_("E884: Function name cannot contain a colon: %s"), start);
+ goto theend;
+ }
+ }
+***************
+*** 1961,1967 ****
+ if (!aborting())
+ {
+ if (!eap->skip && fudi.fd_newkey != NULL)
+! EMSG2(_(e_dictkey), fudi.fd_newkey);
+ vim_free(fudi.fd_newkey);
+ return;
+ }
+--- 1961,1967 ----
+ if (!aborting())
+ {
+ if (!eap->skip && fudi.fd_newkey != NULL)
+! semsg(_(e_dictkey), fudi.fd_newkey);
+ vim_free(fudi.fd_newkey);
+ return;
+ }
+***************
+*** 1981,1987 ****
+ {
+ if (!ends_excmd(*skipwhite(p)))
+ {
+! EMSG(_(e_trailing));
+ goto ret_free;
+ }
+ eap->nextcmd = check_nextcmd(p);
+--- 1981,1987 ----
+ {
+ if (!ends_excmd(*skipwhite(p)))
+ {
+! emsg(_(e_trailing));
+ goto ret_free;
+ }
+ eap->nextcmd = check_nextcmd(p);
+***************
+*** 2027,2033 ****
+ {
+ if (!eap->skip)
+ {
+! EMSG2(_("E124: Missing '(': %s"), eap->arg);
+ goto ret_free;
+ }
+ /* attempt to continue by skipping some text */
+--- 2027,2033 ----
+ {
+ if (!eap->skip)
+ {
+! semsg(_("E124: Missing '(': %s"), eap->arg);
+ goto ret_free;
+ }
+ /* attempt to continue by skipping some text */
+***************
+*** 2062,2068 ****
+ }
+ /* Disallow using the g: dict. */
+ if (fudi.fd_dict != NULL && fudi.fd_dict->dv_scope == VAR_DEF_SCOPE)
+! EMSG(_("E862: Cannot use g: here"));
+ }
+
+ if (get_function_args(&p, ')', &newargs, &varargs, eap->skip) == FAIL)
+--- 2062,2068 ----
+ }
+ /* Disallow using the g: dict. */
+ if (fudi.fd_dict != NULL && fudi.fd_dict->dv_scope == VAR_DEF_SCOPE)
+! emsg(_("E862: Cannot use g: here"));
+ }
+
+ if (get_function_args(&p, ')', &newargs, &varargs, eap->skip) == FAIL)
+***************
+*** 2107,2113 ****
+ if (*p == '\n')
+ line_arg = p + 1;
+ else if (*p != NUL && *p != '"' && !eap->skip && !did_emsg)
+! EMSG(_(e_trailing));
+
+ /*
+ * Read the body of the function, until ":endfunction" is found.
+--- 2107,2113 ----
+ if (*p == '\n')
+ line_arg = p + 1;
+ else if (*p != NUL && *p != '"' && !eap->skip && !did_emsg)
+! emsg(_(e_trailing));
+
+ /*
+ * Read the body of the function, until ":endfunction" is found.
+***************
+*** 2120,2126 ****
+ if (!eap->skip && !eap->forceit)
+ {
+ if (fudi.fd_dict != NULL && fudi.fd_newkey == NULL)
+! EMSG(_(e_funcdict));
+ else if (name != NULL && find_func(name) != NULL)
+ emsg_funcname(e_funcexts, name);
+ }
+--- 2120,2126 ----
+ if (!eap->skip && !eap->forceit)
+ {
+ if (fudi.fd_dict != NULL && fudi.fd_newkey == NULL)
+! emsg(_(e_funcdict));
+ else if (name != NULL && find_func(name) != NULL)
+ emsg_funcname(e_funcexts, name);
+ }
+***************
+*** 2170,2176 ****
+ lines_left = Rows - 1;
+ if (theline == NULL)
+ {
+! EMSG(_("E126: Missing :endfunction"));
+ goto erret;
+ }
+
+--- 2170,2176 ----
+ lines_left = Rows - 1;
+ if (theline == NULL)
+ {
+! emsg(_("E126: Missing :endfunction"));
+ goto erret;
+ }
+
+***************
+*** 2374,2380 ****
+ fp = NULL;
+ if (fudi.fd_newkey == NULL && !eap->forceit)
+ {
+! EMSG(_(e_funcdict));
+ goto erret;
+ }
+ if (fudi.fd_di == NULL)
+--- 2374,2380 ----
+ fp = NULL;
+ if (fudi.fd_newkey == NULL && !eap->forceit)
+ {
+! emsg(_(e_funcdict));
+ goto erret;
+ }
+ if (fudi.fd_di == NULL)
+***************
+*** 2421,2427 ****
+ }
+ if (j == FAIL)
+ {
+! EMSG2(_("E746: Function name does not match script file name: %s"), name);
+ goto erret;
+ }
+ }
+--- 2421,2427 ----
+ }
+ if (j == FAIL)
+ {
+! semsg(_("E746: Function name does not match script file name: %s"), name);
+ goto erret;
+ }
+ }
+***************
+*** 2876,2888 ****
+ if (name == NULL)
+ {
+ if (fudi.fd_dict != NULL && !eap->skip)
+! EMSG(_(e_funcref));
+ return;
+ }
+ if (!ends_excmd(*skipwhite(p)))
+ {
+ vim_free(name);
+! EMSG(_(e_trailing));
+ return;
+ }
+ eap->nextcmd = check_nextcmd(p);
+--- 2876,2888 ----
+ if (name == NULL)
+ {
+ if (fudi.fd_dict != NULL && !eap->skip)
+! emsg(_(e_funcref));
+ return;
+ }
+ if (!ends_excmd(*skipwhite(p)))
+ {
+ vim_free(name);
+! emsg(_(e_trailing));
+ return;
+ }
+ eap->nextcmd = check_nextcmd(p);
+***************
+*** 2898,2909 ****
+ if (fp == NULL)
+ {
+ if (!eap->forceit)
+! EMSG2(_(e_nofunc), eap->arg);
+ return;
+ }
+ if (fp->uf_calls > 0)
+ {
+! EMSG2(_("E131: Cannot delete function %s: It is in use"), eap->arg);
+ return;
+ }
+
+--- 2898,2909 ----
+ if (fp == NULL)
+ {
+ if (!eap->forceit)
+! semsg(_(e_nofunc), eap->arg);
+ return;
+ }
+ if (fp->uf_calls > 0)
+ {
+! semsg(_("E131: Cannot delete function %s: It is in use"), eap->arg);
+ return;
+ }
+
+***************
+*** 3032,3038 ****
+
+ if (current_funccal == NULL)
+ {
+! EMSG(_("E133: :return not inside a function"));
+ return;
+ }
+
+--- 3032,3038 ----
+
+ if (current_funccal == NULL)
+ {
+! emsg(_("E133: :return not inside a function"));
+ return;
+ }
+
+***************
+*** 3108,3114 ****
+ if (fudi.fd_newkey != NULL)
+ {
+ /* Still need to give an error message for missing key. */
+! EMSG2(_(e_dictkey), fudi.fd_newkey);
+ vim_free(fudi.fd_newkey);
+ }
+ if (tofree == NULL)
+--- 3108,3114 ----
+ if (fudi.fd_newkey != NULL)
+ {
+ /* Still need to give an error message for missing key. */
+! semsg(_(e_dictkey), fudi.fd_newkey);
+ vim_free(fudi.fd_newkey);
+ }
+ if (tofree == NULL)
+***************
+*** 3133,3139 ****
+
+ if (*startarg != '(')
+ {
+! EMSG2(_("E107: Missing parentheses: %s"), eap->arg);
+ goto end;
+ }
+
+--- 3133,3139 ----
+
+ if (*startarg != '(')
+ {
+! semsg(_("E107: Missing parentheses: %s"), eap->arg);
+ goto end;
+ }
+
+***************
+*** 3158,3164 ****
+ {
+ // 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;
+--- 3158,3164 ----
+ {
+ // 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;
+***************
+*** 3205,3211 ****
+ if (!ends_excmd(*arg))
+ {
+ emsg_severe = TRUE;
+! EMSG(_(e_trailing));
+ }
+ else
+ eap->nextcmd = check_nextcmd(arg);
+--- 3205,3211 ----
+ if (!ends_excmd(*arg))
+ {
+ emsg_severe = TRUE;
+! emsg(_(e_trailing));
+ }
+ else
+ eap->nextcmd = check_nextcmd(arg);
+***************
+*** 3267,3273 ****
+ if ((cstack->cs_rettv[idx] = alloc_tv()) != NULL)
+ *(typval_T *)cstack->cs_rettv[idx] = *(typval_T *)rettv;
+ else
+! EMSG(_(e_outofmem));
+ }
+ else
+ cstack->cs_rettv[idx] = NULL;
+--- 3267,3273 ----
+ if ((cstack->cs_rettv[idx] = alloc_tv()) != NULL)
+ *(typval_T *)cstack->cs_rettv[idx] = *(typval_T *)rettv;
+ else
+! emsg(_(e_outofmem));
+ }
+ else
+ cstack->cs_rettv[idx] = NULL;
+*** ../vim-8.1.0742/src/vim.h 2019-01-12 22:47:01.264088074 +0100
+--- src/vim.h 2019-01-13 19:44:12.812867446 +0100
+***************
+*** 1625,1638 ****
+
+ #define MSG(s) msg((char_u *)(s))
+ #define MSG_ATTR(s, attr) msg_attr((char_u *)(s), (attr))
+- #define EMSG(s) emsg((char_u *)(s))
+- #define EMSG2(s, p) emsg2((char_u *)(s), (char_u *)(p))
+- #define EMSG3(s, p, q) emsg3((char_u *)(s), (char_u *)(p), (char_u *)(q))
+- #define EMSGN(s, n) emsgn((char_u *)(s), (long)(n))
+- #define EMSGU(s, n) emsgu((char_u *)(s), (long_u)(n))
+- #define IEMSG(s) iemsg((char_u *)(s))
+- #define IEMSG2(s, p) iemsg2((char_u *)(s), (char_u *)(p))
+- #define IEMSGN(s, n) iemsgn((char_u *)(s), (long)(n))
+ #define OUT_STR(s) out_str((char_u *)(s))
+ #define OUT_STR_NF(s) out_str_nf((char_u *)(s))
+ #define MSG_PUTS(s) msg_puts((char_u *)(s))
+--- 1625,1630 ----
+***************
+*** 1676,1685 ****
+ # define GUI_GET_COLOR GUI_FUNCTION(get_color)
+ #endif
+
+! /* Prefer using emsg3(), because perror() may send the output to the wrong
+ * destination and mess up the screen. */
+ #ifdef HAVE_STRERROR
+! # define PERROR(msg) (void)emsg3((char_u *)"%s: %s", (char_u *)msg, (char_u *)strerror(errno))
+ #else
+ # define PERROR(msg) do_perror(msg)
+ #endif
+--- 1668,1677 ----
+ # define GUI_GET_COLOR GUI_FUNCTION(get_color)
+ #endif
+
+! /* Prefer using emsgf(), because perror() may send the output to the wrong
+ * destination and mess up the screen. */
+ #ifdef HAVE_STRERROR
+! # define PERROR(msg) (void)semsg("%s: %s", (char *)msg, strerror(errno))
+ #else
+ # define PERROR(msg) do_perror(msg)
+ #endif
+*** ../vim-8.1.0742/src/window.c 2019-01-11 20:34:18.300314693 +0100
+--- src/window.c 2019-01-13 19:58:11.409110820 +0100
+***************
+*** 101,107 ****
+ do { \
+ if (cmdwin_type != 0) \
+ { \
+! EMSG(_(e_cmdwin)); \
+ return; \
+ } \
+ } while (0)
+--- 101,107 ----
+ do { \
+ if (cmdwin_type != 0) \
+ { \
+! emsg(_(e_cmdwin)); \
+ return; \
+ } \
+ } while (0)
+***************
+*** 156,164 ****
+ ? curwin->w_alt_fnum : Prenum) == NULL)
+ {
+ if (Prenum == 0)
+! EMSG(_(e_noalt));
+ else
+! EMSGN(_("E92: Buffer %ld not found"), Prenum);
+ break;
+ }
+
+--- 156,164 ----
+ ? curwin->w_alt_fnum : Prenum) == NULL)
+ {
+ if (Prenum == 0)
+! emsg(_(e_noalt));
+ else
+! semsg(_("E92: Buffer %ld not found"), Prenum);
+ break;
+ }
+
+***************
+*** 220,226 ****
+ if (wp->w_p_pvw)
+ break;
+ if (wp == NULL)
+! EMSG(_("E441: There is no preview window"));
+ else
+ win_goto(wp);
+ break;
+--- 220,226 ----
+ if (wp->w_p_pvw)
+ break;
+ if (wp == NULL)
+! emsg(_("E441: There is no preview window"));
+ else
+ win_goto(wp);
+ break;
+***************
+*** 739,745 ****
+ flags |= cmdmod.split;
+ if ((flags & WSP_TOP) && (flags & WSP_BOT))
+ {
+! EMSG(_("E442: Can't split topleft and botright at the same time"));
+ return FAIL;
+ }
+
+--- 739,745 ----
+ flags |= cmdmod.split;
+ if ((flags & WSP_TOP) && (flags & WSP_BOT))
+ {
+! emsg(_("E442: Can't split topleft and botright at the same time"));
+ return FAIL;
+ }
+
+***************
+*** 794,800 ****
+ {
+ if (VISIBLE_HEIGHT(oldwin) <= p_wmh && new_wp == NULL)
+ {
+! EMSG(_(e_noroom));
+ return FAIL;
+ }
+ need_status = STATUS_HEIGHT;
+--- 794,800 ----
+ {
+ if (VISIBLE_HEIGHT(oldwin) <= p_wmh && new_wp == NULL)
+ {
+! emsg(_(e_noroom));
+ return FAIL;
+ }
+ need_status = STATUS_HEIGHT;
+***************
+*** 852,858 ****
+ }
+ if (available < needed && new_wp == NULL)
+ {
+! EMSG(_(e_noroom));
+ return FAIL;
+ }
+ if (new_size == 0)
+--- 852,858 ----
+ }
+ if (available < needed && new_wp == NULL)
+ {
+! emsg(_(e_noroom));
+ return FAIL;
+ }
+ if (new_size == 0)
+***************
+*** 935,941 ****
+ }
+ if (available < needed && new_wp == NULL)
+ {
+! EMSG(_(e_noroom));
+ return FAIL;
+ }
+ oldwin_height = oldwin->w_height;
+--- 935,941 ----
+ }
+ if (available < needed && new_wp == NULL)
+ {
+! emsg(_(e_noroom));
+ return FAIL;
+ }
+ oldwin_height = oldwin->w_height;
+***************
+*** 1606,1612 ****
+ FOR_ALL_FRAMES(frp, curwin->w_frame->fr_parent->fr_child)
+ if (frp->fr_win == NULL)
+ {
+! EMSG(_("E443: Cannot rotate when another window is split"));
+ return;
+ }
+
+--- 1606,1612 ----
+ FOR_ALL_FRAMES(frp, curwin->w_frame->fr_parent->fr_child)
+ if (frp->fr_win == NULL)
+ {
+! emsg(_("E443: Cannot rotate when another window is split"));
+ return;
+ }
+
+***************
+*** 2309,2315 ****
+
+ if (last_window())
+ {
+! EMSG(_("E444: Cannot close last window"));
+ return FAIL;
+ }
+
+--- 2309,2315 ----
+
+ if (last_window())
+ {
+! emsg(_("E444: Cannot close last window"));
+ return FAIL;
+ }
+
+***************
+*** 2318,2329 ****
+ return FAIL; /* window is already being closed */
+ if (win == aucmd_win)
+ {
+! EMSG(_("E813: Cannot close autocmd window"));
+ return FAIL;
+ }
+ if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())
+ {
+! EMSG(_("E814: Cannot close window, only autocmd window would remain"));
+ return FAIL;
+ }
+
+--- 2318,2329 ----
+ return FAIL; /* window is already being closed */
+ if (win == aucmd_win)
+ {
+! emsg(_("E813: Cannot close autocmd window"));
+ return FAIL;
+ }
+ if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())
+ {
+! emsg(_("E814: Cannot close window, only autocmd window would remain"));
+ return FAIL;
+ }
+
+***************
+*** 3419,3425 ****
+ }
+
+ if (message && !ONE_WINDOW)
+! EMSG(_("E445: Other window contains changes"));
+ }
+
+ /*
+--- 3419,3425 ----
+ }
+
+ if (message && !ONE_WINDOW)
+! emsg(_("E445: Other window contains changes"));
+ }
+
+ /*
+***************
+*** 5447,5453 ****
+ --p_wmh;
+ if (first)
+ {
+! EMSG(_(e_noroom));
+ first = FALSE;
+ }
+ }
+--- 5447,5453 ----
+ --p_wmh;
+ if (first)
+ {
+! emsg(_(e_noroom));
+ first = FALSE;
+ }
+ }
+***************
+*** 5473,5479 ****
+ --p_wmw;
+ if (first)
+ {
+! EMSG(_(e_noroom));
+ first = FALSE;
+ }
+ }
+--- 5473,5479 ----
+ --p_wmw;
+ if (first)
+ {
+! emsg(_(e_noroom));
+ first = FALSE;
+ }
+ }
+***************
+*** 5950,5956 ****
+ {
+ if (frp == NULL)
+ {
+! EMSG(_(e_noroom));
+ p_ch = old_p_ch;
+ curtab->tp_ch_used = p_ch;
+ cmdline_row = Rows - p_ch;
+--- 5950,5956 ----
+ {
+ if (frp == NULL)
+ {
+! emsg(_(e_noroom));
+ p_ch = old_p_ch;
+ curtab->tp_ch_used = p_ch;
+ cmdline_row = Rows - p_ch;
+***************
+*** 6041,6047 ****
+ {
+ if (fp == topframe)
+ {
+! EMSG(_(e_noroom));
+ return;
+ }
+ /* In a column of frames: go to frame above. If already at
+--- 6041,6047 ----
+ {
+ if (fp == topframe)
+ {
+! emsg(_(e_noroom));
+ return;
+ }
+ /* In a column of frames: go to frame above. If already at
+***************
+*** 6170,6176 ****
+ if (*ptr == NUL) /* nothing found */
+ {
+ if (options & FNAME_MESS)
+! EMSG(_("E446: No file name under cursor"));
+ return NULL;
+ }
+
+--- 6170,6176 ----
+ if (*ptr == NUL) /* nothing found */
+ {
+ if (options & FNAME_MESS)
+! emsg(_("E446: No file name under cursor"));
+ return NULL;
+ }
+
+***************
+*** 6319,6325 ****
+ {
+ c = ptr[len];
+ ptr[len] = NUL;
+! EMSG2(_("E447: Can't find file \"%s\" in path"), ptr);
+ ptr[len] = c;
+ }
+
+--- 6319,6325 ----
+ {
+ c = ptr[len];
+ ptr[len] = NUL;
+! semsg(_("E447: Can't find file \"%s\" in path"), ptr);
+ ptr[len] = c;
+ }
+
+***************
+*** 6782,6788 ****
+ return -1;
+ if (id < -1 || id == 0)
+ {
+! EMSGN(_("E799: Invalid ID: %ld (must be greater than or equal to 1)"), id);
+ return -1;
+ }
+ if (id != -1)
+--- 6782,6788 ----
+ return -1;
+ if (id < -1 || id == 0)
+ {
+! semsg(_("E799: Invalid ID: %ld (must be greater than or equal to 1)"), id);
+ return -1;
+ }
+ if (id != -1)
+***************
+*** 6792,6798 ****
+ {
+ if (cur->id == id)
+ {
+! EMSGN(_("E801: ID already taken: %ld"), id);
+ return -1;
+ }
+ cur = cur->next;
+--- 6792,6798 ----
+ {
+ if (cur->id == id)
+ {
+! semsg(_("E801: ID already taken: %ld"), id);
+ return -1;
+ }
+ cur = cur->next;
+***************
+*** 6800,6811 ****
+ }
+ if ((hlg_id = syn_namen2id(grp, (int)STRLEN(grp))) == 0)
+ {
+! EMSG2(_(e_nogroup), grp);
+ return -1;
+ }
+ if (pat != NULL && (regprog = vim_regcomp(pat, RE_MAGIC)) == NULL)
+ {
+! EMSG2(_(e_invarg2), pat);
+ return -1;
+ }
+
+--- 6800,6811 ----
+ }
+ if ((hlg_id = syn_namen2id(grp, (int)STRLEN(grp))) == 0)
+ {
+! semsg(_(e_nogroup), grp);
+ return -1;
+ }
+ if (pat != NULL && (regprog = vim_regcomp(pat, RE_MAGIC)) == NULL)
+ {
+! semsg(_(e_invarg2), pat);
+ return -1;
+ }
+
+***************
+*** 6900,6906 ****
+ }
+ else
+ {
+! EMSG(_("List or number required"));
+ goto fail;
+ }
+ if (toplnum == 0 || lnum < toplnum)
+--- 6900,6906 ----
+ }
+ else
+ {
+! emsg(_("List or number required"));
+ goto fail;
+ }
+ if (toplnum == 0 || lnum < toplnum)
+***************
+*** 6969,6975 ****
+ if (id < 1)
+ {
+ if (perr == TRUE)
+! EMSGN(_("E802: Invalid ID: %ld (must be greater than or equal to 1)"),
+ id);
+ return -1;
+ }
+--- 6969,6975 ----
+ if (id < 1)
+ {
+ if (perr == TRUE)
+! semsg(_("E802: Invalid ID: %ld (must be greater than or equal to 1)"),
+ id);
+ return -1;
+ }
+***************
+*** 6981,6987 ****
+ if (cur == NULL)
+ {
+ if (perr == TRUE)
+! EMSGN(_("E803: ID not found: %ld"), id);
+ return -1;
+ }
+ if (cur == prev)
+--- 6981,6987 ----
+ if (cur == NULL)
+ {
+ if (perr == TRUE)
+! semsg(_("E803: ID not found: %ld"), id);
+ return -1;
+ }
+ if (cur == prev)
+*** ../vim-8.1.0742/src/version.c 2019-01-13 19:10:28.963419901 +0100
+--- src/version.c 2019-01-13 19:19:37.843871508 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 743,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+195. Your cat has its own 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.0744 b/data/vim/patches/8.1.0744
new file mode 100644
index 000000000..e488e4bec
--- /dev/null
+++ b/data/vim/patches/8.1.0744
@@ -0,0 +1,246 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0744
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0744 (after 8.1.0743)
+Problem: Compiler warnings for signed/unsigned strings.
+Solution: A few more type cast fixes.
+Files: src/option.c, src/if_perl.xs, src/if_py_both.h, src/integration.c
+
+
+*** ../vim-8.1.0743/src/option.c 2019-01-13 23:38:33.403773217 +0100
+--- src/option.c 2019-01-13 23:43:01.405729009 +0100
+***************
+*** 6965,6973 ****
+ else if (varp == &p_guifontset)
+ {
+ if (STRCMP(p_guifontset, "*") == 0)
+! errmsg = (char_u *)N_("E597: can't select fontset");
+ else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
+! errmsg = (char_u *)N_("E598: Invalid fontset");
+ redraw_gui_only = TRUE;
+ }
+ # endif
+--- 6965,6973 ----
+ else if (varp == &p_guifontset)
+ {
+ if (STRCMP(p_guifontset, "*") == 0)
+! errmsg = N_("E597: can't select fontset");
+ else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
+! errmsg = N_("E598: Invalid fontset");
+ redraw_gui_only = TRUE;
+ }
+ # endif
+***************
+*** 7687,7693 ****
+ p = (char_u *)MOUSE_ALL;
+ #else
+ if (*p_mouse != NUL)
+! errmsg = (char_u *)N_("E538: No mouse support");
+ #endif
+ }
+ #if defined(FEAT_GUI)
+--- 7687,7693 ----
+ p = (char_u *)MOUSE_ALL;
+ #else
+ if (*p_mouse != NUL)
+! errmsg = N_("E538: No mouse support");
+ #endif
+ }
+ #if defined(FEAT_GUI)
+*** ../vim-8.1.0743/src/if_perl.xs 2019-01-13 23:38:33.395773275 +0100
+--- src/if_perl.xs 2019-01-13 23:44:00.353278430 +0100
+***************
+*** 1562,1572 ****
+ SV*
+ Blob(SV* sv)
+ PREINIT:
+! STRLEN len;
+! char *s;
+! int i;
+! char buf[3];
+! SV* newsv;
+
+ CODE:
+ s = SvPVbyte(sv, len);
+--- 1562,1572 ----
+ SV*
+ Blob(SV* sv)
+ PREINIT:
+! STRLEN len;
+! char *s;
+! unsigned i;
+! char buf[3];
+! SV* newsv;
+
+ CODE:
+ s = SvPVbyte(sv, len);
+*** ../vim-8.1.0743/src/if_py_both.h 2019-01-13 23:38:33.395773275 +0100
+--- src/if_py_both.h 2019-01-13 23:46:14.648261783 +0100
+***************
+*** 410,415 ****
+--- 410,421 ----
+ }
+
+ static int
++ msg_wrapper(char *text)
++ {
++ return msg((char_u *)text);
++ }
++
++ static int
+ write_output(OutputObject *self, PyObject *string)
+ {
+ Py_ssize_t len = 0;
+***************
+*** 421,427 ****
+
+ Py_BEGIN_ALLOW_THREADS
+ Python_Lock_Vim();
+! writer((writefn)(error ? emsg : msg), (char_u *)str, len);
+ Python_Release_Vim();
+ Py_END_ALLOW_THREADS
+ PyMem_Free(str);
+--- 427,433 ----
+
+ Py_BEGIN_ALLOW_THREADS
+ Python_Lock_Vim();
+! writer((writefn)(error ? emsg : msg_wrapper), (char_u *)str, len);
+ Python_Release_Vim();
+ Py_END_ALLOW_THREADS
+ PyMem_Free(str);
+***************
+*** 634,640 ****
+ else if (msg_list != NULL && *msg_list != NULL)
+ {
+ int should_free;
+! char_u *msg;
+
+ msg = get_exception_string(*msg_list, ET_ERROR, NULL, &should_free);
+
+--- 640,646 ----
+ else if (msg_list != NULL && *msg_list != NULL)
+ {
+ int should_free;
+! char *msg;
+
+ msg = get_exception_string(*msg_list, ET_ERROR, NULL, &should_free);
+
+***************
+*** 644,650 ****
+ return -1;
+ }
+
+! PyErr_SetVim((char *) msg);
+
+ free_global_msglist();
+
+--- 650,656 ----
+ return -1;
+ }
+
+! PyErr_SetVim(msg);
+
+ free_global_msglist();
+
+***************
+*** 3483,3495 ****
+ static int
+ set_option_value_err(char_u *key, int numval, char_u *stringval, int opt_flags)
+ {
+! char_u *errmsg;
+
+ if ((errmsg = set_option_value(key, numval, stringval, opt_flags)))
+ {
+ if (VimTryEnd())
+ return FAIL;
+! PyErr_SetVim((char *)errmsg);
+ return FAIL;
+ }
+ return OK;
+--- 3489,3501 ----
+ static int
+ set_option_value_err(char_u *key, int numval, char_u *stringval, int opt_flags)
+ {
+! char *errmsg;
+
+ if ((errmsg = set_option_value(key, numval, stringval, opt_flags)))
+ {
+ if (VimTryEnd())
+ return FAIL;
+! PyErr_SetVim(errmsg);
+ return FAIL;
+ }
+ return OK;
+*** ../vim-8.1.0743/src/integration.c 2018-09-30 21:43:17.195693290 +0200
+--- src/integration.c 2019-01-13 23:47:24.371738521 +0100
+***************
+*** 303,309 ****
+ char buffer[2*MAXPATHLEN];
+ vim_snprintf(buffer, sizeof(buffer),
+ NOCATGETS("currentFile %d %s"),
+! f ? strlen(f) : 0, f ? f : "");
+ workshop_send_message(buffer);
+ } else if (strcmp(cmd, NOCATGETS("getCursorRow")) == 0) {
+ int row = workshop_test_getcursorrow();
+--- 303,309 ----
+ char buffer[2*MAXPATHLEN];
+ vim_snprintf(buffer, sizeof(buffer),
+ NOCATGETS("currentFile %d %s"),
+! f ? (int)strlen(f) : 0, f ? f : "");
+ workshop_send_message(buffer);
+ } else if (strcmp(cmd, NOCATGETS("getCursorRow")) == 0) {
+ int row = workshop_test_getcursorrow();
+***************
+*** 322,335 ****
+ char buffer[2*MAXPATHLEN];
+ vim_snprintf(buffer, sizeof(buffer),
+ NOCATGETS("cursorRowText %d %s"),
+! t ? strlen(t) : 0, t ? t : "");
+ workshop_send_message(buffer);
+ } else if (strcmp(cmd, NOCATGETS("getSelectedText")) == 0) {
+ char *t = workshop_test_getselectedtext();
+ char buffer[2*MAXPATHLEN];
+ vim_snprintf(buffer, sizeof(buffer),
+ NOCATGETS("selectedText %d %s"),
+! t ? strlen(t) : 0, t ? t : "");
+ workshop_send_message(buffer);
+ #endif
+ }
+--- 322,335 ----
+ char buffer[2*MAXPATHLEN];
+ vim_snprintf(buffer, sizeof(buffer),
+ NOCATGETS("cursorRowText %d %s"),
+! t ? (int)strlen(t) : 0, t ? t : "");
+ workshop_send_message(buffer);
+ } else if (strcmp(cmd, NOCATGETS("getSelectedText")) == 0) {
+ char *t = workshop_test_getselectedtext();
+ char buffer[2*MAXPATHLEN];
+ vim_snprintf(buffer, sizeof(buffer),
+ NOCATGETS("selectedText %d %s"),
+! t ? (int)strlen(t) : 0, t ? t : "");
+ workshop_send_message(buffer);
+ #endif
+ }
+*** ../vim-8.1.0743/src/version.c 2019-01-13 23:50:42.810262435 +0100
+--- src/version.c 2019-01-13 23:49:19.134882757 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 744,
+ /**/
+
+--
+Press any key to continue, press any other key to quit.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0745 b/data/vim/patches/8.1.0745
new file mode 100644
index 000000000..e03cd8323
--- /dev/null
+++ b/data/vim/patches/8.1.0745
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0745
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0745
+Problem: Compiler warnings for signed/unsigned string.
+Solution: Remove type casts. (John Marriott)
+Files: src/ex_docmd.c, src/mbyte.c
+
+
+*** ../vim-8.1.0744/src/ex_docmd.c 2019-01-13 23:38:33.387773334 +0100
+--- src/ex_docmd.c 2019-01-14 20:14:51.360362936 +0100
+***************
+*** 2290,2296 ****
+ /* check these explicitly for a more specific error message */
+ if (*ea.arg == '*' || *ea.arg == '+')
+ {
+! errormsg = (char_u *)_(e_invalidreg);
+ goto doend;
+ }
+ #endif
+--- 2290,2296 ----
+ /* check these explicitly for a more specific error message */
+ if (*ea.arg == '*' || *ea.arg == '+')
+ {
+! errormsg = _(e_invalidreg);
+ goto doend;
+ }
+ #endif
+*** ../vim-8.1.0744/src/mbyte.c 2019-01-13 23:38:33.399773248 +0100
+--- src/mbyte.c 2019-01-14 20:14:19.048586175 +0100
+***************
+*** 560,566 ****
+ else if (GetLastError() == ERROR_INVALID_PARAMETER)
+ {
+ codepage_invalid:
+! return (char_u *)N_("E543: Not a valid codepage");
+ }
+ }
+ #endif
+--- 560,566 ----
+ else if (GetLastError() == ERROR_INVALID_PARAMETER)
+ {
+ codepage_invalid:
+! return N_("E543: Not a valid codepage");
+ }
+ }
+ #endif
+*** ../vim-8.1.0744/src/version.c 2019-01-13 23:50:56.358162250 +0100
+--- src/version.c 2019-01-14 20:16:16.363775419 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 745,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+197. Your desk collapses under the weight of your computer peripherals.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0746 b/data/vim/patches/8.1.0746
new file mode 100644
index 000000000..cbf18d790
--- /dev/null
+++ b/data/vim/patches/8.1.0746
@@ -0,0 +1,171 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0746
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0746
+Problem: Highlighting not updated with conceal and 'cursorline'. (Jason
+ Franklin)
+Solution: Do not use a zero line number. Check if 'conceallevel' is set for
+ the current window.
+Files: src/main.c, src/testdir/test_conceal.vim,
+ src/testdir/dumps/Test_conceal_cul_01.dump,
+ src/testdir/dumps/Test_conceal_cul_02.dump,
+ src/testdir/dumps/Test_conceal_cul_03.dump
+
+
+*** ../vim-8.1.0745/src/main.c 2019-01-13 23:38:33.399773248 +0100
+--- src/main.c 2019-01-14 21:45:31.710209272 +0100
+***************
+*** 1170,1175 ****
+--- 1170,1179 ----
+ // locked, this would be a good time to handle the drop.
+ handle_any_postponed_drop();
+ #endif
++ #ifdef FEAT_CONCEAL
++ if (curwin->w_p_cole == 0)
++ conceal_update_lines = FALSE;
++ #endif
+
+ /* Trigger CursorMoved if the cursor moved. */
+ if (!finish_op && (
+***************
+*** 1201,1206 ****
+--- 1205,1211 ----
+ || need_cursor_line_redraw))
+ {
+ if (conceal_old_cursor_line != conceal_new_cursor_line
++ && conceal_old_cursor_line != 0
+ && conceal_old_cursor_line
+ <= curbuf->b_ml.ml_line_count)
+ redrawWinline(curwin, conceal_old_cursor_line);
+*** ../vim-8.1.0745/src/testdir/test_conceal.vim 2019-01-11 20:12:57.066876963 +0100
+--- src/testdir/test_conceal.vim 2019-01-14 21:23:37.893598209 +0100
+***************
+*** 109,111 ****
+--- 109,136 ----
+ call StopVimInTerminal(buf)
+ call delete('XTest_conceal')
+ endfunc
++
++ func Test_conceal_with_cursorline()
++ " Opens a help window, where 'conceal' is set, switches to the other window
++ " where 'cursorline' needs to be updated when the cursor moves.
++ call writefile([
++ \ 'set cursorline',
++ \ 'normal othis is a test',
++ \ 'new',
++ \ 'call setline(1, ["one", "two", "three", "four", "five"])',
++ \ 'set ft=help',
++ \ 'normal M',
++ \ ], 'XTest_conceal_cul')
++ let buf = RunVimInTerminal('-S XTest_conceal_cul', {})
++ call VerifyScreenDump(buf, 'Test_conceal_cul_01', {})
++
++ call term_sendkeys(buf, ":wincmd w\r")
++ call VerifyScreenDump(buf, 'Test_conceal_cul_02', {})
++
++ call term_sendkeys(buf, "k")
++ call VerifyScreenDump(buf, 'Test_conceal_cul_03', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XTest_conceal_cul')
++ endfunc
+*** ../vim-8.1.0745/src/testdir/dumps/Test_conceal_cul_01.dump 2019-01-14 21:51:11.119470557 +0100
+--- src/testdir/dumps/Test_conceal_cul_01.dump 2019-01-14 21:23:48.357499581 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| @71
++ |t|w|o| @71
++ >t+8&&|h|r|e@1| @69
++ |f+0&&|o|u|r| @70
++ |f|i|v|e| @70
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1| @11|A|l@1
++ | +0&&@74
++ |t+8&&|h|i|s| |i|s| |a| |t|e|s|t| @60
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ | +0&&@74
+*** ../vim-8.1.0745/src/testdir/dumps/Test_conceal_cul_02.dump 2019-01-14 21:51:11.123470550 +0100
+--- src/testdir/dumps/Test_conceal_cul_02.dump 2019-01-14 21:23:49.409489680 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| @71
++ |t|w|o| @71
++ |t+8&&|h|r|e@1| @69
++ |f+0&&|o|u|r| @70
++ |f|i|v|e| @70
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1| @11|A|l@1
++ | +0&&@74
++ |t+8&&|h|i|s| |i|s| |a| |t|e|s>t| @60
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
++ |:+0&&|w|i|n|c|m|d| |w| @65
+*** ../vim-8.1.0745/src/testdir/dumps/Test_conceal_cul_03.dump 2019-01-14 21:51:11.123470550 +0100
+--- src/testdir/dumps/Test_conceal_cul_03.dump 2019-01-14 21:45:41.326129187 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |o+0&#ffffff0|n|e| @71
++ |t|w|o| @71
++ |t+8&&|h|r|e@1| @69
++ |f+0&&|o|u|r| @70
++ |f|i|v|e| @70
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1| @11|A|l@1
++ > +8&&@74
++ |t+0&&|h|i|s| |i|s| |a| |t|e|s|t| @60
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|0|-|1| @9|A|l@1
++ |:+0&&|w|i|n|c|m|d| |w| @65
+*** ../vim-8.1.0745/src/version.c 2019-01-14 20:16:37.203631334 +0100
+--- src/version.c 2019-01-14 21:13:42.611178585 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 746,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+202. You're amazed to find out Spam is a 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.0747 b/data/vim/patches/8.1.0747
new file mode 100644
index 000000000..44c07dd60
--- /dev/null
+++ b/data/vim/patches/8.1.0747
@@ -0,0 +1,139 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0747
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0747
+Problem: map() with a bad expression doesn't give an error. (Ingo Karkat)
+Solution: Check for giving an error message. (closes #3800)
+Files: src/eval.c, src/testdir/test_filter_map.vim
+
+
+*** ../vim-8.1.0746/src/eval.c 2019-01-13 23:38:33.383773361 +0100
+--- src/eval.c 2019-01-14 22:17:17.022853149 +0100
+***************
+*** 696,701 ****
+--- 696,725 ----
+ return (int)retval;
+ }
+
++ /*
++ * Call eval1() and give an error message if not done at a lower level.
++ */
++ static int
++ eval1_emsg(char_u **arg, typval_T *rettv, int evaluate)
++ {
++ int ret;
++ int did_emsg_before = did_emsg;
++ int called_emsg_before = called_emsg;
++
++ ret = eval1(arg, rettv, evaluate);
++ if (ret == FAIL)
++ {
++ // Report the invalid expression unless the expression evaluation has
++ // been cancelled due to an aborting error, an interrupt, or an
++ // exception, or we already gave a more specific error.
++ // Also check called_emsg for when using assert_fails().
++ if (!aborting() && did_emsg == did_emsg_before
++ && called_emsg == called_emsg_before)
++ semsg(_(e_invexpr2), arg);
++ }
++ return ret;
++ }
++
+ static int
+ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv)
+ {
+***************
+*** 729,735 ****
+ if (s == NULL)
+ return FAIL;
+ s = skipwhite(s);
+! if (eval1(&s, rettv, TRUE) == FAIL)
+ return FAIL;
+ if (*s != NUL) /* check for trailing chars after expr */
+ {
+--- 753,759 ----
+ if (s == NULL)
+ return FAIL;
+ s = skipwhite(s);
+! if (eval1_emsg(&s, rettv, TRUE) == FAIL)
+ return FAIL;
+ if (*s != NUL) /* check for trailing chars after expr */
+ {
+***************
+*** 8464,8481 ****
+ while (*arg != NUL && *arg != '|' && *arg != '\n')
+ {
+ p = arg;
+! if (eval1(&arg, &rettv, !eap->skip) == FAIL)
+! {
+! /*
+! * Report the invalid expression unless the expression evaluation
+! * has been cancelled due to an aborting error, an interrupt, or an
+! * exception.
+! */
+! if (!aborting() && did_emsg == save_did_emsg)
+! semsg(_(e_invexpr2), p);
+! ret = FAIL;
+ break;
+- }
+
+ if (!eap->skip)
+ {
+--- 8488,8496 ----
+ while (*arg != NUL && *arg != '|' && *arg != '\n')
+ {
+ p = arg;
+! ret = eval1_emsg(&arg, &rettv, !eap->skip);
+! if (ret == FAIL)
+ break;
+
+ if (!eap->skip)
+ {
+***************
+*** 10758,10763 ****
+--- 10773,10779 ----
+ }
+ else
+ {
++ // argvars[0].v_type == VAR_LIST
+ vimvars[VV_KEY].vv_type = VAR_NUMBER;
+
+ for (li = l->lv_first; li != NULL; li = nli)
+*** ../vim-8.1.0746/src/testdir/test_filter_map.vim 2016-07-08 20:01:07.000000000 +0200
+--- src/testdir/test_filter_map.vim 2019-01-14 22:17:58.102558935 +0100
+***************
+*** 79,81 ****
+--- 79,86 ----
+ endfunc
+ call assert_equal({"foo": "f", "bar": "b", "baz": "b"}, map(copy(dict), function('s:filter4')))
+ endfunc
++
++ func Test_map_fails()
++ call assert_fails('call map([1], "42 +")', 'E15:')
++ call assert_fails('call filter([1], "42 +")', 'E15:')
++ endfunc
+*** ../vim-8.1.0746/src/version.c 2019-01-14 21:51:17.987461933 +0100
+--- src/version.c 2019-01-14 22:18:16.678425599 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 747,
+ /**/
+
+--
+Spam seems to be something useful to novices. Later you realize that
+it's a bunch of indigestable junk that only clogs your system.
+Applies to both the food and the 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.0748 b/data/vim/patches/8.1.0748
new file mode 100644
index 000000000..65f4aba43
--- /dev/null
+++ b/data/vim/patches/8.1.0748
@@ -0,0 +1,136 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0748
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0748
+Problem: Using sprintf() instead of semsg().
+Solution: Use semsg(). Fix bug with E888. (Ozaki Kiichi, closes #3801)
+Files: src/regexp.c
+
+
+*** ../vim-8.1.0747/src/regexp.c 2019-01-13 23:38:33.407773189 +0100
+--- src/regexp.c 2019-01-14 22:39:42.656618226 +0100
+***************
+*** 338,343 ****
+--- 338,344 ----
+ #define IEMSG_RET_NULL(m) return (iemsg((m)), rc_did_emsg = TRUE, (void *)NULL)
+ #define EMSG_RET_FAIL(m) return (emsg((m)), rc_did_emsg = TRUE, FAIL)
+ #define EMSG2_RET_NULL(m, c) return (semsg((const char *)(m), (c) ? "" : "\\"), rc_did_emsg = TRUE, (void *)NULL)
++ #define EMSG3_RET_NULL(m, c, a) return (semsg((const char *)(m), (c) ? "" : "\\", (a)), rc_did_emsg = TRUE, (void *)NULL)
+ #define EMSG2_RET_FAIL(m, c) return (semsg((const char *)(m), (c) ? "" : "\\"), rc_did_emsg = TRUE, FAIL)
+ #define EMSG_ONE_RET_NULL EMSG2_RET_NULL(_("E369: invalid item in %s%%[]"), reg_magic == MAGIC_ALL)
+
+***************
+*** 1895,1908 ****
+ }
+ if (re_multi_type(peekchr()) != NOT_MULTI)
+ {
+! /* Can't have a multi follow a multi. */
+ if (peekchr() == Magic('*'))
+! sprintf((char *)IObuff, _("E61: Nested %s*"),
+! reg_magic >= MAGIC_ON ? "" : "\\");
+! else
+! sprintf((char *)IObuff, _("E62: Nested %s%c"),
+! reg_magic == MAGIC_ALL ? "" : "\\", no_Magic(peekchr()));
+! EMSG_RET_NULL((char *)IObuff);
+ }
+
+ return ret;
+--- 1896,1906 ----
+ }
+ if (re_multi_type(peekchr()) != NOT_MULTI)
+ {
+! // Can't have a multi follow a multi.
+ if (peekchr() == Magic('*'))
+! EMSG2_RET_NULL(_("E61: Nested %s*"), reg_magic >= MAGIC_ON);
+! EMSG3_RET_NULL(_("E62: Nested %s%c"), reg_magic == MAGIC_ALL,
+! no_Magic(peekchr()));
+ }
+
+ return ret;
+***************
+*** 2075,2084 ****
+ case Magic('{'):
+ case Magic('*'):
+ c = no_Magic(c);
+! sprintf((char *)IObuff, _("E64: %s%c follows nothing"),
+! (c == '*' ? reg_magic >= MAGIC_ON : reg_magic == MAGIC_ALL)
+! ? "" : "\\", c);
+! EMSG_RET_NULL((char *)IObuff);
+ /* NOTREACHED */
+
+ case Magic('~'): /* previous substitute pattern */
+--- 2073,2080 ----
+ case Magic('{'):
+ case Magic('*'):
+ c = no_Magic(c);
+! EMSG3_RET_NULL(_("E64: %s%c follows nothing"),
+! (c == '*' ? reg_magic >= MAGIC_ON : reg_magic == MAGIC_ALL), c);
+ /* NOTREACHED */
+
+ case Magic('~'): /* previous substitute pattern */
+***************
+*** 3403,3413 ****
+ if (*regparse == '\\')
+ regparse++; /* Allow either \{...} or \{...\} */
+ if (*regparse != '}')
+! {
+! sprintf((char *)IObuff, _("E554: Syntax error in %s{...}"),
+! reg_magic == MAGIC_ALL ? "" : "\\");
+! EMSG_RET_FAIL((char *)IObuff);
+! }
+
+ /*
+ * Reverse the range if there was a '-', or make sure it is in the right
+--- 3399,3406 ----
+ if (*regparse == '\\')
+ regparse++; /* Allow either \{...} or \{...\} */
+ if (*regparse != '}')
+! EMSG2_RET_FAIL(_("E554: Syntax error in %s{...}"),
+! reg_magic == MAGIC_ALL);
+
+ /*
+ * Reverse the range if there was a '-', or make sure it is in the right
+***************
+*** 6998,7004 ****
+ re_mult_next(char *what)
+ {
+ if (re_multi_type(peekchr()) == MULTI_MULT)
+! EMSG2_RET_FAIL(_("E888: (NFA regexp) cannot repeat %s"), what);
+ return OK;
+ }
+
+--- 6991,7001 ----
+ re_mult_next(char *what)
+ {
+ if (re_multi_type(peekchr()) == MULTI_MULT)
+! {
+! semsg(_("E888: (NFA regexp) cannot repeat %s"), what);
+! rc_did_emsg = TRUE;
+! return FAIL;
+! }
+ return OK;
+ }
+
+*** ../vim-8.1.0747/src/version.c 2019-01-14 22:22:25.584624342 +0100
+--- src/version.c 2019-01-14 22:45:14.998094549 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 748,
+ /**/
+
+--
+$ 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.0749 b/data/vim/patches/8.1.0749
new file mode 100644
index 000000000..6f9e54ec7
--- /dev/null
+++ b/data/vim/patches/8.1.0749
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0749
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0749 (after 8.1.0747)
+Problem: Error message contains garbage. (Dominique Pelle)
+Solution: Use correct pointer to failed expression.
+Files: src/eval.c
+
+
+*** ../vim-8.1.0748/src/eval.c 2019-01-14 22:22:25.584624342 +0100
+--- src/eval.c 2019-01-14 22:50:17.495808459 +0100
+***************
+*** 702,707 ****
+--- 702,708 ----
+ static int
+ eval1_emsg(char_u **arg, typval_T *rettv, int evaluate)
+ {
++ char_u *start = *arg;
+ int ret;
+ int did_emsg_before = did_emsg;
+ int called_emsg_before = called_emsg;
+***************
+*** 715,721 ****
+ // Also check called_emsg for when using assert_fails().
+ if (!aborting() && did_emsg == did_emsg_before
+ && called_emsg == called_emsg_before)
+! semsg(_(e_invexpr2), arg);
+ }
+ return ret;
+ }
+--- 716,722 ----
+ // Also check called_emsg for when using assert_fails().
+ if (!aborting() && did_emsg == did_emsg_before
+ && called_emsg == called_emsg_before)
+! semsg(_(e_invexpr2), start);
+ }
+ return ret;
+ }
+*** ../vim-8.1.0748/src/version.c 2019-01-14 22:46:11.969663388 +0100
+--- src/version.c 2019-01-14 22:52:57.994597999 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 749,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+204. You're being audited because you mailed your tax return to the IRC.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0750 b/data/vim/patches/8.1.0750
new file mode 100644
index 000000000..dd2d998a8
--- /dev/null
+++ b/data/vim/patches/8.1.0750
@@ -0,0 +1,115 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0750
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0750
+Problem: When the last sign is deleted the signcolumn may not be removed
+ even though 'signcolumn' is "auto".
+Solution: When deleting the last sign redraw the buffer. (Dominique Pelle,
+ closes #3803, closes #3804)
+Files: src/sign.c
+
+
+*** ../vim-8.1.0749/src/sign.c 2019-01-13 23:38:33.411773162 +0100
+--- src/sign.c 2019-01-14 23:05:24.500076657 +0100
+***************
+*** 374,381 ****
+
+ /*
+ * Return the type number of the sign at line number 'lnum' in buffer 'buf'
+! * which has the attribute specifed by 'type'. Returns 0 if a sign is not found
+! * at the line number or it doesn't have the specified attribute.
+ */
+ int
+ buf_getsigntype(
+--- 374,381 ----
+
+ /*
+ * Return the type number of the sign at line number 'lnum' in buffer 'buf'
+! * which has the attribute specified by 'type'. Returns 0 if a sign is not
+! * found at the line number or it doesn't have the specified attribute.
+ */
+ int
+ buf_getsigntype(
+***************
+*** 442,448 ****
+ redraw_buf_line_later(buf, lnum);
+
+ // Check whether only one sign needs to be deleted
+! // If deleting a sign with a specific identifer in a particular
+ // group or deleting any sign at a particular line number, delete
+ // only one sign.
+ if (group == NULL
+--- 442,448 ----
+ redraw_buf_line_later(buf, lnum);
+
+ // Check whether only one sign needs to be deleted
+! // If deleting a sign with a specific identifier in a particular
+ // group or deleting any sign at a particular line number, delete
+ // only one sign.
+ if (group == NULL
+***************
+*** 455,463 ****
+ }
+
+ // When deleting the last sign the cursor position may change, because the
+! // sign columns no longer shows.
+ if (buf->b_signlist == NULL)
+ changed_cline_bef_curs();
+
+ return lnum;
+ }
+--- 455,466 ----
+ }
+
+ // When deleting the last sign the cursor position may change, because the
+! // sign columns no longer shows. And the 'signcolumn' may be hidden.
+ if (buf->b_signlist == NULL)
++ {
++ redraw_buf_later(buf, NOT_VALID);
+ changed_cline_bef_curs();
++ }
+
+ return lnum;
+ }
+***************
+*** 894,900 ****
+ }
+
+ /*
+! * Place a sign at the specifed file location or update a sign.
+ */
+ int
+ sign_place(
+--- 897,903 ----
+ }
+
+ /*
+! * Place a sign at the specified file location or update a sign.
+ */
+ int
+ sign_place(
+*** ../vim-8.1.0749/src/version.c 2019-01-14 22:53:26.750381258 +0100
+--- src/version.c 2019-01-14 23:06:45.783328804 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 750,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+208. Your goals for the future are obtaining an T1 connection and
+ a 130 gig hard drive.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0751 b/data/vim/patches/8.1.0751
new file mode 100644
index 000000000..fd7281e82
--- /dev/null
+++ b/data/vim/patches/8.1.0751
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0751
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0751
+Problem: Some regexp errors are not tested.
+Solution: Add a test function.
+Files: src/testdir/test_regexp_latin.vim
+
+
+*** ../vim-8.1.0750/src/testdir/test_regexp_latin.vim 2017-06-17 20:05:45.000000000 +0200
+--- src/testdir/test_regexp_latin.vim 2019-01-14 23:17:56.697586114 +0100
+***************
+*** 72,74 ****
+--- 72,86 ----
+ call assert_fails('call search("\\%#=2\\(e\\1\\)")', 'E65:')
+ bwipe!
+ endfunc
++
++ func Test_multi_failure()
++ set re=1
++ call assert_fails('/a**', 'E61:')
++ call assert_fails('/a*\+', 'E62:')
++ call assert_fails('/a\{a}', 'E554:')
++ set re=2
++ call assert_fails('/a**', 'E871:')
++ call assert_fails('/a*\+', 'E871:')
++ call assert_fails('/a\{a}', 'E870:')
++ set re=0
++ endfunc
+*** ../vim-8.1.0750/src/version.c 2019-01-14 23:08:13.062543252 +0100
+--- src/version.c 2019-01-14 23:18:43.329203969 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 751,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+209. Your house stinks because you haven't cleaned it in a week.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0752 b/data/vim/patches/8.1.0752
new file mode 100644
index 000000000..98020703c
--- /dev/null
+++ b/data/vim/patches/8.1.0752
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0752
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0752
+Problem: One more compiler warning for signed/unsigned string. (Tony
+ Mechelynck)
+Solution: Remove type cast.
+Files: src/ex_docmd.c
+
+
+*** ../vim-8.1.0751/src/ex_docmd.c 2019-01-14 20:16:37.203631334 +0100
+--- src/ex_docmd.c 2019-01-15 20:05:22.610400887 +0100
+***************
+*** 10942,10948 ****
+ return NULL;
+ }
+ #else
+! *errormsg = (char_u *)_("E809: #< is not available without the +eval feature");
+ return NULL;
+ #endif
+ }
+--- 10942,10948 ----
+ return NULL;
+ }
+ #else
+! *errormsg = _("E809: #< is not available without the +eval feature");
+ return NULL;
+ #endif
+ }
+*** ../vim-8.1.0751/src/version.c 2019-01-14 23:19:26.244853406 +0100
+--- src/version.c 2019-01-15 20:06:27.745876032 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 752,
+ /**/
+
+--
+Your mouse has moved. Windows must be restarted for the change
+to take effect. Reboot now?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0753 b/data/vim/patches/8.1.0753
new file mode 100644
index 000000000..fb1095e5f
--- /dev/null
+++ b/data/vim/patches/8.1.0753
@@ -0,0 +1,548 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0753
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0753
+Problem: printf format not checked for semsg().
+Solution: Add GNUC attribute and fix reported problems. (Dominique Pelle,
+ closes #3805)
+Files: src/buffer.c, src/diff.c, src/eval.c, src/evalfunc.c,
+ src/ex_docmd.c, src/if_cscope.c, src/netbeans.c, src/proto.h,
+ src/proto/message.pro, src/quickfix.c, src/regexp_nfa.c,
+ src/sign.c, src/spellfile.c, src/window.c, src/gui_x11.c
+
+
+*** ../vim-8.1.0752/src/buffer.c 2019-01-13 23:38:33.375773418 +0100
+--- src/buffer.c 2019-01-15 20:12:27.203089550 +0100
+***************
+*** 1407,1413 ****
+ else
+ #endif
+ {
+! semsg(_("E89: No write since last change for buffer %ld (add ! to override)"),
+ buf->b_fnum);
+ return FAIL;
+ }
+--- 1407,1413 ----
+ else
+ #endif
+ {
+! semsg(_("E89: No write since last change for buffer %d (add ! to override)"),
+ buf->b_fnum);
+ return FAIL;
+ }
+***************
+*** 2283,2289 ****
+ if ((options & GETF_ALT) && n == 0)
+ emsg(_(e_noalt));
+ else
+! semsg(_("E92: Buffer %ld not found"), n);
+ return FAIL;
+ }
+
+--- 2283,2289 ----
+ if ((options & GETF_ALT) && n == 0)
+ emsg(_(e_noalt));
+ else
+! semsg(_("E92: Buffer %d not found"), n);
+ return FAIL;
+ }
+
+*** ../vim-8.1.0752/src/diff.c 2019-01-13 23:38:33.379773390 +0100
+--- src/diff.c 2019-01-15 20:12:27.203089550 +0100
+***************
+*** 173,179 ****
+ return;
+ }
+
+! semsg(_("E96: Cannot diff more than %ld buffers"), DB_COUNT);
+ }
+
+ /*
+--- 173,179 ----
+ return;
+ }
+
+! semsg(_("E96: Cannot diff more than %d buffers"), DB_COUNT);
+ }
+
+ /*
+*** ../vim-8.1.0752/src/eval.c 2019-01-14 22:53:26.750381258 +0100
+--- src/eval.c 2019-01-15 20:12:27.207089517 +0100
+***************
+*** 268,274 ****
+
+ /*
+ * Sort the function table by function name.
+! * The sorting of the table above is ASCII dependant.
+ * On machines using EBCDIC we have to sort it.
+ */
+ static void
+--- 268,274 ----
+
+ /*
+ * Sort the function table by function name.
+! * The sorting of the table above is ASCII dependent.
+ * On machines using EBCDIC we have to sort it.
+ */
+ static void
+*** ../vim-8.1.0752/src/evalfunc.c 2019-01-13 23:38:33.387773334 +0100
+--- src/evalfunc.c 2019-01-15 20:12:27.207089517 +0100
+***************
+*** 8256,8262 ****
+ return;
+ if (id >= 1 && id <= 3)
+ {
+! semsg(_("E798: ID is reserved for \":match\": %ld"), id);
+ return;
+ }
+
+--- 8256,8262 ----
+ return;
+ if (id >= 1 && id <= 3)
+ {
+! semsg(_("E798: ID is reserved for \":match\": %d"), id);
+ return;
+ }
+
+***************
+*** 8314,8320 ****
+ /* id == 3 is ok because matchaddpos() is supposed to substitute :3match */
+ if (id == 1 || id == 2)
+ {
+! semsg(_("E798: ID is reserved for \":match\": %ld"), id);
+ return;
+ }
+
+--- 8314,8320 ----
+ /* id == 3 is ok because matchaddpos() is supposed to substitute :3match */
+ if (id == 1 || id == 2)
+ {
+! semsg(_("E798: ID is reserved for \":match\": %d"), id);
+ return;
+ }
+
+*** ../vim-8.1.0752/src/ex_docmd.c 2019-01-15 20:07:44.693265335 +0100
+--- src/ex_docmd.c 2019-01-15 20:12:31.131059874 +0100
+***************
+*** 1347,1353 ****
+ }
+ else if (p != NULL)
+ {
+! semsg(p);
+ vim_free(p);
+ }
+ vim_free(sourcing_name);
+--- 1347,1353 ----
+ }
+ else if (p != NULL)
+ {
+! emsg(p);
+ vim_free(p);
+ }
+ vim_free(sourcing_name);
+***************
+*** 5788,5795 ****
+ return FAIL;
+ }
+ #endif
+! semsg(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;
+--- 5788,5795 ----
+ return FAIL;
+ }
+ #endif
+! semsg(NGETTEXT("E173: %d more file to edit",
+! "E173: %d more files to edit", n), n);
+ quitmore = 2; /* next try to quit is allowed */
+ }
+ return FAIL;
+***************
+*** 6958,6964 ****
+ }
+ }
+
+! /* break if there no <item> is found */
+ if (start == NULL || end == NULL)
+ break;
+
+--- 6958,6964 ----
+ }
+ }
+
+! /* break if no <item> is found */
+ if (start == NULL || end == NULL)
+ break;
+
+***************
+*** 8022,8028 ****
+ /*
+ * 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.
+ *
+--- 8022,8028 ----
+ /*
+ * 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.
+ *
+*** ../vim-8.1.0752/src/if_cscope.c 2019-01-13 23:38:33.395773275 +0100
+--- src/if_cscope.c 2019-01-15 20:12:31.131059874 +0100
+***************
+*** 651,657 ****
+ cs_reading_emsg(
+ int idx) /* connection index */
+ {
+! semsg(_("E262: error reading cscope connection %ld"), idx);
+ }
+
+ #define CSREAD_BUFSIZE 2048
+--- 651,657 ----
+ cs_reading_emsg(
+ int idx) /* connection index */
+ {
+! semsg(_("E262: error reading cscope connection %d"), idx);
+ }
+
+ #define CSREAD_BUFSIZE 2048
+*** ../vim-8.1.0752/src/netbeans.c 2019-01-13 23:38:33.403773217 +0100
+--- src/netbeans.c 2019-01-15 20:12:31.135059844 +0100
+***************
+*** 1541,1547 ****
+ if (!buf->bufp->b_netbeans_file)
+ {
+ nbdebug(("E658: NetBeans connection lost for buffer %ld\n", buf->bufp->b_fnum));
+! semsg(_("E658: NetBeans connection lost for buffer %ld"),
+ buf->bufp->b_fnum);
+ }
+ else
+--- 1541,1547 ----
+ if (!buf->bufp->b_netbeans_file)
+ {
+ nbdebug(("E658: NetBeans connection lost for buffer %ld\n", buf->bufp->b_fnum));
+! semsg(_("E658: NetBeans connection lost for buffer %d"),
+ buf->bufp->b_fnum);
+ }
+ else
+*** ../vim-8.1.0752/src/proto.h 2019-01-13 23:38:33.407773189 +0100
+--- src/proto.h 2019-01-15 20:12:31.135059844 +0100
+***************
+*** 108,126 ****
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg(const char *, ...);
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr(int, const char *, ...);
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr_keep(int, const char *, ...);
+
+ int
+ # ifdef __BORLANDC__
+--- 108,138 ----
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg(const char *, ...)
+! #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+! __attribute__((format(printf, 1, 0)))
+! #endif
+! ;
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr(int, const char *, ...)
+! #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+! __attribute__((format(printf, 2, 3)))
+! #endif
+! ;
+
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+ # endif
+! smsg_attr_keep(int, const char *, ...)
+! #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+! __attribute__((format(printf, 2, 3)))
+! #endif
+! ;
+
+ int
+ # ifdef __BORLANDC__
+*** ../vim-8.1.0752/src/proto/message.pro 2019-01-13 23:38:33.407773189 +0100
+--- src/proto/message.pro 2019-01-15 20:12:35.675025564 +0100
+***************
+*** 11,19 ****
+ void ignore_error_for_testing(char_u *error);
+ void do_perror(char *msg);
+ int emsg(char *s);
+! int semsg(const char *s, ...);
+ void iemsg(char *s);
+! void siemsg(const char *s, ...);
+ void internal_error(char *where);
+ void emsg_invreg(int name);
+ char_u *msg_trunc_attr(char_u *s, int force, int attr);
+--- 11,28 ----
+ void ignore_error_for_testing(char_u *error);
+ void do_perror(char *msg);
+ int emsg(char *s);
+!
+! int semsg(const char *s, ...)
+! #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+! __attribute__((format(printf, 1, 2)))
+! #endif
+! ;
+ void iemsg(char *s);
+! void siemsg(const char *s, ...)
+! #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+! __attribute__((format(printf, 1, 2)))
+! #endif
+! ;
+ void internal_error(char *where);
+ void emsg_invreg(int name);
+ char_u *msg_trunc_attr(char_u *s, int force, int attr);
+*** ../vim-8.1.0752/src/quickfix.c 2019-01-13 23:38:33.407773189 +0100
+--- src/quickfix.c 2019-01-15 20:12:35.675025564 +0100
+***************
+*** 6263,6269 ****
+ if (!did_bufnr_emsg)
+ {
+ did_bufnr_emsg = TRUE;
+! semsg(_("E92: Buffer %ld not found"), bufnum);
+ }
+ valid = FALSE;
+ bufnum = 0;
+--- 6263,6269 ----
+ if (!did_bufnr_emsg)
+ {
+ did_bufnr_emsg = TRUE;
+! semsg(_("E92: Buffer %d not found"), bufnum);
+ }
+ valid = FALSE;
+ bufnum = 0;
+*** ../vim-8.1.0752/src/regexp_nfa.c 2019-01-13 23:38:33.407773189 +0100
+--- src/regexp_nfa.c 2019-01-15 20:12:35.675025564 +0100
+***************
+*** 1307,1313 ****
+ rc_did_emsg = TRUE;
+ return FAIL;
+ }
+! siemsg("INTERNAL: Unknown character class char: %ld", c);
+ return FAIL;
+ }
+ #ifdef FEAT_MBYTE
+--- 1307,1313 ----
+ rc_did_emsg = TRUE;
+ return FAIL;
+ }
+! siemsg("INTERNAL: Unknown character class char: %d", c);
+ return FAIL;
+ }
+ #ifdef FEAT_MBYTE
+*** ../vim-8.1.0752/src/sign.c 2019-01-14 23:08:13.058543291 +0100
+--- src/sign.c 2019-01-15 20:12:35.675025564 +0100
+***************
+*** 162,168 ****
+ group = HI2SG(hi);
+ }
+
+! // Search for the next usuable sign identifier
+ while (!found)
+ {
+ if (group == NULL)
+--- 162,168 ----
+ group = HI2SG(hi);
+ }
+
+! // Search for the next usable sign identifier
+ while (!found)
+ {
+ if (group == NULL)
+***************
+*** 996,1002 ****
+
+ if ((lnum = buf_findsign(buf, sign_id, sign_group)) <= 0)
+ {
+! semsg(_("E157: Invalid sign ID: %ld"), sign_id);
+ return -1;
+ }
+
+--- 996,1002 ----
+
+ if ((lnum = buf_findsign(buf, sign_id, sign_group)) <= 0)
+ {
+! semsg(_("E157: Invalid sign ID: %d"), sign_id);
+ return -1;
+ }
+
+*** ../vim-8.1.0752/src/spellfile.c 2019-01-13 23:38:33.411773162 +0100
+--- src/spellfile.c 2019-01-15 20:12:35.675025564 +0100
+***************
+*** 6014,6020 ****
+ else if (vim_strchr(gettail(wfname), '_') != NULL)
+ emsg(_("E751: Output file name must not have region name"));
+ else if (incount > MAXREGIONS)
+! semsg(_("E754: Only up to %ld regions supported"), MAXREGIONS);
+ else
+ {
+ /* Check for overwriting before doing things that may take a lot of
+--- 6014,6020 ----
+ else if (vim_strchr(gettail(wfname), '_') != NULL)
+ emsg(_("E751: Output file name must not have region name"));
+ else if (incount > MAXREGIONS)
+! semsg(_("E754: Only up to %d regions supported"), MAXREGIONS);
+ else
+ {
+ /* Check for overwriting before doing things that may take a lot of
+***************
+*** 6274,6280 ****
+ break;
+ if (*spf == NUL)
+ {
+! semsg(_("E765: 'spellfile' does not have %ld entries"), idx);
+ vim_free(fnamebuf);
+ return;
+ }
+--- 6274,6280 ----
+ break;
+ if (*spf == NUL)
+ {
+! semsg(_("E765: 'spellfile' does not have %d entries"), idx);
+ vim_free(fnamebuf);
+ return;
+ }
+*** ../vim-8.1.0752/src/window.c 2019-01-13 23:38:33.415773131 +0100
+--- src/window.c 2019-01-15 20:12:35.679025534 +0100
+***************
+*** 6782,6788 ****
+ return -1;
+ if (id < -1 || id == 0)
+ {
+! semsg(_("E799: Invalid ID: %ld (must be greater than or equal to 1)"), id);
+ return -1;
+ }
+ if (id != -1)
+--- 6782,6788 ----
+ return -1;
+ if (id < -1 || id == 0)
+ {
+! semsg(_("E799: Invalid ID: %d (must be greater than or equal to 1)"), id);
+ return -1;
+ }
+ if (id != -1)
+***************
+*** 6792,6798 ****
+ {
+ if (cur->id == id)
+ {
+! semsg(_("E801: ID already taken: %ld"), id);
+ return -1;
+ }
+ cur = cur->next;
+--- 6792,6798 ----
+ {
+ if (cur->id == id)
+ {
+! semsg(_("E801: ID already taken: %d"), id);
+ return -1;
+ }
+ cur = cur->next;
+***************
+*** 6969,6975 ****
+ if (id < 1)
+ {
+ if (perr == TRUE)
+! semsg(_("E802: Invalid ID: %ld (must be greater than or equal to 1)"),
+ id);
+ return -1;
+ }
+--- 6969,6975 ----
+ if (id < 1)
+ {
+ if (perr == TRUE)
+! semsg(_("E802: Invalid ID: %d (must be greater than or equal to 1)"),
+ id);
+ return -1;
+ }
+***************
+*** 6981,6987 ****
+ if (cur == NULL)
+ {
+ if (perr == TRUE)
+! semsg(_("E803: ID not found: %ld"), id);
+ return -1;
+ }
+ if (cur == prev)
+--- 6981,6987 ----
+ if (cur == NULL)
+ {
+ if (perr == TRUE)
+! semsg(_("E803: ID not found: %d"), id);
+ return -1;
+ }
+ if (cur == prev)
+*** ../vim-8.1.0752/src/gui_x11.c 2019-01-13 23:38:33.395773275 +0100
+--- src/gui_x11.c 2019-01-15 20:16:45.801159811 +0100
+***************
+*** 2210,2218 ****
+ semsg(_("E253: Fontset name: %s"), base_name);
+ semsg(_("Font0: %s"), font_name[min_font_idx]);
+ semsg(_("Font1: %s"), font_name[i]);
+! semsg(_("Font%ld width is not twice that of font0"), i);
+! semsg(_("Font0 width: %ld"), xfs[min_font_idx]->max_bounds.width);
+! semsg(_("Font1 width: %ld"), xfs[i]->max_bounds.width);
+ return FAIL;
+ }
+ }
+--- 2210,2219 ----
+ semsg(_("E253: Fontset name: %s"), base_name);
+ semsg(_("Font0: %s"), font_name[min_font_idx]);
+ semsg(_("Font1: %s"), font_name[i]);
+! semsg(_("Font%d width is not twice that of font0"), i);
+! semsg(_("Font0 width: %d"),
+! (int)xfs[min_font_idx]->max_bounds.width);
+! semsg(_("Font%d width: %d"), i, (int)xfs[i]->max_bounds.width);
+ return FAIL;
+ }
+ }
+*** ../vim-8.1.0752/src/version.c 2019-01-15 20:07:44.697265303 +0100
+--- src/version.c 2019-01-15 20:11:25.723555755 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 753,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+212. Your Internet group window has more icons than your Accessories 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.0754 b/data/vim/patches/8.1.0754
new file mode 100644
index 000000000..30672a022
--- /dev/null
+++ b/data/vim/patches/8.1.0754
@@ -0,0 +1,81 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0754
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0754
+Problem: Preferred column is lost when setting 'cursorcolumn'.
+Solution: Change option flag to P_RWINONLY. (Takayuki Kurosawa,
+ closes #3806)
+Files: src/option.c, src/testdir/test_cursor_func.vim
+
+
+*** ../vim-8.1.0753/src/option.c 2019-01-13 23:50:56.358162250 +0100
+--- src/option.c 2019-01-15 21:10:37.747224757 +0100
+***************
+*** 989,995 ****
+ {"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
+--- 989,995 ----
+ {"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_RWINONLY,
+ #ifdef FEAT_SYN_HL
+ (char_u *)VAR_WIN, PV_CUC,
+ #else
+*** ../vim-8.1.0753/src/testdir/test_cursor_func.vim 2017-03-18 19:49:16.000000000 +0100
+--- src/testdir/test_cursor_func.vim 2019-01-15 21:08:08.320369420 +0100
+***************
+*** 46,48 ****
+--- 46,68 ----
+ quit!
+ endfunc
+
++ " Tests for behavior of curswant with cursorcolumn/line
++ func Test_curswant_with_cursorcolumn()
++ new
++ call setline(1, ['01234567', ''])
++ exe "normal! ggf6j"
++ call assert_equal(6, winsaveview().curswant)
++ set cursorcolumn
++ call assert_equal(6, winsaveview().curswant)
++ quit!
++ endfunc
++
++ func Test_curswant_with_cursorline()
++ new
++ call setline(1, ['01234567', ''])
++ exe "normal! ggf6j"
++ call assert_equal(6, winsaveview().curswant)
++ set cursorline
++ call assert_equal(6, winsaveview().curswant)
++ quit!
++ endfunc
+*** ../vim-8.1.0753/src/version.c 2019-01-15 20:19:36.747904404 +0100
+--- src/version.c 2019-01-15 21:12:04.794604307 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 754,
+ /**/
+
+--
+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.0755 b/data/vim/patches/8.1.0755
new file mode 100644
index 000000000..d1b35d2e4
--- /dev/null
+++ b/data/vim/patches/8.1.0755
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0755
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0755
+Problem: Error message for get() on a Blob with invalid index.
+Solution: Return an empty Blob, like get() on a List does.
+Files: src/evalfunc.c, src/testdir/test_blob.vim
+
+
+*** ../vim-8.1.0754/src/evalfunc.c 2019-01-15 20:19:36.743904434 +0100
+--- src/evalfunc.c 2019-01-15 22:13:20.055796887 +0100
+***************
+*** 4408,4417 ****
+ if (!error)
+ {
+ rettv->v_type = VAR_NUMBER;
+! if (idx >= blob_len(argvars[0].vval.v_blob))
+! semsg(_(e_blobidx), idx);
+ else
+ rettv->vval.v_number = blob_get(argvars[0].vval.v_blob, idx);
+ }
+ }
+ else if (argvars[0].v_type == VAR_LIST)
+--- 4408,4422 ----
+ if (!error)
+ {
+ rettv->v_type = VAR_NUMBER;
+! if (idx < 0)
+! idx = blob_len(argvars[0].vval.v_blob) + idx;
+! if (idx < 0 || idx >= blob_len(argvars[0].vval.v_blob))
+! rettv->vval.v_number = -1;
+ else
++ {
+ rettv->vval.v_number = blob_get(argvars[0].vval.v_blob, idx);
++ tv = rettv;
++ }
+ }
+ }
+ else if (argvars[0].v_type == VAR_LIST)
+*** ../vim-8.1.0754/src/testdir/test_blob.vim 2019-01-13 19:10:28.959419929 +0100
+--- src/testdir/test_blob.vim 2019-01-15 22:15:19.930912344 +0100
+***************
+*** 20,26 ****
+
+ call assert_equal(0xDE, get(b, 0))
+ call assert_equal(0xEF, get(b, 3))
+- call assert_fails('let x = get(b, 4)')
+
+ call assert_fails('let b = 0z1', 'E973:')
+ call assert_fails('let b = 0z1x', 'E973:')
+--- 20,25 ----
+***************
+*** 79,84 ****
+--- 78,95 ----
+ call assert_equal(0z, b[5:6])
+ endfunc
+
++ func Test_blob_get()
++ let b = 0z0011223344
++ call assert_equal(0x00, get(b, 0))
++ call assert_equal(0x22, get(b, 2, 999))
++ call assert_equal(0x44, get(b, 4))
++ call assert_equal(0x44, get(b, -1))
++ call assert_equal(-1, get(b, 5))
++ call assert_equal(999, get(b, 5, 999))
++ call assert_equal(-1, get(b, -8))
++ call assert_equal(999, get(b, -8, 999))
++ endfunc
++
+ func Test_blob_to_string()
+ let b = 0zDEADBEEF
+ call assert_equal('[0xDE,0xAD,0xBE,0xEF]', string(b))
+*** ../vim-8.1.0754/src/version.c 2019-01-15 21:12:53.602254042 +0100
+--- src/version.c 2019-01-15 22:15:52.206674053 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 755,
+ /**/
+
+--
+'Psychologist' -- Someone who looks at everyone else when
+an attractive woman enters the 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.0756 b/data/vim/patches/8.1.0756
new file mode 100644
index 000000000..23eb47901
--- /dev/null
+++ b/data/vim/patches/8.1.0756
@@ -0,0 +1,88 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0756
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0756
+Problem: copy() does not make a copy of a Blob.
+Solution: Make a copy.
+Files: src/eval.c, src/testdir/test_blob.vim
+
+
+*** ../vim-8.1.0755/src/eval.c 2019-01-15 20:19:36.739904461 +0100
+--- src/eval.c 2019-01-15 22:41:46.940261209 +0100
+***************
+*** 8198,8204 ****
+ case VAR_SPECIAL:
+ case VAR_JOB:
+ case VAR_CHANNEL:
+- case VAR_BLOB:
+ copy_tv(from, to);
+ break;
+ case VAR_LIST:
+--- 8198,8203 ----
+***************
+*** 8217,8222 ****
+--- 8216,8236 ----
+ if (to->vval.v_list == NULL)
+ ret = FAIL;
+ break;
++ case VAR_BLOB:
++ to->v_type = VAR_BLOB;
++ if (from->vval.v_blob == NULL)
++ to->vval.v_blob = NULL;
++ else if (rettv_blob_alloc(to) == FAIL)
++ ret = FAIL;
++ else
++ {
++ int len = from->vval.v_blob->bv_ga.ga_len;
++
++ to->vval.v_blob->bv_ga.ga_data =
++ vim_memsave(from->vval.v_blob->bv_ga.ga_data, len);
++ to->vval.v_blob->bv_ga.ga_len = len;
++ }
++ break;
+ case VAR_DICT:
+ to->v_type = VAR_DICT;
+ to->v_lock = 0;
+*** ../vim-8.1.0755/src/testdir/test_blob.vim 2019-01-15 22:16:37.414340200 +0100
+--- src/testdir/test_blob.vim 2019-01-15 22:34:42.983215061 +0100
+***************
+*** 112,118 ****
+--- 112,125 ----
+
+ call assert_false(b1 is b2)
+ let b2 = b1
++ call assert_true(b1 == b2)
+ call assert_true(b1 is b2)
++ let b2 = copy(b1)
++ call assert_true(b1 == b2)
++ call assert_false(b1 is b2)
++ let b2 = b1[:]
++ call assert_true(b1 == b2)
++ call assert_false(b1 is b2)
+
+ call assert_fails('let x = b1 > b2')
+ call assert_fails('let x = b1 < b2')
+*** ../vim-8.1.0755/src/version.c 2019-01-15 22:16:37.418340170 +0100
+--- src/version.c 2019-01-15 22:43:53.431371171 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 756,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+217. Your sex life has drastically improved...so what if it's only cyber-sex!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0757 b/data/vim/patches/8.1.0757
new file mode 100644
index 000000000..8d5ebe307
--- /dev/null
+++ b/data/vim/patches/8.1.0757
@@ -0,0 +1,335 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0757
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0757
+Problem: Not enough documentation for Blobs.
+Solution: Add a section about Blobs.
+Files: runtime/doc/eval.txt
+
+
+*** ../vim-8.1.0756/runtime/doc/eval.txt 2019-01-13 15:15:54.388762907 +0100
+--- runtime/doc/eval.txt 2019-01-15 22:48:29.185422882 +0100
+***************
+*** 17,23 ****
+ 1.2 Function references |Funcref|
+ 1.3 Lists |Lists|
+ 1.4 Dictionaries |Dictionaries|
+! 1.5 More about variables |more-variables|
+ 2. Expression syntax |expression-syntax|
+ 3. Internal variable |internal-variables|
+ 4. Builtin Functions |functions|
+--- 17,24 ----
+ 1.2 Function references |Funcref|
+ 1.3 Lists |Lists|
+ 1.4 Dictionaries |Dictionaries|
+! 1.5 Blobs |Blobs|
+! 1.6 More about variables |more-variables|
+ 2. Expression syntax |expression-syntax|
+ 3. Internal variable |internal-variables|
+ 4. Builtin Functions |functions|
+***************
+*** 53,59 ****
+ String A NUL terminated string of 8-bit unsigned characters (bytes).
+ |expr-string| Examples: "ab\txx\"--" 'x-z''a,c'
+
+! List An ordered sequence of items |List|.
+ Example: [1, 2, ['a', 'b']]
+
+ Dictionary An associative, unordered array: Each entry has a key and a
+--- 54,60 ----
+ String A NUL terminated string of 8-bit unsigned characters (bytes).
+ |expr-string| Examples: "ab\txx\"--" 'x-z''a,c'
+
+! List An ordered sequence of items, see |List| for details.
+ Example: [1, 2, ['a', 'b']]
+
+ Dictionary An associative, unordered array: Each entry has a key and a
+***************
+*** 72,78 ****
+
+ Channel Used for a channel, see |ch_open()|. *Channel* *Channels*
+
+! Blob Binary Large Object. Stores any sequence of bytes. *Blob*
+ Example: 0zFF00ED015DAF
+ 0z is an empty Blob.
+
+--- 73,80 ----
+
+ Channel Used for a channel, see |ch_open()|. *Channel* *Channels*
+
+! Blob Binary Large Object. Stores any sequence of bytes. See |Blob|
+! for details
+ Example: 0zFF00ED015DAF
+ 0z is an empty Blob.
+
+***************
+*** 621,627 ****
+ :call map(dict, '">> " . v:val') " prepend ">> " to each item
+
+
+! 1.5 More about variables ~
+ *more-variables*
+ If you need to know the type of a variable or expression, use the |type()|
+ function.
+--- 623,744 ----
+ :call map(dict, '">> " . v:val') " prepend ">> " to each item
+
+
+! 1.5 Blobs ~
+! *blob* *Blob* *Blobs* *E978*
+! A Blob mostly behaves like a |List| of numbers, where the numbers have an
+! 8-bit value, from 0 to 255.
+!
+!
+! Blob creation ~
+!
+! A Blob can be created with a |blob-literal|: >
+! :let b = 0zFF00ED015DAF
+!
+! A blob can be read from a file with |readfile()| passing the {type} argument
+! set to "B", for example: >
+! :let b = readfile('image.png', 'B')
+!
+! A blob can be read from a channel with the |ch_readblob()| function.
+!
+!
+! Blob index ~
+! *blob-index* *E979*
+! A byte in the Blob can be accessed by putting the index in square brackets
+! after the Blob. Indexes are zero-based, thus the first byte has index zero. >
+! :let myblob = 0z00112233
+! :let byte = myblob[0] " get the first byte: 0x00
+! :let byte = myblob[2] " get the third byte: 0x22
+!
+! A negative index is counted from the end. Index -1 refers to the last byte in
+! the Blob, -2 to the last but one byte, etc. >
+! :let last = myblob[-1] " get the last byte: 0x33
+!
+! To avoid an error for an invalid index use the |get()| function. When an item
+! is not available it returns -1 or the default value you specify: >
+! :echo get(myblob, idx)
+! :echo get(myblob, idx, 999)
+!
+!
+! Blob concatenation ~
+!
+! Two blobs can be concatenated with the "+" operator: >
+! :let longblob = myblob + 0z4455
+! :let myblob += 0z6677
+!
+! To change a blob in-place see |blob-modification| below.
+!
+!
+! Part of a blob ~
+!
+! A part of the Blob can be obtained by specifying the first and last index,
+! separated by a colon in square brackets: >
+! :let myblob = 0z00112233
+! :let shortblob = myblob[2:-1] " get 0z2233
+!
+! Omitting the first index is similar to zero. Omitting the last index is
+! similar to -1. >
+! :let endblob = myblob[2:] " from item 2 to the end: 0z2233
+! :let shortblob = myblob[2:2] " Blob with one byte: 0z22
+! :let otherblob = myblob[:] " make a copy of the Blob
+!
+! If the first index is beyond the last byte of the Blob or the second byte is
+! before the first byte, the result is an empty list. There is no error
+! message.
+!
+! If the second index is equal to or greater than the length of the list the
+! length minus one is used: >
+! :echo myblob[2:8] " result: 0z2233
+!
+!
+! Blob modification ~
+! *blob-modification*
+! To change a specific byte of a blob use |:let| this way: >
+! :let blob[4] = 0x44
+!
+! When the index is just one beyond the end of the Blob, it is appended. Any
+! higher index is an error.
+!
+! To change a sequence of bytes the [:] notation can be used: >
+! let blob[1:3] = 0z445566
+! The length of the replaced bytes much be exactly the same as the value
+! provided. *E972*
+!
+! To change part of a blob you can specify the first and last byte to be
+! modified. The value must at least have the number of bytes in the range: >
+! :let blob[3:5] = [3, 4, 5]
+!
+! You can also use the functions |add()|, |remove()| and |insert()|.
+!
+!
+! Blob identity ~
+!
+! Blobs can be compared for equality: >
+! if blob == 0z001122
+! And for equal identity: >
+! if blob is otherblob
+! < *blob-identity* *E977*
+! When variable "aa" is a Blob and you assign it to another variable "bb", both
+! variables refer to the same Blob. Then the "is" operator returns true.
+!
+! When making a copy using [:] or |copy()| the values are the same, but the
+! identity is different: >
+! :let blob = 0z112233
+! :let blob2 = blob
+! :echo blob == blob2
+! < 1 >
+! :echo blob is blob2
+! < 1 >
+! :let blob3 = blob[:]
+! :echo blob == blob3
+! < 1 >
+! :echo blob is blob3
+! < 0
+!
+! Making a copy of a list is done with the |copy()| function. Using [:] also
+! works, as explained above.
+!
+!
+! 1.6 More about variables ~
+ *more-variables*
+ If you need to know the type of a variable or expression, use the |type()|
+ function.
+***************
+*** 1156,1162 ****
+ Note that "\000" and "\x00" force the end of the string.
+
+
+! blob-literal *blob-literal* *E973* *E977* *E978*
+ ------------
+
+ Hexadecimal starting with 0z or 0Z, with an arbitrary number of bytes.
+--- 1284,1290 ----
+ Note that "\000" and "\x00" force the end of the string.
+
+
+! blob-literal *blob-literal* *E973*
+ ------------
+
+ Hexadecimal starting with 0z or 0Z, with an arbitrary number of bytes.
+***************
+*** 2034,2046 ****
+
+ abs({expr}) Float or Number absolute value of {expr}
+ 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
+--- 2164,2176 ----
+
+ abs({expr}) Float or Number absolute value of {expr}
+ acos({expr}) Float arc cosine of {expr}
+! add({object}, {item}) List/Blob append {item} to {object}
+ 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
+***************
+*** 2598,2610 ****
+ {only available when compiled with the |+float| feature}
+
+
+! add({list}, {expr}) *add()*
+! Append the item {expr} to |List| {list}. Returns the
+! resulting |List|. Examples: >
+ :let alist = add([1, 2, 3], item)
+ :call add(mylist, "woodstock")
+ < Note that when {expr} is a |List| it is appended as a single
+ item. Use |extend()| to concatenate |Lists|.
+ Use |insert()| to add an item at another position.
+
+
+--- 2728,2741 ----
+ {only available when compiled with the |+float| feature}
+
+
+! add({object}, {expr}) *add()*
+! Append the item {expr} to |List| or |Blob| {object}. Returns
+! the resulting |List| or |Blob|. Examples: >
+ :let alist = add([1, 2, 3], item)
+ :call add(mylist, "woodstock")
+ < Note that when {expr} is a |List| it is appended as a single
+ item. Use |extend()| to concatenate |Lists|.
++ When {object} is a |Blob| then {expr} must be a number.
+ Use |insert()| to add an item at another position.
+
+
+***************
+*** 3651,3661 ****
+ Return the Number 1 if {expr} is empty, zero otherwise.
+ - A |List| or |Dictionary| is empty when it does not have any
+ items.
+! - A String is empty when its length is zero.
+! - A Number and Float is empty when its value is zero.
+ - |v:false|, |v:none| and |v:null| are empty, |v:true| is not.
+! - A Job is empty when it failed to start.
+! - A Channel is empty when it is closed.
+
+ For a long |List| this is much faster than comparing the
+ length with zero.
+--- 3783,3794 ----
+ Return the Number 1 if {expr} is empty, zero otherwise.
+ - A |List| or |Dictionary| is empty when it does not have any
+ items.
+! - A |String| is empty when its length is zero.
+! - A |Number| and |Float| are empty when their value is zero.
+ - |v:false|, |v:none| and |v:null| are empty, |v:true| is not.
+! - A |Job| is empty when it failed to start.
+! - A |Channel| is empty when it is closed.
+! - A Blob is empty when its length is zero.
+
+ For a long |List| this is much faster than comparing the
+ length with zero.
+***************
+*** 4320,4325 ****
+--- 4461,4470 ----
+ Get item {idx} from |List| {list}. When this item is not
+ available return {default}. Return zero when {default} is
+ omitted.
++ get({blob}, {idx} [, {default}])
++ Get byte {idx} from |Blob| {blob}. When this byte is not
++ available return {default}. Return -1 when {default} is
++ omitted.
+ get({dict}, {key} [, {default}])
+ Get item with key {key} from |Dictionary| {dict}. When this
+ item is not available return {default}. Return zero when
+*** ../vim-8.1.0756/src/version.c 2019-01-15 22:44:14.459222955 +0100
+--- src/version.c 2019-01-15 22:49:42.200905658 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 757,
+ /**/
+
+--
+From the classified section of a city newspaper:
+Dog for sale: eats anything and is fond of children.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0758 b/data/vim/patches/8.1.0758
new file mode 100644
index 000000000..30c0b97d4
--- /dev/null
+++ b/data/vim/patches/8.1.0758
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0758
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0758
+Problem: Font number is always one instead of the actual.
+Solution: Use "%d" instead of "1". (Ken Takata)
+Files: src/gui_x11.c
+
+
+*** ../vim-8.1.0757/src/gui_x11.c 2019-01-15 20:19:36.747904404 +0100
+--- src/gui_x11.c 2019-01-16 22:10:21.175336130 +0100
+***************
+*** 2209,2215 ****
+ {
+ semsg(_("E253: Fontset name: %s"), base_name);
+ semsg(_("Font0: %s"), font_name[min_font_idx]);
+! semsg(_("Font1: %s"), font_name[i]);
+ semsg(_("Font%d width is not twice that of font0"), i);
+ semsg(_("Font0 width: %d"),
+ (int)xfs[min_font_idx]->max_bounds.width);
+--- 2209,2215 ----
+ {
+ semsg(_("E253: Fontset name: %s"), base_name);
+ semsg(_("Font0: %s"), font_name[min_font_idx]);
+! semsg(_("Font%d: %s"), i, font_name[i]);
+ semsg(_("Font%d width is not twice that of font0"), i);
+ semsg(_("Font0 width: %d"),
+ (int)xfs[min_font_idx]->max_bounds.width);
+*** ../vim-8.1.0757/src/version.c 2019-01-15 22:51:35.820099991 +0100
+--- src/version.c 2019-01-16 22:14:07.957473383 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 758,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+226. You sit down at the computer right after dinner and your spouse
+ says "See you in the morning."
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0759 b/data/vim/patches/8.1.0759
new file mode 100644
index 000000000..17b9c2d7c
--- /dev/null
+++ b/data/vim/patches/8.1.0759
@@ -0,0 +1,572 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.07
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0759
+Problem: Showing two characters for tab is limited.
+Solution: Allow for a third character for "tab:" in 'listchars'. (Nathaniel
+ Braun, Ken Takata, closes #3810)
+Files: runtime/doc/options.txt, src/globals.h, src/message.c,
+ src/option.c, src/screen.c, src/testdir/test_listchars.vim
+
+
+*** ../vim-8.1.0758/runtime/doc/options.txt 2019-01-08 22:02:36.040297337 +0100
+--- runtime/doc/options.txt 2019-01-16 22:32:15.368530721 +0100
+***************
+*** 5025,5035 ****
+ omitted, there is no extra character at the end of the
+ line.
+ *lcs-tab*
+! tab:xy Two characters to be used to show a tab. The first
+! char is used once. The second char is repeated to
+! fill the space that the tab normally occupies.
+! "tab:>-" will show a tab that takes four spaces as
+! ">---". When omitted, a tab is show as ^I.
+ *lcs-space*
+ space:c Character to show for a space. When omitted, spaces
+ are left blank.
+--- 5066,5091 ----
+ omitted, there is no extra character at the end of the
+ line.
+ *lcs-tab*
+! tab:xy[z] Two or three characters to be used to show a tab.
+! The third character is optional.
+!
+! tab:xy The 'x' is always used, then 'y' as many times as will
+! fit. Thus "tab:>-" displays:
+! >
+! >-
+! >--
+! etc.
+!
+! tab:xyz The 'z' is always used, then 'x' is prepended, and
+! then 'y' is used as many times as will fit. Thus
+! "tab:<->" displays:
+! >
+! <>
+! <->
+! <-->
+! etc.
+!
+! When "tab:" is omitted, a tab is shown as ^I.
+ *lcs-space*
+ space:c Character to show for a space. When omitted, spaces
+ are left blank.
+*** ../vim-8.1.0758/src/globals.h 2019-01-13 23:38:33.391773303 +0100
+--- src/globals.h 2019-01-16 22:25:51.783632939 +0100
+***************
+*** 1163,1168 ****
+--- 1163,1169 ----
+ EXTERN int lcs_space INIT(= NUL);
+ EXTERN int lcs_tab1 INIT(= NUL);
+ EXTERN int lcs_tab2 INIT(= NUL);
++ EXTERN int lcs_tab3 INIT(= NUL);
+ EXTERN int lcs_trail INIT(= NUL);
+ #ifdef FEAT_CONCEAL
+ EXTERN int lcs_conceal INIT(= ' ');
+*** ../vim-8.1.0758/src/message.c 2019-01-13 23:38:33.399773248 +0100
+--- src/message.c 2019-01-16 22:25:51.783632939 +0100
+***************
+*** 1771,1776 ****
+--- 1771,1777 ----
+ int col = 0;
+ int n_extra = 0;
+ int c_extra = 0;
++ int c_final = 0;
+ char_u *p_extra = NULL; /* init to make SASC shut up */
+ int n;
+ int attr = 0;
+***************
+*** 1801,1807 ****
+ if (n_extra > 0)
+ {
+ --n_extra;
+! if (c_extra)
+ c = c_extra;
+ else
+ c = *p_extra++;
+--- 1802,1810 ----
+ if (n_extra > 0)
+ {
+ --n_extra;
+! if (n_extra == 0 && c_final)
+! c = c_final;
+! else if (c_extra)
+ c = c_extra;
+ else
+ c = *p_extra++;
+***************
+*** 1844,1854 ****
+ {
+ c = ' ';
+ c_extra = ' ';
+ }
+ else
+ {
+! c = lcs_tab1;
+ c_extra = lcs_tab2;
+ attr = HL_ATTR(HLF_8);
+ }
+ }
+--- 1847,1859 ----
+ {
+ c = ' ';
+ c_extra = ' ';
++ c_final = NUL;
+ }
+ else
+ {
+! c = (n_extra == 0 && lcs_tab3) ? lcs_tab3 : lcs_tab1;
+ c_extra = lcs_tab2;
++ c_final = lcs_tab3;
+ attr = HL_ATTR(HLF_8);
+ }
+ }
+***************
+*** 1861,1866 ****
+--- 1866,1872 ----
+ {
+ p_extra = (char_u *)"";
+ c_extra = NUL;
++ c_final = NUL;
+ n_extra = 1;
+ c = lcs_eol;
+ attr = HL_ATTR(HLF_AT);
+***************
+*** 1871,1876 ****
+--- 1877,1883 ----
+ n_extra = n - 1;
+ p_extra = transchar_byte(c);
+ c_extra = NUL;
++ c_final = NUL;
+ c = *p_extra++;
+ /* Use special coloring to be able to distinguish <hex> from
+ * the same in plain text. */
+*** ../vim-8.1.0758/src/option.c 2019-01-15 21:12:53.602254042 +0100
+--- src/option.c 2019-01-16 22:25:51.783632939 +0100
+***************
+*** 7949,7955 ****
+ {
+ int round, i, len, entries;
+ char_u *p, *s;
+! int c1, c2 = 0;
+ struct charstab
+ {
+ int *cp;
+--- 7949,7955 ----
+ {
+ int round, i, len, entries;
+ char_u *p, *s;
+! int c1 = 0, c2 = 0, c3 = 0;
+ struct charstab
+ {
+ int *cp;
+***************
+*** 8001,8008 ****
+--- 8001,8012 ----
+ for (i = 0; i < entries; ++i)
+ if (tab[i].cp != NULL)
+ *(tab[i].cp) = (varp == &p_lcs ? NUL : ' ');
++
+ if (varp == &p_lcs)
++ {
+ lcs_tab1 = NUL;
++ lcs_tab3 = NUL;
++ }
+ else
+ fill_diff = '-';
+ }
+***************
+*** 8016,8021 ****
+--- 8020,8026 ----
+ && p[len] == ':'
+ && p[len + 1] != NUL)
+ {
++ c1 = c2 = c3 = 0;
+ s = p + len + 1;
+ #ifdef FEAT_MBYTE
+ c1 = mb_ptr2char_adv(&s);
+***************
+*** 8035,8041 ****
+--- 8040,8057 ----
+ #else
+ c2 = *s++;
+ #endif
++ if (!(*s == ',' || *s == NUL))
++ {
++ #ifdef FEAT_MBYTE
++ c3 = mb_ptr2char_adv(&s);
++ if (mb_char2cells(c3) > 1)
++ continue;
++ #else
++ c3 = *s++;
++ #endif
++ }
+ }
++
+ if (*s == ',' || *s == NUL)
+ {
+ if (round)
+***************
+*** 8044,8049 ****
+--- 8060,8066 ----
+ {
+ lcs_tab1 = c1;
+ lcs_tab2 = c2;
++ lcs_tab3 = c3;
+ }
+ else if (tab[i].cp != NULL)
+ *(tab[i].cp) = c1;
+*** ../vim-8.1.0758/src/screen.c 2019-01-11 20:34:18.300314693 +0100
+--- src/screen.c 2019-01-16 22:25:51.787632909 +0100
+***************
+*** 3049,3054 ****
+--- 3049,3055 ----
+ char_u *p_extra = NULL; /* string of extra chars, plus NUL */
+ char_u *p_extra_free = NULL; /* p_extra needs to be freed */
+ int c_extra = NUL; /* extra chars, all the same */
++ int c_final = NUL; /* final char, mandatory if set */
+ int extra_attr = 0; /* attributes when n_extra != 0 */
+ static char_u *at_end_str = (char_u *)""; /* used for p_extra when
+ displaying lcs_eol at end-of-line */
+***************
+*** 3059,3064 ****
+--- 3060,3066 ----
+ int saved_n_extra = 0;
+ char_u *saved_p_extra = NULL;
+ int saved_c_extra = 0;
++ int saved_c_final = 0;
+ int saved_char_attr = 0;
+
+ int n_attr = 0; /* chars with special attr */
+***************
+*** 3814,3819 ****
+--- 3816,3822 ----
+ /* Draw the cmdline character. */
+ n_extra = 1;
+ c_extra = cmdwin_type;
++ c_final = NUL;
+ char_attr = HL_ATTR(HLF_AT);
+ }
+ }
+***************
+*** 3839,3844 ****
+--- 3842,3848 ----
+ p_extra_free[n_extra] = NUL;
+ p_extra = p_extra_free;
+ c_extra = NUL;
++ c_final = NUL;
+ char_attr = HL_ATTR(HLF_FC);
+ }
+ }
+***************
+*** 3860,3865 ****
+--- 3864,3870 ----
+
+ /* Draw two cells with the sign value or blank. */
+ c_extra = ' ';
++ c_final = NUL;
+ char_attr = HL_ATTR(HLF_SC);
+ n_extra = 2;
+
+***************
+*** 3878,3886 ****
+--- 3883,3895 ----
+ {
+ /* Use the image in this position. */
+ c_extra = SIGN_BYTE;
++ c_final = NUL;
+ # ifdef FEAT_NETBEANS_INTG
+ if (buf_signcount(wp->w_buffer, lnum) > 1)
++ {
+ c_extra = MULTISIGN_BYTE;
++ c_final = NUL;
++ }
+ # endif
+ char_attr = icon_sign;
+ }
+***************
+*** 3892,3897 ****
+--- 3901,3907 ----
+ if (p_extra != NULL)
+ {
+ c_extra = NUL;
++ c_final = NUL;
+ n_extra = (int)STRLEN(p_extra);
+ }
+ char_attr = sign_get_attr(text_sign, FALSE);
+***************
+*** 3949,3957 ****
+--- 3959,3971 ----
+ #endif
+ p_extra = extra;
+ c_extra = NUL;
++ c_final = NUL;
+ }
+ else
++ {
+ c_extra = ' ';
++ c_final = NUL;
++ }
+ n_extra = number_width(wp) + 1;
+ char_attr = HL_ATTR(HLF_N);
+ #ifdef FEAT_SYN_HL
+***************
+*** 4020,4028 ****
+--- 4034,4048 ----
+ {
+ /* Draw "deleted" diff line(s). */
+ if (char2cells(fill_diff) > 1)
++ {
+ c_extra = '-';
++ c_final = NUL;
++ }
+ else
++ {
+ c_extra = fill_diff;
++ c_final = NUL;
++ }
+ # ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+ n_extra = col + 1;
+***************
+*** 4038,4043 ****
+--- 4058,4064 ----
+ /* Draw 'showbreak' at the start of each broken line. */
+ p_extra = p_sbr;
+ c_extra = NUL;
++ c_final = NUL;
+ n_extra = (int)STRLEN(p_sbr);
+ char_attr = HL_ATTR(HLF_AT);
+ need_showbreak = FALSE;
+***************
+*** 4065,4070 ****
+--- 4086,4092 ----
+ /* Continue item from end of wrapped line. */
+ n_extra = saved_n_extra;
+ c_extra = saved_c_extra;
++ c_final = saved_c_final;
+ p_extra = saved_p_extra;
+ char_attr = saved_char_attr;
+ }
+***************
+*** 4364,4378 ****
+ * The "p_extra" points to the extra stuff that is inserted to
+ * represent special characters (non-printable stuff) and other
+ * things. When all characters are the same, c_extra is used.
+ * "p_extra" must end in a NUL to avoid mb_ptr2len() reads past
+ * "p_extra[n_extra]".
+ * For the '$' of the 'list' option, n_extra == 1, p_extra == "".
+ */
+ if (n_extra > 0)
+ {
+! if (c_extra != NUL)
+ {
+! c = c_extra;
+ #ifdef FEAT_MBYTE
+ mb_c = c; /* doesn't handle non-utf-8 multi-byte! */
+ if (enc_utf8 && utf_char2len(c) > 1)
+--- 4386,4401 ----
+ * The "p_extra" points to the extra stuff that is inserted to
+ * represent special characters (non-printable stuff) and other
+ * things. When all characters are the same, c_extra is used.
++ * If c_final is set, it will compulsorily be used at the end.
+ * "p_extra" must end in a NUL to avoid mb_ptr2len() reads past
+ * "p_extra[n_extra]".
+ * For the '$' of the 'list' option, n_extra == 1, p_extra == "".
+ */
+ if (n_extra > 0)
+ {
+! if (c_extra != NUL || (n_extra == 1 && c_final != NUL))
+ {
+! c = (n_extra == 1 && c_final != NUL) ? c_final : c_extra;
+ #ifdef FEAT_MBYTE
+ mb_c = c; /* doesn't handle non-utf-8 multi-byte! */
+ if (enc_utf8 && utf_char2len(c) > 1)
+***************
+*** 4537,4542 ****
+--- 4560,4566 ----
+ mb_utf8 = (c >= 0x80);
+ n_extra = (int)STRLEN(p_extra);
+ c_extra = NUL;
++ c_final = NUL;
+ if (area_attr == 0 && search_attr == 0)
+ {
+ n_attr = n_extra + 1;
+***************
+*** 4605,4610 ****
+--- 4629,4635 ----
+ p_extra = extra;
+ n_extra = (int)STRLEN(extra) - 1;
+ c_extra = NUL;
++ c_final = NUL;
+ c = *p_extra++;
+ if (area_attr == 0 && search_attr == 0)
+ {
+***************
+*** 4645,4650 ****
+--- 4670,4676 ----
+ {
+ n_extra = 1;
+ c_extra = MB_FILLER_CHAR;
++ c_final = NUL;
+ c = ' ';
+ if (area_attr == 0 && search_attr == 0)
+ {
+***************
+*** 4856,4861 ****
+--- 4882,4888 ----
+ # else
+ c_extra = ' ';
+ # endif
++ c_final = NUL;
+ if (VIM_ISWHITE(c))
+ {
+ #ifdef FEAT_CONCEAL
+***************
+*** 5040,5052 ****
+ #endif
+ if (wp->w_p_list)
+ {
+! c = lcs_tab1;
+ #ifdef FEAT_LINEBREAK
+ if (wp->w_p_lbr)
+ c_extra = NUL; /* using p_extra from above */
+ else
+ #endif
+ c_extra = lcs_tab2;
+ n_attr = tab_len + 1;
+ extra_attr = HL_ATTR(HLF_8);
+ saved_attr2 = char_attr; /* save current attr */
+--- 5067,5080 ----
+ #endif
+ if (wp->w_p_list)
+ {
+! c = (n_extra == 0 && lcs_tab3) ? lcs_tab3 : lcs_tab1;
+ #ifdef FEAT_LINEBREAK
+ if (wp->w_p_lbr)
+ c_extra = NUL; /* using p_extra from above */
+ else
+ #endif
+ c_extra = lcs_tab2;
++ c_final = lcs_tab3;
+ n_attr = tab_len + 1;
+ extra_attr = HL_ATTR(HLF_8);
+ saved_attr2 = char_attr; /* save current attr */
+***************
+*** 5062,5067 ****
+--- 5090,5096 ----
+ }
+ else
+ {
++ c_final = NUL;
+ c_extra = ' ';
+ c = ' ';
+ }
+***************
+*** 5111,5116 ****
+--- 5140,5146 ----
+ p_extra = at_end_str;
+ n_extra = 1;
+ c_extra = NUL;
++ c_final = NUL;
+ }
+ }
+ if (wp->w_p_list && lcs_eol > 0)
+***************
+*** 5146,5151 ****
+--- 5176,5182 ----
+ rl_mirror(p_extra); /* reverse "<12>" */
+ #endif
+ c_extra = NUL;
++ c_final = NUL;
+ #ifdef FEAT_LINEBREAK
+ if (wp->w_p_lbr)
+ {
+***************
+*** 5407,5412 ****
+--- 5438,5444 ----
+ /* Double-width character being overwritten by the "precedes"
+ * character, need to fill up half the character. */
+ c_extra = MB_FILLER_CHAR;
++ c_final = NUL;
+ n_extra = 1;
+ n_attr = 2;
+ extra_attr = HL_ATTR(HLF_AT);
+***************
+*** 6064,6069 ****
+--- 6096,6102 ----
+ saved_n_extra = n_extra;
+ saved_p_extra = p_extra;
+ saved_c_extra = c_extra;
++ saved_c_final = c_final;
+ saved_char_attr = char_attr;
+ n_extra = 0;
+ lcs_prec_todo = lcs_prec;
+*** ../vim-8.1.0758/src/testdir/test_listchars.vim 2017-11-16 21:41:26.000000000 +0100
+--- src/testdir/test_listchars.vim 2019-01-16 22:25:51.787632909 +0100
+***************
+*** 42,47 ****
+--- 42,79 ----
+ call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$')))
+ endfor
+
++ " tab with 3rd character.
++ set listchars-=tab:>-
++ set listchars+=tab:<=>,trail:-
++ let expected = [
++ \ '<======>aa<====>$',
++ \ '..bb<==>--$',
++ \ '...cccc>-$',
++ \ 'dd........ee--<>$',
++ \ '-$'
++ \ ]
++ redraw!
++ for i in range(1, 5)
++ call cursor(i, 1)
++ call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$')))
++ endfor
++
++ set listchars-=trail:-
++ let expected = [
++ \ '<======>aa<====>$',
++ \ '..bb<==>..$',
++ \ '...cccc>.$',
++ \ 'dd........ee..<>$',
++ \ '.$'
++ \ ]
++ redraw!
++ for i in range(1, 5)
++ call cursor(i, 1)
++ call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$')))
++ endfor
++
++ set listchars-=tab:<=>
++ set listchars+=tab:>-
+ set listchars+=trail:<
+ set nolist
+ normal ggdG
+*** ../vim-8.1.0758/src/version.c 2019-01-16 22:15:07.872962363 +0100
+--- src/version.c 2019-01-16 22:26:24.651365857 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 759,
+ /**/
+
+--
+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.0760 b/data/vim/patches/8.1.0760
new file mode 100644
index 000000000..bce621bd2
--- /dev/null
+++ b/data/vim/patches/8.1.0760
@@ -0,0 +1,295 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0760
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0760
+Problem: No proper test for using 'termencoding'.
+Solution: Add a screendump test. Fix using double width characters in a
+ screendump.
+Files: src/terminal.c, src/testdir/test_termencoding.vim,
+ src/testdir/Make_all.mak,
+ src/testdir/dumps/Test_tenc_euc_jp_01.dump
+
+
+*** ../vim-8.1.0759/src/terminal.c 2019-01-13 23:38:33.415773131 +0100
+--- src/terminal.c 2019-01-17 12:40:16.242975080 +0100
+***************
+*** 4031,4037 ****
+ if (cell.width == 2)
+ {
+ fputs("*", fd);
+- ++pos.col;
+ }
+ else
+ fputs("+", fd);
+--- 4031,4036 ----
+***************
+*** 4062,4067 ****
+--- 4061,4069 ----
+
+ prev_cell = cell;
+ }
++
++ if (cell.width == 2)
++ ++pos.col;
+ }
+ if (repeat > 0)
+ fprintf(fd, "@%d", repeat);
+***************
+*** 4103,4108 ****
+--- 4105,4111 ----
+ char_u *prev_char = NULL;
+ int attr = 0;
+ cellattr_T cell;
++ cellattr_T empty_cell;
+ term_T *term = curbuf->b_term;
+ int max_cells = 0;
+ int start_row = term->tl_scrollback.ga_len;
+***************
+*** 4110,4115 ****
+--- 4113,4119 ----
+ ga_init2(&ga_text, 1, 90);
+ ga_init2(&ga_cell, sizeof(cellattr_T), 90);
+ vim_memset(&cell, 0, sizeof(cell));
++ vim_memset(&empty_cell, 0, sizeof(empty_cell));
+ cursor_pos->row = -1;
+ cursor_pos->col = -1;
+
+***************
+*** 4208,4273 ****
+ c = fgetc(fd);
+ }
+ hl2vtermAttr(attr, &cell);
+- }
+- else
+- dump_is_corrupt(&ga_text);
+
+! /* is_bg == 0: fg, is_bg == 1: bg */
+! for (is_bg = 0; is_bg <= 1; ++is_bg)
+! {
+! if (c == '&')
+! {
+! /* use same color as previous cell */
+! c = fgetc(fd);
+! }
+! else if (c == '#')
+ {
+! int red, green, blue, index = 0;
+!
+! c = fgetc(fd);
+! red = hex2nr(c);
+! c = fgetc(fd);
+! red = (red << 4) + hex2nr(c);
+! c = fgetc(fd);
+! green = hex2nr(c);
+! c = fgetc(fd);
+! green = (green << 4) + hex2nr(c);
+! c = fgetc(fd);
+! blue = hex2nr(c);
+! c = fgetc(fd);
+! blue = (blue << 4) + hex2nr(c);
+! c = fgetc(fd);
+! if (!isdigit(c))
+! dump_is_corrupt(&ga_text);
+! while (isdigit(c))
+ {
+! index = index * 10 + (c - '0');
+ c = fgetc(fd);
+ }
+!
+! if (is_bg)
+ {
+! cell.bg.red = red;
+! cell.bg.green = green;
+! cell.bg.blue = blue;
+! cell.bg.ansi_index = index;
+ }
+ else
+! {
+! cell.fg.red = red;
+! cell.fg.green = green;
+! cell.fg.blue = blue;
+! cell.fg.ansi_index = index;
+! }
+ }
+- else
+- dump_is_corrupt(&ga_text);
+ }
+ }
+ else
+ dump_is_corrupt(&ga_text);
+
+ append_cell(&ga_cell, &cell);
+ }
+ else if (c == '@')
+ {
+--- 4212,4279 ----
+ c = fgetc(fd);
+ }
+ hl2vtermAttr(attr, &cell);
+
+! /* is_bg == 0: fg, is_bg == 1: bg */
+! for (is_bg = 0; is_bg <= 1; ++is_bg)
+ {
+! if (c == '&')
+ {
+! /* use same color as previous cell */
+ c = fgetc(fd);
+ }
+! else if (c == '#')
+ {
+! int red, green, blue, index = 0;
+!
+! c = fgetc(fd);
+! red = hex2nr(c);
+! c = fgetc(fd);
+! red = (red << 4) + hex2nr(c);
+! c = fgetc(fd);
+! green = hex2nr(c);
+! c = fgetc(fd);
+! green = (green << 4) + hex2nr(c);
+! c = fgetc(fd);
+! blue = hex2nr(c);
+! c = fgetc(fd);
+! blue = (blue << 4) + hex2nr(c);
+! c = fgetc(fd);
+! if (!isdigit(c))
+! dump_is_corrupt(&ga_text);
+! while (isdigit(c))
+! {
+! index = index * 10 + (c - '0');
+! c = fgetc(fd);
+! }
+!
+! if (is_bg)
+! {
+! cell.bg.red = red;
+! cell.bg.green = green;
+! cell.bg.blue = blue;
+! cell.bg.ansi_index = index;
+! }
+! else
+! {
+! cell.fg.red = red;
+! cell.fg.green = green;
+! cell.fg.blue = blue;
+! cell.fg.ansi_index = index;
+! }
+ }
+ else
+! dump_is_corrupt(&ga_text);
+ }
+ }
++ else
++ dump_is_corrupt(&ga_text);
+ }
+ else
+ dump_is_corrupt(&ga_text);
+
+ append_cell(&ga_cell, &cell);
++ if (cell.width == 2)
++ append_cell(&ga_cell, &empty_cell);
+ }
+ else if (c == '@')
+ {
+*** ../vim-8.1.0759/src/testdir/test_termencoding.vim 2019-01-17 13:01:52.930244770 +0100
+--- src/testdir/test_termencoding.vim 2019-01-17 12:51:57.314381030 +0100
+***************
+*** 0 ****
+--- 1,37 ----
++ " Test for setting 'encoding' to something else than the terminal uses, then
++ " setting 'termencoding' to make it work.
++
++ " This only works with "iconv".
++ if !has('multi_byte') || !has('iconv')
++ finish
++ endif
++
++ source screendump.vim
++ if !CanRunVimInTerminal()
++ finish
++ endif
++
++ " This Vim is running with 'encoding' "utf-8", the Vim in the terminal is
++ " running with 'encoding' "euc-jp". We need to make sure the text is in the
++ " right encoding, this is a bit tricky.
++ func Test_termencoding_euc_jp()
++ new
++ call setline(1, 'E89: バッファ %ld の変更は保存されていません (! で変更を破棄)')
++ write ++enc=euc-jp Xeuc_jp.txt
++ quit
++
++ call writefile([
++ \ 'set encoding=euc-jp',
++ \ 'set termencoding=utf-8',
++ \ 'scriptencoding utf-8',
++ \ 'exe "normal aE83: バッファを作成できないので、他のを使用します...\<Esc>"',
++ \ 'split Xeuc_jp.txt',
++ \ ], 'XTest_tenc_euc_jp')
++ let buf = RunVimInTerminal('-S XTest_tenc_euc_jp', {'rows': 10})
++ call VerifyScreenDump(buf, 'Test_tenc_euc_jp_01', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('Xeuc_jp.txt')
++ call delete('XTest_tenc_euc_jp')
++ endfunc
+*** ../vim-8.1.0759/src/testdir/Make_all.mak 2019-01-12 22:47:01.264088074 +0100
+--- src/testdir/Make_all.mak 2019-01-17 11:26:20.836888223 +0100
+***************
+*** 243,248 ****
+--- 243,249 ----
+ test_tagjump \
+ test_taglist \
+ test_tcl \
++ test_termencoding \
+ test_terminal \
+ test_terminal_fail \
+ test_textformat \
+***************
+*** 389,394 ****
+--- 390,396 ----
+ test_system.res \
+ test_tab.res \
+ test_tcl.res \
++ test_termencoding.res \
+ test_terminal.res \
+ test_terminal_fail.res \
+ test_textformat.res \
+*** ../vim-8.1.0759/src/testdir/dumps/Test_tenc_euc_jp_01.dump 2019-01-17 13:01:52.934244738 +0100
+--- src/testdir/dumps/Test_tenc_euc_jp_01.dump 2019-01-17 12:52:08.898303149 +0100
+***************
+*** 0 ****
+--- 1,10 ----
++ >E+0&#ffffff0|8|9|:| |バ*&|ッ|フ|ァ| +&|%|l|d| |の*&|変|更|は|保|存|さ|れ|て|い|ま|せ|ん| +&|(|!| |で*&|変|更|を|破|棄|)+&| @13
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |X+3#0000000&|e|u|c|_|j|p|.|t|x|t| @45|1|,|1| @11|A|l@1
++ |E+0&&|8|3|:| |バ*&|ッ|フ|ァ|を|作|成|で|き|な|い|の|で|、|他|の|を|使|用|し|ま|す|.+&@2| @22
++ |~+0#4040ff13&| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|5|2| @10|A|l@1
++ | +0&&@74
+*** ../vim-8.1.0759/src/version.c 2019-01-16 22:41:50.095917784 +0100
+--- src/version.c 2019-01-17 13:02:00.746184292 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 760,
+ /**/
+
+--
+A computer without Windows is like a fish without a bicycle.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0761 b/data/vim/patches/8.1.0761
new file mode 100644
index 000000000..b06826502
--- /dev/null
+++ b/data/vim/patches/8.1.0761
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0761
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0761
+Problem: Default value for brief_wait is wrong.
+Solution: Make the default FALSE. (Ozaki Kiichi, closes #3812, closes #3799)
+Files: src/ui.c
+
+
+*** ../vim-8.1.0760/src/ui.c 2019-01-13 23:38:33.415773131 +0100
+--- src/ui.c 2019-01-17 14:09:40.775501667 +0100
+***************
+*** 222,228 ****
+ long remaining = wtime;
+ int tb_change_cnt = typebuf.tb_change_cnt;
+ # ifdef FEAT_JOB_CHANNEL
+! int brief_wait = TRUE;
+ # endif
+
+ // When waiting very briefly don't trigger timers.
+--- 222,228 ----
+ long remaining = wtime;
+ int tb_change_cnt = typebuf.tb_change_cnt;
+ # ifdef FEAT_JOB_CHANNEL
+! int brief_wait = FALSE;
+ # endif
+
+ // When waiting very briefly don't trigger timers.
+*** ../vim-8.1.0760/src/version.c 2019-01-17 13:04:05.765227482 +0100
+--- src/version.c 2019-01-17 14:10:34.159147233 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 761,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+232. You start conversations with, "Have you gotten an ISDN line?"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0762 b/data/vim/patches/8.1.0762
new file mode 100644
index 000000000..b8999e4ee
--- /dev/null
+++ b/data/vim/patches/8.1.0762
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0762
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0762
+Problem: Compiler warning.
+Solution: Add type cast. (Mike Williams)
+Files: src/channel.c
+
+
+*** ../vim-8.1.0761/src/channel.c 2019-01-13 23:38:33.379773390 +0100
+--- src/channel.c 2019-01-17 14:24:07.177737751 +0100
+***************
+*** 4064,4070 ****
+ else
+ {
+ text = tv_get_string_buf(&argvars[1], buf);
+! len = STRLEN(text);
+ }
+ channel = send_common(argvars, text, len, 0, eval, &opt,
+ eval ? "ch_evalraw" : "ch_sendraw", &part_read);
+--- 4064,4070 ----
+ else
+ {
+ text = tv_get_string_buf(&argvars[1], buf);
+! len = (int)STRLEN(text);
+ }
+ channel = send_common(argvars, text, len, 0, eval, &opt,
+ eval ? "ch_evalraw" : "ch_sendraw", &part_read);
+*** ../vim-8.1.0761/src/version.c 2019-01-17 14:11:56.438600674 +0100
+--- src/version.c 2019-01-17 14:30:04.107359645 +0100
+***************
+*** 797,798 ****
+--- 797,800 ----
+ { /* Add new patch number below this line */
++ /**/
++ 762,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+235. You start naming your kids Pascal, COBOL, Algol and Fortran.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0763 b/data/vim/patches/8.1.0763
new file mode 100644
index 000000000..8c4c6109f
--- /dev/null
+++ b/data/vim/patches/8.1.0763
@@ -0,0 +1,5153 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0763
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0763
+Problem: Nobody is using the Sun Workshop support.
+Solution: Remove the Workshop support.
+Files: runtime/doc/workshop.txt, runtime/doc/help.txt,
+ runtime/doc/netbeans.txt, src/Makefile, src/auto/configure,
+ src/beval.c, src/buffer.c, src/config.h.in, src/config.mk.in,
+ src/configure.ac, src/evalfunc.c, src/ex_cmds.c, src/ex_cmds.h,
+ src/ex_docmd.c, src/feature.h, src/fileio.c, src/globals.h,
+ src/gui.c, src/gui_beval.c, src/gui_motif.c, src/gui_x11.c,
+ src/integration.c, src/integration.h, src/main.c, src/misc2.c,
+ src/nbdebug.c, src/netbeans.c, src/proto.h,
+ src/proto/workshop.pro, src/ui.c, src/version.c, src/vim.h,
+ src/workshop.c, src/workshop.h, src/wsdebug.c, src/wsdebug.h,
+ src/ex_cmdidxs.h
+
+
+*** ../vim-8.1.0762/runtime/doc/workshop.txt 2018-05-17 13:42:04.000000000 +0200
+--- runtime/doc/workshop.txt 2019-01-17 14:47:16.643795105 +0100
+***************
+*** 1,4 ****
+! *workshop.txt* For Vim version 8.1. Last change: 2013 Jul 06
+
+
+ VIM REFERENCE MANUAL by Gordon Prieur
+--- 1,4 ----
+! *workshop.txt* For Vim version 8.1. Last change: 2019 Jan 17
+
+
+ VIM REFERENCE MANUAL by Gordon Prieur
+***************
+*** 6,98 ****
+
+ Sun Visual WorkShop Features *workshop* *workshop-support*
+
+! 1. Introduction |workshop-intro|
+! 2. Commands |workshop-commands|
+! 3. Compiling vim/gvim for WorkShop |workshop-compiling|
+! 4. Configuring gvim for a WorkShop release tree |workshop-configure|
+! 5. Obtaining the latest version of the XPM library |workshop-xpm|
+!
+! {Vi does not have any of these features}
+! {only available when compiled with the |+sun_workshop| feature}
+!
+! ==============================================================================
+! 1. Introduction *workshop-intro*
+!
+! Sun Visual WorkShop has an "Editor of Choice" feature designed to let users
+! debug using their favorite editors. For the 6.0 release we have added support
+! for gvim. A workshop debug session will have a debugging window and an editor
+! window (possibly others as well). The user can do many debugging operations
+! from the editor window, minimizing the need to switch from window to window.
+!
+! The version of vim shipped with Sun Visual WorkShop 6 (also called Forte
+! Developer 6) is vim 5.3. The features in this release are much more reliable
+! than the vim/gvim shipped with Visual WorkShop. VWS users wishing to use vim
+! as their editor should compile these sources and install them in their
+! workshop release tree.
+!
+! ==============================================================================
+! 2. Commands *workshop-commands*
+!
+! *:ws* *:wsverb*
+! :ws[verb] verb Pass the verb to the verb executor
+!
+! Pass the verb to a workshop function which gathers some arguments and
+! sends the verb and data to workshop over an IPC connection.
+!
+! ==============================================================================
+! 3. Compiling vim/gvim for WorkShop *workshop-compiling*
+!
+! Compiling vim with FEAT_SUN_WORKSHOP turns on all compile time flags necessary
+! for building a vim to work with Visual WorkShop. The features required for VWS
+! have been built and tested using the Sun compilers from the VWS release. They
+! have not been built or tested using Gnu compilers. This does not mean the
+! features won't build and run if compiled with gcc, just that nothing is
+! guaranteed with gcc!
+!
+! ==============================================================================
+! 4. Configuring gvim for a WorkShop release tree *workshop-configure*
+!
+! There are several assumptions which must be met in order to compile a gvim for
+! use with Sun Visual WorkShop 6.
+!
+! o You should use the compiler in VWS rather than gcc. We have neither
+! built nor tested with gcc and cannot guarantee it will build properly.
+!
+! o You must supply your own XPM library. See |workshop-xpm| below for
+! details on obtaining the latest version of XPM.
+!
+! o Edit the Makefile in the src directory and uncomment the lines for Sun
+! Visual WorkShop. You can easily find these by searching for the string
+! FEAT_SUN_WORKSHOP
+!
+! o We also suggest you use Motif for your gui. This will provide gvim with
+! the same look-and-feel as the rest of Sun Visual WorkShop.
+!
+! The following configuration line can be used to configure vim to build for use
+! with Sun Visual WorkShop:
+!
+! $ CC=cc configure --enable-workshop --enable-gui=motif \
+! -prefix=<VWS-install-dir>/contrib/contrib6/<vim-version>
+!
+! The VWS-install-dir should be the base directory where your Sun Visual WorkShop
+! was installed. By default this is /opt/SUNWspro. It will normally require
+! root permissions to install the vim release. You will also need to change the
+! symlink <VWS-install-dir>/bin/gvim to point to the vim in your newly installed
+! directory. The <vim-version> should be a unique version string. I use "vim"
+! concatenated with the equivalent of version.h's VIM_VERSION_SHORT.
+!
+! ==============================================================================
+! 5. Obtaining the latest version of the XPM library *workshop-xpm*
+!
+! The XPM library is required to show images within Vim with Motif or Athena.
+! Without it the toolbar and signs will be disabled.
+!
+! The XPM library is provided by Arnaud Le Hors of the French National Institute
+! for Research in Computer Science and Control. It can be downloaded from
+! http://cgit.freedesktop.org/xorg/lib/libXpm. The current release, as of this
+! writing, is xpm-3.4k-solaris.tgz, which is a gzip'ed tar file. If you create
+! the directory /usr/local/xpm and untar the file there you can use the
+! uncommented lines in the Makefile without changing them. If you use another
+! xpm directory you will need to change the XPM_DIR in src/Makefile.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 6,14 ----
+
+ Sun Visual WorkShop Features *workshop* *workshop-support*
+
+! The support for WorkShop was removed in patch 8.1.0763 in January 2019.
+! The product has not been available for a long time and has been replaced by
+! |NetBeans|.
+
+!
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0762/runtime/doc/help.txt 2018-05-17 13:41:40.000000000 +0200
+--- runtime/doc/help.txt 2019-01-17 14:55:00.628054659 +0100
+***************
+*** 171,177 ****
+ |if_ole.txt| OLE automation interface for Win32
+ |if_ruby.txt| Ruby interface
+ |debugger.txt| Interface with a debugger
+- |workshop.txt| Sun Visual Workshop interface
+ |netbeans.txt| NetBeans External Editor interface
+ |sign.txt| debugging signs
+
+--- 180,185 ----
+*** ../vim-8.1.0762/runtime/doc/netbeans.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/netbeans.txt 2019-01-17 14:53:47.956614503 +0100
+***************
+*** 1,10 ****
+! *netbeans.txt* For Vim version 8.1. Last change: 2016 Jul 15
+
+
+ VIM REFERENCE MANUAL by Gordon Prieur et al.
+
+
+! *netbeans* *netbeans-support*
+
+ Vim NetBeans Protocol: a socket interface for Vim integration into an IDE.
+
+--- 1,10 ----
+! *netbeans.txt* For Vim version 8.1. Last change: 2019 Jan 17
+
+
+ VIM REFERENCE MANUAL by Gordon Prieur et al.
+
+
+! *netbeans* *NetBeans* *netbeans-support*
+
+ Vim NetBeans Protocol: a socket interface for Vim integration into an IDE.
+
+***************
+*** 123,130 ****
+ by gvim when it is run with one of the following GUIs: GTK, GNOME, Windows,
+ Athena and Motif.
+
+! If Motif support is required the user must supply XPM libraries. See
+! |workshop-xpm| for details on obtaining the latest version of XPM.
+
+
+ On MS-Windows:
+--- 123,140 ----
+ by gvim when it is run with one of the following GUIs: GTK, GNOME, Windows,
+ Athena and Motif.
+
+! *netbeans-xpm*
+! If Motif support is required the user must supply XPM libraries.
+! The XPM library is required to show images within Vim with Motif or Athena.
+! Without it the toolbar and signs will be disabled.
+!
+! The XPM library is provided by Arnaud Le Hors of the French National Institute
+! for Research in Computer Science and Control. It can be downloaded from
+! http://cgit.freedesktop.org/xorg/lib/libXpm. The current release, as of this
+! writing, is xpm-3.4k-solaris.tgz, which is a gzip'ed tar file. If you create
+! the directory /usr/local/xpm and untar the file there you can use the
+! uncommented lines in the Makefile without changing them. If you use another
+! xpm directory you will need to change the XPM_DIR in src/Makefile.
+
+
+ On MS-Windows:
+***************
+*** 409,417 ****
+ Vim will define a sign for the annotation.
+ When color is a number, this is the "#rrggbb" Red, Green and
+ Blue values of the color (see |gui-colors|) and the
+! highlighting is only defined for GVim.
+ When color is a name, this color is defined both for Vim
+! running in a color terminal and for GVim.
+ When both "fg" and "bg" are "none" no line highlighting is
+ used (new in version 2.1).
+ When "glyphFile" is empty, no text sign is used (new in
+--- 419,427 ----
+ Vim will define a sign for the annotation.
+ When color is a number, this is the "#rrggbb" Red, Green and
+ Blue values of the color (see |gui-colors|) and the
+! highlighting is only defined for gVim.
+ When color is a name, this color is defined both for Vim
+! running in a color terminal and for gVim.
+ When both "fg" and "bg" are "none" no line highlighting is
+ used (new in version 2.1).
+ When "glyphFile" is empty, no text sign is used (new in
+*** ../vim-8.1.0762/src/Makefile 2019-01-12 22:47:01.256088105 +0100
+--- src/Makefile 2019-01-17 15:04:39.151775617 +0100
+***************
+*** 317,323 ****
+ # You can give a lot of options to configure.
+ # Change this to your desire and do 'make config' afterwards
+
+! # examples:
+ #CONF_ARGS1 = --exec-prefix=/usr
+ #CONF_ARGS2 = --with-vim-name=vim8 --with-ex-name=ex8 --with-view-name=view8
+ #CONF_ARGS3 = --with-global-runtime=/etc/vim,/usr/share/vim
+--- 317,323 ----
+ # You can give a lot of options to configure.
+ # Change this to your desire and do 'make config' afterwards
+
+! # examples you can uncomment:
+ #CONF_ARGS1 = --exec-prefix=/usr
+ #CONF_ARGS2 = --with-vim-name=vim8 --with-ex-name=ex8 --with-view-name=view8
+ #CONF_ARGS3 = --with-global-runtime=/etc/vim,/usr/share/vim
+***************
+*** 464,482 ****
+ # TCL
+ # Uncomment this when you want to include the Tcl interface.
+ # First one is for static linking, second one for dynamic loading.
+ #CONF_OPT_TCL = --enable-tclinterp
+ #CONF_OPT_TCL = --enable-tclinterp=dynamic
+ #CONF_OPT_TCL = --enable-tclinterp --with-tclsh=tclsh8.4
+
+ # CSCOPE
+ # Uncomment this when you want to include the Cscope interface.
+ #CONF_OPT_CSCOPE = --enable-cscope
+!
+! # WORKSHOP - Sun Visual Workshop interface. Only works with Motif!
+! #CONF_OPT_WORKSHOP = --enable-workshop
+
+ # NETBEANS - NetBeans interface. Only works with Motif, GTK, and gnome.
+! # Motif version must have XPM libraries (see |workshop-xpm|).
+ # Uncomment this when you do not want the netbeans interface.
+ #CONF_OPT_NETBEANS = --disable-netbeans
+
+--- 464,479 ----
+ # TCL
+ # Uncomment this when you want to include the Tcl interface.
+ # First one is for static linking, second one for dynamic loading.
+ #CONF_OPT_TCL = --enable-tclinterp
+ #CONF_OPT_TCL = --enable-tclinterp=dynamic
+ #CONF_OPT_TCL = --enable-tclinterp --with-tclsh=tclsh8.4
+
+ # CSCOPE
+ # Uncomment this when you want to include the Cscope interface.
+ #CONF_OPT_CSCOPE = --enable-cscope
+
+ # NETBEANS - NetBeans interface. Only works with Motif, GTK, and gnome.
+! # Motif version must have XPM libraries (see |netbeans-xpm|).
+ # Uncomment this when you do not want the netbeans interface.
+ #CONF_OPT_NETBEANS = --disable-netbeans
+
+***************
+*** 781,787 ****
+ #CC = /usr/ucb/cc
+ #EXTRA_LIBS = -R/usr/ucblib
+
+! ### Solaris with Forte Developer and FEAT_SUN_WORKSHOP
+ # The Xpm library is available from http://koala.ilog.fr/ftp/pub/xpm.
+ #CC = cc
+ #XPM_DIR = /usr/local/xpm/xpm-3.4k-solaris
+--- 780,786 ----
+ #CC = /usr/ucb/cc
+ #EXTRA_LIBS = -R/usr/ucblib
+
+! ### Solaris with Forte Developer and NetBeans.
+ # The Xpm library is available from http://koala.ilog.fr/ftp/pub/xpm.
+ #CC = cc
+ #XPM_DIR = /usr/local/xpm/xpm-3.4k-solaris
+***************
+*** 791,800 ****
+ #EXTRA_IPATHS = $(XPM_IPATH)
+ #EXTRA_DEFS = -xCC -DHAVE_X11_XPM_H
+
+- ### Solaris with workshop compilers: Vim is unstable when compiled with
+- # "-fast". Use this instead. (Shea Martin)
+- #CFLAGS = -x02 -xtarget=ultra
+-
+ ### (R) for Solaris 2.5 (or 2.5.1) with gcc > 2.5.6 you might need this:
+ #LDFLAGS = -lw -ldl -lXmu
+ #GUI_LIB_LOC = -L/usr/local/lib
+--- 790,795 ----
+***************
+*** 1651,1664 ****
+ $(PERL_SRC) \
+ $(PYTHON_SRC) $(PYTHON3_SRC) \
+ $(TCL_SRC) \
+! $(RUBY_SRC) \
+! $(WORKSHOP_SRC) \
+! $(WSDEBUG_SRC)
+
+ 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 \
+! gui_beval.c workshop.c wsdebug.c integration.c \
+! netbeans.c channel.c \
+ $(GRESOURCE_SRC)
+
+ # Unittest files
+--- 1646,1656 ----
+ $(PERL_SRC) \
+ $(PYTHON_SRC) $(PYTHON3_SRC) \
+ $(TCL_SRC) \
+! $(RUBY_SRC)
+
+ 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 \
+! gui_beval.c netbeans.c channel.c \
+ $(GRESOURCE_SRC)
+
+ # Unittest files
+***************
+*** 1684,1690 ****
+ # The perl sources also don't work well with lint.
+ LINT_SRC = $(BASIC_SRC) $(GUI_SRC) $(HANGULIN_SRC) \
+ $(PYTHON_SRC) $(PYTHON3_SRC) $(TCL_SRC) \
+- $(WORKSHOP_SRC) $(WSDEBUG_SRC) \
+ $(NETBEANS_SRC) $(CHANNEL_SRC) $(TERM_SRC)
+ #LINT_SRC = $(SRC)
+ #LINT_SRC = $(ALL_SRC)
+--- 1676,1681 ----
+***************
+*** 1761,1771 ****
+ $(TCL_OBJ) \
+ $(RUBY_OBJ) \
+ $(OS_EXTRA_OBJ) \
+- $(WORKSHOP_OBJ) \
+ $(NETBEANS_OBJ) \
+ $(CHANNEL_OBJ) \
+! $(XDIFF_OBJS) \
+! $(WSDEBUG_OBJ)
+
+ # The files included by tests are not in OBJ_COMMON.
+ OBJ_MAIN = \
+--- 1752,1760 ----
+ $(TCL_OBJ) \
+ $(RUBY_OBJ) \
+ $(OS_EXTRA_OBJ) \
+ $(NETBEANS_OBJ) \
+ $(CHANNEL_OBJ) \
+! $(XDIFF_OBJS)
+
+ # The files included by tests are not in OBJ_COMMON.
+ OBJ_MAIN = \
+***************
+*** 1889,1895 ****
+ window.pro \
+ beval.pro \
+ gui_beval.pro \
+- workshop.pro \
+ netbeans.pro \
+ channel.pro \
+ $(ALL_GUI_PRO) \
+--- 1878,1883 ----
+***************
+*** 1932,1938 ****
+ $(CONF_OPT_PERL) $(CONF_OPT_PYTHON) $(CONF_OPT_PYTHON3) \
+ $(CONF_OPT_TCL) $(CONF_OPT_RUBY) $(CONF_OPT_NLS) \
+ $(CONF_OPT_CSCOPE) $(CONF_OPT_MULTIBYTE) $(CONF_OPT_INPUT) \
+! $(CONF_OPT_OUTPUT) $(CONF_OPT_GPM) $(CONF_OPT_WORKSHOP) \
+ $(CONF_OPT_FEAT) $(CONF_TERM_LIB) \
+ $(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
+ $(CONF_OPT_CHANNEL) $(CONF_OPT_TERMINAL) \
+--- 1920,1926 ----
+ $(CONF_OPT_PERL) $(CONF_OPT_PYTHON) $(CONF_OPT_PYTHON3) \
+ $(CONF_OPT_TCL) $(CONF_OPT_RUBY) $(CONF_OPT_NLS) \
+ $(CONF_OPT_CSCOPE) $(CONF_OPT_MULTIBYTE) $(CONF_OPT_INPUT) \
+! $(CONF_OPT_OUTPUT) $(CONF_OPT_GPM) \
+ $(CONF_OPT_FEAT) $(CONF_TERM_LIB) \
+ $(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
+ $(CONF_OPT_CHANNEL) $(CONF_OPT_TERMINAL) \
+***************
+*** 3098,3106 ****
+ objects/if_tcl.o: if_tcl.c
+ $(CCC_NF) $(TCL_CFLAGS) $(ALL_CFLAGS) -o $@ if_tcl.c
+
+- objects/integration.o: integration.c
+- $(CCC) -o $@ integration.c
+-
+ objects/json.o: json.c
+ $(CCC) -o $@ json.c
+
+--- 3086,3091 ----
+***************
+*** 3239,3250 ****
+ objects/window.o: window.c
+ $(CCC) -o $@ window.c
+
+- objects/workshop.o: workshop.c
+- $(CCC) -o $@ workshop.c
+-
+- objects/wsdebug.o: wsdebug.c
+- $(CCC) -o $@ wsdebug.c
+-
+ objects/netbeans.o: netbeans.c
+ $(CCC) -o $@ netbeans.c
+
+--- 3224,3229 ----
+***************
+*** 3784,3799 ****
+ 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 \
+--- 3763,3768 ----
+*** ../vim-8.1.0762/src/auto/configure 2019-01-12 16:10:47.415360504 +0100
+--- src/auto/configure 2019-01-17 14:58:28.142489864 +0100
+***************
+*** 661,668 ****
+ CHANNEL_SRC
+ NETBEANS_OBJ
+ NETBEANS_SRC
+- WORKSHOP_OBJ
+- WORKSHOP_SRC
+ RUBY_LIBS
+ RUBY_CFLAGS
+ RUBY_PRO
+--- 661,666 ----
+***************
+*** 812,818 ****
+ enable_rubyinterp
+ with_ruby_command
+ enable_cscope
+- enable_workshop
+ enable_netbeans
+ enable_channel
+ enable_terminal
+--- 810,815 ----
+***************
+*** 1494,1500 ****
+ --enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
+ --enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
+ --enable-cscope Include cscope interface.
+- --enable-workshop Include Sun Visual Workshop support.
+ --disable-netbeans Disable NetBeans integration support.
+ --disable-channel Disable process communication support.
+ --enable-terminal Enable terminal emulation support.
+--- 1491,1496 ----
+***************
+*** 7665,7693 ****
+
+ fi
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-workshop argument" >&5
+- $as_echo_n "checking --enable-workshop argument... " >&6; }
+- # Check whether --enable-workshop was given.
+- if test "${enable_workshop+set}" = set; then :
+- enableval=$enable_workshop;
+- else
+- enable_workshop="no"
+- fi
+-
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_workshop" >&5
+- $as_echo "$enable_workshop" >&6; }
+- if test "$enable_workshop" = "yes"; then
+- $as_echo "#define FEAT_SUN_WORKSHOP 1" >>confdefs.h
+-
+- WORKSHOP_SRC="workshop.c integration.c"
+-
+- WORKSHOP_OBJ="objects/workshop.o objects/integration.o"
+-
+- if test "${enable_gui-xxx}" = xxx; then
+- enable_gui=motif
+- fi
+- fi
+-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
+ $as_echo_n "checking --disable-netbeans argument... " >&6; }
+ # Check whether --enable-netbeans was given.
+--- 7661,7666 ----
+*** ../vim-8.1.0762/src/beval.c 2018-10-02 14:15:08.991376909 +0200
+--- src/beval.c 2019-01-17 15:16:25.906741669 +0100
+***************
+*** 273,282 ****
+ if (bevalServers & BEVAL_NETBEANS)
+ netbeans_beval_cb(beval, state);
+ #endif
+- #ifdef FEAT_SUN_WORKSHOP
+- if (bevalServers & BEVAL_WORKSHOP)
+- workshop_beval_cb(beval, state);
+- #endif
+
+ recursive = FALSE;
+ }
+--- 273,278 ----
+*** ../vim-8.1.0762/src/buffer.c 2019-01-15 20:19:36.739904461 +0100
+--- src/buffer.c 2019-01-17 15:19:25.237997004 +0100
+***************
+*** 658,668 ****
+ */
+ if (wipe_buf)
+ {
+- #ifdef FEAT_SUN_WORKSHOP
+- if (usingSunWorkShop)
+- 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
+--- 658,663 ----
+*** ../vim-8.1.0762/src/config.h.in 2018-12-21 11:48:48.320680492 +0100
+--- src/config.h.in 2019-01-17 14:58:51.046319671 +0100
+***************
+*** 441,449 ****
+ /* Define if we have shl_load() */
+ #undef HAVE_SHL_LOAD
+
+- /* Define if you want to include Sun Visual Workshop support. */
+- #undef FEAT_SUN_WORKSHOP
+-
+ /* Define if you want to include NetBeans integration. */
+ #undef FEAT_NETBEANS_INTG
+
+--- 441,446 ----
+*** ../vim-8.1.0762/src/config.mk.in 2018-04-11 22:14:38.000000000 +0200
+--- src/config.mk.in 2019-01-17 14:59:00.314250926 +0100
+***************
+*** 81,89 ****
+ 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@
+--- 81,86 ----
+*** ../vim-8.1.0762/src/configure.ac 2019-01-12 16:10:47.411360533 +0100
+--- src/configure.ac 2019-01-17 14:58:24.194519245 +0100
+***************
+*** 1996,2017 ****
+ AC_DEFINE(FEAT_CSCOPE)
+ fi
+
+- AC_MSG_CHECKING(--enable-workshop argument)
+- AC_ARG_ENABLE(workshop,
+- [ --enable-workshop Include Sun Visual Workshop support.], ,
+- [enable_workshop="no"])
+- AC_MSG_RESULT($enable_workshop)
+- if test "$enable_workshop" = "yes"; then
+- AC_DEFINE(FEAT_SUN_WORKSHOP)
+- WORKSHOP_SRC="workshop.c integration.c"
+- AC_SUBST(WORKSHOP_SRC)
+- WORKSHOP_OBJ="objects/workshop.o objects/integration.o"
+- AC_SUBST(WORKSHOP_OBJ)
+- if test "${enable_gui-xxx}" = xxx; then
+- enable_gui=motif
+- fi
+- fi
+-
+ AC_MSG_CHECKING(--disable-netbeans argument)
+ AC_ARG_ENABLE(netbeans,
+ [ --disable-netbeans Disable NetBeans integration support.],
+--- 1996,2001 ----
+*** ../vim-8.1.0762/src/evalfunc.c 2019-01-15 22:16:37.414340200 +0100
+--- src/evalfunc.c 2019-01-17 14:50:04.854386619 +0100
+***************
+*** 6512,6520 ****
+ #ifdef FEAT_STL_OPT
+ "statusline",
+ #endif
+- #ifdef FEAT_SUN_WORKSHOP
+- "sun_workshop",
+- #endif
+ #ifdef FEAT_NETBEANS_INTG
+ "netbeans_intg",
+ #endif
+--- 6512,6517 ----
+*** ../vim-8.1.0762/src/ex_cmds.c 2019-01-13 23:38:33.387773334 +0100
+--- src/ex_cmds.c 2019-01-17 15:20:04.497831990 +0100
+***************
+*** 3805,3813 ****
+ int newcol = -1;
+ int solcol = -1;
+ pos_T *pos;
+- #ifdef FEAT_SUN_WORKSHOP
+- char_u *cp;
+- #endif
+ char_u *command = NULL;
+ #ifdef FEAT_SPELL
+ int did_get_winopts = FALSE;
+--- 3805,3810 ----
+***************
+*** 3881,3891 ****
+ if (free_fname != NULL)
+ ffname = free_fname;
+ other_file = otherfile(ffname);
+- #ifdef FEAT_SUN_WORKSHOP
+- if (usingSunWorkShop && p_acd
+- && (cp = vim_strrchr(sfname, '/')) != NULL)
+- sfname = ++cp;
+- #endif
+ }
+ }
+
+--- 3878,3883 ----
+***************
+*** 4457,4469 ****
+ }
+ #endif
+
+! #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
+ if (curbuf->b_ffname != NULL)
+ {
+- # ifdef FEAT_SUN_WORKSHOP
+- if (gui.in_use && usingSunWorkShop)
+- workshop_file_opened((char *)curbuf->b_ffname, curbuf->b_p_ro);
+- # endif
+ # ifdef FEAT_NETBEANS_INTG
+ if ((flags & ECMD_SET_HELP) != ECMD_SET_HELP)
+ netbeans_file_opened(curbuf);
+--- 4449,4457 ----
+ }
+ #endif
+
+! #if defined(FEAT_NETBEANS_INTG)
+ if (curbuf->b_ffname != NULL)
+ {
+ # ifdef FEAT_NETBEANS_INTG
+ if ((flags & ECMD_SET_HELP) != ECMD_SET_HELP)
+ netbeans_file_opened(curbuf);
+*** ../vim-8.1.0762/src/ex_cmds.h 2019-01-13 23:38:33.387773334 +0100
+--- src/ex_cmds.h 2019-01-17 14:56:18.839459572 +0100
+***************
+*** 1670,1678 ****
+ EX(CMD_wqall, "wqall", do_wqall,
+ BANG|FILE1|ARGOPT|DFLALL|TRLBAR,
+ ADDR_LINES),
+- EX(CMD_wsverb, "wsverb", ex_wsverb,
+- EXTRA|NOTADR|NEEDARG,
+- ADDR_LINES),
+ EX(CMD_wundo, "wundo", ex_wundo,
+ BANG|NEEDARG|FILE1,
+ ADDR_LINES),
+--- 1670,1675 ----
+*** ../vim-8.1.0762/src/ex_docmd.c 2019-01-15 20:19:36.743904434 +0100
+--- src/ex_docmd.c 2019-01-17 15:20:26.561736397 +0100
+***************
+*** 411,419 ****
+ #ifndef FEAT_SIGNS
+ # define ex_sign ex_ni
+ #endif
+- #ifndef FEAT_SUN_WORKSHOP
+- # define ex_wsverb ex_ni
+- #endif
+ #ifndef FEAT_NETBEANS_INTG
+ # define ex_nbclose ex_ni
+ # define ex_nbkey ex_ni
+--- 411,416 ----
+*** ../vim-8.1.0762/src/feature.h 2019-01-12 16:10:47.415360504 +0100
+--- src/feature.h 2019-01-17 15:11:32.124821752 +0100
+***************
+*** 1232,1238 ****
+ * +perl Perl interface: "--enable-perlinterp"
+ * +python Python interface: "--enable-pythoninterp"
+ * +tcl TCL interface: "--enable-tclinterp"
+- * +sun_workshop Sun Workshop integration
+ * +netbeans_intg Netbeans integration
+ * +channel Inter process communication
+ */
+--- 1232,1237 ----
+***************
+*** 1244,1256 ****
+ */
+
+ /*
+- * The Sun Workshop features currently only work with Motif.
+- */
+- #if !defined(FEAT_GUI_MOTIF) && defined(FEAT_SUN_WORKSHOP)
+- # undef FEAT_SUN_WORKSHOP
+- #endif
+-
+- /*
+ * The Netbeans feature requires +eval.
+ */
+ #if !defined(FEAT_EVAL) && defined(FEAT_NETBEANS_INTG)
+--- 1243,1248 ----
+***************
+*** 1279,1286 ****
+ * +signs Allow signs to be displayed to the left of text lines.
+ * Adds the ":sign" command.
+ */
+! #if defined(FEAT_BIG) || defined(FEAT_SUN_WORKSHOP) \
+! || defined(FEAT_NETBEANS_INTG)
+ # define FEAT_SIGNS
+ # if ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
+ && defined(HAVE_X11_XPM_H)) \
+--- 1271,1277 ----
+ * +signs Allow signs to be displayed to the left of text lines.
+ * Adds the ":sign" command.
+ */
+! #if defined(FEAT_BIG) || defined(FEAT_NETBEANS_INTG)
+ # define FEAT_SIGNS
+ # if ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
+ && defined(HAVE_X11_XPM_H)) \
+***************
+*** 1299,1305 ****
+ || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)) \
+ && ( ((defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)) \
+ && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)) \
+- || defined(FEAT_SUN_WORKSHOP) \
+ || defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL))
+ # define FEAT_BEVAL_GUI
+ # if !defined(FEAT_XFONTSET) && !defined(FEAT_GUI_GTK) \
+--- 1290,1295 ----
+***************
+*** 1329,1365 ****
+ # define FEAT_GUI_X11
+ #endif
+
+! #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
+! /*
+! * The following features are (currently) only used by Sun Visual WorkShop 6
+! * and NetBeans. These features could be used with other integrations with
+! * debuggers so I've used separate feature defines.
+! */
+ # if !defined(FEAT_MENU)
+ # define FEAT_MENU
+ # endif
+ #endif
+
+! #if defined(FEAT_SUN_WORKSHOP)
+! /*
+! * Use an alternative method of X input for a secondary
+! * command input.
+! */
+! # define ALT_X_INPUT
+!
+ /*
+ * +footer Motif only: Add a message area at the bottom of the
+ * main window area.
+ */
+ # define FEAT_FOOTER
+-
+ #endif
+
+ /*
+ * +autochdir 'autochdir' option.
+ */
+! #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) \
+! || defined(FEAT_BIG)
+ # define FEAT_AUTOCHDIR
+ #endif
+
+--- 1319,1343 ----
+ # define FEAT_GUI_X11
+ #endif
+
+! #if defined(FEAT_NETBEANS_INTG)
+! // NetBeans uses menus.
+ # if !defined(FEAT_MENU)
+ # define FEAT_MENU
+ # endif
+ #endif
+
+! #if 0
+ /*
+ * +footer Motif only: Add a message area at the bottom of the
+ * main window area.
+ */
+ # define FEAT_FOOTER
+ #endif
+
+ /*
+ * +autochdir 'autochdir' option.
+ */
+! #if defined(FEAT_NETBEANS_INTG) || defined(FEAT_BIG)
+ # define FEAT_AUTOCHDIR
+ #endif
+
+*** ../vim-8.1.0762/src/fileio.c 2019-01-13 23:38:33.391773303 +0100
+--- src/fileio.c 2019-01-17 15:20:35.345697789 +0100
+***************
+*** 5094,5104 ****
+ if (!p_bk && backup != NULL && mch_remove(backup) != 0)
+ emsg(_("E207: Can't delete backup file"));
+
+- #ifdef FEAT_SUN_WORKSHOP
+- if (usingSunWorkShop)
+- workshop_file_saved((char *) ffname);
+- #endif
+-
+ goto nofail;
+
+ /*
+--- 5094,5099 ----
+*** ../vim-8.1.0762/src/globals.h 2019-01-16 22:41:50.091917818 +0100
+--- src/globals.h 2019-01-17 15:26:00.420093561 +0100
+***************
+*** 1218,1227 ****
+ #if defined(FEAT_BEVAL) && !defined(NO_X11_INCLUDES)
+ EXTERN BalloonEval *balloonEval INIT(= NULL);
+ EXTERN int balloonEvalForTerm INIT(= FALSE);
+! # if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
+ EXTERN int bevalServers INIT(= 0);
+ # define BEVAL_NETBEANS 0x01
+- # define BEVAL_WORKSHOP 0x02
+ # endif
+ #endif
+
+--- 1218,1226 ----
+ #if defined(FEAT_BEVAL) && !defined(NO_X11_INCLUDES)
+ EXTERN BalloonEval *balloonEval INIT(= NULL);
+ EXTERN int balloonEvalForTerm INIT(= FALSE);
+! # if defined(FEAT_NETBEANS_INTG)
+ EXTERN int bevalServers INIT(= 0);
+ # define BEVAL_NETBEANS 0x01
+ # endif
+ #endif
+
+***************
+*** 1363,1376 ****
+ EXTERN int need_cursor_line_redraw INIT(= FALSE);
+ #endif
+
+- #ifdef ALT_X_INPUT
+- /* we need to be able to go into the dispatch loop while processing a command
+- * received via alternate input. However, we don't want to process another
+- * command until the first is completed.
+- */
+- EXTERN int suppress_alternate_input INIT(= FALSE);
+- #endif
+-
+ #ifdef USE_MCH_ERRMSG
+ /* Grow array to collect error messages in until they can be displayed. */
+ EXTERN garray_T error_ga
+--- 1362,1367 ----
+*** ../vim-8.1.0762/src/gui.c 2019-01-13 23:38:33.391773303 +0100
+--- src/gui.c 2019-01-17 15:21:11.121537479 +0100
+***************
+*** 672,681 ****
+ #ifdef FEAT_MENU
+ gui_create_initial_menus(root_menu);
+ #endif
+- #ifdef FEAT_SUN_WORKSHOP
+- if (usingSunWorkShop)
+- workshop_init();
+- #endif
+ #ifdef FEAT_SIGN_ICONS
+ sign_gui_started();
+ #endif
+--- 672,677 ----
+***************
+*** 1604,1622 ****
+ /* Remember the original window position. */
+ (void)gui_mch_get_winpos(&x, &y);
+
+! #ifdef USE_SUN_WORKSHOP
+! if (!mustset && usingSunWorkShop
+! && workshop_get_width_height(&width, &height))
+! {
+! Columns = (width - base_width + gui.char_width - 1) / gui.char_width;
+! Rows = (height - base_height + gui.char_height - 1) / gui.char_height;
+! }
+! else
+! #endif
+! {
+! width = Columns * gui.char_width + base_width;
+! height = Rows * gui.char_height + base_height;
+! }
+
+ if (fit_to_display)
+ {
+--- 1600,1607 ----
+ /* Remember the original window position. */
+ (void)gui_mch_get_winpos(&x, &y);
+
+! width = Columns * gui.char_width + base_width;
+! height = Rows * gui.char_height + base_height;
+
+ if (fit_to_display)
+ {
+***************
+*** 5128,5134 ****
+ }
+ #endif
+
+! #if defined(FIND_REPLACE_DIALOG) || defined(FEAT_SUN_WORKSHOP) \
+ || defined(NEED_GUI_UPDATE_SCREEN) \
+ || defined(PROTO)
+ /*
+--- 5113,5119 ----
+ }
+ #endif
+
+! #if defined(FIND_REPLACE_DIALOG) \
+ || defined(NEED_GUI_UPDATE_SCREEN) \
+ || defined(PROTO)
+ /*
+*** ../vim-8.1.0762/src/gui_beval.c 2019-01-13 23:38:33.391773303 +0100
+--- src/gui_beval.c 2019-01-17 15:21:35.733424452 +0100
+***************
+*** 199,206 ****
+ #endif
+ #endif /* !FEAT_GUI_W32 */
+
+! #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) \
+! || defined(FEAT_EVAL) || defined(PROTO)
+ # if !defined(FEAT_GUI_W32) || defined(PROTO)
+
+ /*
+--- 199,205 ----
+ #endif
+ #endif /* !FEAT_GUI_W32 */
+
+! #if defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL) || defined(PROTO)
+ # if !defined(FEAT_GUI_W32) || defined(PROTO)
+
+ /*
+***************
+*** 216,222 ****
+ undrawBalloon(beval);
+ }
+ # endif /* !FEAT_GUI_W32 */
+! #endif /* FEAT_SUN_WORKSHOP || FEAT_NETBEANS_INTG || PROTO */
+
+ #if !defined(FEAT_GUI_W32) || defined(PROTO)
+ #if defined(FEAT_BEVAL_TIP) || defined(PROTO)
+--- 215,221 ----
+ undrawBalloon(beval);
+ }
+ # endif /* !FEAT_GUI_W32 */
+! #endif /* FEAT_NETBEANS_INTG || PROTO */
+
+ #if !defined(FEAT_GUI_W32) || defined(PROTO)
+ #if defined(FEAT_BEVAL_TIP) || defined(PROTO)
+*** ../vim-8.1.0762/src/gui_motif.c 2018-12-11 20:39:15.442937076 +0100
+--- src/gui_motif.c 2019-01-17 15:21:49.653359579 +0100
+***************
+*** 698,705 ****
+ XtVaSetValues(shell, XmNmappedWhenManaged, mappedWhenManaged, NULL);
+ }
+
+! #if defined(FEAT_MENU) || defined(FEAT_SUN_WORKSHOP) \
+! || defined(FEAT_GUI_DIALOG) || defined(PROTO)
+
+ /*
+ * Encapsulate the way an XmFontList is created.
+--- 698,704 ----
+ XtVaSetValues(shell, XmNmappedWhenManaged, mappedWhenManaged, NULL);
+ }
+
+! #if defined(FEAT_MENU) || defined(FEAT_GUI_DIALOG) || defined(PROTO)
+
+ /*
+ * Encapsulate the way an XmFontList is created.
+*** ../vim-8.1.0762/src/gui_x11.c 2019-01-16 22:15:07.872962363 +0100
+--- src/gui_x11.c 2019-01-17 15:23:32.516860907 +0100
+***************
+*** 22,32 ****
+ #include <X11/cursorfont.h>
+
+ /*
+! * For Workshop XpmP.h is preferred, because it makes the signs drawn with a
+! * transparent background instead of black.
+ */
+ #if defined(HAVE_XM_XPMP_H) && defined(FEAT_GUI_MOTIF) \
+! && (!defined(HAVE_X11_XPM_H) || defined(FEAT_SUN_WORKSHOP))
+ # include <Xm/XpmP.h>
+ #else
+ # ifdef HAVE_X11_XPM_H
+--- 22,32 ----
+ #include <X11/cursorfont.h>
+
+ /*
+! * XpmP.h is preferred, because it makes the signs drawn with a transparent
+! * background instead of black.
+ */
+ #if defined(HAVE_XM_XPMP_H) && defined(FEAT_GUI_MOTIF) \
+! && !defined(HAVE_X11_XPM_H)
+ # include <Xm/XpmP.h>
+ #else
+ # ifdef HAVE_X11_XPM_H
+***************
+*** 469,475 ****
+ XtRString,
+ DFLT_TOOLTIP_FONT
+ },
+! /* This one isn't really needed, keep for Sun Workshop? */
+ {
+ "balloonEvalFontSet",
+ XtCFontSet,
+--- 469,475 ----
+ XtRString,
+ DFLT_TOOLTIP_FONT
+ },
+! /* This one may not be really needed? */
+ {
+ "balloonEvalFontSet",
+ XtCFontSet,
+***************
+*** 636,643 ****
+ gui_mch_update();
+ }
+
+! #if ((defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)) \
+! && defined(FEAT_GUI_MOTIF)) || defined(PROTO)
+ /*
+ * This function fills in the XRectangle object with the current x,y
+ * coordinates and height, width so that an XtVaSetValues to the same shell of
+--- 636,642 ----
+ gui_mch_update();
+ }
+
+! #if (defined(FEAT_NETBEANS_INTG) && defined(FEAT_GUI_MOTIF)) || defined(PROTO)
+ /*
+ * This function fills in the XRectangle object with the current x,y
+ * coordinates and height, width so that an XtVaSetValues to the same shell of
+***************
+*** 701,715 ****
+ #endif
+ );
+ }
+- #ifdef FEAT_SUN_WORKSHOP
+- if (usingSunWorkShop)
+- {
+- XRectangle rec;
+-
+- shellRectangle(w, &rec);
+- workshop_frame_moved(rec.x, rec.y, rec.width, rec.height);
+- }
+- #endif
+ #if defined(FEAT_NETBEANS_INTG) && defined(FEAT_GUI_MOTIF)
+ if (netbeans_active())
+ {
+--- 700,705 ----
+***************
+*** 1224,1245 ****
+ argv[*argc] = NULL;
+ }
+ else
+- #ifdef FEAT_SUN_WORKSHOP
+- if (strcmp("-ws", argv[arg]) == 0)
+- {
+- usingSunWorkShop++;
+- p_acd = TRUE;
+- gui.dofork = FALSE; /* don't fork() when starting GUI */
+- mch_memmove(&argv[arg], &argv[arg + 1],
+- (--*argc - arg) * sizeof(char *));
+- argv[*argc] = NULL;
+- # ifdef WSDEBUG
+- wsdebug_wait(WT_ENV | WT_WAIT | WT_STOP, "SPRO_GVIM_WAIT", 20);
+- wsdebug_log_init("SPRO_GVIM_DEBUG", "SPRO_GVIM_DLEVEL");
+- # endif
+- }
+- else
+- #endif
+ #ifdef FEAT_NETBEANS_INTG
+ if (strncmp("-nb", argv[arg], 3) == 0)
+ {
+--- 1214,1219 ----
+***************
+*** 1543,1553 ****
+ if (gui.color_approx)
+ emsg(_("Vim E458: Cannot allocate colormap entry, some colors may be incorrect"));
+
+- #ifdef FEAT_SUN_WORKSHOP
+- if (usingSunWorkShop)
+- workshop_connect(app_context);
+- #endif
+-
+ #ifdef FEAT_BEVAL_GUI
+ gui_init_tooltip_font();
+ #endif
+--- 1517,1522 ----
+***************
+*** 1681,1689 ****
+ #ifdef FEAT_XIM
+ xim_init();
+ #endif
+- #ifdef FEAT_SUN_WORKSHOP
+- workshop_postinit();
+- #endif
+
+ return OK;
+ }
+--- 1650,1655 ----
+***************
+*** 2748,2759 ****
+ #endif
+
+ focus = gui.in_focus;
+! #ifdef ALT_X_INPUT
+! if (suppress_alternate_input)
+! desired = (XtIMXEvent | XtIMTimer);
+! else
+! #endif
+! desired = (XtIMAll);
+ while (!timed_out)
+ {
+ /* Stop or start blinking when focus changes */
+--- 2714,2720 ----
+ #endif
+
+ focus = gui.in_focus;
+! desired = (XtIMAll);
+ while (!timed_out)
+ {
+ /* Stop or start blinking when focus changes */
+*** ../vim-8.1.0762/src/integration.c 2019-01-13 23:50:56.358162250 +0100
+--- src/integration.c 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,1112 ****
+- /* vi:set ts=8 sw=8 noet:
+- *
+- * VIM - Vi IMproved by Bram Moolenaar
+- * Visual Workshop integration by Gordon Prieur
+- *
+- * 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.
+- */
+-
+- /*
+- * Integration with Sun Workshop.
+- *
+- * This file should not change much, it's also used by other editors that
+- * connect to Workshop. Consider changing workshop.c instead.
+- */
+- /*
+- -> consider using MakeSelectionVisible instead of gotoLine hacks
+- to show the line properly
+- -> consider using glue instead of our own message wrapping functions
+- (but can only use glue if we don't have to distribute source)
+- */
+-
+- #include "vim.h"
+-
+- #include <stdio.h>
+- #include <stdlib.h>
+-
+- #ifdef INET_SOCKETS
+- #include <netdb.h>
+- #include <netinet/in.h>
+- #else
+- #include <sys/un.h>
+- #endif
+-
+- #include <sys/types.h>
+- #include <sys/socket.h>
+- #include <sys/param.h>
+- #ifdef HAVE_LIBGEN_H
+- # include <libgen.h>
+- #endif
+- #include <unistd.h>
+- #include <string.h>
+-
+- #include <X11/Intrinsic.h>
+- #include <Xm/Xm.h>
+- #include <Xm/AtomMgr.h>
+- #include <Xm/PushB.h>
+-
+- #ifdef HAVE_X11_XPM_H
+- # include <X11/xpm.h>
+- #else
+- # ifdef HAVE_XM_XPMP_H
+- # include <Xm/XpmP.h>
+- # endif
+- #endif
+-
+- #ifdef HAVE_UTIL_DEBUG_H
+- # include <util/debug.h>
+- #endif
+- #ifdef HAVE_UTIL_MSGI18N_H
+- # include <util/msgi18n.h>
+- #endif
+-
+- #include "integration.h" /* <EditPlugin/integration.h> */
+- #ifdef HAVE_FRAME_H
+- # include <frame.h>
+- #endif
+-
+- #ifndef MAX
+- # define MAX(a, b) (a) > (b) ? (a) : (b)
+- #endif
+-
+- #ifndef NOCATGETS
+- # define NOCATGETS(x) x
+- #endif
+-
+- /* Functions private to this file */
+- static void workshop_disconnect(void);
+- static void workshop_sensitivity(int num, char *table);
+- static void adjust_sign_name(char *filename);
+- static void process_menuItem(char *);
+- static void process_toolbarButton(char *);
+- static void workshop_set_option_first(char *name, char *value);
+-
+- static size_t dummy; /* to ignore return value of write() */
+-
+- #define CMDBUFSIZ 2048
+-
+- #ifdef DEBUG
+- static FILE *dfd;
+- static void pldebug(char *, ...);
+- static void unrecognised_message(char *);
+-
+- #define HANDLE_ERRORS(cmd) else unrecognised_message(cmd);
+- #else
+- #define HANDLE_ERRORS(cmd)
+- #endif
+-
+- /*
+- * Version number of the protocol between an editor and eserve.
+- * This number should be incremented when the protocol
+- * is changed.
+- */
+- #define PROTOCOL_VERSION "4.0.0"
+-
+- static int sd = -1;
+- static XtInputId inputHandler; /* Cookie for input */
+-
+- Boolean save_files = True; /* When true, save all files before build actions */
+-
+- static void
+- workshop_connection_closed(void)
+- {
+- /*
+- * socket closed on other end
+- */
+- XtRemoveInput(inputHandler);
+- inputHandler = 0;
+- sd = -1;
+- }
+-
+- static char *
+- getCommand(void)
+- {
+- int len; /* length of this command */
+- char lenbuf[7]; /* get the length string here */
+- char *newcb; /* used to realloc cmdbuf */
+- static char *cmdbuf;/* get the command string here */
+- static int cbsize;/* size of cmdbuf */
+-
+- if ((len = read(sd, &lenbuf, 6)) == 6) {
+- lenbuf[6] = 0; /* Terminate buffer such that atoi() works right */
+- len = atoi(lenbuf);
+- if (cbsize < (len + 1)) {
+- newcb = (char *) realloc(cmdbuf,
+- MAX((len + 256), CMDBUFSIZ));
+- if (newcb != NULL) {
+- cmdbuf = newcb;
+- cbsize = MAX((len + 256), CMDBUFSIZ);
+- }
+- }
+- if (cbsize >= len && (len = read(sd, cmdbuf, len)) > 0) {
+- cmdbuf[len] = 0;
+- return cmdbuf;
+- } else {
+- return NULL;
+- }
+- } else {
+- if (len == 0) { /* EOF */
+- workshop_connection_closed();
+- }
+- return NULL;
+- }
+-
+- }
+-
+- static void
+- messageFromEserve(XtPointer clientData UNUSED,
+- int *dum1 UNUSED,
+- XtInputId *dum2 UNUSED)
+- {
+- char *cmd; /* the 1st word of the command */
+-
+- cmd = getCommand();
+- if (cmd == NULL) {
+- /* We're being shut down by eserve and the "quit" message
+- * didn't arrive before the socket connection got closed */
+- return;
+- }
+- #ifdef DEBUG
+- pldebug("%s\n", cmd);
+- #endif
+- switch (*cmd) {
+- case 'a':
+- if (cmd[1] == 'c' &&
+- strncmp(cmd, NOCATGETS("ack "), 4) == 0) {
+- int ackNum;
+- char buf[20];
+-
+- ackNum = atoi(&cmd[4]);
+- vim_snprintf(buf, sizeof(buf),
+- NOCATGETS("ack %d\n"), ackNum);
+- dummy = write(sd, buf, strlen(buf));
+- } else if (strncmp(cmd,
+- NOCATGETS("addMarkType "), 12) == 0) {
+- int idx;
+- char *color;
+- char *sign;
+-
+- idx = atoi(strtok(&cmd[12], " "));
+- color = strtok(NULL, NOCATGETS("\001"));
+- sign = strtok(NULL, NOCATGETS("\001"));
+- /* Skip space that separates names */
+- if (color) {
+- color++;
+- }
+- if (sign) {
+- sign++;
+- }
+- /* Change sign name to accommodate a different size? */
+- adjust_sign_name(sign);
+- workshop_add_mark_type(idx, color, sign);
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 'b':
+- if (strncmp(cmd,
+- NOCATGETS("balloon "), 8) == 0) {
+- char *tip;
+-
+- tip = strtok(&cmd[8], NOCATGETS("\001"));
+- workshop_show_balloon_tip(tip);
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 'c':
+- if (strncmp(cmd,
+- NOCATGETS("changeMarkType "), 15) == 0) {
+- char *file;
+- int markId;
+- int type;
+-
+- file = strtok(&cmd[15], " ");
+- markId = atoi(strtok(NULL, " "));
+- type = atoi(strtok(NULL, " "));
+- workshop_change_mark_type(file, markId, type);
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 'd':
+- if (strncmp(cmd, NOCATGETS("deleteMark "), 11) == 0) {
+- char *file;
+- int markId;
+-
+- file = strtok(&cmd[11], " ");
+- markId = atoi(strtok(NULL, " "));
+- workshop_delete_mark(file, markId);
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 'f':
+- if (cmd[1] == 'o' &&
+- strncmp(cmd, NOCATGETS("footerMsg "), 10) == 0) {
+- int severity;
+- char *message;
+-
+- severity =
+- atoi(strtok(&cmd[10], " "));
+- message = strtok(NULL, NOCATGETS("\001"));
+-
+- workshop_footer_message(message, severity);
+- } else if (strncmp(cmd,
+- NOCATGETS("frontFile "), 10) == 0) {
+- char *file;
+-
+- file = strtok(&cmd[10], " ");
+- workshop_front_file(file);
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 'g':
+- if (cmd[1] == 'e' &&
+- strncmp(cmd, NOCATGETS("getMarkLine "), 12) == 0) {
+- char *file;
+- int markid;
+- int line;
+- char buf[100];
+-
+- file = strtok(&cmd[12], " ");
+- markid = atoi(strtok(NULL, " "));
+- line = workshop_get_mark_lineno(file, markid);
+- vim_snprintf(buf, sizeof(buf),
+- NOCATGETS("markLine %s %d %d\n"),
+- file, markid, line);
+- dummy = write(sd, buf, strlen(buf));
+- } else if (cmd[1] == 'o' && cmd[4] == 'L' &&
+- strncmp(cmd, NOCATGETS("gotoLine "), 9) == 0) {
+- char *file;
+- int lineno;
+-
+- file = strtok(&cmd[9], " ");
+- lineno = atoi(strtok(NULL, " "));
+- workshop_goto_line(file, lineno);
+- } else if (strncmp(cmd,
+- NOCATGETS("gotoMark "), 9) == 0) {
+- char *file;
+- int markId;
+- char *message;
+-
+- file = strtok(&cmd[9], " ");
+- markId = atoi(strtok(NULL, " "));
+- message = strtok(NULL, NOCATGETS("\001"));
+- workshop_goto_mark(file, markId, message);
+- #ifdef NOHANDS_SUPPORT_FUNCTIONS
+- } else if (strcmp(cmd, NOCATGETS("getCurrentFile")) == 0) {
+- char *f = workshop_test_getcurrentfile();
+- char buffer[2*MAXPATHLEN];
+- vim_snprintf(buffer, sizeof(buffer),
+- NOCATGETS("currentFile %d %s"),
+- f ? (int)strlen(f) : 0, f ? f : "");
+- workshop_send_message(buffer);
+- } else if (strcmp(cmd, NOCATGETS("getCursorRow")) == 0) {
+- int row = workshop_test_getcursorrow();
+- char buffer[2*MAXPATHLEN];
+- vim_snprintf(buffer, sizeof(buffer),
+- NOCATGETS("cursorRow %d"), row);
+- workshop_send_message(buffer);
+- } else if (strcmp(cmd, NOCATGETS("getCursorCol")) == 0) {
+- int col = workshop_test_getcursorcol();
+- char buffer[2*MAXPATHLEN];
+- vim_snprintf(buffer, sizeof(buffer),
+- NOCATGETS("cursorCol %d"), col);
+- workshop_send_message(buffer);
+- } else if (strcmp(cmd, NOCATGETS("getCursorRowText")) == 0) {
+- char *t = workshop_test_getcursorrowtext();
+- char buffer[2*MAXPATHLEN];
+- vim_snprintf(buffer, sizeof(buffer),
+- NOCATGETS("cursorRowText %d %s"),
+- t ? (int)strlen(t) : 0, t ? t : "");
+- workshop_send_message(buffer);
+- } else if (strcmp(cmd, NOCATGETS("getSelectedText")) == 0) {
+- char *t = workshop_test_getselectedtext();
+- char buffer[2*MAXPATHLEN];
+- vim_snprintf(buffer, sizeof(buffer),
+- NOCATGETS("selectedText %d %s"),
+- t ? (int)strlen(t) : 0, t ? t : "");
+- workshop_send_message(buffer);
+- #endif
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 'l':
+- if (strncmp(cmd, NOCATGETS("loadFile "), 9) == 0) {
+- char *file;
+- int line;
+- char *frameid;
+-
+- file = strtok(&cmd[9], " ");
+- line = atoi(strtok(NULL, " "));
+- frameid = strtok(NULL, " ");
+- workshop_load_file(file, line, frameid);
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 'm': /* Menu, minimize, maximize */
+- if (cmd[1] == 'e' && cmd[4] == 'B' &&
+- strncmp(cmd, NOCATGETS("menuBegin "), 10) == 0) {
+- workshop_menu_begin(&cmd[10]);
+- } else if (cmd[1] == 'e' && cmd[4] == 'I' &&
+- strncmp(cmd, NOCATGETS("menuItem "), 9) == 0) {
+- process_menuItem(cmd);
+- } else if (cmd[1] == 'e' && cmd[4] == 'E' &&
+- strcmp(cmd, NOCATGETS("menuEnd")) == 0) {
+- workshop_menu_end();
+- } else if (cmd[1] == 'a' &&
+- strcmp(cmd, NOCATGETS("maximize")) == 0) {
+- workshop_maximize();
+- } else if (strcmp(cmd, NOCATGETS("minimize")) == 0) {
+- workshop_minimize();
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 'o':
+- if (cmd[1] == 'p' &&
+- strcmp(cmd, NOCATGETS("option"))) {
+- char *name;
+- char *value;
+-
+- name = strtok(&cmd[7], " ");
+- value = strtok(NULL, " ");
+- workshop_set_option_first(name, value);
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 'p':
+- if (strcmp(cmd, NOCATGETS("ping")) == 0) {
+- #if 0
+- int pingNum;
+-
+- pingNum = atoi(&cmd[5]);
+- workshop_send_ack(ackNum);
+- /* WHAT DO I DO HERE? */
+- #endif
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 'q':
+- if (strncmp(cmd, NOCATGETS("quit"), 4) == 0) {
+-
+- /* Close the connection. It's important to do
+- * that now, since workshop_quit might be
+- * looking at open files. For example, if you
+- * have modified one of the files without
+- * saving, NEdit will ask you what you want to
+- * do, and spin loop by calling
+- * XtAppProcessEvent while waiting for your
+- * reply. In this case, if we still have an
+- * input handler and the socket has been
+- * closed on the other side when eserve
+- * expired, we will hang in IoWait.
+- */
+- workshop_disconnect();
+-
+- workshop_quit();
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 'r':
+- if (cmd[1] == 'e' &&
+- strncmp(cmd, NOCATGETS("reloadFile "), 11) == 0) {
+- char *file;
+- int line;
+-
+- file = strtok(&cmd[11], " ");
+- line = atoi(strtok(NULL, " "));
+- workshop_reload_file(file, line);
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 's':
+- if (cmd[1] == 'e' && cmd[2] == 't' &&
+- strncmp(cmd, NOCATGETS("setMark "), 8) == 0) {
+- char *file;
+- int line;
+- int markId;
+- int type;
+-
+- file = strtok(&cmd[8], " ");
+- line = atoi(strtok(NULL, " "));
+- markId = atoi(strtok(NULL, " "));
+- type = atoi(strtok(NULL, " "));
+- workshop_set_mark(file, line, markId, type);
+- } else if (cmd[1] == 'h' &&
+- strncmp(cmd, NOCATGETS("showFile "), 9) == 0) {
+- workshop_show_file(&cmd[9]);
+- } else if (cmd[1] == 'u' &&
+- strncmp(cmd, NOCATGETS("subMenu "), 8) == 0) {
+- char *label;
+-
+- label = strtok(&cmd[8], NOCATGETS("\001"));
+- workshop_submenu_begin(label);
+- } else if (cmd[1] == 'u' &&
+- strcmp(cmd, NOCATGETS("subMenuEnd")) == 0) {
+- workshop_submenu_end();
+- } else if (cmd[1] == 'e' && cmd[2] == 'n' &&
+- strncmp(cmd, NOCATGETS("sensitivity "), 12) == 0) {
+- int num;
+- char *bracket;
+- char *table;
+-
+- num = atoi(strtok(&cmd[12], " "));
+- bracket = strtok(NULL, " ");
+- if (*bracket != '[') {
+- fprintf(stderr, NOCATGETS("Parsing "
+- "error for sensitivity\n"));
+- } else {
+- table = strtok(NULL, NOCATGETS("]"));
+- workshop_sensitivity(num, table);
+- }
+- } else if (cmd[1] == 'e' && cmd[2] == 'n' && cmd[3] == 'd' &&
+- strncmp(cmd, NOCATGETS("sendVerb "), 9) == 0) {
+- /* Send the given verb back (used for the
+- * debug.lineno callback (such that other tools
+- * can obtain the position coordinates or the
+- * selection) */
+- char *verb;
+-
+- verb = strtok(&cmd[9], " ");
+- workshop_perform_verb(verb, NULL);
+- } else if (cmd[1] == 'a' &&
+- strncmp(cmd, NOCATGETS("saveFile "), 9) == 0) {
+- workshop_save_file(&cmd[9]);
+- #ifdef NOHANDS_SUPPORT_FUNCTIONS
+- } else if (strncmp(cmd, NOCATGETS("saveSensitivity "), 16) == 0) {
+- char *file;
+-
+- file = strtok(&cmd[16], " ");
+- workshop_save_sensitivity(file);
+- #endif
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- case 't': /* Toolbar */
+- if (cmd[8] == 'e' &&
+- strncmp(cmd, NOCATGETS("toolbarBegin"), 12) == 0) {
+- workshop_toolbar_begin();
+- } else if (cmd[8] == 'u' &&
+- strncmp(cmd, NOCATGETS("toolbarButton"), 13) == 0) {
+- process_toolbarButton(cmd);
+- } else if (cmd[7] == 'E' &&
+- strcmp(cmd, NOCATGETS("toolbarEnd")) == 0) {
+- workshop_toolbar_end();
+- }
+- HANDLE_ERRORS(cmd);
+- break;
+-
+- #ifdef DEBUG
+- default:
+- unrecognised_message(cmd);
+- break;
+- #endif
+- }
+- }
+-
+- static void
+- process_menuItem(
+- char *cmd)
+- {
+- char *label = strtok(&cmd[9], NOCATGETS("\001"));
+- char *verb = strtok(NULL, NOCATGETS("\001"));
+- char *acc = strtok(NULL, NOCATGETS("\001"));
+- char *accText = strtok(NULL, NOCATGETS("\001"));
+- char *name = strtok(NULL, NOCATGETS("\001"));
+- char *sense = strtok(NULL, NOCATGETS("\n"));
+- char *filepos = strtok(NULL, NOCATGETS("\n"));
+- if (*acc == '-') {
+- acc = NULL;
+- }
+- if (*accText == '-') {
+- accText = NULL;
+- }
+- workshop_menu_item(label, verb, acc, accText, name, filepos, sense);
+-
+- }
+-
+-
+- static void
+- process_toolbarButton(
+- char *cmd) /* button definition */
+- {
+- char *label = strtok(&cmd[14], NOCATGETS("\001"));
+- char *verb = strtok(NULL, NOCATGETS("\001"));
+- char *senseVerb = strtok(NULL, NOCATGETS("\001"));
+- char *filepos = strtok(NULL, NOCATGETS("\001"));
+- char *help = strtok(NULL, NOCATGETS("\001"));
+- char *sense = strtok(NULL, NOCATGETS("\001"));
+- char *file = strtok(NULL, NOCATGETS("\001"));
+- char *left = strtok(NULL, NOCATGETS("\n"));
+-
+- if (!strcmp(label, NOCATGETS("-"))) {
+- label = NULL;
+- }
+- if (!strcmp(help, NOCATGETS("-"))) {
+- help = NULL;
+- }
+- if (!strcmp(file, NOCATGETS("-"))) {
+- file = NULL;
+- }
+- if (!strcmp(senseVerb, NOCATGETS("-"))) {
+- senseVerb = NULL;
+- }
+- workshop_toolbar_button(label, verb, senseVerb, filepos, help,
+- sense, file, left);
+- }
+-
+-
+- #ifdef DEBUG
+- static void
+- unrecognised_message(
+- char *cmd)
+- {
+- pldebug("Unrecognised eserve message:\n\t%s\n", cmd);
+- /* abort(); */
+- }
+- #endif
+-
+-
+- /* Change sign name to accommodate a different size:
+- * Create the filename based on the height. The filename format
+- * of multisize icons are:
+- * x.xpm : largest icon
+- * x1.xpm : smaller icon
+- * x2.xpm : smallest icon */
+- static void
+- adjust_sign_name(char *filename)
+- {
+- char *s;
+- static int fontSize = -1;
+-
+- if (fontSize == -1)
+- fontSize = workshop_get_font_height();
+- if (fontSize == 0)
+- return;
+- if (filename[0] == '-')
+- return;
+-
+- /* This is ugly: later we should instead pass the fontheight over
+- * to eserve on startup and let eserve just send the right filenames
+- * to us in the first place
+-
+- * I know that the filename will end with 1.xpm (see
+- * GuiEditor.cc`LispPrintSign if you wonder why) */
+- s = filename+strlen(filename)-5;
+- if (fontSize <= 11)
+- strcpy(s, "2.xpm");
+- else if (fontSize <= 15)
+- strcpy(s, "1.xpm");
+- else
+- strcpy(s, ".xpm");
+- }
+-
+- #if 0
+- /* Were we invoked by WorkShop? This function can be used early during startup
+- if you want to do things differently if the editor is started standalone
+- or in WorkShop mode. For example, in standalone mode you may not want to
+- add a footer/message area or a sign gutter. */
+- int
+- workshop_invoked(void)
+- {
+- static int result = -1;
+- if (result == -1) {
+- result = (getenv(NOCATGETS("SPRO_EDITOR_SOCKET")) != NULL);
+- }
+- return result;
+- }
+- #endif
+-
+- /* Connect back to eserve */
+- void workshop_connect(XtAppContext context)
+- {
+- #ifdef INET_SOCKETS
+- struct sockaddr_in server;
+- struct hostent * host;
+- int port;
+- #else
+- struct sockaddr_un server;
+- #endif
+- char buf[32];
+- char * address;
+- #ifdef DEBUG
+- char *file;
+- #endif
+-
+- address = getenv(NOCATGETS("SPRO_EDITOR_SOCKET"));
+- if (address == NULL) {
+- return;
+- }
+-
+- #ifdef INET_SOCKETS
+- port = atoi(address);
+-
+- if ((sd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
+- PERROR(NOCATGETS("workshop_connect"));
+- return;
+- }
+-
+- /* Get the server internet address and put into addr structure */
+- /* fill in the socket address structure and connect to server */
+- vim_memset((char *)&server, '\0', sizeof(server));
+- server.sin_family = AF_INET;
+- server.sin_port = port;
+- if ((host = gethostbyname(NOCATGETS("localhost"))) == NULL) {
+- PERROR(NOCATGETS("gethostbyname"));
+- sd = -1;
+- return;
+- }
+- memcpy((char *)&server.sin_addr, host->h_addr, host->h_length);
+- #else
+- if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
+- PERROR(NOCATGETS("workshop_connect"));
+- return;
+- }
+-
+- server.sun_family = AF_UNIX;
+- strcpy(server.sun_path, address);
+- #endif
+- /* Connect to server */
+- if (connect(sd, (struct sockaddr *)&server, sizeof(server))) {
+- if (errno == ECONNREFUSED) {
+- close(sd);
+- #ifdef INET_SOCKETS
+- if ((sd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
+- PERROR(NOCATGETS("workshop_connect"));
+- return;
+- }
+- #else
+- if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
+- PERROR(NOCATGETS("workshop_connect"));
+- return;
+- }
+- #endif
+- if (connect(sd, (struct sockaddr *)&server,
+- sizeof(server))) {
+- PERROR(NOCATGETS("workshop_connect"));
+- return;
+- }
+-
+- } else {
+- PERROR(NOCATGETS("workshop_connect"));
+- return;
+- }
+- }
+-
+- /* tell notifier we are interested in being called
+- * when there is input on the editor connection socket
+- */
+- inputHandler = XtAppAddInput(context, sd, (XtPointer) XtInputReadMask,
+- messageFromEserve, NULL);
+- #ifdef DEBUG
+- if ((file = getenv(NOCATGETS("SPRO_PLUGIN_DEBUG"))) != NULL) {
+- char buf[BUFSIZ];
+-
+- unlink(file);
+- vim_snprintf(buf, sizeof(buf), "date > %s", file);
+- system(buf);
+- dfd = fopen(file, "a");
+- } else {
+- dfd = NULL;
+- }
+- #endif
+-
+- vim_snprintf(buf, sizeof(buf), NOCATGETS("connected %s %s %s\n"),
+- workshop_get_editor_name(),
+- PROTOCOL_VERSION,
+- workshop_get_editor_version());
+- dummy = write(sd, buf, strlen(buf));
+-
+- vim_snprintf(buf, sizeof(buf), NOCATGETS("ack 1\n"));
+- dummy = write(sd, buf, strlen(buf));
+- }
+-
+- static void
+- workshop_disconnect(void)
+- {
+- /* Probably need to send some message here */
+-
+- /*
+- * socket closed on other end
+- */
+- XtRemoveInput(inputHandler);
+- close(sd);
+- inputHandler = 0;
+- sd = -1;
+-
+- }
+-
+- /*
+- * Utility functions
+- */
+-
+-
+- /* Minimize and maximize shells. From libutil's shell.cc. */
+-
+- /* utility functions from libutil's shell.cc */
+- static Boolean
+- isWindowMapped(Display *display, Window win)
+- {
+- XWindowAttributes winAttrs;
+- XGetWindowAttributes(display,
+- win,
+- &winAttrs);
+- if (winAttrs.map_state == IsViewable) {
+- return(True);
+- } else {
+- return(False);
+- }
+- }
+-
+- static Boolean
+- isMapped(Widget widget)
+- {
+- if (widget == NULL) {
+- return(False);
+- }
+-
+- if (XtIsRealized(widget) == False) {
+- return(False);
+- }
+-
+- return(isWindowMapped(XtDisplay(widget), XtWindow(widget)));
+- }
+-
+- static Boolean
+- widgetIsIconified(
+- Widget w)
+- {
+- Atom wm_state;
+- Atom act_type; /* actual Atom type returned */
+- int act_fmt; /* actual format returned */
+- u_long nitems_ret; /* number of items returned */
+- u_long bytes_after; /* number of bytes remaining */
+- u_long *property; /* actual property returned */
+-
+- /*
+- * If a window is iconified its WM_STATE is set to IconicState. See
+- * ICCCM Version 2.0, section 4.1.3.1 for more details.
+- */
+-
+- wm_state = XmInternAtom(XtDisplay(w), NOCATGETS("WM_STATE"), False);
+- if (XtWindow(w) != 0) { /* only check if window exists! */
+- XGetWindowProperty(XtDisplay(w), XtWindow(w), wm_state, 0L, 2L,
+- False, AnyPropertyType, &act_type, &act_fmt, &nitems_ret,
+- &bytes_after, (char_u **) &property);
+- if (nitems_ret == 2 && property[0] == IconicState) {
+- return True;
+- }
+- }
+-
+- return False;
+-
+- } /* end widgetIsIconified */
+-
+- void
+- workshop_minimize_shell(Widget shell)
+- {
+- if (shell != NULL &&
+- XtIsObject(shell) &&
+- XtIsRealized(shell) == True) {
+- if (isMapped(shell) == True) {
+- XIconifyWindow(XtDisplay(shell), XtWindow(shell),
+- XScreenNumberOfScreen(XtScreen(shell)));
+- }
+- XtVaSetValues(shell,
+- XmNiconic, True,
+- NULL);
+- }
+- }
+-
+- void workshop_maximize_shell(Widget shell)
+- {
+- if (shell != NULL &&
+- XtIsRealized(shell) == True &&
+- widgetIsIconified(shell) == True &&
+- isMapped(shell) == False) {
+- XtMapWidget(shell);
+- /* This used to be
+- XtPopdown(shell);
+- XtPopup(shell, XtGrabNone);
+- However, I found that that would drop any transient
+- windows that had been iconified with the window.
+- According to the ICCCM, XtMapWidget should be used
+- to bring a window from Iconic to Normal state.
+- However, Rich Mauri did a lot of work on this during
+- Bart, and found that XtPopDown,XtPopup was required
+- to fix several bugs involving multiple CDE workspaces.
+- I've tested it now and things seem to work fine but
+- I'm leaving this note for history in case this needs
+- to be revisited.
+- */
+- }
+- }
+-
+-
+- Boolean workshop_get_width_height(int *width, int *height)
+- {
+- static int wid = 0;
+- static int hgt = 0;
+- static Boolean firstTime = True;
+- static Boolean success = False;
+-
+- if (firstTime) {
+- char *settings;
+-
+- settings = getenv(NOCATGETS("SPRO_GUI_WIDTH_HEIGHT"));
+- if (settings != NULL) {
+- wid = atoi(settings);
+- settings = strrchr(settings, ':');
+- if (settings++ != NULL) {
+- hgt = atoi(settings);
+- }
+- if (wid > 0 && hgt > 0) {
+- success = True;
+- }
+- firstTime = False;
+- }
+- }
+-
+- if (success) {
+- *width = wid;
+- *height = hgt;
+- }
+- return success;
+- }
+-
+- /*
+- * Toolbar code
+- */
+-
+- static void
+- workshop_sensitivity(int num, char *table)
+- {
+- /* build up a verb table */
+- VerbSense *vs;
+- int i;
+- char *s;
+- if ((num < 1) || (num > 500)) {
+- return;
+- }
+-
+- vs = (VerbSense *)malloc((num+1)*sizeof(VerbSense));
+-
+- /* Point to the individual names (destroys the table string, but
+- * that's okay -- this is more efficient than duplicating strings) */
+- s = table;
+- for (i = 0; i < num; i++) {
+- while (*s == ' ') {
+- s++;
+- }
+- vs[i].verb = s;
+- while (*s && (*s != ' ') && (*s != '\001')) {
+- s++;
+- }
+- if (*s == 0) {
+- vs[i].verb = NULL;
+- break;
+- }
+- if (*s == '\001') {
+- *s = 0;
+- s++;
+- }
+- *s = 0;
+- s++;
+- while (*s == ' ') {
+- s++;
+- }
+- if (*s == '1') {
+- vs[i].sense = 1;
+- } else {
+- vs[i].sense = 0;
+- }
+- s++;
+- }
+- vs[i].verb = NULL;
+-
+- workshop_frame_sensitivities(vs);
+-
+- free(vs);
+- }
+-
+- /*
+- * Options code
+- */
+- /* 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
+- * for now just convert it into a boolean */
+- Boolean on = !strcmp(value, "on");
+-
+- if (!strcmp(name, "workshopkeys")) {
+- workshop_hotkeys(on);
+- } else if (!strcmp(name, "savefiles")) {
+- save_files = on;
+- } else if (!strcmp(name, "balloon")) {
+- workshop_balloon_mode(on);
+- } else if (!strcmp(name, "balloondelay")) {
+- int delay = atoi(value);
+- /* Should I validate the number here?? */
+- workshop_balloon_delay(delay);
+- } else {
+- /* Let editor interpret it */
+- workshop_set_option(name, value);
+- }
+- }
+-
+-
+- void workshop_file_closed_lineno(char *filename, int lineno)
+- {
+- char buffer[2*MAXPATHLEN];
+- vim_snprintf(buffer, sizeof(buffer),
+- NOCATGETS("deletedFile %s %d\n"), filename, lineno);
+- dummy = write(sd, buffer, strlen(buffer));
+- }
+-
+- void workshop_file_opened(char *filename, int readOnly)
+- {
+- char buffer[2*MAXPATHLEN];
+- vim_snprintf(buffer, sizeof(buffer),
+- NOCATGETS("loadedFile %s %d\n"), filename, readOnly);
+- dummy = write(sd, buffer, strlen(buffer));
+- }
+-
+-
+- void workshop_file_saved(char *filename)
+- {
+- char buffer[2*MAXPATHLEN];
+- vim_snprintf(buffer, sizeof(buffer),
+- NOCATGETS("savedFile %s\n"), filename);
+- dummy = write(sd, buffer, strlen(buffer));
+-
+- /* Let editor report any moved marks that the eserve client
+- * should deal with (for example, moving location-based breakpoints) */
+- workshop_moved_marks(filename);
+- }
+-
+- void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h)
+- {
+- char buffer[200];
+-
+- if (sd >= 0)
+- {
+- vim_snprintf(buffer, sizeof(buffer),
+- NOCATGETS("frameAt %d %d %d %d\n"),
+- new_x, new_y, new_w, new_h);
+- dummy = write(sd, buffer, strlen(buffer));
+- }
+- }
+-
+- /* A button in the toolbar has been pushed.
+- * Clientdata is a pointer used by the editor code to figure out the
+- * positions for this toolbar (probably by storing a window pointer,
+- * and then fetching the current buffer for that window and looking up
+- * cursor and selection positions etc.) */
+- void workshop_perform_verb(char *verb, void *clientData)
+- {
+- char *filename;
+- int curLine;
+- int curCol;
+- int selStartLine;
+- int selStartCol;
+- int selEndLine;
+- int selEndCol;
+- int selLength;
+- char *selection;
+-
+- char buf[2*MAXPATHLEN];
+- /* Later: needsFilePos indicates whether or not we need to fetch all this
+- * info for this verb... for now, however, it looks as if
+- * eserve parsing routines depend on it always being present */
+-
+- if (workshop_get_positions(clientData,
+- &filename,
+- &curLine,
+- &curCol,
+- &selStartLine,
+- &selStartCol,
+- &selEndLine,
+- &selEndCol,
+- &selLength,
+- &selection)) {
+- if (selection == NULL) {
+- selection = NOCATGETS("");
+- }
+-
+- /* Should I save the files??? This is currently done by checking
+- if the verb is one of a few recognized ones. Later we can pass
+- this list from eserve to the editor (it's currently hardcoded in
+- vi and emacs as well). */
+- if (save_files) {
+- if (!strcmp(verb, "build.build") || !strcmp(verb, "build.build-file") ||
+- !strcmp(verb, "debug.fix") || !strcmp(verb, "debug.fix-all")) {
+- workshop_save_files();
+- }
+- }
+-
+- vim_snprintf(buf, sizeof(buf),
+- NOCATGETS("toolVerb %s %s %d,%d %d,%d %d,%d %d %s\n"),
+- verb,
+- filename,
+- curLine, curCol,
+- selStartLine, selStartCol,
+- selEndLine, selEndCol,
+- selLength,
+- selection);
+- dummy = write(sd, buf, strlen(buf));
+- if (*selection) {
+- free(selection);
+- }
+- }
+- }
+-
+- /* Send a message to eserve */
+- #if defined(NOHANDS_SUPPORT_FUNCTIONS) || defined(FEAT_BEVAL_GUI)
+- void workshop_send_message(char *buf)
+- {
+- dummy = write(sd, buf, strlen(buf));
+- }
+- #endif
+-
+- /* Some methods, like currentFile, cursorPos, etc. are missing here.
+- * But it looks like these are used for NoHands testing only so we
+- * won't bother requiring editors to implement these
+- */
+-
+-
+- #ifdef DEBUG
+-
+- static void
+- pldebug(
+- char *fmt, /* a printf style format line */
+- ...)
+- {
+- va_list ap;
+-
+- if (dfd != NULL) {
+- va_start(ap, fmt);
+- vfprintf(dfd, fmt, ap);
+- va_end(ap);
+- fflush(dfd);
+- }
+-
+- } /* end pldebug */
+-
+- #endif
+--- 0 ----
+*** ../vim-8.1.0762/src/integration.h 2016-08-29 22:42:20.000000000 +0200
+--- src/integration.h 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,452 ****
+- /* vi:set ts=8 sts=4 sw=4 noet:
+- *
+- * VIM - Vi IMproved by Bram Moolenaar
+- * Visual Workshop integration by Gordon Prieur
+- *
+- * Do ":help uganda" in Vim to read copying and usage conditions.
+- * Do ":help credits" in Vim to see a list of people who contributed.
+- */
+- /*
+- THIS IS AN UNSTABLE INTERFACE! It is unsupported and will likely
+- change in future releases, possibly breaking compatibility!
+- */
+-
+- #ifndef _INTEGRATION_H
+- #define _INTEGRATION_H
+-
+- #include <X11/Intrinsic.h>
+- #include <Xm/Xm.h>
+-
+- #ifdef __cplusplus
+- extern "C" {
+- #endif
+-
+- /* Enable NoHands test support functions. Define this only if you want to
+- compile in support in the editor such that it can be run under
+- the WorkShop test suite. */
+- #ifndef NOHANDS_SUPPORT_FUNCTIONS
+- #define NOHANDS_SUPPORT_FUNCTIONS
+- #endif
+-
+-
+- /* This header file has three parts.
+- * 1. Functions you need to implement; these are called by the integration
+- * library
+- * 2. Functions you need to call when certain events happen in the editor;
+- * these are implemented by the integration library
+- * 3. Utility functions provided by the integration library; these make
+- * task 1 a bit easier.
+- */
+-
+- /*
+- * The following functions need to be implemented by the editor
+- * integration code (and will be editor-specific). Please see the
+- * sample workshop.c file for comments explaining what each functions
+- * needs to do, what the arguments mean, etc.
+- */
+-
+- /*
+- * This string is recognized by eserve and should be all lower case.
+- * This is how the editor detects that it is talking to NEdit instead
+- * of Vim, for example, when the connection is initiated from the editor.
+- * Examples: "nedit", "gvim"
+- */
+- char *workshop_get_editor_name();
+-
+- /*
+- * Version number of the editor.
+- * This number is communicated along with the protocol
+- * version to the application.
+- * Examples: "5.0.2", "19.3"
+- */
+- char *workshop_get_editor_version();
+-
+-
+- /* Goto a given line in a given file */
+- void workshop_goto_line(char *filename, int lineno);
+-
+-
+- /* Set mark in a given file */
+- void workshop_set_mark(char *filename, int lineno, int markId, int type);
+-
+-
+- /* Change mark type (for example from current-pc to pc-and-breakpoint) */
+- void workshop_change_mark_type(char *filename, int markId, int type);
+-
+- /*
+- * Goto the given mark in a file (e.g. show it).
+- * If message is not null, display it in the footer.
+- */
+-
+- void workshop_goto_mark(char *filename, int markId, char *message);
+-
+-
+- /* Delete mark */
+- void workshop_delete_mark(char *filename, int markId);
+-
+- /* Begin/end pair of messages indicating that a series of _set_mark and
+- * _delete_mark messages will be sent. This can/should be used to suppress gui
+- * redraws between the begin and end messages. For example, if you switch
+- * to a headerfile that has a class breakpoint set, there may be hundreds
+- * of marks that need to be added. You don't want to refresh the gui for each
+- * added sign, you want to wait until the final end message.
+- */
+- void workshop_mark_batch_begin();
+- void workshop_mark_batch_end();
+-
+-
+- /* Load a given file into the WorkShop buffer. "frameid" is a token string
+- * that identifies which frame the file would like to be loaded into. This
+- * will usually be null, in which case you should use the default frame.
+- * However, if frameid is not null, you need to find a frame that has this
+- * frameid, and replace the file in that frame. Finally, if the frameid is
+- * one you haven't seen before, you should create a new frame for this file.
+- * Note that "frameid" is a string value, not just an opaque pointer, so
+- * you should use strcmp rather than == when testing for equality.
+- */
+- void workshop_load_file(char *filename, int line, char *frameid);
+-
+-
+- /* Reload the WorkShop buffer */
+- void workshop_reload_file(char *filename, int line);
+-
+-
+- /* Show the given file */
+- void workshop_show_file(char *filename);
+-
+-
+- /* Front the given file */
+- void workshop_front_file(char *filename);
+-
+-
+- /* Save the given file */
+- void workshop_save_file(char *filename);
+-
+- /* Save all WorkShop edited files. You can ask user about modified files
+- * and skip saving any files the user doesn't want to save.
+- * This function is typically called when the user issues a build, a fix,
+- * etc. (and also if you select "Save All" from the File menu :-)
+- */
+- void workshop_save_files();
+-
+- /* Show a message in all footers.
+- Severity currently is not defined. */
+- void workshop_footer_message(char *message, int severity);
+-
+- /* Minimize all windows */
+- void workshop_minimize();
+-
+-
+- /* Maximize all windows */
+- void workshop_maximize();
+-
+-
+- /*
+- * Create a new mark type, assign it a given index, a given textbackground
+- * color, and a given left-margin sign (where sign is a filename to an
+- * .xpm file)
+- */
+- void workshop_add_mark_type(int idx, char *colorspec, char *sign);
+-
+-
+- /* Get mark line number */
+- int workshop_get_mark_lineno(char *filename, int markId);
+-
+-
+- /* Exit editor; save confirmation dialogs are okay */
+- void workshop_quit();
+-
+- /* Set an editor option.
+- * For example, name="syntax",value="on" would enable syntax highlighting.
+- * The currently defined options are:
+- * lineno {on,off} show line numbers
+- * syntax {on,off} highlight syntax
+- * parentheses {on,off} show matching parentheses
+- * The following options are interpreted by the library for you (so you
+- * will never see the message. However, the implementation requires you
+- * to provide certain callbacks, like restore hotkeys or save all files.
+- * These are documented separately).
+- * workshopkeys {on,off} set workshop hotkeys
+- * savefiles {on,off} save all files before issuing a build
+- * balloon {on,off} enable/disable balloon evaluate
+- *
+- * IGNORE an option if you do not recognize it.
+- */
+- void workshop_set_option(char *name, char *value);
+-
+- /*
+- * (See workshop_add_frame first.) This function notifies the editor
+- * that the frame for the given window (indicated by "frame", which
+- * was supplied by the editor in workshop_add_frame) has been created.
+- * This can happen much later than the workshop_add_frame message, since
+- * often a window is created on editor startup, while the frame description
+- * is passed over from eserve much later, when the connection is complete.
+- * This gives the editor a chance to kick its GUI to show the frame
+- * properly; typically you'll unmanage and remanage the parent widget to
+- * force a geometry recalculation.
+- */
+-
+- void workshop_reconfigure_frame(void *frame);
+-
+-
+- /* Are there any moved marks? If so, call workshop_move_mark on
+- * each of them now. This is how eserve can find out if for example
+- * breakpoints have moved when a program has been recompiled and
+- * reloaded into dbx.
+- */
+- void workshop_moved_marks(char *filename);
+-
+-
+- /* A button in the toolbar has been pushed. "frame" is provided
+- * which should let you determine which toolbar had a button pushed
+- * (you supplied this clientData when you created a toolbar). From
+- * this you should be able to figure out which file the operation
+- * applies to, and for that window the cursor line and column,
+- * selection begin line and column, selection end line and column,
+- * selection text and selection text length. The column numbers are
+- * currently unused but implement it anyway in case we decide to use
+- * them in the future.
+- * Note that frame can be NULL. In this case, you should pick
+- * a default window to translate coordinates for (ideally, the
+- * last window the user has operated on.) This will be the case when
+- * the user clicks on a Custom Button programmed to take the current
+- * line number as an argument. Here it's ambiguous which buffer
+- * to use, so you need to pick one.
+- * (Interface consideration: Perhaps we instead should add smarts
+- * into the library such that we remember which frame pointer
+- * we last noticed (e.g. last call to get_positions, or perhaps
+- * last add_frame) and then pass that instead? For example, we could
+- * have all workshop operations return the clientData when passed
+- * the filename (or add a filename-to-clientData converter?) and then
+- * remember the last filename/clientData used.
+- */
+- int workshop_get_positions(void *frame,
+- char **filename,
+- int *curLine,
+- int *curCol,
+- int *selStartLine,
+- int *selStartCol,
+- int *selEndLine,
+- int *selEndCol,
+- int *selLength,
+- char **selection);
+-
+- /* The following function should return the height of a character
+- * in the text display. This is used to pick out a suitable size
+- * for the signs to match the text (currently available in three
+- * sizes). If you just return 0, WorkShop will use the default
+- * sign size. (Use XmStringExtent on character "A" to get the height.)
+- */
+-
+- int workshop_get_font_height(void);
+-
+- /* The following function requests that you register the given
+- * hotkey as a keyboard accelerator for all frames. Whenever the
+- * hotkey is pressed, you should invoke workshop_hotkey_pressed
+- * and pass the current frame pointer as an argument as well as
+- * the clientData pointer passed in to this function.
+- * The remove function unregisters the hotkey.
+- */
+- void workshop_register_hotkey(Modifiers modifiers, KeySym keysym,
+- void *clientData);
+- void workshop_unregister_hotkey(Modifiers modifiers, KeySym keysym,
+- void *clientData);
+-
+-
+-
+-
+- /*
+- *
+- * The following functions notify eserve of important editor events,
+- * such as files being modified, files being saved, etc. You must
+- * sprinkle your editor code with calls to these. For example, whenever
+- * a file is modified (well, when its read-only status changes to modified),
+- * call workshop_file_modified().
+- *
+- */
+-
+-
+-
+- /* Connect with eserve. Add this call after you editor initialization
+- * is done, right before entering the event loop or blocking on input.
+- * This will set up a socket connection with eserve.
+- */
+- void workshop_connect(XtAppContext context);
+-
+- /* A file has been opened. */
+- void workshop_file_opened(char *filename, int readOnly);
+-
+-
+- /* A file has been saved. Despite its name, eserve also uses this
+- * message to mean a file has been reverted or unmodified.
+- */
+- void workshop_file_saved(char *filename);
+-
+-
+- #if 0
+- /* A file has been closed */
+- void workshop_file_closed(char *filename);
+- #endif
+-
+- /* Like workshop_file_closed, but also inform eserve what line the
+- cursor was on when you left the file. That way eserve can put you
+- back where you left off when you return to this file. */
+- void workshop_file_closed_lineno(char *filename, int line);
+-
+- #if 0
+- /* A file has been modified */
+- void workshop_file_modified(char *filename);
+-
+- /*
+- * A mark has been moved. Only call this as a response to
+- * a workshop_moved_marks request call.
+- */
+- void workshop_move_mark(char *filename, int markId, int newLineno);
+- #endif
+-
+- /* Tell the integration library about a new frame being added.
+- * Supply a form for the toolbar, a label for the footer, and an
+- * XmPulldown menu for the WorkShop menu to attach to. Top and bottom
+- * are the widgets above and below the toolbar form widget, if
+- * any. Call this function when you create a new window. It returns a
+- * void *, a handle which you should keep and return when you delete
+- * the window with workshop_delete_toolbar. The "footer" argument
+- * points to a Label widget that is going to be used as a status
+- * message area, and "menu" (if any) points to an Menu widget that
+- * should contain a WorkShop menu. Clientdata is a pointer which is
+- * only used by the editor. It will typically be a pointer to the
+- * window object that the toolbar is placed in. If you have multiple
+- * windows, you need to use this pointer to figure out which window
+- * (and thus corresponding buffer) the user has clicked on to respond
+- * to the workshop_get_positions message.
+- * Each frame's clientData ("frame") should be unique.
+- */
+- void *workshop_add_frame(void *frame, Widget form,
+- Widget top, Widget bottom, Widget footer,
+- Widget menu);
+-
+- /* Delete a window/frame. Call this when an editor window is being deleted. */
+- void workshop_delete_frame(void *handle);
+-
+- /* Add a balloon evaluate text area. "frame" is used the same way
+- * as in workshop_add_frame. This call is not part of workshop_add_frame because
+- * a frame can have multiple tooltip areas (typically, an editor frame that
+- * is split showing multiple buffers will have a separate tooltip area for
+- * each text widget. Each such area is called a "window" (consistent with
+- * XEmacs terminology). Separate these by the window argument if necessary.
+- * You will need to implement workshop_get_balloon_text such that it uses
+- * these two arguments to derive the file, line etc. for the tip.
+- * Call the remove function if you delete this area such that the integration
+- * library can update itself. You must call workshop_add_frame before you
+- * call add_balloon_eval_area, and you must pass the same frame pointer.
+- */
+- void workshop_add_balloon_eval_area(void *frame, void *window, Widget widget);
+- void workshop_remove_balloon_eval_area(void *frame, void *window, Widget widget);
+-
+-
+- /* For a given mouse position inside the balloon area (passed as x,y),
+- * return the balloon text to be evaluated. There are two scenarios:
+- * If the position is inside the selection, return the selection
+- * string. Else, return the full line (or possibly the full line up
+- * to the last semicolon (that's TBD), along with an index pointing to
+- * where which character the mouse is over.
+- * If we have the selection-scenario, set mouseIndex to -1 to indicate
+- * that no autoexpansion should occur but that the selection should
+- * be evaluated as is.
+- *
+- * XXX Does dbx need more information here, like the filename and line
+- * number in order to determine the correct language and scope to be
+- * used during evaluation?? Or should it just work like the p= button
+- * (where the current scope and language is used, even if you are
+- * pointing at a different file with a different scope) ?
+- */
+- int workshop_get_balloon_text(Position x, Position y,
+- void *frame,
+- void *window,
+- char **filename,
+- int *line,
+- char **text,
+- int *mouseIndex);
+-
+-
+- /* Window size and location
+- * WorkShop will attempt to restore the size and location of a single
+- * editor frame. For vi, this window is designated as the "reusable" one.
+- * You can implement your own scheme for determining which window you
+- * want to associate with WorkShop. Whenever the size and location of
+- * this window is changed, call the following function to notify eserve.
+- * Like workshop_invoked, this can be called before the workshop_connect()
+- * call.
+- */
+- void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h);
+- Boolean workshop_get_width_height(int *, int *);
+- #if 0
+- Boolean workshop_get_rows_cols(int *, int *);
+- #endif
+-
+- /* This function should be invoked when you press a hotkey
+- * set up by workshop_register_hotkey. Pass the clientData
+- * to it that was given to you with workshop_register_hotkey.
+- */
+- void workshop_hotkey_pressed(void *frame, void *clientData);
+-
+-
+-
+-
+-
+- /*
+- * Utility functions
+- * These provide convenience functions to simplify implementing some
+- * of the above functions.
+- *
+- */
+-
+- #if 0
+- /* Were we invoked by WorkShop? This function can be used early during startup
+- * if you want to do things differently if the editor is started standalone
+- * or in WorkShop mode. For example, in standalone mode you may not want to
+- * add a footer/message area or a sign gutter.
+- */
+- int workshop_invoked(void);
+- #endif
+-
+-
+- /* Minimize (iconify) the given shell */
+- void workshop_minimize_shell(Widget shell);
+-
+- /* Maximize (deiconify) the given shell */
+- void workshop_maximize_shell(Widget shell);
+-
+- /* Called by frame.cc -- editor shouldn't call this directly.
+- * Perhaps we need an integrationP.h file ? */
+- void workshop_perform_verb(char *verb, void *clientData);
+- void workshop_send_message(char *buf);
+-
+-
+- #ifdef NOHANDS_SUPPORT_FUNCTIONS
+- /* The following functions are needed to run the WorkShop testsuite
+- * with this editor. You don't need to implement these unless you
+- * intend for your editor to be run by Workshop's testsuite.
+- * getcursorrow should return the number of lines from the top of
+- * the window the cursor is; similarly for getcursorcol.
+- */
+- char *workshop_test_getcurrentfile();
+- int workshop_test_getcursorrow();
+- int workshop_test_getcursorcol();
+- char *workshop_test_getcursorrowtext();
+- char *workshop_test_getselectedtext();
+- #endif
+-
+- /*
+- * Struct used to set/unset the sensitivity of verbs.
+- */
+- typedef struct {
+- char *verb;
+- Boolean sense;
+- } VerbSense;
+-
+- #ifdef __cplusplus
+- }
+- #endif
+-
+- #endif /* _INTEGRATION_H */
+--- 0 ----
+*** ../vim-8.1.0762/src/main.c 2019-01-14 21:51:17.987461933 +0100
+--- src/main.c 2019-01-17 15:23:50.756769234 +0100
+***************
+*** 628,637 ****
+ */
+ if (gui.in_use)
+ {
+! # ifdef FEAT_SUN_WORKSHOP
+! if (!usingSunWorkShop)
+! # endif
+! gui_wait_for_chars(50L, typebuf.tb_change_cnt);
+ TIME_MSG("GUI delay");
+ }
+ #endif
+--- 628,634 ----
+ */
+ if (gui.in_use)
+ {
+! gui_wait_for_chars(50L, typebuf.tb_change_cnt);
+ TIME_MSG("GUI delay");
+ }
+ #endif
+***************
+*** 983,991 ****
+ */
+ early_arg_scan(paramp);
+
+- #ifdef FEAT_SUN_WORKSHOP
+- findYourself(paramp->argv[0]);
+- #endif
+ #if defined(FEAT_GUI)
+ /* Prepare for possibly starting GUI sometime */
+ gui_prepare(&paramp->argc, paramp->argv);
+--- 980,985 ----
+*** ../vim-8.1.0762/src/misc2.c 2019-01-13 23:38:33.403773217 +0100
+--- src/misc2.c 2019-01-17 15:24:05.616693884 +0100
+***************
+*** 3411,3417 ****
+
+ #if defined(FEAT_SESSION) || defined(FEAT_AUTOCHDIR) \
+ || defined(MSWIN) || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_GTK) \
+! || defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) \
+ || defined(PROTO)
+ /*
+ * Change to a file's directory.
+--- 3411,3417 ----
+
+ #if defined(FEAT_SESSION) || defined(FEAT_AUTOCHDIR) \
+ || defined(MSWIN) || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_GTK) \
+! || defined(FEAT_NETBEANS_INTG) \
+ || defined(PROTO)
+ /*
+ * Change to a file's directory.
+*** ../vim-8.1.0762/src/nbdebug.c 2016-09-25 21:41:24.000000000 +0200
+--- src/nbdebug.c 2019-01-17 15:24:41.628508930 +0100
+***************
+*** 42,48 ****
+ /*
+ * nbdebug_wait - This function can be used to delay or stop execution of vim.
+ * It's normally used to delay startup while attaching a
+! * debugger to a running process. Since workshop starts gvim
+ * from a background process this is the only way to debug
+ * startup problems.
+ */
+--- 42,48 ----
+ /*
+ * nbdebug_wait - This function can be used to delay or stop execution of vim.
+ * It's normally used to delay startup while attaching a
+! * debugger to a running process. Since NetBeans starts gvim
+ * from a background process this is the only way to debug
+ * startup problems.
+ */
+*** ../vim-8.1.0762/src/netbeans.c 2019-01-15 20:19:36.743904434 +0100
+--- src/netbeans.c 2019-01-17 15:09:18.877769920 +0100
+***************
+*** 2273,2281 ****
+
+ nbdebug((" COLONCMD %s\n", buf));
+
+- /* ALT_INPUT_LOCK_ON; */
+ do_cmdline((char_u *)buf, NULL, NULL, DOCMD_NOWAIT | DOCMD_KEYTYPED);
+- /* ALT_INPUT_LOCK_OFF; */
+
+ setcursor(); /* restore the cursor position */
+ out_flush_cursor(TRUE, FALSE);
+--- 2273,2279 ----
+*** ../vim-8.1.0762/src/proto.h 2019-01-15 20:19:36.743904434 +0100
+--- src/proto.h 2019-01-17 15:26:51.439817568 +0100
+***************
+*** 295,303 ****
+ # ifdef FEAT_GUI_PHOTON
+ # include "gui_photon.pro"
+ # endif
+- # ifdef FEAT_SUN_WORKSHOP
+- # include "workshop.pro"
+- # endif
+ # endif /* FEAT_GUI */
+
+ # ifdef FEAT_OLE
+--- 295,300 ----
+*** ../vim-8.1.0762/src/proto/workshop.pro 2018-05-17 13:52:57.000000000 +0200
+--- src/proto/workshop.pro 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,49 ****
+- /* workshop.c */
+- void workshop_init(void);
+- void workshop_postinit(void);
+- void ex_wsverb(exarg_T *eap);
+- char *workshop_get_editor_name(void);
+- char *workshop_get_editor_version(void);
+- void workshop_load_file(char *filename, int line, char *frameid);
+- void workshop_reload_file(char *filename, int line);
+- void workshop_show_file(char *filename);
+- void workshop_goto_line(char *filename, int lineno);
+- void workshop_front_file(char *filename);
+- void workshop_save_file(char *filename);
+- void workshop_save_files(void);
+- void workshop_quit(void);
+- void workshop_minimize(void);
+- void workshop_maximize(void);
+- void workshop_add_mark_type(int idx, char *colorspec, char *sign);
+- void workshop_set_mark(char *filename, int lineno, int markId, int idx);
+- void workshop_change_mark_type(char *filename, int markId, int idx);
+- void workshop_goto_mark(char *filename, int markId, char *message);
+- void workshop_delete_mark(char *filename, int markId);
+- int workshop_get_mark_lineno(char *filename, int markId);
+- void workshop_moved_marks(char *filename);
+- int workshop_get_font_height(void);
+- void workshop_footer_message(char *message, int severity);
+- void workshop_menu_begin(char *label);
+- void workshop_submenu_begin(char *label);
+- void workshop_submenu_end(void);
+- void workshop_menu_item(char *label, char *verb, char *accelerator, char *acceleratorText, char *name, char *filepos, char *sensitive);
+- void workshop_menu_end(void);
+- void workshop_toolbar_begin(void);
+- void workshop_toolbar_end(void);
+- void workshop_toolbar_button(char *label, char *verb, char *senseVerb, char *filepos, char *help, char *sense, char *file, char *left);
+- void workshop_frame_sensitivities(VerbSense *vs);
+- void workshop_set_option(char *option, char *value);
+- void workshop_balloon_mode(Boolean on);
+- void workshop_balloon_delay(int delay);
+- void workshop_show_balloon_tip(char *tip);
+- void workshop_hotkeys(Boolean on);
+- int workshop_get_positions(void *clientData, char **filename, int *curLine, int *curCol, int *selStartLine, int *selStartCol, int *selEndLine, int *selEndCol, int *selLength, char **selection);
+- char *workshop_test_getcurrentfile(void);
+- int workshop_test_getcursorrow(void);
+- int workshop_test_getcursorcol(void);
+- char *workshop_test_getcursorrowtext(void);
+- char *workshop_test_getselectedtext(void);
+- void workshop_save_sensitivity(char *filename);
+- void workshop_beval_cb(BalloonEval *beval, int state);
+- void findYourself(char *argv0);
+- /* vim: set ft=c : */
+--- 0 ----
+*** ../vim-8.1.0762/src/ui.c 2019-01-17 14:11:56.434600704 +0100
+--- src/ui.c 2019-01-17 15:25:20.972303268 +0100
+***************
+*** 1625,1634 ****
+ * descriptions which would otherwise overflow. The buffer is considered full
+ * when only this extra space (or part of it) remains.
+ */
+! #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_JOB_CHANNEL) \
+! || defined(FEAT_CLIENTSERVER)
+ /*
+! * Sun WorkShop and NetBeans stuff debugger commands into the input buffer.
+ * This requires a larger buffer...
+ * (Madsen) Go with this for remote input as well ...
+ */
+--- 1625,1633 ----
+ * descriptions which would otherwise overflow. The buffer is considered full
+ * when only this extra space (or part of it) remains.
+ */
+! #if defined(FEAT_JOB_CHANNEL) || defined(FEAT_CLIENTSERVER)
+ /*
+! * NetBeans stuffs debugger commands into the input buffer.
+ * This requires a larger buffer...
+ * (Madsen) Go with this for remote input as well ...
+ */
+*** ../vim-8.1.0762/src/version.c 2019-01-17 14:31:10.190919265 +0100
+--- src/version.c 2019-01-17 15:39:12.143436999 +0100
+***************
+*** 598,608 ****
+ #else
+ "-statusline",
+ #endif
+- #ifdef FEAT_SUN_WORKSHOP
+- "+sun_workshop",
+- #else
+ "-sun_workshop",
+- #endif
+ #ifdef FEAT_SYN_HL
+ "+syntax",
+ #else
+--- 598,604 ----
+*** ../vim-8.1.0762/src/vim.h 2019-01-13 23:38:33.415773131 +0100
+--- src/vim.h 2019-01-17 15:27:00.275769256 +0100
+***************
+*** 288,297 ****
+ # include "os_qnx.h"
+ #endif
+
+- #ifdef FEAT_SUN_WORKSHOP
+- # include "workshop.h"
+- #endif
+-
+ #ifdef X_LOCALE
+ # include <X11/Xlocale.h>
+ #else
+--- 288,293 ----
+***************
+*** 2236,2249 ****
+ # define vim_realloc(ptr, size) realloc((ptr), (size))
+ #endif
+
+- /*
+- * The following macros stop display/event loop nesting at the wrong time.
+- */
+- #ifdef ALT_X_INPUT
+- # define ALT_INPUT_LOCK_OFF suppress_alternate_input = FALSE
+- # define ALT_INPUT_LOCK_ON suppress_alternate_input = TRUE
+- #endif
+-
+ #ifdef FEAT_MBYTE
+ /*
+ * Return byte length of character that starts with byte "b".
+--- 2232,2237 ----
+*** ../vim-8.1.0762/src/workshop.c 2018-12-21 15:16:57.483579762 +0100
+--- src/workshop.c 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,1830 ****
+- /* vi:set ts=8 sts=4 sw=4 noet:
+- *
+- * VIM - Vi IMproved by Bram Moolenaar
+- * Visual Workshop integration by Gordon Prieur
+- *
+- * 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.
+- */
+-
+- #include "protodef.h"
+- #ifdef HAVE_CONFIG_H
+- # include "auto/config.h"
+- #endif
+- #include <stdio.h>
+- #include <stdlib.h>
+- #include <sys/types.h>
+- #include <netdb.h>
+- #include <netinet/in.h>
+- #include <sys/socket.h>
+- #ifdef HAVE_LIBGEN_H
+- # include <libgen.h>
+- #endif
+- #include <unistd.h>
+- #include <string.h>
+- #include <stdlib.h>
+- #include <ctype.h>
+-
+- #include <X11/Intrinsic.h>
+- #include <Xm/Xm.h>
+- #include <Xm/PushB.h>
+-
+- #include "integration.h" /* <EditPlugin/integration.h> */
+-
+- #include "vim.h"
+- #include "version.h"
+- #include "workshop.h"
+-
+- void workshop_hotkeys(Boolean);
+-
+- static Boolean isShowing(int);
+- static win_T *get_window(buf_T *);
+- static void updatePriority(Boolean);
+- static char *addUniqueMnemonic(char *, char *);
+- static char *fixup(char *);
+- static char *get_selection(buf_T *);
+- static char *append_selection(int, char *, int *, int *);
+- static void load_window(char *, int lnum);
+- static void warp_to_pc(int);
+- #ifdef FEAT_BEVAL_GUI
+- void workshop_beval_cb(BalloonEval *, int);
+- # ifdef FEAT_VARTABS
+- static int computeIndex(int, char_u *, int, int *);
+- # else
+- static int computeIndex(int, char_u *, int);
+- # endif
+- #endif
+- static char *fixAccelText(char *);
+- static void addMenu(char *, char *, char *);
+- static char *lookupVerb(char *, int);
+- static void coloncmd(char *, Boolean);
+-
+- extern Widget vimShell;
+- extern Widget textArea;
+- extern XtAppContext app_context;
+-
+- static int tbpri; /* ToolBar priority */
+- int usingSunWorkShop = 0; /* set if -ws flag is used */
+- char curMenuName[BUFSIZ];
+- char curMenuPriority[BUFSIZ];
+-
+- static Boolean workshopInitDone = False;
+- static Boolean workshopHotKeysEnabled = False;
+-
+- /*
+- * The following enum is from <gp_dbx/gp_dbx_common.h>. We can't include it
+- * here because it's C++.
+- */
+- enum
+- {
+- GPLineEval_EVALUATE, /* evaluate expression */
+- GPLineEval_INDIRECT, /* evaluate *<expression> */
+- GPLineEval_TYPE /* type of expression */
+- };
+-
+- /*
+- * Store each verb in the MenuMap. This lets us map from a verb to a menu.
+- * There may be multiple matches for a single verb in this table.
+- */
+- #define MENU_INC 50 /* menuMap incremental size increases */
+- typedef struct
+- {
+- char *name; /* name of the menu */
+- char *accel; /* optional accelerator key */
+- char *verb; /* menu verb */
+- } MenuMap;
+- static MenuMap *menuMap; /* list of verb/menu mappings */
+- static int menuMapSize; /* current size of menuMap */
+- static int menuMapMax; /* allocated size of menuMap */
+- static char *initialFileCmd; /* save command but defer doing it */
+-
+-
+- void
+- workshop_init(void)
+- {
+- char_u buf[64];
+- int is_dirty = FALSE;
+- int width, height;
+- XtInputMask mask;
+-
+- /*
+- * Turn on MenuBar, ToolBar, and Footer.
+- */
+- STRCPY(buf, p_go);
+- if (vim_strchr(p_go, GO_MENUS) == NULL)
+- {
+- STRCAT(buf, "m");
+- is_dirty = TRUE;
+- }
+- if (vim_strchr(p_go, GO_TOOLBAR) == NULL)
+- {
+- STRCAT(buf, "T");
+- is_dirty = TRUE;
+- }
+- if (vim_strchr(p_go, GO_FOOTER) == NULL)
+- {
+- STRCAT(buf, "F");
+- is_dirty = TRUE;
+- }
+- if (is_dirty)
+- set_option_value((char_u *)"go", 0L, buf, 0);
+-
+- /*
+- * Set size from workshop_get_width_height().
+- */
+- width = height = 0;
+- if (workshop_get_width_height(&width, &height))
+- {
+- XtVaSetValues(vimShell,
+- XmNwidth, width,
+- XmNheight, height,
+- NULL);
+- }
+-
+- /*
+- * Now read in the initial messages from eserve.
+- */
+- while ((mask = XtAppPending(app_context))
+- && (mask & XtIMAlternateInput) && !workshopInitDone)
+- XtAppProcessEvent(app_context, (XtInputMask)XtIMAlternateInput);
+- }
+-
+- void
+- workshop_postinit(void)
+- {
+- do_cmdline_cmd((char_u *)initialFileCmd);
+- ALT_INPUT_LOCK_OFF;
+- free(initialFileCmd);
+- initialFileCmd = NULL;
+- }
+-
+- void
+- ex_wsverb(exarg_T *eap)
+- {
+- msg_clr_cmdline();
+- workshop_perform_verb((char *) eap->arg, NULL);
+- }
+-
+- /*
+- * Editor name
+- * This string is recognized by eserve and should be all lower case.
+- * This is how the editor detects that it is talking to gvim instead
+- * of NEdit, for example, when the connection is initiated from the editor.
+- */
+- char *
+- workshop_get_editor_name(void)
+- {
+- return "gvim";
+- }
+-
+- /*
+- * Version number of the editor.
+- * This number is communicated along with the protocol
+- * version to the application.
+- */
+- char *
+- workshop_get_editor_version(void)
+- {
+- return Version;
+- }
+-
+- /*
+- * Answer functions: called by eserve
+- */
+-
+- /*
+- * Name:
+- * workshop_load_file
+- *
+- * Function:
+- * Load a given file into the WorkShop buffer.
+- */
+- void
+- workshop_load_file(
+- char *filename, /* the file to load */
+- int line, /* an optional line number (or 0) */
+- char *frameid UNUSED) /* used for multi-frame support */
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_load_file(%s, %d)\n", filename, line);
+- #endif
+-
+- #ifdef FEAT_BEVAL_GUI
+- bevalServers |= BEVAL_WORKSHOP;
+- #endif
+-
+- load_window(filename, line);
+- }
+-
+- /*
+- * Reload the WorkShop buffer
+- */
+- void
+- workshop_reload_file(
+- char *filename,
+- int line)
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_reload_file(%s, %d)\n", filename, line);
+- #endif
+- load_window(filename, line);
+- }
+-
+- void
+- workshop_show_file(
+- char *filename)
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_show_file(%s)\n", filename);
+- #endif
+-
+- load_window(filename, 0);
+- }
+-
+- void
+- workshop_goto_line(
+- char *filename,
+- int lineno)
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_goto_line(%s, %d)\n", filename, lineno);
+- #endif
+-
+- load_window(filename, lineno);
+- }
+-
+- void
+- workshop_front_file(
+- char *filename UNUSED)
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_front_file()\n");
+- #endif
+- /*
+- * Assumption: This function will always be called after a call to
+- * workshop_show_file(), so the file is always showing.
+- */
+- if (vimShell != NULL)
+- XRaiseWindow(gui.dpy, XtWindow(vimShell));
+- }
+-
+- void
+- workshop_save_file(
+- char *filename)
+- {
+- char cbuf[BUFSIZ]; /* build vim command here */
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_save_file(%s)\n", filename);
+- #endif
+-
+- /* Save the given file */
+- vim_snprintf(cbuf, sizeof(cbuf), "w %s", filename);
+- coloncmd(cbuf, TRUE);
+- }
+-
+- void
+- workshop_save_files(void)
+- {
+- /* Save the given file */
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_save_files()\n");
+- #endif
+-
+- add_to_input_buf((char_u *) ":wall\n", 6);
+- }
+-
+- void
+- workshop_quit(void)
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_quit()\n");
+- #endif
+-
+- add_to_input_buf((char_u *) ":qall\n", 6);
+- }
+-
+- void
+- workshop_minimize(void)
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_minimize()\n");
+- #endif
+- workshop_minimize_shell(vimShell);
+- }
+- void
+- workshop_maximize(void)
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_maximize()\n");
+- #endif
+-
+- workshop_maximize_shell(vimShell);
+- }
+-
+- void
+- workshop_add_mark_type(
+- int idx,
+- char *colorspec,
+- char *sign)
+- {
+- char gbuf[BUFSIZ]; /* buffer for sign name */
+- char cibuf[BUFSIZ]; /* color information */
+- char cbuf[BUFSIZ]; /* command buffer */
+- char *bp;
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- {
+- char *cp;
+-
+- cp = strrchr(sign, '/');
+- if (cp == NULL)
+- cp = sign;
+- else
+- cp++; /* skip '/' character */
+- wstrace("workshop_add_mark_type(%d, \"%s\", \"%s\")\n", idx,
+- colorspec && *colorspec ? colorspec : "<None>", cp);
+- }
+- #endif
+-
+- /*
+- * Isolate the basename of sign in gbuf. We will use this for the
+- * GroupName in the highlight command sent to vim.
+- */
+- STRCPY(gbuf, gettail((char_u *)sign));
+- bp = strrchr(gbuf, '.');
+- if (bp != NULL)
+- *bp = NUL;
+-
+- if (gbuf[0] != '-' && gbuf[1] != NUL)
+- {
+- if (colorspec != NULL && *colorspec)
+- {
+- vim_snprintf(cbuf, sizeof(cbuf),
+- "highlight WS%s guibg=%s", gbuf, colorspec);
+- coloncmd(cbuf, FALSE);
+- vim_snprintf(cibuf, sizeof(cibuf), "linehl=WS%s", gbuf);
+- }
+- else
+- cibuf[0] = NUL;
+-
+- vim_snprintf(cbuf, sizeof(cbuf),
+- "sign define %d %s icon=%s", idx, cibuf, sign);
+- coloncmd(cbuf, TRUE);
+- }
+- }
+-
+- void
+- workshop_set_mark(
+- char *filename, /* filename which gets the mark */
+- int lineno, /* line number which gets the mark */
+- int markId, /* unique mark identifier */
+- int idx) /* which mark to use */
+- {
+- char cbuf[BUFSIZ]; /* command buffer */
+-
+- /* Set mark in a given file */
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_set_mark(%s, %d (ln), %d (id), %d (idx))\n",
+- filename, lineno, markId, idx);
+- #endif
+-
+- vim_snprintf(cbuf, sizeof(cbuf), "sign place %d line=%d name=%d file=%s",
+- markId, lineno, idx, filename);
+- coloncmd(cbuf, TRUE);
+- }
+-
+- void
+- workshop_change_mark_type(
+- char *filename, /* filename which gets the mark */
+- int markId, /* unique mark identifier */
+- int idx) /* which mark to use */
+- {
+- char cbuf[BUFSIZ]; /* command buffer */
+-
+- /* Change mark type */
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_change_mark_type(%s, %d, %d)\n",
+- filename, markId, idx);
+- #endif
+-
+- vim_snprintf(cbuf, sizeof(cbuf),
+- "sign place %d name=%d file=%s", markId, idx, filename);
+- coloncmd(cbuf, TRUE);
+- }
+-
+- /*
+- * Goto the given mark in a file (e.g. show it).
+- * If message is not null, display it in the footer.
+- */
+- void
+- workshop_goto_mark(
+- char *filename,
+- int markId,
+- char *message)
+- {
+- char cbuf[BUFSIZ]; /* command buffer */
+-
+- /* Goto mark */
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_goto_mark(%s, %d (id), %s)\n",
+- filename, markId, message && *message &&
+- !(*message == ' ' && message[1] == NULL) ?
+- message : "<None>");
+- #endif
+-
+- vim_snprintf(cbuf, sizeof(cbuf), "sign jump %d file=%s", markId, filename);
+- coloncmd(cbuf, TRUE);
+- if (message != NULL && *message != NUL)
+- gui_mch_set_footer((char_u *)message);
+- }
+-
+- void
+- workshop_delete_mark(
+- char *filename,
+- int markId)
+- {
+- char cbuf[BUFSIZ]; /* command buffer */
+-
+- /* Delete mark */
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_delete_mark(%s, %d (id))\n",
+- filename, markId);
+- #endif
+-
+- vim_snprintf(cbuf, sizeof(cbuf),
+- "sign unplace %d file=%s", markId, filename);
+- coloncmd(cbuf, TRUE);
+- }
+-
+- int
+- workshop_get_mark_lineno(
+- char *filename,
+- int markId)
+- {
+- buf_T *buf; /* buffer containing filename */
+- int lineno; /* line number of filename in buf */
+-
+- /* Get mark line number */
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_get_mark_lineno(%s, %d)\n",
+- filename, markId);
+- #endif
+-
+- lineno = 0;
+- buf = buflist_findname((char_u *)filename);
+- if (buf != NULL)
+- lineno = buf_findsign(buf, markId, NULL);
+-
+- return lineno;
+- }
+-
+-
+- /*
+- * Are there any moved marks? If so, call workshop_move_mark on
+- * each of them now. This is how eserve can find out if for example
+- * breakpoints have moved when a program has been recompiled and
+- * reloaded into dbx.
+- */
+- void
+- workshop_moved_marks(char *filename UNUSED)
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("XXXworkshop_moved_marks(%s)\n", filename);
+- #endif
+- }
+-
+- int
+- workshop_get_font_height(void)
+- {
+- XmFontList fontList; /* fontList made from gui.norm_font */
+- XmString str;
+- Dimension w;
+- Dimension h;
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_get_font_height()\n");
+- #endif
+-
+- /* Pick the proper signs for this font size */
+- fontList = gui_motif_create_fontlist((XFontStruct *)gui.norm_font);
+- h = 0;
+- if (fontList != NULL)
+- {
+- str = XmStringCreateLocalized("A");
+- XmStringExtent(fontList, str, &w, &h);
+- XmStringFree(str);
+- XmFontListFree(fontList);
+- }
+-
+- return (int)h;
+- }
+-
+- void
+- workshop_footer_message(
+- char *message,
+- int severity UNUSED) /* severity is currently unused */
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_footer_message(%s, %d)\n", message, severity);
+- #endif
+-
+- gui_mch_set_footer((char_u *) message);
+- }
+-
+- /*
+- * workshop_menu_begin() is passed the menu name. We determine its mnemonic
+- * here and store its name and priority.
+- */
+- void
+- workshop_menu_begin(
+- char *label)
+- {
+- vimmenu_T *menu; /* pointer to last menu */
+- int menuPriority = 0; /* priority of new menu */
+- char mnembuf[64]; /* store menubar mnemonics here */
+- char *name; /* label with a mnemonic */
+- char *p; /* used to find mnemonics */
+- int idx; /* index into mnembuf */
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_menu_begin()\n");
+- #endif
+-
+- /*
+- * Look through all existing (non-PopUp and non-Toolbar) menus
+- * and gather their mnemonics. Use this list to decide what
+- * mnemonic should be used for label.
+- */
+-
+- idx = 0;
+- mnembuf[idx++] = 'H'; /* H is mnemonic for Help */
+- for (menu = root_menu; menu != NULL; menu = menu->next)
+- {
+- if (menu_is_menubar(menu->name))
+- {
+- p = strchr((char *)menu->name, '&');
+- if (p != NULL)
+- mnembuf[idx++] = *++p;
+- }
+- if (menu->next != NULL
+- && strcmp((char *) menu->next->dname, "Help") == 0)
+- {
+- menuPriority = menu->priority + 10;
+- break;
+- }
+- }
+- mnembuf[idx++] = NUL;
+- name = addUniqueMnemonic(mnembuf, label);
+-
+- vim_snprintf(curMenuName, sizeof(curMenuName), "%s", name);
+- sprintf(curMenuPriority, "%d.0", menuPriority);
+- }
+-
+- /*
+- * Append the name and priority to strings to be used in vim menu commands.
+- */
+- void
+- workshop_submenu_begin(
+- char *label)
+- {
+- #ifdef WSDEBUG_TRACE
+- if (ws_debug && ws_dlevel & WS_TRACE
+- && strncmp(curMenuName, "ToolBar", 7) != 0)
+- wstrace("workshop_submenu_begin(%s)\n", label);
+- #endif
+-
+- strcat(curMenuName, ".");
+- strcat(curMenuName, fixup(label));
+-
+- updatePriority(True);
+- }
+-
+- /*
+- * Remove the submenu name and priority from curMenu*.
+- */
+-
+- void
+- workshop_submenu_end(void)
+- {
+- char *p;
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)
+- && strncmp(curMenuName, "ToolBar", 7) != 0)
+- wstrace("workshop_submenu_end()\n");
+- #endif
+-
+- p = strrchr(curMenuPriority, '.');
+- ASSERT(p != NULL);
+- *p = NUL;
+-
+- p = strrchr(curMenuName, '.');
+- ASSERT(p != NULL);
+- *p = NUL;
+- }
+-
+- /*
+- * This is where menus are really made. Each item will generate an amenu vim
+- * command. The globals curMenuName and curMenuPriority contain the name and
+- * priority of the parent menu tree.
+- */
+- void
+- workshop_menu_item(
+- char *label,
+- char *verb,
+- char *accelerator UNUSED,
+- char *acceleratorText,
+- char *name UNUSED,
+- char *filepos UNUSED,
+- char *sensitive)
+- {
+- char cbuf[BUFSIZ];
+- char namebuf[BUFSIZ];
+- char accText[BUFSIZ];
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE)
+- && strncmp(curMenuName, "ToolBar", 7) != 0)
+- {
+- if (ws_dlevel & WS_TRACE_VERBOSE)
+- wsdebug("workshop_menu_item(\n"
+- "\tlabel = \"%s\",\n"
+- "\tverb = %s,\n"
+- "\taccelerator = %s,\n"
+- "\tacceleratorText = \"%s\",\n"
+- "\tname = %s,\n"
+- "\tfilepos = %s,\n"
+- "\tsensitive = %s)\n",
+- label && *label ? label : "<None>",
+- verb && *verb ? verb : "<None>",
+- accelerator && *accelerator ?
+- accelerator : "<None>",
+- acceleratorText && *acceleratorText ?
+- acceleratorText : "<None>",
+- name && *name ? name : "<None>",
+- filepos && *filepos ? filepos : "<None>",
+- sensitive);
+- else if (ws_dlevel & WS_TRACE)
+- wstrace("workshop_menu_item(\"%s\", %s)\n",
+- label && *label ? label : "<None>",
+- verb && *verb ? verb : "<None>", sensitive);
+- }
+- #endif
+- #ifdef WSDEBUG_SENSE
+- if (ws_debug)
+- wstrace("menu: %-21.20s%-21.20s(%s)\n", label, verb,
+- *sensitive == '1' ? "Sensitive" : "Insensitive");
+- #endif
+-
+- if (acceleratorText != NULL)
+- vim_snprintf(accText, sizeof(accText), "<Tab>%s", acceleratorText);
+- else
+- accText[0] = NUL;
+- updatePriority(False);
+- vim_snprintf(namebuf, sizeof(namebuf), "%s.%s", curMenuName, fixup(label));
+- vim_snprintf(cbuf, sizeof(cbuf), "amenu %s %s%s\t:wsverb %s<CR>",
+- curMenuPriority, namebuf, accText, verb);
+-
+- coloncmd(cbuf, TRUE);
+- addMenu(namebuf, fixAccelText(acceleratorText), verb);
+-
+- if (*sensitive == '0')
+- {
+- vim_snprintf(cbuf, sizeof(cbuf), "amenu disable %s", namebuf);
+- coloncmd(cbuf, TRUE);
+- }
+- }
+-
+- /*
+- * This function is called when a complete WorkShop menu description has been
+- * sent over from eserve. We do some menu cleanup.
+- */
+-
+- void
+- workshop_menu_end(void)
+- {
+- Boolean using_tearoff; /* set per current option setting */
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_menu_end()\n");
+- #endif
+-
+- using_tearoff = vim_strchr(p_go, GO_TEAROFF) != NULL;
+- gui_mch_toggle_tearoffs(using_tearoff);
+- }
+-
+- void
+- workshop_toolbar_begin(void)
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_toolbar_begin()\n");
+- #endif
+-
+- coloncmd("aunmenu ToolBar", True);
+- tbpri = 10;
+- }
+-
+- void
+- workshop_toolbar_end(void)
+- {
+- char_u buf[64];
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- {
+- wstrace("workshop_toolbar_end()\n");
+- }
+- #endif
+-
+- /*
+- * Turn on ToolBar.
+- */
+- STRCPY(buf, p_go);
+- if (vim_strchr(p_go, 'T') == NULL)
+- {
+- STRCAT(buf, "T");
+- set_option_value((char_u *)"go", 0L, buf, 0);
+- }
+- workshopInitDone = True;
+- }
+-
+- void
+- workshop_toolbar_button(
+- char *label,
+- char *verb,
+- char *senseVerb UNUSED,
+- char *filepos UNUSED,
+- char *help,
+- char *sense,
+- char *file,
+- char *left)
+- {
+- char cbuf[BUFSIZ + MAXPATHLEN];
+- char namebuf[BUFSIZ];
+- static int tbid = 1;
+- char_u *p;
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE))
+- wsdebug("workshop_toolbar_button(\"%s\", %s, %s,\n"
+- "\t%s, \"%s\", %s,\n\t\"%s\",\n\t<%s>)\n",
+- label && *label ? label : "<None>",
+- verb && *verb ? verb : "<None>",
+- senseVerb && *senseVerb ? senseVerb : "<None>",
+- filepos && *filepos ? filepos : "<None>",
+- help && *help ? help : "<None>",
+- sense && *sense ? sense : "<None>",
+- file && *file ? file : "<None>",
+- left && *left ? left : "<None>");
+- else if (WSDLEVEL(WS_TRACE))
+- wstrace("workshop_toolbar_button(\"%s\", %s)\n",
+- label && *label ? label : "<None>",
+- verb && *verb ? verb : "<None>");
+- #endif
+- #ifdef WSDEBUG_SENSE
+- if (ws_debug)
+- wsdebug("button: %-21.20s%-21.20s(%s)\n", label, verb,
+- *sense == '1' ? "Sensitive" : "Insensitive");
+- #endif
+-
+- if (left && *left && atoi(left) > 0)
+- {
+- /* Add a separator (but pass the width passed after the ':') */
+- sprintf(cbuf, "amenu 1.%d ToolBar.-sep%d:%s- <nul>",
+- tbpri - 5, tbid++, left);
+-
+- coloncmd(cbuf, True);
+- }
+-
+- p = vim_strsave_escaped((char_u *)label, (char_u *)"\\. ");
+- vim_snprintf(namebuf, sizeof(namebuf), "ToolBar.%s", p);
+- vim_free(p);
+- STRCPY(cbuf, "amenu <silent> ");
+- if (file != NULL && *file != NUL)
+- {
+- p = vim_strsave_escaped((char_u *)file, (char_u *)" ");
+- vim_snprintf_add(cbuf, sizeof(cbuf), "icon=%s ", p);
+- vim_free(p);
+- }
+- vim_snprintf_add(cbuf, sizeof(cbuf),"1.%d %s :wsverb %s<CR>",
+- tbpri, namebuf, verb);
+-
+- /* Define the menu item */
+- coloncmd(cbuf, True);
+-
+- if (*sense == '0')
+- {
+- /* If menu isn't sensitive at startup... */
+- vim_snprintf(cbuf, sizeof(cbuf), "amenu disable %s", namebuf);
+- coloncmd(cbuf, True);
+- }
+-
+- if (help && *help)
+- {
+- /* Do the tooltip */
+- vim_snprintf(cbuf, sizeof(cbuf), "tmenu %s %s", namebuf, help);
+- coloncmd(cbuf, True);
+- }
+-
+- addMenu(namebuf, NULL, verb);
+- tbpri += 10;
+- }
+-
+- void
+- workshop_frame_sensitivities(
+- VerbSense *vs) /* list of verbs to (de)sensitize */
+- {
+- VerbSense *vp; /* iterate through vs */
+- char *menu_name; /* used in menu lookup */
+- int cnt; /* count of verbs to skip */
+- int len; /* length of nonvariant part of command */
+- char cbuf[4096];
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE) || WSDLEVEL(4))
+- {
+- wsdebug("workshop_frame_sensitivities(\n");
+- for (vp = vs; vp->verb != NULL; vp++)
+- wsdebug("\t%-25s%d\n", vp->verb, vp->sense);
+- wsdebug(")\n");
+- }
+- else if (WSDLEVEL(WS_TRACE))
+- wstrace("workshop_frame_sensitivities()\n");
+- #endif
+- #ifdef WSDEBUG_SENSE
+- if (ws_debug)
+- for (vp = vs; vp->verb != NULL; vp++)
+- wsdebug("change: %-21.20s%-21.20s(%s)\n",
+- "", vp->verb, vp->sense == 1 ?
+- "Sensitive" : "Insensitive");
+- #endif
+-
+- /*
+- * Look for all matching menu entries for the verb. There may be more
+- * than one if the verb has both a menu and toolbar entry.
+- */
+- for (vp = vs; vp->verb != NULL; vp++)
+- {
+- cnt = 0;
+- strcpy(cbuf, "amenu");
+- strcat(cbuf, " ");
+- strcat(cbuf, vp->sense ? "enable" : "disable");
+- strcat(cbuf, " ");
+- len = strlen(cbuf);
+- while ((menu_name = lookupVerb(vp->verb, cnt++)) != NULL)
+- {
+- strcpy(&cbuf[len], menu_name);
+- coloncmd(cbuf, FALSE);
+- }
+- }
+- gui_update_menus(0);
+- gui_mch_flush();
+- }
+-
+- void
+- workshop_set_option(
+- char *option, /* name of a supported option */
+- char *value) /* value to set option to */
+- {
+- char cbuf[BUFSIZ]; /* command buffer */
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- {
+- wstrace("workshop_set_option(%s, %s)\n", option, value);
+- }
+- #endif
+-
+- cbuf[0] = NUL;
+- switch (*option) /* switch on 1st letter */
+- {
+- case 's':
+- if (strcmp(option, "syntax") == 0)
+- vim_snprintf(cbuf, sizeof(cbuf), "syntax %s", value);
+- else if (strcmp(option, "savefiles") == 0)
+- {
+- /* XXX - Not yet implemented */
+- }
+- break;
+-
+- case 'l':
+- if (strcmp(option, "lineno") == 0)
+- sprintf(cbuf, "set %snu",
+- (strcmp(value, "on") == 0) ? "" : "no");
+- break;
+-
+- case 'p':
+- if (strcmp(option, "parentheses") == 0)
+- sprintf(cbuf, "set %ssm",
+- (strcmp(value, "on") == 0) ? "" : "no");
+- break;
+-
+- case 'w':
+- /* this option is set by a direct call */
+- #ifdef WSDEBUG
+- wsdebug("workshop_set_option: "
+- "Got unexpected workshopkeys option");
+- #endif
+- break;
+-
+- case 'b': /* these options are set from direct calls */
+- if (option[7] == NUL && strcmp(option, "balloon") == 0)
+- {
+- #ifdef WSDEBUG
+- /* set by direct call to workshop_balloon_mode */
+- wsdebug("workshop_set_option: "
+- "Got unexpected ballooneval option");
+- #endif
+- }
+- else if (strcmp(option, "balloondelay") == 0)
+- {
+- #ifdef WSDEBUG
+- /* set by direct call to workshop_balloon_delay */
+- wsdebug("workshop_set_option: "
+- "Got unexpected balloondelay option");
+- #endif
+- }
+- break;
+- }
+- if (cbuf[0] != NUL)
+- coloncmd(cbuf, TRUE);
+- }
+-
+-
+- void
+- workshop_balloon_mode(
+- Boolean on)
+- {
+- char cbuf[BUFSIZ]; /* command buffer */
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_balloon_mode(%s)\n", on ? "True" : "False");
+- #endif
+-
+- sprintf(cbuf, "set %sbeval", on ? "" : "no");
+- coloncmd(cbuf, TRUE);
+- }
+-
+-
+- void
+- workshop_balloon_delay(
+- int delay)
+- {
+- char cbuf[BUFSIZ]; /* command buffer */
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_balloon_delay(%d)\n", delay);
+- #endif
+-
+- sprintf(cbuf, "set bdlay=%d", delay);
+- coloncmd(cbuf, TRUE);
+- }
+-
+-
+- void
+- workshop_show_balloon_tip(
+- char *tip)
+- {
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_show_balloon_tip(%s)\n", tip);
+- #endif
+-
+- if (balloonEval != NULL)
+- gui_mch_post_balloon(balloonEval, (char_u *)tip);
+- }
+-
+-
+- void
+- workshop_hotkeys(
+- Boolean on)
+- {
+- char cbuf[BUFSIZ]; /* command buffer */
+- MenuMap *mp; /* iterate over menuMap entries */
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_hotkeys(%s)\n", on ? "True" : "False");
+- #endif
+-
+- workshopHotKeysEnabled = on;
+- if (workshopHotKeysEnabled)
+- for (mp = menuMap; mp < &menuMap[menuMapSize]; mp++)
+- {
+- if (mp->accel != NULL)
+- {
+- vim_snprintf(cbuf, sizeof(cbuf),
+- "map %s :wsverb %s<CR>", mp->accel, mp->verb);
+- coloncmd(cbuf, TRUE);
+- }
+- }
+- else
+- for (mp = menuMap; mp < &menuMap[menuMapSize]; mp++)
+- {
+- if (mp->accel != NULL)
+- {
+- vim_snprintf(cbuf, sizeof(cbuf), "unmap %s", mp->accel);
+- coloncmd(cbuf, TRUE);
+- }
+- }
+- }
+-
+- /*
+- * A button in the toolbar has been pushed.
+- */
+- int
+- workshop_get_positions(
+- void *clientData UNUSED,
+- char **filename, /* output data */
+- int *curLine, /* output data */
+- int *curCol, /* output data */
+- int *selStartLine, /* output data */
+- int *selStartCol, /* output data */
+- int *selEndLine, /* output data */
+- int *selEndCol, /* output data */
+- int *selLength, /* output data */
+- char **selection) /* output data */
+- {
+- static char ffname[MAXPATHLEN];
+-
+- #ifdef WSDEBUG_TRACE
+- if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
+- wstrace("workshop_get_positions(%#x, \"%s\", ...)\n",
+- clientData, (curbuf && curbuf->b_sfname != NULL)
+- ? (char *)curbuf->b_sfname : "<None>");
+- #endif
+-
+- if (curbuf->b_ffname == NULL)
+- ffname[0] = NUL;
+- else
+- /* copy so nobody can change b_ffname */
+- strcpy(ffname, (char *) curbuf->b_ffname);
+- *filename = ffname;
+- *curLine = curwin->w_cursor.lnum;
+- *curCol = curwin->w_cursor.col;
+-
+- if (curbuf->b_visual.vi_mode == 'v' &&
+- EQUAL_POS(curwin->w_cursor, curbuf->b_visual.vi_end))
+- {
+- *selStartLine = curbuf->b_visual.vi_start.lnum;
+- *selStartCol = curbuf->b_visual.vi_start.col;
+- *selEndLine = curbuf->b_visual.vi_end.lnum;
+- *selEndCol = curbuf->b_visual.vi_end.col;
+- *selection = get_selection(curbuf);
+- if (*selection)
+- *selLength = strlen(*selection);
+- else
+- *selLength = 0;
+- }
+- else
+- {
+- *selStartLine = *selEndLine = -1;
+- *selStartCol = *selEndCol = -1;
+- *selLength = 0;
+- *selection = "";
+- }
+-
+- return True;
+- }
+-
+-
+-
+- /************************************************************************
+- * Utility functions
+- ************************************************************************/
+-
+- static char *
+- get_selection(
+- buf_T *buf) /* buffer whose selection we want */
+- {
+- pos_T *start; /* start of the selection */
+- pos_T *end; /* end of the selection */
+- char *lp; /* pointer to actual line data */
+- int llen; /* length of actual line data */
+- char *sp; /* pointer to selection buffer */
+- int slen; /* string length in selection buffer */
+- int size; /* size of selection buffer */
+- char *new_sp; /* temp pointer to new sp */
+- int lnum; /* line number we are appending */
+-
+- if (buf->b_visual.vi_mode == 'v')
+- {
+- start = &buf->b_visual.vi_start;
+- end = &buf->b_visual.vi_end;
+- if (start->lnum == end->lnum)
+- {
+- /* selection is all on one line */
+- lp = (char *) ml_get_pos(start);
+- llen = end->col - start->col + 1;
+- sp = (char *) malloc(llen + 1);
+- if (sp != NULL)
+- {
+- strncpy(sp, lp, llen);
+- sp[llen] = NUL;
+- }
+- }
+- else
+- {
+- /* multi-line selection */
+- lp = (char *) ml_get_pos(start);
+- llen = strlen(lp);
+- sp = (char *) malloc(BUFSIZ + llen);
+- if (sp != NULL)
+- {
+- size = BUFSIZ + llen;
+- strcpy(sp, lp);
+- sp[llen] = '\n';
+- slen = llen + 1;
+-
+- lnum = start->lnum + 1;
+- while (lnum < end->lnum)
+- sp = append_selection(lnum++, sp, &size, &slen);
+-
+- lp = (char *) ml_get(end->lnum);
+- llen = end->col + 1;
+- if ((slen + llen) >= size)
+- {
+- new_sp = (char *)
+- realloc(sp, slen + llen + 1);
+- if (new_sp != NULL)
+- {
+- size += llen + 1;
+- sp = new_sp;
+- }
+- }
+- if ((slen + llen) < size)
+- {
+- strncpy(&sp[slen], lp, llen);
+- sp[slen + llen] = NUL;
+- }
+-
+- }
+- }
+- }
+- else
+- sp = NULL;
+-
+- return sp;
+- }
+-
+- static char *
+- append_selection(
+- int lnum, /* line number to append */
+- char *sp, /* pointer to selection buffer */
+- int *size, /* ptr to size of sp */
+- int *slen) /* ptr to length of selection string */
+- {
+- char *lp; /* line of data from buffer */
+- int llen; /* strlen of lp */
+- char *new_sp; /* temp pointer to new sp */
+-
+- lp = (char *)ml_get((linenr_T)lnum);
+- llen = strlen(lp);
+-
+- if ((*slen + llen) <= *size)
+- {
+- new_sp = (char *) realloc((void *) sp, BUFSIZ + *slen + llen);
+- if (*new_sp != NUL)
+- {
+- *size = BUFSIZ + *slen + llen;
+- sp = new_sp;
+- }
+- }
+- if ((*slen + llen) > *size)
+- {
+- strcat(&sp[*slen], lp);
+- *slen += llen;
+- sp[*slen++] = '\n';
+- }
+-
+- return sp;
+- }
+-
+-
+- static void
+- load_buffer_by_name(
+- char *filename, /* the file to load */
+- int lnum) /* an optional line number (or 0) */
+- {
+- char lnumbuf[16]; /* make line number option for :e */
+- char cbuf[BUFSIZ]; /* command buffer */
+-
+- if (lnum > 0)
+- sprintf(lnumbuf, "+%d", lnum);
+- else
+- lnumbuf[0] = NUL;
+-
+- vim_snprintf(cbuf, sizeof(cbuf), "e %s %s", lnumbuf, filename);
+- coloncmd(cbuf, False);
+- }
+-
+-
+- static void
+- load_window(
+- char *filename, /* filename to load */
+- int lnum) /* linenumber to go to */
+- {
+- buf_T *buf; /* buffer filename is stored in */
+- win_T *win; /* window filenme is displayed in */
+-
+- /*
+- * Make sure filename is displayed and is the current window.
+- */
+-
+- buf = buflist_findname((char_u *)filename);
+- if (buf == NULL || (win = get_window(buf)) == NULL)
+- {
+- /* No buffer or buffer is not in current window */
+- /* wsdebug("load_window: load_buffer_by_name(\"%s\", %d)\n",
+- filename, lnum); */
+- load_buffer_by_name(filename, lnum);
+- }
+- else
+- {
+- /* buf is in a window */
+- if (win != curwin)
+- {
+- win_enter(win, False);
+- /* wsdebug("load_window: window enter %s\n",
+- win->w_buffer->b_sfname); */
+- }
+- if (lnum > 0 && win->w_cursor.lnum != lnum)
+- {
+- warp_to_pc(lnum);
+- /* wsdebug("load_window: warp to %s[%d]\n",
+- win->w_buffer->b_sfname, lnum); */
+- }
+- }
+- out_flush();
+- }
+-
+-
+-
+- static void
+- warp_to_pc(
+- int lnum) /* line number to warp to */
+- {
+- char lbuf[256]; /* build line command here */
+-
+- if (lnum > 0)
+- {
+- if (State & INSERT)
+- add_to_input_buf((char_u *) "\033", 1);
+- if (isShowing(lnum))
+- sprintf(lbuf, "%dG", lnum);
+- else
+- sprintf(lbuf, "%dz.", lnum);
+- add_to_input_buf((char_u *) lbuf, strlen(lbuf));
+- }
+- }
+-
+- static Boolean
+- isShowing(
+- int lnum) /* tell if line number is showing */
+- {
+- return lnum >= curwin->w_topline && lnum < curwin->w_botline;
+- }
+-
+-
+-
+- static win_T *
+- get_window(
+- buf_T *buf) /* buffer to find window for */
+- {
+- win_T *wp = NULL; /* window filename is in */
+-
+- FOR_ALL_WINDOWS(wp)
+- if (buf == wp->w_buffer)
+- break;
+- return wp;
+- }
+-
+-
+- static void
+- updatePriority(
+- Boolean subMenu) /* if True then start new submenu pri */
+- {
+- int pri; /* priority of this menu/item */
+- char *p;
+-
+- p = strrchr(curMenuPriority, '.');
+- ASSERT(p != NULL);
+- *p++ = NUL;
+-
+- pri = atoi(p) + 10; /* our new priority */
+-
+- if (subMenu)
+- vim_snprintf(curMenuPriority, sizeof(curMenuPriority),
+- "%s.%d.0", curMenuPriority, pri);
+- else
+- vim_snprintf(curMenuPriority, sizeof(curMenuPriority),
+- "%s.%d", curMenuPriority, pri);
+- }
+-
+- static char *
+- addUniqueMnemonic(
+- char *mnemonics, /* currently used mnemonics */
+- char *label) /* label of menu needing mnemonic */
+- {
+- static char name[BUFSIZ]; /* buffer for the updated name */
+- char *p; /* pointer into label */
+- char *found; /* pointer to possible mnemonic */
+-
+- found = NULL;
+- for (p = label; *p != NUL; p++)
+- if (strchr(mnemonics, *p) == 0)
+- if (found == NULL || (isupper((int)*p) && islower((int)*found)))
+- found = p;
+-
+- if (found != NULL)
+- {
+- strncpy(name, label, (found - label));
+- strcat(name, "&");
+- strcat(name, found);
+- }
+- else
+- strcpy(name, label);
+-
+- return name;
+- }
+-
+- /*
+- * Some characters in a menu name must be escaped in vim. Since this is vim
+- * specific, it must be done on this side.
+- */
+- static char *
+- fixup(
+- char *label)
+- {
+- static char buf[BUFSIZ];
+- char *bp; /* pointer into buf */
+- char *lp; /* pointer into label */
+-
+- lp = label;
+- bp = buf;
+- while (*lp != NUL)
+- {
+- if (*lp == ' ' || *lp == '.')
+- *bp++ = '\\';
+- *bp++ = *lp++;
+- }
+- *bp = NUL;
+-
+- return buf;
+- }
+-
+-
+- #ifdef NOHANDS_SUPPORT_FUNCTIONS
+-
+- /* For the NoHands test suite */
+-
+- char *
+- workshop_test_getcurrentfile(void)
+- {
+- char *filename, *selection;
+- int curLine, curCol, selStartLine, selStartCol, selEndLine;
+- int selEndCol, selLength;
+-
+- if (workshop_get_positions(
+- NULL, &filename, &curLine, &curCol, &selStartLine,
+- &selStartCol, &selEndLine, &selEndCol, &selLength,
+- &selection))
+- return filename;
+- else
+- return NULL;
+- }
+-
+- int
+- workshop_test_getcursorrow(void)
+- {
+- return 0;
+- }
+-
+- int
+- workshop_test_getcursorcol(void)
+- {
+- char *filename, *selection;
+- int curLine, curCol, selStartLine, selStartCol, selEndLine;
+- int selEndCol, selLength;
+-
+- if (workshop_get_positions(
+- NULL, &filename, &curLine, &curCol, &selStartLine,
+- &selStartCol, &selEndLine, &selEndCol, &selLength,
+- &selection))
+- return curCol;
+- else
+- return -1;
+- }
+-
+- char *
+- workshop_test_getcursorrowtext(void)
+- {
+- return NULL;
+- }
+-
+- char *
+- workshop_test_getselectedtext(void)
+- {
+- char *filename, *selection;
+- int curLine, curCol, selStartLine, selStartCol, selEndLine;
+- int selEndCol, selLength;
+-
+- if (workshop_get_positions(
+- NULL, &filename, &curLine, &curCol, &selStartLine,
+- &selStartCol, &selEndLine, &selEndCol, &selLength,
+- &selection))
+- return selection;
+- else
+- return NULL;
+- }
+-
+- void
+- workshop_save_sensitivity(char *filename UNUSED)
+- {
+- }
+-
+- #endif
+-
+- static char *
+- fixAccelText(
+- char *ap) /* original acceleratorText */
+- {
+- char buf[256]; /* build in temp buffer */
+- char *shift; /* shift string of "" */
+-
+- if (ap == NULL)
+- return NULL;
+-
+- /* If the accelerator is shifted use the vim form */
+- if (strncmp("Shift+", ap, 6) == 0)
+- {
+- shift = "S-";
+- ap += 6;
+- }
+- else
+- shift = "";
+-
+- if (*ap == 'F' && atoi(&ap[1]) > 0)
+- {
+- vim_snprintf(buf, sizeof(buf), "<%s%s>", shift, ap);
+- return strdup(buf);
+- }
+- else
+- return NULL;
+- }
+-
+- #ifdef FEAT_BEVAL_GUI
+- void
+- workshop_beval_cb(
+- BalloonEval *beval,
+- int state)
+- {
+- win_T *wp;
+- char_u *text;
+- int type;
+- linenr_T lnum;
+- int col;
+- int idx;
+- char buf[MAXPATHLEN * 2];
+- static int serialNo = -1;
+-
+- if (!p_beval)
+- return;
+-
+- if (get_beval_info(beval, FALSE, &wp, &lnum, &text, &col) == OK)
+- {
+- if (text && text[0])
+- {
+- /* Send debugger request */
+- if (strlen((char *) text) > (MAXPATHLEN/2))
+- {
+- /*
+- * The user has probably selected the entire
+- * buffer or something like that - don't attempt
+- * to evaluate it
+- */
+- return;
+- }
+-
+- /*
+- * WorkShop expects the col to be a character index, not
+- * a column number. Compute the index from col. Also set
+- * line to 0 because thats what dbx expects.
+- */
+- #ifdef FEAT_VARTABS
+- idx = computeIndex(col, text, beval->ts, beval->vts);
+- #else
+- idx = computeIndex(col, text, beval->ts, 0);
+- #endif
+- if (idx > 0)
+- {
+- lnum = 0;
+-
+- /*
+- * If successful, it will respond with a balloon cmd.
+- */
+- if (state & ControlMask)
+- /* Evaluate *(expression) */
+- type = (int)GPLineEval_INDIRECT;
+- else if (state & ShiftMask)
+- /* Evaluate type(expression) */
+- type = (int)GPLineEval_TYPE;
+- else
+- /* Evaluate value(expression) */
+- type = (int)GPLineEval_EVALUATE;
+-
+- /* Send request to dbx */
+- vim_snprintf(buf, sizeof(buf), "toolVerb debug.balloonEval "
+- "%s %ld,0 %d,0 %d,%d %ld %s\n",
+- (char *)wp->w_buffer->b_ffname,
+- (long)lnum, idx, type, serialNo++,
+- (long)strlen((char *)text), (char *)text);
+- balloonEval = beval;
+- workshop_send_message(buf);
+- }
+- }
+- }
+- }
+-
+- static int
+- computeIndex(
+- int wantedCol,
+- char_u *line,
+- int ts,
+- int *vts UNUSED)
+- {
+- int col = 0;
+- int idx = 0;
+-
+- while (line[idx])
+- {
+- if (line[idx] == '\t')
+- #ifdef FEAT_VARTABS
+- col += tabstop_padding(col, ts, vts);
+- #else
+- col += ts - (col % ts);
+- #endif
+- else
+- col++;
+- idx++;
+- if (col >= wantedCol)
+- return idx;
+- }
+-
+- return -1;
+- }
+- #endif
+-
+- static void
+- addMenu(
+- char *menu, /* menu name */
+- char *accel, /* accelerator text (optional) */
+- char *verb) /* WorkShop action-verb */
+- {
+- MenuMap *newMap;
+- char cbuf[BUFSIZ];
+-
+- if (menuMapSize >= menuMapMax)
+- {
+- newMap = realloc(menuMap,
+- sizeof(MenuMap) * (menuMapMax + MENU_INC));
+- if (newMap != NULL)
+- {
+- menuMap = newMap;
+- menuMapMax += MENU_INC;
+- }
+- }
+- if (menuMapSize < menuMapMax)
+- {
+- menuMap[menuMapSize].name = strdup(menu);
+- menuMap[menuMapSize].accel = accel && *accel ? strdup(accel) : NULL;
+- menuMap[menuMapSize++].verb = strdup(verb);
+- if (accel && workshopHotKeysEnabled)
+- {
+- vim_snprintf(cbuf, sizeof(cbuf),
+- "map %s :wsverb %s<CR>", accel, verb);
+- coloncmd(cbuf, TRUE);
+- }
+- }
+- }
+-
+- static char *
+- nameStrip(
+- char *raw) /* menu name, possibly with & chars */
+- {
+- static char buf[BUFSIZ]; /* build stripped name here */
+- char *bp = buf;
+-
+- while (*raw)
+- {
+- if (*raw != '&')
+- *bp++ = *raw;
+- raw++;
+- }
+- *bp = NUL;
+- return buf;
+- }
+-
+-
+- static char *
+- lookupVerb(
+- char *verb,
+- int skip) /* number of matches to skip */
+- {
+- int i; /* loop iterator */
+-
+- for (i = 0; i < menuMapSize; i++)
+- if (strcmp(menuMap[i].verb, verb) == 0 && skip-- == 0)
+- return nameStrip(menuMap[i].name);
+-
+- return NULL;
+- }
+-
+-
+- static void
+- coloncmd(
+- char *cmd, /* the command to print */
+- Boolean force) /* force cursor update */
+- {
+- char_u *cpo_save = p_cpo;
+-
+- #ifdef WSDEBUG
+- if (WSDLEVEL(WS_TRACE_COLONCMD))
+- wsdebug("Cmd: %s\n", cmd);
+- #endif
+-
+- p_cpo = empty_option;
+-
+- ALT_INPUT_LOCK_ON;
+- do_cmdline_cmd((char_u *)cmd);
+- ALT_INPUT_LOCK_OFF;
+-
+- p_cpo = cpo_save;
+-
+- if (force)
+- gui_update_screen();
+- }
+-
+- /*
+- * setDollarVim - Given the run directory, search for the vim install
+- * directory and set $VIM.
+- *
+- * We can be running out of SUNWspro/bin or out of
+- * SUNWspro/contrib/contrib6/vim5.6/bin so we check
+- * relative to both of these directories.
+- */
+- static void
+- setDollarVim(
+- char *rundir)
+- {
+- char buf[MAXPATHLEN];
+- char *cp;
+-
+- /*
+- * First case: Running from <install-dir>/SUNWspro/bin
+- */
+- strcpy(buf, rundir);
+- strcat(buf, "/../contrib/contrib6/vim" VIM_VERSION_SHORT "/share/vim/"
+- VIM_VERSION_NODOT "/syntax/syntax.vim");
+- if (access(buf, R_OK) == 0)
+- {
+- strcpy(buf, "SPRO_WSDIR=");
+- strcat(buf, rundir);
+- cp = strrchr(buf, '/');
+- if (cp != NULL)
+- strcpy(cp, "/WS6U2");
+- putenv(strdup(buf));
+-
+- strcpy(buf, "VIM=");
+- strcat(buf, rundir);
+- strcat(buf, "/../contrib/contrib6/vim" VIM_VERSION_SHORT "/share/vim/"
+- VIM_VERSION_NODOT);
+- putenv(strdup(buf));
+- return;
+- }
+-
+- /*
+- * Second case: Probably running from
+- * <install-dir>/SUNWspro/contrib/contrib6/vim5.6/bin
+- */
+- strcpy(buf, rundir);
+- strcat(buf, "/../../../contrib/contrib6/vim" VIM_VERSION_SHORT
+- "/share/vim/" VIM_VERSION_NODOT "/syntax/syntax.vim");
+- if (access(buf, R_OK) == 0)
+- {
+- strcpy(buf, "SPRO_WSDIR=");
+- strcat(buf, rundir);
+- cp = strrchr(buf, '/');
+- if (cp != NULL)
+- strcpy(cp, "../../../../WS6U2");
+- putenv(strdup(buf));
+-
+- strcpy(buf, "VIM=");
+- strcat(buf, rundir);
+- strcat(buf, "/../../../contrib/contrib6/vim" VIM_VERSION_SHORT
+- "/share/vim/" VIM_VERSION_NODOT);
+- putenv(strdup(buf));
+- return;
+- }
+- }
+-
+- /*
+- * findYourself - Find the directory we are running from. This is used to
+- * set $VIM. We need to set this because users can install
+- * the package in a different directory than the compiled
+- * directory. This is a Sun Visual WorkShop requirement!
+- *
+- * Note: We override a user's $VIM because it won't have the
+- * WorkShop specific files. S/he may not like this but it's
+- * better than getting the wrong files (especially as the
+- * user is likely to have $VIM set to 5.4 or later).
+- */
+- void
+- findYourself(
+- char *argv0)
+- {
+- char *runpath = NULL;
+- char *path;
+- char *pathbuf;
+-
+- if (*argv0 == '/')
+- runpath = strdup(argv0);
+- else if (*argv0 == '.' || strchr(argv0, '/'))
+- {
+- runpath = (char *) malloc(MAXPATHLEN);
+- if (getcwd(runpath, MAXPATHLEN) == NULL)
+- runpath[0] = NUL;
+- strcat(runpath, "/");
+- strcat(runpath, argv0);
+- }
+- else
+- {
+- path = getenv("PATH");
+- if (path != NULL)
+- {
+- runpath = (char *) malloc(MAXPATHLEN);
+- pathbuf = strdup(path);
+- path = strtok(pathbuf, ":");
+- do
+- {
+- strcpy(runpath, path);
+- strcat(runpath, "/");
+- strcat(runpath, argv0);
+- if (access(runpath, X_OK) == 0)
+- break;
+- } while ((path = strtok(NULL, ":")) != NULL);
+- free(pathbuf);
+- }
+- }
+-
+- if (runpath != NULL)
+- {
+- char runbuf[MAXPATHLEN];
+-
+- /*
+- * We found the run directory. Now find the install dir.
+- */
+- (void)vim_FullName((char_u *)runpath, (char_u *)runbuf, MAXPATHLEN, 1);
+- path = strrchr(runbuf, '/');
+- if (path != NULL)
+- *path = NUL; /* remove the vim/gvim name */
+- path = strrchr(runbuf, '/');
+- if (path != NULL)
+- {
+- if (strncmp(path, "/bin", 4) == 0)
+- setDollarVim(runbuf);
+- else if (strncmp(path, "/src", 4) == 0)
+- {
+- *path = NUL; /* development tree */
+- setDollarVim(runbuf);
+- }
+- }
+- free(runpath);
+- }
+- }
+--- 0 ----
+*** ../vim-8.1.0762/src/workshop.h 2016-08-29 22:42:21.000000000 +0200
+--- src/workshop.h 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,28 ****
+- /* vi:set ts=8 sts=4 sw=4 noet:
+- *
+- * VIM - Vi IMproved by Bram Moolenaar
+- * Visual Workshop integration by Gordon Prieur
+- *
+- * Do ":help uganda" in Vim to read copying and usage conditions.
+- * Do ":help credits" in Vim to see a list of people who contributed.
+- */
+-
+- #if !defined(WORKSHOP_H) && defined(FEAT_SUN_WORKSHOP)
+- #define WORKSHOP_H
+-
+- #include <X11/Intrinsic.h>
+- #include <Xm/Xm.h>
+-
+- #include "integration.h"
+-
+- #ifdef WSDEBUG
+- # include "wsdebug.h"
+- #else
+- # ifndef ASSERT
+- # define ASSERT(c)
+- # endif
+- #endif
+-
+- extern int usingSunWorkShop; /* set if -ws flag is used */
+-
+- #endif
+--- 0 ----
+*** ../vim-8.1.0762/src/wsdebug.c 2016-09-25 21:41:24.000000000 +0200
+--- src/wsdebug.c 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,184 ****
+- /* vi:set ts=8 sw=8 noet:
+- *
+- * VIM - Vi IMproved by Bram Moolenaar
+- * Visual Workshop integration by Gordon Prieur
+- *
+- * 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.
+- */
+-
+- /*
+- * WorkShop Debugging Tools. What are these tools and why are they important?
+- * There are two main tools here. The first tool is a tool for delaying or
+- * stopping gvim during startup. The second tool is a protocol log tool.
+- *
+- * The startup delay tool is called wsdebug_wait(). This is very important for
+- * debugging startup problems because gvim will be started automatically from
+- * workshop and cannot be run directly from a debugger. The only way to debug
+- * a gvim started by workshop is by attaching a debugger to it. Without this
+- * tool all starup code will have completed before you can get the pid and
+- * attach.
+- *
+- * The second tool is a protocol log tool. The workshop editor server and gvim
+- * pass information back and forth during a workshop session. Sometimes it is
+- * very important to peruse this conversation in order to understand what is
+- * happening. The wsdebug_log_init() call sets up this protocol log tool and
+- * wsdebug() and wstrace() calls output the information to the log.
+- *
+- * This code must have WSDEBUG defined for it to be compiled into vim/gvim.
+- */
+-
+- #ifdef WSDEBUG
+-
+- #include "vim.h"
+-
+- FILE *ws_debug = NULL;
+- u_int ws_dlevel = 0; /* ws_debug verbosity level */
+-
+- void wsdebug(char *, ...);
+- void wstrace(char *, ...);
+-
+- static int lookup(char *);
+- #ifdef USE_WS_ERRORHANDLER
+- static int errorHandler(Display *, XErrorEvent *);
+- #endif
+-
+-
+- /*
+- * wsdebug_wait - This function can be used to delay or stop execution of vim.
+- * It's normally used to delay startup while attaching a
+- * debugger to a running process. Since workshop starts gvim
+- * from a background process this is the only way to debug
+- * startup problems.
+- */
+-
+- void wsdebug_wait(
+- u_int wait_flags, /* tells what to do */
+- char *wait_var, /* wait environment variable */
+- u_int wait_secs) /* how many seconds to wait */
+- {
+-
+- init_homedir(); /* not inited yet */
+- #ifdef USE_WDDUMP
+- WDDump(0, 0, 0);
+- #endif
+-
+- /* for debugging purposes only */
+- if (wait_flags & WT_ENV && wait_var && getenv(wait_var) != NULL) {
+- sleep(atoi(getenv(wait_var)));
+- } else if (wait_flags & WT_WAIT && lookup("~/.gvimwait")) {
+- sleep(wait_secs > 0 && wait_secs < 120 ? wait_secs : 20);
+- } else if (wait_flags & WT_STOP && lookup("~/.gvimstop")) {
+- int w = 1;
+- while (w) {
+- ;
+- }
+- }
+- } /* end wsdebug_wait */
+-
+-
+- void
+- wsdebug_log_init(
+- char *log_var, /* env var with log file */
+- char *level_var) /* env var with ws_debug level */
+- {
+- char *file; /* possible ws_debug output file */
+- char *cp; /* ws_dlevel pointer */
+-
+- if (log_var && (file = getenv(log_var)) != NULL)
+- {
+- char buf[BUFSIZ];
+-
+- vim_snprintf(buf, sizeof(buf), "date > %s", file);
+- system(buf);
+- ws_debug = fopen(file, "a");
+- if (level_var && (cp = getenv(level_var)) != NULL) {
+- ws_dlevel = strtoul(cp, NULL, 0);
+- } else {
+- ws_dlevel = WS_TRACE; /* default level */
+- }
+- #ifdef USE_WS_ERRORHANDLER
+- XSetErrorHandler(errorHandler);
+- #endif
+- }
+-
+- } /* end wsdebug_log_init */
+-
+-
+-
+-
+- void
+- wstrace(
+- char *fmt,
+- ...)
+- {
+- va_list ap;
+-
+- if (ws_debug!= NULL && (ws_dlevel & (WS_TRACE | WS_TRACE_VERBOSE))) {
+- va_start(ap, fmt);
+- vfprintf(ws_debug, fmt, ap);
+- va_end(ap);
+- fflush(ws_debug);
+- }
+-
+- } /* end wstrace */
+-
+-
+- void
+- wsdebug(
+- char *fmt,
+- ...)
+- {
+- va_list ap;
+-
+- if (ws_debug != NULL) {
+- va_start(ap, fmt);
+- vfprintf(ws_debug, fmt, ap);
+- va_end(ap);
+- fflush(ws_debug);
+- }
+-
+- } /* end wsdebug */
+-
+-
+- static int
+- lookup(
+- char *file)
+- {
+- char buf[BUFSIZ];
+-
+- expand_env((char_u *) file, (char_u *) buf, BUFSIZ);
+- return (access(buf, F_OK) == 0);
+-
+- } /* end lookup */
+-
+- #ifdef USE_WS_ERRORHANDLER
+- static int
+- errorHandler(
+- Display *dpy,
+- XErrorEvent *err)
+- {
+- char msg[256];
+- char buf[256];
+-
+- XGetErrorText(dpy, err->error_code, msg, sizeof(msg));
+- wsdebug("\n\nWSDEBUG Vim: X Error of failed request: %s\n", msg);
+-
+- sprintf(buf, "%d", err->request_code);
+- XGetErrorDatabaseText(dpy,
+- "XRequest", buf, "Unknown", msg, sizeof(msg));
+- wsdebug("\tMajor opcode of failed request: %d (%s)\n",
+- err->request_code, msg);
+- if (err->request_code > 128) {
+- wsdebug("\tMinor opcode of failed request: %d\n",
+- err->minor_code);
+- }
+-
+- return 0;
+- }
+- #endif
+-
+-
+-
+- #endif /* WSDEBUG */
+--- 0 ----
+*** ../vim-8.1.0762/src/wsdebug.h 2016-08-29 22:42:21.000000000 +0200
+--- src/wsdebug.h 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,81 ****
+- /* vi:set ts=8 sw=8 noet:
+- *
+- * VIM - Vi IMproved by Bram Moolenaar
+- * Visual Workshop integration by Gordon Prieur
+- *
+- * Do ":help uganda" in Vim to read copying and usage conditions.
+- * Do ":help credits" in Vim to see a list of people who contributed.
+- */
+-
+-
+- #ifndef WSDEBUG_H
+- #define WSDEBUG_H
+-
+- #ifdef WSDEBUG
+-
+- #ifndef ASSERT
+- #define ASSERT(c) \
+- if (!(c)) { \
+- fprintf(stderr, "Assertion failed: line %d, file %s\n", \
+- __LINE__, __FILE__); \
+- fflush(stderr); \
+- abort(); \
+- }
+- #endif
+-
+- #define WS_TRACE 0x00000001
+- #define WS_TRACE_VERBOSE 0x00000002
+- #define WS_TRACE_COLONCMD 0x00000004
+- #define WS_DEBUG_ALL 0xffffffff
+-
+- #define WSDLEVEL(flags) (ws_debug != NULL && (ws_dlevel & (flags)))
+-
+- #ifdef USE_WDDUMP
+- #include "wdump.h"
+- #endif
+-
+- #define WSDEBUG_TRACE 1
+- //#define WSDEBUG_SENSE 2
+-
+- typedef enum {
+- WT_ENV = 1, /* look for env var if set */
+- WT_WAIT, /* look for ~/.gvimwait if set */
+- WT_STOP /* look for ~/.gvimstop if set */
+- } WtWait;
+-
+-
+- void wsdebug(char *, ...);
+- void wstrace(char *, ...);
+-
+-
+- extern FILE *ws_debug;
+- extern u_int ws_dlevel; /* ws_debug verbosity level */
+-
+- # else /* not WSDEBUG */
+-
+- #ifndef ASSERT
+- # define ASSERT(c)
+- #endif
+-
+- /*
+- * The following 2 stubs are needed because a macro cannot be used because of
+- * the variable number of arguments.
+- */
+-
+- void
+- wsdebug(
+- char *fmt,
+- ...)
+- {
+- }
+-
+-
+- void
+- wstrace(
+- char *fmt,
+- ...)
+- {
+- }
+-
+- #endif /* WSDEBUG */
+- #endif /* WSDEBUG_H */
+--- 0 ----
+*** ../vim-8.1.0762/src/ex_cmdidxs.h 2019-01-08 22:02:36.044297306 +0100
+--- src/ex_cmdidxs.h 2019-01-17 15:31:43.054158710 +0100
+***************
+*** 28,36 ****
+ /* u */ 481,
+ /* v */ 492,
+ /* w */ 510,
+! /* x */ 525,
+! /* y */ 534,
+! /* z */ 535
+ };
+
+ /*
+--- 28,36 ----
+ /* u */ 481,
+ /* v */ 492,
+ /* w */ 510,
+! /* x */ 524,
+! /* y */ 533,
+! /* z */ 534
+ };
+
+ /*
+***************
+*** 63,72 ****
+ /* 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 },
+ /* x */ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0 },
+ /* y */ { 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 },
+ /* 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 = 548;
+--- 63,72 ----
+ /* 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, 0, 0, 12, 13, 0, 0, 0, 0 },
+ /* x */ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0 },
+ /* y */ { 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 },
+ /* 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.0762/src/version.c 2019-01-17 14:31:10.190919265 +0100
+--- src/version.c 2019-01-17 15:39:12.143436999 +0100
+***************
+*** 797,798 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 763,
+ /**/
+
+--
+You are Dead. Do you wish to restart, load, or quit?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0764 b/data/vim/patches/8.1.0764
new file mode 100644
index 000000000..a2cd398ad
--- /dev/null
+++ b/data/vim/patches/8.1.0764
@@ -0,0 +1,89 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0764
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0764
+Problem: List of distributed files is outdated.
+Solution: Remove workshop files. Add blob files.
+Files: Filelist
+
+
+*** ../vim-8.1.0763/Filelist 2019-01-10 21:49:51.982405995 +0100
+--- Filelist 2019-01-17 16:09:17.134544341 +0100
+***************
+*** 16,21 ****
+--- 16,22 ----
+ src/ascii.h \
+ src/beval.c \
+ src/beval.h \
++ src/blob.c \
+ src/blowfish.c \
+ src/buffer.c \
+ src/channel.c \
+***************
+*** 146,151 ****
+--- 147,153 ----
+ src/protodef.h \
+ src/proto/arabic.pro \
+ src/proto/beval.pro \
++ src/proto/blob.pro \
+ src/proto/blowfish.pro \
+ src/proto/buffer.pro \
+ src/proto/channel.pro \
+***************
+*** 334,341 ****
+ src/gui_x11_pm.h \
+ src/hangulin.c \
+ src/if_xcmdsrv.c \
+- src/integration.c \
+- src/integration.h \
+ src/link.sh \
+ src/installman.sh \
+ src/installml.sh \
+--- 336,341 ----
+***************
+*** 358,364 ****
+ src/proto/if_xcmdsrv.pro \
+ src/proto/os_unix.pro \
+ src/proto/pty.pro \
+- src/proto/workshop.pro \
+ src/pty.c \
+ src/testdir/Makefile \
+ src/testdir/unix.vim \
+--- 358,363 ----
+***************
+*** 368,377 ****
+ src/vimtutor \
+ src/gvimtutor \
+ src/which.sh \
+- src/workshop.c \
+- src/workshop.h \
+- src/wsdebug.c \
+- src/wsdebug.h \
+ src/tee/Makefile \
+ src/xxd/Makefile \
+
+--- 367,372 ----
+*** ../vim-8.1.0763/src/version.c 2019-01-17 15:43:21.765878343 +0100
+--- src/version.c 2019-01-17 16:09:40.922378204 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 764,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+236. You start saving URL's in your digital 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.0765 b/data/vim/patches/8.1.0765
new file mode 100644
index 000000000..67c4107aa
--- /dev/null
+++ b/data/vim/patches/8.1.0765
@@ -0,0 +1,197 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0765
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0765
+Problem: String format of a Blob can't be parsed back.
+Solution: Use 0z format.
+Files: src/blob.c, src/eval.c, src/testdir/test_blob.vim
+
+
+*** ../vim-8.1.0764/src/blob.c 2019-01-13 23:38:33.375773418 +0100
+--- src/blob.c 2019-01-17 16:25:08.460040233 +0100
+***************
+*** 168,174 ****
+ }
+
+ /*
+! * Convert a blob to a readable form: "[0x11,0x34]"
+ */
+ char_u *
+ blob2string(blob_T *blob, char_u **tofree, char_u *numbuf)
+--- 168,174 ----
+ }
+
+ /*
+! * Convert a blob to a readable form: "0z00112233.44556677.8899"
+ */
+ char_u *
+ blob2string(blob_T *blob, char_u **tofree, char_u *numbuf)
+***************
+*** 179,198 ****
+ if (blob == NULL)
+ {
+ *tofree = NULL;
+! return (char_u *)"[]";
+ }
+
+ // Store bytes in the growarray.
+ ga_init2(&ga, 1, 4000);
+! ga_append(&ga, '[');
+ for (i = 0; i < blob_len(blob); i++)
+ {
+! if (i > 0)
+! ga_concat(&ga, (char_u *)",");
+! vim_snprintf((char *)numbuf, NUMBUFLEN, "0x%02X", (int)blob_get(blob, i));
+ ga_concat(&ga, numbuf);
+ }
+- ga_append(&ga, ']');
+ *tofree = ga.ga_data;
+ return *tofree;
+ }
+--- 179,197 ----
+ if (blob == NULL)
+ {
+ *tofree = NULL;
+! return (char_u *)"0z";
+ }
+
+ // Store bytes in the growarray.
+ ga_init2(&ga, 1, 4000);
+! ga_concat(&ga, (char_u *)"0z");
+ for (i = 0; i < blob_len(blob); i++)
+ {
+! if (i > 0 && (i & 3) == 0)
+! ga_concat(&ga, (char_u *)".");
+! vim_snprintf((char *)numbuf, NUMBUFLEN, "%02X", (int)blob_get(blob, i));
+ ga_concat(&ga, numbuf);
+ }
+ *tofree = ga.ga_data;
+ return *tofree;
+ }
+***************
+*** 207,230 ****
+ blob_T *blob = blob_alloc();
+ char_u *s = str;
+
+! if (*s != '[')
+ goto failed;
+! s = skipwhite(s + 1);
+! while (*s != ']')
+ {
+! if (s[0] != '0' || s[1] != 'x'
+! || !vim_isxdigit(s[2]) || !vim_isxdigit(s[3]))
+! goto failed;
+! ga_append(&blob->bv_ga, (hex2nr(s[2]) << 4) + hex2nr(s[3]));
+! s += 4;
+! if (*s == ',')
+! s = skipwhite(s + 1);
+! else if (*s != ']')
+ goto failed;
+ }
+! s = skipwhite(s + 1);
+! if (*s != NUL)
+! goto failed; // text after final ']'
+
+ ++blob->bv_refcount;
+ return blob;
+--- 206,225 ----
+ blob_T *blob = blob_alloc();
+ char_u *s = str;
+
+! if (s[0] != '0' || (s[1] != 'z' && s[1] != 'Z'))
+ goto failed;
+! s += 2;
+! while (vim_isxdigit(*s))
+ {
+! if (!vim_isxdigit(s[1]))
+ goto failed;
++ ga_append(&blob->bv_ga, (hex2nr(s[0]) << 4) + hex2nr(s[1]));
++ s += 2;
++ if (*s == '.' && vim_isxdigit(s[1]))
++ ++s;
+ }
+! if (*skipwhite(s) != NUL)
+! goto failed; // text after final digit
+
+ ++blob->bv_refcount;
+ return blob;
+*** ../vim-8.1.0764/src/eval.c 2019-01-15 22:44:14.459222955 +0100
+--- src/eval.c 2019-01-17 16:23:31.744690466 +0100
+***************
+*** 4258,4263 ****
+--- 4258,4265 ----
+ if (blob != NULL)
+ ga_append(&blob->bv_ga,
+ (hex2nr(*bp) << 4) + hex2nr(*(bp+1)));
++ if (bp[2] == '.' && vim_isxdigit(bp[3]))
++ ++bp;
+ }
+ if (blob != NULL)
+ rettv_blob_set(rettv, blob);
+*** ../vim-8.1.0764/src/testdir/test_blob.vim 2019-01-15 22:44:14.459222955 +0100
+--- src/testdir/test_blob.vim 2019-01-17 16:31:56.521616741 +0100
+***************
+*** 26,31 ****
+--- 26,37 ----
+ call assert_fails('let b = 0z12345', 'E973:')
+
+ call assert_equal(0z, test_null_blob())
++
++ let b = 0z001122.33445566.778899.aabbcc.dd
++ call assert_equal(0z00112233445566778899aabbccdd, b)
++ call assert_fails('let b = 0z1.1')
++ call assert_fails('let b = 0z.')
++ call assert_fails('let b = 0z001122.')
+ endfunc
+
+ " assignment to a blob
+***************
+*** 91,100 ****
+ endfunc
+
+ func Test_blob_to_string()
+! let b = 0zDEADBEEF
+! call assert_equal('[0xDE,0xAD,0xBE,0xEF]', string(b))
+ call remove(b, 0, 3)
+! call assert_equal('[]', string(b))
+ endfunc
+
+ func Test_blob_compare()
+--- 97,109 ----
+ endfunc
+
+ func Test_blob_to_string()
+! let b = 0z00112233445566778899aabbccdd
+! call assert_equal('0z00112233.44556677.8899AABB.CCDD', string(b))
+! call assert_equal(b, eval(string(b)))
+! call remove(b, 4, -1)
+! call assert_equal('0z00112233', string(b))
+ call remove(b, 0, 3)
+! call assert_equal('0z', string(b))
+ endfunc
+
+ func Test_blob_compare()
+*** ../vim-8.1.0764/src/version.c 2019-01-17 16:11:02.297811975 +0100
+--- src/version.c 2019-01-17 16:12:47.509084110 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 765,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+237. You tattoo your email address on your forehead.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0766 b/data/vim/patches/8.1.0766
new file mode 100644
index 000000000..97e5df9b0
--- /dev/null
+++ b/data/vim/patches/8.1.0766
@@ -0,0 +1,722 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0766
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0766
+Problem: Various problems when using Vim on VMS.
+Solution: Various fixes. Define long_long_T. (Zoltan Arpadffy)
+Files: src/eval.c, src/feature.h, src/fileio.c, src/gui_motif.c,
+ src/gui_x11.c, src/gui_xmebw.c, src/json.c, src/Make_vms.mms,
+ src/ops.c, src/os_vms_conf.h, src/vim.h, src/xdiff/xdiff.h,
+ src/xdiff/xinclude.h
+
+
+*** ../vim-8.1.0765/src/eval.c 2019-01-17 16:32:49.469289080 +0100
+--- src/eval.c 2019-01-17 16:58:23.559357386 +0100
+***************
+*** 7414,7420 ****
+ {
+ case VAR_NUMBER:
+ vim_snprintf((char *)buf, NUMBUFLEN, "%lld",
+! (long long)varp->vval.v_number);
+ return buf;
+ case VAR_FUNC:
+ case VAR_PARTIAL:
+--- 7414,7420 ----
+ {
+ case VAR_NUMBER:
+ vim_snprintf((char *)buf, NUMBUFLEN, "%lld",
+! (long_long_T)varp->vval.v_number);
+ return buf;
+ case VAR_FUNC:
+ case VAR_PARTIAL:
+*** ../vim-8.1.0765/src/feature.h 2019-01-17 15:43:21.757878392 +0100
+--- src/feature.h 2019-01-17 16:58:23.559357386 +0100
+***************
+*** 380,386 ****
+ /*
+ * +timers timer_start()
+ */
+! #if defined(FEAT_RELTIME) && (defined(UNIX) || defined(WIN32))
+ # define FEAT_TIMERS
+ #endif
+
+--- 380,386 ----
+ /*
+ * +timers timer_start()
+ */
+! #if defined(FEAT_RELTIME) && (defined(UNIX) || defined(WIN32) || defined(VMS) )
+ # define FEAT_TIMERS
+ #endif
+
+***************
+*** 1306,1312 ****
+ * +balloon_eval_term Allow balloon expression evaluation in the terminal.
+ */
+ #if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \
+! (defined(UNIX) || (defined(WIN32) && !defined(FEAT_GUI_W32)))
+ # define FEAT_BEVAL_TERM
+ #endif
+
+--- 1306,1312 ----
+ * +balloon_eval_term Allow balloon expression evaluation in the terminal.
+ */
+ #if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \
+! (defined(UNIX) || defined(VMS) || (defined(WIN32) && !defined(FEAT_GUI_W32)))
+ # define FEAT_BEVAL_TERM
+ #endif
+
+*** ../vim-8.1.0765/src/fileio.c 2019-01-17 15:43:21.761878368 +0100
+--- src/fileio.c 2019-01-17 16:58:23.563357359 +0100
+***************
+*** 5334,5347 ****
+ *p++ = ' ';
+ if (shortmess(SHM_LINES))
+ vim_snprintf((char *)p, IOSIZE - (p - IObuff),
+! "%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);
+ }
+ }
+
+--- 5334,5347 ----
+ *p++ = ' ';
+ if (shortmess(SHM_LINES))
+ vim_snprintf((char *)p, IOSIZE - (p - IObuff),
+! "%ldL, %lldC", lnum, (long_long_T)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_T)nchars);
+ }
+ }
+
+*** ../vim-8.1.0765/src/gui_motif.c 2019-01-17 15:43:21.761878368 +0100
+--- src/gui_motif.c 2019-01-17 16:58:23.563357359 +0100
+***************
+*** 34,42 ****
+ #include <X11/Xatom.h>
+ #include <X11/StringDefs.h>
+ #include <X11/Intrinsic.h>
+-
+ #ifdef HAVE_X11_XPM_H
+! # include <X11/xpm.h>
+ #else
+ # ifdef HAVE_XM_XPMP_H
+ # include <Xm/XpmP.h>
+--- 34,45 ----
+ #include <X11/Xatom.h>
+ #include <X11/StringDefs.h>
+ #include <X11/Intrinsic.h>
+ #ifdef HAVE_X11_XPM_H
+! # if defined(VMS)
+! # include <xpm.h>
+! # else
+! # include <X11/xpm.h>
+! # endif
+ #else
+ # ifdef HAVE_XM_XPMP_H
+ # include <Xm/XpmP.h>
+*** ../vim-8.1.0765/src/gui_x11.c 2019-01-17 15:43:21.761878368 +0100
+--- src/gui_x11.c 2019-01-17 16:58:23.563357359 +0100
+***************
+*** 30,36 ****
+ # include <Xm/XpmP.h>
+ #else
+ # ifdef HAVE_X11_XPM_H
+! # include <X11/xpm.h>
+ # endif
+ #endif
+
+--- 30,40 ----
+ # include <Xm/XpmP.h>
+ #else
+ # ifdef HAVE_X11_XPM_H
+! # ifdef VMS
+! # include <xpm.h>
+! # else
+! # include <X11/xpm.h>
+! # endif
+ # endif
+ #endif
+
+*** ../vim-8.1.0765/src/gui_xmebw.c 2018-11-16 16:21:01.641310033 +0100
+--- src/gui_xmebw.c 2019-01-17 16:58:23.563357359 +0100
+***************
+*** 35,41 ****
+ # include <Xm/XpmP.h>
+ # define UNHIGHLIGHTT
+ #else
+! # include <X11/xpm.h>
+ #endif
+ #include <Xm/ManagerP.h>
+ #include <Xm/Display.h>
+--- 35,47 ----
+ # include <Xm/XpmP.h>
+ # define UNHIGHLIGHTT
+ #else
+! # ifdef HAVE_X11_XPM_H
+! # ifdef VMS
+! # include <xpm.h>
+! # else
+! # include <X11/xpm.h>
+! # endif
+! # endif
+ #endif
+ #include <Xm/ManagerP.h>
+ #include <Xm/Display.h>
+*** ../vim-8.1.0765/src/json.c 2019-01-13 23:38:33.399773248 +0100
+--- src/json.c 2019-01-17 16:58:23.563357359 +0100
+***************
+*** 218,224 ****
+
+ case VAR_NUMBER:
+ vim_snprintf((char *)numbuf, NUMBUFLEN, "%lld",
+! (long long)val->vval.v_number);
+ ga_concat(gap, numbuf);
+ break;
+
+--- 218,224 ----
+
+ case VAR_NUMBER:
+ vim_snprintf((char *)numbuf, NUMBUFLEN, "%lld",
+! (long_long_T)val->vval.v_number);
+ ga_concat(gap, numbuf);
+ break;
+
+*** ../vim-8.1.0765/src/Make_vms.mms 2019-01-01 13:20:05.936711257 +0100
+--- src/Make_vms.mms 2019-01-17 17:04:52.852555202 +0100
+***************
+*** 2,8 ****
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2017 Nov 18
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+--- 2,8 ----
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 Jan 17
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+***************
+*** 43,48 ****
+--- 43,50 ----
+ # GUI with GTK
+ # If you have GTK installed you might want to enable this option.
+ # NOTE: you will need to properly define GTK_DIR below
++ # NOTE: since Vim 7.3 GTK 2+ is used that is not ported to VMS,
++ # therefore this option should not be used
+ # GTK = YES
+
+ # GUI/Motif with XPM
+***************
+*** 164,170 ****
+ # unique on every system - logicals are not accepted
+ # please note: directory should end with . in order to /trans=conc work
+ # This value for GTK_DIR is an example.
+! GTK_DIR = $1$DGA104:[USERS.ZAY.WORK.GTK1210.]
+ DEFS = "HAVE_CONFIG_H","FEAT_GUI_GTK"
+ LIBS = ,OS_VMS_GTK.OPT/OPT
+ GUI_FLAG = /name=(as_is,short)/float=ieee/ieee=denorm
+--- 166,172 ----
+ # unique on every system - logicals are not accepted
+ # please note: directory should end with . in order to /trans=conc work
+ # This value for GTK_DIR is an example.
+! GTK_DIR = DKA0:[WORK.GTK1210.]
+ DEFS = "HAVE_CONFIG_H","FEAT_GUI_GTK"
+ LIBS = ,OS_VMS_GTK.OPT/OPT
+ GUI_FLAG = /name=(as_is,short)/float=ieee/ieee=denorm
+***************
+*** 178,185 ****
+--- 180,189 ----
+ MOTIF = YES
+ .IFDEF XPM
+ DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF","HAVE_XPM"
++ XPM_INC = ,[.xpm.include]
+ .ELSE
+ DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF"
++ XPM_INC =
+ .ENDIF
+ LIBS = ,OS_VMS_MOTIF.OPT/OPT
+ GUI_FLAG =
+***************
+*** 269,274 ****
+--- 273,283 ----
+ ICONV_DEF = ,"USE_ICONV"
+ .ENDIF
+
++ # XDIFF related setup.
++ XDIFF_SRC = xdiffi.c,xemit.c,xprepare.c,xutils.c,xhistogram.c,xpatience.c
++ XDIFF_OBJ = xdiffi.obj,xemit.obj,xprepare.obj,xutils.obj,xhistogram.obj,xpatience.obj
++ XDIFF_INC = ,[.xdiff]
++
+ ######################################################################
+ # End of configuration section.
+ # Please, do not change anything below without programming experience.
+***************
+*** 283,300 ****
+ .SUFFIXES : .obj .c
+
+ ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
+! $(TCL_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) -
+ $(CFLAGS)$(GUI_FLAG) -
+! /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
+
+ # CFLAGS displayed in :ver information
+ # It is specially formated for correct display of unix like includes
+ # as $(GUI_INC) - replaced with $(GUI_INC_VER)
+ # Otherwise should not be any other difference.
+ ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
+! $(TCL_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) -
+ $(CFLAGS)$(GUI_FLAG) -
+! /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
+
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+--- 292,313 ----
+ .SUFFIXES : .obj .c
+
+ ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
+! $(TCL_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF) -
+! $(ICONV_DEF)) -
+ $(CFLAGS)$(GUI_FLAG) -
+! /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC) -
+! $(TCL_INC)$(XDIFF_INC)$(XPM_INC))
+
+ # CFLAGS displayed in :ver information
+ # It is specially formated for correct display of unix like includes
+ # as $(GUI_INC) - replaced with $(GUI_INC_VER)
+ # Otherwise should not be any other difference.
+ ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
+! $(TCL_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF) -
+! $(ICONV_DEF)) -
+ $(CFLAGS)$(GUI_FLAG) -
+! /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC) -
+! $(TCL_INC)$(XDIFF_INC)$(XPM_INC))
+
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+***************
+*** 303,323 ****
+ ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
+ hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
+ misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+! spell.c spellfile.c syntax.c tag.c term.c termlib.c ui.c undo.c userfunc.c version.c screen.c \
+ window.c os_unix.c os_vms.c pathdef.c \
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+! $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC)
+
+ OBJ = arabic.obj beval.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj edit.obj eval.obj \
+ evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
+ if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
+! regexp.obj search.obj sha256.obj sign.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj \
+ ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj os_unix.obj \
+ os_vms.obj pathdef.obj if_mzsch.obj\
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+! $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ)
+
+ # Default target is making the executable
+ all : [.auto]config.h mmk_compat motif_env gtk_env perl_env python_env tcl_env ruby_env $(TARGET)
+--- 316,336 ----
+ ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
+ hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
+ misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+! spell.c spellfile.c syntax.c tag.c term.c termlib.c textprop.c ui.c undo.c userfunc.c version.c screen.c \
+ window.c os_unix.c os_vms.c pathdef.c \
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+! $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+ OBJ = arabic.obj beval.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj edit.obj eval.obj \
+ evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
+ if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
+! regexp.obj search.obj sha256.obj sign.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \
+ ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj os_unix.obj \
+ os_vms.obj pathdef.obj if_mzsch.obj\
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+! $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ)
+
+ # Default target is making the executable
+ all : [.auto]config.h mmk_compat motif_env gtk_env perl_env python_env tcl_env ruby_env $(TARGET)
+***************
+*** 705,710 ****
+--- 718,727 ----
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
++ textprop.obj : textprop.c vim.h [.auto]config.h feature.h os_unix.h \
++ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
++ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
++ arabic.h
+ ui.obj : ui.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+***************
+*** 828,832 ****
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+ globals.h farsi.h arabic.h version.h
+! gui_xmdlg.obj : gui_xmdlg.c
+! gui_xmebw.obj : gui_xmebw.c
+--- 845,855 ----
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+ globals.h farsi.h arabic.h version.h
+! gui_xmdlg.obj : gui_xmdlg.c [.auto]config.h vim.h feature.h os_unix.h
+! gui_xmebw.obj : gui_xmebw.c [.auto]config.h vim.h feature.h os_unix.h
+! xdiffi.obj : [.xdiff]xdiffi.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
+! xemit.obj : [.xdiff]xemit.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
+! xprepare.obj : [.xdiff]xprepare.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
+! xutils.obj : [.xdiff]xutils.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
+! xhistogram.obj : [.xdiff]xhistogram.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
+! xpatience.obj : [.xdiff]xpatience.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
+*** ../vim-8.1.0765/src/ops.c 2019-01-13 23:38:33.403773217 +0100
+--- src/ops.c 2019-01-17 16:58:23.567357333 +0100
+***************
+*** 6036,6051 ****
+ }
+ else if (pre == 0)
+ vim_snprintf((char *)buf2, NUMBUFLEN, "%llu",
+! (long long unsigned)n);
+ else if (pre == '0')
+ vim_snprintf((char *)buf2, NUMBUFLEN, "%llo",
+! (long long unsigned)n);
+ else if (pre && hexupper)
+ vim_snprintf((char *)buf2, NUMBUFLEN, "%llX",
+! (long long unsigned)n);
+ else
+ vim_snprintf((char *)buf2, NUMBUFLEN, "%llx",
+! (long long unsigned)n);
+ length -= (int)STRLEN(buf2);
+
+ /*
+--- 6036,6051 ----
+ }
+ else if (pre == 0)
+ vim_snprintf((char *)buf2, NUMBUFLEN, "%llu",
+! (long_long_u_T)n);
+ else if (pre == '0')
+ vim_snprintf((char *)buf2, NUMBUFLEN, "%llo",
+! (long_long_u_T)n);
+ else if (pre && hexupper)
+ vim_snprintf((char *)buf2, NUMBUFLEN, "%llX",
+! (long_long_u_T)n);
+ else
+ vim_snprintf((char *)buf2, NUMBUFLEN, "%llx",
+! (long_long_u_T)n);
+ length -= (int)STRLEN(buf2);
+
+ /*
+***************
+*** 7558,7578 ****
+ _("Selected %s%ld of %ld Lines; %lld of %lld Words; %lld of %lld Bytes"),
+ buf1, line_count_selected,
+ (long)curbuf->b_ml.ml_line_count,
+! (long long)word_count_cursor,
+! (long long)word_count,
+! (long long)byte_count_cursor,
+! (long long)byte_count);
+ else
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("Selected %s%ld of %ld Lines; %lld of %lld Words; %lld of %lld Chars; %lld of %lld Bytes"),
+ buf1, line_count_selected,
+ (long)curbuf->b_ml.ml_line_count,
+! (long long)word_count_cursor,
+! (long long)word_count,
+! (long long)char_count_cursor,
+! (long long)char_count,
+! (long long)byte_count_cursor,
+! (long long)byte_count);
+ }
+ else
+ {
+--- 7558,7578 ----
+ _("Selected %s%ld of %ld Lines; %lld of %lld Words; %lld of %lld Bytes"),
+ buf1, line_count_selected,
+ (long)curbuf->b_ml.ml_line_count,
+! (long_long_T)word_count_cursor,
+! (long_long_T)word_count,
+! (long_long_T)byte_count_cursor,
+! (long_long_T)byte_count);
+ else
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("Selected %s%ld of %ld Lines; %lld of %lld Words; %lld of %lld Chars; %lld of %lld Bytes"),
+ buf1, line_count_selected,
+ (long)curbuf->b_ml.ml_line_count,
+! (long_long_T)word_count_cursor,
+! (long_long_T)word_count,
+! (long_long_T)char_count_cursor,
+! (long_long_T)char_count,
+! (long_long_T)byte_count_cursor,
+! (long_long_T)byte_count);
+ }
+ else
+ {
+***************
+*** 7590,7606 ****
+ (char *)buf1, (char *)buf2,
+ (long)curwin->w_cursor.lnum,
+ (long)curbuf->b_ml.ml_line_count,
+! (long long)word_count_cursor, (long long)word_count,
+! (long long)byte_count_cursor, (long long)byte_count);
+ else
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("Col %s of %s; Line %ld of %ld; Word %lld of %lld; Char %lld of %lld; Byte %lld of %lld"),
+ (char *)buf1, (char *)buf2,
+ (long)curwin->w_cursor.lnum,
+ (long)curbuf->b_ml.ml_line_count,
+! (long long)word_count_cursor, (long long)word_count,
+! (long long)char_count_cursor, (long long)char_count,
+! (long long)byte_count_cursor, (long long)byte_count);
+ }
+ }
+
+--- 7590,7606 ----
+ (char *)buf1, (char *)buf2,
+ (long)curwin->w_cursor.lnum,
+ (long)curbuf->b_ml.ml_line_count,
+! (long_long_T)word_count_cursor, (long_long_T)word_count,
+! (long_long_T)byte_count_cursor, (long_long_T)byte_count);
+ else
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("Col %s of %s; Line %ld of %ld; Word %lld of %lld; Char %lld of %lld; Byte %lld of %lld"),
+ (char *)buf1, (char *)buf2,
+ (long)curwin->w_cursor.lnum,
+ (long)curbuf->b_ml.ml_line_count,
+! (long_long_T)word_count_cursor, (long_long_T)word_count,
+! (long_long_T)char_count_cursor, (long_long_T)char_count,
+! (long_long_T)byte_count_cursor, (long_long_T)byte_count);
+ }
+ }
+
+***************
+*** 7608,7614 ****
+ bom_count = bomb_size();
+ if (bom_count > 0)
+ vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE,
+! _("(+%lld for BOM)"), (long long)bom_count);
+ #endif
+ if (dict == NULL)
+ {
+--- 7608,7614 ----
+ bom_count = bomb_size();
+ if (bom_count > 0)
+ vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE,
+! _("(+%lld for BOM)"), (long_long_T)bom_count);
+ #endif
+ if (dict == NULL)
+ {
+*** ../vim-8.1.0765/src/os_vms_conf.h 2016-12-01 17:08:35.000000000 +0100
+--- src/os_vms_conf.h 2019-01-17 16:58:23.567357333 +0100
+***************
+*** 6,11 ****
+--- 6,12 ----
+ #define BINARY_FILE_IO /* Use binary fileio */
+ #define USE_GETCWD
+ #define USE_SYSTEM
++ #define XPMATTRIBUTES_TYPE XpmAttributes
+
+ /* Define when terminfo support found */
+ #undef TERMINFO
+***************
+*** 23,29 ****
+ #define HAVE_DATE_TIME
+
+ /* Defined to the size of an int */
+! #define VIM_SIZEOF_INT 4
+
+ /* #undef USEBCOPY */
+ #define USEMEMMOVE
+--- 24,30 ----
+ #define HAVE_DATE_TIME
+
+ /* Defined to the size of an int */
+! #define VIM_SIZEOF_INT 4
+
+ /* #undef USEBCOPY */
+ #define USEMEMMOVE
+***************
+*** 117,124 ****
+ #define HAVE_SETJMP_H
+ #define HAVE_MATH_H
+ #define HAVE_FLOAT_FUNCS
+
+- #undef HAVE_DIRENT_H
+ #undef HAVE_SYS_NDIR_H
+ #undef HAVE_SYS_DIR_H
+ #undef HAVE_NDIR_H
+--- 118,128 ----
+ #define HAVE_SETJMP_H
+ #define HAVE_MATH_H
+ #define HAVE_FLOAT_FUNCS
++ #define HAVE_GETTIMEOFDAY
++ #define HAVE_PWD_H
++ #define HAVE_NETDB_H
++ #define HAVE_DIRENT_H
+
+ #undef HAVE_SYS_NDIR_H
+ #undef HAVE_SYS_DIR_H
+ #undef HAVE_NDIR_H
+***************
+*** 138,144 ****
+ #undef HAVE_LIBC_H
+ #undef HAVE_SYS_STATFS_H
+ #undef HAVE_SYS_POLL_H
+- #undef HAVE_PWD_H
+ #undef HAVE_FCHDIR
+ #undef HAVE_LSTAT
+
+--- 142,147 ----
+***************
+*** 150,162 ****
+ #undef HAVE_STRINGS_H
+ #undef HAVE_SIGSETJMP
+ #undef HAVE_ISNAN
+! #else
+ #define HAVE_GETTIMEOFDAY
+ #define HAVE_USLEEP
+ #define HAVE_STRCASECMP
+ #define HAVE_STRINGS_H
+ #define HAVE_SIGSETJMP
+ #define HAVE_ISNAN
+ #endif
+
+ /* Compiler specific */
+--- 153,168 ----
+ #undef HAVE_STRINGS_H
+ #undef HAVE_SIGSETJMP
+ #undef HAVE_ISNAN
+! #define HAVE_NO_LONG_LONG
+! #define VIM_SIZEOF_LONG 4
+! #else /* AXP and IA64 */
+ #define HAVE_GETTIMEOFDAY
+ #define HAVE_USLEEP
+ #define HAVE_STRCASECMP
+ #define HAVE_STRINGS_H
+ #define HAVE_SIGSETJMP
+ #define HAVE_ISNAN
++ #define VIM_SIZEOF_LONG 8
+ #endif
+
+ /* Compiler specific */
+***************
+*** 191,196 ****
+--- 197,205 ----
+ /* GUI support defines */
+ #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK)
+ #define HAVE_X11
++ #ifdef HAVE_XPM
++ #define HAVE_X11_XPM_H
++ #endif
+ #define USE_FONTSET
+ #undef X_LOCALE
+ #endif
+*** ../vim-8.1.0765/src/vim.h 2019-01-17 15:43:21.765878343 +0100
+--- src/vim.h 2019-01-17 16:58:23.567357333 +0100
+***************
+*** 337,342 ****
+--- 337,353 ----
+ typedef unsigned char char_u;
+ typedef unsigned short short_u;
+ typedef unsigned int int_u;
++
++ /* Older systems do not have support for long long
++ * use a typedef instead of hadcoded long long */
++ #ifdef HAVE_NO_LONG_LONG
++ typedef long long_long_T;
++ typedef long unsigned long_long_u_T;
++ #else
++ typedef long long long_long_T;
++ typedef long long unsigned long_long_u_T;
++ #endif
++
+ /* Make sure long_u is big enough to hold a pointer.
+ * On Win64, longs are 32 bits and pointers are 64 bits.
+ * For printf() and scanf(), we need to take care of long_u specifically. */
+*** ../vim-8.1.0765/src/xdiff/xdiff.h 2018-09-13 15:58:55.745722402 +0200
+--- src/xdiff/xdiff.h 2019-01-17 16:58:23.571357307 +0100
+***************
+*** 108,114 ****
+ long bsize;
+ } bdiffparam_t;
+
+! #include "../vim.h"
+
+ #define xdl_malloc(x) lalloc((x), TRUE)
+ #define xdl_free(ptr) vim_free(ptr)
+--- 108,118 ----
+ long bsize;
+ } bdiffparam_t;
+
+! #ifdef VMS
+! # include "[]vim.h"
+! #else
+! # include "../vim.h"
+! #endif
+
+ #define xdl_malloc(x) lalloc((x), TRUE)
+ #define xdl_free(ptr) vim_free(ptr)
+*** ../vim-8.1.0765/src/xdiff/xinclude.h 2018-09-10 17:50:32.713306941 +0200
+--- src/xdiff/xinclude.h 2019-01-17 16:58:23.571357307 +0100
+***************
+*** 22,28 ****
+
+ /* defines HAVE_ATTRIBUTE_UNUSED */
+ #ifdef HAVE_CONFIG_H
+! # include "../auto/config.h"
+ #endif
+
+ /* Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter
+--- 22,32 ----
+
+ /* defines HAVE_ATTRIBUTE_UNUSED */
+ #ifdef HAVE_CONFIG_H
+! # ifdef VMS
+! # include "[.auto]config.h"
+! # else
+! # include "../auto/config.h"
+! # endif
+ #endif
+
+ /* Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter
+*** ../vim-8.1.0765/src/version.c 2019-01-17 16:32:49.469289080 +0100
+--- src/version.c 2019-01-17 17:05:49.708152017 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 766,
+ /**/
+
+--
+"The amigos also appear to be guilty of not citing the work of others who had
+gone before them. Even worse, they have a chapter about modeling time and
+space without making a single reference to Star Trek!"
+ (Scott Ambler, reviewing the UML User Guide)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0767 b/data/vim/patches/8.1.0767
new file mode 100644
index 000000000..139ff36ed
--- /dev/null
+++ b/data/vim/patches/8.1.0767
@@ -0,0 +1,163 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0767
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0767
+Problem: When deleting lines at the bottom signs are misplaced.
+Solution: Properly update the line number of signs at the end of a buffer
+ after a delete/undo operation. (Yegappan Lakshmanan, closes #3798)
+Files: src/sign.c, src/testdir/test_signs.vim
+
+
+*** ../vim-8.1.0766/src/sign.c 2019-01-15 20:19:36.747904404 +0100
+--- src/sign.c 2019-01-17 17:34:20.468494506 +0100
+***************
+*** 660,677 ****
+ long amount_after)
+ {
+ signlist_T *sign; // a sign in a b_signlist
+
+ FOR_ALL_SIGNS_IN_BUF(curbuf, sign)
+ {
+ if (sign->lnum >= line1 && sign->lnum <= line2)
+ {
+! if (amount == MAXLNUM)
+! sign->lnum = line1;
+! else
+! sign->lnum += amount;
+ }
+ else if (sign->lnum > line2)
+! sign->lnum += amount_after;
+ }
+ }
+
+--- 660,687 ----
+ long amount_after)
+ {
+ signlist_T *sign; // a sign in a b_signlist
++ linenr_T new_lnum;
+
+ FOR_ALL_SIGNS_IN_BUF(curbuf, sign)
+ {
++ // Ignore changes to lines after the sign
++ if (sign->lnum < line1)
++ continue;
++ new_lnum = sign->lnum;
+ if (sign->lnum >= line1 && sign->lnum <= line2)
+ {
+! if (amount != MAXLNUM)
+! new_lnum += amount;
+ }
+ else if (sign->lnum > line2)
+! // Lines inserted or deleted before the sign
+! new_lnum += amount_after;
+!
+! // If the new sign line number is past the last line in the buffer,
+! // then don't adjust the line number. Otherwise, it will always be past
+! // the last line and will not be visible.
+! if (new_lnum <= curbuf->b_ml.ml_line_count)
+! sign->lnum = new_lnum;
+ }
+ }
+
+*** ../vim-8.1.0766/src/testdir/test_signs.vim 2019-01-11 13:42:31.680331155 +0100
+--- src/testdir/test_signs.vim 2019-01-17 17:34:20.472494477 +0100
+***************
+*** 1202,1214 ****
+ enew! | only!
+
+ sign define sign1 text=#> linehl=Comment
+! call setline(1, ['A', 'B', 'C', 'D'])
+ exe 'sign place 5 line=3 name=sign1 buffer=' . bufnr('')
+ let l = sign_getplaced(bufnr(''))
+ call assert_equal(3, l[0].signs[0].lnum)
+
+ " Add some lines before the sign and check the sign line number
+! call append(2, ['AA', 'AB', 'AC'])
+ let l = sign_getplaced(bufnr(''))
+ call assert_equal(6, l[0].signs[0].lnum)
+
+--- 1202,1214 ----
+ enew! | only!
+
+ sign define sign1 text=#> linehl=Comment
+! call setline(1, ['A', 'B', 'C', 'D', 'E'])
+ exe 'sign place 5 line=3 name=sign1 buffer=' . bufnr('')
+ let l = sign_getplaced(bufnr(''))
+ call assert_equal(3, l[0].signs[0].lnum)
+
+ " Add some lines before the sign and check the sign line number
+! call append(2, ['BA', 'BB', 'BC'])
+ let l = sign_getplaced(bufnr(''))
+ call assert_equal(6, l[0].signs[0].lnum)
+
+***************
+*** 1217,1222 ****
+--- 1217,1260 ----
+ let l = sign_getplaced(bufnr(''))
+ call assert_equal(4, l[0].signs[0].lnum)
+
++ " Insert some lines after the sign and check the sign line number
++ call append(5, ['DA', 'DB'])
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal(4, l[0].signs[0].lnum)
++
++ " Delete some lines after the sign and check the sign line number
++ call deletebufline('', 6, 7)
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal(4, l[0].signs[0].lnum)
++
++ " Break the undo. Otherwise the undo operation below will undo all the
++ " changes made by this function.
++ let &undolevels=&undolevels
++
++ " Delete the line with the sign
++ call deletebufline('', 4)
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal(4, l[0].signs[0].lnum)
++
++ " Undo the delete operation
++ undo
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal(5, l[0].signs[0].lnum)
++
++ " Break the undo
++ let &undolevels=&undolevels
++
++ " Delete few lines at the end of the buffer including the line with the sign
++ " Sign line number should not change (as it is placed outside of the buffer)
++ call deletebufline('', 3, 6)
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal(5, l[0].signs[0].lnum)
++
++ " Undo the delete operation. Sign should be restored to the previous line
++ undo
++ let l = sign_getplaced(bufnr(''))
++ call assert_equal(5, l[0].signs[0].lnum)
++
+ sign unplace * group=*
+ sign undefine sign1
+ enew!
+*** ../vim-8.1.0766/src/version.c 2019-01-17 17:13:25.924984061 +0100
+--- src/version.c 2019-01-17 17:32:46.589140279 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 767,
+ /**/
+
+--
+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.0768 b/data/vim/patches/8.1.0768
new file mode 100644
index 000000000..a52aa05b5
--- /dev/null
+++ b/data/vim/patches/8.1.0768
@@ -0,0 +1,284 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0768
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0768
+Problem: Updating completions may cause the popup menu to flicker.
+Solution: Avoid updating the text below the popup menu before drawing the
+ popup menu.
+Files: src/popupmnu.c, src/proto/popupmnu.pro, src/edit.c, src/screen.c
+
+
+*** ../vim-8.1.0767/src/popupmnu.c 2019-01-13 23:38:33.407773189 +0100
+--- src/popupmnu.c 2019-01-17 21:08:17.890120079 +0100
+***************
+*** 19,24 ****
+--- 19,26 ----
+ static int pum_selected; /* index of selected item or -1 */
+ static int pum_first = 0; /* index of top item */
+
++ static int call_update_screen = FALSE;
++
+ static int pum_height; /* nr of displayed pum items */
+ static int pum_width; /* width of displayed pum items */
+ static int pum_base_width; /* width of pum items base */
+***************
+*** 36,42 ****
+ static int pum_win_wcol;
+ static int pum_win_width;
+
+! static int pum_do_redraw = FALSE; /* do redraw anyway */
+
+ static int pum_set_selected(int n, int repeat);
+
+--- 38,45 ----
+ static int pum_win_wcol;
+ static int pum_win_width;
+
+! static int pum_do_redraw = FALSE; // do redraw anyway
+! static int pum_skip_redraw = FALSE; // skip redraw
+
+ static int pum_set_selected(int n, int repeat);
+
+***************
+*** 354,359 ****
+--- 357,392 ----
+ }
+
+ /*
++ * Set a flag that when pum_redraw() is called it first calls update_screen().
++ * This will avoid clearing and redrawing the popup menu, prevent flicker.
++ */
++ void
++ pum_call_update_screen()
++ {
++ call_update_screen = TRUE;
++
++ // Update the cursor position to be able to compute the popup menu
++ // position. The cursor line length may have changed because of the
++ // inserted completion.
++ curwin->w_valid &= VALID_CROW|VALID_CHEIGHT;
++ validate_cursor();
++ }
++
++ /*
++ * Return TRUE if we are going to redraw the popup menu and the screen position
++ * "row"/"col" is under the popup menu.
++ */
++ int
++ pum_under_menu(int row, int col)
++ {
++ return pum_skip_redraw
++ && row >= pum_row
++ && row < pum_row + pum_height
++ && col >= pum_col - 1
++ && col < pum_col + pum_width;
++ }
++
++ /*
+ * Redraw the popup menu, using "pum_first" and "pum_selected".
+ */
+ void
+***************
+*** 376,382 ****
+ int round;
+ int n;
+
+! /* Never display more than we have */
+ if (pum_first > pum_size - pum_height)
+ pum_first = pum_size - pum_height;
+
+--- 409,423 ----
+ int round;
+ int n;
+
+! if (call_update_screen)
+! {
+! call_update_screen = FALSE;
+! pum_skip_redraw = TRUE; // do not redraw in pum_may_redraw().
+! update_screen(0);
+! pum_skip_redraw = FALSE;
+! }
+!
+! // never display more than we have
+ if (pum_first > pum_size - pum_height)
+ pum_first = pum_size - pum_height;
+
+***************
+*** 789,794 ****
+--- 830,836 ----
+ pum_do_redraw = TRUE;
+ update_screen(0);
+ pum_do_redraw = FALSE;
++ call_update_screen = FALSE;
+ }
+ }
+ }
+***************
+*** 844,850 ****
+ int len = pum_size;
+ int selected = pum_selected;
+
+! if (!pum_visible())
+ return; // nothing to do
+
+ if (pum_window != curwin
+--- 886,892 ----
+ int len = pum_size;
+ int selected = pum_selected;
+
+! if (!pum_visible() || pum_skip_redraw)
+ return; // nothing to do
+
+ if (pum_window != curwin
+*** ../vim-8.1.0767/src/proto/popupmnu.pro 2018-06-17 14:47:50.649309059 +0200
+--- src/proto/popupmnu.pro 2019-01-17 20:18:33.927980786 +0100
+***************
+*** 1,5 ****
+--- 1,7 ----
+ /* popupmnu.c */
+ void pum_display(pumitem_T *array, int size, int selected);
++ void pum_call_update_screen(void);
++ int pum_under_menu(int row, int col);
+ void pum_redraw(void);
+ void pum_undisplay(void);
+ void pum_clear(void);
+*** ../vim-8.1.0767/src/edit.c 2019-01-13 23:38:33.379773390 +0100
+--- src/edit.c 2019-01-17 20:07:30.868052215 +0100
+***************
+*** 3020,3026 ****
+ if (compl_match_array != NULL)
+ {
+ h = curwin->w_cline_height;
+! update_screen(0);
+ if (h != curwin->w_cline_height)
+ ins_compl_del_pum();
+ }
+--- 3020,3027 ----
+ if (compl_match_array != NULL)
+ {
+ h = curwin->w_cline_height;
+! // Update the screen later, before drawing the popup menu over it.
+! pum_call_update_screen();
+ if (h != curwin->w_cline_height)
+ ins_compl_del_pum();
+ }
+***************
+*** 3110,3117 ****
+ do_cmdline_cmd((char_u *)"if exists('g:loaded_matchparen')|3match none|endif");
+ #endif
+
+! /* Update the screen before drawing the popup menu over it. */
+! update_screen(0);
+
+ if (compl_match_array == NULL)
+ {
+--- 3111,3118 ----
+ do_cmdline_cmd((char_u *)"if exists('g:loaded_matchparen')|3match none|endif");
+ #endif
+
+! // Update the screen later, before drawing the popup menu over it.
+! pum_call_update_screen();
+
+ if (compl_match_array == NULL)
+ {
+***************
+*** 3668,3678 ****
+ spell_bad_len = 0; /* need to redetect bad word */
+ #endif
+ /*
+! * Matches were cleared, need to search for them now. First display
+! * the changed text before the cursor. Set "compl_restarting" to
+! * avoid that the first match is inserted.
+ */
+! update_screen(0);
+ #ifdef FEAT_GUI
+ if (gui.in_use)
+ {
+--- 3669,3679 ----
+ spell_bad_len = 0; /* need to redetect bad word */
+ #endif
+ /*
+! * Matches were cleared, need to search for them now. Befor drawing
+! * the popup menu display the changed text before the cursor. Set
+! * "compl_restarting" to avoid that the first match is inserted.
+ */
+! pum_call_update_screen();
+ #ifdef FEAT_GUI
+ if (gui.in_use)
+ {
+***************
+*** 5077,5084 ****
+ /* may undisplay the popup menu first */
+ ins_compl_upd_pum();
+
+! /* redraw to show the user what was inserted */
+! update_screen(0);
+
+ /* display the updated popup menu */
+ ins_compl_show_pum();
+--- 5078,5086 ----
+ /* may undisplay the popup menu first */
+ ins_compl_upd_pum();
+
+! // Redraw before showing the popup menu to show the user what was
+! // inserted.
+! pum_call_update_screen();
+
+ /* display the updated popup menu */
+ ins_compl_show_pum();
+*** ../vim-8.1.0767/src/screen.c 2019-01-16 22:41:50.095917784 +0100
+--- src/screen.c 2019-01-17 20:17:21.752429872 +0100
+***************
+*** 183,189 ****
+ /*
+ * Redraw the current window later, with update_screen(type).
+ * Set must_redraw only if not already set to a higher value.
+! * e.g. if must_redraw is CLEAR, type NOT_VALID will do nothing.
+ */
+ void
+ redraw_later(int type)
+--- 183,189 ----
+ /*
+ * Redraw the current window later, with update_screen(type).
+ * Set must_redraw only if not already set to a higher value.
+! * E.g. if must_redraw is CLEAR, type NOT_VALID will do nothing.
+ */
+ void
+ redraw_later(int type)
+***************
+*** 8475,8480 ****
+--- 8475,8484 ----
+ if (row >= screen_Rows || col >= screen_Columns)
+ return;
+
++ #ifdef FEAT_INS_EXPAND
++ if (pum_under_menu(row, col))
++ return;
++ #endif
+ /* Outputting a character in the last cell on the screen may scroll the
+ * screen up. Only do it when the "xn" termcap property is set, otherwise
+ * mark the character invalid (update it when scrolled up). */
+*** ../vim-8.1.0767/src/version.c 2019-01-17 17:36:42.495509219 +0100
+--- src/version.c 2019-01-17 21:06:24.227223275 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 768,
+ /**/
+
+--
+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.0769 b/data/vim/patches/8.1.0769
new file mode 100644
index 000000000..fd5fbdd56
--- /dev/null
+++ b/data/vim/patches/8.1.0769
@@ -0,0 +1,100 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0769
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0769
+Problem: :stop is covered in two tests.
+Solution: Remove Test_stop_in_terminal(). Make other test exit Vim cleanly.
+ (Ozaki Kiichi, closes #3814)
+Files: src/testdir/test_terminal.vim, src/testdir/test_suspend.vim
+
+
+*** ../vim-8.1.0768/src/testdir/test_terminal.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_terminal.vim 2019-01-17 22:11:01.022070824 +0100
+***************
+*** 1690,1728 ****
+ call delete('Xfile')
+ endfunc
+
+- func Test_stop_in_terminal()
+- " We can't expect this to work on all systems, just test on Linux for now.
+- if !has('unix') || system('uname') !~ 'Linux'
+- return
+- endif
+- term /bin/sh
+- let bufnr = bufnr('')
+- call WaitForAssert({-> assert_equal('running', term_getstatus(bufnr))})
+- let lastrow = term_getsize(bufnr)[0]
+-
+- call term_sendkeys(bufnr, GetVimCommandClean() . "\r")
+- call term_sendkeys(bufnr, ":echo 'ready'\r")
+- call WaitForAssert({-> assert_match('ready', Get_terminal_text(bufnr, lastrow))})
+-
+- call term_sendkeys(bufnr, ":stop\r")
+- " Not sure where "Stopped" shows up, need five lines for Arch.
+- call WaitForAssert({-> assert_match('Stopped',
+- \ Get_terminal_text(bufnr, 1) .
+- \ Get_terminal_text(bufnr, 2) .
+- \ Get_terminal_text(bufnr, 3) .
+- \ Get_terminal_text(bufnr, 4) .
+- \ Get_terminal_text(bufnr, 5))})
+-
+- call term_sendkeys(bufnr, "fg\r")
+- call term_sendkeys(bufnr, ":echo 'back again'\r")
+- call WaitForAssert({-> assert_match('back again', Get_terminal_text(bufnr, lastrow))})
+-
+- call term_sendkeys(bufnr, ":quit\r")
+- call term_wait(bufnr)
+- call Stop_shell_in_terminal(bufnr)
+- exe bufnr . 'bwipe'
+- endfunc
+-
+ func Test_terminal_no_job()
+ let term = term_start('false', {'term_finish': 'close'})
+ call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) })
+--- 1690,1695 ----
+*** ../vim-8.1.0768/src/testdir/test_suspend.vim 2018-11-03 21:09:11.703978920 +0100
+--- src/testdir/test_suspend.vim 2019-01-17 22:12:42.549139836 +0100
+***************
+*** 45,51 ****
+ call term_sendkeys(buf, "fg\<CR>")
+ call WaitForAssert({-> assert_equal(' 1 foo', term_getline(buf, '.'))})
+
+ exe buf . 'bwipe!'
+ call delete('Xfoo')
+- set autowrite&
+ endfunc
+--- 45,55 ----
+ call term_sendkeys(buf, "fg\<CR>")
+ call WaitForAssert({-> assert_equal(' 1 foo', term_getline(buf, '.'))})
+
++ " Quit gracefully to dump coverage information.
++ call term_sendkeys(buf, ":qall!\<CR>")
++ call term_wait(buf)
++ call Stop_shell_in_terminal(buf)
++
+ exe buf . 'bwipe!'
+ call delete('Xfoo')
+ endfunc
+*** ../vim-8.1.0768/src/version.c 2019-01-17 21:09:02.049706334 +0100
+--- src/version.c 2019-01-17 22:13:42.644601977 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 769,
+ /**/
+
+--
+Marriage isn't a word. It's a sentence.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0770 b/data/vim/patches/8.1.0770
new file mode 100644
index 000000000..54998f1fd
--- /dev/null
+++ b/data/vim/patches/8.1.0770
@@ -0,0 +1,264 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0770
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0770
+Problem: Inconsistent use of ELAPSED_FUNC.
+Solution: Consistently use ELAPSED_FUNC. Also turn ELAPSED_TYPE into a
+ typedef. (Ozaki Kiichi, closes #3815)
+Files: src/channel.c, src/gui.c, src/misc1.c, src/os_unix.c, src/vim.h
+
+
+*** ../vim-8.1.0769/src/channel.c 2019-01-17 14:31:10.190919265 +0100
+--- src/channel.c 2019-01-17 22:20:19.225226754 +0100
+***************
+*** 4290,4296 ****
+ int r;
+ ch_part_T part = PART_SOCK;
+ #ifdef ELAPSED_FUNC
+! ELAPSED_TYPE start_tv;
+
+ ELAPSED_INIT(start_tv);
+ #endif
+--- 4290,4296 ----
+ int r;
+ ch_part_T part = PART_SOCK;
+ #ifdef ELAPSED_FUNC
+! elapsed_T start_tv;
+
+ ELAPSED_INIT(start_tv);
+ #endif
+*** ../vim-8.1.0769/src/gui.c 2019-01-17 15:43:21.761878368 +0100
+--- src/gui.c 2019-01-17 22:20:19.225226754 +0100
+***************
+*** 2951,2959 ****
+ int
+ gui_wait_for_chars(long wtime, int tb_change_cnt)
+ {
+! int retval;
+ #if defined(ELAPSED_FUNC)
+! ELAPSED_TYPE start_tv;
+ #endif
+
+ #ifdef FEAT_MENU
+--- 2951,2959 ----
+ int
+ gui_wait_for_chars(long wtime, int tb_change_cnt)
+ {
+! int retval;
+ #if defined(ELAPSED_FUNC)
+! elapsed_T start_tv;
+ #endif
+
+ #ifdef FEAT_MENU
+***************
+*** 3002,3008 ****
+ if (gui_wait_for_chars_or_timer(p_ut) == OK)
+ retval = OK;
+ else if (trigger_cursorhold()
+! #ifdef ELAPSED_FUNC
+ && ELAPSED_FUNC(start_tv) >= p_ut
+ #endif
+ && typebuf.tb_change_cnt == tb_change_cnt)
+--- 3002,3008 ----
+ if (gui_wait_for_chars_or_timer(p_ut) == OK)
+ retval = OK;
+ else if (trigger_cursorhold()
+! #if defined(ELAPSED_FUNC)
+ && ELAPSED_FUNC(start_tv) >= p_ut
+ #endif
+ && typebuf.tb_change_cnt == tb_change_cnt)
+*** ../vim-8.1.0769/src/misc1.c 2019-01-13 23:38:33.399773248 +0100
+--- src/misc1.c 2019-01-17 22:20:19.229226723 +0100
+***************
+*** 3891,3897 ****
+ {
+ #ifdef ELAPSED_FUNC
+ static int did_init = FALSE;
+! static ELAPSED_TYPE start_tv;
+
+ /* Only beep once per half a second, otherwise a sequence of beeps
+ * would freeze Vim. */
+--- 3891,3897 ----
+ {
+ #ifdef ELAPSED_FUNC
+ static int did_init = FALSE;
+! static elapsed_T start_tv;
+
+ /* Only beep once per half a second, otherwise a sequence of beeps
+ * would freeze Vim. */
+*** ../vim-8.1.0769/src/os_unix.c 2019-01-13 23:38:33.407773189 +0100
+--- src/os_unix.c 2019-01-17 22:20:19.229226723 +0100
+***************
+*** 374,380 ****
+ long wait_time;
+ long elapsed_time = 0;
+ #ifdef ELAPSED_FUNC
+! ELAPSED_TYPE start_tv;
+
+ ELAPSED_INIT(start_tv);
+ #endif
+--- 374,380 ----
+ long wait_time;
+ long elapsed_time = 0;
+ #ifdef ELAPSED_FUNC
+! elapsed_T start_tv;
+
+ ELAPSED_INIT(start_tv);
+ #endif
+***************
+*** 480,486 ****
+ }
+
+ /* no character available */
+! #if !(defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H))
+ /* estimate the elapsed time */
+ elapsed_time += wait_time;
+ #endif
+--- 480,486 ----
+ }
+
+ /* no character available */
+! #ifndef ELAPSED_FUNC
+ /* estimate the elapsed time */
+ elapsed_time += wait_time;
+ #endif
+***************
+*** 1907,1917 ****
+ #ifdef SET_SIG_ALARM
+ RETSIGTYPE (*sig_save)();
+ #endif
+! #if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
+! struct timeval start_tv;
+
+ if (p_verbose > 0)
+! gettimeofday(&start_tv, NULL);
+ #endif
+
+ #ifdef SET_SIG_ALARM
+--- 1907,1917 ----
+ #ifdef SET_SIG_ALARM
+ RETSIGTYPE (*sig_save)();
+ #endif
+! #ifdef ELAPSED_FUNC
+! elapsed_T start_tv;
+
+ if (p_verbose > 0)
+! ELAPSED_INIT(start_tv);
+ #endif
+
+ #ifdef SET_SIG_ALARM
+***************
+*** 4831,4838 ****
+ int fromshell_fd;
+ garray_T ga;
+ int noread_cnt;
+! # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
+! struct timeval start_tv;
+ # endif
+
+ # ifdef FEAT_GUI
+--- 4831,4838 ----
+ int fromshell_fd;
+ garray_T ga;
+ int noread_cnt;
+! # ifdef ELAPSED_FUNC
+! elapsed_T start_tv;
+ # endif
+
+ # ifdef FEAT_GUI
+***************
+*** 6073,6080 ****
+ # ifdef ELAPSED_FUNC
+ /* Remember at what time we started, so that we know how much longer we
+ * should wait after being interrupted. */
+! long start_msec = msec;
+! ELAPSED_TYPE start_tv;
+
+ if (msec > 0)
+ ELAPSED_INIT(start_tv);
+--- 6073,6080 ----
+ # ifdef ELAPSED_FUNC
+ /* Remember at what time we started, so that we know how much longer we
+ * should wait after being interrupted. */
+! long start_msec = msec;
+! elapsed_T start_tv;
+
+ if (msec > 0)
+ ELAPSED_INIT(start_tv);
+***************
+*** 7494,7500 ****
+ int (*oldIOhandler)();
+ #endif
+ # ifdef ELAPSED_FUNC
+! ELAPSED_TYPE start_tv;
+
+ if (p_verbose > 0)
+ ELAPSED_INIT(start_tv);
+--- 7494,7500 ----
+ int (*oldIOhandler)();
+ #endif
+ # ifdef ELAPSED_FUNC
+! elapsed_T start_tv;
+
+ if (p_verbose > 0)
+ ELAPSED_INIT(start_tv);
+*** ../vim-8.1.0769/src/vim.h 2019-01-17 17:13:25.924984061 +0100
+--- src/vim.h 2019-01-17 22:20:19.229226723 +0100
+***************
+*** 2625,2641 ****
+ # define ELAPSED_TIMEVAL
+ # define ELAPSED_INIT(v) gettimeofday(&v, NULL)
+ # define ELAPSED_FUNC(v) elapsed(&v)
+! # define ELAPSED_TYPE struct timeval
+! long elapsed(struct timeval *start_tv);
+! #else
+! # if defined(WIN32)
+! # define ELAPSED_TICKCOUNT
+! # define ELAPSED_INIT(v) v = GetTickCount()
+! # define ELAPSED_FUNC(v) elapsed(v)
+! # define ELAPSED_TYPE DWORD
+! # ifndef PROTO
+! long elapsed(DWORD start_tick);
+! # endif
+ # endif
+ #endif
+
+--- 2625,2639 ----
+ # define ELAPSED_TIMEVAL
+ # define ELAPSED_INIT(v) gettimeofday(&v, NULL)
+ # define ELAPSED_FUNC(v) elapsed(&v)
+! typedef struct timeval elapsed_T;
+! long elapsed(struct timeval *start_tv);
+! #elif defined(WIN32)
+! # define ELAPSED_TICKCOUNT
+! # define ELAPSED_INIT(v) v = GetTickCount()
+! # define ELAPSED_FUNC(v) elapsed(v)
+! typedef DWORD elapsed_T;
+! # ifndef PROTO
+! long elapsed(DWORD start_tick);
+ # endif
+ #endif
+
+*** ../vim-8.1.0769/src/version.c 2019-01-17 22:13:50.588531539 +0100
+--- src/version.c 2019-01-17 22:20:47.004998591 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 770,
+ /**/
+
+--
+Eagles may soar, but weasels don't get sucked into jet engines.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0771 b/data/vim/patches/8.1.0771
new file mode 100644
index 000000000..715f925b9
--- /dev/null
+++ b/data/vim/patches/8.1.0771
@@ -0,0 +1,187 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0771
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0771
+Problem: Some shell filetype patterns end in a star.
+Solution: Make sure that patterns not ending in a star are preferred.
+Files: runtime/filetype.vim, runtime/autoload/dist/ft.vim
+
+
+*** ../vim-8.1.0770/runtime/filetype.vim 2018-11-03 19:52:11.333956689 +0100
+--- runtime/filetype.vim 2019-01-18 21:20:27.678878376 +0100
+***************
+*** 1462,1470 ****
+
+ " 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))
+
+ " Shell script (Arch Linux) or PHP file (Drupal)
+ au BufNewFile,BufRead *.install
+--- 1462,1472 ----
+
+ " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
+ " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
+! " NOTE: Patterns ending in a star are further down, these have lower priority.
+! 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))
+!
+
+ " Shell script (Arch Linux) or PHP file (Drupal)
+ au BufNewFile,BufRead *.install
+***************
+*** 1475,1488 ****
+ \ endif
+
+ " tcsh scripts
+! au BufNewFile,BufRead .tcshrc*,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFileTypeShell("tcsh")
+
+ " csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
+! au BufNewFile,BufRead .login*,.cshrc*,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
+
+ " Z-Shell script
+ au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
+! au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
+ au BufNewFile,BufRead *.zsh setf zsh
+
+ " Scheme
+--- 1477,1490 ----
+ \ endif
+
+ " tcsh scripts
+! au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFileTypeShell("tcsh")
+
+ " csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
+! au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
+
+ " Z-Shell script
+ au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
+! au BufNewFile,BufRead .zsh,.zlog,.zcompdump call s:StarSetf('zsh')
+ au BufNewFile,BufRead *.zsh setf zsh
+
+ " Scheme
+***************
+*** 2074,2079 ****
+--- 2076,2095 ----
+ " Remind
+ au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
+
++ " Shell scripts ending in a star
++ au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
++ au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
++ au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))
++
++ " tcsh scripts ending in a star
++ au BufNewFile,BufRead .tcshrc* call dist#ft#SetFileTypeShell("tcsh")
++
++ " csh scripts ending in a star
++ au BufNewFile,BufRead .login*,.cshrc* call dist#ft#CSH()
++
++ " Z-Shell script ending in a star
++ au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
++
+ " Vim script
+ au BufNewFile,BufRead *vimrc* call s:StarSetf('vim')
+
+*** ../vim-8.1.0770/runtime/autoload/dist/ft.vim 2017-12-05 21:37:31.000000000 +0100
+--- runtime/autoload/dist/ft.vim 2019-01-18 21:19:20.775377125 +0100
+***************
+*** 126,132 ****
+ " This function checks if one of the first ten lines start with a '@'. In
+ " that case it is probably a change file.
+ " If the first line starts with # or ! it's probably a ch file.
+! " If a line has "main", "include", "//" ir "/*" it's probably ch.
+ " Otherwise CHILL is assumed.
+ func dist#ft#FTchange()
+ let lnum = 1
+--- 126,132 ----
+ " This function checks if one of the first ten lines start with a '@'. In
+ " that case it is probably a change file.
+ " If the first line starts with # or ! it's probably a ch file.
+! " If a line has "main", "include", "//" or "/*" it's probably ch.
+ " Otherwise CHILL is assumed.
+ func dist#ft#FTchange()
+ let lnum = 1
+***************
+*** 484,489 ****
+--- 484,493 ----
+
+ " Called from filetype.vim and scripts.vim.
+ func dist#ft#SetFileTypeSH(name)
++ if did_filetype()
++ " Filetype was already detected
++ return
++ endif
+ if expand("<amatch>") =~ g:ft_ignore_pat
+ return
+ endif
+***************
+*** 531,536 ****
+--- 535,544 ----
+ " as used for Tcl.
+ " Also called from scripts.vim, thus can't be local to this script.
+ func dist#ft#SetFileTypeShell(name)
++ if did_filetype()
++ " Filetype was already detected
++ return
++ endif
+ if expand("<amatch>") =~ g:ft_ignore_pat
+ return
+ endif
+***************
+*** 551,556 ****
+--- 559,568 ----
+ endfunc
+
+ func dist#ft#CSH()
++ if did_filetype()
++ " Filetype was already detected
++ return
++ endif
+ if exists("g:filetype_csh")
+ call dist#ft#SetFileTypeShell(g:filetype_csh)
+ elseif &shell =~ "tcsh"
+***************
+*** 632,638 ****
+ " Choose context, plaintex, or tex (LaTeX) based on these rules:
+ " 1. Check the first line of the file for "%&<format>".
+ " 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords.
+! " 3. Default to "latex" or to g:tex_flavor, can be set in user's vimrc.
+ func dist#ft#FTtex()
+ let firstline = getline(1)
+ if firstline =~ '^%&\s*\a\+'
+--- 644,650 ----
+ " Choose context, plaintex, or tex (LaTeX) based on these rules:
+ " 1. Check the first line of the file for "%&<format>".
+ " 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords.
+! " 3. Default to "plain" or to g:tex_flavor, can be set in user's vimrc.
+ func dist#ft#FTtex()
+ let firstline = getline(1)
+ if firstline =~ '^%&\s*\a\+'
+*** ../vim-8.1.0770/src/version.c 2019-01-17 22:28:18.901373188 +0100
+--- src/version.c 2019-01-18 21:44:39.609527401 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 771,
+ /**/
+
+--
+Hear about the guy who played a blank tape at full blast?
+The mime next door went nuts.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0772 b/data/vim/patches/8.1.0772
new file mode 100644
index 000000000..c2dee756c
--- /dev/null
+++ b/data/vim/patches/8.1.0772
@@ -0,0 +1,326 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0772
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0772
+Problem: The sign_define_by_name() function is too long.
+Solution: Split it into smaller functions. (Yegappan Lakshmanan,
+ closes #3819)
+Files: src/sign.c
+
+
+*** ../vim-8.1.0771/src/sign.c 2019-01-17 17:36:42.495509219 +0100
+--- src/sign.c 2019-01-18 22:00:14.645875627 +0100
+***************
+*** 727,732 ****
+--- 727,866 ----
+ }
+
+ /*
++ * Allocate a new sign
++ */
++ static sign_T *
++ alloc_new_sign(char_u *name)
++ {
++ sign_T *sp;
++ sign_T *lp;
++ int start = next_sign_typenr;
++
++ // Allocate a new sign.
++ sp = (sign_T *)alloc_clear_id((unsigned)sizeof(sign_T),
++ aid_sign_define_by_name);
++ if (sp == NULL)
++ return NULL;
++
++ // Check that next_sign_typenr is not already being used.
++ // This only happens after wrapping around. Hopefully
++ // another one got deleted and we can use its number.
++ for (lp = first_sign; lp != NULL; )
++ {
++ if (lp->sn_typenr == next_sign_typenr)
++ {
++ ++next_sign_typenr;
++ if (next_sign_typenr == MAX_TYPENR)
++ next_sign_typenr = 1;
++ if (next_sign_typenr == start)
++ {
++ vim_free(sp);
++ emsg(_("E612: Too many signs defined"));
++ return NULL;
++ }
++ lp = first_sign; // start all over
++ continue;
++ }
++ lp = lp->sn_next;
++ }
++
++ sp->sn_typenr = next_sign_typenr;
++ if (++next_sign_typenr == MAX_TYPENR)
++ next_sign_typenr = 1; // wrap around
++
++ sp->sn_name = vim_strsave(name);
++ if (sp->sn_name == NULL) // out of memory
++ {
++ vim_free(sp);
++ return NULL;
++ }
++
++ return sp;
++ }
++
++ /*
++ * Initialize the icon information for a new sign
++ */
++ static void
++ sign_define_init_icon(sign_T *sp, char_u *icon)
++ {
++ vim_free(sp->sn_icon);
++ sp->sn_icon = vim_strsave(icon);
++ backslash_halve(sp->sn_icon);
++ # ifdef FEAT_SIGN_ICONS
++ if (gui.in_use)
++ {
++ out_flush();
++ if (sp->sn_image != NULL)
++ gui_mch_destroy_sign(sp->sn_image);
++ sp->sn_image = gui_mch_register_sign(sp->sn_icon);
++ }
++ # endif
++ }
++
++ /*
++ * Initialize the text for a new sign
++ */
++ static int
++ sign_define_init_text(sign_T *sp, char_u *text)
++ {
++ char_u *s;
++ char_u *endp;
++ int cells;
++ int len;
++
++ endp = text + (int)STRLEN(text);
++
++ // Remove backslashes so that it is possible to use a space.
++ for (s = text; s + 1 < endp; ++s)
++ if (*s == '\\')
++ {
++ STRMOVE(s, s + 1);
++ --endp;
++ }
++
++ // Count cells and check for non-printable chars
++ # ifdef FEAT_MBYTE
++ if (has_mbyte)
++ {
++ cells = 0;
++ for (s = text; s < endp; s += (*mb_ptr2len)(s))
++ {
++ if (!vim_isprintc((*mb_ptr2char)(s)))
++ break;
++ cells += (*mb_ptr2cells)(s);
++ }
++ }
++ else
++ # endif
++ {
++ for (s = text; s < endp; ++s)
++ if (!vim_isprintc(*s))
++ break;
++ cells = (int)(s - text);
++ }
++
++ // Currently sign text must be one or two display cells
++ if (s != endp || cells < 1 || cells > 2)
++ {
++ semsg(_("E239: Invalid sign text: %s"), text);
++ return FAIL;
++ }
++
++ vim_free(sp->sn_text);
++ // Allocate one byte more if we need to pad up
++ // with a space.
++ len = (int)(endp - text + ((cells == 1) ? 1 : 0));
++ sp->sn_text = vim_strnsave(text, len);
++
++ // For single character sign text, pad with a space.
++ if (sp->sn_text != NULL && cells == 1)
++ STRCPY(sp->sn_text + len - 1, " ");
++
++ return OK;
++ }
++
++ /*
+ * Define a new sign or update an existing sign
+ */
+ int
+***************
+*** 743,790 ****
+ sp = sign_find(name, &sp_prev);
+ if (sp == NULL)
+ {
+! sign_T *lp;
+! int start = next_sign_typenr;
+!
+! // Allocate a new sign.
+! sp = (sign_T *)alloc_clear_id((unsigned)sizeof(sign_T),
+! aid_sign_define_by_name);
+ if (sp == NULL)
+ return FAIL;
+
+- // Check that next_sign_typenr is not already being used.
+- // This only happens after wrapping around. Hopefully
+- // another one got deleted and we can use its number.
+- for (lp = first_sign; lp != NULL; )
+- {
+- if (lp->sn_typenr == next_sign_typenr)
+- {
+- ++next_sign_typenr;
+- if (next_sign_typenr == MAX_TYPENR)
+- next_sign_typenr = 1;
+- if (next_sign_typenr == start)
+- {
+- vim_free(sp);
+- emsg(_("E612: Too many signs defined"));
+- return FAIL;
+- }
+- lp = first_sign; // start all over
+- continue;
+- }
+- lp = lp->sn_next;
+- }
+-
+- sp->sn_typenr = next_sign_typenr;
+- if (++next_sign_typenr == MAX_TYPENR)
+- next_sign_typenr = 1; // wrap around
+-
+- sp->sn_name = vim_strsave(name);
+- if (sp->sn_name == NULL) // out of memory
+- {
+- vim_free(sp);
+- return FAIL;
+- }
+-
+ // add the new sign to the list of signs
+ if (sp_prev == NULL)
+ first_sign = sp;
+--- 877,886 ----
+ sp = sign_find(name, &sp_prev);
+ if (sp == NULL)
+ {
+! sp = alloc_new_sign(name);
+ if (sp == NULL)
+ return FAIL;
+
+ // add the new sign to the list of signs
+ if (sp_prev == NULL)
+ first_sign = sp;
+***************
+*** 794,866 ****
+
+ // set values for a defined sign.
+ if (icon != NULL)
+! {
+! vim_free(sp->sn_icon);
+! sp->sn_icon = vim_strsave(icon);
+! backslash_halve(sp->sn_icon);
+! # ifdef FEAT_SIGN_ICONS
+! if (gui.in_use)
+! {
+! out_flush();
+! if (sp->sn_image != NULL)
+! gui_mch_destroy_sign(sp->sn_image);
+! sp->sn_image = gui_mch_register_sign(sp->sn_icon);
+! }
+! # endif
+! }
+
+! if (text != NULL)
+! {
+! char_u *s;
+! char_u *endp;
+! int cells;
+! int len;
+!
+! endp = text + (int)STRLEN(text);
+! for (s = text; s + 1 < endp; ++s)
+! if (*s == '\\')
+! {
+! // Remove a backslash, so that it is possible
+! // to use a space.
+! STRMOVE(s, s + 1);
+! --endp;
+! }
+! # ifdef FEAT_MBYTE
+! // Count cells and check for non-printable chars
+! if (has_mbyte)
+! {
+! cells = 0;
+! for (s = text; s < endp; s += (*mb_ptr2len)(s))
+! {
+! if (!vim_isprintc((*mb_ptr2char)(s)))
+! break;
+! cells += (*mb_ptr2cells)(s);
+! }
+! }
+! else
+! # endif
+! {
+! for (s = text; s < endp; ++s)
+! if (!vim_isprintc(*s))
+! break;
+! cells = (int)(s - text);
+! }
+! // Currently must be one or two display cells
+! if (s != endp || cells < 1 || cells > 2)
+! {
+! semsg(_("E239: Invalid sign text: %s"), text);
+! return FAIL;
+! }
+!
+! vim_free(sp->sn_text);
+! // Allocate one byte more if we need to pad up
+! // with a space.
+! len = (int)(endp - text + ((cells == 1) ? 1 : 0));
+! sp->sn_text = vim_strnsave(text, len);
+!
+! if (sp->sn_text != NULL && cells == 1)
+! STRCPY(sp->sn_text + len - 1, " ");
+! }
+
+ if (linehl != NULL)
+ sp->sn_line_hl = syn_check_group(linehl, (int)STRLEN(linehl));
+--- 890,899 ----
+
+ // set values for a defined sign.
+ if (icon != NULL)
+! sign_define_init_icon(sp, icon);
+
+! if (text != NULL && (sign_define_init_text(sp, text) == FAIL))
+! return FAIL;
+
+ if (linehl != NULL)
+ sp->sn_line_hl = syn_check_group(linehl, (int)STRLEN(linehl));
+*** ../vim-8.1.0771/src/version.c 2019-01-18 21:45:14.593232311 +0100
+--- src/version.c 2019-01-18 21:59:53.034047592 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 772,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+246. You use up your free 1 Gbyte in two days.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0773 b/data/vim/patches/8.1.0773
new file mode 100644
index 000000000..79de63642
--- /dev/null
+++ b/data/vim/patches/8.1.0773
@@ -0,0 +1,285 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0773
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0773
+Problem: Not all crypt code is tested.
+Solution: Disable unused crypt code. Add more test coverage.
+Files: src/structs.h, src/crypt.c, src/testdir/test_crypt.vim,
+ src/proto/crypt.pro, src/fileio.c
+
+
+*** ../vim-8.1.0772/src/structs.h 2019-01-13 23:38:33.411773162 +0100
+--- src/structs.h 2019-01-18 22:24:31.023802649 +0100
+***************
+*** 1940,1945 ****
+--- 1940,1949 ----
+ # define CRYPT_M_BF 1
+ # define CRYPT_M_BF2 2
+ # define CRYPT_M_COUNT 3 /* number of crypt methods */
++
++ // Currently all crypt methods work inplace. If one is added that isn't then
++ // define this.
++ // # define CRYPT_NOT_INPLACE 1
+ #endif
+
+
+*** ../vim-8.1.0772/src/crypt.c 2019-01-13 23:38:33.379773390 +0100
+--- src/crypt.c 2019-01-18 22:30:47.648948055 +0100
+***************
+*** 34,40 ****
+--- 34,42 ----
+ char *magic; /* magic bytes stored in file header */
+ int salt_len; /* length of salt, or 0 when not using salt */
+ int seed_len; /* length of seed, or 0 when not using salt */
++ #ifdef CRYPT_NOT_INPLACE
+ int works_inplace; /* encryption/decryption can be done in-place */
++ #endif
+ int whole_undofile; /* whole undo file is encrypted */
+
+ /* Optional function pointer for a self-test. */
+***************
+*** 80,86 ****
+--- 82,90 ----
+ "VimCrypt~01!",
+ 0,
+ 0,
++ #ifdef CRYPT_NOT_INPLACE
+ TRUE,
++ #endif
+ FALSE,
+ NULL,
+ crypt_zip_init,
+***************
+*** 95,101 ****
+--- 99,107 ----
+ "VimCrypt~02!",
+ 8,
+ 8,
++ #ifdef CRYPT_NOT_INPLACE
+ TRUE,
++ #endif
+ FALSE,
+ blowfish_self_test,
+ crypt_blowfish_init,
+***************
+*** 110,116 ****
+--- 116,124 ----
+ "VimCrypt~03!",
+ 8,
+ 8,
++ #ifdef CRYPT_NOT_INPLACE
+ TRUE,
++ #endif
+ TRUE,
+ blowfish_self_test,
+ crypt_blowfish_init,
+***************
+*** 167,172 ****
+--- 175,181 ----
+ return -1;
+ }
+
++ #ifdef CRYPT_NOT_INPLACE
+ /*
+ * Return TRUE if the crypt method for "method_nr" can be done in-place.
+ */
+***************
+*** 175,180 ****
+--- 184,190 ----
+ {
+ return cryptmethods[state->method_nr].works_inplace;
+ }
++ #endif
+
+ /*
+ * Get the crypt method for buffer "buf" as a number.
+***************
+*** 366,371 ****
+--- 376,382 ----
+ vim_free(state);
+ }
+
++ #ifdef CRYPT_NOT_INPLACE
+ /*
+ * Encode "from[len]" and store the result in a newly allocated buffer, which
+ * is stored in "newptr".
+***************
+*** 422,427 ****
+--- 433,439 ----
+ method->decode_fn(state, ptr, len, *newptr);
+ return len;
+ }
++ #endif
+
+ /*
+ * Encrypting "from[len]" into "to[len]".
+***************
+*** 436,441 ****
+--- 448,454 ----
+ cryptmethods[state->method_nr].encode_fn(state, from, len, to);
+ }
+
++ #if 0 // unused
+ /*
+ * decrypting "from[len]" into "to[len]".
+ */
+***************
+*** 448,453 ****
+--- 461,467 ----
+ {
+ cryptmethods[state->method_nr].decode_fn(state, from, len, to);
+ }
++ #endif
+
+ /*
+ * Simple inplace encryption, modifies "buf[len]" in place.
+*** ../vim-8.1.0772/src/testdir/test_crypt.vim 2016-09-26 20:10:53.000000000 +0200
+--- src/testdir/test_crypt.vim 2019-01-18 22:44:26.374673632 +0100
+***************
+*** 34,39 ****
+--- 34,40 ----
+ \ 'line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx']
+ call setline(1, text)
+ call feedkeys(":X\<CR>foobar\<CR>foobar\<CR>", 'xt')
++ call assert_equal('*****', &key)
+ w!
+ bwipe!
+ call feedkeys(":split Xtest.txt\<CR>foobar\<CR>", 'xt')
+***************
+*** 81,83 ****
+--- 82,113 ----
+ func Test_uncrypt_blowfish2()
+ call Uncrypt_stable('blowfish', "VimCrypt~03!\u001e\u00d1N\u00e3;\u00d3\u00c0\u00a0^C)\u0004\u00f7\u007f.\u00b6\u00abF\u000eS\u0019\u00e0\u008b6\u00d2[T\u00cb\u00a7\u0085\u00d8\u00be9\u000b\u00812\u000bQ\u00b3\u00cc@\u0097\u000f\u00df\u009a\u00adIv\u00aa.\u00d8\u00c9\u00ee\u009e`\u00bd$\u00af%\u00d0", "barburp", ["abcdefghijklmnopqrstuvwxyz", "!@#$%^&*()_+=-`~"])
+ endfunc
++
++ func Test_uncrypt_unknown_method()
++ split Xuncrypt_unknown.txt
++ set bin noeol key= fenc=latin1
++ call setline(1, "VimCrypt~93!\u001e\u00d1")
++ w!
++ bwipe!
++ set nobin
++ call assert_fails(":split Xuncrypt_unknown.txt", 'E821:')
++
++ bwipe!
++ call delete('Xuncrypt_unknown.txt')
++ set key=
++ endfunc
++
++ func Test_crypt_key_mismatch()
++ set cryptmethod=blowfish
++
++ split Xtest.txt
++ call setline(1, 'nothing')
++ call feedkeys(":X\<CR>foobar\<CR>nothing\<CR>", 'xt')
++ call assert_match("Keys don't match!", execute(':2messages'))
++ call assert_equal('', &key)
++ call feedkeys("\<CR>\<CR>", 'xt')
++
++ set cryptmethod&
++ bwipe!
++ endfunc
++
+*** ../vim-8.1.0772/src/proto/crypt.pro 2018-05-17 13:52:30.000000000 +0200
+--- src/proto/crypt.pro 2019-01-18 22:30:53.692902061 +0100
+***************
+*** 1,7 ****
+ /* crypt.c */
+ int crypt_method_nr_from_name(char_u *name);
+ int crypt_method_nr_from_magic(char *ptr, int len);
+- int crypt_works_inplace(cryptstate_T *state);
+ int crypt_get_method_nr(buf_T *buf);
+ int crypt_whole_undofile(int method_nr);
+ int crypt_get_header_len(int method_nr);
+--- 1,6 ----
+***************
+*** 12,21 ****
+ cryptstate_T *crypt_create_from_file(FILE *fp, char_u *key);
+ cryptstate_T *crypt_create_for_writing(int method_nr, char_u *key, char_u **header, int *header_len);
+ void crypt_free_state(cryptstate_T *state);
+- long crypt_encode_alloc(cryptstate_T *state, char_u *from, size_t len, char_u **newptr);
+- long crypt_decode_alloc(cryptstate_T *state, char_u *ptr, long len, char_u **newptr);
+ void crypt_encode(cryptstate_T *state, char_u *from, size_t len, char_u *to);
+- void crypt_decode(cryptstate_T *state, char_u *from, size_t len, char_u *to);
+ void crypt_encode_inplace(cryptstate_T *state, char_u *buf, size_t len);
+ void crypt_decode_inplace(cryptstate_T *state, char_u *buf, size_t len);
+ void crypt_free_key(char_u *key);
+--- 11,17 ----
+*** ../vim-8.1.0772/src/fileio.c 2019-01-17 17:13:25.920984090 +0100
+--- src/fileio.c 2019-01-18 22:29:52.729365786 +0100
+***************
+*** 1381,1389 ****
+--- 1381,1392 ----
+ if (cryptkey != NULL && curbuf->b_cryptstate != NULL
+ && size > 0)
+ {
++ # ifdef CRYPT_NOT_INPLACE
+ if (crypt_works_inplace(curbuf->b_cryptstate))
+ {
++ # endif
+ crypt_decode_inplace(curbuf->b_cryptstate, ptr, size);
++ # ifdef CRYPT_NOT_INPLACE
+ }
+ else
+ {
+***************
+*** 1434,1439 ****
+--- 1437,1443 ----
+ }
+ size = decrypted_size;
+ }
++ # endif
+ }
+ #endif
+
+***************
+*** 5768,5776 ****
+--- 5772,5783 ----
+ {
+ /* Encrypt the data. Do it in-place if possible, otherwise use an
+ * allocated buffer. */
++ # ifdef CRYPT_NOT_INPLACE
+ if (crypt_works_inplace(ip->bw_buffer->b_cryptstate))
+ {
++ # endif
+ crypt_encode_inplace(ip->bw_buffer->b_cryptstate, buf, len);
++ # ifdef CRYPT_NOT_INPLACE
+ }
+ else
+ {
+***************
+*** 5783,5788 ****
+--- 5790,5796 ----
+ vim_free(outbuf);
+ return (wlen < len) ? FAIL : OK;
+ }
++ # endif
+ }
+ #endif
+
+*** ../vim-8.1.0772/src/version.c 2019-01-18 22:01:39.017406155 +0100
+--- src/version.c 2019-01-18 22:47:51.817096630 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 773,
+ /**/
+
+
+--
+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.0774 b/data/vim/patches/8.1.0774
new file mode 100644
index 000000000..d7cd8bb13
--- /dev/null
+++ b/data/vim/patches/8.1.0774
@@ -0,0 +1,184 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0774
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0774
+Problem: VMS build is missing the blob file.
+Solution: Add the blob file to the build rules. (Zoltan Arpadffy)
+Files: src/Make_vms.mms, runtime/doc/os_vms.txt
+
+
+*** ../vim-8.1.0773/src/Make_vms.mms 2019-01-17 17:13:25.920984090 +0100
+--- src/Make_vms.mms 2019-01-18 22:55:14.565698414 +0100
+***************
+*** 2,8 ****
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 Jan 17
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+--- 2,8 ----
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 Jan 18
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+***************
+*** 312,328 ****
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+! SRC = arabic.c beval.obj blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
+! ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
+! hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
+ misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+ spell.c spellfile.c syntax.c tag.c term.c termlib.c textprop.c ui.c undo.c userfunc.c version.c screen.c \
+ window.c os_unix.c os_vms.c pathdef.c \
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+! OBJ = arabic.obj beval.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj edit.obj eval.obj \
+! evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
+ if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
+--- 312,328 ----
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+! SRC = arabic.c beval.obj blob.c blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c \
+! evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c \
+! getchar.c hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
+ misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+ spell.c spellfile.c syntax.c tag.c term.c termlib.c textprop.c ui.c undo.c userfunc.c version.c screen.c \
+ window.c os_unix.c os_vms.c pathdef.c \
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+! OBJ = arabic.obj beval.obj blob.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj \
+! edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
+ if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
+***************
+*** 500,506 ****
+ .ENDIF
+
+ arabic.obj : arabic.c vim.h
+! blowfish.obj : blowfish.c vim.h
+ buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+--- 500,507 ----
+ .ENDIF
+
+ arabic.obj : arabic.c vim.h
+! blowfish.obj : blowfish.c vim.h [.auto]config.h feature.h os_unix.h
+! blob.obj : blob.c vim.h [.auto]config.h feature.h os_unix.h
+ buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+*** ../vim-8.1.0773/runtime/doc/os_vms.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_vms.txt 2019-01-18 22:57:11.916797763 +0100
+***************
+*** 1,4 ****
+! *os_vms.txt* For Vim version 8.1. Last change: 2018 May 06
+
+
+ VIM REFERENCE MANUAL
+--- 1,4 ----
+! *os_vms.txt* For Vim version 8.1. Last change: 2019 Jan 18
+
+
+ VIM REFERENCE MANUAL
+***************
+*** 104,109 ****
+--- 104,111 ----
+ You may want to use GUI with GTK icons, then you have to download and install
+ GTK for OpenVMS or at least runtime shareable images - LIBGTK from
+ polarhome.com
++ Post 7.2 Vim uses GTK2+ while the last GTK on OpenVMS is 1.2.10, thefore
++ the GTK build is no longer available.
+
+ For more advanced questions, please send your problem to Vim on VMS mailing
+ list <vim-vms@polarhome.com>
+***************
+*** 201,210 ****
+
+ Example LOGIN.COM: >
+
+! $ define/nolog VIM RF10:[UTIL.VIM]
+ $ vi*m :== mcr VIM:VIM.EXE
+ $ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
+! $ set disp/create/node=192.168.5.223/trans=tcpip
+
+ Note: This set-up should be enough, if you are working on a standalone server or
+ clustered environment, but if you want to use Vim as an internode editor in
+--- 203,212 ----
+
+ Example LOGIN.COM: >
+
+! $ define/nolog VIM DKA0:[UTIL.VIM81]
+ $ vi*m :== mcr VIM:VIM.EXE
+ $ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
+! $ set disp/create/node=192.168.10.202/trans=tcpip
+
+ Note: This set-up should be enough, if you are working on a standalone server or
+ clustered environment, but if you want to use Vim as an internode editor in
+***************
+*** 764,769 ****
+--- 766,781 ----
+
+ 9. VMS related changes *vms-changes*
+
++ Version 8.1
++ - make necessary changes to build v8.1 on VMS
++
++ Version 8.0
++ - solve the 100% cpu usage issue while waiting for a keystroke
++ - correct the VMS warnings and errors around handling the INFINITY (used in json.c)
++ - minor VMS port related changes
++ - correct the make_vms.mms file for 8.0
++ - fix [.TESTDIR]make_vms.mms for 8.0
++
+ Version 7.4
+ - Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name"
+ add _un_ at the beginning to keep the extension
+***************
+*** 952,955 ****
+ Bruce Hunsaker <BNHunsaker@chq.byu.edu>
+ Sandor Kopanyi <sandor.kopanyi@mailbox.hu>
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 964,967 ----
+ Bruce Hunsaker <BNHunsaker@chq.byu.edu>
+ Sandor Kopanyi <sandor.kopanyi@mailbox.hu>
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0773/src/version.c 2019-01-18 22:48:30.900796633 +0100
+--- src/version.c 2019-01-18 22:57:21.924720954 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 774,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+249. You've forgotten what the outside looks like.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0775 b/data/vim/patches/8.1.0775
new file mode 100644
index 000000000..c97de0622
--- /dev/null
+++ b/data/vim/patches/8.1.0775
@@ -0,0 +1,99 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0775
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0775
+Problem: Matching too many files as zsh. (Danek Duvall)
+Solution: Be more specific with zsh filetype patterns.
+Files: runtime/filetype.vim
+
+
+*** ../vim-8.1.0774/runtime/filetype.vim 2019-01-18 21:45:14.593232311 +0100
+--- runtime/filetype.vim 2019-01-18 23:08:12.427728647 +0100
+***************
+*** 1476,1490 ****
+ \ call dist#ft#SetFileTypeSH("bash") |
+ \ endif
+
+! " tcsh scripts
+ au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFileTypeShell("tcsh")
+
+ " csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
+ au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
+
+! " Z-Shell script
+ au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
+! au BufNewFile,BufRead .zsh,.zlog,.zcompdump call s:StarSetf('zsh')
+ au BufNewFile,BufRead *.zsh setf zsh
+
+ " Scheme
+--- 1476,1491 ----
+ \ call dist#ft#SetFileTypeSH("bash") |
+ \ endif
+
+! " tcsh scripts (patterns ending in a star further below)
+ au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFileTypeShell("tcsh")
+
+ " csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
++ " (patterns ending in a start further below)
+ au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
+
+! " Z-Shell script (patterns ending in a star further below)
+ au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
+! au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh
+ au BufNewFile,BufRead *.zsh setf zsh
+
+ " Scheme
+***************
+*** 2087,2095 ****
+ " csh scripts ending in a star
+ au BufNewFile,BufRead .login*,.cshrc* call dist#ft#CSH()
+
+- " Z-Shell script ending in a star
+- au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
+-
+ " Vim script
+ au BufNewFile,BufRead *vimrc* call s:StarSetf('vim')
+
+--- 2088,2093 ----
+***************
+*** 2117,2123 ****
+ " yum conf (close enough to dosini)
+ au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
+
+! " Z-Shell script
+ au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
+
+
+--- 2115,2122 ----
+ " yum conf (close enough to dosini)
+ au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
+
+! " Z-Shell script ending in a star
+! au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
+ au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
+
+
+*** ../vim-8.1.0774/src/version.c 2019-01-18 22:58:56.431995640 +0100
+--- src/version.c 2019-01-18 23:13:30.044827750 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 775,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+251. You've never seen your closest friends who usually live WAY too far away.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0776 b/data/vim/patches/8.1.0776
new file mode 100644
index 000000000..632b6a5e5
--- /dev/null
+++ b/data/vim/patches/8.1.0776
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0776
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0776
+Problem: Travis does not build a version without GUI on Linux.
+Solution: Add an environment for tiny features without GUI.
+Files: .travis.yml
+
+
+*** ../vim-8.1.0775/.travis.yml 2018-12-18 22:04:01.264228261 +0100
+--- .travis.yml 2019-01-19 13:44:58.038251268 +0100
+***************
+*** 10,15 ****
+--- 10,16 ----
+ - gcc
+
+ env:
++ - BUILD=yes TEST=test COVERAGE=no FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ - 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"
+***************
+*** 28,37 ****
+--- 29,41 ----
+
+ # instead of a 2*2*7 matrix (2*os + 2*compiler + 7*env),
+ # exclude some builds on mac os x and linux
++ # on mac os x "tiny" is always without GUI
+ # linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
+ matrix:
+ exclude:
+ - os: osx
++ env: BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
++ - os: osx
+ env: BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
+ - os: osx
+ env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
+*** ../vim-8.1.0775/src/version.c 2019-01-18 23:14:39.820211241 +0100
+--- src/version.c 2019-01-19 13:45:50.221893906 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 776,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+252. You vote for foreign officials.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0777 b/data/vim/patches/8.1.0777
new file mode 100644
index 000000000..3a6d34e65
--- /dev/null
+++ b/data/vim/patches/8.1.0777
@@ -0,0 +1,198 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0777
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0777
+Problem: Win32: using pipes for channel does not work well.
+Solution: Use a larger buffer and handle overlaps. (Yasuhiro Matsumoto,
+ closes #3782)
+Files: src/channel.c, src/os_win32.c
+
+
+*** ../vim-8.1.0776/src/channel.c 2019-01-17 22:28:18.897373219 +0100
+--- src/channel.c 2019-01-19 14:32:48.390370019 +0100
+***************
+*** 80,90 ****
+ static int
+ fd_write(sock_T fd, char *buf, size_t len)
+ {
+! HANDLE h = (HANDLE)fd;
+! DWORD nwrite;
+!
+! if (!WriteFile(h, buf, (DWORD)len, &nwrite, NULL))
+! return -1;
+ return (int)nwrite;
+ }
+
+--- 80,102 ----
+ static int
+ fd_write(sock_T fd, char *buf, size_t len)
+ {
+! HANDLE h = (HANDLE)fd;
+! DWORD nwrite;
+! OVERLAPPED ov;
+!
+! // If the pipe overflows while the job does not read the data, WriteFile
+! // will block forever. This abandons the write.
+! memset(&ov, 0, sizeof(ov));
+! if (!WriteFile(h, buf, (DWORD)len, &nwrite, &ov))
+! {
+! DWORD err = GetLastError();
+!
+! if (err != ERROR_IO_PENDING)
+! return -1;
+! if (!GetOverlappedResult(h, &ov, &nwrite, FALSE))
+! return -1;
+! FlushFileBuffers(h);
+! }
+ return (int)nwrite;
+ }
+
+***************
+*** 3168,3187 ****
+ if (r && nread > 0)
+ return CW_READY;
+ if (r == 0)
+! {
+! DWORD err = GetLastError();
+!
+! if (err != ERROR_BAD_PIPE && err != ERROR_BROKEN_PIPE)
+! return CW_ERROR;
+!
+! if (channel->ch_named_pipe)
+! {
+! DisconnectNamedPipe((HANDLE)fd);
+! ConnectNamedPipe((HANDLE)fd, NULL);
+! }
+! else
+! return CW_ERROR;
+! }
+
+ /* perhaps write some buffer lines */
+ channel_write_any_lines();
+--- 3180,3186 ----
+ if (r && nread > 0)
+ return CW_READY;
+ if (r == 0)
+! return CW_ERROR;
+
+ /* perhaps write some buffer lines */
+ channel_write_any_lines();
+***************
+*** 3812,3828 ****
+ if (part == PART_SOCK)
+ res = sock_write(fd, (char *)buf, len);
+ else
+- {
+ res = fd_write(fd, (char *)buf, len);
+- #ifdef WIN32
+- if (channel->ch_named_pipe && res < 0)
+- {
+- DisconnectNamedPipe((HANDLE)fd);
+- ConnectNamedPipe((HANDLE)fd, NULL);
+- }
+- #endif
+-
+- }
+ if (res < 0 && (errno == EWOULDBLOCK
+ #ifdef EAGAIN
+ || errno == EAGAIN
+--- 3811,3817 ----
+*** ../vim-8.1.0776/src/os_win32.c 2019-01-13 23:38:33.407773189 +0100
+--- src/os_win32.c 2019-01-19 14:36:01.957057721 +0100
+***************
+*** 5428,5433 ****
+--- 5428,5476 ----
+ # endif
+ }
+
++ /*
++ * Create a pair of pipes.
++ * Return TRUE for success, FALSE for failure.
++ */
++ static BOOL
++ create_pipe_pair(HANDLE handles[2])
++ {
++ static LONG s;
++ char name[64];
++ SECURITY_ATTRIBUTES sa;
++
++ sprintf(name, "\\\\?\\pipe\\vim-%08lx-%08lx",
++ GetCurrentProcessId(),
++ InterlockedIncrement(&s));
++
++ // Create named pipe. Max size of named pipe is 65535.
++ handles[1] = CreateNamedPipe(
++ name,
++ PIPE_ACCESS_OUTBOUND | FILE_FLAG_OVERLAPPED,
++ PIPE_TYPE_BYTE | PIPE_NOWAIT,
++ 1, 65535, 0, 0, NULL);
++
++ if (handles[1] == INVALID_HANDLE_VALUE)
++ return FALSE;
++
++ sa.nLength = sizeof(sa);
++ sa.bInheritHandle = TRUE;
++ sa.lpSecurityDescriptor = NULL;
++
++ handles[0] = CreateFile(name,
++ FILE_GENERIC_READ,
++ FILE_SHARE_READ, &sa,
++ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
++
++ if (handles[0] == INVALID_HANDLE_VALUE)
++ {
++ CloseHandle(handles[1]);
++ return FALSE;
++ }
++
++ return TRUE;
++ }
++
+ void
+ mch_job_start(char *cmd, job_T *job, jobopt_T *options)
+ {
+***************
+*** 5493,5501 ****
+ goto failed;
+ }
+ }
+! else if (!use_null_for_in &&
+! (!CreatePipe(&ifd[0], &ifd[1], &saAttr, 0)
+! || !SetHandleInformation(ifd[1], HANDLE_FLAG_INHERIT, 0)))
+ goto failed;
+
+ if (use_file_for_out)
+--- 5536,5544 ----
+ goto failed;
+ }
+ }
+! else if (!use_null_for_in
+! && (!create_pipe_pair(ifd)
+! || !SetHandleInformation(ifd[1], HANDLE_FLAG_INHERIT, 0)))
+ goto failed;
+
+ if (use_file_for_out)
+*** ../vim-8.1.0776/src/version.c 2019-01-19 13:46:46.417507738 +0100
+--- src/version.c 2019-01-19 14:31:44.254801032 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 777,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+253. You wait for a slow loading web page before going to the 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.0778 b/data/vim/patches/8.1.0778
new file mode 100644
index 000000000..4435a0360
--- /dev/null
+++ b/data/vim/patches/8.1.0778
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0778
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0778
+Problem: Terminal test fails on MS-Windows.
+Solution: Temporarily skip the test on MS-Windows. Do run it both in
+ terminal and GUI on other systems.
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0777/src/testdir/test_terminal.vim 2019-01-17 22:13:50.588531539 +0100
+--- src/testdir/test_terminal.vim 2019-01-19 15:24:17.501350431 +0100
+***************
+*** 643,650 ****
+ endfunc
+
+ func Test_terminal_no_cmd()
+! " Todo: make this work in the GUI
+! if !has('gui_running')
+ return
+ endif
+ let buf = term_start('NONE', {})
+--- 643,650 ----
+ endfunc
+
+ func Test_terminal_no_cmd()
+! " Todo: make this work on Win32 again
+! if has('win32')
+ return
+ endif
+ let buf = term_start('NONE', {})
+*** ../vim-8.1.0777/src/version.c 2019-01-19 14:36:56.796683378 +0100
+--- src/version.c 2019-01-19 15:26:09.596586904 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 778,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+254. You wake up daily with your keyboard printed on your forehead.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0779 b/data/vim/patches/8.1.0779
new file mode 100644
index 000000000..68c903bfd
--- /dev/null
+++ b/data/vim/patches/8.1.0779
@@ -0,0 +1,8160 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0779
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0779
+Problem: Argument for message functions is inconsistent.
+Solution: Make first argument to msg() "char *".
+Files: src/buffer.c, src/crypt.c, src/edit.c, src/ex_cmds.c, src/eval.c,
+ src/ex_cmds2.c, src/ex_docmd.c, src/ex_getln.c, src/farsi.c,
+ src/if_cscope.c, src/fileio.c, src/getchar.c, src/globals.h,
+ src/gui.c, src/if_perl.xs, src/netbeans.c, src/gui_w32.c,
+ src/hardcopy.c, src/if_mzsch.c, src/if_py_both.h, src/if_ruby.c,
+ src/if_tcl.c, src/mark.c, src/mbyte.c, src/menu.c, src/memline.c,
+ src/message.c, src/misc1.c, src/misc2.c, src/normal.c, src/ops.c,
+ src/option.c, src/os_amiga.c, src/os_unix.c, src/os_win32.c,
+ src/proto/message.pro, src/quickfix.c, src/sign.c, src/regexp.c,
+ src/ui.c, src/screen.c, src/search.c, src/spell.c,
+ src/spellfile.c, src/syntax.c, src/tag.c, src/term.c, src/undo.c,
+ src/userfunc.c, src/version.c, src/vim.h, src/window.c,
+ src/proto/eval.pro, src/evalfunc.c, src/ex_eval.c, src/farsi.h
+
+
+*** ../vim-8.1.0778/src/buffer.c 2019-01-17 15:43:21.753878419 +0100
+--- src/buffer.c 2019-01-19 17:28:36.851024977 +0100
+***************
+*** 1083,1089 ****
+ /* User selected Recover at ATTENTION prompt. */
+ msg_scroll = TRUE;
+ ml_recover();
+! MSG_PUTS("\n"); /* don't overwrite the last message */
+ cmdline_row = msg_row;
+ do_modelines(0);
+
+--- 1083,1089 ----
+ /* User selected Recover at ATTENTION prompt. */
+ msg_scroll = TRUE;
+ ml_recover();
+! msg_puts("\n"); /* don't overwrite the last message */
+ cmdline_row = msg_row;
+ do_modelines(0);
+
+***************
+*** 3449,3465 ****
+ {
+ char_u *name;
+ int n;
+! char_u *p;
+! char_u *buffer;
+ size_t len;
+
+! buffer = alloc(IOSIZE);
+ if (buffer == NULL)
+ return;
+
+ if (fullname > 1) /* 2 CTRL-G: include buffer number */
+ {
+! vim_snprintf((char *)buffer, IOSIZE, "buf %d: ", curbuf->b_fnum);
+ p = buffer + STRLEN(buffer);
+ }
+ else
+--- 3449,3465 ----
+ {
+ char_u *name;
+ int n;
+! char *p;
+! char *buffer;
+ size_t len;
+
+! buffer = (char *)alloc(IOSIZE);
+ if (buffer == NULL)
+ return;
+
+ if (fullname > 1) /* 2 CTRL-G: include buffer number */
+ {
+! vim_snprintf(buffer, IOSIZE, "buf %d: ", curbuf->b_fnum);
+ p = buffer + STRLEN(buffer);
+ }
+ else
+***************
+*** 3467,3484 ****
+
+ *p++ = '"';
+ if (buf_spname(curbuf) != NULL)
+! vim_strncpy(p, buf_spname(curbuf), IOSIZE - (p - buffer) - 1);
+ else
+ {
+ if (!fullname && curbuf->b_fname != NULL)
+ name = curbuf->b_fname;
+ else
+ name = curbuf->b_ffname;
+! home_replace(shorthelp ? curbuf : NULL, name, p,
+ (int)(IOSIZE - (p - buffer)), TRUE);
+ }
+
+! vim_snprintf_add((char *)buffer, IOSIZE, "\"%s%s%s%s%s%s",
+ curbufIsChanged() ? (shortmess(SHM_MOD)
+ ? " [+]" : _(" [Modified]")) : " ",
+ (curbuf->b_flags & BF_NOTEDITED)
+--- 3467,3484 ----
+
+ *p++ = '"';
+ if (buf_spname(curbuf) != NULL)
+! vim_strncpy((char_u *)p, buf_spname(curbuf), IOSIZE - (p - buffer) - 1);
+ else
+ {
+ if (!fullname && curbuf->b_fname != NULL)
+ name = curbuf->b_fname;
+ else
+ name = curbuf->b_ffname;
+! home_replace(shorthelp ? curbuf : NULL, name, (char_u *)p,
+ (int)(IOSIZE - (p - buffer)), TRUE);
+ }
+
+! vim_snprintf_add(buffer, IOSIZE, "\"%s%s%s%s%s%s",
+ curbufIsChanged() ? (shortmess(SHM_MOD)
+ ? " [+]" : _(" [Modified]")) : " ",
+ (curbuf->b_flags & BF_NOTEDITED)
+***************
+*** 3506,3534 ****
+ 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_snprintf_add((char *)buffer, IOSIZE,
+ _("line %ld of %ld --%d%%-- col "),
+ (long)curwin->w_cursor.lnum,
+ (long)curbuf->b_ml.ml_line_count,
+ n);
+ validate_virtcol();
+ len = STRLEN(buffer);
+! col_print(buffer + len, IOSIZE - len,
+ (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
+ }
+
+! (void)append_arg_number(curwin, buffer, IOSIZE, !shortmess(SHM_FILE));
+
+ if (dont_truncate)
+ {
+--- 3506,3535 ----
+ 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(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(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_snprintf_add(buffer, IOSIZE,
+ _("line %ld of %ld --%d%%-- col "),
+ (long)curwin->w_cursor.lnum,
+ (long)curbuf->b_ml.ml_line_count,
+ n);
+ validate_virtcol();
+ len = STRLEN(buffer);
+! col_print((char_u *)buffer + len, IOSIZE - len,
+ (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
+ }
+
+! (void)append_arg_number(curwin, (char_u *)buffer, IOSIZE,
+! !shortmess(SHM_FILE));
+
+ if (dont_truncate)
+ {
+***************
+*** 3542,3555 ****
+ }
+ else
+ {
+! p = msg_trunc_attr(buffer, FALSE, 0);
+ if (restart_edit != 0 || (msg_scrolled && !need_wait_return))
+ /* Need to repeat the message after redrawing when:
+ * - When restart_edit is set (otherwise there will be a delay
+ * before redrawing).
+ * - When the screen was scrolled but there is no wait-return
+ * prompt. */
+! set_keep_msg(p, 0);
+ }
+
+ vim_free(buffer);
+--- 3543,3556 ----
+ }
+ else
+ {
+! p = (char *)msg_trunc_attr(buffer, FALSE, 0);
+ if (restart_edit != 0 || (msg_scrolled && !need_wait_return))
+ /* Need to repeat the message after redrawing when:
+ * - When restart_edit is set (otherwise there will be a delay
+ * before redrawing).
+ * - When the screen was scrolled but there is no wait-return
+ * prompt. */
+! set_keep_msg((char_u *)p, 0);
+ }
+
+ vim_free(buffer);
+*** ../vim-8.1.0778/src/crypt.c 2019-01-18 22:48:30.900796633 +0100
+--- src/crypt.c 2019-01-19 16:02:15.177740710 +0100
+***************
+*** 513,519 ****
+ if (method < CRYPT_M_BF2)
+ {
+ msg_scroll = TRUE;
+! MSG(_("Warning: Using a weak encryption method; see :help 'cm'"));
+ }
+ }
+
+--- 513,519 ----
+ if (method < CRYPT_M_BF2)
+ {
+ msg_scroll = TRUE;
+! msg(_("Warning: Using a weak encryption method; see :help 'cm'"));
+ }
+ }
+
+***************
+*** 555,561 ****
+ {
+ if (p2 != NULL && STRCMP(p1, p2) != 0)
+ {
+! MSG(_("Keys don't match!"));
+ crypt_free_key(p1);
+ crypt_free_key(p2);
+ p2 = NULL;
+--- 555,561 ----
+ {
+ if (p2 != NULL && STRCMP(p1, p2) != 0)
+ {
+! msg(_("Keys don't match!"));
+ crypt_free_key(p1);
+ crypt_free_key(p2);
+ p2 = NULL;
+*** ../vim-8.1.0778/src/edit.c 2019-01-17 21:09:02.045706371 +0100
+--- src/edit.c 2019-01-19 17:28:55.114910991 +0100
+***************
+*** 2387,2394 ****
+ {
+ ctrl_x_mode = CTRL_X_NORMAL;
+ edit_submode = NULL;
+! msg_attr(dict_opt ? (char_u *)_("'dictionary' option is empty")
+! : (char_u *)_("'thesaurus' option is empty"),
+ HL_ATTR(HLF_E));
+ if (emsg_silent == 0)
+ {
+--- 2387,2394 ----
+ {
+ ctrl_x_mode = CTRL_X_NORMAL;
+ edit_submode = NULL;
+! msg_attr(dict_opt ? _("'dictionary' option is empty")
+! : _("'thesaurus' option is empty"),
+ HL_ATTR(HLF_E));
+ if (emsg_silent == 0)
+ {
+***************
+*** 3385,3391 ****
+ {
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("Scanning dictionary: %s"), (char *)files[i]);
+! (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
+ }
+
+ if (fp != NULL)
+--- 3385,3391 ----
+ {
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("Scanning dictionary: %s"), (char *)files[i]);
+! (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
+ }
+
+ if (fp != NULL)
+***************
+*** 4500,4506 ****
+ : ins_buf->b_sfname == NULL
+ ? ins_buf->b_fname
+ : ins_buf->b_sfname);
+! (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
+ }
+ else if (*e_cpt == NUL)
+ break;
+--- 4500,4506 ----
+ : ins_buf->b_sfname == NULL
+ ? ins_buf->b_fname
+ : ins_buf->b_sfname);
+! (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
+ }
+ else if (*e_cpt == NUL)
+ break;
+***************
+*** 4530,4536 ****
+ {
+ type = CTRL_X_TAGS;
+ vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
+! (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
+ }
+ else
+ type = -1;
+--- 4530,4536 ----
+ {
+ type = CTRL_X_TAGS;
+ vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
+! (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
+ }
+ else
+ type = -1;
+***************
+*** 5132,5138 ****
+ }
+ vim_snprintf((char *)IObuff, IOSIZE, "%s %s%s", lead,
+ s > compl_shown_match->cp_fname ? "<" : "", s);
+! msg(IObuff);
+ redraw_cmdline = FALSE; /* don't overwrite! */
+ }
+ }
+--- 5132,5138 ----
+ }
+ vim_snprintf((char *)IObuff, IOSIZE, "%s %s%s", lead,
+ s > compl_shown_match->cp_fname ? "<" : "", s);
+! msg((char *)IObuff);
+ redraw_cmdline = FALSE; /* don't overwrite! */
+ }
+ }
+***************
+*** 5878,5884 ****
+ if (edit_submode_extra != NULL)
+ {
+ if (!p_smd)
+! msg_attr(edit_submode_extra,
+ edit_submode_highl < HLF_COUNT
+ ? HL_ATTR(edit_submode_highl) : 0);
+ }
+--- 5878,5884 ----
+ if (edit_submode_extra != NULL)
+ {
+ if (!p_smd)
+! msg_attr((char *)edit_submode_extra,
+ edit_submode_highl < HLF_COUNT
+ ? HL_ATTR(edit_submode_highl) : 0);
+ }
+***************
+*** 8856,8862 ****
+ if (reg_recording != 0 || restart_edit != NUL)
+ showmode();
+ else if (p_smd)
+! MSG("");
+
+ return TRUE; /* exit Insert mode */
+ }
+--- 8856,8862 ----
+ if (reg_recording != 0 || restart_edit != NUL)
+ showmode();
+ else if (p_smd)
+! msg("");
+
+ return TRUE; /* exit Insert mode */
+ }
+*** ../vim-8.1.0778/src/ex_cmds.c 2019-01-17 15:43:21.757878392 +0100
+--- src/ex_cmds.c 2019-01-19 16:48:21.166931076 +0100
+***************
+*** 62,68 ****
+ c = gchar_cursor();
+ if (c == NUL)
+ {
+! MSG("NUL");
+ return;
+ }
+
+--- 62,68 ----
+ c = gchar_cursor();
+ if (c == NUL)
+ {
+! msg("NUL");
+ return;
+ }
+
+***************
+*** 152,158 ****
+ }
+ #endif
+
+! msg(IObuff);
+ }
+
+ /*
+--- 152,158 ----
+ }
+ #endif
+
+! msg((char *)IObuff);
+ }
+
+ /*
+***************
+*** 1490,1500 ****
+ {
+ if (do_in)
+ {
+! vim_snprintf((char *)msg_buf, sizeof(msg_buf),
+ _("%ld lines filtered"), (long)linecount);
+ if (msg(msg_buf) && !msg_scroll)
+ /* save message to display it after redraw */
+! set_keep_msg(msg_buf, 0);
+ }
+ else
+ msgmore((long)linecount);
+--- 1490,1500 ----
+ {
+ if (do_in)
+ {
+! vim_snprintf(msg_buf, sizeof(msg_buf),
+ _("%ld lines filtered"), (long)linecount);
+ if (msg(msg_buf) && !msg_scroll)
+ /* save message to display it after redraw */
+! set_keep_msg((char_u *)msg_buf, 0);
+ }
+ else
+ msgmore((long)linecount);
+***************
+*** 1586,1592 ****
+ if (!winstart)
+ starttermcap(); /* don't want a message box here */
+ #endif
+! MSG_PUTS(_("[No write since last change]\n"));
+ #ifdef FEAT_GUI_MSWIN
+ if (!winstart)
+ stoptermcap();
+--- 1586,1592 ----
+ if (!winstart)
+ starttermcap(); /* don't want a message box here */
+ #endif
+! msg_puts(_("[No write since last change]\n"));
+ #ifdef FEAT_GUI_MSWIN
+ if (!winstart)
+ stoptermcap();
+***************
+*** 3028,3038 ****
+ int use_number,
+ int list)
+ {
+! char_u numbuf[30];
+
+ if (curwin->w_p_nu || use_number)
+ {
+! vim_snprintf((char *)numbuf, sizeof(numbuf),
+ "%*ld ", number_width(curwin), (long)lnum);
+ msg_puts_attr(numbuf, HL_ATTR(HLF_N)); /* Highlight line nrs */
+ }
+--- 3028,3038 ----
+ int use_number,
+ int list)
+ {
+! char numbuf[30];
+
+ if (curwin->w_p_nu || use_number)
+ {
+! vim_snprintf(numbuf, sizeof(numbuf),
+ "%*ld ", number_width(curwin), (long)lnum);
+ msg_puts_attr(numbuf, HL_ATTR(HLF_N)); /* Highlight line nrs */
+ }
+***************
+*** 5926,5932 ****
+ beginline(BL_WHITE | BL_FIX);
+ }
+ if (!do_sub_msg(subflags.do_count) && subflags.do_ask)
+! MSG("");
+ }
+ else
+ global_need_beginline = TRUE;
+--- 5926,5932 ----
+ beginline(BL_WHITE | BL_FIX);
+ }
+ if (!do_sub_msg(subflags.do_count) && subflags.do_ask)
+! msg("");
+ }
+ else
+ global_need_beginline = TRUE;
+***************
+*** 5939,5945 ****
+ if (got_int) /* interrupted */
+ emsg(_(e_interr));
+ else if (got_match) /* did find something but nothing substituted */
+! MSG("");
+ else if (subflags.do_error) /* nothing found */
+ semsg(_(e_patnotf2), get_search_pat());
+ }
+--- 5939,5945 ----
+ if (got_int) /* interrupted */
+ emsg(_(e_interr));
+ else if (got_match) /* did find something but nothing substituted */
+! msg("");
+ else if (subflags.do_error) /* nothing found */
+ semsg(_(e_patnotf2), get_search_pat());
+ }
+***************
+*** 5995,6007 ****
+ : 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);
+ return TRUE;
+ }
+ if (got_int)
+--- 5995,6007 ----
+ : NGETTEXT("%ld substitution on %ld lines",
+ "%ld substitutions on %ld lines", sub_nsubs);
+
+! vim_snprintf_add(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((char_u *)msg_buf, 0);
+ return TRUE;
+ }
+ if (got_int)
+***************
+*** 6147,6153 ****
+ * pass 2: execute the command for each line that has been marked
+ */
+ if (got_int)
+! MSG(_(e_interr));
+ else if (ndone == 0)
+ {
+ if (type == 'v')
+--- 6147,6153 ----
+ * pass 2: execute the command for each line that has been marked
+ */
+ if (got_int)
+! msg(_(e_interr));
+ else if (ndone == 0)
+ {
+ if (type == 'v')
+***************
+*** 7755,7761 ****
+ char_u *fname;
+
+ if (l == NULL)
+! msg((char_u *)_("No old files"));
+ else
+ {
+ msg_start();
+--- 7755,7761 ----
+ char_u *fname;
+
+ if (l == NULL)
+! msg(_("No old files"));
+ else
+ {
+ msg_start();
+***************
+*** 7767,7773 ****
+ if (!message_filtered(fname))
+ {
+ msg_outnum((long)nr);
+! MSG_PUTS(": ");
+ msg_outtrans(fname);
+ msg_clr_eos();
+ msg_putchar('\n');
+--- 7767,7773 ----
+ if (!message_filtered(fname))
+ {
+ msg_outnum((long)nr);
+! msg_puts(": ");
+ msg_outtrans(fname);
+ msg_clr_eos();
+ msg_putchar('\n');
+*** ../vim-8.1.0778/src/eval.c 2019-01-17 17:13:25.916984116 +0100
+--- src/eval.c 2019-01-19 17:21:50.285476779 +0100
+***************
+*** 245,252 ****
+ static void check_vars(char_u *name, int len);
+ static typval_T *alloc_string_tv(char_u *string);
+ static void delete_var(hashtab_T *ht, hashitem_T *hi);
+! static void list_one_var(dictitem_T *v, char_u *prefix, int *first);
+! static void list_one_var_a(char_u *prefix, char_u *name, int type, char_u *string, int *first);
+ static char_u *find_option_end(char_u **arg, int *opt_flags);
+
+ /* for VIM_VERSION_ defines */
+--- 245,252 ----
+ static void check_vars(char_u *name, int len);
+ static typval_T *alloc_string_tv(char_u *string);
+ static void delete_var(hashtab_T *ht, hashitem_T *hi);
+! static void list_one_var(dictitem_T *v, char *prefix, int *first);
+! static void list_one_var_a(char *prefix, char_u *name, int type, char_u *string, int *first);
+ static char_u *find_option_end(char_u **arg, int *opt_flags);
+
+ /* for VIM_VERSION_ defines */
+***************
+*** 1448,1454 ****
+ void
+ list_hashtable_vars(
+ hashtab_T *ht,
+! char_u *prefix,
+ int empty,
+ int *first)
+ {
+--- 1448,1454 ----
+ void
+ list_hashtable_vars(
+ hashtab_T *ht,
+! char *prefix,
+ int empty,
+ int *first)
+ {
+***************
+*** 1466,1473 ****
+ 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;
+
+--- 1466,1473 ----
+ di = HI2DI(hi);
+
+ // apply :filter /pat/ to variable name
+! vim_strncpy((char_u *)buf, (char_u *)prefix, IOSIZE - 1);
+! vim_strcat((char_u *)buf, di->di_key, IOSIZE);
+ if (message_filtered(buf))
+ continue;
+
+***************
+*** 1484,1490 ****
+ static void
+ list_glob_vars(int *first)
+ {
+! list_hashtable_vars(&globvarht, (char_u *)"", TRUE, first);
+ }
+
+ /*
+--- 1484,1490 ----
+ static void
+ list_glob_vars(int *first)
+ {
+! list_hashtable_vars(&globvarht, "", TRUE, first);
+ }
+
+ /*
+***************
+*** 1493,1500 ****
+ static void
+ list_buf_vars(int *first)
+ {
+! list_hashtable_vars(&curbuf->b_vars->dv_hashtab, (char_u *)"b:",
+! TRUE, first);
+ }
+
+ /*
+--- 1493,1499 ----
+ static void
+ list_buf_vars(int *first)
+ {
+! list_hashtable_vars(&curbuf->b_vars->dv_hashtab, "b:", TRUE, first);
+ }
+
+ /*
+***************
+*** 1503,1510 ****
+ static void
+ list_win_vars(int *first)
+ {
+! list_hashtable_vars(&curwin->w_vars->dv_hashtab,
+! (char_u *)"w:", TRUE, first);
+ }
+
+ /*
+--- 1502,1508 ----
+ static void
+ list_win_vars(int *first)
+ {
+! list_hashtable_vars(&curwin->w_vars->dv_hashtab, "w:", TRUE, first);
+ }
+
+ /*
+***************
+*** 1513,1520 ****
+ static void
+ list_tab_vars(int *first)
+ {
+! list_hashtable_vars(&curtab->tp_vars->dv_hashtab,
+! (char_u *)"t:", TRUE, first);
+ }
+
+ /*
+--- 1511,1517 ----
+ static void
+ list_tab_vars(int *first)
+ {
+! list_hashtable_vars(&curtab->tp_vars->dv_hashtab, "t:", TRUE, first);
+ }
+
+ /*
+***************
+*** 1523,1529 ****
+ static void
+ list_vim_vars(int *first)
+ {
+! list_hashtable_vars(&vimvarht, (char_u *)"v:", FALSE, first);
+ }
+
+ /*
+--- 1520,1526 ----
+ static void
+ list_vim_vars(int *first)
+ {
+! list_hashtable_vars(&vimvarht, "v:", FALSE, first);
+ }
+
+ /*
+***************
+*** 1534,1540 ****
+ {
+ 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);
+ }
+
+ /*
+--- 1531,1537 ----
+ {
+ if (current_sctx.sc_sid > 0 && current_sctx.sc_sid <= ga_scripts.ga_len)
+ list_hashtable_vars(&SCRIPT_VARS(current_sctx.sc_sid),
+! "s:", FALSE, first);
+ }
+
+ /*
+***************
+*** 1619,1625 ****
+ s = echo_string(&tv, &tf, numbuf, 0);
+ c = *arg;
+ *arg = NUL;
+! list_one_var_a((char_u *)"",
+ arg == arg_subsc ? name : name_start,
+ tv.v_type,
+ s == NULL ? (char_u *)"" : s,
+--- 1616,1622 ----
+ s = echo_string(&tv, &tf, numbuf, 0);
+ c = *arg;
+ *arg = NUL;
+! list_one_var_a("",
+ arg == arg_subsc ? name : name_start,
+ tv.v_type,
+ s == NULL ? (char_u *)"" : s,
+***************
+*** 5462,5468 ****
+ }
+ else if (p_verbose > 0)
+ {
+! verb_msg((char_u *)_("Not enough memory to set references, garbage collection aborted!"));
+ }
+
+ return did_free;
+--- 5459,5465 ----
+ }
+ else if (p_verbose > 0)
+ {
+! verb_msg(_("Not enough memory to set references, garbage collection aborted!"));
+ }
+
+ return did_free;
+***************
+*** 7791,7797 ****
+ * List the value of one internal variable.
+ */
+ static void
+! list_one_var(dictitem_T *v, char_u *prefix, int *first)
+ {
+ char_u *tofree;
+ char_u *s;
+--- 7788,7794 ----
+ * List the value of one internal variable.
+ */
+ static void
+! list_one_var(dictitem_T *v, char *prefix, int *first)
+ {
+ char_u *tofree;
+ char_u *s;
+***************
+*** 7805,7811 ****
+
+ static void
+ list_one_var_a(
+! char_u *prefix,
+ char_u *name,
+ int type,
+ char_u *string,
+--- 7802,7808 ----
+
+ static void
+ list_one_var_a(
+! char *prefix,
+ char_u *name,
+ int type,
+ char_u *string,
+***************
+*** 7815,7821 ****
+ msg_start();
+ msg_puts(prefix);
+ if (name != NULL) /* "a:" vars don't have a name stored */
+! msg_puts(name);
+ msg_putchar(' ');
+ msg_advance(22);
+ if (type == VAR_NUMBER)
+--- 7812,7818 ----
+ msg_start();
+ msg_puts(prefix);
+ if (name != NULL) /* "a:" vars don't have a name stored */
+! msg_puts((char *)name);
+ msg_putchar(' ');
+ msg_advance(22);
+ if (type == VAR_NUMBER)
+***************
+*** 7840,7846 ****
+ msg_outtrans(string);
+
+ if (type == VAR_FUNC || type == VAR_PARTIAL)
+! msg_puts((char_u *)"()");
+ if (*first)
+ {
+ msg_clr_eos();
+--- 7837,7843 ----
+ msg_outtrans(string);
+
+ if (type == VAR_FUNC || type == VAR_PARTIAL)
+! msg_puts("()");
+ if (*first)
+ {
+ msg_clr_eos();
+***************
+*** 8304,8310 ****
+ *p = NUL;
+ msg_start();
+ msg_clr_eos();
+! msg_puts_attr(prompt, echo_attr);
+ msg_didout = FALSE;
+ msg_starthere();
+ *p = c;
+--- 8301,8307 ----
+ *p = NUL;
+ msg_start();
+ msg_clr_eos();
+! msg_puts_attr((char *)prompt, echo_attr);
+ msg_didout = FALSE;
+ msg_starthere();
+ *p = c;
+***************
+*** 8422,8428 ****
+ }
+ }
+ else if (eap->cmdidx == CMD_echo)
+! msg_puts_attr((char_u *)" ", echo_attr);
+ p = echo_string(&rettv, &tofree, numbuf, get_copyID());
+ if (p != NULL)
+ for ( ; *p != NUL && !got_int; ++p)
+--- 8419,8425 ----
+ }
+ }
+ else if (eap->cmdidx == CMD_echo)
+! msg_puts_attr(" ", echo_attr);
+ p = echo_string(&rettv, &tofree, numbuf, get_copyID());
+ if (p != NULL)
+ for ( ; *p != NUL && !got_int; ++p)
+***************
+*** 8546,8552 ****
+
+ if (eap->cmdidx == CMD_echomsg)
+ {
+! MSG_ATTR(ga.ga_data, echo_attr);
+ out_flush();
+ }
+ else if (eap->cmdidx == CMD_echoerr)
+--- 8543,8549 ----
+
+ if (eap->cmdidx == CMD_echomsg)
+ {
+! msg_attr(ga.ga_data, echo_attr);
+ out_flush();
+ }
+ else if (eap->cmdidx == CMD_echoerr)
+***************
+*** 9159,9169 ****
+ 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();
+--- 9156,9166 ----
+ if (p != NULL)
+ {
+ verbose_enter();
+! msg_puts(_("\n\tLast set from "));
+! msg_puts((char *)p);
+ if (script_ctx.sc_lnum > 0)
+ {
+! msg_puts(_(" line "));
+ msg_outnum((long)script_ctx.sc_lnum);
+ }
+ verbose_leave();
+*** ../vim-8.1.0778/src/ex_cmds2.c 2019-01-13 23:38:33.387773334 +0100
+--- src/ex_cmds2.c 2019-01-19 16:03:22.589277848 +0100
+***************
+*** 143,149 ****
+ debug_mode = TRUE;
+
+ if (!debug_did_msg)
+! MSG(_("Entering Debug mode. Type \"cont\" to continue."));
+ if (debug_oldval != NULL)
+ {
+ smsg(_("Oldval = \"%s\""), debug_oldval);
+--- 143,149 ----
+ debug_mode = TRUE;
+
+ if (!debug_did_msg)
+! msg(_("Entering Debug mode. Type \"cont\" to continue."));
+ if (debug_oldval != NULL)
+ {
+ smsg(_("Oldval = \"%s\""), debug_oldval);
+***************
+*** 157,163 ****
+ debug_newval = NULL;
+ }
+ if (sourcing_name != NULL)
+! msg(sourcing_name);
+ if (sourcing_lnum != 0)
+ smsg(_("line %ld: %s"), (long)sourcing_lnum, cmd);
+ else
+--- 157,163 ----
+ debug_newval = NULL;
+ }
+ if (sourcing_name != NULL)
+! msg((char *)sourcing_name);
+ if (sourcing_lnum != 0)
+ smsg(_("line %ld: %s"), (long)sourcing_lnum, cmd);
+ else
+***************
+*** 390,396 ****
+ if (debug_backtrace_level < 0)
+ {
+ debug_backtrace_level = 0;
+! MSG(_("frame is zero"));
+ }
+ else
+ {
+--- 390,396 ----
+ if (debug_backtrace_level < 0)
+ {
+ debug_backtrace_level = 0;
+! msg(_("frame is zero"));
+ }
+ else
+ {
+***************
+*** 857,863 ****
+ int i;
+
+ if (dbg_breakp.ga_len == 0)
+! MSG(_("No breakpoints defined"));
+ else
+ for (i = 0; i < dbg_breakp.ga_len; ++i)
+ {
+--- 857,863 ----
+ int i;
+
+ if (dbg_breakp.ga_len == 0)
+! msg(_("No breakpoints defined"));
+ else
+ for (i = 0; i < dbg_breakp.ga_len; ++i)
+ {
+***************
+*** 2430,2436 ****
+ if (curbuf != old_curbuf)
+ {
+ msg_source(HL_ATTR(HLF_W));
+! MSG(_("Warning: Entered other buffer unexpectedly (check autocommands)"));
+ }
+ return retval;
+ }
+--- 2430,2436 ----
+ if (curbuf != old_curbuf)
+ {
+ msg_source(HL_ATTR(HLF_W));
+! msg(_("Warning: Entered other buffer unexpectedly (check autocommands)"));
+ }
+ return retval;
+ }
+***************
+*** 4112,4118 ****
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("W20: Required python version 2.x not supported, ignoring file: %s"),
+ fname);
+! MSG(IObuff);
+ # endif
+ return;
+ }
+--- 4112,4118 ----
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("W20: Required python version 2.x not supported, ignoring file: %s"),
+ fname);
+! msg((char *)IObuff);
+ # endif
+ return;
+ }
+***************
+*** 4124,4130 ****
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("W21: Required python version 3.x not supported, ignoring file: %s"),
+ fname);
+! MSG(IObuff);
+ # endif
+ return;
+ }
+--- 4124,4130 ----
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("W21: Required python version 3.x not supported, ignoring file: %s"),
+ fname);
+! msg((char *)IObuff);
+ # endif
+ return;
+ }
+*** ../vim-8.1.0778/src/ex_docmd.c 2019-01-17 15:43:21.757878392 +0100
+--- src/ex_docmd.c 2019-01-19 17:03:26.728897747 +0100
+***************
+*** 562,568 ****
+ ++hold_gui_events;
+ #endif
+
+! MSG(_("Entering Ex mode. Type \"visual\" to go to Normal mode."));
+ while (exmode_active)
+ {
+ /* Check for a ":normal" command and no more characters left. */
+--- 562,568 ----
+ ++hold_gui_events;
+ #endif
+
+! msg(_("Entering Ex mode. Type \"visual\" to go to Normal mode."));
+ while (exmode_active)
+ {
+ /* Check for a ":normal" command and no more characters left. */
+***************
+*** 1019,1025 ****
+ smsg(_("line %ld: %s"),
+ (long)sourcing_lnum, cmdline_copy);
+ if (msg_silent == 0)
+! msg_puts((char_u *)"\n"); /* don't overwrite this */
+
+ verbose_leave_scroll();
+ --no_wait_return;
+--- 1019,1025 ----
+ smsg(_("line %ld: %s"),
+ (long)sourcing_lnum, cmdline_copy);
+ if (msg_silent == 0)
+! msg_puts("\n"); /* don't overwrite this */
+
+ verbose_leave_scroll();
+ --no_wait_return;
+***************
+*** 6043,6049 ****
+
+ /* Put out the title first time */
+ if (!found)
+! MSG_PUTS_TITLE(_("\n Name Args Address Complete Definition"));
+ found = TRUE;
+ msg_putchar('\n');
+ if (got_int)
+--- 6043,6049 ----
+
+ /* Put out the title first time */
+ if (!found)
+! msg_puts_title(_("\n Name Args Address Complete Definition"));
+ found = TRUE;
+ msg_putchar('\n');
+ if (got_int)
+***************
+*** 6150,6156 ****
+ }
+
+ if (!found)
+! MSG(_("No user-defined commands found"));
+ }
+
+ static char *
+--- 6150,6156 ----
+ }
+
+ if (!found)
+! msg(_("No user-defined commands found"));
+ }
+
+ static char *
+***************
+*** 7239,7251 ****
+ }
+ if (p != NULL)
+ {
+! MSG(p);
+ vim_free(p);
+ }
+ else
+! MSG("default");
+ #else
+! MSG(_("unknown"));
+ #endif
+ }
+ else if (load_colors(eap->arg) == FAIL)
+--- 7239,7251 ----
+ }
+ if (p != NULL)
+ {
+! msg((char *)p);
+ vim_free(p);
+ }
+ else
+! msg("default");
+ #else
+! msg(_("unknown"));
+ #endif
+ }
+ else if (load_colors(eap->arg) == FAIL)
+***************
+*** 7256,7262 ****
+ ex_highlight(exarg_T *eap)
+ {
+ if (*eap->arg == NUL && eap->cmd[2] == '!')
+! MSG(_("Greetings, Vim user!"));
+ do_highlight(eap->arg, eap->forceit, FALSE);
+ }
+
+--- 7256,7262 ----
+ ex_highlight(exarg_T *eap)
+ {
+ if (*eap->arg == NUL && eap->cmd[2] == '!')
+! msg(_("Greetings, Vim user!"));
+ do_highlight(eap->arg, eap->forceit, FALSE);
+ }
+
+***************
+*** 7672,7678 ****
+ else
+ # endif
+ if (first_tabpage->tp_next == NULL)
+! MSG(_("Already only one tab page"));
+ else
+ {
+ tab_number = get_tabpage_arg(eap);
+--- 7672,7678 ----
+ else
+ # endif
+ if (first_tabpage->tp_next == NULL)
+! msg(_("Already only one tab page"));
+ else
+ {
+ tab_number = get_tabpage_arg(eap);
+***************
+*** 8921,8929 ****
+ ex_swapname(exarg_T *eap UNUSED)
+ {
+ if (curbuf->b_ml.ml_mfp == NULL || curbuf->b_ml.ml_mfp->mf_fname == NULL)
+! MSG(_("No swap file"));
+ else
+! msg(curbuf->b_ml.ml_mfp->mf_fname);
+ }
+
+ /*
+--- 8921,8929 ----
+ ex_swapname(exarg_T *eap UNUSED)
+ {
+ if (curbuf->b_ml.ml_mfp == NULL || curbuf->b_ml.ml_mfp->mf_fname == NULL)
+! msg(_("No swap file"));
+ else
+! msg((char *)curbuf->b_ml.ml_mfp->mf_fname);
+ }
+
+ /*
+***************
+*** 9221,9227 ****
+ #ifdef BACKSLASH_IN_FILENAME
+ slash_adjust(NameBuff);
+ #endif
+! msg(NameBuff);
+ }
+ else
+ emsg(_("E187: Unknown"));
+--- 9221,9227 ----
+ #ifdef BACKSLASH_IN_FILENAME
+ slash_adjust(NameBuff);
+ #endif
+! msg((char *)NameBuff);
+ }
+ else
+ emsg(_("E187: Unknown"));
+***************
+*** 9402,9408 ****
+ # endif
+ {
+ sprintf((char *)IObuff, _("Window position: X %d, Y %d"), x, y);
+! msg(IObuff);
+ }
+ else
+ # endif
+--- 9402,9408 ----
+ # endif
+ {
+ sprintf((char *)IObuff, _("Window position: X %d, Y %d"), x, y);
+! msg((char *)IObuff);
+ }
+ else
+ # endif
+*** ../vim-8.1.0778/src/ex_getln.c 2019-01-13 23:38:33.391773303 +0100
+--- src/ex_getln.c 2019-01-19 17:07:38.711194397 +0100
+***************
+*** 158,164 ****
+ VIM_CLEAR(ccline.cmdbuff);
+ if (msg_scrolled == 0)
+ compute_cmdrow();
+! MSG("");
+ redraw_cmdline = TRUE;
+ }
+
+--- 158,164 ----
+ VIM_CLEAR(ccline.cmdbuff);
+ if (msg_scrolled == 0)
+ compute_cmdrow();
+! msg("");
+ redraw_cmdline = TRUE;
+ }
+
+***************
+*** 2786,2792 ****
+ while (indent >= 8)
+ {
+ ga_append(&line_ga, TAB);
+! msg_puts((char_u *)" ");
+ indent -= 8;
+ }
+ while (indent-- > 0)
+--- 2786,2792 ----
+ while (indent >= 8)
+ {
+ ga_append(&line_ga, TAB);
+! msg_puts(" ");
+ indent -= 8;
+ }
+ while (indent-- > 0)
+***************
+*** 3769,3775 ****
+ msg_putchar(ccline.cmdfirstc);
+ if (ccline.cmdprompt != NULL)
+ {
+! msg_puts_attr(ccline.cmdprompt, ccline.cmdattr);
+ ccline.cmdindent = msg_col + (msg_row - cmdline_row) * Columns;
+ /* do the reverse of set_cmdspos() */
+ if (ccline.cmdfirstc != NUL)
+--- 3769,3775 ----
+ msg_putchar(ccline.cmdfirstc);
+ if (ccline.cmdprompt != NULL)
+ {
+! msg_puts_attr((char *)ccline.cmdprompt, ccline.cmdattr);
+ ccline.cmdindent = msg_col + (msg_row - cmdline_row) * Columns;
+ /* do the reverse of set_cmdspos() */
+ if (ccline.cmdfirstc != NUL)
+***************
+*** 3961,3967 ****
+ return FAIL;
+ }
+
+! MSG_PUTS("..."); /* show that we are busy */
+ out_flush();
+
+ i = (int)(xp->xp_pattern - ccline.cmdbuff);
+--- 3961,3967 ----
+ return FAIL;
+ }
+
+! msg_puts("..."); /* show that we are busy */
+ out_flush();
+
+ i = (int)(xp->xp_pattern - ccline.cmdbuff);
+***************
+*** 4611,4620 ****
+
+ if (xp->xp_context == EXPAND_TAGS_LISTFILES)
+ {
+! MSG_PUTS_ATTR(_("tagname"), HL_ATTR(HLF_T));
+ msg_clr_eos();
+ msg_advance(maxlen - 3);
+! MSG_PUTS_ATTR(_(" kind file\n"), HL_ATTR(HLF_T));
+ }
+
+ /* list the files line by line */
+--- 4611,4620 ----
+
+ if (xp->xp_context == EXPAND_TAGS_LISTFILES)
+ {
+! msg_puts_attr(_("tagname"), HL_ATTR(HLF_T));
+ msg_clr_eos();
+ msg_advance(maxlen - 3);
+! msg_puts_attr(_(" kind file\n"), HL_ATTR(HLF_T));
+ }
+
+ /* list the files line by line */
+***************
+*** 4628,4636 ****
+ msg_outtrans_attr(files_found[k], HL_ATTR(HLF_D));
+ p = files_found[k] + STRLEN(files_found[k]) + 1;
+ msg_advance(maxlen + 1);
+! msg_puts(p);
+ msg_advance(maxlen + 3);
+! msg_puts_long_attr(p + 2, HL_ATTR(HLF_D));
+ break;
+ }
+ for (j = maxlen - lastlen; --j >= 0; )
+--- 4628,4636 ----
+ msg_outtrans_attr(files_found[k], HL_ATTR(HLF_D));
+ p = files_found[k] + STRLEN(files_found[k]) + 1;
+ msg_advance(maxlen + 1);
+! msg_puts((char *)p);
+ msg_advance(maxlen + 3);
+! msg_outtrans_long_attr(p + 2, HL_ATTR(HLF_D));
+ break;
+ }
+ for (j = maxlen - lastlen; --j >= 0; )
+***************
+*** 6635,6641 ****
+
+ if (hislen == 0)
+ {
+! MSG(_("'history' option is zero"));
+ return;
+ }
+
+--- 6635,6641 ----
+
+ if (hislen == 0)
+ {
+! msg(_("'history' option is zero"));
+ return;
+ }
+
+***************
+*** 6678,6684 ****
+ {
+ STRCPY(IObuff, "\n # ");
+ STRCAT(STRCAT(IObuff, history_names[histype1]), " history");
+! MSG_PUTS_TITLE(IObuff);
+ idx = hisidx[histype1];
+ hist = history[histype1];
+ j = hisidx1;
+--- 6678,6684 ----
+ {
+ STRCPY(IObuff, "\n # ");
+ STRCAT(STRCAT(IObuff, history_names[histype1]), " history");
+! msg_puts_title((char *)IObuff);
+ idx = hisidx[histype1];
+ hist = history[histype1];
+ j = hisidx1;
+*** ../vim-8.1.0778/src/farsi.c 2017-04-07 13:52:06.000000000 +0200
+--- src/farsi.c 2019-01-19 17:17:29.759186522 +0100
+***************
+*** 1719,1725 ****
+
+ /* Assume the screen has been messed up: clear it and redraw. */
+ redraw_later(CLEAR);
+! MSG_ATTR(farsi_text_1, HL_ATTR(HLF_S));
+ }
+
+ /*
+--- 1719,1725 ----
+
+ /* Assume the screen has been messed up: clear it and redraw. */
+ redraw_later(CLEAR);
+! msg_attr(farsi_text_1, HL_ATTR(HLF_S));
+ }
+
+ /*
+***************
+*** 1747,1753 ****
+
+ /* Assume the screen has been messed up: clear it and redraw. */
+ redraw_later(CLEAR);
+! MSG_ATTR(farsi_text_2, HL_ATTR(HLF_S));
+ }
+
+ /*
+--- 1747,1753 ----
+
+ /* Assume the screen has been messed up: clear it and redraw. */
+ redraw_later(CLEAR);
+! msg_attr(farsi_text_2, HL_ATTR(HLF_S));
+ }
+
+ /*
+***************
+*** 2150,2162 ****
+ {
+ p_fkmap = 0;
+ do_cmdline_cmd((char_u *)"set norl");
+! MSG("");
+ }
+ else
+ {
+ p_fkmap = 1;
+ do_cmdline_cmd((char_u *)"set rl");
+! MSG("");
+ }
+
+ curwin->w_farsi = curwin->w_farsi ^ W_R_L;
+--- 2150,2162 ----
+ {
+ p_fkmap = 0;
+ do_cmdline_cmd((char_u *)"set norl");
+! msg("");
+ }
+ else
+ {
+ p_fkmap = 1;
+ do_cmdline_cmd((char_u *)"set rl");
+! msg("");
+ }
+
+ curwin->w_farsi = curwin->w_farsi ^ W_R_L;
+*** ../vim-8.1.0778/src/if_cscope.c 2019-01-15 20:19:36.743904434 +0100
+--- src/if_cscope.c 2019-01-19 17:17:42.283101491 +0100
+***************
+*** 212,218 ****
+ {
+ if (!cmdp->cansplit)
+ {
+! (void)MSG_PUTS(_("This cscope command does not support splitting the window.\n"));
+ return;
+ }
+ postponed_split = -1;
+--- 212,218 ----
+ {
+ if (!cmdp->cansplit)
+ {
+! (void)msg_puts(_("This cscope command does not support splitting the window.\n"));
+ return;
+ }
+ postponed_split = -1;
+***************
+*** 1280,1286 ****
+ {
+ cscmd_T *cmdp = cs_cmds;
+
+! (void)MSG_PUTS(_("cscope commands:\n"));
+ while (cmdp->name != NULL)
+ {
+ char *help = _(cmdp->help);
+--- 1280,1286 ----
+ {
+ cscmd_T *cmdp = cs_cmds;
+
+! (void)msg_puts(_("cscope commands:\n"));
+ while (cmdp->name != NULL)
+ {
+ char *help = _(cmdp->help);
+***************
+*** 1294,1300 ****
+ help, space_cnt, " ",
+ cmdp->usage);
+ if (strcmp(cmdp->name, "find") == 0)
+! MSG_PUTS(_("\n"
+ " a: Find assignments to this symbol\n"
+ " c: Find functions calling this function\n"
+ " d: Find functions called by this function\n"
+--- 1294,1300 ----
+ help, space_cnt, " ",
+ cmdp->usage);
+ if (strcmp(cmdp->name, "find") == 0)
+! msg_puts(_("\n"
+ " a: Find assignments to this symbol\n"
+ " c: Find functions calling this function\n"
+ " d: Find functions called by this function\n"
+***************
+*** 1992,2005 ****
+ {
+ bufsize = newsize;
+ (void)sprintf(buf, cstag_msg, ptag);
+! MSG_PUTS_ATTR(buf, HL_ATTR(HLF_T));
+ }
+
+ vim_free(tbuf);
+
+! MSG_PUTS_ATTR(_("\n # line"), HL_ATTR(HLF_T)); /* strlen is 7 */
+ msg_advance(msg_col + 2);
+! MSG_PUTS_ATTR(_("filename / context / line\n"), HL_ATTR(HLF_T));
+
+ num = 1;
+ for (i = 0; i < num_matches; i++)
+--- 1992,2005 ----
+ {
+ bufsize = newsize;
+ (void)sprintf(buf, cstag_msg, ptag);
+! msg_puts_attr(buf, HL_ATTR(HLF_T));
+ }
+
+ vim_free(tbuf);
+
+! msg_puts_attr(_("\n # line"), HL_ATTR(HLF_T)); /* strlen is 7 */
+ msg_advance(msg_col + 2);
+! msg_puts_attr(_("filename / context / line\n"), HL_ATTR(HLF_T));
+
+ num = 1;
+ for (i = 0; i < num_matches; i++)
+***************
+*** 2043,2051 ****
+ {
+ /* csfmt_str = "%4d %6s "; */
+ (void)sprintf(buf, csfmt_str, num, lno);
+! MSG_PUTS_ATTR(buf, HL_ATTR(HLF_CM));
+ }
+! MSG_PUTS_LONG_ATTR(cs_pathcomponents(fname), HL_ATTR(HLF_CM));
+
+ /* compute the required space for the context */
+ if (cntxts[idx] != NULL)
+--- 2043,2052 ----
+ {
+ /* csfmt_str = "%4d %6s "; */
+ (void)sprintf(buf, csfmt_str, num, lno);
+! msg_puts_attr(buf, HL_ATTR(HLF_CM));
+ }
+! msg_outtrans_long_attr((char_u *)cs_pathcomponents(fname),
+! HL_ATTR(HLF_CM));
+
+ /* compute the required space for the context */
+ if (cntxts[idx] != NULL)
+***************
+*** 2074,2086 ****
+ if (msg_col + (int)strlen(buf) >= (int)Columns)
+ msg_putchar('\n');
+ msg_advance(12);
+! MSG_PUTS_LONG(buf);
+ msg_putchar('\n');
+ }
+ if (extra != NULL)
+ {
+ msg_advance(13);
+! MSG_PUTS_LONG(extra);
+ }
+
+ vim_free(tbuf); /* only after printing extra due to strtok use */
+--- 2075,2087 ----
+ if (msg_col + (int)strlen(buf) >= (int)Columns)
+ msg_putchar('\n');
+ msg_advance(12);
+! msg_outtrans_long_attr((char_u *)buf, 0);
+ msg_putchar('\n');
+ }
+ if (extra != NULL)
+ {
+ msg_advance(13);
+! msg_outtrans_long_attr((char_u *)extra, 0);
+ }
+
+ vim_free(tbuf); /* only after printing extra due to strtok use */
+***************
+*** 2371,2377 ****
+ * "Added cscope database..."
+ */
+ sprintf(buf, " (#%d)", i);
+! MSG_PUTS_ATTR(buf, HL_ATTR(HLF_R));
+ }
+ }
+ vim_free(dblist[i]);
+--- 2372,2378 ----
+ * "Added cscope database..."
+ */
+ sprintf(buf, " (#%d)", i);
+! msg_puts_attr(buf, HL_ATTR(HLF_R));
+ }
+ }
+ vim_free(dblist[i]);
+***************
+*** 2383,2389 ****
+ vim_free(fllist);
+
+ if (p_csverbose)
+! MSG_ATTR(_("All cscope databases reset"), HL_ATTR(HLF_R) | MSG_HIST);
+ return CSCOPE_SUCCESS;
+ } /* cs_reset */
+
+--- 2384,2390 ----
+ vim_free(fllist);
+
+ if (p_csverbose)
+! msg_attr(_("All cscope databases reset"), HL_ATTR(HLF_R) | MSG_HIST);
+ return CSCOPE_SUCCESS;
+ } /* cs_reset */
+
+***************
+*** 2464,2473 ****
+ {
+ short i;
+ if (cs_cnt_connections() == 0)
+! MSG_PUTS(_("no cscope connections\n"));
+ else
+ {
+! MSG_PUTS_ATTR(
+ _(" # pid database name prepend path\n"),
+ HL_ATTR(HLF_T));
+ for (i = 0; i < csinfo_size; i++)
+--- 2465,2474 ----
+ {
+ short i;
+ if (cs_cnt_connections() == 0)
+! msg_puts(_("no cscope connections\n"));
+ else
+ {
+! msg_puts_attr(
+ _(" # pid database name prepend path\n"),
+ HL_ATTR(HLF_T));
+ for (i = 0; i < csinfo_size; i++)
+*** ../vim-8.1.0778/src/fileio.c 2019-01-18 22:48:30.900796633 +0100
+--- src/fileio.c 2019-01-19 17:36:47.831896350 +0100
+***************
+*** 2586,2592 ****
+ p = msg_may_trunc(FALSE, IObuff);
+ else
+ #endif
+! p = msg_trunc_attr(IObuff, FALSE, 0);
+ if (read_stdin || read_buffer || restart_edit != 0
+ || (msg_scrolled != 0 && !need_wait_return))
+ /* Need to repeat the message after redrawing when:
+--- 2586,2592 ----
+ p = msg_may_trunc(FALSE, IObuff);
+ else
+ #endif
+! p = (char_u *)msg_trunc_attr((char *)IObuff, FALSE, 0);
+ if (read_stdin || read_buffer || restart_edit != 0
+ || (msg_scrolled != 0 && !need_wait_return))
+ /* Need to repeat the message after redrawing when:
+***************
+*** 2902,2929 ****
+ int *fdp) /* in/out: file descriptor of file */
+ {
+ char_u *tmpname;
+! char_u *errmsg = NULL;
+
+ tmpname = vim_tempname('r', FALSE);
+ if (tmpname == NULL)
+! errmsg = (char_u *)_("Can't find temp file for conversion");
+ else
+ {
+ close(*fdp); /* close the input file, ignore errors */
+ *fdp = -1;
+ if (eval_charconvert(fenc, enc_utf8 ? (char_u *)"utf-8" : p_enc,
+ fname, tmpname) == FAIL)
+! errmsg = (char_u *)_("Conversion with 'charconvert' failed");
+ if (errmsg == NULL && (*fdp = mch_open((char *)tmpname,
+ O_RDONLY | O_EXTRA, 0)) < 0)
+! errmsg = (char_u *)_("can't read output of 'charconvert'");
+ }
+
+ if (errmsg != NULL)
+ {
+ /* Don't use emsg(), it breaks mappings, the retry with
+ * another type of conversion might still work. */
+! MSG(errmsg);
+ if (tmpname != NULL)
+ {
+ mch_remove(tmpname); /* delete converted file */
+--- 2902,2929 ----
+ int *fdp) /* in/out: file descriptor of file */
+ {
+ char_u *tmpname;
+! char *errmsg = NULL;
+
+ tmpname = vim_tempname('r', FALSE);
+ if (tmpname == NULL)
+! errmsg = _("Can't find temp file for conversion");
+ else
+ {
+ close(*fdp); /* close the input file, ignore errors */
+ *fdp = -1;
+ if (eval_charconvert(fenc, enc_utf8 ? (char_u *)"utf-8" : p_enc,
+ fname, tmpname) == FAIL)
+! errmsg = _("Conversion with 'charconvert' failed");
+ if (errmsg == NULL && (*fdp = mch_open((char *)tmpname,
+ O_RDONLY | O_EXTRA, 0)) < 0)
+! errmsg = _("can't read output of 'charconvert'");
+ }
+
+ if (errmsg != NULL)
+ {
+ /* Don't use emsg(), it breaks mappings, the retry with
+ * another type of conversion might still work. */
+! msg(errmsg);
+ if (tmpname != NULL)
+ {
+ mch_remove(tmpname); /* delete converted file */
+***************
+*** 4908,4914 ****
+ * know we got the message. */
+ if (got_int)
+ {
+! MSG(_(e_interr));
+ out_flush();
+ }
+ if ((fd = mch_open((char *)backup, O_RDONLY | O_EXTRA, 0)) >= 0)
+--- 4908,4914 ----
+ * know we got the message. */
+ if (got_int)
+ {
+! msg(_(e_interr));
+ out_flush();
+ }
+ if ((fd = mch_open((char *)backup, O_RDONLY | O_EXTRA, 0)) >= 0)
+***************
+*** 5007,5013 ****
+ STRCAT(IObuff, shortmess(SHM_WRI) ? _(" [w]") : _(" written"));
+ }
+
+! set_keep_msg(msg_trunc_attr(IObuff, FALSE, 0), 0);
+ }
+
+ /* When written everything correctly: reset 'modified'. Unless not
+--- 5007,5013 ----
+ STRCAT(IObuff, shortmess(SHM_WRI) ? _(" [w]") : _(" written"));
+ }
+
+! set_keep_msg((char_u *)msg_trunc_attr((char *)IObuff, FALSE, 0), 0);
+ }
+
+ /* When written everything correctly: reset 'modified'. Unless not
+***************
+*** 5157,5165 ****
+ retval = FAIL;
+ if (end == 0)
+ {
+! MSG_PUTS_ATTR(_("\nWARNING: Original file may be lost or damaged\n"),
+ attr | MSG_HIST);
+! MSG_PUTS_ATTR(_("don't quit the editor until the file is successfully written!"),
+ attr | MSG_HIST);
+
+ /* Update the timestamp to avoid an "overwrite changed file"
+--- 5157,5165 ----
+ retval = FAIL;
+ if (end == 0)
+ {
+! msg_puts_attr(_("\nWARNING: Original file may be lost or damaged\n"),
+ attr | MSG_HIST);
+! msg_puts_attr(_("don't quit the editor until the file is successfully written!"),
+ attr | MSG_HIST);
+
+ /* Update the timestamp to avoid an "overwrite changed file"
+***************
+*** 5372,5378 ****
+ msg_scroll = TRUE; /* don't overwrite messages here */
+ msg_silent = 0; /* must give this prompt */
+ /* don't use emsg() here, don't want to flush the buffers */
+! MSG_ATTR(_("WARNING: The file has been changed since reading it!!!"),
+ HL_ATTR(HLF_E));
+ if (ask_yesno((char_u *)_("Do you really want to write to it"),
+ TRUE) == 'n')
+--- 5372,5378 ----
+ msg_scroll = TRUE; /* don't overwrite messages here */
+ msg_silent = 0; /* must give this prompt */
+ /* don't use emsg() here, don't want to flush the buffers */
+! msg_attr(_("WARNING: The file has been changed since reading it!!!"),
+ HL_ATTR(HLF_E));
+ if (ask_yesno((char_u *)_("Do you really want to write to it"),
+ TRUE) == 'n')
+***************
+*** 6807,6813 ****
+ if (need_wait_return && didit == 2)
+ {
+ /* make sure msg isn't overwritten */
+! msg_puts((char_u *)"\n");
+ out_flush();
+ }
+ }
+--- 6807,6813 ----
+ if (need_wait_return && didit == 2)
+ {
+ /* make sure msg isn't overwritten */
+! msg_puts("\n");
+ out_flush();
+ }
+ }
+***************
+*** 7093,7102 ****
+ if (!autocmd_busy)
+ {
+ msg_start();
+! msg_puts_attr((char_u *)tbuf, HL_ATTR(HLF_E) + MSG_HIST);
+ if (*mesg2 != NUL)
+! msg_puts_attr((char_u *)mesg2,
+! HL_ATTR(HLF_W) + MSG_HIST);
+ msg_clr_eos();
+ (void)msg_end();
+ if (emsg_silent == 0)
+--- 7093,7101 ----
+ if (!autocmd_busy)
+ {
+ msg_start();
+! msg_puts_attr(tbuf, HL_ATTR(HLF_E) + MSG_HIST);
+ if (*mesg2 != NUL)
+! msg_puts_attr(mesg2, HL_ATTR(HLF_W) + MSG_HIST);
+ msg_clr_eos();
+ (void)msg_end();
+ if (emsg_silent == 0)
+***************
+*** 7926,7937 ****
+ if (ap->group != AUGROUP_DEFAULT)
+ {
+ if (AUGROUP_NAME(ap->group) == NULL)
+! msg_puts_attr(get_deleted_augroup(), HL_ATTR(HLF_E));
+ else
+! msg_puts_attr(AUGROUP_NAME(ap->group), HL_ATTR(HLF_T));
+! msg_puts((char_u *)" ");
+ }
+! msg_puts_attr(event_nr2name(event), HL_ATTR(HLF_T));
+ last_event = event;
+ last_group = ap->group;
+ msg_putchar('\n');
+--- 7925,7936 ----
+ if (ap->group != AUGROUP_DEFAULT)
+ {
+ if (AUGROUP_NAME(ap->group) == NULL)
+! msg_puts_attr((char *)get_deleted_augroup(), HL_ATTR(HLF_E));
+ else
+! msg_puts_attr((char *)AUGROUP_NAME(ap->group), HL_ATTR(HLF_T));
+! msg_puts(" ");
+ }
+! msg_puts_attr((char *)event_nr2name(event), HL_ATTR(HLF_T));
+ last_event = event;
+ last_group = ap->group;
+ msg_putchar('\n');
+***************
+*** 8210,8217 ****
+ {
+ if (AUGROUP_NAME(i) != NULL)
+ {
+! msg_puts(AUGROUP_NAME(i));
+! msg_puts((char_u *)" ");
+ }
+ }
+ msg_clr_eos();
+--- 8209,8216 ----
+ {
+ if (AUGROUP_NAME(i) != NULL)
+ {
+! msg_puts((char *)AUGROUP_NAME(i));
+! msg_puts(" ");
+ }
+ }
+ msg_clr_eos();
+***************
+*** 8535,8541 ****
+ if (!forceit && *cmd == NUL)
+ {
+ /* Highlight title */
+! MSG_PUTS_TITLE(_("\n--- Autocommands ---"));
+ }
+
+ /*
+--- 8534,8540 ----
+ if (!forceit && *cmd == NUL)
+ {
+ /* Highlight title */
+! msg_puts_title(_("\n--- Autocommands ---"));
+ }
+
+ /*
+***************
+*** 8902,8908 ****
+ nothing_done = FALSE;
+
+ if (nothing_done && do_msg)
+! MSG(_("No matching autocommands"));
+ if (did_something != NULL)
+ *did_something = !nothing_done;
+
+--- 8901,8907 ----
+ nothing_done = FALSE;
+
+ if (nothing_done && do_msg)
+! msg(_("No matching autocommands"));
+ if (did_something != NULL)
+ *did_something = !nothing_done;
+
+***************
+*** 9939,9945 ****
+ {
+ verbose_enter_scroll();
+ smsg(_("autocommand %s"), ac->cmd);
+! msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ verbose_leave_scroll();
+ }
+ retval = vim_strsave(ac->cmd);
+--- 9938,9944 ----
+ {
+ verbose_enter_scroll();
+ smsg(_("autocommand %s"), ac->cmd);
+! msg_puts("\n"); /* don't overwrite this either */
+ verbose_leave_scroll();
+ }
+ retval = vim_strsave(ac->cmd);
+*** ../vim-8.1.0778/src/getchar.c 2019-01-13 23:38:33.391773303 +0100
+--- src/getchar.c 2019-01-19 16:49:29.026488202 +0100
+***************
+*** 1942,1948 ****
+ }
+
+ /*
+! * Get a character:
+ * 1. from the stuffbuffer
+ * This is used for abbreviated commands like "D" -> "d$".
+ * Also used to redo a command for ".".
+--- 1942,1948 ----
+ }
+
+ /*
+! * Get a byte:
+ * 1. from the stuffbuffer
+ * This is used for abbreviated commands like "D" -> "d$".
+ * Also used to redo a command for ".".
+***************
+*** 3728,3736 ****
+ )
+ {
+ if (abbrev)
+! MSG(_("No abbreviation found"));
+ else
+! MSG(_("No mapping found"));
+ }
+ goto theend; /* listing finished */
+ }
+--- 3728,3736 ----
+ )
+ {
+ if (abbrev)
+! msg(_("No abbreviation found"));
+ else
+! msg(_("No mapping found"));
+ }
+ goto theend; /* listing finished */
+ }
+***************
+*** 4047,4053 ****
+ mapchars = map_mode_to_chars(mp->m_mode);
+ if (mapchars != NULL)
+ {
+! msg_puts(mapchars);
+ len = (int)STRLEN(mapchars);
+ vim_free(mapchars);
+ }
+--- 4047,4053 ----
+ mapchars = map_mode_to_chars(mp->m_mode);
+ if (mapchars != NULL)
+ {
+! msg_puts((char *)mapchars);
+ len = (int)STRLEN(mapchars);
+ vim_free(mapchars);
+ }
+***************
+*** 4064,4072 ****
+ } while (len < 12);
+
+ if (mp->m_noremap == REMAP_NONE)
+! msg_puts_attr((char_u *)"*", HL_ATTR(HLF_8));
+ else if (mp->m_noremap == REMAP_SCRIPT)
+! msg_puts_attr((char_u *)"&", HL_ATTR(HLF_8));
+ else
+ msg_putchar(' ');
+
+--- 4064,4072 ----
+ } while (len < 12);
+
+ if (mp->m_noremap == REMAP_NONE)
+! msg_puts_attr("*", HL_ATTR(HLF_8));
+ else if (mp->m_noremap == REMAP_SCRIPT)
+! msg_puts_attr("&", HL_ATTR(HLF_8));
+ else
+ msg_putchar(' ');
+
+***************
+*** 4078,4084 ****
+ /* Use FALSE below if we only want things like <Up> to show up as such on
+ * the rhs, and not M-x etc, TRUE gets both -- webb */
+ if (*mp->m_str == NUL)
+! msg_puts_attr((char_u *)"<Nop>", HL_ATTR(HLF_8));
+ else
+ {
+ /* Remove escaping of CSI, because "m_str" is in a format to be used
+--- 4078,4084 ----
+ /* Use FALSE below if we only want things like <Up> to show up as such on
+ * the rhs, and not M-x etc, TRUE gets both -- webb */
+ if (*mp->m_str == NUL)
+! msg_puts_attr("<Nop>", HL_ATTR(HLF_8));
+ else
+ {
+ /* Remove escaping of CSI, because "m_str" is in a format to be used
+*** ../vim-8.1.0778/src/globals.h 2019-01-17 15:43:21.761878368 +0100
+--- src/globals.h 2019-01-19 15:52:25.737787509 +0100
+***************
+*** 989,995 ****
+ size is IOSIZE */
+ EXTERN char_u *NameBuff; /* file names are expanded in this
+ * buffer, size is MAXPATHL */
+! EXTERN char_u msg_buf[MSG_BUF_LEN]; /* small buffer for messages */
+
+ /* When non-zero, postpone redrawing. */
+ EXTERN int RedrawingDisabled INIT(= 0);
+--- 989,995 ----
+ size is IOSIZE */
+ EXTERN char_u *NameBuff; /* file names are expanded in this
+ * buffer, size is MAXPATHL */
+! EXTERN char msg_buf[MSG_BUF_LEN]; /* small buffer for messages */
+
+ /* When non-zero, postpone redrawing. */
+ EXTERN int RedrawingDisabled INIT(= 0);
+*** ../vim-8.1.0778/src/gui.c 2019-01-17 22:28:18.897373219 +0100
+--- src/gui.c 2019-01-19 16:05:35.768363395 +0100
+***************
+*** 2750,2756 ****
+ vim_snprintf((char *)IObuff, IOSIZE,
+ "INTERNAL ERROR: NUL in ScreenLines in row %ld",
+ (long)gui.row);
+! msg(IObuff);
+ }
+ }
+ # ifdef FEAT_GUI_GTK
+--- 2750,2756 ----
+ vim_snprintf((char *)IObuff, IOSIZE,
+ "INTERNAL ERROR: NUL in ScreenLines in row %ld",
+ (long)gui.row);
+! msg((char *)IObuff);
+ }
+ }
+ # ifdef FEAT_GUI_GTK
+***************
+*** 5323,5329 ****
+ }
+ }
+ else
+! MSG(_("No match at cursor, finding next"));
+ vim_regfree(regmatch.regprog);
+ }
+ }
+--- 5323,5329 ----
+ }
+ }
+ else
+! msg(_("No match at cursor, finding next"));
+ vim_regfree(regmatch.regprog);
+ }
+ }
+*** ../vim-8.1.0778/src/if_perl.xs 2019-01-13 23:50:56.358162250 +0100
+--- src/if_perl.xs 2019-01-19 17:20:57.041781293 +0100
+***************
+*** 798,808 ****
+ while ((next = strchr(token, '\n')) && !got_int)
+ {
+ *next++ = '\0'; /* replace \n with \0 */
+! msg_attr((char_u *)token, attr);
+ token = next;
+ }
+ if (*token && !got_int)
+! msg_attr((char_u *)token, attr);
+ }
+
+ #ifndef FEAT_EVAL
+--- 798,808 ----
+ while ((next = strchr(token, '\n')) && !got_int)
+ {
+ *next++ = '\0'; /* replace \n with \0 */
+! msg_attr(token, attr);
+ token = next;
+ }
+ if (*token && !got_int)
+! msg_attr(token, attr);
+ }
+
+ #ifndef FEAT_EVAL
+*** ../vim-8.1.0778/src/netbeans.c 2019-01-17 15:43:21.765878343 +0100
+--- src/netbeans.c 2019-01-19 17:37:10.875747123 +0100
+***************
+*** 3437,3443 ****
+ /* Now display it */
+ VIM_CLEAR(keep_msg);
+ msg_scrolled_ign = TRUE;
+! msg_trunc_attr(IObuff, FALSE, 0);
+ msg_scrolled_ign = FALSE;
+ }
+
+--- 3437,3443 ----
+ /* Now display it */
+ VIM_CLEAR(keep_msg);
+ msg_scrolled_ign = TRUE;
+! msg_trunc_attr((char *)IObuff, FALSE, 0);
+ msg_scrolled_ign = FALSE;
+ }
+
+***************
+*** 3464,3470 ****
+
+ VIM_CLEAR(keep_msg);
+ msg_scrolled_ign = TRUE;
+! p = msg_trunc_attr(IObuff, FALSE, 0);
+ if ((msg_scrolled && !need_wait_return) || !buf->initDone)
+ {
+ /* Need to repeat the message after redrawing when:
+--- 3464,3470 ----
+
+ VIM_CLEAR(keep_msg);
+ msg_scrolled_ign = TRUE;
+! p = (char_u *)msg_trunc_attr((char *)IObuff, FALSE, 0);
+ if ((msg_scrolled && !need_wait_return) || !buf->initDone)
+ {
+ /* Need to repeat the message after redrawing when:
+*** ../vim-8.1.0778/src/gui_w32.c 2019-01-13 23:38:33.395773275 +0100
+--- src/gui_w32.c 2019-01-19 15:55:22.836571742 +0100
+***************
+*** 5128,5134 ****
+ && GetMenuState(s_menuBar, pMenu->id, MF_BYCOMMAND) != -1)
+ {
+ ++msg_hist_off;
+! msg(pMenu->strings[MENU_INDEX_TIP]);
+ --msg_hist_off;
+ setcursor();
+ out_flush();
+--- 5128,5134 ----
+ && GetMenuState(s_menuBar, pMenu->id, MF_BYCOMMAND) != -1)
+ {
+ ++msg_hist_off;
+! msg((char *)pMenu->strings[MENU_INDEX_TIP]);
+ --msg_hist_off;
+ setcursor();
+ out_flush();
+*** ../vim-8.1.0778/src/hardcopy.c 2019-01-13 23:38:33.395773275 +0100
+--- src/hardcopy.c 2019-01-19 16:06:04.652165068 +0100
+***************
+*** 657,663 ****
+ bytes_to_print += (long_u)STRLEN(skipwhite(ml_get(lnum)));
+ if (bytes_to_print == 0)
+ {
+! MSG(_("No text to be printed"));
+ goto print_fail_no_begin;
+ }
+
+--- 657,663 ----
+ bytes_to_print += (long_u)STRLEN(skipwhite(ml_get(lnum)));
+ if (bytes_to_print == 0)
+ {
+! msg(_("No text to be printed"));
+ goto print_fail_no_begin;
+ }
+
+*** ../vim-8.1.0778/src/if_mzsch.c 2019-01-13 23:38:33.395773275 +0100
+--- src/if_mzsch.c 2019-01-19 16:06:17.244078604 +0100
+***************
+*** 1574,1580 ****
+ if (error)
+ emsg(prev);
+ else
+! MSG(prev);
+ prev = p + 1;
+ p = strchr(prev, '\n');
+ }
+--- 1574,1580 ----
+ if (error)
+ emsg(prev);
+ else
+! msg(prev);
+ prev = p + 1;
+ p = strchr(prev, '\n');
+ }
+***************
+*** 1582,1588 ****
+ if (error)
+ emsg(prev);
+ else
+! MSG(prev);
+ }
+
+ static void
+--- 1582,1588 ----
+ if (error)
+ emsg(prev);
+ else
+! msg(prev);
+ }
+
+ static void
+*** ../vim-8.1.0778/src/if_py_both.h 2019-01-13 23:50:56.358162250 +0100
+--- src/if_py_both.h 2019-01-19 16:14:19.076790269 +0100
+***************
+*** 410,421 ****
+ }
+
+ static int
+- msg_wrapper(char *text)
+- {
+- return msg((char_u *)text);
+- }
+-
+- static int
+ write_output(OutputObject *self, PyObject *string)
+ {
+ Py_ssize_t len = 0;
+--- 410,415 ----
+***************
+*** 427,433 ****
+
+ Py_BEGIN_ALLOW_THREADS
+ Python_Lock_Vim();
+! writer((writefn)(error ? emsg : msg_wrapper), (char_u *)str, len);
+ Python_Release_Vim();
+ Py_END_ALLOW_THREADS
+ PyMem_Free(str);
+--- 421,427 ----
+
+ Py_BEGIN_ALLOW_THREADS
+ Python_Lock_Vim();
+! writer((writefn)(error ? emsg : msg), (char_u *)str, len);
+ Python_Release_Vim();
+ Py_END_ALLOW_THREADS
+ PyMem_Free(str);
+*** ../vim-8.1.0778/src/if_ruby.c 2019-01-13 23:38:33.395773275 +0100
+--- src/if_ruby.c 2019-01-19 17:18:53.658616834 +0100
+***************
+*** 1057,1067 ****
+ # 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:
+--- 1057,1067 ----
+ # ifdef RUBY21_OR_LATER
+ bt = rb_funcallv(error, rb_intern("backtrace"), 0, 0);
+ for (i = 0; i < RARRAY_LEN(bt); i++)
+! msg_attr(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(RSTRING_PTR(RARRAY_PTR(bt)[i]), attr);
+ # endif
+ break;
+ default:
+***************
+*** 1083,1093 ****
+ strcpy(buff, RSTRING_PTR(str));
+ p = strchr(buff, '\n');
+ if (p) *p = '\0';
+! MSG(buff);
+ }
+ else
+ {
+! MSG("");
+ }
+ return Qnil;
+ }
+--- 1083,1093 ----
+ strcpy(buff, RSTRING_PTR(str));
+ p = strchr(buff, '\n');
+ if (p) *p = '\0';
+! msg(buff);
+ }
+ else
+ {
+! msg("");
+ }
+ return Qnil;
+ }
+***************
+*** 1641,1647 ****
+ if (i > 0) rb_str_cat(str, ", ", 2);
+ rb_str_concat(str, rb_inspect(argv[i]));
+ }
+! MSG(RSTRING_PTR(str));
+
+ if (argc == 1)
+ ret = argv[0];
+--- 1641,1647 ----
+ if (i > 0) rb_str_cat(str, ", ", 2);
+ rb_str_concat(str, rb_inspect(argv[i]));
+ }
+! msg(RSTRING_PTR(str));
+
+ if (argc == 1)
+ ret = argv[0];
+*** ../vim-8.1.0778/src/if_tcl.c 2019-01-13 23:38:33.399773248 +0100
+--- src/if_tcl.c 2019-01-19 16:06:49.403857782 +0100
+***************
+*** 1832,1842 ****
+ while ((next=strchr(text, '\n')))
+ {
+ *next++ = '\0';
+! MSG(text);
+ text = next;
+ }
+ if (*text)
+! MSG(text);
+ }
+
+ static void
+--- 1832,1842 ----
+ while ((next=strchr(text, '\n')))
+ {
+ *next++ = '\0';
+! msg(text);
+ text = next;
+ }
+ if (*text)
+! msg(text);
+ }
+
+ static void
+*** ../vim-8.1.0778/src/mark.c 2019-01-13 23:38:33.399773248 +0100
+--- src/mark.c 2019-01-19 17:04:07.020625726 +0100
+***************
+*** 761,767 ****
+ else
+ {
+ if (arg == NULL)
+! MSG(_("No marks set"));
+ else
+ semsg(_("E283: No marks matching \"%s\""), arg);
+ }
+--- 761,767 ----
+ else
+ {
+ if (arg == NULL)
+! msg(_("No marks set"));
+ else
+ semsg(_("E283: No marks matching \"%s\""), arg);
+ }
+***************
+*** 774,780 ****
+ if (!did_title)
+ {
+ /* Highlight title */
+! MSG_PUTS_TITLE(_("\nmark line col file/text"));
+ did_title = TRUE;
+ }
+ msg_putchar('\n');
+--- 774,780 ----
+ if (!did_title)
+ {
+ /* Highlight title */
+! msg_puts_title(_("\nmark line col file/text"));
+ did_title = TRUE;
+ }
+ msg_putchar('\n');
+***************
+*** 895,901 ****
+ cleanup_jumplist(curwin, TRUE);
+
+ /* Highlight title */
+! MSG_PUTS_TITLE(_("\n jump line col file/text"));
+ for (i = 0; i < curwin->w_jumplistlen && !got_int; ++i)
+ {
+ if (curwin->w_jumplist[i].fmark.mark.lnum != 0)
+--- 895,901 ----
+ cleanup_jumplist(curwin, TRUE);
+
+ /* Highlight title */
+! msg_puts_title(_("\n jump line col file/text"));
+ for (i = 0; i < curwin->w_jumplistlen && !got_int; ++i)
+ {
+ if (curwin->w_jumplist[i].fmark.mark.lnum != 0)
+***************
+*** 928,934 ****
+ out_flush();
+ }
+ if (curwin->w_jumplistidx == curwin->w_jumplistlen)
+! MSG_PUTS("\n>");
+ }
+
+ void
+--- 928,934 ----
+ out_flush();
+ }
+ if (curwin->w_jumplistidx == curwin->w_jumplistlen)
+! msg_puts("\n>");
+ }
+
+ void
+***************
+*** 949,955 ****
+ char_u *name;
+
+ /* Highlight title */
+! MSG_PUTS_TITLE(_("\nchange line col text"));
+
+ for (i = 0; i < curbuf->b_changelistlen && !got_int; ++i)
+ {
+--- 949,955 ----
+ char_u *name;
+
+ /* Highlight title */
+! msg_puts_title(_("\nchange line col text"));
+
+ for (i = 0; i < curbuf->b_changelistlen && !got_int; ++i)
+ {
+***************
+*** 975,981 ****
+ out_flush();
+ }
+ if (curwin->w_changelistidx == curbuf->b_changelistlen)
+! MSG_PUTS("\n>");
+ }
+ #endif
+
+--- 975,981 ----
+ out_flush();
+ }
+ if (curwin->w_changelistidx == curbuf->b_changelistlen)
+! msg_puts("\n>");
+ }
+ #endif
+
+*** ../vim-8.1.0778/src/mbyte.c 2019-01-14 20:16:37.203631334 +0100
+--- src/mbyte.c 2019-01-19 16:07:10.763711114 +0100
+***************
+*** 3745,3751 ****
+ len = utfc_ptr2len(line);
+ if (len == 0)
+ {
+! MSG("NUL");
+ return;
+ }
+
+--- 3745,3751 ----
+ len = utfc_ptr2len(line);
+ if (len == 0)
+ {
+! msg("NUL");
+ return;
+ }
+
+***************
+*** 3770,3776 ****
+ break;
+ }
+
+! msg(IObuff);
+ }
+
+ /*
+--- 3770,3776 ----
+ break;
+ }
+
+! msg((char *)IObuff);
+ }
+
+ /*
+*** ../vim-8.1.0778/src/menu.c 2019-01-13 23:38:33.399773248 +0100
+--- src/menu.c 2019-01-19 17:04:14.740573590 +0100
+***************
+*** 1151,1157 ****
+
+ /* Now we have found the matching menu, and we list the mappings */
+ /* Highlight title */
+! MSG_PUTS_TITLE(_("\n--- Menus ---"));
+
+ show_menus_recursive(parent, modes, 0);
+ return OK;
+--- 1151,1157 ----
+
+ /* Now we have found the matching menu, and we list the mappings */
+ /* Highlight title */
+! msg_puts_title(_("\n--- Menus ---"));
+
+ show_menus_recursive(parent, modes, 0);
+ return OK;
+***************
+*** 1175,1185 ****
+ if (got_int) /* "q" hit for "--more--" */
+ return;
+ for (i = 0; i < depth; i++)
+! MSG_PUTS(" ");
+ if (menu->priority)
+ {
+ msg_outnum((long)menu->priority);
+! MSG_PUTS(" ");
+ }
+ /* Same highlighting as for directories!? */
+ msg_outtrans_attr(menu->name, HL_ATTR(HLF_D));
+--- 1175,1185 ----
+ if (got_int) /* "q" hit for "--more--" */
+ return;
+ for (i = 0; i < depth; i++)
+! msg_puts(" ");
+ if (menu->priority)
+ {
+ msg_outnum((long)menu->priority);
+! msg_puts(" ");
+ }
+ /* Same highlighting as for directories!? */
+ msg_outtrans_attr(menu->name, HL_ATTR(HLF_D));
+***************
+*** 1194,1201 ****
+ if (got_int) /* "q" hit for "--more--" */
+ 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)
+--- 1194,1201 ----
+ if (got_int) /* "q" hit for "--more--" */
+ return;
+ for (i = 0; i < depth + 2; i++)
+! msg_puts(" ");
+! msg_puts(menu_mode_chars[bit]);
+ if (menu->noremap[bit] == REMAP_NONE)
+ msg_putchar('*');
+ else if (menu->noremap[bit] == REMAP_SCRIPT)
+***************
+*** 1210,1218 ****
+ msg_putchar('-');
+ else
+ msg_putchar(' ');
+! MSG_PUTS(" ");
+ if (*menu->strings[bit] == NUL)
+! msg_puts_attr((char_u *)"<Nop>", HL_ATTR(HLF_8));
+ else
+ msg_outtrans_special(menu->strings[bit], FALSE);
+ }
+--- 1210,1218 ----
+ msg_putchar('-');
+ else
+ msg_putchar(' ');
+! msg_puts(" ");
+ if (*menu->strings[bit] == NUL)
+! msg_puts_attr("<Nop>", HL_ATTR(HLF_8));
+ else
+ msg_outtrans_special(menu->strings[bit], FALSE);
+ }
+*** ../vim-8.1.0778/src/memline.c 2019-01-13 23:38:33.399773248 +0100
+--- src/memline.c 2019-01-19 16:58:49.306765668 +0100
+***************
+*** 1174,1180 ****
+ /* list the names of the swap files */
+ (void)recover_names(fname, TRUE, 0, NULL);
+ msg_putchar('\n');
+! MSG_PUTS(_("Enter number of swap file to use (0 to quit): "));
+ i = get_number(FALSE, NULL);
+ if (i < 1 || i > len)
+ goto theend;
+--- 1174,1180 ----
+ /* list the names of the swap files */
+ (void)recover_names(fname, TRUE, 0, NULL);
+ msg_putchar('\n');
+! msg_puts(_("Enter number of swap file to use (0 to quit): "));
+ i = get_number(FALSE, NULL);
+ if (i < 1 || i > len)
+ goto theend;
+***************
+*** 1243,1251 ****
+ if ((hp = mf_get(mfp, (blocknr_T)0, 1)) == NULL)
+ {
+ msg_start();
+! MSG_PUTS_ATTR(_("Unable to read block 0 from "), attr | MSG_HIST);
+ msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST);
+! MSG_PUTS_ATTR(_("\nMaybe no changes were made or Vim did not update the swap file."),
+ attr | MSG_HIST);
+ msg_end();
+ goto theend;
+--- 1243,1251 ----
+ if ((hp = mf_get(mfp, (blocknr_T)0, 1)) == NULL)
+ {
+ msg_start();
+! msg_puts_attr(_("Unable to read block 0 from "), attr | MSG_HIST);
+ msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST);
+! msg_puts_attr(_("\nMaybe no changes were made or Vim did not update the swap file."),
+ attr | MSG_HIST);
+ msg_end();
+ goto theend;
+***************
+*** 1255,1263 ****
+ {
+ msg_start();
+ msg_outtrans_attr(mfp->mf_fname, MSG_HIST);
+! MSG_PUTS_ATTR(_(" cannot be used with this version of Vim.\n"),
+ MSG_HIST);
+! MSG_PUTS_ATTR(_("Use Vim version 3.0.\n"), MSG_HIST);
+ msg_end();
+ goto theend;
+ }
+--- 1255,1263 ----
+ {
+ msg_start();
+ msg_outtrans_attr(mfp->mf_fname, MSG_HIST);
+! msg_puts_attr(_(" cannot be used with this version of Vim.\n"),
+ MSG_HIST);
+! msg_puts_attr(_("Use Vim version 3.0.\n"), MSG_HIST);
+ msg_end();
+ goto theend;
+ }
+***************
+*** 1272,1288 ****
+ msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST);
+ #if defined(MSWIN)
+ if (STRNCMP(b0p->b0_hname, "PC ", 3) == 0)
+! MSG_PUTS_ATTR(_(" cannot be used with this version of Vim.\n"),
+ attr | MSG_HIST);
+ else
+ #endif
+! MSG_PUTS_ATTR(_(" cannot be used on this computer.\n"),
+ attr | MSG_HIST);
+! MSG_PUTS_ATTR(_("The file was created on "), attr | MSG_HIST);
+ /* avoid going past the end of a corrupted hostname */
+ b0p->b0_fname[0] = NUL;
+! MSG_PUTS_ATTR(b0p->b0_hname, attr | MSG_HIST);
+! MSG_PUTS_ATTR(_(",\nor the file has been damaged."), attr | MSG_HIST);
+ msg_end();
+ goto theend;
+ }
+--- 1272,1288 ----
+ msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST);
+ #if defined(MSWIN)
+ if (STRNCMP(b0p->b0_hname, "PC ", 3) == 0)
+! msg_puts_attr(_(" cannot be used with this version of Vim.\n"),
+ attr | MSG_HIST);
+ else
+ #endif
+! msg_puts_attr(_(" cannot be used on this computer.\n"),
+ attr | MSG_HIST);
+! msg_puts_attr(_("The file was created on "), attr | MSG_HIST);
+ /* avoid going past the end of a corrupted hostname */
+ b0p->b0_fname[0] = NUL;
+! msg_puts_attr((char *)b0p->b0_hname, attr | MSG_HIST);
+! msg_puts_attr(_(",\nor the file has been damaged."), attr | MSG_HIST);
+ msg_end();
+ goto theend;
+ }
+***************
+*** 1315,1321 ****
+ {
+ msg_start();
+ msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST);
+! MSG_PUTS_ATTR(_(" has been damaged (page size is smaller than minimum value).\n"),
+ attr | MSG_HIST);
+ msg_end();
+ goto theend;
+--- 1315,1321 ----
+ {
+ msg_start();
+ msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST);
+! msg_puts_attr(_(" has been damaged (page size is smaller than minimum value).\n"),
+ attr | MSG_HIST);
+ msg_end();
+ goto theend;
+***************
+*** 1413,1422 ****
+ if (*curbuf->b_p_key != NUL)
+ {
+ smsg(_("Swap file is encrypted: \"%s\""), fname_used);
+! MSG_PUTS(_("\nIf you entered a new crypt key but did not write the text file,"));
+! MSG_PUTS(_("\nenter the new crypt key."));
+! MSG_PUTS(_("\nIf you wrote the text file after changing the crypt key press enter"));
+! MSG_PUTS(_("\nto use the same key for text file and swap file"));
+ }
+ else
+ smsg(_(need_key_msg), fname_used);
+--- 1413,1422 ----
+ if (*curbuf->b_p_key != NUL)
+ {
+ smsg(_("Swap file is encrypted: \"%s\""), fname_used);
+! msg_puts(_("\nIf you entered a new crypt key but did not write the text file,"));
+! msg_puts(_("\nenter the new crypt key."));
+! msg_puts(_("\nIf you wrote the text file after changing the crypt key press enter"));
+! msg_puts(_("\nto use the same key for text file and swap file"));
+ }
+ else
+ smsg(_(need_key_msg), fname_used);
+***************
+*** 1681,1709 ****
+ else if (error)
+ {
+ ++no_wait_return;
+! MSG(">>>>>>>>>>>>>");
+ emsg(_("E312: Errors detected while recovering; look for lines starting with ???"));
+ --no_wait_return;
+! MSG(_("See \":help E312\" for more information."));
+! MSG(">>>>>>>>>>>>>");
+ }
+ else
+ {
+ if (curbuf->b_changed)
+ {
+! MSG(_("Recovery completed. You should check if everything is OK."));
+! MSG_PUTS(_("\n(You might want to write out this file under another name\n"));
+! MSG_PUTS(_("and run diff with the original file to check for changes)"));
+ }
+ else
+! MSG(_("Recovery completed. Buffer contents equals file contents."));
+! MSG_PUTS(_("\nYou may want to delete the .swp file now.\n\n"));
+ cmdline_row = msg_row;
+ }
+ #ifdef FEAT_CRYPT
+ if (*buf->b_p_key != NUL && STRCMP(curbuf->b_p_key, buf->b_p_key) != 0)
+ {
+! MSG_PUTS(_("Using crypt key from swap file for the text file.\n"));
+ set_option_value((char_u *)"key", 0L, buf->b_p_key, OPT_LOCAL);
+ }
+ #endif
+--- 1681,1709 ----
+ else if (error)
+ {
+ ++no_wait_return;
+! msg(">>>>>>>>>>>>>");
+ emsg(_("E312: Errors detected while recovering; look for lines starting with ???"));
+ --no_wait_return;
+! msg(_("See \":help E312\" for more information."));
+! msg(">>>>>>>>>>>>>");
+ }
+ else
+ {
+ if (curbuf->b_changed)
+ {
+! msg(_("Recovery completed. You should check if everything is OK."));
+! msg_puts(_("\n(You might want to write out this file under another name\n"));
+! msg_puts(_("and run diff with the original file to check for changes)"));
+ }
+ else
+! msg(_("Recovery completed. Buffer contents equals file contents."));
+! msg_puts(_("\nYou may want to delete the .swp file now.\n\n"));
+ cmdline_row = msg_row;
+ }
+ #ifdef FEAT_CRYPT
+ if (*buf->b_p_key != NUL && STRCMP(curbuf->b_p_key, buf->b_p_key) != 0)
+ {
+! msg_puts(_("Using crypt key from swap file for the text file.\n"));
+ set_option_value((char_u *)"key", 0L, buf->b_p_key, OPT_LOCAL);
+ }
+ #endif
+***************
+*** 1785,1791 ****
+ if (list)
+ {
+ /* use msg() to start the scrolling properly */
+! msg((char_u *)_("Swap files found:"));
+ msg_putchar('\n');
+ }
+
+--- 1785,1791 ----
+ if (list)
+ {
+ /* use msg() to start the scrolling properly */
+! msg(_("Swap files found:"));
+ msg_putchar('\n');
+ }
+
+***************
+*** 1966,1980 ****
+ if (dir_name[0] == '.' && dir_name[1] == NUL)
+ {
+ if (fname == NULL)
+! MSG_PUTS(_(" In current directory:\n"));
+ else
+! MSG_PUTS(_(" Using specified name:\n"));
+ }
+ else
+ {
+! MSG_PUTS(_(" In directory "));
+ msg_home_replace(dir_name);
+! MSG_PUTS(":\n");
+ }
+
+ if (num_files)
+--- 1966,1980 ----
+ if (dir_name[0] == '.' && dir_name[1] == NUL)
+ {
+ if (fname == NULL)
+! msg_puts(_(" In current directory:\n"));
+ else
+! msg_puts(_(" Using specified name:\n"));
+ }
+ else
+ {
+! msg_puts(_(" In directory "));
+ msg_home_replace(dir_name);
+! msg_puts(":\n");
+ }
+
+ if (num_files)
+***************
+*** 1983,1996 ****
+ {
+ /* print the swap file name */
+ msg_outnum((long)++file_count);
+! MSG_PUTS(". ");
+! msg_puts(gettail(files[i]));
+ msg_putchar('\n');
+ (void)swapfile_info(files[i]);
+ }
+ }
+ else
+! MSG_PUTS(_(" -- none --\n"));
+ out_flush();
+ }
+ else
+--- 1983,1996 ----
+ {
+ /* print the swap file name */
+ msg_outnum((long)++file_count);
+! msg_puts(". ");
+! msg_puts((char *)gettail(files[i]));
+ msg_putchar('\n');
+ (void)swapfile_info(files[i]);
+ }
+ }
+ else
+! msg_puts(_(" -- none --\n"));
+ out_flush();
+ }
+ else
+***************
+*** 2106,2124 ****
+ /* print name of owner of the file */
+ if (mch_get_uname(st.st_uid, uname, B0_UNAME_SIZE) == OK)
+ {
+! MSG_PUTS(_(" owned by: "));
+ msg_outtrans(uname);
+! MSG_PUTS(_(" dated: "));
+ }
+ else
+ #endif
+! MSG_PUTS(_(" dated: "));
+ x = st.st_mtime; /* Manx C can't do &st.st_mtime */
+ p = ctime(&x); /* includes '\n' */
+ if (p == NULL)
+! MSG_PUTS("(invalid)\n");
+ else
+! MSG_PUTS(p);
+ }
+
+ /*
+--- 2106,2124 ----
+ /* print name of owner of the file */
+ if (mch_get_uname(st.st_uid, uname, B0_UNAME_SIZE) == OK)
+ {
+! msg_puts(_(" owned by: "));
+ msg_outtrans(uname);
+! msg_puts(_(" dated: "));
+ }
+ else
+ #endif
+! msg_puts(_(" dated: "));
+ x = st.st_mtime; /* Manx C can't do &st.st_mtime */
+ p = ctime(&x); /* includes '\n' */
+ if (p == NULL)
+! msg_puts("(invalid)\n");
+ else
+! msg_puts(p);
+ }
+
+ /*
+***************
+*** 2131,2177 ****
+ {
+ if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0)
+ {
+! MSG_PUTS(_(" [from Vim version 3.0]"));
+ }
+ else if (ml_check_b0_id(&b0) == FAIL)
+ {
+! MSG_PUTS(_(" [does not look like a Vim swap file]"));
+ }
+ else
+ {
+! MSG_PUTS(_(" file name: "));
+ if (b0.b0_fname[0] == NUL)
+! MSG_PUTS(_("[No Name]"));
+ else
+ msg_outtrans(b0.b0_fname);
+
+! MSG_PUTS(_("\n modified: "));
+! MSG_PUTS(b0.b0_dirty ? _("YES") : _("no"));
+
+ if (*(b0.b0_uname) != NUL)
+ {
+! MSG_PUTS(_("\n user name: "));
+ msg_outtrans(b0.b0_uname);
+ }
+
+ if (*(b0.b0_hname) != NUL)
+ {
+ if (*(b0.b0_uname) != NUL)
+! MSG_PUTS(_(" host name: "));
+ else
+! MSG_PUTS(_("\n host name: "));
+ msg_outtrans(b0.b0_hname);
+ }
+
+ if (char_to_long(b0.b0_pid) != 0L)
+ {
+! MSG_PUTS(_("\n process ID: "));
+ msg_outnum(char_to_long(b0.b0_pid));
+ #if defined(UNIX)
+ /* 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
+--- 2131,2177 ----
+ {
+ if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0)
+ {
+! msg_puts(_(" [from Vim version 3.0]"));
+ }
+ else if (ml_check_b0_id(&b0) == FAIL)
+ {
+! msg_puts(_(" [does not look like a Vim swap file]"));
+ }
+ else
+ {
+! msg_puts(_(" file name: "));
+ if (b0.b0_fname[0] == NUL)
+! msg_puts(_("[No Name]"));
+ else
+ msg_outtrans(b0.b0_fname);
+
+! msg_puts(_("\n modified: "));
+! msg_puts(b0.b0_dirty ? _("YES") : _("no"));
+
+ if (*(b0.b0_uname) != NUL)
+ {
+! msg_puts(_("\n user name: "));
+ msg_outtrans(b0.b0_uname);
+ }
+
+ if (*(b0.b0_hname) != NUL)
+ {
+ if (*(b0.b0_uname) != NUL)
+! msg_puts(_(" host name: "));
+ else
+! msg_puts(_("\n host name: "));
+ msg_outtrans(b0.b0_hname);
+ }
+
+ if (char_to_long(b0.b0_pid) != 0L)
+ {
+! msg_puts(_("\n process ID: "));
+ msg_outnum(char_to_long(b0.b0_pid));
+ #if defined(UNIX)
+ /* 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
+***************
+*** 2183,2201 ****
+ {
+ #if defined(MSWIN)
+ if (STRNCMP(b0.b0_hname, "PC ", 3) == 0)
+! MSG_PUTS(_("\n [not usable with this version of Vim]"));
+ else
+ #endif
+! MSG_PUTS(_("\n [not usable on this computer]"));
+ }
+ }
+ }
+ else
+! MSG_PUTS(_(" [cannot be read]"));
+ close(fd);
+ }
+ else
+! MSG_PUTS(_(" [cannot be opened]"));
+ msg_putchar('\n');
+
+ return x;
+--- 2183,2201 ----
+ {
+ #if defined(MSWIN)
+ if (STRNCMP(b0.b0_hname, "PC ", 3) == 0)
+! msg_puts(_("\n [not usable with this version of Vim]"));
+ else
+ #endif
+! msg_puts(_("\n [not usable on this computer]"));
+ }
+ }
+ }
+ else
+! msg_puts(_(" [cannot be read]"));
+ close(fd);
+ }
+ else
+! msg_puts(_(" [cannot be opened]"));
+ msg_putchar('\n');
+
+ return x;
+***************
+*** 2414,2420 ****
+ if (message)
+ {
+ if (status == OK)
+! MSG(_("File preserved"));
+ else
+ emsg(_("E314: Preserve failed"));
+ }
+--- 2414,2420 ----
+ if (message)
+ {
+ if (status == OK)
+! msg(_("File preserved"));
+ else
+ emsg(_("E314: Preserve failed"));
+ }
+***************
+*** 4373,4411 ****
+
+ ++no_wait_return;
+ (void)emsg(_("E325: ATTENTION"));
+! MSG_PUTS(_("\nFound a swap file by the name \""));
+ msg_home_replace(fname);
+! MSG_PUTS("\"\n");
+ sx = swapfile_info(fname);
+! 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 */
+ p = ctime(&x); /* includes '\n' */
+ if (p == NULL)
+! MSG_PUTS("(invalid)\n");
+ else
+! MSG_PUTS(p);
+ if (sx != 0 && x > sx)
+! MSG_PUTS(_(" NEWER than swap file!\n"));
+ }
+ /* Some of these messages are long to allow translation to
+ * other languages. */
+! MSG_PUTS(_("\n(1) Another program may be editing the same file. If this is the case,\n be careful not to end up with two different instances of the same\n file when making changes. Quit, or continue with caution.\n"));
+! MSG_PUTS(_("(2) An edit session for this file crashed.\n"));
+! MSG_PUTS(_(" If this is the case, use \":recover\" or \"vim -r "));
+ msg_outtrans(buf->b_fname);
+! MSG_PUTS(_("\"\n to recover the changes (see \":help recovery\").\n"));
+! MSG_PUTS(_(" If you did this already, delete the swap file \""));
+ msg_outtrans(fname);
+! MSG_PUTS(_("\"\n to avoid this message.\n"));
+ cmdline_row = msg_row;
+ --no_wait_return;
+ }
+--- 4373,4411 ----
+
+ ++no_wait_return;
+ (void)emsg(_("E325: ATTENTION"));
+! msg_puts(_("\nFound a swap file by the name \""));
+ msg_home_replace(fname);
+! msg_puts("\"\n");
+ sx = swapfile_info(fname);
+! 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 */
+ p = ctime(&x); /* includes '\n' */
+ if (p == NULL)
+! msg_puts("(invalid)\n");
+ else
+! msg_puts(p);
+ if (sx != 0 && x > sx)
+! msg_puts(_(" NEWER than swap file!\n"));
+ }
+ /* Some of these messages are long to allow translation to
+ * other languages. */
+! msg_puts(_("\n(1) Another program may be editing the same file. If this is the case,\n be careful not to end up with two different instances of the same\n file when making changes. Quit, or continue with caution.\n"));
+! msg_puts(_("(2) An edit session for this file crashed.\n"));
+! msg_puts(_(" If this is the case, use \":recover\" or \"vim -r "));
+ msg_outtrans(buf->b_fname);
+! msg_puts(_("\"\n to recover the changes (see \":help recovery\").\n"));
+! msg_puts(_(" If you did this already, delete the swap file \""));
+ msg_outtrans(fname);
+! msg_puts(_("\"\n to avoid this message.\n"));
+ cmdline_row = msg_row;
+ --no_wait_return;
+ }
+***************
+*** 4890,4896 ****
+ else
+ #endif
+ {
+! MSG_PUTS("\n");
+ if (msg_silent == 0)
+ /* call wait_return() later */
+ need_wait_return = TRUE;
+--- 4890,4896 ----
+ else
+ #endif
+ {
+! msg_puts("\n");
+ if (msg_silent == 0)
+ /* call wait_return() later */
+ need_wait_return = TRUE;
+*** ../vim-8.1.0778/src/message.c 2019-01-16 22:41:50.091917818 +0100
+--- src/message.c 2019-01-19 17:34:24.996817618 +0100
+***************
+*** 19,25 ****
+ 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);
+! 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);
+ static void inc_msg_scrolled(void);
+--- 19,25 ----
+ 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);
+! static void msg_puts_attr_len(char *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);
+ static void inc_msg_scrolled(void);
+***************
+*** 96,102 ****
+ * return TRUE if wait_return not called
+ */
+ int
+! msg(char_u *s)
+ {
+ return msg_attr_keep(s, 0, FALSE);
+ }
+--- 96,102 ----
+ * return TRUE if wait_return not called
+ */
+ int
+! msg(char *s)
+ {
+ return msg_attr_keep(s, 0, FALSE);
+ }
+***************
+*** 107,113 ****
+ * Like msg() but keep it silent when 'verbosefile' is set.
+ */
+ int
+! verb_msg(char_u *s)
+ {
+ int n;
+
+--- 107,113 ----
+ * Like msg() but keep it silent when 'verbosefile' is set.
+ */
+ int
+! verb_msg(char *s)
+ {
+ int n;
+
+***************
+*** 120,133 ****
+ #endif
+
+ int
+! msg_attr(char_u *s, int attr)
+ {
+ return msg_attr_keep(s, attr, FALSE);
+ }
+
+ int
+ msg_attr_keep(
+! char_u *s,
+ int attr,
+ int keep) /* TRUE: set keep_msg if it doesn't scroll */
+ {
+--- 120,133 ----
+ #endif
+
+ int
+! msg_attr(char *s, int attr)
+ {
+ return msg_attr_keep(s, attr, FALSE);
+ }
+
+ int
+ msg_attr_keep(
+! char *s,
+ int attr,
+ int keep) /* TRUE: set keep_msg if it doesn't scroll */
+ {
+***************
+*** 137,148 ****
+
+ /* Skip messages not matching ":filter pattern".
+ * Don't filter when there is an error. */
+! if (!emsg_on_display && message_filtered(s))
+ return TRUE;
+
+ #ifdef FEAT_EVAL
+ if (attr == 0)
+! set_vim_var_string(VV_STATUSMSG, s, -1);
+ #endif
+
+ /*
+--- 137,148 ----
+
+ /* Skip messages not matching ":filter pattern".
+ * Don't filter when there is an error. */
+! if (!emsg_on_display && message_filtered((char_u *)s))
+ return TRUE;
+
+ #ifdef FEAT_EVAL
+ if (attr == 0)
+! set_vim_var_string(VV_STATUSMSG, (char_u *)s, -1);
+ #endif
+
+ /*
+***************
+*** 156,167 ****
+
+ /* Add message to history (unless it's a repeated kept message or a
+ * truncated message) */
+! if (s != keep_msg
+ || (*s != '<'
+ && last_msg_hist != NULL
+ && last_msg_hist->msg != NULL
+ && STRCMP(s, last_msg_hist->msg)))
+! add_msg_hist(s, -1, attr);
+
+ #ifdef FEAT_JOB_CHANNEL
+ if (emsg_to_channel_log)
+--- 156,167 ----
+
+ /* Add message to history (unless it's a repeated kept message or a
+ * truncated message) */
+! if ((char_u *)s != keep_msg
+ || (*s != '<'
+ && last_msg_hist != NULL
+ && last_msg_hist->msg != NULL
+ && STRCMP(s, last_msg_hist->msg)))
+! add_msg_hist((char_u *)s, -1, attr);
+
+ #ifdef FEAT_JOB_CHANNEL
+ if (emsg_to_channel_log)
+***************
+*** 171,192 ****
+
+ /* When displaying keep_msg, don't let msg_start() free it, caller must do
+ * that. */
+! if (s == keep_msg)
+ keep_msg = NULL;
+
+ /* Truncate the message if needed. */
+ msg_start();
+! buf = msg_strtrunc(s, FALSE);
+ if (buf != NULL)
+! s = buf;
+
+! msg_outtrans_attr(s, attr);
+ msg_clr_eos();
+ retval = msg_end();
+
+! if (keep && retval && vim_strsize(s) < (int)(Rows - cmdline_row - 1)
+! * Columns + sc_col)
+! set_keep_msg(s, 0);
+
+ vim_free(buf);
+ --entered;
+--- 171,192 ----
+
+ /* When displaying keep_msg, don't let msg_start() free it, caller must do
+ * that. */
+! if ((char_u *)s == keep_msg)
+ keep_msg = NULL;
+
+ /* Truncate the message if needed. */
+ msg_start();
+! buf = msg_strtrunc((char_u *)s, FALSE);
+ if (buf != NULL)
+! s = (char *)buf;
+
+! msg_outtrans_attr((char_u *)s, attr);
+ msg_clr_eos();
+ retval = msg_end();
+
+! if (keep && retval && vim_strsize((char_u *)s)
+! < (int)(Rows - cmdline_row - 1) * Columns + sc_col)
+! set_keep_msg((char_u *)s, 0);
+
+ vim_free(buf);
+ --entered;
+***************
+*** 376,382 ****
+ va_start(arglist, s);
+ vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
+ va_end(arglist);
+! return msg(IObuff);
+ }
+
+ int
+--- 376,382 ----
+ va_start(arglist, s);
+ vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
+ va_end(arglist);
+! return msg((char *)IObuff);
+ }
+
+ int
+***************
+*** 390,396 ****
+ va_start(arglist, s);
+ vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
+ va_end(arglist);
+! return msg_attr(IObuff, attr);
+ }
+
+ int
+--- 390,396 ----
+ va_start(arglist, s);
+ vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
+ va_end(arglist);
+! return msg_attr((char *)IObuff, attr);
+ }
+
+ int
+***************
+*** 404,410 ****
+ va_start(arglist, s);
+ vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
+ va_end(arglist);
+! return msg_attr_keep(IObuff, attr, TRUE);
+ }
+
+ #endif
+--- 404,410 ----
+ va_start(arglist, s);
+ vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
+ va_end(arglist);
+! return msg_attr_keep((char *)IObuff, attr, TRUE);
+ }
+
+ #endif
+***************
+*** 502,514 ****
+ p = get_emsg_source();
+ if (p != NULL)
+ {
+! msg_attr(p, attr);
+ vim_free(p);
+ }
+ p = get_emsg_lnum();
+ if (p != NULL)
+ {
+! msg_attr(p, HL_ATTR(HLF_N));
+ vim_free(p);
+ last_sourcing_lnum = sourcing_lnum; /* only once for each line */
+ }
+--- 502,514 ----
+ p = get_emsg_source();
+ if (p != NULL)
+ {
+! msg_attr((char *)p, attr);
+ vim_free(p);
+ }
+ p = get_emsg_lnum();
+ if (p != NULL)
+ {
+! msg_attr((char *)p, HL_ATTR(HLF_N));
+ vim_free(p);
+ last_sourcing_lnum = sourcing_lnum; /* only once for each line */
+ }
+***************
+*** 611,617 ****
+ /* When testing some errors are turned into a normal message. */
+ if (ignore_error(s))
+ /* don't call msg() if it results in a dialog */
+! return msg_use_printf() ? FALSE : msg(s);
+ #endif
+
+ called_emsg = TRUE;
+--- 611,617 ----
+ /* When testing some errors are turned into a normal message. */
+ if (ignore_error(s))
+ /* don't call msg() if it results in a dialog */
+! return msg_use_printf() ? FALSE : msg((char *)s);
+ #endif
+
+ called_emsg = TRUE;
+***************
+*** 716,722 ****
+ * Display the error message itself.
+ */
+ msg_nowait = FALSE; /* wait for this msg */
+! r = msg_attr(s, attr);
+
+ #ifdef FEAT_JOB_CHANNEL
+ emsg_to_channel_log = FALSE;
+--- 716,722 ----
+ * Display the error message itself.
+ */
+ msg_nowait = FALSE; /* wait for this msg */
+! r = msg_attr((char *)s, attr);
+
+ #ifdef FEAT_JOB_CHANNEL
+ emsg_to_channel_log = FALSE;
+***************
+*** 817,838 ****
+ * Careful: The string may be changed by msg_may_trunc()!
+ * Returns a pointer to the printed message, if wait_return() not called.
+ */
+! char_u *
+! msg_trunc_attr(char_u *s, int force, int attr)
+ {
+ int n;
+
+ /* Add message to history before truncating */
+! add_msg_hist(s, -1, attr);
+
+! s = msg_may_trunc(force, s);
+
+ msg_hist_off = TRUE;
+! n = msg_attr(s, attr);
+ msg_hist_off = FALSE;
+
+ if (n)
+! return s;
+ return NULL;
+ }
+
+--- 817,839 ----
+ * Careful: The string may be changed by msg_may_trunc()!
+ * Returns a pointer to the printed message, if wait_return() not called.
+ */
+! char *
+! msg_trunc_attr(char *s, int force, int attr)
+ {
+ int n;
++ char *ts;
+
+ /* Add message to history before truncating */
+! add_msg_hist((char_u *)s, -1, attr);
+
+! ts = (char *)msg_may_trunc(force, (char_u *)s);
+
+ msg_hist_off = TRUE;
+! n = msg_attr(ts, attr);
+ msg_hist_off = FALSE;
+
+ if (n)
+! return ts;
+ return NULL;
+ }
+
+***************
+*** 983,989 ****
+ if (s != NULL && *s != NUL)
+ // The next comment is extracted by xgettext and put in po file for
+ // translators to read.
+! msg_attr((char_u *)
+ // Translator: Please replace the name and email address
+ // with the appropriate text for your translation.
+ _("Messages maintainer: Bram Moolenaar <Bram@vim.org>"),
+--- 984,990 ----
+ if (s != NULL && *s != NUL)
+ // The next comment is extracted by xgettext and put in po file for
+ // translators to read.
+! msg_attr(
+ // Translator: Please replace the name and email address
+ // with the appropriate text for your translation.
+ _("Messages maintainer: Bram Moolenaar <Bram@vim.org>"),
+***************
+*** 993,999 ****
+ /* Display what was not skipped. */
+ for (; p != NULL && !got_int; p = p->next)
+ if (p->msg != NULL)
+! msg_attr(p->msg, p->attr);
+
+ msg_hist_off = FALSE;
+ }
+--- 994,1000 ----
+ /* Display what was not skipped. */
+ for (; p != NULL && !got_int; p = p->next)
+ if (p->msg != NULL)
+! msg_attr((char *)p->msg, p->attr);
+
+ msg_hist_off = FALSE;
+ }
+***************
+*** 1016,1025 ****
+ #endif
+
+ /*
+! * wait for the user to hit a key (normally a return)
+! * if 'redraw' is TRUE, clear and redraw the screen
+! * if 'redraw' is FALSE, just redraw the screen
+! * if 'redraw' is -1, don't redraw at all
+ */
+ void
+ wait_return(int redraw)
+--- 1017,1026 ----
+ #endif
+
+ /*
+! * Wait for the user to hit a key (normally Enter).
+! * If "redraw" is TRUE, clear and redraw the screen.
+! * If "redraw" is FALSE, just redraw the screen.
+! * If "redraw" is -1, don't redraw at all.
+ */
+ void
+ wait_return(int redraw)
+***************
+*** 1065,1071 ****
+ }
+ else if (exmode_active)
+ {
+! MSG_PUTS(" "); /* make sure the cursor is on the right line */
+ c = CAR; /* no need for a return in ex mode */
+ got_int = FALSE;
+ }
+--- 1066,1072 ----
+ }
+ else if (exmode_active)
+ {
+! msg_puts(" "); /* make sure the cursor is on the right line */
+ c = CAR; /* no need for a return in ex mode */
+ got_int = FALSE;
+ }
+***************
+*** 1281,1289 ****
+ if (msg_didout) /* start on a new line */
+ msg_putchar('\n');
+ if (got_int)
+! MSG_PUTS(_("Interrupt: "));
+
+! MSG_PUTS_ATTR(_("Press ENTER or type command to continue"), HL_ATTR(HLF_R));
+ if (!msg_use_printf())
+ msg_clr_eos();
+ p_more = save_p_more;
+--- 1282,1290 ----
+ if (msg_didout) /* start on a new line */
+ msg_putchar('\n');
+ if (got_int)
+! msg_puts(_("Interrupt: "));
+
+! msg_puts_attr(_("Press ENTER or type command to continue"), HL_ATTR(HLF_R));
+ if (!msg_use_printf())
+ msg_clr_eos();
+ p_more = save_p_more;
+***************
+*** 1388,1396 ****
+ msg_putchar_attr(int c, int attr)
+ {
+ #ifdef FEAT_MBYTE
+! char_u buf[MB_MAXBYTES + 1];
+ #else
+! char_u buf[4];
+ #endif
+
+ if (IS_SPECIAL(c))
+--- 1389,1397 ----
+ msg_putchar_attr(int c, int attr)
+ {
+ #ifdef FEAT_MBYTE
+! char buf[MB_MAXBYTES + 1];
+ #else
+! char buf[4];
+ #endif
+
+ if (IS_SPECIAL(c))
+***************
+*** 1403,1409 ****
+ else
+ {
+ #ifdef FEAT_MBYTE
+! buf[(*mb_char2bytes)(c, buf)] = NUL;
+ #else
+ buf[0] = c;
+ buf[1] = NUL;
+--- 1404,1410 ----
+ else
+ {
+ #ifdef FEAT_MBYTE
+! buf[(*mb_char2bytes)(c, (char_u *)buf)] = NUL;
+ #else
+ buf[0] = c;
+ buf[1] = NUL;
+***************
+*** 1415,1423 ****
+ void
+ msg_outnum(long n)
+ {
+! char_u buf[20];
+
+! sprintf((char *)buf, "%ld", n);
+ msg_puts(buf);
+ }
+
+--- 1416,1424 ----
+ void
+ msg_outnum(long n)
+ {
+! char buf[20];
+
+! sprintf(buf, "%ld", n);
+ msg_puts(buf);
+ }
+
+***************
+*** 1486,1492 ****
+ return p + l;
+ }
+ #endif
+! msg_puts_attr(transchar_byte(*p), attr);
+ return p + 1;
+ }
+
+--- 1487,1493 ----
+ return p + l;
+ }
+ #endif
+! msg_puts_attr((char *)transchar_byte(*p), attr);
+ return p + 1;
+ }
+
+***************
+*** 1513,1519 ****
+ /* If the string starts with a composing character first draw a space on
+ * which the composing char can be drawn. */
+ if (enc_utf8 && utf_iscomposing(utf_ptr2char(msgstr)))
+! msg_puts_attr((char_u *)" ", attr);
+ #endif
+
+ /*
+--- 1514,1520 ----
+ /* If the string starts with a composing character first draw a space on
+ * which the composing char can be drawn. */
+ if (enc_utf8 && utf_iscomposing(utf_ptr2char(msgstr)))
+! msg_puts_attr(" ", attr);
+ #endif
+
+ /*
+***************
+*** 1541,1550 ****
+ /* unprintable multi-byte char: print the printable chars so
+ * far and the translation of the unprintable char. */
+ if (str > plain_start)
+! msg_puts_attr_len(plain_start, (int)(str - plain_start),
+! attr);
+ plain_start = str + mb_l;
+! msg_puts_attr(transchar(c), attr == 0 ? HL_ATTR(HLF_8) : attr);
+ retval += char2cells(c);
+ }
+ len -= mb_l - 1;
+--- 1542,1552 ----
+ /* unprintable multi-byte char: print the printable chars so
+ * far and the translation of the unprintable char. */
+ if (str > plain_start)
+! msg_puts_attr_len((char *)plain_start,
+! (int)(str - plain_start), attr);
+ plain_start = str + mb_l;
+! msg_puts_attr((char *)transchar(c),
+! attr == 0 ? HL_ATTR(HLF_8) : attr);
+ retval += char2cells(c);
+ }
+ len -= mb_l - 1;
+***************
+*** 1559,1568 ****
+ /* unprintable char: print the printable chars so far and the
+ * translation of the unprintable char. */
+ if (str > plain_start)
+! msg_puts_attr_len(plain_start, (int)(str - plain_start),
+! attr);
+ plain_start = str + 1;
+! msg_puts_attr(s, attr == 0 ? HL_ATTR(HLF_8) : attr);
+ retval += (int)STRLEN(s);
+ }
+ else
+--- 1561,1570 ----
+ /* unprintable char: print the printable chars so far and the
+ * translation of the unprintable char. */
+ if (str > plain_start)
+! msg_puts_attr_len((char *)plain_start,
+! (int)(str - plain_start), attr);
+ plain_start = str + 1;
+! msg_puts_attr((char *)s, attr == 0 ? HL_ATTR(HLF_8) : attr);
+ retval += (int)STRLEN(s);
+ }
+ else
+***************
+*** 1573,1579 ****
+
+ if (str > plain_start)
+ /* print the printable chars at the end */
+! msg_puts_attr_len(plain_start, (int)(str - plain_start), attr);
+
+ return retval;
+ }
+--- 1575,1581 ----
+
+ if (str > plain_start)
+ /* print the printable chars at the end */
+! msg_puts_attr_len((char *)plain_start, (int)(str - plain_start), attr);
+
+ return retval;
+ }
+***************
+*** 1619,1625 ****
+ {
+ char_u *str = strstart;
+ int retval = 0;
+! char_u *string;
+ int attr;
+ int len;
+
+--- 1621,1627 ----
+ {
+ char_u *str = strstart;
+ int retval = 0;
+! char *text;
+ int attr;
+ int len;
+
+***************
+*** 1629,1644 ****
+ /* Leading and trailing spaces need to be displayed in <> form. */
+ if ((str == strstart || str[1] == NUL) && *str == ' ')
+ {
+! string = (char_u *)"<Space>";
+ ++str;
+ }
+ else
+! string = str2special(&str, from);
+! len = vim_strsize(string);
+ /* Highlight special keys */
+! msg_puts_attr(string, len > 1
+ #ifdef FEAT_MBYTE
+! && (*mb_ptr2len)(string) <= 1
+ #endif
+ ? attr : 0);
+ retval += len;
+--- 1631,1646 ----
+ /* Leading and trailing spaces need to be displayed in <> form. */
+ if ((str == strstart || str[1] == NUL) && *str == ' ')
+ {
+! text = "<Space>";
+ ++str;
+ }
+ else
+! text = (char *)str2special(&str, from);
+! len = vim_strsize((char_u *)text);
+ /* Highlight special keys */
+! msg_puts_attr(text, len > 1
+ #ifdef FEAT_MBYTE
+! && (*mb_ptr2len)((char_u *)text) <= 1
+ #endif
+ ? attr : 0);
+ retval += len;
+***************
+*** 1825,1831 ****
+ mch_memmove(buf, s, (size_t)l);
+ buf[l] = NUL;
+ }
+! msg_puts(buf);
+ s += l;
+ continue;
+ }
+--- 1827,1833 ----
+ mch_memmove(buf, s, (size_t)l);
+ buf[l] = NUL;
+ }
+! msg_puts((char *)buf);
+ s += l;
+ continue;
+ }
+***************
+*** 1957,1970 ****
+ * Update msg_row and msg_col for the next message.
+ */
+ void
+! msg_puts(char_u *s)
+ {
+ msg_puts_attr(s, 0);
+ }
+
+ void
+! msg_puts_title(
+! char_u *s)
+ {
+ msg_puts_attr(s, HL_ATTR(HLF_T));
+ }
+--- 1959,1971 ----
+ * Update msg_row and msg_col for the next message.
+ */
+ void
+! msg_puts(char *s)
+ {
+ msg_puts_attr(s, 0);
+ }
+
+ void
+! msg_puts_title(char *s)
+ {
+ msg_puts_attr(s, HL_ATTR(HLF_T));
+ }
+***************
+*** 1975,1987 ****
+ * Does not handle multi-byte characters!
+ */
+ void
+! msg_puts_long_attr(char_u *longstr, int attr)
+ {
+! msg_puts_long_len_attr(longstr, (int)STRLEN(longstr), attr);
+ }
+
+ void
+! msg_puts_long_len_attr(char_u *longstr, int len, int attr)
+ {
+ int slen = len;
+ int room;
+--- 1976,1988 ----
+ * Does not handle multi-byte characters!
+ */
+ void
+! msg_outtrans_long_attr(char_u *longstr, int attr)
+ {
+! msg_outtrans_long_len_attr(longstr, (int)STRLEN(longstr), attr);
+ }
+
+ void
+! msg_outtrans_long_len_attr(char_u *longstr, int len, int attr)
+ {
+ int slen = len;
+ int room;
+***************
+*** 1991,1997 ****
+ {
+ slen = (room - 3) / 2;
+ msg_outtrans_len_attr(longstr, slen, attr);
+! msg_puts_attr((char_u *)"...", HL_ATTR(HLF_8));
+ }
+ msg_outtrans_len_attr(longstr + len - slen, slen, attr);
+ }
+--- 1992,1998 ----
+ {
+ slen = (room - 3) / 2;
+ msg_outtrans_len_attr(longstr, slen, attr);
+! msg_puts_attr("...", HL_ATTR(HLF_8));
+ }
+ msg_outtrans_len_attr(longstr + len - slen, slen, attr);
+ }
+***************
+*** 2000,2006 ****
+ * Basic function for writing a message with highlight attributes.
+ */
+ void
+! msg_puts_attr(char_u *s, int attr)
+ {
+ msg_puts_attr_len(s, -1, attr);
+ }
+--- 2001,2007 ----
+ * Basic function for writing a message with highlight attributes.
+ */
+ void
+! msg_puts_attr(char *s, int attr)
+ {
+ msg_puts_attr_len(s, -1, attr);
+ }
+***************
+*** 2011,2022 ****
+ * When "maxlen" is >= 0 the message is not put in the history.
+ */
+ static void
+! msg_puts_attr_len(char_u *str, int maxlen, int attr)
+ {
+ /*
+ * If redirection is on, also write to the redirection file.
+ */
+! redir_write(str, maxlen);
+
+ /*
+ * Don't print anything when using ":silent cmd".
+--- 2012,2023 ----
+ * When "maxlen" is >= 0 the message is not put in the history.
+ */
+ static void
+! msg_puts_attr_len(char *str, int maxlen, int attr)
+ {
+ /*
+ * If redirection is on, also write to the redirection file.
+ */
+! redir_write((char_u *)str, maxlen);
+
+ /*
+ * Don't print anything when using ":silent cmd".
+***************
+*** 2027,2033 ****
+ /* if MSG_HIST flag set, add message to history */
+ if ((attr & MSG_HIST) && maxlen < 0)
+ {
+! add_msg_hist(str, -1, attr);
+ attr &= ~MSG_HIST;
+ }
+
+--- 2028,2034 ----
+ /* if MSG_HIST flag set, add message to history */
+ if ((attr & MSG_HIST) && maxlen < 0)
+ {
+! add_msg_hist((char_u *)str, -1, attr);
+ attr &= ~MSG_HIST;
+ }
+
+***************
+*** 2049,2057 ****
+ * cursor is.
+ */
+ if (msg_use_printf())
+! msg_puts_printf(str, maxlen);
+ else
+! msg_puts_display(str, maxlen, attr, FALSE);
+ }
+
+ /*
+--- 2050,2058 ----
+ * cursor is.
+ */
+ if (msg_use_printf())
+! msg_puts_printf((char_u *)str, maxlen);
+ else
+! msg_puts_display((char_u *)str, maxlen, attr, FALSE);
+ }
+
+ /*
+***************
+*** 3497,3503 ****
+ keep_msg_attr = HL_ATTR(HLF_W);
+ else
+ keep_msg_attr = 0;
+! if (msg_attr(message, keep_msg_attr) && msg_scrolled == 0)
+ set_keep_msg(message, keep_msg_attr);
+ msg_didout = FALSE; /* overwrite this message */
+ msg_nowait = TRUE; /* don't wait for this message */
+--- 3498,3504 ----
+ keep_msg_attr = HL_ATTR(HLF_W);
+ else
+ keep_msg_attr = 0;
+! if (msg_attr((char *)message, keep_msg_attr) && msg_scrolled == 0)
+ set_keep_msg(message, keep_msg_attr);
+ msg_didout = FALSE; /* overwrite this message */
+ msg_nowait = TRUE; /* don't wait for this message */
+***************
+*** 3891,3897 ****
+ /* avoid that 'q' at the more prompt truncates the message here */
+ ++confirm_msg_used;
+ if (confirm_msg != NULL)
+! msg_puts_attr(confirm_msg, HL_ATTR(HLF_M));
+ --confirm_msg_used;
+ }
+
+--- 3892,3898 ----
+ /* avoid that 'q' at the more prompt truncates the message here */
+ ++confirm_msg_used;
+ if (confirm_msg != NULL)
+! msg_puts_attr((char *)confirm_msg, HL_ATTR(HLF_M));
+ --confirm_msg_used;
+ }
+
+*** ../vim-8.1.0778/src/misc1.c 2019-01-17 22:28:18.901373188 +0100
+--- src/misc1.c 2019-01-19 17:20:14.550067462 +0100
+***************
+*** 3468,3474 ****
+ if (msg_row == Rows - 1)
+ msg_col = col;
+ msg_source(HL_ATTR(HLF_W));
+! MSG_PUTS_ATTR(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST);
+ #ifdef FEAT_EVAL
+ set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1);
+ #endif
+--- 3468,3474 ----
+ if (msg_row == Rows - 1)
+ msg_col = col;
+ msg_source(HL_ATTR(HLF_W));
+! msg_puts_attr(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST);
+ #ifdef FEAT_EVAL
+ set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1);
+ #endif
+***************
+*** 3742,3748 ****
+ {
+ if (typed > 0)
+ {
+! MSG_PUTS("\b \b");
+ --typed;
+ }
+ n /= 10;
+--- 3742,3748 ----
+ {
+ if (typed > 0)
+ {
+! msg_puts("\b \b");
+ --typed;
+ }
+ n /= 10;
+***************
+*** 3786,3794 ****
+
+ /* When using ":silent" assume that <CR> was entered. */
+ if (mouse_used != NULL)
+! MSG_PUTS(_("Type number and <Enter> or click with mouse (empty cancels): "));
+ 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
+--- 3786,3794 ----
+
+ /* When using ":silent" assume that <CR> was entered. */
+ if (mouse_used != NULL)
+! msg_puts(_("Type number and <Enter> or click with mouse (empty cancels): "));
+ 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
+***************
+*** 3846,3861 ****
+ 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))
+ {
+! set_keep_msg(msg_buf, 0);
+ keep_msg_more = TRUE;
+ }
+ }
+--- 3846,3862 ----
+ if (pn > p_report)
+ {
+ if (n > 0)
+! vim_snprintf(msg_buf, MSG_BUF_LEN,
+ NGETTEXT("%ld more line", "%ld more lines", pn), pn);
+ else
+! vim_snprintf(msg_buf, MSG_BUF_LEN,
+ NGETTEXT("%ld line less", "%ld fewer lines", pn), pn);
+ if (got_int)
+! vim_strcat((char_u *)msg_buf, (char_u *)_(" (Interrupted)"),
+! MSG_BUF_LEN);
+ if (msg(msg_buf))
+ {
+! set_keep_msg((char_u *)msg_buf, 0);
+ keep_msg_more = TRUE;
+ }
+ }
+***************
+*** 3936,3942 ****
+ if (vim_strchr(p_debug, 'e') != NULL)
+ {
+ msg_source(HL_ATTR(HLF_W));
+! msg_attr((char_u *)_("Beep!"), HL_ATTR(HLF_W));
+ }
+ }
+ }
+--- 3937,3943 ----
+ if (vim_strchr(p_debug, 'e') != NULL)
+ {
+ msg_source(HL_ATTR(HLF_W));
+! msg_attr(_("Beep!"), HL_ATTR(HLF_W));
+ }
+ }
+ }
+*** ../vim-8.1.0778/src/misc2.c 2019-01-17 15:43:21.761878368 +0100
+--- src/misc2.c 2019-01-19 16:29:12.954740959 +0100
+***************
+*** 4670,4676 ****
+ smsg("Already Searched: %s (%s)",
+ stackp->ffs_fix_path, stackp->ffs_wc_path);
+ /* don't overwrite this either */
+! msg_puts((char_u *)"\n");
+ verbose_leave_scroll();
+ }
+ #endif
+--- 4670,4676 ----
+ smsg("Already Searched: %s (%s)",
+ stackp->ffs_fix_path, stackp->ffs_wc_path);
+ /* don't overwrite this either */
+! msg_puts("\n");
+ verbose_leave_scroll();
+ }
+ #endif
+***************
+*** 4684,4690 ****
+ smsg("Searching: %s (%s)",
+ stackp->ffs_fix_path, stackp->ffs_wc_path);
+ /* don't overwrite this either */
+! msg_puts((char_u *)"\n");
+ verbose_leave_scroll();
+ }
+ #endif
+--- 4684,4690 ----
+ smsg("Searching: %s (%s)",
+ stackp->ffs_fix_path, stackp->ffs_wc_path);
+ /* don't overwrite this either */
+! msg_puts("\n");
+ verbose_leave_scroll();
+ }
+ #endif
+***************
+*** 4903,4909 ****
+ smsg("Already: %s",
+ file_path);
+ /* don't overwrite this either */
+! msg_puts((char_u *)"\n");
+ verbose_leave_scroll();
+ }
+ continue;
+--- 4903,4909 ----
+ smsg("Already: %s",
+ file_path);
+ /* don't overwrite this either */
+! msg_puts("\n");
+ verbose_leave_scroll();
+ }
+ continue;
+***************
+*** 4930,4936 ****
+ verbose_enter_scroll();
+ smsg("HIT: %s", file_path);
+ /* don't overwrite this either */
+! msg_puts((char_u *)"\n");
+ verbose_leave_scroll();
+ }
+ #endif
+--- 4930,4936 ----
+ verbose_enter_scroll();
+ smsg("HIT: %s", file_path);
+ /* don't overwrite this either */
+! msg_puts("\n");
+ verbose_leave_scroll();
+ }
+ #endif
+***************
+*** 5131,5137 ****
+ smsg("ff_get_visited_list: FOUND list for %s",
+ filename);
+ /* don't overwrite this either */
+! msg_puts((char_u *)"\n");
+ verbose_leave_scroll();
+ }
+ #endif
+--- 5131,5137 ----
+ smsg("ff_get_visited_list: FOUND list for %s",
+ filename);
+ /* don't overwrite this either */
+! msg_puts("\n");
+ verbose_leave_scroll();
+ }
+ #endif
+***************
+*** 5147,5153 ****
+ verbose_enter_scroll();
+ smsg("ff_get_visited_list: new list for %s", filename);
+ /* don't overwrite this either */
+! msg_puts((char_u *)"\n");
+ verbose_leave_scroll();
+ }
+ #endif
+--- 5147,5153 ----
+ verbose_enter_scroll();
+ smsg("ff_get_visited_list: new list for %s", filename);
+ /* don't overwrite this either */
+! msg_puts("\n");
+ verbose_leave_scroll();
+ }
+ #endif
+*** ../vim-8.1.0778/src/normal.c 2019-01-13 23:38:33.403773217 +0100
+--- src/normal.c 2019-01-19 17:20:24.649998864 +0100
+***************
+*** 1207,1213 ****
+ update_screen(0);
+ /* now reset it, otherwise it's put in the history again */
+ keep_msg = kmsg;
+! msg_attr(kmsg, keep_msg_attr);
+ vim_free(kmsg);
+ }
+ setcursor();
+--- 1207,1213 ----
+ update_screen(0);
+ /* now reset it, otherwise it's put in the history again */
+ keep_msg = kmsg;
+! msg_attr((char *)kmsg, keep_msg_attr);
+ vim_free(kmsg);
+ }
+ setcursor();
+***************
+*** 3274,3280 ****
+ if (full_screen)
+ {
+ if (!did_check && HL_ATTR(HLF_V) == 0)
+! MSG(_("Warning: terminal cannot highlight"));
+ did_check = TRUE;
+ }
+ }
+--- 3274,3280 ----
+ if (full_screen)
+ {
+ if (!did_check && HL_ATTR(HLF_V) == 0)
+! msg(_("Warning: terminal cannot highlight"));
+ did_check = TRUE;
+ }
+ }
+***************
+*** 6468,6474 ****
+ cap->oap->inclusive = FALSE;
+ old_pos = curwin->w_cursor;
+ #ifdef FEAT_VIRTUALEDIT
+! curwin->w_cursor.coladd = 0; /* TODO: don't do this for an error. */
+ #endif
+
+ #ifdef FEAT_SEARCHPATH
+--- 6468,6474 ----
+ cap->oap->inclusive = FALSE;
+ old_pos = curwin->w_cursor;
+ #ifdef FEAT_VIRTUALEDIT
+! curwin->w_cursor.coladd = 0; // TODO: don't do this for an error.
+ #endif
+
+ #ifdef FEAT_SEARCHPATH
+***************
+*** 6491,6501 ****
+ * define "]d" "[d" "]D" "[D" "]^D" "[^D"
+ */
+ if (vim_strchr((char_u *)
+! #ifdef EBCDIC
+ "iI\005dD\067",
+! #else
+ "iI\011dD\004",
+! #endif
+ cap->nchar) != NULL)
+ {
+ char_u *ptr;
+--- 6491,6501 ----
+ * define "]d" "[d" "]D" "[D" "]^D" "[^D"
+ */
+ if (vim_strchr((char_u *)
+! # ifdef EBCDIC
+ "iI\005dD\067",
+! # else
+ "iI\011dD\004",
+! # endif
+ cap->nchar) != NULL)
+ {
+ char_u *ptr;
+***************
+*** 9027,9033 ****
+ #endif
+ && !VIsual_active
+ && no_reason)
+! MSG(_("Type :qa! and press <Enter> to abandon all changes and exit Vim"));
+
+ /* Don't reset "restart_edit" when 'insertmode' is set, it won't be
+ * set again below when halfway a mapping. */
+--- 9027,9033 ----
+ #endif
+ && !VIsual_active
+ && no_reason)
+! msg(_("Type :qa! and press <Enter> to abandon all changes and exit Vim"));
+
+ /* Don't reset "restart_edit" when 'insertmode' is set, it won't be
+ * set again below when halfway a mapping. */
+*** ../vim-8.1.0778/src/ops.c 2019-01-17 17:13:25.924984061 +0100
+--- src/ops.c 2019-01-19 17:04:24.104510342 +0100
+***************
+*** 302,308 ****
+ vim_snprintf((char *)IObuff, IOSIZE,
+ NGETTEXT(msg_line_single, msg_line_plural, oap->line_count),
+ oap->line_count, op, amount);
+! msg(IObuff);
+ }
+
+ /*
+--- 302,308 ----
+ vim_snprintf((char *)IObuff, IOSIZE,
+ NGETTEXT(msg_line_single, msg_line_plural, oap->line_count),
+ oap->line_count, op, amount);
+! msg((char *)IObuff);
+ }
+
+ /*
+***************
+*** 1112,1118 ****
+ * adds the escaping back later.
+ */
+ reg_recording = 0;
+! MSG("");
+ p = get_recorded();
+ if (p == NULL)
+ retval = FAIL;
+--- 1112,1118 ----
+ * adds the escaping back later.
+ */
+ reg_recording = 0;
+! msg("");
+ p = get_recorded();
+ if (p == NULL)
+ retval = FAIL;
+***************
+*** 3049,3055 ****
+ VIM_CLEAR(y_current->y_array);
+ #ifdef AMIGA
+ if (n >= 1000)
+! MSG("");
+ #endif
+ }
+ }
+--- 3049,3055 ----
+ VIM_CLEAR(y_current->y_array);
+ #ifdef AMIGA
+ if (n >= 1000)
+! msg("");
+ #endif
+ }
+ }
+***************
+*** 4285,4291 ****
+ attr = HL_ATTR(HLF_8);
+
+ /* Highlight title */
+! MSG_PUTS_TITLE(_("\n--- Registers ---"));
+ for (i = -1; i < NUM_REGISTERS && !got_int; ++i)
+ {
+ name = get_register_name(i);
+--- 4285,4291 ----
+ attr = HL_ATTR(HLF_8);
+
+ /* Highlight title */
+! msg_puts_title(_("\n--- Registers ---"));
+ for (i = -1; i < NUM_REGISTERS && !got_int; ++i)
+ {
+ name = get_register_name(i);
+***************
+*** 4327,4340 ****
+ msg_putchar('\n');
+ msg_putchar('"');
+ msg_putchar(name);
+! MSG_PUTS(" ");
+
+ n = (int)Columns - 6;
+ for (j = 0; j < yb->y_size && n > 1; ++j)
+ {
+ if (j)
+ {
+! MSG_PUTS_ATTR("^J", attr);
+ n -= 2;
+ }
+ for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0; ++p)
+--- 4327,4340 ----
+ msg_putchar('\n');
+ msg_putchar('"');
+ msg_putchar(name);
+! msg_puts(" ");
+
+ n = (int)Columns - 6;
+ for (j = 0; j < yb->y_size && n > 1; ++j)
+ {
+ if (j)
+ {
+! msg_puts_attr("^J", attr);
+ n -= 2;
+ }
+ for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0; ++p)
+***************
+*** 4349,4355 ****
+ }
+ }
+ if (n > 1 && yb->y_type == MLINE)
+! MSG_PUTS_ATTR("^J", attr);
+ out_flush(); /* show one line at a time */
+ }
+ ui_breakcheck();
+--- 4349,4355 ----
+ }
+ }
+ if (n > 1 && yb->y_type == MLINE)
+! msg_puts_attr("^J", attr);
+ out_flush(); /* show one line at a time */
+ }
+ ui_breakcheck();
+***************
+*** 4361,4367 ****
+ if ((p = get_last_insert()) != NULL
+ && (arg == NULL || vim_strchr(arg, '.') != NULL) && !got_int)
+ {
+! MSG_PUTS("\n\". ");
+ dis_msg(p, TRUE);
+ }
+
+--- 4361,4367 ----
+ if ((p = get_last_insert()) != NULL
+ && (arg == NULL || vim_strchr(arg, '.') != NULL) && !got_int)
+ {
+! msg_puts("\n\". ");
+ dis_msg(p, TRUE);
+ }
+
+***************
+*** 4371,4377 ****
+ if (last_cmdline != NULL && (arg == NULL || vim_strchr(arg, ':') != NULL)
+ && !got_int)
+ {
+! MSG_PUTS("\n\": ");
+ dis_msg(last_cmdline, FALSE);
+ }
+
+--- 4371,4377 ----
+ if (last_cmdline != NULL && (arg == NULL || vim_strchr(arg, ':') != NULL)
+ && !got_int)
+ {
+! msg_puts("\n\": ");
+ dis_msg(last_cmdline, FALSE);
+ }
+
+***************
+*** 4381,4387 ****
+ if (curbuf->b_fname != NULL
+ && (arg == NULL || vim_strchr(arg, '%') != NULL) && !got_int)
+ {
+! MSG_PUTS("\n\"% ");
+ dis_msg(curbuf->b_fname, FALSE);
+ }
+
+--- 4381,4387 ----
+ if (curbuf->b_fname != NULL
+ && (arg == NULL || vim_strchr(arg, '%') != NULL) && !got_int)
+ {
+! msg_puts("\n\"% ");
+ dis_msg(curbuf->b_fname, FALSE);
+ }
+
+***************
+*** 4395,4401 ****
+
+ if (buflist_name_nr(0, &fname, &dummy) != FAIL)
+ {
+! MSG_PUTS("\n\"# ");
+ dis_msg(fname, FALSE);
+ }
+ }
+--- 4395,4401 ----
+
+ if (buflist_name_nr(0, &fname, &dummy) != FAIL)
+ {
+! msg_puts("\n\"# ");
+ dis_msg(fname, FALSE);
+ }
+ }
+***************
+*** 4406,4412 ****
+ if (last_search_pat() != NULL
+ && (arg == NULL || vim_strchr(arg, '/') != NULL) && !got_int)
+ {
+! MSG_PUTS("\n\"/ ");
+ dis_msg(last_search_pat(), FALSE);
+ }
+
+--- 4406,4412 ----
+ if (last_search_pat() != NULL
+ && (arg == NULL || vim_strchr(arg, '/') != NULL) && !got_int)
+ {
+! msg_puts("\n\"/ ");
+ dis_msg(last_search_pat(), FALSE);
+ }
+
+***************
+*** 4417,4423 ****
+ if (expr_line != NULL && (arg == NULL || vim_strchr(arg, '=') != NULL)
+ && !got_int)
+ {
+! MSG_PUTS("\n\"= ");
+ dis_msg(expr_line, FALSE);
+ }
+ #endif
+--- 4417,4423 ----
+ if (expr_line != NULL && (arg == NULL || vim_strchr(arg, '=') != NULL)
+ && !got_int)
+ {
+! msg_puts("\n\"= ");
+ dis_msg(expr_line, FALSE);
+ }
+ #endif
+***************
+*** 7401,7407 ****
+ {
+ if (dict == NULL)
+ {
+! MSG(_(no_lines_msg));
+ return;
+ }
+ }
+--- 7401,7407 ----
+ {
+ if (dict == NULL)
+ {
+! msg(_(no_lines_msg));
+ return;
+ }
+ }
+***************
+*** 7615,7621 ****
+ /* Don't shorten this message, the user asked for it. */
+ p = p_shm;
+ p_shm = (char_u *)"";
+! msg(IObuff);
+ p_shm = p;
+ }
+ }
+--- 7615,7621 ----
+ /* Don't shorten this message, the user asked for it. */
+ p = p_shm;
+ p_shm = (char_u *)"";
+! msg((char *)IObuff);
+ p_shm = p;
+ }
+ }
+*** ../vim-8.1.0778/src/option.c 2019-01-16 22:41:50.095917784 +0100
+--- src/option.c 2019-01-19 17:17:51.487038996 +0100
+***************
+*** 8885,8891 ****
+ static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'");
+
+ msg_source(HL_ATTR(HLF_W));
+! MSG_ATTR(_(w_arabic), HL_ATTR(HLF_W));
+ #ifdef FEAT_EVAL
+ set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_arabic), -1);
+ #endif
+--- 8885,8891 ----
+ static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'");
+
+ msg_source(HL_ATTR(HLF_W));
+! msg_attr(_(w_arabic), HL_ATTR(HLF_W));
+ #ifdef FEAT_EVAL
+ set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_arabic), -1);
+ #endif
+***************
+*** 10152,10164 ****
+
+ /* Highlight title */
+ if (all == 2)
+! MSG_PUTS_TITLE(_("\n--- Terminal codes ---"));
+ else if (opt_flags & OPT_GLOBAL)
+! MSG_PUTS_TITLE(_("\n--- Global option values ---"));
+ else if (opt_flags & OPT_LOCAL)
+! MSG_PUTS_TITLE(_("\n--- Local option values ---"));
+ else
+! MSG_PUTS_TITLE(_("\n--- Options ---"));
+
+ /*
+ * do the loop two times:
+--- 10152,10164 ----
+
+ /* Highlight title */
+ if (all == 2)
+! msg_puts_title(_("\n--- Terminal codes ---"));
+ else if (opt_flags & OPT_GLOBAL)
+! msg_puts_title(_("\n--- Global option values ---"));
+ else if (opt_flags & OPT_LOCAL)
+! msg_puts_title(_("\n--- Local option values ---"));
+ else
+! msg_puts_title(_("\n--- Options ---"));
+
+ /*
+ * do the loop two times:
+***************
+*** 10276,10287 ****
+ /* for 'modified' we also need to check if 'ff' or 'fenc' changed. */
+ if ((p->flags & P_BOOL) && ((int *)varp == &curbuf->b_changed
+ ? !curbufIsChanged() : !*(int *)varp))
+! MSG_PUTS("no");
+ else if ((p->flags & P_BOOL) && *(int *)varp < 0)
+! MSG_PUTS("--");
+ else
+! MSG_PUTS(" ");
+! MSG_PUTS(p->fullname);
+ if (!(p->flags & P_BOOL))
+ {
+ msg_putchar('=');
+--- 10276,10287 ----
+ /* for 'modified' we also need to check if 'ff' or 'fenc' changed. */
+ if ((p->flags & P_BOOL) && ((int *)varp == &curbuf->b_changed
+ ? !curbufIsChanged() : !*(int *)varp))
+! msg_puts("no");
+ else if ((p->flags & P_BOOL) && *(int *)varp < 0)
+! msg_puts("--");
+ else
+! msg_puts(" ");
+! msg_puts(p->fullname);
+ if (!(p->flags & P_BOOL))
+ {
+ msg_putchar('=');
+*** ../vim-8.1.0778/src/os_amiga.c 2019-01-13 23:38:33.403773217 +0100
+--- src/os_amiga.c 2019-01-19 16:39:12.026651479 +0100
+***************
+*** 1230,1239 ****
+ if (x < 0)
+ # endif
+ {
+! MSG_PUTS(_("Cannot execute "));
+ if (cmd == NULL)
+ {
+! MSG_PUTS(_("shell "));
+ msg_outtrans(p_sh);
+ }
+ else
+--- 1230,1239 ----
+ if (x < 0)
+ # endif
+ {
+! msg_puts(_("Cannot execute "));
+ if (cmd == NULL)
+ {
+! msg_puts(_("shell "));
+ msg_outtrans(p_sh);
+ }
+ else
+***************
+*** 1253,1259 ****
+ {
+ msg_putchar('\n');
+ msg_outnum((long)x);
+! MSG_PUTS(_(" returned\n"));
+ }
+ retval = x;
+ }
+--- 1253,1259 ----
+ {
+ msg_putchar('\n');
+ msg_outnum((long)x);
+! msg_puts(_(" returned\n"));
+ }
+ retval = x;
+ }
+***************
+*** 1320,1326 ****
+ if (x < 0)
+ # endif
+ {
+! MSG_PUTS(_("Cannot execute "));
+ if (use_execute)
+ {
+ if (cmd == NULL)
+--- 1320,1326 ----
+ if (x < 0)
+ # endif
+ {
+! msg_puts(_("Cannot execute "));
+ if (use_execute)
+ {
+ if (cmd == NULL)
+***************
+*** 1330,1336 ****
+ }
+ else
+ {
+! MSG_PUTS(_("shell "));
+ msg_outtrans(shellcmd);
+ }
+ msg_putchar('\n');
+--- 1330,1336 ----
+ }
+ else
+ {
+! msg_puts(_("shell "));
+ msg_outtrans(shellcmd);
+ }
+ msg_putchar('\n');
+***************
+*** 1355,1361 ****
+ {
+ msg_putchar('\n');
+ msg_outnum((long)x);
+! MSG_PUTS(_(" returned\n"));
+ }
+ retval = x;
+ }
+--- 1355,1361 ----
+ {
+ msg_putchar('\n');
+ msg_outnum((long)x);
+! msg_puts(_(" returned\n"));
+ }
+ retval = x;
+ }
+*** ../vim-8.1.0778/src/os_unix.c 2019-01-17 22:28:18.901373188 +0100
+--- src/os_unix.c 2019-01-19 17:22:30.673242601 +0100
+***************
+*** 1790,1796 ****
+ (void)XSetErrorHandler(old_handler);
+
+ if (p_verbose > 0 && got_x_error)
+! verb_msg((char_u *)_("Testing the X display failed"));
+
+ return (got_x_error ? FAIL : OK);
+ }
+--- 1790,1796 ----
+ (void)XSetErrorHandler(old_handler);
+
+ if (p_verbose > 0 && got_x_error)
+! verb_msg(_("Testing the X display failed"));
+
+ return (got_x_error ? FAIL : OK);
+ }
+***************
+*** 2660,2666 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! MSG("fchdir() to previous dir");
+ verbose_leave();
+ }
+ l = fchdir(fd);
+--- 2660,2666 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! msg("fchdir() to previous dir");
+ verbose_leave();
+ }
+ l = fchdir(fd);
+***************
+*** 2869,2882 ****
+ if (errno == EOPNOTSUPP)
+ return;
+
+! MSG_PUTS(_("\nCould not get security context for "));
+ msg_outtrans(from_file);
+ msg_putchar('\n');
+ return;
+ }
+ if (getfilecon((char *)to_file, &to_context) < 0)
+ {
+! MSG_PUTS(_("\nCould not get security context for "));
+ msg_outtrans(to_file);
+ msg_putchar('\n');
+ freecon (from_context);
+--- 2869,2882 ----
+ if (errno == EOPNOTSUPP)
+ return;
+
+! msg_puts(_("\nCould not get security context for "));
+ msg_outtrans(from_file);
+ msg_putchar('\n');
+ return;
+ }
+ if (getfilecon((char *)to_file, &to_context) < 0)
+ {
+! msg_puts(_("\nCould not get security context for "));
+ msg_outtrans(to_file);
+ msg_putchar('\n');
+ freecon (from_context);
+***************
+*** 2886,2892 ****
+ {
+ if (setfilecon((char *)to_file, from_context) < 0)
+ {
+! MSG_PUTS(_("\nCould not set security context for "));
+ msg_outtrans(to_file);
+ msg_putchar('\n');
+ }
+--- 2886,2892 ----
+ {
+ if (setfilecon((char *)to_file, from_context) < 0)
+ {
+! msg_puts(_("\nCould not set security context for "));
+ msg_outtrans(to_file);
+ msg_putchar('\n');
+ }
+***************
+*** 2957,2963 ****
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("Could not get security context %s for %s. Removing it!"),
+ name, from_file);
+! msg_puts(IObuff);
+ msg_putchar('\n');
+ /* FALLTHROUGH to remove the attribute */
+
+--- 2957,2963 ----
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("Could not get security context %s for %s. Removing it!"),
+ name, from_file);
+! msg_puts((char *)IObuff);
+ msg_putchar('\n');
+ /* FALLTHROUGH to remove the attribute */
+
+***************
+*** 4505,4514 ****
+ if (emsg_silent)
+ ;
+ else if (x == 127)
+! MSG_PUTS(_("\nCannot execute shell sh\n"));
+ else if (x && !(options & SHELL_SILENT))
+ {
+! MSG_PUTS(_("\nshell returned "));
+ msg_outnum((long)x);
+ msg_putchar('\n');
+ }
+--- 4505,4514 ----
+ if (emsg_silent)
+ ;
+ else if (x == 127)
+! msg_puts(_("\nCannot execute shell sh\n"));
+ else if (x && !(options & SHELL_SILENT))
+ {
+! msg_puts(_("\nshell returned "));
+ msg_outnum((long)x);
+ msg_putchar('\n');
+ }
+***************
+*** 4605,4611 ****
+ }
+ if (pipe_error)
+ {
+! MSG_PUTS(_("\nCannot create pipes\n"));
+ out_flush();
+ }
+ }
+--- 4605,4611 ----
+ }
+ if (pipe_error)
+ {
+! msg_puts(_("\nCannot create pipes\n"));
+ out_flush();
+ }
+ }
+***************
+*** 4625,4631 ****
+ {
+ UNBLOCK_SIGNALS(&curset);
+
+! MSG_PUTS(_("\nCannot fork\n"));
+ if ((options & (SHELL_READ|SHELL_WRITE))
+ # ifdef FEAT_GUI
+ || (gui.in_use && show_shell_mess)
+--- 4625,4631 ----
+ {
+ UNBLOCK_SIGNALS(&curset);
+
+! msg_puts(_("\nCannot fork\n"));
+ if ((options & (SHELL_READ|SHELL_WRITE))
+ # ifdef FEAT_GUI
+ || (gui.in_use && show_shell_mess)
+***************
+*** 4877,4883 ****
+ * external program. */
+ if ((wpid = fork()) == -1)
+ {
+! MSG_PUTS(_("\nCannot fork\n"));
+ }
+ else if (wpid == 0) /* child */
+ {
+--- 4877,4883 ----
+ * external program. */
+ if ((wpid = fork()) == -1)
+ {
+! msg_puts(_("\nCannot fork\n"));
+ }
+ else if (wpid == 0) /* child */
+ {
+***************
+*** 5166,5172 ****
+ }
+ c = *p;
+ *p = NUL;
+! msg_puts(buffer);
+ if (p < buffer + len)
+ {
+ *p = c;
+--- 5166,5172 ----
+ }
+ c = *p;
+ *p = NUL;
+! msg_puts((char *)buffer);
+ if (p < buffer + len)
+ {
+ *p = c;
+***************
+*** 5180,5186 ****
+ else
+ {
+ buffer[len] = NUL;
+! msg_puts(buffer);
+ }
+
+ windgoto(msg_row, msg_col);
+--- 5180,5186 ----
+ else
+ {
+ buffer[len] = NUL;
+! msg_puts((char *)buffer);
+ }
+
+ windgoto(msg_row, msg_col);
+***************
+*** 5360,5379 ****
+ {
+ if (retval == EXEC_FAILED)
+ {
+! MSG_PUTS(_("\nCannot execute shell "));
+ msg_outtrans(p_sh);
+ msg_putchar('\n');
+ }
+ else if (!(options & SHELL_SILENT))
+ {
+! MSG_PUTS(_("\nshell returned "));
+ msg_outnum((long)retval);
+ msg_putchar('\n');
+ }
+ }
+ }
+ else
+! MSG_PUTS(_("\nCommand terminated\n"));
+ }
+ }
+
+--- 5360,5379 ----
+ {
+ if (retval == EXEC_FAILED)
+ {
+! msg_puts(_("\nCannot execute shell "));
+ msg_outtrans(p_sh);
+ msg_putchar('\n');
+ }
+ else if (!(options & SHELL_SILENT))
+ {
+! msg_puts(_("\nshell returned "));
+ msg_outnum((long)retval);
+ msg_putchar('\n');
+ }
+ }
+ }
+ else
+! msg_puts(_("\nCommand terminated\n"));
+ }
+ }
+
+***************
+*** 6196,6202 ****
+ else if (fds[xsmp_idx].revents & POLLHUP)
+ {
+ if (p_verbose > 0)
+! verb_msg((char_u *)_("XSMP lost ICE connection"));
+ xsmp_close();
+ }
+ if (--ret == 0)
+--- 6196,6202 ----
+ else if (fds[xsmp_idx].revents & POLLHUP)
+ {
+ if (p_verbose > 0)
+! verb_msg(_("XSMP lost ICE connection"));
+ xsmp_close();
+ }
+ if (--ret == 0)
+***************
+*** 6354,6360 ****
+ if (FD_ISSET(xsmp_icefd, &efds))
+ {
+ if (p_verbose > 0)
+! verb_msg((char_u *)_("XSMP lost ICE connection"));
+ xsmp_close();
+ if (--ret == 0)
+ finished = FALSE; /* keep going if event was only one */
+--- 6354,6360 ----
+ if (FD_ISSET(xsmp_icefd, &efds))
+ {
+ if (p_verbose > 0)
+! verb_msg(_("XSMP lost ICE connection"));
+ xsmp_close();
+ if (--ret == 0)
+ finished = FALSE; /* keep going if event was only one */
+***************
+*** 6714,6720 ****
+ if (!(flags & EW_SILENT))
+ #endif
+ {
+! MSG(_(e_wildexpand));
+ msg_start(); /* don't overwrite this message */
+ }
+ }
+--- 6714,6720 ----
+ if (!(flags & EW_SILENT))
+ #endif
+ {
+! msg(_(e_wildexpand));
+ msg_start(); /* don't overwrite this message */
+ }
+ }
+***************
+*** 6734,6740 ****
+ /* Something went wrong, perhaps a file name with a special char. */
+ if (!(flags & EW_SILENT))
+ {
+! MSG(_(e_wildexpand));
+ msg_start(); /* don't overwrite this message */
+ }
+ vim_free(tempname);
+--- 6734,6740 ----
+ /* Something went wrong, perhaps a file name with a special char. */
+ if (!(flags & EW_SILENT))
+ {
+! msg(_(e_wildexpand));
+ msg_start(); /* don't overwrite this message */
+ }
+ vim_free(tempname);
+***************
+*** 7534,7540 ****
+ if (xterm_dpy == NULL)
+ {
+ if (p_verbose > 0)
+! verb_msg((char_u *)_("Opening the X display failed"));
+ return;
+ }
+
+--- 7534,7540 ----
+ if (xterm_dpy == NULL)
+ {
+ if (p_verbose > 0)
+! verb_msg(_("Opening the X display failed"));
+ return;
+ }
+
+***************
+*** 7872,7878 ****
+ ml_sync_all(FALSE, FALSE); /* preserve all swap files */
+
+ if (p_verbose > 0)
+! verb_msg((char_u *)_("XSMP handling save-yourself request"));
+
+ # if defined(FEAT_GUI) && defined(USE_XSMP_INTERACT)
+ /* Now see if we can ask about unsaved files */
+--- 7872,7878 ----
+ ml_sync_all(FALSE, FALSE); /* preserve all swap files */
+
+ if (p_verbose > 0)
+! verb_msg(_("XSMP handling save-yourself request"));
+
+ # if defined(FEAT_GUI) && defined(USE_XSMP_INTERACT)
+ /* Now see if we can ask about unsaved files */
+***************
+*** 7961,7967 ****
+ {
+ /* Lost ICE */
+ if (p_verbose > 0)
+! verb_msg((char_u *)_("XSMP lost ICE connection"));
+ xsmp_close();
+ return FAIL;
+ }
+--- 7961,7967 ----
+ {
+ /* Lost ICE */
+ if (p_verbose > 0)
+! verb_msg(_("XSMP lost ICE connection"));
+ xsmp_close();
+ return FAIL;
+ }
+***************
+*** 7984,7990 ****
+ #endif
+
+ if (p_verbose > 0)
+! verb_msg((char_u *)_("XSMP opening connection"));
+
+ xsmp.save_yourself = xsmp.shutdown = False;
+
+--- 7984,7990 ----
+ #endif
+
+ if (p_verbose > 0)
+! verb_msg(_("XSMP opening connection"));
+
+ xsmp.save_yourself = xsmp.shutdown = False;
+
+***************
+*** 8003,8009 ****
+ if (IceAddConnectionWatch(xsmp_ice_connection, &dummy) == 0)
+ {
+ if (p_verbose > 0)
+! verb_msg((char_u *)_("XSMP ICE connection watch failed"));
+ return;
+ }
+
+--- 8003,8009 ----
+ if (IceAddConnectionWatch(xsmp_ice_connection, &dummy) == 0)
+ {
+ if (p_verbose > 0)
+! verb_msg(_("XSMP ICE connection watch failed"));
+ return;
+ }
+
+***************
+*** 8028,8034 ****
+ {
+ vim_snprintf(errorreport, sizeof(errorreport),
+ _("XSMP SmcOpenConnection failed: %s"), errorstring);
+! verb_msg((char_u *)errorreport);
+ }
+ return;
+ }
+--- 8028,8034 ----
+ {
+ vim_snprintf(errorreport, sizeof(errorreport),
+ _("XSMP SmcOpenConnection failed: %s"), errorstring);
+! verb_msg(errorreport);
+ }
+ return;
+ }
+*** ../vim-8.1.0778/src/os_win32.c 2019-01-19 14:36:56.796683378 +0100
+--- src/os_win32.c 2019-01-19 16:39:35.414491642 +0100
+***************
+*** 4534,4540 ****
+ }
+ c = *p;
+ *p = NUL;
+! msg_puts(buffer);
+ if (p < buffer + len)
+ {
+ *p = c;
+--- 4534,4540 ----
+ }
+ c = *p;
+ *p = NUL;
+! msg_puts((char *)buffer);
+ if (p < buffer + len)
+ {
+ *p = c;
+***************
+*** 4548,4554 ****
+ else
+ {
+ buffer[len] = NUL;
+! msg_puts(buffer);
+ }
+
+ windgoto(msg_row, msg_col);
+--- 4548,4554 ----
+ else
+ {
+ buffer[len] = NUL;
+! msg_puts((char *)buffer);
+ }
+
+ windgoto(msg_row, msg_col);
+***************
+*** 4607,4613 ****
+ CloseHandle(g_hChildStd_IN_Wr);
+ CloseHandle(g_hChildStd_OUT_Rd);
+ CloseHandle(g_hChildStd_OUT_Wr);
+! MSG_PUTS(_("\nCannot create pipes\n"));
+ }
+
+ si.cb = sizeof(si);
+--- 4607,4613 ----
+ CloseHandle(g_hChildStd_IN_Wr);
+ CloseHandle(g_hChildStd_OUT_Rd);
+ CloseHandle(g_hChildStd_OUT_Wr);
+! msg_puts(_("\nCannot create pipes\n"));
+ }
+
+ si.cb = sizeof(si);
+*** ../vim-8.1.0778/src/proto/message.pro 2019-01-15 20:19:36.743904434 +0100
+--- src/proto/message.pro 2019-01-19 17:34:34.636755665 +0100
+***************
+*** 1,8 ****
+ /* message.c */
+! int msg(char_u *s);
+! int verb_msg(char_u *s);
+! int msg_attr(char_u *s, int attr);
+! int msg_attr_keep(char_u *s, int attr, int keep);
+ char_u *msg_strtrunc(char_u *s, int force);
+ void trunc_string(char_u *s, char_u *buf, int room_in, int buflen);
+ void reset_last_sourcing(void);
+--- 1,8 ----
+ /* message.c */
+! int msg(char *s);
+! int verb_msg(char *s);
+! int msg_attr(char *s, int attr);
+! int msg_attr_keep(char *s, int attr, int keep);
+ char_u *msg_strtrunc(char_u *s, int force);
+ void trunc_string(char_u *s, char_u *buf, int room_in, int buflen);
+ void reset_last_sourcing(void);
+***************
+*** 11,31 ****
+ void ignore_error_for_testing(char_u *error);
+ void do_perror(char *msg);
+ int emsg(char *s);
+!
+! int semsg(const char *s, ...)
+! #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+! __attribute__((format(printf, 1, 2)))
+! #endif
+! ;
+ void iemsg(char *s);
+! void siemsg(const char *s, ...)
+! #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+! __attribute__((format(printf, 1, 2)))
+! #endif
+! ;
+ void internal_error(char *where);
+ void emsg_invreg(int name);
+! char_u *msg_trunc_attr(char_u *s, int force, int attr);
+ char_u *msg_may_trunc(int force, char_u *s);
+ int delete_first_msg(void);
+ void ex_messages(exarg_T *eap);
+--- 11,22 ----
+ void ignore_error_for_testing(char_u *error);
+ void do_perror(char *msg);
+ int emsg(char *s);
+! int semsg(const char *s, ...);
+ void iemsg(char *s);
+! void siemsg(const char *s, ...);
+ void internal_error(char *where);
+ void emsg_invreg(int name);
+! char *msg_trunc_attr(char *s, int force, int attr);
+ char_u *msg_may_trunc(int force, char_u *s);
+ int delete_first_msg(void);
+ void ex_messages(exarg_T *eap);
+***************
+*** 51,61 ****
+ char_u *str2special(char_u **sp, int from);
+ void str2specialbuf(char_u *sp, char_u *buf, int len);
+ void msg_prt_line(char_u *s, int list);
+! void msg_puts(char_u *s);
+! void msg_puts_title(char_u *s);
+! void msg_puts_long_attr(char_u *longstr, int attr);
+! void msg_puts_long_len_attr(char_u *longstr, int len, int attr);
+! void msg_puts_attr(char_u *s, int attr);
+ int message_filtered(char_u *msg);
+ void may_clear_sb_text(void);
+ void sb_text_start_cmdline(void);
+--- 42,52 ----
+ char_u *str2special(char_u **sp, int from);
+ void str2specialbuf(char_u *sp, char_u *buf, int len);
+ void msg_prt_line(char_u *s, int list);
+! void msg_puts(char *s);
+! void msg_puts_title(char *s);
+! void msg_outtrans_long_attr(char_u *longstr, int attr);
+! void msg_outtrans_long_len_attr(char_u *longstr, int len, int attr);
+! void msg_puts_attr(char *s, int attr);
+ int message_filtered(char_u *msg);
+ void may_clear_sb_text(void);
+ void sb_text_start_cmdline(void);
+*** ../vim-8.1.0778/src/quickfix.c 2019-01-15 20:19:36.743904434 +0100
+--- src/quickfix.c 2019-01-19 17:36:56.459840497 +0100
+***************
+*** 3149,3155 ****
+ msg_scroll = TRUE;
+ else if (!msg_scrolled && shortmess(SHM_OVERALL))
+ msg_scroll = FALSE;
+! msg_attr_keep(IObuff, 0, TRUE);
+ msg_scroll = i;
+ }
+
+--- 3149,3155 ----
+ msg_scroll = TRUE;
+ else if (!msg_scrolled && shortmess(SHM_OVERALL))
+ msg_scroll = FALSE;
+! msg_attr_keep((char *)IObuff, 0, TRUE);
+ msg_scroll = i;
+ }
+
+***************
+*** 3422,3428 ****
+ msg_outtrans_attr(IObuff, cursel ? 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)
+--- 3422,3428 ----
+ msg_outtrans_attr(IObuff, cursel ? HL_ATTR(HLF_QFL) : qfFileAttr);
+
+ if (qfp->qf_lnum != 0)
+! msg_puts_attr(":", qfSepAttr);
+ if (qfp->qf_lnum == 0)
+ IObuff[0] = NUL;
+ else if (qfp->qf_col == 0)
+***************
+*** 3432,3446 ****
+ 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
+--- 3432,3446 ----
+ qfp->qf_lnum, qfp->qf_col);
+ sprintf((char *)IObuff + STRLEN(IObuff), "%s",
+ (char *)qf_types(qfp->qf_type, qfp->qf_nr));
+! msg_puts_attr((char *)IObuff, qfLineAttr);
+! msg_puts_attr(":", qfSepAttr);
+ if (qfp->qf_pattern != NULL)
+ {
+ qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE);
+! msg_puts((char *)IObuff);
+! msg_puts_attr(":", qfSepAttr);
+ }
+! msg_puts(" ");
+
+ // Remove newlines and leading whitespace from the text. For an
+ // unrecognized line keep the indent, the compiler may mark a word
+***************
+*** 3601,3607 ****
+ vim_strcat(buf, (char_u *)title, IOSIZE);
+ }
+ trunc_string(buf, buf, Columns - 1, IOSIZE);
+! msg(buf);
+ }
+
+ /*
+--- 3601,3607 ----
+ vim_strcat(buf, (char_u *)title, IOSIZE);
+ }
+ trunc_string(buf, buf, Columns - 1, IOSIZE);
+! msg((char *)buf);
+ }
+
+ /*
+***************
+*** 3667,3673 ****
+ if (is_loclist_cmd(eap->cmdidx))
+ qi = GET_LOC_LIST(curwin);
+ if (qf_stack_empty(qi))
+! MSG(_("No entries"));
+ else
+ for (i = 0; i < qi->qf_listcount; ++i)
+ qf_msg(qi, i, i == qi->qf_curlist ? "> " : " ");
+--- 3667,3673 ----
+ if (is_loclist_cmd(eap->cmdidx))
+ qi = GET_LOC_LIST(curwin);
+ if (qf_stack_empty(qi))
+! msg(_("No entries"));
+ else
+ for (i = 0; i < qi->qf_listcount; ++i)
+ qf_msg(qi, i, i == qi->qf_curlist ? "> " : " ");
+***************
+*** 4653,4659 ****
+ if (msg_col == 0)
+ msg_didout = FALSE;
+ msg_start();
+! MSG_PUTS(":!");
+ msg_outtrans(cmd); // show what we are doing
+
+ return cmd;
+--- 4653,4659 ----
+ if (msg_col == 0)
+ msg_didout = FALSE;
+ msg_start();
+! msg_puts(":!");
+ msg_outtrans(cmd); // show what we are doing
+
+ return cmd;
+*** ../vim-8.1.0778/src/sign.c 2019-01-18 22:01:39.017406155 +0100
+--- src/sign.c 2019-01-19 17:04:49.608338047 +0100
+***************
+*** 611,617 ****
+ char lbuf[MSG_BUF_LEN];
+ char group[MSG_BUF_LEN];
+
+! MSG_PUTS_TITLE(_("\n--- Signs ---"));
+ msg_putchar('\n');
+ if (rbuf == NULL)
+ buf = firstbuf;
+--- 611,617 ----
+ char lbuf[MSG_BUF_LEN];
+ char group[MSG_BUF_LEN];
+
+! msg_puts_title(_("\n--- Signs ---"));
+ msg_putchar('\n');
+ if (rbuf == NULL)
+ buf = firstbuf;
+***************
+*** 622,628 ****
+ if (buf->b_signlist != NULL)
+ {
+ vim_snprintf(lbuf, MSG_BUF_LEN, _("Signs for %s:"), buf->b_fname);
+! MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
+ msg_putchar('\n');
+ }
+ FOR_ALL_SIGNS_IN_BUF(buf, sign)
+--- 622,628 ----
+ if (buf->b_signlist != NULL)
+ {
+ vim_snprintf(lbuf, MSG_BUF_LEN, _("Signs for %s:"), buf->b_fname);
+! msg_puts_attr(lbuf, HL_ATTR(HLF_D));
+ msg_putchar('\n');
+ }
+ FOR_ALL_SIGNS_IN_BUF(buf, sign)
+***************
+*** 640,646 ****
+ _(" line=%ld id=%d%s name=%s priority=%d"),
+ (long)sign->lnum, sign->id, group,
+ sign_typenr2name(sign->typenr), sign->priority);
+! MSG_PUTS(lbuf);
+ msg_putchar('\n');
+ }
+ if (rbuf != NULL)
+--- 640,646 ----
+ _(" line=%ld id=%d%s name=%s priority=%d"),
+ (long)sign->lnum, sign->id, group,
+ sign_typenr2name(sign->typenr), sign->priority);
+! msg_puts(lbuf);
+ msg_putchar('\n');
+ }
+ if (rbuf != NULL)
+***************
+*** 1640,1676 ****
+ smsg("sign %s", sp->sn_name);
+ if (sp->sn_icon != NULL)
+ {
+! MSG_PUTS(" icon=");
+ msg_outtrans(sp->sn_icon);
+ # ifdef FEAT_SIGN_ICONS
+ if (sp->sn_image == NULL)
+! MSG_PUTS(_(" (NOT FOUND)"));
+ # else
+! MSG_PUTS(_(" (not supported)"));
+ # endif
+ }
+ if (sp->sn_text != NULL)
+ {
+! MSG_PUTS(" text=");
+ msg_outtrans(sp->sn_text);
+ }
+ if (sp->sn_line_hl > 0)
+ {
+! MSG_PUTS(" linehl=");
+ p = get_highlight_name_ext(NULL, sp->sn_line_hl - 1, FALSE);
+ if (p == NULL)
+! MSG_PUTS("NONE");
+ else
+! msg_puts(p);
+ }
+ if (sp->sn_text_hl > 0)
+ {
+! MSG_PUTS(" texthl=");
+ p = get_highlight_name_ext(NULL, sp->sn_text_hl - 1, FALSE);
+ if (p == NULL)
+! MSG_PUTS("NONE");
+ else
+! msg_puts(p);
+ }
+ }
+
+--- 1640,1676 ----
+ smsg("sign %s", sp->sn_name);
+ if (sp->sn_icon != NULL)
+ {
+! msg_puts(" icon=");
+ msg_outtrans(sp->sn_icon);
+ # ifdef FEAT_SIGN_ICONS
+ if (sp->sn_image == NULL)
+! msg_puts(_(" (NOT FOUND)"));
+ # else
+! msg_puts(_(" (not supported)"));
+ # endif
+ }
+ if (sp->sn_text != NULL)
+ {
+! msg_puts(" text=");
+ msg_outtrans(sp->sn_text);
+ }
+ if (sp->sn_line_hl > 0)
+ {
+! msg_puts(" linehl=");
+ p = get_highlight_name_ext(NULL, sp->sn_line_hl - 1, FALSE);
+ if (p == NULL)
+! msg_puts("NONE");
+ else
+! msg_puts((char *)p);
+ }
+ if (sp->sn_text_hl > 0)
+ {
+! msg_puts(" texthl=");
+ p = get_highlight_name_ext(NULL, sp->sn_text_hl - 1, FALSE);
+ if (p == NULL)
+! msg_puts("NONE");
+ else
+! msg_puts((char *)p);
+ }
+ }
+
+*** ../vim-8.1.0778/src/regexp.c 2019-01-14 22:46:11.965663420 +0100
+--- src/regexp.c 2019-01-19 16:39:51.774379828 +0100
+***************
+*** 8199,8206 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! MSG_PUTS(_("Switching to backtracking RE engine for pattern: "));
+! MSG_PUTS(pat);
+ verbose_leave();
+ }
+ }
+--- 8199,8206 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! msg_puts(_("Switching to backtracking RE engine for pattern: "));
+! msg_puts((char *)pat);
+ verbose_leave();
+ }
+ }
+*** ../vim-8.1.0778/src/ui.c 2019-01-17 15:43:21.765878343 +0100
+--- src/ui.c 2019-01-19 17:22:51.013123699 +0100
+***************
+*** 340,346 ****
+ emsg(_(e_shellempty));
+ else
+ {
+! MSG_PUTS(_("new shell started\n"));
+ do_shell(NULL, 0);
+ }
+ }
+--- 340,346 ----
+ emsg(_(e_shellempty));
+ else
+ {
+! msg_puts(_("new shell started\n"));
+ do_shell(NULL, 0);
+ }
+ }
+***************
+*** 2626,2632 ****
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! verb_msg((char_u *)_("Used CUT_BUFFER0 instead of empty selection"));
+ verbose_leave();
+ }
+ }
+--- 2626,2632 ----
+ if (p_verbose > 0)
+ {
+ verbose_enter();
+! verb_msg(_("Used CUT_BUFFER0 instead of empty selection"));
+ verbose_leave();
+ }
+ }
+*** ../vim-8.1.0778/src/screen.c 2019-01-17 21:09:02.049706334 +0100
+--- src/screen.c 2019-01-19 16:57:05.395462330 +0100
+***************
+*** 10438,10444 ****
+ attr = HL_ATTR(HLF_CM); /* Highlight mode */
+ if (do_mode)
+ {
+! MSG_PUTS_ATTR("--", attr);
+ #if defined(FEAT_XIM)
+ if (
+ # ifdef FEAT_GUI_GTK
+--- 10438,10444 ----
+ attr = HL_ATTR(HLF_CM); /* Highlight mode */
+ if (do_mode)
+ {
+! msg_puts_attr("--", attr);
+ #if defined(FEAT_XIM)
+ if (
+ # ifdef FEAT_GUI_GTK
+***************
+*** 10448,10456 ****
+ # endif
+ )
+ # ifdef FEAT_GUI_GTK /* most of the time, it's not XIM being used */
+! MSG_PUTS_ATTR(" IM", attr);
+ # else
+! MSG_PUTS_ATTR(" XIM", attr);
+ # endif
+ #endif
+ #if defined(FEAT_HANGULIN) && defined(FEAT_GUI)
+--- 10448,10456 ----
+ # endif
+ )
+ # ifdef FEAT_GUI_GTK /* most of the time, it's not XIM being used */
+! msg_puts_attr(" IM", attr);
+ # else
+! msg_puts_attr(" XIM", attr);
+ # endif
+ #endif
+ #if defined(FEAT_HANGULIN) && defined(FEAT_GUI)
+***************
+*** 10460,10468 ****
+ {
+ /* HANGUL */
+ if (enc_utf8)
+! MSG_PUTS_ATTR(" \355\225\234\352\270\200", attr);
+ else
+! MSG_PUTS_ATTR(" \307\321\261\333", attr);
+ }
+ }
+ #endif
+--- 10460,10468 ----
+ {
+ /* HANGUL */
+ if (enc_utf8)
+! msg_puts_attr(" \355\225\234\352\270\200", attr);
+ else
+! msg_puts_attr(" \307\321\261\333", attr);
+ }
+ }
+ #endif
+***************
+*** 10482,10498 ****
+ if (length - vim_strsize(edit_submode) > 0)
+ {
+ if (edit_submode_pre != NULL)
+! msg_puts_attr(edit_submode_pre, attr);
+! msg_puts_attr(edit_submode, attr);
+ }
+ if (edit_submode_extra != NULL)
+ {
+! MSG_PUTS_ATTR(" ", attr); /* add a space in between */
+ if ((int)edit_submode_highl < (int)HLF_COUNT)
+ sub_attr = HL_ATTR(edit_submode_highl);
+ else
+ sub_attr = attr;
+! msg_puts_attr(edit_submode_extra, sub_attr);
+ }
+ }
+ }
+--- 10482,10498 ----
+ if (length - vim_strsize(edit_submode) > 0)
+ {
+ if (edit_submode_pre != NULL)
+! msg_puts_attr((char *)edit_submode_pre, attr);
+! msg_puts_attr((char *)edit_submode, attr);
+ }
+ if (edit_submode_extra != NULL)
+ {
+! msg_puts_attr(" ", attr); /* add a space in between */
+ if ((int)edit_submode_highl < (int)HLF_COUNT)
+ sub_attr = HL_ATTR(edit_submode_highl);
+ else
+ sub_attr = attr;
+! msg_puts_attr((char *)edit_submode_extra, sub_attr);
+ }
+ }
+ }
+***************
+*** 10500,10528 ****
+ #endif
+ {
+ if (State & VREPLACE_FLAG)
+! MSG_PUTS_ATTR(_(" VREPLACE"), attr);
+ else if (State & REPLACE_FLAG)
+! MSG_PUTS_ATTR(_(" REPLACE"), attr);
+ else if (State & INSERT)
+ {
+ #ifdef FEAT_RIGHTLEFT
+ if (p_ri)
+! MSG_PUTS_ATTR(_(" REVERSE"), attr);
+ #endif
+! MSG_PUTS_ATTR(_(" INSERT"), attr);
+ }
+ else if (restart_edit == 'I' || restart_edit == 'A')
+! MSG_PUTS_ATTR(_(" (insert)"), attr);
+ else if (restart_edit == 'R')
+! MSG_PUTS_ATTR(_(" (replace)"), attr);
+ else if (restart_edit == 'V')
+! MSG_PUTS_ATTR(_(" (vreplace)"), attr);
+ #ifdef FEAT_RIGHTLEFT
+ if (p_hkmap)
+! MSG_PUTS_ATTR(_(" Hebrew"), attr);
+ # ifdef FEAT_FKMAP
+ if (p_fkmap)
+! MSG_PUTS_ATTR(farsi_text_5, attr);
+ # endif
+ #endif
+ #ifdef FEAT_KEYMAP
+--- 10500,10528 ----
+ #endif
+ {
+ if (State & VREPLACE_FLAG)
+! msg_puts_attr(_(" VREPLACE"), attr);
+ else if (State & REPLACE_FLAG)
+! msg_puts_attr(_(" REPLACE"), attr);
+ else if (State & INSERT)
+ {
+ #ifdef FEAT_RIGHTLEFT
+ if (p_ri)
+! msg_puts_attr(_(" REVERSE"), attr);
+ #endif
+! msg_puts_attr(_(" INSERT"), attr);
+ }
+ else if (restart_edit == 'I' || restart_edit == 'A')
+! msg_puts_attr(_(" (insert)"), attr);
+ else if (restart_edit == 'R')
+! msg_puts_attr(_(" (replace)"), attr);
+ else if (restart_edit == 'V')
+! msg_puts_attr(_(" (vreplace)"), attr);
+ #ifdef FEAT_RIGHTLEFT
+ if (p_hkmap)
+! msg_puts_attr(_(" Hebrew"), attr);
+ # ifdef FEAT_FKMAP
+ if (p_fkmap)
+! msg_puts_attr(farsi_text_5, attr);
+ # endif
+ #endif
+ #ifdef FEAT_KEYMAP
+***************
+*** 10530,10545 ****
+ {
+ # ifdef FEAT_ARABIC
+ if (curwin->w_p_arab)
+! MSG_PUTS_ATTR(_(" Arabic"), attr);
+ else
+ # endif
+ if (get_keymap_str(curwin, (char_u *)" (%s)",
+ NameBuff, MAXPATHL))
+! MSG_PUTS_ATTR(NameBuff, attr);
+ }
+ #endif
+ if ((State & INSERT) && p_paste)
+! MSG_PUTS_ATTR(_(" (paste)"), attr);
+
+ if (VIsual_active)
+ {
+--- 10530,10545 ----
+ {
+ # ifdef FEAT_ARABIC
+ if (curwin->w_p_arab)
+! msg_puts_attr(_(" Arabic"), attr);
+ else
+ # endif
+ if (get_keymap_str(curwin, (char_u *)" (%s)",
+ NameBuff, MAXPATHL))
+! msg_puts_attr((char *)NameBuff, attr);
+ }
+ #endif
+ if ((State & INSERT) && p_paste)
+! msg_puts_attr(_(" (paste)"), attr);
+
+ if (VIsual_active)
+ {
+***************
+*** 10558,10566 ****
+ case 5: p = N_(" SELECT LINE"); break;
+ default: p = N_(" SELECT BLOCK"); break;
+ }
+! MSG_PUTS_ATTR(_(p), attr);
+ }
+! MSG_PUTS_ATTR(" --", attr);
+ }
+
+ need_clear = TRUE;
+--- 10558,10566 ----
+ case 5: p = N_(" SELECT LINE"); break;
+ default: p = N_(" SELECT BLOCK"); break;
+ }
+! msg_puts_attr(_(p), attr);
+ }
+! msg_puts_attr(" --", attr);
+ }
+
+ need_clear = TRUE;
+***************
+*** 10651,10662 ****
+ static void
+ recording_mode(int attr)
+ {
+! MSG_PUTS_ATTR(_("recording"), attr);
+ if (!shortmess(SHM_RECORDING))
+ {
+! char_u s[4];
+! sprintf((char *)s, " @%c", reg_recording);
+! MSG_PUTS_ATTR(s, attr);
+ }
+ }
+
+--- 10651,10663 ----
+ static void
+ recording_mode(int attr)
+ {
+! msg_puts_attr(_("recording"), attr);
+ if (!shortmess(SHM_RECORDING))
+ {
+! char s[4];
+!
+! sprintf(s, " @%c", reg_recording);
+! msg_puts_attr(s, attr);
+ }
+ }
+
+*** ../vim-8.1.0778/src/search.c 2019-01-13 23:38:33.407773189 +0100
+--- src/search.c 2019-01-19 17:29:54.298539992 +0100
+***************
+*** 5059,5065 ****
+ message */
+ {
+ msg_home_replace_hl(new_fname);
+! MSG_PUTS(_(" (includes previously listed match)"));
+ prev_fname = NULL;
+ }
+ }
+--- 5059,5065 ----
+ message */
+ {
+ msg_home_replace_hl(new_fname);
+! msg_puts(_(" (includes previously listed match)"));
+ prev_fname = NULL;
+ }
+ }
+***************
+*** 5078,5102 ****
+ else
+ {
+ gotocmdline(TRUE); /* cursor at status line */
+! MSG_PUTS_TITLE(_("--- Included files "));
+ if (action != ACTION_SHOW_ALL)
+! MSG_PUTS_TITLE(_("not found "));
+! MSG_PUTS_TITLE(_("in path ---\n"));
+ }
+ did_show = TRUE;
+ while (depth_displayed < depth && !got_int)
+ {
+ ++depth_displayed;
+ for (i = 0; i < depth_displayed; i++)
+! MSG_PUTS(" ");
+ msg_home_replace(files[depth_displayed].name);
+! MSG_PUTS(" -->\n");
+ }
+ if (!got_int) /* don't display if 'q' typed
+ for "--more--" message */
+ {
+ for (i = 0; i <= depth_displayed; i++)
+! MSG_PUTS(" ");
+ if (new_fname != NULL)
+ {
+ /* using "new_fname" is more reliable, e.g., when
+--- 5078,5102 ----
+ else
+ {
+ gotocmdline(TRUE); /* cursor at status line */
+! msg_puts_title(_("--- Included files "));
+ if (action != ACTION_SHOW_ALL)
+! msg_puts_title(_("not found "));
+! msg_puts_title(_("in path ---\n"));
+ }
+ did_show = TRUE;
+ while (depth_displayed < depth && !got_int)
+ {
+ ++depth_displayed;
+ for (i = 0; i < depth_displayed; i++)
+! msg_puts(" ");
+ msg_home_replace(files[depth_displayed].name);
+! msg_puts(" -->\n");
+ }
+ if (!got_int) /* don't display if 'q' typed
+ for "--more--" message */
+ {
+ for (i = 0; i <= depth_displayed; i++)
+! msg_puts(" ");
+ if (new_fname != NULL)
+ {
+ /* using "new_fname" is more reliable, e.g., when
+***************
+*** 5154,5162 ****
+ if (new_fname == NULL && action == ACTION_SHOW_ALL)
+ {
+ if (already_searched)
+! MSG_PUTS(_(" (Already listed)"));
+ else
+! MSG_PUTS(_(" NOT FOUND"));
+ }
+ }
+ out_flush(); /* output each line directly */
+--- 5154,5162 ----
+ if (new_fname == NULL && action == ACTION_SHOW_ALL)
+ {
+ if (already_searched)
+! msg_puts(_(" (Already listed)"));
+ else
+! msg_puts(_(" NOT FOUND"));
+ }
+ }
+ out_flush(); /* output each line directly */
+***************
+*** 5212,5218 ****
+ vim_snprintf((char*)IObuff, IOSIZE,
+ _("Scanning included file: %s"),
+ (char *)new_fname);
+! msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
+ }
+ else
+ #endif
+--- 5212,5218 ----
+ vim_snprintf((char*)IObuff, IOSIZE,
+ _("Scanning included file: %s"),
+ (char *)new_fname);
+! msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
+ }
+ else
+ #endif
+***************
+*** 5593,5601 ****
+ if (!did_show)
+ {
+ if (action != ACTION_SHOW_ALL)
+! MSG(_("All included files were found"));
+ else
+! MSG(_("No included files"));
+ }
+ }
+ else if (!found
+--- 5593,5601 ----
+ if (!did_show)
+ {
+ if (action != ACTION_SHOW_ALL)
+! msg(_("All included files were found"));
+ else
+! msg(_("No included files"));
+ }
+ }
+ else if (!found
+***************
+*** 5658,5668 ****
+ if (action == ACTION_SHOW_ALL)
+ {
+ sprintf((char *)IObuff, "%3ld: ", count); /* show match nr */
+! msg_puts(IObuff);
+ sprintf((char *)IObuff, "%4ld", *lnum); /* show line nr */
+ /* Highlight line numbers */
+! msg_puts_attr(IObuff, HL_ATTR(HLF_N));
+! MSG_PUTS(" ");
+ }
+ msg_prt_line(line, FALSE);
+ out_flush(); /* show one line at a time */
+--- 5658,5668 ----
+ if (action == ACTION_SHOW_ALL)
+ {
+ sprintf((char *)IObuff, "%3ld: ", count); /* show match nr */
+! msg_puts((char *)IObuff);
+ sprintf((char *)IObuff, "%4ld", *lnum); /* show line nr */
+ /* Highlight line numbers */
+! msg_puts_attr((char *)IObuff, HL_ATTR(HLF_N));
+! msg_puts(" ");
+ }
+ msg_prt_line(line, FALSE);
+ out_flush(); /* show one line at a time */
+*** ../vim-8.1.0778/src/spell.c 2019-01-13 23:38:33.411773162 +0100
+--- src/spell.c 2019-01-19 16:32:13.585509178 +0100
+***************
+*** 3375,3381 ****
+ TRUE, need_cap, TRUE);
+
+ if (sug.su_ga.ga_len == 0)
+! MSG(_("Sorry, no suggestions"));
+ else if (count > 0)
+ {
+ if (count > sug.su_ga.ga_len)
+--- 3375,3381 ----
+ TRUE, need_cap, TRUE);
+
+ if (sug.su_ga.ga_len == 0)
+! msg(_("Sorry, no suggestions"));
+ else if (count > 0)
+ {
+ if (count > sug.su_ga.ga_len)
+***************
+*** 3409,3415 ****
+ sug.su_badlen, sug.su_badptr);
+ }
+ #endif
+! msg_puts(IObuff);
+ msg_clr_eos();
+ msg_putchar('\n');
+
+--- 3409,3415 ----
+ sug.su_badlen, sug.su_badptr);
+ }
+ #endif
+! msg_puts((char *)IObuff);
+ msg_clr_eos();
+ msg_putchar('\n');
+
+***************
+*** 3430,3446 ****
+ if (cmdmsg_rl)
+ rl_mirror(IObuff);
+ #endif
+! msg_puts(IObuff);
+
+ vim_snprintf((char *)IObuff, IOSIZE, " \"%s\"", wcopy);
+! msg_puts(IObuff);
+
+ /* The word may replace more than "su_badlen". */
+ if (sug.su_badlen < stp->st_orglen)
+ {
+ vim_snprintf((char *)IObuff, IOSIZE, _(" < \"%.*s\""),
+ stp->st_orglen, sug.su_badptr);
+! msg_puts(IObuff);
+ }
+
+ if (p_verbose > 0)
+--- 3430,3446 ----
+ if (cmdmsg_rl)
+ rl_mirror(IObuff);
+ #endif
+! msg_puts((char *)IObuff);
+
+ vim_snprintf((char *)IObuff, IOSIZE, " \"%s\"", wcopy);
+! msg_puts((char *)IObuff);
+
+ /* The word may replace more than "su_badlen". */
+ if (sug.su_badlen < stp->st_orglen)
+ {
+ vim_snprintf((char *)IObuff, IOSIZE, _(" < \"%.*s\""),
+ stp->st_orglen, sug.su_badptr);
+! msg_puts((char *)IObuff);
+ }
+
+ if (p_verbose > 0)
+***************
+*** 3459,3465 ****
+ rl_mirror(IObuff + 1);
+ #endif
+ msg_advance(30);
+! msg_puts(IObuff);
+ }
+ msg_putchar('\n');
+ }
+--- 3459,3465 ----
+ rl_mirror(IObuff + 1);
+ #endif
+ msg_advance(30);
+! msg_puts((char *)IObuff);
+ }
+ msg_putchar('\n');
+ }
+***************
+*** 8458,8470 ****
+ for (lpi = 0; lpi < curwin->w_s->b_langp.ga_len && !got_int; ++lpi)
+ {
+ lp = LANGP_ENTRY(curwin->w_s->b_langp, lpi);
+! msg_puts((char_u *)"file: ");
+! msg_puts(lp->lp_slang->sl_fname);
+ msg_putchar('\n');
+ p = lp->lp_slang->sl_info;
+ if (p != NULL)
+ {
+! msg_puts(p);
+ msg_putchar('\n');
+ }
+ }
+--- 8458,8470 ----
+ for (lpi = 0; lpi < curwin->w_s->b_langp.ga_len && !got_int; ++lpi)
+ {
+ lp = LANGP_ENTRY(curwin->w_s->b_langp, lpi);
+! msg_puts("file: ");
+! msg_puts((char *)lp->lp_slang->sl_fname);
+ msg_putchar('\n');
+ p = lp->lp_slang->sl_info;
+ if (p != NULL)
+ {
+! msg_puts((char *)p);
+ msg_putchar('\n');
+ }
+ }
+*** ../vim-8.1.0778/src/spellfile.c 2019-01-15 20:19:36.747904404 +0100
+--- src/spellfile.c 2019-01-19 17:07:59.295055062 +0100
+***************
+*** 2114,2122 ****
+ PRINTSOME(line1, depth, "(%d)", node->wn_nr, 0);
+ PRINTSOME(line2, depth, " ", 0, 0);
+ PRINTSOME(line3, depth, " ", 0, 0);
+! msg((char_u *)line1);
+! msg((char_u *)line2);
+! msg((char_u *)line3);
+ }
+ else
+ {
+--- 2114,2122 ----
+ PRINTSOME(line1, depth, "(%d)", node->wn_nr, 0);
+ PRINTSOME(line2, depth, " ", 0, 0);
+ PRINTSOME(line3, depth, " ", 0, 0);
+! msg(line1);
+! msg(line2);
+! msg(line3);
+ }
+ else
+ {
+***************
+*** 2142,2150 ****
+
+ if (node->wn_byte == NUL)
+ {
+! msg((char_u *)line1);
+! msg((char_u *)line2);
+! msg((char_u *)line3);
+ }
+
+ /* do the children */
+--- 2142,2150 ----
+
+ if (node->wn_byte == NUL)
+ {
+! msg(line1);
+! msg(line2);
+! msg(line3);
+ }
+
+ /* do the children */
+***************
+*** 3085,3095 ****
+ if (spin->si_newcompID < spin->si_newprefID)
+ {
+ if (spin->si_newcompID == 127 || spin->si_newcompID == 255)
+! MSG(_("Too many postponed prefixes"));
+ else if (spin->si_newprefID == 0 || spin->si_newprefID == 127)
+! MSG(_("Too many compound flags"));
+ else
+! MSG(_("Too many postponed prefixes and/or compound flags"));
+ }
+
+ if (syllable != NULL)
+--- 3085,3095 ----
+ if (spin->si_newcompID < spin->si_newprefID)
+ {
+ if (spin->si_newcompID == 127 || spin->si_newcompID == 255)
+! msg(_("Too many postponed prefixes"));
+ else if (spin->si_newprefID == 0 || spin->si_newprefID == 127)
+! msg(_("Too many compound flags"));
+ else
+! msg(_("Too many postponed prefixes and/or compound flags"));
+ }
+
+ if (syllable != NULL)
+***************
+*** 3640,3646 ****
+ _("line %6d, word %6ld - %s"),
+ lnum, spin->si_foldwcount + spin->si_keepwcount, w);
+ msg_start();
+! msg_puts_long_attr(message, 0);
+ msg_clr_eos();
+ msg_didout = FALSE;
+ msg_col = 0;
+--- 3640,3646 ----
+ _("line %6d, word %6ld - %s"),
+ lnum, spin->si_foldwcount + spin->si_keepwcount, w);
+ msg_start();
+! msg_outtrans_long_attr(message, 0);
+ msg_clr_eos();
+ msg_didout = FALSE;
+ msg_col = 0;
+***************
+*** 4618,4624 ****
+ if (spin->si_verbose)
+ {
+ msg_start();
+! msg_puts((char_u *)_(msg_compressing));
+ msg_clr_eos();
+ msg_didout = FALSE;
+ msg_col = 0;
+--- 4618,4624 ----
+ if (spin->si_verbose)
+ {
+ msg_start();
+! msg_puts(_(msg_compressing));
+ msg_clr_eos();
+ msg_didout = FALSE;
+ msg_col = 0;
+***************
+*** 6119,6125 ****
+ }
+
+ if (spin.si_compflags != NULL && spin.si_nobreak)
+! MSG(_("Warning: both compounding and NOBREAK specified"));
+
+ if (!error && !got_int)
+ {
+--- 6119,6125 ----
+ }
+
+ if (spin.si_compflags != NULL && spin.si_nobreak)
+! msg(_("Warning: both compounding and NOBREAK specified"));
+
+ if (!error && !got_int)
+ {
+***************
+*** 6197,6203 ****
+ {
+ if (!spin->si_verbose)
+ verbose_enter();
+! MSG(str);
+ out_flush();
+ if (!spin->si_verbose)
+ verbose_leave();
+--- 6197,6203 ----
+ {
+ if (!spin->si_verbose)
+ verbose_enter();
+! msg((char *)str);
+ out_flush();
+ if (!spin->si_verbose)
+ verbose_leave();
+*** ../vim-8.1.0778/src/syntax.c 2019-01-13 23:38:33.411773162 +0100
+--- src/syntax.c 2019-01-19 17:04:55.576297722 +0100
+***************
+*** 3313,3319 ****
+ if (timed_out && !syn_win->w_s->b_syn_slow)
+ {
+ syn_win->w_s->b_syn_slow = TRUE;
+! MSG(_("'redrawtime' exceeded, syntax highlighting disabled"));
+ }
+ #endif
+
+--- 3313,3319 ----
+ if (timed_out && !syn_win->w_s->b_syn_slow)
+ {
+ syn_win->w_s->b_syn_slow = TRUE;
+! msg(_("'redrawtime' exceeded, syntax highlighting disabled"));
+ }
+ #endif
+
+***************
+*** 3435,3443 ****
+ if (*arg == NUL)
+ {
+ if (curwin->w_s->b_syn_conceal)
+! MSG(_("syntax conceal on"));
+ else
+! MSG(_("syntax conceal off"));
+ }
+ else if (STRNICMP(arg, "on", 2) == 0 && next - arg == 2)
+ curwin->w_s->b_syn_conceal = TRUE;
+--- 3435,3443 ----
+ if (*arg == NUL)
+ {
+ if (curwin->w_s->b_syn_conceal)
+! msg(_("syntax conceal on"));
+ else
+! msg(_("syntax conceal off"));
+ }
+ else if (STRNICMP(arg, "on", 2) == 0 && next - arg == 2)
+ curwin->w_s->b_syn_conceal = TRUE;
+***************
+*** 3465,3473 ****
+ if (*arg == NUL)
+ {
+ if (curwin->w_s->b_syn_ic)
+! MSG(_("syntax case ignore"));
+ else
+! MSG(_("syntax case match"));
+ }
+ else if (STRNICMP(arg, "match", 5) == 0 && next - arg == 5)
+ curwin->w_s->b_syn_ic = FALSE;
+--- 3465,3473 ----
+ if (*arg == NUL)
+ {
+ if (curwin->w_s->b_syn_ic)
+! msg(_("syntax case ignore"));
+ else
+! msg(_("syntax case match"));
+ }
+ else if (STRNICMP(arg, "match", 5) == 0 && next - arg == 5)
+ curwin->w_s->b_syn_ic = FALSE;
+***************
+*** 3494,3504 ****
+ if (*arg == NUL)
+ {
+ if (curwin->w_s->b_syn_spell == SYNSPL_TOP)
+! MSG(_("syntax spell toplevel"));
+ else if (curwin->w_s->b_syn_spell == SYNSPL_NOTOP)
+! MSG(_("syntax spell notoplevel"));
+ else
+! MSG(_("syntax spell default"));
+ }
+ else if (STRNICMP(arg, "toplevel", 8) == 0 && next - arg == 8)
+ curwin->w_s->b_syn_spell = SYNSPL_TOP;
+--- 3494,3504 ----
+ if (*arg == NUL)
+ {
+ if (curwin->w_s->b_syn_spell == SYNSPL_TOP)
+! msg(_("syntax spell toplevel"));
+ else if (curwin->w_s->b_syn_spell == SYNSPL_NOTOP)
+! msg(_("syntax spell notoplevel"));
+ else
+! msg(_("syntax spell default"));
+ }
+ else if (STRNICMP(arg, "toplevel", 8) == 0 && next - arg == 8)
+ curwin->w_s->b_syn_spell = SYNSPL_TOP;
+***************
+*** 3532,3541 ****
+ arg = skipwhite(arg);
+ if (*arg == NUL)
+ {
+! MSG_PUTS("\n");
+ if (curwin->w_s->b_syn_isk != empty_option)
+ {
+! MSG_PUTS(_("syntax iskeyword "));
+ msg_outtrans(curwin->w_s->b_syn_isk);
+ }
+ else
+--- 3532,3541 ----
+ arg = skipwhite(arg);
+ if (*arg == NUL)
+ {
+! msg_puts("\n");
+ if (curwin->w_s->b_syn_isk != empty_option)
+ {
+! msg_puts(_("syntax iskeyword "));
+ msg_outtrans(curwin->w_s->b_syn_isk);
+ }
+ else
+***************
+*** 3909,3915 ****
+
+ if (!syntax_present(curwin))
+ {
+! MSG(_(msg_no_items));
+ return;
+ }
+
+--- 3909,3915 ----
+
+ if (!syntax_present(curwin))
+ {
+! msg(_(msg_no_items));
+ return;
+ }
+
+***************
+*** 3917,3923 ****
+ {
+ if (curwin->w_s->b_syn_sync_flags & SF_CCOMMENT)
+ {
+! MSG_PUTS(_("syncing on C-style comments"));
+ syn_lines_msg();
+ syn_match_msg();
+ return;
+--- 3917,3923 ----
+ {
+ if (curwin->w_s->b_syn_sync_flags & SF_CCOMMENT)
+ {
+! msg_puts(_("syncing on C-style comments"));
+ syn_lines_msg();
+ syn_match_msg();
+ return;
+***************
+*** 3925,3952 ****
+ else if (!(curwin->w_s->b_syn_sync_flags & SF_MATCH))
+ {
+ if (curwin->w_s->b_syn_sync_minlines == 0)
+! MSG_PUTS(_("no syncing"));
+ else
+ {
+! MSG_PUTS(_("syncing starts "));
+ msg_outnum(curwin->w_s->b_syn_sync_minlines);
+! MSG_PUTS(_(" lines before top line"));
+ syn_match_msg();
+ }
+ return;
+ }
+! MSG_PUTS_TITLE(_("\n--- Syntax sync items ---"));
+ if (curwin->w_s->b_syn_sync_minlines > 0
+ || curwin->w_s->b_syn_sync_maxlines > 0
+ || curwin->w_s->b_syn_sync_linebreaks > 0)
+ {
+! MSG_PUTS(_("\nsyncing on items"));
+ syn_lines_msg();
+ syn_match_msg();
+ }
+ }
+ else
+! MSG_PUTS_TITLE(_("\n--- Syntax items ---"));
+ if (ends_excmd(*arg))
+ {
+ /*
+--- 3925,3952 ----
+ else if (!(curwin->w_s->b_syn_sync_flags & SF_MATCH))
+ {
+ if (curwin->w_s->b_syn_sync_minlines == 0)
+! msg_puts(_("no syncing"));
+ else
+ {
+! msg_puts(_("syncing starts "));
+ msg_outnum(curwin->w_s->b_syn_sync_minlines);
+! msg_puts(_(" lines before top line"));
+ syn_match_msg();
+ }
+ return;
+ }
+! msg_puts_title(_("\n--- Syntax sync items ---"));
+ if (curwin->w_s->b_syn_sync_minlines > 0
+ || curwin->w_s->b_syn_sync_maxlines > 0
+ || curwin->w_s->b_syn_sync_linebreaks > 0)
+ {
+! msg_puts(_("\nsyncing on items"));
+ syn_lines_msg();
+ syn_match_msg();
+ }
+ }
+ else
+! msg_puts_title(_("\n--- Syntax items ---"));
+ if (ends_excmd(*arg))
+ {
+ /*
+***************
+*** 3993,4012 ****
+ if (curwin->w_s->b_syn_sync_maxlines > 0
+ || curwin->w_s->b_syn_sync_minlines > 0)
+ {
+! MSG_PUTS("; ");
+ if (curwin->w_s->b_syn_sync_minlines > 0)
+ {
+! MSG_PUTS(_("minimal "));
+ msg_outnum(curwin->w_s->b_syn_sync_minlines);
+ if (curwin->w_s->b_syn_sync_maxlines)
+! MSG_PUTS(", ");
+ }
+ if (curwin->w_s->b_syn_sync_maxlines > 0)
+ {
+! MSG_PUTS(_("maximal "));
+ msg_outnum(curwin->w_s->b_syn_sync_maxlines);
+ }
+! MSG_PUTS(_(" lines before top line"));
+ }
+ }
+
+--- 3993,4012 ----
+ if (curwin->w_s->b_syn_sync_maxlines > 0
+ || curwin->w_s->b_syn_sync_minlines > 0)
+ {
+! msg_puts("; ");
+ if (curwin->w_s->b_syn_sync_minlines > 0)
+ {
+! msg_puts(_("minimal "));
+ msg_outnum(curwin->w_s->b_syn_sync_minlines);
+ if (curwin->w_s->b_syn_sync_maxlines)
+! msg_puts(", ");
+ }
+ if (curwin->w_s->b_syn_sync_maxlines > 0)
+ {
+! msg_puts(_("maximal "));
+ msg_outnum(curwin->w_s->b_syn_sync_maxlines);
+ }
+! msg_puts(_(" lines before top line"));
+ }
+ }
+
+***************
+*** 4015,4023 ****
+ {
+ if (curwin->w_s->b_syn_sync_linebreaks > 0)
+ {
+! MSG_PUTS(_("; match "));
+ msg_outnum(curwin->w_s->b_syn_sync_linebreaks);
+! MSG_PUTS(_(" line breaks"));
+ }
+ }
+
+--- 4015,4023 ----
+ {
+ if (curwin->w_s->b_syn_sync_linebreaks > 0)
+ {
+! msg_puts(_("; match "));
+ msg_outnum(curwin->w_s->b_syn_sync_linebreaks);
+! msg_puts(_(" line breaks"));
+ }
+ }
+
+***************
+*** 4122,4136 ****
+ if (spp->sp_flags & (HL_SYNC_HERE|HL_SYNC_THERE))
+ {
+ if (spp->sp_flags & HL_SYNC_HERE)
+! msg_puts_attr((char_u *)"grouphere", attr);
+ else
+! msg_puts_attr((char_u *)"groupthere", attr);
+ msg_putchar(' ');
+ if (spp->sp_sync_idx >= 0)
+ msg_outtrans(HL_TABLE()[SYN_ITEMS(curwin->w_s)
+ [spp->sp_sync_idx].sp_syn.id - 1].sg_name);
+ else
+! MSG_PUTS("NONE");
+ msg_putchar(' ');
+ }
+ }
+--- 4122,4136 ----
+ if (spp->sp_flags & (HL_SYNC_HERE|HL_SYNC_THERE))
+ {
+ if (spp->sp_flags & HL_SYNC_HERE)
+! msg_puts_attr("grouphere", attr);
+ else
+! msg_puts_attr("groupthere", attr);
+ msg_putchar(' ');
+ if (spp->sp_sync_idx >= 0)
+ msg_outtrans(HL_TABLE()[SYN_ITEMS(curwin->w_s)
+ [spp->sp_sync_idx].sp_syn.id - 1].sg_name);
+ else
+! msg_puts("NONE");
+ msg_putchar(' ');
+ }
+ }
+***************
+*** 4139,4145 ****
+ if (HL_TABLE()[id - 1].sg_link && (did_header || link_only) && !got_int)
+ {
+ (void)syn_list_header(did_header, 999, id);
+! msg_puts_attr((char_u *)"links to", attr);
+ msg_putchar(' ');
+ msg_outtrans(HL_TABLE()[HL_TABLE()[id - 1].sg_link - 1].sg_name);
+ }
+--- 4139,4145 ----
+ if (HL_TABLE()[id - 1].sg_link && (did_header || link_only) && !got_int)
+ {
+ (void)syn_list_header(did_header, 999, id);
+! msg_puts_attr("links to", attr);
+ msg_putchar(' ');
+ msg_outtrans(HL_TABLE()[HL_TABLE()[id - 1].sg_link - 1].sg_name);
+ }
+***************
+*** 4153,4159 ****
+ for (i = 0; nlist[i].flag != 0; ++i)
+ if (flags & nlist[i].flag)
+ {
+! msg_puts_attr((char_u *)nlist[i].name, attr);
+ msg_putchar(' ');
+ }
+ }
+--- 4153,4159 ----
+ for (i = 0; nlist[i].flag != 0; ++i)
+ if (flags & nlist[i].flag)
+ {
+! msg_puts_attr(nlist[i].name, attr);
+ msg_putchar(' ');
+ }
+ }
+***************
+*** 4183,4190 ****
+ }
+ else
+ {
+! msg_puts_attr((char_u *)"cluster", HL_ATTR(HLF_D));
+! msg_puts((char_u *)"=NONE");
+ }
+ }
+
+--- 4183,4190 ----
+ }
+ else
+ {
+! msg_puts_attr("cluster", HL_ATTR(HLF_D));
+! msg_puts("=NONE");
+ }
+ }
+
+***************
+*** 4193,4216 ****
+ {
+ short *p;
+
+! msg_puts_attr(name, attr);
+ msg_putchar('=');
+ for (p = list; *p; ++p)
+ {
+ if (*p >= SYNID_ALLBUT && *p < SYNID_TOP)
+ {
+ if (p[1])
+! MSG_PUTS("ALLBUT");
+ else
+! MSG_PUTS("ALL");
+ }
+ else if (*p >= SYNID_TOP && *p < SYNID_CONTAINED)
+ {
+! MSG_PUTS("TOP");
+ }
+ else if (*p >= SYNID_CONTAINED && *p < SYNID_CLUSTER)
+ {
+! MSG_PUTS("CONTAINED");
+ }
+ else if (*p >= SYNID_CLUSTER)
+ {
+--- 4193,4216 ----
+ {
+ short *p;
+
+! msg_puts_attr((char *)name, attr);
+ msg_putchar('=');
+ for (p = list; *p; ++p)
+ {
+ if (*p >= SYNID_ALLBUT && *p < SYNID_TOP)
+ {
+ if (p[1])
+! msg_puts("ALLBUT");
+ else
+! msg_puts("ALL");
+ }
+ else if (*p >= SYNID_TOP && *p < SYNID_CONTAINED)
+ {
+! msg_puts("TOP");
+ }
+ else if (*p >= SYNID_CONTAINED && *p < SYNID_CLUSTER)
+ {
+! msg_puts("CONTAINED");
+ }
+ else if (*p >= SYNID_CLUSTER)
+ {
+***************
+*** 4244,4250 ****
+ if (last_matchgroup != spp->sp_syn_match_id)
+ {
+ last_matchgroup = spp->sp_syn_match_id;
+! msg_puts_attr((char_u *)"matchgroup", attr);
+ msg_putchar('=');
+ if (last_matchgroup == 0)
+ msg_outtrans((char_u *)"NONE");
+--- 4244,4250 ----
+ if (last_matchgroup != spp->sp_syn_match_id)
+ {
+ last_matchgroup = spp->sp_syn_match_id;
+! msg_puts_attr("matchgroup", attr);
+ msg_putchar('=');
+ if (last_matchgroup == 0)
+ msg_outtrans((char_u *)"NONE");
+***************
+*** 4254,4260 ****
+ }
+
+ /* output the name of the pattern and an '=' or ' ' */
+! msg_puts_attr((char_u *)s, attr);
+ msg_putchar(c);
+
+ /* output the pattern, in between a char that is not in the pattern */
+--- 4254,4260 ----
+ }
+
+ /* output the name of the pattern and an '=' or ' ' */
+! msg_puts_attr(s, attr);
+ msg_putchar(c);
+
+ /* output the pattern, in between a char that is not in the pattern */
+***************
+*** 4277,4283 ****
+ {
+ if (!first)
+ msg_putchar(','); /* separate with commas */
+! msg_puts((char_u *)spo_name_tab[i]);
+ n = spp->sp_offsets[i];
+ if (i != SPO_LC_OFF)
+ {
+--- 4277,4283 ----
+ {
+ if (!first)
+ msg_putchar(','); /* separate with commas */
+! msg_puts(spo_name_tab[i]);
+ n = spp->sp_offsets[i];
+ if (i != SPO_LC_OFF)
+ {
+***************
+*** 4354,4360 ****
+ did_header = TRUE;
+ if (prev_contained != (kp->flags & HL_CONTAINED))
+ {
+! msg_puts_attr((char_u *)"contained", attr);
+ msg_putchar(' ');
+ prev_contained = (kp->flags & HL_CONTAINED);
+ }
+--- 4354,4360 ----
+ did_header = TRUE;
+ if (prev_contained != (kp->flags & HL_CONTAINED))
+ {
+! msg_puts_attr("contained", attr);
+ msg_putchar(' ');
+ prev_contained = (kp->flags & HL_CONTAINED);
+ }
+***************
+*** 4372,4390 ****
+ prev_next_list = kp->next_list;
+ if (kp->flags & HL_SKIPNL)
+ {
+! msg_puts_attr((char_u *)"skipnl", attr);
+ msg_putchar(' ');
+ prev_skipnl = (kp->flags & HL_SKIPNL);
+ }
+ if (kp->flags & HL_SKIPWHITE)
+ {
+! msg_puts_attr((char_u *)"skipwhite", attr);
+ msg_putchar(' ');
+ prev_skipwhite = (kp->flags & HL_SKIPWHITE);
+ }
+ if (kp->flags & HL_SKIPEMPTY)
+ {
+! msg_puts_attr((char_u *)"skipempty", attr);
+ msg_putchar(' ');
+ prev_skipempty = (kp->flags & HL_SKIPEMPTY);
+ }
+--- 4372,4390 ----
+ prev_next_list = kp->next_list;
+ if (kp->flags & HL_SKIPNL)
+ {
+! msg_puts_attr("skipnl", attr);
+ msg_putchar(' ');
+ prev_skipnl = (kp->flags & HL_SKIPNL);
+ }
+ if (kp->flags & HL_SKIPWHITE)
+ {
+! msg_puts_attr("skipwhite", attr);
+ msg_putchar(' ');
+ prev_skipwhite = (kp->flags & HL_SKIPWHITE);
+ }
+ if (kp->flags & HL_SKIPEMPTY)
+ {
+! msg_puts_attr("skipempty", attr);
+ msg_putchar(' ');
+ prev_skipempty = (kp->flags & HL_SKIPEMPTY);
+ }
+***************
+*** 6671,6677 ****
+
+ if (!syntax_present(curwin))
+ {
+! MSG(_(msg_no_items));
+ return;
+ }
+ for (idx = 0; idx < curwin->w_s->b_syn_patterns.ga_len; ++idx)
+--- 6671,6677 ----
+
+ if (!syntax_present(curwin))
+ {
+! msg(_(msg_no_items));
+ return;
+ }
+ for (idx = 0; idx < curwin->w_s->b_syn_patterns.ga_len; ++idx)
+***************
+*** 6742,6748 ****
+
+ if (!syntax_present(curwin))
+ {
+! MSG(_(msg_no_items));
+ return;
+ }
+
+--- 6742,6748 ----
+
+ if (!syntax_present(curwin))
+ {
+! msg(_(msg_no_items));
+ return;
+ }
+
+***************
+*** 6777,6807 ****
+ qsort(ga.ga_data, (size_t)ga.ga_len, sizeof(time_entry_T),
+ syn_compare_syntime);
+
+! MSG_PUTS_TITLE(_(" TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN"));
+! MSG_PUTS("\n");
+ for (idx = 0; idx < ga.ga_len && !got_int; ++idx)
+ {
+ p = ((time_entry_T *)ga.ga_data) + idx;
+
+! MSG_PUTS(profile_msg(&p->total));
+! MSG_PUTS(" "); /* make sure there is always a separating space */
+ msg_advance(13);
+ msg_outnum(p->count);
+! MSG_PUTS(" ");
+ msg_advance(20);
+ msg_outnum(p->match);
+! MSG_PUTS(" ");
+ msg_advance(26);
+! MSG_PUTS(profile_msg(&p->slowest));
+! MSG_PUTS(" ");
+ msg_advance(38);
+ # ifdef FEAT_FLOAT
+! MSG_PUTS(profile_msg(&p->average));
+! MSG_PUTS(" ");
+ # endif
+ msg_advance(50);
+ msg_outtrans(HL_TABLE()[p->id - 1].sg_name);
+! MSG_PUTS(" ");
+
+ msg_advance(69);
+ if (Columns < 80)
+--- 6777,6807 ----
+ qsort(ga.ga_data, (size_t)ga.ga_len, sizeof(time_entry_T),
+ syn_compare_syntime);
+
+! msg_puts_title(_(" TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN"));
+! msg_puts("\n");
+ for (idx = 0; idx < ga.ga_len && !got_int; ++idx)
+ {
+ p = ((time_entry_T *)ga.ga_data) + idx;
+
+! msg_puts(profile_msg(&p->total));
+! msg_puts(" "); /* make sure there is always a separating space */
+ msg_advance(13);
+ msg_outnum(p->count);
+! msg_puts(" ");
+ msg_advance(20);
+ msg_outnum(p->match);
+! msg_puts(" ");
+ msg_advance(26);
+! msg_puts(profile_msg(&p->slowest));
+! msg_puts(" ");
+ msg_advance(38);
+ # ifdef FEAT_FLOAT
+! msg_puts(profile_msg(&p->average));
+! msg_puts(" ");
+ # endif
+ msg_advance(50);
+ msg_outtrans(HL_TABLE()[p->id - 1].sg_name);
+! msg_puts(" ");
+
+ msg_advance(69);
+ if (Columns < 80)
+***************
+*** 6811,6826 ****
+ if (len > (int)STRLEN(p->pattern))
+ len = (int)STRLEN(p->pattern);
+ msg_outtrans_len(p->pattern, len);
+! MSG_PUTS("\n");
+ }
+ ga_clear(&ga);
+ if (!got_int)
+ {
+! MSG_PUTS("\n");
+! MSG_PUTS(profile_msg(&total_total));
+ msg_advance(13);
+ msg_outnum(total_count);
+! MSG_PUTS("\n");
+ }
+ }
+ #endif
+--- 6811,6826 ----
+ if (len > (int)STRLEN(p->pattern))
+ len = (int)STRLEN(p->pattern);
+ msg_outtrans_len(p->pattern, len);
+! msg_puts("\n");
+ }
+ ga_clear(&ga);
+ if (!got_int)
+ {
+! msg_puts("\n");
+! msg_puts(profile_msg(&total_total));
+ msg_advance(13);
+ msg_outnum(total_count);
+! msg_puts("\n");
+ }
+ }
+ #endif
+***************
+*** 9227,9233 ****
+ {
+ (void)syn_list_header(didh, 9999, id);
+ didh = TRUE;
+! msg_puts_attr((char_u *)"links to", HL_ATTR(HLF_D));
+ msg_putchar(' ');
+ msg_outtrans(HL_TABLE()[HL_TABLE()[id - 1].sg_link - 1].sg_name);
+ }
+--- 9227,9233 ----
+ {
+ (void)syn_list_header(didh, 9999, id);
+ didh = TRUE;
+! msg_puts_attr("links to", HL_ATTR(HLF_D));
+ msg_putchar(' ');
+ msg_outtrans(HL_TABLE()[HL_TABLE()[id - 1].sg_link - 1].sg_name);
+ }
+***************
+*** 9284,9291 ****
+ {
+ if (*name != NUL)
+ {
+! MSG_PUTS_ATTR(name, HL_ATTR(HLF_D));
+! MSG_PUTS_ATTR("=", HL_ATTR(HLF_D));
+ }
+ msg_outtrans(ts);
+ }
+--- 9284,9291 ----
+ {
+ if (*name != NUL)
+ {
+! msg_puts_attr(name, HL_ATTR(HLF_D));
+! msg_puts_attr("=", HL_ATTR(HLF_D));
+ }
+ msg_outtrans(ts);
+ }
+***************
+*** 9484,9490 ****
+ /* Show "xxx" with the attributes. */
+ if (!did_header)
+ {
+! msg_puts_attr((char_u *)"xxx", syn_id2attr(id));
+ msg_putchar(' ');
+ }
+
+--- 9484,9490 ----
+ /* Show "xxx" with the attributes. */
+ if (!did_header)
+ {
+! msg_puts_attr("xxx", syn_id2attr(id));
+ msg_putchar(' ');
+ }
+
+***************
+*** 9725,9731 ****
+ /* This is an error, but since there previously was no check only
+ * give a warning. */
+ msg_source(HL_ATTR(HLF_W));
+! MSG(_("W18: Invalid character in group name"));
+ break;
+ }
+ }
+--- 9725,9731 ----
+ /* This is an error, but since there previously was no check only
+ * give a warning. */
+ msg_source(HL_ATTR(HLF_W));
+! msg(_("W18: Invalid character in group name"));
+ break;
+ }
+ }
+***************
+*** 10264,10270 ****
+ static void
+ highlight_list_two(int cnt, int attr)
+ {
+! msg_puts_attr((char_u *)&("N \bI \b! \b"[cnt / 11]), attr);
+ msg_clr_eos();
+ out_flush();
+ ui_delay(cnt == 99 ? 40L : (long)cnt * 50L, FALSE);
+--- 10264,10270 ----
+ static void
+ highlight_list_two(int cnt, int attr)
+ {
+! msg_puts_attr(&("N \bI \b! \b"[cnt / 11]), attr);
+ msg_clr_eos();
+ out_flush();
+ ui_delay(cnt == 99 ? 40L : (long)cnt * 50L, FALSE);
+*** ../vim-8.1.0778/src/tag.c 2019-01-13 23:38:33.411773162 +0100
+--- src/tag.c 2019-01-19 17:20:35.533924938 +0100
+***************
+*** 605,614 ****
+ if (msg_col == 0)
+ msg_didout = FALSE; /* overwrite previous message */
+ msg_start();
+! MSG_PUTS_ATTR(_(" # pri kind tag"), HL_ATTR(HLF_T));
+ msg_clr_eos();
+ taglen_advance(taglen);
+! MSG_PUTS_ATTR(_("file\n"), HL_ATTR(HLF_T));
+
+ for (i = 0; i < num_matches && !got_int; ++i)
+ {
+--- 605,614 ----
+ if (msg_col == 0)
+ msg_didout = FALSE; /* overwrite previous message */
+ msg_start();
+! msg_puts_attr(_(" # pri kind tag"), HL_ATTR(HLF_T));
+ msg_clr_eos();
+ taglen_advance(taglen);
+! msg_puts_attr(_("file\n"), HL_ATTR(HLF_T));
+
+ for (i = 0; i < num_matches && !got_int; ++i)
+ {
+***************
+*** 626,632 ****
+ vim_snprintf((char *)IObuff + 1, IOSIZE - 1,
+ "%2d %s ", i + 1,
+ mt_names[matches[i][0] & MT_MASK]);
+! msg_puts(IObuff);
+ if (tagp.tagkind != NULL)
+ msg_outtrans_len(tagp.tagkind,
+ (int)(tagp.tagkind_end - tagp.tagkind));
+--- 626,632 ----
+ vim_snprintf((char *)IObuff + 1, IOSIZE - 1,
+ "%2d %s ", i + 1,
+ mt_names[matches[i][0] & MT_MASK]);
+! msg_puts((char *)IObuff);
+ if (tagp.tagkind != NULL)
+ msg_outtrans_len(tagp.tagkind,
+ (int)(tagp.tagkind_end - tagp.tagkind));
+***************
+*** 642,648 ****
+ p = tag_full_fname(&tagp);
+ if (p != NULL)
+ {
+! msg_puts_long_attr(p, HL_ATTR(HLF_D));
+ vim_free(p);
+ }
+ if (msg_col > 0)
+--- 642,648 ----
+ p = tag_full_fname(&tagp);
+ if (p != NULL)
+ {
+! msg_outtrans_long_attr(p, HL_ATTR(HLF_D));
+ vim_free(p);
+ }
+ if (msg_col > 0)
+***************
+*** 690,696 ****
+ p = msg_outtrans_one(p, attr);
+ if (*p == TAB)
+ {
+! msg_puts_attr((char_u *)" ", attr);
+ break;
+ }
+ if (*p == ':')
+--- 690,696 ----
+ p = msg_outtrans_one(p, attr);
+ if (*p == TAB)
+ {
+! msg_puts_attr(" ", attr);
+ break;
+ }
+ if (*p == ':')
+***************
+*** 1003,1011 ****
+ && num_matches > 1)
+ {
+ if (ic)
+! msg_attr(IObuff, HL_ATTR(HLF_W));
+ else
+! msg(IObuff);
+ msg_scroll = TRUE; /* don't overwrite this message */
+ }
+ else
+--- 1003,1011 ----
+ && num_matches > 1)
+ {
+ if (ic)
+! msg_attr((char *)IObuff, HL_ATTR(HLF_W));
+ else
+! msg((char *)IObuff);
+ msg_scroll = TRUE; /* don't overwrite this message */
+ }
+ else
+***************
+*** 1119,1125 ****
+ int tagstacklen = curwin->w_tagstacklen;
+
+ /* Highlight title */
+! MSG_PUTS_TITLE(_("\n # TO tag FROM line in file/text"));
+ for (i = 0; i < tagstacklen; ++i)
+ {
+ if (tagstack[i].tagname != NULL)
+--- 1119,1125 ----
+ int tagstacklen = curwin->w_tagstacklen;
+
+ /* Highlight title */
+! msg_puts_title(_("\n # TO tag FROM line in file/text"));
+ for (i = 0; i < tagstacklen; ++i)
+ {
+ if (tagstack[i].tagname != NULL)
+***************
+*** 1143,1149 ****
+ out_flush(); /* show one line at a time */
+ }
+ if (tagstackidx == tagstacklen) /* idx at top of stack */
+! MSG_PUTS("\n>");
+ }
+
+ /* When not using a CR for line separator, use vim_fgets() to read tag lines.
+--- 1143,1149 ----
+ out_flush(); /* show one line at a time */
+ }
+ if (tagstackidx == tagstacklen) /* idx at top of stack */
+! msg_puts("\n>");
+ }
+
+ /* When not using a CR for line separator, use vim_fgets() to read tag lines.
+***************
+*** 1962,1968 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! MSG(_("Ignoring long line in tags file"));
+ verbose_leave();
+ }
+ #ifdef FEAT_TAG_BINS
+--- 1962,1968 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! msg(_("Ignoring long line in tags file"));
+ verbose_leave();
+ }
+ #ifdef FEAT_TAG_BINS
+***************
+*** 2818,2824 ****
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! MSG(_("Ignoring long line in tags file"));
+ verbose_leave();
+ }
+ tagp->command = lbuf;
+--- 2818,2824 ----
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+! msg(_("Ignoring long line in tags file"));
+ verbose_leave();
+ }
+ tagp->command = lbuf;
+***************
+*** 3381,3387 ****
+ */
+ if (found == 2 || !save_p_ic)
+ {
+! MSG(_("E435: Couldn't find tag, just guessing!"));
+ if (!msg_scrolled && msg_silent == 0)
+ {
+ out_flush();
+--- 3381,3387 ----
+ */
+ if (found == 2 || !save_p_ic)
+ {
+! msg(_("E435: Couldn't find tag, just guessing!"));
+ if (!msg_scrolled && msg_silent == 0)
+ {
+ out_flush();
+*** ../vim-8.1.0778/src/term.c 2019-01-13 23:38:33.411773162 +0100
+--- src/term.c 2019-01-19 17:22:38.377197640 +0100
+***************
+*** 6373,6379 ****
+ return;
+
+ /* Highlight title */
+! MSG_PUTS_TITLE(_("\n--- Terminal keys ---"));
+
+ /*
+ * do the loop two times:
+--- 6373,6379 ----
+ return;
+
+ /* Highlight title */
+! msg_puts_title(_("\n--- Terminal keys ---"));
+
+ /*
+ * do the loop two times:
+***************
+*** 6475,6483 ****
+
+ if (printit)
+ {
+! msg_puts(IObuff);
+ if (code == NULL)
+! msg_puts((char_u *)"NULL");
+ else
+ msg_outtrans(code);
+ }
+--- 6475,6483 ----
+
+ if (printit)
+ {
+! msg_puts((char *)IObuff);
+ if (code == NULL)
+! msg_puts("NULL");
+ else
+ msg_outtrans(code);
+ }
+***************
+*** 7013,7019 ****
+ if (fd == NULL)
+ {
+ if (p_verbose > 1)
+! verb_msg((char_u *)_("Cannot open $VIMRUNTIME/rgb.txt"));
+ return INVALCOLOR;
+ }
+
+--- 7013,7019 ----
+ if (fd == NULL)
+ {
+ if (p_verbose > 1)
+! verb_msg(_("Cannot open $VIMRUNTIME/rgb.txt"));
+ return INVALCOLOR;
+ }
+
+*** ../vim-8.1.0778/src/undo.c 2019-01-13 23:38:33.415773131 +0100
+--- src/undo.c 2019-01-19 17:22:59.157075919 +0100
+***************
+*** 1641,1647 ****
+ if (buf->b_u_numhead == 0 && buf->b_u_line_ptr.ul_line == NULL)
+ {
+ if (p_verbose > 0)
+! verb_msg((char_u *)_("Skipping undo file write, nothing to undo"));
+ goto theend;
+ }
+
+--- 1641,1647 ----
+ if (buf->b_u_numhead == 0 && buf->b_u_line_ptr.ul_line == NULL)
+ {
+ if (p_verbose > 0)
+! verb_msg(_("Skipping undo file write, nothing to undo"));
+ goto theend;
+ }
+
+***************
+*** 2232,2238 ****
+ beep_flush();
+ if (count == startcount - 1)
+ {
+! MSG(_("Already at oldest change"));
+ return;
+ }
+ break;
+--- 2232,2238 ----
+ beep_flush();
+ if (count == startcount - 1)
+ {
+! msg(_("Already at oldest change"));
+ return;
+ }
+ break;
+***************
+*** 2247,2253 ****
+ beep_flush(); /* nothing to redo */
+ if (count == startcount - 1)
+ {
+! MSG(_("Already at newest change"));
+ return;
+ }
+ break;
+--- 2247,2253 ----
+ beep_flush(); /* nothing to redo */
+ if (count == startcount - 1)
+ {
+! msg(_("Already at newest change"));
+ return;
+ }
+ break;
+***************
+*** 2495,2503 ****
+ if (closest == closest_start)
+ {
+ if (step < 0)
+! MSG(_("Already at oldest change"));
+ else
+! MSG(_("Already at newest change"));
+ return;
+ }
+
+--- 2495,2503 ----
+ if (closest == closest_start)
+ {
+ if (step < 0)
+! msg(_("Already at oldest change"));
+ else
+! msg(_("Already at newest change"));
+ return;
+ }
+
+***************
+*** 3104,3123 ****
+ }
+
+ if (ga.ga_len == 0)
+! MSG(_("Nothing to undo"));
+ else
+ {
+ sort_strings((char_u **)ga.ga_data, ga.ga_len);
+
+ msg_start();
+! msg_puts_attr((char_u *)_("number changes when saved"),
+ HL_ATTR(HLF_T));
+ for (i = 0; i < ga.ga_len && !got_int; ++i)
+ {
+ msg_putchar('\n');
+ if (got_int)
+ break;
+! msg_puts(((char_u **)ga.ga_data)[i]);
+ }
+ msg_end();
+
+--- 3104,3123 ----
+ }
+
+ if (ga.ga_len == 0)
+! msg(_("Nothing to undo"));
+ else
+ {
+ sort_strings((char_u **)ga.ga_data, ga.ga_len);
+
+ msg_start();
+! msg_puts_attr(_("number changes when saved"),
+ HL_ATTR(HLF_T));
+ for (i = 0; i < ga.ga_len && !got_int; ++i)
+ {
+ msg_putchar('\n');
+ if (got_int)
+ break;
+! msg_puts(((char **)ga.ga_data)[i]);
+ }
+ msg_end();
+
+*** ../vim-8.1.0778/src/userfunc.c 2019-01-13 23:38:33.415773131 +0100
+--- src/userfunc.c 2019-01-19 16:58:10.347027099 +0100
+***************
+*** 893,903 ****
+ char_u *tofree;
+ char_u *s;
+
+! msg_puts((char_u *)"(");
+ for (i = 0; i < argcount; ++i)
+ {
+ if (i > 0)
+! msg_puts((char_u *)", ");
+ if (argvars[i].v_type == VAR_NUMBER)
+ msg_outnum((long)argvars[i].vval.v_number);
+ else
+--- 893,903 ----
+ char_u *tofree;
+ char_u *s;
+
+! msg_puts("(");
+ for (i = 0; i < argcount; ++i)
+ {
+ if (i > 0)
+! msg_puts(", ");
+ if (argvars[i].v_type == VAR_NUMBER)
+ msg_outnum((long)argvars[i].vval.v_number);
+ else
+***************
+*** 913,926 ****
+ trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN);
+ s = buf;
+ }
+! msg_puts(s);
+ vim_free(tofree);
+ }
+ }
+ }
+! msg_puts((char_u *)")");
+ }
+! msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+ verbose_leave_scroll();
+ --no_wait_return;
+--- 913,926 ----
+ trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN);
+ s = buf;
+ }
+! msg_puts((char *)s);
+ vim_free(tofree);
+ }
+ }
+ }
+! msg_puts(")");
+ }
+! msg_puts("\n"); /* don't overwrite this either */
+
+ verbose_leave_scroll();
+ --no_wait_return;
+***************
+*** 1018,1024 ****
+ vim_free(tofree);
+ }
+ }
+! msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+ verbose_leave_scroll();
+ --no_wait_return;
+--- 1018,1024 ----
+ vim_free(tofree);
+ }
+ }
+! msg_puts("\n"); /* don't overwrite this either */
+
+ verbose_leave_scroll();
+ --no_wait_return;
+***************
+*** 1041,1047 ****
+ verbose_enter_scroll();
+
+ smsg(_("continuing in %s"), sourcing_name);
+! msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+ verbose_leave_scroll();
+ --no_wait_return;
+--- 1041,1047 ----
+ verbose_enter_scroll();
+
+ smsg(_("continuing in %s"), sourcing_name);
+! msg_puts("\n"); /* don't overwrite this either */
+
+ verbose_leave_scroll();
+ --no_wait_return;
+***************
+*** 1571,1607 ****
+
+ msg_start();
+ if (indent)
+! MSG_PUTS(" ");
+! MSG_PUTS("function ");
+ if (fp->uf_name[0] == K_SPECIAL)
+ {
+! MSG_PUTS_ATTR("<SNR>", HL_ATTR(HLF_8));
+! msg_puts(fp->uf_name + 3);
+ }
+ else
+! msg_puts(fp->uf_name);
+ msg_putchar('(');
+ for (j = 0; j < fp->uf_args.ga_len; ++j)
+ {
+ if (j)
+! MSG_PUTS(", ");
+! msg_puts(FUNCARG(fp, j));
+ }
+ if (fp->uf_varargs)
+ {
+ if (j)
+! MSG_PUTS(", ");
+! MSG_PUTS("...");
+ }
+ msg_putchar(')');
+ if (fp->uf_flags & FC_ABORT)
+! MSG_PUTS(" abort");
+ if (fp->uf_flags & FC_RANGE)
+! MSG_PUTS(" range");
+ if (fp->uf_flags & FC_DICT)
+! MSG_PUTS(" dict");
+ if (fp->uf_flags & FC_CLOSURE)
+! MSG_PUTS(" closure");
+ msg_clr_eos();
+ if (p_verbose > 0)
+ last_set_msg(fp->uf_script_ctx);
+--- 1571,1607 ----
+
+ msg_start();
+ if (indent)
+! msg_puts(" ");
+! msg_puts("function ");
+ if (fp->uf_name[0] == K_SPECIAL)
+ {
+! msg_puts_attr("<SNR>", HL_ATTR(HLF_8));
+! msg_puts((char *)fp->uf_name + 3);
+ }
+ else
+! msg_puts((char *)fp->uf_name);
+ msg_putchar('(');
+ for (j = 0; j < fp->uf_args.ga_len; ++j)
+ {
+ if (j)
+! msg_puts(", ");
+! msg_puts((char *)FUNCARG(fp, j));
+ }
+ if (fp->uf_varargs)
+ {
+ if (j)
+! msg_puts(", ");
+! msg_puts("...");
+ }
+ msg_putchar(')');
+ if (fp->uf_flags & FC_ABORT)
+! msg_puts(" abort");
+ if (fp->uf_flags & FC_RANGE)
+! msg_puts(" range");
+ if (fp->uf_flags & FC_DICT)
+! msg_puts(" dict");
+ if (fp->uf_flags & FC_CLOSURE)
+! msg_puts(" closure");
+ msg_clr_eos();
+ if (p_verbose > 0)
+ last_set_msg(fp->uf_script_ctx);
+***************
+*** 2010,2016 ****
+ if (!got_int)
+ {
+ msg_putchar('\n');
+! msg_puts((char_u *)" endfunction");
+ }
+ }
+ else
+--- 2010,2016 ----
+ if (!got_int)
+ {
+ msg_putchar('\n');
+! msg_puts(" endfunction");
+ }
+ }
+ else
+***************
+*** 3731,3737 ****
+ {
+ if (current_funccal != NULL)
+ list_hashtable_vars(&current_funccal->l_vars.dv_hashtab,
+! (char_u *)"l:", FALSE, first);
+ }
+
+ /*
+--- 3731,3737 ----
+ {
+ if (current_funccal != NULL)
+ list_hashtable_vars(&current_funccal->l_vars.dv_hashtab,
+! "l:", FALSE, first);
+ }
+
+ /*
+*** ../vim-8.1.0778/src/version.c 2019-01-19 15:27:04.644211477 +0100
+--- src/version.c 2019-01-19 16:54:30.716495119 +0100
+***************
+*** 2421,2430 ****
+ if (!got_int)
+ {
+ if (wrap)
+! MSG_PUTS("[");
+! MSG_PUTS(s);
+ if (wrap)
+! MSG_PUTS("]");
+ }
+ }
+
+--- 2423,2432 ----
+ if (!got_int)
+ {
+ if (wrap)
+! msg_puts("[");
+! msg_puts((char *)s);
+ if (wrap)
+! msg_puts("]");
+ }
+ }
+
+***************
+*** 2502,2511 ****
+ msg_putchar('[');
+ #ifdef FEAT_SYN_HL
+ if (use_highlight && items[idx][0] == '-')
+! msg_puts_attr(items[idx], HL_ATTR(HLF_W));
+ else
+ #endif
+! msg_puts(items[idx]);
+ if (idx == current)
+ msg_putchar(']');
+ if (last_col)
+--- 2504,2513 ----
+ msg_putchar('[');
+ #ifdef FEAT_SYN_HL
+ if (use_highlight && items[idx][0] == '-')
+! msg_puts_attr((char *)items[idx], HL_ATTR(HLF_W));
+ else
+ #endif
+! msg_puts((char *)items[idx]);
+ if (idx == current)
+ msg_putchar(']');
+ if (last_col)
+***************
+*** 2539,2578 ****
+ * internal variables in eval.c!
+ */
+ init_longVersion();
+! MSG(longVersion);
+ #ifdef WIN3264
+ # ifdef FEAT_GUI_W32
+ # ifdef _WIN64
+! MSG_PUTS(_("\nMS-Windows 64-bit GUI version"));
+ # else
+! MSG_PUTS(_("\nMS-Windows 32-bit GUI version"));
+ # endif
+ # ifdef FEAT_OLE
+! MSG_PUTS(_(" with OLE support"));
+ # endif
+ # else
+ # ifdef _WIN64
+! MSG_PUTS(_("\nMS-Windows 64-bit console version"));
+ # else
+! MSG_PUTS(_("\nMS-Windows 32-bit console version"));
+ # endif
+ # endif
+ #endif
+ #if defined(MACOS_X)
+ # if defined(MACOS_X_DARWIN)
+! MSG_PUTS(_("\nmacOS version"));
+ # else
+! MSG_PUTS(_("\nmacOS version w/o darwin feat."));
+ # endif
+ #endif
+
+ #ifdef VMS
+! MSG_PUTS(_("\nOpenVMS version"));
+ # ifdef HAVE_PATHDEF
+ if (*compiled_arch != NUL)
+ {
+! MSG_PUTS(" - ");
+! MSG_PUTS(compiled_arch);
+ }
+ # endif
+
+--- 2541,2580 ----
+ * internal variables in eval.c!
+ */
+ init_longVersion();
+! msg(longVersion);
+ #ifdef WIN3264
+ # ifdef FEAT_GUI_W32
+ # ifdef _WIN64
+! msg_puts(_("\nMS-Windows 64-bit GUI version"));
+ # else
+! msg_puts(_("\nMS-Windows 32-bit GUI version"));
+ # endif
+ # ifdef FEAT_OLE
+! msg_puts(_(" with OLE support"));
+ # endif
+ # else
+ # ifdef _WIN64
+! msg_puts(_("\nMS-Windows 64-bit console version"));
+ # else
+! msg_puts(_("\nMS-Windows 32-bit console version"));
+ # endif
+ # endif
+ #endif
+ #if defined(MACOS_X)
+ # if defined(MACOS_X_DARWIN)
+! msg_puts(_("\nmacOS version"));
+ # else
+! msg_puts(_("\nmacOS version w/o darwin feat."));
+ # endif
+ #endif
+
+ #ifdef VMS
+! msg_puts(_("\nOpenVMS version"));
+ # ifdef HAVE_PATHDEF
+ if (*compiled_arch != NUL)
+ {
+! msg_puts(" - ");
+! msg_puts((char *)compiled_arch);
+ }
+ # endif
+
+***************
+*** 2582,2588 ****
+ /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */
+ if (included_patches[0] != 0)
+ {
+! MSG_PUTS(_("\nIncluded patches: "));
+ first = -1;
+ /* find last one */
+ for (i = 0; included_patches[i] != 0; ++i)
+--- 2584,2590 ----
+ /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */
+ if (included_patches[0] != 0)
+ {
+! msg_puts(_("\nIncluded patches: "));
+ first = -1;
+ /* find last one */
+ for (i = 0; included_patches[i] != 0; ++i)
+***************
+*** 2593,2604 ****
+ first = included_patches[i];
+ if (i == 0 || included_patches[i - 1] != included_patches[i] + 1)
+ {
+! MSG_PUTS(s);
+ s = ", ";
+ msg_outnum((long)first);
+ if (first != included_patches[i])
+ {
+! MSG_PUTS("-");
+ msg_outnum((long)included_patches[i]);
+ }
+ first = -1;
+--- 2595,2606 ----
+ first = included_patches[i];
+ if (i == 0 || included_patches[i - 1] != included_patches[i] + 1)
+ {
+! msg_puts(s);
+ s = ", ";
+ msg_outnum((long)first);
+ if (first != included_patches[i])
+ {
+! msg_puts("-");
+ msg_outnum((long)included_patches[i]);
+ }
+ first = -1;
+***************
+*** 2609,2699 ****
+ /* Print the list of extra patch descriptions if there is at least one. */
+ if (extra_patches[0] != NULL)
+ {
+! MSG_PUTS(_("\nExtra patches: "));
+ s = "";
+ for (i = 0; extra_patches[i] != NULL; ++i)
+ {
+! MSG_PUTS(s);
+ s = ", ";
+! MSG_PUTS(extra_patches[i]);
+ }
+ }
+
+ #ifdef MODIFIED_BY
+! MSG_PUTS("\n");
+! MSG_PUTS(_("Modified by "));
+! MSG_PUTS(MODIFIED_BY);
+ #endif
+
+ #ifdef HAVE_PATHDEF
+ if (*compiled_user != NUL || *compiled_sys != NUL)
+ {
+! MSG_PUTS(_("\nCompiled "));
+ if (*compiled_user != NUL)
+ {
+! MSG_PUTS(_("by "));
+! MSG_PUTS(compiled_user);
+ }
+ if (*compiled_sys != NUL)
+ {
+! MSG_PUTS("@");
+! MSG_PUTS(compiled_sys);
+ }
+ }
+ #endif
+
+ #ifdef FEAT_HUGE
+! MSG_PUTS(_("\nHuge version "));
+ #else
+ # ifdef FEAT_BIG
+! MSG_PUTS(_("\nBig version "));
+ # else
+ # ifdef FEAT_NORMAL
+! MSG_PUTS(_("\nNormal version "));
+ # else
+ # ifdef FEAT_SMALL
+! MSG_PUTS(_("\nSmall version "));
+ # else
+! MSG_PUTS(_("\nTiny version "));
+ # endif
+ # endif
+ # endif
+ #endif
+ #ifndef FEAT_GUI
+! MSG_PUTS(_("without GUI."));
+ #else
+ # ifdef FEAT_GUI_GTK
+ # ifdef USE_GTK3
+! MSG_PUTS(_("with GTK3 GUI."));
+ # else
+ # ifdef FEAT_GUI_GNOME
+! MSG_PUTS(_("with GTK2-GNOME GUI."));
+ # else
+! MSG_PUTS(_("with GTK2 GUI."));
+ # endif
+ # endif
+ # else
+ # ifdef FEAT_GUI_MOTIF
+! MSG_PUTS(_("with X11-Motif GUI."));
+ # else
+ # ifdef FEAT_GUI_ATHENA
+ # ifdef FEAT_GUI_NEXTAW
+! MSG_PUTS(_("with X11-neXtaw GUI."));
+ # else
+! MSG_PUTS(_("with X11-Athena GUI."));
+ # endif
+ # else
+ # ifdef FEAT_GUI_PHOTON
+! MSG_PUTS(_("with Photon GUI."));
+ # else
+ # if defined(MSWIN)
+! MSG_PUTS(_("with GUI."));
+ # else
+ # if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON
+! MSG_PUTS(_("with Carbon GUI."));
+ # else
+ # if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX
+! MSG_PUTS(_("with Cocoa GUI."));
+ # else
+ # endif
+ # endif
+--- 2611,2701 ----
+ /* Print the list of extra patch descriptions if there is at least one. */
+ if (extra_patches[0] != NULL)
+ {
+! msg_puts(_("\nExtra patches: "));
+ s = "";
+ for (i = 0; extra_patches[i] != NULL; ++i)
+ {
+! msg_puts(s);
+ s = ", ";
+! msg_puts(extra_patches[i]);
+ }
+ }
+
+ #ifdef MODIFIED_BY
+! msg_puts("\n");
+! msg_puts(_("Modified by "));
+! msg_puts(MODIFIED_BY);
+ #endif
+
+ #ifdef HAVE_PATHDEF
+ if (*compiled_user != NUL || *compiled_sys != NUL)
+ {
+! msg_puts(_("\nCompiled "));
+ if (*compiled_user != NUL)
+ {
+! msg_puts(_("by "));
+! msg_puts((char *)compiled_user);
+ }
+ if (*compiled_sys != NUL)
+ {
+! msg_puts("@");
+! msg_puts((char *)compiled_sys);
+ }
+ }
+ #endif
+
+ #ifdef FEAT_HUGE
+! msg_puts(_("\nHuge version "));
+ #else
+ # ifdef FEAT_BIG
+! msg_puts(_("\nBig version "));
+ # else
+ # ifdef FEAT_NORMAL
+! msg_puts(_("\nNormal version "));
+ # else
+ # ifdef FEAT_SMALL
+! msg_puts(_("\nSmall version "));
+ # else
+! msg_puts(_("\nTiny version "));
+ # endif
+ # endif
+ # endif
+ #endif
+ #ifndef FEAT_GUI
+! msg_puts(_("without GUI."));
+ #else
+ # ifdef FEAT_GUI_GTK
+ # ifdef USE_GTK3
+! msg_puts(_("with GTK3 GUI."));
+ # else
+ # ifdef FEAT_GUI_GNOME
+! msg_puts(_("with GTK2-GNOME GUI."));
+ # else
+! msg_puts(_("with GTK2 GUI."));
+ # endif
+ # endif
+ # else
+ # ifdef FEAT_GUI_MOTIF
+! msg_puts(_("with X11-Motif GUI."));
+ # else
+ # ifdef FEAT_GUI_ATHENA
+ # ifdef FEAT_GUI_NEXTAW
+! msg_puts(_("with X11-neXtaw GUI."));
+ # else
+! msg_puts(_("with X11-Athena GUI."));
+ # endif
+ # else
+ # ifdef FEAT_GUI_PHOTON
+! msg_puts(_("with Photon GUI."));
+ # else
+ # if defined(MSWIN)
+! msg_puts(_("with GUI."));
+ # else
+ # if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON
+! msg_puts(_("with Carbon GUI."));
+ # else
+ # if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX
+! msg_puts(_("with Cocoa GUI."));
+ # else
+ # endif
+ # endif
+*** ../vim-8.1.0778/src/vim.h 2019-01-17 22:28:18.901373188 +0100
+--- src/vim.h 2019-01-19 17:34:53.468634537 +0100
+***************
+*** 1630,1644 ****
+ # define vim_strpbrk(s, cs) (char_u *)strpbrk((char *)(s), (char *)(cs))
+ #endif
+
+- #define MSG(s) msg((char_u *)(s))
+- #define MSG_ATTR(s, attr) msg_attr((char_u *)(s), (attr))
+ #define OUT_STR(s) out_str((char_u *)(s))
+ #define OUT_STR_NF(s) out_str_nf((char_u *)(s))
+- #define MSG_PUTS(s) msg_puts((char_u *)(s))
+- #define MSG_PUTS_ATTR(s, a) msg_puts_attr((char_u *)(s), (a))
+- #define MSG_PUTS_TITLE(s) msg_puts_title((char_u *)(s))
+- #define MSG_PUTS_LONG(s) msg_puts_long_attr((char_u *)(s), 0)
+- #define MSG_PUTS_LONG_ATTR(s, a) msg_puts_long_attr((char_u *)(s), (a))
+
+ #ifdef FEAT_GUI
+ # ifdef FEAT_TERMGUICOLORS
+--- 1630,1637 ----
+*** ../vim-8.1.0778/src/window.c 2019-01-15 20:19:36.747904404 +0100
+--- src/window.c 2019-01-19 16:11:10.102067682 +0100
+***************
+*** 310,316 ****
+ /* move window to new tab page */
+ case 'T':
+ if (one_window())
+! MSG(_(m_onlyone));
+ else
+ {
+ tabpage_T *oldtab = curtab;
+--- 310,316 ----
+ /* move window to new tab page */
+ case 'T':
+ if (one_window())
+! msg(_(m_onlyone));
+ else
+ {
+ tabpage_T *oldtab = curtab;
+***************
+*** 3379,3385 ****
+ if (one_window())
+ {
+ if (message && !autocmd_busy)
+! MSG(_(m_onlyone));
+ return;
+ }
+
+--- 3379,3385 ----
+ if (one_window())
+ {
+ if (message && !autocmd_busy)
+! msg(_(m_onlyone));
+ return;
+ }
+
+*** ../vim-8.1.0778/src/proto/eval.pro 2018-12-22 13:27:59.115503998 +0100
+--- src/proto/eval.pro 2019-01-19 16:23:33.345051440 +0100
+***************
+*** 25,31 ****
+ 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);
+ char_u *get_lval(char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int flags, int fne_flags);
+ void clear_lval(lval_T *lp);
+ void *eval_for_line(char_u *arg, int *errp, char_u **nextcmdp, int skip);
+--- 25,31 ----
+ 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 *prefix, int empty, int *first);
+ char_u *get_lval(char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int flags, int fne_flags);
+ void clear_lval(lval_T *lp);
+ void *eval_for_line(char_u *arg, int *errp, char_u **nextcmdp, int skip);
+*** ../vim-8.1.0778/src/evalfunc.c 2019-01-17 15:43:21.757878392 +0100
+--- src/evalfunc.c 2019-01-19 17:21:57.281436404 +0100
+***************
+*** 7169,7175 ****
+
+ for (li = argvars[0].vval.v_list->lv_first; li != NULL; li = li->li_next)
+ {
+! msg_puts(tv_get_string(&li->li_tv));
+ msg_putchar('\n');
+ }
+
+--- 7169,7175 ----
+
+ for (li = argvars[0].vval.v_list->lv_first; li != NULL; li = li->li_next)
+ {
+! msg_puts((char *)tv_get_string(&li->li_tv));
+ msg_putchar('\n');
+ }
+
+***************
+*** 7198,7204 ****
+ }
+ else if (p_verbose > 1)
+ {
+! verb_msg((char_u *)_("called inputrestore() more often than inputsave()"));
+ rettv->vval.v_number = 1; /* Failed */
+ }
+ }
+--- 7198,7204 ----
+ }
+ else if (p_verbose > 1)
+ {
+! verb_msg(_("called inputrestore() more often than inputsave()"));
+ rettv->vval.v_number = 1; /* Failed */
+ }
+ }
+*** ../vim-8.1.0778/src/ex_eval.c 2019-01-13 23:38:33.387773334 +0100
+--- src/ex_eval.c 2019-01-19 16:26:28.487860978 +0100
+***************
+*** 556,562 ****
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+
+ smsg(_("Exception thrown: %s"), excp->value);
+! msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ cmdline_row = msg_row;
+--- 556,562 ----
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+
+ smsg(_("Exception thrown: %s"), excp->value);
+! msg_puts("\n"); /* don't overwrite this either */
+
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ cmdline_row = msg_row;
+***************
+*** 610,616 ****
+ ? _("Exception finished: %s")
+ : _("Exception discarded: %s"),
+ excp->value);
+! msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ cmdline_row = msg_row;
+ --no_wait_return;
+--- 610,616 ----
+ ? _("Exception finished: %s")
+ : _("Exception discarded: %s"),
+ excp->value);
+! msg_puts("\n"); /* don't overwrite this either */
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ cmdline_row = msg_row;
+ --no_wait_return;
+***************
+*** 679,685 ****
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+
+ smsg(_("Exception caught: %s"), excp->value);
+! msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ cmdline_row = msg_row;
+--- 679,685 ----
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+
+ smsg(_("Exception caught: %s"), excp->value);
+! msg_puts("\n"); /* don't overwrite this either */
+
+ if (debug_break_level > 0 || *p_vfile == NUL)
+ cmdline_row = msg_row;
+***************
+*** 806,812 ****
+ ++no_wait_return;
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+ smsg(mesg, s);
+! msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ cmdline_row = msg_row;
+ --no_wait_return;
+ if (debug_break_level > 0)
+--- 806,812 ----
+ ++no_wait_return;
+ msg_scroll = TRUE; /* always scroll up, don't overwrite */
+ smsg(mesg, s);
+! msg_puts("\n"); /* don't overwrite this either */
+ cmdline_row = msg_row;
+ --no_wait_return;
+ if (debug_break_level > 0)
+*** ../vim-8.1.0778/src/farsi.h 2019-01-13 23:38:33.391773303 +0100
+--- src/farsi.h 2019-01-19 17:17:21.303243929 +0100
+***************
+*** 186,192 ****
+
+ /* special Farsi text messages */
+
+! EXTERN char_u farsi_text_1[]
+ #ifdef DO_INIT
+ = { YE_, _SIN, RE, ALEF_, _FE, ' ', 'V', 'I', 'M',
+ ' ', F_HE, _BE, ' ', SHIN, RE, _GAF, DAL,' ', NOON,
+--- 186,192 ----
+
+ /* special Farsi text messages */
+
+! EXTERN char farsi_text_1[]
+ #ifdef DO_INIT
+ = { YE_, _SIN, RE, ALEF_, _FE, ' ', 'V', 'I', 'M',
+ ' ', F_HE, _BE, ' ', SHIN, RE, _GAF, DAL,' ', NOON,
+***************
+*** 194,200 ****
+ #endif
+ ;
+
+! EXTERN char_u farsi_text_2[]
+ #ifdef DO_INIT
+ = { YE_, _SIN, RE, ALEF_, _FE, ' ', FARSI_3, FARSI_3,
+ FARSI_4, FARSI_2, ' ', DAL, RE, ALEF, DAL, _NOON,
+--- 194,200 ----
+ #endif
+ ;
+
+! EXTERN char farsi_text_2[]
+ #ifdef DO_INIT
+ = { YE_, _SIN, RE, ALEF_, _FE, ' ', FARSI_3, FARSI_3,
+ FARSI_4, FARSI_2, ' ', DAL, RE, ALEF, DAL, _NOON,
+***************
+*** 227,233 ****
+ ;
+ #endif
+
+! EXTERN char_u farsi_text_5[]
+ #ifdef DO_INIT
+ = { ' ', YE_, _SIN, RE, ALEF_, _FE, '\0'}
+ #endif
+--- 227,233 ----
+ ;
+ #endif
+
+! EXTERN char farsi_text_5[]
+ #ifdef DO_INIT
+ = { ' ', YE_, _SIN, RE, ALEF_, _FE, '\0'}
+ #endif
+*** ../vim-8.1.0778/src/version.c 2019-01-19 15:27:04.644211477 +0100
+--- src/version.c 2019-01-19 16:54:30.716495119 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 779,
+ /**/
+
+--
+Did you hear about the new 3 million dollar West Virginia State Lottery?
+The winner gets 3 dollars a year for a million years.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0780 b/data/vim/patches/8.1.0780
new file mode 100644
index 000000000..d105ea964
--- /dev/null
+++ b/data/vim/patches/8.1.0780
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0780
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0780
+Problem: Terminal test fails on Mac.
+Solution: Skip the test on Mac.
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0779/src/testdir/test_terminal.vim 2019-01-19 15:27:04.644211477 +0100
+--- src/testdir/test_terminal.vim 2019-01-19 18:19:10.470998755 +0100
+***************
+*** 643,650 ****
+ endfunc
+
+ func Test_terminal_no_cmd()
+ " Todo: make this work on Win32 again
+! if has('win32')
+ return
+ endif
+ let buf = term_start('NONE', {})
+--- 643,651 ----
+ endfunc
+
+ func Test_terminal_no_cmd()
++ " Does not work on Mac.
+ " Todo: make this work on Win32 again
+! if has('mac') || has('win32')
+ return
+ endif
+ let buf = term_start('NONE', {})
+*** ../vim-8.1.0779/src/version.c 2019-01-19 17:43:03.433449041 +0100
+--- src/version.c 2019-01-19 18:19:49.242740673 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 780,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+258. When you want to see your girlfriend, you surf to her homepage.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0781 b/data/vim/patches/8.1.0781
new file mode 100644
index 000000000..d1278f289
--- /dev/null
+++ b/data/vim/patches/8.1.0781
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0781
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0781
+Problem: Build error when using if_xcmdsrv.c.
+Solution: Add missing part of 8.1.0779.
+Files: src/if_xcmdsrv.c
+
+
+*** ../vim-8.1.0780/src/if_xcmdsrv.c 2019-01-13 23:38:33.399773248 +0100
+--- src/if_xcmdsrv.c 2019-01-19 17:17:46.011076179 +0100
+***************
+*** 228,234 ****
+ {
+ if (res < -1 || i >= 1000)
+ {
+! MSG_ATTR(_("Unable to register a command server name"),
+ HL_ATTR(HLF_W));
+ return FAIL;
+ }
+--- 228,234 ----
+ {
+ if (res < -1 || i >= 1000)
+ {
+! msg_attr(_("Unable to register a command server name"),
+ HL_ATTR(HLF_W));
+ return FAIL;
+ }
+*** ../vim-8.1.0780/src/version.c 2019-01-19 18:20:41.918390095 +0100
+--- src/version.c 2019-01-19 18:23:06.257429712 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 781,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+259. When you enter your name in the AltaVista search engine, the top ten
+ matches do indeed refer 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.0782 b/data/vim/patches/8.1.0782
new file mode 100644
index 000000000..b2562ebaa
--- /dev/null
+++ b/data/vim/patches/8.1.0782
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0782
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0782
+Problem: Win32: cursor blinks when Vim is not active.
+Solution: Remove call to setActiveWindow(). (Yasuhiro Matsumoto,
+ closes #3778)
+Files: src/gui_w32.c, src/proto/gui_w32.pro, src/menu.c
+
+
+*** ../vim-8.1.0781/src/gui_w32.c 2019-01-19 17:43:03.417449145 +0100
+--- src/gui_w32.c 2019-01-19 19:52:18.846955441 +0100
+***************
+*** 2442,2453 ****
+ }
+ #endif /* FEAT_GUI_DIALOG */
+
+- void
+- gui_mch_activate_window(void)
+- {
+- (void)SetActiveWindow(s_hwnd);
+- }
+-
+ #if defined(FEAT_TOOLBAR) || defined(PROTO)
+ void
+ gui_mch_show_toolbar(int showit)
+--- 2442,2447 ----
+*** ../vim-8.1.0781/src/proto/gui_w32.pro 2018-05-17 13:57:04.000000000 +0200
+--- src/proto/gui_w32.pro 2019-01-19 19:52:24.378909371 +0100
+***************
+*** 36,42 ****
+ void gui_mch_menu_hidden(vimmenu_T *menu, int hidden);
+ void gui_mch_draw_menubar(void);
+ guicolor_T gui_mch_get_rgb(guicolor_T pixel);
+- void gui_mch_activate_window(void);
+ void gui_mch_show_toolbar(int showit);
+ void gui_mch_show_tabline(int showit);
+ int gui_mch_showing_tabline(void);
+--- 36,41 ----
+*** ../vim-8.1.0781/src/menu.c 2019-01-19 17:43:03.417449145 +0100
+--- src/menu.c 2019-01-19 19:52:32.838839022 +0100
+***************
+*** 2080,2090 ****
+ gui_mch_draw_menubar();
+ prev_mode = mode;
+ force_menu_update = FALSE;
+- # ifdef FEAT_GUI_W32
+- /* This can leave a tearoff as active window - make sure we
+- * have the focus <negri>*/
+- gui_mch_activate_window();
+- # endif
+ }
+ }
+
+--- 2080,2085 ----
+*** ../vim-8.1.0781/src/version.c 2019-01-19 18:23:38.017218438 +0100
+--- src/version.c 2019-01-19 19:53:47.514223279 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 782,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+262. Your computer has it's own phone line - but your daughter doesn'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.0783 b/data/vim/patches/8.1.0783
new file mode 100644
index 000000000..db1082112
--- /dev/null
+++ b/data/vim/patches/8.1.0783
@@ -0,0 +1,105 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0783
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0783
+Problem: Compiler warning for signed/unsigned.
+Solution: Add type cast. Change type of buffer. (Ozaki Kiichi, closes #3827)
+Files: src/main.c, src/message.c
+
+
+*** ../vim-8.1.0782/src/main.c 2019-01-17 15:43:21.761878368 +0100
+--- src/main.c 2019-01-19 17:19:10.514502365 +0100
+***************
+*** 1288,1294 ****
+ * string here. Don't reset keep_msg, msg_attr_keep() uses it
+ * to check for duplicates. */
+ p = keep_msg;
+! msg_attr(p, keep_msg_attr);
+ vim_free(p);
+ }
+ if (need_fileinfo) /* show file info after redraw */
+--- 1288,1294 ----
+ * string here. Don't reset keep_msg, msg_attr_keep() uses it
+ * to check for duplicates. */
+ p = keep_msg;
+! msg_attr((char *)p, keep_msg_attr);
+ vim_free(p);
+ }
+ if (need_fileinfo) /* show file info after redraw */
+*** ../vim-8.1.0782/src/message.c 2019-01-19 17:43:03.421449119 +0100
+--- src/message.c 2019-01-19 21:05:20.864866886 +0100
+***************
+*** 1389,1397 ****
+ msg_putchar_attr(int c, int attr)
+ {
+ #ifdef FEAT_MBYTE
+! char buf[MB_MAXBYTES + 1];
+ #else
+! char buf[4];
+ #endif
+
+ if (IS_SPECIAL(c))
+--- 1389,1397 ----
+ msg_putchar_attr(int c, int attr)
+ {
+ #ifdef FEAT_MBYTE
+! char_u buf[MB_MAXBYTES + 1];
+ #else
+! char_u buf[4];
+ #endif
+
+ if (IS_SPECIAL(c))
+***************
+*** 1404,1416 ****
+ else
+ {
+ #ifdef FEAT_MBYTE
+! buf[(*mb_char2bytes)(c, (char_u *)buf)] = NUL;
+ #else
+ buf[0] = c;
+ buf[1] = NUL;
+ #endif
+ }
+! msg_puts_attr(buf, attr);
+ }
+
+ void
+--- 1404,1416 ----
+ else
+ {
+ #ifdef FEAT_MBYTE
+! buf[(*mb_char2bytes)(c, buf)] = NUL;
+ #else
+ buf[0] = c;
+ buf[1] = NUL;
+ #endif
+ }
+! msg_puts_attr((char *)buf, attr);
+ }
+
+ void
+*** ../vim-8.1.0782/src/version.c 2019-01-19 19:54:17.141981393 +0100
+--- src/version.c 2019-01-19 21:05:53.928611900 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 783,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+264. You turn to the teletext page "surfing report" and are surprised that it
+ is about sizes of waves and a weather forecast for seaside resorts.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0784 b/data/vim/patches/8.1.0784
new file mode 100644
index 000000000..0b5199e40
--- /dev/null
+++ b/data/vim/patches/8.1.0784
@@ -0,0 +1,108 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0784
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0784
+Problem: Messy indent in if statement.
+Solution: Improve structure of if statement. (Ozaki Kiichi, closes #3826)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0783/src/os_win32.c 2019-01-19 17:43:03.425449092 +0100
+--- src/os_win32.c 2019-01-19 21:09:31.750936487 +0100
+***************
+*** 1576,1609 ****
+ dwWaitTime = p_mzq; /* don't wait longer than 'mzquantum' */
+ #endif
+ #ifdef FEAT_TIMERS
+ {
+ long due_time;
+
+! /* When waiting very briefly don't trigger timers. */
+! if (dwWaitTime > 10)
+ {
+! /* Trigger timers and then get the time in msec until the
+! * next one is due. Wait up to that time. */
+! due_time = check_due_timer();
+! if (typebuf.tb_change_cnt != tb_change_cnt)
+! {
+! /* timer may have used feedkeys() */
+! return FALSE;
+! }
+! if (due_time > 0 && dwWaitTime > (DWORD)due_time)
+! dwWaitTime = due_time;
+ }
+ }
+ #endif
+ #ifdef FEAT_CLIENTSERVER
+! /* Wait for either an event on the console input or a message in
+! * the client-server window. */
+! if (msg_wait_for_multiple_objects(1, &g_hConIn, FALSE,
+! dwWaitTime, QS_SENDMESSAGE) != WAIT_OBJECT_0)
+ #else
+! if (wait_for_single_object(g_hConIn, dwWaitTime) != WAIT_OBJECT_0)
+ #endif
+! continue;
+ }
+
+ cRecords = 0;
+--- 1576,1610 ----
+ dwWaitTime = p_mzq; /* don't wait longer than 'mzquantum' */
+ #endif
+ #ifdef FEAT_TIMERS
++ // When waiting very briefly don't trigger timers.
++ if (dwWaitTime > 10)
+ {
+ long due_time;
+
+! // Trigger timers and then get the time in msec until the next
+! // one is due. Wait up to that time.
+! due_time = check_due_timer();
+! if (typebuf.tb_change_cnt != tb_change_cnt)
+ {
+! // timer may have used feedkeys().
+! return FALSE;
+ }
++ if (due_time > 0 && dwWaitTime > (DWORD)due_time)
++ dwWaitTime = due_time;
+ }
+ #endif
++ if (
+ #ifdef FEAT_CLIENTSERVER
+! // Wait for either an event on the console input or a
+! // message in the client-server window.
+! msg_wait_for_multiple_objects(1, &g_hConIn, FALSE,
+! dwWaitTime, QS_SENDMESSAGE) != WAIT_OBJECT_0
+ #else
+! wait_for_single_object(g_hConIn, dwWaitTime)
+! != WAIT_OBJECT_0
+ #endif
+! )
+! continue;
+ }
+
+ cRecords = 0;
+*** ../vim-8.1.0783/src/version.c 2019-01-19 21:06:55.348138753 +0100
+--- src/version.c 2019-01-19 21:12:16.405673931 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 784,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+265. Your reason for not staying in touch with family is that
+ they do not have e-mail addresses.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0785 b/data/vim/patches/8.1.0785
new file mode 100644
index 000000000..09bca448a
--- /dev/null
+++ b/data/vim/patches/8.1.0785
@@ -0,0 +1,1006 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0785
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0785
+Problem: Depending on the configuration some functions are unused.
+Solution: Add more #ifdefs, remove unused functions. (Dominique Pelle,
+ closes #3822)
+Files: src/buffer.c, src/channel.c, src/ex_cmds2.c, src/ex_docmd.c,
+ src/fileio.c, src/getchar.c, src/gui_gtk_x11.c, src/hashtab.c,
+ src/json.c, src/mbyte.c, src/message.c, src/misc1.c, src/misc2.c,
+ src/ops.c, src/option.c, src/os_unix.c, src/proto/os_unix.pro,
+ src/proto/regexp.pro, src/proto/terminal.pro, src/regexp.c,
+ src/screen.c, src/search.c, src/syntax.c, src/term.c,
+ src/terminal.c, src/ui.c, src/userfunc.c
+
+
+*** ../vim-8.1.0784/src/buffer.c 2019-01-19 17:43:03.401449251 +0100
+--- src/buffer.c 2019-01-20 15:27:17.306620811 +0100
+***************
+*** 5660,5665 ****
+--- 5660,5666 ----
+ return buf != NULL && buf->b_p_bt[0] == NUL;
+ }
+
++ #if defined(FEAT_QUICKFIX) || defined(PROTO)
+ /*
+ * Return TRUE if "buf" is the quickfix buffer.
+ */
+***************
+*** 5668,5674 ****
+--- 5669,5677 ----
+ {
+ return buf != NULL && buf->b_p_bt[0] == 'q';
+ }
++ #endif
+
++ #if defined(FEAT_TERMINAL) || defined(PROTO)
+ /*
+ * Return TRUE if "buf" is a terminal buffer.
+ */
+***************
+*** 5677,5682 ****
+--- 5680,5686 ----
+ {
+ return buf != NULL && buf->b_p_bt[0] == 't';
+ }
++ #endif
+
+ /*
+ * Return TRUE if "buf" is a help buffer.
+***************
+*** 5721,5726 ****
+--- 5725,5731 ----
+ || buf->b_p_bt[0] == 'p');
+ }
+
++ #if defined(FEAT_QUICKFIX) || defined(PROTO)
+ int
+ bt_dontwrite_msg(buf_T *buf)
+ {
+***************
+*** 5731,5736 ****
+--- 5736,5742 ----
+ }
+ return FALSE;
+ }
++ #endif
+
+ /*
+ * Return TRUE if the buffer should be hidden, according to 'hidden', ":hide"
+*** ../vim-8.1.0784/src/channel.c 2019-01-19 14:36:56.796683378 +0100
+--- src/channel.c 2019-01-20 15:27:17.306620811 +0100
+***************
+*** 2750,2755 ****
+--- 2750,2756 ----
+ return TRUE;
+ }
+
++ #if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
+ /*
+ * Return TRUE when channel "channel" is open for writing to.
+ * Also returns FALSE or invalid "channel".
+***************
+*** 2760,2765 ****
+--- 2761,2767 ----
+ return channel != NULL && (channel->CH_SOCK_FD != INVALID_FD
+ || channel->CH_IN_FD != INVALID_FD);
+ }
++ #endif
+
+ /*
+ * Return TRUE when channel "channel" is open for reading or writing.
+*** ../vim-8.1.0784/src/ex_cmds2.c 2019-01-19 17:43:03.405449224 +0100
+--- src/ex_cmds2.c 2019-01-20 15:27:17.306620811 +0100
+***************
+*** 1578,1584 ****
+ # endif
+ # endif
+
+! #if defined(FEAT_SYN_HL) && defined(FEAT_RELTIME) && defined(FEAT_FLOAT)
+ # if defined(HAVE_MATH_H)
+ # include <math.h>
+ # endif
+--- 1578,1584 ----
+ # endif
+ # endif
+
+! #if defined(FEAT_SYN_HL) && defined(FEAT_RELTIME) && defined(FEAT_FLOAT) && defined(FEAT_PROFILE)
+ # if defined(HAVE_MATH_H)
+ # include <math.h>
+ # endif
+*** ../vim-8.1.0784/src/ex_docmd.c 2019-01-19 17:43:03.409449198 +0100
+--- src/ex_docmd.c 2019-01-20 15:27:17.310620785 +0100
+***************
+*** 12314,12319 ****
+--- 12314,12320 ----
+ }
+ #endif
+
++ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ char_u *
+ get_mapclear_arg(expand_T *xp UNUSED, int idx)
+ {
+***************
+*** 12321,12326 ****
+--- 12322,12328 ----
+ return (char_u *)"<buffer>";
+ return NULL;
+ }
++ #endif
+
+ static int filetype_detect = FALSE;
+ static int filetype_plugin = FALSE;
+*** ../vim-8.1.0784/src/fileio.c 2019-01-19 17:43:03.409449198 +0100
+--- src/fileio.c 2019-01-20 15:27:17.310620785 +0100
+***************
+*** 9303,9308 ****
+--- 9303,9309 ----
+ return (first_autopat[(int)EVENT_CURSORMOVED] != NULL);
+ }
+
++ #if defined(FEAT_CONCEAL) || defined(PROTO)
+ /*
+ * Return TRUE when there is a CursorMovedI autocommand defined.
+ */
+***************
+*** 9311,9316 ****
+--- 9312,9318 ----
+ {
+ return (first_autopat[(int)EVENT_CURSORMOVEDI] != NULL);
+ }
++ #endif
+
+ /*
+ * Return TRUE when there is a TextChanged autocommand defined.
+***************
+*** 9330,9335 ****
+--- 9332,9338 ----
+ return (first_autopat[(int)EVENT_TEXTCHANGEDI] != NULL);
+ }
+
++ #if defined(FEAT_INS_EXPAND) || defined(PROTO)
+ /*
+ * Return TRUE when there is a TextChangedP autocommand defined.
+ */
+***************
+*** 9338,9343 ****
+--- 9341,9347 ----
+ {
+ return (first_autopat[(int)EVENT_TEXTCHANGEDP] != NULL);
+ }
++ #endif
+
+ /*
+ * Return TRUE when there is an InsertCharPre autocommand defined.
+***************
+*** 9366,9371 ****
+--- 9370,9376 ----
+ return (first_autopat[(int)EVENT_FUNCUNDEFINED] != NULL);
+ }
+
++ #if defined(FEAT_EVAL) || defined(PROTO)
+ /*
+ * Return TRUE when there is a TextYankPost autocommand defined.
+ */
+***************
+*** 9374,9379 ****
+--- 9379,9385 ----
+ {
+ return (first_autopat[(int)EVENT_TEXTYANKPOST] != NULL);
+ }
++ #endif
+
+ /*
+ * Execute autocommands for "event" and file name "fname".
+***************
+*** 9823,9833 ****
+--- 9829,9842 ----
+ # endif
+ }
+
++ #if defined(FEAT_EVAL) && (defined(FEAT_XIM) || defined(IME_WITHOUT_XIM)) \
++ || defined(PROTO)
+ int
+ is_autocmd_blocked(void)
+ {
+ return autocmd_blocked != 0;
+ }
++ #endif
+
+ /*
+ * Find next autocommand pattern that matches.
+***************
+*** 10088,10093 ****
+--- 10097,10103 ----
+
+ #endif /* FEAT_CMDL_COMPL */
+
++ #if defined(FEAT_EVAL) || defined(PROTO)
+ /*
+ * Return TRUE if autocmd is supported.
+ */
+***************
+*** 10196,10201 ****
+--- 10206,10212 ----
+ vim_free(arg_save);
+ return retval;
+ }
++ #endif
+
+
+ /*
+*** ../vim-8.1.0784/src/getchar.c 2019-01-19 17:43:03.413449172 +0100
+--- src/getchar.c 2019-01-20 15:27:17.310620785 +0100
+***************
+*** 413,418 ****
+--- 413,419 ----
+ && readbuf2.bh_first.b_next == NULL);
+ }
+
++ #if defined(FEAT_EVAL) || defined(PROTO)
+ /*
+ * Return TRUE if readbuf1 is empty. There may still be redo characters in
+ * redbuf2.
+***************
+*** 422,427 ****
+--- 423,429 ----
+ {
+ return (readbuf1.bh_first.b_next == NULL);
+ }
++ #endif
+
+ /*
+ * Set a typeahead character that won't be flushed.
+*** ../vim-8.1.0784/src/gui_gtk_x11.c 2019-01-13 23:38:33.391773303 +0100
+--- src/gui_gtk_x11.c 2019-01-20 15:27:17.314620757 +0100
+***************
+*** 6737,6747 ****
+--- 6737,6749 ----
+ {
+ }
+
++ #if (defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)) || defined(PROTO)
+ int
+ clip_gtk_owner_exists(VimClipboard *cbd)
+ {
+ return gdk_selection_owner_get(cbd->gtk_sel_atom) != NULL;
+ }
++ #endif
+
+
+ #if defined(FEAT_MENU) || defined(PROTO)
+*** ../vim-8.1.0784/src/hashtab.c 2019-01-13 23:38:33.395773275 +0100
+--- src/hashtab.c 2019-01-20 15:27:17.314620757 +0100
+***************
+*** 81,86 ****
+--- 81,87 ----
+ vim_free(ht->ht_array);
+ }
+
++ #if defined(FEAT_SPELL) || defined(PROTO)
+ /*
+ * Free the array of a hash table and all the keys it contains. The keys must
+ * have been allocated. "off" is the offset from the start of the allocate
+***************
+*** 103,108 ****
+--- 104,110 ----
+ }
+ hash_clear(ht);
+ }
++ #endif
+
+ /*
+ * Find "key" in hashtable "ht". "key" must not be NULL.
+***************
+*** 178,183 ****
+--- 180,186 ----
+ }
+ }
+
++ #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL) || defined(PROTO)
+ /*
+ * Print the efficiency of hashtable lookups.
+ * Useful when trying different hash algorithms.
+***************
+*** 194,199 ****
+--- 197,203 ----
+ hash_count_perturb * 100 / hash_count_lookup);
+ #endif
+ }
++ #endif
+
+ /*
+ * Add item with key "key" to hashtable "ht".
+*** ../vim-8.1.0784/src/json.c 2019-01-17 17:13:25.920984090 +0100
+--- src/json.c 2019-01-20 15:27:17.314620757 +0100
+***************
+*** 54,59 ****
+--- 54,60 ----
+ return ga.ga_data;
+ }
+
++ #if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
+ /*
+ * Encode ["nr", "val"] into a JSON format string in allocated memory.
+ * "options" can contain JSON_JS, JSON_NO_NONE and JSON_NL.
+***************
+*** 83,88 ****
+--- 84,90 ----
+ list_unref(listtv.vval.v_list);
+ return ga.ga_data;
+ }
++ #endif
+
+ static void
+ write_string(garray_T *gap, char_u *str)
+***************
+*** 1082,1087 ****
+--- 1084,1090 ----
+ return OK;
+ }
+
++ #if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
+ /*
+ * Decode the JSON from "reader" and store the result in "res".
+ * "options" can be JSON_JS or zero;
+***************
+*** 1102,1107 ****
+--- 1105,1111 ----
+
+ return ret;
+ }
++ #endif
+
+ /*
+ * Decode the JSON from "reader" to find the end of the message.
+*** ../vim-8.1.0784/src/mbyte.c 2019-01-19 17:43:03.417449145 +0100
+--- src/mbyte.c 2019-01-20 15:27:17.314620757 +0100
+***************
+*** 844,849 ****
+--- 844,850 ----
+ return n;
+ }
+
++ #if defined(FEAT_QUICKFIX) || defined(PROTO)
+ /*
+ * Remove all BOM from "s" by moving remaining text.
+ */
+***************
+*** 863,868 ****
+--- 864,870 ----
+ }
+ }
+ }
++ #endif
+
+ /*
+ * Get class of pointer:
+*** ../vim-8.1.0784/src/message.c 2019-01-19 21:06:55.344138786 +0100
+--- src/message.c 2019-01-20 15:27:17.314620757 +0100
+***************
+*** 3507,3518 ****
+--- 3507,3520 ----
+ --no_wait_return;
+ }
+
++ #if defined(FEAT_EVAL) || defined(PROTO)
+ void
+ give_warning2(char_u *message, char_u *a1, int hl)
+ {
+ vim_snprintf((char *)IObuff, IOSIZE, (char *)message, a1);
+ give_warning(IObuff, hl);
+ }
++ #endif
+
+ /*
+ * Advance msg cursor to column "col".
+*** ../vim-8.1.0784/src/misc1.c 2019-01-19 17:43:03.421449119 +0100
+--- src/misc1.c 2019-01-20 15:27:17.314620757 +0100
+***************
+*** 4672,4677 ****
+--- 4672,4678 ----
+ return pend;
+ }
+
++ #if defined(FEAT_EVAL) || defined(PROTO)
+ void
+ vim_unsetenv(char_u *var)
+ {
+***************
+*** 4681,4686 ****
+--- 4682,4688 ----
+ vim_setenv(var, (char_u *)"");
+ #endif
+ }
++ #endif
+
+
+ /*
+*** ../vim-8.1.0784/src/misc2.c 2019-01-19 17:43:03.421449119 +0100
+--- src/misc2.c 2019-01-20 15:27:17.318620734 +0100
+***************
+*** 1033,1038 ****
+--- 1033,1039 ----
+ /*
+ * lalloc() with an ID for alloc_fail().
+ */
++ #if defined(FEAT_SIGNS) || defined(PROTO)
+ char_u *
+ lalloc_id(long_u size, int message, alloc_id_T id UNUSED)
+ {
+***************
+*** 1042,1047 ****
+--- 1043,1049 ----
+ #endif
+ return (lalloc((long_u)size, message));
+ }
++ #endif
+
+ #if defined(MEM_PROFILE) || defined(PROTO)
+ /*
+***************
+*** 2135,2140 ****
+--- 2137,2143 ----
+ return OK;
+ }
+
++ #if defined(FEAT_EVAL) || defined(FEAT_SEARCHPATH) || defined(PROTO)
+ /*
+ * For a growing array that contains a list of strings: concatenate all the
+ * strings with a separating "sep".
+***************
+*** 2170,2175 ****
+--- 2173,2179 ----
+ }
+ return s;
+ }
++ #endif
+
+ #if defined(FEAT_VIMINFO) || defined(FEAT_EVAL) || defined(PROTO)
+ /*
+*** ../vim-8.1.0784/src/ops.c 2019-01-19 17:43:03.421449119 +0100
+--- src/ops.c 2019-01-20 15:27:17.318620734 +0100
+***************
+*** 201,206 ****
+--- 201,207 ----
+ return opchars[op][2] & OPF_LINES;
+ }
+
++ #if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
+ /*
+ * Return TRUE if operator "op" changes text.
+ */
+***************
+*** 209,214 ****
+--- 210,216 ----
+ {
+ return opchars[op][2] & OPF_CHANGE;
+ }
++ #endif
+
+ /*
+ * Get first operator command character.
+***************
+*** 1050,1055 ****
+--- 1052,1059 ----
+ #endif
+ }
+
++ #if (defined(FEAT_CLIPBOARD) && defined(FEAT_X11) && defined(USE_SYSTEM)) \
++ || defined(PROTO)
+ void
+ free_register(void *reg)
+ {
+***************
+*** 1061,1066 ****
+--- 1065,1071 ----
+ vim_free(reg);
+ *y_current = tmp;
+ }
++ #endif
+
+ #if defined(FEAT_MOUSE) || defined(PROTO)
+ /*
+*** ../vim-8.1.0784/src/option.c 2019-01-19 17:43:03.421449119 +0100
+--- src/option.c 2019-01-20 15:27:17.318620734 +0100
+***************
+*** 10699,10704 ****
+--- 10699,10705 ----
+ #endif
+ }
+
++ #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) || defined(PROTO)
+ /*
+ * Unset local option value, similar to ":set opt<".
+ */
+***************
+*** 10800,10805 ****
+--- 10801,10807 ----
+ #endif
+ }
+ }
++ #endif
+
+ /*
+ * Get pointer to option variable, depending on local or global scope.
+***************
+*** 13122,13127 ****
+--- 13124,13130 ----
+ return TRUE;
+ }
+
++ #if defined(FEAT_BEVAL) || defined(PROTO)
+ /*
+ * Copy a tabstop array, allocating space for the new array.
+ */
+***************
+*** 13140,13145 ****
+--- 13143,13149 ----
+
+ return newts;
+ }
++ #endif
+
+ /*
+ * Return a count of the number of tabstops.
+*** ../vim-8.1.0784/src/os_unix.c 2019-01-19 17:43:03.425449092 +0100
+--- src/os_unix.c 2019-01-20 15:27:17.318620734 +0100
+***************
+*** 1016,1022 ****
+ * Returns OK for normal return, FAIL when the protected code caused a
+ * problem and LONGJMP() was used.
+ */
+! void
+ mch_startjmp(void)
+ {
+ #ifdef SIGHASARG
+--- 1016,1022 ----
+ * Returns OK for normal return, FAIL when the protected code caused a
+ * problem and LONGJMP() was used.
+ */
+! static void
+ mch_startjmp(void)
+ {
+ #ifdef SIGHASARG
+***************
+*** 1025,1037 ****
+ lc_active = TRUE;
+ }
+
+! void
+ mch_endjmp(void)
+ {
+ lc_active = FALSE;
+ }
+
+! void
+ mch_didjmp(void)
+ {
+ # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
+--- 1025,1037 ----
+ lc_active = TRUE;
+ }
+
+! static void
+ mch_endjmp(void)
+ {
+ lc_active = FALSE;
+ }
+
+! static void
+ mch_didjmp(void)
+ {
+ # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
+*** ../vim-8.1.0784/src/proto/os_unix.pro 2018-06-12 20:25:47.891923371 +0200
+--- src/proto/os_unix.pro 2019-01-20 15:27:17.318620734 +0100
+***************
+*** 7,15 ****
+ long_u mch_total_mem(int special);
+ void mch_delay(long msec, int ignoreinput);
+ int mch_stackcheck(char *p);
+- void mch_startjmp(void);
+- void mch_endjmp(void);
+- void mch_didjmp(void);
+ void mch_suspend(void);
+ void mch_init(void);
+ void reset_signals(void);
+--- 7,12 ----
+*** ../vim-8.1.0784/src/proto/regexp.pro 2018-12-29 22:28:42.750699129 +0100
+--- src/proto/regexp.pro 2019-01-20 15:27:17.318620734 +0100
+***************
+*** 1,6 ****
+ /* regexp.c */
+ int re_multiline(regprog_T *prog);
+- int re_lookbehind(regprog_T *prog);
+ char_u *skip_regexp(char_u *startp, int dirc, int magic, char_u **newp);
+ int vim_regcomp_had_eol(void);
+ void free_regexp_stuff(void);
+--- 1,5 ----
+*** ../vim-8.1.0784/src/proto/terminal.pro 2018-06-19 19:59:15.244704285 +0200
+--- src/proto/terminal.pro 2019-01-20 15:27:17.318620734 +0100
+***************
+*** 18,24 ****
+ int term_use_loop(void);
+ void term_win_entered(void);
+ int terminal_loop(int blocking);
+- void term_job_ended(job_T *job);
+ void term_channel_closed(channel_T *ch);
+ void term_check_channel_closed_recently(void);
+ int term_do_update_window(win_T *wp);
+--- 18,23 ----
+*** ../vim-8.1.0784/src/regexp.c 2019-01-19 17:43:03.425449092 +0100
+--- src/regexp.c 2019-01-20 15:27:17.318620734 +0100
+***************
+*** 734,749 ****
+ }
+
+ /*
+- * Return TRUE if compiled regular expression "prog" looks before the start
+- * position (pattern contains "\@<=" or "\@<!").
+- */
+- int
+- re_lookbehind(regprog_T *prog)
+- {
+- return (prog->regflags & RF_LOOKBH);
+- }
+-
+- /*
+ * Check for an equivalence class name "[=a=]". "pp" points to the '['.
+ * Returns a character representing the class. Zero means that no item was
+ * recognized. Otherwise "pp" is advanced to after the item.
+--- 734,739 ----
+***************
+*** 8206,8211 ****
+--- 8196,8203 ----
+ }
+ #endif
+
++ #if (defined(FEAT_X11) && (defined(FEAT_TITLE) || defined(FEAT_XCLIPBOARD))) \
++ || defined(PROTO)
+ /*
+ * Return whether "prog" is currently being executed.
+ */
+***************
+*** 8214,8219 ****
+--- 8206,8212 ----
+ {
+ return prog->re_in_use;
+ }
++ #endif
+
+ /*
+ * Match a regexp against a string.
+*** ../vim-8.1.0784/src/screen.c 2019-01-19 17:43:03.425449092 +0100
+--- src/screen.c 2019-01-20 15:27:17.318620734 +0100
+***************
+*** 263,268 ****
+--- 263,269 ----
+ }
+ }
+
++ #if defined(FEAT_SIGNS) || defined(PROTO)
+ void
+ redraw_buf_line_later(buf_T *buf, linenr_T lnum)
+ {
+***************
+*** 273,279 ****
+--- 274,282 ----
+ && lnum < wp->w_botline)
+ redrawWinline(wp, lnum);
+ }
++ #endif
+
++ #if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
+ void
+ redraw_buf_and_status_later(buf_T *buf, int type)
+ {
+***************
+*** 294,300 ****
+--- 297,305 ----
+ }
+ }
+ }
++ #endif
+
++ #if defined(FEAT_TERMRESPONSE) || defined(PROTO)
+ /*
+ * Redraw as soon as possible. When the command line is not scrolled redraw
+ * right away and restore what was on the command line.
+***************
+*** 439,444 ****
+--- 444,450 ----
+
+ return ret;
+ }
++ #endif
+
+ /*
+ * Invoked after an asynchronous callback is called.
+***************
+*** 929,935 ****
+ }
+ #endif
+
+! #if defined(FEAT_SIGNS) || defined(PROTO)
+ void
+ update_debug_sign(buf_T *buf, linenr_T lnum)
+ {
+--- 935,941 ----
+ }
+ #endif
+
+! #if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
+ void
+ update_debug_sign(buf_T *buf, linenr_T lnum)
+ {
+***************
+*** 11294,11299 ****
+--- 11300,11306 ----
+ }
+ #endif
+
++ #if defined(FEAT_EVAL) || defined(PROTO)
+ /*
+ * Return the current cursor column. This is the actual position on the
+ * screen. First column is 0.
+***************
+*** 11313,11315 ****
+--- 11320,11323 ----
+ {
+ return screen_cur_row;
+ }
++ #endif
+*** ../vim-8.1.0784/src/search.c 2019-01-19 17:43:03.425449092 +0100
+--- src/search.c 2019-01-20 15:27:17.322620707 +0100
+***************
+*** 476,481 ****
+--- 476,482 ----
+ return FALSE;
+ }
+
++ #if defined(FEAT_EVAL) || defined(PROTO)
+ char_u *
+ last_csearch(void)
+ {
+***************
+*** 510,515 ****
+--- 511,517 ----
+ vim_memset(lastc_bytes, 0, sizeof(lastc_bytes));
+ #endif
+ }
++ #endif
+
+ void
+ set_csearch_direction(int cdir)
+*** ../vim-8.1.0784/src/syntax.c 2019-01-19 17:43:03.429449066 +0100
+--- src/syntax.c 2019-01-20 15:27:17.322620707 +0100
+***************
+*** 8887,8892 ****
+--- 8887,8893 ----
+ return (table->ga_len - 1 + ATTR_OFF);
+ }
+
++ #if defined(FEAT_TERMINAL) || defined(PROTO)
+ /*
+ * Get an attribute index for a cterm entry.
+ * Uses an existing entry when possible or adds one when needed.
+***************
+*** 8906,8913 ****
+ at_en.ae_u.cterm.bg_color = bg;
+ return get_attr_entry(&cterm_attr_table, &at_en);
+ }
+
+! #if defined(FEAT_TERMGUICOLORS) || defined(PROTO)
+ /*
+ * Get an attribute index for a 'termguicolors' entry.
+ * Uses an existing entry when possible or adds one when needed.
+--- 8907,8915 ----
+ at_en.ae_u.cterm.bg_color = bg;
+ return get_attr_entry(&cterm_attr_table, &at_en);
+ }
++ #endif
+
+! #if (defined(FEAT_TERMINAL) && defined(FEAT_TERMGUICOLORS)) || defined(PROTO)
+ /*
+ * Get an attribute index for a 'termguicolors' entry.
+ * Uses an existing entry when possible or adds one when needed.
+***************
+*** 8935,8941 ****
+ }
+ #endif
+
+! #if defined(FEAT_GUI) || defined(PROTO)
+ /*
+ * Get an attribute index for a cterm entry.
+ * Uses an existing entry when possible or adds one when needed.
+--- 8937,8943 ----
+ }
+ #endif
+
+! #if (defined(FEAT_TERMINAL) && defined(FEAT_GUI)) || defined(PROTO)
+ /*
+ * Get an attribute index for a cterm entry.
+ * Uses an existing entry when possible or adds one when needed.
+*** ../vim-8.1.0784/src/term.c 2019-01-19 17:43:03.429449066 +0100
+--- src/term.c 2019-01-20 15:27:17.322620707 +0100
+***************
+*** 2838,2843 ****
+--- 2838,2844 ----
+ static int winpos_y = -1;
+ static int did_request_winpos = 0;
+
++ # if (defined(FEAT_EVAL) && defined(HAVE_TGETENT)) || defined(PROTO)
+ /*
+ * Try getting the Vim window position from the terminal.
+ * Returns OK or FAIL.
+***************
+*** 2885,2890 ****
+--- 2886,2892 ----
+
+ return FALSE;
+ }
++ # endif
+ # endif
+
+ void
+*** ../vim-8.1.0784/src/terminal.c 2019-01-17 13:04:05.761227512 +0100
+--- src/terminal.c 2019-01-20 15:27:17.322620707 +0100
+***************
+*** 2307,2341 ****
+ return ret;
+ }
+
+- /*
+- * Called when a job has finished.
+- * This updates the title and status, but does not close the vterm, because
+- * there might still be pending output in the channel.
+- */
+- void
+- term_job_ended(job_T *job)
+- {
+- term_T *term;
+- int did_one = FALSE;
+-
+- for (term = first_term; term != NULL; term = term->tl_next)
+- if (term->tl_job == job)
+- {
+- VIM_CLEAR(term->tl_title);
+- VIM_CLEAR(term->tl_status_text);
+- redraw_buf_and_status_later(term->tl_buffer, VALID);
+- did_one = TRUE;
+- }
+- if (did_one)
+- redraw_statuslines();
+- if (curbuf->b_term != NULL)
+- {
+- if (curbuf->b_term->tl_job == job)
+- maketitle();
+- update_cursor(curbuf->b_term, TRUE);
+- }
+- }
+-
+ static void
+ may_toggle_cursor(term_T *term)
+ {
+--- 2307,2312 ----
+***************
+*** 3072,3078 ****
+
+ p_more = FALSE;
+ msg_row = Rows - 1;
+! msg_puts((char_u *)"\n");
+ p_more = save_p_more;
+ --term->tl_toprow;
+ }
+--- 3043,3049 ----
+
+ p_more = FALSE;
+ msg_row = Rows - 1;
+! msg_puts("\n");
+ p_more = save_p_more;
+ --term->tl_toprow;
+ }
+***************
+*** 5408,5418 ****
+--- 5379,5391 ----
+ }
+ }
+
++ #if defined(FEAT_GUI) || defined(PROTO)
+ job_T *
+ term_getjob(term_T *term)
+ {
+ return term != NULL ? term->tl_job : NULL;
+ }
++ #endif
+
+ # if defined(WIN3264) || defined(PROTO)
+
+*** ../vim-8.1.0784/src/ui.c 2019-01-19 17:43:03.425449092 +0100
+--- src/ui.c 2019-01-20 15:27:17.322620707 +0100
+***************
+*** 1589,1594 ****
+--- 1589,1595 ----
+ #endif
+ }
+
++ #if (defined(FEAT_X11) && defined(USE_SYSTEM)) || defined(PROTO)
+ int
+ clip_gen_owner_exists(VimClipboard *cbd UNUSED)
+ {
+***************
+*** 1603,1608 ****
+--- 1604,1610 ----
+ return TRUE;
+ #endif
+ }
++ #endif
+
+ #endif /* FEAT_CLIPBOARD */
+
+***************
+*** 2574,2585 ****
+--- 2576,2590 ----
+ {
+ }
+
++ #if (defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)) \
++ || defined(PROTO)
+ int
+ clip_x11_owner_exists(VimClipboard *cbd)
+ {
+ return XGetSelectionOwner(X_DISPLAY, cbd->sel_atom) != None;
+ }
+ #endif
++ #endif
+
+ #if defined(FEAT_XCLIPBOARD) || defined(FEAT_GUI_X11) \
+ || defined(FEAT_GUI_GTK) || defined(PROTO)
+*** ../vim-8.1.0784/src/userfunc.c 2019-01-19 17:43:03.429449066 +0100
+--- src/userfunc.c 2019-01-20 15:27:17.322620707 +0100
+***************
+*** 2560,2565 ****
+--- 2560,2566 ----
+ return n;
+ }
+
++ #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) || defined(PROTO)
+ char_u *
+ get_expanded_name(char_u *name, int check)
+ {
+***************
+*** 2575,2580 ****
+--- 2576,2582 ----
+ vim_free(p);
+ return NULL;
+ }
++ #endif
+
+ #if defined(FEAT_PROFILE) || defined(PROTO)
+ /*
+*** ../vim-8.1.0784/src/version.c 2019-01-19 21:12:21.561634437 +0100
+--- src/version.c 2019-01-20 15:28:47.598036085 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 785,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+269. You wonder how you can make your dustbin produce Sesame Street's
+ Oscar's the Garbage Monster song when you empty 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.0786 b/data/vim/patches/8.1.0786
new file mode 100644
index 000000000..4d756e7ee
--- /dev/null
+++ b/data/vim/patches/8.1.0786
@@ -0,0 +1,133 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0786
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0786
+Problem: ml_get error when updating the status line and a terminal had its
+ scrollback cleared. (Chris Patuzzo)
+Solution: Check the cursor position when drawing the status line.
+ (closes #3830)
+Files: src/buffer.c, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0785/src/buffer.c 2019-01-20 15:30:36.881328770 +0100
+--- src/buffer.c 2019-01-20 18:21:30.211582673 +0100
+***************
+*** 3869,3874 ****
+--- 3869,3876 ----
+ struct stl_hlrec *hltab, /* return: HL attributes (can be NULL) */
+ struct stl_hlrec *tabtab) /* return: tab page nrs (can be NULL) */
+ {
++ linenr_T lnum;
++ size_t len;
+ char_u *p;
+ char_u *s;
+ char_u *t;
+***************
+*** 3943,3957 ****
+ fillchar = '-';
+ #endif
+
+! /* Get line & check if empty (cursorpos will show "0-1"). Note that
+! * p will become invalid when getting another buffer line. */
+! p = ml_get_buf(wp->w_buffer, wp->w_cursor.lnum, FALSE);
+ empty_line = (*p == NUL);
+
+! /* Get the byte value now, in case we need it below. This is more
+! * efficient than making a copy of the line. */
+! if (wp->w_cursor.col > (colnr_T)STRLEN(p))
+ byteval = 0;
+ else
+ #ifdef FEAT_MBYTE
+ byteval = (*mb_ptr2char)(p + wp->w_cursor.col);
+--- 3945,3977 ----
+ fillchar = '-';
+ #endif
+
+! // The cursor in windows other than the current one isn't always
+! // up-to-date, esp. because of autocommands and timers.
+! lnum = wp->w_cursor.lnum;
+! if (lnum > wp->w_buffer->b_ml.ml_line_count)
+! {
+! lnum = wp->w_buffer->b_ml.ml_line_count;
+! wp->w_cursor.lnum = lnum;
+! }
+!
+! // Get line & check if empty (cursorpos will show "0-1"). Note that
+! // p will become invalid when getting another buffer line.
+! p = ml_get_buf(wp->w_buffer, lnum, FALSE);
+ empty_line = (*p == NUL);
+
+! // Get the byte value now, in case we need it below. This is more efficient
+! // than making a copy of the line.
+! len = STRLEN(p);
+! if (wp->w_cursor.col > (colnr_T)len)
+! {
+! // Line may have changed since checking the cursor column, or the lnum
+! // was adjusted above.
+! wp->w_cursor.col = (colnr_T)len;
+! #ifdef FEAT_VIRTUALEDIT
+! wp->w_cursor.coladd = 0;
+! #endif
+ byteval = 0;
++ }
+ else
+ #ifdef FEAT_MBYTE
+ byteval = (*mb_ptr2char)(p + wp->w_cursor.col);
+*** ../vim-8.1.0785/src/testdir/test_terminal.vim 2019-01-19 18:20:41.918390095 +0100
+--- src/testdir/test_terminal.vim 2019-01-20 18:21:24.023624845 +0100
+***************
+*** 1719,1721 ****
+--- 1719,1746 ----
+
+ exe term . 'bwipe!'
+ endfunc
++
++ " When drawing the statusline the cursor position may not have been updated
++ " yet.
++ " 1. create a terminal, make it show 2 lines
++ " 2. 0.5 sec later: leave terminal window, execute "i"
++ " 3. 0.5 sec later: clear terminal window, now it's 1 line
++ " 4. 0.5 sec later: redraw, including statusline (used to trigger bug)
++ " 4. 0.5 sec later: should be done, clean up
++ func Test_terminal_statusline()
++ if !has('unix')
++ return
++ endif
++ set statusline=x
++ terminal
++ let tbuf = bufnr('')
++ call term_sendkeys(tbuf, "clear; echo a; echo b; sleep 1; clear\n")
++ call timer_start(500, { tid -> feedkeys("\<C-w>j", 'tx') })
++ call timer_start(1500, { tid -> feedkeys("\<C-l>", 'tx') })
++ au BufLeave * if &buftype == 'terminal' | silent! normal i | endif
++
++ sleep 2
++ exe tbuf . 'bwipe!'
++ au! BufLeave
++ set statusline=
++ endfunc
+*** ../vim-8.1.0785/src/version.c 2019-01-20 15:30:36.897328669 +0100
+--- src/version.c 2019-01-20 17:47:47.781180067 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 786,
+ /**/
+
+--
+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.0787 b/data/vim/patches/8.1.0787
new file mode 100644
index 000000000..ff0ec63ea
--- /dev/null
+++ b/data/vim/patches/8.1.0787
@@ -0,0 +1,140 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0787
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0787
+Problem: Compiler warning for unused function. (Tony Mechelynck)
+Solution: Tune #ifdef around setjmp functions.
+Files: src/os_unix.c
+
+
+*** ../vim-8.1.0786/src/os_unix.c 2019-01-20 15:30:36.893328693 +0100
+--- src/os_unix.c 2019-01-20 18:36:56.137592218 +0100
+***************
+*** 980,986 ****
+ }
+ #endif
+
+! #if defined(HAVE_SETJMP_H) || defined(PROTO)
+ // argument to SETJMP()
+ static JMP_BUF lc_jump_env;
+
+--- 980,990 ----
+ }
+ #endif
+
+! #if (defined(HAVE_SETJMP_H) \
+! && ((defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)) \
+! || defined(FEAT_LIBCALL))) \
+! || defined(PROTO)
+!
+ // argument to SETJMP()
+ static JMP_BUF lc_jump_env;
+
+***************
+*** 7490,7498 ****
+ if (app_context != NULL && xterm_Shell == (Widget)0)
+ {
+ int (*oldhandler)();
+! #if defined(HAVE_SETJMP_H)
+ int (*oldIOhandler)();
+! #endif
+ # ifdef ELAPSED_FUNC
+ elapsed_T start_tv;
+
+--- 7494,7502 ----
+ if (app_context != NULL && xterm_Shell == (Widget)0)
+ {
+ int (*oldhandler)();
+! # if defined(HAVE_SETJMP_H)
+ int (*oldIOhandler)();
+! # endif
+ # ifdef ELAPSED_FUNC
+ elapsed_T start_tv;
+
+***************
+*** 7503,7509 ****
+ /* Ignore X errors while opening the display */
+ oldhandler = XSetErrorHandler(x_error_check);
+
+! #if defined(HAVE_SETJMP_H)
+ /* Ignore X IO errors while opening the display */
+ oldIOhandler = XSetIOErrorHandler(x_IOerror_check);
+ mch_startjmp();
+--- 7507,7513 ----
+ /* Ignore X errors while opening the display */
+ oldhandler = XSetErrorHandler(x_error_check);
+
+! # if defined(HAVE_SETJMP_H)
+ /* Ignore X IO errors while opening the display */
+ oldIOhandler = XSetIOErrorHandler(x_IOerror_check);
+ mch_startjmp();
+***************
+*** 7513,7533 ****
+ xterm_dpy = NULL;
+ }
+ else
+! #endif
+ {
+ xterm_dpy = XtOpenDisplay(app_context, xterm_display,
+ "vim_xterm", "Vim_xterm", NULL, 0, &z, &strp);
+ if (xterm_dpy != NULL)
+ xterm_dpy_retry_count = 0;
+! #if defined(HAVE_SETJMP_H)
+ mch_endjmp();
+! #endif
+ }
+
+! #if defined(HAVE_SETJMP_H)
+ /* Now handle X IO errors normally. */
+ (void)XSetIOErrorHandler(oldIOhandler);
+! #endif
+ /* Now handle X errors normally. */
+ (void)XSetErrorHandler(oldhandler);
+
+--- 7517,7537 ----
+ xterm_dpy = NULL;
+ }
+ else
+! # endif
+ {
+ xterm_dpy = XtOpenDisplay(app_context, xterm_display,
+ "vim_xterm", "Vim_xterm", NULL, 0, &z, &strp);
+ if (xterm_dpy != NULL)
+ xterm_dpy_retry_count = 0;
+! # if defined(HAVE_SETJMP_H)
+ mch_endjmp();
+! # endif
+ }
+
+! # if defined(HAVE_SETJMP_H)
+ /* Now handle X IO errors normally. */
+ (void)XSetIOErrorHandler(oldIOhandler);
+! # endif
+ /* Now handle X errors normally. */
+ (void)XSetErrorHandler(oldhandler);
+
+*** ../vim-8.1.0786/src/version.c 2019-01-20 18:25:50.313911236 +0100
+--- src/version.c 2019-01-20 18:37:56.629192312 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 787,
+ /**/
+
+--
+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.0788 b/data/vim/patches/8.1.0788
new file mode 100644
index 000000000..a969b20e4
--- /dev/null
+++ b/data/vim/patches/8.1.0788
@@ -0,0 +1,229 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0788
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0788
+Problem: Cannot build with tiny features.
+Solution: Adjust #ifdefs.
+Files: src/os_unix.c
+
+
+*** ../vim-8.1.0787/src/os_unix.c 2019-01-20 18:39:26.572596405 +0100
+--- src/os_unix.c 2019-01-20 23:42:11.639598189 +0100
+***************
+*** 984,989 ****
+--- 984,990 ----
+ && ((defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)) \
+ || defined(FEAT_LIBCALL))) \
+ || defined(PROTO)
++ # define USING_SETJMP 1
+
+ // argument to SETJMP()
+ static JMP_BUF lc_jump_env;
+***************
+*** 1023,1031 ****
+ static void
+ mch_startjmp(void)
+ {
+! #ifdef SIGHASARG
+ lc_signal = 0;
+! #endif
+ lc_active = TRUE;
+ }
+
+--- 1024,1032 ----
+ static void
+ mch_startjmp(void)
+ {
+! # ifdef SIGHASARG
+ lc_signal = 0;
+! # endif
+ lc_active = TRUE;
+ }
+
+***************
+*** 1063,1069 ****
+ int i;
+ #endif
+
+! #if defined(HAVE_SETJMP_H)
+ /*
+ * Catch a crash in protected code.
+ * Restores the environment saved in lc_jump_env, which looks like
+--- 1064,1070 ----
+ int i;
+ #endif
+
+! #if defined(USING_SETJMP)
+ /*
+ * Catch a crash in protected code.
+ * Restores the environment saved in lc_jump_env, which looks like
+***************
+*** 1708,1714 ****
+ }
+
+ #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
+! # if defined(HAVE_SETJMP_H)
+ /*
+ * An X IO Error handler, used to catch error while opening the display.
+ */
+--- 1709,1715 ----
+ }
+
+ #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
+! # if defined(USING_SETJMP)
+ /*
+ * An X IO Error handler, used to catch error while opening the display.
+ */
+***************
+*** 2100,2106 ****
+ return retval;
+ }
+
+! /* Xutf8 functions are not avaialble on older systems. Note that on some
+ * systems X_HAVE_UTF8_STRING may be defined in a header file but
+ * Xutf8SetWMProperties() is not in the X11 library. Configure checks for
+ * that and defines HAVE_XUTF8SETWMPROPERTIES. */
+--- 2101,2107 ----
+ return retval;
+ }
+
+! /* Xutf8 functions are not available on older systems. Note that on some
+ * systems X_HAVE_UTF8_STRING may be defined in a header file but
+ * Xutf8SetWMProperties() is not in the X11 library. Configure checks for
+ * that and defines HAVE_XUTF8SETWMPROPERTIES. */
+***************
+*** 2953,2959 ****
+ case ENOTSUP:
+ /* extended attributes aren't supported or enabled */
+ /* should a message be echoed? not sure... */
+! return; /* leave because it isn't usefull to continue */
+
+ case ERANGE:
+ default:
+--- 2954,2960 ----
+ case ENOTSUP:
+ /* extended attributes aren't supported or enabled */
+ /* should a message be echoed? not sure... */
+! return; /* leave because it isn't useful to continue */
+
+ case ERANGE:
+ default:
+***************
+*** 7360,7366 ****
+ /* If the handle is valid, try to get the function address. */
+ if (hinstLib != NULL)
+ {
+! # ifdef HAVE_SETJMP_H
+ /*
+ * Catch a crash when calling the library function. For example when
+ * using a number where a string pointer is expected.
+--- 7361,7367 ----
+ /* If the handle is valid, try to get the function address. */
+ if (hinstLib != NULL)
+ {
+! # ifdef USING_SETJMP
+ /*
+ * Catch a crash when calling the library function. For example when
+ * using a number where a string pointer is expected.
+***************
+*** 7435,7441 ****
+ *string_result = vim_strsave(retval_str);
+ }
+
+! # ifdef HAVE_SETJMP_H
+ mch_endjmp();
+ # ifdef SIGHASARG
+ if (lc_signal != 0)
+--- 7436,7442 ----
+ *string_result = vim_strsave(retval_str);
+ }
+
+! # ifdef USING_SETJMP
+ mch_endjmp();
+ # ifdef SIGHASARG
+ if (lc_signal != 0)
+***************
+*** 7494,7500 ****
+ if (app_context != NULL && xterm_Shell == (Widget)0)
+ {
+ int (*oldhandler)();
+! # if defined(HAVE_SETJMP_H)
+ int (*oldIOhandler)();
+ # endif
+ # ifdef ELAPSED_FUNC
+--- 7495,7501 ----
+ if (app_context != NULL && xterm_Shell == (Widget)0)
+ {
+ int (*oldhandler)();
+! # if defined(USING_SETJMP)
+ int (*oldIOhandler)();
+ # endif
+ # ifdef ELAPSED_FUNC
+***************
+*** 7507,7513 ****
+ /* Ignore X errors while opening the display */
+ oldhandler = XSetErrorHandler(x_error_check);
+
+! # if defined(HAVE_SETJMP_H)
+ /* Ignore X IO errors while opening the display */
+ oldIOhandler = XSetIOErrorHandler(x_IOerror_check);
+ mch_startjmp();
+--- 7508,7514 ----
+ /* Ignore X errors while opening the display */
+ oldhandler = XSetErrorHandler(x_error_check);
+
+! # if defined(USING_SETJMP)
+ /* Ignore X IO errors while opening the display */
+ oldIOhandler = XSetIOErrorHandler(x_IOerror_check);
+ mch_startjmp();
+***************
+*** 7523,7534 ****
+ "vim_xterm", "Vim_xterm", NULL, 0, &z, &strp);
+ if (xterm_dpy != NULL)
+ xterm_dpy_retry_count = 0;
+! # if defined(HAVE_SETJMP_H)
+ mch_endjmp();
+ # endif
+ }
+
+! # if defined(HAVE_SETJMP_H)
+ /* Now handle X IO errors normally. */
+ (void)XSetIOErrorHandler(oldIOhandler);
+ # endif
+--- 7524,7535 ----
+ "vim_xterm", "Vim_xterm", NULL, 0, &z, &strp);
+ if (xterm_dpy != NULL)
+ xterm_dpy_retry_count = 0;
+! # if defined(USING_SETJMP)
+ mch_endjmp();
+ # endif
+ }
+
+! # if defined(USING_SETJMP)
+ /* Now handle X IO errors normally. */
+ (void)XSetIOErrorHandler(oldIOhandler);
+ # endif
+*** ../vim-8.1.0787/src/version.c 2019-01-20 18:39:26.572596405 +0100
+--- src/version.c 2019-01-20 23:40:34.340321522 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 788,
+ /**/
+
+--
+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.0789 b/data/vim/patches/8.1.0789
new file mode 100644
index 000000000..f98b1d496
--- /dev/null
+++ b/data/vim/patches/8.1.0789
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.07
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0789
+Problem: Sourcing a session sets v:errmsg.
+Solution: Use "%argdel" instead of "argdel *". (Jason Franklin)
+Files: src/ex_docmd.c, src/testdir/test_mksession.vim
+
+
+*** ../vim-8.1.0788/src/ex_docmd.c 2019-01-20 15:30:36.881328770 +0100
+--- src/ex_docmd.c 2019-01-21 23:00:28.824309250 +0100
+***************
+*** 12007,12013 ****
+
+ if (fputs(cmd, fd) < 0 || put_eol(fd) == FAIL)
+ return FAIL;
+! if (put_line(fd, "silent! argdel *") == FAIL)
+ return FAIL;
+ for (i = 0; i < gap->ga_len; ++i)
+ {
+--- 12007,12013 ----
+
+ if (fputs(cmd, fd) < 0 || put_eol(fd) == FAIL)
+ return FAIL;
+! if (put_line(fd, "%argdel") == FAIL)
+ return FAIL;
+ for (i = 0; i < gap->ga_len; ++i)
+ {
+*** ../vim-8.1.0788/src/testdir/test_mksession.vim 2019-01-12 16:29:26.327986331 +0100
+--- src/testdir/test_mksession.vim 2019-01-21 22:58:26.369496042 +0100
+***************
+*** 415,418 ****
+--- 415,430 ----
+ %bwipe
+ endfunc
+
++ " A clean session (one empty buffer, one window, and one tab) should not
++ " set any error messages when sourced because no commands should fail.
++ func Test_mksession_no_errmsg()
++ let v:errmsg = ''
++ %bwipe!
++ mksession! Xtest_mks.out
++ source Xtest_mks.out
++ call assert_equal('', v:errmsg)
++ call delete('Xtest_mks.out')
++ endfunc
++
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.0788/src/version.c 2019-01-20 23:43:54.314830624 +0100
+--- src/version.c 2019-01-21 22:59:43.068749672 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 789,
+ /**/
+
+--
+MAN: Fetchez la vache!
+GUARD: Quoi?
+MAN: Fetchez la vache!
+ "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.0790 b/data/vim/patches/8.1.0790
new file mode 100644
index 000000000..aa22dade4
--- /dev/null
+++ b/data/vim/patches/8.1.0790
@@ -0,0 +1,77 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0790
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0790
+Problem: Code for creating tabpages in session is too complex.
+Solution: Simplify the code. (Jason Franklin)
+Files: src/ex_docmd.c
+
+
+*** ../vim-8.1.0789/src/ex_docmd.c 2019-01-21 23:03:45.718447626 +0100
+--- src/ex_docmd.c 2019-01-22 21:23:27.735578930 +0100
+***************
+*** 11401,11426 ****
+ tab_topframe = topframe;
+ if ((ssop_flags & SSOP_TABPAGES))
+ {
+! int num_tabs;
+
+! /*
+! * Similar to ses_win_rec() below, populate the tab pages first so
+! * later local options won't be copied to the new tabs.
+! */
+! for (tabnr = 1; ; ++tabnr)
+! {
+! tabpage_T *tp = find_tabpage(tabnr);
+!
+! if (tp == NULL) /* done all tab pages */
+! break;
+!
+! if (tabnr > 1 && put_line(fd, "tabnew") == FAIL)
+ return FAIL;
+! }
+!
+! num_tabs = tabnr - 1;
+! if (num_tabs > 1 && (fprintf(fd, "tabnext -%d", num_tabs - 1) < 0
+! || put_eol(fd) == FAIL))
+ return FAIL;
+ }
+ for (tabnr = 1; ; ++tabnr)
+--- 11401,11414 ----
+ tab_topframe = topframe;
+ if ((ssop_flags & SSOP_TABPAGES))
+ {
+! tabpage_T *tp;
+
+! // Similar to ses_win_rec() below, populate the tab pages first so
+! // later local options won't be copied to the new tabs.
+! FOR_ALL_TABPAGES(tp)
+! if (tp->tp_next != NULL && put_line(fd, "tabnew") == FAIL)
+ return FAIL;
+! if (first_tabpage->tp_next != NULL && put_line(fd, "tabrewind") == FAIL)
+ return FAIL;
+ }
+ for (tabnr = 1; ; ++tabnr)
+*** ../vim-8.1.0789/src/version.c 2019-01-21 23:03:45.718447626 +0100
+--- src/version.c 2019-01-22 21:25:49.030606634 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 790,
+ /**/
+
+--
+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.0791 b/data/vim/patches/8.1.0791
new file mode 100644
index 000000000..c9dc0a217
--- /dev/null
+++ b/data/vim/patches/8.1.0791
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0791
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0791
+Problem: A few compiler warnings on VMS.
+Solution: Remove type cast. Adjust #ifdef. (Zoltan Arpadffy)
+Files: src/os_unix.c, src/proto.h
+
+
+*** ../vim-8.1.0790/src/os_unix.c 2019-01-20 23:43:54.314830624 +0100
+--- src/os_unix.c 2019-01-22 21:34:32.826950388 +0100
+***************
+*** 1935,1941 ****
+ alarm(0);
+ signal(SIGALRM, (RETSIGTYPE (*)())sig_save);
+ if (p_verbose > 0 && sig_alarm_called)
+! verb_msg((char_u *)_("Opening the X display timed out"));
+ #endif
+ if (x11_display != NULL)
+ {
+--- 1935,1941 ----
+ alarm(0);
+ signal(SIGALRM, (RETSIGTYPE (*)())sig_save);
+ if (p_verbose > 0 && sig_alarm_called)
+! verb_msg(_("Opening the X display timed out"));
+ #endif
+ if (x11_display != NULL)
+ {
+*** ../vim-8.1.0790/src/proto.h 2019-01-17 15:43:21.765878343 +0100
+--- src/proto.h 2019-01-22 21:35:47.226426974 +0100
+***************
+*** 256,262 ****
+ # endif
+
+ # if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)
+! # if defined(UNIX) || defined(MACOS_X)
+ # include "pty.pro"
+ # endif
+ # endif
+--- 256,262 ----
+ # endif
+
+ # if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)
+! # if defined(UNIX) || defined(MACOS_X) || defined(VMS)
+ # include "pty.pro"
+ # endif
+ # endif
+*** ../vim-8.1.0790/src/version.c 2019-01-22 21:27:08.890053701 +0100
+--- src/version.c 2019-01-22 21:45:29.605732377 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 791,
+ /**/
+
+--
+The greatest lies of all time:
+ (1) The check is in the mail.
+ (2) We have a really challenging assignment for you.
+ (3) I love you.
+ (4) All bugs have been fixed.
+ (5) This won't hurt a bit.
+ (6) Honey, I just need to debug this program and be home in 5 minutes.
+ (7) I have just sent you an e-mail about that.
+ (8) Of course I'll respect you in the morning.
+ (9) I'm from the government, and I'm here to help 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.0792 b/data/vim/patches/8.1.0792
new file mode 100644
index 000000000..3c04fd126
--- /dev/null
+++ b/data/vim/patches/8.1.0792
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0792
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0792
+Problem: Popup menu is displayed on top of the cmdline window if it is
+ opened from Insert completion. (Bjorn Linse)
+Solution: Remove the popup menu. Restore the cursor position.
+ (closes #3838)
+Files: src/edit.c, src/ex_getln.c
+
+
+*** ../vim-8.1.0791/src/edit.c 2019-01-19 17:43:03.401449251 +0100
+--- src/edit.c 2019-01-22 22:04:03.005446245 +0100
+***************
+*** 8537,8542 ****
+--- 8537,8543 ----
+ ++no_u_sync;
+ if (regname == '=')
+ {
++ pos_T curpos = curwin->w_cursor;
+ # ifdef HAVE_INPUT_METHOD
+ int im_on = im_get_status();
+ # endif
+***************
+*** 8545,8552 ****
+ u_sync_once = 2;
+
+ regname = get_expr_register();
+ # ifdef HAVE_INPUT_METHOD
+! /* Restore the Input Method. */
+ if (im_on)
+ im_set_active(TRUE);
+ # endif
+--- 8546,8557 ----
+ u_sync_once = 2;
+
+ regname = get_expr_register();
++
++ // Cursor may be moved back a column.
++ curwin->w_cursor = curpos;
++ check_cursor();
+ # ifdef HAVE_INPUT_METHOD
+! // Restore the Input Method.
+ if (im_on)
+ im_set_active(TRUE);
+ # endif
+*** ../vim-8.1.0791/src/ex_getln.c 2019-01-19 17:43:03.409449198 +0100
+--- src/ex_getln.c 2019-01-22 21:52:42.526460299 +0100
+***************
+*** 7268,7273 ****
+--- 7268,7277 ----
+ /* Don't execute autocommands while creating the window. */
+ block_autocmds();
+
++ // When using completion in Insert mode with <C-R>=<C-F> one can open the
++ // command line window, but we don't want the popup menu then.
++ pum_undisplay();
++
+ /* don't use a new tab page */
+ cmdmod.tab = 0;
+ cmdmod.noswapfile = 1;
+*** ../vim-8.1.0791/src/version.c 2019-01-22 21:45:36.553678901 +0100
+--- src/version.c 2019-01-22 22:07:18.600017151 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 792,
+ /**/
+
+--
+FIRST HEAD: Oh! quick! get the sword out I want to cut his head off.
+THIRD HEAD: Oh, cut your own head off.
+SECOND HEAD: Yes - do us all a favour.
+ "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.0793 b/data/vim/patches/8.1.0793
new file mode 100644
index 000000000..a8ec42ee5
--- /dev/null
+++ b/data/vim/patches/8.1.0793
@@ -0,0 +1,417 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0793
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0793
+Problem: Incorrect error messages for functions that now take a Blob
+ argument.
+Solution: Adjust the error messages. (Dominique Pelle, closes #3846)
+Files: runtime/doc/eval.txt, src/evalfunc.c, src/globals.h,
+ src/testdir/test_blob.vim, src/testdir/test_listdict.vim
+
+
+*** ../vim-8.1.0792/runtime/doc/eval.txt 2019-01-15 22:51:35.820099991 +0100
+--- runtime/doc/eval.txt 2019-01-22 22:13:51.087503416 +0100
+***************
+*** 38,44 ****
+ 1. Variables *variables*
+
+ 1.1 Variable types ~
+! *E712*
+ There are nine types of variables:
+
+ Number A 32 or 64 bit signed number. |expr-number| *Number*
+--- 38,44 ----
+ 1. Variables *variables*
+
+ 1.1 Variable types ~
+! *E712* *E896* *E897* *E898*
+ There are nine types of variables:
+
+ Number A 32 or 64 bit signed number. |expr-number| *Number*
+***************
+*** 131,138 ****
+
+ *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910* *E913*
+ *E974* *E975* *E976*
+! List, Dictionary, Funcref, Job, Channel and Blob types are not automatically
+! converted.
+
+ *E805* *E806* *E808*
+ When mixing Number and Float the Number is converted to Float. Otherwise
+--- 131,138 ----
+
+ *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910* *E913*
+ *E974* *E975* *E976*
+! |List|, |Dictionary|, |Funcref|, |Job|, |Channel| and |Blob| types are not
+! automatically converted.
+
+ *E805* *E806* *E808*
+ When mixing Number and Float the Number is converted to Float. Otherwise
+***************
+*** 633,638 ****
+--- 633,641 ----
+
+ A Blob can be created with a |blob-literal|: >
+ :let b = 0zFF00ED015DAF
++ Dots can be inserted between bytes (pair of hex characters) for readability,
++ they don't change the value: >
++ :let b = 0zFF00.ED01.5DAF
+
+ A blob can be read from a file with |readfile()| passing the {type} argument
+ set to "B", for example: >
+***************
+*** 673,678 ****
+--- 676,682 ----
+ A part of the Blob can be obtained by specifying the first and last index,
+ separated by a colon in square brackets: >
+ :let myblob = 0z00112233
++ :let shortblob = myblob[1:2] " get 0z1122
+ :let shortblob = myblob[2:-1] " get 0z2233
+
+ Omitting the first index is similar to zero. Omitting the last index is
+***************
+*** 681,687 ****
+ :let shortblob = myblob[2:2] " Blob with one byte: 0z22
+ :let otherblob = myblob[:] " make a copy of the Blob
+
+! If the first index is beyond the last byte of the Blob or the second byte is
+ before the first byte, the result is an empty list. There is no error
+ message.
+
+--- 685,691 ----
+ :let shortblob = myblob[2:2] " Blob with one byte: 0z22
+ :let otherblob = myblob[:] " make a copy of the Blob
+
+! If the first index is beyond the last byte of the Blob or the second index is
+ before the first byte, the result is an empty list. There is no error
+ message.
+
+***************
+*** 700,711 ****
+
+ To change a sequence of bytes the [:] notation can be used: >
+ let blob[1:3] = 0z445566
+! The length of the replaced bytes much be exactly the same as the value
+ provided. *E972*
+
+ To change part of a blob you can specify the first and last byte to be
+! modified. The value must at least have the number of bytes in the range: >
+! :let blob[3:5] = [3, 4, 5]
+
+ You can also use the functions |add()|, |remove()| and |insert()|.
+
+--- 704,715 ----
+
+ To change a sequence of bytes the [:] notation can be used: >
+ let blob[1:3] = 0z445566
+! The length of the replaced bytes must be exactly the same as the value
+ provided. *E972*
+
+ To change part of a blob you can specify the first and last byte to be
+! modified. The value must have the same number of bytes in the range: >
+! :let blob[3:5] = 0z334455
+
+ You can also use the functions |add()|, |remove()| and |insert()|.
+
+***************
+*** 734,740 ****
+ :echo blob is blob3
+ < 0
+
+! Making a copy of a list is done with the |copy()| function. Using [:] also
+ works, as explained above.
+
+
+--- 738,744 ----
+ :echo blob is blob3
+ < 0
+
+! Making a copy of a Blob is done with the |copy()| function. Using [:] also
+ works, as explained above.
+
+
+***************
+*** 793,799 ****
+ expr5 isnot expr5 different |List| instance
+
+ |expr5| expr6
+! expr6 + expr6 .. number addition or list concatenation
+ expr6 - expr6 .. number subtraction
+ expr6 . expr6 .. string concatenation
+
+--- 797,803 ----
+ expr5 isnot expr5 different |List| instance
+
+ |expr5| expr6
+! expr6 + expr6 .. number addition, list or blob concatenation
+ expr6 - expr6 .. number subtraction
+ expr6 . expr6 .. string concatenation
+
+***************
+*** 8586,8598 ****
+
+ *string()*
+ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
+! Float, String or a composition of them, then the result can be
+! parsed back with |eval()|.
+ {expr} type result ~
+ String 'string' (single quotes are doubled)
+ Number 123
+ Float 123.123456 or 1.123456e8
+ Funcref function('name')
+ List [item, item]
+ Dictionary {key: value, key: value}
+
+--- 8626,8639 ----
+
+ *string()*
+ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
+! Float, String, Blob or a composition of them, then the result
+! can be parsed back with |eval()|.
+ {expr} type result ~
+ String 'string' (single quotes are doubled)
+ Number 123
+ Float 123.123456 or 1.123456e8
+ Funcref function('name')
++ Blob 0z00112233.44556677.8899
+ List [item, item]
+ Dictionary {key: value, key: value}
+
+*** ../vim-8.1.0792/src/evalfunc.c 2019-01-19 17:43:03.433449041 +0100
+--- src/evalfunc.c 2019-01-22 22:13:51.091503363 +0100
+***************
+*** 29,34 ****
+--- 29,35 ----
+ #endif
+
+ static char *e_listarg = N_("E686: Argument of %s must be a List");
++ static char *e_listblobarg = N_("E898: Argument of %s must be a List or Blob");
+ static char *e_stringreq = N_("E928: String required");
+
+ #ifdef FEAT_FLOAT
+***************
+*** 1269,1275 ****
+ }
+ }
+ else
+! emsg(_(e_listreq));
+ }
+
+ /*
+--- 1270,1276 ----
+ }
+ }
+ else
+! emsg(_(e_listblobreq));
+ }
+
+ /*
+***************
+*** 4490,4496 ****
+ }
+ }
+ else
+! semsg(_(e_listdictarg), "get()");
+
+ if (tv == NULL)
+ {
+--- 4491,4497 ----
+ }
+ }
+ else
+! semsg(_(e_listdictblobarg), "get()");
+
+ if (tv == NULL)
+ {
+***************
+*** 7057,7063 ****
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+ {
+! emsg(_(e_listreq));
+ return;
+ }
+
+--- 7058,7064 ----
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+ {
+! emsg(_(e_listblobreq));
+ return;
+ }
+
+***************
+*** 7281,7287 ****
+ copy_tv(&argvars[0], rettv);
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+! semsg(_(e_listarg), "insert()");
+ else if ((l = argvars[0].vval.v_list) != NULL && !tv_check_lock(l->lv_lock,
+ (char_u *)N_("insert() argument"), TRUE))
+ {
+--- 7282,7288 ----
+ copy_tv(&argvars[0], rettv);
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+! semsg(_(e_listblobarg), "insert()");
+ else if ((l = argvars[0].vval.v_list) != NULL && !tv_check_lock(l->lv_lock,
+ (char_u *)N_("insert() argument"), TRUE))
+ {
+***************
+*** 9789,9795 ****
+ }
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+! semsg(_(e_listdictarg), "remove()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+ && !tv_check_lock(l->lv_lock, arg_errmsg, TRUE))
+ {
+--- 9790,9796 ----
+ }
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+! semsg(_(e_listdictblobarg), "remove()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+ && !tv_check_lock(l->lv_lock, arg_errmsg, TRUE))
+ {
+***************
+*** 10136,10142 ****
+ }
+
+ if (argvars[0].v_type != VAR_LIST)
+! semsg(_(e_listarg), "reverse()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+ && !tv_check_lock(l->lv_lock,
+ (char_u *)N_("reverse() argument"), TRUE))
+--- 10137,10143 ----
+ }
+
+ if (argvars[0].v_type != VAR_LIST)
+! semsg(_(e_listblobarg), "reverse()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+ && !tv_check_lock(l->lv_lock,
+ (char_u *)N_("reverse() argument"), TRUE))
+*** ../vim-8.1.0792/src/globals.h 2019-01-19 17:43:03.413449172 +0100
+--- src/globals.h 2019-01-22 22:13:51.091503363 +0100
+***************
+*** 1521,1527 ****
+--- 1521,1529 ----
+ EXTERN char e_toomanyarg[] INIT(= N_("E118: Too many arguments for function: %s"));
+ EXTERN char e_dictkey[] INIT(= N_("E716: Key not present in Dictionary: %s"));
+ EXTERN char e_listreq[] INIT(= N_("E714: List required"));
++ EXTERN char e_listblobreq[] INIT(= N_("E897: List or Blob required"));
+ EXTERN char e_listdictarg[] INIT(= N_("E712: Argument of %s must be a List or Dictionary"));
++ EXTERN char e_listdictblobarg[] INIT(= N_("E896: Argument of %s must be a List, Dictionary or Blob"));
+ #endif
+ #ifdef FEAT_QUICKFIX
+ EXTERN char e_readerrf[] INIT(= N_("E47: Error while reading errorfile"));
+*** ../vim-8.1.0792/src/testdir/test_blob.vim 2019-01-17 16:32:49.469289080 +0100
+--- src/testdir/test_blob.vim 2019-01-22 22:13:51.091503363 +0100
+***************
+*** 32,37 ****
+--- 32,38 ----
+ call assert_fails('let b = 0z1.1')
+ call assert_fails('let b = 0z.')
+ call assert_fails('let b = 0z001122.')
++ call assert_fails('call get("", 1)', 'E896:')
+ endfunc
+
+ " assignment to a blob
+***************
+*** 182,187 ****
+--- 183,189 ----
+ call assert_equal(0z00112233, b)
+
+ call assert_fails('call add(b, [9])', 'E745:')
++ call assert_fails('call add("", 0x01)', 'E897:')
+ endfunc
+
+ func Test_blob_empty()
+***************
+*** 219,225 ****
+ call assert_fails("call remove(b, 5)", 'E979:')
+ call assert_fails("call remove(b, 1, 5)", 'E979:')
+ call assert_fails("call remove(b, 3, 2)", 'E979:')
+! call assert_fails("call remove(1, 0)", 'E712:')
+ call assert_fails("call remove(b, b)", 'E974:')
+ endfunc
+
+--- 221,227 ----
+ call assert_fails("call remove(b, 5)", 'E979:')
+ call assert_fails("call remove(b, 1, 5)", 'E979:')
+ call assert_fails("call remove(b, 3, 2)", 'E979:')
+! call assert_fails("call remove(1, 0)", 'E896:')
+ call assert_fails("call remove(b, b)", 'E974:')
+ endfunc
+
+***************
+*** 255,261 ****
+ call assert_equal(2, index(0z11111111, 0x11, -2))
+ call assert_equal(3, index(0z11110111, 0x11, -2))
+
+! call assert_fails('call index("asdf", 0)', 'E714:')
+ endfunc
+
+ func Test_blob_insert()
+--- 257,263 ----
+ call assert_equal(2, index(0z11111111, 0x11, -2))
+ call assert_equal(3, index(0z11110111, 0x11, -2))
+
+! call assert_fails('call index("asdf", 0)', 'E897:')
+ endfunc
+
+ func Test_blob_insert()
+*** ../vim-8.1.0792/src/testdir/test_listdict.vim 2019-01-09 23:00:57.997176121 +0100
+--- src/testdir/test_listdict.vim 2019-01-22 22:13:51.091503363 +0100
+***************
+*** 139,145 ****
+ 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
+
+--- 139,145 ----
+ 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)", 'E896:')
+ call assert_fails("call remove(l, l)", 'E745:')
+ endfunc
+
+***************
+*** 596,601 ****
+--- 596,603 ----
+ call assert_equal(['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l), 1))
+ call assert_equal(['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l), 'i'))
+ call assert_equal(['BAR', 'Bar', 'FOO', 'FOOBAR', 'Foo', 'bar', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l)))
++
++ call assert_fails('call reverse("")', 'E898:')
+ endfunc
+
+ " splitting a string to a List
+*** ../vim-8.1.0792/src/version.c 2019-01-22 22:08:05.231676850 +0100
+--- src/version.c 2019-01-22 22:18:04.288396237 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 793,
+ /**/
+
+--
+Facepalm statement #1: "I'm going to New York tomorrow, hopefully I have time
+to visit the White House"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0794 b/data/vim/patches/8.1.0794
new file mode 100644
index 000000000..f3a109665
--- /dev/null
+++ b/data/vim/patches/8.1.0794
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0794
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0794
+Problem: White space before " -Ntabmove" causes problems.
+Solution: Skip whitespace. (Ozaki Kiichi, closes #3841)
+Files: src/ex_docmd.c, src/testdir/test_tabpage.vim
+
+
+*** ../vim-8.1.0793/src/ex_docmd.c 2019-01-22 21:27:08.890053701 +0100
+--- src/ex_docmd.c 2019-01-22 22:38:50.080337086 +0100
+***************
+*** 7588,7594 ****
+ else
+ {
+ tab_number = eap->line2;
+! if (!unaccept_arg0 && **eap->cmdlinep == '-')
+ {
+ --tab_number;
+ if (tab_number < unaccept_arg0)
+--- 7588,7594 ----
+ else
+ {
+ tab_number = eap->line2;
+! if (!unaccept_arg0 && *skipwhite(*eap->cmdlinep) == '-')
+ {
+ --tab_number;
+ if (tab_number < unaccept_arg0)
+*** ../vim-8.1.0793/src/testdir/test_tabpage.vim 2018-08-07 13:14:05.640508522 +0200
+--- src/testdir/test_tabpage.vim 2019-01-22 22:38:01.812765825 +0100
+***************
+*** 105,110 ****
+--- 105,118 ----
+ call assert_equal(4, tabpagenr())
+ 7tabmove 5
+ call assert_equal(5, tabpagenr())
++ -tabmove
++ call assert_equal(4, tabpagenr())
++ +tabmove
++ call assert_equal(5, tabpagenr())
++ -2tabmove
++ call assert_equal(3, tabpagenr())
++ +3tabmove
++ call assert_equal(6, tabpagenr())
+
+ " The following are a no-op
+ norm! 2gt
+*** ../vim-8.1.0793/src/version.c 2019-01-22 22:20:13.374961397 +0100
+--- src/version.c 2019-01-22 22:41:32.314903703 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 794,
+ /**/
+
+--
+Facepalm reply #3: "I had a great time in Manhattan" "I thought you were
+going to New York?"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0795 b/data/vim/patches/8.1.0795
new file mode 100644
index 000000000..bcf40e91f
--- /dev/null
+++ b/data/vim/patches/8.1.0795
@@ -0,0 +1,49 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0795
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0795 (after 8.1.0792)
+Problem: Cannot build without popup menu.
+Solution: Add #ifdef
+Files: src/ex_getln.c
+
+
+*** ../vim-8.1.0794/src/ex_getln.c 2019-01-22 22:08:05.231676850 +0100
+--- src/ex_getln.c 2019-01-22 22:53:10.740300457 +0100
+***************
+*** 7268,7276 ****
+--- 7268,7278 ----
+ /* Don't execute autocommands while creating the window. */
+ block_autocmds();
+
++ #if defined(FEAT_INS_EXPAND)
+ // When using completion in Insert mode with <C-R>=<C-F> one can open the
+ // command line window, but we don't want the popup menu then.
+ pum_undisplay();
++ #endif
+
+ /* don't use a new tab page */
+ cmdmod.tab = 0;
+*** ../vim-8.1.0794/src/version.c 2019-01-22 22:41:38.362850472 +0100
+--- src/version.c 2019-01-22 22:47:42.363409937 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 795,
+ /**/
+
+--
+Facepalm statement #4: "3000 year old graves? That's not possible, it's only
+2014!"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0796 b/data/vim/patches/8.1.0796
new file mode 100644
index 000000000..69741ceb7
--- /dev/null
+++ b/data/vim/patches/8.1.0796
@@ -0,0 +1,98 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0796
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0796
+Problem: MS-Windows 7: problem with named pipe on channel.
+Solution: Put back the disconnect/connect calls. (Yasuhiro Matsumoto,
+ closes #3833)
+Files: src/channel.c, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0795/src/channel.c 2019-01-20 15:30:36.881328770 +0100
+--- src/channel.c 2019-01-22 22:44:08.765530220 +0100
+***************
+*** 3181,3187 ****
+
+ if (r && nread > 0)
+ return CW_READY;
+! if (r == 0)
+ return CW_ERROR;
+
+ /* perhaps write some buffer lines */
+--- 3181,3193 ----
+
+ if (r && nread > 0)
+ return CW_READY;
+!
+! if (channel->ch_named_pipe)
+! {
+! DisconnectNamedPipe((HANDLE)fd);
+! ConnectNamedPipe((HANDLE)fd, NULL);
+! }
+! else if (r == 0)
+ return CW_ERROR;
+
+ /* perhaps write some buffer lines */
+***************
+*** 3813,3819 ****
+--- 3819,3834 ----
+ if (part == PART_SOCK)
+ res = sock_write(fd, (char *)buf, len);
+ else
++ {
+ res = fd_write(fd, (char *)buf, len);
++ #ifdef WIN32
++ if (channel->ch_named_pipe && res < 0)
++ {
++ DisconnectNamedPipe((HANDLE)fd);
++ ConnectNamedPipe((HANDLE)fd, NULL);
++ }
++ #endif
++ }
+ if (res < 0 && (errno == EWOULDBLOCK
+ #ifdef EAGAIN
+ || errno == EAGAIN
+*** ../vim-8.1.0795/src/testdir/test_terminal.vim 2019-01-20 18:25:50.313911236 +0100
+--- src/testdir/test_terminal.vim 2019-01-22 22:46:17.424241336 +0100
+***************
+*** 644,651 ****
+
+ func Test_terminal_no_cmd()
+ " Does not work on Mac.
+! " Todo: make this work on Win32 again
+! if has('mac') || has('win32')
+ return
+ endif
+ let buf = term_start('NONE', {})
+--- 644,650 ----
+
+ func Test_terminal_no_cmd()
+ " Does not work on Mac.
+! if has('mac')
+ return
+ endif
+ let buf = term_start('NONE', {})
+*** ../vim-8.1.0795/src/version.c 2019-01-22 22:54:56.215326924 +0100
+--- src/version.c 2019-01-22 23:00:59.380030846 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 796,
+ /**/
+
+--
+Facepalm statement #5: "Petrol getting more expensive? Not for me, I'm always
+tanking for 20 dollars"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0797 b/data/vim/patches/8.1.0797
new file mode 100644
index 000000000..01b078572
--- /dev/null
+++ b/data/vim/patches/8.1.0797
@@ -0,0 +1,92 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0797
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0797
+Problem: Error E898 is used twice.
+Solution: Rename the Blob error to E899. (closes #3853)
+Files: src/evalfunc.c, runtime/doc/eval.txt,
+ src/testdir/test_listdict.vim
+
+
+*** ../vim-8.1.0796/src/evalfunc.c 2019-01-22 22:20:13.370961442 +0100
+--- src/evalfunc.c 2019-01-23 21:08:24.968504558 +0100
+***************
+*** 29,35 ****
+ #endif
+
+ static char *e_listarg = N_("E686: Argument of %s must be a List");
+! static char *e_listblobarg = N_("E898: Argument of %s must be a List or Blob");
+ static char *e_stringreq = N_("E928: String required");
+
+ #ifdef FEAT_FLOAT
+--- 29,35 ----
+ #endif
+
+ static char *e_listarg = N_("E686: Argument of %s must be a List");
+! static char *e_listblobarg = N_("E899: Argument of %s must be a List or Blob");
+ static char *e_stringreq = N_("E928: String required");
+
+ #ifdef FEAT_FLOAT
+*** ../vim-8.1.0796/runtime/doc/eval.txt 2019-01-22 22:20:13.370961442 +0100
+--- runtime/doc/eval.txt 2019-01-23 21:07:47.324813817 +0100
+***************
+*** 38,44 ****
+ 1. Variables *variables*
+
+ 1.1 Variable types ~
+! *E712* *E896* *E897* *E898*
+ There are nine types of variables:
+
+ Number A 32 or 64 bit signed number. |expr-number| *Number*
+--- 38,44 ----
+ 1. Variables *variables*
+
+ 1.1 Variable types ~
+! *E712* *E896* *E897* *E899*
+ There are nine types of variables:
+
+ Number A 32 or 64 bit signed number. |expr-number| *Number*
+*** ../vim-8.1.0796/src/testdir/test_listdict.vim 2019-01-22 22:20:13.374961397 +0100
+--- src/testdir/test_listdict.vim 2019-01-23 21:08:59.900218475 +0100
+***************
+*** 597,603 ****
+ call assert_equal(['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l), 'i'))
+ call assert_equal(['BAR', 'Bar', 'FOO', 'FOOBAR', 'Foo', 'bar', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l)))
+
+! call assert_fails('call reverse("")', 'E898:')
+ endfunc
+
+ " splitting a string to a List
+--- 597,603 ----
+ call assert_equal(['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l), 'i'))
+ call assert_equal(['BAR', 'Bar', 'FOO', 'FOOBAR', 'Foo', 'bar', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l)))
+
+! call assert_fails('call reverse("")', 'E899:')
+ endfunc
+
+ " splitting a string to a List
+*** ../vim-8.1.0796/src/version.c 2019-01-22 23:01:36.943693467 +0100
+--- src/version.c 2019-01-23 21:09:29.463976985 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 797,
+ /**/
+
+--
+FIRST HEAD: All right! All right! We'll kill him first and then have tea and
+ biscuits.
+ "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.0798 b/data/vim/patches/8.1.0798
new file mode 100644
index 000000000..c4b0a5883
--- /dev/null
+++ b/data/vim/patches/8.1.0798
@@ -0,0 +1,217 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0798
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0798
+Problem: Changing a blob while iterating over it works strangely.
+Solution: Make a copy of the Blob before iterating.
+Files: src/blob.c, src/proto/blob.pro, src/eval.c,
+ src/testdir/test_blob.vim
+
+
+*** ../vim-8.1.0797/src/blob.c 2019-01-17 16:32:49.465289104 +0100
+--- src/blob.c 2019-01-23 21:47:19.587282840 +0100
+***************
+*** 57,62 ****
+--- 57,84 ----
+ ++b->bv_refcount;
+ }
+
++ int
++ blob_copy(typval_T *from, typval_T *to)
++ {
++ int ret = OK;
++
++ to->v_type = VAR_BLOB;
++ if (from->vval.v_blob == NULL)
++ to->vval.v_blob = NULL;
++ else if (rettv_blob_alloc(to) == FAIL)
++ ret = FAIL;
++ else
++ {
++ int len = from->vval.v_blob->bv_ga.ga_len;
++
++ if (len > 0)
++ to->vval.v_blob->bv_ga.ga_data =
++ vim_memsave(from->vval.v_blob->bv_ga.ga_data, len);
++ to->vval.v_blob->bv_ga.ga_len = len;
++ }
++ return ret;
++ }
++
+ void
+ blob_free(blob_T *b)
+ {
+*** ../vim-8.1.0797/src/proto/blob.pro 2019-01-13 17:48:00.994125660 +0100
+--- src/proto/blob.pro 2019-01-23 21:26:04.464036293 +0100
+***************
+*** 2,7 ****
+--- 2,8 ----
+ blob_T *blob_alloc(void);
+ int rettv_blob_alloc(typval_T *rettv);
+ void rettv_blob_set(typval_T *rettv, blob_T *b);
++ int blob_copy(typval_T *from, typval_T *to);
+ void blob_free(blob_T *b);
+ void blob_unref(blob_T *b);
+ long blob_len(blob_T *b);
+*** ../vim-8.1.0797/src/eval.c 2019-01-19 17:43:03.405449224 +0100
+--- src/eval.c 2019-01-23 21:41:36.389748231 +0100
+***************
+*** 2587,2593 ****
+ char_u *expr;
+ typval_T tv;
+ list_T *l;
+- blob_T *b;
+
+ *errp = TRUE; /* default: there is an error */
+
+--- 2587,2592 ----
+***************
+*** 2632,2647 ****
+ }
+ else if (tv.v_type == VAR_BLOB)
+ {
+! b = tv.vval.v_blob;
+! if (b == NULL)
+! clear_tv(&tv);
+! else
+ {
+! // No need to increment the refcount, it's already set for
+! // the blob being used in "tv".
+! fi->fi_blob = b;
+! fi->fi_bi = 0;
+ }
+ }
+ else
+ {
+--- 2631,2647 ----
+ }
+ else if (tv.v_type == VAR_BLOB)
+ {
+! fi->fi_bi = 0;
+! if (tv.vval.v_blob != NULL)
+ {
+! typval_T btv;
+!
+! // Make a copy, so that the iteration still works when the
+! // blob is changed.
+! blob_copy(&tv, &btv);
+! fi->fi_blob = btv.vval.v_blob;
+ }
++ clear_tv(&tv);
+ }
+ else
+ {
+***************
+*** 8076,8082 ****
+ /*
+ * Copy the values from typval_T "from" to typval_T "to".
+ * When needed allocates string or increases reference count.
+! * Does not make a copy of a list or dict but copies the reference!
+ * It is OK for "from" and "to" to point to the same item. This is used to
+ * make a copy later.
+ */
+--- 8076,8082 ----
+ /*
+ * Copy the values from typval_T "from" to typval_T "to".
+ * When needed allocates string or increases reference count.
+! * Does not make a copy of a list, blob or dict but copies the reference!
+ * It is OK for "from" and "to" to point to the same item. This is used to
+ * make a copy later.
+ */
+***************
+*** 8216,8234 ****
+ ret = FAIL;
+ break;
+ case VAR_BLOB:
+! to->v_type = VAR_BLOB;
+! if (from->vval.v_blob == NULL)
+! to->vval.v_blob = NULL;
+! else if (rettv_blob_alloc(to) == FAIL)
+! ret = FAIL;
+! else
+! {
+! int len = from->vval.v_blob->bv_ga.ga_len;
+!
+! to->vval.v_blob->bv_ga.ga_data =
+! vim_memsave(from->vval.v_blob->bv_ga.ga_data, len);
+! to->vval.v_blob->bv_ga.ga_len = len;
+! }
+ break;
+ case VAR_DICT:
+ to->v_type = VAR_DICT;
+--- 8216,8222 ----
+ ret = FAIL;
+ break;
+ case VAR_BLOB:
+! ret = blob_copy(from, to);
+ break;
+ case VAR_DICT:
+ to->v_type = VAR_DICT;
+*** ../vim-8.1.0797/src/testdir/test_blob.vim 2019-01-22 22:20:13.374961397 +0100
+--- src/testdir/test_blob.vim 2019-01-23 21:35:46.092132992 +0100
+***************
+*** 154,159 ****
+--- 154,160 ----
+ call assert_equal(i, byte)
+ let i += 1
+ endfor
++ call assert_equal(4, i)
+
+ let blob = 0z00
+ call remove(blob, 0)
+***************
+*** 161,166 ****
+--- 162,180 ----
+ for byte in blob
+ call assert_error('loop over empty blob')
+ endfor
++
++ let blob = 0z0001020304
++ let i = 0
++ for byte in blob
++ call assert_equal(i, byte)
++ if i == 1
++ call remove(blob, 0)
++ elseif i == 3
++ call remove(blob, 3)
++ endif
++ let i += 1
++ endfor
++ call assert_equal(5, i)
+ endfunc
+
+ func Test_blob_concatenate()
+*** ../vim-8.1.0797/src/version.c 2019-01-23 21:14:59.165314597 +0100
+--- src/version.c 2019-01-23 21:55:35.247616635 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 798,
+ /**/
+
+
+--
+ When danger reared its ugly head,
+ He bravely turned his tail and fled
+ Yes, Brave Sir Robin turned about
+ And gallantly he chickened out
+ Bravely taking to his feet
+ He beat a very brave retreat
+ Bravest of the brave Sir Robin
+ Petrified of being dead
+ Soiled his pants then brave Sir Robin
+ Turned away and fled.
+ "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.0799 b/data/vim/patches/8.1.0799
new file mode 100644
index 000000000..a7d79d7a9
--- /dev/null
+++ b/data/vim/patches/8.1.0799
@@ -0,0 +1,119 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0799
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0799
+Problem: Calling deleted function; test doesn't work on Mac.
+Solution: Wait for the function to be called before deleting it. Use a job
+ to write to the pty, unless in the GUI. (Ozaki Kiichi,
+ closes #3854)
+Files: src/testdir/test_channel.vim, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0798/src/testdir/test_channel.vim 2019-01-12 22:47:01.264088074 +0100
+--- src/testdir/test_channel.vim 2019-01-23 22:25:23.423421047 +0100
+***************
+*** 1945,1954 ****
+ endif
+
+ func OutCb(chan, msg)
+ endfunc
+
+ func ExitCb(job, status)
+! let g:val = 1
+ call Resume()
+ endfunc
+
+--- 1945,1955 ----
+ endif
+
+ func OutCb(chan, msg)
++ let g:val += 1
+ endfunc
+
+ func ExitCb(job, status)
+! let g:val += 1
+ call Resume()
+ endfunc
+
+***************
+*** 1967,1972 ****
+--- 1968,1977 ----
+ call timer_start(1, 'TimerCb')
+ let elapsed = Standby(&ut)
+ call assert_inrange(1, &ut / 2, elapsed)
++
++ " Wait for both OutCb() and ExitCb() to have been called before deleting
++ " them.
++ call WaitForAssert({-> assert_equal(2, g:val)})
+ call job_stop(g:job)
+
+ delfunc OutCb
+*** ../vim-8.1.0798/src/testdir/test_terminal.vim 2019-01-22 23:01:36.943693467 +0100
+--- src/testdir/test_terminal.vim 2019-01-23 22:29:51.381495917 +0100
+***************
+*** 643,661 ****
+ endfunc
+
+ func Test_terminal_no_cmd()
+- " Does not work on Mac.
+- if has('mac')
+- return
+- endif
+ let buf = term_start('NONE', {})
+ call assert_notequal(0, buf)
+
+ let pty = job_info(term_getjob(buf))['tty_out']
+ call assert_notequal('', pty)
+! if has('win32')
+! silent exe '!start cmd /c "echo look here > ' . pty . '"'
+! else
+ call system('echo "look here" > ' . pty)
+ endif
+ call WaitForAssert({-> assert_match('look here', term_getline(buf, 1))})
+
+--- 643,659 ----
+ endfunc
+
+ func Test_terminal_no_cmd()
+ let buf = term_start('NONE', {})
+ call assert_notequal(0, buf)
+
+ let pty = job_info(term_getjob(buf))['tty_out']
+ call assert_notequal('', pty)
+! if has('gui_running') && !has('win32')
+! " In the GUI job_start() doesn't work, it does not read from the pty.
+ call system('echo "look here" > ' . pty)
++ else
++ " Otherwise using a job works on all systems.
++ call job_start([&shell, &shellcmdflag, 'echo "look here" > ' . pty])
+ endif
+ call WaitForAssert({-> assert_match('look here', term_getline(buf, 1))})
+
+*** ../vim-8.1.0798/src/version.c 2019-01-23 21:56:17.627299992 +0100
+--- src/version.c 2019-01-23 22:32:24.184391431 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 799,
+ /**/
+
+--
+ZOOT: I'm afraid our life must seem very dull and quiet compared to yours.
+ We are but eightscore young blondes, all between sixteen and
+ nineteen-and-a-half, cut off in this castle, with no one to protect us.
+ Oooh. It is a lonely life ... bathing ... dressing ... undressing ...
+ making exciting underwear....
+ "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.0800 b/data/vim/patches/8.1.0800
new file mode 100644
index 000000000..2a3bf8cc6
--- /dev/null
+++ b/data/vim/patches/8.1.0800
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0800
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0800
+Problem: May use a lot of memory when a function creates a cyclic
+ reference.
+Solution: After saving a funccal many times, invoke the garbage collector.
+ (closes #3835)
+Files: src/userfunc.c
+
+
+*** ../vim-8.1.0799/src/userfunc.c 2019-01-20 15:30:36.897328669 +0100
+--- src/userfunc.c 2019-01-23 22:57:55.946713344 +0100
+***************
+*** 651,656 ****
+--- 651,657 ----
+ listitem_T *li;
+ int todo;
+ dictitem_T *v;
++ static int made_copy = 0;
+
+ /* "fc" is still in use. This can happen when returning "a:000",
+ * assigning "l:" to a global variable or defining a closure.
+***************
+*** 673,678 ****
+--- 674,689 ----
+ /* Make a copy of the a:000 items, since we didn't do that above. */
+ for (li = fc->l_varlist.lv_first; li != NULL; li = li->li_next)
+ copy_tv(&li->li_tv, &li->li_tv);
++
++ if (++made_copy == 10000)
++ {
++ // We have made a lot of copies. This can happen when
++ // repetitively calling a function that creates a reference to
++ // itself somehow. Call the garbage collector here to avoid using
++ // too much memory.
++ made_copy = 0;
++ (void)garbage_collect(FALSE);
++ }
+ }
+ }
+
+***************
+*** 723,728 ****
+--- 734,741 ----
+ line_breakcheck(); /* check for CTRL-C hit */
+
+ fc = (funccall_T *)alloc(sizeof(funccall_T));
++ if (fc == NULL)
++ return;
+ fc->caller = current_funccal;
+ current_funccal = fc;
+ fc->func = fp;
+*** ../vim-8.1.0799/src/version.c 2019-01-23 22:33:15.356020765 +0100
+--- src/version.c 2019-01-23 22:59:38.994013371 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 800,
+ /**/
+
+--
+GALAHAD: No look, really, this isn't nescess ...
+PIGLET: We must examine you.
+GALAHAD: There's nothing wrong with ... 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.0801 b/data/vim/patches/8.1.0801
new file mode 100644
index 000000000..453139ca0
--- /dev/null
+++ b/data/vim/patches/8.1.0801
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0801
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0801
+Problem: MinGW: no hint that tests fail because of small terminal.
+Solution: Add a rule for test1 that checks for "wrongtermsize".
+ (msoyka-of-wharton)
+Files: src/testdir/Make_ming.mak
+
+
+*** ../vim-8.1.0800/src/testdir/Make_ming.mak 2019-01-11 19:19:40.685585822 +0100
+--- src/testdir/Make_ming.mak 2019-01-24 12:15:25.657898877 +0100
+***************
+*** 84,89 ****
+--- 84,98 ----
+ -@if exist messages $(DEL) messages
+ -@if exist opt_test.vim $(DEL) opt_test.vim
+
++ test1.out: test1.in
++ -@if exist wrongtermsize $(DEL) wrongtermsize
++ $(VIMPROG) -u dos.vim $(NO_INITS) -s dotest.in test1.in
++ -@if exist wrongtermsize ( \
++ echo Vim window too small- must be 80x25 or larger && exit 1 \
++ )
++ -@if exist test.out $(DEL) test.out
++ -@if exist viminfo $(DEL) viminfo
++
+ .in.out:
+ -@if exist $*.ok $(CP) $*.ok test.ok
+ $(VIMPROG) -u dos.vim $(NO_INITS) -s dotest.in $*.in
+*** ../vim-8.1.0800/src/version.c 2019-01-23 23:00:27.425682956 +0100
+--- src/version.c 2019-01-24 12:17:13.669116298 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 801,
+ /**/
+
+--
+You cannot propel yourself forward by patting yourself on the back.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0802 b/data/vim/patches/8.1.0802
new file mode 100644
index 000000000..ae0cb0980
--- /dev/null
+++ b/data/vim/patches/8.1.0802
@@ -0,0 +1,135 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0802
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0802
+Problem: Negative index doesn't work for Blob.
+Solution: Make it work, add a test. (closes #3856)
+Files: src/blob.c, src/proto/blob.pro, src/eval.c,
+ src/testdir/test_blob.vim
+
+
+*** ../vim-8.1.0801/src/blob.c 2019-01-23 21:56:17.623300022 +0100
+--- src/blob.c 2019-01-24 12:29:14.225795888 +0100
+***************
+*** 72,79 ****
+--- 72,83 ----
+ int len = from->vval.v_blob->bv_ga.ga_len;
+
+ if (len > 0)
++ {
+ to->vval.v_blob->bv_ga.ga_data =
+ vim_memsave(from->vval.v_blob->bv_ga.ga_data, len);
++ if (to->vval.v_blob->bv_ga.ga_data == NULL)
++ len = 0;
++ }
+ to->vval.v_blob->bv_ga.ga_len = len;
+ }
+ return ret;
+***************
+*** 112,118 ****
+ * Get byte "idx" in blob "b".
+ * Caller must check that "idx" is valid.
+ */
+! char_u
+ blob_get(blob_T *b, int idx)
+ {
+ return ((char_u*)b->bv_ga.ga_data)[idx];
+--- 116,122 ----
+ * Get byte "idx" in blob "b".
+ * Caller must check that "idx" is valid.
+ */
+! int
+ blob_get(blob_T *b, int idx)
+ {
+ return ((char_u*)b->bv_ga.ga_data)[idx];
+*** ../vim-8.1.0801/src/proto/blob.pro 2019-01-23 21:56:17.623300022 +0100
+--- src/proto/blob.pro 2019-01-24 12:29:39.945646015 +0100
+***************
+*** 6,12 ****
+ void blob_free(blob_T *b);
+ void blob_unref(blob_T *b);
+ long blob_len(blob_T *b);
+! char_u blob_get(blob_T *b, int idx);
+ void blob_set(blob_T *b, int idx, char_u c);
+ int blob_equal(blob_T *b1, blob_T *b2);
+ int read_blob(FILE *fd, blob_T *blob);
+--- 6,12 ----
+ void blob_free(blob_T *b);
+ void blob_unref(blob_T *b);
+ long blob_len(blob_T *b);
+! int blob_get(blob_T *b, int idx);
+ void blob_set(blob_T *b, int idx, char_u c);
+ int blob_equal(blob_T *b1, blob_T *b2);
+ int read_blob(FILE *fd, blob_T *blob);
+*** ../vim-8.1.0801/src/eval.c 2019-01-23 21:56:17.627299992 +0100
+--- src/eval.c 2019-01-24 12:30:23.197391236 +0100
+***************
+*** 4723,4734 ****
+ }
+ else
+ {
+! // The resulting variable is a string of a single
+! // character. If the index is too big or negative the
+! // result is empty.
+ if (n1 < len && n1 >= 0)
+ {
+! int v = (int)blob_get(rettv->vval.v_blob, n1);
+
+ clear_tv(rettv);
+ rettv->v_type = VAR_NUMBER;
+--- 4723,4735 ----
+ }
+ else
+ {
+! // The resulting variable is a byte value.
+! // If the index is too big or negative that is an error.
+! if (n1 < 0)
+! n1 = len + n1;
+ if (n1 < len && n1 >= 0)
+ {
+! int v = blob_get(rettv->vval.v_blob, n1);
+
+ clear_tv(rettv);
+ rettv->v_type = VAR_NUMBER;
+*** ../vim-8.1.0801/src/testdir/test_blob.vim 2019-01-23 21:56:17.627299992 +0100
+--- src/testdir/test_blob.vim 2019-01-24 12:24:45.847268594 +0100
+***************
+*** 95,100 ****
+--- 95,107 ----
+ call assert_equal(999, get(b, 5, 999))
+ call assert_equal(-1, get(b, -8))
+ call assert_equal(999, get(b, -8, 999))
++
++ call assert_equal(0x00, b[0])
++ call assert_equal(0x22, b[2])
++ call assert_equal(0x44, b[4])
++ call assert_equal(0x44, b[-1])
++ call assert_fails('echo b[5]', 'E979:')
++ call assert_fails('echo b[-8]', 'E979:')
+ endfunc
+
+ func Test_blob_to_string()
+*** ../vim-8.1.0801/src/version.c 2019-01-24 12:18:43.448842486 +0100
+--- src/version.c 2019-01-24 12:25:38.178996684 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 802,
+ /**/
+
+--
+"Intelligence has much less practical application than you'd think."
+ -- Scott Adams, Dilbert.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0803 b/data/vim/patches/8.1.0803
new file mode 100644
index 000000000..590ef6204
--- /dev/null
+++ b/data/vim/patches/8.1.0803
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0803
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0803
+Problem: Session file has problem with single quote in file name. (Jon
+ Crowe)
+Solution: Use a double quoted string. Add a test.
+Files: src/ex_docmd.c, src/testdir/test_mksession.vim
+
+
+*** ../vim-8.1.0802/src/ex_docmd.c 2019-01-22 22:41:38.362850472 +0100
+--- src/ex_docmd.c 2019-01-24 13:28:50.018069901 +0100
+***************
+*** 11838,11846 ****
+ * edit that buffer, to not lose folding information (:edit resets
+ * folds in other buffers)
+ */
+! if (fputs("if bufexists('", fd) < 0
+ || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
+! || fputs("') | buffer ", fd) < 0
+ || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
+ || fputs(" | else | edit ", fd) < 0
+ || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
+--- 11838,11846 ----
+ * edit that buffer, to not lose folding information (:edit resets
+ * folds in other buffers)
+ */
+! if (fputs("if bufexists(\"", fd) < 0
+ || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
+! || fputs("\") | buffer ", fd) < 0
+ || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
+ || fputs(" | else | edit ", fd) < 0
+ || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
+*** ../vim-8.1.0802/src/testdir/test_mksession.vim 2019-01-21 23:03:45.718447626 +0100
+--- src/testdir/test_mksession.vim 2019-01-24 13:30:48.257167620 +0100
+***************
+*** 426,430 ****
+--- 426,444 ----
+ call delete('Xtest_mks.out')
+ endfunc
+
++ func Test_mksession_quote_in_filename()
++ let v:errmsg = ''
++ %bwipe!
++ split another
++ split x'y\"z
++ mksession! Xtest_mks_quoted.out
++ %bwipe!
++ source Xtest_mks_quoted.out
++ call assert_true(bufexists("x'y\"z"))
++
++ %bwipe!
++ call delete('Xtest_mks_quoted.out')
++ endfunc
++
+
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.0802/src/version.c 2019-01-24 12:31:40.756926525 +0100
+--- src/version.c 2019-01-24 13:30:55.837110446 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 803,
+ /**/
+
+--
+Experience is what you get when you don't get what you want.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0804 b/data/vim/patches/8.1.0804
new file mode 100644
index 000000000..ea60f866e
--- /dev/null
+++ b/data/vim/patches/8.1.0804
@@ -0,0 +1,78 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0804
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0804
+Problem: Crash when setting v:errmsg to empty list. (Jaon Franklin)
+Solution: Separate getting value and assigning result.
+Files: src/eval.c, src/testdir/test_eval_stuff.vim
+
+
+*** ../vim-8.1.0803/src/eval.c 2019-01-24 12:31:40.756926525 +0100
+--- src/eval.c 2019-01-24 13:55:29.234651834 +0100
+***************
+*** 7892,7900 ****
+ {
+ if (v->di_tv.v_type == VAR_STRING)
+ {
+! vim_free(v->di_tv.vval.v_string);
+ if (copy || tv->v_type != VAR_STRING)
+! v->di_tv.vval.v_string = vim_strsave(tv_get_string(tv));
+ else
+ {
+ /* Take over the string to avoid an extra alloc/free. */
+--- 7892,7907 ----
+ {
+ if (v->di_tv.v_type == VAR_STRING)
+ {
+! VIM_CLEAR(v->di_tv.vval.v_string);
+ if (copy || tv->v_type != VAR_STRING)
+! {
+! char_u *val = tv_get_string(tv);
+!
+! // Careful: when assigning to v:errmsg and tv_get_string()
+! // causes an error message the variable will alrady be set.
+! if (v->di_tv.vval.v_string == NULL)
+! v->di_tv.vval.v_string = vim_strsave(val);
+! }
+ else
+ {
+ /* Take over the string to avoid an extra alloc/free. */
+*** ../vim-8.1.0803/src/testdir/test_eval_stuff.vim 2019-01-13 19:10:28.963419901 +0100
+--- src/testdir/test_eval_stuff.vim 2019-01-24 13:56:37.090182391 +0100
+***************
+*** 87,89 ****
+--- 87,96 ----
+ bwipe!
+ call delete('XReadfile')
+ endfunc
++
++ func Test_let_errmsg()
++ call assert_fails('let v:errmsg = []', 'E730:')
++ let v:errmsg = ''
++ call assert_fails('let v:errmsg = []', 'E730:')
++ let v:errmsg = ''
++ endfunc
+*** ../vim-8.1.0803/src/version.c 2019-01-24 13:34:37.819464518 +0100
+--- src/version.c 2019-01-24 13:47:30.569976005 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 804,
+ /**/
+
+--
+"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.0805 b/data/vim/patches/8.1.0805
new file mode 100644
index 000000000..d4b3b4f07
--- /dev/null
+++ b/data/vim/patches/8.1.0805
@@ -0,0 +1,7316 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0805
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0805
+Problem: Too many #ifdefs.
+Solution: Graduate FEAT_MBYTE, part 1.
+Files: src/buffer.c, src/charset.c, src/diff.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_getln.c, src/fileio.c,
+ src/fold.c, src/gui.c, src/gui_mac.c, src/gui_photon.c,
+ src/gui_w32.c
+
+
+*** ../vim-8.1.0804/src/buffer.c 2019-01-20 18:25:50.313911236 +0100
+--- src/buffer.c 2019-01-24 14:03:05.483739052 +0100
+***************
+*** 704,713 ****
+ buf->b_shortname = FALSE;
+ buf->b_p_eol = TRUE;
+ buf->b_start_eol = TRUE;
+- #ifdef FEAT_MBYTE
+ buf->b_p_bomb = FALSE;
+ buf->b_start_bomb = FALSE;
+- #endif
+ buf->b_ml.ml_mfp = NULL;
+ buf->b_ml.ml_flags = ML_EMPTY; /* empty buffer */
+ #ifdef FEAT_NETBEANS_INTG
+--- 704,711 ----
+***************
+*** 940,948 ****
+ map_clear_int(buf, MAP_ALL_MODES, TRUE, FALSE); /* clear local mappings */
+ map_clear_int(buf, MAP_ALL_MODES, TRUE, TRUE); /* clear local abbrevs */
+ #endif
+- #ifdef FEAT_MBYTE
+ VIM_CLEAR(buf->b_start_fenc);
+- #endif
+ }
+
+ /*
+--- 938,944 ----
+***************
+*** 2133,2141 ****
+ {
+ if (free_p_ff)
+ {
+- #ifdef FEAT_MBYTE
+ clear_string_option(&buf->b_p_fenc);
+- #endif
+ clear_string_option(&buf->b_p_ff);
+ clear_string_option(&buf->b_p_bh);
+ clear_string_option(&buf->b_p_bt);
+--- 2129,2135 ----
+***************
+*** 2245,2253 ****
+ clear_string_option(&buf->b_p_lw);
+ #endif
+ clear_string_option(&buf->b_p_bkc);
+- #ifdef FEAT_MBYTE
+ clear_string_option(&buf->b_p_menc);
+- #endif
+ }
+
+ /*
+--- 2239,2245 ----
+***************
+*** 3778,3787 ****
+ if (len > 100)
+ {
+ len -= 100;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ len += (*mb_tail_off)(p, p + len) + 1;
+- #endif
+ p += len;
+ }
+ STRCPY(icon_str, p);
+--- 3770,3777 ----
+***************
+*** 3939,3949 ****
+
+ if (fillchar == 0)
+ fillchar = ' ';
+- #ifdef FEAT_MBYTE
+ /* Can't handle a multi-byte fill character yet. */
+ else if (mb_char2len(fillchar) > 1)
+ fillchar = '-';
+- #endif
+
+ // The cursor in windows other than the current one isn't always
+ // up-to-date, esp. because of autocommands and timers.
+--- 3929,3937 ----
+***************
+*** 3973,3983 ****
+ byteval = 0;
+ }
+ else
+- #ifdef FEAT_MBYTE
+ byteval = (*mb_ptr2char)(p + wp->w_cursor.col);
+- #else
+- byteval = p[wp->w_cursor.col];
+- #endif
+
+ groupdepth = 0;
+ p = out;
+--- 3961,3967 ----
+***************
+*** 4079,4085 ****
+ if (l > item[groupitem[groupdepth]].maxwid)
+ {
+ /* truncate, remove n bytes of text at the start */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* Find the first character that should be included. */
+--- 4063,4068 ----
+***************
+*** 4091,4107 ****
+ }
+ }
+ else
+- #endif
+ n = (long)(p - t) - item[groupitem[groupdepth]].maxwid + 1;
+
+ *t = '<';
+ mch_memmove(t + 1, t + n, (size_t)(p - (t + n)));
+ p = p - n + 1;
+! #ifdef FEAT_MBYTE
+! /* Fill up space left over by half a double-wide char. */
+ while (++l < item[groupitem[groupdepth]].minwid)
+ *p++ = fillchar;
+- #endif
+
+ /* correct the start of the items for the truncation */
+ for (l = groupitem[groupdepth] + 1; l < curitem; l++)
+--- 4074,4088 ----
+ }
+ }
+ else
+ n = (long)(p - t) - item[groupitem[groupdepth]].maxwid + 1;
+
+ *t = '<';
+ mch_memmove(t + 1, t + n, (size_t)(p - (t + n)));
+ p = p - n + 1;
+!
+! // Fill up space left over by half a double-wide char.
+ while (++l < item[groupitem[groupdepth]].minwid)
+ *p++ = fillchar;
+
+ /* correct the start of the items for the truncation */
+ for (l = groupitem[groupdepth] + 1; l < curitem; l++)
+***************
+*** 4483,4496 ****
+ if (l > maxwid)
+ {
+ while (l >= maxwid)
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ l -= ptr2cells(t);
+ t += (*mb_ptr2len)(t);
+ }
+ else
+- #endif
+ l -= byte2cells(*t++);
+ if (p + 1 >= out + outlen)
+ break;
+--- 4464,4475 ----
+***************
+*** 4610,4616 ****
+ if (width - vim_strsize(s) >= maxwidth)
+ {
+ /* Truncation mark is beyond max length */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ s = out;
+--- 4589,4594 ----
+***************
+*** 4627,4633 ****
+ *s++ = fillchar;
+ }
+ else
+- #endif
+ s = out + maxwidth - 1;
+ for (l = 0; l < itemcnt; l++)
+ if (item[l].start > s)
+--- 4605,4610 ----
+***************
+*** 4638,4644 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ n = 0;
+--- 4615,4620 ----
+***************
+*** 4649,4655 ****
+ }
+ }
+ else
+- #endif
+ n = width - maxwidth + 1;
+ p = s + n;
+ STRMOVE(s + 1, p);
+--- 4625,4630 ----
+*** ../vim-8.1.0804/src/charset.c 2018-09-30 21:43:17.179693404 +0200
+--- src/charset.c 2019-01-24 14:08:03.845910116 +0100
+***************
+*** 9,20 ****
+
+ #include "vim.h"
+
+! #ifdef FEAT_MBYTE
+! # if defined(HAVE_WCHAR_H)
+! # include <wchar.h> /* for towupper() and towlower() */
+! # endif
+! static int win_nolbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp);
+ #endif
+
+ static unsigned nr2hex(unsigned c);
+
+--- 9,18 ----
+
+ #include "vim.h"
+
+! #if defined(HAVE_WCHAR_H)
+! # include <wchar.h> /* for towupper() and towlower() */
+ #endif
++ static int win_nolbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp);
+
+ static unsigned nr2hex(unsigned c);
+
+***************
+*** 109,115 ****
+ #endif
+ while (c < 256)
+ {
+- #ifdef FEAT_MBYTE
+ /* UTF-8: bytes 0xa0 - 0xff are printable (latin1) */
+ if (enc_utf8 && c >= 0xa0)
+ g_chartab[c++] = CT_PRINT_CHAR + 1;
+--- 107,112 ----
+***************
+*** 120,145 ****
+ else if (enc_dbcs != 0 && MB_BYTE2LEN(c) == 2)
+ g_chartab[c++] = CT_PRINT_CHAR + 2;
+ else
+- #endif
+ /* the rest is unprintable by default */
+ g_chartab[c++] = (dy_flags & DY_UHEX) ? 4 : 2;
+ }
+
+- #ifdef FEAT_MBYTE
+ /* Assume that every multi-byte char is a filename character. */
+ for (c = 1; c < 256; ++c)
+ if ((enc_dbcs != 0 && MB_BYTE2LEN(c) > 1)
+ || (enc_dbcs == DBCS_JPNU && c == 0x8e)
+ || (enc_utf8 && c >= 0xa0))
+ g_chartab[c] |= CT_FNAME_CHAR;
+- #endif
+ }
+
+ /*
+ * Init word char flags all to FALSE
+ */
+ vim_memset(buf->b_chartab, 0, (size_t)32);
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0)
+ for (c = 0; c < 256; ++c)
+ {
+--- 117,138 ----
+***************
+*** 147,153 ****
+ if (MB_BYTE2LEN(c) == 2)
+ SET_CHARTAB(buf, c);
+ }
+- #endif
+
+ #ifdef FEAT_LISP
+ /*
+--- 140,145 ----
+***************
+*** 184,194 ****
+ if (VIM_ISDIGIT(*p))
+ c = getdigits(&p);
+ else
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_ptr2char_adv(&p);
+ else
+- #endif
+ c = *p++;
+ c2 = -1;
+ if (*p == '-' && p[1] != NUL)
+--- 176,184 ----
+***************
+*** 197,207 ****
+ if (VIM_ISDIGIT(*p))
+ c2 = getdigits(&p);
+ else
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c2 = mb_ptr2char_adv(&p);
+ else
+- #endif
+ c2 = *p++;
+ }
+ if (c <= 0 || c >= 256 || (c2 < c && c2 != -1) || c2 >= 256
+--- 187,195 ----
+***************
+*** 253,265 ****
+ || (p_altkeymap
+ && (F_isalpha(c) || F_isdigit(c)))
+ #endif
+! )
+! #ifdef FEAT_MBYTE
+! /* For double-byte we keep the cell width, so
+! * that we can detect it from the first byte. */
+! && !(enc_dbcs && MB_BYTE2LEN(c) == 2)
+! #endif
+! )
+ {
+ if (tilde)
+ {
+--- 241,249 ----
+ || (p_altkeymap
+ && (F_isalpha(c) || F_isdigit(c)))
+ #endif
+! // For double-byte we keep the cell width, so
+! // that we can detect it from the first byte.
+! ) && !(enc_dbcs && MB_BYTE2LEN(c) == 2))
+ {
+ if (tilde)
+ {
+***************
+*** 322,333 ****
+ room = bufsize - len;
+ while (*buf != 0)
+ {
+- # ifdef FEAT_MBYTE
+ /* Assume a multi-byte character doesn't need translation. */
+ if (has_mbyte && (trs_len = (*mb_ptr2len)(buf)) > 1)
+ len -= trs_len;
+ else
+- # endif
+ {
+ trs = transchar_byte(*buf);
+ trs_len = (int)STRLEN(trs);
+--- 306,315 ----
+***************
+*** 356,367 ****
+ {
+ char_u *res;
+ char_u *p;
+- #ifdef FEAT_MBYTE
+ int l, len, c;
+ char_u hexbuf[11];
+- #endif
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* Compute the length of the result, taking account of unprintable
+--- 338,346 ----
+***************
+*** 394,400 ****
+ res = alloc((unsigned)(len + 1));
+ }
+ else
+- #endif
+ res = alloc((unsigned)(vim_strsize(s) + 1));
+ if (res != NULL)
+ {
+--- 373,378 ----
+***************
+*** 402,408 ****
+ p = s;
+ while (*p != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
+ {
+ c = (*mb_ptr2char)(p);
+--- 380,385 ----
+***************
+*** 413,419 ****
+ p += l;
+ }
+ else
+- #endif
+ STRCAT(res, transchar_byte(*p++));
+ }
+ }
+--- 390,395 ----
+***************
+*** 468,474 ****
+ i = 0;
+ while (STR_CHAR(i) != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 || (has_mbyte && MB_BYTE2LEN(STR_CHAR(i)) > 1))
+ {
+ if (enc_utf8)
+--- 444,449 ----
+***************
+*** 520,526 ****
+ i += (*mb_ptr2len)(STR_PTR(i));
+ }
+ else
+- #endif
+ {
+ if (buf == NULL)
+ GA_CHAR(i) = TOLOWER_LOC(GA_CHAR(i));
+--- 495,500 ----
+***************
+*** 580,586 ****
+ return transchar_buf;
+ }
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Like transchar(), but called with a byte instead of a character. Checks
+ * for an illegal UTF-8 byte.
+--- 554,559 ----
+***************
+*** 595,601 ****
+ }
+ return transchar(c);
+ }
+- #endif
+
+ /*
+ * Convert non-printable character to two or more printable characters in
+--- 568,573 ----
+***************
+*** 632,643 ****
+
+ buf[2] = NUL;
+ }
+- #ifdef FEAT_MBYTE
+ else if (enc_utf8 && c >= 0x80)
+ {
+ transchar_hex(buf, c);
+ }
+- #endif
+ #ifndef EBCDIC
+ else if (c >= ' ' + 0x80 && c <= '~' + 0x80) /* 0xa0 - 0xfe */
+ {
+--- 604,613 ----
+***************
+*** 675,687 ****
+ int i = 0;
+
+ buf[0] = '<';
+- #ifdef FEAT_MBYTE
+ if (c > 255)
+ {
+ buf[++i] = nr2hex((unsigned)c >> 12);
+ buf[++i] = nr2hex((unsigned)c >> 8);
+ }
+- #endif
+ buf[++i] = nr2hex((unsigned)c >> 4);
+ buf[++i] = nr2hex((unsigned)c);
+ buf[++i] = '>';
+--- 645,655 ----
+***************
+*** 712,721 ****
+ int
+ byte2cells(int b)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && b >= 0x80)
+ return 0;
+- #endif
+ return (g_chartab[b] & CT_CELL_MASK);
+ }
+
+--- 680,687 ----
+***************
+*** 729,735 ****
+ {
+ if (IS_SPECIAL(c))
+ return char2cells(K_SECOND(c)) + 2;
+- #ifdef FEAT_MBYTE
+ if (c >= 0x80)
+ {
+ /* UTF-8: above 0x80 need to check the value */
+--- 695,700 ----
+***************
+*** 744,750 ****
+ return 2;
+ }
+ }
+- #endif
+ return (g_chartab[c & 0xff] & CT_CELL_MASK);
+ }
+
+--- 709,714 ----
+***************
+*** 755,766 ****
+ int
+ ptr2cells(char_u *p)
+ {
+- #ifdef FEAT_MBYTE
+ /* For UTF-8 we need to look at more bytes if the first byte is >= 0x80. */
+ if (enc_utf8 && *p >= 0x80)
+ return utf_ptr2cells(p);
+ /* For DBCS we can tell the cell count from the first byte. */
+- #endif
+ return (g_chartab[*p] & CT_CELL_MASK);
+ }
+
+--- 719,728 ----
+***************
+*** 784,791 ****
+ int size = 0;
+
+ while (*s != NUL && --len >= 0)
+- {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int l = (*mb_ptr2len)(s);
+--- 746,751 ----
+***************
+*** 795,803 ****
+ len -= l - 1;
+ }
+ else
+- #endif
+ size += byte2cells(*s++);
+! }
+ return size;
+ }
+
+--- 755,762 ----
+ len -= l - 1;
+ }
+ else
+ size += byte2cells(*s++);
+!
+ return size;
+ }
+
+***************
+*** 907,918 ****
+ {
+ if (c >= 0x100)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0)
+ return dbcs_class((unsigned)c >> 8, (unsigned)(c & 0xff)) >= 2;
+ if (enc_utf8)
+ return utf_class_buf(c, buf) >= 2;
+- #endif
+ return FALSE;
+ }
+ return (c > 0 && GET_CHARTAB(buf, c) != 0);
+--- 866,875 ----
+***************
+*** 932,941 ****
+ {
+ int c = *p;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && MB_BYTE2LEN(c) > 1)
+ c = (*mb_ptr2char)(p);
+- #endif
+ return vim_iswordc_buf(c, buf);
+ }
+
+--- 889,896 ----
+***************
+*** 973,982 ****
+ int
+ vim_isprintc(int c)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && c >= 0x100)
+ return utf_printable(c);
+- #endif
+ return (c >= 0x100 || (c > 0 && (g_chartab[c] & CT_PRINT_CHAR)));
+ }
+
+--- 928,935 ----
+***************
+*** 987,998 ****
+ int
+ vim_isprintc_strict(int c)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0 && c < 0x100 && MB_BYTE2LEN(c) > 1)
+ return FALSE;
+ if (enc_utf8 && c >= 0x100)
+ return utf_printable(c);
+- #endif
+ return (c >= 0x100 || (c > 0 && (g_chartab[c] & CT_PRINT_CHAR)));
+ }
+
+--- 940,949 ----
+***************
+*** 1009,1018 ****
+ if (!curwin->w_p_lbr && *p_sbr == NUL && !curwin->w_p_bri)
+ {
+ #endif
+- #ifdef FEAT_MBYTE
+ if (curwin->w_p_wrap)
+ return win_nolbr_chartabsize(curwin, s, col, NULL);
+- #endif
+ RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, s, col)
+ #ifdef FEAT_LINEBREAK
+ }
+--- 960,967 ----
+***************
+*** 1058,1068 ****
+ colnr_T col_adj = 0; /* col + screen size of tab */
+ colnr_T colmax;
+ int added;
+- # ifdef FEAT_MBYTE
+ int mb_added = 0;
+- # else
+- # define mb_added 0
+- # endif
+ int numberextra;
+ char_u *ps;
+ int tab_corr = (*s == TAB);
+--- 1007,1013 ----
+***************
+*** 1074,1083 ****
+ if (!wp->w_p_lbr && !wp->w_p_bri && *p_sbr == NUL)
+ #endif
+ {
+- #ifdef FEAT_MBYTE
+ if (wp->w_p_wrap)
+ return win_nolbr_chartabsize(wp, s, col, headp);
+- #endif
+ RET_WIN_BUF_CHARTABSIZE(wp, wp->w_buffer, s, col)
+ }
+
+--- 1019,1026 ----
+***************
+*** 1135,1148 ****
+ }
+ }
+ }
+- # ifdef FEAT_MBYTE
+ else if (has_mbyte && size == 2 && MB_BYTE2LEN(*s) > 1
+ && wp->w_p_wrap && in_win_border(wp, col))
+ {
+ ++size; /* Count the ">" in the last column. */
+ mb_added = 1;
+ }
+- # endif
+
+ /*
+ * May have to add something for 'breakindent' and/or 'showbreak'
+--- 1078,1089 ----
+***************
+*** 1210,1216 ****
+ #endif
+ }
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Like win_lbr_chartabsize(), except that we know 'linebreak' is off and
+ * 'wrap' is on. This means we need to check for a double-byte character that
+--- 1151,1156 ----
+***************
+*** 1269,1275 ****
+ return FALSE;
+ return ((vcol - width1) % width2 == width2 - 1);
+ }
+- #endif /* FEAT_MBYTE */
+
+ /*
+ * Get virtual column number of pos.
+--- 1209,1214 ----
+***************
+*** 1310,1320 ****
+ if (*ptr == NUL)
+ pos->col = 0;
+ posptr = ptr + pos->col;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ /* always start on the first byte */
+ posptr -= (*mb_head_off)(line, posptr);
+- #endif
+ }
+
+ /*
+--- 1249,1257 ----
+***************
+*** 1329,1342 ****
+ #endif
+ )
+ {
+- #ifndef FEAT_MBYTE
+ head = 0;
+- #endif
+ for (;;)
+ {
+- #ifdef FEAT_MBYTE
+ head = 0;
+- #endif
+ c = *ptr;
+ /* make sure we don't go past the end of the line */
+ if (c == NUL)
+--- 1266,1275 ----
+***************
+*** 1353,1359 ****
+ #endif
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* For utf-8, if the byte is >= 0x80, need to look at
+--- 1286,1291 ----
+***************
+*** 1374,1380 ****
+ }
+ }
+ else
+- #endif
+ incr = g_chartab[c] & CT_CELL_MASK;
+ }
+
+--- 1306,1311 ----
+***************
+*** 1460,1468 ****
+ colnr_T col;
+ colnr_T coladd;
+ colnr_T endadd;
+- # ifdef FEAT_MBYTE
+ char_u *ptr;
+- # endif
+
+ if (virtual_active())
+ {
+--- 1391,1397 ----
+***************
+*** 1471,1477 ****
+
+ coladd = pos->coladd;
+ endadd = 0;
+- # ifdef FEAT_MBYTE
+ /* Cannot put the cursor on part of a wide character. */
+ ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
+ if (pos->col < (colnr_T)STRLEN(ptr))
+--- 1400,1405 ----
+***************
+*** 1487,1493 ****
+ coladd = 0;
+ }
+ }
+- # endif
+ col += coladd;
+ if (start != NULL)
+ *start = col;
+--- 1415,1420 ----
+***************
+*** 1684,1690 ****
+ return (c == '0' || c == '1');
+ }
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Vim's own character class functions. These exist because many library
+ * islower()/toupper() etc. do not work properly: they crash when used with
+--- 1611,1616 ----
+***************
+*** 1797,1803 ****
+ return TOLOWER_ASC(c);
+ return TOLOWER_LOC(c);
+ }
+- #endif
+
+ /*
+ * skiptowhite: skip over text until ' ' or '\t' or NUL.
+--- 1723,1728 ----
+***************
+*** 2077,2085 ****
+ {
+ #ifdef BACKSLASH_IN_FILENAME
+ return (str[0] == '\\'
+- # ifdef FEAT_MBYTE
+ && str[1] < 0x80
+- # endif
+ && (str[1] == ' '
+ || (str[1] != NUL
+ && str[1] != '*'
+--- 2002,2008 ----
+*** ../vim-8.1.0804/src/diff.c 2019-01-15 20:19:36.739904461 +0100
+--- src/diff.c 2019-01-24 14:09:08.117504177 +0100
+***************
+*** 741,752 ****
+ 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);
+--- 741,750 ----
+ if (diff_flags & DIFF_ICASE)
+ {
+ int c;
+ int orig_len;
+ char_u cbuf[MB_MAXBYTES + 1];
+
++ // xdiff doesn't support ignoring case, fold-case the text.
+ c = PTR2CHAR(s);
+ c = enc_utf8 ? utf_fold(c) : MB_TOLOWER(c);
+ orig_len = MB_PTR2LEN(s);
+***************
+*** 758,767 ****
+
+ s += orig_len;
+ len += orig_len;
+- #else
+- c = *s++;
+- ptr[len++] = TOLOWER_LOC(c);
+- #endif
+ }
+ else
+ ptr[len++] = *s++;
+--- 756,761 ----
+***************
+*** 1946,1952 ****
+ static int
+ diff_equal_char(char_u *p1, char_u *p2, int *len)
+ {
+- #ifdef FEAT_MBYTE
+ int l = (*mb_ptr2len)(p1);
+
+ if (l != (*mb_ptr2len)(p2))
+--- 1940,1945 ----
+***************
+*** 1962,1968 ****
+ *len = l;
+ }
+ else
+- #endif
+ {
+ if ((*p1 != *p2)
+ && (!(diff_flags & DIFF_ICASE)
+--- 1955,1960 ----
+***************
+*** 2400,2406 ****
+ si_new += l;
+ }
+ }
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* Move back to first byte of character in both lines (may
+--- 2392,2397 ----
+***************
+*** 2408,2414 ****
+ si_org -= (*mb_head_off)(line_org, line_org + si_org);
+ si_new -= (*mb_head_off)(line_new, line_new + si_new);
+ }
+- #endif
+ if (*startp > si_org)
+ *startp = si_org;
+
+--- 2399,2404 ----
+***************
+*** 2438,2447 ****
+ {
+ p1 = line_org + ei_org;
+ p2 = line_new + ei_new;
+- #ifdef FEAT_MBYTE
+ p1 -= (*mb_head_off)(line_org, p1);
+ p2 -= (*mb_head_off)(line_new, p2);
+- #endif
+ if (!diff_equal_char(p1, p2, &l))
+ break;
+ ei_org -= l;
+--- 2428,2435 ----
+*** ../vim-8.1.0804/src/digraph.c 2019-01-13 23:38:33.379773390 +0100
+--- src/digraph.c 2019-01-24 14:11:43.248512005 +0100
+***************
+*** 15,25 ****
+
+ #if defined(FEAT_DIGRAPHS) || defined(PROTO)
+
+- #ifdef FEAT_MBYTE
+ typedef int result_T;
+- #else
+- typedef char_u result_T;
+- #endif
+
+ typedef struct digraph
+ {
+--- 15,21 ----
+***************
+*** 38,45 ****
+ * compilers cannot handle them (Amiga SAS/C is the most picky one).
+ */
+ static digr_T digraphdefault[] =
+- #ifdef __MINT__
+
+ /*
+ * ATARI digraphs
+ */
+--- 34,41 ----
+ * compilers cannot handle them (Amiga SAS/C is the most picky one).
+ */
+ static digr_T digraphdefault[] =
+
++ #ifdef __MINT__
+ /*
+ * ATARI digraphs
+ */
+***************
+*** 320,456 ****
+ };
+
+ # else
+! # if defined(MACOS_X) && !defined(FEAT_MBYTE)
+!
+! /*
+! * Macintosh digraphs
+! */
+! {{'a', 't', 64}, /* @ */
+! {'A', '"', 128}, /* ~@ XX */
+! {'A', 'o', 129}, /* Å */
+! {'C', ',', 130}, /* Ç */
+! {'E', '\'', 131}, /* É */
+! {'N', '~', 132}, /* Ñ */
+! {'O', '"', 133}, /* Ö */
+! {'U', '"', 134}, /* Ü */
+! {'a', '\'', 135}, /* ~G XX */
+! {'a', '`', 136}, /* ~H XX */
+! {'a', '^', 137}, /* â */
+! {'a', '"', 138}, /* ä */
+! {'a', '~', 139}, /* ã */
+! {'a', 'o', 140}, /* å */
+! {'c', ',', 141}, /* ç */
+! {'e', '\'', 142}, /* é */
+! {'e', '`', 143}, /* è */
+! {'e', '^', 144}, /* ê */
+! {'e', '"', 145}, /* ë */
+! {'i', '\'', 146}, /* í */
+! {'i', '`', 147}, /* ì */
+! {'i', '^', 148}, /* î */
+! {'i', '"', 149}, /* ï */
+! {'n', '~', 150}, /* ñ */
+! {'o', '\'', 151}, /* ó */
+! {'o', '`', 152}, /* ò */
+! {'o', '^', 153}, /* ô */
+! {'o', '"', 154}, /* ö */
+! {'o', '~', 155}, /* o */
+! {'u', '\'', 156}, /* ú */
+! {'u', '`', 157}, /* ~] XX */
+! {'u', '^', 158}, /* û */
+! {'u', '"', 159}, /* ü */
+! {'+', '_', 160}, /* Ý */
+! {'~', 'o', 161}, /* ° */
+! {'c', '|', 162}, /* ¢ */
+! {'$', '$', 163}, /* £ */
+! {'p', 'a', 164}, /* § */
+! {'.', '.', 165}, /* * */
+! {'P', 'P', 166}, /* ¶ */
+! {'s', 's', 167}, /* ß */
+! {'r', 'O', 168}, /* ® */
+! {'c', 'O', 169}, /* © */
+! {'T', 'M', 170}, /*  */
+! {'=', '/', 173}, /* ‚ */
+! {'A', 'E', 174}, /* Æ */
+! {'O', '/', 175}, /* Ø */
+! {'0', '0', 176}, /* ƒ */
+! {'+', '-', 177}, /* ± */
+! {'<', '=', 178}, /* ¾ */
+! {'>', '=', 179}, /* „ */
+! {'Y', '-', 180}, /* ¥ */
+! {'j', 'u', 181}, /* µ */
+! {'m', 'u', 181}, /* µ */
+! {'d', 'd', 182}, /*  */
+! {'S', 'S', 183}, /* … */
+! {'S', 'I', 183}, /* … */
+! {'P', 'I', 184}, /* ½ */
+! {'p', 'i', 185}, /* ¼ */
+! {'I', 'I', 186}, /* † */
+! {'a', '-', 187}, /* » */
+! {'o', '-', 188}, /* º */
+! {'O', 'M', 189}, /* ½ */
+! {'a', 'e', 190}, /* æ */
+! {'o', '/', 191}, /* ø */
+! {'~', '?', 192}, /* ¿ */
+! {'~', '!', 193}, /* ¡ */
+! {'-', ',', 194}, /* ¬ */
+! {'v', '-', 195}, /* ~H XX */
+! {'f', '-', 196}, /* Ÿ */
+! {'~', '~', 197}, /* ‰ */
+! {'D', 'E', 198}, /*  */
+! {'<', '<', 199}, /* « */
+! {'>', '>', 200}, /* » */
+! {'.', ':', 201}, /* Š */
+! {'A', '`', 203}, /* À */
+! {'A', '~', 204}, /* Ã */
+! {'O', '~', 205}, /* Õ */
+! {'O', 'E', 206}, /* ‘ */
+! {'o', 'e', 207}, /* ¦ */
+! {'-', '.', 208}, /* - */
+! {'-', '-', 209}, /* - */
+! {'`', '`', 210}, /* " */
+! {'\'', '\'', 211}, /* " */
+! {'`', ' ', 212}, /* ' */
+! {'\'', ' ', 213}, /* ' */
+! {'-', ':', 214}, /* ÷ */
+! {'D', 'I', 215}, /* × */
+! {'y', ':', 216}, /* ÿ */
+! {'Y', ':', 217}, /*  */
+! {'/', '/', 218}, /* Ž */
+! {'E', '=', 219}, /* ¤ Euro System >=8.5 */
+! {'o', 'x', 219}, /* ¤ Currency System <=8.1*/
+! {'<', ' ', 220}, /* Ð */
+! {'>', ' ', 221}, /* ð */
+! {'f', 'i', 222}, /* Þ */
+! {'f', 'l', 223}, /* þ */
+! {'+', '+', 224}, /* ý */
+! {'~', '.', 225}, /* · */
+! {',', ' ', 226}, /* ’ */
+! {',', ',', 227}, /* “ */
+! {'%', '.', 228}, /* ” */
+! {'%', '0', 228}, /* ” */
+! {'A', '^', 229}, /* Â */
+! {'E', '^', 230}, /* Ê */
+! {'A', '\'', 231}, /* Á */
+! {'E', '"', 232}, /* Ë */
+! {'E', '`', 233}, /* È */
+! {'I', '\'', 234}, /* Í */
+! {'I', '^', 235}, /* Î */
+! {'I', '"', 236}, /* Ï */
+! {'I', '`', 237}, /* Ì */
+! {'O', '\'', 238}, /* Ó */
+! {'O', '^', 239}, /* Ô */
+! {'A', 'P', 240}, /* • */
+! {'O', '`', 241}, /* Ò */
+! {'U', '\'', 242}, /* Ú */
+! {'U', '^', 243}, /* Û */
+! {'U', '`', 244}, /* Ù */
+! {'i', '.', 245}, /* ž */
+! {NUL, NUL, NUL}
+! };
+!
+! # else /* !MACOS_X */
+!
+! # ifdef OLD_DIGRAPHS
+
+ /*
+ * digraphs compatible with Vim 5.x
+--- 316,322 ----
+ };
+
+ # else
+! # ifdef OLD_DIGRAPHS
+
+ /*
+ * digraphs compatible with Vim 5.x
+***************
+*** 557,563 ****
+ {'y', '"', 255}, /* x XX */
+ {NUL, NUL, NUL}
+ };
+! # else /* OLD_DIGRAPHS */
+
+ /*
+ * digraphs for Unicode from RFC1345
+--- 423,429 ----
+ {'y', '"', 255}, /* x XX */
+ {NUL, NUL, NUL}
+ };
+! # else /* OLD_DIGRAPHS */
+
+ /*
+ * digraphs for Unicode from RFC1345
+***************
+*** 792,798 ****
+ {'y', ':', 0xff},
+ {'y', '"', 0xff}, // x XX Vim 5.x compatible
+
+- # ifdef FEAT_MBYTE
+ # define USE_UNICODE_DIGRAPHS
+
+ {'A', '-', 0x0100},
+--- 658,663 ----
+***************
+*** 1957,1970 ****
+ {'f', 'l', 0xfb02},
+ {'f', 't', 0xfb05},
+ {'s', 't', 0xfb06},
+- # endif /* FEAT_MBYTE */
+
+ {NUL, NUL, NUL}
+ };
+
+! # endif /* OLD_DIGRAPHS */
+!
+! # endif /* Macintosh */
+ # endif /* EBCDIC */
+ # endif /* !HPUX_DIGRAPHS */
+ #endif /* !__MINT__ */
+--- 1822,1832 ----
+ {'f', 'l', 0xfb02},
+ {'f', 't', 0xfb05},
+ {'s', 't', 0xfb06},
+
+ {NUL, NUL, NUL}
+ };
+
+! # endif /* OLD_DIGRAPHS */
+ # endif /* EBCDIC */
+ # endif /* !HPUX_DIGRAPHS */
+ #endif /* !__MINT__ */
+***************
+*** 2141,2148 ****
+ ++dp;
+ }
+ }
+! #ifdef FEAT_MBYTE
+! # ifdef USE_UNICODE_DIGRAPHS
+ if (retval != 0 && !enc_utf8)
+ {
+ char_u buf[6], *to;
+--- 2003,2009 ----
+ ++dp;
+ }
+ }
+! #ifdef USE_UNICODE_DIGRAPHS
+ if (retval != 0 && !enc_utf8)
+ {
+ char_u buf[6], *to;
+***************
+*** 2166,2177 ****
+ (void)convert_setup(&vc, NULL, NULL);
+ }
+ }
+! # endif
+
+ /* Ignore multi-byte characters when not in multi-byte mode. */
+ if (!has_mbyte && retval > 0xff)
+ retval = 0;
+- #endif
+
+ if (retval == 0) /* digraph deleted or not found */
+ {
+--- 2027,2037 ----
+ (void)convert_setup(&vc, NULL, NULL);
+ }
+ }
+! #endif
+
+ /* Ignore multi-byte characters when not in multi-byte mode. */
+ if (!has_mbyte && retval > 0xff)
+ retval = 0;
+
+ if (retval == 0) /* digraph deleted or not found */
+ {
+***************
+*** 2297,2306 ****
+ #else
+
+ if (getexactdigraph(dp->char1, dp->char2, FALSE) == dp->result
+! # ifdef FEAT_MBYTE
+! && (has_mbyte || dp->result <= 255)
+! # endif
+! )
+ printdigraph(dp, use_headers ? &previous : NULL);
+ #endif
+ ++dp;
+--- 2157,2163 ----
+ #else
+
+ if (getexactdigraph(dp->char1, dp->char2, FALSE) == dp->result
+! && (has_mbyte || dp->result <= 255))
+ printdigraph(dp, use_headers ? &previous : NULL);
+ #endif
+ ++dp;
+***************
+*** 2364,2374 ****
+
+ int list_width;
+
+! if ((dy_flags & DY_UHEX)
+! #ifdef FEAT_MBYTE
+! || has_mbyte
+! #endif
+! )
+ list_width = 13;
+ else
+ list_width = 11;
+--- 2221,2227 ----
+
+ int list_width;
+
+! if ((dy_flags & DY_UHEX) || has_mbyte)
+ list_width = 13;
+ else
+ list_width = 11;
+***************
+*** 2404,2410 ****
+ *p = NUL;
+ msg_outtrans(buf);
+ p = buf;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* add a space to draw a composing char on */
+--- 2257,2262 ----
+***************
+*** 2413,2419 ****
+ p += (*mb_char2bytes)(dp->result, p);
+ }
+ else
+- #endif
+ *p++ = (char_u)dp->result;
+ *p = NUL;
+ msg_outtrans_attr(buf, HL_ATTR(HLF_8));
+--- 2265,2270 ----
+***************
+*** 2465,2485 ****
+
+ /* Source the keymap file. It will contain a ":loadkeymap" command
+ * which will call ex_loadkeymap() below. */
+! buflen = STRLEN(curbuf->b_p_keymap)
+! # ifdef FEAT_MBYTE
+! + STRLEN(p_enc)
+! # endif
+! + 14;
+ buf = alloc((unsigned)buflen);
+ if (buf == NULL)
+ return e_outofmem;
+
+- # ifdef FEAT_MBYTE
+ /* try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath' */
+ vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim",
+ curbuf->b_p_keymap, p_enc);
+ if (source_runtime(buf, 0) == FAIL)
+- # endif
+ {
+ /* try finding "keymap/'keymap'.vim" in 'runtimepath' */
+ vim_snprintf((char *)buf, buflen, "keymap/%s.vim",
+--- 2316,2330 ----
+
+ /* Source the keymap file. It will contain a ":loadkeymap" command
+ * which will call ex_loadkeymap() below. */
+! buflen = STRLEN(curbuf->b_p_keymap) + STRLEN(p_enc) + 14;
+ buf = alloc((unsigned)buflen);
+ if (buf == NULL)
+ return e_outofmem;
+
+ /* try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath' */
+ vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim",
+ curbuf->b_p_keymap, p_enc);
+ if (source_runtime(buf, 0) == FAIL)
+ {
+ /* try finding "keymap/'keymap'.vim" in 'runtimepath' */
+ vim_snprintf((char *)buf, buflen, "keymap/%s.vim",
+*** ../vim-8.1.0804/src/edit.c 2019-01-22 22:08:05.227676880 +0100
+--- src/edit.c 2019-01-24 14:29:03.005638715 +0100
+***************
+*** 212,220 ****
+ static void stop_insert(pos_T *end_insert_pos, int esc, int nomove);
+ static int echeck_abbr(int);
+ static void replace_join(int off);
+- #ifdef FEAT_MBYTE
+ static void mb_replace_pop_ins(int cc);
+- #endif
+ static void replace_flush(void);
+ static void replace_do_bs(int limit_col);
+ static int del_char_after_col(int limit_col);
+--- 212,218 ----
+***************
+*** 567,580 ****
+ {
+ if (ptr[1] == NUL)
+ ++curwin->w_cursor.col;
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ {
+ i = (*mb_ptr2len)(ptr);
+ if (ptr[i] == NUL)
+ curwin->w_cursor.col += i;
+ }
+- #endif
+ }
+ ins_at_eol = FALSE;
+ }
+--- 565,576 ----
+***************
+*** 1580,1591 ****
+ * special character. Let CTRL-] expand abbreviations without
+ * inserting it. */
+ if (vim_iswordc(c) || (!echeck_abbr(
+! #ifdef FEAT_MBYTE
+! /* Add ABBR_OFF for characters above 0x100, this is
+! * what check_abbr() expects. */
+! (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) :
+! #endif
+! c) && c != Ctrl_RSB))
+ {
+ insert_special(c, FALSE, FALSE);
+ #ifdef FEAT_RIGHTLEFT
+--- 1576,1585 ----
+ * special character. Let CTRL-] expand abbreviations without
+ * inserting it. */
+ if (vim_iswordc(c) || (!echeck_abbr(
+! // Add ABBR_OFF for characters above 0x100, this is
+! // what check_abbr() expects.
+! (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) : c)
+! && c != Ctrl_RSB))
+ {
+ insert_special(c, FALSE, FALSE);
+ #ifdef FEAT_RIGHTLEFT
+***************
+*** 1835,1848 ****
+ attr = 0;
+ pc_row = W_WINROW(curwin) + curwin->w_wrow;
+ pc_col = curwin->w_wincol;
+- #if defined(FEAT_RIGHTLEFT) || defined(FEAT_MBYTE)
+ pc_status = PC_STATUS_UNSET;
+- #endif
+ #ifdef FEAT_RIGHTLEFT
+ if (curwin->w_p_rl)
+ {
+ pc_col += curwin->w_width - 1 - curwin->w_wcol;
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int fix_col = mb_fix_col(pc_col, pc_row);
+--- 1829,1839 ----
+***************
+*** 1854,1875 ****
+ pc_status = PC_STATUS_RIGHT;
+ }
+ }
+- # endif
+ }
+ else
+ #endif
+ {
+ pc_col += curwin->w_wcol;
+- #ifdef FEAT_MBYTE
+ if (mb_lefthalve(pc_row, pc_col))
+ pc_status = PC_STATUS_LEFT;
+- #endif
+ }
+
+ /* save the character to be able to put it back */
+- #if defined(FEAT_RIGHTLEFT) || defined(FEAT_MBYTE)
+ if (pc_status == PC_STATUS_UNSET)
+- #endif
+ {
+ screen_getbytes(pc_row, pc_col, pc_bytes, &pc_attr);
+ pc_status = PC_STATUS_SET;
+--- 1845,1861 ----
+***************
+*** 1953,1965 ****
+ {
+ if (pc_status != PC_STATUS_UNSET && pc_row >= msg_scrolled)
+ {
+- #if defined(FEAT_MBYTE)
+ 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);
+ else
+- #endif
+ screen_puts(pc_bytes, pc_row - msg_scrolled, pc_col, pc_attr);
+ }
+ }
+--- 1939,1949 ----
+***************
+*** 1979,1985 ****
+ cursor_off();
+ save_col = curwin->w_cursor.col;
+ curwin->w_cursor.col = col;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ char_u *p;
+--- 1963,1968 ----
+***************
+*** 1988,1994 ****
+ p = ml_get_curline();
+ curwin->w_cursor.col -= (*mb_head_off)(p, p + col);
+ }
+- #endif
+ curs_columns(FALSE); /* recompute w_wrow and w_wcol */
+ if (curwin->w_wcol < curwin->w_width)
+ {
+--- 1971,1976 ----
+***************
+*** 2132,2142 ****
+ while (vcol <= (int)curwin->w_virtcol)
+ {
+ last_vcol = vcol;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && new_cursor_col >= 0)
+ new_cursor_col += (*mb_ptr2len)(ptr + new_cursor_col);
+ else
+- #endif
+ ++new_cursor_col;
+ vcol += lbr_chartabsize(ptr, ptr + new_cursor_col, (colnr_T)vcol);
+ }
+--- 2114,2122 ----
+***************
+*** 2302,2308 ****
+ static int
+ del_char_after_col(int limit_col UNUSED)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && limit_col >= 0)
+ {
+ colnr_T ecol = curwin->w_cursor.col + 1;
+--- 2282,2287 ----
+***************
+*** 2324,2330 ****
+ del_bytes((long)((int)ecol - curwin->w_cursor.col), FALSE, TRUE);
+ }
+ else
+- #endif
+ (void)del_char(FALSE);
+ return TRUE;
+ }
+--- 2303,2308 ----
+***************
+*** 2529,2535 ****
+ /* Infer case of completed part. */
+
+ /* Find actual length of completion. */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ p = str;
+--- 2507,2512 ----
+***************
+*** 2541,2551 ****
+ }
+ }
+ else
+- #endif
+ actual_len = len;
+
+ /* Find actual length of original text. */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ p = compl_orig_text;
+--- 2518,2526 ----
+***************
+*** 2557,2563 ****
+ }
+ }
+ else
+- #endif
+ actual_compl_length = compl_length;
+
+ /* "actual_len" may be smaller than "actual_compl_length" when using
+--- 2532,2537 ----
+***************
+*** 2571,2592 ****
+ {
+ p = str;
+ for (i = 0; i < actual_len; ++i)
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ wca[i] = mb_ptr2char_adv(&p);
+ else
+- #endif
+ wca[i] = *(p++);
+
+ /* Rule 1: Were any chars converted to lower? */
+ p = compl_orig_text;
+ for (i = 0; i < min_len; ++i)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_ptr2char_adv(&p);
+ else
+- #endif
+ c = *(p++);
+ if (MB_ISLOWER(c))
+ {
+--- 2545,2562 ----
+***************
+*** 2610,2620 ****
+ p = compl_orig_text;
+ for (i = 0; i < min_len; ++i)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_ptr2char_adv(&p);
+ else
+- #endif
+ c = *(p++);
+ if (was_letter && MB_ISUPPER(c) && MB_ISLOWER(wca[i]))
+ {
+--- 2580,2588 ----
+***************
+*** 2631,2641 ****
+ p = compl_orig_text;
+ for (i = 0; i < min_len; ++i)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_ptr2char_adv(&p);
+ else
+- #endif
+ c = *(p++);
+ if (MB_ISLOWER(c))
+ wca[i] = MB_TOLOWER(wca[i]);
+--- 2599,2607 ----
+***************
+*** 2652,2662 ****
+ p = IObuff;
+ i = 0;
+ while (i < actual_len && (p - IObuff + 6) < IOSIZE)
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ p += (*mb_char2bytes)(wca[i++], p);
+ else
+- #endif
+ *(p++) = wca[i++];
+ *p = NUL;
+
+--- 2618,2626 ----
+***************
+*** 2837,2850 ****
+ s = match->cp_str;
+ while (*p != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ c1 = mb_ptr2char(p);
+ c2 = mb_ptr2char(s);
+ }
+ else
+- #endif
+ {
+ c1 = *p;
+ c2 = *s;
+--- 2801,2812 ----
+***************
+*** 2852,2865 ****
+ if (match->cp_icase ? (MB_TOLOWER(c1) != MB_TOLOWER(c2))
+ : (c1 != c2))
+ break;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ MB_PTR_ADV(p);
+ MB_PTR_ADV(s);
+ }
+ else
+- #endif
+ {
+ ++p;
+ ++s;
+--- 2814,2825 ----
+***************
+*** 3426,3432 ****
+ wstart = ptr;
+
+ /* Find end of the word. */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ /* Japanese words may have characters in
+ * different classes, only separate words
+--- 3386,3391 ----
+***************
+*** 3440,3446 ****
+ ptr += l;
+ }
+ else
+- #endif
+ ptr = find_word_end(ptr);
+
+ /* Add the word. Skip the regexp match. */
+--- 3399,3404 ----
+***************
+*** 3475,3486 ****
+ char_u *
+ find_word_start(char_u *ptr)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ while (*ptr != NUL && *ptr != '\n' && mb_get_class(ptr) <= 1)
+ ptr += (*mb_ptr2len)(ptr);
+ else
+- #endif
+ while (*ptr != NUL && *ptr != '\n' && !vim_iswordc(*ptr))
+ ++ptr;
+ return ptr;
+--- 3433,3442 ----
+***************
+*** 3493,3499 ****
+ char_u *
+ find_word_end(char_u *ptr)
+ {
+- #ifdef FEAT_MBYTE
+ int start_class;
+
+ if (has_mbyte)
+--- 3449,3454 ----
+***************
+*** 3508,3514 ****
+ }
+ }
+ else
+- #endif
+ while (vim_iswordc(*ptr))
+ ++ptr;
+ return ptr;
+--- 3463,3468 ----
+***************
+*** 3719,3731 ****
+ static void
+ ins_compl_addleader(int c)
+ {
+- #ifdef FEAT_MBYTE
+ int cc;
+- #endif
+
+ if (stop_arrow() == FAIL)
+ return;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (cc = (*mb_char2len)(c)) > 1)
+ {
+ char_u buf[MB_MAXBYTES + 1];
+--- 3673,3682 ----
+***************
+*** 3737,3743 ****
+ AppendToRedobuff(buf);
+ }
+ else
+- #endif
+ {
+ ins_char(c);
+ if (compl_opt_refresh_always)
+--- 3688,3693 ----
+***************
+*** 4155,4164 ****
+ p = compl_orig_text;
+ for (len = 0; p[len] != NUL && p[len] == ptr[len]; ++len)
+ ;
+- #ifdef FEAT_MBYTE
+ if (len > 0)
+ len -= (*mb_head_off)(p, p + len);
+- #endif
+ for (p += len; *p != NUL; MB_PTR_ADV(p))
+ AppendCharToRedobuff(K_BS);
+ }
+--- 4105,4112 ----
+***************
+*** 5416,5440 ****
+ return FAIL;
+ if (!vim_iswordp(line + compl_col)
+ || (compl_col > 0
+! && (
+! #ifdef FEAT_MBYTE
+! vim_iswordp(mb_prevptr(line, line + compl_col))
+! #else
+! vim_iswordc(line[compl_col - 1])
+! #endif
+! )))
+ prefix = (char_u *)"";
+ STRCPY((char *)compl_pattern, prefix);
+ (void)quote_meta(compl_pattern + STRLEN(prefix),
+ line + compl_col, compl_length);
+ }
+! else if (--startcol < 0 ||
+! #ifdef FEAT_MBYTE
+! !vim_iswordp(mb_prevptr(line, line + startcol + 1))
+! #else
+! !vim_iswordc(line[startcol])
+! #endif
+! )
+ {
+ /* Match any word of at least two chars */
+ compl_pattern = vim_strsave((char_u *)"\\<\\k\\k");
+--- 5364,5377 ----
+ return FAIL;
+ if (!vim_iswordp(line + compl_col)
+ || (compl_col > 0
+! && (vim_iswordp(mb_prevptr(line, line + compl_col)))))
+ prefix = (char_u *)"";
+ STRCPY((char *)compl_pattern, prefix);
+ (void)quote_meta(compl_pattern + STRLEN(prefix),
+ line + compl_col, compl_length);
+ }
+! else if (--startcol < 0
+! || !vim_iswordp(mb_prevptr(line, line + startcol + 1)))
+ {
+ /* Match any word of at least two chars */
+ compl_pattern = vim_strsave((char_u *)"\\<\\k\\k");
+***************
+*** 5445,5451 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ /* Search the point of change class of multibyte character
+ * or not a word single byte character backward. */
+ if (has_mbyte)
+--- 5382,5387 ----
+***************
+*** 5465,5471 ****
+ }
+ }
+ else
+- #endif
+ while (--startcol >= 0 && vim_iswordc(line[startcol]))
+ ;
+ compl_col += ++startcol;
+--- 5401,5406 ----
+***************
+*** 5956,5962 ****
+ }
+ if (dest != NULL)
+ *dest++ = *src;
+- # ifdef FEAT_MBYTE
+ /* Copy remaining bytes of a multibyte character. */
+ if (has_mbyte)
+ {
+--- 5891,5896 ----
+***************
+*** 5972,5978 ****
+ *dest++ = *src;
+ }
+ }
+- # endif
+ }
+ if (dest != NULL)
+ *dest = NUL;
+--- 5906,5911 ----
+***************
+*** 5995,6003 ****
+ int i;
+ int hex = FALSE;
+ int octal = FALSE;
+- #ifdef FEAT_MBYTE
+ int unicode = 0;
+- #endif
+
+ if (got_int)
+ return Ctrl_C;
+--- 5928,5934 ----
+***************
+*** 6022,6049 ****
+ {
+ nc = plain_vgetc();
+ #ifdef FEAT_CMDL_INFO
+! if (!(State & CMDLINE)
+! # ifdef FEAT_MBYTE
+! && MB_BYTE2LEN_CHECK(nc) == 1
+! # endif
+! )
+ add_to_showcmd(nc);
+ #endif
+ if (nc == 'x' || nc == 'X')
+ hex = TRUE;
+ else if (nc == 'o' || nc == 'O')
+ octal = TRUE;
+- #ifdef FEAT_MBYTE
+ else if (nc == 'u' || nc == 'U')
+ unicode = nc;
+- #endif
+ else
+ {
+! if (hex
+! #ifdef FEAT_MBYTE
+! || unicode != 0
+! #endif
+! )
+ {
+ if (!vim_isxdigit(nc))
+ break;
+--- 5953,5970 ----
+ {
+ nc = plain_vgetc();
+ #ifdef FEAT_CMDL_INFO
+! if (!(State & CMDLINE) && MB_BYTE2LEN_CHECK(nc) == 1)
+ add_to_showcmd(nc);
+ #endif
+ if (nc == 'x' || nc == 'X')
+ hex = TRUE;
+ else if (nc == 'o' || nc == 'O')
+ octal = TRUE;
+ else if (nc == 'u' || nc == 'U')
+ unicode = nc;
+ else
+ {
+! if (hex || unicode != 0)
+ {
+ if (!vim_isxdigit(nc))
+ break;
+***************
+*** 6065,6075 ****
+ ++i;
+ }
+
+! if (cc > 255
+! #ifdef FEAT_MBYTE
+! && unicode == 0
+! #endif
+! )
+ cc = 255; /* limit range to 0-255 */
+ nc = 0;
+
+--- 5986,5992 ----
+ ++i;
+ }
+
+! if (cc > 255 && unicode == 0)
+ cc = 255; /* limit range to 0-255 */
+ nc = 0;
+
+***************
+*** 6078,6090 ****
+ if (i >= 2)
+ break;
+ }
+- #ifdef FEAT_MBYTE
+ else if (unicode) /* Unicode: up to four or eight chars */
+ {
+ if ((unicode == 'u' && i >= 4) || (unicode == 'U' && i >= 8))
+ break;
+ }
+- #endif
+ else if (i >= 3) /* decimal or octal: up to three chars */
+ break;
+ }
+--- 5995,6005 ----
+***************
+*** 6104,6114 ****
+
+ if (cc == 0) /* NUL is stored as NL */
+ cc = '\n';
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs && (cc & 0xff) == 0)
+ cc = '?'; /* don't accept an illegal DBCS char, the NUL in the
+ second byte will cause trouble! */
+- #endif
+
+ --no_mapping;
+ #ifdef FEAT_GUI
+--- 6019,6027 ----
+***************
+*** 6179,6189 ****
+ # define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL || (c) == '0' || (c) == '^')
+ #endif
+
+! #ifdef FEAT_MBYTE
+! # define WHITECHAR(cc) (VIM_ISWHITE(cc) && (!enc_utf8 || !utf_iscomposing(utf_ptr2char(ml_get_cursor() + 1))))
+! #else
+! # define WHITECHAR(cc) VIM_ISWHITE(cc)
+! #endif
+
+ /*
+ * "flags": INSCHAR_FORMAT - force formatting
+--- 6092,6098 ----
+ # define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL || (c) == '0' || (c) == '^')
+ #endif
+
+! #define WHITECHAR(cc) (VIM_ISWHITE(cc) && (!enc_utf8 || !utf_iscomposing(utf_ptr2char(ml_get_cursor() + 1))))
+
+ /*
+ * "flags": INSCHAR_FORMAT - force formatting
+***************
+*** 6340,6348 ****
+ #endif
+
+ if ( !ISSPECIAL(c)
+- #ifdef FEAT_MBYTE
+ && (!has_mbyte || (*mb_char2len)(c) == 1)
+- #endif
+ && !has_insertcharpre()
+ && vpeekc() != NUL
+ && !(State & REPLACE_FLAG)
+--- 6249,6255 ----
+***************
+*** 6373,6381 ****
+ */
+ while ( (c = vpeekc()) != NUL
+ && !ISSPECIAL(c)
+- #ifdef FEAT_MBYTE
+ && (!has_mbyte || MB_BYTE2LEN_CHECK(c) == 1)
+- #endif
+ && i < INPUT_BUFLEN
+ # ifdef FEAT_FKMAP
+ && !(p_fkmap && KeyTyped) /* Farsi mode mapping moves cursor */
+--- 6280,6286 ----
+***************
+*** 6412,6418 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ int cc;
+
+ if (has_mbyte && (cc = (*mb_char2len)(c)) > 1)
+--- 6317,6322 ----
+***************
+*** 6425,6431 ****
+ AppendCharToRedobuff(c);
+ }
+ else
+- #endif
+ {
+ ins_char(c);
+ if (flags & INSCHAR_CTRLV)
+--- 6329,6334 ----
+***************
+*** 6454,6462 ****
+ int save_char = NUL;
+ int haveto_redraw = FALSE;
+ int fo_ins_blank = has_format_option(FO_INS_BLANK);
+- #ifdef FEAT_MBYTE
+ int fo_multibyte = has_format_option(FO_MBYTE_BREAK);
+- #endif
+ int fo_white_par = has_format_option(FO_WHITE_PAR);
+ int first_line = TRUE;
+ #ifdef FEAT_COMMENTS
+--- 6357,6363 ----
+***************
+*** 6613,6619 ****
+ if (curwin->w_cursor.col <= (colnr_T)wantcol)
+ break;
+ }
+- #ifdef FEAT_MBYTE
+ else if (cc >= 0x100 && fo_multibyte)
+ {
+ /* Break after or before a multi-byte character. */
+--- 6514,6519 ----
+***************
+*** 6660,6666 ****
+ if (curwin->w_cursor.col <= (colnr_T)wantcol)
+ break;
+ }
+- #endif
+ if (curwin->w_cursor.col == 0)
+ break;
+ dec_cursor();
+--- 6560,6565 ----
+***************
+*** 7350,7356 ****
+ char_u *
+ add_char2buf(int c, char_u *s)
+ {
+- #ifdef FEAT_MBYTE
+ char_u temp[MB_MAXBYTES + 1];
+ int i;
+ int len;
+--- 7249,7254 ----
+***************
+*** 7359,7365 ****
+ for (i = 0; i < len; ++i)
+ {
+ c = temp[i];
+- #endif
+ /* Need to escape K_SPECIAL and CSI like in the typeahead buffer. */
+ if (c == K_SPECIAL)
+ {
+--- 7257,7262 ----
+***************
+*** 7377,7385 ****
+ #endif
+ else
+ *s++ = c;
+- #ifdef FEAT_MBYTE
+ }
+- #endif
+ return s;
+ }
+
+--- 7274,7280 ----
+***************
+*** 7435,7447 ****
+
+ /* Adjust for multi-wide char (excluding TAB) */
+ ptr = ml_get_cursor();
+! coladvance(getviscol() + ((*ptr != TAB && vim_isprintc(
+! # ifdef FEAT_MBYTE
+! (*mb_ptr2char)(ptr)
+! # else
+! *ptr
+! # endif
+! ))
+ ? ptr2cells(ptr) : 1));
+ curwin->w_set_curswant = TRUE;
+ /* Return OK if the cursor moved, FAIL otherwise (at window edge). */
+--- 7330,7337 ----
+
+ /* Adjust for multi-wide char (excluding TAB) */
+ ptr = ml_get_cursor();
+! coladvance(getviscol() + ((*ptr != TAB
+! && vim_isprintc((*mb_ptr2char)(ptr)))
+ ? ptr2cells(ptr) : 1));
+ curwin->w_set_curswant = TRUE;
+ /* Return OK if the cursor moved, FAIL otherwise (at window edge). */
+***************
+*** 7454,7464 ****
+ if (*ptr == NUL)
+ return FAIL; /* already at the very end */
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ l = (*mb_ptr2len)(ptr);
+ else
+- #endif
+ l = 1;
+
+ /* move "l" bytes right, but don't end up on the NUL, unless 'virtualedit'
+--- 7344,7352 ----
+***************
+*** 7499,7508 ****
+ * 'breakindent' is not set and there are no multi-byte
+ * characters */
+ if ((*p_sbr == NUL && !curwin->w_p_bri
+! # ifdef FEAT_MBYTE
+! && !has_mbyte
+! # endif
+! ) || getviscol() < v)
+ break;
+ ++width;
+ }
+--- 7387,7393 ----
+ * 'breakindent' is not set and there are no multi-byte
+ * characters */
+ if ((*p_sbr == NUL && !curwin->w_p_bri
+! && !has_mbyte) || getviscol() < v)
+ break;
+ ++width;
+ }
+***************
+*** 7516,7528 ****
+
+ /* Adjust for multi-wide char (not a TAB) */
+ ptr = ml_get_cursor();
+! if (*ptr != TAB && vim_isprintc(
+! # ifdef FEAT_MBYTE
+! (*mb_ptr2char)(ptr)
+! # else
+! *ptr
+! # endif
+! ) && ptr2cells(ptr) > 1)
+ curwin->w_cursor.coladd = 0;
+ }
+
+--- 7401,7408 ----
+
+ /* Adjust for multi-wide char (not a TAB) */
+ ptr = ml_get_cursor();
+! if (*ptr != TAB && vim_isprintc((*mb_ptr2char)(ptr))
+! && ptr2cells(ptr) > 1)
+ curwin->w_cursor.coladd = 0;
+ }
+
+***************
+*** 7537,7548 ****
+ curwin->w_set_curswant = TRUE;
+ --curwin->w_cursor.col;
+
+- #ifdef FEAT_MBYTE
+ /* if the character on the left of the current cursor is a multi-byte
+ * character, move to its first byte */
+ if (has_mbyte)
+ mb_adjust_cursor();
+- #endif
+ return OK;
+ }
+
+--- 7417,7426 ----
+***************
+*** 7829,7835 ****
+ ++replace_stack_nr;
+ }
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Push a character onto the replace stack. Handles a multi-byte character in
+ * reverse byte order, so that the first byte is popped off first.
+--- 7707,7712 ----
+***************
+*** 7845,7851 ****
+ replace_push(p[j]);
+ return l;
+ }
+- #endif
+
+ /*
+ * Pop one item from the replace stack.
+--- 7722,7727 ----
+***************
+*** 7893,7909 ****
+ State = NORMAL; /* don't want REPLACE here */
+ while ((cc = replace_pop()) > 0)
+ {
+- #ifdef FEAT_MBYTE
+ mb_replace_pop_ins(cc);
+- #else
+- ins_char(cc);
+- #endif
+ dec_cursor();
+ }
+ State = oldState;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Insert bytes popped from the replace stack. "cc" is the first byte. If it
+ * indicates a multi-byte char, pop the other bytes too.
+--- 7769,7780 ----
+***************
+*** 7956,7962 ****
+ }
+ }
+ }
+- #endif
+
+ /*
+ * make the replace stack empty
+--- 7827,7832 ----
+***************
+*** 8012,8018 ****
+ getvcol(curwin, &curwin->w_cursor, NULL, &start_vcol, NULL);
+ orig_vcols = chartabsize(ml_get_cursor(), start_vcol);
+ }
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ (void)del_char_after_col(limit_col);
+--- 7882,7887 ----
+***************
+*** 8021,8027 ****
+ replace_push(cc);
+ }
+ else
+- #endif
+ {
+ pchar_cursor(cc);
+ if (State & VREPLACE_FLAG)
+--- 7890,7895 ----
+***************
+*** 8038,8046 ****
+ for (i = 0; i < ins_len; ++i)
+ {
+ vcol += chartabsize(p + i, vcol);
+- #ifdef FEAT_MBYTE
+ i += (*mb_ptr2len)(p) - 1;
+- #endif
+ }
+ vcol -= start_vcol;
+
+--- 7906,7912 ----
+***************
+*** 8329,8335 ****
+ /* Just completed a word, check if it starts with "look".
+ * search back for the start of a word. */
+ line = ml_get_curline();
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ char_u *n;
+--- 8195,8200 ----
+***************
+*** 8342,8348 ****
+ }
+ }
+ else
+- # endif
+ for (s = line + curwin->w_cursor.col; s > line; --s)
+ if (!vim_iswordc(s[-1]))
+ break;
+--- 8207,8212 ----
+***************
+*** 8823,8833 ****
+ #endif
+ {
+ --curwin->w_cursor.col;
+- #ifdef FEAT_MBYTE
+ /* Correct cursor for multi-byte character. */
+ if (has_mbyte)
+ mb_adjust_cursor();
+- #endif
+ }
+ }
+
+--- 8687,8695 ----
+***************
+*** 9137,9145 ****
+ int did_backspace = FALSE;
+ int in_indent;
+ int oldState;
+- #ifdef FEAT_MBYTE
+ int cpc[MAX_MCO]; /* composing characters */
+- #endif
+
+ /*
+ * can't delete anything in an empty file
+--- 8999,9005 ----
+***************
+*** 9287,9297 ****
+ while (cc > 0)
+ {
+ save_col = curwin->w_cursor.col;
+- #ifdef FEAT_MBYTE
+ mb_replace_pop_ins(cc);
+- #else
+- ins_char(cc);
+- #endif
+ curwin->w_cursor.col = save_col;
+ cc = replace_pop();
+ }
+--- 9147,9153 ----
+***************
+*** 9413,9424 ****
+ */
+ else
+ {
+- #ifdef FEAT_MBYTE
+ int cclass = 0, prev_cclass = 0;
+
+ if (has_mbyte)
+ cclass = mb_get_class(ml_get_cursor());
+- #endif
+ do
+ {
+ #ifdef FEAT_RIGHTLEFT
+--- 9269,9278 ----
+***************
+*** 9427,9440 ****
+ dec_cursor();
+
+ cc = gchar_cursor();
+- #ifdef FEAT_MBYTE
+ /* look multi-byte character class */
+ if (has_mbyte)
+ {
+ prev_cclass = cclass;
+ cclass = mb_get_class(ml_get_cursor());
+ }
+- #endif
+
+ /* start of word? */
+ if (mode == BACKSPACE_WORD && !vim_isspace(cc))
+--- 9281,9292 ----
+***************
+*** 9445,9454 ****
+ /* end of word? */
+ else if (mode == BACKSPACE_WORD_NOT_SPACE
+ && ((vim_isspace(cc) || vim_iswordc(cc) != temp)
+! #ifdef FEAT_MBYTE
+! || prev_cclass != cclass
+! #endif
+! ))
+ {
+ #ifdef FEAT_RIGHTLEFT
+ if (!revins_on)
+--- 9297,9303 ----
+ /* end of word? */
+ else if (mode == BACKSPACE_WORD_NOT_SPACE
+ && ((vim_isspace(cc) || vim_iswordc(cc) != temp)
+! || prev_cclass != cclass))
+ {
+ #ifdef FEAT_RIGHTLEFT
+ if (!revins_on)
+***************
+*** 9464,9475 ****
+ replace_do_bs(-1);
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && p_deco)
+ (void)utfc_ptr2char(ml_get_cursor(), cpc);
+- #endif
+ (void)del_char(FALSE);
+- #ifdef FEAT_MBYTE
+ /*
+ * If there are combining characters and 'delcombine' is set
+ * move the cursor back. Don't back up before the base
+--- 9313,9321 ----
+***************
+*** 9477,9483 ****
+ */
+ if (enc_utf8 && p_deco && cpc[0] != NUL)
+ inc_cursor();
+- #endif
+ #ifdef FEAT_RIGHTLEFT
+ if (revins_chars)
+ {
+--- 9323,9328 ----
+***************
+*** 9713,9723 ****
+ // won't get the end sequence.
+ break;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ idx += (*mb_char2bytes)(c, buf + idx);
+ else
+- #endif
+ buf[idx++] = c;
+ buf[idx] = NUL;
+ if (end != NULL && STRNCMP(buf, end, idx) == 0)
+--- 9558,9566 ----
+***************
+*** 9760,9770 ****
+ case PASTE_ONE_CHAR:
+ if (ret_char == -1)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ ret_char = (*mb_ptr2char)(buf);
+ else
+- #endif
+ ret_char = buf[0];
+ }
+ break;
+--- 9603,9611 ----
+***************
+*** 9972,9982 ****
+ else
+ #endif
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ curwin->w_cursor.col += (*mb_ptr2len)(ml_get_cursor());
+ else
+- #endif
+ ++curwin->w_cursor.col;
+ }
+
+--- 9813,9821 ----
+***************
+*** 10590,10600 ****
+ if ((colnr_T)temp > curwin->w_virtcol)
+ ptr = prev_ptr;
+
+- #ifdef FEAT_MBYTE
+ c = (*mb_ptr2char)(ptr);
+- #else
+- c = *ptr;
+- #endif
+ if (c == NUL)
+ vim_beep(BO_COPY);
+ return c;
+--- 10429,10435 ----
+***************
+*** 10773,10783 ****
+ if (!has_insertcharpre())
+ return NULL;
+
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ buf[(*mb_char2bytes)(c, buf)] = NUL;
+ else
+- # endif
+ {
+ buf[0] = c;
+ buf[1] = NUL;
+--- 10608,10616 ----
+*** ../vim-8.1.0804/src/eval.c 2019-01-24 13:58:05.817568979 +0100
+--- src/eval.c 2019-01-24 14:29:53.237302251 +0100
+***************
+*** 577,583 ****
+ VIM_CLEAR(redir_varname);
+ }
+
+- # if defined(FEAT_MBYTE) || defined(PROTO)
+ int
+ eval_charconvert(
+ char_u *enc_from,
+--- 577,582 ----
+***************
+*** 602,608 ****
+ return FAIL;
+ return OK;
+ }
+- # endif
+
+ # if defined(FEAT_POSTSCRIPT) || defined(PROTO)
+ int
+--- 601,606 ----
+***************
+*** 4998,5010 ****
+ nr = (nr << 4) + hex2nr(*p);
+ }
+ ++p;
+- #ifdef FEAT_MBYTE
+ /* For "\u" store the number according to
+ * 'encoding'. */
+ if (c != 'X')
+ name += (*mb_char2bytes)(nr, name);
+ else
+- #endif
+ *name++ = nr;
+ }
+ break;
+--- 4996,5006 ----
+***************
+*** 6704,6714 ****
+ {
+ char_u buf[MB_MAXBYTES + 1];
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ buf[(*mb_char2bytes)(c, buf)] = NUL;
+ else
+- #endif
+ {
+ buf[0] = c;
+ buf[1] = NUL;
+--- 6700,6708 ----
+***************
+*** 6885,6896 ****
+
+ if (eap->force_ff != 0)
+ len += 10; /* " ++ff=unix" */
+- # ifdef FEAT_MBYTE
+ if (eap->force_enc != 0)
+ len += (unsigned)STRLEN(eap->cmd + eap->force_enc) + 7;
+ if (eap->bad_char != 0)
+ len += 7 + 4; /* " ++bad=" + "keep" or "drop" */
+- # endif
+
+ newval = alloc(len + 1);
+ if (newval == NULL)
+--- 6879,6888 ----
+***************
+*** 6911,6917 ****
+ eap->force_ff == 'u' ? "unix"
+ : eap->force_ff == 'd' ? "dos"
+ : "mac");
+- #ifdef FEAT_MBYTE
+ if (eap->force_enc != 0)
+ sprintf((char *)newval + STRLEN(newval), " ++enc=%s",
+ eap->cmd + eap->force_enc);
+--- 6903,6908 ----
+***************
+*** 6921,6927 ****
+ STRCPY(newval + STRLEN(newval), " ++bad=drop");
+ else if (eap->bad_char != 0)
+ sprintf((char *)newval + STRLEN(newval), " ++bad=%c", eap->bad_char);
+- #endif
+ vimvars[VV_CMDARG].vv_str = newval;
+ return oldval;
+ }
+--- 6912,6917 ----
+***************
+*** 8432,8438 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int i = (*mb_ptr2len)(p);
+--- 8422,8427 ----
+***************
+*** 8441,8447 ****
+ p += i - 1;
+ }
+ else
+- #endif
+ (void)msg_outtrans_len_attr(p, 1, echo_attr);
+ }
+ }
+--- 8430,8435 ----
+***************
+*** 10082,10091 ****
+ /* Count the paths backward to find the beginning of the desired string. */
+ for (p = tfname + len - 1; p >= tfname; --p)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ p -= mb_head_off(tfname, p);
+- #endif
+ if (vim_ispathsep(*p))
+ {
+ if (sepcount == 0 || (hasTilde && sepcount == 1))
+--- 10070,10077 ----
+*** ../vim-8.1.0804/src/evalfunc.c 2019-01-23 21:14:59.161314629 +0100
+--- src/evalfunc.c 2019-01-24 14:33:04.500019700 +0100
+***************
+*** 2071,2079 ****
+ static void
+ byteidx(typval_T *argvars, typval_T *rettv, int comp UNUSED)
+ {
+- #ifdef FEAT_MBYTE
+ char_u *t;
+- #endif
+ char_u *str;
+ varnumber_T idx;
+
+--- 2071,2077 ----
+***************
+*** 2083,2089 ****
+ if (str == NULL || idx < 0)
+ return;
+
+- #ifdef FEAT_MBYTE
+ t = str;
+ for ( ; idx > 0; idx--)
+ {
+--- 2081,2086 ----
+***************
+*** 2095,2104 ****
+ t += (*mb_ptr2len)(t);
+ }
+ rettv->vval.v_number = (varnumber_T)(t - str);
+- #else
+- if ((size_t)idx <= STRLEN(str))
+- rettv->vval.v_number = idx;
+- #endif
+ }
+
+ /*
+--- 2092,2097 ----
+***************
+*** 2450,2456 ****
+ static void
+ f_char2nr(typval_T *argvars, typval_T *rettv)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int utf8 = 0;
+--- 2443,2448 ----
+***************
+*** 2464,2471 ****
+ rettv->vval.v_number = (*mb_ptr2char)(tv_get_string(&argvars[0]));
+ }
+ else
+! #endif
+! rettv->vval.v_number = tv_get_string(&argvars[0])[0];
+ }
+
+ /*
+--- 2456,2462 ----
+ rettv->vval.v_number = (*mb_ptr2char)(tv_get_string(&argvars[0]));
+ }
+ else
+! rettv->vval.v_number = tv_get_string(&argvars[0])[0];
+ }
+
+ /*
+***************
+*** 2536,2550 ****
+ if (curwin->w_cursor.coladd >= (colnr_T)chartabsize(p,
+ curwin->w_virtcol - curwin->w_cursor.coladd))
+ {
+- # ifdef FEAT_MBYTE
+ int l;
+
+ if (*p != NUL && p[(l = (*mb_ptr2len)(p))] == NUL)
+ col += l;
+- # else
+- if (*p != NUL && p[1] == NUL)
+- ++col;
+- # endif
+ }
+ }
+ #endif
+--- 2527,2536 ----
+***************
+*** 2904,2914 ****
+
+ /* Make sure the cursor is in a valid position. */
+ check_cursor();
+- #ifdef FEAT_MBYTE
+ /* Correct cursor for multi-byte character. */
+ if (has_mbyte)
+ mb_adjust_cursor();
+- #endif
+
+ curwin->w_set_curswant = set_curswant;
+ rettv->vval.v_number = 0;
+--- 2890,2898 ----
+***************
+*** 4888,4897 ****
+ temp[i++] = K_SECOND(n);
+ temp[i++] = K_THIRD(n);
+ }
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ i += (*mb_char2bytes)(n, temp + i);
+- #endif
+ else
+ temp[i++] = n;
+ temp[i++] = NUL;
+--- 4872,4879 ----
+***************
+*** 5439,5445 ****
+ dict_add_string(dict, "group", syn_id2name(cur->hlg_id));
+ dict_add_number(dict, "priority", (long)cur->priority);
+ dict_add_number(dict, "id", (long)cur->id);
+! # if defined(FEAT_CONCEAL) && defined(FEAT_MBYTE)
+ if (cur->conceal_char)
+ {
+ char_u buf[MB_MAXBYTES + 1];
+--- 5421,5427 ----
+ dict_add_string(dict, "group", syn_id2name(cur->hlg_id));
+ dict_add_number(dict, "priority", (long)cur->priority);
+ dict_add_number(dict, "id", (long)cur->id);
+! # if defined(FEAT_CONCEAL)
+ if (cur->conceal_char)
+ {
+ char_u buf[MB_MAXBYTES + 1];
+***************
+*** 6423,6431 ****
+ "mouse_xterm",
+ # endif
+ #endif
+- #ifdef FEAT_MBYTE
+ "multi_byte",
+- #endif
+ #ifdef FEAT_MBYTE_IME
+ "multi_byte_ime",
+ #endif
+--- 6405,6411 ----
+***************
+*** 6674,6683 ****
+ n = mch_input_isatty();
+ else if (STRICMP(name, "ttyout") == 0)
+ n = stdout_isatty;
+- #ifdef FEAT_MBYTE
+ else if (STRICMP(name, "multi_byte_encoding") == 0)
+ n = has_mbyte;
+- #endif
+ #if defined(FEAT_BEVAL) && defined(FEAT_GUI_W32)
+ else if (STRICMP(name, "balloon_multiline") == 0)
+ n = multiline_balloon_available();
+--- 6654,6661 ----
+***************
+*** 6965,6981 ****
+ static void
+ f_iconv(typval_T *argvars UNUSED, typval_T *rettv)
+ {
+- #ifdef FEAT_MBYTE
+ char_u buf1[NUMBUFLEN];
+ char_u buf2[NUMBUFLEN];
+ char_u *from, *to, *str;
+ vimconv_T vimconv;
+- #endif
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+- #ifdef FEAT_MBYTE
+ str = tv_get_string(&argvars[0]);
+ from = enc_canonize(enc_skip(tv_get_string_buf(&argvars[1], buf1)));
+ to = enc_canonize(enc_skip(tv_get_string_buf(&argvars[2], buf2)));
+--- 6943,6956 ----
+***************
+*** 6991,6997 ****
+ convert_setup(&vimconv, NULL, NULL);
+ vim_free(from);
+ vim_free(to);
+- #endif
+ }
+
+ /*
+--- 6966,6971 ----
+***************
+*** 8097,8108 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ startcol = (colnr_T)(regmatch.startp[0]
+ + (*mb_ptr2len)(regmatch.startp[0]) - str);
+- #else
+- startcol = (colnr_T)(regmatch.startp[0] + 1 - str);
+- #endif
+ if (startcol > (colnr_T)len
+ || str + startcol <= regmatch.startp[0])
+ {
+--- 8071,8078 ----
+***************
+*** 8712,8718 ****
+ {
+ char_u buf[NUMBUFLEN];
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int utf8 = 0;
+--- 8682,8687 ----
+***************
+*** 8725,8731 ****
+ buf[(*mb_char2bytes)((int)tv_get_number(&argvars[0]), buf)] = NUL;
+ }
+ else
+- #endif
+ {
+ buf[0] = (char_u)tv_get_number(&argvars[0]);
+ buf[1] = NUL;
+--- 8694,8699 ----
+***************
+*** 9175,9181 ****
+ }
+ else if (*p == NUL)
+ *p = '\n';
+- #ifdef FEAT_MBYTE
+ /* Check for utf8 "bom"; U+FEFF is encoded as EF BB BF. Do this
+ * when finding the BF and check the previous two bytes. */
+ else if (*p == 0xbf && enc_utf8 && !binary)
+--- 9143,9148 ----
+***************
+*** 9215,9221 ****
+ }
+ }
+ }
+- #endif
+ } /* for */
+
+ if (failed || (cnt >= maxline && maxline >= 0) || readlen <= 0)
+--- 9182,9187 ----
+***************
+*** 10386,10396 ****
+ else
+ {
+ off = LineOffset[row] + col;
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && ScreenLinesUC[off] != 0)
+ c = ScreenLinesUC[off];
+ else
+- #endif
+ c = ScreenLines[off];
+ }
+ rettv->vval.v_number = c;
+--- 10352,10360 ----
+***************
+*** 10910,10916 ****
+ csearch = dict_get_string(d, (char_u *)"char", FALSE);
+ if (csearch != NULL)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ int pcc[MAX_MCO];
+--- 10874,10879 ----
+***************
+*** 10919,10925 ****
+ set_last_csearch(c, csearch, utfc_ptr2len(csearch));
+ }
+ else
+- #endif
+ set_last_csearch(PTR2CHAR(csearch),
+ csearch, MB_PTR2LEN(csearch));
+ }
+--- 10882,10887 ----
+***************
+*** 12511,12528 ****
+ }
+ if (!match)
+ break;
+! /* Advance to just after the match. */
+ if (regmatch.endp[0] > str)
+ col = 0;
+ else
+! {
+! /* Don't get stuck at the same match. */
+! #ifdef FEAT_MBYTE
+ col = (*mb_ptr2len)(regmatch.endp[0]);
+- #else
+- col = 1;
+- #endif
+- }
+ str = regmatch.endp[0];
+ }
+
+--- 12473,12484 ----
+ }
+ if (!match)
+ break;
+! // Advance to just after the match.
+ if (regmatch.endp[0] > str)
+ col = 0;
+ else
+! // Don't get stuck at the same match.
+ col = (*mb_ptr2len)(regmatch.endp[0]);
+ str = regmatch.endp[0];
+ }
+
+***************
+*** 12632,12638 ****
+ rettv->vval.v_string = vim_strsave((char_u *)_("(Invalid)"));
+ else
+ {
+- # ifdef FEAT_MBYTE
+ vimconv_T conv;
+ char_u *enc;
+
+--- 12588,12593 ----
+***************
+*** 12641,12668 ****
+ convert_setup(&conv, p_enc, enc);
+ if (conv.vc_type != CONV_NONE)
+ p = string_convert(&conv, p, NULL);
+- # endif
+ if (p != NULL)
+ (void)strftime((char *)result_buf, sizeof(result_buf),
+ (char *)p, curtime);
+ else
+ result_buf[0] = NUL;
+
+- # ifdef FEAT_MBYTE
+ if (conv.vc_type != CONV_NONE)
+ vim_free(p);
+ convert_setup(&conv, enc, p_enc);
+ if (conv.vc_type != CONV_NONE)
+ rettv->vval.v_string = string_convert(&conv, result_buf, NULL);
+ else
+- # endif
+ rettv->vval.v_string = vim_strsave(result_buf);
+
+- # ifdef FEAT_MBYTE
+ /* Release conversion descriptors */
+ convert_setup(&conv, NULL, NULL);
+ vim_free(enc);
+- # endif
+ }
+ }
+ #endif
+--- 12596,12618 ----
+***************
+*** 12677,12682 ****
+--- 12627,12633 ----
+ int len;
+ int error = FALSE;
+ int charidx;
++ int byteidx = 0;
+
+ rettv->vval.v_number = -1;
+ str = tv_get_string_chk(&argvars[0]);
+***************
+*** 12686,12710 ****
+ charidx = (int)tv_get_number_chk(&argvars[1], &error);
+ if (error)
+ return;
+- #ifdef FEAT_MBYTE
+- {
+- int byteidx = 0;
+
+! while (charidx >= 0 && byteidx < len)
+ {
+! if (charidx == 0)
+! {
+! rettv->vval.v_number = mb_ptr2char(str + byteidx);
+! break;
+! }
+! --charidx;
+! byteidx += MB_CPTR2LEN(str + byteidx);
+ }
+ }
+- #else
+- if (charidx < len)
+- rettv->vval.v_number = str[charidx];
+- #endif
+ }
+
+ /*
+--- 12637,12653 ----
+ charidx = (int)tv_get_number_chk(&argvars[1], &error);
+ if (error)
+ return;
+
+! while (charidx >= 0 && byteidx < len)
+! {
+! if (charidx == 0)
+ {
+! rettv->vval.v_number = mb_ptr2char(str + byteidx);
+! break;
+ }
++ --charidx;
++ byteidx += MB_CPTR2LEN(str + byteidx);
+ }
+ }
+
+ /*
+***************
+*** 12777,12786 ****
+ {
+ char_u *s = tv_get_string(&argvars[0]);
+ int skipcc = 0;
+- #ifdef FEAT_MBYTE
+ varnumber_T len = 0;
+ int (*func_mb_ptr2char_adv)(char_u **pp);
+- #endif
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ skipcc = (int)tv_get_number_chk(&argvars[1], NULL);
+--- 12720,12727 ----
+***************
+*** 12788,12794 ****
+ emsg(_(e_invarg));
+ else
+ {
+- #ifdef FEAT_MBYTE
+ func_mb_ptr2char_adv = skipcc ? mb_ptr2char_adv : mb_cptr2char_adv;
+ while (*s != NUL)
+ {
+--- 12729,12734 ----
+***************
+*** 12796,12804 ****
+ ++len;
+ }
+ rettv->vval.v_number = len;
+- #else
+- rettv->vval.v_number = (varnumber_T)(STRLEN(s));
+- #endif
+ }
+ }
+
+--- 12736,12741 ----
+***************
+*** 12825,12837 ****
+ {
+ char_u *s = tv_get_string(&argvars[0]);
+
+! rettv->vval.v_number = (varnumber_T)(
+! #ifdef FEAT_MBYTE
+! mb_string2cells(s, -1)
+! #else
+! STRLEN(s)
+! #endif
+! );
+ }
+
+ /*
+--- 12762,12768 ----
+ {
+ char_u *s = tv_get_string(&argvars[0]);
+
+! rettv->vval.v_number = (varnumber_T)(mb_string2cells(s, -1));
+ }
+
+ /*
+***************
+*** 12840,12846 ****
+ static void
+ f_strcharpart(typval_T *argvars, typval_T *rettv)
+ {
+- #ifdef FEAT_MBYTE
+ char_u *p;
+ int nchar;
+ int nbyte = 0;
+--- 12771,12776 ----
+***************
+*** 12899,12907 ****
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = vim_strnsave(p + nbyte, len);
+- #else
+- f_strpart(argvars, rettv);
+- #endif
+ }
+
+ /*
+--- 12829,12834 ----
+***************
+*** 13278,13288 ****
+ cchar = (lcs_conceal == NUL) ? ' ' : lcs_conceal;
+ if (cchar != NUL)
+ {
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ (*mb_char2bytes)(cchar, str);
+ else
+- # endif
+ str[0] = cchar;
+ }
+ }
+--- 13205,13213 ----
+***************
+*** 14208,14214 ****
+ char_u *fromstr;
+ char_u *tostr;
+ char_u *p;
+- #ifdef FEAT_MBYTE
+ int inlen;
+ int fromlen;
+ int tolen;
+--- 14133,14138 ----
+***************
+*** 14216,14222 ****
+ char_u *cpstr;
+ int cplen;
+ int first = TRUE;
+- #endif
+ char_u buf[NUMBUFLEN];
+ char_u buf2[NUMBUFLEN];
+ garray_T ga;
+--- 14140,14145 ----
+***************
+*** 14232,14246 ****
+ return; /* type error; errmsg already given */
+ ga_init2(&ga, (int)sizeof(char), 80);
+
+- #ifdef FEAT_MBYTE
+ if (!has_mbyte)
+- #endif
+ /* not multi-byte: fromstr and tostr must be the same length */
+ if (STRLEN(fromstr) != STRLEN(tostr))
+ {
+- #ifdef FEAT_MBYTE
+ error:
+- #endif
+ semsg(_(e_invarg2), fromstr);
+ ga_clear(&ga);
+ return;
+--- 14155,14165 ----
+***************
+*** 14249,14255 ****
+ /* fromstr and tostr have to contain the same number of chars */
+ while (*in_str != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ inlen = (*mb_ptr2len)(in_str);
+--- 14168,14173 ----
+***************
+*** 14300,14306 ****
+ in_str += inlen;
+ }
+ else
+- #endif
+ {
+ /* When not using multi-byte chars we can do it faster. */
+ p = vim_strchr(fromstr, *in_str);
+--- 14218,14223 ----
+*** ../vim-8.1.0804/src/ex_cmds.c 2019-01-19 17:43:03.405449224 +0100
+--- src/ex_cmds.c 2019-01-24 14:35:27.375010277 +0100
+***************
+*** 50,56 ****
+ #ifdef FEAT_DIGRAPHS
+ char_u *dig;
+ #endif
+- #ifdef FEAT_MBYTE
+ int cc[MAX_MCO];
+ int ci = 0;
+ int len;
+--- 50,55 ----
+***************
+*** 58,64 ****
+ if (enc_utf8)
+ c = utfc_ptr2char(ml_get_cursor(), cc);
+ else
+- #endif
+ c = gchar_cursor();
+ if (c == NUL)
+ {
+--- 57,62 ----
+***************
+*** 66,75 ****
+ return;
+ }
+
+- #ifdef FEAT_MBYTE
+ IObuff[0] = NUL;
+ if (!has_mbyte || (enc_dbcs != 0 && c < 0x100) || c < 0x80)
+- #endif
+ {
+ if (c == NL) /* NUL is stored as NL */
+ c = NUL;
+--- 64,71 ----
+***************
+*** 106,120 ****
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("<%s>%s%s %d, Hex %02x, Octal %03o"),
+ transchar(c), buf1, buf2, cval, cval, cval);
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ c = cc[ci++];
+ else
+ c = 0;
+- #endif
+ }
+
+- #ifdef FEAT_MBYTE
+ /* Repeat for combining characters. */
+ while (has_mbyte && (c >= 0x100 || (enc_utf8 && c >= 0x80)))
+ {
+--- 102,113 ----
+***************
+*** 150,156 ****
+ else
+ c = 0;
+ }
+- #endif
+
+ msg((char *)IObuff);
+ }
+--- 143,148 ----
+***************
+*** 823,833 ****
+ if (ptr[col] == NUL)
+ break;
+ vcol += chartabsize(ptr + col, (colnr_T)vcol);
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ col += (*mb_ptr2len)(ptr + col);
+ else
+- #endif
+ ++col;
+ }
+ if (new_line == NULL) /* out of memory */
+--- 815,823 ----
+***************
+*** 2282,2290 ****
+ if ((vir.vir_line = alloc(LSIZE)) == NULL)
+ return;
+ vir.vir_fd = fp_in;
+- #ifdef FEAT_MBYTE
+ vir.vir_conv.vc_type = CONV_NONE;
+- #endif
+ ga_init2(&vir.vir_barlines, (int)sizeof(char_u *), 100);
+ vir.vir_version = -1;
+
+--- 2272,2278 ----
+***************
+*** 2321,2330 ****
+ VIM_VERSION_MEDIUM);
+ fputs(_("# You may edit it if you're careful!\n\n"), fp_out);
+ write_viminfo_version(fp_out);
+- #ifdef FEAT_MBYTE
+ fputs(_("# Value of 'encoding' when this file was written\n"), fp_out);
+ fprintf(fp_out, "*encoding=%s\n\n", p_enc);
+- #endif
+ write_viminfo_search_pattern(fp_out);
+ write_viminfo_sub_string(fp_out);
+ #ifdef FEAT_CMDHIST
+--- 2309,2316 ----
+***************
+*** 2353,2362 ****
+ }
+
+ vim_free(vir.vir_line);
+- #ifdef FEAT_MBYTE
+ if (vir.vir_conv.vc_type != CONV_NONE)
+ convert_setup(&vir.vir_conv, NULL, NULL);
+- #endif
+ ga_clear_strings(&vir.vir_barlines);
+ }
+
+--- 2339,2346 ----
+***************
+*** 2484,2490 ****
+ static int
+ viminfo_encoding(vir_T *virp)
+ {
+- #ifdef FEAT_MBYTE
+ char_u *p;
+ int i;
+
+--- 2468,2473 ----
+***************
+*** 2502,2508 ****
+ convert_setup(&virp->vir_conv, p, p_enc);
+ }
+ }
+- #endif
+ return viminfo_readline(virp);
+ }
+
+--- 2485,2490 ----
+***************
+*** 2574,2580 ****
+ }
+ *d = NUL;
+
+- #ifdef FEAT_MBYTE
+ if (convert && virp->vir_conv.vc_type != CONV_NONE && *retval != NUL)
+ {
+ d = string_convert(&virp->vir_conv, retval, NULL);
+--- 2556,2561 ----
+***************
+*** 2584,2590 ****
+ retval = d;
+ }
+ }
+- #endif
+
+ return retval;
+ }
+--- 2565,2570 ----
+***************
+*** 2708,2717 ****
+ int i;
+ int allocated = FALSE;
+ int eof;
+- #ifdef FEAT_MBYTE
+ char_u *sconv;
+ int converted;
+- #endif
+
+ while (*p == ',')
+ {
+--- 2688,2695 ----
+***************
+*** 2835,2841 ****
+ ++p;
+ s[len] = NUL;
+
+- #ifdef FEAT_MBYTE
+ converted = FALSE;
+ if (virp->vir_conv.vc_type != CONV_NONE && *s != NUL)
+ {
+--- 2813,2818 ----
+***************
+*** 2849,2855 ****
+ converted = TRUE;
+ }
+ }
+! #endif
+ /* Need to copy in allocated memory if the string wasn't allocated
+ * above and we did allocate before, thus vir_line may change. */
+ if (s != buf && allocated)
+--- 2826,2832 ----
+ converted = TRUE;
+ }
+ }
+!
+ /* Need to copy in allocated memory if the string wasn't allocated
+ * above and we did allocate before, thus vir_line may change. */
+ if (s != buf && allocated)
+***************
+*** 2857,2867 ****
+ value->bv_string = s;
+ value->bv_type = BVAL_STRING;
+ value->bv_len = len;
+! value->bv_allocated = allocated
+! #ifdef FEAT_MBYTE
+! || converted
+! #endif
+! ;
+ ++values->ga_len;
+ if (nextp != NULL)
+ {
+--- 2834,2840 ----
+ value->bv_string = s;
+ value->bv_type = BVAL_STRING;
+ value->bv_len = len;
+! value->bv_allocated = allocated || converted;
+ ++values->ga_len;
+ if (nextp != NULL)
+ {
+***************
+*** 4094,4102 ****
+ if (!oldbuf && eap != NULL)
+ {
+ set_file_options(TRUE, eap);
+- #ifdef FEAT_MBYTE
+ set_forced_fenc(eap);
+- #endif
+ }
+ }
+
+--- 4067,4073 ----
+***************
+*** 5317,5327 ****
+ else
+ {
+ /* search for a match at next column */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ matchcol += mb_ptr2len(sub_firstline + matchcol);
+ else
+- #endif
+ ++matchcol;
+ }
+ goto skip;
+--- 5288,5296 ----
+***************
+*** 5759,5768 ****
+ p1 = new_start - 1;
+ }
+ }
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ p1 += (*mb_ptr2len)(p1) - 1;
+- #endif
+ }
+
+ /*
+--- 5728,5735 ----
+***************
+*** 7017,7026 ****
+ FILE *fd;
+ char_u *s;
+ int fi;
+- #ifdef FEAT_MBYTE
+ vimconv_T vc;
+ char_u *cp;
+- #endif
+
+ /* Find all "doc/ *.txt" files in this directory. */
+ add_pathsep(NameBuff);
+--- 6984,6991 ----
+***************
+*** 7086,7094 ****
+ && (s = vim_strchr(IObuff + 1, '*'))
+ != NULL)
+ {
+- #ifdef FEAT_MBYTE
+ int this_utf = MAYBE;
+! #endif
+ /* Change tag definition to a
+ * reference and remove <CR>/<NL>. */
+ IObuff[0] = '|';
+--- 7051,7058 ----
+ && (s = vim_strchr(IObuff + 1, '*'))
+ != NULL)
+ {
+ int this_utf = MAYBE;
+!
+ /* Change tag definition to a
+ * reference and remove <CR>/<NL>. */
+ IObuff[0] = '|';
+***************
+*** 7097,7103 ****
+ {
+ if (*s == '\r' || *s == '\n')
+ *s = NUL;
+- #ifdef FEAT_MBYTE
+ /* The text is utf-8 when a byte
+ * above 127 is found and no
+ * illegal byte sequence is found.
+--- 7061,7066 ----
+***************
+*** 7112,7121 ****
+ this_utf = FALSE;
+ s += l - 1;
+ }
+- #endif
+ ++s;
+ }
+! #ifdef FEAT_MBYTE
+ /* The help file is latin1 or utf-8;
+ * conversion to the current
+ * 'encoding' may be required. */
+--- 7075,7083 ----
+ this_utf = FALSE;
+ s += l - 1;
+ }
+ ++s;
+ }
+!
+ /* The help file is latin1 or utf-8;
+ * conversion to the current
+ * 'encoding' may be required. */
+***************
+*** 7140,7149 ****
+ ml_append(lnum, cp, (colnr_T)0, FALSE);
+ if (cp != IObuff)
+ vim_free(cp);
+- #else
+- ml_append(lnum, IObuff, (colnr_T)0,
+- FALSE);
+- #endif
+ ++lnum;
+ }
+ fclose(fd);
+--- 7102,7107 ----
+***************
+*** 7199,7210 ****
+ int i;
+ char_u *fname;
+ int dirlen;
+- # ifdef FEAT_MBYTE
+ int utf8 = MAYBE;
+ int this_utf8;
+ int firstline;
+ int mix = FALSE; /* detected mixed encodings */
+- # endif
+
+ /*
+ * Find all *.txt files.
+--- 7157,7166 ----
+***************
+*** 7274,7285 ****
+ }
+ fname = files[fi] + dirlen + 1;
+
+- # ifdef FEAT_MBYTE
+ firstline = TRUE;
+- # endif
+ while (!vim_fgets(IObuff, IOSIZE, fd) && !got_int)
+ {
+- # ifdef FEAT_MBYTE
+ if (firstline)
+ {
+ /* Detect utf-8 file by a non-ASCII char in the first line. */
+--- 7230,7238 ----
+***************
+*** 7311,7317 ****
+ }
+ firstline = FALSE;
+ }
+- # endif
+ p1 = vim_strchr(IObuff, '*'); /* find first '*' */
+ while (p1 != NULL)
+ {
+--- 7264,7269 ----
+***************
+*** 7398,7407 ****
+ }
+ }
+
+- # ifdef FEAT_MBYTE
+ if (utf8 == TRUE)
+ fprintf(fd_tags, "!_TAG_FILE_ENCODING\tutf-8\t//\n");
+- # endif
+
+ /*
+ * Write the tags into the file.
+--- 7350,7357 ----
+***************
+*** 7426,7435 ****
+ }
+ }
+ }
+- #ifdef FEAT_MBYTE
+ if (mix)
+ got_int = FALSE; /* continue with other languages */
+- #endif
+
+ for (i = 0; i < ga.ga_len; ++i)
+ vim_free(((char_u **)ga.ga_data)[i]);
+--- 7376,7383 ----
+*** ../vim-8.1.0804/src/ex_cmds2.c 2019-01-20 15:30:36.881328770 +0100
+--- src/ex_cmds2.c 2019-01-24 14:36:07.666721980 +0100
+***************
+*** 1957,1963 ****
+ if (IObuff[IOSIZE - 2] != NUL && IObuff[IOSIZE - 2] != NL)
+ {
+ int n = IOSIZE - 2;
+! # ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ /* Move to the first byte of this char.
+--- 1957,1963 ----
+ if (IObuff[IOSIZE - 2] != NUL && IObuff[IOSIZE - 2] != NL)
+ {
+ int n = IOSIZE - 2;
+!
+ if (enc_utf8)
+ {
+ /* Move to the first byte of this char.
+***************
+*** 1968,1974 ****
+ }
+ else if (has_mbyte)
+ n -= mb_head_off(IObuff, IObuff + n);
+- # endif
+ IObuff[n] = NL;
+ IObuff[n + 1] = NUL;
+ }
+--- 1968,1973 ----
+***************
+*** 4254,4262 ****
+ int dbg_tick; /* debug_tick when breakpoint was set */
+ int level; /* top nesting level of sourced file */
+ #endif
+- #ifdef FEAT_MBYTE
+ vimconv_T conv; /* type of conversion */
+- #endif
+ };
+
+ #ifdef FEAT_EVAL
+--- 4253,4259 ----
+***************
+*** 4593,4599 ****
+ # endif
+ #endif
+
+- #ifdef FEAT_MBYTE
+ cookie.conv.vc_type = CONV_NONE; /* no conversion */
+
+ /* Read the first line so we can check for a UTF-8 BOM. */
+--- 4590,4595 ----
+***************
+*** 4612,4618 ****
+ firstline = p;
+ }
+ }
+- #endif
+
+ /*
+ * Call do_cmdline, which will call getsourceline() to get the lines.
+--- 4608,4613 ----
+***************
+*** 4683,4691 ****
+ fclose(cookie.fp);
+ vim_free(cookie.nextline);
+ vim_free(firstline);
+- #ifdef FEAT_MBYTE
+ convert_setup(&cookie.conv, NULL, NULL);
+- #endif
+
+ if (trigger_source_post)
+ apply_autocmds(EVENT_SOURCEPOST, fname_exp, fname_exp, FALSE, curbuf);
+--- 4678,4684 ----
+***************
+*** 4924,4930 ****
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ if (line != NULL && sp->conv.vc_type != CONV_NONE)
+ {
+ char_u *s;
+--- 4917,4922 ----
+***************
+*** 4937,4943 ****
+ line = s;
+ }
+ }
+- #endif
+
+ #ifdef FEAT_EVAL
+ /* Did we encounter a breakpoint? */
+--- 4929,4934 ----
+***************
+*** 5194,5200 ****
+ void
+ ex_scriptencoding(exarg_T *eap UNUSED)
+ {
+- #ifdef FEAT_MBYTE
+ struct source_cookie *sp;
+ char_u *name;
+
+--- 5185,5190 ----
+***************
+*** 5219,5225 ****
+
+ if (name != eap->arg)
+ vim_free(name);
+- #endif
+ }
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+--- 5209,5214 ----
+*** ../vim-8.1.0804/src/ex_docmd.c 2019-01-24 13:34:37.815464545 +0100
+--- src/ex_docmd.c 2019-01-24 14:38:50.885564621 +0100
+***************
+*** 404,411 ****
+ # define ex_foldopen ex_ni
+ # define ex_folddo ex_ni
+ #endif
+! #if !((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+! && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)))
+ # define ex_language ex_ni
+ #endif
+ #ifndef FEAT_SIGNS
+--- 404,410 ----
+ # define ex_foldopen ex_ni
+ # define ex_folddo ex_ni
+ #endif
+! #if !(defined(HAVE_LOCALE_H) || defined(X_LOCALE))
+ # define ex_language ex_ni
+ #endif
+ #ifndef FEAT_SIGNS
+***************
+*** 1550,1556 ****
+ #endif
+ }
+
+- #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * If "fgetline" is get_loop_line(), return the cookie used by the original
+ * getline function. Otherwise return "cookie".
+--- 1549,1554 ----
+***************
+*** 1560,1566 ****
+ char_u *(*fgetline)(int, void *, int) UNUSED,
+ void *cookie) /* argument for fgetline() */
+ {
+! # ifdef FEAT_EVAL
+ char_u *(*gp)(int, void *, int);
+ struct loop_cookie *cp;
+
+--- 1558,1564 ----
+ char_u *(*fgetline)(int, void *, int) UNUSED,
+ void *cookie) /* argument for fgetline() */
+ {
+! #ifdef FEAT_EVAL
+ char_u *(*gp)(int, void *, int);
+ struct loop_cookie *cp;
+
+***************
+*** 1575,1585 ****
+ cp = cp->cookie;
+ }
+ return cp;
+! # else
+ return cookie;
+- # endif
+- }
+ #endif
+
+
+ /*
+--- 1573,1582 ----
+ cp = cp->cookie;
+ }
+ return cp;
+! #else
+ return cookie;
+ #endif
++ }
+
+
+ /*
+***************
+*** 3116,3132 ****
+ d = IObuff + STRLEN(IObuff);
+ while (*s != NUL && d - IObuff < IOSIZE - 7)
+ {
+! if (
+! #ifdef FEAT_MBYTE
+! enc_utf8 ? (s[0] == 0xc2 && s[1] == 0xa0) :
+! #endif
+! *s == 0xa0)
+ {
+! s +=
+! #ifdef FEAT_MBYTE
+! enc_utf8 ? 2 :
+! #endif
+! 1;
+ STRCPY(d, "<a0>");
+ d += 4;
+ }
+--- 3113,3121 ----
+ d = IObuff + STRLEN(IObuff);
+ while (*s != NUL && d - IObuff < IOSIZE - 7)
+ {
+! if (enc_utf8 ? (s[0] == 0xc2 && s[1] == 0xa0) : *s == 0xa0)
+ {
+! s += enc_utf8 ? 2 : 1;
+ STRCPY(d, "<a0>");
+ d += 4;
+ }
+***************
+*** 3752,3762 ****
+ p = xp->xp_pattern;
+ while (*p != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_ptr2char(p);
+ else
+- #endif
+ c = *p;
+ if (c == '\\' && p[1] != NUL)
+ ++p;
+--- 3741,3749 ----
+***************
+*** 3780,3798 ****
+ len = 0; /* avoid getting stuck when space is in 'isfname' */
+ while (*p != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_ptr2char(p);
+ else
+- #endif
+ c = *p;
+ if (c == '`' || vim_isfilec_or_wc(c))
+ break;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ len = (*mb_ptr2len)(p);
+ else
+- #endif
+ len = 1;
+ MB_PTR_ADV(p);
+ }
+--- 3767,3781 ----
+***************
+*** 5408,5414 ****
+ return p;
+ }
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ int
+ get_bad_opt(char_u *p, exarg_T *eap)
+ {
+--- 5391,5396 ----
+***************
+*** 5422,5428 ****
+ return FAIL;
+ return OK;
+ }
+- #endif
+
+ /*
+ * Get "++opt=arg" argument.
+--- 5404,5409 ----
+***************
+*** 5433,5442 ****
+ {
+ char_u *arg = eap->arg + 2;
+ int *pp = NULL;
+- #ifdef FEAT_MBYTE
+ int bad_char_idx;
+ char_u *p;
+- #endif
+
+ /* ":edit ++[no]bin[ary] file" */
+ if (STRNCMP(arg, "bin", 3) == 0 || STRNCMP(arg, "nobin", 5) == 0)
+--- 5414,5421 ----
+***************
+*** 5472,5478 ****
+ arg += 10;
+ pp = &eap->force_ff;
+ }
+- #ifdef FEAT_MBYTE
+ else if (STRNCMP(arg, "enc", 3) == 0)
+ {
+ if (STRNCMP(arg, "encoding", 8) == 0)
+--- 5451,5456 ----
+***************
+*** 5486,5492 ****
+ arg += 3;
+ pp = &bad_char_idx;
+ }
+- #endif
+
+ if (pp == NULL || *arg != '=')
+ return FAIL;
+--- 5464,5469 ----
+***************
+*** 5497,5510 ****
+ eap->arg = skipwhite(arg);
+ *arg = NUL;
+
+- #ifdef FEAT_MBYTE
+ if (pp == &eap->force_ff)
+ {
+- #endif
+ if (check_ff_value(eap->cmd + eap->force_ff) == FAIL)
+ return FAIL;
+ eap->force_ff = eap->cmd[eap->force_ff];
+- #ifdef FEAT_MBYTE
+ }
+ else if (pp == &eap->force_enc)
+ {
+--- 5474,5484 ----
+***************
+*** 5519,5525 ****
+ if (get_bad_opt(eap->cmd + bad_char_idx, eap) == FAIL)
+ return FAIL;
+ }
+- #endif
+
+ return OK;
+ }
+--- 5493,5498 ----
+***************
+*** 6507,6520 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ int charlen = (*mb_ptr2len)(p);
+ len += charlen;
+ p += charlen;
+- #else
+- ++len;
+- ++p;
+- #endif
+ }
+ }
+
+--- 6480,6489 ----
+ }
+ else
+ {
+ int charlen = (*mb_ptr2len)(p);
++
+ len += charlen;
+ p += charlen;
+ }
+ }
+
+***************
+*** 6685,6697 ****
+ result = STRLEN(eap->arg) + 2;
+ for (p = eap->arg; *p; ++p)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0 && (*mb_ptr2len)(p) == 2)
+ /* DBCS can contain \ in a trail byte, skip the
+ * double-byte character. */
+ ++p;
+ else
+- #endif
+ if (*p == '\\' || *p == '"')
+ ++result;
+ }
+--- 6654,6664 ----
+***************
+*** 6701,6713 ****
+ *buf++ = '"';
+ for (p = eap->arg; *p; ++p)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0 && (*mb_ptr2len)(p) == 2)
+ /* DBCS can contain \ in a trail byte, copy the
+ * double-byte character to avoid escaping. */
+ *buf++ = *p++;
+ else
+- #endif
+ if (*p == '\\' || *p == '"')
+ *buf++ = '\\';
+ *buf++ = *p;
+--- 6668,6678 ----
+***************
+*** 10328,10338 ****
+ ex_normal(exarg_T *eap)
+ {
+ save_state_T save_state;
+- #ifdef FEAT_MBYTE
+ char_u *arg = NULL;
+ int l;
+ char_u *p;
+- #endif
+
+ if (ex_normal_lock > 0)
+ {
+--- 10293,10301 ----
+***************
+*** 10345,10351 ****
+ return;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * vgetc() expects a CSI and K_SPECIAL to have been escaped. Don't do
+ * this for the K_SPECIAL leading byte, otherwise special keys will not
+--- 10308,10313 ----
+***************
+*** 10358,10372 ****
+ /* Count the number of characters to be escaped. */
+ for (p = eap->arg; *p != NUL; ++p)
+ {
+! # ifdef FEAT_GUI
+ if (*p == CSI) /* leadbyte CSI */
+ len += 2;
+! # endif
+ for (l = (*mb_ptr2len)(p) - 1; l > 0; --l)
+ if (*++p == K_SPECIAL /* trailbyte K_SPECIAL or CSI */
+! # ifdef FEAT_GUI
+ || *p == CSI
+! # endif
+ )
+ len += 2;
+ }
+--- 10320,10334 ----
+ /* Count the number of characters to be escaped. */
+ for (p = eap->arg; *p != NUL; ++p)
+ {
+! #ifdef FEAT_GUI
+ if (*p == CSI) /* leadbyte CSI */
+ len += 2;
+! #endif
+ for (l = (*mb_ptr2len)(p) - 1; l > 0; --l)
+ if (*++p == K_SPECIAL /* trailbyte K_SPECIAL or CSI */
+! #ifdef FEAT_GUI
+ || *p == CSI
+! #endif
+ )
+ len += 2;
+ }
+***************
+*** 10379,10391 ****
+ for (p = eap->arg; *p != NUL; ++p)
+ {
+ arg[len++] = *p;
+! # ifdef FEAT_GUI
+ if (*p == CSI)
+ {
+ arg[len++] = KS_EXTRA;
+ arg[len++] = (int)KE_CSI;
+ }
+! # endif
+ for (l = (*mb_ptr2len)(p) - 1; l > 0; --l)
+ {
+ arg[len++] = *++p;
+--- 10341,10353 ----
+ for (p = eap->arg; *p != NUL; ++p)
+ {
+ arg[len++] = *p;
+! #ifdef FEAT_GUI
+ if (*p == CSI)
+ {
+ arg[len++] = KS_EXTRA;
+ arg[len++] = (int)KE_CSI;
+ }
+! #endif
+ for (l = (*mb_ptr2len)(p) - 1; l > 0; --l)
+ {
+ arg[len++] = *++p;
+***************
+*** 10394,10413 ****
+ arg[len++] = KS_SPECIAL;
+ arg[len++] = KE_FILLER;
+ }
+! # ifdef FEAT_GUI
+ else if (*p == CSI)
+ {
+ arg[len++] = KS_EXTRA;
+ arg[len++] = (int)KE_CSI;
+ }
+! # endif
+ }
+ arg[len] = NUL;
+ }
+ }
+ }
+ }
+- #endif
+
+ ++ex_normal_busy;
+ if (save_current_state(&save_state))
+--- 10356,10374 ----
+ arg[len++] = KS_SPECIAL;
+ arg[len++] = KE_FILLER;
+ }
+! #ifdef FEAT_GUI
+ else if (*p == CSI)
+ {
+ arg[len++] = KS_EXTRA;
+ arg[len++] = (int)KE_CSI;
+ }
+! #endif
+ }
+ arg[len] = NUL;
+ }
+ }
+ }
+ }
+
+ ++ex_normal_busy;
+ if (save_current_state(&save_state))
+***************
+*** 10426,10436 ****
+ check_cursor_moved(curwin);
+ }
+
+! exec_normal_cmd(
+! #ifdef FEAT_MBYTE
+! arg != NULL ? arg :
+! #endif
+! eap->arg, eap->forceit ? REMAP_NONE : REMAP_YES, FALSE);
+ }
+ while (eap->addr_count > 0 && eap->line1 <= eap->line2 && !got_int);
+ }
+--- 10387,10395 ----
+ check_cursor_moved(curwin);
+ }
+
+! exec_normal_cmd(arg != NULL
+! ? arg
+! : eap->arg, eap->forceit ? REMAP_NONE : REMAP_YES, FALSE);
+ }
+ while (eap->addr_count > 0 && eap->line1 <= eap->line2 && !got_int);
+ }
+***************
+*** 10447,10455 ****
+ ui_cursor_shape(); /* may show different cursor shape */
+ #endif
+
+- #ifdef FEAT_MBYTE
+ vim_free(arg);
+- #endif
+ }
+
+ /*
+--- 10406,10412 ----
+*** ../vim-8.1.0804/src/ex_getln.c 2019-01-22 22:54:56.215326924 +0100
+--- src/ex_getln.c 2019-01-24 14:41:44.460348365 +0100
+***************
+*** 89,97 ****
+ static int cmdline_charsize(int idx);
+ static void set_cmdspos(void);
+ static void set_cmdspos_cursor(void);
+- #ifdef FEAT_MBYTE
+ static void correct_cmdspos(int idx, int cells);
+- #endif
+ static void alloc_cmdbuff(int len);
+ static int realloc_cmdbuff(int len);
+ static void draw_cmdline(int start, int len);
+--- 89,95 ----
+***************
+*** 769,775 ****
+ stuffcharReadbuff(*c);
+ *c = '\\';
+ }
+- #ifdef FEAT_MBYTE
+ // add any composing characters
+ if (mb_char2len(*c) != mb_ptr2len(ml_get_cursor()))
+ {
+--- 767,772 ----
+***************
+*** 783,789 ****
+ }
+ *c = save_c;
+ }
+- #endif
+ return FAIL;
+ }
+ }
+--- 780,785 ----
+***************
+*** 1253,1262 ****
+ i = (int)(xpc.xp_pattern - ccline.cmdbuff);
+ while (--j > i)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ j -= (*mb_head_off)(ccline.cmdbuff, ccline.cmdbuff + j);
+- #endif
+ if (vim_ispathsep(ccline.cmdbuff[j]))
+ {
+ found = TRUE;
+--- 1249,1256 ----
+***************
+*** 1281,1290 ****
+ i = (int)(xpc.xp_pattern - ccline.cmdbuff);
+ while (--j > i)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ j -= (*mb_head_off)(ccline.cmdbuff, ccline.cmdbuff + j);
+- #endif
+ if (vim_ispathsep(ccline.cmdbuff[j])
+ #ifdef BACKSLASH_IN_FILENAME
+ && vim_strchr((char_u *)" *?[{`$%#",
+--- 1275,1282 ----
+***************
+*** 1616,1633 ****
+ */
+ if (c == K_DEL && ccline.cmdpos != ccline.cmdlen)
+ ++ccline.cmdpos;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && c == K_DEL)
+ ccline.cmdpos += mb_off_next(ccline.cmdbuff,
+ ccline.cmdbuff + ccline.cmdpos);
+- #endif
+ if (ccline.cmdpos > 0)
+ {
+ char_u *p;
+
+ j = ccline.cmdpos;
+ p = ccline.cmdbuff + j;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ p = mb_prevptr(ccline.cmdbuff, p);
+--- 1608,1622 ----
+***************
+*** 1642,1650 ****
+ p += (*mb_ptr2len)(p);
+ }
+ }
+! else
+! #endif
+! if (c == Ctrl_W)
+ {
+ while (p > ccline.cmdbuff && vim_isspace(p[-1]))
+ --p;
+--- 1631,1637 ----
+ p += (*mb_ptr2len)(p);
+ }
+ }
+! else if (c == Ctrl_W)
+ {
+ while (p > ccline.cmdbuff && vim_isspace(p[-1]))
+ --p;
+***************
+*** 1893,1913 ****
+ if (KeyTyped && ccline.cmdspos + i >= Columns * Rows)
+ break;
+ ccline.cmdspos += i;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ ccline.cmdpos += (*mb_ptr2len)(ccline.cmdbuff
+ + ccline.cmdpos);
+ else
+- #endif
+ ++ccline.cmdpos;
+ }
+ while ((c == K_S_RIGHT || c == K_C_RIGHT
+ || (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL)))
+ && ccline.cmdbuff[ccline.cmdpos] != ' ');
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ set_cmdspos_cursor();
+- #endif
+ goto cmdline_not_changed;
+
+ case K_LEFT:
+--- 1880,1896 ----
+***************
+*** 1918,1938 ****
+ do
+ {
+ --ccline.cmdpos;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte) /* move to first byte of char */
+ ccline.cmdpos -= (*mb_head_off)(ccline.cmdbuff,
+ ccline.cmdbuff + ccline.cmdpos);
+- #endif
+ ccline.cmdspos -= cmdline_charsize(ccline.cmdpos);
+ }
+ while (ccline.cmdpos > 0
+ && (c == K_S_LEFT || c == K_C_LEFT
+ || (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL)))
+ && ccline.cmdbuff[ccline.cmdpos - 1] != ' ');
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ set_cmdspos_cursor();
+- #endif
+ goto cmdline_not_changed;
+
+ case K_IGNORE:
+--- 1901,1917 ----
+***************
+*** 2030,2036 ****
+ if (mouse_row <= cmdline_row + ccline.cmdspos / Columns
+ && mouse_col < ccline.cmdspos % Columns + i)
+ break;
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* Count ">" for double-wide char that doesn't fit. */
+--- 2009,2014 ----
+***************
+*** 2038,2044 ****
+ ccline.cmdpos += (*mb_ptr2len)(ccline.cmdbuff
+ + ccline.cmdpos) - 1;
+ }
+- # endif
+ ccline.cmdspos += i;
+ }
+ goto cmdline_not_changed;
+--- 2016,2021 ----
+***************
+*** 2301,2307 ****
+ c = get_literal(); /* get next (two) character(s) */
+ do_abbr = FALSE; /* don't do abbreviation now */
+ extra_char = NUL;
+- #ifdef FEAT_MBYTE
+ /* may need to remove ^ when composing char was typed */
+ if (enc_utf8 && utf_iscomposing(c) && !cmd_silent)
+ {
+--- 2278,2283 ----
+***************
+*** 2309,2315 ****
+ msg_putchar(' ');
+ cursorcmd();
+ }
+- #endif
+ break;
+
+ #ifdef FEAT_DIGRAPHS
+--- 2285,2290 ----
+***************
+*** 2374,2386 ****
+ * We come here if we have a normal character.
+ */
+
+! if (do_abbr && (IS_SPECIAL(c) || !vim_iswordc(c)) && (ccheck_abbr(
+! #ifdef FEAT_MBYTE
+! /* Add ABBR_OFF for characters above 0x100, this is
+! * what check_abbr() expects. */
+! (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) :
+! #endif
+! c) || c == Ctrl_RSB))
+ goto cmdline_changed;
+
+ /*
+--- 2349,2360 ----
+ * We come here if we have a normal character.
+ */
+
+! if (do_abbr && (IS_SPECIAL(c) || !vim_iswordc(c))
+! && (ccheck_abbr(
+! // Add ABBR_OFF for characters above 0x100, this is
+! // what check_abbr() expects.
+! (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) : c)
+! || c == Ctrl_RSB))
+ goto cmdline_changed;
+
+ /*
+***************
+*** 2390,2396 ****
+ put_on_cmdline(get_special_key_name(c, mod_mask), -1, TRUE);
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ j = (*mb_char2bytes)(c, IObuff);
+--- 2364,2369 ----
+***************
+*** 2398,2404 ****
+ put_on_cmdline(IObuff, j, TRUE);
+ }
+ else
+- #endif
+ {
+ IObuff[0] = c;
+ put_on_cmdline(IObuff, 1, TRUE);
+--- 2371,2376 ----
+***************
+*** 2687,2697 ****
+ for (i = 0; i < ccline.cmdlen && i < ccline.cmdpos; ++i)
+ {
+ c = cmdline_charsize(i);
+- #ifdef FEAT_MBYTE
+ /* Count ">" for double-wide multi-byte char that doesn't fit. */
+ if (has_mbyte)
+ correct_cmdspos(i, c);
+- #endif
+ /* If the cmdline doesn't fit, show cursor on last visible char.
+ * Don't move the cursor itself, so we can still append. */
+ if ((ccline.cmdspos += c) >= m)
+--- 2659,2667 ----
+***************
+*** 2699,2712 ****
+ ccline.cmdspos -= c;
+ break;
+ }
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ i += (*mb_ptr2len)(ccline.cmdbuff + i) - 1;
+- #endif
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Check if the character at "idx", which is "cells" wide, is a multi-byte
+ * character that doesn't fit, so that a ">" must be displayed.
+--- 2669,2679 ----
+***************
+*** 2719,2725 ****
+ && ccline.cmdspos % Columns + cells > Columns)
+ ccline.cmdspos++;
+ }
+- #endif
+
+ /*
+ * Get an Ex command line for the ":" command.
+--- 2686,2691 ----
+***************
+*** 2849,2855 ****
+ {
+ if (line_ga.ga_len > 0)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ p = (char_u *)line_ga.ga_data;
+--- 2815,2820 ----
+***************
+*** 2858,2864 ****
+ line_ga.ga_len -= len;
+ }
+ else
+- #endif
+ --line_ga.ga_len;
+ goto redraw;
+ }
+--- 2823,2828 ----
+***************
+*** 2962,2973 ****
+
+ if (IS_SPECIAL(c1))
+ c1 = '?';
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ len = (*mb_char2bytes)(c1,
+ (char_u *)line_ga.ga_data + line_ga.ga_len);
+ else
+- #endif
+ {
+ len = 1;
+ ((char_u *)line_ga.ga_data)[line_ga.ga_len] = c1;
+--- 2926,2935 ----
+***************
+*** 3070,3076 ****
+ if (ccline.cmdbuff == NULL || ccline.cmdpos > ccline.cmdlen)
+ return MAXCOL;
+
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ colnr_T col;
+--- 3032,3037 ----
+***************
+*** 3082,3088 ****
+ return col;
+ }
+ else
+- # endif
+ return ccline.cmdpos;
+ }
+ #endif
+--- 3043,3048 ----
+***************
+*** 3111,3117 ****
+ old_col = msg_col;
+ cmdspos = ((ccline.cmdfirstc != NUL) ? 1 : 0) + ccline.cmdindent;
+
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ for (col = 0; col < preedit_start_col
+--- 3071,3076 ----
+***************
+*** 3122,3128 ****
+ }
+ }
+ else
+- # endif
+ {
+ cmdspos += preedit_start_col;
+ cmdpos += preedit_start_col;
+--- 3081,3086 ----
+***************
+*** 3142,3152 ****
+ if (char_attr < 0)
+ break; /* end of preedit string */
+
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ char_len = (*mb_ptr2len)(ccline.cmdbuff + cmdpos);
+ else
+- # endif
+ char_len = 1;
+
+ msg_outtrans_len_attr(ccline.cmdbuff + cmdpos, char_len, char_attr);
+--- 3100,3108 ----
+***************
+*** 3245,3254 ****
+ for (i = 0; i < len; ++i)
+ {
+ msg_putchar('*');
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ i += (*mb_ptr2len)(ccline.cmdbuff + start + i) - 1;
+- # endif
+ }
+ else
+ #endif
+--- 3201,3208 ----
+***************
+*** 3382,3392 ****
+ msg_no_more = TRUE;
+ if (ccline.cmdlen == ccline.cmdpos)
+ msg_putchar(' ');
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ draw_cmdline(ccline.cmdpos,
+ (*mb_ptr2len)(ccline.cmdbuff + ccline.cmdpos));
+- #endif
+ else
+ draw_cmdline(ccline.cmdpos, 1);
+ msg_no_more = FALSE;
+--- 3336,3344 ----
+***************
+*** 3429,3435 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* Count nr of characters in the new string. */
+--- 3381,3386 ----
+***************
+*** 3450,3464 ****
+ else
+ ccline.cmdlen = ccline.cmdpos + len;
+ }
+! else
+! #endif
+! if (ccline.cmdpos + len > ccline.cmdlen)
+ ccline.cmdlen = ccline.cmdpos + len;
+ }
+ mch_memmove(ccline.cmdbuff + ccline.cmdpos, str, (size_t)len);
+ ccline.cmdbuff[ccline.cmdlen] = NUL;
+
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ /* When the inserted text starts with a composing character,
+--- 3401,3412 ----
+ else
+ ccline.cmdlen = ccline.cmdpos + len;
+ }
+! else if (ccline.cmdpos + len > ccline.cmdlen)
+ ccline.cmdlen = ccline.cmdpos + len;
+ }
+ mch_memmove(ccline.cmdbuff + ccline.cmdpos, str, (size_t)len);
+ ccline.cmdbuff[ccline.cmdlen] = NUL;
+
+ if (enc_utf8)
+ {
+ /* When the inserted text starts with a composing character,
+***************
+*** 3474,3480 ****
+ len += i;
+ c = utf_ptr2char(ccline.cmdbuff + ccline.cmdpos);
+ }
+! # ifdef FEAT_ARABIC
+ if (i == 0 && ccline.cmdpos > 0 && arabic_maycombine(c))
+ {
+ /* Check the previous character for Arabic combining pair. */
+--- 3422,3428 ----
+ len += i;
+ c = utf_ptr2char(ccline.cmdbuff + ccline.cmdpos);
+ }
+! #ifdef FEAT_ARABIC
+ if (i == 0 && ccline.cmdpos > 0 && arabic_maycombine(c))
+ {
+ /* Check the previous character for Arabic combining pair. */
+***************
+*** 3489,3495 ****
+ else
+ i = 0;
+ }
+! # endif
+ if (i != 0)
+ {
+ /* Also backup the cursor position. */
+--- 3437,3443 ----
+ else
+ i = 0;
+ }
+! #endif
+ if (i != 0)
+ {
+ /* Also backup the cursor position. */
+***************
+*** 3503,3509 ****
+ }
+ }
+ }
+- #endif
+
+ if (redraw && !cmd_silent)
+ {
+--- 3451,3456 ----
+***************
+*** 3535,3551 ****
+ for (i = 0; i < len; ++i)
+ {
+ c = cmdline_charsize(ccline.cmdpos);
+- #ifdef FEAT_MBYTE
+ /* count ">" for a double-wide char that doesn't fit. */
+ if (has_mbyte)
+ correct_cmdspos(ccline.cmdpos, c);
+- #endif
+ /* Stop cursor at the end of the screen, but do increment the
+ * insert position, so that entering a very long command
+ * works, even though you can't see it. */
+ if (ccline.cmdspos + c < m)
+ ccline.cmdspos += c;
+! #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ c = (*mb_ptr2len)(ccline.cmdbuff + ccline.cmdpos) - 1;
+--- 3482,3496 ----
+ for (i = 0; i < len; ++i)
+ {
+ c = cmdline_charsize(ccline.cmdpos);
+ /* count ">" for a double-wide char that doesn't fit. */
+ if (has_mbyte)
+ correct_cmdspos(ccline.cmdpos, c);
+ /* Stop cursor at the end of the screen, but do increment the
+ * insert position, so that entering a very long command
+ * works, even though you can't see it. */
+ if (ccline.cmdspos + c < m)
+ ccline.cmdspos += c;
+!
+ if (has_mbyte)
+ {
+ c = (*mb_ptr2len)(ccline.cmdbuff + ccline.cmdpos) - 1;
+***************
+*** 3554,3560 ****
+ ccline.cmdpos += c;
+ i += c;
+ }
+- #endif
+ ++ccline.cmdpos;
+ }
+ }
+--- 3499,3504 ----
+***************
+*** 3654,3660 ****
+ /* Locate start of last word in the cmd buffer. */
+ for (w = ccline.cmdbuff + ccline.cmdpos; w > ccline.cmdbuff; )
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ len = (*mb_head_off)(ccline.cmdbuff, w - 1) + 1;
+--- 3598,3603 ----
+***************
+*** 3663,3669 ****
+ w -= len;
+ }
+ else
+- #endif
+ {
+ if (!vim_iswordc(w[-1]))
+ break;
+--- 3606,3611 ----
+***************
+*** 3703,3713 ****
+ cv = *s;
+ if (cv == Ctrl_V && s[1])
+ ++s;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_cptr2char_adv(&s);
+ else
+- #endif
+ c = *s++;
+ if (cv == Ctrl_V || c == ESC || c == Ctrl_C
+ || c == CAR || c == NL || c == Ctrl_L
+--- 3645,3653 ----
+***************
+*** 4237,4258 ****
+
+ for (len = 0; xp->xp_files[0][len]; len += mb_len)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ mb_len = (*mb_ptr2len)(&xp->xp_files[0][len]);
+ c0 =(* mb_ptr2char)(&xp->xp_files[0][len]);
+ }
+ else
+- #endif
+ c0 = xp->xp_files[0][len];
+ for (i = 1; i < xp->xp_numfiles; ++i)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ ci =(* mb_ptr2char)(&xp->xp_files[i][len]);
+ else
+- #endif
+ ci = xp->xp_files[i][len];
+ if (p_fic && (xp->xp_context == EXPAND_DIRECTORIES
+ || xp->xp_context == EXPAND_FILES
+--- 4177,4194 ----
+*** ../vim-8.1.0804/src/fileio.c 2019-01-20 15:30:36.885328746 +0100
+--- src/fileio.c 2019-01-24 14:48:42.309458757 +0100
+***************
+*** 27,37 ****
+ /* Is there any system that doesn't have access()? */
+ #define USE_MCH_ACCESS
+
+- #ifdef FEAT_MBYTE
+ static char_u *next_fenc(char_u **pp);
+! # ifdef FEAT_EVAL
+ static char_u *readfile_charconvert(char_u *fname, char_u *fenc, int *fdp);
+- # endif
+ #endif
+ #ifdef FEAT_VIMINFO
+ static void check_marks_read(void);
+--- 27,35 ----
+ /* Is there any system that doesn't have access()? */
+ #define USE_MCH_ACCESS
+
+ static char_u *next_fenc(char_u **pp);
+! #ifdef FEAT_EVAL
+ static char_u *readfile_charconvert(char_u *fname, char_u *fenc, int *fdp);
+ #endif
+ #ifdef FEAT_VIMINFO
+ static void check_marks_read(void);
+***************
+*** 47,77 ****
+ static int apply_autocmds_exarg(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, exarg_T *eap);
+ static int au_find_group(char_u *name);
+
+! # define AUGROUP_DEFAULT -1 /* default autocmd group */
+! # define AUGROUP_ERROR -2 /* erroneous autocmd group */
+! # define AUGROUP_ALL -3 /* all autocmd groups */
+!
+! #if defined(FEAT_CRYPT) || defined(FEAT_MBYTE)
+! # define HAS_BW_FLAGS
+! # define FIO_LATIN1 0x01 /* convert Latin1 */
+! # define FIO_UTF8 0x02 /* convert UTF-8 */
+! # define FIO_UCS2 0x04 /* convert UCS-2 */
+! # define FIO_UCS4 0x08 /* convert UCS-4 */
+! # define FIO_UTF16 0x10 /* convert UTF-16 */
+! # ifdef WIN3264
+! # define FIO_CODEPAGE 0x20 /* convert MS-Windows codepage */
+! # define FIO_PUT_CP(x) (((x) & 0xffff) << 16) /* put codepage in top word */
+! # define FIO_GET_CP(x) (((x)>>16) & 0xffff) /* get codepage from top word */
+! # endif
+! # ifdef MACOS_CONVERT
+! # define FIO_MACROMAN 0x20 /* convert MacRoman */
+! # endif
+! # define FIO_ENDIAN_L 0x80 /* little endian */
+! # define FIO_ENCRYPTED 0x1000 /* encrypt written bytes */
+! # define FIO_NOCONVERT 0x2000 /* skip encoding conversion */
+! # define FIO_UCSBOM 0x4000 /* check for BOM at start of file */
+! # define FIO_ALL -1 /* allow all formats */
+ #endif
+
+ /* When converting, a read() or write() may leave some bytes to be converted
+ * for the next call. The value is guessed... */
+--- 45,73 ----
+ static int apply_autocmds_exarg(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, exarg_T *eap);
+ static int au_find_group(char_u *name);
+
+! #define AUGROUP_DEFAULT -1 /* default autocmd group */
+! #define AUGROUP_ERROR -2 /* erroneous autocmd group */
+! #define AUGROUP_ALL -3 /* all autocmd groups */
+!
+! #define HAS_BW_FLAGS
+! #define FIO_LATIN1 0x01 /* convert Latin1 */
+! #define FIO_UTF8 0x02 /* convert UTF-8 */
+! #define FIO_UCS2 0x04 /* convert UCS-2 */
+! #define FIO_UCS4 0x08 /* convert UCS-4 */
+! #define FIO_UTF16 0x10 /* convert UTF-16 */
+! #ifdef WIN3264
+! # define FIO_CODEPAGE 0x20 /* convert MS-Windows codepage */
+! # define FIO_PUT_CP(x) (((x) & 0xffff) << 16) /* put codepage in top word */
+! # define FIO_GET_CP(x) (((x)>>16) & 0xffff) /* get codepage from top word */
+ #endif
++ #ifdef MACOS_CONVERT
++ # define FIO_MACROMAN 0x20 /* convert MacRoman */
++ #endif
++ #define FIO_ENDIAN_L 0x80 /* little endian */
++ #define FIO_ENCRYPTED 0x1000 /* encrypt written bytes */
++ #define FIO_NOCONVERT 0x2000 /* skip encoding conversion */
++ #define FIO_UCSBOM 0x4000 /* check for BOM at start of file */
++ #define FIO_ALL -1 /* allow all formats */
+
+ /* When converting, a read() or write() may leave some bytes to be converted
+ * for the next call. The value is guessed... */
+***************
+*** 95,101 ****
+ #ifdef FEAT_CRYPT
+ buf_T *bw_buffer; /* buffer being written */
+ #endif
+- #ifdef FEAT_MBYTE
+ char_u bw_rest[CONV_RESTLEN]; /* not converted bytes */
+ int bw_restlen; /* nr of bytes in bw_rest[] */
+ int bw_first; /* first write call */
+--- 91,96 ----
+***************
+*** 104,130 ****
+ int bw_conv_error; /* set for conversion error */
+ linenr_T bw_conv_error_lnum; /* first line with error or zero */
+ linenr_T bw_start_lnum; /* line number at start of buffer */
+! # ifdef USE_ICONV
+ iconv_t bw_iconv_fd; /* descriptor for iconv() or -1 */
+- # endif
+ #endif
+ };
+
+ static int buf_write_bytes(struct bw_info *ip);
+
+- #ifdef FEAT_MBYTE
+ static linenr_T readfile_linenr(linenr_T linecnt, char_u *p, char_u *endp);
+ static int ucs2bytes(unsigned c, char_u **pp, int flags);
+ static int need_conversion(char_u *fenc);
+ static int get_fio_flags(char_u *ptr);
+ static char_u *check_for_bom(char_u *p, long size, int *lenp, int flags);
+ static int make_bom(char_u *buf, char_u *name);
+! # ifdef WIN3264
+ static int get_win_fio_flags(char_u *ptr);
+! # endif
+! # ifdef MACOS_CONVERT
+ static int get_mac_fio_flags(char_u *ptr);
+- # endif
+ #endif
+ static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
+
+--- 99,122 ----
+ int bw_conv_error; /* set for conversion error */
+ linenr_T bw_conv_error_lnum; /* first line with error or zero */
+ linenr_T bw_start_lnum; /* line number at start of buffer */
+! #ifdef USE_ICONV
+ iconv_t bw_iconv_fd; /* descriptor for iconv() or -1 */
+ #endif
+ };
+
+ static int buf_write_bytes(struct bw_info *ip);
+
+ static linenr_T readfile_linenr(linenr_T linecnt, char_u *p, char_u *endp);
+ static int ucs2bytes(unsigned c, char_u **pp, int flags);
+ static int need_conversion(char_u *fenc);
+ static int get_fio_flags(char_u *ptr);
+ static char_u *check_for_bom(char_u *p, long size, int *lenp, int flags);
+ static int make_bom(char_u *buf, char_u *name);
+! #ifdef WIN3264
+ static int get_win_fio_flags(char_u *ptr);
+! #endif
+! #ifdef MACOS_CONVERT
+ static int get_mac_fio_flags(char_u *ptr);
+ #endif
+ static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
+
+***************
+*** 265,271 ****
+ int try_dos;
+ int try_unix;
+ int file_rewind = FALSE;
+- #ifdef FEAT_MBYTE
+ int can_retry;
+ linenr_T conv_error = 0; /* line nr with conversion error */
+ linenr_T illegal_byte = 0; /* line nr with illegal byte */
+--- 257,262 ----
+***************
+*** 281,299 ****
+ char_u *fenc_next = NULL; /* next item in 'fencs' or NULL */
+ int advance_fenc = FALSE;
+ long real_size = 0;
+! # ifdef USE_ICONV
+ iconv_t iconv_fd = (iconv_t)-1; /* descriptor for iconv() or -1 */
+! # ifdef FEAT_EVAL
+ int did_iconv = FALSE; /* TRUE when iconv() failed and trying
+ 'charconvert' next */
+- # endif
+ # endif
+ int converted = FALSE; /* TRUE if conversion done */
+ int notconverted = FALSE; /* TRUE if conversion wanted but it
+ wasn't possible */
+ char_u conv_rest[CONV_RESTLEN];
+ int conv_restlen = 0; /* nr of bytes in conv_rest[] */
+- #endif
+ buf_T *old_curbuf;
+ char_u *old_b_ffname;
+ char_u *old_b_fname;
+--- 272,289 ----
+ char_u *fenc_next = NULL; /* next item in 'fencs' or NULL */
+ int advance_fenc = FALSE;
+ long real_size = 0;
+! #ifdef USE_ICONV
+ iconv_t iconv_fd = (iconv_t)-1; /* descriptor for iconv() or -1 */
+! # ifdef FEAT_EVAL
+ int did_iconv = FALSE; /* TRUE when iconv() failed and trying
+ 'charconvert' next */
+ # endif
++ #endif
+ int converted = FALSE; /* TRUE if conversion done */
+ int notconverted = FALSE; /* TRUE if conversion wanted but it
+ wasn't possible */
+ char_u conv_rest[CONV_RESTLEN];
+ int conv_restlen = 0; /* nr of bytes in conv_rest[] */
+ buf_T *old_curbuf;
+ char_u *old_b_ffname;
+ char_u *old_b_fname;
+***************
+*** 609,619 ****
+ * edited before and deleted. Get the old marks. */
+ check_marks_read();
+ #endif
+- #ifdef FEAT_MBYTE
+ /* Set forced 'fileencoding'. */
+ if (eap != NULL)
+ set_forced_fenc(eap);
+- #endif
+ apply_autocmds_exarg(EVENT_BUFNEWFILE, sfname, sfname,
+ FALSE, curbuf, eap);
+ /* remember the current fileformat */
+--- 599,607 ----
+***************
+*** 658,667 ****
+ curbuf->b_p_eol = TRUE;
+ curbuf->b_start_eol = TRUE;
+ }
+- #ifdef FEAT_MBYTE
+ curbuf->b_p_bomb = FALSE;
+ curbuf->b_start_bomb = FALSE;
+- #endif
+ }
+
+ /* Create a swap file now, so that other Vims are warned that we are
+--- 646,653 ----
+***************
+*** 846,852 ****
+ */
+ linecnt = curbuf->b_ml.ml_line_count;
+
+- #ifdef FEAT_MBYTE
+ /* "++bad=" argument. */
+ if (eap != NULL && eap->bad_char != 0)
+ {
+--- 832,837 ----
+***************
+*** 926,932 ****
+ fenc = next_fenc(&fenc_next);
+ fenc_alloced = TRUE;
+ }
+- #endif
+
+ /*
+ * Jump back here to retry reading the file in different ways.
+--- 911,916 ----
+***************
+*** 966,979 ****
+ while (lnum > from)
+ ml_delete(lnum--, FALSE);
+ file_rewind = FALSE;
+- #ifdef FEAT_MBYTE
+ if (set_options)
+ {
+ curbuf->b_p_bomb = FALSE;
+ curbuf->b_start_bomb = FALSE;
+ }
+ conv_error = 0;
+- #endif
+ }
+
+ /*
+--- 950,961 ----
+***************
+*** 997,1011 ****
+ fileformat = EOL_UNKNOWN; /* detect from file */
+ }
+
+! #ifdef FEAT_MBYTE
+! # ifdef USE_ICONV
+ if (iconv_fd != (iconv_t)-1)
+ {
+ /* aborted conversion with iconv(), close the descriptor */
+ iconv_close(iconv_fd);
+ iconv_fd = (iconv_t)-1;
+ }
+! # endif
+
+ if (advance_fenc)
+ {
+--- 979,992 ----
+ fileformat = EOL_UNKNOWN; /* detect from file */
+ }
+
+! #ifdef USE_ICONV
+ if (iconv_fd != (iconv_t)-1)
+ {
+ /* aborted conversion with iconv(), close the descriptor */
+ iconv_close(iconv_fd);
+ iconv_fd = (iconv_t)-1;
+ }
+! #endif
+
+ if (advance_fenc)
+ {
+***************
+*** 1073,1121 ****
+ else if (enc_utf8 || STRCMP(p_enc, "latin1") == 0)
+ fio_flags = get_fio_flags(fenc);
+
+! # ifdef WIN3264
+ /*
+ * Conversion from an MS-Windows codepage to UTF-8 or another codepage
+ * is handled with MultiByteToWideChar().
+ */
+ if (fio_flags == 0)
+ fio_flags = get_win_fio_flags(fenc);
+! # endif
+
+! # ifdef MACOS_CONVERT
+ /* Conversion from Apple MacRoman to latin1 or UTF-8 */
+ if (fio_flags == 0)
+ fio_flags = get_mac_fio_flags(fenc);
+! # endif
+
+! # ifdef USE_ICONV
+ /*
+ * Try using iconv() if we can't convert internally.
+ */
+ if (fio_flags == 0
+! # ifdef FEAT_EVAL
+ && !did_iconv
+! # endif
+ )
+ iconv_fd = (iconv_t)my_iconv_open(
+ enc_utf8 ? (char_u *)"utf-8" : p_enc, fenc);
+! # endif
+
+! # ifdef FEAT_EVAL
+ /*
+ * Use the 'charconvert' expression when conversion is required
+ * and we can't do it internally or with iconv().
+ */
+ if (fio_flags == 0 && !read_stdin && !read_buffer && *p_ccv != NUL
+ && !read_fifo
+! # ifdef USE_ICONV
+ && iconv_fd == (iconv_t)-1
+! # endif
+ )
+ {
+! # ifdef USE_ICONV
+ did_iconv = FALSE;
+! # endif
+ /* Skip conversion when it's already done (retry for wrong
+ * "fileformat"). */
+ if (tmpname == NULL)
+--- 1054,1102 ----
+ else if (enc_utf8 || STRCMP(p_enc, "latin1") == 0)
+ fio_flags = get_fio_flags(fenc);
+
+! #ifdef WIN3264
+ /*
+ * Conversion from an MS-Windows codepage to UTF-8 or another codepage
+ * is handled with MultiByteToWideChar().
+ */
+ if (fio_flags == 0)
+ fio_flags = get_win_fio_flags(fenc);
+! #endif
+
+! #ifdef MACOS_CONVERT
+ /* Conversion from Apple MacRoman to latin1 or UTF-8 */
+ if (fio_flags == 0)
+ fio_flags = get_mac_fio_flags(fenc);
+! #endif
+
+! #ifdef USE_ICONV
+ /*
+ * Try using iconv() if we can't convert internally.
+ */
+ if (fio_flags == 0
+! # ifdef FEAT_EVAL
+ && !did_iconv
+! # endif
+ )
+ iconv_fd = (iconv_t)my_iconv_open(
+ enc_utf8 ? (char_u *)"utf-8" : p_enc, fenc);
+! #endif
+
+! #ifdef FEAT_EVAL
+ /*
+ * Use the 'charconvert' expression when conversion is required
+ * and we can't do it internally or with iconv().
+ */
+ if (fio_flags == 0 && !read_stdin && !read_buffer && *p_ccv != NUL
+ && !read_fifo
+! # ifdef USE_ICONV
+ && iconv_fd == (iconv_t)-1
+! # endif
+ )
+ {
+! # ifdef USE_ICONV
+ did_iconv = FALSE;
+! # endif
+ /* Skip conversion when it's already done (retry for wrong
+ * "fileformat"). */
+ if (tmpname == NULL)
+***************
+*** 1137,1148 ****
+ }
+ }
+ else
+! # endif
+ {
+ if (fio_flags == 0
+! # ifdef USE_ICONV
+ && iconv_fd == (iconv_t)-1
+! # endif
+ )
+ {
+ /* Conversion wanted but we can't.
+--- 1118,1129 ----
+ }
+ }
+ else
+! #endif
+ {
+ if (fio_flags == 0
+! #ifdef USE_ICONV
+ && iconv_fd == (iconv_t)-1
+! #endif
+ )
+ {
+ /* Conversion wanted but we can't.
+***************
+*** 1157,1163 ****
+ * another "fenc" value. It's FALSE when no other "fenc" to try, reading
+ * stdin or fixed at a specific encoding. */
+ can_retry = (*fenc != NUL && !read_stdin && !read_fifo && !keep_dest_enc);
+- #endif
+
+ if (!skip_read)
+ {
+--- 1138,1143 ----
+***************
+*** 1165,1173 ****
+ filesize = 0;
+ skip_count = lines_to_skip;
+ read_count = lines_to_read;
+- #ifdef FEAT_MBYTE
+ conv_restlen = 0;
+- #endif
+ #ifdef FEAT_PERSISTENT_UNDO
+ read_undo_file = (newfile && (flags & READ_KEEP_UNDO) == 0
+ && curbuf->b_ffname != NULL
+--- 1145,1151 ----
+***************
+*** 1253,1259 ****
+ ptr = buffer + linerest;
+ line_start = buffer;
+
+- #ifdef FEAT_MBYTE
+ /* May need room to translate into.
+ * For iconv() we don't really know the required space, use a
+ * factor ICONV_MULT.
+--- 1231,1236 ----
+***************
+*** 1265,1275 ****
+ * ucs-4 to utf-8: 4 bytes become up to 6 bytes, size must be
+ * multiple of 4 */
+ real_size = (int)size;
+! # ifdef USE_ICONV
+ if (iconv_fd != (iconv_t)-1)
+ size = size / ICONV_MULT;
+ else
+! # endif
+ if (fio_flags & FIO_LATIN1)
+ size = size / 2;
+ else if (fio_flags & (FIO_UCS2 | FIO_UTF16))
+--- 1242,1252 ----
+ * ucs-4 to utf-8: 4 bytes become up to 6 bytes, size must be
+ * multiple of 4 */
+ real_size = (int)size;
+! #ifdef USE_ICONV
+ if (iconv_fd != (iconv_t)-1)
+ size = size / ICONV_MULT;
+ else
+! #endif
+ if (fio_flags & FIO_LATIN1)
+ size = size / 2;
+ else if (fio_flags & (FIO_UCS2 | FIO_UTF16))
+***************
+*** 1278,1294 ****
+ size = (size * 2 / 3) & ~3;
+ else if (fio_flags == FIO_UCSBOM)
+ size = size / ICONV_MULT; /* worst case */
+! # ifdef WIN3264
+ else if (fio_flags & FIO_CODEPAGE)
+ size = size / ICONV_MULT; /* also worst case */
+! # endif
+! # ifdef MACOS_CONVERT
+ else if (fio_flags & FIO_MACROMAN)
+ size = size / ICONV_MULT; /* also worst case */
+- # endif
+ #endif
+
+- #ifdef FEAT_MBYTE
+ if (conv_restlen > 0)
+ {
+ /* Insert unconverted bytes from previous line. */
+--- 1255,1269 ----
+ size = (size * 2 / 3) & ~3;
+ else if (fio_flags == FIO_UCSBOM)
+ size = size / ICONV_MULT; /* worst case */
+! #ifdef WIN3264
+ else if (fio_flags & FIO_CODEPAGE)
+ size = size / ICONV_MULT; /* also worst case */
+! #endif
+! #ifdef MACOS_CONVERT
+ else if (fio_flags & FIO_MACROMAN)
+ size = size / ICONV_MULT; /* also worst case */
+ #endif
+
+ if (conv_restlen > 0)
+ {
+ /* Insert unconverted bytes from previous line. */
+***************
+*** 1296,1302 ****
+ ptr += conv_restlen;
+ size -= conv_restlen;
+ }
+- #endif
+
+ if (read_buffer)
+ {
+--- 1271,1276 ----
+***************
+*** 1445,1451 ****
+ {
+ if (size < 0) /* read error */
+ error = TRUE;
+- #ifdef FEAT_MBYTE
+ else if (conv_restlen > 0)
+ {
+ /*
+--- 1419,1424 ----
+***************
+*** 1455,1463 ****
+
+ /* When we did a conversion report an error. */
+ if (fio_flags != 0
+! # ifdef USE_ICONV
+ || iconv_fd != (iconv_t)-1
+! # endif
+ )
+ {
+ if (can_retry)
+--- 1428,1436 ----
+
+ /* When we did a conversion report an error. */
+ if (fio_flags != 0
+! #ifdef USE_ICONV
+ || iconv_fd != (iconv_t)-1
+! #endif
+ )
+ {
+ if (can_retry)
+***************
+*** 1482,1490 ****
+ * leave the UTF8 checking code to do it, as it
+ * works slightly differently. */
+ if (bad_char_behavior != BAD_KEEP && (fio_flags != 0
+! # ifdef USE_ICONV
+ || iconv_fd != (iconv_t)-1
+! # endif
+ ))
+ {
+ while (conv_restlen > 0)
+--- 1455,1463 ----
+ * leave the UTF8 checking code to do it, as it
+ * works slightly differently. */
+ if (bad_char_behavior != BAD_KEEP && (fio_flags != 0
+! #ifdef USE_ICONV
+ || iconv_fd != (iconv_t)-1
+! #endif
+ ))
+ {
+ while (conv_restlen > 0)
+***************
+*** 1494,1514 ****
+ }
+ }
+ fio_flags = 0; /* don't convert this */
+! # ifdef USE_ICONV
+ if (iconv_fd != (iconv_t)-1)
+ {
+ iconv_close(iconv_fd);
+ iconv_fd = (iconv_t)-1;
+ }
+! # endif
+ }
+ }
+- #endif
+ }
+ }
+ skip_read = FALSE;
+
+- #ifdef FEAT_MBYTE
+ /*
+ * At start of file (or after crypt magic number): Check for BOM.
+ * Also check for a BOM for other Unicode encodings, but not after
+--- 1467,1485 ----
+ }
+ }
+ fio_flags = 0; /* don't convert this */
+! #ifdef USE_ICONV
+ if (iconv_fd != (iconv_t)-1)
+ {
+ iconv_close(iconv_fd);
+ iconv_fd = (iconv_t)-1;
+ }
+! #endif
+ }
+ }
+ }
+ }
+ skip_read = FALSE;
+
+ /*
+ * At start of file (or after crypt magic number): Check for BOM.
+ * Also check for a BOM for other Unicode encodings, but not after
+***************
+*** 1516,1526 ****
+ * found.
+ */
+ if ((filesize == 0
+! # ifdef FEAT_CRYPT
+ || (cryptkey != NULL
+ && filesize == crypt_get_header_len(
+ crypt_get_method_nr(curbuf)))
+! # endif
+ )
+ && (fio_flags == FIO_UCSBOM
+ || (!curbuf->b_p_bomb
+--- 1487,1497 ----
+ * found.
+ */
+ if ((filesize == 0
+! #ifdef FEAT_CRYPT
+ || (cryptkey != NULL
+ && filesize == crypt_get_header_len(
+ crypt_get_method_nr(curbuf)))
+! #endif
+ )
+ && (fio_flags == FIO_UCSBOM
+ || (!curbuf->b_p_bomb
+***************
+*** 1574,1589 ****
+ ptr -= conv_restlen;
+ size += conv_restlen;
+ conv_restlen = 0;
+- #endif
+ /*
+ * Break here for a read error or end-of-file.
+ */
+ if (size <= 0)
+ break;
+
+- #ifdef FEAT_MBYTE
+
+! # ifdef USE_ICONV
+ if (iconv_fd != (iconv_t)-1)
+ {
+ /*
+--- 1545,1558 ----
+ ptr -= conv_restlen;
+ size += conv_restlen;
+ conv_restlen = 0;
+ /*
+ * Break here for a read error or end-of-file.
+ */
+ if (size <= 0)
+ break;
+
+
+! #ifdef USE_ICONV
+ if (iconv_fd != (iconv_t)-1)
+ {
+ /*
+***************
+*** 1645,1653 ****
+ mch_memmove(line_start, buffer, (size_t)linerest);
+ size = (long)((char_u *)top - ptr);
+ }
+! # endif
+
+! # ifdef WIN3264
+ if (fio_flags & FIO_CODEPAGE)
+ {
+ char_u *src, *dst;
+--- 1614,1622 ----
+ mch_memmove(line_start, buffer, (size_t)linerest);
+ size = (long)((char_u *)top - ptr);
+ }
+! #endif
+
+! #ifdef WIN3264
+ if (fio_flags & FIO_CODEPAGE)
+ {
+ char_u *src, *dst;
+***************
+*** 1813,1820 ****
+ size = (long)(dst - ptr);
+ }
+ else
+! # endif
+! # ifdef MACOS_CONVERT
+ if (fio_flags & FIO_MACROMAN)
+ {
+ /*
+--- 1782,1789 ----
+ size = (long)(dst - ptr);
+ }
+ else
+! #endif
+! #ifdef MACOS_CONVERT
+ if (fio_flags & FIO_MACROMAN)
+ {
+ /*
+***************
+*** 1825,1831 ****
+ goto rewind_retry;
+ }
+ else
+! # endif
+ if (fio_flags != 0)
+ {
+ int u8c;
+--- 1794,1800 ----
+ goto rewind_retry;
+ }
+ else
+! #endif
+ if (fio_flags != 0)
+ {
+ int u8c;
+***************
+*** 2089,2099 ****
+ * file is more likely than a conversion error. */
+ if (can_retry && !incomplete_tail)
+ break;
+! # ifdef USE_ICONV
+ /* When we did a conversion report an error. */
+ if (iconv_fd != (iconv_t)-1 && conv_error == 0)
+ conv_error = readfile_linenr(linecnt, ptr, p);
+! # endif
+ /* Remember the first linenr with an illegal byte */
+ if (conv_error == 0 && illegal_byte == 0)
+ illegal_byte = readfile_linenr(linecnt, ptr, p);
+--- 2058,2068 ----
+ * file is more likely than a conversion error. */
+ if (can_retry && !incomplete_tail)
+ break;
+! #ifdef USE_ICONV
+ /* When we did a conversion report an error. */
+ if (iconv_fd != (iconv_t)-1 && conv_error == 0)
+ conv_error = readfile_linenr(linecnt, ptr, p);
+! #endif
+ /* Remember the first linenr with an illegal byte */
+ if (conv_error == 0 && illegal_byte == 0)
+ illegal_byte = readfile_linenr(linecnt, ptr, p);
+***************
+*** 2117,2135 ****
+ /* Detected a UTF-8 error. */
+ rewind_retry:
+ /* Retry reading with another conversion. */
+! # if defined(FEAT_EVAL) && defined(USE_ICONV)
+ if (*p_ccv != NUL && iconv_fd != (iconv_t)-1)
+ /* iconv() failed, try 'charconvert' */
+ did_iconv = TRUE;
+ else
+! # endif
+ /* use next item from 'fileencodings' */
+ advance_fenc = TRUE;
+ file_rewind = TRUE;
+ goto retry;
+ }
+ }
+- #endif
+
+ /* count the number of characters (after conversion!) */
+ filesize += size;
+--- 2086,2103 ----
+ /* Detected a UTF-8 error. */
+ rewind_retry:
+ /* Retry reading with another conversion. */
+! #if defined(FEAT_EVAL) && defined(USE_ICONV)
+ if (*p_ccv != NUL && iconv_fd != (iconv_t)-1)
+ /* iconv() failed, try 'charconvert' */
+ did_iconv = TRUE;
+ else
+! #endif
+ /* use next item from 'fileencodings' */
+ advance_fenc = TRUE;
+ file_rewind = TRUE;
+ goto retry;
+ }
+ }
+
+ /* count the number of characters (after conversion!) */
+ filesize += size;
+***************
+*** 2371,2377 ****
+ * encryption was used. */
+ #endif
+
+- #ifdef FEAT_MBYTE
+ /* If editing a new file: set 'fenc' for the current buffer.
+ * Also for ":read ++edit file". */
+ if (set_options)
+--- 2339,2344 ----
+***************
+*** 2379,2391 ****
+ OPT_FREE|OPT_LOCAL, 0);
+ if (fenc_alloced)
+ vim_free(fenc);
+! # ifdef USE_ICONV
+ if (iconv_fd != (iconv_t)-1)
+ {
+ iconv_close(iconv_fd);
+ iconv_fd = (iconv_t)-1;
+ }
+- # endif
+ #endif
+
+ if (!read_buffer && !read_stdin)
+--- 2346,2357 ----
+ OPT_FREE|OPT_LOCAL, 0);
+ if (fenc_alloced)
+ vim_free(fenc);
+! #ifdef USE_ICONV
+ if (iconv_fd != (iconv_t)-1)
+ {
+ iconv_close(iconv_fd);
+ iconv_fd = (iconv_t)-1;
+ }
+ #endif
+
+ if (!read_buffer && !read_stdin)
+***************
+*** 2409,2421 ****
+ }
+ #endif
+
+- #ifdef FEAT_MBYTE
+ if (tmpname != NULL)
+ {
+ mch_remove(tmpname); /* delete converted file */
+ vim_free(tmpname);
+ }
+- #endif
+ --no_wait_return; /* may wait for return now */
+
+ /*
+--- 2375,2385 ----
+***************
+*** 2528,2534 ****
+ STRCAT(IObuff, _("[long lines split]"));
+ c = TRUE;
+ }
+- #ifdef FEAT_MBYTE
+ if (notconverted)
+ {
+ STRCAT(IObuff, _("[NOT converted]"));
+--- 2492,2497 ----
+***************
+*** 2539,2545 ****
+ STRCAT(IObuff, _("[converted]"));
+ c = TRUE;
+ }
+- #endif
+ #ifdef FEAT_CRYPT
+ if (cryptkey != NULL)
+ {
+--- 2502,2507 ----
+***************
+*** 2547,2553 ****
+ c = TRUE;
+ }
+ #endif
+- #ifdef FEAT_MBYTE
+ if (conv_error != 0)
+ {
+ sprintf((char *)IObuff + STRLEN(IObuff),
+--- 2509,2514 ----
+***************
+*** 2560,2568 ****
+ _("[ILLEGAL BYTE in line %ld]"), (long)illegal_byte);
+ c = TRUE;
+ }
+! else
+! #endif
+! if (error)
+ {
+ STRCAT(IObuff, _("[READ ERRORS]"));
+ c = TRUE;
+--- 2521,2527 ----
+ _("[ILLEGAL BYTE in line %ld]"), (long)illegal_byte);
+ c = TRUE;
+ }
+! else if (error)
+ {
+ STRCAT(IObuff, _("[READ ERRORS]"));
+ c = TRUE;
+***************
+*** 2601,2611 ****
+
+ /* with errors writing the file requires ":w!" */
+ if (newfile && (error
+- #ifdef FEAT_MBYTE
+ || conv_error != 0
+! || (illegal_byte > 0 && bad_char_behavior != BAD_KEEP)
+! #endif
+! ))
+ curbuf->b_p_ro = TRUE;
+
+ u_clearline(); /* cannot use "U" command after adding lines */
+--- 2560,2567 ----
+
+ /* with errors writing the file requires ":w!" */
+ if (newfile && (error
+ || conv_error != 0
+! || (illegal_byte > 0 && bad_char_behavior != BAD_KEEP)))
+ curbuf->b_p_ro = TRUE;
+
+ u_clearline(); /* cannot use "U" command after adding lines */
+***************
+*** 2745,2752 ****
+ }
+ #endif
+
+- #ifdef FEAT_MBYTE
+-
+ /*
+ * From the current line count and characters read after that, estimate the
+ * line number where we are now.
+--- 2701,2706 ----
+***************
+*** 2767,2773 ****
+ ++lnum;
+ return lnum;
+ }
+- #endif
+
+ /*
+ * Fill "*eap" to force the 'fileencoding', 'fileformat' and 'binary to be
+--- 2721,2726 ----
+***************
+*** 2777,2797 ****
+ int
+ prep_exarg(exarg_T *eap, buf_T *buf)
+ {
+! eap->cmd = alloc(15
+! #ifdef FEAT_MBYTE
+! + (unsigned)STRLEN(buf->b_p_fenc)
+! #endif
+! );
+ if (eap->cmd == NULL)
+ return FAIL;
+
+- #ifdef FEAT_MBYTE
+ sprintf((char *)eap->cmd, "e ++enc=%s", buf->b_p_fenc);
+ eap->force_enc = 8;
+ eap->bad_char = buf->b_bad_char;
+- #else
+- sprintf((char *)eap->cmd, "e");
+- #endif
+ eap->force_ff = *buf->b_p_ff;
+
+ eap->force_bin = buf->b_p_bin ? FORCE_BIN : FORCE_NOBIN;
+--- 2730,2742 ----
+ int
+ prep_exarg(exarg_T *eap, buf_T *buf)
+ {
+! eap->cmd = alloc(15 + (unsigned)STRLEN(buf->b_p_fenc));
+ if (eap->cmd == NULL)
+ return FAIL;
+
+ sprintf((char *)eap->cmd, "e ++enc=%s", buf->b_p_fenc);
+ eap->force_enc = 8;
+ eap->bad_char = buf->b_bad_char;
+ eap->force_ff = *buf->b_p_ff;
+
+ eap->force_bin = buf->b_p_bin ? FORCE_BIN : FORCE_NOBIN;
+***************
+*** 2825,2831 ****
+ }
+ }
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Set forced 'fileencoding'.
+ */
+--- 2770,2775 ----
+***************
+*** 2886,2892 ****
+ return r;
+ }
+
+! # ifdef FEAT_EVAL
+ /*
+ * Convert a file with the 'charconvert' expression.
+ * This closes the file which is to be read, converts it and opens the
+--- 2830,2836 ----
+ return r;
+ }
+
+! #ifdef FEAT_EVAL
+ /*
+ * Convert a file with the 'charconvert' expression.
+ * This closes the file which is to be read, converts it and opens the
+***************
+*** 2937,2946 ****
+
+ return tmpname;
+ }
+- # endif
+-
+ #endif
+
+ #ifdef FEAT_VIMINFO
+ /*
+ * Read marks for the current buffer from the viminfo file, when we support
+--- 2881,2889 ----
+
+ return tmpname;
+ }
+ #endif
+
++
+ #ifdef FEAT_VIMINFO
+ /*
+ * Read marks for the current buffer from the viminfo file, when we support
+***************
+*** 3176,3187 ****
+ int fileformat;
+ int write_bin;
+ struct bw_info write_info; /* info for buf_write_bytes() */
+- #ifdef FEAT_MBYTE
+ int converted = FALSE;
+ int notconverted = FALSE;
+ char_u *fenc; /* effective 'fileencoding' */
+ char_u *fenc_tofree = NULL; /* allocated "fenc" */
+- #endif
+ #ifdef HAS_BW_FLAGS
+ int wb_flags = 0;
+ #endif
+--- 3119,3128 ----
+***************
+*** 3219,3233 ****
+ return FAIL;
+ }
+
+- #ifdef FEAT_MBYTE
+ /* must init bw_conv_buf and bw_iconv_fd before jumping to "fail" */
+ write_info.bw_conv_buf = NULL;
+ write_info.bw_conv_error = FALSE;
+ write_info.bw_conv_error_lnum = 0;
+ write_info.bw_restlen = 0;
+! # ifdef USE_ICONV
+ write_info.bw_iconv_fd = (iconv_t)-1;
+- # endif
+ #endif
+ #ifdef FEAT_CRYPT
+ write_info.bw_buffer = buf;
+--- 3160,3172 ----
+ return FAIL;
+ }
+
+ /* must init bw_conv_buf and bw_iconv_fd before jumping to "fail" */
+ write_info.bw_conv_buf = NULL;
+ write_info.bw_conv_error = FALSE;
+ write_info.bw_conv_error_lnum = 0;
+ write_info.bw_restlen = 0;
+! #ifdef USE_ICONV
+ write_info.bw_iconv_fd = (iconv_t)-1;
+ #endif
+ #ifdef FEAT_CRYPT
+ write_info.bw_buffer = buf;
+***************
+*** 4227,4233 ****
+ * multi-byte conversion. */
+ wfname = fname;
+
+- #ifdef FEAT_MBYTE
+ /* Check for forced 'fileencoding' from "++opt=val" argument. */
+ if (eap != NULL && eap->force_enc != 0)
+ {
+--- 4166,4171 ----
+***************
+*** 4265,4271 ****
+ }
+ }
+
+! # ifdef WIN3264
+ if (converted && wb_flags == 0 && (wb_flags = get_win_fio_flags(fenc)) != 0)
+ {
+ /* Convert UTF-8 -> UCS-2 and UCS-2 -> DBCS. Worst-case * 4: */
+--- 4203,4209 ----
+ }
+ }
+
+! #ifdef WIN3264
+ if (converted && wb_flags == 0 && (wb_flags = get_win_fio_flags(fenc)) != 0)
+ {
+ /* Convert UTF-8 -> UCS-2 and UCS-2 -> DBCS. Worst-case * 4: */
+***************
+*** 4275,4283 ****
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ }
+! # endif
+
+! # ifdef MACOS_CONVERT
+ if (converted && wb_flags == 0 && (wb_flags = get_mac_fio_flags(fenc)) != 0)
+ {
+ write_info.bw_conv_buflen = bufsize * 3;
+--- 4213,4221 ----
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ }
+! #endif
+
+! #ifdef MACOS_CONVERT
+ if (converted && wb_flags == 0 && (wb_flags = get_mac_fio_flags(fenc)) != 0)
+ {
+ write_info.bw_conv_buflen = bufsize * 3;
+***************
+*** 4286,4297 ****
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ }
+! # endif
+
+! # if defined(FEAT_EVAL) || defined(USE_ICONV)
+ if (converted && wb_flags == 0)
+ {
+! # ifdef USE_ICONV
+ /*
+ * Use iconv() conversion when conversion is needed and it's not done
+ * internally.
+--- 4224,4235 ----
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ }
+! #endif
+
+! #if defined(FEAT_EVAL) || defined(USE_ICONV)
+ if (converted && wb_flags == 0)
+ {
+! # ifdef USE_ICONV
+ /*
+ * Use iconv() conversion when conversion is needed and it's not done
+ * internally.
+***************
+*** 4308,4319 ****
+ end = 0;
+ write_info.bw_first = TRUE;
+ }
+! # ifdef FEAT_EVAL
+ else
+- # endif
+ # endif
+
+! # ifdef FEAT_EVAL
+ /*
+ * When the file needs to be converted with 'charconvert' after
+ * writing, write to a temp file instead and let the conversion
+--- 4246,4257 ----
+ end = 0;
+ write_info.bw_first = TRUE;
+ }
+! # ifdef FEAT_EVAL
+ else
+ # endif
++ # endif
+
+! # ifdef FEAT_EVAL
+ /*
+ * When the file needs to be converted with 'charconvert' after
+ * writing, write to a temp file instead and let the conversion
+***************
+*** 4328,4343 ****
+ goto restore_backup;
+ }
+ }
+- # endif
+- }
+ # endif
+ if (converted && wb_flags == 0
+! # ifdef USE_ICONV
+ && write_info.bw_iconv_fd == (iconv_t)-1
+! # endif
+! # ifdef FEAT_EVAL
+ && wfname == fname
+! # endif
+ )
+ {
+ if (!forceit)
+--- 4266,4281 ----
+ goto restore_backup;
+ }
+ }
+ # endif
++ }
++ #endif
+ if (converted && wb_flags == 0
+! #ifdef USE_ICONV
+ && write_info.bw_iconv_fd == (iconv_t)-1
+! # endif
+! # ifdef FEAT_EVAL
+ && wfname == fname
+! # endif
+ )
+ {
+ if (!forceit)
+***************
+*** 4347,4353 ****
+ }
+ notconverted = TRUE;
+ }
+- #endif
+
+ /*
+ * If conversion is taking place, we may first pretend to write and check
+--- 4285,4290 ----
+***************
+*** 4362,4370 ****
+ * - we make a backup file, that can be restored in case of conversion
+ * failure.
+ */
+- #ifdef FEAT_MBYTE
+ if (!converted || dobackup)
+- #endif
+ checking_conversion = FALSE;
+
+ if (checking_conversion)
+--- 4299,4305 ----
+***************
+*** 4477,4486 ****
+ end = 0;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (wfname != fname)
+ vim_free(wfname);
+- #endif
+ goto fail;
+ }
+ write_info.bw_fd = fd;
+--- 4412,4419 ----
+***************
+*** 4563,4569 ****
+ else
+ write_bin = buf->b_p_bin;
+
+- #ifdef FEAT_MBYTE
+ /*
+ * The BOM is written just after the encryption magic number.
+ * Skip it when appending and the file already existed, the BOM only
+--- 4496,4501 ----
+***************
+*** 4583,4589 ****
+ }
+ }
+ write_info.bw_start_lnum = start;
+- #endif
+
+ #ifdef FEAT_PERSISTENT_UNDO
+ write_undo_file = (buf->b_p_udf
+--- 4515,4520 ----
+***************
+*** 4635,4643 ****
+ nchars += bufsize;
+ s = buffer;
+ len = 0;
+- #ifdef FEAT_MBYTE
+ write_info.bw_start_lnum = lnum;
+- #endif
+ }
+ /* write failed or last line has no EOL: stop here */
+ if (end == 0
+--- 4566,4572 ----
+***************
+*** 4841,4847 ****
+ }
+ #endif
+
+! #if defined(FEAT_MBYTE) && defined(FEAT_EVAL)
+ if (wfname != fname)
+ {
+ /*
+--- 4770,4776 ----
+ }
+ #endif
+
+! #if defined(FEAT_EVAL)
+ if (wfname != fname)
+ {
+ /*
+***************
+*** 4870,4876 ****
+ */
+ if (errmsg == NULL)
+ {
+- #ifdef FEAT_MBYTE
+ if (write_info.bw_conv_error)
+ {
+ if (write_info.bw_conv_error_lnum == 0)
+--- 4799,4804 ----
+***************
+*** 4883,4894 ****
+ (long)write_info.bw_conv_error_lnum);
+ }
+ }
+ else
+! #endif
+! if (got_int)
+! errmsg = (char_u *)_(e_interr);
+! else
+! errmsg = (char_u *)_("E514: write error (file system full?)");
+ }
+
+ /*
+--- 4811,4820 ----
+ (long)write_info.bw_conv_error_lnum);
+ }
+ }
++ else if (got_int)
++ errmsg = (char_u *)_(e_interr);
+ else
+! errmsg = (char_u *)_("E514: write error (file system full?)");
+ }
+
+ /*
+***************
+*** 4953,4959 ****
+ {
+ msg_add_fname(buf, fname); /* put fname in IObuff with quotes */
+ c = FALSE;
+- #ifdef FEAT_MBYTE
+ if (write_info.bw_conv_error)
+ {
+ STRCAT(IObuff, _(" CONVERSION ERROR"));
+--- 4879,4884 ----
+***************
+*** 4972,4978 ****
+ STRCAT(IObuff, _("[converted]"));
+ c = TRUE;
+ }
+- #endif
+ if (device)
+ {
+ STRCAT(IObuff, _("[Device]"));
+--- 4897,4902 ----
+***************
+*** 5013,5023 ****
+ /* When written everything correctly: reset 'modified'. Unless not
+ * writing to the original file and '+' is not in 'cpoptions'. */
+ if (reset_changed && whole && !append
+- #ifdef FEAT_MBYTE
+ && !write_info.bw_conv_error
+! #endif
+! && (overwriting || vim_strchr(p_cpo, CPO_PLUS) != NULL)
+! )
+ {
+ unchanged(buf, TRUE);
+ /* b:changedtick is always incremented in unchanged() but that
+--- 4937,4944 ----
+ /* When written everything correctly: reset 'modified'. Unless not
+ * writing to the original file and '+' is not in 'cpoptions'. */
+ if (reset_changed && whole && !append
+ && !write_info.bw_conv_error
+! && (overwriting || vim_strchr(p_cpo, CPO_PLUS) != NULL))
+ {
+ unchanged(buf, TRUE);
+ /* b:changedtick is always incremented in unchanged() but that
+***************
+*** 5113,5128 ****
+ vim_free(backup);
+ if (buffer != smallbuf)
+ vim_free(buffer);
+- #ifdef FEAT_MBYTE
+ vim_free(fenc_tofree);
+ vim_free(write_info.bw_conv_buf);
+! # ifdef USE_ICONV
+ if (write_info.bw_iconv_fd != (iconv_t)-1)
+ {
+ iconv_close(write_info.bw_iconv_fd);
+ write_info.bw_iconv_fd = (iconv_t)-1;
+ }
+- # endif
+ #endif
+ #ifdef HAVE_ACL
+ mch_free_acl(acl);
+--- 5034,5047 ----
+ vim_free(backup);
+ if (buffer != smallbuf)
+ vim_free(buffer);
+ vim_free(fenc_tofree);
+ vim_free(write_info.bw_conv_buf);
+! #ifdef USE_ICONV
+ if (write_info.bw_iconv_fd != (iconv_t)-1)
+ {
+ iconv_close(write_info.bw_iconv_fd);
+ write_info.bw_iconv_fd = (iconv_t)-1;
+ }
+ #endif
+ #ifdef HAVE_ACL
+ mch_free_acl(acl);
+***************
+*** 5411,5417 ****
+ int flags = ip->bw_flags; /* extra flags */
+ #endif
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Skip conversion when writing the crypt magic number or the BOM.
+ */
+--- 5330,5335 ----
+***************
+*** 5521,5527 ****
+ }
+ }
+
+! # ifdef WIN3264
+ else if (flags & FIO_CODEPAGE)
+ {
+ /*
+--- 5439,5445 ----
+ }
+ }
+
+! #ifdef WIN3264
+ else if (flags & FIO_CODEPAGE)
+ {
+ /*
+***************
+*** 5617,5623 ****
+
+ fromlen = to - ip->bw_conv_buf;
+ buf = to;
+! # ifdef CP_UTF8 /* VC 4.1 doesn't define CP_UTF8 */
+ if (FIO_GET_CP(flags) == CP_UTF8)
+ {
+ /* Convert from UCS-2 to UTF-8, using the remainder of the
+--- 5535,5541 ----
+
+ fromlen = to - ip->bw_conv_buf;
+ buf = to;
+! # ifdef CP_UTF8 /* VC 4.1 doesn't define CP_UTF8 */
+ if (FIO_GET_CP(flags) == CP_UTF8)
+ {
+ /* Convert from UCS-2 to UTF-8, using the remainder of the
+***************
+*** 5636,5642 ****
+ len = (int)(to - buf);
+ }
+ else
+! #endif
+ {
+ /* Convert from UCS-2 to the codepage, using the remainder of
+ * the conversion buffer. If the conversion uses the default
+--- 5554,5560 ----
+ len = (int)(to - buf);
+ }
+ else
+! # endif
+ {
+ /* Convert from UCS-2 to the codepage, using the remainder of
+ * the conversion buffer. If the conversion uses the default
+***************
+*** 5653,5661 ****
+ }
+ }
+ }
+! # endif
+
+! # ifdef MACOS_CONVERT
+ else if (flags & FIO_MACROMAN)
+ {
+ /*
+--- 5571,5579 ----
+ }
+ }
+ }
+! #endif
+
+! #ifdef MACOS_CONVERT
+ else if (flags & FIO_MACROMAN)
+ {
+ /*
+***************
+*** 5689,5697 ****
+ }
+ buf = ip->bw_conv_buf;
+ }
+! # endif
+
+! # ifdef USE_ICONV
+ if (ip->bw_iconv_fd != (iconv_t)-1)
+ {
+ const char *from;
+--- 5607,5615 ----
+ }
+ buf = ip->bw_conv_buf;
+ }
+! #endif
+
+! #ifdef USE_ICONV
+ if (ip->bw_iconv_fd != (iconv_t)-1)
+ {
+ const char *from;
+***************
+*** 5759,5767 ****
+ buf = ip->bw_conv_buf;
+ len = (int)((char_u *)to - ip->bw_conv_buf);
+ }
+! # endif
+ }
+- #endif /* FEAT_MBYTE */
+
+ if (ip->bw_fd < 0)
+ /* Only checking conversion, which is OK if we get here. */
+--- 5677,5684 ----
+ buf = ip->bw_conv_buf;
+ len = (int)((char_u *)to - ip->bw_conv_buf);
+ }
+! #endif
+ }
+
+ if (ip->bw_fd < 0)
+ /* Only checking conversion, which is OK if we get here. */
+***************
+*** 5798,5804 ****
+ return (wlen < len) ? FAIL : OK;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Convert a Unicode character to bytes.
+ * Return TRUE for an error, FALSE when it's OK.
+--- 5715,5720 ----
+***************
+*** 6089,6095 ****
+ (void)ucs2bytes(0xfeff, &p, flags);
+ return (int)(p - buf);
+ }
+- #endif
+
+ /*
+ * Try to find a shortname by comparing the fullname with the current
+--- 6005,6010 ----
+***************
+*** 7639,7651 ****
+ if (path_with_url(fname))
+ return;
+ for (p = fname; *p != NUL; ++p)
+- # ifdef FEAT_MBYTE
+ /* The Big5 encoding can have '\' in the trail byte. */
+ if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1)
+ ++p;
+! else
+! # endif
+! if (*p == '\\')
+ *p = '/';
+ }
+ #endif
+--- 7554,7563 ----
+ if (path_with_url(fname))
+ return;
+ for (p = fname; *p != NUL; ++p)
+ /* The Big5 encoding can have '\' in the trail byte. */
+ if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1)
+ ++p;
+! else if (*p == '\\')
+ *p = '/';
+ }
+ #endif
+***************
+*** 10340,10352 ****
+ #endif
+ default:
+ size++;
+- # ifdef FEAT_MBYTE
+ if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1)
+ {
+ ++p;
+ ++size;
+ }
+- # endif
+ break;
+ }
+ }
+--- 10252,10262 ----
+***************
+*** 10479,10490 ****
+ reg_pat[i++] = ',';
+ break;
+ default:
+- # ifdef FEAT_MBYTE
+ if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1)
+ reg_pat[i++] = *p++;
+! else
+! # endif
+! if (allow_dirs != NULL && vim_ispathsep(*p))
+ *allow_dirs = TRUE;
+ reg_pat[i++] = *p;
+ break;
+--- 10389,10397 ----
+ reg_pat[i++] = ',';
+ break;
+ default:
+ if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1)
+ reg_pat[i++] = *p++;
+! else if (allow_dirs != NULL && vim_ispathsep(*p))
+ *allow_dirs = TRUE;
+ reg_pat[i++] = *p;
+ break;
+*** ../vim-8.1.0804/src/fold.c 2019-01-13 23:38:33.391773303 +0100
+--- src/fold.c 2019-01-24 14:49:06.965289375 +0100
+***************
+*** 1057,1067 ****
+ end->col = (colnr_T)STRLEN(ptr);
+ if (end->col > 0 && *p_sel == 'o')
+ --end->col;
+- #ifdef FEAT_MBYTE
+ /* prevent cursor from moving on the trail byte */
+ if (has_mbyte)
+ mb_adjust_cursor();
+- #endif
+ }
+ }
+
+--- 1057,1065 ----
+***************
+*** 1946,1952 ****
+ * replace a TAB with a space. */
+ for (p = text; *p != NUL; ++p)
+ {
+- # ifdef FEAT_MBYTE
+ int len;
+
+ if (has_mbyte && (len = (*mb_ptr2len)(p)) > 1)
+--- 1944,1949 ----
+***************
+*** 1956,1962 ****
+ p += len - 1;
+ }
+ else
+- # endif
+ if (*p == TAB)
+ *p = ' ';
+ else if (ptr2cells(p) > 1)
+--- 1953,1958 ----
+*** ../vim-8.1.0804/src/gui.c 2019-01-19 17:43:03.413449172 +0100
+--- src/gui.c 2019-01-24 14:52:09.860035462 +0100
+***************
+*** 13,19 ****
+ /* Structure containing all the GUI information */
+ gui_T gui;
+
+! #if defined(FEAT_MBYTE) && !defined(FEAT_GUI_GTK)
+ static void set_guifontwide(char_u *font_name);
+ #endif
+ static void gui_check_pos(void);
+--- 13,19 ----
+ /* Structure containing all the GUI information */
+ gui_T gui;
+
+! #if !defined(FEAT_GUI_GTK)
+ static void set_guifontwide(char_u *font_name);
+ #endif
+ static void gui_check_pos(void);
+***************
+*** 397,409 ****
+ gui.fontset = NOFONTSET;
+ # endif
+ #endif
+- #ifdef FEAT_MBYTE
+ gui.wide_font = NOFONT;
+! # ifndef FEAT_GUI_GTK
+ gui.wide_bold_font = NOFONT;
+ gui.wide_ital_font = NOFONT;
+ gui.wide_boldital_font = NOFONT;
+- # endif
+ #endif
+
+ #ifdef FEAT_MENU
+--- 397,407 ----
+ gui.fontset = NOFONTSET;
+ # endif
+ #endif
+ gui.wide_font = NOFONT;
+! #ifndef FEAT_GUI_GTK
+ gui.wide_bold_font = NOFONT;
+ gui.wide_ital_font = NOFONT;
+ gui.wide_boldital_font = NOFONT;
+ #endif
+
+ #ifdef FEAT_MENU
+***************
+*** 652,661 ****
+ emsg(_("E665: Cannot start GUI, no valid font found"));
+ goto error2;
+ }
+- #ifdef FEAT_MBYTE
+ if (gui_get_wide_font() == FAIL)
+ emsg(_("E231: 'guifontwide' invalid"));
+- #endif
+
+ gui.num_cols = Columns;
+ gui.num_rows = Rows;
+--- 650,657 ----
+***************
+*** 874,880 ****
+ * longer be used! */
+ if (gui_mch_init_font(font_name, FALSE) == OK)
+ {
+! #if defined(FEAT_MBYTE) && !defined(FEAT_GUI_GTK)
+ /* If it's a Unicode font, try setting 'guifontwide' to a
+ * similar double-width font. */
+ if ((p_guifontwide == NULL || *p_guifontwide == NUL)
+--- 870,876 ----
+ * longer be used! */
+ if (gui_mch_init_font(font_name, FALSE) == OK)
+ {
+! #if !defined(FEAT_GUI_GTK)
+ /* If it's a Unicode font, try setting 'guifontwide' to a
+ * similar double-width font. */
+ if ((p_guifontwide == NULL || *p_guifontwide == NUL)
+***************
+*** 916,923 ****
+ return ret;
+ }
+
+! #if defined(FEAT_MBYTE) || defined(PROTO)
+! # ifndef FEAT_GUI_GTK
+ /*
+ * Try setting 'guifontwide' to a font twice as wide as "name".
+ */
+--- 912,918 ----
+ return ret;
+ }
+
+! #ifndef FEAT_GUI_GTK
+ /*
+ * Try setting 'guifontwide' to a font twice as wide as "name".
+ */
+***************
+*** 964,970 ****
+ }
+ }
+ }
+! # endif /* !FEAT_GUI_GTK */
+
+ /*
+ * Get the font for 'guifontwide'.
+--- 959,965 ----
+ }
+ }
+ }
+! #endif /* !FEAT_GUI_GTK */
+
+ /*
+ * Get the font for 'guifontwide'.
+***************
+*** 995,1001 ****
+ }
+
+ gui_mch_free_font(gui.wide_font);
+! # ifdef FEAT_GUI_GTK
+ /* Avoid unnecessary overhead if 'guifontwide' is equal to 'guifont'. */
+ if (font != NOFONT && gui.norm_font != NOFONT
+ && pango_font_description_equal(font, gui.norm_font))
+--- 990,996 ----
+ }
+
+ gui_mch_free_font(gui.wide_font);
+! #ifdef FEAT_GUI_GTK
+ /* Avoid unnecessary overhead if 'guifontwide' is equal to 'guifont'. */
+ if (font != NOFONT && gui.norm_font != NOFONT
+ && pango_font_description_equal(font, gui.norm_font))
+***************
+*** 1004,1022 ****
+ gui_mch_free_font(font);
+ }
+ else
+! # endif
+ gui.wide_font = font;
+! # ifdef FEAT_GUI_MSWIN
+ gui_mch_wide_font_changed();
+! # else
+ /*
+ * TODO: setup wide_bold_font, wide_ital_font and wide_boldital_font to
+ * support those fonts for 'guifontwide'.
+ */
+! # endif
+ return OK;
+ }
+- #endif
+
+ void
+ gui_set_cursor(int row, int col)
+--- 999,1016 ----
+ gui_mch_free_font(font);
+ }
+ else
+! #endif
+ gui.wide_font = font;
+! #ifdef FEAT_GUI_MSWIN
+ gui_mch_wide_font_changed();
+! #else
+ /*
+ * TODO: setup wide_bold_font, wide_ital_font and wide_boldital_font to
+ * support those fonts for 'guifontwide'.
+ */
+! #endif
+ return OK;
+ }
+
+ void
+ gui_set_cursor(int row, int col)
+***************
+*** 1258,1264 ****
+ }
+ else
+ {
+! #if defined(FEAT_MBYTE) && defined(FEAT_RIGHTLEFT)
+ int col_off = FALSE;
+ #endif
+ /*
+--- 1252,1258 ----
+ }
+ else
+ {
+! #if defined(FEAT_RIGHTLEFT)
+ int col_off = FALSE;
+ #endif
+ /*
+***************
+*** 1275,1288 ****
+ cur_height = (gui.char_height * shape->percentage + 99) / 100;
+ cur_width = gui.char_width;
+ }
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (*mb_off2cells)(LineOffset[gui.row] + gui.col,
+ LineOffset[gui.row] + screen_Columns) > 1)
+ {
+ /* Double wide character. */
+ if (shape->shape != SHAPE_VER)
+ cur_width += gui.char_width;
+! # ifdef FEAT_RIGHTLEFT
+ if (CURSOR_BAR_RIGHT)
+ {
+ /* gui.col points to the left halve of the character but
+--- 1269,1281 ----
+ cur_height = (gui.char_height * shape->percentage + 99) / 100;
+ cur_width = gui.char_width;
+ }
+ if (has_mbyte && (*mb_off2cells)(LineOffset[gui.row] + gui.col,
+ LineOffset[gui.row] + screen_Columns) > 1)
+ {
+ /* Double wide character. */
+ if (shape->shape != SHAPE_VER)
+ cur_width += gui.char_width;
+! #ifdef FEAT_RIGHTLEFT
+ if (CURSOR_BAR_RIGHT)
+ {
+ /* gui.col points to the left halve of the character but
+***************
+*** 1292,1302 ****
+ col_off = TRUE;
+ ++gui.col;
+ }
+- # endif
+- }
+ #endif
+ gui_mch_draw_part_cursor(cur_width, cur_height, cbg);
+! #if defined(FEAT_MBYTE) && defined(FEAT_RIGHTLEFT)
+ if (col_off)
+ --gui.col;
+ #endif
+--- 1285,1294 ----
+ col_off = TRUE;
+ ++gui.col;
+ }
+ #endif
++ }
+ gui_mch_draw_part_cursor(cur_width, cur_height, cbg);
+! #if defined(FEAT_RIGHTLEFT)
+ if (col_off)
+ --gui.col;
+ #endif
+***************
+*** 2023,2031 ****
+ gui_outstr(char_u *s, int len)
+ {
+ int this_len;
+- #ifdef FEAT_MBYTE
+ int cells;
+- #endif
+
+ if (len == 0)
+ return;
+--- 2015,2021 ----
+***************
+*** 2035,2041 ****
+
+ while (len > 0)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* Find out how many chars fit in the current line. */
+--- 2025,2030 ----
+***************
+*** 2051,2057 ****
+ this_len = len; /* don't include following composing char */
+ }
+ else
+- #endif
+ if (gui.col + len > Columns)
+ this_len = Columns - gui.col;
+ else
+--- 2040,2045 ----
+***************
+*** 2061,2072 ****
+ 0, (guicolor_T)0, (guicolor_T)0, 0);
+ s += this_len;
+ len -= this_len;
+- #ifdef FEAT_MBYTE
+ /* fill up for a double-width char that doesn't fit. */
+ if (len > 0 && gui.col < Columns)
+ (void)gui_outstr_nowrap((char_u *)" ", 1,
+ 0, (guicolor_T)0, (guicolor_T)0, 0);
+- #endif
+ /* The cursor may wrap to the next line. */
+ if (gui.col >= Columns)
+ {
+--- 2049,2058 ----
+***************
+*** 2089,2095 ****
+ guicolor_T bg, /* colors for cursor */
+ int back) /* backup this many chars when using bold trick */
+ {
+- #ifdef FEAT_MBYTE
+ char_u buf[MB_MAXBYTES + 1];
+
+ /* Don't draw right halve of a double-width UTF-8 char. "cannot happen" */
+--- 2075,2080 ----
+***************
+*** 2112,2120 ****
+ return gui_outstr_nowrap(ScreenLines + off,
+ enc_dbcs ? (*mb_ptr2len)(ScreenLines + off) : 1,
+ flags, fg, bg, back);
+- #else
+- return gui_outstr_nowrap(ScreenLines + off, 1, flags, fg, bg, back);
+- #endif
+ }
+
+ #ifdef FEAT_GUI_GTK
+--- 2097,2102 ----
+***************
+*** 2223,2231 ****
+ guicolor_T sp_color;
+ #if !defined(FEAT_GUI_GTK)
+ GuiFont font = NOFONT;
+- # ifdef FEAT_MBYTE
+ GuiFont wide_font = NOFONT;
+- # endif
+ # ifdef FEAT_XFONTSET
+ GuiFontset fontset = NOFONTSET;
+ # endif
+--- 2205,2211 ----
+***************
+*** 2316,2322 ****
+ else
+ font = gui.norm_font;
+
+- # ifdef FEAT_MBYTE
+ /*
+ * Choose correct wide_font by font. wide_font should be set with font
+ * at same time in above block. But it will make many "ifdef" nasty
+--- 2296,2301 ----
+***************
+*** 2330,2337 ****
+ wide_font = gui.wide_ital_font;
+ else if (font == gui.norm_font && gui.wide_font)
+ wide_font = gui.wide_font;
+- # endif
+-
+ }
+ # ifdef FEAT_XFONTSET
+ if (fontset != NOFONTSET)
+--- 2309,2314 ----
+***************
+*** 2441,2447 ****
+ /* The value returned is the length in display cells */
+ len = gui_gtk2_draw_string(gui.row, col, s, len, draw_flags);
+ #else
+- # ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ int start; /* index of bytes to be drawn */
+--- 2418,2423 ----
+***************
+*** 2456,2466 ****
+ int curr_wide = FALSE; /* use 'guifontwide' */
+ int prev_wide = FALSE;
+ int wide_changed;
+! # ifdef WIN3264
+ int sep_comp = FALSE; /* Don't separate composing chars. */
+! # else
+ int sep_comp = TRUE; /* Separate composing chars. */
+! # endif
+
+ /* Break the string at a composing character, it has to be drawn on
+ * top of the previous character. */
+--- 2432,2442 ----
+ int curr_wide = FALSE; /* use 'guifontwide' */
+ int prev_wide = FALSE;
+ int wide_changed;
+! # ifdef WIN3264
+ int sep_comp = FALSE; /* Don't separate composing chars. */
+! # else
+ int sep_comp = TRUE; /* Separate composing chars. */
+! # endif
+
+ /* Break the string at a composing character, it has to be drawn on
+ * top of the previous character. */
+***************
+*** 2476,2484 ****
+ if (!comping || sep_comp)
+ {
+ if (cn > 1
+! # ifdef FEAT_XFONTSET
+ && fontset == NOFONTSET
+! # endif
+ && wide_font != NOFONT)
+ curr_wide = TRUE;
+ else
+--- 2452,2460 ----
+ if (!comping || sep_comp)
+ {
+ if (cn > 1
+! # ifdef FEAT_XFONTSET
+ && fontset == NOFONTSET
+! # endif
+ && wide_font != NOFONT)
+ curr_wide = TRUE;
+ else
+***************
+*** 2494,2508 ****
+ * a composing character. */
+ if (i + cl >= len || (comping && sep_comp && i > start)
+ || wide_changed
+! # if defined(FEAT_GUI_X11)
+ || (cn > 1
+! # ifdef FEAT_XFONTSET
+ /* No fontset: At least draw char after wide char at
+ * right position. */
+ && fontset == NOFONTSET
+- # endif
+- )
+ # endif
+ )
+ {
+ if ((comping && sep_comp) || wide_changed)
+--- 2470,2484 ----
+ * a composing character. */
+ if (i + cl >= len || (comping && sep_comp && i > start)
+ || wide_changed
+! # if defined(FEAT_GUI_X11)
+ || (cn > 1
+! # ifdef FEAT_XFONTSET
+ /* No fontset: At least draw char after wide char at
+ * right position. */
+ && fontset == NOFONTSET
+ # endif
++ )
++ # endif
+ )
+ {
+ if ((comping && sep_comp) || wide_changed)
+***************
+*** 2529,2557 ****
+ cl = 0;
+ }
+
+! # if defined(FEAT_GUI_X11)
+ /* No fontset: draw a space to fill the gap after a wide char
+ * */
+ if (cn > 1 && (draw_flags & DRAW_TRANSP) == 0
+! # ifdef FEAT_XFONTSET
+ && fontset == NOFONTSET
+! # endif
+ && !wide_changed)
+ gui_mch_draw_string(gui.row, scol - 1, (char_u *)" ",
+ 1, draw_flags);
+! # endif
+ }
+ /* Draw a composing char on top of the previous char. */
+ if (comping && sep_comp)
+ {
+! # if defined(__APPLE_CC__) && TARGET_API_MAC_CARBON
+ /* Carbon ATSUI autodraws composing char over previous char */
+ gui_mch_draw_string(gui.row, scol, s + i, cl,
+ draw_flags | DRAW_TRANSP);
+! # else
+ gui_mch_draw_string(gui.row, scol - cn, s + i, cl,
+ draw_flags | DRAW_TRANSP);
+! # endif
+ start = i + cl;
+ }
+ prev_wide = curr_wide;
+--- 2505,2533 ----
+ cl = 0;
+ }
+
+! # if defined(FEAT_GUI_X11)
+ /* No fontset: draw a space to fill the gap after a wide char
+ * */
+ if (cn > 1 && (draw_flags & DRAW_TRANSP) == 0
+! # ifdef FEAT_XFONTSET
+ && fontset == NOFONTSET
+! # endif
+ && !wide_changed)
+ gui_mch_draw_string(gui.row, scol - 1, (char_u *)" ",
+ 1, draw_flags);
+! # endif
+ }
+ /* Draw a composing char on top of the previous char. */
+ if (comping && sep_comp)
+ {
+! # if defined(__APPLE_CC__) && TARGET_API_MAC_CARBON
+ /* Carbon ATSUI autodraws composing char over previous char */
+ gui_mch_draw_string(gui.row, scol, s + i, cl,
+ draw_flags | DRAW_TRANSP);
+! # else
+ gui_mch_draw_string(gui.row, scol - cn, s + i, cl,
+ draw_flags | DRAW_TRANSP);
+! # endif
+ start = i + cl;
+ }
+ prev_wide = curr_wide;
+***************
+*** 2560,2576 ****
+ len = scol - col;
+ }
+ else
+- # endif
+ {
+ gui_mch_draw_string(gui.row, col, s, len, draw_flags);
+- # ifdef FEAT_MBYTE
+ if (enc_dbcs == DBCS_JPNU)
+ {
+ /* Get the length in display cells, this can be different from the
+ * number of bytes for "euc-jp". */
+ len = mb_string2cells(s, len);
+ }
+- # endif
+ }
+ #endif /* !FEAT_GUI_GTK */
+
+--- 2536,2549 ----
+***************
+*** 2697,2705 ****
+ int idx, len;
+ int back, nback;
+ int retval = FALSE;
+- #ifdef FEAT_MBYTE
+ int orig_col1, orig_col2;
+- #endif
+
+ /* Don't try to update when ScreenLines is not valid */
+ if (!screen_cleared || ScreenLines == NULL)
+--- 2670,2676 ----
+***************
+*** 2716,2729 ****
+ old_row = gui.row;
+ old_col = gui.col;
+ old_hl_mask = gui.highlight_mask;
+- #ifdef FEAT_MBYTE
+ orig_col1 = col1;
+ orig_col2 = col2;
+- #endif
+
+ for (gui.row = row1; gui.row <= row2; gui.row++)
+ {
+- #ifdef FEAT_MBYTE
+ /* When only half of a double-wide character is in the block, include
+ * the other half. */
+ col1 = orig_col1;
+--- 2687,2697 ----
+***************
+*** 2753,2764 ****
+ msg((char *)IObuff);
+ }
+ }
+! # ifdef FEAT_GUI_GTK
+ if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
+ ++col2;
+- # endif
+- }
+ #endif
+ gui.col = col1;
+ off = LineOffset[gui.row] + gui.col;
+ len = col2 - col1 + 1;
+--- 2721,2731 ----
+ msg((char *)IObuff);
+ }
+ }
+! #ifdef FEAT_GUI_GTK
+ if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
+ ++col2;
+ #endif
++ }
+ gui.col = col1;
+ off = LineOffset[gui.row] + gui.col;
+ len = col2 - col1 + 1;
+***************
+*** 2778,2784 ****
+ {
+ first_attr = ScreenAttrs[off];
+ gui.highlight_mask = first_attr;
+! #if defined(FEAT_MBYTE) && !defined(FEAT_GUI_GTK)
+ if (enc_utf8 && ScreenLinesUC[off] != 0)
+ {
+ /* output multi-byte character separately */
+--- 2745,2751 ----
+ {
+ first_attr = ScreenAttrs[off];
+ gui.highlight_mask = first_attr;
+! #if !defined(FEAT_GUI_GTK)
+ if (enc_utf8 && ScreenLinesUC[off] != 0)
+ {
+ /* output multi-byte character separately */
+***************
+*** 2814,2820 ****
+ for (idx = 0; idx < len && ScreenAttrs[off + idx] == first_attr;
+ idx++)
+ {
+- # ifdef FEAT_MBYTE
+ /* Stop at a multi-byte Unicode character. */
+ if (enc_utf8 && ScreenLinesUC[off + idx] != 0)
+ break;
+--- 2781,2786 ----
+***************
+*** 2827,2833 ****
+ + off + idx) == 2)
+ ++idx; /* skip second byte of double-byte char */
+ }
+- # endif
+ }
+ nback = gui_outstr_nowrap(ScreenLines + off, idx, flags,
+ (guicolor_T)0, (guicolor_T)0, back);
+--- 2793,2798 ----
+***************
+*** 3390,3400 ****
+ int col = check_col(X_2_COL(x));
+ int row = check_row(Y_2_ROW(y));
+
+- #ifdef FEAT_MBYTE
+ *colp = mb_fix_col(col, row);
+- #else
+- *colp = col;
+- #endif
+ return row;
+ }
+
+--- 3355,3361 ----
+*** ../vim-8.1.0804/src/gui_mac.c 2019-01-13 23:38:33.395773275 +0100
+--- src/gui_mac.c 2019-01-24 14:55:07.014824269 +0100
+***************
+*** 48,58 ****
+
+ /* Vim's Scrap flavor. */
+ #define VIMSCRAPFLAVOR 'VIM!'
+! #ifdef FEAT_MBYTE
+! # define SCRAPTEXTFLAVOR kScrapFlavorTypeUnicode
+! #else
+! # define SCRAPTEXTFLAVOR kScrapFlavorTypeText
+! #endif
+
+ static EventHandlerUPP mouseWheelHandlerUPP = NULL;
+ SInt32 gMacSystemVersion;
+--- 48,54 ----
+
+ /* Vim's Scrap flavor. */
+ #define VIMSCRAPFLAVOR 'VIM!'
+! #define SCRAPTEXTFLAVOR kScrapFlavorTypeUnicode
+
+ static EventHandlerUPP mouseWheelHandlerUPP = NULL;
+ SInt32 gMacSystemVersion;
+***************
+*** 169,177 ****
+ # define USE_ATSUI_DRAWING
+ int p_macatsui_last;
+ ATSUStyle gFontStyle;
+- # ifdef FEAT_MBYTE
+ ATSUStyle gWideFontStyle;
+- # endif
+ Boolean gIsFontFallbackSet;
+ UInt32 useAntialias_cached = 0x0;
+ #endif
+--- 165,171 ----
+***************
+*** 2035,2049 ****
+ switch (eventKind)
+ {
+ case kEventWindowActivated:
+- # if defined(FEAT_MBYTE)
+ im_on_window_switch(TRUE);
+- # endif
+ return noErr;
+
+ case kEventWindowDeactivated:
+- # if defined(FEAT_MBYTE)
+ im_on_window_switch(FALSE);
+- # endif
+ return noErr;
+ }
+ }
+--- 2029,2039 ----
+***************
+*** 2391,2397 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ /* Convert characters when needed (e.g., from MacRoman to latin1).
+ * This doesn't work for the NUL byte. */
+ if (input_conv.vc_type != CONV_NONE && key_char > 0)
+--- 2381,2386 ----
+***************
+*** 2421,2427 ****
+ string[len++] = key_char;
+ }
+ else
+- #endif
+ string[len++] = key_char;
+ }
+
+--- 2410,2415 ----
+***************
+*** 3195,3206 ****
+ }
+ #endif
+
+- /*
+- #ifdef FEAT_MBYTE
+- set_option_value((char_u *)"encoding", 0L, (char_u *)"utf-8", 0);
+- #endif
+- */
+-
+ #ifdef FEAT_GUI_TABLINE
+ /*
+ * Create the tabline
+--- 3183,3188 ----
+***************
+*** 3254,3263 ****
+ {
+ if (p_macatsui && gFontStyle)
+ ATSUDisposeStyle(gFontStyle);
+- #ifdef FEAT_MBYTE
+ if (p_macatsui && gWideFontStyle)
+ ATSUDisposeStyle(gWideFontStyle);
+- #endif
+ }
+ #endif
+
+--- 3236,3243 ----
+***************
+*** 3430,3442 ****
+ if (ATSUCreateStyle(&gFontStyle) != noErr)
+ gFontStyle = NULL;
+ }
+- #ifdef FEAT_MBYTE
+ if (p_macatsui && gWideFontStyle == NULL)
+ {
+ if (ATSUCreateStyle(&gWideFontStyle) != noErr)
+ gWideFontStyle = NULL;
+ }
+- #endif
+
+ p_macatsui_last = p_macatsui;
+ }
+--- 3410,3420 ----
+***************
+*** 3622,3628 ****
+ gFontStyle = NULL;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* FIXME: we should use a more mbyte sensitive way to support
+--- 3600,3605 ----
+***************
+*** 3637,3643 ****
+ gWideFontStyle = NULL;
+ }
+ }
+- #endif
+ }
+ }
+ #endif
+--- 3614,3619 ----
+***************
+*** 3811,3817 ****
+ static void
+ draw_string_QD(int row, int col, char_u *s, int len, int flags)
+ {
+- #ifdef FEAT_MBYTE
+ char_u *tofree = NULL;
+
+ if (output_conv.vc_type != CONV_NONE)
+--- 3787,3792 ----
+***************
+*** 3820,3826 ****
+ if (tofree != NULL)
+ s = tofree;
+ }
+- #endif
+
+ /*
+ * On OS X, try using Quartz-style text antialiasing.
+--- 3795,3800 ----
+***************
+*** 3849,3855 ****
+
+ rc.left = FILL_X(col);
+ rc.top = FILL_Y(row);
+- #ifdef FEAT_MBYTE
+ /* Multibyte computation taken from gui_w32.c */
+ if (has_mbyte)
+ {
+--- 3823,3828 ----
+***************
+*** 3857,3864 ****
+ rc.right = FILL_X(col + mb_string2cells(s, len));
+ }
+ else
+! #endif
+! rc.right = FILL_X(col + len) + (col + len == Columns);
+ rc.bottom = FILL_Y(row + 1);
+ EraseRect(&rc);
+ }
+--- 3830,3836 ----
+ rc.right = FILL_X(col + mb_string2cells(s, len));
+ }
+ else
+! rc.right = FILL_X(col + len) + (col + len == Columns);
+ rc.bottom = FILL_Y(row + 1);
+ EraseRect(&rc);
+ }
+***************
+*** 3918,3926 ****
+ if (flags & DRAW_UNDERC)
+ draw_undercurl(flags, row, col, len);
+
+- #ifdef FEAT_MBYTE
+ vim_free(tofree);
+- #endif
+ }
+
+ #ifdef USE_ATSUI_DRAWING
+--- 3890,3896 ----
+***************
+*** 4007,4013 ****
+ useAntialias_cached = useAntialias;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int n, width_in_cell, last_width_in_cell;
+--- 3977,3982 ----
+***************
+*** 4069,4075 ****
+ ATSUDisposeTextLayout(textLayout);
+ }
+ else
+- #endif
+ {
+ ATSUTextLayout textLayout;
+
+--- 4038,4043 ----
+***************
+*** 4225,4234 ****
+ rc.left = FILL_X(gui.col);
+ rc.top = FILL_Y(gui.row);
+ rc.right = rc.left + gui.char_width;
+- #ifdef FEAT_MBYTE
+ if (mb_lefthalve(gui.row, gui.col))
+ rc.right += gui.char_width;
+- #endif
+ rc.bottom = rc.top + gui.char_height;
+
+ gui_mch_set_fg_color(color);
+--- 4193,4200 ----
+***************
+*** 4705,4715 ****
+ */
+ static long next_avail_id = 128;
+ long menu_after_me = 0; /* Default to the end */
+- #if defined(FEAT_MBYTE)
+ CFStringRef name;
+- #else
+- char_u *name;
+- #endif
+ short index;
+ vimmenu_T *parent = menu->parent;
+ vimmenu_T *brother = menu->next;
+--- 4671,4677 ----
+***************
+*** 4750,4761 ****
+ * OSStatus SetMenuTitle(MenuRef, ConstStr255Param title);
+ */
+ menu->submenu_id = next_avail_id;
+- #if defined(FEAT_MBYTE)
+ if (CreateNewMenu(menu->submenu_id, 0, (MenuRef *)&menu->submenu_handle) == noErr)
+ SetMenuTitleWithCFString((MenuRef)menu->submenu_handle, name);
+- #else
+- menu->submenu_handle = NewMenu(menu->submenu_id, name);
+- #endif
+ next_avail_id++;
+ }
+
+--- 4712,4719 ----
+***************
+*** 4784,4804 ****
+ * to avoid special character recognition by InsertMenuItem
+ */
+ InsertMenuItem(parent->submenu_handle, "\p ", idx); /* afterItem */
+- #if defined(FEAT_MBYTE)
+ SetMenuItemTextWithCFString(parent->submenu_handle, idx+1, name);
+- #else
+- SetMenuItemText(parent->submenu_handle, idx+1, name);
+- #endif
+ SetItemCmd(parent->submenu_handle, idx+1, 0x1B);
+ SetItemMark(parent->submenu_handle, idx+1, menu->submenu_id);
+ InsertMenu(menu->submenu_handle, hierMenu);
+ }
+
+- #if defined(FEAT_MBYTE)
+ CFRelease(name);
+- #else
+- vim_free(name);
+- #endif
+
+ #if 0
+ /* Done by Vim later on */
+--- 4742,4754 ----
+***************
+*** 4812,4822 ****
+ void
+ gui_mch_add_menu_item(vimmenu_T *menu, int idx)
+ {
+- #if defined(FEAT_MBYTE)
+ CFStringRef name;
+- #else
+- char_u *name;
+- #endif
+ vimmenu_T *parent = menu->parent;
+ int menu_inserted;
+
+--- 4762,4768 ----
+***************
+*** 4912,4934 ****
+ if (!menu_inserted)
+ InsertMenuItem(parent->submenu_handle, "\p ", idx); /* afterItem */
+ /* Set the menu item name. */
+- #if defined(FEAT_MBYTE)
+ SetMenuItemTextWithCFString(parent->submenu_handle, idx+1, name);
+- #else
+- SetMenuItemText(parent->submenu_handle, idx+1, name);
+- #endif
+
+ #if 0
+ /* Called by Vim */
+ DrawMenuBar();
+ #endif
+
+- #if defined(FEAT_MBYTE)
+ CFRelease(name);
+- #else
+- /* TODO: Can name be freed? */
+- vim_free(name);
+- #endif
+ }
+
+ void
+--- 4858,4871 ----
+***************
+*** 6242,6248 ****
+ #endif
+ }
+
+! #if (defined(FEAT_MBYTE) && defined(USE_CARBONKEYHANDLER)) || defined(PROTO)
+ /*
+ * Input Method Control functions.
+ */
+--- 6179,6185 ----
+ #endif
+ }
+
+! #if defined(USE_CARBONKEYHANDLER) || defined(PROTO)
+ /*
+ * Input Method Control functions.
+ */
+***************
+*** 6391,6398 ****
+ return im_is_active;
+ }
+
+! #endif /* defined(FEAT_MBYTE) || defined(PROTO) */
+!
+
+
+
+--- 6328,6334 ----
+ return im_is_active;
+ }
+
+! #endif
+
+
+
+*** ../vim-8.1.0804/src/gui_photon.c 2019-01-13 23:38:33.395773275 +0100
+--- src/gui_photon.c 2019-01-24 14:55:37.770614257 +0100
+***************
+*** 513,525 ****
+ if (special_keys[i].key_sym == 0)
+ {
+ ch = PhTo8859_1(key);
+! if (ch == -1
+! #ifdef FEAT_MBYTE
+! || (enc_utf8 && ch > 127)
+! #endif
+! )
+ {
+- #ifdef FEAT_MBYTE
+ len = PhKeyToMb(string, key);
+ if (len > 0)
+ {
+--- 513,520 ----
+ if (special_keys[i].key_sym == 0)
+ {
+ ch = PhTo8859_1(key);
+! if (ch == -1 || (enc_utf8 && ch > 127))
+ {
+ len = PhKeyToMb(string, key);
+ if (len > 0)
+ {
+***************
+*** 546,552 ****
+ return Pt_CONSUME;
+ }
+ len = 0;
+- #endif
+ ch = key->key_cap;
+ if (ch < 0xff)
+ {
+--- 541,546 ----
+***************
+*** 1074,1080 ****
+
+ /****************************************************************************/
+
+- #ifdef FEAT_MBYTE
+ void
+ gui_ph_encoding_changed(int new_encoding)
+ {
+--- 1068,1073 ----
+***************
+*** 1100,1106 ****
+
+ charset_translate = PxTranslateSet(charset_translate, charset);
+ }
+- #endif
+
+ /****************************************************************************/
+ /****************************************************************************/
+--- 1093,1098 ----
+***************
+*** 2141,2151 ****
+ if (flags & DRAW_UNDERL)
+ PgSetUnderline(gui.norm_pixel, Pg_TRANSPARENT, 0);
+
+! if (charset_translate != NULL
+! #ifdef FEAT_MBYTE
+! && enc_utf8 == 0
+! #endif
+! )
+ {
+ int src_taken, dst_made;
+
+--- 2133,2139 ----
+ if (flags & DRAW_UNDERL)
+ PgSetUnderline(gui.norm_pixel, Pg_TRANSPARENT, 0);
+
+! if (charset_translate != NULL && enc_utf8 == 0)
+ {
+ int src_taken, dst_made;
+
+*** ../vim-8.1.0804/src/version.c 2019-01-24 13:58:05.821568951 +0100
+--- src/version.c 2019-01-24 15:03:57.587208227 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 805,
+ /**/
+
+--
+ An extraordinary TALL KNIGHT in all black (possibly John with Mike on his
+ shoulders) walks out from the dark trees. He is extremely fierce and
+ gruesome countenance. He walks towards KING ARTHUR and PATSY, who are
+ wazzing like mad. (Salopian slang, meaning very scared. almost to the
+ point of wetting oneself, e.g. before an important football match or
+ prior to a postering. Salopian slang meaning a beating by the school
+ praeposters. Sorry about the Salopian slant to this stage direction - Ed.)
+ "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.0806 b/data/vim/patches/8.1.0806
new file mode 100644
index 000000000..c59e436d7
--- /dev/null
+++ b/data/vim/patches/8.1.0806
@@ -0,0 +1,7095 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0806
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0806
+Problem: Too many #ifdefs.
+Solution: Graduate FEAT_MBYTE, part 2.
+Files: src/ex_cmds2.c, src/ex_docmd.c, src/ex_getln.c, src/gui_w32.c,
+ src/gui_x11.c, src/hardcopy.c, src/if_xcmdsrv.c, src/json.c,
+ src/kword_test.c, src/main.c, src/mbyte.c, src/memline.c,
+ src/message.c, src/misc1.c, src/misc2.c, src/move.c, src/normal.c,
+ src/ops.c, src/option.c, src/charset.c
+
+
+*** ../vim-8.1.0805/src/ex_cmds2.c 2019-01-24 15:04:44.666887862 +0100
+--- src/ex_cmds2.c 2019-01-24 15:09:55.708856796 +0100
+***************
+*** 5421,5427 ****
+ #if (defined(FEAT_EVAL) && !((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+ && defined(LC_MESSAGES))) \
+ || ((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+- && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) \
+ && !defined(LC_MESSAGES))
+ /*
+ * Get the language used for messages from the environment.
+--- 5421,5426 ----
+***************
+*** 5485,5492 ****
+ }
+ #endif
+
+! #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+! && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
+ /*
+ * ":language": Set the language (locale).
+ */
+--- 5484,5490 ----
+ }
+ #endif
+
+! #if defined(HAVE_LOCALE_H) || defined(X_LOCALE) \
+ /*
+ * ":language": Set the language (locale).
+ */
+*** ../vim-8.1.0805/src/ex_docmd.c 2019-01-24 15:04:44.666887862 +0100
+--- src/ex_docmd.c 2019-01-24 15:10:21.144699639 +0100
+***************
+*** 4300,4307 ****
+ xp->xp_pattern = arg;
+ break;
+
+! #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+! && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
+ case CMD_language:
+ p = skiptowhite(arg);
+ if (*p == NUL)
+--- 4300,4306 ----
+ xp->xp_pattern = arg;
+ break;
+
+! #if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
+ case CMD_language:
+ p = skiptowhite(arg);
+ if (*p == NUL)
+***************
+*** 5963,5970 ****
+ #if defined(FEAT_CMDHIST)
+ {EXPAND_HISTORY, "history"},
+ #endif
+! #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+! && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
+ {EXPAND_LOCALES, "locale"},
+ #endif
+ {EXPAND_MAPCLEAR, "mapclear"},
+--- 5962,5968 ----
+ #if defined(FEAT_CMDHIST)
+ {EXPAND_HISTORY, "history"},
+ #endif
+! #if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
+ {EXPAND_LOCALES, "locale"},
+ #endif
+ {EXPAND_MAPCLEAR, "mapclear"},
+*** ../vim-8.1.0805/src/ex_getln.c 2019-01-24 15:04:44.670887836 +0100
+--- src/ex_getln.c 2019-01-24 15:10:41.796571593 +0100
+***************
+*** 5253,5260 ****
+ #ifdef FEAT_PROFILE
+ {EXPAND_PROFILE, get_profile_name, TRUE, TRUE},
+ #endif
+! #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+! && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
+ {EXPAND_LANGUAGE, get_lang_arg, TRUE, FALSE},
+ {EXPAND_LOCALES, get_locales, TRUE, FALSE},
+ #endif
+--- 5253,5259 ----
+ #ifdef FEAT_PROFILE
+ {EXPAND_PROFILE, get_profile_name, TRUE, TRUE},
+ #endif
+! #if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
+ {EXPAND_LANGUAGE, get_lang_arg, TRUE, FALSE},
+ {EXPAND_LOCALES, get_locales, TRUE, FALSE},
+ #endif
+*** ../vim-8.1.0805/src/gui_w32.c 2019-01-19 19:54:17.141981393 +0100
+--- src/gui_w32.c 2019-01-24 15:12:02.496067677 +0100
+***************
+*** 30,38 ****
+ #endif
+
+ #if defined(FEAT_DIRECTX)
+- # ifndef FEAT_MBYTE
+- # error FEAT_MBYTE is required for FEAT_DIRECTX.
+- # endif
+ static DWriteContext *s_dwc = NULL;
+ static int s_directx_enabled = 0;
+ static int s_directx_load_attempted = 0;
+--- 30,35 ----
+***************
+*** 318,326 ****
+ #ifdef MSWIN_FIND_REPLACE
+ static UINT s_findrep_msg = 0; /* set in gui_w[16/32].c */
+ static FINDREPLACE s_findrep_struct;
+- # ifdef FEAT_MBYTE
+ static FINDREPLACEW s_findrep_struct_w;
+- # endif
+ static HWND s_findrep_hwnd = NULL;
+ static int s_findrep_is_find; /* TRUE for find dialog, FALSE
+ for find/replace dialog */
+--- 315,321 ----
+***************
+*** 396,408 ****
+ }
+ #endif
+
+! #if defined(FEAT_MBYTE) || defined(GLOBAL_IME)
+! /* use of WindowProc depends on wide_WindowProc */
+! # define MyWindowProc vim_WindowProc
+! #else
+! /* use ordinary WindowProc */
+! # define MyWindowProc DefWindowProc
+! #endif
+
+ extern int current_font_height; /* this is in os_mswin.c */
+
+--- 391,398 ----
+ }
+ #endif
+
+! /* use of WindowProc depends on wide_WindowProc */
+! #define MyWindowProc vim_WindowProc
+
+ extern int current_font_height; /* this is in os_mswin.c */
+
+***************
+*** 724,730 ****
+ {
+ int len;
+ int i;
+- #ifdef FEAT_MBYTE
+ WCHAR wstring[2];
+ char_u *ws = NULL;
+
+--- 714,719 ----
+***************
+*** 785,791 ****
+ }
+
+ if (len == 0)
+- #endif
+ {
+ string[0] = ch;
+ len = 1;
+--- 774,779 ----
+***************
+*** 1118,1124 ****
+ #endif
+
+ #ifdef MSWIN_FIND_REPLACE
+- # ifdef FEAT_MBYTE
+ /*
+ * copy useful data from structure LPFINDREPLACE to structure LPFINDREPLACEW
+ */
+--- 1106,1111 ----
+***************
+*** 1155,1161 ****
+ vim_strncpy((char_u *)lpfr->lpstrReplaceWith, p, lpfr->wReplaceWithLen - 1);
+ vim_free(p);
+ }
+- # endif
+
+ /*
+ * Handle a Find/Replace window message.
+--- 1142,1147 ----
+***************
+*** 1166,1179 ****
+ int flags = 0;
+ int down;
+
+- # ifdef FEAT_MBYTE
+ /* If the OS is Windows NT, and 'encoding' differs from active codepage:
+ * convert text from wide string. */
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ findrep_wtoa(&s_findrep_struct, &s_findrep_struct_w);
+ }
+- # endif
+
+ if (s_findrep_struct.Flags & FR_DIALOGTERM)
+ /* Give main window the focus back. */
+--- 1152,1163 ----
+***************
+*** 1318,1342 ****
+ }
+ }
+
+! #if defined(FEAT_MBYTE) \
+! || defined(GLOBAL_IME) \
+! || defined(PROTO)
+! # ifdef PROTO
+ typedef int WINAPI;
+! # endif
+
+ LRESULT WINAPI
+ vim_WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+ {
+! # ifdef GLOBAL_IME
+ return global_ime_DefWindowProc(hwnd, message, wParam, lParam);
+! # else
+ if (wide_WindowProc)
+ return DefWindowProcW(hwnd, message, wParam, lParam);
+ return DefWindowProc(hwnd, message, wParam, lParam);
+ #endif
+ }
+- #endif
+
+ /*
+ * Called when the foreground or background color has been changed.
+--- 1302,1322 ----
+ }
+ }
+
+! #ifdef PROTO
+ typedef int WINAPI;
+! #endif
+
+ LRESULT WINAPI
+ vim_WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+ {
+! #ifdef GLOBAL_IME
+ return global_ime_DefWindowProc(hwnd, message, wParam, lParam);
+! #else
+ if (wide_WindowProc)
+ return DefWindowProcW(hwnd, message, wParam, lParam);
+ return DefWindowProc(hwnd, message, wParam, lParam);
+ #endif
+ }
+
+ /*
+ * Called when the foreground or background color has been changed.
+***************
+*** 1751,1760 ****
+ rc.left = FILL_X(gui.col);
+ rc.top = FILL_Y(gui.row);
+ rc.right = rc.left + gui.char_width;
+- #ifdef FEAT_MBYTE
+ if (mb_lefthalve(gui.row, gui.col))
+ rc.right += gui.char_width;
+- #endif
+ rc.bottom = rc.top + gui.char_height;
+ hbr = CreateSolidBrush(color);
+ FrameRect(s_hdc, &rc, hbr);
+--- 1731,1738 ----
+***************
+*** 2345,2351 ****
+ return size.cx;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Return the width in pixels of the given text in the given DC, taking care
+ * of 'encoding' to active codepage conversion.
+--- 2323,2328 ----
+***************
+*** 2374,2382 ****
+
+ return GetTextWidth(hdc, str, len);
+ }
+- #else
+- # define GetTextWidthEnc(h, s, l) GetTextWidth((h), (s), (l))
+- #endif
+
+ static void get_work_area(RECT *spi_rect);
+
+--- 2351,2356 ----
+***************
+*** 2451,2465 ****
+
+ if (showit)
+ {
+! # ifdef FEAT_MBYTE
+! # ifndef TB_SETUNICODEFORMAT
+ /* For older compilers. We assume this never changes. */
+! # define TB_SETUNICODEFORMAT 0x2005
+! # endif
+ /* Enable/disable unicode support */
+ int uu = (enc_codepage >= 0 && (int)GetACP() != enc_codepage);
+ SendMessage(s_toolbarhwnd, TB_SETUNICODEFORMAT, (WPARAM)uu, (LPARAM)0);
+- # endif
+ ShowWindow(s_toolbarhwnd, SW_SHOW);
+ }
+ else
+--- 2425,2437 ----
+
+ if (showit)
+ {
+! # ifndef TB_SETUNICODEFORMAT
+ /* For older compilers. We assume this never changes. */
+! # define TB_SETUNICODEFORMAT 0x2005
+! # endif
+ /* Enable/disable unicode support */
+ int uu = (enc_codepage >= 0 && (int)GetACP() != enc_codepage);
+ SendMessage(s_toolbarhwnd, TB_SETUNICODEFORMAT, (WPARAM)uu, (LPARAM)0);
+ ShowWindow(s_toolbarhwnd, SW_SHOW);
+ }
+ else
+***************
+*** 2475,2481 ****
+ static void
+ add_tabline_popup_menu_entry(HMENU pmenu, UINT item_id, char_u *item_text)
+ {
+- #ifdef FEAT_MBYTE
+ WCHAR *wn = NULL;
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+--- 2447,2452 ----
+***************
+*** 2499,2505 ****
+ }
+
+ if (wn == NULL)
+- #endif
+ {
+ MENUITEMINFO info;
+
+--- 2470,2475 ----
+***************
+*** 2606,2625 ****
+ int nr = 0;
+ int curtabidx = 0;
+ int tabadded = 0;
+- #ifdef FEAT_MBYTE
+ static int use_unicode = FALSE;
+ int uu;
+ WCHAR *wstr = NULL;
+- #endif
+
+ if (s_tabhwnd == NULL)
+ return;
+
+! #ifdef FEAT_MBYTE
+! # ifndef CCM_SETUNICODEFORMAT
+ /* For older compilers. We assume this never changes. */
+! # define CCM_SETUNICODEFORMAT 0x2005
+! # endif
+ uu = (enc_codepage >= 0 && (int)GetACP() != enc_codepage);
+ if (uu != use_unicode)
+ {
+--- 2576,2592 ----
+ int nr = 0;
+ int curtabidx = 0;
+ int tabadded = 0;
+ static int use_unicode = FALSE;
+ int uu;
+ WCHAR *wstr = NULL;
+
+ if (s_tabhwnd == NULL)
+ return;
+
+! #ifndef CCM_SETUNICODEFORMAT
+ /* For older compilers. We assume this never changes. */
+! # define CCM_SETUNICODEFORMAT 0x2005
+! #endif
+ uu = (enc_codepage >= 0 && (int)GetACP() != enc_codepage);
+ if (uu != use_unicode)
+ {
+***************
+*** 2627,2633 ****
+ SendMessage(s_tabhwnd, CCM_SETUNICODEFORMAT, (WPARAM)uu, (LPARAM)0);
+ use_unicode = uu;
+ }
+- #endif
+
+ tie.mask = TCIF_TEXT;
+ tie.iImage = -1;
+--- 2594,2599 ----
+***************
+*** 2651,2657 ****
+
+ get_tabline_label(tp, FALSE);
+ tie.pszText = (LPSTR)NameBuff;
+- #ifdef FEAT_MBYTE
+ wstr = NULL;
+ if (use_unicode)
+ {
+--- 2617,2622 ----
+***************
+*** 2669,2675 ****
+ }
+ }
+ if (wstr == NULL)
+- #endif
+ {
+ TabCtrl_SetItem(s_tabhwnd, nr, &tie);
+ }
+--- 2634,2639 ----
+***************
+*** 2770,2776 ****
+ static void
+ set_window_title(HWND hwnd, char *title)
+ {
+- #ifdef FEAT_MBYTE
+ if (title != NULL && enc_codepage >= 0 && enc_codepage != (int)GetACP())
+ {
+ WCHAR *wbuf;
+--- 2734,2739 ----
+***************
+*** 2784,2790 ****
+ }
+ return;
+ }
+- #endif
+ (void)SetWindowText(hwnd, (LPCSTR)title);
+ }
+
+--- 2747,2752 ----
+***************
+*** 2800,2806 ****
+ if (!IsWindow(s_findrep_hwnd))
+ {
+ initialise_findrep(eap->arg);
+- # ifdef FEAT_MBYTE
+ /* If the OS is Windows NT, and 'encoding' differs from active
+ * codepage: convert text and use wide function. */
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+--- 2762,2767 ----
+***************
+*** 2810,2816 ****
+ (LPFINDREPLACEW) &s_findrep_struct_w);
+ }
+ else
+- # endif
+ s_findrep_hwnd = FindText((LPFINDREPLACE) &s_findrep_struct);
+ }
+
+--- 2771,2776 ----
+***************
+*** 2835,2841 ****
+ if (!IsWindow(s_findrep_hwnd))
+ {
+ initialise_findrep(eap->arg);
+- # ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ findrep_atow(&s_findrep_struct_w, &s_findrep_struct);
+--- 2795,2800 ----
+***************
+*** 2843,2849 ****
+ (LPFINDREPLACEW) &s_findrep_struct_w);
+ }
+ else
+- # endif
+ s_findrep_hwnd = ReplaceText(
+ (LPFINDREPLACE) &s_findrep_struct);
+ }
+--- 2802,2807 ----
+***************
+*** 2931,2937 ****
+ out_flush(); /* make sure all output has been processed */
+ (void)BeginPaint(hwnd, &ps);
+
+- #ifdef FEAT_MBYTE
+ /* prevent multi-byte characters from misprinting on an invalid
+ * rectangle */
+ if (has_mbyte)
+--- 2889,2894 ----
+***************
+*** 2942,2948 ****
+ ps.rcPaint.left = rect.left;
+ ps.rcPaint.right = rect.right;
+ }
+- #endif
+
+ if (!IsRectEmpty(&ps.rcPaint))
+ {
+--- 2899,2904 ----
+***************
+*** 3255,3261 ****
+ char *font_name = lf.lfFaceName;
+
+ charset_name = charset_id2name((int)lf.lfCharSet);
+- #ifdef FEAT_MBYTE
+ /* Convert a font name from the current codepage to 'encoding'.
+ * TODO: Use Wide APIs (including LOGFONTW) instead of ANSI APIs. */
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+--- 3211,3216 ----
+***************
+*** 3264,3270 ****
+ acp_to_enc((char_u *)lf.lfFaceName, (int)strlen(lf.lfFaceName),
+ (char_u **)&font_name, &len);
+ }
+- #endif
+ quality_name = quality_id2name((int)lf.lfQuality);
+
+ res = (char *)alloc((unsigned)(strlen(font_name) + 20
+--- 3219,3224 ----
+***************
+*** 3301,3310 ****
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ if (font_name != lf.lfFaceName)
+ vim_free(font_name);
+- #endif
+ return (char_u *)res;
+ }
+
+--- 3255,3262 ----
+***************
+*** 3329,3335 ****
+ }
+ #endif
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Handler of gui.wide_font (p_guifontwide) changed notification.
+ */
+--- 3281,3286 ----
+***************
+*** 3338,3346 ****
+ {
+ LOGFONT lf;
+
+! # ifdef FEAT_MBYTE_IME
+ update_im_font();
+! # endif
+
+ gui_mch_free_font(gui.wide_ital_font);
+ gui.wide_ital_font = NOFONT;
+--- 3289,3297 ----
+ {
+ LOGFONT lf;
+
+! #ifdef FEAT_MBYTE_IME
+ update_im_font();
+! #endif
+
+ gui_mch_free_font(gui.wide_ital_font);
+ gui.wide_ital_font = NOFONT;
+***************
+*** 3370,3376 ****
+ }
+ }
+ }
+- #endif
+
+ /*
+ * Initialise vim to use the font with the given name.
+--- 3321,3326 ----
+***************
+*** 3574,3586 ****
+
+ #if defined(FEAT_BROWSE) || defined(PROTO)
+ /*
+- * The file browser exists in two versions: with "W" uses wide characters,
+- * without "W" the current codepage. When FEAT_MBYTE is defined and on
+- * Windows NT/2000/XP the "W" functions are used.
+- */
+-
+- # ifdef FEAT_MBYTE
+- /*
+ * Wide version of convert_filter().
+ */
+ static WCHAR *
+--- 3524,3529 ----
+***************
+*** 3600,3609 ****
+ }
+
+ /*
+! * Wide version of gui_mch_browse(). Keep in sync!
+ */
+ static char_u *
+! gui_mch_browseW(
+ int saving,
+ char_u *title,
+ char_u *dflt,
+--- 3543,3559 ----
+ }
+
+ /*
+! * Pop open a file browser and return the file selected, in allocated memory,
+! * or NULL if Cancel is hit.
+! * saving - TRUE if the file will be saved to, FALSE if it will be opened.
+! * title - Title message for the file browser dialog.
+! * dflt - Default name of file.
+! * ext - Default extension to be added to files without extensions.
+! * initdir - directory in which to open the browser (NULL = current dir)
+! * filter - Filter for matched files to choose from.
+ */
+ static char_u *
+! gui_mch_browse(
+ int saving,
+ char_u *title,
+ char_u *dflt,
+***************
+*** 3718,3724 ****
+ vim_free(p);
+ return q;
+ }
+- # endif /* FEAT_MBYTE */
+
+
+ /*
+--- 3668,3673 ----
+***************
+*** 3762,3867 ****
+ return gui_mch_browse(0, title, (char_u *)_("Not Used"), NULL,
+ initdir, (char_u *)_("Directory\t*.nothing\n"));
+ }
+-
+- /*
+- * Pop open a file browser and return the file selected, in allocated memory,
+- * or NULL if Cancel is hit.
+- * saving - TRUE if the file will be saved to, FALSE if it will be opened.
+- * title - Title message for the file browser dialog.
+- * dflt - Default name of file.
+- * ext - Default extension to be added to files without extensions.
+- * initdir - directory in which to open the browser (NULL = current dir)
+- * filter - Filter for matched files to choose from.
+- *
+- * Keep in sync with gui_mch_browseW() above!
+- */
+- char_u *
+- gui_mch_browse(
+- int saving,
+- char_u *title,
+- char_u *dflt,
+- char_u *ext,
+- char_u *initdir,
+- char_u *filter)
+- {
+- # ifdef FEAT_MBYTE
+- return gui_mch_browseW(saving, title, dflt, ext, initdir, filter);
+- # else
+- OPENFILENAME fileStruct;
+- char_u fileBuf[MAXPATHL];
+- char_u *initdirp = NULL;
+- char_u *filterp;
+- char_u *p;
+-
+- if (dflt == NULL)
+- fileBuf[0] = NUL;
+- else
+- vim_strncpy(fileBuf, dflt, MAXPATHL - 1);
+-
+- /* Convert the filter to Windows format. */
+- filterp = convert_filter(filter);
+-
+- vim_memset(&fileStruct, 0, sizeof(OPENFILENAME));
+- # ifdef OPENFILENAME_SIZE_VERSION_400
+- /* be compatible with Windows NT 4.0 */
+- fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400;
+- # else
+- fileStruct.lStructSize = sizeof(fileStruct);
+- # endif
+-
+- fileStruct.lpstrTitle = (LPSTR)title;
+- fileStruct.lpstrDefExt = (LPSTR)ext;
+-
+- fileStruct.lpstrFile = (LPSTR)fileBuf;
+- fileStruct.nMaxFile = MAXPATHL;
+- fileStruct.lpstrFilter = (LPSTR)filterp;
+- fileStruct.hwndOwner = s_hwnd; /* main Vim window is owner*/
+- /* has an initial dir been specified? */
+- if (initdir != NULL && *initdir != NUL)
+- {
+- /* Must have backslashes here, no matter what 'shellslash' says */
+- initdirp = vim_strsave(initdir);
+- if (initdirp != NULL)
+- for (p = initdirp; *p != NUL; ++p)
+- if (*p == '/')
+- *p = '\\';
+- fileStruct.lpstrInitialDir = (LPSTR)initdirp;
+- }
+-
+- /*
+- * TODO: Allow selection of multiple files. Needs another arg to this
+- * function to ask for it, and need to use OFN_ALLOWMULTISELECT below.
+- * Also, should we use OFN_FILEMUSTEXIST when opening? Vim can edit on
+- * files that don't exist yet, so I haven't put it in. What about
+- * OFN_PATHMUSTEXIST?
+- * Don't use OFN_OVERWRITEPROMPT, Vim has its own ":confirm" dialog.
+- */
+- fileStruct.Flags = (OFN_NOCHANGEDIR | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY);
+- # ifdef FEAT_SHORTCUT
+- if (curbuf->b_p_bin)
+- fileStruct.Flags |= OFN_NODEREFERENCELINKS;
+- # endif
+- if (saving)
+- {
+- if (!GetSaveFileName(&fileStruct))
+- return NULL;
+- }
+- else
+- {
+- if (!GetOpenFileName(&fileStruct))
+- return NULL;
+- }
+-
+- vim_free(filterp);
+- vim_free(initdirp);
+-
+- /* 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
+- }
+ #endif /* FEAT_BROWSE */
+
+ static void
+--- 3711,3716 ----
+***************
+*** 3871,3879 ****
+ {
+ #define BUFPATHLEN _MAX_PATH
+ #define DRAGQVAL 0xFFFFFFFF
+- #ifdef FEAT_MBYTE
+ WCHAR wszFile[BUFPATHLEN];
+- #endif
+ char szFile[BUFPATHLEN];
+ UINT cFiles = DragQueryFile(hDrop, DRAGQVAL, NULL, 0);
+ UINT i;
+--- 3720,3726 ----
+***************
+*** 3894,3904 ****
+ if (fnames != NULL)
+ for (i = 0; i < cFiles; ++i)
+ {
+- #ifdef FEAT_MBYTE
+ if (DragQueryFileW(hDrop, i, wszFile, BUFPATHLEN) > 0)
+ fnames[i] = utf16_to_enc(wszFile, NULL);
+ else
+- #endif
+ {
+ DragQueryFile(hDrop, i, szFile, BUFPATHLEN);
+ fnames[i] = vim_strsave((char_u *)szFile);
+--- 3741,3749 ----
+***************
+*** 4060,4072 ****
+
+ *tofree = NULL;
+
+- #ifdef FEAT_MBYTE
+ /* Try using the Unicode version first, it takes care of conversion when
+ * 'encoding' is changed. */
+ argc = get_cmd_argsW(&argv);
+ if (argc != 0)
+ goto done;
+- #endif
+
+ /* Handle the program name. Remove the ".exe" extension, and find the 1st
+ * non-space. */
+--- 3905,3915 ----
+***************
+*** 4145,4151 ****
+ {
+ if (pnew != NULL)
+ *pnew++ = *p;
+- #ifdef FEAT_MBYTE
+ /* Can't use mb_* functions, because 'encoding' is not
+ * initialized yet here. */
+ if (IsDBCSLeadByte(*p))
+--- 3988,3993 ----
+***************
+*** 4154,4160 ****
+ if (pnew != NULL)
+ *pnew++ = *p;
+ }
+- #endif
+ ++p;
+ }
+ }
+--- 3996,4001 ----
+***************
+*** 4178,4186 ****
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ done:
+- #endif
+ argv[argc] = NULL; /* NULL-terminated list */
+ *argvp = argv;
+ return argc;
+--- 4019,4025 ----
+***************
+*** 4381,4387 ****
+ LPARAM lParam;
+ } NMTTDISPINFO_NEW;
+
+- #ifdef FEAT_MBYTE
+ typedef struct tagTOOLINFOW_NEW
+ {
+ UINT cbSize;
+--- 4220,4225 ----
+***************
+*** 4405,4411 ****
+ LPARAM lParam;
+ } NMTTDISPINFOW_NEW;
+
+- #endif
+
+ typedef HRESULT (WINAPI* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
+ #ifndef TTM_SETMAXTIPWIDTH
+--- 4243,4248 ----
+***************
+*** 4438,4444 ****
+ } NMTTDISPINFOA, *LPNMTTDISPINFOA;
+ # define LPNMTTDISPINFO LPNMTTDISPINFOA
+
+- # ifdef FEAT_MBYTE
+ typedef struct tagNMTTDISPINFOW {
+ NMHDR hdr;
+ LPWSTR lpszText;
+--- 4275,4280 ----
+***************
+*** 4447,4453 ****
+ UINT uFlags;
+ LPARAM lParam;
+ } NMTTDISPINFOW, *LPNMTTDISPINFOW;
+- # endif
+ # endif
+ #endif
+
+--- 4283,4288 ----
+***************
+*** 4970,4978 ****
+ case WM_NOTIFY:
+ switch (((LPNMHDR) lParam)->code)
+ {
+- # ifdef FEAT_MBYTE
+ case TTN_GETDISPINFOW:
+- # endif
+ case TTN_GETDISPINFO:
+ {
+ LPNMHDR hdr = (LPNMHDR)lParam;
+--- 4805,4811 ----
+***************
+*** 5034,5040 ****
+ # endif
+ if (str != NULL)
+ {
+- # ifdef FEAT_MBYTE
+ if (hdr->code == TTN_GETDISPINFOW)
+ {
+ LPNMTTDISPINFOW lpdi = (LPNMTTDISPINFOW)lParam;
+--- 4867,4872 ----
+***************
+*** 5049,5055 ****
+ /* can't show tooltip if failed */
+ }
+ else
+- # endif
+ {
+ LPNMTTDISPINFO lpdi = (LPNMTTDISPINFO)lParam;
+
+--- 4881,4886 ----
+***************
+*** 5353,5363 ****
+ const char szVimWndClass[] = VIM_CLASS;
+ const char szTextAreaClass[] = "VimTextArea";
+ WNDCLASS wndclass;
+- #ifdef FEAT_MBYTE
+ const WCHAR szVimWndClassW[] = VIM_CLASSW;
+ const WCHAR szTextAreaClassW[] = L"VimTextArea";
+ WNDCLASSW wndclassw;
+- #endif
+ #ifdef GLOBAL_IME
+ ATOM atom;
+ #endif
+--- 5184,5192 ----
+***************
+*** 5383,5389 ****
+
+ s_brush = CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
+
+- #ifdef FEAT_MBYTE
+ /* First try using the wide version, so that we can use any title.
+ * Otherwise only characters in the active codepage will work. */
+ if (GetClassInfoW(s_hinst, szVimWndClassW, &wndclassw) == 0)
+--- 5212,5217 ----
+***************
+*** 5410,5437 ****
+ }
+
+ if (!wide_WindowProc)
+! #endif
+!
+! if (GetClassInfo(s_hinst, szVimWndClass, &wndclass) == 0)
+! {
+! wndclass.style = CS_DBLCLKS;
+! wndclass.lpfnWndProc = _WndProc;
+! wndclass.cbClsExtra = 0;
+! wndclass.cbWndExtra = 0;
+! wndclass.hInstance = s_hinst;
+! wndclass.hIcon = LoadIcon(wndclass.hInstance, "IDR_VIM");
+! wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
+! wndclass.hbrBackground = s_brush;
+! wndclass.lpszMenuName = NULL;
+! wndclass.lpszClassName = szVimWndClass;
+
+! if ((
+ #ifdef GLOBAL_IME
+! atom =
+ #endif
+! RegisterClass(&wndclass)) == 0)
+! return FAIL;
+! }
+
+ if (vim_parent_hwnd != NULL)
+ {
+--- 5238,5263 ----
+ }
+
+ if (!wide_WindowProc)
+! if (GetClassInfo(s_hinst, szVimWndClass, &wndclass) == 0)
+! {
+! wndclass.style = CS_DBLCLKS;
+! wndclass.lpfnWndProc = _WndProc;
+! wndclass.cbClsExtra = 0;
+! wndclass.cbWndExtra = 0;
+! wndclass.hInstance = s_hinst;
+! wndclass.hIcon = LoadIcon(wndclass.hInstance, "IDR_VIM");
+! wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
+! wndclass.hbrBackground = s_brush;
+! wndclass.lpszMenuName = NULL;
+! wndclass.lpszClassName = szVimWndClass;
+
+! if ((
+ #ifdef GLOBAL_IME
+! atom =
+ #endif
+! RegisterClass(&wndclass)) == 0)
+! return FAIL;
+! }
+
+ if (vim_parent_hwnd != NULL)
+ {
+***************
+*** 5503,5509 ****
+ #endif
+
+ /* Create the text area window */
+- #ifdef FEAT_MBYTE
+ if (wide_WindowProc)
+ {
+ if (GetClassInfoW(s_hinst, szTextAreaClassW, &wndclassw) == 0)
+--- 5329,5334 ----
+***************
+*** 5532,5540 ****
+ s_hwnd, NULL,
+ s_hinst, NULL);
+ }
+! else
+! #endif
+! if (GetClassInfo(s_hinst, szTextAreaClass, &wndclass) == 0)
+ {
+ wndclass.style = CS_OWNDC;
+ wndclass.lpfnWndProc = _TextAreaWndProc;
+--- 5357,5363 ----
+ s_hwnd, NULL,
+ s_hinst, NULL);
+ }
+! else if (GetClassInfo(s_hinst, szTextAreaClass, &wndclass) == 0)
+ {
+ wndclass.style = CS_OWNDC;
+ wndclass.lpfnWndProc = _TextAreaWndProc;
+***************
+*** 5642,5648 ****
+ s_findrep_struct.lpstrReplaceWith[0] = NUL;
+ s_findrep_struct.wFindWhatLen = MSWIN_FR_BUFSIZE;
+ s_findrep_struct.wReplaceWithLen = MSWIN_FR_BUFSIZE;
+- # ifdef FEAT_MBYTE
+ s_findrep_struct_w.lStructSize = sizeof(s_findrep_struct_w);
+ s_findrep_struct_w.lpstrFindWhat =
+ (LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR));
+--- 5465,5470 ----
+***************
+*** 5652,5658 ****
+ s_findrep_struct_w.lpstrReplaceWith[0] = NUL;
+ s_findrep_struct_w.wFindWhatLen = MSWIN_FR_BUFSIZE;
+ s_findrep_struct_w.wReplaceWithLen = MSWIN_FR_BUFSIZE;
+- # endif
+ #endif
+
+ #ifdef FEAT_EVAL
+--- 5474,5479 ----
+***************
+*** 6149,6155 ****
+
+ #endif /* FEAT_MBYTE_IME */
+
+! #if defined(FEAT_MBYTE) && !defined(FEAT_MBYTE_IME) && defined(GLOBAL_IME)
+ /* Win32 with GLOBAL IME */
+
+ /*
+--- 5970,5976 ----
+
+ #endif /* FEAT_MBYTE_IME */
+
+! #if !defined(FEAT_MBYTE_IME) && defined(GLOBAL_IME)
+ /* Win32 with GLOBAL IME */
+
+ /*
+***************
+*** 6186,6192 ****
+ }
+ #endif
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Convert latin9 text "text[len]" to ucs-2 in "unicodebuf".
+ */
+--- 6007,6012 ----
+***************
+*** 6212,6218 ****
+ *unicodebuf++ = c;
+ }
+ }
+- #endif
+
+ #ifdef FEAT_RIGHTLEFT
+ /*
+--- 6032,6037 ----
+***************
+*** 6319,6330 ****
+ int i;
+ const RECT *pcliprect = NULL;
+ UINT foptions = 0;
+- #ifdef FEAT_MBYTE
+ static WCHAR *unicodebuf = NULL;
+ static int *unicodepdy = NULL;
+ static int unibuflen = 0;
+ int n = 0;
+- #endif
+ int y;
+
+ /*
+--- 6138,6147 ----
+***************
+*** 6354,6367 ****
+ */
+ rc.left = FILL_X(col);
+ rc.top = FILL_Y(row);
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* Compute the length in display cells. */
+ rc.right = FILL_X(col + mb_string2cells(text, len));
+ }
+ else
+- #endif
+ rc.right = FILL_X(col + len);
+ rc.bottom = FILL_Y(row + 1);
+
+--- 6171,6182 ----
+***************
+*** 6429,6435 ****
+ * No check for DRAW_BOLD, Windows will have done it already.
+ */
+
+- #ifdef FEAT_MBYTE
+ /* Check if there are any UTF-8 characters. If not, use normal text
+ * output to speed up output. */
+ if (enc_utf8)
+--- 6244,6249 ----
+***************
+*** 6437,6449 ****
+ if (text[n] >= 0x80)
+ break;
+
+! # if defined(FEAT_DIRECTX)
+ /* Quick hack to enable DirectWrite. To use DirectWrite (antialias), it is
+ * required that unicode drawing routine, currently. So this forces it
+ * enabled. */
+ if (IS_ENABLE_DIRECTX())
+ n = 0; /* Keep n < len, to enter block for unicode. */
+! # endif
+
+ /* Check if the Unicode buffer exists and is big enough. Create it
+ * with the same length as the multi-byte string, the number of wide
+--- 6251,6263 ----
+ if (text[n] >= 0x80)
+ break;
+
+! #if defined(FEAT_DIRECTX)
+ /* Quick hack to enable DirectWrite. To use DirectWrite (antialias), it is
+ * required that unicode drawing routine, currently. So this forces it
+ * enabled. */
+ if (IS_ENABLE_DIRECTX())
+ n = 0; /* Keep n < len, to enter block for unicode. */
+! #endif
+
+ /* Check if the Unicode buffer exists and is big enough. Create it
+ * with the same length as the multi-byte string, the number of wide
+***************
+*** 6516,6522 ****
+ i += utf_ptr2len_len(text + i, len - i);
+ ++clen;
+ }
+! # if defined(FEAT_DIRECTX)
+ if (IS_ENABLE_DIRECTX())
+ {
+ /* Add one to "cells" for italics. */
+--- 6330,6336 ----
+ i += utf_ptr2len_len(text + i, len - i);
+ ++clen;
+ }
+! #if defined(FEAT_DIRECTX)
+ if (IS_ENABLE_DIRECTX())
+ {
+ /* Add one to "cells" for italics. */
+***************
+*** 6526,6532 ****
+ foptions, pcliprect, unicodepdy);
+ }
+ else
+! # endif
+ ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
+ foptions, pcliprect, unicodebuf, wlen, unicodepdy);
+ len = cells; /* used for underlining */
+--- 6340,6346 ----
+ foptions, pcliprect, unicodepdy);
+ }
+ else
+! #endif
+ ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
+ foptions, pcliprect, unicodebuf, wlen, unicodepdy);
+ len = cells; /* used for underlining */
+***************
+*** 6568,6574 ****
+ }
+ }
+ else
+- #endif
+ {
+ #ifdef FEAT_RIGHTLEFT
+ /* Windows will mess up RL text, so we have to draw it character by
+--- 6382,6387 ----
+***************
+*** 6690,6696 ****
+
+ if (menu_is_menubar(menu->name))
+ {
+- #ifdef FEAT_MBYTE
+ WCHAR *wn = NULL;
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+--- 6503,6508 ----
+***************
+*** 6719,6725 ****
+ }
+
+ if (wn == NULL)
+- #endif
+ {
+ MENUITEMINFO info;
+
+--- 6531,6536 ----
+***************
+*** 6847,6853 ****
+ else
+ #endif
+ {
+- #ifdef FEAT_MBYTE
+ WCHAR *wn = NULL;
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+--- 6658,6663 ----
+***************
+*** 6865,6871 ****
+ }
+ }
+ if (wn == NULL)
+- #endif
+ InsertMenu(parent->submenu_id, (UINT)idx,
+ (menu_is_separator(menu->name) ? MF_SEPARATOR : MF_STRING)
+ | MF_BYPOSITION,
+--- 6675,6680 ----
+***************
+*** 7059,7065 ****
+ /* If the edit box exists, copy the string. */
+ if (s_textfield != NULL)
+ {
+- # ifdef FEAT_MBYTE
+ /* If the OS is Windows NT, and 'encoding' differs from active
+ * codepage: use wide function and convert text. */
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+--- 6868,6873 ----
+***************
+*** 7074,7080 ****
+ vim_free(wp);
+ }
+ else
+- # endif
+ GetDlgItemText(hwnd, DLG_NONBUTTON_CONTROL + 2,
+ (LPSTR)s_textfield, IOSIZE);
+ }
+--- 6882,6887 ----
+***************
+*** 7306,7316 ****
+ last_white = NULL;
+ for (pend = pstart; *pend != NUL && *pend != '\n'; )
+ {
+- #ifdef FEAT_MBYTE
+ l = (*mb_ptr2len)(pend);
+- #else
+- l = 1;
+- #endif
+ if (l == 1 && VIM_ISWHITE(*pend)
+ && textWidth > maxDialogWidth * 3 / 4)
+ last_white = pend;
+--- 7113,7119 ----
+***************
+*** 7693,7699 ****
+ BOOL use_enc)
+ {
+ int nChar = 0;
+- #ifdef FEAT_MBYTE
+ int len = lstrlen(lpAnsiIn) + 1; /* include NUL character */
+ int i;
+ WCHAR *wn;
+--- 7496,7501 ----
+***************
+*** 7719,7734 ****
+ for (i = 0; i < nChar; ++i)
+ if (lpWCStr[i] == (WORD)'\t') /* replace tabs with spaces */
+ lpWCStr[i] = (WORD)' ';
+- #else
+- do
+- {
+- if (*lpAnsiIn == '\t')
+- *lpWCStr++ = (WORD)' ';
+- else
+- *lpWCStr++ = (WORD)*lpAnsiIn;
+- nChar++;
+- } while (*lpAnsiIn++);
+- #endif
+
+ return nChar;
+ }
+--- 7521,7526 ----
+***************
+*** 8775,8781 ****
+ return multiline_tip;
+ }
+
+- #ifdef FEAT_MBYTE
+ static void
+ make_tooltipw(BalloonEval *beval, char *text, POINT pt)
+ {
+--- 8567,8572 ----
+***************
+*** 8845,8851 ****
+ mouse_event(MOUSEEVENTF_MOVE, (DWORD)-1, (DWORD)-1, 0, 0);
+ vim_free(pti);
+ }
+- #endif
+
+ static void
+ make_tooltip(BalloonEval *beval, char *text, POINT pt)
+--- 8636,8641 ----
+***************
+*** 8853,8865 ****
+ TOOLINFO *pti;
+ int ToolInfoSize;
+
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ make_tooltipw(beval, text, pt);
+ return;
+ }
+- #endif
+
+ if (multiline_balloon_available() == TRUE)
+ ToolInfoSize = sizeof(TOOLINFO_NEW);
+--- 8643,8653 ----
+***************
+*** 9072,9078 ****
+ info->uFlags |= TTF_DI_SETITEM;
+ }
+ break;
+- #ifdef FEAT_MBYTE
+ case TTN_GETDISPINFOW:
+ {
+ // if we get here then we have new common controls
+--- 8860,8865 ----
+***************
+*** 9081,9087 ****
+ info->uFlags |= TTF_DI_SETITEM;
+ }
+ break;
+- #endif
+ }
+ }
+ }
+--- 8868,8873 ----
+*** ../vim-8.1.0805/src/gui_x11.c 2019-01-17 17:13:25.920984090 +0100
+--- src/gui_x11.c 2019-01-24 15:13:43.959427047 +0100
+***************
+*** 748,754 ****
+ gui_focus_change(FALSE);
+ }
+
+! #if defined(X_HAVE_UTF8_STRING) && defined(FEAT_MBYTE)
+ # if X_HAVE_UTF8_STRING
+ # define USE_UTF8LOOKUP
+ # endif
+--- 748,754 ----
+ gui_focus_change(FALSE);
+ }
+
+! #if defined(X_HAVE_UTF8_STRING)
+ # if X_HAVE_UTF8_STRING
+ # define USE_UTF8LOOKUP
+ # endif
+***************
+*** 810,822 ****
+ if (status == XLookupNone || status == XLookupChars)
+ key_sym = XK_VoidSymbol;
+
+- # ifdef FEAT_MBYTE
+ /* Do conversion from 'termencoding' to 'encoding'. When using
+ * Xutf8LookupString() it has already been done. */
+ if (len > 0 && input_conv.vc_type != CONV_NONE
+! # ifdef USE_UTF8LOOKUP
+ && !enc_utf8
+! # endif
+ )
+ {
+ int maxlen = len * 4 + 40; /* guessed */
+--- 810,821 ----
+ if (status == XLookupNone || status == XLookupChars)
+ key_sym = XK_VoidSymbol;
+
+ /* Do conversion from 'termencoding' to 'encoding'. When using
+ * Xutf8LookupString() it has already been done. */
+ if (len > 0 && input_conv.vc_type != CONV_NONE
+! # ifdef USE_UTF8LOOKUP
+ && !enc_utf8
+! # endif
+ )
+ {
+ int maxlen = len * 4 + 40; /* guessed */
+***************
+*** 829,835 ****
+ string_alloced = True;
+ len = convert_input(p, len, maxlen);
+ }
+- # endif
+
+ /* Translate CSI to K_CSI, otherwise it could be recognized as the
+ * start of a special key. */
+--- 828,833 ----
+***************
+*** 901,910 ****
+ && (ev_press->state & Mod1Mask)
+ && !(key_sym == XK_BackSpace || key_sym == XK_Delete)
+ && (string[0] & 0x80) == 0
+! #ifdef FEAT_MBYTE
+! && !enc_dbcs
+! #endif
+! )
+ {
+ #if defined(FEAT_MENU) && defined(FEAT_GUI_MOTIF)
+ /* Ignore ALT keys when they are used for the menu only */
+--- 899,905 ----
+ && (ev_press->state & Mod1Mask)
+ && !(key_sym == XK_BackSpace || key_sym == XK_Delete)
+ && (string[0] & 0x80) == 0
+! && !enc_dbcs)
+ {
+ #if defined(FEAT_MENU) && defined(FEAT_GUI_MOTIF)
+ /* Ignore ALT keys when they are used for the menu only */
+***************
+*** 930,936 ****
+ && !(key_sym == XK_Tab && (ev_press->state & ShiftMask)))
+ {
+ string[0] |= 0x80;
+- #ifdef FEAT_MBYTE
+ if (enc_utf8) /* convert to utf-8 */
+ {
+ string[1] = string[0] & 0xbf;
+--- 925,930 ----
+***************
+*** 944,950 ****
+ else
+ len = 2;
+ }
+- #endif
+ }
+ else
+ ev_press->state |= Mod1Mask;
+--- 938,943 ----
+***************
+*** 983,992 ****
+ if (len == -3 || key_sym == XK_space || key_sym == XK_Tab
+ || key_sym == XK_Return || key_sym == XK_Linefeed
+ || key_sym == XK_Escape
+! #ifdef FEAT_MBYTE
+! || (enc_dbcs && len == 1 && (ev_press->state & Mod1Mask))
+! #endif
+! )
+ {
+ modifiers = 0;
+ if (ev_press->state & ShiftMask)
+--- 976,982 ----
+ if (len == -3 || key_sym == XK_space || key_sym == XK_Tab
+ || key_sym == XK_Return || key_sym == XK_Linefeed
+ || key_sym == XK_Escape
+! || (enc_dbcs && len == 1 && (ev_press->state & Mod1Mask)))
+ {
+ modifiers = 0;
+ if (ev_press->state & ShiftMask)
+***************
+*** 2375,2381 ****
+ int flags)
+ {
+ int cells = len;
+- #ifdef FEAT_MBYTE
+ static void *buf = NULL;
+ static int buflen = 0;
+ char_u *p;
+--- 2365,2370 ----
+***************
+*** 2399,2415 ****
+ while (p < s + len)
+ {
+ c = utf_ptr2char(p);
+! # ifdef FEAT_XFONTSET
+ if (current_fontset != NULL)
+ {
+! # ifdef SMALL_WCHAR_T
+ if (c >= 0x10000)
+ c = 0xbf; /* show chars > 0xffff as ? */
+! # endif
+ ((wchar_t *)buf)[wlen] = c;
+ }
+ else
+! # endif
+ {
+ if (c >= 0x10000)
+ c = 0xbf; /* show chars > 0xffff as ? */
+--- 2388,2404 ----
+ while (p < s + len)
+ {
+ c = utf_ptr2char(p);
+! #ifdef FEAT_XFONTSET
+ if (current_fontset != NULL)
+ {
+! # ifdef SMALL_WCHAR_T
+ if (c >= 0x10000)
+ c = 0xbf; /* show chars > 0xffff as ? */
+! # endif
+ ((wchar_t *)buf)[wlen] = c;
+ }
+ else
+! #endif
+ {
+ if (c >= 0x10000)
+ c = 0xbf; /* show chars > 0xffff as ? */
+***************
+*** 2431,2438 ****
+ }
+ }
+
+- #endif
+-
+ #ifdef FEAT_XFONTSET
+ if (current_fontset != NULL)
+ {
+--- 2420,2425 ----
+***************
+*** 2452,2463 ****
+
+ if (flags & DRAW_TRANSP)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ XDrawString16(gui.dpy, gui.wid, gui.text_gc, TEXT_X(col),
+ TEXT_Y(row), buf, wlen);
+ else
+- #endif
+ XDrawString(gui.dpy, gui.wid, gui.text_gc, TEXT_X(col),
+ TEXT_Y(row), (char *)s, len);
+ }
+--- 2439,2448 ----
+***************
+*** 2472,2495 ****
+ FILL_Y(row), gui.char_width * cells, gui.char_height);
+ XSetForeground(gui.dpy, gui.text_gc, prev_fg_color);
+
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ XDrawString16(gui.dpy, gui.wid, gui.text_gc, TEXT_X(col),
+ TEXT_Y(row), buf, wlen);
+ else
+- #endif
+ XDrawString(gui.dpy, gui.wid, gui.text_gc, TEXT_X(col),
+ TEXT_Y(row), (char *)s, len);
+ }
+ else
+ {
+ /* XmbDrawImageString has bug, don't use it for fontset. */
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ XDrawImageString16(gui.dpy, gui.wid, gui.text_gc, TEXT_X(col),
+ TEXT_Y(row), buf, wlen);
+ else
+- #endif
+ XDrawImageString(gui.dpy, gui.wid, gui.text_gc, TEXT_X(col),
+ TEXT_Y(row), (char *)s, len);
+ }
+--- 2457,2476 ----
+***************
+*** 2497,2508 ****
+ /* Bold trick: draw the text again with a one-pixel offset. */
+ if (flags & DRAW_BOLD)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ XDrawString16(gui.dpy, gui.wid, gui.text_gc, TEXT_X(col) + 1,
+ TEXT_Y(row), buf, wlen);
+ else
+- #endif
+ XDrawString(gui.dpy, gui.wid, gui.text_gc, TEXT_X(col) + 1,
+ TEXT_Y(row), (char *)s, len);
+ }
+--- 2478,2487 ----
+***************
+*** 2628,2637 ****
+ {
+ int w = 1;
+
+- #ifdef FEAT_MBYTE
+ if (mb_lefthalve(gui.row, gui.col))
+ w = 2;
+- #endif
+ gui_mch_set_fg_color(color);
+ XDrawRectangle(gui.dpy, gui.wid, gui.text_gc, FILL_X(gui.col),
+ FILL_Y(gui.row), w * gui.char_width - 1, gui.char_height - 1);
+--- 2607,2614 ----
+*** ../vim-8.1.0805/src/hardcopy.c 2019-01-19 17:43:03.417449145 +0100
+--- src/hardcopy.c 2019-01-24 15:16:45.286266663 +0100
+***************
+*** 102,108 ****
+ static long_u curr_fg;
+ static int page_count;
+
+! #if defined(FEAT_MBYTE) && defined(FEAT_POSTSCRIPT)
+ # define OPT_MBFONT_USECOURIER 0
+ # define OPT_MBFONT_ASCII 1
+ # define OPT_MBFONT_REGULAR 2
+--- 102,108 ----
+ static long_u curr_fg;
+ static int page_count;
+
+! #if defined(FEAT_POSTSCRIPT)
+ # define OPT_MBFONT_USECOURIER 0
+ # define OPT_MBFONT_ASCII 1
+ # define OPT_MBFONT_REGULAR 2
+***************
+*** 149,155 ****
+ return parse_list_options(p_popt, printer_opts, OPT_PRINT_NUM_OPTIONS);
+ }
+
+! #if (defined(FEAT_MBYTE) && defined(FEAT_POSTSCRIPT)) || defined(PROTO)
+ /*
+ * Parse 'printmbfont' and set the flags in "mbfont_opts".
+ * Returns an error message or NULL;
+--- 149,155 ----
+ return parse_list_options(p_popt, printer_opts, OPT_PRINT_NUM_OPTIONS);
+ }
+
+! #if defined(FEAT_POSTSCRIPT) || defined(PROTO)
+ /*
+ * Parse 'printmbfont' and set the flags in "mbfont_opts".
+ * Returns an error message or NULL;
+***************
+*** 456,464 ****
+ int page_line;
+ char_u *tbuf;
+ char_u *p;
+- #ifdef FEAT_MBYTE
+ int l;
+- #endif
+
+ /* Also use the space for the line number. */
+ if (prt_use_number())
+--- 456,462 ----
+***************
+*** 513,536 ****
+ mch_print_start_line(TRUE, page_line);
+ for (p = tbuf; *p != NUL; )
+ {
+! if (mch_print_text_out(p,
+! #ifdef FEAT_MBYTE
+! (l = (*mb_ptr2len)(p))
+! #else
+! 1
+! #endif
+! ))
+ {
+ ++page_line;
+ if (page_line >= 0) /* out of room in header */
+ break;
+ mch_print_start_line(TRUE, page_line);
+ }
+- #ifdef FEAT_MBYTE
+ p += l;
+- #else
+- p++;
+- #endif
+ }
+
+ vim_free(tbuf);
+--- 511,524 ----
+ mch_print_start_line(TRUE, page_line);
+ for (p = tbuf; *p != NUL; )
+ {
+! if (mch_print_text_out(p, (l = (*mb_ptr2len)(p))))
+ {
+ ++page_line;
+ if (page_line >= 0) /* out of room in header */
+ break;
+ mch_print_start_line(TRUE, page_line);
+ }
+ p += l;
+ }
+
+ vim_free(tbuf);
+***************
+*** 867,876 ****
+ for (col = ppos->column; line[col] != NUL && !need_break; col += outputlen)
+ {
+ outputlen = 1;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (outputlen = (*mb_ptr2len)(line + col)) < 1)
+ outputlen = 1;
+- #endif
+ #ifdef FEAT_SYN_HL
+ /*
+ * syntax highlighting stuff.
+--- 855,862 ----
+***************
+*** 932,942 ****
+ else
+ {
+ need_break = mch_print_text_out(line + col, outputlen);
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ print_pos += (*mb_ptr2cells)(line + col);
+ else
+- #endif
+ print_pos++;
+ }
+ }
+--- 918,926 ----
+***************
+*** 1046,1052 ****
+ {"Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique"}
+ };
+
+- #ifdef FEAT_MBYTE
+ /* Generic font metrics for multi-byte fonts */
+ static struct prt_ps_font_S prt_ps_mb_font =
+ {
+--- 1030,1035 ----
+***************
+*** 1055,1061 ****
+ -250, 805,
+ {NULL, NULL, NULL, NULL}
+ };
+- #endif
+
+ /* Pointer to current font set being used */
+ static struct prt_ps_font_S* prt_ps_font;
+--- 1038,1043 ----
+***************
+*** 1076,1082 ****
+ int has_charset;
+ };
+
+- #ifdef FEAT_MBYTE
+
+ #define CS_JIS_C_1978 (0x01)
+ #define CS_JIS_X_1983 (0x02)
+--- 1058,1063 ----
+***************
+*** 1261,1267 ****
+ "KS_X_1992"
+ }
+ };
+- #endif /* FEAT_MBYTE */
+
+ struct prt_ps_resource_S
+ {
+--- 1242,1247 ----
+***************
+*** 1410,1416 ****
+ static char_u prt_line_buffer[257];
+ static garray_T prt_ps_buffer;
+
+- # ifdef FEAT_MBYTE
+ static int prt_do_conv;
+ static vimconv_T prt_conv;
+
+--- 1390,1395 ----
+***************
+*** 1422,1428 ****
+ static int prt_half_width;
+ static char *prt_ascii_encoding;
+ static char_u prt_hexchar[] = "0123456789abcdef";
+- # endif
+
+ static void
+ prt_write_file_raw_len(char_u *buffer, int bytes)
+--- 1401,1406 ----
+***************
+*** 1494,1511 ****
+ vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer),
+ "/_%s /VIM-%s /%s ref\n", new_name, encoding, font);
+ prt_write_file(prt_line_buffer);
+- #ifdef FEAT_MBYTE
+ if (prt_out_mbyte)
+ sprintf((char *)prt_line_buffer, "/%s %d %f /_%s sffs\n",
+ new_name, height, 500./prt_ps_courier_font.wx, new_name);
+ else
+- #endif
+ vim_snprintf((char *)prt_line_buffer, sizeof(prt_line_buffer),
+ "/%s %d /_%s ffs\n", new_name, height, new_name);
+ prt_write_file(prt_line_buffer);
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Write a line to define the CID font.
+ */
+--- 1472,1486 ----
+***************
+*** 1530,1536 ****
+ "/%s %s d\n", new_name, original_name);
+ prt_write_file(prt_line_buffer);
+ }
+- #endif
+
+ /*
+ * Convert a real value into an integer and fractional part as integers, with
+--- 1505,1510 ----
+***************
+*** 1659,1676 ****
+ /* Draw the text
+ * Note: we write text out raw - EBCDIC conversion is handled in the
+ * PostScript world via the font encoding vector. */
+- #ifdef FEAT_MBYTE
+ if (prt_out_mbyte)
+ prt_write_string("<");
+ else
+- #endif
+ prt_write_string("(");
+ prt_write_file_raw_len(prt_ps_buffer.ga_data, prt_ps_buffer.ga_len);
+- #ifdef FEAT_MBYTE
+ if (prt_out_mbyte)
+ prt_write_string(">");
+ else
+- #endif
+ prt_write_string(")");
+ /* Add a moveto if need be and use the appropriate show procedure */
+ if (prt_do_moveto)
+--- 1633,1646 ----
+***************
+*** 2150,2156 ****
+ void
+ mch_print_cleanup(void)
+ {
+- #ifdef FEAT_MBYTE
+ if (prt_out_mbyte)
+ {
+ int i;
+--- 2120,2125 ----
+***************
+*** 2171,2177 ****
+ convert_setup(&prt_conv, NULL, NULL);
+ prt_do_conv = FALSE;
+ }
+- #endif
+ if (prt_ps_fd != NULL)
+ {
+ fclose(prt_ps_fd);
+--- 2140,2145 ----
+***************
+*** 2250,2262 ****
+ if (prt_use_number())
+ {
+ prt_number_width = PRINT_NUMBER_WIDTH * prt_char_width;
+- #ifdef FEAT_MBYTE
+ /* If we are outputting multi-byte characters then line numbers will be
+ * printed with half width characters
+ */
+ if (prt_out_mbyte)
+ prt_number_width /= 2;
+- #endif
+ prt_left_margin += prt_number_width;
+ }
+ else
+--- 2218,2228 ----
+***************
+*** 2265,2271 ****
+ return (int)((prt_right_margin - prt_left_margin) / prt_char_width);
+ }
+
+- #ifdef FEAT_MBYTE
+ static int
+ prt_build_cid_fontname(int font, char_u *name, int name_len)
+ {
+--- 2231,2236 ----
+***************
+*** 2279,2285 ****
+
+ return TRUE;
+ }
+- #endif
+
+ /*
+ * Get number of lines of text that fit on a page (excluding the header).
+--- 2244,2249 ----
+***************
+*** 2315,2321 ****
+ return lpp - prt_header_height();
+ }
+
+- #ifdef FEAT_MBYTE
+ static int
+ prt_match_encoding(
+ char *p_encoding,
+--- 2279,2284 ----
+***************
+*** 2368,2374 ****
+ }
+ return FALSE;
+ }
+- #endif
+
+ int
+ mch_print_init(
+--- 2331,2336 ----
+***************
+*** 2385,2398 ****
+ double right;
+ double top;
+ double bottom;
+- #ifdef FEAT_MBYTE
+ int props;
+ int cmap = 0;
+ char_u *p_encoding;
+ struct prt_ps_encoding_S *p_mbenc;
+ struct prt_ps_encoding_S *p_mbenc_first;
+ struct prt_ps_charset_S *p_mbchar = NULL;
+- #endif
+
+ #if 0
+ /*
+--- 2347,2358 ----
+***************
+*** 2415,2421 ****
+ /*
+ * Set up font and encoding.
+ */
+- #ifdef FEAT_MBYTE
+ p_encoding = enc_skip(p_penc);
+ if (*p_encoding == NUL)
+ p_encoding = enc_skip(p_enc);
+--- 2375,2380 ----
+***************
+*** 2542,2552 ****
+ prt_ps_font = &prt_ps_mb_font;
+ }
+ else
+- #endif
+ {
+- #ifdef FEAT_MBYTE
+ prt_use_courier = FALSE;
+- #endif
+ prt_ps_font = &prt_ps_courier_font;
+ }
+
+--- 2501,2508 ----
+***************
+*** 2699,2708 ****
+ }
+
+ prt_bufsiz = psettings->chars_per_line;
+- #ifdef FEAT_MBYTE
+ if (prt_out_mbyte)
+ prt_bufsiz *= 2;
+- #endif
+ ga_init2(&prt_ps_buffer, (int)sizeof(char), prt_bufsiz);
+
+ prt_page_num = 0;
+--- 2655,2662 ----
+***************
+*** 2781,2807 ****
+ char buffer[256];
+ char_u *p_encoding;
+ char_u *p;
+- #ifdef FEAT_MBYTE
+ struct prt_ps_resource_S *res_cidfont;
+ struct prt_ps_resource_S *res_cmap;
+- #endif
+ int retval = FALSE;
+
+ res_prolog = (struct prt_ps_resource_S *)
+ alloc(sizeof(struct prt_ps_resource_S));
+ res_encoding = (struct prt_ps_resource_S *)
+ alloc(sizeof(struct prt_ps_resource_S));
+- #ifdef FEAT_MBYTE
+ res_cidfont = (struct prt_ps_resource_S *)
+ alloc(sizeof(struct prt_ps_resource_S));
+ res_cmap = (struct prt_ps_resource_S *)
+ alloc(sizeof(struct prt_ps_resource_S));
+- #endif
+ if (res_prolog == NULL || res_encoding == NULL
+! #ifdef FEAT_MBYTE
+! || res_cidfont == NULL || res_cmap == NULL
+! #endif
+! )
+ goto theend;
+
+ /*
+--- 2735,2754 ----
+ char buffer[256];
+ char_u *p_encoding;
+ char_u *p;
+ struct prt_ps_resource_S *res_cidfont;
+ struct prt_ps_resource_S *res_cmap;
+ int retval = FALSE;
+
+ res_prolog = (struct prt_ps_resource_S *)
+ alloc(sizeof(struct prt_ps_resource_S));
+ res_encoding = (struct prt_ps_resource_S *)
+ alloc(sizeof(struct prt_ps_resource_S));
+ res_cidfont = (struct prt_ps_resource_S *)
+ alloc(sizeof(struct prt_ps_resource_S));
+ res_cmap = (struct prt_ps_resource_S *)
+ alloc(sizeof(struct prt_ps_resource_S));
+ if (res_prolog == NULL || res_encoding == NULL
+! || res_cidfont == NULL || res_cmap == NULL)
+ goto theend;
+
+ /*
+***************
+*** 2863,2873 ****
+ prt_mediasize[prt_media].height,
+ (double)0, NULL, NULL);
+ /* Define fonts needed */
+- #ifdef FEAT_MBYTE
+ if (!prt_out_mbyte || prt_use_courier)
+- #endif
+ prt_dsc_font_resource("DocumentNeededResources", &prt_ps_courier_font);
+- #ifdef FEAT_MBYTE
+ if (prt_out_mbyte)
+ {
+ prt_dsc_font_resource((prt_use_courier ? NULL
+--- 2810,2817 ----
+***************
+*** 2875,2881 ****
+ if (!prt_custom_cmap)
+ prt_dsc_resources(NULL, "cmap", prt_cmap);
+ }
+- #endif
+
+ /* Search for external resources VIM supplies */
+ if (!prt_find_resource("prolog", res_prolog))
+--- 2819,2824 ----
+***************
+*** 2887,2893 ****
+ goto theend;
+ if (!prt_check_resource(res_prolog, PRT_PROLOG_VERSION))
+ goto theend;
+- #ifdef FEAT_MBYTE
+ if (prt_out_mbyte)
+ {
+ /* Look for required version of multi-byte printing procset */
+--- 2830,2835 ----
+***************
+*** 2901,2923 ****
+ if (!prt_check_resource(res_cidfont, PRT_CID_PROLOG_VERSION))
+ goto theend;
+ }
+- #endif
+
+ /* Find an encoding to use for printing.
+ * Check 'printencoding'. If not set or not found, then use 'encoding'. If
+ * that cannot be found then default to "latin1".
+ * Note: VIM specific encoding header is always skipped.
+ */
+- #ifdef FEAT_MBYTE
+ if (!prt_out_mbyte)
+ {
+- #endif
+ p_encoding = enc_skip(p_penc);
+ if (*p_encoding == NUL
+ || !prt_find_resource((char *)p_encoding, res_encoding))
+ {
+ /* 'printencoding' not set or not supported - find alternate */
+- #ifdef FEAT_MBYTE
+ int props;
+
+ p_encoding = enc_skip(p_enc);
+--- 2843,2861 ----
+***************
+*** 2925,2931 ****
+ if (!(props & ENC_8BIT)
+ || !prt_find_resource((char *)p_encoding, res_encoding))
+ /* 8-bit 'encoding' is not supported */
+- #endif
+ {
+ /* Use latin1 as default printing encoding */
+ p_encoding = (char_u *)"latin1";
+--- 2863,2868 ----
+***************
+*** 2941,2947 ****
+ goto theend;
+ /* For the moment there are no checks on encoding resource files to
+ * perform */
+- #ifdef FEAT_MBYTE
+ }
+ else
+ {
+--- 2878,2883 ----
+***************
+*** 2989,3002 ****
+ if (!prt_open_resource(res_cmap))
+ goto theend;
+ }
+- #endif
+
+ /* List resources supplied */
+ STRCPY(buffer, res_prolog->title);
+ STRCAT(buffer, " ");
+ STRCAT(buffer, res_prolog->version);
+ prt_dsc_resources("DocumentSuppliedResources", "procset", buffer);
+- #ifdef FEAT_MBYTE
+ if (prt_out_mbyte)
+ {
+ STRCPY(buffer, res_cidfont->title);
+--- 2925,2936 ----
+***************
+*** 3013,3019 ****
+ }
+ }
+ if (!prt_out_mbyte || prt_use_courier)
+- #endif
+ {
+ STRCPY(buffer, res_encoding->title);
+ STRCAT(buffer, " ");
+--- 2947,2952 ----
+***************
+*** 3035,3045 ****
+ prt_dsc_noarg("BeginDefaults");
+
+ /* List font resources most likely common to all pages */
+- #ifdef FEAT_MBYTE
+ if (!prt_out_mbyte || prt_use_courier)
+- #endif
+ prt_dsc_font_resource("PageResources", &prt_ps_courier_font);
+- #ifdef FEAT_MBYTE
+ if (prt_out_mbyte)
+ {
+ prt_dsc_font_resource((prt_use_courier ? NULL : "PageResources"),
+--- 2968,2975 ----
+***************
+*** 3047,3053 ****
+ if (!prt_custom_cmap)
+ prt_dsc_resources(NULL, "cmap", prt_cmap);
+ }
+- #endif
+
+ /* Paper will be used for all pages */
+ prt_dsc_textline("PageMedia", prt_mediasize[prt_media].name);
+--- 2977,2982 ----
+***************
+*** 3062,3068 ****
+ /* Add required procsets - NOTE: order is important! */
+ if (!prt_add_resource(res_prolog))
+ goto theend;
+- #ifdef FEAT_MBYTE
+ if (prt_out_mbyte)
+ {
+ /* Add CID font procset, and any user supplied CMap */
+--- 2991,2996 ----
+***************
+*** 3071,3081 ****
+ if (prt_custom_cmap && !prt_add_resource(res_cmap))
+ goto theend;
+ }
+- #endif
+
+- #ifdef FEAT_MBYTE
+ if (!prt_out_mbyte || prt_use_courier)
+- #endif
+ /* There will be only one Roman font encoding to be included in the PS
+ * file. */
+ if (!prt_add_resource(res_encoding))
+--- 2999,3006 ----
+***************
+*** 3102,3115 ****
+ prt_write_string("c\n");
+
+ /* Font resource inclusion and definition */
+- #ifdef FEAT_MBYTE
+ if (!prt_out_mbyte || prt_use_courier)
+ {
+ /* When using Courier for ASCII range when printing multi-byte, need to
+ * pick up ASCII encoding to use with it. */
+ if (prt_use_courier)
+ p_encoding = (char_u *)prt_ascii_encoding;
+- #endif
+ prt_dsc_resources("IncludeResource", "font",
+ prt_ps_courier_font.ps_fontname[PRT_PS_FONT_ROMAN]);
+ prt_def_font("F0", (char *)p_encoding, (int)prt_line_height,
+--- 3027,3038 ----
+***************
+*** 3126,3132 ****
+ prt_ps_courier_font.ps_fontname[PRT_PS_FONT_BOLDOBLIQUE]);
+ prt_def_font("F3", (char *)p_encoding, (int)prt_line_height,
+ prt_ps_courier_font.ps_fontname[PRT_PS_FONT_BOLDOBLIQUE]);
+- #ifdef FEAT_MBYTE
+ }
+ if (prt_out_mbyte)
+ {
+--- 3049,3054 ----
+***************
+*** 3182,3188 ****
+ /* Use BOLD for BOLDOBLIQUE */
+ prt_dup_cidfont("CF1", "CF3");
+ }
+- #endif
+
+ /* Misc constant vars used for underlining and background rects */
+ prt_def_var("UO", PRT_PS_FONT_TO_USER(prt_line_height,
+--- 3104,3109 ----
+***************
+*** 3199,3208 ****
+ theend:
+ vim_free(res_prolog);
+ vim_free(res_encoding);
+- #ifdef FEAT_MBYTE
+ vim_free(res_cidfont);
+ vim_free(res_cmap);
+- #endif
+
+ return retval;
+ }
+--- 3120,3127 ----
+***************
+*** 3269,3280 ****
+ prt_dsc_noarg("BeginPageSetup");
+
+ prt_write_string("sv\n0 g\n");
+- #ifdef FEAT_MBYTE
+ prt_in_ascii = !prt_out_mbyte;
+ if (prt_out_mbyte)
+ prt_write_string("CF0 sf\n");
+ else
+- #endif
+ prt_write_string("F0 sf\n");
+ prt_fgcol = PRCOLOR_BLACK;
+ prt_bgcol = PRCOLOR_WHITE;
+--- 3188,3197 ----
+***************
+*** 3318,3326 ****
+
+ prt_attribute_change = TRUE;
+ prt_need_moveto = TRUE;
+- #ifdef FEAT_MBYTE
+ prt_half_width = FALSE;
+- #endif
+ }
+
+ int
+--- 3235,3241 ----
+***************
+*** 3332,3346 ****
+ char_u ch_buff[8];
+ float char_width;
+ float next_pos;
+- #ifdef FEAT_MBYTE
+ int in_ascii;
+ int half_width;
+ char_u *tofree = NULL;
+- #endif
+
+ char_width = prt_char_width;
+
+- #ifdef FEAT_MBYTE
+ /* Ideally VIM would create a rearranged CID font to combine a Roman and
+ * CJKV font to do what VIM is doing here - use a Roman font for characters
+ * in the ASCII range, and the original CID font for everything else.
+--- 3247,3258 ----
+***************
+*** 3392,3398 ****
+ prt_attribute_change = TRUE;
+ }
+ }
+- #endif
+
+ /* Output any required changes to the graphics state, after flushing any
+ * text buffered so far.
+--- 3304,3309 ----
+***************
+*** 3413,3423 ****
+ }
+ if (prt_need_font)
+ {
+- #ifdef FEAT_MBYTE
+ if (!prt_in_ascii)
+ prt_write_string("CF");
+ else
+- #endif
+ prt_write_string("F");
+ prt_write_int(prt_font);
+ prt_write_string("sf\n");
+--- 3324,3332 ----
+***************
+*** 3459,3465 ****
+ prt_attribute_change = FALSE;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (prt_do_conv)
+ {
+ /* Convert from multi-byte to 8-bit encoding */
+--- 3368,3373 ----
+***************
+*** 3486,3492 ****
+ }
+ }
+ else
+- #endif
+ {
+ /* Add next character to buffer of characters to output.
+ * Note: One printed character may require several PS characters to
+--- 3394,3399 ----
+***************
+*** 3528,3537 ****
+ ga_append(&prt_ps_buffer, ch);
+ }
+
+- #ifdef FEAT_MBYTE
+ /* Need to free any translated characters */
+ vim_free(tofree);
+- #endif
+
+ prt_text_run += char_width;
+ prt_pos_x += char_width;
+--- 3435,3442 ----
+*** ../vim-8.1.0805/src/if_xcmdsrv.c 2019-01-19 18:23:38.017218438 +0100
+--- src/if_xcmdsrv.c 2019-01-24 15:17:19.318047080 +0100
+***************
+*** 440,459 ****
+ * comm window in the communication window.
+ * Length must be computed exactly!
+ */
+- #ifdef FEAT_MBYTE
+ length = STRLEN(name) + STRLEN(p_enc) + STRLEN(cmd) + 14;
+- #else
+- length = STRLEN(name) + STRLEN(cmd) + 10;
+- #endif
+ property = (char_u *)alloc((unsigned)length + 30);
+
+- #ifdef FEAT_MBYTE
+ sprintf((char *)property, "%c%c%c-n %s%c-E %s%c-s %s",
+ 0, asExpr ? 'c' : 'k', 0, name, 0, p_enc, 0, cmd);
+- #else
+- sprintf((char *)property, "%c%c%c-n %s%c-s %s",
+- 0, asExpr ? 'c' : 'k', 0, name, 0, cmd);
+- #endif
+ if (name == loosename)
+ vim_free(loosename);
+ /* Add a back reference to our comm window */
+--- 440,450 ----
+***************
+*** 758,777 ****
+ if (!WindowValid(dpy, win))
+ return -1;
+
+- #ifdef FEAT_MBYTE
+ length = STRLEN(p_enc) + STRLEN(str) + 14;
+- #else
+- length = STRLEN(str) + 10;
+- #endif
+ if ((property = (char_u *)alloc((unsigned)length + 30)) != NULL)
+ {
+- #ifdef FEAT_MBYTE
+ sprintf((char *)property, "%cn%c-E %s%c-n %s%c-w %x",
+ 0, 0, p_enc, 0, str, 0, (unsigned int)commWindow);
+- #else
+- sprintf((char *)property, "%cn%c-n %s%c-w %x",
+- 0, 0, str, 0, (unsigned int)commWindow);
+- #endif
+ /* Add length of what "%x" resulted in. */
+ length += STRLEN(property + length);
+ res = AppendPropCarefully(dpy, win, commProperty, property, length + 1);
+--- 749,759 ----
+***************
+*** 1334,1350 ****
+
+ /* Initialize the result property. */
+ ga_init2(&reply, 1, 100);
+- #ifdef FEAT_MBYTE
+ (void)ga_grow(&reply, 50 + STRLEN(p_enc));
+ sprintf(reply.ga_data, "%cr%c-E %s%c-s %s%c-r ",
+ 0, 0, p_enc, 0, serial, 0);
+ reply.ga_len = 14 + STRLEN(p_enc) + STRLEN(serial);
+- #else
+- (void)ga_grow(&reply, 50);
+- sprintf(reply.ga_data, "%cr%c-s %s%c-r ",
+- 0, 0, serial, 0);
+- reply.ga_len = 10 + STRLEN(serial);
+- #endif
+
+ /* Evaluate the expression and return the result. */
+ if (res != NULL)
+--- 1316,1325 ----
+*** ../vim-8.1.0805/src/json.c 2019-01-20 15:30:36.885328746 +0100
+--- src/json.c 2019-01-24 15:18:12.385703726 +0100
+***************
+*** 96,102 ****
+ ga_concat(gap, (char_u *)"\"\"");
+ else
+ {
+! #if defined(FEAT_MBYTE) && defined(USE_ICONV)
+ vimconv_T conv;
+ char_u *converted = NULL;
+
+--- 96,102 ----
+ ga_concat(gap, (char_u *)"\"\"");
+ else
+ {
+! #if defined(USE_ICONV)
+ vimconv_T conv;
+ char_u *converted = NULL;
+
+***************
+*** 115,126 ****
+ while (*res != NUL)
+ {
+ int c;
+- #ifdef FEAT_MBYTE
+ /* always use utf-8 encoding, ignore 'encoding' */
+ c = utf_ptr2char(res);
+- #else
+- c = *res;
+- #endif
+
+ switch (c)
+ {
+--- 115,122 ----
+***************
+*** 142,153 ****
+ default:
+ if (c >= 0x20)
+ {
+- #ifdef FEAT_MBYTE
+ numbuf[utf_char2bytes(c, numbuf)] = NUL;
+- #else
+- numbuf[0] = c;
+- numbuf[1] = NUL;
+- #endif
+ ga_concat(gap, numbuf);
+ }
+ else
+--- 138,144 ----
+***************
+*** 157,170 ****
+ ga_concat(gap, numbuf);
+ }
+ }
+- #ifdef FEAT_MBYTE
+ res += utf_ptr2len(res);
+- #else
+- ++res;
+- #endif
+ }
+ ga_append(gap, '"');
+! #if defined(FEAT_MBYTE) && defined(USE_ICONV)
+ vim_free(converted);
+ #endif
+ }
+--- 148,157 ----
+ ga_concat(gap, numbuf);
+ }
+ }
+ res += utf_ptr2len(res);
+ }
+ ga_append(gap, '"');
+! #if defined(USE_ICONV)
+ vim_free(converted);
+ #endif
+ }
+***************
+*** 421,431 ****
+ {
+ /* The JSON is always expected to be utf-8, thus use utf functions
+ * here. The string is converted below if needed. */
+! if (*p == NUL || p[1] == NUL
+! #ifdef FEAT_MBYTE
+! || utf_ptr2len(p) < utf_byte2len(*p)
+! #endif
+! )
+ {
+ /* Not enough bytes to make a character or end of the string. Get
+ * more if possible. */
+--- 408,414 ----
+ {
+ /* The JSON is always expected to be utf-8, thus use utf functions
+ * here. The string is converted below if needed. */
+! if (*p == NUL || p[1] == NUL || utf_ptr2len(p) < utf_byte2len(*p))
+ {
+ /* Not enough bytes to make a character or end of the string. Get
+ * more if possible. */
+***************
+*** 488,500 ****
+ }
+ if (res != NULL)
+ {
+- #ifdef FEAT_MBYTE
+ char_u buf[NUMBUFLEN];
+ buf[utf_char2bytes((int)nr, buf)] = NUL;
+ ga_concat(&ga, buf);
+- #else
+- ga_append(&ga, (int)nr);
+- #endif
+ }
+ break;
+ default:
+--- 471,479 ----
+***************
+*** 511,521 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ len = utf_ptr2len(p);
+- #else
+- len = 1;
+- #endif
+ if (res != NULL)
+ {
+ if (ga_grow(&ga, len) == FAIL)
+--- 490,496 ----
+***************
+*** 538,544 ****
+ {
+ ga_append(&ga, NUL);
+ res->v_type = VAR_STRING;
+! #if defined(FEAT_MBYTE) && defined(USE_ICONV)
+ if (!enc_utf8)
+ {
+ vimconv_T conv;
+--- 513,519 ----
+ {
+ ga_append(&ga, NUL);
+ res->v_type = VAR_STRING;
+! #if defined(USE_ICONV)
+ if (!enc_utf8)
+ {
+ vimconv_T conv;
+*** ../vim-8.1.0805/src/kword_test.c 2017-01-28 16:33:18.000000000 +0100
+--- src/kword_test.c 2019-01-24 15:18:32.497573317 +0100
+***************
+*** 21,27 ****
+ /* This file has to be included because the tested functions are static */
+ #include "charset.c"
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Test the results of vim_iswordc() and vim_iswordp() are matched.
+ */
+--- 21,26 ----
+***************
+*** 73,85 ****
+ }
+ }
+ }
+- #endif
+
+ int
+ main(void)
+ {
+- #ifdef FEAT_MBYTE
+ test_isword_funcs_utf8();
+- #endif
+ return 0;
+ }
+--- 72,81 ----
+*** ../vim-8.1.0805/src/main.c 2019-01-19 21:06:55.344138786 +0100
+--- src/main.c 2019-01-24 15:19:25.293230303 +0100
+***************
+*** 119,125 ****
+ */
+ mch_early_init();
+
+! #if defined(WIN32) && defined(FEAT_MBYTE)
+ /*
+ * MinGW expands command line arguments, which confuses our code to
+ * convert when 'encoding' changes. Get the unexpanded arguments.
+--- 119,125 ----
+ */
+ mch_early_init();
+
+! #if defined(WIN32)
+ /*
+ * MinGW expands command line arguments, which confuses our code to
+ * convert when 'encoding' changes. Get the unexpanded arguments.
+***************
+*** 250,256 ****
+ params.fname = alist_name(&GARGLIST[0]);
+ }
+
+! #if defined(WIN32) && defined(FEAT_MBYTE)
+ {
+ extern void set_alist_count(void);
+
+--- 250,256 ----
+ params.fname = alist_name(&GARGLIST[0]);
+ }
+
+! #if defined(WIN32)
+ {
+ extern void set_alist_count(void);
+
+***************
+*** 592,600 ****
+ {
+ char_u *enc = NULL;
+
+- # ifdef FEAT_MBYTE
+ enc = p_menc;
+- # endif
+ if (params.use_ef != NULL)
+ set_string_option_direct((char_u *)"ef", -1,
+ params.use_ef, OPT_FREE, SID_CARG);
+--- 592,598 ----
+***************
+*** 813,819 ****
+ /* Must come before the may_req_ calls. */
+ starting = 0;
+
+! #if defined(FEAT_TERMRESPONSE) && defined(FEAT_MBYTE)
+ /* Must be done before redrawing, puts a few characters on the screen. */
+ may_req_ambiguous_char_width();
+ #endif
+--- 811,817 ----
+ /* Must come before the may_req_ calls. */
+ starting = 0;
+
+! #if defined(FEAT_TERMRESPONSE)
+ /* Must be done before redrawing, puts a few characters on the screen. */
+ may_req_ambiguous_char_width();
+ #endif
+***************
+*** 926,934 ****
+ {
+ cmdline_init();
+
+- #ifdef FEAT_MBYTE
+ (void)mb_init(); /* init mb_bytelen_tab[] to ones */
+- #endif
+ #ifdef FEAT_EVAL
+ eval_init(); /* init global variables */
+ #endif
+--- 924,930 ----
+***************
+*** 1549,1555 ****
+ if (garbage_collect_at_exit)
+ garbage_collect(FALSE);
+ #endif
+! #if defined(WIN32) && defined(FEAT_MBYTE)
+ free_cmd_argsW();
+ #endif
+
+--- 1545,1551 ----
+ if (garbage_collect_at_exit)
+ garbage_collect(FALSE);
+ #endif
+! #if defined(WIN32)
+ free_cmd_argsW();
+ #endif
+
+***************
+*** 2501,2507 ****
+ #endif
+ );
+
+! #if defined(FEAT_MBYTE) && defined(WIN32)
+ {
+ /* Remember this argument has been added to the argument list.
+ * Needed when 'encoding' is changed. */
+--- 2497,2503 ----
+ #endif
+ );
+
+! #if defined(WIN32)
+ {
+ /* Remember this argument has been added to the argument list.
+ * Needed when 'encoding' is changed. */
+***************
+*** 2584,2590 ****
+ #if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ if (is_cygpty_used())
+ {
+! # if defined(FEAT_MBYTE) && defined(HAVE_BIND_TEXTDOMAIN_CODESET) \
+ && defined(FEAT_GETTEXT)
+ char *s, *tofree = NULL;
+
+--- 2580,2586 ----
+ #if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ if (is_cygpty_used())
+ {
+! # if defined(HAVE_BIND_TEXTDOMAIN_CODESET) \
+ && defined(FEAT_GETTEXT)
+ char *s, *tofree = NULL;
+
+***************
+*** 3660,3668 ****
+ {
+ cmdsrv_main(&parmp->argc, parmp->argv,
+ parmp->serverName_arg, &parmp->serverStr);
+- # ifdef FEAT_MBYTE
+ parmp->serverStrEnc = vim_strsave(p_enc);
+- # endif
+ }
+
+ /* If we're still running, get the name to register ourselves.
+--- 3656,3662 ----
+***************
+*** 4281,4287 ****
+ char_u *res = data;
+
+ *tofree = NULL;
+- # ifdef FEAT_MBYTE
+ if (client_enc != NULL && p_enc != NULL)
+ {
+ vimconv_T vimconv;
+--- 4275,4280 ----
+***************
+*** 4298,4304 ****
+ }
+ convert_setup(&vimconv, NULL, NULL);
+ }
+- # endif
+ return res;
+ }
+ #endif
+--- 4291,4296 ----
+*** ../vim-8.1.0805/src/mbyte.c 2019-01-20 15:30:36.885328746 +0100
+--- src/mbyte.c 2019-01-24 15:21:25.168448247 +0100
+***************
+*** 136,143 ****
+ # endif
+ #endif
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+-
+ static int dbcs_char2len(int c);
+ static int dbcs_char2bytes(int c, char_u *buf);
+ static int dbcs_ptr2len(char_u *p);
+--- 136,141 ----
+***************
+*** 211,219 ****
+ }
+ #endif
+
+- #endif
+
+- #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT) || defined(PROTO)
+ /*
+ * Canonical encoding names and their properties.
+ * "iso-8859-n" is handled by enc_canonize() directly.
+--- 209,215 ----
+***************
+*** 456,464 ****
+ return -1;
+ }
+
+- #endif
+-
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+
+ /*
+ * Find canonical encoding "name" in the list and return its properties.
+--- 452,457 ----
+***************
+*** 4294,4302 ****
+ return col - 1;
+ return col;
+ }
+- #endif
+
+- #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT) || defined(PROTO)
+ static int enc_alias_search(char_u *name);
+
+ /*
+--- 4287,4293 ----
+***************
+*** 4325,4331 ****
+ char_u *p, *s;
+ int i;
+
+- # ifdef FEAT_MBYTE
+ if (STRCMP(enc, "default") == 0)
+ {
+ /* Use the default encoding as it's found by set_init_1(). */
+--- 4316,4321 ----
+***************
+*** 4334,4340 ****
+ r = (char_u *)"latin1";
+ return vim_strsave(r);
+ }
+- # endif
+
+ /* copy "enc" to allocated memory, with room for two '-' */
+ r = alloc((unsigned)(STRLEN(enc) + 3));
+--- 4324,4329 ----
+***************
+*** 4406,4420 ****
+ return enc_alias_table[i].canon;
+ return -1;
+ }
+- #endif
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+
+! # ifdef HAVE_LANGINFO_H
+! # include <langinfo.h>
+! # endif
+
+! # ifndef FEAT_GUI_W32
+ /*
+ * Get the canonicalized encoding from the specified locale string "locale"
+ * or from the environment variables LC_ALL, LC_CTYPE and LANG.
+--- 4395,4407 ----
+ return enc_alias_table[i].canon;
+ return -1;
+ }
+
+
+! #ifdef HAVE_LANGINFO_H
+! # include <langinfo.h>
+! #endif
+
+! #ifndef FEAT_GUI_W32
+ /*
+ * Get the canonicalized encoding from the specified locale string "locale"
+ * or from the environment variables LC_ALL, LC_CTYPE and LANG.
+***************
+*** 4472,4478 ****
+
+ return enc_canonize((char_u *)buf);
+ }
+! # endif
+
+ /*
+ * Get the canonicalized encoding of the current locale.
+--- 4459,4465 ----
+
+ return enc_canonize((char_u *)buf);
+ }
+! #endif
+
+ /*
+ * Get the canonicalized encoding of the current locale.
+***************
+*** 4481,4487 ****
+ char_u *
+ enc_locale(void)
+ {
+! # ifdef WIN3264
+ char buf[50];
+ long acp = GetACP();
+
+--- 4468,4474 ----
+ char_u *
+ enc_locale(void)
+ {
+! #ifdef WIN3264
+ char buf[50];
+ long acp = GetACP();
+
+***************
+*** 4493,4511 ****
+ sprintf(buf, "cp%ld", acp);
+
+ return enc_canonize((char_u *)buf);
+! # else
+ char *s;
+
+! # ifdef HAVE_NL_LANGINFO_CODESET
+ if ((s = nl_langinfo(CODESET)) == NULL || *s == NUL)
+! # endif
+! # if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
+ if ((s = setlocale(LC_CTYPE, NULL)) == NULL || *s == NUL)
+! # endif
+ s = NULL;
+
+ return enc_locale_env(s);
+! # endif
+ }
+
+ # if defined(WIN3264) || defined(PROTO) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+--- 4480,4498 ----
+ sprintf(buf, "cp%ld", acp);
+
+ return enc_canonize((char_u *)buf);
+! #else
+ char *s;
+
+! # ifdef HAVE_NL_LANGINFO_CODESET
+ if ((s = nl_langinfo(CODESET)) == NULL || *s == NUL)
+! # endif
+! # if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
+ if ((s = setlocale(LC_CTYPE, NULL)) == NULL || *s == NUL)
+! # endif
+ s = NULL;
+
+ return enc_locale_env(s);
+! #endif
+ }
+
+ # if defined(WIN3264) || defined(PROTO) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+***************
+*** 4800,4806 ****
+ # endif /* DYNAMIC_ICONV */
+ # endif /* USE_ICONV */
+
+- #endif /* FEAT_MBYTE */
+
+ #ifdef FEAT_GUI
+ # define USE_IMACTIVATEFUNC (!gui.in_use && *p_imaf != NUL)
+--- 4787,4792 ----
+***************
+*** 4810,4817 ****
+ # define USE_IMSTATUSFUNC (*p_imsf != NUL)
+ #endif
+
+! #if defined(FEAT_EVAL) && defined(FEAT_MBYTE) \
+! && (defined(FEAT_XIM) || defined(IME_WITHOUT_XIM))
+ static void
+ call_imactivatefunc(int active)
+ {
+--- 4796,4802 ----
+ # define USE_IMSTATUSFUNC (*p_imsf != NUL)
+ #endif
+
+! #if defined(FEAT_EVAL) && (defined(FEAT_XIM) || defined(IME_WITHOUT_XIM))
+ static void
+ call_imactivatefunc(int active)
+ {
+***************
+*** 6482,6488 ****
+ int
+ im_get_status(void)
+ {
+! # if defined(FEAT_MBYTE) && defined(FEAT_EVAL)
+ if (USE_IMSTATUSFUNC)
+ return call_imstatusfunc();
+ # endif
+--- 6467,6473 ----
+ int
+ im_get_status(void)
+ {
+! # if defined(FEAT_EVAL)
+ if (USE_IMSTATUSFUNC)
+ return call_imstatusfunc();
+ # endif
+***************
+*** 6492,6498 ****
+ void
+ im_set_active(int active_arg)
+ {
+! # if defined(FEAT_MBYTE) && defined(FEAT_EVAL)
+ int active = !p_imdisable && active_arg;
+
+ if (USE_IMACTIVATEFUNC && active != im_get_status())
+--- 6477,6483 ----
+ void
+ im_set_active(int active_arg)
+ {
+! # if defined(FEAT_EVAL)
+ int active = !p_imdisable && active_arg;
+
+ if (USE_IMACTIVATEFUNC && active != im_get_status())
+***************
+*** 6513,6519 ****
+
+ #endif /* FEAT_XIM */
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+
+ /*
+ * Setup "vcp" for conversion from "from" to "to".
+--- 6498,6503 ----
+***************
+*** 6548,6557 ****
+ int to_is_utf8;
+
+ /* Reset to no conversion. */
+! # ifdef USE_ICONV
+ if (vcp->vc_type == CONV_ICONV && vcp->vc_fd != (iconv_t)-1)
+ iconv_close(vcp->vc_fd);
+! # endif
+ vcp->vc_type = CONV_NONE;
+ vcp->vc_factor = 1;
+ vcp->vc_fail = FALSE;
+--- 6532,6541 ----
+ int to_is_utf8;
+
+ /* Reset to no conversion. */
+! #ifdef USE_ICONV
+ if (vcp->vc_type == CONV_ICONV && vcp->vc_fd != (iconv_t)-1)
+ iconv_close(vcp->vc_fd);
+! #endif
+ vcp->vc_type = CONV_NONE;
+ vcp->vc_factor = 1;
+ vcp->vc_fail = FALSE;
+***************
+*** 6624,6630 ****
+ vcp->vc_type = CONV_UTF8_MAC;
+ }
+ #endif
+! # ifdef USE_ICONV
+ else
+ {
+ /* Use iconv() for conversion. */
+--- 6608,6614 ----
+ vcp->vc_type = CONV_UTF8_MAC;
+ }
+ #endif
+! #ifdef USE_ICONV
+ else
+ {
+ /* Use iconv() for conversion. */
+***************
+*** 6637,6643 ****
+ vcp->vc_factor = 4; /* could be longer too... */
+ }
+ }
+! # endif
+ if (vcp->vc_type == CONV_NONE)
+ return FAIL;
+
+--- 6621,6627 ----
+ vcp->vc_factor = 4; /* could be longer too... */
+ }
+ }
+! #endif
+ if (vcp->vc_type == CONV_NONE)
+ return FAIL;
+
+***************
+*** 6958,6961 ****
+
+ return retval;
+ }
+- #endif
+--- 6942,6944 ----
+*** ../vim-8.1.0805/src/memline.c 2019-01-19 17:43:03.417449145 +0100
+--- src/memline.c 2019-01-24 15:21:52.472269571 +0100
+***************
+*** 240,248 ****
+ 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);
+- #ifdef FEAT_MBYTE
+ static void add_b0_fenc(ZERO_BL *b0p, buf_T *buf);
+- #endif
+ static time_t swapfile_info(char_u *);
+ static int recov_file_names(char_u **, char_u *, int prepend_dot);
+ static int ml_append_int(buf_T *, linenr_T, char_u *, colnr_T, int, int);
+--- 240,246 ----
+***************
+*** 1033,1042 ****
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ /* Also add the 'fileencoding' if there is room. */
+ add_b0_fenc(b0p, curbuf);
+- #endif
+ }
+
+ /*
+--- 1031,1038 ----
+***************
+*** 1054,1060 ****
+ b0p->b0_flags &= ~B0_SAME_DIR;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * When there is room, add the 'fileencoding' to block zero.
+ */
+--- 1050,1055 ----
+***************
+*** 1066,1078 ****
+ int n;
+ int size = B0_FNAME_SIZE_NOCRYPT;
+
+! # ifdef FEAT_CRYPT
+ /* Without encryption use the same offset as in Vim 7.2 to be compatible.
+ * With encryption it's OK to move elsewhere, the swap file is not
+ * compatible anyway. */
+ if (*buf->b_p_key != NUL)
+ size = B0_FNAME_SIZE_CRYPT;
+! # endif
+
+ n = (int)STRLEN(buf->b_p_fenc);
+ if ((int)STRLEN(b0p->b0_fname) + n + 1 > size)
+--- 1061,1073 ----
+ int n;
+ int size = B0_FNAME_SIZE_NOCRYPT;
+
+! #ifdef FEAT_CRYPT
+ /* Without encryption use the same offset as in Vim 7.2 to be compatible.
+ * With encryption it's OK to move elsewhere, the swap file is not
+ * compatible anyway. */
+ if (*buf->b_p_key != NUL)
+ size = B0_FNAME_SIZE_CRYPT;
+! #endif
+
+ n = (int)STRLEN(buf->b_p_fenc);
+ if ((int)STRLEN(b0p->b0_fname) + n + 1 > size)
+***************
+*** 1085,1091 ****
+ b0p->b0_flags |= B0_HAS_FENC;
+ }
+ }
+- #endif
+
+
+ /*
+--- 1080,1085 ----
+***************
+*** 5103,5111 ****
+ b0p->b0_dirty = buf->b_changed ? B0_DIRTY : 0;
+ b0p->b0_flags = (b0p->b0_flags & ~B0_FF_MASK)
+ | (get_fileformat(buf) + 1);
+- #ifdef FEAT_MBYTE
+ add_b0_fenc(b0p, buf);
+- #endif
+ hp->bh_flags |= BH_DIRTY;
+ mf_sync(buf->b_ml.ml_mfp, MFS_ZERO);
+ break;
+--- 5097,5103 ----
+***************
+*** 5682,5691 ****
+ }
+ check_cursor();
+
+- # ifdef FEAT_MBYTE
+ /* Make sure the cursor is on the first byte of a multi-byte char. */
+ if (has_mbyte)
+ mb_adjust_cursor();
+- # endif
+ }
+ #endif
+--- 5674,5681 ----
+*** ../vim-8.1.0805/src/message.c 2019-01-20 15:30:36.885328746 +0100
+--- src/message.c 2019-01-24 15:25:35.298805375 +0100
+***************
+*** 219,225 ****
+ room = (int)(Rows - msg_row - 1) * Columns + sc_col - 1;
+ if (len > room && room > 0)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ /* may have up to 18 bytes per cell (6 per char, up to two
+ * composing chars) */
+--- 219,224 ----
+***************
+*** 228,234 ****
+ /* may have up to 2 bytes per cell for euc-jp */
+ len = (room + 2) * 2;
+ else
+- #endif
+ len = room + 2;
+ buf = alloc(len);
+ if (buf != NULL)
+--- 227,232 ----
+***************
+*** 274,280 ****
+ break;
+ len += n;
+ buf[e] = s[e];
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ for (n = (*mb_ptr2len)(s + e); --n > 0; )
+ {
+--- 272,277 ----
+***************
+*** 282,293 ****
+ break;
+ buf[e] = s[e];
+ }
+- #endif
+ }
+
+ /* Last part: End of the string. */
+ i = e;
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0)
+ {
+ /* For DBCS going backwards in a string is slow, but
+--- 279,288 ----
+***************
+*** 317,323 ****
+ }
+ }
+ else
+- #endif
+ {
+ for (i = (int)STRLEN(s); len + (n = ptr2cells(s + i - 1)) <= room; --i)
+ len += n;
+--- 312,317 ----
+***************
+*** 852,858 ****
+ if ((force || (shortmess(SHM_TRUNC) && !exmode_active))
+ && (n = (int)STRLEN(s) - room) > 0)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int size = vim_strsize(s);
+--- 846,851 ----
+***************
+*** 868,874 ****
+ }
+ --n;
+ }
+- #endif
+ s += n;
+ *s = '<';
+ }
+--- 861,866 ----
+***************
+*** 1388,1398 ****
+ void
+ msg_putchar_attr(int c, int attr)
+ {
+- #ifdef FEAT_MBYTE
+ char_u buf[MB_MAXBYTES + 1];
+- #else
+- char_u buf[4];
+- #endif
+
+ if (IS_SPECIAL(c))
+ {
+--- 1380,1386 ----
+***************
+*** 1402,1415 ****
+ buf[3] = NUL;
+ }
+ else
+- {
+- #ifdef FEAT_MBYTE
+ buf[(*mb_char2bytes)(c, buf)] = NUL;
+- #else
+- buf[0] = c;
+- buf[1] = NUL;
+- #endif
+- }
+ msg_puts_attr((char *)buf, attr);
+ }
+
+--- 1390,1396 ----
+***************
+*** 1478,1484 ****
+ char_u *
+ msg_outtrans_one(char_u *p, int attr)
+ {
+- #ifdef FEAT_MBYTE
+ int l;
+
+ if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
+--- 1459,1464 ----
+***************
+*** 1486,1492 ****
+ msg_outtrans_len_attr(p, l, attr);
+ return p + l;
+ }
+- #endif
+ msg_puts_attr((char *)transchar_byte(*p), attr);
+ return p + 1;
+ }
+--- 1466,1471 ----
+***************
+*** 1498,1507 ****
+ char_u *str = msgstr;
+ char_u *plain_start = msgstr;
+ char_u *s;
+- #ifdef FEAT_MBYTE
+ int mb_l;
+ int c;
+- #endif
+
+ /* if MSG_HIST flag set, add message to history */
+ if (attr & MSG_HIST)
+--- 1477,1484 ----
+***************
+*** 1510,1521 ****
+ attr &= ~MSG_HIST;
+ }
+
+- #ifdef FEAT_MBYTE
+ /* If the string starts with a composing character first draw a space on
+ * which the composing char can be drawn. */
+ if (enc_utf8 && utf_iscomposing(utf_ptr2char(msgstr)))
+ msg_puts_attr(" ", attr);
+- #endif
+
+ /*
+ * Go over the string. Special characters are translated and printed.
+--- 1487,1496 ----
+***************
+*** 1523,1529 ****
+ */
+ while (--len >= 0)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ /* Don't include composing chars after the end. */
+ mb_l = utfc_ptr2len_len(str, len + 1);
+--- 1498,1503 ----
+***************
+*** 1553,1559 ****
+ str += mb_l;
+ }
+ else
+- #endif
+ {
+ s = transchar_byte(*str);
+ if (s[1] != NUL)
+--- 1527,1532 ----
+***************
+*** 1639,1648 ****
+ len = vim_strsize((char_u *)text);
+ /* Highlight special keys */
+ msg_puts_attr(text, len > 1
+! #ifdef FEAT_MBYTE
+! && (*mb_ptr2len)((char_u *)text) <= 1
+! #endif
+! ? attr : 0);
+ retval += len;
+ }
+ return retval;
+--- 1612,1618 ----
+ len = vim_strsize((char_u *)text);
+ /* Highlight special keys */
+ msg_puts_attr(text, len > 1
+! && (*mb_ptr2len)((char_u *)text) <= 1 ? attr : 0);
+ retval += len;
+ }
+ return retval;
+***************
+*** 1685,1691 ****
+ int modifiers = 0;
+ int special = FALSE;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ char_u *p;
+--- 1655,1660 ----
+***************
+*** 1696,1702 ****
+ if (p != NULL)
+ return p;
+ }
+- #endif
+
+ c = *str;
+ if (c == K_SPECIAL && str[1] != NUL && str[2] != NUL)
+--- 1665,1670 ----
+***************
+*** 1716,1722 ****
+ special = TRUE;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && !IS_SPECIAL(c))
+ {
+ int len = (*mb_ptr2len)(str);
+--- 1684,1689 ----
+***************
+*** 1734,1740 ****
+ *sp = str + len;
+ }
+ else
+- #endif
+ *sp = str + 1;
+
+ /* Make unprintable characters in <> form, also <M-Space> and <Tab>.
+--- 1701,1706 ----
+***************
+*** 1778,1787 ****
+ int n;
+ int attr = 0;
+ char_u *trail = NULL;
+- #ifdef FEAT_MBYTE
+ int l;
+ char_u buf[MB_MAXBYTES + 1];
+- #endif
+
+ if (curwin->w_p_list)
+ list = TRUE;
+--- 1744,1751 ----
+***************
+*** 1811,1817 ****
+ else
+ c = *p_extra++;
+ }
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1)
+ {
+ col += (*mb_ptr2cells)(s);
+--- 1775,1780 ----
+***************
+*** 1831,1837 ****
+ s += l;
+ continue;
+ }
+- #endif
+ else
+ {
+ attr = 0;
+--- 1794,1799 ----
+***************
+*** 1906,1912 ****
+ msg_clr_eos();
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Use screen_puts() to output one multi-byte character.
+ * Return the pointer "s" advanced to the next character.
+--- 1868,1873 ----
+***************
+*** 1952,1958 ****
+ }
+ return s + l;
+ }
+- #endif
+
+ /*
+ * Output a string to the screen at position msg_row, msg_col.
+--- 1913,1918 ----
+***************
+*** 2069,2078 ****
+ char_u *s = str;
+ char_u *t_s = str; /* string from "t_s" to "s" is still todo */
+ int t_col = 0; /* screen cells todo, 0 when "t_s" not used */
+- #ifdef FEAT_MBYTE
+ int l;
+ int cw;
+- #endif
+ char_u *sb_str = str;
+ int sb_col = msg_col;
+ int wrap;
+--- 2029,2036 ----
+***************
+*** 2091,2110 ****
+ cmdmsg_rl
+ ? (
+ msg_col <= 1
+! || (*s == TAB && msg_col <= 7)
+! # ifdef FEAT_MBYTE
+! || (has_mbyte && (*mb_ptr2cells)(s) > 1 && msg_col <= 2)
+! # endif
+! )
+ :
+ #endif
+ (msg_col + t_col >= Columns - 1
+ || (*s == TAB && msg_col + t_col >= ((Columns - 1) & ~7))
+- # ifdef FEAT_MBYTE
+ || (has_mbyte && (*mb_ptr2cells)(s) > 1
+! && msg_col + t_col >= Columns - 2)
+! # endif
+! ))))
+ {
+ /*
+ * The screen is scrolled up when at the last row (some terminals
+--- 2049,2062 ----
+ cmdmsg_rl
+ ? (
+ msg_col <= 1
+! || (*s == TAB && msg_col <= 7)
+! || (has_mbyte && (*mb_ptr2cells)(s) > 1 && msg_col <= 2))
+ :
+ #endif
+ (msg_col + t_col >= Columns - 1
+ || (*s == TAB && msg_col + t_col >= ((Columns - 1) & ~7))
+ || (has_mbyte && (*mb_ptr2cells)(s) > 1
+! && msg_col + t_col >= Columns - 2)))))
+ {
+ /*
+ * The screen is scrolled up when at the last row (some terminals
+***************
+*** 2133,2139 ****
+ #endif
+ )
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ if (enc_utf8 && maxlen >= 0)
+--- 2085,2090 ----
+***************
+*** 2144,2150 ****
+ s = screen_puts_mbyte(s, l, attr);
+ }
+ else
+- #endif
+ msg_screen_putchar(*s++, attr);
+ did_last_char = TRUE;
+ }
+--- 2095,2100 ----
+***************
+*** 2188,2198 ****
+
+ wrap = *s == '\n'
+ || msg_col + t_col >= Columns
+- #ifdef FEAT_MBYTE
+ || (has_mbyte && (*mb_ptr2cells)(s) > 1
+! && msg_col + t_col >= Columns - 1)
+! #endif
+! ;
+ if (t_col > 0 && (wrap || *s == '\r' || *s == '\b'
+ || *s == '\t' || *s == BELL))
+ /* output any postponed text */
+--- 2138,2145 ----
+
+ wrap = *s == '\n'
+ || msg_col + t_col >= Columns
+ || (has_mbyte && (*mb_ptr2cells)(s) > 1
+! && msg_col + t_col >= Columns - 1);
+ if (t_col > 0 && (wrap || *s == '\r' || *s == '\b'
+ || *s == '\t' || *s == BELL))
+ /* output any postponed text */
+***************
+*** 2233,2239 ****
+ vim_beep(BO_SH);
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ cw = (*mb_ptr2cells)(s);
+--- 2180,2185 ----
+***************
+*** 2248,2289 ****
+ cw = 1;
+ l = 1;
+ }
+! #endif
+ /* When drawing from right to left or when a double-wide character
+ * doesn't fit, draw a single character here. Otherwise collect
+ * characters and draw them all at once later. */
+- #if defined(FEAT_RIGHTLEFT) || defined(FEAT_MBYTE)
+ if (
+ # ifdef FEAT_RIGHTLEFT
+! cmdmsg_rl
+! # ifdef FEAT_MBYTE
+! ||
+! # endif
+ # endif
+! # ifdef FEAT_MBYTE
+! (cw > 1 && msg_col + t_col >= Columns - 1)
+! # endif
+! )
+ {
+- # ifdef FEAT_MBYTE
+ if (l > 1)
+ s = screen_puts_mbyte(s, l, attr) - 1;
+ else
+- # endif
+ msg_screen_putchar(*s, attr);
+ }
+ else
+- #endif
+ {
+ /* postpone this character until later */
+ if (t_col == 0)
+ t_s = s;
+- #ifdef FEAT_MBYTE
+ t_col += cw;
+ s += l - 1;
+- #else
+- ++t_col;
+- #endif
+ }
+ }
+ ++s;
+--- 2194,2221 ----
+ cw = 1;
+ l = 1;
+ }
+!
+ /* When drawing from right to left or when a double-wide character
+ * doesn't fit, draw a single character here. Otherwise collect
+ * characters and draw them all at once later. */
+ if (
+ # ifdef FEAT_RIGHTLEFT
+! cmdmsg_rl ||
+ # endif
+! (cw > 1 && msg_col + t_col >= Columns - 1))
+ {
+ if (l > 1)
+ s = screen_puts_mbyte(s, l, attr) - 1;
+ else
+ msg_screen_putchar(*s, attr);
+ }
+ else
+ {
+ /* postpone this character until later */
+ if (t_col == 0)
+ t_s = s;
+ t_col += cw;
+ s += l - 1;
+ }
+ }
+ ++s;
+***************
+*** 2601,2612 ****
+ screen_puts_len(t_s, (int)(s - t_s), msg_row, msg_col, attr);
+ msg_col += *t_col;
+ *t_col = 0;
+- #ifdef FEAT_MBYTE
+ /* If the string starts with a composing character don't increment the
+ * column position for it. */
+ if (enc_utf8 && utf_iscomposing(utf_ptr2char(t_s)))
+ --msg_col;
+- #endif
+ if (msg_col >= Columns)
+ {
+ msg_col = 0;
+--- 2533,2542 ----
+***************
+*** 2643,2656 ****
+ char_u buf[4];
+ char_u *p;
+ #ifdef WIN3264
+! # if defined(FEAT_MBYTE) && !defined(FEAT_GUI_MSWIN)
+ char_u *ccp = NULL;
+
+ # endif
+ if (!(silent_mode && p_verbose == 0))
+ mch_settmode(TMODE_COOK); /* handle '\r' and '\n' correctly */
+
+! # if defined(FEAT_MBYTE) && !defined(FEAT_GUI_MSWIN)
+ if (enc_codepage >= 0 && (int)GetConsoleCP() != enc_codepage)
+ {
+ int inlen = (int)STRLEN(str);
+--- 2573,2586 ----
+ char_u buf[4];
+ char_u *p;
+ #ifdef WIN3264
+! # if !defined(FEAT_GUI_MSWIN)
+ char_u *ccp = NULL;
+
+ # endif
+ if (!(silent_mode && p_verbose == 0))
+ mch_settmode(TMODE_COOK); /* handle '\r' and '\n' correctly */
+
+! # if !defined(FEAT_GUI_MSWIN)
+ if (enc_codepage >= 0 && (int)GetConsoleCP() != enc_codepage)
+ {
+ int inlen = (int)STRLEN(str);
+***************
+*** 2708,2714 ****
+ msg_didout = TRUE; /* assume that line is not empty */
+
+ #ifdef WIN3264
+! # if defined(FEAT_MBYTE) && !defined(FEAT_GUI_MSWIN)
+ vim_free(ccp);
+ # endif
+ if (!(silent_mode && p_verbose == 0))
+--- 2638,2644 ----
+ msg_didout = TRUE; /* assume that line is not empty */
+
+ #ifdef WIN3264
+! # if !defined(FEAT_GUI_MSWIN)
+ vim_free(ccp);
+ # endif
+ if (!(silent_mode && p_verbose == 0))
+***************
+*** 3646,3652 ****
+ retval = 1;
+ for (i = 0; hotkeys[i]; ++i)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ if ((*mb_ptr2char)(hotkeys + i) == c)
+--- 3576,3581 ----
+***************
+*** 3654,3660 ****
+ i += (*mb_ptr2len)(hotkeys + i) - 1;
+ }
+ else
+- #endif
+ if (hotkeys[i] == c)
+ break;
+ ++retval;
+--- 3583,3588 ----
+***************
+*** 3690,3696 ****
+ char_u *to,
+ int lowercase) /* make character lower case */
+ {
+- #ifdef FEAT_MBYTE
+ int len;
+ int c;
+
+--- 3618,3623 ----
+***************
+*** 3709,3715 ****
+ }
+ }
+ else
+- #endif
+ {
+ if (lowercase)
+ *to = (char_u)TOLOWER_LOC(*from);
+--- 3636,3641 ----
+***************
+*** 3735,3745 ****
+ int dfltbutton)
+ {
+ int len = 0;
+! #ifdef FEAT_MBYTE
+! # define HOTK_LEN (has_mbyte ? MB_MAXBYTES : 1)
+! #else
+! # define HOTK_LEN 1
+! #endif
+ int lenhotkey = HOTK_LEN; /* count first button */
+ char_u *hotk = NULL;
+ char_u *msgp = NULL;
+--- 3661,3667 ----
+ int dfltbutton)
+ {
+ int len = 0;
+! #define HOTK_LEN (has_mbyte ? MB_MAXBYTES : 1)
+ int lenhotkey = HOTK_LEN; /* count first button */
+ char_u *hotk = NULL;
+ char_u *msgp = NULL;
+***************
+*** 3771,3781 ****
+ *msgp++ = ' '; /* '\n' -> ', ' */
+
+ /* advance to next hotkey and set default hotkey */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ hotkp += STRLEN(hotkp);
+ else
+- #endif
+ ++hotkp;
+ hotkp[copy_char(r + 1, hotkp, TRUE)] = NUL;
+ if (dfltbutton)
+--- 3693,3701 ----
+***************
+*** 4583,4589 ****
+ str_arg_l = (q == NULL) ? precision
+ : (size_t)(q - str_arg);
+ }
+- # ifdef FEAT_MBYTE
+ if (fmt_spec == 'S')
+ {
+ if (min_field_width != 0)
+--- 4503,4508 ----
+***************
+*** 4600,4606 ****
+ str_arg_l = precision = p1 - (char_u *)str_arg;
+ }
+ }
+- # endif
+ break;
+
+ default:
+--- 4519,4524 ----
+*** ../vim-8.1.0805/src/misc1.c 2019-01-20 15:30:36.889328720 +0100
+--- src/misc1.c 2019-01-24 15:29:11.881374564 +0100
+***************
+*** 843,853 ****
+ p = saved_line + curwin->w_cursor.col;
+ while (*p != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ p += replace_push_mb(p);
+ else
+- #endif
+ replace_push(*p++);
+ }
+ saved_line[curwin->w_cursor.col] = NUL;
+--- 843,851 ----
+***************
+*** 1296,1302 ****
+ ;
+ ++p;
+
+- #ifdef FEAT_MBYTE
+ /* Compute the length of the replaced characters in
+ * screen characters, not bytes. */
+ {
+--- 1294,1299 ----
+***************
+*** 1317,1328 ****
+ (size_t)((leader + lead_len) - endp));
+ lead_len += l;
+ }
+- #else
+- if (p < leader + lead_repl_len)
+- p = leader;
+- else
+- p -= lead_repl_len;
+- #endif
+ mch_memmove(p, lead_repl, (size_t)lead_repl_len);
+ if (p + lead_repl_len > leader + lead_len)
+ p[lead_repl_len] = NUL;
+--- 1314,1319 ----
+***************
+*** 1330,1336 ****
+ /* blank-out any other chars from the old leader. */
+ while (--p >= leader)
+ {
+- #ifdef FEAT_MBYTE
+ int l = mb_head_off(leader, p);
+
+ if (l > 1)
+--- 1321,1326 ----
+***************
+*** 1346,1361 ****
+ lead_len -= l;
+ *p = ' ';
+ }
+! else
+! #endif
+! if (!VIM_ISWHITE(*p))
+ *p = ' ';
+ }
+ }
+ else /* left adjusted leader */
+ {
+ p = skipwhite(leader);
+! #ifdef FEAT_MBYTE
+ /* Compute the length of the replaced characters in
+ * screen characters, not bytes. Move the part that is
+ * not to be overwritten. */
+--- 1336,1349 ----
+ lead_len -= l;
+ *p = ' ';
+ }
+! else if (!VIM_ISWHITE(*p))
+ *p = ' ';
+ }
+ }
+ else /* left adjusted leader */
+ {
+ p = skipwhite(leader);
+!
+ /* Compute the length of the replaced characters in
+ * screen characters, not bytes. Move the part that is
+ * not to be overwritten. */
+***************
+*** 1378,1384 ****
+ lead_len += lead_repl_len - i;
+ }
+ }
+- #endif
+ mch_memmove(p, lead_repl, (size_t)lead_repl_len);
+
+ /* Replace any remaining non-white chars in the old
+--- 1366,1371 ----
+***************
+*** 1396,1402 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ int l = (*mb_ptr2len)(p);
+
+ if (l > 1)
+--- 1383,1388 ----
+***************
+*** 1412,1418 ****
+ (leader + lead_len) - p);
+ lead_len -= l - 1;
+ }
+- #endif
+ *p = ' ';
+ }
+ }
+--- 1398,1403 ----
+***************
+*** 1537,1547 ****
+ if (curbuf->b_p_ai || (flags & OPENLINE_DELSPACES))
+ {
+ while ((*p_extra == ' ' || *p_extra == '\t')
+- #ifdef FEAT_MBYTE
+ && (!enc_utf8
+! || !utf_iscomposing(utf_ptr2char(p_extra + 1)))
+! #endif
+! )
+ {
+ if (REPLACE_NORMAL(State))
+ replace_push(*p_extra);
+--- 1522,1529 ----
+ if (curbuf->b_p_ai || (flags & OPENLINE_DELSPACES))
+ {
+ while ((*p_extra == ' ' || *p_extra == '\t')
+ && (!enc_utf8
+! || !utf_iscomposing(utf_ptr2char(p_extra + 1))))
+ {
+ if (REPLACE_NORMAL(State))
+ replace_push(*p_extra);
+***************
+*** 2320,2326 ****
+ ins_bytes_len(char_u *p, int len)
+ {
+ int i;
+- #ifdef FEAT_MBYTE
+ int n;
+
+ if (has_mbyte)
+--- 2302,2307 ----
+***************
+*** 2334,2340 ****
+ ins_char_bytes(p + i, n);
+ }
+ else
+- #endif
+ for (i = 0; i < len; ++i)
+ ins_char(p[i]);
+ }
+--- 2315,2320 ----
+***************
+*** 2350,2367 ****
+ ins_char(int c)
+ {
+ char_u buf[MB_MAXBYTES + 1];
+! int n = 1;
+!
+! #ifdef FEAT_MBYTE
+! n = (*mb_char2bytes)(c, buf);
+
+ /* When "c" is 0x100, 0x200, etc. we don't want to insert a NUL byte.
+ * Happens for CTRL-Vu9900. */
+ if (buf[0] == 0)
+ buf[0] = '\n';
+- #else
+- buf[0] = c;
+- #endif
+
+ ins_char_bytes(buf, n);
+ }
+--- 2330,2341 ----
+ ins_char(int c)
+ {
+ char_u buf[MB_MAXBYTES + 1];
+! int n = (*mb_char2bytes)(c, buf);
+
+ /* When "c" is 0x100, 0x200, etc. we don't want to insert a NUL byte.
+ * Happens for CTRL-Vu9900. */
+ if (buf[0] == 0)
+ buf[0] = '\n';
+
+ ins_char_bytes(buf, n);
+ }
+***************
+*** 2401,2409 ****
+ colnr_T new_vcol = 0; /* init for GCC */
+ colnr_T vcol;
+ int old_list;
+- #ifndef FEAT_MBYTE
+- char_u cbuf[2];
+- #endif
+
+ /*
+ * Disable 'list' temporarily, unless 'cpo' contains the 'L' flag.
+--- 2375,2380 ----
+***************
+*** 2421,2433 ****
+ * cells. May result in adding spaces to fill a gap.
+ */
+ getvcol(curwin, &curwin->w_cursor, NULL, &vcol, NULL);
+- #ifndef FEAT_MBYTE
+- cbuf[0] = c;
+- cbuf[1] = NUL;
+- new_vcol = vcol + chartabsize(cbuf, vcol);
+- #else
+ new_vcol = vcol + chartabsize(buf, vcol);
+- #endif
+ while (oldp[col + oldlen] != NUL && vcol < new_vcol)
+ {
+ vcol += chartabsize(oldp + col + oldlen, vcol);
+--- 2392,2398 ----
+***************
+*** 2435,2445 ****
+ * position. */
+ if (vcol > new_vcol && oldp[col + oldlen] == TAB)
+ break;
+- #ifdef FEAT_MBYTE
+ oldlen += (*mb_ptr2len)(oldp + col + oldlen);
+- #else
+- ++oldlen;
+- #endif
+ /* Deleted a bit too much, insert spaces. */
+ if (vcol > new_vcol)
+ newlen += vcol - new_vcol;
+--- 2400,2406 ----
+***************
+*** 2449,2459 ****
+ else if (oldp[col] != NUL)
+ {
+ /* normal replace */
+- #ifdef FEAT_MBYTE
+ oldlen = (*mb_ptr2len)(oldp + col);
+- #else
+- oldlen = 1;
+- #endif
+ }
+
+
+--- 2410,2416 ----
+***************
+*** 2464,2474 ****
+ replace_push(NUL);
+ for (i = 0; i < oldlen; ++i)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ i += replace_push_mb(oldp + col + i) - 1;
+ else
+- #endif
+ replace_push(oldp[col + i]);
+ }
+ }
+--- 2421,2429 ----
+***************
+*** 2488,2500 ****
+ (size_t)(linelen - col - oldlen));
+
+ /* Insert or overwrite the new character. */
+- #ifdef FEAT_MBYTE
+ mch_memmove(p, buf, charlen);
+ i = charlen;
+- #else
+- *p = c;
+- i = 1;
+- #endif
+
+ /* Fill with spaces when necessary. */
+ while (i < newlen)
+--- 2443,2450 ----
+***************
+*** 2517,2527 ****
+ #endif
+ )
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ showmatch(mb_ptr2char(buf));
+ else
+- #endif
+ showmatch(c);
+ }
+
+--- 2467,2475 ----
+***************
+*** 2530,2540 ****
+ #endif
+ {
+ /* Normal insert: move cursor right */
+- #ifdef FEAT_MBYTE
+ curwin->w_cursor.col += charlen;
+- #else
+- ++curwin->w_cursor.col;
+- #endif
+ }
+ /*
+ * TODO: should try to update w_row here, to avoid recomputing it later.
+--- 2478,2484 ----
+***************
+*** 2586,2592 ****
+ int
+ del_char(int fixpos)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* Make sure the cursor is at the start of a character. */
+--- 2530,2535 ----
+***************
+*** 2595,2605 ****
+ return FAIL;
+ return del_chars(1L, fixpos);
+ }
+- #endif
+ return del_bytes(1L, fixpos, TRUE);
+ }
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Like del_bytes(), but delete characters instead of bytes.
+ */
+--- 2538,2546 ----
+***************
+*** 2620,2626 ****
+ }
+ return del_bytes(bytes, fixpos, TRUE);
+ }
+- #endif
+
+ /*
+ * Delete "count" bytes under the cursor.
+--- 2561,2566 ----
+***************
+*** 2662,2668 ****
+ return FAIL;
+ }
+
+- #ifdef FEAT_MBYTE
+ /* If 'delcombine' is set and deleting (less than) one character, only
+ * delete the last combining character. */
+ if (p_deco && use_delcombine && enc_utf8
+--- 2602,2607 ----
+***************
+*** 2685,2691 ****
+ fixpos = 0;
+ }
+ }
+- #endif
+
+ /*
+ * When count is too big, reduce it.
+--- 2624,2629 ----
+***************
+*** 2708,2718 ****
+ #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+ #endif
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ curwin->w_cursor.col -=
+ (*mb_head_off)(oldp, oldp + curwin->w_cursor.col);
+- #endif
+ }
+ count = oldlen - col;
+ movelen = 1;
+--- 2646,2654 ----
+***************
+*** 2847,2866 ****
+ if (pos->col == MAXCOL)
+ return NUL;
+ ptr = ml_get_pos(pos);
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ return (*mb_ptr2char)(ptr);
+- #endif
+ return (int)*ptr;
+ }
+
+ int
+ gchar_cursor(void)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ return (*mb_ptr2char)(ml_get_cursor());
+- #endif
+ return (int)*ml_get_cursor();
+ }
+
+--- 2783,2798 ----
+***************
+*** 3681,3687 ****
+ }
+ break;
+ }
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ if (MB_BYTE2LEN(n) > len)
+--- 3613,3618 ----
+***************
+*** 3689,3695 ****
+ buf[len >= buflen ? buflen - 1 : len] = NUL;
+ n = (*mb_ptr2char)(buf);
+ }
+- #endif
+ #ifdef UNIX
+ if (n == intr_char)
+ n = ESC;
+--- 3620,3625 ----
+***************
+*** 4023,4029 ****
+ if (var != NULL && *var == NUL) /* empty is same as not set */
+ var = NULL;
+
+- # ifdef FEAT_MBYTE
+ if (enc_utf8 && var != NULL)
+ {
+ int len;
+--- 3953,3958 ----
+***************
+*** 4038,4044 ****
+ return;
+ }
+ }
+- # endif
+
+ /*
+ * Default home dir is C:/
+--- 3967,3972 ----
+***************
+*** 4437,4443 ****
+
+ if (p != NULL)
+ {
+! #if defined(FEAT_MBYTE) && defined(WIN3264)
+ if (enc_utf8)
+ {
+ int len;
+--- 4365,4371 ----
+
+ if (p != NULL)
+ {
+! #if defined(WIN3264)
+ if (enc_utf8)
+ {
+ int len;
+***************
+*** 4481,4487 ****
+ else
+ p = mch_getenv((char_u *)"VIM");
+
+! #if defined(FEAT_MBYTE) && defined(WIN3264)
+ if (enc_utf8)
+ {
+ int len;
+--- 4409,4415 ----
+ else
+ p = mch_getenv((char_u *)"VIM");
+
+! #if defined(WIN3264)
+ if (enc_utf8)
+ {
+ int len;
+***************
+*** 5332,5338 ****
+ *d++ = *s; /* copy next char */
+ if (*s != '~' && *s != '.') /* and leading "~" and "." */
+ skip = TRUE;
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int l = mb_ptr2len(s);
+--- 5260,5265 ----
+***************
+*** 5340,5346 ****
+ while (--l > 0)
+ *d++ = *++s;
+ }
+- # endif
+ }
+ }
+ }
+--- 5267,5272 ----
+***************
+*** 10155,10164 ****
+ static int stardepth = 0; /* depth for "**" expansion */
+ WIN32_FIND_DATA fb;
+ HANDLE hFind = (HANDLE)0;
+- # ifdef FEAT_MBYTE
+ WIN32_FIND_DATAW wfb;
+ WCHAR *wn = NULL; /* UCS-2 name, NULL when not used. */
+- # endif
+ char_u *matchname;
+ int ok;
+
+--- 10081,10088 ----
+***************
+*** 10170,10177 ****
+ return 0;
+ }
+
+! /* Make room for file name. When doing encoding conversion the actual
+! * length may be quite a bit longer, thus use the maximum possible length. */
+ buf = alloc((int)MAXPATHL);
+ if (buf == NULL)
+ return 0;
+--- 10094,10101 ----
+ return 0;
+ }
+
+! // Make room for file name. When doing encoding conversion the actual
+! // length may be quite a bit longer, thus use the maximum possible length.
+ buf = alloc((int)MAXPATHL);
+ if (buf == NULL)
+ return 0;
+***************
+*** 10199,10205 ****
+ else if (path_end >= path + wildoff
+ && vim_strchr((char_u *)"*?[~", *path_end) != NULL)
+ e = p;
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ len = (*mb_ptr2len)(path_end);
+--- 10123,10128 ----
+***************
+*** 10208,10214 ****
+ path_end += len;
+ }
+ else
+- # endif
+ *p++ = *path_end++;
+ }
+ e = p;
+--- 10131,10136 ----
+***************
+*** 10269,10275 ****
+
+ /* Scan all files in the directory with "dir/ *.*" */
+ STRCPY(s, "*.*");
+- # ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ /* The active codepage differs from 'encoding'. Attempt using the
+--- 10191,10196 ----
+***************
+*** 10286,10302 ****
+ }
+
+ if (wn == NULL)
+- # endif
+ hFind = FindFirstFile((LPCSTR)buf, &fb);
+ ok = (hFind != INVALID_HANDLE_VALUE);
+
+ while (ok)
+ {
+- # ifdef FEAT_MBYTE
+ if (wn != NULL)
+ p = utf16_to_enc(wfb.cFileName, NULL); /* p is allocated here */
+ else
+- # endif
+ p = (char_u *)fb.cFileName;
+ /* Ignore entries starting with a dot, unless when asked for. Accept
+ * all entries found with "matchname". */
+--- 10207,10220 ----
+***************
+*** 10341,10354 ****
+ }
+ }
+
+- # ifdef FEAT_MBYTE
+ if (wn != NULL)
+ {
+ vim_free(p);
+ ok = FindNextFileW(hFind, &wfb);
+ }
+ else
+- # endif
+ ok = FindNextFile(hFind, &fb);
+
+ /* If no more matches and no match was used, try expanding the name
+--- 10259,10270 ----
+***************
+*** 10357,10363 ****
+ {
+ STRCPY(s, matchname);
+ FindClose(hFind);
+- # ifdef FEAT_MBYTE
+ if (wn != NULL)
+ {
+ vim_free(wn);
+--- 10273,10278 ----
+***************
+*** 10366,10372 ****
+ hFind = FindFirstFileW(wn, &wfb);
+ }
+ if (wn == NULL)
+- # endif
+ hFind = FindFirstFile((LPCSTR)buf, &fb);
+ ok = (hFind != INVALID_HANDLE_VALUE);
+ VIM_CLEAR(matchname);
+--- 10281,10286 ----
+***************
+*** 10374,10382 ****
+ }
+
+ FindClose(hFind);
+- # ifdef FEAT_MBYTE
+ vim_free(wn);
+- # endif
+ vim_free(buf);
+ vim_regfree(regmatch.regprog);
+ vim_free(matchname);
+--- 10288,10294 ----
+***************
+*** 10480,10486 ****
+ || (!p_fic && (flags & EW_ICASE)
+ && isalpha(PTR2CHAR(path_end)))))
+ e = p;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ len = (*mb_ptr2len)(path_end);
+--- 10392,10397 ----
+***************
+*** 10489,10495 ****
+ path_end += len;
+ }
+ else
+- #endif
+ *p++ = *path_end++;
+ }
+ e = p;
+--- 10400,10405 ----
+*** ../vim-8.1.0805/src/misc2.c 2019-01-20 15:30:36.889328720 +0100
+--- src/misc2.c 2019-01-24 15:31:04.464628741 +0100
+***************
+*** 73,79 ****
+ * Get the screen position of character col with a coladd in the cursor line.
+ */
+ int
+! getviscol2(colnr_T col, colnr_T coladd)
+ {
+ colnr_T x;
+ pos_T pos;
+--- 73,79 ----
+ * Get the screen position of character col with a coladd in the cursor line.
+ */
+ int
+! getviscol2(colnr_T col, colnr_T coladd UNUSED)
+ {
+ colnr_T x;
+ pos_T pos;
+***************
+*** 320,330 ****
+ }
+ #endif
+
+- #ifdef FEAT_MBYTE
+ /* prevent from moving onto a trail byte */
+ if (has_mbyte)
+ mb_adjustpos(curbuf, pos);
+- #endif
+
+ if (col < wcol)
+ return FAIL;
+--- 320,328 ----
+***************
+*** 358,364 ****
+ p = ml_get_pos(lp);
+ if (*p != NUL) /* still within line, move to next char (may be NUL) */
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int l = (*mb_ptr2len)(p);
+--- 356,361 ----
+***************
+*** 366,372 ****
+ lp->col += l;
+ return ((p[l] != NUL) ? 0 : 2);
+ }
+- #endif
+ lp->col++;
+ #ifdef FEAT_VIRTUALEDIT
+ lp->coladd = 0;
+--- 363,368 ----
+***************
+*** 424,433 ****
+ /* past end of line */
+ p = ml_get(lp->lnum);
+ lp->col = (colnr_T)STRLEN(p);
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ lp->col -= (*mb_head_off)(p, p + lp->col);
+- #endif
+ return 0;
+ }
+
+--- 420,427 ----
+***************
+*** 435,447 ****
+ {
+ /* still within line */
+ lp->col--;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ p = ml_get(lp->lnum);
+ lp->col -= (*mb_head_off)(p, p + lp->col);
+ }
+- #endif
+ return 0;
+ }
+
+--- 429,439 ----
+***************
+*** 451,460 ****
+ lp->lnum--;
+ p = ml_get(lp->lnum);
+ lp->col = (colnr_T)STRLEN(p);
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ lp->col -= (*mb_head_off)(p, p + lp->col);
+- #endif
+ return 1;
+ }
+
+--- 443,450 ----
+***************
+*** 608,618 ****
+ else
+ {
+ win->w_cursor.col = len - 1;
+- #ifdef FEAT_MBYTE
+ /* Move the cursor to the head byte. */
+ if (has_mbyte)
+ mb_adjustpos(win->w_buffer, &win->w_cursor);
+- #endif
+ }
+ }
+ else if (win->w_cursor.col < 0)
+--- 598,606 ----
+***************
+*** 1394,1402 ****
+ char_u *p2;
+ char_u *escaped_string;
+ unsigned length;
+- #ifdef FEAT_MBYTE
+ int l;
+- #endif
+
+ /*
+ * First count the number of backslashes required.
+--- 1382,1388 ----
+***************
+*** 1405,1418 ****
+ length = 1; /* count the trailing NUL */
+ for (p = string; *p; p++)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
+ {
+ length += l; /* count a multibyte char */
+ p += l - 1;
+ continue;
+ }
+- #endif
+ if (vim_strchr(esc_chars, *p) != NULL || (bsl && rem_backslash(p)))
+ ++length; /* count a backslash */
+ ++length; /* count an ordinary char */
+--- 1391,1402 ----
+***************
+*** 1423,1429 ****
+ p2 = escaped_string;
+ for (p = string; *p; p++)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
+ {
+ mch_memmove(p2, p, (size_t)l);
+--- 1407,1412 ----
+***************
+*** 1431,1437 ****
+ p += l - 1; /* skip multibyte char */
+ continue;
+ }
+- #endif
+ if (vim_strchr(esc_chars, *p) != NULL || (bsl && rem_backslash(p)))
+ *p2++ = cc;
+ *p2++ = *p;
+--- 1414,1419 ----
+***************
+*** 1642,1648 ****
+ if (res != NULL)
+ while (*p != NUL)
+ {
+- # ifdef FEAT_MBYTE
+ int l;
+
+ if (enc_utf8)
+--- 1624,1629 ----
+***************
+*** 1685,1691 ****
+ else if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
+ p += l; /* skip multi-byte character */
+ else
+- # endif
+ {
+ *p = TOUPPER_LOC(*p); /* note that toupper() can be a macro */
+ p++;
+--- 1666,1671 ----
+***************
+*** 1711,1717 ****
+ if (res != NULL)
+ while (*p != NUL)
+ {
+- # ifdef FEAT_MBYTE
+ int l;
+
+ if (enc_utf8)
+--- 1691,1696 ----
+***************
+*** 1754,1760 ****
+ else if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
+ p += l; /* skip multi-byte character */
+ else
+- # endif
+ {
+ *p = TOLOWER_LOC(*p); /* note that tolower() can be a macro */
+ p++;
+--- 1733,1738 ----
+***************
+*** 1943,1949 ****
+ int b;
+
+ p = string;
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && c >= 0x80)
+ {
+ while (*p != NUL)
+--- 1921,1926 ----
+***************
+*** 1980,1986 ****
+ }
+ return NULL;
+ }
+- #endif
+ while ((b = *p) != NUL)
+ {
+ if (b == c)
+--- 1957,1962 ----
+***************
+*** 2713,2723 ****
+ * When not a known special key, and not a printable character, try to
+ * extract modifiers.
+ */
+! if (c > 0
+! #ifdef FEAT_MBYTE
+! && (*mb_char2len)(c) == 1
+! #endif
+! )
+ {
+ if (table_idx < 0
+ && (!vim_isprintc(c) || (c & 0x7f) == ' ')
+--- 2689,2695 ----
+ * When not a known special key, and not a printable character, try to
+ * extract modifiers.
+ */
+! if (c > 0 && (*mb_char2len)(c) == 1)
+ {
+ if (table_idx < 0
+ && (!vim_isprintc(c) || (c & 0x7f) == ' ')
+***************
+*** 2760,2771 ****
+ /* Not a special key, only modifiers, output directly */
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (*mb_char2len)(c) > 1)
+ idx += (*mb_char2bytes)(c, string + idx);
+! else
+! #endif
+! if (vim_isprintc(c))
+ string[idx++] = c;
+ else
+ {
+--- 2732,2740 ----
+ /* Not a special key, only modifiers, output directly */
+ else
+ {
+ if (has_mbyte && (*mb_char2len)(c) > 1)
+ idx += (*mb_char2bytes)(c, string + idx);
+! else if (vim_isprintc(c))
+ string[idx++] = c;
+ else
+ {
+***************
+*** 2825,2834 ****
+ dst[dlen++] = KEY2TERMCAP0(key);
+ dst[dlen++] = KEY2TERMCAP1(key);
+ }
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte && !keycode)
+ dlen += (*mb_char2bytes)(key, dst + dlen);
+- #endif
+ else if (keycode)
+ dlen = (int)(add_char2buf(key, dst + dlen) - dst);
+ else
+--- 2794,2801 ----
+***************
+*** 2873,2883 ****
+ last_dash = bp;
+ if (bp[1] != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ l = mb_ptr2len(bp + 1);
+ else
+- #endif
+ l = 1;
+ /* Anything accepted, like <C-?>.
+ * <C-"> or <M-"> are not special in strings as " is
+--- 2840,2848 ----
+***************
+*** 2935,2945 ****
+ /* Modifier with single letter, or special key name. */
+ if (in_string && last_dash[1] == '\\' && last_dash[2] == '"')
+ off = 2;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ l = mb_ptr2len(last_dash + off);
+ else
+- #endif
+ l = 1;
+ if (modifiers != 0 && last_dash[l + off] == '>')
+ key = PTR2CHAR(last_dash + off);
+--- 2900,2908 ----
+***************
+*** 3028,3037 ****
+ if (!(modifiers & MOD_MASK_CMD))
+ #endif
+ if ((modifiers & MOD_MASK_ALT) && key < 0x80
+! #ifdef FEAT_MBYTE
+! && !enc_dbcs /* avoid creating a lead byte */
+! #endif
+! )
+ {
+ key |= 0x80;
+ modifiers &= ~MOD_MASK_ALT; /* remove the META modifier */
+--- 2991,2997 ----
+ if (!(modifiers & MOD_MASK_CMD))
+ #endif
+ if ((modifiers & MOD_MASK_ALT) && key < 0x80
+! && !enc_dbcs) // avoid creating a lead byte
+ {
+ key |= 0x80;
+ modifiers &= ~MOD_MASK_ALT; /* remove the META modifier */
+***************
+*** 3377,3383 ****
+ return State;
+ }
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Return TRUE if "p" points to just after a path separator.
+ * Takes care of multi-byte characters.
+--- 3337,3342 ----
+***************
+*** 3389,3395 ****
+ return p > b && vim_ispathsep(p[-1])
+ && (!has_mbyte || (*mb_head_off)(b, p - 1) == 0);
+ }
+- #endif
+
+ /*
+ * Return TRUE if file names "f1" and "f2" are in the same directory.
+--- 3348,3353 ----
+***************
+*** 6376,6383 ****
+
+ #endif
+
+! #if (defined(FEAT_MBYTE) && defined(FEAT_QUICKFIX)) \
+! || defined(FEAT_SPELL) || defined(PROTO)
+ /*
+ * Return TRUE if string "s" contains a non-ASCII character (128 or higher).
+ * When "s" is NULL FALSE is returned.
+--- 6334,6340 ----
+
+ #endif
+
+! #if defined(FEAT_QUICKFIX) || defined(FEAT_SPELL) || defined(PROTO)
+ /*
+ * Return TRUE if string "s" contains a non-ASCII character (128 or higher).
+ * When "s" is NULL FALSE is returned.
+*** ../vim-8.1.0805/src/move.c 2019-01-11 11:55:12.930066044 +0100
+--- src/move.c 2019-01-24 15:31:26.516482525 +0100
+***************
+*** 934,940 ****
+ }
+
+ /*
+! * compute curwin->w_wcol and curwin->w_virtcol.
+ * Also updates curwin->w_wrow and curwin->w_cline_row.
+ * Also updates curwin->w_leftcol.
+ */
+--- 934,940 ----
+ }
+
+ /*
+! * Compute curwin->w_wcol and curwin->w_virtcol.
+ * Also updates curwin->w_wrow and curwin->w_cline_row.
+ * Also updates curwin->w_leftcol.
+ */
+***************
+*** 2845,2855 ****
+ validate_cursor();
+ # endif
+ restart_edit = restart_edit_save;
+- # ifdef FEAT_MBYTE
+ /* Correct cursor for multi-byte character. */
+ if (has_mbyte)
+ mb_adjust_cursor();
+- # endif
+ redraw_later(VALID);
+
+ /* Only scroll when 'scrollbind' hasn't done this. */
+--- 2845,2853 ----
+*** ../vim-8.1.0805/src/normal.c 2019-01-19 17:43:03.421449119 +0100
+--- src/normal.c 2019-01-24 15:41:20.432534170 +0100
+***************
+*** 477,487 ****
+ int top, bot;
+ int c;
+
+- #ifdef FEAT_MBYTE
+ /* A multi-byte character is never a command. */
+ if (cmdchar >= 0x100)
+ return -1;
+- #endif
+
+ /* We use the absolute value of the character. Special keys have a
+ * negative value, but are sorted on their absolute value. */
+--- 477,485 ----
+***************
+*** 1036,1042 ****
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ /* When getting a text character and the next character is a
+ * multi-byte character, it could be a composing character.
+ * However, don't wait for it to arrive. Also, do enable mapping,
+--- 1034,1039 ----
+***************
+*** 1058,1064 ****
+ ca.ncharC2 = c;
+ }
+ ++no_mapping;
+- #endif
+ }
+ --no_mapping;
+ --allow_keys;
+--- 1055,1060 ----
+***************
+*** 1255,1264 ****
+ checkpcmark(); /* check if we moved since setting pcmark */
+ vim_free(ca.searchbuf);
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ mb_adjust_cursor();
+- #endif
+
+ if (curwin->w_p_scb && toplevel)
+ {
+--- 1251,1258 ----
+***************
+*** 1745,1751 ****
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ /* Include the trailing byte of a multi-byte char. */
+ if (has_mbyte && oap->inclusive)
+ {
+--- 1739,1744 ----
+***************
+*** 1755,1761 ****
+ if (l > 1)
+ oap->end.col += l - 1;
+ }
+- #endif
+ curwin->w_set_curswant = TRUE;
+
+ /*
+--- 1748,1753 ----
+***************
+*** 3133,3144 ****
+ {
+ find_start_of_word(&VIsual);
+ if (*p_sel == 'e' && *ml_get_cursor() != NUL)
+- #ifdef FEAT_MBYTE
+ curwin->w_cursor.col +=
+ (*mb_ptr2len)(ml_get_cursor());
+- #else
+- ++curwin->w_cursor.col;
+- #endif
+ find_end_of_word(&curwin->w_cursor);
+ }
+ }
+--- 3125,3132 ----
+***************
+*** 3180,3188 ****
+ while (pos->col > 0)
+ {
+ col = pos->col - 1;
+- #ifdef FEAT_MBYTE
+ col -= (*mb_head_off)(line, line + col);
+- #endif
+ if (get_mouse_class(line + col) != cclass)
+ break;
+ pos->col = col;
+--- 3168,3174 ----
+***************
+*** 3204,3221 ****
+ if (*p_sel == 'e' && pos->col > 0)
+ {
+ --pos->col;
+- #ifdef FEAT_MBYTE
+ pos->col -= (*mb_head_off)(line, line + pos->col);
+- #endif
+ }
+ cclass = get_mouse_class(line + pos->col);
+ while (line[pos->col] != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ col = pos->col + (*mb_ptr2len)(line + pos->col);
+- #else
+- col = pos->col + 1;
+- #endif
+ if (get_mouse_class(line + col) != cclass)
+ {
+ if (*p_sel == 'e')
+--- 3190,3201 ----
+***************
+*** 3238,3247 ****
+ {
+ int c;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && MB_BYTE2LEN(p[0]) > 1)
+ return mb_get_class(p);
+- #endif
+
+ c = *p;
+ if (c == ' ' || c == '\t')
+--- 3218,3225 ----
+***************
+*** 3431,3441 ****
+ char_u *ptr;
+ int col = 0; /* init to shut up GCC */
+ int i;
+- #ifdef FEAT_MBYTE
+ int this_class = 0;
+ int prev_class;
+ int prevcol;
+- #endif
+ int bn = 0; /* bracket nesting */
+
+ /*
+--- 3409,3417 ----
+***************
+*** 3449,3455 ****
+ * 1. skip to start of identifier/string
+ */
+ col = startcol;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ while (ptr[col] != NUL)
+--- 3425,3430 ----
+***************
+*** 3464,3470 ****
+ }
+ }
+ else
+- #endif
+ while (ptr[col] != NUL
+ && (i == 0 ? !vim_iswordc(ptr[col]) : VIM_ISWHITE(ptr[col]))
+ && (!(find_type & FIND_EVAL) || ptr[col] != ']')
+--- 3439,3444 ----
+***************
+*** 3477,3483 ****
+ /*
+ * 2. Back up to start of identifier/string.
+ */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* Remember class of character under cursor. */
+--- 3451,3456 ----
+***************
+*** 3510,3516 ****
+ break;
+ }
+ else
+- #endif
+ {
+ while (col > 0
+ && ((i == 0
+--- 3483,3488 ----
+***************
+*** 3532,3542 ****
+ }
+ }
+
+! if (ptr[col] == NUL || (i == 0 && (
+! #ifdef FEAT_MBYTE
+! has_mbyte ? this_class != 2 :
+! #endif
+! !vim_iswordc(ptr[col]))))
+ {
+ /*
+ * didn't find an identifier or string
+--- 3504,3511 ----
+ }
+ }
+
+! if (ptr[col] == NUL || (i == 0
+! && (has_mbyte ? this_class != 2 : !vim_iswordc(ptr[col]))))
+ {
+ /*
+ * didn't find an identifier or string
+***************
+*** 3556,3562 ****
+ bn = 0;
+ startcol -= col;
+ col = 0;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* Search for point of changing multibyte character class. */
+--- 3525,3530 ----
+***************
+*** 3571,3577 ****
+ col += (*mb_ptr2len)(ptr + col);
+ }
+ else
+- #endif
+ while ((i == 0 ? vim_iswordc(ptr[col])
+ : (ptr[col] != NUL && !VIM_ISWHITE(ptr[col])))
+ || ((find_type & FIND_EVAL)
+--- 3539,3544 ----
+***************
+*** 3787,3797 ****
+ }
+ while ((*p_sel != 'e') ? s <= e : s < e)
+ {
+- # ifdef FEAT_MBYTE
+ l = (*mb_ptr2len)(s);
+- # else
+- l = (*s == NUL) ? 0 : 1;
+- # endif
+ if (l == 0)
+ {
+ ++bytes;
+--- 3754,3760 ----
+***************
+*** 4558,4564 ****
+ else
+ coladvance(curwin->w_curswant);
+
+- #if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
+ if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
+ {
+ colnr_T virtcol;
+--- 4521,4526 ----
+***************
+*** 4570,4579 ****
+ */
+ validate_virtcol();
+ virtcol = curwin->w_virtcol;
+! # if defined(FEAT_LINEBREAK)
+ if (virtcol > (colnr_T)width1 && *p_sbr != NUL)
+ virtcol -= vim_strsize(p_sbr);
+! # endif
+
+ if (virtcol > curwin->w_curswant
+ && (curwin->w_curswant < (colnr_T)width1
+--- 4532,4541 ----
+ */
+ validate_virtcol();
+ virtcol = curwin->w_virtcol;
+! #if defined(FEAT_LINEBREAK)
+ if (virtcol > (colnr_T)width1 && *p_sbr != NUL)
+ virtcol -= vim_strsize(p_sbr);
+! #endif
+
+ if (virtcol > curwin->w_curswant
+ && (curwin->w_curswant < (colnr_T)width1
+***************
+*** 4582,4588 ****
+ > (colnr_T)width2 / 2)))
+ --curwin->w_cursor.col;
+ }
+- #endif
+
+ if (atend)
+ curwin->w_curswant = MAXCOL; /* stick in the last column */
+--- 4544,4549 ----
+***************
+*** 5768,5774 ****
+ /* put a backslash before \ and some others */
+ if (vim_strchr(aux_ptr, *ptr) != NULL)
+ *p++ = '\\';
+- #ifdef FEAT_MBYTE
+ /* When current byte is a part of multibyte character, copy all
+ * bytes of that character. */
+ if (has_mbyte)
+--- 5729,5734 ----
+***************
+*** 5779,5785 ****
+ for (i = 0; i < len && n >= 1; ++i, --n)
+ *p++ = *ptr++;
+ }
+- #endif
+ *p++ = *ptr++;
+ }
+ *p = NUL;
+--- 5739,5744 ----
+***************
+*** 5790,5800 ****
+ */
+ if (cmdchar == '*' || cmdchar == '#')
+ {
+! if (!g_cmd && (
+! #ifdef FEAT_MBYTE
+! has_mbyte ? vim_iswordp(mb_prevptr(ml_get_curline(), ptr)) :
+! #endif
+! vim_iswordc(ptr[-1])))
+ STRCAT(buf, "\\>");
+ #ifdef FEAT_CMDHIST
+ /* put pattern in search history */
+--- 5749,5757 ----
+ */
+ if (cmdchar == '*' || cmdchar == '#')
+ {
+! if (!g_cmd && (has_mbyte
+! ? vim_iswordp(mb_prevptr(ml_get_curline(), ptr))
+! : vim_iswordc(ptr[-1])))
+ STRCAT(buf, "\\>");
+ #ifdef FEAT_CMDHIST
+ /* put pattern in search history */
+***************
+*** 5844,5854 ****
+ *pp = ml_get_pos(&VIsual);
+ *lenp = curwin->w_cursor.col - VIsual.col + 1;
+ }
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ /* Correct the length to include the whole last character. */
+ *lenp += (*mb_ptr2len)(*pp + (*lenp - 1)) - 1;
+- #endif
+ }
+ reset_VIsual_and_resel();
+ return OK;
+--- 5801,5809 ----
+***************
+*** 6058,6069 ****
+ else
+ #endif
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ curwin->w_cursor.col +=
+ (*mb_ptr2len)(ml_get_cursor());
+ else
+- #endif
+ ++curwin->w_cursor.col;
+ }
+ }
+--- 6013,6022 ----
+***************
+*** 6129,6139 ****
+
+ if (*cp != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ curwin->w_cursor.col += (*mb_ptr2len)(cp);
+ else
+- #endif
+ ++curwin->w_cursor.col;
+ }
+ cap->retval |= CA_NO_ADJ_OP_END;
+--- 6082,6090 ----
+***************
+*** 7060,7069 ****
+ /* Abort if not enough characters to replace. */
+ ptr = ml_get_cursor();
+ if (STRLEN(ptr) < (unsigned)cap->count1
+! #ifdef FEAT_MBYTE
+! || (has_mbyte && mb_charlen(ptr) < cap->count1)
+! #endif
+! )
+ {
+ clearopbeep(cap->oap);
+ return;
+--- 7011,7017 ----
+ /* Abort if not enough characters to replace. */
+ ptr = ml_get_cursor();
+ if (STRLEN(ptr) < (unsigned)cap->count1
+! || (has_mbyte && mb_charlen(ptr) < cap->count1))
+ {
+ clearopbeep(cap->oap);
+ return;
+***************
+*** 7098,7108 ****
+ * autoindent. The insert command depends on being on the last
+ * character of a line or not.
+ */
+- #ifdef FEAT_MBYTE
+ (void)del_chars(cap->count1, FALSE); /* delete the characters */
+- #else
+- (void)del_bytes(cap->count1, FALSE, FALSE); /* delete the characters */
+- #endif
+ stuffcharReadbuff('\r');
+ stuffcharReadbuff(ESC);
+
+--- 7046,7052 ----
+***************
+*** 7115,7121 ****
+ NUL, 'r', NUL, had_ctrl_v, cap->nchar);
+
+ curbuf->b_op_start = curwin->w_cursor;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int old_State = State;
+--- 7059,7064 ----
+***************
+*** 7151,7157 ****
+ }
+ }
+ else
+- #endif
+ {
+ /*
+ * Replace the characters within one line.
+--- 7094,7099 ----
+***************
+*** 7194,7205 ****
+ (colnr_T)(curwin->w_cursor.col - cap->count1));
+ }
+ --curwin->w_cursor.col; /* cursor on the last replaced char */
+- #ifdef FEAT_MBYTE
+ /* if the character on the left of the current cursor is a multi-byte
+ * character, move two characters left */
+ if (has_mbyte)
+ mb_adjust_cursor();
+- #endif
+ curbuf->b_op_end = curwin->w_cursor;
+ curwin->w_set_curswant = TRUE;
+ set_last_insert(cap->nchar);
+--- 7136,7145 ----
+***************
+*** 8202,8208 ****
+ validate_virtcol();
+ curwin->w_curswant = curwin->w_virtcol;
+ curwin->w_set_curswant = FALSE;
+- #if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
+ if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
+ {
+ /*
+--- 8142,8147 ----
+***************
+*** 8213,8219 ****
+ if (curwin->w_virtcol > (colnr_T)i)
+ --curwin->w_cursor.col;
+ }
+- #endif
+ }
+ else if (nv_screengo(oap, FORWARD, cap->count1 - 1) == FAIL)
+ clearopbeep(oap);
+--- 8152,8157 ----
+***************
+*** 8328,8334 ****
+ do_ascii(NULL);
+ break;
+
+- #ifdef FEAT_MBYTE
+ /*
+ * "g8": Display the bytes used for the UTF-8 character under the
+ * cursor. It is displayed in hex.
+--- 8266,8271 ----
+***************
+*** 8340,8346 ****
+ else
+ show_utf8();
+ break;
+- #endif
+
+ /* "g<": show scrollback text */
+ case '<':
+--- 8277,8282 ----
+***************
+*** 8843,8853 ****
+ )
+ {
+ --curwin->w_cursor.col;
+- #ifdef FEAT_MBYTE
+ /* prevent cursor from moving on the trail byte */
+ if (has_mbyte)
+ mb_adjust_cursor();
+- #endif
+ oap->inclusive = TRUE;
+ }
+ }
+--- 8779,8787 ----
+***************
+*** 8879,8889 ****
+ if (VIsual_active && cap->oap->inclusive && *p_sel == 'e'
+ && gchar_cursor() != NUL && LT_POS(VIsual, curwin->w_cursor))
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ inc_cursor();
+ else
+- #endif
+ ++curwin->w_cursor.col;
+ cap->oap->inclusive = FALSE;
+ }
+--- 8813,8821 ----
+***************
+*** 8913,8921 ****
+ if (pp->col > 0)
+ {
+ --pp->col;
+- #ifdef FEAT_MBYTE
+ mb_adjustpos(curbuf, pp);
+- #endif
+ }
+ else if (pp->lnum > 1)
+ {
+--- 8845,8851 ----
+***************
+*** 9646,9656 ****
+
+ oap->block_mode = TRUE;
+
+- #ifdef FEAT_MBYTE
+ /* prevent from moving onto a trail byte */
+ if (has_mbyte)
+ mb_adjustpos(curwin->w_buffer, &oap->end);
+- #endif
+
+ getvvcol(curwin, &(oap->start), &oap->start_vcol, NULL, &oap->end_vcol);
+
+--- 9576,9584 ----
+*** ../vim-8.1.0805/src/ops.c 2019-01-20 15:30:36.889328720 +0100
+--- src/ops.c 2019-01-24 15:44:26.003148115 +0100
+***************
+*** 97,105 ****
+ static int put_in_typebuf(char_u *s, int esc, int colon,
+ int silent);
+ static void stuffescaped(char_u *arg, int literally);
+- #ifdef FEAT_MBYTE
+ static void mb_adjust_opend(oparg_T *oap);
+- #endif
+ static void free_yank_all(void);
+ static int yank_copy_line(struct block_def *bd, long y_idx);
+ #ifdef FEAT_CLIPBOARD
+--- 97,103 ----
+***************
+*** 421,427 ****
+ ws_vcol = bd.start_vcol - bd.pre_whitesp;
+ if (bd.startspaces)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ if ((*mb_ptr2len)(bd.textstart) == 1)
+--- 419,424 ----
+***************
+*** 433,439 ****
+ }
+ }
+ else
+- #endif
+ ++bd.textstart;
+ }
+ for ( ; VIM_ISWHITE(*bd.textstart); )
+--- 430,435 ----
+***************
+*** 632,638 ****
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && spaces > 0)
+ {
+ int off;
+--- 628,633 ----
+***************
+*** 650,656 ****
+ spaces -= off;
+ count -= off;
+ }
+- #endif
+
+ newp = alloc_check((unsigned)(STRLEN(oldp)) + s_len + count + 1);
+ if (newp == NULL)
+--- 645,650 ----
+***************
+*** 1491,1501 ****
+ /* stuff a single special character */
+ if (*arg != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_cptr2char_adv(&arg);
+ else
+- #endif
+ c = *arg++;
+ if (literally && ((c < ' ' && c != TAB) || c == DEL))
+ stuffcharReadbuff(Ctrl_V);
+--- 1485,1493 ----
+***************
+*** 1774,1783 ****
+ adjust_clip_reg(&oap->regname);
+ #endif
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ mb_adjust_opend(oap);
+- #endif
+
+ /*
+ * Imitate the strange Vi behaviour: If the delete spans more than one
+--- 1766,1773 ----
+***************
+*** 2109,2115 ****
+ return OK;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Adjust end of operating area for ending on a multi-byte character.
+ * Used for deletion.
+--- 2099,2104 ----
+***************
+*** 2125,2134 ****
+ oap->end.col += mb_tail_off(p, p + oap->end.col);
+ }
+ }
+- #endif
+
+-
+- #ifdef FEAT_MBYTE
+ /*
+ * Replace the character under the cursor with "c".
+ * This takes care of multi-byte characters.
+--- 2114,2120 ----
+***************
+*** 2144,2150 ****
+ /* Backup to the replaced character. */
+ dec_cursor();
+ }
+- #endif
+
+ /*
+ * Replace a whole area with one character.
+--- 2130,2135 ----
+***************
+*** 2153,2161 ****
+ op_replace(oparg_T *oap, int c)
+ {
+ int n, numc;
+- #ifdef FEAT_MBYTE
+ int num_chars;
+- #endif
+ char_u *newp, *oldp;
+ size_t oldlen;
+ struct block_def bd;
+--- 2138,2144 ----
+***************
+*** 2176,2185 ****
+ c = NL;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ mb_adjust_opend(oap);
+- #endif
+
+ if (u_save((linenr_T)(oap->start.lnum - 1),
+ (linenr_T)(oap->end.lnum + 1)) == FAIL)
+--- 2159,2166 ----
+***************
+*** 2230,2236 ****
+ if (bd.is_short && (!virtual_op || bd.is_MAX))
+ numc -= (oap->end_vcol - bd.end_vcol) + 1;
+
+- #ifdef FEAT_MBYTE
+ /* A double-wide character can be replaced only up to half the
+ * times. */
+ if ((*mb_char2cells)(c) > 1)
+--- 2211,2216 ----
+***************
+*** 2246,2252 ****
+ /* Compute bytes needed, move character count to num_chars. */
+ num_chars = numc;
+ numc *= (*mb_char2len)(c);
+- #endif
+ /* oldlen includes textlen, so don't double count */
+ n += numc - bd.textlen;
+
+--- 2226,2231 ----
+***************
+*** 2266,2272 ****
+ * literally. */
+ if (had_ctrl_v_cr || (c != '\r' && c != '\n'))
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ n = (int)STRLEN(newp);
+--- 2245,2250 ----
+***************
+*** 2274,2280 ****
+ n += (*mb_char2bytes)(c, newp + n);
+ }
+ else
+- #endif
+ vim_memset(newp + STRLEN(newp), c, (size_t)numc);
+ if (!bd.is_short)
+ {
+--- 2252,2257 ----
+***************
+*** 2324,2330 ****
+ n = gchar_cursor();
+ if (n != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if ((*mb_char2len)(c) > 1 || (*mb_char2len)(n) > 1)
+ {
+ /* This is slow, but it handles replacing a single-byte
+--- 2301,2306 ----
+***************
+*** 2334,2340 ****
+ replace_character(c);
+ }
+ else
+- #endif
+ {
+ #ifdef FEAT_VIRTUALEDIT
+ if (n == TAB)
+--- 2310,2315 ----
+***************
+*** 2372,2382 ****
+ curwin->w_cursor.col -= (virtcols + 1);
+ for (; virtcols >= 0; virtcols--)
+ {
+- # ifdef FEAT_MBYTE
+ if ((*mb_char2len)(c) > 1)
+ replace_character(c);
+ else
+- # endif
+ PBYTE(curwin->w_cursor, c);
+ if (inc(&curwin->w_cursor) == -1)
+ break;
+--- 2347,2355 ----
+***************
+*** 2530,2536 ****
+
+ for (todo = length; todo > 0; --todo)
+ {
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int len = (*mb_ptr2len)(ml_get_pos(pos));
+--- 2503,2508 ----
+***************
+*** 2539,2545 ****
+ if (len > 0)
+ todo -= len - 1;
+ }
+- # endif
+ did_change |= swapchar(op_type, pos);
+ if (inc(pos) == -1) /* at end of file */
+ break;
+--- 2511,2516 ----
+***************
+*** 2566,2572 ****
+ if (c >= 0x80 && op_type == OP_ROT13)
+ return FALSE;
+
+- #ifdef FEAT_MBYTE
+ if (op_type == OP_UPPER && c == 0xdf
+ && (enc_latin1like || STRCMP(p_enc, "iso-8859-2") == 0))
+ {
+--- 2537,2542 ----
+***************
+*** 2583,2589 ****
+
+ if (enc_dbcs != 0 && c >= 0x100) /* No lower/uppercase letter */
+ return FALSE;
+- #endif
+ nc = c;
+ if (MB_ISLOWER(c))
+ {
+--- 2553,2558 ----
+***************
+*** 2601,2607 ****
+ }
+ if (nc != c)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && (c >= 0x80 || nc >= 0x80))
+ {
+ pos_T sp = curwin->w_cursor;
+--- 2570,2575 ----
+***************
+*** 2613,2619 ****
+ curwin->w_cursor = sp;
+ }
+ else
+- #endif
+ PBYTE(*pos, nc);
+ return TRUE;
+ }
+--- 2581,2586 ----
+***************
+*** 3216,3228 ****
+ {
+ getvcol(curwin, &oap->end, &cs, NULL, &ce);
+ if (p[endcol] == NUL || (cs + oap->end.coladd < ce
+- # ifdef FEAT_MBYTE
+ /* Don't add space for double-wide
+ * char; endcol will be on last byte
+ * of multi-byte char. */
+! && (*mb_head_off)(p, p + endcol) == 0
+! # endif
+! ))
+ {
+ if (oap->start.lnum == oap->end.lnum
+ && oap->start.col == oap->end.col)
+--- 3183,3192 ----
+ {
+ getvcol(curwin, &oap->end, &cs, NULL, &ce);
+ if (p[endcol] == NUL || (cs + oap->end.coladd < ce
+ /* Don't add space for double-wide
+ * char; endcol will be on last byte
+ * of multi-byte char. */
+! && (*mb_head_off)(p, p + endcol) == 0))
+ {
+ if (oap->start.lnum == oap->end.lnum
+ && oap->start.col == oap->end.col)
+***************
+*** 3745,3756 ****
+ #endif
+ getvcol(curwin, &curwin->w_cursor, NULL, NULL, &col);
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ /* move to start of next multi-byte character */
+ curwin->w_cursor.col += (*mb_ptr2len)(ml_get_cursor());
+ else
+- #endif
+ #ifdef FEAT_VIRTUALEDIT
+ if (c != TAB || ve_flags != VE_ALL)
+ #endif
+--- 3709,3718 ----
+***************
+*** 3820,3829 ****
+ bd.startspaces = incr - bd.endspaces;
+ --bd.textcol;
+ delcount = 1;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ bd.textcol -= (*mb_head_off)(oldp, oldp + bd.textcol);
+- #endif
+ if (oldp[bd.textcol] != TAB)
+ {
+ /* Only a Tab can be split into spaces. Other
+--- 3782,3789 ----
+***************
+*** 3919,3925 ****
+ * char */
+ if (dir == FORWARD && gchar_cursor() != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int bytelen = (*mb_ptr2len)(ml_get_cursor());
+--- 3879,3884 ----
+***************
+*** 3933,3939 ****
+ }
+ }
+ else
+- #endif
+ {
+ ++col;
+ if (yanklen)
+--- 3892,3897 ----
+***************
+*** 4279,4289 ****
+ int name;
+ int attr;
+ char_u *arg = eap->arg;
+- #ifdef FEAT_MBYTE
+ int clen;
+- #else
+- # define clen 1
+- #endif
+
+ if (arg != NULL && *arg == NUL)
+ arg = NULL;
+--- 4237,4243 ----
+***************
+*** 4344,4356 ****
+ }
+ for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0; ++p)
+ {
+- #ifdef FEAT_MBYTE
+ clen = (*mb_ptr2len)(p);
+- #endif
+ msg_outtrans_len(p, clen);
+- #ifdef FEAT_MBYTE
+ p += clen - 1;
+- #endif
+ }
+ }
+ if (n > 1 && yb->y_type == MLINE)
+--- 4298,4306 ----
+***************
+*** 4438,4460 ****
+ int skip_esc) /* if TRUE, ignore trailing ESC */
+ {
+ int n;
+- #ifdef FEAT_MBYTE
+ int l;
+- #endif
+
+ n = (int)Columns - 6;
+ while (*p != NUL
+ && !(*p == ESC && skip_esc && *(p + 1) == NUL)
+ && (n -= ptr2cells(p)) >= 0)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
+ {
+ msg_outtrans_len(p, l);
+ p += l;
+ }
+ else
+- #endif
+ msg_outtrans_len(p++, 1);
+ }
+ ui_breakcheck();
+--- 4388,4406 ----
+***************
+*** 4631,4642 ****
+ {
+ curr = skipwhite(curr);
+ if (*curr != ')' && currsize != 0 && endcurr1 != TAB
+- #ifdef FEAT_MBYTE
+ && (!has_format_option(FO_MBYTE_JOIN)
+ || (mb_ptr2char(curr) < 0x100 && endcurr1 < 0x100))
+ && (!has_format_option(FO_MBYTE_JOIN2)
+ || mb_ptr2char(curr) < 0x100 || endcurr1 < 0x100)
+- #endif
+ )
+ {
+ /* don't add a space if the line is ending in a space */
+--- 4577,4586 ----
+***************
+*** 4657,4663 ****
+ endcurr1 = endcurr2 = NUL;
+ if (insert_space && currsize > 0)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ cend = curr + currsize;
+--- 4601,4606 ----
+***************
+*** 4670,4676 ****
+ }
+ }
+ else
+- #endif
+ {
+ endcurr1 = *(curr + currsize - 1);
+ if (currsize > 1)
+--- 4613,4618 ----
+***************
+*** 5715,5734 ****
+ while (col > 0 && vim_isbdigit(ptr[col]))
+ {
+ --col;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ col -= (*mb_head_off)(ptr, ptr + col);
+- #endif
+ }
+
+ if (dohex)
+ while (col > 0 && vim_isxdigit(ptr[col]))
+ {
+ --col;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ col -= (*mb_head_off)(ptr, ptr + col);
+- #endif
+ }
+
+ if ( dobin
+--- 5657,5672 ----
+***************
+*** 5737,5746 ****
+ && (ptr[col] == 'X'
+ || ptr[col] == 'x')
+ && ptr[col - 1] == '0'
+- #ifdef FEAT_MBYTE
+ && (!has_mbyte ||
+ !(*mb_head_off)(ptr, ptr + col - 1))
+- #endif
+ && vim_isxdigit(ptr[col + 1]))))
+ {
+
+--- 5675,5682 ----
+***************
+*** 5751,5760 ****
+ while (col > 0 && vim_isdigit(ptr[col]))
+ {
+ col--;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ col -= (*mb_head_off)(ptr, ptr + col);
+- #endif
+ }
+ }
+
+--- 5687,5694 ----
+***************
+*** 5763,5790 ****
+ && (ptr[col] == 'X'
+ || ptr[col] == 'x')
+ && ptr[col - 1] == '0'
+- #ifdef FEAT_MBYTE
+ && (!has_mbyte ||
+ !(*mb_head_off)(ptr, ptr + col - 1))
+- #endif
+ && vim_isxdigit(ptr[col + 1])) ||
+ ( dobin
+ && col > 0
+ && (ptr[col] == 'B'
+ || ptr[col] == 'b')
+ && ptr[col - 1] == '0'
+- #ifdef FEAT_MBYTE
+ && (!has_mbyte ||
+ !(*mb_head_off)(ptr, ptr + col - 1))
+- #endif
+ && vim_isbdigit(ptr[col + 1])))
+ {
+ /* Found hexadecimal or binary number, move to its start. */
+ --col;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ col -= (*mb_head_off)(ptr, ptr + col);
+- #endif
+ }
+ else
+ {
+--- 5697,5718 ----
+***************
+*** 5803,5812 ****
+ && !(doalp && ASCII_ISALPHA(ptr[col])))
+ {
+ --col;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ col -= (*mb_head_off)(ptr, ptr + col);
+- #endif
+ }
+ }
+ }
+--- 5731,5738 ----
+***************
+*** 5827,5837 ****
+ goto theend;
+
+ if (col > pos->col && ptr[col - 1] == '-'
+! #ifdef FEAT_MBYTE
+! && (!has_mbyte ||
+! !(*mb_head_off)(ptr, ptr + col - 1))
+! #endif
+! )
+ {
+ negative = TRUE;
+ was_positive = FALSE;
+--- 5753,5759 ----
+ goto theend;
+
+ if (col > pos->col && ptr[col - 1] == '-'
+! && (!has_mbyte || !(*mb_head_off)(ptr, ptr + col - 1)))
+ {
+ negative = TRUE;
+ was_positive = FALSE;
+***************
+*** 5895,5904 ****
+ else
+ {
+ if (col > 0 && ptr[col - 1] == '-'
+- #ifdef FEAT_MBYTE
+ && (!has_mbyte ||
+ !(*mb_head_off)(ptr, ptr + col - 1))
+- #endif
+ && !visual)
+ {
+ /* negative number */
+--- 5817,5824 ----
+***************
+*** 6539,6545 ****
+ if (dpy != NULL && str != NULL && motion_type >= 0
+ && len < 1024*1024 && len > 0)
+ {
+- #ifdef FEAT_MBYTE
+ int ok = TRUE;
+
+ /* The CUT_BUFFER0 is supposed to always contain latin1. Convert from
+--- 6459,6464 ----
+***************
+*** 6579,6585 ****
+ /* Do not store the string if conversion failed. Better to use any
+ * other selection than garbled text. */
+ if (ok)
+- #endif
+ {
+ XStoreBuffer(dpy, (char *)str, (int)len, 0);
+ XFlush(dpy);
+--- 6498,6503 ----
+***************
+*** 7349,7359 ****
+ else if (!vim_isspace(line[i]))
+ is_word = 1;
+ ++chars;
+- #ifdef FEAT_MBYTE
+ i += (*mb_ptr2len)(line + i);
+- #else
+- ++i;
+- #endif
+ }
+
+ if (is_word)
+--- 7267,7273 ----
+***************
+*** 7384,7392 ****
+ char_u buf2[40];
+ linenr_T lnum;
+ varnumber_T byte_count = 0;
+- #ifdef FEAT_MBYTE
+ varnumber_T bom_count = 0;
+- #endif
+ varnumber_T byte_count_cursor = 0;
+ varnumber_T char_count = 0;
+ varnumber_T char_count_cursor = 0;
+--- 7298,7304 ----
+***************
+*** 7609,7620 ****
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ bom_count = bomb_size();
+ if (bom_count > 0)
+ vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE,
+! _("(+%lld for BOM)"), (long_long_T)bom_count);
+! #endif
+ if (dict == NULL)
+ {
+ /* Don't shorten this message, the user asked for it. */
+--- 7521,7530 ----
+ }
+ }
+
+ bom_count = bomb_size();
+ if (bom_count > 0)
+ vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE,
+! _("(+%lld for BOM)"), (long_long_T)bom_count);
+ if (dict == NULL)
+ {
+ /* Don't shorten this message, the user asked for it. */
+***************
+*** 7629,7639 ****
+ {
+ dict_add_number(dict, "words", word_count);
+ dict_add_number(dict, "chars", char_count);
+! dict_add_number(dict, "bytes", byte_count
+! # ifdef FEAT_MBYTE
+! + bom_count
+! # endif
+! );
+ dict_add_number(dict, VIsual_active ? "visual_bytes" : "cursor_bytes",
+ byte_count_cursor);
+ dict_add_number(dict, VIsual_active ? "visual_chars" : "cursor_chars",
+--- 7539,7545 ----
+ {
+ dict_add_number(dict, "words", word_count);
+ dict_add_number(dict, "chars", char_count);
+! dict_add_number(dict, "bytes", byte_count + bom_count);
+ dict_add_number(dict, VIsual_active ? "visual_bytes" : "cursor_bytes",
+ byte_count_cursor);
+ dict_add_number(dict, VIsual_active ? "visual_chars" : "cursor_chars",
+*** ../vim-8.1.0805/src/option.c 2019-01-20 15:30:36.889328720 +0100
+--- src/option.c 2019-01-24 15:50:26.424493073 +0100
+***************
+*** 66,74 ****
+ #endif
+ #define PV_BIN OPT_BUF(BV_BIN)
+ #define PV_BL OPT_BUF(BV_BL)
+! #ifdef FEAT_MBYTE
+! # define PV_BOMB OPT_BUF(BV_BOMB)
+! #endif
+ #define PV_CI OPT_BUF(BV_CI)
+ #ifdef FEAT_CINDENT
+ # define PV_CIN OPT_BUF(BV_CIN)
+--- 66,72 ----
+ #endif
+ #define PV_BIN OPT_BUF(BV_BIN)
+ #define PV_BL OPT_BUF(BV_BL)
+! #define PV_BOMB OPT_BUF(BV_BOMB)
+ #define PV_CI OPT_BUF(BV_CI)
+ #ifdef FEAT_CINDENT
+ # define PV_CIN OPT_BUF(BV_CIN)
+***************
+*** 101,109 ****
+ #define PV_FIXEOL OPT_BUF(BV_FIXEOL)
+ #define PV_EP OPT_BOTH(OPT_BUF(BV_EP))
+ #define PV_ET OPT_BUF(BV_ET)
+! #ifdef FEAT_MBYTE
+! # define PV_FENC OPT_BUF(BV_FENC)
+! #endif
+ #if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
+ # define PV_BEXPR OPT_BOTH(OPT_BUF(BV_BEXPR))
+ #endif
+--- 99,105 ----
+ #define PV_FIXEOL OPT_BUF(BV_FIXEOL)
+ #define PV_EP OPT_BOTH(OPT_BUF(BV_EP))
+ #define PV_ET OPT_BUF(BV_ET)
+! #define PV_FENC OPT_BUF(BV_FENC)
+ #if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
+ # define PV_BEXPR OPT_BOTH(OPT_BUF(BV_BEXPR))
+ #endif
+***************
+*** 137,145 ****
+ # define PV_LISP OPT_BUF(BV_LISP)
+ # define PV_LW OPT_BOTH(OPT_BUF(BV_LW))
+ #endif
+! #ifdef FEAT_MBYTE
+! # define PV_MENC OPT_BOTH(OPT_BUF(BV_MENC))
+! #endif
+ #define PV_MA OPT_BUF(BV_MA)
+ #define PV_ML OPT_BUF(BV_ML)
+ #define PV_MOD OPT_BUF(BV_MOD)
+--- 133,139 ----
+ # define PV_LISP OPT_BUF(BV_LISP)
+ # define PV_LW OPT_BOTH(OPT_BUF(BV_LW))
+ #endif
+! #define PV_MENC OPT_BOTH(OPT_BUF(BV_MENC))
+ #define PV_MA OPT_BUF(BV_MA)
+ #define PV_ML OPT_BUF(BV_ML)
+ #define PV_MOD OPT_BUF(BV_MOD)
+***************
+*** 281,289 ****
+ */
+ static int p_ai;
+ static int p_bin;
+- #ifdef FEAT_MBYTE
+ static int p_bomb;
+- #endif
+ static char_u *p_bh;
+ static char_u *p_bt;
+ static int p_bl;
+--- 275,281 ----
+***************
+*** 312,320 ****
+ static int p_eol;
+ static int p_fixeol;
+ static int p_et;
+- #ifdef FEAT_MBYTE
+ static char_u *p_fenc;
+- #endif
+ static char_u *p_ff;
+ static char_u *p_fo;
+ static char_u *p_flp;
+--- 304,310 ----
+***************
+*** 554,566 ****
+ #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,
+ {(char_u *)"single", (char_u *)0L}
+- #else
+- (char_u *)NULL, PV_NONE,
+- {(char_u *)0L, (char_u *)0L}
+- #endif
+ SCTX_INIT},
+ {"autochdir", "acd", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_AUTOCHDIR
+--- 544,551 ----
+***************
+*** 680,690 ****
+ (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
+--- 665,671 ----
+***************
+*** 736,748 ****
+ {(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,
+ {(char_u *)"internal,keepascii", (char_u *)0L}
+- #else
+- (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
+--- 717,724 ----
+***************
+*** 763,769 ****
+ #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,
+ {(char_u *)"", (char_u *)0L}
+ #else
+--- 739,745 ----
+ #endif
+ SCTX_INIT},
+ {"charconvert", "ccv", P_STRING|P_VI_DEF|P_SECURE,
+! #if defined(FEAT_EVAL)
+ (char_u *)&p_ccv, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #else
+***************
+*** 1016,1026 ****
+ #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
+--- 992,998 ----
+***************
+*** 1077,1098 ****
+ (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,
+ {(char_u *)TRUE, (char_u *)0L}
+- #else
+- (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,
+ {(char_u *)ENC_DFLT, (char_u *)0L}
+- #else
+- (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,
+--- 1049,1060 ----
+***************
+*** 1138,1159 ****
+ {(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
+ (char_u *)&p_fenc, PV_FENC,
+ {(char_u *)"", (char_u *)0L}
+- #else
+- (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,
+ {(char_u *)"ucs-bom", (char_u *)0L}
+- #else
+- (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,
+--- 1100,1111 ----
+***************
+*** 1416,1422 ****
+ #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,
+ {(char_u *)"", (char_u *)0L}
+ #else
+--- 1368,1374 ----
+ #endif
+ SCTX_INIT},
+ {"guifontwide", "gfw", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP,
+! #if defined(FEAT_GUI)
+ (char_u *)&p_guifontwide, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #else
+***************
+*** 1533,1539 ****
+ (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,
+ {(char_u *)"", (char_u *)NULL}
+ # else
+--- 1485,1491 ----
+ (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)
+ (char_u *)&p_imaf, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ # else
+***************
+*** 1549,1566 ****
+ #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,
+- #else
+- (char_u *)NULL, PV_NONE,
+- #endif
+ #ifdef __sgi
+ {(char_u *)TRUE, (char_u *)0L}
+ #else
+--- 1501,1510 ----
+***************
+*** 1576,1582 ****
+ {(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,
+ {(char_u *)"", (char_u *)NULL}
+ #else
+--- 1520,1526 ----
+ {(char_u *)B_IMODE_USE_INSERT, (char_u *)0L}
+ SCTX_INIT},
+ {"imstatusfunc","imsf",P_STRING|P_VI_DEF|P_SECURE,
+! #if defined(FEAT_EVAL)
+ (char_u *)&p_imsf, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ #else
+***************
+*** 1872,1884 ****
+ #endif
+ SCTX_INIT},
+ {"makeencoding","menc", P_STRING|P_VI_DEF,
+- #ifdef FEAT_MBYTE
+ (char_u *)&p_menc, PV_MENC,
+ {(char_u *)"", (char_u *)0L}
+- #else
+- (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
+--- 1816,1823 ----
+***************
+*** 1901,1911 ****
+ (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
+--- 1840,1846 ----
+***************
+*** 2197,2203 ****
+ #endif
+ SCTX_INIT},
+ {"printmbcharset", "pmbcs", P_STRING|P_VI_DEF,
+! #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE)
+ (char_u *)&p_pmcs, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #else
+--- 2132,2138 ----
+ #endif
+ SCTX_INIT},
+ {"printmbcharset", "pmbcs", P_STRING|P_VI_DEF,
+! #if defined(FEAT_POSTSCRIPT)
+ (char_u *)&p_pmcs, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #else
+***************
+*** 2206,2212 ****
+ #endif
+ SCTX_INIT},
+ {"printmbfont", "pmbfn", P_STRING|P_VI_DEF,
+! #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE)
+ (char_u *)&p_pmfn, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #else
+--- 2141,2147 ----
+ #endif
+ SCTX_INIT},
+ {"printmbfont", "pmbfn", P_STRING|P_VI_DEF,
+! #if defined(FEAT_POSTSCRIPT)
+ (char_u *)&p_pmfn, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #else
+***************
+*** 2748,2760 ****
+ #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,
+ {(char_u *)"", (char_u *)0L}
+- #else
+- (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
+--- 2683,2690 ----
+***************
+*** 3238,3246 ****
+
+ #define PARAM_COUNT (sizeof(options) / sizeof(struct vimoption))
+
+- #ifdef FEAT_MBYTE
+ static char *(p_ambw_values[]) = {"single", "double", NULL};
+- #endif
+ static char *(p_bg_values[]) = {"light", "dark", NULL};
+ static char *(p_nf_values[]) = {"bin", "octal", "hex", "alpha", NULL};
+ static char *(p_ff_values[]) = {FF_UNIX, FF_DOS, FF_MAC, NULL};
+--- 3168,3174 ----
+***************
+*** 3643,3649 ****
+
+ didset_options2();
+
+- #ifdef FEAT_MBYTE
+ # if defined(WIN3264) && defined(FEAT_GETTEXT)
+ /*
+ * If $LANG isn't set, try to get a good value for it. This makes the
+--- 3571,3576 ----
+***************
+*** 3727,3733 ****
+ }
+ #endif
+
+! # if defined(WIN3264) && !defined(FEAT_GUI)
+ /* Win32 console: When GetACP() returns a different value from
+ * GetConsoleCP() set 'termencoding'. */
+ if (GetACP() != GetConsoleCP())
+--- 3654,3660 ----
+ }
+ #endif
+
+! #if defined(WIN3264) && !defined(FEAT_GUI)
+ /* Win32 console: When GetACP() returns a different value from
+ * GetConsoleCP() set 'termencoding'. */
+ if (GetACP() != GetConsoleCP())
+***************
+*** 3750,3760 ****
+ else
+ p_tenc = empty_option;
+ }
+! # endif
+! # if defined(WIN3264) && defined(FEAT_MBYTE)
+ /* $HOME may have characters in active code page. */
+ init_homedir();
+! # endif
+ }
+ else
+ {
+--- 3677,3687 ----
+ else
+ p_tenc = empty_option;
+ }
+! #endif
+! #if defined(WIN3264)
+ /* $HOME may have characters in active code page. */
+ init_homedir();
+! #endif
+ }
+ else
+ {
+***************
+*** 3762,3768 ****
+ p_enc = save_enc;
+ }
+ }
+- #endif
+
+ #ifdef FEAT_MULTI_LANG
+ /* Set the default for 'helplang'. */
+--- 3689,3694 ----
+***************
+*** 3859,3877 ****
+
+ for (i = 0; !istermoption(&options[i]); i++)
+ if (!(options[i].flags & P_NODEFAULT)
+- #if defined(FEAT_MBYTE) || defined(FEAT_CRYPT)
+ && (opt_flags == 0
+! || (TRUE
+! # if defined(FEAT_MBYTE)
+! && options[i].var != (char_u *)&p_enc
+! # endif
+ # if defined(FEAT_CRYPT)
+ && options[i].var != (char_u *)&p_cm
+ && options[i].var != (char_u *)&p_key
+ # endif
+! ))
+! #endif
+! )
+ set_option_default(i, opt_flags, p_cp);
+
+ /* The 'scroll' option must be computed for all windows. */
+--- 3785,3797 ----
+
+ for (i = 0; !istermoption(&options[i]); i++)
+ if (!(options[i].flags & P_NODEFAULT)
+ && (opt_flags == 0
+! || (options[i].var != (char_u *)&p_enc
+ # if defined(FEAT_CRYPT)
+ && options[i].var != (char_u *)&p_cm
+ && options[i].var != (char_u *)&p_key
+ # endif
+! )))
+ set_option_default(i, opt_flags, p_cp);
+
+ /* The 'scroll' option must be computed for all windows. */
+***************
+*** 5018,5024 ****
+ #endif
+ )
+ ++arg; /* remove backslash */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte
+ && (i = (*mb_ptr2len)(arg)) > 1)
+ {
+--- 4938,4943 ----
+***************
+*** 5028,5034 ****
+ s += i;
+ }
+ else
+- #endif
+ *s++ = *arg++;
+ }
+ *s = NUL;
+--- 4947,4952 ----
+***************
+*** 5596,5604 ****
+ /* initialize the table for 'iskeyword' et.al. */
+ (void)init_chartab();
+
+- #ifdef FEAT_MBYTE
+ (void)opt_strings_flags(p_cmp, p_cmp_values, &cmp_flags, TRUE);
+- #endif
+ (void)opt_strings_flags(p_bkc, p_bkc_values, &bkc_flags, TRUE);
+ (void)opt_strings_flags(p_bo, p_bo_values, &bo_flags, TRUE);
+ #ifdef FEAT_SESSION
+--- 5514,5520 ----
+***************
+*** 5689,5697 ****
+ {
+ check_string_option(&buf->b_p_bh);
+ check_string_option(&buf->b_p_bt);
+- #ifdef FEAT_MBYTE
+ check_string_option(&buf->b_p_fenc);
+- #endif
+ check_string_option(&buf->b_p_ff);
+ #ifdef FEAT_FIND_ID
+ check_string_option(&buf->b_p_def);
+--- 5605,5611 ----
+***************
+*** 5780,5788 ****
+ check_string_option(&buf->b_p_lw);
+ #endif
+ check_string_option(&buf->b_p_bkc);
+- #ifdef FEAT_MBYTE
+ check_string_option(&buf->b_p_menc);
+- #endif
+ #ifdef FEAT_VARTABS
+ check_string_option(&buf->b_p_vsts);
+ check_string_option(&buf->b_p_vts);
+--- 5694,5700 ----
+***************
+*** 6318,6324 ****
+ }
+
+ /* 'ambiwidth' */
+- #ifdef FEAT_MBYTE
+ else if (varp == &p_ambw || varp == &p_emoji)
+ {
+ if (check_opt_strings(p_ambw, p_ambw_values, FALSE) != OK)
+--- 6230,6235 ----
+***************
+*** 6328,6334 ****
+ else if (set_chars_option(&p_fcs) != NULL)
+ errmsg = _("E835: Conflicts with value of 'fillchars'");
+ }
+- #endif
+
+ /* 'background' */
+ else if (varp == &p_bg)
+--- 6239,6244 ----
+***************
+*** 6404,6410 ****
+ errmsg = e_invarg;
+ }
+
+- #ifdef FEAT_MBYTE
+ /* 'encoding', 'fileencoding', 'termencoding' and 'makeencoding' */
+ else if (varp == &p_enc || gvarp == &p_fenc || varp == &p_tenc
+ || gvarp == &p_menc)
+--- 6314,6319 ----
+***************
+*** 6419,6428 ****
+ errmsg = e_invarg;
+ else
+ {
+! # ifdef FEAT_TITLE
+ /* May show a "+" in the title now. */
+ redraw_titles();
+! # endif
+ /* Add 'fileencoding' to the swap file. */
+ ml_setflags(curbuf);
+ }
+--- 6328,6337 ----
+ errmsg = e_invarg;
+ else
+ {
+! #ifdef FEAT_TITLE
+ /* May show a "+" in the title now. */
+ redraw_titles();
+! #endif
+ /* Add 'fileencoding' to the swap file. */
+ ml_setflags(curbuf);
+ }
+***************
+*** 6439,6467 ****
+ if (varp == &p_enc)
+ {
+ errmsg = mb_init();
+! # ifdef FEAT_TITLE
+ redraw_titles();
+! # endif
+ }
+ }
+
+! # if defined(FEAT_GUI_GTK)
+ if (errmsg == NULL && varp == &p_tenc && gui.in_use)
+ {
+ /* GTK+ 2 uses only a single encoding, and that is UTF-8. */
+ if (STRCMP(p_tenc, "utf-8") != 0)
+ errmsg = N_("E617: Cannot be changed in the GTK+ 2 GUI");
+ }
+! # endif
+
+ if (errmsg == NULL)
+ {
+! # ifdef FEAT_KEYMAP
+ /* When 'keymap' is used and 'encoding' changes, reload the keymap
+ * (with another encoding). */
+ if (varp == &p_enc && *curbuf->b_p_keymap != NUL)
+ (void)keymap_init();
+! # endif
+
+ /* When 'termencoding' is not empty and 'encoding' changes or when
+ * 'termencoding' changes, need to setup for keyboard input and
+--- 6348,6376 ----
+ if (varp == &p_enc)
+ {
+ errmsg = mb_init();
+! #ifdef FEAT_TITLE
+ redraw_titles();
+! #endif
+ }
+ }
+
+! #if defined(FEAT_GUI_GTK)
+ if (errmsg == NULL && varp == &p_tenc && gui.in_use)
+ {
+ /* GTK+ 2 uses only a single encoding, and that is UTF-8. */
+ if (STRCMP(p_tenc, "utf-8") != 0)
+ errmsg = N_("E617: Cannot be changed in the GTK+ 2 GUI");
+ }
+! #endif
+
+ if (errmsg == NULL)
+ {
+! #ifdef FEAT_KEYMAP
+ /* When 'keymap' is used and 'encoding' changes, reload the keymap
+ * (with another encoding). */
+ if (varp == &p_enc && *curbuf->b_p_keymap != NUL)
+ (void)keymap_init();
+! #endif
+
+ /* When 'termencoding' is not empty and 'encoding' changes or when
+ * 'termencoding' changes, need to setup for keyboard input and
+***************
+*** 6477,6490 ****
+ }
+ }
+
+! # if defined(WIN3264) && defined(FEAT_MBYTE)
+ /* $HOME may have characters in active code page. */
+ if (varp == &p_enc)
+ init_homedir();
+! # endif
+ }
+ }
+- #endif
+
+ #if defined(FEAT_POSTSCRIPT)
+ else if (varp == &p_penc)
+--- 6386,6398 ----
+ }
+ }
+
+! #if defined(WIN3264)
+ /* $HOME may have characters in active code page. */
+ if (varp == &p_enc)
+ init_homedir();
+! #endif
+ }
+ }
+
+ #if defined(FEAT_POSTSCRIPT)
+ else if (varp == &p_penc)
+***************
+*** 6684,6690 ****
+ /* 'matchpairs' */
+ else if (gvarp == &p_mps)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ for (p = *varp; *p != NUL; ++p)
+--- 6592,6597 ----
+***************
+*** 6711,6717 ****
+ }
+ }
+ else
+- #endif
+ {
+ /* Check for "x:y,x:y" */
+ for (p = *varp; *p != NUL; p += 4)
+--- 6618,6623 ----
+***************
+*** 6971,6977 ****
+ redraw_gui_only = TRUE;
+ }
+ # endif
+- # ifdef FEAT_MBYTE
+ else if (varp == &p_guifontwide)
+ {
+ if (STRCMP(p_guifontwide, "*") == 0)
+--- 6877,6882 ----
+***************
+*** 6980,6986 ****
+ errmsg = N_("E534: Invalid wide font");
+ redraw_gui_only = TRUE;
+ }
+- # endif
+ #endif
+
+ #ifdef CURSOR_SHAPE
+--- 6885,6890 ----
+***************
+*** 7001,7007 ****
+ #ifdef FEAT_PRINTER
+ else if (varp == &p_popt)
+ errmsg = parse_printoptions();
+! # if defined(FEAT_MBYTE) && defined(FEAT_POSTSCRIPT)
+ else if (varp == &p_pmfn)
+ errmsg = parse_printmbfont();
+ # endif
+--- 6905,6911 ----
+ #ifdef FEAT_PRINTER
+ else if (varp == &p_popt)
+ errmsg = parse_printoptions();
+! # if defined(FEAT_POSTSCRIPT)
+ else if (varp == &p_pmfn)
+ errmsg = parse_printmbfont();
+ # endif
+***************
+*** 7395,7408 ****
+ errmsg = e_invarg;
+ }
+
+- #ifdef FEAT_MBYTE
+ /* 'casemap' */
+ else if (varp == &p_cmp)
+ {
+ if (opt_strings_flags(p_cmp, p_cmp_values, &cmp_flags, TRUE) != OK)
+ errmsg = e_invarg;
+ }
+- #endif
+
+ #ifdef FEAT_DIFF
+ /* 'diffopt' */
+--- 7299,7310 ----
+***************
+*** 8022,8054 ****
+ {
+ c1 = c2 = c3 = 0;
+ s = p + len + 1;
+- #ifdef FEAT_MBYTE
+ c1 = mb_ptr2char_adv(&s);
+ if (mb_char2cells(c1) > 1)
+ continue;
+- #else
+- c1 = *s++;
+- #endif
+ if (tab[i].cp == &lcs_tab2)
+ {
+ if (*s == NUL)
+ continue;
+- #ifdef FEAT_MBYTE
+ c2 = mb_ptr2char_adv(&s);
+ if (mb_char2cells(c2) > 1)
+ continue;
+- #else
+- c2 = *s++;
+- #endif
+ if (!(*s == ',' || *s == NUL))
+ {
+- #ifdef FEAT_MBYTE
+ c3 = mb_ptr2char_adv(&s);
+ if (mb_char2cells(c3) > 1)
+ continue;
+- #else
+- c3 = *s++;
+- #endif
+ }
+ }
+
+--- 7924,7944 ----
+***************
+*** 8506,8518 ****
+ {
+ redraw_titles();
+ }
+- # ifdef FEAT_MBYTE
+ /* when 'bomb' is changed, redraw the window title and tab page text */
+ else if ((int *)varp == &curbuf->b_p_bomb)
+ {
+ redraw_titles();
+ }
+- # endif
+ #endif
+
+ /* when 'bin' is set also set some other options */
+--- 8396,8406 ----
+***************
+*** 8891,8900 ****
+ #endif
+ }
+
+- # ifdef FEAT_MBYTE
+ /* set 'delcombine' */
+ p_deco = TRUE;
+- # endif
+
+ # ifdef FEAT_KEYMAP
+ /* Force-set the necessary keymap for arabic */
+--- 8779,8786 ----
+***************
+*** 9210,9216 ****
+ }
+ #endif
+
+- #ifdef FEAT_MBYTE
+ /* 'maxcombine' */
+ else if (pp == &p_mco)
+ {
+--- 9096,9101 ----
+***************
+*** 9220,9226 ****
+ p_mco = 0;
+ screenclear(); /* will re-allocate the screen */
+ }
+- #endif
+
+ else if (pp == &curbuf->b_p_iminsert)
+ {
+--- 9105,9110 ----
+***************
+*** 10078,10084 ****
+ return (char_u *)NULL;
+ }
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ char_u *
+ get_encoding_default(void)
+ {
+--- 9962,9967 ----
+***************
+*** 10089,10095 ****
+ return options[i].def_val[VI_DEFAULT];
+ return (char_u *)NULL;
+ }
+- #endif
+
+ /*
+ * Translate a string like "t_xx", "<t_xx>" or "<S-Tab>" to a key number.
+--- 9972,9977 ----
+***************
+*** 10794,10804 ****
+ clear_string_option(&buf->b_p_lw);
+ break;
+ #endif
+- #ifdef FEAT_MBYTE
+ case PV_MENC:
+ clear_string_option(&buf->b_p_menc);
+ break;
+- #endif
+ }
+ }
+ #endif
+--- 10676,10684 ----
+***************
+*** 10853,10861 ****
+ case PV_LW: return (char_u *)&(curbuf->b_p_lw);
+ #endif
+ case PV_BKC: return (char_u *)&(curbuf->b_p_bkc);
+- #ifdef FEAT_MBYTE
+ case PV_MENC: return (char_u *)&(curbuf->b_p_menc);
+- #endif
+ }
+ return NULL; /* "cannot happen" */
+ }
+--- 10733,10739 ----
+***************
+*** 10931,10940 ****
+ case PV_LW: return *curbuf->b_p_lw != NUL
+ ? (char_u *)&(curbuf->b_p_lw) : p->var;
+ #endif
+- #ifdef FEAT_MBYTE
+ case PV_MENC: return *curbuf->b_p_menc != NUL
+ ? (char_u *)&(curbuf->b_p_menc) : p->var;
+- #endif
+
+ #ifdef FEAT_ARABIC
+ case PV_ARAB: return (char_u *)&(curwin->w_p_arab);
+--- 10809,10816 ----
+***************
+*** 11000,11008 ****
+
+ case PV_AI: return (char_u *)&(curbuf->b_p_ai);
+ case PV_BIN: return (char_u *)&(curbuf->b_p_bin);
+- #ifdef FEAT_MBYTE
+ case PV_BOMB: return (char_u *)&(curbuf->b_p_bomb);
+- #endif
+ case PV_BH: return (char_u *)&(curbuf->b_p_bh);
+ case PV_BT: return (char_u *)&(curbuf->b_p_bt);
+ case PV_BL: return (char_u *)&(curbuf->b_p_bl);
+--- 10876,10882 ----
+***************
+*** 11031,11039 ****
+ case PV_EOL: return (char_u *)&(curbuf->b_p_eol);
+ case PV_FIXEOL: return (char_u *)&(curbuf->b_p_fixeol);
+ case PV_ET: return (char_u *)&(curbuf->b_p_et);
+- #ifdef FEAT_MBYTE
+ case PV_FENC: return (char_u *)&(curbuf->b_p_fenc);
+- #endif
+ case PV_FF: return (char_u *)&(curbuf->b_p_ff);
+ case PV_FT: return (char_u *)&(curbuf->b_p_ft);
+ case PV_FO: return (char_u *)&(curbuf->b_p_fo);
+--- 10905,10911 ----
+***************
+*** 11378,11386 ****
+ free_buf_options(buf, TRUE);
+ buf->b_p_ro = FALSE; /* don't copy readonly */
+ buf->b_p_tx = p_tx;
+- #ifdef FEAT_MBYTE
+ buf->b_p_fenc = vim_strsave(p_fenc);
+- #endif
+ switch (*p_ffs)
+ {
+ case 'm':
+--- 11250,11256 ----
+***************
+*** 11410,11418 ****
+ buf->b_p_wm_nopaste = p_wm_nopaste;
+ buf->b_p_wm_nobin = p_wm_nobin;
+ buf->b_p_bin = p_bin;
+- #ifdef FEAT_MBYTE
+ buf->b_p_bomb = p_bomb;
+- #endif
+ buf->b_p_fixeol = p_fixeol;
+ buf->b_p_et = p_et;
+ buf->b_p_et_nobin = p_et_nobin;
+--- 11280,11286 ----
+***************
+*** 11549,11557 ****
+ #ifdef FEAT_LISP
+ buf->b_p_lw = empty_option;
+ #endif
+- #ifdef FEAT_MBYTE
+ buf->b_p_menc = empty_option;
+- #endif
+
+ /*
+ * Don't copy the options set by ex_help(), use the saved values,
+--- 11417,11423 ----
+***************
+*** 12137,12149 ****
+ *
+ * langmap_mapchar[] maps any of 256 chars to an ASCII char used for Vim
+ * commands.
+! * When FEAT_MBYTE is defined langmap_mapga.ga_data is a sorted table of
+! * langmap_entry_T. This does the same as langmap_mapchar[] for characters >=
+! * 256.
+! */
+! # if defined(FEAT_MBYTE) || defined(PROTO)
+! /*
+! * With multi-byte support use growarray for 'langmap' chars >= 256
+ */
+ typedef struct
+ {
+--- 12003,12012 ----
+ *
+ * langmap_mapchar[] maps any of 256 chars to an ASCII char used for Vim
+ * commands.
+! * langmap_mapga.ga_data is a sorted table of langmap_entry_T. This does the
+! * same as langmap_mapchar[] for characters >= 256.
+! *
+! * Use growarray for 'langmap' chars >= 256
+ */
+ typedef struct
+ {
+***************
+*** 12217,12223 ****
+ }
+ return c; /* no entry found, return "c" unmodified */
+ }
+- # endif
+
+ static void
+ langmap_init(void)
+--- 12080,12085 ----
+***************
+*** 12226,12234 ****
+
+ for (i = 0; i < 256; i++)
+ langmap_mapchar[i] = i; /* we init with a one-to-one map */
+- # ifdef FEAT_MBYTE
+ ga_init2(&langmap_mapga, sizeof(langmap_entry_T), 8);
+- # endif
+ }
+
+ /*
+--- 12088,12094 ----
+***************
+*** 12242,12250 ****
+ char_u *p2;
+ int from, to;
+
+- #ifdef FEAT_MBYTE
+ ga_clear(&langmap_mapga); /* clear the previous map first */
+- #endif
+ langmap_init(); /* back to one-to-one map */
+
+ for (p = p_langmap; p[0] != NUL; )
+--- 12102,12108 ----
+***************
+*** 12268,12278 ****
+ }
+ if (p[0] == '\\' && p[1] != NUL)
+ ++p;
+- #ifdef FEAT_MBYTE
+ from = (*mb_ptr2char)(p);
+- #else
+- from = p[0];
+- #endif
+ to = NUL;
+ if (p2 == NULL)
+ {
+--- 12126,12132 ----
+***************
+*** 12281,12291 ****
+ {
+ if (p[0] == '\\')
+ ++p;
+- #ifdef FEAT_MBYTE
+ to = (*mb_ptr2char)(p);
+- #else
+- to = p[0];
+- #endif
+ }
+ }
+ else
+--- 12135,12141 ----
+***************
+*** 12294,12304 ****
+ {
+ if (p2[0] == '\\')
+ ++p2;
+- #ifdef FEAT_MBYTE
+ to = (*mb_ptr2char)(p2);
+- #else
+- to = p2[0];
+- #endif
+ }
+ }
+ if (to == NUL)
+--- 12144,12150 ----
+***************
+*** 12308,12318 ****
+ return;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (from >= 256)
+ langmap_set_entry(from, to);
+ else
+- #endif
+ langmap_mapchar[from & 255] = to;
+
+ /* Advance to next pair */
+--- 12154,12162 ----
+***************
+*** 12813,12819 ****
+ {
+ buf->b_start_ffc = *buf->b_p_ff;
+ buf->b_start_eol = buf->b_p_eol;
+- #ifdef FEAT_MBYTE
+ buf->b_start_bomb = buf->b_p_bomb;
+
+ /* Only use free/alloc when necessary, they take time. */
+--- 12657,12662 ----
+***************
+*** 12823,12829 ****
+ vim_free(buf->b_start_fenc);
+ buf->b_start_fenc = vim_strsave(buf->b_p_fenc);
+ }
+- #endif
+ }
+
+ /*
+--- 12666,12671 ----
+***************
+*** 12850,12864 ****
+ return TRUE;
+ if ((buf->b_p_bin || !buf->b_p_fixeol) && buf->b_start_eol != buf->b_p_eol)
+ return TRUE;
+- #ifdef FEAT_MBYTE
+ if (!buf->b_p_bin && buf->b_start_bomb != buf->b_p_bomb)
+ return TRUE;
+ if (buf->b_start_fenc == NULL)
+ return (*buf->b_p_fenc != NUL);
+ return (STRCMP(buf->b_start_fenc, buf->b_p_fenc) != 0);
+- #else
+- return FALSE;
+- #endif
+ }
+
+ /*
+--- 12692,12702 ----
+***************
+*** 13244,13250 ****
+ ptr = curbuf->b_p_mps;
+ while (*ptr != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ char_u *prev;
+--- 13082,13087 ----
+***************
+*** 13284,13290 ****
+ ptr += mb_ptr2len(ptr);
+ }
+ else
+- #endif
+ {
+ if (*ptr == *initc)
+ {
+--- 13121,13126 ----
+*** ../vim-8.1.0805/src/charset.c 2019-01-24 15:04:44.662887892 +0100
+--- src/charset.c 2019-01-24 15:52:54.887433134 +0100
+***************
+*** 1266,1272 ****
+ #endif
+ )
+ {
+- head = 0;
+ for (;;)
+ {
+ head = 0;
+--- 1266,1271 ----
+*** ../vim-8.1.0805/src/version.c 2019-01-24 15:04:44.674887811 +0100
+--- src/version.c 2019-01-24 15:50:45.136358654 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 806,
+ /**/
+
+--
+"Never be afraid to tell the world who you are."
+ -- Anonymous
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0807 b/data/vim/patches/8.1.0807
new file mode 100644
index 000000000..e686a2d20
--- /dev/null
+++ b/data/vim/patches/8.1.0807
@@ -0,0 +1,50 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0807
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0807
+Problem: Session test fails on MS-Windows.
+Solution: Don't try creating file with illegal name.
+Files: src/testdir/test_mksession.vim
+
+
+*** ../vim-8.1.0806/src/testdir/test_mksession.vim 2019-01-24 13:34:37.815464545 +0100
+--- src/testdir/test_mksession.vim 2019-01-24 15:56:18.218001301 +0100
+***************
+*** 427,432 ****
+--- 427,436 ----
+ endfunc
+
+ func Test_mksession_quote_in_filename()
++ if !has('unix')
++ " only Unix can handle this weird filename
++ return
++ endif
+ let v:errmsg = ''
+ %bwipe!
+ split another
+*** ../vim-8.1.0806/src/version.c 2019-01-24 15:54:17.794846944 +0100
+--- src/version.c 2019-01-24 15:56:53.281756173 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 807,
+ /**/
+
+--
+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.0808 b/data/vim/patches/8.1.0808
new file mode 100644
index 000000000..d273dad9b
--- /dev/null
+++ b/data/vim/patches/8.1.0808
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0808
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0808
+Problem: MS-Windows: build error with GUI.
+Solution: Remove "static".
+Files: src/gui_w32.c
+
+
+*** ../vim-8.1.0807/src/gui_w32.c 2019-01-24 15:54:17.786847003 +0100
+--- src/gui_w32.c 2019-01-24 16:26:10.661861038 +0100
+***************
+*** 3552,3558 ****
+ * initdir - directory in which to open the browser (NULL = current dir)
+ * filter - Filter for matched files to choose from.
+ */
+! static char_u *
+ gui_mch_browse(
+ int saving,
+ char_u *title,
+--- 3552,3558 ----
+ * initdir - directory in which to open the browser (NULL = current dir)
+ * filter - Filter for matched files to choose from.
+ */
+! char_u *
+ gui_mch_browse(
+ int saving,
+ char_u *title,
+*** ../vim-8.1.0807/src/version.c 2019-01-24 15:57:25.321532574 +0100
+--- src/version.c 2019-01-24 16:27:08.669474515 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 808,
+ /**/
+
+--
+TALL KNIGHT: We shall say Ni! again to you if you do not appease us.
+ARTHUR: All right! What do you want?
+TALL KNIGHT: We want ... a 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.0809 b/data/vim/patches/8.1.0809
new file mode 100644
index 000000000..f637051d0
--- /dev/null
+++ b/data/vim/patches/8.1.0809
@@ -0,0 +1,5622 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0809
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0809
+Problem: Too many #ifdefs.
+Solution: Graduate FEAT_MBYTE, part 3.
+Files: src/os_amiga.c, src/os_mswin.c, src/os_unix.c, src/os_w32exe.c,
+ src/os_win32.c, src/quickfix.c, src/regexp.c, src/regexp_nfa.c,
+ src/screen.c
+
+
+*** ../vim-8.1.0808/src/os_amiga.c 2019-01-19 17:43:03.421449119 +0100
+--- src/os_amiga.c 2019-01-24 15:59:24.928700732 +0100
+***************
+*** 165,182 ****
+
+ for (;;) /* repeat until we got a character */
+ {
+- # ifdef FEAT_MBYTE
+ len = Read(raw_in, (char *)buf, (long)maxlen / input_conv.vc_factor);
+- # else
+- len = Read(raw_in, (char *)buf, (long)maxlen);
+- # endif
+ if (len > 0)
+ {
+- #ifdef FEAT_MBYTE
+ /* Convert from 'termencoding' to 'encoding'. */
+ if (input_conv.vc_type != CONV_NONE)
+ len = convert_input(buf, len, maxlen);
+- #endif
+ return len;
+ }
+ }
+--- 165,176 ----
+*** ../vim-8.1.0808/src/os_mswin.c 2019-01-13 23:38:33.403773217 +0100
+--- src/os_mswin.c 2019-01-24 16:01:16.035931440 +0100
+***************
+*** 282,288 ****
+ # else
+ if (title != NULL)
+ {
+- # ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ /* Convert the title from 'encoding' to the active codepage. */
+--- 282,287 ----
+***************
+*** 295,301 ****
+ return;
+ }
+ }
+- # endif
+ SetConsoleTitle((LPCSTR)title);
+ }
+ # endif
+--- 294,299 ----
+***************
+*** 361,367 ****
+ else
+ #endif
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR *wname;
+--- 359,364 ----
+***************
+*** 387,393 ****
+ vim_free(cname);
+ }
+ if (nResult == FAIL) /* fall back to non-wide function */
+- #endif
+ {
+ if (_fullpath((char *)buf, (const char *)fname, len - 1) == NULL)
+ {
+--- 384,389 ----
+***************
+*** 415,428 ****
+ int
+ mch_isFullName(char_u *fname)
+ {
+- #ifdef FEAT_MBYTE
+ /* WinNT and later can use _MAX_PATH wide characters for a pathname, which
+ * means that the maximum pathname is _MAX_PATH * 3 bytes when 'enc' is
+ * UTF-8. */
+ char szName[_MAX_PATH * 3 + 1];
+- #else
+- char szName[_MAX_PATH + 1];
+- #endif
+
+ /* A name like "d:/foo" and "//server/share" is absolute */
+ if ((fname[0] && fname[1] == ':' && (fname[2] == '/' || fname[2] == '\\'))
+--- 411,420 ----
+***************
+*** 538,548 ****
+ return stat(name, stp);
+ }
+
+- #ifdef FEAT_MBYTE
+ static int
+ wstat_symlink_aware(const WCHAR *name, stat_T *stp)
+ {
+! # if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__MINGW32__)
+ /* Work around for VC12 or earlier (and MinGW). _wstat() can't handle
+ * symlinks properly.
+ * VC9 or earlier: _wstat() doesn't support a symlink at all. It retrieves
+--- 530,539 ----
+ return stat(name, stp);
+ }
+
+ static int
+ wstat_symlink_aware(const WCHAR *name, stat_T *stp)
+ {
+! #if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__MINGW32__)
+ /* Work around for VC12 or earlier (and MinGW). _wstat() can't handle
+ * symlinks properly.
+ * VC9 or earlier: _wstat() doesn't support a symlink at all. It retrieves
+***************
+*** 587,596 ****
+ return n;
+ }
+ }
+! # endif
+ return _wstat(name, (struct _stat *)stp);
+ }
+- #endif
+
+ /*
+ * stat() can't handle a trailing '/' or '\', remove it first.
+--- 578,586 ----
+ return n;
+ }
+ }
+! #endif
+ return _wstat(name, (struct _stat *)stp);
+ }
+
+ /*
+ * stat() can't handle a trailing '/' or '\', remove it first.
+***************
+*** 598,611 ****
+ int
+ vim_stat(const char *name, stat_T *stp)
+ {
+- #ifdef FEAT_MBYTE
+ /* WinNT and later can use _MAX_PATH wide characters for a pathname, which
+ * means that the maximum pathname is _MAX_PATH * 3 bytes when 'enc' is
+ * UTF-8. */
+ char_u buf[_MAX_PATH * 3 + 1];
+- #else
+- char_u buf[_MAX_PATH + 1];
+- #endif
+ char_u *p;
+
+ vim_strncpy((char_u *)buf, (char_u *)name, sizeof(buf) - 1);
+--- 588,597 ----
+***************
+*** 628,634 ****
+ STRCAT(buf, "\\");
+ }
+ }
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR *wp = enc_to_utf16(buf, NULL);
+--- 614,619 ----
+***************
+*** 641,647 ****
+ return n;
+ }
+ }
+- #endif
+ return stat_symlink_aware((char *)buf, stp);
+ }
+
+--- 626,631 ----
+***************
+*** 791,797 ****
+ if (*path == NUL) /* drive name only */
+ return 0;
+
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR *p = enc_to_utf16((char_u *)path, NULL);
+--- 775,780 ----
+***************
+*** 804,810 ****
+ return n;
+ }
+ }
+- #endif
+
+ return chdir(path); /* let the normal chdir() do the rest */
+ }
+--- 787,792 ----
+***************
+*** 1145,1153 ****
+ #define IDC_PRINTTEXT2 402
+ #define IDC_PROGRESS 403
+
+- #if !defined(FEAT_MBYTE)
+- # define vimSetDlgItemText(h, i, s) SetDlgItemText(h, i, s)
+- #else
+ static BOOL
+ vimSetDlgItemText(HWND hDlg, int nIDDlgItem, char_u *s)
+ {
+--- 1127,1132 ----
+***************
+*** 1166,1172 ****
+ }
+ return SetDlgItemText(hDlg, nIDDlgItem, (LPCSTR)s);
+ }
+- #endif
+
+ /*
+ * Convert BGR to RGB for Windows GDI calls
+--- 1145,1150 ----
+***************
+*** 1563,1569 ****
+ char_u *printer_name = (char_u *)devname + devname->wDeviceOffset;
+ char_u *port_name = (char_u *)devname +devname->wOutputOffset;
+ char_u *text = (char_u *)_("to %s on %s");
+- #ifdef FEAT_MBYTE
+ char_u *printer_name_orig = printer_name;
+ char_u *port_name_orig = port_name;
+
+--- 1541,1546 ----
+***************
+*** 1580,1597 ****
+ if (to_free != NULL)
+ port_name = to_free;
+ }
+- #endif
+ prt_name = alloc((unsigned)(STRLEN(printer_name) + STRLEN(port_name)
+ + STRLEN(text)));
+ if (prt_name != NULL)
+ wsprintf((char *)prt_name, (const char *)text,
+ printer_name, port_name);
+- #ifdef FEAT_MBYTE
+ if (printer_name != printer_name_orig)
+ vim_free(printer_name);
+ if (port_name != port_name_orig)
+ vim_free(port_name);
+- #endif
+ }
+ GlobalUnlock(prt_dlg.hDevNames);
+
+--- 1557,1571 ----
+***************
+*** 1680,1688 ****
+ {
+ int ret;
+ char szBuffer[300];
+- #if defined(FEAT_MBYTE)
+ WCHAR *wp = NULL;
+- #endif
+
+ hDlgPrint = CreateDialog(GetModuleHandle(NULL), TEXT("PrintDlgBox"),
+ prt_dlg.hwndOwner, PrintDlgProc);
+--- 1654,1660 ----
+***************
+*** 1690,1696 ****
+ wsprintf(szBuffer, _("Printing '%s'"), gettail(psettings->jobname));
+ vimSetDlgItemText(hDlgPrint, IDC_PRINTTEXT1, (char_u *)szBuffer);
+
+- #if defined(FEAT_MBYTE)
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ wp = enc_to_utf16(psettings->jobname, NULL);
+ if (wp != NULL)
+--- 1662,1667 ----
+***************
+*** 1704,1710 ****
+ vim_free(wp);
+ }
+ else
+- #endif
+ {
+ DOCINFO di;
+
+--- 1675,1680 ----
+***************
+*** 1767,1776 ****
+ int
+ mch_print_text_out(char_u *p, int len)
+ {
+- #if defined(FEAT_PROPORTIONAL_FONTS) || defined(FEAT_MBYTE)
+ SIZE sz;
+- #endif
+- #if defined(FEAT_MBYTE)
+ WCHAR *wp = NULL;
+ int wlen = len;
+
+--- 1737,1743 ----
+***************
+*** 1801,1807 ****
+ }
+ return ret;
+ }
+- #endif
+ TextOut(prt_dlg.hDC, prt_pos_x + prt_left_margin,
+ prt_pos_y + prt_top_margin,
+ (LPCSTR)p, len);
+--- 1768,1773 ----
+***************
+*** 1873,1882 ****
+ CHAR buf[MAX_PATH]; // could have simply reused 'wsz'...
+ char_u *rfname = NULL;
+ int len;
+- # ifdef FEAT_MBYTE
+ IShellLinkW *pslw = NULL;
+ WIN32_FIND_DATAW ffdw; // we get those free of charge
+- # endif
+
+ /* Check if the file name ends in ".lnk". Avoid calling
+ * CoCreateInstance(), it's quite slow. */
+--- 1839,1846 ----
+***************
+*** 1888,1894 ****
+
+ CoInitialize(NULL);
+
+- # ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ // create a link manager object and request its interface
+--- 1852,1857 ----
+***************
+*** 1930,1936 ****
+ }
+ goto shortcut_end;
+ }
+- # endif
+ // create a link manager object and request its interface
+ hr = CoCreateInstance(
+ &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
+--- 1893,1898 ----
+***************
+*** 1969,1978 ****
+ ppf->lpVtbl->Release(ppf);
+ if (psl != NULL)
+ psl->lpVtbl->Release(psl);
+- # ifdef FEAT_MBYTE
+ if (pslw != NULL)
+ pslw->lpVtbl->Release(pslw);
+- # endif
+
+ CoUninitialize();
+ return rfname;
+--- 1931,1938 ----
+***************
+*** 2042,2054 ****
+ COPYDATASTRUCT data;
+
+ data.dwData = COPYDATA_ENCODING;
+- #ifdef FEAT_MBYTE
+ data.cbData = (DWORD)STRLEN(p_enc) + 1;
+ data.lpData = p_enc;
+- #else
+- data.cbData = (DWORD)STRLEN("latin1") + 1;
+- data.lpData = "latin1";
+- #endif
+ (void)SendMessage(target, WM_COPYDATA, (WPARAM)message_window,
+ (LPARAM)(&data));
+ }
+--- 2002,2009 ----
+***************
+*** 2118,2128 ****
+ switch (data->dwData)
+ {
+ case COPYDATA_ENCODING:
+- # ifdef FEAT_MBYTE
+ /* Remember the encoding that the client uses. */
+ vim_free(client_enc);
+ client_enc = enc_canonize((char_u *)data->lpData);
+- # endif
+ return 1;
+
+ case COPYDATA_KEYS:
+--- 2073,2081 ----
+***************
+*** 2954,2968 ****
+ int i;
+ int ret = FAIL;
+ static LOGFONT *lastlf = NULL;
+- #ifdef FEAT_MBYTE
+ char_u *acpname = NULL;
+- #endif
+
+ *lf = s_lfDefault;
+ if (name == NULL)
+ return OK;
+
+- #ifdef FEAT_MBYTE
+ /* Convert 'name' from 'encoding' to the current codepage, because
+ * lf->lfFaceName uses the current codepage.
+ * TODO: Use Wide APIs instead of ANSI APIs. */
+--- 2907,2918 ----
+***************
+*** 2972,2978 ****
+ enc_to_acp(name, (int)STRLEN(name), &acpname, &len);
+ name = acpname;
+ }
+- #endif
+ if (STRCMP(name, "*") == 0)
+ {
+ #if defined(FEAT_GUI_W32)
+--- 2922,2927 ----
+***************
+*** 3112,3120 ****
+ if (lastlf != NULL)
+ mch_memmove(lastlf, lf, sizeof(LOGFONT));
+ }
+- #ifdef FEAT_MBYTE
+ vim_free(acpname);
+- #endif
+
+ return ret;
+ }
+--- 3061,3067 ----
+*** ../vim-8.1.0808/src/os_unix.c 2019-01-22 21:45:36.553678901 +0100
+--- src/os_unix.c 2019-01-24 16:02:08.167571433 +0100
+***************
+*** 2054,2072 ****
+ retval = TRUE;
+ if (!test_only)
+ {
+! #if defined(FEAT_XFONTSET) || defined(FEAT_MBYTE)
+! if (text_prop.encoding == XA_STRING
+! # ifdef FEAT_MBYTE
+! && !has_mbyte
+! # endif
+! )
+ {
+- #endif
+ if (get_title)
+ oldtitle = vim_strsave((char_u *)text_prop.value);
+ else
+ oldicon = vim_strsave((char_u *)text_prop.value);
+- #if defined(FEAT_XFONTSET) || defined(FEAT_MBYTE)
+ }
+ else
+ {
+--- 2054,2065 ----
+ retval = TRUE;
+ if (!test_only)
+ {
+! if (text_prop.encoding == XA_STRING && !has_mbyte)
+ {
+ if (get_title)
+ oldtitle = vim_strsave((char_u *)text_prop.value);
+ else
+ oldicon = vim_strsave((char_u *)text_prop.value);
+ }
+ else
+ {
+***************
+*** 2093,2099 ****
+ oldicon = vim_strsave((char_u *)text_prop.value);
+ }
+ }
+- #endif
+ }
+ XFree((void *)text_prop.value);
+ }
+--- 2086,2091 ----
+***************
+*** 2105,2111 ****
+ * systems X_HAVE_UTF8_STRING may be defined in a header file but
+ * Xutf8SetWMProperties() is not in the X11 library. Configure checks for
+ * that and defines HAVE_XUTF8SETWMPROPERTIES. */
+! #if defined(X_HAVE_UTF8_STRING) && defined(FEAT_MBYTE)
+ # if X_HAVE_UTF8_STRING && HAVE_XUTF8SETWMPROPERTIES
+ # define USE_UTF8_STRING
+ # endif
+--- 2097,2103 ----
+ * systems X_HAVE_UTF8_STRING may be defined in a header file but
+ * Xutf8SetWMProperties() is not in the X11 library. Configure checks for
+ * that and defines HAVE_XUTF8SETWMPROPERTIES. */
+! #if defined(X_HAVE_UTF8_STRING)
+ # if X_HAVE_UTF8_STRING && HAVE_XUTF8SETWMPROPERTIES
+ # define USE_UTF8_STRING
+ # endif
+***************
+*** 4823,4831 ****
+ {
+ # define BUFLEN 100 /* length for buffer, pseudo tty limit is 128 */
+ char_u buffer[BUFLEN + 1];
+- # ifdef FEAT_MBYTE
+ int buffer_off = 0; /* valid bytes in buffer[] */
+- # endif
+ char_u ta_buf[BUFLEN + 1]; /* TypeAHead */
+ int ta_len = 0; /* valid bytes in ta_buf[] */
+ int len;
+--- 4815,4821 ----
+***************
+*** 5031,5041 ****
+ }
+ else if (ta_buf[i] == '\r')
+ ta_buf[i] = '\n';
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ i += (*mb_ptr2len_len)(ta_buf + i,
+ ta_len + len - i) - 1;
+- # endif
+ }
+
+ /*
+--- 5021,5029 ----
+***************
+*** 5048,5054 ****
+ {
+ if (ta_buf[i] == '\n' || ta_buf[i] == '\b')
+ msg_putchar(ta_buf[i]);
+- # ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ {
+ int l = (*mb_ptr2len)(ta_buf + i);
+--- 5036,5041 ----
+***************
+*** 5056,5062 ****
+ msg_outtrans_len(ta_buf + i, l);
+ i += l - 1;
+ }
+- # endif
+ else
+ msg_outtrans_len(ta_buf + i, 1);
+ }
+--- 5043,5048 ----
+***************
+*** 5114,5124 ****
+ while (RealWaitForChar(fromshell_fd, 10L, NULL, NULL))
+ {
+ len = read_eintr(fromshell_fd, buffer
+- # ifdef FEAT_MBYTE
+ + buffer_off, (size_t)(BUFLEN - buffer_off)
+- # else
+- , (size_t)BUFLEN
+- # endif
+ );
+ if (len <= 0) /* end of file or error */
+ goto finished;
+--- 5100,5106 ----
+***************
+*** 5138,5144 ****
+ ga_append(&ga, buffer[i]);
+ }
+ }
+- # ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ {
+ int l;
+--- 5120,5125 ----
+***************
+*** 5181,5187 ****
+ }
+ buffer_off = 0;
+ }
+- # endif /* FEAT_MBYTE */
+ else
+ {
+ buffer[len] = NUL;
+--- 5162,5167 ----
+*** ../vim-8.1.0808/src/os_w32exe.c 2017-02-01 13:42:23.000000000 +0100
+--- src/os_w32exe.c 2019-01-24 16:02:23.907462844 +0100
+***************
+*** 130,138 ****
+ free(argv);
+ if (tofree != NULL)
+ free(tofree);
+- #ifdef FEAT_MBYTE
+ free_cmd_argsW();
+- #endif
+
+ return 0;
+ }
+--- 130,136 ----
+*** ../vim-8.1.0808/src/os_win32.c 2019-01-19 21:12:21.561634437 +0100
+--- src/os_win32.c 2019-01-24 16:05:55.678005815 +0100
+***************
+*** 452,462 ****
+ {
+ if (*p == '^' && vim_strchr(escaped, p[1]) != NULL)
+ mch_memmove(p, p + 1, l--);
+- #ifdef FEAT_MBYTE
+ n = (*mb_ptr2len)(p);
+- #else
+- n = 1;
+- #endif
+ p += n;
+ l -= n;
+ }
+--- 452,458 ----
+***************
+*** 1890,1896 ****
+ {
+ int n = 1;
+
+- #ifdef FEAT_MBYTE
+ if (ch2 == NUL)
+ {
+ int i;
+--- 1886,1891 ----
+***************
+*** 1912,1918 ****
+ }
+ }
+ else
+- #endif
+ typeahead[typeaheadlen] = c;
+ if (ch2 != NUL)
+ {
+--- 1907,1912 ----
+***************
+*** 1950,1966 ****
+ if ((modifiers & MOD_MASK_ALT)
+ && n == 1
+ && (typeahead[typeaheadlen] & 0x80) == 0
+- #ifdef FEAT_MBYTE
+ && !enc_dbcs
+- #endif
+ )
+ {
+- #ifdef FEAT_MBYTE
+ n = (*mb_char2bytes)(typeahead[typeaheadlen] | 0x80,
+ typeahead + typeaheadlen);
+- #else
+- typeahead[typeaheadlen] |= 0x80;
+- #endif
+ modifiers &= ~MOD_MASK_ALT;
+ }
+
+--- 1944,1954 ----
+***************
+*** 2044,2050 ****
+ return FALSE;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR *p = enc_to_utf16((char_u *)name, NULL);
+--- 2032,2037 ----
+***************
+*** 2073,2079 ****
+ return TRUE;
+ }
+ }
+- #endif
+
+ curpath = getenv("PATH");
+ newpath = (char*)alloc((unsigned)(STRLEN(curpath) + 3));
+--- 2060,2065 ----
+***************
+*** 2768,2774 ****
+ }
+
+
+- #ifdef FEAT_MBYTE
+ /*
+ * fname_casew(): Wide version of fname_case(). Set the case of the file name,
+ * if it already exists. When "len" is > 0, also expand short to long
+--- 2754,2759 ----
+***************
+*** 2878,2884 ****
+ wcscpy(name, szTrueName);
+ return OK;
+ }
+- #endif
+
+ /*
+ * fname_case(): Set the case of the file name, if it already exists.
+--- 2863,2868 ----
+***************
+*** 2906,2912 ****
+
+ slash_adjust(name);
+
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR *p = enc_to_utf16(name, NULL);
+--- 2890,2895 ----
+***************
+*** 2933,2939 ****
+ }
+ return;
+ }
+- #endif
+
+ /* If 'enc' is utf-8, flen can be larger than _MAX_PATH.
+ * So we should check this after calling wide function. */
+--- 2916,2921 ----
+***************
+*** 2962,2968 ****
+ porigPrev = porig;
+ while (*porig != NUL && *porig != psepc)
+ {
+- #ifdef FEAT_MBYTE
+ int l;
+
+ if (enc_dbcs)
+--- 2944,2949 ----
+***************
+*** 2972,2978 ****
+ *ptrue++ = *porig++;
+ }
+ else
+- #endif
+ *ptrue++ = *porig++;
+ }
+ *ptrue = NUL;
+--- 2953,2958 ----
+***************
+*** 3044,3050 ****
+ char szUserName[256 + 1]; /* UNLEN is 256 */
+ DWORD cch = sizeof szUserName;
+
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR wszUserName[256 + 1]; /* UNLEN is 256 */
+--- 3024,3029 ----
+***************
+*** 3062,3068 ****
+ }
+ }
+ }
+- #endif
+ if (GetUserName(szUserName, &cch))
+ {
+ vim_strncpy(s, (char_u *)szUserName, len - 1);
+--- 3041,3046 ----
+***************
+*** 3083,3089 ****
+ {
+ DWORD cch = len;
+
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR wszHostName[256 + 1];
+--- 3061,3066 ----
+***************
+*** 3101,3107 ****
+ }
+ }
+ }
+- #endif
+ if (!GetComputerName((LPSTR)s, &cch))
+ vim_strncpy(s, (char_u *)"PC (Win32 Vim)", len - 1);
+ }
+--- 3078,3083 ----
+***************
+*** 3135,3141 ****
+ * But the Win32s known bug list says that getcwd() doesn't work
+ * so use the Win32 system call instead. <Negri>
+ */
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR wbuf[_MAX_PATH + 1];
+--- 3111,3116 ----
+***************
+*** 3167,3173 ****
+ }
+ return FAIL;
+ }
+- #endif
+ if (GetCurrentDirectory(len, (LPSTR)buf) == 0)
+ return FAIL;
+ lfnlen = GetLongPathNameA((LPCSTR)buf, (LPSTR)abuf, _MAX_PATH);
+--- 3142,3147 ----
+***************
+*** 3205,3211 ****
+ {
+ long n = -1;
+
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR *p = enc_to_utf16(name, NULL);
+--- 3179,3184 ----
+***************
+*** 3219,3225 ****
+ }
+ }
+ if (n == -1)
+- #endif
+ n = _chmod((const char *)name, perm);
+ if (n == -1)
+ return FAIL;
+--- 3192,3197 ----
+***************
+*** 3290,3296 ****
+ int
+ mch_mkdir(char_u *name)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR *p;
+--- 3262,3267 ----
+***************
+*** 3303,3309 ****
+ vim_free(p);
+ return retval;
+ }
+- #endif
+ return _mkdir((const char *)name);
+ }
+
+--- 3274,3279 ----
+***************
+*** 3314,3320 ****
+ int
+ mch_rmdir(char_u *name)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR *p;
+--- 3284,3289 ----
+***************
+*** 3327,3333 ****
+ vim_free(p);
+ return retval;
+ }
+- #endif
+ return _rmdir((const char *)name);
+ }
+
+--- 3296,3301 ----
+***************
+*** 3353,3359 ****
+ int res = FALSE;
+ WIN32_FIND_DATAA findDataA;
+ DWORD fileFlags = 0, reparseTag = 0;
+- #ifdef FEAT_MBYTE
+ WCHAR *wn = NULL;
+ WIN32_FIND_DATAW findDataW;
+
+--- 3321,3326 ----
+***************
+*** 3370,3376 ****
+ }
+ }
+ else
+- #endif
+ {
+ hFind = FindFirstFile((LPCSTR)name, &findDataA);
+ if (hFind != INVALID_HANDLE_VALUE)
+--- 3337,3342 ----
+***************
+*** 3415,3421 ****
+ {
+ HANDLE hFile;
+ int res = FILEINFO_READ_FAIL;
+- #ifdef FEAT_MBYTE
+ WCHAR *wn = NULL;
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+--- 3381,3386 ----
+***************
+*** 3436,3442 ****
+ vim_free(wn);
+ }
+ else
+- #endif
+ hFile = CreateFile((LPCSTR)fname, /* file name */
+ GENERIC_READ, /* access mode */
+ FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */
+--- 3401,3406 ----
+***************
+*** 3466,3472 ****
+ win32_getattrs(char_u *name)
+ {
+ int attr;
+- #ifdef FEAT_MBYTE
+ WCHAR *p = NULL;
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+--- 3430,3435 ----
+***************
+*** 3478,3484 ****
+ vim_free(p);
+ }
+ else
+- #endif
+ attr = GetFileAttributes((char *)name);
+
+ return attr;
+--- 3441,3446 ----
+***************
+*** 3493,3499 ****
+ win32_setattrs(char_u *name, int attrs)
+ {
+ int res;
+- #ifdef FEAT_MBYTE
+ WCHAR *p = NULL;
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+--- 3455,3460 ----
+***************
+*** 3505,3511 ****
+ vim_free(p);
+ }
+ else
+- #endif
+ res = SetFileAttributes((char *)name, attrs);
+
+ return res ? 0 : -1;
+--- 3466,3471 ----
+***************
+*** 3621,3629 ****
+ {
+ HANDLE hFile;
+ int type;
+- #ifdef FEAT_MBYTE
+ WCHAR *wn = NULL;
+- #endif
+
+ /* We can't open a file with a name "\\.\con" or "\\.\prn" and trying to
+ * read from it later will cause Vim to hang. Thus return NODE_WRITABLE
+--- 3581,3587 ----
+***************
+*** 3631,3637 ****
+ if (STRNCMP(name, "\\\\.\\", 4) == 0)
+ return NODE_WRITABLE;
+
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ wn = enc_to_utf16(name, NULL);
+
+--- 3589,3594 ----
+***************
+*** 3647,3653 ****
+ vim_free(wn);
+ }
+ else
+- #endif
+ hFile = CreateFile((LPCSTR)name, /* file name */
+ GENERIC_WRITE, /* access mode */
+ 0, /* share mode */
+--- 3604,3609 ----
+***************
+*** 3695,3701 ****
+ p = (struct my_acl *)alloc_clear((unsigned)sizeof(struct my_acl));
+ if (p != NULL)
+ {
+- # ifdef FEAT_MBYTE
+ WCHAR *wn = NULL;
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+--- 3651,3656 ----
+***************
+*** 3737,3743 ****
+ vim_free(wn);
+ }
+ else
+- # endif
+ {
+ /* Try to retrieve the entire security descriptor. */
+ err = GetNamedSecurityInfo(
+--- 3692,3697 ----
+***************
+*** 3815,3823 ****
+
+ if (p != NULL)
+ {
+- # ifdef FEAT_MBYTE
+ WCHAR *wn = NULL;
+- # endif
+
+ /* Set security flags */
+ if (p->pSidOwner)
+--- 3769,3775 ----
+***************
+*** 3836,3842 ****
+ if (p->pSacl)
+ sec_info |= SACL_SECURITY_INFORMATION;
+
+- # ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ wn = enc_to_utf16(fname, NULL);
+ if (wn != NULL)
+--- 3788,3793 ----
+***************
+*** 3853,3859 ****
+ vim_free(wn);
+ }
+ else
+- # endif
+ {
+ (void)SetNamedSecurityInfo(
+ (LPSTR)fname, // Abstract filename
+--- 3804,3809 ----
+***************
+*** 4211,4217 ****
+ LPVOID *env,
+ char *cwd)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ BOOL ret;
+--- 4161,4166 ----
+***************
+*** 4247,4253 ****
+ return ret;
+ }
+ fallback:
+- #endif
+ return CreateProcess(
+ NULL, /* Executable name */
+ cmd, /* Command to execute */
+--- 4196,4201 ----
+***************
+*** 4267,4273 ****
+ char *cmd,
+ INT n_show_cmd)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR *wcmd = enc_to_utf16((char_u *)cmd, NULL);
+--- 4215,4220 ----
+***************
+*** 4279,4285 ****
+ return ret;
+ }
+ }
+- #endif
+ return ShellExecute(NULL, NULL, cmd, NULL, NULL, n_show_cmd);
+ }
+
+--- 4226,4231 ----
+***************
+*** 4466,4485 ****
+ while (ret != 0 && availableBytes > 0)
+ {
+ repeatCount++;
+! toRead =
+! # ifdef FEAT_MBYTE
+! (DWORD)(BUFLEN - *buffer_off);
+! # else
+! (DWORD)BUFLEN;
+! # endif
+ toRead = availableBytes < toRead ? availableBytes : toRead;
+! ReadFile(g_hChildStd_OUT_Rd, buffer
+! # ifdef FEAT_MBYTE
+! + *buffer_off, toRead
+! # else
+! , toRead
+! # endif
+! , &len, NULL);
+
+ /* If we haven't read anything, there is a problem */
+ if (len == 0)
+--- 4412,4420 ----
+ while (ret != 0 && availableBytes > 0)
+ {
+ repeatCount++;
+! toRead = (DWORD)(BUFLEN - *buffer_off);
+ toRead = availableBytes < toRead ? availableBytes : toRead;
+! ReadFile(g_hChildStd_OUT_Rd, buffer + *buffer_off, toRead , &len, NULL);
+
+ /* If we haven't read anything, there is a problem */
+ if (len == 0)
+***************
+*** 4501,4507 ****
+ ga_append(ga, buffer[i]);
+ }
+ }
+- # ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ {
+ int l;
+--- 4436,4441 ----
+***************
+*** 4545,4551 ****
+ }
+ *buffer_off = 0;
+ }
+- # endif /* FEAT_MBYTE */
+ else
+ {
+ buffer[len] = NUL;
+--- 4479,4484 ----
+***************
+*** 4740,4750 ****
+ }
+ else if (ta_buf[i] == '\r')
+ ta_buf[i] = '\n';
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ i += (*mb_ptr2len_len)(ta_buf + i,
+ ta_len + len - i) - 1;
+- # endif
+ }
+
+ /*
+--- 4673,4681 ----
+***************
+*** 4755,4761 ****
+ {
+ if (ta_buf[i] == '\n' || ta_buf[i] == '\b')
+ msg_putchar(ta_buf[i]);
+- # ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ {
+ int l = (*mb_ptr2len)(ta_buf + i);
+--- 4686,4691 ----
+***************
+*** 4763,4769 ****
+ msg_outtrans_len(ta_buf + i, l);
+ i += l - 1;
+ }
+- # endif
+ else
+ msg_outtrans_len(ta_buf + i, 1);
+ }
+--- 4693,4698 ----
+***************
+*** 4857,4863 ****
+ }
+ #else
+
+- # ifdef FEAT_MBYTE
+ static int
+ mch_system(char *cmd, int options)
+ {
+--- 4786,4791 ----
+***************
+*** 4873,4881 ****
+ }
+ return system(cmd);
+ }
+- # else
+- # define mch_system(c, o) system(c)
+- # endif
+
+ #endif
+
+--- 4801,4806 ----
+***************
+*** 4972,4978 ****
+ int tmode = cur_tmode;
+ #ifdef FEAT_TITLE
+ char szShellTitle[512];
+- # ifdef FEAT_MBYTE
+ int did_set_title = FALSE;
+
+ /* Change the title to reflect that we are in a subshell. */
+--- 4897,4902 ----
+***************
+*** 5003,5009 ****
+ }
+ }
+ if (!did_set_title)
+- # endif
+ /* Change the title to reflect that we are in a subshell. */
+ if (GetConsoleTitle(szShellTitle, sizeof(szShellTitle) - 4) > 0)
+ {
+--- 4927,4932 ----
+***************
+*** 5217,5223 ****
+ "External commands will not pause after completion.\n"
+ "See :help win32-vimrun for more information.");
+ char *title = _("Vim Warning");
+- # ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR *wmsg = enc_to_utf16((char_u *)msg, NULL);
+--- 5140,5145 ----
+***************
+*** 5229,5235 ****
+ vim_free(wtitle);
+ }
+ else
+- # endif
+ MessageBox(NULL, msg, title, MB_ICONWARNING);
+ need_vimrun_warning = FALSE;
+ }
+--- 5151,5156 ----
+***************
+*** 5294,5301 ****
+ DWORD dwFlagsAndAttributes)
+ {
+ HANDLE h;
+- # ifdef FEAT_MBYTE
+ WCHAR *wn = NULL;
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ wn = enc_to_utf16(fname, NULL);
+--- 5215,5222 ----
+ DWORD dwFlagsAndAttributes)
+ {
+ HANDLE h;
+ WCHAR *wn = NULL;
++
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ wn = enc_to_utf16(fname, NULL);
+***************
+*** 5308,5314 ****
+ }
+ }
+ if (wn == NULL)
+- # endif
+ h = CreateFile((LPCSTR)fname, dwDesiredAccess, dwShareMode,
+ lpSecurityAttributes, dwCreationDisposition,
+ dwFlagsAndAttributes, NULL);
+--- 5229,5234 ----
+***************
+*** 6339,6345 ****
+ COORD coord = g_coord;
+ DWORD written;
+
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ static WCHAR *unicodebuf = NULL;
+--- 6259,6264 ----
+***************
+*** 6392,6398 ****
+ }
+ }
+ else
+- #endif
+ {
+ if (!USE_VTP)
+ {
+--- 6311,6316 ----
+***************
+*** 6763,6772 ****
+ int
+ mch_remove(char_u *name)
+ {
+- #ifdef FEAT_MBYTE
+ WCHAR *wn = NULL;
+ int n;
+- #endif
+
+ /*
+ * On Windows, deleting a directory's symbolic link is done by
+--- 6681,6688 ----
+***************
+*** 6777,6783 ****
+
+ win32_setattrs(name, FILE_ATTRIBUTE_NORMAL);
+
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ wn = enc_to_utf16(name, NULL);
+--- 6693,6698 ----
+***************
+*** 6788,6794 ****
+ return n;
+ }
+ }
+- #endif
+ return DeleteFile((LPCSTR)name) ? 0 : -1;
+ }
+
+--- 6703,6708 ----
+***************
+*** 6839,6845 ****
+ return (long_u)((ms.ullTotalPhys - WINNT_RESERVE_BYTES) / 1024);
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Same code as below, but with wide functions and no comments.
+ * Return 0 for success, non-zero for failure.
+--- 6753,6758 ----
+***************
+*** 6893,6899 ****
+
+ return 0;
+ }
+- #endif
+
+
+ /*
+--- 6806,6811 ----
+***************
+*** 6924,6930 ****
+ char szNewPath[_MAX_PATH+1];
+ char *pszFilePart;
+ HANDLE hf;
+- #ifdef FEAT_MBYTE
+ WCHAR *wold = NULL;
+ WCHAR *wnew = NULL;
+ int retval = -1;
+--- 6836,6841 ----
+***************
+*** 6939,6945 ****
+ vim_free(wnew);
+ return retval;
+ }
+- #endif
+
+ /*
+ * No need to play tricks unless the file name contains a "~" as the
+--- 6850,6855 ----
+***************
+*** 7024,7048 ****
+ {
+ HANDLE hFile;
+ int retval = -1; /* default: fail */
+- #ifdef FEAT_MBYTE
+ WCHAR *wn = NULL;
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ wn = enc_to_utf16((char_u *)n, NULL);
+- #endif
+
+ if (mch_isdir((char_u *)n))
+ {
+ char TempName[_MAX_PATH + 16] = "";
+- #ifdef FEAT_MBYTE
+ WCHAR TempNameW[_MAX_PATH + 16] = L"";
+- #endif
+
+ if (p & R_OK)
+ {
+ /* Read check is performed by seeing if we can do a find file on
+ * the directory for any file. */
+- #ifdef FEAT_MBYTE
+ if (wn != NULL)
+ {
+ int i;
+--- 6934,6953 ----
+***************
+*** 7062,7068 ****
+ (void)FindClose(hFile);
+ }
+ else
+- #endif
+ {
+ char *pch;
+ WIN32_FIND_DATA d;
+--- 6967,6972 ----
+***************
+*** 7087,7093 ****
+ * directories on read-only network shares. However, in
+ * directories whose ACL allows writes but denies deletes will end
+ * up keeping the temporary file :-(. */
+- #ifdef FEAT_MBYTE
+ if (wn != NULL)
+ {
+ if (!GetTempFileNameW(wn, L"VIM", 0, TempNameW))
+--- 6991,6996 ----
+***************
+*** 7096,7102 ****
+ DeleteFileW(TempNameW);
+ }
+ else
+- #endif
+ {
+ if (!GetTempFileName(n, "VIM", 0, TempName))
+ goto getout;
+--- 6999,7004 ----
+***************
+*** 7114,7125 ****
+ DWORD access_mode = ((p & W_OK) ? GENERIC_WRITE : 0)
+ | ((p & R_OK) ? GENERIC_READ : 0);
+
+- #ifdef FEAT_MBYTE
+ if (wn != NULL)
+ hFile = CreateFileW(wn, access_mode, share_mode,
+ NULL, OPEN_EXISTING, 0, NULL);
+ else
+- #endif
+ hFile = CreateFile(n, access_mode, share_mode,
+ NULL, OPEN_EXISTING, 0, NULL);
+ if (hFile == INVALID_HANDLE_VALUE)
+--- 7016,7025 ----
+***************
+*** 7129,7141 ****
+
+ retval = 0; /* success */
+ getout:
+- #ifdef FEAT_MBYTE
+ vim_free(wn);
+- #endif
+ return retval;
+ }
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Version of open() that may use UTF-16 file name.
+ */
+--- 7029,7038 ----
+***************
+*** 7143,7149 ****
+ mch_open(const char *name, int flags, int mode)
+ {
+ /* _wopen() does not work with Borland C 5.5: creates a read-only file. */
+! # ifndef __BORLANDC__
+ WCHAR *wn;
+ int f;
+
+--- 7040,7046 ----
+ mch_open(const char *name, int flags, int mode)
+ {
+ /* _wopen() does not work with Borland C 5.5: creates a read-only file. */
+! #ifndef __BORLANDC__
+ WCHAR *wn;
+ int f;
+
+***************
+*** 7157,7163 ****
+ return f;
+ }
+ }
+! # endif
+
+ /* open() can open a file which name is longer than _MAX_PATH bytes
+ * and shorter than _MAX_PATH characters successfully, but sometimes it
+--- 7054,7060 ----
+ return f;
+ }
+ }
+! #endif
+
+ /* open() can open a file which name is longer than _MAX_PATH bytes
+ * and shorter than _MAX_PATH characters successfully, but sometimes it
+***************
+*** 7180,7186 ****
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+! # if defined(DEBUG) && _MSC_VER >= 1400
+ /* Work around an annoying assertion in the Microsoft debug CRT
+ * when mode's text/binary setting doesn't match _get_fmode(). */
+ char newMode = mode[strlen(mode) - 1];
+--- 7077,7083 ----
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+! #if defined(DEBUG) && _MSC_VER >= 1400
+ /* Work around an annoying assertion in the Microsoft debug CRT
+ * when mode's text/binary setting doesn't match _get_fmode(). */
+ char newMode = mode[strlen(mode) - 1];
+***************
+*** 7191,7197 ****
+ _set_fmode(_O_TEXT);
+ else if (newMode == 'b')
+ _set_fmode(_O_BINARY);
+! # endif
+ wn = enc_to_utf16((char_u *)name, NULL);
+ wm = enc_to_utf16((char_u *)mode, NULL);
+ if (wn != NULL && wm != NULL)
+--- 7088,7094 ----
+ _set_fmode(_O_TEXT);
+ else if (newMode == 'b')
+ _set_fmode(_O_BINARY);
+! #endif
+ wn = enc_to_utf16((char_u *)name, NULL);
+ wm = enc_to_utf16((char_u *)mode, NULL);
+ if (wn != NULL && wm != NULL)
+***************
+*** 7199,7207 ****
+ vim_free(wn);
+ vim_free(wm);
+
+! # if defined(DEBUG) && _MSC_VER >= 1400
+ _set_fmode(oldMode);
+! # endif
+ return f;
+ }
+
+--- 7096,7104 ----
+ vim_free(wn);
+ vim_free(wm);
+
+! #if defined(DEBUG) && _MSC_VER >= 1400
+ _set_fmode(oldMode);
+! #endif
+ return f;
+ }
+
+***************
+*** 7214,7222 ****
+
+ return fopen(name, mode);
+ }
+- #endif
+
+- #ifdef FEAT_MBYTE
+ /*
+ * SUB STREAM (aka info stream) handling:
+ *
+--- 7111,7117 ----
+***************
+*** 7360,7366 ****
+ vim_free(fromw);
+ vim_free(tow);
+ }
+- #endif
+
+ /*
+ * Copy file attributes from file "from" to file "to".
+--- 7255,7260 ----
+***************
+*** 7370,7380 ****
+ int
+ mch_copy_file_attribute(char_u *from, char_u *to)
+ {
+- #ifdef FEAT_MBYTE
+ /* File streams only work on Windows NT and later. */
+ PlatformId();
+ copy_infostreams(from, to);
+- #endif
+ return 0;
+ }
+
+--- 7264,7272 ----
+***************
+*** 7464,7470 ****
+ #endif
+
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * The command line arguments in UCS2
+ */
+--- 7356,7361 ----
+***************
+*** 7691,7697 ****
+
+ set_alist_count();
+ }
+- #endif
+
+ int
+ mch_setenv(char *var, char *value, int x)
+--- 7582,7587 ----
+***************
+*** 7704,7710 ****
+
+ sprintf((char *)envbuf, "%s=%s", var, value);
+
+- #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ WCHAR *p = enc_to_utf16(envbuf, NULL);
+--- 7594,7599 ----
+***************
+*** 7713,7726 ****
+ if (p == NULL)
+ return -1;
+ _wputenv(p);
+! # ifdef libintl_wputenv
+ libintl_wputenv(p);
+! # endif
+ /* Unlike Un*x systems, we can free the string for _wputenv(). */
+ vim_free(p);
+ }
+ else
+- #endif
+ {
+ _putenv((char *)envbuf);
+ #ifdef libintl_putenv
+--- 7602,7614 ----
+ if (p == NULL)
+ return -1;
+ _wputenv(p);
+! #ifdef libintl_wputenv
+ libintl_wputenv(p);
+! #endif
+ /* Unlike Un*x systems, we can free the string for _wputenv(). */
+ vim_free(p);
+ }
+ else
+ {
+ _putenv((char *)envbuf);
+ #ifdef libintl_putenv
+*** ../vim-8.1.0808/src/quickfix.c 2019-01-19 17:43:03.425449092 +0100
+--- src/quickfix.c 2019-01-24 16:07:06.165522202 +0100
+***************
+*** 804,810 ****
+ else
+ 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))
+ {
+--- 804,809 ----
+***************
+*** 827,833 ****
+ }
+ }
+ }
+- #endif
+
+ return QF_OK;
+ }
+--- 826,831 ----
+***************
+*** 872,880 ****
+ #endif
+ }
+
+- #ifdef FEAT_MBYTE
+ remove_bom(state->linebuf);
+- #endif
+
+ return QF_OK;
+ }
+--- 870,876 ----
+***************
+*** 1538,1548 ****
+ linenr_T lnumfirst,
+ linenr_T lnumlast)
+ {
+- #ifdef FEAT_MBYTE
+ pstate->vc.vc_type = CONV_NONE;
+ if (enc != NULL && *enc != NUL)
+ convert_setup(&pstate->vc, enc, p_enc);
+- #endif
+
+ if (efile != NULL && (pstate->fd = mch_fopen((char *)efile, "r")) == NULL)
+ {
+--- 1534,1542 ----
+***************
+*** 1576,1585 ****
+ fclose(pstate->fd);
+
+ vim_free(pstate->growbuf);
+- #ifdef FEAT_MBYTE
+ if (pstate->vc.vc_type != CONV_NONE)
+ convert_setup(&pstate->vc, NULL, NULL);
+- #endif
+ }
+
+ /*
+--- 1570,1577 ----
+***************
+*** 4690,4698 ****
+ return;
+ #endif
+ }
+- #ifdef FEAT_MBYTE
+ enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc;
+- #endif
+
+ if (is_loclist_cmd(eap->cmdidx))
+ wp = curwin;
+--- 4682,4688 ----
+***************
+*** 5032,5040 ****
+ }
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name, NULL, FALSE, curbuf);
+- #ifdef FEAT_MBYTE
+ enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc;
+- #endif
+ #ifdef FEAT_BROWSE
+ if (cmdmod.browse)
+ {
+--- 5022,5028 ----
+***************
+*** 7035,7043 ****
+ hgr_search_file(
+ qf_info_T *qi,
+ char_u *fname,
+- #ifdef FEAT_MBYTE
+ vimconv_T *p_vc,
+- #endif
+ regmatch_T *p_regmatch)
+ {
+ FILE *fd;
+--- 7023,7029 ----
+***************
+*** 7051,7057 ****
+ while (!vim_fgets(IObuff, IOSIZE, fd) && !got_int)
+ {
+ 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
+--- 7037,7043 ----
+ while (!vim_fgets(IObuff, IOSIZE, fd) && !got_int)
+ {
+ char_u *line = IObuff;
+!
+ // Convert a line if 'encoding' is not utf-8 and
+ // the line contains a non-ASCII character.
+ if (p_vc->vc_type != CONV_NONE
+***************
+*** 7061,7067 ****
+ if (line == NULL)
+ line = IObuff;
+ }
+- #endif
+
+ if (vim_regexec(p_regmatch, line, (colnr_T)0))
+ {
+--- 7047,7052 ----
+***************
+*** 7089,7105 ****
+ ) == FAIL)
+ {
+ got_int = TRUE;
+- #ifdef FEAT_MBYTE
+ if (line != IObuff)
+ vim_free(line);
+- #endif
+ break;
+ }
+ }
+- #ifdef FEAT_MBYTE
+ if (line != IObuff)
+ vim_free(line);
+- #endif
+ ++lnum;
+ line_breakcheck();
+ }
+--- 7074,7086 ----
+***************
+*** 7114,7123 ****
+ hgr_search_files_in_dir(
+ qf_info_T *qi,
+ char_u *dirname,
+! regmatch_T *p_regmatch
+! #ifdef FEAT_MBYTE
+! , vimconv_T *p_vc
+! #endif
+ #ifdef FEAT_MULTI_LANG
+ , char_u *lang
+ #endif
+--- 7095,7102 ----
+ hgr_search_files_in_dir(
+ qf_info_T *qi,
+ char_u *dirname,
+! regmatch_T *p_regmatch,
+! vimconv_T *p_vc
+ #ifdef FEAT_MULTI_LANG
+ , char_u *lang
+ #endif
+***************
+*** 7147,7157 ****
+ continue;
+ #endif
+
+! hgr_search_file(qi, fnames[fi],
+! #ifdef FEAT_MBYTE
+! p_vc,
+! #endif
+! p_regmatch);
+ }
+ FreeWild(fcount, fnames);
+ }
+--- 7126,7132 ----
+ continue;
+ #endif
+
+! hgr_search_file(qi, fnames[fi], p_vc, p_regmatch);
+ }
+ FreeWild(fcount, fnames);
+ }
+***************
+*** 7168,7174 ****
+ {
+ char_u *p;
+
+- #ifdef FEAT_MBYTE
+ vimconv_T vc;
+
+ // Help files are in utf-8 or latin1, convert lines when 'encoding'
+--- 7143,7148 ----
+***************
+*** 7176,7182 ****
+ 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;
+--- 7150,7155 ----
+***************
+*** 7184,7203 ****
+ {
+ copy_option_part(&p, NameBuff, MAXPATHL, ",");
+
+! hgr_search_files_in_dir(qi, NameBuff, p_regmatch
+! #ifdef FEAT_MBYTE
+! , &vc
+! #endif
+ #ifdef FEAT_MULTI_LANG
+ , lang
+ #endif
+ );
+ }
+
+- #ifdef FEAT_MBYTE
+ if (vc.vc_type != CONV_NONE)
+ convert_setup(&vc, NULL, NULL);
+- #endif
+ }
+
+ /*
+--- 7157,7171 ----
+ {
+ copy_option_part(&p, NameBuff, MAXPATHL, ",");
+
+! hgr_search_files_in_dir(qi, NameBuff, p_regmatch, &vc
+ #ifdef FEAT_MULTI_LANG
+ , lang
+ #endif
+ );
+ }
+
+ if (vc.vc_type != CONV_NONE)
+ convert_setup(&vc, NULL, NULL);
+ }
+
+ /*
+*** ../vim-8.1.0808/src/regexp.c 2019-01-20 15:30:36.893328693 +0100
+--- src/regexp.c 2019-01-24 16:11:49.839580685 +0100
+***************
+*** 359,367 ****
+
+ static char_u e_missingbracket[] = N_("E769: Missing ] after %s[");
+ static char_u e_reverse_range[] = N_("E944: Reverse range in character class");
+- #ifdef FEAT_MBYTE
+ static char_u e_large_class[] = N_("E945: Range too large in character class");
+- #endif
+ static char_u e_unmatchedpp[] = N_("E53: Unmatched %s%%(");
+ static char_u e_unmatchedp[] = N_("E54: Unmatched %s(");
+ static char_u e_unmatchedpar[] = N_("E55: Unmatched %s)");
+--- 359,365 ----
+***************
+*** 561,587 ****
+ done = TRUE;
+ }
+
+! #ifdef FEAT_MBYTE
+! # define ri_digit(c) (c < 0x100 && (class_tab[c] & RI_DIGIT))
+! # define ri_hex(c) (c < 0x100 && (class_tab[c] & RI_HEX))
+! # define ri_octal(c) (c < 0x100 && (class_tab[c] & RI_OCTAL))
+! # define ri_word(c) (c < 0x100 && (class_tab[c] & RI_WORD))
+! # define ri_head(c) (c < 0x100 && (class_tab[c] & RI_HEAD))
+! # define ri_alpha(c) (c < 0x100 && (class_tab[c] & RI_ALPHA))
+! # define ri_lower(c) (c < 0x100 && (class_tab[c] & RI_LOWER))
+! # define ri_upper(c) (c < 0x100 && (class_tab[c] & RI_UPPER))
+! # define ri_white(c) (c < 0x100 && (class_tab[c] & RI_WHITE))
+! #else
+! # define ri_digit(c) (class_tab[c] & RI_DIGIT)
+! # define ri_hex(c) (class_tab[c] & RI_HEX)
+! # define ri_octal(c) (class_tab[c] & RI_OCTAL)
+! # define ri_word(c) (class_tab[c] & RI_WORD)
+! # define ri_head(c) (class_tab[c] & RI_HEAD)
+! # define ri_alpha(c) (class_tab[c] & RI_ALPHA)
+! # define ri_lower(c) (class_tab[c] & RI_LOWER)
+! # define ri_upper(c) (class_tab[c] & RI_UPPER)
+! # define ri_white(c) (class_tab[c] & RI_WHITE)
+! #endif
+
+ /* flags for regflags */
+ #define RF_ICASE 1 /* ignore case */
+--- 559,573 ----
+ done = TRUE;
+ }
+
+! #define ri_digit(c) (c < 0x100 && (class_tab[c] & RI_DIGIT))
+! #define ri_hex(c) (c < 0x100 && (class_tab[c] & RI_HEX))
+! #define ri_octal(c) (c < 0x100 && (class_tab[c] & RI_OCTAL))
+! #define ri_word(c) (c < 0x100 && (class_tab[c] & RI_WORD))
+! #define ri_head(c) (c < 0x100 && (class_tab[c] & RI_HEAD))
+! #define ri_alpha(c) (c < 0x100 && (class_tab[c] & RI_ALPHA))
+! #define ri_lower(c) (c < 0x100 && (class_tab[c] & RI_LOWER))
+! #define ri_upper(c) (c < 0x100 && (class_tab[c] & RI_UPPER))
+! #define ri_white(c) (c < 0x100 && (class_tab[c] & RI_WHITE))
+
+ /* flags for regflags */
+ #define RF_ICASE 1 /* ignore case */
+***************
+*** 698,718 ****
+ static char_u *regpiece(int *);
+ static char_u *regatom(int *);
+ static char_u *regnode(int);
+- #ifdef FEAT_MBYTE
+ static int use_multibytecode(int c);
+- #endif
+ static int prog_magic_wrong(void);
+ static char_u *regnext(char_u *);
+ static void regc(int b);
+- #ifdef FEAT_MBYTE
+ static void regmbc(int c);
+! # define REGMBC(x) regmbc(x);
+! # define CASEMBC(x) case x:
+! #else
+! # define regmbc(c) regc(c)
+! # define REGMBC(x)
+! # define CASEMBC(x)
+! #endif
+ static void reginsert(int, char_u *);
+ static void reginsert_nr(int op, long val, char_u *opnd);
+ static void reginsert_limits(int, long, long, char_u *);
+--- 684,696 ----
+ static char_u *regpiece(int *);
+ static char_u *regatom(int *);
+ static char_u *regnode(int);
+ static int use_multibytecode(int c);
+ static int prog_magic_wrong(void);
+ static char_u *regnext(char_u *);
+ static void regc(int b);
+ static void regmbc(int c);
+! #define REGMBC(x) regmbc(x);
+! #define CASEMBC(x) case x:
+ static void reginsert(int, char_u *);
+ static void reginsert_nr(int op, long val, char_u *opnd);
+ static void reginsert_limits(int, long, long, char_u *);
+***************
+*** 747,763 ****
+
+ if (p[1] == '=')
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ l = (*mb_ptr2len)(p + 2);
+- #endif
+ if (p[l + 2] == '=' && p[l + 3] == ']')
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_ptr2char(p + 2);
+ else
+- #endif
+ c = p[2];
+ *pp += l + 4;
+ return c;
+--- 725,737 ----
+***************
+*** 798,807 ****
+ static void
+ reg_equi_class(int c)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 || STRCMP(p_enc, "latin1") == 0
+ || STRCMP(p_enc, "iso-8859-15") == 0)
+- #endif
+ {
+ #ifdef EBCDIC
+ int i;
+--- 772,779 ----
+***************
+*** 1134,1150 ****
+
+ if (p[0] != NUL && p[1] == '.')
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ l = (*mb_ptr2len)(p + 2);
+- #endif
+ if (p[l + 2] == '.' && p[l + 3] == ']')
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_ptr2char(p + 2);
+ else
+- #endif
+ c = p[2];
+ *pp += l + 4;
+ return c;
+--- 1106,1118 ----
+***************
+*** 1171,1179 ****
+ static char_u *
+ skip_anyof(char_u *p)
+ {
+- #ifdef FEAT_MBYTE
+ int l;
+- #endif
+
+ if (*p == '^') /* Complement of range. */
+ ++p;
+--- 1139,1145 ----
+***************
+*** 1181,1191 ****
+ ++p;
+ while (*p != NUL && *p != ']')
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
+ p += l;
+ else
+- #endif
+ if (*p == '-')
+ {
+ ++p;
+--- 1147,1155 ----
+***************
+*** 1395,1405 ****
+
+ if (OP(scan) == EXACTLY)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ r->regstart = (*mb_ptr2char)(OPERAND(scan));
+ else
+- #endif
+ r->regstart = *OPERAND(scan);
+ }
+ else if ((OP(scan) == BOW
+--- 1359,1367 ----
+***************
+*** 1409,1419 ****
+ || OP(scan) == MCLOSE + 0 || OP(scan) == NCLOSE)
+ && OP(regnext(scan)) == EXACTLY)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ r->regstart = (*mb_ptr2char)(OPERAND(regnext(scan)));
+ else
+- #endif
+ r->regstart = *OPERAND(regnext(scan));
+ }
+
+--- 1371,1379 ----
+***************
+*** 1696,1704 ****
+ cont = FALSE;
+ break;
+ case Magic('Z'):
+- #ifdef FEAT_MBYTE
+ regflags |= RF_ICOMBINE;
+- #endif
+ skipchr_keepstart();
+ break;
+ case Magic('c'):
+--- 1656,1662 ----
+***************
+*** 2008,2014 ****
+ p = vim_strchr(classchars, no_Magic(c));
+ if (p == NULL)
+ EMSG_RET_NULL(_("E63: invalid use of \\_"));
+! #ifdef FEAT_MBYTE
+ /* When '.' is followed by a composing char ignore the dot, so that
+ * the composing char is matched here. */
+ if (enc_utf8 && c == Magic('.') && utf_iscomposing(peekchr()))
+--- 1966,1972 ----
+ p = vim_strchr(classchars, no_Magic(c));
+ if (p == NULL)
+ EMSG_RET_NULL(_("E63: invalid use of \\_"));
+!
+ /* When '.' is followed by a composing char ignore the dot, so that
+ * the composing char is matched here. */
+ if (enc_utf8 && c == Magic('.') && utf_iscomposing(peekchr()))
+***************
+*** 2016,2022 ****
+ c = getchr();
+ goto do_multibyte;
+ }
+- #endif
+ ret = regnode(classcodes[p - classchars] + extra);
+ *flagp |= HASWIDTH | SIMPLE;
+ break;
+--- 1974,1979 ----
+***************
+*** 2268,2287 ****
+ EMSG2_RET_NULL(
+ _("E678: Invalid character after %s%%[dxouU]"),
+ reg_magic == MAGIC_ALL);
+- #ifdef FEAT_MBYTE
+ if (use_multibytecode(i))
+ ret = regnode(MULTIBYTECODE);
+ else
+- #endif
+ ret = regnode(EXACTLY);
+ if (i == 0)
+ regc(0x0a);
+ else
+- #ifdef FEAT_MBYTE
+ regmbc(i);
+- #else
+- regc(i);
+- #endif
+ regc(NUL);
+ *flagp |= HASWIDTH;
+ break;
+--- 2225,2238 ----
+***************
+*** 2403,2413 ****
+ endc = get_coll_element(&regparse);
+ if (endc == 0)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ endc = mb_ptr2char_adv(&regparse);
+ else
+- #endif
+ endc = *regparse++;
+ }
+
+--- 2354,2362 ----
+***************
+*** 2417,2423 ****
+
+ if (startc > endc)
+ EMSG_RET_NULL(_(e_reverse_range));
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && ((*mb_char2len)(startc) > 1
+ || (*mb_char2len)(endc) > 1))
+ {
+--- 2366,2371 ----
+***************
+*** 2428,2434 ****
+ regmbc(startc);
+ }
+ else
+- #endif
+ {
+ #ifdef EBCDIC
+ int alpha_only = FALSE;
+--- 2376,2381 ----
+***************
+*** 2488,2498 ****
+ if (startc == 0)
+ regc(0x0a);
+ else
+- #ifdef FEAT_MBYTE
+ regmbc(startc);
+- #else
+- regc(startc);
+- #endif
+ }
+ else
+ {
+--- 2435,2441 ----
+***************
+*** 2606,2612 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int len;
+--- 2549,2554 ----
+***************
+*** 2621,2627 ****
+ regc(*regparse++);
+ }
+ else
+- #endif
+ {
+ startc = *regparse++;
+ regc(startc);
+--- 2563,2568 ----
+***************
+*** 2645,2651 ****
+ {
+ int len;
+
+- #ifdef FEAT_MBYTE
+ /* A multi-byte character is handled as a separate atom if it's
+ * before a multi and when it's a composing char. */
+ if (use_multibytecode(c))
+--- 2586,2591 ----
+***************
+*** 2656,2662 ****
+ *flagp |= HASWIDTH | SIMPLE;
+ break;
+ }
+- #endif
+
+ ret = regnode(EXACTLY);
+
+--- 2596,2601 ----
+***************
+*** 2675,2681 ****
+ && !is_Magic(c))); ++len)
+ {
+ c = no_Magic(c);
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ regmbc(c);
+--- 2614,2619 ----
+***************
+*** 2695,2701 ****
+ }
+ }
+ else
+- #endif
+ regc(c);
+ c = getchr();
+ }
+--- 2633,2638 ----
+***************
+*** 2712,2718 ****
+ return ret;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Return TRUE if MULTIBYTECODE should be used instead of EXACTLY for
+ * character "c".
+--- 2649,2654 ----
+***************
+*** 2724,2730 ****
+ && (re_multi_type(peekchr()) != NOT_MULTI
+ || (enc_utf8 && utf_iscomposing(c)));
+ }
+- #endif
+
+ /*
+ * Emit a node.
+--- 2660,2665 ----
+***************
+*** 2759,2765 ****
+ *regcode++ = b;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Emit (if appropriate) a multi-byte character of code
+ */
+--- 2694,2699 ----
+***************
+*** 2773,2779 ****
+ else
+ regcode += (*mb_char2bytes)(c, regcode);
+ }
+- #endif
+
+ /*
+ * Insert an operator in front of already-emitted operand
+--- 2707,2712 ----
+***************
+*** 3139,3159 ****
+ * Next character can never be (made) magic?
+ * Then backslashing it won't do anything.
+ */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ curchr = (*mb_ptr2char)(regparse + 1);
+ else
+- #endif
+ curchr = c;
+ }
+ break;
+ }
+
+- #ifdef FEAT_MBYTE
+ default:
+ if (has_mbyte)
+ curchr = (*mb_ptr2char)(regparse);
+- #endif
+ }
+ }
+
+--- 3072,3088 ----
+***************
+*** 3173,3186 ****
+ prevchr_len = 0;
+ if (regparse[prevchr_len] != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ /* exclude composing chars that mb_ptr2len does include */
+ prevchr_len += utf_ptr2len(regparse + prevchr_len);
+ else if (has_mbyte)
+ prevchr_len += (*mb_ptr2len)(regparse + prevchr_len);
+ else
+- #endif
+ ++prevchr_len;
+ }
+ regparse += prevchr_len;
+--- 3102,3113 ----
+***************
+*** 3538,3548 ****
+ * contains '\c' or '\C' the value is overruled. */
+ int reg_ic;
+
+- #ifdef FEAT_MBYTE
+ /* Similar to "reg_ic", but only for 'combining' characters. Set with \Z
+ * flag in the regexp. Defaults to false, always. */
+ int reg_icombine;
+- #endif
+
+ /* Copy of "rmm_maxcol": maximum column to search for a match. Zero when
+ * there is no maximum. */
+--- 3465,3473 ----
+***************
+*** 3714,3722 ****
+ rex.reg_buf = curbuf;
+ rex.reg_win = NULL;
+ rex.reg_ic = rmp->rm_ic;
+- #ifdef FEAT_MBYTE
+ rex.reg_icombine = FALSE;
+- #endif
+ rex.reg_maxcol = 0;
+
+ return bt_regexec_both(line, col, NULL, NULL);
+--- 3639,3645 ----
+***************
+*** 3748,3756 ****
+ rex.reg_maxline = rex.reg_buf->b_ml.ml_line_count - lnum;
+ rex.reg_line_lbr = FALSE;
+ rex.reg_ic = rmp->rmm_ic;
+- #ifdef FEAT_MBYTE
+ rex.reg_icombine = FALSE;
+- #endif
+ rex.reg_maxcol = rmp->rmm_maxcol;
+
+ return bt_regexec_both(NULL, col, tm, timed_out);
+--- 3671,3677 ----
+***************
+*** 3827,3848 ****
+ else if (prog->regflags & RF_NOICASE)
+ rex.reg_ic = FALSE;
+
+- #ifdef FEAT_MBYTE
+ /* If pattern contains "\Z" overrule value of rex.reg_icombine */
+ if (prog->regflags & RF_ICOMBINE)
+ rex.reg_icombine = TRUE;
+- #endif
+
+ /* If there is a "must appear" string, look for it. */
+ if (prog->regmust != NULL)
+ {
+ int c;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = (*mb_ptr2char)(prog->regmust);
+ else
+- #endif
+ c = *prog->regmust;
+ s = line + col;
+
+--- 3748,3765 ----
+***************
+*** 3850,3867 ****
+ * This is used very often, esp. for ":global". Use three versions of
+ * the loop to avoid overhead of conditions.
+ */
+! if (!rex.reg_ic
+! #ifdef FEAT_MBYTE
+! && !has_mbyte
+! #endif
+! )
+ while ((s = vim_strbyte(s, c)) != NULL)
+ {
+ if (cstrncmp(s, prog->regmust, &prog->regmlen) == 0)
+ break; /* Found it. */
+ ++s;
+ }
+- #ifdef FEAT_MBYTE
+ else if (!rex.reg_ic || (!enc_utf8 && mb_char2len(c) > 1))
+ while ((s = vim_strchr(s, c)) != NULL)
+ {
+--- 3767,3779 ----
+ * This is used very often, esp. for ":global". Use three versions of
+ * the loop to avoid overhead of conditions.
+ */
+! if (!rex.reg_ic && !has_mbyte)
+ while ((s = vim_strbyte(s, c)) != NULL)
+ {
+ if (cstrncmp(s, prog->regmust, &prog->regmlen) == 0)
+ break; /* Found it. */
+ ++s;
+ }
+ else if (!rex.reg_ic || (!enc_utf8 && mb_char2len(c) > 1))
+ while ((s = vim_strchr(s, c)) != NULL)
+ {
+***************
+*** 3869,3875 ****
+ break; /* Found it. */
+ MB_PTR_ADV(s);
+ }
+- #endif
+ else
+ while ((s = cstrchr(s, c)) != NULL)
+ {
+--- 3781,3786 ----
+***************
+*** 3890,3908 ****
+ {
+ int c;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = (*mb_ptr2char)(rex.line + col);
+ else
+- #endif
+ c = rex.line[col];
+ if (prog->regstart == NUL
+ || prog->regstart == c
+! || (rex.reg_ic && ((
+! #ifdef FEAT_MBYTE
+! (enc_utf8 && utf_fold(prog->regstart) == utf_fold(c)))
+ || (c < 255 && prog->regstart < 255 &&
+- #endif
+ MB_TOLOWER(prog->regstart) == MB_TOLOWER(c)))))
+ retval = regtry(prog, col, tm, timed_out);
+ else
+--- 3801,3815 ----
+ {
+ int c;
+
+ if (has_mbyte)
+ c = (*mb_ptr2char)(rex.line + col);
+ else
+ c = rex.line[col];
+ if (prog->regstart == NUL
+ || prog->regstart == c
+! || (rex.reg_ic
+! && (((enc_utf8 && utf_fold(prog->regstart) == utf_fold(c)))
+ || (c < 255 && prog->regstart < 255 &&
+ MB_TOLOWER(prog->regstart) == MB_TOLOWER(c)))))
+ retval = regtry(prog, col, tm, timed_out);
+ else
+***************
+*** 3920,3930 ****
+ {
+ /* Skip until the char we know it must start with.
+ * Used often, do some work to avoid call overhead. */
+! if (!rex.reg_ic
+! #ifdef FEAT_MBYTE
+! && !has_mbyte
+! #endif
+! )
+ s = vim_strbyte(rex.line + col, prog->regstart);
+ else
+ s = cstrchr(rex.line + col, prog->regstart);
+--- 3827,3833 ----
+ {
+ /* Skip until the char we know it must start with.
+ * Used often, do some work to avoid call overhead. */
+! if (!rex.reg_ic && !has_mbyte)
+ s = vim_strbyte(rex.line + col, prog->regstart);
+ else
+ s = cstrchr(rex.line + col, prog->regstart);
+***************
+*** 3955,3965 ****
+ }
+ if (rex.line[col] == NUL)
+ break;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ col += (*mb_ptr2len)(rex.line + col);
+ else
+- #endif
+ ++col;
+ #ifdef FEAT_RELTIME
+ /* Check for timeout once in a twenty times to avoid overhead. */
+--- 3858,3866 ----
+***************
+*** 4116,4122 ****
+ return 1 + rex.lnum;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Get class of previous character.
+ */
+--- 4017,4022 ----
+***************
+*** 4125,4134 ****
+ {
+ if (rex.input > rex.line)
+ return mb_get_class_buf(rex.input - 1
+! - (*mb_head_off)(rex.line, rex.input - 1), rex.reg_buf);
+ return -1;
+ }
+- #endif
+
+ /*
+ * Return TRUE if the current rex.input position matches the Visual area.
+--- 4025,4033 ----
+ {
+ if (rex.input > rex.line)
+ return mb_get_class_buf(rex.input - 1
+! - (*mb_head_off)(rex.line, rex.input - 1), rex.reg_buf);
+ return -1;
+ }
+
+ /*
+ * Return TRUE if the current rex.input position matches the Visual area.
+***************
+*** 4339,4349 ****
+ {
+ if (WITH_NL(op))
+ op -= ADD_NL;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = (*mb_ptr2char)(rex.input);
+ else
+- #endif
+ c = *rex.input;
+ switch (op)
+ {
+--- 4238,4246 ----
+***************
+*** 4431,4437 ****
+ case BOW: /* \<word; rex.input points to w */
+ if (c == NUL) /* Can't match at end of line */
+ status = RA_NOMATCH;
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ {
+ int this_class;
+--- 4328,4333 ----
+***************
+*** 4443,4449 ****
+ else if (reg_prev_class() == this_class)
+ status = RA_NOMATCH; /* previous char is in same word */
+ }
+- #endif
+ else
+ {
+ if (!vim_iswordc_buf(c, rex.reg_buf) || (rex.input > rex.line
+--- 4339,4344 ----
+***************
+*** 4455,4461 ****
+ case EOW: /* word\>; rex.input points after d */
+ if (rex.input == rex.line) /* Can't match at start of line */
+ status = RA_NOMATCH;
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ {
+ int this_class, prev_class;
+--- 4350,4355 ----
+***************
+*** 4467,4473 ****
+ || prev_class == 0 || prev_class == 1)
+ status = RA_NOMATCH;
+ }
+- #endif
+ else
+ {
+ if (!vim_iswordc_buf(rex.input[-1], rex.reg_buf)
+--- 4361,4366 ----
+***************
+*** 4676,4686 ****
+ opnd = OPERAND(scan);
+ /* Inline the first byte, for speed. */
+ if (*opnd != *rex.input
+! && (!rex.reg_ic || (
+! #ifdef FEAT_MBYTE
+! !enc_utf8 &&
+! #endif
+! MB_TOLOWER(*opnd) != MB_TOLOWER(*rex.input))))
+ status = RA_NOMATCH;
+ else if (*opnd == NUL)
+ {
+--- 4569,4577 ----
+ opnd = OPERAND(scan);
+ /* Inline the first byte, for speed. */
+ if (*opnd != *rex.input
+! && (!rex.reg_ic
+! || (!enc_utf8
+! && MB_TOLOWER(*opnd) != MB_TOLOWER(*rex.input))))
+ status = RA_NOMATCH;
+ else if (*opnd == NUL)
+ {
+***************
+*** 4689,4699 ****
+ }
+ else
+ {
+! if (opnd[1] == NUL
+! #ifdef FEAT_MBYTE
+! && !(enc_utf8 && rex.reg_ic)
+! #endif
+! )
+ {
+ len = 1; /* matched a single byte above */
+ }
+--- 4580,4586 ----
+ }
+ else
+ {
+! if (opnd[1] == NUL && !(enc_utf8 && rex.reg_ic))
+ {
+ len = 1; /* matched a single byte above */
+ }
+***************
+*** 4704,4710 ****
+ if (cstrncmp(opnd, rex.input, &len) != 0)
+ status = RA_NOMATCH;
+ }
+- #ifdef FEAT_MBYTE
+ /* Check for following composing character, unless %C
+ * follows (skips over all composing chars). */
+ if (status != RA_NOMATCH
+--- 4591,4596 ----
+***************
+*** 4718,4724 ****
+ * for voweled Hebrew texts. */
+ status = RA_NOMATCH;
+ }
+- #endif
+ if (status != RA_NOMATCH)
+ rex.input += len;
+ }
+--- 4604,4609 ----
+***************
+*** 4735,4741 ****
+ ADVANCE_REGINPUT();
+ break;
+
+- #ifdef FEAT_MBYTE
+ case MULTIBYTECODE:
+ if (has_mbyte)
+ {
+--- 4620,4625 ----
+***************
+*** 4788,4803 ****
+ else
+ status = RA_NOMATCH;
+ break;
+- #endif
+ case RE_COMPOSING:
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ /* Skip composing characters. */
+ while (utf_iscomposing(utf_ptr2char(rex.input)))
+ MB_CPTR_ADV(rex.input);
+ }
+- #endif
+ break;
+
+ case NOTHING:
+--- 4672,4684 ----
+***************
+*** 5561,5567 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ char_u *line =
+--- 5442,5447 ----
+***************
+*** 5572,5578 ****
+ + rp->rs_un.regsave.rs_u.pos.col - 1) + 1;
+ }
+ else
+- #endif
+ --rp->rs_un.regsave.rs_u.pos.col;
+ }
+ }
+--- 5452,5457 ----
+***************
+*** 5952,5960 ****
+ do_class:
+ while (count < maxcount)
+ {
+- #ifdef FEAT_MBYTE
+ int l;
+! #endif
+ if (*scan == NUL)
+ {
+ if (!REG_MULTI || !WITH_NL(OP(p)) || rex.lnum > rex.reg_maxline
+--- 5831,5838 ----
+ do_class:
+ while (count < maxcount)
+ {
+ int l;
+!
+ if (*scan == NUL)
+ {
+ if (!REG_MULTI || !WITH_NL(OP(p)) || rex.lnum > rex.reg_maxline
+***************
+*** 5965,5978 ****
+ if (got_int)
+ break;
+ }
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte && (l = (*mb_ptr2len)(scan)) > 1)
+ {
+ if (testval != 0)
+ break;
+ scan += l;
+ }
+- #endif
+ else if ((class_tab[*scan] & mask) == testval)
+ ++scan;
+ else if (rex.reg_line_lbr && *scan == '\n' && WITH_NL(OP(p)))
+--- 5843,5854 ----
+***************
+*** 6081,6087 ****
+ break;
+ }
+
+- #ifdef FEAT_MBYTE
+ case MULTIBYTECODE:
+ {
+ int i, len, cf = 0;
+--- 5957,5962 ----
+***************
+*** 6106,6112 ****
+ }
+ }
+ break;
+- #endif
+
+ case ANYOF:
+ case ANYOF + ADD_NL:
+--- 5981,5986 ----
+***************
+*** 6117,6125 ****
+ case ANYBUT + ADD_NL:
+ while (count < maxcount)
+ {
+- #ifdef FEAT_MBYTE
+ int len;
+! #endif
+ if (*scan == NUL)
+ {
+ if (!REG_MULTI || !WITH_NL(OP(p)) || rex.lnum > rex.reg_maxline
+--- 5991,5998 ----
+ case ANYBUT + ADD_NL:
+ while (count < maxcount)
+ {
+ int len;
+!
+ if (*scan == NUL)
+ {
+ if (!REG_MULTI || !WITH_NL(OP(p)) || rex.lnum > rex.reg_maxline
+***************
+*** 6132,6145 ****
+ }
+ else if (rex.reg_line_lbr && *scan == '\n' && WITH_NL(OP(p)))
+ ++scan;
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte && (len = (*mb_ptr2len)(scan)) > 1)
+ {
+ if ((cstrchr(opnd, (*mb_ptr2char)(scan)) == NULL) == testval)
+ break;
+ scan += len;
+ }
+- #endif
+ else
+ {
+ if ((cstrchr(opnd, *scan) == NULL) == testval)
+--- 6005,6016 ----
+***************
+*** 6955,6965 ****
+ sprintf(buf + STRLEN(buf), "BRACE_COMPLEX%d", OP(op) - BRACE_COMPLEX);
+ p = NULL;
+ break;
+- #ifdef FEAT_MBYTE
+ case MULTIBYTECODE:
+ p = "MULTIBYTECODE";
+ break;
+- #endif
+ case NEWL:
+ p = "NEWL";
+ break;
+--- 6826,6834 ----
+***************
+*** 6989,6995 ****
+ return OK;
+ }
+
+- #ifdef FEAT_MBYTE
+ typedef struct
+ {
+ int a, b, c;
+--- 6858,6863 ----
+***************
+*** 7067,7073 ****
+ *c2 = *c3 = 0;
+ }
+ }
+- #endif
+
+ /*
+ * Compare two strings, ignore case if rex.reg_ic set.
+--- 6935,6940 ----
+***************
+*** 7084,7090 ****
+ else
+ result = MB_STRNICMP(s1, s2, *n);
+
+- #ifdef FEAT_MBYTE
+ /* if it failed and it's utf8 and we want to combineignore: */
+ if (result != 0 && enc_utf8 && rex.reg_icombine)
+ {
+--- 6951,6956 ----
+***************
+*** 7121,7127 ****
+ if (result == 0)
+ *n = (int)(str2 - s2);
+ }
+- #endif
+
+ return result;
+ }
+--- 6987,6992 ----
+***************
+*** 7135,7155 ****
+ char_u *p;
+ int cc;
+
+! if (!rex.reg_ic
+! #ifdef FEAT_MBYTE
+! || (!enc_utf8 && mb_char2len(c) > 1)
+! #endif
+! )
+ return vim_strchr(s, c);
+
+ /* tolower() and toupper() can be slow, comparing twice should be a lot
+ * faster (esp. when using MS Visual C++!).
+ * For UTF-8 need to use folded case. */
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && c > 0x80)
+ cc = utf_fold(c);
+ else
+- #endif
+ if (MB_ISUPPER(c))
+ cc = MB_TOLOWER(c);
+ else if (MB_ISLOWER(c))
+--- 7000,7014 ----
+ char_u *p;
+ int cc;
+
+! if (!rex.reg_ic || (!enc_utf8 && mb_char2len(c) > 1))
+ return vim_strchr(s, c);
+
+ /* tolower() and toupper() can be slow, comparing twice should be a lot
+ * faster (esp. when using MS Visual C++!).
+ * For UTF-8 need to use folded case. */
+ if (enc_utf8 && c > 0x80)
+ cc = utf_fold(c);
+ else
+ if (MB_ISUPPER(c))
+ cc = MB_TOLOWER(c);
+ else if (MB_ISLOWER(c))
+***************
+*** 7157,7163 ****
+ else
+ return vim_strchr(s, c);
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ for (p = s; *p != NUL; p += (*mb_ptr2len)(p))
+--- 7016,7021 ----
+***************
+*** 7172,7178 ****
+ }
+ }
+ else
+- #endif
+ /* Faster version for when there are no multi-byte characters. */
+ for (p = s; *p != NUL; ++p)
+ if (*p == c || *p == cc)
+--- 7030,7035 ----
+***************
+*** 7285,7294 ****
+ {
+ if (*p == '\\' && p[1]) /* skip escaped characters */
+ ++p;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ p += (*mb_ptr2len)(p) - 1;
+- #endif
+ }
+ }
+
+--- 7142,7149 ----
+***************
+*** 7682,7691 ****
+ c = *src++;
+ }
+ }
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ c = mb_ptr2char(src - 1);
+- #endif
+
+ /* Write to buffer, if copy is set. */
+ if (func_one != (fptr_T)NULL)
+--- 7537,7544 ----
+***************
+*** 7697,7703 ****
+ else /* just copy */
+ cc = c;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int totlen = mb_ptr2len(src - 1);
+--- 7550,7555 ----
+***************
+*** 7721,7729 ****
+ }
+ src += totlen - 1;
+ }
+! else
+! #endif
+! if (copy)
+ *dst = cc;
+ dst++;
+ }
+--- 7573,7579 ----
+ }
+ src += totlen - 1;
+ }
+! else if (copy)
+ *dst = cc;
+ dst++;
+ }
+***************
+*** 7799,7809 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_ptr2char(s);
+ else
+- #endif
+ c = *s;
+
+ if (func_one != (fptr_T)NULL)
+--- 7649,7657 ----
+***************
+*** 7815,7821 ****
+ else /* just copy */
+ cc = c;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int l;
+--- 7663,7668 ----
+***************
+*** 7833,7841 ****
+ mb_char2bytes(cc, dst);
+ dst += mb_char2len(cc) - 1;
+ }
+! else
+! #endif
+! if (copy)
+ *dst = cc;
+ dst++;
+ }
+--- 7680,7686 ----
+ mb_char2bytes(cc, dst);
+ dst += mb_char2len(cc) - 1;
+ }
+! else if (copy)
+ *dst = cc;
+ dst++;
+ }
+*** ../vim-8.1.0808/src/regexp_nfa.c 2019-01-15 20:19:36.747904404 +0100
+--- src/regexp_nfa.c 2019-01-24 16:14:10.790618054 +0100
+***************
+*** 487,497 ****
+ s = ret;
+ while (p->c > 0)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ s += (*mb_char2bytes)(p->c, s);
+ else
+- #endif
+ *s++ = p->c;
+ p = p->out;
+ }
+--- 487,495 ----
+***************
+*** 687,702 ****
+ nfa_emit_equi_class(int c)
+ {
+ #define EMIT2(c) EMIT(c); EMIT(NFA_CONCAT);
+! #ifdef FEAT_MBYTE
+! # define EMITMBC(c) EMIT(c); EMIT(NFA_CONCAT);
+! #else
+! # define EMITMBC(c)
+! #endif
+
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 || STRCMP(p_enc, "latin1") == 0
+ || STRCMP(p_enc, "iso-8859-15") == 0)
+- #endif
+ {
+ #ifdef EBCDIC
+ # define A_circumflex 0x62
+--- 685,694 ----
+ nfa_emit_equi_class(int c)
+ {
+ #define EMIT2(c) EMIT(c); EMIT(NFA_CONCAT);
+! #define EMITMBC(c) EMIT(c); EMIT(NFA_CONCAT);
+
+ if (enc_utf8 || STRCMP(p_enc, "latin1") == 0
+ || STRCMP(p_enc, "iso-8859-15") == 0)
+ {
+ #ifdef EBCDIC
+ # define A_circumflex 0x62
+***************
+*** 1203,1211 ****
+ int got_coll_char;
+ char_u *p;
+ char_u *endp;
+- #ifdef FEAT_MBYTE
+ char_u *old_regparse = regparse;
+- #endif
+ int extra = 0;
+ int emit_range;
+ int negated;
+--- 1195,1201 ----
+***************
+*** 1310,1316 ****
+ siemsg("INTERNAL: Unknown character class char: %d", c);
+ return FAIL;
+ }
+! #ifdef FEAT_MBYTE
+ /* When '.' is followed by a composing char ignore the dot, so that
+ * the composing char is matched here. */
+ if (enc_utf8 && c == Magic('.') && utf_iscomposing(peekchr()))
+--- 1300,1306 ----
+ siemsg("INTERNAL: Unknown character class char: %d", c);
+ return FAIL;
+ }
+!
+ /* When '.' is followed by a composing char ignore the dot, so that
+ * the composing char is matched here. */
+ if (enc_utf8 && c == Magic('.') && utf_iscomposing(peekchr()))
+***************
+*** 1319,1325 ****
+ c = getchr();
+ goto nfa_do_multibyte;
+ }
+- #endif
+ EMIT(nfa_classcodes[p - classchars]);
+ if (extra == NFA_ADD_NL)
+ {
+--- 1309,1314 ----
+***************
+*** 1827,1835 ****
+ EMIT(NFA_RANGE);
+ EMIT(NFA_CONCAT);
+ }
+! else
+! #ifdef FEAT_MBYTE
+! if (has_mbyte && ((*mb_char2len)(startc) > 1
+ || (*mb_char2len)(endc) > 1))
+ {
+ /* Emit the characters in the range.
+--- 1816,1822 ----
+ EMIT(NFA_RANGE);
+ EMIT(NFA_CONCAT);
+ }
+! else if (has_mbyte && ((*mb_char2len)(startc) > 1
+ || (*mb_char2len)(endc) > 1))
+ {
+ /* Emit the characters in the range.
+***************
+*** 1842,1848 ****
+ }
+ }
+ else
+- #endif
+ {
+ #ifdef EBCDIC
+ int alpha_only = FALSE;
+--- 1829,1834 ----
+***************
+*** 1929,1935 ****
+
+ default:
+ {
+- #ifdef FEAT_MBYTE
+ int plen;
+
+ nfa_do_multibyte:
+--- 1915,1920 ----
+***************
+*** 1961,1967 ****
+ regparse = old_regparse + plen;
+ }
+ else
+- #endif
+ {
+ c = no_Magic(c);
+ EMIT(c);
+--- 1946,1951 ----
+***************
+*** 2211,2219 ****
+ break;
+
+ case Magic('Z'):
+- #ifdef FEAT_MBYTE
+ regflags |= RF_ICOMBINE;
+- #endif
+ skipchr_keepstart();
+ break;
+ case Magic('c'):
+--- 2195,2201 ----
+***************
+*** 2996,3008 ****
+ case NFA_START_COLL:
+ case NFA_START_NEG_COLL:
+ /* matches some character, including composing chars */
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ len += MB_MAXBYTES;
+ else if (has_mbyte)
+ len += 2;
+ else
+- #endif
+ ++len;
+ if (state->c != NFA_ANY)
+ {
+--- 2978,2988 ----
+***************
+*** 3048,3058 ****
+ case NFA_NUPPER_IC:
+ case NFA_ANY_COMPOSING:
+ /* possibly non-ascii */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ len += 3;
+ else
+- #endif
+ ++len;
+ break;
+
+--- 3028,3036 ----
+***************
+*** 3501,3507 ****
+ break;
+ }
+
+- #ifdef FEAT_MBYTE
+ case NFA_COMPOSING: /* char with composing char */
+ #if 0
+ /* TODO */
+--- 3479,3484 ----
+***************
+*** 3511,3517 ****
+ }
+ #endif
+ /* FALLTHROUGH */
+- #endif
+
+ case NFA_MOPEN: /* \( \) Submatch */
+ case NFA_MOPEN1:
+--- 3488,3493 ----
+***************
+*** 3558,3566 ****
+ case NFA_ZOPEN8: mclose = NFA_ZCLOSE8; break;
+ case NFA_ZOPEN9: mclose = NFA_ZCLOSE9; break;
+ #endif
+- #ifdef FEAT_MBYTE
+ case NFA_COMPOSING: mclose = NFA_END_COMPOSING; break;
+- #endif
+ default:
+ /* NFA_MOPEN, NFA_MOPEN1 .. NFA_MOPEN9 */
+ mclose = *p + NSUBEXP;
+--- 3534,3540 ----
+***************
+*** 3596,3606 ****
+ goto theend;
+ patch(e.out, s1);
+
+- #ifdef FEAT_MBYTE
+ if (mopen == NFA_COMPOSING)
+ /* COMPOSING->out1 = END_COMPOSING */
+ patch(list1(&s->out1), s1);
+- #endif
+
+ PUSH(frag(s, list1(&s1->out)));
+ break;
+--- 3570,3578 ----
+***************
+*** 5119,5128 ****
+ if ((int)(rex.input - rex.line) >= state->val)
+ {
+ rex.input -= state->val;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ rex.input -= mb_head_off(rex.line, rex.input);
+- #endif
+ }
+ else
+ rex.input = rex.line;
+--- 5091,5098 ----
+***************
+*** 5381,5391 ****
+ char_u *s;
+
+ /* Used often, do some work to avoid call overhead. */
+! if (!rex.reg_ic
+! #ifdef FEAT_MBYTE
+! && !has_mbyte
+! #endif
+! )
+ s = vim_strbyte(rex.line + *colp, c);
+ else
+ s = cstrchr(rex.line + *colp, c);
+--- 5351,5357 ----
+ char_u *s;
+
+ /* Used often, do some work to avoid call overhead. */
+! if (!rex.reg_ic && !has_mbyte)
+ s = vim_strbyte(rex.line + *colp, c);
+ else
+ s = cstrchr(rex.line + *colp, c);
+***************
+*** 5424,5435 ****
+ len2 += MB_CHAR2LEN(c2);
+ }
+ if (match
+- #ifdef FEAT_MBYTE
+ /* check that no composing char follows */
+ && !(enc_utf8
+! && utf_iscomposing(PTR2CHAR(rex.line + col + len2)))
+! #endif
+! )
+ {
+ cleanup_subexpr();
+ if (REG_MULTI)
+--- 5390,5398 ----
+ len2 += MB_CHAR2LEN(c2);
+ }
+ if (match
+ /* check that no composing char follows */
+ && !(enc_utf8
+! && utf_iscomposing(PTR2CHAR(rex.line + col + len2))))
+ {
+ cleanup_subexpr();
+ if (REG_MULTI)
+***************
+*** 5596,5609 ****
+ int curc;
+ int clen;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ curc = (*mb_ptr2char)(rex.input);
+ clen = (*mb_ptr2len)(rex.input);
+ }
+ else
+- #endif
+ {
+ curc = *rex.input;
+ clen = 1;
+--- 5559,5570 ----
+***************
+*** 5708,5719 ****
+ {
+ case NFA_MATCH:
+ {
+- #ifdef FEAT_MBYTE
+ /* If the match ends before a composing characters and
+ * rex.reg_icombine is not set, that is not really a match. */
+ if (enc_utf8 && !rex.reg_icombine && utf_iscomposing(curc))
+ break;
+! #endif
+ nfa_match = TRUE;
+ copy_sub(&submatch->norm, &t->subs.norm);
+ #ifdef FEAT_SYN_HL
+--- 5669,5679 ----
+ {
+ case NFA_MATCH:
+ {
+ /* If the match ends before a composing characters and
+ * rex.reg_icombine is not set, that is not really a match. */
+ if (enc_utf8 && !rex.reg_icombine && utf_iscomposing(curc))
+ break;
+!
+ nfa_match = TRUE;
+ copy_sub(&submatch->norm, &t->subs.norm);
+ #ifdef FEAT_SYN_HL
+***************
+*** 6024,6030 ****
+
+ if (curc == NUL)
+ result = FALSE;
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ {
+ int this_class;
+--- 5984,5989 ----
+***************
+*** 6036,6042 ****
+ else if (reg_prev_class() == this_class)
+ result = FALSE;
+ }
+- #endif
+ else if (!vim_iswordc_buf(curc, rex.reg_buf)
+ || (rex.input > rex.line
+ && vim_iswordc_buf(rex.input[-1], rex.reg_buf)))
+--- 5995,6000 ----
+***************
+*** 6052,6058 ****
+ result = TRUE;
+ if (rex.input == rex.line)
+ result = FALSE;
+- #ifdef FEAT_MBYTE
+ else if (has_mbyte)
+ {
+ int this_class, prev_class;
+--- 6010,6015 ----
+***************
+*** 6064,6070 ****
+ || prev_class == 0 || prev_class == 1)
+ result = FALSE;
+ }
+- #endif
+ else if (!vim_iswordc_buf(rex.input[-1], rex.reg_buf)
+ || (rex.input[0] != NUL
+ && vim_iswordc_buf(curc, rex.reg_buf)))
+--- 6021,6026 ----
+***************
+*** 6093,6099 ****
+ }
+ break;
+
+- #ifdef FEAT_MBYTE
+ case NFA_COMPOSING:
+ {
+ int mc = curc;
+--- 6049,6054 ----
+***************
+*** 6169,6175 ****
+ ADD_STATE_IF_MATCH(end);
+ break;
+ }
+- #endif
+
+ case NFA_NEWL:
+ if (curc == NUL && !rex.reg_line_lbr && REG_MULTI
+--- 6124,6129 ----
+***************
+*** 6274,6286 ****
+ case NFA_ANY_COMPOSING:
+ /* On a composing character skip over it. Otherwise do
+ * nothing. Always matches. */
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && utf_iscomposing(curc))
+ {
+ add_off = clen;
+ }
+ else
+- #endif
+ {
+ add_here = TRUE;
+ add_off = 0;
+--- 6228,6238 ----
+***************
+*** 6562,6571 ****
+ /* Bail out quickly when there can't be a match, avoid the
+ * overhead of win_linetabsize() on long lines. */
+ if (op != 1 && col > t->state->val
+! #ifdef FEAT_MBYTE
+! * (has_mbyte ? MB_MAXBYTES : 1)
+! #endif
+! )
+ break;
+ result = FALSE;
+ if (op == 1 && col - 1 > t->state->val && col > 100)
+--- 6514,6520 ----
+ /* Bail out quickly when there can't be a match, avoid the
+ * overhead of win_linetabsize() on long lines. */
+ if (op != 1 && col > t->state->val
+! * (has_mbyte ? MB_MAXBYTES : 1))
+ break;
+ result = FALSE;
+ if (op == 1 && col - 1 > t->state->val && col > 100)
+***************
+*** 6676,6687 ****
+
+ if (!result && rex.reg_ic)
+ result = MB_TOLOWER(c) == MB_TOLOWER(curc);
+- #ifdef FEAT_MBYTE
+ /* If rex.reg_icombine is not set only skip over the character
+ * itself. When it is set skip over composing characters. */
+ if (result && enc_utf8 && !rex.reg_icombine)
+ clen = utf_ptr2len(rex.input);
+- #endif
+ ADD_STATE_IF_MATCH(t->state);
+ break;
+ }
+--- 6625,6634 ----
+***************
+*** 7104,7114 ****
+ else if (prog->regflags & RF_NOICASE)
+ rex.reg_ic = FALSE;
+
+- #ifdef FEAT_MBYTE
+ /* If pattern contains "\Z" overrule value of rex.reg_icombine */
+ if (prog->regflags & RF_ICOMBINE)
+ rex.reg_icombine = TRUE;
+- #endif
+
+ rex.line = line;
+ rex.lnum = 0; /* relative to line */
+--- 7051,7059 ----
+***************
+*** 7149,7159 ****
+
+ /* If match_text is set it contains the full text that must match.
+ * Nothing else to try. Doesn't handle combining chars well. */
+! if (prog->match_text != NULL
+! #ifdef FEAT_MBYTE
+! && !rex.reg_icombine
+! #endif
+! )
+ return find_match_text(col, prog->regstart, prog->match_text);
+ }
+
+--- 7094,7100 ----
+
+ /* If match_text is set it contains the full text that must match.
+ * Nothing else to try. Doesn't handle combining chars well. */
+! if (prog->match_text != NULL && !rex.reg_icombine)
+ return find_match_text(col, prog->regstart, prog->match_text);
+ }
+
+***************
+*** 7334,7342 ****
+ rex.reg_buf = curbuf;
+ rex.reg_win = NULL;
+ rex.reg_ic = rmp->rm_ic;
+- #ifdef FEAT_MBYTE
+ rex.reg_icombine = FALSE;
+- #endif
+ rex.reg_maxcol = 0;
+ return nfa_regexec_both(line, col, NULL, NULL);
+ }
+--- 7275,7281 ----
+***************
+*** 7385,7393 ****
+ rex.reg_maxline = rex.reg_buf->b_ml.ml_line_count - lnum;
+ rex.reg_line_lbr = FALSE;
+ rex.reg_ic = rmp->rmm_ic;
+- #ifdef FEAT_MBYTE
+ rex.reg_icombine = FALSE;
+- #endif
+ rex.reg_maxcol = rmp->rmm_maxcol;
+
+ return nfa_regexec_both(NULL, col, tm, timed_out);
+--- 7324,7330 ----
+*** ../vim-8.1.0808/src/screen.c 2019-01-20 15:30:36.893328693 +0100
+--- src/screen.c 2019-01-24 16:22:53.839166984 +0100
+***************
+*** 144,152 ****
+ static int next_search_hl_pos(match_T *shl, linenr_T lnum, posmatch_T *pos, colnr_T mincol);
+ #endif
+ static void screen_char(unsigned off, int row, int col);
+- #ifdef FEAT_MBYTE
+ static void screen_char_2(unsigned off, int row, int col);
+- #endif
+ static void screenclear2(void);
+ static void lineclear(unsigned off, int width, int attr);
+ static void lineinvalid(unsigned off, int width);
+--- 144,150 ----
+***************
+*** 314,325 ****
+ int ret = 0;
+ schar_T *screenline; /* copy from ScreenLines[] */
+ sattr_T *screenattr; /* copy from ScreenAttrs[] */
+- #ifdef FEAT_MBYTE
+ int i;
+ u8char_T *screenlineUC = NULL; /* copy from ScreenLinesUC[] */
+ u8char_T *screenlineC[MAX_MCO]; /* copy from ScreenLinesC[][] */
+ schar_T *screenline2 = NULL; /* copy from ScreenLines2[] */
+- #endif
+
+ redraw_later(type);
+ if (msg_scrolled || (State != NORMAL && State != NORMAL_BUSY) || exiting)
+--- 312,321 ----
+***************
+*** 333,339 ****
+ (long_u)(rows * cols * sizeof(sattr_T)), FALSE);
+ if (screenline == NULL || screenattr == NULL)
+ ret = 2;
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ screenlineUC = (u8char_T *)lalloc(
+--- 329,334 ----
+***************
+*** 355,361 ****
+ if (screenline2 == NULL)
+ ret = 2;
+ }
+- #endif
+
+ if (ret != 2)
+ {
+--- 350,355 ----
+***************
+*** 368,374 ****
+ mch_memmove(screenattr + r * cols,
+ ScreenAttrs + LineOffset[cmdline_row + r],
+ (size_t)cols * sizeof(sattr_T));
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ mch_memmove(screenlineUC + r * cols,
+--- 362,367 ----
+***************
+*** 383,389 ****
+ mch_memmove(screenline2 + r * cols,
+ ScreenLines2 + LineOffset[cmdline_row + r],
+ (size_t)cols * sizeof(schar_T));
+- #endif
+ }
+
+ update_screen(0);
+--- 376,381 ----
+***************
+*** 402,408 ****
+ mch_memmove(ScreenAttrs + off,
+ screenattr + r * cols,
+ (size_t)cols * sizeof(sattr_T));
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ mch_memmove(ScreenLinesUC + off,
+--- 394,399 ----
+***************
+*** 417,423 ****
+ mch_memmove(ScreenLines2 + off,
+ screenline2 + r * cols,
+ (size_t)cols * sizeof(schar_T));
+- #endif
+ screen_line(cmdline_row + r, 0, cols, cols, FALSE);
+ }
+ ret = 4;
+--- 408,413 ----
+***************
+*** 426,432 ****
+
+ vim_free(screenline);
+ vim_free(screenattr);
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ vim_free(screenlineUC);
+--- 416,421 ----
+***************
+*** 435,441 ****
+ }
+ if (enc_dbcs == DBCS_JPNU)
+ vim_free(screenline2);
+- #endif
+
+ /* Show the intro message when appropriate. */
+ maybe_intro_message();
+--- 424,429 ----
+***************
+*** 830,838 ****
+ * uses that. */
+ gui.col = gui_cursor_col;
+ gui.row = gui_cursor_row;
+- # ifdef FEAT_MBYTE
+ gui.col = mb_fix_col(gui.col, gui.row);
+- # endif
+ gui_update_cursor(FALSE, FALSE);
+ gui_may_flush();
+ screen_cur_col = gui.col;
+--- 818,824 ----
+***************
+*** 2154,2160 ****
+ int i;
+
+ for (i = 0; i < Rows; ++i)
+- # ifdef FEAT_MBYTE
+ if (enc_utf8)
+ if ((*mb_off2cells)(LineOffset[i] + Columns - 2,
+ LineOffset[i] + screen_Columns) > 1)
+--- 2140,2145 ----
+***************
+*** 2162,2168 ****
+ else
+ screen_draw_rectangle(i, Columns - 1, 1, 1, FALSE);
+ else
+- # endif
+ screen_char(LineOffset[i] + Columns - 1, i, Columns - 1);
+ }
+ #endif
+--- 2147,2152 ----
+***************
+*** 2454,2460 ****
+ {
+ int off = (int)(current_ScreenLine - ScreenLines);
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int cells;
+--- 2438,2443 ----
+***************
+*** 2560,2566 ****
+ }
+ }
+ else
+- #endif
+ {
+ int len = (int)STRLEN(text);
+
+--- 2543,2548 ----
+***************
+*** 2639,2648 ****
+ {
+ ScreenLines[off] = cmdwin_type;
+ ScreenAttrs[off] = HL_ATTR(HLF_AT);
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ ScreenLinesUC[off] = 0;
+- #endif
+ ++col;
+ }
+ #endif
+--- 2621,2628 ----
+***************
+*** 2785,2791 ****
+ #endif
+ )
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ if (fill_fold >= 0x80)
+--- 2765,2770 ----
+***************
+*** 2802,2808 ****
+ col++;
+ }
+ else
+- #endif
+ ScreenLines[off + col++] = fill_fold;
+ }
+
+--- 2781,2786 ----
+***************
+*** 2929,2938 ****
+ int i;
+
+ mch_memmove(ScreenLines + off, buf, (size_t)len);
+- # ifdef FEAT_MBYTE
+ if (enc_utf8)
+ vim_memset(ScreenLinesUC + off, 0, sizeof(u8char_T) * (size_t)len);
+- # endif
+ for (i = 0; i < len; ++i)
+ ScreenAttrs[off + i] = attr;
+ }
+--- 2907,2914 ----
+***************
+*** 3126,3138 ****
+ 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 */
+ int mb_c = 0; /* decoded multi-byte character */
+ int mb_utf8 = FALSE; /* screen char is UTF-8 char */
+ int u8cc[MAX_MCO]; /* composing UTF-8 chars */
+- #endif
+ #ifdef FEAT_DIFF
+ int filler_lines; /* nr of filler lines to be drawn */
+ int filler_todo; /* nr of filler lines still to do + 1 */
+--- 3102,3112 ----
+***************
+*** 3555,3570 ****
+ v = wp->w_leftcol;
+ if (v > 0 && !number_only)
+ {
+- #ifdef FEAT_MBYTE
+ char_u *prev_ptr = ptr;
+! #endif
+ while (vcol < v && *ptr != NUL)
+ {
+ c = win_lbr_chartabsize(wp, line, ptr, (colnr_T)vcol, NULL);
+ vcol += c;
+- #ifdef FEAT_MBYTE
+ prev_ptr = ptr;
+- #endif
+ MB_PTR_ADV(ptr);
+ }
+
+--- 3529,3541 ----
+ v = wp->w_leftcol;
+ if (v > 0 && !number_only)
+ {
+ char_u *prev_ptr = ptr;
+!
+ while (vcol < v && *ptr != NUL)
+ {
+ c = win_lbr_chartabsize(wp, line, ptr, (colnr_T)vcol, NULL);
+ vcol += c;
+ prev_ptr = ptr;
+ MB_PTR_ADV(ptr);
+ }
+
+***************
+*** 3592,3609 ****
+ if (vcol > v)
+ {
+ vcol -= c;
+- #ifdef FEAT_MBYTE
+ ptr = prev_ptr;
+- #else
+- --ptr;
+- #endif
+ /* If the character fits on the screen, don't need to skip it.
+ * Except for a TAB. */
+! if ((
+! #ifdef FEAT_MBYTE
+! (*mb_ptr2cells)(ptr) >= c ||
+! #endif
+! *ptr == TAB) && col == 0)
+ n_skip = v - vcol;
+ }
+
+--- 3563,3572 ----
+ if (vcol > v)
+ {
+ vcol -= c;
+ ptr = prev_ptr;
+ /* If the character fits on the screen, don't need to skip it.
+ * Except for a TAB. */
+! if (( (*mb_ptr2cells)(ptr) >= c || *ptr == TAB) && col == 0)
+ n_skip = v - vcol;
+ }
+
+***************
+*** 3734,3744 ****
+ /* Highlight one character for an empty match. */
+ if (shl->startcol == shl->endcol)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && line[shl->endcol] != NUL)
+ shl->endcol += (*mb_ptr2len)(line + shl->endcol);
+ else
+- #endif
+ ++shl->endcol;
+ }
+ if ((long)shl->startcol < v) /* match at leftcol */
+--- 3697,3705 ----
+***************
+*** 4133,4142 ****
+ {
+ /* handle Visual or match highlighting in this line */
+ if (vcol == fromcol
+- #ifdef FEAT_MBYTE
+ || (has_mbyte && vcol + 1 == fromcol && n_extra == 0
+ && (*mb_ptr2cells)(ptr) > 1)
+- #endif
+ || ((int)vcol_prev == fromcol_prev
+ && vcol_prev < vcol /* not at margin */
+ && vcol < tocol))
+--- 4094,4101 ----
+***************
+*** 4182,4193 ****
+ && v >= (long)shl->startcol
+ && v < (long)shl->endcol)
+ {
+- #ifdef FEAT_MBYTE
+ int tmp_col = v + MB_PTR2LEN(ptr);
+
+ if (shl->endcol < tmp_col)
+ shl->endcol = tmp_col;
+- #endif
+ shl->attr_cur = shl->attr;
+ #ifdef FEAT_CONCEAL
+ if (cur != NULL && syn_name2id((char_u *)"Conceal")
+--- 4141,4150 ----
+***************
+*** 4226,4237 ****
+ {
+ /* highlight empty match, try again after
+ * it */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ shl->endcol += (*mb_ptr2len)(line
+ + shl->endcol);
+ else
+- #endif
+ ++shl->endcol;
+ }
+
+--- 4183,4192 ----
+***************
+*** 4402,4408 ****
+ if (c_extra != NUL || (n_extra == 1 && c_final != NUL))
+ {
+ c = (n_extra == 1 && c_final != NUL) ? c_final : c_extra;
+- #ifdef FEAT_MBYTE
+ mb_c = c; /* doesn't handle non-utf-8 multi-byte! */
+ if (enc_utf8 && utf_char2len(c) > 1)
+ {
+--- 4357,4362 ----
+***************
+*** 4412,4423 ****
+ }
+ else
+ mb_utf8 = FALSE;
+- #endif
+ }
+ else
+ {
+ c = *p_extra;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ mb_c = c;
+--- 4366,4375 ----
+***************
+*** 4473,4479 ****
+ p_extra += mb_l - 1;
+ }
+ }
+- #endif
+ ++p_extra;
+ }
+ --n_extra;
+--- 4425,4430 ----
+***************
+*** 4493,4499 ****
+ #ifdef FEAT_LINEBREAK
+ c0 = *ptr;
+ #endif
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ mb_c = c;
+--- 4444,4449 ----
+***************
+*** 4511,4519 ****
+ if (mb_c < 0x80)
+ {
+ c = mb_c;
+! # ifdef FEAT_LINEBREAK
+ c0 = mb_c;
+! # endif
+ }
+ mb_utf8 = TRUE;
+
+--- 4461,4469 ----
+ if (mb_c < 0x80)
+ {
+ c = mb_c;
+! #ifdef FEAT_LINEBREAK
+ c0 = mb_c;
+! #endif
+ }
+ mb_utf8 = TRUE;
+
+***************
+*** 4690,4696 ****
+ }
+
+ }
+- #endif
+ ++ptr;
+
+ if (extra_check)
+--- 4640,4645 ----
+***************
+*** 4783,4796 ****
+ char_u *prev_ptr, *p;
+ int len;
+ hlf_T spell_hlf = HLF_COUNT;
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ prev_ptr = ptr - mb_l;
+ v -= mb_l - 1;
+ }
+ else
+- # endif
+ prev_ptr = ptr - 1;
+
+ /* Use nextline[] if possible, it has the start of the
+--- 4732,4743 ----
+***************
+*** 4862,4875 ****
+ if (wp->w_p_lbr && c0 == c
+ && VIM_ISBREAK(c) && !VIM_ISBREAK((int)*ptr))
+ {
+- # ifdef FEAT_MBYTE
+ int mb_off = has_mbyte ? (*mb_head_off)(line, ptr - 1) : 0;
+! # endif
+! char_u *p = ptr - (
+! # ifdef FEAT_MBYTE
+! mb_off +
+! # endif
+! 1);
+
+ /* TODO: is passing p for start of the line OK? */
+ n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol,
+--- 4809,4816 ----
+ if (wp->w_p_lbr && c0 == c
+ && VIM_ISBREAK(c) && !VIM_ISBREAK((int)*ptr))
+ {
+ int mb_off = has_mbyte ? (*mb_head_off)(line, ptr - 1) : 0;
+! char_u *p = ptr - (mb_off + 1);
+
+ /* TODO: is passing p for start of the line OK? */
+ n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol,
+***************
+*** 4883,4893 ****
+ - vcol % (int)wp->w_buffer->b_p_ts - 1;
+ # endif
+
+- # ifdef FEAT_MBYTE
+ c_extra = mb_off > 0 ? MB_FILLER_CHAR : ' ';
+- # else
+- c_extra = ' ';
+- # endif
+ c_final = NUL;
+ if (VIM_ISWHITE(c))
+ {
+--- 4824,4830 ----
+***************
+*** 4906,4915 ****
+ */
+ if (wp->w_p_list
+ && (((c == 160
+! #ifdef FEAT_MBYTE
+! || (mb_utf8 && (mb_c == 160 || mb_c == 0x202f))
+! #endif
+! ) && lcs_nbsp)
+ || (c == ' ' && lcs_space && ptr - line <= trailcol)))
+ {
+ c = (c == ' ') ? lcs_space : lcs_nbsp;
+--- 4843,4850 ----
+ */
+ if (wp->w_p_list
+ && (((c == 160
+! || (mb_utf8 && (mb_c == 160 || mb_c == 0x202f)))
+! && lcs_nbsp)
+ || (c == ' ' && lcs_space && ptr - line <= trailcol)))
+ {
+ c = (c == ' ') ? lcs_space : lcs_nbsp;
+***************
+*** 4919,4925 ****
+ extra_attr = HL_ATTR(HLF_8);
+ saved_attr2 = char_attr; /* save current attr */
+ }
+- #ifdef FEAT_MBYTE
+ mb_c = c;
+ if (enc_utf8 && utf_char2len(c) > 1)
+ {
+--- 4854,4859 ----
+***************
+*** 4929,4935 ****
+ }
+ else
+ mb_utf8 = FALSE;
+- #endif
+ }
+
+ if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
+--- 4863,4868 ----
+***************
+*** 4941,4947 ****
+ extra_attr = HL_ATTR(HLF_8);
+ saved_attr2 = char_attr; /* save current attr */
+ }
+- #ifdef FEAT_MBYTE
+ mb_c = c;
+ if (enc_utf8 && utf_char2len(c) > 1)
+ {
+--- 4874,4879 ----
+***************
+*** 4951,4957 ****
+ }
+ else
+ mb_utf8 = FALSE;
+- #endif
+ }
+ }
+
+--- 4883,4888 ----
+***************
+*** 5012,5022 ****
+ /* if n_extra > 0, it gives the number of chars, to
+ * use for a tab, else we need to calculate the width
+ * for a tab */
+- #ifdef FEAT_MBYTE
+ len = (tab_len * mb_char2len(lcs_tab2));
+ if (n_extra > 0)
+ len += n_extra - tab_len;
+- #endif
+ c = lcs_tab1;
+ p = alloc((unsigned)(len + 1));
+ vim_memset(p, ' ', len);
+--- 4943,4951 ----
+***************
+*** 5030,5043 ****
+ tab_len = i;
+ break;
+ }
+- #ifdef FEAT_MBYTE
+ mb_char2bytes(lcs_tab2, p);
+ p += mb_char2len(lcs_tab2);
+ n_extra += mb_char2len(lcs_tab2)
+ - (saved_nextra > 0 ? 1 : 0);
+- #else
+- p[i] = lcs_tab2;
+- #endif
+ }
+ p_extra = p_extra_free;
+ #ifdef FEAT_CONCEAL
+--- 4959,4968 ----
+***************
+*** 5068,5076 ****
+ tab_len += vc_saved;
+ }
+ #endif
+- #ifdef FEAT_MBYTE
+ mb_utf8 = FALSE; /* don't draw as UTF-8 */
+- #endif
+ if (wp->w_p_list)
+ {
+ c = (n_extra == 0 && lcs_tab3) ? lcs_tab3 : lcs_tab1;
+--- 4993,4999 ----
+***************
+*** 5084,5090 ****
+ n_attr = tab_len + 1;
+ extra_attr = HL_ATTR(HLF_8);
+ saved_attr2 = char_attr; /* save current attr */
+- #ifdef FEAT_MBYTE
+ mb_c = c;
+ if (enc_utf8 && utf_char2len(c) > 1)
+ {
+--- 5007,5012 ----
+***************
+*** 5092,5098 ****
+ u8cc[0] = 0;
+ c = 0xc0;
+ }
+- #endif
+ }
+ else
+ {
+--- 5014,5019 ----
+***************
+*** 5160,5166 ****
+ extra_attr = HL_ATTR(HLF_AT);
+ n_attr = 1;
+ }
+- #ifdef FEAT_MBYTE
+ mb_c = c;
+ if (enc_utf8 && utf_char2len(c) > 1)
+ {
+--- 5081,5086 ----
+***************
+*** 5170,5176 ****
+ }
+ else
+ mb_utf8 = FALSE; /* don't draw as UTF-8 */
+- #endif
+ }
+ else if (c != NUL)
+ {
+--- 5090,5095 ----
+***************
+*** 5208,5216 ****
+ extra_attr = HL_ATTR(HLF_8);
+ saved_attr2 = char_attr; /* save current attr */
+ }
+- #ifdef FEAT_MBYTE
+ mb_utf8 = FALSE; /* don't draw as UTF-8 */
+- #endif
+ }
+ #ifdef FEAT_VIRTUALEDIT
+ else if (VIsual_active
+--- 5127,5133 ----
+***************
+*** 5339,5345 ****
+ is_concealing = TRUE;
+ n_skip = 1;
+ }
+- # ifdef FEAT_MBYTE
+ mb_c = c;
+ if (enc_utf8 && utf_char2len(c) > 1)
+ {
+--- 5256,5261 ----
+***************
+*** 5349,5355 ****
+ }
+ else
+ mb_utf8 = FALSE; /* don't draw as UTF-8 */
+- # endif
+ }
+ else
+ {
+--- 5265,5270 ----
+***************
+*** 5438,5444 ****
+ {
+ c = lcs_prec;
+ lcs_prec_todo = NUL;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (*mb_char2cells)(mb_c) > 1)
+ {
+ /* Double-width character being overwritten by the "precedes"
+--- 5353,5358 ----
+***************
+*** 5458,5464 ****
+ }
+ else
+ mb_utf8 = FALSE; /* don't draw as UTF-8 */
+- #endif
+ if (!attr_pri)
+ {
+ saved_attr3 = char_attr; /* save current attr */
+--- 5372,5377 ----
+***************
+*** 5554,5563 ****
+ {
+ /* Add a blank character to highlight. */
+ ScreenLines[off] = ' ';
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ ScreenLinesUC[off] = 0;
+- #endif
+ }
+ #ifdef FEAT_SEARCH_EXTRA
+ if (area_attr == 0)
+--- 5467,5474 ----
+***************
+*** 5657,5666 ****
+ while (col < wp->w_width)
+ {
+ ScreenLines[off] = ' ';
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ ScreenLinesUC[off] = 0;
+- #endif
+ ++col;
+ if (draw_color_col)
+ draw_color_col = advance_color_col(VCOL_HLC,
+--- 5568,5575 ----
+***************
+*** 5719,5725 ****
+ {
+ c = lcs_ext;
+ char_attr = HL_ATTR(HLF_AT);
+- #ifdef FEAT_MBYTE
+ mb_c = c;
+ if (enc_utf8 && utf_char2len(c) > 1)
+ {
+--- 5628,5633 ----
+***************
+*** 5729,5735 ****
+ }
+ else
+ mb_utf8 = FALSE;
+- #endif
+ }
+
+ #ifdef FEAT_SYN_HL
+--- 5637,5642 ----
+***************
+*** 5769,5775 ****
+ /*
+ * Store the character.
+ */
+! #if defined(FEAT_RIGHTLEFT) && defined(FEAT_MBYTE)
+ if (has_mbyte && wp->w_p_rl && (*mb_char2cells)(mb_c) > 1)
+ {
+ /* A double-wide character is: put first halve in left cell. */
+--- 5676,5682 ----
+ /*
+ * Store the character.
+ */
+! #if defined(FEAT_RIGHTLEFT)
+ if (has_mbyte && wp->w_p_rl && (*mb_char2cells)(mb_c) > 1)
+ {
+ /* A double-wide character is: put first halve in left cell. */
+***************
+*** 5778,5784 ****
+ }
+ #endif
+ ScreenLines[off] = c;
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs == DBCS_JPNU)
+ {
+ if ((mb_c & 0xff00) == 0x8e00)
+--- 5685,5690 ----
+***************
+*** 5810,5819 ****
+ multi_attr = 0;
+ }
+ else
+- #endif
+ ScreenAttrs[off] = char_attr;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (*mb_char2cells)(mb_c) > 1)
+ {
+ /* Need to fill two screen columns. */
+--- 5716,5723 ----
+***************
+*** 5844,5850 ****
+ }
+ #endif
+ }
+- #endif
+ #ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+ {
+--- 5748,5753 ----
+***************
+*** 5900,5923 ****
+ }
+
+
+- # ifdef FEAT_MBYTE
+ if (has_mbyte && (*mb_char2cells)(mb_c) > 1)
+ {
+ /* Need to fill two screen columns. */
+! # ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+ {
+ --boguscols;
+ --col;
+ }
+ else
+! # endif
+ {
+ ++boguscols;
+ ++col;
+ }
+ }
+- # endif
+
+ # ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+--- 5803,5824 ----
+ }
+
+
+ if (has_mbyte && (*mb_char2cells)(mb_c) > 1)
+ {
+ /* Need to fill two screen columns. */
+! # ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+ {
+ --boguscols;
+ --col;
+ }
+ else
+! # endif
+ {
+ ++boguscols;
+ ++col;
+ }
+ }
+
+ # ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+***************
+*** 6050,6056 ****
+ #ifdef FEAT_GUI
+ && !gui.in_use
+ #endif
+- #ifdef FEAT_MBYTE
+ && !(has_mbyte
+ && ((*mb_off2cells)(LineOffset[screen_row],
+ LineOffset[screen_row] + screen_Columns)
+--- 5951,5956 ----
+***************
+*** 6058,6066 ****
+ || (*mb_off2cells)(LineOffset[screen_row - 1]
+ + (int)Columns - 2,
+ LineOffset[screen_row] + screen_Columns)
+! == 2))
+! #endif
+! )
+ {
+ /* First make sure we are at the end of the screen line,
+ * then output the same character again to let the
+--- 5958,5964 ----
+ || (*mb_off2cells)(LineOffset[screen_row - 1]
+ + (int)Columns - 2,
+ LineOffset[screen_row] + screen_Columns)
+! == 2)))
+ {
+ /* First make sure we are at the end of the screen line,
+ * then output the same character again to let the
+***************
+*** 6071,6084 ****
+ + (unsigned)Columns - 1,
+ screen_row - 1, (int)(Columns - 1));
+
+- #ifdef FEAT_MBYTE
+ /* When there is a multi-byte character, just output a
+ * space to keep it simple. */
+ if (has_mbyte && MB_BYTE2LEN(ScreenLines[LineOffset[
+ screen_row - 1] + (Columns - 1)]) > 1)
+ out_char(' ');
+ else
+- #endif
+ out_char(ScreenLines[LineOffset[screen_row - 1]
+ + (Columns - 1)]);
+ /* force a redraw of the first char on the next line */
+--- 5969,5980 ----
+***************
+*** 6140,6146 ****
+ return row;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Return if the composing characters at "off_from" and "off_to" differ.
+ * Only to be used when ScreenLinesUC[off_from] != 0.
+--- 6036,6041 ----
+***************
+*** 6159,6165 ****
+ }
+ return FALSE;
+ }
+- #endif
+
+ /*
+ * Check whether the given character needs redrawing:
+--- 6054,6059 ----
+***************
+*** 6174,6181 ****
+ if (cols > 0
+ && ((ScreenLines[off_from] != ScreenLines[off_to]
+ || ScreenAttrs[off_from] != ScreenAttrs[off_to])
+-
+- #ifdef FEAT_MBYTE
+ || (enc_dbcs != 0
+ && MB_BYTE2LEN(ScreenLines[off_from]) > 1
+ && (enc_dbcs == DBCS_JPNU && ScreenLines[off_from] == 0x8e
+--- 6068,6073 ----
+***************
+*** 6188,6196 ****
+ && comp_char_differs(off_from, off_to))
+ || ((*mb_off2cells)(off_from, off_from + cols) > 1
+ && ScreenLines[off_from + 1]
+! != ScreenLines[off_to + 1])))
+! #endif
+! ))
+ return TRUE;
+ return FALSE;
+ }
+--- 6080,6086 ----
+ && comp_char_differs(off_from, off_to))
+ || ((*mb_off2cells)(off_from, off_from + cols) > 1
+ && ScreenLines[off_from + 1]
+! != ScreenLines[off_to + 1])))))
+ return TRUE;
+ return FALSE;
+ }
+***************
+*** 6227,6236 ****
+ {
+ unsigned off_from;
+ unsigned off_to;
+- #ifdef FEAT_MBYTE
+ unsigned max_off_from;
+ unsigned max_off_to;
+- #endif
+ int col = 0;
+ int hl;
+ int force = FALSE; /* force update rest of the line */
+--- 6117,6124 ----
+***************
+*** 6240,6253 ****
+ #endif
+ ;
+ int redraw_next; /* redraw_this for next character */
+- #ifdef FEAT_MBYTE
+ int clear_next = FALSE;
+ int char_cells; /* 1: normal char */
+ /* 2: occupies two display cells */
+ # define CHAR_CELLS char_cells
+- #else
+- # define CHAR_CELLS 1
+- #endif
+
+ /* Check for illegal row and col, just in case. */
+ if (row >= Rows)
+--- 6128,6137 ----
+***************
+*** 6261,6270 ****
+
+ off_from = (unsigned)(current_ScreenLine - ScreenLines);
+ off_to = LineOffset[row] + coloff;
+- #ifdef FEAT_MBYTE
+ max_off_from = off_from + screen_Columns;
+ max_off_to = LineOffset[row] + screen_Columns;
+- #endif
+
+ #ifdef FEAT_RIGHTLEFT
+ if (rlflag)
+--- 6145,6152 ----
+***************
+*** 6274,6283 ****
+ {
+ while (col <= endcol && ScreenLines[off_to] == ' '
+ && ScreenAttrs[off_to] == 0
+! # ifdef FEAT_MBYTE
+! && (!enc_utf8 || ScreenLinesUC[off_to] == 0)
+! # endif
+! )
+ {
+ ++off_to;
+ ++col;
+--- 6156,6162 ----
+ {
+ while (col <= endcol && ScreenLines[off_to] == ' '
+ && ScreenAttrs[off_to] == 0
+! && (!enc_utf8 || ScreenLinesUC[off_to] == 0))
+ {
+ ++off_to;
+ ++col;
+***************
+*** 6297,6308 ****
+
+ while (col < endcol)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (col + 1 < endcol))
+ char_cells = (*mb_off2cells)(off_from, max_off_from);
+ else
+ char_cells = 1;
+- #endif
+
+ redraw_this = redraw_next;
+ redraw_next = force || char_needs_redraw(off_from + CHAR_CELLS,
+--- 6176,6185 ----
+***************
+*** 6367,6373 ****
+ else
+ screen_attr = 0; /* highlighting has stopped */
+ }
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0)
+ {
+ /* Check if overwriting a double-byte with a single-byte or
+--- 6244,6249 ----
+***************
+*** 6410,6419 ****
+ && (*mb_off2cells)(off_to, max_off_to) == 1
+ && (*mb_off2cells)(off_to + 1, max_off_to) > 1)))
+ clear_next = TRUE;
+- #endif
+
+ ScreenLines[off_to] = ScreenLines[off_from];
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ ScreenLinesUC[off_to] = ScreenLinesUC[off_from];
+--- 6286,6293 ----
+***************
+*** 6427,6433 ****
+ }
+ if (char_cells == 2)
+ ScreenLines[off_to + 1] = ScreenLines[off_from + 1];
+- #endif
+
+ #if defined(FEAT_GUI) || defined(UNIX)
+ /* The bold trick makes a single column of pixels appear in the
+--- 6301,6306 ----
+***************
+*** 6454,6460 ****
+ }
+ #endif
+ ScreenAttrs[off_to] = ScreenAttrs[off_from];
+! #ifdef FEAT_MBYTE
+ /* For simplicity set the attributes of second half of a
+ * double-wide character equal to the first half. */
+ if (char_cells == 2)
+--- 6327,6333 ----
+ }
+ #endif
+ ScreenAttrs[off_to] = ScreenAttrs[off_from];
+!
+ /* For simplicity set the attributes of second half of a
+ * double-wide character equal to the first half. */
+ if (char_cells == 2)
+***************
+*** 6463,6469 ****
+ if (enc_dbcs != 0 && char_cells == 2)
+ screen_char_2(off_to, row, col + coloff);
+ else
+- #endif
+ screen_char(off_to, row, col + coloff);
+ }
+ else if ( p_wiv
+--- 6336,6341 ----
+***************
+*** 6489,6495 ****
+ col += CHAR_CELLS;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (clear_next)
+ {
+ /* Clear the second half of a double-wide character of which the left
+--- 6361,6366 ----
+***************
+*** 6499,6505 ****
+ ScreenLinesUC[off_to] = 0;
+ screen_char(off_to, row, col + coloff);
+ }
+- #endif
+
+ if (clear_width > 0
+ #ifdef FEAT_RIGHTLEFT
+--- 6370,6375 ----
+***************
+*** 6514,6523 ****
+ /* blank out the rest of the line */
+ while (col < clear_width && ScreenLines[off_to] == ' '
+ && ScreenAttrs[off_to] == 0
+! #ifdef FEAT_MBYTE
+! && (!enc_utf8 || ScreenLinesUC[off_to] == 0)
+! #endif
+! )
+ {
+ ++off_to;
+ ++col;
+--- 6384,6390 ----
+ /* blank out the rest of the line */
+ while (col < clear_width && ScreenLines[off_to] == ' '
+ && ScreenAttrs[off_to] == 0
+! && (!enc_utf8 || ScreenLinesUC[off_to] == 0))
+ {
+ ++off_to;
+ ++col;
+***************
+*** 6538,6544 ****
+ if (hl > HL_ALL || (hl & HL_BOLD))
+ {
+ int prev_cells = 1;
+! # ifdef FEAT_MBYTE
+ if (enc_utf8)
+ /* for utf-8, ScreenLines[char_offset + 1] == 0 means
+ * that its width is 2. */
+--- 6405,6411 ----
+ if (hl > HL_ALL || (hl & HL_BOLD))
+ {
+ int prev_cells = 1;
+!
+ if (enc_utf8)
+ /* for utf-8, ScreenLines[char_offset + 1] == 0 means
+ * that its width is 2. */
+***************
+*** 6561,6567 ****
+ screen_char_2(off_to - prev_cells, row,
+ col + coloff - prev_cells);
+ else
+- # endif
+ screen_char(off_to - prev_cells, row,
+ col + coloff - prev_cells);
+ }
+--- 6428,6433 ----
+***************
+*** 6583,6597 ****
+
+ c = fillchar_vsep(&hl);
+ if (ScreenLines[off_to] != (schar_T)c
+- #ifdef FEAT_MBYTE
+ || (enc_utf8 && (int)ScreenLinesUC[off_to]
+ != (c >= 0x80 ? c : 0))
+- #endif
+ || ScreenAttrs[off_to] != hl)
+ {
+ ScreenLines[off_to] = c;
+ ScreenAttrs[off_to] = hl;
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ if (c >= 0x80)
+--- 6449,6460 ----
+***************
+*** 6602,6608 ****
+ else
+ ScreenLinesUC[off_to] = 0;
+ }
+- #endif
+ screen_char(off_to, row, col + coloff);
+ }
+ }
+--- 6465,6470 ----
+***************
+*** 6808,6825 ****
+ #ifdef FEAT_MENU
+ int emenu;
+ #endif
+- #if defined(FEAT_MBYTE) || defined(FEAT_MENU)
+ int l;
+- #endif
+
+ if (matches == NULL) /* interrupted completion? */
+ return;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ buf = alloc((unsigned)Columns * MB_MAXBYTES + 1);
+ else
+- #endif
+ buf = alloc((unsigned)Columns + 1);
+ if (buf == NULL)
+ return;
+--- 6670,6683 ----
+***************
+*** 6912,6918 ****
+ {
+ s += skip_status_match_char(xp, s);
+ clen += ptr2cells(s);
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1)
+ {
+ STRNCPY(buf + len, s, l);
+--- 6770,6775 ----
+***************
+*** 6920,6926 ****
+ len += l;
+ }
+ else
+- #endif
+ {
+ STRCPY(buf + len, transchar_byte(*s));
+ len += (int)STRLEN(buf + len);
+--- 6777,6782 ----
+***************
+*** 7095,7132 ****
+ p = (char_u *)"<"; /* No room for file name! */
+ len = 1;
+ }
+! else
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! {
+! int clen = 0, i;
+!
+! /* Count total number of display cells. */
+! clen = mb_string2cells(p, -1);
+
+! /* Find first character that will fit.
+! * Going from start to end is much faster for DBCS. */
+! for (i = 0; p[i] != NUL && clen >= this_ru_col - 1;
+! i += (*mb_ptr2len)(p + i))
+! clen -= (*mb_ptr2cells)(p + i);
+! len = clen;
+! if (i > 0)
+! {
+! p = p + i - 1;
+! *p = '<';
+! ++len;
+! }
+
+! }
+! else
+! #endif
+! if (len > this_ru_col - 1)
+ {
+! p += len - (this_ru_col - 1);
+ *p = '<';
+! len = this_ru_col - 1;
+ }
+
+ row = W_WINROW(wp) + wp->w_height;
+ screen_puts(p, row, wp->w_wincol, attr);
+ screen_fill(row, row + 1, len + wp->w_wincol,
+--- 6951,6984 ----
+ p = (char_u *)"<"; /* No room for file name! */
+ len = 1;
+ }
+! else if (has_mbyte)
+! {
+! int clen = 0, i;
+
+! /* Count total number of display cells. */
+! clen = mb_string2cells(p, -1);
+
+! /* Find first character that will fit.
+! * Going from start to end is much faster for DBCS. */
+! for (i = 0; p[i] != NUL && clen >= this_ru_col - 1;
+! i += (*mb_ptr2len)(p + i))
+! clen -= (*mb_ptr2cells)(p + i);
+! len = clen;
+! if (i > 0)
+ {
+! p = p + i - 1;
+ *p = '<';
+! ++len;
+ }
+
++ }
++ else if (len > this_ru_col - 1)
++ {
++ p += len - (this_ru_col - 1);
++ *p = '<';
++ len = this_ru_col - 1;
++ }
++
+ row = W_WINROW(wp) + wp->w_height;
+ screen_puts(p, row, wp->w_wincol, attr);
+ screen_fill(row, row + 1, len + wp->w_wincol,
+***************
+*** 7397,7407 ****
+ len = (int)STRLEN(buf);
+ while (width < maxwidth && len < (int)sizeof(buf) - 1)
+ {
+- #ifdef FEAT_MBYTE
+ len += (*mb_char2bytes)(fillchar, buf + len);
+- #else
+- buf[len++] = fillchar;
+- #endif
+ ++width;
+ }
+ buf[len] = NUL;
+--- 7249,7255 ----
+***************
+*** 7470,7480 ****
+ {
+ char_u buf[MB_MAXBYTES + 1];
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ buf[(*mb_char2bytes)(c, buf)] = NUL;
+ else
+- #endif
+ {
+ buf[0] = c;
+ buf[1] = NUL;
+--- 7318,7326 ----
+***************
+*** 7499,7505 ****
+ bytes[0] = ScreenLines[off];
+ bytes[1] = NUL;
+
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && ScreenLinesUC[off] != 0)
+ bytes[utfc_char2bytes(off, bytes)] = NUL;
+ else if (enc_dbcs == DBCS_JPNU && ScreenLines[off] == 0x8e)
+--- 7345,7350 ----
+***************
+*** 7513,7523 ****
+ bytes[1] = ScreenLines[off + 1];
+ bytes[2] = NUL;
+ }
+- #endif
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Return TRUE if composing characters for screen posn "off" differs from
+ * composing characters in "u8cc".
+--- 7358,7366 ----
+***************
+*** 7537,7543 ****
+ }
+ return FALSE;
+ }
+- #endif
+
+ /*
+ * Put string '*text' on the screen at position 'row' and 'col', with
+--- 7380,7385 ----
+***************
+*** 7571,7606 ****
+ char_u *ptr = text;
+ int len = textlen;
+ int c;
+- #ifdef FEAT_MBYTE
+ unsigned max_off;
+ int mbyte_blen = 1;
+ int mbyte_cells = 1;
+ int u8c = 0;
+ int u8cc[MAX_MCO];
+ int clear_next_cell = FALSE;
+! # ifdef FEAT_ARABIC
+ int prev_c = 0; /* previous Arabic character */
+ int pc, nc, nc1;
+ int pcc[MAX_MCO];
+- # endif
+ #endif
+- #if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX)
+ int force_redraw_this;
+ int force_redraw_next = FALSE;
+- #endif
+ int need_redraw;
+
+ if (ScreenLines == NULL || row >= screen_Rows) /* safety check */
+ return;
+ off = LineOffset[row] + col;
+
+- #ifdef FEAT_MBYTE
+ /* When drawing over the right halve of a double-wide char clear out the
+ * left halve. Only needed in a terminal. */
+ if (has_mbyte && col > 0 && col < screen_Columns
+! # ifdef FEAT_GUI
+ && !gui.in_use
+! # endif
+ && mb_fix_col(col, row) != col)
+ {
+ ScreenLines[off - 1] = ' ';
+--- 7413,7443 ----
+ char_u *ptr = text;
+ int len = textlen;
+ int c;
+ unsigned max_off;
+ int mbyte_blen = 1;
+ int mbyte_cells = 1;
+ int u8c = 0;
+ int u8cc[MAX_MCO];
+ int clear_next_cell = FALSE;
+! #ifdef FEAT_ARABIC
+ int prev_c = 0; /* previous Arabic character */
+ int pc, nc, nc1;
+ int pcc[MAX_MCO];
+ #endif
+ int force_redraw_this;
+ int force_redraw_next = FALSE;
+ int need_redraw;
+
+ if (ScreenLines == NULL || row >= screen_Rows) /* safety check */
+ return;
+ off = LineOffset[row] + col;
+
+ /* When drawing over the right halve of a double-wide char clear out the
+ * left halve. Only needed in a terminal. */
+ if (has_mbyte && col > 0 && col < screen_Columns
+! #ifdef FEAT_GUI
+ && !gui.in_use
+! #endif
+ && mb_fix_col(col, row) != col)
+ {
+ ScreenLines[off - 1] = ' ';
+***************
+*** 7615,7631 ****
+ /* force the cell at "col" to be redrawn */
+ force_redraw_next = TRUE;
+ }
+- #endif
+
+- #ifdef FEAT_MBYTE
+ max_off = LineOffset[row] + screen_Columns;
+- #endif
+ while (col < screen_Columns
+ && (len < 0 || (int)(ptr - text) < len)
+ && *ptr != NUL)
+ {
+ c = *ptr;
+- #ifdef FEAT_MBYTE
+ /* check if this is the first byte of a multibyte */
+ if (has_mbyte)
+ {
+--- 7452,7464 ----
+***************
+*** 7645,7651 ****
+ else
+ u8c = utfc_ptr2char(ptr, u8cc);
+ mbyte_cells = utf_char2cells(u8c);
+! # ifdef UNICODE16
+ /* Non-BMP character: display as ? or fullwidth ?. */
+ if (u8c >= 0x10000)
+ {
+--- 7478,7484 ----
+ else
+ u8c = utfc_ptr2char(ptr, u8cc);
+ mbyte_cells = utf_char2cells(u8c);
+! #ifdef UNICODE16
+ /* Non-BMP character: display as ? or fullwidth ?. */
+ if (u8c >= 0x10000)
+ {
+***************
+*** 7653,7660 ****
+ if (attr == 0)
+ attr = HL_ATTR(HLF_8);
+ }
+! # endif
+! # ifdef FEAT_ARABIC
+ if (p_arshape && !p_tbidi && ARABIC_CHAR(u8c))
+ {
+ /* Do Arabic shaping. */
+--- 7486,7493 ----
+ if (attr == 0)
+ attr = HL_ATTR(HLF_8);
+ }
+! #endif
+! #ifdef FEAT_ARABIC
+ if (p_arshape && !p_tbidi && ARABIC_CHAR(u8c))
+ {
+ /* Do Arabic shaping. */
+***************
+*** 7676,7682 ****
+ }
+ else
+ prev_c = u8c;
+! # endif
+ if (col + mbyte_cells > screen_Columns)
+ {
+ /* Only 1 cell left, but character requires 2 cells:
+--- 7509,7515 ----
+ }
+ else
+ prev_c = u8c;
+! #endif
+ if (col + mbyte_cells > screen_Columns)
+ {
+ /* Only 1 cell left, but character requires 2 cells:
+***************
+*** 7686,7700 ****
+ }
+ }
+ }
+- #endif
+
+- #if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX)
+ force_redraw_this = force_redraw_next;
+ force_redraw_next = FALSE;
+- #endif
+
+ need_redraw = ScreenLines[off] != c
+- #ifdef FEAT_MBYTE
+ || (mbyte_cells == 2
+ && ScreenLines[off + 1] != (enc_dbcs ? ptr[1] : 0))
+ || (enc_dbcs == DBCS_JPNU
+--- 7519,7529 ----
+***************
+*** 7705,7719 ****
+ (u8char_T)(c < 0x80 && u8cc[0] == 0 ? 0 : u8c)
+ || (ScreenLinesUC[off] != 0
+ && screen_comp_differs(off, u8cc))))
+- #endif
+ || ScreenAttrs[off] != attr
+ || exmode_active;
+
+! if (need_redraw
+! #if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX)
+! || force_redraw_this
+! #endif
+! )
+ {
+ #if defined(FEAT_GUI) || defined(UNIX)
+ /* The bold trick makes a single row of pixels appear in the next
+--- 7534,7543 ----
+ (u8char_T)(c < 0x80 && u8cc[0] == 0 ? 0 : u8c)
+ || (ScreenLinesUC[off] != 0
+ && screen_comp_differs(off, u8cc))))
+ || ScreenAttrs[off] != attr
+ || exmode_active;
+
+! if (need_redraw || force_redraw_this)
+ {
+ #if defined(FEAT_GUI) || defined(UNIX)
+ /* The bold trick makes a single row of pixels appear in the next
+***************
+*** 7740,7746 ****
+ force_redraw_next = TRUE;
+ }
+ #endif
+- #ifdef FEAT_MBYTE
+ /* When at the end of the text and overwriting a two-cell
+ * character with a one-cell character, need to clear the next
+ * cell. Also when overwriting the left halve of a two-cell char
+--- 7564,7569 ----
+***************
+*** 7765,7774 ****
+ && (*mb_off2cells)(off, max_off) == 1
+ && (*mb_off2cells)(off + 1, max_off) > 1)))
+ ScreenLines[off + mbyte_blen] = 0;
+- #endif
+ ScreenLines[off] = c;
+ ScreenAttrs[off] = attr;
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ if (c < 0x80 && u8cc[0] == 0)
+--- 7588,7595 ----
+***************
+*** 7804,7813 ****
+ screen_char(off, row, col);
+ }
+ else
+- #endif
+ screen_char(off, row, col);
+ }
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ off += mbyte_cells;
+--- 7625,7632 ----
+***************
+*** 7821,7827 ****
+ }
+ }
+ else
+- #endif
+ {
+ ++off;
+ ++col;
+--- 7640,7645 ----
+***************
+*** 7829,7847 ****
+ }
+ }
+
+- #if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX)
+ /* If we detected the next character needs to be redrawn, but the text
+ * doesn't extend up to there, update the character here. */
+ if (force_redraw_next && col < screen_Columns)
+ {
+- # ifdef FEAT_MBYTE
+ if (enc_dbcs != 0 && dbcs_off2cells(off, max_off) > 1)
+ screen_char_2(off, row, col);
+ else
+- # endif
+ screen_char(off, row, col);
+ }
+- #endif
+ }
+
+ #ifdef FEAT_SEARCH_EXTRA
+--- 7647,7661 ----
+***************
+*** 8063,8073 ****
+ shl->lnum = 0;
+ break;
+ }
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ matchcol += mb_ptr2len(ml);
+ else
+- #endif
+ ++matchcol;
+ }
+ else
+--- 7877,7885 ----
+***************
+*** 8515,8521 ****
+ if (screen_attr != attr)
+ screen_start_highlight(attr);
+
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && ScreenLinesUC[off] != 0)
+ {
+ char_u buf[MB_MAXBYTES + 1];
+--- 8327,8332 ----
+***************
+*** 8523,8531 ****
+ if (utf_ambiguous_width(ScreenLinesUC[off]))
+ {
+ if (*p_ambw == 'd'
+! # ifdef FEAT_GUI
+ && !gui.in_use
+! # endif
+ )
+ {
+ /* Clear the two screen cells. If the character is actually
+--- 8334,8342 ----
+ if (utf_ambiguous_width(ScreenLinesUC[off]))
+ {
+ if (*p_ambw == 'd'
+! #ifdef FEAT_GUI
+ && !gui.in_use
+! #endif
+ )
+ {
+ /* Clear the two screen cells. If the character is actually
+***************
+*** 8545,8568 ****
+ out_str(buf);
+ }
+ else
+- #endif
+ {
+- #ifdef FEAT_MBYTE
+ out_flush_check();
+- #endif
+ out_char(ScreenLines[off]);
+- #ifdef FEAT_MBYTE
+ /* double-byte character in single-width cell */
+ if (enc_dbcs == DBCS_JPNU && ScreenLines[off] == 0x8e)
+ out_char(ScreenLines2[off]);
+- #endif
+ }
+
+ screen_cur_col++;
+ }
+
+- #ifdef FEAT_MBYTE
+-
+ /*
+ * Used for enc_dbcs only: Put one double-wide character at ScreenLines["off"]
+ * on the screen at position 'row' and 'col'.
+--- 8356,8372 ----
+***************
+*** 8590,8596 ****
+ out_char(ScreenLines[off + 1]);
+ ++screen_cur_col;
+ }
+- #endif
+
+ /*
+ * Draw a rectangle of the screen, inverted when "invert" is TRUE.
+--- 8394,8399 ----
+***************
+*** 8606,8614 ****
+ {
+ int r, c;
+ int off;
+- #ifdef FEAT_MBYTE
+ int max_off;
+- #endif
+
+ /* Can't use ScreenLines unless initialized */
+ if (ScreenLines == NULL)
+--- 8409,8415 ----
+***************
+*** 8619,8643 ****
+ for (r = row; r < row + height; ++r)
+ {
+ off = LineOffset[r];
+- #ifdef FEAT_MBYTE
+ max_off = off + screen_Columns;
+- #endif
+ for (c = col; c < col + width; ++c)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0 && dbcs_off2cells(off + c, max_off) > 1)
+ {
+ screen_char_2(off + c, r, c);
+ ++c;
+ }
+ else
+- #endif
+ {
+ screen_char(off + c, r, c);
+- #ifdef FEAT_MBYTE
+ if (utf_off2cells(off + c, max_off) > 1)
+ ++c;
+- #endif
+ }
+ }
+ }
+--- 8420,8438 ----
+***************
+*** 8675,8684 ****
+ {
+ ScreenLines[off] = ' ';
+ ScreenAttrs[off] = attr;
+- # ifdef FEAT_MBYTE
+ if (enc_utf8)
+ ScreenLinesUC[off] = 0;
+- # endif
+ }
+
+ /*
+--- 8470,8477 ----
+***************
+*** 8724,8734 ****
+ !IS_CTERM);
+ for (row = start_row; row < end_row; ++row)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte
+! # ifdef FEAT_GUI
+ && !gui.in_use
+! # endif
+ )
+ {
+ /* When drawing over the right halve of a double-wide char clear
+--- 8517,8526 ----
+ !IS_CTERM);
+ for (row = start_row; row < end_row; ++row)
+ {
+ if (has_mbyte
+! #ifdef FEAT_GUI
+ && !gui.in_use
+! #endif
+ )
+ {
+ /* When drawing over the right halve of a double-wide char clear
+***************
+*** 8740,8746 ****
+ if (end_col < screen_Columns && mb_fix_col(end_col, row) != end_col)
+ screen_puts_len((char_u *)" ", 1, row, end_col, 0);
+ }
+- #endif
+ /*
+ * Try to use delete-line termcap code, when no attributes or in a
+ * "normal" terminal, where a bold/italic space is just a
+--- 8532,8537 ----
+***************
+*** 8766,8778 ****
+ end_off = LineOffset[row] + end_col;
+
+ /* skip blanks (used often, keep it fast!) */
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ while (off < end_off && ScreenLines[off] == ' '
+ && ScreenAttrs[off] == 0 && ScreenLinesUC[off] == 0)
+ ++off;
+ else
+- #endif
+ while (off < end_off && ScreenLines[off] == ' '
+ && ScreenAttrs[off] == 0)
+ ++off;
+--- 8557,8567 ----
+***************
+*** 8798,8807 ****
+ for (col = start_col; col < end_col; ++col)
+ {
+ if (ScreenLines[off] != c
+- #ifdef FEAT_MBYTE
+ || (enc_utf8 && (int)ScreenLinesUC[off]
+ != (c >= 0x80 ? c : 0))
+- #endif
+ || ScreenAttrs[off] != attr
+ #if defined(FEAT_GUI) || defined(UNIX)
+ || force_next
+--- 8587,8594 ----
+***************
+*** 8834,8840 ****
+ }
+ #endif
+ ScreenLines[off] = c;
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ if (c >= 0x80)
+--- 8621,8626 ----
+***************
+*** 8845,8851 ****
+ else
+ ScreenLinesUC[off] = 0;
+ }
+- #endif
+ ScreenAttrs[off] = attr;
+ if (!did_delete || c != ' ')
+ screen_char(off, row, col);
+--- 8631,8636 ----
+***************
+*** 8925,8936 ****
+ int outofmem = FALSE;
+ int len;
+ schar_T *new_ScreenLines;
+- #ifdef FEAT_MBYTE
+ u8char_T *new_ScreenLinesUC = NULL;
+ u8char_T *new_ScreenLinesC[MAX_MCO];
+ schar_T *new_ScreenLines2 = NULL;
+ int i;
+- #endif
+ sattr_T *new_ScreenAttrs;
+ unsigned *new_LineOffset;
+ char_u *new_LineWraps;
+--- 8710,8719 ----
+***************
+*** 8949,8960 ****
+ if ((ScreenLines != NULL
+ && Rows == screen_Rows
+ && Columns == screen_Columns
+- #ifdef FEAT_MBYTE
+ && enc_utf8 == (ScreenLinesUC != NULL)
+ && (enc_dbcs == DBCS_JPNU) == (ScreenLines2 != NULL)
+! && p_mco == Screen_mco
+! #endif
+! )
+ || Rows == 0
+ || Columns == 0
+ || (!full_screen && ScreenLines == NULL))
+--- 8732,8740 ----
+ if ((ScreenLines != NULL
+ && Rows == screen_Rows
+ && Columns == screen_Columns
+ && enc_utf8 == (ScreenLinesUC != NULL)
+ && (enc_dbcs == DBCS_JPNU) == (ScreenLines2 != NULL)
+! && p_mco == Screen_mco)
+ || Rows == 0
+ || Columns == 0
+ || (!full_screen && ScreenLines == NULL))
+***************
+*** 8997,9003 ****
+
+ new_ScreenLines = (schar_T *)lalloc((long_u)(
+ (Rows + 1) * Columns * sizeof(schar_T)), FALSE);
+- #ifdef FEAT_MBYTE
+ vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T *) * MAX_MCO);
+ if (enc_utf8)
+ {
+--- 8777,8782 ----
+***************
+*** 9010,9016 ****
+ if (enc_dbcs == DBCS_JPNU)
+ new_ScreenLines2 = (schar_T *)lalloc((long_u)(
+ (Rows + 1) * Columns * sizeof(schar_T)), FALSE);
+- #endif
+ new_ScreenAttrs = (sattr_T *)lalloc((long_u)(
+ (Rows + 1) * Columns * sizeof(sattr_T)), FALSE);
+ new_LineOffset = (unsigned *)lalloc((long_u)(
+--- 8789,8794 ----
+***************
+*** 9031,9046 ****
+ outofmem = TRUE;
+ give_up:
+
+- #ifdef FEAT_MBYTE
+ for (i = 0; i < p_mco; ++i)
+ if (new_ScreenLinesC[i] == NULL)
+ break;
+- #endif
+ if (new_ScreenLines == NULL
+- #ifdef FEAT_MBYTE
+ || (enc_utf8 && (new_ScreenLinesUC == NULL || i != p_mco))
+ || (enc_dbcs == DBCS_JPNU && new_ScreenLines2 == NULL)
+- #endif
+ || new_ScreenAttrs == NULL
+ || new_LineOffset == NULL
+ || new_LineWraps == NULL
+--- 8809,8820 ----
+***************
+*** 9057,9068 ****
+ done_outofmem_msg = TRUE;
+ }
+ VIM_CLEAR(new_ScreenLines);
+- #ifdef FEAT_MBYTE
+ VIM_CLEAR(new_ScreenLinesUC);
+ for (i = 0; i < p_mco; ++i)
+ VIM_CLEAR(new_ScreenLinesC[i]);
+ VIM_CLEAR(new_ScreenLines2);
+- #endif
+ VIM_CLEAR(new_ScreenAttrs);
+ VIM_CLEAR(new_LineOffset);
+ VIM_CLEAR(new_LineWraps);
+--- 8831,8840 ----
+***************
+*** 9087,9093 ****
+ {
+ (void)vim_memset(new_ScreenLines + new_row * Columns,
+ ' ', (size_t)Columns * sizeof(schar_T));
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ (void)vim_memset(new_ScreenLinesUC + new_row * Columns,
+--- 8859,8864 ----
+***************
+*** 9100,9106 ****
+ if (enc_dbcs == DBCS_JPNU)
+ (void)vim_memset(new_ScreenLines2 + new_row * Columns,
+ 0, (size_t)Columns * sizeof(schar_T));
+- #endif
+ (void)vim_memset(new_ScreenAttrs + new_row * Columns,
+ 0, (size_t)Columns * sizeof(sattr_T));
+ old_row = new_row + (screen_Rows - Rows);
+--- 8871,8876 ----
+***************
+*** 9110,9125 ****
+ len = screen_Columns;
+ else
+ len = Columns;
+- #ifdef FEAT_MBYTE
+ /* When switching to utf-8 don't copy characters, they
+ * may be invalid now. Also when p_mco changes. */
+ if (!(enc_utf8 && ScreenLinesUC == NULL)
+ && p_mco == Screen_mco)
+- #endif
+ mch_memmove(new_ScreenLines + new_LineOffset[new_row],
+ ScreenLines + LineOffset[old_row],
+ (size_t)len * sizeof(schar_T));
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && ScreenLinesUC != NULL
+ && p_mco == Screen_mco)
+ {
+--- 8880,8892 ----
+***************
+*** 9136,9142 ****
+ mch_memmove(new_ScreenLines2 + new_LineOffset[new_row],
+ ScreenLines2 + LineOffset[old_row],
+ (size_t)len * sizeof(schar_T));
+- #endif
+ mch_memmove(new_ScreenAttrs + new_LineOffset[new_row],
+ ScreenAttrs + LineOffset[old_row],
+ (size_t)len * sizeof(sattr_T));
+--- 8903,8908 ----
+***************
+*** 9150,9162 ****
+ free_screenlines();
+
+ ScreenLines = new_ScreenLines;
+- #ifdef FEAT_MBYTE
+ ScreenLinesUC = new_ScreenLinesUC;
+ for (i = 0; i < p_mco; ++i)
+ ScreenLinesC[i] = new_ScreenLinesC[i];
+ Screen_mco = p_mco;
+ ScreenLines2 = new_ScreenLines2;
+- #endif
+ ScreenAttrs = new_ScreenAttrs;
+ LineOffset = new_LineOffset;
+ LineWraps = new_LineWraps;
+--- 8916,8926 ----
+***************
+*** 9213,9226 ****
+ void
+ free_screenlines(void)
+ {
+- #ifdef FEAT_MBYTE
+ int i;
+
+ vim_free(ScreenLinesUC);
+ for (i = 0; i < Screen_mco; ++i)
+ vim_free(ScreenLinesC[i]);
+ vim_free(ScreenLines2);
+- #endif
+ vim_free(ScreenLines);
+ vim_free(ScreenAttrs);
+ vim_free(LineOffset);
+--- 8977,8988 ----
+***************
+*** 9303,9313 ****
+ lineclear(unsigned off, int width, int attr)
+ {
+ (void)vim_memset(ScreenLines + off, ' ', (size_t)width * sizeof(schar_T));
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ (void)vim_memset(ScreenLinesUC + off, 0,
+ (size_t)width * sizeof(u8char_T));
+- #endif
+ (void)vim_memset(ScreenAttrs + off, attr, (size_t)width * sizeof(sattr_T));
+ }
+
+--- 9065,9073 ----
+***************
+*** 9332,9338 ****
+
+ mch_memmove(ScreenLines + off_to, ScreenLines + off_from,
+ wp->w_width * sizeof(schar_T));
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ int i;
+--- 9092,9097 ----
+***************
+*** 9346,9352 ****
+ if (enc_dbcs == DBCS_JPNU)
+ mch_memmove(ScreenLines2 + off_to, ScreenLines2 + off_from,
+ wp->w_width * sizeof(schar_T));
+- #endif
+ mch_memmove(ScreenAttrs + off_to, ScreenAttrs + off_from,
+ wp->w_width * sizeof(sattr_T));
+ }
+--- 9105,9110 ----
+***************
+*** 9533,9539 ****
+ if (i != 0)
+ cost = 999; /* different attributes, don't do it */
+ }
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ /* Don't use an UTF-8 char for positioning, it's slow. */
+--- 9291,9296 ----
+***************
+*** 9544,9550 ****
+ break;
+ }
+ }
+- #endif
+ }
+
+ /*
+--- 9301,9306 ----
+***************
+*** 9603,9617 ****
+ {
+ if (ScreenAttrs[off] != screen_attr)
+ screen_stop_highlight();
+- #ifdef FEAT_MBYTE
+ out_flush_check();
+- #endif
+ out_char(ScreenLines[off]);
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs == DBCS_JPNU
+ && ScreenLines[off] == 0x8e)
+ out_char(ScreenLines2[off]);
+- #endif
+ ++off;
+ }
+ }
+--- 9359,9369 ----
+***************
+*** 9660,9672 ****
+ #ifdef FEAT_RIGHTLEFT
+ /* With 'rightleft' set and the cursor on a double-wide
+ * character, position it on the leftmost column. */
+! curwin->w_p_rl ? ((int)curwin->w_width - curwin->w_wcol - (
+! # ifdef FEAT_MBYTE
+! (has_mbyte
+ && (*mb_ptr2cells)(ml_get_cursor()) == 2
+! && vim_isprintc(gchar_cursor())) ? 2 :
+! # endif
+! 1)) :
+ #endif
+ curwin->w_wcol));
+ }
+--- 9412,9421 ----
+ #ifdef FEAT_RIGHTLEFT
+ /* With 'rightleft' set and the cursor on a double-wide
+ * character, position it on the leftmost column. */
+! curwin->w_p_rl ? ((int)curwin->w_width - curwin->w_wcol
+! - ((has_mbyte
+ && (*mb_ptr2cells)(ml_get_cursor()) == 2
+! && vim_isprintc(gchar_cursor())) ? 2 : 1)) :
+ #endif
+ curwin->w_wcol));
+ }
+***************
+*** 10808,10823 ****
+ shorten_dir(NameBuff);
+ len = vim_strsize(NameBuff);
+ p = NameBuff;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ while (len > room)
+ {
+ len -= ptr2cells(p);
+ MB_PTR_ADV(p);
+ }
+! else
+! #endif
+! if (len > room)
+ {
+ p += len - room;
+ len = room;
+--- 10557,10569 ----
+ shorten_dir(NameBuff);
+ len = vim_strsize(NameBuff);
+ p = NameBuff;
+ if (has_mbyte)
+ while (len > room)
+ {
+ len -= ptr2cells(p);
+ MB_PTR_ADV(p);
+ }
+! else if (len > room)
+ {
+ p += len - room;
+ len = room;
+***************
+*** 11210,11227 ****
+ /* need at least 3 chars left for get_rel_pos() + NUL */
+ while (this_ru_col + o < width && RULER_BUF_LEN > i + 4)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ i += (*mb_char2bytes)(fillchar, buffer + i);
+ else
+- #endif
+ buffer[i++] = fillchar;
+ ++o;
+ }
+ get_rel_pos(wp, buffer + i, RULER_BUF_LEN - i);
+ }
+ /* Truncate at window boundary. */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ o = 0;
+--- 10956,10970 ----
+***************
+*** 11235,11243 ****
+ }
+ }
+ }
+! else
+! #endif
+! if (this_ru_col + (int)STRLEN(buffer) > width)
+ buffer[width - this_ru_col] = NUL;
+
+ screen_puts(buffer, row, this_ru_col + off, attr);
+--- 10978,10984 ----
+ }
+ }
+ }
+! else if (this_ru_col + (int)STRLEN(buffer) > width)
+ buffer[width - this_ru_col] = NUL;
+
+ screen_puts(buffer, row, this_ru_col + off, attr);
+*** ../vim-8.1.0808/src/version.c 2019-01-24 16:27:41.693254193 +0100
+--- src/version.c 2019-01-24 16:38:47.536784802 +0100
+***************
+*** 793,794 ****
+--- 793,796 ----
+ { /* Add new patch number below this line */
++ /**/
++ 809,
+ /**/
+
+--
+FATHER: One day, lad, all this will be yours ...
+PRINCE: What - the curtains?
+ "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.0810 b/data/vim/patches/8.1.0810
new file mode 100644
index 000000000..5a93267c2
--- /dev/null
+++ b/data/vim/patches/8.1.0810
@@ -0,0 +1,5176 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0810
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0810
+Problem: Too many #ifdefs.
+Solution: Graduate FEAT_MBYTE, part 4.
+Files: src/getchar.c, src/search.c, src/sign.c, src/spell.c,
+ src/spellfile.c, src/syntax.c, src/tag.c, src/term.c, src/ui.c,
+ src/version.c, src/winclip.c, src/window.c, src/glbl_ime.cpp,
+ src/ex_cmds.h, src/globals.h, src/gui.h, src/if_py_both.h,
+ src/macros.h, src/option.h, src/os_mac.h, src/os_win32.h,
+ src/proto.h, src/spell.h, src/structs.h, src/vim.h
+
+
+*** ../vim-8.1.0809/src/getchar.c 2019-01-20 15:30:36.885328746 +0100
+--- src/getchar.c 2019-01-24 16:51:24.391561224 +0100
+***************
+*** 291,304 ****
+ static void
+ add_char_buff(buffheader_T *buf, int c)
+ {
+- #ifdef FEAT_MBYTE
+ char_u bytes[MB_MAXBYTES + 1];
+ int len;
+ int i;
+- #endif
+ char_u temp[4];
+
+- #ifdef FEAT_MBYTE
+ if (IS_SPECIAL(c))
+ len = 1;
+ else
+--- 291,301 ----
+***************
+*** 307,313 ****
+ {
+ if (!IS_SPECIAL(c))
+ c = bytes[i];
+- #endif
+
+ if (IS_SPECIAL(c) || c == K_SPECIAL || c == NUL)
+ {
+--- 304,309 ----
+***************
+*** 333,341 ****
+ temp[1] = NUL;
+ }
+ add_buff(buf, temp, -1L);
+- #ifdef FEAT_MBYTE
+ }
+- #endif
+ }
+
+ /* First read ahead buffer. Used for translated commands. */
+--- 329,335 ----
+***************
+*** 596,607 ****
+ break;
+
+ /* Handle a special or multibyte character. */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ /* Handle composing chars separately. */
+ c = mb_cptr2char_adv(&s);
+ else
+- #endif
+ c = *s++;
+ if (c < ' ' || c == DEL || (*s == NUL && (c == '0' || c == '^')))
+ add_char_buff(&redobuff, Ctrl_V);
+--- 590,599 ----
+***************
+*** 686,696 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ c = mb_ptr2char_adv(&s);
+- #else
+- c = *s++;
+- #endif
+ if (c == CAR || c == NL || c == ESC)
+ c = ' ';
+ stuffcharReadbuff(c);
+--- 678,684 ----
+***************
+*** 732,742 ****
+ static buffblock_T *bp;
+ static char_u *p;
+ int c;
+- #ifdef FEAT_MBYTE
+ int n;
+ char_u buf[MB_MAXBYTES + 1];
+ int i;
+- #endif
+
+ if (init)
+ {
+--- 720,728 ----
+***************
+*** 752,758 ****
+ if ((c = *p) != NUL)
+ {
+ /* Reverse the conversion done by add_char_buff() */
+- #ifdef FEAT_MBYTE
+ /* For a multi-byte character get all the bytes and return the
+ * converted character. */
+ if (has_mbyte && (c != K_SPECIAL || p[1] == KS_SPECIAL))
+--- 738,743 ----
+***************
+*** 760,766 ****
+ else
+ n = 1;
+ for (i = 0; ; ++i)
+- #endif
+ {
+ if (c == K_SPECIAL) /* special key or escaped K_SPECIAL */
+ {
+--- 745,750 ----
+***************
+*** 776,782 ****
+ bp = bp->b_next;
+ p = bp->b_str;
+ }
+- #ifdef FEAT_MBYTE
+ buf[i] = c;
+ if (i == n - 1) /* last byte of a character */
+ {
+--- 760,765 ----
+***************
+*** 787,793 ****
+ c = *p;
+ if (c == NUL) /* cannot happen? */
+ break;
+- #endif
+ }
+ }
+
+--- 770,775 ----
+***************
+*** 1093,1103 ****
+ void
+ ins_char_typebuf(int c)
+ {
+- #ifdef FEAT_MBYTE
+ char_u buf[MB_MAXBYTES + 1];
+- #else
+- char_u buf[4];
+- #endif
+ if (IS_SPECIAL(c))
+ {
+ buf[0] = K_SPECIAL;
+--- 1075,1081 ----
+***************
+*** 1106,1119 ****
+ buf[3] = NUL;
+ }
+ else
+- {
+- #ifdef FEAT_MBYTE
+ buf[(*mb_char2bytes)(c, buf)] = NUL;
+- #else
+- buf[0] = c;
+- buf[1] = NUL;
+- #endif
+- }
+ (void)ins_typebuf(buf, KeyNoremap, 0, !KeyTyped, cmd_silent);
+ }
+
+--- 1084,1090 ----
+***************
+*** 1579,1589 ****
+ vgetc(void)
+ {
+ int c, c2;
+- #ifdef FEAT_MBYTE
+ int n;
+ char_u buf[MB_MAXBYTES + 1];
+ int i;
+- #endif
+
+ #ifdef FEAT_EVAL
+ /* Do garbage collection when garbagecollect() was called previously and
+--- 1550,1558 ----
+***************
+*** 1763,1769 ****
+ case K_XRIGHT: c = K_RIGHT; break;
+ }
+
+- #ifdef FEAT_MBYTE
+ /* For a multi-byte character get all the bytes and return the
+ * converted character.
+ * Note: This will loop until enough bytes are received!
+--- 1732,1737 ----
+***************
+*** 1794,1800 ****
+ --no_mapping;
+ c = (*mb_ptr2char)(buf);
+ }
+- #endif
+
+ break;
+ }
+--- 1762,1767 ----
+***************
+*** 2212,2218 ****
+ break;
+ }
+
+- #ifdef FEAT_MBYTE
+ /* Don't allow mapping the first byte(s) of a
+ * multi-byte char. Happens when mapping
+ * <M-a> and then changing 'encoding'. Beware
+--- 2183,2188 ----
+***************
+*** 2225,2231 ****
+ && MB_BYTE2LEN(c1) > MB_PTR2LEN(p2))
+ mlen = 0;
+ }
+- #endif
+ /*
+ * Check an entry whether it matches.
+ * - Full match: mlen == keylen
+--- 2195,2200 ----
+***************
+*** 2685,2722 ****
+ curwin->w_wcol = vcol;
+ vcol += lbr_chartabsize(ptr, ptr + col,
+ (colnr_T)vcol);
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ col += (*mb_ptr2len)(ptr + col);
+ else
+- #endif
+ ++col;
+ }
+ curwin->w_wrow = curwin->w_cline_row
+ + curwin->w_wcol / curwin->w_width;
+ curwin->w_wcol %= curwin->w_width;
+ curwin->w_wcol += curwin_col_off();
+- #ifdef FEAT_MBYTE
+ col = 0; /* no correction needed */
+- #endif
+ }
+ else
+ {
+ --curwin->w_wcol;
+- #ifdef FEAT_MBYTE
+ col = curwin->w_cursor.col - 1;
+- #endif
+ }
+ }
+ else if (curwin->w_p_wrap && curwin->w_wrow)
+ {
+ --curwin->w_wrow;
+ curwin->w_wcol = curwin->w_width - 1;
+- #ifdef FEAT_MBYTE
+ col = curwin->w_cursor.col - 1;
+- #endif
+ }
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && col > 0 && curwin->w_wcol > 0)
+ {
+ /* Correct when the cursor is on the right halve
+--- 2654,2682 ----
+***************
+*** 2726,2732 ****
+ if ((*mb_ptr2cells)(ptr + col) > 1)
+ --curwin->w_wcol;
+ }
+- #endif
+ }
+ setcursor();
+ out_flush();
+--- 2686,2691 ----
+***************
+*** 3434,3440 ****
+ * Otherwise we won't be able to find the start of it in a
+ * vi-compatible way.
+ */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int first, last;
+--- 3394,3399 ----
+***************
+*** 3458,3466 ****
+ goto theend;
+ }
+ }
+! else
+! #endif
+! if (vim_iswordc(keys[len - 1])) /* ends in keyword char */
+ for (n = 0; n < len - 2; ++n)
+ if (vim_iswordc(keys[n]) != vim_iswordc(keys[len - 2]))
+ {
+--- 3417,3423 ----
+ goto theend;
+ }
+ }
+! else if (vim_iswordc(keys[len - 1])) // ends in keyword char
+ for (n = 0; n < len - 2; ++n)
+ if (vim_iswordc(keys[n]) != vim_iswordc(keys[len - 2]))
+ {
+***************
+*** 4458,4466 ****
+ #ifdef FEAT_LOCALMAP
+ mapblock_T *mp2;
+ #endif
+- #ifdef FEAT_MBYTE
+ int clen = 0; /* length in characters */
+- #endif
+ int is_id = TRUE;
+ int vim_abbr;
+
+--- 4415,4421 ----
+***************
+*** 4480,4486 ****
+ if (col == 0) /* cannot be an abbr. */
+ return FALSE;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ char_u *p;
+--- 4435,4440 ----
+***************
+*** 4508,4514 ****
+ scol = (int)(p - ptr);
+ }
+ else
+- #endif
+ {
+ if (!vim_iswordc(ptr[col - 1]))
+ vim_abbr = TRUE; /* Vim added abbr. */
+--- 4462,4467 ----
+***************
+*** 4601,4607 ****
+ {
+ if (c < ABBR_OFF && (c < ' ' || c > '~'))
+ tb[j++] = Ctrl_V; /* special char needs CTRL-V */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* if ABBR_OFF has been added, remove it here */
+--- 4554,4559 ----
+***************
+*** 4610,4616 ****
+ j += (*mb_char2bytes)(c, tb + j);
+ }
+ else
+- #endif
+ tb[j++] = c;
+ }
+ tb[j] = NUL;
+--- 4562,4567 ----
+***************
+*** 4637,4646 ****
+
+ tb[0] = Ctrl_H;
+ tb[1] = NUL;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ len = clen; /* Delete characters instead of bytes */
+- #endif
+ while (len-- > 0) /* delete the from string */
+ (void)ins_typebuf(tb, 1, 0, TRUE, mp->m_silent);
+ return TRUE;
+--- 4588,4595 ----
+***************
+*** 4715,4727 ****
+ /* Need a buffer to hold up to three times as much. Four in case of an
+ * illegal utf-8 byte:
+ * 0xc0 -> 0xc3 0x80 -> 0xc3 K_SPECIAL KS_SPECIAL KE_FILLER */
+! res = alloc((unsigned)(STRLEN(p) *
+! #ifdef FEAT_MBYTE
+! 4
+! #else
+! 3
+! #endif
+! ) + 1);
+ if (res != NULL)
+ {
+ d = res;
+--- 4664,4670 ----
+ /* Need a buffer to hold up to three times as much. Four in case of an
+ * illegal utf-8 byte:
+ * 0xc0 -> 0xc3 0x80 -> 0xc3 K_SPECIAL KS_SPECIAL KE_FILLER */
+! res = alloc((unsigned)(STRLEN(p) * 4) + 1);
+ if (res != NULL)
+ {
+ d = res;
+***************
+*** 5012,5018 ****
+
+ for ( ; *str != NUL; ++str)
+ {
+- #ifdef FEAT_MBYTE
+ char_u *p;
+
+ /* Check for a multi-byte character, which may contain escaped
+--- 4955,4960 ----
+***************
+*** 5026,5032 ****
+ --str;
+ continue;
+ }
+- #endif
+
+ c = *str;
+ /*
+--- 4968,4973 ----
+*** ../vim-8.1.0809/src/search.c 2019-01-20 15:30:36.893328693 +0100
+--- src/search.c 2019-01-24 16:41:51.655543691 +0100
+***************
+*** 85,94 ****
+ static char_u lastc[2] = {NUL, NUL}; /* last character searched for */
+ static int lastcdir = FORWARD; /* last direction of character search */
+ static int last_t_cmd = TRUE; /* last search t_cmd */
+- #ifdef FEAT_MBYTE
+ static char_u lastc_bytes[MB_MAXBYTES + 1];
+ static int lastc_bytelen = 1; /* >1 for multi-byte char */
+- #endif
+
+ /* copy of spats[], for keeping the search patterns while executing autocmds */
+ static struct spat saved_spats[2];
+--- 85,92 ----
+***************
+*** 248,254 ****
+ rev_i = len;
+ for (s_i = 0; s_i < len; ++s_i)
+ {
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int mb_len;
+--- 246,251 ----
+***************
+*** 259,265 ****
+ s_i += mb_len - 1;
+ }
+ else
+- # endif
+ rev[--rev_i] = s[s_i];
+
+ }
+--- 256,261 ----
+***************
+*** 446,452 ****
+
+ while (*p != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ int l;
+
+ if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
+--- 442,447 ----
+***************
+*** 455,463 ****
+ return TRUE;
+ p += l;
+ }
+! else
+! #endif
+! if (*p == '\\')
+ {
+ if (p[1] == '_' && p[2] != NUL) /* skip "\_X" */
+ p += 3;
+--- 450,456 ----
+ return TRUE;
+ p += l;
+ }
+! else if (*p == '\\')
+ {
+ if (p[1] == '_' && p[2] != NUL) /* skip "\_X" */
+ p += 3;
+***************
+*** 480,490 ****
+ char_u *
+ last_csearch(void)
+ {
+- #ifdef FEAT_MBYTE
+ return lastc_bytes;
+- #else
+- return lastc;
+- #endif
+ }
+
+ int
+--- 473,479 ----
+***************
+*** 503,515 ****
+ set_last_csearch(int c, char_u *s UNUSED, int len UNUSED)
+ {
+ *lastc = c;
+- #ifdef FEAT_MBYTE
+ lastc_bytelen = len;
+ if (len)
+ memcpy(lastc_bytes, s, len);
+ else
+ vim_memset(lastc_bytes, 0, sizeof(lastc_bytes));
+- #endif
+ }
+ #endif
+
+--- 492,502 ----
+***************
+*** 687,693 ****
+ * MAXCOL + 1 is zero. */
+ if (pos->col == MAXCOL)
+ start_char_len = 0;
+- #ifdef FEAT_MBYTE
+ /* Watch out for the "col" being MAXCOL - 2, used in a closed fold. */
+ else if (has_mbyte
+ && pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count
+--- 674,679 ----
+***************
+*** 699,705 ****
+ else
+ start_char_len = (*mb_ptr2len)(ptr + pos->col);
+ }
+- #endif
+ else
+ start_char_len = 1;
+ if (dir == FORWARD)
+--- 685,690 ----
+***************
+*** 835,846 ****
+ if (matchcol == matchpos.col
+ && ptr[matchcol] != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ matchcol +=
+ (*mb_ptr2len)(ptr + matchcol);
+ else
+- #endif
+ ++matchcol;
+ }
+ }
+--- 820,829 ----
+***************
+*** 849,860 ****
+ matchcol = matchpos.col;
+ if (ptr[matchcol] != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ matchcol += (*mb_ptr2len)(ptr
+ + matchcol);
+ else
+- #endif
+ ++matchcol;
+ }
+ }
+--- 832,841 ----
+***************
+*** 946,957 ****
+ if (matchcol == matchpos.col
+ && ptr[matchcol] != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ matchcol +=
+ (*mb_ptr2len)(ptr + matchcol);
+ else
+- #endif
+ ++matchcol;
+ }
+ }
+--- 927,936 ----
+***************
+*** 963,974 ****
+ matchcol = matchpos.col;
+ if (ptr[matchcol] != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ matchcol +=
+ (*mb_ptr2len)(ptr + matchcol);
+ else
+- #endif
+ ++matchcol;
+ }
+ }
+--- 942,951 ----
+***************
+*** 1029,1042 ****
+ else
+ {
+ --pos->col;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte
+ && pos->lnum <= buf->b_ml.ml_line_count)
+ {
+ ptr = ml_get_buf(buf, pos->lnum, FALSE);
+ pos->col -= (*mb_head_off)(ptr, ptr + pos->col);
+ }
+- #endif
+ }
+ if (end_pos != NULL)
+ {
+--- 1006,1017 ----
+***************
+*** 1410,1416 ****
+ if (msgbuf != NULL)
+ {
+ msgbuf[0] = dirc;
+- #ifdef FEAT_MBYTE
+ if (enc_utf8 && utf_iscomposing(utf_ptr2char(p)))
+ {
+ /* Use a space to draw the composing char on. */
+--- 1385,1390 ----
+***************
+*** 1418,1424 ****
+ STRCPY(msgbuf + 2, p);
+ }
+ else
+- #endif
+ STRCPY(msgbuf + 1, p);
+ if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
+ {
+--- 1392,1397 ----
+***************
+*** 1711,1717 ****
+ *lastc = c;
+ set_csearch_direction(dir);
+ set_csearch_until(t_cmd);
+- #ifdef FEAT_MBYTE
+ lastc_bytelen = (*mb_char2bytes)(c, lastc_bytes);
+ if (cap->ncharC1 != 0)
+ {
+--- 1684,1689 ----
+***************
+*** 1721,1736 ****
+ lastc_bytelen += (*mb_char2bytes)(cap->ncharC2,
+ lastc_bytes + lastc_bytelen);
+ }
+- #endif
+ }
+ }
+ else /* repeat previous search */
+ {
+! if (*lastc == NUL
+! #ifdef FEAT_MBYTE
+! && lastc_bytelen == 1
+! #endif
+! )
+ return FAIL;
+ if (dir) /* repeat in opposite direction */
+ dir = -lastcdir;
+--- 1693,1703 ----
+ lastc_bytelen += (*mb_char2bytes)(cap->ncharC2,
+ lastc_bytes + lastc_bytelen);
+ }
+ }
+ }
+ else /* repeat previous search */
+ {
+! if (*lastc == NUL && lastc_bytelen == 1)
+ return FAIL;
+ if (dir) /* repeat in opposite direction */
+ dir = -lastcdir;
+***************
+*** 1758,1764 ****
+
+ while (count--)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ for (;;)
+--- 1725,1730 ----
+***************
+*** 1787,1793 ****
+ }
+ }
+ else
+- #endif
+ {
+ for (;;)
+ {
+--- 1753,1758 ----
+***************
+*** 1804,1810 ****
+ {
+ /* backup to before the character (possibly double-byte) */
+ col -= dir;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ if (dir < 0)
+--- 1769,1774 ----
+***************
+*** 1814,1820 ****
+ /* To previous char, which may be multi-byte. */
+ col -= (*mb_head_off)(p, p + col);
+ }
+- #endif
+ }
+ curwin->w_cursor.col = col;
+
+--- 1778,1783 ----
+***************
+*** 1851,1860 ****
+ int *prevcol)
+ {
+ --col;
+- #ifdef FEAT_MBYTE
+ if (col > 0 && has_mbyte)
+ col -= (*mb_head_off)(linep, linep + col);
+- #endif
+ if (prevcol)
+ *prevcol = col;
+ return (col >= 0 && linep[col] == ch) ? TRUE : FALSE;
+--- 1814,1821 ----
+***************
+*** 2237,2246 ****
+ else
+ {
+ --pos.col;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ pos.col -= (*mb_head_off)(linep, linep + pos.col);
+- #endif
+ }
+ }
+ else /* forward search */
+--- 2198,2205 ----
+***************
+*** 2278,2288 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ pos.col += (*mb_ptr2len)(linep + pos.col);
+ else
+- #endif
+ ++pos.col;
+ }
+ }
+--- 2237,2245 ----
+***************
+*** 2934,2943 ****
+ if ((curwin->w_cursor.col = (colnr_T)STRLEN(line)) != 0)
+ {
+ --curwin->w_cursor.col;
+- #ifdef FEAT_MBYTE
+ curwin->w_cursor.col -=
+ (*mb_head_off)(line, line + curwin->w_cursor.col);
+- #endif
+ *pincl = TRUE;
+ }
+ }
+--- 2891,2898 ----
+***************
+*** 3029,3035 ****
+ #endif
+ if (c == ' ' || c == '\t' || c == NUL)
+ return 0;
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0 && c > 0xFF)
+ {
+ /* If cls_bigword, report multi-byte chars as class 1. */
+--- 2984,2989 ----
+***************
+*** 3046,3052 ****
+ return 1;
+ return c;
+ }
+- #endif
+
+ /* If cls_bigword is TRUE, report all non-blanks as class 1. */
+ if (cls_bigword)
+--- 3000,3005 ----
+***************
+*** 3903,3909 ****
+ int lc = NUL;
+ pos_T pos;
+
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs)
+ {
+ char_u *lp = NULL;
+--- 3856,3861 ----
+***************
+*** 3924,3930 ****
+ }
+ }
+ else
+- #endif
+ {
+ for (p = line + curwin->w_cursor.col; p > line; )
+ {
+--- 3876,3881 ----
+***************
+*** 4371,4381 ****
+ ++col;
+ else if (c == quotechar)
+ break;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ col += (*mb_ptr2len)(line + col);
+ else
+- #endif
+ ++col;
+ }
+ return col;
+--- 4322,4330 ----
+***************
+*** 4399,4407 ****
+ while (col_start > 0)
+ {
+ --col_start;
+- #ifdef FEAT_MBYTE
+ col_start -= (*mb_head_off)(line, line + col_start);
+- #endif
+ n = 0;
+ if (escape != NULL)
+ while (col_start - n > 0 && vim_strchr(escape,
+--- 4348,4354 ----
+*** ../vim-8.1.0809/src/sign.c 2019-01-19 17:43:03.425449092 +0100
+--- src/sign.c 2019-01-24 16:42:16.007379451 +0100
+***************
+*** 820,826 ****
+ }
+
+ // Count cells and check for non-printable chars
+- # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ cells = 0;
+--- 820,825 ----
+***************
+*** 832,838 ****
+ }
+ }
+ else
+- # endif
+ {
+ for (s = text; s < endp; ++s)
+ if (!vim_isprintc(*s))
+--- 831,836 ----
+*** ../vim-8.1.0809/src/spell.c 2019-01-19 17:43:03.429449066 +0100
+--- src/spell.c 2019-01-24 16:46:46.505554025 +0100
+***************
+*** 224,235 ****
+ affixID/condition */
+ int mi_prefcnt; /* number of entries at mi_prefarridx */
+ int mi_prefixlen; /* byte length of prefix */
+- #ifdef FEAT_MBYTE
+ int mi_cprefixlen; /* byte length of prefix in original
+ case */
+- #else
+- # define mi_cprefixlen mi_prefixlen /* it's the same value */
+- #endif
+
+ /* for when checking a compound word */
+ int mi_compoff; /* start of following word offset */
+--- 224,231 ----
+***************
+*** 249,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);
+- #endif
+
+ /*
+ * For finding suggestions: At each node in the tree these states are tried:
+--- 245,251 ----
+***************
+*** 295,306 ****
+ char_u ts_prefixdepth; /* stack depth for end of prefix or
+ * PFD_PREFIXTREE or PFD_NOPREFIX */
+ char_u ts_flags; /* TSF_ flags */
+- #ifdef FEAT_MBYTE
+ char_u ts_tcharlen; /* number of bytes in tword character */
+ char_u ts_tcharidx; /* current byte index in tword character */
+ char_u ts_isdiff; /* DIFF_ values */
+ char_u ts_fcharstart; /* index in fword where badword char started */
+- #endif
+ char_u ts_prewordlen; /* length of word in "preword[]" */
+ char_u ts_splitoff; /* index in "tword" after last split */
+ char_u ts_splitfidx; /* "ts_fidx" at word split */
+--- 289,298 ----
+***************
+*** 358,366 ****
+ static void suggest_try_change(suginfo_T *su);
+ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, int soundfold);
+ static void go_deeper(trystate_T *stack, int depth, int score_add);
+- #ifdef FEAT_MBYTE
+ static int nofold_len(char_u *fword, int flen, char_u *word);
+- #endif
+ static void find_keepcap_word(slang_T *slang, char_u *fword, char_u *kword);
+ static void score_comp_sal(suginfo_T *su);
+ static void score_combine(suginfo_T *su);
+--- 350,356 ----
+***************
+*** 380,394 ****
+ static int cleanup_suggestions(garray_T *gap, int maxscore, int keep);
+ static void spell_soundfold_sofo(slang_T *slang, char_u *inword, char_u *res);
+ static void spell_soundfold_sal(slang_T *slang, char_u *inword, char_u *res);
+- #ifdef FEAT_MBYTE
+ static void spell_soundfold_wsal(slang_T *slang, char_u *inword, char_u *res);
+- #endif
+ static int soundalike_score(char_u *goodsound, char_u *badsound);
+ static int spell_edit_score(slang_T *slang, char_u *badword, char_u *goodword);
+ static int spell_edit_score_limit(slang_T *slang, char_u *badword, char_u *goodword, int limit);
+- #ifdef FEAT_MBYTE
+ static int spell_edit_score_limit_w(slang_T *slang, char_u *badword, char_u *goodword, int limit);
+- #endif
+ static void dump_word(slang_T *slang, char_u *word, char_u *pat, int *dir, int round, int flags, linenr_T lnum);
+ static linenr_T dump_prefixes(slang_T *slang, char_u *word, char_u *pat, int *dir, int round, int flags, linenr_T startlnum);
+
+--- 370,380 ----
+***************
+*** 565,574 ****
+ *capcol = (int)(regmatch.endp[0] - ptr);
+ }
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ return (*mb_ptr2len)(ptr);
+- #endif
+ return 1;
+ }
+ else if (mi.mi_end == ptr)
+--- 551,558 ----
+***************
+*** 646,654 ****
+ int c;
+ char_u *ptr;
+ idx_T lo, hi, m;
+- #ifdef FEAT_MBYTE
+ char_u *s;
+- #endif
+ char_u *p;
+ int res = SP_BAD;
+ slang_T *slang = mip->mi_lp->lp_slang;
+--- 630,636 ----
+***************
+*** 794,803 ****
+ arridx = endidx[endidxcnt];
+ wlen = endlen[endidxcnt];
+
+- #ifdef FEAT_MBYTE
+ if ((*mb_head_off)(ptr, ptr + wlen) > 0)
+ continue; /* not at first byte of character */
+- #endif
+ if (spell_iswordp(ptr + wlen, mip->mi_win))
+ {
+ if (slang->sl_compprog == NULL && !slang->sl_nobreak)
+--- 776,783 ----
+***************
+*** 810,816 ****
+ * has been found we try compound flags. */
+ prefix_found = FALSE;
+
+- #ifdef FEAT_MBYTE
+ if (mode != FIND_KEEPWORD && has_mbyte)
+ {
+ /* Compute byte length in original word, length may change
+--- 790,795 ----
+***************
+*** 824,830 ****
+ wlen = (int)(p - mip->mi_word);
+ }
+ }
+- #endif
+
+ /* Check flags and region. For FIND_PREFIX check the condition and
+ * prefix ID.
+--- 803,808 ----
+***************
+*** 896,902 ****
+ if (((unsigned)flags >> 24) == 0
+ || wlen - mip->mi_compoff < slang->sl_compminlen)
+ continue;
+- #ifdef FEAT_MBYTE
+ /* For multi-byte chars check character length against
+ * COMPOUNDMIN. */
+ if (has_mbyte
+--- 874,879 ----
+***************
+*** 904,910 ****
+ && mb_charlen_len(mip->mi_word + mip->mi_compoff,
+ wlen - mip->mi_compoff) < slang->sl_compminlen)
+ continue;
+- #endif
+
+ /* Limit the number of compound words to COMPOUNDWORDMAX if no
+ * maximum for syllables is specified. */
+--- 881,886 ----
+***************
+*** 938,944 ****
+
+ /* Need to check the caps type of the appended compound
+ * word. */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && STRNCMP(ptr, mip->mi_word,
+ mip->mi_compoff) != 0)
+ {
+--- 914,919 ----
+***************
+*** 948,954 ****
+ MB_PTR_ADV(p);
+ }
+ else
+- #endif
+ p = mip->mi_word + mip->mi_compoff;
+ capflags = captype(p, mip->mi_word + wlen);
+ if (capflags == WF_KEEPCAP || (capflags == WF_ALLCAP
+--- 923,928 ----
+***************
+*** 1020,1026 ****
+
+ /* Find following word in case-folded tree. */
+ mip->mi_compoff = endlen[endidxcnt];
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && mode == FIND_KEEPWORD)
+ {
+ /* Compute byte length in case-folded word from "wlen":
+--- 994,999 ----
+***************
+*** 1035,1041 ****
+ mip->mi_compoff = (int)(p - mip->mi_fword);
+ }
+ }
+- #endif
+ #if 0 /* Disabled, see below */
+ c = mip->mi_compoff;
+ #endif
+--- 1008,1013 ----
+***************
+*** 1186,1200 ****
+ static int
+ can_compound(slang_T *slang, char_u *word, char_u *flags)
+ {
+- #ifdef FEAT_MBYTE
+ char_u uflags[MAXWLEN * 2];
+ int i;
+- #endif
+ char_u *p;
+
+ if (slang->sl_compprog == NULL)
+ return FALSE;
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ {
+ /* Need to convert the single byte flags to utf8 characters. */
+--- 1158,1169 ----
+***************
+*** 1205,1211 ****
+ p = uflags;
+ }
+ else
+- #endif
+ p = flags;
+ if (!vim_regexec_prog(&slang->sl_compprog, FALSE, p, 0))
+ return FALSE;
+--- 1174,1179 ----
+***************
+*** 1434,1440 ****
+ /* Skip over the previously found word(s). */
+ mip->mi_prefixlen += mip->mi_compoff;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* Case-folded length may differ from original length. */
+--- 1402,1407 ----
+***************
+*** 1443,1449 ****
+ }
+ else
+ mip->mi_cprefixlen = mip->mi_prefixlen;
+- #endif
+ find_word(mip, FIND_PREFIX);
+
+
+--- 1410,1415 ----
+***************
+*** 1912,1921 ****
+ spell_enc(void)
+ {
+
+- #ifdef FEAT_MBYTE
+ if (STRLEN(p_enc) < 60 && STRCMP(p_enc, "iso-8859-15") != 0)
+ return p_enc;
+- #endif
+ return (char_u *)"latin1";
+ }
+
+--- 1878,1885 ----
+***************
+*** 2015,2025 ****
+ vim_free(smp->sm_lead);
+ /* Don't free sm_oneof and sm_rules, they point into sm_lead. */
+ vim_free(smp->sm_to);
+- #ifdef FEAT_MBYTE
+ vim_free(smp->sm_lead_w);
+ vim_free(smp->sm_oneof_w);
+ vim_free(smp->sm_to_w);
+- #endif
+ }
+ ga_clear(gap);
+
+--- 1979,1987 ----
+***************
+*** 2046,2054 ****
+ hash_clear_all(&lp->sl_wordcount, WC_KEY_OFF);
+ hash_init(&lp->sl_wordcount);
+
+- #ifdef FEAT_MBYTE
+ hash_clear_all(&lp->sl_map_hash, 0);
+- #endif
+
+ /* Clear info from .sug file. */
+ slang_clear_sug(lp);
+--- 2008,2014 ----
+***************
+*** 2284,2296 ****
+ else
+ {
+ /* No recognized syllable item, at least a syllable char then? */
+- #ifdef FEAT_MBYTE
+ c = mb_ptr2char(p);
+ len = (*mb_ptr2len)(p);
+- #else
+- c = *p;
+- len = 1;
+- #endif
+ if (vim_strchr(slang->sl_syllable, c) == NULL)
+ skip = FALSE; /* No, search for next syllable */
+ else if (!skip)
+--- 2244,2251 ----
+***************
+*** 2352,2360 ****
+ if (spl_copy == NULL)
+ goto theend;
+
+- #ifdef FEAT_MBYTE
+ wp->w_s->b_cjk = 0;
+- #endif
+
+ /* Loop over comma separated language names. */
+ for (splp = spl_copy; *splp != NUL; )
+--- 2307,2313 ----
+***************
+*** 2366,2374 ****
+
+ if (STRCMP(lang, "cjk") == 0)
+ {
+- #ifdef FEAT_MBYTE
+ wp->w_s->b_cjk = 1;
+- #endif
+ continue;
+ }
+
+--- 2319,2325 ----
+***************
+*** 2633,2641 ****
+ clear_midword(win_T *wp)
+ {
+ vim_memset(wp->w_s->b_spell_ismw, 0, 256);
+- #ifdef FEAT_MBYTE
+ VIM_CLEAR(wp->w_s->b_spell_ismw_mb);
+- #endif
+ }
+
+ /*
+--- 2584,2590 ----
+***************
+*** 2651,2657 ****
+ return;
+
+ for (p = lp->sl_midword; *p != NUL; )
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int c, l, n;
+--- 2600,2605 ----
+***************
+*** 2679,2685 ****
+ p += l;
+ }
+ else
+- #endif
+ wp->w_s->b_spell_ismw[*p++] = TRUE;
+ }
+
+--- 2627,2632 ----
+***************
+*** 2725,2735 ****
+ for (p = word; !spell_iswordp_nmw(p, curwin); MB_PTR_ADV(p))
+ if (end == NULL ? *p == NUL : p >= end)
+ return 0; /* only non-word characters, illegal word */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_ptr2char_adv(&p);
+ else
+- #endif
+ c = *p++;
+ firstcap = allcap = SPELL_ISUPPER(c);
+
+--- 2672,2680 ----
+***************
+*** 2825,2831 ****
+ }
+ }
+
+- #if defined(FEAT_MBYTE) || defined(EXITFREE) || defined(PROTO)
+ /*
+ * Free all languages.
+ */
+--- 2770,2775 ----
+***************
+*** 2851,2859 ****
+ VIM_CLEAR(repl_to);
+ VIM_CLEAR(repl_from);
+ }
+- #endif
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Clear all spelling tables and reload them.
+ * Used after 'encoding' is set and when ":mkspell" was used.
+--- 2795,2801 ----
+***************
+*** 2884,2890 ****
+ }
+ }
+ }
+- #endif
+
+ /*
+ * Opposite of offset2bytes().
+--- 2826,2831 ----
+***************
+*** 3016,3022 ****
+
+ did_set_spelltab = FALSE;
+ clear_spell_chartab(&spelltab);
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs)
+ {
+ /* DBCS: assume double-wide characters are word characters. */
+--- 2957,2962 ----
+***************
+*** 3041,3047 ****
+ }
+ }
+ else
+- #endif
+ {
+ /* Rough guess: use locale-dependent library functions. */
+ for (i = 128; i < 256; ++i)
+--- 2981,2986 ----
+***************
+*** 3073,3079 ****
+ char_u *p,
+ win_T *wp) /* buffer used */
+ {
+- #ifdef FEAT_MBYTE
+ char_u *s;
+ int l;
+ int c;
+--- 3012,3017 ----
+***************
+*** 3102,3108 ****
+ return spell_mb_isword_class(mb_get_class(s), wp);
+ return spelltab.st_isw[c];
+ }
+- #endif
+
+ return spelltab.st_isw[wp->w_s->b_spell_ismw[*p] ? p[1] : p[0]];
+ }
+--- 3040,3045 ----
+***************
+*** 3114,3120 ****
+ int
+ spell_iswordp_nmw(char_u *p, win_T *wp)
+ {
+- #ifdef FEAT_MBYTE
+ int c;
+
+ if (has_mbyte)
+--- 3051,3056 ----
+***************
+*** 3124,3134 ****
+ return spell_mb_isword_class(mb_get_class(p), wp);
+ return spelltab.st_isw[c];
+ }
+- #endif
+ return spelltab.st_isw[*p];
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Return TRUE if word class indicates a word character.
+ * Only for characters above 255.
+--- 3060,3068 ----
+***************
+*** 3171,3177 ****
+ }
+ return spelltab.st_isw[*s];
+ }
+- #endif
+
+ /*
+ * Case-fold "str[len]" into "buf[buflen]". The result is NUL terminated.
+--- 3105,3110 ----
+***************
+*** 3194,3200 ****
+ return FAIL; /* result will not fit */
+ }
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int outi = 0;
+--- 3127,3132 ----
+***************
+*** 3215,3221 ****
+ buf[outi] = NUL;
+ }
+ else
+- #endif
+ {
+ /* Be quick for non-multibyte encodings. */
+ for (i = 0; i < len; ++i)
+--- 3147,3152 ----
+***************
+*** 4072,4092 ****
+ int l;
+
+ p = word;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_cptr2char_adv(&p);
+ else
+- #endif
+ c = *p++;
+ if (upper)
+ c = SPELL_TOUPPER(c);
+ else
+ c = SPELL_TOFOLD(c);
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ l = mb_char2bytes(c, wcopy);
+ else
+- #endif
+ {
+ l = 1;
+ wcopy[0] = c;
+--- 4003,4019 ----
+***************
+*** 4108,4121 ****
+ d = wcopy;
+ for (s = word; *s != NUL; )
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_cptr2char_adv(&s);
+ else
+- #endif
+ c = *s++;
+
+- #ifdef FEAT_MBYTE
+ /* We only change 0xdf to SS when we are certain latin1 is used. It
+ * would cause weird errors in other 8-bit encodings. */
+ if (enc_latin1like && c == 0xdf)
+--- 4035,4045 ----
+***************
+*** 4126,4135 ****
+ *d++ = c;
+ }
+ else
+- #endif
+ c = SPELL_TOUPPER(c);
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ if (d - wcopy >= MAXWLEN - MB_MAXBYTES)
+--- 4050,4057 ----
+***************
+*** 4137,4143 ****
+ d += mb_char2bytes(c, d);
+ }
+ else
+- #endif
+ {
+ if (d - wcopy >= MAXWLEN - 1)
+ break;
+--- 4059,4064 ----
+***************
+*** 4434,4444 ****
+ {
+ /* Set su->su_badflags to the caps type at this position.
+ * Use the caps type until here for the prefix itself. */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ n = nofold_len(fword, sp->ts_fidx, su->su_badptr);
+ else
+- #endif
+ n = sp->ts_fidx;
+ flags = badword_captype(su->su_badptr, su->su_badptr + n);
+ su->su_badflags = badword_captype(su->su_badptr + n,
+--- 4355,4363 ----
+***************
+*** 4568,4574 ****
+ || sp->ts_twordlen - sp->ts_splitoff
+ < slang->sl_compminlen)
+ break;
+- #ifdef FEAT_MBYTE
+ /* For multi-byte chars check character length against
+ * COMPOUNDMIN. */
+ if (has_mbyte
+--- 4487,4492 ----
+***************
+*** 4576,4582 ****
+ && mb_charlen(tword + sp->ts_splitoff)
+ < slang->sl_compminlen)
+ break;
+- #endif
+
+ compflags[sp->ts_complen] = ((unsigned)flags >> 24);
+ compflags[sp->ts_complen + 1] = NUL;
+--- 4494,4499 ----
+***************
+*** 4625,4636 ****
+ * allcap and it's only one char long use onecap. */
+ c = su->su_badflags;
+ if ((c & WF_ALLCAP)
+! #ifdef FEAT_MBYTE
+! && su->su_badlen == (*mb_ptr2len)(su->su_badptr)
+! #else
+! && su->su_badlen == 1
+! #endif
+! )
+ c = WF_ONECAP;
+ c |= flags;
+
+--- 4542,4548 ----
+ * allcap and it's only one char long use onecap. */
+ c = su->su_badflags;
+ if ((c & WF_ALLCAP)
+! && su->su_badlen == (*mb_ptr2len)(su->su_badptr))
+ c = WF_ONECAP;
+ c |= flags;
+
+***************
+*** 4752,4762 ****
+ * Try word split and/or compounding.
+ */
+ if ((sp->ts_fidx >= sp->ts_fidxtry || fword_ends)
+- #ifdef FEAT_MBYTE
+ /* Don't split halfway a character. */
+! && (!has_mbyte || sp->ts_tcharlen == 0)
+! #endif
+! )
+ {
+ int try_compound;
+ int try_split;
+--- 4664,4671 ----
+ * Try word split and/or compounding.
+ */
+ if ((sp->ts_fidx >= sp->ts_fidxtry || fword_ends)
+ /* Don't split halfway a character. */
+! && (!has_mbyte || sp->ts_tcharlen == 0))
+ {
+ int try_compound;
+ int try_split;
+***************
+*** 4789,4800 ****
+ && ((unsigned)flags >> 24) != 0
+ && sp->ts_twordlen - sp->ts_splitoff
+ >= slang->sl_compminlen
+- #ifdef FEAT_MBYTE
+ && (!has_mbyte
+ || slang->sl_compminlen == 0
+ || mb_charlen(tword + sp->ts_splitoff)
+ >= slang->sl_compminlen)
+- #endif
+ && (slang->sl_compsylmax < MAXWLEN
+ || sp->ts_complen + 1 - sp->ts_compsplit
+ < slang->sl_compmax)
+--- 4698,4707 ----
+***************
+*** 4921,4931 ****
+
+ /* set su->su_badflags to the caps type at this
+ * position */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ n = nofold_len(fword, sp->ts_fidx, su->su_badptr);
+ else
+- #endif
+ n = sp->ts_fidx;
+ su->su_badflags = badword_captype(su->su_badptr + n,
+ su->su_badptr + su->su_badlen);
+--- 4828,4836 ----
+***************
+*** 4963,4973 ****
+ case STATE_ENDNUL:
+ /* Past the NUL bytes in the node. */
+ su->su_badflags = sp->ts_save_badflags;
+! if (fword[sp->ts_fidx] == NUL
+! #ifdef FEAT_MBYTE
+! && sp->ts_tcharlen == 0
+! #endif
+! )
+ {
+ /* The badword ends, can't use STATE_PLAIN. */
+ PROF_STORE(sp->ts_state)
+--- 4868,4874 ----
+ case STATE_ENDNUL:
+ /* Past the NUL bytes in the node. */
+ su->su_badflags = sp->ts_save_badflags;
+! if (fword[sp->ts_fidx] == NUL && sp->ts_tcharlen == 0)
+ {
+ /* The badword ends, can't use STATE_PLAIN. */
+ PROF_STORE(sp->ts_state)
+***************
+*** 5005,5014 ****
+ * just deleted this byte, accepting it is always cheaper than
+ * delete + substitute. */
+ if (c == fword[sp->ts_fidx]
+! #ifdef FEAT_MBYTE
+! || (sp->ts_tcharlen > 0 && sp->ts_isdiff != DIFF_NONE)
+! #endif
+! )
+ newscore = 0;
+ else
+ newscore = SCORE_SUBST;
+--- 4906,4912 ----
+ * just deleted this byte, accepting it is always cheaper than
+ * delete + substitute. */
+ if (c == fword[sp->ts_fidx]
+! || (sp->ts_tcharlen > 0 && sp->ts_isdiff != DIFF_NONE))
+ newscore = 0;
+ else
+ newscore = SCORE_SUBST;
+***************
+*** 5034,5040 ****
+ ++sp->ts_fidx;
+ tword[sp->ts_twordlen++] = c;
+ sp->ts_arridx = idxs[arridx];
+- #ifdef FEAT_MBYTE
+ if (newscore == SCORE_SUBST)
+ sp->ts_isdiff = DIFF_YES;
+ if (has_mbyte)
+--- 4932,4937 ----
+***************
+*** 5122,5128 ****
+ }
+ }
+ else
+- #endif
+ {
+ /* If we found a similar char adjust the score.
+ * We do this after calling go_deeper() because
+--- 5019,5024 ----
+***************
+*** 5139,5145 ****
+ break;
+
+ case STATE_DEL:
+- #ifdef FEAT_MBYTE
+ /* When past the first byte of a multi-byte char don't try
+ * delete/insert/swap a character. */
+ if (has_mbyte && sp->ts_tcharlen > 0)
+--- 5035,5040 ----
+***************
+*** 5148,5154 ****
+ sp->ts_state = STATE_FINAL;
+ break;
+ }
+- #endif
+ /*
+ * Try skipping one character in the bad word (delete it).
+ */
+--- 5043,5048 ----
+***************
+*** 5181,5187 ****
+ * score if the same character is following "nn" -> "n". It's
+ * a bit illogical for soundfold tree but it does give better
+ * results. */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ c = mb_ptr2char(fword + sp->ts_fidx);
+--- 5075,5080 ----
+***************
+*** 5192,5198 ****
+ stack[depth].ts_score -= SCORE_DEL - SCORE_DELDUP;
+ }
+ else
+- #endif
+ {
+ ++stack[depth].ts_fidx;
+ if (fword[sp->ts_fidx] == fword[sp->ts_fidx + 1])
+--- 5085,5090 ----
+***************
+*** 5274,5280 ****
+ sp = &stack[depth];
+ tword[sp->ts_twordlen++] = c;
+ sp->ts_arridx = idxs[n];
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ fl = MB_BYTE2LEN(c);
+--- 5166,5171 ----
+***************
+*** 5291,5297 ****
+ else
+ fl = 1;
+ if (fl == 1)
+- #endif
+ {
+ /* If the previous character was the same, thus doubling a
+ * character, give a bonus to the score. Also for
+--- 5182,5187 ----
+***************
+*** 5329,5335 ****
+ break;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ n = MB_CPTR2LEN(p);
+--- 5219,5224 ----
+***************
+*** 5342,5348 ****
+ c2 = mb_ptr2char(p + n);
+ }
+ else
+- #endif
+ {
+ if (p[1] == NUL)
+ c2 = NUL;
+--- 5231,5236 ----
+***************
+*** 5379,5385 ****
+ PROF_STORE(sp->ts_state)
+ sp->ts_state = STATE_UNSWAP;
+ ++depth;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ fl = mb_char2len(c2);
+--- 5267,5272 ----
+***************
+*** 5388,5394 ****
+ stack[depth].ts_fidxtry = sp->ts_fidx + n + fl;
+ }
+ else
+- #endif
+ {
+ p[0] = c2;
+ p[1] = c;
+--- 5275,5280 ----
+***************
+*** 5406,5412 ****
+ case STATE_UNSWAP:
+ /* Undo the STATE_SWAP swap: "21" -> "12". */
+ p = fword + sp->ts_fidx;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ n = MB_PTR2LEN(p);
+--- 5292,5297 ----
+***************
+*** 5415,5421 ****
+ mb_char2bytes(c, p);
+ }
+ else
+- #endif
+ {
+ c = *p;
+ *p = p[1];
+--- 5300,5305 ----
+***************
+*** 5427,5433 ****
+ /* Swap two bytes, skipping one: "123" -> "321". We change
+ * "fword" here, it's changed back afterwards at STATE_UNSWAP3. */
+ p = fword + sp->ts_fidx;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ n = MB_CPTR2LEN(p);
+--- 5311,5316 ----
+***************
+*** 5440,5446 ****
+ c3 = mb_ptr2char(p + n + fl);
+ }
+ else
+- #endif
+ {
+ c = *p;
+ c2 = p[1];
+--- 5323,5328 ----
+***************
+*** 5473,5479 ****
+ PROF_STORE(sp->ts_state)
+ sp->ts_state = STATE_UNSWAP3;
+ ++depth;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ tl = mb_char2len(c3);
+--- 5355,5360 ----
+***************
+*** 5483,5489 ****
+ stack[depth].ts_fidxtry = sp->ts_fidx + n + fl + tl;
+ }
+ else
+- #endif
+ {
+ p[0] = p[2];
+ p[2] = c;
+--- 5364,5369 ----
+***************
+*** 5500,5506 ****
+ case STATE_UNSWAP3:
+ /* Undo STATE_SWAP3: "321" -> "123" */
+ p = fword + sp->ts_fidx;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ n = MB_PTR2LEN(p);
+--- 5380,5385 ----
+***************
+*** 5514,5520 ****
+ p = p + tl;
+ }
+ else
+- #endif
+ {
+ c = *p;
+ *p = p[2];
+--- 5393,5398 ----
+***************
+*** 5546,5552 ****
+ sp->ts_state = STATE_UNROT3L;
+ ++depth;
+ p = fword + sp->ts_fidx;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ n = MB_CPTR2LEN(p);
+--- 5424,5429 ----
+***************
+*** 5558,5564 ****
+ stack[depth].ts_fidxtry = sp->ts_fidx + n + fl;
+ }
+ else
+- #endif
+ {
+ c = *p;
+ *p = p[1];
+--- 5435,5440 ----
+***************
+*** 5577,5583 ****
+ case STATE_UNROT3L:
+ /* Undo ROT3L: "231" -> "123" */
+ p = fword + sp->ts_fidx;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ n = MB_PTR2LEN(p);
+--- 5453,5458 ----
+***************
+*** 5588,5594 ****
+ mb_char2bytes(c, p);
+ }
+ else
+- #endif
+ {
+ c = p[2];
+ p[2] = p[1];
+--- 5463,5468 ----
+***************
+*** 5611,5617 ****
+ sp->ts_state = STATE_UNROT3R;
+ ++depth;
+ p = fword + sp->ts_fidx;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ n = MB_CPTR2LEN(p);
+--- 5485,5490 ----
+***************
+*** 5623,5629 ****
+ stack[depth].ts_fidxtry = sp->ts_fidx + n + tl;
+ }
+ else
+- #endif
+ {
+ c = p[2];
+ p[2] = p[1];
+--- 5496,5501 ----
+***************
+*** 5642,5648 ****
+ case STATE_UNROT3R:
+ /* Undo ROT3R: "312" -> "123" */
+ p = fword + sp->ts_fidx;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ c = mb_ptr2char(p);
+--- 5514,5519 ----
+***************
+*** 5653,5659 ****
+ mb_char2bytes(c, p + n);
+ }
+ else
+- #endif
+ {
+ c = *p;
+ *p = p[1];
+--- 5524,5529 ----
+***************
+*** 5738,5746 ****
+ }
+ mch_memmove(p, ftp->ft_to, tl);
+ stack[depth].ts_fidxtry = sp->ts_fidx + tl;
+- #ifdef FEAT_MBYTE
+ stack[depth].ts_tcharlen = 0;
+- #endif
+ break;
+ }
+ }
+--- 5608,5614 ----
+***************
+*** 5809,5815 ****
+ stack[depth + 1].ts_flags = 0;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Case-folding may change the number of bytes: Count nr of chars in
+ * fword[flen] and return the byte length of that many chars in "word".
+--- 5677,5682 ----
+***************
+*** 5826,5832 ****
+ --i;
+ return (int)(p - word);
+ }
+- #endif
+
+ /*
+ * "fword" is a good word with case folded. Find the matching keep-case
+--- 5693,5698 ----
+***************
+*** 5905,5918 ****
+ * round[depth] == 1: Try using the folded-case character.
+ * round[depth] == 2: Try using the upper-case character.
+ */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ flen = MB_CPTR2LEN(fword + fwordidx[depth]);
+ ulen = MB_CPTR2LEN(uword + uwordidx[depth]);
+ }
+ else
+- #endif
+ ulen = flen = 1;
+ if (round[depth] == 1)
+ {
+--- 5771,5782 ----
+***************
+*** 6627,6633 ****
+ similar_chars(slang_T *slang, int c1, int c2)
+ {
+ int m1, m2;
+- #ifdef FEAT_MBYTE
+ char_u buf[MB_MAXBYTES + 1];
+ hashitem_T *hi;
+
+--- 6491,6496 ----
+***************
+*** 6641,6653 ****
+ m1 = mb_ptr2char(hi->hi_key + STRLEN(hi->hi_key) + 1);
+ }
+ else
+- #endif
+ m1 = slang->sl_map_array[c1];
+ if (m1 == 0)
+ return FALSE;
+
+
+- #ifdef FEAT_MBYTE
+ if (c2 >= 256)
+ {
+ buf[mb_char2bytes(c2, buf)] = 0;
+--- 6504,6514 ----
+***************
+*** 6658,6664 ****
+ m2 = mb_ptr2char(hi->hi_key + STRLEN(hi->hi_key) + 1);
+ }
+ else
+- #endif
+ m2 = slang->sl_map_array[c2];
+
+ return m1 == m2;
+--- 6519,6524 ----
+***************
+*** 6700,6714 ****
+ break;
+ MB_PTR_BACK(goodword, pgood);
+ MB_PTR_BACK(su->su_badptr, pbad);
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ if (mb_ptr2char(pgood) != mb_ptr2char(pbad))
+ break;
+ }
+! else
+! #endif
+! if (*pgood != *pbad)
+ break;
+ }
+
+--- 6560,6571 ----
+ break;
+ MB_PTR_BACK(goodword, pgood);
+ MB_PTR_BACK(su->su_badptr, pbad);
+ if (has_mbyte)
+ {
+ if (mb_ptr2char(pgood) != mb_ptr2char(pbad))
+ break;
+ }
+! else if (*pgood != *pbad)
+ break;
+ }
+
+***************
+*** 7028,7038 ****
+ word = fword;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ spell_soundfold_wsal(slang, word, res);
+ else
+- #endif
+ spell_soundfold_sal(slang, word, res);
+ }
+ }
+--- 6885,6893 ----
+***************
+*** 7048,7054 ****
+ int ri = 0;
+ int c;
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int prevc = 0;
+--- 6903,6908 ----
+***************
+*** 7095,7101 ****
+ }
+ }
+ else
+- #endif
+ {
+ /* The sl_sal_first[] table contains the translation. */
+ for (s = inword; (c = *s) != NUL; ++s)
+--- 6949,6954 ----
+***************
+*** 7385,7391 ****
+ res[reslen] = NUL;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Turn "inword" into its sound-a-like equivalent in "res[MAXWLEN]".
+ * Multi-byte version of spell_soundfold().
+--- 7238,7243 ----
+***************
+*** 7698,7704 ****
+ }
+ res[l] = NUL;
+ }
+- #endif
+
+ /*
+ * Compute a score for two sound-a-like words.
+--- 7550,7555 ----
+***************
+*** 7953,7959 ****
+ int t;
+ int bc, gc;
+ int pbc, pgc;
+- #ifdef FEAT_MBYTE
+ char_u *p;
+ int wbadword[MAXWLEN];
+ int wgoodword[MAXWLEN];
+--- 7804,7809 ----
+***************
+*** 7970,7976 ****
+ wgoodword[goodlen++] = 0;
+ }
+ else
+- #endif
+ {
+ badlen = (int)STRLEN(badword) + 1;
+ goodlen = (int)STRLEN(goodword) + 1;
+--- 7820,7825 ----
+***************
+*** 7992,8005 ****
+ CNT(i, 0) = CNT(i - 1, 0) + SCORE_DEL;
+ for (j = 1; j <= goodlen; ++j)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ bc = wbadword[i - 1];
+ gc = wgoodword[j - 1];
+ }
+ else
+- #endif
+ {
+ bc = badword[i - 1];
+ gc = goodword[j - 1];
+--- 7841,7852 ----
+***************
+*** 8024,8037 ****
+
+ if (i > 1 && j > 1)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ pbc = wbadword[i - 2];
+ pgc = wgoodword[j - 2];
+ }
+ else
+- #endif
+ {
+ pbc = badword[i - 2];
+ pgc = goodword[j - 2];
+--- 7871,7882 ----
+***************
+*** 8090,8101 ****
+ int minscore;
+ int round;
+
+- #ifdef FEAT_MBYTE
+ /* Multi-byte characters require a bit more work, use a different function
+ * to avoid testing "has_mbyte" quite often. */
+ if (has_mbyte)
+ return spell_edit_score_limit_w(slang, badword, goodword, limit);
+- #endif
+
+ /*
+ * The idea is to go from start to end over the words. So long as
+--- 7935,7944 ----
+***************
+*** 8250,8256 ****
+ return minscore;
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Multi-byte version of spell_edit_score_limit().
+ * Keep it in sync with the above!
+--- 8093,8098 ----
+***************
+*** 8439,8445 ****
+ return SCORE_MAXMAX;
+ return minscore;
+ }
+- #endif
+
+ /*
+ * ":spellinfo"
+--- 8281,8286 ----
+***************
+*** 8554,8566 ****
+ n = captype(pat, NULL);
+ if (n == WF_ONECAP)
+ dumpflags |= DUMPFLAG_ONECAP;
+! else if (n == WF_ALLCAP
+! #ifdef FEAT_MBYTE
+! && (int)STRLEN(pat) > mb_ptr2len(pat)
+! #else
+! && (int)STRLEN(pat) > 1
+! #endif
+! )
+ dumpflags |= DUMPFLAG_ALLCAP;
+ }
+ }
+--- 8395,8401 ----
+ n = captype(pat, NULL);
+ if (n == WF_ONECAP)
+ dumpflags |= DUMPFLAG_ONECAP;
+! else if (n == WF_ALLCAP && (int)STRLEN(pat) > mb_ptr2len(pat))
+ dumpflags |= DUMPFLAG_ALLCAP;
+ }
+ }
+*** ../vim-8.1.0809/src/spellfile.c 2019-01-19 17:43:03.429449066 +0100
+--- src/spellfile.c 2019-01-24 16:49:05.504615445 +0100
+***************
+*** 306,314 ****
+ static int read_compound(FILE *fd, slang_T *slang, int len);
+ static int set_sofo(slang_T *lp, char_u *from, char_u *to);
+ static void set_sal_first(slang_T *lp);
+- #ifdef FEAT_MBYTE
+ static int *mb_str2wide(char_u *s);
+- #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 set_spell_charflags(char_u *flags, int cnt, char_u *upp);
+--- 306,312 ----
+***************
+*** 1062,1068 ****
+ return ccnt;
+ }
+
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ /* convert the multi-byte strings to wide char strings */
+--- 1060,1065 ----
+***************
+*** 1088,1094 ****
+ return SP_OTHERERROR;
+ }
+ }
+- #endif
+ }
+
+ if (gap->ga_len > 0)
+--- 1085,1090 ----
+***************
+*** 1104,1110 ****
+ smp->sm_oneof = NULL;
+ smp->sm_rules = p;
+ smp->sm_to = NULL;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ smp->sm_lead_w = mb_str2wide(smp->sm_lead);
+--- 1100,1105 ----
+***************
+*** 1112,1118 ****
+ smp->sm_oneof_w = NULL;
+ smp->sm_to_w = NULL;
+ }
+- #endif
+ ++gap->ga_len;
+ }
+
+--- 1107,1112 ----
+***************
+*** 1268,1277 ****
+ * Inserting backslashes may double the length, "^\(\)$<Nul>" is 7 bytes.
+ * Conversion to utf-8 may double the size. */
+ c = todo * 2 + 7;
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ c += todo * 2;
+- #endif
+ pat = alloc((unsigned)c);
+ if (pat == NULL)
+ return SP_OTHERERROR;
+--- 1262,1269 ----
+***************
+*** 1367,1377 ****
+ {
+ if (c == '?' || c == '+' || c == '~')
+ *pp++ = '\\'; /* "a?" becomes "a\?", "a+" becomes "a\+" */
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ pp += mb_char2bytes(c, pp);
+ else
+- #endif
+ *pp++ = c;
+ }
+ }
+--- 1359,1367 ----
+***************
+*** 1401,1407 ****
+ {
+ int i;
+
+- #ifdef FEAT_MBYTE
+ garray_T *gap;
+ char_u *s;
+ char_u *p;
+--- 1391,1396 ----
+***************
+*** 1468,1474 ****
+ }
+ }
+ else
+- #endif
+ {
+ /* mapping bytes to bytes is done in sl_sal_first[] */
+ if (STRLEN(from) != STRLEN(to))
+--- 1457,1462 ----
+***************
+*** 1500,1518 ****
+ smp = (salitem_T *)gap->ga_data;
+ for (i = 0; i < gap->ga_len; ++i)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ /* Use the lowest byte of the first character. For latin1 it's
+ * the character, for other encodings it should differ for most
+ * characters. */
+ c = *smp[i].sm_lead_w & 0xff;
+ else
+- #endif
+ c = *smp[i].sm_lead;
+ if (sfirst[c] == -1)
+ {
+ sfirst[c] = i;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int n;
+--- 1488,1503 ----
+***************
+*** 1540,1551 ****
+ smp[i] = tsal;
+ }
+ }
+- #endif
+ }
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Turn a multi-byte string into a wide character string.
+ * Return it in allocated memory (NULL for out-of-memory)
+--- 1525,1534 ----
+***************
+*** 1566,1572 ****
+ }
+ return res;
+ }
+- #endif
+
+ /*
+ * Read a tree from the .spl or .sug file.
+--- 1549,1554 ----
+***************
+*** 1820,1830 ****
+ char ae_comppermit; /* COMPOUNDPERMITFLAG found */
+ };
+
+! #ifdef FEAT_MBYTE
+! # define AH_KEY_LEN 17 /* 2 x 8 bytes + NUL */
+! #else
+! # define AH_KEY_LEN 7 /* 6 digits + NUL */
+! #endif
+
+ /* Affix header from ".aff" file. Used for af_pref and af_suff. */
+ typedef struct affheader_S
+--- 1802,1808 ----
+ char ae_comppermit; /* COMPOUNDPERMITFLAG found */
+ };
+
+! #define AH_KEY_LEN 17 /* 2 x 8 bytes + NUL */
+
+ /* Affix header from ".aff" file. Used for af_pref and af_suff. */
+ typedef struct affheader_S
+***************
+*** 2271,2277 ****
+
+ /* Convert from "SET" to 'encoding' when needed. */
+ vim_free(pc);
+- #ifdef FEAT_MBYTE
+ if (spin->si_conv.vc_type != CONV_NONE)
+ {
+ pc = string_convert(&spin->si_conv, rline, NULL);
+--- 2249,2254 ----
+***************
+*** 2284,2290 ****
+ line = pc;
+ }
+ else
+- #endif
+ {
+ pc = NULL;
+ line = rline;
+--- 2261,2266 ----
+***************
+*** 2319,2325 ****
+ {
+ if (is_aff_rule(items, itemcnt, "SET", 2) && aff->af_enc == NULL)
+ {
+- #ifdef FEAT_MBYTE
+ /* Setup for conversion from "ENC" to 'encoding'. */
+ aff->af_enc = enc_canonize(items[1]);
+ if (aff->af_enc != NULL && !spin->si_ascii
+--- 2295,2300 ----
+***************
+*** 2328,2336 ****
+ smsg(_("Conversion in %s not supported: from %s to %s"),
+ fname, aff->af_enc, p_enc);
+ spin->si_conv.vc_fail = TRUE;
+- #else
+- smsg(_("Conversion in %s not supported"), fname);
+- #endif
+ }
+ else if (is_aff_rule(items, itemcnt, "FLAG", 2)
+ && aff->af_flagtype == AFT_CHAR)
+--- 2303,2308 ----
+***************
+*** 2772,2784 ****
+ * be empty or start with the same letter. */
+ if (aff_entry->ae_chop != NULL
+ && aff_entry->ae_add != NULL
+- #ifdef FEAT_MBYTE
+ && aff_entry->ae_chop[(*mb_ptr2len)(
+! aff_entry->ae_chop)] == NUL
+! #else
+! && aff_entry->ae_chop[1] == NUL
+! #endif
+! )
+ {
+ int c, c_up;
+
+--- 2744,2751 ----
+ * be empty or start with the same letter. */
+ if (aff_entry->ae_chop != NULL
+ && aff_entry->ae_add != NULL
+ && aff_entry->ae_chop[(*mb_ptr2len)(
+! aff_entry->ae_chop)] == NUL)
+ {
+ int c, c_up;
+
+***************
+*** 2803,2809 ****
+ if (aff_entry->ae_cond != NULL)
+ {
+ char_u buf[MAXLINELEN];
+! #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ onecap_copy(items[4], buf, TRUE);
+--- 2770,2776 ----
+ if (aff_entry->ae_cond != NULL)
+ {
+ char_u buf[MAXLINELEN];
+!
+ if (has_mbyte)
+ {
+ onecap_copy(items[4], buf, TRUE);
+***************
+*** 2811,2817 ****
+ spin, buf);
+ }
+ else
+- #endif
+ *aff_entry->ae_cond = c_up;
+ if (aff_entry->ae_cond != NULL)
+ {
+--- 2778,2783 ----
+***************
+*** 2947,2957 ****
+ /* Check that every character appears only once. */
+ for (p = items[1]; *p != NUL; )
+ {
+- #ifdef FEAT_MBYTE
+ c = mb_ptr2char_adv(&p);
+- #else
+- c = *p++;
+- #endif
+ if ((spin->si_map.ga_len > 0
+ && vim_strchr(spin->si_map.ga_data, c)
+ != NULL)
+--- 2913,2919 ----
+***************
+*** 3034,3044 ****
+ * Don't write one for utf-8 either, we use utf_*() and
+ * mb_get_class(), the list of chars in the file will be incomplete.
+ */
+! if (!spin->si_ascii
+! #ifdef FEAT_MBYTE
+! && !enc_utf8
+! #endif
+! )
+ {
+ if (fol == NULL || low == NULL || upp == NULL)
+ smsg(_("Missing FOL/LOW/UPP line in %s"), fname);
+--- 2996,3002 ----
+ * Don't write one for utf-8 either, we use utf_*() and
+ * mb_get_class(), the list of chars in the file will be incomplete.
+ */
+! if (!spin->si_ascii && !enc_utf8)
+ {
+ if (fol == NULL || low == NULL || upp == NULL)
+ smsg(_("Missing FOL/LOW/UPP line in %s"), fname);
+***************
+*** 3243,3263 ****
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ res = mb_ptr2char_adv(pp);
+- #else
+- res = *(*pp)++;
+- #endif
+ if (flagtype == AFT_LONG || (flagtype == AFT_CAPLONG
+ && res >= 'A' && res <= 'Z'))
+ {
+ if (**pp == NUL)
+ return 0;
+- #ifdef FEAT_MBYTE
+ res = mb_ptr2char_adv(pp) + (res << 16);
+- #else
+- res = *(*pp)++ + (res << 16);
+- #endif
+ }
+ }
+ return res;
+--- 3201,3213 ----
+***************
+*** 3381,3398 ****
+ case AFT_LONG:
+ for (p = afflist; *p != NUL; )
+ {
+- #ifdef FEAT_MBYTE
+ n = mb_ptr2char_adv(&p);
+- #else
+- n = *p++;
+- #endif
+ if ((flagtype == AFT_LONG || (n >= 'A' && n <= 'Z'))
+ && *p != NUL)
+- #ifdef FEAT_MBYTE
+ n = mb_ptr2char_adv(&p) + (n << 16);
+- #else
+- n = *p++ + (n << 16);
+- #endif
+ if (n == flag)
+ return TRUE;
+ }
+--- 3331,3340 ----
+***************
+*** 3589,3595 ****
+ continue; /* empty line */
+ line[l] = NUL;
+
+- #ifdef FEAT_MBYTE
+ /* Convert from "SET" to 'encoding' when needed. */
+ if (spin->si_conv.vc_type != CONV_NONE)
+ {
+--- 3531,3536 ----
+***************
+*** 3603,3609 ****
+ w = pc;
+ }
+ else
+- #endif
+ {
+ pc = NULL;
+ w = line;
+--- 3544,3549 ----
+***************
+*** 3930,3936 ****
+ if (ae->ae_chop != NULL)
+ {
+ /* Skip chop string. */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ i = mb_charlen(ae->ae_chop);
+--- 3870,3875 ----
+***************
+*** 3938,3944 ****
+ MB_PTR_ADV(p);
+ }
+ else
+- #endif
+ p += STRLEN(ae->ae_chop);
+ }
+ STRCAT(newword, p);
+--- 3877,3882 ----
+***************
+*** 4162,4168 ****
+
+ /* Convert from "/encoding={encoding}" to 'encoding' when needed. */
+ vim_free(pc);
+- #ifdef FEAT_MBYTE
+ if (spin->si_conv.vc_type != CONV_NONE)
+ {
+ pc = string_convert(&spin->si_conv, rline, NULL);
+--- 4100,4105 ----
+***************
+*** 4175,4181 ****
+ line = pc;
+ }
+ else
+- #endif
+ {
+ pc = NULL;
+ line = rline;
+--- 4112,4117 ----
+***************
+*** 4194,4200 ****
+ fname, lnum, line - 1);
+ else
+ {
+- #ifdef FEAT_MBYTE
+ char_u *enc;
+
+ /* Setup for conversion to 'encoding'. */
+--- 4130,4135 ----
+***************
+*** 4207,4215 ****
+ fname, line, p_enc);
+ vim_free(enc);
+ spin->si_conv.vc_fail = TRUE;
+- #else
+- smsg(_("Conversion in %s not supported"), fname);
+- #endif
+ }
+ continue;
+ }
+--- 4142,4147 ----
+***************
+*** 4981,4991 ****
+ l = 0;
+ for (i = 128; i < 256; ++i)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ l += mb_char2bytes(spelltab.st_fold[i], folchars + l);
+ else
+- #endif
+ folchars[l++] = spelltab.st_fold[i];
+ }
+ put_bytes(fd, (long_u)(1 + 128 + 2 + l), 4); /* <sectionlen> */
+--- 4913,4921 ----
+***************
+*** 6112,6121 ****
+ error = TRUE;
+ }
+
+- #ifdef FEAT_MBYTE
+ /* Free any conversion stuff. */
+ convert_setup(&spin.si_conv, NULL, NULL);
+- #endif
+ }
+
+ if (spin.si_compflags != NULL && spin.si_nobreak)
+--- 6042,6049 ----
+***************
+*** 6488,6502 ****
+ emsg(_(e_affform));
+ return FAIL;
+ }
+- #ifdef FEAT_MBYTE
+ f = mb_ptr2char_adv(&pf);
+ l = mb_ptr2char_adv(&pl);
+ u = mb_ptr2char_adv(&pu);
+! #else
+! f = *pf++;
+! l = *pl++;
+! u = *pu++;
+! #endif
+ /* Every character that appears is a word character. */
+ if (f < 256)
+ new_st.st_isw[f] = TRUE;
+--- 6416,6425 ----
+ emsg(_(e_affform));
+ return FAIL;
+ }
+ f = mb_ptr2char_adv(&pf);
+ l = mb_ptr2char_adv(&pl);
+ u = mb_ptr2char_adv(&pu);
+!
+ /* Every character that appears is a word character. */
+ if (f < 256)
+ new_st.st_isw[f] = TRUE;
+***************
+*** 6570,6580 ****
+
+ if (*p != NUL)
+ {
+- #ifdef FEAT_MBYTE
+ c = mb_ptr2char_adv(&p);
+- #else
+- c = *p++;
+- #endif
+ new_st.st_fold[i + 128] = c;
+ if (i + 128 != c && new_st.st_isu[i + 128] && c < 256)
+ new_st.st_upper[c] = i + 128;
+--- 6493,6499 ----
+***************
+*** 6675,6683 ****
+ /* Init the array and hash tables empty. */
+ for (i = 0; i < 256; ++i)
+ lp->sl_map_array[i] = 0;
+- #ifdef FEAT_MBYTE
+ hash_init(&lp->sl_map_hash);
+- #endif
+
+ /*
+ * The similar characters are stored separated with slashes:
+--- 6594,6600 ----
+***************
+*** 6686,6696 ****
+ */
+ for (p = map; *p != NUL; )
+ {
+- #ifdef FEAT_MBYTE
+ c = mb_cptr2char_adv(&p);
+- #else
+- c = *p++;
+- #endif
+ if (c == '/')
+ headc = 0;
+ else
+--- 6603,6609 ----
+***************
+*** 6698,6704 ****
+ if (headc == 0)
+ headc = c;
+
+- #ifdef FEAT_MBYTE
+ /* Characters above 255 don't fit in sl_map_array[], put them in
+ * the hash table. Each entry is the char, a NUL the headchar and
+ * a NUL. */
+--- 6611,6616 ----
+***************
+*** 6730,6736 ****
+ }
+ }
+ else
+- #endif
+ lp->sl_map_array[c] = headc;
+ }
+ }
+--- 6642,6647 ----
+*** ../vim-8.1.0809/src/syntax.c 2019-01-20 15:30:36.893328693 +0100
+--- src/syntax.c 2019-01-24 16:51:52.891322038 +0100
+***************
+*** 1974,1985 ****
+ if (vim_iswordp_buf(line + current_col, syn_buf)
+ && (current_col == 0
+ || !vim_iswordp_buf(line + current_col - 1
+- #ifdef FEAT_MBYTE
+ - (has_mbyte
+ ? (*mb_head_off)(line, line + current_col - 1)
+! : 0)
+! #endif
+! , syn_buf)))
+ {
+ syn_id = check_keyword_id(line, (int)current_col,
+ &endcol, &flags, &next_list, cur_si,
+--- 1974,1982 ----
+ if (vim_iswordp_buf(line + current_col, syn_buf)
+ && (current_col == 0
+ || !vim_iswordp_buf(line + current_col - 1
+ - (has_mbyte
+ ? (*mb_head_off)(line, line + current_col - 1)
+! : 0) , syn_buf)))
+ {
+ syn_id = check_keyword_id(line, (int)current_col,
+ &endcol, &flags, &next_list, cur_si,
+***************
+*** 3355,3365 ****
+ kwlen = 0;
+ do
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ kwlen += (*mb_ptr2len)(kwp + kwlen);
+ else
+- #endif
+ ++kwlen;
+ }
+ while (vim_iswordp_buf(kwp + kwlen, syn_buf));
+--- 3352,3360 ----
+***************
+*** 4668,4684 ****
+ }
+ else if (flagtab[fidx].argtype == 11 && arg[5] == '=')
+ {
+- #ifdef FEAT_MBYTE
+ /* cchar=? */
+ if (has_mbyte)
+ {
+! # ifdef FEAT_CONCEAL
+ *conceal_char = mb_ptr2char(arg + 6);
+! # endif
+ arg += mb_ptr2len(arg + 6) - 1;
+ }
+ else
+- #endif
+ {
+ #ifdef FEAT_CONCEAL
+ *conceal_char = arg[6];
+--- 4663,4677 ----
+ }
+ else if (flagtab[fidx].argtype == 11 && arg[5] == '=')
+ {
+ /* cchar=? */
+ if (has_mbyte)
+ {
+! #ifdef FEAT_CONCEAL
+ *conceal_char = mb_ptr2char(arg + 6);
+! #endif
+ arg += mb_ptr2len(arg + 6) - 1;
+ }
+ else
+ {
+ #ifdef FEAT_CONCEAL
+ *conceal_char = arg[6];
+***************
+*** 4948,4954 ****
+ kw = p + 1; /* skip over the "]" */
+ break;
+ }
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int l = (*mb_ptr2len)(p + 1);
+--- 4941,4946 ----
+***************
+*** 4957,4963 ****
+ p += l;
+ }
+ else
+- #endif
+ {
+ p[0] = p[1];
+ ++p;
+--- 4949,4954 ----
+*** ../vim-8.1.0809/src/tag.c 2019-01-19 17:43:03.429449066 +0100
+--- src/tag.c 2019-01-24 16:52:13.291152187 +0100
+***************
+*** 1349,1357 ****
+ #endif
+
+ pat_T orgpat; /* holds unconverted pattern info */
+- #ifdef FEAT_MBYTE
+ vimconv_T vimconv;
+- #endif
+
+ #ifdef FEAT_TAG_BINS
+ int findall = (mincount == MAXCOL || mincount == TAG_MANY);
+--- 1349,1355 ----
+***************
+*** 1387,1395 ****
+
+ help_save = curbuf->b_help;
+ orgpat.pat = pat;
+- #ifdef FEAT_MBYTE
+ vimconv.vc_type = CONV_NONE;
+- #endif
+
+ /*
+ * Allocate memory for the buffers that are used
+--- 1385,1391 ----
+***************
+*** 1725,1731 ****
+ }
+ line_read_in:
+
+- #ifdef FEAT_MBYTE
+ if (vimconv.vc_type != CONV_NONE)
+ {
+ char_u *conv_line;
+--- 1721,1726 ----
+***************
+*** 1752,1758 ****
+ }
+ }
+ }
+- #endif
+
+
+ #ifdef FEAT_EMACS_TAGS
+--- 1747,1752 ----
+***************
+*** 1846,1852 ****
+ if (STRNCMP(lbuf, "!_TAG_FILE_SORTED\t", 18) == 0)
+ tag_file_sorted = lbuf[18];
+ #endif
+- #ifdef FEAT_MBYTE
+ if (STRNCMP(lbuf, "!_TAG_FILE_ENCODING\t", 20) == 0)
+ {
+ /* Prepare to convert every line from the specified
+--- 1840,1845 ----
+***************
+*** 1856,1862 ****
+ *p = NUL;
+ convert_setup(&vimconv, lbuf + 20, p_enc);
+ }
+- #endif
+
+ /* Read the next line. Unrecognized flags are ignored. */
+ continue;
+--- 1849,1854 ----
+***************
+*** 2472,2481 ****
+ vim_free(incstack[incstack_idx].etag_fname);
+ }
+ #endif
+- #ifdef FEAT_MBYTE
+ if (vimconv.vc_type != CONV_NONE)
+ convert_setup(&vimconv, NULL, NULL);
+- #endif
+
+ #ifdef FEAT_TAG_BINS
+ tag_file_sorted = NUL;
+--- 2464,2471 ----
+*** ../vim-8.1.0809/src/term.c 2019-01-20 15:30:36.893328693 +0100
+--- src/term.c 2019-01-24 16:53:05.898719068 +0100
+***************
+*** 2585,2591 ****
+ }
+
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Sometimes a byte out of a multi-byte character is written with out_char().
+ * To avoid flushing half of the character, call this function first.
+--- 2585,2590 ----
+***************
+*** 2596,2602 ****
+ if (enc_dbcs != 0 && out_pos >= OUT_SIZE - MB_MAXBYTES)
+ out_flush();
+ }
+- #endif
+
+ #ifdef FEAT_GUI
+ /*
+--- 2595,2600 ----
+***************
+*** 3620,3626 ****
+ }
+ }
+
+- # if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Check how the terminal treats ambiguous character width (UAX #11).
+ * First, we move the cursor to (1, 0) and print a test ambiguous character
+--- 3618,3623 ----
+***************
+*** 3666,3672 ****
+ (void)vpeekc_nomap();
+ }
+ }
+- # endif
+
+ /*
+ * Similar to requesting the version string: Request the terminal background
+--- 3663,3668 ----
+***************
+*** 4606,4614 ****
+ {
+ int col = 0;
+ int semicols = 0;
+- #ifdef FEAT_MBYTE
+ int row_char = NUL;
+- #endif
+
+ extra = 0;
+ for (i = 2 + (tp[0] != CSI); i < len
+--- 4602,4608 ----
+***************
+*** 4617,4625 ****
+ if (tp[i] == ';' && ++semicols == 1)
+ {
+ extra = i + 1;
+- #ifdef FEAT_MBYTE
+ row_char = tp[i - 1];
+- #endif
+ }
+ if (i == len)
+ {
+--- 4611,4617 ----
+***************
+*** 4629,4635 ****
+ if (extra > 0)
+ col = atoi((char *)tp + extra);
+
+- #ifdef FEAT_MBYTE
+ /* Eat it when it has 2 arguments and ends in 'R'. Also when
+ * u7_status is not "sent", it may be from a previous Vim that
+ * just exited. But not for <S-F3>, it sends something
+--- 4621,4626 ----
+***************
+*** 4672,4681 ****
+ set_vim_var_string(VV_TERMU7RESP, tp, slen);
+ # endif
+ }
+- else
+- #endif
+ /* eat it when at least one digit and ending in 'c' */
+! if (*T_CRV != NUL && i > 2 + (tp[0] != CSI) && tp[i] == 'c')
+ {
+ int version = col;
+
+--- 4663,4671 ----
+ set_vim_var_string(VV_TERMU7RESP, tp, slen);
+ # endif
+ }
+ /* eat it when at least one digit and ending in 'c' */
+! else if (*T_CRV != NUL && i > 2 + (tp[0] != CSI)
+! && tp[i] == 'c')
+ {
+ int version = col;
+
+***************
+*** 5973,5983 ****
+ if (key_name[0] == KS_KEY)
+ {
+ /* from ":set <M-b>=xx" */
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ new_slen += (*mb_char2bytes)(key_name[1], string + new_slen);
+ else
+- #endif
+ string[new_slen++] = key_name[1];
+ }
+ else if (new_slen == 0 && key_name[0] == KS_EXTRA
+--- 5963,5971 ----
+***************
+*** 6257,6266 ****
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ /* skip multibyte char correctly */
+ for (i = (*mb_ptr2len)(src); i > 0; --i)
+- #endif
+ {
+ /*
+ * If the character is K_SPECIAL, replace it with K_SPECIAL
+--- 6245,6252 ----
+*** ../vim-8.1.0809/src/ui.c 2019-01-20 15:30:36.897328669 +0100
+--- src/ui.c 2019-01-24 16:56:27.013117974 +0100
+***************
+*** 40,46 ****
+ /* Don't output anything in silent mode ("ex -s") unless 'verbose' set */
+ if (!(silent_mode && p_verbose == 0))
+ {
+! #if defined(FEAT_MBYTE) && !defined(WIN3264)
+ char_u *tofree = NULL;
+
+ if (output_conv.vc_type != CONV_NONE)
+--- 40,46 ----
+ /* Don't output anything in silent mode ("ex -s") unless 'verbose' set */
+ if (!(silent_mode && p_verbose == 0))
+ {
+! #if !defined(WIN3264)
+ char_u *tofree = NULL;
+
+ if (output_conv.vc_type != CONV_NONE)
+***************
+*** 54,63 ****
+
+ mch_write(s, len);
+
+! #if defined(FEAT_MBYTE) && !defined(WIN3264)
+ if (output_conv.vc_type != CONV_NONE)
+ vim_free(tofree);
+! #endif
+ }
+ #endif
+ }
+--- 54,63 ----
+
+ mch_write(s, len);
+
+! # if !defined(WIN3264)
+ if (output_conv.vc_type != CONV_NONE)
+ vim_free(tofree);
+! # endif
+ }
+ #endif
+ }
+***************
+*** 516,525 ****
+ {
+ start = VIsual;
+ end = curwin->w_cursor;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ end.col += (*mb_ptr2len)(ml_get_cursor()) - 1;
+- #endif
+ }
+ else
+ {
+--- 516,523 ----
+***************
+*** 821,829 ****
+
+ row = check_row(row);
+ col = check_col(col);
+- #ifdef FEAT_MBYTE
+ col = mb_fix_col(col, row);
+- #endif
+
+ cb->start.lnum = row;
+ cb->start.col = col;
+--- 819,825 ----
+***************
+*** 927,935 ****
+
+ row = check_row(row);
+ col = check_col(col);
+- #ifdef FEAT_MBYTE
+ col = mb_fix_col(col, row);
+- #endif
+
+ if (col == (int)cb->prev.col && row == cb->prev.lnum && !repeated_click)
+ return;
+--- 923,929 ----
+***************
+*** 995,1015 ****
+ cb->origin_start_col, row, (int)Columns);
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && mb_lefthalve(row, col))
+ slen = 2;
+- #endif
+ clip_update_modeless_selection(cb, cb->origin_row,
+ cb->origin_start_col, row, col + slen);
+ }
+ }
+ else
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte
+ && mb_lefthalve(cb->origin_row, cb->origin_start_col))
+ slen = 2;
+- #endif
+ if (col >= (int)cb->word_end_col)
+ clip_update_modeless_selection(cb, row, cb->word_end_col,
+ cb->origin_row, cb->origin_start_col + slen);
+--- 989,1005 ----
+***************
+*** 1243,1251 ****
+ int line_end_col;
+ int add_newline_flag = FALSE;
+ int len;
+- #ifdef FEAT_MBYTE
+ char_u *p;
+- #endif
+ int row1 = clip_star.start.lnum;
+ int col1 = clip_star.start.col;
+ int row2 = clip_star.end.lnum;
+--- 1233,1239 ----
+***************
+*** 1267,1289 ****
+ {
+ row = col1; col1 = col2; col2 = row;
+ }
+- #ifdef FEAT_MBYTE
+ /* correct starting point for being on right halve of double-wide char */
+ p = ScreenLines + LineOffset[row1];
+ if (enc_dbcs != 0)
+ col1 -= (*mb_head_off)(p, p + col1);
+ else if (enc_utf8 && p[col1] == 0)
+ --col1;
+- #endif
+
+ /* Create a temporary buffer for storing the text */
+ len = (row2 - row1 + 1) * Columns + 1;
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0)
+ len *= 2; /* max. 2 bytes per display cell */
+ else if (enc_utf8)
+ len *= MB_MAXBYTES;
+- #endif
+ buffer = lalloc((long_u)len, TRUE);
+ if (buffer == NULL) /* out of memory */
+ return;
+--- 1255,1273 ----
+***************
+*** 1322,1328 ****
+
+ if (row < screen_Rows && end_col <= screen_Columns)
+ {
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0)
+ {
+ int i;
+--- 1306,1311 ----
+***************
+*** 1373,1379 ****
+ }
+ }
+ else
+- #endif
+ {
+ STRNCPY(bufp, ScreenLines + LineOffset[row] + start_col,
+ end_col - start_col);
+--- 1356,1361 ----
+***************
+*** 1421,1471 ****
+ int start_class;
+ int temp_col;
+ char_u *p;
+- #ifdef FEAT_MBYTE
+ int mboff;
+- #endif
+
+ if (row >= screen_Rows || col >= screen_Columns || ScreenLines == NULL)
+ return;
+
+ p = ScreenLines + LineOffset[row];
+- #ifdef FEAT_MBYTE
+ /* Correct for starting in the right halve of a double-wide char */
+ if (enc_dbcs != 0)
+ col -= dbcs_screen_head_off(p, p + col);
+ else if (enc_utf8 && p[col] == 0)
+ --col;
+- #endif
+ start_class = CHAR_CLASS(p[col]);
+
+ temp_col = col;
+ for ( ; temp_col > 0; temp_col--)
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0
+ && (mboff = dbcs_screen_head_off(p, p + temp_col - 1)) > 0)
+ temp_col -= mboff;
+! else
+! #endif
+! if (CHAR_CLASS(p[temp_col - 1]) != start_class
+! #ifdef FEAT_MBYTE
+! && !(enc_utf8 && p[temp_col - 1] == 0)
+! #endif
+! )
+ break;
+ cb->word_start_col = temp_col;
+
+ temp_col = col;
+ for ( ; temp_col < screen_Columns; temp_col++)
+- #ifdef FEAT_MBYTE
+ if (enc_dbcs != 0 && dbcs_ptr2cells(p + temp_col) == 2)
+ ++temp_col;
+! else
+! #endif
+! if (CHAR_CLASS(p[temp_col]) != start_class
+! #ifdef FEAT_MBYTE
+! && !(enc_utf8 && p[temp_col] == 0)
+! #endif
+! )
+ break;
+ cb->word_end_col = temp_col;
+ }
+--- 1403,1437 ----
+ int start_class;
+ int temp_col;
+ char_u *p;
+ int mboff;
+
+ if (row >= screen_Rows || col >= screen_Columns || ScreenLines == NULL)
+ return;
+
+ p = ScreenLines + LineOffset[row];
+ /* Correct for starting in the right halve of a double-wide char */
+ if (enc_dbcs != 0)
+ col -= dbcs_screen_head_off(p, p + col);
+ else if (enc_utf8 && p[col] == 0)
+ --col;
+ start_class = CHAR_CLASS(p[col]);
+
+ temp_col = col;
+ for ( ; temp_col > 0; temp_col--)
+ if (enc_dbcs != 0
+ && (mboff = dbcs_screen_head_off(p, p + temp_col - 1)) > 0)
+ temp_col -= mboff;
+! else if (CHAR_CLASS(p[temp_col - 1]) != start_class
+! && !(enc_utf8 && p[temp_col - 1] == 0))
+ break;
+ cb->word_start_col = temp_col;
+
+ temp_col = col;
+ for ( ; temp_col < screen_Columns; temp_col++)
+ if (enc_dbcs != 0 && dbcs_ptr2cells(p + temp_col) == 2)
+ ++temp_col;
+! else if (CHAR_CLASS(p[temp_col]) != start_class
+! && !(enc_utf8 && p[temp_col] == 0))
+ break;
+ cb->word_end_col = temp_col;
+ }
+***************
+*** 1820,1830 ****
+ int len;
+ int try;
+ static int did_read_something = FALSE;
+- # ifdef FEAT_MBYTE
+ static char_u *rest = NULL; /* unconverted rest of previous read */
+ static int restlen = 0;
+ int unconverted;
+- # endif
+ #endif
+
+ #ifdef FEAT_GUI
+--- 1786,1794 ----
+***************
+*** 1860,1866 ****
+ inbufcount = 0;
+ # else
+
+- # ifdef FEAT_MBYTE
+ if (rest != NULL)
+ {
+ /* Use remainder of previous call, starts with an invalid character
+--- 1824,1829 ----
+***************
+*** 1881,1896 ****
+ }
+ else
+ unconverted = 0;
+- # endif
+
+ len = 0; /* to avoid gcc warning */
+ for (try = 0; try < 100; ++try)
+ {
+ size_t readlen = (size_t)((INBUFLEN - inbufcount)
+! # ifdef FEAT_MBYTE
+! / input_conv.vc_factor
+! # endif
+! );
+ # ifdef VMS
+ len = vms_read((char *)inbuf + inbufcount, readlen);
+ # else
+--- 1844,1855 ----
+ }
+ else
+ unconverted = 0;
+
+ len = 0; /* to avoid gcc warning */
+ for (try = 0; try < 100; ++try)
+ {
+ size_t readlen = (size_t)((INBUFLEN - inbufcount)
+! / input_conv.vc_factor);
+ # ifdef VMS
+ len = vms_read((char *)inbuf + inbufcount, readlen);
+ # else
+***************
+*** 1936,1942 ****
+ }
+ else
+ {
+- # ifdef FEAT_MBYTE
+ /*
+ * May perform conversion on the input characters.
+ * Include the unconverted rest of the previous call.
+--- 1895,1900 ----
+***************
+*** 1952,1958 ****
+ len + unconverted, INBUFLEN - inbufcount,
+ rest == NULL ? &rest : NULL, &restlen);
+ }
+- # endif
+ while (len-- > 0)
+ {
+ /*
+--- 1910,1915 ----
+***************
+*** 2014,2021 ****
+ }
+ #endif
+
+- #if defined(FEAT_CLIPBOARD) || defined(FEAT_GUI) || defined(FEAT_RIGHTLEFT) \
+- || defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Check bounds for column number
+ */
+--- 1971,1976 ----
+***************
+*** 2041,2047 ****
+ return (int)screen_Rows - 1;
+ return row;
+ }
+- #endif
+
+ /*
+ * Stuff for the X clipboard. Shared between VMS and Unix.
+--- 1996,2001 ----
+***************
+*** 2066,2075 ****
+ }
+
+ static Atom vim_atom; /* Vim's own special selection format */
+- #ifdef FEAT_MBYTE
+ static Atom vimenc_atom; /* Vim's extended selection format */
+ static Atom utf8_atom;
+- #endif
+ static Atom compound_text_atom;
+ static Atom text_atom;
+ static Atom targets_atom;
+--- 2020,2027 ----
+***************
+*** 2079,2088 ****
+ x11_setup_atoms(Display *dpy)
+ {
+ vim_atom = XInternAtom(dpy, VIM_ATOM_NAME, False);
+- #ifdef FEAT_MBYTE
+ vimenc_atom = XInternAtom(dpy, VIMENC_ATOM_NAME,False);
+ utf8_atom = XInternAtom(dpy, "UTF8_STRING", False);
+- #endif
+ compound_text_atom = XInternAtom(dpy, "COMPOUND_TEXT", False);
+ text_atom = XInternAtom(dpy, "TEXT", False);
+ targets_atom = XInternAtom(dpy, "TARGETS", False);
+--- 2031,2038 ----
+***************
+*** 2170,2178 ****
+ char_u *p;
+ char **text_list = NULL;
+ VimClipboard *cbd;
+- #ifdef FEAT_MBYTE
+ char_u *tmpbuf = NULL;
+- #endif
+
+ if (*sel_atom == clip_plus.sel_atom)
+ cbd = &clip_plus;
+--- 2120,2126 ----
+***************
+*** 2193,2199 ****
+ len--;
+ }
+
+- #ifdef FEAT_MBYTE
+ else if (*type == vimenc_atom)
+ {
+ char_u *enc;
+--- 2141,2146 ----
+***************
+*** 2221,2237 ****
+ convert_setup(&conv, NULL, NULL);
+ }
+ }
+- #endif
+
+ else if (*type == compound_text_atom
+- #ifdef FEAT_MBYTE
+ || *type == utf8_atom
+! #endif
+! || (
+! #ifdef FEAT_MBYTE
+! enc_dbcs != 0 &&
+! #endif
+! *type == text_atom))
+ {
+ XTextProperty text_prop;
+ int n_text = 0;
+--- 2168,2177 ----
+ convert_setup(&conv, NULL, NULL);
+ }
+ }
+
+ else if (*type == compound_text_atom
+ || *type == utf8_atom
+! || (enc_dbcs != 0 && *type == text_atom))
+ {
+ XTextProperty text_prop;
+ int n_text = 0;
+***************
+*** 2241,2247 ****
+ text_prop.encoding = *type;
+ text_prop.format = *format;
+ text_prop.nitems = len;
+! #if defined(FEAT_MBYTE) && defined(X_HAVE_UTF8_STRING)
+ if (*type == utf8_atom)
+ status = Xutf8TextPropertyToTextList(X_DISPLAY, &text_prop,
+ &text_list, &n_text);
+--- 2181,2187 ----
+ text_prop.encoding = *type;
+ text_prop.format = *format;
+ text_prop.nitems = len;
+! #if defined(X_HAVE_UTF8_STRING)
+ if (*type == utf8_atom)
+ status = Xutf8TextPropertyToTextList(X_DISPLAY, &text_prop,
+ &text_list, &n_text);
+***************
+*** 2261,2269 ****
+
+ if (text_list != NULL)
+ XFreeStringList(text_list);
+- #ifdef FEAT_MBYTE
+ vim_free(tmpbuf);
+- #endif
+ XtFree((char *)value);
+ *(int *)success = TRUE;
+ }
+--- 2201,2207 ----
+***************
+*** 2281,2308 ****
+ time_t start_time;
+ int timed_out = FALSE;
+
+! for (i =
+! #ifdef FEAT_MBYTE
+! 0
+! #else
+! 1
+! #endif
+! ; i < 6; i++)
+ {
+ switch (i)
+ {
+- #ifdef FEAT_MBYTE
+ case 0: type = vimenc_atom; break;
+- #endif
+ case 1: type = vim_atom; break;
+- #ifdef FEAT_MBYTE
+ case 2: type = utf8_atom; break;
+- #endif
+ case 3: type = compound_text_atom; break;
+ case 4: type = text_atom; break;
+ default: type = XA_STRING;
+ }
+- #ifdef FEAT_MBYTE
+ if (type == utf8_atom
+ # if defined(X_HAVE_UTF8_STRING)
+ && !enc_utf8
+--- 2219,2235 ----
+ time_t start_time;
+ int timed_out = FALSE;
+
+! for (i = 0; i < 6; i++)
+ {
+ switch (i)
+ {
+ case 0: type = vimenc_atom; break;
+ case 1: type = vim_atom; break;
+ case 2: type = utf8_atom; break;
+ case 3: type = compound_text_atom; break;
+ case 4: type = text_atom; break;
+ default: type = XA_STRING;
+ }
+ if (type == utf8_atom
+ # if defined(X_HAVE_UTF8_STRING)
+ && !enc_utf8
+***************
+*** 2311,2317 ****
+ /* Only request utf-8 when 'encoding' is utf8 and
+ * Xutf8TextPropertyToTextList is available. */
+ continue;
+- #endif
+ success = MAYBE;
+ XtGetSelectionValue(myShell, cbd->sel_atom, type,
+ clip_x11_request_selection_cb, (XtPointer)&success, CurrentTime);
+--- 2238,2243 ----
+***************
+*** 2406,2419 ****
+ *value = (XtPointer)array;
+ i = 0;
+ array[i++] = targets_atom;
+- #ifdef FEAT_MBYTE
+ array[i++] = vimenc_atom;
+- #endif
+ array[i++] = vim_atom;
+- #ifdef FEAT_MBYTE
+ if (enc_utf8)
+ array[i++] = utf8_atom;
+- #endif
+ array[i++] = XA_STRING;
+ array[i++] = text_atom;
+ array[i++] = compound_text_atom;
+--- 2332,2341 ----
+***************
+*** 2427,2436 ****
+ }
+
+ if ( *target != XA_STRING
+- #ifdef FEAT_MBYTE
+ && *target != vimenc_atom
+ && (*target != utf8_atom || !enc_utf8)
+- #endif
+ && *target != vim_atom
+ && *target != text_atom
+ && *target != compound_text_atom)
+--- 2349,2356 ----
+***************
+*** 2445,2455 ****
+ if (*target == vim_atom)
+ (*length)++;
+
+- #ifdef FEAT_MBYTE
+ /* Our own format with encoding: motion 'encoding' NUL text */
+ if (*target == vimenc_atom)
+ *length += STRLEN(p_enc) + 2;
+- #endif
+
+ if (save_length < *length || save_length / 2 >= *length)
+ *value = XtRealloc((char *)save_result, (Cardinal)*length + 1);
+--- 2365,2373 ----
+***************
+*** 2463,2473 ****
+ save_result = (char_u *)*value;
+ save_length = *length;
+
+! if (*target == XA_STRING
+! #ifdef FEAT_MBYTE
+! || (*target == utf8_atom && enc_utf8)
+! #endif
+! )
+ {
+ mch_memmove(save_result, string, (size_t)(*length));
+ *type = *target;
+--- 2381,2387 ----
+ save_result = (char_u *)*value;
+ save_length = *length;
+
+! if (*target == XA_STRING || (*target == utf8_atom && enc_utf8))
+ {
+ mch_memmove(save_result, string, (size_t)(*length));
+ *type = *target;
+***************
+*** 2495,2501 ****
+ save_result = (char_u *)*value;
+ save_length = *length;
+ }
+- #ifdef FEAT_MBYTE
+ else if (*target == vimenc_atom)
+ {
+ int l = STRLEN(p_enc);
+--- 2409,2414 ----
+***************
+*** 2505,2511 ****
+ mch_memmove(save_result + l + 2, string, (size_t)(*length - l - 2));
+ *type = vimenc_atom;
+ }
+- #endif
+ else
+ {
+ save_result[0] = motion_type;
+--- 2418,2423 ----
+***************
+*** 2599,2605 ****
+
+ if (nbytes > 0)
+ {
+- #ifdef FEAT_MBYTE
+ int done = FALSE;
+
+ /* CUT_BUFFER0 is supposed to be always latin1. Convert to 'enc' when
+--- 2511,2516 ----
+***************
+*** 2625,2631 ****
+ }
+ }
+ if (!done) /* use the text without conversion */
+- #endif
+ clip_yank_selection(MCHAR, buffer, (long)nbytes, cbd);
+ XFree((void *)buffer);
+ if (p_verbose > 0)
+--- 2536,2541 ----
+*** ../vim-8.1.0809/src/version.c 2019-01-24 16:38:58.280712420 +0100
+--- src/version.c 2019-01-24 17:17:24.875973757 +0100
+***************
+*** 459,469 ****
+ "+multi_byte_ime",
+ # endif
+ #else
+- # ifdef FEAT_MBYTE
+ "+multi_byte",
+- # else
+- "-multi_byte",
+- # endif
+ #endif
+ #ifdef FEAT_MULTI_LANG
+ "+multi_lang",
+--- 459,465 ----
+***************
+*** 3052,3065 ****
+ for (l = 0; p[l] != NUL
+ && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ clen += ptr2cells(p + l);
+ l += (*mb_ptr2len)(p + l) - 1;
+ }
+ else
+- #endif
+ clen += byte2cells(p[l]);
+ }
+ screen_puts_len(p, l, row, col, *p == '<' ? HL_ATTR(HLF_8) : attr);
+--- 3050,3061 ----
+*** ../vim-8.1.0809/src/winclip.c 2017-02-01 13:42:34.000000000 +0100
+--- src/winclip.c 2019-01-24 17:00:00.143491565 +0100
+***************
+*** 44,50 ****
+ typedef int UINT;
+ #endif
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Convert an UTF-8 string to UTF-16.
+ * "instr[inlen]" is the input. "inlen" is in bytes.
+--- 44,49 ----
+***************
+*** 179,185 ****
+ }
+ }
+
+- #endif /* FEAT_MBYTE */
+
+ #ifdef FEAT_CLIPBOARD
+ /*
+--- 178,183 ----
+***************
+*** 301,312 ****
+ VimClipType_t metadata = { -1, -1, -1, -1 };
+ HGLOBAL hMem = NULL;
+ char_u *str = NULL;
+! #if defined(FEAT_MBYTE) && defined(WIN3264)
+ char_u *to_free = NULL;
+ #endif
+- #ifdef FEAT_MBYTE
+ HGLOBAL rawh = NULL;
+- #endif
+ int str_size = 0;
+ int maxlen;
+ size_t n;
+--- 299,308 ----
+ VimClipType_t metadata = { -1, -1, -1, -1 };
+ HGLOBAL hMem = NULL;
+ char_u *str = NULL;
+! #if defined(WIN3264)
+ char_u *to_free = NULL;
+ #endif
+ HGLOBAL rawh = NULL;
+ int str_size = 0;
+ int maxlen;
+ size_t n;
+***************
+*** 339,345 ****
+ }
+ }
+
+- #ifdef FEAT_MBYTE
+ /* Check for Vim's raw clipboard format first. This is used without
+ * conversion, but only if 'encoding' matches. */
+ if (IsClipboardFormatAvailable(cbd->format_raw)
+--- 335,340 ----
+***************
+*** 366,444 ****
+ }
+ if (str == NULL)
+ {
+! #endif
+!
+! #if defined(FEAT_MBYTE) && defined(WIN3264)
+! /* Try to get the clipboard in Unicode if it's not an empty string. */
+! if (IsClipboardFormatAvailable(CF_UNICODETEXT) && metadata.ucslen != 0)
+! {
+! HGLOBAL hMemW;
+!
+! if ((hMemW = GetClipboardData(CF_UNICODETEXT)) != NULL)
+! {
+! WCHAR *hMemWstr = (WCHAR *)GlobalLock(hMemW);
+!
+! /* Use the length of our metadata if possible, but limit it to the
+! * GlobalSize() for safety. */
+! maxlen = (int)(GlobalSize(hMemW) / sizeof(WCHAR));
+! if (metadata.ucslen >= 0)
+! {
+! if (metadata.ucslen > maxlen)
+! str_size = maxlen;
+ else
+! str_size = metadata.ucslen;
+! }
+! else
+! {
+! for (str_size = 0; str_size < maxlen; ++str_size)
+! if (hMemWstr[str_size] == NUL)
+! break;
+ }
+- to_free = str = utf16_to_enc((short_u *)hMemWstr, &str_size);
+- GlobalUnlock(hMemW);
+ }
+! }
+! else
+ #endif
+! /* Get the clipboard in the Active codepage. */
+! if (IsClipboardFormatAvailable(CF_TEXT))
+! {
+! if ((hMem = GetClipboardData(CF_TEXT)) != NULL)
+ {
+! str = (char_u *)GlobalLock(hMem);
+!
+! /* The length is either what our metadata says or the strlen().
+! * But limit it to the GlobalSize() for safety. */
+! maxlen = (int)GlobalSize(hMem);
+! if (metadata.txtlen >= 0)
+! {
+! if (metadata.txtlen > maxlen)
+! str_size = maxlen;
+! else
+! str_size = metadata.txtlen;
+! }
+! else
+ {
+! for (str_size = 0; str_size < maxlen; ++str_size)
+! if (str[str_size] == NUL)
+! break;
+! }
+
+! # if defined(FEAT_MBYTE) && defined(WIN3264)
+! /* The text is in the active codepage. Convert to 'encoding',
+! * going through UTF-16. */
+! acp_to_enc(str, str_size, &to_free, &maxlen);
+! if (to_free != NULL)
+! {
+! str_size = maxlen;
+! str = to_free;
+ }
+- # endif
+ }
+ }
+- #ifdef FEAT_MBYTE
+- }
+- #endif
+
+ if (str != NULL && *str != NUL)
+ {
+--- 361,435 ----
+ }
+ if (str == NULL)
+ {
+! #if defined(WIN3264)
+! /* Try to get the clipboard in Unicode if it's not an empty string. */
+! if (IsClipboardFormatAvailable(CF_UNICODETEXT) && metadata.ucslen != 0)
+! {
+! HGLOBAL hMemW;
+!
+! if ((hMemW = GetClipboardData(CF_UNICODETEXT)) != NULL)
+! {
+! WCHAR *hMemWstr = (WCHAR *)GlobalLock(hMemW);
+!
+! /* Use the length of our metadata if possible, but limit it to
+! * the GlobalSize() for safety. */
+! maxlen = (int)(GlobalSize(hMemW) / sizeof(WCHAR));
+! if (metadata.ucslen >= 0)
+! {
+! if (metadata.ucslen > maxlen)
+! str_size = maxlen;
+! else
+! str_size = metadata.ucslen;
+! }
+ else
+! {
+! for (str_size = 0; str_size < maxlen; ++str_size)
+! if (hMemWstr[str_size] == NUL)
+! break;
+! }
+! to_free = str = utf16_to_enc((short_u *)hMemWstr, &str_size);
+! GlobalUnlock(hMemW);
+ }
+ }
+! else
+ #endif
+! /* Get the clipboard in the Active codepage. */
+! if (IsClipboardFormatAvailable(CF_TEXT))
+ {
+! if ((hMem = GetClipboardData(CF_TEXT)) != NULL)
+ {
+! str = (char_u *)GlobalLock(hMem);
+
+! /* The length is either what our metadata says or the strlen().
+! * But limit it to the GlobalSize() for safety. */
+! maxlen = (int)GlobalSize(hMem);
+! if (metadata.txtlen >= 0)
+! {
+! if (metadata.txtlen > maxlen)
+! str_size = maxlen;
+! else
+! str_size = metadata.txtlen;
+! }
+! else
+! {
+! for (str_size = 0; str_size < maxlen; ++str_size)
+! if (str[str_size] == NUL)
+! break;
+! }
+!
+! #if defined(WIN3264)
+! /* The text is in the active codepage. Convert to
+! * 'encoding', going through UTF-16. */
+! acp_to_enc(str, str_size, &to_free, &maxlen);
+! if (to_free != NULL)
+! {
+! str_size = maxlen;
+! str = to_free;
+! }
+! #endif
+ }
+ }
+ }
+
+ if (str != NULL && *str != NUL)
+ {
+***************
+*** 460,471 ****
+ /* unlock the global object */
+ if (hMem != NULL)
+ GlobalUnlock(hMem);
+- #ifdef FEAT_MBYTE
+ if (rawh != NULL)
+ GlobalUnlock(rawh);
+- #endif
+ CloseClipboard();
+! #if defined(FEAT_MBYTE) && defined(WIN3264)
+ vim_free(to_free);
+ #endif
+ }
+--- 451,460 ----
+ /* unlock the global object */
+ if (hMem != NULL)
+ GlobalUnlock(hMem);
+ if (rawh != NULL)
+ GlobalUnlock(rawh);
+ CloseClipboard();
+! #if defined(WIN3264)
+ vim_free(to_free);
+ #endif
+ }
+***************
+*** 482,488 ****
+ HGLOBAL hMemRaw = NULL;
+ HGLOBAL hMem = NULL;
+ HGLOBAL hMemVim = NULL;
+! # if defined(FEAT_MBYTE) && defined(WIN3264)
+ HGLOBAL hMemW = NULL;
+ # endif
+
+--- 471,477 ----
+ HGLOBAL hMemRaw = NULL;
+ HGLOBAL hMem = NULL;
+ HGLOBAL hMemVim = NULL;
+! # if defined(WIN3264)
+ HGLOBAL hMemW = NULL;
+ # endif
+
+***************
+*** 499,505 ****
+ metadata.ucslen = 0;
+ metadata.rawlen = 0;
+
+- #ifdef FEAT_MBYTE
+ /* Always set the raw bytes: 'encoding', NUL and the text. This is used
+ * when copy/paste from/to Vim with the same 'encoding', so that illegal
+ * bytes can also be copied and no conversion is needed. */
+--- 488,493 ----
+***************
+*** 519,527 ****
+ else
+ metadata.rawlen = 0;
+ }
+- #endif
+
+! # if defined(FEAT_MBYTE) && defined(WIN3264)
+ {
+ WCHAR *out;
+ int len = metadata.txtlen;
+--- 507,514 ----
+ else
+ metadata.rawlen = 0;
+ }
+
+! # if defined(WIN3264)
+ {
+ WCHAR *out;
+ int len = metadata.txtlen;
+***************
+*** 603,609 ****
+ {
+ SetClipboardData(cbd->format, hMemVim);
+ hMemVim = 0;
+! # if defined(FEAT_MBYTE) && defined(WIN3264)
+ if (hMemW != NULL)
+ {
+ if (SetClipboardData(CF_UNICODETEXT, hMemW) != NULL)
+--- 590,596 ----
+ {
+ SetClipboardData(cbd->format, hMemVim);
+ hMemVim = 0;
+! # if defined(WIN3264)
+ if (hMemW != NULL)
+ {
+ if (SetClipboardData(CF_UNICODETEXT, hMemW) != NULL)
+***************
+*** 624,630 ****
+ GlobalFree(hMemRaw);
+ if (hMem)
+ GlobalFree(hMem);
+! # if defined(FEAT_MBYTE) && defined(WIN3264)
+ if (hMemW)
+ GlobalFree(hMemW);
+ # endif
+--- 611,617 ----
+ GlobalFree(hMemRaw);
+ if (hMem)
+ GlobalFree(hMem);
+! # if defined(WIN3264)
+ if (hMemW)
+ GlobalFree(hMemW);
+ # endif
+***************
+*** 634,640 ****
+
+ #endif /* FEAT_CLIPBOARD */
+
+- #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Note: the following two functions are only guaranteed to work when using
+ * valid MS-Windows codepages or when iconv() is available.
+--- 621,626 ----
+***************
+*** 759,767 ****
+
+ return enc_str;
+ }
+- #endif /* FEAT_MBYTE */
+
+! #if (defined(FEAT_MBYTE) && defined(WIN3264)) || defined(PROTO)
+ /*
+ * Convert from the active codepage to 'encoding'.
+ * Input is "str[str_size]".
+--- 745,752 ----
+
+ return enc_str;
+ }
+
+! #if defined(WIN3264) || defined(PROTO)
+ /*
+ * Convert from the active codepage to 'encoding'.
+ * Input is "str[str_size]".
+*** ../vim-8.1.0809/src/window.c 2019-01-19 17:43:03.433449041 +0100
+--- src/window.c 2019-01-24 17:00:20.827336604 +0100
+***************
+*** 6180,6191 ****
+ */
+ while (ptr > line)
+ {
+- #ifdef FEAT_MBYTE
+ if (has_mbyte && (len = (*mb_head_off)(line, ptr - 1)) > 0)
+ ptr -= len + 1;
+! else
+! #endif
+! if (vim_isfilec(ptr[-1])
+ || ((options & FNAME_HYP) && path_is_url(ptr - 1)))
+ --ptr;
+ else
+--- 6180,6188 ----
+ */
+ while (ptr > line)
+ {
+ if (has_mbyte && (len = (*mb_head_off)(line, ptr - 1)) > 0)
+ ptr -= len + 1;
+! else if (vim_isfilec(ptr[-1])
+ || ((options & FNAME_HYP) && path_is_url(ptr - 1)))
+ --ptr;
+ else
+***************
+*** 6214,6224 ****
+ if (ptr[len] == '\\')
+ /* Skip over the "\" in "\ ". */
+ ++len;
+- #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ len += (*mb_ptr2len)(ptr + len);
+ else
+- #endif
+ ++len;
+ }
+
+--- 6211,6219 ----
+***************
+*** 6829,6835 ****
+ m->match.regprog = regprog;
+ m->match.rmm_ic = FALSE;
+ m->match.rmm_maxcol = 0;
+! # if defined(FEAT_CONCEAL) && defined(FEAT_MBYTE)
+ m->conceal_char = 0;
+ if (conceal_char != NULL)
+ m->conceal_char = (*mb_ptr2char)(conceal_char);
+--- 6824,6830 ----
+ m->match.regprog = regprog;
+ m->match.rmm_ic = FALSE;
+ m->match.rmm_maxcol = 0;
+! # if defined(FEAT_CONCEAL)
+ m->conceal_char = 0;
+ if (conceal_char != NULL)
+ m->conceal_char = (*mb_ptr2char)(conceal_char);
+*** ../vim-8.1.0809/src/glbl_ime.cpp 2016-08-29 22:42:20.000000000 +0200
+--- src/glbl_ime.cpp 2019-01-24 17:00:38.099207536 +0100
+***************
+*** 134,140 ****
+ if (pIApp == NULL || pIApp->OnDefWindowProc(hWnd, Msg,
+ wParam, lParam, &lResult) != S_OK)
+ {
+! #if defined(WIN3264) && defined(FEAT_MBYTE)
+ if (wide_WindowProc)
+ lResult = DefWindowProcW(hWnd, Msg, wParam, lParam);
+ else
+--- 134,140 ----
+ if (pIApp == NULL || pIApp->OnDefWindowProc(hWnd, Msg,
+ wParam, lParam, &lResult) != S_OK)
+ {
+! #if defined(WIN3264)
+ if (wide_WindowProc)
+ lResult = DefWindowProcW(hWnd, Msg, wParam, lParam);
+ else
+*** ../vim-8.1.0809/src/ex_cmds.h 2019-01-17 15:43:21.757878392 +0100
+--- src/ex_cmds.h 2019-01-24 17:01:04.547010454 +0100
+***************
+*** 1789,1798 ****
+ int force_bin; /* 0, FORCE_BIN or FORCE_NOBIN */
+ int read_edit; /* ++edit argument */
+ int force_ff; /* ++ff= argument (first char of argument) */
+- #ifdef FEAT_MBYTE
+ int force_enc; /* ++enc= argument (index in cmd[]) */
+ int bad_char; /* BAD_KEEP, BAD_DROP or replacement byte */
+- #endif
+ #ifdef FEAT_USR_CMDS
+ int useridx; /* user command index */
+ #endif
+--- 1789,1796 ----
+*** ../vim-8.1.0809/src/globals.h 2019-01-22 22:20:13.374961397 +0100
+--- src/globals.h 2019-01-24 17:01:59.414603615 +0100
+***************
+*** 44,50 ****
+ EXTERN unsigned *LineOffset INIT(= NULL);
+ EXTERN char_u *LineWraps INIT(= NULL); /* line wraps to next line */
+
+- #ifdef FEAT_MBYTE
+ /*
+ * When using Unicode characters (in UTF-8 encoding) the character in
+ * ScreenLinesUC[] contains the Unicode for the character at this position, or
+--- 44,49 ----
+***************
+*** 61,67 ****
+ /* Only used for euc-jp: Second byte of a character that starts with 0x8e.
+ * These are single-width. */
+ EXTERN schar_T *ScreenLines2 INIT(= NULL);
+- #endif
+
+ /*
+ * Indexes for tab page line:
+--- 60,65 ----
+***************
+*** 798,838 ****
+ EXTERN JMP_BUF x_jump_env;
+ #endif
+
+- #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT)
+ /*
+ * These flags are set based upon 'fileencoding'.
+ * Note that "enc_utf8" is also set for "unicode", because the characters are
+ * internally stored as UTF-8 (to avoid trouble with NUL bytes).
+ */
+! # define DBCS_JPN 932 /* japan */
+! # define DBCS_JPNU 9932 /* euc-jp */
+! # define DBCS_KOR 949 /* korea */
+! # define DBCS_KORU 9949 /* euc-kr */
+! # define DBCS_CHS 936 /* chinese */
+! # define DBCS_CHSU 9936 /* euc-cn */
+! # define DBCS_CHT 950 /* taiwan */
+! # define DBCS_CHTU 9950 /* euc-tw */
+! # define DBCS_2BYTE 1 /* 2byte- */
+! # define DBCS_DEBUG -1
+! #endif
+
+- #ifdef FEAT_MBYTE
+ EXTERN int enc_dbcs INIT(= 0); /* One of DBCS_xxx values if
+ DBCS encoding */
+ EXTERN int enc_unicode INIT(= 0); /* 2: UCS-2 or UTF-16, 4: UCS-4 */
+ EXTERN int enc_utf8 INIT(= FALSE); /* UTF-8 encoded Unicode */
+ EXTERN int enc_latin1like INIT(= TRUE); /* 'encoding' is latin1 comp. */
+! # if defined(WIN3264) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+ /* Codepage nr of 'encoding'. Negative means it's not been set yet, zero
+ * means 'encoding' is not a valid codepage. */
+ EXTERN int enc_codepage INIT(= -1);
+ EXTERN int enc_latin9 INIT(= FALSE); /* 'encoding' is latin9 */
+! # endif
+ EXTERN int has_mbyte INIT(= 0); /* any multi-byte encoding */
+
+! # if defined(WIN3264) && defined(FEAT_MBYTE)
+ EXTERN int wide_WindowProc INIT(= FALSE); /* use wide WindowProc() */
+! # endif
+
+ /*
+ * To speed up BYTELEN() we fill a table with the byte lengths whenever
+--- 796,833 ----
+ EXTERN JMP_BUF x_jump_env;
+ #endif
+
+ /*
+ * These flags are set based upon 'fileencoding'.
+ * Note that "enc_utf8" is also set for "unicode", because the characters are
+ * internally stored as UTF-8 (to avoid trouble with NUL bytes).
+ */
+! #define DBCS_JPN 932 /* japan */
+! #define DBCS_JPNU 9932 /* euc-jp */
+! #define DBCS_KOR 949 /* korea */
+! #define DBCS_KORU 9949 /* euc-kr */
+! #define DBCS_CHS 936 /* chinese */
+! #define DBCS_CHSU 9936 /* euc-cn */
+! #define DBCS_CHT 950 /* taiwan */
+! #define DBCS_CHTU 9950 /* euc-tw */
+! #define DBCS_2BYTE 1 /* 2byte- */
+! #define DBCS_DEBUG -1
+
+ EXTERN int enc_dbcs INIT(= 0); /* One of DBCS_xxx values if
+ DBCS encoding */
+ EXTERN int enc_unicode INIT(= 0); /* 2: UCS-2 or UTF-16, 4: UCS-4 */
+ EXTERN int enc_utf8 INIT(= FALSE); /* UTF-8 encoded Unicode */
+ EXTERN int enc_latin1like INIT(= TRUE); /* 'encoding' is latin1 comp. */
+! #if defined(WIN3264) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+ /* Codepage nr of 'encoding'. Negative means it's not been set yet, zero
+ * means 'encoding' is not a valid codepage. */
+ EXTERN int enc_codepage INIT(= -1);
+ EXTERN int enc_latin9 INIT(= FALSE); /* 'encoding' is latin9 */
+! #endif
+ EXTERN int has_mbyte INIT(= 0); /* any multi-byte encoding */
+
+! #if defined(WIN3264)
+ EXTERN int wide_WindowProc INIT(= FALSE); /* use wide WindowProc() */
+! #endif
+
+ /*
+ * To speed up BYTELEN() we fill a table with the byte lengths whenever
+***************
+*** 875,881 ****
+ EXTERN int* (*iconv_errno) (void);
+ # endif
+
+- #endif /* FEAT_MBYTE */
+
+ #ifdef FEAT_XIM
+ # ifdef FEAT_GUI_GTK
+--- 870,875 ----
+*** ../vim-8.1.0809/src/gui.h 2018-07-29 17:35:19.493750319 +0200
+--- src/gui.h 2019-01-24 17:02:15.106487731 +0100
+***************
+*** 303,315 ****
+ GuiFont menu_font; /* menu item font */
+ # endif
+ #endif
+- #ifdef FEAT_MBYTE
+ GuiFont wide_font; /* Normal 'guifontwide' font */
+! # ifndef FEAT_GUI_GTK
+ GuiFont wide_bold_font; /* Bold 'guifontwide' font */
+ GuiFont wide_ital_font; /* Italic 'guifontwide' font */
+ GuiFont wide_boldital_font; /* Bold-Italic 'guifontwide' font */
+- # endif
+ #endif
+ #ifdef FEAT_XFONTSET
+ GuiFontset fontset; /* set of fonts for multi-byte chars */
+--- 303,313 ----
+ GuiFont menu_font; /* menu item font */
+ # endif
+ #endif
+ GuiFont wide_font; /* Normal 'guifontwide' font */
+! #ifndef FEAT_GUI_GTK
+ GuiFont wide_bold_font; /* Bold 'guifontwide' font */
+ GuiFont wide_ital_font; /* Italic 'guifontwide' font */
+ GuiFont wide_boldital_font; /* Bold-Italic 'guifontwide' font */
+ #endif
+ #ifdef FEAT_XFONTSET
+ GuiFontset fontset; /* set of fonts for multi-byte chars */
+*** ../vim-8.1.0809/src/if_py_both.h 2019-01-19 17:43:03.417449145 +0100
+--- src/if_py_both.h 2019-01-24 17:02:32.870356782 +0100
+***************
+*** 24,34 ****
+ typedef int Py_ssize_t; /* Python 2.4 and earlier don't have this type. */
+ #endif
+
+! #ifdef FEAT_MBYTE
+! # define ENC_OPT ((char *)p_enc)
+! #else
+! # define ENC_OPT "latin1"
+! #endif
+ #define DOPY_FUNC "_vim_pydo"
+
+ static const char *vim_special_path = "_vim_path_";
+--- 24,30 ----
+ typedef int Py_ssize_t; /* Python 2.4 and earlier don't have this type. */
+ #endif
+
+! #define ENC_OPT ((char *)p_enc)
+ #define DOPY_FUNC "_vim_pydo"
+
+ static const char *vim_special_path = "_vim_path_";
+***************
+*** 985,995 ****
+ if (!(str = StringToChars(string, &todecref)))
+ return NULL;
+
+- #ifdef FEAT_MBYTE
+ len = mb_string2cells(str, (int)STRLEN(str));
+- #else
+- len = STRLEN(str);
+- #endif
+
+ Py_XDECREF(todecref);
+
+--- 981,987 ----
+*** ../vim-8.1.0809/src/macros.h 2018-11-16 16:21:01.633310065 +0100
+--- src/macros.h 2019-01-24 17:03:20.958003503 +0100
+***************
+*** 96,112 ****
+ * MB_ISLOWER() and MB_ISUPPER() are to be used on multi-byte characters. But
+ * don't use them for negative values!
+ */
+! #ifdef FEAT_MBYTE
+! # define MB_ISLOWER(c) vim_islower(c)
+! # define MB_ISUPPER(c) vim_isupper(c)
+! # define MB_TOLOWER(c) vim_tolower(c)
+! # define MB_TOUPPER(c) vim_toupper(c)
+! #else
+! # define MB_ISLOWER(c) islower(c)
+! # define MB_ISUPPER(c) isupper(c)
+! # define MB_TOLOWER(c) TOLOWER_LOC(c)
+! # define MB_TOUPPER(c) TOUPPER_LOC(c)
+! #endif
+
+ /* Use our own isdigit() replacement, because on MS-Windows isdigit() returns
+ * non-zero for superscript 1. Also avoids that isdigit() crashes for numbers
+--- 96,105 ----
+ * MB_ISLOWER() and MB_ISUPPER() are to be used on multi-byte characters. But
+ * don't use them for negative values!
+ */
+! #define MB_ISLOWER(c) vim_islower(c)
+! #define MB_ISUPPER(c) vim_isupper(c)
+! #define MB_TOLOWER(c) vim_tolower(c)
+! #define MB_TOUPPER(c) vim_toupper(c)
+
+ /* Use our own isdigit() replacement, because on MS-Windows isdigit() returns
+ * non-zero for superscript 1. Also avoids that isdigit() crashes for numbers
+***************
+*** 139,146 ****
+ * a mapping and the langnoremap option was set.
+ * The do-while is just to ignore a ';' after the macro.
+ */
+! # ifdef FEAT_MBYTE
+! # define LANGMAP_ADJUST(c, condition) \
+ do { \
+ if (*p_langmap \
+ && (condition) \
+--- 132,138 ----
+ * a mapping and the langnoremap option was set.
+ * The do-while is just to ignore a ';' after the macro.
+ */
+! # define LANGMAP_ADJUST(c, condition) \
+ do { \
+ if (*p_langmap \
+ && (condition) \
+***************
+*** 154,170 ****
+ c = langmap_adjust_mb(c); \
+ } \
+ } while (0)
+- # else
+- # define LANGMAP_ADJUST(c, condition) \
+- do { \
+- if (*p_langmap \
+- && (condition) \
+- && (p_lrm || (!p_lrm && KeyTyped)) \
+- && !KeyStuffed \
+- && (c) >= 0 && (c) < 256) \
+- c = langmap_mapchar[c]; \
+- } while (0)
+- # endif
+ #else
+ # define LANGMAP_ADJUST(c, condition) /* nop */
+ #endif
+--- 146,151 ----
+***************
+*** 256,288 ****
+ * MB_COPY_CHAR(f, t): copy one char from "f" to "t" and advance the pointers.
+ * PTR2CHAR(): get character from pointer.
+ */
+- #ifdef FEAT_MBYTE
+ /* Get the length of the character p points to, including composing chars */
+! # define MB_PTR2LEN(p) (has_mbyte ? (*mb_ptr2len)(p) : 1)
+ /* Advance multi-byte pointer, skip over composing chars. */
+! # define MB_PTR_ADV(p) p += has_mbyte ? (*mb_ptr2len)(p) : 1
+ /* Advance multi-byte pointer, do not skip over composing chars. */
+! # define MB_CPTR_ADV(p) p += enc_utf8 ? utf_ptr2len(p) : has_mbyte ? (*mb_ptr2len)(p) : 1
+ /* Backup multi-byte pointer. Only use with "p" > "s" ! */
+! # define MB_PTR_BACK(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
+ /* get length of multi-byte char, not including composing chars */
+! # define MB_CPTR2LEN(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
+
+! # define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
+! # define MB_CHARLEN(p) (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
+! # define MB_CHAR2LEN(c) (has_mbyte ? mb_char2len(c) : 1)
+! # define PTR2CHAR(p) (has_mbyte ? mb_ptr2char(p) : (int)*(p))
+! #else
+! # define MB_PTR2LEN(p) 1
+! # define MB_CPTR2LEN(p) 1
+! # define MB_PTR_ADV(p) ++p
+! # define MB_CPTR_ADV(p) ++p
+! # define MB_PTR_BACK(s, p) --p
+! # define MB_COPY_CHAR(f, t) *t++ = *f++
+! # define MB_CHARLEN(p) STRLEN(p)
+! # define MB_CHAR2LEN(c) 1
+! # define PTR2CHAR(p) ((int)*(p))
+! #endif
+
+ #ifdef FEAT_AUTOCHDIR
+ # define DO_AUTOCHDIR do { if (p_acd) do_autochdir(); } while (0)
+--- 237,257 ----
+ * MB_COPY_CHAR(f, t): copy one char from "f" to "t" and advance the pointers.
+ * PTR2CHAR(): get character from pointer.
+ */
+ /* Get the length of the character p points to, including composing chars */
+! #define MB_PTR2LEN(p) (has_mbyte ? (*mb_ptr2len)(p) : 1)
+ /* Advance multi-byte pointer, skip over composing chars. */
+! #define MB_PTR_ADV(p) p += has_mbyte ? (*mb_ptr2len)(p) : 1
+ /* Advance multi-byte pointer, do not skip over composing chars. */
+! #define MB_CPTR_ADV(p) p += enc_utf8 ? utf_ptr2len(p) : has_mbyte ? (*mb_ptr2len)(p) : 1
+ /* Backup multi-byte pointer. Only use with "p" > "s" ! */
+! #define MB_PTR_BACK(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
+ /* get length of multi-byte char, not including composing chars */
+! #define MB_CPTR2LEN(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
+
+! #define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
+! #define MB_CHARLEN(p) (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
+! #define MB_CHAR2LEN(c) (has_mbyte ? mb_char2len(c) : 1)
+! #define PTR2CHAR(p) (has_mbyte ? mb_ptr2char(p) : (int)*(p))
+
+ #ifdef FEAT_AUTOCHDIR
+ # define DO_AUTOCHDIR do { if (p_acd) do_autochdir(); } while (0)
+*** ../vim-8.1.0809/src/option.h 2019-01-11 22:15:00.519123428 +0100
+--- src/option.h 2019-01-24 17:04:23.493546503 +0100
+***************
+*** 69,81 ****
+ #endif
+
+
+- #ifdef FEAT_MBYTE
+ /* Possible values for 'encoding' */
+! # define ENC_UCSBOM "ucs-bom" /* check for BOM at start of file */
+
+ /* default value for 'encoding' */
+! # define ENC_DFLT "latin1"
+! #endif
+
+ /* end-of-line style */
+ #define EOL_UNKNOWN -1 /* not defined yet */
+--- 69,79 ----
+ #endif
+
+
+ /* Possible values for 'encoding' */
+! #define ENC_UCSBOM "ucs-bom" /* check for BOM at start of file */
+
+ /* default value for 'encoding' */
+! #define ENC_DFLT "latin1"
+
+ /* end-of-line style */
+ #define EOL_UNKNOWN -1 /* not defined yet */
+***************
+*** 315,324 ****
+ #ifdef FEAT_AUTOCHDIR
+ EXTERN int p_acd; /* 'autochdir' */
+ #endif
+- #ifdef FEAT_MBYTE
+ EXTERN char_u *p_ambw; /* 'ambiwidth' */
+ EXTERN char_u *p_emoji; /* 'emoji' */
+- #endif
+ #if defined(FEAT_GUI) && defined(MACOS_X)
+ EXTERN int *p_antialias; /* 'antialias' */
+ #endif
+--- 313,320 ----
+***************
+*** 395,415 ****
+ #ifdef FEAT_LINEBREAK
+ EXTERN char_u *p_breakat; /* 'breakat' */
+ #endif
+- #ifdef FEAT_MBYTE
+ EXTERN char_u *p_cmp; /* 'casemap' */
+ EXTERN unsigned cmp_flags;
+! # ifdef IN_OPTION_C
+ static char *(p_cmp_values[]) = {"internal", "keepascii", NULL};
+- # endif
+- # define CMP_INTERNAL 0x001
+- # define CMP_KEEPASCII 0x002
+ #endif
+! #ifdef FEAT_MBYTE
+ EXTERN char_u *p_enc; /* 'encoding' */
+ EXTERN int p_deco; /* 'delcombine' */
+! # ifdef FEAT_EVAL
+ EXTERN char_u *p_ccv; /* 'charconvert' */
+- # endif
+ #endif
+ #ifdef FEAT_CMDWIN
+ EXTERN char_u *p_cedit; /* 'cedit' */
+--- 391,407 ----
+ #ifdef FEAT_LINEBREAK
+ EXTERN char_u *p_breakat; /* 'breakat' */
+ #endif
+ EXTERN char_u *p_cmp; /* 'casemap' */
+ EXTERN unsigned cmp_flags;
+! #ifdef IN_OPTION_C
+ static char *(p_cmp_values[]) = {"internal", "keepascii", NULL};
+ #endif
+! #define CMP_INTERNAL 0x001
+! #define CMP_KEEPASCII 0x002
+ EXTERN char_u *p_enc; /* 'encoding' */
+ EXTERN int p_deco; /* 'delcombine' */
+! #ifdef FEAT_EVAL
+ EXTERN char_u *p_ccv; /* 'charconvert' */
+ #endif
+ #ifdef FEAT_CMDWIN
+ EXTERN char_u *p_cedit; /* 'cedit' */
+***************
+*** 482,490 ****
+ EXTERN char_u *p_ei; /* 'eventignore' */
+ EXTERN int p_ek; /* 'esckeys' */
+ EXTERN int p_exrc; /* 'exrc' */
+- #ifdef FEAT_MBYTE
+ EXTERN char_u *p_fencs; /* 'fileencodings' */
+- #endif
+ EXTERN char_u *p_ffs; /* 'fileformats' */
+ EXTERN long p_fic; /* 'fileignorecase' */
+ #ifdef FEAT_FOLDING
+--- 474,480 ----
+***************
+*** 519,528 ****
+ # ifdef FEAT_POSTSCRIPT
+ EXTERN char_u *p_penc; /* 'printencoding' */
+ EXTERN char_u *p_pexpr; /* 'printexpr' */
+- # ifdef FEAT_MBYTE
+ EXTERN char_u *p_pmfn; /* 'printmbfont' */
+ EXTERN char_u *p_pmcs; /* 'printmbcharset' */
+- # endif
+ # endif
+ EXTERN char_u *p_pfn; /* 'printfont' */
+ EXTERN char_u *p_popt; /* 'printoptions' */
+--- 509,516 ----
+***************
+*** 534,542 ****
+ # ifdef FEAT_XFONTSET
+ EXTERN char_u *p_guifontset; /* 'guifontset' */
+ # endif
+- # ifdef FEAT_MBYTE
+ EXTERN char_u *p_guifontwide; /* 'guifontwide' */
+- # endif
+ EXTERN int p_guipty; /* 'guipty' */
+ #endif
+ #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
+--- 522,528 ----
+***************
+*** 586,599 ****
+ #define IM_OVER_THE_SPOT 1L
+ EXTERN long p_imst; /* 'imstyle' */
+ #endif
+! #if defined(FEAT_EVAL) && defined(FEAT_MBYTE)
+ EXTERN char_u *p_imaf; /* 'imactivatefunc' */
+ EXTERN char_u *p_imsf; /* 'imstatusfunc' */
+ #endif
+- #ifdef FEAT_MBYTE
+ EXTERN int p_imcmdline; /* 'imcmdline' */
+ EXTERN int p_imdisable; /* 'imdisable' */
+- #endif
+ EXTERN int p_is; /* 'incsearch' */
+ EXTERN int p_im; /* 'insertmode' */
+ EXTERN char_u *p_isf; /* 'isfname' */
+--- 572,583 ----
+ #define IM_OVER_THE_SPOT 1L
+ EXTERN long p_imst; /* 'imstyle' */
+ #endif
+! #if defined(FEAT_EVAL)
+ EXTERN char_u *p_imaf; /* 'imactivatefunc' */
+ EXTERN char_u *p_imsf; /* 'imstatusfunc' */
+ #endif
+ EXTERN int p_imcmdline; /* 'imcmdline' */
+ EXTERN int p_imdisable; /* 'imdisable' */
+ EXTERN int p_is; /* 'incsearch' */
+ EXTERN int p_im; /* 'insertmode' */
+ EXTERN char_u *p_isf; /* 'isfname' */
+***************
+*** 629,637 ****
+ EXTERN int p_macatsui; /* 'macatsui' */
+ #endif
+ EXTERN int p_magic; /* 'magic' */
+- #ifdef FEAT_MBYTE
+ EXTERN char_u *p_menc; /* 'makeencoding' */
+- #endif
+ #ifdef FEAT_QUICKFIX
+ EXTERN char_u *p_mef; /* 'makeef' */
+ EXTERN char_u *p_mp; /* 'makeprg' */
+--- 613,619 ----
+***************
+*** 644,652 ****
+ EXTERN int p_cc_cols[256]; /* array for 'colorcolumn' columns */
+ #endif
+ EXTERN long p_mat; /* 'matchtime' */
+- #ifdef FEAT_MBYTE
+ EXTERN long p_mco; /* 'maxcombine' */
+- #endif
+ #ifdef FEAT_EVAL
+ EXTERN long p_mfd; /* 'maxfuncdepth' */
+ #endif
+--- 626,632 ----
+***************
+*** 850,858 ****
+ #ifdef FEAT_ARABIC
+ EXTERN int p_tbidi; /* 'termbidi' */
+ #endif
+- #ifdef FEAT_MBYTE
+ EXTERN char_u *p_tenc; /* 'termencoding' */
+- #endif
+ #ifdef FEAT_TERMGUICOLORS
+ EXTERN int p_tgc; /* 'termguicolors' */
+ #endif
+--- 830,836 ----
+***************
+*** 1001,1009 ****
+ #endif
+ , BV_BIN
+ , BV_BL
+- #ifdef FEAT_MBYTE
+ , BV_BOMB
+- #endif
+ , BV_CI
+ #ifdef FEAT_CINDENT
+ , BV_CIN
+--- 979,985 ----
+***************
+*** 1068,1076 ****
+ , BV_LISP
+ , BV_LW
+ #endif
+- #ifdef FEAT_MBYTE
+ , BV_MENC
+- #endif
+ , BV_MA
+ , BV_ML
+ , BV_MOD
+--- 1044,1050 ----
+*** ../vim-8.1.0809/src/os_mac.h 2018-09-21 14:48:49.644214400 +0200
+--- src/os_mac.h 2019-01-24 17:04:40.809420405 +0100
+***************
+*** 37,45 ****
+ # include <Memory.h>
+ # include <OSUtils.h>
+ # include <Files.h>
+! # ifdef FEAT_MBYTE
+! # include <Script.h>
+! # endif
+ #endif
+
+ /*
+--- 37,43 ----
+ # include <Memory.h>
+ # include <OSUtils.h>
+ # include <Files.h>
+! # include <Script.h>
+ #endif
+
+ /*
+*** ../vim-8.1.0809/src/os_win32.h 2018-09-21 14:48:49.644214400 +0200
+--- src/os_win32.h 2019-01-24 17:04:56.853303732 +0100
+***************
+*** 213,226 ****
+ #endif
+
+ /* Enable common dialogs input unicode from IME if possible. */
+! #ifdef FEAT_MBYTE
+! # define pDispatchMessage DispatchMessageW
+! # define pGetMessage GetMessageW
+! # define pIsDialogMessage IsDialogMessageW
+! # define pPeekMessage PeekMessageW
+! #else
+! # define pDispatchMessage DispatchMessage
+! # define pGetMessage GetMessage
+! # define pIsDialogMessage IsDialogMessage
+! # define pPeekMessage PeekMessage
+! #endif
+--- 213,219 ----
+ #endif
+
+ /* Enable common dialogs input unicode from IME if possible. */
+! #define pDispatchMessage DispatchMessageW
+! #define pGetMessage GetMessageW
+! #define pIsDialogMessage IsDialogMessageW
+! #define pPeekMessage PeekMessageW
+*** ../vim-8.1.0809/src/proto.h 2019-01-22 21:45:36.553678901 +0100
+--- src/proto.h 2019-01-24 17:05:20.409132700 +0100
+***************
+*** 168,177 ****
+ void qsort(void *base, size_t elm_count, size_t elm_size, int (*cmp)(const void *, const void *));
+ #endif
+ # include "move.pro"
+! # if defined(FEAT_MBYTE) || defined(FEAT_XIM) || defined(FEAT_KEYMAP) \
+! || defined(FEAT_POSTSCRIPT)
+! # include "mbyte.pro"
+! # endif
+ # include "normal.pro"
+ # include "ops.pro"
+ # include "option.pro"
+--- 168,174 ----
+ void qsort(void *base, size_t elm_count, size_t elm_size, int (*cmp)(const void *, const void *));
+ #endif
+ # include "move.pro"
+! # include "mbyte.pro"
+ # include "normal.pro"
+ # include "ops.pro"
+ # include "option.pro"
+*** ../vim-8.1.0809/src/spell.h 2018-02-10 13:55:21.000000000 +0100
+--- src/spell.h 2019-01-24 17:06:16.664725481 +0100
+***************
+*** 44,54 ****
+ typedef long idx_T;
+ #endif
+
+- #ifdef FEAT_MBYTE
+ typedef int salfirst_T;
+- #else
+- typedef short salfirst_T;
+- #endif
+
+ /*
+ * Structure used to store words and other info for one language, loaded from
+--- 44,50 ----
+***************
+*** 132,143 ****
+ load */
+
+ int sl_has_map; /* TRUE if there is a MAP line */
+- #ifdef FEAT_MBYTE
+ hashtab_T sl_map_hash; /* MAP for multi-byte chars */
+ int sl_map_array[256]; /* MAP for first 256 chars */
+- #else
+- char_u sl_map_array[256]; /* MAP for first 256 chars */
+- #endif
+ hashtab_T sl_sounddone; /* table with soundfolded words that have
+ handled, see add_sound_suggest() */
+ };
+--- 128,135 ----
+***************
+*** 213,223 ****
+ char_u *sm_oneof; /* letters from () or NULL */
+ char_u *sm_rules; /* rules like ^, $, priority */
+ char_u *sm_to; /* replacement. */
+- #ifdef FEAT_MBYTE
+ int *sm_lead_w; /* wide character copy of "sm_lead" */
+ int *sm_oneof_w; /* wide character copy of "sm_oneof" */
+ int *sm_to_w; /* wide character copy of "sm_to" */
+- #endif
+ } salitem_T;
+
+ /* Values for SP_*ERROR are negative, positive values are used by
+--- 205,213 ----
+***************
+*** 260,300 ****
+ * differ from what the .spl file uses.
+ * These must not be called with negative number!
+ */
+! #ifndef FEAT_MBYTE
+! /* Non-multi-byte implementation. */
+! # define SPELL_TOFOLD(c) ((c) < 256 ? (int)spelltab.st_fold[c] : (c))
+! # define SPELL_TOUPPER(c) ((c) < 256 ? (int)spelltab.st_upper[c] : (c))
+! # define SPELL_ISUPPER(c) ((c) < 256 ? spelltab.st_isu[c] : FALSE)
+! #else
+! # if defined(HAVE_WCHAR_H)
+! # include <wchar.h> /* for towupper() and towlower() */
+! # endif
+ /* Multi-byte implementation. For Unicode we can call utf_*(), but don't do
+ * that for ASCII, because we don't want to use 'casemap' here. Otherwise use
+ * the "w" library function for characters above 255 if available. */
+! # ifdef HAVE_TOWLOWER
+! # define SPELL_TOFOLD(c) (enc_utf8 && (c) >= 128 ? utf_fold(c) \
+ : (c) < 256 ? (int)spelltab.st_fold[c] : (int)towlower(c))
+! # else
+! # define SPELL_TOFOLD(c) (enc_utf8 && (c) >= 128 ? utf_fold(c) \
+ : (c) < 256 ? (int)spelltab.st_fold[c] : (c))
+! # endif
+
+! # ifdef HAVE_TOWUPPER
+! # define SPELL_TOUPPER(c) (enc_utf8 && (c) >= 128 ? utf_toupper(c) \
+ : (c) < 256 ? (int)spelltab.st_upper[c] : (int)towupper(c))
+! # else
+! # define SPELL_TOUPPER(c) (enc_utf8 && (c) >= 128 ? utf_toupper(c) \
+ : (c) < 256 ? (int)spelltab.st_upper[c] : (c))
+! # endif
+
+! # ifdef HAVE_ISWUPPER
+! # define SPELL_ISUPPER(c) (enc_utf8 && (c) >= 128 ? utf_isupper(c) \
+ : (c) < 256 ? spelltab.st_isu[c] : iswupper(c))
+! # else
+! # define SPELL_ISUPPER(c) (enc_utf8 && (c) >= 128 ? utf_isupper(c) \
+ : (c) < 256 ? spelltab.st_isu[c] : (FALSE))
+- # endif
+ #endif
+
+ #ifdef FEAT_SPELL
+--- 250,283 ----
+ * differ from what the .spl file uses.
+ * These must not be called with negative number!
+ */
+! #if defined(HAVE_WCHAR_H)
+! # include <wchar.h> /* for towupper() and towlower() */
+! #endif
+ /* Multi-byte implementation. For Unicode we can call utf_*(), but don't do
+ * that for ASCII, because we don't want to use 'casemap' here. Otherwise use
+ * the "w" library function for characters above 255 if available. */
+! #ifdef HAVE_TOWLOWER
+! # define SPELL_TOFOLD(c) (enc_utf8 && (c) >= 128 ? utf_fold(c) \
+ : (c) < 256 ? (int)spelltab.st_fold[c] : (int)towlower(c))
+! #else
+! # define SPELL_TOFOLD(c) (enc_utf8 && (c) >= 128 ? utf_fold(c) \
+ : (c) < 256 ? (int)spelltab.st_fold[c] : (c))
+! #endif
+
+! #ifdef HAVE_TOWUPPER
+! # define SPELL_TOUPPER(c) (enc_utf8 && (c) >= 128 ? utf_toupper(c) \
+ : (c) < 256 ? (int)spelltab.st_upper[c] : (int)towupper(c))
+! #else
+! # define SPELL_TOUPPER(c) (enc_utf8 && (c) >= 128 ? utf_toupper(c) \
+ : (c) < 256 ? (int)spelltab.st_upper[c] : (c))
+! #endif
+
+! #ifdef HAVE_ISWUPPER
+! # define SPELL_ISUPPER(c) (enc_utf8 && (c) >= 128 ? utf_isupper(c) \
+ : (c) < 256 ? spelltab.st_isu[c] : iswupper(c))
+! #else
+! # define SPELL_ISUPPER(c) (enc_utf8 && (c) >= 128 ? utf_isupper(c) \
+ : (c) < 256 ? spelltab.st_isu[c] : (FALSE))
+ #endif
+
+ #ifdef FEAT_SPELL
+*** ../vim-8.1.0809/src/structs.h 2019-01-18 22:48:30.900796633 +0100
+--- src/structs.h 2019-01-24 17:06:44.200526742 +0100
+***************
+*** 1103,1111 ****
+ {
+ char_u *vir_line; /* text of the current line */
+ FILE *vir_fd; /* file descriptor */
+- #ifdef FEAT_MBYTE
+ vimconv_T vir_conv; /* encoding conversion */
+- #endif
+ int vir_version; /* viminfo version detected or -1 */
+ garray_T vir_barlines; /* lines starting with | */
+ } vir_T;
+--- 1103,1109 ----
+***************
+*** 2013,2028 ****
+ /* for spell checking */
+ garray_T b_langp; /* list of pointers to slang_T, see spell.c */
+ char_u b_spell_ismw[256];/* flags: is midword char */
+- # ifdef FEAT_MBYTE
+ char_u *b_spell_ismw_mb; /* multi-byte midword chars */
+- # endif
+ char_u *b_p_spc; /* 'spellcapcheck' */
+ regprog_T *b_cap_prog; /* program for 'spellcapcheck' */
+ char_u *b_p_spf; /* 'spellfile' */
+ char_u *b_p_spl; /* 'spelllang' */
+- # ifdef FEAT_MBYTE
+ int b_cjk; /* all CJK letters as OK */
+- # endif
+ #endif
+ #if !defined(FEAT_SYN_HL) && !defined(FEAT_SPELL)
+ int dummy;
+--- 2011,2022 ----
+***************
+*** 2233,2241 ****
+ unsigned b_bkc_flags; /* flags for 'backupcopy' */
+ int b_p_ci; /* 'copyindent' */
+ int b_p_bin; /* 'binary' */
+- #ifdef FEAT_MBYTE
+ int b_p_bomb; /* 'bomb' */
+- #endif
+ char_u *b_p_bh; /* 'bufhidden' */
+ char_u *b_p_bt; /* 'buftype' */
+ #ifdef FEAT_QUICKFIX
+--- 2227,2233 ----
+***************
+*** 2270,2278 ****
+ int b_p_et; /* 'expandtab' */
+ int b_p_et_nobin; /* b_p_et saved for binary mode */
+ int b_p_et_nopaste; /* b_p_et saved for paste mode */
+- #ifdef FEAT_MBYTE
+ char_u *b_p_fenc; /* 'fileencoding' */
+- #endif
+ char_u *b_p_ff; /* 'fileformat' */
+ char_u *b_p_ft; /* 'filetype' */
+ char_u *b_p_fo; /* 'formatoptions' */
+--- 2262,2268 ----
+***************
+*** 2304,2312 ****
+ #ifdef FEAT_LISP
+ int b_p_lisp; /* 'lisp' */
+ #endif
+- #ifdef FEAT_MBYTE
+ char_u *b_p_menc; /* 'makeencoding' */
+- #endif
+ char_u *b_p_mps; /* 'matchpairs' */
+ int b_p_ml; /* 'modeline' */
+ int b_p_ml_nobin; /* b_p_ml saved for binary mode */
+--- 2294,2300 ----
+***************
+*** 2425,2435 ****
+
+ int b_start_eol; /* last line had eol when it was read */
+ int b_start_ffc; /* first char of 'ff' when edit started */
+- #ifdef FEAT_MBYTE
+ char_u *b_start_fenc; /* 'fileencoding' when edit started or NULL */
+ int b_bad_char; /* "++bad=" argument when edit started or 0 */
+ int b_start_bomb; /* 'bomb' when it was read */
+- #endif
+
+ #ifdef FEAT_EVAL
+ dictitem_T b_bufvar; /* variable for "b:" Dictionary */
+--- 2413,2421 ----
+***************
+*** 3107,3116 ****
+ int prechar; /* prefix character (optional, always 'g') */
+ int cmdchar; /* command character */
+ int nchar; /* next command character (optional) */
+- #ifdef FEAT_MBYTE
+ int ncharC1; /* first composing character (optional) */
+ int ncharC2; /* second composing character (optional) */
+- #endif
+ int extra_char; /* yet another character (optional) */
+ long opcount; /* count before an operator */
+ long count0; /* count before command, default 0 */
+--- 3093,3100 ----
+*** ../vim-8.1.0809/src/vim.h 2019-01-19 17:43:03.433449041 +0100
+--- src/vim.h 2019-01-24 17:09:28.719346216 +0100
+***************
+*** 210,216 ****
+ #endif
+
+ /* The Mac conversion stuff doesn't work under X11. */
+! #if defined(FEAT_MBYTE) && defined(MACOS_X_DARWIN)
+ # define MACOS_CONVERT
+ #endif
+
+--- 210,216 ----
+ #endif
+
+ /* The Mac conversion stuff doesn't work under X11. */
+! #if defined(MACOS_X_DARWIN)
+ # define MACOS_CONVERT
+ #endif
+
+***************
+*** 431,446 ****
+ * bits. u8char_T is only used for displaying, it could be 16 bits to save
+ * memory.
+ */
+! #ifdef FEAT_MBYTE
+! # ifdef UNICODE16
+ typedef unsigned short u8char_T; /* short should be 16 bits */
+! # else
+! # if VIM_SIZEOF_INT >= 4
+! typedef unsigned int u8char_T; /* int is 32 bits */
+! # else
+! typedef unsigned long u8char_T; /* long should be 32 bits or more */
+! # endif
+! # endif
+ #endif
+
+ #ifndef UNIX /* For Unix this is included in os_unix.h */
+--- 431,440 ----
+ * bits. u8char_T is only used for displaying, it could be 16 bits to save
+ * memory.
+ */
+! #ifdef UNICODE16
+ typedef unsigned short u8char_T; /* short should be 16 bits */
+! #else
+! typedef unsigned int u8char_T; /* int is 32 bits or more */
+ #endif
+
+ #ifndef UNIX /* For Unix this is included in os_unix.h */
+***************
+*** 1516,1529 ****
+
+ #define DIALOG_MSG_SIZE 1000 /* buffer size for dialog_msg() */
+
+! #ifdef FEAT_MBYTE
+! # define MSG_BUF_LEN 480 /* length of buffer for small messages */
+! # define MSG_BUF_CLEN (MSG_BUF_LEN / 6) /* cell length (worst case: utf-8
+ takes 6 bytes for one cell) */
+- #else
+- # define MSG_BUF_LEN 80 /* length of buffer for small messages */
+- # define MSG_BUF_CLEN MSG_BUF_LEN /* cell length */
+- #endif
+
+ #define FOLD_TEXT_LEN 51 /* buffer size for get_foldtext() */
+
+--- 1510,1518 ----
+
+ #define DIALOG_MSG_SIZE 1000 /* buffer size for dialog_msg() */
+
+! #define MSG_BUF_LEN 480 /* length of buffer for small messages */
+! #define MSG_BUF_CLEN (MSG_BUF_LEN / 6) /* cell length (worst case: utf-8
+ takes 6 bytes for one cell) */
+
+ #define FOLD_TEXT_LEN 51 /* buffer size for get_foldtext() */
+
+***************
+*** 1609,1615 ****
+ # endif
+ #endif
+
+- #ifdef FEAT_MBYTE
+ /* We need to call mb_stricmp() even when we aren't dealing with a multi-byte
+ * encoding because mb_stricmp() takes care of all ascii and non-ascii
+ * encodings, including characters with umlauts in latin1, etc., while
+--- 1598,1603 ----
+***************
+*** 1618,1627 ****
+
+ # define MB_STRICMP(d, s) mb_strnicmp((char_u *)(d), (char_u *)(s), (int)MAXCOL)
+ # define MB_STRNICMP(d, s, n) mb_strnicmp((char_u *)(d), (char_u *)(s), (int)(n))
+- #else
+- # define MB_STRICMP(d, s) STRICMP((d), (s))
+- # define MB_STRNICMP(d, s, n) STRNICMP((d), (s), (n))
+- #endif
+
+ #define STRCAT(d, s) strcat((char *)(d), (char *)(s))
+ #define STRNCAT(d, s, n) strncat((char *)(d), (char *)(s), (size_t)(n))
+--- 1606,1611 ----
+***************
+*** 1766,1781 ****
+ # endif
+ #endif
+
+! #ifdef FEAT_MBYTE
+! # define MAX_MCO 6 /* maximum value for 'maxcombine' */
+
+ /* Maximum number of bytes in a multi-byte character. It can be one 32-bit
+ * character of up to 6 bytes, or one 16-bit character of up to three bytes
+ * plus six following composing characters of three bytes each. */
+! # define MB_MAXBYTES 21
+! #else
+! # define MB_MAXBYTES 1
+! #endif
+
+ #if (defined(FEAT_PROFILE) || defined(FEAT_RELTIME)) && !defined(PROTO)
+ # ifdef WIN3264
+--- 1750,1761 ----
+ # endif
+ #endif
+
+! #define MAX_MCO 6 /* maximum value for 'maxcombine' */
+
+ /* Maximum number of bytes in a multi-byte character. It can be one 32-bit
+ * character of up to 6 bytes, or one 16-bit character of up to three bytes
+ * plus six following composing characters of three bytes each. */
+! #define MB_MAXBYTES 21
+
+ #if (defined(FEAT_PROFILE) || defined(FEAT_RELTIME)) && !defined(PROTO)
+ # ifdef WIN3264
+***************
+*** 2128,2134 ****
+ # define USE_MCH_ERRMSG
+ #endif
+
+! # if defined(FEAT_MBYTE) && defined(FEAT_EVAL) \
+ && (!defined(FEAT_GUI_W32) \
+ || !(defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
+ && !(defined(FEAT_GUI_MAC) && defined(MACOS_CONVERT))
+--- 2108,2114 ----
+ # define USE_MCH_ERRMSG
+ #endif
+
+! # if defined(FEAT_EVAL) \
+ && (!defined(FEAT_GUI_W32) \
+ || !(defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
+ && !(defined(FEAT_GUI_MAC) && defined(MACOS_CONVERT))
+***************
+*** 2139,2158 ****
+ # define IME_WITHOUT_XIM
+ #endif
+
+! #if defined(FEAT_MBYTE) && (defined(FEAT_XIM) \
+ || defined(IME_WITHOUT_XIM) \
+ || (defined(FEAT_GUI_W32) \
+ && (defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
+! || defined(FEAT_GUI_MAC))
+ /* im_set_active() is available */
+ # define HAVE_INPUT_METHOD
+ #endif
+
+- #ifndef FEAT_MBYTE
+- # define after_pathsep(b, p) vim_ispathsep(*((p) - 1))
+- # define transchar_byte(c) transchar(c)
+- #endif
+-
+ #ifndef FEAT_LINEBREAK
+ /* Without the 'numberwidth' option line numbers are always 7 chars. */
+ # define number_width(x) 7
+--- 2119,2133 ----
+ # define IME_WITHOUT_XIM
+ #endif
+
+! #if defined(FEAT_XIM) \
+ || defined(IME_WITHOUT_XIM) \
+ || (defined(FEAT_GUI_W32) \
+ && (defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
+! || defined(FEAT_GUI_MAC)
+ /* im_set_active() is available */
+ # define HAVE_INPUT_METHOD
+ #endif
+
+ #ifndef FEAT_LINEBREAK
+ /* Without the 'numberwidth' option line numbers are always 7 chars. */
+ # define number_width(x) 7
+***************
+*** 2160,2166 ****
+
+ /* This must come after including proto.h.
+ * For VMS this is defined in macros.h. */
+! #if !(defined(FEAT_MBYTE) && defined(WIN3264)) && !defined(VMS)
+ # define mch_open(n, m, p) open((n), (m), (p))
+ # define mch_fopen(n, p) fopen((n), (p))
+ #endif
+--- 2135,2141 ----
+
+ /* This must come after including proto.h.
+ * For VMS this is defined in macros.h. */
+! #if !defined(WIN3264) && !defined(VMS)
+ # define mch_open(n, m, p) open((n), (m), (p))
+ # define mch_fopen(n, p) fopen((n), (p))
+ #endif
+***************
+*** 2236,2292 ****
+ # define vim_realloc(ptr, size) realloc((ptr), (size))
+ #endif
+
+- #ifdef FEAT_MBYTE
+ /*
+ * Return byte length of character that starts with byte "b".
+ * Returns 1 for a single-byte character.
+ * MB_BYTE2LEN_CHECK() can be used to count a special key as one byte.
+ * Don't call MB_BYTE2LEN(b) with b < 0 or b > 255!
+ */
+! # define MB_BYTE2LEN(b) mb_bytelen_tab[b]
+! # define MB_BYTE2LEN_CHECK(b) (((b) < 0 || (b) > 255) ? 1 : mb_bytelen_tab[b])
+! #endif
+
+- #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT)
+ /* properties used in enc_canon_table[] (first three mutually exclusive) */
+! # define ENC_8BIT 0x01
+! # define ENC_DBCS 0x02
+! # define ENC_UNICODE 0x04
+!
+! # define ENC_ENDIAN_B 0x10 /* Unicode: Big endian */
+! # define ENC_ENDIAN_L 0x20 /* Unicode: Little endian */
+!
+! # define ENC_2BYTE 0x40 /* Unicode: UCS-2 */
+! # define ENC_4BYTE 0x80 /* Unicode: UCS-4 */
+! # define ENC_2WORD 0x100 /* Unicode: UTF-16 */
+!
+! # define ENC_LATIN1 0x200 /* Latin1 */
+! # define ENC_LATIN9 0x400 /* Latin9 */
+! # define ENC_MACROMAN 0x800 /* Mac Roman (not Macro Man! :-) */
+! #endif
+!
+! #ifdef FEAT_MBYTE
+! # ifdef USE_ICONV
+! # ifndef EILSEQ
+! # define EILSEQ 123
+! # endif
+! # ifdef DYNAMIC_ICONV
+ /* On Win32 iconv.dll is dynamically loaded. */
+! # define ICONV_ERRNO (*iconv_errno())
+! # define ICONV_E2BIG 7
+! # define ICONV_EINVAL 22
+! # define ICONV_EILSEQ 42
+! # else
+! # define ICONV_ERRNO errno
+! # define ICONV_E2BIG E2BIG
+! # define ICONV_EINVAL EINVAL
+! # define ICONV_EILSEQ EILSEQ
+! # endif
+ # endif
+-
+ #endif
+
+-
+ #define SIGN_BYTE 1 /* byte value used where sign is displayed;
+ attribute value is sign type */
+
+--- 2211,2259 ----
+ # define vim_realloc(ptr, size) realloc((ptr), (size))
+ #endif
+
+ /*
+ * Return byte length of character that starts with byte "b".
+ * Returns 1 for a single-byte character.
+ * MB_BYTE2LEN_CHECK() can be used to count a special key as one byte.
+ * Don't call MB_BYTE2LEN(b) with b < 0 or b > 255!
+ */
+! #define MB_BYTE2LEN(b) mb_bytelen_tab[b]
+! #define MB_BYTE2LEN_CHECK(b) (((b) < 0 || (b) > 255) ? 1 : mb_bytelen_tab[b])
+
+ /* properties used in enc_canon_table[] (first three mutually exclusive) */
+! #define ENC_8BIT 0x01
+! #define ENC_DBCS 0x02
+! #define ENC_UNICODE 0x04
+!
+! #define ENC_ENDIAN_B 0x10 /* Unicode: Big endian */
+! #define ENC_ENDIAN_L 0x20 /* Unicode: Little endian */
+!
+! #define ENC_2BYTE 0x40 /* Unicode: UCS-2 */
+! #define ENC_4BYTE 0x80 /* Unicode: UCS-4 */
+! #define ENC_2WORD 0x100 /* Unicode: UTF-16 */
+!
+! #define ENC_LATIN1 0x200 /* Latin1 */
+! #define ENC_LATIN9 0x400 /* Latin9 */
+! #define ENC_MACROMAN 0x800 /* Mac Roman (not Macro Man! :-) */
+!
+! #ifdef USE_ICONV
+! # ifndef EILSEQ
+! # define EILSEQ 123
+! # endif
+! # ifdef DYNAMIC_ICONV
+ /* On Win32 iconv.dll is dynamically loaded. */
+! # define ICONV_ERRNO (*iconv_errno())
+! # define ICONV_E2BIG 7
+! # define ICONV_EINVAL 22
+! # define ICONV_EILSEQ 42
+! # else
+! # define ICONV_ERRNO errno
+! # define ICONV_E2BIG E2BIG
+! # define ICONV_EINVAL EINVAL
+! # define ICONV_EILSEQ EILSEQ
+ # endif
+ #endif
+
+ #define SIGN_BYTE 1 /* byte value used where sign is displayed;
+ attribute value is sign type */
+
+*** ../vim-8.1.0809/src/version.c 2019-01-24 16:38:58.280712420 +0100
+--- src/version.c 2019-01-24 17:17:24.875973757 +0100
+***************
+*** 793,794 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 810,
+ /**/
+
+--
+FATHER: Make sure the Prince doesn't leave this room until I come and
+ get him.
+FIRST GUARD: Not ... to leave the room ... even if you come and get him.
+FATHER: No. Until I come and get him.
+SECOND GUARD: Hic.
+ "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.0811 b/data/vim/patches/8.1.0811
new file mode 100644
index 000000000..3c85a9738
--- /dev/null
+++ b/data/vim/patches/8.1.0811
@@ -0,0 +1,1613 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0811
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0811
+Problem: Too many #ifdefs.
+Solution: Graduate FEAT_MBYTE, the final chapter.
+Files: src/feature.h, src/vim.h, src/crypt_zip.c, src/fileio.c,
+ src/message.c, src/spell.h, src/structs.h, src/config.h.in,
+ src/configure.ac, src/auto/configure, src/testdir/runtest.vim,
+ src/testdir/test_alot_utf8.vim, src/testdir/test_arabic.vim,
+ src/testdir/test_charsearch_utf8.vim,
+ src/testdir/test_cmdline.vim, src/testdir/test_digraph.vim,
+ src/testdir/test_display.vim, src/testdir/test_edit.vim,
+ src/testdir/test_erasebackword.vim,
+ src/testdir/test_expr_utf8.vim, src/testdir/test_functions.vim,
+ src/testdir/test_ga.vim, src/testdir/test_iminsert.vim,
+ src/testdir/test_increment_dbcs.vim, src/testdir/test_json.vim,
+ src/testdir/test_makeencoding.vim, src/testdir/test_maparg.vim,
+ src/testdir/test_mapping.vim, src/testdir/test_marks.vim,
+ src/testdir/test_match.vim,
+ src/testdir/test_matchadd_conceal_utf8.vim,
+ src/testdir/test_mksession_utf8.vim, src/testdir/test_normal.vim,
+ src/testdir/test_plus_arg_edit.vim, src/testdir/test_profile.vim,
+ src/testdir/test_put.vim, src/testdir/test_regex_char_classes.vim,
+ src/testdir/test_regexp_utf8.vim, src/testdir/test_search.vim,
+ src/testdir/test_source_utf8.vim, src/testdir/test_spell.vim,
+ src/testdir/test_startup_utf8.vim,
+ src/testdir/test_termencoding.vim, src/testdir/test_terminal.vim,
+ src/testdir/test_utf8.vim, src/testdir/test_utf8_comparisons.vim,
+ src/testdir/test_viminfo.vim, src/testdir/test_virtualedit.vim,
+ src/testdir/test_visual.vim, src/testdir/test_wordcount.vim,
+ src/testdir/test_writefile.vim, src/appveyor.bat, src/os_macosx.m
+
+
+*** ../vim-8.1.0810/src/feature.h 2019-01-17 17:13:25.916984116 +0100
+--- src/feature.h 2019-01-24 17:26:34.436229955 +0100
+***************
+*** 286,292 ****
+ *
+ * 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
+--- 286,292 ----
+ *
+ * Disabled for EBCDIC as it requires multibyte.
+ */
+! #if defined(FEAT_BIG) && !defined(DISABLE_ARABIC) && !defined(EBCDIC)
+ # define FEAT_ARABIC
+ #endif
+ #ifdef FEAT_ARABIC
+***************
+*** 600,620 ****
+ * +multi_byte Generic multi-byte character handling.
+ * Now always enabled.
+ */
+- #if !defined(FEAT_MBYTE)
+- # define FEAT_MBYTE
+- #endif
+- #if VIM_SIZEOF_INT < 4 && !defined(PROTO)
+- Error: Vim only works with 32 bit int or larger
+- #endif
+
+ /* Define this if you want to use 16 bit Unicode only, reduces memory used for
+ * the screen structures. */
+ /* #define UNICODE16 */
+
+ /*
+! * +multi_byte_ime Win32 IME input method. Requires +multi_byte.
+! * Only for far-east Windows, so IME can be used to input
+! * chars. Not tested much!
+ */
+ #if defined(FEAT_GUI_W32) && !defined(FEAT_MBYTE_IME)
+ /* #define FEAT_MBYTE_IME */
+--- 600,613 ----
+ * +multi_byte Generic multi-byte character handling.
+ * Now always enabled.
+ */
+
+ /* Define this if you want to use 16 bit Unicode only, reduces memory used for
+ * the screen structures. */
+ /* #define UNICODE16 */
+
+ /*
+! * +multi_byte_ime Win32 IME input method. Only for far-east Windows, so
+! * IME can be used to input chars. Not tested much!
+ */
+ #if defined(FEAT_GUI_W32) && !defined(FEAT_MBYTE_IME)
+ /* #define FEAT_MBYTE_IME */
+*** ../vim-8.1.0810/src/vim.h 2019-01-24 17:18:37.599462306 +0100
+--- src/vim.h 2019-01-24 17:30:47.350625573 +0100
+***************
+*** 157,162 ****
+--- 157,166 ----
+ # define VIM_SIZEOF_INT __SIZEOF_INT__
+ #endif
+
++ #if VIM_SIZEOF_INT < 4 && !defined(PROTO)
++ Error: Vim only works with 32 bit int or larger
++ #endif
++
+ /*
+ * #defines for optionals and features
+ * Also defines FEAT_TINY, FEAT_SMALL, etc. when FEAT_HUGE is defined.
+***************
+*** 1664,1671 ****
+ typedef int colnr_T; /* column number type */
+ typedef unsigned short disptick_T; /* display tick type */
+
+- #define MAXLNUM (0x7fffffffL) /* maximum (invalid) line number */
+-
+ /*
+ * Well, you won't believe it, but some S/390 machines ("host", now also known
+ * as zServer) use 31 bit pointers. There are also some newer machines, that
+--- 1668,1673 ----
+***************
+*** 1675,1688 ****
+ * With this we restrict the maximum line length to 1073741823. I guess this is
+ * not a real problem. BTW: Longer lines are split.
+ */
+! #if VIM_SIZEOF_INT >= 4
+! # ifdef __MVS__
+! # define MAXCOL (0x3fffffffL) /* maximum column number, 30 bits */
+! # else
+! # define MAXCOL (0x7fffffffL) /* maximum column number, 31 bits */
+! # endif
+ #else
+! # define MAXCOL (0x7fff) /* maximum column number, 15 bits */
+ #endif
+
+ #define SHOWCMD_COLS 10 /* columns needed by shown command */
+--- 1677,1688 ----
+ * With this we restrict the maximum line length to 1073741823. I guess this is
+ * not a real problem. BTW: Longer lines are split.
+ */
+! #ifdef __MVS__
+! # define MAXCOL (0x3fffffffL) /* maximum column number, 30 bits */
+! # define MAXLNUM (0x3fffffffL) /* maximum (invalid) line number */
+ #else
+! # define MAXCOL (0x7fffffffL) /* maximum column number, 31 bits */
+! # define MAXLNUM (0x7fffffffL) /* maximum (invalid) line number */
+ #endif
+
+ #define SHOWCMD_COLS 10 /* columns needed by shown command */
+*** ../vim-8.1.0810/src/crypt_zip.c 2018-09-30 21:43:17.179693404 +0200
+--- src/crypt_zip.c 2019-01-24 17:24:54.932842137 +0100
+***************
+*** 24,34 ****
+ */
+
+ /* Need a type that should be 32 bits. 64 also works but wastes space. */
+- # if VIM_SIZEOF_INT >= 4
+ typedef unsigned int u32_T; /* int is at least 32 bits */
+- # else
+- typedef unsigned long u32_T; /* long should be 32 bits or more */
+- # endif
+
+ /* The state of encryption, referenced by cryptstate_T. */
+ typedef struct {
+--- 24,30 ----
+*** ../vim-8.1.0810/src/fileio.c 2019-01-24 15:04:44.670887836 +0100
+--- src/fileio.c 2019-01-24 17:25:30.304626016 +0100
+***************
+*** 1178,1187 ****
+ */
+ if (!skip_read)
+ {
+! #if VIM_SIZEOF_INT > 2
+! # if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L)
+ size = SSIZE_MAX; /* use max I/O size, 52K */
+! # else
+ /* Use buffer >= 64K. Add linerest to double the size if the
+ * line gets very long, to avoid a lot of copying. But don't
+ * read more than 1 Mbyte at a time, so we can be interrupted.
+--- 1178,1186 ----
+ */
+ if (!skip_read)
+ {
+! #if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L)
+ size = SSIZE_MAX; /* use max I/O size, 52K */
+! #else
+ /* Use buffer >= 64K. Add linerest to double the size if the
+ * line gets very long, to avoid a lot of copying. But don't
+ * read more than 1 Mbyte at a time, so we can be interrupted.
+***************
+*** 1189,1208 ****
+ size = 0x10000L + linerest;
+ if (size > 0x100000L)
+ size = 0x100000L;
+- # endif
+- #else
+- size = 0x7ff0L - linerest; /* limit buffer to 32K */
+ #endif
+ }
+
+ /* Protect against the argument of lalloc() going negative. */
+! if (
+! #if VIM_SIZEOF_INT <= 2
+! linerest >= 0x7ff0
+! #else
+! size < 0 || size + linerest + 1 < 0 || linerest >= MAXCOL
+! #endif
+! )
+ {
+ ++split;
+ *ptr = NL; /* split line by inserting a NL */
+--- 1188,1198 ----
+ size = 0x10000L + linerest;
+ if (size > 0x100000L)
+ size = 0x100000L;
+ #endif
+ }
+
+ /* Protect against the argument of lalloc() going negative. */
+! if (size < 0 || size + linerest + 1 < 0 || linerest >= MAXCOL)
+ {
+ ++split;
+ *ptr = NL; /* split line by inserting a NL */
+*** ../vim-8.1.0810/src/message.c 2019-01-24 15:54:17.790846972 +0100
+--- src/message.c 2019-01-24 17:26:13.456360090 +0100
+***************
+*** 4492,4505 ****
+ {
+ /* Don't put the #if inside memchr(), it can be a
+ * macro. */
+- # if VIM_SIZEOF_INT <= 2
+- char *q = memchr(str_arg, '\0', precision);
+- # else
+ /* memchr on HP does not like n > 2^31 !!! */
+ char *q = memchr(str_arg, '\0',
+ precision <= (size_t)0x7fffffffL ? precision
+ : (size_t)0x7fffffffL);
+- # endif
+ str_arg_l = (q == NULL) ? precision
+ : (size_t)(q - str_arg);
+ }
+--- 4492,4501 ----
+*** ../vim-8.1.0810/src/spell.h 2019-01-24 17:18:37.599462306 +0100
+--- src/spell.h 2019-01-24 17:27:09.008014383 +0100
+***************
+*** 38,48 ****
+
+ /* Type used for indexes in the word tree need to be at least 4 bytes. If int
+ * is 8 bytes we could use something smaller, but what? */
+- #if VIM_SIZEOF_INT > 3
+ typedef int idx_T;
+- #else
+- typedef long idx_T;
+- #endif
+
+ typedef int salfirst_T;
+
+--- 38,44 ----
+*** ../vim-8.1.0810/src/structs.h 2019-01-24 17:18:37.599462306 +0100
+--- src/structs.h 2019-01-24 17:28:05.915656687 +0100
+***************
+*** 416,427 ****
+ /*
+ * structures used in undo.c
+ */
+! #if VIM_SIZEOF_INT > 2
+! # define ALIGN_LONG /* longword alignment and use filler byte */
+! # define ALIGN_SIZE (sizeof(long))
+! #else
+! # define ALIGN_SIZE (sizeof(short))
+! #endif
+
+ #define ALIGN_MASK (ALIGN_SIZE - 1)
+
+--- 416,423 ----
+ /*
+ * structures used in undo.c
+ */
+! #define ALIGN_LONG /* longword alignment and use filler byte */
+! #define ALIGN_SIZE (sizeof(long))
+
+ #define ALIGN_MASK (ALIGN_SIZE - 1)
+
+***************
+*** 1229,1247 ****
+ # endif
+ #else
+ /* Use 32-bit Number. */
+- # if VIM_SIZEOF_INT <= 3 /* use long if int is smaller than 32 bits */
+- typedef long varnumber_T;
+- typedef unsigned long uvarnumber_T;
+- #define VARNUM_MIN LONG_MIN
+- #define VARNUM_MAX LONG_MAX
+- #define UVARNUM_MAX ULONG_MAX
+- # else
+ typedef int varnumber_T;
+ typedef unsigned int uvarnumber_T;
+ #define VARNUM_MIN INT_MIN
+ #define VARNUM_MAX INT_MAX
+ #define UVARNUM_MAX UINT_MAX
+- # endif
+ #endif
+
+ typedef double float_T;
+--- 1225,1235 ----
+*** ../vim-8.1.0810/src/config.h.in 2019-01-17 15:43:21.753878419 +0100
+--- src/config.h.in 2019-01-24 17:31:33.658326026 +0100
+***************
+*** 387,395 ****
+ /* Define if you want to include the Cscope interface. */
+ #undef FEAT_CSCOPE
+
+- /* 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
+
+--- 387,392 ----
+*** ../vim-8.1.0810/src/configure.ac 2019-01-17 15:43:21.753878419 +0100
+--- src/configure.ac 2019-01-24 17:32:05.122121683 +0100
+***************
+*** 2124,2132 ****
+ [ --enable-multibyte Include multibyte editing support.], ,
+ [enable_multibyte="yes"])
+ AC_MSG_RESULT($enable_multibyte)
+! if test "$enable_multibyte" = "yes"; then
+! AC_DEFINE(FEAT_MBYTE)
+! else
+ AC_MSG_ERROR([The multi-byte feature can no longer be disabled. If you have
+ a problem with this, discuss on the Vim mailing list.])
+ fi
+--- 2124,2130 ----
+ [ --enable-multibyte Include multibyte editing support.], ,
+ [enable_multibyte="yes"])
+ AC_MSG_RESULT($enable_multibyte)
+! if test "$enable_multibyte" != "yes"; then
+ AC_MSG_ERROR([The multi-byte feature can no longer be disabled. If you have
+ a problem with this, discuss on the Vim mailing list.])
+ fi
+*** ../vim-8.1.0810/src/auto/configure 2019-01-17 15:43:21.753878419 +0100
+--- src/auto/configure 2019-01-24 17:58:50.615374358 +0100
+***************
+*** 7937,7946 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
+ $as_echo "$enable_multibyte" >&6; }
+! if test "$enable_multibyte" = "yes"; then
+! $as_echo "#define FEAT_MBYTE 1" >>confdefs.h
+!
+! else
+ as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
+ a problem with this, discuss on the Vim mailing list." "$LINENO" 5
+ fi
+--- 7937,7943 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
+ $as_echo "$enable_multibyte" >&6; }
+! if test "$enable_multibyte" != "yes"; then
+ as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
+ a problem with this, discuss on the Vim mailing list." "$LINENO" 5
+ fi
+*** ../vim-8.1.0810/src/testdir/runtest.vim 2019-01-06 15:29:52.540852980 +0100
+--- src/testdir/runtest.vim 2019-01-24 17:34:56.996995476 +0100
+***************
+*** 49,61 ****
+ " This also enables use of line continuation.
+ set nocp viminfo+=nviminfo
+
+! " Use utf-8 or latin1 by default, instead of whatever the system default
+! " happens to be. Individual tests can overrule this at the top of the file.
+! if has('multi_byte')
+! set encoding=utf-8
+! else
+! 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,
+--- 49,57 ----
+ " This also enables use of line continuation.
+ set nocp viminfo+=nviminfo
+
+! " Use utf-8 by default, instead of whatever the system default happens to be.
+! " Individual tests can overrule this at the top of the file.
+! set encoding=utf-8
+
+ " 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,
+*** ../vim-8.1.0810/src/testdir/test_alot_utf8.vim 2017-11-23 22:47:27.000000000 +0100
+--- src/testdir/test_alot_utf8.vim 2019-01-24 17:35:26.732799164 +0100
+***************
+*** 2,9 ****
+ " This makes testing go faster, since Vim doesn't need to restart.
+
+ " These tests use utf8 'encoding'. Setting 'encoding' is already done in
+! " runtest.vim. Checking for the multi_byte feature is in the individual
+! " files, so that they can be run by themselves.
+
+ source test_charsearch_utf8.vim
+ source test_expr_utf8.vim
+--- 2,8 ----
+ " This makes testing go faster, since Vim doesn't need to restart.
+
+ " These tests use utf8 'encoding'. Setting 'encoding' is already done in
+! " runtest.vim.
+
+ source test_charsearch_utf8.vim
+ source test_expr_utf8.vim
+*** ../vim-8.1.0810/src/testdir/test_arabic.vim 2018-02-27 20:59:25.000000000 +0100
+--- src/testdir/test_arabic.vim 2019-01-24 17:35:46.320669645 +0100
+***************
+*** 2,8 ****
+ " NOTE: This just checks if the code works. If you know Arabic please add
+ " functional tests that check the shaping works with real text.
+
+! if !has('arabic') || !has('multi_byte')
+ finish
+ endif
+
+--- 2,8 ----
+ " NOTE: This just checks if the code works. If you know Arabic please add
+ " functional tests that check the shaping works with real text.
+
+! if !has('arabic')
+ finish
+ endif
+
+*** ../vim-8.1.0810/src/testdir/test_charsearch_utf8.vim 2019-01-09 23:00:57.997176121 +0100
+--- src/testdir/test_charsearch_utf8.vim 2019-01-24 17:36:06.932533187 +0100
+***************
+*** 1,7 ****
+ " Tests for related f{char} and t{char} using utf-8.
+- if !has('multi_byte')
+- finish
+- endif
+
+ " Test for t,f,F,T movement commands
+ func Test_search_cmds()
+--- 1,4 ----
+*** ../vim-8.1.0810/src/testdir/test_cmdline.vim 2018-12-31 21:02:58.334464236 +0100
+--- src/testdir/test_cmdline.vim 2019-01-24 17:36:50.348245230 +0100
+***************
+*** 582,588 ****
+ endfunc
+
+ func Test_cmdline_overstrike()
+! let encodings = has('multi_byte') ? [ 'latin1', 'utf8' ] : [ 'latin1' ]
+ let encoding_save = &encoding
+
+ for e in encodings
+--- 582,588 ----
+ endfunc
+
+ func Test_cmdline_overstrike()
+! let encodings = ['latin1', 'utf8']
+ let encoding_save = &encoding
+
+ for e in encodings
+***************
+*** 601,611 ****
+ call assert_equal('"ab0cd3ef4', @:)
+ endfor
+
+! if has('multi_byte')
+! " Test overstrike with multi-byte characters.
+! call feedkeys(":\"テキストエディタ\<home>\<right>\<right>ab\<right>\<insert>cd\<enter>", 'xt')
+! call assert_equal('"テabキcdエディタ', @:)
+! endif
+
+ let &encoding = encoding_save
+ endfunc
+--- 601,609 ----
+ call assert_equal('"ab0cd3ef4', @:)
+ endfor
+
+! " Test overstrike with multi-byte characters.
+! call feedkeys(":\"テキストエディタ\<home>\<right>\<right>ab\<right>\<insert>cd\<enter>", 'xt')
+! call assert_equal('"テabキcdエディタ', @:)
+
+ let &encoding = encoding_save
+ endfunc
+*** ../vim-8.1.0810/src/testdir/test_digraph.vim 2018-06-16 17:25:17.997346631 +0200
+--- src/testdir/test_digraph.vim 2019-01-24 17:37:12.784096155 +0100
+***************
+*** 1,6 ****
+ " Tests for digraphs
+
+! if !has("digraphs") || !has("multi_byte")
+ finish
+ endif
+
+--- 1,6 ----
+ " Tests for digraphs
+
+! if !has("digraphs")
+ finish
+ endif
+
+***************
+*** 466,474 ****
+ endfunc
+
+ func Test_show_digraph_cp1251()
+- if !has('multi_byte')
+- return
+- endif
+ new
+ set encoding=cp1251
+ call Put_Dig("='")
+--- 466,471 ----
+*** ../vim-8.1.0810/src/testdir/test_display.vim 2019-01-09 23:00:57.997176121 +0100
+--- src/testdir/test_display.vim 2019-01-24 17:37:18.536057908 +0100
+***************
+*** 39,45 ****
+ endfunc
+
+ func Test_display_foldtext_mbyte()
+! if !has("folding") || !has("multi_byte")
+ return
+ endif
+ call NewWindow(10, 40)
+--- 39,45 ----
+ endfunc
+
+ func Test_display_foldtext_mbyte()
+! if !has("folding")
+ return
+ endif
+ call NewWindow(10, 40)
+*** ../vim-8.1.0810/src/testdir/test_edit.vim 2019-01-09 23:00:57.997176121 +0100
+--- src/testdir/test_edit.vim 2019-01-24 17:37:56.615804425 +0100
+***************
+*** 37,48 ****
+ call assert_equal([''], getline(1,'$'))
+ %d
+ " 4) delete a multibyte character
+! if has("multi_byte")
+! call setline(1, "\u0401")
+! call feedkeys("i\<del>\<esc>", 'tnix')
+! call assert_equal([''], getline(1,'$'))
+! %d
+! endif
+ " 5.1) delete linebreak with 'bs' option containing eol
+ let _bs=&bs
+ set bs=eol
+--- 37,46 ----
+ call assert_equal([''], getline(1,'$'))
+ %d
+ " 4) delete a multibyte character
+! call setline(1, "\u0401")
+! call feedkeys("i\<del>\<esc>", 'tnix')
+! call assert_equal([''], getline(1,'$'))
+! %d
+ " 5.1) delete linebreak with 'bs' option containing eol
+ let _bs=&bs
+ set bs=eol
+***************
+*** 440,446 ****
+
+ func Test_edit_CTRL_()
+ " disabled for Windows builds, why?
+! if !has("multi_byte") || !has("rightleft") || has("win32")
+ return
+ endif
+ let _encoding=&encoding
+--- 438,444 ----
+
+ func Test_edit_CTRL_()
+ " disabled for Windows builds, why?
+! if !has("rightleft") || has("win32")
+ return
+ endif
+ let _encoding=&encoding
+***************
+*** 608,622 ****
+ endtry
+ call delete('Xdictionary.txt')
+
+! if has("multi_byte")
+! call test_override("char_avail", 1)
+! set showcmd
+! %d
+! call feedkeys("A\<c-k>a:\<esc>", 'tnix')
+! call assert_equal(['ä'], getline(1, '$'))
+! call test_override("char_avail", 0)
+! set noshowcmd
+! endif
+ bw!
+ endfunc
+
+--- 606,619 ----
+ endtry
+ call delete('Xdictionary.txt')
+
+! call test_override("char_avail", 1)
+! set showcmd
+! %d
+! call feedkeys("A\<c-k>a:\<esc>", 'tnix')
+! call assert_equal(['ä'], getline(1, '$'))
+! call test_override("char_avail", 0)
+! set noshowcmd
+!
+ bw!
+ endfunc
+
+*** ../vim-8.1.0810/src/testdir/test_erasebackword.vim 2017-11-16 21:41:26.000000000 +0100
+--- src/testdir/test_erasebackword.vim 2019-01-24 17:38:22.383632644 +0100
+***************
+*** 1,10 ****
+
+ func Test_erasebackword()
+- if !has('multi_byte')
+- return
+- endif
+-
+- set encoding=utf-8
+ enew
+
+ exe "normal o wwwこんにちわ世界ワールドvim \<C-W>"
+--- 1,5 ----
+***************
+*** 21,25 ****
+ call assert_equal('', getline('.'))
+
+ enew!
+- set encoding&
+ endfunc
+--- 16,19 ----
+*** ../vim-8.1.0810/src/testdir/test_expr_utf8.vim 2016-07-21 20:09:30.000000000 +0200
+--- src/testdir/test_expr_utf8.vim 2019-01-24 17:38:30.055581461 +0100
+***************
+*** 1,7 ****
+ " Tests for expressions using utf-8.
+- if !has('multi_byte')
+- finish
+- endif
+
+ func Test_strgetchar()
+ call assert_equal(char2nr('á'), strgetchar('áxb', 0))
+--- 1,4 ----
+*** ../vim-8.1.0810/src/testdir/test_functions.vim 2018-11-10 17:33:23.083518842 +0100
+--- src/testdir/test_functions.vim 2019-01-24 17:39:14.883282048 +0100
+***************
+*** 106,116 ****
+ call assert_equal(4, strwidth(1234))
+ call assert_equal(5, strwidth(-1234))
+
+! if has('multi_byte')
+! call assert_equal(2, strwidth('😉'))
+! call assert_equal(17, strwidth('Eĥoŝanĝo ĉiuĵaŭde'))
+! call assert_equal((aw == 'single') ? 6 : 7, strwidth('Straße'))
+! endif
+
+ call assert_fails('call strwidth({->0})', 'E729:')
+ call assert_fails('call strwidth([])', 'E730:')
+--- 106,114 ----
+ call assert_equal(4, strwidth(1234))
+ call assert_equal(5, strwidth(-1234))
+
+! call assert_equal(2, strwidth('😉'))
+! call assert_equal(17, strwidth('Eĥoŝanĝo ĉiuĵaŭde'))
+! call assert_equal((aw == 'single') ? 6 : 7, strwidth('Straße'))
+
+ call assert_fails('call strwidth({->0})', 'E729:')
+ call assert_fails('call strwidth([])', 'E730:')
+***************
+*** 277,286 ****
+ call assert_equal('fg', strpart('abcdefg', 5, 4))
+ call assert_equal('defg', strpart('abcdefg', 3))
+
+! if has('multi_byte')
+! call assert_equal('lép', strpart('éléphant', 2, 4))
+! call assert_equal('léphant', strpart('éléphant', 2))
+! endif
+ endfunc
+
+ func Test_tolower()
+--- 275,282 ----
+ call assert_equal('fg', strpart('abcdefg', 5, 4))
+ call assert_equal('defg', strpart('abcdefg', 3))
+
+! call assert_equal('lép', strpart('éléphant', 2, 4))
+! call assert_equal('léphant', strpart('éléphant', 2))
+ endfunc
+
+ func Test_tolower()
+***************
+*** 290,299 ****
+ call assert_equal(' !"#$%&''()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~',
+ \ tolower(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'))
+
+- if !has('multi_byte')
+- return
+- endif
+-
+ " Test with a few uppercase diacritics.
+ call assert_equal("aàáâãäåāăąǎǟǡả", tolower("AÀÁÂÃÄÅĀĂĄǍǞǠẢ"))
+ call assert_equal("bḃḇ", tolower("BḂḆ"))
+--- 286,291 ----
+***************
+*** 368,377 ****
+ call assert_equal(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~',
+ \ toupper(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'))
+
+- if !has('multi_byte')
+- return
+- endif
+-
+ " Test with a few lowercase diacritics.
+ call assert_equal("AÀÁÂÃÄÅĀĂĄǍǞǠẢ", toupper("aàáâãäåāăąǎǟǡả"))
+ call assert_equal("BḂḆ", toupper("bḃḇ"))
+--- 360,365 ----
+*** ../vim-8.1.0810/src/testdir/test_ga.vim 2018-02-27 20:52:25.000000000 +0100
+--- src/testdir/test_ga.vim 2019-01-24 17:39:20.407245117 +0100
+***************
+*** 21,30 ****
+
+ call assert_equal("\n<e> 101, Hex 65, Octal 145", Do_ga('e'))
+
+- if !has('multi_byte')
+- return
+- endif
+-
+ " Test a few multi-bytes characters.
+ call assert_equal("\n<é> 233, Hex 00e9, Oct 351, Digr e'", Do_ga('é'))
+ call assert_equal("\n<ẻ> 7867, Hex 1ebb, Oct 17273, Digr e2", Do_ga('ẻ'))
+--- 21,26 ----
+*** ../vim-8.1.0810/src/testdir/test_iminsert.vim 2017-11-26 14:35:32.000000000 +0100
+--- src/testdir/test_iminsert.vim 2019-01-24 17:39:35.019147377 +0100
+***************
+*** 1,7 ****
+- if !has('multi_byte')
+- finish
+- endif
+-
+ source view_util.vim
+
+ let s:imactivatefunc_called = 0
+--- 1,3 ----
+*** ../vim-8.1.0810/src/testdir/test_increment_dbcs.vim 2016-08-18 23:00:23.000000000 +0200
+--- src/testdir/test_increment_dbcs.vim 2019-01-24 17:40:04.626949174 +0100
+***************
+*** 1,7 ****
+ " Tests for using Ctrl-A/Ctrl-X using DBCS.
+- if !has('multi_byte')
+- finish
+- endif
+ set encoding=cp932
+ scriptencoding cp932
+
+--- 1,4 ----
+*** ../vim-8.1.0810/src/testdir/test_json.vim 2019-01-12 14:24:22.627597552 +0100
+--- src/testdir/test_json.vim 2019-01-24 17:40:48.674653909 +0100
+***************
+*** 1,10 ****
+ " Test for JSON functions.
+
+- " JSON requires using utf-8, because conversion breaks the asserts.
+- if !has('multi_byte')
+- finish
+- endif
+-
+ let s:json1 = '"str\"in\\g"'
+ let s:var1 = "str\"in\\g"
+ let s:json2 = '"\u0001\u0002\u0003\u0004\u0005\u0006\u0007"'
+--- 1,5 ----
+***************
+*** 79,88 ****
+ call assert_equal(s:json4, json_encode(s:var4))
+ call assert_equal(s:json5, json_encode(s:var5))
+
+! if has('multi_byte')
+! call assert_equal(s:jsonmb, json_encode(s:varmb))
+! " no test for surrogate pair, json_encode() doesn't create them.
+! endif
+
+ call assert_equal(s:jsonnr, json_encode(s:varnr))
+ if has('float')
+--- 74,81 ----
+ call assert_equal(s:json4, json_encode(s:var4))
+ call assert_equal(s:json5, json_encode(s:var5))
+
+! call assert_equal(s:jsonmb, json_encode(s:varmb))
+! " no test for surrogate pair, json_encode() doesn't create them.
+
+ call assert_equal(s:jsonnr, json_encode(s:varnr))
+ if has('float')
+***************
+*** 121,131 ****
+ call assert_equal(s:var4, json_decode(s:json4))
+ call assert_equal(s:var5, json_decode(s:json5))
+
+! if has('multi_byte')
+! call assert_equal(s:varmb, json_decode(s:jsonmb))
+! call assert_equal(s:varsp1, json_decode(s:jsonsp1))
+! call assert_equal(s:varsp2, json_decode(s:jsonsp2))
+! endif
+
+ call assert_equal(s:varnr, json_decode(s:jsonnr))
+ if has('float')
+--- 114,122 ----
+ call assert_equal(s:var4, json_decode(s:json4))
+ call assert_equal(s:var5, json_decode(s:json5))
+
+! call assert_equal(s:varmb, json_decode(s:jsonmb))
+! call assert_equal(s:varsp1, json_decode(s:jsonsp1))
+! call assert_equal(s:varsp2, json_decode(s:jsonsp2))
+
+ call assert_equal(s:varnr, json_decode(s:jsonnr))
+ if has('float')
+***************
+*** 197,206 ****
+ call assert_equal(s:json4, js_encode(s:var4))
+ call assert_equal(s:json5, js_encode(s:var5))
+
+! if has('multi_byte')
+! call assert_equal(s:jsonmb, js_encode(s:varmb))
+! " no test for surrogate pair, js_encode() doesn't create them.
+! endif
+
+ call assert_equal(s:jsonnr, js_encode(s:varnr))
+ if has('float')
+--- 188,195 ----
+ call assert_equal(s:json4, js_encode(s:var4))
+ call assert_equal(s:json5, js_encode(s:var5))
+
+! call assert_equal(s:jsonmb, js_encode(s:varmb))
+! " no test for surrogate pair, js_encode() doesn't create them.
+
+ call assert_equal(s:jsonnr, js_encode(s:varnr))
+ if has('float')
+***************
+*** 237,247 ****
+ call assert_equal(s:var4, js_decode(s:json4))
+ call assert_equal(s:var5, js_decode(s:json5))
+
+! if has('multi_byte')
+! call assert_equal(s:varmb, js_decode(s:jsonmb))
+! call assert_equal(s:varsp1, js_decode(s:jsonsp1))
+! call assert_equal(s:varsp2, js_decode(s:jsonsp2))
+! endif
+
+ call assert_equal(s:varnr, js_decode(s:jsonnr))
+ if has('float')
+--- 226,234 ----
+ call assert_equal(s:var4, js_decode(s:json4))
+ call assert_equal(s:var5, js_decode(s:json5))
+
+! call assert_equal(s:varmb, js_decode(s:jsonmb))
+! call assert_equal(s:varsp1, js_decode(s:jsonsp1))
+! call assert_equal(s:varsp2, js_decode(s:jsonsp2))
+
+ call assert_equal(s:varnr, js_decode(s:jsonnr))
+ if has('float')
+*** ../vim-8.1.0810/src/testdir/test_makeencoding.vim 2017-03-05 17:10:37.000000000 +0100
+--- src/testdir/test_makeencoding.vim 2019-01-24 17:41:03.986551165 +0100
+***************
+*** 1,7 ****
+ " Tests for 'makeencoding'.
+- if !has('multi_byte')
+- finish
+- endif
+
+ source shared.vim
+
+--- 1,4 ----
+*** ../vim-8.1.0810/src/testdir/test_maparg.vim 2018-09-10 21:04:09.872392623 +0200
+--- src/testdir/test_maparg.vim 2019-01-24 17:41:13.038490403 +0100
+***************
+*** 1,8 ****
+ " Tests for maparg().
+ " Also test utf8 map with a 0x80 byte.
+- if !has("multi_byte")
+- finish
+- endif
+
+ function s:SID()
+ return str2nr(matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$'))
+--- 1,5 ----
+*** ../vim-8.1.0810/src/testdir/test_mapping.vim 2018-12-27 23:44:34.797953474 +0100
+--- src/testdir/test_mapping.vim 2019-01-24 17:41:29.094382582 +0100
+***************
+*** 1,9 ****
+ " Tests for mappings and abbreviations
+
+- if !has('multi_byte')
+- finish
+- endif
+-
+ func Test_abbreviation()
+ " abbreviation with 0x80 should work
+ inoreab чкпр vim
+--- 1,5 ----
+*** ../vim-8.1.0810/src/testdir/test_marks.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_marks.vim 2019-01-24 17:41:42.690291238 +0100
+***************
+*** 122,130 ****
+ endfunc
+
+ func Test_marks_cmd_multibyte()
+- if !has('multi_byte')
+- return
+- endif
+ new Xone
+ call setline(1, [repeat('á', &columns)])
+ norm! ma
+--- 122,127 ----
+*** ../vim-8.1.0810/src/testdir/test_match.vim 2018-07-28 16:55:51.439217124 +0200
+--- src/testdir/test_match.vim 2019-01-24 17:42:14.546077073 +0100
+***************
+*** 114,149 ****
+ call assert_equal([{'group': 'MyGroup1', 'id': 3, 'priority': 10, 'pos1': [1, 5, 1], 'pos2': [1, 8, 3]}], getmatches())
+ call clearmatches()
+
+! "
+! if has('multi_byte')
+! call setline(1, 'abcdΣabcdef')
+! call matchaddpos("MyGroup1", [[1, 4, 2], [1, 9, 2]])
+! 1
+! redraw!
+! let v1 = screenattr(1, 1)
+! let v4 = screenattr(1, 4)
+! let v5 = screenattr(1, 5)
+! let v6 = screenattr(1, 6)
+! let v7 = screenattr(1, 7)
+! let v8 = screenattr(1, 8)
+! let v9 = screenattr(1, 9)
+! let v10 = screenattr(1, 10)
+! call assert_equal([{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1, 9, 2]}], getmatches())
+! call assert_notequal(v1, v4)
+! call assert_equal(v5, v4)
+! call assert_equal(v6, v1)
+! call assert_equal(v7, v1)
+! call assert_equal(v8, v4)
+! call assert_equal(v9, v4)
+! call assert_equal(v10, v1)
+
+! " Check, that setmatches() can correctly restore the matches from matchaddpos()
+! call matchadd('MyGroup1', '\%2lmatchadd')
+! let m=getmatches()
+! call clearmatches()
+! call setmatches(m)
+! call assert_equal([{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1,9, 2]}, {'group': 'MyGroup1', 'pattern': '\%2lmatchadd', 'priority': 10, 'id': 12}], getmatches())
+! endif
+
+ highlight MyGroup1 NONE
+ highlight MyGroup2 NONE
+--- 114,146 ----
+ call assert_equal([{'group': 'MyGroup1', 'id': 3, 'priority': 10, 'pos1': [1, 5, 1], 'pos2': [1, 8, 3]}], getmatches())
+ call clearmatches()
+
+! call setline(1, 'abcdΣabcdef')
+! call matchaddpos("MyGroup1", [[1, 4, 2], [1, 9, 2]])
+! 1
+! redraw!
+! let v1 = screenattr(1, 1)
+! let v4 = screenattr(1, 4)
+! let v5 = screenattr(1, 5)
+! let v6 = screenattr(1, 6)
+! let v7 = screenattr(1, 7)
+! let v8 = screenattr(1, 8)
+! let v9 = screenattr(1, 9)
+! let v10 = screenattr(1, 10)
+! call assert_equal([{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1, 9, 2]}], getmatches())
+! call assert_notequal(v1, v4)
+! call assert_equal(v5, v4)
+! call assert_equal(v6, v1)
+! call assert_equal(v7, v1)
+! call assert_equal(v8, v4)
+! call assert_equal(v9, v4)
+! call assert_equal(v10, v1)
+
+! " Check, that setmatches() can correctly restore the matches from matchaddpos()
+! call matchadd('MyGroup1', '\%2lmatchadd')
+! let m=getmatches()
+! call clearmatches()
+! call setmatches(m)
+! call assert_equal([{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1,9, 2]}, {'group': 'MyGroup1', 'pattern': '\%2lmatchadd', 'priority': 10, 'id': 12}], getmatches())
+
+ highlight MyGroup1 NONE
+ highlight MyGroup2 NONE
+*** ../vim-8.1.0810/src/testdir/test_matchadd_conceal_utf8.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_matchadd_conceal_utf8.vim 2019-01-24 17:42:20.782035126 +0100
+***************
+*** 1,5 ****
+ " Test for matchadd() and conceal feature using utf-8.
+! if !has('conceal') || !has('multi_byte')
+ finish
+ endif
+
+--- 1,5 ----
+ " Test for matchadd() and conceal feature using utf-8.
+! if !has('conceal')
+ finish
+ endif
+
+*** ../vim-8.1.0810/src/testdir/test_mksession_utf8.vim 2017-11-23 22:47:27.000000000 +0100
+--- src/testdir/test_mksession_utf8.vim 2019-01-24 17:42:59.533774299 +0100
+***************
+*** 3,9 ****
+ set encoding=utf-8
+ scriptencoding utf-8
+
+! if !has('multi_byte') || !has('mksession')
+ finish
+ endif
+
+--- 3,9 ----
+ set encoding=utf-8
+ scriptencoding utf-8
+
+! if !has('mksession')
+ finish
+ endif
+
+*** ../vim-8.1.0810/src/testdir/test_normal.vim 2018-11-10 16:01:23.331381891 +0100
+--- src/testdir/test_normal.vim 2019-01-24 17:44:08.953306416 +0100
+***************
+*** 1368,1377 ****
+ endfunc
+
+ func Test_normal24_rot13()
+- " This test uses multi byte characters
+- if !has("multi_byte")
+- return
+- endif
+ " Testing for g?? g?g?
+ new
+ call append(0, 'abcdefghijklmnopqrstuvwxyzäüö')
+--- 1368,1373 ----
+***************
+*** 1621,1630 ****
+ endfunc
+
+ fun! Test_normal30_changecase()
+- " This test uses multi byte characters
+- if !has("multi_byte")
+- return
+- endif
+ new
+ call append(0, 'This is a simple test: äüöß')
+ norm! 1ggVu
+--- 1617,1622 ----
+***************
+*** 1894,1935 ****
+ 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
+- endif
+-
+ " Test for g8
+ new
+ let a=execute(':norm! 1G0g8')
+--- 1886,1921 ----
+ 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&
+
+! 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&
+
+ set ff&
+ bwipe!
+ endfunc
+
+ fun! Test_normal34_g_cmd3()
+ " Test for g8
+ new
+ let a=execute(':norm! 1G0g8')
+***************
+*** 1948,1956 ****
+ endfunc
+
+ func Test_normal_8g8()
+- if !has("multi_byte")
+- return
+- endif
+ new
+
+ " Test 8g8 which finds invalid utf8 at or after the cursor.
+--- 1934,1939 ----
+***************
+*** 2290,2300 ****
+ endfunc
+
+ func Test_normal46_ignore()
+- " This test uses multi byte characters
+- if !has("multi_byte")
+- return
+- endif
+-
+ new
+ " How to test this?
+ " let's just for now test, that the buffer
+--- 2273,2278 ----
+***************
+*** 2470,2478 ****
+ call assert_equal(['abcdefghijklmn'], getline(1,'$'))
+ exe "norm! df\<c-\>m"
+ call assert_equal(['abcdefghijklmn'], getline(1,'$'))
+! if !has("multi_byte")
+! return
+! endif
+ call setline(2, 'abcdefghijklmnāf')
+ norm! 2gg0
+ exe "norm! df\<Char-0x101>"
+--- 2448,2454 ----
+ call assert_equal(['abcdefghijklmn'], getline(1,'$'))
+ exe "norm! df\<c-\>m"
+ call assert_equal(['abcdefghijklmn'], getline(1,'$'))
+!
+ call setline(2, 'abcdefghijklmnāf')
+ norm! 2gg0
+ exe "norm! df\<Char-0x101>"
+***************
+*** 2494,2502 ****
+ endfunc
+
+ func Test_delete_until_paragraph()
+- if !has('multi_byte')
+- return
+- endif
+ new
+ normal grádv}
+ call assert_equal('á', getline(1))
+--- 2470,2475 ----
+*** ../vim-8.1.0810/src/testdir/test_plus_arg_edit.vim 2018-06-12 12:39:37.593152427 +0200
+--- src/testdir/test_plus_arg_edit.vim 2019-01-24 17:44:13.581275200 +0100
+***************
+*** 10,19 ****
+ endfunction
+
+ func Test_edit_bad()
+- if !has('multi_byte')
+- finish
+- endif
+-
+ " Test loading a utf8 file with bad utf8 sequences.
+ call writefile(["[\xff][\xc0][\xe2\x89\xf0][\xc2\xc2]"], "Xfile")
+ new
+--- 10,15 ----
+*** ../vim-8.1.0810/src/testdir/test_profile.vim 2018-09-10 22:03:36.490401066 +0200
+--- src/testdir/test_profile.vim 2019-01-24 17:44:38.121109606 +0100
+***************
+*** 407,413 ****
+ endfunc
+
+ func Test_profile_truncate_mbyte()
+! if !has('multi_byte') || &enc !=# 'utf-8'
+ return
+ endif
+
+--- 407,413 ----
+ endfunc
+
+ func Test_profile_truncate_mbyte()
+! if &enc !=# 'utf-8'
+ return
+ endif
+
+*** ../vim-8.1.0810/src/testdir/test_put.vim 2018-06-27 23:12:30.608811033 +0200
+--- src/testdir/test_put.vim 2019-01-24 17:44:56.480985660 +0100
+***************
+*** 1,9 ****
+ " Tests for put commands, e.g. ":put", "p", "gp", "P", "gP", etc.
+
+ func Test_put_block()
+- if !has('multi_byte')
+- return
+- endif
+ new
+ call feedkeys("i\<C-V>u2500\<CR>x\<ESC>", 'x')
+ call feedkeys("\<C-V>y", 'x')
+--- 1,6 ----
+*** ../vim-8.1.0810/src/testdir/test_regex_char_classes.vim 2018-01-31 19:23:08.000000000 +0100
+--- src/testdir/test_regex_char_classes.vim 2019-01-24 17:45:04.528931312 +0100
+***************
+*** 1,9 ****
+ " Tests for regexp with backslash and other special characters inside []
+ " Also test backslash for hex/octal numbered character.
+ "
+- if !has('multi_byte')
+- finish
+- endif
+
+ scriptencoding utf-8
+
+--- 1,6 ----
+*** ../vim-8.1.0810/src/testdir/test_regexp_utf8.vim 2017-06-05 16:40:52.000000000 +0200
+--- src/testdir/test_regexp_utf8.vim 2019-01-24 17:45:30.224757738 +0100
+***************
+*** 1,7 ****
+ " Tests for regexp in utf8 encoding
+- if !has('multi_byte')
+- finish
+- endif
+
+ func s:equivalence_test()
+ let str = "AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ"
+--- 1,4 ----
+*** ../vim-8.1.0810/src/testdir/test_search.vim 2018-12-26 21:44:49.811970384 +0100
+--- src/testdir/test_search.vim 2019-01-24 17:46:04.128528587 +0100
+***************
+*** 1127,1135 ****
+
+ " Test for search('multi-byte char', 'bce')
+ func Test_search_multibyte()
+- if !has('multi_byte')
+- return
+- endif
+ let save_enc = &encoding
+ set encoding=utf8
+ enew!
+--- 1127,1132 ----
+***************
+*** 1178,1184 ****
+ " ' ̇' U+0307 Dec:775 COMBINING DOT ABOVE &#x307; /\%u307\Z "\u0307"
+ " ' ̣' U+0323 Dec:803 COMBINING DOT BELOW &#x323; /\%u323 "\u0323"
+ " Those should also appear on the commandline
+! if !has('multi_byte') || !exists('+incsearch')
+ return
+ endif
+ call Cmdline3_prep()
+--- 1175,1181 ----
+ " ' ̇' U+0307 Dec:775 COMBINING DOT ABOVE &#x307; /\%u307\Z "\u0307"
+ " ' ̣' U+0323 Dec:803 COMBINING DOT BELOW &#x323; /\%u323 "\u0323"
+ " Those should also appear on the commandline
+! if !exists('+incsearch')
+ return
+ endif
+ call Cmdline3_prep()
+*** ../vim-8.1.0810/src/testdir/test_source_utf8.vim 2017-10-26 19:57:28.000000000 +0200
+--- src/testdir/test_source_utf8.vim 2019-01-24 17:46:10.700484149 +0100
+***************
+*** 1,7 ****
+ " Test the :source! command
+- if !has('multi_byte')
+- finish
+- endif
+
+ func Test_source_utf8()
+ " check that sourcing a script with 0x80 as second byte works
+--- 1,4 ----
+*** ../vim-8.1.0810/src/testdir/test_spell.vim 2018-08-31 22:26:49.210912007 +0200
+--- src/testdir/test_spell.vim 2019-01-24 17:46:27.992367209 +0100
+***************
+*** 135,144 ****
+ 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" .
+--- 135,142 ----
+ set enc=cp1250 spell spelllang=en
+ call assert_match("^\nfile: .*/runtime/spell/en.ascii.spl\n$", execute('spellinfo'))
+
+! set enc=utf-8 spell spelllang=en
+! call assert_match("^\nfile: .*/runtime/spell/en.utf-8.spl\n$", execute('spellinfo'))
+
+ set enc=latin1 spell spelllang=en_us,en_nz
+ call assert_match("^\n" .
+*** ../vim-8.1.0810/src/testdir/test_startup_utf8.vim 2018-09-13 20:46:48.994641008 +0200
+--- src/testdir/test_startup_utf8.vim 2019-01-24 17:46:39.036292505 +0100
+***************
+*** 1,7 ****
+ " Tests for startup using utf-8.
+- if !has('multi_byte')
+- finish
+- endif
+
+ source shared.vim
+ source screendump.vim
+--- 1,4 ----
+*** ../vim-8.1.0810/src/testdir/test_termencoding.vim 2019-01-17 13:04:05.765227482 +0100
+--- src/testdir/test_termencoding.vim 2019-01-24 17:46:56.020177592 +0100
+***************
+*** 2,8 ****
+ " setting 'termencoding' to make it work.
+
+ " This only works with "iconv".
+! if !has('multi_byte') || !has('iconv')
+ finish
+ endif
+
+--- 2,8 ----
+ " setting 'termencoding' to make it work.
+
+ " This only works with "iconv".
+! if !has('iconv')
+ finish
+ endif
+
+*** ../vim-8.1.0810/src/testdir/test_terminal.vim 2019-01-23 22:33:15.356020765 +0100
+--- src/testdir/test_terminal.vim 2019-01-24 17:47:10.100082302 +0100
+***************
+*** 209,217 ****
+ endfunc
+
+ func Test_terminal_scrape_multibyte()
+- if !has('multi_byte')
+- return
+- endif
+ call writefile(["léttまrs"], 'Xtext')
+ if has('win32')
+ " Run cmd with UTF-8 codepage to make the type command print the expected
+--- 209,214 ----
+*** ../vim-8.1.0810/src/testdir/test_utf8.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_utf8.vim 2019-01-24 17:47:22.407998990 +0100
+***************
+*** 1,7 ****
+ " Tests for Unicode manipulations
+- if !has('multi_byte')
+- finish
+- endif
+
+
+ " Visual block Insert adjusts for multi-byte char
+--- 1,4 ----
+*** ../vim-8.1.0810/src/testdir/test_utf8_comparisons.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_utf8_comparisons.vim 2019-01-24 17:47:34.299918474 +0100
+***************
+*** 1,10 ****
+ " Tests for case-insensitive UTF-8 comparisons (utf_strnicmp() in mbyte.c)
+ " Also test "g~ap".
+
+- if !has("multi_byte")
+- finish
+- endif
+-
+ func Ch(a, op, b, expected)
+ call assert_equal(eval(printf('"%s" %s "%s"', a:a, a:op, a:b)), a:expected,
+ \ printf('"%s" %s "%s" should return %d', a:a, a:op, a:b, a:expected))
+--- 1,6 ----
+*** ../vim-8.1.0810/src/testdir/test_viminfo.vim 2019-01-13 17:48:00.994125660 +0100
+--- src/testdir/test_viminfo.vim 2019-01-24 17:47:58.743752938 +0100
+***************
+*** 391,399 ****
+ endfunc
+
+ func Test_viminfo_encoding()
+- if !has('multi_byte')
+- return
+- endif
+ set enc=latin1
+ call histdel(':')
+ call histadd(':', "echo '\xe9'")
+--- 391,396 ----
+*** ../vim-8.1.0810/src/testdir/test_virtualedit.vim 2018-06-28 19:26:24.321655175 +0200
+--- src/testdir/test_virtualedit.vim 2019-01-24 17:48:05.827704953 +0100
+***************
+*** 48,58 ****
+ call setline(1, range(20))
+ exe "normal! gg2jv10lr-"
+ call assert_equal(["1", "-----------", "3"], getline(2,4))
+! if has('multi_byte')
+! call setline(1, range(20))
+! exe "normal! gg2jv10lr\<c-k>hh"
+! call assert_equal(["1", "───────────", "3"], getline(2,4))
+! endif
+
+ bwipe!
+ set virtualedit=
+--- 48,56 ----
+ call setline(1, range(20))
+ exe "normal! gg2jv10lr-"
+ call assert_equal(["1", "-----------", "3"], getline(2,4))
+! call setline(1, range(20))
+! exe "normal! gg2jv10lr\<c-k>hh"
+! call assert_equal(["1", "───────────", "3"], getline(2,4))
+
+ bwipe!
+ set virtualedit=
+*** ../vim-8.1.0810/src/testdir/test_visual.vim 2019-01-13 16:12:37.600472512 +0100
+--- src/testdir/test_visual.vim 2019-01-24 17:48:24.959575337 +0100
+***************
+*** 6,14 ****
+
+ func Test_block_shift_multibyte()
+ " Uses double-wide character.
+- if !has('multi_byte')
+- return
+- endif
+ split
+ call setline(1, ['xヹxxx', 'ヹxxx'])
+ exe "normal 1G0l\<C-V>jl>"
+--- 6,11 ----
+*** ../vim-8.1.0810/src/testdir/test_wordcount.vim 2017-12-11 22:41:51.000000000 +0100
+--- src/testdir/test_wordcount.vim 2019-01-24 17:48:34.515510584 +0100
+***************
+*** 1,9 ****
+ " Test for wordcount() function
+
+- if !has('multi_byte')
+- finish
+- endif
+-
+ func Test_wordcount()
+ let save_enc = &enc
+ set encoding=utf-8
+--- 1,5 ----
+*** ../vim-8.1.0810/src/testdir/test_writefile.vim 2018-09-03 22:08:05.676736128 +0200
+--- src/testdir/test_writefile.vim 2019-01-24 17:48:50.015405537 +0100
+***************
+*** 33,39 ****
+ endfunc
+
+ func Test_writefile_fails_conversion()
+! if !has('multi_byte') || !has('iconv') || system('uname -s') =~ 'SunOS'
+ return
+ endif
+ set nobackup nowritebackup
+--- 33,39 ----
+ endfunc
+
+ func Test_writefile_fails_conversion()
+! if !has('iconv') || system('uname -s') =~ 'SunOS'
+ return
+ endif
+ set nobackup nowritebackup
+*** ../vim-8.1.0810/src/appveyor.bat 2016-09-02 22:21:47.000000000 +0200
+--- src/appveyor.bat 2019-01-24 17:50:35.562689678 +0100
+***************
+*** 7,13 ****
+ cd src
+ echo "Building MinGW 32bit console version"
+ set PATH=c:\msys64\mingw32\bin;%PATH%
+! mingw32-make.exe -f Make_ming.mak GUI=no OPTIMIZE=speed IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+ :: Save vim.exe before Make clean, moved back below.
+ copy vim.exe testdir
+ mingw32-make.exe -f Make_ming.mak clean
+--- 7,13 ----
+ cd src
+ echo "Building MinGW 32bit console version"
+ set PATH=c:\msys64\mingw32\bin;%PATH%
+! mingw32-make.exe -f Make_ming.mak GUI=no OPTIMIZE=speed IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+ :: Save vim.exe before Make clean, moved back below.
+ copy vim.exe testdir
+ mingw32-make.exe -f Make_ming.mak clean
+***************
+*** 16,39 ****
+ :: with specified features without python.
+ echo "Building MinGW 32bit GUI version"
+ if "%FEATURE%" == "HUGE" (
+! mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed CHANNEL=yes GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35 FEATURES=%FEATURE% || exit 1
+ ) ELSE (
+! mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+ )
+ .\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_ming.txt
+
+ echo "Building MSVC 64bit console Version"
+ sed -e "s/\$(LINKARGS2)/\$(LINKARGS2) | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
+! nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=no IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+ nmake -f Make_mvc2.mak clean
+
+ :: build MSVC huge version with python and channel support
+ :: GUI needs to be last, so that testing works
+ echo "Building MSVC 64bit GUI Version"
+ if "%FEATURE%" == "HUGE" (
+! nmake -f Make_mvc2.mak DIRECTX=yes CPU=AMD64 CHANNEL=yes OLE=no GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 FEATURES=%FEATURE% || exit 1
+ ) ELSE (
+! nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+ )
+ .\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt
+
+--- 16,39 ----
+ :: with specified features without python.
+ echo "Building MinGW 32bit GUI version"
+ if "%FEATURE%" == "HUGE" (
+! mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed CHANNEL=yes GUI=yes IME=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35 FEATURES=%FEATURE% || exit 1
+ ) ELSE (
+! mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed GUI=yes IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+ )
+ .\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_ming.txt
+
+ echo "Building MSVC 64bit console Version"
+ sed -e "s/\$(LINKARGS2)/\$(LINKARGS2) | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
+! nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=no IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+ nmake -f Make_mvc2.mak clean
+
+ :: build MSVC huge version with python and channel support
+ :: GUI needs to be last, so that testing works
+ echo "Building MSVC 64bit GUI Version"
+ if "%FEATURE%" == "HUGE" (
+! nmake -f Make_mvc2.mak DIRECTX=yes CPU=AMD64 CHANNEL=yes OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 FEATURES=%FEATURE% || exit 1
+ ) ELSE (
+! nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+ )
+ .\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt
+
+*** ../vim-8.1.0810/src/os_macosx.m 2018-10-08 20:07:35.597823052 +0200
+--- src/os_macosx.m 2019-01-24 17:51:43.974225250 +0100
+***************
+*** 130,147 ****
+ char_u *str = (char_u*)[string UTF8String];
+ int len = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
+
+- #ifdef FEAT_MBYTE
+ if (input_conv.vc_type != CONV_NONE)
+ str = string_convert(&input_conv, str, &len);
+- #endif
+
+ if (str)
+ clip_yank_selection(motion_type, str, len, cbd);
+
+- #ifdef FEAT_MBYTE
+ if (input_conv.vc_type != CONV_NONE)
+ vim_free(str);
+- #endif
+
+ releasepool:
+ [pool release];
+--- 130,143 ----
+***************
+*** 169,175 ****
+
+ /* TODO: Avoid overflow. */
+ int len = (int)llen;
+- #ifdef FEAT_MBYTE
+ if (output_conv.vc_type != CONV_NONE)
+ {
+ char_u *conv_str = string_convert(&output_conv, str, &len);
+--- 165,170 ----
+***************
+*** 179,185 ****
+ str = conv_str;
+ }
+ }
+- #endif
+
+ if (len > 0)
+ {
+--- 174,179 ----
+*** ../vim-8.1.0810/src/version.c 2019-01-24 17:18:37.599462306 +0100
+--- src/version.c 2019-01-24 17:52:36.453868784 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 811,
+ /**/
+
+--
+Just think of all the things we haven't thought of yet.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0812 b/data/vim/patches/8.1.0812
new file mode 100644
index 000000000..534690b90
--- /dev/null
+++ b/data/vim/patches/8.1.0812
@@ -0,0 +1,174 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0812
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0812
+Problem: Unicode 16 feature is not useful and cannot be detected.
+Solution: Remove UNICODE16.
+Files: src/screen.c, src/vim.h, src/feature.h
+
+
+*** ../vim-8.1.0811/src/screen.c 2019-01-24 16:38:58.280712420 +0100
+--- src/screen.c 2019-01-24 18:18:34.825156995 +0100
+***************
+*** 2515,2526 ****
+ prev_c = u8c;
+ #endif
+ /* Non-BMP character: display as ? or fullwidth ?. */
+! #ifdef UNICODE16
+! if (u8c >= 0x10000)
+! ScreenLinesUC[idx] = (cells == 2) ? 0xff1f : (int)'?';
+! else
+! #endif
+! ScreenLinesUC[idx] = u8c;
+ for (i = 0; i < Screen_mco; ++i)
+ {
+ ScreenLinesC[i][idx] = u8cc[i];
+--- 2515,2521 ----
+ prev_c = u8c;
+ #endif
+ /* Non-BMP character: display as ? or fullwidth ?. */
+! ScreenLinesUC[idx] = u8c;
+ for (i = 0; i < Screen_mco; ++i)
+ {
+ ScreenLinesC[i][idx] = u8cc[i];
+***************
+*** 4482,4515 ****
+
+ if ((mb_l == 1 && c >= 0x80)
+ || (mb_l >= 1 && mb_c == 0)
+! || (mb_l > 1 && (!vim_isprintc(mb_c)
+! # ifdef UNICODE16
+! || mb_c >= 0x10000
+! # endif
+! )))
+ {
+ /*
+ * Illegal UTF-8 byte: display as <xx>.
+ * Non-BMP character : display as ? or fullwidth ?.
+ */
+! # ifdef UNICODE16
+! if (mb_c < 0x10000)
+! # endif
+! {
+! transchar_hex(extra, mb_c);
+ # ifdef FEAT_RIGHTLEFT
+! if (wp->w_p_rl) /* reverse */
+! rl_mirror(extra);
+! # endif
+! }
+! # ifdef UNICODE16
+! else if (utf_char2cells(mb_c) != 2)
+! STRCPY(extra, "?");
+! else
+! /* 0xff1f in UTF-8: full-width '?' */
+! STRCPY(extra, "\357\274\237");
+ # endif
+-
+ p_extra = extra;
+ c = *p_extra;
+ mb_c = mb_ptr2char_adv(&p_extra);
+--- 4477,4493 ----
+
+ if ((mb_l == 1 && c >= 0x80)
+ || (mb_l >= 1 && mb_c == 0)
+! || (mb_l > 1 && (!vim_isprintc(mb_c))))
+ {
+ /*
+ * Illegal UTF-8 byte: display as <xx>.
+ * Non-BMP character : display as ? or fullwidth ?.
+ */
+! transchar_hex(extra, mb_c);
+ # ifdef FEAT_RIGHTLEFT
+! if (wp->w_p_rl) /* reverse */
+! rl_mirror(extra);
+ # endif
+ p_extra = extra;
+ c = *p_extra;
+ mb_c = mb_ptr2char_adv(&p_extra);
+***************
+*** 7478,7492 ****
+ else
+ u8c = utfc_ptr2char(ptr, u8cc);
+ mbyte_cells = utf_char2cells(u8c);
+- #ifdef UNICODE16
+- /* Non-BMP character: display as ? or fullwidth ?. */
+- if (u8c >= 0x10000)
+- {
+- u8c = (mbyte_cells == 2) ? 0xff1f : (int)'?';
+- if (attr == 0)
+- attr = HL_ATTR(HLF_8);
+- }
+- #endif
+ #ifdef FEAT_ARABIC
+ if (p_arshape && !p_tbidi && ARABIC_CHAR(u8c))
+ {
+--- 7456,7461 ----
+*** ../vim-8.1.0811/src/vim.h 2019-01-24 17:59:35.131217488 +0100
+--- src/vim.h 2019-01-24 18:17:37.049510290 +0100
+***************
+*** 431,445 ****
+
+ /*
+ * The u8char_T can hold one decoded UTF-8 character.
+! * We normally use 32 bits now, since some Asian characters don't fit in 16
+! * bits. u8char_T is only used for displaying, it could be 16 bits to save
+! * memory.
+ */
+! #ifdef UNICODE16
+! typedef unsigned short u8char_T; /* short should be 16 bits */
+! #else
+! typedef unsigned int u8char_T; /* int is 32 bits or more */
+! #endif
+
+ #ifndef UNIX /* For Unix this is included in os_unix.h */
+ # include <stdio.h>
+--- 431,439 ----
+
+ /*
+ * The u8char_T can hold one decoded UTF-8 character.
+! * We use 32 bits, since some Asian characters don't fit in 16 bits.
+ */
+! typedef unsigned int u8char_T; // int is 32 bits or more
+
+ #ifndef UNIX /* For Unix this is included in os_unix.h */
+ # include <stdio.h>
+*** ../vim-8.1.0811/src/feature.h 2019-01-24 17:59:35.131217488 +0100
+--- src/feature.h 2019-01-24 18:18:45.677090411 +0100
+***************
+*** 601,610 ****
+ * Now always enabled.
+ */
+
+- /* Define this if you want to use 16 bit Unicode only, reduces memory used for
+- * the screen structures. */
+- /* #define UNICODE16 */
+-
+ /*
+ * +multi_byte_ime Win32 IME input method. Only for far-east Windows, so
+ * IME can be used to input chars. Not tested much!
+--- 601,606 ----
+*** ../vim-8.1.0811/src/version.c 2019-01-24 17:59:35.143217444 +0100
+--- src/version.c 2019-01-24 18:19:43.044737328 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 812,
+ /**/
+
+--
+CONCORDE: Message for you, sir.
+ He falls forward revealing the arrow with the note.
+ "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.0813 b/data/vim/patches/8.1.0813
new file mode 100644
index 000000000..df6c6c20c
--- /dev/null
+++ b/data/vim/patches/8.1.0813
@@ -0,0 +1,131 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0813
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0813
+Problem: FileChangedShell not sufficiently tested.
+Solution: Add a more comprehensive test case.
+Files: src/testdir/test_autocmd.vim
+
+
+*** ../vim-8.1.0812/src/testdir/test_autocmd.vim 2019-01-09 23:00:57.997176121 +0100
+--- src/testdir/test_autocmd.vim 2019-01-24 19:35:28.881281300 +0100
+***************
+*** 1385,1387 ****
+--- 1385,1477 ----
+ call delete('Xchanged.txt')
+ bwipe!
+ endfunc
++
++ func Test_FileChangedShell_reload()
++ if !has('unix')
++ return
++ endif
++ augroup testreload
++ au FileChangedShell Xchanged let g:reason = v:fcs_reason | let v:fcs_choice = 'reload'
++ augroup END
++ new Xchanged
++ call setline(1, 'reload this')
++ write
++ " Need to wait until the timestamp would change by at least a second.
++ sleep 2
++ silent !echo 'extra line' >>Xchanged
++ checktime
++ call assert_equal('changed', g:reason)
++ call assert_equal(2, line('$'))
++ call assert_equal('extra line', getline(2))
++
++ " Only triggers once
++ let g:reason = ''
++ checktime
++ call assert_equal('', g:reason)
++
++ " When deleted buffer is not reloaded
++ silent !rm Xchanged
++ let g:reason = ''
++ checktime
++ call assert_equal('deleted', g:reason)
++ call assert_equal(2, line('$'))
++ call assert_equal('extra line', getline(2))
++
++ " When recreated buffer is reloaded
++ call setline(1, 'buffer is changed')
++ silent !echo 'new line' >>Xchanged
++ let g:reason = ''
++ checktime
++ call assert_equal('conflict', g:reason)
++ call assert_equal(1, line('$'))
++ call assert_equal('new line', getline(1))
++
++ " Only mode changed
++ silent !chmod +x Xchanged
++ let g:reason = ''
++ checktime
++ call assert_equal('mode', g:reason)
++ call assert_equal(1, line('$'))
++ call assert_equal('new line', getline(1))
++
++ " Only time changed
++ sleep 2
++ silent !touch Xchanged
++ let g:reason = ''
++ checktime
++ call assert_equal('time', g:reason)
++ call assert_equal(1, line('$'))
++ call assert_equal('new line', getline(1))
++
++ if has('persistent_undo')
++ " With an undo file the reload can be undone and a change before the
++ " reload.
++ set undofile
++ call setline(2, 'before write')
++ write
++ call setline(2, 'after write')
++ sleep 2
++ silent !echo 'different line' >>Xchanged
++ let g:reason = ''
++ checktime
++ call assert_equal('conflict', g:reason)
++ call assert_equal(3, line('$'))
++ call assert_equal('before write', getline(2))
++ call assert_equal('different line', getline(3))
++ " undo the reload
++ undo
++ call assert_equal(2, line('$'))
++ call assert_equal('after write', getline(2))
++ " undo the change before reload
++ undo
++ call assert_equal(2, line('$'))
++ call assert_equal('before write', getline(2))
++
++ set noundofile
++ endif
++
++
++ au! testreload
++ bwipe!
++ call delete('Xchanged')
++ endfunc
+*** ../vim-8.1.0812/src/version.c 2019-01-24 18:20:14.436543394 +0100
+--- src/version.c 2019-01-24 19:36:50.824706620 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 813,
+ /**/
+
+--
+You were lucky to have a LAKE! There were a hundred and sixty of
+us living in a small shoebox in the middle of the road.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0814 b/data/vim/patches/8.1.0814
new file mode 100644
index 000000000..a9752d409
--- /dev/null
+++ b/data/vim/patches/8.1.0814
@@ -0,0 +1,252 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0814
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0814
+Problem: :mksession cannot handle a very long 'runtimepath'. (Timothy
+ Madden)
+Solution: Expand each part separately, instead of the whole option at once.
+ (Christian Brabandt, closes #3466)
+Files: src/option.c, src/testdir/test_mksession.vim
+
+
+*** ../vim-8.1.0813/src/option.c 2019-01-24 15:54:17.794846944 +0100
+--- src/option.c 2019-01-24 20:23:14.225567873 +0100
+***************
+*** 3243,3249 ****
+ static void showoptions(int all, int opt_flags);
+ static int optval_default(struct vimoption *, char_u *varp);
+ static void showoneopt(struct vimoption *, int opt_flags);
+! static int put_setstring(FILE *fd, char *cmd, char *name, char_u **valuep, int expand);
+ static int put_setnum(FILE *fd, char *cmd, char *name, long *valuep);
+ static int put_setbool(FILE *fd, char *cmd, char *name, int value);
+ static int istermoption(struct vimoption *);
+--- 3243,3249 ----
+ static void showoptions(int all, int opt_flags);
+ static int optval_default(struct vimoption *, char_u *varp);
+ static void showoneopt(struct vimoption *, int opt_flags);
+! static int put_setstring(FILE *fd, char *cmd, char *name, char_u **valuep, long_u flags);
+ static int put_setnum(FILE *fd, char *cmd, char *name, long *valuep);
+ static int put_setbool(FILE *fd, char *cmd, char *name, int value);
+ static int istermoption(struct vimoption *);
+***************
+*** 10297,10303 ****
+ do_endif = TRUE;
+ }
+ if (put_setstring(fd, cmd, p->fullname, (char_u **)varp,
+! (p->flags & P_EXPAND) != 0) == FAIL)
+ return FAIL;
+ if (do_endif)
+ {
+--- 10297,10303 ----
+ do_endif = TRUE;
+ }
+ if (put_setstring(fd, cmd, p->fullname, (char_u **)varp,
+! p->flags) == FAIL)
+ return FAIL;
+ if (do_endif)
+ {
+***************
+*** 10319,10332 ****
+ int
+ makefoldset(FILE *fd)
+ {
+! if (put_setstring(fd, "setlocal", "fdm", &curwin->w_p_fdm, FALSE) == FAIL
+ # ifdef FEAT_EVAL
+! || put_setstring(fd, "setlocal", "fde", &curwin->w_p_fde, FALSE)
+ == FAIL
+ # endif
+! || put_setstring(fd, "setlocal", "fmr", &curwin->w_p_fmr, FALSE)
+ == FAIL
+! || put_setstring(fd, "setlocal", "fdi", &curwin->w_p_fdi, FALSE)
+ == FAIL
+ || put_setnum(fd, "setlocal", "fdl", &curwin->w_p_fdl) == FAIL
+ || put_setnum(fd, "setlocal", "fml", &curwin->w_p_fml) == FAIL
+--- 10319,10332 ----
+ int
+ makefoldset(FILE *fd)
+ {
+! if (put_setstring(fd, "setlocal", "fdm", &curwin->w_p_fdm, 0) == FAIL
+ # ifdef FEAT_EVAL
+! || put_setstring(fd, "setlocal", "fde", &curwin->w_p_fde, 0)
+ == FAIL
+ # endif
+! || put_setstring(fd, "setlocal", "fmr", &curwin->w_p_fmr, 0)
+ == FAIL
+! || put_setstring(fd, "setlocal", "fdi", &curwin->w_p_fdi, 0)
+ == FAIL
+ || put_setnum(fd, "setlocal", "fdl", &curwin->w_p_fdl) == FAIL
+ || put_setnum(fd, "setlocal", "fml", &curwin->w_p_fml) == FAIL
+***************
+*** 10345,10354 ****
+ char *cmd,
+ char *name,
+ char_u **valuep,
+! int expand)
+ {
+ char_u *s;
+! char_u *buf;
+
+ if (fprintf(fd, "%s %s=", cmd, name) < 0)
+ return FAIL;
+--- 10345,10356 ----
+ char *cmd,
+ char *name,
+ char_u **valuep,
+! long_u flags)
+ {
+ char_u *s;
+! char_u *buf = NULL;
+! char_u *part = NULL;
+! char_u *p;
+
+ if (fprintf(fd, "%s %s=", cmd, name) < 0)
+ return FAIL;
+***************
+*** 10364,10375 ****
+ if (put_escstr(fd, str2special(&s, FALSE), 2) == FAIL)
+ return FAIL;
+ }
+! else if (expand)
+ {
+! buf = alloc(MAXPATHL);
+ if (buf == NULL)
+! return FAIL;
+! home_replace(NULL, *valuep, buf, MAXPATHL, FALSE);
+ if (put_escstr(fd, buf, 2) == FAIL)
+ {
+ vim_free(buf);
+--- 10366,10411 ----
+ if (put_escstr(fd, str2special(&s, FALSE), 2) == FAIL)
+ return FAIL;
+ }
+! // expand the option value, replace $HOME by ~
+! else if ((flags & P_EXPAND) != 0)
+ {
+! int size = (int)STRLEN(*valuep) + 1;
+!
+! // replace home directory in the whole option value into "buf"
+! buf = alloc(size);
+ if (buf == NULL)
+! goto fail;
+! home_replace(NULL, *valuep, buf, size, FALSE);
+!
+! // If the option value is longer than MAXPATHL, we need to append
+! // earch comma separated part of the option separately, so that it
+! // can be expanded when read back.
+! if (size >= MAXPATHL && (flags & P_COMMA) != 0
+! && vim_strchr(*valuep, ',') != NULL)
+! {
+! part = alloc(size);
+! if (part == NULL)
+! goto fail;
+!
+! // write line break to clear the option, e.g. ':set rtp='
+! if (put_eol(fd) == FAIL)
+! goto fail;
+!
+! p = buf;
+! while (*p != NUL)
+! {
+! // for each comma separated option part, append value to
+! // the option, :set rtp+=value
+! if (fprintf(fd, "%s %s+=", cmd, name) < 0)
+! goto fail;
+! (void)copy_option_part(&p, part, size, ",");
+! if (put_escstr(fd, part, 2) == FAIL || put_eol(fd) == FAIL)
+! goto fail;
+! }
+! vim_free(buf);
+! vim_free(part);
+! return OK;
+! }
+ if (put_escstr(fd, buf, 2) == FAIL)
+ {
+ vim_free(buf);
+***************
+*** 10383,10388 ****
+--- 10419,10428 ----
+ if (put_eol(fd) < 0)
+ return FAIL;
+ return OK;
++ fail:
++ vim_free(buf);
++ vim_free(part);
++ return FAIL;
+ }
+
+ static int
+*** ../vim-8.1.0813/src/testdir/test_mksession.vim 2019-01-24 15:57:25.321532574 +0100
+--- src/testdir/test_mksession.vim 2019-01-24 19:56:04.503236163 +0100
+***************
+*** 3,9 ****
+ set encoding=latin1
+ scriptencoding latin1
+
+! if !has('multi_byte') || !has('mksession')
+ finish
+ endif
+
+--- 3,9 ----
+ set encoding=latin1
+ scriptencoding latin1
+
+! if !has('mksession')
+ finish
+ endif
+
+***************
+*** 126,131 ****
+--- 126,154 ----
+ call delete('Xtest_mks_winheight.out')
+ endfunc
+
++ func Test_mksession_rtp()
++ new
++ let _rtp=&rtp
++ " Make a real long (invalid) runtimepath value,
++ " that should exceed PATH_MAX (hopefully)
++ let newrtp=&rtp.',~'.repeat('/foobar', 1000)
++ let newrtp.=",".expand("$HOME")."/.vim"
++ let &rtp=newrtp
++
++ " determine expected value
++ let expected=split(&rtp, ',')
++ let expected = map(expected, '"set runtimepath+=".v:val')
++ let expected = ['set runtimepath='] + expected
++ let expected = map(expected, {v,w -> substitute(w, $HOME, "~", "g")})
++
++ mksession! Xtest_mks.out
++ let &rtp=_rtp
++ let li = filter(readfile('Xtest_mks.out'), 'v:val =~# "runtimepath"')
++ call assert_equal(expected, li)
++
++ call delete('Xtest_mks.out')
++ endfunc
++
+ func Test_mksession_arglist()
+ argdel *
+ next file1 file2 file3 file4
+*** ../vim-8.1.0813/src/version.c 2019-01-24 19:37:35.912390940 +0100
+--- src/version.c 2019-01-24 20:30:18.569799280 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 814,
+ /**/
+
+--
+Yah, well, we had to carve our electrons out of driftwood we'd
+find. In the winter. Uphill. Both ways.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0815 b/data/vim/patches/8.1.0815
new file mode 100644
index 000000000..711cc4ad8
--- /dev/null
+++ b/data/vim/patches/8.1.0815
@@ -0,0 +1,424 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0815
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0815
+Problem: Dialog for file changed outside of Vim not tested.
+Solution: Add a test. Move FileChangedShell test. Add 'L' flag to
+ feedkeys().
+Files: src/testdir/test_autocmd.vim, src/testdir/test_filechanged.vim,
+ src/testdir/Make_all.mak, src/evalfunc.c, runtime/doc/eval.txt
+
+
+*** ../vim-8.1.0814/src/testdir/test_autocmd.vim 2019-01-24 19:37:35.912390940 +0100
+--- src/testdir/test_autocmd.vim 2019-01-24 20:33:47.524044208 +0100
+***************
+*** 1386,1477 ****
+ bwipe!
+ endfunc
+
+! func Test_FileChangedShell_reload()
+! if !has('unix')
+! return
+! endif
+! augroup testreload
+! au FileChangedShell Xchanged let g:reason = v:fcs_reason | let v:fcs_choice = 'reload'
+! augroup END
+! new Xchanged
+! call setline(1, 'reload this')
+! write
+! " Need to wait until the timestamp would change by at least a second.
+! sleep 2
+! silent !echo 'extra line' >>Xchanged
+! checktime
+! call assert_equal('changed', g:reason)
+! call assert_equal(2, line('$'))
+! call assert_equal('extra line', getline(2))
+!
+! " Only triggers once
+! let g:reason = ''
+! checktime
+! call assert_equal('', g:reason)
+!
+! " When deleted buffer is not reloaded
+! silent !rm Xchanged
+! let g:reason = ''
+! checktime
+! call assert_equal('deleted', g:reason)
+! call assert_equal(2, line('$'))
+! call assert_equal('extra line', getline(2))
+!
+! " When recreated buffer is reloaded
+! call setline(1, 'buffer is changed')
+! silent !echo 'new line' >>Xchanged
+! let g:reason = ''
+! checktime
+! call assert_equal('conflict', g:reason)
+! call assert_equal(1, line('$'))
+! call assert_equal('new line', getline(1))
+!
+! " Only mode changed
+! silent !chmod +x Xchanged
+! let g:reason = ''
+! checktime
+! call assert_equal('mode', g:reason)
+! call assert_equal(1, line('$'))
+! call assert_equal('new line', getline(1))
+!
+! " Only time changed
+! sleep 2
+! silent !touch Xchanged
+! let g:reason = ''
+! checktime
+! call assert_equal('time', g:reason)
+! call assert_equal(1, line('$'))
+! call assert_equal('new line', getline(1))
+!
+! if has('persistent_undo')
+! " With an undo file the reload can be undone and a change before the
+! " reload.
+! set undofile
+! call setline(2, 'before write')
+! write
+! call setline(2, 'after write')
+! sleep 2
+! silent !echo 'different line' >>Xchanged
+! let g:reason = ''
+! checktime
+! call assert_equal('conflict', g:reason)
+! call assert_equal(3, line('$'))
+! call assert_equal('before write', getline(2))
+! call assert_equal('different line', getline(3))
+! " undo the reload
+! undo
+! call assert_equal(2, line('$'))
+! call assert_equal('after write', getline(2))
+! " undo the change before reload
+! undo
+! call assert_equal(2, line('$'))
+! call assert_equal('before write', getline(2))
+!
+! set noundofile
+! endif
+!
+!
+! au! testreload
+! bwipe!
+! call delete('Xchanged')
+! endfunc
+--- 1386,1389 ----
+ bwipe!
+ endfunc
+
+! " FileChangedShell tested in test_filechanged.vim
+*** ../vim-8.1.0814/src/testdir/test_filechanged.vim 2019-01-24 21:53:43.128252985 +0100
+--- src/testdir/test_filechanged.vim 2019-01-24 21:49:33.022078243 +0100
+***************
+*** 0 ****
+--- 1,146 ----
++ " Tests for when a file was changed outside of Vim.
++
++ func Test_FileChangedShell_reload()
++ if !has('unix')
++ return
++ endif
++ augroup testreload
++ au FileChangedShell Xchanged_r let g:reason = v:fcs_reason | let v:fcs_choice = 'reload'
++ augroup END
++ new Xchanged_r
++ call setline(1, 'reload this')
++ write
++ " Need to wait until the timestamp would change by at least a second.
++ sleep 2
++ silent !echo 'extra line' >>Xchanged_r
++ checktime
++ call assert_equal('changed', g:reason)
++ call assert_equal(2, line('$'))
++ call assert_equal('extra line', getline(2))
++
++ " Only triggers once
++ let g:reason = ''
++ checktime
++ call assert_equal('', g:reason)
++
++ " When deleted buffer is not reloaded
++ silent !rm Xchanged_r
++ let g:reason = ''
++ checktime
++ call assert_equal('deleted', g:reason)
++ call assert_equal(2, line('$'))
++ call assert_equal('extra line', getline(2))
++
++ " When recreated buffer is reloaded
++ call setline(1, 'buffer is changed')
++ silent !echo 'new line' >>Xchanged_r
++ let g:reason = ''
++ checktime
++ call assert_equal('conflict', g:reason)
++ call assert_equal(1, line('$'))
++ call assert_equal('new line', getline(1))
++
++ " Only mode changed
++ silent !chmod +x Xchanged_r
++ let g:reason = ''
++ checktime
++ call assert_equal('mode', g:reason)
++ call assert_equal(1, line('$'))
++ call assert_equal('new line', getline(1))
++
++ " Only time changed
++ sleep 2
++ silent !touch Xchanged_r
++ let g:reason = ''
++ checktime
++ call assert_equal('time', g:reason)
++ call assert_equal(1, line('$'))
++ call assert_equal('new line', getline(1))
++
++ if has('persistent_undo')
++ " With an undo file the reload can be undone and a change before the
++ " reload.
++ set undofile
++ call setline(2, 'before write')
++ write
++ call setline(2, 'after write')
++ sleep 2
++ silent !echo 'different line' >>Xchanged_r
++ let g:reason = ''
++ checktime
++ call assert_equal('conflict', g:reason)
++ call assert_equal(3, line('$'))
++ call assert_equal('before write', getline(2))
++ call assert_equal('different line', getline(3))
++ " undo the reload
++ undo
++ call assert_equal(2, line('$'))
++ call assert_equal('after write', getline(2))
++ " undo the change before reload
++ undo
++ call assert_equal(2, line('$'))
++ call assert_equal('before write', getline(2))
++
++ set noundofile
++ endif
++
++ au! testreload
++ bwipe!
++ call delete('Xchanged_r')
++ endfunc
++
++ func Test_file_changed_dialog()
++ if !has('unix')
++ return
++ endif
++ au! FileChangedShell
++
++ new Xchanged_d
++ call setline(1, 'reload this')
++ write
++ " Need to wait until the timestamp would change by at least a second.
++ sleep 2
++ silent !echo 'extra line' >>Xchanged_d
++ call feedkeys('L', 'L')
++ checktime
++ call assert_match('W11:', v:warningmsg)
++ call assert_equal(2, line('$'))
++ call assert_equal('reload this', getline(1))
++ call assert_equal('extra line', getline(2))
++
++ " delete buffer, only shows an error, no prompt
++ silent !rm Xchanged_d
++ checktime
++ call assert_match('E211:', v:warningmsg)
++ call assert_equal(2, line('$'))
++ call assert_equal('extra line', getline(2))
++
++ " Recreate buffer and reload
++ call setline(1, 'buffer is changed')
++ silent !echo 'new line' >Xchanged_d
++ call feedkeys('L', 'L')
++ checktime
++ call assert_match('W12:', v:warningmsg)
++ call assert_equal(1, line('$'))
++ call assert_equal('new line', getline(1))
++
++ " Only mode changed, reload
++ silent !chmod +x Xchanged_d
++ call feedkeys('L', 'L')
++ checktime
++ call assert_match('W16:', v:warningmsg)
++ call assert_equal(1, line('$'))
++ call assert_equal('new line', getline(1))
++
++ " Only time changed, no prompt
++ sleep 2
++ silent !touch Xchanged_d
++ let v:warningmsg = ''
++ checktime
++ call assert_equal('', v:warningmsg)
++ call assert_equal(1, line('$'))
++ call assert_equal('new line', getline(1))
++
++ bwipe!
++ call delete('Xchanged_d')
++ endfunc
+*** ../vim-8.1.0814/src/testdir/Make_all.mak 2019-01-17 13:04:05.765227482 +0100
+--- src/testdir/Make_all.mak 2019-01-24 20:39:55.069040398 +0100
+***************
+*** 121,126 ****
+--- 121,127 ----
+ test_feedkeys \
+ test_file_perm \
+ test_file_size \
++ test_filechanged \
+ test_fileformat \
+ test_filetype \
+ test_filter_cmd \
+***************
+*** 316,321 ****
+--- 317,323 ----
+ test_exit.res \
+ test_farsi.res \
+ test_file_size.res \
++ test_filechanged.res \
+ test_find_complete.res \
+ test_fixeol.res \
+ test_fnameescape.res \
+*** ../vim-8.1.0814/src/evalfunc.c 2019-01-24 15:04:44.666887862 +0100
+--- src/evalfunc.c 2019-01-24 21:24:30.371463057 +0100
+***************
+*** 3674,3679 ****
+--- 3674,3680 ----
+ int typed = FALSE;
+ int execute = FALSE;
+ int dangerous = FALSE;
++ int lowlevel = FALSE;
+ char_u *keys_esc;
+
+ /* This is not allowed in the sandbox. If the commands would still be
+***************
+*** 3697,3702 ****
+--- 3698,3704 ----
+ case 'i': insert = TRUE; break;
+ case 'x': execute = TRUE; break;
+ case '!': dangerous = TRUE; break;
++ case 'L': lowlevel = TRUE; break;
+ }
+ }
+ }
+***************
+*** 3708,3714 ****
+ keys_esc = vim_strsave_escape_csi(keys);
+ if (keys_esc != NULL)
+ {
+! ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
+ insert ? 0 : typebuf.tb_len, !typed, FALSE);
+ vim_free(keys_esc);
+ if (vgetc_busy
+--- 3710,3725 ----
+ keys_esc = vim_strsave_escape_csi(keys);
+ if (keys_esc != NULL)
+ {
+! if (lowlevel)
+! {
+! #ifdef USE_INPUT_BUF
+! add_to_input_buf(keys, (int)STRLEN(keys));
+! #else
+! emsg(_("E980: lowlevel input not supported"));
+! #endif
+! }
+! else
+! ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
+ insert ? 0 : typebuf.tb_len, !typed, FALSE);
+ vim_free(keys_esc);
+ if (vgetc_busy
+*** ../vim-8.1.0814/runtime/doc/eval.txt 2019-01-23 21:14:59.165314597 +0100
+--- runtime/doc/eval.txt 2019-01-24 21:26:05.667078878 +0100
+***************
+*** 4084,4107 ****
+ feedkeys({string} [, {mode}]) *feedkeys()*
+ Characters in {string} are queued for processing as if they
+ come from a mapping or were typed by the user.
+ By default the string is added to the end of the typeahead
+ buffer, thus if a mapping is still being executed the
+ characters come after them. Use the 'i' flag to insert before
+ other characters, they will be executed next, before any
+ characters from a mapping.
+ The function does not wait for processing of keys contained in
+ {string}.
+ To include special keys into {string}, use double-quotes
+ and "\..." notation |expr-quote|. For example,
+ feedkeys("\<CR>") simulates pressing of the <Enter> key. But
+ feedkeys('\<CR>') pushes 5 characters.
+! If {mode} is absent, keys are remapped.
+ {mode} is a String, which can contain these character flags:
+! 'm' Remap keys. This is default.
+ 'n' Do not remap keys.
+ 't' Handle keys as if typed; otherwise they are handled as
+ if coming from a mapping. This matters for undo,
+ opening folds, etc.
+ 'i' Insert the string instead of appending (see above).
+ 'x' Execute commands until typeahead is empty. This is
+ similar to using ":normal!". You can call feedkeys()
+--- 4110,4140 ----
+ feedkeys({string} [, {mode}]) *feedkeys()*
+ Characters in {string} are queued for processing as if they
+ come from a mapping or were typed by the user.
++
+ By default the string is added to the end of the typeahead
+ buffer, thus if a mapping is still being executed the
+ characters come after them. Use the 'i' flag to insert before
+ other characters, they will be executed next, before any
+ characters from a mapping.
++
+ The function does not wait for processing of keys contained in
+ {string}.
++
+ To include special keys into {string}, use double-quotes
+ and "\..." notation |expr-quote|. For example,
+ feedkeys("\<CR>") simulates pressing of the <Enter> key. But
+ feedkeys('\<CR>') pushes 5 characters.
+!
+ {mode} is a String, which can contain these character flags:
+! 'm' Remap keys. This is default. If {mode} is absent,
+! keys are remapped.
+ 'n' Do not remap keys.
+ 't' Handle keys as if typed; otherwise they are handled as
+ if coming from a mapping. This matters for undo,
+ opening folds, etc.
++ 'L' Lowlevel input. Only works for Unix or when using the
++ GUI. Keys are used as if they were coming from the
++ terminal. Other flags are not used. *E980*
+ 'i' Insert the string instead of appending (see above).
+ 'x' Execute commands until typeahead is empty. This is
+ similar to using ":normal!". You can call feedkeys()
+*** ../vim-8.1.0814/src/version.c 2019-01-24 20:30:49.333537878 +0100
+--- src/version.c 2019-01-24 21:50:25.757695053 +0100
+***************
+*** 790,792 ****
+ /**/
+! 814,
+ /**/
+--- 790,794 ----
+ /**/
+! 815,
+! /**/
+! 814,
+ /**/
+
+--
+You were lucky. We lived for three months in a brown paper bag in a
+septic tank. We used to have to get up at six o'clock in the morning,
+clean the bag, eat a crust of stale bread, go to work down mill for
+fourteen hours a day week in-week out. When we got home, our Dad
+would thrash us to sleep with his belt!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0816 b/data/vim/patches/8.1.0816
new file mode 100644
index 000000000..31aeabcfe
--- /dev/null
+++ b/data/vim/patches/8.1.0816
@@ -0,0 +1,50 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0816
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0816
+Problem: Test for 'runtimepath' in session fails on MS-Windows.
+Solution: Skip the test for now.
+Files: src/testdir/test_mksession.vim
+
+
+*** ../vim-8.1.0815/src/testdir/test_mksession.vim 2019-01-24 20:30:49.333537878 +0100
+--- src/testdir/test_mksession.vim 2019-01-24 22:22:35.153495762 +0100
+***************
+*** 127,132 ****
+--- 127,136 ----
+ endfunc
+
+ func Test_mksession_rtp()
++ if has('win32')
++ " TODO: fix problem with backslashes
++ return
++ endif
+ new
+ let _rtp=&rtp
+ " Make a real long (invalid) runtimepath value,
+*** ../vim-8.1.0815/src/version.c 2019-01-24 21:57:11.578719824 +0100
+--- src/version.c 2019-01-24 22:23:21.557180590 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 816,
+ /**/
+
+--
+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.0817 b/data/vim/patches/8.1.0817
new file mode 100644
index 000000000..c7a040249
--- /dev/null
+++ b/data/vim/patches/8.1.0817
@@ -0,0 +1,94 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0817
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0817
+Problem: ":=" command is not tested.
+Solution: Add a test. (Dominique Pelle, closes #3859)
+Files: src/testdir/Make_all.mak, src/testdir/test_alot.vim,
+ src/testdir/test_ex_equal.vim
+
+
+*** ../vim-8.1.0816/src/testdir/Make_all.mak 2019-01-24 21:57:11.574719854 +0100
+--- src/testdir/Make_all.mak 2019-01-24 22:39:20.598524877 +0100
+***************
+*** 105,110 ****
+--- 105,111 ----
+ test_erasebackword \
+ test_escaped_glob \
+ test_eval_stuff \
++ test_ex_equal \
+ test_ex_undo \
+ test_ex_z \
+ test_exit \
+*** ../vim-8.1.0816/src/testdir/test_alot.vim 2018-11-10 18:54:40.656592081 +0100
+--- src/testdir/test_alot.vim 2019-01-24 22:39:20.598524877 +0100
+***************
+*** 10,15 ****
+--- 10,16 ----
+ source test_compiler.vim
+ source test_cursor_func.vim
+ source test_delete.vim
++ source test_ex_equal.vim
+ source test_ex_undo.vim
+ source test_ex_z.vim
+ source test_execute_func.vim
+*** ../vim-8.1.0816/src/testdir/test_ex_equal.vim 2019-01-24 22:42:00.857403287 +0100
+--- src/testdir/test_ex_equal.vim 2019-01-24 22:39:20.598524877 +0100
+***************
+*** 0 ****
+--- 1,32 ----
++ " Test Ex := command.
++
++ func Test_ex_equal()
++ new
++ call setline(1, ["foo\tbar", "bar\tfoo"])
++
++ let a = execute('=')
++ call assert_equal("\n2", a)
++
++ let a = execute('=#')
++ call assert_equal("\n2\n 1 foo bar", a)
++
++ let a = execute('=l')
++ call assert_equal("\n2\nfoo^Ibar$", a)
++
++ let a = execute('=p')
++ call assert_equal("\n2\nfoo bar", a)
++
++ let a = execute('=l#')
++ call assert_equal("\n2\n 1 foo^Ibar$", a)
++
++ let a = execute('=p#')
++ call assert_equal("\n2\n 1 foo bar", a)
++
++ let a = execute('.=')
++ call assert_equal("\n1", a)
++
++ call assert_fails('3=', 'E16:')
++ call assert_fails('=x', 'E488:')
++
++ bwipe!
++ endfunc
+*** ../vim-8.1.0816/src/version.c 2019-01-24 22:23:55.644948698 +0100
+--- src/version.c 2019-01-24 22:41:22.289672995 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 817,
+ /**/
+
+--
+Not too long ago, unzipping in public was illegal...
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0818 b/data/vim/patches/8.1.0818
new file mode 100644
index 000000000..c0876a0fd
--- /dev/null
+++ b/data/vim/patches/8.1.0818
@@ -0,0 +1,170 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0818
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0818
+Problem: MS-Windows: cannot send large data with ch_sendraw().
+Solution: Split write into several WriteFile() calls. (Yasuhiro Matsumoto,
+ closes #3823)
+Files: src/channel.c, src/os_win32.c, src/testdir/test_channel.vim,
+ src/testdir/test_channel_pipe.py, src/vim.h
+
+
+*** ../vim-8.1.0817/src/channel.c 2019-01-22 23:01:36.943693467 +0100
+--- src/channel.c 2019-01-24 23:04:15.428107841 +0100
+***************
+*** 80,103 ****
+ static int
+ fd_write(sock_T fd, char *buf, size_t len)
+ {
+ HANDLE h = (HANDLE)fd;
+! DWORD nwrite;
+ OVERLAPPED ov;
+
+! // If the pipe overflows while the job does not read the data, WriteFile
+! // will block forever. This abandons the write.
+! memset(&ov, 0, sizeof(ov));
+! if (!WriteFile(h, buf, (DWORD)len, &nwrite, &ov))
+ {
+! DWORD err = GetLastError();
+
+! if (err != ERROR_IO_PENDING)
+! return -1;
+! if (!GetOverlappedResult(h, &ov, &nwrite, FALSE))
+! return -1;
+! FlushFileBuffers(h);
+ }
+! return (int)nwrite;
+ }
+
+ static void
+--- 80,113 ----
+ static int
+ fd_write(sock_T fd, char *buf, size_t len)
+ {
++ size_t todo = len;
+ HANDLE h = (HANDLE)fd;
+! DWORD nwrite, size, done = 0;
+ OVERLAPPED ov;
+
+! while (todo > 0)
+ {
+! if (todo > MAX_NAMED_PIPE_SIZE)
+! size = MAX_NAMED_PIPE_SIZE;
+! else
+! size = todo;
+! // If the pipe overflows while the job does not read the data, WriteFile
+! // will block forever. This abandons the write.
+! memset(&ov, 0, sizeof(ov));
+! if (!WriteFile(h, buf + done, size, &nwrite, &ov))
+! {
+! DWORD err = GetLastError();
+
+! if (err != ERROR_IO_PENDING)
+! return -1;
+! if (!GetOverlappedResult(h, &ov, &nwrite, FALSE))
+! return -1;
+! FlushFileBuffers(h);
+! }
+! todo -= nwrite;
+! done += nwrite;
+ }
+! return (int)done;
+ }
+
+ static void
+*** ../vim-8.1.0817/src/os_win32.c 2019-01-24 16:38:58.272712472 +0100
+--- src/os_win32.c 2019-01-24 23:00:40.025605825 +0100
+***************
+*** 5369,5375 ****
+ name,
+ PIPE_ACCESS_OUTBOUND | FILE_FLAG_OVERLAPPED,
+ PIPE_TYPE_BYTE | PIPE_NOWAIT,
+! 1, 65535, 0, 0, NULL);
+
+ if (handles[1] == INVALID_HANDLE_VALUE)
+ return FALSE;
+--- 5369,5375 ----
+ name,
+ PIPE_ACCESS_OUTBOUND | FILE_FLAG_OVERLAPPED,
+ PIPE_TYPE_BYTE | PIPE_NOWAIT,
+! 1, MAX_NAMED_PIPE_SIZE, 0, 0, NULL);
+
+ if (handles[1] == INVALID_HANDLE_VALUE)
+ return FALSE;
+*** ../vim-8.1.0817/src/testdir/test_channel.vim 2019-01-23 22:33:15.356020765 +0100
+--- src/testdir/test_channel.vim 2019-01-24 23:00:40.025605825 +0100
+***************
+*** 1980,1982 ****
+--- 1980,2000 ----
+ unlet! g:val
+ unlet! g:job
+ endfunc
++
++ func Test_raw_large_data()
++ try
++ let g:out = ''
++ let job = job_start(s:python . " test_channel_pipe.py",
++ \ {'mode': 'raw', 'drop': 'never', 'noblock': 1,
++ \ 'callback': {ch, msg -> execute('let g:out .= msg')}})
++
++ let want = repeat('X', 79999) . "\n"
++ call ch_sendraw(job, want)
++ let g:Ch_job = job
++ call WaitForAssert({-> assert_equal("dead", job_status(g:Ch_job))})
++ call assert_equal(want, substitute(g:out, '\r', '', 'g'))
++ finally
++ call job_stop(job)
++ unlet g:out
++ endtry
++ endfunc
+*** ../vim-8.1.0817/src/testdir/test_channel_pipe.py 2017-12-09 18:22:43.000000000 +0100
+--- src/testdir/test_channel_pipe.py 2019-01-24 23:00:40.025605825 +0100
+***************
+*** 56,59 ****
+--- 56,63 ----
+ if typed.startswith("doubleerr "):
+ print(typed[10:-1] + "\nAND " + typed[10:-1], file=sys.stderr)
+ sys.stderr.flush()
++ if typed.startswith("XXX"):
++ print(typed, end='')
++ sys.stderr.flush()
++ break
+
+*** ../vim-8.1.0817/src/vim.h 2019-01-24 18:20:14.436543394 +0100
+--- src/vim.h 2019-01-24 23:00:40.025605825 +0100
+***************
+*** 2467,2472 ****
+--- 2467,2476 ----
+ # define MAX_OPEN_CHANNELS 0
+ #endif
+
++ #if defined(WIN32)
++ # define MAX_NAMED_PIPE_SIZE 65535
++ #endif
++
+ /* Options for json_encode() and json_decode. */
+ #define JSON_JS 1 /* use JS instead of JSON */
+ #define JSON_NO_NONE 2 /* v:none item not allowed */
+*** ../vim-8.1.0817/src/version.c 2019-01-24 22:42:14.949304772 +0100
+--- src/version.c 2019-01-24 23:01:11.165389246 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 818,
+ /**/
+
+--
+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.0819 b/data/vim/patches/8.1.0819
new file mode 100644
index 000000000..63a8af549
--- /dev/null
+++ b/data/vim/patches/8.1.0819
@@ -0,0 +1,223 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0819
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0819
+Problem: A failed assert with a long string is hard to read.
+Solution: Shorten the assert message.
+Files: src/eval.c, src/testdir/test_assert.vim
+
+
+*** ../vim-8.1.0818/src/eval.c 2019-01-24 15:04:44.666887862 +0100
+--- src/eval.c 2019-01-25 20:41:03.215252969 +0100
+***************
+*** 9495,9508 ****
+ }
+
+ /*
+ * Append "str" to "gap", escaping unprintable characters.
+ * Changes NL to \n, CR to \r, etc.
+ */
+ static void
+! ga_concat_esc(garray_T *gap, char_u *str)
+ {
+ char_u *p;
+ char_u buf[NUMBUFLEN];
+
+ if (str == NULL)
+ {
+--- 9495,9548 ----
+ }
+
+ /*
++ * Append "p[clen]" to "gap", escaping unprintable characters.
++ * Changes NL to \n, CR to \r, etc.
++ */
++ static void
++ ga_concat_esc(garray_T *gap, char_u *p, int clen)
++ {
++ char_u buf[NUMBUFLEN];
++
++ if (clen > 1)
++ {
++ mch_memmove(buf, p, clen);
++ buf[clen] = NUL;
++ ga_concat(gap, buf);
++ }
++ else switch (*p)
++ {
++ case BS: ga_concat(gap, (char_u *)"\\b"); break;
++ case ESC: ga_concat(gap, (char_u *)"\\e"); break;
++ case FF: ga_concat(gap, (char_u *)"\\f"); break;
++ case NL: ga_concat(gap, (char_u *)"\\n"); break;
++ case TAB: ga_concat(gap, (char_u *)"\\t"); break;
++ case CAR: ga_concat(gap, (char_u *)"\\r"); break;
++ case '\\': ga_concat(gap, (char_u *)"\\\\"); break;
++ default:
++ if (*p < ' ')
++ {
++ vim_snprintf((char *)buf, NUMBUFLEN, "\\x%02x", *p);
++ ga_concat(gap, buf);
++ }
++ else
++ ga_append(gap, *p);
++ break;
++ }
++ }
++
++ /*
+ * Append "str" to "gap", escaping unprintable characters.
+ * Changes NL to \n, CR to \r, etc.
+ */
+ static void
+! ga_concat_shorten_esc(garray_T *gap, char_u *str)
+ {
+ char_u *p;
++ char_u *s;
++ int c;
++ int clen;
+ char_u buf[NUMBUFLEN];
++ int same_len;
+
+ if (str == NULL)
+ {
+***************
+*** 9511,9535 ****
+ }
+
+ for (p = str; *p != NUL; ++p)
+! switch (*p)
+ {
+! case BS: ga_concat(gap, (char_u *)"\\b"); break;
+! case ESC: ga_concat(gap, (char_u *)"\\e"); break;
+! case FF: ga_concat(gap, (char_u *)"\\f"); break;
+! case NL: ga_concat(gap, (char_u *)"\\n"); break;
+! case TAB: ga_concat(gap, (char_u *)"\\t"); break;
+! case CAR: ga_concat(gap, (char_u *)"\\r"); break;
+! case '\\': ga_concat(gap, (char_u *)"\\\\"); break;
+! default:
+! if (*p < ' ')
+! {
+! vim_snprintf((char *)buf, NUMBUFLEN, "\\x%02x", *p);
+! ga_concat(gap, buf);
+! }
+! else
+! ga_append(gap, *p);
+! break;
+ }
+ }
+
+ /*
+--- 9551,9579 ----
+ }
+
+ for (p = str; *p != NUL; ++p)
+! {
+! same_len = 1;
+! s = p;
+! c = mb_ptr2char_adv(&s);
+! clen = s - p;
+! while (*s != NUL && c == mb_ptr2char(s))
+ {
+! ++same_len;
+! s += clen;
+ }
++ if (same_len > 20)
++ {
++ ga_concat(gap, (char_u *)"\\[");
++ ga_concat_esc(gap, p, clen);
++ ga_concat(gap, (char_u *)" occurs ");
++ vim_snprintf((char *)buf, NUMBUFLEN, "%d", same_len);
++ ga_concat(gap, buf);
++ ga_concat(gap, (char_u *)" times]");
++ p = s - 1;
++ }
++ else
++ ga_concat_esc(gap, p, clen);
++ }
+ }
+
+ /*
+***************
+*** 9562,9572 ****
+ ga_concat(gap, (char_u *)"Expected ");
+ if (exp_str == NULL)
+ {
+! ga_concat_esc(gap, tv2string(exp_tv, &tofree, numbuf, 0));
+ vim_free(tofree);
+ }
+ else
+! ga_concat_esc(gap, exp_str);
+ if (atype != ASSERT_NOTEQUAL)
+ {
+ if (atype == ASSERT_MATCH)
+--- 9606,9616 ----
+ ga_concat(gap, (char_u *)"Expected ");
+ if (exp_str == NULL)
+ {
+! ga_concat_shorten_esc(gap, tv2string(exp_tv, &tofree, numbuf, 0));
+ vim_free(tofree);
+ }
+ else
+! ga_concat_shorten_esc(gap, exp_str);
+ if (atype != ASSERT_NOTEQUAL)
+ {
+ if (atype == ASSERT_MATCH)
+***************
+*** 9575,9581 ****
+ ga_concat(gap, (char_u *)" does match ");
+ else
+ ga_concat(gap, (char_u *)" but got ");
+! ga_concat_esc(gap, tv2string(got_tv, &tofree, numbuf, 0));
+ vim_free(tofree);
+ }
+ }
+--- 9619,9625 ----
+ ga_concat(gap, (char_u *)" does match ");
+ else
+ ga_concat(gap, (char_u *)" but got ");
+! ga_concat_shorten_esc(gap, tv2string(got_tv, &tofree, numbuf, 0));
+ vim_free(tofree);
+ }
+ }
+*** ../vim-8.1.0818/src/testdir/test_assert.vim 2018-10-07 20:14:53.091279680 +0200
+--- src/testdir/test_assert.vim 2019-01-25 20:47:28.113426333 +0100
+***************
+*** 31,36 ****
+--- 31,40 ----
+ call assert_equal(1, assert_equal('bar', s))
+ call assert_match("Expected 'bar' but got 'foo'", v:errors[0])
+ call remove(v:errors, 0)
++
++ call assert_equal('XxxxxxxxxxxxxxxxxxxxxxX', 'XyyyyyyyyyyyyyyyyyyyyyyyyyX')
++ call assert_match("Expected 'X\\\\\\[x occurs 21 times]X' but got 'X\\\\\\[y occurs 25 times]X'", v:errors[0])
++ call remove(v:errors, 0)
+ endfunc
+
+ func Test_assert_equalfile()
+*** ../vim-8.1.0818/src/version.c 2019-01-24 23:11:44.635650160 +0100
+--- src/version.c 2019-01-25 20:33:02.042881289 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 819,
+ /**/
+
+--
+ LAUNCELOT leaps into SHOT with a mighty cry and runs the GUARD through and
+ hacks him to the floor. Blood. Swashbuckling music (perhaps).
+ LAUNCELOT races through into the castle screaming.
+SECOND SENTRY: Hey!
+ "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.0820 b/data/vim/patches/8.1.0820
new file mode 100644
index 000000000..9fd5c13dc
--- /dev/null
+++ b/data/vim/patches/8.1.0820
@@ -0,0 +1,363 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0820
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0820
+Problem: Test for sending large data over channel sometimes fails.
+Solution: Handle that the job may have finished early. Also fix that file
+ changed test doesn't work in the GUI and reduce flakyness. (Ozaki
+ Kiichi, closes #3861)
+Files: src/testdir/test_channel.vim, src/testdir/test_filechanged.vim
+
+
+*** ../vim-8.1.0819/src/testdir/test_channel.vim 2019-01-24 23:11:44.631650199 +0100
+--- src/testdir/test_channel.vim 2019-01-25 20:58:53.293743070 +0100
+***************
+*** 879,897 ****
+ func Test_pipe_err_to_buffer_name()
+ call Run_test_pipe_err_to_buffer(1, 0, 1)
+ endfunc
+!
+ func Test_pipe_err_to_buffer_nr()
+ call Run_test_pipe_err_to_buffer(0, 0, 1)
+ endfunc
+!
+ func Test_pipe_err_to_buffer_name_nomod()
+ call Run_test_pipe_err_to_buffer(1, 1, 1)
+ endfunc
+!
+ func Test_pipe_err_to_buffer_name_nomsg()
+ call Run_test_pipe_err_to_buffer(1, 0, 0)
+ endfunc
+!
+ func Test_pipe_both_to_buffer()
+ if !has('job')
+ return
+--- 879,897 ----
+ func Test_pipe_err_to_buffer_name()
+ call Run_test_pipe_err_to_buffer(1, 0, 1)
+ endfunc
+!
+ func Test_pipe_err_to_buffer_nr()
+ call Run_test_pipe_err_to_buffer(0, 0, 1)
+ endfunc
+!
+ func Test_pipe_err_to_buffer_name_nomod()
+ call Run_test_pipe_err_to_buffer(1, 1, 1)
+ endfunc
+!
+ func Test_pipe_err_to_buffer_name_nomsg()
+ call Run_test_pipe_err_to_buffer(1, 0, 0)
+ endfunc
+!
+ func Test_pipe_both_to_buffer()
+ if !has('job')
+ return
+***************
+*** 966,980 ****
+ let options.in_top = 2
+ let options.in_bot = 4
+ endif
+! let g:job = job_start('sort', options)
+
+ if !a:use_buffer
+! call assert_equal("run", job_status(g:job))
+! call ch_sendraw(g:job, "ccc\naaa\nddd\nbbb\neee\n")
+! call ch_close_in(g:job)
+ endif
+
+! call WaitForAssert({-> assert_equal("dead", job_status(g:job))})
+
+ sp sortout
+ call WaitFor('line("$") > 3')
+--- 966,980 ----
+ let options.in_top = 2
+ let options.in_bot = 4
+ endif
+! let job = job_start('sort', options)
+
+ if !a:use_buffer
+! call assert_equal("run", job_status(job))
+! call ch_sendraw(job, "ccc\naaa\nddd\nbbb\neee\n")
+! call ch_close_in(job)
+ endif
+
+! call WaitForAssert({-> assert_equal("dead", job_status(job))})
+
+ sp sortout
+ call WaitFor('line("$") > 3')
+***************
+*** 985,992 ****
+ call assert_equal(['aaa', 'bbb', 'ddd'], getline(2, 4))
+ endif
+
+! call job_stop(g:job)
+! unlet g:job
+ if a:use_buffer
+ bwipe! sortin
+ endif
+--- 985,991 ----
+ call assert_equal(['aaa', 'bbb', 'ddd'], getline(2, 4))
+ endif
+
+! call job_stop(job)
+ if a:use_buffer
+ bwipe! sortin
+ endif
+***************
+*** 1186,1192 ****
+ split testout
+ let job = job_start([s:python, '-c',
+ \ 'import sys; [sys.stdout.write(".") and sys.stdout.flush() for _ in range(10000)]'], options)
+! call assert_equal("run", job_status(job))
+ call WaitFor('len(join(getline(1, "$"), "")) >= 10000')
+ try
+ let totlen = 0
+--- 1185,1192 ----
+ split testout
+ let job = job_start([s:python, '-c',
+ \ 'import sys; [sys.stdout.write(".") and sys.stdout.flush() for _ in range(10000)]'], options)
+! " the job may be done quickly, also accept "dead"
+! call assert_match('^\%(dead\|run\)$', job_status(job))
+ call WaitFor('len(join(getline(1, "$"), "")) >= 10000')
+ try
+ let totlen = 0
+***************
+*** 1247,1255 ****
+ endfunc
+ let job = job_start(s:python . " test_channel_pipe.py",
+ \ {'out_cb': dict.outHandler,
+! \ 'out_mode': 'json',
+! \ 'err_cb': dict.errHandler,
+! \ 'err_mode': 'json'})
+ call assert_equal("run", job_status(job))
+ try
+ let g:Ch_outmsg = ''
+--- 1247,1255 ----
+ endfunc
+ let job = job_start(s:python . " test_channel_pipe.py",
+ \ {'out_cb': dict.outHandler,
+! \ 'out_mode': 'json',
+! \ 'err_cb': dict.errHandler,
+! \ 'err_mode': 'json'})
+ call assert_equal("run", job_status(job))
+ try
+ let g:Ch_outmsg = ''
+***************
+*** 1290,1297 ****
+ endfunc
+ let job = job_start(s:python . " test_channel_pipe.py quit now",
+ \ {'out_cb': 'OutHandler',
+! \ 'close_cb': 'CloseHandler'})
+! call assert_equal("run", job_status(job))
+ try
+ call WaitForAssert({-> assert_equal('quit', g:Ch_msg1)})
+ call WaitForAssert({-> assert_equal(2, g:Ch_closemsg)})
+--- 1290,1298 ----
+ endfunc
+ let job = job_start(s:python . " test_channel_pipe.py quit now",
+ \ {'out_cb': 'OutHandler',
+! \ 'close_cb': 'CloseHandler'})
+! " the job may be done quickly, also accept "dead"
+! call assert_match('^\%(dead\|run\)$', job_status(job))
+ try
+ call WaitForAssert({-> assert_equal('quit', g:Ch_msg1)})
+ call WaitForAssert({-> assert_equal(2, g:Ch_closemsg)})
+***************
+*** 1314,1320 ****
+ endfunc
+ let job = job_start(s:python . " test_channel_pipe.py quit now",
+ \ {'close_cb': 'CloseHandler'})
+! call assert_equal("run", job_status(job))
+ try
+ call WaitForAssert({-> assert_equal('quit', g:Ch_received)})
+ finally
+--- 1315,1322 ----
+ endfunc
+ let job = job_start(s:python . " test_channel_pipe.py quit now",
+ \ {'close_cb': 'CloseHandler'})
+! " the job may be done quickly, also accept "dead"
+! call assert_match('^\%(dead\|run\)$', job_status(job))
+ try
+ call WaitForAssert({-> assert_equal('quit', g:Ch_received)})
+ finally
+***************
+*** 1338,1344 ****
+ endfunc
+ let job = job_start(s:python . " test_channel_pipe.py incomplete",
+ \ {'close_cb': 'CloseHandler'})
+! call assert_equal("run", job_status(job))
+ try
+ call WaitForAssert({-> assert_equal('incomplete', g:Ch_received)})
+ finally
+--- 1340,1347 ----
+ endfunc
+ let job = job_start(s:python . " test_channel_pipe.py incomplete",
+ \ {'close_cb': 'CloseHandler'})
+! " the job may be done quickly, also accept "dead"
+! call assert_match('^\%(dead\|run\)$', job_status(job))
+ try
+ call WaitForAssert({-> assert_equal('incomplete', g:Ch_received)})
+ finally
+***************
+*** 1354,1363 ****
+ call ch_log('Test_out_cb_lambda()')
+
+ let job = job_start(s:python . " test_channel_pipe.py",
+! \ {'out_cb': {ch, msg -> execute("let g:Ch_outmsg = 'lambda: ' . msg")},
+! \ 'out_mode': 'json',
+! \ 'err_cb': {ch, msg -> execute(":let g:Ch_errmsg = 'lambda: ' . msg")},
+! \ 'err_mode': 'json'})
+ call assert_equal("run", job_status(job))
+ try
+ let g:Ch_outmsg = ''
+--- 1357,1366 ----
+ call ch_log('Test_out_cb_lambda()')
+
+ let job = job_start(s:python . " test_channel_pipe.py",
+! \ {'out_cb': {ch, msg -> execute("let g:Ch_outmsg = 'lambda: ' . msg")},
+! \ 'out_mode': 'json',
+! \ 'err_cb': {ch, msg -> execute(":let g:Ch_errmsg = 'lambda: ' . msg")},
+! \ 'err_mode': 'json'})
+ call assert_equal("run", job_status(job))
+ try
+ let g:Ch_outmsg = ''
+***************
+*** 1385,1398 ****
+ 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,
+! \ })
+! call assert_equal('run', job_status(g:job))
+! unlet g:job
+ call WaitForAssert({-> assert_equal(2, len(g:retdict.ret))})
+! call assert_match('^\%(dead\|run\)', g:retdict.ret['close_cb'])
+ call assert_equal('dead', g:retdict.ret['exit_cb'])
+ unlet g:retdict
+ endfunc
+--- 1388,1400 ----
+ let self.ret['exit_cb'] = job_status(a:job)
+ endfunc
+
+! let job = job_start([&shell, &shellcmdflag, 'echo'],
+! \ {'close_cb': g:retdict.close_cb,
+! \ 'exit_cb': g:retdict.exit_cb})
+! " the job may be done quickly, also accept "dead"
+! call assert_match('^\%(dead\|run\)$', job_status(job))
+ call WaitForAssert({-> assert_equal(2, len(g:retdict.ret))})
+! call assert_match('^\%(dead\|run\)$', g:retdict.ret['close_cb'])
+ call assert_equal('dead', g:retdict.ret['exit_cb'])
+ unlet g:retdict
+ endfunc
+***************
+*** 1415,1421 ****
+ 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))})
+--- 1417,1423 ----
+ 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))})
+***************
+*** 1933,1939 ****
+ return
+ endif
+
+! let job = job_start(s:python . ' -c "import time;time.sleep(0.2)"', {'out_io': 'null', 'err_io': 'null', 'pty': 1})
+ let elapsed = WaitFor({-> job_status(job) ==# 'dead'})
+ call assert_inrange(200, 1000, elapsed)
+ call job_stop(job)
+--- 1935,1942 ----
+ return
+ endif
+
+! let job = job_start(s:python . ' -c "import time;time.sleep(0.2)"',
+! \ {'out_io': 'null', 'err_io': 'null', 'pty': 1})
+ let elapsed = WaitFor({-> job_status(job) ==# 'dead'})
+ call assert_inrange(200, 1000, elapsed)
+ call job_stop(job)
+***************
+*** 1985,1997 ****
+ try
+ let g:out = ''
+ let job = job_start(s:python . " test_channel_pipe.py",
+! \ {'mode': 'raw', 'drop': 'never', 'noblock': 1,
+! \ 'callback': {ch, msg -> execute('let g:out .= msg')}})
+
+! let want = repeat('X', 79999) . "\n"
+ call ch_sendraw(job, want)
+! let g:Ch_job = job
+! call WaitForAssert({-> assert_equal("dead", job_status(g:Ch_job))})
+ call assert_equal(want, substitute(g:out, '\r', '', 'g'))
+ finally
+ call job_stop(job)
+--- 1988,2001 ----
+ try
+ let g:out = ''
+ let job = job_start(s:python . " test_channel_pipe.py",
+! \ {'mode': 'raw', 'drop': 'never', 'noblock': 1,
+! \ 'callback': {ch, msg -> execute('let g:out .= msg')}})
+
+! let outlen = 79999
+! let want = repeat('X', outlen) . "\n"
+ call ch_sendraw(job, want)
+! call WaitFor({-> len(g:out) >= outlen}, 10000)
+! call WaitForAssert({-> assert_equal("dead", job_status(job))})
+ call assert_equal(want, substitute(g:out, '\r', '', 'g'))
+ finally
+ call job_stop(job)
+*** ../vim-8.1.0819/src/testdir/test_filechanged.vim 2019-01-24 21:57:11.574719854 +0100
+--- src/testdir/test_filechanged.vim 2019-01-25 20:54:17.931364655 +0100
+***************
+*** 90,96 ****
+ endfunc
+
+ func Test_file_changed_dialog()
+! if !has('unix')
+ return
+ endif
+ au! FileChangedShell
+--- 90,96 ----
+ endfunc
+
+ func Test_file_changed_dialog()
+! if !has('unix') || has('gui_running')
+ return
+ endif
+ au! FileChangedShell
+*** ../vim-8.1.0819/src/version.c 2019-01-25 20:48:29.385157333 +0100
+--- src/version.c 2019-01-25 21:00:22.821191796 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 820,
+ /**/
+
+--
+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.0821 b/data/vim/patches/8.1.0821
new file mode 100644
index 000000000..83133c837
--- /dev/null
+++ b/data/vim/patches/8.1.0821
@@ -0,0 +1,252 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0821
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0821
+Problem: Xxd "usage" output and other arguments not tested.
+Solution: Add a test to trigger the usage output in various ways. Fix
+ uncovered problem.
+Files: src/testdir/test_xxd.vim, src/xxd/xxd.c
+
+
+*** ../vim-8.1.0820/src/testdir/test_xxd.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_xxd.vim 2019-01-25 21:49:26.831963075 +0100
+***************
+*** 20,26 ****
+ func Test_xxd()
+ call PrepareBuffer(range(1,30))
+ set ff=unix
+! w XXDfile
+
+ " Test 1: simple, filter the result through xxd
+ let s:test = 1
+--- 20,26 ----
+ func Test_xxd()
+ call PrepareBuffer(range(1,30))
+ set ff=unix
+! w! XXDfile
+
+ " Test 1: simple, filter the result through xxd
+ let s:test = 1
+***************
+*** 39,53 ****
+ exe '%!' . s:xxd_cmd . ' -r'
+ call assert_equal(map(range(1,30), {v,c -> string(c)}), getline(1,'$'), s:Mess(s:test))
+
+! " Test 3: Skip the first 30 bytes
+ let s:test += 1
+! exe '%!' . s:xxd_cmd . ' -s 0x30 %'
+! call assert_equal(expected[3:], getline(1,'$'), s:Mess(s:test))
+
+ " Test 4: Skip the first 30 bytes
+ let s:test += 1
+! exe '%!' . s:xxd_cmd . ' -s -0x31 %'
+! call assert_equal(expected[2:], getline(1,'$'), s:Mess(s:test))
+
+ " Test 5: Print 120 bytes as continuous hexdump with 20 octets per line
+ let s:test += 1
+--- 39,57 ----
+ exe '%!' . s:xxd_cmd . ' -r'
+ call assert_equal(map(range(1,30), {v,c -> string(c)}), getline(1,'$'), s:Mess(s:test))
+
+! " Test 3: Skip the first 0x30 bytes
+ let s:test += 1
+! for arg in ['-s 0x30', '-s0x30', '-s+0x30', '-skip 0x030', '-seek 0x30', '-seek +0x30 --']
+! exe '%!' . s:xxd_cmd . ' ' . arg . ' %'
+! call assert_equal(expected[3:], getline(1,'$'), s:Mess(s:test))
+! endfor
+
+ " Test 4: Skip the first 30 bytes
+ let s:test += 1
+! for arg in ['-s -0x31', '-s-0x31']
+! exe '%!' . s:xxd_cmd . ' ' . arg . ' %'
+! call assert_equal(expected[2:], getline(1,'$'), s:Mess(s:test))
+! endfor
+
+ " Test 5: Print 120 bytes as continuous hexdump with 20 octets per line
+ let s:test += 1
+***************
+*** 56,62 ****
+ if has('win32') && !filereadable(fname)
+ let fname = '../../doc/xxd.1'
+ endif
+! exe '0r! ' . s:xxd_cmd . ' -l 120 -ps -c 20 ' . fname
+ $d
+ let expected = [
+ \ '2e54482058584420312022417567757374203139',
+--- 60,66 ----
+ if has('win32') && !filereadable(fname)
+ let fname = '../../doc/xxd.1'
+ endif
+! exe '0r! ' . s:xxd_cmd . ' -l 120 -ps -c20 ' . fname
+ $d
+ let expected = [
+ \ '2e54482058584420312022417567757374203139',
+***************
+*** 69,78 ****
+
+ " Test 6: Print the date from xxd.1
+ let s:test += 1
+! %d
+! exe '0r! ' . s:xxd_cmd . ' -s 0x36 -l 13 -c 13 ' . fname
+! $d
+! call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996', getline(1), s:Mess(s:test))
+
+ " Test 7: Print C include
+ let s:test += 1
+--- 73,84 ----
+
+ " Test 6: Print the date from xxd.1
+ let s:test += 1
+! for arg in ['-l 13', '-l13', '-len 13']
+! %d
+! exe '0r! ' . s:xxd_cmd . ' -s 0x36 -l 13 -cols 13 ' . fname
+! $d
+! call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996', getline(1), s:Mess(s:test))
+! endfor
+
+ " Test 7: Print C include
+ let s:test += 1
+***************
+*** 87,100 ****
+
+ " Test 8: Print C include capitalized
+ let s:test += 1
+! call writefile(['TESTabcd09'], 'XXDfile')
+! %d
+! exe '0r! ' . s:xxd_cmd . ' -i -C XXDfile'
+! $d
+! let expected = ['unsigned char XXDFILE[] = {',
+! \ ' 0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 0x0a', '};',
+! \ 'unsigned int XXDFILE_LEN = 11;']
+! call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
+
+ " Test 9: Create a file with containing a single 'A'
+ let s:test += 1
+--- 93,108 ----
+
+ " Test 8: Print C include capitalized
+ let s:test += 1
+! for arg in ['-C', '-capitalize']
+! call writefile(['TESTabcd09'], 'XXDfile')
+! %d
+! exe '0r! ' . s:xxd_cmd . ' -i ' . arg . ' XXDfile'
+! $d
+! let expected = ['unsigned char XXDFILE[] = {',
+! \ ' 0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 0x0a', '};',
+! \ 'unsigned int XXDFILE_LEN = 11;']
+! call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
+! endfor
+
+ " Test 9: Create a file with containing a single 'A'
+ let s:test += 1
+***************
+*** 110,115 ****
+--- 118,156 ----
+ call PrepareBuffer(readfile('XXDfile')[0])
+ call assert_equal('A', getline(1), s:Mess(s:test))
+ call delete('XXDfile')
++
++ " Test 10: group with 4 octets
++ let s:test += 1
++ for arg in ['-g 4', '-group 4', '-g4']
++ call writefile(['TESTabcd09'], 'XXDfile')
++ %d
++ exe '0r! ' . s:xxd_cmd . ' ' . arg . ' XXDfile'
++ $d
++ let expected = ['00000000: 54455354 61626364 30390a TESTabcd09.']
++ call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
++ call delete('XXDfile')
++ endfor
++
++ " TODO:
++ " -o -offset
++
+ %d
+ bw!
+ endfunc
++
++ " Various ways with wrong arguments that trigger the usage output.
++ func Test_xxd_usage()
++ for arg in ['-c', '-g', '-o', '-s', '-l', '-X', 'one two three']
++ new
++ exe 'r! ' . s:xxd_cmd . ' ' . arg
++ call assert_match("Usage:", join(getline(1, 3)))
++ bwipe!
++ endfor
++ endfunc
++
++ func Test_xxd_version()
++ new
++ exe 'r! ' . s:xxd_cmd . ' -v'
++ call assert_match("xxd V1.10 .* by Juergen Weigert", join(getline(1, 3)))
++ bwipe!
++ endfunc
+*** ../vim-8.1.0820/src/xxd/xxd.c 2018-04-03 14:11:10.000000000 +0200
+--- src/xxd/xxd.c 2019-01-25 21:46:21.129278533 +0100
+***************
+*** 508,517 ****
+ }
+ else if (!STRNCMP(pp, "-c", 2))
+ {
+! if (pp[2] && STRNCMP("ols", pp + 2, 3))
+! cols = (int)strtol(pp + 2, NULL, 0);
+! else if (pp[2] && STRNCMP("apitalize", pp + 2, 9))
+ capitalize = 1;
+ else
+ {
+ if (!argv[2])
+--- 508,517 ----
+ }
+ else if (!STRNCMP(pp, "-c", 2))
+ {
+! if (pp[2] && !STRNCMP("apitalize", pp + 2, 9))
+ capitalize = 1;
++ else if (pp[2] && STRNCMP("ols", pp + 2, 3))
++ cols = (int)strtol(pp + 2, NULL, 0);
+ else
+ {
+ if (!argv[2])
+***************
+*** 523,529 ****
+ }
+ else if (!STRNCMP(pp, "-g", 2))
+ {
+! if (pp[2] && STRNCMP("group", pp + 2, 5))
+ octspergrp = (int)strtol(pp + 2, NULL, 0);
+ else
+ {
+--- 523,529 ----
+ }
+ else if (!STRNCMP(pp, "-g", 2))
+ {
+! if (pp[2] && STRNCMP("roup", pp + 2, 4))
+ octspergrp = (int)strtol(pp + 2, NULL, 0);
+ else
+ {
+*** ../vim-8.1.0820/src/version.c 2019-01-25 21:01:13.240877414 +0100
+--- src/version.c 2019-01-25 21:51:57.926996288 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 821,
+ /**/
+
+--
+FATHER: Who are you?
+PRINCE: I'm ... your son ...
+FATHER: Not you.
+LAUNCELOT: I'm ... er ... Sir Launcelot, 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.0822 b/data/vim/patches/8.1.0822
new file mode 100644
index 000000000..50171c9d6
--- /dev/null
+++ b/data/vim/patches/8.1.0822
@@ -0,0 +1,146 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0822
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0822
+Problem: Peeking and flushing output slows down execution.
+Solution: Do not update the mode message when global_busy is set. Do not
+ flush when only peeking for a character. (Ken Takata)
+Files: src/getchar.c, src/screen.c, src/proto/screen.pro, src/edit.c
+
+
+*** ../vim-8.1.0821/src/getchar.c 2019-01-24 17:18:37.591462362 +0100
+--- src/getchar.c 2019-01-25 22:11:09.128279171 +0100
+***************
+*** 3039,3047 ****
+
+ /*
+ * Always flush the output characters when getting input characters
+! * from the user.
+ */
+! out_flush();
+
+ /*
+ * Fill up to a third of the buffer, because each character may be
+--- 3039,3048 ----
+
+ /*
+ * Always flush the output characters when getting input characters
+! * from the user and not just peeking.
+ */
+! if (wait_time == -1L || wait_time > 10L)
+! out_flush();
+
+ /*
+ * Fill up to a third of the buffer, because each character may be
+*** ../vim-8.1.0821/src/screen.c 2019-01-24 18:20:14.436543394 +0100
+--- src/screen.c 2019-01-25 22:23:24.083428734 +0100
+***************
+*** 10110,10115 ****
+--- 10110,10135 ----
+ }
+
+ /*
++ * Return TRUE when postponing displaying the mode message: when not redrawing
++ * or inside a mapping.
++ */
++ int
++ skip_showmode()
++ {
++ // Call char_avail() only when we are going to show something, because it
++ // takes a bit of time. redrawing() may also call char_avail_avail().
++ if (global_busy
++ || msg_silent != 0
++ || !redrawing()
++ || (char_avail() && !KeyTyped))
++ {
++ redraw_cmdline = TRUE; // show mode later
++ return TRUE;
++ }
++ return FALSE;
++ }
++
++ /*
+ * Show the current mode and ruler.
+ *
+ * If clear_cmdline is TRUE, clear the rest of the cmdline.
+***************
+*** 10135,10150 ****
+ || VIsual_active));
+ if (do_mode || reg_recording != 0)
+ {
+! /*
+! * Don't show mode right now, when not redrawing or inside a mapping.
+! * Call char_avail() only when we are going to show something, because
+! * it takes a bit of time.
+! */
+! if (!redrawing() || (char_avail() && !KeyTyped) || msg_silent != 0)
+! {
+! redraw_cmdline = TRUE; /* show mode later */
+! return 0;
+! }
+
+ nwr_save = need_wait_return;
+
+--- 10155,10162 ----
+ || VIsual_active));
+ if (do_mode || reg_recording != 0)
+ {
+! if (skip_showmode())
+! return 0; // show mode later
+
+ nwr_save = need_wait_return;
+
+*** ../vim-8.1.0821/src/proto/screen.pro 2019-01-11 20:34:18.300314693 +0100
+--- src/proto/screen.pro 2019-01-25 22:22:17.887869921 +0100
+***************
+*** 49,54 ****
+--- 49,55 ----
+ int win_del_lines(win_T *wp, int row, int line_count, int invalid, int mayclear, int clear_attr);
+ int screen_ins_lines(int off, int row, int line_count, int end, int clear_attr, win_T *wp);
+ int screen_del_lines(int off, int row, int line_count, int end, int force, int clear_attr, win_T *wp);
++ int skip_showmode(void);
+ int showmode(void);
+ void unshowmode(int force);
+ void clearmode(void);
+*** ../vim-8.1.0821/src/edit.c 2019-01-24 15:04:44.662887892 +0100
+--- src/edit.c 2019-01-25 22:23:48.535265639 +0100
+***************
+*** 8722,8728 ****
+ */
+ if (reg_recording != 0 || restart_edit != NUL)
+ showmode();
+! else if (p_smd)
+ msg("");
+
+ return TRUE; /* exit Insert mode */
+--- 8722,8728 ----
+ */
+ if (reg_recording != 0 || restart_edit != NUL)
+ showmode();
+! else if (p_smd && !skip_showmode())
+ msg("");
+
+ return TRUE; /* exit Insert mode */
+*** ../vim-8.1.0821/src/version.c 2019-01-25 21:52:12.190931859 +0100
+--- src/version.c 2019-01-25 22:28:55.492398277 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 822,
+ /**/
+
+--
+Overflow on /dev/null, please empty the bit bucket.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0823 b/data/vim/patches/8.1.0823
new file mode 100644
index 000000000..c63f97d63
--- /dev/null
+++ b/data/vim/patches/8.1.0823
@@ -0,0 +1,84 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0823
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0823
+Problem: Not sufficient testing of xxd.
+Solution: Add some more test coverage.
+Files: src/testdir/test_xxd.vim
+
+
+*** ../vim-8.1.0822/src/testdir/test_xxd.vim 2019-01-25 21:52:12.190931859 +0100
+--- src/testdir/test_xxd.vim 2019-01-26 14:08:03.325071260 +0100
+***************
+*** 75,81 ****
+ let s:test += 1
+ for arg in ['-l 13', '-l13', '-len 13']
+ %d
+! exe '0r! ' . s:xxd_cmd . ' -s 0x36 -l 13 -cols 13 ' . fname
+ $d
+ call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996', getline(1), s:Mess(s:test))
+ endfor
+--- 75,81 ----
+ let s:test += 1
+ for arg in ['-l 13', '-l13', '-len 13']
+ %d
+! exe '0r! ' . s:xxd_cmd . ' -s 0x36 ' . arg . ' -cols 13 ' . fname
+ $d
+ call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996', getline(1), s:Mess(s:test))
+ endfor
+***************
+*** 131,136 ****
+--- 131,154 ----
+ call delete('XXDfile')
+ endfor
+
++ " Test 11: reverse with CR, hex upper, Postscript style with a TAB
++ let s:test += 1
++ call writefile([" 54455354\t610B6364 30390A TESTa\0x0bcd09.\r"], 'Xinput')
++ silent exe '!' . s:xxd_cmd . ' -r -p < Xinput > XXDfile'
++ let blob = readfile('XXDfile', 'B')
++ call assert_equal(0z54455354.610B6364.30390A, blob)
++ call delete('Xinput')
++ call delete('XXDfile')
++
++ " Test 12: reverse with seek
++ let s:test += 1
++ call writefile(["00000000: 54455354\t610B6364 30390A TESTa\0x0bcd09.\r"], 'Xinput')
++ silent exe '!' . s:xxd_cmd . ' -r -seek 5 < Xinput > XXDfile'
++ let blob = readfile('XXDfile', 'B')
++ call assert_equal(0z0000000000.54455354.610B6364.30390A, blob)
++ call delete('Xinput')
++ call delete('XXDfile')
++
+ " TODO:
+ " -o -offset
+
+*** ../vim-8.1.0822/src/version.c 2019-01-25 22:29:54.139821894 +0100
+--- src/version.c 2019-01-26 14:10:21.939998353 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 823,
+ /**/
+
+--
+ [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.0824 b/data/vim/patches/8.1.0824
new file mode 100644
index 000000000..e38e26d0d
--- /dev/null
+++ b/data/vim/patches/8.1.0824
@@ -0,0 +1,676 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0824
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0824
+Problem: SunOS/Solaris has a problem with ttys.
+Solution: Add mch_isatty() with extra handling for SunOS. (Ozaki Kiichi,
+ closes #3865)
+Files: src/auto/configure, src/channel.c, src/config.h.in,
+ src/configure.ac, src/os_unix.c, src/proto/pty.pro, src/pty.c,
+ src/terminal.c
+
+
+*** ../vim-8.1.0823/src/auto/configure 2019-01-24 17:59:35.135217476 +0100
+--- src/auto/configure 2019-01-26 14:57:08.963571107 +0100
+***************
+*** 11131,11137 ****
+ unistd.h stropts.h errno.h sys/resource.h \
+ sys/systeminfo.h locale.h sys/stream.h termios.h \
+ libc.h sys/statfs.h poll.h sys/poll.h pwd.h \
+! utime.h sys/param.h libintl.h libgen.h \
+ util/debug.h util/msg18n.h frame.h sys/acl.h \
+ sys/access.h sys/sysinfo.h wchar.h wctype.h
+ do :
+--- 11131,11137 ----
+ unistd.h stropts.h errno.h sys/resource.h \
+ sys/systeminfo.h locale.h sys/stream.h termios.h \
+ libc.h sys/statfs.h poll.h sys/poll.h pwd.h \
+! utime.h sys/param.h sys/ptms.h libintl.h libgen.h \
+ util/debug.h util/msg18n.h frame.h sys/acl.h \
+ sys/access.h sys/sysinfo.h wchar.h wctype.h
+ do :
+*** ../vim-8.1.0823/src/channel.c 2019-01-24 23:11:44.631650199 +0100
+--- src/channel.c 2019-01-26 14:56:30.315399239 +0100
+***************
+*** 1048,1054 ****
+ # if defined(UNIX)
+ /* Do not end the job when all output channels are closed, wait until
+ * the job ended. */
+! if (isatty(in))
+ channel->ch_to_be_closed |= (1U << PART_IN);
+ # endif
+ }
+--- 1048,1054 ----
+ # if defined(UNIX)
+ /* Do not end the job when all output channels are closed, wait until
+ * the job ended. */
+! if (mch_isatty(in))
+ channel->ch_to_be_closed |= (1U << PART_IN);
+ # endif
+ }
+*** ../vim-8.1.0823/src/config.h.in 2019-01-24 17:59:35.135217476 +0100
+--- src/config.h.in 2019-01-26 14:56:30.315399239 +0100
+***************
+*** 258,263 ****
+--- 258,264 ----
+ #undef HAVE_SYS_PARAM_H
+ #undef HAVE_SYS_POLL_H
+ #undef HAVE_SYS_PTEM_H
++ #undef HAVE_SYS_PTMS_H
+ #undef HAVE_SYS_RESOURCE_H
+ #undef HAVE_SYS_SELECT_H
+ #undef HAVE_SYS_STATFS_H
+*** ../vim-8.1.0823/src/configure.ac 2019-01-24 17:59:35.135217476 +0100
+--- src/configure.ac 2019-01-26 14:56:30.315399239 +0100
+***************
+*** 3265,3271 ****
+ unistd.h stropts.h errno.h sys/resource.h \
+ sys/systeminfo.h locale.h sys/stream.h termios.h \
+ libc.h sys/statfs.h poll.h sys/poll.h pwd.h \
+! utime.h sys/param.h libintl.h libgen.h \
+ util/debug.h util/msg18n.h frame.h sys/acl.h \
+ sys/access.h sys/sysinfo.h wchar.h wctype.h)
+
+--- 3265,3271 ----
+ unistd.h stropts.h errno.h sys/resource.h \
+ sys/systeminfo.h locale.h sys/stream.h termios.h \
+ libc.h sys/statfs.h poll.h sys/poll.h pwd.h \
+! utime.h sys/param.h sys/ptms.h libintl.h libgen.h \
+ util/debug.h util/msg18n.h frame.h sys/acl.h \
+ sys/access.h sys/sysinfo.h wchar.h wctype.h)
+
+*** ../vim-8.1.0823/src/os_unix.c 2019-01-24 16:38:58.272712472 +0100
+--- src/os_unix.c 2019-01-26 15:02:45.792035406 +0100
+***************
+*** 338,344 ****
+ }
+
+ /* Why is NeXT excluded here (and not in os_unixx.h)? */
+! #if defined(ECHOE) && defined(ICANON) && (defined(HAVE_TERMIO_H) || defined(HAVE_TERMIOS_H)) && !defined(__NeXT__)
+ # define NEW_TTY_SYSTEM
+ #endif
+
+--- 338,346 ----
+ }
+
+ /* Why is NeXT excluded here (and not in os_unixx.h)? */
+! #if defined(ECHOE) && defined(ICANON) \
+! && (defined(HAVE_TERMIO_H) || defined(HAVE_TERMIOS_H)) \
+! && !defined(__NeXT__)
+ # define NEW_TTY_SYSTEM
+ #endif
+
+***************
+*** 3448,3453 ****
+--- 3450,3507 ----
+
+ #ifndef VMS
+
++ /*
++ * Get the file descriptor to use for tty operations.
++ */
++ static int
++ get_tty_fd(int fd)
++ {
++ int tty_fd = fd;
++
++ #if defined(HAVE_SVR4_PTYS) && defined(SUN_SYSTEM)
++ // On SunOS: Get the terminal parameters from "fd", or the slave device of
++ // "fd" when it is a master device.
++ if (mch_isatty(fd) > 1)
++ {
++ char *name;
++
++ name = ptsname(fd);
++ if (name == NULL)
++ return -1;
++
++ tty_fd = open(name, O_RDONLY | O_NOCTTY | O_EXTRA, 0);
++ if (tty_fd < 0)
++ return -1;
++ }
++ #endif
++ return tty_fd;
++ }
++
++ static int
++ mch_tcgetattr(int fd, void *term)
++ {
++ int tty_fd;
++ int retval = -1;
++
++ tty_fd = get_tty_fd(fd);
++ if (tty_fd >= 0)
++ {
++ #ifdef NEW_TTY_SYSTEM
++ # ifdef HAVE_TERMIOS_H
++ retval = tcgetattr(tty_fd, (struct termios *)term);
++ # else
++ retval = ioctl(tty_fd, TCGETA, (struct termio *)term);
++ # endif
++ #else
++ // for "old" tty systems
++ retval = ioctl(tty_fd, TIOCGETP, (struct sgttyb *)term);
++ #endif
++ if (tty_fd != fd)
++ close(tty_fd);
++ }
++ return retval;
++ }
++
+ void
+ mch_settmode(int tmode)
+ {
+***************
+*** 3465,3475 ****
+ if (first)
+ {
+ first = FALSE;
+! # if defined(HAVE_TERMIOS_H)
+! tcgetattr(read_cmd_fd, &told);
+! # else
+! ioctl(read_cmd_fd, TCGETA, &told);
+! # endif
+ }
+
+ tnew = told;
+--- 3519,3525 ----
+ if (first)
+ {
+ first = FALSE;
+! mch_tcgetattr(read_cmd_fd, &told);
+ }
+
+ tnew = told;
+***************
+*** 3527,3533 ****
+ if (first)
+ {
+ first = FALSE;
+! ioctl(read_cmd_fd, TIOCGETP, &ttybold);
+ }
+
+ ttybnew = ttybold;
+--- 3577,3583 ----
+ if (first)
+ {
+ first = FALSE;
+! mch_tcgetattr(read_cmd_fd, &ttybold);
+ }
+
+ ttybnew = ttybold;
+***************
+*** 3587,3599 ****
+ struct termio keys;
+ # endif
+
+! if (
+! # if defined(HAVE_TERMIOS_H)
+! tcgetattr(fd, &keys) != -1
+! # else
+! ioctl(fd, TCGETA, &keys) != -1
+! # endif
+! )
+ {
+ info->backspace = keys.c_cc[VERASE];
+ info->interrupt = keys.c_cc[VINTR];
+--- 3637,3643 ----
+ struct termio keys;
+ # endif
+
+! if (mch_tcgetattr(fd, &keys) != -1)
+ {
+ info->backspace = keys.c_cc[VERASE];
+ info->interrupt = keys.c_cc[VINTR];
+***************
+*** 3611,3617 ****
+ /* for "old" tty systems */
+ struct sgttyb keys;
+
+! if (ioctl(fd, TIOCGETP, &keys) != -1)
+ {
+ info->backspace = keys.sg_erase;
+ info->interrupt = keys.sg_kill;
+--- 3655,3661 ----
+ /* for "old" tty systems */
+ struct sgttyb keys;
+
+! if (mch_tcgetattr(fd, &keys) != -1)
+ {
+ info->backspace = keys.sg_erase;
+ info->interrupt = keys.sg_kill;
+***************
+*** 4070,4103 ****
+ int
+ mch_report_winsize(int fd, int rows, int cols)
+ {
+! # ifdef TIOCSWINSZ
+! struct winsize ws;
+
+! ws.ws_col = cols;
+! ws.ws_row = rows;
+! ws.ws_xpixel = cols * 5;
+! ws.ws_ypixel = rows * 10;
+! if (ioctl(fd, TIOCSWINSZ, &ws) == 0)
+ {
+! ch_log(NULL, "ioctl(TIOCSWINSZ) success");
+! return OK;
+! }
+! ch_log(NULL, "ioctl(TIOCSWINSZ) failed");
+! # else
+! # ifdef TIOCSSIZE
+! struct ttysize ts;
+
+! ts.ts_cols = cols;
+! ts.ts_lines = rows;
+! if (ioctl(fd, TIOCSSIZE, &ws) == 0)
+! {
+! ch_log(NULL, "ioctl(TIOCSSIZE) success");
+! return OK;
+! }
+! ch_log(NULL, "ioctl(TIOCSSIZE) failed");
+! # endif
+ # endif
+! return FAIL;
+ }
+ #endif
+
+--- 4114,4148 ----
+ int
+ mch_report_winsize(int fd, int rows, int cols)
+ {
+! int tty_fd;
+! int retval = -1;
+
+! tty_fd = get_tty_fd(fd);
+! if (tty_fd >= 0)
+ {
+! # if defined(TIOCSWINSZ)
+! struct winsize ws;
+
+! ws.ws_col = cols;
+! ws.ws_row = rows;
+! ws.ws_xpixel = cols * 5;
+! ws.ws_ypixel = rows * 10;
+! retval = ioctl(tty_fd, TIOCSWINSZ, &ws);
+! ch_log(NULL, "ioctl(TIOCSWINSZ) %s",
+! retval == 0 ? "success" : "failed");
+! # elif defined(TIOCSSIZE)
+! struct ttysize ts;
+!
+! ts.ts_cols = cols;
+! ts.ts_lines = rows;
+! retval = ioctl(tty_fd, TIOCSSIZE, &ts);
+! ch_log(NULL, "ioctl(TIOCSSIZE) %s",
+! retval == 0 ? "success" : "failed");
+ # endif
+! if (tty_fd != fd)
+! close(tty_fd);
+! }
+! return retval == 0 ? OK : FAIL;
+ }
+ #endif
+
+***************
+*** 4273,4279 ****
+ {
+ char *tty_name;
+
+! *pty_master_fd = OpenPTY(&tty_name); /* open pty */
+ if (*pty_master_fd >= 0)
+ {
+ /* Leaving out O_NOCTTY may lead to waitpid() always returning
+--- 4318,4324 ----
+ {
+ char *tty_name;
+
+! *pty_master_fd = mch_openpty(&tty_name); // open pty
+ if (*pty_master_fd >= 0)
+ {
+ /* Leaving out O_NOCTTY may lead to waitpid() always returning
+***************
+*** 4721,4727 ****
+ {
+ /* push stream discipline modules */
+ if (options & SHELL_COOKED)
+! SetupSlavePTY(pty_slave_fd);
+ # ifdef TIOCSCTTY
+ /* Try to become controlling tty (probably doesn't work,
+ * unless run by root) */
+--- 4766,4772 ----
+ {
+ /* push stream discipline modules */
+ if (options & SHELL_COOKED)
+! setup_slavepty(pty_slave_fd);
+ # ifdef TIOCSCTTY
+ /* Try to become controlling tty (probably doesn't work,
+ * unless run by root) */
+***************
+*** 5579,5585 ****
+ if (pty_slave_fd >= 0)
+ {
+ /* push stream discipline modules */
+! SetupSlavePTY(pty_slave_fd);
+ # ifdef TIOCSCTTY
+ /* Try to become controlling tty (probably doesn't work,
+ * unless run by root) */
+--- 5624,5630 ----
+ if (pty_slave_fd >= 0)
+ {
+ /* push stream discipline modules */
+! setup_slavepty(pty_slave_fd);
+ # ifdef TIOCSCTTY
+ /* Try to become controlling tty (probably doesn't work,
+ * unless run by root) */
+*** ../vim-8.1.0823/src/proto/pty.pro 2018-05-17 13:52:49.000000000 +0200
+--- src/proto/pty.pro 2019-01-26 15:12:08.822449336 +0100
+***************
+*** 1,4 ****
+ /* pty.c */
+! int SetupSlavePTY(int fd);
+! int OpenPTY(char **ttyn);
+ /* vim: set ft=c : */
+--- 1,5 ----
+ /* pty.c */
+! int setup_slavepty(int fd);
+! int mch_openpty(char **ttyn);
+! int mch_isatty(int fd);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0823/src/pty.c 2018-09-30 21:43:17.203693237 +0200
+--- src/pty.c 2019-01-26 15:05:23.639798802 +0100
+***************
+*** 56,71 ****
+ #endif
+
+ #if HAVE_STROPTS_H
+! #include <sys/types.h>
+! #ifdef sinix
+! #define buf_T __system_buf_t__
+! #endif
+! #include <stropts.h>
+! #ifdef sinix
+! #undef buf_T
+! #endif
+ # ifdef SUN_SYSTEM
+ # include <sys/conf.h>
+ # endif
+ #endif
+
+--- 56,74 ----
+ #endif
+
+ #if HAVE_STROPTS_H
+! # include <sys/types.h>
+! # ifdef sinix
+! # define buf_T __system_buf_t__
+! # endif
+! # include <stropts.h>
+! # ifdef sinix
+! # undef buf_T
+! # endif
+ # ifdef SUN_SYSTEM
+ # include <sys/conf.h>
++ # if defined(HAVE_SYS_PTMS_H) && defined(HAVE_SVR4_PTYS)
++ # include <sys/ptms.h>
++ # endif
+ # endif
+ #endif
+
+***************
+*** 155,165 ****
+ * pty on others. Needs to be tuned...
+ */
+ int
+! SetupSlavePTY(int fd)
+ {
+ if (fd < 0)
+ return 0;
+! #if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX)
+ # if defined(HAVE_SYS_PTEM_H) || defined(hpux)
+ if (ioctl(fd, I_PUSH, "ptem") != 0)
+ return -1;
+--- 158,169 ----
+ * pty on others. Needs to be tuned...
+ */
+ int
+! setup_slavepty(int fd)
+ {
+ if (fd < 0)
+ return 0;
+! #if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) \
+! && !defined(linux) && !defined(__osf__) && !defined(M_UNIX)
+ # if defined(HAVE_SYS_PTEM_H) || defined(hpux)
+ if (ioctl(fd, I_PUSH, "ptem") != 0)
+ return -1;
+***************
+*** 178,184 ****
+ #if defined(OSX) && !defined(PTY_DONE)
+ #define PTY_DONE
+ int
+! OpenPTY(char **ttyn)
+ {
+ int f;
+ static char TtyName[32];
+--- 182,188 ----
+ #if defined(OSX) && !defined(PTY_DONE)
+ #define PTY_DONE
+ int
+! mch_openpty(char **ttyn)
+ {
+ int f;
+ static char TtyName[32];
+***************
+*** 195,201 ****
+ && !defined(PTY_DONE)
+ #define PTY_DONE
+ int
+! OpenPTY(char **ttyn)
+ {
+ char *m, *s;
+ int f;
+--- 199,205 ----
+ && !defined(PTY_DONE)
+ #define PTY_DONE
+ int
+! mch_openpty(char **ttyn)
+ {
+ char *m, *s;
+ int f;
+***************
+*** 219,225 ****
+ #if defined(__sgi) && !defined(PTY_DONE)
+ #define PTY_DONE
+ int
+! OpenPTY(char **ttyn)
+ {
+ int f;
+ char *name;
+--- 223,229 ----
+ #if defined(__sgi) && !defined(PTY_DONE)
+ #define PTY_DONE
+ int
+! mch_openpty(char **ttyn)
+ {
+ int f;
+ char *name;
+***************
+*** 244,250 ****
+ #if defined(MIPS) && defined(HAVE_DEV_PTC) && !defined(PTY_DONE)
+ #define PTY_DONE
+ int
+! OpenPTY(char **ttyn)
+ {
+ int f;
+ stat_T buf;
+--- 248,254 ----
+ #if defined(MIPS) && defined(HAVE_DEV_PTC) && !defined(PTY_DONE)
+ #define PTY_DONE
+ int
+! mch_openpty(char **ttyn)
+ {
+ int f;
+ stat_T buf;
+***************
+*** 272,278 ****
+ * Same for Mac OS X Leopard (10.5). */
+ #define PTY_DONE
+ int
+! OpenPTY(char **ttyn)
+ {
+ int f;
+ char *m;
+--- 276,282 ----
+ * Same for Mac OS X Leopard (10.5). */
+ #define PTY_DONE
+ int
+! mch_openpty(char **ttyn)
+ {
+ int f;
+ char *m;
+***************
+*** 313,319 ****
+ #endif
+
+ int
+! OpenPTY(char **ttyn)
+ {
+ int f;
+ /* used for opening a new pty-pair: */
+--- 317,323 ----
+ #endif
+
+ int
+! mch_openpty(char **ttyn)
+ {
+ int f;
+ /* used for opening a new pty-pair: */
+***************
+*** 359,365 ****
+ # endif
+
+ int
+! OpenPTY(char **ttyn)
+ {
+ char *p, *q, *l, *d;
+ int f;
+--- 363,369 ----
+ # endif
+
+ int
+! mch_openpty(char **ttyn)
+ {
+ char *p, *q, *l, *d;
+ int f;
+***************
+*** 410,413 ****
+ }
+ #endif
+
+! #endif /* FEAT_GUI || FEAT_TERMINAL */
+--- 414,443 ----
+ }
+ #endif
+
+! /*
+! * Call isatty(fd), except for SunOS where it's done differently.
+! */
+! int
+! mch_isatty(int fd)
+! {
+! # if defined(I_STR) && defined(HAVE_SYS_PTMS_H) && defined(HAVE_SVR4_PTYS) \
+! && defined(SUN_SYSTEM)
+! // On SunOS, isatty() for /dev/ptmx returns false or sometimes can hang up
+! // in the inner ioctl(), and therefore first determine whether "fd" is a
+! // master device.
+! struct strioctl istr;
+!
+! istr.ic_cmd = ISPTM;
+! istr.ic_timout = 0;
+! istr.ic_dp = NULL;
+! istr.ic_len = 0;
+!
+! if (ioctl(fd, I_STR, &istr) == 0)
+! // Trick: return 2 in order to advice the caller that "fd" is a master
+! // device. cf. src/os_unix.c:get_tty_fd()
+! return 2;
+! # endif
+! return isatty(fd);
+! }
+!
+! #endif /* FEAT_GUI || FEAT_JOB_CHANNEL */
+*** ../vim-8.1.0823/src/terminal.c 2019-01-20 15:30:36.897328669 +0100
+--- src/terminal.c 2019-01-26 14:56:30.319399259 +0100
+***************
+*** 873,879 ****
+ {
+ int fd = term->tl_job->jv_channel->ch_part[parts[i]].ch_fd;
+
+! if (isatty(fd))
+ return parts[i];
+ }
+ #endif
+--- 873,879 ----
+ {
+ int fd = term->tl_job->jv_channel->ch_part[parts[i]].ch_fd;
+
+! if (mch_isatty(fd))
+ return parts[i];
+ }
+ #endif
+***************
+*** 2182,2188 ****
+ * them for every typed character is a bit of overhead, but it's needed
+ * for the first character typed, e.g. when Vim starts in a shell.
+ */
+! if (isatty(tty_fd))
+ {
+ ttyinfo_T info;
+
+--- 2182,2188 ----
+ * them for every typed character is a bit of overhead, but it's needed
+ * for the first character typed, e.g. when Vim starts in a shell.
+ */
+! if (mch_isatty(tty_fd))
+ {
+ ttyinfo_T info;
+
+***************
+*** 5882,5888 ****
+ for (part = PART_OUT; part < PART_COUNT; ++part)
+ {
+ fd = term->tl_job->jv_channel->ch_part[part].ch_fd;
+! if (isatty(fd))
+ break;
+ }
+ if (part < PART_COUNT && mch_report_winsize(fd, rows, cols) == OK)
+--- 5882,5888 ----
+ for (part = PART_OUT; part < PART_COUNT; ++part)
+ {
+ fd = term->tl_job->jv_channel->ch_part[part].ch_fd;
+! if (mch_isatty(fd))
+ break;
+ }
+ if (part < PART_COUNT && mch_report_winsize(fd, rows, cols) == OK)
+*** ../vim-8.1.0823/src/version.c 2019-01-26 14:11:15.083587014 +0100
+--- src/version.c 2019-01-26 15:11:16.690665449 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 824,
+ /**/
+
+--
+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.0825 b/data/vim/patches/8.1.0825
new file mode 100644
index 000000000..d3b00eb4e
--- /dev/null
+++ b/data/vim/patches/8.1.0825
@@ -0,0 +1,5747 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0825
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0825
+Problem: Code for autocommands is mixed with file I/O code.
+Solution: Move autocommand code to a separate file. (Yegappan Lakshmanan,
+ closes #3863)
+Files: Filelist, src/Make_bc5.mak, src/Make_cyg_ming.mak,
+ src/Make_dice.mak, src/Make_ivc.mak, src/Make_manx.mak,
+ src/Make_morph.mak, src/Make_mvc.mak, src/Make_sas.mak,
+ src/Make_vms.mms, src/Makefile, src/README.txt, src/autocmd.c,
+ src/fileio.c, src/globals.h, src/proto.h, src/proto/autocmd.pro,
+ src/proto/fileio.pro
+
+
+*** ../vim-8.1.0824/Filelist 2019-01-17 16:11:02.297811975 +0100
+--- Filelist 2019-01-26 15:16:55.565118541 +0100
+***************
+*** 14,19 ****
+--- 14,20 ----
+ src/arabic.c \
+ src/arabic.h \
+ src/ascii.h \
++ src/autocmd.c \
+ src/beval.c \
+ src/beval.h \
+ src/blob.c \
+***************
+*** 146,151 ****
+--- 147,153 ----
+ src/proto.h \
+ src/protodef.h \
+ src/proto/arabic.pro \
++ src/proto/autocmd.pro \
+ src/proto/beval.pro \
+ src/proto/blob.pro \
+ src/proto/blowfish.pro \
+*** ../vim-8.1.0824/src/Make_bc5.mak 2019-01-12 16:10:47.415360504 +0100
+--- src/Make_bc5.mak 2019-01-26 15:16:55.565118541 +0100
+***************
+*** 525,530 ****
+--- 525,531 ----
+
+ vimobj = \
+ $(OBJDIR)\arabic.obj \
++ $(OBJDIR)\autocmd.obj \
+ $(OBJDIR)\blowfish.obj \
+ $(OBJDIR)\buffer.obj \
+ $(OBJDIR)\charset.obj \
+*** ../vim-8.1.0824/src/Make_cyg_ming.mak 2019-01-12 22:47:01.256088105 +0100
+--- src/Make_cyg_ming.mak 2019-01-26 15:16:55.565118541 +0100
+***************
+*** 695,700 ****
+--- 695,701 ----
+ CUIOBJ = $(OUTDIR)/iscygpty.o
+ OBJ = \
+ $(OUTDIR)/arabic.o \
++ $(OUTDIR)/autocmd.o \
+ $(OUTDIR)/beval.o \
+ $(OUTDIR)/blob.o \
+ $(OUTDIR)/blowfish.o \
+*** ../vim-8.1.0824/src/Make_dice.mak 2019-01-01 13:20:05.936711257 +0100
+--- src/Make_dice.mak 2019-01-26 15:16:55.565118541 +0100
+***************
+*** 27,32 ****
+--- 27,33 ----
+
+ SRC = \
+ arabic.c \
++ autocmd.c \
+ blowfish.c \
+ buffer.c \
+ charset.c \
+***************
+*** 84,89 ****
+--- 85,91 ----
+ version.c
+
+ OBJ = o/arabic.o \
++ o/autocmd.o \
+ o/blowfish.o \
+ o/buffer.o \
+ o/charset.o \
+***************
+*** 161,166 ****
+--- 163,170 ----
+
+ o/arabic.o: arabic.c $(SYMS)
+
++ o/autocmd.o: autocmd.c $(SYMS)
++
+ o/blowfish.o: blowfish.c $(SYMS)
+
+ o/buffer.o: buffer.c $(SYMS)
+*** ../vim-8.1.0824/src/Make_ivc.mak 2019-01-01 13:20:05.936711257 +0100
+--- src/Make_ivc.mak 2019-01-26 15:16:55.565118541 +0100
+***************
+*** 211,216 ****
+--- 211,217 ----
+ LINK32_OBJS= \
+ $(EXTRAS) \
+ "$(INTDIR)/arabic.obj" \
++ "$(INTDIR)/autocmd.obj" \
+ "$(INTDIR)/blowfish.obj" \
+ "$(INTDIR)/buffer.obj" \
+ "$(INTDIR)/charset.obj" \
+***************
+*** 341,346 ****
+--- 342,351 ----
+ SOURCE=.\arabic.c
+ # End Source File
+ # Begin Source File
++ #
++ SOURCE=.\autocmd.c
++ # End Source File
++ # Begin Source File
+
+ SOURCE=.\blowfish.c
+ # End Source File
+*** ../vim-8.1.0824/src/Make_manx.mak 2019-01-01 13:20:05.936711257 +0100
+--- src/Make_manx.mak 2019-01-26 15:16:55.565118541 +0100
+***************
+*** 37,42 ****
+--- 37,43 ----
+ DEL = $(SHELL) -c rm -f
+
+ SRC = arabic.c \
++ autocmd.c \
+ blowfish.c \
+ buffer.c \
+ charset.c \
+***************
+*** 96,101 ****
+--- 97,103 ----
+ INCL = vim.h feature.h keymap.h macros.h ascii.h term.h structs.h os_amiga.h
+
+ OBJ = obj/arabic.o \
++ obj/autocmd.o \
+ obj/blowfish.o \
+ obj/buffer.o \
+ obj/charset.o \
+***************
+*** 153,158 ****
+--- 155,161 ----
+ $(TERMLIB)
+
+ PRO = proto/arabic.pro \
++ proto/autocmd.pro \
+ proto/blowfish.pro \
+ proto/buffer.pro \
+ proto/charset.pro \
+***************
+*** 256,261 ****
+--- 259,267 ----
+ obj/arabic.o: arabic.c
+ $(CCSYM) $@ arabic.c
+
++ obj/autocmd.o: autocmd.c
++ $(CCSYM) $@ autocmd.c
++
+ obj/blowfish.o: blowfish.c
+ $(CCSYM) $@ blowfish.c
+
+*** ../vim-8.1.0824/src/Make_morph.mak 2019-01-01 13:20:05.936711257 +0100
+--- src/Make_morph.mak 2019-01-26 15:16:55.565118541 +0100
+***************
+*** 25,30 ****
+--- 25,31 ----
+ ${CC} ${CFLAGS} $< -o $@
+
+ SRC = arabic.c \
++ autocmd.c \
+ blowfish.c \
+ buffer.c \
+ charset.c \
+*** ../vim-8.1.0824/src/Make_mvc.mak 2019-01-12 22:47:01.256088105 +0100
+--- src/Make_mvc.mak 2019-01-26 15:16:55.565118541 +0100
+***************
+*** 700,705 ****
+--- 700,706 ----
+
+ OBJ = \
+ $(OUTDIR)\arabic.obj \
++ $(OUTDIR)\autocmd.obj \
+ $(OUTDIR)\beval.obj \
+ $(OUTDIR)\blob.obj \
+ $(OUTDIR)\blowfish.obj \
+***************
+*** 1345,1350 ****
+--- 1346,1353 ----
+
+ $(OUTDIR)/arabic.obj: $(OUTDIR) arabic.c $(INCL)
+
++ $(OUTDIR)/autocmd.obj: $(OUTDIR) autocmd.c $(INCL)
++
+ $(OUTDIR)/beval.obj: $(OUTDIR) beval.c $(INCL)
+
+ $(OUTDIR)/blob.obj: $(OUTDIR) blob.c $(INCL)
+***************
+*** 1619,1624 ****
+--- 1622,1628 ----
+ # End Custom Build
+ proto.h: \
+ proto/arabic.pro \
++ proto/autocmd.pro \
+ proto/blob.pro \
+ proto/blowfish.pro \
+ proto/buffer.pro \
+*** ../vim-8.1.0824/src/Make_sas.mak 2019-01-01 13:20:05.936711257 +0100
+--- src/Make_sas.mak 2019-01-26 15:16:55.565118541 +0100
+***************
+*** 90,95 ****
+--- 90,96 ----
+
+ SRC = \
+ arabic.c \
++ autocmd.c \
+ blowfish.c \
+ buffer.c \
+ charset.c \
+***************
+*** 148,153 ****
+--- 149,155 ----
+
+ OBJ = \
+ arabic.o \
++ autocmd.o \
+ blowfish.o \
+ buffer.o \
+ charset.o \
+***************
+*** 206,211 ****
+--- 208,214 ----
+
+ PRO = \
+ proto/arabic.pro \
++ proto/autocmd.pro \
+ proto/blowfish.pro \
+ proto/buffer.pro \
+ proto/charset.pro \
+***************
+*** 319,324 ****
+--- 322,329 ----
+ # dependencies
+ arabic.o: arabic.c
+ proto/arabic.pro: arabic.c
++ autocmd.o: autocmd.c
++ proto/autocmd.pro: autocmd.c
+ blowfish.o: blowfish.c
+ proto/blowfish.pro: blowfish.c
+ buffer.o: buffer.c
+*** ../vim-8.1.0824/src/Make_vms.mms 2019-01-18 22:58:56.427995669 +0100
+--- src/Make_vms.mms 2019-01-26 15:16:55.569118519 +0100
+***************
+*** 312,318 ****
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+! SRC = arabic.c beval.obj blob.c blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c \
+ evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c \
+ getchar.c hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
+ misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+--- 312,318 ----
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+! SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c \
+ evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c \
+ getchar.c hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
+ misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+***************
+*** 321,327 ****
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+! OBJ = arabic.obj beval.obj blob.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj \
+ edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
+ if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+--- 321,327 ----
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+! OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj \
+ edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
+ if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+***************
+*** 500,505 ****
+--- 500,506 ----
+ .ENDIF
+
+ arabic.obj : arabic.c vim.h
++ autocmd.obj : autocmd.c vim.h [.auto]config.h feature.h os_unix.h
+ blowfish.obj : blowfish.c vim.h [.auto]config.h feature.h os_unix.h
+ blob.obj : blob.c vim.h [.auto]config.h feature.h os_unix.h
+ buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
+*** ../vim-8.1.0824/src/Makefile 2019-01-17 15:43:21.749878443 +0100
+--- src/Makefile 2019-01-26 15:16:55.569118519 +0100
+***************
+*** 1572,1577 ****
+--- 1571,1577 ----
+
+ BASIC_SRC = \
+ arabic.c \
++ autocmd.c \
+ beval.c \
+ blob.c \
+ blowfish.c \
+***************
+*** 1684,1689 ****
+--- 1684,1690 ----
+
+ OBJ_COMMON = \
+ objects/arabic.o \
++ objects/autocmd.o \
+ objects/beval.o \
+ objects/buffer.o \
+ objects/blob.o \
+***************
+*** 1809,1814 ****
+--- 1810,1816 ----
+
+ PRO_AUTO = \
+ arabic.pro \
++ autocmd.pro \
+ blowfish.pro \
+ buffer.pro \
+ charset.pro \
+***************
+*** 2934,2939 ****
+--- 2936,2944 ----
+ objects/arabic.o: arabic.c
+ $(CCC) -o $@ arabic.c
+
++ objects/autocmd.o: autocmd.c
++ $(CCC) -o $@ autocmd.c
++
+ objects/blob.o: blob.c
+ $(CCC) -o $@ blob.c
+
+***************
+*** 3376,3381 ****
+--- 3381,3390 ----
+ 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/autocmd.o: autocmd.c vim.h protodef.h auto/config.h feature.h \
++ os_unix.h os_mac.h ascii.h keymap.h term.h macros.h option.h beval.h \
++ 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 \
+*** ../vim-8.1.0824/src/README.txt 2019-01-01 13:20:05.936711257 +0100
+--- src/README.txt 2019-01-26 15:16:55.569118519 +0100
+***************
+*** 17,22 ****
+--- 17,23 ----
+ To jump to a file, move the cursor on its name and use the "gf" command.
+
+ Most code can be found in a file with an obvious name (incomplete list):
++ autocmd.c autocommands
+ buffer.c manipulating buffers (loaded files)
+ diff.c diff mode (vimdiff)
+ eval.c expression evaluation
+*** ../vim-8.1.0824/src/autocmd.c 2019-01-26 16:20:09.764993322 +0100
+--- src/autocmd.c 2019-01-26 16:07:47.061075397 +0100
+***************
+*** 0 ****
+--- 1,2579 ----
++ /* 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.
++ */
++
++ /*
++ * autocmd.c: Autocommand related functions
++ */
++
++ #include "vim.h"
++
++ /*
++ * The autocommands are stored in a list for each event.
++ * Autocommands for the same pattern, that are consecutive, are joined
++ * together, to avoid having to match the pattern too often.
++ * The result is an array of Autopat lists, which point to AutoCmd lists:
++ *
++ * last_autopat[0] -----------------------------+
++ * V
++ * first_autopat[0] --> Autopat.next --> Autopat.next --> NULL
++ * Autopat.cmds Autopat.cmds
++ * | |
++ * V V
++ * AutoCmd.next AutoCmd.next
++ * | |
++ * V V
++ * AutoCmd.next NULL
++ * |
++ * V
++ * NULL
++ *
++ * last_autopat[1] --------+
++ * V
++ * first_autopat[1] --> Autopat.next --> NULL
++ * Autopat.cmds
++ * |
++ * V
++ * AutoCmd.next
++ * |
++ * V
++ * NULL
++ * etc.
++ *
++ * The order of AutoCmds is important, this is the order in which they were
++ * defined and will have to be executed.
++ */
++ typedef struct AutoCmd
++ {
++ char_u *cmd; // The command to be executed (NULL
++ // when command has been removed).
++ 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;
++
++ typedef struct AutoPat
++ {
++ struct AutoPat *next; // Next AutoPat in AutoPat list; MUST
++ // be the first entry.
++ char_u *pat; // pattern as typed (NULL when pattern
++ // has been removed)
++ regprog_T *reg_prog; // compiled regprog for pattern
++ AutoCmd *cmds; // list of commands to do
++ int group; // group ID
++ int patlen; // strlen() of pat
++ int buflocal_nr; // !=0 for buffer-local AutoPat
++ char allow_dirs; // Pattern may match whole path
++ char last; // last pattern for apply_autocmds()
++ } AutoPat;
++
++ static struct event_name
++ {
++ char *name; // event name
++ event_T event; // event number
++ } event_names[] =
++ {
++ {"BufAdd", EVENT_BUFADD},
++ {"BufCreate", EVENT_BUFADD},
++ {"BufDelete", EVENT_BUFDELETE},
++ {"BufEnter", EVENT_BUFENTER},
++ {"BufFilePost", EVENT_BUFFILEPOST},
++ {"BufFilePre", EVENT_BUFFILEPRE},
++ {"BufHidden", EVENT_BUFHIDDEN},
++ {"BufLeave", EVENT_BUFLEAVE},
++ {"BufNew", EVENT_BUFNEW},
++ {"BufNewFile", EVENT_BUFNEWFILE},
++ {"BufRead", EVENT_BUFREADPOST},
++ {"BufReadCmd", EVENT_BUFREADCMD},
++ {"BufReadPost", EVENT_BUFREADPOST},
++ {"BufReadPre", EVENT_BUFREADPRE},
++ {"BufUnload", EVENT_BUFUNLOAD},
++ {"BufWinEnter", EVENT_BUFWINENTER},
++ {"BufWinLeave", EVENT_BUFWINLEAVE},
++ {"BufWipeout", EVENT_BUFWIPEOUT},
++ {"BufWrite", EVENT_BUFWRITEPRE},
++ {"BufWritePost", EVENT_BUFWRITEPOST},
++ {"BufWritePre", EVENT_BUFWRITEPRE},
++ {"BufWriteCmd", EVENT_BUFWRITECMD},
++ {"CmdlineChanged", EVENT_CMDLINECHANGED},
++ {"CmdlineEnter", EVENT_CMDLINEENTER},
++ {"CmdlineLeave", EVENT_CMDLINELEAVE},
++ {"CmdwinEnter", EVENT_CMDWINENTER},
++ {"CmdwinLeave", EVENT_CMDWINLEAVE},
++ {"CmdUndefined", EVENT_CMDUNDEFINED},
++ {"ColorScheme", EVENT_COLORSCHEME},
++ {"ColorSchemePre", EVENT_COLORSCHEMEPRE},
++ {"CompleteDone", EVENT_COMPLETEDONE},
++ {"CursorHold", EVENT_CURSORHOLD},
++ {"CursorHoldI", EVENT_CURSORHOLDI},
++ {"CursorMoved", EVENT_CURSORMOVED},
++ {"CursorMovedI", EVENT_CURSORMOVEDI},
++ {"DiffUpdated", EVENT_DIFFUPDATED},
++ {"DirChanged", EVENT_DIRCHANGED},
++ {"EncodingChanged", EVENT_ENCODINGCHANGED},
++ {"ExitPre", EVENT_EXITPRE},
++ {"FileEncoding", EVENT_ENCODINGCHANGED},
++ {"FileAppendPost", EVENT_FILEAPPENDPOST},
++ {"FileAppendPre", EVENT_FILEAPPENDPRE},
++ {"FileAppendCmd", EVENT_FILEAPPENDCMD},
++ {"FileChangedShell",EVENT_FILECHANGEDSHELL},
++ {"FileChangedShellPost",EVENT_FILECHANGEDSHELLPOST},
++ {"FileChangedRO", EVENT_FILECHANGEDRO},
++ {"FileReadPost", EVENT_FILEREADPOST},
++ {"FileReadPre", EVENT_FILEREADPRE},
++ {"FileReadCmd", EVENT_FILEREADCMD},
++ {"FileType", EVENT_FILETYPE},
++ {"FileWritePost", EVENT_FILEWRITEPOST},
++ {"FileWritePre", EVENT_FILEWRITEPRE},
++ {"FileWriteCmd", EVENT_FILEWRITECMD},
++ {"FilterReadPost", EVENT_FILTERREADPOST},
++ {"FilterReadPre", EVENT_FILTERREADPRE},
++ {"FilterWritePost", EVENT_FILTERWRITEPOST},
++ {"FilterWritePre", EVENT_FILTERWRITEPRE},
++ {"FocusGained", EVENT_FOCUSGAINED},
++ {"FocusLost", EVENT_FOCUSLOST},
++ {"FuncUndefined", EVENT_FUNCUNDEFINED},
++ {"GUIEnter", EVENT_GUIENTER},
++ {"GUIFailed", EVENT_GUIFAILED},
++ {"InsertChange", EVENT_INSERTCHANGE},
++ {"InsertEnter", EVENT_INSERTENTER},
++ {"InsertLeave", EVENT_INSERTLEAVE},
++ {"InsertCharPre", EVENT_INSERTCHARPRE},
++ {"MenuPopup", EVENT_MENUPOPUP},
++ {"OptionSet", EVENT_OPTIONSET},
++ {"QuickFixCmdPost", EVENT_QUICKFIXCMDPOST},
++ {"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE},
++ {"QuitPre", EVENT_QUITPRE},
++ {"RemoteReply", EVENT_REMOTEREPLY},
++ {"SessionLoadPost", EVENT_SESSIONLOADPOST},
++ {"ShellCmdPost", EVENT_SHELLCMDPOST},
++ {"ShellFilterPost", EVENT_SHELLFILTERPOST},
++ {"SourceCmd", EVENT_SOURCECMD},
++ {"SourcePre", EVENT_SOURCEPRE},
++ {"SourcePost", EVENT_SOURCEPOST},
++ {"SpellFileMissing",EVENT_SPELLFILEMISSING},
++ {"StdinReadPost", EVENT_STDINREADPOST},
++ {"StdinReadPre", EVENT_STDINREADPRE},
++ {"SwapExists", EVENT_SWAPEXISTS},
++ {"Syntax", EVENT_SYNTAX},
++ {"TabNew", EVENT_TABNEW},
++ {"TabClosed", EVENT_TABCLOSED},
++ {"TabEnter", EVENT_TABENTER},
++ {"TabLeave", EVENT_TABLEAVE},
++ {"TermChanged", EVENT_TERMCHANGED},
++ {"TerminalOpen", EVENT_TERMINALOPEN},
++ {"TermResponse", EVENT_TERMRESPONSE},
++ {"TextChanged", EVENT_TEXTCHANGED},
++ {"TextChangedI", EVENT_TEXTCHANGEDI},
++ {"TextChangedP", EVENT_TEXTCHANGEDP},
++ {"User", EVENT_USER},
++ {"VimEnter", EVENT_VIMENTER},
++ {"VimLeave", EVENT_VIMLEAVE},
++ {"VimLeavePre", EVENT_VIMLEAVEPRE},
++ {"WinNew", EVENT_WINNEW},
++ {"WinEnter", EVENT_WINENTER},
++ {"WinLeave", EVENT_WINLEAVE},
++ {"VimResized", EVENT_VIMRESIZED},
++ {"TextYankPost", EVENT_TEXTYANKPOST},
++ {NULL, (event_T)0}
++ };
++
++ static AutoPat *first_autopat[NUM_EVENTS] =
++ {
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
++ };
++
++ static AutoPat *last_autopat[NUM_EVENTS] =
++ {
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
++ };
++
++ #define AUGROUP_DEFAULT -1 // default autocmd group
++ #define AUGROUP_ERROR -2 // erroneous autocmd group
++ #define AUGROUP_ALL -3 // all autocmd groups
++
++ /*
++ * struct used to keep status while executing autocommands for an event.
++ */
++ typedef struct AutoPatCmd
++ {
++ AutoPat *curpat; // next AutoPat to examine
++ AutoCmd *nextcmd; // next AutoCmd to execute
++ int group; // group being used
++ char_u *fname; // fname to match with
++ char_u *sfname; // sfname to match with
++ char_u *tail; // tail of fname
++ event_T event; // current event
++ int arg_bufnr; // Initially equal to <abuf>, set to zero when
++ // buf is deleted.
++ struct AutoPatCmd *next; // chain of active apc-s for auto-invalidation
++ } AutoPatCmd;
++
++ static AutoPatCmd *active_apc_list = NULL; /* stack of active autocommands */
++
++ /*
++ * augroups stores a list of autocmd group names.
++ */
++ static garray_T augroups = {0, 0, sizeof(char_u *), 10, NULL};
++ #define AUGROUP_NAME(i) (((char_u **)augroups.ga_data)[i])
++ /* use get_deleted_augroup() to get this */
++ static char_u *deleted_augroup = NULL;
++
++ /*
++ * Set by the apply_autocmds_group function if the given event is equal to
++ * EVENT_FILETYPE. Used by the readfile function in order to determine if
++ * EVENT_BUFREADPOST triggered the EVENT_FILETYPE.
++ *
++ * Relying on this value requires one to reset it prior calling
++ * apply_autocmds_group.
++ */
++ int au_did_filetype INIT(= FALSE);
++
++ /*
++ * The ID of the current group. Group 0 is the default one.
++ */
++ static int current_augroup = AUGROUP_DEFAULT;
++
++ static int au_need_clean = FALSE; /* need to delete marked patterns */
++
++ static char_u *event_nr2name(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);
++ static void auto_next_pat(AutoPatCmd *apc, int stop_at_last);
++ static int au_find_group(char_u *name);
++
++ static event_T last_event;
++ static int last_group;
++ static int autocmd_blocked = 0; /* block all autocmds */
++
++ static char_u *
++ get_deleted_augroup(void)
++ {
++ if (deleted_augroup == NULL)
++ deleted_augroup = (char_u *)_("--Deleted--");
++ return deleted_augroup;
++ }
++
++ /*
++ * Show the autocommands for one AutoPat.
++ */
++ static void
++ show_autocmd(AutoPat *ap, event_T event)
++ {
++ AutoCmd *ac;
++
++ // Check for "got_int" (here and at various places below), which is set
++ // when "q" has been hit for the "--more--" prompt
++ if (got_int)
++ return;
++ if (ap->pat == NULL) // pattern has been removed
++ return;
++
++ msg_putchar('\n');
++ if (got_int)
++ return;
++ if (event != last_event || ap->group != last_group)
++ {
++ if (ap->group != AUGROUP_DEFAULT)
++ {
++ if (AUGROUP_NAME(ap->group) == NULL)
++ msg_puts_attr((char *)get_deleted_augroup(), HL_ATTR(HLF_E));
++ else
++ msg_puts_attr((char *)AUGROUP_NAME(ap->group), HL_ATTR(HLF_T));
++ msg_puts(" ");
++ }
++ msg_puts_attr((char *)event_nr2name(event), HL_ATTR(HLF_T));
++ last_event = event;
++ last_group = ap->group;
++ msg_putchar('\n');
++ if (got_int)
++ return;
++ }
++ msg_col = 4;
++ msg_outtrans(ap->pat);
++
++ for (ac = ap->cmds; ac != NULL; ac = ac->next)
++ {
++ if (ac->cmd != NULL) // skip removed commands
++ {
++ if (msg_col >= 14)
++ msg_putchar('\n');
++ msg_col = 14;
++ if (got_int)
++ return;
++ msg_outtrans(ac->cmd);
++ #ifdef FEAT_EVAL
++ if (p_verbose > 0)
++ last_set_msg(ac->script_ctx);
++ #endif
++ if (got_int)
++ return;
++ if (ac->next != NULL)
++ {
++ msg_putchar('\n');
++ if (got_int)
++ return;
++ }
++ }
++ }
++ }
++
++ /*
++ * Mark an autocommand pattern for deletion.
++ */
++ static void
++ au_remove_pat(AutoPat *ap)
++ {
++ VIM_CLEAR(ap->pat);
++ ap->buflocal_nr = -1;
++ au_need_clean = TRUE;
++ }
++
++ /*
++ * Mark all commands for a pattern for deletion.
++ */
++ static void
++ au_remove_cmds(AutoPat *ap)
++ {
++ AutoCmd *ac;
++
++ for (ac = ap->cmds; ac != NULL; ac = ac->next)
++ VIM_CLEAR(ac->cmd);
++ au_need_clean = TRUE;
++ }
++
++ /*
++ * Cleanup autocommands and patterns that have been deleted.
++ * This is only done when not executing autocommands.
++ */
++ static void
++ au_cleanup(void)
++ {
++ AutoPat *ap, **prev_ap;
++ AutoCmd *ac, **prev_ac;
++ event_T event;
++
++ if (autocmd_busy || !au_need_clean)
++ return;
++
++ // loop over all events
++ for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
++ event = (event_T)((int)event + 1))
++ {
++ // loop over all autocommand patterns
++ prev_ap = &(first_autopat[(int)event]);
++ for (ap = *prev_ap; ap != NULL; ap = *prev_ap)
++ {
++ // loop over all commands for this pattern
++ prev_ac = &(ap->cmds);
++ for (ac = *prev_ac; ac != NULL; ac = *prev_ac)
++ {
++ // remove the command if the pattern is to be deleted or when
++ // the command has been marked for deletion
++ if (ap->pat == NULL || ac->cmd == NULL)
++ {
++ *prev_ac = ac->next;
++ vim_free(ac->cmd);
++ vim_free(ac);
++ }
++ else
++ prev_ac = &(ac->next);
++ }
++
++ // remove the pattern if it has been marked for deletion
++ if (ap->pat == NULL)
++ {
++ if (ap->next == NULL)
++ {
++ if (prev_ap == &(first_autopat[(int)event]))
++ last_autopat[(int)event] = NULL;
++ else
++ // this depends on the "next" field being the first in
++ // the struct
++ last_autopat[(int)event] = (AutoPat *)prev_ap;
++ }
++ *prev_ap = ap->next;
++ vim_regfree(ap->reg_prog);
++ vim_free(ap);
++ }
++ else
++ prev_ap = &(ap->next);
++ }
++ }
++
++ au_need_clean = FALSE;
++ }
++
++ /*
++ * Called when buffer is freed, to remove/invalidate related buffer-local
++ * autocmds.
++ */
++ void
++ aubuflocal_remove(buf_T *buf)
++ {
++ AutoPat *ap;
++ event_T event;
++ AutoPatCmd *apc;
++
++ // invalidate currently executing autocommands
++ for (apc = active_apc_list; apc; apc = apc->next)
++ if (buf->b_fnum == apc->arg_bufnr)
++ apc->arg_bufnr = 0;
++
++ // invalidate buflocals looping through events
++ for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
++ event = (event_T)((int)event + 1))
++ // loop over all autocommand patterns
++ for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
++ if (ap->buflocal_nr == buf->b_fnum)
++ {
++ au_remove_pat(ap);
++ if (p_verbose >= 6)
++ {
++ verbose_enter();
++ smsg(_("auto-removing autocommand: %s <buffer=%d>"),
++ event_nr2name(event), buf->b_fnum);
++ verbose_leave();
++ }
++ }
++ au_cleanup();
++ }
++
++ /*
++ * Add an autocmd group name.
++ * Return its ID. Returns AUGROUP_ERROR (< 0) for error.
++ */
++ static int
++ au_new_group(char_u *name)
++ {
++ int i;
++
++ i = au_find_group(name);
++ if (i == AUGROUP_ERROR) // the group doesn't exist yet, add it
++ {
++ // First try using a free entry.
++ for (i = 0; i < augroups.ga_len; ++i)
++ if (AUGROUP_NAME(i) == NULL)
++ break;
++ if (i == augroups.ga_len && ga_grow(&augroups, 1) == FAIL)
++ return AUGROUP_ERROR;
++
++ AUGROUP_NAME(i) = vim_strsave(name);
++ if (AUGROUP_NAME(i) == NULL)
++ return AUGROUP_ERROR;
++ if (i == augroups.ga_len)
++ ++augroups.ga_len;
++ }
++
++ return i;
++ }
++
++ static void
++ au_del_group(char_u *name)
++ {
++ int i;
++
++ i = au_find_group(name);
++ if (i == AUGROUP_ERROR) // the group doesn't exist
++ semsg(_("E367: No such group: \"%s\""), name);
++ else if (i == current_augroup)
++ emsg(_("E936: Cannot delete the current group"));
++ else
++ {
++ event_T event;
++ AutoPat *ap;
++ int in_use = FALSE;
++
++ for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
++ event = (event_T)((int)event + 1))
++ {
++ for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
++ if (ap->group == i && ap->pat != NULL)
++ {
++ give_warning((char_u *)_("W19: Deleting augroup that is still in use"), TRUE);
++ in_use = TRUE;
++ event = NUM_EVENTS;
++ break;
++ }
++ }
++ vim_free(AUGROUP_NAME(i));
++ if (in_use)
++ {
++ AUGROUP_NAME(i) = get_deleted_augroup();
++ }
++ else
++ AUGROUP_NAME(i) = NULL;
++ }
++ }
++
++ /*
++ * 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)
++ {
++ int i;
++
++ for (i = 0; i < augroups.ga_len; ++i)
++ if (AUGROUP_NAME(i) != NULL && AUGROUP_NAME(i) != get_deleted_augroup()
++ && STRCMP(AUGROUP_NAME(i), name) == 0)
++ return i;
++ return AUGROUP_ERROR;
++ }
++
++ /*
++ * Return TRUE if augroup "name" exists.
++ */
++ int
++ au_has_group(char_u *name)
++ {
++ return au_find_group(name) != AUGROUP_ERROR;
++ }
++
++ /*
++ * ":augroup {name}".
++ */
++ void
++ do_augroup(char_u *arg, int del_group)
++ {
++ int i;
++
++ if (del_group)
++ {
++ if (*arg == NUL)
++ emsg(_(e_argreq));
++ else
++ au_del_group(arg);
++ }
++ else if (STRICMP(arg, "end") == 0) // ":aug end": back to group 0
++ current_augroup = AUGROUP_DEFAULT;
++ else if (*arg) // ":aug xxx": switch to group xxx
++ {
++ i = au_new_group(arg);
++ if (i != AUGROUP_ERROR)
++ current_augroup = i;
++ }
++ else // ":aug": list the group names
++ {
++ msg_start();
++ for (i = 0; i < augroups.ga_len; ++i)
++ {
++ if (AUGROUP_NAME(i) != NULL)
++ {
++ msg_puts((char *)AUGROUP_NAME(i));
++ msg_puts(" ");
++ }
++ }
++ msg_clr_eos();
++ msg_end();
++ }
++ }
++
++ #if defined(EXITFREE) || defined(PROTO)
++ void
++ free_all_autocmds(void)
++ {
++ int i;
++ char_u *s;
++
++ for (current_augroup = -1; current_augroup < augroups.ga_len;
++ ++current_augroup)
++ do_autocmd((char_u *)"", TRUE);
++
++ for (i = 0; i < augroups.ga_len; ++i)
++ {
++ s = ((char_u **)(augroups.ga_data))[i];
++ if (s != get_deleted_augroup())
++ vim_free(s);
++ }
++ ga_clear(&augroups);
++ }
++ #endif
++
++ /*
++ * Return the event number for event name "start".
++ * Return NUM_EVENTS if the event name was not found.
++ * Return a pointer to the next event name in "end".
++ */
++ static event_T
++ event_name2nr(char_u *start, char_u **end)
++ {
++ char_u *p;
++ int i;
++ int len;
++
++ // the event name ends with end of line, '|', a blank or a comma
++ for (p = start; *p && !VIM_ISWHITE(*p) && *p != ',' && *p != '|'; ++p)
++ ;
++ for (i = 0; event_names[i].name != NULL; ++i)
++ {
++ len = (int)STRLEN(event_names[i].name);
++ if (len == p - start && STRNICMP(event_names[i].name, start, len) == 0)
++ break;
++ }
++ if (*p == ',')
++ ++p;
++ *end = p;
++ if (event_names[i].name == NULL)
++ return NUM_EVENTS;
++ return event_names[i].event;
++ }
++
++ /*
++ * Return the name for event "event".
++ */
++ static char_u *
++ event_nr2name(event_T event)
++ {
++ int i;
++
++ for (i = 0; event_names[i].name != NULL; ++i)
++ if (event_names[i].event == event)
++ return (char_u *)event_names[i].name;
++ return (char_u *)"Unknown";
++ }
++
++ /*
++ * Scan over the events. "*" stands for all events.
++ */
++ static char_u *
++ find_end_event(
++ char_u *arg,
++ int have_group) // TRUE when group name was found
++ {
++ char_u *pat;
++ char_u *p;
++
++ if (*arg == '*')
++ {
++ if (arg[1] && !VIM_ISWHITE(arg[1]))
++ {
++ semsg(_("E215: Illegal character after *: %s"), arg);
++ return NULL;
++ }
++ pat = arg + 1;
++ }
++ else
++ {
++ for (pat = arg; *pat && *pat != '|' && !VIM_ISWHITE(*pat); pat = p)
++ {
++ if ((int)event_name2nr(pat, &p) >= (int)NUM_EVENTS)
++ {
++ if (have_group)
++ semsg(_("E216: No such event: %s"), pat);
++ else
++ semsg(_("E216: No such group or event: %s"), pat);
++ return NULL;
++ }
++ }
++ }
++ return pat;
++ }
++
++ /*
++ * Return TRUE if "event" is included in 'eventignore'.
++ */
++ static int
++ event_ignored(event_T event)
++ {
++ char_u *p = p_ei;
++
++ while (*p != NUL)
++ {
++ if (STRNICMP(p, "all", 3) == 0 && (p[3] == NUL || p[3] == ','))
++ return TRUE;
++ if (event_name2nr(p, &p) == event)
++ return TRUE;
++ }
++
++ return FALSE;
++ }
++
++ /*
++ * Return OK when the contents of p_ei is valid, FAIL otherwise.
++ */
++ int
++ check_ei(void)
++ {
++ char_u *p = p_ei;
++
++ while (*p)
++ {
++ if (STRNICMP(p, "all", 3) == 0 && (p[3] == NUL || p[3] == ','))
++ {
++ p += 3;
++ if (*p == ',')
++ ++p;
++ }
++ else if (event_name2nr(p, &p) == NUM_EVENTS)
++ return FAIL;
++ }
++
++ return OK;
++ }
++
++ # if defined(FEAT_SYN_HL) || defined(PROTO)
++
++ /*
++ * Add "what" to 'eventignore' to skip loading syntax highlighting for every
++ * buffer loaded into the window. "what" must start with a comma.
++ * Returns the old value of 'eventignore' in allocated memory.
++ */
++ char_u *
++ au_event_disable(char *what)
++ {
++ char_u *new_ei;
++ char_u *save_ei;
++
++ save_ei = vim_strsave(p_ei);
++ if (save_ei != NULL)
++ {
++ new_ei = vim_strnsave(p_ei, (int)(STRLEN(p_ei) + STRLEN(what)));
++ if (new_ei != NULL)
++ {
++ if (*what == ',' && *p_ei == NUL)
++ STRCPY(new_ei, what + 1);
++ else
++ STRCAT(new_ei, what);
++ set_string_option_direct((char_u *)"ei", -1, new_ei,
++ OPT_FREE, SID_NONE);
++ vim_free(new_ei);
++ }
++ }
++ return save_ei;
++ }
++
++ void
++ au_event_restore(char_u *old_ei)
++ {
++ if (old_ei != NULL)
++ {
++ set_string_option_direct((char_u *)"ei", -1, old_ei,
++ OPT_FREE, SID_NONE);
++ vim_free(old_ei);
++ }
++ }
++ # endif /* FEAT_SYN_HL */
++
++ /*
++ * do_autocmd() -- implements the :autocmd command. Can be used in the
++ * following ways:
++ *
++ * :autocmd <event> <pat> <cmd> Add <cmd> to the list of commands that
++ * will be automatically executed for <event>
++ * when editing a file matching <pat>, in
++ * the current group.
++ * :autocmd <event> <pat> Show the autocommands associated with
++ * <event> and <pat>.
++ * :autocmd <event> Show the autocommands associated with
++ * <event>.
++ * :autocmd Show all autocommands.
++ * :autocmd! <event> <pat> <cmd> Remove all autocommands associated with
++ * <event> and <pat>, and add the command
++ * <cmd>, for the current group.
++ * :autocmd! <event> <pat> Remove all autocommands associated with
++ * <event> and <pat> for the current group.
++ * :autocmd! <event> Remove all autocommands associated with
++ * <event> for the current group.
++ * :autocmd! Remove ALL autocommands for the current
++ * group.
++ *
++ * Multiple events and patterns may be given separated by commas. Here are
++ * some examples:
++ * :autocmd bufread,bufenter *.c,*.h set tw=0 smartindent noic
++ * :autocmd bufleave * set tw=79 nosmartindent ic infercase
++ *
++ * :autocmd * *.c show all autocommands for *.c files.
++ *
++ * Mostly a {group} argument can optionally appear before <event>.
++ */
++ void
++ do_autocmd(char_u *arg_in, int forceit)
++ {
++ char_u *arg = arg_in;
++ char_u *pat;
++ char_u *envpat = NULL;
++ char_u *cmd;
++ event_T event;
++ int need_free = FALSE;
++ int nested = FALSE;
++ int group;
++
++ if (*arg == '|')
++ {
++ arg = (char_u *)"";
++ group = AUGROUP_ALL; // no argument, use all groups
++ }
++ else
++ {
++ /*
++ * Check for a legal group name. If not, use AUGROUP_ALL.
++ */
++ group = au_get_grouparg(&arg);
++ if (arg == NULL) // out of memory
++ return;
++ }
++
++ /*
++ * Scan over the events.
++ * If we find an illegal name, return here, don't do anything.
++ */
++ pat = find_end_event(arg, group != AUGROUP_ALL);
++ if (pat == NULL)
++ return;
++
++ pat = skipwhite(pat);
++ if (*pat == '|')
++ {
++ pat = (char_u *)"";
++ cmd = (char_u *)"";
++ }
++ else
++ {
++ /*
++ * Scan over the pattern. Put a NUL at the end.
++ */
++ cmd = pat;
++ while (*cmd && (!VIM_ISWHITE(*cmd) || cmd[-1] == '\\'))
++ cmd++;
++ if (*cmd)
++ *cmd++ = NUL;
++
++ // Expand environment variables in the pattern. Set 'shellslash', we
++ // want forward slashes here.
++ if (vim_strchr(pat, '$') != NULL || vim_strchr(pat, '~') != NULL)
++ {
++ #ifdef BACKSLASH_IN_FILENAME
++ int p_ssl_save = p_ssl;
++
++ p_ssl = TRUE;
++ #endif
++ envpat = expand_env_save(pat);
++ #ifdef BACKSLASH_IN_FILENAME
++ p_ssl = p_ssl_save;
++ #endif
++ if (envpat != NULL)
++ pat = envpat;
++ }
++
++ /*
++ * Check for "nested" flag.
++ */
++ cmd = skipwhite(cmd);
++ if (*cmd != NUL && STRNCMP(cmd, "nested", 6) == 0
++ && VIM_ISWHITE(cmd[6]))
++ {
++ nested = TRUE;
++ cmd = skipwhite(cmd + 6);
++ }
++
++ /*
++ * Find the start of the commands.
++ * Expand <sfile> in it.
++ */
++ if (*cmd != NUL)
++ {
++ cmd = expand_sfile(cmd);
++ if (cmd == NULL) // some error
++ return;
++ need_free = TRUE;
++ }
++ }
++
++ /*
++ * Print header when showing autocommands.
++ */
++ if (!forceit && *cmd == NUL)
++ // Highlight title
++ msg_puts_title(_("\n--- Autocommands ---"));
++
++ /*
++ * Loop over the events.
++ */
++ last_event = (event_T)-1; // for listing the event name
++ last_group = AUGROUP_ERROR; // for listing the group name
++ if (*arg == '*' || *arg == NUL || *arg == '|')
++ {
++ for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
++ event = (event_T)((int)event + 1))
++ if (do_autocmd_event(event, pat,
++ nested, cmd, forceit, group) == FAIL)
++ break;
++ }
++ else
++ {
++ while (*arg && *arg != '|' && !VIM_ISWHITE(*arg))
++ if (do_autocmd_event(event_name2nr(arg, &arg), pat,
++ nested, cmd, forceit, group) == FAIL)
++ break;
++ }
++
++ if (need_free)
++ vim_free(cmd);
++ vim_free(envpat);
++ }
++
++ /*
++ * Find the group ID in a ":autocmd" or ":doautocmd" argument.
++ * The "argp" argument is advanced to the following argument.
++ *
++ * Returns the group ID, AUGROUP_ERROR for error (out of memory).
++ */
++ static int
++ au_get_grouparg(char_u **argp)
++ {
++ char_u *group_name;
++ char_u *p;
++ char_u *arg = *argp;
++ int group = AUGROUP_ALL;
++
++ for (p = arg; *p && !VIM_ISWHITE(*p) && *p != '|'; ++p)
++ ;
++ if (p > arg)
++ {
++ group_name = vim_strnsave(arg, (int)(p - arg));
++ if (group_name == NULL) // out of memory
++ return AUGROUP_ERROR;
++ group = au_find_group(group_name);
++ if (group == AUGROUP_ERROR)
++ group = AUGROUP_ALL; // no match, use all groups
++ else
++ *argp = skipwhite(p); // match, skip over group name
++ vim_free(group_name);
++ }
++ return group;
++ }
++
++ /*
++ * do_autocmd() for one event.
++ * If *pat == NUL do for all patterns.
++ * If *cmd == NUL show entries.
++ * If forceit == TRUE delete entries.
++ * If group is not AUGROUP_ALL, only use this group.
++ */
++ static int
++ do_autocmd_event(
++ event_T event,
++ char_u *pat,
++ int nested,
++ char_u *cmd,
++ int forceit,
++ int group)
++ {
++ AutoPat *ap;
++ AutoPat **prev_ap;
++ AutoCmd *ac;
++ AutoCmd **prev_ac;
++ int brace_level;
++ char_u *endpat;
++ int findgroup;
++ int allgroups;
++ int patlen;
++ int is_buflocal;
++ int buflocal_nr;
++ char_u buflocal_pat[25]; /* for "<buffer=X>" */
++
++ if (group == AUGROUP_ALL)
++ findgroup = current_augroup;
++ else
++ findgroup = group;
++ allgroups = (group == AUGROUP_ALL && !forceit && *cmd == NUL);
++
++ /*
++ * Show or delete all patterns for an event.
++ */
++ if (*pat == NUL)
++ {
++ for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
++ {
++ if (forceit) // delete the AutoPat, if it's in the current group
++ {
++ if (ap->group == findgroup)
++ au_remove_pat(ap);
++ }
++ else if (group == AUGROUP_ALL || ap->group == group)
++ show_autocmd(ap, event);
++ }
++ }
++
++ /*
++ * Loop through all the specified patterns.
++ */
++ for ( ; *pat; pat = (*endpat == ',' ? endpat + 1 : endpat))
++ {
++ /*
++ * Find end of the pattern.
++ * Watch out for a comma in braces, like "*.\{obj,o\}".
++ */
++ brace_level = 0;
++ for (endpat = pat; *endpat && (*endpat != ',' || brace_level
++ || (endpat > pat && endpat[-1] == '\\')); ++endpat)
++ {
++ if (*endpat == '{')
++ brace_level++;
++ else if (*endpat == '}')
++ brace_level--;
++ }
++ if (pat == endpat) // ignore single comma
++ continue;
++ patlen = (int)(endpat - pat);
++
++ /*
++ * detect special <buflocal[=X]> buffer-local patterns
++ */
++ is_buflocal = FALSE;
++ buflocal_nr = 0;
++
++ if (patlen >= 8 && STRNCMP(pat, "<buffer", 7) == 0
++ && pat[patlen - 1] == '>')
++ {
++ // "<buffer...>": Error will be printed only for addition.
++ // printing and removing will proceed silently.
++ is_buflocal = TRUE;
++ if (patlen == 8)
++ // "<buffer>"
++ buflocal_nr = curbuf->b_fnum;
++ else if (patlen > 9 && pat[7] == '=')
++ {
++ if (patlen == 13 && STRNICMP(pat, "<buffer=abuf>", 13) == 0)
++ // "<buffer=abuf>"
++ buflocal_nr = autocmd_bufnr;
++ else if (skipdigits(pat + 8) == pat + patlen - 1)
++ // "<buffer=123>"
++ buflocal_nr = atoi((char *)pat + 8);
++ }
++ }
++
++ if (is_buflocal)
++ {
++ // normalize pat into standard "<buffer>#N" form
++ sprintf((char *)buflocal_pat, "<buffer=%d>", buflocal_nr);
++ pat = buflocal_pat; // can modify pat and patlen
++ patlen = (int)STRLEN(buflocal_pat); // but not endpat
++ }
++
++ /*
++ * Find AutoPat entries with this pattern. When adding a command it
++ * always goes at or after the last one, so start at the end.
++ */
++ if (!forceit && *cmd != NUL && last_autopat[(int)event] != NULL)
++ prev_ap = &last_autopat[(int)event];
++ else
++ prev_ap = &first_autopat[(int)event];
++ while ((ap = *prev_ap) != NULL)
++ {
++ if (ap->pat != NULL)
++ {
++ /* Accept a pattern when:
++ * - a group was specified and it's that group, or a group was
++ * not specified and it's the current group, or a group was
++ * not specified and we are listing
++ * - the length of the pattern matches
++ * - the pattern matches.
++ * For <buffer[=X]>, this condition works because we normalize
++ * all buffer-local patterns.
++ */
++ if ((allgroups || ap->group == findgroup)
++ && ap->patlen == patlen
++ && STRNCMP(pat, ap->pat, patlen) == 0)
++ {
++ /*
++ * Remove existing autocommands.
++ * If adding any new autocmd's for this AutoPat, don't
++ * delete the pattern from the autopat list, append to
++ * this list.
++ */
++ if (forceit)
++ {
++ if (*cmd != NUL && ap->next == NULL)
++ {
++ au_remove_cmds(ap);
++ break;
++ }
++ au_remove_pat(ap);
++ }
++
++ /*
++ * Show autocmd's for this autopat, or buflocals <buffer=X>
++ */
++ else if (*cmd == NUL)
++ show_autocmd(ap, event);
++
++ /*
++ * Add autocmd to this autopat, if it's the last one.
++ */
++ else if (ap->next == NULL)
++ break;
++ }
++ }
++ prev_ap = &ap->next;
++ }
++
++ /*
++ * Add a new command.
++ */
++ if (*cmd != NUL)
++ {
++ /*
++ * If the pattern we want to add a command to does appear at the
++ * end of the list (or not is not in the list at all), add the
++ * pattern at the end of the list.
++ */
++ if (ap == NULL)
++ {
++ /* refuse to add buffer-local ap if buffer number is invalid */
++ if (is_buflocal && (buflocal_nr == 0
++ || buflist_findnr(buflocal_nr) == NULL))
++ {
++ semsg(_("E680: <buffer=%d>: invalid buffer number "),
++ buflocal_nr);
++ return FAIL;
++ }
++
++ ap = (AutoPat *)alloc((unsigned)sizeof(AutoPat));
++ if (ap == NULL)
++ return FAIL;
++ ap->pat = vim_strnsave(pat, patlen);
++ ap->patlen = patlen;
++ if (ap->pat == NULL)
++ {
++ vim_free(ap);
++ return FAIL;
++ }
++
++ if (is_buflocal)
++ {
++ ap->buflocal_nr = buflocal_nr;
++ ap->reg_prog = NULL;
++ }
++ else
++ {
++ char_u *reg_pat;
++
++ ap->buflocal_nr = 0;
++ reg_pat = file_pat_to_reg_pat(pat, endpat,
++ &ap->allow_dirs, TRUE);
++ if (reg_pat != NULL)
++ ap->reg_prog = vim_regcomp(reg_pat, RE_MAGIC);
++ vim_free(reg_pat);
++ if (reg_pat == NULL || ap->reg_prog == NULL)
++ {
++ vim_free(ap->pat);
++ vim_free(ap);
++ return FAIL;
++ }
++ }
++ ap->cmds = NULL;
++ *prev_ap = ap;
++ last_autopat[(int)event] = ap;
++ ap->next = NULL;
++ if (group == AUGROUP_ALL)
++ ap->group = current_augroup;
++ else
++ ap->group = group;
++ }
++
++ /*
++ * Add the autocmd at the end of the AutoCmd list.
++ */
++ prev_ac = &(ap->cmds);
++ while ((ac = *prev_ac) != NULL)
++ prev_ac = &ac->next;
++ ac = (AutoCmd *)alloc((unsigned)sizeof(AutoCmd));
++ if (ac == NULL)
++ 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)
++ {
++ vim_free(ac);
++ return FAIL;
++ }
++ ac->next = NULL;
++ *prev_ac = ac;
++ ac->nested = nested;
++ }
++ }
++
++ au_cleanup(); // may really delete removed patterns/commands now
++ return OK;
++ }
++
++ /*
++ * Implementation of ":doautocmd [group] event [fname]".
++ * Return OK for success, FAIL for failure;
++ */
++ int
++ do_doautocmd(
++ char_u *arg,
++ int do_msg, // give message for no matching autocmds?
++ int *did_something)
++ {
++ char_u *fname;
++ int nothing_done = TRUE;
++ int group;
++
++ if (did_something != NULL)
++ *did_something = FALSE;
++
++ /*
++ * Check for a legal group name. If not, use AUGROUP_ALL.
++ */
++ group = au_get_grouparg(&arg);
++ if (arg == NULL) // out of memory
++ return FAIL;
++
++ if (*arg == '*')
++ {
++ emsg(_("E217: Can't execute autocommands for ALL events"));
++ return FAIL;
++ }
++
++ /*
++ * Scan over the events.
++ * If we find an illegal name, return here, don't do anything.
++ */
++ fname = find_end_event(arg, group != AUGROUP_ALL);
++ if (fname == NULL)
++ return FAIL;
++
++ fname = skipwhite(fname);
++
++ /*
++ * Loop over the events.
++ */
++ while (*arg && !ends_excmd(*arg) && !VIM_ISWHITE(*arg))
++ if (apply_autocmds_group(event_name2nr(arg, &arg),
++ fname, NULL, TRUE, group, curbuf, NULL))
++ nothing_done = FALSE;
++
++ if (nothing_done && do_msg)
++ msg(_("No matching autocommands"));
++ if (did_something != NULL)
++ *did_something = !nothing_done;
++
++ #ifdef FEAT_EVAL
++ return aborting() ? FAIL : OK;
++ #else
++ return OK;
++ #endif
++ }
++
++ /*
++ * ":doautoall": execute autocommands for each loaded buffer.
++ */
++ void
++ ex_doautoall(exarg_T *eap)
++ {
++ int retval;
++ aco_save_T aco;
++ buf_T *buf;
++ bufref_T bufref;
++ char_u *arg = eap->arg;
++ int call_do_modelines = check_nomodeline(&arg);
++ int did_aucmd;
++
++ /*
++ * This is a bit tricky: For some commands curwin->w_buffer needs to be
++ * equal to curbuf, but for some buffers there may not be a window.
++ * So we change the buffer for the current window for a moment. This
++ * gives problems when the autocommands make changes to the list of
++ * buffers or windows...
++ */
++ FOR_ALL_BUFFERS(buf)
++ {
++ if (buf->b_ml.ml_mfp != NULL)
++ {
++ // find a window for this buffer and save some values
++ aucmd_prepbuf(&aco, buf);
++ set_bufref(&bufref, buf);
++
++ // execute the autocommands for this buffer
++ retval = do_doautocmd(arg, FALSE, &did_aucmd);
++
++ if (call_do_modelines && did_aucmd)
++ {
++ // Execute the modeline settings, but don't set window-local
++ // options if we are using the current window for another
++ // buffer.
++ do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0);
++ }
++
++ // restore the current window
++ aucmd_restbuf(&aco);
++
++ // stop if there is some error or buffer was deleted
++ if (retval == FAIL || !bufref_valid(&bufref))
++ break;
++ }
++ }
++
++ check_cursor(); // just in case lines got deleted
++ }
++
++ /*
++ * Check *argp for <nomodeline>. When it is present return FALSE, otherwise
++ * return TRUE and advance *argp to after it.
++ * Thus return TRUE when do_modelines() should be called.
++ */
++ int
++ check_nomodeline(char_u **argp)
++ {
++ if (STRNCMP(*argp, "<nomodeline>", 12) == 0)
++ {
++ *argp = skipwhite(*argp + 12);
++ return FALSE;
++ }
++ return TRUE;
++ }
++
++ /*
++ * Prepare for executing autocommands for (hidden) buffer "buf".
++ * Search for a visible window containing the current buffer. If there isn't
++ * one then use "aucmd_win".
++ * Set "curbuf" and "curwin" to match "buf".
++ */
++ void
++ aucmd_prepbuf(
++ aco_save_T *aco, // structure to save values in
++ buf_T *buf) // new curbuf
++ {
++ win_T *win;
++ int save_ea;
++ #ifdef FEAT_AUTOCHDIR
++ int save_acd;
++ #endif
++
++ // Find a window that is for the new buffer
++ if (buf == curbuf) // be quick when buf is curbuf
++ win = curwin;
++ else
++ FOR_ALL_WINDOWS(win)
++ if (win->w_buffer == buf)
++ break;
++
++ // Allocate "aucmd_win" when needed. If this fails (out of memory) fall
++ // back to using the current window.
++ if (win == NULL && aucmd_win == NULL)
++ {
++ win_alloc_aucmd_win();
++ if (aucmd_win == NULL)
++ win = curwin;
++ }
++ if (win == NULL && aucmd_win_used)
++ // Strange recursive autocommand, fall back to using the current
++ // window. Expect a few side effects...
++ win = curwin;
++
++ aco->save_curwin = curwin;
++ aco->save_curbuf = curbuf;
++ aco->save_prevwin = prevwin;
++ if (win != NULL)
++ {
++ // There is a window for "buf" in the current tab page, make it the
++ // curwin. This is preferred, it has the least side effects (esp. if
++ // "buf" is curbuf).
++ aco->use_aucmd_win = FALSE;
++ curwin = win;
++ }
++ else
++ {
++ // There is no window for "buf", use "aucmd_win". To minimize the side
++ // effects, insert it in the current tab page.
++ // Anything related to a window (e.g., setting folds) may have
++ // unexpected results.
++ aco->use_aucmd_win = TRUE;
++ aucmd_win_used = TRUE;
++ aucmd_win->w_buffer = buf;
++ #if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
++ aucmd_win->w_s = &buf->b_s;
++ #endif
++ ++buf->b_nwindows;
++ win_init_empty(aucmd_win); // set cursor and topline to safe values
++
++ // Make sure w_localdir and globaldir are NULL to avoid a chdir() in
++ // win_enter_ext().
++ VIM_CLEAR(aucmd_win->w_localdir);
++ aco->globaldir = globaldir;
++ globaldir = NULL;
++
++
++ // Split the current window, put the aucmd_win in the upper half.
++ // We don't want the BufEnter or WinEnter autocommands.
++ block_autocmds();
++ make_snapshot(SNAP_AUCMD_IDX);
++ save_ea = p_ea;
++ p_ea = FALSE;
++
++ #ifdef FEAT_AUTOCHDIR
++ // Prevent chdir() call in win_enter_ext(), through do_autochdir().
++ save_acd = p_acd;
++ p_acd = FALSE;
++ #endif
++
++ (void)win_split_ins(0, WSP_TOP, aucmd_win, 0);
++ (void)win_comp_pos(); // recompute window positions
++ p_ea = save_ea;
++ #ifdef FEAT_AUTOCHDIR
++ p_acd = save_acd;
++ #endif
++ unblock_autocmds();
++ curwin = aucmd_win;
++ }
++ curbuf = buf;
++ aco->new_curwin = curwin;
++ set_bufref(&aco->new_curbuf, curbuf);
++ }
++
++ /*
++ * Cleanup after executing autocommands for a (hidden) buffer.
++ * Restore the window as it was (if possible).
++ */
++ void
++ aucmd_restbuf(
++ aco_save_T *aco) // structure holding saved values
++ {
++ int dummy;
++
++ if (aco->use_aucmd_win)
++ {
++ --curbuf->b_nwindows;
++ // Find "aucmd_win", it can't be closed, but it may be in another tab
++ // page. Do not trigger autocommands here.
++ block_autocmds();
++ if (curwin != aucmd_win)
++ {
++ tabpage_T *tp;
++ win_T *wp;
++
++ FOR_ALL_TAB_WINDOWS(tp, wp)
++ {
++ if (wp == aucmd_win)
++ {
++ if (tp != curtab)
++ goto_tabpage_tp(tp, TRUE, TRUE);
++ win_goto(aucmd_win);
++ goto win_found;
++ }
++ }
++ }
++ win_found:
++
++ // Remove the window and frame from the tree of frames.
++ (void)winframe_remove(curwin, &dummy, NULL);
++ win_remove(curwin, NULL);
++ aucmd_win_used = FALSE;
++ last_status(FALSE); // may need to remove last status line
++
++ if (!valid_tabpage_win(curtab))
++ // no valid window in current tabpage
++ close_tabpage(curtab);
++
++ restore_snapshot(SNAP_AUCMD_IDX, FALSE);
++ (void)win_comp_pos(); // recompute window positions
++ unblock_autocmds();
++
++ if (win_valid(aco->save_curwin))
++ curwin = aco->save_curwin;
++ else
++ // Hmm, original window disappeared. Just use the first one.
++ curwin = firstwin;
++ if (win_valid(aco->save_prevwin))
++ prevwin = aco->save_prevwin;
++ #ifdef FEAT_EVAL
++ vars_clear(&aucmd_win->w_vars->dv_hashtab); // free all w: variables
++ hash_init(&aucmd_win->w_vars->dv_hashtab); // re-use the hashtab
++ #endif
++ curbuf = curwin->w_buffer;
++
++ vim_free(globaldir);
++ globaldir = aco->globaldir;
++
++ // the buffer contents may have changed
++ check_cursor();
++ if (curwin->w_topline > curbuf->b_ml.ml_line_count)
++ {
++ curwin->w_topline = curbuf->b_ml.ml_line_count;
++ #ifdef FEAT_DIFF
++ curwin->w_topfill = 0;
++ #endif
++ }
++ #if defined(FEAT_GUI)
++ // Hide the scrollbars from the aucmd_win and update.
++ gui_mch_enable_scrollbar(&aucmd_win->w_scrollbars[SBAR_LEFT], FALSE);
++ gui_mch_enable_scrollbar(&aucmd_win->w_scrollbars[SBAR_RIGHT], FALSE);
++ gui_may_update_scrollbars();
++ #endif
++ }
++ else
++ {
++ // restore curwin
++ if (win_valid(aco->save_curwin))
++ {
++ // Restore the buffer which was previously edited by curwin, if
++ // it was changed, we are still the same window and the buffer is
++ // valid.
++ if (curwin == aco->new_curwin
++ && curbuf != aco->new_curbuf.br_buf
++ && bufref_valid(&aco->new_curbuf)
++ && aco->new_curbuf.br_buf->b_ml.ml_mfp != NULL)
++ {
++ # if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
++ if (curwin->w_s == &curbuf->b_s)
++ curwin->w_s = &aco->new_curbuf.br_buf->b_s;
++ # endif
++ --curbuf->b_nwindows;
++ curbuf = aco->new_curbuf.br_buf;
++ curwin->w_buffer = curbuf;
++ ++curbuf->b_nwindows;
++ }
++
++ curwin = aco->save_curwin;
++ curbuf = curwin->w_buffer;
++ if (win_valid(aco->save_prevwin))
++ prevwin = aco->save_prevwin;
++ // In case the autocommand move the cursor to a position that that
++ // not exist in curbuf.
++ check_cursor();
++ }
++ }
++ }
++
++ static int autocmd_nested = FALSE;
++
++ /*
++ * Execute autocommands for "event" and file name "fname".
++ * Return TRUE if some commands were executed.
++ */
++ int
++ apply_autocmds(
++ event_T event,
++ char_u *fname, // NULL or empty means use actual file name
++ char_u *fname_io, // fname to use for <afile> on cmdline
++ int force, // when TRUE, ignore autocmd_busy
++ buf_T *buf) // buffer for <abuf>
++ {
++ return apply_autocmds_group(event, fname, fname_io, force,
++ AUGROUP_ALL, buf, NULL);
++ }
++
++ /*
++ * Like apply_autocmds(), but with extra "eap" argument. This takes care of
++ * setting v:filearg.
++ */
++ int
++ apply_autocmds_exarg(
++ event_T event,
++ char_u *fname,
++ char_u *fname_io,
++ int force,
++ buf_T *buf,
++ exarg_T *eap)
++ {
++ return apply_autocmds_group(event, fname, fname_io, force,
++ AUGROUP_ALL, buf, eap);
++ }
++
++ /*
++ * Like apply_autocmds(), but handles the caller's retval. If the script
++ * processing is being aborted or if retval is FAIL when inside a try
++ * conditional, no autocommands are executed. If otherwise the autocommands
++ * cause the script to be aborted, retval is set to FAIL.
++ */
++ int
++ apply_autocmds_retval(
++ event_T event,
++ char_u *fname, // NULL or empty means use actual file name
++ char_u *fname_io, // fname to use for <afile> on cmdline
++ int force, // when TRUE, ignore autocmd_busy
++ buf_T *buf, // buffer for <abuf>
++ int *retval) // pointer to caller's retval
++ {
++ int did_cmd;
++
++ #ifdef FEAT_EVAL
++ if (should_abort(*retval))
++ return FALSE;
++ #endif
++
++ did_cmd = apply_autocmds_group(event, fname, fname_io, force,
++ AUGROUP_ALL, buf, NULL);
++ if (did_cmd
++ #ifdef FEAT_EVAL
++ && aborting()
++ #endif
++ )
++ *retval = FAIL;
++ return did_cmd;
++ }
++
++ /*
++ * Return TRUE when there is a CursorHold autocommand defined.
++ */
++ int
++ has_cursorhold(void)
++ {
++ return (first_autopat[(int)(get_real_state() == NORMAL_BUSY
++ ? EVENT_CURSORHOLD : EVENT_CURSORHOLDI)] != NULL);
++ }
++
++ /*
++ * Return TRUE if the CursorHold event can be triggered.
++ */
++ int
++ trigger_cursorhold(void)
++ {
++ int state;
++
++ if (!did_cursorhold
++ && has_cursorhold()
++ && reg_recording == 0
++ && typebuf.tb_len == 0
++ #ifdef FEAT_INS_EXPAND
++ && !ins_compl_active()
++ #endif
++ )
++ {
++ state = get_real_state();
++ if (state == NORMAL_BUSY || (state & INSERT) != 0)
++ return TRUE;
++ }
++ return FALSE;
++ }
++
++ /*
++ * Return TRUE when there is a CursorMoved autocommand defined.
++ */
++ int
++ has_cursormoved(void)
++ {
++ return (first_autopat[(int)EVENT_CURSORMOVED] != NULL);
++ }
++
++ #if defined(FEAT_CONCEAL) || defined(PROTO)
++ /*
++ * Return TRUE when there is a CursorMovedI autocommand defined.
++ */
++ int
++ has_cursormovedI(void)
++ {
++ return (first_autopat[(int)EVENT_CURSORMOVEDI] != NULL);
++ }
++ #endif
++
++ /*
++ * Return TRUE when there is a TextChanged autocommand defined.
++ */
++ int
++ has_textchanged(void)
++ {
++ return (first_autopat[(int)EVENT_TEXTCHANGED] != NULL);
++ }
++
++ /*
++ * Return TRUE when there is a TextChangedI autocommand defined.
++ */
++ int
++ has_textchangedI(void)
++ {
++ return (first_autopat[(int)EVENT_TEXTCHANGEDI] != NULL);
++ }
++
++ #if defined(FEAT_INS_EXPAND) || defined(PROTO)
++ /*
++ * Return TRUE when there is a TextChangedP autocommand defined.
++ */
++ int
++ has_textchangedP(void)
++ {
++ return (first_autopat[(int)EVENT_TEXTCHANGEDP] != NULL);
++ }
++ #endif
++
++ /*
++ * Return TRUE when there is an InsertCharPre autocommand defined.
++ */
++ int
++ has_insertcharpre(void)
++ {
++ return (first_autopat[(int)EVENT_INSERTCHARPRE] != NULL);
++ }
++
++ /*
++ * Return TRUE when there is an CmdUndefined autocommand defined.
++ */
++ int
++ has_cmdundefined(void)
++ {
++ return (first_autopat[(int)EVENT_CMDUNDEFINED] != NULL);
++ }
++
++ /*
++ * Return TRUE when there is an FuncUndefined autocommand defined.
++ */
++ int
++ has_funcundefined(void)
++ {
++ return (first_autopat[(int)EVENT_FUNCUNDEFINED] != NULL);
++ }
++
++ #if defined(FEAT_EVAL) || defined(PROTO)
++ /*
++ * Return TRUE when there is a TextYankPost autocommand defined.
++ */
++ int
++ has_textyankpost(void)
++ {
++ return (first_autopat[(int)EVENT_TEXTYANKPOST] != NULL);
++ }
++ #endif
++
++ /*
++ * Execute autocommands for "event" and file name "fname".
++ * Return TRUE if some commands were executed.
++ */
++ static int
++ apply_autocmds_group(
++ event_T event,
++ char_u *fname, // NULL or empty means use actual file name
++ char_u *fname_io, // fname to use for <afile> on cmdline, NULL means
++ // use fname
++ int force, // when TRUE, ignore autocmd_busy
++ int group, // group ID, or AUGROUP_ALL
++ buf_T *buf, // buffer for <abuf>
++ exarg_T *eap UNUSED) // command arguments
++ {
++ char_u *sfname = NULL; // short file name
++ char_u *tail;
++ int save_changed;
++ buf_T *old_curbuf;
++ int retval = FALSE;
++ char_u *save_sourcing_name;
++ linenr_T save_sourcing_lnum;
++ char_u *save_autocmd_fname;
++ int save_autocmd_fname_full;
++ int save_autocmd_bufnr;
++ char_u *save_autocmd_match;
++ int save_autocmd_busy;
++ int save_autocmd_nested;
++ static int nesting = 0;
++ AutoPatCmd patcmd;
++ AutoPat *ap;
++ #ifdef FEAT_EVAL
++ sctx_T save_current_sctx;
++ funccal_entry_T funccal_entry;
++ char_u *save_cmdarg;
++ long save_cmdbang;
++ #endif
++ static int filechangeshell_busy = FALSE;
++ #ifdef FEAT_PROFILE
++ proftime_T wait_time;
++ #endif
++ int did_save_redobuff = FALSE;
++ save_redo_T save_redo;
++ int save_KeyTyped = KeyTyped;
++
++ /*
++ * Quickly return if there are no autocommands for this event or
++ * autocommands are blocked.
++ */
++ if (event == NUM_EVENTS || first_autopat[(int)event] == NULL
++ || autocmd_blocked > 0)
++ goto BYPASS_AU;
++
++ /*
++ * When autocommands are busy, new autocommands are only executed when
++ * explicitly enabled with the "nested" flag.
++ */
++ if (autocmd_busy && !(force || autocmd_nested))
++ goto BYPASS_AU;
++
++ #ifdef FEAT_EVAL
++ /*
++ * Quickly return when immediately aborting on error, or when an interrupt
++ * occurred or an exception was thrown but not caught.
++ */
++ if (aborting())
++ goto BYPASS_AU;
++ #endif
++
++ /*
++ * FileChangedShell never nests, because it can create an endless loop.
++ */
++ if (filechangeshell_busy && (event == EVENT_FILECHANGEDSHELL
++ || event == EVENT_FILECHANGEDSHELLPOST))
++ goto BYPASS_AU;
++
++ /*
++ * Ignore events in 'eventignore'.
++ */
++ if (event_ignored(event))
++ goto BYPASS_AU;
++
++ /*
++ * Allow nesting of autocommands, but restrict the depth, because it's
++ * possible to create an endless loop.
++ */
++ if (nesting == 10)
++ {
++ emsg(_("E218: autocommand nesting too deep"));
++ goto BYPASS_AU;
++ }
++
++ /*
++ * Check if these autocommands are disabled. Used when doing ":all" or
++ * ":ball".
++ */
++ if ( (autocmd_no_enter
++ && (event == EVENT_WINENTER || event == EVENT_BUFENTER))
++ || (autocmd_no_leave
++ && (event == EVENT_WINLEAVE || event == EVENT_BUFLEAVE)))
++ goto BYPASS_AU;
++
++ /*
++ * Save the autocmd_* variables and info about the current buffer.
++ */
++ save_autocmd_fname = autocmd_fname;
++ save_autocmd_fname_full = autocmd_fname_full;
++ save_autocmd_bufnr = autocmd_bufnr;
++ save_autocmd_match = autocmd_match;
++ save_autocmd_busy = autocmd_busy;
++ save_autocmd_nested = autocmd_nested;
++ save_changed = curbuf->b_changed;
++ old_curbuf = curbuf;
++
++ /*
++ * Set the file name to be used for <afile>.
++ * Make a copy to avoid that changing a buffer name or directory makes it
++ * invalid.
++ */
++ if (fname_io == NULL)
++ {
++ if (event == EVENT_COLORSCHEME || event == EVENT_COLORSCHEMEPRE
++ || event == EVENT_OPTIONSET)
++ autocmd_fname = NULL;
++ else if (fname != NULL && !ends_excmd(*fname))
++ autocmd_fname = fname;
++ else if (buf != NULL)
++ autocmd_fname = buf->b_ffname;
++ else
++ autocmd_fname = NULL;
++ }
++ else
++ autocmd_fname = fname_io;
++ if (autocmd_fname != NULL)
++ autocmd_fname = vim_strsave(autocmd_fname);
++ autocmd_fname_full = FALSE; // call FullName_save() later
++
++ /*
++ * Set the buffer number to be used for <abuf>.
++ */
++ if (buf == NULL)
++ autocmd_bufnr = 0;
++ else
++ autocmd_bufnr = buf->b_fnum;
++
++ /*
++ * When the file name is NULL or empty, use the file name of buffer "buf".
++ * Always use the full path of the file name to match with, in case
++ * "allow_dirs" is set.
++ */
++ if (fname == NULL || *fname == NUL)
++ {
++ if (buf == NULL)
++ fname = NULL;
++ else
++ {
++ #ifdef FEAT_SYN_HL
++ if (event == EVENT_SYNTAX)
++ fname = buf->b_p_syn;
++ else
++ #endif
++ if (event == EVENT_FILETYPE)
++ fname = buf->b_p_ft;
++ else
++ {
++ if (buf->b_sfname != NULL)
++ sfname = vim_strsave(buf->b_sfname);
++ fname = buf->b_ffname;
++ }
++ }
++ if (fname == NULL)
++ fname = (char_u *)"";
++ fname = vim_strsave(fname); // make a copy, so we can change it
++ }
++ else
++ {
++ sfname = vim_strsave(fname);
++ // Don't try expanding FileType, Syntax, FuncUndefined, WindowID,
++ // ColorScheme, QuickFixCmd* or DirChanged
++ if (event == EVENT_FILETYPE
++ || event == EVENT_SYNTAX
++ || event == EVENT_CMDLINECHANGED
++ || event == EVENT_CMDLINEENTER
++ || event == EVENT_CMDLINELEAVE
++ || event == EVENT_CMDWINENTER
++ || event == EVENT_CMDWINLEAVE
++ || event == EVENT_CMDUNDEFINED
++ || event == EVENT_FUNCUNDEFINED
++ || event == EVENT_REMOTEREPLY
++ || event == EVENT_SPELLFILEMISSING
++ || event == EVENT_QUICKFIXCMDPRE
++ || event == EVENT_COLORSCHEME
++ || event == EVENT_COLORSCHEMEPRE
++ || event == EVENT_OPTIONSET
++ || event == EVENT_QUICKFIXCMDPOST
++ || event == EVENT_DIRCHANGED)
++ {
++ fname = vim_strsave(fname);
++ autocmd_fname_full = TRUE; // don't expand it later
++ }
++ else
++ fname = FullName_save(fname, FALSE);
++ }
++ if (fname == NULL) // out of memory
++ {
++ vim_free(sfname);
++ retval = FALSE;
++ goto BYPASS_AU;
++ }
++
++ #ifdef BACKSLASH_IN_FILENAME
++ /*
++ * Replace all backslashes with forward slashes. This makes the
++ * autocommand patterns portable between Unix and MS-DOS.
++ */
++ if (sfname != NULL)
++ forward_slash(sfname);
++ forward_slash(fname);
++ #endif
++
++ #ifdef VMS
++ // remove version for correct match
++ if (sfname != NULL)
++ vms_remove_version(sfname);
++ vms_remove_version(fname);
++ #endif
++
++ /*
++ * Set the name to be used for <amatch>.
++ */
++ autocmd_match = fname;
++
++
++ // Don't redraw while doing autocommands.
++ ++RedrawingDisabled;
++ save_sourcing_name = sourcing_name;
++ sourcing_name = NULL; // don't free this one
++ save_sourcing_lnum = sourcing_lnum;
++ sourcing_lnum = 0; // no line number here
++
++ #ifdef FEAT_EVAL
++ save_current_sctx = current_sctx;
++
++ # ifdef FEAT_PROFILE
++ if (do_profiling == PROF_YES)
++ 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
++
++ /*
++ * When starting to execute autocommands, save the search patterns.
++ */
++ if (!autocmd_busy)
++ {
++ save_search_patterns();
++ #ifdef FEAT_INS_EXPAND
++ if (!ins_compl_active())
++ #endif
++ {
++ saveRedobuff(&save_redo);
++ did_save_redobuff = TRUE;
++ }
++ did_filetype = keep_filetype;
++ }
++
++ /*
++ * Note that we are applying autocmds. Some commands need to know.
++ */
++ autocmd_busy = TRUE;
++ filechangeshell_busy = (event == EVENT_FILECHANGEDSHELL);
++ ++nesting; // see matching decrement below
++
++ // Remember that FileType was triggered. Used for did_filetype().
++ if (event == EVENT_FILETYPE)
++ did_filetype = TRUE;
++
++ tail = gettail(fname);
++
++ // Find first autocommand that matches
++ patcmd.curpat = first_autopat[(int)event];
++ patcmd.nextcmd = NULL;
++ patcmd.group = group;
++ patcmd.fname = fname;
++ patcmd.sfname = sfname;
++ patcmd.tail = tail;
++ patcmd.event = event;
++ patcmd.arg_bufnr = autocmd_bufnr;
++ patcmd.next = NULL;
++ auto_next_pat(&patcmd, FALSE);
++
++ // found one, start executing the autocommands
++ if (patcmd.curpat != NULL)
++ {
++ // add to active_apc_list
++ patcmd.next = active_apc_list;
++ active_apc_list = &patcmd;
++
++ #ifdef FEAT_EVAL
++ // set v:cmdarg (only when there is a matching pattern)
++ save_cmdbang = (long)get_vim_var_nr(VV_CMDBANG);
++ if (eap != NULL)
++ {
++ save_cmdarg = set_cmdarg(eap, NULL);
++ set_vim_var_nr(VV_CMDBANG, (long)eap->forceit);
++ }
++ else
++ save_cmdarg = NULL; // avoid gcc warning
++ #endif
++ retval = TRUE;
++ // mark the last pattern, to avoid an endless loop when more patterns
++ // are added when executing autocommands
++ for (ap = patcmd.curpat; ap->next != NULL; ap = ap->next)
++ ap->last = FALSE;
++ ap->last = TRUE;
++ check_lnums(TRUE); // make sure cursor and topline are valid
++ do_cmdline(NULL, getnextac, (void *)&patcmd,
++ DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
++ #ifdef FEAT_EVAL
++ if (eap != NULL)
++ {
++ (void)set_cmdarg(NULL, save_cmdarg);
++ set_vim_var_nr(VV_CMDBANG, save_cmdbang);
++ }
++ #endif
++ // delete from active_apc_list
++ if (active_apc_list == &patcmd) // just in case
++ active_apc_list = patcmd.next;
++ }
++
++ --RedrawingDisabled;
++ autocmd_busy = save_autocmd_busy;
++ filechangeshell_busy = FALSE;
++ autocmd_nested = save_autocmd_nested;
++ vim_free(sourcing_name);
++ sourcing_name = save_sourcing_name;
++ sourcing_lnum = save_sourcing_lnum;
++ vim_free(autocmd_fname);
++ autocmd_fname = save_autocmd_fname;
++ autocmd_fname_full = save_autocmd_fname_full;
++ autocmd_bufnr = save_autocmd_bufnr;
++ 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);
++ # endif
++ #endif
++ KeyTyped = save_KeyTyped;
++ vim_free(fname);
++ vim_free(sfname);
++ --nesting; // see matching increment above
++
++ /*
++ * When stopping to execute autocommands, restore the search patterns and
++ * the redo buffer. Free any buffers in the au_pending_free_buf list and
++ * free any windows in the au_pending_free_win list.
++ */
++ if (!autocmd_busy)
++ {
++ restore_search_patterns();
++ if (did_save_redobuff)
++ restoreRedobuff(&save_redo);
++ did_filetype = FALSE;
++ while (au_pending_free_buf != NULL)
++ {
++ buf_T *b = au_pending_free_buf->b_next;
++ vim_free(au_pending_free_buf);
++ au_pending_free_buf = b;
++ }
++ while (au_pending_free_win != NULL)
++ {
++ win_T *w = au_pending_free_win->w_next;
++ vim_free(au_pending_free_win);
++ au_pending_free_win = w;
++ }
++ }
++
++ /*
++ * Some events don't set or reset the Changed flag.
++ * Check if still in the same buffer!
++ */
++ if (curbuf == old_curbuf
++ && (event == EVENT_BUFREADPOST
++ || event == EVENT_BUFWRITEPOST
++ || event == EVENT_FILEAPPENDPOST
++ || event == EVENT_VIMLEAVE
++ || event == EVENT_VIMLEAVEPRE))
++ {
++ #ifdef FEAT_TITLE
++ if (curbuf->b_changed != save_changed)
++ need_maketitle = TRUE;
++ #endif
++ curbuf->b_changed = save_changed;
++ }
++
++ au_cleanup(); // may really delete removed patterns/commands now
++
++ BYPASS_AU:
++ // When wiping out a buffer make sure all its buffer-local autocommands
++ // are deleted.
++ if (event == EVENT_BUFWIPEOUT && buf != NULL)
++ aubuflocal_remove(buf);
++
++ if (retval == OK && event == EVENT_FILETYPE)
++ au_did_filetype = TRUE;
++
++ return retval;
++ }
++
++ # ifdef FEAT_EVAL
++ static char_u *old_termresponse = NULL;
++ # endif
++
++ /*
++ * Block triggering autocommands until unblock_autocmd() is called.
++ * Can be used recursively, so long as it's symmetric.
++ */
++ void
++ block_autocmds(void)
++ {
++ # ifdef FEAT_EVAL
++ // Remember the value of v:termresponse.
++ if (autocmd_blocked == 0)
++ old_termresponse = get_vim_var_str(VV_TERMRESPONSE);
++ # endif
++ ++autocmd_blocked;
++ }
++
++ void
++ unblock_autocmds(void)
++ {
++ --autocmd_blocked;
++
++ # ifdef FEAT_EVAL
++ // When v:termresponse was set while autocommands were blocked, trigger
++ // the autocommands now. Esp. useful when executing a shell command
++ // during startup (vimdiff).
++ if (autocmd_blocked == 0
++ && get_vim_var_str(VV_TERMRESPONSE) != old_termresponse)
++ apply_autocmds(EVENT_TERMRESPONSE, NULL, NULL, FALSE, curbuf);
++ # endif
++ }
++
++ #if defined(FEAT_EVAL) && (defined(FEAT_XIM) || defined(IME_WITHOUT_XIM)) \
++ || defined(PROTO)
++ int
++ is_autocmd_blocked(void)
++ {
++ return autocmd_blocked != 0;
++ }
++ #endif
++
++ /*
++ * Find next autocommand pattern that matches.
++ */
++ static void
++ auto_next_pat(
++ AutoPatCmd *apc,
++ int stop_at_last) // stop when 'last' flag is set
++ {
++ AutoPat *ap;
++ AutoCmd *cp;
++ char_u *name;
++ char *s;
++
++ VIM_CLEAR(sourcing_name);
++
++ for (ap = apc->curpat; ap != NULL && !got_int; ap = ap->next)
++ {
++ apc->curpat = NULL;
++
++ // Only use a pattern when it has not been removed, has commands and
++ // the group matches. For buffer-local autocommands only check the
++ // buffer number.
++ if (ap->pat != NULL && ap->cmds != NULL
++ && (apc->group == AUGROUP_ALL || apc->group == ap->group))
++ {
++ // execution-condition
++ if (ap->buflocal_nr == 0
++ ? (match_file_pat(NULL, &ap->reg_prog, apc->fname,
++ apc->sfname, apc->tail, ap->allow_dirs))
++ : ap->buflocal_nr == apc->arg_bufnr)
++ {
++ name = event_nr2name(apc->event);
++ s = _("%s Autocommands for \"%s\"");
++ sourcing_name = alloc((unsigned)(STRLEN(s)
++ + STRLEN(name) + ap->patlen + 1));
++ if (sourcing_name != NULL)
++ {
++ sprintf((char *)sourcing_name, s,
++ (char *)name, (char *)ap->pat);
++ if (p_verbose >= 8)
++ {
++ verbose_enter();
++ smsg(_("Executing %s"), sourcing_name);
++ verbose_leave();
++ }
++ }
++
++ apc->curpat = ap;
++ apc->nextcmd = ap->cmds;
++ // mark last command
++ for (cp = ap->cmds; cp->next != NULL; cp = cp->next)
++ cp->last = FALSE;
++ cp->last = TRUE;
++ }
++ line_breakcheck();
++ if (apc->curpat != NULL) // found a match
++ break;
++ }
++ if (stop_at_last && ap->last)
++ break;
++ }
++ }
++
++ /*
++ * Get next autocommand command.
++ * Called by do_cmdline() to get the next line for ":if".
++ * Returns allocated string, or NULL for end of autocommands.
++ */
++ char_u *
++ getnextac(int c UNUSED, void *cookie, int indent UNUSED)
++ {
++ AutoPatCmd *acp = (AutoPatCmd *)cookie;
++ char_u *retval;
++ AutoCmd *ac;
++
++ // Can be called again after returning the last line.
++ if (acp->curpat == NULL)
++ return NULL;
++
++ // repeat until we find an autocommand to execute
++ for (;;)
++ {
++ // skip removed commands
++ while (acp->nextcmd != NULL && acp->nextcmd->cmd == NULL)
++ if (acp->nextcmd->last)
++ acp->nextcmd = NULL;
++ else
++ acp->nextcmd = acp->nextcmd->next;
++
++ if (acp->nextcmd != NULL)
++ break;
++
++ // at end of commands, find next pattern that matches
++ if (acp->curpat->last)
++ acp->curpat = NULL;
++ else
++ acp->curpat = acp->curpat->next;
++ if (acp->curpat != NULL)
++ auto_next_pat(acp, TRUE);
++ if (acp->curpat == NULL)
++ return NULL;
++ }
++
++ ac = acp->nextcmd;
++
++ if (p_verbose >= 9)
++ {
++ verbose_enter_scroll();
++ smsg(_("autocommand %s"), ac->cmd);
++ msg_puts("\n"); // don't overwrite this either
++ verbose_leave_scroll();
++ }
++ retval = vim_strsave(ac->cmd);
++ autocmd_nested = ac->nested;
++ #ifdef FEAT_EVAL
++ current_sctx = ac->script_ctx;
++ #endif
++ if (ac->last)
++ acp->nextcmd = NULL;
++ else
++ acp->nextcmd = ac->next;
++ return retval;
++ }
++
++ /*
++ * Return TRUE if there is a matching autocommand for "fname".
++ * To account for buffer-local autocommands, function needs to know
++ * in which buffer the file will be opened.
++ */
++ int
++ has_autocmd(event_T event, char_u *sfname, buf_T *buf)
++ {
++ AutoPat *ap;
++ char_u *fname;
++ char_u *tail = gettail(sfname);
++ int retval = FALSE;
++
++ fname = FullName_save(sfname, FALSE);
++ if (fname == NULL)
++ return FALSE;
++
++ #ifdef BACKSLASH_IN_FILENAME
++ /*
++ * Replace all backslashes with forward slashes. This makes the
++ * autocommand patterns portable between Unix and MS-DOS.
++ */
++ sfname = vim_strsave(sfname);
++ if (sfname != NULL)
++ forward_slash(sfname);
++ forward_slash(fname);
++ #endif
++
++ for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
++ if (ap->pat != NULL && ap->cmds != NULL
++ && (ap->buflocal_nr == 0
++ ? match_file_pat(NULL, &ap->reg_prog,
++ fname, sfname, tail, ap->allow_dirs)
++ : buf != NULL && ap->buflocal_nr == buf->b_fnum
++ ))
++ {
++ retval = TRUE;
++ break;
++ }
++
++ vim_free(fname);
++ #ifdef BACKSLASH_IN_FILENAME
++ vim_free(sfname);
++ #endif
++
++ return retval;
++ }
++
++ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
++ /*
++ * Function given to ExpandGeneric() to obtain the list of autocommand group
++ * names.
++ */
++ char_u *
++ get_augroup_name(expand_T *xp UNUSED, int idx)
++ {
++ if (idx == augroups.ga_len) // add "END" add the end
++ return (char_u *)"END";
++ if (idx >= augroups.ga_len) // end of list
++ return NULL;
++ if (AUGROUP_NAME(idx) == NULL || AUGROUP_NAME(idx) == get_deleted_augroup())
++ // skip deleted entries
++ return (char_u *)"";
++ return AUGROUP_NAME(idx); // return a name
++ }
++
++ static int include_groups = FALSE;
++
++ char_u *
++ set_context_in_autocmd(
++ expand_T *xp,
++ char_u *arg,
++ int doautocmd) // TRUE for :doauto*, FALSE for :autocmd
++ {
++ char_u *p;
++ int group;
++
++ // check for a group name, skip it if present
++ include_groups = FALSE;
++ p = arg;
++ group = au_get_grouparg(&arg);
++ if (group == AUGROUP_ERROR)
++ return NULL;
++ // If there only is a group name that's what we expand.
++ if (*arg == NUL && group != AUGROUP_ALL && !VIM_ISWHITE(arg[-1]))
++ {
++ arg = p;
++ group = AUGROUP_ALL;
++ }
++
++ // skip over event name
++ for (p = arg; *p != NUL && !VIM_ISWHITE(*p); ++p)
++ if (*p == ',')
++ arg = p + 1;
++ if (*p == NUL)
++ {
++ if (group == AUGROUP_ALL)
++ include_groups = TRUE;
++ xp->xp_context = EXPAND_EVENTS; // expand event name
++ xp->xp_pattern = arg;
++ return NULL;
++ }
++
++ // skip over pattern
++ arg = skipwhite(p);
++ while (*arg && (!VIM_ISWHITE(*arg) || arg[-1] == '\\'))
++ arg++;
++ if (*arg)
++ return arg; // expand (next) command
++
++ if (doautocmd)
++ xp->xp_context = EXPAND_FILES; // expand file names
++ else
++ xp->xp_context = EXPAND_NOTHING; // pattern is not expanded
++ return NULL;
++ }
++
++ /*
++ * Function given to ExpandGeneric() to obtain the list of event names.
++ */
++ char_u *
++ get_event_name(expand_T *xp UNUSED, int idx)
++ {
++ if (idx < augroups.ga_len) // First list group names, if wanted
++ {
++ if (!include_groups || AUGROUP_NAME(idx) == NULL
++ || AUGROUP_NAME(idx) == get_deleted_augroup())
++ return (char_u *)""; // skip deleted entries
++ return AUGROUP_NAME(idx); // return a name
++ }
++ return (char_u *)event_names[idx - augroups.ga_len].name;
++ }
++
++ #endif // FEAT_CMDL_COMPL
++
++ #if defined(FEAT_EVAL) || defined(PROTO)
++ /*
++ * Return TRUE if autocmd is supported.
++ */
++ int
++ autocmd_supported(char_u *name)
++ {
++ char_u *p;
++
++ return (event_name2nr(name, &p) != NUM_EVENTS);
++ }
++
++ /*
++ * Return TRUE if an autocommand is defined for a group, event and
++ * pattern: The group can be omitted to accept any group. "event" and "pattern"
++ * can be NULL to accept any event and pattern. "pattern" can be NULL to accept
++ * any pattern. Buffer-local patterns <buffer> or <buffer=N> are accepted.
++ * Used for:
++ * exists("#Group") or
++ * exists("#Group#Event") or
++ * exists("#Group#Event#pat") or
++ * exists("#Event") or
++ * exists("#Event#pat")
++ */
++ int
++ au_exists(char_u *arg)
++ {
++ char_u *arg_save;
++ char_u *pattern = NULL;
++ char_u *event_name;
++ char_u *p;
++ event_T event;
++ AutoPat *ap;
++ buf_T *buflocal_buf = NULL;
++ int group;
++ int retval = FALSE;
++
++ // Make a copy so that we can change the '#' chars to a NUL.
++ arg_save = vim_strsave(arg);
++ if (arg_save == NULL)
++ return FALSE;
++ p = vim_strchr(arg_save, '#');
++ if (p != NULL)
++ *p++ = NUL;
++
++ // First, look for an autocmd group name
++ group = au_find_group(arg_save);
++ if (group == AUGROUP_ERROR)
++ {
++ // Didn't match a group name, assume the first argument is an event.
++ group = AUGROUP_ALL;
++ event_name = arg_save;
++ }
++ else
++ {
++ if (p == NULL)
++ {
++ // "Group": group name is present and it's recognized
++ retval = TRUE;
++ goto theend;
++ }
++
++ // Must be "Group#Event" or "Group#Event#pat".
++ event_name = p;
++ p = vim_strchr(event_name, '#');
++ if (p != NULL)
++ *p++ = NUL; // "Group#Event#pat"
++ }
++
++ pattern = p; // "pattern" is NULL when there is no pattern
++
++ // find the index (enum) for the event name
++ event = event_name2nr(event_name, &p);
++
++ // return FALSE if the event name is not recognized
++ if (event == NUM_EVENTS)
++ goto theend;
++
++ // Find the first autocommand for this event.
++ // If there isn't any, return FALSE;
++ // If there is one and no pattern given, return TRUE;
++ ap = first_autopat[(int)event];
++ if (ap == NULL)
++ goto theend;
++
++ // if pattern is "<buffer>", special handling is needed which uses curbuf
++ // for pattern "<buffer=N>, fnamecmp() will work fine
++ if (pattern != NULL && STRICMP(pattern, "<buffer>") == 0)
++ buflocal_buf = curbuf;
++
++ // Check if there is an autocommand with the given pattern.
++ for ( ; ap != NULL; ap = ap->next)
++ // only use a pattern when it has not been removed and has commands.
++ // For buffer-local autocommands, fnamecmp() works fine.
++ if (ap->pat != NULL && ap->cmds != NULL
++ && (group == AUGROUP_ALL || ap->group == group)
++ && (pattern == NULL
++ || (buflocal_buf == NULL
++ ? fnamecmp(ap->pat, pattern) == 0
++ : ap->buflocal_nr == buflocal_buf->b_fnum)))
++ {
++ retval = TRUE;
++ break;
++ }
++
++ theend:
++ vim_free(arg_save);
++ return retval;
++ }
++ #endif
+*** ../vim-8.1.0824/src/fileio.c 2019-01-24 17:59:35.135217476 +0100
+--- src/fileio.c 2019-01-26 15:16:55.569118519 +0100
+***************
+*** 42,53 ****
+ static void msg_add_eol(void);
+ static int check_mtime(buf_T *buf, stat_T *s);
+ static int time_differs(long t1, long t2);
+- static int apply_autocmds_exarg(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, exarg_T *eap);
+- static int au_find_group(char_u *name);
+-
+- #define AUGROUP_DEFAULT -1 /* default autocmd group */
+- #define AUGROUP_ERROR -2 /* erroneous autocmd group */
+- #define AUGROUP_ALL -3 /* all autocmd groups */
+
+ #define HAS_BW_FLAGS
+ #define FIO_LATIN1 0x01 /* convert Latin1 */
+--- 42,47 ----
+***************
+*** 120,135 ****
+ #endif
+ static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
+
+- /*
+- * Set by the apply_autocmds_group function if the given event is equal to
+- * EVENT_FILETYPE. Used by the readfile function in order to determine if
+- * EVENT_BUFREADPOST triggered the EVENT_FILETYPE.
+- *
+- * Relying on this value requires one to reset it prior calling
+- * apply_autocmds_group.
+- */
+- static int au_did_filetype INIT(= FALSE);
+-
+ void
+ filemess(
+ buf_T *buf,
+--- 114,119 ----
+***************
+*** 6866,6871 ****
+--- 6850,6860 ----
+ reason = "deleted";
+ else if (bufIsChanged(buf))
+ reason = "conflict";
++ /*
++ * Check if the file contents really changed to avoid giving a
++ * warning when only the timestamp was set (e.g., checked out of
++ * CVS). Always warn when the buffer was changed.
++ */
+ else if (orig_size != buf->b_orig_size || buf_contents_changed(buf))
+ reason = "changed";
+ else if (orig_mode != buf->b_orig_mode)
+***************
+*** 6912,6923 ****
+ #if defined(FEAT_CON_DIALOG) || defined(FEAT_GUI_DIALOG)
+ can_reload = TRUE;
+ #endif
+- /*
+- * Check if the file contents really changed to avoid
+- * giving a warning when only the timestamp was set (e.g.,
+- * checked out of CVS). Always warn when the buffer was
+- * changed.
+- */
+ if (reason[2] == 'n')
+ {
+ mesg = _("W12: Warning: File \"%s\" has changed and the buffer was changed in Vim as well");
+--- 6901,6906 ----
+***************
+*** 7552,10116 ****
+ }
+ #endif
+
+-
+- /*
+- * Code for automatic commands.
+- */
+-
+- /*
+- * The autocommands are stored in a list for each event.
+- * Autocommands for the same pattern, that are consecutive, are joined
+- * together, to avoid having to match the pattern too often.
+- * The result is an array of Autopat lists, which point to AutoCmd lists:
+- *
+- * last_autopat[0] -----------------------------+
+- * V
+- * first_autopat[0] --> Autopat.next --> Autopat.next --> NULL
+- * Autopat.cmds Autopat.cmds
+- * | |
+- * V V
+- * AutoCmd.next AutoCmd.next
+- * | |
+- * V V
+- * AutoCmd.next NULL
+- * |
+- * V
+- * NULL
+- *
+- * last_autopat[1] --------+
+- * V
+- * first_autopat[1] --> Autopat.next --> NULL
+- * Autopat.cmds
+- * |
+- * V
+- * AutoCmd.next
+- * |
+- * V
+- * NULL
+- * etc.
+- *
+- * The order of AutoCmds is important, this is the order in which they were
+- * defined and will have to be executed.
+- */
+- typedef struct AutoCmd
+- {
+- char_u *cmd; /* The command to be executed (NULL
+- when command has been removed) */
+- 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;
+-
+- typedef struct AutoPat
+- {
+- struct AutoPat *next; /* next AutoPat in AutoPat list; MUST
+- * be the first entry */
+- char_u *pat; /* pattern as typed (NULL when pattern
+- has been removed) */
+- regprog_T *reg_prog; /* compiled regprog for pattern */
+- AutoCmd *cmds; /* list of commands to do */
+- int group; /* group ID */
+- int patlen; /* strlen() of pat */
+- int buflocal_nr; /* !=0 for buffer-local AutoPat */
+- char allow_dirs; /* Pattern may match whole path */
+- char last; /* last pattern for apply_autocmds() */
+- } AutoPat;
+-
+- static struct event_name
+- {
+- char *name; /* event name */
+- event_T event; /* event number */
+- } event_names[] =
+- {
+- {"BufAdd", EVENT_BUFADD},
+- {"BufCreate", EVENT_BUFADD},
+- {"BufDelete", EVENT_BUFDELETE},
+- {"BufEnter", EVENT_BUFENTER},
+- {"BufFilePost", EVENT_BUFFILEPOST},
+- {"BufFilePre", EVENT_BUFFILEPRE},
+- {"BufHidden", EVENT_BUFHIDDEN},
+- {"BufLeave", EVENT_BUFLEAVE},
+- {"BufNew", EVENT_BUFNEW},
+- {"BufNewFile", EVENT_BUFNEWFILE},
+- {"BufRead", EVENT_BUFREADPOST},
+- {"BufReadCmd", EVENT_BUFREADCMD},
+- {"BufReadPost", EVENT_BUFREADPOST},
+- {"BufReadPre", EVENT_BUFREADPRE},
+- {"BufUnload", EVENT_BUFUNLOAD},
+- {"BufWinEnter", EVENT_BUFWINENTER},
+- {"BufWinLeave", EVENT_BUFWINLEAVE},
+- {"BufWipeout", EVENT_BUFWIPEOUT},
+- {"BufWrite", EVENT_BUFWRITEPRE},
+- {"BufWritePost", EVENT_BUFWRITEPOST},
+- {"BufWritePre", EVENT_BUFWRITEPRE},
+- {"BufWriteCmd", EVENT_BUFWRITECMD},
+- {"CmdlineChanged", EVENT_CMDLINECHANGED},
+- {"CmdlineEnter", EVENT_CMDLINEENTER},
+- {"CmdlineLeave", EVENT_CMDLINELEAVE},
+- {"CmdwinEnter", EVENT_CMDWINENTER},
+- {"CmdwinLeave", EVENT_CMDWINLEAVE},
+- {"CmdUndefined", EVENT_CMDUNDEFINED},
+- {"ColorScheme", EVENT_COLORSCHEME},
+- {"ColorSchemePre", EVENT_COLORSCHEMEPRE},
+- {"CompleteDone", EVENT_COMPLETEDONE},
+- {"CursorHold", EVENT_CURSORHOLD},
+- {"CursorHoldI", EVENT_CURSORHOLDI},
+- {"CursorMoved", EVENT_CURSORMOVED},
+- {"CursorMovedI", EVENT_CURSORMOVEDI},
+- {"DiffUpdated", EVENT_DIFFUPDATED},
+- {"DirChanged", EVENT_DIRCHANGED},
+- {"EncodingChanged", EVENT_ENCODINGCHANGED},
+- {"ExitPre", EVENT_EXITPRE},
+- {"FileEncoding", EVENT_ENCODINGCHANGED},
+- {"FileAppendPost", EVENT_FILEAPPENDPOST},
+- {"FileAppendPre", EVENT_FILEAPPENDPRE},
+- {"FileAppendCmd", EVENT_FILEAPPENDCMD},
+- {"FileChangedShell",EVENT_FILECHANGEDSHELL},
+- {"FileChangedShellPost",EVENT_FILECHANGEDSHELLPOST},
+- {"FileChangedRO", EVENT_FILECHANGEDRO},
+- {"FileReadPost", EVENT_FILEREADPOST},
+- {"FileReadPre", EVENT_FILEREADPRE},
+- {"FileReadCmd", EVENT_FILEREADCMD},
+- {"FileType", EVENT_FILETYPE},
+- {"FileWritePost", EVENT_FILEWRITEPOST},
+- {"FileWritePre", EVENT_FILEWRITEPRE},
+- {"FileWriteCmd", EVENT_FILEWRITECMD},
+- {"FilterReadPost", EVENT_FILTERREADPOST},
+- {"FilterReadPre", EVENT_FILTERREADPRE},
+- {"FilterWritePost", EVENT_FILTERWRITEPOST},
+- {"FilterWritePre", EVENT_FILTERWRITEPRE},
+- {"FocusGained", EVENT_FOCUSGAINED},
+- {"FocusLost", EVENT_FOCUSLOST},
+- {"FuncUndefined", EVENT_FUNCUNDEFINED},
+- {"GUIEnter", EVENT_GUIENTER},
+- {"GUIFailed", EVENT_GUIFAILED},
+- {"InsertChange", EVENT_INSERTCHANGE},
+- {"InsertEnter", EVENT_INSERTENTER},
+- {"InsertLeave", EVENT_INSERTLEAVE},
+- {"InsertCharPre", EVENT_INSERTCHARPRE},
+- {"MenuPopup", EVENT_MENUPOPUP},
+- {"OptionSet", EVENT_OPTIONSET},
+- {"QuickFixCmdPost", EVENT_QUICKFIXCMDPOST},
+- {"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE},
+- {"QuitPre", EVENT_QUITPRE},
+- {"RemoteReply", EVENT_REMOTEREPLY},
+- {"SessionLoadPost", EVENT_SESSIONLOADPOST},
+- {"ShellCmdPost", EVENT_SHELLCMDPOST},
+- {"ShellFilterPost", EVENT_SHELLFILTERPOST},
+- {"SourceCmd", EVENT_SOURCECMD},
+- {"SourcePre", EVENT_SOURCEPRE},
+- {"SourcePost", EVENT_SOURCEPOST},
+- {"SpellFileMissing",EVENT_SPELLFILEMISSING},
+- {"StdinReadPost", EVENT_STDINREADPOST},
+- {"StdinReadPre", EVENT_STDINREADPRE},
+- {"SwapExists", EVENT_SWAPEXISTS},
+- {"Syntax", EVENT_SYNTAX},
+- {"TabNew", EVENT_TABNEW},
+- {"TabClosed", EVENT_TABCLOSED},
+- {"TabEnter", EVENT_TABENTER},
+- {"TabLeave", EVENT_TABLEAVE},
+- {"TermChanged", EVENT_TERMCHANGED},
+- {"TerminalOpen", EVENT_TERMINALOPEN},
+- {"TermResponse", EVENT_TERMRESPONSE},
+- {"TextChanged", EVENT_TEXTCHANGED},
+- {"TextChangedI", EVENT_TEXTCHANGEDI},
+- {"TextChangedP", EVENT_TEXTCHANGEDP},
+- {"User", EVENT_USER},
+- {"VimEnter", EVENT_VIMENTER},
+- {"VimLeave", EVENT_VIMLEAVE},
+- {"VimLeavePre", EVENT_VIMLEAVEPRE},
+- {"WinNew", EVENT_WINNEW},
+- {"WinEnter", EVENT_WINENTER},
+- {"WinLeave", EVENT_WINLEAVE},
+- {"VimResized", EVENT_VIMRESIZED},
+- {"TextYankPost", EVENT_TEXTYANKPOST},
+- {NULL, (event_T)0}
+- };
+-
+- static AutoPat *first_autopat[NUM_EVENTS] =
+- {
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+- };
+-
+- static AutoPat *last_autopat[NUM_EVENTS] =
+- {
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+- };
+-
+- /*
+- * struct used to keep status while executing autocommands for an event.
+- */
+- typedef struct AutoPatCmd
+- {
+- AutoPat *curpat; /* next AutoPat to examine */
+- AutoCmd *nextcmd; /* next AutoCmd to execute */
+- int group; /* group being used */
+- char_u *fname; /* fname to match with */
+- char_u *sfname; /* sfname to match with */
+- char_u *tail; /* tail of fname */
+- event_T event; /* current event */
+- int arg_bufnr; /* initially equal to <abuf>, set to zero when
+- buf is deleted */
+- struct AutoPatCmd *next; /* chain of active apc-s for auto-invalidation*/
+- } AutoPatCmd;
+-
+- static AutoPatCmd *active_apc_list = NULL; /* stack of active autocommands */
+-
+- /*
+- * augroups stores a list of autocmd group names.
+- */
+- static garray_T augroups = {0, 0, sizeof(char_u *), 10, NULL};
+- #define AUGROUP_NAME(i) (((char_u **)augroups.ga_data)[i])
+- /* use get_deleted_augroup() to get this */
+- static char_u *deleted_augroup = NULL;
+-
+- /*
+- * The ID of the current group. Group 0 is the default one.
+- */
+- static int current_augroup = AUGROUP_DEFAULT;
+-
+- static int au_need_clean = FALSE; /* need to delete marked patterns */
+-
+- static char_u *event_nr2name(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);
+- static void auto_next_pat(AutoPatCmd *apc, int stop_at_last);
+- static int match_file_pat(char_u *pattern, regprog_T **prog, char_u *fname, char_u *sfname, char_u *tail, int allow_dirs);
+-
+-
+- static event_T last_event;
+- static int last_group;
+- static int autocmd_blocked = 0; /* block all autocmds */
+-
+- static char_u *
+- get_deleted_augroup(void)
+- {
+- if (deleted_augroup == NULL)
+- deleted_augroup = (char_u *)_("--Deleted--");
+- return deleted_augroup;
+- }
+-
+- /*
+- * Show the autocommands for one AutoPat.
+- */
+- static void
+- show_autocmd(AutoPat *ap, event_T event)
+- {
+- AutoCmd *ac;
+-
+- /* Check for "got_int" (here and at various places below), which is set
+- * when "q" has been hit for the "--more--" prompt */
+- if (got_int)
+- return;
+- if (ap->pat == NULL) /* pattern has been removed */
+- return;
+-
+- msg_putchar('\n');
+- if (got_int)
+- return;
+- if (event != last_event || ap->group != last_group)
+- {
+- if (ap->group != AUGROUP_DEFAULT)
+- {
+- if (AUGROUP_NAME(ap->group) == NULL)
+- msg_puts_attr((char *)get_deleted_augroup(), HL_ATTR(HLF_E));
+- else
+- msg_puts_attr((char *)AUGROUP_NAME(ap->group), HL_ATTR(HLF_T));
+- msg_puts(" ");
+- }
+- msg_puts_attr((char *)event_nr2name(event), HL_ATTR(HLF_T));
+- last_event = event;
+- last_group = ap->group;
+- msg_putchar('\n');
+- if (got_int)
+- return;
+- }
+- msg_col = 4;
+- msg_outtrans(ap->pat);
+-
+- for (ac = ap->cmds; ac != NULL; ac = ac->next)
+- {
+- if (ac->cmd != NULL) /* skip removed commands */
+- {
+- if (msg_col >= 14)
+- msg_putchar('\n');
+- msg_col = 14;
+- if (got_int)
+- return;
+- msg_outtrans(ac->cmd);
+- #ifdef FEAT_EVAL
+- if (p_verbose > 0)
+- last_set_msg(ac->script_ctx);
+- #endif
+- if (got_int)
+- return;
+- if (ac->next != NULL)
+- {
+- msg_putchar('\n');
+- if (got_int)
+- return;
+- }
+- }
+- }
+- }
+-
+- /*
+- * Mark an autocommand pattern for deletion.
+- */
+- static void
+- au_remove_pat(AutoPat *ap)
+- {
+- VIM_CLEAR(ap->pat);
+- ap->buflocal_nr = -1;
+- au_need_clean = TRUE;
+- }
+-
+- /*
+- * Mark all commands for a pattern for deletion.
+- */
+- static void
+- au_remove_cmds(AutoPat *ap)
+- {
+- AutoCmd *ac;
+-
+- for (ac = ap->cmds; ac != NULL; ac = ac->next)
+- VIM_CLEAR(ac->cmd);
+- au_need_clean = TRUE;
+- }
+-
+- /*
+- * Cleanup autocommands and patterns that have been deleted.
+- * This is only done when not executing autocommands.
+- */
+- static void
+- au_cleanup(void)
+- {
+- AutoPat *ap, **prev_ap;
+- AutoCmd *ac, **prev_ac;
+- event_T event;
+-
+- if (autocmd_busy || !au_need_clean)
+- return;
+-
+- /* loop over all events */
+- for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
+- event = (event_T)((int)event + 1))
+- {
+- /* loop over all autocommand patterns */
+- prev_ap = &(first_autopat[(int)event]);
+- for (ap = *prev_ap; ap != NULL; ap = *prev_ap)
+- {
+- /* loop over all commands for this pattern */
+- prev_ac = &(ap->cmds);
+- for (ac = *prev_ac; ac != NULL; ac = *prev_ac)
+- {
+- /* remove the command if the pattern is to be deleted or when
+- * the command has been marked for deletion */
+- if (ap->pat == NULL || ac->cmd == NULL)
+- {
+- *prev_ac = ac->next;
+- vim_free(ac->cmd);
+- vim_free(ac);
+- }
+- else
+- prev_ac = &(ac->next);
+- }
+-
+- /* remove the pattern if it has been marked for deletion */
+- if (ap->pat == NULL)
+- {
+- if (ap->next == NULL)
+- {
+- if (prev_ap == &(first_autopat[(int)event]))
+- last_autopat[(int)event] = NULL;
+- else
+- /* this depends on the "next" field being the first in
+- * the struct */
+- last_autopat[(int)event] = (AutoPat *)prev_ap;
+- }
+- *prev_ap = ap->next;
+- vim_regfree(ap->reg_prog);
+- vim_free(ap);
+- }
+- else
+- prev_ap = &(ap->next);
+- }
+- }
+-
+- au_need_clean = FALSE;
+- }
+-
+- /*
+- * Called when buffer is freed, to remove/invalidate related buffer-local
+- * autocmds.
+- */
+- void
+- aubuflocal_remove(buf_T *buf)
+- {
+- AutoPat *ap;
+- event_T event;
+- AutoPatCmd *apc;
+-
+- /* invalidate currently executing autocommands */
+- for (apc = active_apc_list; apc; apc = apc->next)
+- if (buf->b_fnum == apc->arg_bufnr)
+- apc->arg_bufnr = 0;
+-
+- /* invalidate buflocals looping through events */
+- for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
+- event = (event_T)((int)event + 1))
+- /* loop over all autocommand patterns */
+- for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
+- if (ap->buflocal_nr == buf->b_fnum)
+- {
+- au_remove_pat(ap);
+- if (p_verbose >= 6)
+- {
+- verbose_enter();
+- smsg(_("auto-removing autocommand: %s <buffer=%d>"),
+- event_nr2name(event), buf->b_fnum);
+- verbose_leave();
+- }
+- }
+- au_cleanup();
+- }
+-
+- /*
+- * Add an autocmd group name.
+- * Return its ID. Returns AUGROUP_ERROR (< 0) for error.
+- */
+- static int
+- au_new_group(char_u *name)
+- {
+- int i;
+-
+- i = au_find_group(name);
+- if (i == AUGROUP_ERROR) /* the group doesn't exist yet, add it */
+- {
+- /* First try using a free entry. */
+- for (i = 0; i < augroups.ga_len; ++i)
+- if (AUGROUP_NAME(i) == NULL)
+- break;
+- if (i == augroups.ga_len && ga_grow(&augroups, 1) == FAIL)
+- return AUGROUP_ERROR;
+-
+- AUGROUP_NAME(i) = vim_strsave(name);
+- if (AUGROUP_NAME(i) == NULL)
+- return AUGROUP_ERROR;
+- if (i == augroups.ga_len)
+- ++augroups.ga_len;
+- }
+-
+- return i;
+- }
+-
+- static void
+- au_del_group(char_u *name)
+- {
+- int i;
+-
+- i = au_find_group(name);
+- if (i == AUGROUP_ERROR) /* the group doesn't exist */
+- semsg(_("E367: No such group: \"%s\""), name);
+- else if (i == current_augroup)
+- emsg(_("E936: Cannot delete the current group"));
+- else
+- {
+- event_T event;
+- AutoPat *ap;
+- int in_use = FALSE;
+-
+- for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
+- event = (event_T)((int)event + 1))
+- {
+- for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
+- if (ap->group == i && ap->pat != NULL)
+- {
+- give_warning((char_u *)_("W19: Deleting augroup that is still in use"), TRUE);
+- in_use = TRUE;
+- event = NUM_EVENTS;
+- break;
+- }
+- }
+- vim_free(AUGROUP_NAME(i));
+- if (in_use)
+- {
+- AUGROUP_NAME(i) = get_deleted_augroup();
+- }
+- else
+- AUGROUP_NAME(i) = NULL;
+- }
+- }
+-
+- /*
+- * 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)
+- {
+- int i;
+-
+- for (i = 0; i < augroups.ga_len; ++i)
+- if (AUGROUP_NAME(i) != NULL && AUGROUP_NAME(i) != get_deleted_augroup()
+- && STRCMP(AUGROUP_NAME(i), name) == 0)
+- return i;
+- return AUGROUP_ERROR;
+- }
+-
+- /*
+- * Return TRUE if augroup "name" exists.
+- */
+- int
+- au_has_group(char_u *name)
+- {
+- return au_find_group(name) != AUGROUP_ERROR;
+- }
+-
+- /*
+- * ":augroup {name}".
+- */
+- void
+- do_augroup(char_u *arg, int del_group)
+- {
+- int i;
+-
+- if (del_group)
+- {
+- if (*arg == NUL)
+- emsg(_(e_argreq));
+- else
+- au_del_group(arg);
+- }
+- else if (STRICMP(arg, "end") == 0) /* ":aug end": back to group 0 */
+- current_augroup = AUGROUP_DEFAULT;
+- else if (*arg) /* ":aug xxx": switch to group xxx */
+- {
+- i = au_new_group(arg);
+- if (i != AUGROUP_ERROR)
+- current_augroup = i;
+- }
+- else /* ":aug": list the group names */
+- {
+- msg_start();
+- for (i = 0; i < augroups.ga_len; ++i)
+- {
+- if (AUGROUP_NAME(i) != NULL)
+- {
+- msg_puts((char *)AUGROUP_NAME(i));
+- msg_puts(" ");
+- }
+- }
+- msg_clr_eos();
+- msg_end();
+- }
+- }
+-
+- #if defined(EXITFREE) || defined(PROTO)
+- void
+- free_all_autocmds(void)
+- {
+- int i;
+- char_u *s;
+-
+- for (current_augroup = -1; current_augroup < augroups.ga_len;
+- ++current_augroup)
+- do_autocmd((char_u *)"", TRUE);
+-
+- for (i = 0; i < augroups.ga_len; ++i)
+- {
+- s = ((char_u **)(augroups.ga_data))[i];
+- if (s != get_deleted_augroup())
+- vim_free(s);
+- }
+- ga_clear(&augroups);
+- }
+- #endif
+-
+- /*
+- * Return the event number for event name "start".
+- * Return NUM_EVENTS if the event name was not found.
+- * Return a pointer to the next event name in "end".
+- */
+- static event_T
+- event_name2nr(char_u *start, char_u **end)
+- {
+- char_u *p;
+- int i;
+- int len;
+-
+- /* the event name ends with end of line, '|', a blank or a comma */
+- for (p = start; *p && !VIM_ISWHITE(*p) && *p != ',' && *p != '|'; ++p)
+- ;
+- for (i = 0; event_names[i].name != NULL; ++i)
+- {
+- len = (int)STRLEN(event_names[i].name);
+- if (len == p - start && STRNICMP(event_names[i].name, start, len) == 0)
+- break;
+- }
+- if (*p == ',')
+- ++p;
+- *end = p;
+- if (event_names[i].name == NULL)
+- return NUM_EVENTS;
+- return event_names[i].event;
+- }
+-
+- /*
+- * Return the name for event "event".
+- */
+- static char_u *
+- event_nr2name(event_T event)
+- {
+- int i;
+-
+- for (i = 0; event_names[i].name != NULL; ++i)
+- if (event_names[i].event == event)
+- return (char_u *)event_names[i].name;
+- return (char_u *)"Unknown";
+- }
+-
+- /*
+- * Scan over the events. "*" stands for all events.
+- */
+- static char_u *
+- find_end_event(
+- char_u *arg,
+- int have_group) /* TRUE when group name was found */
+- {
+- char_u *pat;
+- char_u *p;
+-
+- if (*arg == '*')
+- {
+- if (arg[1] && !VIM_ISWHITE(arg[1]))
+- {
+- semsg(_("E215: Illegal character after *: %s"), arg);
+- return NULL;
+- }
+- pat = arg + 1;
+- }
+- else
+- {
+- for (pat = arg; *pat && *pat != '|' && !VIM_ISWHITE(*pat); pat = p)
+- {
+- if ((int)event_name2nr(pat, &p) >= (int)NUM_EVENTS)
+- {
+- if (have_group)
+- semsg(_("E216: No such event: %s"), pat);
+- else
+- semsg(_("E216: No such group or event: %s"), pat);
+- return NULL;
+- }
+- }
+- }
+- return pat;
+- }
+-
+- /*
+- * Return TRUE if "event" is included in 'eventignore'.
+- */
+- static int
+- event_ignored(event_T event)
+- {
+- char_u *p = p_ei;
+-
+- while (*p != NUL)
+- {
+- if (STRNICMP(p, "all", 3) == 0 && (p[3] == NUL || p[3] == ','))
+- return TRUE;
+- if (event_name2nr(p, &p) == event)
+- return TRUE;
+- }
+-
+- return FALSE;
+- }
+-
+- /*
+- * Return OK when the contents of p_ei is valid, FAIL otherwise.
+- */
+- int
+- check_ei(void)
+- {
+- char_u *p = p_ei;
+-
+- while (*p)
+- {
+- if (STRNICMP(p, "all", 3) == 0 && (p[3] == NUL || p[3] == ','))
+- {
+- p += 3;
+- if (*p == ',')
+- ++p;
+- }
+- else if (event_name2nr(p, &p) == NUM_EVENTS)
+- return FAIL;
+- }
+-
+- return OK;
+- }
+-
+- # if defined(FEAT_SYN_HL) || defined(PROTO)
+-
+- /*
+- * Add "what" to 'eventignore' to skip loading syntax highlighting for every
+- * buffer loaded into the window. "what" must start with a comma.
+- * Returns the old value of 'eventignore' in allocated memory.
+- */
+- char_u *
+- au_event_disable(char *what)
+- {
+- char_u *new_ei;
+- char_u *save_ei;
+-
+- save_ei = vim_strsave(p_ei);
+- if (save_ei != NULL)
+- {
+- new_ei = vim_strnsave(p_ei, (int)(STRLEN(p_ei) + STRLEN(what)));
+- if (new_ei != NULL)
+- {
+- if (*what == ',' && *p_ei == NUL)
+- STRCPY(new_ei, what + 1);
+- else
+- STRCAT(new_ei, what);
+- set_string_option_direct((char_u *)"ei", -1, new_ei,
+- OPT_FREE, SID_NONE);
+- vim_free(new_ei);
+- }
+- }
+- return save_ei;
+- }
+-
+- void
+- au_event_restore(char_u *old_ei)
+- {
+- if (old_ei != NULL)
+- {
+- set_string_option_direct((char_u *)"ei", -1, old_ei,
+- OPT_FREE, SID_NONE);
+- vim_free(old_ei);
+- }
+- }
+- # endif /* FEAT_SYN_HL */
+-
+- /*
+- * do_autocmd() -- implements the :autocmd command. Can be used in the
+- * following ways:
+- *
+- * :autocmd <event> <pat> <cmd> Add <cmd> to the list of commands that
+- * will be automatically executed for <event>
+- * when editing a file matching <pat>, in
+- * the current group.
+- * :autocmd <event> <pat> Show the autocommands associated with
+- * <event> and <pat>.
+- * :autocmd <event> Show the autocommands associated with
+- * <event>.
+- * :autocmd Show all autocommands.
+- * :autocmd! <event> <pat> <cmd> Remove all autocommands associated with
+- * <event> and <pat>, and add the command
+- * <cmd>, for the current group.
+- * :autocmd! <event> <pat> Remove all autocommands associated with
+- * <event> and <pat> for the current group.
+- * :autocmd! <event> Remove all autocommands associated with
+- * <event> for the current group.
+- * :autocmd! Remove ALL autocommands for the current
+- * group.
+- *
+- * Multiple events and patterns may be given separated by commas. Here are
+- * some examples:
+- * :autocmd bufread,bufenter *.c,*.h set tw=0 smartindent noic
+- * :autocmd bufleave * set tw=79 nosmartindent ic infercase
+- *
+- * :autocmd * *.c show all autocommands for *.c files.
+- *
+- * Mostly a {group} argument can optionally appear before <event>.
+- */
+- void
+- do_autocmd(char_u *arg_in, int forceit)
+- {
+- char_u *arg = arg_in;
+- char_u *pat;
+- char_u *envpat = NULL;
+- char_u *cmd;
+- event_T event;
+- int need_free = FALSE;
+- int nested = FALSE;
+- int group;
+-
+- if (*arg == '|')
+- {
+- arg = (char_u *)"";
+- group = AUGROUP_ALL; /* no argument, use all groups */
+- }
+- else
+- {
+- /*
+- * Check for a legal group name. If not, use AUGROUP_ALL.
+- */
+- group = au_get_grouparg(&arg);
+- if (arg == NULL) /* out of memory */
+- return;
+- }
+-
+- /*
+- * Scan over the events.
+- * If we find an illegal name, return here, don't do anything.
+- */
+- pat = find_end_event(arg, group != AUGROUP_ALL);
+- if (pat == NULL)
+- return;
+-
+- pat = skipwhite(pat);
+- if (*pat == '|')
+- {
+- pat = (char_u *)"";
+- cmd = (char_u *)"";
+- }
+- else
+- {
+- /*
+- * Scan over the pattern. Put a NUL at the end.
+- */
+- cmd = pat;
+- while (*cmd && (!VIM_ISWHITE(*cmd) || cmd[-1] == '\\'))
+- cmd++;
+- if (*cmd)
+- *cmd++ = NUL;
+-
+- /* Expand environment variables in the pattern. Set 'shellslash', we want
+- * forward slashes here. */
+- if (vim_strchr(pat, '$') != NULL || vim_strchr(pat, '~') != NULL)
+- {
+- #ifdef BACKSLASH_IN_FILENAME
+- int p_ssl_save = p_ssl;
+-
+- p_ssl = TRUE;
+- #endif
+- envpat = expand_env_save(pat);
+- #ifdef BACKSLASH_IN_FILENAME
+- p_ssl = p_ssl_save;
+- #endif
+- if (envpat != NULL)
+- pat = envpat;
+- }
+-
+- /*
+- * Check for "nested" flag.
+- */
+- cmd = skipwhite(cmd);
+- if (*cmd != NUL && STRNCMP(cmd, "nested", 6) == 0 && VIM_ISWHITE(cmd[6]))
+- {
+- nested = TRUE;
+- cmd = skipwhite(cmd + 6);
+- }
+-
+- /*
+- * Find the start of the commands.
+- * Expand <sfile> in it.
+- */
+- if (*cmd != NUL)
+- {
+- cmd = expand_sfile(cmd);
+- if (cmd == NULL) /* some error */
+- return;
+- need_free = TRUE;
+- }
+- }
+-
+- /*
+- * Print header when showing autocommands.
+- */
+- if (!forceit && *cmd == NUL)
+- {
+- /* Highlight title */
+- msg_puts_title(_("\n--- Autocommands ---"));
+- }
+-
+- /*
+- * Loop over the events.
+- */
+- last_event = (event_T)-1; /* for listing the event name */
+- last_group = AUGROUP_ERROR; /* for listing the group name */
+- if (*arg == '*' || *arg == NUL || *arg == '|')
+- {
+- for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
+- event = (event_T)((int)event + 1))
+- if (do_autocmd_event(event, pat,
+- nested, cmd, forceit, group) == FAIL)
+- break;
+- }
+- else
+- {
+- while (*arg && *arg != '|' && !VIM_ISWHITE(*arg))
+- if (do_autocmd_event(event_name2nr(arg, &arg), pat,
+- nested, cmd, forceit, group) == FAIL)
+- break;
+- }
+-
+- if (need_free)
+- vim_free(cmd);
+- vim_free(envpat);
+- }
+-
+- /*
+- * Find the group ID in a ":autocmd" or ":doautocmd" argument.
+- * The "argp" argument is advanced to the following argument.
+- *
+- * Returns the group ID, AUGROUP_ERROR for error (out of memory).
+- */
+- static int
+- au_get_grouparg(char_u **argp)
+- {
+- char_u *group_name;
+- char_u *p;
+- char_u *arg = *argp;
+- int group = AUGROUP_ALL;
+-
+- for (p = arg; *p && !VIM_ISWHITE(*p) && *p != '|'; ++p)
+- ;
+- if (p > arg)
+- {
+- group_name = vim_strnsave(arg, (int)(p - arg));
+- if (group_name == NULL) /* out of memory */
+- return AUGROUP_ERROR;
+- group = au_find_group(group_name);
+- if (group == AUGROUP_ERROR)
+- group = AUGROUP_ALL; /* no match, use all groups */
+- else
+- *argp = skipwhite(p); /* match, skip over group name */
+- vim_free(group_name);
+- }
+- return group;
+- }
+-
+- /*
+- * do_autocmd() for one event.
+- * If *pat == NUL do for all patterns.
+- * If *cmd == NUL show entries.
+- * If forceit == TRUE delete entries.
+- * If group is not AUGROUP_ALL, only use this group.
+- */
+- static int
+- do_autocmd_event(
+- event_T event,
+- char_u *pat,
+- int nested,
+- char_u *cmd,
+- int forceit,
+- int group)
+- {
+- AutoPat *ap;
+- AutoPat **prev_ap;
+- AutoCmd *ac;
+- AutoCmd **prev_ac;
+- int brace_level;
+- char_u *endpat;
+- int findgroup;
+- int allgroups;
+- int patlen;
+- int is_buflocal;
+- int buflocal_nr;
+- char_u buflocal_pat[25]; /* for "<buffer=X>" */
+-
+- if (group == AUGROUP_ALL)
+- findgroup = current_augroup;
+- else
+- findgroup = group;
+- allgroups = (group == AUGROUP_ALL && !forceit && *cmd == NUL);
+-
+- /*
+- * Show or delete all patterns for an event.
+- */
+- if (*pat == NUL)
+- {
+- for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
+- {
+- if (forceit) /* delete the AutoPat, if it's in the current group */
+- {
+- if (ap->group == findgroup)
+- au_remove_pat(ap);
+- }
+- else if (group == AUGROUP_ALL || ap->group == group)
+- show_autocmd(ap, event);
+- }
+- }
+-
+- /*
+- * Loop through all the specified patterns.
+- */
+- for ( ; *pat; pat = (*endpat == ',' ? endpat + 1 : endpat))
+- {
+- /*
+- * Find end of the pattern.
+- * Watch out for a comma in braces, like "*.\{obj,o\}".
+- */
+- brace_level = 0;
+- for (endpat = pat; *endpat && (*endpat != ',' || brace_level
+- || (endpat > pat && endpat[-1] == '\\')); ++endpat)
+- {
+- if (*endpat == '{')
+- brace_level++;
+- else if (*endpat == '}')
+- brace_level--;
+- }
+- if (pat == endpat) /* ignore single comma */
+- continue;
+- patlen = (int)(endpat - pat);
+-
+- /*
+- * detect special <buflocal[=X]> buffer-local patterns
+- */
+- is_buflocal = FALSE;
+- buflocal_nr = 0;
+-
+- if (patlen >= 8 && STRNCMP(pat, "<buffer", 7) == 0
+- && pat[patlen - 1] == '>')
+- {
+- /* "<buffer...>": Error will be printed only for addition.
+- * printing and removing will proceed silently. */
+- is_buflocal = TRUE;
+- if (patlen == 8)
+- /* "<buffer>" */
+- buflocal_nr = curbuf->b_fnum;
+- else if (patlen > 9 && pat[7] == '=')
+- {
+- if (patlen == 13 && STRNICMP(pat, "<buffer=abuf>", 13) == 0)
+- /* "<buffer=abuf>" */
+- buflocal_nr = autocmd_bufnr;
+- else if (skipdigits(pat + 8) == pat + patlen - 1)
+- /* "<buffer=123>" */
+- buflocal_nr = atoi((char *)pat + 8);
+- }
+- }
+-
+- if (is_buflocal)
+- {
+- /* normalize pat into standard "<buffer>#N" form */
+- sprintf((char *)buflocal_pat, "<buffer=%d>", buflocal_nr);
+- pat = buflocal_pat; /* can modify pat and patlen */
+- patlen = (int)STRLEN(buflocal_pat); /* but not endpat */
+- }
+-
+- /*
+- * Find AutoPat entries with this pattern. When adding a command it
+- * always goes at or after the last one, so start at the end.
+- */
+- if (!forceit && *cmd != NUL && last_autopat[(int)event] != NULL)
+- prev_ap = &last_autopat[(int)event];
+- else
+- prev_ap = &first_autopat[(int)event];
+- while ((ap = *prev_ap) != NULL)
+- {
+- if (ap->pat != NULL)
+- {
+- /* Accept a pattern when:
+- * - a group was specified and it's that group, or a group was
+- * not specified and it's the current group, or a group was
+- * not specified and we are listing
+- * - the length of the pattern matches
+- * - the pattern matches.
+- * For <buffer[=X]>, this condition works because we normalize
+- * all buffer-local patterns.
+- */
+- if ((allgroups || ap->group == findgroup)
+- && ap->patlen == patlen
+- && STRNCMP(pat, ap->pat, patlen) == 0)
+- {
+- /*
+- * Remove existing autocommands.
+- * If adding any new autocmd's for this AutoPat, don't
+- * delete the pattern from the autopat list, append to
+- * this list.
+- */
+- if (forceit)
+- {
+- if (*cmd != NUL && ap->next == NULL)
+- {
+- au_remove_cmds(ap);
+- break;
+- }
+- au_remove_pat(ap);
+- }
+-
+- /*
+- * Show autocmd's for this autopat, or buflocals <buffer=X>
+- */
+- else if (*cmd == NUL)
+- show_autocmd(ap, event);
+-
+- /*
+- * Add autocmd to this autopat, if it's the last one.
+- */
+- else if (ap->next == NULL)
+- break;
+- }
+- }
+- prev_ap = &ap->next;
+- }
+-
+- /*
+- * Add a new command.
+- */
+- if (*cmd != NUL)
+- {
+- /*
+- * If the pattern we want to add a command to does appear at the
+- * end of the list (or not is not in the list at all), add the
+- * pattern at the end of the list.
+- */
+- if (ap == NULL)
+- {
+- /* refuse to add buffer-local ap if buffer number is invalid */
+- if (is_buflocal && (buflocal_nr == 0
+- || buflist_findnr(buflocal_nr) == NULL))
+- {
+- semsg(_("E680: <buffer=%d>: invalid buffer number "),
+- buflocal_nr);
+- return FAIL;
+- }
+-
+- ap = (AutoPat *)alloc((unsigned)sizeof(AutoPat));
+- if (ap == NULL)
+- return FAIL;
+- ap->pat = vim_strnsave(pat, patlen);
+- ap->patlen = patlen;
+- if (ap->pat == NULL)
+- {
+- vim_free(ap);
+- return FAIL;
+- }
+-
+- if (is_buflocal)
+- {
+- ap->buflocal_nr = buflocal_nr;
+- ap->reg_prog = NULL;
+- }
+- else
+- {
+- char_u *reg_pat;
+-
+- ap->buflocal_nr = 0;
+- reg_pat = file_pat_to_reg_pat(pat, endpat,
+- &ap->allow_dirs, TRUE);
+- if (reg_pat != NULL)
+- ap->reg_prog = vim_regcomp(reg_pat, RE_MAGIC);
+- vim_free(reg_pat);
+- if (reg_pat == NULL || ap->reg_prog == NULL)
+- {
+- vim_free(ap->pat);
+- vim_free(ap);
+- return FAIL;
+- }
+- }
+- ap->cmds = NULL;
+- *prev_ap = ap;
+- last_autopat[(int)event] = ap;
+- ap->next = NULL;
+- if (group == AUGROUP_ALL)
+- ap->group = current_augroup;
+- else
+- ap->group = group;
+- }
+-
+- /*
+- * Add the autocmd at the end of the AutoCmd list.
+- */
+- prev_ac = &(ap->cmds);
+- while ((ac = *prev_ac) != NULL)
+- prev_ac = &ac->next;
+- ac = (AutoCmd *)alloc((unsigned)sizeof(AutoCmd));
+- if (ac == NULL)
+- 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)
+- {
+- vim_free(ac);
+- return FAIL;
+- }
+- ac->next = NULL;
+- *prev_ac = ac;
+- ac->nested = nested;
+- }
+- }
+-
+- au_cleanup(); /* may really delete removed patterns/commands now */
+- return OK;
+- }
+-
+- /*
+- * Implementation of ":doautocmd [group] event [fname]".
+- * Return OK for success, FAIL for failure;
+- */
+- int
+- do_doautocmd(
+- char_u *arg,
+- int do_msg, /* give message for no matching autocmds? */
+- int *did_something)
+- {
+- char_u *fname;
+- int nothing_done = TRUE;
+- int group;
+-
+- if (did_something != NULL)
+- *did_something = FALSE;
+-
+- /*
+- * Check for a legal group name. If not, use AUGROUP_ALL.
+- */
+- group = au_get_grouparg(&arg);
+- if (arg == NULL) /* out of memory */
+- return FAIL;
+-
+- if (*arg == '*')
+- {
+- emsg(_("E217: Can't execute autocommands for ALL events"));
+- return FAIL;
+- }
+-
+- /*
+- * Scan over the events.
+- * If we find an illegal name, return here, don't do anything.
+- */
+- fname = find_end_event(arg, group != AUGROUP_ALL);
+- if (fname == NULL)
+- return FAIL;
+-
+- fname = skipwhite(fname);
+-
+- /*
+- * Loop over the events.
+- */
+- while (*arg && !ends_excmd(*arg) && !VIM_ISWHITE(*arg))
+- if (apply_autocmds_group(event_name2nr(arg, &arg),
+- fname, NULL, TRUE, group, curbuf, NULL))
+- nothing_done = FALSE;
+-
+- if (nothing_done && do_msg)
+- msg(_("No matching autocommands"));
+- if (did_something != NULL)
+- *did_something = !nothing_done;
+-
+- #ifdef FEAT_EVAL
+- return aborting() ? FAIL : OK;
+- #else
+- return OK;
+- #endif
+- }
+-
+- /*
+- * ":doautoall": execute autocommands for each loaded buffer.
+- */
+- void
+- ex_doautoall(exarg_T *eap)
+- {
+- int retval;
+- aco_save_T aco;
+- buf_T *buf;
+- bufref_T bufref;
+- char_u *arg = eap->arg;
+- int call_do_modelines = check_nomodeline(&arg);
+- int did_aucmd;
+-
+- /*
+- * This is a bit tricky: For some commands curwin->w_buffer needs to be
+- * equal to curbuf, but for some buffers there may not be a window.
+- * So we change the buffer for the current window for a moment. This
+- * gives problems when the autocommands make changes to the list of
+- * buffers or windows...
+- */
+- FOR_ALL_BUFFERS(buf)
+- {
+- if (buf->b_ml.ml_mfp != NULL)
+- {
+- /* find a window for this buffer and save some values */
+- aucmd_prepbuf(&aco, buf);
+- set_bufref(&bufref, buf);
+-
+- /* execute the autocommands for this buffer */
+- retval = do_doautocmd(arg, FALSE, &did_aucmd);
+-
+- if (call_do_modelines && did_aucmd)
+- {
+- /* Execute the modeline settings, but don't set window-local
+- * options if we are using the current window for another
+- * buffer. */
+- do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0);
+- }
+-
+- /* restore the current window */
+- aucmd_restbuf(&aco);
+-
+- /* stop if there is some error or buffer was deleted */
+- if (retval == FAIL || !bufref_valid(&bufref))
+- break;
+- }
+- }
+-
+- check_cursor(); /* just in case lines got deleted */
+- }
+-
+- /*
+- * Check *argp for <nomodeline>. When it is present return FALSE, otherwise
+- * return TRUE and advance *argp to after it.
+- * Thus return TRUE when do_modelines() should be called.
+- */
+- int
+- check_nomodeline(char_u **argp)
+- {
+- if (STRNCMP(*argp, "<nomodeline>", 12) == 0)
+- {
+- *argp = skipwhite(*argp + 12);
+- return FALSE;
+- }
+- return TRUE;
+- }
+-
+- /*
+- * Prepare for executing autocommands for (hidden) buffer "buf".
+- * Search for a visible window containing the current buffer. If there isn't
+- * one then use "aucmd_win".
+- * Set "curbuf" and "curwin" to match "buf".
+- */
+- void
+- aucmd_prepbuf(
+- aco_save_T *aco, /* structure to save values in */
+- buf_T *buf) /* new curbuf */
+- {
+- win_T *win;
+- int save_ea;
+- #ifdef FEAT_AUTOCHDIR
+- int save_acd;
+- #endif
+-
+- /* Find a window that is for the new buffer */
+- if (buf == curbuf) /* be quick when buf is curbuf */
+- win = curwin;
+- else
+- FOR_ALL_WINDOWS(win)
+- if (win->w_buffer == buf)
+- break;
+-
+- /* Allocate "aucmd_win" when needed. If this fails (out of memory) fall
+- * back to using the current window. */
+- if (win == NULL && aucmd_win == NULL)
+- {
+- win_alloc_aucmd_win();
+- if (aucmd_win == NULL)
+- win = curwin;
+- }
+- if (win == NULL && aucmd_win_used)
+- /* Strange recursive autocommand, fall back to using the current
+- * window. Expect a few side effects... */
+- win = curwin;
+-
+- aco->save_curwin = curwin;
+- aco->save_curbuf = curbuf;
+- aco->save_prevwin = prevwin;
+- if (win != NULL)
+- {
+- /* There is a window for "buf" in the current tab page, make it the
+- * curwin. This is preferred, it has the least side effects (esp. if
+- * "buf" is curbuf). */
+- aco->use_aucmd_win = FALSE;
+- curwin = win;
+- }
+- else
+- {
+- /* There is no window for "buf", use "aucmd_win". To minimize the side
+- * effects, insert it in the current tab page.
+- * Anything related to a window (e.g., setting folds) may have
+- * unexpected results. */
+- aco->use_aucmd_win = TRUE;
+- aucmd_win_used = TRUE;
+- aucmd_win->w_buffer = buf;
+- #if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
+- aucmd_win->w_s = &buf->b_s;
+- #endif
+- ++buf->b_nwindows;
+- win_init_empty(aucmd_win); /* set cursor and topline to safe values */
+-
+- /* Make sure w_localdir and globaldir are NULL to avoid a chdir() in
+- * win_enter_ext(). */
+- VIM_CLEAR(aucmd_win->w_localdir);
+- aco->globaldir = globaldir;
+- globaldir = NULL;
+-
+-
+- /* Split the current window, put the aucmd_win in the upper half.
+- * We don't want the BufEnter or WinEnter autocommands. */
+- block_autocmds();
+- make_snapshot(SNAP_AUCMD_IDX);
+- save_ea = p_ea;
+- p_ea = FALSE;
+-
+- #ifdef FEAT_AUTOCHDIR
+- /* Prevent chdir() call in win_enter_ext(), through do_autochdir(). */
+- save_acd = p_acd;
+- p_acd = FALSE;
+- #endif
+-
+- (void)win_split_ins(0, WSP_TOP, aucmd_win, 0);
+- (void)win_comp_pos(); /* recompute window positions */
+- p_ea = save_ea;
+- #ifdef FEAT_AUTOCHDIR
+- p_acd = save_acd;
+- #endif
+- unblock_autocmds();
+- curwin = aucmd_win;
+- }
+- curbuf = buf;
+- aco->new_curwin = curwin;
+- set_bufref(&aco->new_curbuf, curbuf);
+- }
+-
+- /*
+- * Cleanup after executing autocommands for a (hidden) buffer.
+- * Restore the window as it was (if possible).
+- */
+- void
+- aucmd_restbuf(
+- aco_save_T *aco) /* structure holding saved values */
+- {
+- int dummy;
+-
+- if (aco->use_aucmd_win)
+- {
+- --curbuf->b_nwindows;
+- /* Find "aucmd_win", it can't be closed, but it may be in another tab
+- * page. Do not trigger autocommands here. */
+- block_autocmds();
+- if (curwin != aucmd_win)
+- {
+- tabpage_T *tp;
+- win_T *wp;
+-
+- FOR_ALL_TAB_WINDOWS(tp, wp)
+- {
+- if (wp == aucmd_win)
+- {
+- if (tp != curtab)
+- goto_tabpage_tp(tp, TRUE, TRUE);
+- win_goto(aucmd_win);
+- goto win_found;
+- }
+- }
+- }
+- win_found:
+-
+- /* Remove the window and frame from the tree of frames. */
+- (void)winframe_remove(curwin, &dummy, NULL);
+- win_remove(curwin, NULL);
+- aucmd_win_used = FALSE;
+- last_status(FALSE); /* may need to remove last status line */
+-
+- if (!valid_tabpage_win(curtab))
+- /* no valid window in current tabpage */
+- close_tabpage(curtab);
+-
+- restore_snapshot(SNAP_AUCMD_IDX, FALSE);
+- (void)win_comp_pos(); /* recompute window positions */
+- unblock_autocmds();
+-
+- if (win_valid(aco->save_curwin))
+- curwin = aco->save_curwin;
+- else
+- /* Hmm, original window disappeared. Just use the first one. */
+- curwin = firstwin;
+- if (win_valid(aco->save_prevwin))
+- prevwin = aco->save_prevwin;
+- #ifdef FEAT_EVAL
+- vars_clear(&aucmd_win->w_vars->dv_hashtab); /* free all w: variables */
+- hash_init(&aucmd_win->w_vars->dv_hashtab); /* re-use the hashtab */
+- #endif
+- curbuf = curwin->w_buffer;
+-
+- vim_free(globaldir);
+- globaldir = aco->globaldir;
+-
+- /* the buffer contents may have changed */
+- check_cursor();
+- if (curwin->w_topline > curbuf->b_ml.ml_line_count)
+- {
+- curwin->w_topline = curbuf->b_ml.ml_line_count;
+- #ifdef FEAT_DIFF
+- curwin->w_topfill = 0;
+- #endif
+- }
+- #if defined(FEAT_GUI)
+- /* Hide the scrollbars from the aucmd_win and update. */
+- gui_mch_enable_scrollbar(&aucmd_win->w_scrollbars[SBAR_LEFT], FALSE);
+- gui_mch_enable_scrollbar(&aucmd_win->w_scrollbars[SBAR_RIGHT], FALSE);
+- gui_may_update_scrollbars();
+- #endif
+- }
+- else
+- {
+- /* restore curwin */
+- if (win_valid(aco->save_curwin))
+- {
+- /* Restore the buffer which was previously edited by curwin, if
+- * it was changed, we are still the same window and the buffer is
+- * valid. */
+- if (curwin == aco->new_curwin
+- && curbuf != aco->new_curbuf.br_buf
+- && bufref_valid(&aco->new_curbuf)
+- && aco->new_curbuf.br_buf->b_ml.ml_mfp != NULL)
+- {
+- # if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
+- if (curwin->w_s == &curbuf->b_s)
+- curwin->w_s = &aco->new_curbuf.br_buf->b_s;
+- # endif
+- --curbuf->b_nwindows;
+- curbuf = aco->new_curbuf.br_buf;
+- curwin->w_buffer = curbuf;
+- ++curbuf->b_nwindows;
+- }
+-
+- curwin = aco->save_curwin;
+- curbuf = curwin->w_buffer;
+- if (win_valid(aco->save_prevwin))
+- prevwin = aco->save_prevwin;
+- /* In case the autocommand move the cursor to a position that that
+- * not exist in curbuf. */
+- check_cursor();
+- }
+- }
+- }
+-
+- static int autocmd_nested = FALSE;
+-
+- /*
+- * Execute autocommands for "event" and file name "fname".
+- * Return TRUE if some commands were executed.
+- */
+- int
+- apply_autocmds(
+- event_T event,
+- char_u *fname, /* NULL or empty means use actual file name */
+- char_u *fname_io, /* fname to use for <afile> on cmdline */
+- int force, /* when TRUE, ignore autocmd_busy */
+- buf_T *buf) /* buffer for <abuf> */
+- {
+- return apply_autocmds_group(event, fname, fname_io, force,
+- AUGROUP_ALL, buf, NULL);
+- }
+-
+- /*
+- * Like apply_autocmds(), but with extra "eap" argument. This takes care of
+- * setting v:filearg.
+- */
+- static int
+- apply_autocmds_exarg(
+- event_T event,
+- char_u *fname,
+- char_u *fname_io,
+- int force,
+- buf_T *buf,
+- exarg_T *eap)
+- {
+- return apply_autocmds_group(event, fname, fname_io, force,
+- AUGROUP_ALL, buf, eap);
+- }
+-
+- /*
+- * Like apply_autocmds(), but handles the caller's retval. If the script
+- * processing is being aborted or if retval is FAIL when inside a try
+- * conditional, no autocommands are executed. If otherwise the autocommands
+- * cause the script to be aborted, retval is set to FAIL.
+- */
+- int
+- apply_autocmds_retval(
+- event_T event,
+- char_u *fname, /* NULL or empty means use actual file name */
+- char_u *fname_io, /* fname to use for <afile> on cmdline */
+- int force, /* when TRUE, ignore autocmd_busy */
+- buf_T *buf, /* buffer for <abuf> */
+- int *retval) /* pointer to caller's retval */
+- {
+- int did_cmd;
+-
+- #ifdef FEAT_EVAL
+- if (should_abort(*retval))
+- return FALSE;
+- #endif
+-
+- did_cmd = apply_autocmds_group(event, fname, fname_io, force,
+- AUGROUP_ALL, buf, NULL);
+- if (did_cmd
+- #ifdef FEAT_EVAL
+- && aborting()
+- #endif
+- )
+- *retval = FAIL;
+- return did_cmd;
+- }
+-
+- /*
+- * Return TRUE when there is a CursorHold autocommand defined.
+- */
+- int
+- has_cursorhold(void)
+- {
+- return (first_autopat[(int)(get_real_state() == NORMAL_BUSY
+- ? EVENT_CURSORHOLD : EVENT_CURSORHOLDI)] != NULL);
+- }
+-
+- /*
+- * Return TRUE if the CursorHold event can be triggered.
+- */
+- int
+- trigger_cursorhold(void)
+- {
+- int state;
+-
+- if (!did_cursorhold
+- && has_cursorhold()
+- && reg_recording == 0
+- && typebuf.tb_len == 0
+- #ifdef FEAT_INS_EXPAND
+- && !ins_compl_active()
+- #endif
+- )
+- {
+- state = get_real_state();
+- if (state == NORMAL_BUSY || (state & INSERT) != 0)
+- return TRUE;
+- }
+- return FALSE;
+- }
+-
+- /*
+- * Return TRUE when there is a CursorMoved autocommand defined.
+- */
+- int
+- has_cursormoved(void)
+- {
+- return (first_autopat[(int)EVENT_CURSORMOVED] != NULL);
+- }
+-
+- #if defined(FEAT_CONCEAL) || defined(PROTO)
+- /*
+- * Return TRUE when there is a CursorMovedI autocommand defined.
+- */
+- int
+- has_cursormovedI(void)
+- {
+- return (first_autopat[(int)EVENT_CURSORMOVEDI] != NULL);
+- }
+- #endif
+-
+- /*
+- * Return TRUE when there is a TextChanged autocommand defined.
+- */
+- int
+- has_textchanged(void)
+- {
+- return (first_autopat[(int)EVENT_TEXTCHANGED] != NULL);
+- }
+-
+- /*
+- * Return TRUE when there is a TextChangedI autocommand defined.
+- */
+- int
+- has_textchangedI(void)
+- {
+- return (first_autopat[(int)EVENT_TEXTCHANGEDI] != NULL);
+- }
+-
+- #if defined(FEAT_INS_EXPAND) || defined(PROTO)
+- /*
+- * Return TRUE when there is a TextChangedP autocommand defined.
+- */
+- int
+- has_textchangedP(void)
+- {
+- return (first_autopat[(int)EVENT_TEXTCHANGEDP] != NULL);
+- }
+- #endif
+-
+- /*
+- * Return TRUE when there is an InsertCharPre autocommand defined.
+- */
+- int
+- has_insertcharpre(void)
+- {
+- return (first_autopat[(int)EVENT_INSERTCHARPRE] != NULL);
+- }
+-
+- /*
+- * Return TRUE when there is an CmdUndefined autocommand defined.
+- */
+- int
+- has_cmdundefined(void)
+- {
+- return (first_autopat[(int)EVENT_CMDUNDEFINED] != NULL);
+- }
+-
+- /*
+- * Return TRUE when there is an FuncUndefined autocommand defined.
+- */
+- int
+- has_funcundefined(void)
+- {
+- return (first_autopat[(int)EVENT_FUNCUNDEFINED] != NULL);
+- }
+-
+- #if defined(FEAT_EVAL) || defined(PROTO)
+- /*
+- * Return TRUE when there is a TextYankPost autocommand defined.
+- */
+- int
+- has_textyankpost(void)
+- {
+- return (first_autopat[(int)EVENT_TEXTYANKPOST] != NULL);
+- }
+- #endif
+-
+- /*
+- * Execute autocommands for "event" and file name "fname".
+- * Return TRUE if some commands were executed.
+- */
+- static int
+- apply_autocmds_group(
+- event_T event,
+- char_u *fname, /* NULL or empty means use actual file name */
+- char_u *fname_io, /* fname to use for <afile> on cmdline, NULL means
+- use fname */
+- int force, /* when TRUE, ignore autocmd_busy */
+- int group, /* group ID, or AUGROUP_ALL */
+- buf_T *buf, /* buffer for <abuf> */
+- exarg_T *eap UNUSED) /* command arguments */
+- {
+- char_u *sfname = NULL; /* short file name */
+- char_u *tail;
+- int save_changed;
+- buf_T *old_curbuf;
+- int retval = FALSE;
+- char_u *save_sourcing_name;
+- linenr_T save_sourcing_lnum;
+- char_u *save_autocmd_fname;
+- int save_autocmd_fname_full;
+- int save_autocmd_bufnr;
+- char_u *save_autocmd_match;
+- int save_autocmd_busy;
+- int save_autocmd_nested;
+- static int nesting = 0;
+- AutoPatCmd patcmd;
+- AutoPat *ap;
+- #ifdef FEAT_EVAL
+- sctx_T save_current_sctx;
+- funccal_entry_T funccal_entry;
+- char_u *save_cmdarg;
+- long save_cmdbang;
+- #endif
+- static int filechangeshell_busy = FALSE;
+- #ifdef FEAT_PROFILE
+- proftime_T wait_time;
+- #endif
+- int did_save_redobuff = FALSE;
+- save_redo_T save_redo;
+- int save_KeyTyped = KeyTyped;
+-
+- /*
+- * Quickly return if there are no autocommands for this event or
+- * autocommands are blocked.
+- */
+- if (event == NUM_EVENTS || first_autopat[(int)event] == NULL
+- || autocmd_blocked > 0)
+- goto BYPASS_AU;
+-
+- /*
+- * When autocommands are busy, new autocommands are only executed when
+- * explicitly enabled with the "nested" flag.
+- */
+- if (autocmd_busy && !(force || autocmd_nested))
+- goto BYPASS_AU;
+-
+- #ifdef FEAT_EVAL
+- /*
+- * Quickly return when immediately aborting on error, or when an interrupt
+- * occurred or an exception was thrown but not caught.
+- */
+- if (aborting())
+- goto BYPASS_AU;
+- #endif
+-
+- /*
+- * FileChangedShell never nests, because it can create an endless loop.
+- */
+- if (filechangeshell_busy && (event == EVENT_FILECHANGEDSHELL
+- || event == EVENT_FILECHANGEDSHELLPOST))
+- goto BYPASS_AU;
+-
+- /*
+- * Ignore events in 'eventignore'.
+- */
+- if (event_ignored(event))
+- goto BYPASS_AU;
+-
+- /*
+- * Allow nesting of autocommands, but restrict the depth, because it's
+- * possible to create an endless loop.
+- */
+- if (nesting == 10)
+- {
+- emsg(_("E218: autocommand nesting too deep"));
+- goto BYPASS_AU;
+- }
+-
+- /*
+- * Check if these autocommands are disabled. Used when doing ":all" or
+- * ":ball".
+- */
+- if ( (autocmd_no_enter
+- && (event == EVENT_WINENTER || event == EVENT_BUFENTER))
+- || (autocmd_no_leave
+- && (event == EVENT_WINLEAVE || event == EVENT_BUFLEAVE)))
+- goto BYPASS_AU;
+-
+- /*
+- * Save the autocmd_* variables and info about the current buffer.
+- */
+- save_autocmd_fname = autocmd_fname;
+- save_autocmd_fname_full = autocmd_fname_full;
+- save_autocmd_bufnr = autocmd_bufnr;
+- save_autocmd_match = autocmd_match;
+- save_autocmd_busy = autocmd_busy;
+- save_autocmd_nested = autocmd_nested;
+- save_changed = curbuf->b_changed;
+- old_curbuf = curbuf;
+-
+- /*
+- * Set the file name to be used for <afile>.
+- * Make a copy to avoid that changing a buffer name or directory makes it
+- * invalid.
+- */
+- if (fname_io == NULL)
+- {
+- if (event == EVENT_COLORSCHEME || event == EVENT_COLORSCHEMEPRE
+- || event == EVENT_OPTIONSET)
+- autocmd_fname = NULL;
+- else if (fname != NULL && !ends_excmd(*fname))
+- autocmd_fname = fname;
+- else if (buf != NULL)
+- autocmd_fname = buf->b_ffname;
+- else
+- autocmd_fname = NULL;
+- }
+- else
+- autocmd_fname = fname_io;
+- if (autocmd_fname != NULL)
+- autocmd_fname = vim_strsave(autocmd_fname);
+- autocmd_fname_full = FALSE; /* call FullName_save() later */
+-
+- /*
+- * Set the buffer number to be used for <abuf>.
+- */
+- if (buf == NULL)
+- autocmd_bufnr = 0;
+- else
+- autocmd_bufnr = buf->b_fnum;
+-
+- /*
+- * When the file name is NULL or empty, use the file name of buffer "buf".
+- * Always use the full path of the file name to match with, in case
+- * "allow_dirs" is set.
+- */
+- if (fname == NULL || *fname == NUL)
+- {
+- if (buf == NULL)
+- fname = NULL;
+- else
+- {
+- #ifdef FEAT_SYN_HL
+- if (event == EVENT_SYNTAX)
+- fname = buf->b_p_syn;
+- else
+- #endif
+- if (event == EVENT_FILETYPE)
+- fname = buf->b_p_ft;
+- else
+- {
+- if (buf->b_sfname != NULL)
+- sfname = vim_strsave(buf->b_sfname);
+- fname = buf->b_ffname;
+- }
+- }
+- if (fname == NULL)
+- fname = (char_u *)"";
+- fname = vim_strsave(fname); /* make a copy, so we can change it */
+- }
+- else
+- {
+- sfname = vim_strsave(fname);
+- /* Don't try expanding FileType, Syntax, FuncUndefined, WindowID,
+- * ColorScheme, QuickFixCmd* or DirChanged */
+- if (event == EVENT_FILETYPE
+- || event == EVENT_SYNTAX
+- || event == EVENT_CMDLINECHANGED
+- || event == EVENT_CMDLINEENTER
+- || event == EVENT_CMDLINELEAVE
+- || event == EVENT_CMDWINENTER
+- || event == EVENT_CMDWINLEAVE
+- || event == EVENT_CMDUNDEFINED
+- || event == EVENT_FUNCUNDEFINED
+- || event == EVENT_REMOTEREPLY
+- || event == EVENT_SPELLFILEMISSING
+- || event == EVENT_QUICKFIXCMDPRE
+- || event == EVENT_COLORSCHEME
+- || event == EVENT_COLORSCHEMEPRE
+- || event == EVENT_OPTIONSET
+- || event == EVENT_QUICKFIXCMDPOST
+- || event == EVENT_DIRCHANGED)
+- {
+- fname = vim_strsave(fname);
+- autocmd_fname_full = TRUE; /* don't expand it later */
+- }
+- else
+- fname = FullName_save(fname, FALSE);
+- }
+- if (fname == NULL) /* out of memory */
+- {
+- vim_free(sfname);
+- retval = FALSE;
+- goto BYPASS_AU;
+- }
+-
+- #ifdef BACKSLASH_IN_FILENAME
+- /*
+- * Replace all backslashes with forward slashes. This makes the
+- * autocommand patterns portable between Unix and MS-DOS.
+- */
+- if (sfname != NULL)
+- forward_slash(sfname);
+- forward_slash(fname);
+- #endif
+-
+- #ifdef VMS
+- /* remove version for correct match */
+- if (sfname != NULL)
+- vms_remove_version(sfname);
+- vms_remove_version(fname);
+- #endif
+-
+- /*
+- * Set the name to be used for <amatch>.
+- */
+- autocmd_match = fname;
+-
+-
+- /* Don't redraw while doing autocommands. */
+- ++RedrawingDisabled;
+- save_sourcing_name = sourcing_name;
+- sourcing_name = NULL; /* don't free this one */
+- save_sourcing_lnum = sourcing_lnum;
+- sourcing_lnum = 0; /* no line number here */
+-
+- #ifdef FEAT_EVAL
+- save_current_sctx = current_sctx;
+-
+- # ifdef FEAT_PROFILE
+- if (do_profiling == PROF_YES)
+- 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
+-
+- /*
+- * When starting to execute autocommands, save the search patterns.
+- */
+- if (!autocmd_busy)
+- {
+- save_search_patterns();
+- #ifdef FEAT_INS_EXPAND
+- if (!ins_compl_active())
+- #endif
+- {
+- saveRedobuff(&save_redo);
+- did_save_redobuff = TRUE;
+- }
+- did_filetype = keep_filetype;
+- }
+-
+- /*
+- * Note that we are applying autocmds. Some commands need to know.
+- */
+- autocmd_busy = TRUE;
+- filechangeshell_busy = (event == EVENT_FILECHANGEDSHELL);
+- ++nesting; /* see matching decrement below */
+-
+- /* Remember that FileType was triggered. Used for did_filetype(). */
+- if (event == EVENT_FILETYPE)
+- did_filetype = TRUE;
+-
+- tail = gettail(fname);
+-
+- /* Find first autocommand that matches */
+- patcmd.curpat = first_autopat[(int)event];
+- patcmd.nextcmd = NULL;
+- patcmd.group = group;
+- patcmd.fname = fname;
+- patcmd.sfname = sfname;
+- patcmd.tail = tail;
+- patcmd.event = event;
+- patcmd.arg_bufnr = autocmd_bufnr;
+- patcmd.next = NULL;
+- auto_next_pat(&patcmd, FALSE);
+-
+- /* found one, start executing the autocommands */
+- if (patcmd.curpat != NULL)
+- {
+- /* add to active_apc_list */
+- patcmd.next = active_apc_list;
+- active_apc_list = &patcmd;
+-
+- #ifdef FEAT_EVAL
+- /* set v:cmdarg (only when there is a matching pattern) */
+- save_cmdbang = (long)get_vim_var_nr(VV_CMDBANG);
+- if (eap != NULL)
+- {
+- save_cmdarg = set_cmdarg(eap, NULL);
+- set_vim_var_nr(VV_CMDBANG, (long)eap->forceit);
+- }
+- else
+- save_cmdarg = NULL; /* avoid gcc warning */
+- #endif
+- retval = TRUE;
+- /* mark the last pattern, to avoid an endless loop when more patterns
+- * are added when executing autocommands */
+- for (ap = patcmd.curpat; ap->next != NULL; ap = ap->next)
+- ap->last = FALSE;
+- ap->last = TRUE;
+- check_lnums(TRUE); /* make sure cursor and topline are valid */
+- do_cmdline(NULL, getnextac, (void *)&patcmd,
+- DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
+- #ifdef FEAT_EVAL
+- if (eap != NULL)
+- {
+- (void)set_cmdarg(NULL, save_cmdarg);
+- set_vim_var_nr(VV_CMDBANG, save_cmdbang);
+- }
+- #endif
+- /* delete from active_apc_list */
+- if (active_apc_list == &patcmd) /* just in case */
+- active_apc_list = patcmd.next;
+- }
+-
+- --RedrawingDisabled;
+- autocmd_busy = save_autocmd_busy;
+- filechangeshell_busy = FALSE;
+- autocmd_nested = save_autocmd_nested;
+- vim_free(sourcing_name);
+- sourcing_name = save_sourcing_name;
+- sourcing_lnum = save_sourcing_lnum;
+- vim_free(autocmd_fname);
+- autocmd_fname = save_autocmd_fname;
+- autocmd_fname_full = save_autocmd_fname_full;
+- autocmd_bufnr = save_autocmd_bufnr;
+- 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);
+- # endif
+- #endif
+- KeyTyped = save_KeyTyped;
+- vim_free(fname);
+- vim_free(sfname);
+- --nesting; /* see matching increment above */
+-
+- /*
+- * When stopping to execute autocommands, restore the search patterns and
+- * the redo buffer. Free any buffers in the au_pending_free_buf list and
+- * free any windows in the au_pending_free_win list.
+- */
+- if (!autocmd_busy)
+- {
+- restore_search_patterns();
+- if (did_save_redobuff)
+- restoreRedobuff(&save_redo);
+- did_filetype = FALSE;
+- while (au_pending_free_buf != NULL)
+- {
+- buf_T *b = au_pending_free_buf->b_next;
+- vim_free(au_pending_free_buf);
+- au_pending_free_buf = b;
+- }
+- while (au_pending_free_win != NULL)
+- {
+- win_T *w = au_pending_free_win->w_next;
+- vim_free(au_pending_free_win);
+- au_pending_free_win = w;
+- }
+- }
+-
+- /*
+- * Some events don't set or reset the Changed flag.
+- * Check if still in the same buffer!
+- */
+- if (curbuf == old_curbuf
+- && (event == EVENT_BUFREADPOST
+- || event == EVENT_BUFWRITEPOST
+- || event == EVENT_FILEAPPENDPOST
+- || event == EVENT_VIMLEAVE
+- || event == EVENT_VIMLEAVEPRE))
+- {
+- #ifdef FEAT_TITLE
+- if (curbuf->b_changed != save_changed)
+- need_maketitle = TRUE;
+- #endif
+- curbuf->b_changed = save_changed;
+- }
+-
+- au_cleanup(); /* may really delete removed patterns/commands now */
+-
+- BYPASS_AU:
+- /* When wiping out a buffer make sure all its buffer-local autocommands
+- * are deleted. */
+- if (event == EVENT_BUFWIPEOUT && buf != NULL)
+- aubuflocal_remove(buf);
+-
+- if (retval == OK && event == EVENT_FILETYPE)
+- au_did_filetype = TRUE;
+-
+- return retval;
+- }
+-
+- # ifdef FEAT_EVAL
+- static char_u *old_termresponse = NULL;
+- # endif
+-
+- /*
+- * Block triggering autocommands until unblock_autocmd() is called.
+- * Can be used recursively, so long as it's symmetric.
+- */
+- void
+- block_autocmds(void)
+- {
+- # ifdef FEAT_EVAL
+- /* Remember the value of v:termresponse. */
+- if (autocmd_blocked == 0)
+- old_termresponse = get_vim_var_str(VV_TERMRESPONSE);
+- # endif
+- ++autocmd_blocked;
+- }
+-
+- void
+- unblock_autocmds(void)
+- {
+- --autocmd_blocked;
+-
+- # ifdef FEAT_EVAL
+- /* When v:termresponse was set while autocommands were blocked, trigger
+- * the autocommands now. Esp. useful when executing a shell command
+- * during startup (vimdiff). */
+- if (autocmd_blocked == 0
+- && get_vim_var_str(VV_TERMRESPONSE) != old_termresponse)
+- apply_autocmds(EVENT_TERMRESPONSE, NULL, NULL, FALSE, curbuf);
+- # endif
+- }
+-
+- #if defined(FEAT_EVAL) && (defined(FEAT_XIM) || defined(IME_WITHOUT_XIM)) \
+- || defined(PROTO)
+- int
+- is_autocmd_blocked(void)
+- {
+- return autocmd_blocked != 0;
+- }
+- #endif
+-
+- /*
+- * Find next autocommand pattern that matches.
+- */
+- static void
+- auto_next_pat(
+- AutoPatCmd *apc,
+- int stop_at_last) /* stop when 'last' flag is set */
+- {
+- AutoPat *ap;
+- AutoCmd *cp;
+- char_u *name;
+- char *s;
+-
+- VIM_CLEAR(sourcing_name);
+-
+- for (ap = apc->curpat; ap != NULL && !got_int; ap = ap->next)
+- {
+- apc->curpat = NULL;
+-
+- /* Only use a pattern when it has not been removed, has commands and
+- * the group matches. For buffer-local autocommands only check the
+- * buffer number. */
+- if (ap->pat != NULL && ap->cmds != NULL
+- && (apc->group == AUGROUP_ALL || apc->group == ap->group))
+- {
+- /* execution-condition */
+- if (ap->buflocal_nr == 0
+- ? (match_file_pat(NULL, &ap->reg_prog, apc->fname,
+- apc->sfname, apc->tail, ap->allow_dirs))
+- : ap->buflocal_nr == apc->arg_bufnr)
+- {
+- name = event_nr2name(apc->event);
+- s = _("%s Autocommands for \"%s\"");
+- sourcing_name = alloc((unsigned)(STRLEN(s)
+- + STRLEN(name) + ap->patlen + 1));
+- if (sourcing_name != NULL)
+- {
+- sprintf((char *)sourcing_name, s,
+- (char *)name, (char *)ap->pat);
+- if (p_verbose >= 8)
+- {
+- verbose_enter();
+- smsg(_("Executing %s"), sourcing_name);
+- verbose_leave();
+- }
+- }
+-
+- apc->curpat = ap;
+- apc->nextcmd = ap->cmds;
+- /* mark last command */
+- for (cp = ap->cmds; cp->next != NULL; cp = cp->next)
+- cp->last = FALSE;
+- cp->last = TRUE;
+- }
+- line_breakcheck();
+- if (apc->curpat != NULL) /* found a match */
+- break;
+- }
+- if (stop_at_last && ap->last)
+- break;
+- }
+- }
+-
+- /*
+- * Get next autocommand command.
+- * Called by do_cmdline() to get the next line for ":if".
+- * Returns allocated string, or NULL for end of autocommands.
+- */
+- char_u *
+- getnextac(int c UNUSED, void *cookie, int indent UNUSED)
+- {
+- AutoPatCmd *acp = (AutoPatCmd *)cookie;
+- char_u *retval;
+- AutoCmd *ac;
+-
+- /* Can be called again after returning the last line. */
+- if (acp->curpat == NULL)
+- return NULL;
+-
+- /* repeat until we find an autocommand to execute */
+- for (;;)
+- {
+- /* skip removed commands */
+- while (acp->nextcmd != NULL && acp->nextcmd->cmd == NULL)
+- if (acp->nextcmd->last)
+- acp->nextcmd = NULL;
+- else
+- acp->nextcmd = acp->nextcmd->next;
+-
+- if (acp->nextcmd != NULL)
+- break;
+-
+- /* at end of commands, find next pattern that matches */
+- if (acp->curpat->last)
+- acp->curpat = NULL;
+- else
+- acp->curpat = acp->curpat->next;
+- if (acp->curpat != NULL)
+- auto_next_pat(acp, TRUE);
+- if (acp->curpat == NULL)
+- return NULL;
+- }
+-
+- ac = acp->nextcmd;
+-
+- if (p_verbose >= 9)
+- {
+- verbose_enter_scroll();
+- smsg(_("autocommand %s"), ac->cmd);
+- msg_puts("\n"); /* don't overwrite this either */
+- verbose_leave_scroll();
+- }
+- retval = vim_strsave(ac->cmd);
+- autocmd_nested = ac->nested;
+- #ifdef FEAT_EVAL
+- current_sctx = ac->script_ctx;
+- #endif
+- if (ac->last)
+- acp->nextcmd = NULL;
+- else
+- acp->nextcmd = ac->next;
+- return retval;
+- }
+-
+- /*
+- * Return TRUE if there is a matching autocommand for "fname".
+- * To account for buffer-local autocommands, function needs to know
+- * in which buffer the file will be opened.
+- */
+- int
+- has_autocmd(event_T event, char_u *sfname, buf_T *buf)
+- {
+- AutoPat *ap;
+- char_u *fname;
+- char_u *tail = gettail(sfname);
+- int retval = FALSE;
+-
+- fname = FullName_save(sfname, FALSE);
+- if (fname == NULL)
+- return FALSE;
+-
+- #ifdef BACKSLASH_IN_FILENAME
+- /*
+- * Replace all backslashes with forward slashes. This makes the
+- * autocommand patterns portable between Unix and MS-DOS.
+- */
+- sfname = vim_strsave(sfname);
+- if (sfname != NULL)
+- forward_slash(sfname);
+- forward_slash(fname);
+- #endif
+-
+- for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
+- if (ap->pat != NULL && ap->cmds != NULL
+- && (ap->buflocal_nr == 0
+- ? match_file_pat(NULL, &ap->reg_prog,
+- fname, sfname, tail, ap->allow_dirs)
+- : buf != NULL && ap->buflocal_nr == buf->b_fnum
+- ))
+- {
+- retval = TRUE;
+- break;
+- }
+-
+- vim_free(fname);
+- #ifdef BACKSLASH_IN_FILENAME
+- vim_free(sfname);
+- #endif
+-
+- return retval;
+- }
+-
+- #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+- /*
+- * Function given to ExpandGeneric() to obtain the list of autocommand group
+- * names.
+- */
+- char_u *
+- get_augroup_name(expand_T *xp UNUSED, int idx)
+- {
+- if (idx == augroups.ga_len) /* add "END" add the end */
+- return (char_u *)"END";
+- if (idx >= augroups.ga_len) /* end of list */
+- return NULL;
+- if (AUGROUP_NAME(idx) == NULL || AUGROUP_NAME(idx) == get_deleted_augroup())
+- /* skip deleted entries */
+- return (char_u *)"";
+- return AUGROUP_NAME(idx); /* return a name */
+- }
+-
+- static int include_groups = FALSE;
+-
+- char_u *
+- set_context_in_autocmd(
+- expand_T *xp,
+- char_u *arg,
+- int doautocmd) /* TRUE for :doauto*, FALSE for :autocmd */
+- {
+- char_u *p;
+- int group;
+-
+- /* check for a group name, skip it if present */
+- include_groups = FALSE;
+- p = arg;
+- group = au_get_grouparg(&arg);
+- if (group == AUGROUP_ERROR)
+- return NULL;
+- /* If there only is a group name that's what we expand. */
+- if (*arg == NUL && group != AUGROUP_ALL && !VIM_ISWHITE(arg[-1]))
+- {
+- arg = p;
+- group = AUGROUP_ALL;
+- }
+-
+- /* skip over event name */
+- for (p = arg; *p != NUL && !VIM_ISWHITE(*p); ++p)
+- if (*p == ',')
+- arg = p + 1;
+- if (*p == NUL)
+- {
+- if (group == AUGROUP_ALL)
+- include_groups = TRUE;
+- xp->xp_context = EXPAND_EVENTS; /* expand event name */
+- xp->xp_pattern = arg;
+- return NULL;
+- }
+-
+- /* skip over pattern */
+- arg = skipwhite(p);
+- while (*arg && (!VIM_ISWHITE(*arg) || arg[-1] == '\\'))
+- arg++;
+- if (*arg)
+- return arg; /* expand (next) command */
+-
+- if (doautocmd)
+- xp->xp_context = EXPAND_FILES; /* expand file names */
+- else
+- xp->xp_context = EXPAND_NOTHING; /* pattern is not expanded */
+- return NULL;
+- }
+-
+- /*
+- * Function given to ExpandGeneric() to obtain the list of event names.
+- */
+- char_u *
+- get_event_name(expand_T *xp UNUSED, int idx)
+- {
+- if (idx < augroups.ga_len) /* First list group names, if wanted */
+- {
+- if (!include_groups || AUGROUP_NAME(idx) == NULL
+- || AUGROUP_NAME(idx) == get_deleted_augroup())
+- return (char_u *)""; /* skip deleted entries */
+- return AUGROUP_NAME(idx); /* return a name */
+- }
+- return (char_u *)event_names[idx - augroups.ga_len].name;
+- }
+-
+- #endif /* FEAT_CMDL_COMPL */
+-
+- #if defined(FEAT_EVAL) || defined(PROTO)
+- /*
+- * Return TRUE if autocmd is supported.
+- */
+- int
+- autocmd_supported(char_u *name)
+- {
+- char_u *p;
+-
+- return (event_name2nr(name, &p) != NUM_EVENTS);
+- }
+-
+- /*
+- * Return TRUE if an autocommand is defined for a group, event and
+- * pattern: The group can be omitted to accept any group. "event" and "pattern"
+- * can be NULL to accept any event and pattern. "pattern" can be NULL to accept
+- * any pattern. Buffer-local patterns <buffer> or <buffer=N> are accepted.
+- * Used for:
+- * exists("#Group") or
+- * exists("#Group#Event") or
+- * exists("#Group#Event#pat") or
+- * exists("#Event") or
+- * exists("#Event#pat")
+- */
+- int
+- au_exists(char_u *arg)
+- {
+- char_u *arg_save;
+- char_u *pattern = NULL;
+- char_u *event_name;
+- char_u *p;
+- event_T event;
+- AutoPat *ap;
+- buf_T *buflocal_buf = NULL;
+- int group;
+- int retval = FALSE;
+-
+- /* Make a copy so that we can change the '#' chars to a NUL. */
+- arg_save = vim_strsave(arg);
+- if (arg_save == NULL)
+- return FALSE;
+- p = vim_strchr(arg_save, '#');
+- if (p != NULL)
+- *p++ = NUL;
+-
+- /* First, look for an autocmd group name */
+- group = au_find_group(arg_save);
+- if (group == AUGROUP_ERROR)
+- {
+- /* Didn't match a group name, assume the first argument is an event. */
+- group = AUGROUP_ALL;
+- event_name = arg_save;
+- }
+- else
+- {
+- if (p == NULL)
+- {
+- /* "Group": group name is present and it's recognized */
+- retval = TRUE;
+- goto theend;
+- }
+-
+- /* Must be "Group#Event" or "Group#Event#pat". */
+- event_name = p;
+- p = vim_strchr(event_name, '#');
+- if (p != NULL)
+- *p++ = NUL; /* "Group#Event#pat" */
+- }
+-
+- pattern = p; /* "pattern" is NULL when there is no pattern */
+-
+- /* find the index (enum) for the event name */
+- event = event_name2nr(event_name, &p);
+-
+- /* return FALSE if the event name is not recognized */
+- if (event == NUM_EVENTS)
+- goto theend;
+-
+- /* Find the first autocommand for this event.
+- * If there isn't any, return FALSE;
+- * If there is one and no pattern given, return TRUE; */
+- ap = first_autopat[(int)event];
+- if (ap == NULL)
+- goto theend;
+-
+- /* if pattern is "<buffer>", special handling is needed which uses curbuf */
+- /* for pattern "<buffer=N>, fnamecmp() will work fine */
+- if (pattern != NULL && STRICMP(pattern, "<buffer>") == 0)
+- buflocal_buf = curbuf;
+-
+- /* Check if there is an autocommand with the given pattern. */
+- for ( ; ap != NULL; ap = ap->next)
+- /* only use a pattern when it has not been removed and has commands. */
+- /* For buffer-local autocommands, fnamecmp() works fine. */
+- if (ap->pat != NULL && ap->cmds != NULL
+- && (group == AUGROUP_ALL || ap->group == group)
+- && (pattern == NULL
+- || (buflocal_buf == NULL
+- ? fnamecmp(ap->pat, pattern) == 0
+- : ap->buflocal_nr == buflocal_buf->b_fnum)))
+- {
+- retval = TRUE;
+- break;
+- }
+-
+- theend:
+- vim_free(arg_save);
+- return retval;
+- }
+- #endif
+-
+-
+ /*
+ * Try matching a filename with a "pattern" ("prog" is NULL), or use the
+ * precompiled regprog "prog" ("pattern" is NULL). That avoids calling
+--- 7535,7540 ----
+***************
+*** 10118,10124 ****
+ * Used for autocommands and 'wildignore'.
+ * Returns TRUE if there is a match, FALSE otherwise.
+ */
+! static int
+ match_file_pat(
+ char_u *pattern, /* pattern to match with */
+ regprog_T **prog, /* pre-compiled regprog or NULL */
+--- 7542,7548 ----
+ * Used for autocommands and 'wildignore'.
+ * Returns TRUE if there is a match, FALSE otherwise.
+ */
+! int
+ match_file_pat(
+ char_u *pattern, /* pattern to match with */
+ regprog_T **prog, /* pre-compiled regprog or NULL */
+*** ../vim-8.1.0824/src/globals.h 2019-01-24 17:18:37.599462306 +0100
+--- src/globals.h 2019-01-26 15:16:55.569118519 +0100
+***************
+*** 397,402 ****
+--- 397,403 ----
+ EXTERN int autocmd_no_leave INIT(= FALSE); /* *Leave autocmds disabled */
+ EXTERN int modified_was_set; /* did ":set modified" */
+ EXTERN int did_filetype INIT(= FALSE); /* FileType event found */
++ EXTERN int au_did_filetype INIT(= FALSE);
+ EXTERN int keep_filetype INIT(= FALSE); /* value for did_filetype when
+ starting to execute
+ autocommands */
+*** ../vim-8.1.0824/src/proto.h 2019-01-24 17:18:37.599462306 +0100
+--- src/proto.h 2019-01-26 15:16:55.569118519 +0100
+***************
+*** 62,67 ****
+--- 62,68 ----
+ # include "crypt.pro"
+ # include "crypt_zip.pro"
+ # endif
++ # include "autocmd.pro"
+ # include "buffer.pro"
+ # include "charset.pro"
+ # ifdef FEAT_CSCOPE
+*** ../vim-8.1.0824/src/proto/autocmd.pro 2019-01-26 16:20:09.788993106 +0100
+--- src/proto/autocmd.pro 2019-01-26 15:18:20.796687736 +0100
+***************
+*** 0 ****
+--- 1,39 ----
++ /* autocmd.c */
++ void aubuflocal_remove(buf_T *buf);
++ int au_has_group(char_u *name);
++ void do_augroup(char_u *arg, int del_group);
++ void free_all_autocmds(void);
++ int check_ei(void);
++ char_u *au_event_disable(char *what);
++ void au_event_restore(char_u *old_ei);
++ void do_autocmd(char_u *arg_in, int forceit);
++ int do_doautocmd(char_u *arg, int do_msg, int *did_something);
++ void ex_doautoall(exarg_T *eap);
++ int check_nomodeline(char_u **argp);
++ void aucmd_prepbuf(aco_save_T *aco, buf_T *buf);
++ void aucmd_restbuf(aco_save_T *aco);
++ int apply_autocmds(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf);
++ int apply_autocmds_exarg(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, exarg_T *eap);
++ int apply_autocmds_retval(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, int *retval);
++ int has_cursorhold(void);
++ int trigger_cursorhold(void);
++ int has_cursormoved(void);
++ int has_cursormovedI(void);
++ int has_textchanged(void);
++ int has_textchangedI(void);
++ int has_textchangedP(void);
++ int has_insertcharpre(void);
++ int has_cmdundefined(void);
++ int has_funcundefined(void);
++ int has_textyankpost(void);
++ void block_autocmds(void);
++ void unblock_autocmds(void);
++ int is_autocmd_blocked(void);
++ char_u *getnextac(int c, void *cookie, int indent);
++ int has_autocmd(event_T event, char_u *sfname, buf_T *buf);
++ char_u *get_augroup_name(expand_T *xp, int idx);
++ char_u *set_context_in_autocmd(expand_T *xp, char_u *arg, int doautocmd);
++ char_u *get_event_name(expand_T *xp, int idx);
++ int autocmd_supported(char_u *name);
++ int au_exists(char_u *arg);
++ /* vim: set ft=c : */
+*** ../vim-8.1.0824/src/proto/fileio.pro 2018-05-17 13:52:36.000000000 +0200
+--- src/proto/fileio.pro 2019-01-26 15:18:24.756667414 +0100
+***************
+*** 28,69 ****
+ void vim_deltempdir(void);
+ char_u *vim_tempname(int extra_char, int keep);
+ void forward_slash(char_u *fname);
+! void aubuflocal_remove(buf_T *buf);
+! int au_has_group(char_u *name);
+! void do_augroup(char_u *arg, int del_group);
+! void free_all_autocmds(void);
+! int check_ei(void);
+! char_u *au_event_disable(char *what);
+! void au_event_restore(char_u *old_ei);
+! void do_autocmd(char_u *arg_in, int forceit);
+! int do_doautocmd(char_u *arg, int do_msg, int *did_something);
+! void ex_doautoall(exarg_T *eap);
+! int check_nomodeline(char_u **argp);
+! void aucmd_prepbuf(aco_save_T *aco, buf_T *buf);
+! void aucmd_restbuf(aco_save_T *aco);
+! int apply_autocmds(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf);
+! int apply_autocmds_retval(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, int *retval);
+! int has_cursorhold(void);
+! int trigger_cursorhold(void);
+! int has_cursormoved(void);
+! int has_cursormovedI(void);
+! int has_textchanged(void);
+! int has_textchangedI(void);
+! int has_textchangedP(void);
+! int has_insertcharpre(void);
+! int has_cmdundefined(void);
+! int has_funcundefined(void);
+! int has_textyankpost(void);
+! void block_autocmds(void);
+! void unblock_autocmds(void);
+! int is_autocmd_blocked(void);
+! char_u *getnextac(int c, void *cookie, int indent);
+! int has_autocmd(event_T event, char_u *sfname, buf_T *buf);
+! char_u *get_augroup_name(expand_T *xp, int idx);
+! char_u *set_context_in_autocmd(expand_T *xp, char_u *arg, int doautocmd);
+! char_u *get_event_name(expand_T *xp, int idx);
+! int autocmd_supported(char_u *name);
+! int au_exists(char_u *arg);
+ int match_file_list(char_u *list, char_u *sfname, char_u *ffname);
+ char_u *file_pat_to_reg_pat(char_u *pat, char_u *pat_end, char *allow_dirs, int no_bslash);
+ long read_eintr(int fd, void *buf, size_t bufsize);
+--- 28,34 ----
+ void vim_deltempdir(void);
+ char_u *vim_tempname(int extra_char, int keep);
+ void forward_slash(char_u *fname);
+! int match_file_pat(char_u *pattern, regprog_T **prog, char_u *fname, char_u *sfname, char_u *tail, int allow_dirs);
+ int match_file_list(char_u *list, char_u *sfname, char_u *ffname);
+ char_u *file_pat_to_reg_pat(char_u *pat, char_u *pat_end, char *allow_dirs, int no_bslash);
+ long read_eintr(int fd, void *buf, size_t bufsize);
+*** ../vim-8.1.0824/src/version.c 2019-01-26 15:12:52.558260916 +0100
+--- src/version.c 2019-01-26 15:18:32.780626166 +0100
+***************
+*** 789,790 ****
+--- 789,792 ----
+ { /* Add new patch number below this line */
++ /**/
++ 825,
+ /**/
+
+--
+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.0826 b/data/vim/patches/8.1.0826
new file mode 100644
index 000000000..f224fef2a
--- /dev/null
+++ b/data/vim/patches/8.1.0826
@@ -0,0 +1,3149 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0826
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0826
+Problem: Too many #ifdefs.
+Solution: Graduate FEAT_VIRTUALEDIT. Adds about 10Kbyte to the code.
+Files: src/buffer.c, src/charset.c, src/edit.c, src/eval.c,
+ src/evalfunc.c, src/ex_cmds.c, src/ex_docmd.c, src/feature.h,
+ src/globals.h, src/gui.c, src/if_py_both.h, src/macros.h,
+ src/mark.c, src/mbyte.c, src/memline.c, src/menu.c, src/misc1.c,
+ src/misc2.c, src/move.c, src/netbeans.c, src/normal.c, src/ops.c,
+ src/option.c, src/option.h, src/screen.c, src/search.c,
+ src/spell.c, src/structs.h, src/tag.c, src/ui.c, src/undo.c,
+ src/userfunc.c, src/version.c, src/vim.h, src/window.c
+
+
+*** ../vim-8.1.0825/src/buffer.c 2019-01-24 15:04:44.662887892 +0100
+--- src/buffer.c 2019-01-26 16:53:13.030607118 +0100
+***************
+*** 1729,1737 ****
+ /* Cursor on first line by default. */
+ curwin->w_cursor.lnum = 1;
+ curwin->w_cursor.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ curwin->w_set_curswant = TRUE;
+ curwin->w_topline_was_set = FALSE;
+
+--- 1729,1735 ----
+***************
+*** 2333,2341 ****
+ {
+ curwin->w_cursor.col = col;
+ check_cursor_col();
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ curwin->w_set_curswant = TRUE;
+ }
+ return OK;
+--- 2331,2337 ----
+***************
+*** 2363,2371 ****
+ {
+ curwin->w_cursor.col = fpos->col;
+ check_cursor_col();
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ curwin->w_set_curswant = TRUE;
+ }
+ }
+--- 2359,2365 ----
+***************
+*** 2958,2964 ****
+ buflist_findfpos(buf_T *buf)
+ {
+ wininfo_T *wip;
+! static pos_T no_position = INIT_POS_T(1, 0, 0);
+
+ wip = find_wininfo(buf, FALSE);
+ if (wip != NULL)
+--- 2952,2958 ----
+ buflist_findfpos(buf_T *buf)
+ {
+ wininfo_T *wip;
+! static pos_T no_position = {1, 0, 0};
+
+ wip = find_wininfo(buf, FALSE);
+ if (wip != NULL)
+***************
+*** 3955,3963 ****
+ // Line may have changed since checking the cursor column, or the lnum
+ // was adjusted above.
+ wp->w_cursor.col = (colnr_T)len;
+- #ifdef FEAT_VIRTUALEDIT
+ wp->w_cursor.coladd = 0;
+- #endif
+ byteval = 0;
+ }
+ else
+--- 3949,3955 ----
+*** ../vim-8.1.0825/src/charset.c 2019-01-24 15:54:17.794846944 +0100
+--- src/charset.c 2019-01-26 16:53:46.770374525 +0100
+***************
+*** 1365,1381 ****
+ colnr_T vcol;
+
+ curwin->w_p_list = FALSE;
+- #ifdef FEAT_VIRTUALEDIT
+ if (posp->coladd)
+ getvvcol(curwin, posp, NULL, &vcol, NULL);
+ else
+- #endif
+ getvcol(curwin, posp, NULL, &vcol, NULL);
+ curwin->w_p_list = list_save;
+ return vcol;
+ }
+
+- #if defined(FEAT_VIRTUALEDIT) || defined(PROTO)
+ /*
+ * Get virtual column in virtual mode.
+ */
+--- 1365,1378 ----
+***************
+*** 1425,1431 ****
+ else
+ getvcol(wp, pos, start, cursor, end);
+ }
+- #endif
+
+ /*
+ * Get the leftmost and rightmost virtual column of pos1 and pos2.
+--- 1422,1427 ----
+*** ../vim-8.1.0825/src/edit.c 2019-01-25 22:29:54.139821894 +0100
+--- src/edit.c 2019-01-26 16:55:18.241740105 +0100
+***************
+*** 1072,1085 ****
+ break;
+ ins_ctrl_o();
+
+- #ifdef FEAT_VIRTUALEDIT
+ /* don't move the cursor left when 'virtualedit' has "onemore". */
+ if (ve_flags & VE_ONEMORE)
+ {
+ ins_at_eol = FALSE;
+ nomove = TRUE;
+ }
+- #endif
+ count = 0;
+ goto doESCkey;
+
+--- 1072,1083 ----
+***************
+*** 7125,7138 ****
+ {
+ if (gchar_cursor() != NUL)
+ inc_cursor();
+! #ifdef FEAT_VIRTUALEDIT
+! /* If the cursor is still at the same character, also keep
+! * the "coladd". */
+ if (gchar_cursor() == NUL
+ && curwin->w_cursor.lnum == tpos.lnum
+ && curwin->w_cursor.col == tpos.col)
+ curwin->w_cursor.coladd = tpos.coladd;
+- #endif
+ }
+ }
+
+--- 7123,7134 ----
+ {
+ if (gchar_cursor() != NUL)
+ inc_cursor();
+! // If the cursor is still at the same character, also keep
+! // the "coladd".
+ if (gchar_cursor() == NUL
+ && curwin->w_cursor.lnum == tpos.lnum
+ && curwin->w_cursor.col == tpos.col)
+ curwin->w_cursor.coladd = tpos.coladd;
+ }
+ }
+
+***************
+*** 7182,7190 ****
+ if (VIsual.col > len)
+ {
+ VIsual.col = len;
+- #ifdef FEAT_VIRTUALEDIT
+ VIsual.coladd = 0;
+- #endif
+ }
+ }
+ }
+--- 7178,7184 ----
+***************
+*** 7293,7301 ****
+ else
+ {
+ curwin->w_cursor.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+
+ if (flags & (BL_WHITE | BL_SOL))
+ {
+--- 7287,7293 ----
+***************
+*** 7323,7329 ****
+ char_u *ptr;
+ int l;
+
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ {
+ pos_T prevpos = curwin->w_cursor;
+--- 7315,7320 ----
+***************
+*** 7338,7344 ****
+ return (prevpos.col != curwin->w_cursor.col
+ || prevpos.coladd != curwin->w_cursor.coladd) ? OK : FAIL;
+ }
+- #endif
+
+ ptr = ml_get_cursor();
+ if (*ptr == NUL)
+--- 7329,7334 ----
+***************
+*** 7351,7361 ****
+
+ /* move "l" bytes right, but don't end up on the NUL, unless 'virtualedit'
+ * contains "onemore". */
+! if (ptr[l] == NUL
+! #ifdef FEAT_VIRTUALEDIT
+! && (ve_flags & VE_ONEMORE) == 0
+! #endif
+! )
+ return FAIL;
+ curwin->w_cursor.col += l;
+
+--- 7341,7347 ----
+
+ /* move "l" bytes right, but don't end up on the NUL, unless 'virtualedit'
+ * contains "onemore". */
+! if (ptr[l] == NUL && (ve_flags & VE_ONEMORE) == 0)
+ return FAIL;
+ curwin->w_cursor.col += l;
+
+***************
+*** 7366,7383 ****
+ int
+ oneleft(void)
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ {
+! # ifdef FEAT_LINEBREAK
+ int width;
+! # endif
+ int v = getviscol();
+
+ if (v == 0)
+ return FAIL;
+
+! # ifdef FEAT_LINEBREAK
+ /* We might get stuck on 'showbreak', skip over it. */
+ width = 1;
+ for (;;)
+--- 7352,7368 ----
+ int
+ oneleft(void)
+ {
+ if (virtual_active())
+ {
+! #ifdef FEAT_LINEBREAK
+ int width;
+! #endif
+ int v = getviscol();
+
+ if (v == 0)
+ return FAIL;
+
+! #ifdef FEAT_LINEBREAK
+ /* We might get stuck on 'showbreak', skip over it. */
+ width = 1;
+ for (;;)
+***************
+*** 7391,7399 ****
+ break;
+ ++width;
+ }
+! # else
+ coladvance(v - 1);
+! # endif
+
+ if (curwin->w_cursor.coladd == 1)
+ {
+--- 7376,7384 ----
+ break;
+ ++width;
+ }
+! #else
+ coladvance(v - 1);
+! #endif
+
+ if (curwin->w_cursor.coladd == 1)
+ {
+***************
+*** 7409,7415 ****
+ curwin->w_set_curswant = TRUE;
+ return OK;
+ }
+- #endif
+
+ if (curwin->w_cursor.col == 0)
+ return FAIL;
+--- 7394,7399 ----
+***************
+*** 8665,8674 ****
+ */
+ if (!nomove
+ && (curwin->w_cursor.col != 0
+! #ifdef FEAT_VIRTUALEDIT
+! || curwin->w_cursor.coladd > 0
+! #endif
+! )
+ && (restart_edit == NUL
+ || (gchar_cursor() == NUL && !VIsual_active))
+ #ifdef FEAT_RIGHTLEFT
+--- 8649,8655 ----
+ */
+ if (!nomove
+ && (curwin->w_cursor.col != 0
+! || curwin->w_cursor.coladd > 0)
+ && (restart_edit == NUL
+ || (gchar_cursor() == NUL && !VIsual_active))
+ #ifdef FEAT_RIGHTLEFT
+***************
+*** 8676,8682 ****
+ #endif
+ )
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ if (curwin->w_cursor.coladd > 0 || ve_flags == VE_ALL)
+ {
+ oneleft();
+--- 8657,8662 ----
+***************
+*** 8684,8690 ****
+ ++curwin->w_cursor.coladd;
+ }
+ else
+- #endif
+ {
+ --curwin->w_cursor.col;
+ /* Correct cursor for multi-byte character. */
+--- 8664,8669 ----
+***************
+*** 8874,8884 ****
+ restart_edit = 'R';
+ else
+ restart_edit = 'I';
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ ins_at_eol = FALSE; /* cursor always keeps its column */
+ else
+- #endif
+ ins_at_eol = (gchar_cursor() == NUL);
+ }
+
+--- 8853,8861 ----
+***************
+*** 9040,9046 ****
+ inc_cursor();
+ #endif
+
+- #ifdef FEAT_VIRTUALEDIT
+ /* Virtualedit:
+ * BACKSPACE_CHAR eats a virtual space
+ * BACKSPACE_WORD eats all coladd
+--- 9017,9022 ----
+***************
+*** 9060,9066 ****
+ }
+ curwin->w_cursor.coladd = 0;
+ }
+- #endif
+
+ /*
+ * Delete newline!
+--- 9036,9041 ----
+***************
+*** 9744,9752 ****
+ if (c == K_C_HOME)
+ curwin->w_cursor.lnum = 1;
+ curwin->w_cursor.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ curwin->w_curswant = 0;
+ start_arrow(&tpos);
+ }
+--- 9719,9725 ----
+***************
+*** 9797,9817 ****
+ foldOpenCursor();
+ #endif
+ undisplay_dollar();
+! if (gchar_cursor() != NUL
+! #ifdef FEAT_VIRTUALEDIT
+! || virtual_active()
+! #endif
+! )
+ {
+ start_arrow_with_change(&curwin->w_cursor, end_change);
+ if (!end_change)
+ AppendCharToRedobuff(K_RIGHT);
+ curwin->w_set_curswant = TRUE;
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ oneright();
+ else
+- #endif
+ {
+ if (has_mbyte)
+ curwin->w_cursor.col += (*mb_ptr2len)(ml_get_cursor());
+--- 9770,9784 ----
+ foldOpenCursor();
+ #endif
+ undisplay_dollar();
+! if (gchar_cursor() != NUL || virtual_active())
+ {
+ start_arrow_with_change(&curwin->w_cursor, end_change);
+ if (!end_change)
+ AppendCharToRedobuff(K_RIGHT);
+ curwin->w_set_curswant = TRUE;
+ if (virtual_active())
+ oneright();
+ else
+ {
+ if (has_mbyte)
+ curwin->w_cursor.col += (*mb_ptr2len)(ml_get_cursor());
+***************
+*** 10268,10279 ****
+ * in open_line().
+ */
+
+- #ifdef FEAT_VIRTUALEDIT
+ /* Put cursor on NUL if on the last char and coladd is 1 (happens after
+ * CTRL-O). */
+ if (virtual_active() && curwin->w_cursor.coladd > 0)
+ coladvance(getviscol());
+- #endif
+
+ #ifdef FEAT_RIGHTLEFT
+ # ifdef FEAT_FKMAP
+--- 10235,10244 ----
+*** ../vim-8.1.0825/src/eval.c 2019-01-25 20:48:29.381157353 +0100
+--- src/eval.c 2019-01-26 16:55:31.845645313 +0100
+***************
+*** 6207,6218 ****
+ return NULL; /* invalid column number */
+ --pos.col;
+
+- #ifdef FEAT_VIRTUALEDIT
+ /* Get the virtual offset. Defaults to zero. */
+ pos.coladd = list_find_nr(l, 2L, &error);
+ if (error)
+ pos.coladd = 0;
+- #endif
+
+ return &pos;
+ }
+--- 6207,6216 ----
+***************
+*** 6236,6244 ****
+ return pp;
+ }
+
+- #ifdef FEAT_VIRTUALEDIT
+ pos.coladd = 0;
+- #endif
+
+ if (name[0] == 'w' && dollar_lnum)
+ {
+--- 6234,6240 ----
+***************
+*** 6323,6335 ****
+ return FAIL;
+ posp->col = n;
+
+- #ifdef FEAT_VIRTUALEDIT
+ n = list_find_nr(l, i, NULL); /* off */
+ if (n < 0)
+ posp->coladd = 0;
+ else
+ posp->coladd = n;
+- #endif
+
+ if (curswantp != NULL)
+ *curswantp = list_find_nr(l, i + 1, NULL); /* curswant */
+--- 6319,6329 ----
+*** ../vim-8.1.0825/src/evalfunc.c 2019-01-24 21:57:11.574719854 +0100
+--- src/evalfunc.c 2019-01-26 16:56:16.065336486 +0100
+***************
+*** 2517,2523 ****
+ else
+ {
+ col = fp->col + 1;
+- #ifdef FEAT_VIRTUALEDIT
+ /* col(".") when the cursor is on the NUL at the end of the line
+ * because of "coladd" can be seen as an extra column. */
+ if (virtual_active() && fp == &curwin->w_cursor)
+--- 2517,2522 ----
+***************
+*** 2533,2539 ****
+ col += l;
+ }
+ }
+- #endif
+ }
+ }
+ rettv->vval.v_number = col;
+--- 2532,2537 ----
+***************
+*** 2838,2846 ****
+ f_cursor(typval_T *argvars, typval_T *rettv)
+ {
+ long line, col;
+- #ifdef FEAT_VIRTUALEDIT
+ long coladd = 0;
+- #endif
+ int set_curswant = TRUE;
+
+ rettv->vval.v_number = -1;
+--- 2836,2842 ----
+***************
+*** 2856,2864 ****
+ }
+ line = pos.lnum;
+ col = pos.col;
+- #ifdef FEAT_VIRTUALEDIT
+ coladd = pos.coladd;
+- #endif
+ if (curswant >= 0)
+ {
+ curwin->w_curswant = curswant - 1;
+--- 2852,2858 ----
+***************
+*** 2869,2892 ****
+ {
+ line = tv_get_lnum(argvars);
+ col = (long)tv_get_number_chk(&argvars[1], NULL);
+- #ifdef FEAT_VIRTUALEDIT
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ coladd = (long)tv_get_number_chk(&argvars[2], NULL);
+- #endif
+ }
+! if (line < 0 || col < 0
+! #ifdef FEAT_VIRTUALEDIT
+! || coladd < 0
+! #endif
+! )
+ return; /* type error; errmsg already given */
+ if (line > 0)
+ curwin->w_cursor.lnum = line;
+ if (col > 0)
+ curwin->w_cursor.col = col - 1;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = coladd;
+- #endif
+
+ /* Make sure the cursor is in a valid position. */
+ check_cursor();
+--- 2863,2878 ----
+ {
+ line = tv_get_lnum(argvars);
+ col = (long)tv_get_number_chk(&argvars[1], NULL);
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ coladd = (long)tv_get_number_chk(&argvars[2], NULL);
+ }
+! if (line < 0 || col < 0 || coladd < 0)
+ return; /* type error; errmsg already given */
+ if (line > 0)
+ curwin->w_cursor.lnum = line;
+ if (col > 0)
+ curwin->w_cursor.col = col - 1;
+ curwin->w_cursor.coladd = coladd;
+
+ /* Make sure the cursor is in a valid position. */
+ check_cursor();
+***************
+*** 4810,4818 ****
+ return;
+ dict_add_number(d, "lnum", (long)buf->b_changelist[i].lnum);
+ dict_add_number(d, "col", (long)buf->b_changelist[i].col);
+- # ifdef FEAT_VIRTUALEDIT
+ dict_add_number(d, "coladd", (long)buf->b_changelist[i].coladd);
+- # endif
+ }
+ #endif
+ }
+--- 4796,4802 ----
+***************
+*** 5304,5312 ****
+ return;
+ dict_add_number(d, "lnum", (long)wp->w_jumplist[i].fmark.mark.lnum);
+ dict_add_number(d, "col", (long)wp->w_jumplist[i].fmark.mark.col);
+- # ifdef FEAT_VIRTUALEDIT
+ dict_add_number(d, "coladd", (long)wp->w_jumplist[i].fmark.mark.coladd);
+- # endif
+ dict_add_number(d, "bufnr", (long)wp->w_jumplist[i].fmark.fnum);
+ if (wp->w_jumplist[i].fname != NULL)
+ dict_add_string(d, "filename", wp->w_jumplist[i].fname);
+--- 5288,5294 ----
+***************
+*** 5483,5492 ****
+ list_append_number(l, (fp != NULL)
+ ? (varnumber_T)(fp->col == MAXCOL ? MAXCOL : fp->col + 1)
+ : (varnumber_T)0);
+! list_append_number(l,
+! #ifdef FEAT_VIRTUALEDIT
+! (fp != NULL) ? (varnumber_T)fp->coladd :
+! #endif
+ (varnumber_T)0);
+ if (getcurpos)
+ {
+--- 5465,5471 ----
+ list_append_number(l, (fp != NULL)
+ ? (varnumber_T)(fp->col == MAXCOL ? MAXCOL : fp->col + 1)
+ : (varnumber_T)0);
+! list_append_number(l, (fp != NULL) ? (varnumber_T)fp->coladd :
+ (varnumber_T)0);
+ if (getcurpos)
+ {
+***************
+*** 6574,6582 ****
+ "viminfo",
+ #endif
+ "vertsplit",
+- #ifdef FEAT_VIRTUALEDIT
+ "virtualedit",
+- #endif
+ "visual",
+ "visualextra",
+ "vreplace",
+--- 6553,6559 ----
+***************
+*** 14611,14620 ****
+ curwin->w_cursor.lnum = (linenr_T)dict_get_number(dict, (char_u *)"lnum");
+ if (dict_find(dict, (char_u *)"col", -1) != NULL)
+ curwin->w_cursor.col = (colnr_T)dict_get_number(dict, (char_u *)"col");
+- #ifdef FEAT_VIRTUALEDIT
+ if (dict_find(dict, (char_u *)"coladd", -1) != NULL)
+ curwin->w_cursor.coladd = (colnr_T)dict_get_number(dict, (char_u *)"coladd");
+- #endif
+ if (dict_find(dict, (char_u *)"curswant", -1) != NULL)
+ {
+ curwin->w_curswant = (colnr_T)dict_get_number(dict, (char_u *)"curswant");
+--- 14588,14595 ----
+***************
+*** 14661,14669 ****
+
+ dict_add_number(dict, "lnum", (long)curwin->w_cursor.lnum);
+ dict_add_number(dict, "col", (long)curwin->w_cursor.col);
+- #ifdef FEAT_VIRTUALEDIT
+ dict_add_number(dict, "coladd", (long)curwin->w_cursor.coladd);
+- #endif
+ update_curswant();
+ dict_add_number(dict, "curswant", (long)curwin->w_curswant);
+
+--- 14636,14642 ----
+*** ../vim-8.1.0825/src/ex_cmds.c 2019-01-24 15:04:44.666887862 +0100
+--- src/ex_cmds.c 2019-01-26 16:56:25.545270146 +0100
+***************
+*** 4332,4340 ****
+ /* 'sol' is off: Use last known column. */
+ curwin->w_cursor.col = solcol;
+ check_cursor_col();
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ curwin->w_set_curswant = TRUE;
+ }
+ else
+--- 4332,4338 ----
+*** ../vim-8.1.0825/src/ex_docmd.c 2019-01-24 15:54:17.782847030 +0100
+--- src/ex_docmd.c 2019-01-26 16:56:43.125146996 +0100
+***************
+*** 4650,4658 ****
+ pos.col = MAXCOL;
+ else
+ pos.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ pos.coladd = 0;
+- #endif
+ if (searchit(curwin, curbuf, &pos, NULL,
+ *cmd == '?' ? BACKWARD : FORWARD,
+ (char_u *)"", 1L, SEARCH_MSG,
+--- 4650,4656 ----
+***************
+*** 9421,9429 ****
+ oa.end.lnum = eap->line2;
+ oa.line_count = eap->line2 - eap->line1 + 1;
+ oa.motion_type = MLINE;
+- #ifdef FEAT_VIRTUALEDIT
+ virtual_op = FALSE;
+- #endif
+ if (eap->cmdidx != CMD_yank) /* position cursor for undo */
+ {
+ setpcmark();
+--- 9419,9425 ----
+***************
+*** 9460,9468 ****
+ op_shift(&oa, FALSE, eap->amount);
+ break;
+ }
+- #ifdef FEAT_VIRTUALEDIT
+ virtual_op = MAYBE;
+- #endif
+ ex_may_print(eap);
+ }
+
+--- 9456,9462 ----
+*** ../vim-8.1.0825/src/feature.h 2019-01-24 18:20:14.436543394 +0100
+--- src/feature.h 2019-01-26 17:08:35.436071531 +0100
+***************
+*** 199,208 ****
+
+ /*
+ * +virtualedit 'virtualedit' option and its implementation
+ */
+- #ifdef FEAT_NORMAL
+- # define FEAT_VIRTUALEDIT
+- #endif
+
+ /*
+ * +cmdline_info 'showcmd' and 'ruler' options.
+--- 199,206 ----
+
+ /*
+ * +virtualedit 'virtualedit' option and its implementation
++ * Now always included.
+ */
+
+ /*
+ * +cmdline_info 'showcmd' and 'ruler' options.
+*** ../vim-8.1.0825/src/globals.h 2019-01-26 16:20:44.264683546 +0100
+--- src/globals.h 2019-01-26 17:08:47.047987932 +0100
+***************
+*** 771,777 ****
+
+ EXTERN pos_T saved_cursor /* w_cursor before formatting text. */
+ #ifdef DO_INIT
+! = INIT_POS_T(0, 0, 0)
+ #endif
+ ;
+
+--- 771,777 ----
+
+ EXTERN pos_T saved_cursor /* w_cursor before formatting text. */
+ #ifdef DO_INIT
+! = {0, 0, 0}
+ #endif
+ ;
+
+***************
+*** 1066,1072 ****
+ EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */
+ EXTERN pos_T last_cursormoved /* for CursorMoved event */
+ # ifdef DO_INIT
+! = INIT_POS_T(0, 0, 0)
+ # endif
+ ;
+
+--- 1066,1072 ----
+ EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */
+ EXTERN pos_T last_cursormoved /* for CursorMoved event */
+ # ifdef DO_INIT
+! = {0, 0, 0}
+ # endif
+ ;
+
+***************
+*** 1335,1345 ****
+ EXTERN char pseps[2] INIT(= {'\\' COMMA 0});
+ #endif
+
+- #ifdef FEAT_VIRTUALEDIT
+ /* Set to TRUE when an operator is being executed with virtual editing, MAYBE
+ * when no operator is being executed, FALSE otherwise. */
+ EXTERN int virtual_op INIT(= MAYBE);
+- #endif
+
+ #ifdef FEAT_SYN_HL
+ /* Display tick, incremented for each call to update_screen() */
+--- 1335,1343 ----
+*** ../vim-8.1.0825/src/gui.c 2019-01-24 15:04:44.670887836 +0100
+--- src/gui.c 2019-01-26 16:56:48.273110907 +0100
+***************
+*** 4599,4612 ****
+ longest_lnum = gui_find_longest_lnum();
+ max = scroll_line_len(longest_lnum);
+
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ {
+ /* May move the cursor even further to the right. */
+ if (curwin->w_virtcol >= (colnr_T)max)
+ max = curwin->w_virtcol;
+ }
+- #endif
+
+ #ifndef SCROLL_PAST_END
+ max += curwin->w_width - 1;
+--- 4599,4610 ----
+*** ../vim-8.1.0825/src/if_py_both.h 2019-01-24 17:18:37.599462306 +0100
+--- src/if_py_both.h 2019-01-26 17:08:58.951902215 +0100
+***************
+*** 4033,4041 ****
+ self->win->w_cursor.lnum = lnum;
+ self->win->w_cursor.col = col;
+ self->win->w_set_curswant = TRUE;
+- #ifdef FEAT_VIRTUALEDIT
+ self->win->w_cursor.coladd = 0;
+- #endif
+ /* When column is out of range silently correct it. */
+ check_cursor_col_win(self->win);
+
+--- 4033,4039 ----
+*** ../vim-8.1.0825/src/macros.h 2019-01-24 17:18:37.599462306 +0100
+--- src/macros.h 2019-01-26 17:09:21.635738827 +0100
+***************
+*** 21,47 ****
+ /*
+ * Position comparisons
+ */
+! #ifdef FEAT_VIRTUALEDIT
+! # define LT_POS(a, b) (((a).lnum != (b).lnum) \
+ ? (a).lnum < (b).lnum \
+ : (a).col != (b).col \
+ ? (a).col < (b).col \
+ : (a).coladd < (b).coladd)
+! # define LT_POSP(a, b) (((a)->lnum != (b)->lnum) \
+ ? (a)->lnum < (b)->lnum \
+ : (a)->col != (b)->col \
+ ? (a)->col < (b)->col \
+ : (a)->coladd < (b)->coladd)
+! # define EQUAL_POS(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd))
+! # define CLEAR_POS(a) {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;}
+! #else
+! # define LT_POS(a, b) (((a).lnum != (b).lnum) \
+! ? ((a).lnum < (b).lnum) : ((a).col < (b).col))
+! # define LT_POSP(a, b) (((a)->lnum != (b)->lnum) \
+! ? ((a)->lnum < (b)->lnum) : ((a)->col < (b)->col))
+! # define EQUAL_POS(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col))
+! # define CLEAR_POS(a) {(a)->lnum = 0; (a)->col = 0;}
+! #endif
+
+ #define LTOREQ_POS(a, b) (LT_POS(a, b) || EQUAL_POS(a, b))
+
+--- 21,38 ----
+ /*
+ * Position comparisons
+ */
+! #define LT_POS(a, b) (((a).lnum != (b).lnum) \
+ ? (a).lnum < (b).lnum \
+ : (a).col != (b).col \
+ ? (a).col < (b).col \
+ : (a).coladd < (b).coladd)
+! #define LT_POSP(a, b) (((a)->lnum != (b)->lnum) \
+ ? (a)->lnum < (b)->lnum \
+ : (a)->col != (b)->col \
+ ? (a)->col < (b)->col \
+ : (a)->coladd < (b)->coladd)
+! #define EQUAL_POS(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd))
+! #define CLEAR_POS(a) {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;}
+
+ #define LTOREQ_POS(a, b) (LT_POS(a, b) || EQUAL_POS(a, b))
+
+*** ../vim-8.1.0825/src/mark.c 2019-01-19 17:43:03.417449145 +0100
+--- src/mark.c 2019-01-26 16:57:22.132873211 +0100
+***************
+*** 414,422 ****
+ pos_copy.col = 0;
+ else
+ pos_copy.col = MAXCOL;
+- #ifdef FEAT_VIRTUALEDIT
+ pos_copy.coladd = 0;
+- #endif
+ }
+ }
+ else if (ASCII_ISLOWER(c)) /* normal named mark */
+--- 414,420 ----
+***************
+*** 651,659 ****
+ buf->b_op_end.lnum = 0;
+ buf->b_last_cursor.lnum = 1; /* '" mark cleared */
+ buf->b_last_cursor.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ buf->b_last_cursor.coladd = 0;
+- #endif
+ buf->b_last_insert.lnum = 0; /* '^ mark cleared */
+ buf->b_last_change.lnum = 0; /* '. mark cleared */
+ #ifdef FEAT_JUMPLIST
+--- 649,655 ----
+***************
+*** 1052,1058 ****
+ linenr_T *lp;
+ win_T *win;
+ tabpage_T *tab;
+! static pos_T initpos = INIT_POS_T(1, 0, 0);
+
+ if (line2 < line1 && amount_after == 0L) /* nothing to do */
+ return;
+--- 1048,1054 ----
+ linenr_T *lp;
+ win_T *win;
+ tabpage_T *tab;
+! static pos_T initpos = {1, 0, 0};
+
+ if (line2 < line1 && amount_after == 0L) /* nothing to do */
+ return;
+***************
+*** 1451,1459 ****
+ fm->fmark.mark.lnum = getdigits(&str);
+ str = skipwhite(str);
+ fm->fmark.mark.col = getdigits(&str);
+- #ifdef FEAT_VIRTUALEDIT
+ fm->fmark.mark.coladd = 0;
+- #endif
+ fm->fmark.fnum = 0;
+ str = skipwhite(str);
+ vim_free(fm->fname);
+--- 1447,1453 ----
+***************
+*** 1641,1649 ****
+ {
+ fm->fmark.mark.lnum = lnum;
+ fm->fmark.mark.col = col;
+- #ifdef FEAT_VIRTUALEDIT
+ fm->fmark.mark.coladd = 0;
+- #endif
+ fm->fmark.fnum = 0;
+ vim_free(fm->fname);
+ if (vp[4].bv_allocated)
+--- 1635,1641 ----
+***************
+*** 2146,2154 ****
+ }
+ vim_free(str);
+
+- #ifdef FEAT_VIRTUALEDIT
+ pos.coladd = 0;
+- #endif
+ while (!(eof = viminfo_readline(virp)) && line[0] == TAB)
+ {
+ if (load_marks)
+--- 2138,2144 ----
+*** ../vim-8.1.0825/src/mbyte.c 2019-01-24 15:54:17.790846972 +0100
+--- src/mbyte.c 2019-01-26 16:57:48.512687656 +0100
+***************
+*** 3994,4002 ****
+ convert_setup(&vimconv, p_enc, curbuf->b_p_fenc);
+ }
+
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ for (;;)
+ {
+ p = ml_get_cursor();
+--- 3994,4000 ----
+***************
+*** 4118,4135 ****
+ {
+ char_u *p;
+
+! if (lp->col > 0
+! #ifdef FEAT_VIRTUALEDIT
+! || lp->coladd > 1
+! #endif
+! )
+ {
+ p = ml_get_buf(buf, lp->lnum, FALSE);
+ if (*p == NUL || (int)STRLEN(p) < lp->col)
+ lp->col = 0;
+ else
+ lp->col -= (*mb_head_off)(p, p + lp->col);
+- #ifdef FEAT_VIRTUALEDIT
+ /* Reset "coladd" when the cursor would be on the right half of a
+ * double-wide character. */
+ if (lp->coladd == 1
+--- 4116,4128 ----
+ {
+ char_u *p;
+
+! if (lp->col > 0 || lp->coladd > 1)
+ {
+ p = ml_get_buf(buf, lp->lnum, FALSE);
+ if (*p == NUL || (int)STRLEN(p) < lp->col)
+ lp->col = 0;
+ else
+ lp->col -= (*mb_head_off)(p, p + lp->col);
+ /* Reset "coladd" when the cursor would be on the right half of a
+ * double-wide character. */
+ if (lp->coladd == 1
+***************
+*** 4137,4143 ****
+ && vim_isprintc((*mb_ptr2char)(p + lp->col))
+ && ptr2cells(p + lp->col) > 1)
+ lp->coladd = 0;
+- #endif
+ }
+ }
+
+--- 4130,4135 ----
+*** ../vim-8.1.0825/src/memline.c 2019-01-24 15:54:17.790846972 +0100
+--- src/memline.c 2019-01-26 16:57:59.360611264 +0100
+***************
+*** 5667,5675 ****
+ {
+ curwin->w_cursor.lnum = lnum;
+ curwin->w_cursor.col = (colnr_T)boff;
+- # ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- # endif
+ curwin->w_set_curswant = TRUE;
+ }
+ check_cursor();
+--- 5667,5673 ----
+*** ../vim-8.1.0825/src/menu.c 2019-01-19 19:54:17.141981393 +0100
+--- src/menu.c 2019-01-26 16:58:09.392540578 +0100
+***************
+*** 2318,2326 ****
+ curwin->w_cursor.col = 1;
+ tpos.lnum = eap->line2;
+ tpos.col = MAXCOL;
+- #ifdef FEAT_VIRTUALEDIT
+ tpos.coladd = 0;
+- #endif
+ }
+
+ /* Activate visual mode */
+--- 2318,2324 ----
+*** ../vim-8.1.0825/src/misc1.c 2019-01-24 15:54:17.790846972 +0100
+--- src/misc1.c 2019-01-26 16:58:37.044345517 +0100
+***************
+*** 622,630 ****
+ {
+ pos.lnum = lnum;
+ pos.col = (colnr_T)(*regmatch.endp - ml_get(lnum));
+- #ifdef FEAT_VIRTUALEDIT
+ pos.coladd = 0;
+- #endif
+ }
+ vim_regfree(regmatch.regprog);
+ }
+--- 622,628 ----
+***************
+*** 1708,1716 ****
+ changed_lines(curwin->w_cursor.lnum, 0, curwin->w_cursor.lnum, 1L);
+
+ curwin->w_cursor.col = newcol;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+
+ #if defined(FEAT_LISP) || defined(FEAT_CINDENT)
+ /*
+--- 1706,1712 ----
+***************
+*** 1781,1789 ****
+
+ /* Insert new stuff into line again */
+ curwin->w_cursor.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ ins_bytes(p_extra); /* will call changed_bytes() */
+ vim_free(p_extra);
+ next_line = NULL;
+--- 1777,1783 ----
+***************
+*** 2354,2364 ****
+ linenr_T lnum = curwin->w_cursor.lnum;
+ int i;
+
+- #ifdef FEAT_VIRTUALEDIT
+ /* Break tabs if needed. */
+ if (virtual_active() && curwin->w_cursor.coladd > 0)
+ coladvance_force(getviscol());
+- #endif
+
+ col = curwin->w_cursor.col;
+ oldp = ml_get(lnum);
+--- 2348,2356 ----
+***************
+*** 2499,2508 ****
+ colnr_T col;
+ linenr_T lnum = curwin->w_cursor.lnum;
+
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active() && curwin->w_cursor.coladd > 0)
+ coladvance_force(getviscol());
+- #endif
+
+ col = curwin->w_cursor.col;
+ oldp = ml_get(lnum);
+--- 2491,2498 ----
+***************
+*** 2637,2651 ****
+ * unless "restart_edit" is set or 'virtualedit' contains "onemore".
+ */
+ if (col > 0 && fixpos && restart_edit == 0
+! #ifdef FEAT_VIRTUALEDIT
+! && (ve_flags & VE_ONEMORE) == 0
+! #endif
+! )
+ {
+ --curwin->w_cursor.col;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ if (has_mbyte)
+ curwin->w_cursor.col -=
+ (*mb_head_off)(oldp, oldp + curwin->w_cursor.col);
+--- 2627,2636 ----
+ * unless "restart_edit" is set or 'virtualedit' contains "onemore".
+ */
+ if (col > 0 && fixpos && restart_edit == 0
+! && (ve_flags & VE_ONEMORE) == 0)
+ {
+ --curwin->w_cursor.col;
+ curwin->w_cursor.coladd = 0;
+ if (has_mbyte)
+ curwin->w_cursor.col -=
+ (*mb_head_off)(oldp, oldp + curwin->w_cursor.col);
+*** ../vim-8.1.0825/src/misc2.c 2019-01-24 15:54:17.790846972 +0100
+--- src/misc2.c 2019-01-26 17:00:00.739753344 +0100
+***************
+*** 16,22 ****
+
+ static char_u *ff_expand_buffer = NULL; /* used for expanding filenames */
+
+- #if defined(FEAT_VIRTUALEDIT) || defined(PROTO)
+ static int coladvance2(pos_T *pos, int addspaces, int finetune, colnr_T wcol);
+
+ /*
+--- 16,21 ----
+***************
+*** 67,73 ****
+ }
+ return rc;
+ }
+- #endif
+
+ /*
+ * Get the screen position of character col with a coladd in the cursor line.
+--- 66,71 ----
+***************
+*** 80,88 ****
+
+ pos.lnum = curwin->w_cursor.lnum;
+ pos.col = col;
+- #ifdef FEAT_VIRTUALEDIT
+ pos.coladd = coladd;
+- #endif
+ getvvcol(curwin, &pos, &x, NULL, NULL);
+ return (int)x;
+ }
+--- 78,84 ----
+***************
+*** 119,125 ****
+ int
+ getvpos(pos_T *pos, colnr_T wcol)
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ return coladvance2(pos, FALSE, virtual_active(), wcol);
+ }
+
+--- 115,120 ----
+***************
+*** 130,136 ****
+ int finetune, /* change char offset for the exact column */
+ colnr_T wcol) /* column to move to */
+ {
+- #endif
+ int idx;
+ char_u *ptr;
+ char_u *line;
+--- 125,130 ----
+***************
+*** 144,153 ****
+ one_more = (State & INSERT)
+ || restart_edit != NUL
+ || (VIsual_active && *p_sel != 'o')
+! #ifdef FEAT_VIRTUALEDIT
+! || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL)
+! #endif
+! ;
+ line = ml_get_buf(curbuf, pos->lnum, FALSE);
+
+ if (wcol >= MAXCOL)
+--- 138,144 ----
+ one_more = (State & INSERT)
+ || restart_edit != NUL
+ || (VIsual_active && *p_sel != 'o')
+! || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL) ;
+ line = ml_get_buf(curbuf, pos->lnum, FALSE);
+
+ if (wcol >= MAXCOL)
+***************
+*** 155,172 ****
+ idx = (int)STRLEN(line) - 1 + one_more;
+ col = wcol;
+
+- #ifdef FEAT_VIRTUALEDIT
+ if ((addspaces || finetune) && !VIsual_active)
+ {
+ curwin->w_curswant = linetabsize(line) + one_more;
+ if (curwin->w_curswant > 0)
+ --curwin->w_curswant;
+ }
+- #endif
+ }
+ else
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ int width = curwin->w_width - win_col_off(curwin);
+
+ if (finetune
+--- 146,160 ----
+***************
+*** 188,194 ****
+ wcol = (csize / width + 1) * width - 1;
+ }
+ }
+- #endif
+
+ ptr = line;
+ while (col <= wcol && *ptr != NUL)
+--- 176,181 ----
+***************
+*** 219,225 ****
+ col -= csize;
+ }
+
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active()
+ && addspaces
+ && ((col != wcol && col != wcol + 1) || csize > 1))
+--- 206,211 ----
+***************
+*** 283,289 ****
+ col += correct;
+ }
+ }
+- #endif
+ }
+
+ if (idx < 0)
+--- 269,274 ----
+***************
+*** 291,297 ****
+ else
+ pos->col = idx;
+
+- #ifdef FEAT_VIRTUALEDIT
+ pos->coladd = 0;
+
+ if (finetune)
+--- 276,281 ----
+***************
+*** 318,324 ****
+ col += b;
+ }
+ }
+- #endif
+
+ /* prevent from moving onto a trail byte */
+ if (has_mbyte)
+--- 302,307 ----
+***************
+*** 364,372 ****
+ return ((p[l] != NUL) ? 0 : 2);
+ }
+ lp->col++;
+- #ifdef FEAT_VIRTUALEDIT
+ lp->coladd = 0;
+- #endif
+ return ((p[1] != NUL) ? 0 : 2);
+ }
+ }
+--- 347,353 ----
+***************
+*** 374,382 ****
+ {
+ lp->col = 0;
+ lp->lnum++;
+- #ifdef FEAT_VIRTUALEDIT
+ lp->coladd = 0;
+- #endif
+ return 1;
+ }
+ return -1;
+--- 355,361 ----
+***************
+*** 412,420 ****
+ {
+ char_u *p;
+
+- #ifdef FEAT_VIRTUALEDIT
+ lp->coladd = 0;
+- #endif
+ if (lp->col == MAXCOL)
+ {
+ /* past end of line */
+--- 391,397 ----
+***************
+*** 574,583 ****
+ check_cursor_col_win(win_T *win)
+ {
+ colnr_T len;
+- #ifdef FEAT_VIRTUALEDIT
+ colnr_T oldcol = win->w_cursor.col;
+ colnr_T oldcoladd = win->w_cursor.col + win->w_cursor.coladd;
+- #endif
+
+ len = (colnr_T)STRLEN(ml_get_buf(win->w_buffer, win->w_cursor.lnum, FALSE));
+ if (len == 0)
+--- 551,558 ----
+***************
+*** 590,598 ****
+ * - 'virtualedit' is set */
+ if ((State & INSERT) || restart_edit
+ || (VIsual_active && *p_sel != 'o')
+- #ifdef FEAT_VIRTUALEDIT
+ || (ve_flags & VE_ONEMORE)
+- #endif
+ || virtual_active())
+ win->w_cursor.col = len;
+ else
+--- 565,571 ----
+***************
+*** 606,612 ****
+ else if (win->w_cursor.col < 0)
+ win->w_cursor.col = 0;
+
+- #ifdef FEAT_VIRTUALEDIT
+ /* If virtual editing is on, we can leave the cursor on the old position,
+ * only we must set it to virtual. But don't do it when at the end of the
+ * line. */
+--- 579,584 ----
+***************
+*** 634,640 ****
+ /* avoid weird number when there is a miscalculation or overflow */
+ win->w_cursor.coladd = 0;
+ }
+- #endif
+ }
+
+ /*
+--- 606,611 ----
+***************
+*** 2172,2178 ****
+ #endif
+
+ /*
+! * Concatenate a string to a growarray which contains characters.
+ * When "s" is NULL does not do anything.
+ * Note: Does NOT copy the NUL at the end!
+ */
+--- 2143,2149 ----
+ #endif
+
+ /*
+! * Concatenate a string to a growarray which contains bytes.
+ * When "s" is NULL does not do anything.
+ * Note: Does NOT copy the NUL at the end!
+ */
+*** ../vim-8.1.0825/src/move.c 2019-01-24 15:54:17.790846972 +0100
+--- src/move.c 2019-01-26 17:00:19.695618884 +0100
+***************
+*** 508,524 ****
+ }
+ else if (wp->w_cursor.col != wp->w_valid_cursor.col
+ || wp->w_leftcol != wp->w_valid_leftcol
+! #ifdef FEAT_VIRTUALEDIT
+! || wp->w_cursor.coladd != wp->w_valid_cursor.coladd
+! #endif
+! )
+ {
+ wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL);
+ wp->w_valid_cursor.col = wp->w_cursor.col;
+ wp->w_valid_leftcol = wp->w_leftcol;
+- #ifdef FEAT_VIRTUALEDIT
+ wp->w_valid_cursor.coladd = wp->w_cursor.coladd;
+- #endif
+ }
+ }
+
+--- 508,519 ----
+ }
+ else if (wp->w_cursor.col != wp->w_valid_cursor.col
+ || wp->w_leftcol != wp->w_valid_leftcol
+! || wp->w_cursor.coladd != wp->w_valid_cursor.coladd)
+ {
+ wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL);
+ wp->w_valid_cursor.col = wp->w_cursor.col;
+ wp->w_valid_leftcol = wp->w_leftcol;
+ wp->w_valid_cursor.coladd = wp->w_cursor.coladd;
+ }
+ }
+
+***************
+*** 2800,2808 ****
+ {
+ linenr_T line = curwin->w_cursor.lnum;
+ colnr_T col = curwin->w_cursor.col;
+- # ifdef FEAT_VIRTUALEDIT
+ colnr_T coladd = curwin->w_cursor.coladd;
+- # endif
+ colnr_T curswant = curwin->w_curswant;
+ int set_curswant = curwin->w_set_curswant;
+ win_T *old_curwin = curwin;
+--- 2795,2801 ----
+***************
+*** 2829,2837 ****
+ # endif
+ curwin->w_cursor.lnum = line;
+ curwin->w_cursor.col = col;
+- # ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = coladd;
+- # endif
+ curwin->w_curswant = curswant;
+ curwin->w_set_curswant = set_curswant;
+
+--- 2822,2828 ----
+*** ../vim-8.1.0825/src/netbeans.c 2019-01-19 17:43:03.413449172 +0100
+--- src/netbeans.c 2019-01-26 17:00:33.087523823 +0100
+***************
+*** 3344,3352 ****
+
+ pos.lnum = 0;
+ pos.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ pos.coladd = 0;
+- #endif
+
+ if (!(buf->b_ml.ml_flags & ML_EMPTY))
+ {
+--- 3344,3350 ----
+***************
+*** 3378,3386 ****
+ mypos.lnum = (linenr_T)off;
+ ++*argp;
+ mypos.col = strtol((char *)*argp, (char **)argp, 10);
+- #ifdef FEAT_VIRTUALEDIT
+ mypos.coladd = 0;
+- #endif
+ return &mypos;
+ }
+ return off2pos(buf, off);
+--- 3376,3382 ----
+*** ../vim-8.1.0825/src/normal.c 2019-01-24 15:54:17.794846944 +0100
+--- src/normal.c 2019-01-26 17:02:50.254547145 +0100
+***************
+*** 1340,1348 ****
+ static colnr_T redo_VIsual_vcol; /* number of cols or end column */
+ static long redo_VIsual_count; /* count for Visual operator */
+ static int redo_VIsual_arg; /* extra argument */
+- #ifdef FEAT_VIRTUALEDIT
+ int include_line_break = FALSE;
+- #endif
+
+ #if defined(FEAT_CLIPBOARD)
+ /*
+--- 1340,1346 ----
+***************
+*** 1527,1546 ****
+ /* If 'selection' is "exclusive", backup one character for
+ * charwise selections. */
+ else if (VIsual_mode == 'v')
+! {
+! # ifdef FEAT_VIRTUALEDIT
+! include_line_break =
+! # endif
+! unadjust_for_sel();
+! }
+
+ oap->start = VIsual;
+ if (VIsual_mode == 'V')
+ {
+ oap->start.col = 0;
+- # ifdef FEAT_VIRTUALEDIT
+ oap->start.coladd = 0;
+- # endif
+ }
+ }
+
+--- 1525,1537 ----
+ /* If 'selection' is "exclusive", backup one character for
+ * charwise selections. */
+ else if (VIsual_mode == 'v')
+! include_line_break = unadjust_for_sel();
+
+ oap->start = VIsual;
+ if (VIsual_mode == 'V')
+ {
+ oap->start.col = 0;
+ oap->start.coladd = 0;
+ }
+ }
+
+***************
+*** 1590,1599 ****
+ check_pos(curwin->w_buffer, &oap->end);
+ oap->line_count = oap->end.lnum - oap->start.lnum + 1;
+
+- #ifdef FEAT_VIRTUALEDIT
+ /* Set "virtual_op" before resetting VIsual_active. */
+ virtual_op = virtual_active();
+- #endif
+
+ if (VIsual_active || redo_VIsual_busy)
+ {
+--- 1581,1588 ----
+***************
+*** 1685,1694 ****
+ {
+ oap->motion_type = MCHAR;
+ if (VIsual_mode != Ctrl_V && *ml_get_pos(&(oap->end)) == NUL
+! #ifdef FEAT_VIRTUALEDIT
+! && (include_line_break || !virtual_op)
+! #endif
+! )
+ {
+ oap->inclusive = FALSE;
+ /* Try to include the newline, unless it's an operator
+--- 1674,1680 ----
+ {
+ oap->motion_type = MCHAR;
+ if (VIsual_mode != Ctrl_V && *ml_get_pos(&(oap->end)) == NUL
+! && (include_line_break || !virtual_op))
+ {
+ oap->inclusive = FALSE;
+ /* Try to include the newline, unless it's an operator
+***************
+*** 1699,1707 ****
+ {
+ ++oap->end.lnum;
+ oap->end.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ oap->end.coladd = 0;
+- #endif
+ ++oap->line_count;
+ }
+ }
+--- 1685,1691 ----
+***************
+*** 1759,1768 ****
+ || (oap->op_type == OP_YANK
+ && gchar_pos(&oap->end) == NUL))
+ && EQUAL_POS(oap->start, oap->end)
+! #ifdef FEAT_VIRTUALEDIT
+! && !(virtual_op && oap->start.coladd != oap->end.coladd)
+! #endif
+! );
+ /*
+ * For delete, change and yank, it's an error to operate on an
+ * empty region, when 'E' included in 'cpoptions' (Vi compatible).
+--- 1743,1749 ----
+ || (oap->op_type == OP_YANK
+ && gchar_pos(&oap->end) == NUL))
+ && EQUAL_POS(oap->start, oap->end)
+! && !(virtual_op && oap->start.coladd != oap->end.coladd));
+ /*
+ * For delete, change and yank, it's an error to operate on an
+ * empty region, when 'E' included in 'cpoptions' (Vi compatible).
+***************
+*** 2097,2105 ****
+ default:
+ clearopbeep(oap);
+ }
+- #ifdef FEAT_VIRTUALEDIT
+ virtual_op = MAYBE;
+- #endif
+ if (!gui_yank)
+ {
+ /*
+--- 2078,2084 ----
+***************
+*** 2198,2206 ****
+ {
+ #ifdef FEAT_EVAL
+ typval_T argv[2];
+- # ifdef FEAT_VIRTUALEDIT
+ int save_virtual_op = virtual_op;
+- # endif
+
+ if (*p_opfunc == NUL)
+ emsg(_("E774: 'operatorfunc' is empty"));
+--- 2177,2183 ----
+***************
+*** 2222,2238 ****
+ argv[0].vval.v_string = (char_u *)"char";
+ argv[1].v_type = VAR_UNKNOWN;
+
+- # ifdef FEAT_VIRTUALEDIT
+ /* Reset virtual_op so that 'virtualedit' can be changed in the
+ * function. */
+ virtual_op = MAYBE;
+- # endif
+
+ (void)call_func_retnr(p_opfunc, 1, argv);
+
+- # ifdef FEAT_VIRTUALEDIT
+ virtual_op = save_virtual_op;
+- # endif
+ }
+ #else
+ emsg(_("E775: Eval feature not available"));
+--- 2199,2211 ----
+***************
+*** 3290,3299 ****
+ #ifdef FEAT_EVAL
+ curbuf->b_visual_mode_eval = VIsual_mode;
+ #endif
+- #ifdef FEAT_VIRTUALEDIT
+ if (!virtual_active())
+ curwin->w_cursor.coladd = 0;
+- #endif
+ may_clear_cmdline();
+
+ adjust_cursor_eol();
+--- 3263,3270 ----
+***************
+*** 5944,5957 ****
+ cap->oap->inclusive = FALSE;
+ past_line = (VIsual_active && *p_sel != 'o');
+
+- #ifdef FEAT_VIRTUALEDIT
+ /*
+ * In virtual edit mode, there's no such thing as "past_line", as lines
+ * are (theoretically) infinitely long.
+ */
+ if (virtual_active())
+ past_line = 0;
+- #endif
+
+ for (n = cap->count1; n > 0; --n)
+ {
+--- 5915,5926 ----
+***************
+*** 5983,5991 ****
+ {
+ ++curwin->w_cursor.lnum;
+ curwin->w_cursor.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ curwin->w_set_curswant = TRUE;
+ cap->oap->inclusive = FALSE;
+ }
+--- 5952,5958 ----
+***************
+*** 6007,6017 ****
+ else if (past_line)
+ {
+ curwin->w_set_curswant = TRUE;
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ oneright();
+ else
+- #endif
+ {
+ if (has_mbyte)
+ curwin->w_cursor.col +=
+--- 5974,5982 ----
+***************
+*** 6242,6254 ****
+ {
+ cap->oap->motion_type = MCHAR;
+ cap->oap->inclusive = TRUE;
+- #ifdef FEAT_VIRTUALEDIT
+ /* In virtual mode when off the edge of a line and an operator
+ * is pending (whew!) keep the cursor where it is.
+ * Otherwise, send it to the end of the line. */
+ if (!virtual_active() || gchar_cursor() != NUL
+ || cap->oap->op_type == OP_NOP)
+- #endif
+ curwin->w_curswant = MAXCOL; /* so we stay at the end */
+ if (cursor_down((long)(cap->count1 - 1),
+ cap->oap->op_type == OP_NOP) == FAIL)
+--- 6207,6217 ----
+***************
+*** 6341,6349 ****
+ {
+ if (i == 2)
+ cap->oap->motion_type = MLINE;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ #ifdef FEAT_FOLDING
+ if (cap->oap->op_type == OP_NOP && (fdo_flags & FDO_SEARCH) && KeyTyped)
+ foldOpenCursor();
+--- 6304,6310 ----
+***************
+*** 6378,6384 ****
+ else
+ {
+ curwin->w_set_curswant = TRUE;
+- #ifdef FEAT_VIRTUALEDIT
+ /* Include a Tab for "tx" and for "dfx". */
+ if (gchar_cursor() == TAB && virtual_active() && cap->arg == FORWARD
+ && (t_cmd || cap->oap->op_type != OP_NOP))
+--- 6339,6344 ----
+***************
+*** 6390,6396 ****
+ }
+ else
+ curwin->w_cursor.coladd = 0;
+- #endif
+ adjust_for_sel(cap);
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_HOR) && KeyTyped && cap->oap->op_type == OP_NOP)
+--- 6350,6355 ----
+***************
+*** 6406,6412 ****
+ static void
+ nv_brackets(cmdarg_T *cap)
+ {
+! pos_T new_pos = INIT_POS_T(0, 0, 0);
+ pos_T prev_pos;
+ pos_T *pos = NULL; /* init for GCC */
+ pos_T old_pos; /* cursor position before command */
+--- 6365,6371 ----
+ static void
+ nv_brackets(cmdarg_T *cap)
+ {
+! pos_T new_pos = {0, 0, 0};
+ pos_T prev_pos;
+ pos_T *pos = NULL; /* init for GCC */
+ pos_T old_pos; /* cursor position before command */
+***************
+*** 6418,6426 ****
+ cap->oap->motion_type = MCHAR;
+ cap->oap->inclusive = FALSE;
+ old_pos = curwin->w_cursor;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0; // TODO: don't do this for an error.
+- #endif
+
+ #ifdef FEAT_SEARCHPATH
+ /*
+--- 6377,6383 ----
+***************
+*** 6815,6823 ****
+ setpcmark();
+ curwin->w_cursor = *pos;
+ curwin->w_set_curswant = TRUE;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ adjust_for_sel(cap);
+ }
+ }
+--- 6772,6778 ----
+***************
+*** 6849,6857 ****
+ {
+ /* Don't leave the cursor on the NUL past end of line. */
+ adjust_cursor(cap->oap);
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_BLOCK) && KeyTyped && cap->oap->op_type == OP_NOP)
+ foldOpenCursor();
+--- 6804,6810 ----
+***************
+*** 6887,6895 ****
+ clearopbeep(cap->oap);
+ else
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_BLOCK) && KeyTyped && cap->oap->op_type == OP_NOP)
+ foldOpenCursor();
+--- 6840,6846 ----
+***************
+*** 6991,6997 ****
+ return;
+ }
+
+- #ifdef FEAT_VIRTUALEDIT
+ /* Break tabs, etc. */
+ if (virtual_active())
+ {
+--- 6942,6947 ----
+***************
+*** 7006,7012 ****
+ else if (gchar_cursor() == TAB)
+ coladvance_force(getviscol());
+ }
+- #endif
+
+ /* Abort if not enough characters to replace. */
+ ptr = ml_get_cursor();
+--- 6956,6961 ----
+***************
+*** 7172,7182 ****
+ ++curwin->w_curswant;
+ coladvance(curwin->w_curswant);
+ if (curwin->w_cursor.col == old_cursor.col
+- #ifdef FEAT_VIRTUALEDIT
+ && (!virtual_active()
+! || curwin->w_cursor.coladd == old_cursor.coladd)
+! #endif
+! )
+ {
+ curwin->w_cursor.lnum = VIsual.lnum;
+ if (old_cursor.lnum <= VIsual.lnum && *p_sel == 'e')
+--- 7121,7128 ----
+ ++curwin->w_curswant;
+ coladvance(curwin->w_curswant);
+ if (curwin->w_cursor.col == old_cursor.col
+ && (!virtual_active()
+! || curwin->w_cursor.coladd == old_cursor.coladd))
+ {
+ curwin->w_cursor.lnum = VIsual.lnum;
+ if (old_cursor.lnum <= VIsual.lnum && *p_sel == 'e')
+***************
+*** 7218,7227 ****
+ emsg(_(e_modifiable));
+ else
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ coladvance(getviscol());
+- #endif
+ invoke_edit(cap, FALSE, cap->arg ? 'V' : 'R', FALSE);
+ }
+ }
+--- 7164,7171 ----
+***************
+*** 7249,7258 ****
+ 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);
+ }
+ }
+--- 7193,7200 ----
+***************
+*** 7524,7534 ****
+ else
+ nv_cursormark(cap, cap->arg, pos);
+
+- #ifdef FEAT_VIRTUALEDIT
+ /* May need to clear the coladd that a mark includes. */
+ if (!virtual_active())
+ curwin->w_cursor.coladd = 0;
+- #endif
+ check_cursor_col();
+ #ifdef FEAT_FOLDING
+ if (cap->oap->op_type == OP_NOP
+--- 7466,7474 ----
+***************
+*** 7761,7776 ****
+ VIsual_mode = c;
+ VIsual_active = TRUE;
+ VIsual_reselect = TRUE;
+! #ifdef FEAT_VIRTUALEDIT
+! /* Corner case: the 0 position in a tab may change when going into
+! * virtualedit. Recalculate curwin->w_cursor to avoid bad hilighting.
+! */
+ if (c == Ctrl_V && (ve_flags & VE_BLOCK) && gchar_cursor() == TAB)
+ {
+ validate_virtcol();
+ coladvance(curwin->w_virtcol);
+ }
+- #endif
+ VIsual = curwin->w_cursor;
+
+ #ifdef FEAT_FOLDING
+--- 7701,7714 ----
+ VIsual_mode = c;
+ VIsual_active = TRUE;
+ VIsual_reselect = TRUE;
+!
+! // Corner case: the 0 position in a tab may change when going into
+! // virtualedit. Recalculate curwin->w_cursor to avoid bad hilighting.
+ if (c == Ctrl_V && (ve_flags & VE_BLOCK) && gchar_cursor() == TAB)
+ {
+ validate_virtcol();
+ coladvance(curwin->w_virtcol);
+ }
+ VIsual = curwin->w_cursor;
+
+ #ifdef FEAT_FOLDING
+***************
+*** 8212,8221 ****
+ i = (int)STRLEN(ml_get_curline());
+ if (curwin->w_cursor.col > (colnr_T)i)
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ curwin->w_cursor.coladd += curwin->w_cursor.col - i;
+- #endif
+ curwin->w_cursor.col = i;
+ }
+ }
+--- 8150,8157 ----
+***************
+*** 8773,8782 ****
+ */
+ if (curwin->w_cursor.col > 0 && gchar_cursor() == NUL
+ && (!VIsual_active || *p_sel == 'o')
+! #ifdef FEAT_VIRTUALEDIT
+! && !virtual_active() && (ve_flags & VE_ONEMORE) == 0
+! #endif
+! )
+ {
+ --curwin->w_cursor.col;
+ /* prevent cursor from moving on the trail byte */
+--- 8709,8715 ----
+ */
+ if (curwin->w_cursor.col > 0 && gchar_cursor() == NUL
+ && (!VIsual_active || *p_sel == 'o')
+! && !virtual_active() && (ve_flags & VE_ONEMORE) == 0)
+ {
+ --curwin->w_cursor.col;
+ /* prevent cursor from moving on the trail byte */
+***************
+*** 8837,8847 ****
+ pp = &curwin->w_cursor;
+ else
+ pp = &VIsual;
+- #ifdef FEAT_VIRTUALEDIT
+ if (pp->coladd > 0)
+ --pp->coladd;
+ else
+- #endif
+ if (pp->col > 0)
+ {
+ --pp->col;
+--- 8770,8778 ----
+***************
+*** 9077,9083 ****
+ {
+ case 'A': /* "A"ppend after the line */
+ curwin->w_set_curswant = TRUE;
+- #ifdef FEAT_VIRTUALEDIT
+ if (ve_flags == VE_ALL)
+ {
+ int save_State = State;
+--- 9008,9013 ----
+***************
+*** 9089,9095 ****
+ State = save_State;
+ }
+ else
+- #endif
+ curwin->w_cursor.col += (colnr_T)STRLEN(ml_get_cursor());
+ break;
+
+--- 9019,9024 ----
+***************
+*** 9108,9114 ****
+ /* FALLTHROUGH */
+
+ case 'a': /* "a"ppend is like "i"nsert on the next character. */
+- #ifdef FEAT_VIRTUALEDIT
+ /* increment coladd when in virtual space, increment the
+ * column otherwise, also to append after an unprintable char */
+ if (virtual_active()
+--- 9037,9042 ----
+***************
+*** 9116,9129 ****
+ || *ml_get_cursor() == NUL
+ || *ml_get_cursor() == TAB))
+ curwin->w_cursor.coladd++;
+! else
+! #endif
+! if (*ml_get_cursor() != NUL)
+ inc_cursor();
+ break;
+ }
+
+- #ifdef FEAT_VIRTUALEDIT
+ if (curwin->w_cursor.coladd && cap->cmdchar != 'A')
+ {
+ int save_State = State;
+--- 9044,9054 ----
+ || *ml_get_cursor() == NUL
+ || *ml_get_cursor() == TAB))
+ curwin->w_cursor.coladd++;
+! else if (*ml_get_cursor() != NUL)
+ inc_cursor();
+ break;
+ }
+
+ if (curwin->w_cursor.coladd && cap->cmdchar != 'A')
+ {
+ int save_State = State;
+***************
+*** 9134,9140 ****
+ coladvance(getviscol());
+ State = save_State;
+ }
+- #endif
+
+ invoke_edit(cap, FALSE, cap->cmdchar, FALSE);
+ }
+--- 9059,9064 ----
+*** ../vim-8.1.0825/src/ops.c 2019-01-24 15:54:17.794846944 +0100
+--- src/ops.c 2019-01-26 17:05:11.897533838 +0100
+***************
+*** 1802,1813 ****
+ * It's an error to operate on an empty region, when 'E' included in
+ * 'cpoptions' (Vi compatible).
+ */
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_op)
+ /* Virtual editing: Nothing gets deleted, but we set the '[ and ']
+ * marks as if it happened. */
+ goto setmarks;
+- #endif
+ if (vim_strchr(p_cpo, CPO_EMPTYREGION) != NULL)
+ beep_flush();
+ return OK;
+--- 1802,1811 ----
+***************
+*** 1909,1917 ****
+ if (lnum == curwin->w_cursor.lnum)
+ {
+ curwin->w_cursor.col = bd.textcol + bd.startspaces;
+- # ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- # endif
+ }
+
+ /* n == number of chars deleted
+--- 1907,1913 ----
+***************
+*** 1979,1985 ****
+ }
+ else
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_op)
+ {
+ int endcol = 0;
+--- 1975,1980 ----
+***************
+*** 2016,2022 ****
+ curwin->w_cursor = oap->start;
+ }
+ }
+- #endif
+
+ if (oap->line_count == 1) /* delete characters within one line */
+ {
+--- 2011,2016 ----
+***************
+*** 2032,2038 ****
+
+ n = oap->end.col - oap->start.col + 1 - !oap->inclusive;
+
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_op)
+ {
+ /* fix up things for virtualedit-delete:
+--- 2026,2031 ----
+***************
+*** 2053,2059 ****
+ if (gchar_cursor() != NUL)
+ curwin->w_cursor.coladd = 0;
+ }
+- #endif
+ (void)del_bytes((long)n, !virtual_op,
+ oap->op_type == OP_DELETE && !oap->is_VIsual);
+ }
+--- 2046,2051 ----
+***************
+*** 2084,2092 ****
+
+ msgmore(curbuf->b_ml.ml_line_count - old_lcount);
+
+- #ifdef FEAT_VIRTUALEDIT
+ setmarks:
+- #endif
+ if (oap->block_mode)
+ {
+ curbuf->b_op_end.lnum = oap->end.lnum;
+--- 2076,2082 ----
+***************
+*** 2183,2189 ****
+ * If we split a TAB, it may be replaced by several characters.
+ * Thus the number of characters may increase!
+ */
+- #ifdef FEAT_VIRTUALEDIT
+ /* If the range starts in virtual space, count the initial
+ * coladd offset as part of "startspaces" */
+ if (virtual_op && bd.is_short && *bd.textstart == NUL)
+--- 2173,2178 ----
+***************
+*** 2196,2210 ****
+ n = bd.startspaces;
+ }
+ else
+- #endif
+ /* allow for pre spaces */
+ n = (bd.startspaces ? bd.start_char_vcols - 1 : 0);
+
+ /* allow for post spp */
+ n += (bd.endspaces
+- #ifdef FEAT_VIRTUALEDIT
+ && !bd.is_oneChar
+- #endif
+ && bd.end_char_vcols > 0) ? bd.end_char_vcols - 1 : 0;
+ /* Figure out how many characters to replace. */
+ numc = oap->end_vcol - oap->start_vcol + 1;
+--- 2185,2196 ----
+***************
+*** 2311,2317 ****
+ }
+ else
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ if (n == TAB)
+ {
+ int end_vcol = 0;
+--- 2297,2302 ----
+***************
+*** 2327,2337 ****
+ if (curwin->w_cursor.lnum == oap->end.lnum)
+ getvpos(&oap->end, end_vcol);
+ }
+- #endif
+ PBYTE(curwin->w_cursor, c);
+ }
+ }
+- #ifdef FEAT_VIRTUALEDIT
+ else if (virtual_op && curwin->w_cursor.lnum == oap->end.lnum)
+ {
+ int virtcols = oap->end.coladd;
+--- 2312,2320 ----
+***************
+*** 2355,2361 ****
+ break;
+ }
+ }
+- #endif
+
+ /* Advance to next character, stop at the end of the file. */
+ if (inc_cursor() == -1)
+--- 2338,2343 ----
+***************
+*** 2609,2615 ****
+
+ if (oap->block_mode)
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ /* When 'virtualedit' is used, need to insert the extra spaces before
+ * doing block_prep(). When only "block" is used, virtual edit is
+ * already disabled, but still need it when calling
+--- 2591,2596 ----
+***************
+*** 2627,2633 ****
+ --curwin->w_cursor.col;
+ ve_flags = old_ve_flags;
+ }
+- #endif
+ /* Get the info about the block before entering the text */
+ block_prep(oap, &bd, oap->start.lnum, TRUE);
+ /* Get indent information */
+--- 2608,2613 ----
+***************
+*** 2641,2651 ****
+
+ if (oap->op_type == OP_APPEND)
+ {
+! if (oap->block_mode
+! #ifdef FEAT_VIRTUALEDIT
+! && curwin->w_cursor.coladd == 0
+! #endif
+! )
+ {
+ /* Move the cursor to the character right of the block. */
+ curwin->w_set_curswant = TRUE;
+--- 2621,2627 ----
+
+ if (oap->op_type == OP_APPEND)
+ {
+! if (oap->block_mode && curwin->w_cursor.coladd == 0)
+ {
+ /* Move the cursor to the character right of the block. */
+ curwin->w_set_curswant = TRUE;
+***************
+*** 2715,2759 ****
+ && !bd.is_MAX && !did_indent)
+ {
+ if (oap->op_type == OP_INSERT
+! && oap->start.col
+! #ifdef FEAT_VIRTUALEDIT
+! + oap->start.coladd
+! #endif
+ != curbuf->b_op_start_orig.col
+! #ifdef FEAT_VIRTUALEDIT
+! + curbuf->b_op_start_orig.coladd
+! #endif
+! )
+ {
+ int t = getviscol2(curbuf->b_op_start_orig.col,
+! #ifdef FEAT_VIRTUALEDIT
+! curbuf->b_op_start_orig.coladd
+! #else
+! 0
+! #endif
+! );
+ oap->start.col = curbuf->b_op_start_orig.col;
+ pre_textlen -= t - oap->start_vcol;
+ oap->start_vcol = t;
+ }
+ else if (oap->op_type == OP_APPEND
+! && oap->end.col
+! #ifdef FEAT_VIRTUALEDIT
+! + oap->end.coladd
+! #endif
+ >= curbuf->b_op_start_orig.col
+! #ifdef FEAT_VIRTUALEDIT
+! + curbuf->b_op_start_orig.coladd
+! #endif
+! )
+ {
+ int t = getviscol2(curbuf->b_op_start_orig.col,
+! #ifdef FEAT_VIRTUALEDIT
+! curbuf->b_op_start_orig.coladd
+! #else
+! 0
+! #endif
+! );
+ oap->start.col = curbuf->b_op_start_orig.col;
+ /* reset pre_textlen to the value of OP_INSERT */
+ pre_textlen += bd.textlen;
+--- 2691,2713 ----
+ && !bd.is_MAX && !did_indent)
+ {
+ if (oap->op_type == OP_INSERT
+! && oap->start.col + oap->start.coladd
+ != curbuf->b_op_start_orig.col
+! + curbuf->b_op_start_orig.coladd)
+ {
+ int t = getviscol2(curbuf->b_op_start_orig.col,
+! curbuf->b_op_start_orig.coladd);
+ oap->start.col = curbuf->b_op_start_orig.col;
+ pre_textlen -= t - oap->start_vcol;
+ oap->start_vcol = t;
+ }
+ else if (oap->op_type == OP_APPEND
+! && oap->end.col + oap->end.coladd
+ >= curbuf->b_op_start_orig.col
+! + curbuf->b_op_start_orig.coladd)
+ {
+ int t = getviscol2(curbuf->b_op_start_orig.col,
+! curbuf->b_op_start_orig.coladd);
+ oap->start.col = curbuf->b_op_start_orig.col;
+ /* reset pre_textlen to the value of OP_INSERT */
+ pre_textlen += bd.textlen;
+***************
+*** 2865,2876 ****
+ /* skip blank lines too */
+ if (oap->block_mode)
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ /* Add spaces before getting the current line length. */
+ if (virtual_op && (curwin->w_cursor.coladd > 0
+ || gchar_cursor() == NUL))
+ coladvance_force(getviscol());
+- #endif
+ firstline = ml_get(oap->start.lnum);
+ pre_textlen = (long)STRLEN(firstline);
+ pre_indent = (long)getwhitecols(firstline);
+--- 2819,2828 ----
+***************
+*** 2916,2922 ****
+ block_prep(oap, &bd, linenr, TRUE);
+ if (!bd.is_short || virtual_op)
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ pos_T vpos;
+
+ /* If the block starts in virtual space, count the
+--- 2868,2873 ----
+***************
+*** 2928,2949 ****
+ }
+ else
+ vpos.coladd = 0;
+- #endif
+ oldp = ml_get(linenr);
+ newp = alloc_check((unsigned)(STRLEN(oldp)
+! #ifdef FEAT_VIRTUALEDIT
+! + vpos.coladd
+! #endif
+! + ins_len + 1));
+ if (newp == NULL)
+ continue;
+ /* copy up to block start */
+ mch_memmove(newp, oldp, (size_t)bd.textcol);
+ offset = bd.textcol;
+- #ifdef FEAT_VIRTUALEDIT
+ vim_memset(newp + offset, ' ', (size_t)vpos.coladd);
+ offset += vpos.coladd;
+- #endif
+ mch_memmove(newp + offset, ins_text, (size_t)ins_len);
+ offset += ins_len;
+ oldp += bd.textcol;
+--- 2879,2894 ----
+ }
+ else
+ vpos.coladd = 0;
+ oldp = ml_get(linenr);
+ newp = alloc_check((unsigned)(STRLEN(oldp)
+! + vpos.coladd + ins_len + 1));
+ if (newp == NULL)
+ continue;
+ /* copy up to block start */
+ mch_memmove(newp, oldp, (size_t)bd.textcol);
+ offset = bd.textcol;
+ vim_memset(newp + offset, ' ', (size_t)vpos.coladd);
+ offset += vpos.coladd;
+ mch_memmove(newp + offset, ins_text, (size_t)ins_len);
+ offset += ins_len;
+ oldp += bd.textcol;
+***************
+*** 3148,3157 ****
+ case MCHAR:
+ {
+ colnr_T startcol = 0, endcol = MAXCOL;
+- #ifdef FEAT_VIRTUALEDIT
+ int is_oneChar = FALSE;
+ colnr_T cs, ce;
+! #endif
+ p = ml_get(lnum);
+ bd.startspaces = 0;
+ bd.endspaces = 0;
+--- 3093,3101 ----
+ case MCHAR:
+ {
+ colnr_T startcol = 0, endcol = MAXCOL;
+ int is_oneChar = FALSE;
+ colnr_T cs, ce;
+!
+ p = ml_get(lnum);
+ bd.startspaces = 0;
+ bd.endspaces = 0;
+***************
+*** 3159,3165 ****
+ if (lnum == oap->start.lnum)
+ {
+ startcol = oap->start.col;
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_op)
+ {
+ getvcol(curwin, &oap->start, &cs, NULL, &ce);
+--- 3103,3108 ----
+***************
+*** 3172,3184 ****
+ startcol++;
+ }
+ }
+- #endif
+ }
+
+ if (lnum == oap->end.lnum)
+ {
+ endcol = oap->end.col;
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_op)
+ {
+ getvcol(curwin, &oap->end, &cs, NULL, &ce);
+--- 3115,3125 ----
+***************
+*** 3205,3219 ****
+ }
+ }
+ }
+- #endif
+ }
+ if (endcol == MAXCOL)
+ endcol = (colnr_T)STRLEN(p);
+! if (startcol > endcol
+! #ifdef FEAT_VIRTUALEDIT
+! || is_oneChar
+! #endif
+! )
+ bd.textlen = 0;
+ else
+ {
+--- 3146,3155 ----
+ }
+ }
+ }
+ }
+ if (endcol == MAXCOL)
+ endcol = (colnr_T)STRLEN(p);
+! if (startcol > endcol || is_oneChar)
+ bd.textlen = 0;
+ else
+ {
+***************
+*** 3661,3667 ****
+
+ yanklen = (int)STRLEN(y_array[0]);
+
+- #ifdef FEAT_VIRTUALEDIT
+ if (ve_flags == VE_ALL && y_type == MCHAR)
+ {
+ if (gchar_cursor() == TAB)
+--- 3597,3602 ----
+***************
+*** 3687,3693 ****
+ else if (curwin->w_cursor.coladd > 0 || gchar_cursor() == NUL)
+ coladvance_force(getviscol() + (dir == FORWARD));
+ }
+- #endif
+
+ lnum = curwin->w_cursor.lnum;
+ col = curwin->w_cursor.col;
+--- 3622,3627 ----
+***************
+*** 3702,3728 ****
+
+ if (dir == FORWARD && c != NUL)
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ if (ve_flags == VE_ALL)
+ getvcol(curwin, &curwin->w_cursor, &col, NULL, &endcol2);
+ else
+- #endif
+ getvcol(curwin, &curwin->w_cursor, NULL, NULL, &col);
+
+ if (has_mbyte)
+ /* move to start of next multi-byte character */
+ curwin->w_cursor.col += (*mb_ptr2len)(ml_get_cursor());
+ else
+- #ifdef FEAT_VIRTUALEDIT
+ if (c != TAB || ve_flags != VE_ALL)
+- #endif
+ ++curwin->w_cursor.col;
+ ++col;
+ }
+ else
+ getvcol(curwin, &curwin->w_cursor, &col, NULL, &endcol2);
+
+- #ifdef FEAT_VIRTUALEDIT
+ col += curwin->w_cursor.coladd;
+ if (ve_flags == VE_ALL
+ && (curwin->w_cursor.coladd > 0
+--- 3636,3657 ----
+***************
+*** 3741,3747 ****
+ }
+ }
+ curwin->w_cursor.coladd = 0;
+- #endif
+ bd.textcol = 0;
+ for (i = 0; i < y_size; ++i)
+ {
+--- 3670,3675 ----
+***************
+*** 3850,3858 ****
+ /* adjust '] mark */
+ curbuf->b_op_end.lnum = curwin->w_cursor.lnum - 1;
+ curbuf->b_op_end.col = bd.textcol + totlen - 1;
+- # ifdef FEAT_VIRTUALEDIT
+ curbuf->b_op_end.coladd = 0;
+- # endif
+ if (flags & PUT_CURSEND)
+ {
+ colnr_T len;
+--- 3778,3784 ----
+***************
+*** 4144,4158 ****
+ {
+ if (curwin->w_cursor.col > 0
+ && gchar_cursor() == NUL
+- #ifdef FEAT_VIRTUALEDIT
+ && (ve_flags & VE_ONEMORE) == 0
+- #endif
+ && !(restart_edit || (State & INSERT)))
+ {
+ /* Put the cursor on the last character in the line. */
+ dec_cursor();
+
+- #ifdef FEAT_VIRTUALEDIT
+ if (ve_flags == VE_ALL)
+ {
+ colnr_T scol, ecol;
+--- 4070,4081 ----
+***************
+*** 4161,4167 ****
+ getvcol(curwin, &curwin->w_cursor, &scol, NULL, &ecol);
+ curwin->w_cursor.coladd = ecol - scol + 1;
+ }
+- #endif
+ }
+ }
+
+--- 4084,4089 ----
+***************
+*** 4704,4712 ****
+ (vim_strchr(p_cpo, CPO_JOINCOL) != NULL ? currsize : col);
+ check_cursor_col();
+
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ curwin->w_set_curswant = TRUE;
+
+ theend:
+--- 4626,4632 ----
+***************
+*** 7394,7406 ****
+ switch (VIsual_mode)
+ {
+ case Ctrl_V:
+- #ifdef FEAT_VIRTUALEDIT
+ virtual_op = virtual_active();
+- #endif
+ block_prep(&oparg, &bd, lnum, 0);
+- #ifdef FEAT_VIRTUALEDIT
+ virtual_op = MAYBE;
+- #endif
+ s = bd.textstart;
+ len = (long)bd.textlen;
+ break;
+--- 7314,7322 ----
+*** ../vim-8.1.0825/src/option.c 2019-01-24 20:30:49.329537911 +0100
+--- src/option.c 2019-01-26 17:05:29.437408083 +0100
+***************
+*** 2939,2951 ****
+ SCTX_INIT},
+ {"virtualedit", "ve", P_STRING|P_ONECOMMA|P_NODUP|P_VI_DEF
+ |P_VIM|P_CURSWANT,
+- #ifdef FEAT_VIRTUALEDIT
+ (char_u *)&p_ve, PV_NONE,
+ {(char_u *)"", (char_u *)""}
+- #else
+- (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,
+--- 2939,2946 ----
+***************
+*** 5526,5534 ****
+ #endif
+ (void)opt_strings_flags(p_dy, p_dy_values, &dy_flags, TRUE);
+ (void)opt_strings_flags(p_tc, p_tc_values, &tc_flags, FALSE);
+- #ifdef FEAT_VIRTUALEDIT
+ (void)opt_strings_flags(p_ve, p_ve_values, &ve_flags, TRUE);
+- #endif
+ #if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS))
+ (void)opt_strings_flags(p_ttym, p_ttym_values, &ttym_flags, FALSE);
+ #endif
+--- 5521,5527 ----
+***************
+*** 7374,7380 ****
+ }
+ #endif
+
+- #ifdef FEAT_VIRTUALEDIT
+ /* 'virtualedit' */
+ else if (varp == &p_ve)
+ {
+--- 7367,7372 ----
+***************
+*** 7388,7394 ****
+ coladvance(curwin->w_virtcol);
+ }
+ }
+- #endif
+
+ #if defined(FEAT_CSCOPE) && defined(FEAT_QUICKFIX)
+ else if (varp == &p_csqf)
+--- 7380,7385 ----
+*** ../vim-8.1.0825/src/option.h 2019-01-24 17:18:37.599462306 +0100
+--- src/option.h 2019-01-26 17:09:57.939477219 +0100
+***************
+*** 908,924 ****
+ EXTERN unsigned vop_flags; /* uses SSOP_ flags */
+ #endif
+ EXTERN int p_vb; /* 'visualbell' */
+- #ifdef FEAT_VIRTUALEDIT
+ EXTERN char_u *p_ve; /* 'virtualedit' */
+ EXTERN unsigned ve_flags;
+! # ifdef IN_OPTION_C
+ static char *(p_ve_values[]) = {"block", "insert", "all", "onemore", NULL};
+- # endif
+- # define VE_BLOCK 5 /* includes "all" */
+- # define VE_INSERT 6 /* includes "all" */
+- # define VE_ALL 4
+- # define VE_ONEMORE 8
+ #endif
+ EXTERN long p_verbose; /* 'verbose' */
+ #ifdef IN_OPTION_C
+ char_u *p_vfile = (char_u *)""; /* used before options are initialized */
+--- 908,922 ----
+ EXTERN unsigned vop_flags; /* uses SSOP_ flags */
+ #endif
+ EXTERN int p_vb; /* 'visualbell' */
+ EXTERN char_u *p_ve; /* 'virtualedit' */
+ EXTERN unsigned ve_flags;
+! #ifdef IN_OPTION_C
+ static char *(p_ve_values[]) = {"block", "insert", "all", "onemore", NULL};
+ #endif
++ #define VE_BLOCK 5 /* includes "all" */
++ #define VE_INSERT 6 /* includes "all" */
++ #define VE_ALL 4
++ #define VE_ONEMORE 8
+ EXTERN long p_verbose; /* 'verbose' */
+ #ifdef IN_OPTION_C
+ char_u *p_vfile = (char_u *)""; /* used before options are initialized */
+*** ../vim-8.1.0825/src/screen.c 2019-01-25 22:29:54.139821894 +0100
+--- src/screen.c 2019-01-26 17:06:13.673090691 +0100
+***************
+*** 1622,1635 ****
+ if (VIsual_mode == Ctrl_V)
+ {
+ colnr_T fromc, toc;
+! #if defined(FEAT_VIRTUALEDIT) && defined(FEAT_LINEBREAK)
+ int save_ve_flags = ve_flags;
+
+ if (curwin->w_p_lbr)
+ ve_flags = VE_ALL;
+ #endif
+ getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc);
+! #if defined(FEAT_VIRTUALEDIT) && defined(FEAT_LINEBREAK)
+ ve_flags = save_ve_flags;
+ #endif
+ ++toc;
+--- 1622,1635 ----
+ if (VIsual_mode == Ctrl_V)
+ {
+ colnr_T fromc, toc;
+! #if defined(FEAT_LINEBREAK)
+ int save_ve_flags = ve_flags;
+
+ if (curwin->w_p_lbr)
+ ve_flags = VE_ALL;
+ #endif
+ getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc);
+! #if defined(FEAT_LINEBREAK)
+ ve_flags = save_ve_flags;
+ #endif
+ ++toc;
+***************
+*** 3342,3352 ****
+ }
+ 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;
+--- 3342,3348 ----
+ }
+ if (VIsual_mode != 'V' && lnum == bot->lnum)
+ {
+! if (*p_sel == 'e' && bot->col == 0 && bot->coladd == 0)
+ {
+ fromcol = -10;
+ tocol = MAXCOL;
+***************
+*** 3545,3553 ****
+ #ifdef FEAT_SYN_HL
+ wp->w_p_cuc || draw_color_col ||
+ #endif
+- #ifdef FEAT_VIRTUALEDIT
+ virtual_active() ||
+- #endif
+ (VIsual_active && wp->w_buffer == curwin->w_buffer)))
+ {
+ vcol = v;
+--- 3541,3547 ----
+***************
+*** 5033,5046 ****
+ )
+ #endif
+ {
+- #ifdef FEAT_VIRTUALEDIT
+ /* In virtualedit, visual selections may extend
+ * beyond end of line. */
+ if (area_highlighting && virtual_active()
+ && tocol != MAXCOL && vcol < tocol)
+ n_extra = 0;
+ else
+- #endif
+ {
+ p_extra = at_end_str;
+ n_extra = 1;
+--- 5027,5038 ----
+***************
+*** 5107,5113 ****
+ }
+ mb_utf8 = FALSE; /* don't draw as UTF-8 */
+ }
+- #ifdef FEAT_VIRTUALEDIT
+ else if (VIsual_active
+ && (VIsual_mode == Ctrl_V
+ || VIsual_mode == 'v')
+--- 5099,5104 ----
+***************
+*** 5115,5129 ****
+ && tocol != MAXCOL
+ && vcol < tocol
+ && (
+! # ifdef FEAT_RIGHTLEFT
+ wp->w_p_rl ? (col >= 0) :
+! # endif
+ (col < wp->w_width)))
+ {
+ c = ' ';
+ --ptr; /* put it back at the NUL */
+ }
+- #endif
+ #if defined(LINE_ATTR)
+ else if ((
+ # ifdef FEAT_DIFF
+--- 5106,5119 ----
+ && tocol != MAXCOL
+ && vcol < tocol
+ && (
+! #ifdef FEAT_RIGHTLEFT
+ wp->w_p_rl ? (col >= 0) :
+! #endif
+ (col < wp->w_width)))
+ {
+ c = ' ';
+ --ptr; /* put it back at the NUL */
+ }
+ #if defined(LINE_ATTR)
+ else if ((
+ # ifdef FEAT_DIFF
+***************
+*** 10866,10874 ****
+ || wp->w_cursor.lnum != wp->w_ru_cursor.lnum
+ || wp->w_cursor.col != wp->w_ru_cursor.col
+ || wp->w_virtcol != wp->w_ru_virtcol
+- #ifdef FEAT_VIRTUALEDIT
+ || wp->w_cursor.coladd != wp->w_ru_cursor.coladd
+- #endif
+ || wp->w_topline != wp->w_ru_topline
+ || wp->w_buffer->b_ml.ml_line_count != wp->w_ru_line_count
+ #ifdef FEAT_DIFF
+--- 10856,10862 ----
+*** ../vim-8.1.0825/src/search.c 2019-01-24 17:18:37.591462362 +0100
+--- src/search.c 2019-01-26 17:06:44.472869513 +0100
+***************
+*** 1029,1039 ****
+ end_pos->col = endpos.col;
+ }
+ }
+- #ifdef FEAT_VIRTUALEDIT
+ pos->coladd = 0;
+ if (end_pos != NULL)
+ end_pos->coladd = 0;
+- #endif
+ found = 1;
+ first_match = FALSE;
+
+--- 1029,1037 ----
+***************
+*** 1919,1927 ****
+ #endif
+
+ pos = curwin->w_cursor;
+- #ifdef FEAT_VIRTUALEDIT
+ pos.coladd = 0;
+- #endif
+ linep = ml_get(pos.lnum);
+
+ cpo_match = (vim_strchr(p_cpo, CPO_MATCH) != NULL);
+--- 1917,1923 ----
+***************
+*** 3027,3035 ****
+ int i;
+ int last_line;
+
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ cls_bigword = bigword;
+ while (--count >= 0)
+ {
+--- 3023,3029 ----
+***************
+*** 3094,3102 ****
+ {
+ int sclass; /* starting class */
+
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ cls_bigword = bigword;
+ while (--count >= 0)
+ {
+--- 3088,3094 ----
+***************
+*** 3163,3171 ****
+ {
+ int sclass; /* starting class */
+
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ cls_bigword = bigword;
+ while (--count >= 0)
+ {
+--- 3155,3161 ----
+***************
+*** 3233,3241 ****
+ int sclass; /* starting class */
+ int i;
+
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ cls_bigword = bigword;
+ while (--count >= 0)
+ {
+--- 3223,3229 ----
+*** ../vim-8.1.0825/src/spell.c 2019-01-24 17:18:37.591462362 +0100
+--- src/spell.c 2019-01-26 17:06:53.100807527 +0100
+***************
+*** 1652,1660 ****
+ found_one = TRUE;
+ found_pos.lnum = lnum;
+ found_pos.col = (int)(p - buf);
+- #ifdef FEAT_VIRTUALEDIT
+ found_pos.coladd = 0;
+- #endif
+ if (dir == FORWARD)
+ {
+ /* No need to search further. */
+--- 1652,1658 ----
+*** ../vim-8.1.0825/src/structs.h 2019-01-24 17:59:35.135217476 +0100
+--- src/structs.h 2019-01-26 17:10:06.495415544 +0100
+***************
+*** 21,50 ****
+ #endif
+
+ /*
+! * position in file or buffer
+ */
+ typedef struct
+ {
+! linenr_T lnum; /* line number */
+! colnr_T col; /* column number */
+! #ifdef FEAT_VIRTUALEDIT
+! colnr_T coladd;
+! #endif
+ } pos_T;
+
+- #ifdef FEAT_VIRTUALEDIT
+- # define INIT_POS_T(l, c, ca) {l, c, ca}
+- #else
+- # define INIT_POS_T(l, c, ca) {l, c}
+- #endif
+
+ /*
+ * Same, but without coladd.
+ */
+ typedef struct
+ {
+! linenr_T lnum; /* line number */
+! colnr_T col; /* column number */
+ } lpos_T;
+
+ /*
+--- 21,43 ----
+ #endif
+
+ /*
+! * Position in file or buffer.
+ */
+ typedef struct
+ {
+! linenr_T lnum; // line number
+! colnr_T col; // column number
+! colnr_T coladd; // extra virtual column
+ } pos_T;
+
+
+ /*
+ * Same, but without coladd.
+ */
+ typedef struct
+ {
+! linenr_T lnum; // line number
+! colnr_T col; // column number
+ } lpos_T;
+
+ /*
+***************
+*** 395,403 ****
+ u_entry_T *uh_entry; /* pointer to first entry */
+ u_entry_T *uh_getbot_entry; /* pointer to where ue_bot must be set */
+ pos_T uh_cursor; /* cursor position before saving */
+- #ifdef FEAT_VIRTUALEDIT
+ long uh_cursor_vcol;
+- #endif
+ int uh_flags; /* see below */
+ pos_T uh_namedm[NMARKS]; /* marks before undo/after redo */
+ visualinfo_T uh_visual; /* Visual areas before undo/after redo */
+--- 388,394 ----
+*** ../vim-8.1.0825/src/tag.c 2019-01-24 17:18:37.595462334 +0100
+--- src/tag.c 2019-01-26 16:50:03.575895716 +0100
+***************
+*** 85,91 ****
+ * Tag for preview window is remembered separately, to avoid messing up the
+ * normal tagstack.
+ */
+! static taggy_T ptag_entry = {NULL, {INIT_POS_T(0, 0, 0), 0}, 0, 0};
+ #endif
+
+ /*
+--- 85,91 ----
+ * Tag for preview window is remembered separately, to avoid messing up the
+ * normal tagstack.
+ */
+! static taggy_T ptag_entry = {NULL, {{0, 0, 0}, 0}, 0, 0};
+ #endif
+
+ /*
+*** ../vim-8.1.0825/src/ui.c 2019-01-24 17:18:37.595462334 +0100
+--- src/ui.c 2019-01-26 17:07:03.456733114 +0100
+***************
+*** 3184,3192 ****
+
+ if (mpos->col > 0)
+ --mpos->col;
+- #ifdef FEAT_VIRTUALEDIT
+ mpos->coladd = 0;
+- #endif
+ return IN_BUFFER;
+ }
+ #endif
+--- 3184,3190 ----
+*** ../vim-8.1.0825/src/undo.c 2019-01-19 17:43:03.429449066 +0100
+--- src/undo.c 2019-01-26 17:07:37.328489616 +0100
+***************
+*** 548,559 ****
+ uhp->uh_entry = NULL;
+ uhp->uh_getbot_entry = NULL;
+ uhp->uh_cursor = curwin->w_cursor; /* save cursor pos. for undo */
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active() && curwin->w_cursor.coladd > 0)
+ uhp->uh_cursor_vcol = getviscol();
+ else
+ uhp->uh_cursor_vcol = -1;
+- #endif
+
+ /* save changed and buffer empty flag for undo */
+ uhp->uh_flags = (curbuf->b_changed ? UH_CHANGED : 0) +
+--- 548,557 ----
+***************
+*** 1250,1260 ****
+ put_header_ptr(bi, uhp->uh_alt_prev.ptr);
+ undo_write_bytes(bi, uhp->uh_seq, 4);
+ serialize_pos(bi, uhp->uh_cursor);
+- #ifdef FEAT_VIRTUALEDIT
+ undo_write_bytes(bi, (long_u)uhp->uh_cursor_vcol, 4);
+- #else
+- undo_write_bytes(bi, (long_u)0, 4);
+- #endif
+ undo_write_bytes(bi, (long_u)uhp->uh_flags, 2);
+ /* Assume NMARKS will stay the same. */
+ for (i = 0; i < NMARKS; ++i)
+--- 1248,1254 ----
+***************
+*** 1309,1319 ****
+ return NULL;
+ }
+ unserialize_pos(bi, &uhp->uh_cursor);
+- #ifdef FEAT_VIRTUALEDIT
+ uhp->uh_cursor_vcol = undo_read_4c(bi);
+- #else
+- (void)undo_read_4c(bi);
+- #endif
+ uhp->uh_flags = undo_read_2c(bi);
+ for (i = 0; i < NMARKS; ++i)
+ unserialize_pos(bi, &uhp->uh_namedm[i]);
+--- 1303,1309 ----
+***************
+*** 1458,1468 ****
+ {
+ undo_write_bytes(bi, (long_u)pos.lnum, 4);
+ undo_write_bytes(bi, (long_u)pos.col, 4);
+- #ifdef FEAT_VIRTUALEDIT
+ undo_write_bytes(bi, (long_u)pos.coladd, 4);
+- #else
+- undo_write_bytes(bi, (long_u)0, 4);
+- #endif
+ }
+
+ /*
+--- 1448,1454 ----
+***************
+*** 1477,1489 ****
+ pos->col = undo_read_4c(bi);
+ if (pos->col < 0)
+ pos->col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ pos->coladd = undo_read_4c(bi);
+ if (pos->coladd < 0)
+ pos->coladd = 0;
+- #else
+- (void)undo_read_4c(bi);
+- #endif
+ }
+
+ /*
+--- 1463,1471 ----
+***************
+*** 2855,2866 ****
+ if (curhead->uh_cursor.lnum == curwin->w_cursor.lnum)
+ {
+ curwin->w_cursor.col = curhead->uh_cursor.col;
+- #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active() && curhead->uh_cursor_vcol >= 0)
+ coladvance((colnr_T)curhead->uh_cursor_vcol);
+ else
+ curwin->w_cursor.coladd = 0;
+- #endif
+ }
+ else
+ beginline(BL_SOL | BL_FIX);
+--- 2837,2846 ----
+***************
+*** 2872,2880 ****
+ * check_cursor() will move the cursor to the last line. Move it to
+ * the first column here. */
+ curwin->w_cursor.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ }
+
+ /* Make sure the cursor is on an existing line and column. */
+--- 2852,2858 ----
+*** ../vim-8.1.0825/src/userfunc.c 2019-01-23 23:00:27.425682956 +0100
+--- src/userfunc.c 2019-01-26 17:07:50.264396582 +0100
+***************
+*** 3178,3186 ****
+ }
+ curwin->w_cursor.lnum = lnum;
+ curwin->w_cursor.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ }
+ arg = startarg;
+ if (get_func_tv(name, (int)STRLEN(name), &rettv, &arg,
+--- 3178,3184 ----
+*** ../vim-8.1.0825/src/version.c 2019-01-26 16:20:44.264683546 +0100
+--- src/version.c 2019-01-26 17:26:58.193155997 +0100
+***************
+*** 695,705 ****
+ "-vartabs",
+ #endif
+ "+vertsplit",
+- #ifdef FEAT_VIRTUALEDIT
+ "+virtualedit",
+- #else
+- "-virtualedit",
+- #endif
+ "+visual",
+ "+visualextra",
+ #ifdef FEAT_VIMINFO
+--- 695,701 ----
+*** ../vim-8.1.0825/src/vim.h 2019-01-24 23:11:44.635650160 +0100
+--- src/vim.h 2019-01-26 17:10:40.183172636 +0100
+***************
+*** 2136,2147 ****
+
+ #include "globals.h" /* global variables and messages */
+
+- #ifndef FEAT_VIRTUALEDIT
+- # define getvvcol(w, p, s, c, e) getvcol((w), (p), (s), (c), (e))
+- # define virtual_active() FALSE
+- # define virtual_op FALSE
+- #endif
+-
+ /*
+ * If console dialog not supported, but GUI dialog is, use the GUI one.
+ */
+--- 2136,2141 ----
+*** ../vim-8.1.0825/src/window.c 2019-01-24 17:18:37.599462306 +0100
+--- src/window.c 2019-01-26 17:08:16.564207364 +0100
+***************
+*** 3439,3447 ****
+ wp->w_lines_valid = 0;
+ wp->w_cursor.lnum = 1;
+ wp->w_curswant = wp->w_cursor.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ wp->w_cursor.coladd = 0;
+- #endif
+ wp->w_pcmark.lnum = 1; /* pcmark not cleared but set to line 1 */
+ wp->w_pcmark.col = 0;
+ wp->w_prev_pcmark.lnum = 0;
+--- 3439,3445 ----
+***************
+*** 4418,4427 ****
+ curwin = wp;
+ curbuf = wp->w_buffer;
+ check_cursor();
+- #ifdef FEAT_VIRTUALEDIT
+ if (!virtual_active())
+ curwin->w_cursor.coladd = 0;
+- #endif
+ changed_line_abv_curs(); /* assume cursor position needs updating */
+
+ if (curwin->w_localdir != NULL)
+--- 4416,4423 ----
+*** ../vim-8.1.0825/src/version.c 2019-01-26 16:20:44.264683546 +0100
+--- src/version.c 2019-01-26 17:26:58.193155997 +0100
+***************
+*** 789,790 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 826,
+ /**/
+
+--
+GUARD #1: Where'd you get the coconut?
+ARTHUR: We found them.
+GUARD #1: Found them? In Mercea? The coconut's tropical!
+ARTHUR: What do you mean?
+GUARD #1: Well, this is a temperate zone.
+ 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.0827 b/data/vim/patches/8.1.0827
new file mode 100644
index 000000000..d42baf419
--- /dev/null
+++ b/data/vim/patches/8.1.0827
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0827
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0827 (after 8.1.0825)
+Problem: Missing dependency in Makefile.
+Solution: Add dependency from autocmd.o on auto/osdef.h
+Files: src/Makefile
+
+
+*** ../vim-8.1.0826/src/Makefile 2019-01-26 16:20:44.260683581 +0100
+--- src/Makefile 2019-01-26 17:34:42.246041916 +0100
+***************
+*** 3383,3389 ****
+ 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/autocmd.o: autocmd.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h os_mac.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ 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 \
+--- 3382,3388 ----
+ 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/autocmd.o: autocmd.c vim.h protodef.h auto/config.h feature.h \
+! auto/osdef.h os_unix.h os_mac.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ 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 \
+*** ../vim-8.1.0826/src/version.c 2019-01-26 17:28:22.236599060 +0100
+--- src/version.c 2019-01-26 17:35:40.421646441 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 827,
+ /**/
+
+--
+GUARD #1: What -- a swallow carrying a coconut?
+ARTHUR: It could grip it by the husk!
+GUARD #1: It's not a question of where he grips it! It's a simple question
+ of weight ratios! A five ounce bird could not carry a 1 pound
+ coconut.
+ 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.0828 b/data/vim/patches/8.1.0828
new file mode 100644
index 000000000..23155a27b
--- /dev/null
+++ b/data/vim/patches/8.1.0828
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0828
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0828
+Problem: Still using FEAT_VIRTUALEDIT.
+Solution: Remove last use of FEAT_VIRTUALEDIT.
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0827/src/quickfix.c 2019-01-24 16:38:58.276712445 +0100
+--- src/quickfix.c 2019-01-26 17:05:35.777362614 +0100
+***************
+*** 3064,3072 ****
+ if (qf_col > 0)
+ {
+ curwin->w_cursor.col = qf_col - 1;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ if (qf_viscol == TRUE)
+ {
+ // Check each character from the beginning of the error
+--- 3064,3070 ----
+***************
+*** 4108,4116 ****
+ curbuf = win->w_buffer;
+ curwin->w_cursor.lnum = lnum;
+ curwin->w_cursor.col = 0;
+- #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+- #endif
+ curwin->w_curswant = 0;
+ update_topline(); // scroll to show the line
+ redraw_later(VALID);
+--- 4106,4112 ----
+*** ../vim-8.1.0827/src/version.c 2019-01-26 17:36:46.997192946 +0100
+--- src/version.c 2019-01-26 17:42:50.142706482 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 828,
+ /**/
+
+--
+"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.0829 b/data/vim/patches/8.1.0829
new file mode 100644
index 000000000..be103e365
--- /dev/null
+++ b/data/vim/patches/8.1.0829
@@ -0,0 +1,129 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0829
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0829
+Problem: When 'hidden' is set session creates extra buffers.
+Solution: Move :badd commands to the end. (Jason Franklin)
+Files: src/ex_docmd.c, src/testdir/test_mksession.vim
+
+
+*** ../vim-8.1.0828/src/ex_docmd.c 2019-01-26 17:28:22.224599141 +0100
+--- src/ex_docmd.c 2019-01-26 18:14:51.237292887 +0100
+***************
+*** 11280,11305 ****
+ if (put_line(fd, "set shortmess=aoO") == FAIL)
+ return FAIL;
+
+- /* Now put the other buffers into the buffer list */
+- FOR_ALL_BUFFERS(buf)
+- {
+- if (!(only_save_windows && buf->b_nwindows == 0)
+- && !(buf->b_help && !(ssop_flags & SSOP_HELP))
+- #ifdef FEAT_TERMINAL
+- /* skip terminal buffers: finished ones are not useful, others
+- * will be resurrected and result in a new buffer */
+- && !bt_terminal(buf)
+- #endif
+- && buf->b_fname != NULL
+- && buf->b_p_bl)
+- {
+- if (fprintf(fd, "badd +%ld ", buf->b_wininfo == NULL ? 1L
+- : buf->b_wininfo->wi_fpos.lnum) < 0
+- || ses_fname(fd, buf, &ssop_flags, TRUE) == FAIL)
+- return FAIL;
+- }
+- }
+-
+ /* the global argument list */
+ if (ses_arglist(fd, "argglobal", &global_alist.al_ga,
+ !(ssop_flags & SSOP_CURDIR), &ssop_flags) == FAIL)
+--- 11280,11285 ----
+***************
+*** 11515,11520 ****
+--- 11495,11523 ----
+ if (restore_stal && put_line(fd, "set stal=1") == FAIL)
+ return FAIL;
+
++ // Now put the remaining buffers into the buffer list.
++ // This is near the end, so that when 'hidden' is set we don't create extra
++ // buffers. If the buffer was already created with another command the
++ // ":badd" will have no effect.
++ FOR_ALL_BUFFERS(buf)
++ {
++ if (!(only_save_windows && buf->b_nwindows == 0)
++ && !(buf->b_help && !(ssop_flags & SSOP_HELP))
++ #ifdef FEAT_TERMINAL
++ // Skip terminal buffers: finished ones are not useful, others
++ // will be resurrected and result in a new buffer.
++ && !bt_terminal(buf)
++ #endif
++ && buf->b_fname != NULL
++ && buf->b_p_bl)
++ {
++ if (fprintf(fd, "badd +%ld ", buf->b_wininfo == NULL ? 1L
++ : buf->b_wininfo->wi_fpos.lnum) < 0
++ || ses_fname(fd, buf, &ssop_flags, TRUE) == FAIL)
++ return FAIL;
++ }
++ }
++
+ /*
+ * Wipe out an empty unnamed buffer we started in.
+ */
+*** ../vim-8.1.0828/src/testdir/test_mksession.vim 2019-01-24 22:23:55.644948698 +0100
+--- src/testdir/test_mksession.vim 2019-01-26 18:10:34.215079163 +0100
+***************
+*** 225,230 ****
+--- 225,253 ----
+ call delete('Xtest_mks.out')
+ endfunc
+
++ func Test_mksession_buffer_count()
++ set hidden
++
++ " Edit exactly three files in the current session.
++ %bwipe!
++ e Xfoo | tabe Xbar | tabe Xbaz
++ tabdo write
++ mksession! Xtest_mks.out
++
++ " Verify that loading the session does not create additional buffers.
++ %bwipe!
++ source Xtest_mks.out
++ call assert_equal(3, len(getbufinfo()))
++
++ " Clean up.
++ call delete('Xfoo')
++ call delete('Xbar')
++ call delete('Xbaz')
++ call delete('Xtest_mks.out')
++ %bwipe!
++ set hidden&
++ endfunc
++
+ if has('extra_search')
+
+ func Test_mksession_hlsearch()
+*** ../vim-8.1.0828/src/version.c 2019-01-26 17:43:16.226527267 +0100
+--- src/version.c 2019-01-26 18:11:42.518604352 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 829,
+ /**/
+
+--
+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.0830 b/data/vim/patches/8.1.0830
new file mode 100644
index 000000000..ea8a95706
--- /dev/null
+++ b/data/vim/patches/8.1.0830
@@ -0,0 +1,50 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0830
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0830
+Problem: Test leaves directory behind on MS-Windows.
+Solution: Close buffer before deleting directory.
+Files: src/testdir/test_swap.vim
+
+
+*** ../vim-8.1.0829/src/testdir/test_swap.vim 2018-09-16 18:46:36.189127529 +0200
+--- src/testdir/test_swap.vim 2019-01-27 14:27:16.413468558 +0100
+***************
+*** 98,103 ****
+--- 98,106 ----
+ split bar/x.txt
+ only
+
++ " Delete the buffer so that swap file is removed before we try to delete the
++ " directory. That fails on MS-Windows.
++ %bdelete!
+ set directory&
+ call delete('Xswapdir', 'rf')
+ endfunc
+*** ../vim-8.1.0829/src/version.c 2019-01-26 20:07:34.592237223 +0100
+--- src/version.c 2019-01-27 14:29:15.148586207 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 830,
+ /**/
+
+--
+ARTHUR: Will you ask your master if he wants to join my court at Camelot?!
+GUARD #1: But then of course African swallows are not migratory.
+GUARD #2: Oh, yeah...
+GUARD #1: So they couldn't bring a coconut back anyway...
+ 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.0831 b/data/vim/patches/8.1.0831
new file mode 100644
index 000000000..325b02fc8
--- /dev/null
+++ b/data/vim/patches/8.1.0831
@@ -0,0 +1,107 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0831
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0831
+Problem: Xxd test fails if man page has dos fileformat.
+Solution: Make a copy with unix fileformat.
+Files: src/testdir/test_xxd.vim
+
+
+*** ../vim-8.1.0830/src/testdir/test_xxd.vim 2019-01-26 14:11:15.083587014 +0100
+--- src/testdir/test_xxd.vim 2019-01-27 14:37:55.120788981 +0100
+***************
+*** 53,66 ****
+ call assert_equal(expected[2:], getline(1,'$'), s:Mess(s:test))
+ endfor
+
+ " Test 5: Print 120 bytes as continuous hexdump with 20 octets per line
+ let s:test += 1
+ %d
+! let fname = '../../runtime/doc/xxd.1'
+! if has('win32') && !filereadable(fname)
+! let fname = '../../doc/xxd.1'
+! endif
+! exe '0r! ' . s:xxd_cmd . ' -l 120 -ps -c20 ' . fname
+ $d
+ let expected = [
+ \ '2e54482058584420312022417567757374203139',
+--- 53,72 ----
+ call assert_equal(expected[2:], getline(1,'$'), s:Mess(s:test))
+ endfor
+
++ " The following tests use the xxd man page.
++ " For these tests to pass, the fileformat must be "unix".
++ let man_copy = 'Xxd.1'
++ let man_page = '../../runtime/doc/xxd.1'
++ if has('win32') && !filereadable(man_page)
++ let man_page = '../../doc/xxd.1'
++ endif
++ %d
++ exe '0r ' man_page '| set ff=unix | $d | w' man_copy '| bwipe!' man_copy
++
+ " Test 5: Print 120 bytes as continuous hexdump with 20 octets per line
+ let s:test += 1
+ %d
+! exe '0r! ' . s:xxd_cmd . ' -l 120 -ps -c20 ' . man_copy
+ $d
+ let expected = [
+ \ '2e54482058584420312022417567757374203139',
+***************
+*** 75,85 ****
+ let s:test += 1
+ for arg in ['-l 13', '-l13', '-len 13']
+ %d
+! exe '0r! ' . s:xxd_cmd . ' -s 0x36 ' . arg . ' -cols 13 ' . fname
+ $d
+ call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996', getline(1), s:Mess(s:test))
+ endfor
+
+ " Test 7: Print C include
+ let s:test += 1
+ call writefile(['TESTabcd09'], 'XXDfile')
+--- 81,94 ----
+ let s:test += 1
+ for arg in ['-l 13', '-l13', '-len 13']
+ %d
+! exe '0r! ' . s:xxd_cmd . ' -s 0x36 ' . arg . ' -cols 13 ' . man_copy
+ $d
+ call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996', getline(1), s:Mess(s:test))
+ endfor
+
++ " Cleanup after tests 5 and 6
++ call delete(man_copy)
++
+ " Test 7: Print C include
+ let s:test += 1
+ call writefile(['TESTabcd09'], 'XXDfile')
+*** ../vim-8.1.0830/src/version.c 2019-01-27 14:29:20.724544960 +0100
+--- src/version.c 2019-01-27 14:39:20.344173095 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 831,
+ /**/
+
+
+--
+MORTICIAN: Bring out your dead!
+ [clang]
+ Bring out your dead!
+ [clang]
+ Bring out your dead!
+CUSTOMER: Here's one -- nine pence.
+DEAD PERSON: I'm not dead!
+ 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.0832 b/data/vim/patches/8.1.0832
new file mode 100644
index 000000000..7bf156573
--- /dev/null
+++ b/data/vim/patches/8.1.0832
@@ -0,0 +1,98 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0832
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0832
+Problem: confirm() is not tested.
+Solution: Add a test. (Dominique Pelle, closes #3868)
+Files: src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0831/src/testdir/test_functions.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_functions.vim 2019-01-27 14:57:15.545336214 +0100
+***************
+*** 1153,1155 ****
+--- 1153,1210 ----
+ call delete('Xfuncexists')
+ delfunc ExistingFunction
+ endfunc
++
++ " Test confirm({msg} [, {choices} [, {default} [, {type}]]])
++ func Test_confirm()
++ if !has('unix') || has('gui_running')
++ return
++ endif
++
++ call feedkeys('o', 'L')
++ let a = confirm('Press O to proceed')
++ call assert_equal(1, a)
++
++ call feedkeys('y', 'L')
++ let a = confirm('Are you sure?', "&Yes\n&No")
++ call assert_equal(1, a)
++
++ call feedkeys('n', 'L')
++ let a = confirm('Are you sure?', "&Yes\n&No")
++ call assert_equal(2, a)
++
++ " confirm() should return 0 when pressing CTRL-C.
++ call feedkeys("\<C-c>", 'L')
++ let a = confirm('Are you sure?', "&Yes\n&No")
++ call assert_equal(0, a)
++
++ " <Esc> requires another character to avoid it being seen as the start of an
++ " escape sequence. Zero should be harmless.
++ call feedkeys("\<Esc>0", 'L')
++ let a = confirm('Are you sure?', "&Yes\n&No")
++ call assert_equal(0, a)
++
++ " Default choice is returned when pressing <CR>.
++ call feedkeys("\<CR>", 'L')
++ let a = confirm('Are you sure?', "&Yes\n&No")
++ call assert_equal(1, a)
++
++ call feedkeys("\<CR>", 'L')
++ let a = confirm('Are you sure?', "&Yes\n&No", 2)
++ call assert_equal(2, a)
++
++ call feedkeys("\<CR>", 'L')
++ let a = confirm('Are you sure?', "&Yes\n&No", 0)
++ call assert_equal(0, a)
++
++ " Test with the {type} 4th argument
++ for type in ['Error', 'Question', 'Info', 'Warning', 'Generic']
++ call feedkeys('y', 'L')
++ let a = confirm('Are you sure?', "&Yes\n&No\n", 1, type)
++ call assert_equal(1, a)
++ endfor
++
++ call assert_fails('call confirm([])', 'E730:')
++ call assert_fails('call confirm("Are you sure?", [])', 'E730:')
++ call assert_fails('call confirm("Are you sure?", "&Yes\n&No\n", [])', 'E745:')
++ call assert_fails('call confirm("Are you sure?", "&Yes\n&No\n", 0, [])', 'E730:')
++ endfunc
+*** ../vim-8.1.0831/src/version.c 2019-01-27 14:41:40.411163229 +0100
+--- src/version.c 2019-01-27 15:00:27.004294355 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 832,
+ /**/
+
+--
+DEAD PERSON: I'm getting better!
+CUSTOMER: No, you're not -- you'll be stone dead in a moment.
+MORTICIAN: Oh, I can't take him like that -- it's against regulations.
+ 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.0833 b/data/vim/patches/8.1.0833
new file mode 100644
index 000000000..ae1efdb58
--- /dev/null
+++ b/data/vim/patches/8.1.0833
@@ -0,0 +1,48 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0833
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0833
+Problem: Memory leak when jumps output is filtered.
+Solution: Free the filtered name. (Dominique Pelle, closes #3869)
+Files: src/mark.c
+
+
+*** ../vim-8.1.0832/src/mark.c 2019-01-26 17:28:22.228599112 +0100
+--- src/mark.c 2019-01-27 15:02:40.179526572 +0100
+***************
+*** 900,906 ****
+--- 900,909 ----
+
+ // apply :filter /pat/ or file name not available
+ if (name == NULL || message_filtered(name))
++ {
++ vim_free(name);
+ continue;
++ }
+
+ msg_putchar('\n');
+ if (got_int)
+*** ../vim-8.1.0832/src/version.c 2019-01-27 15:00:32.476263418 +0100
+--- src/version.c 2019-01-27 15:06:26.390165737 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 833,
+ /**/
+
+--
+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.0834 b/data/vim/patches/8.1.0834
new file mode 100644
index 000000000..f5de64ec5
--- /dev/null
+++ b/data/vim/patches/8.1.0834
@@ -0,0 +1,688 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0834
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0834
+Problem: GUI may wait too long before dealing with messages. Returning
+ early may cause a mapping to time out.
+Solution: Use the waiting loop from Unix also for the GUI.
+ (closes #3817, closes #3824)
+Files: src/ui.c, src/proto/ui.pro, src/os_unix.c, src/gui.c,
+ src/testdir/screendump.vim
+
+
+*** ../vim-8.1.0833/src/ui.c 2019-01-26 17:28:22.236599060 +0100
+--- src/ui.c 2019-01-27 16:50:31.054860125 +0100
+***************
+*** 178,183 ****
+--- 178,225 ----
+ ctrl_c_interrupts = FALSE;
+ }
+
++ /*
++ * Here we call gui_inchar() or mch_inchar(), the GUI or machine-dependent
++ * input function. The functionality they implement is like this:
++ *
++ * while (not timed out)
++ * {
++ * handle-resize;
++ * parse-queued-messages;
++ * if (waited for 'updatetime')
++ * trigger-cursorhold;
++ * ui_wait_for_chars_or_timer()
++ * if (character available)
++ * break;
++ * }
++ *
++ * ui_wait_for_chars_or_timer() does:
++ *
++ * while (not timed out)
++ * {
++ * if (any-timer-triggered)
++ * invoke-timer-callback;
++ * wait-for-character();
++ * if (character available)
++ * break;
++ * }
++ *
++ * wait-for-character() does:
++ * while (not timed out)
++ * {
++ * Wait for event;
++ * if (something on channel)
++ * read/write channel;
++ * else if (resized)
++ * handle_resize();
++ * else if (system event)
++ * deal-with-system-event;
++ * else if (character available)
++ * break;
++ * }
++ *
++ */
++
+ #ifdef FEAT_GUI
+ if (gui.in_use)
+ retval = gui_inchar(buf, maxlen, wtime, tb_change_cnt);
+***************
+*** 205,210 ****
+--- 247,422 ----
+ return retval;
+ }
+
++ #if defined(UNIX) || defined(FEAT_GUI) || defined(PROTO)
++ /*
++ * Common code for mch_inchar() and gui_inchar(): Wait for a while or
++ * indefinitely until characters are available, dealing with timers and
++ * messages on channels.
++ *
++ * "buf" may be NULL if the available characters are not to be returned, only
++ * check if they are available.
++ *
++ * Return the number of characters that are available.
++ * If "wtime" == 0 do not wait for characters.
++ * If "wtime" == n wait a short time for characters.
++ * If "wtime" == -1 wait forever for characters.
++ */
++ int
++ inchar_loop(
++ char_u *buf,
++ int maxlen,
++ long wtime, // don't use "time", MIPS cannot handle it
++ int tb_change_cnt,
++ int (*wait_func)(long wtime, int *interrupted, int ignore_input),
++ int (*resize_func)(int check_only))
++ {
++ int len;
++ int interrupted = FALSE;
++ int did_start_blocking = FALSE;
++ long wait_time;
++ long elapsed_time = 0;
++ #ifdef ELAPSED_FUNC
++ elapsed_T start_tv;
++
++ ELAPSED_INIT(start_tv);
++ #endif
++
++ /* repeat until we got a character or waited long enough */
++ for (;;)
++ {
++ /* Check if window changed size while we were busy, perhaps the ":set
++ * columns=99" command was used. */
++ if (resize_func != NULL)
++ resize_func(FALSE);
++
++ #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
++ wait_time = -1;
++ else
++ {
++ if (wtime >= 0)
++ wait_time = wtime;
++ else
++ // going to block after p_ut
++ wait_time = p_ut;
++ #ifdef ELAPSED_FUNC
++ elapsed_time = ELAPSED_FUNC(start_tv);
++ #endif
++ wait_time -= elapsed_time;
++ if (wait_time <= 0)
++ {
++ if (wtime >= 0)
++ // no character available within "wtime"
++ return 0;
++
++ // No character available within 'updatetime'.
++ did_start_blocking = TRUE;
++ if (trigger_cursorhold() && maxlen >= 3
++ && !typebuf_changed(tb_change_cnt))
++ {
++ // Put K_CURSORHOLD in the input buffer or return it.
++ if (buf == NULL)
++ {
++ char_u ibuf[3];
++
++ ibuf[0] = CSI;
++ ibuf[1] = KS_EXTRA;
++ ibuf[2] = (int)KE_CURSORHOLD;
++ add_to_input_buf(ibuf, 3);
++ }
++ else
++ {
++ buf[0] = K_SPECIAL;
++ buf[1] = KS_EXTRA;
++ buf[2] = (int)KE_CURSORHOLD;
++ }
++ return 3;
++ }
++
++ // There is no character available within 'updatetime' seconds:
++ // flush all the swap files to disk. Also done when
++ // interrupted by SIGWINCH.
++ before_blocking();
++ continue;
++ }
++ }
++
++ #ifdef FEAT_JOB_CHANNEL
++ if (wait_time < 0 || wait_time > 100L)
++ {
++ // Checking if a job ended requires polling. Do this at least
++ // every 100 msec.
++ if (has_pending_job())
++ wait_time = 100L;
++
++ // If there is readahead then parse_queued_messages() timed out and
++ // we should call it again soon.
++ if (channel_any_readahead())
++ wait_time = 10L;
++ }
++ #endif
++ #ifdef FEAT_BEVAL_GUI
++ if (p_beval && wait_time > 100L)
++ // The 'balloonexpr' may indirectly invoke a callback while waiting
++ // for a character, need to check often.
++ wait_time = 100L;
++ #endif
++
++ // Wait for a character to be typed or another event, such as the winch
++ // signal or an event on the monitored file descriptors.
++ if (wait_func(wait_time, &interrupted, FALSE))
++ {
++ // If input was put directly in typeahead buffer bail out here.
++ if (typebuf_changed(tb_change_cnt))
++ return 0;
++
++ // We might have something to return now.
++ if (buf == NULL)
++ // "buf" is NULL, we were just waiting, not actually getting
++ // input.
++ return input_available();
++
++ len = read_from_input_buf(buf, (long)maxlen);
++ if (len > 0)
++ return len;
++ continue;
++ }
++ // Timed out or interrupted with no character available.
++
++ #ifndef ELAPSED_FUNC
++ // estimate the elapsed time
++ elapsed_time += wait_time;
++ #endif
++
++ if ((resize_func != NULL && resize_func(TRUE))
++ #ifdef FEAT_CLIENTSERVER
++ || server_waiting()
++ #endif
++ #ifdef MESSAGE_QUEUE
++ || interrupted
++ #endif
++ || wait_time > 0
++ || (wtime < 0 && !did_start_blocking))
++ // no character available, but something to be done, keep going
++ continue;
++
++ // no character available or interrupted, return zero
++ break;
++ }
++ return 0;
++ }
++ #endif
++
+ #if defined(FEAT_TIMERS) || defined(PROTO)
+ /*
+ * Wait for a timer to fire or "wait_func" to return non-zero.
+*** ../vim-8.1.0833/src/proto/ui.pro 2018-05-17 13:52:54.000000000 +0200
+--- src/proto/ui.pro 2019-01-26 22:35:56.703647735 +0100
+***************
+*** 2,7 ****
+--- 2,8 ----
+ void ui_write(char_u *s, int len);
+ void ui_inchar_undo(char_u *s, int len);
+ int ui_inchar(char_u *buf, int maxlen, long wtime, int tb_change_cnt);
++ int inchar_loop(char_u *buf, int maxlen, long wtime, int tb_change_cnt, int (*wait_func)(long wtime, int *interrupted, int ignore_input), int (*resize_func)(int check_only));
+ int ui_wait_for_chars_or_timer(long wtime, int (*wait_func)(long wtime, int *interrupted, int ignore_input), int *interrupted, int ignore_input);
+ int ui_char_avail(void);
+ void ui_delay(long msec, int ignoreinput);
+*** ../vim-8.1.0833/src/os_unix.c 2019-01-26 15:12:52.558260916 +0100
+--- src/os_unix.c 2019-01-26 22:36:20.799486197 +0100
+***************
+*** 356,361 ****
+--- 356,376 ----
+ }
+
+ /*
++ * Function passed to inchar_loop() to handle window resizing.
++ * If "check_only" is TRUE: Return whether there was a resize.
++ * If "check_only" is FALSE: Deal with the window resized.
++ */
++ static int
++ resize_func(int check_only)
++ {
++ if (check_only)
++ return do_resize;
++ while (do_resize)
++ handle_resize();
++ return FALSE;
++ }
++
++ /*
+ * mch_inchar(): low level input function.
+ * Get a characters from the keyboard.
+ * Return the number of characters that are available.
+***************
+*** 370,507 ****
+ long wtime, /* don't use "time", MIPS cannot handle it */
+ int tb_change_cnt)
+ {
+! int len;
+! int interrupted = FALSE;
+! int did_start_blocking = FALSE;
+! long wait_time;
+! long elapsed_time = 0;
+! #ifdef ELAPSED_FUNC
+! elapsed_T start_tv;
+!
+! ELAPSED_INIT(start_tv);
+! #endif
+!
+! /* repeat until we got a character or waited long enough */
+! for (;;)
+! {
+! /* Check if window changed size while we were busy, perhaps the ":set
+! * columns=99" command was used. */
+! while (do_resize)
+! 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 */
+! wait_time = -1;
+! else
+! {
+! if (wtime >= 0)
+! wait_time = wtime;
+! else
+! /* going to block after p_ut */
+! wait_time = p_ut;
+! #ifdef ELAPSED_FUNC
+! elapsed_time = ELAPSED_FUNC(start_tv);
+! #endif
+! wait_time -= elapsed_time;
+! if (wait_time < 0)
+! {
+! if (wtime >= 0)
+! /* no character available within "wtime" */
+! return 0;
+!
+! else
+! {
+! /* no character available within 'updatetime' */
+! did_start_blocking = TRUE;
+! if (trigger_cursorhold() && maxlen >= 3
+! && !typebuf_changed(tb_change_cnt))
+! {
+! buf[0] = K_SPECIAL;
+! buf[1] = KS_EXTRA;
+! buf[2] = (int)KE_CURSORHOLD;
+! return 3;
+! }
+! /*
+! * If there is no character available within 'updatetime'
+! * seconds flush all the swap files to disk.
+! * Also done when interrupted by SIGWINCH.
+! */
+! before_blocking();
+! continue;
+! }
+! }
+! }
+!
+! #ifdef FEAT_JOB_CHANNEL
+! /* Checking if a job ended requires polling. Do this every 100 msec. */
+! if (has_pending_job() && (wait_time < 0 || wait_time > 100L))
+! wait_time = 100L;
+! /* If there is readahead then parse_queued_messages() timed out and we
+! * should call it again soon. */
+! if ((wait_time < 0 || wait_time > 100L) && channel_any_readahead())
+! wait_time = 10L;
+! #endif
+! #ifdef FEAT_BEVAL_GUI
+! if (p_beval && wait_time > 100L)
+! /* The 'balloonexpr' may indirectly invoke a callback while waiting
+! * for a character, need to check often. */
+! wait_time = 100L;
+! #endif
+!
+! /*
+! * We want to be interrupted by the winch signal
+! * or by an event on the monitored file descriptors.
+! */
+! if (WaitForChar(wait_time, &interrupted, FALSE))
+! {
+! /* If input was put directly in typeahead buffer bail out here. */
+! if (typebuf_changed(tb_change_cnt))
+! return 0;
+!
+! /*
+! * For some terminals we only get one character at a time.
+! * We want the get all available characters, so we could keep on
+! * trying until none is available
+! * For some other terminals this is quite slow, that's why we don't
+! * do it.
+! */
+! len = read_from_input_buf(buf, (long)maxlen);
+! if (len > 0)
+! return len;
+! continue;
+! }
+!
+! /* no character available */
+! #ifndef ELAPSED_FUNC
+! /* estimate the elapsed time */
+! elapsed_time += wait_time;
+! #endif
+!
+! if (do_resize /* interrupted by SIGWINCH signal */
+! #ifdef FEAT_CLIENTSERVER
+! || server_waiting()
+! #endif
+! #ifdef MESSAGE_QUEUE
+! || interrupted
+! #endif
+! || wait_time > 0
+! || (wtime < 0 && !did_start_blocking))
+! continue;
+!
+! /* no character available or interrupted */
+! break;
+! }
+! return 0;
+ }
+
+ static void
+--- 385,392 ----
+ long wtime, /* don't use "time", MIPS cannot handle it */
+ int tb_change_cnt)
+ {
+! return inchar_loop(buf, maxlen, wtime, tb_change_cnt,
+! WaitForChar, resize_func);
+ }
+
+ static void
+*** ../vim-8.1.0833/src/gui.c 2019-01-26 17:28:22.224599141 +0100
+--- src/gui.c 2019-01-26 23:17:38.097634554 +0100
+***************
+*** 2896,2905 ****
+ * or FAIL otherwise.
+ */
+ static int
+! gui_wait_for_chars_or_timer(long wtime)
+ {
+ #ifdef FEAT_TIMERS
+! return ui_wait_for_chars_or_timer(wtime, gui_wait_for_chars_3, NULL, 0);
+ #else
+ return gui_mch_wait_for_chars(wtime);
+ #endif
+--- 2896,2909 ----
+ * or FAIL otherwise.
+ */
+ static int
+! gui_wait_for_chars_or_timer(
+! long wtime,
+! int *interrupted UNUSED,
+! int ignore_input UNUSED)
+ {
+ #ifdef FEAT_TIMERS
+! return ui_wait_for_chars_or_timer(wtime, gui_wait_for_chars_3,
+! interrupted, ignore_input);
+ #else
+ return gui_mch_wait_for_chars(wtime);
+ #endif
+***************
+*** 2907,3000 ****
+
+ /*
+ * The main GUI input routine. Waits for a character from the keyboard.
+! * wtime == -1 Wait forever.
+! * wtime == 0 Don't wait.
+! * wtime > 0 Wait wtime milliseconds for a character.
+! * Returns OK if a character was found to be available within the given time,
+! * or FAIL otherwise.
+ */
+! int
+! gui_wait_for_chars(long wtime, int tb_change_cnt)
+ {
+! int retval;
+! #if defined(ELAPSED_FUNC)
+! elapsed_T start_tv;
+! #endif
+
+ #ifdef FEAT_MENU
+! /*
+! * If we're going to wait a bit, update the menus and mouse shape for the
+! * current State.
+! */
+ if (wtime != 0)
+ gui_update_menus(0);
+ #endif
+
+ gui_mch_update();
+! if (input_available()) /* Got char, return immediately */
+! return OK;
+! if (wtime == 0) /* Don't wait for char */
+! return FAIL;
+!
+! /* Before waiting, flush any output to the screen. */
+! gui_mch_flush();
+!
+! if (wtime > 0)
+ {
+! /* Blink when waiting for a character. Probably only does something
+! * for showmatch() */
+! gui_mch_start_blink();
+! retval = gui_wait_for_chars_or_timer(wtime);
+! gui_mch_stop_blink(TRUE);
+! return retval;
+ }
+
+! #if defined(ELAPSED_FUNC)
+! ELAPSED_INIT(start_tv);
+! #endif
+
+! /*
+! * While we are waiting indefinitely for a character, blink the cursor.
+! */
+ gui_mch_start_blink();
+
+! retval = FAIL;
+! /*
+! * We may want to trigger the CursorHold event. First wait for
+! * 'updatetime' and if nothing is typed within that time, and feedkeys()
+! * wasn't used, put the K_CURSORHOLD key in the input buffer.
+! */
+! if (gui_wait_for_chars_or_timer(p_ut) == OK)
+! retval = OK;
+! else if (trigger_cursorhold()
+! #if defined(ELAPSED_FUNC)
+! && ELAPSED_FUNC(start_tv) >= p_ut
+! #endif
+! && typebuf.tb_change_cnt == tb_change_cnt)
+! {
+! char_u buf[3];
+!
+! /* Put K_CURSORHOLD in the input buffer. */
+! buf[0] = CSI;
+! buf[1] = KS_EXTRA;
+! buf[2] = (int)KE_CURSORHOLD;
+! add_to_input_buf(buf, 3);
+!
+! retval = OK;
+! }
+!
+! if (retval == FAIL && typebuf.tb_change_cnt == tb_change_cnt)
+! {
+! /* Blocking wait. */
+! before_blocking();
+! retval = gui_wait_for_chars_or_timer(-1L);
+! }
+
+ gui_mch_stop_blink(TRUE);
+ return retval;
+ }
+
+ /*
+ * Equivalent of mch_inchar() for the GUI.
+ */
+ int
+--- 2911,2982 ----
+
+ /*
+ * The main GUI input routine. Waits for a character from the keyboard.
+! * "wtime" == -1 Wait forever.
+! * "wtime" == 0 Don't wait.
+! * "wtime" > 0 Wait wtime milliseconds for a character.
+! *
+! * Returns the number of characters read or zero when timed out or interrupted.
+! * "buf" may be NULL, in which case a non-zero number is returned if characters
+! * are available.
+ */
+! static int
+! gui_wait_for_chars_buf(
+! char_u *buf,
+! int maxlen,
+! long wtime, // don't use "time", MIPS cannot handle it
+! int tb_change_cnt)
+ {
+! int retval;
+
+ #ifdef FEAT_MENU
+! // If we're going to wait a bit, update the menus and mouse shape for the
+! // current State.
+ if (wtime != 0)
+ gui_update_menus(0);
+ #endif
+
+ gui_mch_update();
+! if (input_available()) // Got char, return immediately
+ {
+! if (buf != NULL && !typebuf_changed(tb_change_cnt))
+! return read_from_input_buf(buf, (long)maxlen);
+! return 0;
+ }
++ if (wtime == 0) // Don't wait for char
++ return FAIL;
+
+! // Before waiting, flush any output to the screen.
+! gui_mch_flush();
+
+! // Blink while waiting for a character.
+ gui_mch_start_blink();
+
+! // Common function to loop until "wtime" is met, while handling timers and
+! // other callbacks.
+! retval = inchar_loop(buf, maxlen, wtime, tb_change_cnt,
+! gui_wait_for_chars_or_timer, NULL);
+
+ gui_mch_stop_blink(TRUE);
++
+ return retval;
+ }
+
+ /*
++ * Wait for a character from the keyboard without actually reading it.
++ * Also deals with timers.
++ * wtime == -1 Wait forever.
++ * wtime == 0 Don't wait.
++ * wtime > 0 Wait wtime milliseconds for a character.
++ * Returns OK if a character was found to be available within the given time,
++ * or FAIL otherwise.
++ */
++ int
++ gui_wait_for_chars(long wtime, int tb_change_cnt)
++ {
++ return gui_wait_for_chars_buf(NULL, 0, wtime, tb_change_cnt);
++ }
++
++ /*
+ * Equivalent of mch_inchar() for the GUI.
+ */
+ int
+***************
+*** 3004,3013 ****
+ long wtime, /* milli seconds */
+ int tb_change_cnt)
+ {
+! if (gui_wait_for_chars(wtime, tb_change_cnt)
+! && !typebuf_changed(tb_change_cnt))
+! return read_from_input_buf(buf, (long)maxlen);
+! return 0;
+ }
+
+ /*
+--- 2986,2992 ----
+ long wtime, /* milli seconds */
+ int tb_change_cnt)
+ {
+! return gui_wait_for_chars_buf(buf, maxlen, wtime, tb_change_cnt);
+ }
+
+ /*
+*** ../vim-8.1.0833/src/testdir/screendump.vim 2018-12-04 22:24:12.193693584 +0100
+--- src/testdir/screendump.vim 2019-01-27 16:20:34.371242071 +0100
+***************
+*** 58,63 ****
+--- 58,67 ----
+ let cmd .= ' -v ' . a:arguments
+ let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': cols})
+ if &termwinsize == ''
++ " in the GUI we may end up with a different size, try to set it.
++ if term_getsize(buf) != [rows, cols]
++ call term_setsize(buf, rows, cols)
++ endif
+ call assert_equal([rows, cols], term_getsize(buf))
+ else
+ let rows = term_getsize(buf)[0]
+*** ../vim-8.1.0833/src/version.c 2019-01-27 15:07:35.161741346 +0100
+--- src/version.c 2019-01-27 16:36:02.924759049 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 834,
+ /**/
+
+--
+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.0835 b/data/vim/patches/8.1.0835
new file mode 100644
index 000000000..e7cd2f0f3
--- /dev/null
+++ b/data/vim/patches/8.1.0835
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0835
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0835
+Problem: GUI build fails on MS-Windows.
+Solution: Adjust #ifdef.
+Files: src/ui.c
+
+
+*** ../vim-8.1.0834/src/ui.c 2019-01-27 16:55:44.276707556 +0100
+--- src/ui.c 2019-01-27 17:07:12.823962857 +0100
+***************
+*** 399,405 ****
+ #endif
+
+ if ((resize_func != NULL && resize_func(TRUE))
+! #ifdef FEAT_CLIENTSERVER
+ || server_waiting()
+ #endif
+ #ifdef MESSAGE_QUEUE
+--- 399,405 ----
+ #endif
+
+ if ((resize_func != NULL && resize_func(TRUE))
+! #if defined(FEAT_CLIENTSERVER) && defined(UNIX)
+ || server_waiting()
+ #endif
+ #ifdef MESSAGE_QUEUE
+*** ../vim-8.1.0834/src/version.c 2019-01-27 16:55:44.280707527 +0100
+--- src/version.c 2019-01-27 17:08:24.379511035 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 835,
+ /**/
+
+--
+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.0836 b/data/vim/patches/8.1.0836
new file mode 100644
index 000000000..da0c3b9ea
--- /dev/null
+++ b/data/vim/patches/8.1.0836
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0836
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0836
+Problem: User completion test can fail on MS-Windows.
+Solution: Allow for other names befor "Administrator".
+Files: src/testdir/test_cmdline.vim
+
+
+*** ../vim-8.1.0835/src/testdir/test_cmdline.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_cmdline.vim 2019-01-27 15:31:57.448130032 +0100
+***************
+*** 430,437 ****
+ let names = system('net user')
+ if names =~ 'Administrator'
+ " Trying completion of :e ~A should complete to Administrator.
+ call feedkeys(':e ~A' . "\<c-a>\<c-B>\"\<cr>", 'tx')
+! call assert_match('^"e \~Administrator', @:)
+ endif
+ endif
+ endfunc
+--- 430,438 ----
+ let names = system('net user')
+ if names =~ 'Administrator'
+ " Trying completion of :e ~A should complete to Administrator.
++ " There could be other names starting with "A" before Administrator.
+ call feedkeys(':e ~A' . "\<c-a>\<c-B>\"\<cr>", 'tx')
+! call assert_match('^"e \~.*Administrator', @:)
+ endif
+ endif
+ endfunc
+*** ../vim-8.1.0835/src/version.c 2019-01-27 17:08:29.075488494 +0100
+--- src/version.c 2019-01-27 20:38:57.961408706 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 836,
+ /**/
+
+--
+ARTHUR: I did say sorry about the `old woman,' but from the behind you
+ looked--
+DENNIS: What I object to is you automatically treat me like an inferior!
+ARTHUR: Well, I AM 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.0837 b/data/vim/patches/8.1.0837
new file mode 100644
index 000000000..1e3839101
--- /dev/null
+++ b/data/vim/patches/8.1.0837
@@ -0,0 +1,194 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0837
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0837
+Problem: Timer interrupting cursorhold and mapping not tested.
+Solution: Add tests with timers. (Ozaki Kiichi, closes #3871)
+Files: src/testdir/test_autocmd.vim, src/testdir/test_mapping.vim
+
+
+*** ../vim-8.1.0836/src/testdir/test_autocmd.vim 2019-01-24 21:57:11.574719854 +0100
+--- src/testdir/test_autocmd.vim 2019-01-27 22:30:22.173169702 +0100
+***************
+*** 32,37 ****
+--- 32,59 ----
+ call timer_start(100, 'ExitInsertMode')
+ call feedkeys('a', 'x!')
+ call assert_equal(1, g:triggered)
++ unlet g:triggered
++ au! CursorHoldI
++ set updatetime&
++ endfunc
++
++ func Test_cursorhold_insert_with_timer_interrupt()
++ if !has('job')
++ return
++ endif
++ " Need to move the cursor.
++ call feedkeys("ggG", "xt")
++
++ " Confirm the timer invoked in exit_cb of the job doesn't disturb
++ " CursorHoldI event.
++ let g:triggered = 0
++ au CursorHoldI * let g:triggered += 1
++ set updatetime=500
++ call job_start(has('win32') ? 'cmd /c echo:' : 'echo',
++ \ {'exit_cb': {j, s -> timer_start(1000, 'ExitInsertMode')}})
++ call feedkeys('a', 'x!')
++ call assert_equal(1, g:triggered)
++ unlet g:triggered
+ au! CursorHoldI
+ set updatetime&
+ endfunc
+***************
+*** 44,49 ****
+--- 66,72 ----
+ " CursorHoldI does not trigger after CTRL-X
+ call feedkeys("a\<C-X>", 'x!')
+ call assert_equal(0, g:triggered)
++ unlet g:triggered
+ au! CursorHoldI
+ set updatetime&
+ endfunc
+***************
+*** 452,458 ****
+ endfunc
+
+ func Test_OptionSet()
+! if !has("eval") || !has("autocmd") || !exists("+autochdir")
+ return
+ endif
+
+--- 475,481 ----
+ endfunc
+
+ func Test_OptionSet()
+! if !has("eval") || !exists("+autochdir")
+ return
+ endif
+
+***************
+*** 595,601 ****
+
+ func Test_OptionSet_diffmode()
+ call test_override('starting', 1)
+! " 18: Changing an option when enetering diff mode
+ new
+ au OptionSet diff :let &l:cul=v:option_new
+
+--- 618,624 ----
+
+ func Test_OptionSet_diffmode()
+ call test_override('starting', 1)
+! " 18: Changing an option when entering diff mode
+ new
+ au OptionSet diff :let &l:cul=v:option_new
+
+*** ../vim-8.1.0836/src/testdir/test_mapping.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_mapping.vim 2019-01-27 22:30:22.173169702 +0100
+***************
+*** 1,5 ****
+--- 1,7 ----
+ " Tests for mappings and abbreviations
+
++ source shared.vim
++
+ func Test_abbreviation()
+ " abbreviation with 0x80 should work
+ inoreab чкпр vim
+***************
+*** 169,174 ****
+--- 171,179 ----
+ endfunc
+
+ func Test_map_timeout()
++ if !has('timers')
++ return
++ endif
+ nnoremap aaaa :let got_aaaa = 1<CR>
+ nnoremap bb :let got_bb = 1<CR>
+ nmap b aaa
+***************
+*** 178,184 ****
+ call feedkeys("\<Esc>", "t")
+ endfunc
+ set timeout timeoutlen=200
+! call timer_start(300, 'ExitInsert')
+ " After the 'b' Vim waits for another character to see if it matches 'bb'.
+ " When it times out it is expanded to "aaa", but there is no wait for
+ " "aaaa". Can't check that reliably though.
+--- 183,189 ----
+ call feedkeys("\<Esc>", "t")
+ endfunc
+ set timeout timeoutlen=200
+! let timer = timer_start(300, 'ExitInsert')
+ " After the 'b' Vim waits for another character to see if it matches 'bb'.
+ " When it times out it is expanded to "aaa", but there is no wait for
+ " "aaaa". Can't check that reliably though.
+***************
+*** 193,198 ****
+--- 198,236 ----
+ nunmap b
+ set timeoutlen&
+ delfunc ExitInsert
++ call timer_stop(timer)
++ endfunc
++
++ func Test_map_timeout_with_timer_interrupt()
++ if !has('job') || !has('timers')
++ return
++ endif
++
++ " Confirm the timer invoked in exit_cb of the job doesn't disturb mapped key
++ " sequence.
++ new
++ let g:val = 0
++ nnoremap \12 :let g:val = 1<CR>
++ nnoremap \123 :let g:val = 2<CR>
++ set timeout timeoutlen=1000
++
++ func ExitCb(job, status)
++ let g:timer = timer_start(1, {_ -> feedkeys("3\<Esc>", 't')})
++ endfunc
++
++ call job_start([&shell, &shellcmdflag, 'echo'], {'exit_cb': 'ExitCb'})
++ call feedkeys('\12', 'xt!')
++ call assert_equal(2, g:val)
++
++ bwipe!
++ nunmap \12
++ nunmap \123
++ set timeoutlen&
++ call WaitFor({-> exists('g:timer')})
++ call timer_stop(g:timer)
++ unlet g:timer
++ unlet g:val
++ delfunc ExitCb
+ endfunc
+
+ func Test_abbreviation_CR()
+*** ../vim-8.1.0836/src/version.c 2019-01-27 20:43:38.135329194 +0100
+--- src/version.c 2019-01-27 22:31:38.552579694 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 837,
+ /**/
+
+--
+A computer programmer is a device for turning requirements into
+undocumented features. It runs on cola, pizza and Dilbert cartoons.
+ 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.0838 b/data/vim/patches/8.1.0838
new file mode 100644
index 000000000..48063284f
--- /dev/null
+++ b/data/vim/patches/8.1.0838
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0838
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0838
+Problem: Compiler warning for type conversion.
+Solution: Add a type cast. (Mike Williams)
+Files: src/channel.c
+
+
+*** ../vim-8.1.0837/src/channel.c 2019-01-26 15:12:52.554260934 +0100
+--- src/channel.c 2019-01-28 20:02:41.569583675 +0100
+***************
+*** 90,96 ****
+ if (todo > MAX_NAMED_PIPE_SIZE)
+ size = MAX_NAMED_PIPE_SIZE;
+ else
+! size = todo;
+ // If the pipe overflows while the job does not read the data, WriteFile
+ // will block forever. This abandons the write.
+ memset(&ov, 0, sizeof(ov));
+--- 90,96 ----
+ if (todo > MAX_NAMED_PIPE_SIZE)
+ size = MAX_NAMED_PIPE_SIZE;
+ else
+! size = (DWORD)todo;
+ // If the pipe overflows while the job does not read the data, WriteFile
+ // will block forever. This abandons the write.
+ memset(&ov, 0, sizeof(ov));
+*** ../vim-8.1.0837/src/version.c 2019-01-27 22:32:51.584018729 +0100
+--- src/version.c 2019-01-28 20:03:24.073305936 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 838,
+ /**/
+
+--
+WOMAN: Dennis, there's some lovely filth down here. Oh -- how d'you do?
+ARTHUR: How do you do, good lady. I am Arthur, King of the Britons.
+ Who's castle is that?
+WOMAN: King of the who?
+ 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.0839 b/data/vim/patches/8.1.0839
new file mode 100644
index 000000000..b8f1770de
--- /dev/null
+++ b/data/vim/patches/8.1.0839
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0839
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0839
+Problem: When using VTP wrong colors after a color scheme change.
+Solution: When VTP is active always clear after a color scheme change.
+ (Nobuhiro Takasaki, closes #3872)
+Files: src/ex_docmd.c
+
+
+*** ../vim-8.1.0838/src/ex_docmd.c 2019-01-26 20:07:34.592237223 +0100
+--- src/ex_docmd.c 2019-01-28 20:16:02.924257407 +0100
+***************
+*** 7211,7216 ****
+--- 7211,7225 ----
+ }
+ else if (load_colors(eap->arg) == FAIL)
+ semsg(_("E185: Cannot find color scheme '%s'"), eap->arg);
++
++ #ifdef FEAT_VTP
++ else if (has_vtp_working())
++ {
++ // background color change requires clear + redraw
++ update_screen(CLEAR);
++ redrawcmd();
++ }
++ #endif
+ }
+
+ static void
+*** ../vim-8.1.0838/src/version.c 2019-01-28 20:04:20.324937137 +0100
+--- src/version.c 2019-01-28 20:17:42.931584922 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 839,
+ /**/
+
+--
+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.0840 b/data/vim/patches/8.1.0840
new file mode 100644
index 000000000..ac111eb7b
--- /dev/null
+++ b/data/vim/patches/8.1.0840
@@ -0,0 +1,209 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0840
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0840
+Problem: getchar(0) never returns a character in the terminal.
+Solution: Call wait_func() at least once.
+Files: src/ui.c, src/testdir/test_timers.vim, src/gui_gtk_x11.c,
+ src/gui_w32.c, src/gui_photon.c, src/gui_x11.c
+
+
+*** ../vim-8.1.0839/src/ui.c 2019-01-27 17:08:29.075488494 +0100
+--- src/ui.c 2019-01-28 22:07:04.502261772 +0100
+***************
+*** 272,277 ****
+--- 272,278 ----
+ {
+ int len;
+ int interrupted = FALSE;
++ int did_call_wait_func = FALSE;
+ int did_start_blocking = FALSE;
+ long wait_time;
+ long elapsed_time = 0;
+***************
+*** 313,319 ****
+ elapsed_time = ELAPSED_FUNC(start_tv);
+ #endif
+ wait_time -= elapsed_time;
+! if (wait_time <= 0)
+ {
+ if (wtime >= 0)
+ // no character available within "wtime"
+--- 314,324 ----
+ elapsed_time = ELAPSED_FUNC(start_tv);
+ #endif
+ wait_time -= elapsed_time;
+!
+! // If the waiting time is now zero or less, we timed out. However,
+! // loop at least once to check for characters and events. Matters
+! // when "wtime" is zero.
+! if (wait_time <= 0 && did_call_wait_func)
+ {
+ if (wtime >= 0)
+ // no character available within "wtime"
+***************
+*** 374,379 ****
+--- 379,385 ----
+
+ // Wait for a character to be typed or another event, such as the winch
+ // signal or an event on the monitored file descriptors.
++ did_call_wait_func = TRUE;
+ if (wait_func(wait_time, &interrupted, FALSE))
+ {
+ // If input was put directly in typeahead buffer bail out here.
+*** ../vim-8.1.0839/src/testdir/test_timers.vim 2018-05-12 15:38:17.000000000 +0200
+--- src/testdir/test_timers.vim 2019-01-28 22:00:53.365008615 +0100
+***************
+*** 250,255 ****
+--- 250,265 ----
+ call timer_stop(intr)
+ endfunc
+
++ func Test_getchar_zero()
++ call timer_start(20, {id -> feedkeys('x', 'L')})
++ let c = 0
++ while c == 0
++ let c = getchar(0)
++ sleep 10m
++ endwhile
++ call assert_equal('x', nr2char(c))
++ endfunc
++
+ func Test_ex_mode()
+ " Function with an empty line.
+ func Foo(...)
+*** ../vim-8.1.0839/src/gui_gtk_x11.c 2019-01-20 15:30:36.885328746 +0100
+--- src/gui_gtk_x11.c 2019-01-28 22:15:59.338866293 +0100
+***************
+*** 6317,6326 ****
+
+ timed_out = FALSE;
+
+! /* this timeout makes sure that we will return if no characters arrived in
+! * time */
+! if (wtime > 0)
+! timer = timeout_add(wtime, input_timer_cb, &timed_out);
+ else
+ timer = 0;
+
+--- 6317,6327 ----
+
+ timed_out = FALSE;
+
+! // This timeout makes sure that we will return if no characters arrived in
+! // time. If "wtime" is zero just use one.
+! if (wtime >= 0)
+! timer = timeout_add(wtime <= 0 ? 1L : wtime,
+! input_timer_cb, &timed_out);
+ else
+ timer = 0;
+
+*** ../vim-8.1.0839/src/gui_w32.c 2019-01-24 16:27:41.693254193 +0100
+--- src/gui_w32.c 2019-01-28 22:18:22.097933790 +0100
+***************
+*** 2097,2108 ****
+
+ s_timed_out = FALSE;
+
+! if (wtime > 0)
+ {
+! /* Don't do anything while processing a (scroll) message. */
+ if (s_busy_processing)
+ return FAIL;
+! s_wait_timer = (UINT)SetTimer(NULL, 0, (UINT)wtime,
+ (TIMERPROC)_OnTimer);
+ }
+
+--- 2097,2110 ----
+
+ s_timed_out = FALSE;
+
+! if (wtime >= 0)
+ {
+! // Don't do anything while processing a (scroll) message.
+ if (s_busy_processing)
+ return FAIL;
+!
+! // When called with "wtime" zero, just want one msec.
+! s_wait_timer = (UINT)SetTimer(NULL, 0, (UINT)(wtime == 0 ? 1 : wtime),
+ (TIMERPROC)_OnTimer);
+ }
+
+*** ../vim-8.1.0839/src/gui_photon.c 2019-01-24 15:04:44.674887811 +0100
+--- src/gui_photon.c 2019-01-28 22:18:06.798034897 +0100
+***************
+*** 1344,1351 ****
+ {
+ is_timeout = FALSE;
+
+! if (wtime > 0)
+! PtSetResource(gui_ph_timer_timeout, Pt_ARG_TIMER_INITIAL, wtime, 0);
+
+ while (1)
+ {
+--- 1344,1352 ----
+ {
+ is_timeout = FALSE;
+
+! if (wtime >= 0)
+! PtSetResource(gui_ph_timer_timeout, Pt_ARG_TIMER_INITIAL,
+! wtime == 0 ? 1 : wtime, 0);
+
+ while (1)
+ {
+*** ../vim-8.1.0839/src/gui_x11.c 2019-01-24 15:54:17.786847003 +0100
+--- src/gui_x11.c 2019-01-28 22:19:23.197527600 +0100
+***************
+*** 2683,2691 ****
+
+ timed_out = FALSE;
+
+! if (wtime > 0)
+! timer = XtAppAddTimeOut(app_context, (long_u)wtime, gui_x11_timer_cb,
+! &timed_out);
+ #ifdef FEAT_JOB_CHANNEL
+ /* If there is a channel with the keep_open flag we need to poll for input
+ * on them. */
+--- 2683,2692 ----
+
+ timed_out = FALSE;
+
+! if (wtime >= 0)
+! timer = XtAppAddTimeOut(app_context,
+! (long_u)(wtime == 0 ? 1L : wtime),
+! gui_x11_timer_cb, &timed_out);
+ #ifdef FEAT_JOB_CHANNEL
+ /* If there is a channel with the keep_open flag we need to poll for input
+ * on them. */
+*** ../vim-8.1.0839/src/version.c 2019-01-28 20:19:01.679054801 +0100
+--- src/version.c 2019-01-28 22:31:32.836488283 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 840,
+ /**/
+
+--
+A poem: read aloud:
+
+<> !*''# Waka waka bang splat tick tick hash,
+^"`$$- Caret quote back-tick dollar dollar dash,
+!*=@$_ Bang splat equal at dollar under-score,
+%*<> ~#4 Percent splat waka waka tilde number four,
+&[]../ Ampersand bracket bracket dot dot slash,
+|{,,SYSTEM HALTED Vertical-bar curly-bracket comma comma CRASH.
+
+Fred Bremmer and Steve Kroese (Calvin College & Seminary of Grand Rapids, MI.)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0841 b/data/vim/patches/8.1.0841
new file mode 100644
index 000000000..d5f376450
--- /dev/null
+++ b/data/vim/patches/8.1.0841
@@ -0,0 +1,65 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0841
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0841
+Problem: Travis config to get Lua on MacOS is too complicated.
+Solution: Use an addons entry. (Ozaki Kiichi, closes 3876)
+Files: .travis.yml
+
+
+*** ../vim-8.1.0840/.travis.yml 2019-01-19 13:46:46.417507738 +0100
+--- .travis.yml 2019-01-28 22:55:44.784205324 +0100
+***************
+*** 82,87 ****
+--- 82,91 ----
+ - tcl-dev
+ - cscope
+ - libgtk2.0-dev
++ homebrew:
++ packages:
++ - lua
++ update: true
+
+ before_install:
+ - rvm reset
+***************
+*** 93,99 ****
+ # building cffi only works with gcc, not with clang
+ - if [ "$COVERAGE" = "yes" ]; then CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1; fi
+ # Lua is not installed on Travis OSX
+! - if [ "$TRAVIS_OS_NAME" = "osx" ]; then export HOMEBREW_NO_AUTO_UPDATE=1; brew update; brew install lua; export LUA_PREFIX=/usr/local; fi
+ # Use llvm-cov instead of gcov when compiler is clang.
+ - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CC" = "clang" ]; then ln -sf $(which llvm-cov) /home/travis/bin/gcov; fi
+
+--- 97,103 ----
+ # building cffi only works with gcc, not with clang
+ - if [ "$COVERAGE" = "yes" ]; then CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1; fi
+ # Lua is not installed on Travis OSX
+! - if [ "$TRAVIS_OS_NAME" = "osx" ]; then export LUA_PREFIX=/usr/local; fi
+ # Use llvm-cov instead of gcov when compiler is clang.
+ - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CC" = "clang" ]; then ln -sf $(which llvm-cov) /home/travis/bin/gcov; fi
+
+*** ../vim-8.1.0840/src/version.c 2019-01-28 22:32:54.895909080 +0100
+--- src/version.c 2019-01-28 22:57:36.091249739 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 841,
+ /**/
+
+--
+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.0842 b/data/vim/patches/8.1.0842
new file mode 100644
index 000000000..b4f7a8ca9
--- /dev/null
+++ b/data/vim/patches/8.1.0842
@@ -0,0 +1,88 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0842
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0842
+Problem: getchar_zero test fails on MS-Windows.
+Solution: Disable the test for now.
+Files: src/testdir/test_timers.vim
+
+
+*** ../vim-8.1.0841/src/testdir/test_timers.vim 2019-01-28 22:32:54.891909109 +0100
+--- src/testdir/test_timers.vim 2019-01-28 23:17:59.641147366 +0100
+***************
+*** 251,263 ****
+ endfunc
+
+ func Test_getchar_zero()
+! call timer_start(20, {id -> feedkeys('x', 'L')})
+ let c = 0
+ while c == 0
+ let c = getchar(0)
+ sleep 10m
+ endwhile
+ call assert_equal('x', nr2char(c))
+ endfunc
+
+ func Test_ex_mode()
+--- 251,270 ----
+ endfunc
+
+ func Test_getchar_zero()
+! if has('win32')
+! " Console: no low-level input
+! " GUI: somehow doesn't work
+! return
+! endif
+!
+! let id = timer_start(20, {id -> feedkeys('x', 'L')})
+ let c = 0
+ while c == 0
+ let c = getchar(0)
+ sleep 10m
+ endwhile
+ call assert_equal('x', nr2char(c))
++ call timer_stop(id)
+ endfunc
+
+ func Test_ex_mode()
+***************
+*** 265,271 ****
+ func Foo(...)
+
+ endfunc
+! let timer = timer_start(40, function('g:Foo'), {'repeat':-1})
+ " This used to throw error E749.
+ exe "normal Qsleep 100m\rvi\r"
+ call timer_stop(timer)
+--- 272,278 ----
+ func Foo(...)
+
+ endfunc
+! let timer = timer_start(40, function('g:Foo'), {'repeat':-1})
+ " This used to throw error E749.
+ exe "normal Qsleep 100m\rvi\r"
+ call timer_stop(timer)
+*** ../vim-8.1.0841/src/version.c 2019-01-28 22:59:32.158270510 +0100
+--- src/version.c 2019-01-28 23:18:42.308599613 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 842,
+ /**/
+
+--
+Windows
+M!uqoms
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0843 b/data/vim/patches/8.1.0843
new file mode 100644
index 000000000..7689fa2cf
--- /dev/null
+++ b/data/vim/patches/8.1.0843
@@ -0,0 +1,105 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0843
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0843
+Problem: Memory leak when running "make test_cd".
+Solution: Free the stack element when failing. (Dominique Pelle,
+ closes #3877)
+Files: src/misc2.c
+
+
+*** ../vim-8.1.0842/src/misc2.c 2019-01-26 17:28:22.228599112 +0100
+--- src/misc2.c 2019-01-29 20:14:16.987847674 +0100
+***************
+*** 4657,4663 ****
+--- 4657,4666 ----
+ add_pathsep(file_path);
+ }
+ else
++ {
++ ff_free_stack_element(stackp);
+ goto fail;
++ }
+ }
+
+ /* append the fix part of the search path */
+***************
+*** 4667,4673 ****
+--- 4670,4679 ----
+ add_pathsep(file_path);
+ }
+ else
++ {
++ ff_free_stack_element(stackp);
+ goto fail;
++ }
+
+ #ifdef FEAT_PATH_EXTRA
+ rest_of_wildcards = stackp->ffs_wc_path;
+***************
+*** 4687,4693 ****
+--- 4693,4702 ----
+ if (len + 1 < MAXPATHL)
+ file_path[len++] = '*';
+ else
++ {
++ ff_free_stack_element(stackp);
+ goto fail;
++ }
+ }
+
+ if (*p == 0)
+***************
+*** 4718,4724 ****
+--- 4727,4736 ----
+ if (len + 1 < MAXPATHL)
+ file_path[len++] = *rest_of_wildcards++;
+ else
++ {
++ ff_free_stack_element(stackp);
+ goto fail;
++ }
+
+ file_path[len] = NUL;
+ if (vim_ispathsep(*rest_of_wildcards))
+***************
+*** 4787,4793 ****
+--- 4799,4808 ----
+ STRCAT(file_path, search_ctx->ffsc_file_to_search);
+ }
+ else
++ {
++ ff_free_stack_element(stackp);
+ goto fail;
++ }
+
+ /*
+ * Try without extra suffix and then with suffixes
+*** ../vim-8.1.0842/src/version.c 2019-01-28 23:20:00.407634900 +0100
+--- src/version.c 2019-01-29 20:16:07.459086752 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 843,
+ /**/
+
+--
+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.0844 b/data/vim/patches/8.1.0844
new file mode 100644
index 000000000..202b79969
--- /dev/null
+++ b/data/vim/patches/8.1.0844
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0844
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0844
+Problem: When timer fails test will hang forever.
+Solution: Use reltime() to limit waiting time. (Ozaki Kiichi, closes #3878)
+Files: src/testdir/test_timers.vim
+
+
+*** ../vim-8.1.0843/src/testdir/test_timers.vim 2019-01-28 23:20:00.407634900 +0100
+--- src/testdir/test_timers.vim 2019-01-29 20:34:41.123382637 +0100
+***************
+*** 257,265 ****
+ return
+ endif
+
+ let id = timer_start(20, {id -> feedkeys('x', 'L')})
+ let c = 0
+! while c == 0
+ let c = getchar(0)
+ sleep 10m
+ endwhile
+--- 257,267 ----
+ return
+ endif
+
++ " Measure the elapsed time to avoid a hang when it fails.
++ let start = reltime()
+ let id = timer_start(20, {id -> feedkeys('x', 'L')})
+ let c = 0
+! while c == 0 && reltimefloat(reltime(start)) < 0.2
+ let c = getchar(0)
+ sleep 10m
+ endwhile
+*** ../vim-8.1.0843/src/version.c 2019-01-29 20:17:25.554548212 +0100
+--- src/version.c 2019-01-29 20:36:10.118765845 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 844,
+ /**/
+
+--
+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.0845 b/data/vim/patches/8.1.0845
new file mode 100644
index 000000000..63b96af20
--- /dev/null
+++ b/data/vim/patches/8.1.0845
@@ -0,0 +1,375 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0845
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0845
+Problem: Having job_status() free the job causes problems.
+Solution: Do not actually free the job or terminal yet, put it in a list and
+ free it a bit later. Do not use a terminal after checking the job
+ status. (closes #3873)
+Files: src/channel.c, src/terminal.c, src/proto/terminal.pro, src/misc2.c
+
+
+*** ../vim-8.1.0844/src/channel.c 2019-01-28 20:04:20.324937137 +0100
+--- src/channel.c 2019-01-29 22:08:49.222535249 +0100
+***************
+*** 5161,5168 ****
+ }
+ }
+
+ static void
+! job_free_job(job_T *job)
+ {
+ if (job->jv_next != NULL)
+ job->jv_next->jv_prev = job->jv_prev;
+--- 5161,5171 ----
+ }
+ }
+
++ /*
++ * Remove "job" from the list of jobs.
++ */
+ static void
+! job_unlink(job_T *job)
+ {
+ if (job->jv_next != NULL)
+ job->jv_next->jv_prev = job->jv_prev;
+***************
+*** 5170,5175 ****
+--- 5173,5184 ----
+ first_job = job->jv_next;
+ else
+ job->jv_prev->jv_next = job->jv_next;
++ }
++
++ static void
++ job_free_job(job_T *job)
++ {
++ job_unlink(job);
+ vim_free(job);
+ }
+
+***************
+*** 5183,5194 ****
+--- 5192,5235 ----
+ }
+ }
+
++ job_T *jobs_to_free = NULL;
++
++ /*
++ * Put "job" in a list to be freed later, when it's no longer referenced.
++ */
++ static void
++ job_free_later(job_T *job)
++ {
++ job_unlink(job);
++ job->jv_next = jobs_to_free;
++ jobs_to_free = job;
++ }
++
++ static void
++ free_jobs_to_free_later(void)
++ {
++ job_T *job;
++
++ while (jobs_to_free != NULL)
++ {
++ job = jobs_to_free;
++ jobs_to_free = job->jv_next;
++ job_free_contents(job);
++ vim_free(job);
++ }
++ }
++
+ #if defined(EXITFREE) || defined(PROTO)
+ void
+ job_free_all(void)
+ {
+ while (first_job != NULL)
+ job_free(first_job);
++ free_jobs_to_free_later();
++
++ # ifdef FEAT_TERMINAL
++ free_unused_terminals();
++ # endif
+ }
+ #endif
+
+***************
+*** 5359,5364 ****
+--- 5400,5407 ----
+ * NOTE: Must call job_cleanup() only once right after the status of "job"
+ * changed to JOB_ENDED (i.e. after job_status() returned "dead" first or
+ * mch_detect_ended_job() returned non-NULL).
++ * If the job is no longer used it will be removed from the list of jobs, and
++ * deleted a bit later.
+ */
+ void
+ job_cleanup(job_T *job)
+***************
+*** 5394,5408 ****
+ channel_need_redraw = TRUE;
+ }
+
+! /* Do not free the job in case the close callback of the associated channel
+! * isn't invoked yet and may get information by job_info(). */
+ if (job->jv_refcount == 0 && !job_channel_still_useful(job))
+! {
+! /* The job was already unreferenced and the associated channel was
+! * detached, now that it ended it can be freed. Careful: caller must
+! * not use "job" after this! */
+! job_free(job);
+! }
+ }
+
+ /*
+--- 5437,5449 ----
+ channel_need_redraw = TRUE;
+ }
+
+! // Do not free the job in case the close callback of the associated channel
+! // isn't invoked yet and may get information by job_info().
+ if (job->jv_refcount == 0 && !job_channel_still_useful(job))
+! // The job was already unreferenced and the associated channel was
+! // detached, now that it ended it can be freed. However, a caller might
+! // still use it, thus free it a bit later.
+! job_free_later(job);
+ }
+
+ /*
+***************
+*** 5609,5617 ****
+ if (job == NULL)
+ break;
+ did_end = TRUE;
+! job_cleanup(job); // may free "job"
+ }
+
+ if (channel_need_redraw)
+ {
+ channel_need_redraw = FALSE;
+--- 5650,5661 ----
+ if (job == NULL)
+ break;
+ did_end = TRUE;
+! job_cleanup(job); // may add "job" to jobs_to_free
+ }
+
++ // Actually free jobs that were cleaned up.
++ free_jobs_to_free_later();
++
+ if (channel_need_redraw)
+ {
+ channel_need_redraw = FALSE;
+*** ../vim-8.1.0844/src/terminal.c 2019-01-26 15:12:52.558260916 +0100
+--- src/terminal.c 2019-01-29 22:27:59.339243929 +0100
+***************
+*** 803,812 ****
+--- 803,819 ----
+ ga_clear(&term->tl_scrollback);
+ }
+
++
++ // Terminals that need to be freed soon.
++ term_T *terminals_to_free = NULL;
++
+ /*
+ * Free a terminal and everything it refers to.
+ * Kills the job if there is one.
+ * Called when wiping out a buffer.
++ * The actual terminal structure is freed later in free_unused_terminals(),
++ * because callbacks may wipe out a buffer while the terminal is still
++ * referenced.
+ */
+ void
+ free_terminal(buf_T *buf)
+***************
+*** 816,821 ****
+--- 823,830 ----
+
+ if (term == NULL)
+ return;
++
++ // Unlink the terminal form the list of terminals.
+ if (first_term == term)
+ first_term = term->tl_next;
+ else
+***************
+*** 834,860 ****
+ job_stop(term->tl_job, NULL, "kill");
+ job_unref(term->tl_job);
+ }
+
+! free_scrollback(term);
+
+! term_free_vterm(term);
+! vim_free(term->tl_title);
+ #ifdef FEAT_SESSION
+! vim_free(term->tl_command);
+ #endif
+! vim_free(term->tl_kill);
+! vim_free(term->tl_status_text);
+! vim_free(term->tl_opencmd);
+! vim_free(term->tl_eof_chars);
+ #ifdef WIN3264
+! if (term->tl_out_fd != NULL)
+! fclose(term->tl_out_fd);
+ #endif
+! vim_free(term->tl_cursor_color);
+! vim_free(term);
+! buf->b_term = NULL;
+! if (in_terminal_loop == term)
+! in_terminal_loop = NULL;
+ }
+
+ /*
+--- 843,883 ----
+ job_stop(term->tl_job, NULL, "kill");
+ job_unref(term->tl_job);
+ }
++ term->tl_next = terminals_to_free;
++ terminals_to_free = term;
+
+! buf->b_term = NULL;
+! if (in_terminal_loop == term)
+! in_terminal_loop = NULL;
+! }
+
+! void
+! free_unused_terminals()
+! {
+! while (terminals_to_free != NULL)
+! {
+! term_T *term = terminals_to_free;
+!
+! terminals_to_free = term->tl_next;
+!
+! free_scrollback(term);
+!
+! term_free_vterm(term);
+! vim_free(term->tl_title);
+ #ifdef FEAT_SESSION
+! vim_free(term->tl_command);
+ #endif
+! vim_free(term->tl_kill);
+! vim_free(term->tl_status_text);
+! vim_free(term->tl_opencmd);
+! vim_free(term->tl_eof_chars);
+ #ifdef WIN3264
+! if (term->tl_out_fd != NULL)
+! fclose(term->tl_out_fd);
+ #endif
+! vim_free(term->tl_cursor_color);
+! vim_free(term);
+! }
+ }
+
+ /*
+***************
+*** 1275,1280 ****
+--- 1298,1304 ----
+ /*
+ * Return TRUE if the job for "term" is still running.
+ * If "check_job_status" is TRUE update the job status.
++ * NOTE: "term" may be freed by callbacks.
+ */
+ static int
+ term_job_running_check(term_T *term, int check_job_status)
+***************
+*** 1285,1294 ****
+ && term->tl_job != NULL
+ && channel_is_open(term->tl_job->jv_channel))
+ {
+ if (check_job_status)
+! job_status(term->tl_job);
+! return (term->tl_job->jv_status == JOB_STARTED
+! || term->tl_job->jv_channel->ch_keep_open);
+ }
+ return FALSE;
+ }
+--- 1309,1323 ----
+ && term->tl_job != NULL
+ && channel_is_open(term->tl_job->jv_channel))
+ {
++ job_T *job = term->tl_job;
++
++ // Careful: Checking the job status may invoked callbacks, which close
++ // the buffer and terminate "term". However, "job" will not be freed
++ // yet.
+ if (check_job_status)
+! job_status(job);
+! return (job->jv_status == JOB_STARTED
+! || (job->jv_channel != NULL && job->jv_channel->ch_keep_open));
+ }
+ return FALSE;
+ }
+***************
+*** 2151,2159 ****
+ #ifdef FEAT_GUI
+ if (!curbuf->b_term->tl_system)
+ #endif
+! /* TODO: skip screen update when handling a sequence of keys. */
+! /* Repeat redrawing in case a message is received while redrawing.
+! */
+ while (must_redraw != 0)
+ if (update_screen(0) == FAIL)
+ break;
+--- 2180,2187 ----
+ #ifdef FEAT_GUI
+ if (!curbuf->b_term->tl_system)
+ #endif
+! // TODO: skip screen update when handling a sequence of keys.
+! // Repeat redrawing in case a message is received while redrawing.
+ while (must_redraw != 0)
+ if (update_screen(0) == FAIL)
+ break;
+*** ../vim-8.1.0844/src/proto/terminal.pro 2019-01-20 15:30:36.893328693 +0100
+--- src/proto/terminal.pro 2019-01-29 22:07:47.982845114 +0100
+***************
+*** 5,10 ****
+--- 5,11 ----
+ int term_write_session(FILE *fd, win_T *wp);
+ int term_should_restore(buf_T *buf);
+ void free_terminal(buf_T *buf);
++ void free_unused_terminals(void);
+ void write_to_term(buf_T *buffer, char_u *msg, channel_T *channel);
+ int term_job_running(term_T *term);
+ int term_none_open(term_T *term);
+*** ../vim-8.1.0844/src/misc2.c 2019-01-29 20:17:25.550548240 +0100
+--- src/misc2.c 2019-01-29 22:07:18.670987912 +0100
+***************
+*** 6387,6392 ****
+--- 6387,6395 ----
+ if (job_check_ended())
+ continue;
+ # endif
++ # ifdef FEAT_TERMINAL
++ free_unused_terminals();
++ # endif
+ break;
+ }
+
+*** ../vim-8.1.0844/src/version.c 2019-01-29 20:36:53.350466201 +0100
+--- src/version.c 2019-01-29 21:39:08.114348374 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 845,
+ /**/
+
+--
+"Hegel was right when he said that we learn from history that man can
+never learn anything from history." (George Bernard Shaw)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0846 b/data/vim/patches/8.1.0846
new file mode 100644
index 000000000..8fee91de3
--- /dev/null
+++ b/data/vim/patches/8.1.0846
@@ -0,0 +1,285 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0846
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0846
+Problem: Not easy to recognize the system Vim runs on.
+Solution: Add more items to the features list. (Ozaki Kiichi, closes #3855)
+Files: runtime/doc/eval.txt, src/evalfunc.c,
+ src/testdir/test_channel.vim, src/testdir/test_functions.vim,
+ src/testdir/test_terminal.vim, src/testdir/test_writefile.vim
+
+
+*** ../vim-8.1.0845/runtime/doc/eval.txt 2019-01-24 21:57:11.578719824 +0100
+--- runtime/doc/eval.txt 2019-01-29 22:49:20.265156161 +0100
+***************
+*** 10110,10115 ****
+--- 10170,10176 ----
+ browse Compiled with |:browse| support, and browse() will
+ work.
+ browsefilter Compiled with support for |browsefilter|.
++ bsd Compiled on an OS in the BSD family (excluding macOS).
+ builtin_terms Compiled with some builtin terminals.
+ byte_offset Compiled with support for 'o' in 'statusline'
+ cindent Compiled with 'cindent' support.
+***************
+*** 10162,10167 ****
+--- 10224,10230 ----
+ gui_win32 Compiled with MS Windows Win32 GUI.
+ gui_win32s idem, and Win32s system being used (Windows 3.1)
+ hangul_input Compiled with Hangul input support. |hangul|
++ hpux HP-UX version of Vim.
+ iconv Can use iconv() for conversion.
+ insert_expand Compiled with support for CTRL-X expansion commands in
+ Insert mode.
+***************
+*** 10172,10177 ****
+--- 10235,10241 ----
+ libcall Compiled with |libcall()| support.
+ linebreak Compiled with 'linebreak', 'breakat', 'showbreak' and
+ 'breakindent' support.
++ linux Linux version of Vim.
+ lispindent Compiled with support for lisp indenting.
+ listcmds Compiled with commands for the buffer list |:files|
+ and the argument list |arglist|.
+***************
+*** 10230,10236 ****
+ startuptime Compiled with |--startuptime| support.
+ statusline Compiled with support for 'statusline', 'rulerformat'
+ and special formats of 'titlestring' and 'iconstring'.
+! sun_workshop Compiled with support for Sun |workshop|.
+ syntax Compiled with syntax highlighting support |syntax|.
+ syntax_items There are active syntax highlighting items for the
+ current buffer.
+--- 10294,10301 ----
+ startuptime Compiled with |--startuptime| support.
+ statusline Compiled with support for 'statusline', 'rulerformat'
+ and special formats of 'titlestring' and 'iconstring'.
+! sun SunOS version of Vim.
+! sun_workshop Support for Sun |workshop| has been removed.
+ syntax Compiled with syntax highlighting support |syntax|.
+ syntax_items There are active syntax highlighting items for the
+ current buffer.
+*** ../vim-8.1.0845/src/evalfunc.c 2019-01-26 17:28:22.224599141 +0100
+--- src/evalfunc.c 2019-01-29 22:53:05.411401755 +0100
+***************
+*** 6118,6123 ****
+--- 6118,6132 ----
+ #ifdef __BEOS__
+ "beos",
+ #endif
++ #if defined(BSD) && !defined(MACOS_X)
++ "bsd",
++ #endif
++ #ifdef hpux
++ "hpux",
++ #endif
++ #ifdef __linux__
++ "linux",
++ #endif
+ #ifdef MACOS_X
+ "mac", /* Mac OS X (and, once, Mac OS Classic) */
+ "osx", /* Mac OS X */
+***************
+*** 6129,6134 ****
+--- 6138,6148 ----
+ #ifdef __QNX__
+ "qnx",
+ #endif
++ #ifdef SUN_SYSTEM
++ "sun",
++ #else
++ "moon",
++ #endif
+ #ifdef UNIX
+ "unix",
+ #endif
+***************
+*** 6158,6164 ****
+ #endif
+ "autocmd",
+ #ifdef FEAT_AUTOCHDIR
+! "autochdir",
+ #endif
+ #ifdef FEAT_AUTOSERVERNAME
+ "autoservername",
+--- 6172,6178 ----
+ #endif
+ "autocmd",
+ #ifdef FEAT_AUTOCHDIR
+! "autochdir",
+ #endif
+ #ifdef FEAT_AUTOSERVERNAME
+ "autoservername",
+*** ../vim-8.1.0845/src/testdir/test_channel.vim 2019-01-25 21:01:13.240877414 +0100
+--- src/testdir/test_channel.vim 2019-01-29 22:46:18.030612829 +0100
+***************
+*** 29,35 ****
+ func s:get_resources()
+ let pid = getpid()
+
+! if has('mac')
+ return systemlist('lsof -p ' . pid . ' | awk ''$4~/^[0-9]*[rwu]$/&&$5=="REG"{print$NF}''')
+ elseif isdirectory('/proc/' . pid . '/fd/')
+ return systemlist('readlink /proc/' . pid . '/fd/* | grep -v ''^/dev/''')
+--- 29,35 ----
+ func s:get_resources()
+ let pid = getpid()
+
+! if executable('lsof')
+ return systemlist('lsof -p ' . pid . ' | awk ''$4~/^[0-9]*[rwu]$/&&$5=="REG"{print$NF}''')
+ elseif isdirectory('/proc/' . pid . '/fd/')
+ return systemlist('readlink /proc/' . pid . '/fd/* | grep -v ''^/dev/''')
+*** ../vim-8.1.0845/src/testdir/test_functions.vim 2019-01-27 15:00:32.472263438 +0100
+--- src/testdir/test_functions.vim 2019-01-29 22:46:18.030612829 +0100
+***************
+*** 1054,1075 ****
+ 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
+- " allows to call functions from libc which is not documented.
+- let libc = ''
+ endif
+
+ if has('win32')
+--- 1054,1084 ----
+ let libc = 'msvcrt.dll'
+ elseif has('mac')
+ let libc = 'libSystem.B.dylib'
+! elseif executable('ldd')
+! let libc = matchstr(split(system('ldd ' . GetVimProg())), '/libc\.so\>')
+! endif
+! if get(l:, 'libc', '') ==# ''
+! " On Unix, libc.so can be in various places.
+! if has('linux')
+! " There is not documented but regarding the 1st argument of glibc's
+! " dlopen an empty string and nullptr are equivalent, so using an empty
+! " string for the 1st argument of libcall allows to call functions.
+! let libc = ''
+! elseif has('sun')
+! " 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
+! " Unfortunately skip this test until a good way is found.
+! return
+ endif
+ endif
+
+ if has('win32')
+***************
+*** 1208,1210 ****
+--- 1217,1248 ----
+ call assert_fails('call confirm("Are you sure?", "&Yes\n&No\n", [])', 'E745:')
+ call assert_fails('call confirm("Are you sure?", "&Yes\n&No\n", 0, [])', 'E730:')
+ endfunc
++
++ func Test_platform_name()
++ " The system matches at most only one name.
++ let names = ['amiga', 'beos', 'bsd', 'hpux', 'linux', 'mac', 'qnx', 'sun', 'vms', 'win32', 'win32unix']
++ call assert_inrange(0, 1, len(filter(copy(names), 'has(v:val)')))
++
++ " Is Unix?
++ call assert_equal(has('beos'), has('beos') && has('unix'))
++ call assert_equal(has('bsd'), has('bsd') && has('unix'))
++ call assert_equal(has('hpux'), has('hpux') && has('unix'))
++ call assert_equal(has('linux'), has('linux') && has('unix'))
++ call assert_equal(has('mac'), has('mac') && has('unix'))
++ call assert_equal(has('qnx'), has('qnx') && has('unix'))
++ call assert_equal(has('sun'), has('sun') && has('unix'))
++ call assert_equal(has('win32'), has('win32') && !has('unix'))
++ call assert_equal(has('win32unix'), has('win32unix') && has('unix'))
++
++ if has('unix') && executable('uname')
++ let uname = system('uname')
++ call assert_equal(uname =~? 'BeOS', has('beos'))
++ call assert_equal(uname =~? 'BSD\|DragonFly', has('bsd'))
++ call assert_equal(uname =~? 'HP-UX', has('hpux'))
++ call assert_equal(uname =~? 'Linux', has('linux'))
++ call assert_equal(uname =~? 'Darwin', has('mac'))
++ call assert_equal(uname =~? 'QNX', has('qnx'))
++ call assert_equal(uname =~? 'SunOS', has('sun'))
++ call assert_equal(uname =~? 'CYGWIN\|MSYS', has('win32unix'))
++ endif
++ endfunc
+*** ../vim-8.1.0845/src/testdir/test_terminal.vim 2019-01-24 17:59:35.143217444 +0100
+--- src/testdir/test_terminal.vim 2019-01-29 22:46:18.030612829 +0100
+***************
+*** 559,565 ****
+
+ func Test_terminal_noblock()
+ let buf = term_start(&shell)
+! if has('mac')
+ " The shell or something else has a problem dealing with more than 1000
+ " characters at the same time.
+ let len = 1000
+--- 559,565 ----
+
+ func Test_terminal_noblock()
+ let buf = term_start(&shell)
+! if has('bsd') || has('mac') || has('sun')
+ " The shell or something else has a problem dealing with more than 1000
+ " characters at the same time.
+ let len = 1000
+*** ../vim-8.1.0845/src/testdir/test_writefile.vim 2019-01-24 17:59:35.143217444 +0100
+--- src/testdir/test_writefile.vim 2019-01-29 22:46:18.030612829 +0100
+***************
+*** 33,39 ****
+ endfunc
+
+ func Test_writefile_fails_conversion()
+! if !has('iconv') || system('uname -s') =~ 'SunOS'
+ return
+ endif
+ set nobackup nowritebackup
+--- 33,39 ----
+ endfunc
+
+ func Test_writefile_fails_conversion()
+! if !has('iconv') || has('sun')
+ return
+ endif
+ set nobackup nowritebackup
+*** ../vim-8.1.0845/src/version.c 2019-01-29 22:29:03.550799929 +0100
+--- src/version.c 2019-01-29 22:56:21.525901115 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 846,
+ /**/
+
+--
+ f y cn rd ths thn y cn hv grt jb n cmptr prgrmmng
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0847 b/data/vim/patches/8.1.0847
new file mode 100644
index 000000000..7b5fa9535
--- /dev/null
+++ b/data/vim/patches/8.1.0847
@@ -0,0 +1,82 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0847
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0847
+Problem: May use terminal after it was cleaned up.
+Solution: Use the job pointer.
+Files: src/terminal.c
+
+
+*** ../vim-8.1.0846/src/terminal.c 2019-01-29 22:29:03.550799929 +0100
+--- src/terminal.c 2019-01-29 23:04:59.930003181 +0100
+***************
+*** 1375,1393 ****
+
+ job_stop(buf->b_term->tl_job, NULL, how);
+
+! /* wait for up to a second for the job to die */
+ for (count = 0; count < 100; ++count)
+ {
+! /* buffer, terminal and job may be cleaned up while waiting */
+ if (!buf_valid(buf)
+ || buf->b_term == NULL
+ || buf->b_term->tl_job == NULL)
+ return OK;
+
+! /* call job_status() to update jv_status */
+! job_status(buf->b_term->tl_job);
+! if (buf->b_term->tl_job->jv_status >= JOB_ENDED)
+ return OK;
+ ui_delay(10L, FALSE);
+ mch_check_messages();
+ parse_queued_messages();
+--- 1375,1398 ----
+
+ job_stop(buf->b_term->tl_job, NULL, how);
+
+! // wait for up to a second for the job to die
+ for (count = 0; count < 100; ++count)
+ {
+! job_T *job;
+!
+! // buffer, terminal and job may be cleaned up while waiting
+ if (!buf_valid(buf)
+ || buf->b_term == NULL
+ || buf->b_term->tl_job == NULL)
+ return OK;
++ job = buf->b_term->tl_job;
+
+! // Call job_status() to update jv_status. It may cause the job to be
+! // cleaned up but it won't be freed.
+! job_status(job);
+! if (job->jv_status >= JOB_ENDED)
+ return OK;
++
+ ui_delay(10L, FALSE);
+ mch_check_messages();
+ parse_queued_messages();
+*** ../vim-8.1.0846/src/version.c 2019-01-29 22:58:02.401136295 +0100
+--- src/version.c 2019-01-29 23:06:03.985525682 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 847,
+ /**/
+
+--
+ARTHUR: I command you as King of the Britons to stand aside!
+BLACK KNIGHT: I move for no man.
+ 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.0848 b/data/vim/patches/8.1.0848
new file mode 100644
index 000000000..a33a99a5d
--- /dev/null
+++ b/data/vim/patches/8.1.0848
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0848
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0848
+Problem: Cannot build with Ruby 1.8. (Tom G. Christensen)
+Solution: Use rb-str_new2(). (Yasuhiro Matsumoto, closes #3883,
+ closes #3884)
+Files: src/if_ruby.c
+
+
+*** ../vim-8.1.0847/src/if_ruby.c 2019-01-19 17:43:03.417449145 +0100
+--- src/if_ruby.c 2019-01-30 20:39:54.616490945 +0100
+***************
+*** 1262,1268 ****
+ for (i = 0; i < RSTRING_LEN(str); i++)
+ {
+ sprintf(buf, "%02X", RSTRING_PTR(str)[i]);
+! rb_str_concat(result, rb_str_new_cstr(buf));
+ }
+ return result;
+ }
+--- 1262,1268 ----
+ for (i = 0; i < RSTRING_LEN(str); i++)
+ {
+ sprintf(buf, "%02X", RSTRING_PTR(str)[i]);
+! rb_str_concat(result, rb_str_new2(buf));
+ }
+ return result;
+ }
+*** ../vim-8.1.0847/src/version.c 2019-01-29 23:06:50.097182305 +0100
+--- src/version.c 2019-01-30 20:59:33.203621001 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 848,
+ /**/
+
+--
+MARTHA'S WAY: Don't throw out all that leftover wine. Freeze into ice cubes
+ for future use in casseroles and sauces.
+MY WAY: What leftover wine?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0849 b/data/vim/patches/8.1.0849
new file mode 100644
index 000000000..83de353cf
--- /dev/null
+++ b/data/vim/patches/8.1.0849
@@ -0,0 +1,131 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0849
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0849
+Problem: Cursorline highlight is not always updated.
+Solution: Set w_last_cursorline when redrawing. Fix resetting cursor flags
+ when using the popup menu.
+Files: src/screen.c, src/popupmnu.c, src/testdir/test_highlight.vim,
+ src/testdir/dumps/Test_cursorline_yank_01.dump
+
+
+*** ../vim-8.1.0848/src/screen.c 2019-01-26 17:28:22.232599086 +0100
+--- src/screen.c 2019-01-30 21:37:50.308437559 +0100
+***************
+*** 3712,3717 ****
+--- 3712,3718 ----
+ {
+ line_attr = HL_ATTR(HLF_CUL);
+ area_highlighting = TRUE;
++ wp->w_last_cursorline = wp->w_cursor.lnum;
+ }
+ #endif
+
+*** ../vim-8.1.0848/src/popupmnu.c 2019-01-17 21:09:02.045706371 +0100
+--- src/popupmnu.c 2019-01-30 21:21:51.161694814 +0100
+***************
+*** 368,374 ****
+ // Update the cursor position to be able to compute the popup menu
+ // position. The cursor line length may have changed because of the
+ // inserted completion.
+! curwin->w_valid &= VALID_CROW|VALID_CHEIGHT;
+ validate_cursor();
+ }
+
+--- 368,374 ----
+ // Update the cursor position to be able to compute the popup menu
+ // position. The cursor line length may have changed because of the
+ // inserted completion.
+! curwin->w_valid &= ~(VALID_CROW|VALID_CHEIGHT);
+ validate_cursor();
+ }
+
+*** ../vim-8.1.0848/src/testdir/test_highlight.vim 2019-01-09 23:00:57.997176121 +0100
+--- src/testdir/test_highlight.vim 2019-01-30 21:36:18.289017109 +0100
+***************
+*** 1,6 ****
+--- 1,7 ----
+ " Tests for ":highlight" and highlighting.
+
+ source view_util.vim
++ source screendump.vim
+
+ func Test_highlight()
+ " basic test if ":highlight" doesn't crash
+***************
+*** 129,138 ****
+ endfunc
+
+ func Test_highlight_eol_with_cursorline_vertsplit()
+- if !has('vertsplit')
+- return
+- endif
+-
+ let [hiCursorLine, hi_ul, hi_bg] = HiCursorLine()
+
+ call NewWindow('topleft 5', 5)
+--- 130,135 ----
+***************
+*** 533,535 ****
+--- 530,554 ----
+ set t_Co=0
+ redraw
+ endfunc
++
++ func Test_cursorline_after_yank()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
++ call writefile([
++ \ 'set cul rnu',
++ \ 'call setline(1, ["","1","2","3",""])',
++ \ ], 'Xtest_cursorline_yank')
++ let buf = RunVimInTerminal('-S Xtest_cursorline_yank', {'rows': 8})
++ call term_wait(buf)
++ call term_sendkeys(buf, "Gy3k")
++ call term_wait(buf)
++ call term_sendkeys(buf, "jj")
++
++ call VerifyScreenDump(buf, 'Test_cursorline_yank_01', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('Xtest_cursorline_yank')
++ endfunc
+*** ../vim-8.1.0848/src/testdir/dumps/Test_cursorline_yank_01.dump 2019-01-30 21:40:03.087583983 +0100
+--- src/testdir/dumps/Test_cursorline_yank_01.dump 2019-01-30 21:37:58.852383208 +0100
+***************
+*** 0 ****
+--- 1,8 ----
++ | +0#af5f00255#ffffff0@1|3| | +0#0000000&@70
++ | +0#af5f00255&@1|2| |1+0#0000000&| @69
++ | +0#af5f00255&@1|1| |2+0#0000000&| @69
++ | +0#af5f00255&@1|0| >3+8#0000000&| @69
++ | +0#af5f00255&@1|1| | +0#0000000&@70
++ |~+0#4040ff13&| @73
++ |~| @73
++ |4+0#0000000&| |l|i|n|e|s| |y|a|n|k|e|d| @42|4|,|1| @10|A|l@1|
+*** ../vim-8.1.0848/src/version.c 2019-01-30 21:00:05.867377219 +0100
+--- src/version.c 2019-01-30 21:39:38.139745728 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 849,
+ /**/
+
+--
+5 out of 4 people have trouble with fractions.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0850 b/data/vim/patches/8.1.0850
new file mode 100644
index 000000000..4ecd3162d
--- /dev/null
+++ b/data/vim/patches/8.1.0850
@@ -0,0 +1,116 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0850
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0850
+Problem: Test for 'backupskip' is not correct.
+Solution: Split the option in parts and use expand(). (Michael Soyka)
+Files: src/testdir/test_options.vim
+
+
+*** ../vim-8.1.0849/src/testdir/test_options.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_options.vim 2019-01-30 21:48:05.460371410 +0100
+***************
+*** 75,83 ****
+ endfunc
+
+ func Test_filetype_valid()
+- if !has('autocmd')
+- return
+- endif
+ set ft=valid_name
+ call assert_equal("valid_name", &filetype)
+ set ft=valid-name
+--- 75,80 ----
+***************
+*** 349,365 ****
+ endfunc
+
+ func Test_backupskip()
+ if has("mac")
+! call assert_match('/private/tmp/\*', &bsk)
+ elseif has("unix")
+! call assert_match('/tmp/\*', &bsk)
+ endif
+
+! let bskvalue = substitute(&bsk, '\\', '/', 'g')
+! for var in ['$TEMPDIR', '$TMP', '$TEMP']
+ if exists(var)
+ let varvalue = substitute(expand(var), '\\', '/', 'g')
+! call assert_match(varvalue . '/\=\*', bskvalue)
+ endif
+ endfor
+ endfunc
+--- 346,394 ----
+ endfunc
+
+ func Test_backupskip()
++ " Option 'backupskip' may contain several comma-separated path
++ " specifications if one or more of the environment variables TMPDIR, TMP,
++ " or TEMP is defined. To simplify testing, convert the string value into a
++ " list.
++ let bsklist = split(&bsk, ',')
++
+ if has("mac")
+! let found = (index(bsklist, '/private/tmp/*') >= 0)
+! call assert_true(found, '/private/tmp not in option bsk: ' . &bsk)
+ elseif has("unix")
+! let found = (index(bsklist, '/tmp/*') >= 0)
+! call assert_true(found, '/tmp not in option bsk: ' . &bsk)
+! endif
+!
+! " If our test platform is Windows, the path(s) in option bsk will use
+! " backslash for the path separator and the components could be in short
+! " (8.3) format. As such, we need to replace the backslashes with forward
+! " slashes and convert the path components to long format. The expand()
+! " function will do this but it cannot handle comma-separated paths. This is
+! " why bsk was converted from a string into a list of strings above.
+! "
+! " One final complication is that the wildcard "/*" is at the end of each
+! " path and so expand() might return a list of matching files. To prevent
+! " this, we need to remove the wildcard before calling expand() and then
+! " append it afterwards.
+! if has('win32')
+! let item_nbr = 0
+! while item_nbr < len(bsklist)
+! let path_spec = bsklist[item_nbr]
+! let path_spec = strcharpart(path_spec, 0, strlen(path_spec)-2)
+! let path_spec = substitute(expand(path_spec), '\\', '/', 'g')
+! let bsklist[item_nbr] = path_spec . '/*'
+! let item_nbr += 1
+! endwhile
+ endif
+
+! " Option bsk will also include these environment variables if defined.
+! " If they're defined, verify they appear in the option value.
+! for var in ['$TMPDIR', '$TMP', '$TEMP']
+ if exists(var)
+ let varvalue = substitute(expand(var), '\\', '/', 'g')
+! let found = (index(bsklist, varvalue.'/*') >= 0)
+! call assert_true(found, var . ' not in option bsk: ' . &bsk)
+ endif
+ endfor
+ endfunc
+*** ../vim-8.1.0849/src/version.c 2019-01-30 21:40:58.943219829 +0100
+--- src/version.c 2019-01-30 21:50:23.027435521 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 850,
+ /**/
+
+--
+The early bird gets the worm. If you want something else for
+breakfast, get up later.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0851 b/data/vim/patches/8.1.0851
new file mode 100644
index 000000000..f8f1eec8f
--- /dev/null
+++ b/data/vim/patches/8.1.0851
@@ -0,0 +1,144 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0851
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0851
+Problem: feedkeys() with "L" does not work properly.
+Solution: Do not set typebuf_was_filled when using "L". (Ozaki Kiichi,
+ closes #3885)
+Files: src/evalfunc.c, src/testdir/test_autocmd.vim,
+ src/testdir/test_mapping.vim, src/testdir/test_timers.vim
+
+
+*** ../vim-8.1.0850/src/evalfunc.c 2019-01-29 22:58:02.401136295 +0100
+--- src/evalfunc.c 2019-01-30 21:55:17.473416488 +0100
+***************
+*** 3705,3719 ****
+ #endif
+ }
+ else
+ ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
+ insert ? 0 : typebuf.tb_len, !typed, FALSE);
+! vim_free(keys_esc);
+! if (vgetc_busy
+ #ifdef FEAT_TIMERS
+! || timer_busy
+ #endif
+! )
+! typebuf_was_filled = TRUE;
+ if (execute)
+ {
+ int save_msg_scroll = msg_scroll;
+--- 3705,3722 ----
+ #endif
+ }
+ else
++ {
+ ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
+ insert ? 0 : typebuf.tb_len, !typed, FALSE);
+! if (vgetc_busy
+ #ifdef FEAT_TIMERS
+! || timer_busy
+ #endif
+! )
+! typebuf_was_filled = TRUE;
+! }
+! vim_free(keys_esc);
+!
+ if (execute)
+ {
+ int save_msg_scroll = msg_scroll;
+*** ../vim-8.1.0850/src/testdir/test_autocmd.vim 2019-01-27 22:32:51.584018729 +0100
+--- src/testdir/test_autocmd.vim 2019-01-30 21:55:17.473416488 +0100
+***************
+*** 50,56 ****
+ au CursorHoldI * let g:triggered += 1
+ set updatetime=500
+ call job_start(has('win32') ? 'cmd /c echo:' : 'echo',
+! \ {'exit_cb': {j, s -> timer_start(1000, 'ExitInsertMode')}})
+ call feedkeys('a', 'x!')
+ call assert_equal(1, g:triggered)
+ unlet g:triggered
+--- 50,56 ----
+ au CursorHoldI * let g:triggered += 1
+ set updatetime=500
+ call job_start(has('win32') ? 'cmd /c echo:' : 'echo',
+! \ {'exit_cb': {-> timer_start(1000, 'ExitInsertMode')}})
+ call feedkeys('a', 'x!')
+ call assert_equal(1, g:triggered)
+ unlet g:triggered
+*** ../vim-8.1.0850/src/testdir/test_mapping.vim 2019-01-27 22:32:51.584018729 +0100
+--- src/testdir/test_mapping.vim 2019-01-30 21:55:17.473416488 +0100
+***************
+*** 215,221 ****
+ set timeout timeoutlen=1000
+
+ func ExitCb(job, status)
+! let g:timer = timer_start(1, {_ -> feedkeys("3\<Esc>", 't')})
+ endfunc
+
+ call job_start([&shell, &shellcmdflag, 'echo'], {'exit_cb': 'ExitCb'})
+--- 215,221 ----
+ set timeout timeoutlen=1000
+
+ func ExitCb(job, status)
+! let g:timer = timer_start(1, {-> feedkeys("3\<Esc>", 't')})
+ endfunc
+
+ call job_start([&shell, &shellcmdflag, 'echo'], {'exit_cb': 'ExitCb'})
+*** ../vim-8.1.0850/src/testdir/test_timers.vim 2019-01-29 20:36:53.350466201 +0100
+--- src/testdir/test_timers.vim 2019-01-30 21:55:17.473416488 +0100
+***************
+*** 251,265 ****
+ endfunc
+
+ func Test_getchar_zero()
+! if has('win32')
+ " Console: no low-level input
+- " GUI: somehow doesn't work
+ return
+ endif
+
+ " Measure the elapsed time to avoid a hang when it fails.
+ let start = reltime()
+! let id = timer_start(20, {id -> feedkeys('x', 'L')})
+ let c = 0
+ while c == 0 && reltimefloat(reltime(start)) < 0.2
+ let c = getchar(0)
+--- 251,264 ----
+ endfunc
+
+ func Test_getchar_zero()
+! if has('win32') && !has('gui_running')
+ " Console: no low-level input
+ return
+ endif
+
+ " Measure the elapsed time to avoid a hang when it fails.
+ let start = reltime()
+! let id = timer_start(20, {-> feedkeys('x', 'L')})
+ let c = 0
+ while c == 0 && reltimefloat(reltime(start)) < 0.2
+ let c = getchar(0)
+*** ../vim-8.1.0850/src/version.c 2019-01-30 21:51:24.427016059 +0100
+--- src/version.c 2019-01-30 22:01:25.434932254 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 851,
+ /**/
+
+--
+The early bird gets the worm. The second mouse gets the cheese.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0852 b/data/vim/patches/8.1.0852
new file mode 100644
index 000000000..cb5cdd8cc
--- /dev/null
+++ b/data/vim/patches/8.1.0852
@@ -0,0 +1,235 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0852
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0852
+Problem: findfile() and finddir() are not properly tested.
+Solution: Extend the test and add more. (Dominique Pelle, closes #3880)
+Files: src/testdir/test_findfile.vim
+
+
+*** ../vim-8.1.0851/src/testdir/test_findfile.vim 2017-02-23 18:20:26.000000000 +0100
+--- src/testdir/test_findfile.vim 2019-01-30 22:11:09.378956665 +0100
+***************
+*** 1,25 ****
+! " Test for findfile()
+! "
+ func Test_findfile()
+! new
+! let cwd=getcwd()
+! cd ..
+
+! " Tests may be run from a shadow directory, so an extra cd needs to be done to
+! " get above src/
+! if fnamemodify(getcwd(), ':t') != 'src'
+! cd ../..
+! else
+! cd ..
+! endif
+! set ssl
+
+! call assert_equal('src/testdir/test_findfile.vim', findfile('test_findfile.vim','src/test*'))
+! exe "cd" cwd
+ cd ..
+! call assert_equal('testdir/test_findfile.vim', findfile('test_findfile.vim','test*'))
+! call assert_equal('testdir/test_findfile.vim', findfile('test_findfile.vim','testdir'))
+
+! exe "cd" cwd
+! q!
+ endfunc
+--- 1,169 ----
+! " Test findfile() and finddir()
+!
+! let s:files = [ 'Xdir1/foo',
+! \ 'Xdir1/bar',
+! \ 'Xdir1/Xdir2/foo',
+! \ 'Xdir1/Xdir2/foobar',
+! \ 'Xdir1/Xdir2/Xdir3/bar',
+! \ 'Xdir1/Xdir2/Xdir3/barfoo' ]
+!
+! func CreateFiles()
+! call mkdir('Xdir1/Xdir2/Xdir3/Xdir2', 'p')
+! for f in s:files
+! call writefile([], f)
+! endfor
+! endfunc
+!
+! func CleanFiles()
+! " Safer to delete each file even if it's more verbose
+! " than doing a recursive delete('Xdir1', 'rf').
+! for f in s:files
+! call delete(f)
+! endfor
+!
+! call delete('Xdir1/Xdir2/Xdir3/Xdir2', 'd')
+! call delete('Xdir1/Xdir2/Xdir3', 'd')
+! call delete('Xdir1/Xdir2', 'd')
+! call delete('Xdir1', 'd')
+! endfunc
+!
+! " Test findfile({name} [, {path} [, {count}]])
+ func Test_findfile()
+! let save_path = &path
+! let save_shellslash = &shellslash
+! let save_dir = getcwd()
+! set shellslash
+! call CreateFiles()
+! cd Xdir1
+! e Xdir2/foo
+!
+! " With ,, in path, findfile() searches in current directory.
+! set path=,,
+! call assert_equal('foo', findfile('foo'))
+! call assert_equal('bar', findfile('bar'))
+! call assert_equal('', findfile('foobar'))
+!
+! " Directories should not be found (finddir() finds them).
+! call assert_equal('', findfile('Xdir2'))
+!
+! " With . in 'path', findfile() searches relatively to current file.
+! set path=.
+! call assert_equal('Xdir2/foo', findfile('foo'))
+! call assert_equal('', findfile('bar'))
+! call assert_equal('Xdir2/foobar', findfile('foobar'))
+!
+! " Empty {path} 2nd argument is the same as no 2nd argument.
+! call assert_equal('Xdir2/foo', findfile('foo', ''))
+! call assert_equal('', findfile('bar', ''))
+!
+! " Test with *
+! call assert_equal('Xdir2/foo', findfile('foo', '*'))
+! call assert_equal('', findfile('bar', '*'))
+! call assert_equal('Xdir2/Xdir3/bar', findfile('bar', '*/*'))
+! call assert_equal('Xdir2/Xdir3/bar', findfile('bar', 'Xdir2/*'))
+! call assert_equal('Xdir2/Xdir3/bar', findfile('bar', 'Xdir*/Xdir3'))
+! call assert_equal('Xdir2/Xdir3/bar', findfile('bar', '*2/*3'))
+!
+! " Test with **
+! call assert_equal('bar', findfile('bar', '**'))
+! call assert_equal('Xdir2/Xdir3/bar', findfile('bar', '**/Xdir3'))
+! call assert_equal('Xdir2/Xdir3/bar', findfile('bar', 'Xdir2/**'))
+!
+! call assert_equal('Xdir2/Xdir3/barfoo', findfile('barfoo', '**2'))
+! call assert_equal('', findfile('barfoo', '**1'))
+! call assert_equal('Xdir2/foobar', findfile('foobar', '**1'))
+!
+! " Test with {count} 3rd argument.
+! call assert_equal('bar', findfile('bar', '**', 0))
+! call assert_equal('bar', findfile('bar', '**', 1))
+! call assert_equal('Xdir2/Xdir3/bar', findfile('bar', '**', 2))
+! call assert_equal('', findfile('bar', '**', 3))
+! call assert_equal(['bar', 'Xdir2/Xdir3/bar'], findfile('bar', '**', -1))
+!
+! " Test upwards search.
+! cd Xdir2/Xdir3
+! call assert_equal('bar', findfile('bar', ';'))
+! call assert_match('.*/Xdir1/Xdir2/foo', findfile('foo', ';'))
+! call assert_match('.*/Xdir1/Xdir2/foo', findfile('foo', ';', 1))
+! call assert_match('.*/Xdir1/foo', findfile('foo', ';', 2))
+! call assert_match('.*/Xdir1/foo', findfile('foo', ';', 2))
+! call assert_match('.*/Xdir1/Xdir2/foo', findfile('foo', 'Xdir2;', 1))
+! call assert_equal('', findfile('foo', 'Xdir2;', 2))
+!
+! " List l should have at least 2 values (possibly more if foo file
+! " happens to be found upwards above Xdir1).
+! let l = findfile('foo', ';', -1)
+! call assert_match('.*/Xdir1/Xdir2/foo', l[0])
+! call assert_match('.*/Xdir1/foo', l[1])
+!
+! " Test upwards search with stop-directory.
+! cd Xdir2
+! let l = findfile('bar', ';' . save_dir . '/Xdir1/Xdir2/', -1)
+! call assert_equal(1, len(l))
+! call assert_match('.*/Xdir1/Xdir2/Xdir3/bar', l[0])
+!
+! let l = findfile('bar', ';' . save_dir . '/Xdir1/', -1)
+! call assert_equal(2, len(l))
+! call assert_match('.*/Xdir1/Xdir2/Xdir3/bar', l[0])
+! call assert_match('.*/Xdir1/bar', l[1])
+!
+! " Test combined downwards and upwards search from Xdir2/.
+! cd ../..
+! call assert_equal('Xdir3/bar', findfile('bar', '**;', 1))
+! call assert_match('.*/Xdir1/bar', findfile('bar', '**;', 2))
+!
+! bwipe!
+! exe 'cd ' . save_dir
+! call CleanFiles()
+! let &path = save_path
+! let &shellslash = save_shellslash
+! endfunc
+!
+! " Test finddir({name} [, {path} [, {count}]])
+! func Test_finddir()
+! let save_path = &path
+! let save_shellslash = &shellslash
+! let save_dir = getcwd()
+! set path=,,
+! call CreateFiles()
+! cd Xdir1
+!
+! call assert_equal('Xdir2', finddir('Xdir2'))
+! call assert_equal('', finddir('Xdir3'))
+!
+! " Files should not be found (findfile() finds them).
+! call assert_equal('', finddir('foo'))
+!
+! call assert_equal('Xdir2', finddir('Xdir2', '**'))
+! call assert_equal('Xdir2/Xdir3', finddir('Xdir3', '**'))
+!
+! call assert_equal('Xdir2', finddir('Xdir2', '**', 1))
+! call assert_equal('Xdir2/Xdir3/Xdir2', finddir('Xdir2', '**', 2))
+! call assert_equal(['Xdir2',
+! \ 'Xdir2/Xdir3/Xdir2'], finddir('Xdir2', '**', -1))
+!
+! call assert_equal('Xdir2', finddir('Xdir2', '**1'))
+! call assert_equal('Xdir2', finddir('Xdir2', '**0'))
+! call assert_equal('Xdir2/Xdir3', finddir('Xdir3', '**1'))
+! call assert_equal('', finddir('Xdir3', '**0'))
+!
+! " Test upwards dir search.
+! cd Xdir2/Xdir3
+! call assert_match('.*/Xdir1', finddir('Xdir1', ';'))
+
+! " Test upwards search with stop-directory.
+! call assert_match('.*/Xdir1', finddir('Xdir1', ';' . save_dir . '/'))
+! call assert_equal('', finddir('Xdir1', ';' . save_dir . '/Xdir1/'))
+
+! " Test combined downwards and upwards dir search from Xdir2/.
+ cd ..
+! call assert_match('.*/Xdir1', finddir('Xdir1', '**;', 1))
+! call assert_equal('Xdir3/Xdir2', finddir('Xdir2', '**;', 1))
+! call assert_match('.*/Xdir1/Xdir2', finddir('Xdir2', '**;', 2))
+! call assert_equal('Xdir3', finddir('Xdir3', '**;', 1))
+
+! exe 'cd ' . save_dir
+! call CleanFiles()
+! let &path = save_path
+! let &shellslash = save_shellslash
+ endfunc
+*** ../vim-8.1.0851/src/version.c 2019-01-30 22:01:36.982854408 +0100
+--- src/version.c 2019-01-30 22:12:44.338305213 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 852,
+ /**/
+
+--
+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.0853 b/data/vim/patches/8.1.0853
new file mode 100644
index 000000000..be950a9b4
--- /dev/null
+++ b/data/vim/patches/8.1.0853
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0853
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0853 (after 8.1.0850)
+Problem: Options test fails on Mac.
+Solution: Remove a trailing slash from $TMPDIR.
+Files: src/testdir/test_options.vim
+
+
+*** ../vim-8.1.0852/src/testdir/test_options.vim 2019-01-30 21:51:24.427016059 +0100
+--- src/testdir/test_options.vim 2019-01-30 22:34:24.752245092 +0100
+***************
+*** 387,394 ****
+ for var in ['$TMPDIR', '$TMP', '$TEMP']
+ if exists(var)
+ let varvalue = substitute(expand(var), '\\', '/', 'g')
+! let found = (index(bsklist, varvalue.'/*') >= 0)
+! call assert_true(found, var . ' not in option bsk: ' . &bsk)
+ endif
+ endfor
+ endfunc
+--- 387,396 ----
+ for var in ['$TMPDIR', '$TMP', '$TEMP']
+ if exists(var)
+ let varvalue = substitute(expand(var), '\\', '/', 'g')
+! let varvalue = substitute(varvalue, '/$', '', '')
+! let varvalue .= '/*'
+! let found = (index(bsklist, varvalue) >= 0)
+! call assert_true(found, var . ' (' . varvalue . ') not in option bsk: ' . &bsk)
+ endif
+ endfor
+ endfunc
+*** ../vim-8.1.0852/src/version.c 2019-01-30 22:13:30.409988847 +0100
+--- src/version.c 2019-01-30 22:35:32.475455697 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 853,
+ /**/
+
+--
+LAUNCELOT: I am, sir. I am a Knight of King Arthur.
+FATHER: 'Mm ... very nice castle, Camelot ... very good pig country....
+ "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.0854 b/data/vim/patches/8.1.0854
new file mode 100644
index 000000000..c45b941de
--- /dev/null
+++ b/data/vim/patches/8.1.0854
@@ -0,0 +1,251 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0854
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0854
+Problem: xxd does not work with more than 32 bit addresses.
+Solution: Add support for 64 bit addresses. (Christer Jensen, closes #3791)
+Files: src/xxd/xxd.c
+
+
+*** ../vim-8.1.0853/src/xxd/xxd.c 2019-01-25 21:52:12.190931859 +0100
+--- src/xxd/xxd.c 2019-01-30 23:00:28.306174236 +0100
+***************
+*** 52,57 ****
+--- 52,58 ----
+ * 2011 March Better error handling by Florian Zumbiehl.
+ * 2011 April Formatting by Bram Moolenaar
+ * 08.06.2013 Little-endian hexdump (-e) and offset (-o) by Vadim Vygonets.
++ * 11.01.2019 Add full 64/32 bit range to -o and output by Christer Jensen.
+ *
+ * (c) 1990-1998 by Juergen Weigert (jnweiger@informatik.uni-erlangen.de)
+ *
+***************
+*** 90,95 ****
+--- 91,97 ----
+ #include <stdlib.h>
+ #include <string.h> /* for strncmp() */
+ #include <ctype.h> /* for isalnum() */
++ #include <limits.h>
+ #if __MWERKS__ && !defined(BEBOX)
+ # include <unix.h> /* for fdopen() on MAC */
+ #endif
+***************
+*** 204,210 ****
+
+ #define TRY_SEEK /* attempt to use lseek, or skip forward by reading */
+ #define COLS 256 /* change here, if you ever need more columns */
+! #define LLEN (12 + (9*COLS-1) + COLS + 2)
+
+ char hexxa[] = "0123456789abcdef0123456789ABCDEF", *hexx = hexxa;
+
+--- 206,212 ----
+
+ #define TRY_SEEK /* attempt to use lseek, or skip forward by reading */
+ #define COLS 256 /* change here, if you ever need more columns */
+! #define LLEN ((2*(int)sizeof(unsigned long)) + 4 + (9*COLS-1) + COLS + 2)
+
+ char hexxa[] = "0123456789abcdef0123456789ABCDEF", *hexx = hexxa;
+
+***************
+*** 466,472 ****
+ int ebcdic = 0;
+ int octspergrp = -1; /* number of octets grouped in output */
+ int grplen; /* total chars per octet group */
+! long length = -1, n = 0, seekoff = 0, displayoff = 0;
+ static char l[LLEN+1]; /* static because it may be too big for stack */
+ char *pp;
+
+--- 468,475 ----
+ int ebcdic = 0;
+ int octspergrp = -1; /* number of octets grouped in output */
+ int grplen; /* total chars per octet group */
+! long length = -1, n = 0, seekoff = 0;
+! unsigned long displayoff = 0;
+ static char l[LLEN+1]; /* static because it may be too big for stack */
+ char *pp;
+
+***************
+*** 536,548 ****
+ }
+ else if (!STRNCMP(pp, "-o", 2))
+ {
+ if (pp[2] && STRNCMP("ffset", pp + 2, 5))
+! displayoff = (int)strtol(pp + 2, NULL, 0);
+ else
+ {
+ if (!argv[2])
+ exit_with_usage();
+! displayoff = (int)strtol(argv[2], NULL, 0);
+ argv++;
+ argc--;
+ }
+--- 539,563 ----
+ }
+ else if (!STRNCMP(pp, "-o", 2))
+ {
++ int reloffset = 0;
++ int negoffset = 0;
+ if (pp[2] && STRNCMP("ffset", pp + 2, 5))
+! displayoff = strtoul(pp + 2, NULL, 0);
+ else
+ {
+ if (!argv[2])
+ exit_with_usage();
+!
+! if (argv[2][0] == '+')
+! reloffset++;
+! if (argv[2][reloffset] == '-')
+! negoffset++;
+!
+! if (negoffset)
+! displayoff = ULONG_MAX - strtoul(argv[2] + reloffset+negoffset, NULL, 0) + 1;
+! else
+! displayoff = strtoul(argv[2] + reloffset+negoffset, NULL, 0);
+!
+ argv++;
+ argc--;
+ }
+***************
+*** 805,835 ****
+ else /* hextype == HEX_BITS */
+ grplen = 8 * octspergrp + 1;
+
+ e = 0;
+ while ((length < 0 || n < length) && (e = getc(fp)) != EOF)
+ {
+ if (p == 0)
+ {
+! sprintf(l, "%08lx:",
+! ((unsigned long)(n + seekoff + displayoff)) & 0xffffffff);
+! for (c = 9; c < LLEN; l[c++] = ' ');
+ }
+ if (hextype == HEX_NORMAL)
+ {
+! l[c = (10 + (grplen * p) / octspergrp)] = hexx[(e >> 4) & 0xf];
+ l[++c] = hexx[ e & 0xf];
+ }
+ else if (hextype == HEX_LITTLEENDIAN)
+ {
+ int x = p ^ (octspergrp-1);
+! l[c = (10 + (grplen * x) / octspergrp)] = hexx[(e >> 4) & 0xf];
+ l[++c] = hexx[ e & 0xf];
+ }
+ else /* hextype == HEX_BITS */
+ {
+ int i;
+
+! c = (10 + (grplen * p) / octspergrp) - 1;
+ for (i = 7; i >= 0; i--)
+ l[++c] = (e & (1 << i)) ? '1' : '0';
+ }
+--- 820,851 ----
+ else /* hextype == HEX_BITS */
+ grplen = 8 * octspergrp + 1;
+
++ int addrlen = 9;
+ e = 0;
+ while ((length < 0 || n < length) && (e = getc(fp)) != EOF)
+ {
+ if (p == 0)
+ {
+! addrlen = sprintf(l, "%08lx:",
+! ((unsigned long)(n + seekoff + displayoff)));
+! for (c = addrlen; c < LLEN; l[c++] = ' ');
+ }
+ if (hextype == HEX_NORMAL)
+ {
+! l[c = (addrlen + 1 + (grplen * p) / octspergrp)] = hexx[(e >> 4) & 0xf];
+ l[++c] = hexx[ e & 0xf];
+ }
+ else if (hextype == HEX_LITTLEENDIAN)
+ {
+ int x = p ^ (octspergrp-1);
+! l[c = (addrlen + 1 + (grplen * x) / octspergrp)] = hexx[(e >> 4) & 0xf];
+ l[++c] = hexx[ e & 0xf];
+ }
+ else /* hextype == HEX_BITS */
+ {
+ int i;
+
+! c = (addrlen + 1 + (grplen * p) / octspergrp) - 1;
+ for (i = 7; i >= 0; i--)
+ l[++c] = (e & (1 << i)) ? '1' : '0';
+ }
+***************
+*** 838,844 ****
+ if (ebcdic)
+ e = (e < 64) ? '.' : etoa64[e-64];
+ /* When changing this update definition of LLEN above. */
+! l[12 + (grplen * cols - 1)/octspergrp + p] =
+ #ifdef __MVS__
+ (e >= 64)
+ #else
+--- 854,860 ----
+ if (ebcdic)
+ e = (e < 64) ? '.' : etoa64[e-64];
+ /* When changing this update definition of LLEN above. */
+! l[addrlen + 3 + (grplen * cols - 1)/octspergrp + p] =
+ #ifdef __MVS__
+ (e >= 64)
+ #else
+***************
+*** 848,854 ****
+ n++;
+ if (++p == cols)
+ {
+! l[c = (12 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0';
+ xxdline(fpo, l, autoskip ? nonzero : 1);
+ nonzero = 0;
+ p = 0;
+--- 864,870 ----
+ n++;
+ if (++p == cols)
+ {
+! l[c = (addrlen + 3 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0';
+ xxdline(fpo, l, autoskip ? nonzero : 1);
+ nonzero = 0;
+ p = 0;
+***************
+*** 858,864 ****
+ die(2);
+ if (p)
+ {
+! l[c = (12 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0';
+ xxdline(fpo, l, 1);
+ }
+ else if (autoskip)
+--- 874,880 ----
+ die(2);
+ if (p)
+ {
+! l[c = (addrlen + 3 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0';
+ xxdline(fpo, l, 1);
+ }
+ else if (autoskip)
+*** ../vim-8.1.0853/src/version.c 2019-01-30 22:36:14.646981306 +0100
+--- src/version.c 2019-01-30 23:01:44.097578546 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 854,
+ /**/
+
+--
+GUEST: He's killed the best man!
+SECOND GUEST: (holding a limp WOMAN) He's killed my auntie.
+FATHER: No, please! This is supposed to be a happy occasion! Let's
+ not bicker and argue about who killed who ...
+ "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.0855 b/data/vim/patches/8.1.0855
new file mode 100644
index 000000000..88b0b701b
--- /dev/null
+++ b/data/vim/patches/8.1.0855
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0855
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0855
+Problem: Cannot build xxd with MSVC 10.
+Solution: Move declaration to start of block.
+Files: src/xxd/xxd.c
+
+
+*** ../vim-8.1.0854/src/xxd/xxd.c 2019-01-30 23:02:22.225279628 +0100
+--- src/xxd/xxd.c 2019-01-31 10:58:04.537103816 +0100
+***************
+*** 472,477 ****
+--- 472,478 ----
+ unsigned long displayoff = 0;
+ static char l[LLEN+1]; /* static because it may be too big for stack */
+ char *pp;
++ int addrlen = 9;
+
+ #ifdef AMIGA
+ /* This program doesn't work when started from the Workbench */
+***************
+*** 820,826 ****
+ else /* hextype == HEX_BITS */
+ grplen = 8 * octspergrp + 1;
+
+- int addrlen = 9;
+ e = 0;
+ while ((length < 0 || n < length) && (e = getc(fp)) != EOF)
+ {
+--- 821,826 ----
+*** ../vim-8.1.0854/src/version.c 2019-01-30 23:02:22.225279628 +0100
+--- src/version.c 2019-01-31 10:59:29.044427452 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 855,
+ /**/
+
+--
+FATHER: We are here today to witness the union of two young people in the
+ joyful bond of the holy wedlock. Unfortunately, one of them, my son
+ Herbert, has just fallen to his death.
+ [Murmurs from CROWD; the BRIDE smiles with relief, coughs.]
+ "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.0856 b/data/vim/patches/8.1.0856
new file mode 100644
index 000000000..2b9d44b59
--- /dev/null
+++ b/data/vim/patches/8.1.0856
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0856
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0856
+Problem: When scrolling a window other than the current one the cursorline
+ highlighting is not always updated. (Jason Franklin)
+Solution: Call redraw_for_cursorline() after scrolling. Only set
+ w_last_cursorline when drawing the cursor line. Reset the lines
+ to be redrawn also when redrawing the whole window.
+Files: src/move.c, src/proto/move.pro, src/normal.c
+
+
+*** ../vim-8.1.0855/src/move.c 2019-01-26 17:28:22.228599112 +0100
+--- src/move.c 2019-01-31 13:12:23.092498619 +0100
+***************
+*** 19,25 ****
+
+ #include "vim.h"
+
+- 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);
+--- 19,24 ----
+***************
+*** 128,134 ****
+ * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
+ * set.
+ */
+! static void
+ redraw_for_cursorline(win_T *wp)
+ {
+ if ((wp->w_p_rnu
+--- 127,133 ----
+ * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
+ * set.
+ */
+! void
+ redraw_for_cursorline(win_T *wp)
+ {
+ if ((wp->w_p_rnu
+***************
+*** 158,164 ****
+ }
+ else
+ redraw_win_later(wp, SOME_VALID);
+- wp->w_last_cursorline = wp->w_cursor.lnum;
+ }
+ #endif
+ }
+--- 157,162 ----
+*** ../vim-8.1.0855/src/proto/move.pro 2018-09-25 22:17:51.111962197 +0200
+--- src/proto/move.pro 2019-01-31 13:12:25.920478058 +0100
+***************
+*** 1,5 ****
+--- 1,6 ----
+ /* move.c */
+ void reset_cursorline(void);
++ void redraw_for_cursorline(win_T *wp);
+ void update_topline_redraw(void);
+ void update_topline(void);
+ void update_curswant(void);
+*** ../vim-8.1.0855/src/normal.c 2019-01-26 17:28:22.228599112 +0100
+--- src/normal.c 2019-01-31 13:12:14.728559444 +0100
+***************
+*** 4587,4592 ****
+--- 4587,4596 ----
+ }
+ }
+ # endif
++ # ifdef FEAT_SYN_HL
++ if (curwin != old_curwin && curwin->w_p_cul)
++ redraw_for_cursorline(curwin);
++ # endif
+
+ curwin->w_redr_status = TRUE;
+
+*** ../vim-8.1.0855/src/version.c 2019-01-31 11:00:38.767870492 +0100
+--- src/version.c 2019-01-31 13:21:56.800716653 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 856,
+ /**/
+
+--
+CONCORDE: Quickly, sir, come this way!
+LAUNCELOT: No! It's not right for my idiom. I must escape more ... more ...
+CONCORDE: Dramatically, sir?
+LAUNCELOT: Dramatically.
+ "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.0857 b/data/vim/patches/8.1.0857
new file mode 100644
index 000000000..06d20502e
--- /dev/null
+++ b/data/vim/patches/8.1.0857
@@ -0,0 +1,9872 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0857
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0857
+Problem: Indent functionality is not separated.
+Solution: Move indent functionality into a new file. (Yegappan Lakshmanan,
+ closes #3886)
+Files: Filelist, src/Make_bc5.mak, src/Make_cyg_ming.mak,
+ src/Make_dice.mak, src/Make_ivc.mak, src/Make_manx.mak,
+ src/Make_morph.mak, src/Make_mvc.mak, src/Make_sas.mak,
+ src/Make_vms.mms, src/Makefile, src/edit.c, src/indent.c,
+ src/misc1.c, src/proto.h, src/proto/edit.pro,
+ src/proto/indent.pro, src/proto/misc1.pro
+
+
+*** ../vim-8.1.0856/Filelist 2019-01-26 16:20:44.256683619 +0100
+--- Filelist 2019-01-31 13:43:23.348467289 +0100
+***************
+*** 49,54 ****
+--- 49,55 ----
+ src/gui_beval.c \
+ src/hardcopy.c \
+ src/hashtab.c \
++ src/indent.c \
+ src/json.c \
+ src/json_test.c \
+ src/kword_test.c \
+***************
+*** 175,180 ****
+--- 176,182 ----
+ src/proto/gui_beval.pro \
+ src/proto/hardcopy.pro \
+ src/proto/hashtab.pro \
++ src/proto/indent.pro \
+ src/proto/json.pro \
+ src/proto/list.pro \
+ src/proto/main.pro \
+*** ../vim-8.1.0856/src/Make_bc5.mak 2019-01-26 16:20:44.256683619 +0100
+--- src/Make_bc5.mak 2019-01-31 13:43:23.348467289 +0100
+***************
+*** 548,553 ****
+--- 548,554 ----
+ $(OBJDIR)\getchar.obj \
+ $(OBJDIR)\hardcopy.obj \
+ $(OBJDIR)\hashtab.obj \
++ $(OBJDIR)\indent.obj \
+ $(OBJDIR)\json.obj \
+ $(OBJDIR)\list.obj \
+ $(OBJDIR)\main.obj \
+*** ../vim-8.1.0856/src/Make_cyg_ming.mak 2019-01-26 16:20:44.256683619 +0100
+--- src/Make_cyg_ming.mak 2019-01-31 13:43:23.348467289 +0100
+***************
+*** 720,725 ****
+--- 720,726 ----
+ $(OUTDIR)/getchar.o \
+ $(OUTDIR)/hardcopy.o \
+ $(OUTDIR)/hashtab.o \
++ $(OUTDIR)/indent.o \
+ $(OUTDIR)/json.o \
+ $(OUTDIR)/list.o \
+ $(OUTDIR)/main.o \
+*** ../vim-8.1.0856/src/Make_dice.mak 2019-01-26 16:20:44.256683619 +0100
+--- src/Make_dice.mak 2019-01-31 13:43:23.348467289 +0100
+***************
+*** 50,55 ****
+--- 50,56 ----
+ getchar.c \
+ hardcopy.c \
+ hashtab.c \
++ indent.c \
+ json.c \
+ list.c \
+ main.c \
+***************
+*** 108,113 ****
+--- 109,115 ----
+ o/getchar.o \
+ o/hardcopy.o \
+ o/hashtab.o \
++ o/indent.o \
+ o/json.o \
+ o/list.o \
+ o/main.o \
+***************
+*** 209,214 ****
+--- 211,218 ----
+
+ o/hashtab.o: hashtab.c $(SYMS)
+
++ o/indent.o: indent.c $(SYMS)
++
+ o/json.o: json.c $(SYMS)
+
+ o/list.o: list.c $(SYMS)
+*** ../vim-8.1.0856/src/Make_ivc.mak 2019-01-26 16:20:44.256683619 +0100
+--- src/Make_ivc.mak 2019-01-31 13:43:23.348467289 +0100
+***************
+*** 234,239 ****
+--- 234,240 ----
+ "$(INTDIR)/getchar.obj" \
+ "$(INTDIR)/hardcopy.obj" \
+ "$(INTDIR)/hashtab.obj" \
++ "$(INTDIR)/indent.obj" \
+ "$(INTDIR)/json.obj" \
+ "$(INTDIR)/list.obj" \
+ "$(INTDIR)/main.obj" \
+***************
+*** 434,439 ****
+--- 435,444 ----
+ SOURCE=.\hashtab.c
+ # End Source File
+ # Begin Source File
++ #
++ SOURCE=.\indent.c
++ # End Source File
++ # Begin Source File
+
+ SOURCE=.\gui.c
+
+*** ../vim-8.1.0856/src/Make_manx.mak 2019-01-26 16:20:44.260683581 +0100
+--- src/Make_manx.mak 2019-01-31 13:43:23.348467289 +0100
+***************
+*** 60,65 ****
+--- 60,66 ----
+ getchar.c \
+ hardcopy.c \
+ hashtab.c \
++ indent.c \
+ json.c \
+ list.c \
+ main.c \
+***************
+*** 120,125 ****
+--- 121,127 ----
+ obj/getchar.o \
+ obj/hardcopy.o \
+ obj/hashtab.o \
++ obj/indent.o \
+ obj/json.o \
+ obj/list.o \
+ obj/main.o \
+***************
+*** 178,183 ****
+--- 180,186 ----
+ proto/getchar.pro \
+ proto/hardcopy.pro \
+ proto/hashtab.pro \
++ proto/indent.pro \
+ proto/json.pro \
+ proto/list.pro \
+ proto/main.pro \
+***************
+*** 329,334 ****
+--- 332,340 ----
+ obj/hashtab.o: hashtab.c
+ $(CCSYM) $@ hashtab.c
+
++ obj/indent.o: indent.c
++ $(CCSYM) $@ indent.c
++
+ obj/json.o: json.c
+ $(CCSYM) $@ json.c
+
+*** ../vim-8.1.0856/src/Make_morph.mak 2019-01-26 16:20:44.260683581 +0100
+--- src/Make_morph.mak 2019-01-31 13:43:23.348467289 +0100
+***************
+*** 48,53 ****
+--- 48,54 ----
+ getchar.c \
+ hardcopy.c \
+ hashtab.c \
++ indent.c \
+ json.c \
+ list.c \
+ main.c \
+*** ../vim-8.1.0856/src/Make_mvc.mak 2019-01-26 16:20:44.260683581 +0100
+--- src/Make_mvc.mak 2019-01-31 13:43:23.348467289 +0100
+***************
+*** 725,730 ****
+--- 725,731 ----
+ $(OUTDIR)\getchar.obj \
+ $(OUTDIR)\hardcopy.obj \
+ $(OUTDIR)\hashtab.obj \
++ $(OUTDIR)\indent.obj \
+ $(OUTDIR)\json.obj \
+ $(OUTDIR)\list.obj \
+ $(OUTDIR)\main.obj \
+***************
+*** 1414,1419 ****
+--- 1415,1422 ----
+
+ $(OUTDIR)/hashtab.obj: $(OUTDIR) hashtab.c $(INCL)
+
++ $(OUTDIR)/indent.obj: $(OUTDIR) indent.c $(INCL)
++
+ $(OUTDIR)/gui.obj: $(OUTDIR) gui.c $(INCL) $(GUI_INCL)
+
+ $(OUTDIR)/gui_beval.obj: $(OUTDIR) gui_beval.c $(INCL) $(GUI_INCL)
+***************
+*** 1645,1650 ****
+--- 1648,1654 ----
+ proto/getchar.pro \
+ proto/hardcopy.pro \
+ proto/hashtab.pro \
++ proto/indent.pro \
+ proto/json.pro \
+ proto/list.pro \
+ proto/main.pro \
+*** ../vim-8.1.0856/src/Make_sas.mak 2019-01-26 16:20:44.260683581 +0100
+--- src/Make_sas.mak 2019-01-31 13:43:23.348467289 +0100
+***************
+*** 113,118 ****
+--- 113,119 ----
+ getchar.c \
+ hardcopy.c \
+ hashtab.c \
++ indent.c \
+ json.c \
+ list.c \
+ main.c \
+***************
+*** 172,177 ****
+--- 173,179 ----
+ getchar.o \
+ hardcopy.o \
+ hashtab.o \
++ indent.o \
+ json.o \
+ list.o \
+ main.o \
+***************
+*** 231,236 ****
+--- 233,239 ----
+ proto/getchar.pro \
+ proto/hardcopy.pro \
+ proto/hashtab.pro \
++ proto/indent.pro \
+ proto/json.pro \
+ proto/list.pro \
+ proto/main.pro \
+***************
+*** 368,373 ****
+--- 371,378 ----
+ proto/hardcopy.pro: hardcopy.c
+ hashtab.o: hashtab.c
+ proto/hashtab.pro: hashtab.c
++ indent.o: indent.c
++ proto/indent.pro: indent.c
+ json.o: json.c
+ proto/json.pro: json.c
+ list.o: list.c
+*** ../vim-8.1.0856/src/Make_vms.mms 2019-01-26 16:20:44.260683581 +0100
+--- src/Make_vms.mms 2019-01-31 13:43:23.352467260 +0100
+***************
+*** 314,320 ****
+
+ SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c \
+ evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c \
+! getchar.c hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
+ misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+ spell.c spellfile.c syntax.c tag.c term.c termlib.c textprop.c ui.c undo.c userfunc.c version.c screen.c \
+ window.c os_unix.c os_vms.c pathdef.c \
+--- 314,320 ----
+
+ SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c \
+ evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c \
+! getchar.c hardcopy.c hashtab.c indent.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
+ misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+ spell.c spellfile.c syntax.c tag.c term.c termlib.c textprop.c ui.c undo.c userfunc.c version.c screen.c \
+ window.c os_unix.c os_vms.c pathdef.c \
+***************
+*** 323,329 ****
+
+ OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj \
+ edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
+! if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
+ regexp.obj search.obj sha256.obj sign.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \
+--- 323,329 ----
+
+ OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj \
+ edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
+! if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj indent.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
+ regexp.obj search.obj sha256.obj sign.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \
+***************
+*** 596,601 ****
+--- 596,602 ----
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro ex_cmds.h proto.h \
+ globals.h farsi.h arabic.h if_mzsch.h
++ indent.obj : indent.c vim.h [.auto]config.h feature.h os_unix.h
+ json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+*** ../vim-8.1.0856/src/Makefile 2019-01-26 17:36:46.997192946 +0100
+--- src/Makefile 2019-01-31 13:43:23.352467260 +0100
+***************
+*** 1599,1604 ****
+--- 1598,1604 ----
+ hashtab.c \
+ if_cscope.c \
+ if_xcmdsrv.c \
++ indent.c \
+ json.c \
+ list.c \
+ main.c \
+***************
+*** 1712,1717 ****
+--- 1712,1718 ----
+ $(HANGULIN_OBJ) \
+ objects/if_cscope.o \
+ objects/if_xcmdsrv.o \
++ objects/indent.o \
+ objects/list.o \
+ objects/mark.o \
+ objects/memline.o \
+***************
+*** 1842,1847 ****
+--- 1843,1849 ----
+ if_python3.pro \
+ if_ruby.pro \
+ if_xcmdsrv.pro \
++ indent.pro \
+ json.pro \
+ list.pro \
+ main.pro \
+***************
+*** 3093,3098 ****
+--- 3095,3103 ----
+ objects/if_tcl.o: if_tcl.c
+ $(CCC_NF) $(TCL_CFLAGS) $(ALL_CFLAGS) -o $@ if_tcl.c
+
++ objects/indent.o: indent.c
++ $(CCC) -o $@ indent.c
++
+ objects/json.o: json.c
+ $(CCC) -o $@ json.c
+
+***************
+*** 3490,3495 ****
+--- 3495,3504 ----
+ 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/indent.o: indent.c vim.h protodef.h auto/config.h feature.h os_unix.h \
++ os_mac.h ascii.h keymap.h term.h macros.h option.h beval.h structs.h \
++ regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
++ arabic.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 \
+*** ../vim-8.1.0856/src/edit.c 2019-01-26 17:28:22.220599167 +0100
+--- src/edit.c 2019-01-31 13:43:23.352467260 +0100
+***************
+*** 216,224 ****
+ static void replace_flush(void);
+ static void replace_do_bs(int limit_col);
+ static int del_char_after_col(int limit_col);
+- #ifdef FEAT_CINDENT
+- static int cindent_on(void);
+- #endif
+ static void ins_reg(void);
+ static void ins_ctrl_g(void);
+ static void ins_ctrl_hat(void);
+--- 216,221 ----
+***************
+*** 380,385 ****
+--- 377,383 ----
+ ins_compl_clear(); /* clear stuff for CTRL-X mode */
+ #endif
+
++ ch_log(NULL, "ENTERING Insert mode");
+ /*
+ * Trigger InsertEnter autocommands. Do not do this for "r<CR>" or "grx".
+ */
+***************
+*** 1050,1055 ****
+--- 1048,1054 ----
+ if (cmdchar != 'r' && cmdchar != 'v' && c != Ctrl_C)
+ ins_apply_autocmds(EVENT_INSERTLEAVE);
+ did_cursorhold = FALSE;
++ ch_log(NULL, "LEAVING Insert mode");
+ return (c == Ctrl_O);
+ }
+ continue;
+***************
+*** 7923,8254 ****
+ (void)del_char_after_col(limit_col);
+ }
+
+- #ifdef FEAT_CINDENT
+- /*
+- * Return TRUE if C-indenting is on.
+- */
+- static int
+- cindent_on(void)
+- {
+- return (!p_paste && (curbuf->b_p_cin
+- # ifdef FEAT_EVAL
+- || *curbuf->b_p_inde != NUL
+- # endif
+- ));
+- }
+- #endif
+-
+- #if defined(FEAT_LISP) || defined(FEAT_CINDENT) || defined(PROTO)
+- /*
+- * Re-indent the current line, based on the current contents of it and the
+- * surrounding lines. Fixing the cursor position seems really easy -- I'm very
+- * confused what all the part that handles Control-T is doing that I'm not.
+- * "get_the_indent" should be get_c_indent, get_expr_indent or get_lisp_indent.
+- */
+-
+- void
+- fixthisline(int (*get_the_indent)(void))
+- {
+- int amount = get_the_indent();
+-
+- if (amount >= 0)
+- {
+- change_indent(INDENT_SET, amount, FALSE, 0, TRUE);
+- if (linewhite(curwin->w_cursor.lnum))
+- did_ai = TRUE; /* delete the indent if the line stays empty */
+- }
+- }
+-
+- void
+- fix_indent(void)
+- {
+- if (p_paste)
+- return;
+- # ifdef FEAT_LISP
+- if (curbuf->b_p_lisp && curbuf->b_p_ai)
+- fixthisline(get_lisp_indent);
+- # endif
+- # if defined(FEAT_LISP) && defined(FEAT_CINDENT)
+- else
+- # endif
+- # ifdef FEAT_CINDENT
+- if (cindent_on())
+- do_c_expr_indent();
+- # endif
+- }
+-
+- #endif
+-
+- #ifdef FEAT_CINDENT
+- /*
+- * return TRUE if 'cinkeys' contains the key "keytyped",
+- * when == '*': Only if key is preceded with '*' (indent before insert)
+- * when == '!': Only if key is preceded with '!' (don't insert)
+- * when == ' ': Only if key is not preceded with '*'(indent afterwards)
+- *
+- * "keytyped" can have a few special values:
+- * KEY_OPEN_FORW
+- * KEY_OPEN_BACK
+- * KEY_COMPLETE just finished completion.
+- *
+- * If line_is_empty is TRUE accept keys with '0' before them.
+- */
+- int
+- in_cinkeys(
+- int keytyped,
+- int when,
+- int line_is_empty)
+- {
+- char_u *look;
+- int try_match;
+- int try_match_word;
+- char_u *p;
+- char_u *line;
+- int icase;
+- int i;
+-
+- if (keytyped == NUL)
+- /* Can happen with CTRL-Y and CTRL-E on a short line. */
+- return FALSE;
+-
+- #ifdef FEAT_EVAL
+- if (*curbuf->b_p_inde != NUL)
+- look = curbuf->b_p_indk; /* 'indentexpr' set: use 'indentkeys' */
+- else
+- #endif
+- look = curbuf->b_p_cink; /* 'indentexpr' empty: use 'cinkeys' */
+- while (*look)
+- {
+- /*
+- * Find out if we want to try a match with this key, depending on
+- * 'when' and a '*' or '!' before the key.
+- */
+- switch (when)
+- {
+- case '*': try_match = (*look == '*'); break;
+- case '!': try_match = (*look == '!'); break;
+- default: try_match = (*look != '*'); break;
+- }
+- if (*look == '*' || *look == '!')
+- ++look;
+-
+- /*
+- * If there is a '0', only accept a match if the line is empty.
+- * But may still match when typing last char of a word.
+- */
+- if (*look == '0')
+- {
+- try_match_word = try_match;
+- if (!line_is_empty)
+- try_match = FALSE;
+- ++look;
+- }
+- else
+- try_match_word = FALSE;
+-
+- /*
+- * does it look like a control character?
+- */
+- if (*look == '^'
+- #ifdef EBCDIC
+- && (Ctrl_chr(look[1]) != 0)
+- #else
+- && look[1] >= '?' && look[1] <= '_'
+- #endif
+- )
+- {
+- if (try_match && keytyped == Ctrl_chr(look[1]))
+- return TRUE;
+- look += 2;
+- }
+- /*
+- * 'o' means "o" command, open forward.
+- * 'O' means "O" command, open backward.
+- */
+- else if (*look == 'o')
+- {
+- if (try_match && keytyped == KEY_OPEN_FORW)
+- return TRUE;
+- ++look;
+- }
+- else if (*look == 'O')
+- {
+- if (try_match && keytyped == KEY_OPEN_BACK)
+- return TRUE;
+- ++look;
+- }
+-
+- /*
+- * 'e' means to check for "else" at start of line and just before the
+- * cursor.
+- */
+- else if (*look == 'e')
+- {
+- if (try_match && keytyped == 'e' && curwin->w_cursor.col >= 4)
+- {
+- p = ml_get_curline();
+- if (skipwhite(p) == p + curwin->w_cursor.col - 4 &&
+- STRNCMP(p + curwin->w_cursor.col - 4, "else", 4) == 0)
+- return TRUE;
+- }
+- ++look;
+- }
+-
+- /*
+- * ':' only causes an indent if it is at the end of a label or case
+- * statement, or when it was before typing the ':' (to fix
+- * class::method for C++).
+- */
+- else if (*look == ':')
+- {
+- if (try_match && keytyped == ':')
+- {
+- p = ml_get_curline();
+- if (cin_iscase(p, FALSE) || cin_isscopedecl(p) || cin_islabel())
+- return TRUE;
+- /* Need to get the line again after cin_islabel(). */
+- p = ml_get_curline();
+- if (curwin->w_cursor.col > 2
+- && p[curwin->w_cursor.col - 1] == ':'
+- && p[curwin->w_cursor.col - 2] == ':')
+- {
+- p[curwin->w_cursor.col - 1] = ' ';
+- i = (cin_iscase(p, FALSE) || cin_isscopedecl(p)
+- || cin_islabel());
+- p = ml_get_curline();
+- p[curwin->w_cursor.col - 1] = ':';
+- if (i)
+- return TRUE;
+- }
+- }
+- ++look;
+- }
+-
+-
+- /*
+- * Is it a key in <>, maybe?
+- */
+- else if (*look == '<')
+- {
+- if (try_match)
+- {
+- /*
+- * make up some named keys <o>, <O>, <e>, <0>, <>>, <<>, <*>,
+- * <:> and <!> so that people can re-indent on o, O, e, 0, <,
+- * >, *, : and ! keys if they really really want to.
+- */
+- if (vim_strchr((char_u *)"<>!*oOe0:", look[1]) != NULL
+- && keytyped == look[1])
+- return TRUE;
+-
+- if (keytyped == get_special_key_code(look + 1))
+- return TRUE;
+- }
+- while (*look && *look != '>')
+- look++;
+- while (*look == '>')
+- look++;
+- }
+-
+- /*
+- * Is it a word: "=word"?
+- */
+- else if (*look == '=' && look[1] != ',' && look[1] != NUL)
+- {
+- ++look;
+- if (*look == '~')
+- {
+- icase = TRUE;
+- ++look;
+- }
+- else
+- icase = FALSE;
+- p = vim_strchr(look, ',');
+- if (p == NULL)
+- p = look + STRLEN(look);
+- if ((try_match || try_match_word)
+- && curwin->w_cursor.col >= (colnr_T)(p - look))
+- {
+- int match = FALSE;
+-
+- #ifdef FEAT_INS_EXPAND
+- if (keytyped == KEY_COMPLETE)
+- {
+- char_u *s;
+-
+- /* Just completed a word, check if it starts with "look".
+- * search back for the start of a word. */
+- line = ml_get_curline();
+- if (has_mbyte)
+- {
+- char_u *n;
+-
+- for (s = line + curwin->w_cursor.col; s > line; s = n)
+- {
+- n = mb_prevptr(line, s);
+- if (!vim_iswordp(n))
+- break;
+- }
+- }
+- else
+- for (s = line + curwin->w_cursor.col; s > line; --s)
+- if (!vim_iswordc(s[-1]))
+- break;
+- if (s + (p - look) <= line + curwin->w_cursor.col
+- && (icase
+- ? MB_STRNICMP(s, look, p - look)
+- : STRNCMP(s, look, p - look)) == 0)
+- match = TRUE;
+- }
+- else
+- #endif
+- /* TODO: multi-byte */
+- if (keytyped == (int)p[-1] || (icase && keytyped < 256
+- && TOLOWER_LOC(keytyped) == TOLOWER_LOC((int)p[-1])))
+- {
+- line = ml_get_cursor();
+- if ((curwin->w_cursor.col == (colnr_T)(p - look)
+- || !vim_iswordc(line[-(p - look) - 1]))
+- && (icase
+- ? MB_STRNICMP(line - (p - look), look, p - look)
+- : STRNCMP(line - (p - look), look, p - look))
+- == 0)
+- match = TRUE;
+- }
+- if (match && try_match_word && !try_match)
+- {
+- /* "0=word": Check if there are only blanks before the
+- * word. */
+- if (getwhitecols_curline() !=
+- (int)(curwin->w_cursor.col - (p - look)))
+- match = FALSE;
+- }
+- if (match)
+- return TRUE;
+- }
+- look = p;
+- }
+-
+- /*
+- * ok, it's a boring generic character.
+- */
+- else
+- {
+- if (try_match && *look == keytyped)
+- return TRUE;
+- if (*look != NUL)
+- ++look;
+- }
+-
+- /*
+- * Skip over ", ".
+- */
+- look = skip_to_option_part(look);
+- }
+- return FALSE;
+- }
+- #endif /* FEAT_CINDENT */
+-
+ #if defined(FEAT_RIGHTLEFT) || defined(PROTO)
+ /*
+ * Map Hebrew keyboard when in hkmap mode.
+--- 7922,7927 ----
+*** ../vim-8.1.0856/src/indent.c 2019-01-31 13:47:08.550925126 +0100
+--- src/indent.c 2019-01-31 13:43:23.352467260 +0100
+***************
+*** 0 ****
+--- 1,4683 ----
++ /* 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.
++ */
++
++ /*
++ * indent.c: Indentation related functions
++ */
++
++ #include "vim.h"
++
++ #if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT)
++
++ /*
++ * Return TRUE if the string "line" starts with a word from 'cinwords'.
++ */
++ int
++ cin_is_cinword(char_u *line)
++ {
++ char_u *cinw;
++ char_u *cinw_buf;
++ int cinw_len;
++ int retval = FALSE;
++ int len;
++
++ cinw_len = (int)STRLEN(curbuf->b_p_cinw) + 1;
++ cinw_buf = alloc((unsigned)cinw_len);
++ if (cinw_buf != NULL)
++ {
++ line = skipwhite(line);
++ for (cinw = curbuf->b_p_cinw; *cinw; )
++ {
++ len = copy_option_part(&cinw, cinw_buf, cinw_len, ",");
++ if (STRNCMP(line, cinw_buf, len) == 0
++ && (!vim_iswordc(line[len]) || !vim_iswordc(line[len - 1])))
++ {
++ retval = TRUE;
++ break;
++ }
++ }
++ vim_free(cinw_buf);
++ }
++ return retval;
++ }
++ #endif
++
++ #if defined(FEAT_CINDENT) || defined(FEAT_SYN_HL)
++
++ static char_u *skip_string(char_u *p);
++ static pos_T *find_start_rawstring(int ind_maxcomment);
++
++ /*
++ * Find the start of a comment, not knowing if we are in a comment right now.
++ * Search starts at w_cursor.lnum and goes backwards.
++ * Return NULL when not inside a comment.
++ */
++ static pos_T *
++ ind_find_start_comment(void) /* XXX */
++ {
++ return find_start_comment(curbuf->b_ind_maxcomment);
++ }
++
++ pos_T *
++ find_start_comment(int ind_maxcomment) /* XXX */
++ {
++ pos_T *pos;
++ char_u *line;
++ char_u *p;
++ int cur_maxcomment = ind_maxcomment;
++
++ for (;;)
++ {
++ pos = findmatchlimit(NULL, '*', FM_BACKWARD, cur_maxcomment);
++ if (pos == NULL)
++ break;
++
++ /*
++ * Check if the comment start we found is inside a string.
++ * If it is then restrict the search to below this line and try again.
++ */
++ line = ml_get(pos->lnum);
++ for (p = line; *p && (colnr_T)(p - line) < pos->col; ++p)
++ p = skip_string(p);
++ if ((colnr_T)(p - line) <= pos->col)
++ break;
++ cur_maxcomment = curwin->w_cursor.lnum - pos->lnum - 1;
++ if (cur_maxcomment <= 0)
++ {
++ pos = NULL;
++ break;
++ }
++ }
++ return pos;
++ }
++
++ /*
++ * Find the start of a comment or raw string, not knowing if we are in a
++ * comment or raw string right now.
++ * Search starts at w_cursor.lnum and goes backwards.
++ * If is_raw is given and returns start of raw_string, sets it to true.
++ * Return NULL when not inside a comment or raw string.
++ * "CORS" -> Comment Or Raw String
++ */
++ static pos_T *
++ ind_find_start_CORS(linenr_T *is_raw) /* XXX */
++ {
++ static pos_T comment_pos_copy;
++ pos_T *comment_pos;
++ pos_T *rs_pos;
++
++ comment_pos = find_start_comment(curbuf->b_ind_maxcomment);
++ if (comment_pos != NULL)
++ {
++ /* Need to make a copy of the static pos in findmatchlimit(),
++ * calling find_start_rawstring() may change it. */
++ comment_pos_copy = *comment_pos;
++ comment_pos = &comment_pos_copy;
++ }
++ rs_pos = find_start_rawstring(curbuf->b_ind_maxcomment);
++
++ /* If comment_pos is before rs_pos the raw string is inside the comment.
++ * If rs_pos is before comment_pos the comment is inside the raw string. */
++ if (comment_pos == NULL || (rs_pos != NULL
++ && LT_POS(*rs_pos, *comment_pos)))
++ {
++ if (is_raw != NULL && rs_pos != NULL)
++ *is_raw = rs_pos->lnum;
++ return rs_pos;
++ }
++ return comment_pos;
++ }
++
++ /*
++ * Find the start of a raw string, not knowing if we are in one right now.
++ * Search starts at w_cursor.lnum and goes backwards.
++ * Return NULL when not inside a raw string.
++ */
++ static pos_T *
++ find_start_rawstring(int ind_maxcomment) /* XXX */
++ {
++ pos_T *pos;
++ char_u *line;
++ char_u *p;
++ int cur_maxcomment = ind_maxcomment;
++
++ for (;;)
++ {
++ pos = findmatchlimit(NULL, 'R', FM_BACKWARD, cur_maxcomment);
++ if (pos == NULL)
++ break;
++
++ /*
++ * Check if the raw string start we found is inside a string.
++ * If it is then restrict the search to below this line and try again.
++ */
++ line = ml_get(pos->lnum);
++ for (p = line; *p && (colnr_T)(p - line) < pos->col; ++p)
++ p = skip_string(p);
++ if ((colnr_T)(p - line) <= pos->col)
++ break;
++ cur_maxcomment = curwin->w_cursor.lnum - pos->lnum - 1;
++ if (cur_maxcomment <= 0)
++ {
++ pos = NULL;
++ break;
++ }
++ }
++ return pos;
++ }
++
++ /*
++ * Skip to the end of a "string" and a 'c' character.
++ * If there is no string or character, return argument unmodified.
++ */
++ static char_u *
++ skip_string(char_u *p)
++ {
++ int i;
++
++ /*
++ * We loop, because strings may be concatenated: "date""time".
++ */
++ for ( ; ; ++p)
++ {
++ if (p[0] == '\'') /* 'c' or '\n' or '\000' */
++ {
++ if (!p[1]) /* ' at end of line */
++ break;
++ i = 2;
++ if (p[1] == '\\') /* '\n' or '\000' */
++ {
++ ++i;
++ while (vim_isdigit(p[i - 1])) /* '\000' */
++ ++i;
++ }
++ if (p[i] == '\'') /* check for trailing ' */
++ {
++ p += i;
++ continue;
++ }
++ }
++ else if (p[0] == '"') /* start of string */
++ {
++ for (++p; p[0]; ++p)
++ {
++ if (p[0] == '\\' && p[1] != NUL)
++ ++p;
++ else if (p[0] == '"') /* end of string */
++ break;
++ }
++ if (p[0] == '"')
++ continue; /* continue for another string */
++ }
++ else if (p[0] == 'R' && p[1] == '"')
++ {
++ /* Raw string: R"[delim](...)[delim]" */
++ char_u *delim = p + 2;
++ char_u *paren = vim_strchr(delim, '(');
++
++ if (paren != NULL)
++ {
++ size_t delim_len = paren - delim;
++
++ for (p += 3; *p; ++p)
++ if (p[0] == ')' && STRNCMP(p + 1, delim, delim_len) == 0
++ && p[delim_len + 1] == '"')
++ {
++ p += delim_len + 1;
++ break;
++ }
++ if (p[0] == '"')
++ continue; /* continue for another string */
++ }
++ }
++ break; /* no string found */
++ }
++ if (!*p)
++ --p; /* backup from NUL */
++ return p;
++ }
++ #endif /* FEAT_CINDENT || FEAT_SYN_HL */
++
++ #if defined(FEAT_CINDENT) || defined(PROTO)
++
++ /*
++ * Return TRUE if C-indenting is on.
++ */
++ int
++ cindent_on(void)
++ {
++ return (!p_paste && (curbuf->b_p_cin
++ # ifdef FEAT_EVAL
++ || *curbuf->b_p_inde != NUL
++ # endif
++ ));
++ }
++
++ /* Find result cache for cpp_baseclass */
++ typedef struct {
++ int found;
++ lpos_T lpos;
++ } cpp_baseclass_cache_T;
++
++ /*
++ * Functions for C-indenting.
++ * Most of this originally comes from Eric Fischer.
++ */
++ /*
++ * Below "XXX" means that this function may unlock the current line.
++ */
++
++ static int cin_isdefault(char_u *);
++ 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_iselse(char_u *);
++ static int cin_ends_in(char_u *, char_u *, char_u *);
++ static int cin_starts_with(char_u *s, char *word);
++ static pos_T *find_match_paren(int);
++ static pos_T *find_match_char(int c, int ind_maxparen);
++ static int find_last_paren(char_u *l, int start, int end);
++ static int find_match(int lookfor, linenr_T ourscope);
++
++ /*
++ * Skip over white space and C comments within the line.
++ * Also skip over Perl/shell comments if desired.
++ */
++ static char_u *
++ cin_skipcomment(char_u *s)
++ {
++ while (*s)
++ {
++ char_u *prev_s = s;
++
++ s = skipwhite(s);
++
++ /* Perl/shell # comment comment continues until eol. Require a space
++ * before # to avoid recognizing $#array. */
++ if (curbuf->b_ind_hash_comment != 0 && s != prev_s && *s == '#')
++ {
++ s += STRLEN(s);
++ break;
++ }
++ if (*s != '/')
++ break;
++ ++s;
++ if (*s == '/') /* slash-slash comment continues till eol */
++ {
++ s += STRLEN(s);
++ break;
++ }
++ if (*s != '*')
++ break;
++ for (++s; *s; ++s) /* skip slash-star comment */
++ if (s[0] == '*' && s[1] == '/')
++ {
++ s += 2;
++ break;
++ }
++ }
++ return s;
++ }
++
++ /*
++ * Return TRUE if there is no code at *s. White space and comments are
++ * not considered code.
++ */
++ static int
++ cin_nocode(char_u *s)
++ {
++ return *cin_skipcomment(s) == NUL;
++ }
++
++ /*
++ * Check previous lines for a "//" line comment, skipping over blank lines.
++ */
++ static pos_T *
++ find_line_comment(void) /* XXX */
++ {
++ static pos_T pos;
++ char_u *line;
++ char_u *p;
++
++ pos = curwin->w_cursor;
++ while (--pos.lnum > 0)
++ {
++ line = ml_get(pos.lnum);
++ p = skipwhite(line);
++ if (cin_islinecomment(p))
++ {
++ pos.col = (int)(p - line);
++ return &pos;
++ }
++ if (*p != NUL)
++ break;
++ }
++ return NULL;
++ }
++
++ /*
++ * Return TRUE if "text" starts with "key:".
++ */
++ static int
++ cin_has_js_key(char_u *text)
++ {
++ char_u *s = skipwhite(text);
++ int quote = -1;
++
++ if (*s == '\'' || *s == '"')
++ {
++ /* can be 'key': or "key": */
++ quote = *s;
++ ++s;
++ }
++ if (!vim_isIDc(*s)) /* need at least one ID character */
++ return FALSE;
++
++ while (vim_isIDc(*s))
++ ++s;
++ if (*s == quote)
++ ++s;
++
++ s = cin_skipcomment(s);
++
++ /* "::" is not a label, it's C++ */
++ return (*s == ':' && s[1] != ':');
++ }
++
++ /*
++ * Check if string matches "label:"; move to character after ':' if true.
++ * "*s" must point to the start of the label, if there is one.
++ */
++ static int
++ cin_islabel_skip(char_u **s)
++ {
++ if (!vim_isIDc(**s)) /* need at least one ID character */
++ return FALSE;
++
++ while (vim_isIDc(**s))
++ (*s)++;
++
++ *s = cin_skipcomment(*s);
++
++ /* "::" is not a label, it's C++ */
++ return (**s == ':' && *++*s != ':');
++ }
++
++ /*
++ * Recognize a label: "label:".
++ * Note: curwin->w_cursor must be where we are looking for the label.
++ */
++ int
++ cin_islabel(void) /* XXX */
++ {
++ char_u *s;
++
++ s = cin_skipcomment(ml_get_curline());
++
++ /*
++ * Exclude "default" from labels, since it should be indented
++ * like a switch label. Same for C++ scope declarations.
++ */
++ if (cin_isdefault(s))
++ return FALSE;
++ if (cin_isscopedecl(s))
++ return FALSE;
++
++ if (cin_islabel_skip(&s))
++ {
++ /*
++ * Only accept a label if the previous line is terminated or is a case
++ * label.
++ */
++ pos_T cursor_save;
++ pos_T *trypos;
++ char_u *line;
++
++ cursor_save = curwin->w_cursor;
++ while (curwin->w_cursor.lnum > 1)
++ {
++ --curwin->w_cursor.lnum;
++
++ /*
++ * If we're in a comment or raw string now, skip to the start of
++ * it.
++ */
++ curwin->w_cursor.col = 0;
++ if ((trypos = ind_find_start_CORS(NULL)) != NULL) /* XXX */
++ curwin->w_cursor = *trypos;
++
++ line = ml_get_curline();
++ if (cin_ispreproc(line)) /* ignore #defines, #if, etc. */
++ continue;
++ if (*(line = cin_skipcomment(line)) == NUL)
++ continue;
++
++ curwin->w_cursor = cursor_save;
++ if (cin_isterminated(line, TRUE, FALSE)
++ || cin_isscopedecl(line)
++ || cin_iscase(line, TRUE)
++ || (cin_islabel_skip(&line) && cin_nocode(line)))
++ return TRUE;
++ return FALSE;
++ }
++ curwin->w_cursor = cursor_save;
++ return TRUE; /* label at start of file??? */
++ }
++ return FALSE;
++ }
++
++ /*
++ * Recognize structure initialization and enumerations:
++ * "[typedef] [static|public|protected|private] enum"
++ * "[typedef] [static|public|protected|private] = {"
++ */
++ static int
++ cin_isinit(void)
++ {
++ char_u *s;
++ static char *skip[] = {"static", "public", "protected", "private"};
++
++ s = cin_skipcomment(ml_get_curline());
++
++ if (cin_starts_with(s, "typedef"))
++ s = cin_skipcomment(s + 7);
++
++ for (;;)
++ {
++ int i, l;
++
++ for (i = 0; i < (int)(sizeof(skip) / sizeof(char *)); ++i)
++ {
++ l = (int)strlen(skip[i]);
++ if (cin_starts_with(s, skip[i]))
++ {
++ s = cin_skipcomment(s + l);
++ l = 0;
++ break;
++ }
++ }
++ if (l != 0)
++ break;
++ }
++
++ if (cin_starts_with(s, "enum"))
++ return TRUE;
++
++ if (cin_ends_in(s, (char_u *)"=", (char_u *)"{"))
++ return TRUE;
++
++ return FALSE;
++ }
++
++ /*
++ * Recognize a switch label: "case .*:" or "default:".
++ */
++ int
++ cin_iscase(
++ char_u *s,
++ int strict) /* Allow relaxed check of case statement for JS */
++ {
++ s = cin_skipcomment(s);
++ if (cin_starts_with(s, "case"))
++ {
++ for (s += 4; *s; ++s)
++ {
++ s = cin_skipcomment(s);
++ if (*s == ':')
++ {
++ if (s[1] == ':') /* skip over "::" for C++ */
++ ++s;
++ else
++ return TRUE;
++ }
++ if (*s == '\'' && s[1] && s[2] == '\'')
++ s += 2; /* skip over ':' */
++ else if (*s == '/' && (s[1] == '*' || s[1] == '/'))
++ return FALSE; /* stop at comment */
++ else if (*s == '"')
++ {
++ /* JS etc. */
++ if (strict)
++ return FALSE; /* stop at string */
++ else
++ return TRUE;
++ }
++ }
++ return FALSE;
++ }
++
++ if (cin_isdefault(s))
++ return TRUE;
++ return FALSE;
++ }
++
++ /*
++ * Recognize a "default" switch label.
++ */
++ static int
++ cin_isdefault(char_u *s)
++ {
++ return (STRNCMP(s, "default", 7) == 0
++ && *(s = cin_skipcomment(s + 7)) == ':'
++ && s[1] != ':');
++ }
++
++ /*
++ * Recognize a "public/private/protected" scope declaration label.
++ */
++ int
++ cin_isscopedecl(char_u *s)
++ {
++ int i;
++
++ s = cin_skipcomment(s);
++ if (STRNCMP(s, "public", 6) == 0)
++ i = 6;
++ else if (STRNCMP(s, "protected", 9) == 0)
++ i = 9;
++ else if (STRNCMP(s, "private", 7) == 0)
++ i = 7;
++ else
++ return FALSE;
++ return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':');
++ }
++
++ /* Maximum number of lines to search back for a "namespace" line. */
++ #define FIND_NAMESPACE_LIM 20
++
++ /*
++ * Recognize a "namespace" scope declaration.
++ */
++ static int
++ cin_is_cpp_namespace(char_u *s)
++ {
++ char_u *p;
++ int has_name = FALSE;
++ int has_name_start = FALSE;
++
++ s = cin_skipcomment(s);
++ if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9])))
++ {
++ p = cin_skipcomment(skipwhite(s + 9));
++ while (*p != NUL)
++ {
++ if (VIM_ISWHITE(*p))
++ {
++ has_name = TRUE; /* found end of a name */
++ p = cin_skipcomment(skipwhite(p));
++ }
++ else if (*p == '{')
++ {
++ break;
++ }
++ else if (vim_iswordc(*p))
++ {
++ has_name_start = TRUE;
++ if (has_name)
++ return FALSE; /* word character after skipping past name */
++ ++p;
++ }
++ else if (p[0] == ':' && p[1] == ':' && vim_iswordc(p[2]))
++ {
++ if (!has_name_start || has_name)
++ return FALSE;
++ /* C++ 17 nested namespace */
++ p += 3;
++ }
++ else
++ {
++ return FALSE;
++ }
++ }
++ return TRUE;
++ }
++ return FALSE;
++ }
++
++ /*
++ * Recognize a `extern "C"` or `extern "C++"` linkage specifications.
++ */
++ static int
++ cin_is_cpp_extern_c(char_u *s)
++ {
++ char_u *p;
++ int has_string_literal = FALSE;
++
++ s = cin_skipcomment(s);
++ if (STRNCMP(s, "extern", 6) == 0 && (s[6] == NUL || !vim_iswordc(s[6])))
++ {
++ p = cin_skipcomment(skipwhite(s + 6));
++ while (*p != NUL)
++ {
++ if (VIM_ISWHITE(*p))
++ {
++ p = cin_skipcomment(skipwhite(p));
++ }
++ else if (*p == '{')
++ {
++ break;
++ }
++ else if (p[0] == '"' && p[1] == 'C' && p[2] == '"')
++ {
++ if (has_string_literal)
++ return FALSE;
++ has_string_literal = TRUE;
++ p += 3;
++ }
++ else if (p[0] == '"' && p[1] == 'C' && p[2] == '+' && p[3] == '+'
++ && p[4] == '"')
++ {
++ if (has_string_literal)
++ return FALSE;
++ has_string_literal = TRUE;
++ p += 5;
++ }
++ else
++ {
++ return FALSE;
++ }
++ }
++ return has_string_literal ? TRUE : FALSE;
++ }
++ return FALSE;
++ }
++
++ /*
++ * Return a pointer to the first non-empty non-comment character after a ':'.
++ * Return NULL if not found.
++ * case 234: a = b;
++ * ^
++ */
++ static char_u *
++ after_label(char_u *l)
++ {
++ for ( ; *l; ++l)
++ {
++ if (*l == ':')
++ {
++ if (l[1] == ':') /* skip over "::" for C++ */
++ ++l;
++ else if (!cin_iscase(l + 1, FALSE))
++ break;
++ }
++ else if (*l == '\'' && l[1] && l[2] == '\'')
++ l += 2; /* skip over 'x' */
++ }
++ if (*l == NUL)
++ return NULL;
++ l = cin_skipcomment(l + 1);
++ if (*l == NUL)
++ return NULL;
++ return l;
++ }
++
++ /*
++ * Get indent of line "lnum", skipping a label.
++ * Return 0 if there is nothing after the label.
++ */
++ static int
++ get_indent_nolabel (linenr_T lnum) /* XXX */
++ {
++ char_u *l;
++ pos_T fp;
++ colnr_T col;
++ char_u *p;
++
++ l = ml_get(lnum);
++ p = after_label(l);
++ if (p == NULL)
++ return 0;
++
++ fp.col = (colnr_T)(p - l);
++ fp.lnum = lnum;
++ getvcol(curwin, &fp, &col, NULL, NULL);
++ return (int)col;
++ }
++
++ /*
++ * Find indent for line "lnum", ignoring any case or jump label.
++ * Also return a pointer to the text (after the label) in "pp".
++ * label: if (asdf && asdfasdf)
++ * ^
++ */
++ static int
++ skip_label(linenr_T lnum, char_u **pp)
++ {
++ char_u *l;
++ int amount;
++ pos_T cursor_save;
++
++ cursor_save = curwin->w_cursor;
++ curwin->w_cursor.lnum = lnum;
++ l = ml_get_curline();
++ /* XXX */
++ if (cin_iscase(l, FALSE) || cin_isscopedecl(l) || cin_islabel())
++ {
++ amount = get_indent_nolabel(lnum);
++ l = after_label(ml_get_curline());
++ if (l == NULL) /* just in case */
++ l = ml_get_curline();
++ }
++ else
++ {
++ amount = get_indent();
++ l = ml_get_curline();
++ }
++ *pp = l;
++
++ curwin->w_cursor = cursor_save;
++ return amount;
++ }
++
++ /*
++ * Return the indent of the first variable name after a type in a declaration.
++ * int a, indent of "a"
++ * static struct foo b, indent of "b"
++ * enum bla c, indent of "c"
++ * Returns zero when it doesn't look like a declaration.
++ */
++ static int
++ cin_first_id_amount(void)
++ {
++ char_u *line, *p, *s;
++ int len;
++ pos_T fp;
++ colnr_T col;
++
++ line = ml_get_curline();
++ p = skipwhite(line);
++ len = (int)(skiptowhite(p) - p);
++ if (len == 6 && STRNCMP(p, "static", 6) == 0)
++ {
++ p = skipwhite(p + 6);
++ len = (int)(skiptowhite(p) - p);
++ }
++ if (len == 6 && STRNCMP(p, "struct", 6) == 0)
++ p = skipwhite(p + 6);
++ else if (len == 4 && STRNCMP(p, "enum", 4) == 0)
++ p = skipwhite(p + 4);
++ else if ((len == 8 && STRNCMP(p, "unsigned", 8) == 0)
++ || (len == 6 && STRNCMP(p, "signed", 6) == 0))
++ {
++ s = skipwhite(p + len);
++ if ((STRNCMP(s, "int", 3) == 0 && VIM_ISWHITE(s[3]))
++ || (STRNCMP(s, "long", 4) == 0 && VIM_ISWHITE(s[4]))
++ || (STRNCMP(s, "short", 5) == 0 && VIM_ISWHITE(s[5]))
++ || (STRNCMP(s, "char", 4) == 0 && VIM_ISWHITE(s[4])))
++ p = s;
++ }
++ for (len = 0; vim_isIDc(p[len]); ++len)
++ ;
++ if (len == 0 || !VIM_ISWHITE(p[len]) || cin_nocode(p))
++ return 0;
++
++ p = skipwhite(p + len);
++ fp.lnum = curwin->w_cursor.lnum;
++ fp.col = (colnr_T)(p - line);
++ getvcol(curwin, &fp, &col, NULL, NULL);
++ return (int)col;
++ }
++
++ /*
++ * Return the indent of the first non-blank after an equal sign.
++ * char *foo = "here";
++ * Return zero if no (useful) equal sign found.
++ * Return -1 if the line above "lnum" ends in a backslash.
++ * foo = "asdf\
++ * asdf\
++ * here";
++ */
++ static int
++ cin_get_equal_amount(linenr_T lnum)
++ {
++ char_u *line;
++ char_u *s;
++ colnr_T col;
++ pos_T fp;
++
++ if (lnum > 1)
++ {
++ line = ml_get(lnum - 1);
++ if (*line != NUL && line[STRLEN(line) - 1] == '\\')
++ return -1;
++ }
++
++ line = s = ml_get(lnum);
++ while (*s != NUL && vim_strchr((char_u *)"=;{}\"'", *s) == NULL)
++ {
++ if (cin_iscomment(s)) /* ignore comments */
++ s = cin_skipcomment(s);
++ else
++ ++s;
++ }
++ if (*s != '=')
++ return 0;
++
++ s = skipwhite(s + 1);
++ if (cin_nocode(s))
++ return 0;
++
++ if (*s == '"') /* nice alignment for continued strings */
++ ++s;
++
++ fp.lnum = lnum;
++ fp.col = (colnr_T)(s - line);
++ getvcol(curwin, &fp, &col, NULL, NULL);
++ return (int)col;
++ }
++
++ /*
++ * Recognize a preprocessor statement: Any line that starts with '#'.
++ */
++ static int
++ cin_ispreproc(char_u *s)
++ {
++ if (*skipwhite(s) == '#')
++ return TRUE;
++ return FALSE;
++ }
++
++ /*
++ * Return TRUE if line "*pp" at "*lnump" is a preprocessor statement or a
++ * continuation line of a preprocessor statement. Decrease "*lnump" to the
++ * start and return the line in "*pp".
++ * Put the amount of indent in "*amount".
++ */
++ static int
++ cin_ispreproc_cont(char_u **pp, linenr_T *lnump, int *amount)
++ {
++ char_u *line = *pp;
++ linenr_T lnum = *lnump;
++ int retval = FALSE;
++ int candidate_amount = *amount;
++
++ if (*line != NUL && line[STRLEN(line) - 1] == '\\')
++ candidate_amount = get_indent_lnum(lnum);
++
++ for (;;)
++ {
++ if (cin_ispreproc(line))
++ {
++ retval = TRUE;
++ *lnump = lnum;
++ break;
++ }
++ if (lnum == 1)
++ break;
++ line = ml_get(--lnum);
++ if (*line == NUL || line[STRLEN(line) - 1] != '\\')
++ break;
++ }
++
++ if (lnum != *lnump)
++ *pp = ml_get(*lnump);
++ if (retval)
++ *amount = candidate_amount;
++ return retval;
++ }
++
++ /*
++ * Recognize the start of a C or C++ comment.
++ */
++ static int
++ cin_iscomment(char_u *p)
++ {
++ return (p[0] == '/' && (p[1] == '*' || p[1] == '/'));
++ }
++
++ /*
++ * Recognize the start of a "//" comment.
++ */
++ static int
++ cin_islinecomment(char_u *p)
++ {
++ return (p[0] == '/' && p[1] == '/');
++ }
++
++ /*
++ * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or
++ * '}'.
++ * Don't consider "} else" a terminated line.
++ * If a line begins with an "else", only consider it terminated if no unmatched
++ * opening braces follow (handle "else { foo();" correctly).
++ * Return the character terminating the line (ending char's have precedence if
++ * both apply in order to determine initializations).
++ */
++ static int
++ cin_isterminated(
++ char_u *s,
++ int incl_open, /* include '{' at the end as terminator */
++ int incl_comma) /* recognize a trailing comma */
++ {
++ char_u found_start = 0;
++ unsigned n_open = 0;
++ int is_else = FALSE;
++
++ s = cin_skipcomment(s);
++
++ if (*s == '{' || (*s == '}' && !cin_iselse(s)))
++ found_start = *s;
++
++ if (!found_start)
++ is_else = cin_iselse(s);
++
++ while (*s)
++ {
++ /* skip over comments, "" strings and 'c'haracters */
++ s = skip_string(cin_skipcomment(s));
++ if (*s == '}' && n_open > 0)
++ --n_open;
++ if ((!is_else || n_open == 0)
++ && (*s == ';' || *s == '}' || (incl_comma && *s == ','))
++ && cin_nocode(s + 1))
++ return *s;
++ else if (*s == '{')
++ {
++ if (incl_open && cin_nocode(s + 1))
++ return *s;
++ else
++ ++n_open;
++ }
++
++ if (*s)
++ s++;
++ }
++ return found_start;
++ }
++
++ /*
++ * Recognize the basic picture of a function declaration -- it needs to
++ * have an open paren somewhere and a close paren at the end of the line and
++ * no semicolons anywhere.
++ * When a line ends in a comma we continue looking in the next line.
++ * "sp" points to a string with the line. When looking at other lines it must
++ * be restored to the line. When it's NULL fetch lines here.
++ * "first_lnum" is where we start looking.
++ * "min_lnum" is the line before which we will not be looking.
++ */
++ static int
++ cin_isfuncdecl(
++ char_u **sp,
++ linenr_T first_lnum,
++ linenr_T min_lnum)
++ {
++ char_u *s;
++ linenr_T lnum = first_lnum;
++ linenr_T save_lnum = curwin->w_cursor.lnum;
++ int retval = FALSE;
++ pos_T *trypos;
++ int just_started = TRUE;
++
++ if (sp == NULL)
++ s = ml_get(lnum);
++ else
++ s = *sp;
++
++ curwin->w_cursor.lnum = lnum;
++ if (find_last_paren(s, '(', ')')
++ && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
++ {
++ lnum = trypos->lnum;
++ if (lnum < min_lnum)
++ {
++ curwin->w_cursor.lnum = save_lnum;
++ return FALSE;
++ }
++
++ s = ml_get(lnum);
++ }
++ curwin->w_cursor.lnum = save_lnum;
++
++ /* Ignore line starting with #. */
++ if (cin_ispreproc(s))
++ return FALSE;
++
++ while (*s && *s != '(' && *s != ';' && *s != '\'' && *s != '"')
++ {
++ if (cin_iscomment(s)) /* ignore comments */
++ s = cin_skipcomment(s);
++ else if (*s == ':')
++ {
++ if (*(s + 1) == ':')
++ s += 2;
++ else
++ /* To avoid a mistake in the following situation:
++ * A::A(int a, int b)
++ * : a(0) // <--not a function decl
++ * , b(0)
++ * {...
++ */
++ return FALSE;
++ }
++ else
++ ++s;
++ }
++ if (*s != '(')
++ return FALSE; /* ';', ' or " before any () or no '(' */
++
++ while (*s && *s != ';' && *s != '\'' && *s != '"')
++ {
++ if (*s == ')' && cin_nocode(s + 1))
++ {
++ /* ')' at the end: may have found a match
++ * Check for he previous line not to end in a backslash:
++ * #if defined(x) && \
++ * defined(y)
++ */
++ lnum = first_lnum - 1;
++ s = ml_get(lnum);
++ if (*s == NUL || s[STRLEN(s) - 1] != '\\')
++ retval = TRUE;
++ goto done;
++ }
++ if ((*s == ',' && cin_nocode(s + 1)) || s[1] == NUL || cin_nocode(s))
++ {
++ int comma = (*s == ',');
++
++ /* ',' at the end: continue looking in the next line.
++ * At the end: check for ',' in the next line, for this style:
++ * func(arg1
++ * , arg2) */
++ for (;;)
++ {
++ if (lnum >= curbuf->b_ml.ml_line_count)
++ break;
++ s = ml_get(++lnum);
++ if (!cin_ispreproc(s))
++ break;
++ }
++ if (lnum >= curbuf->b_ml.ml_line_count)
++ break;
++ /* Require a comma at end of the line or a comma or ')' at the
++ * start of next line. */
++ s = skipwhite(s);
++ if (!just_started && (!comma && *s != ',' && *s != ')'))
++ break;
++ just_started = FALSE;
++ }
++ else if (cin_iscomment(s)) /* ignore comments */
++ s = cin_skipcomment(s);
++ else
++ {
++ ++s;
++ just_started = FALSE;
++ }
++ }
++
++ done:
++ if (lnum != first_lnum && sp != NULL)
++ *sp = ml_get(first_lnum);
++
++ return retval;
++ }
++
++ static int
++ cin_isif(char_u *p)
++ {
++ return (STRNCMP(p, "if", 2) == 0 && !vim_isIDc(p[2]));
++ }
++
++ static int
++ cin_iselse(
++ char_u *p)
++ {
++ if (*p == '}') /* accept "} else" */
++ p = cin_skipcomment(p + 1);
++ return (STRNCMP(p, "else", 4) == 0 && !vim_isIDc(p[4]));
++ }
++
++ static int
++ cin_isdo(char_u *p)
++ {
++ return (STRNCMP(p, "do", 2) == 0 && !vim_isIDc(p[2]));
++ }
++
++ /*
++ * Check if this is a "while" that should have a matching "do".
++ * We only accept a "while (condition) ;", with only white space between the
++ * ')' and ';'. The condition may be spread over several lines.
++ */
++ static int
++ cin_iswhileofdo (char_u *p, linenr_T lnum) /* XXX */
++ {
++ pos_T cursor_save;
++ pos_T *trypos;
++ int retval = FALSE;
++
++ p = cin_skipcomment(p);
++ if (*p == '}') /* accept "} while (cond);" */
++ p = cin_skipcomment(p + 1);
++ if (cin_starts_with(p, "while"))
++ {
++ cursor_save = curwin->w_cursor;
++ curwin->w_cursor.lnum = lnum;
++ curwin->w_cursor.col = 0;
++ p = ml_get_curline();
++ while (*p && *p != 'w') /* skip any '}', until the 'w' of the "while" */
++ {
++ ++p;
++ ++curwin->w_cursor.col;
++ }
++ if ((trypos = findmatchlimit(NULL, 0, 0,
++ curbuf->b_ind_maxparen)) != NULL
++ && *cin_skipcomment(ml_get_pos(trypos) + 1) == ';')
++ retval = TRUE;
++ curwin->w_cursor = cursor_save;
++ }
++ return retval;
++ }
++
++ /*
++ * Check whether in "p" there is an "if", "for" or "while" before "*poffset".
++ * Return 0 if there is none.
++ * Otherwise return !0 and update "*poffset" to point to the place where the
++ * string was found.
++ */
++ static int
++ cin_is_if_for_while_before_offset(char_u *line, int *poffset)
++ {
++ int offset = *poffset;
++
++ if (offset-- < 2)
++ return 0;
++ while (offset > 2 && VIM_ISWHITE(line[offset]))
++ --offset;
++
++ offset -= 1;
++ if (!STRNCMP(line + offset, "if", 2))
++ goto probablyFound;
++
++ if (offset >= 1)
++ {
++ offset -= 1;
++ if (!STRNCMP(line + offset, "for", 3))
++ goto probablyFound;
++
++ if (offset >= 2)
++ {
++ offset -= 2;
++ if (!STRNCMP(line + offset, "while", 5))
++ goto probablyFound;
++ }
++ }
++ return 0;
++
++ probablyFound:
++ if (!offset || !vim_isIDc(line[offset - 1]))
++ {
++ *poffset = offset;
++ return 1;
++ }
++ return 0;
++ }
++
++ /*
++ * Return TRUE if we are at the end of a do-while.
++ * do
++ * nothing;
++ * while (foo
++ * && bar); <-- here
++ * Adjust the cursor to the line with "while".
++ */
++ static int
++ cin_iswhileofdo_end(int terminated)
++ {
++ char_u *line;
++ char_u *p;
++ char_u *s;
++ pos_T *trypos;
++ int i;
++
++ if (terminated != ';') /* there must be a ';' at the end */
++ return FALSE;
++
++ p = line = ml_get_curline();
++ while (*p != NUL)
++ {
++ p = cin_skipcomment(p);
++ if (*p == ')')
++ {
++ s = skipwhite(p + 1);
++ if (*s == ';' && cin_nocode(s + 1))
++ {
++ /* Found ");" at end of the line, now check there is "while"
++ * before the matching '('. XXX */
++ i = (int)(p - line);
++ curwin->w_cursor.col = i;
++ trypos = find_match_paren(curbuf->b_ind_maxparen);
++ if (trypos != NULL)
++ {
++ s = cin_skipcomment(ml_get(trypos->lnum));
++ if (*s == '}') /* accept "} while (cond);" */
++ s = cin_skipcomment(s + 1);
++ if (cin_starts_with(s, "while"))
++ {
++ curwin->w_cursor.lnum = trypos->lnum;
++ return TRUE;
++ }
++ }
++
++ /* Searching may have made "line" invalid, get it again. */
++ line = ml_get_curline();
++ p = line + i;
++ }
++ }
++ if (*p != NUL)
++ ++p;
++ }
++ return FALSE;
++ }
++
++ static int
++ cin_isbreak(char_u *p)
++ {
++ return (STRNCMP(p, "break", 5) == 0 && !vim_isIDc(p[5]));
++ }
++
++ /*
++ * Find the position of a C++ base-class declaration or
++ * constructor-initialization. eg:
++ *
++ * class MyClass :
++ * baseClass <-- here
++ * class MyClass : public baseClass,
++ * anotherBaseClass <-- here (should probably lineup ??)
++ * MyClass::MyClass(...) :
++ * baseClass(...) <-- here (constructor-initialization)
++ *
++ * This is a lot of guessing. Watch out for "cond ? func() : foo".
++ */
++ static int
++ cin_is_cpp_baseclass(
++ cpp_baseclass_cache_T *cached) /* input and output */
++ {
++ lpos_T *pos = &cached->lpos; /* find position */
++ char_u *s;
++ int class_or_struct, lookfor_ctor_init, cpp_base_class;
++ linenr_T lnum = curwin->w_cursor.lnum;
++ char_u *line = ml_get_curline();
++
++ if (pos->lnum <= lnum)
++ return cached->found; /* Use the cached result */
++
++ pos->col = 0;
++
++ s = skipwhite(line);
++ if (*s == '#') /* skip #define FOO x ? (x) : x */
++ return FALSE;
++ s = cin_skipcomment(s);
++ if (*s == NUL)
++ return FALSE;
++
++ cpp_base_class = lookfor_ctor_init = class_or_struct = FALSE;
++
++ /* Search for a line starting with '#', empty, ending in ';' or containing
++ * '{' or '}' and start below it. This handles the following situations:
++ * a = cond ?
++ * func() :
++ * asdf;
++ * func::foo()
++ * : something
++ * {}
++ * Foo::Foo (int one, int two)
++ * : something(4),
++ * somethingelse(3)
++ * {}
++ */
++ while (lnum > 1)
++ {
++ line = ml_get(lnum - 1);
++ s = skipwhite(line);
++ if (*s == '#' || *s == NUL)
++ break;
++ while (*s != NUL)
++ {
++ s = cin_skipcomment(s);
++ if (*s == '{' || *s == '}'
++ || (*s == ';' && cin_nocode(s + 1)))
++ break;
++ if (*s != NUL)
++ ++s;
++ }
++ if (*s != NUL)
++ break;
++ --lnum;
++ }
++
++ pos->lnum = lnum;
++ line = ml_get(lnum);
++ s = line;
++ for (;;)
++ {
++ if (*s == NUL)
++ {
++ if (lnum == curwin->w_cursor.lnum)
++ break;
++ /* Continue in the cursor line. */
++ line = ml_get(++lnum);
++ s = line;
++ }
++ if (s == line)
++ {
++ /* don't recognize "case (foo):" as a baseclass */
++ if (cin_iscase(s, FALSE))
++ break;
++ s = cin_skipcomment(line);
++ if (*s == NUL)
++ continue;
++ }
++
++ if (s[0] == '"' || (s[0] == 'R' && s[1] == '"'))
++ s = skip_string(s) + 1;
++ else if (s[0] == ':')
++ {
++ if (s[1] == ':')
++ {
++ /* skip double colon. It can't be a constructor
++ * initialization any more */
++ lookfor_ctor_init = FALSE;
++ s = cin_skipcomment(s + 2);
++ }
++ else if (lookfor_ctor_init || class_or_struct)
++ {
++ /* we have something found, that looks like the start of
++ * cpp-base-class-declaration or constructor-initialization */
++ cpp_base_class = TRUE;
++ lookfor_ctor_init = class_or_struct = FALSE;
++ pos->col = 0;
++ s = cin_skipcomment(s + 1);
++ }
++ else
++ s = cin_skipcomment(s + 1);
++ }
++ else if ((STRNCMP(s, "class", 5) == 0 && !vim_isIDc(s[5]))
++ || (STRNCMP(s, "struct", 6) == 0 && !vim_isIDc(s[6])))
++ {
++ class_or_struct = TRUE;
++ lookfor_ctor_init = FALSE;
++
++ if (*s == 'c')
++ s = cin_skipcomment(s + 5);
++ else
++ s = cin_skipcomment(s + 6);
++ }
++ else
++ {
++ if (s[0] == '{' || s[0] == '}' || s[0] == ';')
++ {
++ cpp_base_class = lookfor_ctor_init = class_or_struct = FALSE;
++ }
++ else if (s[0] == ')')
++ {
++ /* Constructor-initialization is assumed if we come across
++ * something like "):" */
++ class_or_struct = FALSE;
++ lookfor_ctor_init = TRUE;
++ }
++ else if (s[0] == '?')
++ {
++ /* Avoid seeing '() :' after '?' as constructor init. */
++ return FALSE;
++ }
++ else if (!vim_isIDc(s[0]))
++ {
++ /* if it is not an identifier, we are wrong */
++ class_or_struct = FALSE;
++ lookfor_ctor_init = FALSE;
++ }
++ else if (pos->col == 0)
++ {
++ /* it can't be a constructor-initialization any more */
++ lookfor_ctor_init = FALSE;
++
++ /* the first statement starts here: lineup with this one... */
++ if (cpp_base_class)
++ pos->col = (colnr_T)(s - line);
++ }
++
++ /* When the line ends in a comma don't align with it. */
++ if (lnum == curwin->w_cursor.lnum && *s == ',' && cin_nocode(s + 1))
++ pos->col = 0;
++
++ s = cin_skipcomment(s + 1);
++ }
++ }
++
++ cached->found = cpp_base_class;
++ if (cpp_base_class)
++ pos->lnum = lnum;
++ return cpp_base_class;
++ }
++
++ static int
++ get_baseclass_amount(int col)
++ {
++ int amount;
++ colnr_T vcol;
++ pos_T *trypos;
++
++ if (col == 0)
++ {
++ amount = get_indent();
++ if (find_last_paren(ml_get_curline(), '(', ')')
++ && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
++ amount = get_indent_lnum(trypos->lnum); /* XXX */
++ if (!cin_ends_in(ml_get_curline(), (char_u *)",", NULL))
++ amount += curbuf->b_ind_cpp_baseclass;
++ }
++ else
++ {
++ curwin->w_cursor.col = col;
++ getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
++ amount = (int)vcol;
++ }
++ if (amount < curbuf->b_ind_cpp_baseclass)
++ amount = curbuf->b_ind_cpp_baseclass;
++ return amount;
++ }
++
++ /*
++ * Return TRUE if string "s" ends with the string "find", possibly followed by
++ * white space and comments. Skip strings and comments.
++ * Ignore "ignore" after "find" if it's not NULL.
++ */
++ static int
++ cin_ends_in(char_u *s, char_u *find, char_u *ignore)
++ {
++ char_u *p = s;
++ char_u *r;
++ int len = (int)STRLEN(find);
++
++ while (*p != NUL)
++ {
++ p = cin_skipcomment(p);
++ if (STRNCMP(p, find, len) == 0)
++ {
++ r = skipwhite(p + len);
++ if (ignore != NULL && STRNCMP(r, ignore, STRLEN(ignore)) == 0)
++ r = skipwhite(r + STRLEN(ignore));
++ if (cin_nocode(r))
++ return TRUE;
++ }
++ if (*p != NUL)
++ ++p;
++ }
++ return FALSE;
++ }
++
++ /*
++ * Return TRUE when "s" starts with "word" and then a non-ID character.
++ */
++ static int
++ cin_starts_with(char_u *s, char *word)
++ {
++ int l = (int)STRLEN(word);
++
++ return (STRNCMP(s, word, l) == 0 && !vim_isIDc(s[l]));
++ }
++
++ /*
++ * Skip strings, chars and comments until at or past "trypos".
++ * Return the column found.
++ */
++ static int
++ cin_skip2pos(pos_T *trypos)
++ {
++ char_u *line;
++ char_u *p;
++ char_u *new_p;
++
++ p = line = ml_get(trypos->lnum);
++ while (*p && (colnr_T)(p - line) < trypos->col)
++ {
++ if (cin_iscomment(p))
++ p = cin_skipcomment(p);
++ else
++ {
++ new_p = skip_string(p);
++ if (new_p == p)
++ ++p;
++ else
++ p = new_p;
++ }
++ }
++ return (int)(p - line);
++ }
++
++ /*
++ * Find the '{' at the start of the block we are in.
++ * Return NULL if no match found.
++ * Ignore a '{' that is in a comment, makes indenting the next three lines
++ * work. */
++ /* foo() */
++ /* { */
++ /* } */
++
++ static pos_T *
++ find_start_brace(void) /* XXX */
++ {
++ pos_T cursor_save;
++ pos_T *trypos;
++ pos_T *pos;
++ static pos_T pos_copy;
++
++ cursor_save = curwin->w_cursor;
++ while ((trypos = findmatchlimit(NULL, '{', FM_BLOCKSTOP, 0)) != NULL)
++ {
++ pos_copy = *trypos; /* copy pos_T, next findmatch will change it */
++ trypos = &pos_copy;
++ curwin->w_cursor = *trypos;
++ pos = NULL;
++ /* ignore the { if it's in a // or / * * / comment */
++ if ((colnr_T)cin_skip2pos(trypos) == trypos->col
++ && (pos = ind_find_start_CORS(NULL)) == NULL) /* XXX */
++ break;
++ if (pos != NULL)
++ curwin->w_cursor.lnum = pos->lnum;
++ }
++ curwin->w_cursor = cursor_save;
++ return trypos;
++ }
++
++ /*
++ * Find the matching '(', ignoring it if it is in a comment.
++ * Return NULL if no match found.
++ */
++ static pos_T *
++ find_match_paren(int ind_maxparen) /* XXX */
++ {
++ return find_match_char('(', ind_maxparen);
++ }
++
++ static pos_T *
++ find_match_char(int c, int ind_maxparen) /* XXX */
++ {
++ pos_T cursor_save;
++ pos_T *trypos;
++ static pos_T pos_copy;
++ int ind_maxp_wk;
++
++ cursor_save = curwin->w_cursor;
++ ind_maxp_wk = ind_maxparen;
++ retry:
++ if ((trypos = findmatchlimit(NULL, c, 0, ind_maxp_wk)) != NULL)
++ {
++ /* check if the ( is in a // comment */
++ if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
++ {
++ ind_maxp_wk = ind_maxparen - (int)(cursor_save.lnum - trypos->lnum);
++ if (ind_maxp_wk > 0)
++ {
++ curwin->w_cursor = *trypos;
++ curwin->w_cursor.col = 0; /* XXX */
++ goto retry;
++ }
++ trypos = NULL;
++ }
++ else
++ {
++ pos_T *trypos_wk;
++
++ pos_copy = *trypos; /* copy trypos, findmatch will change it */
++ trypos = &pos_copy;
++ curwin->w_cursor = *trypos;
++ if ((trypos_wk = ind_find_start_CORS(NULL)) != NULL) /* XXX */
++ {
++ ind_maxp_wk = ind_maxparen - (int)(cursor_save.lnum
++ - trypos_wk->lnum);
++ if (ind_maxp_wk > 0)
++ {
++ curwin->w_cursor = *trypos_wk;
++ goto retry;
++ }
++ trypos = NULL;
++ }
++ }
++ }
++ curwin->w_cursor = cursor_save;
++ return trypos;
++ }
++
++ /*
++ * Find the matching '(', ignoring it if it is in a comment or before an
++ * unmatched {.
++ * Return NULL if no match found.
++ */
++ static pos_T *
++ find_match_paren_after_brace (int ind_maxparen) /* XXX */
++ {
++ pos_T *trypos = find_match_paren(ind_maxparen);
++
++ if (trypos != NULL)
++ {
++ pos_T *tryposBrace = find_start_brace();
++
++ /* If both an unmatched '(' and '{' is found. Ignore the '('
++ * position if the '{' is further down. */
++ if (tryposBrace != NULL
++ && (trypos->lnum != tryposBrace->lnum
++ ? trypos->lnum < tryposBrace->lnum
++ : trypos->col < tryposBrace->col))
++ trypos = NULL;
++ }
++ return trypos;
++ }
++
++ /*
++ * Return ind_maxparen corrected for the difference in line number between the
++ * cursor position and "startpos". This makes sure that searching for a
++ * matching paren above the cursor line doesn't find a match because of
++ * looking a few lines further.
++ */
++ static int
++ corr_ind_maxparen(pos_T *startpos)
++ {
++ long n = (long)startpos->lnum - (long)curwin->w_cursor.lnum;
++
++ if (n > 0 && n < curbuf->b_ind_maxparen / 2)
++ return curbuf->b_ind_maxparen - (int)n;
++ return curbuf->b_ind_maxparen;
++ }
++
++ /*
++ * Set w_cursor.col to the column number of the last unmatched ')' or '{' in
++ * line "l". "l" must point to the start of the line.
++ */
++ static int
++ find_last_paren(char_u *l, int start, int end)
++ {
++ int i;
++ int retval = FALSE;
++ int open_count = 0;
++
++ curwin->w_cursor.col = 0; /* default is start of line */
++
++ for (i = 0; l[i] != NUL; i++)
++ {
++ i = (int)(cin_skipcomment(l + i) - l); /* ignore parens in comments */
++ i = (int)(skip_string(l + i) - l); /* ignore parens in quotes */
++ if (l[i] == start)
++ ++open_count;
++ else if (l[i] == end)
++ {
++ if (open_count > 0)
++ --open_count;
++ else
++ {
++ curwin->w_cursor.col = i;
++ retval = TRUE;
++ }
++ }
++ }
++ return retval;
++ }
++
++ /*
++ * Parse 'cinoptions' and set the values in "curbuf".
++ * Must be called when 'cinoptions', 'shiftwidth' and/or 'tabstop' changes.
++ */
++ void
++ parse_cino(buf_T *buf)
++ {
++ char_u *p;
++ char_u *l;
++ char_u *digits;
++ int n;
++ int divider;
++ int fraction = 0;
++ int sw = (int)get_sw_value(buf);
++
++ /*
++ * Set the default values.
++ */
++ /* Spaces from a block's opening brace the prevailing indent for that
++ * block should be. */
++ buf->b_ind_level = sw;
++
++ /* Spaces from the edge of the line an open brace that's at the end of a
++ * line is imagined to be. */
++ buf->b_ind_open_imag = 0;
++
++ /* Spaces from the prevailing indent for a line that is not preceded by
++ * an opening brace. */
++ buf->b_ind_no_brace = 0;
++
++ /* Column where the first { of a function should be located }. */
++ buf->b_ind_first_open = 0;
++
++ /* Spaces from the prevailing indent a leftmost open brace should be
++ * located. */
++ buf->b_ind_open_extra = 0;
++
++ /* Spaces from the matching open brace (real location for one at the left
++ * edge; imaginary location from one that ends a line) the matching close
++ * brace should be located. */
++ buf->b_ind_close_extra = 0;
++
++ /* Spaces from the edge of the line an open brace sitting in the leftmost
++ * column is imagined to be. */
++ buf->b_ind_open_left_imag = 0;
++
++ /* Spaces jump labels should be shifted to the left if N is non-negative,
++ * otherwise the jump label will be put to column 1. */
++ buf->b_ind_jump_label = -1;
++
++ /* Spaces from the switch() indent a "case xx" label should be located. */
++ buf->b_ind_case = sw;
++
++ /* Spaces from the "case xx:" code after a switch() should be located. */
++ buf->b_ind_case_code = sw;
++
++ /* Lineup break at end of case in switch() with case label. */
++ buf->b_ind_case_break = 0;
++
++ /* Spaces from the class declaration indent a scope declaration label
++ * should be located. */
++ buf->b_ind_scopedecl = sw;
++
++ /* Spaces from the scope declaration label code should be located. */
++ buf->b_ind_scopedecl_code = sw;
++
++ /* Amount K&R-style parameters should be indented. */
++ buf->b_ind_param = sw;
++
++ /* Amount a function type spec should be indented. */
++ buf->b_ind_func_type = sw;
++
++ /* Amount a cpp base class declaration or constructor initialization
++ * should be indented. */
++ buf->b_ind_cpp_baseclass = sw;
++
++ /* additional spaces beyond the prevailing indent a continuation line
++ * should be located. */
++ buf->b_ind_continuation = sw;
++
++ /* Spaces from the indent of the line with an unclosed parentheses. */
++ buf->b_ind_unclosed = sw * 2;
++
++ /* Spaces from the indent of the line with an unclosed parentheses, which
++ * itself is also unclosed. */
++ buf->b_ind_unclosed2 = sw;
++
++ /* Suppress ignoring spaces from the indent of a line starting with an
++ * unclosed parentheses. */
++ buf->b_ind_unclosed_noignore = 0;
++
++ /* If the opening paren is the last nonwhite character on the line, and
++ * b_ind_unclosed_wrapped is nonzero, use this indent relative to the outer
++ * context (for very long lines). */
++ buf->b_ind_unclosed_wrapped = 0;
++
++ /* Suppress ignoring white space when lining up with the character after
++ * an unclosed parentheses. */
++ buf->b_ind_unclosed_whiteok = 0;
++
++ /* Indent a closing parentheses under the line start of the matching
++ * opening parentheses. */
++ buf->b_ind_matching_paren = 0;
++
++ /* Indent a closing parentheses under the previous line. */
++ buf->b_ind_paren_prev = 0;
++
++ /* Extra indent for comments. */
++ buf->b_ind_comment = 0;
++
++ /* Spaces from the comment opener when there is nothing after it. */
++ buf->b_ind_in_comment = 3;
++
++ /* Boolean: if non-zero, use b_ind_in_comment even if there is something
++ * after the comment opener. */
++ buf->b_ind_in_comment2 = 0;
++
++ /* Max lines to search for an open paren. */
++ buf->b_ind_maxparen = 20;
++
++ /* Max lines to search for an open comment. */
++ buf->b_ind_maxcomment = 70;
++
++ /* Handle braces for java code. */
++ buf->b_ind_java = 0;
++
++ /* Not to confuse JS object properties with labels. */
++ buf->b_ind_js = 0;
++
++ /* Handle blocked cases correctly. */
++ buf->b_ind_keep_case_label = 0;
++
++ /* Handle C++ namespace. */
++ buf->b_ind_cpp_namespace = 0;
++
++ /* Handle continuation lines containing conditions of if(), for() and
++ * while(). */
++ buf->b_ind_if_for_while = 0;
++
++ /* indentation for # comments */
++ buf->b_ind_hash_comment = 0;
++
++ /* Handle C++ extern "C" or "C++" */
++ buf->b_ind_cpp_extern_c = 0;
++
++ for (p = buf->b_p_cino; *p; )
++ {
++ l = p++;
++ if (*p == '-')
++ ++p;
++ digits = p; /* remember where the digits start */
++ n = getdigits(&p);
++ divider = 0;
++ if (*p == '.') /* ".5s" means a fraction */
++ {
++ fraction = atol((char *)++p);
++ while (VIM_ISDIGIT(*p))
++ {
++ ++p;
++ if (divider)
++ divider *= 10;
++ else
++ divider = 10;
++ }
++ }
++ if (*p == 's') /* "2s" means two times 'shiftwidth' */
++ {
++ if (p == digits)
++ n = sw; /* just "s" is one 'shiftwidth' */
++ else
++ {
++ n *= sw;
++ if (divider)
++ n += (sw * fraction + divider / 2) / divider;
++ }
++ ++p;
++ }
++ if (l[1] == '-')
++ n = -n;
++
++ /* When adding an entry here, also update the default 'cinoptions' in
++ * doc/indent.txt, and add explanation for it! */
++ switch (*l)
++ {
++ case '>': buf->b_ind_level = n; break;
++ case 'e': buf->b_ind_open_imag = n; break;
++ case 'n': buf->b_ind_no_brace = n; break;
++ case 'f': buf->b_ind_first_open = n; break;
++ case '{': buf->b_ind_open_extra = n; break;
++ case '}': buf->b_ind_close_extra = n; break;
++ case '^': buf->b_ind_open_left_imag = n; break;
++ case 'L': buf->b_ind_jump_label = n; break;
++ case ':': buf->b_ind_case = n; break;
++ case '=': buf->b_ind_case_code = n; break;
++ case 'b': buf->b_ind_case_break = n; break;
++ case 'p': buf->b_ind_param = n; break;
++ case 't': buf->b_ind_func_type = n; break;
++ case '/': buf->b_ind_comment = n; break;
++ case 'c': buf->b_ind_in_comment = n; break;
++ case 'C': buf->b_ind_in_comment2 = n; break;
++ case 'i': buf->b_ind_cpp_baseclass = n; break;
++ case '+': buf->b_ind_continuation = n; break;
++ case '(': buf->b_ind_unclosed = n; break;
++ case 'u': buf->b_ind_unclosed2 = n; break;
++ case 'U': buf->b_ind_unclosed_noignore = n; break;
++ case 'W': buf->b_ind_unclosed_wrapped = n; break;
++ case 'w': buf->b_ind_unclosed_whiteok = n; break;
++ case 'm': buf->b_ind_matching_paren = n; break;
++ case 'M': buf->b_ind_paren_prev = n; break;
++ case ')': buf->b_ind_maxparen = n; break;
++ case '*': buf->b_ind_maxcomment = n; break;
++ case 'g': buf->b_ind_scopedecl = n; break;
++ case 'h': buf->b_ind_scopedecl_code = n; break;
++ case 'j': buf->b_ind_java = n; break;
++ case 'J': buf->b_ind_js = n; break;
++ case 'l': buf->b_ind_keep_case_label = n; break;
++ case '#': buf->b_ind_hash_comment = n; break;
++ case 'N': buf->b_ind_cpp_namespace = n; break;
++ case 'k': buf->b_ind_if_for_while = n; break;
++ case 'E': buf->b_ind_cpp_extern_c = n; break;
++ }
++ if (*p == ',')
++ ++p;
++ }
++ }
++
++ /*
++ * Return the desired indent for C code.
++ * Return -1 if the indent should be left alone (inside a raw string).
++ */
++ int
++ get_c_indent(void)
++ {
++ pos_T cur_curpos;
++ int amount;
++ int scope_amount;
++ int cur_amount = MAXCOL;
++ colnr_T col;
++ char_u *theline;
++ char_u *linecopy;
++ pos_T *trypos;
++ pos_T *comment_pos;
++ pos_T *tryposBrace = NULL;
++ pos_T tryposCopy;
++ pos_T our_paren_pos;
++ char_u *start;
++ int start_brace;
++ #define BRACE_IN_COL0 1 /* '{' is in column 0 */
++ #define BRACE_AT_START 2 /* '{' is at start of line */
++ #define BRACE_AT_END 3 /* '{' is at end of line */
++ linenr_T ourscope;
++ char_u *l;
++ char_u *look;
++ char_u terminated;
++ int lookfor;
++ #define LOOKFOR_INITIAL 0
++ #define LOOKFOR_IF 1
++ #define LOOKFOR_DO 2
++ #define LOOKFOR_CASE 3
++ #define LOOKFOR_ANY 4
++ #define LOOKFOR_TERM 5
++ #define LOOKFOR_UNTERM 6
++ #define LOOKFOR_SCOPEDECL 7
++ #define LOOKFOR_NOBREAK 8
++ #define LOOKFOR_CPP_BASECLASS 9
++ #define LOOKFOR_ENUM_OR_INIT 10
++ #define LOOKFOR_JS_KEY 11
++ #define LOOKFOR_COMMA 12
++
++ int whilelevel;
++ linenr_T lnum;
++ int n;
++ int iscase;
++ int lookfor_break;
++ int lookfor_cpp_namespace = FALSE;
++ int cont_amount = 0; /* amount for continuation line */
++ int original_line_islabel;
++ int added_to_amount = 0;
++ int js_cur_has_key = 0;
++ linenr_T raw_string_start = 0;
++ cpp_baseclass_cache_T cache_cpp_baseclass = { FALSE, { MAXLNUM, 0 } };
++
++ /* make a copy, value is changed below */
++ int ind_continuation = curbuf->b_ind_continuation;
++
++ /* remember where the cursor was when we started */
++ cur_curpos = curwin->w_cursor;
++
++ /* if we are at line 1 zero indent is fine, right? */
++ if (cur_curpos.lnum == 1)
++ return 0;
++
++ /* Get a copy of the current contents of the line.
++ * This is required, because only the most recent line obtained with
++ * ml_get is valid! */
++ linecopy = vim_strsave(ml_get(cur_curpos.lnum));
++ if (linecopy == NULL)
++ return 0;
++
++ /*
++ * In insert mode and the cursor is on a ')' truncate the line at the
++ * cursor position. We don't want to line up with the matching '(' when
++ * inserting new stuff.
++ * For unknown reasons the cursor might be past the end of the line, thus
++ * check for that.
++ */
++ if ((State & INSERT)
++ && curwin->w_cursor.col < (colnr_T)STRLEN(linecopy)
++ && linecopy[curwin->w_cursor.col] == ')')
++ linecopy[curwin->w_cursor.col] = NUL;
++
++ theline = skipwhite(linecopy);
++
++ /* move the cursor to the start of the line */
++
++ curwin->w_cursor.col = 0;
++
++ original_line_islabel = cin_islabel(); /* XXX */
++
++ /*
++ * If we are inside a raw string don't change the indent.
++ * Ignore a raw string inside a comment.
++ */
++ comment_pos = ind_find_start_comment();
++ if (comment_pos != NULL)
++ {
++ /* findmatchlimit() static pos is overwritten, make a copy */
++ tryposCopy = *comment_pos;
++ comment_pos = &tryposCopy;
++ }
++ trypos = find_start_rawstring(curbuf->b_ind_maxcomment);
++ if (trypos != NULL && (comment_pos == NULL
++ || LT_POS(*trypos, *comment_pos)))
++ {
++ amount = -1;
++ goto laterend;
++ }
++
++ /*
++ * #defines and so on always go at the left when included in 'cinkeys'.
++ */
++ if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', TRUE)))
++ {
++ amount = curbuf->b_ind_hash_comment;
++ goto theend;
++ }
++
++ /*
++ * Is it a non-case label? Then that goes at the left margin too unless:
++ * - JS flag is set.
++ * - 'L' item has a positive value.
++ */
++ if (original_line_islabel && !curbuf->b_ind_js
++ && curbuf->b_ind_jump_label < 0)
++ {
++ amount = 0;
++ goto theend;
++ }
++
++ /*
++ * If we're inside a "//" comment and there is a "//" comment in a
++ * previous line, lineup with that one.
++ */
++ if (cin_islinecomment(theline)
++ && (trypos = find_line_comment()) != NULL) /* XXX */
++ {
++ /* find how indented the line beginning the comment is */
++ getvcol(curwin, trypos, &col, NULL, NULL);
++ amount = col;
++ goto theend;
++ }
++
++ /*
++ * If we're inside a comment and not looking at the start of the
++ * comment, try using the 'comments' option.
++ */
++ if (!cin_iscomment(theline) && comment_pos != NULL) /* XXX */
++ {
++ int lead_start_len = 2;
++ int lead_middle_len = 1;
++ char_u lead_start[COM_MAX_LEN]; /* start-comment string */
++ char_u lead_middle[COM_MAX_LEN]; /* middle-comment string */
++ char_u lead_end[COM_MAX_LEN]; /* end-comment string */
++ char_u *p;
++ int start_align = 0;
++ int start_off = 0;
++ int done = FALSE;
++
++ /* find how indented the line beginning the comment is */
++ getvcol(curwin, comment_pos, &col, NULL, NULL);
++ amount = col;
++ *lead_start = NUL;
++ *lead_middle = NUL;
++
++ p = curbuf->b_p_com;
++ while (*p != NUL)
++ {
++ int align = 0;
++ int off = 0;
++ int what = 0;
++
++ while (*p != NUL && *p != ':')
++ {
++ if (*p == COM_START || *p == COM_END || *p == COM_MIDDLE)
++ what = *p++;
++ else if (*p == COM_LEFT || *p == COM_RIGHT)
++ align = *p++;
++ else if (VIM_ISDIGIT(*p) || *p == '-')
++ off = getdigits(&p);
++ else
++ ++p;
++ }
++
++ if (*p == ':')
++ ++p;
++ (void)copy_option_part(&p, lead_end, COM_MAX_LEN, ",");
++ if (what == COM_START)
++ {
++ STRCPY(lead_start, lead_end);
++ lead_start_len = (int)STRLEN(lead_start);
++ start_off = off;
++ start_align = align;
++ }
++ else if (what == COM_MIDDLE)
++ {
++ STRCPY(lead_middle, lead_end);
++ lead_middle_len = (int)STRLEN(lead_middle);
++ }
++ else if (what == COM_END)
++ {
++ /* If our line starts with the middle comment string, line it
++ * up with the comment opener per the 'comments' option. */
++ if (STRNCMP(theline, lead_middle, lead_middle_len) == 0
++ && STRNCMP(theline, lead_end, STRLEN(lead_end)) != 0)
++ {
++ done = TRUE;
++ if (curwin->w_cursor.lnum > 1)
++ {
++ /* If the start comment string matches in the previous
++ * line, use the indent of that line plus offset. If
++ * the middle comment string matches in the previous
++ * line, use the indent of that line. XXX */
++ look = skipwhite(ml_get(curwin->w_cursor.lnum - 1));
++ if (STRNCMP(look, lead_start, lead_start_len) == 0)
++ amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
++ else if (STRNCMP(look, lead_middle,
++ lead_middle_len) == 0)
++ {
++ amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
++ break;
++ }
++ /* If the start comment string doesn't match with the
++ * start of the comment, skip this entry. XXX */
++ else if (STRNCMP(ml_get(comment_pos->lnum) + comment_pos->col,
++ lead_start, lead_start_len) != 0)
++ continue;
++ }
++ if (start_off != 0)
++ amount += start_off;
++ else if (start_align == COM_RIGHT)
++ amount += vim_strsize(lead_start)
++ - vim_strsize(lead_middle);
++ break;
++ }
++
++ /* If our line starts with the end comment string, line it up
++ * with the middle comment */
++ if (STRNCMP(theline, lead_middle, lead_middle_len) != 0
++ && STRNCMP(theline, lead_end, STRLEN(lead_end)) == 0)
++ {
++ amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
++ /* XXX */
++ if (off != 0)
++ amount += off;
++ else if (align == COM_RIGHT)
++ amount += vim_strsize(lead_start)
++ - vim_strsize(lead_middle);
++ done = TRUE;
++ break;
++ }
++ }
++ }
++
++ /* If our line starts with an asterisk, line up with the
++ * asterisk in the comment opener; otherwise, line up
++ * with the first character of the comment text.
++ */
++ if (done)
++ ;
++ else if (theline[0] == '*')
++ amount += 1;
++ else
++ {
++ /*
++ * If we are more than one line away from the comment opener, take
++ * the indent of the previous non-empty line. If 'cino' has "CO"
++ * and we are just below the comment opener and there are any
++ * white characters after it line up with the text after it;
++ * otherwise, add the amount specified by "c" in 'cino'
++ */
++ amount = -1;
++ for (lnum = cur_curpos.lnum - 1; lnum > comment_pos->lnum; --lnum)
++ {
++ if (linewhite(lnum)) /* skip blank lines */
++ continue;
++ amount = get_indent_lnum(lnum); /* XXX */
++ break;
++ }
++ if (amount == -1) /* use the comment opener */
++ {
++ if (!curbuf->b_ind_in_comment2)
++ {
++ start = ml_get(comment_pos->lnum);
++ look = start + comment_pos->col + 2; /* skip / and * */
++ if (*look != NUL) /* if something after it */
++ comment_pos->col = (colnr_T)(skipwhite(look) - start);
++ }
++ getvcol(curwin, comment_pos, &col, NULL, NULL);
++ amount = col;
++ if (curbuf->b_ind_in_comment2 || *look == NUL)
++ amount += curbuf->b_ind_in_comment;
++ }
++ }
++ goto theend;
++ }
++
++ /*
++ * Are we looking at a ']' that has a match?
++ */
++ if (*skipwhite(theline) == ']'
++ && (trypos = find_match_char('[', curbuf->b_ind_maxparen)) != NULL)
++ {
++ /* align with the line containing the '['. */
++ amount = get_indent_lnum(trypos->lnum);
++ goto theend;
++ }
++
++ /*
++ * Are we inside parentheses or braces?
++ */ /* XXX */
++ if (((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL
++ && curbuf->b_ind_java == 0)
++ || (tryposBrace = find_start_brace()) != NULL
++ || trypos != NULL)
++ {
++ if (trypos != NULL && tryposBrace != NULL)
++ {
++ /* Both an unmatched '(' and '{' is found. Use the one which is
++ * closer to the current cursor position, set the other to NULL. */
++ if (trypos->lnum != tryposBrace->lnum
++ ? trypos->lnum < tryposBrace->lnum
++ : trypos->col < tryposBrace->col)
++ trypos = NULL;
++ else
++ tryposBrace = NULL;
++ }
++
++ if (trypos != NULL)
++ {
++ /*
++ * If the matching paren is more than one line away, use the indent of
++ * a previous non-empty line that matches the same paren.
++ */
++ if (theline[0] == ')' && curbuf->b_ind_paren_prev)
++ {
++ /* Line up with the start of the matching paren line. */
++ amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */
++ }
++ else
++ {
++ amount = -1;
++ our_paren_pos = *trypos;
++ for (lnum = cur_curpos.lnum - 1; lnum > our_paren_pos.lnum; --lnum)
++ {
++ l = skipwhite(ml_get(lnum));
++ if (cin_nocode(l)) /* skip comment lines */
++ continue;
++ if (cin_ispreproc_cont(&l, &lnum, &amount))
++ continue; /* ignore #define, #if, etc. */
++ curwin->w_cursor.lnum = lnum;
++
++ /* Skip a comment or raw string. XXX */
++ if ((trypos = ind_find_start_CORS(NULL)) != NULL)
++ {
++ lnum = trypos->lnum + 1;
++ continue;
++ }
++
++ /* XXX */
++ if ((trypos = find_match_paren(
++ corr_ind_maxparen(&cur_curpos))) != NULL
++ && trypos->lnum == our_paren_pos.lnum
++ && trypos->col == our_paren_pos.col)
++ {
++ amount = get_indent_lnum(lnum); /* XXX */
++
++ if (theline[0] == ')')
++ {
++ if (our_paren_pos.lnum != lnum
++ && cur_amount > amount)
++ cur_amount = amount;
++ amount = -1;
++ }
++ break;
++ }
++ }
++ }
++
++ /*
++ * Line up with line where the matching paren is. XXX
++ * If the line starts with a '(' or the indent for unclosed
++ * parentheses is zero, line up with the unclosed parentheses.
++ */
++ if (amount == -1)
++ {
++ int ignore_paren_col = 0;
++ int is_if_for_while = 0;
++
++ if (curbuf->b_ind_if_for_while)
++ {
++ /* Look for the outermost opening parenthesis on this line
++ * and check whether it belongs to an "if", "for" or "while". */
++
++ pos_T cursor_save = curwin->w_cursor;
++ pos_T outermost;
++ char_u *line;
++
++ trypos = &our_paren_pos;
++ do {
++ outermost = *trypos;
++ curwin->w_cursor.lnum = outermost.lnum;
++ curwin->w_cursor.col = outermost.col;
++
++ trypos = find_match_paren(curbuf->b_ind_maxparen);
++ } while (trypos && trypos->lnum == outermost.lnum);
++
++ curwin->w_cursor = cursor_save;
++
++ line = ml_get(outermost.lnum);
++
++ is_if_for_while =
++ cin_is_if_for_while_before_offset(line, &outermost.col);
++ }
++
++ amount = skip_label(our_paren_pos.lnum, &look);
++ look = skipwhite(look);
++ if (*look == '(')
++ {
++ linenr_T save_lnum = curwin->w_cursor.lnum;
++ char_u *line;
++ int look_col;
++
++ /* Ignore a '(' in front of the line that has a match before
++ * our matching '('. */
++ curwin->w_cursor.lnum = our_paren_pos.lnum;
++ line = ml_get_curline();
++ look_col = (int)(look - line);
++ curwin->w_cursor.col = look_col + 1;
++ if ((trypos = findmatchlimit(NULL, ')', 0,
++ curbuf->b_ind_maxparen))
++ != NULL
++ && trypos->lnum == our_paren_pos.lnum
++ && trypos->col < our_paren_pos.col)
++ ignore_paren_col = trypos->col + 1;
++
++ curwin->w_cursor.lnum = save_lnum;
++ look = ml_get(our_paren_pos.lnum) + look_col;
++ }
++ if (theline[0] == ')' || (curbuf->b_ind_unclosed == 0
++ && is_if_for_while == 0)
++ || (!curbuf->b_ind_unclosed_noignore && *look == '('
++ && ignore_paren_col == 0))
++ {
++ /*
++ * If we're looking at a close paren, line up right there;
++ * otherwise, line up with the next (non-white) character.
++ * When b_ind_unclosed_wrapped is set and the matching paren is
++ * the last nonwhite character of the line, use either the
++ * indent of the current line or the indentation of the next
++ * outer paren and add b_ind_unclosed_wrapped (for very long
++ * lines).
++ */
++ if (theline[0] != ')')
++ {
++ cur_amount = MAXCOL;
++ l = ml_get(our_paren_pos.lnum);
++ if (curbuf->b_ind_unclosed_wrapped
++ && cin_ends_in(l, (char_u *)"(", NULL))
++ {
++ /* look for opening unmatched paren, indent one level
++ * for each additional level */
++ n = 1;
++ for (col = 0; col < our_paren_pos.col; ++col)
++ {
++ switch (l[col])
++ {
++ case '(':
++ case '{': ++n;
++ break;
++
++ case ')':
++ case '}': if (n > 1)
++ --n;
++ break;
++ }
++ }
++
++ our_paren_pos.col = 0;
++ amount += n * curbuf->b_ind_unclosed_wrapped;
++ }
++ else if (curbuf->b_ind_unclosed_whiteok)
++ our_paren_pos.col++;
++ else
++ {
++ col = our_paren_pos.col + 1;
++ while (VIM_ISWHITE(l[col]))
++ col++;
++ if (l[col] != NUL) /* In case of trailing space */
++ our_paren_pos.col = col;
++ else
++ our_paren_pos.col++;
++ }
++ }
++
++ /*
++ * Find how indented the paren is, or the character after it
++ * if we did the above "if".
++ */
++ if (our_paren_pos.col > 0)
++ {
++ getvcol(curwin, &our_paren_pos, &col, NULL, NULL);
++ if (cur_amount > (int)col)
++ cur_amount = col;
++ }
++ }
++
++ if (theline[0] == ')' && curbuf->b_ind_matching_paren)
++ {
++ /* Line up with the start of the matching paren line. */
++ }
++ else if ((curbuf->b_ind_unclosed == 0 && is_if_for_while == 0)
++ || (!curbuf->b_ind_unclosed_noignore
++ && *look == '(' && ignore_paren_col == 0))
++ {
++ if (cur_amount != MAXCOL)
++ amount = cur_amount;
++ }
++ else
++ {
++ /* Add b_ind_unclosed2 for each '(' before our matching one,
++ * but ignore (void) before the line (ignore_paren_col). */
++ col = our_paren_pos.col;
++ while ((int)our_paren_pos.col > ignore_paren_col)
++ {
++ --our_paren_pos.col;
++ switch (*ml_get_pos(&our_paren_pos))
++ {
++ case '(': amount += curbuf->b_ind_unclosed2;
++ col = our_paren_pos.col;
++ break;
++ case ')': amount -= curbuf->b_ind_unclosed2;
++ col = MAXCOL;
++ break;
++ }
++ }
++
++ /* Use b_ind_unclosed once, when the first '(' is not inside
++ * braces */
++ if (col == MAXCOL)
++ amount += curbuf->b_ind_unclosed;
++ else
++ {
++ curwin->w_cursor.lnum = our_paren_pos.lnum;
++ curwin->w_cursor.col = col;
++ if (find_match_paren_after_brace(curbuf->b_ind_maxparen)
++ != NULL)
++ amount += curbuf->b_ind_unclosed2;
++ else
++ {
++ if (is_if_for_while)
++ amount += curbuf->b_ind_if_for_while;
++ else
++ amount += curbuf->b_ind_unclosed;
++ }
++ }
++ /*
++ * For a line starting with ')' use the minimum of the two
++ * positions, to avoid giving it more indent than the previous
++ * lines:
++ * func_long_name( if (x
++ * arg && yy
++ * ) ^ not here ) ^ not here
++ */
++ if (cur_amount < amount)
++ amount = cur_amount;
++ }
++ }
++
++ /* add extra indent for a comment */
++ if (cin_iscomment(theline))
++ amount += curbuf->b_ind_comment;
++ }
++ else
++ {
++ /*
++ * We are inside braces, there is a { before this line at the position
++ * stored in tryposBrace.
++ * Make a copy of tryposBrace, it may point to pos_copy inside
++ * find_start_brace(), which may be changed somewhere.
++ */
++ tryposCopy = *tryposBrace;
++ tryposBrace = &tryposCopy;
++ trypos = tryposBrace;
++ ourscope = trypos->lnum;
++ start = ml_get(ourscope);
++
++ /*
++ * Now figure out how indented the line is in general.
++ * If the brace was at the start of the line, we use that;
++ * otherwise, check out the indentation of the line as
++ * a whole and then add the "imaginary indent" to that.
++ */
++ look = skipwhite(start);
++ if (*look == '{')
++ {
++ getvcol(curwin, trypos, &col, NULL, NULL);
++ amount = col;
++ if (*start == '{')
++ start_brace = BRACE_IN_COL0;
++ else
++ start_brace = BRACE_AT_START;
++ }
++ else
++ {
++ /* That opening brace might have been on a continuation
++ * line. if so, find the start of the line. */
++ curwin->w_cursor.lnum = ourscope;
++
++ /* Position the cursor over the rightmost paren, so that
++ * matching it will take us back to the start of the line. */
++ lnum = ourscope;
++ if (find_last_paren(start, '(', ')')
++ && (trypos = find_match_paren(curbuf->b_ind_maxparen))
++ != NULL)
++ lnum = trypos->lnum;
++
++ /* It could have been something like
++ * case 1: if (asdf &&
++ * ldfd) {
++ * }
++ */
++ if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
++ && cin_iscase(skipwhite(ml_get_curline()), FALSE))
++ amount = get_indent();
++ else if (curbuf->b_ind_js)
++ amount = get_indent_lnum(lnum);
++ else
++ amount = skip_label(lnum, &l);
++
++ start_brace = BRACE_AT_END;
++ }
++
++ /* For Javascript check if the line starts with "key:". */
++ if (curbuf->b_ind_js)
++ js_cur_has_key = cin_has_js_key(theline);
++
++ /*
++ * If we're looking at a closing brace, that's where
++ * we want to be. otherwise, add the amount of room
++ * that an indent is supposed to be.
++ */
++ if (theline[0] == '}')
++ {
++ /*
++ * they may want closing braces to line up with something
++ * other than the open brace. indulge them, if so.
++ */
++ amount += curbuf->b_ind_close_extra;
++ }
++ else
++ {
++ /*
++ * If we're looking at an "else", try to find an "if"
++ * to match it with.
++ * If we're looking at a "while", try to find a "do"
++ * to match it with.
++ */
++ lookfor = LOOKFOR_INITIAL;
++ if (cin_iselse(theline))
++ lookfor = LOOKFOR_IF;
++ else if (cin_iswhileofdo(theline, cur_curpos.lnum)) /* XXX */
++ lookfor = LOOKFOR_DO;
++ if (lookfor != LOOKFOR_INITIAL)
++ {
++ curwin->w_cursor.lnum = cur_curpos.lnum;
++ if (find_match(lookfor, ourscope) == OK)
++ {
++ amount = get_indent(); /* XXX */
++ goto theend;
++ }
++ }
++
++ /*
++ * We get here if we are not on an "while-of-do" or "else" (or
++ * failed to find a matching "if").
++ * Search backwards for something to line up with.
++ * First set amount for when we don't find anything.
++ */
++
++ /*
++ * if the '{' is _really_ at the left margin, use the imaginary
++ * location of a left-margin brace. Otherwise, correct the
++ * location for b_ind_open_extra.
++ */
++
++ if (start_brace == BRACE_IN_COL0) /* '{' is in column 0 */
++ {
++ amount = curbuf->b_ind_open_left_imag;
++ lookfor_cpp_namespace = TRUE;
++ }
++ else if (start_brace == BRACE_AT_START &&
++ lookfor_cpp_namespace) /* '{' is at start */
++ {
++
++ lookfor_cpp_namespace = TRUE;
++ }
++ else
++ {
++ if (start_brace == BRACE_AT_END) /* '{' is at end of line */
++ {
++ amount += curbuf->b_ind_open_imag;
++
++ l = skipwhite(ml_get_curline());
++ if (cin_is_cpp_namespace(l))
++ amount += curbuf->b_ind_cpp_namespace;
++ else if (cin_is_cpp_extern_c(l))
++ amount += curbuf->b_ind_cpp_extern_c;
++ }
++ else
++ {
++ /* Compensate for adding b_ind_open_extra later. */
++ amount -= curbuf->b_ind_open_extra;
++ if (amount < 0)
++ amount = 0;
++ }
++ }
++
++ lookfor_break = FALSE;
++
++ if (cin_iscase(theline, FALSE)) /* it's a switch() label */
++ {
++ lookfor = LOOKFOR_CASE; /* find a previous switch() label */
++ amount += curbuf->b_ind_case;
++ }
++ else if (cin_isscopedecl(theline)) /* private:, ... */
++ {
++ lookfor = LOOKFOR_SCOPEDECL; /* class decl is this block */
++ amount += curbuf->b_ind_scopedecl;
++ }
++ else
++ {
++ if (curbuf->b_ind_case_break && cin_isbreak(theline))
++ /* break; ... */
++ lookfor_break = TRUE;
++
++ lookfor = LOOKFOR_INITIAL;
++ /* b_ind_level from start of block */
++ amount += curbuf->b_ind_level;
++ }
++ scope_amount = amount;
++ whilelevel = 0;
++
++ /*
++ * Search backwards. If we find something we recognize, line up
++ * with that.
++ *
++ * If we're looking at an open brace, indent
++ * the usual amount relative to the conditional
++ * that opens the block.
++ */
++ curwin->w_cursor = cur_curpos;
++ for (;;)
++ {
++ curwin->w_cursor.lnum--;
++ curwin->w_cursor.col = 0;
++
++ /*
++ * If we went all the way back to the start of our scope, line
++ * up with it.
++ */
++ if (curwin->w_cursor.lnum <= ourscope)
++ {
++ /* We reached end of scope:
++ * If looking for a enum or structure initialization
++ * go further back:
++ * If it is an initializer (enum xxx or xxx =), then
++ * don't add ind_continuation, otherwise it is a variable
++ * declaration:
++ * int x,
++ * here; <-- add ind_continuation
++ */
++ if (lookfor == LOOKFOR_ENUM_OR_INIT)
++ {
++ if (curwin->w_cursor.lnum == 0
++ || curwin->w_cursor.lnum
++ < ourscope - curbuf->b_ind_maxparen)
++ {
++ /* nothing found (abuse curbuf->b_ind_maxparen as
++ * limit) assume terminated line (i.e. a variable
++ * initialization) */
++ if (cont_amount > 0)
++ amount = cont_amount;
++ else if (!curbuf->b_ind_js)
++ amount += ind_continuation;
++ break;
++ }
++
++ l = ml_get_curline();
++
++ /*
++ * If we're in a comment or raw string now, skip to
++ * the start of it.
++ */
++ trypos = ind_find_start_CORS(NULL);
++ if (trypos != NULL)
++ {
++ curwin->w_cursor.lnum = trypos->lnum + 1;
++ curwin->w_cursor.col = 0;
++ continue;
++ }
++
++ /*
++ * Skip preprocessor directives and blank lines.
++ */
++ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum,
++ &amount))
++ continue;
++
++ if (cin_nocode(l))
++ continue;
++
++ terminated = cin_isterminated(l, FALSE, TRUE);
++
++ /*
++ * If we are at top level and the line looks like a
++ * function declaration, we are done
++ * (it's a variable declaration).
++ */
++ if (start_brace != BRACE_IN_COL0
++ || !cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
++ {
++ /* if the line is terminated with another ','
++ * it is a continued variable initialization.
++ * don't add extra indent.
++ * TODO: does not work, if a function
++ * declaration is split over multiple lines:
++ * cin_isfuncdecl returns FALSE then.
++ */
++ if (terminated == ',')
++ break;
++
++ /* if it es a enum declaration or an assignment,
++ * we are done.
++ */
++ if (terminated != ';' && cin_isinit())
++ break;
++
++ /* nothing useful found */
++ if (terminated == 0 || terminated == '{')
++ continue;
++ }
++
++ if (terminated != ';')
++ {
++ /* Skip parens and braces. Position the cursor
++ * over the rightmost paren, so that matching it
++ * will take us back to the start of the line.
++ */ /* XXX */
++ trypos = NULL;
++ if (find_last_paren(l, '(', ')'))
++ trypos = find_match_paren(
++ curbuf->b_ind_maxparen);
++
++ if (trypos == NULL && find_last_paren(l, '{', '}'))
++ trypos = find_start_brace();
++
++ if (trypos != NULL)
++ {
++ curwin->w_cursor.lnum = trypos->lnum + 1;
++ curwin->w_cursor.col = 0;
++ continue;
++ }
++ }
++
++ /* it's a variable declaration, add indentation
++ * like in
++ * int a,
++ * b;
++ */
++ if (cont_amount > 0)
++ amount = cont_amount;
++ else
++ amount += ind_continuation;
++ }
++ else if (lookfor == LOOKFOR_UNTERM)
++ {
++ if (cont_amount > 0)
++ amount = cont_amount;
++ else
++ amount += ind_continuation;
++ }
++ else
++ {
++ if (lookfor != LOOKFOR_TERM
++ && lookfor != LOOKFOR_CPP_BASECLASS
++ && lookfor != LOOKFOR_COMMA)
++ {
++ amount = scope_amount;
++ if (theline[0] == '{')
++ {
++ amount += curbuf->b_ind_open_extra;
++ added_to_amount = curbuf->b_ind_open_extra;
++ }
++ }
++
++ if (lookfor_cpp_namespace)
++ {
++ /*
++ * Looking for C++ namespace, need to look further
++ * back.
++ */
++ if (curwin->w_cursor.lnum == ourscope)
++ continue;
++
++ if (curwin->w_cursor.lnum == 0
++ || curwin->w_cursor.lnum
++ < ourscope - FIND_NAMESPACE_LIM)
++ break;
++
++ l = ml_get_curline();
++
++ /* If we're in a comment or raw string now, skip
++ * to the start of it. */
++ trypos = ind_find_start_CORS(NULL);
++ if (trypos != NULL)
++ {
++ curwin->w_cursor.lnum = trypos->lnum + 1;
++ curwin->w_cursor.col = 0;
++ continue;
++ }
++
++ /* Skip preprocessor directives and blank lines. */
++ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum,
++ &amount))
++ continue;
++
++ /* Finally the actual check for "namespace". */
++ if (cin_is_cpp_namespace(l))
++ {
++ amount += curbuf->b_ind_cpp_namespace
++ - added_to_amount;
++ break;
++ }
++ else if (cin_is_cpp_extern_c(l))
++ {
++ amount += curbuf->b_ind_cpp_extern_c
++ - added_to_amount;
++ break;
++ }
++
++ if (cin_nocode(l))
++ continue;
++ }
++ }
++ break;
++ }
++
++ /*
++ * If we're in a comment or raw string now, skip to the start
++ * of it.
++ */ /* XXX */
++ if ((trypos = ind_find_start_CORS(&raw_string_start)) != NULL)
++ {
++ curwin->w_cursor.lnum = trypos->lnum + 1;
++ curwin->w_cursor.col = 0;
++ continue;
++ }
++
++ l = ml_get_curline();
++
++ /*
++ * If this is a switch() label, may line up relative to that.
++ * If this is a C++ scope declaration, do the same.
++ */
++ iscase = cin_iscase(l, FALSE);
++ if (iscase || cin_isscopedecl(l))
++ {
++ /* we are only looking for cpp base class
++ * declaration/initialization any longer */
++ if (lookfor == LOOKFOR_CPP_BASECLASS)
++ break;
++
++ /* When looking for a "do" we are not interested in
++ * labels. */
++ if (whilelevel > 0)
++ continue;
++
++ /*
++ * case xx:
++ * c = 99 + <- this indent plus continuation
++ *-> here;
++ */
++ if (lookfor == LOOKFOR_UNTERM
++ || lookfor == LOOKFOR_ENUM_OR_INIT)
++ {
++ if (cont_amount > 0)
++ amount = cont_amount;
++ else
++ amount += ind_continuation;
++ break;
++ }
++
++ /*
++ * case xx: <- line up with this case
++ * x = 333;
++ * case yy:
++ */
++ if ( (iscase && lookfor == LOOKFOR_CASE)
++ || (iscase && lookfor_break)
++ || (!iscase && lookfor == LOOKFOR_SCOPEDECL))
++ {
++ /*
++ * Check that this case label is not for another
++ * switch()
++ */ /* XXX */
++ if ((trypos = find_start_brace()) == NULL
++ || trypos->lnum == ourscope)
++ {
++ amount = get_indent(); /* XXX */
++ break;
++ }
++ continue;
++ }
++
++ n = get_indent_nolabel(curwin->w_cursor.lnum); /* XXX */
++
++ /*
++ * case xx: if (cond) <- line up with this if
++ * y = y + 1;
++ * -> s = 99;
++ *
++ * case xx:
++ * if (cond) <- line up with this line
++ * y = y + 1;
++ * -> s = 99;
++ */
++ if (lookfor == LOOKFOR_TERM)
++ {
++ if (n)
++ amount = n;
++
++ if (!lookfor_break)
++ break;
++ }
++
++ /*
++ * case xx: x = x + 1; <- line up with this x
++ * -> y = y + 1;
++ *
++ * case xx: if (cond) <- line up with this if
++ * -> y = y + 1;
++ */
++ if (n)
++ {
++ amount = n;
++ l = after_label(ml_get_curline());
++ if (l != NULL && cin_is_cinword(l))
++ {
++ if (theline[0] == '{')
++ amount += curbuf->b_ind_open_extra;
++ else
++ amount += curbuf->b_ind_level
++ + curbuf->b_ind_no_brace;
++ }
++ break;
++ }
++
++ /*
++ * Try to get the indent of a statement before the switch
++ * label. If nothing is found, line up relative to the
++ * switch label.
++ * break; <- may line up with this line
++ * case xx:
++ * -> y = 1;
++ */
++ scope_amount = get_indent() + (iscase /* XXX */
++ ? curbuf->b_ind_case_code
++ : curbuf->b_ind_scopedecl_code);
++ lookfor = curbuf->b_ind_case_break
++ ? LOOKFOR_NOBREAK : LOOKFOR_ANY;
++ continue;
++ }
++
++ /*
++ * Looking for a switch() label or C++ scope declaration,
++ * ignore other lines, skip {}-blocks.
++ */
++ if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
++ {
++ if (find_last_paren(l, '{', '}')
++ && (trypos = find_start_brace()) != NULL)
++ {
++ curwin->w_cursor.lnum = trypos->lnum + 1;
++ curwin->w_cursor.col = 0;
++ }
++ continue;
++ }
++
++ /*
++ * Ignore jump labels with nothing after them.
++ */
++ if (!curbuf->b_ind_js && cin_islabel())
++ {
++ l = after_label(ml_get_curline());
++ if (l == NULL || cin_nocode(l))
++ continue;
++ }
++
++ /*
++ * Ignore #defines, #if, etc.
++ * Ignore comment and empty lines.
++ * (need to get the line again, cin_islabel() may have
++ * unlocked it)
++ */
++ l = ml_get_curline();
++ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount)
++ || cin_nocode(l))
++ continue;
++
++ /*
++ * Are we at the start of a cpp base class declaration or
++ * constructor initialization?
++ */ /* XXX */
++ n = FALSE;
++ if (lookfor != LOOKFOR_TERM && curbuf->b_ind_cpp_baseclass > 0)
++ {
++ n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
++ l = ml_get_curline();
++ }
++ if (n)
++ {
++ if (lookfor == LOOKFOR_UNTERM)
++ {
++ if (cont_amount > 0)
++ amount = cont_amount;
++ else
++ amount += ind_continuation;
++ }
++ else if (theline[0] == '{')
++ {
++ /* Need to find start of the declaration. */
++ lookfor = LOOKFOR_UNTERM;
++ ind_continuation = 0;
++ continue;
++ }
++ else
++ /* XXX */
++ amount = get_baseclass_amount(
++ cache_cpp_baseclass.lpos.col);
++ break;
++ }
++ else if (lookfor == LOOKFOR_CPP_BASECLASS)
++ {
++ /* only look, whether there is a cpp base class
++ * declaration or initialization before the opening brace.
++ */
++ if (cin_isterminated(l, TRUE, FALSE))
++ break;
++ else
++ continue;
++ }
++
++ /*
++ * What happens next depends on the line being terminated.
++ * If terminated with a ',' only consider it terminating if
++ * there is another unterminated statement behind, eg:
++ * 123,
++ * sizeof
++ * here
++ * Otherwise check whether it is a enumeration or structure
++ * initialisation (not indented) or a variable declaration
++ * (indented).
++ */
++ terminated = cin_isterminated(l, FALSE, TRUE);
++
++ if (js_cur_has_key)
++ {
++ js_cur_has_key = 0; /* only check the first line */
++ if (curbuf->b_ind_js && terminated == ',')
++ {
++ /* For Javascript we might be inside an object:
++ * key: something, <- align with this
++ * key: something
++ * or:
++ * key: something + <- align with this
++ * something,
++ * key: something
++ */
++ lookfor = LOOKFOR_JS_KEY;
++ }
++ }
++ if (lookfor == LOOKFOR_JS_KEY && cin_has_js_key(l))
++ {
++ amount = get_indent();
++ break;
++ }
++ if (lookfor == LOOKFOR_COMMA)
++ {
++ if (tryposBrace != NULL && tryposBrace->lnum
++ >= curwin->w_cursor.lnum)
++ break;
++ if (terminated == ',')
++ /* line below current line is the one that starts a
++ * (possibly broken) line ending in a comma. */
++ break;
++ else
++ {
++ amount = get_indent();
++ if (curwin->w_cursor.lnum - 1 == ourscope)
++ /* line above is start of the scope, thus current
++ * line is the one that stars a (possibly broken)
++ * line ending in a comma. */
++ break;
++ }
++ }
++
++ if (terminated == 0 || (lookfor != LOOKFOR_UNTERM
++ && terminated == ','))
++ {
++ if (lookfor != LOOKFOR_ENUM_OR_INIT &&
++ (*skipwhite(l) == '[' || l[STRLEN(l) - 1] == '['))
++ amount += ind_continuation;
++ /*
++ * if we're in the middle of a paren thing,
++ * go back to the line that starts it so
++ * we can get the right prevailing indent
++ * if ( foo &&
++ * bar )
++ */
++ /*
++ * Position the cursor over the rightmost paren, so that
++ * matching it will take us back to the start of the line.
++ * Ignore a match before the start of the block.
++ */
++ (void)find_last_paren(l, '(', ')');
++ trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
++ if (trypos != NULL && (trypos->lnum < tryposBrace->lnum
++ || (trypos->lnum == tryposBrace->lnum
++ && trypos->col < tryposBrace->col)))
++ trypos = NULL;
++
++ /*
++ * If we are looking for ',', we also look for matching
++ * braces.
++ */
++ if (trypos == NULL && terminated == ','
++ && find_last_paren(l, '{', '}'))
++ trypos = find_start_brace();
++
++ if (trypos != NULL)
++ {
++ /*
++ * Check if we are on a case label now. This is
++ * handled above.
++ * case xx: if ( asdf &&
++ * asdf)
++ */
++ curwin->w_cursor = *trypos;
++ l = ml_get_curline();
++ if (cin_iscase(l, FALSE) || cin_isscopedecl(l))
++ {
++ ++curwin->w_cursor.lnum;
++ curwin->w_cursor.col = 0;
++ continue;
++ }
++ }
++
++ /*
++ * Skip over continuation lines to find the one to get the
++ * indent from
++ * char *usethis = "bla\
++ * bla",
++ * here;
++ */
++ if (terminated == ',')
++ {
++ while (curwin->w_cursor.lnum > 1)
++ {
++ l = ml_get(curwin->w_cursor.lnum - 1);
++ if (*l == NUL || l[STRLEN(l) - 1] != '\\')
++ break;
++ --curwin->w_cursor.lnum;
++ curwin->w_cursor.col = 0;
++ }
++ }
++
++ /*
++ * Get indent and pointer to text for current line,
++ * ignoring any jump label. XXX
++ */
++ if (curbuf->b_ind_js)
++ cur_amount = get_indent();
++ else
++ cur_amount = skip_label(curwin->w_cursor.lnum, &l);
++ /*
++ * If this is just above the line we are indenting, and it
++ * starts with a '{', line it up with this line.
++ * while (not)
++ * -> {
++ * }
++ */
++ if (terminated != ',' && lookfor != LOOKFOR_TERM
++ && theline[0] == '{')
++ {
++ amount = cur_amount;
++ /*
++ * Only add b_ind_open_extra when the current line
++ * doesn't start with a '{', which must have a match
++ * in the same line (scope is the same). Probably:
++ * { 1, 2 },
++ * -> { 3, 4 }
++ */
++ if (*skipwhite(l) != '{')
++ amount += curbuf->b_ind_open_extra;
++
++ if (curbuf->b_ind_cpp_baseclass && !curbuf->b_ind_js)
++ {
++ /* have to look back, whether it is a cpp base
++ * class declaration or initialization */
++ lookfor = LOOKFOR_CPP_BASECLASS;
++ continue;
++ }
++ break;
++ }
++
++ /*
++ * Check if we are after an "if", "while", etc.
++ * Also allow " } else".
++ */
++ if (cin_is_cinword(l) || cin_iselse(skipwhite(l)))
++ {
++ /*
++ * Found an unterminated line after an if (), line up
++ * with the last one.
++ * if (cond)
++ * 100 +
++ * -> here;
++ */
++ if (lookfor == LOOKFOR_UNTERM
++ || lookfor == LOOKFOR_ENUM_OR_INIT)
++ {
++ if (cont_amount > 0)
++ amount = cont_amount;
++ else
++ amount += ind_continuation;
++ break;
++ }
++
++ /*
++ * If this is just above the line we are indenting, we
++ * are finished.
++ * while (not)
++ * -> here;
++ * Otherwise this indent can be used when the line
++ * before this is terminated.
++ * yyy;
++ * if (stat)
++ * while (not)
++ * xxx;
++ * -> here;
++ */
++ amount = cur_amount;
++ if (theline[0] == '{')
++ amount += curbuf->b_ind_open_extra;
++ if (lookfor != LOOKFOR_TERM)
++ {
++ amount += curbuf->b_ind_level
++ + curbuf->b_ind_no_brace;
++ break;
++ }
++
++ /*
++ * Special trick: when expecting the while () after a
++ * do, line up with the while()
++ * do
++ * x = 1;
++ * -> here
++ */
++ l = skipwhite(ml_get_curline());
++ if (cin_isdo(l))
++ {
++ if (whilelevel == 0)
++ break;
++ --whilelevel;
++ }
++
++ /*
++ * When searching for a terminated line, don't use the
++ * one between the "if" and the matching "else".
++ * Need to use the scope of this "else". XXX
++ * If whilelevel != 0 continue looking for a "do {".
++ */
++ if (cin_iselse(l) && whilelevel == 0)
++ {
++ /* If we're looking at "} else", let's make sure we
++ * find the opening brace of the enclosing scope,
++ * not the one from "if () {". */
++ if (*l == '}')
++ curwin->w_cursor.col =
++ (colnr_T)(l - ml_get_curline()) + 1;
++
++ if ((trypos = find_start_brace()) == NULL
++ || find_match(LOOKFOR_IF, trypos->lnum)
++ == FAIL)
++ break;
++ }
++ }
++
++ /*
++ * If we're below an unterminated line that is not an
++ * "if" or something, we may line up with this line or
++ * add something for a continuation line, depending on
++ * the line before this one.
++ */
++ else
++ {
++ /*
++ * Found two unterminated lines on a row, line up with
++ * the last one.
++ * c = 99 +
++ * 100 +
++ * -> here;
++ */
++ if (lookfor == LOOKFOR_UNTERM)
++ {
++ /* When line ends in a comma add extra indent */
++ if (terminated == ',')
++ amount += ind_continuation;
++ break;
++ }
++
++ if (lookfor == LOOKFOR_ENUM_OR_INIT)
++ {
++ /* Found two lines ending in ',', lineup with the
++ * lowest one, but check for cpp base class
++ * declaration/initialization, if it is an
++ * opening brace or we are looking just for
++ * enumerations/initializations. */
++ if (terminated == ',')
++ {
++ if (curbuf->b_ind_cpp_baseclass == 0)
++ break;
++
++ lookfor = LOOKFOR_CPP_BASECLASS;
++ continue;
++ }
++
++ /* Ignore unterminated lines in between, but
++ * reduce indent. */
++ if (amount > cur_amount)
++ amount = cur_amount;
++ }
++ else
++ {
++ /*
++ * Found first unterminated line on a row, may
++ * line up with this line, remember its indent
++ * 100 +
++ * -> here;
++ */
++ l = ml_get_curline();
++ amount = cur_amount;
++
++ n = (int)STRLEN(l);
++ if (terminated == ',' && (*skipwhite(l) == ']'
++ || (n >=2 && l[n - 2] == ']')))
++ break;
++
++ /*
++ * If previous line ends in ',', check whether we
++ * are in an initialization or enum
++ * struct xxx =
++ * {
++ * sizeof a,
++ * 124 };
++ * or a normal possible continuation line.
++ * but only, of no other statement has been found
++ * yet.
++ */
++ if (lookfor == LOOKFOR_INITIAL && terminated == ',')
++ {
++ if (curbuf->b_ind_js)
++ {
++ /* Search for a line ending in a comma
++ * and line up with the line below it
++ * (could be the current line).
++ * some = [
++ * 1, <- line up here
++ * 2,
++ * some = [
++ * 3 + <- line up here
++ * 4 *
++ * 5,
++ * 6,
++ */
++ if (cin_iscomment(skipwhite(l)))
++ break;
++ lookfor = LOOKFOR_COMMA;
++ trypos = find_match_char('[',
++ curbuf->b_ind_maxparen);
++ if (trypos != NULL)
++ {
++ if (trypos->lnum
++ == curwin->w_cursor.lnum - 1)
++ {
++ /* Current line is first inside
++ * [], line up with it. */
++ break;
++ }
++ ourscope = trypos->lnum;
++ }
++ }
++ else
++ {
++ lookfor = LOOKFOR_ENUM_OR_INIT;
++ cont_amount = cin_first_id_amount();
++ }
++ }
++ else
++ {
++ if (lookfor == LOOKFOR_INITIAL
++ && *l != NUL
++ && l[STRLEN(l) - 1] == '\\')
++ /* XXX */
++ cont_amount = cin_get_equal_amount(
++ curwin->w_cursor.lnum);
++ if (lookfor != LOOKFOR_TERM
++ && lookfor != LOOKFOR_JS_KEY
++ && lookfor != LOOKFOR_COMMA
++ && raw_string_start != curwin->w_cursor.lnum)
++ lookfor = LOOKFOR_UNTERM;
++ }
++ }
++ }
++ }
++
++ /*
++ * Check if we are after a while (cond);
++ * If so: Ignore until the matching "do".
++ */
++ else if (cin_iswhileofdo_end(terminated)) /* XXX */
++ {
++ /*
++ * Found an unterminated line after a while ();, line up
++ * with the last one.
++ * while (cond);
++ * 100 + <- line up with this one
++ * -> here;
++ */
++ if (lookfor == LOOKFOR_UNTERM
++ || lookfor == LOOKFOR_ENUM_OR_INIT)
++ {
++ if (cont_amount > 0)
++ amount = cont_amount;
++ else
++ amount += ind_continuation;
++ break;
++ }
++
++ if (whilelevel == 0)
++ {
++ lookfor = LOOKFOR_TERM;
++ amount = get_indent(); /* XXX */
++ if (theline[0] == '{')
++ amount += curbuf->b_ind_open_extra;
++ }
++ ++whilelevel;
++ }
++
++ /*
++ * We are after a "normal" statement.
++ * If we had another statement we can stop now and use the
++ * indent of that other statement.
++ * Otherwise the indent of the current statement may be used,
++ * search backwards for the next "normal" statement.
++ */
++ else
++ {
++ /*
++ * Skip single break line, if before a switch label. It
++ * may be lined up with the case label.
++ */
++ if (lookfor == LOOKFOR_NOBREAK
++ && cin_isbreak(skipwhite(ml_get_curline())))
++ {
++ lookfor = LOOKFOR_ANY;
++ continue;
++ }
++
++ /*
++ * Handle "do {" line.
++ */
++ if (whilelevel > 0)
++ {
++ l = cin_skipcomment(ml_get_curline());
++ if (cin_isdo(l))
++ {
++ amount = get_indent(); /* XXX */
++ --whilelevel;
++ continue;
++ }
++ }
++
++ /*
++ * Found a terminated line above an unterminated line. Add
++ * the amount for a continuation line.
++ * x = 1;
++ * y = foo +
++ * -> here;
++ * or
++ * int x = 1;
++ * int foo,
++ * -> here;
++ */
++ if (lookfor == LOOKFOR_UNTERM
++ || lookfor == LOOKFOR_ENUM_OR_INIT)
++ {
++ if (cont_amount > 0)
++ amount = cont_amount;
++ else
++ amount += ind_continuation;
++ break;
++ }
++
++ /*
++ * Found a terminated line above a terminated line or "if"
++ * etc. line. Use the amount of the line below us.
++ * x = 1; x = 1;
++ * if (asdf) y = 2;
++ * while (asdf) ->here;
++ * here;
++ * ->foo;
++ */
++ if (lookfor == LOOKFOR_TERM)
++ {
++ if (!lookfor_break && whilelevel == 0)
++ break;
++ }
++
++ /*
++ * First line above the one we're indenting is terminated.
++ * To know what needs to be done look further backward for
++ * a terminated line.
++ */
++ else
++ {
++ /*
++ * position the cursor over the rightmost paren, so
++ * that matching it will take us back to the start of
++ * the line. Helps for:
++ * func(asdr,
++ * asdfasdf);
++ * here;
++ */
++ term_again:
++ l = ml_get_curline();
++ if (find_last_paren(l, '(', ')')
++ && (trypos = find_match_paren(
++ curbuf->b_ind_maxparen)) != NULL)
++ {
++ /*
++ * Check if we are on a case label now. This is
++ * handled above.
++ * case xx: if ( asdf &&
++ * asdf)
++ */
++ curwin->w_cursor = *trypos;
++ l = ml_get_curline();
++ if (cin_iscase(l, FALSE) || cin_isscopedecl(l))
++ {
++ ++curwin->w_cursor.lnum;
++ curwin->w_cursor.col = 0;
++ continue;
++ }
++ }
++
++ /* When aligning with the case statement, don't align
++ * with a statement after it.
++ * case 1: { <-- don't use this { position
++ * stat;
++ * }
++ * case 2:
++ * stat;
++ * }
++ */
++ iscase = (curbuf->b_ind_keep_case_label
++ && cin_iscase(l, FALSE));
++
++ /*
++ * Get indent and pointer to text for current line,
++ * ignoring any jump label.
++ */
++ amount = skip_label(curwin->w_cursor.lnum, &l);
++
++ if (theline[0] == '{')
++ amount += curbuf->b_ind_open_extra;
++ /* See remark above: "Only add b_ind_open_extra.." */
++ l = skipwhite(l);
++ if (*l == '{')
++ amount -= curbuf->b_ind_open_extra;
++ lookfor = iscase ? LOOKFOR_ANY : LOOKFOR_TERM;
++
++ /*
++ * When a terminated line starts with "else" skip to
++ * the matching "if":
++ * else 3;
++ * indent this;
++ * Need to use the scope of this "else". XXX
++ * If whilelevel != 0 continue looking for a "do {".
++ */
++ if (lookfor == LOOKFOR_TERM
++ && *l != '}'
++ && cin_iselse(l)
++ && whilelevel == 0)
++ {
++ if ((trypos = find_start_brace()) == NULL
++ || find_match(LOOKFOR_IF, trypos->lnum)
++ == FAIL)
++ break;
++ continue;
++ }
++
++ /*
++ * If we're at the end of a block, skip to the start of
++ * that block.
++ */
++ l = ml_get_curline();
++ if (find_last_paren(l, '{', '}') /* XXX */
++ && (trypos = find_start_brace()) != NULL)
++ {
++ curwin->w_cursor = *trypos;
++ /* if not "else {" check for terminated again */
++ /* but skip block for "} else {" */
++ l = cin_skipcomment(ml_get_curline());
++ if (*l == '}' || !cin_iselse(l))
++ goto term_again;
++ ++curwin->w_cursor.lnum;
++ curwin->w_cursor.col = 0;
++ }
++ }
++ }
++ }
++ }
++ }
++
++ /* add extra indent for a comment */
++ if (cin_iscomment(theline))
++ amount += curbuf->b_ind_comment;
++
++ /* subtract extra left-shift for jump labels */
++ if (curbuf->b_ind_jump_label > 0 && original_line_islabel)
++ amount -= curbuf->b_ind_jump_label;
++
++ goto theend;
++ }
++
++ /*
++ * ok -- we're not inside any sort of structure at all!
++ *
++ * This means we're at the top level, and everything should
++ * basically just match where the previous line is, except
++ * for the lines immediately following a function declaration,
++ * which are K&R-style parameters and need to be indented.
++ *
++ * if our line starts with an open brace, forget about any
++ * prevailing indent and make sure it looks like the start
++ * of a function
++ */
++
++ if (theline[0] == '{')
++ {
++ amount = curbuf->b_ind_first_open;
++ goto theend;
++ }
++
++ /*
++ * If the NEXT line is a function declaration, the current
++ * line needs to be indented as a function type spec.
++ * Don't do this if the current line looks like a comment or if the
++ * current line is terminated, ie. ends in ';', or if the current line
++ * contains { or }: "void f() {\n if (1)"
++ */
++ if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
++ && !cin_nocode(theline)
++ && vim_strchr(theline, '{') == NULL
++ && vim_strchr(theline, '}') == NULL
++ && !cin_ends_in(theline, (char_u *)":", NULL)
++ && !cin_ends_in(theline, (char_u *)",", NULL)
++ && cin_isfuncdecl(NULL, cur_curpos.lnum + 1,
++ cur_curpos.lnum + 1)
++ && !cin_isterminated(theline, FALSE, TRUE))
++ {
++ amount = curbuf->b_ind_func_type;
++ goto theend;
++ }
++
++ /* search backwards until we find something we recognize */
++ amount = 0;
++ curwin->w_cursor = cur_curpos;
++ while (curwin->w_cursor.lnum > 1)
++ {
++ curwin->w_cursor.lnum--;
++ curwin->w_cursor.col = 0;
++
++ l = ml_get_curline();
++
++ /*
++ * If we're in a comment or raw string now, skip to the start
++ * of it.
++ */ /* XXX */
++ if ((trypos = ind_find_start_CORS(NULL)) != NULL)
++ {
++ curwin->w_cursor.lnum = trypos->lnum + 1;
++ curwin->w_cursor.col = 0;
++ continue;
++ }
++
++ /*
++ * Are we at the start of a cpp base class declaration or
++ * constructor initialization?
++ */ /* XXX */
++ n = FALSE;
++ if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{')
++ {
++ n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
++ l = ml_get_curline();
++ }
++ if (n)
++ {
++ /* XXX */
++ amount = get_baseclass_amount(cache_cpp_baseclass.lpos.col);
++ break;
++ }
++
++ /*
++ * Skip preprocessor directives and blank lines.
++ */
++ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount))
++ continue;
++
++ if (cin_nocode(l))
++ continue;
++
++ /*
++ * If the previous line ends in ',', use one level of
++ * indentation:
++ * int foo,
++ * bar;
++ * do this before checking for '}' in case of eg.
++ * enum foobar
++ * {
++ * ...
++ * } foo,
++ * bar;
++ */
++ n = 0;
++ if (cin_ends_in(l, (char_u *)",", NULL)
++ || (*l != NUL && (n = l[STRLEN(l) - 1]) == '\\'))
++ {
++ /* take us back to opening paren */
++ if (find_last_paren(l, '(', ')')
++ && (trypos = find_match_paren(
++ curbuf->b_ind_maxparen)) != NULL)
++ curwin->w_cursor = *trypos;
++
++ /* For a line ending in ',' that is a continuation line go
++ * back to the first line with a backslash:
++ * char *foo = "bla\
++ * bla",
++ * here;
++ */
++ while (n == 0 && curwin->w_cursor.lnum > 1)
++ {
++ l = ml_get(curwin->w_cursor.lnum - 1);
++ if (*l == NUL || l[STRLEN(l) - 1] != '\\')
++ break;
++ --curwin->w_cursor.lnum;
++ curwin->w_cursor.col = 0;
++ }
++
++ amount = get_indent(); /* XXX */
++
++ if (amount == 0)
++ amount = cin_first_id_amount();
++ if (amount == 0)
++ amount = ind_continuation;
++ break;
++ }
++
++ /*
++ * If the line looks like a function declaration, and we're
++ * not in a comment, put it the left margin.
++ */
++ if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0)) /* XXX */
++ break;
++ l = ml_get_curline();
++
++ /*
++ * Finding the closing '}' of a previous function. Put
++ * current line at the left margin. For when 'cino' has "fs".
++ */
++ if (*skipwhite(l) == '}')
++ break;
++
++ /* (matching {)
++ * If the previous line ends on '};' (maybe followed by
++ * comments) align at column 0. For example:
++ * char *string_array[] = { "foo",
++ * / * x * / "b};ar" }; / * foobar * /
++ */
++ if (cin_ends_in(l, (char_u *)"};", NULL))
++ break;
++
++ /*
++ * If the previous line ends on '[' we are probably in an
++ * array constant:
++ * something = [
++ * 234, <- extra indent
++ */
++ if (cin_ends_in(l, (char_u *)"[", NULL))
++ {
++ amount = get_indent() + ind_continuation;
++ break;
++ }
++
++ /*
++ * Find a line only has a semicolon that belongs to a previous
++ * line ending in '}', e.g. before an #endif. Don't increase
++ * indent then.
++ */
++ if (*(look = skipwhite(l)) == ';' && cin_nocode(look + 1))
++ {
++ pos_T curpos_save = curwin->w_cursor;
++
++ while (curwin->w_cursor.lnum > 1)
++ {
++ look = ml_get(--curwin->w_cursor.lnum);
++ if (!(cin_nocode(look) || cin_ispreproc_cont(
++ &look, &curwin->w_cursor.lnum, &amount)))
++ break;
++ }
++ if (curwin->w_cursor.lnum > 0
++ && cin_ends_in(look, (char_u *)"}", NULL))
++ break;
++
++ curwin->w_cursor = curpos_save;
++ }
++
++ /*
++ * If the PREVIOUS line is a function declaration, the current
++ * line (and the ones that follow) needs to be indented as
++ * parameters.
++ */
++ if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
++ {
++ amount = curbuf->b_ind_param;
++ break;
++ }
++
++ /*
++ * If the previous line ends in ';' and the line before the
++ * previous line ends in ',' or '\', ident to column zero:
++ * int foo,
++ * bar;
++ * indent_to_0 here;
++ */
++ if (cin_ends_in(l, (char_u *)";", NULL))
++ {
++ l = ml_get(curwin->w_cursor.lnum - 1);
++ if (cin_ends_in(l, (char_u *)",", NULL)
++ || (*l != NUL && l[STRLEN(l) - 1] == '\\'))
++ break;
++ l = ml_get_curline();
++ }
++
++ /*
++ * Doesn't look like anything interesting -- so just
++ * use the indent of this line.
++ *
++ * Position the cursor over the rightmost paren, so that
++ * matching it will take us back to the start of the line.
++ */
++ find_last_paren(l, '(', ')');
++
++ if ((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
++ curwin->w_cursor = *trypos;
++ amount = get_indent(); /* XXX */
++ break;
++ }
++
++ /* add extra indent for a comment */
++ if (cin_iscomment(theline))
++ amount += curbuf->b_ind_comment;
++
++ /* add extra indent if the previous line ended in a backslash:
++ * "asdfasdf\
++ * here";
++ * char *foo = "asdf\
++ * here";
++ */
++ if (cur_curpos.lnum > 1)
++ {
++ l = ml_get(cur_curpos.lnum - 1);
++ if (*l != NUL && l[STRLEN(l) - 1] == '\\')
++ {
++ cur_amount = cin_get_equal_amount(cur_curpos.lnum - 1);
++ if (cur_amount > 0)
++ amount = cur_amount;
++ else if (cur_amount == 0)
++ amount += ind_continuation;
++ }
++ }
++
++ theend:
++ if (amount < 0)
++ amount = 0;
++
++ laterend:
++ /* put the cursor back where it belongs */
++ curwin->w_cursor = cur_curpos;
++
++ vim_free(linecopy);
++
++ return amount;
++ }
++
++ static int
++ find_match(int lookfor, linenr_T ourscope)
++ {
++ char_u *look;
++ pos_T *theirscope;
++ char_u *mightbeif;
++ int elselevel;
++ int whilelevel;
++
++ if (lookfor == LOOKFOR_IF)
++ {
++ elselevel = 1;
++ whilelevel = 0;
++ }
++ else
++ {
++ elselevel = 0;
++ whilelevel = 1;
++ }
++
++ curwin->w_cursor.col = 0;
++
++ while (curwin->w_cursor.lnum > ourscope + 1)
++ {
++ curwin->w_cursor.lnum--;
++ curwin->w_cursor.col = 0;
++
++ look = cin_skipcomment(ml_get_curline());
++ if (cin_iselse(look)
++ || cin_isif(look)
++ || cin_isdo(look) /* XXX */
++ || cin_iswhileofdo(look, curwin->w_cursor.lnum))
++ {
++ /*
++ * if we've gone outside the braces entirely,
++ * we must be out of scope...
++ */
++ theirscope = find_start_brace(); /* XXX */
++ if (theirscope == NULL)
++ break;
++
++ /*
++ * and if the brace enclosing this is further
++ * back than the one enclosing the else, we're
++ * out of luck too.
++ */
++ if (theirscope->lnum < ourscope)
++ break;
++
++ /*
++ * and if they're enclosed in a *deeper* brace,
++ * then we can ignore it because it's in a
++ * different scope...
++ */
++ if (theirscope->lnum > ourscope)
++ continue;
++
++ /*
++ * if it was an "else" (that's not an "else if")
++ * then we need to go back to another if, so
++ * increment elselevel
++ */
++ look = cin_skipcomment(ml_get_curline());
++ if (cin_iselse(look))
++ {
++ mightbeif = cin_skipcomment(look + 4);
++ if (!cin_isif(mightbeif))
++ ++elselevel;
++ continue;
++ }
++
++ /*
++ * if it was a "while" then we need to go back to
++ * another "do", so increment whilelevel. XXX
++ */
++ if (cin_iswhileofdo(look, curwin->w_cursor.lnum))
++ {
++ ++whilelevel;
++ continue;
++ }
++
++ /* If it's an "if" decrement elselevel */
++ look = cin_skipcomment(ml_get_curline());
++ if (cin_isif(look))
++ {
++ elselevel--;
++ /*
++ * When looking for an "if" ignore "while"s that
++ * get in the way.
++ */
++ if (elselevel == 0 && lookfor == LOOKFOR_IF)
++ whilelevel = 0;
++ }
++
++ /* If it's a "do" decrement whilelevel */
++ if (cin_isdo(look))
++ whilelevel--;
++
++ /*
++ * if we've used up all the elses, then
++ * this must be the if that we want!
++ * match the indent level of that if.
++ */
++ if (elselevel <= 0 && whilelevel <= 0)
++ {
++ return OK;
++ }
++ }
++ }
++ return FAIL;
++ }
++
++ # if defined(FEAT_EVAL) || defined(PROTO)
++ /*
++ * Get indent level from 'indentexpr'.
++ */
++ int
++ get_expr_indent(void)
++ {
++ int indent = -1;
++ char_u *inde_copy;
++ pos_T save_pos;
++ colnr_T save_curswant;
++ int save_set_curswant;
++ int save_State;
++ int use_sandbox = was_set_insecurely((char_u *)"indentexpr",
++ OPT_LOCAL);
++
++ /* Save and restore cursor position and curswant, in case it was changed
++ * via :normal commands */
++ save_pos = curwin->w_cursor;
++ save_curswant = curwin->w_curswant;
++ save_set_curswant = curwin->w_set_curswant;
++ set_vim_var_nr(VV_LNUM, curwin->w_cursor.lnum);
++ if (use_sandbox)
++ ++sandbox;
++ ++textlock;
++
++ /* Need to make a copy, the 'indentexpr' option could be changed while
++ * evaluating it. */
++ inde_copy = vim_strsave(curbuf->b_p_inde);
++ if (inde_copy != NULL)
++ {
++ indent = (int)eval_to_number(inde_copy);
++ vim_free(inde_copy);
++ }
++
++ if (use_sandbox)
++ --sandbox;
++ --textlock;
++
++ /* Restore the cursor position so that 'indentexpr' doesn't need to.
++ * Pretend to be in Insert mode, allow cursor past end of line for "o"
++ * command. */
++ save_State = State;
++ State = INSERT;
++ curwin->w_cursor = save_pos;
++ curwin->w_curswant = save_curswant;
++ curwin->w_set_curswant = save_set_curswant;
++ check_cursor();
++ State = save_State;
++
++ /* If there is an error, just keep the current indent. */
++ if (indent < 0)
++ indent = get_indent();
++
++ return indent;
++ }
++ # endif
++
++ /*
++ * return TRUE if 'cinkeys' contains the key "keytyped",
++ * when == '*': Only if key is preceded with '*' (indent before insert)
++ * when == '!': Only if key is preceded with '!' (don't insert)
++ * when == ' ': Only if key is not preceded with '*'(indent afterwards)
++ *
++ * "keytyped" can have a few special values:
++ * KEY_OPEN_FORW
++ * KEY_OPEN_BACK
++ * KEY_COMPLETE just finished completion.
++ *
++ * If line_is_empty is TRUE accept keys with '0' before them.
++ */
++ int
++ in_cinkeys(
++ int keytyped,
++ int when,
++ int line_is_empty)
++ {
++ char_u *look;
++ int try_match;
++ int try_match_word;
++ char_u *p;
++ char_u *line;
++ int icase;
++ int i;
++
++ if (keytyped == NUL)
++ /* Can happen with CTRL-Y and CTRL-E on a short line. */
++ return FALSE;
++
++ #ifdef FEAT_EVAL
++ if (*curbuf->b_p_inde != NUL)
++ look = curbuf->b_p_indk; /* 'indentexpr' set: use 'indentkeys' */
++ else
++ #endif
++ look = curbuf->b_p_cink; /* 'indentexpr' empty: use 'cinkeys' */
++ while (*look)
++ {
++ /*
++ * Find out if we want to try a match with this key, depending on
++ * 'when' and a '*' or '!' before the key.
++ */
++ switch (when)
++ {
++ case '*': try_match = (*look == '*'); break;
++ case '!': try_match = (*look == '!'); break;
++ default: try_match = (*look != '*'); break;
++ }
++ if (*look == '*' || *look == '!')
++ ++look;
++
++ /*
++ * If there is a '0', only accept a match if the line is empty.
++ * But may still match when typing last char of a word.
++ */
++ if (*look == '0')
++ {
++ try_match_word = try_match;
++ if (!line_is_empty)
++ try_match = FALSE;
++ ++look;
++ }
++ else
++ try_match_word = FALSE;
++
++ /*
++ * does it look like a control character?
++ */
++ if (*look == '^'
++ #ifdef EBCDIC
++ && (Ctrl_chr(look[1]) != 0)
++ #else
++ && look[1] >= '?' && look[1] <= '_'
++ #endif
++ )
++ {
++ if (try_match && keytyped == Ctrl_chr(look[1]))
++ return TRUE;
++ look += 2;
++ }
++ /*
++ * 'o' means "o" command, open forward.
++ * 'O' means "O" command, open backward.
++ */
++ else if (*look == 'o')
++ {
++ if (try_match && keytyped == KEY_OPEN_FORW)
++ return TRUE;
++ ++look;
++ }
++ else if (*look == 'O')
++ {
++ if (try_match && keytyped == KEY_OPEN_BACK)
++ return TRUE;
++ ++look;
++ }
++
++ /*
++ * 'e' means to check for "else" at start of line and just before the
++ * cursor.
++ */
++ else if (*look == 'e')
++ {
++ if (try_match && keytyped == 'e' && curwin->w_cursor.col >= 4)
++ {
++ p = ml_get_curline();
++ if (skipwhite(p) == p + curwin->w_cursor.col - 4 &&
++ STRNCMP(p + curwin->w_cursor.col - 4, "else", 4) == 0)
++ return TRUE;
++ }
++ ++look;
++ }
++
++ /*
++ * ':' only causes an indent if it is at the end of a label or case
++ * statement, or when it was before typing the ':' (to fix
++ * class::method for C++).
++ */
++ else if (*look == ':')
++ {
++ if (try_match && keytyped == ':')
++ {
++ p = ml_get_curline();
++ if (cin_iscase(p, FALSE) || cin_isscopedecl(p) || cin_islabel())
++ return TRUE;
++ /* Need to get the line again after cin_islabel(). */
++ p = ml_get_curline();
++ if (curwin->w_cursor.col > 2
++ && p[curwin->w_cursor.col - 1] == ':'
++ && p[curwin->w_cursor.col - 2] == ':')
++ {
++ p[curwin->w_cursor.col - 1] = ' ';
++ i = (cin_iscase(p, FALSE) || cin_isscopedecl(p)
++ || cin_islabel());
++ p = ml_get_curline();
++ p[curwin->w_cursor.col - 1] = ':';
++ if (i)
++ return TRUE;
++ }
++ }
++ ++look;
++ }
++
++
++ /*
++ * Is it a key in <>, maybe?
++ */
++ else if (*look == '<')
++ {
++ if (try_match)
++ {
++ /*
++ * make up some named keys <o>, <O>, <e>, <0>, <>>, <<>, <*>,
++ * <:> and <!> so that people can re-indent on o, O, e, 0, <,
++ * >, *, : and ! keys if they really really want to.
++ */
++ if (vim_strchr((char_u *)"<>!*oOe0:", look[1]) != NULL
++ && keytyped == look[1])
++ return TRUE;
++
++ if (keytyped == get_special_key_code(look + 1))
++ return TRUE;
++ }
++ while (*look && *look != '>')
++ look++;
++ while (*look == '>')
++ look++;
++ }
++
++ /*
++ * Is it a word: "=word"?
++ */
++ else if (*look == '=' && look[1] != ',' && look[1] != NUL)
++ {
++ ++look;
++ if (*look == '~')
++ {
++ icase = TRUE;
++ ++look;
++ }
++ else
++ icase = FALSE;
++ p = vim_strchr(look, ',');
++ if (p == NULL)
++ p = look + STRLEN(look);
++ if ((try_match || try_match_word)
++ && curwin->w_cursor.col >= (colnr_T)(p - look))
++ {
++ int match = FALSE;
++
++ #ifdef FEAT_INS_EXPAND
++ if (keytyped == KEY_COMPLETE)
++ {
++ char_u *s;
++
++ /* Just completed a word, check if it starts with "look".
++ * search back for the start of a word. */
++ line = ml_get_curline();
++ if (has_mbyte)
++ {
++ char_u *n;
++
++ for (s = line + curwin->w_cursor.col; s > line; s = n)
++ {
++ n = mb_prevptr(line, s);
++ if (!vim_iswordp(n))
++ break;
++ }
++ }
++ else
++ for (s = line + curwin->w_cursor.col; s > line; --s)
++ if (!vim_iswordc(s[-1]))
++ break;
++ if (s + (p - look) <= line + curwin->w_cursor.col
++ && (icase
++ ? MB_STRNICMP(s, look, p - look)
++ : STRNCMP(s, look, p - look)) == 0)
++ match = TRUE;
++ }
++ else
++ #endif
++ /* TODO: multi-byte */
++ if (keytyped == (int)p[-1] || (icase && keytyped < 256
++ && TOLOWER_LOC(keytyped) == TOLOWER_LOC((int)p[-1])))
++ {
++ line = ml_get_cursor();
++ if ((curwin->w_cursor.col == (colnr_T)(p - look)
++ || !vim_iswordc(line[-(p - look) - 1]))
++ && (icase
++ ? MB_STRNICMP(line - (p - look), look, p - look)
++ : STRNCMP(line - (p - look), look, p - look))
++ == 0)
++ match = TRUE;
++ }
++ if (match && try_match_word && !try_match)
++ {
++ /* "0=word": Check if there are only blanks before the
++ * word. */
++ if (getwhitecols_curline() !=
++ (int)(curwin->w_cursor.col - (p - look)))
++ match = FALSE;
++ }
++ if (match)
++ return TRUE;
++ }
++ look = p;
++ }
++
++ /*
++ * ok, it's a boring generic character.
++ */
++ else
++ {
++ if (try_match && *look == keytyped)
++ return TRUE;
++ if (*look != NUL)
++ ++look;
++ }
++
++ /*
++ * Skip over ", ".
++ */
++ look = skip_to_option_part(look);
++ }
++ return FALSE;
++ }
++ #endif /* FEAT_CINDENT */
++
++ #if defined(FEAT_LISP) || defined(PROTO)
++
++ static int
++ lisp_match(char_u *p)
++ {
++ char_u buf[LSIZE];
++ int len;
++ char_u *word = *curbuf->b_p_lw != NUL ? curbuf->b_p_lw : p_lispwords;
++
++ while (*word != NUL)
++ {
++ (void)copy_option_part(&word, buf, LSIZE, ",");
++ len = (int)STRLEN(buf);
++ if (STRNCMP(buf, p, len) == 0 && p[len] == ' ')
++ return TRUE;
++ }
++ return FALSE;
++ }
++
++ /*
++ * When 'p' is present in 'cpoptions, a Vi compatible method is used.
++ * The incompatible newer method is quite a bit better at indenting
++ * code in lisp-like languages than the traditional one; it's still
++ * mostly heuristics however -- Dirk van Deun, dirk@rave.org
++ *
++ * TODO:
++ * Findmatch() should be adapted for lisp, also to make showmatch
++ * work correctly: now (v5.3) it seems all C/C++ oriented:
++ * - it does not recognize the #\( and #\) notations as character literals
++ * - it doesn't know about comments starting with a semicolon
++ * - it incorrectly interprets '(' as a character literal
++ * All this messes up get_lisp_indent in some rare cases.
++ * Update from Sergey Khorev:
++ * I tried to fix the first two issues.
++ */
++ int
++ get_lisp_indent(void)
++ {
++ pos_T *pos, realpos, paren;
++ int amount;
++ char_u *that;
++ colnr_T col;
++ colnr_T firsttry;
++ int parencount, quotecount;
++ int vi_lisp;
++
++ /* Set vi_lisp to use the vi-compatible method */
++ vi_lisp = (vim_strchr(p_cpo, CPO_LISP) != NULL);
++
++ realpos = curwin->w_cursor;
++ curwin->w_cursor.col = 0;
++
++ if ((pos = findmatch(NULL, '(')) == NULL)
++ pos = findmatch(NULL, '[');
++ else
++ {
++ paren = *pos;
++ pos = findmatch(NULL, '[');
++ if (pos == NULL || LT_POSP(pos, &paren))
++ pos = &paren;
++ }
++ if (pos != NULL)
++ {
++ /* Extra trick: Take the indent of the first previous non-white
++ * line that is at the same () level. */
++ amount = -1;
++ parencount = 0;
++
++ while (--curwin->w_cursor.lnum >= pos->lnum)
++ {
++ if (linewhite(curwin->w_cursor.lnum))
++ continue;
++ for (that = ml_get_curline(); *that != NUL; ++that)
++ {
++ if (*that == ';')
++ {
++ while (*(that + 1) != NUL)
++ ++that;
++ continue;
++ }
++ if (*that == '\\')
++ {
++ if (*(that + 1) != NUL)
++ ++that;
++ continue;
++ }
++ if (*that == '"' && *(that + 1) != NUL)
++ {
++ while (*++that && *that != '"')
++ {
++ /* skipping escaped characters in the string */
++ if (*that == '\\')
++ {
++ if (*++that == NUL)
++ break;
++ if (that[1] == NUL)
++ {
++ ++that;
++ break;
++ }
++ }
++ }
++ }
++ if (*that == '(' || *that == '[')
++ ++parencount;
++ else if (*that == ')' || *that == ']')
++ --parencount;
++ }
++ if (parencount == 0)
++ {
++ amount = get_indent();
++ break;
++ }
++ }
++
++ if (amount == -1)
++ {
++ curwin->w_cursor.lnum = pos->lnum;
++ curwin->w_cursor.col = pos->col;
++ col = pos->col;
++
++ that = ml_get_curline();
++
++ if (vi_lisp && get_indent() == 0)
++ amount = 2;
++ else
++ {
++ char_u *line = that;
++
++ amount = 0;
++ while (*that && col)
++ {
++ amount += lbr_chartabsize_adv(line, &that, (colnr_T)amount);
++ col--;
++ }
++
++ /*
++ * Some keywords require "body" indenting rules (the
++ * non-standard-lisp ones are Scheme special forms):
++ *
++ * (let ((a 1)) instead (let ((a 1))
++ * (...)) of (...))
++ */
++
++ if (!vi_lisp && (*that == '(' || *that == '[')
++ && lisp_match(that + 1))
++ amount += 2;
++ else
++ {
++ that++;
++ amount++;
++ firsttry = amount;
++
++ while (VIM_ISWHITE(*that))
++ {
++ amount += lbr_chartabsize(line, that, (colnr_T)amount);
++ ++that;
++ }
++
++ if (*that && *that != ';') /* not a comment line */
++ {
++ /* test *that != '(' to accommodate first let/do
++ * argument if it is more than one line */
++ if (!vi_lisp && *that != '(' && *that != '[')
++ firsttry++;
++
++ parencount = 0;
++ quotecount = 0;
++
++ if (vi_lisp
++ || (*that != '"'
++ && *that != '\''
++ && *that != '#'
++ && (*that < '0' || *that > '9')))
++ {
++ while (*that
++ && (!VIM_ISWHITE(*that)
++ || quotecount
++ || parencount)
++ && (!((*that == '(' || *that == '[')
++ && !quotecount
++ && !parencount
++ && vi_lisp)))
++ {
++ if (*that == '"')
++ quotecount = !quotecount;
++ if ((*that == '(' || *that == '[')
++ && !quotecount)
++ ++parencount;
++ if ((*that == ')' || *that == ']')
++ && !quotecount)
++ --parencount;
++ if (*that == '\\' && *(that+1) != NUL)
++ amount += lbr_chartabsize_adv(
++ line, &that, (colnr_T)amount);
++ amount += lbr_chartabsize_adv(
++ line, &that, (colnr_T)amount);
++ }
++ }
++ while (VIM_ISWHITE(*that))
++ {
++ amount += lbr_chartabsize(
++ line, that, (colnr_T)amount);
++ that++;
++ }
++ if (!*that || *that == ';')
++ amount = firsttry;
++ }
++ }
++ }
++ }
++ }
++ else
++ amount = 0; /* no matching '(' or '[' found, use zero indent */
++
++ curwin->w_cursor = realpos;
++
++ return amount;
++ }
++ #endif /* FEAT_LISP */
++
++ #if defined(FEAT_CINDENT) || defined(PROTO)
++ /*
++ * Do C or expression indenting on the current line.
++ */
++ void
++ do_c_expr_indent(void)
++ {
++ # ifdef FEAT_EVAL
++ if (*curbuf->b_p_inde != NUL)
++ fixthisline(get_expr_indent);
++ else
++ # endif
++ fixthisline(get_c_indent);
++ }
++ #endif
++
++ #if defined(FEAT_LISP) || defined(FEAT_CINDENT) || defined(PROTO)
++ /*
++ * Re-indent the current line, based on the current contents of it and the
++ * surrounding lines. Fixing the cursor position seems really easy -- I'm very
++ * confused what all the part that handles Control-T is doing that I'm not.
++ * "get_the_indent" should be get_c_indent, get_expr_indent or get_lisp_indent.
++ */
++
++ void
++ fixthisline(int (*get_the_indent)(void))
++ {
++ int amount = get_the_indent();
++
++ if (amount >= 0)
++ {
++ change_indent(INDENT_SET, amount, FALSE, 0, TRUE);
++ if (linewhite(curwin->w_cursor.lnum))
++ did_ai = TRUE; /* delete the indent if the line stays empty */
++ }
++ }
++
++ void
++ fix_indent(void)
++ {
++ if (p_paste)
++ return;
++ # ifdef FEAT_LISP
++ if (curbuf->b_p_lisp && curbuf->b_p_ai)
++ fixthisline(get_lisp_indent);
++ # endif
++ # if defined(FEAT_LISP) && defined(FEAT_CINDENT)
++ else
++ # endif
++ # ifdef FEAT_CINDENT
++ if (cindent_on())
++ do_c_expr_indent();
++ # endif
++ }
++
++ #endif
+*** ../vim-8.1.0856/src/misc1.c 2019-01-26 17:28:22.228599112 +0100
+--- src/misc1.c 2019-01-31 13:43:23.356467234 +0100
+***************
+*** 702,742 ****
+ #endif
+
+
+- #if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT)
+-
+- /*
+- * Return TRUE if the string "line" starts with a word from 'cinwords'.
+- */
+- static int
+- cin_is_cinword(char_u *line)
+- {
+- char_u *cinw;
+- char_u *cinw_buf;
+- int cinw_len;
+- int retval = FALSE;
+- int len;
+-
+- cinw_len = (int)STRLEN(curbuf->b_p_cinw) + 1;
+- cinw_buf = alloc((unsigned)cinw_len);
+- if (cinw_buf != NULL)
+- {
+- line = skipwhite(line);
+- for (cinw = curbuf->b_p_cinw; *cinw; )
+- {
+- len = copy_option_part(&cinw, cinw_buf, cinw_len, ",");
+- if (STRNCMP(line, cinw_buf, len) == 0
+- && (!vim_iswordc(line[len]) || !vim_iswordc(line[len - 1])))
+- {
+- retval = TRUE;
+- break;
+- }
+- }
+- vim_free(cinw_buf);
+- }
+- return retval;
+- }
+- #endif
+-
+ /*
+ * open_line: Add a new line below or above the current line.
+ *
+--- 702,707 ----
+***************
+*** 5404,9720 ****
+ return new_fname;
+ }
+
+- #if defined(FEAT_CINDENT) || defined(FEAT_SYN_HL)
+-
+- static char_u *skip_string(char_u *p);
+- static pos_T *find_start_rawstring(int ind_maxcomment);
+-
+- /*
+- * Find the start of a comment, not knowing if we are in a comment right now.
+- * Search starts at w_cursor.lnum and goes backwards.
+- * Return NULL when not inside a comment.
+- */
+- static pos_T *
+- ind_find_start_comment(void) /* XXX */
+- {
+- return find_start_comment(curbuf->b_ind_maxcomment);
+- }
+-
+- pos_T *
+- find_start_comment(int ind_maxcomment) /* XXX */
+- {
+- pos_T *pos;
+- char_u *line;
+- char_u *p;
+- int cur_maxcomment = ind_maxcomment;
+-
+- for (;;)
+- {
+- pos = findmatchlimit(NULL, '*', FM_BACKWARD, cur_maxcomment);
+- if (pos == NULL)
+- break;
+-
+- /*
+- * Check if the comment start we found is inside a string.
+- * If it is then restrict the search to below this line and try again.
+- */
+- line = ml_get(pos->lnum);
+- for (p = line; *p && (colnr_T)(p - line) < pos->col; ++p)
+- p = skip_string(p);
+- if ((colnr_T)(p - line) <= pos->col)
+- break;
+- cur_maxcomment = curwin->w_cursor.lnum - pos->lnum - 1;
+- if (cur_maxcomment <= 0)
+- {
+- pos = NULL;
+- break;
+- }
+- }
+- return pos;
+- }
+-
+- /*
+- * Find the start of a comment or raw string, not knowing if we are in a
+- * comment or raw string right now.
+- * Search starts at w_cursor.lnum and goes backwards.
+- * If is_raw is given and returns start of raw_string, sets it to true.
+- * Return NULL when not inside a comment or raw string.
+- * "CORS" -> Comment Or Raw String
+- */
+- static pos_T *
+- ind_find_start_CORS(linenr_T *is_raw) /* XXX */
+- {
+- static pos_T comment_pos_copy;
+- pos_T *comment_pos;
+- pos_T *rs_pos;
+-
+- comment_pos = find_start_comment(curbuf->b_ind_maxcomment);
+- if (comment_pos != NULL)
+- {
+- /* Need to make a copy of the static pos in findmatchlimit(),
+- * calling find_start_rawstring() may change it. */
+- comment_pos_copy = *comment_pos;
+- comment_pos = &comment_pos_copy;
+- }
+- rs_pos = find_start_rawstring(curbuf->b_ind_maxcomment);
+-
+- /* If comment_pos is before rs_pos the raw string is inside the comment.
+- * If rs_pos is before comment_pos the comment is inside the raw string. */
+- if (comment_pos == NULL || (rs_pos != NULL
+- && LT_POS(*rs_pos, *comment_pos)))
+- {
+- if (is_raw != NULL && rs_pos != NULL)
+- *is_raw = rs_pos->lnum;
+- return rs_pos;
+- }
+- return comment_pos;
+- }
+-
+- /*
+- * Find the start of a raw string, not knowing if we are in one right now.
+- * Search starts at w_cursor.lnum and goes backwards.
+- * Return NULL when not inside a raw string.
+- */
+- static pos_T *
+- find_start_rawstring(int ind_maxcomment) /* XXX */
+- {
+- pos_T *pos;
+- char_u *line;
+- char_u *p;
+- int cur_maxcomment = ind_maxcomment;
+-
+- for (;;)
+- {
+- pos = findmatchlimit(NULL, 'R', FM_BACKWARD, cur_maxcomment);
+- if (pos == NULL)
+- break;
+-
+- /*
+- * Check if the raw string start we found is inside a string.
+- * If it is then restrict the search to below this line and try again.
+- */
+- line = ml_get(pos->lnum);
+- for (p = line; *p && (colnr_T)(p - line) < pos->col; ++p)
+- p = skip_string(p);
+- if ((colnr_T)(p - line) <= pos->col)
+- break;
+- cur_maxcomment = curwin->w_cursor.lnum - pos->lnum - 1;
+- if (cur_maxcomment <= 0)
+- {
+- pos = NULL;
+- break;
+- }
+- }
+- return pos;
+- }
+-
+- /*
+- * Skip to the end of a "string" and a 'c' character.
+- * If there is no string or character, return argument unmodified.
+- */
+- static char_u *
+- skip_string(char_u *p)
+- {
+- int i;
+-
+- /*
+- * We loop, because strings may be concatenated: "date""time".
+- */
+- for ( ; ; ++p)
+- {
+- if (p[0] == '\'') /* 'c' or '\n' or '\000' */
+- {
+- if (!p[1]) /* ' at end of line */
+- break;
+- i = 2;
+- if (p[1] == '\\') /* '\n' or '\000' */
+- {
+- ++i;
+- while (vim_isdigit(p[i - 1])) /* '\000' */
+- ++i;
+- }
+- if (p[i] == '\'') /* check for trailing ' */
+- {
+- p += i;
+- continue;
+- }
+- }
+- else if (p[0] == '"') /* start of string */
+- {
+- for (++p; p[0]; ++p)
+- {
+- if (p[0] == '\\' && p[1] != NUL)
+- ++p;
+- else if (p[0] == '"') /* end of string */
+- break;
+- }
+- if (p[0] == '"')
+- continue; /* continue for another string */
+- }
+- else if (p[0] == 'R' && p[1] == '"')
+- {
+- /* Raw string: R"[delim](...)[delim]" */
+- char_u *delim = p + 2;
+- char_u *paren = vim_strchr(delim, '(');
+-
+- if (paren != NULL)
+- {
+- size_t delim_len = paren - delim;
+-
+- for (p += 3; *p; ++p)
+- if (p[0] == ')' && STRNCMP(p + 1, delim, delim_len) == 0
+- && p[delim_len + 1] == '"')
+- {
+- p += delim_len + 1;
+- break;
+- }
+- if (p[0] == '"')
+- continue; /* continue for another string */
+- }
+- }
+- break; /* no string found */
+- }
+- if (!*p)
+- --p; /* backup from NUL */
+- return p;
+- }
+- #endif /* FEAT_CINDENT || FEAT_SYN_HL */
+-
+- #if defined(FEAT_CINDENT) || defined(PROTO)
+-
+- /*
+- * Do C or expression indenting on the current line.
+- */
+- void
+- do_c_expr_indent(void)
+- {
+- # ifdef FEAT_EVAL
+- if (*curbuf->b_p_inde != NUL)
+- fixthisline(get_expr_indent);
+- else
+- # endif
+- fixthisline(get_c_indent);
+- }
+-
+- /* Find result cache for cpp_baseclass */
+- typedef struct {
+- int found;
+- lpos_T lpos;
+- } cpp_baseclass_cache_T;
+-
+- /*
+- * Functions for C-indenting.
+- * Most of this originally comes from Eric Fischer.
+- */
+- /*
+- * Below "XXX" means that this function may unlock the current line.
+- */
+-
+- static int cin_isdefault(char_u *);
+- 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_iselse(char_u *);
+- static int cin_ends_in(char_u *, char_u *, char_u *);
+- static int cin_starts_with(char_u *s, char *word);
+- static pos_T *find_match_paren(int);
+- static pos_T *find_match_char(int c, int ind_maxparen);
+- static int find_last_paren(char_u *l, int start, int end);
+- static int find_match(int lookfor, linenr_T ourscope);
+-
+- /*
+- * Skip over white space and C comments within the line.
+- * Also skip over Perl/shell comments if desired.
+- */
+- static char_u *
+- cin_skipcomment(char_u *s)
+- {
+- while (*s)
+- {
+- char_u *prev_s = s;
+-
+- s = skipwhite(s);
+-
+- /* Perl/shell # comment comment continues until eol. Require a space
+- * before # to avoid recognizing $#array. */
+- if (curbuf->b_ind_hash_comment != 0 && s != prev_s && *s == '#')
+- {
+- s += STRLEN(s);
+- break;
+- }
+- if (*s != '/')
+- break;
+- ++s;
+- if (*s == '/') /* slash-slash comment continues till eol */
+- {
+- s += STRLEN(s);
+- break;
+- }
+- if (*s != '*')
+- break;
+- for (++s; *s; ++s) /* skip slash-star comment */
+- if (s[0] == '*' && s[1] == '/')
+- {
+- s += 2;
+- break;
+- }
+- }
+- return s;
+- }
+-
+- /*
+- * Return TRUE if there is no code at *s. White space and comments are
+- * not considered code.
+- */
+- static int
+- cin_nocode(char_u *s)
+- {
+- return *cin_skipcomment(s) == NUL;
+- }
+-
+- /*
+- * Check previous lines for a "//" line comment, skipping over blank lines.
+- */
+- static pos_T *
+- find_line_comment(void) /* XXX */
+- {
+- static pos_T pos;
+- char_u *line;
+- char_u *p;
+-
+- pos = curwin->w_cursor;
+- while (--pos.lnum > 0)
+- {
+- line = ml_get(pos.lnum);
+- p = skipwhite(line);
+- if (cin_islinecomment(p))
+- {
+- pos.col = (int)(p - line);
+- return &pos;
+- }
+- if (*p != NUL)
+- break;
+- }
+- return NULL;
+- }
+-
+- /*
+- * Return TRUE if "text" starts with "key:".
+- */
+- static int
+- cin_has_js_key(char_u *text)
+- {
+- char_u *s = skipwhite(text);
+- int quote = -1;
+-
+- if (*s == '\'' || *s == '"')
+- {
+- /* can be 'key': or "key": */
+- quote = *s;
+- ++s;
+- }
+- if (!vim_isIDc(*s)) /* need at least one ID character */
+- return FALSE;
+-
+- while (vim_isIDc(*s))
+- ++s;
+- if (*s == quote)
+- ++s;
+-
+- s = cin_skipcomment(s);
+-
+- /* "::" is not a label, it's C++ */
+- return (*s == ':' && s[1] != ':');
+- }
+-
+- /*
+- * Check if string matches "label:"; move to character after ':' if true.
+- * "*s" must point to the start of the label, if there is one.
+- */
+- static int
+- cin_islabel_skip(char_u **s)
+- {
+- if (!vim_isIDc(**s)) /* need at least one ID character */
+- return FALSE;
+-
+- while (vim_isIDc(**s))
+- (*s)++;
+-
+- *s = cin_skipcomment(*s);
+-
+- /* "::" is not a label, it's C++ */
+- return (**s == ':' && *++*s != ':');
+- }
+-
+- /*
+- * Recognize a label: "label:".
+- * Note: curwin->w_cursor must be where we are looking for the label.
+- */
+- int
+- cin_islabel(void) /* XXX */
+- {
+- char_u *s;
+-
+- s = cin_skipcomment(ml_get_curline());
+-
+- /*
+- * Exclude "default" from labels, since it should be indented
+- * like a switch label. Same for C++ scope declarations.
+- */
+- if (cin_isdefault(s))
+- return FALSE;
+- if (cin_isscopedecl(s))
+- return FALSE;
+-
+- if (cin_islabel_skip(&s))
+- {
+- /*
+- * Only accept a label if the previous line is terminated or is a case
+- * label.
+- */
+- pos_T cursor_save;
+- pos_T *trypos;
+- char_u *line;
+-
+- cursor_save = curwin->w_cursor;
+- while (curwin->w_cursor.lnum > 1)
+- {
+- --curwin->w_cursor.lnum;
+-
+- /*
+- * If we're in a comment or raw string now, skip to the start of
+- * it.
+- */
+- curwin->w_cursor.col = 0;
+- if ((trypos = ind_find_start_CORS(NULL)) != NULL) /* XXX */
+- curwin->w_cursor = *trypos;
+-
+- line = ml_get_curline();
+- if (cin_ispreproc(line)) /* ignore #defines, #if, etc. */
+- continue;
+- if (*(line = cin_skipcomment(line)) == NUL)
+- continue;
+-
+- curwin->w_cursor = cursor_save;
+- if (cin_isterminated(line, TRUE, FALSE)
+- || cin_isscopedecl(line)
+- || cin_iscase(line, TRUE)
+- || (cin_islabel_skip(&line) && cin_nocode(line)))
+- return TRUE;
+- return FALSE;
+- }
+- curwin->w_cursor = cursor_save;
+- return TRUE; /* label at start of file??? */
+- }
+- return FALSE;
+- }
+-
+- /*
+- * Recognize structure initialization and enumerations:
+- * "[typedef] [static|public|protected|private] enum"
+- * "[typedef] [static|public|protected|private] = {"
+- */
+- static int
+- cin_isinit(void)
+- {
+- char_u *s;
+- static char *skip[] = {"static", "public", "protected", "private"};
+-
+- s = cin_skipcomment(ml_get_curline());
+-
+- if (cin_starts_with(s, "typedef"))
+- s = cin_skipcomment(s + 7);
+-
+- for (;;)
+- {
+- int i, l;
+-
+- for (i = 0; i < (int)(sizeof(skip) / sizeof(char *)); ++i)
+- {
+- l = (int)strlen(skip[i]);
+- if (cin_starts_with(s, skip[i]))
+- {
+- s = cin_skipcomment(s + l);
+- l = 0;
+- break;
+- }
+- }
+- if (l != 0)
+- break;
+- }
+-
+- if (cin_starts_with(s, "enum"))
+- return TRUE;
+-
+- if (cin_ends_in(s, (char_u *)"=", (char_u *)"{"))
+- return TRUE;
+-
+- return FALSE;
+- }
+-
+- /*
+- * Recognize a switch label: "case .*:" or "default:".
+- */
+- int
+- cin_iscase(
+- char_u *s,
+- int strict) /* Allow relaxed check of case statement for JS */
+- {
+- s = cin_skipcomment(s);
+- if (cin_starts_with(s, "case"))
+- {
+- for (s += 4; *s; ++s)
+- {
+- s = cin_skipcomment(s);
+- if (*s == ':')
+- {
+- if (s[1] == ':') /* skip over "::" for C++ */
+- ++s;
+- else
+- return TRUE;
+- }
+- if (*s == '\'' && s[1] && s[2] == '\'')
+- s += 2; /* skip over ':' */
+- else if (*s == '/' && (s[1] == '*' || s[1] == '/'))
+- return FALSE; /* stop at comment */
+- else if (*s == '"')
+- {
+- /* JS etc. */
+- if (strict)
+- return FALSE; /* stop at string */
+- else
+- return TRUE;
+- }
+- }
+- return FALSE;
+- }
+-
+- if (cin_isdefault(s))
+- return TRUE;
+- return FALSE;
+- }
+-
+- /*
+- * Recognize a "default" switch label.
+- */
+- static int
+- cin_isdefault(char_u *s)
+- {
+- return (STRNCMP(s, "default", 7) == 0
+- && *(s = cin_skipcomment(s + 7)) == ':'
+- && s[1] != ':');
+- }
+-
+- /*
+- * Recognize a "public/private/protected" scope declaration label.
+- */
+- int
+- cin_isscopedecl(char_u *s)
+- {
+- int i;
+-
+- s = cin_skipcomment(s);
+- if (STRNCMP(s, "public", 6) == 0)
+- i = 6;
+- else if (STRNCMP(s, "protected", 9) == 0)
+- i = 9;
+- else if (STRNCMP(s, "private", 7) == 0)
+- i = 7;
+- else
+- return FALSE;
+- return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':');
+- }
+-
+- /* Maximum number of lines to search back for a "namespace" line. */
+- #define FIND_NAMESPACE_LIM 20
+-
+- /*
+- * Recognize a "namespace" scope declaration.
+- */
+- static int
+- cin_is_cpp_namespace(char_u *s)
+- {
+- char_u *p;
+- int has_name = FALSE;
+- int has_name_start = FALSE;
+-
+- s = cin_skipcomment(s);
+- if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9])))
+- {
+- p = cin_skipcomment(skipwhite(s + 9));
+- while (*p != NUL)
+- {
+- if (VIM_ISWHITE(*p))
+- {
+- has_name = TRUE; /* found end of a name */
+- p = cin_skipcomment(skipwhite(p));
+- }
+- else if (*p == '{')
+- {
+- break;
+- }
+- else if (vim_iswordc(*p))
+- {
+- has_name_start = TRUE;
+- if (has_name)
+- return FALSE; /* word character after skipping past name */
+- ++p;
+- }
+- else if (p[0] == ':' && p[1] == ':' && vim_iswordc(p[2]))
+- {
+- if (!has_name_start || has_name)
+- return FALSE;
+- /* C++ 17 nested namespace */
+- p += 3;
+- }
+- else
+- {
+- return FALSE;
+- }
+- }
+- return TRUE;
+- }
+- return FALSE;
+- }
+-
+- /*
+- * Recognize a `extern "C"` or `extern "C++"` linkage specifications.
+- */
+- static int
+- cin_is_cpp_extern_c(char_u *s)
+- {
+- char_u *p;
+- int has_string_literal = FALSE;
+-
+- s = cin_skipcomment(s);
+- if (STRNCMP(s, "extern", 6) == 0 && (s[6] == NUL || !vim_iswordc(s[6])))
+- {
+- p = cin_skipcomment(skipwhite(s + 6));
+- while (*p != NUL)
+- {
+- if (VIM_ISWHITE(*p))
+- {
+- p = cin_skipcomment(skipwhite(p));
+- }
+- else if (*p == '{')
+- {
+- break;
+- }
+- else if (p[0] == '"' && p[1] == 'C' && p[2] == '"')
+- {
+- if (has_string_literal)
+- return FALSE;
+- has_string_literal = TRUE;
+- p += 3;
+- }
+- else if (p[0] == '"' && p[1] == 'C' && p[2] == '+' && p[3] == '+'
+- && p[4] == '"')
+- {
+- if (has_string_literal)
+- return FALSE;
+- has_string_literal = TRUE;
+- p += 5;
+- }
+- else
+- {
+- return FALSE;
+- }
+- }
+- return has_string_literal ? TRUE : FALSE;
+- }
+- return FALSE;
+- }
+-
+- /*
+- * Return a pointer to the first non-empty non-comment character after a ':'.
+- * Return NULL if not found.
+- * case 234: a = b;
+- * ^
+- */
+- static char_u *
+- after_label(char_u *l)
+- {
+- for ( ; *l; ++l)
+- {
+- if (*l == ':')
+- {
+- if (l[1] == ':') /* skip over "::" for C++ */
+- ++l;
+- else if (!cin_iscase(l + 1, FALSE))
+- break;
+- }
+- else if (*l == '\'' && l[1] && l[2] == '\'')
+- l += 2; /* skip over 'x' */
+- }
+- if (*l == NUL)
+- return NULL;
+- l = cin_skipcomment(l + 1);
+- if (*l == NUL)
+- return NULL;
+- return l;
+- }
+-
+- /*
+- * Get indent of line "lnum", skipping a label.
+- * Return 0 if there is nothing after the label.
+- */
+- static int
+- get_indent_nolabel (linenr_T lnum) /* XXX */
+- {
+- char_u *l;
+- pos_T fp;
+- colnr_T col;
+- char_u *p;
+-
+- l = ml_get(lnum);
+- p = after_label(l);
+- if (p == NULL)
+- return 0;
+-
+- fp.col = (colnr_T)(p - l);
+- fp.lnum = lnum;
+- getvcol(curwin, &fp, &col, NULL, NULL);
+- return (int)col;
+- }
+-
+- /*
+- * Find indent for line "lnum", ignoring any case or jump label.
+- * Also return a pointer to the text (after the label) in "pp".
+- * label: if (asdf && asdfasdf)
+- * ^
+- */
+- static int
+- skip_label(linenr_T lnum, char_u **pp)
+- {
+- char_u *l;
+- int amount;
+- pos_T cursor_save;
+-
+- cursor_save = curwin->w_cursor;
+- curwin->w_cursor.lnum = lnum;
+- l = ml_get_curline();
+- /* XXX */
+- if (cin_iscase(l, FALSE) || cin_isscopedecl(l) || cin_islabel())
+- {
+- amount = get_indent_nolabel(lnum);
+- l = after_label(ml_get_curline());
+- if (l == NULL) /* just in case */
+- l = ml_get_curline();
+- }
+- else
+- {
+- amount = get_indent();
+- l = ml_get_curline();
+- }
+- *pp = l;
+-
+- curwin->w_cursor = cursor_save;
+- return amount;
+- }
+-
+- /*
+- * Return the indent of the first variable name after a type in a declaration.
+- * int a, indent of "a"
+- * static struct foo b, indent of "b"
+- * enum bla c, indent of "c"
+- * Returns zero when it doesn't look like a declaration.
+- */
+- static int
+- cin_first_id_amount(void)
+- {
+- char_u *line, *p, *s;
+- int len;
+- pos_T fp;
+- colnr_T col;
+-
+- line = ml_get_curline();
+- p = skipwhite(line);
+- len = (int)(skiptowhite(p) - p);
+- if (len == 6 && STRNCMP(p, "static", 6) == 0)
+- {
+- p = skipwhite(p + 6);
+- len = (int)(skiptowhite(p) - p);
+- }
+- if (len == 6 && STRNCMP(p, "struct", 6) == 0)
+- p = skipwhite(p + 6);
+- else if (len == 4 && STRNCMP(p, "enum", 4) == 0)
+- p = skipwhite(p + 4);
+- else if ((len == 8 && STRNCMP(p, "unsigned", 8) == 0)
+- || (len == 6 && STRNCMP(p, "signed", 6) == 0))
+- {
+- s = skipwhite(p + len);
+- if ((STRNCMP(s, "int", 3) == 0 && VIM_ISWHITE(s[3]))
+- || (STRNCMP(s, "long", 4) == 0 && VIM_ISWHITE(s[4]))
+- || (STRNCMP(s, "short", 5) == 0 && VIM_ISWHITE(s[5]))
+- || (STRNCMP(s, "char", 4) == 0 && VIM_ISWHITE(s[4])))
+- p = s;
+- }
+- for (len = 0; vim_isIDc(p[len]); ++len)
+- ;
+- if (len == 0 || !VIM_ISWHITE(p[len]) || cin_nocode(p))
+- return 0;
+-
+- p = skipwhite(p + len);
+- fp.lnum = curwin->w_cursor.lnum;
+- fp.col = (colnr_T)(p - line);
+- getvcol(curwin, &fp, &col, NULL, NULL);
+- return (int)col;
+- }
+-
+- /*
+- * Return the indent of the first non-blank after an equal sign.
+- * char *foo = "here";
+- * Return zero if no (useful) equal sign found.
+- * Return -1 if the line above "lnum" ends in a backslash.
+- * foo = "asdf\
+- * asdf\
+- * here";
+- */
+- static int
+- cin_get_equal_amount(linenr_T lnum)
+- {
+- char_u *line;
+- char_u *s;
+- colnr_T col;
+- pos_T fp;
+-
+- if (lnum > 1)
+- {
+- line = ml_get(lnum - 1);
+- if (*line != NUL && line[STRLEN(line) - 1] == '\\')
+- return -1;
+- }
+-
+- line = s = ml_get(lnum);
+- while (*s != NUL && vim_strchr((char_u *)"=;{}\"'", *s) == NULL)
+- {
+- if (cin_iscomment(s)) /* ignore comments */
+- s = cin_skipcomment(s);
+- else
+- ++s;
+- }
+- if (*s != '=')
+- return 0;
+-
+- s = skipwhite(s + 1);
+- if (cin_nocode(s))
+- return 0;
+-
+- if (*s == '"') /* nice alignment for continued strings */
+- ++s;
+-
+- fp.lnum = lnum;
+- fp.col = (colnr_T)(s - line);
+- getvcol(curwin, &fp, &col, NULL, NULL);
+- return (int)col;
+- }
+-
+- /*
+- * Recognize a preprocessor statement: Any line that starts with '#'.
+- */
+- static int
+- cin_ispreproc(char_u *s)
+- {
+- if (*skipwhite(s) == '#')
+- return TRUE;
+- return FALSE;
+- }
+-
+- /*
+- * Return TRUE if line "*pp" at "*lnump" is a preprocessor statement or a
+- * continuation line of a preprocessor statement. Decrease "*lnump" to the
+- * start and return the line in "*pp".
+- * Put the amount of indent in "*amount".
+- */
+- static int
+- cin_ispreproc_cont(char_u **pp, linenr_T *lnump, int *amount)
+- {
+- char_u *line = *pp;
+- linenr_T lnum = *lnump;
+- int retval = FALSE;
+- int candidate_amount = *amount;
+-
+- if (*line != NUL && line[STRLEN(line) - 1] == '\\')
+- candidate_amount = get_indent_lnum(lnum);
+-
+- for (;;)
+- {
+- if (cin_ispreproc(line))
+- {
+- retval = TRUE;
+- *lnump = lnum;
+- break;
+- }
+- if (lnum == 1)
+- break;
+- line = ml_get(--lnum);
+- if (*line == NUL || line[STRLEN(line) - 1] != '\\')
+- break;
+- }
+-
+- if (lnum != *lnump)
+- *pp = ml_get(*lnump);
+- if (retval)
+- *amount = candidate_amount;
+- return retval;
+- }
+-
+- /*
+- * Recognize the start of a C or C++ comment.
+- */
+- static int
+- cin_iscomment(char_u *p)
+- {
+- return (p[0] == '/' && (p[1] == '*' || p[1] == '/'));
+- }
+-
+- /*
+- * Recognize the start of a "//" comment.
+- */
+- static int
+- cin_islinecomment(char_u *p)
+- {
+- return (p[0] == '/' && p[1] == '/');
+- }
+-
+- /*
+- * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or
+- * '}'.
+- * Don't consider "} else" a terminated line.
+- * If a line begins with an "else", only consider it terminated if no unmatched
+- * opening braces follow (handle "else { foo();" correctly).
+- * Return the character terminating the line (ending char's have precedence if
+- * both apply in order to determine initializations).
+- */
+- static int
+- cin_isterminated(
+- char_u *s,
+- int incl_open, /* include '{' at the end as terminator */
+- int incl_comma) /* recognize a trailing comma */
+- {
+- char_u found_start = 0;
+- unsigned n_open = 0;
+- int is_else = FALSE;
+-
+- s = cin_skipcomment(s);
+-
+- if (*s == '{' || (*s == '}' && !cin_iselse(s)))
+- found_start = *s;
+-
+- if (!found_start)
+- is_else = cin_iselse(s);
+-
+- while (*s)
+- {
+- /* skip over comments, "" strings and 'c'haracters */
+- s = skip_string(cin_skipcomment(s));
+- if (*s == '}' && n_open > 0)
+- --n_open;
+- if ((!is_else || n_open == 0)
+- && (*s == ';' || *s == '}' || (incl_comma && *s == ','))
+- && cin_nocode(s + 1))
+- return *s;
+- else if (*s == '{')
+- {
+- if (incl_open && cin_nocode(s + 1))
+- return *s;
+- else
+- ++n_open;
+- }
+-
+- if (*s)
+- s++;
+- }
+- return found_start;
+- }
+-
+- /*
+- * Recognize the basic picture of a function declaration -- it needs to
+- * have an open paren somewhere and a close paren at the end of the line and
+- * no semicolons anywhere.
+- * When a line ends in a comma we continue looking in the next line.
+- * "sp" points to a string with the line. When looking at other lines it must
+- * be restored to the line. When it's NULL fetch lines here.
+- * "first_lnum" is where we start looking.
+- * "min_lnum" is the line before which we will not be looking.
+- */
+- static int
+- cin_isfuncdecl(
+- char_u **sp,
+- linenr_T first_lnum,
+- linenr_T min_lnum)
+- {
+- char_u *s;
+- linenr_T lnum = first_lnum;
+- linenr_T save_lnum = curwin->w_cursor.lnum;
+- int retval = FALSE;
+- pos_T *trypos;
+- int just_started = TRUE;
+-
+- if (sp == NULL)
+- s = ml_get(lnum);
+- else
+- s = *sp;
+-
+- curwin->w_cursor.lnum = lnum;
+- if (find_last_paren(s, '(', ')')
+- && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
+- {
+- lnum = trypos->lnum;
+- if (lnum < min_lnum)
+- {
+- curwin->w_cursor.lnum = save_lnum;
+- return FALSE;
+- }
+-
+- s = ml_get(lnum);
+- }
+- curwin->w_cursor.lnum = save_lnum;
+-
+- /* Ignore line starting with #. */
+- if (cin_ispreproc(s))
+- return FALSE;
+-
+- while (*s && *s != '(' && *s != ';' && *s != '\'' && *s != '"')
+- {
+- if (cin_iscomment(s)) /* ignore comments */
+- s = cin_skipcomment(s);
+- else if (*s == ':')
+- {
+- if (*(s + 1) == ':')
+- s += 2;
+- else
+- /* To avoid a mistake in the following situation:
+- * A::A(int a, int b)
+- * : a(0) // <--not a function decl
+- * , b(0)
+- * {...
+- */
+- return FALSE;
+- }
+- else
+- ++s;
+- }
+- if (*s != '(')
+- return FALSE; /* ';', ' or " before any () or no '(' */
+-
+- while (*s && *s != ';' && *s != '\'' && *s != '"')
+- {
+- if (*s == ')' && cin_nocode(s + 1))
+- {
+- /* ')' at the end: may have found a match
+- * Check for he previous line not to end in a backslash:
+- * #if defined(x) && \
+- * defined(y)
+- */
+- lnum = first_lnum - 1;
+- s = ml_get(lnum);
+- if (*s == NUL || s[STRLEN(s) - 1] != '\\')
+- retval = TRUE;
+- goto done;
+- }
+- if ((*s == ',' && cin_nocode(s + 1)) || s[1] == NUL || cin_nocode(s))
+- {
+- int comma = (*s == ',');
+-
+- /* ',' at the end: continue looking in the next line.
+- * At the end: check for ',' in the next line, for this style:
+- * func(arg1
+- * , arg2) */
+- for (;;)
+- {
+- if (lnum >= curbuf->b_ml.ml_line_count)
+- break;
+- s = ml_get(++lnum);
+- if (!cin_ispreproc(s))
+- break;
+- }
+- if (lnum >= curbuf->b_ml.ml_line_count)
+- break;
+- /* Require a comma at end of the line or a comma or ')' at the
+- * start of next line. */
+- s = skipwhite(s);
+- if (!just_started && (!comma && *s != ',' && *s != ')'))
+- break;
+- just_started = FALSE;
+- }
+- else if (cin_iscomment(s)) /* ignore comments */
+- s = cin_skipcomment(s);
+- else
+- {
+- ++s;
+- just_started = FALSE;
+- }
+- }
+-
+- done:
+- if (lnum != first_lnum && sp != NULL)
+- *sp = ml_get(first_lnum);
+-
+- return retval;
+- }
+-
+- static int
+- cin_isif(char_u *p)
+- {
+- return (STRNCMP(p, "if", 2) == 0 && !vim_isIDc(p[2]));
+- }
+-
+- static int
+- cin_iselse(
+- char_u *p)
+- {
+- if (*p == '}') /* accept "} else" */
+- p = cin_skipcomment(p + 1);
+- return (STRNCMP(p, "else", 4) == 0 && !vim_isIDc(p[4]));
+- }
+-
+- static int
+- cin_isdo(char_u *p)
+- {
+- return (STRNCMP(p, "do", 2) == 0 && !vim_isIDc(p[2]));
+- }
+-
+- /*
+- * Check if this is a "while" that should have a matching "do".
+- * We only accept a "while (condition) ;", with only white space between the
+- * ')' and ';'. The condition may be spread over several lines.
+- */
+- static int
+- cin_iswhileofdo (char_u *p, linenr_T lnum) /* XXX */
+- {
+- pos_T cursor_save;
+- pos_T *trypos;
+- int retval = FALSE;
+-
+- p = cin_skipcomment(p);
+- if (*p == '}') /* accept "} while (cond);" */
+- p = cin_skipcomment(p + 1);
+- if (cin_starts_with(p, "while"))
+- {
+- cursor_save = curwin->w_cursor;
+- curwin->w_cursor.lnum = lnum;
+- curwin->w_cursor.col = 0;
+- p = ml_get_curline();
+- while (*p && *p != 'w') /* skip any '}', until the 'w' of the "while" */
+- {
+- ++p;
+- ++curwin->w_cursor.col;
+- }
+- if ((trypos = findmatchlimit(NULL, 0, 0,
+- curbuf->b_ind_maxparen)) != NULL
+- && *cin_skipcomment(ml_get_pos(trypos) + 1) == ';')
+- retval = TRUE;
+- curwin->w_cursor = cursor_save;
+- }
+- return retval;
+- }
+-
+- /*
+- * Check whether in "p" there is an "if", "for" or "while" before "*poffset".
+- * Return 0 if there is none.
+- * Otherwise return !0 and update "*poffset" to point to the place where the
+- * string was found.
+- */
+- static int
+- cin_is_if_for_while_before_offset(char_u *line, int *poffset)
+- {
+- int offset = *poffset;
+-
+- if (offset-- < 2)
+- return 0;
+- while (offset > 2 && VIM_ISWHITE(line[offset]))
+- --offset;
+-
+- offset -= 1;
+- if (!STRNCMP(line + offset, "if", 2))
+- goto probablyFound;
+-
+- if (offset >= 1)
+- {
+- offset -= 1;
+- if (!STRNCMP(line + offset, "for", 3))
+- goto probablyFound;
+-
+- if (offset >= 2)
+- {
+- offset -= 2;
+- if (!STRNCMP(line + offset, "while", 5))
+- goto probablyFound;
+- }
+- }
+- return 0;
+-
+- probablyFound:
+- if (!offset || !vim_isIDc(line[offset - 1]))
+- {
+- *poffset = offset;
+- return 1;
+- }
+- return 0;
+- }
+-
+- /*
+- * Return TRUE if we are at the end of a do-while.
+- * do
+- * nothing;
+- * while (foo
+- * && bar); <-- here
+- * Adjust the cursor to the line with "while".
+- */
+- static int
+- cin_iswhileofdo_end(int terminated)
+- {
+- char_u *line;
+- char_u *p;
+- char_u *s;
+- pos_T *trypos;
+- int i;
+-
+- if (terminated != ';') /* there must be a ';' at the end */
+- return FALSE;
+-
+- p = line = ml_get_curline();
+- while (*p != NUL)
+- {
+- p = cin_skipcomment(p);
+- if (*p == ')')
+- {
+- s = skipwhite(p + 1);
+- if (*s == ';' && cin_nocode(s + 1))
+- {
+- /* Found ");" at end of the line, now check there is "while"
+- * before the matching '('. XXX */
+- i = (int)(p - line);
+- curwin->w_cursor.col = i;
+- trypos = find_match_paren(curbuf->b_ind_maxparen);
+- if (trypos != NULL)
+- {
+- s = cin_skipcomment(ml_get(trypos->lnum));
+- if (*s == '}') /* accept "} while (cond);" */
+- s = cin_skipcomment(s + 1);
+- if (cin_starts_with(s, "while"))
+- {
+- curwin->w_cursor.lnum = trypos->lnum;
+- return TRUE;
+- }
+- }
+-
+- /* Searching may have made "line" invalid, get it again. */
+- line = ml_get_curline();
+- p = line + i;
+- }
+- }
+- if (*p != NUL)
+- ++p;
+- }
+- return FALSE;
+- }
+-
+- static int
+- cin_isbreak(char_u *p)
+- {
+- return (STRNCMP(p, "break", 5) == 0 && !vim_isIDc(p[5]));
+- }
+-
+- /*
+- * Find the position of a C++ base-class declaration or
+- * constructor-initialization. eg:
+- *
+- * class MyClass :
+- * baseClass <-- here
+- * class MyClass : public baseClass,
+- * anotherBaseClass <-- here (should probably lineup ??)
+- * MyClass::MyClass(...) :
+- * baseClass(...) <-- here (constructor-initialization)
+- *
+- * This is a lot of guessing. Watch out for "cond ? func() : foo".
+- */
+- static int
+- cin_is_cpp_baseclass(
+- cpp_baseclass_cache_T *cached) /* input and output */
+- {
+- lpos_T *pos = &cached->lpos; /* find position */
+- char_u *s;
+- int class_or_struct, lookfor_ctor_init, cpp_base_class;
+- linenr_T lnum = curwin->w_cursor.lnum;
+- char_u *line = ml_get_curline();
+-
+- if (pos->lnum <= lnum)
+- return cached->found; /* Use the cached result */
+-
+- pos->col = 0;
+-
+- s = skipwhite(line);
+- if (*s == '#') /* skip #define FOO x ? (x) : x */
+- return FALSE;
+- s = cin_skipcomment(s);
+- if (*s == NUL)
+- return FALSE;
+-
+- cpp_base_class = lookfor_ctor_init = class_or_struct = FALSE;
+-
+- /* Search for a line starting with '#', empty, ending in ';' or containing
+- * '{' or '}' and start below it. This handles the following situations:
+- * a = cond ?
+- * func() :
+- * asdf;
+- * func::foo()
+- * : something
+- * {}
+- * Foo::Foo (int one, int two)
+- * : something(4),
+- * somethingelse(3)
+- * {}
+- */
+- while (lnum > 1)
+- {
+- line = ml_get(lnum - 1);
+- s = skipwhite(line);
+- if (*s == '#' || *s == NUL)
+- break;
+- while (*s != NUL)
+- {
+- s = cin_skipcomment(s);
+- if (*s == '{' || *s == '}'
+- || (*s == ';' && cin_nocode(s + 1)))
+- break;
+- if (*s != NUL)
+- ++s;
+- }
+- if (*s != NUL)
+- break;
+- --lnum;
+- }
+-
+- pos->lnum = lnum;
+- line = ml_get(lnum);
+- s = line;
+- for (;;)
+- {
+- if (*s == NUL)
+- {
+- if (lnum == curwin->w_cursor.lnum)
+- break;
+- /* Continue in the cursor line. */
+- line = ml_get(++lnum);
+- s = line;
+- }
+- if (s == line)
+- {
+- /* don't recognize "case (foo):" as a baseclass */
+- if (cin_iscase(s, FALSE))
+- break;
+- s = cin_skipcomment(line);
+- if (*s == NUL)
+- continue;
+- }
+-
+- if (s[0] == '"' || (s[0] == 'R' && s[1] == '"'))
+- s = skip_string(s) + 1;
+- else if (s[0] == ':')
+- {
+- if (s[1] == ':')
+- {
+- /* skip double colon. It can't be a constructor
+- * initialization any more */
+- lookfor_ctor_init = FALSE;
+- s = cin_skipcomment(s + 2);
+- }
+- else if (lookfor_ctor_init || class_or_struct)
+- {
+- /* we have something found, that looks like the start of
+- * cpp-base-class-declaration or constructor-initialization */
+- cpp_base_class = TRUE;
+- lookfor_ctor_init = class_or_struct = FALSE;
+- pos->col = 0;
+- s = cin_skipcomment(s + 1);
+- }
+- else
+- s = cin_skipcomment(s + 1);
+- }
+- else if ((STRNCMP(s, "class", 5) == 0 && !vim_isIDc(s[5]))
+- || (STRNCMP(s, "struct", 6) == 0 && !vim_isIDc(s[6])))
+- {
+- class_or_struct = TRUE;
+- lookfor_ctor_init = FALSE;
+-
+- if (*s == 'c')
+- s = cin_skipcomment(s + 5);
+- else
+- s = cin_skipcomment(s + 6);
+- }
+- else
+- {
+- if (s[0] == '{' || s[0] == '}' || s[0] == ';')
+- {
+- cpp_base_class = lookfor_ctor_init = class_or_struct = FALSE;
+- }
+- else if (s[0] == ')')
+- {
+- /* Constructor-initialization is assumed if we come across
+- * something like "):" */
+- class_or_struct = FALSE;
+- lookfor_ctor_init = TRUE;
+- }
+- else if (s[0] == '?')
+- {
+- /* Avoid seeing '() :' after '?' as constructor init. */
+- return FALSE;
+- }
+- else if (!vim_isIDc(s[0]))
+- {
+- /* if it is not an identifier, we are wrong */
+- class_or_struct = FALSE;
+- lookfor_ctor_init = FALSE;
+- }
+- else if (pos->col == 0)
+- {
+- /* it can't be a constructor-initialization any more */
+- lookfor_ctor_init = FALSE;
+-
+- /* the first statement starts here: lineup with this one... */
+- if (cpp_base_class)
+- pos->col = (colnr_T)(s - line);
+- }
+-
+- /* When the line ends in a comma don't align with it. */
+- if (lnum == curwin->w_cursor.lnum && *s == ',' && cin_nocode(s + 1))
+- pos->col = 0;
+-
+- s = cin_skipcomment(s + 1);
+- }
+- }
+-
+- cached->found = cpp_base_class;
+- if (cpp_base_class)
+- pos->lnum = lnum;
+- return cpp_base_class;
+- }
+-
+- static int
+- get_baseclass_amount(int col)
+- {
+- int amount;
+- colnr_T vcol;
+- pos_T *trypos;
+-
+- if (col == 0)
+- {
+- amount = get_indent();
+- if (find_last_paren(ml_get_curline(), '(', ')')
+- && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
+- amount = get_indent_lnum(trypos->lnum); /* XXX */
+- if (!cin_ends_in(ml_get_curline(), (char_u *)",", NULL))
+- amount += curbuf->b_ind_cpp_baseclass;
+- }
+- else
+- {
+- curwin->w_cursor.col = col;
+- getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
+- amount = (int)vcol;
+- }
+- if (amount < curbuf->b_ind_cpp_baseclass)
+- amount = curbuf->b_ind_cpp_baseclass;
+- return amount;
+- }
+-
+- /*
+- * Return TRUE if string "s" ends with the string "find", possibly followed by
+- * white space and comments. Skip strings and comments.
+- * Ignore "ignore" after "find" if it's not NULL.
+- */
+- static int
+- cin_ends_in(char_u *s, char_u *find, char_u *ignore)
+- {
+- char_u *p = s;
+- char_u *r;
+- int len = (int)STRLEN(find);
+-
+- while (*p != NUL)
+- {
+- p = cin_skipcomment(p);
+- if (STRNCMP(p, find, len) == 0)
+- {
+- r = skipwhite(p + len);
+- if (ignore != NULL && STRNCMP(r, ignore, STRLEN(ignore)) == 0)
+- r = skipwhite(r + STRLEN(ignore));
+- if (cin_nocode(r))
+- return TRUE;
+- }
+- if (*p != NUL)
+- ++p;
+- }
+- return FALSE;
+- }
+-
+- /*
+- * Return TRUE when "s" starts with "word" and then a non-ID character.
+- */
+- static int
+- cin_starts_with(char_u *s, char *word)
+- {
+- int l = (int)STRLEN(word);
+-
+- return (STRNCMP(s, word, l) == 0 && !vim_isIDc(s[l]));
+- }
+-
+- /*
+- * Skip strings, chars and comments until at or past "trypos".
+- * Return the column found.
+- */
+- static int
+- cin_skip2pos(pos_T *trypos)
+- {
+- char_u *line;
+- char_u *p;
+- char_u *new_p;
+-
+- p = line = ml_get(trypos->lnum);
+- while (*p && (colnr_T)(p - line) < trypos->col)
+- {
+- if (cin_iscomment(p))
+- p = cin_skipcomment(p);
+- else
+- {
+- new_p = skip_string(p);
+- if (new_p == p)
+- ++p;
+- else
+- p = new_p;
+- }
+- }
+- return (int)(p - line);
+- }
+-
+- /*
+- * Find the '{' at the start of the block we are in.
+- * Return NULL if no match found.
+- * Ignore a '{' that is in a comment, makes indenting the next three lines
+- * work. */
+- /* foo() */
+- /* { */
+- /* } */
+-
+- static pos_T *
+- find_start_brace(void) /* XXX */
+- {
+- pos_T cursor_save;
+- pos_T *trypos;
+- pos_T *pos;
+- static pos_T pos_copy;
+-
+- cursor_save = curwin->w_cursor;
+- while ((trypos = findmatchlimit(NULL, '{', FM_BLOCKSTOP, 0)) != NULL)
+- {
+- pos_copy = *trypos; /* copy pos_T, next findmatch will change it */
+- trypos = &pos_copy;
+- curwin->w_cursor = *trypos;
+- pos = NULL;
+- /* ignore the { if it's in a // or / * * / comment */
+- if ((colnr_T)cin_skip2pos(trypos) == trypos->col
+- && (pos = ind_find_start_CORS(NULL)) == NULL) /* XXX */
+- break;
+- if (pos != NULL)
+- curwin->w_cursor.lnum = pos->lnum;
+- }
+- curwin->w_cursor = cursor_save;
+- return trypos;
+- }
+-
+- /*
+- * Find the matching '(', ignoring it if it is in a comment.
+- * Return NULL if no match found.
+- */
+- static pos_T *
+- find_match_paren(int ind_maxparen) /* XXX */
+- {
+- return find_match_char('(', ind_maxparen);
+- }
+-
+- static pos_T *
+- find_match_char(int c, int ind_maxparen) /* XXX */
+- {
+- pos_T cursor_save;
+- pos_T *trypos;
+- static pos_T pos_copy;
+- int ind_maxp_wk;
+-
+- cursor_save = curwin->w_cursor;
+- ind_maxp_wk = ind_maxparen;
+- retry:
+- if ((trypos = findmatchlimit(NULL, c, 0, ind_maxp_wk)) != NULL)
+- {
+- /* check if the ( is in a // comment */
+- if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
+- {
+- ind_maxp_wk = ind_maxparen - (int)(cursor_save.lnum - trypos->lnum);
+- if (ind_maxp_wk > 0)
+- {
+- curwin->w_cursor = *trypos;
+- curwin->w_cursor.col = 0; /* XXX */
+- goto retry;
+- }
+- trypos = NULL;
+- }
+- else
+- {
+- pos_T *trypos_wk;
+-
+- pos_copy = *trypos; /* copy trypos, findmatch will change it */
+- trypos = &pos_copy;
+- curwin->w_cursor = *trypos;
+- if ((trypos_wk = ind_find_start_CORS(NULL)) != NULL) /* XXX */
+- {
+- ind_maxp_wk = ind_maxparen - (int)(cursor_save.lnum
+- - trypos_wk->lnum);
+- if (ind_maxp_wk > 0)
+- {
+- curwin->w_cursor = *trypos_wk;
+- goto retry;
+- }
+- trypos = NULL;
+- }
+- }
+- }
+- curwin->w_cursor = cursor_save;
+- return trypos;
+- }
+-
+- /*
+- * Find the matching '(', ignoring it if it is in a comment or before an
+- * unmatched {.
+- * Return NULL if no match found.
+- */
+- static pos_T *
+- find_match_paren_after_brace (int ind_maxparen) /* XXX */
+- {
+- pos_T *trypos = find_match_paren(ind_maxparen);
+-
+- if (trypos != NULL)
+- {
+- pos_T *tryposBrace = find_start_brace();
+-
+- /* If both an unmatched '(' and '{' is found. Ignore the '('
+- * position if the '{' is further down. */
+- if (tryposBrace != NULL
+- && (trypos->lnum != tryposBrace->lnum
+- ? trypos->lnum < tryposBrace->lnum
+- : trypos->col < tryposBrace->col))
+- trypos = NULL;
+- }
+- return trypos;
+- }
+-
+- /*
+- * Return ind_maxparen corrected for the difference in line number between the
+- * cursor position and "startpos". This makes sure that searching for a
+- * matching paren above the cursor line doesn't find a match because of
+- * looking a few lines further.
+- */
+- static int
+- corr_ind_maxparen(pos_T *startpos)
+- {
+- long n = (long)startpos->lnum - (long)curwin->w_cursor.lnum;
+-
+- if (n > 0 && n < curbuf->b_ind_maxparen / 2)
+- return curbuf->b_ind_maxparen - (int)n;
+- return curbuf->b_ind_maxparen;
+- }
+-
+- /*
+- * Set w_cursor.col to the column number of the last unmatched ')' or '{' in
+- * line "l". "l" must point to the start of the line.
+- */
+- static int
+- find_last_paren(char_u *l, int start, int end)
+- {
+- int i;
+- int retval = FALSE;
+- int open_count = 0;
+-
+- curwin->w_cursor.col = 0; /* default is start of line */
+-
+- for (i = 0; l[i] != NUL; i++)
+- {
+- i = (int)(cin_skipcomment(l + i) - l); /* ignore parens in comments */
+- i = (int)(skip_string(l + i) - l); /* ignore parens in quotes */
+- if (l[i] == start)
+- ++open_count;
+- else if (l[i] == end)
+- {
+- if (open_count > 0)
+- --open_count;
+- else
+- {
+- curwin->w_cursor.col = i;
+- retval = TRUE;
+- }
+- }
+- }
+- return retval;
+- }
+-
+- /*
+- * Parse 'cinoptions' and set the values in "curbuf".
+- * Must be called when 'cinoptions', 'shiftwidth' and/or 'tabstop' changes.
+- */
+- void
+- parse_cino(buf_T *buf)
+- {
+- char_u *p;
+- char_u *l;
+- char_u *digits;
+- int n;
+- int divider;
+- int fraction = 0;
+- int sw = (int)get_sw_value(buf);
+-
+- /*
+- * Set the default values.
+- */
+- /* Spaces from a block's opening brace the prevailing indent for that
+- * block should be. */
+- buf->b_ind_level = sw;
+-
+- /* Spaces from the edge of the line an open brace that's at the end of a
+- * line is imagined to be. */
+- buf->b_ind_open_imag = 0;
+-
+- /* Spaces from the prevailing indent for a line that is not preceded by
+- * an opening brace. */
+- buf->b_ind_no_brace = 0;
+-
+- /* Column where the first { of a function should be located }. */
+- buf->b_ind_first_open = 0;
+-
+- /* Spaces from the prevailing indent a leftmost open brace should be
+- * located. */
+- buf->b_ind_open_extra = 0;
+-
+- /* Spaces from the matching open brace (real location for one at the left
+- * edge; imaginary location from one that ends a line) the matching close
+- * brace should be located. */
+- buf->b_ind_close_extra = 0;
+-
+- /* Spaces from the edge of the line an open brace sitting in the leftmost
+- * column is imagined to be. */
+- buf->b_ind_open_left_imag = 0;
+-
+- /* Spaces jump labels should be shifted to the left if N is non-negative,
+- * otherwise the jump label will be put to column 1. */
+- buf->b_ind_jump_label = -1;
+-
+- /* Spaces from the switch() indent a "case xx" label should be located. */
+- buf->b_ind_case = sw;
+-
+- /* Spaces from the "case xx:" code after a switch() should be located. */
+- buf->b_ind_case_code = sw;
+-
+- /* Lineup break at end of case in switch() with case label. */
+- buf->b_ind_case_break = 0;
+-
+- /* Spaces from the class declaration indent a scope declaration label
+- * should be located. */
+- buf->b_ind_scopedecl = sw;
+-
+- /* Spaces from the scope declaration label code should be located. */
+- buf->b_ind_scopedecl_code = sw;
+-
+- /* Amount K&R-style parameters should be indented. */
+- buf->b_ind_param = sw;
+-
+- /* Amount a function type spec should be indented. */
+- buf->b_ind_func_type = sw;
+-
+- /* Amount a cpp base class declaration or constructor initialization
+- * should be indented. */
+- buf->b_ind_cpp_baseclass = sw;
+-
+- /* additional spaces beyond the prevailing indent a continuation line
+- * should be located. */
+- buf->b_ind_continuation = sw;
+-
+- /* Spaces from the indent of the line with an unclosed parentheses. */
+- buf->b_ind_unclosed = sw * 2;
+-
+- /* Spaces from the indent of the line with an unclosed parentheses, which
+- * itself is also unclosed. */
+- buf->b_ind_unclosed2 = sw;
+-
+- /* Suppress ignoring spaces from the indent of a line starting with an
+- * unclosed parentheses. */
+- buf->b_ind_unclosed_noignore = 0;
+-
+- /* If the opening paren is the last nonwhite character on the line, and
+- * b_ind_unclosed_wrapped is nonzero, use this indent relative to the outer
+- * context (for very long lines). */
+- buf->b_ind_unclosed_wrapped = 0;
+-
+- /* Suppress ignoring white space when lining up with the character after
+- * an unclosed parentheses. */
+- buf->b_ind_unclosed_whiteok = 0;
+-
+- /* Indent a closing parentheses under the line start of the matching
+- * opening parentheses. */
+- buf->b_ind_matching_paren = 0;
+-
+- /* Indent a closing parentheses under the previous line. */
+- buf->b_ind_paren_prev = 0;
+-
+- /* Extra indent for comments. */
+- buf->b_ind_comment = 0;
+-
+- /* Spaces from the comment opener when there is nothing after it. */
+- buf->b_ind_in_comment = 3;
+-
+- /* Boolean: if non-zero, use b_ind_in_comment even if there is something
+- * after the comment opener. */
+- buf->b_ind_in_comment2 = 0;
+-
+- /* Max lines to search for an open paren. */
+- buf->b_ind_maxparen = 20;
+-
+- /* Max lines to search for an open comment. */
+- buf->b_ind_maxcomment = 70;
+-
+- /* Handle braces for java code. */
+- buf->b_ind_java = 0;
+-
+- /* Not to confuse JS object properties with labels. */
+- buf->b_ind_js = 0;
+-
+- /* Handle blocked cases correctly. */
+- buf->b_ind_keep_case_label = 0;
+-
+- /* Handle C++ namespace. */
+- buf->b_ind_cpp_namespace = 0;
+-
+- /* Handle continuation lines containing conditions of if(), for() and
+- * while(). */
+- buf->b_ind_if_for_while = 0;
+-
+- /* indentation for # comments */
+- buf->b_ind_hash_comment = 0;
+-
+- /* Handle C++ extern "C" or "C++" */
+- buf->b_ind_cpp_extern_c = 0;
+-
+- for (p = buf->b_p_cino; *p; )
+- {
+- l = p++;
+- if (*p == '-')
+- ++p;
+- digits = p; /* remember where the digits start */
+- n = getdigits(&p);
+- divider = 0;
+- if (*p == '.') /* ".5s" means a fraction */
+- {
+- fraction = atol((char *)++p);
+- while (VIM_ISDIGIT(*p))
+- {
+- ++p;
+- if (divider)
+- divider *= 10;
+- else
+- divider = 10;
+- }
+- }
+- if (*p == 's') /* "2s" means two times 'shiftwidth' */
+- {
+- if (p == digits)
+- n = sw; /* just "s" is one 'shiftwidth' */
+- else
+- {
+- n *= sw;
+- if (divider)
+- n += (sw * fraction + divider / 2) / divider;
+- }
+- ++p;
+- }
+- if (l[1] == '-')
+- n = -n;
+-
+- /* When adding an entry here, also update the default 'cinoptions' in
+- * doc/indent.txt, and add explanation for it! */
+- switch (*l)
+- {
+- case '>': buf->b_ind_level = n; break;
+- case 'e': buf->b_ind_open_imag = n; break;
+- case 'n': buf->b_ind_no_brace = n; break;
+- case 'f': buf->b_ind_first_open = n; break;
+- case '{': buf->b_ind_open_extra = n; break;
+- case '}': buf->b_ind_close_extra = n; break;
+- case '^': buf->b_ind_open_left_imag = n; break;
+- case 'L': buf->b_ind_jump_label = n; break;
+- case ':': buf->b_ind_case = n; break;
+- case '=': buf->b_ind_case_code = n; break;
+- case 'b': buf->b_ind_case_break = n; break;
+- case 'p': buf->b_ind_param = n; break;
+- case 't': buf->b_ind_func_type = n; break;
+- case '/': buf->b_ind_comment = n; break;
+- case 'c': buf->b_ind_in_comment = n; break;
+- case 'C': buf->b_ind_in_comment2 = n; break;
+- case 'i': buf->b_ind_cpp_baseclass = n; break;
+- case '+': buf->b_ind_continuation = n; break;
+- case '(': buf->b_ind_unclosed = n; break;
+- case 'u': buf->b_ind_unclosed2 = n; break;
+- case 'U': buf->b_ind_unclosed_noignore = n; break;
+- case 'W': buf->b_ind_unclosed_wrapped = n; break;
+- case 'w': buf->b_ind_unclosed_whiteok = n; break;
+- case 'm': buf->b_ind_matching_paren = n; break;
+- case 'M': buf->b_ind_paren_prev = n; break;
+- case ')': buf->b_ind_maxparen = n; break;
+- case '*': buf->b_ind_maxcomment = n; break;
+- case 'g': buf->b_ind_scopedecl = n; break;
+- case 'h': buf->b_ind_scopedecl_code = n; break;
+- case 'j': buf->b_ind_java = n; break;
+- case 'J': buf->b_ind_js = n; break;
+- case 'l': buf->b_ind_keep_case_label = n; break;
+- case '#': buf->b_ind_hash_comment = n; break;
+- case 'N': buf->b_ind_cpp_namespace = n; break;
+- case 'k': buf->b_ind_if_for_while = n; break;
+- case 'E': buf->b_ind_cpp_extern_c = n; break;
+- }
+- if (*p == ',')
+- ++p;
+- }
+- }
+-
+- /*
+- * Return the desired indent for C code.
+- * Return -1 if the indent should be left alone (inside a raw string).
+- */
+- int
+- get_c_indent(void)
+- {
+- pos_T cur_curpos;
+- int amount;
+- int scope_amount;
+- int cur_amount = MAXCOL;
+- colnr_T col;
+- char_u *theline;
+- char_u *linecopy;
+- pos_T *trypos;
+- pos_T *comment_pos;
+- pos_T *tryposBrace = NULL;
+- pos_T tryposCopy;
+- pos_T our_paren_pos;
+- char_u *start;
+- int start_brace;
+- #define BRACE_IN_COL0 1 /* '{' is in column 0 */
+- #define BRACE_AT_START 2 /* '{' is at start of line */
+- #define BRACE_AT_END 3 /* '{' is at end of line */
+- linenr_T ourscope;
+- char_u *l;
+- char_u *look;
+- char_u terminated;
+- int lookfor;
+- #define LOOKFOR_INITIAL 0
+- #define LOOKFOR_IF 1
+- #define LOOKFOR_DO 2
+- #define LOOKFOR_CASE 3
+- #define LOOKFOR_ANY 4
+- #define LOOKFOR_TERM 5
+- #define LOOKFOR_UNTERM 6
+- #define LOOKFOR_SCOPEDECL 7
+- #define LOOKFOR_NOBREAK 8
+- #define LOOKFOR_CPP_BASECLASS 9
+- #define LOOKFOR_ENUM_OR_INIT 10
+- #define LOOKFOR_JS_KEY 11
+- #define LOOKFOR_COMMA 12
+-
+- int whilelevel;
+- linenr_T lnum;
+- int n;
+- int iscase;
+- int lookfor_break;
+- int lookfor_cpp_namespace = FALSE;
+- int cont_amount = 0; /* amount for continuation line */
+- int original_line_islabel;
+- int added_to_amount = 0;
+- int js_cur_has_key = 0;
+- linenr_T raw_string_start = 0;
+- cpp_baseclass_cache_T cache_cpp_baseclass = { FALSE, { MAXLNUM, 0 } };
+-
+- /* make a copy, value is changed below */
+- int ind_continuation = curbuf->b_ind_continuation;
+-
+- /* remember where the cursor was when we started */
+- cur_curpos = curwin->w_cursor;
+-
+- /* if we are at line 1 zero indent is fine, right? */
+- if (cur_curpos.lnum == 1)
+- return 0;
+-
+- /* Get a copy of the current contents of the line.
+- * This is required, because only the most recent line obtained with
+- * ml_get is valid! */
+- linecopy = vim_strsave(ml_get(cur_curpos.lnum));
+- if (linecopy == NULL)
+- return 0;
+-
+- /*
+- * In insert mode and the cursor is on a ')' truncate the line at the
+- * cursor position. We don't want to line up with the matching '(' when
+- * inserting new stuff.
+- * For unknown reasons the cursor might be past the end of the line, thus
+- * check for that.
+- */
+- if ((State & INSERT)
+- && curwin->w_cursor.col < (colnr_T)STRLEN(linecopy)
+- && linecopy[curwin->w_cursor.col] == ')')
+- linecopy[curwin->w_cursor.col] = NUL;
+-
+- theline = skipwhite(linecopy);
+-
+- /* move the cursor to the start of the line */
+-
+- curwin->w_cursor.col = 0;
+-
+- original_line_islabel = cin_islabel(); /* XXX */
+-
+- /*
+- * If we are inside a raw string don't change the indent.
+- * Ignore a raw string inside a comment.
+- */
+- comment_pos = ind_find_start_comment();
+- if (comment_pos != NULL)
+- {
+- /* findmatchlimit() static pos is overwritten, make a copy */
+- tryposCopy = *comment_pos;
+- comment_pos = &tryposCopy;
+- }
+- trypos = find_start_rawstring(curbuf->b_ind_maxcomment);
+- if (trypos != NULL && (comment_pos == NULL
+- || LT_POS(*trypos, *comment_pos)))
+- {
+- amount = -1;
+- goto laterend;
+- }
+-
+- /*
+- * #defines and so on always go at the left when included in 'cinkeys'.
+- */
+- if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', TRUE)))
+- {
+- amount = curbuf->b_ind_hash_comment;
+- goto theend;
+- }
+-
+- /*
+- * Is it a non-case label? Then that goes at the left margin too unless:
+- * - JS flag is set.
+- * - 'L' item has a positive value.
+- */
+- if (original_line_islabel && !curbuf->b_ind_js
+- && curbuf->b_ind_jump_label < 0)
+- {
+- amount = 0;
+- goto theend;
+- }
+-
+- /*
+- * If we're inside a "//" comment and there is a "//" comment in a
+- * previous line, lineup with that one.
+- */
+- if (cin_islinecomment(theline)
+- && (trypos = find_line_comment()) != NULL) /* XXX */
+- {
+- /* find how indented the line beginning the comment is */
+- getvcol(curwin, trypos, &col, NULL, NULL);
+- amount = col;
+- goto theend;
+- }
+-
+- /*
+- * If we're inside a comment and not looking at the start of the
+- * comment, try using the 'comments' option.
+- */
+- if (!cin_iscomment(theline) && comment_pos != NULL) /* XXX */
+- {
+- int lead_start_len = 2;
+- int lead_middle_len = 1;
+- char_u lead_start[COM_MAX_LEN]; /* start-comment string */
+- char_u lead_middle[COM_MAX_LEN]; /* middle-comment string */
+- char_u lead_end[COM_MAX_LEN]; /* end-comment string */
+- char_u *p;
+- int start_align = 0;
+- int start_off = 0;
+- int done = FALSE;
+-
+- /* find how indented the line beginning the comment is */
+- getvcol(curwin, comment_pos, &col, NULL, NULL);
+- amount = col;
+- *lead_start = NUL;
+- *lead_middle = NUL;
+-
+- p = curbuf->b_p_com;
+- while (*p != NUL)
+- {
+- int align = 0;
+- int off = 0;
+- int what = 0;
+-
+- while (*p != NUL && *p != ':')
+- {
+- if (*p == COM_START || *p == COM_END || *p == COM_MIDDLE)
+- what = *p++;
+- else if (*p == COM_LEFT || *p == COM_RIGHT)
+- align = *p++;
+- else if (VIM_ISDIGIT(*p) || *p == '-')
+- off = getdigits(&p);
+- else
+- ++p;
+- }
+-
+- if (*p == ':')
+- ++p;
+- (void)copy_option_part(&p, lead_end, COM_MAX_LEN, ",");
+- if (what == COM_START)
+- {
+- STRCPY(lead_start, lead_end);
+- lead_start_len = (int)STRLEN(lead_start);
+- start_off = off;
+- start_align = align;
+- }
+- else if (what == COM_MIDDLE)
+- {
+- STRCPY(lead_middle, lead_end);
+- lead_middle_len = (int)STRLEN(lead_middle);
+- }
+- else if (what == COM_END)
+- {
+- /* If our line starts with the middle comment string, line it
+- * up with the comment opener per the 'comments' option. */
+- if (STRNCMP(theline, lead_middle, lead_middle_len) == 0
+- && STRNCMP(theline, lead_end, STRLEN(lead_end)) != 0)
+- {
+- done = TRUE;
+- if (curwin->w_cursor.lnum > 1)
+- {
+- /* If the start comment string matches in the previous
+- * line, use the indent of that line plus offset. If
+- * the middle comment string matches in the previous
+- * line, use the indent of that line. XXX */
+- look = skipwhite(ml_get(curwin->w_cursor.lnum - 1));
+- if (STRNCMP(look, lead_start, lead_start_len) == 0)
+- amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
+- else if (STRNCMP(look, lead_middle,
+- lead_middle_len) == 0)
+- {
+- amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
+- break;
+- }
+- /* If the start comment string doesn't match with the
+- * start of the comment, skip this entry. XXX */
+- else if (STRNCMP(ml_get(comment_pos->lnum) + comment_pos->col,
+- lead_start, lead_start_len) != 0)
+- continue;
+- }
+- if (start_off != 0)
+- amount += start_off;
+- else if (start_align == COM_RIGHT)
+- amount += vim_strsize(lead_start)
+- - vim_strsize(lead_middle);
+- break;
+- }
+-
+- /* If our line starts with the end comment string, line it up
+- * with the middle comment */
+- if (STRNCMP(theline, lead_middle, lead_middle_len) != 0
+- && STRNCMP(theline, lead_end, STRLEN(lead_end)) == 0)
+- {
+- amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
+- /* XXX */
+- if (off != 0)
+- amount += off;
+- else if (align == COM_RIGHT)
+- amount += vim_strsize(lead_start)
+- - vim_strsize(lead_middle);
+- done = TRUE;
+- break;
+- }
+- }
+- }
+-
+- /* If our line starts with an asterisk, line up with the
+- * asterisk in the comment opener; otherwise, line up
+- * with the first character of the comment text.
+- */
+- if (done)
+- ;
+- else if (theline[0] == '*')
+- amount += 1;
+- else
+- {
+- /*
+- * If we are more than one line away from the comment opener, take
+- * the indent of the previous non-empty line. If 'cino' has "CO"
+- * and we are just below the comment opener and there are any
+- * white characters after it line up with the text after it;
+- * otherwise, add the amount specified by "c" in 'cino'
+- */
+- amount = -1;
+- for (lnum = cur_curpos.lnum - 1; lnum > comment_pos->lnum; --lnum)
+- {
+- if (linewhite(lnum)) /* skip blank lines */
+- continue;
+- amount = get_indent_lnum(lnum); /* XXX */
+- break;
+- }
+- if (amount == -1) /* use the comment opener */
+- {
+- if (!curbuf->b_ind_in_comment2)
+- {
+- start = ml_get(comment_pos->lnum);
+- look = start + comment_pos->col + 2; /* skip / and * */
+- if (*look != NUL) /* if something after it */
+- comment_pos->col = (colnr_T)(skipwhite(look) - start);
+- }
+- getvcol(curwin, comment_pos, &col, NULL, NULL);
+- amount = col;
+- if (curbuf->b_ind_in_comment2 || *look == NUL)
+- amount += curbuf->b_ind_in_comment;
+- }
+- }
+- goto theend;
+- }
+-
+- /*
+- * Are we looking at a ']' that has a match?
+- */
+- if (*skipwhite(theline) == ']'
+- && (trypos = find_match_char('[', curbuf->b_ind_maxparen)) != NULL)
+- {
+- /* align with the line containing the '['. */
+- amount = get_indent_lnum(trypos->lnum);
+- goto theend;
+- }
+-
+- /*
+- * Are we inside parentheses or braces?
+- */ /* XXX */
+- if (((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL
+- && curbuf->b_ind_java == 0)
+- || (tryposBrace = find_start_brace()) != NULL
+- || trypos != NULL)
+- {
+- if (trypos != NULL && tryposBrace != NULL)
+- {
+- /* Both an unmatched '(' and '{' is found. Use the one which is
+- * closer to the current cursor position, set the other to NULL. */
+- if (trypos->lnum != tryposBrace->lnum
+- ? trypos->lnum < tryposBrace->lnum
+- : trypos->col < tryposBrace->col)
+- trypos = NULL;
+- else
+- tryposBrace = NULL;
+- }
+-
+- if (trypos != NULL)
+- {
+- /*
+- * If the matching paren is more than one line away, use the indent of
+- * a previous non-empty line that matches the same paren.
+- */
+- if (theline[0] == ')' && curbuf->b_ind_paren_prev)
+- {
+- /* Line up with the start of the matching paren line. */
+- amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */
+- }
+- else
+- {
+- amount = -1;
+- our_paren_pos = *trypos;
+- for (lnum = cur_curpos.lnum - 1; lnum > our_paren_pos.lnum; --lnum)
+- {
+- l = skipwhite(ml_get(lnum));
+- if (cin_nocode(l)) /* skip comment lines */
+- continue;
+- if (cin_ispreproc_cont(&l, &lnum, &amount))
+- continue; /* ignore #define, #if, etc. */
+- curwin->w_cursor.lnum = lnum;
+-
+- /* Skip a comment or raw string. XXX */
+- if ((trypos = ind_find_start_CORS(NULL)) != NULL)
+- {
+- lnum = trypos->lnum + 1;
+- continue;
+- }
+-
+- /* XXX */
+- if ((trypos = find_match_paren(
+- corr_ind_maxparen(&cur_curpos))) != NULL
+- && trypos->lnum == our_paren_pos.lnum
+- && trypos->col == our_paren_pos.col)
+- {
+- amount = get_indent_lnum(lnum); /* XXX */
+-
+- if (theline[0] == ')')
+- {
+- if (our_paren_pos.lnum != lnum
+- && cur_amount > amount)
+- cur_amount = amount;
+- amount = -1;
+- }
+- break;
+- }
+- }
+- }
+-
+- /*
+- * Line up with line where the matching paren is. XXX
+- * If the line starts with a '(' or the indent for unclosed
+- * parentheses is zero, line up with the unclosed parentheses.
+- */
+- if (amount == -1)
+- {
+- int ignore_paren_col = 0;
+- int is_if_for_while = 0;
+-
+- if (curbuf->b_ind_if_for_while)
+- {
+- /* Look for the outermost opening parenthesis on this line
+- * and check whether it belongs to an "if", "for" or "while". */
+-
+- pos_T cursor_save = curwin->w_cursor;
+- pos_T outermost;
+- char_u *line;
+-
+- trypos = &our_paren_pos;
+- do {
+- outermost = *trypos;
+- curwin->w_cursor.lnum = outermost.lnum;
+- curwin->w_cursor.col = outermost.col;
+-
+- trypos = find_match_paren(curbuf->b_ind_maxparen);
+- } while (trypos && trypos->lnum == outermost.lnum);
+-
+- curwin->w_cursor = cursor_save;
+-
+- line = ml_get(outermost.lnum);
+-
+- is_if_for_while =
+- cin_is_if_for_while_before_offset(line, &outermost.col);
+- }
+-
+- amount = skip_label(our_paren_pos.lnum, &look);
+- look = skipwhite(look);
+- if (*look == '(')
+- {
+- linenr_T save_lnum = curwin->w_cursor.lnum;
+- char_u *line;
+- int look_col;
+-
+- /* Ignore a '(' in front of the line that has a match before
+- * our matching '('. */
+- curwin->w_cursor.lnum = our_paren_pos.lnum;
+- line = ml_get_curline();
+- look_col = (int)(look - line);
+- curwin->w_cursor.col = look_col + 1;
+- if ((trypos = findmatchlimit(NULL, ')', 0,
+- curbuf->b_ind_maxparen))
+- != NULL
+- && trypos->lnum == our_paren_pos.lnum
+- && trypos->col < our_paren_pos.col)
+- ignore_paren_col = trypos->col + 1;
+-
+- curwin->w_cursor.lnum = save_lnum;
+- look = ml_get(our_paren_pos.lnum) + look_col;
+- }
+- if (theline[0] == ')' || (curbuf->b_ind_unclosed == 0
+- && is_if_for_while == 0)
+- || (!curbuf->b_ind_unclosed_noignore && *look == '('
+- && ignore_paren_col == 0))
+- {
+- /*
+- * If we're looking at a close paren, line up right there;
+- * otherwise, line up with the next (non-white) character.
+- * When b_ind_unclosed_wrapped is set and the matching paren is
+- * the last nonwhite character of the line, use either the
+- * indent of the current line or the indentation of the next
+- * outer paren and add b_ind_unclosed_wrapped (for very long
+- * lines).
+- */
+- if (theline[0] != ')')
+- {
+- cur_amount = MAXCOL;
+- l = ml_get(our_paren_pos.lnum);
+- if (curbuf->b_ind_unclosed_wrapped
+- && cin_ends_in(l, (char_u *)"(", NULL))
+- {
+- /* look for opening unmatched paren, indent one level
+- * for each additional level */
+- n = 1;
+- for (col = 0; col < our_paren_pos.col; ++col)
+- {
+- switch (l[col])
+- {
+- case '(':
+- case '{': ++n;
+- break;
+-
+- case ')':
+- case '}': if (n > 1)
+- --n;
+- break;
+- }
+- }
+-
+- our_paren_pos.col = 0;
+- amount += n * curbuf->b_ind_unclosed_wrapped;
+- }
+- else if (curbuf->b_ind_unclosed_whiteok)
+- our_paren_pos.col++;
+- else
+- {
+- col = our_paren_pos.col + 1;
+- while (VIM_ISWHITE(l[col]))
+- col++;
+- if (l[col] != NUL) /* In case of trailing space */
+- our_paren_pos.col = col;
+- else
+- our_paren_pos.col++;
+- }
+- }
+-
+- /*
+- * Find how indented the paren is, or the character after it
+- * if we did the above "if".
+- */
+- if (our_paren_pos.col > 0)
+- {
+- getvcol(curwin, &our_paren_pos, &col, NULL, NULL);
+- if (cur_amount > (int)col)
+- cur_amount = col;
+- }
+- }
+-
+- if (theline[0] == ')' && curbuf->b_ind_matching_paren)
+- {
+- /* Line up with the start of the matching paren line. */
+- }
+- else if ((curbuf->b_ind_unclosed == 0 && is_if_for_while == 0)
+- || (!curbuf->b_ind_unclosed_noignore
+- && *look == '(' && ignore_paren_col == 0))
+- {
+- if (cur_amount != MAXCOL)
+- amount = cur_amount;
+- }
+- else
+- {
+- /* Add b_ind_unclosed2 for each '(' before our matching one,
+- * but ignore (void) before the line (ignore_paren_col). */
+- col = our_paren_pos.col;
+- while ((int)our_paren_pos.col > ignore_paren_col)
+- {
+- --our_paren_pos.col;
+- switch (*ml_get_pos(&our_paren_pos))
+- {
+- case '(': amount += curbuf->b_ind_unclosed2;
+- col = our_paren_pos.col;
+- break;
+- case ')': amount -= curbuf->b_ind_unclosed2;
+- col = MAXCOL;
+- break;
+- }
+- }
+-
+- /* Use b_ind_unclosed once, when the first '(' is not inside
+- * braces */
+- if (col == MAXCOL)
+- amount += curbuf->b_ind_unclosed;
+- else
+- {
+- curwin->w_cursor.lnum = our_paren_pos.lnum;
+- curwin->w_cursor.col = col;
+- if (find_match_paren_after_brace(curbuf->b_ind_maxparen)
+- != NULL)
+- amount += curbuf->b_ind_unclosed2;
+- else
+- {
+- if (is_if_for_while)
+- amount += curbuf->b_ind_if_for_while;
+- else
+- amount += curbuf->b_ind_unclosed;
+- }
+- }
+- /*
+- * For a line starting with ')' use the minimum of the two
+- * positions, to avoid giving it more indent than the previous
+- * lines:
+- * func_long_name( if (x
+- * arg && yy
+- * ) ^ not here ) ^ not here
+- */
+- if (cur_amount < amount)
+- amount = cur_amount;
+- }
+- }
+-
+- /* add extra indent for a comment */
+- if (cin_iscomment(theline))
+- amount += curbuf->b_ind_comment;
+- }
+- else
+- {
+- /*
+- * We are inside braces, there is a { before this line at the position
+- * stored in tryposBrace.
+- * Make a copy of tryposBrace, it may point to pos_copy inside
+- * find_start_brace(), which may be changed somewhere.
+- */
+- tryposCopy = *tryposBrace;
+- tryposBrace = &tryposCopy;
+- trypos = tryposBrace;
+- ourscope = trypos->lnum;
+- start = ml_get(ourscope);
+-
+- /*
+- * Now figure out how indented the line is in general.
+- * If the brace was at the start of the line, we use that;
+- * otherwise, check out the indentation of the line as
+- * a whole and then add the "imaginary indent" to that.
+- */
+- look = skipwhite(start);
+- if (*look == '{')
+- {
+- getvcol(curwin, trypos, &col, NULL, NULL);
+- amount = col;
+- if (*start == '{')
+- start_brace = BRACE_IN_COL0;
+- else
+- start_brace = BRACE_AT_START;
+- }
+- else
+- {
+- /* That opening brace might have been on a continuation
+- * line. if so, find the start of the line. */
+- curwin->w_cursor.lnum = ourscope;
+-
+- /* Position the cursor over the rightmost paren, so that
+- * matching it will take us back to the start of the line. */
+- lnum = ourscope;
+- if (find_last_paren(start, '(', ')')
+- && (trypos = find_match_paren(curbuf->b_ind_maxparen))
+- != NULL)
+- lnum = trypos->lnum;
+-
+- /* It could have been something like
+- * case 1: if (asdf &&
+- * ldfd) {
+- * }
+- */
+- if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
+- && cin_iscase(skipwhite(ml_get_curline()), FALSE))
+- amount = get_indent();
+- else if (curbuf->b_ind_js)
+- amount = get_indent_lnum(lnum);
+- else
+- amount = skip_label(lnum, &l);
+-
+- start_brace = BRACE_AT_END;
+- }
+-
+- /* For Javascript check if the line starts with "key:". */
+- if (curbuf->b_ind_js)
+- js_cur_has_key = cin_has_js_key(theline);
+-
+- /*
+- * If we're looking at a closing brace, that's where
+- * we want to be. otherwise, add the amount of room
+- * that an indent is supposed to be.
+- */
+- if (theline[0] == '}')
+- {
+- /*
+- * they may want closing braces to line up with something
+- * other than the open brace. indulge them, if so.
+- */
+- amount += curbuf->b_ind_close_extra;
+- }
+- else
+- {
+- /*
+- * If we're looking at an "else", try to find an "if"
+- * to match it with.
+- * If we're looking at a "while", try to find a "do"
+- * to match it with.
+- */
+- lookfor = LOOKFOR_INITIAL;
+- if (cin_iselse(theline))
+- lookfor = LOOKFOR_IF;
+- else if (cin_iswhileofdo(theline, cur_curpos.lnum)) /* XXX */
+- lookfor = LOOKFOR_DO;
+- if (lookfor != LOOKFOR_INITIAL)
+- {
+- curwin->w_cursor.lnum = cur_curpos.lnum;
+- if (find_match(lookfor, ourscope) == OK)
+- {
+- amount = get_indent(); /* XXX */
+- goto theend;
+- }
+- }
+-
+- /*
+- * We get here if we are not on an "while-of-do" or "else" (or
+- * failed to find a matching "if").
+- * Search backwards for something to line up with.
+- * First set amount for when we don't find anything.
+- */
+-
+- /*
+- * if the '{' is _really_ at the left margin, use the imaginary
+- * location of a left-margin brace. Otherwise, correct the
+- * location for b_ind_open_extra.
+- */
+-
+- if (start_brace == BRACE_IN_COL0) /* '{' is in column 0 */
+- {
+- amount = curbuf->b_ind_open_left_imag;
+- lookfor_cpp_namespace = TRUE;
+- }
+- else if (start_brace == BRACE_AT_START &&
+- lookfor_cpp_namespace) /* '{' is at start */
+- {
+-
+- lookfor_cpp_namespace = TRUE;
+- }
+- else
+- {
+- if (start_brace == BRACE_AT_END) /* '{' is at end of line */
+- {
+- amount += curbuf->b_ind_open_imag;
+-
+- l = skipwhite(ml_get_curline());
+- if (cin_is_cpp_namespace(l))
+- amount += curbuf->b_ind_cpp_namespace;
+- else if (cin_is_cpp_extern_c(l))
+- amount += curbuf->b_ind_cpp_extern_c;
+- }
+- else
+- {
+- /* Compensate for adding b_ind_open_extra later. */
+- amount -= curbuf->b_ind_open_extra;
+- if (amount < 0)
+- amount = 0;
+- }
+- }
+-
+- lookfor_break = FALSE;
+-
+- if (cin_iscase(theline, FALSE)) /* it's a switch() label */
+- {
+- lookfor = LOOKFOR_CASE; /* find a previous switch() label */
+- amount += curbuf->b_ind_case;
+- }
+- else if (cin_isscopedecl(theline)) /* private:, ... */
+- {
+- lookfor = LOOKFOR_SCOPEDECL; /* class decl is this block */
+- amount += curbuf->b_ind_scopedecl;
+- }
+- else
+- {
+- if (curbuf->b_ind_case_break && cin_isbreak(theline))
+- /* break; ... */
+- lookfor_break = TRUE;
+-
+- lookfor = LOOKFOR_INITIAL;
+- /* b_ind_level from start of block */
+- amount += curbuf->b_ind_level;
+- }
+- scope_amount = amount;
+- whilelevel = 0;
+-
+- /*
+- * Search backwards. If we find something we recognize, line up
+- * with that.
+- *
+- * If we're looking at an open brace, indent
+- * the usual amount relative to the conditional
+- * that opens the block.
+- */
+- curwin->w_cursor = cur_curpos;
+- for (;;)
+- {
+- curwin->w_cursor.lnum--;
+- curwin->w_cursor.col = 0;
+-
+- /*
+- * If we went all the way back to the start of our scope, line
+- * up with it.
+- */
+- if (curwin->w_cursor.lnum <= ourscope)
+- {
+- /* We reached end of scope:
+- * If looking for a enum or structure initialization
+- * go further back:
+- * If it is an initializer (enum xxx or xxx =), then
+- * don't add ind_continuation, otherwise it is a variable
+- * declaration:
+- * int x,
+- * here; <-- add ind_continuation
+- */
+- if (lookfor == LOOKFOR_ENUM_OR_INIT)
+- {
+- if (curwin->w_cursor.lnum == 0
+- || curwin->w_cursor.lnum
+- < ourscope - curbuf->b_ind_maxparen)
+- {
+- /* nothing found (abuse curbuf->b_ind_maxparen as
+- * limit) assume terminated line (i.e. a variable
+- * initialization) */
+- if (cont_amount > 0)
+- amount = cont_amount;
+- else if (!curbuf->b_ind_js)
+- amount += ind_continuation;
+- break;
+- }
+-
+- l = ml_get_curline();
+-
+- /*
+- * If we're in a comment or raw string now, skip to
+- * the start of it.
+- */
+- trypos = ind_find_start_CORS(NULL);
+- if (trypos != NULL)
+- {
+- curwin->w_cursor.lnum = trypos->lnum + 1;
+- curwin->w_cursor.col = 0;
+- continue;
+- }
+-
+- /*
+- * Skip preprocessor directives and blank lines.
+- */
+- if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum,
+- &amount))
+- continue;
+-
+- if (cin_nocode(l))
+- continue;
+-
+- terminated = cin_isterminated(l, FALSE, TRUE);
+-
+- /*
+- * If we are at top level and the line looks like a
+- * function declaration, we are done
+- * (it's a variable declaration).
+- */
+- if (start_brace != BRACE_IN_COL0
+- || !cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
+- {
+- /* if the line is terminated with another ','
+- * it is a continued variable initialization.
+- * don't add extra indent.
+- * TODO: does not work, if a function
+- * declaration is split over multiple lines:
+- * cin_isfuncdecl returns FALSE then.
+- */
+- if (terminated == ',')
+- break;
+-
+- /* if it es a enum declaration or an assignment,
+- * we are done.
+- */
+- if (terminated != ';' && cin_isinit())
+- break;
+-
+- /* nothing useful found */
+- if (terminated == 0 || terminated == '{')
+- continue;
+- }
+-
+- if (terminated != ';')
+- {
+- /* Skip parens and braces. Position the cursor
+- * over the rightmost paren, so that matching it
+- * will take us back to the start of the line.
+- */ /* XXX */
+- trypos = NULL;
+- if (find_last_paren(l, '(', ')'))
+- trypos = find_match_paren(
+- curbuf->b_ind_maxparen);
+-
+- if (trypos == NULL && find_last_paren(l, '{', '}'))
+- trypos = find_start_brace();
+-
+- if (trypos != NULL)
+- {
+- curwin->w_cursor.lnum = trypos->lnum + 1;
+- curwin->w_cursor.col = 0;
+- continue;
+- }
+- }
+-
+- /* it's a variable declaration, add indentation
+- * like in
+- * int a,
+- * b;
+- */
+- if (cont_amount > 0)
+- amount = cont_amount;
+- else
+- amount += ind_continuation;
+- }
+- else if (lookfor == LOOKFOR_UNTERM)
+- {
+- if (cont_amount > 0)
+- amount = cont_amount;
+- else
+- amount += ind_continuation;
+- }
+- else
+- {
+- if (lookfor != LOOKFOR_TERM
+- && lookfor != LOOKFOR_CPP_BASECLASS
+- && lookfor != LOOKFOR_COMMA)
+- {
+- amount = scope_amount;
+- if (theline[0] == '{')
+- {
+- amount += curbuf->b_ind_open_extra;
+- added_to_amount = curbuf->b_ind_open_extra;
+- }
+- }
+-
+- if (lookfor_cpp_namespace)
+- {
+- /*
+- * Looking for C++ namespace, need to look further
+- * back.
+- */
+- if (curwin->w_cursor.lnum == ourscope)
+- continue;
+-
+- if (curwin->w_cursor.lnum == 0
+- || curwin->w_cursor.lnum
+- < ourscope - FIND_NAMESPACE_LIM)
+- break;
+-
+- l = ml_get_curline();
+-
+- /* If we're in a comment or raw string now, skip
+- * to the start of it. */
+- trypos = ind_find_start_CORS(NULL);
+- if (trypos != NULL)
+- {
+- curwin->w_cursor.lnum = trypos->lnum + 1;
+- curwin->w_cursor.col = 0;
+- continue;
+- }
+-
+- /* Skip preprocessor directives and blank lines. */
+- if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum,
+- &amount))
+- continue;
+-
+- /* Finally the actual check for "namespace". */
+- if (cin_is_cpp_namespace(l))
+- {
+- amount += curbuf->b_ind_cpp_namespace
+- - added_to_amount;
+- break;
+- }
+- else if (cin_is_cpp_extern_c(l))
+- {
+- amount += curbuf->b_ind_cpp_extern_c
+- - added_to_amount;
+- break;
+- }
+-
+- if (cin_nocode(l))
+- continue;
+- }
+- }
+- break;
+- }
+-
+- /*
+- * If we're in a comment or raw string now, skip to the start
+- * of it.
+- */ /* XXX */
+- if ((trypos = ind_find_start_CORS(&raw_string_start)) != NULL)
+- {
+- curwin->w_cursor.lnum = trypos->lnum + 1;
+- curwin->w_cursor.col = 0;
+- continue;
+- }
+-
+- l = ml_get_curline();
+-
+- /*
+- * If this is a switch() label, may line up relative to that.
+- * If this is a C++ scope declaration, do the same.
+- */
+- iscase = cin_iscase(l, FALSE);
+- if (iscase || cin_isscopedecl(l))
+- {
+- /* we are only looking for cpp base class
+- * declaration/initialization any longer */
+- if (lookfor == LOOKFOR_CPP_BASECLASS)
+- break;
+-
+- /* When looking for a "do" we are not interested in
+- * labels. */
+- if (whilelevel > 0)
+- continue;
+-
+- /*
+- * case xx:
+- * c = 99 + <- this indent plus continuation
+- *-> here;
+- */
+- if (lookfor == LOOKFOR_UNTERM
+- || lookfor == LOOKFOR_ENUM_OR_INIT)
+- {
+- if (cont_amount > 0)
+- amount = cont_amount;
+- else
+- amount += ind_continuation;
+- break;
+- }
+-
+- /*
+- * case xx: <- line up with this case
+- * x = 333;
+- * case yy:
+- */
+- if ( (iscase && lookfor == LOOKFOR_CASE)
+- || (iscase && lookfor_break)
+- || (!iscase && lookfor == LOOKFOR_SCOPEDECL))
+- {
+- /*
+- * Check that this case label is not for another
+- * switch()
+- */ /* XXX */
+- if ((trypos = find_start_brace()) == NULL
+- || trypos->lnum == ourscope)
+- {
+- amount = get_indent(); /* XXX */
+- break;
+- }
+- continue;
+- }
+-
+- n = get_indent_nolabel(curwin->w_cursor.lnum); /* XXX */
+-
+- /*
+- * case xx: if (cond) <- line up with this if
+- * y = y + 1;
+- * -> s = 99;
+- *
+- * case xx:
+- * if (cond) <- line up with this line
+- * y = y + 1;
+- * -> s = 99;
+- */
+- if (lookfor == LOOKFOR_TERM)
+- {
+- if (n)
+- amount = n;
+-
+- if (!lookfor_break)
+- break;
+- }
+-
+- /*
+- * case xx: x = x + 1; <- line up with this x
+- * -> y = y + 1;
+- *
+- * case xx: if (cond) <- line up with this if
+- * -> y = y + 1;
+- */
+- if (n)
+- {
+- amount = n;
+- l = after_label(ml_get_curline());
+- if (l != NULL && cin_is_cinword(l))
+- {
+- if (theline[0] == '{')
+- amount += curbuf->b_ind_open_extra;
+- else
+- amount += curbuf->b_ind_level
+- + curbuf->b_ind_no_brace;
+- }
+- break;
+- }
+-
+- /*
+- * Try to get the indent of a statement before the switch
+- * label. If nothing is found, line up relative to the
+- * switch label.
+- * break; <- may line up with this line
+- * case xx:
+- * -> y = 1;
+- */
+- scope_amount = get_indent() + (iscase /* XXX */
+- ? curbuf->b_ind_case_code
+- : curbuf->b_ind_scopedecl_code);
+- lookfor = curbuf->b_ind_case_break
+- ? LOOKFOR_NOBREAK : LOOKFOR_ANY;
+- continue;
+- }
+-
+- /*
+- * Looking for a switch() label or C++ scope declaration,
+- * ignore other lines, skip {}-blocks.
+- */
+- if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
+- {
+- if (find_last_paren(l, '{', '}')
+- && (trypos = find_start_brace()) != NULL)
+- {
+- curwin->w_cursor.lnum = trypos->lnum + 1;
+- curwin->w_cursor.col = 0;
+- }
+- continue;
+- }
+-
+- /*
+- * Ignore jump labels with nothing after them.
+- */
+- if (!curbuf->b_ind_js && cin_islabel())
+- {
+- l = after_label(ml_get_curline());
+- if (l == NULL || cin_nocode(l))
+- continue;
+- }
+-
+- /*
+- * Ignore #defines, #if, etc.
+- * Ignore comment and empty lines.
+- * (need to get the line again, cin_islabel() may have
+- * unlocked it)
+- */
+- l = ml_get_curline();
+- if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount)
+- || cin_nocode(l))
+- continue;
+-
+- /*
+- * Are we at the start of a cpp base class declaration or
+- * constructor initialization?
+- */ /* XXX */
+- n = FALSE;
+- if (lookfor != LOOKFOR_TERM && curbuf->b_ind_cpp_baseclass > 0)
+- {
+- n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
+- l = ml_get_curline();
+- }
+- if (n)
+- {
+- if (lookfor == LOOKFOR_UNTERM)
+- {
+- if (cont_amount > 0)
+- amount = cont_amount;
+- else
+- amount += ind_continuation;
+- }
+- else if (theline[0] == '{')
+- {
+- /* Need to find start of the declaration. */
+- lookfor = LOOKFOR_UNTERM;
+- ind_continuation = 0;
+- continue;
+- }
+- else
+- /* XXX */
+- amount = get_baseclass_amount(
+- cache_cpp_baseclass.lpos.col);
+- break;
+- }
+- else if (lookfor == LOOKFOR_CPP_BASECLASS)
+- {
+- /* only look, whether there is a cpp base class
+- * declaration or initialization before the opening brace.
+- */
+- if (cin_isterminated(l, TRUE, FALSE))
+- break;
+- else
+- continue;
+- }
+-
+- /*
+- * What happens next depends on the line being terminated.
+- * If terminated with a ',' only consider it terminating if
+- * there is another unterminated statement behind, eg:
+- * 123,
+- * sizeof
+- * here
+- * Otherwise check whether it is a enumeration or structure
+- * initialisation (not indented) or a variable declaration
+- * (indented).
+- */
+- terminated = cin_isterminated(l, FALSE, TRUE);
+-
+- if (js_cur_has_key)
+- {
+- js_cur_has_key = 0; /* only check the first line */
+- if (curbuf->b_ind_js && terminated == ',')
+- {
+- /* For Javascript we might be inside an object:
+- * key: something, <- align with this
+- * key: something
+- * or:
+- * key: something + <- align with this
+- * something,
+- * key: something
+- */
+- lookfor = LOOKFOR_JS_KEY;
+- }
+- }
+- if (lookfor == LOOKFOR_JS_KEY && cin_has_js_key(l))
+- {
+- amount = get_indent();
+- break;
+- }
+- if (lookfor == LOOKFOR_COMMA)
+- {
+- if (tryposBrace != NULL && tryposBrace->lnum
+- >= curwin->w_cursor.lnum)
+- break;
+- if (terminated == ',')
+- /* line below current line is the one that starts a
+- * (possibly broken) line ending in a comma. */
+- break;
+- else
+- {
+- amount = get_indent();
+- if (curwin->w_cursor.lnum - 1 == ourscope)
+- /* line above is start of the scope, thus current
+- * line is the one that stars a (possibly broken)
+- * line ending in a comma. */
+- break;
+- }
+- }
+-
+- if (terminated == 0 || (lookfor != LOOKFOR_UNTERM
+- && terminated == ','))
+- {
+- if (lookfor != LOOKFOR_ENUM_OR_INIT &&
+- (*skipwhite(l) == '[' || l[STRLEN(l) - 1] == '['))
+- amount += ind_continuation;
+- /*
+- * if we're in the middle of a paren thing,
+- * go back to the line that starts it so
+- * we can get the right prevailing indent
+- * if ( foo &&
+- * bar )
+- */
+- /*
+- * Position the cursor over the rightmost paren, so that
+- * matching it will take us back to the start of the line.
+- * Ignore a match before the start of the block.
+- */
+- (void)find_last_paren(l, '(', ')');
+- trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
+- if (trypos != NULL && (trypos->lnum < tryposBrace->lnum
+- || (trypos->lnum == tryposBrace->lnum
+- && trypos->col < tryposBrace->col)))
+- trypos = NULL;
+-
+- /*
+- * If we are looking for ',', we also look for matching
+- * braces.
+- */
+- if (trypos == NULL && terminated == ','
+- && find_last_paren(l, '{', '}'))
+- trypos = find_start_brace();
+-
+- if (trypos != NULL)
+- {
+- /*
+- * Check if we are on a case label now. This is
+- * handled above.
+- * case xx: if ( asdf &&
+- * asdf)
+- */
+- curwin->w_cursor = *trypos;
+- l = ml_get_curline();
+- if (cin_iscase(l, FALSE) || cin_isscopedecl(l))
+- {
+- ++curwin->w_cursor.lnum;
+- curwin->w_cursor.col = 0;
+- continue;
+- }
+- }
+-
+- /*
+- * Skip over continuation lines to find the one to get the
+- * indent from
+- * char *usethis = "bla\
+- * bla",
+- * here;
+- */
+- if (terminated == ',')
+- {
+- while (curwin->w_cursor.lnum > 1)
+- {
+- l = ml_get(curwin->w_cursor.lnum - 1);
+- if (*l == NUL || l[STRLEN(l) - 1] != '\\')
+- break;
+- --curwin->w_cursor.lnum;
+- curwin->w_cursor.col = 0;
+- }
+- }
+-
+- /*
+- * Get indent and pointer to text for current line,
+- * ignoring any jump label. XXX
+- */
+- if (curbuf->b_ind_js)
+- cur_amount = get_indent();
+- else
+- cur_amount = skip_label(curwin->w_cursor.lnum, &l);
+- /*
+- * If this is just above the line we are indenting, and it
+- * starts with a '{', line it up with this line.
+- * while (not)
+- * -> {
+- * }
+- */
+- if (terminated != ',' && lookfor != LOOKFOR_TERM
+- && theline[0] == '{')
+- {
+- amount = cur_amount;
+- /*
+- * Only add b_ind_open_extra when the current line
+- * doesn't start with a '{', which must have a match
+- * in the same line (scope is the same). Probably:
+- * { 1, 2 },
+- * -> { 3, 4 }
+- */
+- if (*skipwhite(l) != '{')
+- amount += curbuf->b_ind_open_extra;
+-
+- if (curbuf->b_ind_cpp_baseclass && !curbuf->b_ind_js)
+- {
+- /* have to look back, whether it is a cpp base
+- * class declaration or initialization */
+- lookfor = LOOKFOR_CPP_BASECLASS;
+- continue;
+- }
+- break;
+- }
+-
+- /*
+- * Check if we are after an "if", "while", etc.
+- * Also allow " } else".
+- */
+- if (cin_is_cinword(l) || cin_iselse(skipwhite(l)))
+- {
+- /*
+- * Found an unterminated line after an if (), line up
+- * with the last one.
+- * if (cond)
+- * 100 +
+- * -> here;
+- */
+- if (lookfor == LOOKFOR_UNTERM
+- || lookfor == LOOKFOR_ENUM_OR_INIT)
+- {
+- if (cont_amount > 0)
+- amount = cont_amount;
+- else
+- amount += ind_continuation;
+- break;
+- }
+-
+- /*
+- * If this is just above the line we are indenting, we
+- * are finished.
+- * while (not)
+- * -> here;
+- * Otherwise this indent can be used when the line
+- * before this is terminated.
+- * yyy;
+- * if (stat)
+- * while (not)
+- * xxx;
+- * -> here;
+- */
+- amount = cur_amount;
+- if (theline[0] == '{')
+- amount += curbuf->b_ind_open_extra;
+- if (lookfor != LOOKFOR_TERM)
+- {
+- amount += curbuf->b_ind_level
+- + curbuf->b_ind_no_brace;
+- break;
+- }
+-
+- /*
+- * Special trick: when expecting the while () after a
+- * do, line up with the while()
+- * do
+- * x = 1;
+- * -> here
+- */
+- l = skipwhite(ml_get_curline());
+- if (cin_isdo(l))
+- {
+- if (whilelevel == 0)
+- break;
+- --whilelevel;
+- }
+-
+- /*
+- * When searching for a terminated line, don't use the
+- * one between the "if" and the matching "else".
+- * Need to use the scope of this "else". XXX
+- * If whilelevel != 0 continue looking for a "do {".
+- */
+- if (cin_iselse(l) && whilelevel == 0)
+- {
+- /* If we're looking at "} else", let's make sure we
+- * find the opening brace of the enclosing scope,
+- * not the one from "if () {". */
+- if (*l == '}')
+- curwin->w_cursor.col =
+- (colnr_T)(l - ml_get_curline()) + 1;
+-
+- if ((trypos = find_start_brace()) == NULL
+- || find_match(LOOKFOR_IF, trypos->lnum)
+- == FAIL)
+- break;
+- }
+- }
+-
+- /*
+- * If we're below an unterminated line that is not an
+- * "if" or something, we may line up with this line or
+- * add something for a continuation line, depending on
+- * the line before this one.
+- */
+- else
+- {
+- /*
+- * Found two unterminated lines on a row, line up with
+- * the last one.
+- * c = 99 +
+- * 100 +
+- * -> here;
+- */
+- if (lookfor == LOOKFOR_UNTERM)
+- {
+- /* When line ends in a comma add extra indent */
+- if (terminated == ',')
+- amount += ind_continuation;
+- break;
+- }
+-
+- if (lookfor == LOOKFOR_ENUM_OR_INIT)
+- {
+- /* Found two lines ending in ',', lineup with the
+- * lowest one, but check for cpp base class
+- * declaration/initialization, if it is an
+- * opening brace or we are looking just for
+- * enumerations/initializations. */
+- if (terminated == ',')
+- {
+- if (curbuf->b_ind_cpp_baseclass == 0)
+- break;
+-
+- lookfor = LOOKFOR_CPP_BASECLASS;
+- continue;
+- }
+-
+- /* Ignore unterminated lines in between, but
+- * reduce indent. */
+- if (amount > cur_amount)
+- amount = cur_amount;
+- }
+- else
+- {
+- /*
+- * Found first unterminated line on a row, may
+- * line up with this line, remember its indent
+- * 100 +
+- * -> here;
+- */
+- l = ml_get_curline();
+- amount = cur_amount;
+-
+- n = (int)STRLEN(l);
+- if (terminated == ',' && (*skipwhite(l) == ']'
+- || (n >=2 && l[n - 2] == ']')))
+- break;
+-
+- /*
+- * If previous line ends in ',', check whether we
+- * are in an initialization or enum
+- * struct xxx =
+- * {
+- * sizeof a,
+- * 124 };
+- * or a normal possible continuation line.
+- * but only, of no other statement has been found
+- * yet.
+- */
+- if (lookfor == LOOKFOR_INITIAL && terminated == ',')
+- {
+- if (curbuf->b_ind_js)
+- {
+- /* Search for a line ending in a comma
+- * and line up with the line below it
+- * (could be the current line).
+- * some = [
+- * 1, <- line up here
+- * 2,
+- * some = [
+- * 3 + <- line up here
+- * 4 *
+- * 5,
+- * 6,
+- */
+- if (cin_iscomment(skipwhite(l)))
+- break;
+- lookfor = LOOKFOR_COMMA;
+- trypos = find_match_char('[',
+- curbuf->b_ind_maxparen);
+- if (trypos != NULL)
+- {
+- if (trypos->lnum
+- == curwin->w_cursor.lnum - 1)
+- {
+- /* Current line is first inside
+- * [], line up with it. */
+- break;
+- }
+- ourscope = trypos->lnum;
+- }
+- }
+- else
+- {
+- lookfor = LOOKFOR_ENUM_OR_INIT;
+- cont_amount = cin_first_id_amount();
+- }
+- }
+- else
+- {
+- if (lookfor == LOOKFOR_INITIAL
+- && *l != NUL
+- && l[STRLEN(l) - 1] == '\\')
+- /* XXX */
+- cont_amount = cin_get_equal_amount(
+- curwin->w_cursor.lnum);
+- if (lookfor != LOOKFOR_TERM
+- && lookfor != LOOKFOR_JS_KEY
+- && lookfor != LOOKFOR_COMMA
+- && raw_string_start != curwin->w_cursor.lnum)
+- lookfor = LOOKFOR_UNTERM;
+- }
+- }
+- }
+- }
+-
+- /*
+- * Check if we are after a while (cond);
+- * If so: Ignore until the matching "do".
+- */
+- else if (cin_iswhileofdo_end(terminated)) /* XXX */
+- {
+- /*
+- * Found an unterminated line after a while ();, line up
+- * with the last one.
+- * while (cond);
+- * 100 + <- line up with this one
+- * -> here;
+- */
+- if (lookfor == LOOKFOR_UNTERM
+- || lookfor == LOOKFOR_ENUM_OR_INIT)
+- {
+- if (cont_amount > 0)
+- amount = cont_amount;
+- else
+- amount += ind_continuation;
+- break;
+- }
+-
+- if (whilelevel == 0)
+- {
+- lookfor = LOOKFOR_TERM;
+- amount = get_indent(); /* XXX */
+- if (theline[0] == '{')
+- amount += curbuf->b_ind_open_extra;
+- }
+- ++whilelevel;
+- }
+-
+- /*
+- * We are after a "normal" statement.
+- * If we had another statement we can stop now and use the
+- * indent of that other statement.
+- * Otherwise the indent of the current statement may be used,
+- * search backwards for the next "normal" statement.
+- */
+- else
+- {
+- /*
+- * Skip single break line, if before a switch label. It
+- * may be lined up with the case label.
+- */
+- if (lookfor == LOOKFOR_NOBREAK
+- && cin_isbreak(skipwhite(ml_get_curline())))
+- {
+- lookfor = LOOKFOR_ANY;
+- continue;
+- }
+-
+- /*
+- * Handle "do {" line.
+- */
+- if (whilelevel > 0)
+- {
+- l = cin_skipcomment(ml_get_curline());
+- if (cin_isdo(l))
+- {
+- amount = get_indent(); /* XXX */
+- --whilelevel;
+- continue;
+- }
+- }
+-
+- /*
+- * Found a terminated line above an unterminated line. Add
+- * the amount for a continuation line.
+- * x = 1;
+- * y = foo +
+- * -> here;
+- * or
+- * int x = 1;
+- * int foo,
+- * -> here;
+- */
+- if (lookfor == LOOKFOR_UNTERM
+- || lookfor == LOOKFOR_ENUM_OR_INIT)
+- {
+- if (cont_amount > 0)
+- amount = cont_amount;
+- else
+- amount += ind_continuation;
+- break;
+- }
+-
+- /*
+- * Found a terminated line above a terminated line or "if"
+- * etc. line. Use the amount of the line below us.
+- * x = 1; x = 1;
+- * if (asdf) y = 2;
+- * while (asdf) ->here;
+- * here;
+- * ->foo;
+- */
+- if (lookfor == LOOKFOR_TERM)
+- {
+- if (!lookfor_break && whilelevel == 0)
+- break;
+- }
+-
+- /*
+- * First line above the one we're indenting is terminated.
+- * To know what needs to be done look further backward for
+- * a terminated line.
+- */
+- else
+- {
+- /*
+- * position the cursor over the rightmost paren, so
+- * that matching it will take us back to the start of
+- * the line. Helps for:
+- * func(asdr,
+- * asdfasdf);
+- * here;
+- */
+- term_again:
+- l = ml_get_curline();
+- if (find_last_paren(l, '(', ')')
+- && (trypos = find_match_paren(
+- curbuf->b_ind_maxparen)) != NULL)
+- {
+- /*
+- * Check if we are on a case label now. This is
+- * handled above.
+- * case xx: if ( asdf &&
+- * asdf)
+- */
+- curwin->w_cursor = *trypos;
+- l = ml_get_curline();
+- if (cin_iscase(l, FALSE) || cin_isscopedecl(l))
+- {
+- ++curwin->w_cursor.lnum;
+- curwin->w_cursor.col = 0;
+- continue;
+- }
+- }
+-
+- /* When aligning with the case statement, don't align
+- * with a statement after it.
+- * case 1: { <-- don't use this { position
+- * stat;
+- * }
+- * case 2:
+- * stat;
+- * }
+- */
+- iscase = (curbuf->b_ind_keep_case_label
+- && cin_iscase(l, FALSE));
+-
+- /*
+- * Get indent and pointer to text for current line,
+- * ignoring any jump label.
+- */
+- amount = skip_label(curwin->w_cursor.lnum, &l);
+-
+- if (theline[0] == '{')
+- amount += curbuf->b_ind_open_extra;
+- /* See remark above: "Only add b_ind_open_extra.." */
+- l = skipwhite(l);
+- if (*l == '{')
+- amount -= curbuf->b_ind_open_extra;
+- lookfor = iscase ? LOOKFOR_ANY : LOOKFOR_TERM;
+-
+- /*
+- * When a terminated line starts with "else" skip to
+- * the matching "if":
+- * else 3;
+- * indent this;
+- * Need to use the scope of this "else". XXX
+- * If whilelevel != 0 continue looking for a "do {".
+- */
+- if (lookfor == LOOKFOR_TERM
+- && *l != '}'
+- && cin_iselse(l)
+- && whilelevel == 0)
+- {
+- if ((trypos = find_start_brace()) == NULL
+- || find_match(LOOKFOR_IF, trypos->lnum)
+- == FAIL)
+- break;
+- continue;
+- }
+-
+- /*
+- * If we're at the end of a block, skip to the start of
+- * that block.
+- */
+- l = ml_get_curline();
+- if (find_last_paren(l, '{', '}') /* XXX */
+- && (trypos = find_start_brace()) != NULL)
+- {
+- curwin->w_cursor = *trypos;
+- /* if not "else {" check for terminated again */
+- /* but skip block for "} else {" */
+- l = cin_skipcomment(ml_get_curline());
+- if (*l == '}' || !cin_iselse(l))
+- goto term_again;
+- ++curwin->w_cursor.lnum;
+- curwin->w_cursor.col = 0;
+- }
+- }
+- }
+- }
+- }
+- }
+-
+- /* add extra indent for a comment */
+- if (cin_iscomment(theline))
+- amount += curbuf->b_ind_comment;
+-
+- /* subtract extra left-shift for jump labels */
+- if (curbuf->b_ind_jump_label > 0 && original_line_islabel)
+- amount -= curbuf->b_ind_jump_label;
+-
+- goto theend;
+- }
+-
+- /*
+- * ok -- we're not inside any sort of structure at all!
+- *
+- * This means we're at the top level, and everything should
+- * basically just match where the previous line is, except
+- * for the lines immediately following a function declaration,
+- * which are K&R-style parameters and need to be indented.
+- *
+- * if our line starts with an open brace, forget about any
+- * prevailing indent and make sure it looks like the start
+- * of a function
+- */
+-
+- if (theline[0] == '{')
+- {
+- amount = curbuf->b_ind_first_open;
+- goto theend;
+- }
+-
+- /*
+- * If the NEXT line is a function declaration, the current
+- * line needs to be indented as a function type spec.
+- * Don't do this if the current line looks like a comment or if the
+- * current line is terminated, ie. ends in ';', or if the current line
+- * contains { or }: "void f() {\n if (1)"
+- */
+- if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
+- && !cin_nocode(theline)
+- && vim_strchr(theline, '{') == NULL
+- && vim_strchr(theline, '}') == NULL
+- && !cin_ends_in(theline, (char_u *)":", NULL)
+- && !cin_ends_in(theline, (char_u *)",", NULL)
+- && cin_isfuncdecl(NULL, cur_curpos.lnum + 1,
+- cur_curpos.lnum + 1)
+- && !cin_isterminated(theline, FALSE, TRUE))
+- {
+- amount = curbuf->b_ind_func_type;
+- goto theend;
+- }
+-
+- /* search backwards until we find something we recognize */
+- amount = 0;
+- curwin->w_cursor = cur_curpos;
+- while (curwin->w_cursor.lnum > 1)
+- {
+- curwin->w_cursor.lnum--;
+- curwin->w_cursor.col = 0;
+-
+- l = ml_get_curline();
+-
+- /*
+- * If we're in a comment or raw string now, skip to the start
+- * of it.
+- */ /* XXX */
+- if ((trypos = ind_find_start_CORS(NULL)) != NULL)
+- {
+- curwin->w_cursor.lnum = trypos->lnum + 1;
+- curwin->w_cursor.col = 0;
+- continue;
+- }
+-
+- /*
+- * Are we at the start of a cpp base class declaration or
+- * constructor initialization?
+- */ /* XXX */
+- n = FALSE;
+- if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{')
+- {
+- n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
+- l = ml_get_curline();
+- }
+- if (n)
+- {
+- /* XXX */
+- amount = get_baseclass_amount(cache_cpp_baseclass.lpos.col);
+- break;
+- }
+-
+- /*
+- * Skip preprocessor directives and blank lines.
+- */
+- if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount))
+- continue;
+-
+- if (cin_nocode(l))
+- continue;
+-
+- /*
+- * If the previous line ends in ',', use one level of
+- * indentation:
+- * int foo,
+- * bar;
+- * do this before checking for '}' in case of eg.
+- * enum foobar
+- * {
+- * ...
+- * } foo,
+- * bar;
+- */
+- n = 0;
+- if (cin_ends_in(l, (char_u *)",", NULL)
+- || (*l != NUL && (n = l[STRLEN(l) - 1]) == '\\'))
+- {
+- /* take us back to opening paren */
+- if (find_last_paren(l, '(', ')')
+- && (trypos = find_match_paren(
+- curbuf->b_ind_maxparen)) != NULL)
+- curwin->w_cursor = *trypos;
+-
+- /* For a line ending in ',' that is a continuation line go
+- * back to the first line with a backslash:
+- * char *foo = "bla\
+- * bla",
+- * here;
+- */
+- while (n == 0 && curwin->w_cursor.lnum > 1)
+- {
+- l = ml_get(curwin->w_cursor.lnum - 1);
+- if (*l == NUL || l[STRLEN(l) - 1] != '\\')
+- break;
+- --curwin->w_cursor.lnum;
+- curwin->w_cursor.col = 0;
+- }
+-
+- amount = get_indent(); /* XXX */
+-
+- if (amount == 0)
+- amount = cin_first_id_amount();
+- if (amount == 0)
+- amount = ind_continuation;
+- break;
+- }
+-
+- /*
+- * If the line looks like a function declaration, and we're
+- * not in a comment, put it the left margin.
+- */
+- if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0)) /* XXX */
+- break;
+- l = ml_get_curline();
+-
+- /*
+- * Finding the closing '}' of a previous function. Put
+- * current line at the left margin. For when 'cino' has "fs".
+- */
+- if (*skipwhite(l) == '}')
+- break;
+-
+- /* (matching {)
+- * If the previous line ends on '};' (maybe followed by
+- * comments) align at column 0. For example:
+- * char *string_array[] = { "foo",
+- * / * x * / "b};ar" }; / * foobar * /
+- */
+- if (cin_ends_in(l, (char_u *)"};", NULL))
+- break;
+-
+- /*
+- * If the previous line ends on '[' we are probably in an
+- * array constant:
+- * something = [
+- * 234, <- extra indent
+- */
+- if (cin_ends_in(l, (char_u *)"[", NULL))
+- {
+- amount = get_indent() + ind_continuation;
+- break;
+- }
+-
+- /*
+- * Find a line only has a semicolon that belongs to a previous
+- * line ending in '}', e.g. before an #endif. Don't increase
+- * indent then.
+- */
+- if (*(look = skipwhite(l)) == ';' && cin_nocode(look + 1))
+- {
+- pos_T curpos_save = curwin->w_cursor;
+-
+- while (curwin->w_cursor.lnum > 1)
+- {
+- look = ml_get(--curwin->w_cursor.lnum);
+- if (!(cin_nocode(look) || cin_ispreproc_cont(
+- &look, &curwin->w_cursor.lnum, &amount)))
+- break;
+- }
+- if (curwin->w_cursor.lnum > 0
+- && cin_ends_in(look, (char_u *)"}", NULL))
+- break;
+-
+- curwin->w_cursor = curpos_save;
+- }
+-
+- /*
+- * If the PREVIOUS line is a function declaration, the current
+- * line (and the ones that follow) needs to be indented as
+- * parameters.
+- */
+- if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
+- {
+- amount = curbuf->b_ind_param;
+- break;
+- }
+-
+- /*
+- * If the previous line ends in ';' and the line before the
+- * previous line ends in ',' or '\', ident to column zero:
+- * int foo,
+- * bar;
+- * indent_to_0 here;
+- */
+- if (cin_ends_in(l, (char_u *)";", NULL))
+- {
+- l = ml_get(curwin->w_cursor.lnum - 1);
+- if (cin_ends_in(l, (char_u *)",", NULL)
+- || (*l != NUL && l[STRLEN(l) - 1] == '\\'))
+- break;
+- l = ml_get_curline();
+- }
+-
+- /*
+- * Doesn't look like anything interesting -- so just
+- * use the indent of this line.
+- *
+- * Position the cursor over the rightmost paren, so that
+- * matching it will take us back to the start of the line.
+- */
+- find_last_paren(l, '(', ')');
+-
+- if ((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
+- curwin->w_cursor = *trypos;
+- amount = get_indent(); /* XXX */
+- break;
+- }
+-
+- /* add extra indent for a comment */
+- if (cin_iscomment(theline))
+- amount += curbuf->b_ind_comment;
+-
+- /* add extra indent if the previous line ended in a backslash:
+- * "asdfasdf\
+- * here";
+- * char *foo = "asdf\
+- * here";
+- */
+- if (cur_curpos.lnum > 1)
+- {
+- l = ml_get(cur_curpos.lnum - 1);
+- if (*l != NUL && l[STRLEN(l) - 1] == '\\')
+- {
+- cur_amount = cin_get_equal_amount(cur_curpos.lnum - 1);
+- if (cur_amount > 0)
+- amount = cur_amount;
+- else if (cur_amount == 0)
+- amount += ind_continuation;
+- }
+- }
+-
+- theend:
+- if (amount < 0)
+- amount = 0;
+-
+- laterend:
+- /* put the cursor back where it belongs */
+- curwin->w_cursor = cur_curpos;
+-
+- vim_free(linecopy);
+-
+- return amount;
+- }
+-
+- static int
+- find_match(int lookfor, linenr_T ourscope)
+- {
+- char_u *look;
+- pos_T *theirscope;
+- char_u *mightbeif;
+- int elselevel;
+- int whilelevel;
+-
+- if (lookfor == LOOKFOR_IF)
+- {
+- elselevel = 1;
+- whilelevel = 0;
+- }
+- else
+- {
+- elselevel = 0;
+- whilelevel = 1;
+- }
+-
+- curwin->w_cursor.col = 0;
+-
+- while (curwin->w_cursor.lnum > ourscope + 1)
+- {
+- curwin->w_cursor.lnum--;
+- curwin->w_cursor.col = 0;
+-
+- look = cin_skipcomment(ml_get_curline());
+- if (cin_iselse(look)
+- || cin_isif(look)
+- || cin_isdo(look) /* XXX */
+- || cin_iswhileofdo(look, curwin->w_cursor.lnum))
+- {
+- /*
+- * if we've gone outside the braces entirely,
+- * we must be out of scope...
+- */
+- theirscope = find_start_brace(); /* XXX */
+- if (theirscope == NULL)
+- break;
+-
+- /*
+- * and if the brace enclosing this is further
+- * back than the one enclosing the else, we're
+- * out of luck too.
+- */
+- if (theirscope->lnum < ourscope)
+- break;
+-
+- /*
+- * and if they're enclosed in a *deeper* brace,
+- * then we can ignore it because it's in a
+- * different scope...
+- */
+- if (theirscope->lnum > ourscope)
+- continue;
+-
+- /*
+- * if it was an "else" (that's not an "else if")
+- * then we need to go back to another if, so
+- * increment elselevel
+- */
+- look = cin_skipcomment(ml_get_curline());
+- if (cin_iselse(look))
+- {
+- mightbeif = cin_skipcomment(look + 4);
+- if (!cin_isif(mightbeif))
+- ++elselevel;
+- continue;
+- }
+-
+- /*
+- * if it was a "while" then we need to go back to
+- * another "do", so increment whilelevel. XXX
+- */
+- if (cin_iswhileofdo(look, curwin->w_cursor.lnum))
+- {
+- ++whilelevel;
+- continue;
+- }
+-
+- /* If it's an "if" decrement elselevel */
+- look = cin_skipcomment(ml_get_curline());
+- if (cin_isif(look))
+- {
+- elselevel--;
+- /*
+- * When looking for an "if" ignore "while"s that
+- * get in the way.
+- */
+- if (elselevel == 0 && lookfor == LOOKFOR_IF)
+- whilelevel = 0;
+- }
+-
+- /* If it's a "do" decrement whilelevel */
+- if (cin_isdo(look))
+- whilelevel--;
+-
+- /*
+- * if we've used up all the elses, then
+- * this must be the if that we want!
+- * match the indent level of that if.
+- */
+- if (elselevel <= 0 && whilelevel <= 0)
+- {
+- return OK;
+- }
+- }
+- }
+- return FAIL;
+- }
+-
+- # if defined(FEAT_EVAL) || defined(PROTO)
+- /*
+- * Get indent level from 'indentexpr'.
+- */
+- int
+- get_expr_indent(void)
+- {
+- int indent = -1;
+- char_u *inde_copy;
+- pos_T save_pos;
+- colnr_T save_curswant;
+- int save_set_curswant;
+- int save_State;
+- int use_sandbox = was_set_insecurely((char_u *)"indentexpr",
+- OPT_LOCAL);
+-
+- /* Save and restore cursor position and curswant, in case it was changed
+- * via :normal commands */
+- save_pos = curwin->w_cursor;
+- save_curswant = curwin->w_curswant;
+- save_set_curswant = curwin->w_set_curswant;
+- set_vim_var_nr(VV_LNUM, curwin->w_cursor.lnum);
+- if (use_sandbox)
+- ++sandbox;
+- ++textlock;
+-
+- /* Need to make a copy, the 'indentexpr' option could be changed while
+- * evaluating it. */
+- inde_copy = vim_strsave(curbuf->b_p_inde);
+- if (inde_copy != NULL)
+- {
+- indent = (int)eval_to_number(inde_copy);
+- vim_free(inde_copy);
+- }
+-
+- if (use_sandbox)
+- --sandbox;
+- --textlock;
+-
+- /* Restore the cursor position so that 'indentexpr' doesn't need to.
+- * Pretend to be in Insert mode, allow cursor past end of line for "o"
+- * command. */
+- save_State = State;
+- State = INSERT;
+- curwin->w_cursor = save_pos;
+- curwin->w_curswant = save_curswant;
+- curwin->w_set_curswant = save_set_curswant;
+- check_cursor();
+- State = save_State;
+-
+- /* If there is an error, just keep the current indent. */
+- if (indent < 0)
+- indent = get_indent();
+-
+- return indent;
+- }
+- # endif
+-
+- #endif /* FEAT_CINDENT */
+-
+- #if defined(FEAT_LISP) || defined(PROTO)
+-
+- static int
+- lisp_match(char_u *p)
+- {
+- char_u buf[LSIZE];
+- int len;
+- char_u *word = *curbuf->b_p_lw != NUL ? curbuf->b_p_lw : p_lispwords;
+-
+- while (*word != NUL)
+- {
+- (void)copy_option_part(&word, buf, LSIZE, ",");
+- len = (int)STRLEN(buf);
+- if (STRNCMP(buf, p, len) == 0 && p[len] == ' ')
+- return TRUE;
+- }
+- return FALSE;
+- }
+-
+- /*
+- * When 'p' is present in 'cpoptions, a Vi compatible method is used.
+- * The incompatible newer method is quite a bit better at indenting
+- * code in lisp-like languages than the traditional one; it's still
+- * mostly heuristics however -- Dirk van Deun, dirk@rave.org
+- *
+- * TODO:
+- * Findmatch() should be adapted for lisp, also to make showmatch
+- * work correctly: now (v5.3) it seems all C/C++ oriented:
+- * - it does not recognize the #\( and #\) notations as character literals
+- * - it doesn't know about comments starting with a semicolon
+- * - it incorrectly interprets '(' as a character literal
+- * All this messes up get_lisp_indent in some rare cases.
+- * Update from Sergey Khorev:
+- * I tried to fix the first two issues.
+- */
+- int
+- get_lisp_indent(void)
+- {
+- pos_T *pos, realpos, paren;
+- int amount;
+- char_u *that;
+- colnr_T col;
+- colnr_T firsttry;
+- int parencount, quotecount;
+- int vi_lisp;
+-
+- /* Set vi_lisp to use the vi-compatible method */
+- vi_lisp = (vim_strchr(p_cpo, CPO_LISP) != NULL);
+-
+- realpos = curwin->w_cursor;
+- curwin->w_cursor.col = 0;
+-
+- if ((pos = findmatch(NULL, '(')) == NULL)
+- pos = findmatch(NULL, '[');
+- else
+- {
+- paren = *pos;
+- pos = findmatch(NULL, '[');
+- if (pos == NULL || LT_POSP(pos, &paren))
+- pos = &paren;
+- }
+- if (pos != NULL)
+- {
+- /* Extra trick: Take the indent of the first previous non-white
+- * line that is at the same () level. */
+- amount = -1;
+- parencount = 0;
+-
+- while (--curwin->w_cursor.lnum >= pos->lnum)
+- {
+- if (linewhite(curwin->w_cursor.lnum))
+- continue;
+- for (that = ml_get_curline(); *that != NUL; ++that)
+- {
+- if (*that == ';')
+- {
+- while (*(that + 1) != NUL)
+- ++that;
+- continue;
+- }
+- if (*that == '\\')
+- {
+- if (*(that + 1) != NUL)
+- ++that;
+- continue;
+- }
+- if (*that == '"' && *(that + 1) != NUL)
+- {
+- while (*++that && *that != '"')
+- {
+- /* skipping escaped characters in the string */
+- if (*that == '\\')
+- {
+- if (*++that == NUL)
+- break;
+- if (that[1] == NUL)
+- {
+- ++that;
+- break;
+- }
+- }
+- }
+- }
+- if (*that == '(' || *that == '[')
+- ++parencount;
+- else if (*that == ')' || *that == ']')
+- --parencount;
+- }
+- if (parencount == 0)
+- {
+- amount = get_indent();
+- break;
+- }
+- }
+-
+- if (amount == -1)
+- {
+- curwin->w_cursor.lnum = pos->lnum;
+- curwin->w_cursor.col = pos->col;
+- col = pos->col;
+-
+- that = ml_get_curline();
+-
+- if (vi_lisp && get_indent() == 0)
+- amount = 2;
+- else
+- {
+- char_u *line = that;
+-
+- amount = 0;
+- while (*that && col)
+- {
+- amount += lbr_chartabsize_adv(line, &that, (colnr_T)amount);
+- col--;
+- }
+-
+- /*
+- * Some keywords require "body" indenting rules (the
+- * non-standard-lisp ones are Scheme special forms):
+- *
+- * (let ((a 1)) instead (let ((a 1))
+- * (...)) of (...))
+- */
+-
+- if (!vi_lisp && (*that == '(' || *that == '[')
+- && lisp_match(that + 1))
+- amount += 2;
+- else
+- {
+- that++;
+- amount++;
+- firsttry = amount;
+-
+- while (VIM_ISWHITE(*that))
+- {
+- amount += lbr_chartabsize(line, that, (colnr_T)amount);
+- ++that;
+- }
+-
+- if (*that && *that != ';') /* not a comment line */
+- {
+- /* test *that != '(' to accommodate first let/do
+- * argument if it is more than one line */
+- if (!vi_lisp && *that != '(' && *that != '[')
+- firsttry++;
+-
+- parencount = 0;
+- quotecount = 0;
+-
+- if (vi_lisp
+- || (*that != '"'
+- && *that != '\''
+- && *that != '#'
+- && (*that < '0' || *that > '9')))
+- {
+- while (*that
+- && (!VIM_ISWHITE(*that)
+- || quotecount
+- || parencount)
+- && (!((*that == '(' || *that == '[')
+- && !quotecount
+- && !parencount
+- && vi_lisp)))
+- {
+- if (*that == '"')
+- quotecount = !quotecount;
+- if ((*that == '(' || *that == '[')
+- && !quotecount)
+- ++parencount;
+- if ((*that == ')' || *that == ']')
+- && !quotecount)
+- --parencount;
+- if (*that == '\\' && *(that+1) != NUL)
+- amount += lbr_chartabsize_adv(
+- line, &that, (colnr_T)amount);
+- amount += lbr_chartabsize_adv(
+- line, &that, (colnr_T)amount);
+- }
+- }
+- while (VIM_ISWHITE(*that))
+- {
+- amount += lbr_chartabsize(
+- line, that, (colnr_T)amount);
+- that++;
+- }
+- if (!*that || *that == ';')
+- amount = firsttry;
+- }
+- }
+- }
+- }
+- }
+- else
+- amount = 0; /* no matching '(' or '[' found, use zero indent */
+-
+- curwin->w_cursor = realpos;
+-
+- return amount;
+- }
+- #endif /* FEAT_LISP */
+-
+ void
+ prepare_to_exit(void)
+ {
+--- 5369,5374 ----
+*** ../vim-8.1.0856/src/proto.h 2019-01-26 16:20:44.264683546 +0100
+--- src/proto.h 2019-01-31 13:43:23.356467234 +0100
+***************
+*** 87,92 ****
+--- 87,93 ----
+ # endif
+ # include "hardcopy.pro"
+ # include "hashtab.pro"
++ # include "indent.pro"
+ # include "json.pro"
+ # include "list.pro"
+ # include "blob.pro"
+*** ../vim-8.1.0856/src/proto/edit.pro 2018-11-22 03:07:30.948596188 +0100
+--- src/proto/edit.pro 2019-01-31 13:45:12.275722540 +0100
+***************
+*** 38,46 ****
+ char_u *get_last_insert_save(void);
+ void replace_push(int c);
+ int replace_push_mb(char_u *p);
+- void fixthisline(int (*get_the_indent)(void));
+- void fix_indent(void);
+- int in_cinkeys(int keytyped, int when, int line_is_empty);
+ int hkmap(int c);
+ int bracketed_paste(paste_mode_T mode, int drop, garray_T *gap);
+ void ins_scroll(void);
+--- 38,43 ----
+*** ../vim-8.1.0856/src/proto/indent.pro 2019-01-31 13:47:08.570924989 +0100
+--- src/proto/indent.pro 2019-01-31 13:45:17.403687423 +0100
+***************
+*** 0 ****
+--- 1,16 ----
++ /* indent.c */
++ int cin_is_cinword(char_u *line);
++ pos_T *find_start_comment(int ind_maxcomment);
++ int cindent_on(void);
++ int cin_islabel(void);
++ int cin_iscase(char_u *s, int strict);
++ int cin_isscopedecl(char_u *s);
++ void parse_cino(buf_T *buf);
++ int get_c_indent(void);
++ int get_expr_indent(void);
++ int in_cinkeys(int keytyped, int when, int line_is_empty);
++ int get_lisp_indent(void);
++ void do_c_expr_indent(void);
++ void fixthisline(int (*get_the_indent)(void));
++ void fix_indent(void);
++ /* vim: set ft=c : */
+*** ../vim-8.1.0856/src/proto/misc1.pro 2019-01-02 00:02:07.607556145 +0100
+--- src/proto/misc1.pro 2019-01-31 13:45:20.359667178 +0100
+***************
+*** 83,97 ****
+ char_u *concat_str(char_u *str1, char_u *str2);
+ void add_pathsep(char_u *p);
+ char_u *FullName_save(char_u *fname, int force);
+- pos_T *find_start_comment(int ind_maxcomment);
+- void do_c_expr_indent(void);
+- int cin_islabel(void);
+- int cin_iscase(char_u *s, int strict);
+- int cin_isscopedecl(char_u *s);
+- void parse_cino(buf_T *buf);
+- int get_c_indent(void);
+- int get_expr_indent(void);
+- int get_lisp_indent(void);
+ void prepare_to_exit(void);
+ void preserve_exit(void);
+ int vim_fexists(char_u *fname);
+--- 83,88 ----
+*** ../vim-8.1.0856/src/version.c 2019-01-31 13:22:28.068543628 +0100
+--- src/version.c 2019-01-31 13:45:27.287619720 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 857,
+ /**/
+
+--
+ [SIR LAUNCELOT runs back up the stairs, grabs a rope
+ of the wall and swings out over the heads of the CROWD in a
+ swashbuckling manner towards a large window. He stops just short
+ of the window and is left swing pathetically back and forth.]
+LAUNCELOT: Excuse me ... could somebody give me a push ...
+ "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.0858 b/data/vim/patches/8.1.0858
new file mode 100644
index 000000000..7c9110766
--- /dev/null
+++ b/data/vim/patches/8.1.0858
@@ -0,0 +1,146 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0858
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0858
+Problem: 'indentkeys' and 'cinkeys' defaults are different.
+Solution: Make them the same, update docs. (close #3882)
+Files: src/option.c, runtime/doc/options.txt, runtime/doc/indent.txt
+
+
+*** ../vim-8.1.0857/src/option.c 2019-01-26 17:28:22.232599086 +0100
+--- src/option.c 2019-01-31 13:54:40.403784083 +0100
+***************
+*** 483,488 ****
+--- 483,491 ----
+ # define DEFAULT_PYTHON_VER 0
+ #endif
+
++ // used for 'cinkeys' and 'indentkeys'
++ #define INDENTKEYS_DEFAULT (char_u *)"0{,0},0),0],:,0#,!^F,o,O,e"
++
+ /*
+ * options[] is initialized here.
+ * The order of the options MUST be alphabetic for ":set all" and findoption().
+***************
+*** 757,763 ****
+ {"cinkeys", "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_CINDENT
+ (char_u *)&p_cink, PV_CINK,
+! {(char_u *)"0{,0},0),:,0#,!^F,o,O,e", (char_u *)0L}
+ #else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+--- 760,766 ----
+ {"cinkeys", "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_CINDENT
+ (char_u *)&p_cink, PV_CINK,
+! {INDENTKEYS_DEFAULT, (char_u *)0L}
+ #else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+***************
+*** 1570,1576 ****
+ {"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,
+! {(char_u *)"0{,0},:,0#,!^F,o,O,e", (char_u *)0L}
+ #else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+--- 1573,1579 ----
+ {"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,
+! {INDENTKEYS_DEFAULT, (char_u *)0L}
+ #else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+*** ../vim-8.1.0857/runtime/doc/options.txt 2019-01-16 22:41:50.091917818 +0100
+--- runtime/doc/options.txt 2019-01-31 13:56:21.531061679 +0100
+***************
+*** 1560,1566 ****
+ NOTE: This option is reset when 'compatible' is set.
+
+ *'cinkeys'* *'cink'*
+! 'cinkeys' 'cink' string (default "0{,0},0),:,0#,!^F,o,O,e")
+ local to buffer
+ {not in Vi}
+ {not available when compiled without the |+cindent|
+--- 1564,1570 ----
+ NOTE: This option is reset when 'compatible' is set.
+
+ *'cinkeys'* *'cink'*
+! 'cinkeys' 'cink' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
+ local to buffer
+ {not in Vi}
+ {not available when compiled without the |+cindent|
+***************
+*** 4567,4573 ****
+
+
+ *'indentkeys'* *'indk'*
+! 'indentkeys' 'indk' string (default "0{,0},:,0#,!^F,o,O,e")
+ local to buffer
+ {not in Vi}
+ {not available when compiled without the |+cindent|
+--- 4607,4613 ----
+
+
+ *'indentkeys'* *'indk'*
+! 'indentkeys' 'indk' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
+ local to buffer
+ {not in Vi}
+ {not available when compiled without the |+cindent|
+*** ../vim-8.1.0857/runtime/doc/indent.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/indent.txt 2019-01-31 13:57:05.406749188 +0100
+***************
+*** 60,71 ****
+ only triggers C-indenting. When 'indentexpr' is not empty 'indentkeys' is
+ used instead. The format of 'cinkeys' and 'indentkeys' is equal.
+
+! The default is "0{,0},0),:,0#,!^F,o,O,e" which specifies that indenting occurs
+! as follows:
+
+ "0{" if you type '{' as the first character in a line
+ "0}" if you type '}' as the first character in a line
+ "0)" if you type ')' as the first character in a line
+ ":" if you type ':' after a label or case statement
+ "0#" if you type '#' as the first character in a line
+ "!^F" if you type CTRL-F (which is not inserted)
+--- 60,72 ----
+ only triggers C-indenting. When 'indentexpr' is not empty 'indentkeys' is
+ used instead. The format of 'cinkeys' and 'indentkeys' is equal.
+
+! The default is "0{,0},0),0],:,0#,!^F,o,O,e" which specifies that indenting
+! occurs as follows:
+
+ "0{" if you type '{' as the first character in a line
+ "0}" if you type '}' as the first character in a line
+ "0)" if you type ')' as the first character in a line
++ "0]" if you type ']' as the first character in a line
+ ":" if you type ':' after a label or case statement
+ "0#" if you type '#' as the first character in a line
+ "!^F" if you type CTRL-F (which is not inserted)
+*** ../vim-8.1.0857/src/version.c 2019-01-31 13:47:51.126632619 +0100
+--- src/version.c 2019-01-31 13:57:24.010616842 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 858,
+ /**/
+
+--
+There are three kinds of people: Those who can count & 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.0859 b/data/vim/patches/8.1.0859
new file mode 100644
index 000000000..47d9d6a7b
--- /dev/null
+++ b/data/vim/patches/8.1.0859
@@ -0,0 +1,153 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0859
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0859
+Problem: "%v" in 'errorformat' does handle multi-byte characters.
+Solution: Handle multi-byte characters. (Yegappan Lakshmanan, closes #3700)
+Files: src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0858/src/quickfix.c 2019-01-26 17:43:16.226527267 +0100
+--- src/quickfix.c 2019-01-31 14:24:27.575216468 +0100
+***************
+*** 3047,3055 ****
+ char_u *qf_pattern)
+ {
+ linenr_T i;
+- char_u *line;
+- colnr_T screen_col;
+- colnr_T char_col;
+
+ if (qf_pattern == NULL)
+ {
+--- 3047,3052 ----
+***************
+*** 3063,3091 ****
+ }
+ if (qf_col > 0)
+ {
+- curwin->w_cursor.col = qf_col - 1;
+ curwin->w_cursor.coladd = 0;
+ 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)
+! {
+! if (*line == NUL)
+! break;
+! if (*line++ == '\t')
+! {
+! curwin->w_cursor.col -= 7 - (screen_col % 8);
+! screen_col += 8 - (screen_col % 8);
+! }
+! else
+! ++screen_col;
+! }
+! }
+ curwin->w_set_curswant = TRUE;
+ check_cursor();
+ }
+--- 3060,3070 ----
+ }
+ if (qf_col > 0)
+ {
+ curwin->w_cursor.coladd = 0;
+ if (qf_viscol == TRUE)
+! coladvance(qf_col - 1);
+! else
+! curwin->w_cursor.col = qf_col - 1;
+ curwin->w_set_curswant = TRUE;
+ check_cursor();
+ }
+*** ../vim-8.1.0858/src/testdir/test_quickfix.vim 2019-01-11 14:49:25.380107431 +0100
+--- src/testdir/test_quickfix.vim 2019-01-31 14:26:43.042269859 +0100
+***************
+*** 3843,3845 ****
+--- 3843,3901 ----
+ call delete('Xtestfile1')
+ call delete('Xtestfile2')
+ endfunc
++
++ " Test for parsing entries using visual screen column
++ func Test_viscol()
++ enew
++ call writefile(["Col1\tCol2\tCol3"], 'Xfile1')
++ edit Xfile1
++
++ " Use byte offset for column number
++ set efm&
++ cexpr "Xfile1:1:5:XX\nXfile1:1:9:YY\nXfile1:1:20:ZZ"
++ call assert_equal([5, 8], [col('.'), virtcol('.')])
++ cnext
++ call assert_equal([9, 12], [col('.'), virtcol('.')])
++ cnext
++ call assert_equal([14, 20], [col('.'), virtcol('.')])
++
++ " Use screen column offset for column number
++ set efm=%f:%l:%v:%m
++ cexpr "Xfile1:1:8:XX\nXfile1:1:12:YY\nXfile1:1:20:ZZ"
++ call assert_equal([5, 8], [col('.'), virtcol('.')])
++ cnext
++ call assert_equal([9, 12], [col('.'), virtcol('.')])
++ cnext
++ call assert_equal([14, 20], [col('.'), virtcol('.')])
++ cexpr "Xfile1:1:6:XX\nXfile1:1:15:YY\nXfile1:1:24:ZZ"
++ call assert_equal([5, 8], [col('.'), virtcol('.')])
++ cnext
++ call assert_equal([10, 16], [col('.'), virtcol('.')])
++ cnext
++ call assert_equal([14, 20], [col('.'), virtcol('.')])
++
++ enew
++ call writefile(["Col1\täü\töß\tCol4"], 'Xfile1')
++
++ " Use byte offset for column number
++ set efm&
++ cexpr "Xfile1:1:8:XX\nXfile1:1:11:YY\nXfile1:1:16:ZZ"
++ call assert_equal([8, 10], [col('.'), virtcol('.')])
++ cnext
++ call assert_equal([11, 17], [col('.'), virtcol('.')])
++ cnext
++ call assert_equal([16, 25], [col('.'), virtcol('.')])
++
++ " Use screen column offset for column number
++ set efm=%f:%l:%v:%m
++ cexpr "Xfile1:1:10:XX\nXfile1:1:17:YY\nXfile1:1:25:ZZ"
++ call assert_equal([8, 10], [col('.'), virtcol('.')])
++ cnext
++ call assert_equal([11, 17], [col('.'), virtcol('.')])
++ cnext
++ call assert_equal([16, 25], [col('.'), virtcol('.')])
++
++ enew | only
++ set efm&
++ call delete('Xfile1')
++ endfunc
+*** ../vim-8.1.0858/src/version.c 2019-01-31 14:12:52.760076333 +0100
+--- src/version.c 2019-01-31 14:22:32.848018305 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 859,
+ /**/
+
+--
+There are 10 kinds of people: Those who understand binary and those who don'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.0860 b/data/vim/patches/8.1.0860
new file mode 100644
index 000000000..67b75cc65
--- /dev/null
+++ b/data/vim/patches/8.1.0860
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0860
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0860
+Problem: Debug lines left in the code.
+Solution: Delete the lines.
+Files: src/edit.c
+
+
+*** ../vim-8.1.0859/src/edit.c 2019-01-31 13:47:51.122632648 +0100
+--- src/edit.c 2019-01-31 14:28:34.573527923 +0100
+***************
+*** 377,383 ****
+ ins_compl_clear(); /* clear stuff for CTRL-X mode */
+ #endif
+
+- ch_log(NULL, "ENTERING Insert mode");
+ /*
+ * Trigger InsertEnter autocommands. Do not do this for "r<CR>" or "grx".
+ */
+--- 377,382 ----
+***************
+*** 1048,1054 ****
+ if (cmdchar != 'r' && cmdchar != 'v' && c != Ctrl_C)
+ ins_apply_autocmds(EVENT_INSERTLEAVE);
+ did_cursorhold = FALSE;
+- ch_log(NULL, "LEAVING Insert mode");
+ return (c == Ctrl_O);
+ }
+ continue;
+--- 1047,1052 ----
+*** ../vim-8.1.0859/src/version.c 2019-01-31 14:27:01.238142723 +0100
+--- src/version.c 2019-01-31 14:29:30.141161426 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 860,
+ /**/
+
+--
+Mental Floss prevents moral decay!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0861 b/data/vim/patches/8.1.0861
new file mode 100644
index 000000000..273c48a1f
--- /dev/null
+++ b/data/vim/patches/8.1.0861
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0861
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0861
+Problem: Building with MinGW and static libc doesn't work.
+Solution: Change the LIB argument. (Ken Takata)
+Files: src/Make_cyg_ming.mak
+
+
+*** ../vim-8.1.0860/src/Make_cyg_ming.mak 2019-01-31 13:47:51.118632672 +0100
+--- src/Make_cyg_ming.mak 2019-01-31 14:40:58.084513485 +0100
+***************
+*** 931,937 ****
+ ifeq (yes, $(USE_STDCPLUS))
+ LINK = $(CXX)
+ ifeq (yes, $(STATIC_STDCPLUS))
+! LIB += -static-libstdc++ -static-libgcc
+ endif
+ else
+ LINK = $(CC)
+--- 931,938 ----
+ ifeq (yes, $(USE_STDCPLUS))
+ LINK = $(CXX)
+ ifeq (yes, $(STATIC_STDCPLUS))
+! #LIB += -static-libstdc++ -static-libgcc
+! LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
+ endif
+ else
+ LINK = $(CC)
+*** ../vim-8.1.0860/src/version.c 2019-01-31 14:29:38.777104291 +0100
+--- src/version.c 2019-01-31 14:42:47.019766585 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 861,
+ /**/
+
+--
+Be nice to your kids... they'll be the ones choosing your nursing 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.0862 b/data/vim/patches/8.1.0862
new file mode 100644
index 000000000..8db63eb1a
--- /dev/null
+++ b/data/vim/patches/8.1.0862
@@ -0,0 +1,276 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0862
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0862
+Problem: No verbose version of character classes.
+Solution: Add [:ident:], [:keyword:] and [:fname:]. (Ozaki Kiichi,
+ closes #1373)
+Files: runtime/doc/pattern.txt, src/regexp.c, src/regexp_nfa.c,
+ src/testdir/test_regexp_utf8.vim
+
+
+*** ../vim-8.1.0861/runtime/doc/pattern.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/pattern.txt 2019-01-31 15:29:27.222082798 +0100
+***************
+*** 1110,1115 ****
+--- 1118,1126 ----
+ *[:tab:]* [:tab:] the <Tab> character
+ *[:escape:]* [:escape:] the <Esc> character
+ *[:backspace:]* [:backspace:] the <BS> character
++ *[:ident:]* [:ident:] identifier character (same as "\i")
++ *[:keyword:]* [:keyword:] keyword character (same as "\k")
++ *[:fname:]* [:fname:] file name character (same as "\f")
+ The brackets in character class expressions are additional to the
+ brackets delimiting a collection. For example, the following is a
+ plausible pattern for a UNIX filename: "[-./[:alnum:]_~]\+" That is,
+*** ../vim-8.1.0861/src/regexp.c 2019-01-24 16:38:58.276712445 +0100
+--- src/regexp.c 2019-01-31 15:29:27.222082798 +0100
+***************
+*** 484,489 ****
+--- 484,495 ----
+ #define CLASS_BACKSPACE 14
+ "escape:]",
+ #define CLASS_ESCAPE 15
++ "ident:]",
++ #define CLASS_IDENT 16
++ "keyword:]",
++ #define CLASS_KEYWORD 17
++ "fname:]",
++ #define CLASS_FNAME 18
+ };
+ #define CLASS_NONE 99
+ int i;
+***************
+*** 698,703 ****
+--- 704,710 ----
+ static int read_limits(long *, long *);
+ static void regtail(char_u *, char_u *);
+ static void regoptail(char_u *, char_u *);
++ static int reg_iswordc(int);
+
+ static regengine_T bt_regengine;
+ static regengine_T nfa_regengine;
+***************
+*** 2545,2550 ****
+--- 2552,2572 ----
+ case CLASS_ESCAPE:
+ regc('\033');
+ break;
++ case CLASS_IDENT:
++ for (cu = 1; cu <= 255; cu++)
++ if (vim_isIDc(cu))
++ regmbc(cu);
++ break;
++ case CLASS_KEYWORD:
++ for (cu = 1; cu <= 255; cu++)
++ if (reg_iswordc(cu))
++ regmbc(cu);
++ break;
++ case CLASS_FNAME:
++ for (cu = 1; cu <= 255; cu++)
++ if (vim_isfilec(cu))
++ regmbc(cu);
++ break;
+ }
+ }
+ else
+***************
+*** 3590,3595 ****
+--- 3612,3627 ----
+ #endif
+
+ /*
++ * Return TRUE if character 'c' is included in 'iskeyword' option for
++ * "reg_buf" buffer.
++ */
++ static int
++ reg_iswordc(int c)
++ {
++ return vim_iswordc_buf(c, rex.reg_buf);
++ }
++
++ /*
+ * Get pointer to the line "lnum", which is relative to "reg_firstlnum".
+ */
+ static char_u *
+*** ../vim-8.1.0861/src/regexp_nfa.c 2019-01-24 16:38:58.276712445 +0100
+--- src/regexp_nfa.c 2019-01-31 15:29:27.222082798 +0100
+***************
+*** 226,232 ****
+ NFA_CLASS_TAB,
+ NFA_CLASS_RETURN,
+ NFA_CLASS_BACKSPACE,
+! NFA_CLASS_ESCAPE
+ };
+
+ /* Keep in sync with classchars. */
+--- 226,235 ----
+ NFA_CLASS_TAB,
+ NFA_CLASS_RETURN,
+ NFA_CLASS_BACKSPACE,
+! NFA_CLASS_ESCAPE,
+! NFA_CLASS_IDENT,
+! NFA_CLASS_KEYWORD,
+! NFA_CLASS_FNAME
+ };
+
+ /* Keep in sync with classchars. */
+***************
+*** 1718,1723 ****
+--- 1721,1735 ----
+ case CLASS_ESCAPE:
+ EMIT(NFA_CLASS_ESCAPE);
+ break;
++ case CLASS_IDENT:
++ EMIT(NFA_CLASS_IDENT);
++ break;
++ case CLASS_KEYWORD:
++ EMIT(NFA_CLASS_KEYWORD);
++ break;
++ case CLASS_FNAME:
++ EMIT(NFA_CLASS_FNAME);
++ break;
+ }
+ EMIT(NFA_CONCAT);
+ continue;
+***************
+*** 2555,2560 ****
+--- 2567,2575 ----
+ case NFA_CLASS_RETURN: STRCPY(code, "NFA_CLASS_RETURN"); break;
+ case NFA_CLASS_BACKSPACE: STRCPY(code, "NFA_CLASS_BACKSPACE"); break;
+ case NFA_CLASS_ESCAPE: STRCPY(code, "NFA_CLASS_ESCAPE"); break;
++ case NFA_CLASS_IDENT: STRCPY(code, "NFA_CLASS_IDENT"); break;
++ case NFA_CLASS_KEYWORD: STRCPY(code, "NFA_CLASS_KEYWORD"); break;
++ case NFA_CLASS_FNAME: STRCPY(code, "NFA_CLASS_FNAME"); break;
+
+ case NFA_ANY: STRCPY(code, "NFA_ANY"); break;
+ case NFA_IDENT: STRCPY(code, "NFA_IDENT"); break;
+***************
+*** 4846,4851 ****
+--- 4861,4878 ----
+ if (c == '\033')
+ return OK;
+ break;
++ case NFA_CLASS_IDENT:
++ if (vim_isIDc(c))
++ return OK;
++ break;
++ case NFA_CLASS_KEYWORD:
++ if (reg_iswordc(c))
++ return OK;
++ break;
++ case NFA_CLASS_FNAME:
++ if (vim_isfilec(c))
++ return OK;
++ break;
+
+ default:
+ /* should not be here :P */
+*** ../vim-8.1.0861/src/testdir/test_regexp_utf8.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_regexp_utf8.vim 2019-01-31 15:29:27.222082798 +0100
+***************
+*** 51,56 ****
+--- 51,62 ----
+ let tabchar = ''
+ let upperchars = ''
+ let xdigitchars = ''
++ let identchars = ''
++ let identchars1 = ''
++ let kwordchars = ''
++ let kwordchars1 = ''
++ let fnamechars = ''
++ let fnamechars1 = ''
+ let i = 1
+ while i <= 255
+ let c = nr2char(i)
+***************
+*** 102,107 ****
+--- 108,131 ----
+ if c =~ '[[:xdigit:]]'
+ let xdigitchars .= c
+ endif
++ if c =~ '[[:ident:]]'
++ let identchars .= c
++ endif
++ if c =~ '\i'
++ let identchars1 .= c
++ endif
++ if c =~ '[[:keyword:]]'
++ let kwordchars .= c
++ endif
++ if c =~ '\k'
++ let kwordchars1 .= c
++ endif
++ if c =~ '[[:fname:]]'
++ let fnamechars .= c
++ endif
++ if c =~ '\f'
++ let fnamechars1 .= c
++ endif
+ let i += 1
+ endwhile
+
+***************
+*** 121,126 ****
+--- 145,181 ----
+ call assert_equal("\t\n\x0b\f\r ", spacechars)
+ call assert_equal("\t", tabchar)
+ call assert_equal('0123456789ABCDEFabcdef', xdigitchars)
++
++ if has('win32')
++ let identchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'
++ let kwordchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzµÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
++ elseif has('ebcdic')
++ let identchars_ok = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz€ŒŽœž¬®µº¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
++ let kwordchars_ok = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz€ŒŽœž¬®µº¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
++ else
++ let identchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzµÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
++ let kwordchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzµÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
++ endif
++
++ if has('win32')
++ let fnamechars_ok = '!#$%+,-./0123456789:=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]_abcdefghijklmnopqrstuvwxyz{}~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
++ elseif has('amiga')
++ let fnamechars_ok = '$+,-./0123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
++ elseif has('vms')
++ let fnamechars_ok = '#$%+,-./0123456789:;<>ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
++ elseif has('ebcdic')
++ let fnamechars_ok = '#$%+,-./=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
++ else
++ let fnamechars_ok = '#$%+,-./0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
++ endif
++
++ call assert_equal(identchars_ok, identchars)
++ call assert_equal(kwordchars_ok, kwordchars)
++ call assert_equal(fnamechars_ok, fnamechars)
++
++ call assert_equal(identchars1, identchars)
++ call assert_equal(kwordchars1, kwordchars)
++ call assert_equal(fnamechars1, fnamechars)
+ endfunc
+
+ func Test_classes_re1()
+*** ../vim-8.1.0861/src/version.c 2019-01-31 14:43:15.567570578 +0100
+--- src/version.c 2019-01-31 15:33:06.200646685 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 862,
+ /**/
+
+--
+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.0863 b/data/vim/patches/8.1.0863
new file mode 100644
index 000000000..f1b2567ae
--- /dev/null
+++ b/data/vim/patches/8.1.0863
@@ -0,0 +1,191 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0863
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0863
+Problem: Cannot see what signal caused a job to end.
+Solution: Add "termsig" to job_info(). (Ozaki Kiichi, closes #3786)
+Files: runtime/doc/eval.txt, src/channel.c, src/os_unix.c, src/structs.h,
+ src/testdir/test_channel.vim
+
+
+*** ../vim-8.1.0862/runtime/doc/eval.txt 2019-01-29 22:58:02.397136325 +0100
+--- runtime/doc/eval.txt 2019-01-31 15:43:59.196879123 +0100
+***************
+*** 5711,5716 ****
+--- 5745,5755 ----
+ "exit_cb" function to be called on exit
+ "stoponexit" |job-stoponexit|
+
++ Only in Unix:
++ "termsig" the signal which terminated the process
++ (See |job_stop()| for the values)
++ only valid when "status" is "dead"
++
+ Without any arguments, returns a List with all Job objects.
+
+ job_setoptions({job}, {options}) *job_setoptions()*
+*** ../vim-8.1.0862/src/channel.c 2019-01-29 22:29:03.550799929 +0100
+--- src/channel.c 2019-01-31 15:41:28.489759542 +0100
+***************
+*** 5152,5157 ****
+--- 5152,5160 ----
+ vim_free(job->jv_tty_in);
+ vim_free(job->jv_tty_out);
+ vim_free(job->jv_stoponexit);
++ #ifdef UNIX
++ vim_free(job->jv_termsig);
++ #endif
+ free_callback(job->jv_exit_cb, job->jv_exit_partial);
+ if (job->jv_argv != NULL)
+ {
+***************
+*** 5908,5913 ****
+--- 5911,5919 ----
+ dict_add_number(dict, "exitval", job->jv_exitval);
+ dict_add_string(dict, "exit_cb", job->jv_exit_cb);
+ dict_add_string(dict, "stoponexit", job->jv_stoponexit);
++ #ifdef UNIX
++ dict_add_string(dict, "termsig", job->jv_termsig);
++ #endif
+
+ l = list_alloc();
+ if (l != NULL)
+*** ../vim-8.1.0862/src/os_unix.c 2019-01-27 16:55:44.276707556 +0100
+--- src/os_unix.c 2019-01-31 15:46:43.263894208 +0100
+***************
+*** 5655,5660 ****
+--- 5655,5677 ----
+ close(pty_slave_fd);
+ }
+
++ static char_u *
++ get_signal_name(int sig)
++ {
++ int i;
++ char_u numbuf[NUMBUFLEN];
++
++ if (sig == SIGKILL)
++ return vim_strsave((char_u *)"kill");
++
++ for (i = 0; signal_info[i].sig != -1; i++)
++ if (sig == signal_info[i].sig)
++ return strlow_save((char_u *)signal_info[i].name);
++
++ vim_snprintf((char *)numbuf, NUMBUFLEN, "%d", sig);
++ return vim_strsave(numbuf);
++ }
++
+ char *
+ mch_job_status(job_T *job)
+ {
+***************
+*** 5691,5698 ****
+ if (WIFSIGNALED(status))
+ {
+ job->jv_exitval = -1;
+! if (job->jv_status < JOB_ENDED)
+! ch_log(job->jv_channel, "Job terminated by a signal");
+ goto return_dead;
+ }
+ return "run";
+--- 5708,5717 ----
+ if (WIFSIGNALED(status))
+ {
+ job->jv_exitval = -1;
+! job->jv_termsig = get_signal_name(WTERMSIG(status));
+! if (job->jv_status < JOB_ENDED && job->jv_termsig != NULL)
+! ch_log(job->jv_channel, "Job terminated by signal \"%s\"",
+! job->jv_termsig);
+ goto return_dead;
+ }
+ return "run";
+***************
+*** 5738,5744 ****
+--- 5757,5766 ----
+ /* LINTED avoid "bitwise operation on signed value" */
+ job->jv_exitval = WEXITSTATUS(status);
+ else if (WIFSIGNALED(status))
++ {
+ job->jv_exitval = -1;
++ job->jv_termsig = get_signal_name(WTERMSIG(status));
++ }
+ if (job->jv_status < JOB_ENDED)
+ {
+ ch_log(job->jv_channel, "Job ended");
+*** ../vim-8.1.0862/src/structs.h 2019-01-26 17:28:22.232599086 +0100
+--- src/structs.h 2019-01-31 15:41:28.493759517 +0100
+***************
+*** 1550,1556 ****
+ char_u *jv_tty_in; /* controlling tty input, allocated */
+ char_u *jv_tty_out; /* controlling tty output, allocated */
+ jobstatus_T jv_status;
+! char_u *jv_stoponexit; /* allocated */
+ int jv_exitval;
+ char_u *jv_exit_cb; /* allocated */
+ partial_T *jv_exit_partial;
+--- 1550,1559 ----
+ char_u *jv_tty_in; /* controlling tty input, allocated */
+ char_u *jv_tty_out; /* controlling tty output, allocated */
+ jobstatus_T jv_status;
+! char_u *jv_stoponexit; /* allocated */
+! #ifdef UNIX
+! char_u *jv_termsig; /* allocated */
+! #endif
+ int jv_exitval;
+ char_u *jv_exit_cb; /* allocated */
+ partial_T *jv_exit_partial;
+*** ../vim-8.1.0862/src/testdir/test_channel.vim 2019-01-29 22:58:02.401136295 +0100
+--- src/testdir/test_channel.vim 2019-01-31 15:41:28.493759517 +0100
+***************
+*** 2002,2004 ****
+--- 2002,2028 ----
+ unlet g:out
+ endtry
+ endfunc
++
++ func Test_job_exitval_and_termsig()
++ if !has('unix')
++ return
++ endif
++
++ " Terminate job normally
++ let cmd = ['echo']
++ let job = job_start(cmd)
++ call WaitForAssert({-> assert_equal("dead", job_status(job))})
++ let info = job_info(job)
++ call assert_equal(0, info.exitval)
++ call assert_equal("", info.termsig)
++
++ " Terminate job by signal
++ let cmd = ['sleep', '10']
++ let job = job_start(cmd)
++ sleep 10m
++ call job_stop(job)
++ call WaitForAssert({-> assert_equal("dead", job_status(job))})
++ let info = job_info(job)
++ call assert_equal(-1, info.exitval)
++ call assert_equal("term", info.termsig)
++ endfunc
+*** ../vim-8.1.0862/src/version.c 2019-01-31 15:34:35.864056935 +0100
+--- src/version.c 2019-01-31 15:43:04.689200630 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 863,
+ /**/
+
+--
+It's not hard to meet expenses, they're everywhere.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0864 b/data/vim/patches/8.1.0864
new file mode 100644
index 000000000..951a9b7db
--- /dev/null
+++ b/data/vim/patches/8.1.0864
@@ -0,0 +1,1239 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0864
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0864
+Problem: Cannot have a local value for 'scrolloff' and 'sidescrolloff'.
+ (Gary Holloway)
+Solution: Make 'scrolloff' and 'sidescrolloff' global-local. (mostly by
+ Aron Widforss, closes #3539)
+Files: runtime/doc/options.txt, src/edit.c, src/ex_cmds.c,
+ src/ex_docmd.c, src/gui.c, src/misc2.c, src/move.c, src/normal.c,
+ src/option.c, src/proto/option.pro, src/option.h, src/search.c,
+ src/structs.h, src/window.c, src/testdir/test_options.vim
+
+
+*** ../vim-8.1.0863/runtime/doc/options.txt 2019-01-31 14:12:52.760076333 +0100
+--- runtime/doc/options.txt 2019-01-31 16:38:43.450585694 +0100
+***************
+*** 6546,6559 ****
+
+ *'scrolloff'* *'so'*
+ 'scrolloff' 'so' number (default 0, set to 5 in |defaults.vim|)
+! global
+ {not in Vi}
+ Minimal number of screen lines to keep above and below the cursor.
+ This will make some context visible around where you are working. If
+ you set it to a very large value (999) the cursor line will always be
+ in the middle of the window (except at the start or end of the file or
+ when long lines wrap).
+! For scrolling horizontally see 'sidescrolloff'.
+ NOTE: This option is set to 0 when 'compatible' is set.
+
+ *'scrollopt'* *'sbo'*
+--- 6590,6607 ----
+
+ *'scrolloff'* *'so'*
+ 'scrolloff' 'so' number (default 0, set to 5 in |defaults.vim|)
+! global or local to window |global-local|
+ {not in Vi}
+ Minimal number of screen lines to keep above and below the cursor.
+ This will make some context visible around where you are working. If
+ you set it to a very large value (999) the cursor line will always be
+ in the middle of the window (except at the start or end of the file or
+ when long lines wrap).
+! After using the local value, go back the global value with one of
+! these two: >
+! setlocal scrolloff<
+! setlocal scrolloff=-1
+! < For scrolling horizontally see 'sidescrolloff'.
+ NOTE: This option is set to 0 when 'compatible' is set.
+
+ *'scrollopt'* *'sbo'*
+***************
+*** 7107,7113 ****
+
+ *'sidescrolloff'* *'siso'*
+ 'sidescrolloff' 'siso' number (default 0)
+! global
+ {not in Vi}
+ The minimal number of screen columns to keep to the left and to the
+ right of the cursor if 'nowrap' is set. Setting this option to a
+--- 7156,7162 ----
+
+ *'sidescrolloff'* *'siso'*
+ 'sidescrolloff' 'siso' number (default 0)
+! global or local to window |global-local|
+ {not in Vi}
+ The minimal number of screen columns to keep to the left and to the
+ right of the cursor if 'nowrap' is set. Setting this option to a
+***************
+*** 7117,7123 ****
+ to a large value (like 999) has the effect of keeping the cursor
+ horizontally centered in the window, as long as one does not come too
+ close to the beginning of the line.
+! NOTE: This option is set to 0 when 'compatible' is set.
+
+ Example: Try this together with 'sidescroll' and 'listchars' as
+ in the following example to never allow the cursor to move
+--- 7166,7176 ----
+ to a large value (like 999) has the effect of keeping the cursor
+ horizontally centered in the window, as long as one does not come too
+ close to the beginning of the line.
+! After using the local value, go back the global value with one of
+! these two: >
+! setlocal sidescrolloff<
+! setlocal sidescrolloff=-1
+! < NOTE: This option is set to 0 when 'compatible' is set.
+
+ Example: Try this together with 'sidescroll' and 'listchars' as
+ in the following example to never allow the cursor to move
+*** ../vim-8.1.0863/src/edit.c 2019-01-31 14:29:38.777104291 +0100
+--- src/edit.c 2019-01-31 16:19:08.534777417 +0100
+***************
+*** 728,734 ****
+ (int)curwin->w_wcol < mincol - curbuf->b_p_ts
+ #endif
+ && curwin->w_wrow == W_WINROW(curwin)
+! + curwin->w_height - 1 - p_so
+ && (curwin->w_cursor.lnum != curwin->w_topline
+ #ifdef FEAT_DIFF
+ || curwin->w_topfill > 0
+--- 728,734 ----
+ (int)curwin->w_wcol < mincol - curbuf->b_p_ts
+ #endif
+ && curwin->w_wrow == W_WINROW(curwin)
+! + curwin->w_height - 1 - get_scrolloff_value()
+ && (curwin->w_cursor.lnum != curwin->w_topline
+ #ifdef FEAT_DIFF
+ || curwin->w_topfill > 0
+*** ../vim-8.1.0863/src/ex_cmds.c 2019-01-26 17:28:22.224599141 +0100
+--- src/ex_cmds.c 2019-01-31 16:20:31.290176729 +0100
+***************
+*** 3784,3789 ****
+--- 3784,3790 ----
+ #endif
+ int readfile_flags = 0;
+ int did_inc_redrawing_disabled = FALSE;
++ long *so_ptr = curwin->w_p_so >= 0 ? &curwin->w_p_so : &p_so;
+
+ if (eap != NULL)
+ command = eap->do_ecmd_cmd;
+***************
+*** 4389,4400 ****
+ did_inc_redrawing_disabled = FALSE;
+ if (!skip_redraw)
+ {
+! n = p_so;
+ if (topline == 0 && command == NULL)
+! p_so = 999; /* force cursor halfway the window */
+ update_topline();
+ curwin->w_scbind_pos = curwin->w_topline;
+! p_so = n;
+ redraw_curbuf_later(NOT_VALID); /* redraw this buffer later */
+ }
+
+--- 4390,4401 ----
+ did_inc_redrawing_disabled = FALSE;
+ if (!skip_redraw)
+ {
+! n = *so_ptr;
+ if (topline == 0 && command == NULL)
+! *so_ptr = 9999; // force cursor halfway the window
+ update_topline();
+ curwin->w_scbind_pos = curwin->w_topline;
+! *so_ptr = n;
+ redraw_curbuf_later(NOT_VALID); /* redraw this buffer later */
+ }
+
+*** ../vim-8.1.0863/src/ex_docmd.c 2019-01-28 20:19:01.679054801 +0100
+--- src/ex_docmd.c 2019-01-31 16:21:01.941955853 +0100
+***************
+*** 8923,8929 ****
+ {
+ if (wp->w_p_scb && wp->w_buffer)
+ {
+! y = wp->w_buffer->b_ml.ml_line_count - p_so;
+ if (topline > y)
+ topline = y;
+ }
+--- 8923,8929 ----
+ {
+ if (wp->w_p_scb && wp->w_buffer)
+ {
+! y = wp->w_buffer->b_ml.ml_line_count - get_scrolloff_value();
+ if (topline > y)
+ topline = y;
+ }
+*** ../vim-8.1.0863/src/gui.c 2019-01-27 16:55:44.276707556 +0100
+--- src/gui.c 2019-01-31 16:21:30.457751081 +0100
+***************
+*** 4405,4411 ****
+ #endif
+ )
+ {
+! if (p_so != 0)
+ {
+ cursor_correct(); /* fix window for 'so' */
+ update_topline(); /* avoid up/down jump */
+--- 4405,4411 ----
+ #endif
+ )
+ {
+! if (get_scrolloff_value() != 0)
+ {
+ cursor_correct(); /* fix window for 'so' */
+ update_topline(); /* avoid up/down jump */
+*** ../vim-8.1.0863/src/misc2.c 2019-01-29 22:29:03.550799929 +0100
+--- src/misc2.c 2019-01-31 16:13:49.121175986 +0100
+***************
+*** 643,648 ****
+--- 643,649 ----
+ long lastcol;
+ colnr_T s, e;
+ int retval = FALSE;
++ long siso = get_sidescrolloff_value();
+
+ changed_cline_bef_curs();
+ lastcol = curwin->w_leftcol + curwin->w_width - curwin_col_off() - 1;
+***************
+*** 652,666 ****
+ * If the cursor is right or left of the screen, move it to last or first
+ * character.
+ */
+! if (curwin->w_virtcol > (colnr_T)(lastcol - p_siso))
+ {
+ retval = TRUE;
+! coladvance((colnr_T)(lastcol - p_siso));
+ }
+! else if (curwin->w_virtcol < curwin->w_leftcol + p_siso)
+ {
+ retval = TRUE;
+! (void)coladvance((colnr_T)(curwin->w_leftcol + p_siso));
+ }
+
+ /*
+--- 653,667 ----
+ * If the cursor is right or left of the screen, move it to last or first
+ * character.
+ */
+! if (curwin->w_virtcol > (colnr_T)(lastcol - siso))
+ {
+ retval = TRUE;
+! coladvance((colnr_T)(lastcol - siso));
+ }
+! else if (curwin->w_virtcol < curwin->w_leftcol + siso)
+ {
+ retval = TRUE;
+! (void)coladvance((colnr_T)(curwin->w_leftcol + siso));
+ }
+
+ /*
+*** ../vim-8.1.0863/src/move.c 2019-01-31 13:22:28.064543651 +0100
+--- src/move.c 2019-01-31 16:26:06.191799784 +0100
+***************
+*** 192,199 ****
+ #endif
+ int check_topline = FALSE;
+ int check_botline = FALSE;
+ #ifdef FEAT_MOUSE
+! int save_so = p_so;
+ #endif
+
+ /* If there is no valid screen and when the window height is zero just use
+--- 192,200 ----
+ #endif
+ int check_topline = FALSE;
+ int check_botline = FALSE;
++ long *so_ptr = curwin->w_p_so >= 0 ? &curwin->w_p_so : &p_so;
+ #ifdef FEAT_MOUSE
+! int save_so = *so_ptr;
+ #endif
+
+ /* If there is no valid screen and when the window height is zero just use
+***************
+*** 214,220 ****
+ #ifdef FEAT_MOUSE
+ /* When dragging with the mouse, don't scroll that quickly */
+ if (mouse_dragging > 0)
+! p_so = mouse_dragging - 1;
+ #endif
+
+ old_topline = curwin->w_topline;
+--- 215,221 ----
+ #ifdef FEAT_MOUSE
+ /* When dragging with the mouse, don't scroll that quickly */
+ if (mouse_dragging > 0)
+! *so_ptr = mouse_dragging - 1;
+ #endif
+
+ old_topline = curwin->w_topline;
+***************
+*** 268,278 ****
+ if (hasAnyFolding(curwin))
+ {
+ /* Count the number of logical lines between the cursor and
+! * topline + p_so (approximation of how much will be
+ * scrolled). */
+ n = 0;
+ for (lnum = curwin->w_cursor.lnum;
+! lnum < curwin->w_topline + p_so; ++lnum)
+ {
+ ++n;
+ /* stop at end of file or when we know we are far off */
+--- 269,279 ----
+ if (hasAnyFolding(curwin))
+ {
+ /* Count the number of logical lines between the cursor and
+! * topline + scrolloff (approximation of how much will be
+ * scrolled). */
+ n = 0;
+ for (lnum = curwin->w_cursor.lnum;
+! lnum < curwin->w_topline + *so_ptr; ++lnum)
+ {
+ ++n;
+ /* stop at end of file or when we know we are far off */
+***************
+*** 283,289 ****
+ }
+ else
+ #endif
+! n = curwin->w_topline + p_so - curwin->w_cursor.lnum;
+
+ /* If we weren't very close to begin with, we scroll to put the
+ * cursor in the middle of the window. Otherwise put the cursor
+--- 284,290 ----
+ }
+ else
+ #endif
+! n = curwin->w_topline + *so_ptr - curwin->w_cursor.lnum;
+
+ /* If we weren't very close to begin with, we scroll to put the
+ * cursor in the middle of the window. Otherwise put the cursor
+***************
+*** 325,331 ****
+ if (curwin->w_cursor.lnum < curwin->w_botline)
+ {
+ if (((long)curwin->w_cursor.lnum
+! >= (long)curwin->w_botline - p_so
+ #ifdef FEAT_FOLDING
+ || hasAnyFolding(curwin)
+ #endif
+--- 326,332 ----
+ if (curwin->w_cursor.lnum < curwin->w_botline)
+ {
+ if (((long)curwin->w_cursor.lnum
+! >= (long)curwin->w_botline - *so_ptr
+ #ifdef FEAT_FOLDING
+ || hasAnyFolding(curwin)
+ #endif
+***************
+*** 354,364 ****
+ )
+ {
+ n += loff.height;
+! if (n >= p_so)
+ break;
+ botline_forw(&loff);
+ }
+! if (n >= p_so)
+ /* sufficient context, no need to scroll */
+ check_botline = FALSE;
+ }
+--- 355,365 ----
+ )
+ {
+ n += loff.height;
+! if (n >= *so_ptr)
+ break;
+ botline_forw(&loff);
+ }
+! if (n >= *so_ptr)
+ /* sufficient context, no need to scroll */
+ check_botline = FALSE;
+ }
+***************
+*** 372,382 ****
+ if (hasAnyFolding(curwin))
+ {
+ /* Count the number of logical lines between the cursor and
+! * botline - p_so (approximation of how much will be
+ * scrolled). */
+ line_count = 0;
+ for (lnum = curwin->w_cursor.lnum;
+! lnum >= curwin->w_botline - p_so; --lnum)
+ {
+ ++line_count;
+ /* stop at end of file or when we know we are far off */
+--- 373,383 ----
+ if (hasAnyFolding(curwin))
+ {
+ /* Count the number of logical lines between the cursor and
+! * botline - scrolloff (approximation of how much will be
+ * scrolled). */
+ line_count = 0;
+ for (lnum = curwin->w_cursor.lnum;
+! lnum >= curwin->w_botline - *so_ptr; --lnum)
+ {
+ ++line_count;
+ /* stop at end of file or when we know we are far off */
+***************
+*** 388,394 ****
+ else
+ #endif
+ line_count = curwin->w_cursor.lnum - curwin->w_botline
+! + 1 + p_so;
+ if (line_count <= curwin->w_height + 1)
+ scroll_cursor_bot(scrolljump_value(), FALSE);
+ else
+--- 389,395 ----
+ else
+ #endif
+ line_count = curwin->w_cursor.lnum - curwin->w_botline
+! + 1 + *so_ptr;
+ if (line_count <= curwin->w_height + 1)
+ scroll_cursor_bot(scrolljump_value(), FALSE);
+ else
+***************
+*** 421,427 ****
+ }
+
+ #ifdef FEAT_MOUSE
+! p_so = save_so;
+ #endif
+ }
+
+--- 422,428 ----
+ }
+
+ #ifdef FEAT_MOUSE
+! *so_ptr = save_so;
+ #endif
+ }
+
+***************
+*** 447,454 ****
+ {
+ lineoff_T loff;
+ int n;
+
+! if (curwin->w_cursor.lnum < curwin->w_topline + p_so
+ #ifdef FEAT_FOLDING
+ || hasAnyFolding(curwin)
+ #endif
+--- 448,456 ----
+ {
+ lineoff_T loff;
+ int n;
++ long so = get_scrolloff_value();
+
+! if (curwin->w_cursor.lnum < curwin->w_topline + so
+ #ifdef FEAT_FOLDING
+ || hasAnyFolding(curwin)
+ #endif
+***************
+*** 462,468 ****
+ n = 0;
+ #endif
+ /* Count the visible screen lines above the cursor line. */
+! while (n < p_so)
+ {
+ topline_back(&loff);
+ /* Stop when included a line above the window. */
+--- 464,470 ----
+ n = 0;
+ #endif
+ /* Count the visible screen lines above the cursor line. */
+! while (n < so)
+ {
+ topline_back(&loff);
+ /* Stop when included a line above the window. */
+***************
+*** 474,480 ****
+ break;
+ n += loff.height;
+ }
+! if (n < p_so)
+ return TRUE;
+ }
+ return FALSE;
+--- 476,482 ----
+ break;
+ n += loff.height;
+ }
+! if (n < so)
+ return TRUE;
+ }
+ return FALSE;
+***************
+*** 946,951 ****
+--- 948,955 ----
+ colnr_T startcol;
+ colnr_T endcol;
+ colnr_T prev_skipcol;
++ long so = get_scrolloff_value();
++ long siso = get_sidescrolloff_value();
+
+ /*
+ * First make sure that w_topline is valid (after moving the cursor).
+***************
+*** 1028,1036 ****
+ * If we get closer to the edge than 'sidescrolloff', scroll a little
+ * extra
+ */
+! off_left = (int)startcol - (int)curwin->w_leftcol - p_siso;
+ off_right = (int)endcol - (int)(curwin->w_leftcol + curwin->w_width
+! - p_siso) + 1;
+ if (off_left < 0 || off_right > 0)
+ {
+ if (off_left < 0)
+--- 1032,1040 ----
+ * If we get closer to the edge than 'sidescrolloff', scroll a little
+ * extra
+ */
+! off_left = (int)startcol - (int)curwin->w_leftcol - siso;
+ off_right = (int)endcol - (int)(curwin->w_leftcol + curwin->w_width
+! - siso) + 1;
+ if (off_left < 0 || off_right > 0)
+ {
+ if (off_left < 0)
+***************
+*** 1079,1087 ****
+ prev_skipcol = curwin->w_skipcol;
+
+ p_lines = 0;
+ if ((curwin->w_wrow >= curwin->w_height
+ || ((prev_skipcol > 0
+! || curwin->w_wrow + p_so >= curwin->w_height)
+ && (p_lines =
+ #ifdef FEAT_DIFF
+ plines_win_nofill
+--- 1083,1092 ----
+ prev_skipcol = curwin->w_skipcol;
+
+ p_lines = 0;
++
+ if ((curwin->w_wrow >= curwin->w_height
+ || ((prev_skipcol > 0
+! || curwin->w_wrow + so >= curwin->w_height)
+ && (p_lines =
+ #ifdef FEAT_DIFF
+ plines_win_nofill
+***************
+*** 1098,1122 ****
+ /* Cursor past end of screen. Happens with a single line that does
+ * not fit on screen. Find a skipcol to show the text around the
+ * cursor. Avoid scrolling all the time. compute value of "extra":
+! * 1: Less than "p_so" lines above
+! * 2: Less than "p_so" lines below
+ * 3: both of them */
+ extra = 0;
+! if (curwin->w_skipcol + p_so * width > curwin->w_virtcol)
+ extra = 1;
+ /* Compute last display line of the buffer line that we want at the
+ * bottom of the window. */
+ if (p_lines == 0)
+ p_lines = plines_win(curwin, curwin->w_cursor.lnum, FALSE);
+ --p_lines;
+! if (p_lines > curwin->w_wrow + p_so)
+! n = curwin->w_wrow + p_so;
+ else
+ n = p_lines;
+ if ((colnr_T)n >= curwin->w_height + curwin->w_skipcol / width)
+ extra += 2;
+
+! if (extra == 3 || p_lines < p_so * 2)
+ {
+ /* not enough room for 'scrolloff', put cursor in the middle */
+ n = curwin->w_virtcol / width;
+--- 1103,1127 ----
+ /* Cursor past end of screen. Happens with a single line that does
+ * not fit on screen. Find a skipcol to show the text around the
+ * cursor. Avoid scrolling all the time. compute value of "extra":
+! * 1: Less than 'scrolloff' lines above
+! * 2: Less than 'scrolloff' lines below
+ * 3: both of them */
+ extra = 0;
+! if (curwin->w_skipcol + so * width > curwin->w_virtcol)
+ extra = 1;
+ /* Compute last display line of the buffer line that we want at the
+ * bottom of the window. */
+ if (p_lines == 0)
+ p_lines = plines_win(curwin, curwin->w_cursor.lnum, FALSE);
+ --p_lines;
+! if (p_lines > curwin->w_wrow + so)
+! n = curwin->w_wrow + so;
+ else
+ n = p_lines;
+ if ((colnr_T)n >= curwin->w_height + curwin->w_skipcol / width)
+ extra += 2;
+
+! if (extra == 3 || p_lines < so * 2)
+ {
+ /* not enough room for 'scrolloff', put cursor in the middle */
+ n = curwin->w_virtcol / width;
+***************
+*** 1132,1138 ****
+ else if (extra == 1)
+ {
+ /* less then 'scrolloff' lines above, decrease skipcol */
+! extra = (curwin->w_skipcol + p_so * width - curwin->w_virtcol
+ + width - 1) / width;
+ if (extra > 0)
+ {
+--- 1137,1143 ----
+ else if (extra == 1)
+ {
+ /* less then 'scrolloff' lines above, decrease skipcol */
+! extra = (curwin->w_skipcol + so * width - curwin->w_virtcol
+ + width - 1) / width;
+ if (extra > 0)
+ {
+***************
+*** 1464,1470 ****
+ end_row += curwin->w_cline_height - 1 -
+ curwin->w_virtcol / curwin->w_width;
+ }
+! if (end_row < curwin->w_height - p_so)
+ {
+ #ifdef FEAT_DIFF
+ if (can_fill)
+--- 1469,1475 ----
+ end_row += curwin->w_cline_height - 1 -
+ curwin->w_virtcol / curwin->w_width;
+ }
+! if (end_row < curwin->w_height - get_scrolloff_value())
+ {
+ #ifdef FEAT_DIFF
+ if (can_fill)
+***************
+*** 1522,1528 ****
+ validate_virtcol();
+ start_row -= curwin->w_virtcol / curwin->w_width;
+ }
+! if (start_row >= p_so)
+ {
+ #ifdef FEAT_DIFF
+ if (curwin->w_topfill > 0)
+--- 1527,1533 ----
+ validate_virtcol();
+ start_row -= curwin->w_virtcol / curwin->w_width;
+ }
+! if (start_row >= get_scrolloff_value())
+ {
+ #ifdef FEAT_DIFF
+ if (curwin->w_topfill > 0)
+***************
+*** 1666,1672 ****
+ linenr_T old_topfill = curwin->w_topfill;
+ #endif
+ linenr_T new_topline;
+! int off = p_so;
+
+ #ifdef FEAT_MOUSE
+ if (mouse_dragging > 0)
+--- 1671,1677 ----
+ linenr_T old_topfill = curwin->w_topfill;
+ #endif
+ linenr_T new_topline;
+! int off = get_scrolloff_value();
+
+ #ifdef FEAT_MOUSE
+ if (mouse_dragging > 0)
+***************
+*** 1842,1847 ****
+--- 1847,1853 ----
+ linenr_T old_valid = curwin->w_valid;
+ int old_empty_rows = curwin->w_empty_rows;
+ linenr_T cln; /* Cursor Line Number */
++ long so = get_scrolloff_value();
+
+ cln = curwin->w_cursor.lnum;
+ if (set_topbot)
+***************
+*** 1898,1904 ****
+ * Stop counting lines to scroll when
+ * - hitting start of the file
+ * - scrolled nothing or at least 'sj' lines
+! * - at least 'so' lines below the cursor
+ * - lines between botline and cursor have been counted
+ */
+ #ifdef FEAT_FOLDING
+--- 1904,1910 ----
+ * Stop counting lines to scroll when
+ * - hitting start of the file
+ * - scrolled nothing or at least 'sj' lines
+! * - at least 'scrolloff' lines below the cursor
+ * - lines between botline and cursor have been counted
+ */
+ #ifdef FEAT_FOLDING
+***************
+*** 1924,1930 ****
+ #ifdef FEAT_MOUSE
+ mouse_dragging > 0 ? mouse_dragging - 1 :
+ #endif
+! p_so))
+ || boff.lnum + 1 > curbuf->b_ml.ml_line_count)
+ && loff.lnum <= curwin->w_botline
+ #ifdef FEAT_DIFF
+--- 1930,1936 ----
+ #ifdef FEAT_MOUSE
+ mouse_dragging > 0 ? mouse_dragging - 1 :
+ #endif
+! so))
+ || boff.lnum + 1 > curbuf->b_ml.ml_line_count)
+ && loff.lnum <= curwin->w_botline
+ #ifdef FEAT_DIFF
+***************
+*** 1970,1976 ****
+ #ifdef FEAT_MOUSE
+ mouse_dragging > 0 ? mouse_dragging - 1 :
+ #endif
+! p_so) || scrolled < min_scroll)
+ {
+ extra += boff.height;
+ if (boff.lnum >= curwin->w_botline
+--- 1976,1982 ----
+ #ifdef FEAT_MOUSE
+ mouse_dragging > 0 ? mouse_dragging - 1 :
+ #endif
+! so) || scrolled < min_scroll)
+ {
+ extra += boff.height;
+ if (boff.lnum >= curwin->w_botline
+***************
+*** 2124,2130 ****
+
+ /*
+ * Correct the cursor position so that it is in a part of the screen at least
+! * 'so' lines from the top and bottom, if possible.
+ * If not possible, put it at the same position as scroll_cursor_halfway().
+ * When called topline must be valid!
+ */
+--- 2130,2136 ----
+
+ /*
+ * Correct the cursor position so that it is in a part of the screen at least
+! * 'scrolloff' lines from the top and bottom, if possible.
+ * If not possible, put it at the same position as scroll_cursor_halfway().
+ * When called topline must be valid!
+ */
+***************
+*** 2138,2150 ****
+ int above_wanted, below_wanted;
+ linenr_T cln; /* Cursor Line Number */
+ int max_off;
+
+ /*
+ * How many lines we would like to have above/below the cursor depends on
+ * whether the first/last line of the file is on screen.
+ */
+! above_wanted = p_so;
+! below_wanted = p_so;
+ #ifdef FEAT_MOUSE
+ if (mouse_dragging > 0)
+ {
+--- 2144,2157 ----
+ int above_wanted, below_wanted;
+ linenr_T cln; /* Cursor Line Number */
+ int max_off;
++ long so = get_scrolloff_value();
+
+ /*
+ * How many lines we would like to have above/below the cursor depends on
+ * whether the first/last line of the file is on screen.
+ */
+! above_wanted = so;
+! below_wanted = so;
+ #ifdef FEAT_MOUSE
+ if (mouse_dragging > 0)
+ {
+***************
+*** 2262,2267 ****
+--- 2269,2275 ----
+ int retval = OK;
+ lineoff_T loff;
+ linenr_T old_topline = curwin->w_topline;
++ long so = get_scrolloff_value();
+
+ if (curbuf->b_ml.ml_line_count == 1) /* nothing to do */
+ {
+***************
+*** 2279,2285 ****
+ * last line.
+ */
+ if (dir == FORWARD
+! ? ((curwin->w_topline >= curbuf->b_ml.ml_line_count - p_so)
+ && curwin->w_botline > curbuf->b_ml.ml_line_count)
+ : (curwin->w_topline == 1
+ #ifdef FEAT_DIFF
+--- 2287,2293 ----
+ * last line.
+ */
+ if (dir == FORWARD
+! ? ((curwin->w_topline >= curbuf->b_ml.ml_line_count - so)
+ && curwin->w_botline > curbuf->b_ml.ml_line_count)
+ : (curwin->w_topline == 1
+ #ifdef FEAT_DIFF
+*** ../vim-8.1.0863/src/normal.c 2019-01-31 13:22:28.068543628 +0100
+--- src/normal.c 2019-01-31 16:26:48.855501581 +0100
+***************
+*** 2814,2820 ****
+
+ /* Set global flag that we are extending the Visual area with mouse
+ * dragging; temporarily minimize 'scrolloff'. */
+! if (VIsual_active && is_drag && p_so)
+ {
+ /* In the very first line, allow scrolling one line */
+ if (mouse_row == 0)
+--- 2814,2820 ----
+
+ /* Set global flag that we are extending the Visual area with mouse
+ * dragging; temporarily minimize 'scrolloff'. */
+! if (VIsual_active && is_drag && get_scrolloff_value())
+ {
+ /* In the very first line, allow scrolling one line */
+ if (mouse_row == 0)
+***************
+*** 4635,4641 ****
+ scrollup(count, TRUE);
+ else
+ scrolldown(count, TRUE);
+! if (p_so)
+ {
+ /* Adjust the cursor position for 'scrolloff'. Mark w_topline as
+ * valid, otherwise the screen jumps back at the end of the file. */
+--- 4635,4641 ----
+ scrollup(count, TRUE);
+ else
+ scrolldown(count, TRUE);
+! if (get_scrolloff_value())
+ {
+ /* Adjust the cursor position for 'scrolloff'. Mark w_topline as
+ * valid, otherwise the screen jumps back at the end of the file. */
+***************
+*** 4692,4697 ****
+--- 4692,4698 ----
+ #ifdef FEAT_SPELL
+ int undo = FALSE;
+ #endif
++ long siso = get_sidescrolloff_value();
+
+ if (VIM_ISDIGIT(nchar))
+ {
+***************
+*** 4874,4881 ****
+ else
+ #endif
+ getvcol(curwin, &curwin->w_cursor, &col, NULL, NULL);
+! if ((long)col > p_siso)
+! col -= p_siso;
+ else
+ col = 0;
+ if (curwin->w_leftcol != col)
+--- 4875,4882 ----
+ else
+ #endif
+ getvcol(curwin, &curwin->w_cursor, &col, NULL, NULL);
+! if ((long)col > siso)
+! col -= siso;
+ else
+ col = 0;
+ if (curwin->w_leftcol != col)
+***************
+*** 4896,4905 ****
+ #endif
+ getvcol(curwin, &curwin->w_cursor, NULL, NULL, &col);
+ n = curwin->w_width - curwin_col_off();
+! if ((long)col + p_siso < n)
+ col = 0;
+ else
+! col = col + p_siso - n + 1;
+ if (curwin->w_leftcol != col)
+ {
+ curwin->w_leftcol = col;
+--- 4897,4906 ----
+ #endif
+ getvcol(curwin, &curwin->w_cursor, NULL, NULL, &col);
+ n = curwin->w_width - curwin_col_off();
+! if ((long)col + siso < n)
+ col = 0;
+ else
+! col = col + siso - n + 1;
+ if (curwin->w_leftcol != col)
+ {
+ curwin->w_leftcol = col;
+*** ../vim-8.1.0863/src/option.c 2019-01-31 14:12:52.756076361 +0100
+--- src/option.c 2019-01-31 18:17:09.774932289 +0100
+***************
+*** 227,232 ****
+--- 227,234 ----
+ #endif
+ #define PV_SCBIND OPT_WIN(WV_SCBIND)
+ #define PV_SCROLL OPT_WIN(WV_SCROLL)
++ #define PV_SISO OPT_BOTH(OPT_WIN(WV_SISO))
++ #define PV_SO OPT_BOTH(OPT_WIN(WV_SO))
+ #ifdef FEAT_SPELL
+ # define PV_SPELL OPT_WIN(WV_SPELL)
+ #endif
+***************
+*** 2333,2339 ****
+ (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,
+--- 2335,2341 ----
+ (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_SO,
+ {(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,
+***************
+*** 2490,2496 ****
+ (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
+--- 2492,2498 ----
+ (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_SISO,
+ {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"signcolumn", "scl", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_SIGNS
+***************
+*** 3736,3746 ****
+ win_comp_scroll(curwin);
+ else
+ {
+! *(long *)varp = (long)(long_i)options[opt_idx].def_val[dvi];
+ /* May also set global value for local option. */
+ if (both)
+ *(long *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL) =
+! *(long *)varp;
+ }
+ }
+ else /* P_BOOL */
+--- 3738,3756 ----
+ win_comp_scroll(curwin);
+ else
+ {
+! long def_val = (long)(long_i)options[opt_idx].def_val[dvi];
+!
+! if ((long *)varp == &curwin->w_p_so
+! || (long *)varp == &curwin->w_p_siso)
+! // 'scrolloff' and 'sidescrolloff' local values have a
+! // different default value than the global default.
+! *(long *)varp = -1;
+! else
+! *(long *)varp = def_val;
+ /* May also set global value for local option. */
+ if (both)
+ *(long *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL) =
+! def_val;
+ }
+ }
+ else /* P_BOOL */
+***************
+*** 9382,9388 ****
+ }
+ if (p_so < 0 && full_screen)
+ {
+! errmsg = e_scroll;
+ p_so = 0;
+ }
+ if (p_siso < 0 && full_screen)
+--- 9392,9398 ----
+ }
+ if (p_so < 0 && full_screen)
+ {
+! errmsg = e_positive;
+ p_so = 0;
+ }
+ if (p_siso < 0 && full_screen)
+***************
+*** 10657,10662 ****
+--- 10667,10678 ----
+ clear_string_option(&buf->b_p_tc);
+ buf->b_tc_flags = 0;
+ break;
++ case PV_SISO:
++ curwin->w_p_siso = -1;
++ break;
++ case PV_SO:
++ curwin->w_p_so = -1;
++ break;
+ #ifdef FEAT_FIND_ID
+ case PV_DEF:
+ clear_string_option(&buf->b_p_def);
+***************
+*** 10745,10750 ****
+--- 10761,10768 ----
+ case PV_AR: return (char_u *)&(curbuf->b_p_ar);
+ case PV_TAGS: return (char_u *)&(curbuf->b_p_tags);
+ case PV_TC: return (char_u *)&(curbuf->b_p_tc);
++ case PV_SISO: return (char_u *)&(curwin->w_p_siso);
++ case PV_SO: return (char_u *)&(curwin->w_p_so);
+ #ifdef FEAT_FIND_ID
+ case PV_DEF: return (char_u *)&(curbuf->b_p_def);
+ case PV_INC: return (char_u *)&(curbuf->b_p_inc);
+***************
+*** 10803,10808 ****
+--- 10821,10830 ----
+ ? (char_u *)&(curbuf->b_p_tc) : p->var;
+ case PV_BKC: return *curbuf->b_p_bkc != NUL
+ ? (char_u *)&(curbuf->b_p_bkc) : p->var;
++ case PV_SISO: return curwin->w_p_siso >= 0
++ ? (char_u *)&(curwin->w_p_siso) : p->var;
++ case PV_SO: return curwin->w_p_so >= 0
++ ? (char_u *)&(curwin->w_p_so) : p->var;
+ #ifdef FEAT_FIND_ID
+ case PV_DEF: return *curbuf->b_p_def != NUL
+ ? (char_u *)&(curbuf->b_p_def) : p->var;
+***************
+*** 13099,13104 ****
+--- 13121,13146 ----
+ }
+
+ /*
++ * Return the effective 'scrolloff' value for the current window, using the
++ * global value when appropriate.
++ */
++ long
++ get_scrolloff_value(void)
++ {
++ return curwin->w_p_so < 0 ? p_so : curwin->w_p_so;
++ }
++
++ /*
++ * Return the effective 'sidescrolloff' value for the current window, using the
++ * global value when appropriate.
++ */
++ long
++ get_sidescrolloff_value(void)
++ {
++ return curwin->w_p_siso < 0 ? p_siso : curwin->w_p_siso;
++ }
++
++ /*
+ * Check matchpairs option for "*initc".
+ * If there is a match set "*initc" to the matching character and "*findc" to
+ * the opposite character. Set "*backwards" to the direction.
+*** ../vim-8.1.0863/src/proto/option.pro 2019-01-13 23:38:33.407773189 +0100
+--- src/proto/option.pro 2019-01-31 16:32:53.576978485 +0100
+***************
+*** 76,81 ****
+--- 76,83 ----
+ 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);
++ long get_scrolloff_value(void);
++ long get_sidescrolloff_value(void);
+ void find_mps_values(int *initc, int *findc, int *backwards, int switchit);
+ unsigned int get_bkc_value(buf_T *buf);
+ int signcolumn_on(win_T *wp);
+*** ../vim-8.1.0863/src/option.h 2019-01-26 17:28:22.232599086 +0100
+--- src/option.h 2019-01-31 16:07:15.328122396 +0100
+***************
+*** 1152,1157 ****
+--- 1152,1159 ----
+ #endif
+ , WV_SCBIND
+ , WV_SCROLL
++ , WV_SISO
++ , WV_SO
+ #ifdef FEAT_SPELL
+ , WV_SPELL
+ #endif
+*** ../vim-8.1.0863/src/search.c 2019-01-26 17:28:22.232599086 +0100
+--- src/search.c 2019-01-31 16:18:09.207212428 +0100
+***************
+*** 2601,2606 ****
+--- 2601,2608 ----
+ #endif
+ colnr_T save_dollar_vcol;
+ char_u *p;
++ long *so = curwin->w_p_so >= 0 ? &curwin->w_p_so : &p_so;
++ long *siso = curwin->w_p_siso >= 0 ? &curwin->w_p_siso : &p_siso;
+
+ /*
+ * Only show match for chars in the 'matchpairs' option.
+***************
+*** 2635,2642 ****
+ {
+ mpos = *lpos; /* save the pos, update_screen() may change it */
+ save_cursor = curwin->w_cursor;
+! save_so = p_so;
+! save_siso = p_siso;
+ /* Handle "$" in 'cpo': If the ')' is typed on top of the "$",
+ * stop displaying the "$". */
+ if (dollar_vcol >= 0 && dollar_vcol == curwin->w_virtcol)
+--- 2637,2644 ----
+ {
+ mpos = *lpos; /* save the pos, update_screen() may change it */
+ save_cursor = curwin->w_cursor;
+! save_so = *so;
+! save_siso = *siso;
+ /* Handle "$" in 'cpo': If the ')' is typed on top of the "$",
+ * stop displaying the "$". */
+ if (dollar_vcol >= 0 && dollar_vcol == curwin->w_virtcol)
+***************
+*** 2651,2658 ****
+ ui_cursor_shape(); /* may show different cursor shape */
+ #endif
+ curwin->w_cursor = mpos; /* move to matching char */
+! p_so = 0; /* don't use 'scrolloff' here */
+! p_siso = 0; /* don't use 'sidescrolloff' here */
+ showruler(FALSE);
+ setcursor();
+ cursor_on(); /* make sure that the cursor is shown */
+--- 2653,2660 ----
+ ui_cursor_shape(); /* may show different cursor shape */
+ #endif
+ curwin->w_cursor = mpos; /* move to matching char */
+! *so = 0; /* don't use 'scrolloff' here */
+! *siso = 0; /* don't use 'sidescrolloff' here */
+ showruler(FALSE);
+ setcursor();
+ cursor_on(); /* make sure that the cursor is shown */
+***************
+*** 2672,2679 ****
+ else if (!char_avail())
+ ui_delay(p_mat * 100L, FALSE);
+ curwin->w_cursor = save_cursor; /* restore cursor position */
+! p_so = save_so;
+! p_siso = save_siso;
+ #ifdef CURSOR_SHAPE
+ State = save_state;
+ ui_cursor_shape(); /* may show different cursor shape */
+--- 2674,2681 ----
+ else if (!char_avail())
+ ui_delay(p_mat * 100L, FALSE);
+ curwin->w_cursor = save_cursor; /* restore cursor position */
+! *so = save_so;
+! *siso = save_siso;
+ #ifdef CURSOR_SHAPE
+ State = save_state;
+ ui_cursor_shape(); /* may show different cursor shape */
+*** ../vim-8.1.0863/src/structs.h 2019-01-31 15:52:05.269907631 +0100
+--- src/structs.h 2019-01-31 16:07:15.328122396 +0100
+***************
+*** 2932,2937 ****
+--- 2932,2939 ----
+ int w_p_brishift; /* additional shift for breakindent */
+ int w_p_brisbr; /* sbr in 'briopt' */
+ #endif
++ long w_p_siso; /* 'sidescrolloff' local value */
++ long w_p_so; /* 'scrolloff' local value */
+
+ /* transform a pointer to a "onebuf" option into a "allbuf" option */
+ #define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T))
+*** ../vim-8.1.0863/src/window.c 2019-01-26 17:28:22.236599060 +0100
+--- src/window.c 2019-01-31 16:30:39.069904440 +0100
+***************
+*** 4594,4599 ****
+--- 4594,4603 ----
+ new_wp->w_cursor.lnum = 1;
+ new_wp->w_scbind_pos = 1;
+
++ // use global option value for global-local options
++ new_wp->w_p_so = -1;
++ new_wp->w_p_siso = -1;
++
+ /* We won't calculate w_fraction until resizing the window */
+ new_wp->w_fraction = 0;
+ new_wp->w_prev_fraction_row = -1;
+***************
+*** 5871,5877 ****
+
+ if (wp == curwin)
+ {
+! if (p_so)
+ update_topline();
+ curs_columns(FALSE); /* validate w_wrow */
+ }
+--- 5875,5881 ----
+
+ if (wp == curwin)
+ {
+! if (get_scrolloff_value())
+ update_topline();
+ curs_columns(FALSE); /* validate w_wrow */
+ }
+*** ../vim-8.1.0863/src/testdir/test_options.vim 2019-01-30 22:36:14.646981306 +0100
+--- src/testdir/test_options.vim 2019-01-31 16:45:19.576136522 +0100
+***************
+*** 483,485 ****
+--- 483,520 ----
+ bwipe
+ bwipe
+ endfunc
++
++ func Test_local_scrolloff()
++ set so=5
++ set siso=7
++ split
++ call assert_equal(5, &so)
++ setlocal so=3
++ call assert_equal(3, &so)
++ wincmd w
++ call assert_equal(5, &so)
++ wincmd w
++ setlocal so<
++ call assert_equal(5, &so)
++ setlocal so=0
++ call assert_equal(0, &so)
++ setlocal so=-1
++ call assert_equal(5, &so)
++
++ call assert_equal(7, &siso)
++ setlocal siso=3
++ call assert_equal(3, &siso)
++ wincmd w
++ call assert_equal(7, &siso)
++ wincmd w
++ setlocal siso<
++ call assert_equal(7, &siso)
++ setlocal siso=0
++ call assert_equal(0, &siso)
++ setlocal siso=-1
++ call assert_equal(7, &siso)
++
++ close
++ set so&
++ set siso&
++ endfunc
+*** ../vim-8.1.0863/src/version.c 2019-01-31 15:52:05.269907631 +0100
+--- src/version.c 2019-01-31 18:20:44.797263867 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 864,
+ /**/
+
+--
+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.0865 b/data/vim/patches/8.1.0865
new file mode 100644
index 000000000..df563c700
--- /dev/null
+++ b/data/vim/patches/8.1.0865
@@ -0,0 +1,105 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0865
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0865
+Problem: When 'listchars' only contains "nbsp:X" it does not work.
+Solution: Set extra_check when lcs_nbsp is set. (Ralf Schandl, closes #3889)
+Files: src/screen.c, src/testdir/test_listchars.vim
+
+
+*** ../vim-8.1.0864/src/screen.c 2019-01-30 21:40:58.943219829 +0100
+--- src/screen.c 2019-01-31 21:42:38.888191457 +0100
+***************
+*** 1164,1171 ****
+ mod_bot = wp->w_redraw_bot + 1;
+ else
+ mod_bot = 0;
+- wp->w_redraw_top = 0; /* reset for next time */
+- wp->w_redraw_bot = 0;
+ if (buf->b_mod_set)
+ {
+ if (mod_top == 0 || mod_top > buf->b_mod_top)
+--- 1164,1169 ----
+***************
+*** 1277,1282 ****
+--- 1275,1282 ----
+ if (mod_top != 0 && buf->b_mod_xlines != 0 && wp->w_p_nu)
+ mod_bot = MAXLNUM;
+ }
++ wp->w_redraw_top = 0; // reset for next time
++ wp->w_redraw_bot = 0;
+
+ /*
+ * When only displaying the lines at the top, set top_end. Used when
+***************
+*** 3498,3504 ****
+
+ if (wp->w_p_list)
+ {
+! if (lcs_space || lcs_trail)
+ extra_check = TRUE;
+ /* find start of trailing whitespace */
+ if (lcs_trail)
+--- 3498,3504 ----
+
+ if (wp->w_p_list)
+ {
+! if (lcs_space || lcs_trail || lcs_nbsp)
+ extra_check = TRUE;
+ /* find start of trailing whitespace */
+ if (lcs_trail)
+*** ../vim-8.1.0864/src/testdir/test_listchars.vim 2019-01-16 22:41:50.095917784 +0100
+--- src/testdir/test_listchars.vim 2019-01-31 21:56:14.185986054 +0100
+***************
+*** 90,95 ****
+--- 90,115 ----
+ \ '.....h>-$',
+ \ 'iii<<<<><<$', '$'], l)
+
++
++ " test nbsp
++ normal ggdG
++ set listchars=nbsp:X,trail:Y
++ set list
++ " Non-breaking space
++ let nbsp = nr2char(0xa0)
++ call append(0, [ ">".nbsp."<" ])
++
++ let expected = '>X< '
++
++ redraw!
++ call cursor(1, 1)
++ call assert_equal([expected], ScreenLines(1, virtcol('$')))
++
++ set listchars=nbsp:X
++ redraw!
++ call cursor(1, 1)
++ call assert_equal([expected], ScreenLines(1, virtcol('$')))
++
+ enew!
+ set listchars& ff&
+ endfunc
+*** ../vim-8.1.0864/src/version.c 2019-01-31 18:26:05.742803481 +0100
+--- src/version.c 2019-01-31 21:44:23.091510073 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 865,
+ /**/
+
+--
+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.0866 b/data/vim/patches/8.1.0866
new file mode 100644
index 000000000..89e32f0cd
--- /dev/null
+++ b/data/vim/patches/8.1.0866
@@ -0,0 +1,211 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0866
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0866
+Problem: Build file dependencies are outdated. (John Little)
+Solution: Run "make proto" and "make depend".
+Files: src/vim.h, src/Makefile, src/proto/sign.pro, src/proto/gui_w32.pro
+
+
+*** ../vim-8.1.0865/src/vim.h 2019-01-26 17:28:22.236599060 +0100
+--- src/vim.h 2019-02-01 20:36:26.552116786 +0100
+***************
+*** 260,274 ****
+ # define SUN_SYSTEM
+ #endif
+
+! /* if we're compiling in C++ (currently only KVim), the system
+ * headers must have the correct prototypes or nothing will build.
+! * conversely, our prototypes might clash due to throw() specifiers and
+ * cause compilation failures even though the headers are correct. For
+ * a concrete example, gcc-3.2 enforces exception specifications, and
+ * glibc-2.2.5 has them in their system headers.
+ */
+ #if !defined(__cplusplus) && defined(UNIX) \
+! && !defined(MACOS_X) /* MACOS_X doesn't yet support osdef.h */
+ # include "auto/osdef.h" /* bring missing declarations in */
+ #endif
+
+--- 260,274 ----
+ # define SUN_SYSTEM
+ #endif
+
+! /* If we're compiling in C++ (currently only KVim), the system
+ * headers must have the correct prototypes or nothing will build.
+! * Conversely, our prototypes might clash due to throw() specifiers and
+ * cause compilation failures even though the headers are correct. For
+ * a concrete example, gcc-3.2 enforces exception specifications, and
+ * glibc-2.2.5 has them in their system headers.
+ */
+ #if !defined(__cplusplus) && defined(UNIX) \
+! && !defined(MACOS_X) /* MACOS_X doesn't yet support osdef.h */
+ # include "auto/osdef.h" /* bring missing declarations in */
+ #endif
+
+***************
+*** 2583,2588 ****
+--- 2583,2591 ----
+ # define ELAPSED_TICKCOUNT
+ # define ELAPSED_INIT(v) v = GetTickCount()
+ # define ELAPSED_FUNC(v) elapsed(v)
++ # ifdef PROTO
++ typedef int DWORD;
++ # endif
+ typedef DWORD elapsed_T;
+ # ifndef PROTO
+ long elapsed(DWORD start_tick);
+*** ../vim-8.1.0865/src/Makefile 2019-01-31 13:47:51.118632672 +0100
+--- src/Makefile 2019-02-01 20:40:07.706429668 +0100
+***************
+*** 472,482 ****
+ # Uncomment this when you want to include the Cscope interface.
+ #CONF_OPT_CSCOPE = --enable-cscope
+
+- # WORKSHOP - Sun Visual Workshop interface. Only works with Motif!
+- #CONF_OPT_WORKSHOP = --enable-workshop
+-
+ # NETBEANS - NetBeans interface. Only works with Motif, GTK, and gnome.
+! # Motif version must have XPM libraries (see |workshop-xpm|).
+ # Uncomment this when you do not want the netbeans interface.
+ #CONF_OPT_NETBEANS = --disable-netbeans
+
+--- 472,479 ----
+ # Uncomment this when you want to include the Cscope interface.
+ #CONF_OPT_CSCOPE = --enable-cscope
+
+ # NETBEANS - NetBeans interface. Only works with Motif, GTK, and gnome.
+! # Motif version must have XPM libraries (see |netbeans-xpm|).
+ # Uncomment this when you do not want the netbeans interface.
+ #CONF_OPT_NETBEANS = --disable-netbeans
+
+***************
+*** 610,615 ****
+--- 607,614 ----
+ #CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes
+
+ # Use this with GCC to check for mistakes, unused arguments, etc.
++ # Note: If you use -Wextra and get warnings in GTK code about function
++ # parameters, you can add -Wno-cast-function-type
+ #CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
+ # Add -Wpedantic to find // comments and other C99 constructs.
+ # Better disable Perl and Python to avoid a lot of warnings.
+***************
+*** 3388,3397 ****
+ 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/autocmd.o: autocmd.c vim.h protodef.h auto/config.h feature.h \
+! auto/osdef.h os_unix.h os_mac.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! 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 \
+--- 3387,3396 ----
+ 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/autocmd.o: autocmd.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 \
+***************
+*** 3497,3505 ****
+ 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/indent.o: indent.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! os_mac.h ascii.h keymap.h term.h macros.h option.h beval.h structs.h \
+! regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
+! arabic.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 \
+--- 3496,3504 ----
+ 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/indent.o: indent.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/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 \
+*** ../vim-8.1.0865/src/proto/sign.pro 2019-01-11 13:42:31.680331155 +0100
+--- src/proto/sign.pro 2019-02-01 20:36:49.411609270 +0100
+***************
+*** 11,18 ****
+ int sign_define_by_name(char_u *name, char_u *icon, char_u *linehl, char_u *text, char_u *texthl);
+ int sign_undefine_by_name(char_u *name);
+ int sign_place(int *sign_id, char_u *sign_group, char_u *sign_name, buf_T *buf, linenr_T lnum, int prio);
+- linenr_T sign_jump(int sign_id, char_u *sign_group, buf_T *buf);
+ int sign_unplace(int sign_id, char_u *sign_group, buf_T *buf, linenr_T atlnum);
+ void ex_sign(exarg_T *eap);
+ void sign_getlist(char_u *name, list_T *retlist);
+ void get_buffer_signs(buf_T *buf, list_T *l);
+--- 11,18 ----
+ int sign_define_by_name(char_u *name, char_u *icon, char_u *linehl, char_u *text, char_u *texthl);
+ int sign_undefine_by_name(char_u *name);
+ int sign_place(int *sign_id, char_u *sign_group, char_u *sign_name, buf_T *buf, linenr_T lnum, int prio);
+ int sign_unplace(int sign_id, char_u *sign_group, buf_T *buf, linenr_T atlnum);
++ linenr_T sign_jump(int sign_id, char_u *sign_group, buf_T *buf);
+ void ex_sign(exarg_T *eap);
+ void sign_getlist(char_u *name, list_T *retlist);
+ void get_buffer_signs(buf_T *buf, list_T *l);
+***************
+*** 24,26 ****
+--- 24,27 ----
+ void free_signs(void);
+ char_u *get_sign_name(expand_T *xp, int idx);
+ void set_context_in_sign_cmd(expand_T *xp, char_u *arg);
++ /* vim: set ft=c : */
+*** ../vim-8.1.0865/src/proto/gui_w32.pro 2019-01-19 19:54:17.141981393 +0100
+--- src/proto/gui_w32.pro 2019-02-01 20:36:55.523518573 +0100
+***************
+*** 58,65 ****
+ void gui_mch_newfont(void);
+ void gui_mch_settitle(char_u *title, char_u *icon);
+ void mch_set_mouse_shape(int shape);
+- char_u *gui_mch_browsedir(char_u *title, char_u *initdir);
+ char_u *gui_mch_browse(int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter);
+ int get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree);
+ void gui_mch_set_parent(char *title);
+ void gui_mch_prepare(int *argc, char **argv);
+--- 58,65 ----
+ void gui_mch_newfont(void);
+ void gui_mch_settitle(char_u *title, char_u *icon);
+ void mch_set_mouse_shape(int shape);
+ char_u *gui_mch_browse(int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter);
++ char_u *gui_mch_browsedir(char_u *title, char_u *initdir);
+ int get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree);
+ void gui_mch_set_parent(char *title);
+ void gui_mch_prepare(int *argc, char **argv);
+*** ../vim-8.1.0865/src/version.c 2019-01-31 21:57:15.517462657 +0100
+--- src/version.c 2019-02-01 20:40:28.291120595 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 866,
+ /**/
+
+--
+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.0867 b/data/vim/patches/8.1.0867
new file mode 100644
index 000000000..f6ff85571
--- /dev/null
+++ b/data/vim/patches/8.1.0867
@@ -0,0 +1,139 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0867
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0867
+Problem: Cannot build Python interface with Python 2.4. (Tom G. Christensen)
+Solution: Define PyBytes_FromStringAndSize. (Ken Takata, closes #3888)
+Files: src/if_python.c
+
+
+*** ../vim-8.1.0866/src/if_python.c 2019-01-13 23:38:33.395773275 +0100
+--- src/if_python.c 2019-02-01 22:09:15.742599161 +0100
+***************
+*** 73,81 ****
+--- 73,83 ----
+ #undef main /* Defined in python.h - aargh */
+ #undef HAVE_FCNTL_H /* Clash with os_win32.h */
+
++ // Perhaps leave this out for Python 2.6, which supports bytes?
+ #define PyBytes_FromString PyString_FromString
+ #define PyBytes_Check PyString_Check
+ #define PyBytes_AsStringAndSize PyString_AsStringAndSize
++ #define PyBytes_FromStringAndSize PyString_FromStringAndSize
+
+ #if !defined(FEAT_PYTHON) && defined(PROTO)
+ /* Use this to be able to generate prototypes without python being used. */
+***************
+*** 120,129 ****
+ # define PY_CAN_RECURSE
+ #endif
+
+! # if defined(DYNAMIC_PYTHON) || defined(PROTO)
+! # ifndef DYNAMIC_PYTHON
+! # define HINSTANCE long_u /* for generating prototypes */
+! # endif
+
+ # ifndef WIN3264
+ # include <dlfcn.h>
+--- 122,131 ----
+ # define PY_CAN_RECURSE
+ #endif
+
+! #if defined(DYNAMIC_PYTHON) || defined(PROTO)
+! # ifndef DYNAMIC_PYTHON
+! # define HINSTANCE long_u /* for generating prototypes */
+! # endif
+
+ # ifndef WIN3264
+ # include <dlfcn.h>
+***************
+*** 489,503 ****
+ PYTHON_PROC *ptr;
+ } python_funcname_table[] =
+ {
+! #ifndef PY_SSIZE_T_CLEAN
+ {"PyArg_Parse", (PYTHON_PROC*)&dll_PyArg_Parse},
+ {"PyArg_ParseTuple", (PYTHON_PROC*)&dll_PyArg_ParseTuple},
+ {"Py_BuildValue", (PYTHON_PROC*)&dll_Py_BuildValue},
+! #else
+ {"_PyArg_Parse_SizeT", (PYTHON_PROC*)&dll_PyArg_Parse},
+ {"_PyArg_ParseTuple_SizeT", (PYTHON_PROC*)&dll_PyArg_ParseTuple},
+ {"_Py_BuildValue_SizeT", (PYTHON_PROC*)&dll_Py_BuildValue},
+! #endif
+ {"PyMem_Free", (PYTHON_PROC*)&dll_PyMem_Free},
+ {"PyMem_Malloc", (PYTHON_PROC*)&dll_PyMem_Malloc},
+ {"PyDict_SetItemString", (PYTHON_PROC*)&dll_PyDict_SetItemString},
+--- 491,505 ----
+ PYTHON_PROC *ptr;
+ } python_funcname_table[] =
+ {
+! # ifndef PY_SSIZE_T_CLEAN
+ {"PyArg_Parse", (PYTHON_PROC*)&dll_PyArg_Parse},
+ {"PyArg_ParseTuple", (PYTHON_PROC*)&dll_PyArg_ParseTuple},
+ {"Py_BuildValue", (PYTHON_PROC*)&dll_Py_BuildValue},
+! # else
+ {"_PyArg_Parse_SizeT", (PYTHON_PROC*)&dll_PyArg_Parse},
+ {"_PyArg_ParseTuple_SizeT", (PYTHON_PROC*)&dll_PyArg_ParseTuple},
+ {"_Py_BuildValue_SizeT", (PYTHON_PROC*)&dll_Py_BuildValue},
+! # endif
+ {"PyMem_Free", (PYTHON_PROC*)&dll_PyMem_Free},
+ {"PyMem_Malloc", (PYTHON_PROC*)&dll_PyMem_Malloc},
+ {"PyDict_SetItemString", (PYTHON_PROC*)&dll_PyDict_SetItemString},
+***************
+*** 678,684 ****
+ PYTHON_PROC *ucs_as_encoded_string =
+ (PYTHON_PROC*)&py_PyUnicode_AsEncodedString;
+
+! #if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON3)
+ /* Can't have Python and Python3 loaded at the same time.
+ * It cause a crash, because RTLD_GLOBAL is needed for
+ * standard C extension libraries of one or both python versions. */
+--- 680,686 ----
+ PYTHON_PROC *ucs_as_encoded_string =
+ (PYTHON_PROC*)&py_PyUnicode_AsEncodedString;
+
+! # if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON3)
+ /* Can't have Python and Python3 loaded at the same time.
+ * It cause a crash, because RTLD_GLOBAL is needed for
+ * standard C extension libraries of one or both python versions. */
+***************
+*** 688,694 ****
+ emsg(_("E836: This Vim cannot execute :python after using :py3"));
+ return FAIL;
+ }
+! #endif
+
+ if (hinstPython)
+ return OK;
+--- 690,696 ----
+ emsg(_("E836: This Vim cannot execute :python after using :py3"));
+ return FAIL;
+ }
+! # endif
+
+ if (hinstPython)
+ return OK;
+*** ../vim-8.1.0866/src/version.c 2019-02-01 20:42:18.718884011 +0100
+--- src/version.c 2019-02-01 22:09:48.697309931 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 867,
+ /**/
+
+--
+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.0868 b/data/vim/patches/8.1.0868
new file mode 100644
index 000000000..0e10b89bf
--- /dev/null
+++ b/data/vim/patches/8.1.0868
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0868
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0868
+Problem: Crash if triggering garbage collector after a function call.
+ (Michael Henry)
+Solution: Don't call the garbage collector right away, do it later.
+ (closes #3894)
+Files: src/userfunc.c
+
+
+*** ../vim-8.1.0867/src/userfunc.c 2019-01-26 17:28:22.236599060 +0100
+--- src/userfunc.c 2019-02-02 13:54:42.694976789 +0100
+***************
+*** 679,688 ****
+ {
+ // We have made a lot of copies. This can happen when
+ // repetitively calling a function that creates a reference to
+! // itself somehow. Call the garbage collector here to avoid using
+ // too much memory.
+ made_copy = 0;
+! (void)garbage_collect(FALSE);
+ }
+ }
+ }
+--- 679,688 ----
+ {
+ // We have made a lot of copies. This can happen when
+ // repetitively calling a function that creates a reference to
+! // itself somehow. Call the garbage collector soon to avoid using
+ // too much memory.
+ made_copy = 0;
+! want_garbage_collect = TRUE;
+ }
+ }
+ }
+*** ../vim-8.1.0867/src/version.c 2019-02-01 22:10:13.000410600 +0100
+--- src/version.c 2019-02-02 13:56:09.066466588 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 868,
+ /**/
+
+--
+Save the plankton - eat a whale.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0869 b/data/vim/patches/8.1.0869
new file mode 100644
index 000000000..9351c0525
--- /dev/null
+++ b/data/vim/patches/8.1.0869
@@ -0,0 +1,420 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0869
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0869
+Problem: Travis CI script is too complicated.
+Solution: Add names to environments. Move appveyor script outside of src
+ directory. (Ozaki Kiichi, closes #3890)
+Files: .travis.yml, appveyor.yml, ci/appveyor.bat, src/appveyor.bat,
+ Filelist
+
+
+*** ../vim-8.1.0868/.travis.yml 2019-01-28 22:59:32.154270544 +0100
+--- .travis.yml 2019-02-03 13:07:39.494492101 +0100
+***************
+*** 10,67 ****
+ - gcc
+
+ env:
+! - BUILD=yes TEST=test COVERAGE=no FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+! - 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 test_libvterm" 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
+
+! # instead of a 2*2*7 matrix (2*os + 2*compiler + 7*env),
+ # exclude some builds on mac os x and linux
+ # on mac os x "tiny" is always without GUI
+ # linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
+ matrix:
+ exclude:
+ - os: osx
+! env: BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ - os: osx
+! env: BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
+ - os: osx
+! env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
+ - os: osx
+! env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ - os: osx
+! env: BUILD=yes TEST="scripttests test_libvterm" 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'"
+ - os: osx
+! env: 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'"
+ - os: linux
+ compiler: clang
+! env: 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'"
+ - os: linux
+ compiler: clang
+! env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
+ - os: linux
+ compiler: clang
+! env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ - os: linux
+! env: 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'"
+
+ branches:
+ except:
+--- 10,67 ----
+ - gcc
+
+ env:
+! - &tiny-nogui
+! BUILD=yes TEST=test COVERAGE=no FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+! - &tiny
+! BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+! - &asan # 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'"
+! - &linux-huge
+! BUILD=yes TEST="scripttests test_libvterm" 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'"
+! - &unittests
+! BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
+! - &normal
+! BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
+! - &small
+! BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+! - &osx-huge # 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
+
+! # instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
+ # exclude some builds on mac os x and linux
+ # on mac os x "tiny" is always without GUI
+ # linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
+ matrix:
+ exclude:
+ - os: osx
+! env: *tiny
+ - os: osx
+! env: *normal
+ - os: osx
+! env: *unittests
+ - os: osx
+! env: *small
+ - os: osx
+! env: *linux-huge
+ - os: osx
+! env: *asan
+ - os: linux
+ compiler: clang
+! env: *asan
+ - os: linux
+ compiler: clang
+! env: *unittests
+ - os: linux
+ compiler: clang
+! env: *small
+ - os: linux
+! env: *osx-huge
+
+ branches:
+ except:
+***************
+*** 89,123 ****
+
+ before_install:
+ - rvm reset
+! # Remove /opt/python/3.x.x/bin from $PATH for using system python3.
+! # ("pyenv global system" doesn't seem to work.)
+! - if [ "$TRAVIS_OS_NAME" = "linux" ] && which python3 | grep '/opt/python/' > /dev/null; then export PATH=$(echo $PATH | sed -e "s#$(echo $(which python3) | sed -e 's#/python3$##'):##"); fi
+! - if [ "$COVERAGE" = "yes" ]; then pip install --user cpp-coveralls; fi
+! # needed for https support for coveralls
+! # building cffi only works with gcc, not with clang
+! - if [ "$COVERAGE" = "yes" ]; then CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1; fi
+! # Lua is not installed on Travis OSX
+! - if [ "$TRAVIS_OS_NAME" = "osx" ]; then export LUA_PREFIX=/usr/local; fi
+! # Use llvm-cov instead of gcov when compiler is clang.
+! - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CC" = "clang" ]; then ln -sf $(which llvm-cov) /home/travis/bin/gcov; fi
+
+- # Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
+ before_script:
+! - if [ "$TRAVIS_OS_NAME" = "linux" ]; then export DISPLAY=:99.0 && sh -e /etc/init.d/xvfb start && sleep 3; fi
+
+ script:
+ - NPROC=$(getconf _NPROCESSORS_ONLN)
+! - if [ "$CHECK_AUTOCONF" = "yes" -a "$CC" = "gcc" ]; then make -C src autoconf; fi
+! - if [ "x$SHADOWOPT" != x ]; then make -C src shadow; fi
+! - (cd ${SRCDIR} && ./configure --with-features=$FEATURES $CONFOPT --enable-fail-if-missing && if [ "$BUILD" = "yes" ]; then make -j$NPROC; fi)
+! # Show Vim version and also if_xx versions.
+! - if [ "$BUILD" = "yes" ]; then ${SRCDIR}/vim --version; ${SRCDIR}/vim --not-a-term -u NONE -S ${SRCDIR}/testdir/if_ver-1.vim -c quit > /dev/null; ${SRCDIR}/vim --not-a-term -u NONE -S ${SRCDIR}/testdir/if_ver-2.vim -c quit > /dev/null; cat if_ver.txt; fi
+! - make $SHADOWOPT $TEST
+! - if [ -n "$ASAN_OPTIONS" ]; then for log in $(find -type f -name 'asan.*' -size +0); do asan_symbolize < "$log"; err=1; done; fi
+! - if [ -n "$err" ]; then exit 1; fi
+
+ after_success:
+! - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b ${SRCDIR} -x .xs -e ${SRCDIR}/if_perl.c -e ${SRCDIR}/xxd -e ${SRCDIR}/libvterm --encodings utf-8 latin-1 EUC-KR; fi
+! - if [ "$COVERAGE" = "yes" ]; then cd ${SRCDIR} && bash <(curl -s https://codecov.io/bash) ; fi
+
+ # vim:set sts=2 sw=2 tw=0 et:
+--- 89,171 ----
+
+ before_install:
+ - rvm reset
+! # Remove /opt/python/3.x.x/bin from $PATH for using system python3.
+! # ("pyenv global system" doesn't seem to work.)
+! - |
+! if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "$(which python3)" =~ ^/opt/python/ ]]; then
+! export PATH=$(py3=$(which python3); echo ${PATH//${py3%/python3}:/})
+! fi
+! - |
+! if [[ "${COVERAGE}" = "yes" ]]; then
+! pip install --user cpp-coveralls
+! fi
+! # needed for https support for coveralls
+! # building cffi only works with gcc, not with clang
+! - |
+! if [[ "${COVERAGE}" = "yes" ]]; then
+! CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1
+! fi
+! # Lua is not installed on Travis OSX
+! - |
+! if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then
+! export LUA_PREFIX=/usr/local
+! fi
+! # Use llvm-cov instead of gcov when compiler is clang.
+! - |
+! if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "${CC}" = "clang" ]]; then
+! ln -sf "$(which llvm-cov)" /home/travis/bin/gcov
+! fi
+
+ before_script:
+! # Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
+! - |
+! if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
+! export DISPLAY=:99.0
+! sh -e /etc/init.d/xvfb start && sleep 3
+! fi
+
+ script:
+ - NPROC=$(getconf _NPROCESSORS_ONLN)
+! - |
+! if [[ "${CHECK_AUTOCONF}" = "yes" ]] && [[ "${CC}" = "gcc" ]]; then
+! make -C src autoconf
+! fi
+! - |
+! if [[ -n "${SHADOWOPT}" ]]; then
+! make -C src shadow
+! fi
+! - |
+! (
+! cd "${SRCDIR}" \
+! && ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
+! ) && if [[ "${BUILD}" = "yes" ]]; then
+! make ${SHADOWOPT} -j${NPROC}
+! fi
+! # Show Vim version and also if_xx versions.
+! - |
+! if [[ "${BUILD}" = "yes" ]]; then
+! "${SRCDIR}"/vim --version
+! "${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-1.vim -c quit > /dev/null
+! "${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-2.vim -c quit > /dev/null
+! cat if_ver.txt
+! fi
+! - make ${SHADOWOPT} ${TEST}
+! - |
+! if [[ -n "${ASAN_OPTIONS}" ]]; then
+! while read log; do
+! asan_symbolize < "${log}"
+! done < <(find . -type f -name 'asan.*' -size +0)
+! [[ -z "${log}" ]] # exit 1 if there are ASAN logs
+! fi
+
+ after_success:
+! - |
+! if [[ "${COVERAGE}" = "yes" ]]; then
+! ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8 latin-1 EUC-KR
+! fi
+! - |
+! if [[ "${COVERAGE}" = "yes" ]]; then
+! (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
+! fi
+
+ # vim:set sts=2 sw=2 tw=0 et:
+*** ../vim-8.1.0868/appveyor.yml 2017-11-26 14:22:54.000000000 +0100
+--- appveyor.yml 2019-02-03 13:07:39.494492101 +0100
+***************
+*** 19,25 ****
+ - 'set INCLUDE=%INCLUDE%C:\Program Files (x86)\Windows Kits\8.1\Include\um'
+
+ build_script:
+! - src/appveyor.bat
+
+ test_script:
+ - cd src/testdir
+--- 19,25 ----
+ - 'set INCLUDE=%INCLUDE%C:\Program Files (x86)\Windows Kits\8.1\Include\um'
+
+ build_script:
+! - ci/appveyor.bat
+
+ test_script:
+ - cd src/testdir
+*** ../vim-8.1.0868/ci/appveyor.bat 1970-01-01 01:00:00.000000000 +0100
+--- ci/appveyor.bat 2019-02-03 13:07:39.494492101 +0100
+***************
+*** 0 ****
+--- 1,46 ----
++ @echo off
++ :: Batch file for building/testing Vim on AppVeyor
++
++ setlocal ENABLEDELAYEDEXPANSION
++ cd %APPVEYOR_BUILD_FOLDER%
++
++ cd src
++ echo "Building MinGW 32bit console version"
++ set PATH=c:\msys64\mingw32\bin;%PATH%
++ mingw32-make.exe -f Make_ming.mak GUI=no OPTIMIZE=speed IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
++ :: Save vim.exe before Make clean, moved back below.
++ copy vim.exe testdir
++ mingw32-make.exe -f Make_ming.mak clean
++
++ :: Build Mingw huge version with python and channel support, or
++ :: with specified features without python.
++ echo "Building MinGW 32bit GUI version"
++ if "%FEATURE%" == "HUGE" (
++ mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed CHANNEL=yes GUI=yes IME=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35 FEATURES=%FEATURE% || exit 1
++ ) ELSE (
++ mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed GUI=yes IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
++ )
++ .\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_ming.txt
++
++ echo "Building MSVC 64bit console Version"
++ sed -e "s/\$(LINKARGS2)/\$(LINKARGS2) | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
++ nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=no IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
++ nmake -f Make_mvc2.mak clean
++
++ :: build MSVC huge version with python and channel support
++ :: GUI needs to be last, so that testing works
++ echo "Building MSVC 64bit GUI Version"
++ if "%FEATURE%" == "HUGE" (
++ nmake -f Make_mvc2.mak DIRECTX=yes CPU=AMD64 CHANNEL=yes OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 FEATURES=%FEATURE% || exit 1
++ ) ELSE (
++ nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
++ )
++ .\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt
++
++ :: Restore vim.exe, tests will run with this.
++ move /Y testdir\vim.exe .
++ echo "version output MinGW"
++ type ver_ming.txt
++ echo "version output MVC"
++ type ver_msvc.txt
++ cd ..
+*** ../vim-8.1.0868/src/appveyor.bat 2019-01-24 17:59:35.143217444 +0100
+--- src/appveyor.bat 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,46 ****
+- @echo off
+- :: Batch file for building/testing Vim on AppVeyor
+-
+- setlocal ENABLEDELAYEDEXPANSION
+- cd %APPVEYOR_BUILD_FOLDER%
+-
+- cd src
+- echo "Building MinGW 32bit console version"
+- set PATH=c:\msys64\mingw32\bin;%PATH%
+- mingw32-make.exe -f Make_ming.mak GUI=no OPTIMIZE=speed IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+- :: Save vim.exe before Make clean, moved back below.
+- copy vim.exe testdir
+- mingw32-make.exe -f Make_ming.mak clean
+-
+- :: Build Mingw huge version with python and channel support, or
+- :: with specified features without python.
+- echo "Building MinGW 32bit GUI version"
+- if "%FEATURE%" == "HUGE" (
+- mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed CHANNEL=yes GUI=yes IME=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35 FEATURES=%FEATURE% || exit 1
+- ) ELSE (
+- mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed GUI=yes IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+- )
+- .\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_ming.txt
+-
+- echo "Building MSVC 64bit console Version"
+- sed -e "s/\$(LINKARGS2)/\$(LINKARGS2) | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
+- nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=no IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+- nmake -f Make_mvc2.mak clean
+-
+- :: build MSVC huge version with python and channel support
+- :: GUI needs to be last, so that testing works
+- echo "Building MSVC 64bit GUI Version"
+- if "%FEATURE%" == "HUGE" (
+- nmake -f Make_mvc2.mak DIRECTX=yes CPU=AMD64 CHANNEL=yes OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 FEATURES=%FEATURE% || exit 1
+- ) ELSE (
+- nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
+- )
+- .\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt
+-
+- :: Restore vim.exe, tests will run with this.
+- move /Y testdir\vim.exe .
+- echo "version output MinGW"
+- type ver_ming.txt
+- echo "version output MVC"
+- type ver_msvc.txt
+- cd ..
+--- 0 ----
+*** ../vim-8.1.0868/Filelist 2019-01-31 13:47:51.114632702 +0100
+--- Filelist 2019-02-03 13:09:38.941715967 +0100
+***************
+*** 7,14 ****
+ .lgtm.yml \
+ .travis.yml \
+ appveyor.yml \
+ src/Make_all.mak \
+- src/appveyor.bat \
+ src/README.txt \
+ src/alloc.h \
+ src/arabic.c \
+--- 7,14 ----
+ .lgtm.yml \
+ .travis.yml \
+ appveyor.yml \
++ ci/appveyor.bat \
+ src/Make_all.mak \
+ src/README.txt \
+ src/alloc.h \
+ src/arabic.c \
+*** ../vim-8.1.0868/src/version.c 2019-02-02 14:02:26.012222133 +0100
+--- src/version.c 2019-02-03 13:09:51.489634493 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 869,
+ /**/
+
+--
+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.0870 b/data/vim/patches/8.1.0870
new file mode 100644
index 000000000..7112c7080
--- /dev/null
+++ b/data/vim/patches/8.1.0870
@@ -0,0 +1,1685 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0870
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0870
+Problem: Vim doesn't use the new ConPTY support in Windows 10.
+Solution: Use ConPTY support, if available. (Nobuhiro Takasaki, closes #3794)
+Files: runtime/doc/eval.txt, runtime/doc/options.txt,
+ runtime/doc/terminal.txt, src/channel.c, src/evalfunc.c,
+ src/globals.h, src/option.c, src/option.h, src/os_win32.c,
+ src/proto/terminal.pro, src/structs.h, src/terminal.c,
+ src/testdir/gen_opt_test.vim, src/testdir/test_autocmd.vim,
+ src/testdir/test_mksession.vim, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0869/runtime/doc/eval.txt 2019-01-31 15:52:05.265907656 +0100
+--- runtime/doc/eval.txt 2019-02-03 13:52:16.589856140 +0100
+***************
+*** 9410,9415 ****
+--- 9469,9478 ----
+ "ansi_colors" A list of 16 color names or hex codes
+ defining the ANSI palette used in GUI
+ color modes. See |g:terminal_ansi_colors|.
++ "term_mode" (MS-Windows only): Specify which pty to
++ use:
++ "winpty": Use winpty
++ "conpty": Use ConPTY (if available)
+
+ {only available when compiled with the |+terminal| feature}
+
+***************
+*** 10126,10133 ****
+--- 10190,10199 ----
+ cmdline_info Compiled with 'showcmd' and 'ruler' support.
+ comments Compiled with |'comments'| support.
+ compatible Compiled to be very Vi compatible.
++ conpty Platform where |ConPTY| can be used.
+ cryptv Compiled with encryption support |encryption|.
+ cscope Compiled with |cscope| support.
++ cursorbind Compiled with |cursorbind| (always true)
+ debug Compiled with "DEBUG" defined.
+ dialog_con Compiled with console dialog support.
+ dialog_gui Compiled with GUI dialog support.
+*** ../vim-8.1.0869/runtime/doc/options.txt 2019-01-31 18:26:05.730803572 +0100
+--- runtime/doc/options.txt 2019-02-03 14:35:38.054496226 +0100
+***************
+*** 8009,8014 ****
+--- 8054,8076 ----
+ Note that the "cterm" attributes are still used, not the "gui" ones.
+ NOTE: This option is reset when 'compatible' is set.
+
++ *'termmode'* *'tmod'*
++ 'termmode' 'tmod' string (default "")
++ local to window
++ {not in Vi, MS-Windows only}
++ Whether the window uses winpty or |ConPTY| as the virtual console.
++ When set before opening the terminal, it influences what pty is used.
++ When opening the terminal it will be set to the actually used pty.
++
++ Possible values are:
++ "" use ConPTY if possible, winpty otherwise
++ "winpty" use winpty, fail if not supported
++ "conpty" use |ConPTY|, fail if not supported
++
++ |ConPTY| support depends on the platform (Windows 10 October 2018
++ edition). winpty support needs to be installed. If neither is
++ supported then you cannot open a terminal window.
++
+ *'termwinscroll'* *'twsl'*
+ 'termwinscroll' 'twsl' number (default 10000)
+ local to buffer
+*** ../vim-8.1.0869/runtime/doc/terminal.txt 2018-10-19 22:35:04.885189994 +0200
+--- runtime/doc/terminal.txt 2019-02-03 13:53:49.233271142 +0100
+***************
+*** 228,234 ****
+ for Python "++eof=exit()". Special
+ codes can be used like with `:map`,
+ e.g. "<C-Z>" for CTRL-Z.
+!
+ If you want to use more options use the |term_start()|
+ function.
+ If you want to split the window vertically, use: >
+--- 228,235 ----
+ for Python "++eof=exit()". Special
+ codes can be used like with `:map`,
+ e.g. "<C-Z>" for CTRL-Z.
+! ++winpty Use winpty as the virtual console.
+! ++conpty Use |ConPTY| as the virtual console.
+ If you want to use more options use the |term_start()|
+ function.
+ If you want to split the window vertically, use: >
+***************
+*** 410,415 ****
+--- 411,423 ----
+ to point to the right file, if needed. If you have both the 32-bit and 64-bit
+ version, rename to winpty32.dll and winpty64.dll to match the way Vim was
+ build.
++ *ConPTY*
++ On more recent versions of MS-Windows 10 (beginning with the "October 2018
++ Update"), winpty is no longer required. On those versions, |:terminal| will use
++ Windows' built-in support for hosting terminal applications, "ConPTY". When
++ ConPTY is in use, there may be rendering artifacts regarding ambiguous-width
++ characters. If you encounter any such issues, set 'termmode' to winpty (which
++ you then must have instlled).
+
+ Environment variables are used to pass information to the running job:
+ VIM_SERVERNAME v:servername
+*** ../vim-8.1.0869/src/channel.c 2019-01-31 15:52:05.265907656 +0100
+--- src/channel.c 2019-02-03 14:13:11.701910368 +0100
+***************
+*** 1720,1730 ****
+ char_u *res;
+ char_u *p;
+
+! /* If there is only one buffer just get that one. */
+! if (head->rq_next == NULL || head->rq_next->rq_next == NULL)
+! return channel_get(channel, part, outlen);
+!
+! /* Concatenate everything into one buffer. */
+ for (node = head->rq_next; node != NULL; node = node->rq_next)
+ len += node->rq_buflen;
+ res = lalloc(len + 1, TRUE);
+--- 1720,1726 ----
+ char_u *res;
+ char_u *p;
+
+! // Concatenate everything into one buffer.
+ for (node = head->rq_next; node != NULL; node = node->rq_next)
+ len += node->rq_buflen;
+ res = lalloc(len + 1, TRUE);
+***************
+*** 1738,1744 ****
+ }
+ *p = NUL;
+
+! /* Free all buffers */
+ do
+ {
+ p = channel_get(channel, part, NULL);
+--- 1734,1740 ----
+ }
+ *p = NUL;
+
+! // Free all buffers
+ do
+ {
+ p = channel_get(channel, part, NULL);
+***************
+*** 1747,1762 ****
+
+ if (outlen != NULL)
+ {
+ *outlen += len;
+ return res;
+ }
+
+! /* turn all NUL into NL */
+! while (len > 0)
+ {
+! --len;
+! if (res[len] == NUL)
+! res[len] = NL;
+ }
+
+ return res;
+--- 1743,1779 ----
+
+ if (outlen != NULL)
+ {
++ // Returning the length, keep NUL characters.
+ *outlen += len;
+ return res;
+ }
+
+! // Turn all NUL into NL, so that the result can be used as a string.
+! p = res;
+! while (p < res + len)
+ {
+! if (*p == NUL)
+! *p = NL;
+! #ifdef WIN32
+! else if (*p == 0x1b)
+! {
+! // crush the escape sequence OSC 0/1/2: ESC ]0;
+! if (p + 3 < res + len
+! && p[1] == ']'
+! && (p[2] == '0' || p[2] == '1' || p[2] == '2')
+! && p[3] == ';')
+! {
+! // '\a' becomes a NL
+! while (p < res + (len - 1) && *p != '\a')
+! ++p;
+! // BEL is zero width characters, suppress display mistake
+! // ConPTY (after 10.0.18317) requires advance checking
+! if (p[-1] == NUL)
+! p[-1] = 0x07;
+! }
+! }
+! #endif
+! ++p;
+ }
+
+ return res;
+***************
+*** 4330,4336 ****
+ channel = first_channel;
+ continue;
+ }
+! if (channel->ch_to_be_freed)
+ {
+ channel_free(channel);
+ /* channel has been freed, start over */
+--- 4347,4353 ----
+ channel = first_channel;
+ continue;
+ }
+! if (channel->ch_to_be_freed || channel->ch_killing)
+ {
+ channel_free(channel);
+ /* channel has been freed, start over */
+***************
+*** 4930,4935 ****
+--- 4947,4974 ----
+ opt->jo_set2 |= JO2_TERM_KILL;
+ opt->jo_term_kill = tv_get_string_chk(item);
+ }
++ else if (STRCMP(hi->hi_key, "term_mode") == 0)
++ {
++ char_u *p;
++
++ if (!(supported2 & JO2_TERM_MODE))
++ break;
++ opt->jo_set2 |= JO2_TERM_MODE;
++ p = tv_get_string_chk(item);
++ if (p == NULL)
++ {
++ semsg(_(e_invargval), "term_mode");
++ return FAIL;
++ }
++ // Allow empty string, "winpty", "conpty".
++ if (!(*p == NUL || STRCMP(p, "winpty") == 0
++ || STRCMP(p, "conpty") == 0))
++ {
++ semsg(_(e_invargval), "term_mode");
++ return FAIL;
++ }
++ opt->jo_term_mode = p[0];
++ }
+ # if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ else if (STRCMP(hi->hi_key, "ansi_colors") == 0)
+ {
+***************
+*** 5440,5445 ****
+--- 5479,5494 ----
+ channel_need_redraw = TRUE;
+ }
+
++ if (job->jv_channel != NULL
++ && job->jv_channel->ch_anonymous_pipe && !job->jv_channel->ch_killing)
++ {
++ ++safe_to_invoke_callback;
++ channel_free_contents(job->jv_channel);
++ job->jv_channel->ch_job = NULL;
++ job->jv_channel = NULL;
++ --safe_to_invoke_callback;
++ }
++
+ // Do not free the job in case the close callback of the associated channel
+ // isn't invoked yet and may get information by job_info().
+ if (job->jv_refcount == 0 && !job_channel_still_useful(job))
+*** ../vim-8.1.0869/src/evalfunc.c 2019-01-30 22:01:36.982854408 +0100
+--- src/evalfunc.c 2019-02-03 13:46:59.595853343 +0100
+***************
+*** 6738,6743 ****
+--- 6738,6747 ----
+ else if (STRICMP(name, "terminal") == 0)
+ n = terminal_enabled();
+ #endif
++ #if defined(FEAT_TERMINAL) && defined(WIN3264)
++ else if (STRICMP(name, "conpty") == 0)
++ n = use_conpty();
++ #endif
+ }
+
+ rettv->vval.v_number = n;
+*** ../vim-8.1.0869/src/globals.h 2019-01-26 17:28:22.224599141 +0100
+--- src/globals.h 2019-02-03 13:46:59.595853343 +0100
+***************
+*** 1432,1438 ****
+ || defined(DYNAMIC_ICONV) \
+ || defined(DYNAMIC_GETTEXT) \
+ || defined(DYNAMIC_MZSCHEME) \
+! || defined(DYNAMIC_LUA)
+ EXTERN char e_loadlib[] INIT(= N_("E370: Could not load library %s"));
+ EXTERN char e_loadfunc[] INIT(= N_("E448: Could not load library function %s"));
+ #endif
+--- 1432,1439 ----
+ || defined(DYNAMIC_ICONV) \
+ || defined(DYNAMIC_GETTEXT) \
+ || defined(DYNAMIC_MZSCHEME) \
+! || defined(DYNAMIC_LUA) \
+! || defined(FEAT_TERMINAL)
+ EXTERN char e_loadlib[] INIT(= N_("E370: Could not load library %s"));
+ EXTERN char e_loadfunc[] INIT(= N_("E448: Could not load library function %s"));
+ #endif
+*** ../vim-8.1.0869/src/option.c 2019-01-31 18:26:05.738803509 +0100
+--- src/option.c 2019-02-03 14:16:43.164569746 +0100
+***************
+*** 253,258 ****
+--- 253,259 ----
+ # define PV_TWK OPT_WIN(WV_TWK)
+ # define PV_TWS OPT_WIN(WV_TWS)
+ # define PV_TWSL OPT_BUF(BV_TWSL)
++ # define PV_TMOD OPT_WIN(WV_TMOD)
+ #endif
+ #ifdef FEAT_SIGNS
+ # define PV_SCL OPT_WIN(WV_SCL)
+***************
+*** 2700,2705 ****
+--- 2701,2715 ----
+ {(char_u *)FALSE, (char_u *)FALSE}
+ #endif
+ SCTX_INIT},
++ {"termmode", "tmod", P_STRING|P_ALLOCED|P_VI_DEF,
++ #ifdef FEAT_TERMINAL
++ (char_u *)VAR_WIN, PV_TMOD,
++ {(char_u *)"", (char_u *)NULL}
++ #else
++ (char_u *)NULL, PV_NONE,
++ {(char_u *)NULL, (char_u *)0L}
++ #endif
++ SCTX_INIT},
+ {"termwinkey", "twk", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
+ #ifdef FEAT_TERMINAL
+ (char_u *)VAR_WIN, PV_TWK,
+***************
+*** 3208,3213 ****
+--- 3218,3226 ----
+ #ifdef FEAT_SIGNS
+ static char *(p_scl_values[]) = {"yes", "no", "auto", NULL};
+ #endif
++ #ifdef FEAT_TERMINAL
++ static char *(p_tmod_values[]) = {"winpty", "conpty", "", NULL};
++ #endif
+
+ static void set_options_default(int opt_flags);
+ static void set_string_default_esc(char *name, char_u *val, int escape);
+***************
+*** 3661,3667 ****
+ {
+ char buf[50];
+
+! sprintf(buf, "cp%ld", (long)GetConsoleCP());
+ p_tenc = vim_strsave((char_u *)buf);
+ if (p_tenc != NULL)
+ {
+--- 3674,3685 ----
+ {
+ char buf[50];
+
+! /* Win32 console: In ConPTY, GetConsoleCP() returns zero.
+! * Use an alternative value. */
+! if (GetConsoleCP() == 0)
+! sprintf(buf, "cp%ld", (long)GetACP());
+! else
+! sprintf(buf, "cp%ld", (long)GetConsoleCP());
+ p_tenc = vim_strsave((char_u *)buf);
+ if (p_tenc != NULL)
+ {
+***************
+*** 7468,7481 ****
+ #endif
+
+ #ifdef FEAT_TERMINAL
+! /* 'termwinkey' */
+ else if (varp == &curwin->w_p_twk)
+ {
+ if (*curwin->w_p_twk != NUL
+ && string_to_key(curwin->w_p_twk, TRUE) == 0)
+ errmsg = e_invarg;
+ }
+! /* 'termwinsize' */
+ else if (varp == &curwin->w_p_tws)
+ {
+ if (*curwin->w_p_tws != NUL)
+--- 7486,7499 ----
+ #endif
+
+ #ifdef FEAT_TERMINAL
+! // 'termwinkey'
+ else if (varp == &curwin->w_p_twk)
+ {
+ if (*curwin->w_p_twk != NUL
+ && string_to_key(curwin->w_p_twk, TRUE) == 0)
+ errmsg = e_invarg;
+ }
+! // 'termwinsize'
+ else if (varp == &curwin->w_p_tws)
+ {
+ if (*curwin->w_p_tws != NUL)
+***************
+*** 7487,7492 ****
+--- 7505,7516 ----
+ errmsg = e_invarg;
+ }
+ }
++ // 'termmode'
++ else if (varp == &curwin->w_p_tmod)
++ {
++ if (check_opt_strings(*varp, p_tmod_values, FALSE) != OK)
++ errmsg = e_invarg;
++ }
+ #endif
+
+ #ifdef FEAT_VARTABS
+***************
+*** 8838,8844 ****
+ if (!has_vtp_working())
+ {
+ p_tgc = 0;
+! return (char_u*)N_("E954: 24-bit colors are not supported on this environment");
+ }
+ if (is_term_win32())
+ swap_tcap();
+--- 8862,8868 ----
+ if (!has_vtp_working())
+ {
+ p_tgc = 0;
+! return N_("E954: 24-bit colors are not supported on this environment");
+ }
+ if (is_term_win32())
+ swap_tcap();
+***************
+*** 10928,10933 ****
+--- 10952,10958 ----
+ case PV_TWK: return (char_u *)&(curwin->w_p_twk);
+ case PV_TWS: return (char_u *)&(curwin->w_p_tws);
+ case PV_TWSL: return (char_u *)&(curbuf->b_p_twsl);
++ case PV_TMOD: return (char_u *)&(curwin->w_p_tmod);
+ #endif
+
+ case PV_AI: return (char_u *)&(curbuf->b_p_ai);
+***************
+*** 11128,11133 ****
+--- 11153,11159 ----
+ #ifdef FEAT_TERMINAL
+ to->wo_twk = vim_strsave(from->wo_twk);
+ to->wo_tws = vim_strsave(from->wo_tws);
++ to->wo_tmod = vim_strsave(from->wo_tmod);
+ #endif
+ #ifdef FEAT_FOLDING
+ to->wo_fdc = from->wo_fdc;
+***************
+*** 11198,11203 ****
+--- 11224,11230 ----
+ #ifdef FEAT_TERMINAL
+ check_string_option(&wop->wo_twk);
+ check_string_option(&wop->wo_tws);
++ check_string_option(&wop->wo_tmod);
+ #endif
+ #ifdef FEAT_LINEBREAK
+ check_string_option(&wop->wo_briopt);
+***************
+*** 11241,11246 ****
+--- 11268,11274 ----
+ #ifdef FEAT_TERMINAL
+ clear_string_option(&wop->wo_twk);
+ clear_string_option(&wop->wo_tws);
++ clear_string_option(&wop->wo_tmod);
+ #endif
+ }
+
+*** ../vim-8.1.0869/src/option.h 2019-01-31 18:26:05.738803509 +0100
+--- src/option.h 2019-02-03 13:46:59.599853319 +0100
+***************
+*** 1112,1117 ****
+--- 1112,1118 ----
+ #ifdef FEAT_TERMINAL
+ , WV_TWK
+ , WV_TWS
++ , WV_TMOD
+ #endif
+ , WV_CRBIND
+ #ifdef FEAT_LINEBREAK
+*** ../vim-8.1.0869/src/os_win32.c 2019-01-24 23:11:44.631650199 +0100
+--- src/os_win32.c 2019-02-03 13:46:59.599853319 +0100
+***************
+*** 186,193 ****
+ static int win32_setattrs(char_u *name, int attrs);
+ static int win32_set_archive(char_u *name);
+
+- #ifndef FEAT_GUI_W32
+ static int vtp_working = 0;
+ static void vtp_init();
+ static void vtp_exit();
+ static int vtp_printf(char *format, ...);
+--- 186,195 ----
+ static int win32_setattrs(char_u *name, int attrs);
+ static int win32_set_archive(char_u *name);
+
+ static int vtp_working = 0;
++ static void vtp_flag_init();
++
++ #ifndef FEAT_GUI_W32
+ static void vtp_init();
+ static void vtp_exit();
+ static int vtp_printf(char *format, ...);
+***************
+*** 247,252 ****
+--- 249,255 ----
+ typedef BOOL (WINAPI *PfnSetConsoleScreenBufferInfoEx)(HANDLE, PDYN_CONSOLE_SCREEN_BUFFER_INFOEX);
+ static PfnSetConsoleScreenBufferInfoEx pSetConsoleScreenBufferInfoEx;
+ static BOOL has_csbiex = FALSE;
++ #endif
+
+ /*
+ * Get version number including build number
+***************
+*** 276,282 ****
+ return ver;
+ }
+
+!
+ /*
+ * Version of ReadConsoleInput() that works with IME.
+ * Works around problems on Windows 8.
+--- 279,285 ----
+ return ver;
+ }
+
+! #ifndef FEAT_GUI_W32
+ /*
+ * Version of ReadConsoleInput() that works with IME.
+ * Works around problems on Windows 8.
+***************
+*** 1508,1516 ****
+ /* Wait forever. */
+ dwEndTime = INFINITE;
+
+! /* We need to loop until the end of the time period, because
+! * we might get multiple unusable mouse events in that time.
+! */
+ for (;;)
+ {
+ // Only process messages when waiting.
+--- 1511,1518 ----
+ /* Wait forever. */
+ dwEndTime = INFINITE;
+
+! // We need to loop until the end of the time period, because
+! // we might get multiple unusable mouse events in that time.
+ for (;;)
+ {
+ // Only process messages when waiting.
+***************
+*** 2175,2180 ****
+--- 2177,2184 ----
+ #ifdef FEAT_CLIPBOARD
+ win_clip_init();
+ #endif
++
++ vtp_flag_init();
+ }
+
+
+***************
+*** 2675,2680 ****
+--- 2679,2685 ----
+ win_clip_init();
+ #endif
+
++ vtp_flag_init();
+ vtp_init();
+ }
+
+***************
+*** 5683,5689 ****
+--- 5688,5698 ----
+ {
+ /* deadly signal */
+ if (job->jv_job_object != NULL)
++ {
++ if (job->jv_channel != NULL && job->jv_channel->ch_anonymous_pipe)
++ job->jv_channel->ch_killing = TRUE;
+ return TerminateJobObject(job->jv_job_object, 0) ? OK : FAIL;
++ }
+ return terminate_all(job->jv_proc_info.hProcess, 0) ? OK : FAIL;
+ }
+
+***************
+*** 7621,7651 ****
+ return 0;
+ }
+
+- #ifndef FEAT_GUI_W32
+-
+ /*
+ * Support for 256 colors and 24-bit colors was added in Windows 10
+ * version 1703 (Creators update).
+ */
+! # define VTP_FIRST_SUPPORT_BUILD MAKE_VER(10, 0, 15063)
+
+ static void
+ vtp_init(void)
+ {
+- 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;
+- GetConsoleMode(g_hConOut, &mode);
+- mode |= (ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
+- if (SetConsoleMode(g_hConOut, mode) == 0)
+- vtp_working = 0;
+-
+ /* Use functions supported from Vista */
+ hKerneldll = GetModuleHandle("kernel32.dll");
+ if (hKerneldll != NULL)
+--- 7630,7682 ----
+ return 0;
+ }
+
+ /*
+ * Support for 256 colors and 24-bit colors was added in Windows 10
+ * version 1703 (Creators update).
+ */
+! #define VTP_FIRST_SUPPORT_BUILD MAKE_VER(10, 0, 15063)
+!
+! /*
+! * Support for pseudo-console (ConPTY) was added in windows 10
+! * version 1809 (October 2018 update).
+! */
+! #define CONPTY_FIRST_SUPPORT_BUILD MAKE_VER(10, 0, 17763)
+!
+! static void
+! vtp_flag_init(void)
+! {
+! DWORD ver = get_build_number();
+! #ifndef FEAT_GUI_W32
+! DWORD mode;
+! HANDLE out;
+!
+! out = GetStdHandle(STD_OUTPUT_HANDLE);
+!
+! vtp_working = (ver >= VTP_FIRST_SUPPORT_BUILD) ? 1 : 0;
+! GetConsoleMode(out, &mode);
+! mode |= (ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
+! if (SetConsoleMode(out, mode) == 0)
+! vtp_working = 0;
+! #endif
+!
+! #ifdef FEAT_GUI_W32
+! if (ver >= CONPTY_FIRST_SUPPORT_BUILD)
+! vtp_working = 1;
+! #endif
+!
+! }
+!
+! #ifndef FEAT_GUI_W32
+
+ static void
+ vtp_init(void)
+ {
+ HMODULE hKerneldll;
+ DYN_CONSOLE_SCREEN_BUFFER_INFOEX csbi;
+ # ifdef FEAT_TERMGUICOLORS
+ COLORREF fg, bg;
+ # endif
+
+ /* Use functions supported from Vista */
+ hKerneldll = GetModuleHandle("kernel32.dll");
+ if (hKerneldll != NULL)
+***************
+*** 7829,7840 ****
+ }
+
+ int
+- has_vtp_working(void)
+- {
+- return vtp_working;
+- }
+-
+- int
+ use_vtp(void)
+ {
+ return USE_VTP;
+--- 7860,7865 ----
+***************
+*** 7847,7849 ****
+--- 7872,7880 ----
+ }
+
+ #endif
++
++ int
++ has_vtp_working(void)
++ {
++ return vtp_working;
++ }
+*** ../vim-8.1.0869/src/proto/terminal.pro 2019-01-29 22:29:03.550799929 +0100
+--- src/proto/terminal.pro 2019-02-03 13:46:59.599853319 +0100
+***************
+*** 57,60 ****
+--- 57,62 ----
+ void term_send_eof(channel_T *ch);
+ job_T *term_getjob(term_T *term);
+ int terminal_enabled(void);
++ void term_free_conpty(term_T *term);
++ int use_conpty(void);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0869/src/structs.h 2019-01-31 18:26:05.738803509 +0100
+--- src/structs.h 2019-02-03 14:13:33.145774428 +0100
+***************
+*** 282,287 ****
+--- 282,289 ----
+ # define w_p_twk w_onebuf_opt.wo_twk /* 'termwinkey' */
+ char_u *wo_tws;
+ # define w_p_tws w_onebuf_opt.wo_tws /* 'termwinsize' */
++ char_u *wo_tmod;
++ # define w_p_tmod w_onebuf_opt.wo_tmod /* 'termmode' */
+ #endif
+
+ #ifdef FEAT_EVAL
+***************
+*** 1728,1740 ****
+ 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
+! * reference, the job refers to the channel. */
+! int ch_job_killed; /* TRUE when there was a job and it was killed
+! * or we know it died. */
+
+! int ch_refcount; /* reference count */
+ int ch_copyID;
+ };
+
+--- 1730,1744 ----
+ 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
+! // reference, the job refers to the channel.
+! int ch_job_killed; // TRUE when there was a job and it was killed
+! // or we know it died.
+! int ch_anonymous_pipe; // ConPTY
+! int ch_killing; // TerminateJobObject() was called
+
+! int ch_refcount; // reference count
+ int ch_copyID;
+ };
+
+***************
+*** 1787,1792 ****
+--- 1791,1797 ----
+ #define JO2_NORESTORE 0x2000 /* "norestore" */
+ #define JO2_TERM_KILL 0x4000 /* "term_kill" */
+ #define JO2_ANSI_COLORS 0x8000 /* "ansi_colors" */
++ #define JO2_TERM_MODE 0x10000 /* "term_mode" */
+
+ #define JO_MODE_ALL (JO_MODE + JO_IN_MODE + JO_OUT_MODE + JO_ERR_MODE)
+ #define JO_CB_ALL \
+***************
+*** 1859,1864 ****
+--- 1864,1870 ----
+ # if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ long_u jo_ansi_colors[16];
+ # endif
++ int jo_term_mode; // first character of "term_mode"
+ #endif
+ } jobopt_T;
+
+*** ../vim-8.1.0869/src/terminal.c 2019-01-29 23:06:50.097182305 +0100
+--- src/terminal.c 2019-02-03 14:48:39.219131609 +0100
+***************
+*** 65,70 ****
+--- 65,87 ----
+ cellattr_T sb_fill_attr; /* for short line */
+ } sb_line_T;
+
++ #ifdef WIN3264
++ # ifndef HPCON
++ # define HPCON VOID*
++ # endif
++ # ifndef EXTENDED_STARTUPINFO_PRESENT
++ # define EXTENDED_STARTUPINFO_PRESENT 0x00080000
++ # endif
++ # ifndef PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE
++ # define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE 0x00020016
++ # endif
++ typedef struct _DYN_STARTUPINFOEXW
++ {
++ STARTUPINFOW StartupInfo;
++ LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
++ } DYN_STARTUPINFOEXW, *PDYN_STARTUPINFOEXW;
++ #endif
++
+ /* typedef term_T in structs.h */
+ struct terminal_S {
+ term_T *tl_next;
+***************
+*** 92,101 ****
+--- 109,123 ----
+ char_u *tl_opencmd;
+ char_u *tl_eof_chars;
+
++ char_u *tl_arg0_cmd; // To format the status bar
++
+ #ifdef WIN3264
+ void *tl_winpty_config;
+ void *tl_winpty;
+
++ HPCON tl_conpty;
++ DYN_STARTUPINFOEXW tl_siex; // Structure that always needs to be hold
++
+ FILE *tl_out_fd;
+ #endif
+ #if defined(FEAT_SESSION)
+***************
+*** 147,152 ****
+--- 169,179 ----
+ /* Terminal active in terminal_loop(). */
+ static term_T *in_terminal_loop = NULL;
+
++ #ifdef WIN3264
++ static BOOL has_winpty = FALSE;
++ static BOOL has_conpty = FALSE;
++ #endif
++
+ #define MAX_ROW 999999 /* used for tl_dirty_row_end to update all rows */
+ #define KEY_BUF_LEN 200
+
+***************
+*** 715,720 ****
+--- 742,757 ----
+ vim_free(buf);
+ *p = ' ';
+ }
++ else if ((int)(p - cmd) == 6 && STRNICMP(cmd, "winpty", 6) == 0)
++ {
++ opt.jo_set2 |= JO2_TERM_MODE;
++ opt.jo_term_mode = 'w';
++ }
++ else if ((int)(p - cmd) == 6 && STRNICMP(cmd, "conpty", 6) == 0)
++ {
++ opt.jo_set2 |= JO2_TERM_MODE;
++ opt.jo_term_mode = 'c';
++ }
+ else
+ {
+ if (*p)
+***************
+*** 771,776 ****
+--- 808,818 ----
+ if (fprintf(fd, "terminal ++curwin ++cols=%d ++rows=%d ",
+ term->tl_cols, term->tl_rows) < 0)
+ return FAIL;
++ #ifdef WIN3264
++ if (*wp->w_p_tmod != NUL)
++ if (fprintf(fd, "++%s ", wp->w_p_tmod) < 0)
++ return FAIL;
++ #endif
+ if (term->tl_command != NULL && fputs((char *)term->tl_command, fd) < 0)
+ return FAIL;
+
+***************
+*** 871,876 ****
+--- 913,919 ----
+ vim_free(term->tl_status_text);
+ vim_free(term->tl_opencmd);
+ vim_free(term->tl_eof_chars);
++ vim_free(term->tl_arg0_cmd);
+ #ifdef WIN3264
+ if (term->tl_out_fd != NULL)
+ fclose(term->tl_out_fd);
+***************
+*** 2639,2648 ****
+ {
+ case VTERM_PROP_TITLE:
+ vim_free(term->tl_title);
+! /* a blank title isn't useful, make it empty, so that "running" is
+! * displayed */
+ if (*skipwhite((char_u *)value->string) == NUL)
+ term->tl_title = NULL;
+ #ifdef WIN3264
+ else if (!enc_utf8 && enc_codepage > 0)
+ {
+--- 2682,2699 ----
+ {
+ case VTERM_PROP_TITLE:
+ vim_free(term->tl_title);
+! // a blank title isn't useful, make it empty, so that "running" is
+! // displayed
+ if (*skipwhite((char_u *)value->string) == NUL)
+ term->tl_title = NULL;
++ // Same as blank
++ else if (term->tl_arg0_cmd != NULL
++ && STRNCMP(term->tl_arg0_cmd, (char_u *)value->string,
++ (int)STRLEN(term->tl_arg0_cmd)) == 0)
++ term->tl_title = NULL;
++ // Empty corrupted data of winpty
++ else if (STRNCMP(" - ", (char_u *)value->string, 4) == 0)
++ term->tl_title = NULL;
+ #ifdef WIN3264
+ else if (!enc_utf8 && enc_codepage > 0)
+ {
+***************
+*** 5318,5324 ****
+ + JO2_TERM_COLS + JO2_TERM_ROWS + JO2_VERTICAL + JO2_CURWIN
+ + JO2_CWD + JO2_ENV + JO2_EOF_CHARS
+ + JO2_NORESTORE + JO2_TERM_KILL
+! + JO2_ANSI_COLORS) == FAIL)
+ return;
+
+ buf = term_start(&argvars[0], NULL, &opt, 0);
+--- 5369,5375 ----
+ + JO2_TERM_COLS + JO2_TERM_ROWS + JO2_VERTICAL + JO2_CURWIN
+ + JO2_CWD + JO2_ENV + JO2_EOF_CHARS
+ + JO2_NORESTORE + JO2_TERM_KILL
+! + JO2_ANSI_COLORS + JO2_TERM_MODE) == FAIL)
+ return;
+
+ buf = term_start(&argvars[0], NULL, &opt, 0);
+***************
+*** 5426,5431 ****
+--- 5477,5803 ----
+ * 2. MS-Windows implementation.
+ */
+
++ HRESULT (WINAPI *pCreatePseudoConsole)(COORD, HANDLE, HANDLE, DWORD, HPCON*);
++ HRESULT (WINAPI *pResizePseudoConsole)(HPCON, COORD);
++ HRESULT (WINAPI *pClosePseudoConsole)(HPCON);
++ BOOL (*pInitializeProcThreadAttributeList)(LPPROC_THREAD_ATTRIBUTE_LIST, DWORD, DWORD, PSIZE_T);
++ BOOL (*pUpdateProcThreadAttribute)(LPPROC_THREAD_ATTRIBUTE_LIST, DWORD, DWORD_PTR, PVOID, SIZE_T, PVOID, PSIZE_T);
++ void (*pDeleteProcThreadAttributeList)(LPPROC_THREAD_ATTRIBUTE_LIST);
++
++ static int
++ dyn_conpty_init(int verbose)
++ {
++ static BOOL handled = FALSE;
++ static int result;
++ HMODULE hKerneldll;
++ int i;
++ static struct
++ {
++ char *name;
++ FARPROC *ptr;
++ } conpty_entry[] =
++ {
++ {"CreatePseudoConsole", (FARPROC*)&pCreatePseudoConsole},
++ {"ResizePseudoConsole", (FARPROC*)&pResizePseudoConsole},
++ {"ClosePseudoConsole", (FARPROC*)&pClosePseudoConsole},
++ {"InitializeProcThreadAttributeList",
++ (FARPROC*)&pInitializeProcThreadAttributeList},
++ {"UpdateProcThreadAttribute",
++ (FARPROC*)&pUpdateProcThreadAttribute},
++ {"DeleteProcThreadAttributeList",
++ (FARPROC*)&pDeleteProcThreadAttributeList},
++ {NULL, NULL}
++ };
++
++ if (handled)
++ return result;
++
++ if (!has_vtp_working())
++ {
++ handled = TRUE;
++ result = FAIL;
++ return FAIL;
++ }
++
++ hKerneldll = vimLoadLib("kernel32.dll");
++ for (i = 0; conpty_entry[i].name != NULL
++ && conpty_entry[i].ptr != NULL; ++i)
++ {
++ if ((*conpty_entry[i].ptr = (FARPROC)GetProcAddress(hKerneldll,
++ conpty_entry[i].name)) == NULL)
++ {
++ if (verbose)
++ semsg(_(e_loadfunc), conpty_entry[i].name);
++ return FAIL;
++ }
++ }
++
++ handled = TRUE;
++ result = OK;
++ return OK;
++ }
++
++ static int
++ conpty_term_and_job_init(
++ term_T *term,
++ typval_T *argvar,
++ char **argv,
++ jobopt_T *opt,
++ jobopt_T *orig_opt)
++ {
++ WCHAR *cmd_wchar = NULL;
++ WCHAR *cmd_wchar_copy = NULL;
++ WCHAR *cwd_wchar = NULL;
++ WCHAR *env_wchar = NULL;
++ channel_T *channel = NULL;
++ job_T *job = NULL;
++ HANDLE jo = NULL;
++ garray_T ga_cmd, ga_env;
++ char_u *cmd = NULL;
++ HRESULT hr;
++ COORD consize;
++ SIZE_T breq;
++ PROCESS_INFORMATION proc_info;
++ HANDLE i_theirs = NULL;
++ HANDLE o_theirs = NULL;
++ HANDLE i_ours = NULL;
++ HANDLE o_ours = NULL;
++
++ ga_init2(&ga_cmd, (int)sizeof(char*), 20);
++ ga_init2(&ga_env, (int)sizeof(char*), 20);
++
++ if (argvar->v_type == VAR_STRING)
++ {
++ cmd = argvar->vval.v_string;
++ }
++ else if (argvar->v_type == VAR_LIST)
++ {
++ if (win32_build_cmd(argvar->vval.v_list, &ga_cmd) == FAIL)
++ goto failed;
++ cmd = ga_cmd.ga_data;
++ }
++ if (cmd == NULL || *cmd == NUL)
++ {
++ emsg(_(e_invarg));
++ goto failed;
++ }
++
++ term->tl_arg0_cmd = vim_strsave(cmd);
++
++ cmd_wchar = enc_to_utf16(cmd, NULL);
++
++ if (cmd_wchar != NULL)
++ {
++ /* Request by CreateProcessW */
++ breq = wcslen(cmd_wchar) + 1 + 1; /* Addition of NUL by API */
++ cmd_wchar_copy = (PWSTR)alloc((int)(breq * sizeof(WCHAR)));
++ wcsncpy(cmd_wchar_copy, cmd_wchar, breq - 1);
++ }
++
++ ga_clear(&ga_cmd);
++ if (cmd_wchar == NULL)
++ goto failed;
++ if (opt->jo_cwd != NULL)
++ cwd_wchar = enc_to_utf16(opt->jo_cwd, NULL);
++
++ win32_build_env(opt->jo_env, &ga_env, TRUE);
++ env_wchar = ga_env.ga_data;
++
++ if (!CreatePipe(&i_theirs, &i_ours, NULL, 0))
++ goto failed;
++ if (!CreatePipe(&o_ours, &o_theirs, NULL, 0))
++ goto failed;
++
++ consize.X = term->tl_cols;
++ consize.Y = term->tl_rows;
++ hr = pCreatePseudoConsole(consize, i_theirs, o_theirs, 0,
++ &term->tl_conpty);
++ if (FAILED(hr))
++ goto failed;
++
++ term->tl_siex.StartupInfo.cb = sizeof(term->tl_siex);
++
++ /* Set up pipe inheritance safely: Vista or later. */
++ pInitializeProcThreadAttributeList(NULL, 1, 0, &breq);
++ term->tl_siex.lpAttributeList =
++ (PPROC_THREAD_ATTRIBUTE_LIST)alloc((int)breq);
++ if (!term->tl_siex.lpAttributeList)
++ goto failed;
++ if (!pInitializeProcThreadAttributeList(term->tl_siex.lpAttributeList, 1,
++ 0, &breq))
++ goto failed;
++ if (!pUpdateProcThreadAttribute(
++ term->tl_siex.lpAttributeList, 0,
++ PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, term->tl_conpty,
++ sizeof(HPCON), NULL, NULL))
++ goto failed;
++
++ channel = add_channel();
++ if (channel == NULL)
++ goto failed;
++
++ job = job_alloc();
++ if (job == NULL)
++ goto failed;
++ if (argvar->v_type == VAR_STRING)
++ {
++ int argc;
++
++ build_argv_from_string(cmd, &job->jv_argv, &argc);
++ }
++ else
++ {
++ int argc;
++
++ build_argv_from_list(argvar->vval.v_list, &job->jv_argv, &argc);
++ }
++
++ if (opt->jo_set & JO_IN_BUF)
++ job->jv_in_buf = buflist_findnr(opt->jo_io_buf[PART_IN]);
++
++ if (!CreateProcessW(NULL, cmd_wchar_copy, NULL, NULL, FALSE,
++ EXTENDED_STARTUPINFO_PRESENT | CREATE_UNICODE_ENVIRONMENT
++ | CREATE_SUSPENDED | CREATE_NEW_PROCESS_GROUP
++ | CREATE_DEFAULT_ERROR_MODE,
++ env_wchar, cwd_wchar,
++ &term->tl_siex.StartupInfo, &proc_info))
++ goto failed;
++
++ CloseHandle(i_theirs);
++ CloseHandle(o_theirs);
++
++ channel_set_pipes(channel,
++ (sock_T)i_ours,
++ (sock_T)o_ours,
++ (sock_T)o_ours);
++
++ /* Write lines with CR instead of NL. */
++ channel->ch_write_text_mode = TRUE;
++
++ /* Use to explicitly delete anonymous pipe handle. */
++ channel->ch_anonymous_pipe = TRUE;
++
++ jo = CreateJobObject(NULL, NULL);
++ if (jo == NULL)
++ goto failed;
++
++ if (!AssignProcessToJobObject(jo, proc_info.hProcess))
++ {
++ /* Failed, switch the way to terminate process with TerminateProcess. */
++ CloseHandle(jo);
++ jo = NULL;
++ }
++
++ ResumeThread(proc_info.hThread);
++ CloseHandle(proc_info.hThread);
++
++ vim_free(cmd_wchar);
++ vim_free(cmd_wchar_copy);
++ vim_free(cwd_wchar);
++ vim_free(env_wchar);
++
++ if (create_vterm(term, term->tl_rows, term->tl_cols) == FAIL)
++ goto failed;
++
++ #if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
++ if (opt->jo_set2 & JO2_ANSI_COLORS)
++ set_vterm_palette(term->tl_vterm, opt->jo_ansi_colors);
++ else
++ init_vterm_ansi_colors(term->tl_vterm);
++ #endif
++
++ channel_set_job(channel, job, opt);
++ job_set_options(job, opt);
++
++ job->jv_channel = channel;
++ job->jv_proc_info = proc_info;
++ job->jv_job_object = jo;
++ job->jv_status = JOB_STARTED;
++ ++job->jv_refcount;
++ term->tl_job = job;
++
++ /* Redirecting stdout and stderr doesn't work at the job level. Instead
++ * open the file here and handle it in. opt->jo_io was changed in
++ * setup_job_options(), use the original flags here. */
++ if (orig_opt->jo_io[PART_OUT] == JIO_FILE)
++ {
++ char_u *fname = opt->jo_io_name[PART_OUT];
++
++ ch_log(channel, "Opening output file %s", fname);
++ term->tl_out_fd = mch_fopen((char *)fname, WRITEBIN);
++ if (term->tl_out_fd == NULL)
++ semsg(_(e_notopen), fname);
++ }
++
++ return OK;
++
++ failed:
++ ga_clear(&ga_cmd);
++ ga_clear(&ga_env);
++ vim_free(cmd_wchar);
++ vim_free(cmd_wchar_copy);
++ vim_free(cwd_wchar);
++ if (channel != NULL)
++ channel_clear(channel);
++ if (job != NULL)
++ {
++ job->jv_channel = NULL;
++ job_cleanup(job);
++ }
++ term->tl_job = NULL;
++ if (jo != NULL)
++ CloseHandle(jo);
++
++ if (term->tl_siex.lpAttributeList != NULL)
++ {
++ pDeleteProcThreadAttributeList(term->tl_siex.lpAttributeList);
++ vim_free(term->tl_siex.lpAttributeList);
++ }
++ term->tl_siex.lpAttributeList = NULL;
++ if (o_theirs != NULL)
++ CloseHandle(o_theirs);
++ if (o_ours != NULL)
++ CloseHandle(o_ours);
++ if (i_ours != NULL)
++ CloseHandle(i_ours);
++ if (i_theirs != NULL)
++ CloseHandle(i_theirs);
++ if (term->tl_conpty != NULL)
++ pClosePseudoConsole(term->tl_conpty);
++ term->tl_conpty = NULL;
++ return FAIL;
++ }
++
++ static void
++ conpty_term_report_winsize(term_T *term, int rows, int cols)
++ {
++ COORD consize;
++
++ consize.X = cols;
++ consize.Y = rows;
++ pResizePseudoConsole(term->tl_conpty, consize);
++ }
++
++ void
++ term_free_conpty(term_T *term)
++ {
++ if (term->tl_siex.lpAttributeList != NULL)
++ {
++ pDeleteProcThreadAttributeList(term->tl_siex.lpAttributeList);
++ vim_free(term->tl_siex.lpAttributeList);
++ }
++ term->tl_siex.lpAttributeList = NULL;
++ if (term->tl_conpty != NULL)
++ pClosePseudoConsole(term->tl_conpty);
++ term->tl_conpty = NULL;
++ }
++
++ int
++ use_conpty(void)
++ {
++ return has_conpty;
++ }
++
+ # ifndef PROTO
+
+ #define WINPTY_SPAWN_FLAG_AUTO_SHUTDOWN 1ul
+***************
+*** 5516,5531 ****
+ return OK;
+ }
+
+- /*
+- * Create a new terminal of "rows" by "cols" cells.
+- * Store a reference in "term".
+- * Return OK or FAIL.
+- */
+ static int
+! term_and_job_init(
+ term_T *term,
+ typval_T *argvar,
+! char **argv UNUSED,
+ jobopt_T *opt,
+ jobopt_T *orig_opt)
+ {
+--- 5888,5898 ----
+ return OK;
+ }
+
+ static int
+! winpty_term_and_job_init(
+ term_T *term,
+ typval_T *argvar,
+! char **argv,
+ jobopt_T *opt,
+ jobopt_T *orig_opt)
+ {
+***************
+*** 5543,5550 ****
+ garray_T ga_cmd, ga_env;
+ char_u *cmd = NULL;
+
+- if (dyn_winpty_init(TRUE) == FAIL)
+- return FAIL;
+ ga_init2(&ga_cmd, (int)sizeof(char*), 20);
+ ga_init2(&ga_env, (int)sizeof(char*), 20);
+
+--- 5910,5915 ----
+***************
+*** 5564,5569 ****
+--- 5929,5936 ----
+ goto failed;
+ }
+
++ term->tl_arg0_cmd = vim_strsave(cmd);
++
+ cmd_wchar = enc_to_utf16(cmd, NULL);
+ ga_clear(&ga_cmd);
+ if (cmd_wchar == NULL)
+***************
+*** 5676,5684 ****
+ job->jv_job_object = jo;
+ job->jv_status = JOB_STARTED;
+ job->jv_tty_in = utf16_to_enc(
+! (short_u*)winpty_conin_name(term->tl_winpty), NULL);
+ job->jv_tty_out = utf16_to_enc(
+! (short_u*)winpty_conout_name(term->tl_winpty), NULL);
+ ++job->jv_refcount;
+ term->tl_job = job;
+
+--- 6043,6051 ----
+ job->jv_job_object = jo;
+ job->jv_status = JOB_STARTED;
+ job->jv_tty_in = utf16_to_enc(
+! (short_u *)winpty_conin_name(term->tl_winpty), NULL);
+ job->jv_tty_out = utf16_to_enc(
+! (short_u *)winpty_conout_name(term->tl_winpty), NULL);
+ ++job->jv_refcount;
+ term->tl_job = job;
+
+***************
+*** 5722,5728 ****
+ term->tl_winpty_config = NULL;
+ if (winpty_err != NULL)
+ {
+! char_u *msg = utf16_to_enc(
+ (short_u *)winpty_error_msg(winpty_err), NULL);
+
+ emsg(msg);
+--- 6089,6095 ----
+ term->tl_winpty_config = NULL;
+ if (winpty_err != NULL)
+ {
+! char *msg = (char *)utf16_to_enc(
+ (short_u *)winpty_error_msg(winpty_err), NULL);
+
+ emsg(msg);
+***************
+*** 5731,5736 ****
+--- 6098,6173 ----
+ return FAIL;
+ }
+
++ /*
++ * Create a new terminal of "rows" by "cols" cells.
++ * Store a reference in "term".
++ * Return OK or FAIL.
++ */
++ static int
++ term_and_job_init(
++ term_T *term,
++ typval_T *argvar,
++ char **argv UNUSED,
++ jobopt_T *opt,
++ jobopt_T *orig_opt)
++ {
++ int use_winpty = FALSE;
++ int use_conpty = FALSE;
++
++ has_winpty = dyn_winpty_init(FALSE) != FAIL ? TRUE : FALSE;
++ has_conpty = dyn_conpty_init(FALSE) != FAIL ? TRUE : FALSE;
++
++ if (!has_winpty && !has_conpty)
++ // If neither is available give the errors for winpty, since when
++ // conpty is not available it can't be installed either.
++ return dyn_winpty_init(TRUE);
++
++ if (opt->jo_term_mode == 'w')
++ set_string_option_direct((char_u *)"tmod", -1, (char_u *)"winpty",
++ OPT_FREE|OPT_LOCAL, 0);
++ if (opt->jo_term_mode == 'c')
++ set_string_option_direct((char_u *)"tmod", -1, (char_u *)"conpty",
++ OPT_FREE|OPT_LOCAL, 0);
++
++ if (curwin->w_p_tmod == NULL || *curwin->w_p_tmod == NUL)
++ {
++ if (has_conpty)
++ use_conpty = TRUE;
++ else if (has_winpty)
++ use_winpty = TRUE;
++ // else: error
++ }
++ else if (STRICMP(curwin->w_p_tmod, "winpty") == 0)
++ {
++ if (has_winpty)
++ use_winpty = TRUE;
++ }
++ else if (STRICMP(curwin->w_p_tmod, "conpty") == 0)
++ {
++ if (has_conpty)
++ use_conpty = TRUE;
++ else
++ return dyn_conpty_init(TRUE);
++ }
++
++ if (use_conpty)
++ {
++ set_string_option_direct((char_u *)"tmod", -1, (char_u *)"conpty",
++ OPT_FREE|OPT_LOCAL, 0);
++ return conpty_term_and_job_init(term, argvar, argv, opt, orig_opt);
++ }
++
++ if (use_winpty)
++ {
++ set_string_option_direct((char_u *)"tmod", -1, (char_u *)"winpty",
++ OPT_FREE|OPT_LOCAL, 0);
++ return winpty_term_and_job_init(term, argvar, argv, opt, orig_opt);
++ }
++
++ // error
++ return dyn_winpty_init(TRUE);
++ }
++
+ static int
+ create_pty_only(term_T *term, jobopt_T *options)
+ {
+***************
+*** 5804,5809 ****
+--- 6241,6247 ----
+ static void
+ term_free_vterm(term_T *term)
+ {
++ term_free_conpty(term);
+ if (term->tl_winpty != NULL)
+ winpty_free(term->tl_winpty);
+ term->tl_winpty = NULL;
+***************
+*** 5821,5826 ****
+--- 6259,6266 ----
+ static void
+ term_report_winsize(term_T *term, int rows, int cols)
+ {
++ if (term->tl_conpty)
++ conpty_term_report_winsize(term, rows, cols);
+ if (term->tl_winpty)
+ winpty_set_size(term->tl_winpty, cols, rows, NULL);
+ }
+***************
+*** 5828,5834 ****
+ int
+ terminal_enabled(void)
+ {
+! return dyn_winpty_init(FALSE) == OK;
+ }
+
+ # else
+--- 6268,6274 ----
+ int
+ terminal_enabled(void)
+ {
+! return dyn_winpty_init(FALSE) == OK || dyn_conpty_init(FALSE) == OK;
+ }
+
+ # else
+***************
+*** 5852,5857 ****
+--- 6292,6299 ----
+ jobopt_T *opt,
+ jobopt_T *orig_opt UNUSED)
+ {
++ term->tl_arg0_cmd = NULL;
++
+ if (create_vterm(term, term->tl_rows, term->tl_cols) == FAIL)
+ return FAIL;
+
+*** ../vim-8.1.0869/src/testdir/gen_opt_test.vim 2018-11-05 21:21:29.800286334 +0100
+--- src/testdir/gen_opt_test.vim 2019-02-03 13:46:59.603853294 +0100
+***************
+*** 131,136 ****
+--- 131,137 ----
+ \ 'term': [[], []],
+ \ 'termguicolors': [[], []],
+ \ 'termencoding': [has('gui_gtk') ? [] : ['', 'utf-8'], ['xxx']],
++ \ 'termmode': [['', 'winpty', 'conpty'], ['xxx']],
+ \ 'termwinsize': [['', '24x80', '0x80', '32x0', '0x0'], ['xxx', '80', '8ax9', '24x80b']],
+ \ 'toolbar': [['', 'icons', 'text'], ['xxx']],
+ \ 'toolbariconsize': [['', 'tiny', 'huge'], ['xxx']],
+*** ../vim-8.1.0869/src/testdir/test_autocmd.vim 2019-01-30 22:01:36.982854408 +0100
+--- src/testdir/test_autocmd.vim 2019-02-03 13:46:59.603853294 +0100
+***************
+*** 1397,1403 ****
+ let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': 3})
+ call assert_equal('running', term_getstatus(buf))
+ " Wait for the ruler (in the status line) to be shown.
+! call WaitForAssert({-> assert_match('\<All$', term_getline(buf, 3))})
+ " It's only adding autocmd, so that no event occurs.
+ call term_sendkeys(buf, ":au! TextChanged <buffer> call writefile(['No'], 'Xchanged.txt')\<cr>")
+ call term_sendkeys(buf, "\<C-\\>\<C-N>:qa!\<cr>")
+--- 1397,1409 ----
+ let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': 3})
+ call assert_equal('running', term_getstatus(buf))
+ " Wait for the ruler (in the status line) to be shown.
+! " In ConPTY, there is additional character which is drawn up to the width of
+! " the screen.
+! if has('conpty')
+! call WaitForAssert({-> assert_match('\<All.*$', term_getline(buf, 3))})
+! else
+! call WaitForAssert({-> assert_match('\<All$', term_getline(buf, 3))})
+! endif
+ " It's only adding autocmd, so that no event occurs.
+ call term_sendkeys(buf, ":au! TextChanged <buffer> call writefile(['No'], 'Xchanged.txt')\<cr>")
+ call term_sendkeys(buf, "\<C-\\>\<C-N>:qa!\<cr>")
+*** ../vim-8.1.0869/src/testdir/test_mksession.vim 2019-01-26 20:07:34.592237223 +0100
+--- src/testdir/test_mksession.vim 2019-02-03 13:46:59.603853294 +0100
+***************
+*** 295,301 ****
+ call assert_report('unexpected shell line: ' . line)
+ endif
+ endfor
+! call assert_match('terminal ++curwin ++cols=\d\+ ++rows=\d\+\s*$', term_cmd)
+
+ call Stop_shell_in_terminal(bufnr('%'))
+ call delete('Xtest_mks.out')
+--- 295,301 ----
+ call assert_report('unexpected shell line: ' . line)
+ endif
+ endfor
+! call assert_match('terminal ++curwin ++cols=\d\+ ++rows=\d\+\s*.*$', term_cmd)
+
+ call Stop_shell_in_terminal(bufnr('%'))
+ call delete('Xtest_mks.out')
+***************
+*** 375,381 ****
+ let term_cmd = line
+ endif
+ endfor
+! call assert_match('terminal ++curwin ++cols=\d\+ ++rows=\d\+ other', term_cmd)
+
+ call Stop_shell_in_terminal(bufnr('%'))
+ call delete('Xtest_mks.out')
+--- 375,381 ----
+ let term_cmd = line
+ endif
+ endfor
+! call assert_match('terminal ++curwin ++cols=\d\+ ++rows=\d\+.*other', term_cmd)
+
+ call Stop_shell_in_terminal(bufnr('%'))
+ call delete('Xtest_mks.out')
+*** ../vim-8.1.0869/src/testdir/test_terminal.vim 2019-01-29 22:58:02.401136295 +0100
+--- src/testdir/test_terminal.vim 2019-02-03 13:46:59.603853294 +0100
+***************
+*** 39,46 ****
+ call assert_match('^/dev/', job_info(g:job).tty_out)
+ call assert_match('^/dev/', term_gettty(''))
+ else
+! call assert_match('^\\\\.\\pipe\\', job_info(g:job).tty_out)
+! call assert_match('^\\\\.\\pipe\\', term_gettty(''))
+ endif
+ call assert_equal('t', mode())
+ call assert_equal('yes', b:done)
+--- 39,49 ----
+ call assert_match('^/dev/', job_info(g:job).tty_out)
+ call assert_match('^/dev/', term_gettty(''))
+ else
+! " ConPTY works on anonymous pipe.
+! if !has('conpty')
+! call assert_match('^\\\\.\\pipe\\', job_info(g:job).tty_out)
+! call assert_match('^\\\\.\\pipe\\', term_gettty(''))
+! endif
+ endif
+ call assert_equal('t', mode())
+ call assert_equal('yes', b:done)
+***************
+*** 129,135 ****
+
+ func Get_cat_123_cmd()
+ if has('win32')
+! return 'cmd /c "cls && color 2 && echo 123"'
+ else
+ call writefile(["\<Esc>[32m123"], 'Xtext')
+ return "cat Xtext"
+--- 132,143 ----
+
+ func Get_cat_123_cmd()
+ if has('win32')
+! if !has('conpty')
+! return 'cmd /c "cls && color 2 && echo 123"'
+! else
+! " When clearing twice, extra sequence is not output.
+! return 'cmd /c "cls && cls && color 2 && echo 123"'
+! endif
+ else
+ call writefile(["\<Esc>[32m123"], 'Xtext')
+ return "cat Xtext"
+***************
+*** 143,150 ****
+
+ call WaitForAssert({-> assert_equal("dead", job_status(g:job))})
+ call WaitForAssert({-> assert_equal(0, g:buf)})
+- unlet g:buf
+ unlet g:job
+ call delete('Xtext')
+ endfunc
+
+--- 151,158 ----
+
+ call WaitForAssert({-> assert_equal("dead", job_status(g:job))})
+ call WaitForAssert({-> assert_equal(0, g:buf)})
+ unlet g:job
++ unlet g:buf
+ call delete('Xtext')
+ endfunc
+
+***************
+*** 563,568 ****
+--- 571,579 ----
+ " The shell or something else has a problem dealing with more than 1000
+ " characters at the same time.
+ let len = 1000
++ " NPFS is used in Windows, nonblocking mode does not work properly.
++ elseif has('win32')
++ let len = 1
+ else
+ let len = 5000
+ endif
+***************
+*** 693,700 ****
+ let cmd = Get_cat_123_cmd()
+ let buf = term_start(cmd, {'out_io': 'file', 'out_name': 'Xfile'})
+ call term_wait(buf)
+! call WaitForAssert({-> assert_notequal(0, len(readfile("Xfile")))})
+! call assert_match('123', readfile('Xfile')[0])
+ let g:job = term_getjob(buf)
+ call WaitForAssert({-> assert_equal("dead", job_status(g:job))})
+ call delete('Xfile')
+--- 704,714 ----
+ let cmd = Get_cat_123_cmd()
+ let buf = term_start(cmd, {'out_io': 'file', 'out_name': 'Xfile'})
+ call term_wait(buf)
+! " ConPTY may precede escape sequence. There are things that are not so.
+! if !has('conpty')
+! call WaitForAssert({-> assert_notequal(0, len(readfile("Xfile")))})
+! call assert_match('123', readfile('Xfile')[0])
+! endif
+ let g:job = term_getjob(buf)
+ call WaitForAssert({-> assert_equal("dead", job_status(g:job))})
+ call delete('Xfile')
+***************
+*** 1661,1666 ****
+--- 1675,1684 ----
+ endfunc
+
+ func Test_terminal_does_not_truncate_last_newlines()
++ " This test does not pass through ConPTY.
++ if has('conpty')
++ return
++ endif
+ let contents = [
+ \ [ 'One', '', 'X' ],
+ \ [ 'Two', '', '' ],
+*** ../vim-8.1.0869/src/version.c 2019-02-03 13:12:20.344668681 +0100
+--- src/version.c 2019-02-03 13:50:03.310696825 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 870,
+ /**/
+
+--
+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.0871 b/data/vim/patches/8.1.0871
new file mode 100644
index 000000000..22927a509
--- /dev/null
+++ b/data/vim/patches/8.1.0871
@@ -0,0 +1,50 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0871
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0871
+Problem: Build error when building with Ruby 2.6.0.
+Solution: Change argument of rb_int2big_stub(). (Android Baumann,
+ closes #3899)
+Files: src/if_ruby.c
+
+
+*** ../vim-8.1.0870/src/if_ruby.c 2019-01-30 21:00:05.867377219 +0100
+--- src/if_ruby.c 2019-02-03 15:16:11.805010767 +0100
+***************
+*** 506,512 ****
+--- 506,516 ----
+ {
+ return dll_rb_num2long(x);
+ }
++ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 26
++ VALUE rb_int2big_stub(intptr_t x)
++ # else
+ VALUE rb_int2big_stub(SIGNED_VALUE x)
++ # endif
+ {
+ return dll_rb_int2big(x);
+ }
+*** ../vim-8.1.0870/src/version.c 2019-02-03 14:52:42.505867463 +0100
+--- src/version.c 2019-02-03 15:17:49.832366429 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 871,
+ /**/
+
+--
+An indication you must be a manager:
+You feel sorry for Dilbert's boss.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0872 b/data/vim/patches/8.1.0872
new file mode 100644
index 000000000..7c115f3c6
--- /dev/null
+++ b/data/vim/patches/8.1.0872
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0872
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0872
+Problem: Confusing condition.
+Solution: Use "==" instead of "<=".
+Files: src/gui_gtk_x11.c
+
+
+*** ../vim-8.1.0871/src/gui_gtk_x11.c 2019-01-28 22:32:54.891909109 +0100
+--- src/gui_gtk_x11.c 2019-01-28 22:32:23.620130001 +0100
+***************
+*** 6320,6326 ****
+ // This timeout makes sure that we will return if no characters arrived in
+ // time. If "wtime" is zero just use one.
+ if (wtime >= 0)
+! timer = timeout_add(wtime <= 0 ? 1L : wtime,
+ input_timer_cb, &timed_out);
+ else
+ timer = 0;
+--- 6320,6326 ----
+ // This timeout makes sure that we will return if no characters arrived in
+ // time. If "wtime" is zero just use one.
+ if (wtime >= 0)
+! timer = timeout_add(wtime == 0 ? 1L : wtime,
+ input_timer_cb, &timed_out);
+ else
+ timer = 0;
+*** ../vim-8.1.0871/src/version.c 2019-02-03 15:18:31.480095521 +0100
+--- src/version.c 2019-02-03 15:28:11.104439391 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 872,
+ /**/
+
+--
+An indication you must be a manager:
+You give constructive feedback to your dog.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0873 b/data/vim/patches/8.1.0873
new file mode 100644
index 000000000..0d45ca42c
--- /dev/null
+++ b/data/vim/patches/8.1.0873
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0873
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0873
+Problem: List if distributed files does not include the matchit autoload
+ directory.
+Solution: Add the directory.
+Files: src/Filelist
+
+
+*** ../vim-8.1.0872/Filelist 2019-02-03 13:12:20.344668681 +0100
+--- Filelist 2019-02-03 23:42:51.263037580 +0100
+***************
+*** 664,669 ****
+--- 664,670 ----
+ runtime/pack/dist/opt/matchit/plugin/matchit.vim \
+ runtime/pack/dist/opt/matchit/doc/matchit.txt \
+ runtime/pack/dist/opt/matchit/doc/tags \
++ runtime/pack/dist/opt/matchit/autoload/*.vim \
+ runtime/pack/dist/opt/shellmenu/plugin/shellmenu.vim \
+ runtime/pack/dist/opt/swapmouse/plugin/swapmouse.vim \
+ runtime/pack/dist/opt/termdebug/plugin/termdebug.vim \
+*** ../vim-8.1.0872/src/version.c 2019-02-03 15:28:25.052353153 +0100
+--- src/version.c 2019-02-03 23:44:20.686591681 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 873,
+ /**/
+
+--
+Lose weight, NEVER Diet again with
+ The "Invisible Weight Loss Patch"
+ (spam 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.0874 b/data/vim/patches/8.1.0874
new file mode 100644
index 000000000..ef4c3987b
--- /dev/null
+++ b/data/vim/patches/8.1.0874
@@ -0,0 +1,5682 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0874
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0874
+Problem: Using old style comments in new file.
+Solution: Convert to // comments in new file. (Yegappan Lakshmanan)
+Files: src/indent.c
+
+
+*** ../vim-8.1.0873/src/indent.c 2019-01-31 13:47:51.122632648 +0100
+--- src/indent.c 2019-02-04 20:28:25.798161568 +0100
+***************
+*** 59,71 ****
+ * Return NULL when not inside a comment.
+ */
+ static pos_T *
+! ind_find_start_comment(void) /* XXX */
+ {
+ return find_start_comment(curbuf->b_ind_maxcomment);
+ }
+
+ pos_T *
+! find_start_comment(int ind_maxcomment) /* XXX */
+ {
+ pos_T *pos;
+ char_u *line;
+--- 59,71 ----
+ * Return NULL when not inside a comment.
+ */
+ static pos_T *
+! ind_find_start_comment(void) // XXX
+ {
+ return find_start_comment(curbuf->b_ind_maxcomment);
+ }
+
+ pos_T *
+! find_start_comment(int ind_maxcomment) // XXX
+ {
+ pos_T *pos;
+ char_u *line;
+***************
+*** 78,87 ****
+ if (pos == NULL)
+ break;
+
+! /*
+! * Check if the comment start we found is inside a string.
+! * If it is then restrict the search to below this line and try again.
+! */
+ line = ml_get(pos->lnum);
+ for (p = line; *p && (colnr_T)(p - line) < pos->col; ++p)
+ p = skip_string(p);
+--- 78,85 ----
+ if (pos == NULL)
+ break;
+
+! // Check if the comment start we found is inside a string.
+! // If it is then restrict the search to below this line and try again.
+ line = ml_get(pos->lnum);
+ for (p = line; *p && (colnr_T)(p - line) < pos->col; ++p)
+ p = skip_string(p);
+***************
+*** 106,112 ****
+ * "CORS" -> Comment Or Raw String
+ */
+ static pos_T *
+! ind_find_start_CORS(linenr_T *is_raw) /* XXX */
+ {
+ static pos_T comment_pos_copy;
+ pos_T *comment_pos;
+--- 104,110 ----
+ * "CORS" -> Comment Or Raw String
+ */
+ static pos_T *
+! ind_find_start_CORS(linenr_T *is_raw) // XXX
+ {
+ static pos_T comment_pos_copy;
+ pos_T *comment_pos;
+***************
+*** 115,129 ****
+ comment_pos = find_start_comment(curbuf->b_ind_maxcomment);
+ if (comment_pos != NULL)
+ {
+! /* Need to make a copy of the static pos in findmatchlimit(),
+! * calling find_start_rawstring() may change it. */
+ comment_pos_copy = *comment_pos;
+ comment_pos = &comment_pos_copy;
+ }
+ rs_pos = find_start_rawstring(curbuf->b_ind_maxcomment);
+
+! /* If comment_pos is before rs_pos the raw string is inside the comment.
+! * If rs_pos is before comment_pos the comment is inside the raw string. */
+ if (comment_pos == NULL || (rs_pos != NULL
+ && LT_POS(*rs_pos, *comment_pos)))
+ {
+--- 113,127 ----
+ comment_pos = find_start_comment(curbuf->b_ind_maxcomment);
+ if (comment_pos != NULL)
+ {
+! // Need to make a copy of the static pos in findmatchlimit(),
+! // calling find_start_rawstring() may change it.
+ comment_pos_copy = *comment_pos;
+ comment_pos = &comment_pos_copy;
+ }
+ rs_pos = find_start_rawstring(curbuf->b_ind_maxcomment);
+
+! // If comment_pos is before rs_pos the raw string is inside the comment.
+! // If rs_pos is before comment_pos the comment is inside the raw string.
+ if (comment_pos == NULL || (rs_pos != NULL
+ && LT_POS(*rs_pos, *comment_pos)))
+ {
+***************
+*** 140,146 ****
+ * Return NULL when not inside a raw string.
+ */
+ static pos_T *
+! find_start_rawstring(int ind_maxcomment) /* XXX */
+ {
+ pos_T *pos;
+ char_u *line;
+--- 138,144 ----
+ * Return NULL when not inside a raw string.
+ */
+ static pos_T *
+! find_start_rawstring(int ind_maxcomment) // XXX
+ {
+ pos_T *pos;
+ char_u *line;
+***************
+*** 153,162 ****
+ if (pos == NULL)
+ break;
+
+! /*
+! * Check if the raw string start we found is inside a string.
+! * If it is then restrict the search to below this line and try again.
+! */
+ line = ml_get(pos->lnum);
+ for (p = line; *p && (colnr_T)(p - line) < pos->col; ++p)
+ p = skip_string(p);
+--- 151,158 ----
+ if (pos == NULL)
+ break;
+
+! // Check if the raw string start we found is inside a string.
+! // If it is then restrict the search to below this line and try again.
+ line = ml_get(pos->lnum);
+ for (p = line; *p && (colnr_T)(p - line) < pos->col; ++p)
+ p = skip_string(p);
+***************
+*** 181,223 ****
+ {
+ int i;
+
+! /*
+! * We loop, because strings may be concatenated: "date""time".
+! */
+ for ( ; ; ++p)
+ {
+! if (p[0] == '\'') /* 'c' or '\n' or '\000' */
+ {
+! if (!p[1]) /* ' at end of line */
+ break;
+ i = 2;
+! if (p[1] == '\\') /* '\n' or '\000' */
+ {
+ ++i;
+! while (vim_isdigit(p[i - 1])) /* '\000' */
+ ++i;
+ }
+! if (p[i] == '\'') /* check for trailing ' */
+ {
+ p += i;
+ continue;
+ }
+ }
+! else if (p[0] == '"') /* start of string */
+ {
+ for (++p; p[0]; ++p)
+ {
+ if (p[0] == '\\' && p[1] != NUL)
+ ++p;
+! else if (p[0] == '"') /* end of string */
+ break;
+ }
+ if (p[0] == '"')
+! continue; /* continue for another string */
+ }
+ else if (p[0] == 'R' && p[1] == '"')
+ {
+! /* Raw string: R"[delim](...)[delim]" */
+ char_u *delim = p + 2;
+ char_u *paren = vim_strchr(delim, '(');
+
+--- 177,217 ----
+ {
+ int i;
+
+! // We loop, because strings may be concatenated: "date""time".
+ for ( ; ; ++p)
+ {
+! if (p[0] == '\'') // 'c' or '\n' or '\000'
+ {
+! if (!p[1]) // ' at end of line
+ break;
+ i = 2;
+! if (p[1] == '\\') // '\n' or '\000'
+ {
+ ++i;
+! while (vim_isdigit(p[i - 1])) // '\000'
+ ++i;
+ }
+! if (p[i] == '\'') // check for trailing '
+ {
+ p += i;
+ continue;
+ }
+ }
+! else if (p[0] == '"') // start of string
+ {
+ for (++p; p[0]; ++p)
+ {
+ if (p[0] == '\\' && p[1] != NUL)
+ ++p;
+! else if (p[0] == '"') // end of string
+ break;
+ }
+ if (p[0] == '"')
+! continue; // continue for another string
+ }
+ else if (p[0] == 'R' && p[1] == '"')
+ {
+! // Raw string: R"[delim](...)[delim]"
+ char_u *delim = p + 2;
+ char_u *paren = vim_strchr(delim, '(');
+
+***************
+*** 233,248 ****
+ break;
+ }
+ if (p[0] == '"')
+! continue; /* continue for another string */
+ }
+ }
+! break; /* no string found */
+ }
+ if (!*p)
+! --p; /* backup from NUL */
+ return p;
+ }
+! #endif /* FEAT_CINDENT || FEAT_SYN_HL */
+
+ #if defined(FEAT_CINDENT) || defined(PROTO)
+
+--- 227,242 ----
+ break;
+ }
+ if (p[0] == '"')
+! continue; // continue for another string
+ }
+ }
+! break; // no string found
+ }
+ if (!*p)
+! --p; // backup from NUL
+ return p;
+ }
+! #endif // FEAT_CINDENT || FEAT_SYN_HL
+
+ #if defined(FEAT_CINDENT) || defined(PROTO)
+
+***************
+*** 259,265 ****
+ ));
+ }
+
+! /* Find result cache for cpp_baseclass */
+ typedef struct {
+ int found;
+ lpos_T lpos;
+--- 253,259 ----
+ ));
+ }
+
+! // Find result cache for cpp_baseclass
+ typedef struct {
+ int found;
+ lpos_T lpos;
+***************
+*** 299,306 ****
+
+ s = skipwhite(s);
+
+! /* Perl/shell # comment comment continues until eol. Require a space
+! * before # to avoid recognizing $#array. */
+ if (curbuf->b_ind_hash_comment != 0 && s != prev_s && *s == '#')
+ {
+ s += STRLEN(s);
+--- 293,300 ----
+
+ s = skipwhite(s);
+
+! // Perl/shell # comment comment continues until eol. Require a space
+! // before # to avoid recognizing $#array.
+ if (curbuf->b_ind_hash_comment != 0 && s != prev_s && *s == '#')
+ {
+ s += STRLEN(s);
+***************
+*** 309,322 ****
+ if (*s != '/')
+ break;
+ ++s;
+! if (*s == '/') /* slash-slash comment continues till eol */
+ {
+ s += STRLEN(s);
+ break;
+ }
+ if (*s != '*')
+ break;
+! for (++s; *s; ++s) /* skip slash-star comment */
+ if (s[0] == '*' && s[1] == '/')
+ {
+ s += 2;
+--- 303,316 ----
+ if (*s != '/')
+ break;
+ ++s;
+! if (*s == '/') // slash-slash comment continues till eol
+ {
+ s += STRLEN(s);
+ break;
+ }
+ if (*s != '*')
+ break;
+! for (++s; *s; ++s) // skip slash-star comment
+ if (s[0] == '*' && s[1] == '/')
+ {
+ s += 2;
+***************
+*** 340,346 ****
+ * Check previous lines for a "//" line comment, skipping over blank lines.
+ */
+ static pos_T *
+! find_line_comment(void) /* XXX */
+ {
+ static pos_T pos;
+ char_u *line;
+--- 334,340 ----
+ * Check previous lines for a "//" line comment, skipping over blank lines.
+ */
+ static pos_T *
+! find_line_comment(void) // XXX
+ {
+ static pos_T pos;
+ char_u *line;
+***************
+*** 373,383 ****
+
+ if (*s == '\'' || *s == '"')
+ {
+! /* can be 'key': or "key": */
+ quote = *s;
+ ++s;
+ }
+! if (!vim_isIDc(*s)) /* need at least one ID character */
+ return FALSE;
+
+ while (vim_isIDc(*s))
+--- 367,377 ----
+
+ if (*s == '\'' || *s == '"')
+ {
+! // can be 'key': or "key":
+ quote = *s;
+ ++s;
+ }
+! if (!vim_isIDc(*s)) // need at least one ID character
+ return FALSE;
+
+ while (vim_isIDc(*s))
+***************
+*** 387,393 ****
+
+ s = cin_skipcomment(s);
+
+! /* "::" is not a label, it's C++ */
+ return (*s == ':' && s[1] != ':');
+ }
+
+--- 381,387 ----
+
+ s = cin_skipcomment(s);
+
+! // "::" is not a label, it's C++
+ return (*s == ':' && s[1] != ':');
+ }
+
+***************
+*** 398,404 ****
+ static int
+ cin_islabel_skip(char_u **s)
+ {
+! if (!vim_isIDc(**s)) /* need at least one ID character */
+ return FALSE;
+
+ while (vim_isIDc(**s))
+--- 392,398 ----
+ static int
+ cin_islabel_skip(char_u **s)
+ {
+! if (!vim_isIDc(**s)) // need at least one ID character
+ return FALSE;
+
+ while (vim_isIDc(**s))
+***************
+*** 406,412 ****
+
+ *s = cin_skipcomment(*s);
+
+! /* "::" is not a label, it's C++ */
+ return (**s == ':' && *++*s != ':');
+ }
+
+--- 400,406 ----
+
+ *s = cin_skipcomment(*s);
+
+! // "::" is not a label, it's C++
+ return (**s == ':' && *++*s != ':');
+ }
+
+***************
+*** 415,430 ****
+ * Note: curwin->w_cursor must be where we are looking for the label.
+ */
+ int
+! cin_islabel(void) /* XXX */
+ {
+ char_u *s;
+
+ s = cin_skipcomment(ml_get_curline());
+
+! /*
+! * Exclude "default" from labels, since it should be indented
+! * like a switch label. Same for C++ scope declarations.
+! */
+ if (cin_isdefault(s))
+ return FALSE;
+ if (cin_isscopedecl(s))
+--- 409,422 ----
+ * Note: curwin->w_cursor must be where we are looking for the label.
+ */
+ int
+! cin_islabel(void) // XXX
+ {
+ char_u *s;
+
+ s = cin_skipcomment(ml_get_curline());
+
+! // Exclude "default" from labels, since it should be indented
+! // like a switch label. Same for C++ scope declarations.
+ if (cin_isdefault(s))
+ return FALSE;
+ if (cin_isscopedecl(s))
+***************
+*** 432,441 ****
+
+ if (cin_islabel_skip(&s))
+ {
+! /*
+! * Only accept a label if the previous line is terminated or is a case
+! * label.
+! */
+ pos_T cursor_save;
+ pos_T *trypos;
+ char_u *line;
+--- 424,431 ----
+
+ if (cin_islabel_skip(&s))
+ {
+! // Only accept a label if the previous line is terminated or is a case
+! // label.
+ pos_T cursor_save;
+ pos_T *trypos;
+ char_u *line;
+***************
+*** 445,460 ****
+ {
+ --curwin->w_cursor.lnum;
+
+! /*
+! * If we're in a comment or raw string now, skip to the start of
+! * it.
+! */
+ curwin->w_cursor.col = 0;
+! if ((trypos = ind_find_start_CORS(NULL)) != NULL) /* XXX */
+ curwin->w_cursor = *trypos;
+
+ line = ml_get_curline();
+! if (cin_ispreproc(line)) /* ignore #defines, #if, etc. */
+ continue;
+ if (*(line = cin_skipcomment(line)) == NUL)
+ continue;
+--- 435,448 ----
+ {
+ --curwin->w_cursor.lnum;
+
+! // If we're in a comment or raw string now, skip to the start of
+! // it.
+ curwin->w_cursor.col = 0;
+! if ((trypos = ind_find_start_CORS(NULL)) != NULL) // XXX
+ curwin->w_cursor = *trypos;
+
+ line = ml_get_curline();
+! if (cin_ispreproc(line)) // ignore #defines, #if, etc.
+ continue;
+ if (*(line = cin_skipcomment(line)) == NUL)
+ continue;
+***************
+*** 468,474 ****
+ return FALSE;
+ }
+ curwin->w_cursor = cursor_save;
+! return TRUE; /* label at start of file??? */
+ }
+ return FALSE;
+ }
+--- 456,462 ----
+ return FALSE;
+ }
+ curwin->w_cursor = cursor_save;
+! return TRUE; // label at start of file???
+ }
+ return FALSE;
+ }
+***************
+*** 522,528 ****
+ int
+ cin_iscase(
+ char_u *s,
+! int strict) /* Allow relaxed check of case statement for JS */
+ {
+ s = cin_skipcomment(s);
+ if (cin_starts_with(s, "case"))
+--- 510,516 ----
+ int
+ cin_iscase(
+ char_u *s,
+! int strict) // Allow relaxed check of case statement for JS
+ {
+ s = cin_skipcomment(s);
+ if (cin_starts_with(s, "case"))
+***************
+*** 532,551 ****
+ s = cin_skipcomment(s);
+ if (*s == ':')
+ {
+! if (s[1] == ':') /* skip over "::" for C++ */
+ ++s;
+ else
+ return TRUE;
+ }
+ if (*s == '\'' && s[1] && s[2] == '\'')
+! s += 2; /* skip over ':' */
+ else if (*s == '/' && (s[1] == '*' || s[1] == '/'))
+! return FALSE; /* stop at comment */
+ else if (*s == '"')
+ {
+! /* JS etc. */
+ if (strict)
+! return FALSE; /* stop at string */
+ else
+ return TRUE;
+ }
+--- 520,539 ----
+ s = cin_skipcomment(s);
+ if (*s == ':')
+ {
+! if (s[1] == ':') // skip over "::" for C++
+ ++s;
+ else
+ return TRUE;
+ }
+ if (*s == '\'' && s[1] && s[2] == '\'')
+! s += 2; // skip over ':'
+ else if (*s == '/' && (s[1] == '*' || s[1] == '/'))
+! return FALSE; // stop at comment
+ else if (*s == '"')
+ {
+! // JS etc.
+ if (strict)
+! return FALSE; // stop at string
+ else
+ return TRUE;
+ }
+***************
+*** 589,595 ****
+ return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':');
+ }
+
+! /* Maximum number of lines to search back for a "namespace" line. */
+ #define FIND_NAMESPACE_LIM 20
+
+ /*
+--- 577,583 ----
+ return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':');
+ }
+
+! // Maximum number of lines to search back for a "namespace" line.
+ #define FIND_NAMESPACE_LIM 20
+
+ /*
+***************
+*** 610,616 ****
+ {
+ if (VIM_ISWHITE(*p))
+ {
+! has_name = TRUE; /* found end of a name */
+ p = cin_skipcomment(skipwhite(p));
+ }
+ else if (*p == '{')
+--- 598,604 ----
+ {
+ if (VIM_ISWHITE(*p))
+ {
+! has_name = TRUE; // found end of a name
+ p = cin_skipcomment(skipwhite(p));
+ }
+ else if (*p == '{')
+***************
+*** 621,634 ****
+ {
+ has_name_start = TRUE;
+ if (has_name)
+! return FALSE; /* word character after skipping past name */
+ ++p;
+ }
+ else if (p[0] == ':' && p[1] == ':' && vim_iswordc(p[2]))
+ {
+ if (!has_name_start || has_name)
+ return FALSE;
+! /* C++ 17 nested namespace */
+ p += 3;
+ }
+ else
+--- 609,622 ----
+ {
+ has_name_start = TRUE;
+ if (has_name)
+! return FALSE; // word character after skipping past name
+ ++p;
+ }
+ else if (p[0] == ':' && p[1] == ':' && vim_iswordc(p[2]))
+ {
+ if (!has_name_start || has_name)
+ return FALSE;
+! // C++ 17 nested namespace
+ p += 3;
+ }
+ else
+***************
+*** 702,714 ****
+ {
+ if (*l == ':')
+ {
+! if (l[1] == ':') /* skip over "::" for C++ */
+ ++l;
+ else if (!cin_iscase(l + 1, FALSE))
+ break;
+ }
+ else if (*l == '\'' && l[1] && l[2] == '\'')
+! l += 2; /* skip over 'x' */
+ }
+ if (*l == NUL)
+ return NULL;
+--- 690,702 ----
+ {
+ if (*l == ':')
+ {
+! if (l[1] == ':') // skip over "::" for C++
+ ++l;
+ else if (!cin_iscase(l + 1, FALSE))
+ break;
+ }
+ else if (*l == '\'' && l[1] && l[2] == '\'')
+! l += 2; // skip over 'x'
+ }
+ if (*l == NUL)
+ return NULL;
+***************
+*** 723,729 ****
+ * Return 0 if there is nothing after the label.
+ */
+ static int
+! get_indent_nolabel (linenr_T lnum) /* XXX */
+ {
+ char_u *l;
+ pos_T fp;
+--- 711,717 ----
+ * Return 0 if there is nothing after the label.
+ */
+ static int
+! get_indent_nolabel (linenr_T lnum) // XXX
+ {
+ char_u *l;
+ pos_T fp;
+***************
+*** 757,768 ****
+ cursor_save = curwin->w_cursor;
+ curwin->w_cursor.lnum = lnum;
+ l = ml_get_curline();
+! /* XXX */
+ if (cin_iscase(l, FALSE) || cin_isscopedecl(l) || cin_islabel())
+ {
+ amount = get_indent_nolabel(lnum);
+ l = after_label(ml_get_curline());
+! if (l == NULL) /* just in case */
+ l = ml_get_curline();
+ }
+ else
+--- 745,756 ----
+ cursor_save = curwin->w_cursor;
+ curwin->w_cursor.lnum = lnum;
+ l = ml_get_curline();
+! // XXX
+ if (cin_iscase(l, FALSE) || cin_isscopedecl(l) || cin_islabel())
+ {
+ amount = get_indent_nolabel(lnum);
+ l = after_label(ml_get_curline());
+! if (l == NULL) // just in case
+ l = ml_get_curline();
+ }
+ else
+***************
+*** 852,858 ****
+ line = s = ml_get(lnum);
+ while (*s != NUL && vim_strchr((char_u *)"=;{}\"'", *s) == NULL)
+ {
+! if (cin_iscomment(s)) /* ignore comments */
+ s = cin_skipcomment(s);
+ else
+ ++s;
+--- 840,846 ----
+ line = s = ml_get(lnum);
+ while (*s != NUL && vim_strchr((char_u *)"=;{}\"'", *s) == NULL)
+ {
+! if (cin_iscomment(s)) // ignore comments
+ s = cin_skipcomment(s);
+ else
+ ++s;
+***************
+*** 864,870 ****
+ if (cin_nocode(s))
+ return 0;
+
+! if (*s == '"') /* nice alignment for continued strings */
+ ++s;
+
+ fp.lnum = lnum;
+--- 852,858 ----
+ if (cin_nocode(s))
+ return 0;
+
+! if (*s == '"') // nice alignment for continued strings
+ ++s;
+
+ fp.lnum = lnum;
+***************
+*** 953,960 ****
+ static int
+ cin_isterminated(
+ char_u *s,
+! int incl_open, /* include '{' at the end as terminator */
+! int incl_comma) /* recognize a trailing comma */
+ {
+ char_u found_start = 0;
+ unsigned n_open = 0;
+--- 941,948 ----
+ static int
+ cin_isterminated(
+ char_u *s,
+! int incl_open, // include '{' at the end as terminator
+! int incl_comma) // recognize a trailing comma
+ {
+ char_u found_start = 0;
+ unsigned n_open = 0;
+***************
+*** 970,976 ****
+
+ while (*s)
+ {
+! /* skip over comments, "" strings and 'c'haracters */
+ s = skip_string(cin_skipcomment(s));
+ if (*s == '}' && n_open > 0)
+ --n_open;
+--- 958,964 ----
+
+ while (*s)
+ {
+! // skip over comments, "" strings and 'c'haracters
+ s = skip_string(cin_skipcomment(s));
+ if (*s == '}' && n_open > 0)
+ --n_open;
+***************
+*** 1035,1072 ****
+ }
+ curwin->w_cursor.lnum = save_lnum;
+
+! /* Ignore line starting with #. */
+ if (cin_ispreproc(s))
+ return FALSE;
+
+ while (*s && *s != '(' && *s != ';' && *s != '\'' && *s != '"')
+ {
+! if (cin_iscomment(s)) /* ignore comments */
+ s = cin_skipcomment(s);
+ else if (*s == ':')
+ {
+ if (*(s + 1) == ':')
+ s += 2;
+ else
+! /* To avoid a mistake in the following situation:
+! * A::A(int a, int b)
+! * : a(0) // <--not a function decl
+! * , b(0)
+! * {...
+! */
+ return FALSE;
+ }
+ else
+ ++s;
+ }
+ if (*s != '(')
+! return FALSE; /* ';', ' or " before any () or no '(' */
+
+ while (*s && *s != ';' && *s != '\'' && *s != '"')
+ {
+ if (*s == ')' && cin_nocode(s + 1))
+ {
+! /* ')' at the end: may have found a match
+ * Check for he previous line not to end in a backslash:
+ * #if defined(x) && \
+ * defined(y)
+--- 1023,1060 ----
+ }
+ curwin->w_cursor.lnum = save_lnum;
+
+! // Ignore line starting with #.
+ if (cin_ispreproc(s))
+ return FALSE;
+
+ while (*s && *s != '(' && *s != ';' && *s != '\'' && *s != '"')
+ {
+! if (cin_iscomment(s)) // ignore comments
+ s = cin_skipcomment(s);
+ else if (*s == ':')
+ {
+ if (*(s + 1) == ':')
+ s += 2;
+ else
+! // To avoid a mistake in the following situation:
+! // A::A(int a, int b)
+! // : a(0) // <--not a function decl
+! // , b(0)
+! // {...
+ return FALSE;
+ }
+ else
+ ++s;
+ }
+ if (*s != '(')
+! return FALSE; // ';', ' or " before any () or no '('
+
+ while (*s && *s != ';' && *s != '\'' && *s != '"')
+ {
+ if (*s == ')' && cin_nocode(s + 1))
+ {
+! /*
+! * ')' at the end: may have found a match
+ * Check for he previous line not to end in a backslash:
+ * #if defined(x) && \
+ * defined(y)
+***************
+*** 1081,1090 ****
+ {
+ int comma = (*s == ',');
+
+! /* ',' at the end: continue looking in the next line.
+! * At the end: check for ',' in the next line, for this style:
+! * func(arg1
+! * , arg2) */
+ for (;;)
+ {
+ if (lnum >= curbuf->b_ml.ml_line_count)
+--- 1069,1078 ----
+ {
+ int comma = (*s == ',');
+
+! // ',' at the end: continue looking in the next line.
+! // At the end: check for ',' in the next line, for this style:
+! // func(arg1
+! // , arg2)
+ for (;;)
+ {
+ if (lnum >= curbuf->b_ml.ml_line_count)
+***************
+*** 1095,1108 ****
+ }
+ if (lnum >= curbuf->b_ml.ml_line_count)
+ break;
+! /* Require a comma at end of the line or a comma or ')' at the
+! * start of next line. */
+ s = skipwhite(s);
+ if (!just_started && (!comma && *s != ',' && *s != ')'))
+ break;
+ just_started = FALSE;
+ }
+! else if (cin_iscomment(s)) /* ignore comments */
+ s = cin_skipcomment(s);
+ else
+ {
+--- 1083,1096 ----
+ }
+ if (lnum >= curbuf->b_ml.ml_line_count)
+ break;
+! // Require a comma at end of the line or a comma or ')' at the
+! // start of next line.
+ s = skipwhite(s);
+ if (!just_started && (!comma && *s != ',' && *s != ')'))
+ break;
+ just_started = FALSE;
+ }
+! else if (cin_iscomment(s)) // ignore comments
+ s = cin_skipcomment(s);
+ else
+ {
+***************
+*** 1128,1134 ****
+ cin_iselse(
+ char_u *p)
+ {
+! if (*p == '}') /* accept "} else" */
+ p = cin_skipcomment(p + 1);
+ return (STRNCMP(p, "else", 4) == 0 && !vim_isIDc(p[4]));
+ }
+--- 1116,1122 ----
+ cin_iselse(
+ char_u *p)
+ {
+! if (*p == '}') // accept "} else"
+ p = cin_skipcomment(p + 1);
+ return (STRNCMP(p, "else", 4) == 0 && !vim_isIDc(p[4]));
+ }
+***************
+*** 1145,1158 ****
+ * ')' and ';'. The condition may be spread over several lines.
+ */
+ static int
+! cin_iswhileofdo (char_u *p, linenr_T lnum) /* XXX */
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+ int retval = FALSE;
+
+ p = cin_skipcomment(p);
+! if (*p == '}') /* accept "} while (cond);" */
+ p = cin_skipcomment(p + 1);
+ if (cin_starts_with(p, "while"))
+ {
+--- 1133,1146 ----
+ * ')' and ';'. The condition may be spread over several lines.
+ */
+ static int
+! cin_iswhileofdo (char_u *p, linenr_T lnum) // XXX
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+ int retval = FALSE;
+
+ p = cin_skipcomment(p);
+! if (*p == '}') // accept "} while (cond);"
+ p = cin_skipcomment(p + 1);
+ if (cin_starts_with(p, "while"))
+ {
+***************
+*** 1160,1166 ****
+ curwin->w_cursor.lnum = lnum;
+ curwin->w_cursor.col = 0;
+ p = ml_get_curline();
+! while (*p && *p != 'w') /* skip any '}', until the 'w' of the "while" */
+ {
+ ++p;
+ ++curwin->w_cursor.col;
+--- 1148,1154 ----
+ curwin->w_cursor.lnum = lnum;
+ curwin->w_cursor.col = 0;
+ p = ml_get_curline();
+! while (*p && *p != 'w') // skip any '}', until the 'w' of the "while"
+ {
+ ++p;
+ ++curwin->w_cursor.col;
+***************
+*** 1235,1241 ****
+ pos_T *trypos;
+ int i;
+
+! if (terminated != ';') /* there must be a ';' at the end */
+ return FALSE;
+
+ p = line = ml_get_curline();
+--- 1223,1229 ----
+ pos_T *trypos;
+ int i;
+
+! if (terminated != ';') // there must be a ';' at the end
+ return FALSE;
+
+ p = line = ml_get_curline();
+***************
+*** 1247,1261 ****
+ s = skipwhite(p + 1);
+ if (*s == ';' && cin_nocode(s + 1))
+ {
+! /* Found ");" at end of the line, now check there is "while"
+! * before the matching '('. XXX */
+ i = (int)(p - line);
+ curwin->w_cursor.col = i;
+ trypos = find_match_paren(curbuf->b_ind_maxparen);
+ if (trypos != NULL)
+ {
+ s = cin_skipcomment(ml_get(trypos->lnum));
+! if (*s == '}') /* accept "} while (cond);" */
+ s = cin_skipcomment(s + 1);
+ if (cin_starts_with(s, "while"))
+ {
+--- 1235,1249 ----
+ s = skipwhite(p + 1);
+ if (*s == ';' && cin_nocode(s + 1))
+ {
+! // Found ");" at end of the line, now check there is "while"
+! // before the matching '('. XXX
+ i = (int)(p - line);
+ curwin->w_cursor.col = i;
+ trypos = find_match_paren(curbuf->b_ind_maxparen);
+ if (trypos != NULL)
+ {
+ s = cin_skipcomment(ml_get(trypos->lnum));
+! if (*s == '}') // accept "} while (cond);"
+ s = cin_skipcomment(s + 1);
+ if (cin_starts_with(s, "while"))
+ {
+***************
+*** 1264,1270 ****
+ }
+ }
+
+! /* Searching may have made "line" invalid, get it again. */
+ line = ml_get_curline();
+ p = line + i;
+ }
+--- 1252,1258 ----
+ }
+ }
+
+! // Searching may have made "line" invalid, get it again.
+ line = ml_get_curline();
+ p = line + i;
+ }
+***************
+*** 1296,1316 ****
+ */
+ static int
+ cin_is_cpp_baseclass(
+! cpp_baseclass_cache_T *cached) /* input and output */
+ {
+! lpos_T *pos = &cached->lpos; /* find position */
+ char_u *s;
+ int class_or_struct, lookfor_ctor_init, cpp_base_class;
+ linenr_T lnum = curwin->w_cursor.lnum;
+ char_u *line = ml_get_curline();
+
+ if (pos->lnum <= lnum)
+! return cached->found; /* Use the cached result */
+
+ pos->col = 0;
+
+ s = skipwhite(line);
+! if (*s == '#') /* skip #define FOO x ? (x) : x */
+ return FALSE;
+ s = cin_skipcomment(s);
+ if (*s == NUL)
+--- 1284,1304 ----
+ */
+ static int
+ cin_is_cpp_baseclass(
+! cpp_baseclass_cache_T *cached) // input and output
+ {
+! lpos_T *pos = &cached->lpos; // find position
+ char_u *s;
+ int class_or_struct, lookfor_ctor_init, cpp_base_class;
+ linenr_T lnum = curwin->w_cursor.lnum;
+ char_u *line = ml_get_curline();
+
+ if (pos->lnum <= lnum)
+! return cached->found; // Use the cached result
+
+ pos->col = 0;
+
+ s = skipwhite(line);
+! if (*s == '#') // skip #define FOO x ? (x) : x
+ return FALSE;
+ s = cin_skipcomment(s);
+ if (*s == NUL)
+***************
+*** 1318,1336 ****
+
+ cpp_base_class = lookfor_ctor_init = class_or_struct = FALSE;
+
+! /* Search for a line starting with '#', empty, ending in ';' or containing
+! * '{' or '}' and start below it. This handles the following situations:
+! * a = cond ?
+! * func() :
+! * asdf;
+! * func::foo()
+! * : something
+! * {}
+! * Foo::Foo (int one, int two)
+! * : something(4),
+! * somethingelse(3)
+! * {}
+! */
+ while (lnum > 1)
+ {
+ line = ml_get(lnum - 1);
+--- 1306,1323 ----
+
+ cpp_base_class = lookfor_ctor_init = class_or_struct = FALSE;
+
+! // Search for a line starting with '#', empty, ending in ';' or containing
+! // '{' or '}' and start below it. This handles the following situations:
+! // a = cond ?
+! // func() :
+! // asdf;
+! // func::foo()
+! // : something
+! // {}
+! // Foo::Foo (int one, int two)
+! // : something(4),
+! // somethingelse(3)
+! // {}
+ while (lnum > 1)
+ {
+ line = ml_get(lnum - 1);
+***************
+*** 1360,1372 ****
+ {
+ if (lnum == curwin->w_cursor.lnum)
+ break;
+! /* Continue in the cursor line. */
+ line = ml_get(++lnum);
+ s = line;
+ }
+ if (s == line)
+ {
+! /* don't recognize "case (foo):" as a baseclass */
+ if (cin_iscase(s, FALSE))
+ break;
+ s = cin_skipcomment(line);
+--- 1347,1359 ----
+ {
+ if (lnum == curwin->w_cursor.lnum)
+ break;
+! // Continue in the cursor line.
+ line = ml_get(++lnum);
+ s = line;
+ }
+ if (s == line)
+ {
+! // don't recognize "case (foo):" as a baseclass
+ if (cin_iscase(s, FALSE))
+ break;
+ s = cin_skipcomment(line);
+***************
+*** 1380,1394 ****
+ {
+ if (s[1] == ':')
+ {
+! /* skip double colon. It can't be a constructor
+! * initialization any more */
+ lookfor_ctor_init = FALSE;
+ s = cin_skipcomment(s + 2);
+ }
+ else if (lookfor_ctor_init || class_or_struct)
+ {
+! /* we have something found, that looks like the start of
+! * cpp-base-class-declaration or constructor-initialization */
+ cpp_base_class = TRUE;
+ lookfor_ctor_init = class_or_struct = FALSE;
+ pos->col = 0;
+--- 1367,1381 ----
+ {
+ if (s[1] == ':')
+ {
+! // skip double colon. It can't be a constructor
+! // initialization any more
+ lookfor_ctor_init = FALSE;
+ s = cin_skipcomment(s + 2);
+ }
+ else if (lookfor_ctor_init || class_or_struct)
+ {
+! // we have something found, that looks like the start of
+! // cpp-base-class-declaration or constructor-initialization
+ cpp_base_class = TRUE;
+ lookfor_ctor_init = class_or_struct = FALSE;
+ pos->col = 0;
+***************
+*** 1416,1448 ****
+ }
+ else if (s[0] == ')')
+ {
+! /* Constructor-initialization is assumed if we come across
+! * something like "):" */
+ class_or_struct = FALSE;
+ lookfor_ctor_init = TRUE;
+ }
+ else if (s[0] == '?')
+ {
+! /* Avoid seeing '() :' after '?' as constructor init. */
+ return FALSE;
+ }
+ else if (!vim_isIDc(s[0]))
+ {
+! /* if it is not an identifier, we are wrong */
+ class_or_struct = FALSE;
+ lookfor_ctor_init = FALSE;
+ }
+ else if (pos->col == 0)
+ {
+! /* it can't be a constructor-initialization any more */
+ lookfor_ctor_init = FALSE;
+
+! /* the first statement starts here: lineup with this one... */
+ if (cpp_base_class)
+ pos->col = (colnr_T)(s - line);
+ }
+
+! /* When the line ends in a comma don't align with it. */
+ if (lnum == curwin->w_cursor.lnum && *s == ',' && cin_nocode(s + 1))
+ pos->col = 0;
+
+--- 1403,1435 ----
+ }
+ else if (s[0] == ')')
+ {
+! // Constructor-initialization is assumed if we come across
+! // something like "):"
+ class_or_struct = FALSE;
+ lookfor_ctor_init = TRUE;
+ }
+ else if (s[0] == '?')
+ {
+! // Avoid seeing '() :' after '?' as constructor init.
+ return FALSE;
+ }
+ else if (!vim_isIDc(s[0]))
+ {
+! // if it is not an identifier, we are wrong
+ class_or_struct = FALSE;
+ lookfor_ctor_init = FALSE;
+ }
+ else if (pos->col == 0)
+ {
+! // it can't be a constructor-initialization any more
+ lookfor_ctor_init = FALSE;
+
+! // the first statement starts here: lineup with this one...
+ if (cpp_base_class)
+ pos->col = (colnr_T)(s - line);
+ }
+
+! // When the line ends in a comma don't align with it.
+ if (lnum == curwin->w_cursor.lnum && *s == ',' && cin_nocode(s + 1))
+ pos->col = 0;
+
+***************
+*** 1468,1474 ****
+ amount = get_indent();
+ if (find_last_paren(ml_get_curline(), '(', ')')
+ && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
+! amount = get_indent_lnum(trypos->lnum); /* XXX */
+ if (!cin_ends_in(ml_get_curline(), (char_u *)",", NULL))
+ amount += curbuf->b_ind_cpp_baseclass;
+ }
+--- 1455,1461 ----
+ amount = get_indent();
+ if (find_last_paren(ml_get_curline(), '(', ')')
+ && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
+! amount = get_indent_lnum(trypos->lnum); // XXX
+ if (!cin_ends_in(ml_get_curline(), (char_u *)",", NULL))
+ amount += curbuf->b_ind_cpp_baseclass;
+ }
+***************
+*** 1555,1567 ****
+ * Find the '{' at the start of the block we are in.
+ * Return NULL if no match found.
+ * Ignore a '{' that is in a comment, makes indenting the next three lines
+! * work. */
+ /* foo() */
+ /* { */
+ /* } */
+
+ static pos_T *
+! find_start_brace(void) /* XXX */
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+--- 1542,1555 ----
+ * Find the '{' at the start of the block we are in.
+ * Return NULL if no match found.
+ * Ignore a '{' that is in a comment, makes indenting the next three lines
+! * work.
+! */
+ /* foo() */
+ /* { */
+ /* } */
+
+ static pos_T *
+! find_start_brace(void) // XXX
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+***************
+*** 1571,1583 ****
+ cursor_save = curwin->w_cursor;
+ while ((trypos = findmatchlimit(NULL, '{', FM_BLOCKSTOP, 0)) != NULL)
+ {
+! pos_copy = *trypos; /* copy pos_T, next findmatch will change it */
+ trypos = &pos_copy;
+ curwin->w_cursor = *trypos;
+ pos = NULL;
+! /* ignore the { if it's in a // or / * * / comment */
+ if ((colnr_T)cin_skip2pos(trypos) == trypos->col
+! && (pos = ind_find_start_CORS(NULL)) == NULL) /* XXX */
+ break;
+ if (pos != NULL)
+ curwin->w_cursor.lnum = pos->lnum;
+--- 1559,1571 ----
+ cursor_save = curwin->w_cursor;
+ while ((trypos = findmatchlimit(NULL, '{', FM_BLOCKSTOP, 0)) != NULL)
+ {
+! pos_copy = *trypos; // copy pos_T, next findmatch will change it
+ trypos = &pos_copy;
+ curwin->w_cursor = *trypos;
+ pos = NULL;
+! // ignore the { if it's in a // or / * * / comment
+ if ((colnr_T)cin_skip2pos(trypos) == trypos->col
+! && (pos = ind_find_start_CORS(NULL)) == NULL) // XXX
+ break;
+ if (pos != NULL)
+ curwin->w_cursor.lnum = pos->lnum;
+***************
+*** 1591,1603 ****
+ * Return NULL if no match found.
+ */
+ static pos_T *
+! find_match_paren(int ind_maxparen) /* XXX */
+ {
+ return find_match_char('(', ind_maxparen);
+ }
+
+ static pos_T *
+! find_match_char(int c, int ind_maxparen) /* XXX */
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+--- 1579,1591 ----
+ * Return NULL if no match found.
+ */
+ static pos_T *
+! find_match_paren(int ind_maxparen) // XXX
+ {
+ return find_match_char('(', ind_maxparen);
+ }
+
+ static pos_T *
+! find_match_char(int c, int ind_maxparen) // XXX
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+***************
+*** 1609,1622 ****
+ retry:
+ if ((trypos = findmatchlimit(NULL, c, 0, ind_maxp_wk)) != NULL)
+ {
+! /* check if the ( is in a // comment */
+ if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
+ {
+ ind_maxp_wk = ind_maxparen - (int)(cursor_save.lnum - trypos->lnum);
+ if (ind_maxp_wk > 0)
+ {
+ curwin->w_cursor = *trypos;
+! curwin->w_cursor.col = 0; /* XXX */
+ goto retry;
+ }
+ trypos = NULL;
+--- 1597,1610 ----
+ retry:
+ if ((trypos = findmatchlimit(NULL, c, 0, ind_maxp_wk)) != NULL)
+ {
+! // check if the ( is in a // comment
+ if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
+ {
+ ind_maxp_wk = ind_maxparen - (int)(cursor_save.lnum - trypos->lnum);
+ if (ind_maxp_wk > 0)
+ {
+ curwin->w_cursor = *trypos;
+! curwin->w_cursor.col = 0; // XXX
+ goto retry;
+ }
+ trypos = NULL;
+***************
+*** 1625,1634 ****
+ {
+ pos_T *trypos_wk;
+
+! pos_copy = *trypos; /* copy trypos, findmatch will change it */
+ trypos = &pos_copy;
+ curwin->w_cursor = *trypos;
+! if ((trypos_wk = ind_find_start_CORS(NULL)) != NULL) /* XXX */
+ {
+ ind_maxp_wk = ind_maxparen - (int)(cursor_save.lnum
+ - trypos_wk->lnum);
+--- 1613,1622 ----
+ {
+ pos_T *trypos_wk;
+
+! pos_copy = *trypos; // copy trypos, findmatch will change it
+ trypos = &pos_copy;
+ curwin->w_cursor = *trypos;
+! if ((trypos_wk = ind_find_start_CORS(NULL)) != NULL) // XXX
+ {
+ ind_maxp_wk = ind_maxparen - (int)(cursor_save.lnum
+ - trypos_wk->lnum);
+***************
+*** 1651,1657 ****
+ * Return NULL if no match found.
+ */
+ static pos_T *
+! find_match_paren_after_brace (int ind_maxparen) /* XXX */
+ {
+ pos_T *trypos = find_match_paren(ind_maxparen);
+
+--- 1639,1645 ----
+ * Return NULL if no match found.
+ */
+ static pos_T *
+! find_match_paren_after_brace (int ind_maxparen) // XXX
+ {
+ pos_T *trypos = find_match_paren(ind_maxparen);
+
+***************
+*** 1659,1666 ****
+ {
+ pos_T *tryposBrace = find_start_brace();
+
+! /* If both an unmatched '(' and '{' is found. Ignore the '('
+! * position if the '{' is further down. */
+ if (tryposBrace != NULL
+ && (trypos->lnum != tryposBrace->lnum
+ ? trypos->lnum < tryposBrace->lnum
+--- 1647,1654 ----
+ {
+ pos_T *tryposBrace = find_start_brace();
+
+! // If both an unmatched '(' and '{' is found. Ignore the '('
+! // position if the '{' is further down.
+ if (tryposBrace != NULL
+ && (trypos->lnum != tryposBrace->lnum
+ ? trypos->lnum < tryposBrace->lnum
+***************
+*** 1697,1708 ****
+ int retval = FALSE;
+ int open_count = 0;
+
+! curwin->w_cursor.col = 0; /* default is start of line */
+
+ for (i = 0; l[i] != NUL; i++)
+ {
+! i = (int)(cin_skipcomment(l + i) - l); /* ignore parens in comments */
+! i = (int)(skip_string(l + i) - l); /* ignore parens in quotes */
+ if (l[i] == start)
+ ++open_count;
+ else if (l[i] == end)
+--- 1685,1696 ----
+ int retval = FALSE;
+ int open_count = 0;
+
+! curwin->w_cursor.col = 0; // default is start of line
+
+ for (i = 0; l[i] != NUL; i++)
+ {
+! i = (int)(cin_skipcomment(l + i) - l); // ignore parens in comments
+! i = (int)(skip_string(l + i) - l); // ignore parens in quotes
+ if (l[i] == start)
+ ++open_count;
+ else if (l[i] == end)
+***************
+*** 1734,1867 ****
+ int fraction = 0;
+ int sw = (int)get_sw_value(buf);
+
+! /*
+! * Set the default values.
+! */
+! /* Spaces from a block's opening brace the prevailing indent for that
+! * block should be. */
+ buf->b_ind_level = sw;
+
+! /* Spaces from the edge of the line an open brace that's at the end of a
+! * line is imagined to be. */
+ buf->b_ind_open_imag = 0;
+
+! /* Spaces from the prevailing indent for a line that is not preceded by
+! * an opening brace. */
+ buf->b_ind_no_brace = 0;
+
+! /* Column where the first { of a function should be located }. */
+ buf->b_ind_first_open = 0;
+
+! /* Spaces from the prevailing indent a leftmost open brace should be
+! * located. */
+ buf->b_ind_open_extra = 0;
+
+! /* Spaces from the matching open brace (real location for one at the left
+! * edge; imaginary location from one that ends a line) the matching close
+! * brace should be located. */
+ buf->b_ind_close_extra = 0;
+
+! /* Spaces from the edge of the line an open brace sitting in the leftmost
+! * column is imagined to be. */
+ buf->b_ind_open_left_imag = 0;
+
+! /* Spaces jump labels should be shifted to the left if N is non-negative,
+! * otherwise the jump label will be put to column 1. */
+ buf->b_ind_jump_label = -1;
+
+! /* Spaces from the switch() indent a "case xx" label should be located. */
+ buf->b_ind_case = sw;
+
+! /* Spaces from the "case xx:" code after a switch() should be located. */
+ buf->b_ind_case_code = sw;
+
+! /* Lineup break at end of case in switch() with case label. */
+ buf->b_ind_case_break = 0;
+
+! /* Spaces from the class declaration indent a scope declaration label
+! * should be located. */
+ buf->b_ind_scopedecl = sw;
+
+! /* Spaces from the scope declaration label code should be located. */
+ buf->b_ind_scopedecl_code = sw;
+
+! /* Amount K&R-style parameters should be indented. */
+ buf->b_ind_param = sw;
+
+! /* Amount a function type spec should be indented. */
+ buf->b_ind_func_type = sw;
+
+! /* Amount a cpp base class declaration or constructor initialization
+! * should be indented. */
+ buf->b_ind_cpp_baseclass = sw;
+
+! /* additional spaces beyond the prevailing indent a continuation line
+! * should be located. */
+ buf->b_ind_continuation = sw;
+
+! /* Spaces from the indent of the line with an unclosed parentheses. */
+ buf->b_ind_unclosed = sw * 2;
+
+! /* Spaces from the indent of the line with an unclosed parentheses, which
+! * itself is also unclosed. */
+ buf->b_ind_unclosed2 = sw;
+
+! /* Suppress ignoring spaces from the indent of a line starting with an
+! * unclosed parentheses. */
+ buf->b_ind_unclosed_noignore = 0;
+
+! /* If the opening paren is the last nonwhite character on the line, and
+! * b_ind_unclosed_wrapped is nonzero, use this indent relative to the outer
+! * context (for very long lines). */
+ buf->b_ind_unclosed_wrapped = 0;
+
+! /* Suppress ignoring white space when lining up with the character after
+! * an unclosed parentheses. */
+ buf->b_ind_unclosed_whiteok = 0;
+
+! /* Indent a closing parentheses under the line start of the matching
+! * opening parentheses. */
+ buf->b_ind_matching_paren = 0;
+
+! /* Indent a closing parentheses under the previous line. */
+ buf->b_ind_paren_prev = 0;
+
+! /* Extra indent for comments. */
+ buf->b_ind_comment = 0;
+
+! /* Spaces from the comment opener when there is nothing after it. */
+ buf->b_ind_in_comment = 3;
+
+! /* Boolean: if non-zero, use b_ind_in_comment even if there is something
+! * after the comment opener. */
+ buf->b_ind_in_comment2 = 0;
+
+! /* Max lines to search for an open paren. */
+ buf->b_ind_maxparen = 20;
+
+! /* Max lines to search for an open comment. */
+ buf->b_ind_maxcomment = 70;
+
+! /* Handle braces for java code. */
+ buf->b_ind_java = 0;
+
+! /* Not to confuse JS object properties with labels. */
+ buf->b_ind_js = 0;
+
+! /* Handle blocked cases correctly. */
+ buf->b_ind_keep_case_label = 0;
+
+! /* Handle C++ namespace. */
+ buf->b_ind_cpp_namespace = 0;
+
+! /* Handle continuation lines containing conditions of if(), for() and
+! * while(). */
+ buf->b_ind_if_for_while = 0;
+
+! /* indentation for # comments */
+ buf->b_ind_hash_comment = 0;
+
+! /* Handle C++ extern "C" or "C++" */
+ buf->b_ind_cpp_extern_c = 0;
+
+ for (p = buf->b_p_cino; *p; )
+--- 1722,1854 ----
+ int fraction = 0;
+ int sw = (int)get_sw_value(buf);
+
+! // Set the default values.
+!
+! // Spaces from a block's opening brace the prevailing indent for that
+! // block should be.
+ buf->b_ind_level = sw;
+
+! // Spaces from the edge of the line an open brace that's at the end of a
+! // line is imagined to be.
+ buf->b_ind_open_imag = 0;
+
+! // Spaces from the prevailing indent for a line that is not preceded by
+! // an opening brace.
+ buf->b_ind_no_brace = 0;
+
+! // Column where the first { of a function should be located }.
+ buf->b_ind_first_open = 0;
+
+! // Spaces from the prevailing indent a leftmost open brace should be
+! // located.
+ buf->b_ind_open_extra = 0;
+
+! // Spaces from the matching open brace (real location for one at the left
+! // edge; imaginary location from one that ends a line) the matching close
+! // brace should be located.
+ buf->b_ind_close_extra = 0;
+
+! // Spaces from the edge of the line an open brace sitting in the leftmost
+! // column is imagined to be.
+ buf->b_ind_open_left_imag = 0;
+
+! // Spaces jump labels should be shifted to the left if N is non-negative,
+! // otherwise the jump label will be put to column 1.
+ buf->b_ind_jump_label = -1;
+
+! // Spaces from the switch() indent a "case xx" label should be located.
+ buf->b_ind_case = sw;
+
+! // Spaces from the "case xx:" code after a switch() should be located.
+ buf->b_ind_case_code = sw;
+
+! // Lineup break at end of case in switch() with case label.
+ buf->b_ind_case_break = 0;
+
+! // Spaces from the class declaration indent a scope declaration label
+! // should be located.
+ buf->b_ind_scopedecl = sw;
+
+! // Spaces from the scope declaration label code should be located.
+ buf->b_ind_scopedecl_code = sw;
+
+! // Amount K&R-style parameters should be indented.
+ buf->b_ind_param = sw;
+
+! // Amount a function type spec should be indented.
+ buf->b_ind_func_type = sw;
+
+! // Amount a cpp base class declaration or constructor initialization
+! // should be indented.
+ buf->b_ind_cpp_baseclass = sw;
+
+! // additional spaces beyond the prevailing indent a continuation line
+! // should be located.
+ buf->b_ind_continuation = sw;
+
+! // Spaces from the indent of the line with an unclosed parentheses.
+ buf->b_ind_unclosed = sw * 2;
+
+! // Spaces from the indent of the line with an unclosed parentheses, which
+! // itself is also unclosed.
+ buf->b_ind_unclosed2 = sw;
+
+! // Suppress ignoring spaces from the indent of a line starting with an
+! // unclosed parentheses.
+ buf->b_ind_unclosed_noignore = 0;
+
+! // If the opening paren is the last nonwhite character on the line, and
+! // b_ind_unclosed_wrapped is nonzero, use this indent relative to the outer
+! // context (for very long lines).
+ buf->b_ind_unclosed_wrapped = 0;
+
+! // Suppress ignoring white space when lining up with the character after
+! // an unclosed parentheses.
+ buf->b_ind_unclosed_whiteok = 0;
+
+! // Indent a closing parentheses under the line start of the matching
+! // opening parentheses.
+ buf->b_ind_matching_paren = 0;
+
+! // Indent a closing parentheses under the previous line.
+ buf->b_ind_paren_prev = 0;
+
+! // Extra indent for comments.
+ buf->b_ind_comment = 0;
+
+! // Spaces from the comment opener when there is nothing after it.
+ buf->b_ind_in_comment = 3;
+
+! // Boolean: if non-zero, use b_ind_in_comment even if there is something
+! // after the comment opener.
+ buf->b_ind_in_comment2 = 0;
+
+! // Max lines to search for an open paren.
+ buf->b_ind_maxparen = 20;
+
+! // Max lines to search for an open comment.
+ buf->b_ind_maxcomment = 70;
+
+! // Handle braces for java code.
+ buf->b_ind_java = 0;
+
+! // Not to confuse JS object properties with labels.
+ buf->b_ind_js = 0;
+
+! // Handle blocked cases correctly.
+ buf->b_ind_keep_case_label = 0;
+
+! // Handle C++ namespace.
+ buf->b_ind_cpp_namespace = 0;
+
+! // Handle continuation lines containing conditions of if(), for() and
+! // while().
+ buf->b_ind_if_for_while = 0;
+
+! // indentation for # comments
+ buf->b_ind_hash_comment = 0;
+
+! // Handle C++ extern "C" or "C++"
+ buf->b_ind_cpp_extern_c = 0;
+
+ for (p = buf->b_p_cino; *p; )
+***************
+*** 1869,1878 ****
+ l = p++;
+ if (*p == '-')
+ ++p;
+! digits = p; /* remember where the digits start */
+ n = getdigits(&p);
+ divider = 0;
+! if (*p == '.') /* ".5s" means a fraction */
+ {
+ fraction = atol((char *)++p);
+ while (VIM_ISDIGIT(*p))
+--- 1856,1865 ----
+ l = p++;
+ if (*p == '-')
+ ++p;
+! digits = p; // remember where the digits start
+ n = getdigits(&p);
+ divider = 0;
+! if (*p == '.') // ".5s" means a fraction
+ {
+ fraction = atol((char *)++p);
+ while (VIM_ISDIGIT(*p))
+***************
+*** 1884,1893 ****
+ divider = 10;
+ }
+ }
+! if (*p == 's') /* "2s" means two times 'shiftwidth' */
+ {
+ if (p == digits)
+! n = sw; /* just "s" is one 'shiftwidth' */
+ else
+ {
+ n *= sw;
+--- 1871,1880 ----
+ divider = 10;
+ }
+ }
+! if (*p == 's') // "2s" means two times 'shiftwidth'
+ {
+ if (p == digits)
+! n = sw; // just "s" is one 'shiftwidth'
+ else
+ {
+ n *= sw;
+***************
+*** 1899,1906 ****
+ if (l[1] == '-')
+ n = -n;
+
+! /* When adding an entry here, also update the default 'cinoptions' in
+! * doc/indent.txt, and add explanation for it! */
+ switch (*l)
+ {
+ case '>': buf->b_ind_level = n; break;
+--- 1886,1893 ----
+ if (l[1] == '-')
+ n = -n;
+
+! // When adding an entry here, also update the default 'cinoptions' in
+! // doc/indent.txt, and add explanation for it!
+ switch (*l)
+ {
+ case '>': buf->b_ind_level = n; break;
+***************
+*** 1966,1974 ****
+ pos_T our_paren_pos;
+ char_u *start;
+ int start_brace;
+! #define BRACE_IN_COL0 1 /* '{' is in column 0 */
+! #define BRACE_AT_START 2 /* '{' is at start of line */
+! #define BRACE_AT_END 3 /* '{' is at end of line */
+ linenr_T ourscope;
+ char_u *l;
+ char_u *look;
+--- 1953,1961 ----
+ pos_T our_paren_pos;
+ char_u *start;
+ int start_brace;
+! #define BRACE_IN_COL0 1 // '{' is in column 0
+! #define BRACE_AT_START 2 // '{' is at start of line
+! #define BRACE_AT_END 3 // '{' is at end of line
+ linenr_T ourscope;
+ char_u *l;
+ char_u *look;
+***************
+*** 1994,2030 ****
+ int iscase;
+ int lookfor_break;
+ int lookfor_cpp_namespace = FALSE;
+! int cont_amount = 0; /* amount for continuation line */
+ int original_line_islabel;
+ int added_to_amount = 0;
+ int js_cur_has_key = 0;
+ linenr_T raw_string_start = 0;
+ cpp_baseclass_cache_T cache_cpp_baseclass = { FALSE, { MAXLNUM, 0 } };
+
+! /* make a copy, value is changed below */
+ int ind_continuation = curbuf->b_ind_continuation;
+
+! /* remember where the cursor was when we started */
+ cur_curpos = curwin->w_cursor;
+
+! /* if we are at line 1 zero indent is fine, right? */
+ if (cur_curpos.lnum == 1)
+ return 0;
+
+! /* Get a copy of the current contents of the line.
+! * This is required, because only the most recent line obtained with
+! * ml_get is valid! */
+ linecopy = vim_strsave(ml_get(cur_curpos.lnum));
+ if (linecopy == NULL)
+ return 0;
+
+! /*
+! * In insert mode and the cursor is on a ')' truncate the line at the
+! * cursor position. We don't want to line up with the matching '(' when
+! * inserting new stuff.
+! * For unknown reasons the cursor might be past the end of the line, thus
+! * check for that.
+! */
+ if ((State & INSERT)
+ && curwin->w_cursor.col < (colnr_T)STRLEN(linecopy)
+ && linecopy[curwin->w_cursor.col] == ')')
+--- 1981,2015 ----
+ int iscase;
+ int lookfor_break;
+ int lookfor_cpp_namespace = FALSE;
+! int cont_amount = 0; // amount for continuation line
+ int original_line_islabel;
+ int added_to_amount = 0;
+ int js_cur_has_key = 0;
+ linenr_T raw_string_start = 0;
+ cpp_baseclass_cache_T cache_cpp_baseclass = { FALSE, { MAXLNUM, 0 } };
+
+! // make a copy, value is changed below
+ int ind_continuation = curbuf->b_ind_continuation;
+
+! // remember where the cursor was when we started
+ cur_curpos = curwin->w_cursor;
+
+! // if we are at line 1 zero indent is fine, right?
+ if (cur_curpos.lnum == 1)
+ return 0;
+
+! // Get a copy of the current contents of the line.
+! // This is required, because only the most recent line obtained with
+! // ml_get is valid!
+ linecopy = vim_strsave(ml_get(cur_curpos.lnum));
+ if (linecopy == NULL)
+ return 0;
+
+! // In insert mode and the cursor is on a ')' truncate the line at the
+! // cursor position. We don't want to line up with the matching '(' when
+! // inserting new stuff.
+! // For unknown reasons the cursor might be past the end of the line, thus
+! // check for that.
+ if ((State & INSERT)
+ && curwin->w_cursor.col < (colnr_T)STRLEN(linecopy)
+ && linecopy[curwin->w_cursor.col] == ')')
+***************
+*** 2032,2051 ****
+
+ theline = skipwhite(linecopy);
+
+! /* move the cursor to the start of the line */
+
+ curwin->w_cursor.col = 0;
+
+! original_line_islabel = cin_islabel(); /* XXX */
+
+! /*
+! * If we are inside a raw string don't change the indent.
+! * Ignore a raw string inside a comment.
+! */
+ comment_pos = ind_find_start_comment();
+ if (comment_pos != NULL)
+ {
+! /* findmatchlimit() static pos is overwritten, make a copy */
+ tryposCopy = *comment_pos;
+ comment_pos = &tryposCopy;
+ }
+--- 2017,2034 ----
+
+ theline = skipwhite(linecopy);
+
+! // move the cursor to the start of the line
+
+ curwin->w_cursor.col = 0;
+
+! original_line_islabel = cin_islabel(); // XXX
+
+! // If we are inside a raw string don't change the indent.
+! // Ignore a raw string inside a comment.
+ comment_pos = ind_find_start_comment();
+ if (comment_pos != NULL)
+ {
+! // findmatchlimit() static pos is overwritten, make a copy
+ tryposCopy = *comment_pos;
+ comment_pos = &tryposCopy;
+ }
+***************
+*** 2057,2076 ****
+ goto laterend;
+ }
+
+! /*
+! * #defines and so on always go at the left when included in 'cinkeys'.
+! */
+ if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', TRUE)))
+ {
+ amount = curbuf->b_ind_hash_comment;
+ goto theend;
+ }
+
+! /*
+! * Is it a non-case label? Then that goes at the left margin too unless:
+! * - JS flag is set.
+! * - 'L' item has a positive value.
+! */
+ if (original_line_islabel && !curbuf->b_ind_js
+ && curbuf->b_ind_jump_label < 0)
+ {
+--- 2040,2055 ----
+ goto laterend;
+ }
+
+! // #defines and so on always go at the left when included in 'cinkeys'.
+ if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', TRUE)))
+ {
+ amount = curbuf->b_ind_hash_comment;
+ goto theend;
+ }
+
+! // Is it a non-case label? Then that goes at the left margin too unless:
+! // - JS flag is set.
+! // - 'L' item has a positive value.
+ if (original_line_islabel && !curbuf->b_ind_js
+ && curbuf->b_ind_jump_label < 0)
+ {
+***************
+*** 2078,2113 ****
+ goto theend;
+ }
+
+! /*
+! * If we're inside a "//" comment and there is a "//" comment in a
+! * previous line, lineup with that one.
+! */
+ if (cin_islinecomment(theline)
+! && (trypos = find_line_comment()) != NULL) /* XXX */
+ {
+! /* find how indented the line beginning the comment is */
+ getvcol(curwin, trypos, &col, NULL, NULL);
+ amount = col;
+ goto theend;
+ }
+
+! /*
+! * If we're inside a comment and not looking at the start of the
+! * comment, try using the 'comments' option.
+! */
+! if (!cin_iscomment(theline) && comment_pos != NULL) /* XXX */
+ {
+ int lead_start_len = 2;
+ int lead_middle_len = 1;
+! char_u lead_start[COM_MAX_LEN]; /* start-comment string */
+! char_u lead_middle[COM_MAX_LEN]; /* middle-comment string */
+! char_u lead_end[COM_MAX_LEN]; /* end-comment string */
+ char_u *p;
+ int start_align = 0;
+ int start_off = 0;
+ int done = FALSE;
+
+! /* find how indented the line beginning the comment is */
+ getvcol(curwin, comment_pos, &col, NULL, NULL);
+ amount = col;
+ *lead_start = NUL;
+--- 2057,2088 ----
+ goto theend;
+ }
+
+! // If we're inside a "//" comment and there is a "//" comment in a
+! // previous line, lineup with that one.
+ if (cin_islinecomment(theline)
+! && (trypos = find_line_comment()) != NULL) // XXX
+ {
+! // find how indented the line beginning the comment is
+ getvcol(curwin, trypos, &col, NULL, NULL);
+ amount = col;
+ goto theend;
+ }
+
+! // If we're inside a comment and not looking at the start of the
+! // comment, try using the 'comments' option.
+! if (!cin_iscomment(theline) && comment_pos != NULL) // XXX
+ {
+ int lead_start_len = 2;
+ int lead_middle_len = 1;
+! char_u lead_start[COM_MAX_LEN]; // start-comment string
+! char_u lead_middle[COM_MAX_LEN]; // middle-comment string
+! char_u lead_end[COM_MAX_LEN]; // end-comment string
+ char_u *p;
+ int start_align = 0;
+ int start_off = 0;
+ int done = FALSE;
+
+! // find how indented the line beginning the comment is
+ getvcol(curwin, comment_pos, &col, NULL, NULL);
+ amount = col;
+ *lead_start = NUL;
+***************
+*** 2149,2166 ****
+ }
+ else if (what == COM_END)
+ {
+! /* If our line starts with the middle comment string, line it
+! * up with the comment opener per the 'comments' option. */
+ if (STRNCMP(theline, lead_middle, lead_middle_len) == 0
+ && STRNCMP(theline, lead_end, STRLEN(lead_end)) != 0)
+ {
+ done = TRUE;
+ if (curwin->w_cursor.lnum > 1)
+ {
+! /* If the start comment string matches in the previous
+! * line, use the indent of that line plus offset. If
+! * the middle comment string matches in the previous
+! * line, use the indent of that line. XXX */
+ look = skipwhite(ml_get(curwin->w_cursor.lnum - 1));
+ if (STRNCMP(look, lead_start, lead_start_len) == 0)
+ amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
+--- 2124,2141 ----
+ }
+ else if (what == COM_END)
+ {
+! // If our line starts with the middle comment string, line it
+! // up with the comment opener per the 'comments' option.
+ if (STRNCMP(theline, lead_middle, lead_middle_len) == 0
+ && STRNCMP(theline, lead_end, STRLEN(lead_end)) != 0)
+ {
+ done = TRUE;
+ if (curwin->w_cursor.lnum > 1)
+ {
+! // If the start comment string matches in the previous
+! // line, use the indent of that line plus offset. If
+! // the middle comment string matches in the previous
+! // line, use the indent of that line. XXX
+ look = skipwhite(ml_get(curwin->w_cursor.lnum - 1));
+ if (STRNCMP(look, lead_start, lead_start_len) == 0)
+ amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
+***************
+*** 2170,2177 ****
+ amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
+ break;
+ }
+! /* If the start comment string doesn't match with the
+! * start of the comment, skip this entry. XXX */
+ else if (STRNCMP(ml_get(comment_pos->lnum) + comment_pos->col,
+ lead_start, lead_start_len) != 0)
+ continue;
+--- 2145,2152 ----
+ amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
+ break;
+ }
+! // If the start comment string doesn't match with the
+! // start of the comment, skip this entry. XXX
+ else if (STRNCMP(ml_get(comment_pos->lnum) + comment_pos->col,
+ lead_start, lead_start_len) != 0)
+ continue;
+***************
+*** 2184,2196 ****
+ break;
+ }
+
+! /* If our line starts with the end comment string, line it up
+! * with the middle comment */
+ if (STRNCMP(theline, lead_middle, lead_middle_len) != 0
+ && STRNCMP(theline, lead_end, STRLEN(lead_end)) == 0)
+ {
+ amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
+! /* XXX */
+ if (off != 0)
+ amount += off;
+ else if (align == COM_RIGHT)
+--- 2159,2171 ----
+ break;
+ }
+
+! // If our line starts with the end comment string, line it up
+! // with the middle comment
+ if (STRNCMP(theline, lead_middle, lead_middle_len) != 0
+ && STRNCMP(theline, lead_end, STRLEN(lead_end)) == 0)
+ {
+ amount = get_indent_lnum(curwin->w_cursor.lnum - 1);
+! // XXX
+ if (off != 0)
+ amount += off;
+ else if (align == COM_RIGHT)
+***************
+*** 2202,2239 ****
+ }
+ }
+
+! /* If our line starts with an asterisk, line up with the
+! * asterisk in the comment opener; otherwise, line up
+! * with the first character of the comment text.
+! */
+ if (done)
+ ;
+ else if (theline[0] == '*')
+ amount += 1;
+ else
+ {
+! /*
+! * If we are more than one line away from the comment opener, take
+! * the indent of the previous non-empty line. If 'cino' has "CO"
+! * and we are just below the comment opener and there are any
+! * white characters after it line up with the text after it;
+! * otherwise, add the amount specified by "c" in 'cino'
+! */
+ amount = -1;
+ for (lnum = cur_curpos.lnum - 1; lnum > comment_pos->lnum; --lnum)
+ {
+! if (linewhite(lnum)) /* skip blank lines */
+ continue;
+! amount = get_indent_lnum(lnum); /* XXX */
+ break;
+ }
+! if (amount == -1) /* use the comment opener */
+ {
+ if (!curbuf->b_ind_in_comment2)
+ {
+ start = ml_get(comment_pos->lnum);
+! look = start + comment_pos->col + 2; /* skip / and * */
+! if (*look != NUL) /* if something after it */
+ comment_pos->col = (colnr_T)(skipwhite(look) - start);
+ }
+ getvcol(curwin, comment_pos, &col, NULL, NULL);
+--- 2177,2211 ----
+ }
+ }
+
+! // If our line starts with an asterisk, line up with the
+! // asterisk in the comment opener; otherwise, line up
+! // with the first character of the comment text.
+ if (done)
+ ;
+ else if (theline[0] == '*')
+ amount += 1;
+ else
+ {
+! // If we are more than one line away from the comment opener, take
+! // the indent of the previous non-empty line. If 'cino' has "CO"
+! // and we are just below the comment opener and there are any
+! // white characters after it line up with the text after it;
+! // otherwise, add the amount specified by "c" in 'cino'
+ amount = -1;
+ for (lnum = cur_curpos.lnum - 1; lnum > comment_pos->lnum; --lnum)
+ {
+! if (linewhite(lnum)) // skip blank lines
+ continue;
+! amount = get_indent_lnum(lnum); // XXX
+ break;
+ }
+! if (amount == -1) // use the comment opener
+ {
+ if (!curbuf->b_ind_in_comment2)
+ {
+ start = ml_get(comment_pos->lnum);
+! look = start + comment_pos->col + 2; // skip / and *
+! if (*look != NUL) // if something after it
+ comment_pos->col = (colnr_T)(skipwhite(look) - start);
+ }
+ getvcol(curwin, comment_pos, &col, NULL, NULL);
+***************
+*** 2245,2264 ****
+ goto theend;
+ }
+
+! /*
+! * Are we looking at a ']' that has a match?
+! */
+ if (*skipwhite(theline) == ']'
+ && (trypos = find_match_char('[', curbuf->b_ind_maxparen)) != NULL)
+ {
+! /* align with the line containing the '['. */
+ amount = get_indent_lnum(trypos->lnum);
+ goto theend;
+ }
+
+! /*
+! * Are we inside parentheses or braces?
+! */ /* XXX */
+ if (((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL
+ && curbuf->b_ind_java == 0)
+ || (tryposBrace = find_start_brace()) != NULL
+--- 2217,2232 ----
+ goto theend;
+ }
+
+! // Are we looking at a ']' that has a match?
+ if (*skipwhite(theline) == ']'
+ && (trypos = find_match_char('[', curbuf->b_ind_maxparen)) != NULL)
+ {
+! // align with the line containing the '['.
+ amount = get_indent_lnum(trypos->lnum);
+ goto theend;
+ }
+
+! // Are we inside parentheses or braces? XXX
+ if (((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL
+ && curbuf->b_ind_java == 0)
+ || (tryposBrace = find_start_brace()) != NULL
+***************
+*** 2266,2273 ****
+ {
+ if (trypos != NULL && tryposBrace != NULL)
+ {
+! /* Both an unmatched '(' and '{' is found. Use the one which is
+! * closer to the current cursor position, set the other to NULL. */
+ if (trypos->lnum != tryposBrace->lnum
+ ? trypos->lnum < tryposBrace->lnum
+ : trypos->col < tryposBrace->col)
+--- 2234,2241 ----
+ {
+ if (trypos != NULL && tryposBrace != NULL)
+ {
+! // Both an unmatched '(' and '{' is found. Use the one which is
+! // closer to the current cursor position, set the other to NULL.
+ if (trypos->lnum != tryposBrace->lnum
+ ? trypos->lnum < tryposBrace->lnum
+ : trypos->col < tryposBrace->col)
+***************
+*** 2278,2291 ****
+
+ if (trypos != NULL)
+ {
+! /*
+! * If the matching paren is more than one line away, use the indent of
+! * a previous non-empty line that matches the same paren.
+! */
+ if (theline[0] == ')' && curbuf->b_ind_paren_prev)
+ {
+! /* Line up with the start of the matching paren line. */
+! amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */
+ }
+ else
+ {
+--- 2246,2257 ----
+
+ if (trypos != NULL)
+ {
+! // If the matching paren is more than one line away, use the indent of
+! // a previous non-empty line that matches the same paren.
+ if (theline[0] == ')' && curbuf->b_ind_paren_prev)
+ {
+! // Line up with the start of the matching paren line.
+! amount = get_indent_lnum(curwin->w_cursor.lnum - 1); // XXX
+ }
+ else
+ {
+***************
+*** 2294,2319 ****
+ for (lnum = cur_curpos.lnum - 1; lnum > our_paren_pos.lnum; --lnum)
+ {
+ l = skipwhite(ml_get(lnum));
+! if (cin_nocode(l)) /* skip comment lines */
+ continue;
+ if (cin_ispreproc_cont(&l, &lnum, &amount))
+! continue; /* ignore #define, #if, etc. */
+ curwin->w_cursor.lnum = lnum;
+
+! /* Skip a comment or raw string. XXX */
+ if ((trypos = ind_find_start_CORS(NULL)) != NULL)
+ {
+ lnum = trypos->lnum + 1;
+ continue;
+ }
+
+! /* XXX */
+ if ((trypos = find_match_paren(
+ corr_ind_maxparen(&cur_curpos))) != NULL
+ && trypos->lnum == our_paren_pos.lnum
+ && trypos->col == our_paren_pos.col)
+ {
+! amount = get_indent_lnum(lnum); /* XXX */
+
+ if (theline[0] == ')')
+ {
+--- 2260,2285 ----
+ for (lnum = cur_curpos.lnum - 1; lnum > our_paren_pos.lnum; --lnum)
+ {
+ l = skipwhite(ml_get(lnum));
+! if (cin_nocode(l)) // skip comment lines
+ continue;
+ if (cin_ispreproc_cont(&l, &lnum, &amount))
+! continue; // ignore #define, #if, etc.
+ curwin->w_cursor.lnum = lnum;
+
+! // Skip a comment or raw string. XXX
+ if ((trypos = ind_find_start_CORS(NULL)) != NULL)
+ {
+ lnum = trypos->lnum + 1;
+ continue;
+ }
+
+! // XXX
+ if ((trypos = find_match_paren(
+ corr_ind_maxparen(&cur_curpos))) != NULL
+ && trypos->lnum == our_paren_pos.lnum
+ && trypos->col == our_paren_pos.col)
+ {
+! amount = get_indent_lnum(lnum); // XXX
+
+ if (theline[0] == ')')
+ {
+***************
+*** 2327,2337 ****
+ }
+ }
+
+! /*
+! * Line up with line where the matching paren is. XXX
+! * If the line starts with a '(' or the indent for unclosed
+! * parentheses is zero, line up with the unclosed parentheses.
+! */
+ if (amount == -1)
+ {
+ int ignore_paren_col = 0;
+--- 2293,2301 ----
+ }
+ }
+
+! // Line up with line where the matching paren is. XXX
+! // If the line starts with a '(' or the indent for unclosed
+! // parentheses is zero, line up with the unclosed parentheses.
+ if (amount == -1)
+ {
+ int ignore_paren_col = 0;
+***************
+*** 2339,2346 ****
+
+ if (curbuf->b_ind_if_for_while)
+ {
+! /* Look for the outermost opening parenthesis on this line
+! * and check whether it belongs to an "if", "for" or "while". */
+
+ pos_T cursor_save = curwin->w_cursor;
+ pos_T outermost;
+--- 2303,2310 ----
+
+ if (curbuf->b_ind_if_for_while)
+ {
+! // Look for the outermost opening parenthesis on this line
+! // and check whether it belongs to an "if", "for" or "while".
+
+ pos_T cursor_save = curwin->w_cursor;
+ pos_T outermost;
+***************
+*** 2371,2378 ****
+ char_u *line;
+ int look_col;
+
+! /* Ignore a '(' in front of the line that has a match before
+! * our matching '('. */
+ curwin->w_cursor.lnum = our_paren_pos.lnum;
+ line = ml_get_curline();
+ look_col = (int)(look - line);
+--- 2335,2342 ----
+ char_u *line;
+ int look_col;
+
+! // Ignore a '(' in front of the line that has a match before
+! // our matching '('.
+ curwin->w_cursor.lnum = our_paren_pos.lnum;
+ line = ml_get_curline();
+ look_col = (int)(look - line);
+***************
+*** 2392,2406 ****
+ || (!curbuf->b_ind_unclosed_noignore && *look == '('
+ && ignore_paren_col == 0))
+ {
+! /*
+! * If we're looking at a close paren, line up right there;
+! * otherwise, line up with the next (non-white) character.
+! * When b_ind_unclosed_wrapped is set and the matching paren is
+! * the last nonwhite character of the line, use either the
+! * indent of the current line or the indentation of the next
+! * outer paren and add b_ind_unclosed_wrapped (for very long
+! * lines).
+! */
+ if (theline[0] != ')')
+ {
+ cur_amount = MAXCOL;
+--- 2356,2368 ----
+ || (!curbuf->b_ind_unclosed_noignore && *look == '('
+ && ignore_paren_col == 0))
+ {
+! // If we're looking at a close paren, line up right there;
+! // otherwise, line up with the next (non-white) character.
+! // When b_ind_unclosed_wrapped is set and the matching paren is
+! // the last nonwhite character of the line, use either the
+! // indent of the current line or the indentation of the next
+! // outer paren and add b_ind_unclosed_wrapped (for very long
+! // lines).
+ if (theline[0] != ')')
+ {
+ cur_amount = MAXCOL;
+***************
+*** 2408,2415 ****
+ if (curbuf->b_ind_unclosed_wrapped
+ && cin_ends_in(l, (char_u *)"(", NULL))
+ {
+! /* look for opening unmatched paren, indent one level
+! * for each additional level */
+ n = 1;
+ for (col = 0; col < our_paren_pos.col; ++col)
+ {
+--- 2370,2377 ----
+ if (curbuf->b_ind_unclosed_wrapped
+ && cin_ends_in(l, (char_u *)"(", NULL))
+ {
+! // look for opening unmatched paren, indent one level
+! // for each additional level
+ n = 1;
+ for (col = 0; col < our_paren_pos.col; ++col)
+ {
+***************
+*** 2436,2452 ****
+ col = our_paren_pos.col + 1;
+ while (VIM_ISWHITE(l[col]))
+ col++;
+! if (l[col] != NUL) /* In case of trailing space */
+ our_paren_pos.col = col;
+ else
+ our_paren_pos.col++;
+ }
+ }
+
+! /*
+! * Find how indented the paren is, or the character after it
+! * if we did the above "if".
+! */
+ if (our_paren_pos.col > 0)
+ {
+ getvcol(curwin, &our_paren_pos, &col, NULL, NULL);
+--- 2398,2412 ----
+ col = our_paren_pos.col + 1;
+ while (VIM_ISWHITE(l[col]))
+ col++;
+! if (l[col] != NUL) // In case of trailing space
+ our_paren_pos.col = col;
+ else
+ our_paren_pos.col++;
+ }
+ }
+
+! // Find how indented the paren is, or the character after it
+! // if we did the above "if".
+ if (our_paren_pos.col > 0)
+ {
+ getvcol(curwin, &our_paren_pos, &col, NULL, NULL);
+***************
+*** 2457,2463 ****
+
+ if (theline[0] == ')' && curbuf->b_ind_matching_paren)
+ {
+! /* Line up with the start of the matching paren line. */
+ }
+ else if ((curbuf->b_ind_unclosed == 0 && is_if_for_while == 0)
+ || (!curbuf->b_ind_unclosed_noignore
+--- 2417,2423 ----
+
+ if (theline[0] == ')' && curbuf->b_ind_matching_paren)
+ {
+! // Line up with the start of the matching paren line.
+ }
+ else if ((curbuf->b_ind_unclosed == 0 && is_if_for_while == 0)
+ || (!curbuf->b_ind_unclosed_noignore
+***************
+*** 2468,2475 ****
+ }
+ else
+ {
+! /* Add b_ind_unclosed2 for each '(' before our matching one,
+! * but ignore (void) before the line (ignore_paren_col). */
+ col = our_paren_pos.col;
+ while ((int)our_paren_pos.col > ignore_paren_col)
+ {
+--- 2428,2435 ----
+ }
+ else
+ {
+! // Add b_ind_unclosed2 for each '(' before our matching one,
+! // but ignore (void) before the line (ignore_paren_col).
+ col = our_paren_pos.col;
+ while ((int)our_paren_pos.col > ignore_paren_col)
+ {
+***************
+*** 2485,2492 ****
+ }
+ }
+
+! /* Use b_ind_unclosed once, when the first '(' is not inside
+! * braces */
+ if (col == MAXCOL)
+ amount += curbuf->b_ind_unclosed;
+ else
+--- 2445,2452 ----
+ }
+ }
+
+! // Use b_ind_unclosed once, when the first '(' is not inside
+! // braces
+ if (col == MAXCOL)
+ amount += curbuf->b_ind_unclosed;
+ else
+***************
+*** 2504,2546 ****
+ amount += curbuf->b_ind_unclosed;
+ }
+ }
+! /*
+! * For a line starting with ')' use the minimum of the two
+! * positions, to avoid giving it more indent than the previous
+! * lines:
+! * func_long_name( if (x
+! * arg && yy
+! * ) ^ not here ) ^ not here
+! */
+ if (cur_amount < amount)
+ amount = cur_amount;
+ }
+ }
+
+! /* add extra indent for a comment */
+ if (cin_iscomment(theline))
+ amount += curbuf->b_ind_comment;
+ }
+ else
+ {
+! /*
+! * We are inside braces, there is a { before this line at the position
+! * stored in tryposBrace.
+! * Make a copy of tryposBrace, it may point to pos_copy inside
+! * find_start_brace(), which may be changed somewhere.
+! */
+ tryposCopy = *tryposBrace;
+ tryposBrace = &tryposCopy;
+ trypos = tryposBrace;
+ ourscope = trypos->lnum;
+ start = ml_get(ourscope);
+
+! /*
+! * Now figure out how indented the line is in general.
+! * If the brace was at the start of the line, we use that;
+! * otherwise, check out the indentation of the line as
+! * a whole and then add the "imaginary indent" to that.
+! */
+ look = skipwhite(start);
+ if (*look == '{')
+ {
+--- 2464,2500 ----
+ amount += curbuf->b_ind_unclosed;
+ }
+ }
+! // For a line starting with ')' use the minimum of the two
+! // positions, to avoid giving it more indent than the previous
+! // lines:
+! // func_long_name( if (x
+! // arg && yy
+! // ) ^ not here ) ^ not here
+ if (cur_amount < amount)
+ amount = cur_amount;
+ }
+ }
+
+! // add extra indent for a comment
+ if (cin_iscomment(theline))
+ amount += curbuf->b_ind_comment;
+ }
+ else
+ {
+! // We are inside braces, there is a { before this line at the position
+! // stored in tryposBrace.
+! // Make a copy of tryposBrace, it may point to pos_copy inside
+! // find_start_brace(), which may be changed somewhere.
+ tryposCopy = *tryposBrace;
+ tryposBrace = &tryposCopy;
+ trypos = tryposBrace;
+ ourscope = trypos->lnum;
+ start = ml_get(ourscope);
+
+! // Now figure out how indented the line is in general.
+! // If the brace was at the start of the line, we use that;
+! // otherwise, check out the indentation of the line as
+! // a whole and then add the "imaginary indent" to that.
+ look = skipwhite(start);
+ if (*look == '{')
+ {
+***************
+*** 2553,2575 ****
+ }
+ else
+ {
+! /* That opening brace might have been on a continuation
+! * line. if so, find the start of the line. */
+ curwin->w_cursor.lnum = ourscope;
+
+! /* Position the cursor over the rightmost paren, so that
+! * matching it will take us back to the start of the line. */
+ lnum = ourscope;
+ if (find_last_paren(start, '(', ')')
+ && (trypos = find_match_paren(curbuf->b_ind_maxparen))
+ != NULL)
+ lnum = trypos->lnum;
+
+! /* It could have been something like
+! * case 1: if (asdf &&
+! * ldfd) {
+! * }
+! */
+ if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
+ && cin_iscase(skipwhite(ml_get_curline()), FALSE))
+ amount = get_indent();
+--- 2507,2528 ----
+ }
+ else
+ {
+! // That opening brace might have been on a continuation
+! // line. if so, find the start of the line.
+ curwin->w_cursor.lnum = ourscope;
+
+! // Position the cursor over the rightmost paren, so that
+! // matching it will take us back to the start of the line.
+ lnum = ourscope;
+ if (find_last_paren(start, '(', ')')
+ && (trypos = find_match_paren(curbuf->b_ind_maxparen))
+ != NULL)
+ lnum = trypos->lnum;
+
+! // It could have been something like
+! // case 1: if (asdf &&
+! // ldfd) {
+! // }
+ if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
+ && cin_iscase(skipwhite(ml_get_curline()), FALSE))
+ amount = get_indent();
+***************
+*** 2581,2653 ****
+ start_brace = BRACE_AT_END;
+ }
+
+! /* For Javascript check if the line starts with "key:". */
+ if (curbuf->b_ind_js)
+ js_cur_has_key = cin_has_js_key(theline);
+
+! /*
+! * If we're looking at a closing brace, that's where
+! * we want to be. otherwise, add the amount of room
+! * that an indent is supposed to be.
+! */
+ if (theline[0] == '}')
+ {
+! /*
+! * they may want closing braces to line up with something
+! * other than the open brace. indulge them, if so.
+! */
+ amount += curbuf->b_ind_close_extra;
+ }
+ else
+ {
+! /*
+! * If we're looking at an "else", try to find an "if"
+! * to match it with.
+! * If we're looking at a "while", try to find a "do"
+! * to match it with.
+! */
+ lookfor = LOOKFOR_INITIAL;
+ if (cin_iselse(theline))
+ lookfor = LOOKFOR_IF;
+! else if (cin_iswhileofdo(theline, cur_curpos.lnum)) /* XXX */
+ lookfor = LOOKFOR_DO;
+ if (lookfor != LOOKFOR_INITIAL)
+ {
+ curwin->w_cursor.lnum = cur_curpos.lnum;
+ if (find_match(lookfor, ourscope) == OK)
+ {
+! amount = get_indent(); /* XXX */
+ goto theend;
+ }
+ }
+
+! /*
+! * We get here if we are not on an "while-of-do" or "else" (or
+! * failed to find a matching "if").
+! * Search backwards for something to line up with.
+! * First set amount for when we don't find anything.
+! */
+!
+! /*
+! * if the '{' is _really_ at the left margin, use the imaginary
+! * location of a left-margin brace. Otherwise, correct the
+! * location for b_ind_open_extra.
+! */
+
+! if (start_brace == BRACE_IN_COL0) /* '{' is in column 0 */
+ {
+ amount = curbuf->b_ind_open_left_imag;
+ lookfor_cpp_namespace = TRUE;
+ }
+ else if (start_brace == BRACE_AT_START &&
+! lookfor_cpp_namespace) /* '{' is at start */
+ {
+
+ lookfor_cpp_namespace = TRUE;
+ }
+ else
+ {
+! if (start_brace == BRACE_AT_END) /* '{' is at end of line */
+ {
+ amount += curbuf->b_ind_open_imag;
+
+--- 2534,2596 ----
+ start_brace = BRACE_AT_END;
+ }
+
+! // For Javascript check if the line starts with "key:".
+ if (curbuf->b_ind_js)
+ js_cur_has_key = cin_has_js_key(theline);
+
+! // If we're looking at a closing brace, that's where
+! // we want to be. otherwise, add the amount of room
+! // that an indent is supposed to be.
+ if (theline[0] == '}')
+ {
+! // they may want closing braces to line up with something
+! // other than the open brace. indulge them, if so.
+ amount += curbuf->b_ind_close_extra;
+ }
+ else
+ {
+! // If we're looking at an "else", try to find an "if"
+! // to match it with.
+! // If we're looking at a "while", try to find a "do"
+! // to match it with.
+ lookfor = LOOKFOR_INITIAL;
+ if (cin_iselse(theline))
+ lookfor = LOOKFOR_IF;
+! else if (cin_iswhileofdo(theline, cur_curpos.lnum)) // XXX
+ lookfor = LOOKFOR_DO;
+ if (lookfor != LOOKFOR_INITIAL)
+ {
+ curwin->w_cursor.lnum = cur_curpos.lnum;
+ if (find_match(lookfor, ourscope) == OK)
+ {
+! amount = get_indent(); // XXX
+ goto theend;
+ }
+ }
+
+! // We get here if we are not on an "while-of-do" or "else" (or
+! // failed to find a matching "if").
+! // Search backwards for something to line up with.
+! // First set amount for when we don't find anything.
+!
+! // if the '{' is _really_ at the left margin, use the imaginary
+! // location of a left-margin brace. Otherwise, correct the
+! // location for b_ind_open_extra.
+
+! if (start_brace == BRACE_IN_COL0) // '{' is in column 0
+ {
+ amount = curbuf->b_ind_open_left_imag;
+ lookfor_cpp_namespace = TRUE;
+ }
+ else if (start_brace == BRACE_AT_START &&
+! lookfor_cpp_namespace) // '{' is at start
+ {
+
+ lookfor_cpp_namespace = TRUE;
+ }
+ else
+ {
+! if (start_brace == BRACE_AT_END) // '{' is at end of line
+ {
+ amount += curbuf->b_ind_open_imag;
+
+***************
+*** 2659,2665 ****
+ }
+ else
+ {
+! /* Compensate for adding b_ind_open_extra later. */
+ amount -= curbuf->b_ind_open_extra;
+ if (amount < 0)
+ amount = 0;
+--- 2602,2608 ----
+ }
+ else
+ {
+! // Compensate for adding b_ind_open_extra later.
+ amount -= curbuf->b_ind_open_extra;
+ if (amount < 0)
+ amount = 0;
+***************
+*** 2668,2734 ****
+
+ lookfor_break = FALSE;
+
+! if (cin_iscase(theline, FALSE)) /* it's a switch() label */
+ {
+! lookfor = LOOKFOR_CASE; /* find a previous switch() label */
+ amount += curbuf->b_ind_case;
+ }
+! else if (cin_isscopedecl(theline)) /* private:, ... */
+ {
+! lookfor = LOOKFOR_SCOPEDECL; /* class decl is this block */
+ amount += curbuf->b_ind_scopedecl;
+ }
+ else
+ {
+ if (curbuf->b_ind_case_break && cin_isbreak(theline))
+! /* break; ... */
+ lookfor_break = TRUE;
+
+ lookfor = LOOKFOR_INITIAL;
+! /* b_ind_level from start of block */
+ amount += curbuf->b_ind_level;
+ }
+ scope_amount = amount;
+ whilelevel = 0;
+
+! /*
+! * Search backwards. If we find something we recognize, line up
+! * with that.
+! *
+! * If we're looking at an open brace, indent
+! * the usual amount relative to the conditional
+! * that opens the block.
+! */
+ curwin->w_cursor = cur_curpos;
+ for (;;)
+ {
+ curwin->w_cursor.lnum--;
+ curwin->w_cursor.col = 0;
+
+! /*
+! * If we went all the way back to the start of our scope, line
+! * up with it.
+! */
+ if (curwin->w_cursor.lnum <= ourscope)
+ {
+! /* We reached end of scope:
+! * If looking for a enum or structure initialization
+! * go further back:
+! * If it is an initializer (enum xxx or xxx =), then
+! * don't add ind_continuation, otherwise it is a variable
+! * declaration:
+! * int x,
+! * here; <-- add ind_continuation
+! */
+ if (lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+ if (curwin->w_cursor.lnum == 0
+ || curwin->w_cursor.lnum
+ < ourscope - curbuf->b_ind_maxparen)
+ {
+! /* nothing found (abuse curbuf->b_ind_maxparen as
+! * limit) assume terminated line (i.e. a variable
+! * initialization) */
+ if (cont_amount > 0)
+ amount = cont_amount;
+ else if (!curbuf->b_ind_js)
+--- 2611,2672 ----
+
+ lookfor_break = FALSE;
+
+! if (cin_iscase(theline, FALSE)) // it's a switch() label
+ {
+! lookfor = LOOKFOR_CASE; // find a previous switch() label
+ amount += curbuf->b_ind_case;
+ }
+! else if (cin_isscopedecl(theline)) // private:, ...
+ {
+! lookfor = LOOKFOR_SCOPEDECL; // class decl is this block
+ amount += curbuf->b_ind_scopedecl;
+ }
+ else
+ {
+ if (curbuf->b_ind_case_break && cin_isbreak(theline))
+! // break; ...
+ lookfor_break = TRUE;
+
+ lookfor = LOOKFOR_INITIAL;
+! // b_ind_level from start of block
+ amount += curbuf->b_ind_level;
+ }
+ scope_amount = amount;
+ whilelevel = 0;
+
+! // Search backwards. If we find something we recognize, line up
+! // with that.
+! //
+! // If we're looking at an open brace, indent
+! // the usual amount relative to the conditional
+! // that opens the block.
+ curwin->w_cursor = cur_curpos;
+ for (;;)
+ {
+ curwin->w_cursor.lnum--;
+ curwin->w_cursor.col = 0;
+
+! // If we went all the way back to the start of our scope, line
+! // up with it.
+ if (curwin->w_cursor.lnum <= ourscope)
+ {
+! // We reached end of scope:
+! // If looking for a enum or structure initialization
+! // go further back:
+! // If it is an initializer (enum xxx or xxx =), then
+! // don't add ind_continuation, otherwise it is a variable
+! // declaration:
+! // int x,
+! // here; <-- add ind_continuation
+ if (lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+ if (curwin->w_cursor.lnum == 0
+ || curwin->w_cursor.lnum
+ < ourscope - curbuf->b_ind_maxparen)
+ {
+! // nothing found (abuse curbuf->b_ind_maxparen as
+! // limit) assume terminated line (i.e. a variable
+! // initialization)
+ if (cont_amount > 0)
+ amount = cont_amount;
+ else if (!curbuf->b_ind_js)
+***************
+*** 2738,2747 ****
+
+ l = ml_get_curline();
+
+! /*
+! * If we're in a comment or raw string now, skip to
+! * the start of it.
+! */
+ trypos = ind_find_start_CORS(NULL);
+ if (trypos != NULL)
+ {
+--- 2676,2683 ----
+
+ l = ml_get_curline();
+
+! // If we're in a comment or raw string now, skip to
+! // the start of it.
+ trypos = ind_find_start_CORS(NULL);
+ if (trypos != NULL)
+ {
+***************
+*** 2750,2758 ****
+ continue;
+ }
+
+! /*
+! * Skip preprocessor directives and blank lines.
+! */
+ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum,
+ &amount))
+ continue;
+--- 2686,2692 ----
+ continue;
+ }
+
+! // Skip preprocessor directives and blank lines.
+ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum,
+ &amount))
+ continue;
+***************
+*** 2762,2802 ****
+
+ terminated = cin_isterminated(l, FALSE, TRUE);
+
+! /*
+! * If we are at top level and the line looks like a
+! * function declaration, we are done
+! * (it's a variable declaration).
+! */
+ if (start_brace != BRACE_IN_COL0
+ || !cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
+ {
+! /* if the line is terminated with another ','
+! * it is a continued variable initialization.
+! * don't add extra indent.
+! * TODO: does not work, if a function
+! * declaration is split over multiple lines:
+! * cin_isfuncdecl returns FALSE then.
+! */
+ if (terminated == ',')
+ break;
+
+! /* if it es a enum declaration or an assignment,
+! * we are done.
+! */
+ if (terminated != ';' && cin_isinit())
+ break;
+
+! /* nothing useful found */
+ if (terminated == 0 || terminated == '{')
+ continue;
+ }
+
+ if (terminated != ';')
+ {
+! /* Skip parens and braces. Position the cursor
+! * over the rightmost paren, so that matching it
+! * will take us back to the start of the line.
+! */ /* XXX */
+ trypos = NULL;
+ if (find_last_paren(l, '(', ')'))
+ trypos = find_match_paren(
+--- 2696,2732 ----
+
+ terminated = cin_isterminated(l, FALSE, TRUE);
+
+! // If we are at top level and the line looks like a
+! // function declaration, we are done
+! // (it's a variable declaration).
+ if (start_brace != BRACE_IN_COL0
+ || !cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
+ {
+! // if the line is terminated with another ','
+! // it is a continued variable initialization.
+! // don't add extra indent.
+! // TODO: does not work, if a function
+! // declaration is split over multiple lines:
+! // cin_isfuncdecl returns FALSE then.
+ if (terminated == ',')
+ break;
+
+! // if it es a enum declaration or an assignment,
+! // we are done.
+ if (terminated != ';' && cin_isinit())
+ break;
+
+! // nothing useful found
+ if (terminated == 0 || terminated == '{')
+ continue;
+ }
+
+ if (terminated != ';')
+ {
+! // Skip parens and braces. Position the cursor
+! // over the rightmost paren, so that matching it
+! // will take us back to the start of the line.
+! // XXX
+ trypos = NULL;
+ if (find_last_paren(l, '(', ')'))
+ trypos = find_match_paren(
+***************
+*** 2813,2823 ****
+ }
+ }
+
+! /* it's a variable declaration, add indentation
+! * like in
+! * int a,
+! * b;
+! */
+ if (cont_amount > 0)
+ amount = cont_amount;
+ else
+--- 2743,2752 ----
+ }
+ }
+
+! // it's a variable declaration, add indentation
+! // like in
+! // int a,
+! // b;
+ if (cont_amount > 0)
+ amount = cont_amount;
+ else
+***************
+*** 2846,2855 ****
+
+ if (lookfor_cpp_namespace)
+ {
+! /*
+! * Looking for C++ namespace, need to look further
+! * back.
+! */
+ if (curwin->w_cursor.lnum == ourscope)
+ continue;
+
+--- 2775,2782 ----
+
+ if (lookfor_cpp_namespace)
+ {
+! // Looking for C++ namespace, need to look further
+! // back.
+ if (curwin->w_cursor.lnum == ourscope)
+ continue;
+
+***************
+*** 2860,2867 ****
+
+ l = ml_get_curline();
+
+! /* If we're in a comment or raw string now, skip
+! * to the start of it. */
+ trypos = ind_find_start_CORS(NULL);
+ if (trypos != NULL)
+ {
+--- 2787,2794 ----
+
+ l = ml_get_curline();
+
+! // If we're in a comment or raw string now, skip
+! // to the start of it.
+ trypos = ind_find_start_CORS(NULL);
+ if (trypos != NULL)
+ {
+***************
+*** 2870,2881 ****
+ continue;
+ }
+
+! /* Skip preprocessor directives and blank lines. */
+ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum,
+ &amount))
+ continue;
+
+! /* Finally the actual check for "namespace". */
+ if (cin_is_cpp_namespace(l))
+ {
+ amount += curbuf->b_ind_cpp_namespace
+--- 2797,2808 ----
+ continue;
+ }
+
+! // Skip preprocessor directives and blank lines.
+ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum,
+ &amount))
+ continue;
+
+! // Finally the actual check for "namespace".
+ if (cin_is_cpp_namespace(l))
+ {
+ amount += curbuf->b_ind_cpp_namespace
+***************
+*** 2896,2905 ****
+ break;
+ }
+
+! /*
+! * If we're in a comment or raw string now, skip to the start
+! * of it.
+! */ /* XXX */
+ if ((trypos = ind_find_start_CORS(&raw_string_start)) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+--- 2823,2830 ----
+ break;
+ }
+
+! // If we're in a comment or raw string now, skip to the start
+! // of it. XXX
+ if ((trypos = ind_find_start_CORS(&raw_string_start)) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+***************
+*** 2909,2936 ****
+
+ l = ml_get_curline();
+
+! /*
+! * If this is a switch() label, may line up relative to that.
+! * If this is a C++ scope declaration, do the same.
+! */
+ iscase = cin_iscase(l, FALSE);
+ if (iscase || cin_isscopedecl(l))
+ {
+! /* we are only looking for cpp base class
+! * declaration/initialization any longer */
+ if (lookfor == LOOKFOR_CPP_BASECLASS)
+ break;
+
+! /* When looking for a "do" we are not interested in
+! * labels. */
+ if (whilelevel > 0)
+ continue;
+
+! /*
+! * case xx:
+! * c = 99 + <- this indent plus continuation
+! *-> here;
+! */
+ if (lookfor == LOOKFOR_UNTERM
+ || lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+--- 2834,2857 ----
+
+ l = ml_get_curline();
+
+! // If this is a switch() label, may line up relative to that.
+! // If this is a C++ scope declaration, do the same.
+ iscase = cin_iscase(l, FALSE);
+ if (iscase || cin_isscopedecl(l))
+ {
+! // we are only looking for cpp base class
+! // declaration/initialization any longer
+ if (lookfor == LOOKFOR_CPP_BASECLASS)
+ break;
+
+! // When looking for a "do" we are not interested in
+! // labels.
+ if (whilelevel > 0)
+ continue;
+
+! // case xx:
+! // c = 99 + <- this indent plus continuation
+! //-> here;
+ if (lookfor == LOOKFOR_UNTERM
+ || lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+***************
+*** 2941,2980 ****
+ break;
+ }
+
+! /*
+! * case xx: <- line up with this case
+! * x = 333;
+! * case yy:
+! */
+ if ( (iscase && lookfor == LOOKFOR_CASE)
+ || (iscase && lookfor_break)
+ || (!iscase && lookfor == LOOKFOR_SCOPEDECL))
+ {
+! /*
+! * Check that this case label is not for another
+! * switch()
+! */ /* XXX */
+ if ((trypos = find_start_brace()) == NULL
+ || trypos->lnum == ourscope)
+ {
+! amount = get_indent(); /* XXX */
+ break;
+ }
+ continue;
+ }
+
+! n = get_indent_nolabel(curwin->w_cursor.lnum); /* XXX */
+
+! /*
+! * case xx: if (cond) <- line up with this if
+! * y = y + 1;
+! * -> s = 99;
+! *
+! * case xx:
+! * if (cond) <- line up with this line
+! * y = y + 1;
+! * -> s = 99;
+! */
+ if (lookfor == LOOKFOR_TERM)
+ {
+ if (n)
+--- 2862,2895 ----
+ break;
+ }
+
+! // case xx: <- line up with this case
+! // x = 333;
+! // case yy:
+ if ( (iscase && lookfor == LOOKFOR_CASE)
+ || (iscase && lookfor_break)
+ || (!iscase && lookfor == LOOKFOR_SCOPEDECL))
+ {
+! // Check that this case label is not for another
+! // switch() XXX
+ if ((trypos = find_start_brace()) == NULL
+ || trypos->lnum == ourscope)
+ {
+! amount = get_indent(); // XXX
+ break;
+ }
+ continue;
+ }
+
+! n = get_indent_nolabel(curwin->w_cursor.lnum); // XXX
+
+! // case xx: if (cond) <- line up with this if
+! // y = y + 1;
+! // -> s = 99;
+! //
+! // case xx:
+! // if (cond) <- line up with this line
+! // y = y + 1;
+! // -> s = 99;
+ if (lookfor == LOOKFOR_TERM)
+ {
+ if (n)
+***************
+*** 2984,2996 ****
+ break;
+ }
+
+! /*
+! * case xx: x = x + 1; <- line up with this x
+! * -> y = y + 1;
+! *
+! * case xx: if (cond) <- line up with this if
+! * -> y = y + 1;
+! */
+ if (n)
+ {
+ amount = n;
+--- 2899,2909 ----
+ break;
+ }
+
+! // case xx: x = x + 1; <- line up with this x
+! // -> y = y + 1;
+! //
+! // case xx: if (cond) <- line up with this if
+! // -> y = y + 1;
+ if (n)
+ {
+ amount = n;
+***************
+*** 3006,3020 ****
+ break;
+ }
+
+! /*
+! * Try to get the indent of a statement before the switch
+! * label. If nothing is found, line up relative to the
+! * switch label.
+! * break; <- may line up with this line
+! * case xx:
+! * -> y = 1;
+! */
+! scope_amount = get_indent() + (iscase /* XXX */
+ ? curbuf->b_ind_case_code
+ : curbuf->b_ind_scopedecl_code);
+ lookfor = curbuf->b_ind_case_break
+--- 2919,2931 ----
+ break;
+ }
+
+! // Try to get the indent of a statement before the switch
+! // label. If nothing is found, line up relative to the
+! // switch label.
+! // break; <- may line up with this line
+! // case xx:
+! // -> y = 1;
+! scope_amount = get_indent() + (iscase // XXX
+ ? curbuf->b_ind_case_code
+ : curbuf->b_ind_scopedecl_code);
+ lookfor = curbuf->b_ind_case_break
+***************
+*** 3022,3031 ****
+ continue;
+ }
+
+! /*
+! * Looking for a switch() label or C++ scope declaration,
+! * ignore other lines, skip {}-blocks.
+! */
+ if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
+ {
+ if (find_last_paren(l, '{', '}')
+--- 2933,2940 ----
+ continue;
+ }
+
+! // Looking for a switch() label or C++ scope declaration,
+! // ignore other lines, skip {}-blocks.
+ if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
+ {
+ if (find_last_paren(l, '{', '}')
+***************
+*** 3037,3045 ****
+ continue;
+ }
+
+! /*
+! * Ignore jump labels with nothing after them.
+! */
+ if (!curbuf->b_ind_js && cin_islabel())
+ {
+ l = after_label(ml_get_curline());
+--- 2946,2952 ----
+ continue;
+ }
+
+! // Ignore jump labels with nothing after them.
+ if (!curbuf->b_ind_js && cin_islabel())
+ {
+ l = after_label(ml_get_curline());
+***************
+*** 3047,3067 ****
+ continue;
+ }
+
+! /*
+! * Ignore #defines, #if, etc.
+! * Ignore comment and empty lines.
+! * (need to get the line again, cin_islabel() may have
+! * unlocked it)
+! */
+ l = ml_get_curline();
+ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount)
+ || cin_nocode(l))
+ continue;
+
+! /*
+! * Are we at the start of a cpp base class declaration or
+! * constructor initialization?
+! */ /* XXX */
+ n = FALSE;
+ if (lookfor != LOOKFOR_TERM && curbuf->b_ind_cpp_baseclass > 0)
+ {
+--- 2954,2970 ----
+ continue;
+ }
+
+! // Ignore #defines, #if, etc.
+! // Ignore comment and empty lines.
+! // (need to get the line again, cin_islabel() may have
+! // unlocked it)
+ l = ml_get_curline();
+ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount)
+ || cin_nocode(l))
+ continue;
+
+! // Are we at the start of a cpp base class declaration or
+! // constructor initialization? XXX
+ n = FALSE;
+ if (lookfor != LOOKFOR_TERM && curbuf->b_ind_cpp_baseclass > 0)
+ {
+***************
+*** 3079,3132 ****
+ }
+ else if (theline[0] == '{')
+ {
+! /* Need to find start of the declaration. */
+ lookfor = LOOKFOR_UNTERM;
+ ind_continuation = 0;
+ continue;
+ }
+ else
+! /* XXX */
+ amount = get_baseclass_amount(
+ cache_cpp_baseclass.lpos.col);
+ break;
+ }
+ else if (lookfor == LOOKFOR_CPP_BASECLASS)
+ {
+! /* only look, whether there is a cpp base class
+! * declaration or initialization before the opening brace.
+! */
+ if (cin_isterminated(l, TRUE, FALSE))
+ break;
+ else
+ continue;
+ }
+
+! /*
+! * What happens next depends on the line being terminated.
+! * If terminated with a ',' only consider it terminating if
+! * there is another unterminated statement behind, eg:
+! * 123,
+! * sizeof
+! * here
+! * Otherwise check whether it is a enumeration or structure
+! * initialisation (not indented) or a variable declaration
+! * (indented).
+! */
+ terminated = cin_isterminated(l, FALSE, TRUE);
+
+ if (js_cur_has_key)
+ {
+! js_cur_has_key = 0; /* only check the first line */
+ if (curbuf->b_ind_js && terminated == ',')
+ {
+! /* For Javascript we might be inside an object:
+! * key: something, <- align with this
+! * key: something
+! * or:
+! * key: something + <- align with this
+! * something,
+! * key: something
+! */
+ lookfor = LOOKFOR_JS_KEY;
+ }
+ }
+--- 2982,3031 ----
+ }
+ else if (theline[0] == '{')
+ {
+! // Need to find start of the declaration.
+ lookfor = LOOKFOR_UNTERM;
+ ind_continuation = 0;
+ continue;
+ }
+ else
+! // XXX
+ amount = get_baseclass_amount(
+ cache_cpp_baseclass.lpos.col);
+ break;
+ }
+ else if (lookfor == LOOKFOR_CPP_BASECLASS)
+ {
+! // only look, whether there is a cpp base class
+! // declaration or initialization before the opening brace.
+ if (cin_isterminated(l, TRUE, FALSE))
+ break;
+ else
+ continue;
+ }
+
+! // What happens next depends on the line being terminated.
+! // If terminated with a ',' only consider it terminating if
+! // there is another unterminated statement behind, eg:
+! // 123,
+! // sizeof
+! // here
+! // Otherwise check whether it is a enumeration or structure
+! // initialisation (not indented) or a variable declaration
+! // (indented).
+ terminated = cin_isterminated(l, FALSE, TRUE);
+
+ if (js_cur_has_key)
+ {
+! js_cur_has_key = 0; // only check the first line
+ if (curbuf->b_ind_js && terminated == ',')
+ {
+! // For Javascript we might be inside an object:
+! // key: something, <- align with this
+! // key: something
+! // or:
+! // key: something + <- align with this
+! // something,
+! // key: something
+ lookfor = LOOKFOR_JS_KEY;
+ }
+ }
+***************
+*** 3141,3156 ****
+ >= curwin->w_cursor.lnum)
+ break;
+ if (terminated == ',')
+! /* line below current line is the one that starts a
+! * (possibly broken) line ending in a comma. */
+ break;
+ else
+ {
+ amount = get_indent();
+ if (curwin->w_cursor.lnum - 1 == ourscope)
+! /* line above is start of the scope, thus current
+! * line is the one that stars a (possibly broken)
+! * line ending in a comma. */
+ break;
+ }
+ }
+--- 3040,3055 ----
+ >= curwin->w_cursor.lnum)
+ break;
+ if (terminated == ',')
+! // line below current line is the one that starts a
+! // (possibly broken) line ending in a comma.
+ break;
+ else
+ {
+ amount = get_indent();
+ if (curwin->w_cursor.lnum - 1 == ourscope)
+! // line above is start of the scope, thus current
+! // line is the one that stars a (possibly broken)
+! // line ending in a comma.
+ break;
+ }
+ }
+***************
+*** 3161,3178 ****
+ if (lookfor != LOOKFOR_ENUM_OR_INIT &&
+ (*skipwhite(l) == '[' || l[STRLEN(l) - 1] == '['))
+ amount += ind_continuation;
+! /*
+! * if we're in the middle of a paren thing,
+! * go back to the line that starts it so
+! * we can get the right prevailing indent
+! * if ( foo &&
+! * bar )
+! */
+! /*
+! * Position the cursor over the rightmost paren, so that
+! * matching it will take us back to the start of the line.
+! * Ignore a match before the start of the block.
+! */
+ (void)find_last_paren(l, '(', ')');
+ trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
+ if (trypos != NULL && (trypos->lnum < tryposBrace->lnum
+--- 3060,3074 ----
+ if (lookfor != LOOKFOR_ENUM_OR_INIT &&
+ (*skipwhite(l) == '[' || l[STRLEN(l) - 1] == '['))
+ amount += ind_continuation;
+! // if we're in the middle of a paren thing,
+! // go back to the line that starts it so
+! // we can get the right prevailing indent
+! // if ( foo &&
+! // bar )
+!
+! // Position the cursor over the rightmost paren, so that
+! // matching it will take us back to the start of the line.
+! // Ignore a match before the start of the block.
+ (void)find_last_paren(l, '(', ')');
+ trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
+ if (trypos != NULL && (trypos->lnum < tryposBrace->lnum
+***************
+*** 3180,3201 ****
+ && trypos->col < tryposBrace->col)))
+ trypos = NULL;
+
+! /*
+! * If we are looking for ',', we also look for matching
+! * braces.
+! */
+ if (trypos == NULL && terminated == ','
+ && find_last_paren(l, '{', '}'))
+ trypos = find_start_brace();
+
+ if (trypos != NULL)
+ {
+! /*
+! * Check if we are on a case label now. This is
+! * handled above.
+! * case xx: if ( asdf &&
+! * asdf)
+! */
+ curwin->w_cursor = *trypos;
+ l = ml_get_curline();
+ if (cin_iscase(l, FALSE) || cin_isscopedecl(l))
+--- 3076,3093 ----
+ && trypos->col < tryposBrace->col)))
+ trypos = NULL;
+
+! // If we are looking for ',', we also look for matching
+! // braces.
+ if (trypos == NULL && terminated == ','
+ && find_last_paren(l, '{', '}'))
+ trypos = find_start_brace();
+
+ if (trypos != NULL)
+ {
+! // Check if we are on a case label now. This is
+! // handled above.
+! // case xx: if ( asdf &&
+! // asdf)
+ curwin->w_cursor = *trypos;
+ l = ml_get_curline();
+ if (cin_iscase(l, FALSE) || cin_isscopedecl(l))
+***************
+*** 3225,3282 ****
+ }
+ }
+
+! /*
+! * Get indent and pointer to text for current line,
+! * ignoring any jump label. XXX
+! */
+ if (curbuf->b_ind_js)
+ cur_amount = get_indent();
+ else
+ cur_amount = skip_label(curwin->w_cursor.lnum, &l);
+! /*
+! * If this is just above the line we are indenting, and it
+! * starts with a '{', line it up with this line.
+! * while (not)
+! * -> {
+! * }
+! */
+ if (terminated != ',' && lookfor != LOOKFOR_TERM
+ && theline[0] == '{')
+ {
+ amount = cur_amount;
+! /*
+! * Only add b_ind_open_extra when the current line
+! * doesn't start with a '{', which must have a match
+! * in the same line (scope is the same). Probably:
+! * { 1, 2 },
+! * -> { 3, 4 }
+! */
+ if (*skipwhite(l) != '{')
+ amount += curbuf->b_ind_open_extra;
+
+ if (curbuf->b_ind_cpp_baseclass && !curbuf->b_ind_js)
+ {
+! /* have to look back, whether it is a cpp base
+! * class declaration or initialization */
+ lookfor = LOOKFOR_CPP_BASECLASS;
+ continue;
+ }
+ break;
+ }
+
+! /*
+! * Check if we are after an "if", "while", etc.
+! * Also allow " } else".
+! */
+ if (cin_is_cinword(l) || cin_iselse(skipwhite(l)))
+ {
+! /*
+! * Found an unterminated line after an if (), line up
+! * with the last one.
+! * if (cond)
+! * 100 +
+! * -> here;
+! */
+ if (lookfor == LOOKFOR_UNTERM
+ || lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+--- 3117,3164 ----
+ }
+ }
+
+! // Get indent and pointer to text for current line,
+! // ignoring any jump label. XXX
+ if (curbuf->b_ind_js)
+ cur_amount = get_indent();
+ else
+ cur_amount = skip_label(curwin->w_cursor.lnum, &l);
+! // If this is just above the line we are indenting, and it
+! // starts with a '{', line it up with this line.
+! // while (not)
+! // -> {
+! // }
+ if (terminated != ',' && lookfor != LOOKFOR_TERM
+ && theline[0] == '{')
+ {
+ amount = cur_amount;
+! // Only add b_ind_open_extra when the current line
+! // doesn't start with a '{', which must have a match
+! // in the same line (scope is the same). Probably:
+! // { 1, 2 },
+! // -> { 3, 4 }
+ if (*skipwhite(l) != '{')
+ amount += curbuf->b_ind_open_extra;
+
+ if (curbuf->b_ind_cpp_baseclass && !curbuf->b_ind_js)
+ {
+! // have to look back, whether it is a cpp base
+! // class declaration or initialization
+ lookfor = LOOKFOR_CPP_BASECLASS;
+ continue;
+ }
+ break;
+ }
+
+! // Check if we are after an "if", "while", etc.
+! // Also allow " } else".
+ if (cin_is_cinword(l) || cin_iselse(skipwhite(l)))
+ {
+! // Found an unterminated line after an if (), line up
+! // with the last one.
+! // if (cond)
+! // 100 +
+! // -> here;
+ if (lookfor == LOOKFOR_UNTERM
+ || lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+***************
+*** 3287,3305 ****
+ break;
+ }
+
+! /*
+! * If this is just above the line we are indenting, we
+! * are finished.
+! * while (not)
+! * -> here;
+! * Otherwise this indent can be used when the line
+! * before this is terminated.
+! * yyy;
+! * if (stat)
+! * while (not)
+! * xxx;
+! * -> here;
+! */
+ amount = cur_amount;
+ if (theline[0] == '{')
+ amount += curbuf->b_ind_open_extra;
+--- 3169,3185 ----
+ break;
+ }
+
+! // If this is just above the line we are indenting, we
+! // are finished.
+! // while (not)
+! // -> here;
+! // Otherwise this indent can be used when the line
+! // before this is terminated.
+! // yyy;
+! // if (stat)
+! // while (not)
+! // xxx;
+! // -> here;
+ amount = cur_amount;
+ if (theline[0] == '{')
+ amount += curbuf->b_ind_open_extra;
+***************
+*** 3310,3322 ****
+ break;
+ }
+
+! /*
+! * Special trick: when expecting the while () after a
+! * do, line up with the while()
+! * do
+! * x = 1;
+! * -> here
+! */
+ l = skipwhite(ml_get_curline());
+ if (cin_isdo(l))
+ {
+--- 3190,3200 ----
+ break;
+ }
+
+! // Special trick: when expecting the while () after a
+! // do, line up with the while()
+! // do
+! // x = 1;
+! // -> here
+ l = skipwhite(ml_get_curline());
+ if (cin_isdo(l))
+ {
+***************
+*** 3325,3341 ****
+ --whilelevel;
+ }
+
+! /*
+! * When searching for a terminated line, don't use the
+! * one between the "if" and the matching "else".
+! * Need to use the scope of this "else". XXX
+! * If whilelevel != 0 continue looking for a "do {".
+! */
+ if (cin_iselse(l) && whilelevel == 0)
+ {
+! /* If we're looking at "} else", let's make sure we
+! * find the opening brace of the enclosing scope,
+! * not the one from "if () {". */
+ if (*l == '}')
+ curwin->w_cursor.col =
+ (colnr_T)(l - ml_get_curline()) + 1;
+--- 3203,3217 ----
+ --whilelevel;
+ }
+
+! // When searching for a terminated line, don't use the
+! // one between the "if" and the matching "else".
+! // Need to use the scope of this "else". XXX
+! // If whilelevel != 0 continue looking for a "do {".
+ if (cin_iselse(l) && whilelevel == 0)
+ {
+! // If we're looking at "} else", let's make sure we
+! // find the opening brace of the enclosing scope,
+! // not the one from "if () {".
+ if (*l == '}')
+ curwin->w_cursor.col =
+ (colnr_T)(l - ml_get_curline()) + 1;
+***************
+*** 3347,3370 ****
+ }
+ }
+
+! /*
+! * If we're below an unterminated line that is not an
+! * "if" or something, we may line up with this line or
+! * add something for a continuation line, depending on
+! * the line before this one.
+! */
+ else
+ {
+! /*
+! * Found two unterminated lines on a row, line up with
+! * the last one.
+! * c = 99 +
+! * 100 +
+! * -> here;
+! */
+ if (lookfor == LOOKFOR_UNTERM)
+ {
+! /* When line ends in a comma add extra indent */
+ if (terminated == ',')
+ amount += ind_continuation;
+ break;
+--- 3223,3242 ----
+ }
+ }
+
+! // If we're below an unterminated line that is not an
+! // "if" or something, we may line up with this line or
+! // add something for a continuation line, depending on
+! // the line before this one.
+ else
+ {
+! // Found two unterminated lines on a row, line up with
+! // the last one.
+! // c = 99 +
+! // 100 +
+! // -> here;
+ if (lookfor == LOOKFOR_UNTERM)
+ {
+! // When line ends in a comma add extra indent
+ if (terminated == ',')
+ amount += ind_continuation;
+ break;
+***************
+*** 3372,3382 ****
+
+ if (lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+! /* Found two lines ending in ',', lineup with the
+! * lowest one, but check for cpp base class
+! * declaration/initialization, if it is an
+! * opening brace or we are looking just for
+! * enumerations/initializations. */
+ if (terminated == ',')
+ {
+ if (curbuf->b_ind_cpp_baseclass == 0)
+--- 3244,3254 ----
+
+ if (lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+! // Found two lines ending in ',', lineup with the
+! // lowest one, but check for cpp base class
+! // declaration/initialization, if it is an
+! // opening brace or we are looking just for
+! // enumerations/initializations.
+ if (terminated == ',')
+ {
+ if (curbuf->b_ind_cpp_baseclass == 0)
+***************
+*** 3386,3404 ****
+ continue;
+ }
+
+! /* Ignore unterminated lines in between, but
+! * reduce indent. */
+ if (amount > cur_amount)
+ amount = cur_amount;
+ }
+ else
+ {
+! /*
+! * Found first unterminated line on a row, may
+! * line up with this line, remember its indent
+! * 100 +
+! * -> here;
+! */
+ l = ml_get_curline();
+ amount = cur_amount;
+
+--- 3258,3274 ----
+ continue;
+ }
+
+! // Ignore unterminated lines in between, but
+! // reduce indent.
+ if (amount > cur_amount)
+ amount = cur_amount;
+ }
+ else
+ {
+! // Found first unterminated line on a row, may
+! // line up with this line, remember its indent
+! // 100 +
+! // -> here;
+ l = ml_get_curline();
+ amount = cur_amount;
+
+***************
+*** 3407,3439 ****
+ || (n >=2 && l[n - 2] == ']')))
+ break;
+
+! /*
+! * If previous line ends in ',', check whether we
+! * are in an initialization or enum
+! * struct xxx =
+! * {
+! * sizeof a,
+! * 124 };
+! * or a normal possible continuation line.
+! * but only, of no other statement has been found
+! * yet.
+! */
+ if (lookfor == LOOKFOR_INITIAL && terminated == ',')
+ {
+ if (curbuf->b_ind_js)
+ {
+! /* Search for a line ending in a comma
+! * and line up with the line below it
+! * (could be the current line).
+! * some = [
+! * 1, <- line up here
+! * 2,
+! * some = [
+! * 3 + <- line up here
+! * 4 *
+! * 5,
+! * 6,
+! */
+ if (cin_iscomment(skipwhite(l)))
+ break;
+ lookfor = LOOKFOR_COMMA;
+--- 3277,3306 ----
+ || (n >=2 && l[n - 2] == ']')))
+ break;
+
+! // If previous line ends in ',', check whether we
+! // are in an initialization or enum
+! // struct xxx =
+! // {
+! // sizeof a,
+! // 124 };
+! // or a normal possible continuation line.
+! // but only, of no other statement has been found
+! // yet.
+ if (lookfor == LOOKFOR_INITIAL && terminated == ',')
+ {
+ if (curbuf->b_ind_js)
+ {
+! // Search for a line ending in a comma
+! // and line up with the line below it
+! // (could be the current line).
+! // some = [
+! // 1, <- line up here
+! // 2,
+! // some = [
+! // 3 + <- line up here
+! // 4 *
+! // 5,
+! // 6,
+ if (cin_iscomment(skipwhite(l)))
+ break;
+ lookfor = LOOKFOR_COMMA;
+***************
+*** 3444,3451 ****
+ if (trypos->lnum
+ == curwin->w_cursor.lnum - 1)
+ {
+! /* Current line is first inside
+! * [], line up with it. */
+ break;
+ }
+ ourscope = trypos->lnum;
+--- 3311,3318 ----
+ if (trypos->lnum
+ == curwin->w_cursor.lnum - 1)
+ {
+! // Current line is first inside
+! // [], line up with it.
+ break;
+ }
+ ourscope = trypos->lnum;
+***************
+*** 3462,3468 ****
+ if (lookfor == LOOKFOR_INITIAL
+ && *l != NUL
+ && l[STRLEN(l) - 1] == '\\')
+! /* XXX */
+ cont_amount = cin_get_equal_amount(
+ curwin->w_cursor.lnum);
+ if (lookfor != LOOKFOR_TERM
+--- 3329,3335 ----
+ if (lookfor == LOOKFOR_INITIAL
+ && *l != NUL
+ && l[STRLEN(l) - 1] == '\\')
+! // XXX
+ cont_amount = cin_get_equal_amount(
+ curwin->w_cursor.lnum);
+ if (lookfor != LOOKFOR_TERM
+***************
+*** 3475,3493 ****
+ }
+ }
+
+! /*
+! * Check if we are after a while (cond);
+! * If so: Ignore until the matching "do".
+! */
+! else if (cin_iswhileofdo_end(terminated)) /* XXX */
+ {
+! /*
+! * Found an unterminated line after a while ();, line up
+! * with the last one.
+! * while (cond);
+! * 100 + <- line up with this one
+! * -> here;
+! */
+ if (lookfor == LOOKFOR_UNTERM
+ || lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+--- 3342,3356 ----
+ }
+ }
+
+! // Check if we are after a while (cond);
+! // If so: Ignore until the matching "do".
+! else if (cin_iswhileofdo_end(terminated)) // XXX
+ {
+! // Found an unterminated line after a while ();, line up
+! // with the last one.
+! // while (cond);
+! // 100 + <- line up with this one
+! // -> here;
+ if (lookfor == LOOKFOR_UNTERM
+ || lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+***************
+*** 3501,3526 ****
+ if (whilelevel == 0)
+ {
+ lookfor = LOOKFOR_TERM;
+! amount = get_indent(); /* XXX */
+ if (theline[0] == '{')
+ amount += curbuf->b_ind_open_extra;
+ }
+ ++whilelevel;
+ }
+
+! /*
+! * We are after a "normal" statement.
+! * If we had another statement we can stop now and use the
+! * indent of that other statement.
+! * Otherwise the indent of the current statement may be used,
+! * search backwards for the next "normal" statement.
+! */
+ else
+ {
+! /*
+! * Skip single break line, if before a switch label. It
+! * may be lined up with the case label.
+! */
+ if (lookfor == LOOKFOR_NOBREAK
+ && cin_isbreak(skipwhite(ml_get_curline())))
+ {
+--- 3364,3385 ----
+ if (whilelevel == 0)
+ {
+ lookfor = LOOKFOR_TERM;
+! amount = get_indent(); // XXX
+ if (theline[0] == '{')
+ amount += curbuf->b_ind_open_extra;
+ }
+ ++whilelevel;
+ }
+
+! // We are after a "normal" statement.
+! // If we had another statement we can stop now and use the
+! // indent of that other statement.
+! // Otherwise the indent of the current statement may be used,
+! // search backwards for the next "normal" statement.
+ else
+ {
+! // Skip single break line, if before a switch label. It
+! // may be lined up with the case label.
+ if (lookfor == LOOKFOR_NOBREAK
+ && cin_isbreak(skipwhite(ml_get_curline())))
+ {
+***************
+*** 3528,3558 ****
+ continue;
+ }
+
+! /*
+! * Handle "do {" line.
+! */
+ if (whilelevel > 0)
+ {
+ l = cin_skipcomment(ml_get_curline());
+ if (cin_isdo(l))
+ {
+! amount = get_indent(); /* XXX */
+ --whilelevel;
+ continue;
+ }
+ }
+
+! /*
+! * Found a terminated line above an unterminated line. Add
+! * the amount for a continuation line.
+! * x = 1;
+! * y = foo +
+! * -> here;
+! * or
+! * int x = 1;
+! * int foo,
+! * -> here;
+! */
+ if (lookfor == LOOKFOR_UNTERM
+ || lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+--- 3387,3413 ----
+ continue;
+ }
+
+! // Handle "do {" line.
+ if (whilelevel > 0)
+ {
+ l = cin_skipcomment(ml_get_curline());
+ if (cin_isdo(l))
+ {
+! amount = get_indent(); // XXX
+ --whilelevel;
+ continue;
+ }
+ }
+
+! // Found a terminated line above an unterminated line. Add
+! // the amount for a continuation line.
+! // x = 1;
+! // y = foo +
+! // -> here;
+! // or
+! // int x = 1;
+! // int foo,
+! // -> here;
+ if (lookfor == LOOKFOR_UNTERM
+ || lookfor == LOOKFOR_ENUM_OR_INIT)
+ {
+***************
+*** 3563,3610 ****
+ break;
+ }
+
+! /*
+! * Found a terminated line above a terminated line or "if"
+! * etc. line. Use the amount of the line below us.
+! * x = 1; x = 1;
+! * if (asdf) y = 2;
+! * while (asdf) ->here;
+! * here;
+! * ->foo;
+! */
+ if (lookfor == LOOKFOR_TERM)
+ {
+ if (!lookfor_break && whilelevel == 0)
+ break;
+ }
+
+! /*
+! * First line above the one we're indenting is terminated.
+! * To know what needs to be done look further backward for
+! * a terminated line.
+! */
+ else
+ {
+! /*
+! * position the cursor over the rightmost paren, so
+! * that matching it will take us back to the start of
+! * the line. Helps for:
+! * func(asdr,
+! * asdfasdf);
+! * here;
+! */
+ term_again:
+ l = ml_get_curline();
+ if (find_last_paren(l, '(', ')')
+ && (trypos = find_match_paren(
+ curbuf->b_ind_maxparen)) != NULL)
+ {
+! /*
+! * Check if we are on a case label now. This is
+! * handled above.
+! * case xx: if ( asdf &&
+! * asdf)
+! */
+ curwin->w_cursor = *trypos;
+ l = ml_get_curline();
+ if (cin_iscase(l, FALSE) || cin_isscopedecl(l))
+--- 3418,3457 ----
+ break;
+ }
+
+! // Found a terminated line above a terminated line or "if"
+! // etc. line. Use the amount of the line below us.
+! // x = 1; x = 1;
+! // if (asdf) y = 2;
+! // while (asdf) ->here;
+! // here;
+! // ->foo;
+ if (lookfor == LOOKFOR_TERM)
+ {
+ if (!lookfor_break && whilelevel == 0)
+ break;
+ }
+
+! // First line above the one we're indenting is terminated.
+! // To know what needs to be done look further backward for
+! // a terminated line.
+ else
+ {
+! // position the cursor over the rightmost paren, so
+! // that matching it will take us back to the start of
+! // the line. Helps for:
+! // func(asdr,
+! // asdfasdf);
+! // here;
+ term_again:
+ l = ml_get_curline();
+ if (find_last_paren(l, '(', ')')
+ && (trypos = find_match_paren(
+ curbuf->b_ind_maxparen)) != NULL)
+ {
+! // Check if we are on a case label now. This is
+! // handled above.
+! // case xx: if ( asdf &&
+! // asdf)
+ curwin->w_cursor = *trypos;
+ l = ml_get_curline();
+ if (cin_iscase(l, FALSE) || cin_isscopedecl(l))
+***************
+*** 3615,3654 ****
+ }
+ }
+
+! /* When aligning with the case statement, don't align
+! * with a statement after it.
+! * case 1: { <-- don't use this { position
+! * stat;
+! * }
+! * case 2:
+! * stat;
+! * }
+! */
+ iscase = (curbuf->b_ind_keep_case_label
+ && cin_iscase(l, FALSE));
+
+! /*
+! * Get indent and pointer to text for current line,
+! * ignoring any jump label.
+! */
+ amount = skip_label(curwin->w_cursor.lnum, &l);
+
+ if (theline[0] == '{')
+ amount += curbuf->b_ind_open_extra;
+! /* See remark above: "Only add b_ind_open_extra.." */
+ l = skipwhite(l);
+ if (*l == '{')
+ amount -= curbuf->b_ind_open_extra;
+ lookfor = iscase ? LOOKFOR_ANY : LOOKFOR_TERM;
+
+! /*
+! * When a terminated line starts with "else" skip to
+! * the matching "if":
+! * else 3;
+! * indent this;
+! * Need to use the scope of this "else". XXX
+! * If whilelevel != 0 continue looking for a "do {".
+! */
+ if (lookfor == LOOKFOR_TERM
+ && *l != '}'
+ && cin_iselse(l)
+--- 3462,3496 ----
+ }
+ }
+
+! // When aligning with the case statement, don't align
+! // with a statement after it.
+! // case 1: { <-- don't use this { position
+! // stat;
+! // }
+! // case 2:
+! // stat;
+! // }
+ iscase = (curbuf->b_ind_keep_case_label
+ && cin_iscase(l, FALSE));
+
+! // Get indent and pointer to text for current line,
+! // ignoring any jump label.
+ amount = skip_label(curwin->w_cursor.lnum, &l);
+
+ if (theline[0] == '{')
+ amount += curbuf->b_ind_open_extra;
+! // See remark above: "Only add b_ind_open_extra.."
+ l = skipwhite(l);
+ if (*l == '{')
+ amount -= curbuf->b_ind_open_extra;
+ lookfor = iscase ? LOOKFOR_ANY : LOOKFOR_TERM;
+
+! // When a terminated line starts with "else" skip to
+! // the matching "if":
+! // else 3;
+! // indent this;
+! // Need to use the scope of this "else". XXX
+! // If whilelevel != 0 continue looking for a "do {".
+ if (lookfor == LOOKFOR_TERM
+ && *l != '}'
+ && cin_iselse(l)
+***************
+*** 3661,3677 ****
+ continue;
+ }
+
+! /*
+! * If we're at the end of a block, skip to the start of
+! * that block.
+! */
+ l = ml_get_curline();
+! if (find_last_paren(l, '{', '}') /* XXX */
+ && (trypos = find_start_brace()) != NULL)
+ {
+ curwin->w_cursor = *trypos;
+! /* if not "else {" check for terminated again */
+! /* but skip block for "} else {" */
+ l = cin_skipcomment(ml_get_curline());
+ if (*l == '}' || !cin_iselse(l))
+ goto term_again;
+--- 3503,3517 ----
+ continue;
+ }
+
+! // If we're at the end of a block, skip to the start of
+! // that block.
+ l = ml_get_curline();
+! if (find_last_paren(l, '{', '}') // XXX
+ && (trypos = find_start_brace()) != NULL)
+ {
+ curwin->w_cursor = *trypos;
+! // if not "else {" check for terminated again
+! // but skip block for "} else {"
+ l = cin_skipcomment(ml_get_curline());
+ if (*l == '}' || !cin_iselse(l))
+ goto term_again;
+***************
+*** 3684,3712 ****
+ }
+ }
+
+! /* add extra indent for a comment */
+ if (cin_iscomment(theline))
+ amount += curbuf->b_ind_comment;
+
+! /* subtract extra left-shift for jump labels */
+ if (curbuf->b_ind_jump_label > 0 && original_line_islabel)
+ amount -= curbuf->b_ind_jump_label;
+
+ goto theend;
+ }
+
+! /*
+! * ok -- we're not inside any sort of structure at all!
+! *
+! * This means we're at the top level, and everything should
+! * basically just match where the previous line is, except
+! * for the lines immediately following a function declaration,
+! * which are K&R-style parameters and need to be indented.
+! *
+! * if our line starts with an open brace, forget about any
+! * prevailing indent and make sure it looks like the start
+! * of a function
+! */
+
+ if (theline[0] == '{')
+ {
+--- 3524,3550 ----
+ }
+ }
+
+! // add extra indent for a comment
+ if (cin_iscomment(theline))
+ amount += curbuf->b_ind_comment;
+
+! // subtract extra left-shift for jump labels
+ if (curbuf->b_ind_jump_label > 0 && original_line_islabel)
+ amount -= curbuf->b_ind_jump_label;
+
+ goto theend;
+ }
+
+! // ok -- we're not inside any sort of structure at all!
+! //
+! // This means we're at the top level, and everything should
+! // basically just match where the previous line is, except
+! // for the lines immediately following a function declaration,
+! // which are K&R-style parameters and need to be indented.
+! //
+! // if our line starts with an open brace, forget about any
+! // prevailing indent and make sure it looks like the start
+! // of a function
+
+ if (theline[0] == '{')
+ {
+***************
+*** 3714,3726 ****
+ goto theend;
+ }
+
+! /*
+! * If the NEXT line is a function declaration, the current
+! * line needs to be indented as a function type spec.
+! * Don't do this if the current line looks like a comment or if the
+! * current line is terminated, ie. ends in ';', or if the current line
+! * contains { or }: "void f() {\n if (1)"
+! */
+ if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
+ && !cin_nocode(theline)
+ && vim_strchr(theline, '{') == NULL
+--- 3552,3562 ----
+ goto theend;
+ }
+
+! // If the NEXT line is a function declaration, the current
+! // line needs to be indented as a function type spec.
+! // Don't do this if the current line looks like a comment or if the
+! // current line is terminated, ie. ends in ';', or if the current line
+! // contains { or }: "void f() {\n if (1)"
+ if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
+ && !cin_nocode(theline)
+ && vim_strchr(theline, '{') == NULL
+***************
+*** 3735,3741 ****
+ goto theend;
+ }
+
+! /* search backwards until we find something we recognize */
+ amount = 0;
+ curwin->w_cursor = cur_curpos;
+ while (curwin->w_cursor.lnum > 1)
+--- 3571,3577 ----
+ goto theend;
+ }
+
+! // search backwards until we find something we recognize
+ amount = 0;
+ curwin->w_cursor = cur_curpos;
+ while (curwin->w_cursor.lnum > 1)
+***************
+*** 3745,3754 ****
+
+ l = ml_get_curline();
+
+! /*
+! * If we're in a comment or raw string now, skip to the start
+! * of it.
+! */ /* XXX */
+ if ((trypos = ind_find_start_CORS(NULL)) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+--- 3581,3588 ----
+
+ l = ml_get_curline();
+
+! // If we're in a comment or raw string now, skip to the start
+! // of it. XXX
+ if ((trypos = ind_find_start_CORS(NULL)) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+***************
+*** 3756,3765 ****
+ continue;
+ }
+
+! /*
+! * Are we at the start of a cpp base class declaration or
+! * constructor initialization?
+! */ /* XXX */
+ n = FALSE;
+ if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{')
+ {
+--- 3590,3597 ----
+ continue;
+ }
+
+! // Are we at the start of a cpp base class declaration or
+! // constructor initialization? XXX
+ n = FALSE;
+ if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{')
+ {
+***************
+*** 3768,3810 ****
+ }
+ if (n)
+ {
+! /* XXX */
+ amount = get_baseclass_amount(cache_cpp_baseclass.lpos.col);
+ break;
+ }
+
+! /*
+! * Skip preprocessor directives and blank lines.
+! */
+ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount))
+ continue;
+
+ if (cin_nocode(l))
+ continue;
+
+! /*
+! * If the previous line ends in ',', use one level of
+! * indentation:
+! * int foo,
+! * bar;
+! * do this before checking for '}' in case of eg.
+! * enum foobar
+! * {
+! * ...
+! * } foo,
+! * bar;
+! */
+ n = 0;
+ if (cin_ends_in(l, (char_u *)",", NULL)
+ || (*l != NUL && (n = l[STRLEN(l) - 1]) == '\\'))
+ {
+! /* take us back to opening paren */
+ if (find_last_paren(l, '(', ')')
+ && (trypos = find_match_paren(
+ curbuf->b_ind_maxparen)) != NULL)
+ curwin->w_cursor = *trypos;
+
+! /* For a line ending in ',' that is a continuation line go
+ * back to the first line with a backslash:
+ * char *foo = "bla\
+ * bla",
+--- 3600,3639 ----
+ }
+ if (n)
+ {
+! // XXX
+ amount = get_baseclass_amount(cache_cpp_baseclass.lpos.col);
+ break;
+ }
+
+! // Skip preprocessor directives and blank lines.
+ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount))
+ continue;
+
+ if (cin_nocode(l))
+ continue;
+
+! // If the previous line ends in ',', use one level of
+! // indentation:
+! // int foo,
+! // bar;
+! // do this before checking for '}' in case of eg.
+! // enum foobar
+! // {
+! // ...
+! // } foo,
+! // bar;
+ n = 0;
+ if (cin_ends_in(l, (char_u *)",", NULL)
+ || (*l != NUL && (n = l[STRLEN(l) - 1]) == '\\'))
+ {
+! // take us back to opening paren
+ if (find_last_paren(l, '(', ')')
+ && (trypos = find_match_paren(
+ curbuf->b_ind_maxparen)) != NULL)
+ curwin->w_cursor = *trypos;
+
+! /*
+! * For a line ending in ',' that is a continuation line go
+ * back to the first line with a backslash:
+ * char *foo = "bla\
+ * bla",
+***************
+*** 3819,3825 ****
+ curwin->w_cursor.col = 0;
+ }
+
+! amount = get_indent(); /* XXX */
+
+ if (amount == 0)
+ amount = cin_first_id_amount();
+--- 3648,3654 ----
+ curwin->w_cursor.col = 0;
+ }
+
+! amount = get_indent(); // XXX
+
+ if (amount == 0)
+ amount = cin_first_id_amount();
+***************
+*** 3828,3874 ****
+ break;
+ }
+
+! /*
+! * If the line looks like a function declaration, and we're
+! * not in a comment, put it the left margin.
+! */
+! if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0)) /* XXX */
+ break;
+ l = ml_get_curline();
+
+! /*
+! * Finding the closing '}' of a previous function. Put
+! * current line at the left margin. For when 'cino' has "fs".
+! */
+ if (*skipwhite(l) == '}')
+ break;
+
+! /* (matching {)
+! * If the previous line ends on '};' (maybe followed by
+! * comments) align at column 0. For example:
+! * char *string_array[] = { "foo",
+! * / * x * / "b};ar" }; / * foobar * /
+! */
+ if (cin_ends_in(l, (char_u *)"};", NULL))
+ break;
+
+! /*
+! * If the previous line ends on '[' we are probably in an
+! * array constant:
+! * something = [
+! * 234, <- extra indent
+! */
+ if (cin_ends_in(l, (char_u *)"[", NULL))
+ {
+ amount = get_indent() + ind_continuation;
+ break;
+ }
+
+! /*
+! * Find a line only has a semicolon that belongs to a previous
+! * line ending in '}', e.g. before an #endif. Don't increase
+! * indent then.
+! */
+ if (*(look = skipwhite(l)) == ';' && cin_nocode(look + 1))
+ {
+ pos_T curpos_save = curwin->w_cursor;
+--- 3657,3694 ----
+ break;
+ }
+
+! // If the line looks like a function declaration, and we're
+! // not in a comment, put it the left margin.
+! if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0)) // XXX
+ break;
+ l = ml_get_curline();
+
+! // Finding the closing '}' of a previous function. Put
+! // current line at the left margin. For when 'cino' has "fs".
+ if (*skipwhite(l) == '}')
+ break;
+
+! // (matching {)
+! // If the previous line ends on '};' (maybe followed by
+! // comments) align at column 0. For example:
+! // char *string_array[] = { "foo",
+! // / * x * / "b};ar" }; / * foobar * /
+ if (cin_ends_in(l, (char_u *)"};", NULL))
+ break;
+
+! // If the previous line ends on '[' we are probably in an
+! // array constant:
+! // something = [
+! // 234, <- extra indent
+ if (cin_ends_in(l, (char_u *)"[", NULL))
+ {
+ amount = get_indent() + ind_continuation;
+ break;
+ }
+
+! // Find a line only has a semicolon that belongs to a previous
+! // line ending in '}', e.g. before an #endif. Don't increase
+! // indent then.
+ if (*(look = skipwhite(l)) == ';' && cin_nocode(look + 1))
+ {
+ pos_T curpos_save = curwin->w_cursor;
+***************
+*** 3887,3910 ****
+ curwin->w_cursor = curpos_save;
+ }
+
+! /*
+! * If the PREVIOUS line is a function declaration, the current
+! * line (and the ones that follow) needs to be indented as
+! * parameters.
+! */
+ if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
+ {
+ amount = curbuf->b_ind_param;
+ break;
+ }
+
+! /*
+! * If the previous line ends in ';' and the line before the
+! * previous line ends in ',' or '\', ident to column zero:
+! * int foo,
+! * bar;
+! * indent_to_0 here;
+! */
+ if (cin_ends_in(l, (char_u *)";", NULL))
+ {
+ l = ml_get(curwin->w_cursor.lnum - 1);
+--- 3707,3726 ----
+ curwin->w_cursor = curpos_save;
+ }
+
+! // If the PREVIOUS line is a function declaration, the current
+! // line (and the ones that follow) needs to be indented as
+! // parameters.
+ if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
+ {
+ amount = curbuf->b_ind_param;
+ break;
+ }
+
+! // If the previous line ends in ';' and the line before the
+! // previous line ends in ',' or '\', ident to column zero:
+! // int foo,
+! // bar;
+! // indent_to_0 here;
+ if (cin_ends_in(l, (char_u *)";", NULL))
+ {
+ l = ml_get(curwin->w_cursor.lnum - 1);
+***************
+*** 3914,3939 ****
+ l = ml_get_curline();
+ }
+
+! /*
+! * Doesn't look like anything interesting -- so just
+! * use the indent of this line.
+! *
+! * Position the cursor over the rightmost paren, so that
+! * matching it will take us back to the start of the line.
+! */
+ find_last_paren(l, '(', ')');
+
+ if ((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
+ curwin->w_cursor = *trypos;
+! amount = get_indent(); /* XXX */
+ break;
+ }
+
+! /* add extra indent for a comment */
+ if (cin_iscomment(theline))
+ amount += curbuf->b_ind_comment;
+
+! /* add extra indent if the previous line ended in a backslash:
+ * "asdfasdf\
+ * here";
+ * char *foo = "asdf\
+--- 3730,3754 ----
+ l = ml_get_curline();
+ }
+
+! // Doesn't look like anything interesting -- so just
+! // use the indent of this line.
+! //
+! // Position the cursor over the rightmost paren, so that
+! // matching it will take us back to the start of the line.
+ find_last_paren(l, '(', ')');
+
+ if ((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
+ curwin->w_cursor = *trypos;
+! amount = get_indent(); // XXX
+ break;
+ }
+
+! // add extra indent for a comment
+ if (cin_iscomment(theline))
+ amount += curbuf->b_ind_comment;
+
+! /*
+! * add extra indent if the previous line ended in a backslash:
+ * "asdfasdf\
+ * here";
+ * char *foo = "asdf\
+***************
+*** 3957,3963 ****
+ amount = 0;
+
+ laterend:
+! /* put the cursor back where it belongs */
+ curwin->w_cursor = cur_curpos;
+
+ vim_free(linecopy);
+--- 3772,3778 ----
+ amount = 0;
+
+ laterend:
+! // put the cursor back where it belongs
+ curwin->w_cursor = cur_curpos;
+
+ vim_free(linecopy);
+***************
+*** 3995,4032 ****
+ look = cin_skipcomment(ml_get_curline());
+ if (cin_iselse(look)
+ || cin_isif(look)
+! || cin_isdo(look) /* XXX */
+ || cin_iswhileofdo(look, curwin->w_cursor.lnum))
+ {
+! /*
+! * if we've gone outside the braces entirely,
+! * we must be out of scope...
+! */
+! theirscope = find_start_brace(); /* XXX */
+ if (theirscope == NULL)
+ break;
+
+! /*
+! * and if the brace enclosing this is further
+! * back than the one enclosing the else, we're
+! * out of luck too.
+! */
+ if (theirscope->lnum < ourscope)
+ break;
+
+! /*
+! * and if they're enclosed in a *deeper* brace,
+! * then we can ignore it because it's in a
+! * different scope...
+! */
+ if (theirscope->lnum > ourscope)
+ continue;
+
+! /*
+! * if it was an "else" (that's not an "else if")
+! * then we need to go back to another if, so
+! * increment elselevel
+! */
+ look = cin_skipcomment(ml_get_curline());
+ if (cin_iselse(look))
+ {
+--- 3810,3839 ----
+ look = cin_skipcomment(ml_get_curline());
+ if (cin_iselse(look)
+ || cin_isif(look)
+! || cin_isdo(look) // XXX
+ || cin_iswhileofdo(look, curwin->w_cursor.lnum))
+ {
+! // if we've gone outside the braces entirely,
+! // we must be out of scope...
+! theirscope = find_start_brace(); // XXX
+ if (theirscope == NULL)
+ break;
+
+! // and if the brace enclosing this is further
+! // back than the one enclosing the else, we're
+! // out of luck too.
+ if (theirscope->lnum < ourscope)
+ break;
+
+! // and if they're enclosed in a *deeper* brace,
+! // then we can ignore it because it's in a
+! // different scope...
+ if (theirscope->lnum > ourscope)
+ continue;
+
+! // if it was an "else" (that's not an "else if")
+! // then we need to go back to another if, so
+! // increment elselevel
+ look = cin_skipcomment(ml_get_curline());
+ if (cin_iselse(look))
+ {
+***************
+*** 4036,4073 ****
+ continue;
+ }
+
+! /*
+! * if it was a "while" then we need to go back to
+! * another "do", so increment whilelevel. XXX
+! */
+ if (cin_iswhileofdo(look, curwin->w_cursor.lnum))
+ {
+ ++whilelevel;
+ continue;
+ }
+
+! /* If it's an "if" decrement elselevel */
+ look = cin_skipcomment(ml_get_curline());
+ if (cin_isif(look))
+ {
+ elselevel--;
+! /*
+! * When looking for an "if" ignore "while"s that
+! * get in the way.
+! */
+ if (elselevel == 0 && lookfor == LOOKFOR_IF)
+ whilelevel = 0;
+ }
+
+! /* If it's a "do" decrement whilelevel */
+ if (cin_isdo(look))
+ whilelevel--;
+
+! /*
+! * if we've used up all the elses, then
+! * this must be the if that we want!
+! * match the indent level of that if.
+! */
+ if (elselevel <= 0 && whilelevel <= 0)
+ {
+ return OK;
+--- 3843,3874 ----
+ continue;
+ }
+
+! // if it was a "while" then we need to go back to
+! // another "do", so increment whilelevel. XXX
+ if (cin_iswhileofdo(look, curwin->w_cursor.lnum))
+ {
+ ++whilelevel;
+ continue;
+ }
+
+! // If it's an "if" decrement elselevel
+ look = cin_skipcomment(ml_get_curline());
+ if (cin_isif(look))
+ {
+ elselevel--;
+! // When looking for an "if" ignore "while"s that
+! // get in the way.
+ if (elselevel == 0 && lookfor == LOOKFOR_IF)
+ whilelevel = 0;
+ }
+
+! // If it's a "do" decrement whilelevel
+ if (cin_isdo(look))
+ whilelevel--;
+
+! // if we've used up all the elses, then
+! // this must be the if that we want!
+! // match the indent level of that if.
+ if (elselevel <= 0 && whilelevel <= 0)
+ {
+ return OK;
+***************
+*** 4093,4100 ****
+ int use_sandbox = was_set_insecurely((char_u *)"indentexpr",
+ OPT_LOCAL);
+
+! /* Save and restore cursor position and curswant, in case it was changed
+! * via :normal commands */
+ save_pos = curwin->w_cursor;
+ save_curswant = curwin->w_curswant;
+ save_set_curswant = curwin->w_set_curswant;
+--- 3894,3901 ----
+ int use_sandbox = was_set_insecurely((char_u *)"indentexpr",
+ OPT_LOCAL);
+
+! // Save and restore cursor position and curswant, in case it was changed
+! // via :normal commands
+ save_pos = curwin->w_cursor;
+ save_curswant = curwin->w_curswant;
+ save_set_curswant = curwin->w_set_curswant;
+***************
+*** 4103,4110 ****
+ ++sandbox;
+ ++textlock;
+
+! /* Need to make a copy, the 'indentexpr' option could be changed while
+! * evaluating it. */
+ inde_copy = vim_strsave(curbuf->b_p_inde);
+ if (inde_copy != NULL)
+ {
+--- 3904,3911 ----
+ ++sandbox;
+ ++textlock;
+
+! // Need to make a copy, the 'indentexpr' option could be changed while
+! // evaluating it.
+ inde_copy = vim_strsave(curbuf->b_p_inde);
+ if (inde_copy != NULL)
+ {
+***************
+*** 4116,4124 ****
+ --sandbox;
+ --textlock;
+
+! /* Restore the cursor position so that 'indentexpr' doesn't need to.
+! * Pretend to be in Insert mode, allow cursor past end of line for "o"
+! * command. */
+ save_State = State;
+ State = INSERT;
+ curwin->w_cursor = save_pos;
+--- 3917,3925 ----
+ --sandbox;
+ --textlock;
+
+! // Restore the cursor position so that 'indentexpr' doesn't need to.
+! // Pretend to be in Insert mode, allow cursor past end of line for "o"
+! // command.
+ save_State = State;
+ State = INSERT;
+ curwin->w_cursor = save_pos;
+***************
+*** 4127,4133 ****
+ check_cursor();
+ State = save_State;
+
+! /* If there is an error, just keep the current indent. */
+ if (indent < 0)
+ indent = get_indent();
+
+--- 3928,3934 ----
+ check_cursor();
+ State = save_State;
+
+! // If there is an error, just keep the current indent.
+ if (indent < 0)
+ indent = get_indent();
+
+***************
+*** 4163,4183 ****
+ int i;
+
+ if (keytyped == NUL)
+! /* Can happen with CTRL-Y and CTRL-E on a short line. */
+ return FALSE;
+
+ #ifdef FEAT_EVAL
+ if (*curbuf->b_p_inde != NUL)
+! look = curbuf->b_p_indk; /* 'indentexpr' set: use 'indentkeys' */
+ else
+ #endif
+! look = curbuf->b_p_cink; /* 'indentexpr' empty: use 'cinkeys' */
+ while (*look)
+ {
+! /*
+! * Find out if we want to try a match with this key, depending on
+! * 'when' and a '*' or '!' before the key.
+! */
+ switch (when)
+ {
+ case '*': try_match = (*look == '*'); break;
+--- 3964,3982 ----
+ int i;
+
+ if (keytyped == NUL)
+! // Can happen with CTRL-Y and CTRL-E on a short line.
+ return FALSE;
+
+ #ifdef FEAT_EVAL
+ if (*curbuf->b_p_inde != NUL)
+! look = curbuf->b_p_indk; // 'indentexpr' set: use 'indentkeys'
+ else
+ #endif
+! look = curbuf->b_p_cink; // 'indentexpr' empty: use 'cinkeys'
+ while (*look)
+ {
+! // Find out if we want to try a match with this key, depending on
+! // 'when' and a '*' or '!' before the key.
+ switch (when)
+ {
+ case '*': try_match = (*look == '*'); break;
+***************
+*** 4187,4196 ****
+ if (*look == '*' || *look == '!')
+ ++look;
+
+! /*
+! * If there is a '0', only accept a match if the line is empty.
+! * But may still match when typing last char of a word.
+! */
+ if (*look == '0')
+ {
+ try_match_word = try_match;
+--- 3986,3993 ----
+ if (*look == '*' || *look == '!')
+ ++look;
+
+! // If there is a '0', only accept a match if the line is empty.
+! // But may still match when typing last char of a word.
+ if (*look == '0')
+ {
+ try_match_word = try_match;
+***************
+*** 4201,4209 ****
+ else
+ try_match_word = FALSE;
+
+! /*
+! * does it look like a control character?
+! */
+ if (*look == '^'
+ #ifdef EBCDIC
+ && (Ctrl_chr(look[1]) != 0)
+--- 3998,4004 ----
+ else
+ try_match_word = FALSE;
+
+! // does it look like a control character?
+ if (*look == '^'
+ #ifdef EBCDIC
+ && (Ctrl_chr(look[1]) != 0)
+***************
+*** 4216,4225 ****
+ return TRUE;
+ look += 2;
+ }
+! /*
+! * 'o' means "o" command, open forward.
+! * 'O' means "O" command, open backward.
+! */
+ else if (*look == 'o')
+ {
+ if (try_match && keytyped == KEY_OPEN_FORW)
+--- 4011,4018 ----
+ return TRUE;
+ look += 2;
+ }
+! // 'o' means "o" command, open forward.
+! // 'O' means "O" command, open backward.
+ else if (*look == 'o')
+ {
+ if (try_match && keytyped == KEY_OPEN_FORW)
+***************
+*** 4233,4242 ****
+ ++look;
+ }
+
+! /*
+! * 'e' means to check for "else" at start of line and just before the
+! * cursor.
+! */
+ else if (*look == 'e')
+ {
+ if (try_match && keytyped == 'e' && curwin->w_cursor.col >= 4)
+--- 4026,4033 ----
+ ++look;
+ }
+
+! // 'e' means to check for "else" at start of line and just before the
+! // cursor.
+ else if (*look == 'e')
+ {
+ if (try_match && keytyped == 'e' && curwin->w_cursor.col >= 4)
+***************
+*** 4249,4259 ****
+ ++look;
+ }
+
+! /*
+! * ':' only causes an indent if it is at the end of a label or case
+! * statement, or when it was before typing the ':' (to fix
+! * class::method for C++).
+! */
+ else if (*look == ':')
+ {
+ if (try_match && keytyped == ':')
+--- 4040,4048 ----
+ ++look;
+ }
+
+! // ':' only causes an indent if it is at the end of a label or case
+! // statement, or when it was before typing the ':' (to fix
+! // class::method for C++).
+ else if (*look == ':')
+ {
+ if (try_match && keytyped == ':')
+***************
+*** 4261,4267 ****
+ p = ml_get_curline();
+ if (cin_iscase(p, FALSE) || cin_isscopedecl(p) || cin_islabel())
+ return TRUE;
+! /* Need to get the line again after cin_islabel(). */
+ p = ml_get_curline();
+ if (curwin->w_cursor.col > 2
+ && p[curwin->w_cursor.col - 1] == ':'
+--- 4050,4056 ----
+ p = ml_get_curline();
+ if (cin_iscase(p, FALSE) || cin_isscopedecl(p) || cin_islabel())
+ return TRUE;
+! // Need to get the line again after cin_islabel().
+ p = ml_get_curline();
+ if (curwin->w_cursor.col > 2
+ && p[curwin->w_cursor.col - 1] == ':'
+***************
+*** 4280,4297 ****
+ }
+
+
+! /*
+! * Is it a key in <>, maybe?
+! */
+ else if (*look == '<')
+ {
+ if (try_match)
+ {
+! /*
+! * make up some named keys <o>, <O>, <e>, <0>, <>>, <<>, <*>,
+! * <:> and <!> so that people can re-indent on o, O, e, 0, <,
+! * >, *, : and ! keys if they really really want to.
+! */
+ if (vim_strchr((char_u *)"<>!*oOe0:", look[1]) != NULL
+ && keytyped == look[1])
+ return TRUE;
+--- 4069,4082 ----
+ }
+
+
+! // Is it a key in <>, maybe?
+ else if (*look == '<')
+ {
+ if (try_match)
+ {
+! // make up some named keys <o>, <O>, <e>, <0>, <>>, <<>, <*>,
+! // <:> and <!> so that people can re-indent on o, O, e, 0, <,
+! // >, *, : and ! keys if they really really want to.
+ if (vim_strchr((char_u *)"<>!*oOe0:", look[1]) != NULL
+ && keytyped == look[1])
+ return TRUE;
+***************
+*** 4305,4313 ****
+ look++;
+ }
+
+! /*
+! * Is it a word: "=word"?
+! */
+ else if (*look == '=' && look[1] != ',' && look[1] != NUL)
+ {
+ ++look;
+--- 4090,4096 ----
+ look++;
+ }
+
+! // Is it a word: "=word"?
+ else if (*look == '=' && look[1] != ',' && look[1] != NUL)
+ {
+ ++look;
+***************
+*** 4331,4338 ****
+ {
+ char_u *s;
+
+! /* Just completed a word, check if it starts with "look".
+! * search back for the start of a word. */
+ line = ml_get_curline();
+ if (has_mbyte)
+ {
+--- 4114,4121 ----
+ {
+ char_u *s;
+
+! // Just completed a word, check if it starts with "look".
+! // search back for the start of a word.
+ line = ml_get_curline();
+ if (has_mbyte)
+ {
+***************
+*** 4357,4363 ****
+ }
+ else
+ #endif
+! /* TODO: multi-byte */
+ if (keytyped == (int)p[-1] || (icase && keytyped < 256
+ && TOLOWER_LOC(keytyped) == TOLOWER_LOC((int)p[-1])))
+ {
+--- 4140,4146 ----
+ }
+ else
+ #endif
+! // TODO: multi-byte
+ if (keytyped == (int)p[-1] || (icase && keytyped < 256
+ && TOLOWER_LOC(keytyped) == TOLOWER_LOC((int)p[-1])))
+ {
+***************
+*** 4372,4379 ****
+ }
+ if (match && try_match_word && !try_match)
+ {
+! /* "0=word": Check if there are only blanks before the
+! * word. */
+ if (getwhitecols_curline() !=
+ (int)(curwin->w_cursor.col - (p - look)))
+ match = FALSE;
+--- 4155,4162 ----
+ }
+ if (match && try_match_word && !try_match)
+ {
+! // "0=word": Check if there are only blanks before the
+! // word.
+ if (getwhitecols_curline() !=
+ (int)(curwin->w_cursor.col - (p - look)))
+ match = FALSE;
+***************
+*** 4384,4392 ****
+ look = p;
+ }
+
+! /*
+! * ok, it's a boring generic character.
+! */
+ else
+ {
+ if (try_match && *look == keytyped)
+--- 4167,4173 ----
+ look = p;
+ }
+
+! // ok, it's a boring generic character.
+ else
+ {
+ if (try_match && *look == keytyped)
+***************
+*** 4395,4408 ****
+ ++look;
+ }
+
+! /*
+! * Skip over ", ".
+! */
+ look = skip_to_option_part(look);
+ }
+ return FALSE;
+ }
+! #endif /* FEAT_CINDENT */
+
+ #if defined(FEAT_LISP) || defined(PROTO)
+
+--- 4176,4187 ----
+ ++look;
+ }
+
+! // Skip over ", ".
+ look = skip_to_option_part(look);
+ }
+ return FALSE;
+ }
+! #endif // FEAT_CINDENT
+
+ #if defined(FEAT_LISP) || defined(PROTO)
+
+***************
+*** 4450,4456 ****
+ int parencount, quotecount;
+ int vi_lisp;
+
+! /* Set vi_lisp to use the vi-compatible method */
+ vi_lisp = (vim_strchr(p_cpo, CPO_LISP) != NULL);
+
+ realpos = curwin->w_cursor;
+--- 4229,4235 ----
+ int parencount, quotecount;
+ int vi_lisp;
+
+! // Set vi_lisp to use the vi-compatible method
+ vi_lisp = (vim_strchr(p_cpo, CPO_LISP) != NULL);
+
+ realpos = curwin->w_cursor;
+***************
+*** 4467,4474 ****
+ }
+ if (pos != NULL)
+ {
+! /* Extra trick: Take the indent of the first previous non-white
+! * line that is at the same () level. */
+ amount = -1;
+ parencount = 0;
+
+--- 4246,4253 ----
+ }
+ if (pos != NULL)
+ {
+! // Extra trick: Take the indent of the first previous non-white
+! // line that is at the same () level.
+ amount = -1;
+ parencount = 0;
+
+***************
+*** 4494,4500 ****
+ {
+ while (*++that && *that != '"')
+ {
+! /* skipping escaped characters in the string */
+ if (*that == '\\')
+ {
+ if (*++that == NUL)
+--- 4273,4279 ----
+ {
+ while (*++that && *that != '"')
+ {
+! // skipping escaped characters in the string
+ if (*that == '\\')
+ {
+ if (*++that == NUL)
+***************
+*** 4540,4552 ****
+ col--;
+ }
+
+! /*
+! * Some keywords require "body" indenting rules (the
+! * non-standard-lisp ones are Scheme special forms):
+! *
+! * (let ((a 1)) instead (let ((a 1))
+! * (...)) of (...))
+! */
+
+ if (!vi_lisp && (*that == '(' || *that == '[')
+ && lisp_match(that + 1))
+--- 4319,4329 ----
+ col--;
+ }
+
+! // Some keywords require "body" indenting rules (the
+! // non-standard-lisp ones are Scheme special forms):
+! //
+! // (let ((a 1)) instead (let ((a 1))
+! // (...)) of (...))
+
+ if (!vi_lisp && (*that == '(' || *that == '[')
+ && lisp_match(that + 1))
+***************
+*** 4563,4572 ****
+ ++that;
+ }
+
+! if (*that && *that != ';') /* not a comment line */
+ {
+! /* test *that != '(' to accommodate first let/do
+! * argument if it is more than one line */
+ if (!vi_lisp && *that != '(' && *that != '[')
+ firsttry++;
+
+--- 4340,4349 ----
+ ++that;
+ }
+
+! if (*that && *that != ';') // not a comment line
+ {
+! // test *that != '(' to accommodate first let/do
+! // argument if it is more than one line
+ if (!vi_lisp && *that != '(' && *that != '[')
+ firsttry++;
+
+***************
+*** 4617,4629 ****
+ }
+ }
+ else
+! amount = 0; /* no matching '(' or '[' found, use zero indent */
+
+ curwin->w_cursor = realpos;
+
+ return amount;
+ }
+! #endif /* FEAT_LISP */
+
+ #if defined(FEAT_CINDENT) || defined(PROTO)
+ /*
+--- 4394,4406 ----
+ }
+ }
+ else
+! amount = 0; // no matching '(' or '[' found, use zero indent
+
+ curwin->w_cursor = realpos;
+
+ return amount;
+ }
+! #endif // FEAT_LISP
+
+ #if defined(FEAT_CINDENT) || defined(PROTO)
+ /*
+***************
+*** 4658,4664 ****
+ {
+ change_indent(INDENT_SET, amount, FALSE, 0, TRUE);
+ if (linewhite(curwin->w_cursor.lnum))
+! did_ai = TRUE; /* delete the indent if the line stays empty */
+ }
+ }
+
+--- 4435,4441 ----
+ {
+ change_indent(INDENT_SET, amount, FALSE, 0, TRUE);
+ if (linewhite(curwin->w_cursor.lnum))
+! did_ai = TRUE; // delete the indent if the line stays empty
+ }
+ }
+
+*** ../vim-8.1.0873/src/version.c 2019-02-03 23:45:09.282345807 +0100
+--- src/version.c 2019-02-04 20:26:52.174771873 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 874,
+ /**/
+
+--
+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.0875 b/data/vim/patches/8.1.0875
new file mode 100644
index 000000000..923e42ee6
--- /dev/null
+++ b/data/vim/patches/8.1.0875
@@ -0,0 +1,116 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0875
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0875
+Problem: Not all errors of marks and findfile()/finddir() are tested.
+Solution: Add more test coverage. (Dominique Pelle)
+Files: src/testdir/test_findfile.vim, src/testdir/test_marks.vim
+
+
+*** ../vim-8.1.0874/src/testdir/test_findfile.vim 2019-01-30 22:13:30.409988847 +0100
+--- src/testdir/test_findfile.vim 2019-02-04 21:13:58.261374549 +0100
+***************
+*** 119,124 ****
+--- 119,132 ----
+ let &shellslash = save_shellslash
+ endfunc
+
++ func Test_findfile_error()
++ call assert_fails('call findfile([])', 'E730:')
++ call assert_fails('call findfile("x", [])', 'E730:')
++ call assert_fails('call findfile("x", "", [])', 'E745:')
++ call assert_fails('call findfile("x", "**x")', 'E343:')
++ call assert_fails('call findfile("x", repeat("x", 5000))', 'E854:')
++ endfunc
++
+ " Test finddir({name} [, {path} [, {count}]])
+ func Test_finddir()
+ let save_path = &path
+***************
+*** 167,169 ****
+--- 175,185 ----
+ let &path = save_path
+ let &shellslash = save_shellslash
+ endfunc
++
++ func Test_finddir_error()
++ call assert_fails('call finddir([])', 'E730:')
++ call assert_fails('call finddir("x", [])', 'E730:')
++ call assert_fails('call finddir("x", "", [])', 'E745:')
++ call assert_fails('call finddir("x", "**x")', 'E343:')
++ call assert_fails('call finddir("x", repeat("x", 5000))', 'E854:')
++ endfunc
+*** ../vim-8.1.0874/src/testdir/test_marks.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_marks.vim 2019-02-04 21:13:58.261374549 +0100
+***************
+*** 133,135 ****
+--- 133,176 ----
+
+ bwipe!
+ endfunc
++
++ func Test_delmarks()
++ new
++ norm mx
++ norm `x
++ delmarks x
++ call assert_fails('norm `x', 'E20:')
++
++ " Deleting an already deleted mark should not fail.
++ delmarks x
++
++ " Test deleting a range of marks.
++ norm ma
++ norm mb
++ norm mc
++ norm mz
++ delmarks b-z
++ norm `a
++ call assert_fails('norm `b', 'E20:')
++ call assert_fails('norm `c', 'E20:')
++ call assert_fails('norm `z', 'E20:')
++ call assert_fails('delmarks z-b', 'E475:')
++
++ call assert_fails('delmarks', 'E471:')
++ call assert_fails('delmarks /', 'E475:')
++
++ " Test delmarks!
++ norm mx
++ norm `x
++ delmarks!
++ call assert_fails('norm `x', 'E20:')
++ call assert_fails('delmarks! x', 'E474:')
++
++ bwipe!
++ endfunc
++
++ func Test_mark_error()
++ call assert_fails('mark', 'E471:')
++ call assert_fails('mark xx', 'E488:')
++ call assert_fails('mark _', 'E191:')
++ endfunc
+*** ../vim-8.1.0874/src/version.c 2019-02-04 20:30:13.973460115 +0100
+--- src/version.c 2019-02-04 21:13:09.765720718 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 875,
+ /**/
+
+--
+LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall?
+ARTHUR: No, that's Saint Ives.
+ "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.0876 b/data/vim/patches/8.1.0876
new file mode 100644
index 000000000..95e23ac4e
--- /dev/null
+++ b/data/vim/patches/8.1.0876
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0876
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0876
+Problem: Completion match not displayed when popup menu is not shown.
+Solution: Call update_screen() when not displaying the popup menu to show
+ the inserted match. (Ken Takata, Hirohito Higashi)
+Files: src/edit.c
+
+
+*** ../vim-8.1.0875/src/edit.c 2019-01-31 18:26:05.734803539 +0100
+--- src/edit.c 2019-02-05 20:08:33.304704531 +0100
+***************
+*** 5021,5029 ****
+ /* may undisplay the popup menu first */
+ ins_compl_upd_pum();
+
+! // Redraw before showing the popup menu to show the user what was
+! // inserted.
+! pum_call_update_screen();
+
+ /* display the updated popup menu */
+ ins_compl_show_pum();
+--- 5021,5033 ----
+ /* may undisplay the popup menu first */
+ ins_compl_upd_pum();
+
+! if (pum_enough_matches())
+! // Will display the popup menu, don't redraw yet to avoid flicker.
+! pum_call_update_screen();
+! else
+! // Not showing the popup menu yet, redraw to show the user what was
+! // inserted.
+! update_screen(0);
+
+ /* display the updated popup menu */
+ ins_compl_show_pum();
+*** ../vim-8.1.0875/src/version.c 2019-02-04 21:14:41.905108635 +0100
+--- src/version.c 2019-02-05 20:11:50.479413011 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 876,
+ /**/
+
+--
+ [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.0877 b/data/vim/patches/8.1.0877
new file mode 100644
index 000000000..a1b35b762
--- /dev/null
+++ b/data/vim/patches/8.1.0877
@@ -0,0 +1,376 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0877
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0877
+Problem: New buffer used every time the quickfix window is opened.
+Solution: Reuse the buffer. (Yegappan Lakshmanan, closes #3902)
+Files: src/buffer.c, src/proto/quickfix.pro, src/quickfix.c,
+ src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0876/src/buffer.c 2019-01-26 17:28:22.220599167 +0100
+--- src/buffer.c 2019-02-05 20:49:04.364708960 +0100
+***************
+*** 5753,5769 ****
+ #if defined(FEAT_QUICKFIX)
+ if (bt_quickfix(buf))
+ {
+- win_T *win;
+- tabpage_T *tp;
+-
+ /*
+! * For location list window, w_llist_ref points to the location list.
+! * For quickfix window, w_llist_ref is NULL.
+ */
+! if (find_win_for_buf(buf, &win, &tp) == OK && win->w_llist_ref != NULL)
+! return (char_u *)_(msg_loclist);
+! else
+ return (char_u *)_(msg_qflist);
+ }
+ #endif
+
+--- 5753,5766 ----
+ #if defined(FEAT_QUICKFIX)
+ if (bt_quickfix(buf))
+ {
+ /*
+! * Differentiate between the quickfix and location list buffers using
+! * the buffer number stored in the global quickfix stack.
+ */
+! if (buf->b_fnum == qf_stack_get_bufnr())
+ return (char_u *)_(msg_qflist);
++ else
++ return (char_u *)_(msg_loclist);
+ }
+ #endif
+
+*** ../vim-8.1.0876/src/proto/quickfix.pro 2018-11-11 22:50:20.806297851 +0100
+--- src/proto/quickfix.pro 2019-02-05 20:49:04.364708960 +0100
+***************
+*** 1,5 ****
+--- 1,6 ----
+ /* quickfix.c */
+ int qf_init(win_T *wp, char_u *efile, char_u *errorformat, int newlist, char_u *qf_title, char_u *enc);
++ int qf_stack_get_bufnr(void);
+ void qf_free_all(win_T *wp);
+ void check_quickfix_busy(void);
+ void copy_loclist_stack(win_T *from, win_T *to);
+*** ../vim-8.1.0876/src/quickfix.c 2019-01-31 14:27:01.238142723 +0100
+--- src/quickfix.c 2019-02-05 20:49:04.364708960 +0100
+***************
+*** 48,53 ****
+--- 48,54 ----
+ */
+ #define LISTCOUNT 10
+ #define INVALID_QFIDX (-1)
++ #define INVALID_QFBUFNR (0)
+
+ /*
+ * Quickfix list type.
+***************
+*** 107,112 ****
+--- 108,114 ----
+ int qf_curlist; // current error list
+ qf_list_T qf_lists[LISTCOUNT];
+ qfltype_T qfl_type; // type of list
++ int qf_bufnr; // quickfix window buffer number
+ };
+
+ static qf_info_T ql_info; // global quickfix list
+***************
+*** 1853,1858 ****
+--- 1855,1891 ----
+ }
+
+ /*
++ * Return the global quickfix stack window buffer number.
++ */
++ int
++ qf_stack_get_bufnr(void)
++ {
++ return ql_info.qf_bufnr;
++ }
++
++ /*
++ * Wipe the quickfix window buffer (if present) for the specified
++ * quickfix/location list.
++ */
++ static void
++ wipe_qf_buffer(qf_info_T *qi)
++ {
++ buf_T *qfbuf;
++
++ if (qi->qf_bufnr != INVALID_QFBUFNR)
++ {
++ qfbuf = buflist_findnr(qi->qf_bufnr);
++ if (qfbuf != NULL && qfbuf->b_nwindows == 0)
++ {
++ // If the quickfix buffer is not loaded in any window, then
++ // wipe the buffer.
++ close_buffer(NULL, qfbuf, DOBUF_WIPE, FALSE);
++ qi->qf_bufnr = INVALID_QFBUFNR;
++ }
++ }
++ }
++
++ /*
+ * Free a location list stack
+ */
+ static void
+***************
+*** 1876,1881 ****
+--- 1909,1917 ----
+ locstack_queue_delreq(qi);
+ else
+ {
++ // If the quickfix window buffer is loaded, then wipe it
++ wipe_qf_buffer(qi);
++
+ for (i = 0; i < qi->qf_listcount; ++i)
+ qf_free(&qi->qf_lists[i]);
+ vim_free(qi);
+***************
+*** 2066,2071 ****
+--- 2102,2108 ----
+ {
+ qi->qf_refcount++;
+ qi->qfl_type = qfltype;
++ qi->qf_bufnr = INVALID_QFBUFNR;
+ }
+ return qi;
+ }
+***************
+*** 2741,2747 ****
+ }
+
+ /*
+! * Find a non-quickfix window using the given location list.
+ * Returns NULL if a matching window is not found.
+ */
+ static win_T *
+--- 2778,2785 ----
+ }
+
+ /*
+! * Find a non-quickfix window in the current tabpage using the given location
+! * list stack.
+ * Returns NULL if a matching window is not found.
+ */
+ static win_T *
+***************
+*** 3988,3994 ****
+ 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;
+--- 4026,4032 ----
+ 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 *)"hide", OPT_LOCAL);
+ RESET_BINDING(curwin);
+ #ifdef FEAT_DIFF
+ curwin->w_p_diff = FALSE;
+***************
+*** 3997,4002 ****
+--- 4035,4042 ----
+ set_option_value((char_u *)"fdm", 0L, (char_u *)"manual",
+ OPT_LOCAL);
+ #endif
++ // save the number of the new buffer
++ qi->qf_bufnr = curbuf->b_fnum;
+ }
+
+ // Only set the height when still in the same tab page and there is no
+***************
+*** 4212,4217 ****
+--- 4252,4267 ----
+ tabpage_T *tp;
+ win_T *win;
+
++ if (qi->qf_bufnr != INVALID_QFBUFNR)
++ {
++ buf_T *qfbuf;
++ qfbuf = buflist_findnr(qi->qf_bufnr);
++ if (qfbuf != NULL)
++ return qfbuf;
++ // buffer is no longer present
++ qi->qf_bufnr = INVALID_QFBUFNR;
++ }
++
+ FOR_ALL_TAB_WINDOWS(tp, win)
+ if (is_qf_win(win, qi))
+ return win->w_buffer;
+***************
+*** 6581,6602 ****
+ }
+
+ /*
+- * 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)
+- {
+- win_T *wp = NULL;
+-
+- FOR_ALL_WINDOWS(wp)
+- if ((wp->w_llist == qi) && !bt_quickfix(wp->w_buffer))
+- return wp;
+-
+- return NULL;
+- }
+-
+- /*
+ * Free the entire quickfix/location list stack.
+ * If the quickfix/location list window is open, then clear it.
+ */
+--- 6631,6636 ----
+***************
+*** 6605,6611 ****
+ {
+ win_T *qfwin = qf_find_win(qi);
+ win_T *llwin = NULL;
+- win_T *orig_wp = wp;
+
+ if (qfwin != NULL)
+ {
+--- 6639,6644 ----
+***************
+*** 6619,6625 ****
+ {
+ // 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;
+ }
+--- 6652,6658 ----
+ {
+ // If in the location list window, then use the non-location list
+ // window with this location list (if present)
+! llwin = qf_find_win_with_loclist(qi);
+ if (llwin != NULL)
+ wp = llwin;
+ }
+***************
+*** 6631,6649 ****
+ 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 = qf_alloc_stack(QFLT_LOCATION);
+
+ // 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;
+! if (llwin != NULL)
+ {
+! llwin->w_llist = new_ll;
+ new_ll->qf_refcount++;
+ }
+ }
+--- 6664,6683 ----
+ qi->qf_curlist = 0;
+ qi->qf_listcount = 0;
+ }
+! else if (qfwin != NULL)
+ {
+ // If the location list window is open, then create a new empty
+ // location list
+ qf_info_T *new_ll = qf_alloc_stack(QFLT_LOCATION);
++ new_ll->qf_bufnr = qfwin->w_buffer->b_fnum;
+
+ // first free the list reference in the location list window
+! ll_free_all(&qfwin->w_llist_ref);
+
+! qfwin->w_llist_ref = new_ll;
+! if (wp != qfwin)
+ {
+! wp->w_llist = new_ll;
+ new_ll->qf_refcount++;
+ }
+ }
+*** ../vim-8.1.0876/src/testdir/test_quickfix.vim 2019-01-31 14:27:01.238142723 +0100
+--- src/testdir/test_quickfix.vim 2019-02-05 20:49:04.364708960 +0100
+***************
+*** 3899,3901 ****
+--- 3899,3944 ----
+ set efm&
+ call delete('Xfile1')
+ endfunc
++
++ " Test for the quickfix window buffer
++ func Xqfbuf_test(cchar)
++ call s:setup_commands(a:cchar)
++
++ " Quickfix buffer should be reused across closing and opening a quickfix
++ " window
++ Xexpr "F1:10:Line10"
++ Xopen
++ let qfbnum = bufnr('')
++ Xclose
++ " Even after the quickfix window is closed, the buffer should be loaded
++ call assert_true(bufloaded(qfbnum))
++ Xopen
++ " Buffer should be reused when opening the window again
++ call assert_equal(qfbnum, bufnr(''))
++ Xclose
++
++ if a:cchar == 'l'
++ %bwipe
++ " For a location list, when both the file window and the location list
++ " window for the list are closed, then the buffer should be freed.
++ new | only
++ lexpr "F1:10:Line10"
++ let wid = win_getid()
++ lopen
++ let qfbnum = bufnr('')
++ call assert_match(qfbnum . ' %a- "\[Location List]"', execute('ls'))
++ close
++ " When the location list window is closed, the buffer name should not
++ " change to 'Quickfix List'
++ call assert_match(qfbnum . ' h- "\[Location List]"', execute('ls'))
++ call assert_true(bufloaded(qfbnum))
++
++ new | only
++ call assert_false(bufloaded(qfbnum))
++ endif
++ endfunc
++
++ func Test_qfbuf()
++ call Xqfbuf_test('c')
++ call Xqfbuf_test('l')
++ endfunc
+*** ../vim-8.1.0876/src/version.c 2019-02-05 20:11:57.355368329 +0100
+--- src/version.c 2019-02-05 20:45:38.242078612 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 877,
+ /**/
+
+--
+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.0878 b/data/vim/patches/8.1.0878
new file mode 100644
index 000000000..432a49e5b
--- /dev/null
+++ b/data/vim/patches/8.1.0878
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0878
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0878
+Problem: Test for has('bsd') fails on some BSD systems.
+Solution: Adjust the uname match. (James McCoy, closes #3909)
+Files: src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0877/src/testdir/test_functions.vim 2019-01-29 22:58:02.401136295 +0100
+--- src/testdir/test_functions.vim 2019-02-07 21:23:46.315413021 +0100
+***************
+*** 1238,1243 ****
+--- 1238,1245 ----
+ let uname = system('uname')
+ call assert_equal(uname =~? 'BeOS', has('beos'))
+ call assert_equal(uname =~? 'BSD\|DragonFly', has('bsd'))
++ " GNU userland on BSD kernels (e.g., GNU/kFreeBSD) don't have BSD defined
++ call assert_equal(uname =~? '\%(GNU/k\w\+\)\@<!BSD\|DragonFly', has('bsd'))
+ call assert_equal(uname =~? 'HP-UX', has('hpux'))
+ call assert_equal(uname =~? 'Linux', has('linux'))
+ call assert_equal(uname =~? 'Darwin', has('mac'))
+*** ../vim-8.1.0877/src/version.c 2019-02-05 21:23:00.604559143 +0100
+--- src/version.c 2019-02-07 21:25:24.638800630 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 878,
+ /**/
+
+--
+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.0879 b/data/vim/patches/8.1.0879
new file mode 100644
index 000000000..31b894b5c
--- /dev/null
+++ b/data/vim/patches/8.1.0879
@@ -0,0 +1,65 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0879
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0879
+Problem: MS-Windows: temp name encoding can be wrong.
+Solution: Convert from active code page to 'encoding'. (Ken Takata,
+ closes #3520, closes #1698)
+Files: src/fileio.c
+
+
+*** ../vim-8.1.0878/src/fileio.c 2019-01-26 16:20:44.264683546 +0100
+--- src/fileio.c 2019-02-08 12:17:47.736584605 +0100
+***************
+*** 7470,7475 ****
+--- 7470,7493 ----
+ for (p = retval; *p; ++p)
+ if (*p == '\\')
+ *p = '/';
++
++ #if defined(FEAT_MBYTE) && defined(WIN3264)
++ if (enc_utf8)
++ {
++ int len;
++ char_u *pp = NULL;
++
++ // Convert from active codepage to UTF-8 since mch_call_shell()
++ // converts command-line to wide string from encoding.
++ acp_to_enc(retval, (int)STRLEN(retval), &pp, &len);
++ if (pp != NULL)
++ {
++ vim_free(retval);
++ return pp;
++ }
++ }
++ #endif
++
+ return retval;
+
+ # else /* WIN3264 */
+*** ../vim-8.1.0878/src/version.c 2019-02-07 21:27:11.002137464 +0100
+--- src/version.c 2019-02-08 12:20:40.059450474 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 879,
+ /**/
+
+--
+Yesterday, all my deadlines seemed so far away
+now it looks as though it's freeze in four days
+oh I believe in cvs..
+ [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0880 b/data/vim/patches/8.1.0880
new file mode 100644
index 000000000..b1797ce45
--- /dev/null
+++ b/data/vim/patches/8.1.0880
@@ -0,0 +1,907 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0880
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0880
+Problem: MS-Windows: inconsistent selection of winpty/conpty.
+Solution: Name option 'termwintype', use ++type argument and "term_pty" for
+ term_start(). (Hirohito Higashi, closes #3915)
+Files: runtime/doc/eval.txt, runtime/doc/options.txt,
+ runtime/doc/terminal.txt, src/channel.c, src/option.c,
+ src/option.h, src/structs.h, src/terminal.c,
+ src/testdir/gen_opt_test.vim, runtime/optwin.vim,
+ runtime/doc/quickref.txt
+
+
+*** ../vim-8.1.0879/runtime/doc/eval.txt 2019-02-03 14:52:42.497867506 +0100
+--- runtime/doc/eval.txt 2019-02-08 12:30:53.693480446 +0100
+***************
+*** 5716,5721 ****
+--- 5750,5760 ----
+ (See |job_stop()| for the values)
+ only valid when "status" is "dead"
+
++ Only in MS-Windows:
++ "tty_type" Type of virtual console in use.
++ Values are "winpty" or "conpty".
++ See 'termwintype'.
++
+ Without any arguments, returns a List with all Job objects.
+
+ job_setoptions({job}, {options}) *job_setoptions()*
+***************
+*** 9410,9419 ****
+ "ansi_colors" A list of 16 color names or hex codes
+ defining the ANSI palette used in GUI
+ color modes. See |g:terminal_ansi_colors|.
+! "term_mode" (MS-Windows only): Specify which pty to
+! use:
+! "winpty": Use winpty
+! "conpty": Use ConPTY (if available)
+
+ {only available when compiled with the |+terminal| feature}
+
+--- 9474,9481 ----
+ "ansi_colors" A list of 16 color names or hex codes
+ defining the ANSI palette used in GUI
+ color modes. See |g:terminal_ansi_colors|.
+! "tty_type" (MS-Windows only): Specify which pty to
+! use. See 'termwintype' for the values.
+
+ {only available when compiled with the |+terminal| feature}
+
+*** ../vim-8.1.0879/runtime/doc/options.txt 2019-02-03 14:52:42.497867506 +0100
+--- runtime/doc/options.txt 2019-02-08 12:30:53.693480446 +0100
+***************
+*** 8009,8031 ****
+ Note that the "cterm" attributes are still used, not the "gui" ones.
+ NOTE: This option is reset when 'compatible' is set.
+
+- *'termmode'* *'tmod'*
+- 'termmode' 'tmod' string (default "")
+- local to window
+- {not in Vi, MS-Windows only}
+- Whether the window uses winpty or |ConPTY| as the virtual console.
+- When set before opening the terminal, it influences what pty is used.
+- When opening the terminal it will be set to the actually used pty.
+-
+- Possible values are:
+- "" use ConPTY if possible, winpty otherwise
+- "winpty" use winpty, fail if not supported
+- "conpty" use |ConPTY|, fail if not supported
+-
+- |ConPTY| support depends on the platform (Windows 10 October 2018
+- edition). winpty support needs to be installed. If neither is
+- supported then you cannot open a terminal window.
+-
+ *'termwinscroll'* *'twsl'*
+ 'termwinscroll' 'twsl' number (default 10000)
+ local to buffer
+--- 8054,8059 ----
+***************
+*** 8074,8079 ****
+--- 8102,8125 ----
+ the size of the terminal. In that case the Vim window will be
+ adjusted to that size, if possible.
+
++ *'termwintype'* *'twt'*
++ 'termwintype' 'twt' string (default "")
++ global
++ {not in Vi}
++ {only available when compiled with the |terminal|
++ feature on MS-Windows}
++ Specify the virtual console (pty) used when opening the terminal
++ window.
++
++ Possible values are:
++ "" use ConPTY if possible, winpty otherwise
++ "winpty" use winpty, fail if not supported
++ "conpty" use |ConPTY|, fail if not supported
++
++ |ConPTY| support depends on the platform (Windows 10 October 2018
++ edition). winpty support needs to be installed. If neither is
++ supported then you cannot open a terminal window.
++
+ *'terse'* *'noterse'*
+ 'terse' boolean (default off)
+ global
+*** ../vim-8.1.0879/runtime/doc/terminal.txt 2019-02-03 14:52:42.497867506 +0100
+--- runtime/doc/terminal.txt 2019-02-08 12:30:53.693480446 +0100
+***************
+*** 228,235 ****
+ for Python "++eof=exit()". Special
+ codes can be used like with `:map`,
+ e.g. "<C-Z>" for CTRL-Z.
+! ++winpty Use winpty as the virtual console.
+! ++conpty Use |ConPTY| as the virtual console.
+ If you want to use more options use the |term_start()|
+ function.
+ If you want to split the window vertically, use: >
+--- 228,237 ----
+ for Python "++eof=exit()". Special
+ codes can be used like with `:map`,
+ e.g. "<C-Z>" for CTRL-Z.
+! ++type={pty} (MS-Windows only): Use {pty} as the
+! virtual console. See 'termwintype'
+! for the values.
+!
+ If you want to use more options use the |term_start()|
+ function.
+ If you want to split the window vertically, use: >
+***************
+*** 416,423 ****
+ Update"), winpty is no longer required. On those versions, |:terminal| will use
+ Windows' built-in support for hosting terminal applications, "ConPTY". When
+ ConPTY is in use, there may be rendering artifacts regarding ambiguous-width
+! characters. If you encounter any such issues, set 'termmode' to winpty (which
+! you then must have instlled).
+
+ Environment variables are used to pass information to the running job:
+ VIM_SERVERNAME v:servername
+--- 418,425 ----
+ Update"), winpty is no longer required. On those versions, |:terminal| will use
+ Windows' built-in support for hosting terminal applications, "ConPTY". When
+ ConPTY is in use, there may be rendering artifacts regarding ambiguous-width
+! characters. If you encounter any such issues, set 'termwintype' to "winpty"
+! (which you then must have instlled).
+
+ Environment variables are used to pass information to the running job:
+ VIM_SERVERNAME v:servername
+*** ../vim-8.1.0879/src/channel.c 2019-02-03 14:52:42.501867485 +0100
+--- src/channel.c 2019-02-08 12:30:53.693480446 +0100
+***************
+*** 4947,4973 ****
+ opt->jo_set2 |= JO2_TERM_KILL;
+ opt->jo_term_kill = tv_get_string_chk(item);
+ }
+! else if (STRCMP(hi->hi_key, "term_mode") == 0)
+ {
+ char_u *p;
+
+! if (!(supported2 & JO2_TERM_MODE))
+ break;
+! opt->jo_set2 |= JO2_TERM_MODE;
+ p = tv_get_string_chk(item);
+ if (p == NULL)
+ {
+! semsg(_(e_invargval), "term_mode");
+ return FAIL;
+ }
+ // Allow empty string, "winpty", "conpty".
+ if (!(*p == NUL || STRCMP(p, "winpty") == 0
+ || STRCMP(p, "conpty") == 0))
+ {
+! semsg(_(e_invargval), "term_mode");
+ return FAIL;
+ }
+! opt->jo_term_mode = p[0];
+ }
+ # if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ else if (STRCMP(hi->hi_key, "ansi_colors") == 0)
+--- 4947,4973 ----
+ opt->jo_set2 |= JO2_TERM_KILL;
+ opt->jo_term_kill = tv_get_string_chk(item);
+ }
+! else if (STRCMP(hi->hi_key, "tty_type") == 0)
+ {
+ char_u *p;
+
+! if (!(supported2 & JO2_TTY_TYPE))
+ break;
+! opt->jo_set2 |= JO2_TTY_TYPE;
+ p = tv_get_string_chk(item);
+ if (p == NULL)
+ {
+! semsg(_(e_invargval), "tty_type");
+ return FAIL;
+ }
+ // Allow empty string, "winpty", "conpty".
+ if (!(*p == NUL || STRCMP(p, "winpty") == 0
+ || STRCMP(p, "conpty") == 0))
+ {
+! semsg(_(e_invargval), "tty_type");
+ return FAIL;
+ }
+! opt->jo_tty_type = p[0];
+ }
+ # if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ else if (STRCMP(hi->hi_key, "ansi_colors") == 0)
+***************
+*** 5194,5199 ****
+--- 5194,5202 ----
+ #ifdef UNIX
+ vim_free(job->jv_termsig);
+ #endif
++ #ifdef WIN3264
++ vim_free(job->jv_tty_type);
++ #endif
+ free_callback(job->jv_exit_cb, job->jv_exit_partial);
+ if (job->jv_argv != NULL)
+ {
+***************
+*** 5963,5968 ****
+--- 5966,5974 ----
+ #ifdef UNIX
+ dict_add_string(dict, "termsig", job->jv_termsig);
+ #endif
++ #ifdef WIN3264
++ dict_add_string(dict, "tty_type", job->jv_tty_type);
++ #endif
+
+ l = list_alloc();
+ if (l != NULL)
+*** ../vim-8.1.0879/src/option.c 2019-02-03 14:52:42.501867485 +0100
+--- src/option.c 2019-02-08 12:40:35.150595285 +0100
+***************
+*** 253,259 ****
+ # define PV_TWK OPT_WIN(WV_TWK)
+ # define PV_TWS OPT_WIN(WV_TWS)
+ # define PV_TWSL OPT_BUF(BV_TWSL)
+- # define PV_TMOD OPT_WIN(WV_TMOD)
+ #endif
+ #ifdef FEAT_SIGNS
+ # define PV_SCL OPT_WIN(WV_SCL)
+--- 253,258 ----
+***************
+*** 2701,2715 ****
+ {(char_u *)FALSE, (char_u *)FALSE}
+ #endif
+ SCTX_INIT},
+- {"termmode", "tmod", P_STRING|P_ALLOCED|P_VI_DEF,
+- #ifdef FEAT_TERMINAL
+- (char_u *)VAR_WIN, PV_TMOD,
+- {(char_u *)"", (char_u *)NULL}
+- #else
+- (char_u *)NULL, PV_NONE,
+- {(char_u *)NULL, (char_u *)0L}
+- #endif
+- SCTX_INIT},
+ {"termwinkey", "twk", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
+ #ifdef FEAT_TERMINAL
+ (char_u *)VAR_WIN, PV_TWK,
+--- 2700,2705 ----
+***************
+*** 2737,2742 ****
+--- 2727,2741 ----
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+ SCTX_INIT},
++ {"termwintype", "twt", P_STRING|P_ALLOCED|P_VI_DEF,
++ #if defined(WIN3264) && defined(FEAT_TERMINAL)
++ (char_u *)&p_twt, PV_NONE,
++ {(char_u *)"", (char_u *)NULL}
++ #else
++ (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},
+***************
+*** 3218,3225 ****
+ #ifdef FEAT_SIGNS
+ static char *(p_scl_values[]) = {"yes", "no", "auto", NULL};
+ #endif
+! #ifdef FEAT_TERMINAL
+! static char *(p_tmod_values[]) = {"winpty", "conpty", "", NULL};
+ #endif
+
+ static void set_options_default(int opt_flags);
+--- 3217,3224 ----
+ #ifdef FEAT_SIGNS
+ static char *(p_scl_values[]) = {"yes", "no", "auto", NULL};
+ #endif
+! #if defined(WIN3264) && defined(FEAT_TERMINAL)
+! static char *(p_twt_values[]) = {"winpty", "conpty", "", NULL};
+ #endif
+
+ static void set_options_default(int opt_flags);
+***************
+*** 7505,7516 ****
+ errmsg = e_invarg;
+ }
+ }
+! // 'termmode'
+! else if (varp == &curwin->w_p_tmod)
+ {
+! if (check_opt_strings(*varp, p_tmod_values, FALSE) != OK)
+ errmsg = e_invarg;
+ }
+ #endif
+
+ #ifdef FEAT_VARTABS
+--- 7504,7517 ----
+ errmsg = e_invarg;
+ }
+ }
+! # if defined(WIN3264)
+! // 'termwintype'
+! else if (varp == &p_twt)
+ {
+! if (check_opt_strings(*varp, p_twt_values, FALSE) != OK)
+ errmsg = e_invarg;
+ }
++ # endif
+ #endif
+
+ #ifdef FEAT_VARTABS
+***************
+*** 10952,10958 ****
+ case PV_TWK: return (char_u *)&(curwin->w_p_twk);
+ case PV_TWS: return (char_u *)&(curwin->w_p_tws);
+ case PV_TWSL: return (char_u *)&(curbuf->b_p_twsl);
+- case PV_TMOD: return (char_u *)&(curwin->w_p_tmod);
+ #endif
+
+ case PV_AI: return (char_u *)&(curbuf->b_p_ai);
+--- 10953,10958 ----
+***************
+*** 11153,11159 ****
+ #ifdef FEAT_TERMINAL
+ to->wo_twk = vim_strsave(from->wo_twk);
+ to->wo_tws = vim_strsave(from->wo_tws);
+- to->wo_tmod = vim_strsave(from->wo_tmod);
+ #endif
+ #ifdef FEAT_FOLDING
+ to->wo_fdc = from->wo_fdc;
+--- 11153,11158 ----
+***************
+*** 11224,11230 ****
+ #ifdef FEAT_TERMINAL
+ check_string_option(&wop->wo_twk);
+ check_string_option(&wop->wo_tws);
+- check_string_option(&wop->wo_tmod);
+ #endif
+ #ifdef FEAT_LINEBREAK
+ check_string_option(&wop->wo_briopt);
+--- 11223,11228 ----
+***************
+*** 11268,11274 ****
+ #ifdef FEAT_TERMINAL
+ clear_string_option(&wop->wo_twk);
+ clear_string_option(&wop->wo_tws);
+- clear_string_option(&wop->wo_tmod);
+ #endif
+ }
+
+--- 11266,11271 ----
+*** ../vim-8.1.0879/src/option.h 2019-02-03 14:52:42.501867485 +0100
+--- src/option.h 2019-02-08 12:30:53.697480429 +0100
+***************
+*** 834,839 ****
+--- 834,842 ----
+ #ifdef FEAT_TERMGUICOLORS
+ EXTERN int p_tgc; /* 'termguicolors' */
+ #endif
++ #if defined(WIN3264) && defined(FEAT_TERMINAL)
++ EXTERN char_u *p_twt; // 'termwintype'
++ #endif
+ EXTERN int p_terse; /* 'terse' */
+ EXTERN int p_ta; /* 'textauto' */
+ EXTERN int p_to; /* 'tildeop' */
+***************
+*** 1112,1118 ****
+ #ifdef FEAT_TERMINAL
+ , WV_TWK
+ , WV_TWS
+- , WV_TMOD
+ #endif
+ , WV_CRBIND
+ #ifdef FEAT_LINEBREAK
+--- 1115,1120 ----
+*** ../vim-8.1.0879/src/structs.h 2019-02-03 14:52:42.505867463 +0100
+--- src/structs.h 2019-02-08 12:30:53.697480429 +0100
+***************
+*** 282,289 ****
+ # define w_p_twk w_onebuf_opt.wo_twk /* 'termwinkey' */
+ char_u *wo_tws;
+ # define w_p_tws w_onebuf_opt.wo_tws /* 'termwinsize' */
+- char_u *wo_tmod;
+- # define w_p_tmod w_onebuf_opt.wo_tmod /* 'termmode' */
+ #endif
+
+ #ifdef FEAT_EVAL
+--- 282,287 ----
+***************
+*** 1556,1561 ****
+--- 1554,1562 ----
+ #ifdef UNIX
+ char_u *jv_termsig; /* allocated */
+ #endif
++ #ifdef WIN3264
++ char_u *jv_tty_type; // allocated
++ #endif
+ int jv_exitval;
+ char_u *jv_exit_cb; /* allocated */
+ partial_T *jv_exit_partial;
+***************
+*** 1791,1797 ****
+ #define JO2_NORESTORE 0x2000 /* "norestore" */
+ #define JO2_TERM_KILL 0x4000 /* "term_kill" */
+ #define JO2_ANSI_COLORS 0x8000 /* "ansi_colors" */
+! #define JO2_TERM_MODE 0x10000 /* "term_mode" */
+
+ #define JO_MODE_ALL (JO_MODE + JO_IN_MODE + JO_OUT_MODE + JO_ERR_MODE)
+ #define JO_CB_ALL \
+--- 1792,1798 ----
+ #define JO2_NORESTORE 0x2000 /* "norestore" */
+ #define JO2_TERM_KILL 0x4000 /* "term_kill" */
+ #define JO2_ANSI_COLORS 0x8000 /* "ansi_colors" */
+! #define JO2_TTY_TYPE 0x10000 /* "tty_type" */
+
+ #define JO_MODE_ALL (JO_MODE + JO_IN_MODE + JO_OUT_MODE + JO_ERR_MODE)
+ #define JO_CB_ALL \
+***************
+*** 1864,1870 ****
+ # if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ long_u jo_ansi_colors[16];
+ # endif
+! int jo_term_mode; // first character of "term_mode"
+ #endif
+ } jobopt_T;
+
+--- 1865,1871 ----
+ # if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+ long_u jo_ansi_colors[16];
+ # endif
+! int jo_tty_type; // first character of "tty_type"
+ #endif
+ } jobopt_T;
+
+*** ../vim-8.1.0879/src/terminal.c 2019-02-03 14:52:42.505867463 +0100
+--- src/terminal.c 2019-02-08 12:30:53.697480429 +0100
+***************
+*** 742,757 ****
+ vim_free(buf);
+ *p = ' ';
+ }
+! else if ((int)(p - cmd) == 6 && STRNICMP(cmd, "winpty", 6) == 0)
+! {
+! opt.jo_set2 |= JO2_TERM_MODE;
+! opt.jo_term_mode = 'w';
+! }
+! else if ((int)(p - cmd) == 6 && STRNICMP(cmd, "conpty", 6) == 0)
+ {
+! opt.jo_set2 |= JO2_TERM_MODE;
+! opt.jo_term_mode = 'c';
+ }
+ else
+ {
+ if (*p)
+--- 742,767 ----
+ vim_free(buf);
+ *p = ' ';
+ }
+! #ifdef WIN3264
+! else if ((int)(p - cmd) == 4 && STRNICMP(cmd, "type", 4) == 0
+! && ep != NULL)
+ {
+! int tty_type = NUL;
+!
+! p = skiptowhite(cmd);
+! if (STRNICMP(ep + 1, "winpty", p - (ep + 1)) == 0)
+! tty_type = 'w';
+! else if (STRNICMP(ep + 1, "conpty", p - (ep + 1)) == 0)
+! tty_type = 'c';
+! else
+! {
+! semsg(e_invargval, "type");
+! goto theend;
+! }
+! opt.jo_set2 |= JO2_TTY_TYPE;
+! opt.jo_tty_type = tty_type;
+ }
++ #endif
+ else
+ {
+ if (*p)
+***************
+*** 809,817 ****
+ term->tl_cols, term->tl_rows) < 0)
+ return FAIL;
+ #ifdef WIN3264
+! if (*wp->w_p_tmod != NUL)
+! if (fprintf(fd, "++%s ", wp->w_p_tmod) < 0)
+! return FAIL;
+ #endif
+ if (term->tl_command != NULL && fputs((char *)term->tl_command, fd) < 0)
+ return FAIL;
+--- 819,826 ----
+ term->tl_cols, term->tl_rows) < 0)
+ return FAIL;
+ #ifdef WIN3264
+! if (fprintf(fd, "++type=%s ", term->tl_job->jv_tty_type) < 0)
+! return FAIL;
+ #endif
+ if (term->tl_command != NULL && fputs((char *)term->tl_command, fd) < 0)
+ return FAIL;
+***************
+*** 5369,5375 ****
+ + JO2_TERM_COLS + JO2_TERM_ROWS + JO2_VERTICAL + JO2_CURWIN
+ + JO2_CWD + JO2_ENV + JO2_EOF_CHARS
+ + JO2_NORESTORE + JO2_TERM_KILL
+! + JO2_ANSI_COLORS + JO2_TERM_MODE) == FAIL)
+ return;
+
+ buf = term_start(&argvars[0], NULL, &opt, 0);
+--- 5378,5384 ----
+ + JO2_TERM_COLS + JO2_TERM_ROWS + JO2_VERTICAL + JO2_CURWIN
+ + JO2_CWD + JO2_ENV + JO2_EOF_CHARS
+ + JO2_NORESTORE + JO2_TERM_KILL
+! + JO2_ANSI_COLORS + JO2_TTY_TYPE) == FAIL)
+ return;
+
+ buf = term_start(&argvars[0], NULL, &opt, 0);
+***************
+*** 5713,5718 ****
+--- 5722,5728 ----
+ job->jv_proc_info = proc_info;
+ job->jv_job_object = jo;
+ job->jv_status = JOB_STARTED;
++ job->jv_tty_type = vim_strsave("conpty");
+ ++job->jv_refcount;
+ term->tl_job = job;
+
+***************
+*** 6046,6051 ****
+--- 6056,6062 ----
+ (short_u *)winpty_conin_name(term->tl_winpty), NULL);
+ job->jv_tty_out = utf16_to_enc(
+ (short_u *)winpty_conout_name(term->tl_winpty), NULL);
++ job->jv_tty_type = vim_strsave("winpty");
+ ++job->jv_refcount;
+ term->tl_job = job;
+
+***************
+*** 6113,6118 ****
+--- 6124,6130 ----
+ {
+ int use_winpty = FALSE;
+ int use_conpty = FALSE;
++ int tty_type = *p_twt;
+
+ has_winpty = dyn_winpty_init(FALSE) != FAIL ? TRUE : FALSE;
+ has_conpty = dyn_conpty_init(FALSE) != FAIL ? TRUE : FALSE;
+***************
+*** 6122,6135 ****
+ // conpty is not available it can't be installed either.
+ return dyn_winpty_init(TRUE);
+
+! if (opt->jo_term_mode == 'w')
+! set_string_option_direct((char_u *)"tmod", -1, (char_u *)"winpty",
+! OPT_FREE|OPT_LOCAL, 0);
+! if (opt->jo_term_mode == 'c')
+! set_string_option_direct((char_u *)"tmod", -1, (char_u *)"conpty",
+! OPT_FREE|OPT_LOCAL, 0);
+
+! if (curwin->w_p_tmod == NULL || *curwin->w_p_tmod == NUL)
+ {
+ if (has_conpty)
+ use_conpty = TRUE;
+--- 6134,6143 ----
+ // conpty is not available it can't be installed either.
+ return dyn_winpty_init(TRUE);
+
+! if (opt->jo_tty_type != NUL)
+! tty_type = opt->jo_tty_type;
+
+! if (tty_type == NUL)
+ {
+ if (has_conpty)
+ use_conpty = TRUE;
+***************
+*** 6137,6148 ****
+ use_winpty = TRUE;
+ // else: error
+ }
+! else if (STRICMP(curwin->w_p_tmod, "winpty") == 0)
+ {
+ if (has_winpty)
+ use_winpty = TRUE;
+ }
+! else if (STRICMP(curwin->w_p_tmod, "conpty") == 0)
+ {
+ if (has_conpty)
+ use_conpty = TRUE;
+--- 6145,6156 ----
+ use_winpty = TRUE;
+ // else: error
+ }
+! else if (tty_type == 'w') // winpty
+ {
+ if (has_winpty)
+ use_winpty = TRUE;
+ }
+! else if (tty_type == 'c') // conpty
+ {
+ if (has_conpty)
+ use_conpty = TRUE;
+***************
+*** 6151,6168 ****
+ }
+
+ if (use_conpty)
+- {
+- set_string_option_direct((char_u *)"tmod", -1, (char_u *)"conpty",
+- OPT_FREE|OPT_LOCAL, 0);
+ return conpty_term_and_job_init(term, argvar, argv, opt, orig_opt);
+- }
+
+ if (use_winpty)
+- {
+- set_string_option_direct((char_u *)"tmod", -1, (char_u *)"winpty",
+- OPT_FREE|OPT_LOCAL, 0);
+ return winpty_term_and_job_init(term, argvar, argv, opt, orig_opt);
+- }
+
+ // error
+ return dyn_winpty_init(TRUE);
+--- 6159,6168 ----
+*** ../vim-8.1.0879/src/testdir/gen_opt_test.vim 2019-02-03 14:52:42.505867463 +0100
+--- src/testdir/gen_opt_test.vim 2019-02-08 12:30:53.697480429 +0100
+***************
+*** 131,138 ****
+ \ 'term': [[], []],
+ \ 'termguicolors': [[], []],
+ \ 'termencoding': [has('gui_gtk') ? [] : ['', 'utf-8'], ['xxx']],
+- \ 'termmode': [['', 'winpty', 'conpty'], ['xxx']],
+ \ 'termwinsize': [['', '24x80', '0x80', '32x0', '0x0'], ['xxx', '80', '8ax9', '24x80b']],
+ \ 'toolbar': [['', 'icons', 'text'], ['xxx']],
+ \ 'toolbariconsize': [['', 'tiny', 'huge'], ['xxx']],
+ \ 'ttymouse': [['', 'xterm'], ['xxx']],
+--- 131,138 ----
+ \ 'term': [[], []],
+ \ 'termguicolors': [[], []],
+ \ 'termencoding': [has('gui_gtk') ? [] : ['', 'utf-8'], ['xxx']],
+ \ 'termwinsize': [['', '24x80', '0x80', '32x0', '0x0'], ['xxx', '80', '8ax9', '24x80b']],
++ \ 'termwintype': [['', 'winpty', 'conpty'], ['xxx']],
+ \ 'toolbar': [['', 'icons', 'text'], ['xxx']],
+ \ 'toolbariconsize': [['', 'tiny', 'huge'], ['xxx']],
+ \ 'ttymouse': [['', 'xterm'], ['xxx']],
+*** ../vim-8.1.0879/runtime/optwin.vim 2018-06-23 19:22:45.598486362 +0200
+--- runtime/optwin.vim 2019-02-08 12:35:52.248072230 +0100
+***************
+*** 1,7 ****
+ " These commands create the option window.
+ "
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last Change: 2018 May 15
+
+ " If there already is an option window, jump to that one.
+ let buf = bufnr('option-window')
+--- 1,7 ----
+ " These commands create the option window.
+ "
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last Change: 2019 Feb 08
+
+ " If there already is an option window, jump to that one.
+ let buf = bufnr('option-window')
+***************
+*** 395,405 ****
+ call <SID>Header("syntax, highlighting and spelling")
+ call append("$", "background\t\"dark\" or \"light\"; the background color brightness")
+ call <SID>OptionG("bg", &bg)
+! if has("autocmd")
+! call append("$", "filetype\ttype of file; triggers the FileType event when set")
+! call append("$", "\t(local to buffer)")
+! call <SID>OptionL("ft")
+! endif
+ if has("syntax")
+ call append("$", "syntax\tname of syntax highlighting used")
+ call append("$", "\t(local to buffer)")
+--- 395,403 ----
+ call <SID>Header("syntax, highlighting and spelling")
+ call append("$", "background\t\"dark\" or \"light\"; the background color brightness")
+ call <SID>OptionG("bg", &bg)
+! call append("$", "filetype\ttype of file; triggers the FileType event when set")
+! call append("$", "\t(local to buffer)")
+! call <SID>OptionL("ft")
+ if has("syntax")
+ call append("$", "syntax\tname of syntax highlighting used")
+ call append("$", "\t(local to buffer)")
+***************
+*** 454,463 ****
+ endif
+ call append("$", "equalalways\tmake all windows the same size when adding/removing windows")
+ call <SID>BinOptionG("ea", &ea)
+! if has("vertsplit")
+! call append("$", "eadirection\tin which direction 'equalalways' works: \"ver\", \"hor\" or \"both\"")
+! call <SID>OptionG("ead", &ead)
+! endif
+ call append("$", "winheight\tminimal number of lines used for the current window")
+ call append("$", " \tset wh=" . &wh)
+ call append("$", "winminheight\tminimal number of lines used for any window")
+--- 452,459 ----
+ endif
+ call append("$", "equalalways\tmake all windows the same size when adding/removing windows")
+ call <SID>BinOptionG("ea", &ea)
+! call append("$", "eadirection\tin which direction 'equalalways' works: \"ver\", \"hor\" or \"both\"")
+! call <SID>OptionG("ead", &ead)
+ call append("$", "winheight\tminimal number of lines used for the current window")
+ call append("$", " \tset wh=" . &wh)
+ call append("$", "winminheight\tminimal number of lines used for any window")
+***************
+*** 465,479 ****
+ call append("$", "winfixheight\tkeep the height of the window")
+ call append("$", "\t(local to window)")
+ call <SID>BinOptionL("wfh")
+- if has("vertsplit")
+ call append("$", "winfixwidth\tkeep the width of the window")
+ call append("$", "\t(local to window)")
+ call <SID>BinOptionL("wfw")
+! call append("$", "winwidth\tminimal number of columns used for the current window")
+! call append("$", " \tset wiw=" . &wiw)
+! call append("$", "winminwidth\tminimal number of columns used for any window")
+! call append("$", " \tset wmw=" . &wmw)
+! endif
+ call append("$", "helpheight\tinitial height of the help window")
+ call append("$", " \tset hh=" . &hh)
+ if has("quickfix")
+--- 461,473 ----
+ call append("$", "winfixheight\tkeep the height of the window")
+ call append("$", "\t(local to window)")
+ call <SID>BinOptionL("wfh")
+ call append("$", "winfixwidth\tkeep the width of the window")
+ call append("$", "\t(local to window)")
+ call <SID>BinOptionL("wfw")
+! call append("$", "winwidth\tminimal number of columns used for the current window")
+! call append("$", " \tset wiw=" . &wiw)
+! call append("$", "winminwidth\tminimal number of columns used for any window")
+! call append("$", " \tset wmw=" . &wmw)
+ call append("$", "helpheight\tinitial height of the help window")
+ call append("$", " \tset hh=" . &hh)
+ if has("quickfix")
+***************
+*** 490,511 ****
+ call <SID>OptionG("swb", &swb)
+ call append("$", "splitbelow\ta new window is put below the current one")
+ call <SID>BinOptionG("sb", &sb)
+! if has("vertsplit")
+! call append("$", "splitright\ta new window is put right of the current one")
+! call <SID>BinOptionG("spr", &spr)
+! endif
+! if has("scrollbind")
+! call append("$", "scrollbind\tthis window scrolls together with other bound windows")
+! call append("$", "\t(local to window)")
+! call <SID>BinOptionL("scb")
+! call append("$", "scrollopt\t\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'")
+! call <SID>OptionG("sbo", &sbo)
+! endif
+! if has("cursorbind")
+! call append("$", "cursorbind\tthis window's cursor moves together with other bound windows")
+! call append("$", "\t(local to window)")
+! call <SID>BinOptionL("crb")
+! endif
+ if has("terminal")
+ call append("$", "termwinsize\tsize of a terminal window")
+ call append("$", "\t(local to window)")
+--- 484,499 ----
+ call <SID>OptionG("swb", &swb)
+ call append("$", "splitbelow\ta new window is put below the current one")
+ call <SID>BinOptionG("sb", &sb)
+! call append("$", "splitright\ta new window is put right of the current one")
+! call <SID>BinOptionG("spr", &spr)
+! call append("$", "scrollbind\tthis window scrolls together with other bound windows")
+! call append("$", "\t(local to window)")
+! call <SID>BinOptionL("scb")
+! call append("$", "scrollopt\t\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'")
+! call <SID>OptionG("sbo", &sbo)
+! call append("$", "cursorbind\tthis window's cursor moves together with other bound windows")
+! call append("$", "\t(local to window)")
+! call <SID>BinOptionL("crb")
+ if has("terminal")
+ call append("$", "termwinsize\tsize of a terminal window")
+ call append("$", "\t(local to window)")
+***************
+*** 515,520 ****
+--- 503,512 ----
+ call <SID>OptionL("twk")
+ call append("$", "termwinscroll\tmax number of lines to keep for scrollback in a terminal window")
+ call append("$", "\t(local to window)")
++ if has('win32')
++ call append("$", "termwintype\ttype of pty to use for a terminal window")
++ call <SID>OptionG("twt", &twt)
++ endif
+ call <SID>OptionL("twsl")
+ if exists("&winptydll")
+ call append("$", "winptydll\tname of the winpty dynamic library")
+***************
+*** 1105,1116 ****
+ call append("$", "wildmenu\tcommand-line completion shows a list of matches")
+ call <SID>BinOptionG("wmnu", &wmnu)
+ endif
+! if has("vertsplit")
+! call append("$", "cedit\tkey used to open the command-line window")
+! call <SID>OptionG("cedit", &cedit)
+! call append("$", "cmdwinheight\theight of the command-line window")
+! call <SID>OptionG("cwh", &cwh)
+! endif
+
+
+ call <SID>Header("executing external commands")
+--- 1097,1106 ----
+ call append("$", "wildmenu\tcommand-line completion shows a list of matches")
+ call <SID>BinOptionG("wmnu", &wmnu)
+ endif
+! call append("$", "cedit\tkey used to open the command-line window")
+! call <SID>OptionG("cedit", &cedit)
+! call append("$", "cmdwinheight\theight of the command-line window")
+! call <SID>OptionG("cwh", &cwh)
+
+
+ call <SID>Header("executing external commands")
+***************
+*** 1292,1305 ****
+
+
+ call <SID>Header("various")
+! if has("virtualedit")
+! call append("$", "virtualedit\twhen to use virtual editing: \"block\", \"insert\" and/or \"all\"")
+! call <SID>OptionG("ve", &ve)
+! endif
+! if has("autocmd")
+! call append("$", "eventignore\tlist of autocommand events which are to be ignored")
+! call <SID>OptionG("ei", &ei)
+! endif
+ call append("$", "loadplugins\tload plugin scripts when starting up")
+ call <SID>BinOptionG("lpl", &lpl)
+ call append("$", "exrc\tenable reading .vimrc/.exrc/.gvimrc in the current directory")
+--- 1282,1291 ----
+
+
+ call <SID>Header("various")
+! call append("$", "virtualedit\twhen to use virtual editing: \"block\", \"insert\" and/or \"all\"")
+! call <SID>OptionG("ve", &ve)
+! call append("$", "eventignore\tlist of autocommand events which are to be ignored")
+! call <SID>OptionG("ei", &ei)
+ call append("$", "loadplugins\tload plugin scripts when starting up")
+ call <SID>BinOptionG("lpl", &lpl)
+ call append("$", "exrc\tenable reading .vimrc/.exrc/.gvimrc in the current directory")
+*** ../vim-8.1.0879/runtime/doc/quickref.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/quickref.txt 2019-02-08 12:36:39.643832362 +0100
+***************
+*** 930,935 ****
+--- 930,936 ----
+ 'termwinkey' 'twk' key that precedes a Vim command in a terminal
+ 'termwinscroll' 'twsl' max number of scrollback lines in a terminal window
+ 'termwinsize' 'tws' size of a terminal window
++ 'termwintype' 'twt' MS-Windows: type of pty to use for terminal window
+ 'terse' shorten some messages
+ 'textauto' 'ta' obsolete, use 'fileformats'
+ 'textmode' 'tx' obsolete, use 'fileformat'
+***************
+*** 957,962 ****
+--- 958,965 ----
+ 'undoreload' 'ur' max nr of lines to save for undo on a buffer reload
+ 'updatecount' 'uc' after this many characters flush swap file
+ 'updatetime' 'ut' after this many milliseconds flush swap file
++ 'varsofttabstop' 'vsts' a list of number of spaces when typing <Tab>
++ 'vartabstop' 'vts' a list of number of spaces for <Tab>s
+ 'verbose' 'vbs' give informative messages
+ 'verbosefile' 'vfile' file to write messages in
+ 'viewdir' 'vdir' directory where to store files with :mkview
+*** ../vim-8.1.0879/src/version.c 2019-02-08 12:21:26.631222734 +0100
+--- src/version.c 2019-02-08 12:43:12.429737509 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 880,
+ /**/
+
+--
+There are only two hard things in programming: Cache invalidation,
+naming things and off-by-one errors.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0881 b/data/vim/patches/8.1.0881
new file mode 100644
index 000000000..2f24f2b40
--- /dev/null
+++ b/data/vim/patches/8.1.0881
@@ -0,0 +1,474 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0881
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0881
+Problem: Can execute shell commands in rvim through interfaces.
+Solution: Disable using interfaces in restricted mode. Allow for writing
+ file with writefile(), histadd() and a few others.
+Files: runtime/doc/starting.txt, src/if_perl.xs, src/if_cmds.h,
+ src/ex_cmds.c, src/ex_docmd.c, src/evalfunc.c,
+ src/testdir/test_restricted.vim, src/testdir/Make_all.mak
+
+
+*** ../vim-8.1.0880/runtime/doc/starting.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/starting.txt 2019-02-08 13:56:44.035120636 +0100
+***************
+*** 248,259 ****
+ changes and writing.
+ {not in Vi}
+
+! *-Z* *restricted-mode* *E145*
+ -Z Restricted mode. All commands that make use of an external
+ shell are disabled. This includes suspending with CTRL-Z,
+! ":sh", filtering, the system() function, backtick expansion,
+! delete(), rename(), mkdir(), writefile(), libcall(),
+! job_start(), etc.
+ {not in Vi}
+
+ *-g*
+--- 248,265 ----
+ changes and writing.
+ {not in Vi}
+
+! *-Z* *restricted-mode* *E145* *E981*
+ -Z Restricted mode. All commands that make use of an external
+ shell are disabled. This includes suspending with CTRL-Z,
+! ":sh", filtering, the system() function, backtick expansion
+! and libcall().
+! Also disallowed are delete(), rename(), mkdir(), job_start(),
+! etc.
+! Interfaces, such as Python, Ruby and Lua, are also disabled,
+! since they could be used to execute shell commands. Perl uses
+! the Safe module.
+! Note that the user may still find a loophole to execute a
+! shell command, it has only been made difficult.
+ {not in Vi}
+
+ *-g*
+*** ../vim-8.1.0880/src/if_perl.xs 2019-01-19 17:43:03.413449172 +0100
+--- src/if_perl.xs 2019-02-08 13:27:55.445028617 +0100
+***************
+*** 971,976 ****
+--- 971,977 ----
+ #ifdef DYNAMIC_PERL
+ static char *e_noperl = N_("Sorry, this command is disabled: the Perl library could not be loaded.");
+ #endif
++ static char *e_perlsandbox = N_("E299: Perl evaluation forbidden in sandbox without the Safe module");
+
+ /*
+ * ":perl"
+***************
+*** 1019,1031 ****
+ vim_free(script);
+ }
+
+! #ifdef HAVE_SANDBOX
+! if (sandbox)
+ {
+ safe = perl_get_sv("VIM::safe", FALSE);
+ # ifndef MAKE_TEST /* avoid a warning for unreachable code */
+ if (safe == NULL || !SvTRUE(safe))
+! emsg(_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
+ else
+ # endif
+ {
+--- 1020,1031 ----
+ vim_free(script);
+ }
+
+! if (sandbox || secure)
+ {
+ safe = perl_get_sv("VIM::safe", FALSE);
+ # ifndef MAKE_TEST /* avoid a warning for unreachable code */
+ if (safe == NULL || !SvTRUE(safe))
+! emsg(_(e_perlsandbox));
+ else
+ # endif
+ {
+***************
+*** 1037,1043 ****
+ }
+ }
+ else
+- #endif
+ perl_eval_sv(sv, G_DISCARD | G_NOARGS);
+
+ SvREFCNT_dec(sv);
+--- 1037,1042 ----
+***************
+*** 1298,1310 ****
+ ENTER;
+ SAVETMPS;
+
+! #ifdef HAVE_SANDBOX
+! if (sandbox)
+ {
+ safe = get_sv("VIM::safe", FALSE);
+ # ifndef MAKE_TEST /* avoid a warning for unreachable code */
+ if (safe == NULL || !SvTRUE(safe))
+! emsg(_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
+ else
+ # endif
+ {
+--- 1297,1308 ----
+ ENTER;
+ SAVETMPS;
+
+! if (sandbox || secure)
+ {
+ safe = get_sv("VIM::safe", FALSE);
+ # ifndef MAKE_TEST /* avoid a warning for unreachable code */
+ if (safe == NULL || !SvTRUE(safe))
+! emsg(_(e_perlsandbox));
+ else
+ # endif
+ {
+***************
+*** 1320,1326 ****
+ }
+ }
+ else
+- #endif /* HAVE_SANDBOX */
+ sv = eval_pv((char *)str, 0);
+
+ if (sv) {
+--- 1318,1323 ----
+*** ../vim-8.1.0880/src/ex_cmds.c 2019-01-31 18:26:05.734803539 +0100
+--- src/ex_cmds.c 2019-02-08 14:09:30.838943884 +0100
+***************
+*** 4775,4781 ****
+ {
+ if (restricted)
+ {
+! emsg(_("E145: Shell commands not allowed in rvim"));
+ return TRUE;
+ }
+ return FALSE;
+--- 4775,4781 ----
+ {
+ if (restricted)
+ {
+! emsg(_("E145: Shell commands and some functionality not allowed in rvim"));
+ return TRUE;
+ }
+ return FALSE;
+*** ../vim-8.1.0880/src/ex_docmd.c 2019-01-31 18:26:05.734803539 +0100
+--- src/ex_docmd.c 2019-02-08 13:21:20.959437381 +0100
+***************
+*** 2007,2017 ****
+ #ifdef HAVE_SANDBOX
+ if (sandbox != 0 && !(ea.argt & SBOXOK))
+ {
+! /* Command not allowed in sandbox. */
+ errormsg = _(e_sandbox);
+ goto doend;
+ }
+ #endif
+ if (!curbuf->b_p_ma && (ea.argt & MODIFY))
+ {
+ /* Command not allowed in non-'modifiable' buffer */
+--- 2007,2022 ----
+ #ifdef HAVE_SANDBOX
+ if (sandbox != 0 && !(ea.argt & SBOXOK))
+ {
+! // Command not allowed in sandbox.
+ errormsg = _(e_sandbox);
+ goto doend;
+ }
+ #endif
++ if (restricted != 0 && (ea.argt & RESTRICT))
++ {
++ errormsg = _("E981: Command not allowed in rvim");
++ goto doend;
++ }
+ if (!curbuf->b_p_ma && (ea.argt & MODIFY))
+ {
+ /* Command not allowed in non-'modifiable' buffer */
+*** ../vim-8.1.0880/src/evalfunc.c 2019-02-03 14:52:42.501867485 +0100
+--- src/evalfunc.c 2019-02-08 14:14:33.345334906 +0100
+***************
+*** 6817,6823 ****
+ #endif
+
+ rettv->vval.v_number = FALSE;
+! if (check_restricted() || check_secure())
+ return;
+ #ifdef FEAT_CMDHIST
+ str = tv_get_string_chk(&argvars[0]); /* NULL on type error */
+--- 6817,6823 ----
+ #endif
+
+ rettv->vval.v_number = FALSE;
+! if (check_secure())
+ return;
+ #ifdef FEAT_CMDHIST
+ str = tv_get_string_chk(&argvars[0]); /* NULL on type error */
+***************
+*** 7898,7903 ****
+--- 7898,7906 ----
+ char_u *str;
+ char_u buf[NUMBUFLEN];
+
++ if (check_restricted() || check_secure())
++ return;
++
+ str = tv_get_string_buf(&argvars[0], buf);
+ do_luaeval(str, argvars + 1, rettv);
+ }
+***************
+*** 8644,8649 ****
+--- 8647,8654 ----
+ char_u *str;
+ char_u buf[NUMBUFLEN];
+
++ if (check_restricted() || check_secure())
++ return;
+ str = tv_get_string_buf(&argvars[0], buf);
+ do_mzeval(str, rettv);
+ }
+***************
+*** 8932,8937 ****
+--- 8937,8945 ----
+ char_u *str;
+ char_u buf[NUMBUFLEN];
+
++ if (check_restricted() || check_secure())
++ return;
++
+ if (p_pyx == 0)
+ p_pyx = 3;
+
+***************
+*** 8950,8955 ****
+--- 8958,8966 ----
+ char_u *str;
+ char_u buf[NUMBUFLEN];
+
++ if (check_restricted() || check_secure())
++ return;
++
+ if (p_pyx == 0)
+ p_pyx = 2;
+
+***************
+*** 8965,8970 ****
+--- 8976,8984 ----
+ static void
+ f_pyxeval(typval_T *argvars, typval_T *rettv)
+ {
++ if (check_restricted() || check_secure())
++ return;
++
+ # if defined(FEAT_PYTHON) && defined(FEAT_PYTHON3)
+ init_pyxversion();
+ if (p_pyx == 2)
+***************
+*** 10819,10825 ****
+ typval_T *varp;
+ char_u nbuf[NUMBUFLEN];
+
+! if (check_restricted() || check_secure())
+ return;
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ varname = tv_get_string_chk(&argvars[1]);
+--- 10833,10839 ----
+ typval_T *varp;
+ char_u nbuf[NUMBUFLEN];
+
+! if (check_secure())
+ return;
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ varname = tv_get_string_chk(&argvars[1]);
+***************
+*** 11341,11347 ****
+
+ rettv->vval.v_number = 0;
+
+! if (check_restricted() || check_secure())
+ return;
+
+ tp = find_tabpage((int)tv_get_number_chk(&argvars[0], NULL));
+--- 11355,11361 ----
+
+ rettv->vval.v_number = 0;
+
+! if (check_secure())
+ return;
+
+ tp = find_tabpage((int)tv_get_number_chk(&argvars[0], NULL));
+***************
+*** 14714,14720 ****
+ blob_T *blob = NULL;
+
+ rettv->vval.v_number = -1;
+! if (check_restricted() || check_secure())
+ return;
+
+ if (argvars[0].v_type == VAR_LIST)
+--- 14728,14734 ----
+ blob_T *blob = NULL;
+
+ rettv->vval.v_number = -1;
+! if (check_secure())
+ return;
+
+ if (argvars[0].v_type == VAR_LIST)
+*** ../vim-8.1.0880/src/testdir/test_restricted.vim 2019-02-08 14:31:57.351438282 +0100
+--- src/testdir/test_restricted.vim 2019-02-08 14:26:17.361387453 +0100
+***************
+*** 0 ****
+--- 1,107 ----
++ " Test for "rvim" or "vim -Z"
++
++ source shared.vim
++
++ func Test_restricted()
++ let cmd = GetVimCommand('Xrestricted')
++ if cmd == ''
++ return
++ endif
++
++ call writefile([
++ \ "silent !ls",
++ \ "call writefile([v:errmsg], 'Xrestrout')",
++ \ "qa!",
++ \ ], 'Xrestricted')
++ call system(cmd . ' -Z')
++ call assert_match('E145:', join(readfile('Xrestrout')))
++
++ call delete('Xrestricted')
++ call delete('Xrestrout')
++ endfunc
++
++ func Run_restricted_test(ex_cmd, error)
++ let cmd = GetVimCommand('Xrestricted')
++ if cmd == ''
++ return
++ endif
++
++ call writefile([
++ \ a:ex_cmd,
++ \ "call writefile([v:errmsg], 'Xrestrout')",
++ \ "qa!",
++ \ ], 'Xrestricted')
++ call system(cmd . ' -Z')
++ call assert_match(a:error, join(readfile('Xrestrout')))
++
++ call delete('Xrestricted')
++ call delete('Xrestrout')
++ endfunc
++
++ func Test_restricted_lua()
++ if !has('lua')
++ throw 'Skipped: Lua is not supported'
++ endif
++ call Run_restricted_test('lua print("Hello, Vim!")', 'E981:')
++ call Run_restricted_test('luado return "hello"', 'E981:')
++ call Run_restricted_test('luafile somefile', 'E981:')
++ call Run_restricted_test('call luaeval("expression")', 'E145:')
++ endfunc
++
++ func Test_restricted_mzscheme()
++ if !has('mzscheme')
++ throw 'Skipped: MzScheme is not supported'
++ endif
++ call Run_restricted_test('mzscheme statement', 'E981:')
++ call Run_restricted_test('mzfile somefile', 'E981:')
++ call Run_restricted_test('call mzeval("expression")', 'E145:')
++ endfunc
++
++ func Test_restricted_perl()
++ if !has('perl')
++ throw 'Skipped: Perl is not supported'
++ endif
++ " TODO: how to make Safe mode fail?
++ " call Run_restricted_test('perl system("ls")', 'E981:')
++ " call Run_restricted_test('perldo system("hello")', 'E981:')
++ " call Run_restricted_test('perlfile somefile', 'E981:')
++ " call Run_restricted_test('call perleval("system(\"ls\")")', 'E145:')
++ endfunc
++
++ func Test_restricted_python()
++ if !has('python')
++ throw 'Skipped: Python is not supported'
++ endif
++ call Run_restricted_test('python print "hello"', 'E981:')
++ call Run_restricted_test('pydo return "hello"', 'E981:')
++ call Run_restricted_test('pyfile somefile', 'E981:')
++ call Run_restricted_test('call pyeval("expression")', 'E145:')
++ endfunc
++
++ func Test_restricted_python3()
++ if !has('python3')
++ throw 'Skipped: Python3 is not supported'
++ endif
++ call Run_restricted_test('py3 print "hello"', 'E981:')
++ call Run_restricted_test('py3do return "hello"', 'E981:')
++ call Run_restricted_test('py3file somefile', 'E981:')
++ call Run_restricted_test('call py3eval("expression")', 'E145:')
++ endfunc
++
++ func Test_restricted_ruby()
++ if !has('ruby')
++ throw 'Skipped: Ruby is not supported'
++ endif
++ call Run_restricted_test('ruby print "Hello"', 'E981:')
++ call Run_restricted_test('rubydo print "Hello"', 'E981:')
++ call Run_restricted_test('rubyfile somefile', 'E981:')
++ endfunc
++
++ func Test_restricted_tcl()
++ if !has('tcl')
++ throw 'Skipped: Tcl is not supported'
++ endif
++ call Run_restricted_test('tcl puts "Hello"', 'E981:')
++ call Run_restricted_test('tcldo puts "Hello"', 'E981:')
++ call Run_restricted_test('tclfile somefile', 'E981:')
++ endfunc
+*** ../vim-8.1.0880/src/testdir/Make_all.mak 2019-01-24 22:42:14.949304772 +0100
+--- src/testdir/Make_all.mak 2019-02-08 13:37:16.649924127 +0100
+***************
+*** 213,218 ****
+--- 213,219 ----
+ test_regexp_utf8 \
+ test_registers \
+ test_reltime \
++ test_restricted \
+ test_retab \
+ test_ruby \
+ test_scriptnames \
+***************
+*** 375,380 ****
+--- 376,382 ----
+ test_quotestar.res \
+ test_regex_char_classes.res \
+ test_registers.res \
++ test_restricted.res \
+ test_retab.res \
+ test_ruby.res \
+ test_scriptnames.res \
+*** ../vim-8.1.0880/src/version.c 2019-02-08 12:46:03.588784187 +0100
+--- src/version.c 2019-02-08 14:32:06.151387661 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 881,
+ /**/
+
+--
+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.0882 b/data/vim/patches/8.1.0882
new file mode 100644
index 000000000..29c68a765
--- /dev/null
+++ b/data/vim/patches/8.1.0882
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0882
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0882 (after 8.1.0879)
+Problem: Checking for FEAT_MBYTE which doesn't exist anymore. (Christ van
+ Willegen)
+Solution: Remove it.
+Files: src/fileio.c
+
+
+*** ../vim-8.1.0881/src/fileio.c 2019-02-08 12:21:26.631222734 +0100
+--- src/fileio.c 2019-02-08 14:38:50.004983102 +0100
+***************
+*** 7471,7477 ****
+ if (*p == '\\')
+ *p = '/';
+
+! #if defined(FEAT_MBYTE) && defined(WIN3264)
+ if (enc_utf8)
+ {
+ int len;
+--- 7471,7477 ----
+ if (*p == '\\')
+ *p = '/';
+
+! #if defined(WIN3264)
+ if (enc_utf8)
+ {
+ int len;
+*** ../vim-8.1.0881/src/version.c 2019-02-08 14:33:54.822761996 +0100
+--- src/version.c 2019-02-08 14:40:13.816412440 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 882,
+ /**/
+
+--
+Zen Microsystems: we're the om in .commmmmmmmm
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0883 b/data/vim/patches/8.1.0883
new file mode 100644
index 000000000..6d39a1f7e
--- /dev/null
+++ b/data/vim/patches/8.1.0883
@@ -0,0 +1,232 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0883
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0883
+Problem: Missing some changes for Ex commands.
+Solution: Add mising changes in header file.
+Files: src/ex_cmds.h
+
+
+*** ../vim-8.1.0882/src/ex_cmds.h 2019-01-24 17:18:37.599462306 +0100
+--- src/ex_cmds.h 2019-02-08 13:27:06.297328003 +0100
+***************
+*** 57,62 ****
+--- 57,63 ----
+ * curbuf_lock is set */
+ #define MODIFY 0x200000L /* forbidden in non-'modifiable' buffer */
+ #define EXFLAGS 0x400000L /* allow flags after count in argument */
++ #define RESTRICT 0x800000L /* forbidden in restricted mode */
+ #define FILES (XFILE | EXTRA) /* multiple extra files allowed */
+ #define WORD1 (EXTRA | NOSPC) /* one extra word allowed */
+ #define FILE1 (FILES | NOSPC) /* 1 file allowed, defaults to current file */
+***************
+*** 861,873 ****
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_lua, "lua", ex_lua,
+! RANGE|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_luado, "luado", ex_luado,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_luafile, "luafile", ex_luafile,
+! RANGE|FILE1|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_lvimgrep, "lvimgrep", ex_vimgrep,
+ RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+--- 862,874 ----
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_lua, "lua", ex_lua,
+! RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_luado, "luado", ex_luado,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_luafile, "luafile", ex_luafile,
+! RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_lvimgrep, "lvimgrep", ex_vimgrep,
+ RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+***************
+*** 930,939 ****
+ WORD1|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_mzscheme, "mzscheme", ex_mzscheme,
+! RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK,
+ ADDR_LINES),
+ EX(CMD_mzfile, "mzfile", ex_mzfile,
+! RANGE|FILE1|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_next, "next", ex_next,
+ RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+--- 931,940 ----
+ WORD1|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_mzscheme, "mzscheme", ex_mzscheme,
+! RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_mzfile, "mzfile", ex_mzfile,
+! RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_next, "next", ex_next,
+ RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+***************
+*** 1116,1152 ****
+ TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_python, "python", ex_python,
+! RANGE|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_pydo, "pydo", ex_pydo,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_pyfile, "pyfile", ex_pyfile,
+! RANGE|FILE1|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_py3, "py3", ex_py3,
+! RANGE|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_py3do, "py3do", ex_py3do,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_python3, "python3", ex_py3,
+! RANGE|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_py3file, "py3file", ex_py3file,
+! RANGE|FILE1|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_pyx, "pyx", ex_pyx,
+! RANGE|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_pyxdo, "pyxdo", ex_pyxdo,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_pythonx, "pythonx", ex_pyx,
+! RANGE|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_pyxfile, "pyxfile", ex_pyxfile,
+! RANGE|FILE1|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_quit, "quit", ex_quit,
+ BANG|RANGE|COUNT|NOTADR|TRLBAR|CMDWIN,
+--- 1117,1153 ----
+ TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_python, "python", ex_python,
+! RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_pydo, "pydo", ex_pydo,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_pyfile, "pyfile", ex_pyfile,
+! RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_py3, "py3", ex_py3,
+! RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_py3do, "py3do", ex_py3do,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_python3, "python3", ex_py3,
+! RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_py3file, "py3file", ex_py3file,
+! RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_pyx, "pyx", ex_pyx,
+! RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_pyxdo, "pyxdo", ex_pyxdo,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_pythonx, "pythonx", ex_pyx,
+! RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_pyxfile, "pyxfile", ex_pyxfile,
+! RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_quit, "quit", ex_quit,
+ BANG|RANGE|COUNT|NOTADR|TRLBAR|CMDWIN,
+***************
+*** 1203,1215 ****
+ BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_ruby, "ruby", ex_ruby,
+! RANGE|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_rubydo, "rubydo", ex_rubydo,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_rubyfile, "rubyfile", ex_rubyfile,
+! RANGE|FILE1|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_rundo, "rundo", ex_rundo,
+ NEEDARG|FILE1,
+--- 1204,1216 ----
+ BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_ruby, "ruby", ex_ruby,
+! RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_rubydo, "rubydo", ex_rubydo,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_rubyfile, "rubyfile", ex_rubyfile,
+! RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_rundo, "rundo", ex_rundo,
+ NEEDARG|FILE1,
+***************
+*** 1476,1488 ****
+ TRLBAR|CMDWIN,
+ ADDR_TABS),
+ EX(CMD_tcl, "tcl", ex_tcl,
+! RANGE|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_tcldo, "tcldo", ex_tcldo,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_tclfile, "tclfile", ex_tclfile,
+! RANGE|FILE1|NEEDARG|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_tearoff, "tearoff", ex_tearoff,
+ NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN,
+--- 1477,1489 ----
+ TRLBAR|CMDWIN,
+ ADDR_TABS),
+ EX(CMD_tcl, "tcl", ex_tcl,
+! RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_tcldo, "tcldo", ex_tcldo,
+! RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_tclfile, "tclfile", ex_tclfile,
+! RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_tearoff, "tearoff", ex_tearoff,
+ NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN,
+*** ../vim-8.1.0882/src/version.c 2019-02-08 14:41:27.007922657 +0100
+--- src/version.c 2019-02-08 16:50:08.626752465 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 883,
+ /**/
+
+--
+Females are strictly forbidden to appear unshaven in public.
+ [real standing law in New Mexico, 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.0884 b/data/vim/patches/8.1.0884
new file mode 100644
index 000000000..544ddd0f8
--- /dev/null
+++ b/data/vim/patches/8.1.0884
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0884
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0884
+Problem: Double check for bsd systems.
+Solution: Delete the old line.
+Files: src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0883/src/testdir/test_functions.vim 2019-02-07 21:27:10.998137488 +0100
+--- src/testdir/test_functions.vim 2019-02-08 23:08:03.245680706 +0100
+***************
+*** 1237,1243 ****
+ if has('unix') && executable('uname')
+ let uname = system('uname')
+ call assert_equal(uname =~? 'BeOS', has('beos'))
+- call assert_equal(uname =~? 'BSD\|DragonFly', has('bsd'))
+ " GNU userland on BSD kernels (e.g., GNU/kFreeBSD) don't have BSD defined
+ call assert_equal(uname =~? '\%(GNU/k\w\+\)\@<!BSD\|DragonFly', has('bsd'))
+ call assert_equal(uname =~? 'HP-UX', has('hpux'))
+--- 1237,1242 ----
+*** ../vim-8.1.0883/src/version.c 2019-02-08 16:50:22.786660536 +0100
+--- src/version.c 2019-02-08 23:09:13.289290244 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 884,
+ /**/
+
+--
+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.0885 b/data/vim/patches/8.1.0885
new file mode 100644
index 000000000..fb7651ad0
--- /dev/null
+++ b/data/vim/patches/8.1.0885
@@ -0,0 +1,50 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0885
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0885
+Problem: Test for restricted hangs on MS-Windows GUI.
+Solution: Skip the test.
+Files: src/testdir/test_restricted.vim
+
+
+*** ../vim-8.1.0884/src/testdir/test_restricted.vim 2019-02-08 14:33:54.822761996 +0100
+--- src/testdir/test_restricted.vim 2019-02-09 11:11:14.356440790 +0100
+***************
+*** 2,7 ****
+--- 2,12 ----
+
+ source shared.vim
+
++ if has('win32') && has('gui')
++ " Win32 GUI shows a dialog instead of displaying the error in the last line.
++ finish
++ endif
++
+ func Test_restricted()
+ let cmd = GetVimCommand('Xrestricted')
+ if cmd == ''
+*** ../vim-8.1.0884/src/version.c 2019-02-08 23:09:43.257123080 +0100
+--- src/version.c 2019-02-09 11:12:21.867963983 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 885,
+ /**/
+
+--
+"Software is like sex... it's better when it's free."
+ -- Linus Torvalds, initiator of the free Linux OS
+Makes me wonder what FSF stands for...?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0886 b/data/vim/patches/8.1.0886
new file mode 100644
index 000000000..c1e745ac8
--- /dev/null
+++ b/data/vim/patches/8.1.0886
@@ -0,0 +1,122 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0886
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0886
+Problem: Compiler warning for adding to NULL pointer and a condition that
+ is always true.
+Solution: Check for NULL pointer before adding. Remove useless "if".
+ (Friedirch, closes #3913)
+Files: src/dosinst.c, src/search.c
+
+
+*** ../vim-8.1.0885/src/dosinst.c 2019-01-11 20:37:07.714787395 +0100
+--- src/dosinst.c 2019-02-10 21:44:56.458673533 +0100
+***************
+*** 291,306 ****
+ {
+ char *bp = *destination;
+ size_t indir_l = strlen(installdir);
+! char *cp = bp + indir_l;
+ char *tmpname;
+ char *farname;
+
+ /*
+ * No action needed if exe not found or not in this directory.
+ */
+! if (bp == NULL
+! || strnicmp(bp, installdir, indir_l) != 0
+! || strchr("/\\", *cp++) == NULL
+ || strchr(cp, '\\') != NULL
+ || strchr(cp, '/') != NULL)
+ return;
+--- 291,307 ----
+ {
+ char *bp = *destination;
+ size_t indir_l = strlen(installdir);
+! char *cp;
+ char *tmpname;
+ char *farname;
+
+ /*
+ * No action needed if exe not found or not in this directory.
+ */
+! if (bp == NULL || strnicmp(bp, installdir, indir_l) != 0)
+! return;
+! cp = bp + indir_l;
+! if (strchr("/\\", *cp++) == NULL
+ || strchr(cp, '\\') != NULL
+ || strchr(cp, '/') != NULL)
+ return;
+*** ../vim-8.1.0885/src/search.c 2019-01-31 18:26:05.738803509 +0100
+--- src/search.c 2019-02-10 21:47:06.509782946 +0100
+***************
+*** 4732,4749 ****
+ VIsual_active = TRUE;
+ VIsual_mode = 'v';
+
+! if (VIsual_active)
+ {
+! redraw_curbuf_later(INVERTED); /* update the inversion */
+! if (*p_sel == 'e')
+! {
+! /* Correction for exclusive selection depends on the direction. */
+! if (forward && LTOREQ_POS(VIsual, curwin->w_cursor))
+! inc_cursor();
+! else if (!forward && LTOREQ_POS(curwin->w_cursor, VIsual))
+! inc(&VIsual);
+! }
+!
+ }
+
+ #ifdef FEAT_FOLDING
+--- 4732,4745 ----
+ VIsual_active = TRUE;
+ VIsual_mode = 'v';
+
+! redraw_curbuf_later(INVERTED); /* update the inversion */
+! if (*p_sel == 'e')
+ {
+! /* Correction for exclusive selection depends on the direction. */
+! if (forward && LTOREQ_POS(VIsual, curwin->w_cursor))
+! inc_cursor();
+! else if (!forward && LTOREQ_POS(curwin->w_cursor, VIsual))
+! inc(&VIsual);
+ }
+
+ #ifdef FEAT_FOLDING
+*** ../vim-8.1.0885/src/version.c 2019-02-09 11:13:07.003647800 +0100
+--- src/version.c 2019-02-10 21:43:46.203156639 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 886,
+ /**/
+
+--
+LETTERS TO THE EDITOR (The Times of London)
+
+Dear Sir,
+
+I am firmly opposed to the spread of microchips either to the home or
+to the office.  We have more than enough of them foisted upon us in
+public places.  They are a disgusting Americanism, and can only result
+in the farmers being forced to grow smaller potatoes, which in turn
+will cause massive unemployment in the already severely depressed
+agricultural industry.
+
+Yours faithfully,
+        Capt. Quinton D'Arcy, J. P.
+        Sevenoaks
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0887 b/data/vim/patches/8.1.0887
new file mode 100644
index 000000000..9767f4948
--- /dev/null
+++ b/data/vim/patches/8.1.0887
@@ -0,0 +1,105 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0887
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0887
+Problem: The 'l' flag in :subsitute is sticky.
+Solution: Reset the flag. (Dominique Pelle, closes #3925)
+Files: src/ex_cmds.c, src/testdir/test_substitute.vim
+
+
+*** ../vim-8.1.0886/src/ex_cmds.c 2019-02-08 14:33:54.818762019 +0100
+--- src/ex_cmds.c 2019-02-10 21:52:20.042996065 +0100
+***************
+*** 2098,2104 ****
+ fp_out = NULL;
+ # ifdef EEXIST
+ /* Avoid trying lots of names while the problem is lack
+! * of premission, only retry if the file already
+ * exists. */
+ if (errno != EEXIST)
+ break;
+--- 2098,2104 ----
+ fp_out = NULL;
+ # ifdef EEXIST
+ /* Avoid trying lots of names while the problem is lack
+! * of permission, only retry if the file already
+ * exists. */
+ if (errno != EEXIST)
+ break;
+***************
+*** 5040,5045 ****
+--- 5040,5046 ----
+ }
+ subflags.do_error = TRUE;
+ subflags.do_print = FALSE;
++ subflags.do_list = FALSE;
+ subflags.do_count = FALSE;
+ subflags.do_number = FALSE;
+ subflags.do_ic = 0;
+*** ../vim-8.1.0886/src/testdir/test_substitute.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_substitute.vim 2019-02-10 21:52:20.042996065 +0100
+***************
+*** 107,112 ****
+--- 107,138 ----
+ endfor
+ endfunc
+
++ " Test the l, p, # flags.
++ func Test_substitute_flags_lp()
++ new
++ call setline(1, "abc\tdef\<C-h>ghi")
++
++ let a = execute('s/a/a/p')
++ call assert_equal("\nabc def^Hghi", a)
++
++ let a = execute('s/a/a/l')
++ call assert_equal("\nabc^Idef^Hghi$", a)
++
++ let a = execute('s/a/a/#')
++ call assert_equal("\n 1 abc def^Hghi", a)
++
++ let a = execute('s/a/a/p#')
++ call assert_equal("\n 1 abc def^Hghi", a)
++
++ let a = execute('s/a/a/l#')
++ call assert_equal("\n 1 abc^Idef^Hghi$", a)
++
++ let a = execute('s/a/a/')
++ call assert_equal("", a)
++
++ bwipe!
++ endfunc
++
+ func Test_substitute_repeat()
+ " This caused an invalid memory access.
+ split Xfile
+*** ../vim-8.1.0886/src/version.c 2019-02-10 21:48:21.385272023 +0100
+--- src/version.c 2019-02-10 21:55:06.957451666 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 887,
+ /**/
+
+--
+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.0888 b/data/vim/patches/8.1.0888
new file mode 100644
index 000000000..967fa4a3d
--- /dev/null
+++ b/data/vim/patches/8.1.0888
@@ -0,0 +1,385 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0888
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0888
+Problem: The a: dict is not immutable as documented.
+Solution: Make the a:dict immutable, add a test. (Ozaki Kiichi, Yasuhiro
+ Matsumoto, closes #3929)
+Files: src/eval.c, src/userfunc.c, src/testdir/test_let.vim,
+ src/testdir/test_listdict.vim
+
+
+*** ../vim-8.1.0887/src/eval.c 2019-01-26 17:28:22.220599167 +0100
+--- src/eval.c 2019-02-10 22:04:07.884987095 +0100
+***************
+*** 2092,2105 ****
+
+ if (lp->ll_di == NULL)
+ {
+! /* Can't add "v:" variable. */
+! if (lp->ll_dict == &vimvardict)
+ {
+ semsg(_(e_illvar), name);
+ return NULL;
+ }
+
+! /* Key does not exist in dict: may need to add it. */
+ if (*p == '[' || *p == '.' || unlet)
+ {
+ if (!quiet)
+--- 2092,2106 ----
+
+ if (lp->ll_di == NULL)
+ {
+! // Can't add "v:" or "a:" variable.
+! if (lp->ll_dict == &vimvardict
+! || &lp->ll_dict->dv_hashtab == get_funccal_args_ht())
+ {
+ semsg(_(e_illvar), name);
+ return NULL;
+ }
+
+! // Key does not exist in dict: may need to add it.
+ if (*p == '[' || *p == '.' || unlet)
+ {
+ if (!quiet)
+***************
+*** 7919,7932 ****
+ }
+ else /* add a new variable */
+ {
+! /* Can't add "v:" variable. */
+! if (ht == &vimvarht)
+ {
+ semsg(_(e_illvar), name);
+ return;
+ }
+
+! /* Make sure the variable name is valid. */
+ if (!valid_varname(varname))
+ return;
+
+--- 7920,7933 ----
+ }
+ else /* add a new variable */
+ {
+! // Can't add "v:" or "a:" variable.
+! if (ht == &vimvarht || ht == get_funccal_args_ht())
+ {
+ semsg(_(e_illvar), name);
+ return;
+ }
+
+! // Make sure the variable name is valid.
+ if (!valid_varname(varname))
+ return;
+
+*** ../vim-8.1.0887/src/userfunc.c 2019-02-02 14:02:26.012222133 +0100
+--- src/userfunc.c 2019-02-10 22:00:22.410776043 +0100
+***************
+*** 772,778 ****
+ v = &fc->fixvar[fixvar_idx++].var;
+ name = v->di_key;
+ STRCPY(name, "self");
+! v->di_flags = DI_FLAGS_RO + DI_FLAGS_FIX;
+ hash_add(&fc->l_vars.dv_hashtab, DI2HIKEY(v));
+ v->di_tv.v_type = VAR_DICT;
+ v->di_tv.v_lock = 0;
+--- 772,778 ----
+ v = &fc->fixvar[fixvar_idx++].var;
+ name = v->di_key;
+ STRCPY(name, "self");
+! v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
+ hash_add(&fc->l_vars.dv_hashtab, DI2HIKEY(v));
+ v->di_tv.v_type = VAR_DICT;
+ v->di_tv.v_lock = 0;
+***************
+*** 788,793 ****
+--- 788,794 ----
+ init_var_dict(&fc->l_avars, &fc->l_avars_var, VAR_SCOPE);
+ add_nr_var(&fc->l_avars, &fc->fixvar[fixvar_idx++].var, "0",
+ (varnumber_T)(argcount - fp->uf_args.ga_len));
++ fc->l_avars.dv_lock = VAR_FIXED;
+ /* Use "name" to avoid a warning from some compiler that checks the
+ * destination size. */
+ v = &fc->fixvar[fixvar_idx++].var;
+*** ../vim-8.1.0887/src/testdir/test_let.vim 2017-08-04 22:16:54.000000000 +0200
+--- src/testdir/test_let.vim 2019-02-10 22:00:22.410776043 +0100
+***************
+*** 25,27 ****
+--- 25,148 ----
+ let s = "\na #1\nb #2"
+ call assert_equal(s, out)
+ endfunc
++
++ func s:set_arg1(a) abort
++ let a:a = 1
++ endfunction
++
++ func s:set_arg2(a) abort
++ let a:b = 1
++ endfunction
++
++ func s:set_arg3(a) abort
++ let b = a:
++ let b['a'] = 1
++ endfunction
++
++ func s:set_arg4(a) abort
++ let b = a:
++ let b['a'] = 1
++ endfunction
++
++ func s:set_arg5(a) abort
++ let b = a:
++ let b['a'][0] = 1
++ endfunction
++
++ func s:set_arg6(a) abort
++ let a:a[0] = 1
++ endfunction
++
++ func s:set_arg7(a) abort
++ call extend(a:, {'a': 1})
++ endfunction
++
++ func s:set_arg8(a) abort
++ call extend(a:, {'b': 1})
++ endfunction
++
++ func s:set_arg9(a) abort
++ let a:['b'] = 1
++ endfunction
++
++ func s:set_arg10(a) abort
++ let b = a:
++ call extend(b, {'a': 1})
++ endfunction
++
++ func s:set_arg11(a) abort
++ let b = a:
++ call extend(b, {'b': 1})
++ endfunction
++
++ func s:set_arg12(a) abort
++ let b = a:
++ let b['b'] = 1
++ endfunction
++
++ func Test_let_arg_fail()
++ call assert_fails('call s:set_arg1(1)', 'E46:')
++ call assert_fails('call s:set_arg2(1)', 'E461:')
++ call assert_fails('call s:set_arg3(1)', 'E46:')
++ call assert_fails('call s:set_arg4(1)', 'E46:')
++ call assert_fails('call s:set_arg5(1)', 'E46:')
++ call s:set_arg6([0])
++ call assert_fails('call s:set_arg7(1)', 'E742:')
++ call assert_fails('call s:set_arg8(1)', 'E742:')
++ call assert_fails('call s:set_arg9(1)', 'E461:')
++ call assert_fails('call s:set_arg10(1)', 'E742:')
++ call assert_fails('call s:set_arg11(1)', 'E742:')
++ call assert_fails('call s:set_arg12(1)', 'E461:')
++ endfunction
++
++ func s:set_varg1(...) abort
++ let a:000 = []
++ endfunction
++
++ func s:set_varg2(...) abort
++ let a:000[0] = 1
++ endfunction
++
++ func s:set_varg3(...) abort
++ let a:000 += [1]
++ endfunction
++
++ func s:set_varg4(...) abort
++ call add(a:000, 1)
++ endfunction
++
++ func s:set_varg5(...) abort
++ let a:000[0][0] = 1
++ endfunction
++
++ func s:set_varg6(...) abort
++ let b = a:000
++ let b[0] = 1
++ endfunction
++
++ func s:set_varg7(...) abort
++ let b = a:000
++ let b += [1]
++ endfunction
++
++ func s:set_varg8(...) abort
++ let b = a:000
++ call add(b, 1)
++ endfunction
++
++ func s:set_varg9(...) abort
++ let b = a:000
++ let b[0][0] = 1
++ endfunction
++
++ func Test_let_varg_fail()
++ call assert_fails('call s:set_varg1(1)', 'E46:')
++ call assert_fails('call s:set_varg2(1)', 'E742:')
++ call assert_fails('call s:set_varg3(1)', 'E46:')
++ call assert_fails('call s:set_varg4(1)', 'E742:')
++ call s:set_varg5([0])
++ call assert_fails('call s:set_varg6(1)', 'E742:')
++ " call assert_fails('call s:set_varg7(1)', 'E46:')
++ call assert_fails('call s:set_varg8(1)', 'E742:')
++ call s:set_varg9([0])
++ endfunction
+*** ../vim-8.1.0887/src/testdir/test_listdict.vim 2019-01-23 21:14:59.165314597 +0100
+--- src/testdir/test_listdict.vim 2019-02-10 22:05:27.764369544 +0100
+***************
+*** 500,516 ****
+
+ " No remove() of write-protected scope-level variable
+ func Tfunc1(this_is_a_long_parameter_name)
+! call assert_fails("call remove(a:, 'this_is_a_long_parameter_name')", 'E795')
+ endfunc
+ func Test_dict_scope_var_remove()
+ call Tfunc1('testval')
+ endfunc
+
+ " No extend() of write-protected scope-level variable
+ func Tfunc2(this_is_a_long_parameter_name)
+ call assert_fails("call extend(a:, {'this_is_a_long_parameter_name': 1234})", 'E742')
+ endfunc
+! func Test_dict_scope_var_extend()
+ call Tfunc2('testval')
+ endfunc
+
+--- 500,520 ----
+
+ " No remove() of write-protected scope-level variable
+ func Tfunc1(this_is_a_long_parameter_name)
+! call assert_fails("call remove(a:, 'this_is_a_long_parameter_name')", 'E742')
+ endfunc
+ func Test_dict_scope_var_remove()
+ call Tfunc1('testval')
+ endfunc
+
+ " No extend() of write-protected scope-level variable
++ func Test_dict_scope_var_extend()
++ call assert_fails("call extend(a:, {'this_is_a_long_parameter_name': 1234})", 'E742')
++ endfunc
++
+ func Tfunc2(this_is_a_long_parameter_name)
+ call assert_fails("call extend(a:, {'this_is_a_long_parameter_name': 1234})", 'E742')
+ endfunc
+! func Test_dict_scope_var_extend_overwrite()
+ call Tfunc2('testval')
+ endfunc
+
+***************
+*** 651,653 ****
+--- 655,729 ----
+ call assert_fails("call extend(d, d, 'error')", 'E737:')
+ call assert_equal({'a': {'b': 'B'}}, d)
+ endfunc
++
++ func s:check_scope_dict(x, fixed)
++ func s:gen_cmd(cmd, x)
++ return substitute(a:cmd, '\<x\ze:', a:x, 'g')
++ endfunc
++
++ let cmd = s:gen_cmd('let x:foo = 1', a:x)
++ if a:fixed
++ call assert_fails(cmd, 'E461')
++ else
++ exe cmd
++ exe s:gen_cmd('call assert_equal(1, x:foo)', a:x)
++ endif
++
++ let cmd = s:gen_cmd('let x:["bar"] = 2', a:x)
++ if a:fixed
++ call assert_fails(cmd, 'E461')
++ else
++ exe cmd
++ exe s:gen_cmd('call assert_equal(2, x:bar)', a:x)
++ endif
++
++ let cmd = s:gen_cmd('call extend(x:, {"baz": 3})', a:x)
++ if a:fixed
++ call assert_fails(cmd, 'E742')
++ else
++ exe cmd
++ exe s:gen_cmd('call assert_equal(3, x:baz)', a:x)
++ endif
++
++ if a:fixed
++ if a:x ==# 'a'
++ call assert_fails('unlet a:x', 'E795')
++ call assert_fails('call remove(a:, "x")', 'E742')
++ elseif a:x ==# 'v'
++ call assert_fails('unlet v:count', 'E795')
++ call assert_fails('call remove(v:, "count")', 'E742')
++ endif
++ else
++ exe s:gen_cmd('unlet x:foo', a:x)
++ exe s:gen_cmd('unlet x:bar', a:x)
++ exe s:gen_cmd('call remove(x:, "baz")', a:x)
++ endif
++
++ delfunc s:gen_cmd
++ endfunc
++
++ func Test_scope_dict()
++ " Test for g:
++ call s:check_scope_dict('g', v:false)
++
++ " Test for s:
++ call s:check_scope_dict('s', v:false)
++
++ " Test for l:
++ call s:check_scope_dict('l', v:false)
++
++ " Test for a:
++ call s:check_scope_dict('a', v:true)
++
++ " Test for b:
++ call s:check_scope_dict('b', v:false)
++
++ " Test for w:
++ call s:check_scope_dict('w', v:false)
++
++ " Test for t:
++ call s:check_scope_dict('t', v:false)
++
++ " Test for v:
++ call s:check_scope_dict('v', v:true)
++ endfunc
+*** ../vim-8.1.0887/src/version.c 2019-02-10 21:55:23.109307873 +0100
+--- src/version.c 2019-02-10 22:13:09.808900292 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 888,
+ /**/
+
+--
+ARTHUR: CHARGE!
+ [The mighty ARMY charges. Thundering noise of feet. Clatter of coconuts.
+ Shouts etc. Suddenly there is a wail of a siren and a couple of police
+ cars roar round in front of the charging ARMY and the POLICE leap out and
+ stop them. TWO POLICEMAN and the HISTORIAN'S WIFE. Black Marias skid up
+ behind them.]
+HISTORIAN'S WIFE: They're the ones, I'm sure.
+ "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.0889 b/data/vim/patches/8.1.0889
new file mode 100644
index 000000000..53b724cbe
--- /dev/null
+++ b/data/vim/patches/8.1.0889
@@ -0,0 +1,112 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0889
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0889
+Problem: MS-Windows: a channel write may hang.
+Solution: Check for WriteFile() not writing anything. (Yasuhiro Matsumoto,
+ closes #3920)
+Files: src/channel.c, src/testdir/test_channel.vim,
+ src/testdir/test_channel_pipe.py
+
+
+*** ../vim-8.1.0888/src/channel.c 2019-02-08 12:46:03.584784210 +0100
+--- src/channel.c 2019-02-10 22:23:11.048518527 +0100
+***************
+*** 91,99 ****
+ size = MAX_NAMED_PIPE_SIZE;
+ else
+ size = (DWORD)todo;
+! // If the pipe overflows while the job does not read the data, WriteFile
+! // will block forever. This abandons the write.
+ memset(&ov, 0, sizeof(ov));
+ if (!WriteFile(h, buf + done, size, &nwrite, &ov))
+ {
+ DWORD err = GetLastError();
+--- 91,100 ----
+ size = MAX_NAMED_PIPE_SIZE;
+ else
+ size = (DWORD)todo;
+! // If the pipe overflows while the job does not read the data,
+! // WriteFile() will block forever. This abandons the write.
+ memset(&ov, 0, sizeof(ov));
++ nwrite = 0;
+ if (!WriteFile(h, buf + done, size, &nwrite, &ov))
+ {
+ DWORD err = GetLastError();
+***************
+*** 104,109 ****
+--- 105,114 ----
+ return -1;
+ FlushFileBuffers(h);
+ }
++ else if (nwrite == 0)
++ // WriteFile() returns TRUE but did not write anything. This causes
++ // a hang, so bail out.
++ break;
+ todo -= nwrite;
+ done += nwrite;
+ }
+*** ../vim-8.1.0888/src/testdir/test_channel.vim 2019-01-31 15:52:05.269907631 +0100
+--- src/testdir/test_channel.vim 2019-02-10 22:16:00.363647792 +0100
+***************
+*** 2003,2008 ****
+--- 2003,2022 ----
+ endtry
+ endfunc
+
++ func Test_no_hang_windows()
++ if !has('job') || !has('win32')
++ return
++ endif
++
++ try
++ let job = job_start(s:python . " test_channel_pipe.py busy",
++ \ {'mode': 'raw', 'drop': 'never', 'noblock': 0})
++ call assert_fails('call ch_sendraw(job, repeat("X", 80000))', 'E631:')
++ finally
++ call job_stop(job)
++ endtry
++ endfunc
++
+ func Test_job_exitval_and_termsig()
+ if !has('unix')
+ return
+*** ../vim-8.1.0888/src/testdir/test_channel_pipe.py 2019-01-24 23:11:44.635650160 +0100
+--- src/testdir/test_channel_pipe.py 2019-02-10 22:16:00.363647792 +0100
+***************
+*** 18,23 ****
+--- 18,26 ----
+ print(sys.argv[1], end='')
+ sys.stdout.flush()
+ sys.exit(0)
++ elif sys.argv[1].startswith("busy"):
++ time.sleep(100)
++ sys.exit(0)
+ else:
+ print(sys.argv[1])
+ sys.stdout.flush()
+*** ../vim-8.1.0888/src/version.c 2019-02-10 22:14:24.184352831 +0100
+--- src/version.c 2019-02-10 22:17:35.942949889 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 889,
+ /**/
+
+--
+ [The rest of the ARMY stand around looking at a loss.]
+INSPECTOR END OF FILM: (picks up megaphone) All right! Clear off! Go on!
+ "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.0890 b/data/vim/patches/8.1.0890
new file mode 100644
index 000000000..451785125
--- /dev/null
+++ b/data/vim/patches/8.1.0890
@@ -0,0 +1,219 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0890
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0890
+Problem: Pty allocation wrong if using file for out channel and using null
+ for in channel and null for error channel.
+Solution: Correct using use_file_for_out in condition. (Ozaki Kiichi, closes
+ #3917)
+Files: src/os_unix.c, src/testdir/test_channel.vim
+
+
+*** ../vim-8.1.0889/src/os_unix.c 2019-01-31 15:52:05.265907656 +0100
+--- src/os_unix.c 2019-02-10 22:36:01.194231354 +0100
+***************
+*** 4196,4208 ****
+ /*
+ * Open a PTY, with FD for the master and slave side.
+ * When failing "pty_master_fd" and "pty_slave_fd" are -1.
+! * When successful both file descriptors are stored.
+ */
+ static void
+! open_pty(int *pty_master_fd, int *pty_slave_fd, char_u **namep)
+ {
+ char *tty_name;
+
+ *pty_master_fd = mch_openpty(&tty_name); // open pty
+ if (*pty_master_fd >= 0)
+ {
+--- 4196,4214 ----
+ /*
+ * Open a PTY, with FD for the master and slave side.
+ * When failing "pty_master_fd" and "pty_slave_fd" are -1.
+! * When successful both file descriptors are stored and the allocated pty name
+! * is stored in both "*name1" and "*name2".
+ */
+ static void
+! open_pty(int *pty_master_fd, int *pty_slave_fd, char_u **name1, char_u **name2)
+ {
+ char *tty_name;
+
++ if (name1 != NULL)
++ *name1 = NULL;
++ if (name2 != NULL)
++ *name2 = NULL;
++
+ *pty_master_fd = mch_openpty(&tty_name); // open pty
+ if (*pty_master_fd >= 0)
+ {
+***************
+*** 4219,4226 ****
+ close(*pty_master_fd);
+ *pty_master_fd = -1;
+ }
+! else if (namep != NULL)
+! *namep = vim_strsave((char_u *)tty_name);
+ }
+ }
+ #endif
+--- 4225,4237 ----
+ close(*pty_master_fd);
+ *pty_master_fd = -1;
+ }
+! else
+! {
+! if (name1 != NULL)
+! *name1 = vim_strsave((char_u *)tty_name);
+! if (name2 != NULL)
+! *name2 = vim_strsave((char_u *)tty_name);
+! }
+ }
+ }
+ #endif
+***************
+*** 4513,4519 ****
+ * If the slave can't be opened, close the master pty.
+ */
+ if (p_guipty && !(options & (SHELL_READ|SHELL_WRITE)))
+! open_pty(&pty_master_fd, &pty_slave_fd, NULL);
+ /*
+ * If not opening a pty or it didn't work, try using pipes.
+ */
+--- 4524,4530 ----
+ * If the slave can't be opened, close the master pty.
+ */
+ if (p_guipty && !(options & (SHELL_READ|SHELL_WRITE)))
+! open_pty(&pty_master_fd, &pty_slave_fd, NULL, NULL);
+ /*
+ * If not opening a pty or it didn't work, try using pipes.
+ */
+***************
+*** 5352,5364 ****
+
+ if (options->jo_pty
+ && (!(use_file_for_in || use_null_for_in)
+! || !(use_file_for_in || use_null_for_out)
+ || !(use_out_for_err || use_file_for_err || use_null_for_err)))
+! {
+! open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_out);
+! if (job->jv_tty_out != NULL)
+! job->jv_tty_in = vim_strsave(job->jv_tty_out);
+! }
+
+ /* TODO: without the channel feature connect the child to /dev/null? */
+ /* Open pipes for stdin, stdout, stderr. */
+--- 5363,5372 ----
+
+ if (options->jo_pty
+ && (!(use_file_for_in || use_null_for_in)
+! || !(use_file_for_out || use_null_for_out)
+ || !(use_out_for_err || use_file_for_err || use_null_for_err)))
+! open_pty(&pty_master_fd, &pty_slave_fd,
+! &job->jv_tty_out, &job->jv_tty_in);
+
+ /* TODO: without the channel feature connect the child to /dev/null? */
+ /* Open pipes for stdin, stdout, stderr. */
+***************
+*** 5834,5842 ****
+ int pty_slave_fd = -1;
+ channel_T *channel;
+
+! open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_out);
+! if (job->jv_tty_out != NULL)
+! job->jv_tty_in = vim_strsave(job->jv_tty_out);
+ close(pty_slave_fd);
+
+ channel = add_channel();
+--- 5842,5848 ----
+ int pty_slave_fd = -1;
+ channel_T *channel;
+
+! open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_out, &job->jv_tty_in);
+ close(pty_slave_fd);
+
+ channel = add_channel();
+*** ../vim-8.1.0889/src/testdir/test_channel.vim 2019-02-10 22:23:23.020415140 +0100
+--- src/testdir/test_channel.vim 2019-02-10 22:39:24.104680140 +0100
+***************
+*** 2040,2042 ****
+--- 2040,2094 ----
+ call assert_equal(-1, info.exitval)
+ call assert_equal("term", info.termsig)
+ endfunc
++
++ func Test_job_tty_in_out()
++ if !has('job') || !has('unix')
++ return
++ endif
++
++ call writefile(['test'], 'Xtestin')
++ let in_opts = [{},
++ \ {'in_io': 'null'},
++ \ {'in_io': 'file', 'in_name': 'Xtestin'}]
++ let out_opts = [{},
++ \ {'out_io': 'null'},
++ \ {'out_io': 'file', 'out_name': 'Xtestout'}]
++ let err_opts = [{},
++ \ {'err_io': 'null'},
++ \ {'err_io': 'file', 'err_name': 'Xtesterr'},
++ \ {'err_io': 'out'}]
++ let opts = []
++
++ for in_opt in in_opts
++ let x = copy(in_opt)
++ for out_opt in out_opts
++ call extend(x, out_opt)
++ for err_opt in err_opts
++ call extend(x, err_opt)
++ let opts += [extend({'pty': 1}, x)]
++ endfor
++ endfor
++ endfor
++
++ for opt in opts
++ let job = job_start('echo', opt)
++ let info = job_info(job)
++ let msg = printf('option={"in_io": "%s", "out_io": "%s", "err_io": "%s"}',
++ \ get(opt, 'in_io', 'tty'),
++ \ get(opt, 'out_io', 'tty'),
++ \ get(opt, 'err_io', 'tty'))
++
++ if !has_key(opt, 'in_io') || !has_key(opt, 'out_io') || !has_key(opt, 'err_io')
++ call assert_notequal('', info.tty_in, msg)
++ else
++ call assert_equal('', info.tty_in, msg)
++ endif
++ call assert_equal(info.tty_in, info.tty_out, msg)
++
++ call WaitForAssert({-> assert_equal('dead', job_status(job))})
++ endfor
++
++ call delete('Xtestin')
++ call delete('Xtestout')
++ call delete('Xtesterr')
++ endfunc
+*** ../vim-8.1.0889/src/version.c 2019-02-10 22:23:23.020415140 +0100
+--- src/version.c 2019-02-10 22:42:46.495151907 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 890,
+ /**/
+
+--
+"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.0891 b/data/vim/patches/8.1.0891
new file mode 100644
index 000000000..d897b585c
--- /dev/null
+++ b/data/vim/patches/8.1.0891
@@ -0,0 +1,131 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0891
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0891
+Problem: Substitute command inssuficiently tested.
+Solution: Add more test coverage. (Dominique Pelle)
+Files: src/testdir/test_substitute.vim
+
+
+*** ../vim-8.1.0890/src/testdir/test_substitute.vim 2019-02-10 21:55:23.109307873 +0100
+--- src/testdir/test_substitute.vim 2019-02-10 22:48:01.208799319 +0100
+***************
+*** 141,146 ****
+--- 141,230 ----
+ bwipe!
+ endfunc
+
++ " Test %s/\n// which is implemented as a special case to use a
++ " more efficient join rather than doing a regular substitution.
++ func Test_substitute_join()
++ new
++
++ call setline(1, ["foo\tbar", "bar\<C-H>foo"])
++ let a = execute('%s/\n//')
++ call assert_equal("", a)
++ call assert_equal(["foo\tbarbar\<C-H>foo"], getline(1, '$'))
++ call assert_equal('\n', histget("search", -1))
++
++ call setline(1, ["foo\tbar", "bar\<C-H>foo"])
++ let a = execute('%s/\n//g')
++ call assert_equal("", a)
++ call assert_equal(["foo\tbarbar\<C-H>foo"], getline(1, '$'))
++ call assert_equal('\n', histget("search", -1))
++
++ call setline(1, ["foo\tbar", "bar\<C-H>foo"])
++ let a = execute('%s/\n//p')
++ call assert_equal("\nfoo barbar^Hfoo", a)
++ call assert_equal(["foo\tbarbar\<C-H>foo"], getline(1, '$'))
++ call assert_equal('\n', histget("search", -1))
++
++ call setline(1, ["foo\tbar", "bar\<C-H>foo"])
++ let a = execute('%s/\n//l')
++ call assert_equal("\nfoo^Ibarbar^Hfoo$", a)
++ call assert_equal(["foo\tbarbar\<C-H>foo"], getline(1, '$'))
++ call assert_equal('\n', histget("search", -1))
++
++ call setline(1, ["foo\tbar", "bar\<C-H>foo"])
++ let a = execute('%s/\n//#')
++ call assert_equal("\n 1 foo barbar^Hfoo", a)
++ call assert_equal(["foo\tbarbar\<C-H>foo"], getline(1, '$'))
++ call assert_equal('\n', histget("search", -1))
++
++ bwipe!
++ endfunc
++
++ func Test_substitute_count()
++ new
++ call setline(1, ['foo foo', 'foo foo', 'foo foo', 'foo foo', 'foo foo'])
++ 2
++
++ s/foo/bar/3
++ call assert_equal(['foo foo', 'bar foo', 'bar foo', 'bar foo', 'foo foo'],
++ \ getline(1, '$'))
++
++ call assert_fails('s/foo/bar/0', 'E939:')
++
++ bwipe!
++ endfunc
++
++ " Test substitute 'n' flag (report number of matches, do not substitute).
++ func Test_substitute_flag_n()
++ new
++ let lines = ['foo foo', 'foo foo', 'foo foo', 'foo foo', 'foo foo']
++ call setline(1, lines)
++
++ call assert_equal("\n3 matches on 3 lines", execute('2,4s/foo/bar/n'))
++ call assert_equal("\n6 matches on 3 lines", execute('2,4s/foo/bar/gn'))
++
++ " c flag (confirm) should be ignored when using n flag.
++ call assert_equal("\n3 matches on 3 lines", execute('2,4s/foo/bar/nc'))
++
++ " No substitution should have been done.
++ call assert_equal(lines, getline(1, '$'))
++
++ bwipe!
++ endfunc
++
++ func Test_substitute_errors()
++ new
++ call setline(1, 'foobar')
++
++ call assert_fails('s/FOO/bar/', 'E486:')
++ call assert_fails('s/foo/bar/@', 'E488:')
++ call assert_fails('s/\(/bar/', 'E476:')
++
++ setl nomodifiable
++ call assert_fails('s/foo/bar/', 'E21:')
++
++ bwipe!
++ endfunc
++
+ " Test for *sub-replace-special* and *sub-replace-expression* on substitute().
+ func Test_sub_replace_1()
+ " Run the tests with 'magic' on
+*** ../vim-8.1.0890/src/version.c 2019-02-10 22:43:30.158824050 +0100
+--- src/version.c 2019-02-10 22:49:31.960124516 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 891,
+ /**/
+
+--
+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.0892 b/data/vim/patches/8.1.0892
new file mode 100644
index 000000000..ec187501f
--- /dev/null
+++ b/data/vim/patches/8.1.0892
@@ -0,0 +1,518 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0892
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0892
+Problem: Failure when closing a window when location list is in use.
+Solution: Handle the situation gracefully. Make sure memory for 'switchbuf'
+ is not freed at the wrong time. (Yegappan Lakshmanan,
+ closes #3928)
+Files: src/eval.c, src/evalfunc.c, src/proto/window.pro, src/quickfix.c,
+ src/testdir/test_quickfix.vim, src/window.c
+
+
+*** ../vim-8.1.0891/src/eval.c 2019-02-10 22:14:24.184352831 +0100
+--- src/eval.c 2019-02-10 22:55:04.745658531 +0100
+***************
+*** 8587,8593 ****
+ int nr = (int)tv_get_number_chk(vp, NULL);
+
+ if (nr >= LOWEST_WIN_ID)
+! return win_id2wp(vp);
+ return find_win_by_nr(vp, NULL);
+ }
+
+--- 8587,8593 ----
+ int nr = (int)tv_get_number_chk(vp, NULL);
+
+ if (nr >= LOWEST_WIN_ID)
+! return win_id2wp(tv_get_number(vp));
+ return find_win_by_nr(vp, NULL);
+ }
+
+*** ../vim-8.1.0891/src/evalfunc.c 2019-02-08 14:33:54.822761996 +0100
+--- src/evalfunc.c 2019-02-10 22:55:04.745658531 +0100
+***************
+*** 5800,5806 ****
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! wparg = win_id2wp(argvars);
+ if (wparg == NULL)
+ return;
+ }
+--- 5800,5806 ----
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! wparg = win_id2wp(tv_get_number(&argvars[0]));
+ if (wparg == NULL)
+ return;
+ }
+*** ../vim-8.1.0891/src/proto/window.pro 2018-09-13 17:26:31.091401618 +0200
+--- src/proto/window.pro 2019-02-10 22:55:04.749658501 +0100
+***************
+*** 91,97 ****
+ int win_getid(typval_T *argvars);
+ int win_gotoid(typval_T *argvars);
+ void win_id2tabwin(typval_T *argvars, list_T *list);
+! 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);
+--- 91,97 ----
+ int win_getid(typval_T *argvars);
+ int win_gotoid(typval_T *argvars);
+ void win_id2tabwin(typval_T *argvars, list_T *list);
+! win_T *win_id2wp(int id);
+ 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-8.1.0891/src/quickfix.c 2019-02-05 21:23:00.600559169 +0100
+--- src/quickfix.c 2019-02-10 22:55:04.749658501 +0100
+***************
+*** 1899,1921 ****
+ return;
+ *pqi = NULL; // Remove reference to this list
+
+ 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
+! {
+! // If the quickfix window buffer is loaded, then wipe it
+! wipe_qf_buffer(qi);
+
+! for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(&qi->qf_lists[i]);
+! vim_free(qi);
+! }
+ }
+ }
+
+--- 1899,1922 ----
+ return;
+ *pqi = NULL; // Remove reference to this 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);
++ return;
++ }
++
+ qi->qf_refcount--;
+ if (qi->qf_refcount < 1)
+ {
+ // No references to this location list.
+! // If the quickfix window buffer is loaded, then wipe it
+! wipe_qf_buffer(qi);
+
+! for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(&qi->qf_lists[i]);
+! vim_free(qi);
+ }
+ }
+
+***************
+*** 3018,3024 ****
+ qf_info_T *qi,
+ qfline_T *qf_ptr,
+ int forceit,
+! win_T *oldwin,
+ int *opened_window)
+ {
+ qf_list_T *qfl = &qi->qf_lists[qi->qf_curlist];
+--- 3019,3025 ----
+ qf_info_T *qi,
+ qfline_T *qf_ptr,
+ int forceit,
+! int prev_winid,
+ int *opened_window)
+ {
+ qf_list_T *qfl = &qi->qf_lists[qi->qf_curlist];
+***************
+*** 3039,3045 ****
+
+ 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,
+--- 3040,3046 ----
+
+ retval = do_ecmd(qf_ptr->qf_fnum, NULL, NULL, NULL, (linenr_T)1,
+ ECMD_HIDE + ECMD_SET_HELP,
+! prev_winid == curwin->w_id ? curwin : NULL);
+ }
+ else
+ retval = buflist_getfile(qf_ptr->qf_fnum,
+***************
+*** 3047,3057 ****
+
+ // 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))
+--- 3048,3062 ----
+
+ // If a location list, check whether the associated window is still
+ // present.
+! if (qfl_type == QFLT_LOCATION)
+ {
+! win_T *wp = win_id2wp(prev_winid);
+! if (wp == NULL && curwin->w_llist != qi)
+! {
+! emsg(_("E924: Current window was closed"));
+! *opened_window = FALSE;
+! return NOTDONE;
+! }
+ }
+
+ if (qfl_type == QFLT_QUICKFIX && !qflist_valid(NULL, save_qfid))
+***************
+*** 3211,3217 ****
+ int qf_index,
+ qfline_T *qf_ptr,
+ int forceit,
+! win_T *oldwin,
+ int *opened_window,
+ int openfold,
+ int print_message)
+--- 3216,3222 ----
+ int qf_index,
+ qfline_T *qf_ptr,
+ int forceit,
+! int prev_winid,
+ int *opened_window,
+ int openfold,
+ int print_message)
+***************
+*** 3227,3233 ****
+
+ if (qf_ptr->qf_fnum != 0)
+ {
+! retval = qf_jump_edit_buffer(qi, qf_ptr, forceit, oldwin,
+ opened_window);
+ if (retval != OK)
+ return retval;
+--- 3232,3238 ----
+
+ if (qf_ptr->qf_fnum != 0)
+ {
+! retval = qf_jump_edit_buffer(qi, qf_ptr, forceit, prev_winid,
+ opened_window);
+ if (retval != OK)
+ return retval;
+***************
+*** 3287,3294 ****
+ 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
+--- 3292,3299 ----
+ int old_qf_index;
+ char_u *old_swb = p_swb;
+ unsigned old_swb_flags = swb_flags;
++ int prev_winid;
+ int opened_window = FALSE;
+ int print_message = TRUE;
+ #ifdef FEAT_FOLDING
+ int old_KeyTyped = KeyTyped; // getting file may reset it
+***************
+*** 3304,3309 ****
+--- 3309,3316 ----
+ return;
+ }
+
++ incr_quickfix_busy();
++
+ qfl = &qi->qf_lists[qi->qf_curlist];
+
+ qf_ptr = qfl->qf_ptr;
+***************
+*** 3325,3337 ****
+ // window
+ print_message = FALSE;
+
+ retval = qf_jump_open_window(qi, qf_ptr, newwin, &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)
+ {
+--- 3332,3346 ----
+ // window
+ print_message = FALSE;
+
++ prev_winid = curwin->w_id;
++
+ retval = qf_jump_open_window(qi, qf_ptr, newwin, &opened_window);
+ if (retval == FAIL)
+ goto failed;
+ if (retval == NOTDONE)
+ goto theend;
+
+! retval = qf_jump_to_buffer(qi, qf_index, qf_ptr, forceit, prev_winid,
+ &opened_window, old_KeyTyped, print_message);
+ if (retval == NOTDONE)
+ {
+***************
+*** 3359,3365 ****
+ qfl->qf_ptr = qf_ptr;
+ qfl->qf_index = qf_index;
+ }
+! if (p_swb != old_swb && opened_window)
+ {
+ // Restore old 'switchbuf' value, but not when an autocommand or
+ // modeline has changed the value.
+--- 3368,3374 ----
+ qfl->qf_ptr = qf_ptr;
+ qfl->qf_index = qf_index;
+ }
+! if (p_swb != old_swb)
+ {
+ // Restore old 'switchbuf' value, but not when an autocommand or
+ // modeline has changed the value.
+***************
+*** 3371,3376 ****
+--- 3380,3386 ----
+ else
+ free_string_option(old_swb);
+ }
++ decr_quickfix_busy();
+ }
+
+ // Highlight attributes used for displaying entries from the quickfix list.
+***************
+*** 4004,4012 ****
+ 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)
+--- 4014,4022 ----
+ if (IS_LL_STACK(qi))
+ {
+ // For the location list window, create a reference to the
+! // location list stack from the window 'win'.
+! curwin->w_llist_ref = qi;
+! qi->qf_refcount++;
+ }
+
+ if (oldwin != curwin)
+*** ../vim-8.1.0891/src/testdir/test_quickfix.vim 2019-02-05 21:23:00.600559169 +0100
+--- src/testdir/test_quickfix.vim 2019-02-10 22:55:04.749658501 +0100
+***************
+*** 1,4 ****
+! " Test for the quickfix commands.
+
+ if !has('quickfix')
+ finish
+--- 1,4 ----
+! " Test for the quickfix feature.
+
+ if !has('quickfix')
+ finish
+***************
+*** 1419,1425 ****
+ \ {'filename': 'fnameD', 'text': 'D'},
+ \ {'filename': 'fnameE', 'text': 'E'}]
+
+! " {action} is unspecified. Same as specifing ' '.
+ new | only
+ silent! Xnewer 99
+ call g:Xsetlist(list1)
+--- 1419,1425 ----
+ \ {'filename': 'fnameD', 'text': 'D'},
+ \ {'filename': 'fnameE', 'text': 'E'}]
+
+! " {action} is unspecified. Same as specifying ' '.
+ new | only
+ silent! Xnewer 99
+ call g:Xsetlist(list1)
+***************
+*** 2348,2354 ****
+ " Open a new window and create a location list
+ " Open the location list window and close the other window
+ " Jump to an entry.
+! " Should create a new window and jump to the entry. The scrtach buffer
+ " should not be used.
+ enew | only
+ set buftype=nofile
+--- 2348,2354 ----
+ " Open a new window and create a location list
+ " Open the location list window and close the other window
+ " Jump to an entry.
+! " Should create a new window and jump to the entry. The scratch buffer
+ " should not be used.
+ enew | only
+ set buftype=nofile
+***************
+*** 3831,3837 ****
+ 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
+--- 3831,3837 ----
+ new | only
+
+ " When split opening files from a helpgrep location list window, a new help
+! " window should be opened with a copy of the location list.
+ lhelpgrep window
+ let locid = getloclist(0, {'id' : 0}).id
+ lwindow
+***************
+*** 3933,3940 ****
+ call assert_match(qfbnum . ' h- "\[Location List]"', execute('ls'))
+ call assert_true(bufloaded(qfbnum))
+
+ new | only
+! call assert_false(bufloaded(qfbnum))
+ endif
+ endfunc
+
+--- 3933,3962 ----
+ call assert_match(qfbnum . ' h- "\[Location List]"', execute('ls'))
+ call assert_true(bufloaded(qfbnum))
+
++ " When the location list is cleared for the window, the buffer should be
++ " removed
++ call setloclist(0, [], 'f')
++ call assert_false(bufexists(qfbnum))
++
++ " When the location list is freed with the location list window open, the
++ " location list buffer should not be lost. It should be reused when the
++ " location list is again populated.
++ lexpr "F1:10:Line10"
++ lopen
++ let wid = win_getid()
++ let qfbnum = bufnr('')
++ wincmd p
++ call setloclist(0, [], 'f')
++ lexpr "F1:10:Line10"
++ lopen
++ call assert_equal(wid, win_getid())
++ call assert_equal(qfbnum, bufnr(''))
++ lclose
++
++ " When the window with the location list is closed, the buffer should be
++ " removed
+ new | only
+! call assert_false(bufexists(qfbnum))
+ endif
+ endfunc
+
+***************
+*** 3942,3944 ****
+--- 3964,3992 ----
+ call Xqfbuf_test('c')
+ call Xqfbuf_test('l')
+ endfunc
++
++ " If there is an autocmd to use only one window, then opening the location
++ " list window used to crash Vim.
++ func Test_winonly_autocmd()
++ call s:create_test_file('Xtest1')
++ " Autocmd to show only one Vim window at a time
++ autocmd WinEnter * only
++ new
++ " Load the location list
++ lexpr "Xtest1:5:Line5\nXtest1:10:Line10\nXtest1:15:Line15"
++ let loclistid = getloclist(0, {'id' : 0}).id
++ " Open the location list window. Only this window will be shown and the file
++ " window is closed.
++ lopen
++ call assert_equal(loclistid, getloclist(0, {'id' : 0}).id)
++ " Jump to an entry in the location list and make sure that the cursor is
++ " positioned correctly.
++ ll 3
++ call assert_equal(loclistid, getloclist(0, {'id' : 0}).id)
++ call assert_equal('Xtest1', bufname(''))
++ call assert_equal(15, line('.'))
++ " Cleanup
++ autocmd! WinEnter
++ new | only
++ call delete('Xtest1')
++ endfunc
+*** ../vim-8.1.0891/src/window.c 2019-01-31 18:26:05.742803481 +0100
+--- src/window.c 2019-02-10 22:55:04.749658501 +0100
+***************
+*** 7193,7203 ****
+ }
+
+ win_T *
+! win_id2wp(typval_T *argvars)
+ {
+ win_T *wp;
+ tabpage_T *tp;
+- int id = tv_get_number(&argvars[0]);
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ if (wp->w_id == id)
+--- 7193,7202 ----
+ }
+
+ win_T *
+! win_id2wp(int id)
+ {
+ win_T *wp;
+ tabpage_T *tp;
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ if (wp->w_id == id)
+*** ../vim-8.1.0891/src/version.c 2019-02-10 22:50:08.011856775 +0100
+--- src/version.c 2019-02-10 22:55:47.289343987 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 892,
+ /**/
+
+--
+JOHN CLEESE PLAYED: SECOND SOLDIER WITH A KEEN INTEREST IN BIRDS, LARGE MAN
+ WITH DEAD BODY, BLACK KNIGHT, MR NEWT (A VILLAGE
+ BLACKSMITH INTERESTED IN BURNING WITCHES), A QUITE
+ EXTRAORDINARILY RUDE FRENCHMAN, TIM THE WIZARD, SIR
+ LAUNCELOT
+ "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.0893 b/data/vim/patches/8.1.0893
new file mode 100644
index 000000000..0ccf5b95f
--- /dev/null
+++ b/data/vim/patches/8.1.0893
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0893
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0893
+Problem: Terminal test is a bit flaky.
+Solution: Add test_terminal_no_cmd() to list of flaky tests.
+Files: src/testdir/runtest.vim
+
+
+*** ../vim-8.1.0892/src/testdir/runtest.vim 2019-01-24 17:59:35.135217476 +0100
+--- src/testdir/runtest.vim 2019-02-10 22:41:27.007750294 +0100
+***************
+*** 310,315 ****
+--- 310,316 ----
+ \ 'Test_terminal_env()',
+ \ 'Test_terminal_hide_buffer()',
+ \ 'Test_terminal_make_change()',
++ \ 'Test_terminal_no_cmd()',
+ \ 'Test_terminal_noblock()',
+ \ 'Test_terminal_redir_file()',
+ \ 'Test_terminal_response_to_control_sequence()',
+*** ../vim-8.1.0892/src/version.c 2019-02-10 22:58:58.980414768 +0100
+--- src/version.c 2019-02-10 23:03:19.687457110 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 893,
+ /**/
+
+--
+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.0894 b/data/vim/patches/8.1.0894
new file mode 100644
index 000000000..7112d6403
--- /dev/null
+++ b/data/vim/patches/8.1.0894
@@ -0,0 +1,453 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0894
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0894
+Problem: MS-Windows: resolve() does not return a reparse point.
+Solution: Improve resolve(). (Yasuhiro Matsumoto, closes #3896)
+Files: runtime/doc/eval.txt, src/buffer.c, src/evalfunc.c,
+ src/os_mswin.c, src/proto/os_mswin.pro,
+ src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0893/runtime/doc/eval.txt 2019-02-08 12:46:03.584784210 +0100
+--- runtime/doc/eval.txt 2019-02-10 23:05:41.630790837 +0100
+***************
+*** 7330,7335 ****
+--- 7385,7393 ----
+ resolve({filename}) *resolve()* *E655*
+ On MS-Windows, when {filename} is a shortcut (a .lnk file),
+ returns the path the shortcut points to in a simplified form.
++ When {filename} is a symbolic link or junction point, return
++ the full path to the target. If the target of junction is
++ removed, return {filename}.
+ On Unix, repeat resolving symbolic links in all path
+ components of {filename} and return the simplified result.
+ To cope with link cycles, resolving of symbolic links is
+*** ../vim-8.1.0893/src/buffer.c 2019-02-05 21:23:00.600559169 +0100
+--- src/buffer.c 2019-02-10 23:05:41.630790837 +0100
+***************
+*** 4847,4853 ****
+ 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_free(*ffname);
+--- 4847,4853 ----
+ char_u *rfname;
+
+ // If the file name is a shortcut file, use the file it links to.
+! rfname = mch_resolve_path(*ffname, FALSE);
+ if (rfname != NULL)
+ {
+ vim_free(*ffname);
+*** ../vim-8.1.0893/src/evalfunc.c 2019-02-10 22:58:58.976414779 +0100
+--- src/evalfunc.c 2019-02-10 23:05:41.630790837 +0100
+***************
+*** 9912,9918 ****
+ {
+ char_u *v = NULL;
+
+! v = mch_resolve_shortcut(p);
+ if (v != NULL)
+ rettv->vval.v_string = v;
+ else
+--- 9912,9918 ----
+ {
+ char_u *v = NULL;
+
+! v = mch_resolve_path(p, TRUE);
+ if (v != NULL)
+ rettv->vval.v_string = v;
+ else
+*** ../vim-8.1.0893/src/os_mswin.c 2019-01-24 16:38:58.272712472 +0100
+--- src/os_mswin.c 2019-02-10 23:12:31.960522594 +0100
+***************
+*** 1823,1835 ****
+ # include <shlobj.h>
+ # endif
+
+ /*
+ * When "fname" is the name of a shortcut (*.lnk) resolve the file it points
+ * to and return that name in allocated memory.
+ * Otherwise NULL is returned.
+ */
+! char_u *
+! mch_resolve_shortcut(char_u *fname)
+ {
+ HRESULT hr;
+ IShellLink *psl = NULL;
+--- 1823,2003 ----
+ # include <shlobj.h>
+ # endif
+
++ typedef enum _FILE_INFO_BY_HANDLE_CLASS_ {
++ FileBasicInfo_,
++ FileStandardInfo_,
++ FileNameInfo_,
++ FileRenameInfo_,
++ FileDispositionInfo_,
++ FileAllocationInfo_,
++ FileEndOfFileInfo_,
++ FileStreamInfo_,
++ FileCompressionInfo_,
++ FileAttributeTagInfo_,
++ FileIdBothDirectoryInfo_,
++ FileIdBothDirectoryRestartInfo_,
++ FileIoPriorityHintInfo_,
++ FileRemoteProtocolInfo_,
++ FileFullDirectoryInfo_,
++ FileFullDirectoryRestartInfo_,
++ FileStorageInfo_,
++ FileAlignmentInfo_,
++ FileIdInfo_,
++ FileIdExtdDirectoryInfo_,
++ FileIdExtdDirectoryRestartInfo_,
++ FileDispositionInfoEx_,
++ FileRenameInfoEx_,
++ MaximumFileInfoByHandleClass_
++ } FILE_INFO_BY_HANDLE_CLASS_;
++
++ typedef struct _FILE_NAME_INFO_ {
++ DWORD FileNameLength;
++ WCHAR FileName[1];
++ } FILE_NAME_INFO_;
++
++ typedef BOOL (WINAPI *pfnGetFileInformationByHandleEx)(
++ HANDLE hFile,
++ FILE_INFO_BY_HANDLE_CLASS_ FileInformationClass,
++ LPVOID lpFileInformation,
++ DWORD dwBufferSize);
++ static pfnGetFileInformationByHandleEx pGetFileInformationByHandleEx = NULL;
++
++ typedef BOOL (WINAPI *pfnGetVolumeInformationByHandleW)(
++ HANDLE hFile,
++ LPWSTR lpVolumeNameBuffer,
++ DWORD nVolumeNameSize,
++ LPDWORD lpVolumeSerialNumber,
++ LPDWORD lpMaximumComponentLength,
++ LPDWORD lpFileSystemFlags,
++ LPWSTR lpFileSystemNameBuffer,
++ DWORD nFileSystemNameSize);
++ static pfnGetVolumeInformationByHandleW pGetVolumeInformationByHandleW = NULL;
++
++ char_u *
++ resolve_reparse_point(char_u *fname)
++ {
++ HANDLE h = INVALID_HANDLE_VALUE;
++ DWORD size;
++ char_u *rfname = NULL;
++ FILE_NAME_INFO_ *nameinfo = NULL;
++ WCHAR buff[MAX_PATH], *volnames = NULL;
++ HANDLE hv;
++ DWORD snfile, snfind;
++ static BOOL loaded = FALSE;
++
++ if (pGetFileInformationByHandleEx == NULL ||
++ pGetVolumeInformationByHandleW == NULL)
++ {
++ HMODULE hmod = GetModuleHandle("kernel32.dll");
++
++ if (loaded == TRUE)
++ return NULL;
++ pGetFileInformationByHandleEx = (pfnGetFileInformationByHandleEx)
++ GetProcAddress(hmod, "GetFileInformationByHandleEx");
++ pGetVolumeInformationByHandleW = (pfnGetVolumeInformationByHandleW)
++ GetProcAddress(hmod, "GetVolumeInformationByHandleW");
++ loaded = TRUE;
++ if (pGetFileInformationByHandleEx == NULL ||
++ pGetVolumeInformationByHandleW == NULL)
++ return NULL;
++ }
++
++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
++ {
++ WCHAR *p;
++
++ p = enc_to_utf16(fname, NULL);
++ if (p == NULL)
++ goto fail;
++
++ if ((GetFileAttributesW(p) & FILE_ATTRIBUTE_REPARSE_POINT) == 0)
++ {
++ vim_free(p);
++ goto fail;
++ }
++
++ h = CreateFileW(p, 0, 0, NULL, OPEN_EXISTING,
++ FILE_FLAG_BACKUP_SEMANTICS, NULL);
++ vim_free(p);
++ }
++ else
++ {
++ if ((GetFileAttributes((char*) fname) &
++ FILE_ATTRIBUTE_REPARSE_POINT) == 0)
++ goto fail;
++
++ h = CreateFile((char*) fname, 0, 0, NULL, OPEN_EXISTING,
++ FILE_FLAG_BACKUP_SEMANTICS, NULL);
++ }
++
++ if (h == INVALID_HANDLE_VALUE)
++ goto fail;
++
++ size = sizeof(FILE_NAME_INFO_) + sizeof(WCHAR) * (MAX_PATH - 1);
++ nameinfo = (FILE_NAME_INFO_*)alloc(size + sizeof(WCHAR));
++ if (nameinfo == NULL)
++ goto fail;
++
++ if (!pGetFileInformationByHandleEx(h, FileNameInfo_, nameinfo, size))
++ goto fail;
++
++ nameinfo->FileName[nameinfo->FileNameLength / sizeof(WCHAR)] = 0;
++
++ if (!pGetVolumeInformationByHandleW(
++ h, NULL, 0, &snfile, NULL, NULL, NULL, 0))
++ goto fail;
++
++ hv = FindFirstVolumeW(buff, MAX_PATH);
++ if (hv == INVALID_HANDLE_VALUE)
++ goto fail;
++
++ do {
++ GetVolumeInformationW(
++ buff, NULL, 0, &snfind, NULL, NULL, NULL, 0);
++ if (snfind == snfile)
++ break;
++ } while (FindNextVolumeW(hv, buff, MAX_PATH));
++
++ FindVolumeClose(hv);
++
++ if (snfind != snfile)
++ goto fail;
++
++ size = 0;
++ if (!GetVolumePathNamesForVolumeNameW(buff, NULL, 0, &size) &&
++ GetLastError() != ERROR_MORE_DATA)
++ goto fail;
++
++ volnames = (WCHAR*)alloc(size * sizeof(WCHAR));
++ if (!GetVolumePathNamesForVolumeNameW(buff, volnames, size,
++ &size))
++ goto fail;
++
++ wcscpy(buff, volnames);
++ if (nameinfo->FileName[0] == '\\')
++ wcscat(buff, nameinfo->FileName + 1);
++ else
++ wcscat(buff, nameinfo->FileName);
++ rfname = utf16_to_enc(buff, NULL);
++
++ fail:
++ if (h != INVALID_HANDLE_VALUE)
++ CloseHandle(h);
++ if (nameinfo != NULL)
++ vim_free(nameinfo);
++ if (volnames != NULL)
++ vim_free(volnames);
++
++ return rfname;
++ }
++
+ /*
+ * When "fname" is the name of a shortcut (*.lnk) resolve the file it points
+ * to and return that name in allocated memory.
+ * Otherwise NULL is returned.
+ */
+! static char_u *
+! resolve_shortcut(char_u *fname)
+ {
+ HRESULT hr;
+ IShellLink *psl = NULL;
+***************
+*** 1937,1942 ****
+--- 2105,2120 ----
+ CoUninitialize();
+ return rfname;
+ }
++
++ char_u *
++ mch_resolve_path(char_u *fname, int reparse_point)
++ {
++ char_u *path = resolve_shortcut(fname);
++
++ if (path == NULL && reparse_point)
++ path = resolve_reparse_point(fname);
++ return path;
++ }
+ #endif
+
+ #if (defined(FEAT_EVAL) && !defined(FEAT_GUI)) || defined(PROTO)
+*** ../vim-8.1.0893/src/proto/os_mswin.pro 2018-05-17 13:53:03.000000000 +0200
+--- src/proto/os_mswin.pro 2019-02-10 23:05:41.634790818 +0100
+***************
+*** 37,43 ****
+ 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);
+! char_u *mch_resolve_shortcut(char_u *fname);
+ void win32_set_foreground(void);
+ void serverInitMessaging(void);
+ void serverSetName(char_u *name);
+--- 37,43 ----
+ 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);
+! char_u *mch_resolve_path(char_u *fname, int reparse_point);
+ void win32_set_foreground(void);
+ void serverInitMessaging(void);
+ void serverSetName(char_u *name);
+*** ../vim-8.1.0893/src/testdir/test_functions.vim 2019-02-08 23:09:43.257123080 +0100
+--- src/testdir/test_functions.vim 2019-02-10 23:05:41.634790818 +0100
+***************
+*** 188,194 ****
+ call assert_fails('call strftime("%Y", [])', 'E745:')
+ endfunc
+
+! func Test_resolve()
+ if !has('unix')
+ return
+ endif
+--- 188,194 ----
+ call assert_fails('call strftime("%Y", [])', 'E745:')
+ endfunc
+
+! func Test_resolve_unix()
+ if !has('unix')
+ return
+ endif
+***************
+*** 234,239 ****
+--- 234,336 ----
+ call delete('Xlink1')
+ endfunc
+
++ func s:normalize_fname(fname)
++ let ret = substitute(a:fname, '\', '/', 'g')
++ let ret = substitute(ret, '//', '/', 'g')
++ let ret = tolower(ret)
++ endfunc
++
++ func Test_resolve_win32()
++ if !has('win32')
++ return
++ endif
++
++ " test for shortcut file
++ if executable('cscript')
++ new Xfile
++ wq
++ call writefile([
++ \ 'Set fs = CreateObject("Scripting.FileSystemObject")',
++ \ 'Set ws = WScript.CreateObject("WScript.Shell")',
++ \ 'Set shortcut = ws.CreateShortcut("Xlink.lnk")',
++ \ 'shortcut.TargetPath = fs.BuildPath(ws.CurrentDirectory, "Xfile")',
++ \ 'shortcut.Save'
++ \], 'link.vbs')
++ silent !cscript link.vbs
++ call delete('link.vbs')
++ call assert_equal(s:normalize_fname(getcwd() . '\Xfile'), s:normalize_fname(resolve('./Xlink.lnk')))
++ call delete('Xfile')
++
++ call assert_equal(s:normalize_fname(getcwd() . '\Xfile'), s:normalize_fname(resolve('./Xlink.lnk')))
++ call delete('Xlink.lnk')
++ else
++ echomsg 'skipped test for shortcut file'
++ endif
++
++ " remove files
++ call delete('Xlink')
++ call delete('Xdir', 'd')
++ call delete('Xfile')
++
++ " test for symbolic link to a file
++ new Xfile
++ wq
++ silent !mklink Xlink Xfile
++ if !v:shell_error
++ call assert_equal(s:normalize_fname(getcwd() . '\Xfile'), s:normalize_fname(resolve('./Xlink')))
++ call delete('Xlink')
++ else
++ echomsg 'skipped test for symbolic link to a file'
++ endif
++ call delete('Xfile')
++
++ " test for junction to a directory
++ call mkdir('Xdir')
++ silent !mklink /J Xlink Xdir
++ if !v:shell_error
++ call assert_equal(s:normalize_fname(getcwd() . '\Xdir'), s:normalize_fname(resolve(getcwd() . '/Xlink')))
++
++ call delete('Xdir', 'd')
++
++ " test for junction already removed
++ call assert_equal(s:normalize_fname(getcwd() . '\Xlink'), s:normalize_fname(resolve(getcwd() . '/Xlink')))
++ call delete('Xlink')
++ else
++ echomsg 'skipped test for junction to a directory'
++ call delete('Xdir', 'd')
++ endif
++
++ " test for symbolic link to a directory
++ call mkdir('Xdir')
++ silent !mklink /D Xlink Xdir
++ if !v:shell_error
++ call assert_equal(s:normalize_fname(getcwd() . '\Xdir'), s:normalize_fname(resolve(getcwd() . '/Xlink')))
++
++ call delete('Xdir', 'd')
++
++ " test for symbolic link already removed
++ call assert_equal(s:normalize_fname(getcwd() . '\Xlink'), s:normalize_fname(resolve(getcwd() . '/Xlink')))
++ call delete('Xlink')
++ else
++ echomsg 'skipped test for symbolic link to a directory'
++ call delete('Xdir', 'd')
++ endif
++
++ " test for buffer name
++ new Xfile
++ wq
++ silent !mklink Xlink Xfile
++ if !v:shell_error
++ edit Xlink
++ call assert_equal('Xlink', bufname('%'))
++ call delete('Xlink')
++ bw!
++ else
++ echomsg 'skipped test for buffer name'
++ endif
++ call delete('Xfile')
++ endfunc
++
+ func Test_simplify()
+ call assert_equal('', simplify(''))
+ call assert_equal('/', simplify('/'))
+*** ../vim-8.1.0893/src/version.c 2019-02-10 23:04:07.111243690 +0100
+--- src/version.c 2019-02-10 23:07:43.138163286 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 894,
+ /**/
+
+--
+ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
+ KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
+ HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
+ LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER),
+ BROTHER MAYNARD
+ "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.0895 b/data/vim/patches/8.1.0895
new file mode 100644
index 000000000..5ede315d5
--- /dev/null
+++ b/data/vim/patches/8.1.0895
@@ -0,0 +1,134 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0895
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0895 (after 8.1.0879)
+Problem: MS-Windows: dealing with temp name encoding not quite right.
+Solution: Use more wide functions. (Ken Takata, closes #3921)
+Files: src/fileio.c
+
+
+*** ../vim-8.1.0894/src/fileio.c 2019-02-08 14:41:27.007922657 +0100
+--- src/fileio.c 2019-02-10 23:25:09.355719242 +0100
+***************
+*** 7322,7327 ****
+--- 7322,7329 ----
+ {
+ #ifdef USE_TMPNAM
+ char_u itmp[L_tmpnam]; /* use tmpnam() */
++ #elif defined(WIN3264)
++ WCHAR itmp[TEMPNAMELEN];
+ #else
+ char_u itmp[TEMPNAMELEN];
+ #endif
+***************
+*** 7443,7493 ****
+ #else /* TEMPDIRNAMES */
+
+ # ifdef WIN3264
+! char szTempFile[_MAX_PATH + 1];
+! char buf4[4];
+ char_u *retval;
+ char_u *p;
+
+! STRCPY(itmp, "");
+! if (GetTempPath(_MAX_PATH, szTempFile) == 0)
+ {
+! szTempFile[0] = '.'; /* GetTempPath() failed, use current dir */
+! szTempFile[1] = NUL;
+ }
+! strcpy(buf4, "VIM");
+ buf4[2] = extra_char; /* make it "VIa", "VIb", etc. */
+! if (GetTempFileName(szTempFile, buf4, 0, (LPSTR)itmp) == 0)
+ return NULL;
+ if (!keep)
+! /* GetTempFileName() will create the file, we don't want that */
+! (void)DeleteFile((LPSTR)itmp);
+
+! /* Backslashes in a temp file name cause problems when filtering with
+! * "sh". NOTE: This also checks 'shellcmdflag' to help those people who
+! * didn't set 'shellslash'. */
+! retval = vim_strsave(itmp);
+ if (*p_shcf == '-' || p_ssl)
+ for (p = retval; *p; ++p)
+ if (*p == '\\')
+ *p = '/';
+-
+- #if defined(WIN3264)
+- if (enc_utf8)
+- {
+- int len;
+- char_u *pp = NULL;
+-
+- // Convert from active codepage to UTF-8 since mch_call_shell()
+- // converts command-line to wide string from encoding.
+- acp_to_enc(retval, (int)STRLEN(retval), &pp, &len);
+- if (pp != NULL)
+- {
+- vim_free(retval);
+- return pp;
+- }
+- }
+- #endif
+-
+ return retval;
+
+ # else /* WIN3264 */
+--- 7445,7477 ----
+ #else /* TEMPDIRNAMES */
+
+ # ifdef WIN3264
+! WCHAR wszTempFile[_MAX_PATH + 1];
+! WCHAR buf4[4];
+ char_u *retval;
+ char_u *p;
+
+! wcscpy(itmp, L"");
+! if (GetTempPathW(_MAX_PATH, wszTempFile) == 0)
+ {
+! wszTempFile[0] = L'.'; // GetTempPathW() failed, use current dir
+! wszTempFile[1] = NUL;
+ }
+! wcscpy(buf4, L"VIM");
+ buf4[2] = extra_char; /* make it "VIa", "VIb", etc. */
+! if (GetTempFileNameW(wszTempFile, buf4, 0, itmp) == 0)
+ return NULL;
+ if (!keep)
+! // GetTempFileName() will create the file, we don't want that
+! (void)DeleteFileW(itmp);
+
+! // Backslashes in a temp file name cause problems when filtering with
+! // "sh". NOTE: This also checks 'shellcmdflag' to help those people who
+! // didn't set 'shellslash'.
+! retval = utf16_to_enc(itmp, NULL);
+ if (*p_shcf == '-' || p_ssl)
+ for (p = retval; *p; ++p)
+ if (*p == '\\')
+ *p = '/';
+ return retval;
+
+ # else /* WIN3264 */
+*** ../vim-8.1.0894/src/version.c 2019-02-10 23:18:49.038187525 +0100
+--- src/version.c 2019-02-10 23:25:57.095404785 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 895,
+ /**/
+
+--
+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.0896 b/data/vim/patches/8.1.0896
new file mode 100644
index 000000000..d32d3453f
--- /dev/null
+++ b/data/vim/patches/8.1.0896
@@ -0,0 +1,110 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0896
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0896
+Problem: Tests for restricted mode no run for MS-Windows GUI.
+Solution: Make tests also work in MS-Windows GUI.
+Files: src/testdir/test_restricted.vim
+
+
+*** ../vim-8.1.0895/src/testdir/test_restricted.vim 2019-02-09 11:13:07.003647800 +0100
+--- src/testdir/test_restricted.vim 2019-02-11 21:43:42.560393515 +0100
+***************
+*** 2,28 ****
+
+ source shared.vim
+
+! if has('win32') && has('gui')
+! " Win32 GUI shows a dialog instead of displaying the error in the last line.
+! finish
+! endif
+
+ func Test_restricted()
+! let cmd = GetVimCommand('Xrestricted')
+! if cmd == ''
+! return
+! endif
+!
+! call writefile([
+! \ "silent !ls",
+! \ "call writefile([v:errmsg], 'Xrestrout')",
+! \ "qa!",
+! \ ], 'Xrestricted')
+! call system(cmd . ' -Z')
+! call assert_match('E145:', join(readfile('Xrestrout')))
+!
+! call delete('Xrestricted')
+! call delete('Xrestrout')
+ endfunc
+
+ func Run_restricted_test(ex_cmd, error)
+--- 2,14 ----
+
+ source shared.vim
+
+! "if has('win32') && has('gui')
+! " " Win32 GUI shows a dialog instead of displaying the error in the last line.
+! " finish
+! "endif
+
+ func Test_restricted()
+! call Run_restricted_test('!ls', 'E145:')
+ endfunc
+
+ func Run_restricted_test(ex_cmd, error)
+***************
+*** 31,40 ****
+ return
+ endif
+
+ call writefile([
+! \ a:ex_cmd,
+! \ "call writefile([v:errmsg], 'Xrestrout')",
+! \ "qa!",
+ \ ], 'Xrestricted')
+ call system(cmd . ' -Z')
+ call assert_match(a:error, join(readfile('Xrestrout')))
+--- 17,31 ----
+ return
+ endif
+
++ " Use a VimEnter autocommand to avoid that the error message is displayed in
++ " a dialog with an OK button.
+ call writefile([
+! \ "func Init()",
+! \ " silent! " . a:ex_cmd,
+! \ " call writefile([v:errmsg], 'Xrestrout')",
+! \ " qa!",
+! \ "endfunc",
+! \ "au VimEnter * call Init()",
+ \ ], 'Xrestricted')
+ call system(cmd . ' -Z')
+ call assert_match(a:error, join(readfile('Xrestrout')))
+*** ../vim-8.1.0895/src/version.c 2019-02-10 23:26:10.099319000 +0100
+--- src/version.c 2019-02-11 21:42:44.812691413 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 896,
+ /**/
+
+--
+(letter from Mark to Mike, about the film's probable certificate)
+ For an 'A' we would have to: Lose as many shits as possible; Take Jesus
+ Christ out, if possible; Loose "I fart in your general direction"; Lose
+ "the oral sex"; Lose "oh, fuck off"; Lose "We make castanets out of your
+ testicles"
+ "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.0897 b/data/vim/patches/8.1.0897
new file mode 100644
index 000000000..d7ff86963
--- /dev/null
+++ b/data/vim/patches/8.1.0897
@@ -0,0 +1,615 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0897
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0897
+Problem: Can modify a:000 when using a reference.
+Solution: Make check for locked variable stricter. (Ozaki Kiichi,
+ closes #3930)
+Files: src/dict.c, src/eval.c, src/evalfunc.c, src/proto/eval.pro,
+ src/testdir/test_channel.vim, src/testdir/test_let.vim,
+ src/userfunc.c
+
+
+*** ../vim-8.1.0896/src/dict.c 2019-01-13 23:38:33.379773390 +0100
+--- src/dict.c 2019-02-11 21:48:39.999280763 +0100
+***************
+*** 758,765 ****
+ }
+ else if (*action == 'f' && HI2DI(hi2) != di1)
+ {
+! if (tv_check_lock(di1->di_tv.v_lock, arg_errmsg, TRUE)
+! || var_check_ro(di1->di_flags, arg_errmsg, TRUE))
+ break;
+ clear_tv(&di1->di_tv);
+ copy_tv(&HI2DI(hi2)->di_tv, &di1->di_tv);
+--- 758,765 ----
+ }
+ else if (*action == 'f' && HI2DI(hi2) != di1)
+ {
+! if (var_check_lock(di1->di_tv.v_lock, arg_errmsg, TRUE)
+! || var_check_ro(di1->di_flags, arg_errmsg, TRUE))
+ break;
+ clear_tv(&di1->di_tv);
+ copy_tv(&HI2DI(hi2)->di_tv, &di1->di_tv);
+*** ../vim-8.1.0896/src/eval.c 2019-02-10 22:58:58.972414792 +0100
+--- src/eval.c 2019-02-11 21:48:40.003280749 +0100
+***************
+*** 247,252 ****
+--- 247,253 ----
+ static void delete_var(hashtab_T *ht, hashitem_T *hi);
+ static void list_one_var(dictitem_T *v, char *prefix, int *first);
+ static void list_one_var_a(char *prefix, char_u *name, int type, char_u *string, int *first);
++ static int tv_check_lock(typval_T *tv, char_u *name, int use_gettext);
+ static char_u *find_option_end(char_u **arg, int *opt_flags);
+
+ /* for VIM_VERSION_ defines */
+***************
+*** 2332,2340 ****
+ &tv, &di, TRUE, FALSE) == OK)
+ {
+ if ((di == NULL
+! || (!var_check_ro(di->di_flags, lp->ll_name, FALSE)
+! && !tv_check_lock(di->di_tv.v_lock, lp->ll_name,
+! FALSE)))
+ && tv_op(&tv, rettv, op) == OK)
+ set_var(lp->ll_name, &tv, FALSE);
+ clear_tv(&tv);
+--- 2333,2340 ----
+ &tv, &di, TRUE, FALSE) == OK)
+ {
+ if ((di == NULL
+! || (!var_check_ro(di->di_flags, lp->ll_name, FALSE)
+! && !tv_check_lock(&di->di_tv, lp->ll_name, FALSE)))
+ && tv_op(&tv, rettv, op) == OK)
+ set_var(lp->ll_name, &tv, FALSE);
+ clear_tv(&tv);
+***************
+*** 2344,2350 ****
+ set_var(lp->ll_name, rettv, copy);
+ *endp = cc;
+ }
+! else if (tv_check_lock(lp->ll_newkey == NULL
+ ? lp->ll_tv->v_lock
+ : lp->ll_tv->vval.v_dict->dv_lock, lp->ll_name, FALSE))
+ ;
+--- 2344,2350 ----
+ set_var(lp->ll_name, rettv, copy);
+ *endp = cc;
+ }
+! else if (var_check_lock(lp->ll_newkey == NULL
+ ? lp->ll_tv->v_lock
+ : lp->ll_tv->vval.v_dict->dv_lock, lp->ll_name, FALSE))
+ ;
+***************
+*** 2358,2364 ****
+ */
+ for (ri = rettv->vval.v_list->lv_first; ri != NULL && ll_li != NULL; )
+ {
+! if (tv_check_lock(ll_li->li_tv.v_lock, lp->ll_name, FALSE))
+ return;
+ ri = ri->li_next;
+ if (ri == NULL || (!lp->ll_empty2 && lp->ll_n2 == ll_n1))
+--- 2358,2364 ----
+ */
+ for (ri = rettv->vval.v_list->lv_first; ri != NULL && ll_li != NULL; )
+ {
+! if (var_check_lock(ll_li->li_tv.v_lock, lp->ll_name, FALSE))
+ return;
+ ri = ri->li_next;
+ if (ri == NULL || (!lp->ll_empty2 && lp->ll_n2 == ll_n1))
+***************
+*** 2951,2959 ****
+ *name_end = cc;
+ }
+ else if ((lp->ll_list != NULL
+! && tv_check_lock(lp->ll_list->lv_lock, lp->ll_name, FALSE))
+ || (lp->ll_dict != NULL
+! && tv_check_lock(lp->ll_dict->dv_lock, lp->ll_name, FALSE)))
+ return FAIL;
+ else if (lp->ll_range)
+ {
+--- 2951,2959 ----
+ *name_end = cc;
+ }
+ else if ((lp->ll_list != NULL
+! && var_check_lock(lp->ll_list->lv_lock, lp->ll_name, FALSE))
+ || (lp->ll_dict != NULL
+! && var_check_lock(lp->ll_dict->dv_lock, lp->ll_name, FALSE)))
+ return FAIL;
+ else if (lp->ll_range)
+ {
+***************
+*** 2964,2970 ****
+ while (ll_li != NULL && (lp->ll_empty2 || lp->ll_n2 >= ll_n1))
+ {
+ li = ll_li->li_next;
+! if (tv_check_lock(ll_li->li_tv.v_lock, lp->ll_name, FALSE))
+ return FAIL;
+ ll_li = li;
+ ++ll_n1;
+--- 2964,2970 ----
+ while (ll_li != NULL && (lp->ll_empty2 || lp->ll_n2 >= ll_n1))
+ {
+ li = ll_li->li_next;
+! if (var_check_lock(ll_li->li_tv.v_lock, lp->ll_name, FALSE))
+ return FAIL;
+ ll_li = li;
+ ++ll_n1;
+***************
+*** 3034,3040 ****
+ di = HI2DI(hi);
+ if (var_check_fixed(di->di_flags, name, FALSE)
+ || var_check_ro(di->di_flags, name, FALSE)
+! || tv_check_lock(d->dv_lock, name, FALSE))
+ return FAIL;
+
+ delete_var(ht, hi);
+--- 3034,3040 ----
+ di = HI2DI(hi);
+ if (var_check_fixed(di->di_flags, name, FALSE)
+ || var_check_ro(di->di_flags, name, FALSE)
+! || var_check_lock(d->dv_lock, name, FALSE))
+ return FAIL;
+
+ delete_var(ht, hi);
+***************
+*** 7866,7872 ****
+ {
+ /* existing variable, need to clear the value */
+ if (var_check_ro(v->di_flags, name, FALSE)
+! || tv_check_lock(v->di_tv.v_lock, name, FALSE))
+ return;
+
+ /*
+--- 7866,7872 ----
+ {
+ /* existing variable, need to clear the value */
+ if (var_check_ro(v->di_flags, name, FALSE)
+! || var_check_lock(v->di_tv.v_lock, name, FALSE))
+ return;
+
+ /*
+***************
+*** 8021,8051 ****
+ }
+
+ /*
+! * Check if a variable name is valid.
+! * Return FALSE and give an error if not.
+! */
+! int
+! valid_varname(char_u *varname)
+! {
+! char_u *p;
+!
+! for (p = varname; *p != NUL; ++p)
+! if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p))
+! && *p != AUTOLOAD_CHAR)
+! {
+! semsg(_(e_illvar), varname);
+! return FALSE;
+! }
+! return TRUE;
+! }
+!
+! /*
+! * Return TRUE if typeval "tv" is set to be locked (immutable).
+ * Also give an error message, using "name" or _("name") when use_gettext is
+ * TRUE.
+ */
+ int
+! tv_check_lock(int lock, char_u *name, int use_gettext)
+ {
+ if (lock & VAR_LOCKED)
+ {
+--- 8021,8032 ----
+ }
+
+ /*
+! * Return TRUE if "flags" indicates variable "name" is locked (immutable).
+ * Also give an error message, using "name" or _("name") when use_gettext is
+ * TRUE.
+ */
+ int
+! var_check_lock(int lock, char_u *name, int use_gettext)
+ {
+ if (lock & VAR_LOCKED)
+ {
+***************
+*** 8067,8072 ****
+--- 8048,8103 ----
+ }
+
+ /*
++ * Return TRUE if typeval "tv" and its value are set to be locked (immutable).
++ * Also give an error message, using "name" or _("name") when use_gettext is
++ * TRUE.
++ */
++ static int
++ tv_check_lock(typval_T *tv, char_u *name, int use_gettext)
++ {
++ int lock = 0;
++
++ switch (tv->v_type)
++ {
++ case VAR_BLOB:
++ if (tv->vval.v_blob != NULL)
++ lock = tv->vval.v_blob->bv_lock;
++ break;
++ case VAR_LIST:
++ if (tv->vval.v_list != NULL)
++ lock = tv->vval.v_list->lv_lock;
++ break;
++ case VAR_DICT:
++ if (tv->vval.v_dict != NULL)
++ lock = tv->vval.v_dict->dv_lock;
++ break;
++ default:
++ break;
++ }
++ return var_check_lock(tv->v_lock, name, use_gettext)
++ || (lock != 0 && var_check_lock(lock, name, use_gettext));
++ }
++
++ /*
++ * Check if a variable name is valid.
++ * Return FALSE and give an error if not.
++ */
++ int
++ valid_varname(char_u *varname)
++ {
++ char_u *p;
++
++ for (p = varname; *p != NUL; ++p)
++ if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p))
++ && *p != AUTOLOAD_CHAR)
++ {
++ semsg(_(e_illvar), varname);
++ return FALSE;
++ }
++ return TRUE;
++ }
++
++ /*
+ * Copy the values from typval_T "from" to typval_T "to".
+ * When needed allocates string or increases reference count.
+ * Does not make a copy of a list, blob or dict but copies the reference!
+***************
+*** 10711,10723 ****
+ else if (argvars[0].v_type == VAR_LIST)
+ {
+ if ((l = argvars[0].vval.v_list) == NULL
+! || (!map && tv_check_lock(l->lv_lock, arg_errmsg, TRUE)))
+ return;
+ }
+ else if (argvars[0].v_type == VAR_DICT)
+ {
+ if ((d = argvars[0].vval.v_dict) == NULL
+! || (!map && tv_check_lock(d->dv_lock, arg_errmsg, TRUE)))
+ return;
+ }
+ else
+--- 10742,10754 ----
+ else if (argvars[0].v_type == VAR_LIST)
+ {
+ if ((l = argvars[0].vval.v_list) == NULL
+! || (!map && var_check_lock(l->lv_lock, arg_errmsg, TRUE)))
+ return;
+ }
+ else if (argvars[0].v_type == VAR_DICT)
+ {
+ if ((d = argvars[0].vval.v_dict) == NULL
+! || (!map && var_check_lock(d->dv_lock, arg_errmsg, TRUE)))
+ return;
+ }
+ else
+***************
+*** 10755,10763 ****
+
+ --todo;
+ di = HI2DI(hi);
+! if (map &&
+! (tv_check_lock(di->di_tv.v_lock, arg_errmsg, TRUE)
+! || var_check_ro(di->di_flags, arg_errmsg, TRUE)))
+ break;
+ vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
+ r = filter_map_one(&di->di_tv, expr, map, &rem);
+--- 10786,10795 ----
+
+ --todo;
+ di = HI2DI(hi);
+! if (map && (var_check_lock(di->di_tv.v_lock,
+! arg_errmsg, TRUE)
+! || var_check_ro(di->di_flags,
+! arg_errmsg, TRUE)))
+ break;
+ vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
+ r = filter_map_one(&di->di_tv, expr, map, &rem);
+***************
+*** 10813,10819 ****
+
+ for (li = l->lv_first; li != NULL; li = nli)
+ {
+! if (map && tv_check_lock(li->li_tv.v_lock, arg_errmsg, TRUE))
+ break;
+ nli = li->li_next;
+ vimvars[VV_KEY].vv_nr = idx;
+--- 10845,10851 ----
+
+ for (li = l->lv_first; li != NULL; li = nli)
+ {
+! if (map && var_check_lock(li->li_tv.v_lock, arg_errmsg, TRUE))
+ break;
+ nli = li->li_next;
+ vimvars[VV_KEY].vv_nr = idx;
+*** ../vim-8.1.0896/src/evalfunc.c 2019-02-10 23:18:49.038187525 +0100
+--- src/evalfunc.c 2019-02-11 21:48:40.003280749 +0100
+***************
+*** 1248,1254 ****
+ if (argvars[0].v_type == VAR_LIST)
+ {
+ if ((l = argvars[0].vval.v_list) != NULL
+! && !tv_check_lock(l->lv_lock,
+ (char_u *)N_("add() argument"), TRUE)
+ && list_append_tv(l, &argvars[1]) == OK)
+ copy_tv(&argvars[0], rettv);
+--- 1248,1254 ----
+ if (argvars[0].v_type == VAR_LIST)
+ {
+ if ((l = argvars[0].vval.v_list) != NULL
+! && !var_check_lock(l->lv_lock,
+ (char_u *)N_("add() argument"), TRUE)
+ && list_append_tv(l, &argvars[1]) == OK)
+ copy_tv(&argvars[0], rettv);
+***************
+*** 1256,1262 ****
+ else if (argvars[0].v_type == VAR_BLOB)
+ {
+ if ((b = argvars[0].vval.v_blob) != NULL
+! && !tv_check_lock(b->bv_lock,
+ (char_u *)N_("add() argument"), TRUE))
+ {
+ int error = FALSE;
+--- 1256,1262 ----
+ else if (argvars[0].v_type == VAR_BLOB)
+ {
+ if ((b = argvars[0].vval.v_blob) != NULL
+! && !var_check_lock(b->bv_lock,
+ (char_u *)N_("add() argument"), TRUE))
+ {
+ int error = FALSE;
+***************
+*** 3579,3585 ****
+
+ l1 = argvars[0].vval.v_list;
+ l2 = argvars[1].vval.v_list;
+! if (l1 != NULL && !tv_check_lock(l1->lv_lock, arg_errmsg, TRUE)
+ && l2 != NULL)
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+--- 3579,3585 ----
+
+ l1 = argvars[0].vval.v_list;
+ l2 = argvars[1].vval.v_list;
+! if (l1 != NULL && !var_check_lock(l1->lv_lock, arg_errmsg, TRUE)
+ && l2 != NULL)
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+***************
+*** 3615,3621 ****
+
+ d1 = argvars[0].vval.v_dict;
+ d2 = argvars[1].vval.v_dict;
+! if (d1 != NULL && !tv_check_lock(d1->dv_lock, arg_errmsg, TRUE)
+ && d2 != NULL)
+ {
+ /* Check the third argument. */
+--- 3615,3621 ----
+
+ d1 = argvars[0].vval.v_dict;
+ d2 = argvars[1].vval.v_dict;
+! if (d1 != NULL && !var_check_lock(d1->dv_lock, arg_errmsg, TRUE)
+ && d2 != NULL)
+ {
+ /* Check the third argument. */
+***************
+*** 7266,7273 ****
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+ semsg(_(e_listblobarg), "insert()");
+! else if ((l = argvars[0].vval.v_list) != NULL && !tv_check_lock(l->lv_lock,
+! (char_u *)N_("insert() argument"), TRUE))
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ before = (long)tv_get_number_chk(&argvars[2], &error);
+--- 7266,7274 ----
+ }
+ else if (argvars[0].v_type != VAR_LIST)
+ semsg(_(e_listblobarg), "insert()");
+! else if ((l = argvars[0].vval.v_list) != NULL
+! && !var_check_lock(l->lv_lock,
+! (char_u *)N_("insert() argument"), TRUE))
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ before = (long)tv_get_number_chk(&argvars[2], &error);
+***************
+*** 9698,9704 ****
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ semsg(_(e_toomanyarg), "remove()");
+ else if ((d = argvars[0].vval.v_dict) != NULL
+! && !tv_check_lock(d->dv_lock, arg_errmsg, TRUE))
+ {
+ key = tv_get_string_chk(&argvars[1]);
+ if (key != NULL)
+--- 9699,9705 ----
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ semsg(_(e_toomanyarg), "remove()");
+ else if ((d = argvars[0].vval.v_dict) != NULL
+! && !var_check_lock(d->dv_lock, arg_errmsg, TRUE))
+ {
+ key = tv_get_string_chk(&argvars[1]);
+ if (key != NULL)
+***************
+*** 9781,9787 ****
+ else if (argvars[0].v_type != VAR_LIST)
+ semsg(_(e_listdictblobarg), "remove()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+! && !tv_check_lock(l->lv_lock, arg_errmsg, TRUE))
+ {
+ idx = (long)tv_get_number_chk(&argvars[1], &error);
+ if (error)
+--- 9782,9788 ----
+ else if (argvars[0].v_type != VAR_LIST)
+ semsg(_(e_listdictblobarg), "remove()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+! && !var_check_lock(l->lv_lock, arg_errmsg, TRUE))
+ {
+ idx = (long)tv_get_number_chk(&argvars[1], &error);
+ if (error)
+***************
+*** 10128,10134 ****
+ if (argvars[0].v_type != VAR_LIST)
+ semsg(_(e_listblobarg), "reverse()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+! && !tv_check_lock(l->lv_lock,
+ (char_u *)N_("reverse() argument"), TRUE))
+ {
+ li = l->lv_last;
+--- 10129,10135 ----
+ if (argvars[0].v_type != VAR_LIST)
+ semsg(_(e_listblobarg), "reverse()");
+ else if ((l = argvars[0].vval.v_list) != NULL
+! && !var_check_lock(l->lv_lock,
+ (char_u *)N_("reverse() argument"), TRUE))
+ {
+ li = l->lv_last;
+***************
+*** 12112,12118 ****
+ else
+ {
+ l = argvars[0].vval.v_list;
+! if (l == NULL || tv_check_lock(l->lv_lock,
+ (char_u *)(sort ? N_("sort() argument") : N_("uniq() argument")),
+ TRUE))
+ goto theend;
+--- 12113,12119 ----
+ else
+ {
+ l = argvars[0].vval.v_list;
+! if (l == NULL || var_check_lock(l->lv_lock,
+ (char_u *)(sort ? N_("sort() argument") : N_("uniq() argument")),
+ TRUE))
+ goto theend;
+*** ../vim-8.1.0896/src/proto/eval.pro 2019-01-19 17:43:03.433449041 +0100
+--- src/proto/eval.pro 2019-02-11 21:48:40.007280731 +0100
+***************
+*** 103,110 ****
+ int var_check_ro(int flags, char_u *name, int use_gettext);
+ int var_check_fixed(int flags, char_u *name, int use_gettext);
+ int var_check_func_name(char_u *name, int new_var);
+ int valid_varname(char_u *varname);
+- int tv_check_lock(int lock, char_u *name, int use_gettext);
+ void copy_tv(typval_T *from, typval_T *to);
+ int item_copy(typval_T *from, typval_T *to, int deep, int copyID);
+ void get_user_input(typval_T *argvars, typval_T *rettv, int inputdialog, int secret);
+--- 103,110 ----
+ int var_check_ro(int flags, char_u *name, int use_gettext);
+ int var_check_fixed(int flags, char_u *name, int use_gettext);
+ int var_check_func_name(char_u *name, int new_var);
++ int var_check_lock(int lock, char_u *name, int use_gettext);
+ int valid_varname(char_u *varname);
+ void copy_tv(typval_T *from, typval_T *to);
+ int item_copy(typval_T *from, typval_T *to, int deep, int copyID);
+ void get_user_input(typval_T *argvars, typval_T *rettv, int inputdialog, int secret);
+*** ../vim-8.1.0896/src/testdir/test_channel.vim 2019-02-10 22:43:30.158824050 +0100
+--- src/testdir/test_channel.vim 2019-02-11 21:48:40.007280731 +0100
+***************
+*** 2062,2070 ****
+ for in_opt in in_opts
+ let x = copy(in_opt)
+ for out_opt in out_opts
+! call extend(x, out_opt)
+ for err_opt in err_opts
+! call extend(x, err_opt)
+ let opts += [extend({'pty': 1}, x)]
+ endfor
+ endfor
+--- 2062,2070 ----
+ for in_opt in in_opts
+ let x = copy(in_opt)
+ for out_opt in out_opts
+! let x = extend(copy(x), out_opt)
+ for err_opt in err_opts
+! let x = extend(copy(x), err_opt)
+ let opts += [extend({'pty': 1}, x)]
+ endfor
+ endfor
+*** ../vim-8.1.0896/src/testdir/test_let.vim 2019-02-10 22:14:24.184352831 +0100
+--- src/testdir/test_let.vim 2019-02-11 21:48:40.007280731 +0100
+***************
+*** 142,148 ****
+ call assert_fails('call s:set_varg4(1)', 'E742:')
+ call s:set_varg5([0])
+ call assert_fails('call s:set_varg6(1)', 'E742:')
+! " call assert_fails('call s:set_varg7(1)', 'E46:')
+ call assert_fails('call s:set_varg8(1)', 'E742:')
+ call s:set_varg9([0])
+ endfunction
+--- 142,148 ----
+ call assert_fails('call s:set_varg4(1)', 'E742:')
+ call s:set_varg5([0])
+ call assert_fails('call s:set_varg6(1)', 'E742:')
+! call assert_fails('call s:set_varg7(1)', 'E742:')
+ call assert_fails('call s:set_varg8(1)', 'E742:')
+ call s:set_varg9([0])
+ endfunction
+*** ../vim-8.1.0896/src/userfunc.c 2019-02-10 22:14:24.184352831 +0100
+--- src/userfunc.c 2019-02-11 21:48:40.007280731 +0100
+***************
+*** 2394,2404 ****
+ if (fudi.fd_di == NULL)
+ {
+ /* Can't add a function to a locked dictionary */
+! if (tv_check_lock(fudi.fd_dict->dv_lock, eap->arg, FALSE))
+ goto erret;
+ }
+ /* Can't change an existing function if it is locked */
+! else if (tv_check_lock(fudi.fd_di->di_tv.v_lock, eap->arg, FALSE))
+ goto erret;
+
+ /* Give the function a sequential number. Can only be used with a
+--- 2394,2404 ----
+ if (fudi.fd_di == NULL)
+ {
+ /* Can't add a function to a locked dictionary */
+! if (var_check_lock(fudi.fd_dict->dv_lock, eap->arg, FALSE))
+ goto erret;
+ }
+ /* Can't change an existing function if it is locked */
+! else if (var_check_lock(fudi.fd_di->di_tv.v_lock, eap->arg, FALSE))
+ goto erret;
+
+ /* Give the function a sequential number. Can only be used with a
+*** ../vim-8.1.0896/src/version.c 2019-02-11 21:44:57.348146533 +0100
+--- src/version.c 2019-02-11 21:53:42.617889158 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 897,
+ /**/
+
+--
+Did Adam and Eve have navels?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0898 b/data/vim/patches/8.1.0898
new file mode 100644
index 000000000..f9da0587d
--- /dev/null
+++ b/data/vim/patches/8.1.0898
@@ -0,0 +1,88 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.08
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0898
+Problem: A messed up rgb.txt can crash Vim. (Pavel Cheremushkin)
+Solution: Limit to 10000 entries. Also don't retry many times when the file
+ cannot be read.
+Files: src/term.c
+
+
+*** ../vim-8.1.0897/src/term.c 2019-01-24 17:18:37.595462334 +0100
+--- src/term.c 2019-02-12 20:41:40.212978067 +0100
+***************
+*** 6985,6997 ****
+ return rgb_table[i].color;
+
+ /*
+! * Last attempt. Look in the file "$VIM/rgb.txt".
+ */
+ if (size == 0)
+ {
+ int counting;
+
+! /* colornames_table not yet initialized */
+ fname = expand_env_save((char_u *)"$VIMRUNTIME/rgb.txt");
+ if (fname == NULL)
+ return INVALCOLOR;
+--- 6985,6997 ----
+ return rgb_table[i].color;
+
+ /*
+! * Last attempt. Look in the file "$VIMRUNTIME/rgb.txt".
+ */
+ if (size == 0)
+ {
+ int counting;
+
+! // colornames_table not yet initialized
+ fname = expand_env_save((char_u *)"$VIMRUNTIME/rgb.txt");
+ if (fname == NULL)
+ return INVALCOLOR;
+***************
+*** 7002,7007 ****
+--- 7002,7008 ----
+ {
+ if (p_verbose > 1)
+ verb_msg(_("Cannot open $VIMRUNTIME/rgb.txt"));
++ size = -1; // don't try again
+ return INVALCOLOR;
+ }
+
+***************
+*** 7050,7055 ****
+--- 7051,7061 ----
+ colornames_table[size].color = (guicolor_T)RGB(r, g, b);
+ }
+ size++;
++
++ // The distributed rgb.txt has less than 1000 entries. Limit to
++ // 10000, just in case the file was messed up.
++ if (size == 10000)
++ break;
+ }
+ }
+ fclose(fd);
+*** ../vim-8.1.0897/src/version.c 2019-02-11 22:00:07.671917613 +0100
+--- src/version.c 2019-02-12 20:42:30.340701182 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 898,
+ /**/
+
+--
+God made machine language; all the rest is the work of man.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0899 b/data/vim/patches/8.1.0899
new file mode 100644
index 000000000..6abe01032
--- /dev/null
+++ b/data/vim/patches/8.1.0899
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0899
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0899
+Problem: No need to check restricted mode for setwinvar().
+Solution: Remove check_restricted().
+Files: src/eval.c
+
+
+*** ../vim-8.1.0898/src/eval.c 2019-02-11 22:00:07.667917634 +0100
+--- src/eval.c 2019-02-11 21:48:40.003280749 +0100
+***************
+*** 8750,8756 ****
+ char_u nbuf[NUMBUFLEN];
+ tabpage_T *tp = NULL;
+
+! if (check_restricted() || check_secure())
+ return;
+
+ if (off == 1)
+--- 8750,8756 ----
+ char_u nbuf[NUMBUFLEN];
+ tabpage_T *tp = NULL;
+
+! if (check_secure())
+ return;
+
+ if (off == 1)
+*** ../vim-8.1.0898/src/version.c 2019-02-12 20:46:45.251272488 +0100
+--- src/version.c 2019-02-12 20:47:52.606890445 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 899,
+ /**/
+
+--
+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.0900 b/data/vim/patches/8.1.0900
new file mode 100644
index 000000000..118f8a43d
--- /dev/null
+++ b/data/vim/patches/8.1.0900
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0900
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0900
+Problem: ConPTY many crash with 32-bit build.
+Solution: Fix function declarations. (Ken Takata, closes #3943)
+Files: src/terminal.c
+
+
+*** ../vim-8.1.0899/src/terminal.c 2019-02-08 12:46:03.588784187 +0100
+--- src/terminal.c 2019-02-12 21:45:18.262140885 +0100
+***************
+*** 5489,5497 ****
+ HRESULT (WINAPI *pCreatePseudoConsole)(COORD, HANDLE, HANDLE, DWORD, HPCON*);
+ HRESULT (WINAPI *pResizePseudoConsole)(HPCON, COORD);
+ HRESULT (WINAPI *pClosePseudoConsole)(HPCON);
+! BOOL (*pInitializeProcThreadAttributeList)(LPPROC_THREAD_ATTRIBUTE_LIST, DWORD, DWORD, PSIZE_T);
+! BOOL (*pUpdateProcThreadAttribute)(LPPROC_THREAD_ATTRIBUTE_LIST, DWORD, DWORD_PTR, PVOID, SIZE_T, PVOID, PSIZE_T);
+! void (*pDeleteProcThreadAttributeList)(LPPROC_THREAD_ATTRIBUTE_LIST);
+
+ static int
+ dyn_conpty_init(int verbose)
+--- 5489,5497 ----
+ HRESULT (WINAPI *pCreatePseudoConsole)(COORD, HANDLE, HANDLE, DWORD, HPCON*);
+ HRESULT (WINAPI *pResizePseudoConsole)(HPCON, COORD);
+ HRESULT (WINAPI *pClosePseudoConsole)(HPCON);
+! BOOL (WINAPI *pInitializeProcThreadAttributeList)(LPPROC_THREAD_ATTRIBUTE_LIST, DWORD, DWORD, PSIZE_T);
+! BOOL (WINAPI *pUpdateProcThreadAttribute)(LPPROC_THREAD_ATTRIBUTE_LIST, DWORD, DWORD_PTR, PVOID, SIZE_T, PVOID, PSIZE_T);
+! void (WINAPI *pDeleteProcThreadAttributeList)(LPPROC_THREAD_ATTRIBUTE_LIST);
+
+ static int
+ dyn_conpty_init(int verbose)
+*** ../vim-8.1.0899/src/version.c 2019-02-12 20:48:06.646810620 +0100
+--- src/version.c 2019-02-12 21:45:12.654194868 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 900,
+ /**/
+
+--
+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.0901 b/data/vim/patches/8.1.0901
new file mode 100644
index 000000000..e0f12ae13
--- /dev/null
+++ b/data/vim/patches/8.1.0901
@@ -0,0 +1,115 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0901
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0901
+Problem: Index in getjumplist() may be wrong. (Epheien)
+Solution: Call cleanup_jumplist() earlier. (Yegappan Lakshmanan,
+ closes #3942)
+Files: src/evalfunc.c, src/testdir/test_jumplist.vim
+
+
+*** ../vim-8.1.0900/src/evalfunc.c 2019-02-11 22:00:07.667917634 +0100
+--- src/evalfunc.c 2019-02-12 22:06:11.676133841 +0100
+***************
+*** 5271,5276 ****
+--- 5271,5278 ----
+ if (wp == NULL)
+ return;
+
++ cleanup_jumplist(wp, TRUE);
++
+ l = list_alloc();
+ if (l == NULL)
+ return;
+***************
+*** 5279,5286 ****
+ return;
+ list_append_number(rettv->vval.v_list, (varnumber_T)wp->w_jumplistidx);
+
+- cleanup_jumplist(wp, TRUE);
+-
+ for (i = 0; i < wp->w_jumplistlen; ++i)
+ {
+ if (wp->w_jumplist[i].fmark.mark.lnum == 0)
+--- 5281,5286 ----
+*** ../vim-8.1.0900/src/testdir/test_jumplist.vim 2018-02-11 14:25:08.000000000 +0100
+--- src/testdir/test_jumplist.vim 2019-02-12 22:08:59.458924694 +0100
+***************
+*** 28,38 ****
+ normal G
+ normal gg
+
+! call assert_equal([[
+ \ {'lnum': 1, 'bufnr': bnr, 'col': 0, 'coladd': 0},
+ \ {'lnum': 50, 'bufnr': bnr, 'col': 0, 'coladd': 0},
+! \ {'lnum': 100, 'bufnr': bnr, 'col': 0, 'coladd': 0}], 4],
+! \ getjumplist())
+
+ " Traverse the jump list and verify the results
+ 5
+--- 28,40 ----
+ normal G
+ normal gg
+
+! let expected = [[
+ \ {'lnum': 1, 'bufnr': bnr, 'col': 0, 'coladd': 0},
+ \ {'lnum': 50, 'bufnr': bnr, 'col': 0, 'coladd': 0},
+! \ {'lnum': 100, 'bufnr': bnr, 'col': 0, 'coladd': 0}], 3]
+! call assert_equal(expected, getjumplist())
+! " jumplist doesn't change in between calls
+! call assert_equal(expected, getjumplist())
+
+ " Traverse the jump list and verify the results
+ 5
+***************
+*** 44,55 ****
+ call assert_equal(3, getjumplist()[1])
+ exe "normal \<C-O>"
+ normal 20%
+! call assert_equal([[
+ \ {'lnum': 1, 'bufnr': bnr, 'col': 0, 'coladd': 0},
+ \ {'lnum': 50, 'bufnr': bnr, 'col': 0, 'coladd': 0},
+ \ {'lnum': 5, 'bufnr': bnr, 'col': 0, 'coladd': 0},
+! \ {'lnum': 100, 'bufnr': bnr, 'col': 0, 'coladd': 0}], 5],
+! \ getjumplist())
+
+ let l = getjumplist()
+ call test_garbagecollect_now()
+--- 46,59 ----
+ call assert_equal(3, getjumplist()[1])
+ exe "normal \<C-O>"
+ normal 20%
+! let expected = [[
+ \ {'lnum': 1, 'bufnr': bnr, 'col': 0, 'coladd': 0},
+ \ {'lnum': 50, 'bufnr': bnr, 'col': 0, 'coladd': 0},
+ \ {'lnum': 5, 'bufnr': bnr, 'col': 0, 'coladd': 0},
+! \ {'lnum': 100, 'bufnr': bnr, 'col': 0, 'coladd': 0}], 4]
+! call assert_equal(expected, getjumplist())
+! " jumplist doesn't change in between calls
+! call assert_equal(expected, getjumplist())
+
+ let l = getjumplist()
+ call test_garbagecollect_now()
+*** ../vim-8.1.0900/src/version.c 2019-02-12 21:46:43.157342193 +0100
+--- src/version.c 2019-02-12 22:14:55.153310642 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 901,
+ /**/
+
+--
+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.0902 b/data/vim/patches/8.1.0902
new file mode 100644
index 000000000..32ed77398
--- /dev/null
+++ b/data/vim/patches/8.1.0902
@@ -0,0 +1,485 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0902
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0902
+Problem: Incomplete set of assignment operators.
+Solution: Add /=, *= and %=. (Ozaki Kiichi, closes #3931)
+Files: runtime/doc/eval.txt src/eval.c src/testdir/test_vimscript.vim
+
+
+*** ../vim-8.1.0901/runtime/doc/eval.txt 2019-02-10 23:18:49.034187552 +0100
+--- runtime/doc/eval.txt 2019-02-12 22:21:20.627600700 +0100
+***************
+*** 10774,10782 ****
+ When the selected range of items is partly past the
+ end of the list, items will be added.
+
+! *:let+=* *:let-=* *:let.=* *E734*
+ :let {var} += {expr1} Like ":let {var} = {var} + {expr1}".
+ :let {var} -= {expr1} Like ":let {var} = {var} - {expr1}".
+ :let {var} .= {expr1} Like ":let {var} = {var} . {expr1}".
+ These fail if {var} was not set yet and when the type
+ of {var} and {expr1} don't fit the operator.
+--- 10836,10848 ----
+ When the selected range of items is partly past the
+ end of the list, items will be added.
+
+! *:let+=* *:let-=* *:letstar=*
+! *:let/=* *:let%=* *:let.=* *E734*
+ :let {var} += {expr1} Like ":let {var} = {var} + {expr1}".
+ :let {var} -= {expr1} Like ":let {var} = {var} - {expr1}".
++ :let {var} *= {expr1} Like ":let {var} = {var} * {expr1}".
++ :let {var} /= {expr1} Like ":let {var} = {var} / {expr1}".
++ :let {var} %= {expr1} Like ":let {var} = {var} % {expr1}".
+ :let {var} .= {expr1} Like ":let {var} = {var} . {expr1}".
+ These fail if {var} was not set yet and when the type
+ of {var} and {expr1} don't fit the operator.
+*** ../vim-8.1.0901/src/eval.c 2019-02-12 20:48:06.646810620 +0100
+--- src/eval.c 2019-02-12 22:25:01.466416885 +0100
+***************
+*** 1197,1202 ****
+--- 1197,1205 ----
+ * ":let var = expr" assignment command.
+ * ":let var += expr" assignment command.
+ * ":let var -= expr" assignment command.
++ * ":let var *= expr" assignment command.
++ * ":let var /= expr" assignment command.
++ * ":let var %= expr" assignment command.
+ * ":let var .= expr" assignment command.
+ * ":let [var1, var2] = expr" unpack list.
+ */
+***************
+*** 1216,1225 ****
+ argend = skip_var_list(arg, &var_count, &semicolon);
+ if (argend == NULL)
+ return;
+! if (argend > arg && argend[-1] == '.') /* for var.='str' */
+ --argend;
+ expr = skipwhite(argend);
+! if (*expr != '=' && !(vim_strchr((char_u *)"+-.", *expr) != NULL
+ && expr[1] == '='))
+ {
+ /*
+--- 1219,1228 ----
+ argend = skip_var_list(arg, &var_count, &semicolon);
+ if (argend == NULL)
+ return;
+! if (argend > arg && argend[-1] == '.') // for var.='str'
+ --argend;
+ expr = skipwhite(argend);
+! if (*expr != '=' && !(vim_strchr((char_u *)"+-*/%.", *expr) != NULL
+ && expr[1] == '='))
+ {
+ /*
+***************
+*** 1249,1256 ****
+ op[1] = NUL;
+ if (*expr != '=')
+ {
+! if (vim_strchr((char_u *)"+-.", *expr) != NULL)
+! op[0] = *expr; /* +=, -= or .= */
+ expr = skipwhite(expr + 2);
+ }
+ else
+--- 1252,1259 ----
+ op[1] = NUL;
+ if (*expr != '=')
+ {
+! if (vim_strchr((char_u *)"+-*/%.", *expr) != NULL)
+! op[0] = *expr; // +=, -=, *=, /=, %= or .=
+ expr = skipwhite(expr + 2);
+ }
+ else
+***************
+*** 1671,1677 ****
+ semsg(_(e_invarg2), name - 1);
+ else
+ {
+! if (op != NULL && (*op == '+' || *op == '-'))
+ semsg(_(e_letwrong), op);
+ else if (endchars != NULL
+ && vim_strchr(endchars, *skipwhite(arg)) == NULL)
+--- 1674,1680 ----
+ semsg(_(e_invarg2), name - 1);
+ else
+ {
+! if (op != NULL && vim_strchr((char_u *)"+-*/%", *op) != NULL)
+ semsg(_(e_letwrong), op);
+ else if (endchars != NULL
+ && vim_strchr(endchars, *skipwhite(arg)) == NULL)
+***************
+*** 1744,1761 ****
+ || (opt_type == 0 && *op != '.'))
+ {
+ semsg(_(e_letwrong), op);
+! s = NULL; /* don't set the value */
+ }
+ else
+ {
+! if (opt_type == 1) /* number */
+ {
+! if (*op == '+')
+! n = numval + n;
+! else
+! n = numval - n;
+ }
+! else if (opt_type == 0 && stringval != NULL) /* string */
+ {
+ s = concat_str(stringval, s);
+ vim_free(stringval);
+--- 1747,1768 ----
+ || (opt_type == 0 && *op != '.'))
+ {
+ semsg(_(e_letwrong), op);
+! s = NULL; // don't set the value
+ }
+ else
+ {
+! if (opt_type == 1) // number
+ {
+! switch (*op)
+! {
+! case '+': n = numval + n; break;
+! case '-': n = numval - n; break;
+! case '*': n = numval * n; break;
+! case '/': n = numval / n; break;
+! case '%': n = numval % n; break;
+! }
+ }
+! else if (opt_type == 0 && stringval != NULL) // string
+ {
+ s = concat_str(stringval, s);
+ vim_free(stringval);
+***************
+*** 1779,1785 ****
+ else if (*arg == '@')
+ {
+ ++arg;
+! if (op != NULL && (*op == '+' || *op == '-'))
+ semsg(_(e_letwrong), op);
+ else if (endchars != NULL
+ && vim_strchr(endchars, *skipwhite(arg + 1)) == NULL)
+--- 1786,1792 ----
+ else if (*arg == '@')
+ {
+ ++arg;
+! if (op != NULL && vim_strchr((char_u *)"+-*/%", *op) != NULL)
+ semsg(_(e_letwrong), op);
+ else if (endchars != NULL
+ && vim_strchr(endchars, *skipwhite(arg + 1)) == NULL)
+***************
+*** 2254,2260 ****
+ /*
+ * Set a variable that was parsed by get_lval() to "rettv".
+ * "endp" points to just after the parsed name.
+! * "op" is NULL, "+" for "+=", "-" for "-=", "." for ".=" or "=" for "=".
+ */
+ static void
+ set_var_lval(
+--- 2261,2268 ----
+ /*
+ * Set a variable that was parsed by get_lval() to "rettv".
+ * "endp" points to just after the parsed name.
+! * "op" is NULL, "+" for "+=", "-" for "-=", "*" for "*=", "/" for "/=",
+! * "%" for "%=", "." for ".=" or "=" for "=".
+ */
+ static void
+ set_var_lval(
+***************
+*** 2327,2333 ****
+ {
+ typval_T tv;
+
+! /* handle +=, -= and .= */
+ di = NULL;
+ if (get_var_tv(lp->ll_name, (int)STRLEN(lp->ll_name),
+ &tv, &di, TRUE, FALSE) == OK)
+--- 2335,2341 ----
+ {
+ typval_T tv;
+
+! // handle +=, -=, *=, /=, %= and .=
+ di = NULL;
+ if (get_var_tv(lp->ll_name, (int)STRLEN(lp->ll_name),
+ &tv, &di, TRUE, FALSE) == OK)
+***************
+*** 2448,2454 ****
+ }
+
+ /*
+! * Handle "tv1 += tv2", "tv1 -= tv2" and "tv1 .= tv2"
+ * Returns OK or FAIL.
+ */
+ static int
+--- 2456,2463 ----
+ }
+
+ /*
+! * Handle "tv1 += tv2", "tv1 -= tv2", "tv1 *= tv2", "tv1 /= tv2", "tv1 %= tv2"
+! * and "tv1 .= tv2"
+ * Returns OK or FAIL.
+ */
+ static int
+***************
+*** 2490,2496 ****
+ case VAR_LIST:
+ if (*op != '+' || tv2->v_type != VAR_LIST)
+ break;
+! /* List += List */
+ if (tv1->vval.v_list != NULL && tv2->vval.v_list != NULL)
+ list_extend(tv1->vval.v_list, tv2->vval.v_list, NULL);
+ return OK;
+--- 2499,2505 ----
+ case VAR_LIST:
+ if (*op != '+' || tv2->v_type != VAR_LIST)
+ break;
+! // List += List
+ if (tv1->vval.v_list != NULL && tv2->vval.v_list != NULL)
+ list_extend(tv1->vval.v_list, tv2->vval.v_list, NULL);
+ return OK;
+***************
+*** 2499,2517 ****
+ case VAR_STRING:
+ if (tv2->v_type == VAR_LIST)
+ break;
+! if (*op == '+' || *op == '-')
+ {
+! /* nr += nr or nr -= nr*/
+ n = tv_get_number(tv1);
+ #ifdef FEAT_FLOAT
+ if (tv2->v_type == VAR_FLOAT)
+ {
+ float_T f = n;
+
+! if (*op == '+')
+! f += tv2->vval.v_float;
+! else
+! f -= tv2->vval.v_float;
+ clear_tv(tv1);
+ tv1->v_type = VAR_FLOAT;
+ tv1->vval.v_float = f;
+--- 2508,2531 ----
+ case VAR_STRING:
+ if (tv2->v_type == VAR_LIST)
+ break;
+! if (vim_strchr((char_u *)"+-*/%", *op) != NULL)
+ {
+! // nr += nr , nr -= nr , nr *=nr , nr /= nr , nr %= nr
+ n = tv_get_number(tv1);
+ #ifdef FEAT_FLOAT
+ if (tv2->v_type == VAR_FLOAT)
+ {
+ float_T f = n;
+
+! if (*op == '%')
+! break;
+! switch (*op)
+! {
+! case '+': f += tv2->vval.v_float; break;
+! case '-': f -= tv2->vval.v_float; break;
+! case '*': f *= tv2->vval.v_float; break;
+! case '/': f /= tv2->vval.v_float; break;
+! }
+ clear_tv(tv1);
+ tv1->v_type = VAR_FLOAT;
+ tv1->vval.v_float = f;
+***************
+*** 2519,2528 ****
+ else
+ #endif
+ {
+! if (*op == '+')
+! n += tv_get_number(tv2);
+! else
+! n -= tv_get_number(tv2);
+ clear_tv(tv1);
+ tv1->v_type = VAR_NUMBER;
+ tv1->vval.v_number = n;
+--- 2533,2546 ----
+ else
+ #endif
+ {
+! switch (*op)
+! {
+! case '+': n += tv_get_number(tv2); break;
+! case '-': n -= tv_get_number(tv2); break;
+! case '*': n *= tv_get_number(tv2); break;
+! case '/': n /= tv_get_number(tv2); break;
+! case '%': n %= tv_get_number(tv2); break;
+! }
+ clear_tv(tv1);
+ tv1->v_type = VAR_NUMBER;
+ tv1->vval.v_number = n;
+***************
+*** 2533,2539 ****
+ if (tv2->v_type == VAR_FLOAT)
+ break;
+
+! /* str .= str */
+ s = tv_get_string(tv1);
+ s = concat_str(s, tv_get_string_buf(tv2, numbuf));
+ clear_tv(tv1);
+--- 2551,2557 ----
+ if (tv2->v_type == VAR_FLOAT)
+ break;
+
+! // str .= str
+ s = tv_get_string(tv1);
+ s = concat_str(s, tv_get_string_buf(tv2, numbuf));
+ clear_tv(tv1);
+***************
+*** 2547,2553 ****
+ {
+ float_T f;
+
+! if (*op == '.' || (tv2->v_type != VAR_FLOAT
+ && tv2->v_type != VAR_NUMBER
+ && tv2->v_type != VAR_STRING))
+ break;
+--- 2565,2572 ----
+ {
+ float_T f;
+
+! if (*op == '%' || *op == '.'
+! || (tv2->v_type != VAR_FLOAT
+ && tv2->v_type != VAR_NUMBER
+ && tv2->v_type != VAR_STRING))
+ break;
+***************
+*** 2555,2564 ****
+ f = tv2->vval.v_float;
+ else
+ f = tv_get_number(tv2);
+! if (*op == '+')
+! tv1->vval.v_float += f;
+! else
+! tv1->vval.v_float -= f;
+ }
+ #endif
+ return OK;
+--- 2574,2586 ----
+ f = tv2->vval.v_float;
+ else
+ f = tv_get_number(tv2);
+! switch (*op)
+! {
+! case '+': tv1->vval.v_float += f; break;
+! case '-': tv1->vval.v_float -= f; break;
+! case '*': tv1->vval.v_float *= f; break;
+! case '/': tv1->vval.v_float /= f; break;
+! }
+ }
+ #endif
+ return OK;
+*** ../vim-8.1.0901/src/testdir/test_vimscript.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_vimscript.vim 2019-02-12 22:21:20.627600700 +0100
+***************
+*** 1441,1446 ****
+--- 1441,1524 ----
+ enew! | close
+ endfunc
+
++ func Test_compound_assignment_operators()
++ " Test for number
++ let x = 1
++ let x += 10
++ call assert_equal(11, x)
++ let x -= 5
++ call assert_equal(6, x)
++ let x *= 4
++ call assert_equal(24, x)
++ let x /= 3
++ call assert_equal(8, x)
++ let x %= 3
++ call assert_equal(2, x)
++ let x .= 'n'
++ call assert_equal('2n', x)
++
++ " Test for string
++ let x = 'str'
++ let x .= 'ing'
++ call assert_equal('string', x)
++ let x += 1
++ call assert_equal(1, x)
++ let x -= 1.5
++ call assert_equal(-0.5, x)
++
++ if has('float')
++ " Test for float
++ let x = 0.5
++ let x += 4.5
++ call assert_equal(5.0, x)
++ let x -= 1.5
++ call assert_equal(3.5, x)
++ let x *= 3.0
++ call assert_equal(10.5, x)
++ let x /= 2.5
++ call assert_equal(4.2, x)
++ call assert_fails('let x %= 0.5', 'E734')
++ call assert_fails('let x .= "f"', 'E734')
++ endif
++
++ " Test for environment variable
++ let $FOO = 1
++ call assert_fails('let $FOO += 1', 'E734')
++ call assert_fails('let $FOO -= 1', 'E734')
++ call assert_fails('let $FOO *= 1', 'E734')
++ call assert_fails('let $FOO /= 1', 'E734')
++ call assert_fails('let $FOO %= 1', 'E734')
++ let $FOO .= 's'
++ call assert_equal('1s', $FOO)
++ unlet $FOO
++
++ " Test for option variable (type: number)
++ let &scrolljump = 1
++ let &scrolljump += 5
++ call assert_equal(6, &scrolljump)
++ let &scrolljump -= 2
++ call assert_equal(4, &scrolljump)
++ let &scrolljump *= 3
++ call assert_equal(12, &scrolljump)
++ let &scrolljump /= 2
++ call assert_equal(6, &scrolljump)
++ let &scrolljump %= 5
++ call assert_equal(1, &scrolljump)
++ call assert_fails('let &scrolljump .= "j"', 'E734')
++ set scrolljump&vim
++
++ " Test for register
++ let @/ = 1
++ call assert_fails('let @/ += 1', 'E734')
++ call assert_fails('let @/ -= 1', 'E734')
++ call assert_fails('let @/ *= 1', 'E734')
++ call assert_fails('let @/ /= 1', 'E734')
++ call assert_fails('let @/ %= 1', 'E734')
++ let @/ .= 's'
++ call assert_equal('1s', @/)
++ let @/ = ''
++ endfunc
++
+ "-------------------------------------------------------------------------------
+ " Modelines {{{1
+ " vim: ts=8 sw=4 tw=80 fdm=marker
+*** ../vim-8.1.0901/src/version.c 2019-02-12 22:15:03.073282144 +0100
+--- src/version.c 2019-02-12 22:22:34.399217184 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 902,
+ /**/
+
+--
+This message contains 78% recycled characters.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0903 b/data/vim/patches/8.1.0903
new file mode 100644
index 000000000..d1a243abe
--- /dev/null
+++ b/data/vim/patches/8.1.0903
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0903
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0903
+Problem: Struct uses more bytes than needed.
+Solution: Reorder members of regitem_S. (Dominique Pelle, closes #3936)
+Files: src/regexp.c
+
+
+*** ../vim-8.1.0902/src/regexp.c 2019-01-31 15:34:35.864056935 +0100
+--- src/regexp.c 2019-02-12 22:32:30.915775442 +0100
+***************
+*** 3545,3558 ****
+ */
+ typedef struct regitem_S
+ {
+! regstate_T rs_state; /* what we are doing, one of RS_ above */
+! char_u *rs_scan; /* current node in program */
+ union
+ {
+ save_se_T sesave;
+ regsave_T regsave;
+! } rs_un; /* room for saving rex.input */
+! short rs_no; /* submatch nr or BEHIND/NOBEHIND */
+ } regitem_T;
+
+ static regitem_T *regstack_push(regstate_T state, char_u *scan);
+--- 3545,3558 ----
+ */
+ typedef struct regitem_S
+ {
+! regstate_T rs_state; // what we are doing, one of RS_ above
+! short rs_no; // submatch nr or BEHIND/NOBEHIND
+! char_u *rs_scan; // current node in program
+ union
+ {
+ save_se_T sesave;
+ regsave_T regsave;
+! } rs_un; // room for saving rex.input
+ } regitem_T;
+
+ static regitem_T *regstack_push(regstate_T state, char_u *scan);
+*** ../vim-8.1.0902/src/version.c 2019-02-12 22:28:27.845232664 +0100
+--- src/version.c 2019-02-12 22:32:50.627655105 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 903,
+ /**/
+
+--
+I am always surprised in the Linux world how quickly solutions can be
+obtained. (Imagine sending an email to Bill Gates, asking why Windows
+crashed, and how to fix it... and then getting an answer that fixed the
+problem... <0>_<0> !) -- Mark Langdon
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0904 b/data/vim/patches/8.1.0904
new file mode 100644
index 000000000..a50362804
--- /dev/null
+++ b/data/vim/patches/8.1.0904
@@ -0,0 +1,179 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0904
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0904
+Problem: USE_LONG_FNAME never defined.
+Solution: Remove using USE_LONG_FNAME. (Ken Takata, closes #3938)
+Files: src/buffer.c, src/ex_cmds.c, src/fileio.c
+
+
+*** ../vim-8.1.0903/src/buffer.c 2019-02-10 23:18:49.034187552 +0100
+--- src/buffer.c 2019-02-12 22:35:13.866773217 +0100
+***************
+*** 3168,3177 ****
+ return FAIL;
+ }
+ #ifdef USE_FNAME_CASE
+! # ifdef USE_LONG_FNAME
+! if (USE_LONG_FNAME)
+! # 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);
+--- 3168,3174 ----
+ return FAIL;
+ }
+ #ifdef USE_FNAME_CASE
+! fname_case(sfname, 0); /* set correct case for short file name */
+ #endif
+ if (buf->b_sfname != buf->b_ffname)
+ vim_free(buf->b_sfname);
+***************
+*** 4808,4820 ****
+ fname = vim_strsave(fname);
+
+ # ifdef USE_FNAME_CASE
+! # ifdef USE_LONG_FNAME
+! if (USE_LONG_FNAME)
+! # endif
+! {
+! if (fname != NULL)
+! fname_case(fname, 0); /* set correct case for file name */
+! }
+ # endif
+
+ return fname;
+--- 4805,4812 ----
+ fname = vim_strsave(fname);
+
+ # ifdef USE_FNAME_CASE
+! if (fname != NULL)
+! fname_case(fname, 0); /* set correct case for file name */
+ # endif
+
+ return fname;
+*** ../vim-8.1.0903/src/ex_cmds.c 2019-02-10 21:55:23.109307873 +0100
+--- src/ex_cmds.c 2019-02-12 22:35:13.866773217 +0100
+***************
+*** 3826,3836 ****
+ if (sfname == NULL)
+ sfname = ffname;
+ #ifdef USE_FNAME_CASE
+! # ifdef USE_LONG_FNAME
+! if (USE_LONG_FNAME)
+! # endif
+! if (sfname != NULL)
+! fname_case(sfname, 0); /* set correct case for sfname */
+ #endif
+
+ if ((flags & ECMD_ADDBUF) && (ffname == NULL || *ffname == NUL))
+--- 3826,3833 ----
+ if (sfname == NULL)
+ sfname = ffname;
+ #ifdef USE_FNAME_CASE
+! if (sfname != NULL)
+! fname_case(sfname, 0); /* set correct case for sfname */
+ #endif
+
+ if ((flags & ECMD_ADDBUF) && (ffname == NULL || *ffname == NUL))
+*** ../vim-8.1.0903/src/fileio.c 2019-02-10 23:26:10.099319000 +0100
+--- src/fileio.c 2019-02-12 22:35:13.870773193 +0100
+***************
+*** 6224,6236 ****
+ */
+ for (ptr = retval + fnamelen; ptr > retval; MB_PTR_BACK(retval, ptr))
+ {
+! if (*ext == '.'
+! #ifdef USE_LONG_FNAME
+! && (!USE_LONG_FNAME || shortname)
+! #else
+! && shortname
+! #endif
+! )
+ if (*ptr == '.') /* replace '.' by '_' */
+ *ptr = '_';
+ if (vim_ispathsep(*ptr))
+--- 6224,6230 ----
+ */
+ for (ptr = retval + fnamelen; ptr > retval; MB_PTR_BACK(retval, ptr))
+ {
+! if (*ext == '.' && shortname)
+ if (*ptr == '.') /* replace '.' by '_' */
+ *ptr = '_';
+ if (vim_ispathsep(*ptr))
+***************
+*** 6249,6259 ****
+ /*
+ * For 8.3 file names we may have to reduce the length.
+ */
+- #ifdef USE_LONG_FNAME
+- if (!USE_LONG_FNAME || shortname)
+- #else
+ if (shortname)
+- #endif
+ {
+ /*
+ * If there is no file name, or the file name ends in '/', and the
+--- 6243,6249 ----
+***************
+*** 6291,6297 ****
+ else if ((int)STRLEN(e) + extlen > 4)
+ s = e + 4 - extlen;
+ }
+! #if defined(USE_LONG_FNAME) || defined(WIN3264)
+ /*
+ * If there is no file name, and the extension starts with '.', put a
+ * '_' before the dot, because just ".ext" may be invalid if it's on a
+--- 6281,6287 ----
+ else if ((int)STRLEN(e) + extlen > 4)
+ s = e + 4 - extlen;
+ }
+! #ifdef WIN3264
+ /*
+ * If there is no file name, and the extension starts with '.', put a
+ * '_' before the dot, because just ".ext" may be invalid if it's on a
+***************
+*** 6310,6320 ****
+ /*
+ * Prepend the dot.
+ */
+! if (prepend_dot && !shortname && *(e = gettail(retval)) != '.'
+! #ifdef USE_LONG_FNAME
+! && USE_LONG_FNAME
+! #endif
+! )
+ {
+ STRMOVE(e + 1, e);
+ *e = '.';
+--- 6300,6306 ----
+ /*
+ * Prepend the dot.
+ */
+! if (prepend_dot && !shortname && *(e = gettail(retval)) != '.')
+ {
+ STRMOVE(e + 1, e);
+ *e = '.';
+*** ../vim-8.1.0903/src/version.c 2019-02-12 22:32:56.895616785 +0100
+--- src/version.c 2019-02-12 22:37:08.398060202 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 904,
+ /**/
+
+--
+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.0905 b/data/vim/patches/8.1.0905
new file mode 100644
index 000000000..ad92ff458
--- /dev/null
+++ b/data/vim/patches/8.1.0905
@@ -0,0 +1,371 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0905
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0905
+Problem: Complicated regexp causes a crash. (Kuang-che Wu)
+Solution: Limit the recursiveness of addstate(). (closes #3941)
+Files: src/regexp_nfa.c, src/testdir/test_regexp_latin.vim
+
+
+*** ../vim-8.1.0904/src/regexp_nfa.c 2019-01-31 15:34:35.864056935 +0100
+--- src/regexp_nfa.c 2019-02-12 23:05:19.968038497 +0100
+***************
+*** 4284,4289 ****
+--- 4284,4290 ----
+ /*
+ * Add "state" and possibly what follows to state list ".".
+ * Returns "subs_arg", possibly copied into temp_subs.
++ * Returns NULL when recursiveness is too deep.
+ */
+ static regsubs_T *
+ addstate(
+***************
+*** 4310,4315 ****
+--- 4311,4325 ----
+ #ifdef ENABLE_LOG
+ int did_print = FALSE;
+ #endif
++ static int depth = 0;
++
++ // This function is called recursively. When the depth is too much we run
++ // out of stack and crash, limit recursiveness here.
++ if (++depth >= 10000 || subs == NULL)
++ {
++ --depth;
++ return NULL;
++ }
+
+ if (off_arg <= -ADDSTATE_HERE_OFFSET)
+ {
+***************
+*** 4421,4426 ****
+--- 4431,4437 ----
+ abs(state->id), l->id, state->c, code,
+ pim == NULL ? "NULL" : "yes", l->has_pim, found);
+ #endif
++ --depth;
+ return subs;
+ }
+ }
+***************
+*** 4595,4601 ****
+ }
+
+ subs = addstate(l, state->out, subs, pim, off_arg);
+! /* "subs" may have changed, need to set "sub" again */
+ #ifdef FEAT_SYN_HL
+ if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9)
+ sub = &subs->synt;
+--- 4606,4614 ----
+ }
+
+ subs = addstate(l, state->out, subs, pim, off_arg);
+! if (subs == NULL)
+! break;
+! // "subs" may have changed, need to set "sub" again
+ #ifdef FEAT_SYN_HL
+ if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9)
+ sub = &subs->synt;
+***************
+*** 4619,4625 ****
+ ? subs->norm.list.multi[0].end_lnum >= 0
+ : subs->norm.list.line[0].end != NULL))
+ {
+! /* Do not overwrite the position set by \ze. */
+ subs = addstate(l, state->out, subs, pim, off_arg);
+ break;
+ }
+--- 4632,4638 ----
+ ? subs->norm.list.multi[0].end_lnum >= 0
+ : subs->norm.list.line[0].end != NULL))
+ {
+! // Do not overwrite the position set by \ze.
+ subs = addstate(l, state->out, subs, pim, off_arg);
+ break;
+ }
+***************
+*** 4695,4700 ****
+--- 4708,4715 ----
+ }
+
+ subs = addstate(l, state->out, subs, pim, off_arg);
++ if (subs == NULL)
++ break;
+ /* "subs" may have changed, need to set "sub" again */
+ #ifdef FEAT_SYN_HL
+ if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9)
+***************
+*** 4710,4715 ****
+--- 4725,4731 ----
+ sub->in_use = save_in_use;
+ break;
+ }
++ --depth;
+ return subs;
+ }
+
+***************
+*** 4719,4725 ****
+ * This makes sure the order of states to be tried does not change, which
+ * matters for alternatives.
+ */
+! static void
+ addstate_here(
+ nfa_list_T *l, /* runtime state list */
+ nfa_state_T *state, /* state to update */
+--- 4735,4741 ----
+ * This makes sure the order of states to be tried does not change, which
+ * matters for alternatives.
+ */
+! static regsubs_T *
+ addstate_here(
+ nfa_list_T *l, /* runtime state list */
+ nfa_state_T *state, /* state to update */
+***************
+*** 4730,4752 ****
+ int tlen = l->n;
+ int count;
+ int listidx = *ip;
+
+ /* First add the state(s) at the end, so that we know how many there are.
+ * Pass the listidx as offset (avoids adding another argument to
+ * addstate(). */
+! addstate(l, state, subs, pim, -listidx - ADDSTATE_HERE_OFFSET);
+
+! /* when "*ip" was at the end of the list, nothing to do */
+ if (listidx + 1 == tlen)
+! return;
+
+! /* re-order to put the new state at the current position */
+ count = l->n - tlen;
+ if (count == 0)
+! return; /* no state got added */
+ if (count == 1)
+ {
+! /* overwrite the current state */
+ l->t[listidx] = l->t[l->n - 1];
+ }
+ else if (count > 1)
+--- 4746,4771 ----
+ int tlen = l->n;
+ int count;
+ int listidx = *ip;
++ regsubs_T *r;
+
+ /* First add the state(s) at the end, so that we know how many there are.
+ * Pass the listidx as offset (avoids adding another argument to
+ * addstate(). */
+! r = addstate(l, state, subs, pim, -listidx - ADDSTATE_HERE_OFFSET);
+! if (r == NULL)
+! return r;
+
+! // when "*ip" was at the end of the list, nothing to do
+ if (listidx + 1 == tlen)
+! return r;
+
+! // re-order to put the new state at the current position
+ count = l->n - tlen;
+ if (count == 0)
+! return r; // no state got added
+ if (count == 1)
+ {
+! // overwrite the current state
+ l->t[listidx] = l->t[l->n - 1];
+ }
+ else if (count > 1)
+***************
+*** 4760,4766 ****
+ l->len = l->len * 3 / 2 + 50;
+ newl = (nfa_thread_T *)alloc(l->len * sizeof(nfa_thread_T));
+ if (newl == NULL)
+! return;
+ mch_memmove(&(newl[0]),
+ &(l->t[0]),
+ sizeof(nfa_thread_T) * listidx);
+--- 4779,4785 ----
+ l->len = l->len * 3 / 2 + 50;
+ newl = (nfa_thread_T *)alloc(l->len * sizeof(nfa_thread_T));
+ if (newl == NULL)
+! return r;
+ mch_memmove(&(newl[0]),
+ &(l->t[0]),
+ sizeof(nfa_thread_T) * listidx);
+***************
+*** 4787,4792 ****
+--- 4806,4813 ----
+ }
+ --l->n;
+ *ip = listidx - 1;
++
++ return r;
+ }
+
+ /*
+***************
+*** 5493,5498 ****
+--- 5514,5520 ----
+ int add_count;
+ int add_off = 0;
+ int toplevel = start->c == NFA_MOPEN;
++ regsubs_T *r;
+ #ifdef NFA_REGEXP_DEBUG_LOG
+ FILE *debug;
+ #endif
+***************
+*** 5567,5576 ****
+ else
+ m->norm.list.line[0].start = rex.input;
+ m->norm.in_use = 1;
+! addstate(thislist, start->out, m, NULL, 0);
+ }
+ else
+! addstate(thislist, start, m, NULL, 0);
+
+ #define ADD_STATE_IF_MATCH(state) \
+ if (result) { \
+--- 5589,5603 ----
+ else
+ m->norm.list.line[0].start = rex.input;
+ m->norm.in_use = 1;
+! r = addstate(thislist, start->out, m, NULL, 0);
+ }
+ else
+! r = addstate(thislist, start, m, NULL, 0);
+! if (r == NULL)
+! {
+! nfa_match = NFA_TOO_EXPENSIVE;
+! goto theend;
+! }
+
+ #define ADD_STATE_IF_MATCH(state) \
+ if (result) { \
+***************
+*** 5874,5881 ****
+ /* t->state->out1 is the corresponding END_INVISIBLE
+ * node; Add its out to the current list (zero-width
+ * match). */
+! addstate_here(thislist, t->state->out1->out, &t->subs,
+! &pim, &listidx);
+ }
+ }
+ break;
+--- 5901,5912 ----
+ /* t->state->out1 is the corresponding END_INVISIBLE
+ * node; Add its out to the current list (zero-width
+ * match). */
+! if (addstate_here(thislist, t->state->out1->out,
+! &t->subs, &pim, &listidx) == NULL)
+! {
+! nfa_match = NFA_TOO_EXPENSIVE;
+! goto theend;
+! }
+ }
+ }
+ break;
+***************
+*** 6749,6761 ****
+ }
+
+ if (add_here)
+! addstate_here(thislist, add_state, &t->subs, pim, &listidx);
+ else
+ {
+! addstate(nextlist, add_state, &t->subs, pim, add_off);
+ if (add_count > 0)
+ nextlist->t[nextlist->n - 1].count = add_count;
+ }
+ }
+
+ } /* for (thislist = thislist; thislist->state; thislist++) */
+--- 6780,6798 ----
+ }
+
+ if (add_here)
+! r = addstate_here(thislist, add_state, &t->subs,
+! pim, &listidx);
+ else
+ {
+! r = addstate(nextlist, add_state, &t->subs, pim, add_off);
+ if (add_count > 0)
+ nextlist->t[nextlist->n - 1].count = add_count;
+ }
++ if (r == NULL)
++ {
++ nfa_match = NFA_TOO_EXPENSIVE;
++ goto theend;
++ }
+ }
+
+ } /* for (thislist = thislist; thislist->state; thislist++) */
+***************
+*** 6831,6841 ****
+ (colnr_T)(rex.input - rex.line) + clen;
+ else
+ m->norm.list.line[0].start = rex.input + clen;
+! addstate(nextlist, start->out, m, NULL, clen);
+ }
+ }
+ else
+! addstate(nextlist, start, m, NULL, clen);
+ }
+
+ #ifdef ENABLE_LOG
+--- 6868,6888 ----
+ (colnr_T)(rex.input - rex.line) + clen;
+ else
+ m->norm.list.line[0].start = rex.input + clen;
+! if (addstate(nextlist, start->out, m, NULL, clen) == NULL)
+! {
+! nfa_match = NFA_TOO_EXPENSIVE;
+! goto theend;
+! }
+ }
+ }
+ else
+! {
+! if (addstate(nextlist, start, m, NULL, clen) == NULL)
+! {
+! nfa_match = NFA_TOO_EXPENSIVE;
+! goto theend;
+! }
+! }
+ }
+
+ #ifdef ENABLE_LOG
+*** ../vim-8.1.0904/src/testdir/test_regexp_latin.vim 2019-01-14 23:19:26.244853406 +0100
+--- src/testdir/test_regexp_latin.vim 2019-02-12 23:04:40.336347263 +0100
+***************
+*** 84,86 ****
+--- 84,92 ----
+ call assert_fails('/a\{a}', 'E870:')
+ set re=0
+ endfunc
++
++ func Test_recursive_addstate()
++ " This will call addstate() recursively until it runs into the limit.
++ let lnum = search('\v((){328}){389}')
++ call assert_equal(0, lnum)
++ endfunc
+*** ../vim-8.1.0904/src/version.c 2019-02-12 22:37:24.181961482 +0100
+--- src/version.c 2019-02-12 22:58:41.059230984 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 905,
+ /**/
+
+--
+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.0906 b/data/vim/patches/8.1.0906
new file mode 100644
index 000000000..55d6112c7
--- /dev/null
+++ b/data/vim/patches/8.1.0906
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0906
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0906
+Problem: Using clumsy way to get console window handle.
+Solution: Use GetConsoleWindow(). (Ken Takata, closes #3940)
+Files: src/os_mswin.c
+
+
+*** ../vim-8.1.0905/src/os_mswin.c 2019-02-10 23:18:49.038187525 +0100
+--- src/os_mswin.c 2019-02-12 23:10:26.877686857 +0100
+***************
+*** 1043,1053 ****
+ static void
+ GetConsoleHwnd(void)
+ {
+- # define MY_BUFSIZE 1024 // Buffer size for console window titles.
+-
+- char pszNewWindowTitle[MY_BUFSIZE]; // Contains fabricated WindowTitle.
+- char pszOldWindowTitle[MY_BUFSIZE]; // Contains original WindowTitle.
+-
+ /* Skip if it's already set. */
+ if (s_hwnd != 0)
+ return;
+--- 1043,1048 ----
+***************
+*** 1061,1077 ****
+ }
+ # endif
+
+! GetConsoleTitle(pszOldWindowTitle, MY_BUFSIZE);
+!
+! wsprintf(pszNewWindowTitle, "%s/%d/%d",
+! pszOldWindowTitle,
+! GetTickCount(),
+! GetCurrentProcessId());
+! SetConsoleTitle(pszNewWindowTitle);
+! Sleep(40);
+! s_hwnd = FindWindow(NULL, pszNewWindowTitle);
+!
+! SetConsoleTitle(pszOldWindowTitle);
+ }
+
+ /*
+--- 1056,1062 ----
+ }
+ # endif
+
+! s_hwnd = GetConsoleWindow();
+ }
+
+ /*
+*** ../vim-8.1.0905/src/version.c 2019-02-12 23:05:41.743869435 +0100
+--- src/version.c 2019-02-12 23:12:04.368950837 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 906,
+ /**/
+
+--
+A M00se once bit my sister ...
+ "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.0907 b/data/vim/patches/8.1.0907
new file mode 100644
index 000000000..609fd5caa
--- /dev/null
+++ b/data/vim/patches/8.1.0907
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0907
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0907
+Problem: CI tests on AppVeyor are failing.
+Solution: Reduce the recursiveness limit for regexp.
+Files: src/regexp_nfa.c
+
+
+*** ../vim-8.1.0906/src/regexp_nfa.c 2019-02-12 23:05:41.743869435 +0100
+--- src/regexp_nfa.c 2019-02-13 01:16:39.783904976 +0100
+***************
+*** 4315,4321 ****
+
+ // This function is called recursively. When the depth is too much we run
+ // out of stack and crash, limit recursiveness here.
+! if (++depth >= 10000 || subs == NULL)
+ {
+ --depth;
+ return NULL;
+--- 4315,4321 ----
+
+ // This function is called recursively. When the depth is too much we run
+ // out of stack and crash, limit recursiveness here.
+! if (++depth >= 5000 || subs == NULL)
+ {
+ --depth;
+ return NULL;
+*** ../vim-8.1.0906/src/version.c 2019-02-12 23:12:33.604730888 +0100
+--- src/version.c 2019-02-13 01:17:47.015575460 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 907,
+ /**/
+
+--
+Mynd you, m00se bites Kan be pretty nasti ...
+ "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.0908 b/data/vim/patches/8.1.0908
new file mode 100644
index 000000000..b63c0080f
--- /dev/null
+++ b/data/vim/patches/8.1.0908
@@ -0,0 +1,81 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0908
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0908
+Problem: Can't handle large value for %{nr}v in regexp. (Kuang-che Wu)
+Solution: Give an error if the value is too large. (closes #3948)
+Files: src/regexp_nfa.c
+
+
+*** ../vim-8.1.0907/src/regexp_nfa.c 2019-02-13 01:18:34.019341671 +0100
+--- src/regexp_nfa.c 2019-02-13 18:32:14.907289010 +0100
+***************
+*** 1550,1555 ****
+--- 1550,1557 ----
+ }
+ if (c == 'l' || c == 'c' || c == 'v')
+ {
++ int limit = INT_MAX;
++
+ if (c == 'l')
+ {
+ /* \%{n}l \%{n}<l \%{n}>l */
+***************
+*** 1563,1578 ****
+ EMIT(cmp == '<' ? NFA_COL_LT :
+ cmp == '>' ? NFA_COL_GT : NFA_COL);
+ else
+ /* \%{n}v \%{n}<v \%{n}>v */
+ EMIT(cmp == '<' ? NFA_VCOL_LT :
+ cmp == '>' ? NFA_VCOL_GT : NFA_VCOL);
+! #if VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+! if (n > INT_MAX)
+ {
+ emsg(_("E951: \\% value too large"));
+ return FAIL;
+ }
+- #endif
+ EMIT((int)n);
+ break;
+ }
+--- 1565,1581 ----
+ EMIT(cmp == '<' ? NFA_COL_LT :
+ cmp == '>' ? NFA_COL_GT : NFA_COL);
+ else
++ {
+ /* \%{n}v \%{n}<v \%{n}>v */
+ EMIT(cmp == '<' ? NFA_VCOL_LT :
+ cmp == '>' ? NFA_VCOL_GT : NFA_VCOL);
+! limit = INT_MAX / MB_MAXBYTES;
+! }
+! if (n >= limit)
+ {
+ emsg(_("E951: \\% value too large"));
+ return FAIL;
+ }
+ EMIT((int)n);
+ break;
+ }
+*** ../vim-8.1.0907/src/version.c 2019-02-13 01:18:34.019341671 +0100
+--- src/version.c 2019-02-13 18:33:56.626681408 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 908,
+ /**/
+
+--
+The problem with political jokes is that they get elected.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0909 b/data/vim/patches/8.1.0909
new file mode 100644
index 000000000..1cf1b103b
--- /dev/null
+++ b/data/vim/patches/8.1.0909
@@ -0,0 +1,201 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0909
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0909
+Problem: MS-Windows: using ConPTY even though it is not stable.
+Solution: When ConPTY version is unstable, prefer using winpty. (Ken Takata,
+ closes #3949)
+Files: runtime/doc/options.txt, src/os_win32.c, src/proto/os_win32.pro,
+ src/terminal.c
+
+
+*** ../vim-8.1.0908/runtime/doc/options.txt 2019-02-08 12:46:03.584784210 +0100
+--- runtime/doc/options.txt 2019-02-13 19:18:15.951910806 +0100
+***************
+*** 8067,8078 ****
+ window.
+
+ Possible values are:
+! "" use ConPTY if possible, winpty otherwise
+ "winpty" use winpty, fail if not supported
+ "conpty" use |ConPTY|, fail if not supported
+
+! |ConPTY| support depends on the platform (Windows 10 October 2018
+! edition). winpty support needs to be installed. If neither is
+ supported then you cannot open a terminal window.
+
+ *'terse'* *'noterse'*
+--- 8112,8125 ----
+ window.
+
+ Possible values are:
+! "" use ConPTY if it is stable, winpty otherwise
+ "winpty" use winpty, fail if not supported
+ "conpty" use |ConPTY|, fail if not supported
+
+! |ConPTY| support depends on the platform. Windows 10 October 2018
+! Update is the first version that supports ConPTY, however it is still
+! considered unstable. ConPTY might become stable in the next release
+! of Windows 10. winpty support needs to be installed. If neither is
+ supported then you cannot open a terminal window.
+
+ *'terse'* *'noterse'*
+*** ../vim-8.1.0908/src/os_win32.c 2019-02-03 14:52:42.505867463 +0100
+--- src/os_win32.c 2019-02-13 19:18:15.955910793 +0100
+***************
+*** 187,192 ****
+--- 187,194 ----
+ static int win32_set_archive(char_u *name);
+
+ static int vtp_working = 0;
++ static int conpty_working = 0;
++ static int conpty_stable = 0;
+ static void vtp_flag_init();
+
+ #ifndef FEAT_GUI_W32
+***************
+*** 7638,7646 ****
+
+ /*
+ * Support for pseudo-console (ConPTY) was added in windows 10
+! * version 1809 (October 2018 update).
+ */
+! #define CONPTY_FIRST_SUPPORT_BUILD MAKE_VER(10, 0, 17763)
+
+ static void
+ vtp_flag_init(void)
+--- 7640,7649 ----
+
+ /*
+ * Support for pseudo-console (ConPTY) was added in windows 10
+! * version 1809 (October 2018 update). However, that version is unstable.
+ */
+! #define CONPTY_FIRST_SUPPORT_BUILD MAKE_VER(10, 0, 17763)
+! #define CONPTY_STABLE_BUILD MAKE_VER(10, 0, 32767) // T.B.D.
+
+ static void
+ vtp_flag_init(void)
+***************
+*** 7659,7668 ****
+ vtp_working = 0;
+ #endif
+
+- #ifdef FEAT_GUI_W32
+ if (ver >= CONPTY_FIRST_SUPPORT_BUILD)
+! vtp_working = 1;
+! #endif
+
+ }
+
+--- 7662,7671 ----
+ vtp_working = 0;
+ #endif
+
+ if (ver >= CONPTY_FIRST_SUPPORT_BUILD)
+! conpty_working = 1;
+! if (ver >= CONPTY_STABLE_BUILD)
+! conpty_stable = 1;
+
+ }
+
+***************
+*** 7878,7880 ****
+--- 7881,7895 ----
+ {
+ return vtp_working;
+ }
++
++ int
++ has_conpty_working(void)
++ {
++ return conpty_working;
++ }
++
++ int
++ is_conpty_stable(void)
++ {
++ return conpty_stable;
++ }
+*** ../vim-8.1.0908/src/proto/os_win32.pro 2018-05-17 13:53:03.000000000 +0200
+--- src/proto/os_win32.pro 2019-02-13 19:18:15.955910793 +0100
+***************
+*** 70,76 ****
+ void fix_arg_enc(void);
+ int mch_setenv(char *var, char *value, int x);
+ void control_console_color_rgb(void);
+- int has_vtp_working(void);
+ int use_vtp(void);
+ int is_term_win32(void);
+ /* vim: set ft=c : */
+--- 70,78 ----
+ void fix_arg_enc(void);
+ int mch_setenv(char *var, char *value, int x);
+ void control_console_color_rgb(void);
+ int use_vtp(void);
+ int is_term_win32(void);
++ int has_vtp_working(void);
++ int has_conpty_working(void);
++ int is_conpty_stable(void);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0908/src/terminal.c 2019-02-12 21:46:43.157342193 +0100
+--- src/terminal.c 2019-02-13 19:18:15.955910793 +0100
+***************
+*** 5521,5527 ****
+ if (handled)
+ return result;
+
+! if (!has_vtp_working())
+ {
+ handled = TRUE;
+ result = FAIL;
+--- 5521,5527 ----
+ if (handled)
+ return result;
+
+! if (!has_conpty_working())
+ {
+ handled = TRUE;
+ result = FAIL;
+***************
+*** 6139,6145 ****
+
+ if (tty_type == NUL)
+ {
+! if (has_conpty)
+ use_conpty = TRUE;
+ else if (has_winpty)
+ use_winpty = TRUE;
+--- 6139,6145 ----
+
+ if (tty_type == NUL)
+ {
+! if (has_conpty && (is_conpty_stable() || !has_winpty))
+ use_conpty = TRUE;
+ else if (has_winpty)
+ use_winpty = TRUE;
+*** ../vim-8.1.0908/src/version.c 2019-02-13 18:35:01.398292976 +0100
+--- src/version.c 2019-02-13 19:19:29.675659670 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 909,
+ /**/
+
+--
+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.0910 b/data/vim/patches/8.1.0910
new file mode 100644
index 000000000..3cbdcddeb
--- /dev/null
+++ b/data/vim/patches/8.1.0910
@@ -0,0 +1,140 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0910
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0910
+Problem: Crash with tricky search pattern. (Kuang-che Wu)
+Solution: Check for runnning out of memory. (closes #3950)
+Files: src/regexp_nfa.c, src/testdir/test_regexp_latin.vim
+
+
+*** ../vim-8.1.0909/src/regexp_nfa.c 2019-02-13 18:35:01.398292976 +0100
+--- src/regexp_nfa.c 2019-02-13 20:25:35.216595581 +0100
+***************
+*** 4449,4455 ****
+ * be (a lot) bigger than anticipated. */
+ if (l->n == l->len)
+ {
+! int newlen = l->len * 3 / 2 + 50;
+
+ if (subs != &temp_subs)
+ {
+--- 4449,4456 ----
+ * be (a lot) bigger than anticipated. */
+ if (l->n == l->len)
+ {
+! int newlen = l->len * 3 / 2 + 50;
+! nfa_thread_T *newt;
+
+ if (subs != &temp_subs)
+ {
+***************
+*** 4463,4470 ****
+ subs = &temp_subs;
+ }
+
+! /* TODO: check for vim_realloc() returning NULL. */
+! l->t = vim_realloc(l->t, newlen * sizeof(nfa_thread_T));
+ l->len = newlen;
+ }
+
+--- 4464,4477 ----
+ subs = &temp_subs;
+ }
+
+! newt = vim_realloc(l->t, newlen * sizeof(nfa_thread_T));
+! if (newt == NULL)
+! {
+! // out of memory
+! --depth;
+! return NULL;
+! }
+! l->t = newt;
+ l->len = newlen;
+ }
+
+***************
+*** 4756,4762 ****
+ * addstate(). */
+ r = addstate(l, state, subs, pim, -listidx - ADDSTATE_HERE_OFFSET);
+ if (r == NULL)
+! return r;
+
+ // when "*ip" was at the end of the list, nothing to do
+ if (listidx + 1 == tlen)
+--- 4763,4769 ----
+ * addstate(). */
+ r = addstate(l, state, subs, pim, -listidx - ADDSTATE_HERE_OFFSET);
+ if (r == NULL)
+! return NULL;
+
+ // when "*ip" was at the end of the list, nothing to do
+ if (listidx + 1 == tlen)
+***************
+*** 4777,4788 ****
+ {
+ /* not enough space to move the new states, reallocate the list
+ * and move the states to the right position */
+! nfa_thread_T *newl;
+
+! l->len = l->len * 3 / 2 + 50;
+! newl = (nfa_thread_T *)alloc(l->len * sizeof(nfa_thread_T));
+ if (newl == NULL)
+! return r;
+ mch_memmove(&(newl[0]),
+ &(l->t[0]),
+ sizeof(nfa_thread_T) * listidx);
+--- 4784,4796 ----
+ {
+ /* not enough space to move the new states, reallocate the list
+ * and move the states to the right position */
+! int newlen = l->len * 3 / 2 + 50;
+! nfa_thread_T *newl;
+
+! newl = (nfa_thread_T *)alloc(newlen * sizeof(nfa_thread_T));
+ if (newl == NULL)
+! return NULL;
+! l->len = newlen;
+ mch_memmove(&(newl[0]),
+ &(l->t[0]),
+ sizeof(nfa_thread_T) * listidx);
+*** ../vim-8.1.0909/src/testdir/test_regexp_latin.vim 2019-02-12 23:05:41.743869435 +0100
+--- src/testdir/test_regexp_latin.vim 2019-02-13 20:29:42.795583999 +0100
+***************
+*** 90,92 ****
+--- 90,99 ----
+ let lnum = search('\v((){328}){389}')
+ call assert_equal(0, lnum)
+ endfunc
++
++ func Test_out_of_memory()
++ new
++ s/^/,n
++ " This will be slow...
++ call assert_fails('call search("\\v((n||<)+);")', 'E363:')
++ endfunc
+*** ../vim-8.1.0909/src/version.c 2019-02-13 19:23:04.734816702 +0100
+--- src/version.c 2019-02-13 20:30:21.391411496 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 910,
+ /**/
+
+--
+SOLDIER: Where did you get the coconuts?
+ARTHUR: Through ... We found them.
+SOLDIER: Found them? In Mercea. The coconut's tropical!
+ "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.0911 b/data/vim/patches/8.1.0911
new file mode 100644
index 000000000..4d1d58dd5
--- /dev/null
+++ b/data/vim/patches/8.1.0911
@@ -0,0 +1,167 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0911
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0911
+Problem: Tag line with Ex command cannot have extra fields.
+Solution: Recognize |;" as the end of the command. (closes #2402)
+Files: runtime/doc/tagsrch.txt, src/tag.c, src/testdir/test_taglist.vim
+
+
+*** ../vim-8.1.0910/runtime/doc/tagsrch.txt 2018-11-11 15:20:32.432704446 +0100
+--- runtime/doc/tagsrch.txt 2019-02-13 21:17:47.448568824 +0100
+***************
+*** 571,577 ****
+ {term} ;" The two characters semicolon and double quote. This is
+ interpreted by Vi as the start of a comment, which makes the
+ following be ignored. This is for backwards compatibility
+! with Vi, it ignores the following fields.
+ {field} .. A list of optional fields. Each field has the form:
+
+ <Tab>{fieldname}:{value}
+--- 571,584 ----
+ {term} ;" The two characters semicolon and double quote. This is
+ interpreted by Vi as the start of a comment, which makes the
+ following be ignored. This is for backwards compatibility
+! with Vi, it ignores the following fields. Example:
+! APP file /^static int APP;$/;" v
+! When {tagaddress} is not a line number or search pattern, then
+! {term} must be |;". Here the bar ends the command (excluding
+! the bar) and ;" is used to have Vi ignore the rest of the
+! line. Example:
+! APP file.c call cursor(3, 4)|;" v
+!
+ {field} .. A list of optional fields. Each field has the form:
+
+ <Tab>{fieldname}:{value}
+*** ../vim-8.1.0910/src/tag.c 2019-01-26 17:28:22.236599060 +0100
+--- src/tag.c 2019-02-13 21:14:30.233964187 +0100
+***************
+*** 3014,3020 ****
+ p = tagp->command;
+ if (find_extra(&p) == OK)
+ {
+! tagp->command_end = p;
+ p += 2; /* skip ";\"" */
+ if (*p++ == TAB)
+ while (ASCII_ISALPHA(*p))
+--- 3014,3023 ----
+ p = tagp->command;
+ if (find_extra(&p) == OK)
+ {
+! if (p > tagp->command && p[-1] == '|')
+! tagp->command_end = p - 1; // drop trailing bar
+! else
+! tagp->command_end = p;
+ p += 2; /* skip ";\"" */
+ if (*p++ == TAB)
+ while (ASCII_ISALPHA(*p))
+***************
+*** 3784,3790 ****
+ {
+ char_u *str = *pp;
+
+! /* Repeat for addresses separated with ';' */
+ for (;;)
+ {
+ if (VIM_ISDIGIT(*str))
+--- 3787,3793 ----
+ {
+ char_u *str = *pp;
+
+! // Repeat for addresses separated with ';'
+ for (;;)
+ {
+ if (VIM_ISDIGIT(*str))
+***************
+*** 3798,3804 ****
+ ++str;
+ }
+ else
+! str = NULL;
+ if (str == NULL || *str != ';'
+ || !(VIM_ISDIGIT(str[1]) || str[1] == '/' || str[1] == '?'))
+ break;
+--- 3801,3816 ----
+ ++str;
+ }
+ else
+! {
+! // not a line number or search string, look for terminator.
+! str = (char_u *)strstr((char *)str, "|;\"");
+! if (str != NULL)
+! {
+! ++str;
+! break;
+! }
+!
+! }
+ if (str == NULL || *str != ';'
+ || !(VIM_ISDIGIT(str[1]) || str[1] == '/' || str[1] == '?'))
+ break;
+*** ../vim-8.1.0910/src/testdir/test_taglist.vim 2018-06-30 22:40:39.097551835 +0200
+--- src/testdir/test_taglist.vim 2019-02-13 21:14:47.965836948 +0100
+***************
+*** 5,11 ****
+ \ "FFoo\tXfoo\t1",
+ \ "FBar\tXfoo\t2",
+ \ "BFoo\tXbar\t1",
+! \ "BBar\tXbar\t2"
+ \ ], 'Xtags')
+ set tags=Xtags
+ split Xtext
+--- 5,13 ----
+ \ "FFoo\tXfoo\t1",
+ \ "FBar\tXfoo\t2",
+ \ "BFoo\tXbar\t1",
+! \ "BBar\tXbar\t2",
+! \ "Kindly\tXbar\t3;\"\tv\tfile:",
+! \ "Command\tXbar\tcall cursor(3, 4)|;\"\td",
+ \ ], 'Xtags')
+ set tags=Xtags
+ split Xtext
+***************
+*** 15,20 ****
+--- 17,34 ----
+ call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xfoo"), {i, v -> v.name}))
+ call assert_equal(['BFoo', 'FFoo'], map(taglist("Foo", "Xbar"), {i, v -> v.name}))
+
++ let kind = taglist("Kindly")
++ call assert_equal(1, len(kind))
++ call assert_equal('v', kind[0]['kind'])
++ call assert_equal('3', kind[0]['cmd'])
++ call assert_equal(1, kind[0]['static'])
++ call assert_equal('Xbar', kind[0]['filename'])
++
++ let cmd = taglist("Command")
++ call assert_equal(1, len(cmd))
++ call assert_equal('d', cmd[0]['kind'])
++ call assert_equal('call cursor(3, 4)', cmd[0]['cmd'])
++
+ call delete('Xtags')
+ bwipe
+ endfunc
+*** ../vim-8.1.0910/src/version.c 2019-02-13 20:31:46.883018311 +0100
+--- src/version.c 2019-02-13 21:18:24.092313726 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 911,
+ /**/
+
+--
+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.0912 b/data/vim/patches/8.1.0912
new file mode 100644
index 000000000..1b4c29346
--- /dev/null
+++ b/data/vim/patches/8.1.0912
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0912
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0912
+Problem: MS-Windows: warning for signed/unsigned.
+Solution: Add type cast. (Nobuhiro Takasaki, closes #3945)
+Files: src/terminal.c
+
+
+*** ../vim-8.1.0911/src/terminal.c 2019-02-13 19:23:04.734816702 +0100
+--- src/terminal.c 2019-02-13 21:20:25.299477289 +0100
+***************
+*** 5722,5728 ****
+ job->jv_proc_info = proc_info;
+ job->jv_job_object = jo;
+ job->jv_status = JOB_STARTED;
+! job->jv_tty_type = vim_strsave("conpty");
+ ++job->jv_refcount;
+ term->tl_job = job;
+
+--- 5722,5728 ----
+ job->jv_proc_info = proc_info;
+ job->jv_job_object = jo;
+ job->jv_status = JOB_STARTED;
+! job->jv_tty_type = vim_strsave((char_u *)"conpty");
+ ++job->jv_refcount;
+ term->tl_job = job;
+
+***************
+*** 6056,6062 ****
+ (short_u *)winpty_conin_name(term->tl_winpty), NULL);
+ job->jv_tty_out = utf16_to_enc(
+ (short_u *)winpty_conout_name(term->tl_winpty), NULL);
+! job->jv_tty_type = vim_strsave("winpty");
+ ++job->jv_refcount;
+ term->tl_job = job;
+
+--- 6056,6062 ----
+ (short_u *)winpty_conin_name(term->tl_winpty), NULL);
+ job->jv_tty_out = utf16_to_enc(
+ (short_u *)winpty_conout_name(term->tl_winpty), NULL);
+! job->jv_tty_type = vim_strsave((char_u *)"winpty");
+ ++job->jv_refcount;
+ term->tl_job = job;
+
+*** ../vim-8.1.0911/src/version.c 2019-02-13 21:19:09.503999092 +0100
+--- src/version.c 2019-02-13 21:21:43.218944702 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 912,
+ /**/
+
+--
+There are two ways of constructing a software design. One way is to make
+it so simple that there are obviously no deficiencies. The other way
+is to make it so complicated that there are no obvious deficiencies.
+ -C.A.R. Hoare
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0913 b/data/vim/patches/8.1.0913
new file mode 100644
index 000000000..d5c73f3b1
--- /dev/null
+++ b/data/vim/patches/8.1.0913
@@ -0,0 +1,117 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0913
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0913
+Problem: CI crashes when running out of memory.
+Solution: Apply 'maxmempattern' also to new regexp engine.
+Files: src/regexp_nfa.c
+
+
+*** ../vim-8.1.0912/src/regexp_nfa.c 2019-02-13 20:31:46.883018311 +0100
+--- src/regexp_nfa.c 2019-02-13 21:44:45.862165702 +0100
+***************
+*** 4445,4457 ****
+ goto skip_add;
+ }
+
+! /* When there are backreferences or PIMs the number of states may
+! * be (a lot) bigger than anticipated. */
+ if (l->n == l->len)
+ {
+ int newlen = l->len * 3 / 2 + 50;
+ nfa_thread_T *newt;
+
+ if (subs != &temp_subs)
+ {
+ /* "subs" may point into the current array, need to make a
+--- 4445,4464 ----
+ goto skip_add;
+ }
+
+! // When there are backreferences or PIMs the number of states may
+! // be (a lot) bigger than anticipated.
+ if (l->n == l->len)
+ {
+ int newlen = l->len * 3 / 2 + 50;
++ size_t newsize = newlen * sizeof(nfa_thread_T);
+ nfa_thread_T *newt;
+
++ if ((long)(newsize >> 10) >= p_mmp)
++ {
++ emsg(_(e_maxmempat));
++ --depth;
++ return NULL;
++ }
+ if (subs != &temp_subs)
+ {
+ /* "subs" may point into the current array, need to make a
+***************
+*** 4464,4470 ****
+ subs = &temp_subs;
+ }
+
+! newt = vim_realloc(l->t, newlen * sizeof(nfa_thread_T));
+ if (newt == NULL)
+ {
+ // out of memory
+--- 4471,4477 ----
+ subs = &temp_subs;
+ }
+
+! newt = vim_realloc(l->t, newsize);
+ if (newt == NULL)
+ {
+ // out of memory
+***************
+*** 4785,4793 ****
+ /* not enough space to move the new states, reallocate the list
+ * and move the states to the right position */
+ int newlen = l->len * 3 / 2 + 50;
+ nfa_thread_T *newl;
+
+! newl = (nfa_thread_T *)alloc(newlen * sizeof(nfa_thread_T));
+ if (newl == NULL)
+ return NULL;
+ l->len = newlen;
+--- 4792,4806 ----
+ /* not enough space to move the new states, reallocate the list
+ * and move the states to the right position */
+ int newlen = l->len * 3 / 2 + 50;
++ size_t newsize = newlen * sizeof(nfa_thread_T);
+ nfa_thread_T *newl;
+
+! if ((long)(newsize >> 10) >= p_mmp)
+! {
+! emsg(_(e_maxmempat));
+! return NULL;
+! }
+! newl = (nfa_thread_T *)alloc(newsize);
+ if (newl == NULL)
+ return NULL;
+ l->len = newlen;
+*** ../vim-8.1.0912/src/version.c 2019-02-13 21:22:09.550765502 +0100
+--- src/version.c 2019-02-13 21:43:29.994642679 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 913,
+ /**/
+
+--
+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.0914 b/data/vim/patches/8.1.0914
new file mode 100644
index 000000000..8c2e83263
--- /dev/null
+++ b/data/vim/patches/8.1.0914
@@ -0,0 +1,6010 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0914
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0914
+Problem: Code related to findfile() is spread out.
+Solution: Put findfile() related code into a new source file. (Yegappan
+ Lakshmanan, closes #3934)
+Files: Filelist, src/Make_bc5.mak, src/Make_cyg_ming.mak,
+ src/Make_dice.mak, src/Make_ivc.mak, src/Make_manx.mak,
+ src/Make_morph.mak, src/Make_mvc.mak, src/Make_sas.mak,
+ src/Make_vms.mms, src/Makefile, src/README.txt, src/findfile.c,
+ src/misc1.c, src/misc2.c, src/proto.h, src/proto/findfile.pro,
+ src/proto/misc1.pro, src/proto/misc2.pro, src/proto/window.pro,
+ src/window.c
+
+
+*** ../vim-8.1.0913/Filelist 2019-02-03 23:45:09.282345807 +0100
+--- Filelist 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 41,46 ****
+--- 41,47 ----
+ src/farsi.h \
+ src/feature.h \
+ src/fileio.c \
++ src/findfile.c \
+ src/fold.c \
+ src/getchar.c \
+ src/globals.h \
+***************
+*** 170,175 ****
+--- 171,177 ----
+ src/proto/ex_getln.pro \
+ src/proto/farsi.pro \
+ src/proto/fileio.pro \
++ src/proto/findfile.pro \
+ src/proto/fold.pro \
+ src/proto/getchar.pro \
+ src/proto/gui.pro \
+*** ../vim-8.1.0913/src/Make_bc5.mak 2019-01-31 13:47:51.118632672 +0100
+--- src/Make_bc5.mak 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 544,549 ****
+--- 544,550 ----
+ $(OBJDIR)\ex_getln.obj \
+ $(OBJDIR)\farsi.obj \
+ $(OBJDIR)\fileio.obj \
++ $(OBJDIR)\findfile.obj \
+ $(OBJDIR)\fold.obj \
+ $(OBJDIR)\getchar.obj \
+ $(OBJDIR)\hardcopy.obj \
+*** ../vim-8.1.0913/src/Make_cyg_ming.mak 2019-01-31 14:43:15.563570608 +0100
+--- src/Make_cyg_ming.mak 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 716,721 ****
+--- 716,722 ----
+ $(OUTDIR)/ex_getln.o \
+ $(OUTDIR)/farsi.o \
+ $(OUTDIR)/fileio.o \
++ $(OUTDIR)/findfile.o \
+ $(OUTDIR)/fold.o \
+ $(OUTDIR)/getchar.o \
+ $(OUTDIR)/hardcopy.o \
+*** ../vim-8.1.0913/src/Make_dice.mak 2019-01-31 13:47:51.118632672 +0100
+--- src/Make_dice.mak 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 46,51 ****
+--- 46,52 ----
+ ex_getln.c \
+ farsi.c \
+ fileio.c \
++ findfile.c \
+ fold.c \
+ getchar.c \
+ hardcopy.c \
+***************
+*** 105,110 ****
+--- 106,112 ----
+ o/ex_getln.o \
+ o/farsi.o \
+ o/fileio.o \
++ o/findfile.o \
+ o/fold.o \
+ o/getchar.o \
+ o/hardcopy.o \
+***************
+*** 203,208 ****
+--- 205,212 ----
+
+ o/fileio.o: fileio.c $(SYMS)
+
++ o/findfile.o: findfile.c $(SYMS)
++
+ o/fold.o: fold.c $(SYMS)
+
+ o/getchar.o: getchar.c $(SYMS)
+*** ../vim-8.1.0913/src/Make_ivc.mak 2019-01-31 13:47:51.118632672 +0100
+--- src/Make_ivc.mak 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 230,235 ****
+--- 230,236 ----
+ "$(INTDIR)/ex_getln.obj" \
+ "$(INTDIR)/farsi.obj" \
+ "$(INTDIR)/fileio.obj" \
++ "$(INTDIR)/findfile.obj" \
+ "$(INTDIR)/fold.obj" \
+ "$(INTDIR)/getchar.obj" \
+ "$(INTDIR)/hardcopy.obj" \
+***************
+*** 419,424 ****
+--- 420,429 ----
+ SOURCE=.\fileio.c
+ # End Source File
+ # Begin Source File
++ #
++ SOURCE=.\findfile.c
++ # End Source File
++ # Begin Source File
+
+ SOURCE=.\fold.c
+ # End Source File
+*** ../vim-8.1.0913/src/Make_manx.mak 2019-01-31 13:47:51.118632672 +0100
+--- src/Make_manx.mak 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 56,61 ****
+--- 56,62 ----
+ ex_getln.c \
+ farsi.c \
+ fileio.c \
++ findfile.c \
+ fold.c \
+ getchar.c \
+ hardcopy.c \
+***************
+*** 117,122 ****
+--- 118,124 ----
+ obj/ex_getln.o \
+ obj/farsi.o \
+ obj/fileio.o \
++ obj/findfile.o \
+ obj/fold.o \
+ obj/getchar.o \
+ obj/hardcopy.o \
+***************
+*** 176,181 ****
+--- 178,184 ----
+ proto/ex_getln.pro \
+ proto/farsi.pro \
+ proto/fileio.pro \
++ proto/findfile.pro \
+ proto/fold.pro \
+ proto/getchar.pro \
+ proto/hardcopy.pro \
+***************
+*** 320,325 ****
+--- 323,331 ----
+ obj/fileio.o: fileio.c
+ $(CCSYM) $@ fileio.c
+
++ obj/findfile.o: findfile.c
++ $(CCSYM) $@ findfile.c
++
+ obj/fold.o: fold.c
+ $(CCSYM) $@ fold.c
+
+*** ../vim-8.1.0913/src/Make_morph.mak 2019-01-31 13:47:51.118632672 +0100
+--- src/Make_morph.mak 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 44,49 ****
+--- 44,50 ----
+ ex_getln.c \
+ farsi.c \
+ fileio.c \
++ findfile.c \
+ fold.c \
+ getchar.c \
+ hardcopy.c \
+*** ../vim-8.1.0913/src/Make_mvc.mak 2019-01-31 13:47:51.118632672 +0100
+--- src/Make_mvc.mak 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 721,726 ****
+--- 721,727 ----
+ $(OUTDIR)\ex_getln.obj \
+ $(OUTDIR)\farsi.obj \
+ $(OUTDIR)\fileio.obj \
++ $(OUTDIR)\findfile.obj \
+ $(OUTDIR)\fold.obj \
+ $(OUTDIR)\getchar.obj \
+ $(OUTDIR)\hardcopy.obj \
+***************
+*** 1407,1412 ****
+--- 1408,1415 ----
+
+ $(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL)
+
++ $(OUTDIR)/findfile.obj: $(OUTDIR) findfile.c $(INCL)
++
+ $(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL)
+
+ $(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL)
+***************
+*** 1645,1650 ****
+--- 1648,1654 ----
+ proto/ex_getln.pro \
+ proto/farsi.pro \
+ proto/fileio.pro \
++ proto/findfile.pro \
+ proto/getchar.pro \
+ proto/hardcopy.pro \
+ proto/hashtab.pro \
+*** ../vim-8.1.0913/src/Make_sas.mak 2019-01-31 13:47:51.118632672 +0100
+--- src/Make_sas.mak 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 109,114 ****
+--- 109,115 ----
+ ex_getln.c \
+ farsi.c \
+ fileio.c \
++ findfile.c \
+ fold.c \
+ getchar.c \
+ hardcopy.c \
+***************
+*** 169,174 ****
+--- 170,176 ----
+ ex_getln.o \
+ farsi.o \
+ fileio.o \
++ findfile.o \
+ fold.o \
+ getchar.o \
+ hardcopy.o \
+***************
+*** 229,234 ****
+--- 231,237 ----
+ proto/ex_getln.pro \
+ proto/farsi.pro \
+ proto/fileio.pro \
++ proto/findfile.pro \
+ proto/fold.pro \
+ proto/getchar.pro \
+ proto/hardcopy.pro \
+***************
+*** 363,368 ****
+--- 366,373 ----
+ proto/farsi.pro: farsi.c
+ fileio.o: fileio.c
+ proto/fileio.pro: fileio.c
++ findfile.o: findfile.c
++ proto/findfile.pro: findfile.c
+ fold.o: fold.c
+ proto/fold.pro: fold.c
+ getchar.o: getchar.c
+*** ../vim-8.1.0913/src/Make_vms.mms 2019-01-31 13:47:51.118632672 +0100
+--- src/Make_vms.mms 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 312,334 ****
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+! SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c \
+! evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c \
+! getchar.c hardcopy.c hashtab.c indent.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
+! misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+! spell.c spellfile.c syntax.c tag.c term.c termlib.c textprop.c ui.c undo.c userfunc.c version.c screen.c \
+! window.c os_unix.c os_vms.c pathdef.c \
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+! OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj \
+! edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
+! if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj indent.obj json.obj list.obj main.obj mark.obj \
+! menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+! move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
+! regexp.obj search.obj sha256.obj sign.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \
+! ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj os_unix.obj \
+! os_vms.obj pathdef.obj if_mzsch.obj\
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+ $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ)
+
+--- 312,342 ----
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+! SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c \
+! crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
+! ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c \
+! if_xcmdsrv.c farsi.c fileio.c findfile.c fold.c getchar.c hardcopy.c \
+! hashtab.c indent.c json.c list.c main.c mark.c menu.c mbyte.c \
+! memfile.c memline.c message.c misc1.c misc2.c move.c normal.c ops.c \
+! option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+! spell.c spellfile.c syntax.c tag.c term.c termlib.c textprop.c ui.c \
+! undo.c userfunc.c version.c screen.c window.c os_unix.c os_vms.c \
+! pathdef.c
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+! OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj \
+! charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj \
+! edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj \
+! ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj farsi.obj \
+! fileio.obj findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
+! indent.obj json.obj list.obj main.obj mark.obj menu.obj memfile.obj \
+! memline.obj message.obj misc1.obj misc2.obj move.obj mbyte.obj \
+! normal.obj ops.obj option.obj popupmnu.obj quickfix.obj regexp.obj \
+! search.obj sha256.obj sign.obj spell.obj spellfile.obj syntax.obj \
+! tag.obj term.obj termlib.obj textprop.obj ui.obj undo.obj \
+! userfunc.obj screen.obj version.obj window.obj os_unix.obj os_vms.obj \
+! pathdef.obj if_mzsch.obj \
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+ $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ)
+
+***************
+*** 568,573 ****
+--- 576,585 ----
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+ globals.h farsi.h arabic.h
++ findfile.obj : findfile.c vim.h [.auto]config.h feature.h os_unix.h \
++ ascii.h keymap.h term.h macros.h structs.h regexp.h \
++ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
++ globals.h farsi.h arabic.h
+ fold.obj : fold.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+*** ../vim-8.1.0913/src/Makefile 2019-02-01 20:42:18.718884011 +0100
+--- src/Makefile 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 1592,1597 ****
+--- 1592,1598 ----
+ ex_getln.c \
+ farsi.c \
+ fileio.c \
++ findfile.c \
+ fold.c \
+ getchar.c \
+ hardcopy.c \
+***************
+*** 1705,1710 ****
+--- 1706,1712 ----
+ objects/ex_getln.o \
+ objects/farsi.o \
+ objects/fileio.o \
++ objects/findfile.o \
+ objects/fold.o \
+ objects/getchar.o \
+ objects/hardcopy.o \
+***************
+*** 1831,1836 ****
+--- 1833,1839 ----
+ ex_getln.pro \
+ farsi.pro \
+ fileio.pro \
++ findfile.pro \
+ fold.pro \
+ getchar.pro \
+ hardcopy.pro \
+***************
+*** 2999,3004 ****
+--- 3002,3010 ----
+ objects/fileio.o: fileio.c
+ $(CCC) -o $@ fileio.c
+
++ objects/findfile.o: findfile.c
++ $(CCC) -o $@ findfile.c
++
+ objects/fold.o: fold.c
+ $(CCC) -o $@ fold.c
+
+***************
+*** 3471,3476 ****
+--- 3477,3487 ----
+ 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/findfile.o: findfile.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/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 \
+*** ../vim-8.1.0913/src/README.txt 2019-01-26 16:20:44.260683581 +0100
+--- src/README.txt 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 22,29 ****
+--- 22,31 ----
+ diff.c diff mode (vimdiff)
+ eval.c expression evaluation
+ fileio.c reading and writing files
++ findfile.c search for files in 'path'
+ fold.c folding
+ getchar.c getting characters and key mapping
++ indent.c C and Lisp indentation
+ mark.c marks
+ mbyte.c multi-byte character handling
+ memfile.c storing lines for buffers in a swapfile
+*** ../vim-8.1.0913/src/findfile.c 2019-02-13 22:43:46.429534874 +0100
+--- src/findfile.c 2019-02-13 22:32:25.770956617 +0100
+***************
+*** 0 ****
+--- 1,2607 ----
++ /* 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.
++ */
++
++ /*
++ * findfile.c: Search for files in directories listed in 'path'
++ */
++
++ #include "vim.h"
++
++ /*
++ * File searching functions for 'path', 'tags' and 'cdpath' options.
++ * External visible functions:
++ * vim_findfile_init() creates/initialises the search context
++ * vim_findfile_free_visited() free list of visited files/dirs of search
++ * context
++ * vim_findfile() find a file in the search context
++ * vim_findfile_cleanup() cleanup/free search context created by
++ * vim_findfile_init()
++ *
++ * All static functions and variables start with 'ff_'
++ *
++ * In general it works like this:
++ * First you create yourself a search context by calling vim_findfile_init().
++ * It is possible to give a search context from a previous call to
++ * vim_findfile_init(), so it can be reused. After this you call vim_findfile()
++ * until you are satisfied with the result or it returns NULL. On every call it
++ * returns the next file which matches the conditions given to
++ * vim_findfile_init(). If it doesn't find a next file it returns NULL.
++ *
++ * It is possible to call vim_findfile_init() again to reinitialise your search
++ * with some new parameters. Don't forget to pass your old search context to
++ * it, so it can reuse it and especially reuse the list of already visited
++ * directories. If you want to delete the list of already visited directories
++ * simply call vim_findfile_free_visited().
++ *
++ * When you are done call vim_findfile_cleanup() to free the search context.
++ *
++ * The function vim_findfile_init() has a long comment, which describes the
++ * needed parameters.
++ *
++ *
++ *
++ * ATTENTION:
++ * ==========
++ * Also we use an allocated search context here, this functions are NOT
++ * thread-safe!!!!!
++ *
++ * To minimize parameter passing (or because I'm to lazy), only the
++ * external visible functions get a search context as a parameter. This is
++ * then assigned to a static global, which is used throughout the local
++ * functions.
++ */
++
++ /*
++ * type for the directory search stack
++ */
++ typedef struct ff_stack
++ {
++ struct ff_stack *ffs_prev;
++
++ // the fix part (no wildcards) and the part containing the wildcards
++ // of the search path
++ char_u *ffs_fix_path;
++ #ifdef FEAT_PATH_EXTRA
++ char_u *ffs_wc_path;
++ #endif
++
++ // files/dirs found in the above directory, matched by the first wildcard
++ // of wc_part
++ char_u **ffs_filearray;
++ int ffs_filearray_size;
++ char_u ffs_filearray_cur; // needed for partly handled dirs
++
++ // to store status of partly handled directories
++ // 0: we work on this directory for the first time
++ // 1: this directory was partly searched in an earlier step
++ int ffs_stage;
++
++ // How deep are we in the directory tree?
++ // Counts backward from value of level parameter to vim_findfile_init
++ int ffs_level;
++
++ // Did we already expand '**' to an empty string?
++ int ffs_star_star_empty;
++ } ff_stack_T;
++
++ /*
++ * type for already visited directories or files.
++ */
++ typedef struct ff_visited
++ {
++ struct ff_visited *ffv_next;
++
++ #ifdef FEAT_PATH_EXTRA
++ // Visited directories are different if the wildcard string are
++ // different. So we have to save it.
++ char_u *ffv_wc_path;
++ #endif
++ // for unix use inode etc for comparison (needed because of links), else
++ // use filename.
++ #ifdef UNIX
++ int ffv_dev_valid; // ffv_dev and ffv_ino were set
++ dev_t ffv_dev; // device number
++ ino_t ffv_ino; // inode number
++ #endif
++ // The memory for this struct is allocated according to the length of
++ // ffv_fname.
++ char_u ffv_fname[1]; // actually longer
++ } ff_visited_T;
++
++ /*
++ * We might have to manage several visited lists during a search.
++ * This is especially needed for the tags option. If tags is set to:
++ * "./++/tags,./++/TAGS,++/tags" (replace + with *)
++ * So we have to do 3 searches:
++ * 1) search from the current files directory downward for the file "tags"
++ * 2) search from the current files directory downward for the file "TAGS"
++ * 3) search from Vims current directory downwards for the file "tags"
++ * As you can see, the first and the third search are for the same file, so for
++ * the third search we can use the visited list of the first search. For the
++ * second search we must start from a empty visited list.
++ * The struct ff_visited_list_hdr is used to manage a linked list of already
++ * visited lists.
++ */
++ typedef struct ff_visited_list_hdr
++ {
++ struct ff_visited_list_hdr *ffvl_next;
++
++ // the filename the attached visited list is for
++ char_u *ffvl_filename;
++
++ ff_visited_T *ffvl_visited_list;
++
++ } ff_visited_list_hdr_T;
++
++
++ /*
++ * '**' can be expanded to several directory levels.
++ * Set the default maximum depth.
++ */
++ #define FF_MAX_STAR_STAR_EXPAND ((char_u)30)
++
++ /*
++ * The search context:
++ * ffsc_stack_ptr: the stack for the dirs to search
++ * ffsc_visited_list: the currently active visited list
++ * ffsc_dir_visited_list: the currently active visited list for search dirs
++ * ffsc_visited_lists_list: the list of all visited lists
++ * ffsc_dir_visited_lists_list: the list of all visited lists for search dirs
++ * ffsc_file_to_search: the file to search for
++ * ffsc_start_dir: the starting directory, if search path was relative
++ * ffsc_fix_path: the fix part of the given path (without wildcards)
++ * Needed for upward search.
++ * ffsc_wc_path: the part of the given path containing wildcards
++ * ffsc_level: how many levels of dirs to search downwards
++ * ffsc_stopdirs_v: array of stop directories for upward search
++ * ffsc_find_what: FINDFILE_BOTH, FINDFILE_DIR or FINDFILE_FILE
++ * ffsc_tagfile: searching for tags file, don't use 'suffixesadd'
++ */
++ typedef struct ff_search_ctx_T
++ {
++ ff_stack_T *ffsc_stack_ptr;
++ ff_visited_list_hdr_T *ffsc_visited_list;
++ ff_visited_list_hdr_T *ffsc_dir_visited_list;
++ ff_visited_list_hdr_T *ffsc_visited_lists_list;
++ ff_visited_list_hdr_T *ffsc_dir_visited_lists_list;
++ char_u *ffsc_file_to_search;
++ char_u *ffsc_start_dir;
++ char_u *ffsc_fix_path;
++ #ifdef FEAT_PATH_EXTRA
++ char_u *ffsc_wc_path;
++ int ffsc_level;
++ char_u **ffsc_stopdirs_v;
++ #endif
++ int ffsc_find_what;
++ int ffsc_tagfile;
++ } ff_search_ctx_T;
++
++ // locally needed functions
++ #ifdef FEAT_PATH_EXTRA
++ static int ff_check_visited(ff_visited_T **, char_u *, char_u *);
++ #else
++ static int ff_check_visited(ff_visited_T **, char_u *);
++ #endif
++ 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);
++
++ 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);
++ static void ff_clear(ff_search_ctx_T *search_ctx);
++ static void ff_free_stack_element(ff_stack_T *stack_ptr);
++ #ifdef FEAT_PATH_EXTRA
++ static ff_stack_T *ff_create_stack_element(char_u *, char_u *, int, int);
++ #else
++ static ff_stack_T *ff_create_stack_element(char_u *, int, int);
++ #endif
++ #ifdef FEAT_PATH_EXTRA
++ static int ff_path_in_stoplist(char_u *, int, char_u **);
++ #endif
++
++ static char_u e_pathtoolong[] = N_("E854: path too long for completion");
++
++ static char_u *ff_expand_buffer = NULL; // used for expanding filenames
++
++ #if 0
++ /*
++ * if someone likes findfirst/findnext, here are the functions
++ * NOT TESTED!!
++ */
++
++ static void *ff_fn_search_context = NULL;
++
++ char_u *
++ vim_findfirst(char_u *path, char_u *filename, int level)
++ {
++ ff_fn_search_context =
++ vim_findfile_init(path, filename, NULL, level, TRUE, FALSE,
++ ff_fn_search_context, rel_fname);
++ if (NULL == ff_fn_search_context)
++ return NULL;
++ else
++ return vim_findnext()
++ }
++
++ char_u *
++ vim_findnext(void)
++ {
++ char_u *ret = vim_findfile(ff_fn_search_context);
++
++ if (NULL == ret)
++ {
++ vim_findfile_cleanup(ff_fn_search_context);
++ ff_fn_search_context = NULL;
++ }
++ return ret;
++ }
++ #endif
++
++ /*
++ * Initialization routine for vim_findfile().
++ *
++ * Returns the newly allocated search context or NULL if an error occurred.
++ *
++ * Don't forget to clean up by calling vim_findfile_cleanup() if you are done
++ * with the search context.
++ *
++ * Find the file 'filename' in the directory 'path'.
++ * The parameter 'path' may contain wildcards. If so only search 'level'
++ * directories deep. The parameter 'level' is the absolute maximum and is
++ * not related to restricts given to the '**' wildcard. If 'level' is 100
++ * and you use '**200' vim_findfile() will stop after 100 levels.
++ *
++ * 'filename' cannot contain wildcards! It is used as-is, no backslashes to
++ * escape special characters.
++ *
++ * If 'stopdirs' is not NULL and nothing is found downward, the search is
++ * restarted on the next higher directory level. This is repeated until the
++ * start-directory of a search is contained in 'stopdirs'. 'stopdirs' has the
++ * format ";*<dirname>*\(;<dirname>\)*;\=$".
++ *
++ * If the 'path' is relative, the starting dir for the search is either VIM's
++ * current dir or if the path starts with "./" the current files dir.
++ * If the 'path' is absolute, the starting dir is that part of the path before
++ * the first wildcard.
++ *
++ * Upward search is only done on the starting dir.
++ *
++ * If 'free_visited' is TRUE the list of already visited files/directories is
++ * cleared. Set this to FALSE if you just want to search from another
++ * directory, but want to be sure that no directory from a previous search is
++ * searched again. This is useful if you search for a file at different places.
++ * The list of visited files/dirs can also be cleared with the function
++ * vim_findfile_free_visited().
++ *
++ * Set the parameter 'find_what' to FINDFILE_DIR if you want to search for
++ * directories only, FINDFILE_FILE for files only, FINDFILE_BOTH for both.
++ *
++ * A search context returned by a previous call to vim_findfile_init() can be
++ * passed in the parameter "search_ctx_arg". This context is reused and
++ * reinitialized with the new parameters. The list of already visited
++ * directories from this context is only deleted if the parameter
++ * "free_visited" is true. Be aware that the passed "search_ctx_arg" is freed
++ * if the reinitialization fails.
++ *
++ * If you don't have a search context from a previous call "search_ctx_arg"
++ * must be NULL.
++ *
++ * This function silently ignores a few errors, vim_findfile() will have
++ * limited functionality then.
++ */
++ void *
++ vim_findfile_init(
++ char_u *path,
++ char_u *filename,
++ char_u *stopdirs UNUSED,
++ int level,
++ int free_visited,
++ int find_what,
++ void *search_ctx_arg,
++ int tagfile, // expanding names of tags files
++ char_u *rel_fname) // file name to use for "."
++ {
++ #ifdef FEAT_PATH_EXTRA
++ char_u *wc_part;
++ #endif
++ ff_stack_T *sptr;
++ ff_search_ctx_T *search_ctx;
++
++ // If a search context is given by the caller, reuse it, else allocate a
++ // new one.
++ if (search_ctx_arg != NULL)
++ search_ctx = search_ctx_arg;
++ else
++ {
++ search_ctx = (ff_search_ctx_T*)alloc((unsigned)sizeof(ff_search_ctx_T));
++ if (search_ctx == NULL)
++ goto error_return;
++ vim_memset(search_ctx, 0, sizeof(ff_search_ctx_T));
++ }
++ search_ctx->ffsc_find_what = find_what;
++ search_ctx->ffsc_tagfile = tagfile;
++
++ // clear the search context, but NOT the visited lists
++ ff_clear(search_ctx);
++
++ // clear visited list if wanted
++ if (free_visited == TRUE)
++ vim_findfile_free_visited(search_ctx);
++ else
++ {
++ // Reuse old visited lists. Get the visited list for the given
++ // filename. If no list for the current filename exists, creates a new
++ // one.
++ search_ctx->ffsc_visited_list = ff_get_visited_list(filename,
++ &search_ctx->ffsc_visited_lists_list);
++ if (search_ctx->ffsc_visited_list == NULL)
++ goto error_return;
++ search_ctx->ffsc_dir_visited_list = ff_get_visited_list(filename,
++ &search_ctx->ffsc_dir_visited_lists_list);
++ if (search_ctx->ffsc_dir_visited_list == NULL)
++ goto error_return;
++ }
++
++ if (ff_expand_buffer == NULL)
++ {
++ ff_expand_buffer = (char_u*)alloc(MAXPATHL);
++ if (ff_expand_buffer == NULL)
++ goto error_return;
++ }
++
++ // Store information on starting dir now if path is relative.
++ // If path is absolute, we do that later.
++ if (path[0] == '.'
++ && (vim_ispathsep(path[1]) || path[1] == NUL)
++ && (!tagfile || vim_strchr(p_cpo, CPO_DOTTAG) == NULL)
++ && rel_fname != NULL)
++ {
++ int len = (int)(gettail(rel_fname) - rel_fname);
++
++ if (!vim_isAbsName(rel_fname) && len + 1 < MAXPATHL)
++ {
++ // Make the start dir an absolute path name.
++ vim_strncpy(ff_expand_buffer, rel_fname, len);
++ search_ctx->ffsc_start_dir = FullName_save(ff_expand_buffer, FALSE);
++ }
++ else
++ search_ctx->ffsc_start_dir = vim_strnsave(rel_fname, len);
++ if (search_ctx->ffsc_start_dir == NULL)
++ goto error_return;
++ if (*++path != NUL)
++ ++path;
++ }
++ else if (*path == NUL || !vim_isAbsName(path))
++ {
++ #ifdef BACKSLASH_IN_FILENAME
++ // "c:dir" needs "c:" to be expanded, otherwise use current dir
++ if (*path != NUL && path[1] == ':')
++ {
++ char_u drive[3];
++
++ drive[0] = path[0];
++ drive[1] = ':';
++ drive[2] = NUL;
++ if (vim_FullName(drive, ff_expand_buffer, MAXPATHL, TRUE) == FAIL)
++ goto error_return;
++ path += 2;
++ }
++ else
++ #endif
++ if (mch_dirname(ff_expand_buffer, MAXPATHL) == FAIL)
++ goto error_return;
++
++ search_ctx->ffsc_start_dir = vim_strsave(ff_expand_buffer);
++ if (search_ctx->ffsc_start_dir == NULL)
++ goto error_return;
++
++ #ifdef BACKSLASH_IN_FILENAME
++ // A path that starts with "/dir" is relative to the drive, not to the
++ // directory (but not for "//machine/dir"). Only use the drive name.
++ if ((*path == '/' || *path == '\\')
++ && path[1] != path[0]
++ && search_ctx->ffsc_start_dir[1] == ':')
++ search_ctx->ffsc_start_dir[2] = NUL;
++ #endif
++ }
++
++ #ifdef FEAT_PATH_EXTRA
++ /*
++ * If stopdirs are given, split them into an array of pointers.
++ * If this fails (mem allocation), there is no upward search at all or a
++ * stop directory is not recognized -> continue silently.
++ * If stopdirs just contains a ";" or is empty,
++ * search_ctx->ffsc_stopdirs_v will only contain a NULL pointer. This
++ * is handled as unlimited upward search. See function
++ * ff_path_in_stoplist() for details.
++ */
++ if (stopdirs != NULL)
++ {
++ char_u *walker = stopdirs;
++ int dircount;
++
++ while (*walker == ';')
++ walker++;
++
++ dircount = 1;
++ search_ctx->ffsc_stopdirs_v =
++ (char_u **)alloc((unsigned)sizeof(char_u *));
++
++ if (search_ctx->ffsc_stopdirs_v != NULL)
++ {
++ do
++ {
++ char_u *helper;
++ void *ptr;
++
++ helper = walker;
++ ptr = vim_realloc(search_ctx->ffsc_stopdirs_v,
++ (dircount + 1) * sizeof(char_u *));
++ if (ptr)
++ search_ctx->ffsc_stopdirs_v = ptr;
++ else
++ // ignore, keep what we have and continue
++ break;
++ walker = vim_strchr(walker, ';');
++ if (walker)
++ {
++ search_ctx->ffsc_stopdirs_v[dircount-1] =
++ vim_strnsave(helper, (int)(walker - helper));
++ walker++;
++ }
++ else
++ // this might be "", which means ascent till top
++ // of directory tree.
++ search_ctx->ffsc_stopdirs_v[dircount-1] =
++ vim_strsave(helper);
++
++ dircount++;
++
++ } while (walker != NULL);
++ search_ctx->ffsc_stopdirs_v[dircount-1] = NULL;
++ }
++ }
++ #endif
++
++ #ifdef FEAT_PATH_EXTRA
++ search_ctx->ffsc_level = level;
++
++ /*
++ * split into:
++ * -fix path
++ * -wildcard_stuff (might be NULL)
++ */
++ wc_part = vim_strchr(path, '*');
++ if (wc_part != NULL)
++ {
++ int llevel;
++ int len;
++ char *errpt;
++
++ // save the fix part of the path
++ search_ctx->ffsc_fix_path = vim_strnsave(path, (int)(wc_part - path));
++
++ /*
++ * copy wc_path and add restricts to the '**' wildcard.
++ * The octet after a '**' is used as a (binary) counter.
++ * So '**3' is transposed to '**^C' ('^C' is ASCII value 3)
++ * or '**76' is transposed to '**N'( 'N' is ASCII value 76).
++ * For EBCDIC you get different character values.
++ * If no restrict is given after '**' the default is used.
++ * Due to this technique the path looks awful if you print it as a
++ * string.
++ */
++ len = 0;
++ while (*wc_part != NUL)
++ {
++ if (len + 5 >= MAXPATHL)
++ {
++ emsg(_(e_pathtoolong));
++ break;
++ }
++ if (STRNCMP(wc_part, "**", 2) == 0)
++ {
++ ff_expand_buffer[len++] = *wc_part++;
++ ff_expand_buffer[len++] = *wc_part++;
++
++ llevel = strtol((char *)wc_part, &errpt, 10);
++ if ((char_u *)errpt != wc_part && llevel > 0 && llevel < 255)
++ ff_expand_buffer[len++] = llevel;
++ else if ((char_u *)errpt != wc_part && llevel == 0)
++ // restrict is 0 -> remove already added '**'
++ len -= 2;
++ else
++ ff_expand_buffer[len++] = FF_MAX_STAR_STAR_EXPAND;
++ wc_part = (char_u *)errpt;
++ if (*wc_part != NUL && !vim_ispathsep(*wc_part))
++ {
++ semsg(_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."), PATHSEPSTR);
++ goto error_return;
++ }
++ }
++ else
++ ff_expand_buffer[len++] = *wc_part++;
++ }
++ ff_expand_buffer[len] = NUL;
++ search_ctx->ffsc_wc_path = vim_strsave(ff_expand_buffer);
++
++ if (search_ctx->ffsc_wc_path == NULL)
++ goto error_return;
++ }
++ else
++ #endif
++ search_ctx->ffsc_fix_path = vim_strsave(path);
++
++ if (search_ctx->ffsc_start_dir == NULL)
++ {
++ // store the fix part as startdir.
++ // This is needed if the parameter path is fully qualified.
++ search_ctx->ffsc_start_dir = vim_strsave(search_ctx->ffsc_fix_path);
++ if (search_ctx->ffsc_start_dir == NULL)
++ goto error_return;
++ search_ctx->ffsc_fix_path[0] = NUL;
++ }
++
++ // create an absolute path
++ if (STRLEN(search_ctx->ffsc_start_dir)
++ + STRLEN(search_ctx->ffsc_fix_path) + 3 >= MAXPATHL)
++ {
++ emsg(_(e_pathtoolong));
++ goto error_return;
++ }
++ STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
++ add_pathsep(ff_expand_buffer);
++ {
++ int eb_len = (int)STRLEN(ff_expand_buffer);
++ char_u *buf = alloc(eb_len
++ + (int)STRLEN(search_ctx->ffsc_fix_path) + 1);
++
++ STRCPY(buf, ff_expand_buffer);
++ STRCPY(buf + eb_len, search_ctx->ffsc_fix_path);
++ if (mch_isdir(buf))
++ {
++ STRCAT(ff_expand_buffer, search_ctx->ffsc_fix_path);
++ add_pathsep(ff_expand_buffer);
++ }
++ #ifdef FEAT_PATH_EXTRA
++ else
++ {
++ char_u *p = gettail(search_ctx->ffsc_fix_path);
++ char_u *wc_path = NULL;
++ char_u *temp = NULL;
++ int len = 0;
++
++ if (p > search_ctx->ffsc_fix_path)
++ {
++ len = (int)(p - search_ctx->ffsc_fix_path) - 1;
++ STRNCAT(ff_expand_buffer, search_ctx->ffsc_fix_path, len);
++ add_pathsep(ff_expand_buffer);
++ }
++ else
++ len = (int)STRLEN(search_ctx->ffsc_fix_path);
++
++ if (search_ctx->ffsc_wc_path != NULL)
++ {
++ wc_path = vim_strsave(search_ctx->ffsc_wc_path);
++ temp = alloc((int)(STRLEN(search_ctx->ffsc_wc_path)
++ + STRLEN(search_ctx->ffsc_fix_path + len)
++ + 1));
++ if (temp == NULL || wc_path == NULL)
++ {
++ vim_free(buf);
++ vim_free(temp);
++ vim_free(wc_path);
++ goto error_return;
++ }
++
++ STRCPY(temp, search_ctx->ffsc_fix_path + len);
++ STRCAT(temp, search_ctx->ffsc_wc_path);
++ vim_free(search_ctx->ffsc_wc_path);
++ vim_free(wc_path);
++ search_ctx->ffsc_wc_path = temp;
++ }
++ }
++ #endif
++ vim_free(buf);
++ }
++
++ sptr = ff_create_stack_element(ff_expand_buffer,
++ #ifdef FEAT_PATH_EXTRA
++ search_ctx->ffsc_wc_path,
++ #endif
++ level, 0);
++
++ if (sptr == NULL)
++ goto error_return;
++
++ ff_push(search_ctx, sptr);
++
++ search_ctx->ffsc_file_to_search = vim_strsave(filename);
++ if (search_ctx->ffsc_file_to_search == NULL)
++ goto error_return;
++
++ return search_ctx;
++
++ error_return:
++ /*
++ * We clear the search context now!
++ * Even when the caller gave us a (perhaps valid) context we free it here,
++ * as we might have already destroyed it.
++ */
++ vim_findfile_cleanup(search_ctx);
++ return NULL;
++ }
++
++ #if defined(FEAT_PATH_EXTRA) || defined(PROTO)
++ /*
++ * Get the stopdir string. Check that ';' is not escaped.
++ */
++ char_u *
++ vim_findfile_stopdir(char_u *buf)
++ {
++ char_u *r_ptr = buf;
++
++ while (*r_ptr != NUL && *r_ptr != ';')
++ {
++ if (r_ptr[0] == '\\' && r_ptr[1] == ';')
++ {
++ // Overwrite the escape char,
++ // use STRLEN(r_ptr) to move the trailing '\0'.
++ STRMOVE(r_ptr, r_ptr + 1);
++ r_ptr++;
++ }
++ r_ptr++;
++ }
++ if (*r_ptr == ';')
++ {
++ *r_ptr = 0;
++ r_ptr++;
++ }
++ else if (*r_ptr == NUL)
++ r_ptr = NULL;
++ return r_ptr;
++ }
++ #endif
++
++ /*
++ * Clean up the given search context. Can handle a NULL pointer.
++ */
++ void
++ vim_findfile_cleanup(void *ctx)
++ {
++ if (ctx == NULL)
++ return;
++
++ vim_findfile_free_visited(ctx);
++ ff_clear(ctx);
++ vim_free(ctx);
++ }
++
++ /*
++ * Find a file in a search context.
++ * The search context was created with vim_findfile_init() above.
++ * Return a pointer to an allocated file name or NULL if nothing found.
++ * To get all matching files call this function until you get NULL.
++ *
++ * If the passed search_context is NULL, NULL is returned.
++ *
++ * The search algorithm is depth first. To change this replace the
++ * stack with a list (don't forget to leave partly searched directories on the
++ * top of the list).
++ */
++ char_u *
++ vim_findfile(void *search_ctx_arg)
++ {
++ char_u *file_path;
++ #ifdef FEAT_PATH_EXTRA
++ char_u *rest_of_wildcards;
++ char_u *path_end = NULL;
++ #endif
++ ff_stack_T *stackp;
++ #if defined(FEAT_SEARCHPATH) || defined(FEAT_PATH_EXTRA)
++ int len;
++ #endif
++ int i;
++ char_u *p;
++ #ifdef FEAT_SEARCHPATH
++ char_u *suf;
++ #endif
++ ff_search_ctx_T *search_ctx;
++
++ if (search_ctx_arg == NULL)
++ return NULL;
++
++ search_ctx = (ff_search_ctx_T *)search_ctx_arg;
++
++ /*
++ * filepath is used as buffer for various actions and as the storage to
++ * return a found filename.
++ */
++ if ((file_path = alloc((int)MAXPATHL)) == NULL)
++ return NULL;
++
++ #ifdef FEAT_PATH_EXTRA
++ // store the end of the start dir -- needed for upward search
++ if (search_ctx->ffsc_start_dir != NULL)
++ path_end = &search_ctx->ffsc_start_dir[
++ STRLEN(search_ctx->ffsc_start_dir)];
++ #endif
++
++ #ifdef FEAT_PATH_EXTRA
++ // upward search loop
++ for (;;)
++ {
++ #endif
++ // downward search loop
++ for (;;)
++ {
++ // check if user user wants to stop the search
++ ui_breakcheck();
++ if (got_int)
++ break;
++
++ // get directory to work on from stack
++ stackp = ff_pop(search_ctx);
++ if (stackp == NULL)
++ break;
++
++ /*
++ * TODO: decide if we leave this test in
++ *
++ * GOOD: don't search a directory(-tree) twice.
++ * BAD: - check linked list for every new directory entered.
++ * - check for double files also done below
++ *
++ * Here we check if we already searched this directory.
++ * We already searched a directory if:
++ * 1) The directory is the same.
++ * 2) We would use the same wildcard string.
++ *
++ * Good if you have links on same directory via several ways
++ * or you have selfreferences in directories (e.g. SuSE Linux 6.3:
++ * /etc/rc.d/init.d is linked to /etc/rc.d -> endless loop)
++ *
++ * This check is only needed for directories we work on for the
++ * first time (hence stackp->ff_filearray == NULL)
++ */
++ if (stackp->ffs_filearray == NULL
++ && ff_check_visited(&search_ctx->ffsc_dir_visited_list
++ ->ffvl_visited_list,
++ stackp->ffs_fix_path
++ #ifdef FEAT_PATH_EXTRA
++ , stackp->ffs_wc_path
++ #endif
++ ) == FAIL)
++ {
++ #ifdef FF_VERBOSE
++ if (p_verbose >= 5)
++ {
++ verbose_enter_scroll();
++ smsg("Already Searched: %s (%s)",
++ stackp->ffs_fix_path, stackp->ffs_wc_path);
++ // don't overwrite this either
++ msg_puts("\n");
++ verbose_leave_scroll();
++ }
++ #endif
++ ff_free_stack_element(stackp);
++ continue;
++ }
++ #ifdef FF_VERBOSE
++ else if (p_verbose >= 5)
++ {
++ verbose_enter_scroll();
++ smsg("Searching: %s (%s)",
++ stackp->ffs_fix_path, stackp->ffs_wc_path);
++ // don't overwrite this either
++ msg_puts("\n");
++ verbose_leave_scroll();
++ }
++ #endif
++
++ // check depth
++ if (stackp->ffs_level <= 0)
++ {
++ ff_free_stack_element(stackp);
++ continue;
++ }
++
++ file_path[0] = NUL;
++
++ /*
++ * If no filearray till now expand wildcards
++ * The function expand_wildcards() can handle an array of paths
++ * and all possible expands are returned in one array. We use this
++ * to handle the expansion of '**' into an empty string.
++ */
++ if (stackp->ffs_filearray == NULL)
++ {
++ char_u *dirptrs[2];
++
++ // we use filepath to build the path expand_wildcards() should
++ // expand.
++ dirptrs[0] = file_path;
++ dirptrs[1] = NULL;
++
++ // if we have a start dir copy it in
++ if (!vim_isAbsName(stackp->ffs_fix_path)
++ && search_ctx->ffsc_start_dir)
++ {
++ if (STRLEN(search_ctx->ffsc_start_dir) + 1 < MAXPATHL)
++ {
++ STRCPY(file_path, search_ctx->ffsc_start_dir);
++ add_pathsep(file_path);
++ }
++ else
++ {
++ ff_free_stack_element(stackp);
++ goto fail;
++ }
++ }
++
++ // append the fix part of the search path
++ if (STRLEN(file_path) + STRLEN(stackp->ffs_fix_path) + 1
++ < MAXPATHL)
++ {
++ STRCAT(file_path, stackp->ffs_fix_path);
++ add_pathsep(file_path);
++ }
++ else
++ {
++ ff_free_stack_element(stackp);
++ goto fail;
++ }
++
++ #ifdef FEAT_PATH_EXTRA
++ rest_of_wildcards = stackp->ffs_wc_path;
++ if (*rest_of_wildcards != NUL)
++ {
++ len = (int)STRLEN(file_path);
++ if (STRNCMP(rest_of_wildcards, "**", 2) == 0)
++ {
++ // pointer to the restrict byte
++ // The restrict byte is not a character!
++ p = rest_of_wildcards + 2;
++
++ if (*p > 0)
++ {
++ (*p)--;
++ if (len + 1 < MAXPATHL)
++ file_path[len++] = '*';
++ else
++ {
++ ff_free_stack_element(stackp);
++ goto fail;
++ }
++ }
++
++ if (*p == 0)
++ {
++ // remove '**<numb> from wildcards
++ STRMOVE(rest_of_wildcards, rest_of_wildcards + 3);
++ }
++ else
++ rest_of_wildcards += 3;
++
++ if (stackp->ffs_star_star_empty == 0)
++ {
++ // if not done before, expand '**' to empty
++ stackp->ffs_star_star_empty = 1;
++ dirptrs[1] = stackp->ffs_fix_path;
++ }
++ }
++
++ /*
++ * Here we copy until the next path separator or the end of
++ * the path. If we stop at a path separator, there is
++ * still something else left. This is handled below by
++ * pushing every directory returned from expand_wildcards()
++ * on the stack again for further search.
++ */
++ while (*rest_of_wildcards
++ && !vim_ispathsep(*rest_of_wildcards))
++ if (len + 1 < MAXPATHL)
++ file_path[len++] = *rest_of_wildcards++;
++ else
++ {
++ ff_free_stack_element(stackp);
++ goto fail;
++ }
++
++ file_path[len] = NUL;
++ if (vim_ispathsep(*rest_of_wildcards))
++ rest_of_wildcards++;
++ }
++ #endif
++
++ /*
++ * Expand wildcards like "*" and "$VAR".
++ * If the path is a URL don't try this.
++ */
++ if (path_with_url(dirptrs[0]))
++ {
++ stackp->ffs_filearray = (char_u **)
++ alloc((unsigned)sizeof(char *));
++ if (stackp->ffs_filearray != NULL
++ && (stackp->ffs_filearray[0]
++ = vim_strsave(dirptrs[0])) != NULL)
++ stackp->ffs_filearray_size = 1;
++ else
++ stackp->ffs_filearray_size = 0;
++ }
++ else
++ // Add EW_NOTWILD because the expanded path may contain
++ // wildcard characters that are to be taken literally.
++ // This is a bit of a hack.
++ expand_wildcards((dirptrs[1] == NULL) ? 1 : 2, dirptrs,
++ &stackp->ffs_filearray_size,
++ &stackp->ffs_filearray,
++ EW_DIR|EW_ADDSLASH|EW_SILENT|EW_NOTWILD);
++
++ stackp->ffs_filearray_cur = 0;
++ stackp->ffs_stage = 0;
++ }
++ #ifdef FEAT_PATH_EXTRA
++ else
++ rest_of_wildcards = &stackp->ffs_wc_path[
++ STRLEN(stackp->ffs_wc_path)];
++ #endif
++
++ if (stackp->ffs_stage == 0)
++ {
++ // this is the first time we work on this directory
++ #ifdef FEAT_PATH_EXTRA
++ if (*rest_of_wildcards == NUL)
++ #endif
++ {
++ /*
++ * We don't have further wildcards to expand, so we have to
++ * check for the final file now.
++ */
++ for (i = stackp->ffs_filearray_cur;
++ i < stackp->ffs_filearray_size; ++i)
++ {
++ if (!path_with_url(stackp->ffs_filearray[i])
++ && !mch_isdir(stackp->ffs_filearray[i]))
++ continue; /* not a directory */
++
++ // prepare the filename to be checked for existence
++ // below
++ if (STRLEN(stackp->ffs_filearray[i]) + 1
++ + STRLEN(search_ctx->ffsc_file_to_search)
++ < MAXPATHL)
++ {
++ STRCPY(file_path, stackp->ffs_filearray[i]);
++ add_pathsep(file_path);
++ STRCAT(file_path, search_ctx->ffsc_file_to_search);
++ }
++ else
++ {
++ ff_free_stack_element(stackp);
++ goto fail;
++ }
++
++ /*
++ * Try without extra suffix and then with suffixes
++ * from 'suffixesadd'.
++ */
++ #ifdef FEAT_SEARCHPATH
++ len = (int)STRLEN(file_path);
++ if (search_ctx->ffsc_tagfile)
++ suf = (char_u *)"";
++ else
++ suf = curbuf->b_p_sua;
++ for (;;)
++ #endif
++ {
++ // if file exists and we didn't already find it
++ if ((path_with_url(file_path)
++ || (mch_getperm(file_path) >= 0
++ && (search_ctx->ffsc_find_what
++ == FINDFILE_BOTH
++ || ((search_ctx->ffsc_find_what
++ == FINDFILE_DIR)
++ == mch_isdir(file_path)))))
++ #ifndef FF_VERBOSE
++ && (ff_check_visited(
++ &search_ctx->ffsc_visited_list->ffvl_visited_list,
++ file_path
++ #ifdef FEAT_PATH_EXTRA
++ , (char_u *)""
++ #endif
++ ) == OK)
++ #endif
++ )
++ {
++ #ifdef FF_VERBOSE
++ if (ff_check_visited(
++ &search_ctx->ffsc_visited_list->ffvl_visited_list,
++ file_path
++ #ifdef FEAT_PATH_EXTRA
++ , (char_u *)""
++ #endif
++ ) == FAIL)
++ {
++ if (p_verbose >= 5)
++ {
++ verbose_enter_scroll();
++ smsg("Already: %s",
++ file_path);
++ // don't overwrite this either
++ msg_puts("\n");
++ verbose_leave_scroll();
++ }
++ continue;
++ }
++ #endif
++
++ // push dir to examine rest of subdirs later
++ stackp->ffs_filearray_cur = i + 1;
++ ff_push(search_ctx, stackp);
++
++ if (!path_with_url(file_path))
++ simplify_filename(file_path);
++ if (mch_dirname(ff_expand_buffer, MAXPATHL)
++ == OK)
++ {
++ p = shorten_fname(file_path,
++ ff_expand_buffer);
++ if (p != NULL)
++ STRMOVE(file_path, p);
++ }
++ #ifdef FF_VERBOSE
++ if (p_verbose >= 5)
++ {
++ verbose_enter_scroll();
++ smsg("HIT: %s", file_path);
++ // don't overwrite this either
++ msg_puts("\n");
++ verbose_leave_scroll();
++ }
++ #endif
++ return file_path;
++ }
++
++ #ifdef FEAT_SEARCHPATH
++ // Not found or found already, try next suffix.
++ if (*suf == NUL)
++ break;
++ copy_option_part(&suf, file_path + len,
++ MAXPATHL - len, ",");
++ #endif
++ }
++ }
++ }
++ #ifdef FEAT_PATH_EXTRA
++ else
++ {
++ /*
++ * still wildcards left, push the directories for further
++ * search
++ */
++ for (i = stackp->ffs_filearray_cur;
++ i < stackp->ffs_filearray_size; ++i)
++ {
++ if (!mch_isdir(stackp->ffs_filearray[i]))
++ continue; // not a directory
++
++ ff_push(search_ctx,
++ ff_create_stack_element(
++ stackp->ffs_filearray[i],
++ rest_of_wildcards,
++ stackp->ffs_level - 1, 0));
++ }
++ }
++ #endif
++ stackp->ffs_filearray_cur = 0;
++ stackp->ffs_stage = 1;
++ }
++
++ #ifdef FEAT_PATH_EXTRA
++ /*
++ * if wildcards contains '**' we have to descent till we reach the
++ * leaves of the directory tree.
++ */
++ if (STRNCMP(stackp->ffs_wc_path, "**", 2) == 0)
++ {
++ for (i = stackp->ffs_filearray_cur;
++ i < stackp->ffs_filearray_size; ++i)
++ {
++ if (fnamecmp(stackp->ffs_filearray[i],
++ stackp->ffs_fix_path) == 0)
++ continue; // don't repush same directory
++ if (!mch_isdir(stackp->ffs_filearray[i]))
++ continue; // not a directory
++ ff_push(search_ctx,
++ ff_create_stack_element(stackp->ffs_filearray[i],
++ stackp->ffs_wc_path, stackp->ffs_level - 1, 1));
++ }
++ }
++ #endif
++
++ // we are done with the current directory
++ ff_free_stack_element(stackp);
++
++ }
++
++ #ifdef FEAT_PATH_EXTRA
++ // If we reached this, we didn't find anything downwards.
++ // Let's check if we should do an upward search.
++ if (search_ctx->ffsc_start_dir
++ && search_ctx->ffsc_stopdirs_v != NULL && !got_int)
++ {
++ ff_stack_T *sptr;
++
++ // is the last starting directory in the stop list?
++ if (ff_path_in_stoplist(search_ctx->ffsc_start_dir,
++ (int)(path_end - search_ctx->ffsc_start_dir),
++ search_ctx->ffsc_stopdirs_v) == TRUE)
++ break;
++
++ // cut of last dir
++ while (path_end > search_ctx->ffsc_start_dir
++ && vim_ispathsep(*path_end))
++ path_end--;
++ while (path_end > search_ctx->ffsc_start_dir
++ && !vim_ispathsep(path_end[-1]))
++ path_end--;
++ *path_end = 0;
++ path_end--;
++
++ if (*search_ctx->ffsc_start_dir == 0)
++ break;
++
++ if (STRLEN(search_ctx->ffsc_start_dir) + 1
++ + STRLEN(search_ctx->ffsc_fix_path) < MAXPATHL)
++ {
++ STRCPY(file_path, search_ctx->ffsc_start_dir);
++ add_pathsep(file_path);
++ STRCAT(file_path, search_ctx->ffsc_fix_path);
++ }
++ else
++ goto fail;
++
++ // create a new stack entry
++ sptr = ff_create_stack_element(file_path,
++ search_ctx->ffsc_wc_path, search_ctx->ffsc_level, 0);
++ if (sptr == NULL)
++ break;
++ ff_push(search_ctx, sptr);
++ }
++ else
++ break;
++ }
++ #endif
++
++ fail:
++ vim_free(file_path);
++ return NULL;
++ }
++
++ /*
++ * Free the list of lists of visited files and directories
++ * Can handle it if the passed search_context is NULL;
++ */
++ void
++ vim_findfile_free_visited(void *search_ctx_arg)
++ {
++ ff_search_ctx_T *search_ctx;
++
++ if (search_ctx_arg == NULL)
++ return;
++
++ search_ctx = (ff_search_ctx_T *)search_ctx_arg;
++ vim_findfile_free_visited_list(&search_ctx->ffsc_visited_lists_list);
++ vim_findfile_free_visited_list(&search_ctx->ffsc_dir_visited_lists_list);
++ }
++
++ static void
++ vim_findfile_free_visited_list(ff_visited_list_hdr_T **list_headp)
++ {
++ ff_visited_list_hdr_T *vp;
++
++ while (*list_headp != NULL)
++ {
++ vp = (*list_headp)->ffvl_next;
++ ff_free_visited_list((*list_headp)->ffvl_visited_list);
++
++ vim_free((*list_headp)->ffvl_filename);
++ vim_free(*list_headp);
++ *list_headp = vp;
++ }
++ *list_headp = NULL;
++ }
++
++ static void
++ ff_free_visited_list(ff_visited_T *vl)
++ {
++ ff_visited_T *vp;
++
++ while (vl != NULL)
++ {
++ vp = vl->ffv_next;
++ #ifdef FEAT_PATH_EXTRA
++ vim_free(vl->ffv_wc_path);
++ #endif
++ vim_free(vl);
++ vl = vp;
++ }
++ vl = NULL;
++ }
++
++ /*
++ * Returns the already visited list for the given filename. If none is found it
++ * allocates a new one.
++ */
++ static ff_visited_list_hdr_T*
++ ff_get_visited_list(
++ char_u *filename,
++ ff_visited_list_hdr_T **list_headp)
++ {
++ ff_visited_list_hdr_T *retptr = NULL;
++
++ // check if a visited list for the given filename exists
++ if (*list_headp != NULL)
++ {
++ retptr = *list_headp;
++ while (retptr != NULL)
++ {
++ if (fnamecmp(filename, retptr->ffvl_filename) == 0)
++ {
++ #ifdef FF_VERBOSE
++ if (p_verbose >= 5)
++ {
++ verbose_enter_scroll();
++ smsg("ff_get_visited_list: FOUND list for %s",
++ filename);
++ // don't overwrite this either
++ msg_puts("\n");
++ verbose_leave_scroll();
++ }
++ #endif
++ return retptr;
++ }
++ retptr = retptr->ffvl_next;
++ }
++ }
++
++ #ifdef FF_VERBOSE
++ if (p_verbose >= 5)
++ {
++ verbose_enter_scroll();
++ smsg("ff_get_visited_list: new list for %s", filename);
++ // don't overwrite this either
++ msg_puts("\n");
++ verbose_leave_scroll();
++ }
++ #endif
++
++ /*
++ * if we reach this we didn't find a list and we have to allocate new list
++ */
++ retptr = (ff_visited_list_hdr_T*)alloc((unsigned)sizeof(*retptr));
++ if (retptr == NULL)
++ return NULL;
++
++ retptr->ffvl_visited_list = NULL;
++ retptr->ffvl_filename = vim_strsave(filename);
++ if (retptr->ffvl_filename == NULL)
++ {
++ vim_free(retptr);
++ return NULL;
++ }
++ retptr->ffvl_next = *list_headp;
++ *list_headp = retptr;
++
++ return retptr;
++ }
++
++ #ifdef FEAT_PATH_EXTRA
++ /*
++ * check if two wildcard paths are equal. Returns TRUE or FALSE.
++ * They are equal if:
++ * - both paths are NULL
++ * - they have the same length
++ * - char by char comparison is OK
++ * - the only differences are in the counters behind a '**', so
++ * '**\20' is equal to '**\24'
++ */
++ static int
++ ff_wc_equal(char_u *s1, char_u *s2)
++ {
++ int i, j;
++ int c1 = NUL;
++ int c2 = NUL;
++ int prev1 = NUL;
++ int prev2 = NUL;
++
++ if (s1 == s2)
++ return TRUE;
++
++ if (s1 == NULL || s2 == NULL)
++ return FALSE;
++
++ for (i = 0, j = 0; s1[i] != NUL && s2[j] != NUL;)
++ {
++ c1 = PTR2CHAR(s1 + i);
++ c2 = PTR2CHAR(s2 + j);
++
++ if ((p_fic ? MB_TOLOWER(c1) != MB_TOLOWER(c2) : c1 != c2)
++ && (prev1 != '*' || prev2 != '*'))
++ return FALSE;
++ prev2 = prev1;
++ prev1 = c1;
++
++ i += MB_PTR2LEN(s1 + i);
++ j += MB_PTR2LEN(s2 + j);
++ }
++ return s1[i] == s2[j];
++ }
++ #endif
++
++ /*
++ * maintains the list of already visited files and dirs
++ * returns FAIL if the given file/dir is already in the list
++ * returns OK if it is newly added
++ *
++ * TODO: What to do on memory allocation problems?
++ * -> return TRUE - Better the file is found several times instead of
++ * never.
++ */
++ static int
++ ff_check_visited(
++ ff_visited_T **visited_list,
++ char_u *fname
++ #ifdef FEAT_PATH_EXTRA
++ , char_u *wc_path
++ #endif
++ )
++ {
++ ff_visited_T *vp;
++ #ifdef UNIX
++ stat_T st;
++ int url = FALSE;
++ #endif
++
++ // For an URL we only compare the name, otherwise we compare the
++ // device/inode (unix) or the full path name (not Unix).
++ if (path_with_url(fname))
++ {
++ vim_strncpy(ff_expand_buffer, fname, MAXPATHL - 1);
++ #ifdef UNIX
++ url = TRUE;
++ #endif
++ }
++ else
++ {
++ ff_expand_buffer[0] = NUL;
++ #ifdef UNIX
++ if (mch_stat((char *)fname, &st) < 0)
++ #else
++ if (vim_FullName(fname, ff_expand_buffer, MAXPATHL, TRUE) == FAIL)
++ #endif
++ return FAIL;
++ }
++
++ // check against list of already visited files
++ for (vp = *visited_list; vp != NULL; vp = vp->ffv_next)
++ {
++ if (
++ #ifdef UNIX
++ !url ? (vp->ffv_dev_valid && vp->ffv_dev == st.st_dev
++ && vp->ffv_ino == st.st_ino)
++ :
++ #endif
++ fnamecmp(vp->ffv_fname, ff_expand_buffer) == 0
++ )
++ {
++ #ifdef FEAT_PATH_EXTRA
++ // are the wildcard parts equal
++ if (ff_wc_equal(vp->ffv_wc_path, wc_path) == TRUE)
++ #endif
++ // already visited
++ return FAIL;
++ }
++ }
++
++ /*
++ * New file/dir. Add it to the list of visited files/dirs.
++ */
++ vp = (ff_visited_T *)alloc((unsigned)(sizeof(ff_visited_T)
++ + STRLEN(ff_expand_buffer)));
++
++ if (vp != NULL)
++ {
++ #ifdef UNIX
++ if (!url)
++ {
++ vp->ffv_dev_valid = TRUE;
++ vp->ffv_ino = st.st_ino;
++ vp->ffv_dev = st.st_dev;
++ vp->ffv_fname[0] = NUL;
++ }
++ else
++ {
++ vp->ffv_dev_valid = FALSE;
++ #endif
++ STRCPY(vp->ffv_fname, ff_expand_buffer);
++ #ifdef UNIX
++ }
++ #endif
++ #ifdef FEAT_PATH_EXTRA
++ if (wc_path != NULL)
++ vp->ffv_wc_path = vim_strsave(wc_path);
++ else
++ vp->ffv_wc_path = NULL;
++ #endif
++
++ vp->ffv_next = *visited_list;
++ *visited_list = vp;
++ }
++
++ return OK;
++ }
++
++ /*
++ * create stack element from given path pieces
++ */
++ static ff_stack_T *
++ ff_create_stack_element(
++ char_u *fix_part,
++ #ifdef FEAT_PATH_EXTRA
++ char_u *wc_part,
++ #endif
++ int level,
++ int star_star_empty)
++ {
++ ff_stack_T *new;
++
++ new = (ff_stack_T *)alloc((unsigned)sizeof(ff_stack_T));
++ if (new == NULL)
++ return NULL;
++
++ new->ffs_prev = NULL;
++ new->ffs_filearray = NULL;
++ new->ffs_filearray_size = 0;
++ new->ffs_filearray_cur = 0;
++ new->ffs_stage = 0;
++ new->ffs_level = level;
++ new->ffs_star_star_empty = star_star_empty;
++
++ // the following saves NULL pointer checks in vim_findfile
++ if (fix_part == NULL)
++ fix_part = (char_u *)"";
++ new->ffs_fix_path = vim_strsave(fix_part);
++
++ #ifdef FEAT_PATH_EXTRA
++ if (wc_part == NULL)
++ wc_part = (char_u *)"";
++ new->ffs_wc_path = vim_strsave(wc_part);
++ #endif
++
++ if (new->ffs_fix_path == NULL
++ #ifdef FEAT_PATH_EXTRA
++ || new->ffs_wc_path == NULL
++ #endif
++ )
++ {
++ ff_free_stack_element(new);
++ new = NULL;
++ }
++
++ return new;
++ }
++
++ /*
++ * Push a dir on the directory stack.
++ */
++ static void
++ ff_push(ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr)
++ {
++ // check for NULL pointer, not to return an error to the user, but
++ // to prevent a crash
++ if (stack_ptr != NULL)
++ {
++ stack_ptr->ffs_prev = search_ctx->ffsc_stack_ptr;
++ search_ctx->ffsc_stack_ptr = stack_ptr;
++ }
++ }
++
++ /*
++ * Pop a dir from the directory stack.
++ * Returns NULL if stack is empty.
++ */
++ static ff_stack_T *
++ ff_pop(ff_search_ctx_T *search_ctx)
++ {
++ ff_stack_T *sptr;
++
++ sptr = search_ctx->ffsc_stack_ptr;
++ if (search_ctx->ffsc_stack_ptr != NULL)
++ search_ctx->ffsc_stack_ptr = search_ctx->ffsc_stack_ptr->ffs_prev;
++
++ return sptr;
++ }
++
++ /*
++ * free the given stack element
++ */
++ static void
++ ff_free_stack_element(ff_stack_T *stack_ptr)
++ {
++ // vim_free handles possible NULL pointers
++ vim_free(stack_ptr->ffs_fix_path);
++ #ifdef FEAT_PATH_EXTRA
++ vim_free(stack_ptr->ffs_wc_path);
++ #endif
++
++ if (stack_ptr->ffs_filearray != NULL)
++ FreeWild(stack_ptr->ffs_filearray_size, stack_ptr->ffs_filearray);
++
++ vim_free(stack_ptr);
++ }
++
++ /*
++ * Clear the search context, but NOT the visited list.
++ */
++ static void
++ ff_clear(ff_search_ctx_T *search_ctx)
++ {
++ ff_stack_T *sptr;
++
++ // clear up stack
++ while ((sptr = ff_pop(search_ctx)) != NULL)
++ ff_free_stack_element(sptr);
++
++ vim_free(search_ctx->ffsc_file_to_search);
++ vim_free(search_ctx->ffsc_start_dir);
++ vim_free(search_ctx->ffsc_fix_path);
++ #ifdef FEAT_PATH_EXTRA
++ vim_free(search_ctx->ffsc_wc_path);
++ #endif
++
++ #ifdef FEAT_PATH_EXTRA
++ if (search_ctx->ffsc_stopdirs_v != NULL)
++ {
++ int i = 0;
++
++ while (search_ctx->ffsc_stopdirs_v[i] != NULL)
++ {
++ vim_free(search_ctx->ffsc_stopdirs_v[i]);
++ i++;
++ }
++ vim_free(search_ctx->ffsc_stopdirs_v);
++ }
++ search_ctx->ffsc_stopdirs_v = NULL;
++ #endif
++
++ // reset everything
++ search_ctx->ffsc_file_to_search = NULL;
++ search_ctx->ffsc_start_dir = NULL;
++ search_ctx->ffsc_fix_path = NULL;
++ #ifdef FEAT_PATH_EXTRA
++ search_ctx->ffsc_wc_path = NULL;
++ search_ctx->ffsc_level = 0;
++ #endif
++ }
++
++ #ifdef FEAT_PATH_EXTRA
++ /*
++ * check if the given path is in the stopdirs
++ * returns TRUE if yes else FALSE
++ */
++ static int
++ ff_path_in_stoplist(char_u *path, int path_len, char_u **stopdirs_v)
++ {
++ int i = 0;
++
++ // eat up trailing path separators, except the first
++ while (path_len > 1 && vim_ispathsep(path[path_len - 1]))
++ path_len--;
++
++ // if no path consider it as match
++ if (path_len == 0)
++ return TRUE;
++
++ for (i = 0; stopdirs_v[i] != NULL; i++)
++ {
++ if ((int)STRLEN(stopdirs_v[i]) > path_len)
++ {
++ // match for parent directory. So '/home' also matches
++ // '/home/rks'. Check for PATHSEP in stopdirs_v[i], else
++ // '/home/r' would also match '/home/rks'
++ if (fnamencmp(stopdirs_v[i], path, path_len) == 0
++ && vim_ispathsep(stopdirs_v[i][path_len]))
++ return TRUE;
++ }
++ else
++ {
++ if (fnamecmp(stopdirs_v[i], path) == 0)
++ return TRUE;
++ }
++ }
++ return FALSE;
++ }
++ #endif
++
++ #if defined(FEAT_SEARCHPATH) || defined(PROTO)
++ /*
++ * Find the file name "ptr[len]" in the path. Also finds directory names.
++ *
++ * On the first call set the parameter 'first' to TRUE to initialize
++ * the search. For repeating calls to FALSE.
++ *
++ * Repeating calls will return other files called 'ptr[len]' from the path.
++ *
++ * Only on the first call 'ptr' and 'len' are used. For repeating calls they
++ * don't need valid values.
++ *
++ * If nothing found on the first call the option FNAME_MESS will issue the
++ * message:
++ * 'Can't find file "<file>" in path'
++ * On repeating calls:
++ * 'No more file "<file>" found in path'
++ *
++ * options:
++ * FNAME_MESS give error message when not found
++ *
++ * Uses NameBuff[]!
++ *
++ * Returns an allocated string for the file name. NULL for error.
++ *
++ */
++ char_u *
++ find_file_in_path(
++ char_u *ptr, // file name
++ int len, // length of file name
++ int options,
++ int first, // use count'th matching file name
++ char_u *rel_fname) // file name searching relative to
++ {
++ return find_file_in_path_option(ptr, len, options, first,
++ *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path,
++ FINDFILE_BOTH, rel_fname, curbuf->b_p_sua);
++ }
++
++ static char_u *ff_file_to_find = NULL;
++ static void *fdip_search_ctx = NULL;
++
++ # if defined(EXITFREE) || defined(PROTO)
++ void
++ free_findfile(void)
++ {
++ vim_free(ff_file_to_find);
++ vim_findfile_cleanup(fdip_search_ctx);
++ vim_free(ff_expand_buffer);
++ }
++ # endif
++
++ /*
++ * Find the directory name "ptr[len]" in the path.
++ *
++ * options:
++ * FNAME_MESS give error message when not found
++ * FNAME_UNESC unescape backslashes.
++ *
++ * Uses NameBuff[]!
++ *
++ * Returns an allocated string for the file name. NULL for error.
++ */
++ char_u *
++ find_directory_in_path(
++ char_u *ptr, // file name
++ int len, // length of file name
++ int options,
++ char_u *rel_fname) // file name searching relative to
++ {
++ return find_file_in_path_option(ptr, len, options, TRUE, p_cdpath,
++ FINDFILE_DIR, rel_fname, (char_u *)"");
++ }
++
++ char_u *
++ find_file_in_path_option(
++ char_u *ptr, // file name
++ int len, // length of file name
++ int options,
++ int first, // use count'th matching file name
++ char_u *path_option, // p_path or p_cdpath
++ int find_what, // FINDFILE_FILE, _DIR or _BOTH
++ char_u *rel_fname, // file name we are looking relative to.
++ char_u *suffixes) // list of suffixes, 'suffixesadd' option
++ {
++ static char_u *dir;
++ static int did_findfile_init = FALSE;
++ char_u save_char;
++ char_u *file_name = NULL;
++ char_u *buf = NULL;
++ int rel_to_curdir;
++ # ifdef AMIGA
++ struct Process *proc = (struct Process *)FindTask(0L);
++ APTR save_winptr = proc->pr_WindowPtr;
++
++ // Avoid a requester here for a volume that doesn't exist.
++ proc->pr_WindowPtr = (APTR)-1L;
++ # endif
++
++ if (first == TRUE)
++ {
++ // copy file name into NameBuff, expanding environment variables
++ save_char = ptr[len];
++ ptr[len] = NUL;
++ expand_env_esc(ptr, NameBuff, MAXPATHL, FALSE, TRUE, NULL);
++ ptr[len] = save_char;
++
++ vim_free(ff_file_to_find);
++ ff_file_to_find = vim_strsave(NameBuff);
++ if (ff_file_to_find == NULL) // out of memory
++ {
++ file_name = NULL;
++ goto theend;
++ }
++ if (options & FNAME_UNESC)
++ {
++ // Change all "\ " to " ".
++ for (ptr = ff_file_to_find; *ptr != NUL; ++ptr)
++ if (ptr[0] == '\\' && ptr[1] == ' ')
++ mch_memmove(ptr, ptr + 1, STRLEN(ptr));
++ }
++ }
++
++ rel_to_curdir = (ff_file_to_find[0] == '.'
++ && (ff_file_to_find[1] == NUL
++ || vim_ispathsep(ff_file_to_find[1])
++ || (ff_file_to_find[1] == '.'
++ && (ff_file_to_find[2] == NUL
++ || vim_ispathsep(ff_file_to_find[2])))));
++ if (vim_isAbsName(ff_file_to_find)
++ // "..", "../path", "." and "./path": don't use the path_option
++ || rel_to_curdir
++ # if defined(MSWIN)
++ // handle "\tmp" as absolute path
++ || vim_ispathsep(ff_file_to_find[0])
++ // handle "c:name" as absolute path
++ || (ff_file_to_find[0] != NUL && ff_file_to_find[1] == ':')
++ # endif
++ # ifdef AMIGA
++ // handle ":tmp" as absolute path
++ || ff_file_to_find[0] == ':'
++ # endif
++ )
++ {
++ /*
++ * Absolute path, no need to use "path_option".
++ * If this is not a first call, return NULL. We already returned a
++ * filename on the first call.
++ */
++ if (first == TRUE)
++ {
++ int l;
++ int run;
++
++ if (path_with_url(ff_file_to_find))
++ {
++ file_name = vim_strsave(ff_file_to_find);
++ goto theend;
++ }
++
++ // When FNAME_REL flag given first use the directory of the file.
++ // Otherwise or when this fails use the current directory.
++ for (run = 1; run <= 2; ++run)
++ {
++ l = (int)STRLEN(ff_file_to_find);
++ if (run == 1
++ && rel_to_curdir
++ && (options & FNAME_REL)
++ && rel_fname != NULL
++ && STRLEN(rel_fname) + l < MAXPATHL)
++ {
++ STRCPY(NameBuff, rel_fname);
++ STRCPY(gettail(NameBuff), ff_file_to_find);
++ l = (int)STRLEN(NameBuff);
++ }
++ else
++ {
++ STRCPY(NameBuff, ff_file_to_find);
++ run = 2;
++ }
++
++ // When the file doesn't exist, try adding parts of
++ // 'suffixesadd'.
++ buf = suffixes;
++ for (;;)
++ {
++ if (mch_getperm(NameBuff) >= 0
++ && (find_what == FINDFILE_BOTH
++ || ((find_what == FINDFILE_DIR)
++ == mch_isdir(NameBuff))))
++ {
++ file_name = vim_strsave(NameBuff);
++ goto theend;
++ }
++ if (*buf == NUL)
++ break;
++ copy_option_part(&buf, NameBuff + l, MAXPATHL - l, ",");
++ }
++ }
++ }
++ }
++ else
++ {
++ /*
++ * Loop over all paths in the 'path' or 'cdpath' option.
++ * When "first" is set, first setup to the start of the option.
++ * Otherwise continue to find the next match.
++ */
++ if (first == TRUE)
++ {
++ // vim_findfile_free_visited can handle a possible NULL pointer
++ vim_findfile_free_visited(fdip_search_ctx);
++ dir = path_option;
++ did_findfile_init = FALSE;
++ }
++
++ for (;;)
++ {
++ if (did_findfile_init)
++ {
++ file_name = vim_findfile(fdip_search_ctx);
++ if (file_name != NULL)
++ break;
++
++ did_findfile_init = FALSE;
++ }
++ else
++ {
++ char_u *r_ptr;
++
++ if (dir == NULL || *dir == NUL)
++ {
++ // We searched all paths of the option, now we can
++ // free the search context.
++ vim_findfile_cleanup(fdip_search_ctx);
++ fdip_search_ctx = NULL;
++ break;
++ }
++
++ if ((buf = alloc((int)(MAXPATHL))) == NULL)
++ break;
++
++ // copy next path
++ buf[0] = 0;
++ copy_option_part(&dir, buf, MAXPATHL, " ,");
++
++ # ifdef FEAT_PATH_EXTRA
++ // get the stopdir string
++ r_ptr = vim_findfile_stopdir(buf);
++ # else
++ r_ptr = NULL;
++ # endif
++ fdip_search_ctx = vim_findfile_init(buf, ff_file_to_find,
++ r_ptr, 100, FALSE, find_what,
++ fdip_search_ctx, FALSE, rel_fname);
++ if (fdip_search_ctx != NULL)
++ did_findfile_init = TRUE;
++ vim_free(buf);
++ }
++ }
++ }
++ if (file_name == NULL && (options & FNAME_MESS))
++ {
++ if (first == TRUE)
++ {
++ if (find_what == FINDFILE_DIR)
++ semsg(_("E344: Can't find directory \"%s\" in cdpath"),
++ ff_file_to_find);
++ else
++ semsg(_("E345: Can't find file \"%s\" in path"),
++ ff_file_to_find);
++ }
++ else
++ {
++ if (find_what == FINDFILE_DIR)
++ semsg(_("E346: No more directory \"%s\" found in cdpath"),
++ ff_file_to_find);
++ else
++ semsg(_("E347: No more file \"%s\" found in path"),
++ ff_file_to_find);
++ }
++ }
++
++ theend:
++ # ifdef AMIGA
++ proc->pr_WindowPtr = save_winptr;
++ # endif
++ return file_name;
++ }
++
++ /*
++ * Get the file name at the cursor.
++ * If Visual mode is active, use the selected text if it's in one line.
++ * Returns the name in allocated memory, NULL for failure.
++ */
++ char_u *
++ grab_file_name(long count, linenr_T *file_lnum)
++ {
++ int options = FNAME_MESS|FNAME_EXP|FNAME_REL|FNAME_UNESC;
++
++ if (VIsual_active)
++ {
++ int len;
++ char_u *ptr;
++
++ if (get_visual_text(NULL, &ptr, &len) == FAIL)
++ return NULL;
++ return find_file_name_in_path(ptr, len, options,
++ count, curbuf->b_ffname);
++ }
++ return file_name_at_cursor(options | FNAME_HYP, count, file_lnum);
++ }
++
++ /*
++ * Return the file name under or after the cursor.
++ *
++ * The 'path' option is searched if the file name is not absolute.
++ * The string returned has been alloc'ed and should be freed by the caller.
++ * NULL is returned if the file name or file is not found.
++ *
++ * options:
++ * FNAME_MESS give error messages
++ * FNAME_EXP expand to path
++ * FNAME_HYP check for hypertext link
++ * FNAME_INCL apply "includeexpr"
++ */
++ char_u *
++ file_name_at_cursor(int options, long count, linenr_T *file_lnum)
++ {
++ return file_name_in_line(ml_get_curline(),
++ curwin->w_cursor.col, options, count, curbuf->b_ffname,
++ file_lnum);
++ }
++
++ /*
++ * Return the name of the file under or after ptr[col].
++ * Otherwise like file_name_at_cursor().
++ */
++ char_u *
++ file_name_in_line(
++ char_u *line,
++ int col,
++ int options,
++ long count,
++ char_u *rel_fname, // file we are searching relative to
++ linenr_T *file_lnum) // line number after the file name
++ {
++ char_u *ptr;
++ int len;
++ int in_type = TRUE;
++ int is_url = FALSE;
++
++ /*
++ * search forward for what could be the start of a file name
++ */
++ ptr = line + col;
++ while (*ptr != NUL && !vim_isfilec(*ptr))
++ MB_PTR_ADV(ptr);
++ if (*ptr == NUL) // nothing found
++ {
++ if (options & FNAME_MESS)
++ emsg(_("E446: No file name under cursor"));
++ return NULL;
++ }
++
++ /*
++ * Search backward for first char of the file name.
++ * Go one char back to ":" before "//" even when ':' is not in 'isfname'.
++ */
++ while (ptr > line)
++ {
++ if (has_mbyte && (len = (*mb_head_off)(line, ptr - 1)) > 0)
++ ptr -= len + 1;
++ else if (vim_isfilec(ptr[-1])
++ || ((options & FNAME_HYP) && path_is_url(ptr - 1)))
++ --ptr;
++ else
++ break;
++ }
++
++ /*
++ * Search forward for the last char of the file name.
++ * Also allow "://" when ':' is not in 'isfname'.
++ */
++ len = 0;
++ while (vim_isfilec(ptr[len]) || (ptr[len] == '\\' && ptr[len + 1] == ' ')
++ || ((options & FNAME_HYP) && path_is_url(ptr + len))
++ || (is_url && vim_strchr((char_u *)"?&=", ptr[len]) != NULL))
++ {
++ // After type:// we also include ?, & and = as valid characters, so that
++ // http://google.com?q=this&that=ok works.
++ if ((ptr[len] >= 'A' && ptr[len] <= 'Z') || (ptr[len] >= 'a' && ptr[len] <= 'z'))
++ {
++ if (in_type && path_is_url(ptr + len + 1))
++ is_url = TRUE;
++ }
++ else
++ in_type = FALSE;
++
++ if (ptr[len] == '\\')
++ // Skip over the "\" in "\ ".
++ ++len;
++ if (has_mbyte)
++ len += (*mb_ptr2len)(ptr + len);
++ else
++ ++len;
++ }
++
++ /*
++ * If there is trailing punctuation, remove it.
++ * But don't remove "..", could be a directory name.
++ */
++ if (len > 2 && vim_strchr((char_u *)".,:;!", ptr[len - 1]) != NULL
++ && ptr[len - 2] != '.')
++ --len;
++
++ if (file_lnum != NULL)
++ {
++ char_u *p;
++
++ // Get the number after the file name and a separator character
++ p = ptr + len;
++ p = skipwhite(p);
++ if (*p != NUL)
++ {
++ if (!isdigit(*p))
++ ++p; // skip the separator
++ p = skipwhite(p);
++ if (isdigit(*p))
++ *file_lnum = (int)getdigits(&p);
++ }
++ }
++
++ return find_file_name_in_path(ptr, len, options, count, rel_fname);
++ }
++
++ # if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
++ static char_u *
++ eval_includeexpr(char_u *ptr, int len)
++ {
++ char_u *res;
++
++ set_vim_var_string(VV_FNAME, ptr, len);
++ res = eval_to_string_safe(curbuf->b_p_inex, NULL,
++ was_set_insecurely((char_u *)"includeexpr", OPT_LOCAL));
++ set_vim_var_string(VV_FNAME, NULL, 0);
++ return res;
++ }
++ # endif
++
++ /*
++ * Return the name of the file ptr[len] in 'path'.
++ * Otherwise like file_name_at_cursor().
++ */
++ char_u *
++ find_file_name_in_path(
++ char_u *ptr,
++ int len,
++ int options,
++ long count,
++ char_u *rel_fname) // file we are searching relative to
++ {
++ char_u *file_name;
++ int c;
++ # if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
++ char_u *tofree = NULL;
++
++ if ((options & FNAME_INCL) && *curbuf->b_p_inex != NUL)
++ {
++ tofree = eval_includeexpr(ptr, len);
++ if (tofree != NULL)
++ {
++ ptr = tofree;
++ len = (int)STRLEN(ptr);
++ }
++ }
++ # endif
++
++ if (options & FNAME_EXP)
++ {
++ file_name = find_file_in_path(ptr, len, options & ~FNAME_MESS,
++ TRUE, rel_fname);
++
++ # if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
++ /*
++ * If the file could not be found in a normal way, try applying
++ * 'includeexpr' (unless done already).
++ */
++ if (file_name == NULL
++ && !(options & FNAME_INCL) && *curbuf->b_p_inex != NUL)
++ {
++ tofree = eval_includeexpr(ptr, len);
++ if (tofree != NULL)
++ {
++ ptr = tofree;
++ len = (int)STRLEN(ptr);
++ file_name = find_file_in_path(ptr, len, options & ~FNAME_MESS,
++ TRUE, rel_fname);
++ }
++ }
++ # endif
++ if (file_name == NULL && (options & FNAME_MESS))
++ {
++ c = ptr[len];
++ ptr[len] = NUL;
++ semsg(_("E447: Can't find file \"%s\" in path"), ptr);
++ ptr[len] = c;
++ }
++
++ // Repeat finding the file "count" times. This matters when it
++ // appears several times in the path.
++ while (file_name != NULL && --count > 0)
++ {
++ vim_free(file_name);
++ file_name = find_file_in_path(ptr, len, options, FALSE, rel_fname);
++ }
++ }
++ else
++ file_name = vim_strnsave(ptr, len);
++
++ # if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
++ vim_free(tofree);
++ # endif
++
++ return file_name;
++ }
++
++ /*
++ * Return the end of the directory name, on the first path
++ * separator:
++ * "/path/file", "/path/dir/", "/path//dir", "/file"
++ * ^ ^ ^ ^
++ */
++ static char_u *
++ gettail_dir(char_u *fname)
++ {
++ char_u *dir_end = fname;
++ char_u *next_dir_end = fname;
++ int look_for_sep = TRUE;
++ char_u *p;
++
++ for (p = fname; *p != NUL; )
++ {
++ if (vim_ispathsep(*p))
++ {
++ if (look_for_sep)
++ {
++ next_dir_end = p;
++ look_for_sep = FALSE;
++ }
++ }
++ else
++ {
++ if (!look_for_sep)
++ dir_end = next_dir_end;
++ look_for_sep = TRUE;
++ }
++ MB_PTR_ADV(p);
++ }
++ return dir_end;
++ }
++
++ /*
++ * return TRUE if 'c' is a path list separator.
++ */
++ int
++ vim_ispathlistsep(int c)
++ {
++ # ifdef UNIX
++ return (c == ':');
++ # else
++ return (c == ';'); // might not be right for every system...
++ # endif
++ }
++
++ /*
++ * Moves "*psep" back to the previous path separator in "path".
++ * Returns FAIL is "*psep" ends up at the beginning of "path".
++ */
++ static int
++ find_previous_pathsep(char_u *path, char_u **psep)
++ {
++ // skip the current separator
++ if (*psep > path && vim_ispathsep(**psep))
++ --*psep;
++
++ // find the previous separator
++ while (*psep > path)
++ {
++ if (vim_ispathsep(**psep))
++ return OK;
++ MB_PTR_BACK(path, *psep);
++ }
++
++ return FAIL;
++ }
++
++ /*
++ * Returns TRUE if "maybe_unique" is unique wrt other_paths in "gap".
++ * "maybe_unique" is the end portion of "((char_u **)gap->ga_data)[i]".
++ */
++ static int
++ is_unique(char_u *maybe_unique, garray_T *gap, int i)
++ {
++ int j;
++ int candidate_len;
++ int other_path_len;
++ char_u **other_paths = (char_u **)gap->ga_data;
++ char_u *rival;
++
++ for (j = 0; j < gap->ga_len; j++)
++ {
++ if (j == i)
++ continue; // don't compare it with itself
++
++ candidate_len = (int)STRLEN(maybe_unique);
++ other_path_len = (int)STRLEN(other_paths[j]);
++ if (other_path_len < candidate_len)
++ continue; // it's different when it's shorter
++
++ rival = other_paths[j] + other_path_len - candidate_len;
++ if (fnamecmp(maybe_unique, rival) == 0
++ && (rival == other_paths[j] || vim_ispathsep(*(rival - 1))))
++ return FALSE; // match
++ }
++
++ return TRUE; // no match found
++ }
++
++ /*
++ * Split the 'path' option into an array of strings in garray_T. Relative
++ * paths are expanded to their equivalent fullpath. This includes the "."
++ * (relative to current buffer directory) and empty path (relative to current
++ * directory) notations.
++ *
++ * TODO: handle upward search (;) and path limiter (**N) notations by
++ * expanding each into their equivalent path(s).
++ */
++ static void
++ expand_path_option(char_u *curdir, garray_T *gap)
++ {
++ char_u *path_option = *curbuf->b_p_path == NUL
++ ? p_path : curbuf->b_p_path;
++ char_u *buf;
++ char_u *p;
++ int len;
++
++ if ((buf = alloc((int)MAXPATHL)) == NULL)
++ return;
++
++ while (*path_option != NUL)
++ {
++ copy_option_part(&path_option, buf, MAXPATHL, " ,");
++
++ if (buf[0] == '.' && (buf[1] == NUL || vim_ispathsep(buf[1])))
++ {
++ // Relative to current buffer:
++ // "/path/file" + "." -> "/path/"
++ // "/path/file" + "./subdir" -> "/path/subdir"
++ if (curbuf->b_ffname == NULL)
++ continue;
++ p = gettail(curbuf->b_ffname);
++ len = (int)(p - curbuf->b_ffname);
++ if (len + (int)STRLEN(buf) >= MAXPATHL)
++ continue;
++ if (buf[1] == NUL)
++ buf[len] = NUL;
++ else
++ STRMOVE(buf + len, buf + 2);
++ mch_memmove(buf, curbuf->b_ffname, len);
++ simplify_filename(buf);
++ }
++ else if (buf[0] == NUL)
++ // relative to current directory
++ STRCPY(buf, curdir);
++ else if (path_with_url(buf))
++ // URL can't be used here
++ continue;
++ else if (!mch_isFullName(buf))
++ {
++ // Expand relative path to their full path equivalent
++ len = (int)STRLEN(curdir);
++ if (len + (int)STRLEN(buf) + 3 > MAXPATHL)
++ continue;
++ STRMOVE(buf + len + 1, buf);
++ STRCPY(buf, curdir);
++ buf[len] = PATHSEP;
++ simplify_filename(buf);
++ }
++
++ if (ga_grow(gap, 1) == FAIL)
++ break;
++
++ # if defined(MSWIN)
++ // Avoid the path ending in a backslash, it fails when a comma is
++ // appended.
++ len = (int)STRLEN(buf);
++ if (buf[len - 1] == '\\')
++ buf[len - 1] = '/';
++ # endif
++
++ p = vim_strsave(buf);
++ if (p == NULL)
++ break;
++ ((char_u **)gap->ga_data)[gap->ga_len++] = p;
++ }
++
++ vim_free(buf);
++ }
++
++ /*
++ * Returns a pointer to the file or directory name in "fname" that matches the
++ * longest path in "ga"p, or NULL if there is no match. For example:
++ *
++ * path: /foo/bar/baz
++ * fname: /foo/bar/baz/quux.txt
++ * returns: ^this
++ */
++ static char_u *
++ get_path_cutoff(char_u *fname, garray_T *gap)
++ {
++ int i;
++ int maxlen = 0;
++ char_u **path_part = (char_u **)gap->ga_data;
++ char_u *cutoff = NULL;
++
++ for (i = 0; i < gap->ga_len; i++)
++ {
++ int j = 0;
++
++ while ((fname[j] == path_part[i][j]
++ # if defined(MSWIN)
++ || (vim_ispathsep(fname[j]) && vim_ispathsep(path_part[i][j]))
++ # endif
++ ) && fname[j] != NUL && path_part[i][j] != NUL)
++ j++;
++ if (j > maxlen)
++ {
++ maxlen = j;
++ cutoff = &fname[j];
++ }
++ }
++
++ // skip to the file or directory name
++ if (cutoff != NULL)
++ while (vim_ispathsep(*cutoff))
++ MB_PTR_ADV(cutoff);
++
++ return cutoff;
++ }
++
++ /*
++ * Sorts, removes duplicates and modifies all the fullpath names in "gap" so
++ * that they are unique with respect to each other while conserving the part
++ * that matches the pattern. Beware, this is at least O(n^2) wrt "gap->ga_len".
++ */
++ void
++ uniquefy_paths(garray_T *gap, char_u *pattern)
++ {
++ int i;
++ int len;
++ char_u **fnames = (char_u **)gap->ga_data;
++ int sort_again = FALSE;
++ char_u *pat;
++ char_u *file_pattern;
++ char_u *curdir;
++ regmatch_T regmatch;
++ garray_T path_ga;
++ char_u **in_curdir = NULL;
++ char_u *short_name;
++
++ remove_duplicates(gap);
++ ga_init2(&path_ga, (int)sizeof(char_u *), 1);
++
++ /*
++ * We need to prepend a '*' at the beginning of file_pattern so that the
++ * regex matches anywhere in the path. FIXME: is this valid for all
++ * possible patterns?
++ */
++ len = (int)STRLEN(pattern);
++ file_pattern = alloc(len + 2);
++ if (file_pattern == NULL)
++ return;
++ file_pattern[0] = '*';
++ file_pattern[1] = NUL;
++ STRCAT(file_pattern, pattern);
++ pat = file_pat_to_reg_pat(file_pattern, NULL, NULL, TRUE);
++ vim_free(file_pattern);
++ if (pat == NULL)
++ return;
++
++ regmatch.rm_ic = TRUE; // always ignore case
++ regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
++ vim_free(pat);
++ if (regmatch.regprog == NULL)
++ return;
++
++ if ((curdir = alloc((int)(MAXPATHL))) == NULL)
++ goto theend;
++ mch_dirname(curdir, MAXPATHL);
++ expand_path_option(curdir, &path_ga);
++
++ in_curdir = (char_u **)alloc_clear(gap->ga_len * sizeof(char_u *));
++ if (in_curdir == NULL)
++ goto theend;
++
++ for (i = 0; i < gap->ga_len && !got_int; i++)
++ {
++ char_u *path = fnames[i];
++ int is_in_curdir;
++ char_u *dir_end = gettail_dir(path);
++ char_u *pathsep_p;
++ char_u *path_cutoff;
++
++ len = (int)STRLEN(path);
++ is_in_curdir = fnamencmp(curdir, path, dir_end - path) == 0
++ && curdir[dir_end - path] == NUL;
++ if (is_in_curdir)
++ in_curdir[i] = vim_strsave(path);
++
++ // Shorten the filename while maintaining its uniqueness
++ path_cutoff = get_path_cutoff(path, &path_ga);
++
++ // Don't assume all files can be reached without path when search
++ // pattern starts with star star slash, so only remove path_cutoff
++ // when possible.
++ if (pattern[0] == '*' && pattern[1] == '*'
++ && vim_ispathsep_nocolon(pattern[2])
++ && path_cutoff != NULL
++ && vim_regexec(&regmatch, path_cutoff, (colnr_T)0)
++ && is_unique(path_cutoff, gap, i))
++ {
++ sort_again = TRUE;
++ mch_memmove(path, path_cutoff, STRLEN(path_cutoff) + 1);
++ }
++ else
++ {
++ // Here all files can be reached without path, so get shortest
++ // unique path. We start at the end of the path.
++ pathsep_p = path + len - 1;
++
++ while (find_previous_pathsep(path, &pathsep_p))
++ if (vim_regexec(&regmatch, pathsep_p + 1, (colnr_T)0)
++ && is_unique(pathsep_p + 1, gap, i)
++ && path_cutoff != NULL && pathsep_p + 1 >= path_cutoff)
++ {
++ sort_again = TRUE;
++ mch_memmove(path, pathsep_p + 1, STRLEN(pathsep_p));
++ break;
++ }
++ }
++
++ if (mch_isFullName(path))
++ {
++ /*
++ * Last resort: shorten relative to curdir if possible.
++ * 'possible' means:
++ * 1. It is under the current directory.
++ * 2. The result is actually shorter than the original.
++ *
++ * Before curdir After
++ * /foo/bar/file.txt /foo/bar ./file.txt
++ * c:\foo\bar\file.txt c:\foo\bar .\file.txt
++ * /file.txt / /file.txt
++ * c:\file.txt c:\ .\file.txt
++ */
++ short_name = shorten_fname(path, curdir);
++ if (short_name != NULL && short_name > path + 1
++ # if defined(MSWIN)
++ // On windows,
++ // shorten_fname("c:\a\a.txt", "c:\a\b")
++ // returns "\a\a.txt", which is not really the short
++ // name, hence:
++ && !vim_ispathsep(*short_name)
++ # endif
++ )
++ {
++ STRCPY(path, ".");
++ add_pathsep(path);
++ STRMOVE(path + STRLEN(path), short_name);
++ }
++ }
++ ui_breakcheck();
++ }
++
++ // Shorten filenames in /in/current/directory/{filename}
++ for (i = 0; i < gap->ga_len && !got_int; i++)
++ {
++ char_u *rel_path;
++ char_u *path = in_curdir[i];
++
++ if (path == NULL)
++ continue;
++
++ // If the {filename} is not unique, change it to ./{filename}.
++ // Else reduce it to {filename}
++ short_name = shorten_fname(path, curdir);
++ if (short_name == NULL)
++ short_name = path;
++ if (is_unique(short_name, gap, i))
++ {
++ STRCPY(fnames[i], short_name);
++ continue;
++ }
++
++ rel_path = alloc((int)(STRLEN(short_name) + STRLEN(PATHSEPSTR) + 2));
++ if (rel_path == NULL)
++ goto theend;
++ STRCPY(rel_path, ".");
++ add_pathsep(rel_path);
++ STRCAT(rel_path, short_name);
++
++ vim_free(fnames[i]);
++ fnames[i] = rel_path;
++ sort_again = TRUE;
++ ui_breakcheck();
++ }
++
++ theend:
++ vim_free(curdir);
++ if (in_curdir != NULL)
++ {
++ for (i = 0; i < gap->ga_len; i++)
++ vim_free(in_curdir[i]);
++ vim_free(in_curdir);
++ }
++ ga_clear_strings(&path_ga);
++ vim_regfree(regmatch.regprog);
++
++ if (sort_again)
++ remove_duplicates(gap);
++ }
++
++ /*
++ * Calls globpath() with 'path' values for the given pattern and stores the
++ * result in "gap".
++ * Returns the total number of matches.
++ */
++ int
++ expand_in_path(
++ garray_T *gap,
++ char_u *pattern,
++ int flags) // EW_* flags
++ {
++ char_u *curdir;
++ garray_T path_ga;
++ char_u *paths = NULL;
++ int glob_flags = 0;
++
++ if ((curdir = alloc((unsigned)MAXPATHL)) == NULL)
++ return 0;
++ mch_dirname(curdir, MAXPATHL);
++
++ ga_init2(&path_ga, (int)sizeof(char_u *), 1);
++ expand_path_option(curdir, &path_ga);
++ vim_free(curdir);
++ if (path_ga.ga_len == 0)
++ return 0;
++
++ paths = ga_concat_strings(&path_ga, ",");
++ ga_clear_strings(&path_ga);
++ if (paths == NULL)
++ return 0;
++
++ if (flags & EW_ICASE)
++ glob_flags |= WILD_ICASE;
++ if (flags & EW_ADDSLASH)
++ glob_flags |= WILD_ADD_SLASH;
++ globpath(paths, pattern, gap, glob_flags);
++ vim_free(paths);
++
++ return gap->ga_len;
++ }
++
++ #endif // FEAT_SEARCHPATH
+*** ../vim-8.1.0913/src/misc1.c 2019-01-31 13:47:51.126632619 +0100
+--- src/misc1.c 2019-02-13 22:06:27.637777681 +0100
+***************
+*** 21,26 ****
+--- 21,29 ----
+ static char_u *vim_version_dir(char_u *vimdir);
+ static char_u *remove_tail(char_u *p, char_u *pend, char_u *name);
+
++ #define URL_SLASH 1 /* path_is_url() has found "://" */
++ #define URL_BACKSLASH 2 /* path_is_url() has found ":\\" */
++
+ /* All user names (for ~user completion as done by shell). */
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ static garray_T ga_users;
+***************
+*** 5023,5065 ****
+ return p1;
+ }
+
+- #if defined(FEAT_SEARCHPATH)
+- /*
+- * Return the end of the directory name, on the first path
+- * separator:
+- * "/path/file", "/path/dir/", "/path//dir", "/file"
+- * ^ ^ ^ ^
+- */
+- static char_u *
+- gettail_dir(char_u *fname)
+- {
+- char_u *dir_end = fname;
+- char_u *next_dir_end = fname;
+- int look_for_sep = TRUE;
+- char_u *p;
+-
+- for (p = fname; *p != NUL; )
+- {
+- if (vim_ispathsep(*p))
+- {
+- if (look_for_sep)
+- {
+- next_dir_end = p;
+- look_for_sep = FALSE;
+- }
+- }
+- else
+- {
+- if (!look_for_sep)
+- dir_end = next_dir_end;
+- look_for_sep = TRUE;
+- }
+- MB_PTR_ADV(p);
+- }
+- return dir_end;
+- }
+- #endif
+-
+ /*
+ * Get pointer to tail of "fname", including path separators. Putting a NUL
+ * here leaves the directory name. Takes care of "c:/" and "//".
+--- 5026,5031 ----
+***************
+*** 5165,5185 ****
+ ;
+ }
+
+- #if defined(FEAT_SEARCHPATH) || defined(PROTO)
+- /*
+- * return TRUE if 'c' is a path list separator.
+- */
+- int
+- vim_ispathlistsep(int c)
+- {
+- #ifdef UNIX
+- return (c == ':');
+- #else
+- return (c == ';'); /* might not be right for every system... */
+- #endif
+- }
+- #endif
+-
+ /*
+ * Shorten the path of a file from "~/foo/../.bar/fname" to "~/f/../.b/fname"
+ * It's done in-place.
+--- 5131,5136 ----
+***************
+*** 6183,6589 ****
+ }
+ #endif
+
+- #if defined(FEAT_SEARCHPATH)
+- /*
+- * Moves "*psep" back to the previous path separator in "path".
+- * Returns FAIL is "*psep" ends up at the beginning of "path".
+- */
+- static int
+- find_previous_pathsep(char_u *path, char_u **psep)
+- {
+- /* skip the current separator */
+- if (*psep > path && vim_ispathsep(**psep))
+- --*psep;
+-
+- /* find the previous separator */
+- while (*psep > path)
+- {
+- if (vim_ispathsep(**psep))
+- return OK;
+- MB_PTR_BACK(path, *psep);
+- }
+-
+- return FAIL;
+- }
+-
+- /*
+- * Returns TRUE if "maybe_unique" is unique wrt other_paths in "gap".
+- * "maybe_unique" is the end portion of "((char_u **)gap->ga_data)[i]".
+- */
+- static int
+- is_unique(char_u *maybe_unique, garray_T *gap, int i)
+- {
+- int j;
+- int candidate_len;
+- int other_path_len;
+- char_u **other_paths = (char_u **)gap->ga_data;
+- char_u *rival;
+-
+- for (j = 0; j < gap->ga_len; j++)
+- {
+- if (j == i)
+- continue; /* don't compare it with itself */
+-
+- candidate_len = (int)STRLEN(maybe_unique);
+- other_path_len = (int)STRLEN(other_paths[j]);
+- if (other_path_len < candidate_len)
+- continue; /* it's different when it's shorter */
+-
+- rival = other_paths[j] + other_path_len - candidate_len;
+- if (fnamecmp(maybe_unique, rival) == 0
+- && (rival == other_paths[j] || vim_ispathsep(*(rival - 1))))
+- return FALSE; /* match */
+- }
+-
+- return TRUE; /* no match found */
+- }
+-
+- /*
+- * Split the 'path' option into an array of strings in garray_T. Relative
+- * paths are expanded to their equivalent fullpath. This includes the "."
+- * (relative to current buffer directory) and empty path (relative to current
+- * directory) notations.
+- *
+- * TODO: handle upward search (;) and path limiter (**N) notations by
+- * expanding each into their equivalent path(s).
+- */
+- static void
+- expand_path_option(char_u *curdir, garray_T *gap)
+- {
+- char_u *path_option = *curbuf->b_p_path == NUL
+- ? p_path : curbuf->b_p_path;
+- char_u *buf;
+- char_u *p;
+- int len;
+-
+- if ((buf = alloc((int)MAXPATHL)) == NULL)
+- return;
+-
+- while (*path_option != NUL)
+- {
+- copy_option_part(&path_option, buf, MAXPATHL, " ,");
+-
+- if (buf[0] == '.' && (buf[1] == NUL || vim_ispathsep(buf[1])))
+- {
+- /* Relative to current buffer:
+- * "/path/file" + "." -> "/path/"
+- * "/path/file" + "./subdir" -> "/path/subdir" */
+- if (curbuf->b_ffname == NULL)
+- continue;
+- p = gettail(curbuf->b_ffname);
+- len = (int)(p - curbuf->b_ffname);
+- if (len + (int)STRLEN(buf) >= MAXPATHL)
+- continue;
+- if (buf[1] == NUL)
+- buf[len] = NUL;
+- else
+- STRMOVE(buf + len, buf + 2);
+- mch_memmove(buf, curbuf->b_ffname, len);
+- simplify_filename(buf);
+- }
+- else if (buf[0] == NUL)
+- /* relative to current directory */
+- STRCPY(buf, curdir);
+- else if (path_with_url(buf))
+- /* URL can't be used here */
+- continue;
+- else if (!mch_isFullName(buf))
+- {
+- /* Expand relative path to their full path equivalent */
+- len = (int)STRLEN(curdir);
+- if (len + (int)STRLEN(buf) + 3 > MAXPATHL)
+- continue;
+- STRMOVE(buf + len + 1, buf);
+- STRCPY(buf, curdir);
+- buf[len] = PATHSEP;
+- simplify_filename(buf);
+- }
+-
+- if (ga_grow(gap, 1) == FAIL)
+- break;
+-
+- # if defined(MSWIN)
+- /* Avoid the path ending in a backslash, it fails when a comma is
+- * appended. */
+- len = (int)STRLEN(buf);
+- if (buf[len - 1] == '\\')
+- buf[len - 1] = '/';
+- # endif
+-
+- p = vim_strsave(buf);
+- if (p == NULL)
+- break;
+- ((char_u **)gap->ga_data)[gap->ga_len++] = p;
+- }
+-
+- vim_free(buf);
+- }
+-
+- /*
+- * Returns a pointer to the file or directory name in "fname" that matches the
+- * longest path in "ga"p, or NULL if there is no match. For example:
+- *
+- * path: /foo/bar/baz
+- * fname: /foo/bar/baz/quux.txt
+- * returns: ^this
+- */
+- static char_u *
+- get_path_cutoff(char_u *fname, garray_T *gap)
+- {
+- int i;
+- int maxlen = 0;
+- char_u **path_part = (char_u **)gap->ga_data;
+- char_u *cutoff = NULL;
+-
+- for (i = 0; i < gap->ga_len; i++)
+- {
+- int j = 0;
+-
+- while ((fname[j] == path_part[i][j]
+- # if defined(MSWIN)
+- || (vim_ispathsep(fname[j]) && vim_ispathsep(path_part[i][j]))
+- #endif
+- ) && fname[j] != NUL && path_part[i][j] != NUL)
+- j++;
+- if (j > maxlen)
+- {
+- maxlen = j;
+- cutoff = &fname[j];
+- }
+- }
+-
+- /* skip to the file or directory name */
+- if (cutoff != NULL)
+- while (vim_ispathsep(*cutoff))
+- MB_PTR_ADV(cutoff);
+-
+- return cutoff;
+- }
+-
+- /*
+- * Sorts, removes duplicates and modifies all the fullpath names in "gap" so
+- * that they are unique with respect to each other while conserving the part
+- * that matches the pattern. Beware, this is at least O(n^2) wrt "gap->ga_len".
+- */
+- static void
+- uniquefy_paths(garray_T *gap, char_u *pattern)
+- {
+- int i;
+- int len;
+- char_u **fnames = (char_u **)gap->ga_data;
+- int sort_again = FALSE;
+- char_u *pat;
+- char_u *file_pattern;
+- char_u *curdir;
+- regmatch_T regmatch;
+- garray_T path_ga;
+- char_u **in_curdir = NULL;
+- char_u *short_name;
+-
+- remove_duplicates(gap);
+- ga_init2(&path_ga, (int)sizeof(char_u *), 1);
+-
+- /*
+- * We need to prepend a '*' at the beginning of file_pattern so that the
+- * regex matches anywhere in the path. FIXME: is this valid for all
+- * possible patterns?
+- */
+- len = (int)STRLEN(pattern);
+- file_pattern = alloc(len + 2);
+- if (file_pattern == NULL)
+- return;
+- file_pattern[0] = '*';
+- file_pattern[1] = NUL;
+- STRCAT(file_pattern, pattern);
+- pat = file_pat_to_reg_pat(file_pattern, NULL, NULL, TRUE);
+- vim_free(file_pattern);
+- if (pat == NULL)
+- return;
+-
+- regmatch.rm_ic = TRUE; /* always ignore case */
+- regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
+- vim_free(pat);
+- if (regmatch.regprog == NULL)
+- return;
+-
+- if ((curdir = alloc((int)(MAXPATHL))) == NULL)
+- goto theend;
+- mch_dirname(curdir, MAXPATHL);
+- expand_path_option(curdir, &path_ga);
+-
+- in_curdir = (char_u **)alloc_clear(gap->ga_len * sizeof(char_u *));
+- if (in_curdir == NULL)
+- goto theend;
+-
+- for (i = 0; i < gap->ga_len && !got_int; i++)
+- {
+- char_u *path = fnames[i];
+- int is_in_curdir;
+- char_u *dir_end = gettail_dir(path);
+- char_u *pathsep_p;
+- char_u *path_cutoff;
+-
+- len = (int)STRLEN(path);
+- is_in_curdir = fnamencmp(curdir, path, dir_end - path) == 0
+- && curdir[dir_end - path] == NUL;
+- if (is_in_curdir)
+- in_curdir[i] = vim_strsave(path);
+-
+- /* Shorten the filename while maintaining its uniqueness */
+- path_cutoff = get_path_cutoff(path, &path_ga);
+-
+- /* Don't assume all files can be reached without path when search
+- * pattern starts with star star slash, so only remove path_cutoff
+- * when possible. */
+- if (pattern[0] == '*' && pattern[1] == '*'
+- && vim_ispathsep_nocolon(pattern[2])
+- && path_cutoff != NULL
+- && vim_regexec(&regmatch, path_cutoff, (colnr_T)0)
+- && is_unique(path_cutoff, gap, i))
+- {
+- sort_again = TRUE;
+- mch_memmove(path, path_cutoff, STRLEN(path_cutoff) + 1);
+- }
+- else
+- {
+- /* Here all files can be reached without path, so get shortest
+- * unique path. We start at the end of the path. */
+- pathsep_p = path + len - 1;
+-
+- while (find_previous_pathsep(path, &pathsep_p))
+- if (vim_regexec(&regmatch, pathsep_p + 1, (colnr_T)0)
+- && is_unique(pathsep_p + 1, gap, i)
+- && path_cutoff != NULL && pathsep_p + 1 >= path_cutoff)
+- {
+- sort_again = TRUE;
+- mch_memmove(path, pathsep_p + 1, STRLEN(pathsep_p));
+- break;
+- }
+- }
+-
+- if (mch_isFullName(path))
+- {
+- /*
+- * Last resort: shorten relative to curdir if possible.
+- * 'possible' means:
+- * 1. It is under the current directory.
+- * 2. The result is actually shorter than the original.
+- *
+- * Before curdir After
+- * /foo/bar/file.txt /foo/bar ./file.txt
+- * c:\foo\bar\file.txt c:\foo\bar .\file.txt
+- * /file.txt / /file.txt
+- * c:\file.txt c:\ .\file.txt
+- */
+- short_name = shorten_fname(path, curdir);
+- if (short_name != NULL && short_name > path + 1
+- #if defined(MSWIN)
+- /* On windows,
+- * shorten_fname("c:\a\a.txt", "c:\a\b")
+- * returns "\a\a.txt", which is not really the short
+- * name, hence: */
+- && !vim_ispathsep(*short_name)
+- #endif
+- )
+- {
+- STRCPY(path, ".");
+- add_pathsep(path);
+- STRMOVE(path + STRLEN(path), short_name);
+- }
+- }
+- ui_breakcheck();
+- }
+-
+- /* Shorten filenames in /in/current/directory/{filename} */
+- for (i = 0; i < gap->ga_len && !got_int; i++)
+- {
+- char_u *rel_path;
+- char_u *path = in_curdir[i];
+-
+- if (path == NULL)
+- continue;
+-
+- /* If the {filename} is not unique, change it to ./{filename}.
+- * Else reduce it to {filename} */
+- short_name = shorten_fname(path, curdir);
+- if (short_name == NULL)
+- short_name = path;
+- if (is_unique(short_name, gap, i))
+- {
+- STRCPY(fnames[i], short_name);
+- continue;
+- }
+-
+- rel_path = alloc((int)(STRLEN(short_name) + STRLEN(PATHSEPSTR) + 2));
+- if (rel_path == NULL)
+- goto theend;
+- STRCPY(rel_path, ".");
+- add_pathsep(rel_path);
+- STRCAT(rel_path, short_name);
+-
+- vim_free(fnames[i]);
+- fnames[i] = rel_path;
+- sort_again = TRUE;
+- ui_breakcheck();
+- }
+-
+- theend:
+- vim_free(curdir);
+- if (in_curdir != NULL)
+- {
+- for (i = 0; i < gap->ga_len; i++)
+- vim_free(in_curdir[i]);
+- vim_free(in_curdir);
+- }
+- ga_clear_strings(&path_ga);
+- vim_regfree(regmatch.regprog);
+-
+- if (sort_again)
+- remove_duplicates(gap);
+- }
+-
+- /*
+- * Calls globpath() with 'path' values for the given pattern and stores the
+- * result in "gap".
+- * Returns the total number of matches.
+- */
+- static int
+- expand_in_path(
+- garray_T *gap,
+- char_u *pattern,
+- int flags) /* EW_* flags */
+- {
+- char_u *curdir;
+- garray_T path_ga;
+- char_u *paths = NULL;
+- int glob_flags = 0;
+-
+- if ((curdir = alloc((unsigned)MAXPATHL)) == NULL)
+- return 0;
+- mch_dirname(curdir, MAXPATHL);
+-
+- ga_init2(&path_ga, (int)sizeof(char_u *), 1);
+- expand_path_option(curdir, &path_ga);
+- vim_free(curdir);
+- if (path_ga.ga_len == 0)
+- return 0;
+-
+- paths = ga_concat_strings(&path_ga, ",");
+- ga_clear_strings(&path_ga);
+- if (paths == NULL)
+- return 0;
+-
+- if (flags & EW_ICASE)
+- glob_flags |= WILD_ICASE;
+- if (flags & EW_ADDSLASH)
+- glob_flags |= WILD_ADD_SLASH;
+- globpath(paths, pattern, gap, glob_flags);
+- vim_free(paths);
+-
+- return gap->ga_len;
+- }
+- #endif
+-
+ #if defined(FEAT_SEARCHPATH) || defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ /*
+ * Sort "gap" and remove duplicate entries. "gap" is expected to contain a
+--- 6134,6139 ----
+***************
+*** 7120,7122 ****
+--- 6670,6744 ----
+ #endif
+ return p;
+ }
++
++ /*
++ * Check if the "://" of a URL is at the pointer, return URL_SLASH.
++ * Also check for ":\\", which MS Internet Explorer accepts, return
++ * URL_BACKSLASH.
++ */
++ int
++ path_is_url(char_u *p)
++ {
++ if (STRNCMP(p, "://", (size_t)3) == 0)
++ return URL_SLASH;
++ else if (STRNCMP(p, ":\\\\", (size_t)3) == 0)
++ return URL_BACKSLASH;
++ return 0;
++ }
++
++ /*
++ * Check if "fname" starts with "name://". Return URL_SLASH if it does.
++ * Return URL_BACKSLASH for "name:\\".
++ * Return zero otherwise.
++ */
++ int
++ path_with_url(char_u *fname)
++ {
++ char_u *p;
++
++ for (p = fname; isalpha(*p); ++p)
++ ;
++ return path_is_url(p);
++ }
++
++ /*
++ * Return TRUE if "name" is a full (absolute) path name or URL.
++ */
++ int
++ vim_isAbsName(char_u *name)
++ {
++ return (path_with_url(name) != 0 || mch_isFullName(name));
++ }
++
++ /*
++ * Get absolute file name into buffer "buf[len]".
++ *
++ * return FAIL for failure, OK otherwise
++ */
++ int
++ vim_FullName(
++ char_u *fname,
++ char_u *buf,
++ int len,
++ int force) /* force expansion even when already absolute */
++ {
++ int retval = OK;
++ int url;
++
++ *buf = NUL;
++ if (fname == NULL)
++ return FAIL;
++
++ url = path_with_url(fname);
++ if (!url)
++ retval = mch_FullName(fname, buf, len, force);
++ if (url || retval == FAIL)
++ {
++ /* something failed; use the file name (truncate when too long) */
++ vim_strncpy(buf, fname, len - 1);
++ }
++ #if defined(MSWIN)
++ slash_adjust(buf);
++ #endif
++ return retval;
++ }
+*** ../vim-8.1.0913/src/misc2.c 2019-01-31 18:26:05.734803539 +0100
+--- src/misc2.c 2019-02-13 22:06:27.641777652 +0100
+***************
+*** 14,21 ****
+
+ static char_u *username = NULL; /* cached result of mch_get_user_name() */
+
+- static char_u *ff_expand_buffer = NULL; /* used for expanding filenames */
+-
+ static int coladvance2(pos_T *pos, int addspaces, int finetune, colnr_T wcol);
+
+ /*
+--- 14,19 ----
+***************
+*** 1047,1056 ****
+
+ #if defined(EXITFREE) || defined(PROTO)
+
+- # if defined(FEAT_SEARCHPATH)
+- static void free_findfile(void);
+- # endif
+-
+ /*
+ * Free everything that we allocated.
+ * Can be used to detect memory leaks, e.g., with ccmalloc.
+--- 1045,1050 ----
+***************
+*** 1161,1167 ****
+ vim_free(new_last_cmdline);
+ # endif
+ set_keep_msg(NULL, 0);
+- vim_free(ff_expand_buffer);
+
+ /* Clear cmdline history. */
+ p_hi = 0;
+--- 1155,1160 ----
+***************
+*** 3822,5746 ****
+ #endif /* CURSOR_SHAPE */
+
+
+- /* TODO: make some #ifdef for this */
+- /*--------[ file searching ]-------------------------------------------------*/
+- /*
+- * File searching functions for 'path', 'tags' and 'cdpath' options.
+- * External visible functions:
+- * vim_findfile_init() creates/initialises the search context
+- * vim_findfile_free_visited() free list of visited files/dirs of search
+- * context
+- * vim_findfile() find a file in the search context
+- * vim_findfile_cleanup() cleanup/free search context created by
+- * vim_findfile_init()
+- *
+- * All static functions and variables start with 'ff_'
+- *
+- * In general it works like this:
+- * First you create yourself a search context by calling vim_findfile_init().
+- * It is possible to give a search context from a previous call to
+- * vim_findfile_init(), so it can be reused. After this you call vim_findfile()
+- * until you are satisfied with the result or it returns NULL. On every call it
+- * returns the next file which matches the conditions given to
+- * vim_findfile_init(). If it doesn't find a next file it returns NULL.
+- *
+- * It is possible to call vim_findfile_init() again to reinitialise your search
+- * with some new parameters. Don't forget to pass your old search context to
+- * it, so it can reuse it and especially reuse the list of already visited
+- * directories. If you want to delete the list of already visited directories
+- * simply call vim_findfile_free_visited().
+- *
+- * When you are done call vim_findfile_cleanup() to free the search context.
+- *
+- * The function vim_findfile_init() has a long comment, which describes the
+- * needed parameters.
+- *
+- *
+- *
+- * ATTENTION:
+- * ==========
+- * Also we use an allocated search context here, this functions are NOT
+- * thread-safe!!!!!
+- *
+- * To minimize parameter passing (or because I'm to lazy), only the
+- * external visible functions get a search context as a parameter. This is
+- * then assigned to a static global, which is used throughout the local
+- * functions.
+- */
+-
+- /*
+- * type for the directory search stack
+- */
+- typedef struct ff_stack
+- {
+- struct ff_stack *ffs_prev;
+-
+- /* the fix part (no wildcards) and the part containing the wildcards
+- * of the search path
+- */
+- char_u *ffs_fix_path;
+- #ifdef FEAT_PATH_EXTRA
+- char_u *ffs_wc_path;
+- #endif
+-
+- /* files/dirs found in the above directory, matched by the first wildcard
+- * of wc_part
+- */
+- char_u **ffs_filearray;
+- int ffs_filearray_size;
+- char_u ffs_filearray_cur; /* needed for partly handled dirs */
+-
+- /* to store status of partly handled directories
+- * 0: we work on this directory for the first time
+- * 1: this directory was partly searched in an earlier step
+- */
+- int ffs_stage;
+-
+- /* How deep are we in the directory tree?
+- * Counts backward from value of level parameter to vim_findfile_init
+- */
+- int ffs_level;
+-
+- /* Did we already expand '**' to an empty string? */
+- int ffs_star_star_empty;
+- } ff_stack_T;
+-
+- /*
+- * type for already visited directories or files.
+- */
+- typedef struct ff_visited
+- {
+- struct ff_visited *ffv_next;
+-
+- #ifdef FEAT_PATH_EXTRA
+- /* Visited directories are different if the wildcard string are
+- * different. So we have to save it.
+- */
+- char_u *ffv_wc_path;
+- #endif
+- /* for unix use inode etc for comparison (needed because of links), else
+- * use filename.
+- */
+- #ifdef UNIX
+- int ffv_dev_valid; /* ffv_dev and ffv_ino were set */
+- dev_t ffv_dev; /* device number */
+- ino_t ffv_ino; /* inode number */
+- #endif
+- /* The memory for this struct is allocated according to the length of
+- * ffv_fname.
+- */
+- char_u ffv_fname[1]; /* actually longer */
+- } ff_visited_T;
+-
+- /*
+- * We might have to manage several visited lists during a search.
+- * This is especially needed for the tags option. If tags is set to:
+- * "./++/tags,./++/TAGS,++/tags" (replace + with *)
+- * So we have to do 3 searches:
+- * 1) search from the current files directory downward for the file "tags"
+- * 2) search from the current files directory downward for the file "TAGS"
+- * 3) search from Vims current directory downwards for the file "tags"
+- * As you can see, the first and the third search are for the same file, so for
+- * the third search we can use the visited list of the first search. For the
+- * second search we must start from a empty visited list.
+- * The struct ff_visited_list_hdr is used to manage a linked list of already
+- * visited lists.
+- */
+- typedef struct ff_visited_list_hdr
+- {
+- struct ff_visited_list_hdr *ffvl_next;
+-
+- /* the filename the attached visited list is for */
+- char_u *ffvl_filename;
+-
+- ff_visited_T *ffvl_visited_list;
+-
+- } ff_visited_list_hdr_T;
+-
+-
+- /*
+- * '**' can be expanded to several directory levels.
+- * Set the default maximum depth.
+- */
+- #define FF_MAX_STAR_STAR_EXPAND ((char_u)30)
+-
+- /*
+- * The search context:
+- * ffsc_stack_ptr: the stack for the dirs to search
+- * ffsc_visited_list: the currently active visited list
+- * ffsc_dir_visited_list: the currently active visited list for search dirs
+- * ffsc_visited_lists_list: the list of all visited lists
+- * ffsc_dir_visited_lists_list: the list of all visited lists for search dirs
+- * ffsc_file_to_search: the file to search for
+- * ffsc_start_dir: the starting directory, if search path was relative
+- * ffsc_fix_path: the fix part of the given path (without wildcards)
+- * Needed for upward search.
+- * ffsc_wc_path: the part of the given path containing wildcards
+- * ffsc_level: how many levels of dirs to search downwards
+- * ffsc_stopdirs_v: array of stop directories for upward search
+- * ffsc_find_what: FINDFILE_BOTH, FINDFILE_DIR or FINDFILE_FILE
+- * ffsc_tagfile: searching for tags file, don't use 'suffixesadd'
+- */
+- typedef struct ff_search_ctx_T
+- {
+- ff_stack_T *ffsc_stack_ptr;
+- ff_visited_list_hdr_T *ffsc_visited_list;
+- ff_visited_list_hdr_T *ffsc_dir_visited_list;
+- ff_visited_list_hdr_T *ffsc_visited_lists_list;
+- ff_visited_list_hdr_T *ffsc_dir_visited_lists_list;
+- char_u *ffsc_file_to_search;
+- char_u *ffsc_start_dir;
+- char_u *ffsc_fix_path;
+- #ifdef FEAT_PATH_EXTRA
+- char_u *ffsc_wc_path;
+- int ffsc_level;
+- char_u **ffsc_stopdirs_v;
+- #endif
+- int ffsc_find_what;
+- int ffsc_tagfile;
+- } ff_search_ctx_T;
+-
+- /* locally needed functions */
+- #ifdef FEAT_PATH_EXTRA
+- static int ff_check_visited(ff_visited_T **, char_u *, char_u *);
+- #else
+- static int ff_check_visited(ff_visited_T **, char_u *);
+- #endif
+- 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);
+-
+- 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);
+- static void ff_clear(ff_search_ctx_T *search_ctx);
+- static void ff_free_stack_element(ff_stack_T *stack_ptr);
+- #ifdef FEAT_PATH_EXTRA
+- static ff_stack_T *ff_create_stack_element(char_u *, char_u *, int, int);
+- #else
+- static ff_stack_T *ff_create_stack_element(char_u *, int, int);
+- #endif
+- #ifdef FEAT_PATH_EXTRA
+- static int ff_path_in_stoplist(char_u *, int, char_u **);
+- #endif
+-
+- static char_u e_pathtoolong[] = N_("E854: path too long for completion");
+-
+- #if 0
+- /*
+- * if someone likes findfirst/findnext, here are the functions
+- * NOT TESTED!!
+- */
+-
+- static void *ff_fn_search_context = NULL;
+-
+- char_u *
+- vim_findfirst(char_u *path, char_u *filename, int level)
+- {
+- ff_fn_search_context =
+- vim_findfile_init(path, filename, NULL, level, TRUE, FALSE,
+- ff_fn_search_context, rel_fname);
+- if (NULL == ff_fn_search_context)
+- return NULL;
+- else
+- return vim_findnext()
+- }
+-
+- char_u *
+- vim_findnext(void)
+- {
+- char_u *ret = vim_findfile(ff_fn_search_context);
+-
+- if (NULL == ret)
+- {
+- vim_findfile_cleanup(ff_fn_search_context);
+- ff_fn_search_context = NULL;
+- }
+- return ret;
+- }
+- #endif
+-
+- /*
+- * Initialization routine for vim_findfile().
+- *
+- * Returns the newly allocated search context or NULL if an error occurred.
+- *
+- * Don't forget to clean up by calling vim_findfile_cleanup() if you are done
+- * with the search context.
+- *
+- * Find the file 'filename' in the directory 'path'.
+- * The parameter 'path' may contain wildcards. If so only search 'level'
+- * directories deep. The parameter 'level' is the absolute maximum and is
+- * not related to restricts given to the '**' wildcard. If 'level' is 100
+- * and you use '**200' vim_findfile() will stop after 100 levels.
+- *
+- * 'filename' cannot contain wildcards! It is used as-is, no backslashes to
+- * escape special characters.
+- *
+- * If 'stopdirs' is not NULL and nothing is found downward, the search is
+- * restarted on the next higher directory level. This is repeated until the
+- * start-directory of a search is contained in 'stopdirs'. 'stopdirs' has the
+- * format ";*<dirname>*\(;<dirname>\)*;\=$".
+- *
+- * If the 'path' is relative, the starting dir for the search is either VIM's
+- * current dir or if the path starts with "./" the current files dir.
+- * If the 'path' is absolute, the starting dir is that part of the path before
+- * the first wildcard.
+- *
+- * Upward search is only done on the starting dir.
+- *
+- * If 'free_visited' is TRUE the list of already visited files/directories is
+- * cleared. Set this to FALSE if you just want to search from another
+- * directory, but want to be sure that no directory from a previous search is
+- * searched again. This is useful if you search for a file at different places.
+- * The list of visited files/dirs can also be cleared with the function
+- * vim_findfile_free_visited().
+- *
+- * Set the parameter 'find_what' to FINDFILE_DIR if you want to search for
+- * directories only, FINDFILE_FILE for files only, FINDFILE_BOTH for both.
+- *
+- * A search context returned by a previous call to vim_findfile_init() can be
+- * passed in the parameter "search_ctx_arg". This context is reused and
+- * reinitialized with the new parameters. The list of already visited
+- * directories from this context is only deleted if the parameter
+- * "free_visited" is true. Be aware that the passed "search_ctx_arg" is freed
+- * if the reinitialization fails.
+- *
+- * If you don't have a search context from a previous call "search_ctx_arg"
+- * must be NULL.
+- *
+- * This function silently ignores a few errors, vim_findfile() will have
+- * limited functionality then.
+- */
+- void *
+- vim_findfile_init(
+- char_u *path,
+- char_u *filename,
+- char_u *stopdirs UNUSED,
+- int level,
+- int free_visited,
+- int find_what,
+- void *search_ctx_arg,
+- int tagfile, /* expanding names of tags files */
+- char_u *rel_fname) /* file name to use for "." */
+- {
+- #ifdef FEAT_PATH_EXTRA
+- char_u *wc_part;
+- #endif
+- ff_stack_T *sptr;
+- ff_search_ctx_T *search_ctx;
+-
+- /* If a search context is given by the caller, reuse it, else allocate a
+- * new one.
+- */
+- if (search_ctx_arg != NULL)
+- search_ctx = search_ctx_arg;
+- else
+- {
+- search_ctx = (ff_search_ctx_T*)alloc((unsigned)sizeof(ff_search_ctx_T));
+- if (search_ctx == NULL)
+- goto error_return;
+- vim_memset(search_ctx, 0, sizeof(ff_search_ctx_T));
+- }
+- search_ctx->ffsc_find_what = find_what;
+- search_ctx->ffsc_tagfile = tagfile;
+-
+- /* clear the search context, but NOT the visited lists */
+- ff_clear(search_ctx);
+-
+- /* clear visited list if wanted */
+- if (free_visited == TRUE)
+- vim_findfile_free_visited(search_ctx);
+- else
+- {
+- /* Reuse old visited lists. Get the visited list for the given
+- * filename. If no list for the current filename exists, creates a new
+- * one. */
+- search_ctx->ffsc_visited_list = ff_get_visited_list(filename,
+- &search_ctx->ffsc_visited_lists_list);
+- if (search_ctx->ffsc_visited_list == NULL)
+- goto error_return;
+- search_ctx->ffsc_dir_visited_list = ff_get_visited_list(filename,
+- &search_ctx->ffsc_dir_visited_lists_list);
+- if (search_ctx->ffsc_dir_visited_list == NULL)
+- goto error_return;
+- }
+-
+- if (ff_expand_buffer == NULL)
+- {
+- ff_expand_buffer = (char_u*)alloc(MAXPATHL);
+- if (ff_expand_buffer == NULL)
+- goto error_return;
+- }
+-
+- /* Store information on starting dir now if path is relative.
+- * If path is absolute, we do that later. */
+- if (path[0] == '.'
+- && (vim_ispathsep(path[1]) || path[1] == NUL)
+- && (!tagfile || vim_strchr(p_cpo, CPO_DOTTAG) == NULL)
+- && rel_fname != NULL)
+- {
+- int len = (int)(gettail(rel_fname) - rel_fname);
+-
+- if (!vim_isAbsName(rel_fname) && len + 1 < MAXPATHL)
+- {
+- /* Make the start dir an absolute path name. */
+- vim_strncpy(ff_expand_buffer, rel_fname, len);
+- search_ctx->ffsc_start_dir = FullName_save(ff_expand_buffer, FALSE);
+- }
+- else
+- search_ctx->ffsc_start_dir = vim_strnsave(rel_fname, len);
+- if (search_ctx->ffsc_start_dir == NULL)
+- goto error_return;
+- if (*++path != NUL)
+- ++path;
+- }
+- else if (*path == NUL || !vim_isAbsName(path))
+- {
+- #ifdef BACKSLASH_IN_FILENAME
+- /* "c:dir" needs "c:" to be expanded, otherwise use current dir */
+- if (*path != NUL && path[1] == ':')
+- {
+- char_u drive[3];
+-
+- drive[0] = path[0];
+- drive[1] = ':';
+- drive[2] = NUL;
+- if (vim_FullName(drive, ff_expand_buffer, MAXPATHL, TRUE) == FAIL)
+- goto error_return;
+- path += 2;
+- }
+- else
+- #endif
+- if (mch_dirname(ff_expand_buffer, MAXPATHL) == FAIL)
+- goto error_return;
+-
+- search_ctx->ffsc_start_dir = vim_strsave(ff_expand_buffer);
+- if (search_ctx->ffsc_start_dir == NULL)
+- goto error_return;
+-
+- #ifdef BACKSLASH_IN_FILENAME
+- /* A path that starts with "/dir" is relative to the drive, not to the
+- * directory (but not for "//machine/dir"). Only use the drive name. */
+- if ((*path == '/' || *path == '\\')
+- && path[1] != path[0]
+- && search_ctx->ffsc_start_dir[1] == ':')
+- search_ctx->ffsc_start_dir[2] = NUL;
+- #endif
+- }
+-
+- #ifdef FEAT_PATH_EXTRA
+- /*
+- * If stopdirs are given, split them into an array of pointers.
+- * If this fails (mem allocation), there is no upward search at all or a
+- * stop directory is not recognized -> continue silently.
+- * If stopdirs just contains a ";" or is empty,
+- * search_ctx->ffsc_stopdirs_v will only contain a NULL pointer. This
+- * is handled as unlimited upward search. See function
+- * ff_path_in_stoplist() for details.
+- */
+- if (stopdirs != NULL)
+- {
+- char_u *walker = stopdirs;
+- int dircount;
+-
+- while (*walker == ';')
+- walker++;
+-
+- dircount = 1;
+- search_ctx->ffsc_stopdirs_v =
+- (char_u **)alloc((unsigned)sizeof(char_u *));
+-
+- if (search_ctx->ffsc_stopdirs_v != NULL)
+- {
+- do
+- {
+- char_u *helper;
+- void *ptr;
+-
+- helper = walker;
+- ptr = vim_realloc(search_ctx->ffsc_stopdirs_v,
+- (dircount + 1) * sizeof(char_u *));
+- if (ptr)
+- search_ctx->ffsc_stopdirs_v = ptr;
+- else
+- /* ignore, keep what we have and continue */
+- break;
+- walker = vim_strchr(walker, ';');
+- if (walker)
+- {
+- search_ctx->ffsc_stopdirs_v[dircount-1] =
+- vim_strnsave(helper, (int)(walker - helper));
+- walker++;
+- }
+- else
+- /* this might be "", which means ascent till top
+- * of directory tree.
+- */
+- search_ctx->ffsc_stopdirs_v[dircount-1] =
+- vim_strsave(helper);
+-
+- dircount++;
+-
+- } while (walker != NULL);
+- search_ctx->ffsc_stopdirs_v[dircount-1] = NULL;
+- }
+- }
+- #endif
+-
+- #ifdef FEAT_PATH_EXTRA
+- search_ctx->ffsc_level = level;
+-
+- /* split into:
+- * -fix path
+- * -wildcard_stuff (might be NULL)
+- */
+- wc_part = vim_strchr(path, '*');
+- if (wc_part != NULL)
+- {
+- int llevel;
+- int len;
+- char *errpt;
+-
+- /* save the fix part of the path */
+- search_ctx->ffsc_fix_path = vim_strnsave(path, (int)(wc_part - path));
+-
+- /*
+- * copy wc_path and add restricts to the '**' wildcard.
+- * The octet after a '**' is used as a (binary) counter.
+- * So '**3' is transposed to '**^C' ('^C' is ASCII value 3)
+- * or '**76' is transposed to '**N'( 'N' is ASCII value 76).
+- * For EBCDIC you get different character values.
+- * If no restrict is given after '**' the default is used.
+- * Due to this technique the path looks awful if you print it as a
+- * string.
+- */
+- len = 0;
+- while (*wc_part != NUL)
+- {
+- if (len + 5 >= MAXPATHL)
+- {
+- emsg(_(e_pathtoolong));
+- break;
+- }
+- if (STRNCMP(wc_part, "**", 2) == 0)
+- {
+- ff_expand_buffer[len++] = *wc_part++;
+- ff_expand_buffer[len++] = *wc_part++;
+-
+- llevel = strtol((char *)wc_part, &errpt, 10);
+- if ((char_u *)errpt != wc_part && llevel > 0 && llevel < 255)
+- ff_expand_buffer[len++] = llevel;
+- else if ((char_u *)errpt != wc_part && llevel == 0)
+- /* restrict is 0 -> remove already added '**' */
+- len -= 2;
+- else
+- ff_expand_buffer[len++] = FF_MAX_STAR_STAR_EXPAND;
+- wc_part = (char_u *)errpt;
+- if (*wc_part != NUL && !vim_ispathsep(*wc_part))
+- {
+- semsg(_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."), PATHSEPSTR);
+- goto error_return;
+- }
+- }
+- else
+- ff_expand_buffer[len++] = *wc_part++;
+- }
+- ff_expand_buffer[len] = NUL;
+- search_ctx->ffsc_wc_path = vim_strsave(ff_expand_buffer);
+-
+- if (search_ctx->ffsc_wc_path == NULL)
+- goto error_return;
+- }
+- else
+- #endif
+- search_ctx->ffsc_fix_path = vim_strsave(path);
+-
+- if (search_ctx->ffsc_start_dir == NULL)
+- {
+- /* store the fix part as startdir.
+- * This is needed if the parameter path is fully qualified.
+- */
+- search_ctx->ffsc_start_dir = vim_strsave(search_ctx->ffsc_fix_path);
+- if (search_ctx->ffsc_start_dir == NULL)
+- goto error_return;
+- search_ctx->ffsc_fix_path[0] = NUL;
+- }
+-
+- /* create an absolute path */
+- if (STRLEN(search_ctx->ffsc_start_dir)
+- + STRLEN(search_ctx->ffsc_fix_path) + 3 >= MAXPATHL)
+- {
+- emsg(_(e_pathtoolong));
+- goto error_return;
+- }
+- STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
+- add_pathsep(ff_expand_buffer);
+- {
+- int eb_len = (int)STRLEN(ff_expand_buffer);
+- char_u *buf = alloc(eb_len
+- + (int)STRLEN(search_ctx->ffsc_fix_path) + 1);
+-
+- STRCPY(buf, ff_expand_buffer);
+- STRCPY(buf + eb_len, search_ctx->ffsc_fix_path);
+- if (mch_isdir(buf))
+- {
+- STRCAT(ff_expand_buffer, search_ctx->ffsc_fix_path);
+- add_pathsep(ff_expand_buffer);
+- }
+- #ifdef FEAT_PATH_EXTRA
+- else
+- {
+- char_u *p = gettail(search_ctx->ffsc_fix_path);
+- char_u *wc_path = NULL;
+- char_u *temp = NULL;
+- int len = 0;
+-
+- if (p > search_ctx->ffsc_fix_path)
+- {
+- len = (int)(p - search_ctx->ffsc_fix_path) - 1;
+- STRNCAT(ff_expand_buffer, search_ctx->ffsc_fix_path, len);
+- add_pathsep(ff_expand_buffer);
+- }
+- else
+- len = (int)STRLEN(search_ctx->ffsc_fix_path);
+-
+- if (search_ctx->ffsc_wc_path != NULL)
+- {
+- wc_path = vim_strsave(search_ctx->ffsc_wc_path);
+- temp = alloc((int)(STRLEN(search_ctx->ffsc_wc_path)
+- + STRLEN(search_ctx->ffsc_fix_path + len)
+- + 1));
+- if (temp == NULL || wc_path == NULL)
+- {
+- vim_free(buf);
+- vim_free(temp);
+- vim_free(wc_path);
+- goto error_return;
+- }
+-
+- STRCPY(temp, search_ctx->ffsc_fix_path + len);
+- STRCAT(temp, search_ctx->ffsc_wc_path);
+- vim_free(search_ctx->ffsc_wc_path);
+- vim_free(wc_path);
+- search_ctx->ffsc_wc_path = temp;
+- }
+- }
+- #endif
+- vim_free(buf);
+- }
+-
+- sptr = ff_create_stack_element(ff_expand_buffer,
+- #ifdef FEAT_PATH_EXTRA
+- search_ctx->ffsc_wc_path,
+- #endif
+- level, 0);
+-
+- if (sptr == NULL)
+- goto error_return;
+-
+- ff_push(search_ctx, sptr);
+-
+- search_ctx->ffsc_file_to_search = vim_strsave(filename);
+- if (search_ctx->ffsc_file_to_search == NULL)
+- goto error_return;
+-
+- return search_ctx;
+-
+- error_return:
+- /*
+- * We clear the search context now!
+- * Even when the caller gave us a (perhaps valid) context we free it here,
+- * as we might have already destroyed it.
+- */
+- vim_findfile_cleanup(search_ctx);
+- return NULL;
+- }
+-
+- #if defined(FEAT_PATH_EXTRA) || defined(PROTO)
+- /*
+- * Get the stopdir string. Check that ';' is not escaped.
+- */
+- char_u *
+- vim_findfile_stopdir(char_u *buf)
+- {
+- char_u *r_ptr = buf;
+-
+- while (*r_ptr != NUL && *r_ptr != ';')
+- {
+- if (r_ptr[0] == '\\' && r_ptr[1] == ';')
+- {
+- /* Overwrite the escape char,
+- * use STRLEN(r_ptr) to move the trailing '\0'. */
+- STRMOVE(r_ptr, r_ptr + 1);
+- r_ptr++;
+- }
+- r_ptr++;
+- }
+- if (*r_ptr == ';')
+- {
+- *r_ptr = 0;
+- r_ptr++;
+- }
+- else if (*r_ptr == NUL)
+- r_ptr = NULL;
+- return r_ptr;
+- }
+- #endif
+-
+- /*
+- * Clean up the given search context. Can handle a NULL pointer.
+- */
+- void
+- vim_findfile_cleanup(void *ctx)
+- {
+- if (ctx == NULL)
+- return;
+-
+- vim_findfile_free_visited(ctx);
+- ff_clear(ctx);
+- vim_free(ctx);
+- }
+-
+- /*
+- * Find a file in a search context.
+- * The search context was created with vim_findfile_init() above.
+- * Return a pointer to an allocated file name or NULL if nothing found.
+- * To get all matching files call this function until you get NULL.
+- *
+- * If the passed search_context is NULL, NULL is returned.
+- *
+- * The search algorithm is depth first. To change this replace the
+- * stack with a list (don't forget to leave partly searched directories on the
+- * top of the list).
+- */
+- char_u *
+- vim_findfile(void *search_ctx_arg)
+- {
+- char_u *file_path;
+- #ifdef FEAT_PATH_EXTRA
+- char_u *rest_of_wildcards;
+- char_u *path_end = NULL;
+- #endif
+- ff_stack_T *stackp;
+- #if defined(FEAT_SEARCHPATH) || defined(FEAT_PATH_EXTRA)
+- int len;
+- #endif
+- int i;
+- char_u *p;
+- #ifdef FEAT_SEARCHPATH
+- char_u *suf;
+- #endif
+- ff_search_ctx_T *search_ctx;
+-
+- if (search_ctx_arg == NULL)
+- return NULL;
+-
+- search_ctx = (ff_search_ctx_T *)search_ctx_arg;
+-
+- /*
+- * filepath is used as buffer for various actions and as the storage to
+- * return a found filename.
+- */
+- if ((file_path = alloc((int)MAXPATHL)) == NULL)
+- return NULL;
+-
+- #ifdef FEAT_PATH_EXTRA
+- /* store the end of the start dir -- needed for upward search */
+- if (search_ctx->ffsc_start_dir != NULL)
+- path_end = &search_ctx->ffsc_start_dir[
+- STRLEN(search_ctx->ffsc_start_dir)];
+- #endif
+-
+- #ifdef FEAT_PATH_EXTRA
+- /* upward search loop */
+- for (;;)
+- {
+- #endif
+- /* downward search loop */
+- for (;;)
+- {
+- /* check if user user wants to stop the search*/
+- ui_breakcheck();
+- if (got_int)
+- break;
+-
+- /* get directory to work on from stack */
+- stackp = ff_pop(search_ctx);
+- if (stackp == NULL)
+- break;
+-
+- /*
+- * TODO: decide if we leave this test in
+- *
+- * GOOD: don't search a directory(-tree) twice.
+- * BAD: - check linked list for every new directory entered.
+- * - check for double files also done below
+- *
+- * Here we check if we already searched this directory.
+- * We already searched a directory if:
+- * 1) The directory is the same.
+- * 2) We would use the same wildcard string.
+- *
+- * Good if you have links on same directory via several ways
+- * or you have selfreferences in directories (e.g. SuSE Linux 6.3:
+- * /etc/rc.d/init.d is linked to /etc/rc.d -> endless loop)
+- *
+- * This check is only needed for directories we work on for the
+- * first time (hence stackp->ff_filearray == NULL)
+- */
+- if (stackp->ffs_filearray == NULL
+- && ff_check_visited(&search_ctx->ffsc_dir_visited_list
+- ->ffvl_visited_list,
+- stackp->ffs_fix_path
+- #ifdef FEAT_PATH_EXTRA
+- , stackp->ffs_wc_path
+- #endif
+- ) == FAIL)
+- {
+- #ifdef FF_VERBOSE
+- if (p_verbose >= 5)
+- {
+- verbose_enter_scroll();
+- smsg("Already Searched: %s (%s)",
+- stackp->ffs_fix_path, stackp->ffs_wc_path);
+- /* don't overwrite this either */
+- msg_puts("\n");
+- verbose_leave_scroll();
+- }
+- #endif
+- ff_free_stack_element(stackp);
+- continue;
+- }
+- #ifdef FF_VERBOSE
+- else if (p_verbose >= 5)
+- {
+- verbose_enter_scroll();
+- smsg("Searching: %s (%s)",
+- stackp->ffs_fix_path, stackp->ffs_wc_path);
+- /* don't overwrite this either */
+- msg_puts("\n");
+- verbose_leave_scroll();
+- }
+- #endif
+-
+- /* check depth */
+- if (stackp->ffs_level <= 0)
+- {
+- ff_free_stack_element(stackp);
+- continue;
+- }
+-
+- file_path[0] = NUL;
+-
+- /*
+- * If no filearray till now expand wildcards
+- * The function expand_wildcards() can handle an array of paths
+- * and all possible expands are returned in one array. We use this
+- * to handle the expansion of '**' into an empty string.
+- */
+- if (stackp->ffs_filearray == NULL)
+- {
+- char_u *dirptrs[2];
+-
+- /* we use filepath to build the path expand_wildcards() should
+- * expand.
+- */
+- dirptrs[0] = file_path;
+- dirptrs[1] = NULL;
+-
+- /* if we have a start dir copy it in */
+- if (!vim_isAbsName(stackp->ffs_fix_path)
+- && search_ctx->ffsc_start_dir)
+- {
+- if (STRLEN(search_ctx->ffsc_start_dir) + 1 < MAXPATHL)
+- {
+- STRCPY(file_path, search_ctx->ffsc_start_dir);
+- add_pathsep(file_path);
+- }
+- else
+- {
+- ff_free_stack_element(stackp);
+- goto fail;
+- }
+- }
+-
+- /* append the fix part of the search path */
+- if (STRLEN(file_path) + STRLEN(stackp->ffs_fix_path) + 1 < MAXPATHL)
+- {
+- STRCAT(file_path, stackp->ffs_fix_path);
+- add_pathsep(file_path);
+- }
+- else
+- {
+- ff_free_stack_element(stackp);
+- goto fail;
+- }
+-
+- #ifdef FEAT_PATH_EXTRA
+- rest_of_wildcards = stackp->ffs_wc_path;
+- if (*rest_of_wildcards != NUL)
+- {
+- len = (int)STRLEN(file_path);
+- if (STRNCMP(rest_of_wildcards, "**", 2) == 0)
+- {
+- /* pointer to the restrict byte
+- * The restrict byte is not a character!
+- */
+- p = rest_of_wildcards + 2;
+-
+- if (*p > 0)
+- {
+- (*p)--;
+- if (len + 1 < MAXPATHL)
+- file_path[len++] = '*';
+- else
+- {
+- ff_free_stack_element(stackp);
+- goto fail;
+- }
+- }
+-
+- if (*p == 0)
+- {
+- /* remove '**<numb> from wildcards */
+- STRMOVE(rest_of_wildcards, rest_of_wildcards + 3);
+- }
+- else
+- rest_of_wildcards += 3;
+-
+- if (stackp->ffs_star_star_empty == 0)
+- {
+- /* if not done before, expand '**' to empty */
+- stackp->ffs_star_star_empty = 1;
+- dirptrs[1] = stackp->ffs_fix_path;
+- }
+- }
+-
+- /*
+- * Here we copy until the next path separator or the end of
+- * the path. If we stop at a path separator, there is
+- * still something else left. This is handled below by
+- * pushing every directory returned from expand_wildcards()
+- * on the stack again for further search.
+- */
+- while (*rest_of_wildcards
+- && !vim_ispathsep(*rest_of_wildcards))
+- if (len + 1 < MAXPATHL)
+- file_path[len++] = *rest_of_wildcards++;
+- else
+- {
+- ff_free_stack_element(stackp);
+- goto fail;
+- }
+-
+- file_path[len] = NUL;
+- if (vim_ispathsep(*rest_of_wildcards))
+- rest_of_wildcards++;
+- }
+- #endif
+-
+- /*
+- * Expand wildcards like "*" and "$VAR".
+- * If the path is a URL don't try this.
+- */
+- if (path_with_url(dirptrs[0]))
+- {
+- stackp->ffs_filearray = (char_u **)
+- alloc((unsigned)sizeof(char *));
+- if (stackp->ffs_filearray != NULL
+- && (stackp->ffs_filearray[0]
+- = vim_strsave(dirptrs[0])) != NULL)
+- stackp->ffs_filearray_size = 1;
+- else
+- stackp->ffs_filearray_size = 0;
+- }
+- else
+- /* Add EW_NOTWILD because the expanded path may contain
+- * wildcard characters that are to be taken literally.
+- * This is a bit of a hack. */
+- expand_wildcards((dirptrs[1] == NULL) ? 1 : 2, dirptrs,
+- &stackp->ffs_filearray_size,
+- &stackp->ffs_filearray,
+- EW_DIR|EW_ADDSLASH|EW_SILENT|EW_NOTWILD);
+-
+- stackp->ffs_filearray_cur = 0;
+- stackp->ffs_stage = 0;
+- }
+- #ifdef FEAT_PATH_EXTRA
+- else
+- rest_of_wildcards = &stackp->ffs_wc_path[
+- STRLEN(stackp->ffs_wc_path)];
+- #endif
+-
+- if (stackp->ffs_stage == 0)
+- {
+- /* this is the first time we work on this directory */
+- #ifdef FEAT_PATH_EXTRA
+- if (*rest_of_wildcards == NUL)
+- #endif
+- {
+- /*
+- * We don't have further wildcards to expand, so we have to
+- * check for the final file now.
+- */
+- for (i = stackp->ffs_filearray_cur;
+- i < stackp->ffs_filearray_size; ++i)
+- {
+- if (!path_with_url(stackp->ffs_filearray[i])
+- && !mch_isdir(stackp->ffs_filearray[i]))
+- continue; /* not a directory */
+-
+- /* prepare the filename to be checked for existence
+- * below */
+- if (STRLEN(stackp->ffs_filearray[i]) + 1
+- + STRLEN(search_ctx->ffsc_file_to_search) < MAXPATHL)
+- {
+- STRCPY(file_path, stackp->ffs_filearray[i]);
+- add_pathsep(file_path);
+- STRCAT(file_path, search_ctx->ffsc_file_to_search);
+- }
+- else
+- {
+- ff_free_stack_element(stackp);
+- goto fail;
+- }
+-
+- /*
+- * Try without extra suffix and then with suffixes
+- * from 'suffixesadd'.
+- */
+- #ifdef FEAT_SEARCHPATH
+- len = (int)STRLEN(file_path);
+- if (search_ctx->ffsc_tagfile)
+- suf = (char_u *)"";
+- else
+- suf = curbuf->b_p_sua;
+- for (;;)
+- #endif
+- {
+- /* if file exists and we didn't already find it */
+- if ((path_with_url(file_path)
+- || (mch_getperm(file_path) >= 0
+- && (search_ctx->ffsc_find_what
+- == FINDFILE_BOTH
+- || ((search_ctx->ffsc_find_what
+- == FINDFILE_DIR)
+- == mch_isdir(file_path)))))
+- #ifndef FF_VERBOSE
+- && (ff_check_visited(
+- &search_ctx->ffsc_visited_list->ffvl_visited_list,
+- file_path
+- #ifdef FEAT_PATH_EXTRA
+- , (char_u *)""
+- #endif
+- ) == OK)
+- #endif
+- )
+- {
+- #ifdef FF_VERBOSE
+- if (ff_check_visited(
+- &search_ctx->ffsc_visited_list->ffvl_visited_list,
+- file_path
+- #ifdef FEAT_PATH_EXTRA
+- , (char_u *)""
+- #endif
+- ) == FAIL)
+- {
+- if (p_verbose >= 5)
+- {
+- verbose_enter_scroll();
+- smsg("Already: %s",
+- file_path);
+- /* don't overwrite this either */
+- msg_puts("\n");
+- verbose_leave_scroll();
+- }
+- continue;
+- }
+- #endif
+-
+- /* push dir to examine rest of subdirs later */
+- stackp->ffs_filearray_cur = i + 1;
+- ff_push(search_ctx, stackp);
+-
+- if (!path_with_url(file_path))
+- simplify_filename(file_path);
+- if (mch_dirname(ff_expand_buffer, MAXPATHL)
+- == OK)
+- {
+- p = shorten_fname(file_path,
+- ff_expand_buffer);
+- if (p != NULL)
+- STRMOVE(file_path, p);
+- }
+- #ifdef FF_VERBOSE
+- if (p_verbose >= 5)
+- {
+- verbose_enter_scroll();
+- smsg("HIT: %s", file_path);
+- /* don't overwrite this either */
+- msg_puts("\n");
+- verbose_leave_scroll();
+- }
+- #endif
+- return file_path;
+- }
+-
+- #ifdef FEAT_SEARCHPATH
+- /* Not found or found already, try next suffix. */
+- if (*suf == NUL)
+- break;
+- copy_option_part(&suf, file_path + len,
+- MAXPATHL - len, ",");
+- #endif
+- }
+- }
+- }
+- #ifdef FEAT_PATH_EXTRA
+- else
+- {
+- /*
+- * still wildcards left, push the directories for further
+- * search
+- */
+- for (i = stackp->ffs_filearray_cur;
+- i < stackp->ffs_filearray_size; ++i)
+- {
+- if (!mch_isdir(stackp->ffs_filearray[i]))
+- continue; /* not a directory */
+-
+- ff_push(search_ctx,
+- ff_create_stack_element(
+- stackp->ffs_filearray[i],
+- rest_of_wildcards,
+- stackp->ffs_level - 1, 0));
+- }
+- }
+- #endif
+- stackp->ffs_filearray_cur = 0;
+- stackp->ffs_stage = 1;
+- }
+-
+- #ifdef FEAT_PATH_EXTRA
+- /*
+- * if wildcards contains '**' we have to descent till we reach the
+- * leaves of the directory tree.
+- */
+- if (STRNCMP(stackp->ffs_wc_path, "**", 2) == 0)
+- {
+- for (i = stackp->ffs_filearray_cur;
+- i < stackp->ffs_filearray_size; ++i)
+- {
+- if (fnamecmp(stackp->ffs_filearray[i],
+- stackp->ffs_fix_path) == 0)
+- continue; /* don't repush same directory */
+- if (!mch_isdir(stackp->ffs_filearray[i]))
+- continue; /* not a directory */
+- ff_push(search_ctx,
+- ff_create_stack_element(stackp->ffs_filearray[i],
+- stackp->ffs_wc_path, stackp->ffs_level - 1, 1));
+- }
+- }
+- #endif
+-
+- /* we are done with the current directory */
+- ff_free_stack_element(stackp);
+-
+- }
+-
+- #ifdef FEAT_PATH_EXTRA
+- /* If we reached this, we didn't find anything downwards.
+- * Let's check if we should do an upward search.
+- */
+- if (search_ctx->ffsc_start_dir
+- && search_ctx->ffsc_stopdirs_v != NULL && !got_int)
+- {
+- ff_stack_T *sptr;
+-
+- /* is the last starting directory in the stop list? */
+- if (ff_path_in_stoplist(search_ctx->ffsc_start_dir,
+- (int)(path_end - search_ctx->ffsc_start_dir),
+- search_ctx->ffsc_stopdirs_v) == TRUE)
+- break;
+-
+- /* cut of last dir */
+- while (path_end > search_ctx->ffsc_start_dir
+- && vim_ispathsep(*path_end))
+- path_end--;
+- while (path_end > search_ctx->ffsc_start_dir
+- && !vim_ispathsep(path_end[-1]))
+- path_end--;
+- *path_end = 0;
+- path_end--;
+-
+- if (*search_ctx->ffsc_start_dir == 0)
+- break;
+-
+- if (STRLEN(search_ctx->ffsc_start_dir) + 1
+- + STRLEN(search_ctx->ffsc_fix_path) < MAXPATHL)
+- {
+- STRCPY(file_path, search_ctx->ffsc_start_dir);
+- add_pathsep(file_path);
+- STRCAT(file_path, search_ctx->ffsc_fix_path);
+- }
+- else
+- goto fail;
+-
+- /* create a new stack entry */
+- sptr = ff_create_stack_element(file_path,
+- search_ctx->ffsc_wc_path, search_ctx->ffsc_level, 0);
+- if (sptr == NULL)
+- break;
+- ff_push(search_ctx, sptr);
+- }
+- else
+- break;
+- }
+- #endif
+-
+- fail:
+- vim_free(file_path);
+- return NULL;
+- }
+-
+- /*
+- * Free the list of lists of visited files and directories
+- * Can handle it if the passed search_context is NULL;
+- */
+- void
+- vim_findfile_free_visited(void *search_ctx_arg)
+- {
+- ff_search_ctx_T *search_ctx;
+-
+- if (search_ctx_arg == NULL)
+- return;
+-
+- search_ctx = (ff_search_ctx_T *)search_ctx_arg;
+- vim_findfile_free_visited_list(&search_ctx->ffsc_visited_lists_list);
+- vim_findfile_free_visited_list(&search_ctx->ffsc_dir_visited_lists_list);
+- }
+-
+- static void
+- vim_findfile_free_visited_list(ff_visited_list_hdr_T **list_headp)
+- {
+- ff_visited_list_hdr_T *vp;
+-
+- while (*list_headp != NULL)
+- {
+- vp = (*list_headp)->ffvl_next;
+- ff_free_visited_list((*list_headp)->ffvl_visited_list);
+-
+- vim_free((*list_headp)->ffvl_filename);
+- vim_free(*list_headp);
+- *list_headp = vp;
+- }
+- *list_headp = NULL;
+- }
+-
+- static void
+- ff_free_visited_list(ff_visited_T *vl)
+- {
+- ff_visited_T *vp;
+-
+- while (vl != NULL)
+- {
+- vp = vl->ffv_next;
+- #ifdef FEAT_PATH_EXTRA
+- vim_free(vl->ffv_wc_path);
+- #endif
+- vim_free(vl);
+- vl = vp;
+- }
+- vl = NULL;
+- }
+-
+- /*
+- * Returns the already visited list for the given filename. If none is found it
+- * allocates a new one.
+- */
+- static ff_visited_list_hdr_T*
+- ff_get_visited_list(
+- char_u *filename,
+- ff_visited_list_hdr_T **list_headp)
+- {
+- ff_visited_list_hdr_T *retptr = NULL;
+-
+- /* check if a visited list for the given filename exists */
+- if (*list_headp != NULL)
+- {
+- retptr = *list_headp;
+- while (retptr != NULL)
+- {
+- if (fnamecmp(filename, retptr->ffvl_filename) == 0)
+- {
+- #ifdef FF_VERBOSE
+- if (p_verbose >= 5)
+- {
+- verbose_enter_scroll();
+- smsg("ff_get_visited_list: FOUND list for %s",
+- filename);
+- /* don't overwrite this either */
+- msg_puts("\n");
+- verbose_leave_scroll();
+- }
+- #endif
+- return retptr;
+- }
+- retptr = retptr->ffvl_next;
+- }
+- }
+-
+- #ifdef FF_VERBOSE
+- if (p_verbose >= 5)
+- {
+- verbose_enter_scroll();
+- smsg("ff_get_visited_list: new list for %s", filename);
+- /* don't overwrite this either */
+- msg_puts("\n");
+- verbose_leave_scroll();
+- }
+- #endif
+-
+- /*
+- * if we reach this we didn't find a list and we have to allocate new list
+- */
+- retptr = (ff_visited_list_hdr_T*)alloc((unsigned)sizeof(*retptr));
+- if (retptr == NULL)
+- return NULL;
+-
+- retptr->ffvl_visited_list = NULL;
+- retptr->ffvl_filename = vim_strsave(filename);
+- if (retptr->ffvl_filename == NULL)
+- {
+- vim_free(retptr);
+- return NULL;
+- }
+- retptr->ffvl_next = *list_headp;
+- *list_headp = retptr;
+-
+- return retptr;
+- }
+-
+- #ifdef FEAT_PATH_EXTRA
+- /*
+- * check if two wildcard paths are equal. Returns TRUE or FALSE.
+- * They are equal if:
+- * - both paths are NULL
+- * - they have the same length
+- * - char by char comparison is OK
+- * - the only differences are in the counters behind a '**', so
+- * '**\20' is equal to '**\24'
+- */
+- static int
+- ff_wc_equal(char_u *s1, char_u *s2)
+- {
+- int i, j;
+- int c1 = NUL;
+- int c2 = NUL;
+- int prev1 = NUL;
+- int prev2 = NUL;
+-
+- if (s1 == s2)
+- return TRUE;
+-
+- if (s1 == NULL || s2 == NULL)
+- return FALSE;
+-
+- for (i = 0, j = 0; s1[i] != NUL && s2[j] != NUL;)
+- {
+- c1 = PTR2CHAR(s1 + i);
+- c2 = PTR2CHAR(s2 + j);
+-
+- if ((p_fic ? MB_TOLOWER(c1) != MB_TOLOWER(c2) : c1 != c2)
+- && (prev1 != '*' || prev2 != '*'))
+- return FALSE;
+- prev2 = prev1;
+- prev1 = c1;
+-
+- i += MB_PTR2LEN(s1 + i);
+- j += MB_PTR2LEN(s2 + j);
+- }
+- return s1[i] == s2[j];
+- }
+- #endif
+-
+- /*
+- * maintains the list of already visited files and dirs
+- * returns FAIL if the given file/dir is already in the list
+- * returns OK if it is newly added
+- *
+- * TODO: What to do on memory allocation problems?
+- * -> return TRUE - Better the file is found several times instead of
+- * never.
+- */
+- static int
+- ff_check_visited(
+- ff_visited_T **visited_list,
+- char_u *fname
+- #ifdef FEAT_PATH_EXTRA
+- , char_u *wc_path
+- #endif
+- )
+- {
+- ff_visited_T *vp;
+- #ifdef UNIX
+- stat_T st;
+- int url = FALSE;
+- #endif
+-
+- /* For an URL we only compare the name, otherwise we compare the
+- * device/inode (unix) or the full path name (not Unix). */
+- if (path_with_url(fname))
+- {
+- vim_strncpy(ff_expand_buffer, fname, MAXPATHL - 1);
+- #ifdef UNIX
+- url = TRUE;
+- #endif
+- }
+- else
+- {
+- ff_expand_buffer[0] = NUL;
+- #ifdef UNIX
+- if (mch_stat((char *)fname, &st) < 0)
+- #else
+- if (vim_FullName(fname, ff_expand_buffer, MAXPATHL, TRUE) == FAIL)
+- #endif
+- return FAIL;
+- }
+-
+- /* check against list of already visited files */
+- for (vp = *visited_list; vp != NULL; vp = vp->ffv_next)
+- {
+- if (
+- #ifdef UNIX
+- !url ? (vp->ffv_dev_valid && vp->ffv_dev == st.st_dev
+- && vp->ffv_ino == st.st_ino)
+- :
+- #endif
+- fnamecmp(vp->ffv_fname, ff_expand_buffer) == 0
+- )
+- {
+- #ifdef FEAT_PATH_EXTRA
+- /* are the wildcard parts equal */
+- if (ff_wc_equal(vp->ffv_wc_path, wc_path) == TRUE)
+- #endif
+- /* already visited */
+- return FAIL;
+- }
+- }
+-
+- /*
+- * New file/dir. Add it to the list of visited files/dirs.
+- */
+- vp = (ff_visited_T *)alloc((unsigned)(sizeof(ff_visited_T)
+- + STRLEN(ff_expand_buffer)));
+-
+- if (vp != NULL)
+- {
+- #ifdef UNIX
+- if (!url)
+- {
+- vp->ffv_dev_valid = TRUE;
+- vp->ffv_ino = st.st_ino;
+- vp->ffv_dev = st.st_dev;
+- vp->ffv_fname[0] = NUL;
+- }
+- else
+- {
+- vp->ffv_dev_valid = FALSE;
+- #endif
+- STRCPY(vp->ffv_fname, ff_expand_buffer);
+- #ifdef UNIX
+- }
+- #endif
+- #ifdef FEAT_PATH_EXTRA
+- if (wc_path != NULL)
+- vp->ffv_wc_path = vim_strsave(wc_path);
+- else
+- vp->ffv_wc_path = NULL;
+- #endif
+-
+- vp->ffv_next = *visited_list;
+- *visited_list = vp;
+- }
+-
+- return OK;
+- }
+-
+- /*
+- * create stack element from given path pieces
+- */
+- static ff_stack_T *
+- ff_create_stack_element(
+- char_u *fix_part,
+- #ifdef FEAT_PATH_EXTRA
+- char_u *wc_part,
+- #endif
+- int level,
+- int star_star_empty)
+- {
+- ff_stack_T *new;
+-
+- new = (ff_stack_T *)alloc((unsigned)sizeof(ff_stack_T));
+- if (new == NULL)
+- return NULL;
+-
+- new->ffs_prev = NULL;
+- new->ffs_filearray = NULL;
+- new->ffs_filearray_size = 0;
+- new->ffs_filearray_cur = 0;
+- new->ffs_stage = 0;
+- new->ffs_level = level;
+- new->ffs_star_star_empty = star_star_empty;
+-
+- /* the following saves NULL pointer checks in vim_findfile */
+- if (fix_part == NULL)
+- fix_part = (char_u *)"";
+- new->ffs_fix_path = vim_strsave(fix_part);
+-
+- #ifdef FEAT_PATH_EXTRA
+- if (wc_part == NULL)
+- wc_part = (char_u *)"";
+- new->ffs_wc_path = vim_strsave(wc_part);
+- #endif
+-
+- if (new->ffs_fix_path == NULL
+- #ifdef FEAT_PATH_EXTRA
+- || new->ffs_wc_path == NULL
+- #endif
+- )
+- {
+- ff_free_stack_element(new);
+- new = NULL;
+- }
+-
+- return new;
+- }
+-
+- /*
+- * Push a dir on the directory stack.
+- */
+- static void
+- ff_push(ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr)
+- {
+- /* check for NULL pointer, not to return an error to the user, but
+- * to prevent a crash */
+- if (stack_ptr != NULL)
+- {
+- stack_ptr->ffs_prev = search_ctx->ffsc_stack_ptr;
+- search_ctx->ffsc_stack_ptr = stack_ptr;
+- }
+- }
+-
+- /*
+- * Pop a dir from the directory stack.
+- * Returns NULL if stack is empty.
+- */
+- static ff_stack_T *
+- ff_pop(ff_search_ctx_T *search_ctx)
+- {
+- ff_stack_T *sptr;
+-
+- sptr = search_ctx->ffsc_stack_ptr;
+- if (search_ctx->ffsc_stack_ptr != NULL)
+- search_ctx->ffsc_stack_ptr = search_ctx->ffsc_stack_ptr->ffs_prev;
+-
+- return sptr;
+- }
+-
+- /*
+- * free the given stack element
+- */
+- static void
+- ff_free_stack_element(ff_stack_T *stack_ptr)
+- {
+- /* vim_free handles possible NULL pointers */
+- vim_free(stack_ptr->ffs_fix_path);
+- #ifdef FEAT_PATH_EXTRA
+- vim_free(stack_ptr->ffs_wc_path);
+- #endif
+-
+- if (stack_ptr->ffs_filearray != NULL)
+- FreeWild(stack_ptr->ffs_filearray_size, stack_ptr->ffs_filearray);
+-
+- vim_free(stack_ptr);
+- }
+-
+- /*
+- * Clear the search context, but NOT the visited list.
+- */
+- static void
+- ff_clear(ff_search_ctx_T *search_ctx)
+- {
+- ff_stack_T *sptr;
+-
+- /* clear up stack */
+- while ((sptr = ff_pop(search_ctx)) != NULL)
+- ff_free_stack_element(sptr);
+-
+- vim_free(search_ctx->ffsc_file_to_search);
+- vim_free(search_ctx->ffsc_start_dir);
+- vim_free(search_ctx->ffsc_fix_path);
+- #ifdef FEAT_PATH_EXTRA
+- vim_free(search_ctx->ffsc_wc_path);
+- #endif
+-
+- #ifdef FEAT_PATH_EXTRA
+- if (search_ctx->ffsc_stopdirs_v != NULL)
+- {
+- int i = 0;
+-
+- while (search_ctx->ffsc_stopdirs_v[i] != NULL)
+- {
+- vim_free(search_ctx->ffsc_stopdirs_v[i]);
+- i++;
+- }
+- vim_free(search_ctx->ffsc_stopdirs_v);
+- }
+- search_ctx->ffsc_stopdirs_v = NULL;
+- #endif
+-
+- /* reset everything */
+- search_ctx->ffsc_file_to_search = NULL;
+- search_ctx->ffsc_start_dir = NULL;
+- search_ctx->ffsc_fix_path = NULL;
+- #ifdef FEAT_PATH_EXTRA
+- search_ctx->ffsc_wc_path = NULL;
+- search_ctx->ffsc_level = 0;
+- #endif
+- }
+-
+- #ifdef FEAT_PATH_EXTRA
+- /*
+- * check if the given path is in the stopdirs
+- * returns TRUE if yes else FALSE
+- */
+- static int
+- ff_path_in_stoplist(char_u *path, int path_len, char_u **stopdirs_v)
+- {
+- int i = 0;
+-
+- /* eat up trailing path separators, except the first */
+- while (path_len > 1 && vim_ispathsep(path[path_len - 1]))
+- path_len--;
+-
+- /* if no path consider it as match */
+- if (path_len == 0)
+- return TRUE;
+-
+- for (i = 0; stopdirs_v[i] != NULL; i++)
+- {
+- if ((int)STRLEN(stopdirs_v[i]) > path_len)
+- {
+- /* match for parent directory. So '/home' also matches
+- * '/home/rks'. Check for PATHSEP in stopdirs_v[i], else
+- * '/home/r' would also match '/home/rks'
+- */
+- if (fnamencmp(stopdirs_v[i], path, path_len) == 0
+- && vim_ispathsep(stopdirs_v[i][path_len]))
+- return TRUE;
+- }
+- else
+- {
+- if (fnamecmp(stopdirs_v[i], path) == 0)
+- return TRUE;
+- }
+- }
+- return FALSE;
+- }
+- #endif
+-
+- #if defined(FEAT_SEARCHPATH) || defined(PROTO)
+- /*
+- * Find the file name "ptr[len]" in the path. Also finds directory names.
+- *
+- * On the first call set the parameter 'first' to TRUE to initialize
+- * the search. For repeating calls to FALSE.
+- *
+- * Repeating calls will return other files called 'ptr[len]' from the path.
+- *
+- * Only on the first call 'ptr' and 'len' are used. For repeating calls they
+- * don't need valid values.
+- *
+- * If nothing found on the first call the option FNAME_MESS will issue the
+- * message:
+- * 'Can't find file "<file>" in path'
+- * On repeating calls:
+- * 'No more file "<file>" found in path'
+- *
+- * options:
+- * FNAME_MESS give error message when not found
+- *
+- * Uses NameBuff[]!
+- *
+- * Returns an allocated string for the file name. NULL for error.
+- *
+- */
+- char_u *
+- find_file_in_path(
+- char_u *ptr, /* file name */
+- int len, /* length of file name */
+- int options,
+- int first, /* use count'th matching file name */
+- char_u *rel_fname) /* file name searching relative to */
+- {
+- return find_file_in_path_option(ptr, len, options, first,
+- *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path,
+- FINDFILE_BOTH, rel_fname, curbuf->b_p_sua);
+- }
+-
+- static char_u *ff_file_to_find = NULL;
+- static void *fdip_search_ctx = NULL;
+-
+- #if defined(EXITFREE)
+- static void
+- free_findfile(void)
+- {
+- vim_free(ff_file_to_find);
+- vim_findfile_cleanup(fdip_search_ctx);
+- }
+- #endif
+-
+- /*
+- * Find the directory name "ptr[len]" in the path.
+- *
+- * options:
+- * FNAME_MESS give error message when not found
+- * FNAME_UNESC unescape backslashes.
+- *
+- * Uses NameBuff[]!
+- *
+- * Returns an allocated string for the file name. NULL for error.
+- */
+- char_u *
+- find_directory_in_path(
+- char_u *ptr, /* file name */
+- int len, /* length of file name */
+- int options,
+- char_u *rel_fname) /* file name searching relative to */
+- {
+- return find_file_in_path_option(ptr, len, options, TRUE, p_cdpath,
+- FINDFILE_DIR, rel_fname, (char_u *)"");
+- }
+-
+- char_u *
+- find_file_in_path_option(
+- char_u *ptr, /* file name */
+- int len, /* length of file name */
+- int options,
+- int first, /* use count'th matching file name */
+- char_u *path_option, /* p_path or p_cdpath */
+- int find_what, /* FINDFILE_FILE, _DIR or _BOTH */
+- char_u *rel_fname, /* file name we are looking relative to. */
+- char_u *suffixes) /* list of suffixes, 'suffixesadd' option */
+- {
+- static char_u *dir;
+- static int did_findfile_init = FALSE;
+- char_u save_char;
+- char_u *file_name = NULL;
+- char_u *buf = NULL;
+- int rel_to_curdir;
+- #ifdef AMIGA
+- struct Process *proc = (struct Process *)FindTask(0L);
+- APTR save_winptr = proc->pr_WindowPtr;
+-
+- /* Avoid a requester here for a volume that doesn't exist. */
+- proc->pr_WindowPtr = (APTR)-1L;
+- #endif
+-
+- if (first == TRUE)
+- {
+- /* copy file name into NameBuff, expanding environment variables */
+- save_char = ptr[len];
+- ptr[len] = NUL;
+- expand_env_esc(ptr, NameBuff, MAXPATHL, FALSE, TRUE, NULL);
+- ptr[len] = save_char;
+-
+- vim_free(ff_file_to_find);
+- ff_file_to_find = vim_strsave(NameBuff);
+- if (ff_file_to_find == NULL) /* out of memory */
+- {
+- file_name = NULL;
+- goto theend;
+- }
+- if (options & FNAME_UNESC)
+- {
+- /* Change all "\ " to " ". */
+- for (ptr = ff_file_to_find; *ptr != NUL; ++ptr)
+- if (ptr[0] == '\\' && ptr[1] == ' ')
+- mch_memmove(ptr, ptr + 1, STRLEN(ptr));
+- }
+- }
+-
+- rel_to_curdir = (ff_file_to_find[0] == '.'
+- && (ff_file_to_find[1] == NUL
+- || vim_ispathsep(ff_file_to_find[1])
+- || (ff_file_to_find[1] == '.'
+- && (ff_file_to_find[2] == NUL
+- || vim_ispathsep(ff_file_to_find[2])))));
+- if (vim_isAbsName(ff_file_to_find)
+- /* "..", "../path", "." and "./path": don't use the path_option */
+- || rel_to_curdir
+- #if defined(MSWIN)
+- /* handle "\tmp" as absolute path */
+- || vim_ispathsep(ff_file_to_find[0])
+- /* handle "c:name" as absolute path */
+- || (ff_file_to_find[0] != NUL && ff_file_to_find[1] == ':')
+- #endif
+- #ifdef AMIGA
+- /* handle ":tmp" as absolute path */
+- || ff_file_to_find[0] == ':'
+- #endif
+- )
+- {
+- /*
+- * Absolute path, no need to use "path_option".
+- * If this is not a first call, return NULL. We already returned a
+- * filename on the first call.
+- */
+- if (first == TRUE)
+- {
+- int l;
+- int run;
+-
+- if (path_with_url(ff_file_to_find))
+- {
+- file_name = vim_strsave(ff_file_to_find);
+- goto theend;
+- }
+-
+- /* When FNAME_REL flag given first use the directory of the file.
+- * Otherwise or when this fails use the current directory. */
+- for (run = 1; run <= 2; ++run)
+- {
+- l = (int)STRLEN(ff_file_to_find);
+- if (run == 1
+- && rel_to_curdir
+- && (options & FNAME_REL)
+- && rel_fname != NULL
+- && STRLEN(rel_fname) + l < MAXPATHL)
+- {
+- STRCPY(NameBuff, rel_fname);
+- STRCPY(gettail(NameBuff), ff_file_to_find);
+- l = (int)STRLEN(NameBuff);
+- }
+- else
+- {
+- STRCPY(NameBuff, ff_file_to_find);
+- run = 2;
+- }
+-
+- /* When the file doesn't exist, try adding parts of
+- * 'suffixesadd'. */
+- buf = suffixes;
+- for (;;)
+- {
+- if (mch_getperm(NameBuff) >= 0
+- && (find_what == FINDFILE_BOTH
+- || ((find_what == FINDFILE_DIR)
+- == mch_isdir(NameBuff))))
+- {
+- file_name = vim_strsave(NameBuff);
+- goto theend;
+- }
+- if (*buf == NUL)
+- break;
+- copy_option_part(&buf, NameBuff + l, MAXPATHL - l, ",");
+- }
+- }
+- }
+- }
+- else
+- {
+- /*
+- * Loop over all paths in the 'path' or 'cdpath' option.
+- * When "first" is set, first setup to the start of the option.
+- * Otherwise continue to find the next match.
+- */
+- if (first == TRUE)
+- {
+- /* vim_findfile_free_visited can handle a possible NULL pointer */
+- vim_findfile_free_visited(fdip_search_ctx);
+- dir = path_option;
+- did_findfile_init = FALSE;
+- }
+-
+- for (;;)
+- {
+- if (did_findfile_init)
+- {
+- file_name = vim_findfile(fdip_search_ctx);
+- if (file_name != NULL)
+- break;
+-
+- did_findfile_init = FALSE;
+- }
+- else
+- {
+- char_u *r_ptr;
+-
+- if (dir == NULL || *dir == NUL)
+- {
+- /* We searched all paths of the option, now we can
+- * free the search context. */
+- vim_findfile_cleanup(fdip_search_ctx);
+- fdip_search_ctx = NULL;
+- break;
+- }
+-
+- if ((buf = alloc((int)(MAXPATHL))) == NULL)
+- break;
+-
+- /* copy next path */
+- buf[0] = 0;
+- copy_option_part(&dir, buf, MAXPATHL, " ,");
+-
+- #ifdef FEAT_PATH_EXTRA
+- /* get the stopdir string */
+- r_ptr = vim_findfile_stopdir(buf);
+- #else
+- r_ptr = NULL;
+- #endif
+- fdip_search_ctx = vim_findfile_init(buf, ff_file_to_find,
+- r_ptr, 100, FALSE, find_what,
+- fdip_search_ctx, FALSE, rel_fname);
+- if (fdip_search_ctx != NULL)
+- did_findfile_init = TRUE;
+- vim_free(buf);
+- }
+- }
+- }
+- if (file_name == NULL && (options & FNAME_MESS))
+- {
+- if (first == TRUE)
+- {
+- if (find_what == FINDFILE_DIR)
+- semsg(_("E344: Can't find directory \"%s\" in cdpath"),
+- ff_file_to_find);
+- else
+- semsg(_("E345: Can't find file \"%s\" in path"),
+- ff_file_to_find);
+- }
+- else
+- {
+- if (find_what == FINDFILE_DIR)
+- semsg(_("E346: No more directory \"%s\" found in cdpath"),
+- ff_file_to_find);
+- else
+- semsg(_("E347: No more file \"%s\" found in path"),
+- ff_file_to_find);
+- }
+- }
+-
+- theend:
+- #ifdef AMIGA
+- proc->pr_WindowPtr = save_winptr;
+- #endif
+- return file_name;
+- }
+-
+- #endif /* FEAT_SEARCHPATH */
+-
+ /*
+ * Change directory to "new_dir". If FEAT_SEARCHPATH is defined, search
+ * 'cdpath' for relative directory names, otherwise just mch_chdir().
+--- 3815,3820 ----
+*** ../vim-8.1.0913/src/proto.h 2019-01-31 13:47:51.126632619 +0100
+--- src/proto.h 2019-02-13 22:06:27.641777652 +0100
+***************
+*** 80,85 ****
+--- 80,86 ----
+ # include "ex_eval.pro"
+ # include "ex_getln.pro"
+ # include "fileio.pro"
++ # include "findfile.pro"
+ # include "fold.pro"
+ # include "getchar.pro"
+ # ifdef FEAT_HANGULIN
+*** ../vim-8.1.0913/src/proto/findfile.pro 2019-02-13 22:43:46.449534680 +0100
+--- src/proto/findfile.pro 2019-02-13 22:31:26.131353440 +0100
+***************
+*** 0 ****
+--- 1,18 ----
++ /* findfile.c */
++ void *vim_findfile_init(char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname);
++ char_u *vim_findfile_stopdir(char_u *buf);
++ void vim_findfile_cleanup(void *ctx);
++ char_u *vim_findfile(void *search_ctx_arg);
++ void vim_findfile_free_visited(void *search_ctx_arg);
++ char_u *find_file_in_path(char_u *ptr, int len, int options, int first, char_u *rel_fname);
++ void free_findfile(void);
++ char_u *find_directory_in_path(char_u *ptr, int len, int options, char_u *rel_fname);
++ char_u *find_file_in_path_option(char_u *ptr, int len, int options, int first, char_u *path_option, int find_what, char_u *rel_fname, char_u *suffixes);
++ char_u *grab_file_name(long count, linenr_T *file_lnum);
++ char_u *file_name_at_cursor(int options, long count, linenr_T *file_lnum);
++ char_u *file_name_in_line(char_u *line, int col, int options, long count, char_u *rel_fname, linenr_T *file_lnum);
++ char_u *find_file_name_in_path(char_u *ptr, int len, int options, long count, char_u *rel_fname);
++ int vim_ispathlistsep(int c);
++ void uniquefy_paths(garray_T *gap, char_u *pattern);
++ int expand_in_path(garray_T *gap, char_u *pattern, int flags);
++ /* vim: set ft=c : */
+*** ../vim-8.1.0913/src/proto/misc1.pro 2019-01-31 13:47:51.126632619 +0100
+--- src/proto/misc1.pro 2019-02-13 22:07:22.757355997 +0100
+***************
+*** 74,80 ****
+ char_u *get_past_head(char_u *path);
+ int vim_ispathsep(int c);
+ int vim_ispathsep_nocolon(int c);
+- int vim_ispathlistsep(int c);
+ void shorten_dir(char_u *str);
+ int dir_of_file_exists(char_u *fname);
+ int vim_fnamecmp(char_u *x, char_u *y);
+--- 74,79 ----
+***************
+*** 99,102 ****
+--- 98,105 ----
+ void FreeWild(int count, char_u **files);
+ int goto_im(void);
+ char_u *get_isolated_shell_name(void);
++ int path_is_url(char_u *p);
++ int path_with_url(char_u *fname);
++ int vim_isAbsName(char_u *name);
++ int vim_FullName(char_u *fname, char_u *buf, int len, int force);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0913/src/proto/misc2.pro 2019-01-13 23:38:33.407773189 +0100
+--- src/proto/misc2.pro 2019-02-13 22:07:27.497320021 +0100
+***************
+*** 90,103 ****
+ char *parse_shape_opt(int what);
+ int get_shape_idx(int mouse);
+ void update_mouseshape(int shape_idx);
+- void *vim_findfile_init(char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname);
+- char_u *vim_findfile_stopdir(char_u *buf);
+- void vim_findfile_cleanup(void *ctx);
+- char_u *vim_findfile(void *search_ctx_arg);
+- void vim_findfile_free_visited(void *search_ctx_arg);
+- char_u *find_file_in_path(char_u *ptr, int len, int options, int first, char_u *rel_fname);
+- char_u *find_directory_in_path(char_u *ptr, int len, int options, char_u *rel_fname);
+- char_u *find_file_in_path_option(char_u *ptr, int len, int options, int first, char_u *path_option, int find_what, char_u *rel_fname, char_u *suffixes);
+ int vim_chdir(char_u *new_dir);
+ int get_user_name(char_u *buf, int len);
+ void sort_strings(char_u **files, int count);
+--- 90,95 ----
+*** ../vim-8.1.0913/src/proto/window.pro 2019-02-10 22:58:58.976414779 +0100
+--- src/proto/window.pro 2019-02-13 22:07:31.661288452 +0100
+***************
+*** 65,77 ****
+ void command_height(void);
+ void last_status(int morewin);
+ int tabline_height(void);
+- char_u *grab_file_name(long count, linenr_T *file_lnum);
+- char_u *file_name_at_cursor(int options, long count, linenr_T *file_lnum);
+- char_u *file_name_in_line(char_u *line, int col, int options, long count, char_u *rel_fname, linenr_T *file_lnum);
+- char_u *find_file_name_in_path(char_u *ptr, int len, int options, long count, char_u *rel_fname);
+- int path_with_url(char_u *fname);
+- int vim_isAbsName(char_u *name);
+- int vim_FullName(char_u *fname, char_u *buf, int len, int force);
+ int min_rows(void);
+ int only_one_window(void);
+ void check_lnums(int do_curwin);
+--- 65,70 ----
+*** ../vim-8.1.0913/src/window.c 2019-02-10 22:58:58.980414768 +0100
+--- src/window.c 2019-02-13 22:06:27.641777652 +0100
+***************
+*** 9,15 ****
+
+ #include "vim.h"
+
+- static int path_is_url(char_u *p);
+ static void cmd_with_count(char *cmd, char_u *bufp, size_t bufsize, long Prenum);
+ static void win_init(win_T *newp, win_T *oldp, int flags);
+ static void win_init_some(win_T *newp, win_T *oldp);
+--- 9,14 ----
+***************
+*** 61,69 ****
+
+ static win_T *win_alloc(win_T *after, int hidden);
+
+- #define URL_SLASH 1 /* path_is_url() has found "://" */
+- #define URL_BACKSLASH 2 /* path_is_url() has found ":\\" */
+-
+ #define NOWIN (win_T *)-1 /* non-existing window */
+
+ #define ROWS_AVAIL (Rows - p_ch - tabline_height())
+--- 60,65 ----
+***************
+*** 6098,6414 ****
+ return 1;
+ }
+
+- #if defined(FEAT_SEARCHPATH) || defined(PROTO)
+- /*
+- * Get the file name at the cursor.
+- * If Visual mode is active, use the selected text if it's in one line.
+- * Returns the name in allocated memory, NULL for failure.
+- */
+- char_u *
+- grab_file_name(long count, linenr_T *file_lnum)
+- {
+- int options = FNAME_MESS|FNAME_EXP|FNAME_REL|FNAME_UNESC;
+-
+- if (VIsual_active)
+- {
+- int len;
+- char_u *ptr;
+-
+- if (get_visual_text(NULL, &ptr, &len) == FAIL)
+- return NULL;
+- return find_file_name_in_path(ptr, len, options,
+- count, curbuf->b_ffname);
+- }
+- return file_name_at_cursor(options | FNAME_HYP, count, file_lnum);
+- }
+-
+- /*
+- * Return the file name under or after the cursor.
+- *
+- * The 'path' option is searched if the file name is not absolute.
+- * The string returned has been alloc'ed and should be freed by the caller.
+- * NULL is returned if the file name or file is not found.
+- *
+- * options:
+- * FNAME_MESS give error messages
+- * FNAME_EXP expand to path
+- * FNAME_HYP check for hypertext link
+- * FNAME_INCL apply "includeexpr"
+- */
+- char_u *
+- file_name_at_cursor(int options, long count, linenr_T *file_lnum)
+- {
+- return file_name_in_line(ml_get_curline(),
+- curwin->w_cursor.col, options, count, curbuf->b_ffname,
+- file_lnum);
+- }
+-
+- /*
+- * Return the name of the file under or after ptr[col].
+- * Otherwise like file_name_at_cursor().
+- */
+- char_u *
+- file_name_in_line(
+- char_u *line,
+- int col,
+- int options,
+- long count,
+- char_u *rel_fname, /* file we are searching relative to */
+- linenr_T *file_lnum) /* line number after the file name */
+- {
+- char_u *ptr;
+- int len;
+- int in_type = TRUE;
+- int is_url = FALSE;
+-
+- /*
+- * search forward for what could be the start of a file name
+- */
+- ptr = line + col;
+- while (*ptr != NUL && !vim_isfilec(*ptr))
+- MB_PTR_ADV(ptr);
+- if (*ptr == NUL) /* nothing found */
+- {
+- if (options & FNAME_MESS)
+- emsg(_("E446: No file name under cursor"));
+- return NULL;
+- }
+-
+- /*
+- * Search backward for first char of the file name.
+- * Go one char back to ":" before "//" even when ':' is not in 'isfname'.
+- */
+- while (ptr > line)
+- {
+- if (has_mbyte && (len = (*mb_head_off)(line, ptr - 1)) > 0)
+- ptr -= len + 1;
+- else if (vim_isfilec(ptr[-1])
+- || ((options & FNAME_HYP) && path_is_url(ptr - 1)))
+- --ptr;
+- else
+- break;
+- }
+-
+- /*
+- * Search forward for the last char of the file name.
+- * Also allow "://" when ':' is not in 'isfname'.
+- */
+- len = 0;
+- while (vim_isfilec(ptr[len]) || (ptr[len] == '\\' && ptr[len + 1] == ' ')
+- || ((options & FNAME_HYP) && path_is_url(ptr + len))
+- || (is_url && vim_strchr((char_u *)"?&=", ptr[len]) != NULL))
+- {
+- /* After type:// we also include ?, & and = as valid characters, so that
+- * http://google.com?q=this&that=ok works. */
+- if ((ptr[len] >= 'A' && ptr[len] <= 'Z') || (ptr[len] >= 'a' && ptr[len] <= 'z'))
+- {
+- if (in_type && path_is_url(ptr + len + 1))
+- is_url = TRUE;
+- }
+- else
+- in_type = FALSE;
+-
+- if (ptr[len] == '\\')
+- /* Skip over the "\" in "\ ". */
+- ++len;
+- if (has_mbyte)
+- len += (*mb_ptr2len)(ptr + len);
+- else
+- ++len;
+- }
+-
+- /*
+- * If there is trailing punctuation, remove it.
+- * But don't remove "..", could be a directory name.
+- */
+- if (len > 2 && vim_strchr((char_u *)".,:;!", ptr[len - 1]) != NULL
+- && ptr[len - 2] != '.')
+- --len;
+-
+- if (file_lnum != NULL)
+- {
+- char_u *p;
+-
+- /* Get the number after the file name and a separator character */
+- p = ptr + len;
+- p = skipwhite(p);
+- if (*p != NUL)
+- {
+- if (!isdigit(*p))
+- ++p; /* skip the separator */
+- p = skipwhite(p);
+- if (isdigit(*p))
+- *file_lnum = (int)getdigits(&p);
+- }
+- }
+-
+- return find_file_name_in_path(ptr, len, options, count, rel_fname);
+- }
+-
+- # if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
+- static char_u *
+- eval_includeexpr(char_u *ptr, int len)
+- {
+- char_u *res;
+-
+- set_vim_var_string(VV_FNAME, ptr, len);
+- res = eval_to_string_safe(curbuf->b_p_inex, NULL,
+- was_set_insecurely((char_u *)"includeexpr", OPT_LOCAL));
+- set_vim_var_string(VV_FNAME, NULL, 0);
+- return res;
+- }
+- #endif
+-
+- /*
+- * Return the name of the file ptr[len] in 'path'.
+- * Otherwise like file_name_at_cursor().
+- */
+- char_u *
+- find_file_name_in_path(
+- char_u *ptr,
+- int len,
+- int options,
+- long count,
+- char_u *rel_fname) /* file we are searching relative to */
+- {
+- char_u *file_name;
+- int c;
+- # if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
+- char_u *tofree = NULL;
+-
+- if ((options & FNAME_INCL) && *curbuf->b_p_inex != NUL)
+- {
+- tofree = eval_includeexpr(ptr, len);
+- if (tofree != NULL)
+- {
+- ptr = tofree;
+- len = (int)STRLEN(ptr);
+- }
+- }
+- # endif
+-
+- if (options & FNAME_EXP)
+- {
+- file_name = find_file_in_path(ptr, len, options & ~FNAME_MESS,
+- TRUE, rel_fname);
+-
+- # if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
+- /*
+- * If the file could not be found in a normal way, try applying
+- * 'includeexpr' (unless done already).
+- */
+- if (file_name == NULL
+- && !(options & FNAME_INCL) && *curbuf->b_p_inex != NUL)
+- {
+- tofree = eval_includeexpr(ptr, len);
+- if (tofree != NULL)
+- {
+- ptr = tofree;
+- len = (int)STRLEN(ptr);
+- file_name = find_file_in_path(ptr, len, options & ~FNAME_MESS,
+- TRUE, rel_fname);
+- }
+- }
+- # endif
+- if (file_name == NULL && (options & FNAME_MESS))
+- {
+- c = ptr[len];
+- ptr[len] = NUL;
+- semsg(_("E447: Can't find file \"%s\" in path"), ptr);
+- ptr[len] = c;
+- }
+-
+- /* Repeat finding the file "count" times. This matters when it
+- * appears several times in the path. */
+- while (file_name != NULL && --count > 0)
+- {
+- vim_free(file_name);
+- file_name = find_file_in_path(ptr, len, options, FALSE, rel_fname);
+- }
+- }
+- else
+- file_name = vim_strnsave(ptr, len);
+-
+- # if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
+- vim_free(tofree);
+- # endif
+-
+- return file_name;
+- }
+- #endif /* FEAT_SEARCHPATH */
+-
+- /*
+- * Check if the "://" of a URL is at the pointer, return URL_SLASH.
+- * Also check for ":\\", which MS Internet Explorer accepts, return
+- * URL_BACKSLASH.
+- */
+- static int
+- path_is_url(char_u *p)
+- {
+- if (STRNCMP(p, "://", (size_t)3) == 0)
+- return URL_SLASH;
+- else if (STRNCMP(p, ":\\\\", (size_t)3) == 0)
+- return URL_BACKSLASH;
+- return 0;
+- }
+-
+- /*
+- * Check if "fname" starts with "name://". Return URL_SLASH if it does.
+- * Return URL_BACKSLASH for "name:\\".
+- * Return zero otherwise.
+- */
+- int
+- path_with_url(char_u *fname)
+- {
+- char_u *p;
+-
+- for (p = fname; isalpha(*p); ++p)
+- ;
+- return path_is_url(p);
+- }
+-
+- /*
+- * Return TRUE if "name" is a full (absolute) path name or URL.
+- */
+- int
+- vim_isAbsName(char_u *name)
+- {
+- return (path_with_url(name) != 0 || mch_isFullName(name));
+- }
+-
+- /*
+- * Get absolute file name into buffer "buf[len]".
+- *
+- * return FAIL for failure, OK otherwise
+- */
+- int
+- vim_FullName(
+- char_u *fname,
+- char_u *buf,
+- int len,
+- int force) /* force expansion even when already absolute */
+- {
+- int retval = OK;
+- int url;
+-
+- *buf = NUL;
+- if (fname == NULL)
+- return FAIL;
+-
+- url = path_with_url(fname);
+- if (!url)
+- retval = mch_FullName(fname, buf, len, force);
+- if (url || retval == FAIL)
+- {
+- /* something failed; use the file name (truncate when too long) */
+- vim_strncpy(buf, fname, len - 1);
+- }
+- #if defined(MSWIN)
+- slash_adjust(buf);
+- #endif
+- return retval;
+- }
+-
+ /*
+ * Return the minimal number of rows that is needed on the screen to display
+ * the current number of windows.
+--- 6094,6099 ----
+*** ../vim-8.1.0913/src/version.c 2019-02-13 21:47:32.961109662 +0100
+--- src/version.c 2019-02-13 22:04:54.862441927 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 914,
+ /**/
+
+
+--
+./configure
+Checking whether build environment is sane ...
+build environment is grinning and holding a spatula. Guess not.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0915 b/data/vim/patches/8.1.0915
new file mode 100644
index 000000000..785e29a02
--- /dev/null
+++ b/data/vim/patches/8.1.0915
@@ -0,0 +1,185 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0915
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0915
+Problem: fsync() may not work properly on Mac.
+Solution: Use fcntl() with F_FULLFSYNC. (suggested by Justin M. Keyes)
+Files: src/fileio.c, src/proto/fileio.pro, src/evalfunc.c, src/memfile.c
+
+
+*** ../vim-8.1.0914/src/fileio.c 2019-02-12 22:37:24.181961482 +0100
+--- src/fileio.c 2019-02-14 12:50:03.216177171 +0100
+***************
+*** 4661,4667 ****
+ * work (could be a pipe).
+ * If the 'fsync' option is FALSE, don't fsync(). Useful for laptops.
+ */
+! if (p_fs && fsync(fd) != 0 && !device)
+ {
+ errmsg = (char_u *)_(e_fsync);
+ end = 0;
+--- 4661,4667 ----
+ * work (could be a pipe).
+ * If the 'fsync' option is FALSE, don't fsync(). Useful for laptops.
+ */
+! if (p_fs && vim_fsync(fd) != 0 && !device)
+ {
+ errmsg = (char_u *)_(e_fsync);
+ end = 0;
+***************
+*** 5123,5128 ****
+--- 5123,5147 ----
+ return retval;
+ }
+
++ #if defined(HAVE_FSYNC) || defined(PROTO)
++ /*
++ * Call fsync() with Mac-specific exception.
++ * Return fsync() result: zero for success.
++ */
++ int
++ vim_fsync(int fd)
++ {
++ int r;
++
++ # ifdef MACOS_X
++ r = fcntl(fd, F_FULLFSYNC);
++ if (r != 0 && errno == ENOTTY)
++ # endif
++ r = fsync(fd);
++ return r;
++ }
++ #endif
++
+ /*
+ * Set the name of the current buffer. Use when the buffer doesn't have a
+ * name and a ":r" or ":w" command with a file name is used.
+*** ../vim-8.1.0914/src/proto/fileio.pro 2019-01-26 16:20:44.264683546 +0100
+--- src/proto/fileio.pro 2019-02-14 12:50:10.784127736 +0100
+***************
+*** 7,12 ****
+--- 7,13 ----
+ void set_forced_fenc(exarg_T *eap);
+ int check_file_readonly(char_u *fname, int perm);
+ int buf_write(buf_T *buf, char_u *fname, char_u *sfname, linenr_T start, linenr_T end, exarg_T *eap, int append, int forceit, int reset_changed, int filtering);
++ int vim_fsync(int fd);
+ void msg_add_fname(buf_T *buf, char_u *fname);
+ void msg_add_lines(int insert_space, long lnum, off_T nchars);
+ char_u *shorten_fname1(char_u *full_path);
+*** ../vim-8.1.0914/src/evalfunc.c 2019-02-12 22:15:03.069282157 +0100
+--- src/evalfunc.c 2019-02-14 12:50:23.456044974 +0100
+***************
+*** 14791,14797 ****
+ 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);
+ }
+--- 14791,14797 ----
+ else if (do_fsync)
+ // Ignore the error, the user wouldn't know what to do about it.
+ // May happen for a device.
+! vim_ignored = vim_fsync(fileno(fd));
+ #endif
+ fclose(fd);
+ }
+***************
+*** 14803,14809 ****
+ 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);
+ }
+--- 14803,14809 ----
+ else if (do_fsync)
+ /* Ignore the error, the user wouldn't know what to do about it.
+ * May happen for a device. */
+! vim_ignored = vim_fsync(fileno(fd));
+ #endif
+ fclose(fd);
+ }
+*** ../vim-8.1.0914/src/memfile.c 2019-01-13 23:38:33.399773248 +0100
+--- src/memfile.c 2019-02-14 12:51:22.295660849 +0100
+***************
+*** 600,606 ****
+ */
+ if (STRCMP(p_sws, "fsync") == 0)
+ {
+! if (fsync(mfp->mf_fd))
+ status = FAIL;
+ }
+ else
+--- 600,606 ----
+ */
+ if (STRCMP(p_sws, "fsync") == 0)
+ {
+! if (vim_fsync(mfp->mf_fd))
+ status = FAIL;
+ }
+ else
+***************
+*** 617,623 ****
+ #ifdef VMS
+ if (STRCMP(p_sws, "fsync") == 0)
+ {
+! if (fsync(mfp->mf_fd))
+ status = FAIL;
+ }
+ #endif
+--- 617,623 ----
+ #ifdef VMS
+ if (STRCMP(p_sws, "fsync") == 0)
+ {
+! if (vim_fsync(mfp->mf_fd))
+ status = FAIL;
+ }
+ #endif
+***************
+*** 627,633 ****
+ #endif
+ #ifdef AMIGA
+ # if defined(__AROS__) || defined(__amigaos4__)
+! if (fsync(mfp->mf_fd) != 0)
+ status = FAIL;
+ # else
+ /*
+--- 627,633 ----
+ #endif
+ #ifdef AMIGA
+ # if defined(__AROS__) || defined(__amigaos4__)
+! if (vim_fsync(mfp->mf_fd) != 0)
+ status = FAIL;
+ # else
+ /*
+*** ../vim-8.1.0914/src/version.c 2019-02-13 22:45:21.512636158 +0100
+--- src/version.c 2019-02-14 12:53:58.158767467 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 915,
+ /**/
+
+
+--
+THEOREM: VI is perfect.
+PROOF: VI in roman numerals is 6. The natural numbers < 6 which divide 6 are
+1, 2, and 3. 1+2+3 = 6. So 6 is a perfect number. Therefore, VI is perfect.
+QED
+ -- Arthur Tateishi
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0916 b/data/vim/patches/8.1.0916
new file mode 100644
index 000000000..d98b82d29
--- /dev/null
+++ b/data/vim/patches/8.1.0916
@@ -0,0 +1,175 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0916
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0916
+Problem: With Python 3.7 "find_module" is not made available.
+Solution: Also add "find_module" with Python 3.7. (Joel Frederico,
+ closes #3954)
+Files: src/if_py_both.h
+
+
+*** ../vim-8.1.0915/src/if_py_both.h 2019-01-26 17:28:22.224599141 +0100
+--- src/if_py_both.h 2019-02-14 13:25:06.212496505 +0100
+***************
+*** 87,95 ****
+ #if PY_VERSION_HEX >= 0x030700f0
+ static PyObject *py_find_spec;
+ #else
+- static PyObject *py_find_module;
+ static PyObject *py_load_module;
+ #endif
+
+ static PyObject *VimError;
+
+--- 87,95 ----
+ #if PY_VERSION_HEX >= 0x030700f0
+ static PyObject *py_find_spec;
+ #else
+ static PyObject *py_load_module;
+ #endif
++ static PyObject *py_find_module;
+
+ static PyObject *VimError;
+
+***************
+*** 759,765 ****
+ sprintf(buf, "%ld", (long)our_tv->vval.v_number);
+ ret = PyString_FromString((char *)buf);
+ }
+! # ifdef FEAT_FLOAT
+ else if (our_tv->v_type == VAR_FLOAT)
+ {
+ char buf[NUMBUFLEN];
+--- 759,765 ----
+ sprintf(buf, "%ld", (long)our_tv->vval.v_number);
+ ret = PyString_FromString((char *)buf);
+ }
+! #ifdef FEAT_FLOAT
+ else if (our_tv->v_type == VAR_FLOAT)
+ {
+ char buf[NUMBUFLEN];
+***************
+*** 767,773 ****
+ sprintf(buf, "%f", our_tv->vval.v_float);
+ ret = PyString_FromString((char *)buf);
+ }
+! # endif
+ else if (our_tv->v_type == VAR_LIST)
+ {
+ list_T *list = our_tv->vval.v_list;
+--- 767,773 ----
+ sprintf(buf, "%f", our_tv->vval.v_float);
+ ret = PyString_FromString((char *)buf);
+ }
+! #endif
+ else if (our_tv->v_type == VAR_LIST)
+ {
+ list_T *list = our_tv->vval.v_list;
+***************
+*** 6093,6110 ****
+
+ sprintf(hexBuf, "%p", (void *)obj);
+
+! # ifdef PY_USE_CAPSULE
+ capsule = PyDict_GetItemString(lookup_dict, hexBuf);
+! # else
+ capsule = (PyObject *)PyDict_GetItemString(lookup_dict, hexBuf);
+! # endif
+ if (capsule == NULL)
+ {
+! # ifdef PY_USE_CAPSULE
+ capsule = PyCapsule_New(tv, NULL, NULL);
+! # else
+ capsule = PyCObject_FromVoidPtr(tv, NULL);
+! # endif
+ if (PyDict_SetItemString(lookup_dict, hexBuf, capsule))
+ {
+ Py_DECREF(capsule);
+--- 6093,6110 ----
+
+ sprintf(hexBuf, "%p", (void *)obj);
+
+! #ifdef PY_USE_CAPSULE
+ capsule = PyDict_GetItemString(lookup_dict, hexBuf);
+! #else
+ capsule = (PyObject *)PyDict_GetItemString(lookup_dict, hexBuf);
+! #endif
+ if (capsule == NULL)
+ {
+! #ifdef PY_USE_CAPSULE
+ capsule = PyCapsule_New(tv, NULL, NULL);
+! #else
+ capsule = PyCObject_FromVoidPtr(tv, NULL);
+! #endif
+ if (PyDict_SetItemString(lookup_dict, hexBuf, capsule))
+ {
+ Py_DECREF(capsule);
+***************
+*** 6130,6140 ****
+ {
+ typval_T *v;
+
+! # ifdef PY_USE_CAPSULE
+ v = PyCapsule_GetPointer(capsule, NULL);
+! # else
+ v = PyCObject_AsVoidPtr(capsule);
+! # endif
+ copy_tv(v, tv);
+ }
+ return 0;
+--- 6130,6140 ----
+ {
+ typval_T *v;
+
+! #ifdef PY_USE_CAPSULE
+ v = PyCapsule_GetPointer(capsule, NULL);
+! #else
+ v = PyCObject_AsVoidPtr(capsule);
+! #endif
+ copy_tv(v, tv);
+ }
+ return 0;
+***************
+*** 6921,6926 ****
+--- 6921,6933 ----
+ return -1;
+ }
+
++ if ((py_find_module = PyObject_GetAttrString(cls, "find_module")))
++ {
++ // find_module() is deprecated, this may stop working in some later
++ // version.
++ ADD_OBJECT(m, "_find_module", py_find_module);
++ }
++
+ Py_DECREF(imp);
+
+ ADD_OBJECT(m, "_find_spec", py_find_spec);
+*** ../vim-8.1.0915/src/version.c 2019-02-14 12:56:31.686115921 +0100
+--- src/version.c 2019-02-14 13:28:20.831490442 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 916,
+ /**/
+
+--
+CART DRIVER: Bring out your dead!
+ There are legs stick out of windows and doors. Two MEN are fighting in the
+ mud - covered from head to foot in it. Another MAN is on his hands in
+ knees shovelling mud into his mouth. We just catch sight of a MAN falling
+ into a well.
+ "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.0917 b/data/vim/patches/8.1.0917
new file mode 100644
index 000000000..7207d35ae
--- /dev/null
+++ b/data/vim/patches/8.1.0917
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0917
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0917
+Problem: Double free when running out of memory.
+Solution: Remove one free. (Ken Takata, closes #3955)
+Files: src/userfunc.c
+
+
+*** ../vim-8.1.0916/src/userfunc.c 2019-02-11 22:00:07.671917613 +0100
+--- src/userfunc.c 2019-02-14 13:42:56.275420452 +0100
+***************
+*** 205,210 ****
+--- 205,211 ----
+ garray_T newlines;
+ garray_T *pnewargs;
+ ufunc_T *fp = NULL;
++ partial_T *pt = NULL;
+ int varargs;
+ int ret;
+ char_u *start = skipwhite(*arg + 1);
+***************
+*** 252,258 ****
+ int len, flags = 0;
+ char_u *p;
+ char_u name[20];
+- partial_T *pt;
+
+ sprintf((char*)name, "<lambda>%d", ++lambda_no);
+
+--- 253,258 ----
+***************
+*** 261,270 ****
+ goto errret;
+ pt = (partial_T *)alloc_clear((unsigned)sizeof(partial_T));
+ if (pt == NULL)
+- {
+- vim_free(fp);
+ goto errret;
+- }
+
+ ga_init2(&newlines, (int)sizeof(char_u *), 1);
+ if (ga_grow(&newlines, 1) == FAIL)
+--- 261,267 ----
+***************
+*** 318,323 ****
+--- 315,321 ----
+ ga_clear_strings(&newargs);
+ ga_clear_strings(&newlines);
+ vim_free(fp);
++ vim_free(pt);
+ eval_lavars_used = old_eval_lavars;
+ return FAIL;
+ }
+*** ../vim-8.1.0916/src/version.c 2019-02-14 13:28:42.143415639 +0100
+--- src/version.c 2019-02-14 13:41:03.744014487 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 917,
+ /**/
+
+--
+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.0918 b/data/vim/patches/8.1.0918
new file mode 100644
index 000000000..e7e36712d
--- /dev/null
+++ b/data/vim/patches/8.1.0918
@@ -0,0 +1,430 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0918
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0918
+Problem: MS-Windows: startup messages are not converted.
+Solution: Convert messages when the current codepage differs from
+ 'encoding'. (Yasuhiro Matsumoto, closes #3914)
+Files: src/message.c, src/os_mswin.c, src/vim.h
+
+
+*** ../vim-8.1.0917/src/message.c 2019-01-24 17:59:35.135217476 +0100
+--- src/message.c 2019-02-14 14:04:44.531851174 +0100
+***************
+*** 2570,2626 ****
+ msg_puts_printf(char_u *str, int maxlen)
+ {
+ char_u *s = str;
+! char_u buf[4];
+! char_u *p;
+! #ifdef WIN3264
+! # if !defined(FEAT_GUI_MSWIN)
+! char_u *ccp = NULL;
+
+! # endif
+ if (!(silent_mode && p_verbose == 0))
+! mch_settmode(TMODE_COOK); /* handle '\r' and '\n' correctly */
+!
+! # if !defined(FEAT_GUI_MSWIN)
+! if (enc_codepage >= 0 && (int)GetConsoleCP() != enc_codepage)
+! {
+! int inlen = (int)STRLEN(str);
+! int outlen;
+! WCHAR *widestr = (WCHAR *)enc_to_utf16(str, &inlen);
+!
+! if (widestr != NULL)
+! {
+! WideCharToMultiByte_alloc(GetConsoleCP(), 0, widestr, inlen,
+! (LPSTR *)&ccp, &outlen, 0, 0);
+! vim_free(widestr);
+! s = str = ccp;
+! }
+! }
+! # endif
+ #endif
+ while ((maxlen < 0 || (int)(s - str) < maxlen) && *s != NUL)
+ {
+ if (!(silent_mode && p_verbose == 0))
+ {
+! /* NL --> CR NL translation (for Unix, not for "--version") */
+! p = &buf[0];
+! if (*s == '\n' && !info_message)
+! *p++ = '\r';
+! #if defined(USE_CR)
+! else
+ #endif
+! *p++ = *s;
+! *p = '\0';
+! if (info_message) /* informative message, not an error */
+! mch_msg((char *)buf);
+! else
+! mch_errmsg((char *)buf);
+ }
+
+! /* primitive way to compute the current column */
+ #ifdef FEAT_RIGHTLEFT
+ if (cmdmsg_rl)
+ {
+! if (*s == '\r' || *s == '\n')
+ msg_col = Columns - 1;
+ else
+ --msg_col;
+--- 2570,2614 ----
+ msg_puts_printf(char_u *str, int maxlen)
+ {
+ char_u *s = str;
+! char_u *buf = NULL;
+! char_u *p = s;
+
+! #ifdef WIN3264
+ if (!(silent_mode && p_verbose == 0))
+! mch_settmode(TMODE_COOK); /* handle CR and NL correctly */
+ #endif
+ while ((maxlen < 0 || (int)(s - str) < maxlen) && *s != NUL)
+ {
+ if (!(silent_mode && p_verbose == 0))
+ {
+! // NL --> CR NL translation (for Unix, not for "--version")
+! if (*s == NL)
+! {
+! int n = (int)(s - p);
+!
+! buf = alloc(n + 3);
+! memcpy(buf, p, n);
+! if (!info_message)
+! buf[n++] = CAR;
+! #ifdef USE_CR
+! else
+ #endif
+! buf[n++] = NL;
+! buf[n++] = NUL;
+! if (info_message) // informative message, not an error
+! mch_msg((char *)buf);
+! else
+! mch_errmsg((char *)buf);
+! vim_free(buf);
+! p = s + 1;
+! }
+ }
+
+! // primitive way to compute the current column
+ #ifdef FEAT_RIGHTLEFT
+ if (cmdmsg_rl)
+ {
+! if (*s == CAR || *s == NL)
+ msg_col = Columns - 1;
+ else
+ --msg_col;
+***************
+*** 2628,2646 ****
+ else
+ #endif
+ {
+! if (*s == '\r' || *s == '\n')
+ msg_col = 0;
+ else
+ ++msg_col;
+ }
+ ++s;
+ }
+! msg_didout = TRUE; /* assume that line is not empty */
+
+ #ifdef WIN3264
+- # if !defined(FEAT_GUI_MSWIN)
+- vim_free(ccp);
+- # endif
+ if (!(silent_mode && p_verbose == 0))
+ mch_settmode(TMODE_RAW);
+ #endif
+--- 2616,2642 ----
+ else
+ #endif
+ {
+! if (*s == CAR || *s == NL)
+ msg_col = 0;
+ else
+ ++msg_col;
+ }
+ ++s;
+ }
+!
+! if (*p != NUL && !(silent_mode && p_verbose == 0))
+! {
+! if (maxlen > 0 && STRLEN(p) > (size_t)maxlen)
+! p[maxlen] = 0;
+! if (info_message)
+! mch_msg((char *)p);
+! else
+! mch_errmsg((char *)p);
+! }
+!
+! msg_didout = TRUE; // assume that line is not empty
+
+ #ifdef WIN3264
+ if (!(silent_mode && p_verbose == 0))
+ mch_settmode(TMODE_RAW);
+ #endif
+***************
+*** 2941,2972 ****
+ void
+ mch_errmsg(char *str)
+ {
+ int len;
+
+! #if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+ /* On Unix use stderr if it's a tty.
+ * When not going to start the GUI also use stderr.
+ * On Mac, when started from Finder, stderr is the console. */
+ if (
+! # ifdef UNIX
+! # ifdef MACOS_X
+ (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
+! # else
+ isatty(2)
+! # endif
+! # ifdef FEAT_GUI
+ ||
+ # endif
+! # endif
+! # ifdef FEAT_GUI
+ !(gui.in_use || gui.starting)
+! # endif
+ )
+ {
+ fprintf(stderr, "%s", str);
+ return;
+ }
+! #endif
+
+ /* avoid a delay for a message that isn't there */
+ emsg_on_display = FALSE;
+--- 2937,2987 ----
+ void
+ mch_errmsg(char *str)
+ {
++ #if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
++ int len = STRLEN(str);
++ DWORD nwrite = 0;
++ DWORD mode = 0;
++ HANDLE h = GetStdHandle(STD_ERROR_HANDLE);
++
++ if (GetConsoleMode(h, &mode) && enc_codepage >= 0
++ && (int)GetConsoleCP() != enc_codepage)
++ {
++ WCHAR *w = enc_to_utf16((char_u *)str, &len);
++
++ WriteConsoleW(h, w, len, &nwrite, NULL);
++ vim_free(w);
++ }
++ else
++ {
++ fprintf(stderr, "%s", str);
++ }
++ #else
+ int len;
+
+! # if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+ /* On Unix use stderr if it's a tty.
+ * When not going to start the GUI also use stderr.
+ * On Mac, when started from Finder, stderr is the console. */
+ if (
+! # ifdef UNIX
+! # ifdef MACOS_X
+ (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
+! # else
+ isatty(2)
+! # endif
+! # ifdef FEAT_GUI
+ ||
++ # endif
+ # endif
+! # ifdef FEAT_GUI
+ !(gui.in_use || gui.starting)
+! # endif
+ )
+ {
+ fprintf(stderr, "%s", str);
+ return;
+ }
+! # endif
+
+ /* avoid a delay for a message that isn't there */
+ emsg_on_display = FALSE;
+***************
+*** 2981,2987 ****
+ {
+ mch_memmove((char_u *)error_ga.ga_data + error_ga.ga_len,
+ (char_u *)str, len);
+! #ifdef UNIX
+ /* remove CR characters, they are displayed */
+ {
+ char_u *p;
+--- 2996,3002 ----
+ {
+ mch_memmove((char_u *)error_ga.ga_data + error_ga.ga_len,
+ (char_u *)str, len);
+! # ifdef UNIX
+ /* remove CR characters, they are displayed */
+ {
+ char_u *p;
+***************
+*** 2995,3004 ****
+ *p = ' ';
+ }
+ }
+! #endif
+ --len; /* don't count the NUL at the end */
+ error_ga.ga_len += len;
+ }
+ }
+
+ /*
+--- 3010,3020 ----
+ *p = ' ';
+ }
+ }
+! # endif
+ --len; /* don't count the NUL at the end */
+ error_ga.ga_len += len;
+ }
++ #endif
+ }
+
+ /*
+***************
+*** 3009,3015 ****
+ void
+ mch_msg(char *str)
+ {
+! #if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+ /* On Unix use stdout if we have a tty. This allows "vim -h | more" and
+ * uses mch_errmsg() when started from the desktop.
+ * When not going to start the GUI also use stdout.
+--- 3025,3051 ----
+ void
+ mch_msg(char *str)
+ {
+! #if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
+! int len = STRLEN(str);
+! DWORD nwrite = 0;
+! DWORD mode;
+! HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
+!
+!
+! if (GetConsoleMode(h, &mode) && enc_codepage >= 0
+! && (int)GetConsoleCP() != enc_codepage)
+! {
+! WCHAR *w = enc_to_utf16((char_u *)str, &len);
+!
+! WriteConsoleW(h, w, len, &nwrite, NULL);
+! vim_free(w);
+! }
+! else
+! {
+! printf("%s", str);
+! }
+! #else
+! # if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+ /* On Unix use stdout if we have a tty. This allows "vim -h | more" and
+ * uses mch_errmsg() when started from the desktop.
+ * When not going to start the GUI also use stdout.
+***************
+*** 3035,3040 ****
+--- 3071,3077 ----
+ }
+ # endif
+ mch_errmsg(str);
++ #endif
+ }
+ #endif /* USE_MCH_ERRMSG */
+
+*** ../vim-8.1.0917/src/os_mswin.c 2019-02-12 23:12:33.600730918 +0100
+--- src/os_mswin.c 2019-02-14 13:48:22.873645483 +0100
+***************
+*** 675,680 ****
+--- 675,681 ----
+ # undef display_errors
+ #endif
+
++ #ifdef FEAT_GUI
+ /*
+ * Display the saved error message(s).
+ */
+***************
+*** 690,702 ****
+ if (!isspace(*p))
+ {
+ (void)gui_mch_dialog(
+- #ifdef FEAT_GUI
+ gui.starting ? VIM_INFO :
+- #endif
+ VIM_ERROR,
+- #ifdef FEAT_GUI
+ gui.starting ? (char_u *)_("Message") :
+- #endif
+ (char_u *)_("Error"),
+ (char_u *)p, (char_u *)_("&Ok"),
+ 1, NULL, FALSE);
+--- 691,699 ----
+***************
+*** 705,710 ****
+--- 702,714 ----
+ ga_clear(&error_ga);
+ }
+ }
++ #else
++ void
++ display_errors(void)
++ {
++ FlushFileBuffers(GetStdHandle(STD_ERROR_HANDLE));
++ }
++ #endif
+ #endif
+
+
+*** ../vim-8.1.0917/src/vim.h 2019-02-01 20:42:18.718884011 +0100
+--- src/vim.h 2019-02-14 13:48:22.873645483 +0100
+***************
+*** 2093,2099 ****
+ * functions of these names. The declarations would break if the defines had
+ * been seen at that stage. But it must be before globals.h, where error_ga
+ * is declared. */
+! #if !defined(FEAT_GUI_W32) && !defined(FEAT_GUI_X11) \
+ && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MAC) && !defined(PROTO)
+ # define mch_errmsg(str) fprintf(stderr, "%s", (str))
+ # define display_errors() fflush(stderr)
+--- 2093,2099 ----
+ * functions of these names. The declarations would break if the defines had
+ * been seen at that stage. But it must be before globals.h, where error_ga
+ * is declared. */
+! #if !defined(MSWIN) && !defined(FEAT_GUI_X11) \
+ && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MAC) && !defined(PROTO)
+ # define mch_errmsg(str) fprintf(stderr, "%s", (str))
+ # define display_errors() fflush(stderr)
+*** ../vim-8.1.0917/src/version.c 2019-02-14 13:43:33.779220100 +0100
+--- src/version.c 2019-02-14 13:49:48.741169891 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 918,
+ /**/
+
+--
+BODY: I'm not dead!
+CART DRIVER: 'Ere. He says he's not dead.
+LARGE MAN: Yes he is.
+BODY: I'm not!
+ "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.0919 b/data/vim/patches/8.1.0919
new file mode 100644
index 000000000..6975d121a
--- /dev/null
+++ b/data/vim/patches/8.1.0919
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0919
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0919
+Problem: Compiler warnings.
+Solution: Add type casts. (Mike Williams)
+Files: src/message.c, src/regexp_nfa.c
+
+*** ../vim-8.1.0918/src/message.c 2019-02-14 14:08:01.178543302 +0100
+--- src/message.c 2019-02-14 20:53:24.996364798 +0100
+***************
+*** 2938,2944 ****
+ mch_errmsg(char *str)
+ {
+ #if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
+! int len = STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode = 0;
+ HANDLE h = GetStdHandle(STD_ERROR_HANDLE);
+--- 2938,2944 ----
+ mch_errmsg(char *str)
+ {
+ #if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
+! int len = (int)STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode = 0;
+ HANDLE h = GetStdHandle(STD_ERROR_HANDLE);
+***************
+*** 3026,3032 ****
+ mch_msg(char *str)
+ {
+ #if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
+! int len = STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode;
+ HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
+--- 3026,3032 ----
+ mch_msg(char *str)
+ {
+ #if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
+! int len = (int)STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode;
+ HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
+*** ../vim-8.1.0918/src/regexp_nfa.c 2019-02-13 21:47:32.961109662 +0100
+--- src/regexp_nfa.c 2019-02-14 20:53:42.128264616 +0100
+***************
+*** 4800,4806 ****
+ emsg(_(e_maxmempat));
+ return NULL;
+ }
+! newl = (nfa_thread_T *)alloc(newsize);
+ if (newl == NULL)
+ return NULL;
+ l->len = newlen;
+--- 4800,4806 ----
+ emsg(_(e_maxmempat));
+ return NULL;
+ }
+! newl = (nfa_thread_T *)alloc((int)newsize);
+ if (newl == NULL)
+ return NULL;
+ l->len = newlen;
+*** ../vim-8.1.0918/src/version.c 2019-02-14 14:08:01.178543302 +0100
+--- src/version.c 2019-02-14 20:52:16.592766813 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 919,
+ /**/
+
+--
+"Lisp has all the visual appeal of oatmeal with nail clippings thrown in."
+ -- Larry Wall
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0920 b/data/vim/patches/8.1.0920
new file mode 100644
index 000000000..50274bb59
--- /dev/null
+++ b/data/vim/patches/8.1.0920
@@ -0,0 +1,532 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0920
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0920
+Problem: In Terminal-Normal mode job output messes up the window.
+Solution: Postpone scrolling and updating the buffer when in Terminal-Normal
+ mode.
+Files: src/terminal.c, src/testdir/test_terminal.vim,
+ src/testdir/dumps/Test_terminal_01.dump,
+ src/testdir/dumps/Test_terminal_02.dump,
+ src/testdir/dumps/Test_terminal_03.dump
+
+
+*** ../vim-8.1.0919/src/terminal.c 2019-02-13 21:22:09.550765502 +0100
+--- src/terminal.c 2019-02-14 20:34:24.818554685 +0100
+***************
+*** 60,68 ****
+ } cellattr_T;
+
+ typedef struct sb_line_S {
+! int sb_cols; /* can differ per line */
+! cellattr_T *sb_cells; /* allocated */
+! cellattr_T sb_fill_attr; /* for short line */
+ } sb_line_T;
+
+ #ifdef WIN3264
+--- 60,69 ----
+ } cellattr_T;
+
+ typedef struct sb_line_S {
+! int sb_cols; // can differ per line
+! cellattr_T *sb_cells; // allocated
+! cellattr_T sb_fill_attr; // for short line
+! char_u *sb_text; // for tl_scrollback_postponed
+ } sb_line_T;
+
+ #ifdef WIN3264
+***************
+*** 144,149 ****
+--- 145,152 ----
+
+ garray_T tl_scrollback;
+ int tl_scrollback_scrolled;
++ garray_T tl_scrollback_postponed;
++
+ cellattr_T tl_default_color;
+
+ linenr_T tl_top_diff_rows; /* rows of top diff file or zero */
+***************
+*** 188,193 ****
+--- 191,198 ----
+ static void update_system_term(term_T *term);
+ #endif
+
++ static void handle_postponed_scrollback(term_T *term);
++
+ /* The character that we know (or assume) that the terminal expects for the
+ * backspace key. */
+ static int term_backspace_char = BS;
+***************
+*** 419,424 ****
+--- 424,430 ----
+ term->tl_system = (flags & TERM_START_SYSTEM);
+ #endif
+ ga_init2(&term->tl_scrollback, sizeof(sb_line_T), 300);
++ ga_init2(&term->tl_scrollback_postponed, sizeof(sb_line_T), 300);
+
+ vim_memset(&split_ea, 0, sizeof(split_ea));
+ if (opt->jo_curwin)
+***************
+*** 852,857 ****
+--- 858,866 ----
+ for (i = 0; i < term->tl_scrollback.ga_len; ++i)
+ vim_free(((sb_line_T *)term->tl_scrollback.ga_data + i)->sb_cells);
+ ga_clear(&term->tl_scrollback);
++ for (i = 0; i < term->tl_scrollback_postponed.ga_len; ++i)
++ vim_free(((sb_line_T *)term->tl_scrollback_postponed.ga_data + i)->sb_cells);
++ ga_clear(&term->tl_scrollback_postponed);
+ }
+
+
+***************
+*** 1770,1779 ****
+--- 1779,1795 ----
+ }
+ #endif
+
++ /*
++ * When "normal_mode" is TRUE set the terminal to Terminal-Normal mode,
++ * otherwise end it.
++ */
+ static void
+ set_terminal_mode(term_T *term, int normal_mode)
+ {
++ ch_log(NULL, "set_terminal_mode(): %d", normal_mode);
+ term->tl_normal_mode = normal_mode;
++ if (!normal_mode)
++ handle_postponed_scrollback(term);
+ VIM_CLEAR(term->tl_status_text);
+ if (term->tl_buffer == curbuf)
+ maketitle();
+***************
+*** 1786,1795 ****
+ static void
+ cleanup_vterm(term_T *term)
+ {
+ if (term->tl_finish != TL_FINISH_CLOSE)
+ may_move_terminal_to_buffer(term, TRUE);
+ term_free_vterm(term);
+- set_terminal_mode(term, FALSE);
+ }
+
+ /*
+--- 1802,1811 ----
+ static void
+ cleanup_vterm(term_T *term)
+ {
++ set_terminal_mode(term, FALSE);
+ if (term->tl_finish != TL_FINISH_CLOSE)
+ may_move_terminal_to_buffer(term, TRUE);
+ term_free_vterm(term);
+ }
+
+ /*
+***************
+*** 2791,2810 ****
+ }
+
+ /*
+! * Handle a line that is pushed off the top of the screen.
+ */
+! static int
+! handle_pushline(int cols, const VTermScreenCell *cells, void *user)
+ {
+! term_T *term = (term_T *)user;
+!
+! /* First remove the lines that were appended before, the pushed line goes
+! * above it. */
+! cleanup_scrollback(term);
+!
+! /* If the number of lines that are stored goes over 'termscrollback' then
+! * delete the first 10%. */
+! if (term->tl_scrollback.ga_len >= term->tl_buffer->b_p_twsl)
+ {
+ int todo = term->tl_buffer->b_p_twsl / 10;
+ int i;
+--- 2807,2821 ----
+ }
+
+ /*
+! * If the number of lines that are stored goes over 'termscrollback' then
+! * delete the first 10%.
+! * "gap" points to tl_scrollback or tl_scrollback_postponed.
+! * "update_buffer" is TRUE when the buffer should be updated.
+ */
+! static void
+! limit_scrollback(term_T *term, garray_T *gap, int update_buffer)
+ {
+! if (gap->ga_len >= term->tl_buffer->b_p_twsl)
+ {
+ int todo = term->tl_buffer->b_p_twsl / 10;
+ int i;
+***************
+*** 2812,2841 ****
+ curbuf = term->tl_buffer;
+ for (i = 0; i < todo; ++i)
+ {
+! vim_free(((sb_line_T *)term->tl_scrollback.ga_data + i)->sb_cells);
+! ml_delete(1, FALSE);
+ }
+ curbuf = curwin->w_buffer;
+
+! term->tl_scrollback.ga_len -= todo;
+! mch_memmove(term->tl_scrollback.ga_data,
+! (sb_line_T *)term->tl_scrollback.ga_data + todo,
+! sizeof(sb_line_T) * term->tl_scrollback.ga_len);
+! term->tl_scrollback_scrolled -= todo;
+ }
+
+! if (ga_grow(&term->tl_scrollback, 1) == OK)
+ {
+ cellattr_T *p = NULL;
+ int len = 0;
+ int i;
+ int c;
+ int col;
+ sb_line_T *line;
+ garray_T ga;
+ cellattr_T fill_attr = term->tl_default_color;
+
+! /* do not store empty cells at the end */
+ for (i = 0; i < cols; ++i)
+ if (cells[i].chars[0] != 0)
+ len = i + 1;
+--- 2823,2887 ----
+ curbuf = term->tl_buffer;
+ for (i = 0; i < todo; ++i)
+ {
+! vim_free(((sb_line_T *)gap->ga_data + i)->sb_cells);
+! if (update_buffer)
+! ml_delete(1, FALSE);
+ }
+ curbuf = curwin->w_buffer;
+
+! gap->ga_len -= todo;
+! mch_memmove(gap->ga_data,
+! (sb_line_T *)gap->ga_data + todo,
+! sizeof(sb_line_T) * gap->ga_len);
+! if (update_buffer)
+! term->tl_scrollback_scrolled -= todo;
+ }
++ }
+
+! /*
+! * Handle a line that is pushed off the top of the screen.
+! */
+! static int
+! handle_pushline(int cols, const VTermScreenCell *cells, void *user)
+! {
+! term_T *term = (term_T *)user;
+! garray_T *gap;
+! int update_buffer;
+!
+! if (term->tl_normal_mode)
+! {
+! // In Terminal-Normal mode the user interacts with the buffer, thus we
+! // must not change it. Postpone adding the scrollback lines.
+! gap = &term->tl_scrollback_postponed;
+! update_buffer = FALSE;
+! ch_log(NULL, "handle_pushline(): add to postponed");
+! }
+! else
+! {
+! // First remove the lines that were appended before, the pushed line
+! // goes above it.
+! cleanup_scrollback(term);
+! gap = &term->tl_scrollback;
+! update_buffer = TRUE;
+! ch_log(NULL, "handle_pushline(): add to window");
+! }
+!
+! limit_scrollback(term, gap, update_buffer);
+!
+! if (ga_grow(gap, 1) == OK)
+ {
+ cellattr_T *p = NULL;
+ int len = 0;
+ int i;
+ int c;
+ int col;
++ int text_len;
++ char_u *text;
+ sb_line_T *line;
+ garray_T ga;
+ cellattr_T fill_attr = term->tl_default_color;
+
+! // do not store empty cells at the end
+ for (i = 0; i < cols; ++i)
+ if (cells[i].chars[0] != 0)
+ len = i + 1;
+***************
+*** 2861,2885 ****
+ }
+ }
+ if (ga_grow(&ga, 1) == FAIL)
+! add_scrollback_line_to_buffer(term, (char_u *)"", 0);
+ else
+ {
+! *((char_u *)ga.ga_data + ga.ga_len) = NUL;
+! add_scrollback_line_to_buffer(term, ga.ga_data, ga.ga_len);
+ }
+! ga_clear(&ga);
+
+! line = (sb_line_T *)term->tl_scrollback.ga_data
+! + term->tl_scrollback.ga_len;
+ line->sb_cols = len;
+ line->sb_cells = p;
+ line->sb_fill_attr = fill_attr;
+! ++term->tl_scrollback.ga_len;
+! ++term->tl_scrollback_scrolled;
+ }
+ return 0; /* ignored */
+ }
+
+ static VTermScreenCallbacks screen_callbacks = {
+ handle_damage, /* damage */
+ handle_moverect, /* moverect */
+--- 2907,2992 ----
+ }
+ }
+ if (ga_grow(&ga, 1) == FAIL)
+! {
+! if (update_buffer)
+! text = (char_u *)"";
+! else
+! text = vim_strsave((char_u *)"");
+! text_len = 0;
+! }
+ else
+ {
+! text = ga.ga_data;
+! text_len = ga.ga_len;
+! *(text + text_len) = NUL;
+ }
+! if (update_buffer)
+! add_scrollback_line_to_buffer(term, text, text_len);
+
+! line = (sb_line_T *)gap->ga_data + gap->ga_len;
+ line->sb_cols = len;
+ line->sb_cells = p;
+ line->sb_fill_attr = fill_attr;
+! if (update_buffer)
+! {
+! line->sb_text = NULL;
+! ++term->tl_scrollback_scrolled;
+! ga_clear(&ga); // free the text
+! }
+! else
+! {
+! line->sb_text = text;
+! ga_init(&ga); // text is kept in tl_scrollback_postponed
+! }
+! ++gap->ga_len;
+ }
+ return 0; /* ignored */
+ }
+
++ /*
++ * Called when leaving Terminal-Normal mode: deal with any scrollback that was
++ * received and stored in tl_scrollback_postponed.
++ */
++ static void
++ handle_postponed_scrollback(term_T *term)
++ {
++ int i;
++
++ ch_log(NULL, "Moving postponed scrollback to scrollback");
++ // First remove the lines that were appended before, the pushed lines go
++ // above it.
++ cleanup_scrollback(term);
++
++ for (i = 0; i < term->tl_scrollback_postponed.ga_len; ++i)
++ {
++ char_u *text;
++ sb_line_T *pp_line;
++ sb_line_T *line;
++
++ if (ga_grow(&term->tl_scrollback, 1) == FAIL)
++ break;
++ pp_line = (sb_line_T *)term->tl_scrollback_postponed.ga_data + i;
++
++ text = pp_line->sb_text;
++ if (text == NULL)
++ text = (char_u *)"";
++ add_scrollback_line_to_buffer(term, text, (int)STRLEN(text));
++ vim_free(pp_line->sb_text);
++
++ line = (sb_line_T *)term->tl_scrollback.ga_data
++ + term->tl_scrollback.ga_len;
++ line->sb_cols = pp_line->sb_cols;
++ line->sb_cells = pp_line->sb_cells;
++ line->sb_fill_attr = pp_line->sb_fill_attr;
++ line->sb_text = NULL;
++ ++term->tl_scrollback_scrolled;
++ ++term->tl_scrollback.ga_len;
++ }
++
++ ga_clear(&term->tl_scrollback_postponed);
++ limit_scrollback(term, &term->tl_scrollback, TRUE);
++ }
++
+ static VTermScreenCallbacks screen_callbacks = {
+ handle_damage, /* damage */
+ handle_moverect, /* moverect */
+*** ../vim-8.1.0919/src/testdir/test_terminal.vim 2019-02-03 14:52:42.505867463 +0100
+--- src/testdir/test_terminal.vim 2019-02-14 21:14:12.321329398 +0100
+***************
+*** 299,304 ****
+--- 299,342 ----
+ call term_wait(buf)
+ exe buf . 'bwipe'
+ set termwinscroll&
++ call delete('Xtext')
++ endfunc
++
++ func Test_terminal_postponed_scrollback()
++ if !has('unix')
++ " tail -f only works on Unix
++ return
++ endif
++
++ call writefile(range(50), 'Xtext')
++ call writefile([
++ \ 'terminal',
++ \ 'call feedkeys("tail -n 100 -f Xtext\<CR>", "xt")',
++ \ 'sleep 100m',
++ \ 'call feedkeys("\<C-W>N", "xt")',
++ \ ], 'XTest_postponed')
++ let buf = RunVimInTerminal('-S XTest_postponed', {})
++ " Check that the Xtext lines are displayed and in Terminal-Normal mode
++ call VerifyScreenDump(buf, 'Test_terminal_01', {})
++
++ silent !echo 'one more line' >>Xtext
++ " Sceen will not change, move cursor to get a different dump
++ call term_sendkeys(buf, "k")
++ call VerifyScreenDump(buf, 'Test_terminal_02', {})
++
++ " Back to Terminal-Job mode, text will scroll and show the extra line.
++ call term_sendkeys(buf, "a")
++ call VerifyScreenDump(buf, 'Test_terminal_03', {})
++
++ call term_wait(buf)
++ call term_sendkeys(buf, "\<C-C>")
++ call term_wait(buf)
++ call term_sendkeys(buf, "exit\<CR>")
++ call term_wait(buf)
++ call term_sendkeys(buf, ":q\<CR>")
++ call StopVimInTerminal(buf)
++ call delete('XTest_postponed')
++ call delete('Xtext')
+ endfunc
+
+ func Test_terminal_size()
+***************
+*** 1512,1517 ****
+--- 1550,1557 ----
+ let job = term_getjob(buf)
+ call feedkeys("\<C-L>\<C-C>", 'tx')
+ call WaitForAssert({-> assert_equal("dead", job_status(job))})
++
++ set termwinkey&
+ endfunc
+
+ func Test_terminal_out_err()
+*** ../vim-8.1.0919/src/testdir/dumps/Test_terminal_01.dump 2019-02-14 21:20:49.403132067 +0100
+--- src/testdir/dumps/Test_terminal_01.dump 2019-02-14 20:42:57.171827885 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |4+0&#ffffff0|2| @72
++ |4|3| @72
++ |4@1| @72
++ |4|5| @72
++ |4|6| @72
++ |4|7| @72
++ |4|8| @72
++ >4|9| @72
++ |~+0#4040ff13&| @73
++ |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|T|e|r|m|i|n|a|l|]| @35|5|2|,|1| @10|B|o|t
++ | +0#0000000#ffffff0@74
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
++ | +0&&@74
+*** ../vim-8.1.0919/src/testdir/dumps/Test_terminal_02.dump 2019-02-14 21:20:49.407132044 +0100
+--- src/testdir/dumps/Test_terminal_02.dump 2019-02-14 20:42:58.223822224 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |4+0&#ffffff0|2| @72
++ |4|3| @72
++ |4@1| @72
++ |4|5| @72
++ |4|6| @72
++ |4|7| @72
++ >4|8| @72
++ |4|9| @72
++ |~+0#4040ff13&| @73
++ |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|T|e|r|m|i|n|a|l|]| @35|5|1|,|1| @10|B|o|t
++ | +0#0000000#ffffff0@74
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
++ | +0&&@74
+*** ../vim-8.1.0919/src/testdir/dumps/Test_terminal_03.dump 2019-02-14 21:20:49.411132020 +0100
+--- src/testdir/dumps/Test_terminal_03.dump 2019-02-14 20:42:59.275816565 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |4+0&#ffffff0|3| @72
++ |4@1| @72
++ |4|5| @72
++ |4|6| @72
++ |4|7| @72
++ |4|8| @72
++ |4|9| @72
++ |o|n|e| |m|o|r|e| |l|i|n|e| @61
++ > @74
++ |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|r|u|n@1|i|n|g|]| @36|4@1|,|1| @10|B|o|t
++ | +0#0000000#ffffff0@74
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
++ | +0&&@74
+*** ../vim-8.1.0919/src/version.c 2019-02-14 20:55:05.983776869 +0100
+--- src/version.c 2019-02-14 21:18:37.959858765 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 920,
+ /**/
+
+--
+Looking at Perl through Lisp glasses, Perl looks atrocious.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0921 b/data/vim/patches/8.1.0921
new file mode 100644
index 000000000..6f2952232
--- /dev/null
+++ b/data/vim/patches/8.1.0921
@@ -0,0 +1,124 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0921
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0921
+Problem: Terminal test sometimes fails; using memory after free.
+Solution: Fee memory a bit later. Add test to cover this. Disable flaky
+ screenshot test. (closes #3956)
+Files: src/terminal.c, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0920/src/terminal.c 2019-02-14 21:21:34.414883327 +0100
+--- src/terminal.c 2019-02-14 22:49:37.140257786 +0100
+***************
+*** 4735,4741 ****
+ p2 += len2;
+ /* TODO: handle different width */
+ }
+- vim_free(line1);
+
+ while (col < width)
+ {
+--- 4735,4740 ----
+***************
+*** 4753,4758 ****
+--- 4752,4759 ----
+ }
+ ++col;
+ }
++
++ vim_free(line1);
+ }
+ if (add_empty_scrollback(term, &term->tl_default_color,
+ term->tl_top_diff_rows) == OK)
+*** ../vim-8.1.0920/src/testdir/test_terminal.vim 2019-02-14 21:21:34.414883327 +0100
+--- src/testdir/test_terminal.vim 2019-02-14 23:22:46.984586183 +0100
+***************
+*** 317,332 ****
+ \ ], 'XTest_postponed')
+ let buf = RunVimInTerminal('-S XTest_postponed', {})
+ " Check that the Xtext lines are displayed and in Terminal-Normal mode
+! call VerifyScreenDump(buf, 'Test_terminal_01', {})
+
+ silent !echo 'one more line' >>Xtext
+ " Sceen will not change, move cursor to get a different dump
+ call term_sendkeys(buf, "k")
+! call VerifyScreenDump(buf, 'Test_terminal_02', {})
+
+ " Back to Terminal-Job mode, text will scroll and show the extra line.
+ call term_sendkeys(buf, "a")
+! call VerifyScreenDump(buf, 'Test_terminal_03', {})
+
+ call term_wait(buf)
+ call term_sendkeys(buf, "\<C-C>")
+--- 317,338 ----
+ \ ], 'XTest_postponed')
+ let buf = RunVimInTerminal('-S XTest_postponed', {})
+ " Check that the Xtext lines are displayed and in Terminal-Normal mode
+! call term_wait(buf)
+! " TODO: this sometimes fails
+! "call VerifyScreenDump(buf, 'Test_terminal_01', {})
+
+ silent !echo 'one more line' >>Xtext
+ " Sceen will not change, move cursor to get a different dump
+ call term_sendkeys(buf, "k")
+! call term_wait(buf)
+! " TODO: this sometimes fails
+! "call VerifyScreenDump(buf, 'Test_terminal_02', {})
+
+ " Back to Terminal-Job mode, text will scroll and show the extra line.
+ call term_sendkeys(buf, "a")
+! call term_wait(buf)
+! " TODO: this sometimes fails
+! "call VerifyScreenDump(buf, 'Test_terminal_03', {})
+
+ call term_wait(buf)
+ call term_sendkeys(buf, "\<C-C>")
+***************
+*** 339,344 ****
+--- 345,362 ----
+ call delete('Xtext')
+ endfunc
+
++ " Run diff on two dumps with different size.
++ func Test_terminal_dumpdiff_size()
++ call assert_equal(1, winnr('$'))
++ call term_dumpdiff('dumps/Test_incsearch_search_01.dump', 'dumps/Test_popup_command_01.dump')
++ call assert_equal(2, winnr('$'))
++ call assert_match('Test_incsearch_search_01.dump', getline(10))
++ call assert_match(' +++++$', getline(11))
++ call assert_match('Test_popup_command_01.dump', getline(31))
++ call assert_equal(repeat('+', 75), getline(30))
++ quit
++ endfunc
++
+ func Test_terminal_size()
+ let cmd = Get_cat_123_cmd()
+
+*** ../vim-8.1.0920/src/version.c 2019-02-14 21:21:34.414883327 +0100
+--- src/version.c 2019-02-14 23:21:21.813257592 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 921,
+ /**/
+
+--
+DENNIS: Oh, very nice. King, eh! I expect you've got a palace and fine
+ clothes and courtiers and plenty of food. And how d'you get that? By
+ exploiting the workers! By hanging on to outdated imperialist dogma
+ which perpetuates the social and economic differences in our society!
+ "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.0922 b/data/vim/patches/8.1.0922
new file mode 100644
index 000000000..a06ddab05
--- /dev/null
+++ b/data/vim/patches/8.1.0922
@@ -0,0 +1,149 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0922
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0922
+Problem: Terminal scrollback test is flaky.
+Solution: Wait a bit before running the tail command.
+Files: src/testdir/test_terminal.vim,
+ src/testdir/dumps/Test_terminal_01.dump,
+ src/testdir/dumps/Test_terminal_02.dump,
+ src/testdir/dumps/Test_terminal_03.dump
+
+
+*** ../vim-8.1.0921/src/testdir/test_terminal.vim 2019-02-14 23:23:16.000358261 +0100
+--- src/testdir/test_terminal.vim 2019-02-14 23:48:10.677737578 +0100
+***************
+*** 311,316 ****
+--- 311,317 ----
+ call writefile(range(50), 'Xtext')
+ call writefile([
+ \ 'terminal',
++ \ 'sleep 100m',
+ \ 'call feedkeys("tail -n 100 -f Xtext\<CR>", "xt")',
+ \ 'sleep 100m',
+ \ 'call feedkeys("\<C-W>N", "xt")',
+***************
+*** 318,338 ****
+ let buf = RunVimInTerminal('-S XTest_postponed', {})
+ " Check that the Xtext lines are displayed and in Terminal-Normal mode
+ call term_wait(buf)
+! " TODO: this sometimes fails
+! "call VerifyScreenDump(buf, 'Test_terminal_01', {})
+
+ silent !echo 'one more line' >>Xtext
+ " Sceen will not change, move cursor to get a different dump
+ call term_sendkeys(buf, "k")
+ call term_wait(buf)
+! " TODO: this sometimes fails
+! "call VerifyScreenDump(buf, 'Test_terminal_02', {})
+
+ " Back to Terminal-Job mode, text will scroll and show the extra line.
+ call term_sendkeys(buf, "a")
+ call term_wait(buf)
+! " TODO: this sometimes fails
+! "call VerifyScreenDump(buf, 'Test_terminal_03', {})
+
+ call term_wait(buf)
+ call term_sendkeys(buf, "\<C-C>")
+--- 319,336 ----
+ let buf = RunVimInTerminal('-S XTest_postponed', {})
+ " Check that the Xtext lines are displayed and in Terminal-Normal mode
+ call term_wait(buf)
+! call VerifyScreenDump(buf, 'Test_terminal_01', {})
+
+ silent !echo 'one more line' >>Xtext
+ " Sceen will not change, move cursor to get a different dump
+ call term_sendkeys(buf, "k")
+ call term_wait(buf)
+! call VerifyScreenDump(buf, 'Test_terminal_02', {})
+
+ " Back to Terminal-Job mode, text will scroll and show the extra line.
+ call term_sendkeys(buf, "a")
+ call term_wait(buf)
+! call VerifyScreenDump(buf, 'Test_terminal_03', {})
+
+ call term_wait(buf)
+ call term_sendkeys(buf, "\<C-C>")
+*** ../vim-8.1.0921/src/testdir/dumps/Test_terminal_01.dump 2019-02-14 21:21:34.414883327 +0100
+--- src/testdir/dumps/Test_terminal_01.dump 2019-02-14 23:45:31.978649976 +0100
+***************
+*** 7,13 ****
+ |4|8| @72
+ >4|9| @72
+ |~+0#4040ff13&| @73
+! |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|T|e|r|m|i|n|a|l|]| @35|5|2|,|1| @10|B|o|t
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+--- 7,13 ----
+ |4|8| @72
+ >4|9| @72
+ |~+0#4040ff13&| @73
+! |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|T|e|r|m|i|n|a|l|]| @35|5|1|,|1| @10|B|o|t
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+*** ../vim-8.1.0921/src/testdir/dumps/Test_terminal_02.dump 2019-02-14 21:21:34.414883327 +0100
+--- src/testdir/dumps/Test_terminal_02.dump 2019-02-14 23:45:33.046644100 +0100
+***************
+*** 7,13 ****
+ >4|8| @72
+ |4|9| @72
+ |~+0#4040ff13&| @73
+! |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|T|e|r|m|i|n|a|l|]| @35|5|1|,|1| @10|B|o|t
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+--- 7,13 ----
+ >4|8| @72
+ |4|9| @72
+ |~+0#4040ff13&| @73
+! |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|T|e|r|m|i|n|a|l|]| @35|5|0|,|1| @10|B|o|t
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+*** ../vim-8.1.0921/src/testdir/dumps/Test_terminal_03.dump 2019-02-14 21:21:34.414883327 +0100
+--- src/testdir/dumps/Test_terminal_03.dump 2019-02-14 23:45:34.106638264 +0100
+***************
+*** 7,13 ****
+ |4|9| @72
+ |o|n|e| |m|o|r|e| |l|i|n|e| @61
+ > @74
+! |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|r|u|n@1|i|n|g|]| @36|4@1|,|1| @10|B|o|t
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+--- 7,13 ----
+ |4|9| @72
+ |o|n|e| |m|o|r|e| |l|i|n|e| @61
+ > @74
+! |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|r|u|n@1|i|n|g|]| @36|4|3|,|1| @10|B|o|t
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+*** ../vim-8.1.0921/src/version.c 2019-02-14 23:23:16.004358230 +0100
+--- src/version.c 2019-02-14 23:47:47.197877134 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 922,
+ /**/
+
+--
+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.0923 b/data/vim/patches/8.1.0923
new file mode 100644
index 000000000..2ed506c84
--- /dev/null
+++ b/data/vim/patches/8.1.0923
@@ -0,0 +1,123 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0923
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0923
+Problem: Terminal dump diff swap does not update file names.
+Solution: Also swap the file name. Add a test.
+Files: src/terminal.c, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0922/src/terminal.c 2019-02-14 23:23:16.000358261 +0100
+--- src/terminal.c 2019-02-15 00:13:03.411505106 +0100
+***************
+*** 4816,4822 ****
+ bot_start = line_count - bot_rows;
+ sb_line = (sb_line_T *)term->tl_scrollback.ga_data;
+
+! /* move lines from top to above the bottom part */
+ for (lnum = 1; lnum <= top_rows; ++lnum)
+ {
+ p = vim_strsave(ml_get(1));
+--- 4816,4822 ----
+ bot_start = line_count - bot_rows;
+ sb_line = (sb_line_T *)term->tl_scrollback.ga_data;
+
+! // move lines from top to above the bottom part
+ for (lnum = 1; lnum <= top_rows; ++lnum)
+ {
+ p = vim_strsave(ml_get(1));
+***************
+*** 4827,4833 ****
+ vim_free(p);
+ }
+
+! /* move lines from bottom to the top */
+ for (lnum = 1; lnum <= bot_rows; ++lnum)
+ {
+ p = vim_strsave(ml_get(bot_start + lnum));
+--- 4827,4833 ----
+ vim_free(p);
+ }
+
+! // move lines from bottom to the top
+ for (lnum = 1; lnum <= bot_rows; ++lnum)
+ {
+ p = vim_strsave(ml_get(bot_start + lnum));
+***************
+*** 4838,4843 ****
+--- 4838,4859 ----
+ vim_free(p);
+ }
+
++ // move top title to bottom
++ p = vim_strsave(ml_get(bot_rows + 1));
++ if (p == NULL)
++ return OK;
++ ml_append(line_count - top_rows - 1, p, 0, FALSE);
++ ml_delete(bot_rows + 1, FALSE);
++ vim_free(p);
++
++ // move bottom title to top
++ p = vim_strsave(ml_get(line_count - top_rows));
++ if (p == NULL)
++ return OK;
++ ml_delete(line_count - top_rows, FALSE);
++ ml_append(bot_rows, p, 0, FALSE);
++ vim_free(p);
++
+ if (top_rows == bot_rows)
+ {
+ /* rows counts are equal, can swap cell properties */
+*** ../vim-8.1.0922/src/testdir/test_terminal.vim 2019-02-14 23:49:35.513222082 +0100
+--- src/testdir/test_terminal.vim 2019-02-14 23:58:17.045787751 +0100
+***************
+*** 1124,1129 ****
+--- 1124,1147 ----
+ quit
+ endfunc
+
++ func Test_terminal_dumpdiff_swap()
++ call assert_equal(1, winnr('$'))
++ call term_dumpdiff('dumps/Test_popup_command_01.dump', 'dumps/Test_popup_command_03.dump')
++ call assert_equal(2, winnr('$'))
++ call assert_equal(62, line('$'))
++ call assert_match('Test_popup_command_01.dump', getline(21))
++ call assert_match('Test_popup_command_03.dump', getline(42))
++ call assert_match('Undo', getline(3))
++ call assert_match('three four five', getline(45))
++
++ normal s
++ call assert_match('Test_popup_command_03.dump', getline(21))
++ call assert_match('Test_popup_command_01.dump', getline(42))
++ call assert_match('three four five', getline(3))
++ call assert_match('Undo', getline(45))
++ quit
++ endfunc
++
+ func Test_terminal_dumpdiff_options()
+ set laststatus=0
+ call assert_equal(1, winnr('$'))
+*** ../vim-8.1.0922/src/version.c 2019-02-14 23:49:35.513222082 +0100
+--- src/version.c 2019-02-14 23:59:52.613126996 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 923,
+ /**/
+
+--
+"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.0924 b/data/vim/patches/8.1.0924
new file mode 100644
index 000000000..c915db9a9
--- /dev/null
+++ b/data/vim/patches/8.1.0924
@@ -0,0 +1,60 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0924
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0924
+Problem: Terminal scrollback test still flaky.
+Solution: Wait a bit longer before running the tail command.
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0923/src/testdir/test_terminal.vim 2019-02-15 00:16:10.750171037 +0100
+--- src/testdir/test_terminal.vim 2019-02-15 00:24:38.218951604 +0100
+***************
+*** 311,319 ****
+ call writefile(range(50), 'Xtext')
+ call writefile([
+ \ 'terminal',
+! \ 'sleep 100m',
+ \ 'call feedkeys("tail -n 100 -f Xtext\<CR>", "xt")',
+! \ 'sleep 100m',
+ \ 'call feedkeys("\<C-W>N", "xt")',
+ \ ], 'XTest_postponed')
+ let buf = RunVimInTerminal('-S XTest_postponed', {})
+--- 311,319 ----
+ call writefile(range(50), 'Xtext')
+ call writefile([
+ \ 'terminal',
+! \ 'sleep 400m',
+ \ 'call feedkeys("tail -n 100 -f Xtext\<CR>", "xt")',
+! \ 'sleep 200m',
+ \ 'call feedkeys("\<C-W>N", "xt")',
+ \ ], 'XTest_postponed')
+ let buf = RunVimInTerminal('-S XTest_postponed', {})
+*** ../vim-8.1.0923/src/version.c 2019-02-15 00:16:10.750171037 +0100
+--- src/version.c 2019-02-15 00:25:14.206712074 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 924,
+ /**/
+
+--
+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.0925 b/data/vim/patches/8.1.0925
new file mode 100644
index 000000000..330804c1f
--- /dev/null
+++ b/data/vim/patches/8.1.0925
@@ -0,0 +1,191 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0925
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0925
+Problem: Terminal scrollback test still still flaky.
+Solution: Explicitly set the shell. Disable ruler. (Ozaki Kiichi,
+ closes #3966)
+Files: src/testdir/test_terminal.vim,
+ src/testdir/dumps/Test_terminal_01.dump,
+ src/testdir/dumps/Test_terminal_02.dump,
+ src/testdir/dumps/Test_terminal_03.dump
+
+
+*** ../vim-8.1.0924/src/testdir/test_terminal.vim 2019-02-15 00:26:09.798340144 +0100
+--- src/testdir/test_terminal.vim 2019-02-15 01:02:48.308796592 +0100
+***************
+*** 310,335 ****
+
+ call writefile(range(50), 'Xtext')
+ call writefile([
+ \ 'terminal',
+- \ 'sleep 400m',
+- \ 'call feedkeys("tail -n 100 -f Xtext\<CR>", "xt")',
+ \ 'sleep 200m',
+ \ 'call feedkeys("\<C-W>N", "xt")',
+ \ ], 'XTest_postponed')
+ let buf = RunVimInTerminal('-S XTest_postponed', {})
+ " Check that the Xtext lines are displayed and in Terminal-Normal mode
+- call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_terminal_01', {})
+
+ silent !echo 'one more line' >>Xtext
+ " Sceen will not change, move cursor to get a different dump
+ call term_sendkeys(buf, "k")
+- call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_terminal_02', {})
+
+ " Back to Terminal-Job mode, text will scroll and show the extra line.
+ call term_sendkeys(buf, "a")
+- call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_terminal_03', {})
+
+ call term_wait(buf)
+--- 310,333 ----
+
+ call writefile(range(50), 'Xtext')
+ call writefile([
++ \ 'set shell=/bin/sh noruler',
+ \ 'terminal',
+ \ 'sleep 200m',
++ \ 'call feedkeys("tail -n 100 -f Xtext\<CR>", "xt")',
++ \ 'sleep 100m',
+ \ 'call feedkeys("\<C-W>N", "xt")',
+ \ ], 'XTest_postponed')
+ let buf = RunVimInTerminal('-S XTest_postponed', {})
+ " Check that the Xtext lines are displayed and in Terminal-Normal mode
+ call VerifyScreenDump(buf, 'Test_terminal_01', {})
+
+ silent !echo 'one more line' >>Xtext
+ " Sceen will not change, move cursor to get a different dump
+ call term_sendkeys(buf, "k")
+ call VerifyScreenDump(buf, 'Test_terminal_02', {})
+
+ " Back to Terminal-Job mode, text will scroll and show the extra line.
+ call term_sendkeys(buf, "a")
+ call VerifyScreenDump(buf, 'Test_terminal_03', {})
+
+ call term_wait(buf)
+*** ../vim-8.1.0924/src/testdir/dumps/Test_terminal_01.dump 2019-02-14 23:49:35.513222082 +0100
+--- src/testdir/dumps/Test_terminal_01.dump 2019-02-15 00:58:53.150886475 +0100
+***************
+*** 7,13 ****
+ |4|8| @72
+ >4|9| @72
+ |~+0#4040ff13&| @73
+! |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|T|e|r|m|i|n|a|l|]| @35|5|1|,|1| @10|B|o|t
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+--- 7,13 ----
+ |4|8| @72
+ >4|9| @72
+ |~+0#4040ff13&| @73
+! |!+2#ffffff16#00e0003|/|b|i|n|/|s|h| |[|T|e|r|m|i|n|a|l|]| @55
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+***************
+*** 16,20 ****
+ |~| @73
+ |~| @73
+ |~| @73
+! |[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
+ | +0&&@74
+--- 16,20 ----
+ |~| @73
+ |~| @73
+ |~| @73
+! |[+1#0000000&|N|o| |N|a|m|e|]| @65
+ | +0&&@74
+*** ../vim-8.1.0924/src/testdir/dumps/Test_terminal_02.dump 2019-02-14 23:49:35.513222082 +0100
+--- src/testdir/dumps/Test_terminal_02.dump 2019-02-15 00:58:54.206876760 +0100
+***************
+*** 7,13 ****
+ >4|8| @72
+ |4|9| @72
+ |~+0#4040ff13&| @73
+! |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|T|e|r|m|i|n|a|l|]| @35|5|0|,|1| @10|B|o|t
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+--- 7,13 ----
+ >4|8| @72
+ |4|9| @72
+ |~+0#4040ff13&| @73
+! |!+2#ffffff16#00e0003|/|b|i|n|/|s|h| |[|T|e|r|m|i|n|a|l|]| @55
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+***************
+*** 16,20 ****
+ |~| @73
+ |~| @73
+ |~| @73
+! |[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
+ | +0&&@74
+--- 16,20 ----
+ |~| @73
+ |~| @73
+ |~| @73
+! |[+1#0000000&|N|o| |N|a|m|e|]| @65
+ | +0&&@74
+*** ../vim-8.1.0924/src/testdir/dumps/Test_terminal_03.dump 2019-02-14 23:49:35.513222082 +0100
+--- src/testdir/dumps/Test_terminal_03.dump 2019-02-15 00:58:55.258867086 +0100
+***************
+*** 7,13 ****
+ |4|9| @72
+ |o|n|e| |m|o|r|e| |l|i|n|e| @61
+ > @74
+! |!+2#ffffff16#00e0003|/|b|i|n|/|t|c|s|h| |[|r|u|n@1|i|n|g|]| @36|4|3|,|1| @10|B|o|t
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+--- 7,13 ----
+ |4|9| @72
+ |o|n|e| |m|o|r|e| |l|i|n|e| @61
+ > @74
+! |!+2#ffffff16#00e0003|/|b|i|n|/|s|h| |[|r|u|n@1|i|n|g|]| @56
+ | +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+***************
+*** 16,20 ****
+ |~| @73
+ |~| @73
+ |~| @73
+! |[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
+ | +0&&@74
+--- 16,20 ----
+ |~| @73
+ |~| @73
+ |~| @73
+! |[+1#0000000&|N|o| |N|a|m|e|]| @65
+ | +0&&@74
+*** ../vim-8.1.0924/src/version.c 2019-02-15 00:26:09.798340144 +0100
+--- src/version.c 2019-02-15 01:02:27.728974356 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 925,
+ /**/
+
+--
+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.0926 b/data/vim/patches/8.1.0926
new file mode 100644
index 000000000..20423a575
--- /dev/null
+++ b/data/vim/patches/8.1.0926
@@ -0,0 +1,163 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0926
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0926
+Problem: No test for :wnext, :wNext and :wprevious.
+Solution: Add a test. (Dominique Pelle, closes #3963)
+Files: src/testdir/Make_all.mak, src/testdir/test_alot.vim,
+ src/testdir/test_wnext.vim
+
+
+*** ../vim-8.1.0925/src/testdir/Make_all.mak 2019-02-08 14:33:54.822761996 +0100
+--- src/testdir/Make_all.mak 2019-02-15 20:09:22.963005870 +0100
+***************
+*** 269,274 ****
+--- 269,275 ----
+ test_window_cmd \
+ test_window_id \
+ test_windows_home \
++ test_wnext \
+ test_wordcount \
+ test_writefile \
+ test_xxd \
+*** ../vim-8.1.0925/src/testdir/test_alot.vim 2019-01-24 22:42:14.949304772 +0100
+--- src/testdir/test_alot.vim 2019-02-15 20:09:22.963005870 +0100
+***************
+*** 66,68 ****
+--- 66,69 ----
+ source test_unlet.vim
+ source test_virtualedit.vim
+ source test_window_cmd.vim
++ source test_wnext.vim
+*** ../vim-8.1.0925/src/testdir/test_wnext.vim 2019-02-15 20:14:36.220428608 +0100
+--- src/testdir/test_wnext.vim 2019-02-15 20:09:22.963005870 +0100
+***************
+*** 0 ****
+--- 1,101 ----
++ " Test :wnext :wNext and :wprevious
++
++ func Test_wnext()
++ args X1 X2
++
++ call setline(1, '1')
++ wnext
++ call assert_equal(['1'], readfile('X1'))
++ call assert_equal('X2', bufname('%'))
++
++ call setline(1, '2')
++ call assert_fails('wnext', 'E165:')
++ call assert_equal(['2'], readfile('X2'))
++ call assert_equal('X2', bufname('%'))
++
++ " Test :wnext with a single file.
++ args X1
++ call assert_equal('X1', bufname('%'))
++ call assert_fails('wnext', 'E163:')
++
++ " Test :wnext with a count.
++ args X1 X2 X3
++ call assert_equal('X1', bufname('%'))
++ 2wnext
++ call assert_equal('X3', bufname('%'))
++
++ " Test :wnext {file}.
++ args X1 X2 X3
++ wnext X4
++ call assert_equal(['1'], readfile('X4'))
++ call assert_equal('X2', bufname('%'))
++ call assert_fails('wnext X4', 'E13:')
++ call assert_equal(['1'], readfile('X4'))
++ wnext! X4
++ call assert_equal(['2'], readfile('X4'))
++ call assert_equal('X3', bufname('%'))
++
++ args X1 X2
++ " Commented out as, E13 occurs on Windows instead of E17
++ "call assert_fails('wnext .', 'E17:')
++ call assert_fails('wnext! .', 'E502:')
++
++ %bwipe!
++ call delete('X1')
++ call delete('X2')
++ call delete('X3')
++ call delete('X4')
++ endfunc
++
++ func Test_wprevious()
++ args X1 X2
++
++ next
++ call assert_equal('X2', bufname('%'))
++ call setline(1, '2')
++ wprevious
++ call assert_equal(['2'], readfile('X2'))
++ call assert_equal('X1', bufname('%'))
++
++ call setline(1, '1')
++ call assert_fails('wprevious', 'E164:')
++ call assert_fails('wNext', 'E164:')
++
++ " Test :wprevious with a single file.
++ args X1
++ call assert_fails('wprevious', 'E163:')
++ call assert_fails('wNext', 'E163:')
++
++ " Test :wprevious with a count.
++ args X1 X2 X3
++ 2next
++ call setline(1, '3')
++ call assert_equal('X3', bufname('%'))
++ 2wprevious
++ call assert_equal('X1', bufname('%'))
++ call assert_equal(['3'], readfile('X3'))
++
++ " Test :wprevious {file}
++ args X1 X2 X3
++ 2next
++ call assert_equal('X3', bufname('%'))
++ wprevious X4
++ call assert_equal(['3'], readfile('X4'))
++ call assert_equal('X2', bufname('%'))
++ call assert_fails('wprevious X4', 'E13:')
++ call assert_equal(['3'], readfile('X4'))
++ wprevious! X4
++ call assert_equal(['2'], readfile('X4'))
++ call assert_equal('X1', bufname('%'))
++
++ args X1 X2
++ " Commented out as, E13 occurs on Windows instead of E17
++ "call assert_fails('wprevious .', 'E17:')
++ call assert_fails('wprevious! .', 'E502:')
++
++ %bwipe!
++ call delete('X1')
++ call delete('X2')
++ call delete('X3')
++ call delete('X4')
++ endfunc
+*** ../vim-8.1.0925/src/version.c 2019-02-15 01:06:09.283099564 +0100
+--- src/version.c 2019-02-15 20:14:45.812347475 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 926,
+ /**/
+
+--
+ARTHUR: You are indeed brave Sir knight, but the fight is mine.
+BLACK KNIGHT: Had enough?
+ARTHUR: You stupid bastard. You havn't got any arms left.
+ "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.0927 b/data/vim/patches/8.1.0927
new file mode 100644
index 000000000..9b617200d
--- /dev/null
+++ b/data/vim/patches/8.1.0927
@@ -0,0 +1,695 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0927
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0927
+Problem: USE_CR is never defined.
+Solution: Remove usage of USE_CR. (Ken Takata, closes #3958)
+Files: runtime/doc/options.txt, src/diff.c, src/evalfunc.c,
+ src/ex_cmds2.c, src/fileio.c, src/message.c, src/ops.c,
+ src/option.h, src/proto/ex_cmds2.pro, src/proto/fileio.pro,
+ src/tag.c
+
+*** ../vim-8.1.0926/runtime/doc/options.txt 2019-02-13 19:23:04.734816702 +0100
+--- runtime/doc/options.txt 2019-02-15 20:38:23.714261969 +0100
+***************
+*** 3106,3114 ****
+ is read.
+
+ *'fileformat'* *'ff'*
+! 'fileformat' 'ff' string (MS-DOS, MS-Windows, OS/2 default: "dos",
+! Unix default: "unix",
+! Macintosh default: "mac")
+ local to buffer
+ {not in Vi}
+ This gives the <EOL> of the current buffer, which is used for
+--- 3134,3141 ----
+ is read.
+
+ *'fileformat'* *'ff'*
+! 'fileformat' 'ff' string (MS-Windows default: "dos",
+! Unix, macOS default: "unix")
+ local to buffer
+ {not in Vi}
+ This gives the <EOL> of the current buffer, which is used for
+***************
+*** 3131,3139 ****
+
+ *'fileformats'* *'ffs'*
+ 'fileformats' 'ffs' string (default:
+! Vim+Vi MS-DOS, MS-Windows OS/2: "dos,unix",
+! Vim Unix: "unix,dos",
+! Vim Mac: "mac,unix,dos",
+ Vi Cygwin: "unix,dos",
+ Vi others: "")
+ global
+--- 3158,3165 ----
+
+ *'fileformats'* *'ffs'*
+ 'fileformats' 'ffs' string (default:
+! Vim+Vi MS-Windows: "dos,unix",
+! Vim Unix, macOS: "unix,dos",
+ Vi Cygwin: "unix,dos",
+ Vi others: "")
+ global
+*** ../vim-8.1.0926/src/diff.c 2019-01-24 15:04:44.662887892 +0100
+--- src/diff.c 2019-02-15 20:40:16.937520634 +0100
+***************
+*** 90,99 ****
+ 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
+- #endif
+-
+ /*
+ * Called when deleting or unloading a buffer: No longer make a diff with it.
+ */
+--- 90,95 ----
+***************
+*** 996,1002 ****
+ for (;;)
+ {
+ /* There must be a line that contains "1c1". */
+! if (tag_fgets(linebuf, LBUFLEN, fd))
+ break;
+ if (STRNCMP(linebuf, "1c1", 3) == 0)
+ ok = TRUE;
+--- 992,998 ----
+ for (;;)
+ {
+ /* There must be a line that contains "1c1". */
+! if (vim_fgets(linebuf, LBUFLEN, fd))
+ break;
+ if (STRNCMP(linebuf, "1c1", 3) == 0)
+ ok = TRUE;
+***************
+*** 1604,1610 ****
+ }
+ else
+ {
+! if (tag_fgets(linebuf, LBUFLEN, fd))
+ break; // end of file
+ line = linebuf;
+ }
+--- 1600,1606 ----
+ }
+ else
+ {
+! if (vim_fgets(linebuf, LBUFLEN, fd))
+ break; // end of file
+ line = linebuf;
+ }
+***************
+*** 1626,1634 ****
+ 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;
+ else
+--- 1622,1630 ----
+ else if ((STRNCMP(line, "@@ ", 3) == 0))
+ diffstyle = DIFF_UNIFIED;
+ else if ((STRNCMP(line, "--- ", 4) == 0)
+! && (vim_fgets(linebuf, LBUFLEN, fd) == 0)
+ && (STRNCMP(line, "+++ ", 4) == 0)
+! && (vim_fgets(linebuf, LBUFLEN, fd) == 0)
+ && (STRNCMP(line, "@@ ", 3) == 0))
+ diffstyle = DIFF_UNIFIED;
+ else
+*** ../vim-8.1.0926/src/evalfunc.c 2019-02-14 12:56:31.686115921 +0100
+--- src/evalfunc.c 2019-02-15 20:38:23.714261969 +0100
+***************
+*** 13431,13450 ****
+ else
+ {
+ res = get_cmd_output(tv_get_string(&argvars[0]), infile, flags, NULL);
+! #ifdef USE_CR
+! /* translate <CR> into <NL> */
+! if (res != NULL)
+! {
+! char_u *s;
+!
+! for (s = res; *s; ++s)
+! {
+! if (*s == CAR)
+! *s = NL;
+! }
+! }
+! #else
+! # ifdef USE_CRNL
+ /* translate <CR><NL> into <NL> */
+ if (res != NULL)
+ {
+--- 13431,13437 ----
+ else
+ {
+ res = get_cmd_output(tv_get_string(&argvars[0]), infile, flags, NULL);
+! #ifdef USE_CRNL
+ /* translate <CR><NL> into <NL> */
+ if (res != NULL)
+ {
+***************
+*** 13459,13465 ****
+ }
+ *d = NUL;
+ }
+- # endif
+ #endif
+ rettv->vval.v_string = res;
+ res = NULL;
+--- 13446,13451 ----
+*** ../vim-8.1.0926/src/ex_cmds2.c 2019-01-24 15:54:17.782847030 +0100
+--- src/ex_cmds2.c 2019-02-15 20:38:23.718261942 +0100
+***************
+*** 1359,1365 ****
+ did_throw = FALSE;
+ current_exception = NULL;
+ save_vimvars(&vvsave);
+!
+ timer->tr_firing = TRUE;
+ timer_callback(timer);
+ timer->tr_firing = FALSE;
+--- 1359,1365 ----
+ did_throw = FALSE;
+ current_exception = NULL;
+ save_vimvars(&vvsave);
+! ch_log(NULL, "calling timer callback");
+ timer->tr_firing = TRUE;
+ timer_callback(timer);
+ timer->tr_firing = FALSE;
+***************
+*** 4243,4249 ****
+ FILE *fp; /* opened file for sourcing */
+ char_u *nextline; /* if not NULL: line that was read ahead */
+ int finished; /* ":finish" used */
+! #if defined(USE_CRNL) || defined(USE_CR)
+ int fileformat; /* EOL_UNKNOWN, EOL_UNIX or EOL_DOS */
+ int error; /* TRUE if LF found after CR-LF */
+ #endif
+--- 4243,4249 ----
+ FILE *fp; /* opened file for sourcing */
+ char_u *nextline; /* if not NULL: line that was read ahead */
+ int finished; /* ":finish" used */
+! #ifdef USE_CRNL
+ int fileformat; /* EOL_UNKNOWN, EOL_UNIX or EOL_DOS */
+ int error; /* TRUE if LF found after CR-LF */
+ #endif
+***************
+*** 4465,4479 ****
+ cookie.error = FALSE;
+ #endif
+
+- #ifdef USE_CR
+- /* If no automatic file format: Set default to CR. */
+- if (*p_ffs == NUL)
+- cookie.fileformat = EOL_MAC;
+- else
+- cookie.fileformat = EOL_UNKNOWN;
+- cookie.error = FALSE;
+- #endif
+-
+ cookie.nextline = NULL;
+ cookie.finished = FALSE;
+
+--- 4465,4470 ----
+***************
+*** 4768,4826 ****
+
+ #endif
+
+- #if defined(USE_CR) || defined(PROTO)
+-
+- # if defined(__MSL__) && (__MSL__ >= 22)
+- /*
+- * Newer version of the Metrowerks library handle DOS and UNIX files
+- * without help.
+- * Test with earlier versions, MSL 2.2 is the library supplied with
+- * Codewarrior Pro 2.
+- */
+- char *
+- fgets_cr(char *s, int n, FILE *stream)
+- {
+- return fgets(s, n, stream);
+- }
+- # else
+- /*
+- * Version of fgets() which also works for lines ending in a <CR> only
+- * (Macintosh format).
+- * For older versions of the Metrowerks library.
+- * At least CodeWarrior 9 needed this code.
+- */
+- char *
+- fgets_cr(char *s, int n, FILE *stream)
+- {
+- int c = 0;
+- int char_read = 0;
+-
+- while (!feof(stream) && c != '\r' && c != '\n' && char_read < n - 1)
+- {
+- c = fgetc(stream);
+- s[char_read++] = c;
+- /* If the file is in DOS format, we need to skip a NL after a CR. I
+- * thought it was the other way around, but this appears to work... */
+- if (c == '\n')
+- {
+- c = fgetc(stream);
+- if (c != '\r')
+- ungetc(c, stream);
+- }
+- }
+-
+- s[char_read] = 0;
+- if (char_read == 0)
+- return NULL;
+-
+- if (feof(stream) && char_read == 1)
+- return NULL;
+-
+- return s;
+- }
+- # endif
+- #endif
+-
+ /*
+ * Get one full line from a sourced file.
+ * Called by do_cmdline() when it's called from do_source().
+--- 4759,4764 ----
+***************
+*** 4954,4962 ****
+ #ifdef USE_CRNL
+ int has_cr; /* CR-LF found */
+ #endif
+- #ifdef USE_CR
+- char_u *scan;
+- #endif
+ int have_read = FALSE;
+
+ /* use a growarray to store the sourced line */
+--- 4892,4897 ----
+***************
+*** 4973,4990 ****
+ break;
+ buf = (char_u *)ga.ga_data;
+
+! #ifdef USE_CR
+! if (sp->fileformat == EOL_MAC)
+! {
+! if (fgets_cr((char *)buf + ga.ga_len, ga.ga_maxlen - ga.ga_len,
+ sp->fp) == NULL)
+! break;
+! }
+! else
+! #endif
+! if (fgets((char *)buf + ga.ga_len, ga.ga_maxlen - ga.ga_len,
+! sp->fp) == NULL)
+! break;
+ len = ga.ga_len + (int)STRLEN(buf + ga.ga_len);
+ #ifdef USE_CRNL
+ /* Ignore a trailing CTRL-Z, when in Dos mode. Only recognize the
+--- 4908,4916 ----
+ break;
+ buf = (char_u *)ga.ga_data;
+
+! if (fgets((char *)buf + ga.ga_len, ga.ga_maxlen - ga.ga_len,
+ sp->fp) == NULL)
+! break;
+ len = ga.ga_len + (int)STRLEN(buf + ga.ga_len);
+ #ifdef USE_CRNL
+ /* Ignore a trailing CTRL-Z, when in Dos mode. Only recognize the
+***************
+*** 4998,5031 ****
+ }
+ #endif
+
+- #ifdef USE_CR
+- /* If the read doesn't stop on a new line, and there's
+- * some CR then we assume a Mac format */
+- if (sp->fileformat == EOL_UNKNOWN)
+- {
+- if (buf[len - 1] != '\n' && vim_strchr(buf, '\r') != NULL)
+- sp->fileformat = EOL_MAC;
+- else
+- sp->fileformat = EOL_UNIX;
+- }
+-
+- if (sp->fileformat == EOL_MAC)
+- {
+- scan = vim_strchr(buf, '\r');
+-
+- if (scan != NULL)
+- {
+- *scan = '\n';
+- if (*(scan + 1) != 0)
+- {
+- *(scan + 1) = 0;
+- fseek(sp->fp, (long)(scan - buf - len + 1), SEEK_CUR);
+- }
+- }
+- len = STRLEN(buf);
+- }
+- #endif
+-
+ have_read = TRUE;
+ ga.ga_len = len;
+
+--- 4924,4929 ----
+*** ../vim-8.1.0926/src/fileio.c 2019-02-14 12:56:31.682115940 +0100
+--- src/fileio.c 2019-02-15 20:38:23.718261942 +0100
+***************
+*** 5216,5229 ****
+ return TRUE;
+ }
+ #endif
+- #ifndef USE_CR
+ if (eol_type == EOL_MAC)
+ {
+ STRCAT(IObuff, shortmess(SHM_TEXT) ? _("[mac]") : _("[mac format]"));
+ return TRUE;
+ }
+! #endif
+! #if defined(USE_CRNL) || defined(USE_CR)
+ if (eol_type == EOL_UNIX)
+ {
+ STRCAT(IObuff, shortmess(SHM_TEXT) ? _("[unix]") : _("[unix format]"));
+--- 5216,5227 ----
+ return TRUE;
+ }
+ #endif
+ if (eol_type == EOL_MAC)
+ {
+ STRCAT(IObuff, shortmess(SHM_TEXT) ? _("[mac]") : _("[mac format]"));
+ return TRUE;
+ }
+! #ifdef USE_CRNL
+ if (eol_type == EOL_UNIX)
+ {
+ STRCAT(IObuff, shortmess(SHM_TEXT) ? _("[unix]") : _("[unix format]"));
+***************
+*** 6359,6369 ****
+ char tbuf[FGETS_SIZE];
+
+ buf[size - 2] = NUL;
+- #ifdef USE_CR
+- eof = fgets_cr((char *)buf, size, fp);
+- #else
+ eof = fgets((char *)buf, size, fp);
+- #endif
+ if (buf[size - 2] != NUL && buf[size - 2] != '\n')
+ {
+ buf[size - 1] = NUL; /* Truncate the line */
+--- 6357,6363 ----
+***************
+*** 6372,6428 ****
+ do
+ {
+ 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');
+ }
+ return (eof == NULL);
+ }
+
+- #if defined(USE_CR) || defined(PROTO)
+- /*
+- * Like vim_fgets(), but accept any line terminator: CR, CR-LF or LF.
+- * Returns TRUE for end-of-file.
+- * Only used for the Mac, because it's much slower than vim_fgets().
+- */
+- int
+- tag_fgets(char_u *buf, int size, FILE *fp)
+- {
+- int i = 0;
+- int c;
+- int eof = FALSE;
+-
+- for (;;)
+- {
+- c = fgetc(fp);
+- if (c == EOF)
+- {
+- eof = TRUE;
+- break;
+- }
+- if (c == '\r')
+- {
+- /* Always store a NL for end-of-line. */
+- if (i < size - 1)
+- buf[i++] = '\n';
+- c = fgetc(fp);
+- if (c != '\n') /* Macintosh format: single CR. */
+- ungetc(c, fp);
+- break;
+- }
+- if (i < size - 1)
+- buf[i++] = c;
+- if (c == '\n')
+- break;
+- }
+- buf[i] = NUL;
+- return eof;
+- }
+- #endif
+-
+ /*
+ * rename() only works if both files are on the same file system, this
+ * function will (attempts to?) copy the file across if rename fails -- webb
+--- 6366,6377 ----
+*** ../vim-8.1.0926/src/message.c 2019-02-14 20:55:05.983776869 +0100
+--- src/message.c 2019-02-15 20:38:23.718261942 +0100
+***************
+*** 2590,2599 ****
+ memcpy(buf, p, n);
+ if (!info_message)
+ buf[n++] = CAR;
+! #ifdef USE_CR
+! else
+! #endif
+! buf[n++] = NL;
+ buf[n++] = NUL;
+ if (info_message) // informative message, not an error
+ mch_msg((char *)buf);
+--- 2590,2596 ----
+ memcpy(buf, p, n);
+ if (!info_message)
+ buf[n++] = CAR;
+! buf[n++] = NL;
+ buf[n++] = NUL;
+ if (info_message) // informative message, not an error
+ mch_msg((char *)buf);
+*** ../vim-8.1.0926/src/ops.c 2019-01-26 17:28:22.232599086 +0100
+--- src/ops.c 2019-02-15 20:38:23.718261942 +0100
+***************
+*** 6577,6587 ****
+ #ifdef USE_CRNL
+ p[i++] = '\r';
+ #endif
+- #ifdef USE_CR
+- p[i] = '\r';
+- #else
+ p[i] = '\n';
+- #endif
+ lnum++;
+ j = -1;
+ }
+--- 6577,6583 ----
+*** ../vim-8.1.0926/src/option.h 2019-02-08 12:46:03.588784187 +0100
+--- src/option.h 2019-02-15 20:38:23.718261942 +0100
+***************
+*** 50,70 ****
+ # define DFLT_FFS_VI "dos,unix" /* also autodetect in compatible mode */
+ # define DFLT_TEXTAUTO TRUE
+ #else
+! # ifdef USE_CR
+! # define DFLT_FF "mac"
+! # define DFLT_FFS_VIM "mac,unix,dos"
+! # define DFLT_FFS_VI "mac,unix,dos"
+! # define DFLT_TEXTAUTO TRUE
+ # else
+! # define DFLT_FF "unix"
+! # define DFLT_FFS_VIM "unix,dos"
+! # ifdef __CYGWIN__
+! # define DFLT_FFS_VI "unix,dos" /* Cygwin always needs file detection */
+! # define DFLT_TEXTAUTO TRUE
+! # else
+! # define DFLT_FFS_VI ""
+! # define DFLT_TEXTAUTO FALSE
+! # endif
+ # endif
+ #endif
+
+--- 50,63 ----
+ # define DFLT_FFS_VI "dos,unix" /* also autodetect in compatible mode */
+ # define DFLT_TEXTAUTO TRUE
+ #else
+! # define DFLT_FF "unix"
+! # define DFLT_FFS_VIM "unix,dos"
+! # ifdef __CYGWIN__
+! # define DFLT_FFS_VI "unix,dos" /* Cygwin always needs file detection */
+! # define DFLT_TEXTAUTO TRUE
+ # else
+! # define DFLT_FFS_VI ""
+! # define DFLT_TEXTAUTO FALSE
+ # endif
+ #endif
+
+*** ../vim-8.1.0926/src/proto/ex_cmds2.pro 2018-05-17 13:52:34.000000000 +0200
+--- src/proto/ex_cmds2.pro 2019-02-15 20:38:23.718261942 +0100
+***************
+*** 93,99 ****
+ void scriptnames_slash_adjust(void);
+ char_u *get_scriptname(scid_T id);
+ void free_scriptnames(void);
+- char *fgets_cr(char *s, int n, FILE *stream);
+ char_u *getsourceline(int c, void *cookie, int indent);
+ void script_line_start(void);
+ void script_line_exec(void);
+--- 93,98 ----
+*** ../vim-8.1.0926/src/proto/fileio.pro 2019-02-14 12:56:31.682115940 +0100
+--- src/proto/fileio.pro 2019-02-15 20:38:23.718261942 +0100
+***************
+*** 18,24 ****
+ char_u *modname(char_u *fname, char_u *ext, int prepend_dot);
+ char_u *buf_modname(int shortname, char_u *fname, char_u *ext, int prepend_dot);
+ int vim_fgets(char_u *buf, int size, FILE *fp);
+- int tag_fgets(char_u *buf, int size, FILE *fp);
+ int vim_rename(char_u *from, char_u *to);
+ int check_timestamps(int focus);
+ int buf_check_timestamp(buf_T *buf, int focus);
+--- 18,23 ----
+*** ../vim-8.1.0926/src/tag.c 2019-02-13 21:19:09.503999092 +0100
+--- src/tag.c 2019-02-15 20:39:52.869677988 +0100
+***************
+*** 1146,1159 ****
+ msg_puts("\n>");
+ }
+
+- /* When not using a CR for line separator, use vim_fgets() to read tag lines.
+- * For the Mac use tag_fgets(). It can handle any line separator, but is much
+- * slower than vim_fgets().
+- */
+- #ifndef USE_CR
+- # define tag_fgets vim_fgets
+- #endif
+-
+ #ifdef FEAT_TAG_BINS
+ /*
+ * Compare two strings, for length "len", ignoring case the ASCII way.
+--- 1146,1151 ----
+***************
+*** 1654,1660 ****
+ /* Adjust the search file offset to the correct position */
+ search_info.curr_offset_used = search_info.curr_offset;
+ vim_fseek(fp, search_info.curr_offset, SEEK_SET);
+! eof = tag_fgets(lbuf, LSIZE, fp);
+ if (!eof && search_info.curr_offset != 0)
+ {
+ /* The explicit cast is to work around a bug in gcc 3.4.2
+--- 1646,1652 ----
+ /* Adjust the search file offset to the correct position */
+ search_info.curr_offset_used = search_info.curr_offset;
+ vim_fseek(fp, search_info.curr_offset, SEEK_SET);
+! eof = vim_fgets(lbuf, LSIZE, fp);
+ if (!eof && search_info.curr_offset != 0)
+ {
+ /* The explicit cast is to work around a bug in gcc 3.4.2
+***************
+*** 1666,1678 ****
+ vim_fseek(fp, search_info.low_offset, SEEK_SET);
+ search_info.curr_offset = search_info.low_offset;
+ }
+! eof = tag_fgets(lbuf, LSIZE, fp);
+ }
+ /* skip empty and blank lines */
+ while (!eof && vim_isblankline(lbuf))
+ {
+ search_info.curr_offset = vim_ftell(fp);
+! eof = tag_fgets(lbuf, LSIZE, fp);
+ }
+ if (eof)
+ {
+--- 1658,1670 ----
+ vim_fseek(fp, search_info.low_offset, SEEK_SET);
+ search_info.curr_offset = search_info.low_offset;
+ }
+! eof = vim_fgets(lbuf, LSIZE, fp);
+ }
+ /* skip empty and blank lines */
+ while (!eof && vim_isblankline(lbuf))
+ {
+ search_info.curr_offset = vim_ftell(fp);
+! eof = vim_fgets(lbuf, LSIZE, fp);
+ }
+ if (eof)
+ {
+***************
+*** 1698,1704 ****
+ eof = cs_fgets(lbuf, LSIZE);
+ else
+ #endif
+! eof = tag_fgets(lbuf, LSIZE, fp);
+ } while (!eof && vim_isblankline(lbuf));
+
+ if (eof)
+--- 1690,1696 ----
+ eof = cs_fgets(lbuf, LSIZE);
+ else
+ #endif
+! eof = vim_fgets(lbuf, LSIZE, fp);
+ } while (!eof && vim_isblankline(lbuf));
+
+ if (eof)
+***************
+*** 1763,1769 ****
+ {
+ is_etag = 1; /* in case at the start */
+ state = TS_LINEAR;
+! if (!tag_fgets(ebuf, LSIZE, fp))
+ {
+ for (p = ebuf; *p && *p != ','; p++)
+ ;
+--- 1755,1761 ----
+ {
+ is_etag = 1; /* in case at the start */
+ state = TS_LINEAR;
+! if (!vim_fgets(ebuf, LSIZE, fp))
+ {
+ for (p = ebuf; *p && *p != ','; p++)
+ ;
+*** ../vim-8.1.0926/src/version.c 2019-02-15 20:14:56.740255481 +0100
+--- src/version.c 2019-02-15 21:05:12.754653589 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 927,
+ /**/
+
+--
+Mrs Abbott: I'm a paediatrician.
+ Basil: Feet?
+Mrs Abbott: Children.
+ Sybil: Oh, Basil!
+ Basil: Well, children have feet, don't they? That's how they move
+ around, my dear. You must take a look next time, it's most
+ interesting. (Fawlty Towers)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0928 b/data/vim/patches/8.1.0928
new file mode 100644
index 000000000..695791d35
--- /dev/null
+++ b/data/vim/patches/8.1.0928
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0928
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0928 (after 8.1.0927)
+Problem: Stray log function call.
+Solution: Remove the log function call.
+Files: src/ex_cmds2.c
+
+
+*** ../vim-8.1.0927/src/ex_cmds2.c 2019-02-15 21:06:05.338289743 +0100
+--- src/ex_cmds2.c 2019-02-15 23:59:12.801420818 +0100
+***************
+*** 1359,1365 ****
+ did_throw = FALSE;
+ current_exception = NULL;
+ save_vimvars(&vvsave);
+- ch_log(NULL, "calling timer callback");
+ timer->tr_firing = TRUE;
+ timer_callback(timer);
+ timer->tr_firing = FALSE;
+--- 1359,1364 ----
+*** ../vim-8.1.0927/src/version.c 2019-02-15 21:06:05.342289715 +0100
+--- src/version.c 2019-02-15 23:59:58.493147277 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 928,
+ /**/
+
+--
+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.0929 b/data/vim/patches/8.1.0929
new file mode 100644
index 000000000..6d6930c2c
--- /dev/null
+++ b/data/vim/patches/8.1.0929
@@ -0,0 +1,161 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0929
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0929
+Problem: No error when requesting ConPTY but it's not available.
+Solution: Add an error message. (Hirohito Higashi, closes #3967)
+Files: runtime/doc/terminal.txt, src/terminal.c
+
+
+*** ../vim-8.1.0928/runtime/doc/terminal.txt 2019-02-08 12:46:03.584784210 +0100
+--- runtime/doc/terminal.txt 2019-02-16 13:34:11.449969838 +0100
+***************
+*** 413,425 ****
+ to point to the right file, if needed. If you have both the 32-bit and 64-bit
+ version, rename to winpty32.dll and winpty64.dll to match the way Vim was
+ build.
+! *ConPTY*
+ On more recent versions of MS-Windows 10 (beginning with the "October 2018
+ Update"), winpty is no longer required. On those versions, |:terminal| will use
+ Windows' built-in support for hosting terminal applications, "ConPTY". When
+ ConPTY is in use, there may be rendering artifacts regarding ambiguous-width
+! characters. If you encounter any such issues, set 'termwintype' to "winpty"
+! (which you then must have instlled).
+
+ Environment variables are used to pass information to the running job:
+ VIM_SERVERNAME v:servername
+--- 413,425 ----
+ to point to the right file, if needed. If you have both the 32-bit and 64-bit
+ version, rename to winpty32.dll and winpty64.dll to match the way Vim was
+ build.
+! *ConPTY* *E982*
+ On more recent versions of MS-Windows 10 (beginning with the "October 2018
+ Update"), winpty is no longer required. On those versions, |:terminal| will use
+ Windows' built-in support for hosting terminal applications, "ConPTY". When
+ ConPTY is in use, there may be rendering artifacts regarding ambiguous-width
+! characters. If you encounter any such issues, install "winpty". Until the
+! ConPTY problems have been fixed "winpty" will be preferred.
+
+ Environment variables are used to pass information to the running job:
+ VIM_SERVERNAME v:servername
+*** ../vim-8.1.0928/src/terminal.c 2019-02-15 00:16:10.750171037 +0100
+--- src/terminal.c 2019-02-16 13:32:09.466657781 +0100
+***************
+*** 5620,5629 ****
+ static int
+ dyn_conpty_init(int verbose)
+ {
+! static BOOL handled = FALSE;
+! static int result;
+! HMODULE hKerneldll;
+! int i;
+ static struct
+ {
+ char *name;
+--- 5620,5627 ----
+ static int
+ dyn_conpty_init(int verbose)
+ {
+! static HMODULE hKerneldll = NULL;
+! int i;
+ static struct
+ {
+ char *name;
+***************
+*** 5642,5657 ****
+ {NULL, NULL}
+ };
+
+- if (handled)
+- return result;
+-
+ if (!has_conpty_working())
+ {
+! handled = TRUE;
+! result = FAIL;
+ return FAIL;
+ }
+
+ hKerneldll = vimLoadLib("kernel32.dll");
+ for (i = 0; conpty_entry[i].name != NULL
+ && conpty_entry[i].ptr != NULL; ++i)
+--- 5640,5656 ----
+ {NULL, NULL}
+ };
+
+ if (!has_conpty_working())
+ {
+! if (verbose)
+! emsg(_("E982: ConPTY is not available"));
+ return FAIL;
+ }
+
++ // No need to initialize twice.
++ if (hKerneldll)
++ return OK;
++
+ hKerneldll = vimLoadLib("kernel32.dll");
+ for (i = 0; conpty_entry[i].name != NULL
+ && conpty_entry[i].ptr != NULL; ++i)
+***************
+*** 5661,5672 ****
+ {
+ if (verbose)
+ semsg(_(e_loadfunc), conpty_entry[i].name);
+ return FAIL;
+ }
+ }
+
+- handled = TRUE;
+- result = OK;
+ return OK;
+ }
+
+--- 5660,5670 ----
+ {
+ if (verbose)
+ semsg(_(e_loadfunc), conpty_entry[i].name);
++ hKerneldll = NULL;
+ return FAIL;
+ }
+ }
+
+ return OK;
+ }
+
+***************
+*** 6015,6020 ****
+--- 6013,6019 ----
+ {
+ if (verbose)
+ semsg(_(e_loadfunc), winpty_entry[i].name);
++ hWinPtyDLL = NULL;
+ return FAIL;
+ }
+ }
+*** ../vim-8.1.0928/src/version.c 2019-02-16 00:00:24.804989830 +0100
+--- src/version.c 2019-02-16 13:31:28.106890158 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 929,
+ /**/
+
+--
+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.0930 b/data/vim/patches/8.1.0930
new file mode 100644
index 000000000..0d4c369e4
--- /dev/null
+++ b/data/vim/patches/8.1.0930
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0930
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0930
+Problem: Typo in Makefile.
+Solution: Change ABORT_CLFAGS to ABORT_CFLAGS. (Kuang-che Wu, closes #3977)
+Files: src/Makefile
+
+
+*** ../vim-8.1.0929/src/Makefile 2019-02-13 22:45:21.508636195 +0100
+--- src/Makefile 2019-02-16 13:43:02.006948077 +0100
+***************
+*** 703,709 ****
+
+ # Uncomment this line to have Vim call abort() when an internal error is
+ # detected. Useful when using a tool to find errors.
+! #ABORT_CLFAGS = -DABORT_ON_INTERNAL_ERROR
+
+ #####################################################
+ ### Specific systems, check if yours is listed! ### {{{
+--- 703,709 ----
+
+ # Uncomment this line to have Vim call abort() when an internal error is
+ # detected. Useful when using a tool to find errors.
+! #ABORT_CFLAGS = -DABORT_ON_INTERNAL_ERROR
+
+ #####################################################
+ ### Specific systems, check if yours is listed! ### {{{
+***************
+*** 1471,1477 ****
+ PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS)
+ POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(EXTRA_DEFS)
+
+! ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(SANITIZER_CFLAGS) $(LEAK_CFLAGS) $(ABORT_CLFAGS) $(POST_DEFS)
+
+ # Exclude $CFLAGS for osdef.sh, for Mac 10.4 some flags don't work together
+ # with "-E".
+--- 1471,1477 ----
+ PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS)
+ POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(EXTRA_DEFS)
+
+! ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(SANITIZER_CFLAGS) $(LEAK_CFLAGS) $(ABORT_CFLAGS) $(POST_DEFS)
+
+ # Exclude $CFLAGS for osdef.sh, for Mac 10.4 some flags don't work together
+ # with "-E".
+*** ../vim-8.1.0929/src/version.c 2019-02-16 13:35:09.841639346 +0100
+--- src/version.c 2019-02-16 13:44:17.618514996 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 930,
+ /**/
+
+--
+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.0931 b/data/vim/patches/8.1.0931
new file mode 100644
index 000000000..0e8b58ec0
--- /dev/null
+++ b/data/vim/patches/8.1.0931
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0931
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0931
+Problem: vtp_working included in GUI build but unused.
+Solution: Adjust #ifdefs. (Ken Takata, closes #3971)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0930/src/os_win32.c 2019-02-13 19:23:04.734816702 +0100
+--- src/os_win32.c 2019-02-16 14:02:12.004047301 +0100
+***************
+*** 186,197 ****
+ static int win32_setattrs(char_u *name, int attrs);
+ static int win32_set_archive(char_u *name);
+
+- static int vtp_working = 0;
+ static int conpty_working = 0;
+ static int conpty_stable = 0;
+ static void vtp_flag_init();
+
+ #ifndef FEAT_GUI_W32
+ static void vtp_init();
+ static void vtp_exit();
+ static int vtp_printf(char *format, ...);
+--- 186,197 ----
+ static int win32_setattrs(char_u *name, int attrs);
+ static int win32_set_archive(char_u *name);
+
+ static int conpty_working = 0;
+ static int conpty_stable = 0;
+ static void vtp_flag_init();
+
+ #ifndef FEAT_GUI_W32
++ static int vtp_working = 0;
+ static void vtp_init();
+ static void vtp_exit();
+ static int vtp_printf(char *format, ...);
+***************
+*** 7874,7887 ****
+ return T_NAME != NULL && STRCMP(T_NAME, "win32") == 0;
+ }
+
+- #endif
+-
+ int
+ has_vtp_working(void)
+ {
+ return vtp_working;
+ }
+
+ int
+ has_conpty_working(void)
+ {
+--- 7874,7887 ----
+ return T_NAME != NULL && STRCMP(T_NAME, "win32") == 0;
+ }
+
+ int
+ has_vtp_working(void)
+ {
+ return vtp_working;
+ }
+
++ #endif
++
+ int
+ has_conpty_working(void)
+ {
+*** ../vim-8.1.0930/src/version.c 2019-02-16 13:45:05.574240125 +0100
+--- src/version.c 2019-02-16 14:06:47.822412531 +0100
+***************
+*** 785,786 ****
+--- 785,788 ----
+ { /* Add new patch number below this line */
++ /**/
++ 931,
+ /**/
+
+--
+ 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.0932 b/data/vim/patches/8.1.0932
new file mode 100644
index 000000000..dee2cf331
--- /dev/null
+++ b/data/vim/patches/8.1.0932
@@ -0,0 +1,6097 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0932
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0932
+Problem: Farsi support is outdated and unused.
+Solution: Delete the Farsi support.
+Files: Filelist, src/farsi.c, src/proto/farsi.pro, src/farsi.h, src/edit.c,
+ src/main.c, src/normal.c, src/option.c, src/getchar.c,
+ src/ex_cmds.c, src/search.c, src/ex_getln.c, src/charset.c,
+ src/evalfunc.c, src/screen.c, src/window.c, src/globals.h,
+ src/proto.h, farsi/README.txt, src/structs.h,
+ farsi/fonts/DOS/far-a01.com, farsi/fonts/SunOs/far-a01.fb,
+ farsi/fonts/UNIXs/far-a01.f16, farsi/fonts/UNIXs/far-a01.pcf.gz,
+ farsi/fonts/UNIXs/far-a01.pcf.Z, farsi/fonts/WINDOWS/far-a01.fon,
+ src/Makefile, src/Make_bc5.mak, src/Make_cyg_ming.mak,
+ src/Make_dice.mak, src/Make_ivc.mak, src/Make_manx.mak,
+ src/Make_morph.mak, src/Make_mvc.mak, src/Make_sas.mak,
+ src/Make_vms.mms, src/configure.ac, src/auto/configure,
+ src/config.h.in, src/testdir/test_farsi.vim, src/version.c,
+ src/testdir/Make_all.mak, runtime/doc/options.txt,
+ runtime/doc/starting.txt, runtime/doc/quickref.txt,
+ runtime/doc/farsi.txt
+
+
+*** ../vim-8.1.0931/Filelist 2019-02-13 22:45:21.504636232 +0100
+--- Filelist 2019-02-16 14:26:56.131450066 +0100
+***************
+*** 37,44 ****
+ src/ex_docmd.c \
+ src/ex_eval.c \
+ src/ex_getln.c \
+- src/farsi.c \
+- src/farsi.h \
+ src/feature.h \
+ src/fileio.c \
+ src/findfile.c \
+--- 37,42 ----
+***************
+*** 169,175 ****
+ src/proto/ex_docmd.pro \
+ src/proto/ex_eval.pro \
+ src/proto/ex_getln.pro \
+- src/proto/farsi.pro \
+ src/proto/fileio.pro \
+ src/proto/findfile.pro \
+ src/proto/fold.pro \
+--- 167,172 ----
+***************
+*** 837,844 ****
+ $(SRC_EXTRA) \
+ README_extra.txt \
+ src/VisVim/VisVim.dll \
+- farsi/README.txt \
+- farsi/fonts/*/far-* \
+ runtime/vimlogo.xpm \
+ src/tee/Makefile \
+ src/tee/Make_mvc.mak \
+--- 834,839 ----
+*** ../vim-8.1.0931/src/farsi.c 2019-01-19 17:43:03.409449198 +0100
+--- src/farsi.c 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,2179 ****
+- /* 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.
+- */
+-
+- /*
+- * farsi.c: functions for Farsi language
+- */
+-
+- #include "vim.h"
+-
+- #if defined(FEAT_FKMAP) || defined(PROTO)
+-
+- static int F_is_TyB_TyC_TyD(int src, int offset);
+-
+- /*
+- * Convert the given Farsi character into a _X or _X_ type
+- */
+- static int
+- toF_Xor_X_(int c)
+- {
+- int tempc;
+-
+- switch (c)
+- {
+- case BE: return _BE;
+- case PE: return _PE;
+- case TE: return _TE;
+- case SE: return _SE;
+- case JIM: return _JIM;
+- case CHE: return _CHE;
+- case HE_J: return _HE_J;
+- case XE: return _XE;
+- case SIN: return _SIN;
+- case SHIN: return _SHIN;
+- case SAD: return _SAD;
+- case ZAD: return _ZAD;
+- case AYN: return _AYN;
+- case AYN_: return _AYN_;
+- case GHAYN: return _GHAYN;
+- case GHAYN_: return _GHAYN_;
+- case FE: return _FE;
+- case GHAF: return _GHAF;
+- case KAF: return _KAF;
+- case GAF: return _GAF;
+- case LAM: return _LAM;
+- case MIM: return _MIM;
+- case NOON: return _NOON;
+- case YE:
+- case YE_: return _YE;
+- case YEE:
+- case YEE_: return _YEE;
+- case IE:
+- case IE_: return _IE;
+- case F_HE:
+- tempc = _HE;
+-
+- if (p_ri && (curwin->w_cursor.col + 1
+- < (colnr_T)STRLEN(ml_get_curline())))
+- {
+- inc_cursor();
+-
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- tempc = _HE_;
+-
+- dec_cursor();
+- }
+- if (!p_ri && STRLEN(ml_get_curline()))
+- {
+- dec_cursor();
+-
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- tempc = _HE_;
+-
+- inc_cursor();
+- }
+-
+- return tempc;
+- }
+- return 0;
+- }
+-
+- /*
+- * Convert the given Farsi character into Farsi capital character.
+- */
+- static int
+- toF_TyA(int c)
+- {
+- switch (c)
+- {
+- case ALEF_: return ALEF;
+- case ALEF_U_H_: return ALEF_U_H;
+- case _BE: return BE;
+- case _PE: return PE;
+- case _TE: return TE;
+- case _SE: return SE;
+- case _JIM: return JIM;
+- case _CHE: return CHE;
+- case _HE_J: return HE_J;
+- case _XE: return XE;
+- case _SIN: return SIN;
+- case _SHIN: return SHIN;
+- case _SAD: return SAD;
+- case _ZAD: return ZAD;
+- case _AYN:
+- case AYN_:
+- case _AYN_: return AYN;
+- case _GHAYN:
+- case GHAYN_:
+- case _GHAYN_: return GHAYN;
+- case _FE: return FE;
+- case _GHAF: return GHAF;
+- /* I am not sure what it is !!! case _KAF_H: */
+- case _KAF: return KAF;
+- case _GAF: return GAF;
+- case _LAM: return LAM;
+- case _MIM: return MIM;
+- case _NOON: return NOON;
+- case _YE:
+- case YE_: return YE;
+- case _YEE:
+- case YEE_: return YEE;
+- case TEE_: return TEE;
+- case _IE:
+- case IE_: return IE;
+- case _HE:
+- case _HE_: return F_HE;
+- }
+- return c;
+- }
+-
+- /*
+- * Is the character under the cursor+offset in the given buffer a join type.
+- * That is a character that is combined with the others.
+- * Note: the offset is used only for command line buffer.
+- */
+- static int
+- F_is_TyB_TyC_TyD(int src, int offset)
+- {
+- int c;
+-
+- if (src == SRC_EDT)
+- c = gchar_cursor();
+- else
+- c = cmd_gchar(AT_CURSOR+offset);
+-
+- switch (c)
+- {
+- case _LAM:
+- case _BE:
+- case _PE:
+- case _TE:
+- case _SE:
+- case _JIM:
+- case _CHE:
+- case _HE_J:
+- case _XE:
+- case _SIN:
+- case _SHIN:
+- case _SAD:
+- case _ZAD:
+- case _TA:
+- case _ZA:
+- case _AYN:
+- case _AYN_:
+- case _GHAYN:
+- case _GHAYN_:
+- case _FE:
+- case _GHAF:
+- case _KAF:
+- case _KAF_H:
+- case _GAF:
+- case _MIM:
+- case _NOON:
+- case _YE:
+- case _YEE:
+- case _IE:
+- case _HE_:
+- case _HE:
+- return TRUE;
+- }
+- return FALSE;
+- }
+-
+- /*
+- * Is the Farsi character one of the terminating only type.
+- */
+- static int
+- F_is_TyE(int c)
+- {
+- switch (c)
+- {
+- case ALEF_A:
+- case ALEF_D_H:
+- case DAL:
+- case ZAL:
+- case RE:
+- case ZE:
+- case JE:
+- case WAW:
+- case WAW_H:
+- case HAMZE:
+- return TRUE;
+- }
+- return FALSE;
+- }
+-
+- /*
+- * Is the Farsi character one of the none leading type.
+- */
+- static int
+- F_is_TyC_TyD(int c)
+- {
+- switch (c)
+- {
+- case ALEF_:
+- case ALEF_U_H_:
+- case _AYN_:
+- case AYN_:
+- case _GHAYN_:
+- case GHAYN_:
+- case _HE_:
+- case YE_:
+- case IE_:
+- case TEE_:
+- case YEE_:
+- return TRUE;
+- }
+- return FALSE;
+- }
+-
+- /*
+- * Convert a none leading Farsi char into a leading type.
+- */
+- static int
+- toF_TyB(int c)
+- {
+- switch (c)
+- {
+- case ALEF_: return ALEF;
+- case ALEF_U_H_: return ALEF_U_H;
+- case _AYN_: return _AYN;
+- case AYN_: return AYN; /* exception - there are many of them */
+- case _GHAYN_: return _GHAYN;
+- case GHAYN_: return GHAYN; /* exception - there are many of them */
+- case _HE_: return _HE;
+- case YE_: return YE;
+- case IE_: return IE;
+- case TEE_: return TEE;
+- case YEE_: return YEE;
+- }
+- return c;
+- }
+-
+-
+- static void
+- put_and_redo(int c)
+- {
+- pchar_cursor(c);
+- AppendCharToRedobuff(K_BS);
+- AppendCharToRedobuff(c);
+- }
+-
+- /*
+- * Overwrite the current redo and cursor characters + left adjust.
+- */
+- static void
+- put_curr_and_l_to_X(int c)
+- {
+- int tempc;
+-
+- if (curwin->w_p_rl && p_ri)
+- return;
+-
+- if ((curwin->w_cursor.col < (colnr_T)STRLEN(ml_get_curline())))
+- {
+- if ((p_ri && curwin->w_cursor.col) || !p_ri)
+- {
+- if (p_ri)
+- dec_cursor();
+- else
+- inc_cursor();
+-
+- if (F_is_TyC_TyD((tempc = gchar_cursor())))
+- {
+- pchar_cursor(toF_TyB(tempc));
+- AppendCharToRedobuff(K_BS);
+- AppendCharToRedobuff(tempc);
+- }
+-
+- if (p_ri)
+- inc_cursor();
+- else
+- dec_cursor();
+- }
+- }
+-
+- put_and_redo(c);
+- }
+-
+- /*
+- * Change the char. under the cursor to a X_ or X type
+- */
+- static void
+- chg_c_toX_orX(void)
+- {
+- int tempc, curc;
+-
+- switch ((curc = gchar_cursor()))
+- {
+- case _BE:
+- tempc = BE;
+- break;
+- case _PE:
+- tempc = PE;
+- break;
+- case _TE:
+- tempc = TE;
+- break;
+- case _SE:
+- tempc = SE;
+- break;
+- case _JIM:
+- tempc = JIM;
+- break;
+- case _CHE:
+- tempc = CHE;
+- break;
+- case _HE_J:
+- tempc = HE_J;
+- break;
+- case _XE:
+- tempc = XE;
+- break;
+- case _SIN:
+- tempc = SIN;
+- break;
+- case _SHIN:
+- tempc = SHIN;
+- break;
+- case _SAD:
+- tempc = SAD;
+- break;
+- case _ZAD:
+- tempc = ZAD;
+- break;
+- case _FE:
+- tempc = FE;
+- break;
+- case _GHAF:
+- tempc = GHAF;
+- break;
+- case _KAF_H:
+- case _KAF:
+- tempc = KAF;
+- break;
+- case _GAF:
+- tempc = GAF;
+- break;
+- case _AYN:
+- tempc = AYN;
+- break;
+- case _AYN_:
+- tempc = AYN_;
+- break;
+- case _GHAYN:
+- tempc = GHAYN;
+- break;
+- case _GHAYN_:
+- tempc = GHAYN_;
+- break;
+- case _LAM:
+- tempc = LAM;
+- break;
+- case _MIM:
+- tempc = MIM;
+- break;
+- case _NOON:
+- tempc = NOON;
+- break;
+- case _HE:
+- case _HE_:
+- tempc = F_HE;
+- break;
+- case _YE:
+- case _IE:
+- case _YEE:
+- if (p_ri)
+- {
+- inc_cursor();
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- tempc = (curc == _YE ? YE_ :
+- (curc == _IE ? IE_ : YEE_));
+- else
+- tempc = (curc == _YE ? YE :
+- (curc == _IE ? IE : YEE));
+- dec_cursor();
+- }
+- else
+- {
+- if (curwin->w_cursor.col)
+- {
+- dec_cursor();
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- tempc = (curc == _YE ? YE_ :
+- (curc == _IE ? IE_ : YEE_));
+- else
+- tempc = (curc == _YE ? YE :
+- (curc == _IE ? IE : YEE));
+- inc_cursor();
+- }
+- else
+- tempc = (curc == _YE ? YE :
+- (curc == _IE ? IE : YEE));
+- }
+- break;
+- default:
+- tempc = 0;
+- }
+-
+- if (tempc)
+- put_and_redo(tempc);
+- }
+-
+- /*
+- * Change the char. under the cursor to a _X_ or X_ type
+- */
+- static void
+- chg_c_to_X_orX_(void)
+- {
+- int tempc;
+-
+- switch (gchar_cursor())
+- {
+- case ALEF:
+- tempc = ALEF_;
+- break;
+- case ALEF_U_H:
+- tempc = ALEF_U_H_;
+- break;
+- case _AYN:
+- tempc = _AYN_;
+- break;
+- case AYN:
+- tempc = AYN_;
+- break;
+- case _GHAYN:
+- tempc = _GHAYN_;
+- break;
+- case GHAYN:
+- tempc = GHAYN_;
+- break;
+- case _HE:
+- tempc = _HE_;
+- break;
+- case YE:
+- tempc = YE_;
+- break;
+- case IE:
+- tempc = IE_;
+- break;
+- case TEE:
+- tempc = TEE_;
+- break;
+- case YEE:
+- tempc = YEE_;
+- break;
+- default:
+- tempc = 0;
+- }
+-
+- if (tempc)
+- put_and_redo(tempc);
+- }
+-
+- /*
+- * Change the char. under the cursor to a _X_ or _X type
+- */
+- static void
+- chg_c_to_X_or_X(void)
+- {
+- int tempc;
+-
+- tempc = gchar_cursor();
+-
+- if (curwin->w_cursor.col + 1 < (colnr_T)STRLEN(ml_get_curline()))
+- {
+- inc_cursor();
+-
+- if ((tempc == F_HE) && (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR)))
+- {
+- tempc = _HE_;
+-
+- dec_cursor();
+-
+- put_and_redo(tempc);
+- return;
+- }
+-
+- dec_cursor();
+- }
+-
+- if ((tempc = toF_Xor_X_(tempc)) != 0)
+- put_and_redo(tempc);
+- }
+-
+- /*
+- * Change the character left to the cursor to a _X_ or X_ type
+- */
+- static void
+- chg_l_to_X_orX_(void)
+- {
+- int tempc;
+-
+- if (curwin->w_cursor.col != 0 &&
+- (curwin->w_cursor.col + 1 == (colnr_T)STRLEN(ml_get_curline())))
+- return;
+-
+- if (!curwin->w_cursor.col && p_ri)
+- return;
+-
+- if (p_ri)
+- dec_cursor();
+- else
+- inc_cursor();
+-
+- switch (gchar_cursor())
+- {
+- case ALEF:
+- tempc = ALEF_;
+- break;
+- case ALEF_U_H:
+- tempc = ALEF_U_H_;
+- break;
+- case _AYN:
+- tempc = _AYN_;
+- break;
+- case AYN:
+- tempc = AYN_;
+- break;
+- case _GHAYN:
+- tempc = _GHAYN_;
+- break;
+- case GHAYN:
+- tempc = GHAYN_;
+- break;
+- case _HE:
+- tempc = _HE_;
+- break;
+- case YE:
+- tempc = YE_;
+- break;
+- case IE:
+- tempc = IE_;
+- break;
+- case TEE:
+- tempc = TEE_;
+- break;
+- case YEE:
+- tempc = YEE_;
+- break;
+- default:
+- tempc = 0;
+- }
+-
+- if (tempc)
+- put_and_redo(tempc);
+-
+- if (p_ri)
+- inc_cursor();
+- else
+- dec_cursor();
+- }
+-
+- /*
+- * Change the character left to the cursor to a X or _X type
+- */
+- static void
+- chg_l_toXor_X(void)
+- {
+- int tempc;
+-
+- if (curwin->w_cursor.col != 0 &&
+- (curwin->w_cursor.col + 1 == (colnr_T)STRLEN(ml_get_curline())))
+- return;
+-
+- if (!curwin->w_cursor.col && p_ri)
+- return;
+-
+- if (p_ri)
+- dec_cursor();
+- else
+- inc_cursor();
+-
+- switch (gchar_cursor())
+- {
+- case ALEF_:
+- tempc = ALEF;
+- break;
+- case ALEF_U_H_:
+- tempc = ALEF_U_H;
+- break;
+- case _AYN_:
+- tempc = _AYN;
+- break;
+- case AYN_:
+- tempc = AYN;
+- break;
+- case _GHAYN_:
+- tempc = _GHAYN;
+- break;
+- case GHAYN_:
+- tempc = GHAYN;
+- break;
+- case _HE_:
+- tempc = _HE;
+- break;
+- case YE_:
+- tempc = YE;
+- break;
+- case IE_:
+- tempc = IE;
+- break;
+- case TEE_:
+- tempc = TEE;
+- break;
+- case YEE_:
+- tempc = YEE;
+- break;
+- default:
+- tempc = 0;
+- }
+-
+- if (tempc)
+- put_and_redo(tempc);
+-
+- if (p_ri)
+- inc_cursor();
+- else
+- dec_cursor();
+- }
+-
+- /*
+- * Change the character right to the cursor to a _X or _X_ type
+- */
+- static void
+- chg_r_to_Xor_X_(void)
+- {
+- int tempc, c;
+-
+- if (curwin->w_cursor.col)
+- {
+- if (!p_ri)
+- dec_cursor();
+-
+- tempc = gchar_cursor();
+-
+- if ((c = toF_Xor_X_(tempc)) != 0)
+- put_and_redo(c);
+-
+- if (!p_ri)
+- inc_cursor();
+-
+- }
+- }
+-
+- /*
+- * Map Farsi keyboard when in fkmap mode.
+- */
+- int
+- fkmap(int c)
+- {
+- int tempc;
+- int insert_mode = (State & INSERT);
+- static int revins = 0;
+-
+- if (IS_SPECIAL(c))
+- return c;
+-
+- if (insert_mode)
+- {
+- if (VIM_ISDIGIT(c) || ((c == '.' || c == '+' || c == '-' ||
+- c == '^' || c == '%' || c == '#' || c == '=') && revins))
+- {
+- /* Numbers are entered left-to-right. */
+- if (!revins)
+- {
+- if (curwin->w_cursor.col)
+- {
+- if (!p_ri)
+- dec_cursor();
+-
+- chg_c_toX_orX ();
+- chg_l_toXor_X ();
+-
+- if (!p_ri)
+- inc_cursor();
+- }
+- }
+-
+- arrow_used = TRUE;
+- (void)stop_arrow();
+-
+- if (!curwin->w_p_rl && revins)
+- inc_cursor();
+-
+- ++revins;
+- p_ri = 1;
+- }
+- else if (revins)
+- {
+- /* Stop entering number. */
+- arrow_used = TRUE;
+- (void)stop_arrow();
+-
+- revins = 0;
+- if (curwin->w_p_rl)
+- {
+- while ((F_isdigit(gchar_cursor())
+- || (gchar_cursor() == F_PERIOD
+- || gchar_cursor() == F_PLUS
+- || gchar_cursor() == F_MINUS
+- || gchar_cursor() == F_MUL
+- || gchar_cursor() == F_DIVIDE
+- || gchar_cursor() == F_PERCENT
+- || gchar_cursor() == F_EQUALS))
+- && gchar_cursor() != NUL)
+- ++curwin->w_cursor.col;
+- }
+- else
+- {
+- if (curwin->w_cursor.col)
+- while ((F_isdigit(gchar_cursor())
+- || (gchar_cursor() == F_PERIOD
+- || gchar_cursor() == F_PLUS
+- || gchar_cursor() == F_MINUS
+- || gchar_cursor() == F_MUL
+- || gchar_cursor() == F_DIVIDE
+- || gchar_cursor() == F_PERCENT
+- || gchar_cursor() == F_EQUALS))
+- && --curwin->w_cursor.col)
+- ;
+-
+- if (!F_isdigit(gchar_cursor()))
+- ++curwin->w_cursor.col;
+- }
+- }
+- }
+-
+- if (!revins)
+- {
+- if (curwin->w_p_rl)
+- p_ri = 0;
+- if (!curwin->w_p_rl)
+- p_ri = 1;
+- }
+-
+- if ((c < 0x100) && (isalpha(c) || c == '&' || c == '^' || c == ';' ||
+- c == '\''|| c == ',' || c == '[' ||
+- c == ']' || c == '{' || c == '}'))
+- chg_r_to_Xor_X_();
+-
+- tempc = 0;
+-
+- switch (c)
+- {
+- case '`':
+- case ' ':
+- case '.':
+- case '!':
+- case '"':
+- case '$':
+- case '%':
+- case '^':
+- case '&':
+- case '/':
+- case '(':
+- case ')':
+- case '=':
+- case '\\':
+- case '?':
+- case '+':
+- case '-':
+- case '_':
+- case '*':
+- case ':':
+- case '#':
+- case '~':
+- case '@':
+- case '<':
+- case '>':
+- case '{':
+- case '}':
+- case '|':
+- case '0':
+- case '1':
+- case '2':
+- case '3':
+- case '4':
+- case '5':
+- case '6':
+- case '7':
+- case '8':
+- case '9':
+- case 'B':
+- case 'E':
+- case 'F':
+- case 'H':
+- case 'I':
+- case 'K':
+- case 'L':
+- case 'M':
+- case 'O':
+- case 'P':
+- case 'Q':
+- case 'R':
+- case 'T':
+- case 'U':
+- case 'W':
+- case 'Y':
+- case NL:
+- case TAB:
+-
+- if (p_ri && c == NL && curwin->w_cursor.col && insert_mode)
+- {
+- /*
+- * If the char before the cursor is _X_ or X_ do not change
+- * the one under the cursor with X type.
+- */
+- dec_cursor();
+-
+- if (F_isalpha(gchar_cursor()))
+- {
+- inc_cursor();
+- return NL;
+- }
+-
+- inc_cursor();
+- }
+-
+- if (!p_ri && !curwin->w_cursor.col)
+- {
+- switch (c)
+- {
+- case '0': return FARSI_0;
+- case '1': return FARSI_1;
+- case '2': return FARSI_2;
+- case '3': return FARSI_3;
+- case '4': return FARSI_4;
+- case '5': return FARSI_5;
+- case '6': return FARSI_6;
+- case '7': return FARSI_7;
+- case '8': return FARSI_8;
+- case '9': return FARSI_9;
+- case 'B': return F_PSP;
+- case 'E': return JAZR_N;
+- case 'F': return ALEF_D_H;
+- case 'H': return ALEF_A;
+- case 'I': return TASH;
+- case 'K': return F_LQUOT;
+- case 'L': return F_RQUOT;
+- case 'M': return HAMZE;
+- case 'O': return '[';
+- case 'P': return ']';
+- case 'Q': return OO;
+- case 'R': return MAD_N;
+- case 'T': return OW;
+- case 'U': return MAD;
+- case 'W': return OW_OW;
+- case 'Y': return JAZR;
+- case '`': return F_PCN;
+- case '!': return F_EXCL;
+- case '@': return F_COMMA;
+- case '#': return F_DIVIDE;
+- case '$': return F_CURRENCY;
+- case '%': return F_PERCENT;
+- case '^': return F_MUL;
+- case '&': return F_BCOMMA;
+- case '*': return F_STAR;
+- case '(': return F_LPARENT;
+- case ')': return F_RPARENT;
+- case '-': return F_MINUS;
+- case '_': return F_UNDERLINE;
+- case '=': return F_EQUALS;
+- case '+': return F_PLUS;
+- case '\\': return F_BSLASH;
+- case '|': return F_PIPE;
+- case ':': return F_DCOLON;
+- case '"': return F_SEMICOLON;
+- case '.': return F_PERIOD;
+- case '/': return F_SLASH;
+- case '<': return F_LESS;
+- case '>': return F_GREATER;
+- case '?': return F_QUESTION;
+- case ' ': return F_BLANK;
+- }
+- break;
+- }
+-
+- if (insert_mode)
+- {
+- if (!p_ri)
+- dec_cursor();
+-
+- switch ((tempc = gchar_cursor()))
+- {
+- case _BE:
+- case _PE:
+- case _TE:
+- case _SE:
+- case _JIM:
+- case _CHE:
+- case _HE_J:
+- case _XE:
+- case _SIN:
+- case _SHIN:
+- case _SAD:
+- case _ZAD:
+- case _FE:
+- case _GHAF:
+- case _KAF:
+- case _KAF_H:
+- case _GAF:
+- case _LAM:
+- case _MIM:
+- case _NOON:
+- case _HE:
+- case _HE_:
+- case _TA:
+- case _ZA:
+- put_curr_and_l_to_X(toF_TyA(tempc));
+- break;
+- case _AYN:
+- case _AYN_:
+-
+- if (!p_ri)
+- if (!curwin->w_cursor.col)
+- {
+- put_curr_and_l_to_X(AYN);
+- break;
+- }
+-
+- if (p_ri)
+- inc_cursor();
+- else
+- dec_cursor();
+-
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- tempc = AYN_;
+- else
+- tempc = AYN;
+-
+- if (p_ri)
+- dec_cursor();
+- else
+- inc_cursor();
+-
+- put_curr_and_l_to_X(tempc);
+-
+- break;
+- case _GHAYN:
+- case _GHAYN_:
+-
+- if (!p_ri)
+- if (!curwin->w_cursor.col)
+- {
+- put_curr_and_l_to_X(GHAYN);
+- break;
+- }
+-
+- if (p_ri)
+- inc_cursor();
+- else
+- dec_cursor();
+-
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- tempc = GHAYN_;
+- else
+- tempc = GHAYN;
+-
+- if (p_ri)
+- dec_cursor();
+- else
+- inc_cursor();
+-
+- put_curr_and_l_to_X(tempc);
+- break;
+- case _YE:
+- case _IE:
+- case _YEE:
+- if (!p_ri)
+- if (!curwin->w_cursor.col)
+- {
+- put_curr_and_l_to_X((tempc == _YE ? YE :
+- (tempc == _IE ? IE : YEE)));
+- break;
+- }
+-
+- if (p_ri)
+- inc_cursor();
+- else
+- dec_cursor();
+-
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- tempc = (tempc == _YE ? YE_ :
+- (tempc == _IE ? IE_ : YEE_));
+- else
+- tempc = (tempc == _YE ? YE :
+- (tempc == _IE ? IE : YEE));
+-
+- if (p_ri)
+- dec_cursor();
+- else
+- inc_cursor();
+-
+- put_curr_and_l_to_X(tempc);
+- break;
+- }
+-
+- if (!p_ri)
+- inc_cursor();
+- }
+-
+- tempc = 0;
+-
+- switch (c)
+- {
+- case '0': return FARSI_0;
+- case '1': return FARSI_1;
+- case '2': return FARSI_2;
+- case '3': return FARSI_3;
+- case '4': return FARSI_4;
+- case '5': return FARSI_5;
+- case '6': return FARSI_6;
+- case '7': return FARSI_7;
+- case '8': return FARSI_8;
+- case '9': return FARSI_9;
+- case 'B': return F_PSP;
+- case 'E': return JAZR_N;
+- case 'F': return ALEF_D_H;
+- case 'H': return ALEF_A;
+- case 'I': return TASH;
+- case 'K': return F_LQUOT;
+- case 'L': return F_RQUOT;
+- case 'M': return HAMZE;
+- case 'O': return '[';
+- case 'P': return ']';
+- case 'Q': return OO;
+- case 'R': return MAD_N;
+- case 'T': return OW;
+- case 'U': return MAD;
+- case 'W': return OW_OW;
+- case 'Y': return JAZR;
+- case '`': return F_PCN;
+- case '!': return F_EXCL;
+- case '@': return F_COMMA;
+- case '#': return F_DIVIDE;
+- case '$': return F_CURRENCY;
+- case '%': return F_PERCENT;
+- case '^': return F_MUL;
+- case '&': return F_BCOMMA;
+- case '*': return F_STAR;
+- case '(': return F_LPARENT;
+- case ')': return F_RPARENT;
+- case '-': return F_MINUS;
+- case '_': return F_UNDERLINE;
+- case '=': return F_EQUALS;
+- case '+': return F_PLUS;
+- case '\\': return F_BSLASH;
+- case '|': return F_PIPE;
+- case ':': return F_DCOLON;
+- case '"': return F_SEMICOLON;
+- case '.': return F_PERIOD;
+- case '/': return F_SLASH;
+- case '<': return F_LESS;
+- case '>': return F_GREATER;
+- case '?': return F_QUESTION;
+- case ' ': return F_BLANK;
+- }
+- break;
+-
+- case 'a':
+- tempc = _SHIN;
+- break;
+- case 'A':
+- tempc = WAW_H;
+- break;
+- case 'b':
+- tempc = ZAL;
+- break;
+- case 'c':
+- tempc = ZE;
+- break;
+- case 'C':
+- tempc = JE;
+- break;
+- case 'd':
+- tempc = _YE;
+- break;
+- case 'D':
+- tempc = _YEE;
+- break;
+- case 'e':
+- tempc = _SE;
+- break;
+- case 'f':
+- tempc = _BE;
+- break;
+- case 'g':
+- tempc = _LAM;
+- break;
+- case 'G':
+- if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
+- {
+-
+- if (gchar_cursor() == _LAM)
+- chg_c_toX_orX ();
+- else if (p_ri)
+- chg_c_to_X_or_X ();
+- }
+-
+- if (!p_ri)
+- if (!curwin->w_cursor.col)
+- return ALEF_U_H;
+-
+- if (!p_ri)
+- dec_cursor();
+-
+- if (gchar_cursor() == _LAM)
+- {
+- chg_c_toX_orX ();
+- chg_l_toXor_X ();
+- tempc = ALEF_U_H;
+- }
+- else if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- {
+- tempc = ALEF_U_H_;
+- chg_l_toXor_X ();
+- }
+- else
+- tempc = ALEF_U_H;
+-
+- if (!p_ri)
+- inc_cursor();
+-
+- return tempc;
+- case 'h':
+- if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
+- {
+- if (p_ri)
+- chg_c_to_X_or_X ();
+-
+- }
+-
+- if (!p_ri)
+- if (!curwin->w_cursor.col)
+- return ALEF;
+-
+- if (!p_ri)
+- dec_cursor();
+-
+- if (gchar_cursor() == _LAM)
+- {
+- chg_l_toXor_X();
+- del_char(FALSE);
+- AppendCharToRedobuff(K_BS);
+-
+- if (!p_ri)
+- dec_cursor();
+-
+- tempc = LA;
+- }
+- else
+- {
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- {
+- tempc = ALEF_;
+- chg_l_toXor_X ();
+- }
+- else
+- tempc = ALEF;
+- }
+-
+- if (!p_ri)
+- inc_cursor();
+-
+- return tempc;
+- case 'i':
+- if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
+- {
+- if (!p_ri && !F_is_TyE(tempc))
+- chg_c_to_X_orX_ ();
+- if (p_ri)
+- chg_c_to_X_or_X ();
+-
+- }
+-
+- if (!p_ri && !curwin->w_cursor.col)
+- return _HE;
+-
+- if (!p_ri)
+- dec_cursor();
+-
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- tempc = _HE_;
+- else
+- tempc = _HE;
+-
+- if (!p_ri)
+- inc_cursor();
+- break;
+- case 'j':
+- tempc = _TE;
+- break;
+- case 'J':
+- if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
+- {
+- if (p_ri)
+- chg_c_to_X_or_X ();
+-
+- }
+-
+- if (!p_ri)
+- if (!curwin->w_cursor.col)
+- return TEE;
+-
+- if (!p_ri)
+- dec_cursor();
+-
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- {
+- tempc = TEE_;
+- chg_l_toXor_X ();
+- }
+- else
+- tempc = TEE;
+-
+- if (!p_ri)
+- inc_cursor();
+-
+- return tempc;
+- case 'k':
+- tempc = _NOON;
+- break;
+- case 'l':
+- tempc = _MIM;
+- break;
+- case 'm':
+- tempc = _PE;
+- break;
+- case 'n':
+- case 'N':
+- tempc = DAL;
+- break;
+- case 'o':
+- tempc = _XE;
+- break;
+- case 'p':
+- tempc = _HE_J;
+- break;
+- case 'q':
+- tempc = _ZAD;
+- break;
+- case 'r':
+- tempc = _GHAF;
+- break;
+- case 's':
+- tempc = _SIN;
+- break;
+- case 'S':
+- tempc = _IE;
+- break;
+- case 't':
+- tempc = _FE;
+- break;
+- case 'u':
+- if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
+- {
+- if (!p_ri && !F_is_TyE(tempc))
+- chg_c_to_X_orX_ ();
+- if (p_ri)
+- chg_c_to_X_or_X ();
+-
+- }
+-
+- if (!p_ri && !curwin->w_cursor.col)
+- return _AYN;
+-
+- if (!p_ri)
+- dec_cursor();
+-
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- tempc = _AYN_;
+- else
+- tempc = _AYN;
+-
+- if (!p_ri)
+- inc_cursor();
+- break;
+- case 'v':
+- case 'V':
+- tempc = RE;
+- break;
+- case 'w':
+- tempc = _SAD;
+- break;
+- case 'x':
+- case 'X':
+- tempc = _TA;
+- break;
+- case 'y':
+- if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
+- {
+- if (!p_ri && !F_is_TyE(tempc))
+- chg_c_to_X_orX_ ();
+- if (p_ri)
+- chg_c_to_X_or_X ();
+-
+- }
+-
+- if (!p_ri && !curwin->w_cursor.col)
+- return _GHAYN;
+-
+- if (!p_ri)
+- dec_cursor();
+-
+- if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
+- tempc = _GHAYN_;
+- else
+- tempc = _GHAYN;
+-
+- if (!p_ri)
+- inc_cursor();
+-
+- break;
+- case 'z':
+- tempc = _ZA;
+- break;
+- case 'Z':
+- tempc = _KAF_H;
+- break;
+- case ';':
+- tempc = _KAF;
+- break;
+- case '\'':
+- tempc = _GAF;
+- break;
+- case ',':
+- tempc = WAW;
+- break;
+- case '[':
+- tempc = _JIM;
+- break;
+- case ']':
+- tempc = _CHE;
+- break;
+- }
+-
+- if (F_isalpha(tempc) || F_isdigit(tempc))
+- {
+- if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
+- {
+- if (!p_ri && !F_is_TyE(tempc))
+- chg_c_to_X_orX_();
+- if (p_ri)
+- chg_c_to_X_or_X();
+- }
+-
+- if (curwin->w_cursor.col)
+- {
+- if (!p_ri)
+- dec_cursor();
+-
+- if (F_is_TyE(tempc))
+- chg_l_toXor_X();
+- else
+- chg_l_to_X_orX_();
+-
+- if (!p_ri)
+- inc_cursor();
+- }
+- }
+- if (tempc)
+- return tempc;
+- return c;
+- }
+-
+- /*
+- * Convert a none leading Farsi char into a leading type.
+- */
+- static int
+- toF_leading(int c)
+- {
+- switch (c)
+- {
+- case ALEF_: return ALEF;
+- case ALEF_U_H_: return ALEF_U_H;
+- case BE: return _BE;
+- case PE: return _PE;
+- case TE: return _TE;
+- case SE: return _SE;
+- case JIM: return _JIM;
+- case CHE: return _CHE;
+- case HE_J: return _HE_J;
+- case XE: return _XE;
+- case SIN: return _SIN;
+- case SHIN: return _SHIN;
+- case SAD: return _SAD;
+- case ZAD: return _ZAD;
+-
+- case AYN:
+- case AYN_:
+- case _AYN_: return _AYN;
+-
+- case GHAYN:
+- case GHAYN_:
+- case _GHAYN_: return _GHAYN;
+-
+- case FE: return _FE;
+- case GHAF: return _GHAF;
+- case KAF: return _KAF;
+- case GAF: return _GAF;
+- case LAM: return _LAM;
+- case MIM: return _MIM;
+- case NOON: return _NOON;
+-
+- case _HE_:
+- case F_HE: return _HE;
+-
+- case YE:
+- case YE_: return _YE;
+-
+- case IE_:
+- case IE: return _IE;
+-
+- case YEE:
+- case YEE_: return _YEE;
+- }
+- return c;
+- }
+-
+- /*
+- * Convert a given Farsi char into right joining type.
+- */
+- static int
+- toF_Rjoin(int c)
+- {
+- switch (c)
+- {
+- case ALEF: return ALEF_;
+- case ALEF_U_H: return ALEF_U_H_;
+- case BE: return _BE;
+- case PE: return _PE;
+- case TE: return _TE;
+- case SE: return _SE;
+- case JIM: return _JIM;
+- case CHE: return _CHE;
+- case HE_J: return _HE_J;
+- case XE: return _XE;
+- case SIN: return _SIN;
+- case SHIN: return _SHIN;
+- case SAD: return _SAD;
+- case ZAD: return _ZAD;
+-
+- case AYN:
+- case AYN_:
+- case _AYN: return _AYN_;
+-
+- case GHAYN:
+- case GHAYN_:
+- case _GHAYN_: return _GHAYN_;
+-
+- case FE: return _FE;
+- case GHAF: return _GHAF;
+- case KAF: return _KAF;
+- case GAF: return _GAF;
+- case LAM: return _LAM;
+- case MIM: return _MIM;
+- case NOON: return _NOON;
+-
+- case _HE:
+- case F_HE: return _HE_;
+-
+- case YE:
+- case YE_: return _YE;
+-
+- case IE_:
+- case IE: return _IE;
+-
+- case TEE: return TEE_;
+-
+- case YEE:
+- case YEE_: return _YEE;
+- }
+- return c;
+- }
+-
+- /*
+- * Can a given Farsi character join via its left edj.
+- */
+- static int
+- canF_Ljoin(int c)
+- {
+- switch (c)
+- {
+- case _BE:
+- case BE:
+- case PE:
+- case _PE:
+- case TE:
+- case _TE:
+- case SE:
+- case _SE:
+- case JIM:
+- case _JIM:
+- case CHE:
+- case _CHE:
+- case HE_J:
+- case _HE_J:
+- case XE:
+- case _XE:
+- case SIN:
+- case _SIN:
+- case SHIN:
+- case _SHIN:
+- case SAD:
+- case _SAD:
+- case ZAD:
+- case _ZAD:
+- case _TA:
+- case _ZA:
+- case AYN:
+- case _AYN:
+- case _AYN_:
+- case AYN_:
+- case GHAYN:
+- case GHAYN_:
+- case _GHAYN_:
+- case _GHAYN:
+- case FE:
+- case _FE:
+- case GHAF:
+- case _GHAF:
+- case _KAF_H:
+- case KAF:
+- case _KAF:
+- case GAF:
+- case _GAF:
+- case LAM:
+- case _LAM:
+- case MIM:
+- case _MIM:
+- case NOON:
+- case _NOON:
+- case IE:
+- case _IE:
+- case IE_:
+- case YE:
+- case _YE:
+- case YE_:
+- case YEE:
+- case _YEE:
+- case YEE_:
+- case F_HE:
+- case _HE:
+- case _HE_:
+- return TRUE;
+- }
+- return FALSE;
+- }
+-
+- /*
+- * Can a given Farsi character join via its right edj.
+- */
+- static int
+- canF_Rjoin(int c)
+- {
+- switch (c)
+- {
+- case ALEF:
+- case ALEF_:
+- case ALEF_U_H:
+- case ALEF_U_H_:
+- case DAL:
+- case ZAL:
+- case RE:
+- case JE:
+- case ZE:
+- case TEE:
+- case TEE_:
+- case WAW:
+- case WAW_H:
+- return TRUE;
+- }
+-
+- return canF_Ljoin(c);
+-
+- }
+-
+- /*
+- * is a given Farsi character a terminating type.
+- */
+- static int
+- F_isterm(int c)
+- {
+- switch (c)
+- {
+- case ALEF:
+- case ALEF_:
+- case ALEF_U_H:
+- case ALEF_U_H_:
+- case DAL:
+- case ZAL:
+- case RE:
+- case JE:
+- case ZE:
+- case WAW:
+- case WAW_H:
+- case TEE:
+- case TEE_:
+- return TRUE;
+- }
+-
+- return FALSE;
+- }
+-
+- /*
+- * Convert the given Farsi character into a ending type .
+- */
+- static int
+- toF_ending(int c)
+- {
+- switch (c)
+- {
+- case _BE: return BE;
+- case _PE: return PE;
+- case _TE: return TE;
+- case _SE: return SE;
+- case _JIM: return JIM;
+- case _CHE: return CHE;
+- case _HE_J: return HE_J;
+- case _XE: return XE;
+- case _SIN: return SIN;
+- case _SHIN: return SHIN;
+- case _SAD: return SAD;
+- case _ZAD: return ZAD;
+- case _AYN: return AYN;
+- case _AYN_: return AYN_;
+- case _GHAYN: return GHAYN;
+- case _GHAYN_: return GHAYN_;
+- case _FE: return FE;
+- case _GHAF: return GHAF;
+- case _KAF_H:
+- case _KAF: return KAF;
+- case _GAF: return GAF;
+- case _LAM: return LAM;
+- case _MIM: return MIM;
+- case _NOON: return NOON;
+- case _YE: return YE_;
+- case YE_: return YE;
+- case _YEE: return YEE_;
+- case YEE_: return YEE;
+- case TEE: return TEE_;
+- case _IE: return IE_;
+- case IE_: return IE;
+- case _HE:
+- case _HE_: return F_HE;
+- }
+- return c;
+- }
+-
+- /*
+- * Convert the Farsi 3342 standard into Farsi VIM.
+- */
+- static void
+- conv_to_pvim(void)
+- {
+- char_u *ptr;
+- int lnum, llen, i;
+-
+- for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum)
+- {
+- ptr = ml_get((linenr_T)lnum);
+-
+- llen = (int)STRLEN(ptr);
+-
+- for (i = 0; i < llen-1; i++)
+- {
+- if (canF_Ljoin(ptr[i]) && canF_Rjoin(ptr[i+1]))
+- {
+- ptr[i] = toF_leading(ptr[i]);
+- ++i;
+-
+- while (i < llen && canF_Rjoin(ptr[i]))
+- {
+- ptr[i] = toF_Rjoin(ptr[i]);
+- if (F_isterm(ptr[i]) || !F_isalpha(ptr[i]))
+- break;
+- ++i;
+- }
+- if (!F_isalpha(ptr[i]) || !canF_Rjoin(ptr[i]))
+- ptr[i-1] = toF_ending(ptr[i-1]);
+- }
+- else
+- ptr[i] = toF_TyA(ptr[i]);
+- }
+- }
+-
+- /*
+- * Following lines contains Farsi encoded character.
+- */
+-
+- do_cmdline_cmd((char_u *)"%s/\202\231/\232/ge");
+- do_cmdline_cmd((char_u *)"%s/\201\231/\370\334/ge");
+-
+- /* Assume the screen has been messed up: clear it and redraw. */
+- redraw_later(CLEAR);
+- msg_attr(farsi_text_1, HL_ATTR(HLF_S));
+- }
+-
+- /*
+- * Convert the Farsi VIM into Farsi 3342 standard.
+- */
+- static void
+- conv_to_pstd(void)
+- {
+- char_u *ptr;
+- int lnum, llen, i;
+-
+- /*
+- * Following line contains Farsi encoded character.
+- */
+- do_cmdline_cmd((char_u *)"%s/\232/\202\231/ge");
+-
+- for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum)
+- {
+- ptr = ml_get((linenr_T)lnum);
+- llen = (int)STRLEN(ptr);
+-
+- for (i = 0; i < llen; i++)
+- ptr[i] = toF_TyA(ptr[i]);
+- }
+-
+- /* Assume the screen has been messed up: clear it and redraw. */
+- redraw_later(CLEAR);
+- msg_attr(farsi_text_2, HL_ATTR(HLF_S));
+- }
+-
+- /*
+- * left-right swap the characters in buf[len].
+- */
+- static void
+- lrswapbuf(char_u *buf, int len)
+- {
+- char_u *s, *e;
+- int c;
+-
+- s = buf;
+- e = buf + len - 1;
+-
+- while (e > s)
+- {
+- c = *s;
+- *s = *e;
+- *e = c;
+- ++s;
+- --e;
+- }
+- }
+-
+- /*
+- * swap all the characters in reverse direction
+- */
+- char_u *
+- lrswap(char_u *ibuf)
+- {
+- if (ibuf != NULL && *ibuf != NUL)
+- lrswapbuf(ibuf, (int)STRLEN(ibuf));
+- return ibuf;
+- }
+-
+- /*
+- * swap all the Farsi characters in reverse direction
+- */
+- char_u *
+- lrFswap(char_u *cmdbuf, int len)
+- {
+- int i, cnt;
+-
+- if (cmdbuf == NULL)
+- return cmdbuf;
+-
+- if (len == 0 && (len = (int)STRLEN(cmdbuf)) == 0)
+- return cmdbuf;
+-
+- for (i = 0; i < len; i++)
+- {
+- for (cnt = 0; i + cnt < len
+- && (F_isalpha(cmdbuf[i + cnt])
+- || F_isdigit(cmdbuf[i + cnt])
+- || cmdbuf[i + cnt] == ' '); ++cnt)
+- ;
+-
+- lrswapbuf(cmdbuf + i, cnt);
+- i += cnt;
+- }
+- return cmdbuf;
+- }
+-
+- /*
+- * Reverse the characters in the search path and substitute section
+- * accordingly.
+- * TODO: handle different separator characters. Use skip_regexp().
+- */
+- char_u *
+- lrF_sub(char_u *ibuf)
+- {
+- char_u *p, *ep;
+- int i, cnt;
+-
+- p = ibuf;
+-
+- /* Find the boundary of the search path */
+- while (((p = vim_strchr(p + 1, '/')) != NULL) && p[-1] == '\\')
+- ;
+-
+- if (p == NULL)
+- return ibuf;
+-
+- /* Reverse the Farsi characters in the search path. */
+- lrFswap(ibuf, (int)(p-ibuf));
+-
+- /* Now find the boundary of the substitute section */
+- if ((ep = (char_u *)strrchr((char *)++p, '/')) != NULL)
+- cnt = (int)(ep - p);
+- else
+- cnt = (int)STRLEN(p);
+-
+- /* Reverse the characters in the substitute section and take care of '\' */
+- for (i = 0; i < cnt-1; i++)
+- if (p[i] == '\\')
+- {
+- p[i] = p[i+1] ;
+- p[++i] = '\\';
+- }
+-
+- lrswapbuf(p, cnt);
+-
+- return ibuf;
+- }
+-
+- /*
+- * Map Farsi keyboard when in cmd_fkmap mode.
+- */
+- int
+- cmdl_fkmap(int c)
+- {
+- int tempc;
+-
+- switch (c)
+- {
+- case '0':
+- case '1':
+- case '2':
+- case '3':
+- case '4':
+- case '5':
+- case '6':
+- case '7':
+- case '8':
+- case '9':
+- case '`':
+- case ' ':
+- case '.':
+- case '!':
+- case '"':
+- case '$':
+- case '%':
+- case '^':
+- case '&':
+- case '/':
+- case '(':
+- case ')':
+- case '=':
+- case '\\':
+- case '?':
+- case '+':
+- case '-':
+- case '_':
+- case '*':
+- case ':':
+- case '#':
+- case '~':
+- case '@':
+- case '<':
+- case '>':
+- case '{':
+- case '}':
+- case '|':
+- case 'B':
+- case 'E':
+- case 'F':
+- case 'H':
+- case 'I':
+- case 'K':
+- case 'L':
+- case 'M':
+- case 'O':
+- case 'P':
+- case 'Q':
+- case 'R':
+- case 'T':
+- case 'U':
+- case 'W':
+- case 'Y':
+- case NL:
+- case TAB:
+-
+- switch ((tempc = cmd_gchar(AT_CURSOR)))
+- {
+- case _BE:
+- case _PE:
+- case _TE:
+- case _SE:
+- case _JIM:
+- case _CHE:
+- case _HE_J:
+- case _XE:
+- case _SIN:
+- case _SHIN:
+- case _SAD:
+- case _ZAD:
+- case _AYN:
+- case _GHAYN:
+- case _FE:
+- case _GHAF:
+- case _KAF:
+- case _GAF:
+- case _LAM:
+- case _MIM:
+- case _NOON:
+- case _HE:
+- case _HE_:
+- cmd_pchar(toF_TyA(tempc), AT_CURSOR);
+- break;
+- case _AYN_:
+- cmd_pchar(AYN_, AT_CURSOR);
+- break;
+- case _GHAYN_:
+- cmd_pchar(GHAYN_, AT_CURSOR);
+- break;
+- case _IE:
+- if (F_is_TyB_TyC_TyD(SRC_CMD, AT_CURSOR+1))
+- cmd_pchar(IE_, AT_CURSOR);
+- else
+- cmd_pchar(IE, AT_CURSOR);
+- break;
+- case _YEE:
+- if (F_is_TyB_TyC_TyD(SRC_CMD, AT_CURSOR+1))
+- cmd_pchar(YEE_, AT_CURSOR);
+- else
+- cmd_pchar(YEE, AT_CURSOR);
+- break;
+- case _YE:
+- if (F_is_TyB_TyC_TyD(SRC_CMD, AT_CURSOR+1))
+- cmd_pchar(YE_, AT_CURSOR);
+- else
+- cmd_pchar(YE, AT_CURSOR);
+- }
+-
+- switch (c)
+- {
+- case '0': return FARSI_0;
+- case '1': return FARSI_1;
+- case '2': return FARSI_2;
+- case '3': return FARSI_3;
+- case '4': return FARSI_4;
+- case '5': return FARSI_5;
+- case '6': return FARSI_6;
+- case '7': return FARSI_7;
+- case '8': return FARSI_8;
+- case '9': return FARSI_9;
+- case 'B': return F_PSP;
+- case 'E': return JAZR_N;
+- case 'F': return ALEF_D_H;
+- case 'H': return ALEF_A;
+- case 'I': return TASH;
+- case 'K': return F_LQUOT;
+- case 'L': return F_RQUOT;
+- case 'M': return HAMZE;
+- case 'O': return '[';
+- case 'P': return ']';
+- case 'Q': return OO;
+- case 'R': return MAD_N;
+- case 'T': return OW;
+- case 'U': return MAD;
+- case 'W': return OW_OW;
+- case 'Y': return JAZR;
+- case '`': return F_PCN;
+- case '!': return F_EXCL;
+- case '@': return F_COMMA;
+- case '#': return F_DIVIDE;
+- case '$': return F_CURRENCY;
+- case '%': return F_PERCENT;
+- case '^': return F_MUL;
+- case '&': return F_BCOMMA;
+- case '*': return F_STAR;
+- case '(': return F_LPARENT;
+- case ')': return F_RPARENT;
+- case '-': return F_MINUS;
+- case '_': return F_UNDERLINE;
+- case '=': return F_EQUALS;
+- case '+': return F_PLUS;
+- case '\\': return F_BSLASH;
+- case '|': return F_PIPE;
+- case ':': return F_DCOLON;
+- case '"': return F_SEMICOLON;
+- case '.': return F_PERIOD;
+- case '/': return F_SLASH;
+- case '<': return F_LESS;
+- case '>': return F_GREATER;
+- case '?': return F_QUESTION;
+- case ' ': return F_BLANK;
+- }
+-
+- break;
+-
+- case 'a': return _SHIN;
+- case 'A': return WAW_H;
+- case 'b': return ZAL;
+- case 'c': return ZE;
+- case 'C': return JE;
+- case 'd': return _YE;
+- case 'D': return _YEE;
+- case 'e': return _SE;
+- case 'f': return _BE;
+- case 'g': return _LAM;
+- case 'G':
+- if (cmd_gchar(AT_CURSOR) == _LAM)
+- {
+- cmd_pchar(LAM, AT_CURSOR);
+- return ALEF_U_H;
+- }
+-
+- if (F_is_TyB_TyC_TyD(SRC_CMD, AT_CURSOR))
+- return ALEF_U_H_;
+- else
+- return ALEF_U_H;
+- case 'h':
+- if (cmd_gchar(AT_CURSOR) == _LAM)
+- {
+- cmd_pchar(LA, AT_CURSOR);
+- redrawcmdline();
+- return K_IGNORE;
+- }
+-
+- if (F_is_TyB_TyC_TyD(SRC_CMD, AT_CURSOR))
+- return ALEF_;
+- else
+- return ALEF;
+- case 'i':
+- if (F_is_TyB_TyC_TyD(SRC_CMD, AT_CURSOR))
+- return _HE_;
+- else
+- return _HE;
+- case 'j': return _TE;
+- case 'J':
+- if (F_is_TyB_TyC_TyD(SRC_CMD, AT_CURSOR))
+- return TEE_;
+- else
+- return TEE;
+- case 'k': return _NOON;
+- case 'l': return _MIM;
+- case 'm': return _PE;
+- case 'n':
+- case 'N': return DAL;
+- case 'o': return _XE;
+- case 'p': return _HE_J;
+- case 'q': return _ZAD;
+- case 'r': return _GHAF;
+- case 's': return _SIN;
+- case 'S': return _IE;
+- case 't': return _FE;
+- case 'u':
+- if (F_is_TyB_TyC_TyD(SRC_CMD, AT_CURSOR))
+- return _AYN_;
+- else
+- return _AYN;
+- case 'v':
+- case 'V': return RE;
+- case 'w': return _SAD;
+- case 'x':
+- case 'X': return _TA;
+- case 'y':
+- if (F_is_TyB_TyC_TyD(SRC_CMD, AT_CURSOR))
+- return _GHAYN_;
+- else
+- return _GHAYN;
+- case 'z':
+- case 'Z': return _ZA;
+- case ';': return _KAF;
+- case '\'': return _GAF;
+- case ',': return WAW;
+- case '[': return _JIM;
+- case ']': return _CHE;
+- }
+-
+- return c;
+- }
+-
+- /*
+- * F_isalpha returns TRUE if 'c' is a Farsi alphabet
+- */
+- int
+- F_isalpha(int c)
+- {
+- return ((c >= TEE_ && c <= _YE)
+- || (c >= ALEF_A && c <= YE)
+- || (c >= _IE && c <= YE_));
+- }
+-
+- /*
+- * F_isdigit returns TRUE if 'c' is a Farsi digit
+- */
+- int
+- F_isdigit(int c)
+- {
+- return (c >= FARSI_0 && c <= FARSI_9);
+- }
+-
+- /*
+- * F_ischar returns TRUE if 'c' is a Farsi character.
+- */
+- int
+- F_ischar(int c)
+- {
+- return (c >= TEE_ && c <= YE_);
+- }
+-
+- void
+- farsi_f8(cmdarg_T *cap UNUSED)
+- {
+- if (p_altkeymap)
+- {
+- if (curwin->w_farsi & W_R_L)
+- {
+- p_fkmap = 0;
+- do_cmdline_cmd((char_u *)"set norl");
+- msg("");
+- }
+- else
+- {
+- p_fkmap = 1;
+- do_cmdline_cmd((char_u *)"set rl");
+- msg("");
+- }
+-
+- curwin->w_farsi = curwin->w_farsi ^ W_R_L;
+- }
+- }
+-
+- void
+- farsi_f9(cmdarg_T *cap UNUSED)
+- {
+- if (p_altkeymap && curwin->w_p_rl)
+- {
+- curwin->w_farsi = curwin->w_farsi ^ W_CONV;
+- if (curwin->w_farsi & W_CONV)
+- conv_to_pvim();
+- else
+- conv_to_pstd();
+- }
+- }
+-
+- #endif /* FEAT_FKMAP */
+--- 0 ----
+*** ../vim-8.1.0931/src/proto/farsi.pro 2018-05-17 13:52:35.000000000 +0200
+--- src/proto/farsi.pro 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,12 ****
+- /* farsi.c */
+- int fkmap(int c);
+- char_u *lrswap(char_u *ibuf);
+- char_u *lrFswap(char_u *cmdbuf, int len);
+- char_u *lrF_sub(char_u *ibuf);
+- int cmdl_fkmap(int c);
+- int F_isalpha(int c);
+- int F_isdigit(int c);
+- int F_ischar(int c);
+- void farsi_f8(cmdarg_T *cap);
+- void farsi_f9(cmdarg_T *cap);
+- /* vim: set ft=c : */
+--- 0 ----
+*** ../vim-8.1.0931/src/farsi.h 2019-01-19 17:43:03.433449041 +0100
+--- src/farsi.h 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,234 ****
+- /* 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.
+- */
+-
+- /*
+- * Farsi characters are categorized into following types:
+- *
+- * TyA (for capital letter representation)
+- * TyB (for types that look like _X e.g. AYN)
+- * TyC (for types that look like X_ e.g. YE_)
+- * TyD (for types that look like _X_ e.g. _AYN_)
+- * TyE (for types that look like X e.g. RE)
+- */
+-
+- /*
+- * Farsi character set definition
+- */
+-
+- /*
+- * Begin of the non-standard part
+- */
+-
+- #define TEE_ 0x80
+- #define ALEF_U_H_ 0x81
+- #define ALEF_ 0x82
+- #define _BE 0x83
+- #define _PE 0x84
+- #define _TE 0x85
+- #define _SE 0x86
+- #define _JIM 0x87
+- #define _CHE 0x88
+- #define _HE_J 0x89
+- #define _XE 0x8a
+- #define _SIN 0x8b
+- #define _SHIN 0x8c
+- #define _SAD 0x8d
+- #define _ZAD 0x8e
+- #define _AYN 0x8f
+- #define _AYN_ 0x90
+- #define AYN_ 0x91
+- #define _GHAYN 0x92
+- #define _GHAYN_ 0x93
+- #define GHAYN_ 0x94
+- #define _FE 0x95
+- #define _GHAF 0x96
+- #define _KAF 0x97
+- #define _GAF 0x98
+- #define _LAM 0x99
+- #define LA 0x9a
+- #define _MIM 0x9b
+- #define _NOON 0x9c
+- #define _HE 0x9d
+- #define _HE_ 0x9e
+- #define _YE 0x9f
+- #define _IE 0xec
+- #define IE_ 0xed
+- #define IE 0xfb
+- #define _YEE 0xee
+- #define YEE_ 0xef
+- #define YE_ 0xff
+-
+- /*
+- * End of the non-standard part
+- */
+-
+- /*
+- * Standard part
+- */
+-
+- #define F_BLANK 0xa0 /* Farsi ' ' (SP) character */
+- #define F_PSP 0xa1 /* PSP for capitalizing of a character */
+- #define F_PCN 0xa2 /* PCN for redefining of the hamye meaning */
+- #define F_EXCL 0xa3 /* Farsi ! character */
+- #define F_CURRENCY 0xa4 /* Farsi Rial character */
+- #define F_PERCENT 0xa5 /* Farsi % character */
+- #define F_PERIOD 0xa6 /* Farsi '.' character */
+- #define F_COMMA 0xa7 /* Farsi ',' character */
+- #define F_LPARENT 0xa8 /* Farsi '(' character */
+- #define F_RPARENT 0xa9 /* Farsi ')' character */
+- #define F_MUL 0xaa /* Farsi 'x' character */
+- #define F_PLUS 0xab /* Farsi '+' character */
+- #define F_BCOMMA 0xac /* Farsi comma character */
+- #define F_MINUS 0xad /* Farsi '-' character */
+- #define F_DIVIDE 0xae /* Farsi divide (/) character */
+- #define F_SLASH 0xaf /* Farsi '/' character */
+-
+- #define FARSI_0 0xb0
+- #define FARSI_1 0xb1
+- #define FARSI_2 0xb2
+- #define FARSI_3 0xb3
+- #define FARSI_4 0xb4
+- #define FARSI_5 0xb5
+- #define FARSI_6 0xb6
+- #define FARSI_7 0xb7
+- #define FARSI_8 0xb8
+- #define FARSI_9 0xb9
+-
+- #define F_DCOLON 0xba /* Farsi ':' character */
+- #define F_SEMICOLON 0xbb /* Farsi ';' character */
+- #define F_GREATER 0xbc /* Farsi '>' character */
+- #define F_EQUALS 0xbd /* Farsi '=' character */
+- #define F_LESS 0xbe /* Farsi '<' character */
+- #define F_QUESTION 0xbf /* Farsi ? character */
+-
+- #define ALEF_A 0xc0
+- #define ALEF 0xc1
+- #define HAMZE 0xc2
+- #define BE 0xc3
+- #define PE 0xc4
+- #define TE 0xc5
+- #define SE 0xc6
+- #define JIM 0xc7
+- #define CHE 0xc8
+- #define HE_J 0xc9
+- #define XE 0xca
+- #define DAL 0xcb
+- #define ZAL 0xcc
+- #define RE 0xcd
+- #define ZE 0xce
+- #define JE 0xcf
+- #define SIN 0xd0
+- #define SHIN 0xd1
+- #define SAD 0xd2
+- #define ZAD 0xd3
+- #define _TA 0xd4
+- #define _ZA 0xd5
+- #define AYN 0xd6
+- #define GHAYN 0xd7
+- #define FE 0xd8
+- #define GHAF 0xd9
+- #define KAF 0xda
+- #define GAF 0xdb
+- #define LAM 0xdc
+- #define MIM 0xdd
+- #define NOON 0xde
+- #define WAW 0xdf
+- #define F_HE 0xe0 /* F_ added for name clash with Perl */
+- #define YE 0xe1
+- #define TEE 0xfc
+- #define _KAF_H 0xfd
+- #define YEE 0xfe
+-
+- #define F_LBRACK 0xe2 /* Farsi '[' character */
+- #define F_RBRACK 0xe3 /* Farsi ']' character */
+- #define F_LBRACE 0xe4 /* Farsi '{' character */
+- #define F_RBRACE 0xe5 /* Farsi '}' character */
+- #define F_LQUOT 0xe6 /* Farsi left quotation character */
+- #define F_RQUOT 0xe7 /* Farsi right quotation character */
+- #define F_STAR 0xe8 /* Farsi '*' character */
+- #define F_UNDERLINE 0xe9 /* Farsi '_' character */
+- #define F_PIPE 0xea /* Farsi '|' character */
+- #define F_BSLASH 0xeb /* Farsi '\' character */
+-
+- #define MAD 0xf0
+- #define JAZR 0xf1
+- #define OW 0xf2
+- #define MAD_N 0xf3
+- #define JAZR_N 0xf4
+- #define OW_OW 0xf5
+- #define TASH 0xf6
+- #define OO 0xf7
+- #define ALEF_U_H 0xf8
+- #define WAW_H 0xf9
+- #define ALEF_D_H 0xfa
+-
+- /*
+- * global definitions
+- * ==================
+- */
+-
+- #define SRC_EDT 0
+- #define SRC_CMD 1
+-
+- #define AT_CURSOR 0
+-
+- /*
+- * definitions for the window dependent functions (w_farsi).
+- */
+- #define W_CONV 0x1
+- #define W_R_L 0x2
+-
+-
+- /* special Farsi text messages */
+-
+- EXTERN char farsi_text_1[]
+- #ifdef DO_INIT
+- = { YE_, _SIN, RE, ALEF_, _FE, ' ', 'V', 'I', 'M',
+- ' ', F_HE, _BE, ' ', SHIN, RE, _GAF, DAL,' ', NOON,
+- ALEF_, _YE, ALEF_, _PE, '\0'}
+- #endif
+- ;
+-
+- EXTERN char farsi_text_2[]
+- #ifdef DO_INIT
+- = { YE_, _SIN, RE, ALEF_, _FE, ' ', FARSI_3, FARSI_3,
+- FARSI_4, FARSI_2, ' ', DAL, RE, ALEF, DAL, _NOON,
+- ALEF_, _TE, _SIN, ALEF, ' ', F_HE, _BE, ' ', SHIN,
+- RE, _GAF, DAL, ' ', NOON, ALEF_, _YE, ALEF_, _PE, '\0'}
+- #endif
+- ;
+-
+- EXTERN char farsi_text_3[]
+- #ifdef DO_INIT
+- = { DAL, WAW, _SHIN, _YE, _MIM, _NOON, ' ', YE_, _NOON,
+- ALEF_,_BE, _YE, _TE, _SHIN, _PE, ' ', 'R','E','P','L',
+- 'A','C','E', ' ', NOON, ALEF_, _MIM, RE, _FE, ZE, ALEF,
+- ' ', 'R', 'E', 'V', 'E', 'R', 'S', 'E', ' ', 'I', 'N',
+- 'S', 'E', 'R', 'T', ' ', SHIN, WAW, RE, ' ', ALEF_, _BE,
+- ' ', YE_, _SIN, RE, ALEF_, _FE, ' ', RE, DAL, ' ', RE,
+- ALEF_, _KAF,' ', MIM, ALEF_, _GAF, _NOON, _HE, '\0'}
+- #endif
+- ;
+-
+- #if 0 /* not used */
+- EXTERN char_u farsi_text_4[]
+- #ifdef DO_INIT
+- = { DAL, WAW, _SHIN, _YE, _MIM, _NOON, ' ', YE_, _NOON,
+- ALEF_, _BE, _YE, _TE, _SHIN, _PE, ' ', '<', 'C','T','R',
+- 'L','-','B','>', ' ', NOON, ALEF_, _MIM, RE, _FE, ZE,
+- ALEF, ' ', YE_, _SIN, RE, ALEF_, _FE, ' ', RE, DAL, ' ',
+- RE, ALEF_, _KAF,' ', MIM, ALEF_, _GAF, _NOON, _HE, '\0'}
+- #endif
+- ;
+- #endif
+-
+- EXTERN char farsi_text_5[]
+- #ifdef DO_INIT
+- = { ' ', YE_, _SIN, RE, ALEF_, _FE, '\0'}
+- #endif
+- ;
+--- 0 ----
+*** ../vim-8.1.0931/src/edit.c 2019-02-05 20:11:57.355368329 +0100
+--- src/edit.c 2019-02-16 14:20:35.497554963 +0100
+***************
+*** 467,481 ****
+
+ if (cmdchar == 'R')
+ {
+- #ifdef FEAT_FKMAP
+- if (p_fkmap && p_ri)
+- {
+- beep_flush();
+- emsg(farsi_text_3); /* encoded in Farsi */
+- State = INSERT;
+- }
+- else
+- #endif
+ State = REPLACE;
+ }
+ else if (cmdchar == 'V' || cmdchar == 'v')
+--- 467,472 ----
+***************
+*** 812,821 ****
+ if (p_hkmap && KeyTyped)
+ c = hkmap(c); /* Hebrew mode mapping */
+ #endif
+- #ifdef FEAT_FKMAP
+- if (p_fkmap && KeyTyped)
+- c = fkmap(c); /* Farsi mode mapping */
+- #endif
+
+ #ifdef FEAT_INS_EXPAND
+ /*
+--- 803,808 ----
+***************
+*** 6281,6289 ****
+ && !ISSPECIAL(c)
+ && (!has_mbyte || MB_BYTE2LEN_CHECK(c) == 1)
+ && i < INPUT_BUFLEN
+- # ifdef FEAT_FKMAP
+- && !(p_fkmap && KeyTyped) /* Farsi mode mapping moves cursor */
+- # endif
+ && (textwidth == 0
+ || (virtcol += byte2cells(buf[i - 1])) < (colnr_T)textwidth)
+ && !(!no_abbr && !vim_iswordc(c) && vim_iswordc(buf[i - 1])))
+--- 6268,6273 ----
+***************
+*** 8406,8428 ****
+ }
+ else
+ revins_scol = -1;
+! #ifdef FEAT_FKMAP
+! if (p_altkeymap)
+! {
+! /*
+! * to be consistent also for redo command, using '.'
+! * set arrow_used to true and stop it - causing to redo
+! * characters entered in one mode (normal/reverse insert).
+! */
+! arrow_used = TRUE;
+! (void)stop_arrow();
+! p_fkmap = curwin->w_p_rl ^ p_ri;
+! if (p_fkmap && p_ri)
+! State = INSERT;
+! }
+! else
+! #endif
+! p_hkmap = curwin->w_p_rl ^ p_ri; /* be consistent! */
+ showmode();
+ }
+ #endif
+--- 8390,8396 ----
+ }
+ else
+ revins_scol = -1;
+! p_hkmap = curwin->w_p_rl ^ p_ri; // be consistent!
+ showmode();
+ }
+ #endif
+***************
+*** 8488,8508 ****
+ static void
+ ins_insert(int replaceState)
+ {
+! #ifdef FEAT_FKMAP
+! if (p_fkmap && p_ri)
+! {
+! beep_flush();
+! emsg(farsi_text_3); /* encoded in Farsi */
+! return;
+! }
+! #endif
+!
+! # ifdef FEAT_EVAL
+ set_vim_var_string(VV_INSERTMODE,
+ (char_u *)((State & REPLACE_FLAG) ? "i"
+ : replaceState == VREPLACE ? "v"
+ : "r"), 1);
+! # endif
+ ins_apply_autocmds(EVENT_INSERTCHANGE);
+ if (State & REPLACE_FLAG)
+ State = INSERT | (State & LANGMAP);
+--- 8456,8467 ----
+ static void
+ ins_insert(int replaceState)
+ {
+! #ifdef FEAT_EVAL
+ set_vim_var_string(VV_INSERTMODE,
+ (char_u *)((State & REPLACE_FLAG) ? "i"
+ : replaceState == VREPLACE ? "v"
+ : "r"), 1);
+! #endif
+ ins_apply_autocmds(EVENT_INSERTCHANGE);
+ if (State & REPLACE_FLAG)
+ State = INSERT | (State & LANGMAP);
+***************
+*** 9916,9925 ****
+ coladvance(getviscol());
+
+ #ifdef FEAT_RIGHTLEFT
+- # ifdef FEAT_FKMAP
+- if (p_altkeymap && p_fkmap)
+- fkmap(NL);
+- # endif
+ /* NL in reverse insert will always start in the end of
+ * current line. */
+ if (revins_on)
+--- 9875,9880 ----
+*** ../vim-8.1.0931/src/main.c 2019-01-24 15:54:17.786847003 +0100
+--- src/main.c 2019-02-16 14:22:54.508742248 +0100
+***************
+*** 535,551 ****
+ if (params.no_swap_file)
+ p_uc = 0;
+
+- #ifdef FEAT_FKMAP
+- if (curwin->w_p_rl && p_altkeymap)
+- {
+- p_hkmap = FALSE; /* Reset the Hebrew keymap mode */
+- # ifdef FEAT_ARABIC
+- curwin->w_p_arab = FALSE; /* Reset the Arabic keymap mode */
+- # endif
+- p_fkmap = TRUE; /* Set the Farsi keymap mode */
+- }
+- #endif
+-
+ #ifdef FEAT_GUI
+ if (gui.starting)
+ {
+--- 535,540 ----
+***************
+*** 2025,2038 ****
+ main_start_gui();
+ break;
+
+! case 'F': /* "-F" start in Farsi mode: rl + fkmap set */
+! #ifdef FEAT_FKMAP
+! p_fkmap = TRUE;
+! set_option_value((char_u *)"rl", 1L, NULL, 0);
+! #else
+ mch_errmsg(_(e_nofarsi));
+ mch_exit(2);
+- #endif
+ break;
+
+ case '?': /* "-?" give help message (for MS-Windows) */
+--- 2014,2022 ----
+ main_start_gui();
+ break;
+
+! case 'F': /* "-F" was for Farsi mode */
+ mch_errmsg(_(e_nofarsi));
+ mch_exit(2);
+ break;
+
+ case '?': /* "-?" give help message (for MS-Windows) */
+***************
+*** 3351,3359 ****
+ #ifdef FEAT_RIGHTLEFT
+ main_msg(_("-H\t\t\tStart in Hebrew mode"));
+ #endif
+- #ifdef FEAT_FKMAP
+- main_msg(_("-F\t\t\tStart in Farsi mode"));
+- #endif
+ main_msg(_("-T <terminal>\tSet terminal type to <terminal>"));
+ main_msg(_("--not-a-term\t\tSkip warning for input/output not being a terminal"));
+ main_msg(_("--ttyfail\t\tExit if input or output is not a terminal"));
+--- 3335,3340 ----
+*** ../vim-8.1.0931/src/normal.c 2019-01-31 18:26:05.738803509 +0100
+--- src/normal.c 2019-02-16 14:18:27.118305987 +0100
+***************
+*** 397,406 ****
+ {K_TABLINE, nv_tabline, 0, 0},
+ {K_TABMENU, nv_tabmenu, 0, 0},
+ #endif
+- #ifdef FEAT_FKMAP
+- {K_F8, farsi_f8, 0, 0},
+- {K_F9, farsi_f9, 0, 0},
+- #endif
+ #ifdef FEAT_NETBEANS_INTG
+ {K_F21, nv_nbcmd, NV_NCH_ALW, 0},
+ #endif
+--- 397,402 ----
+***************
+*** 987,997 ****
+ /* adjust Hebrew mapped char */
+ if (p_hkmap && lang && KeyTyped)
+ *cp = hkmap(*cp);
+- # ifdef FEAT_FKMAP
+- /* adjust Farsi mapped char */
+- if (p_fkmap && lang && KeyTyped)
+- *cp = fkmap(*cp);
+- # endif
+ #endif
+ }
+
+--- 983,988 ----
+*** ../vim-8.1.0931/src/option.c 2019-02-08 12:46:03.588784187 +0100
+--- src/option.c 2019-02-16 14:23:25.484571533 +0100
+***************
+*** 542,552 ****
+ #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,
+ (char_u *)&p_ambw, PV_NONE,
+--- 542,548 ----
+***************
+*** 1141,1151 ****
+ (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,
+--- 1137,1143 ----
+***************
+*** 8707,8775 ****
+ }
+ #endif
+
+- #ifdef FEAT_FKMAP
+- else if ((int *)varp == &p_altkeymap)
+- {
+- if (old_value != p_altkeymap)
+- {
+- if (!p_altkeymap)
+- {
+- p_hkmap = p_fkmap;
+- p_fkmap = 0;
+- }
+- else
+- {
+- p_fkmap = p_hkmap;
+- p_hkmap = 0;
+- }
+- (void)init_chartab();
+- }
+- }
+-
+- /*
+- * In case some second language keymapping options have changed, check
+- * and correct the setting in a consistent way.
+- */
+-
+- /*
+- * If hkmap or fkmap are set, reset Arabic keymapping.
+- */
+- if ((p_hkmap || p_fkmap) && p_altkeymap)
+- {
+- p_altkeymap = p_fkmap;
+- # ifdef FEAT_ARABIC
+- curwin->w_p_arab = FALSE;
+- # endif
+- (void)init_chartab();
+- }
+-
+- /*
+- * If hkmap set, reset Farsi keymapping.
+- */
+- if (p_hkmap && p_altkeymap)
+- {
+- p_altkeymap = 0;
+- p_fkmap = 0;
+- # ifdef FEAT_ARABIC
+- curwin->w_p_arab = FALSE;
+- # endif
+- (void)init_chartab();
+- }
+-
+- /*
+- * If fkmap set, reset Hebrew keymapping.
+- */
+- if (p_fkmap && !p_altkeymap)
+- {
+- p_altkeymap = 1;
+- p_hkmap = 0;
+- # ifdef FEAT_ARABIC
+- curwin->w_p_arab = FALSE;
+- # endif
+- (void)init_chartab();
+- }
+- #endif
+-
+ #ifdef FEAT_ARABIC
+ if ((int *)varp == &curwin->w_p_arab)
+ {
+--- 8699,8704 ----
+***************
+*** 8816,8827 ****
+ set_option_value((char_u *)"keymap", 0L, (char_u *)"arabic",
+ OPT_LOCAL);
+ # endif
+- # ifdef FEAT_FKMAP
+- p_altkeymap = 0;
+- p_hkmap = 0;
+- p_fkmap = 0;
+- (void)init_chartab();
+- # endif
+ }
+ else
+ {
+--- 8745,8750 ----
+***************
+*** 11085,11096 ****
+ {
+ copy_winopt(&wp_from->w_onebuf_opt, &wp_to->w_onebuf_opt);
+ copy_winopt(&wp_from->w_allbuf_opt, &wp_to->w_allbuf_opt);
+- # ifdef FEAT_RIGHTLEFT
+- # ifdef FEAT_FKMAP
+- /* Is this right? */
+- wp_to->w_farsi = wp_from->w_farsi;
+- # endif
+- # endif
+ #if defined(FEAT_LINEBREAK)
+ briopt_check(wp_to);
+ #endif
+--- 11008,11013 ----
+*** ../vim-8.1.0931/src/getchar.c 2019-01-25 22:29:54.139821894 +0100
+--- src/getchar.c 2019-02-16 14:14:23.043735559 +0100
+***************
+*** 3361,3375 ****
+ rhs = replace_termcodes(rhs, &arg_buf, FALSE, TRUE, special);
+ }
+
+- #ifdef FEAT_FKMAP
+- /*
+- * When in right-to-left mode and alternate keymap option set,
+- * reverse the character flow in the rhs in Farsi.
+- */
+- if (p_altkeymap && curwin->w_p_rl)
+- lrswap(rhs);
+- #endif
+-
+ /*
+ * check arguments and translate function keys
+ */
+--- 3361,3366 ----
+*** ../vim-8.1.0931/src/ex_cmds.c 2019-02-12 22:37:24.181961482 +0100
+--- src/ex_cmds.c 2019-02-16 14:15:39.879285233 +0100
+***************
+*** 4911,4920 ****
+ }
+ else /* find the end of the regexp */
+ {
+- #ifdef FEAT_FKMAP /* reverse the flow of the Farsi characters */
+- if (p_altkeymap && curwin->w_p_rl)
+- lrF_sub(cmd);
+- #endif
+ which_pat = RE_LAST; /* use last used regexp */
+ delimiter = *cmd++; /* remember delimiter character */
+ pat = cmd; /* remember start of search pat */
+--- 4911,4916 ----
+***************
+*** 6070,6080 ****
+ *cmd++ = NUL; /* replace it with a NUL */
+ }
+
+- #ifdef FEAT_FKMAP /* when in Farsi mode, reverse the character flow */
+- if (p_altkeymap && curwin->w_p_rl)
+- lrFswap(pat,0);
+- #endif
+-
+ if (search_regcomp(pat, RE_BOTH, which_pat, SEARCH_HIS, &regmatch) == FAIL)
+ {
+ emsg(_(e_invcmd));
+--- 6066,6071 ----
+*** ../vim-8.1.0931/src/search.c 2019-02-10 21:48:21.385272023 +0100
+--- src/search.c 2019-02-16 14:23:53.956422298 +0100
+***************
+*** 1477,1488 ****
+ }
+ }
+
+! #ifdef FEAT_FKMAP /* when in Farsi mode, reverse the character flow */
+! if (p_altkeymap && curwin->w_p_rl)
+! lrFswap(searchstr,0);
+! #endif
+!
+! c = searchit(curwin, curbuf, &pos, NULL, dirc == '/' ? FORWARD : BACKWARD,
+ searchstr, count, spats[0].off.end + (options &
+ (SEARCH_KEEP + SEARCH_PEEK + SEARCH_HIS
+ + SEARCH_MSG + SEARCH_START
+--- 1477,1484 ----
+ }
+ }
+
+! c = searchit(curwin, curbuf, &pos, NULL,
+! dirc == '/' ? FORWARD : BACKWARD,
+ searchstr, count, spats[0].off.end + (options &
+ (SEARCH_KEEP + SEARCH_PEEK + SEARCH_HIS
+ + SEARCH_MSG + SEARCH_START
+***************
+*** 2976,2985 ****
+ int c;
+
+ c = gchar_cursor();
+- #ifdef FEAT_FKMAP /* when 'akm' (Farsi mode), take care of Farsi blank */
+- if (p_altkeymap && c == F_BLANK)
+- return 0;
+- #endif
+ if (c == ' ' || c == '\t' || c == NUL)
+ return 0;
+ if (enc_dbcs != 0 && c > 0xFF)
+--- 2972,2977 ----
+*** ../vim-8.1.0931/src/ex_getln.c 2019-01-24 15:54:17.786847003 +0100
+--- src/ex_getln.c 2019-02-16 14:22:09.941002759 +0100
+***************
+*** 81,90 ****
+ static int cmd_hkmap = 0; /* Hebrew mapping during command line */
+ #endif
+
+- #ifdef FEAT_FKMAP
+- 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);
+--- 81,86 ----
+***************
+*** 1043,1052 ****
+ #ifdef FEAT_RIGHTLEFT
+ if (cmd_hkmap)
+ c = hkmap(c);
+- # ifdef FEAT_FKMAP
+- if (cmd_fkmap)
+- c = cmdl_fkmap(c);
+- # endif
+ if (cmdmsg_rl && !KeyStuffed)
+ {
+ /* Invert horizontal movements and operations. Only when
+--- 1039,1044 ----
+***************
+*** 1595,1604 ****
+ case K_DEL:
+ case K_KDEL:
+ case Ctrl_W:
+- #ifdef FEAT_FKMAP
+- if (cmd_fkmap && c == K_BS)
+- c = K_DEL;
+- #endif
+ if (c == K_KDEL)
+ c = K_DEL;
+
+--- 1587,1592 ----
+***************
+*** 1694,1706 ****
+
+ case K_INS:
+ case K_KINS:
+- #ifdef FEAT_FKMAP
+- /* if Farsi mode set, we are in reverse insert mode -
+- Do not change the mode */
+- if (cmd_fkmap)
+- beep_flush();
+- else
+- #endif
+ ccline.overstrike = !ccline.overstrike;
+ #ifdef CURSOR_SHAPE
+ ui_cursor_shape(); /* may show different cursor shape */
+--- 1682,1687 ----
+***************
+*** 2309,2324 ****
+ case Ctrl__: /* CTRL-_: switch language mode */
+ if (!p_ari)
+ break;
+! # ifdef FEAT_FKMAP
+! if (p_altkeymap)
+! {
+! cmd_fkmap = !cmd_fkmap;
+! if (cmd_fkmap) /* in Farsi always in Insert mode */
+! ccline.overstrike = FALSE;
+! }
+! else /* Hebrew is default */
+! # endif
+! cmd_hkmap = !cmd_hkmap;
+ goto cmdline_not_changed;
+ #endif
+
+--- 2290,2296 ----
+ case Ctrl__: /* CTRL-_: switch language mode */
+ if (!p_ari)
+ break;
+! cmd_hkmap = !cmd_hkmap;
+ goto cmdline_not_changed;
+ #endif
+
+***************
+*** 2421,2430 ****
+ cmdmsg_rl = FALSE;
+ #endif
+
+- #ifdef FEAT_FKMAP
+- cmd_fkmap = 0;
+- #endif
+-
+ ExpandCleanup(&xpc);
+ ccline.xpc = NULL;
+
+--- 2393,2398 ----
+***************
+*** 3463,3506 ****
+ msg_clr_eos();
+ msg_no_more = FALSE;
+ }
+! #ifdef FEAT_FKMAP
+! /*
+! * If we are in Farsi command mode, the character input must be in
+! * Insert mode. So do not advance the cmdpos.
+! */
+! if (!cmd_fkmap)
+! #endif
+ {
+! if (KeyTyped)
+! {
+! m = Columns * Rows;
+! if (m < 0) /* overflow, Columns or Rows at weird value */
+! m = MAXCOL;
+! }
+! else
+ m = MAXCOL;
+! for (i = 0; i < len; ++i)
+! {
+! c = cmdline_charsize(ccline.cmdpos);
+! /* count ">" for a double-wide char that doesn't fit. */
+! if (has_mbyte)
+! correct_cmdspos(ccline.cmdpos, c);
+! /* Stop cursor at the end of the screen, but do increment the
+! * insert position, so that entering a very long command
+! * works, even though you can't see it. */
+! if (ccline.cmdspos + c < m)
+! ccline.cmdspos += c;
+
+! if (has_mbyte)
+! {
+! c = (*mb_ptr2len)(ccline.cmdbuff + ccline.cmdpos) - 1;
+! if (c > len - i - 1)
+! c = len - i - 1;
+! ccline.cmdpos += c;
+! i += c;
+! }
+! ++ccline.cmdpos;
+ }
+ }
+ }
+ if (redraw)
+--- 3431,3465 ----
+ msg_clr_eos();
+ msg_no_more = FALSE;
+ }
+! if (KeyTyped)
+ {
+! m = Columns * Rows;
+! if (m < 0) /* overflow, Columns or Rows at weird value */
+ m = MAXCOL;
+! }
+! else
+! m = MAXCOL;
+! for (i = 0; i < len; ++i)
+! {
+! c = cmdline_charsize(ccline.cmdpos);
+! /* count ">" for a double-wide char that doesn't fit. */
+! if (has_mbyte)
+! correct_cmdspos(ccline.cmdpos, c);
+! /* Stop cursor at the end of the screen, but do increment the
+! * insert position, so that entering a very long command
+! * works, even though you can't see it. */
+! if (ccline.cmdspos + c < m)
+! ccline.cmdspos += c;
+
+! if (has_mbyte)
+! {
+! c = (*mb_ptr2len)(ccline.cmdbuff + ccline.cmdpos) - 1;
+! if (c > len - i - 1)
+! c = len - i - 1;
+! ccline.cmdpos += c;
+! i += c;
+ }
++ ++ccline.cmdpos;
+ }
+ }
+ if (redraw)
+***************
+*** 7126,7160 ****
+ }
+ #endif /* FEAT_VIMINFO */
+
+- #if defined(FEAT_FKMAP) || defined(PROTO)
+- /*
+- * Write a character at the current cursor+offset position.
+- * It is directly written into the command buffer block.
+- */
+- void
+- cmd_pchar(int c, int offset)
+- {
+- if (ccline.cmdpos + offset >= ccline.cmdlen || ccline.cmdpos + offset < 0)
+- {
+- emsg(_("E198: cmd_pchar beyond the command length"));
+- return;
+- }
+- ccline.cmdbuff[ccline.cmdpos + offset] = (char_u)c;
+- ccline.cmdbuff[ccline.cmdlen] = NUL;
+- }
+-
+- int
+- cmd_gchar(int offset)
+- {
+- if (ccline.cmdpos + offset >= ccline.cmdlen || ccline.cmdpos + offset < 0)
+- {
+- // emsg(_("cmd_gchar beyond the command length"));
+- return NUL;
+- }
+- return (int)ccline.cmdbuff[ccline.cmdpos + offset];
+- }
+- #endif
+-
+ #if defined(FEAT_CMDWIN) || defined(PROTO)
+ /*
+ * Open a window on the current command line and history. Allow editing in
+--- 7085,7090 ----
+*** ../vim-8.1.0931/src/charset.c 2019-01-26 17:28:22.220599167 +0100
+--- src/charset.c 2019-02-16 14:19:07.586069193 +0100
+***************
+*** 98,110 ****
+ while (c <= '~')
+ #endif
+ g_chartab[c++] = 1 + CT_PRINT_CHAR;
+- #ifdef FEAT_FKMAP
+- if (p_altkeymap)
+- {
+- while (c < YE)
+- g_chartab[c++] = 1 + CT_PRINT_CHAR;
+- }
+- #endif
+ while (c < 256)
+ {
+ /* UTF-8: bytes 0xa0 - 0xff are printable (latin1) */
+--- 98,103 ----
+***************
+*** 218,228 ****
+ /* Use the MB_ functions here, because isalpha() doesn't
+ * work properly when 'encoding' is "latin1" and the locale is
+ * "C". */
+! if (!do_isalpha || MB_ISLOWER(c) || MB_ISUPPER(c)
+! #ifdef FEAT_FKMAP
+! || (p_altkeymap && (F_isalpha(c) || F_isdigit(c)))
+! #endif
+! )
+ {
+ if (i == 0) /* (re)set ID flag */
+ {
+--- 211,217 ----
+ /* Use the MB_ functions here, because isalpha() doesn't
+ * work properly when 'encoding' is "latin1" and the locale is
+ * "C". */
+! if (!do_isalpha || MB_ISLOWER(c) || MB_ISUPPER(c))
+ {
+ if (i == 0) /* (re)set ID flag */
+ {
+***************
+*** 237,246 ****
+ #ifndef EBCDIC
+ || c > '~'
+ #endif
+- #ifdef FEAT_FKMAP
+- || (p_altkeymap
+- && (F_isalpha(c) || F_isdigit(c)))
+- #endif
+ // For double-byte we keep the cell width, so
+ // that we can detect it from the first byte.
+ ) && !(enc_dbcs && MB_BYTE2LEN(c) == 2))
+--- 226,231 ----
+***************
+*** 540,548 ****
+ #else
+ (c >= ' ' && c <= '~')
+ #endif
+- #ifdef FEAT_FKMAP
+- || (p_altkeymap && F_ischar(c))
+- #endif
+ )) || (c < 256 && vim_isprintc_strict(c)))
+ {
+ /* printable character */
+--- 525,530 ----
+*** ../vim-8.1.0931/src/evalfunc.c 2019-02-15 21:06:05.338289743 +0100
+--- src/evalfunc.c 2019-02-16 14:20:52.705454334 +0100
+***************
+*** 6268,6276 ****
+ #ifdef FEAT_SEARCH_EXTRA
+ "extra_search",
+ #endif
+- #ifdef FEAT_FKMAP
+- "farsi",
+- #endif
+ #ifdef FEAT_SEARCHPATH
+ "file_in_path",
+ #endif
+--- 6268,6273 ----
+*** ../vim-8.1.0931/src/screen.c 2019-01-31 21:57:15.517462657 +0100
+--- src/screen.c 2019-02-16 14:23:42.424482840 +0100
+***************
+*** 10247,10256 ****
+ #ifdef FEAT_RIGHTLEFT
+ if (p_hkmap)
+ msg_puts_attr(_(" Hebrew"), attr);
+- # ifdef FEAT_FKMAP
+- if (p_fkmap)
+- msg_puts_attr(farsi_text_5, attr);
+- # endif
+ #endif
+ #ifdef FEAT_KEYMAP
+ if (State & LANGMAP)
+--- 10247,10252 ----
+*** ../vim-8.1.0931/src/window.c 2019-02-13 22:45:21.512636158 +0100
+--- src/window.c 2019-02-16 14:24:31.708223175 +0100
+***************
+*** 3445,3456 ****
+ wp->w_topfill = 0;
+ #endif
+ wp->w_botline = 2;
+- #ifdef FEAT_FKMAP
+- if (wp->w_p_rl)
+- wp->w_farsi = W_CONV + W_R_L;
+- else
+- wp->w_farsi = W_CONV;
+- #endif
+ #ifdef FEAT_SYN_HL
+ wp->w_s = &wp->w_buffer->b_s;
+ #endif
+--- 3445,3450 ----
+*** ../vim-8.1.0931/src/globals.h 2019-02-03 14:52:42.501867485 +0100
+--- src/globals.h 2019-02-16 14:46:49.076737466 +0100
+***************
+*** 1450,1458 ****
+ #ifndef FEAT_RIGHTLEFT
+ EXTERN char e_nohebrew[] INIT(= N_("E26: Hebrew cannot be used: Not enabled at compile time\n"));
+ #endif
+! #ifndef FEAT_FKMAP
+! EXTERN char e_nofarsi[] INIT(= N_("E27: Farsi cannot be used: Not enabled at compile time\n"));
+! #endif
+ #ifndef FEAT_ARABIC
+ EXTERN char e_noarabic[] INIT(= N_("E800: Arabic cannot be used: Not enabled at compile time\n"));
+ #endif
+--- 1450,1456 ----
+ #ifndef FEAT_RIGHTLEFT
+ EXTERN char e_nohebrew[] INIT(= N_("E26: Hebrew cannot be used: Not enabled at compile time\n"));
+ #endif
+! EXTERN char e_nofarsi[] INIT(= N_("E27: Farsi support has been removed\n"));
+ #ifndef FEAT_ARABIC
+ EXTERN char e_noarabic[] INIT(= N_("E800: Arabic cannot be used: Not enabled at compile time\n"));
+ #endif
+***************
+*** 1656,1668 ****
+ #endif
+
+ /*
+- * Optional Farsi support. Include it here, so EXTERN and INIT are defined.
+- */
+- #ifdef FEAT_FKMAP
+- # include "farsi.h"
+- #endif
+-
+- /*
+ * Optional Arabic support. Include it here, so EXTERN and INIT are defined.
+ */
+ #ifdef FEAT_ARABIC
+--- 1654,1659 ----
+*** ../vim-8.1.0931/src/proto.h 2019-02-13 22:45:21.512636158 +0100
+--- src/proto.h 2019-02-16 14:29:24.990637943 +0100
+***************
+*** 99,107 ****
+ # ifdef FEAT_MENU
+ # include "menu.pro"
+ # endif
+- # ifdef FEAT_FKMAP
+- # include "farsi.pro"
+- # endif
+ # ifdef FEAT_ARABIC
+ # include "arabic.pro"
+ # endif
+--- 99,104 ----
+*** ../vim-8.1.0931/farsi/README.txt 2010-05-15 13:04:04.000000000 +0200
+--- farsi/README.txt 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,2 ****
+- For information about installation of Farsi fonts and Vim usage in Farsi mode,
+- refer to the Farsi help file by typing ":help farsi" in Vim.
+--- 0 ----
+*** ../vim-8.1.0931/src/structs.h 2019-02-08 12:46:03.588784187 +0100
+--- src/structs.h 2019-02-16 14:30:03.594425301 +0100
+***************
+*** 2952,2961 ****
+ dict_T *w_vars; /* internal variables, local to window */
+ #endif
+
+- #if defined(FEAT_RIGHTLEFT) && defined(FEAT_FKMAP)
+- int w_farsi; /* for the window dependent Farsi functions */
+- #endif
+-
+ /*
+ * The w_prev_pcmark field is used to check whether we really did jump to
+ * a new line after setting the w_pcmark. If not, then we revert to
+--- 2952,2957 ----
+*** ../vim-8.1.0931/farsi/fonts/DOS/far-a01.com 2010-05-15 13:04:04.000000000 +0200
+--- farsi/fonts/DOS/far-a01.com 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,9 ****
+- éŸ8x16 Farsi font V. A01
+- Free Font, Dec 1996 by Mortaza G. Shiran
+- $Driver not loaded - strange video card
+- $
+- äuUP$<v<t<t,<t(X.ÿ.rXœ.ÿrè¬ÿuPSQRUè¹ÿœ.ÿr]ZY[XÏXœ.ÿrP3ÀŽØÇ AŒXπüue<t<t <$t-<0tD.ÿ.rPSQRU$ðŒÊŽÂ½A·¹
+- ¸’£~Œ€¸££‚Œ„ú¸v&£¨&Œªûè“þͺA±ÓêB¸
+-
+-
+- (
+\ No newline at end of file
+--- 0 ----
+*** ../vim-8.1.0931/farsi/fonts/SunOs/far-a01.fb 2010-05-15 13:04:04.000000000 +0200
+--- farsi/fonts/SunOs/far-a01.fb 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,5 ****
+- ¼
+-
+-
+-
+-
+\ No newline at end of file
+--- 0 ----
+*** ../vim-8.1.0931/farsi/fonts/UNIXs/far-a01.f16 2010-05-15 13:04:04.000000000 +0200
+--- farsi/fonts/UNIXs/far-a01.f16 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,4 ****
+-
+-
+-
+- (
+\ No newline at end of file
+--- 0 ----
+*** ../vim-8.1.0931/farsi/fonts/UNIXs/far-a01.pcf.gz 2010-05-15 13:04:04.000000000 +0200
+--- farsi/fonts/UNIXs/far-a01.pcf.gz 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,9 ****
+- ‹â|5
+- )…þþç±wv23wî]èçӏ9ûùž;gf~sΜó?ϙ+—o8 À2’L¡w‹Ýɝ+ø00چÇLÅ_{΄`*ãCÇ[æ5öøxzs/ò6<–ZºðmøNF¾â“
+- ÃÄ'Á© ŸS&> Nc˜ø$ 8aⓀà} ŸS&> Î`˜ø$ 8“aⓀà,†‰O‚³dìÇ0ñI@8ÐAžø$ 2DÍŸ2\­e˜ø$ ¨c˜ø$ ¨g˜ø$ È1L|40L|42L|4Ê”aⓀàl†‰O‚s&> ¦3L|¼ŸaⓀ€£ë<ñI #ís&> Î5ö¯ø®x“\)’OÛ_áò±P¸+EÿÌÐ]~ÇE°ÕXš’D÷:y8ôëxf&ptS–ê&Xž„Îf­›nÃîXV÷Fä7É­y‹xÁ^ÿ…*õëIÁþ¦Wîþ«ÿy˜²~˜÷_.ÿ“\÷0ïßÙqµéw÷ÿZ™t–+¿î ÷*Ý¾Ô ©_RÏN´ºQªw£08|8Àåm\`¦é[­~« o°Çó)iº%u­ ¥º6Á†§£|Ý[™"ÛÿŸ\w„$—%ÿÒÚß$}”4}YË0|-隻ío%í®8©7c¬~Œ WêF…ÈR‡ÂN†…9«ËÙpV'C≖–revî\§u×[AªqÎ~Q›I³Ÿp]<Œ4ä04ßãÂqé$¯–“™0e.ႥÓ›Qæ>`õr®³Ûqö¾–—IûÄPe{ôÐO†Ÿƒ¬KІÇJcÊēäÂéÃÕÉ$>'wí,NòKlè û[i»nw*·¥]¯’{Wi»‘% å\ÆfÃy.6‘Ö‹sö·Ür•Å…]¦¥OŽOÂÐüŠöIÎÕ¿¤´Ë±´ü ë…é¡íJõ7ÉIœV'÷Z‹Rÿã؜¢ïÆÐ>ãÜ
+- 㗼s÷êôË#¤é»1ôþ“ês’sùŽ«’ø£çwaèýKz&¥è‹³óJêpš¾\Ý-à@Û ·k…ŒièJØ.çâ⋦'Ʌóßi²ö¿q×ØBú!×'&97n ·!Ý8І’œØ{x0ŽãÏMÑ»~Âõßaf¢Ô§$¹mړæ9{N’ë¶ç͂^Ô¶.¿c쾕Ho¿ÒôŽ£Rôq÷/eçò]Ž-MÑGË)®ìÒÊ/:æ‹#-ÿ¥m7„Ç?i퇬ï„Ëj’%\¦W¤è%oÇ$¥ü$o6¡4þ÷Yòo¹Mßz«—²»º}\{]IûWÿ¢ùfiñ_eïGΑ2ݐ1þh}L+¿pü’Ö‰(µ¡Yî¿Ë²ÕÙo¹¼/šÎ½Òæpqyî{ڄøùOTŸÃÐy£+‡röm/ãڃ´üsíÌµ¢}ÞL”ÿMGòÜő¿¸ð:˜¬9Ëý˘0ËúÕt$Ï}qñGûÍÿ ]Í2¿«ÄM²×ÛÉ2'yîڙh»n²8ׄÇ
+- Vóe¹ÿ4}–gyiú8{Vª:Ÿ<J>bµW•9_^‹™2 }Ô¬¶ß귕9??L}ØI^΁y荒)céïÆ£ºü—þ]ڑ˜öCÞÅ Ç¥MßIópÒµÇJÓµ¿,é—ý…ˆNÂ7Z^Dùú»˜z ô.g¥v´€líGë[UêÃñ‡ñCdÑæý¯½0ÿÃ"iº‡|¦ïIë»ã\¥|¼f]-ÍEŸ äQyû+¶&y·Š<Cƒ¹ŸJëŸØòd‹ô©’þïA¿ú88O¯)sréÏ:|³œä«Ž¸sƆ~“|èBú»®ÿŒ¾
+- ìà}Šö˜´Ý[‹r•ž};»yJï ÛwöíY—Ž7“Gmÿ6^ª_d{ÄÛ½¥h“¡OٓùR&}ÙNöKÁÄä¸òžÁ­}×1#Š’u×IžÊÂ[ƒP,]Eö‡\twÄ+zf_Ooüy¥“MDÌÉRš®Õ%HË¡•ôõ lÛ!žX˜˜#SN#”àÞ¡ûúJûb¶vûzÜ>ãi‹Ý漁ÐV‹wðdïRìoû®¾Å¢Ë]1ꁢN½¶+ÚÆ.sÀÝE+æ)ý[(ëí»^<_{Ü·{Ë`>w¥¾I˜­Ò>sÀæڞ­"¬QÚþôV¿/iÙÆ£ú@WRþõ ñöJ…Õy¿O¼Þ¢¤Àx<Ú+§ ô¸-uƒ¹¶§ôq¡mCŽš`±hãè—8v·KD:A¡êôvñÞx—{¶Šb ½žn±]±/º»ÇÝÑΞ¢Ø3½žâN•­}›éí”ÔïÛÄÈ÷]+QnáUöu˾"·tnè¼}ѝîûHvtZ#M"÷ŒâÌùöô‡²·9Œ#òÃ99‚£Ë£Øcp,G×ïÀqx'{®wáx¼›½ÿ ˜„y…÷à$œŒÉx/NÁ©œ†Óñ>LÅ8g±—QðP‹:Ô³o`o؄³qGÜïç¬î\Ž*šqfrtЊY˜Íž¼ ç㘋 ЎyÝ_(D.Ÿ‹°KðGXŠâR,cïۉ˰+p9GyW`VãJ\Å^n-Öa={³?ÆF\kp-®Ã&öx×ãlaϼ½B7{­"{¯íìÅvbzÙ îF?ö`/°b¯þaŽZþ7᣸Š[ð1܊ã6ü>Û9"ús|
+- ;ði|ŸÅøîÂ_âóø+܍/àü5¾ˆ/á^ü ¾Œ¿Å}ø
+- ¾Š¿Ãýx
+- Ož(<Qx¢ðDQ+ŠZQԊ¢Vµ¢¨E­(jEQ+ŠZQԉ¢Nu¢¨E(êDQ'Š:Qԉ¢Nõ¢¨E½(êEQ/ŠzQԋ¢^õ¢¨EN9QäD‘EN9QäD‘EN9Q4ˆ¢A ¢hEƒ(DÑ ŠQ4ˆ¢A¢hE£(EÑ(ŠFQ4Š¢Q¢hE“(šDÑ$Š&Q4‰¢IM¢hE“(šL ê"Ô¥®t±+]îJ¼Ò%¯tÑ+]öJ¾2¥o‹_k 0&`lÀ±cÚ”6åÛÑZm JƒÒÖ ´9(mJ„Ò¡´I(mªÖžÖj³PÚ.”6 ¥-CiÓPÚ6”6¥­CióPuÆjµV[ˆÒ&¢´(m$J[‰Òf¢´(m(J[Šª7&¯µÚX”¶¥ÍEi{QÚ`”¶¥MFi›QÚhTÎÔ­Õv£´á(m9J›ŽÒ¶£´ñ(m=J›Òö£LeÓZmBJېÒF¤´)mFJۑ҆¤´%)mJªÑÔT­ÕÖ¤´9)mOJ”Ò¥´I)mSJ•ÒV¥šL57õ\WtmWž¶+Oە§íÊÓvåi»ò´]yÚ®<mWž2„Öj»ò´]yÚ®<mWž¶+Oە§íÊ3í‹i`l £µ¦1ŒieL3cÚÓÐh»ò´]yÚ®¼ZÓ<i­¶+Oە§íÊÓvåi»ò´]yÚ®<mWž¶+¯Î´mZ«íÊÓvåi»ò´]yÚ®<mWž¶+Oە§íÊ«7 cý›ö-ùÿ Î=NTa
+\ No newline at end of file
+--- 0 ----
+*** ../vim-8.1.0931/farsi/fonts/UNIXs/far-a01.pcf.Z 2010-05-15 13:04:04.000000000 +0200
+--- farsi/fonts/UNIXs/far-a01.pcf.Z 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,30 ****
+- ̌“
+- ¸ì aŽË*aR „b”ËŠ¬äBÑÈ'TœiR䋔"G’L¡"%‹A×Uœé  É9tÂè âš0sæ„b
+- š4r¸`dv&Y¾È¦Í= ž2¯Ir ñ³‹GŸ¦NÛ)L‚À À”"T\‘T yN×Fl
+- @
+- @#·Ä
+- N1ŠLã¿8Á2ÆqcŒQXÇÀ\/0øcg‰®n뭛èŠüS®9yÄLvøÞ¹Þw‚/Ê AøҗŠË_FiB^ºå,cùÌs…ñ^¼ã[ÅƀÍp…Áˆæ©¾“Ê ¹sž¡ŒÎ=§YÇ/CB‚d®½t¾ó•ŠAm—Âùµ„
+- ¿4ù¨¶¼Ar÷ýðOåÒçúKYß¹¦½ül7Hðy}ò‚_ýä6{óev_WXf`Z°z
+- èzÛ5zîç€ù׀hzïB¡\xvÒ·|ö|ú'zýöNdfnc&vÞw\~·xª×z4öQ‚‡rŠF{Êvy‘6iÌWXåj:r®æ‚f^ Ñ7±BÿT`äõQ±G{K؄l6Ua÷(çlTØ,ÆÕS´6mUXX0L/u{µg¤†\}ƒ~À‡o·xèa$gwã‡\ÿ´„g{th`8†EFr
+- gm“¶†€õO‰%§C;8ˆgFj`˜ˆ%8{ה{ÎR†—÷N¤–‚i
+- _†™ÿÄ£X¶›þ§À”C£Ç¥Qµˆ"'‹À3ª&™h
+- D·S˜y\Á
+- ¬Ê‰Ž·ÚªÔŠS֊\¬j­;:­™›Ï
+-
+-
+- !¹‘ qLH„D7创ڹˆ‘!=¹“›–k˜›šËŠvž”û¤{¹¨» §º9«¥?źúº¦+»Aw´ ¶é¼dC6}A $ʗƒ*Vdsau3¼ Q¼Ç«¡É‹\ê+)&ž
+- j»@´…¦|y­ €¤Ì¦|¼¯¼V±S j¿šG³|l\*™‰Ëô¡
+- De<ŠÄüÂÕÁç9ÃÍâ°«j±à\­t1ÈË<UŠÜ3ûà ÄNUÄ,TÁ\ qÃaÌżÃW\Xœ», r‘ßJ£*Œf>¼Îm¼²îÜÀ¸’ɶÉ
+- þæ^‚`ã:m®Þê|M-°>֎€®^{N-wÀäŽP“NÙ<Î׎ð3í0ٍ°æ»þà†~×ßÂêa˗B‰ áns7#Q™A9œC:1;,!<Y±ÚSê#?ú#@
+- Ô$B*$C4!DJ$EZ$Fj$Gz$HŠ$Iš$J"K\‚&_MÙNéOùP QRaS<
+-
+-
+-
+-
+- ÄlCräð@`$¨ä™Ü“bñ”Ayás¹<ƒ€ ÂZèU Á艡„À}úKBøLà*!¸=ƒ@  ß3„Ï (>ƒË6_B}¡õÁ`~ŸA0 !…0
+- (B* ®€"ÌŠ€ (B/ €"ŠÀ (B4 ր"lŠ
+- *p®À!Ї  ¤†C08iఁCð8uààC°8P5@Õp
+- 
+- 4
+-
+- f2š˜Élb&əL'f2ž˜É|b&J˜Œ\âN–ÉT&S…šLl2U¸ÉT'S…œLt2UØÉ3™'Ï䞔}RüI(eÀ ”…RJ(eÀ¢œrìÉÐ'gÀŸœr ÊP(gÀ¡œ‰r,JÐ(iÀž¤}’üI(iÀ ¤…’J(iÀ¢¬²ìÉÐ'kÀŸ¬² ÊP(kÀ¡¬‰²,JÐ(mÀž´}ÒüI(mÀ ´…ÒJ(mÀ¢¼òìÉÐ'oÀŸ¼ò ÊP(oÀ¡¼‰ò,JÐ(qÀžÄ}üI(qÀ Ä…J(qÀ¢Ì2ìÉÐ'sÀŸÌ2 ÊP(sÀ¡Ì‰2,J<Ù(ñäžÄ“}OþI<(ñä Ä“…OJ<™(ñäÊēc2Í bf ˜™1 fƀ›rf ؙ1 gƀ•)Z¦ x™2hJJ­Y3-¥Ö̙šRköLO4AeÙ|™¤²lÎLTY6o&«,›;V–Í•I+ƒ¦­´›1SWÚ͚é+ífΖv³gË ‰, çËd–„sfBKÂy3©%áܙؒp®Ln4½e匙â²rÖLsY9s¦º¬œ=Ó]Mx9:_&½3_ŽÎ›É/GçΘ£seÌ i0igÌT˜´³f:Lڙ3%&íì™3hbLáù29¦ðœ™ SxÞL’)<w&Êž‹²j6ʪù(Ï䘬š“TJp)a@¦„›tJ=f˜¼š²h^Ï£¹>+åÒ\Ÿ™òi®ÏN95¯gÕ´Ÿ2kžÏ­¹?+¥×ܟ™2lîÏNI6ϧÙ4 2mÐIÉ6 è¥|›tSÊM=ëæù¼›4RêÍ Z)ûæ͔€ó‚vÊÁy> g }”ˆ³„NÊÅYBà ´¸6³‚V ¯–+~E°¨¡»bYàŠÐP,ŽÅ¯È¡
+\ No newline at end of file
+--- 0 ----
+*** ../vim-8.1.0931/farsi/fonts/WINDOWS/far-a01.fon 2010-05-15 13:04:04.000000000 +0200
+--- farsi/fonts/WINDOWS/far-a01.fon 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,64 ****
+- MZ
+- $
+- ,
+-
+-
+- 
+- 
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+- 
+- 
+- 
+- 
+- 
+- 
+- 
+- 
+- 
+-
+-
+- (
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+\ No newline at end of file
+--- 0 ----
+*** ../vim-8.1.0931/src/Makefile 2019-02-16 13:45:05.574240125 +0100
+--- src/Makefile 2019-02-16 14:32:12.109712500 +0100
+***************
+*** 492,500 ****
+ # MULTIBYTE - To edit multi-byte characters.
+ # This is now always enabled.
+
+! # 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
+--- 492,500 ----
+ # MULTIBYTE - To edit multi-byte characters.
+ # This is now always enabled.
+
+! # When building with at least "big" features, right-left and Arabic
+ # features are enabled. Use this to disable them.
+! #CONF_OPT_MULTIBYTE = --disable-rightleft --disable-arabic
+
+ # NLS - National Language Support
+ # Uncomment this when you do not want to support translated messages, even
+***************
+*** 1590,1596 ****
+ ex_docmd.c \
+ ex_eval.c \
+ ex_getln.c \
+- farsi.c \
+ fileio.c \
+ findfile.c \
+ fold.c \
+--- 1590,1595 ----
+***************
+*** 1704,1710 ****
+ objects/ex_docmd.o \
+ objects/ex_eval.o \
+ objects/ex_getln.o \
+- objects/farsi.o \
+ objects/fileio.o \
+ objects/findfile.o \
+ objects/fold.o \
+--- 1703,1708 ----
+***************
+*** 1831,1837 ****
+ ex_docmd.pro \
+ ex_eval.pro \
+ ex_getln.pro \
+- farsi.pro \
+ fileio.pro \
+ findfile.pro \
+ fold.pro \
+--- 1829,1834 ----
+***************
+*** 2996,3004 ****
+ objects/ex_getln.o: ex_getln.c
+ $(CCC) -o $@ ex_getln.c
+
+- objects/farsi.o: farsi.c
+- $(CCC) -o $@ farsi.c
+-
+ objects/fileio.o: fileio.c
+ $(CCC) -o $@ fileio.c
+
+--- 2993,2998 ----
+***************
+*** 3392,3681 ****
+ 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/autocmd.o: autocmd.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/blob.o: blob.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 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/findfile.o: findfile.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/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/indent.o: indent.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/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/sign.o: sign.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/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 \
+! 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 \
+ ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm ../pixmaps/tb_save.xpm \
+--- 3386,3671 ----
+ 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 arabic.h
+ objects/autocmd.o: autocmd.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 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 arabic.h
+ objects/blob.o: blob.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 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 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 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 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 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 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 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 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 \
+! proto.h globals.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 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 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 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 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 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 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 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 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 arabic.h
+ objects/findfile.o: findfile.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 arabic.h libvterm/include/vterm.h \
+ libvterm/include/vterm_keycodes.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 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 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 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 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 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 arabic.h version.h
+ objects/indent.o: indent.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 arabic.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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 arabic.h
+ objects/sign.o: sign.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 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 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 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 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 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 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 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 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 \
+! proto.h globals.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 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 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 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 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 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 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 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 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 \
+ ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm ../pixmaps/tb_save.xpm \
+***************
+*** 3696,3710 ****
+ 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 \
+ ../pixmaps/tb_save.xpm ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm \
+ ../pixmaps/tb_copy.xpm ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
+--- 3686,3700 ----
+ 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 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 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 arabic.h gui_at_sb.h gui_x11_pm.h \
+ ../pixmaps/tb_new.xpm ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm \
+ ../pixmaps/tb_save.xpm ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm \
+ ../pixmaps/tb_copy.xpm ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
+***************
+*** 3723,3807 ****
+ 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/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 \
+--- 3713,3797 ----
+ 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 arabic.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 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 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 \
+***************
+*** 3833,3839 ****
+ 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 \
+--- 3823,3829 ----
+ 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 \
+! 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 \
+***************
+*** 3842,3848 ****
+ 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 \
+--- 3832,3838 ----
+ 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 \
+! 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 \
+***************
+*** 3851,3857 ****
+ 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 \
+--- 3841,3847 ----
+ 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 \
+! 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 \
+***************
+*** 3860,3866 ****
+ 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 \
+--- 3850,3856 ----
+ 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 \
+! 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 \
+***************
+*** 3869,3875 ****
+ 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 \
+--- 3859,3865 ----
+ 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 \
+! 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 \
+***************
+*** 3878,3882 ****
+ 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
+--- 3868,3872 ----
+ 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 \
+! arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+*** ../vim-8.1.0931/src/Make_bc5.mak 2019-02-13 22:45:21.504636232 +0100
+--- src/Make_bc5.mak 2019-02-16 14:32:45.329527170 +0100
+***************
+*** 542,548 ****
+ $(OBJDIR)\ex_docmd.obj \
+ $(OBJDIR)\ex_eval.obj \
+ $(OBJDIR)\ex_getln.obj \
+- $(OBJDIR)\farsi.obj \
+ $(OBJDIR)\fileio.obj \
+ $(OBJDIR)\findfile.obj \
+ $(OBJDIR)\fold.obj \
+--- 542,547 ----
+*** ../vim-8.1.0931/src/Make_cyg_ming.mak 2019-02-13 22:45:21.504636232 +0100
+--- src/Make_cyg_ming.mak 2019-02-16 14:33:03.557425314 +0100
+***************
+*** 714,720 ****
+ $(OUTDIR)/ex_docmd.o \
+ $(OUTDIR)/ex_eval.o \
+ $(OUTDIR)/ex_getln.o \
+- $(OUTDIR)/farsi.o \
+ $(OUTDIR)/fileio.o \
+ $(OUTDIR)/findfile.o \
+ $(OUTDIR)/fold.o \
+--- 714,719 ----
+***************
+*** 1005,1011 ****
+ $(MAKE) -C tee clean
+
+ ###########################################################################
+! INCL = vim.h alloc.h arabic.h ascii.h ex_cmds.h farsi.h feature.h globals.h \
+ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
+ spell.h structs.h term.h beval.h $(NBDEBUG_INCL)
+ GUI_INCL = gui.h
+--- 1004,1010 ----
+ $(MAKE) -C tee clean
+
+ ###########################################################################
+! INCL = vim.h alloc.h arabic.h ascii.h ex_cmds.h feature.h globals.h \
+ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
+ spell.h structs.h term.h beval.h $(NBDEBUG_INCL)
+ GUI_INCL = gui.h
+*** ../vim-8.1.0931/src/Make_dice.mak 2019-02-13 22:45:21.504636232 +0100
+--- src/Make_dice.mak 2019-02-16 14:33:17.693346245 +0100
+***************
+*** 44,50 ****
+ ex_docmd.c \
+ ex_eval.c \
+ ex_getln.c \
+- farsi.c \
+ fileio.c \
+ findfile.c \
+ fold.c \
+--- 44,49 ----
+***************
+*** 104,110 ****
+ o/ex_docmd.o \
+ o/ex_eval.o \
+ o/ex_getln.o \
+- o/farsi.o \
+ o/fileio.o \
+ o/findfile.o \
+ o/fold.o \
+--- 103,108 ----
+***************
+*** 201,208 ****
+
+ o/ex_getln.o: ex_getln.c $(SYMS)
+
+- o/farsi.o: farsi.c $(SYMS)
+-
+ o/fileio.o: fileio.c $(SYMS)
+
+ o/findfile.o: findfile.c $(SYMS)
+--- 199,204 ----
+*** ../vim-8.1.0931/src/Make_ivc.mak 2019-02-13 22:45:21.504636232 +0100
+--- src/Make_ivc.mak 2019-02-16 14:33:35.725245288 +0100
+***************
+*** 228,234 ****
+ "$(INTDIR)/ex_docmd.obj" \
+ "$(INTDIR)/ex_eval.obj" \
+ "$(INTDIR)/ex_getln.obj" \
+- "$(INTDIR)/farsi.obj" \
+ "$(INTDIR)/fileio.obj" \
+ "$(INTDIR)/findfile.obj" \
+ "$(INTDIR)/fold.obj" \
+--- 228,233 ----
+***************
+*** 413,422 ****
+ # End Source File
+ # Begin Source File
+
+- SOURCE=.\farsi.c
+- # End Source File
+- # Begin Source File
+-
+ SOURCE=.\fileio.c
+ # End Source File
+ # Begin Source File
+--- 412,417 ----
+*** ../vim-8.1.0931/src/Make_manx.mak 2019-02-13 22:45:21.504636232 +0100
+--- src/Make_manx.mak 2019-02-16 14:33:53.653144808 +0100
+***************
+*** 54,60 ****
+ ex_docmd.c \
+ ex_eval.c \
+ ex_getln.c \
+- farsi.c \
+ fileio.c \
+ findfile.c \
+ fold.c \
+--- 54,59 ----
+***************
+*** 116,122 ****
+ obj/ex_docmd.o \
+ obj/ex_eval.o \
+ obj/ex_getln.o \
+- obj/farsi.o \
+ obj/fileio.o \
+ obj/findfile.o \
+ obj/fold.o \
+--- 115,120 ----
+***************
+*** 176,182 ****
+ proto/ex_docmd.pro \
+ proto/ex_eval.pro \
+ proto/ex_getln.pro \
+- proto/farsi.pro \
+ proto/fileio.pro \
+ proto/findfile.pro \
+ proto/fold.pro \
+--- 174,179 ----
+***************
+*** 317,325 ****
+ obj/ex_getln.o: ex_getln.c
+ $(CCSYM) $@ ex_getln.c
+
+- obj/farsi.o: farsi.c
+- $(CCSYM) $@ farsi.c
+-
+ obj/fileio.o: fileio.c
+ $(CCSYM) $@ fileio.c
+
+--- 314,319 ----
+*** ../vim-8.1.0931/src/Make_morph.mak 2019-02-13 22:45:21.504636232 +0100
+--- src/Make_morph.mak 2019-02-16 14:34:13.757032020 +0100
+***************
+*** 42,48 ****
+ ex_docmd.c \
+ ex_eval.c \
+ ex_getln.c \
+- farsi.c \
+ fileio.c \
+ findfile.c \
+ fold.c \
+--- 42,47 ----
+*** ../vim-8.1.0931/src/Make_mvc.mak 2019-02-13 22:45:21.508636195 +0100
+--- src/Make_mvc.mak 2019-02-16 14:34:30.904935718 +0100
+***************
+*** 694,700 ****
+ !include Make_all.mak
+ !include testdir\Make_all.mak
+
+! INCL = vim.h alloc.h arabic.h ascii.h ex_cmds.h farsi.h feature.h globals.h \
+ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
+ spell.h structs.h term.h beval.h $(NBDEBUG_INCL)
+
+--- 694,700 ----
+ !include Make_all.mak
+ !include testdir\Make_all.mak
+
+! INCL = vim.h alloc.h arabic.h ascii.h ex_cmds.h feature.h globals.h \
+ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
+ spell.h structs.h term.h beval.h $(NBDEBUG_INCL)
+
+***************
+*** 719,725 ****
+ $(OUTDIR)\ex_docmd.obj \
+ $(OUTDIR)\ex_eval.obj \
+ $(OUTDIR)\ex_getln.obj \
+- $(OUTDIR)\farsi.obj \
+ $(OUTDIR)\fileio.obj \
+ $(OUTDIR)\findfile.obj \
+ $(OUTDIR)\fold.obj \
+--- 719,724 ----
+***************
+*** 1404,1411 ****
+
+ $(OUTDIR)/ex_getln.obj: $(OUTDIR) ex_getln.c $(INCL)
+
+- $(OUTDIR)/farsi.obj: $(OUTDIR) farsi.c $(INCL)
+-
+ $(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL)
+
+ $(OUTDIR)/findfile.obj: $(OUTDIR) findfile.c $(INCL)
+--- 1403,1408 ----
+***************
+*** 1646,1652 ****
+ proto/ex_docmd.pro \
+ proto/ex_eval.pro \
+ proto/ex_getln.pro \
+- proto/farsi.pro \
+ proto/fileio.pro \
+ proto/findfile.pro \
+ proto/getchar.pro \
+--- 1643,1648 ----
+*** ../vim-8.1.0931/src/Make_sas.mak 2019-02-13 22:45:21.508636195 +0100
+--- src/Make_sas.mak 2019-02-16 14:34:46.712846871 +0100
+***************
+*** 107,113 ****
+ ex_docmd.c \
+ ex_eval.c \
+ ex_getln.c \
+- farsi.c \
+ fileio.c \
+ findfile.c \
+ fold.c \
+--- 107,112 ----
+***************
+*** 168,174 ****
+ ex_docmd.o \
+ ex_eval.o \
+ ex_getln.o \
+- farsi.o \
+ fileio.o \
+ findfile.o \
+ fold.o \
+--- 167,172 ----
+***************
+*** 229,235 ****
+ proto/ex_docmd.pro \
+ proto/ex_eval.pro \
+ proto/ex_getln.pro \
+- proto/farsi.pro \
+ proto/fileio.pro \
+ proto/findfile.pro \
+ proto/fold.pro \
+--- 227,232 ----
+***************
+*** 362,369 ****
+ proto/ex_eval.pro: ex_eval.c ex_cmds.h
+ ex_getln.o: ex_getln.c
+ proto/ex_getln.pro: ex_getln.c
+- farsi.o: farsi.c
+- proto/farsi.pro: farsi.c
+ fileio.o: fileio.c
+ proto/fileio.pro: fileio.c
+ findfile.o: findfile.c
+--- 359,364 ----
+*** ../vim-8.1.0931/src/Make_vms.mms 2019-02-13 22:45:21.508636195 +0100
+--- src/Make_vms.mms 2019-02-16 14:35:57.956445602 +0100
+***************
+*** 2,8 ****
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 Jan 18
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+--- 2,8 ----
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 Feb 16
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+***************
+*** 315,321 ****
+ SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c \
+ crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
+ ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c \
+! if_xcmdsrv.c farsi.c fileio.c findfile.c fold.c getchar.c hardcopy.c \
+ hashtab.c indent.c json.c list.c main.c mark.c menu.c mbyte.c \
+ memfile.c memline.c message.c misc1.c misc2.c move.c normal.c ops.c \
+ option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+--- 315,321 ----
+ SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c \
+ crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
+ ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c \
+! if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c hardcopy.c \
+ hashtab.c indent.c json.c list.c main.c mark.c menu.c mbyte.c \
+ memfile.c memline.c message.c misc1.c misc2.c move.c normal.c ops.c \
+ option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+***************
+*** 328,334 ****
+ OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj \
+ charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj \
+ edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj \
+! ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj farsi.obj \
+ fileio.obj findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
+ indent.obj json.obj list.obj main.obj mark.obj menu.obj memfile.obj \
+ memline.obj message.obj misc1.obj misc2.obj move.obj mbyte.obj \
+--- 328,334 ----
+ OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj \
+ charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj \
+ edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj \
+! ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj \
+ fileio.obj findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
+ indent.obj json.obj list.obj main.obj mark.obj menu.obj memfile.obj \
+ memline.obj message.obj misc1.obj misc2.obj move.obj mbyte.obj \
+***************
+*** 514,792 ****
+ buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h version.h
+ charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ crypt.obj : crypt.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h farsi.h arabic.h
+ crypt_zip.obj : crypt_zip.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+ dict.obj : dict.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h farsi.h arabic.h
+ diff.obj : diff.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ digraph.obj : digraph.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ edit.obj : edit.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ eval.obj : eval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h version.h
+ evalfunc.obj : evalfunc.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h version.h
+ ex_cmds.obj : ex_cmds.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h version.h
+ ex_cmds2.obj : ex_cmds2.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h version.h
+ ex_docmd.obj : ex_docmd.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ ex_eval.obj : ex_eval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ ex_getln.obj : ex_getln.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+! farsi.obj : farsi.c vim.h
+ fileio.obj : fileio.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ findfile.obj : findfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ fold.obj : fold.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ getchar.obj : getchar.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ hardcopy.obj : hardcopy.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ hashtab.obj : hashtab.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ if_cscope.obj : if_cscope.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h if_cscope.h
+ if_xcmdsrv.obj : if_xcmdsrv.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h version.h
+ if_mzsch.obj : if_mzsch.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h if_mzsch.h
+ indent.obj : indent.c vim.h [.auto]config.h feature.h os_unix.h
+ json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h version.h
+ list.obj : list.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h farsi.h arabic.h
+ main.obj : main.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+! arabic.h farsi.c arabic.c
+ mark.obj : mark.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ memfile.obj : memfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ memline.obj : memline.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ menu.obj : menu.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ message.obj : message.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ misc1.obj : misc1.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h version.h
+ misc2.obj : misc2.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ move.obj : move.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ mbyte.obj : mbyte.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ normal.obj : normal.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ ops.obj : ops.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ option.obj : option.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ os_unix.obj : os_unix.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h os_unixx.h
+ os_vms.obj : os_vms.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h os_unixx.h
+ pathdef.obj : pathdef.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ popupmnu.obj : popupmnu.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ quickfix.obj : quickfix.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ regexp.obj : regexp.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ screen.obj : screen.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ search.obj : search.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ sha256.obj : sha256.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h farsi.h arabic.h
+ sign.obj : sign.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h farsi.h arabic.h
+ spell.obj : spell.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ spellfile.obj : spellfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+ syntax.obj : syntax.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ tag.obj : tag.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ term.obj : term.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ termlib.obj : termlib.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ textprop.obj : textprop.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ ui.obj : ui.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ undo.obj : undo.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ userfunc.obj : userfunc.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+ version.obj : version.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h version.h
+ window.obj : window.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ gui.obj : gui.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ gui_gtk.obj : gui_gtk.c gui_gtk_f.h vim.h [.auto]config.h feature.h \
+ os_unix.h ascii.h keymap.h term.h macros.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h \
+! proto.h globals.h farsi.h arabic.h [-.pixmaps]stock_icons.h
+ gui_gtk_f.obj : gui_gtk_f.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h gui_gtk_f.h
+ gui_motif.obj : gui_motif.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h [-.pixmaps]alert.xpm [-.pixmaps]error.xpm \
+ [-.pixmaps]generic.xpm [-.pixmaps]info.xpm [-.pixmaps]quest.xpm
+ gui_athena.obj : gui_athena.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h gui_at_sb.h
+ gui_gtk_x11.obj : gui_gtk_x11.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h gui_gtk_f.h [-.runtime]vim32x32.xpm \
+ [-.runtime]vim16x16.xpm [-.runtime]vim48x48.xpm
+ gui_x11.obj : gui_x11.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h [-.runtime]vim32x32.xpm \
+ [-.runtime]vim16x16.xpm [-.runtime]vim48x48.xpm [-.pixmaps]tb_new.xpm \
+ [-.pixmaps]tb_open.xpm [-.pixmaps]tb_close.xpm [-.pixmaps]tb_save.xpm \
+ [-.pixmaps]tb_print.xpm [-.pixmaps]tb_cut.xpm [-.pixmaps]tb_copy.xpm \
+--- 514,791 ----
+ buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ crypt.obj : crypt.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h arabic.h
+ crypt_zip.obj : crypt_zip.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h arabic.h
+ dict.obj : dict.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h arabic.h
+ diff.obj : diff.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ digraph.obj : digraph.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ edit.obj : edit.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ eval.obj : eval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h version.h
+ evalfunc.obj : evalfunc.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h arabic.h version.h
+ ex_cmds.obj : ex_cmds.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ ex_cmds2.obj : ex_cmds2.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ ex_docmd.obj : ex_docmd.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ ex_eval.obj : ex_eval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ ex_getln.obj : ex_getln.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ fileio.obj : fileio.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ findfile.obj : findfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ fold.obj : fold.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ getchar.obj : getchar.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ hardcopy.obj : hardcopy.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ hashtab.obj : hashtab.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_cscope.obj : if_cscope.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h if_cscope.h
+ if_xcmdsrv.obj : if_xcmdsrv.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ if_mzsch.obj : if_mzsch.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro ex_cmds.h proto.h \
+! globals.h arabic.h if_mzsch.h
+ indent.obj : indent.c vim.h [.auto]config.h feature.h os_unix.h
+ json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h version.h
+ list.obj : list.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h arabic.h
+ main.obj : main.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h arabic.c
+ mark.obj : mark.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ memfile.obj : memfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ memline.obj : memline.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ menu.obj : menu.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ message.obj : message.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ misc1.obj : misc1.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h version.h
+ misc2.obj : misc2.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ move.obj : move.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ mbyte.obj : mbyte.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ normal.obj : normal.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ ops.obj : ops.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ option.obj : option.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ os_unix.obj : os_unix.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h os_unixx.h
+ os_vms.obj : os_vms.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h os_unixx.h
+ pathdef.obj : pathdef.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ popupmnu.obj : popupmnu.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ quickfix.obj : quickfix.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ regexp.obj : regexp.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ screen.obj : screen.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ search.obj : search.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ sha256.obj : sha256.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h arabic.h
+ sign.obj : sign.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h arabic.h
+ spell.obj : spell.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ spellfile.obj : spellfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h arabic.h
+ syntax.obj : syntax.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ tag.obj : tag.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ term.obj : term.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ termlib.obj : termlib.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ textprop.obj : textprop.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ ui.obj : ui.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ undo.obj : undo.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ userfunc.obj : userfunc.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h arabic.h
+ version.obj : version.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ window.obj : window.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ gui.obj : gui.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ gui_gtk.obj : gui_gtk.c gui_gtk_f.h vim.h [.auto]config.h feature.h \
+ os_unix.h ascii.h keymap.h term.h macros.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h \
+! proto.h globals.h arabic.h [-.pixmaps]stock_icons.h
+ gui_gtk_f.obj : gui_gtk_f.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h gui_gtk_f.h
+ gui_motif.obj : gui_motif.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h [-.pixmaps]alert.xpm [-.pixmaps]error.xpm \
+ [-.pixmaps]generic.xpm [-.pixmaps]info.xpm [-.pixmaps]quest.xpm
+ gui_athena.obj : gui_athena.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h gui_at_sb.h
+ gui_gtk_x11.obj : gui_gtk_x11.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h gui_gtk_f.h [-.runtime]vim32x32.xpm \
+ [-.runtime]vim16x16.xpm [-.runtime]vim48x48.xpm
+ gui_x11.obj : gui_x11.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h [-.runtime]vim32x32.xpm \
+ [-.runtime]vim16x16.xpm [-.runtime]vim48x48.xpm [-.pixmaps]tb_new.xpm \
+ [-.pixmaps]tb_open.xpm [-.pixmaps]tb_close.xpm [-.pixmaps]tb_save.xpm \
+ [-.pixmaps]tb_print.xpm [-.pixmaps]tb_cut.xpm [-.pixmaps]tb_copy.xpm \
+***************
+*** 806,865 ****
+ gui_at_sb.obj : gui_at_sb.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h gui_at_sb.h
+ gui_at_fs.obj : gui_at_fs.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h gui_at_sb.h
+ pty.obj : pty.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
+ hangulin.obj : hangulin.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ if_perl.obj : [.auto]if_perl.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ if_perlsfio.obj : if_perlsfio.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ if_python.obj : if_python.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ if_tcl.obj : if_tcl.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ if_ruby.obj : if_ruby.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h version.h
+ beval.obj : beval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ gui_beval.obj : gui_beval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h
+ workshop.obj : workshop.c [.auto]config.h integration.h vim.h feature.h \
+ os_unix.h ascii.h keymap.h term.h macros.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h \
+! proto.h globals.h farsi.h arabic.h version.h workshop.h
+ wsdebug.obj : wsdebug.c
+ integration.obj : integration.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h integration.h
+ netbeans.obj : netbeans.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h farsi.h arabic.h version.h
+ gui_xmdlg.obj : gui_xmdlg.c [.auto]config.h vim.h feature.h os_unix.h
+ gui_xmebw.obj : gui_xmebw.c [.auto]config.h vim.h feature.h os_unix.h
+ xdiffi.obj : [.xdiff]xdiffi.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
+--- 805,864 ----
+ gui_at_sb.obj : gui_at_sb.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h gui_at_sb.h
+ gui_at_fs.obj : gui_at_fs.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h gui_at_sb.h
+ pty.obj : pty.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+! [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+ arabic.h
+ hangulin.obj : hangulin.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_perl.obj : [.auto]if_perl.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_perlsfio.obj : if_perlsfio.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_python.obj : if_python.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_tcl.obj : if_tcl.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_ruby.obj : if_ruby.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ beval.obj : beval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ gui_beval.obj : gui_beval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ workshop.obj : workshop.c [.auto]config.h integration.h vim.h feature.h \
+ os_unix.h ascii.h keymap.h term.h macros.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h \
+! proto.h globals.h arabic.h version.h workshop.h
+ wsdebug.obj : wsdebug.c
+ integration.obj : integration.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h integration.h
+ netbeans.obj : netbeans.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ gui_xmdlg.obj : gui_xmdlg.c [.auto]config.h vim.h feature.h os_unix.h
+ gui_xmebw.obj : gui_xmebw.c [.auto]config.h vim.h feature.h os_unix.h
+ xdiffi.obj : [.xdiff]xdiffi.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
+*** ../vim-8.1.0931/src/configure.ac 2019-01-26 15:12:52.554260934 +0100
+--- src/configure.ac 2019-02-16 14:39:26.339265449 +0100
+***************
+*** 2155,2172 ****
+ 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,
+--- 2155,2163 ----
+ AC_DEFINE(DISABLE_ARABIC)
+ fi
+
+! dnl Farsi language support has been removed, ignore --disable-farsi
+ AC_ARG_ENABLE(farsi,
+! [ --disable-farsi Deprecated.],,)
+
+ AC_MSG_CHECKING(--enable-hangulinput argument)
+ AC_ARG_ENABLE(hangulinput,
+*** ../vim-8.1.0931/src/auto/configure 2019-01-26 15:12:52.554260934 +0100
+--- src/auto/configure 2019-02-16 14:39:55.467099856 +0100
+***************
+*** 1498,1504 ****
+ --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.
+--- 1498,1504 ----
+ --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 Deprecated.
+ --enable-hangulinput Include Hangul input support.
+ --enable-xim Include XIM input support.
+ --enable-fontset Include X fontset output support.
+***************
+*** 7980,8003 ****
+
+ 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; }
+--- 7980,7990 ----
+*** ../vim-8.1.0931/src/config.h.in 2019-01-26 15:12:52.554260934 +0100
+--- src/config.h.in 2019-02-16 14:40:33.146885460 +0100
+***************
+*** 391,399 ****
+ /* 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
+
+--- 391,396 ----
+*** ../vim-8.1.0931/src/testdir/test_farsi.vim 2017-01-29 19:52:38.000000000 +0100
+--- src/testdir/test_farsi.vim 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,133 ****
+- " Simplistic testing of Farsi mode.
+- " Note: must be edited with latin1 encoding.
+-
+- if !has('farsi')
+- finish
+- endif
+- " Farsi uses a single byte encoding.
+- set enc=latin1
+-
+- func Test_farsi_toggle()
+- new
+-
+- set altkeymap
+- call assert_equal(0, &fkmap)
+- call assert_equal(0, &rl)
+- call feedkeys("\<F8>", 'x')
+- call assert_equal(1, &fkmap)
+- call assert_equal(1, &rl)
+- call feedkeys("\<F8>", 'x')
+- call assert_equal(0, &fkmap)
+- call assert_equal(0, &rl)
+-
+- set rl
+- " conversion from Farsi 3342 to Farsi VIM.
+- call setline(1, join(map(range(0x80, 0xff), 'nr2char(v:val)'), ''))
+- call feedkeys("\<F9>", 'x')
+- let exp = [0xfc, 0xf8, 0xc1, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
+- \ 0xc8, 0xc9, 0xca, 0xd0, 0xd1, 0xd2, 0xd3, 0xd6,
+- \ 0xd6, 0xd6, 0xd7, 0xd7, 0xd7, 0xd8, 0xd9, 0xda,
+- \ 0xdb, 0xdc, 0xdc, 0xc1, 0xdd, 0xde, 0xe0, 0xe0,
+- \ 0xe1, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6,
+- \ 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae,
+- \ 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
+- \ 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe,
+- \ 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6,
+- \ 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce,
+- \ 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6,
+- \ 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde,
+- \ 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6,
+- \ 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xfb, 0xfb, 0xfe,
+- \ 0xfe, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6,
+- \ 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xe1,
+- \ ]
+- call assert_equal(join(map(exp, 'nr2char(v:val)'), ''), getline(1))
+-
+- " conversion from Farsi VIM to Farsi 3342.
+- call setline(1, join(map(range(0x80, 0xff), 'nr2char(v:val)'), ''))
+- call feedkeys("\<F9>", 'x')
+- let exp = [0xfc, 0xf8, 0xc1, 0x83, 0x84, 0x85, 0x86, 0x87,
+- \ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x90,
+- \ 0x90, 0x90, 0x92, 0x93, 0x93, 0x95, 0x96, 0x97,
+- \ 0x98, 0xdc, 0x9a, 0x9b, 0x9c, 0x9e, 0x9e, 0xff,
+- \ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
+- \ 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
+- \ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
+- \ 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
+- \ 0xc0, 0xc1, 0xc2, 0x83, 0x84, 0x85, 0x86, 0x87,
+- \ 0x88, 0x89, 0x8a, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
+- \ 0x8b, 0x8c, 0x8d, 0x8e, 0xd4, 0xd5, 0x90, 0x93,
+- \ 0x95, 0x96, 0x97, 0x98, 0x99, 0x9b, 0x9c, 0xdf,
+- \ 0x9d, 0xff, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
+- \ 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xec, 0xee, 0xef,
+- \ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
+- \ 0xf8, 0xf9, 0xfa, 0xec, 0x80, 0xfd, 0xee, 0xff,
+- \ ]
+- call assert_equal(join(map(exp, 'nr2char(v:val)'), ''), getline(1))
+-
+- bwipe!
+- endfunc
+-
+- func Test_farsi_map()
+- new
+-
+- set altkeymap
+- set rl
+- " RHS of mapping is reversed.
+- imap xyz abc
+- call feedkeys("axyz\<Esc>", 'tx')
+- call assert_equal('cba', getline(1))
+-
+- set norl
+- iunmap xyz
+- set noaltkeymap
+- bwipe!
+- endfunc
+-
+- func Test_input_farsi()
+- new
+- setlocal rightleft fkmap
+- " numbers switch input direction
+- call feedkeys("aabc0123456789.+-^%#=xyz\<Esc>", 'tx')
+- call assert_equal("\x8cÌν®¥ª­«¦¹¸·¶µ´³²±°Ô\x93Õ", getline('.'))
+-
+- " all non-number special chars with spaces
+- call feedkeys("oB E F H I K L M O P Q R T U W Y ` ! @ # $ % ^ & * () - _ = + \\ | : \" . / < > ? \<Esc>", 'tx')
+- call assert_equal("¡ ô ú À ö æ ç Â [ ] ÷ ó ò ð õ ñ ¢ £  § ® ¤ ¥ ª ¬ è ¨© ­ é ½ « ë ê º » ¦  ¯ ¾ ¼ ¿ ", getline('.'))
+-
+- " all non-number special chars without spaces
+- call feedkeys("oBEFHIKLMOPQRTUWY`!@#$%^&*()-_=+\\|:\"./<>?\<Esc>",'tx')
+- call assert_equal("¡ôúÀöæçÂ[]÷óòðõñ¢£§®¤¥ª¬è¨©­é½«ë꺻¦¯¾¼¿", getline('.'))
+-
+- " all letter chars with spaces
+- call feedkeys("oa A b c C d D e f g G h i j J k l m n N o p q r s S t u v V w x X y z Z ; \ , [ ] \<Esc>", 'tx')
+- call assert_equal("Ñ ù Ì Î Ï á þ Æ Ã Ü ø Á à Å ü Þ Ý Ä Ë Ë Ê É Ó Ù Ð û Ø Ö Í Í Ò Ô Ô × Õ ý Ú  ß Ç È ", getline('.'))
+-
+- " all letter chars without spaces
+- call feedkeys("oaAbcCdDefgGhijJklmnNopqrsStuvVwxXyzZ;\,[]\<Esc>", 'tx')
+- call assert_equal("\x8cùÌÎÏ\x9fî\x86\x83ÜøÁ\x9d\x85\x80\x9c\x9b\x84ËË\x8a\x89\x8e\x96\x8bì\x95\x90ÍÍ\x8dÔÔ\x93Õý\x97ß\x87\x88", getline('.'))
+-
+- bwipe!
+- endfunc
+-
+- func Test_command_line_farsi()
+- set allowrevins altkeymap
+-
+- " letter characters with spaces
+- call feedkeys(":\"\<C-_>a A b c C d D e f g G h i j J k l m n N o p q r s S t u v V w x X y z Z ; \\ , [ ]\<CR>", 'tx')
+- call assert_equal("\"\x88 Ç ß ë Ú Õ Õ × Ô Ô Ò Í Í Ö Ø û Ð Ù Ó É Ê Ë Ë Ä Ý Þ ü Å à Á ø Ü Ã Æ þ á Ï Î Ì ù Ñ", getreg(':'))
+-
+- " letter characters without spaces
+- call feedkeys(":\"\<C-_>aAbcCdDefgGhijJklmnNopqrsStuvVwxXyzZ;\\,[]\<CR>", 'tx')
+- call assert_equal("\"\x88\x87ßëÚÕÕ\x93ÔÔ\x8dÍÍ\x90\x95ì\x8b\x96\x8e\x89\x8aËË\x84\x9b\x9c\x80\x85\x9dÁøÜ\x83\x86î\x9fÏÎÌù\x8c", getreg(':'))
+-
+- " other characters with spaces
+- call feedkeys(":\"\<C-_>0 1 2 3 4 5 6 7 8 9 ` . ! \" $ % ^ & / () = \\ ? + - _ * : # ~ @ < > { } | B E F H I K L M O P Q R T U W Y\<CR>", 'tx')
+- call assert_equal("\"ñ õ ð ò ó ÷ ] [ Â ç æ ö À ú ô ¡ ê } { ¼ ¾ § ~ ® º è é ­ «  ¿ ë ½ ©¨ ¯ ¬ ª ¥ ¤ »  £  ¦ ¢ ¹ ¸ · ¶ µ ´ ³ ² ± °", getreg(':'))
+-
+- " other characters without spaces
+- call feedkeys(":\"\<C-_>0123456789`.!\"$%^&/()=\\?+-_*:#~@<>{}|BEFHIKLMOPQRTUWY\<CR>", 'tx')
+- call assert_equal("\"ñõðòó÷][ÂçæöÀúô¡ê}{¼¾§~®ºèé­«¿ë½©¨¯¬ª¥¤»£¦¢¹¸·¶µ´³²±°", getreg(':'))
+-
+- set noallowrevins noaltkeymap
+- endfunc
+--- 0 ----
+*** ../vim-8.1.0931/src/version.c 2019-02-16 14:07:34.326138106 +0100
+--- src/version.c 2019-02-16 15:03:10.071702575 +0100
+***************
+*** 255,265 ****
+ #else
+ "-extra_search",
+ #endif
+- #ifdef FEAT_FKMAP
+- "+farsi",
+- #else
+ "-farsi",
+- #endif
+ #ifdef FEAT_SEARCHPATH
+ "+file_in_path",
+ #else
+--- 255,261 ----
+*** ../vim-8.1.0931/src/testdir/Make_all.mak 2019-02-15 20:14:56.740255481 +0100
+--- src/testdir/Make_all.mak 2019-02-16 14:48:22.816200032 +0100
+***************
+*** 118,124 ****
+ test_expand_func \
+ test_expr \
+ test_expr_utf8 \
+- test_farsi \
+ test_feedkeys \
+ test_file_perm \
+ test_file_size \
+--- 118,123 ----
+***************
+*** 318,324 ****
+ test_exists.res \
+ test_exists_autocmd.res \
+ test_exit.res \
+- test_farsi.res \
+ test_file_size.res \
+ test_filechanged.res \
+ test_find_complete.res \
+--- 317,322 ----
+*** ../vim-8.1.0931/runtime/doc/options.txt 2019-02-15 21:06:05.334289769 +0100
+--- runtime/doc/options.txt 2019-02-16 14:58:41.716818142 +0100
+***************
+*** 688,700 ****
+ {not in Vi}
+ {only available when compiled with the |+farsi|
+ feature}
+! When on, the second language is Farsi. In editing mode CTRL-_ toggles
+! the keyboard map between Farsi and English, when 'allowrevins' set.
+!
+! When off, the keyboard map toggles between Hebrew and English. This
+! is useful to start the Vim in native mode i.e. English (left-to-right
+! mode) and have default second language Farsi or Hebrew (right-to-left
+! mode). See |farsi.txt|.
+
+ *'ambiwidth'* *'ambw'*
+ 'ambiwidth' 'ambw' string (default: "single")
+--- 688,695 ----
+ {not in Vi}
+ {only available when compiled with the |+farsi|
+ feature}
+! This option was for using Farsi, which has been removed. See
+! |farsi.txt|.
+
+ *'ambiwidth'* *'ambw'*
+ 'ambiwidth' 'ambw' string (default: "single")
+***************
+*** 3273,3281 ****
+ {not in Vi}
+ {only available when compiled with the |+rightleft|
+ feature}
+! When on, the keyboard is mapped for the Farsi character set.
+! Normally you would set 'allowrevins' and use CTRL-_ in insert mode to
+! toggle this option |i_CTRL-_|. See |farsi.txt|.
+
+ *'foldclose'* *'fcl'*
+ 'foldclose' 'fcl' string (default "")
+--- 3296,3303 ----
+ {not in Vi}
+ {only available when compiled with the |+rightleft|
+ feature}
+! This option was for using Farsi, which has been removed. See
+! |farsi.txt|.
+
+ *'foldclose'* *'fcl'*
+ 'foldclose' 'fcl' string (default "")
+--- 9318,9321 ----
+ screen. When non-zero, characters are sent to the terminal one by
+ one. For MS-DOS pcterm this does not work. For debugging purposes.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0931/runtime/doc/starting.txt 2019-02-08 14:33:54.818762019 +0100
+--- runtime/doc/starting.txt 2019-02-16 14:59:17.312680937 +0100
+***************
+*** 321,329 ****
+ and exits.) {not in Vi}
+
+ *-F*
+! -F Farsi mode. Sets the 'fkmap' and 'rightleft' options on.
+! (Only when compiled with |+rightleft| and |+farsi| features,
+! otherwise Vim gives an error message and exits.) {not in Vi}
+
+ *-H*
+ -H Hebrew mode. Sets the 'hkmap' and 'rightleft' options on.
+--- 321,328 ----
+ and exits.) {not in Vi}
+
+ *-F*
+! -F This was used for Farsi mode, which has been removed.
+! See |farsi.txt|.
+
+ *-H*
+ -H Hebrew mode. Sets the 'hkmap' and 'rightleft' options on.
+*** ../vim-8.1.0931/runtime/doc/quickref.txt 2019-02-08 12:46:03.588784187 +0100
+--- runtime/doc/quickref.txt 2019-02-16 15:00:19.368432985 +0100
+***************
+*** 600,606 ****
+ Short explanation of each option: *option-list*
+ 'aleph' 'al' ASCII code of the letter Aleph (Hebrew)
+ 'allowrevins' 'ari' allow CTRL-_ in Insert and Command-line mode
+- 'altkeymap' 'akm' for default second language (Farsi/Hebrew)
+ 'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
+ 'antialias' 'anti' Mac OS X: use smooth, antialiased fonts
+ 'autochdir' 'acd' change directory to the file in the current window
+--- 600,605 ----
+***************
+*** 700,706 ****
+ 'filetype' 'ft' type of file, used for autocommands
+ 'fillchars' 'fcs' characters to use for displaying special items
+ 'fixendofline' 'fixeol' make sure last line in file has <EOL>
+- 'fkmap' 'fk' Farsi keyboard mapping
+ 'foldclose' 'fcl' close a fold when the cursor leaves it
+ 'foldcolumn' 'fdc' width of the column used to indicate folds
+ 'foldenable' 'fen' set to display all folds open
+--- 699,704 ----
+*** ../vim-8.1.0931/runtime/doc/farsi.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/farsi.txt 2019-02-16 15:02:42.067826646 +0100
+***************
+*** 1,4 ****
+! *farsi.txt* For Vim version 8.1. Last change: 2015 Aug 29
+
+
+ VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
+--- 1,4 ----
+! *farsi.txt* For Vim version 8.1. Last change: 2019 Feb 16
+
+
+ VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
+***************
+*** 9,269 ****
+ {Vi does not have any of these commands}
+
+ *E27*
+! In order to use right-to-left and Farsi mapping support, it is necessary to
+! compile Vim with the |+farsi| feature.
+
+! These functions have been made by Mortaza G. Shiran <shiran@jps.net>
+
+
+! Introduction
+! ------------
+! In right-to-left oriented files the characters appear on the screen from right
+! to left. This kind of file is most useful when writing Farsi documents,
+! composing faxes or writing Farsi memos.
+!
+! The commands, prompts and help files are not in Farsi, therefore the user
+! interface remains the standard Vi interface.
+!
+!
+! Highlights
+! ----------
+! o Editing left-to-right files as in the original Vim, no change.
+!
+! o Viewing and editing files in right-to-left windows. File orientation is
+! per window, so it is possible to view the same file in right-to-left and
+! left-to-right modes, simultaneously.
+!
+! o Compatibility to the original Vim. Almost all features work in
+! right-to-left mode (see bugs below).
+!
+! o Changing keyboard mapping and reverse insert modes using a single
+! command.
+!
+! o Backing from reverse insert mode to the correct place in the file
+! (if possible).
+!
+! o While in Farsi mode, numbers are entered from left to right. Upon entering
+! a none number character, that character will be inserted just into the
+! left of the last number.
+!
+! o No special terminal with right-to-left capabilities is required. The
+! right-to-left changes are completely hardware independent. Only
+! Farsi font is necessary.
+!
+! o Farsi keymapping on the command line in reverse insert mode.
+!
+! o Toggling between left-to-right and right-to-left via F8 function key.
+!
+! o Toggling between Farsi ISIR-3342 standard encoding and Vim Farsi via F9
+! function key. Since this makes sense only for the text written in
+! right-to-left mode, this function is also supported only in right-to-left
+! mode.
+!
+! Farsi Fonts *farsi-fonts*
+! -----------
+!
+! The following files are found in the subdirectories of the '$VIM/farsi/fonts'
+! directory:
+!
+! + far-a01.pcf X Windows fonts for Unix including Linux systems
+! + far-a01.bf X Windows fonts for SunOS
+! + far-a01.f16 a screen fonts for Unix including Linux systems
+! + far-a01.fon a monospaced fonts for Windows NT/95/98
+! + far-a01.com a screen fonts for DOS
+!
+!
+! Font Installation
+! -----------------
+!
+! o Installation of fonts for MS Window systems (NT/95/98)
+!
+! From 'Control Panel' folder, start the 'Fonts' program. Then from 'file'
+! menu item select 'Install New Fonts ...'. Browse and select the
+! 'far-a01.fon', then follow the installation guide.
+! NOTE: several people have reported that this does not work. The solution
+! is unknown.
+!
+! o Installation of fonts for X Window systems (Unix/Linux)
+!
+! Depending on your system, copy far-a01.pcf.Z or far-a01.pcf.gz into a
+! directory of your choice. Change to the directory containing the Farsi
+! fonts and execute the following commands:
+!
+! > mkfontdir
+! > xset +fp path_name_of_farsi_fonts_directory
+!
+! o Installation of fonts for X Window systems (SunOS)
+!
+! Copy far-a01.bf font into a directory of your choice.
+! Change to the directory containing the far-a01.fb fonts and
+! execute the following commands:
+!
+! > fldfamily
+! > xset +fp path_name_of_fonts_directory
+!
+! o Installation of ASCII screen fonts (Unix/Linux)
+!
+! For Linux system, copy the far-a01.f16 fonts into /usr/lib/kbd/consolefonts
+! directory and execute the setfont program as "setfont far-a01.f16". For
+! other systems (e.g. SCO Unix), please refer to the fonts installation
+! section of your system administration manuals.
+!
+! o Installation of ASCII screen fonts (DOS)
+!
+! After system power on, prior to the first use of Vim, upload the Farsi
+! fonts by executing the far-a01.com font uploading program.
+!
+!
+! Usage
+! -----
+! Prior to starting Vim, the environment in which Vim can run in Farsi mode,
+! must be set. In addition to installation of Farsi fonts, following points
+! refer to some of the system environments, which you may need to set:
+! Key code mapping, loading graphic card in ASCII screen mode, setting the IO
+! driver in 8 bit clean mode ... .
+!
+! o Setting the Farsi fonts
+!
+! + For Vim GUI set the 'guifont' to far-a01. This is done by entering
+! ':set guifont=far-a01' in the Vim window.
+!
+! You can have 'guifont' set to far-a01 by Vim during the Vim startup
+! by appending the ':set guifont=far-a01' into your .vimrc file
+! (in case of NT/95/98 platforms _vimrc).
+!
+! Under the X Window environment, you can also start Vim with the
+! '-fn far-a01' option.
+!
+! + For Vim within a xterm, start a xterm with the Farsi fonts (e.g.
+! kterm -fn far-a01). Then start Vim inside the kterm.
+!
+! + For Vim under DOS, prior to the first usage of Vim, upload the Farsi
+! fonts by executing the far-a01.com fonts uploading program.
+!
+! o Farsi Keymapping Activation
+!
+! To activate the Farsi keymapping, set either 'altkeymap' or 'fkmap'.
+! This is done by entering ':set akm' or ':set fk' in the Vim window.
+! You can have 'altkeymap' or 'fkmap' set as default by appending ':set akm'
+! or ':set fk' in your .vimrc file or _vimrc in case of NT/95/98 platforms.
+!
+! To turn off the Farsi keymapping as a default second language keymapping,
+! reset the 'altkeymap' by entering ':set noakm'.
+!
+! o right-to-left Farsi Mode
+!
+! By default Vim starts in Left-to-right mode. Following are ways to change
+! the window orientation:
+!
+! + Start Vim with the -F option (e.g. vim -F ...).
+!
+! + Use the F8 function key to toggle between left-to-right and right-to-left.
+!
+! + While in Left-to-right mode, enter 'set rl' in the command line ('rl' is
+! the abbreviation for rightleft).
+!
+! + Put the 'set rl' line in your '.vimrc' file to start Vim in
+! right-to-left mode permanently.
+!
+! Encoding
+! --------
+!
+! The letter encoding used is the Vim extended ISIR-3342 standard with a built
+! in function to convert between Vim extended ISIR-3342 and ISIR-3342 standard.
+!
+! For document portability reasons, the letter encoding is kept the same across
+! different platforms (i.e. UNIX's, NT/95/98, MS DOS, ...).
+!
+!
+! o Keyboard
+!
+! + CTRL-_ in insert/replace modes toggles between Farsi(akm)/Latin
+! mode as follows:
+!
+! + CTRL-_ moves the cursor to the end of the typed text in edit mode.
+!
+! + CTRL-_ in command mode only toggles keyboard mapping between Farsi(akm)/
+! Latin. The Farsi text is then entered in reverse insert mode.
+!
+! + F8 - Toggles between left-to-right and right-to-left.
+!
+! + F9 - Toggles the encoding between ISIR-3342 standard and Vim extended
+! ISIR-3342 (supported only in right-to-left mode).
+!
+! + Keyboard mapping is based on the Iranian ISIRI-2901 standard.
+! Following table shows the keyboard mapping while Farsi(akm) mode set:
+!
+! -------------------------------------
+! ` 1 2 3 4 5 6 7 8 9 0 - =
+! ¢ ± ² ³ ´ µ ¶ · ¸ ¹ ° ­ ½
+! -------------------------------------
+! ~ ! @ # $ % ^ & * ( ) _ +
+! ~ £ § ® ¤ ¥ ª ¬ è ¨ © é «
+! -------------------------------------
+! q w e r t z u i o p [ ]
+! Ó Ò Æ Ù Ø Õ Ö à Ê É Ç ˆ
+! -------------------------------------
+! Q W E R T Z U I O P { }
+! ÷ õ ô ó ò ý ð ö [ ] { }
+! -------------------------------------
+! a s d f g h j k l ; ' \
+! Ñ Ð á Ã Ü Á Å Þ Ý Ú Û ë
+! -------------------------------------
+! A S D F G H J K L : " |
+! ù û  þ ú ø À ü æ ç º » ê
+! -------------------------------------
+! < y x c v b n m , . /
+! ¾ × Ô Î Í Ì Ë Ä ß ¦ ¯
+! -------------------------------------
+! > Y X C V B N M < > ?
+! ¼ ñ Ô Ï Í ¡ Ë Â ¾ ¼ ¿
+! -------------------------------------
+!
+! Note:
+! ¡ stands for Farsi PSP (break without space)
+!
+! ¢ stands for Farsi PCN (for HAMZE attribute)
+!
+! Restrictions
+! ------------
+!
+! o In insert/replace mode and fkmap (Farsi mode) set, CTRL-B is not
+! supported.
+!
+! o If you change the character mapping between Latin/Farsi, the redo buffer
+! will be reset (emptied). That is, redo is valid and will function (using
+! '.') only within the mode you are in.
+!
+! o While numbers are entered in Farsi mode, the redo buffer will be reset
+! (emptied). That is, you cannot redo the last changes (using '.') after
+! entering numbers.
+!
+! o While in left-to-right mode and Farsi mode set, CTRL-R is not supported.
+!
+! o While in right-to-left mode, the search on 'Latin' pattern does not work,
+! except if you enter the Latin search pattern in reverse.
+!
+! o In command mode there is no support for entering numbers from left
+! to right and also for the sake of flexibility the keymapping logic is
+! restricted.
+!
+! o Under the X Window environment, if you want to run Vim within a xterm
+! terminal emulator and Farsi mode set, you need to have an ANSI compatible
+! xterm terminal emulator. This is because the letter codes above 128 decimal
+! have certain meanings in the standard xterm terminal emulator.
+!
+! Note: Under X Window environment, Vim GUI works fine in Farsi mode.
+! This eliminates the need of any xterm terminal emulator.
+!
+!
+! Bugs
+! ----
+! While in insert/replace and Farsi mode set, if you repeatedly change the
+! cursor position (via cursor movement) and enter new text and then try to undo
+! the last change, the undo will lag one change behind. But as you continue to
+! undo, you will reach the original line of text. You can also use U to undo all
+! changes made in the current line.
+!
+! For more information about the bugs refer to rileft.txt.
+!
+! vim:tw=78:ts=8:ft=help:norl:
+--- 9,20 ----
+ {Vi does not have any of these commands}
+
+ *E27*
+! Farsi support has been removed in patch 8.1.0932. At that time it was
+! outdated and unused.
+
+! If you would like to bring Farsi support back, please have a look at the old
+! Farsi code, as it was present at the 8.1 release. It should be merged with
+! Arabic support using the Unicode character set.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0931/src/version.c 2019-02-16 14:07:34.326138106 +0100
+--- src/version.c 2019-02-16 15:03:10.071702575 +0100
+***************
+*** 785,786 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 932,
+ /**/
+
+--
+It is too bad that the speed of light hasn't kept pace with the
+changes in CPU speed and network bandwidth. -- <wietse@porcupine.org>
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0933 b/data/vim/patches/8.1.0933
new file mode 100644
index 000000000..693c17933
--- /dev/null
+++ b/data/vim/patches/8.1.0933
@@ -0,0 +1,473 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0933
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0933
+Problem: When using VTP scroll region isn't used properly.
+Solution: Make better use of the scroll region. (Nobuhiro Takasaki,
+ closes #3974)
+Files: src/os_win32.c, src/term.c
+
+
+*** ../vim-8.1.0932/src/os_win32.c 2019-02-16 14:07:34.326138106 +0100
+--- src/os_win32.c 2019-02-16 16:44:59.511679299 +0100
+***************
+*** 171,176 ****
+--- 171,179 ----
+ static void scroll(unsigned cLines);
+ static void set_scroll_region(unsigned left, unsigned top,
+ unsigned right, unsigned bottom);
++ static void set_scroll_region_tb(unsigned top, unsigned bottom);
++ static void set_scroll_region_lr(unsigned left, unsigned right);
++ static void insert_lines(unsigned cLines);
+ static void delete_lines(unsigned cLines);
+ static void gotoxy(unsigned x, unsigned y);
+ static void standout(void);
+***************
+*** 5392,5398 ****
+
+ if (handles[0] == INVALID_HANDLE_VALUE)
+ {
+! CloseHandle(handles[1]);
+ return FALSE;
+ }
+
+--- 5395,5401 ----
+
+ if (handles[0] == INVALID_HANDLE_VALUE)
+ {
+! CloseHandle(handles[1]);
+ return FALSE;
+ }
+
+***************
+*** 5976,5984 ****
+ g_srScrollRegion.Top = top;
+ g_srScrollRegion.Right = right;
+ g_srScrollRegion.Bottom = bottom;
+
+! if (USE_VTP)
+! vtp_printf("\033[%d;%dr", top + 1, bottom + 1);
+ }
+
+
+--- 5979,6008 ----
+ g_srScrollRegion.Top = top;
+ g_srScrollRegion.Right = right;
+ g_srScrollRegion.Bottom = bottom;
++ }
++
++ static void
++ set_scroll_region_tb(
++ unsigned top,
++ unsigned bottom)
++ {
++ if (top >= bottom || bottom > (unsigned)Rows - 1)
++ return;
+
+! g_srScrollRegion.Top = top;
+! g_srScrollRegion.Bottom = bottom;
+! }
+!
+! static void
+! set_scroll_region_lr(
+! unsigned left,
+! unsigned right)
+! {
+! if (left >= right || right > (unsigned)Columns - 1)
+! return;
+!
+! g_srScrollRegion.Left = left;
+! g_srScrollRegion.Right = right;
+ }
+
+
+***************
+*** 5988,6034 ****
+ static void
+ insert_lines(unsigned cLines)
+ {
+! SMALL_RECT source;
+ COORD dest;
+ CHAR_INFO fill;
+
+! dest.X = 0;
+ dest.Y = g_coord.Y + cLines;
+
+! source.Left = 0;
+ source.Top = g_coord.Y;
+ source.Right = g_srScrollRegion.Right;
+ source.Bottom = g_srScrollRegion.Bottom - cLines;
+
+! if (!USE_VTP)
+ {
+ fill.Char.AsciiChar = ' ';
+! fill.Attributes = g_attrCurrent;
+
+- ScrollConsoleScreenBuffer(g_hConOut, &source, NULL, dest, &fill);
+- }
+- else
+- {
+ set_console_color_rgb();
+
+! gotoxy(1, source.Top + 1);
+! vtp_printf("\033[%dT", cLines);
+ }
+!
+! /* Here we have to deal with a win32 console flake: If the scroll
+! * region looks like abc and we scroll c to a and fill with d we get
+! * cbd... if we scroll block c one line at a time to a, we get cdd...
+! * vim expects cdd consistently... So we have to deal with that
+! * here... (this also occurs scrolling the same way in the other
+! * direction). */
+
+ if (source.Bottom < dest.Y)
+ {
+ COORD coord;
+
+! coord.X = 0;
+! coord.Y = source.Bottom;
+! clear_chars(coord, Columns * (dest.Y - source.Bottom));
+ }
+ }
+
+--- 6012,6060 ----
+ static void
+ insert_lines(unsigned cLines)
+ {
+! SMALL_RECT source, clip;
+ COORD dest;
+ CHAR_INFO fill;
+
+! dest.X = g_srScrollRegion.Left;
+ dest.Y = g_coord.Y + cLines;
+
+! source.Left = g_srScrollRegion.Left;
+ source.Top = g_coord.Y;
+ source.Right = g_srScrollRegion.Right;
+ source.Bottom = g_srScrollRegion.Bottom - cLines;
+
+! clip.Left = g_srScrollRegion.Left;
+! clip.Top = g_coord.Y;
+! clip.Right = g_srScrollRegion.Right;
+! clip.Bottom = g_srScrollRegion.Bottom;
+!
+ {
+ fill.Char.AsciiChar = ' ';
+! fill.Attributes = g_attrDefault;
+
+ set_console_color_rgb();
+
+! ScrollConsoleScreenBuffer(g_hConOut, &source, &clip, dest, &fill);
+ }
+! // Here we have to deal with a win32 console flake: If the scroll
+! // region looks like abc and we scroll c to a and fill with d we get
+! // cbd... if we scroll block c one line at a time to a, we get cdd...
+! // vim expects cdd consistently... So we have to deal with that
+! // here... (this also occurs scrolling the same way in the other
+! // direction).
+
+ if (source.Bottom < dest.Y)
+ {
+ COORD coord;
++ int i;
+
+! coord.X = source.Left;
+! for (i = clip.Top; i < dest.Y; ++i)
+! {
+! coord.Y = i;
+! clear_chars(coord, source.Right - source.Left + 1);
+! }
+ }
+ }
+
+***************
+*** 6039,6088 ****
+ static void
+ delete_lines(unsigned cLines)
+ {
+! SMALL_RECT source;
+ COORD dest;
+ CHAR_INFO fill;
+ int nb;
+
+! dest.X = 0;
+ dest.Y = g_coord.Y;
+
+! source.Left = 0;
+ source.Top = g_coord.Y + cLines;
+ source.Right = g_srScrollRegion.Right;
+ source.Bottom = g_srScrollRegion.Bottom;
+
+! if (!USE_VTP)
+ {
+ fill.Char.AsciiChar = ' ';
+! fill.Attributes = g_attrCurrent;
+
+- ScrollConsoleScreenBuffer(g_hConOut, &source, NULL, dest, &fill);
+- }
+- else
+- {
+ set_console_color_rgb();
+
+! gotoxy(1, source.Top + 1);
+! vtp_printf("\033[%dS", cLines);
+ }
+!
+! /* Here we have to deal with a win32 console flake: If the scroll
+! * region looks like abc and we scroll c to a and fill with d we get
+! * cbd... if we scroll block c one line at a time to a, we get cdd...
+! * vim expects cdd consistently... So we have to deal with that
+! * here... (this also occurs scrolling the same way in the other
+! * direction). */
+
+ nb = dest.Y + (source.Bottom - source.Top) + 1;
+
+ if (nb < source.Top)
+ {
+ COORD coord;
+
+! coord.X = 0;
+! coord.Y = nb;
+! clear_chars(coord, Columns * (source.Top - nb));
+ }
+ }
+
+--- 6065,6112 ----
+ static void
+ delete_lines(unsigned cLines)
+ {
+! SMALL_RECT source, clip;
+ COORD dest;
+ CHAR_INFO fill;
+ int nb;
+
+! dest.X = g_srScrollRegion.Left;
+ dest.Y = g_coord.Y;
+
+! source.Left = g_srScrollRegion.Left;
+ source.Top = g_coord.Y + cLines;
+ source.Right = g_srScrollRegion.Right;
+ source.Bottom = g_srScrollRegion.Bottom;
+
+! clip.Left = g_srScrollRegion.Left;
+! clip.Top = g_coord.Y;
+! clip.Right = g_srScrollRegion.Right;
+! clip.Bottom = g_srScrollRegion.Bottom;
+!
+ {
+ fill.Char.AsciiChar = ' ';
+! fill.Attributes = g_attrDefault;
+
+ set_console_color_rgb();
+
+! ScrollConsoleScreenBuffer(g_hConOut, &source, &clip, dest, &fill);
+ }
+! // Here we have to deal with a win32 console flake; See insert_lines()
+! // above.
+
+ nb = dest.Y + (source.Bottom - source.Top) + 1;
+
+ if (nb < source.Top)
+ {
+ COORD coord;
++ int i;
+
+! coord.X = source.Left;
+! for (i = nb; i < clip.Bottom; ++i)
+! {
+! coord.Y = i;
+! clear_chars(coord, source.Right - source.Left + 1);
+! }
+ }
+ }
+
+***************
+*** 6508,6513 ****
+--- 6532,6545 ----
+ {
+ set_scroll_region(0, arg1 - 1, Columns - 1, arg2 - 1);
+ }
++ else if (argc == 2 && *p == 'R')
++ {
++ set_scroll_region_tb(arg1, arg2);
++ }
++ else if (argc == 2 && *p == 'V')
++ {
++ set_scroll_region_lr(arg1, arg2);
++ }
+ else if (argc == 1 && *p == 'A')
+ {
+ gotoxy(g_coord.X + 1,
+*** ../vim-8.1.0932/src/term.c 2019-02-12 20:46:45.247272511 +0100
+--- src/term.c 2019-02-16 16:46:22.787339791 +0100
+***************
+*** 540,602 ****
+ * are also translated in os_win32.c.
+ */
+ {(int)KS_NAME, "win32"},
+! {(int)KS_CE, "\033|K"}, /* clear to end of line */
+! {(int)KS_AL, "\033|L"}, /* add new blank line */
+ # ifdef TERMINFO
+! {(int)KS_CAL, "\033|%p1%dL"}, /* add number of new blank lines */
+ # else
+! {(int)KS_CAL, "\033|%dL"}, /* add number of new blank lines */
+ # endif
+! {(int)KS_DL, "\033|M"}, /* delete line */
+ # ifdef TERMINFO
+! {(int)KS_CDL, "\033|%p1%dM"}, /* delete number of lines */
+ # else
+! {(int)KS_CDL, "\033|%dM"}, /* delete number of lines */
+ # endif
+! {(int)KS_CL, "\033|J"}, /* clear screen */
+! {(int)KS_CD, "\033|j"}, /* clear to end of display */
+! {(int)KS_VI, "\033|v"}, /* cursor invisible */
+! {(int)KS_VE, "\033|V"}, /* cursor visible */
+!
+! {(int)KS_ME, "\033|0m"}, /* normal */
+! {(int)KS_MR, "\033|112m"}, /* reverse: black on lightgray */
+! {(int)KS_MD, "\033|15m"}, /* bold: white on black */
+ #if 1
+! {(int)KS_SO, "\033|31m"}, /* standout: white on blue */
+! {(int)KS_SE, "\033|0m"}, /* standout end */
+ #else
+! {(int)KS_SO, "\033|F"}, /* standout: high intensity */
+! {(int)KS_SE, "\033|f"}, /* standout end */
+ #endif
+! {(int)KS_CZH, "\033|225m"}, /* italic: blue text on yellow */
+! {(int)KS_CZR, "\033|0m"}, /* italic end */
+! {(int)KS_US, "\033|67m"}, /* underscore: cyan text on red */
+! {(int)KS_UE, "\033|0m"}, /* underscore end */
+! {(int)KS_CCO, "16"}, /* allow 16 colors */
+ # ifdef TERMINFO
+! {(int)KS_CAB, "\033|%p1%db"}, /* set background color */
+! {(int)KS_CAF, "\033|%p1%df"}, /* set foreground color */
+ # else
+! {(int)KS_CAB, "\033|%db"}, /* set background color */
+! {(int)KS_CAF, "\033|%df"}, /* set foreground color */
+ # endif
+
+! {(int)KS_MS, "y"}, /* save to move cur in reverse mode */
+ {(int)KS_UT, "y"},
+ {(int)KS_XN, "y"},
+ {(int)KS_LE, "\b"},
+ # ifdef TERMINFO
+! {(int)KS_CM, "\033|%i%p1%d;%p2%dH"},/* cursor motion */
+ # else
+! {(int)KS_CM, "\033|%i%d;%dH"},/* cursor motion */
+ # endif
+! {(int)KS_VB, "\033|B"}, /* visual bell */
+! {(int)KS_TI, "\033|S"}, /* put terminal in termcap mode */
+! {(int)KS_TE, "\033|E"}, /* out of termcap mode */
+ # ifdef TERMINFO
+! {(int)KS_CS, "\033|%i%p1%d;%p2%dr"},/* scroll region */
+ # else
+! {(int)KS_CS, "\033|%i%d;%dr"},/* scroll region */
+ # endif
+ # ifdef FEAT_TERMGUICOLORS
+ {(int)KS_8F, "\033|38;2;%lu;%lu;%lum"},
+--- 540,604 ----
+ * are also translated in os_win32.c.
+ */
+ {(int)KS_NAME, "win32"},
+! {(int)KS_CE, "\033|K"}, // clear to end of line
+! {(int)KS_AL, "\033|L"}, // add new blank line
+ # ifdef TERMINFO
+! {(int)KS_CAL, "\033|%p1%dL"}, // add number of new blank lines
+ # else
+! {(int)KS_CAL, "\033|%dL"}, // add number of new blank lines
+ # endif
+! {(int)KS_DL, "\033|M"}, // delete line
+ # ifdef TERMINFO
+! {(int)KS_CDL, "\033|%p1%dM"}, // delete number of lines
+! {(int)KS_CSV, "\033|%p1%d;%p2%dV"},
+ # else
+! {(int)KS_CDL, "\033|%dM"}, // delete number of lines
+! {(int)KS_CSV, "\033|%d;%dV"},
+ # endif
+! {(int)KS_CL, "\033|J"}, // clear screen
+! {(int)KS_CD, "\033|j"}, // clear to end of display
+! {(int)KS_VI, "\033|v"}, // cursor invisible
+! {(int)KS_VE, "\033|V"}, // cursor visible
+!
+! {(int)KS_ME, "\033|0m"}, // normal
+! {(int)KS_MR, "\033|112m"}, // reverse: black on lightgray
+! {(int)KS_MD, "\033|15m"}, // bold: white on black
+ #if 1
+! {(int)KS_SO, "\033|31m"}, // standout: white on blue
+! {(int)KS_SE, "\033|0m"}, // standout end
+ #else
+! {(int)KS_SO, "\033|F"}, // standout: high intensity
+! {(int)KS_SE, "\033|f"}, // standout end
+ #endif
+! {(int)KS_CZH, "\033|225m"}, // italic: blue text on yellow
+! {(int)KS_CZR, "\033|0m"}, // italic end
+! {(int)KS_US, "\033|67m"}, // underscore: cyan text on red
+! {(int)KS_UE, "\033|0m"}, // underscore end
+! {(int)KS_CCO, "16"}, // allow 16 colors
+ # ifdef TERMINFO
+! {(int)KS_CAB, "\033|%p1%db"}, // set background color
+! {(int)KS_CAF, "\033|%p1%df"}, // set foreground color
+ # else
+! {(int)KS_CAB, "\033|%db"}, // set background color
+! {(int)KS_CAF, "\033|%df"}, // set foreground color
+ # endif
+
+! {(int)KS_MS, "y"}, // save to move cur in reverse mode
+ {(int)KS_UT, "y"},
+ {(int)KS_XN, "y"},
+ {(int)KS_LE, "\b"},
+ # ifdef TERMINFO
+! {(int)KS_CM, "\033|%i%p1%d;%p2%dH"}, // cursor motion
+ # else
+! {(int)KS_CM, "\033|%i%d;%dH"}, // cursor motion
+ # endif
+! {(int)KS_VB, "\033|B"}, // visual bell
+! {(int)KS_TI, "\033|S"}, // put terminal in termcap mode
+! {(int)KS_TE, "\033|E"}, // out of termcap mode
+ # ifdef TERMINFO
+! {(int)KS_CS, "\033|%i%p1%d;%p2%dr"}, // scroll region
+ # else
+! {(int)KS_CS, "\033|%i%d;%dr"}, // scroll region
+ # endif
+ # ifdef FEAT_TERMGUICOLORS
+ {(int)KS_8F, "\033|38;2;%lu;%lu;%lum"},
+***************
+*** 6778,6786 ****
+--- 6780,6792 ----
+ # 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
++ {(int)KS_CS, "\033|%p1%d;%p2%dR", "\033|%p1%d;%p2%dR"},
++ {(int)KS_CSV, "\033|%p1%d;%p2%dV", "\033|%p1%d;%p2%dV"},
+ # else
+ {(int)KS_CAB, "\033|%db", "\033|4%dm"}, // set background color
+ {(int)KS_CAF, "\033|%df", "\033|3%dm"}, // set foreground color
++ {(int)KS_CS, "\033|%d;%dR", "\033|%d;%dR"},
++ {(int)KS_CSV, "\033|%d;%dV", "\033|%d;%dV"},
+ # endif
+ {(int)KS_CCO, "256", "256"}, // colors
+ {(int)KS_NAME} // terminator
+*** ../vim-8.1.0932/src/version.c 2019-02-16 15:09:21.225946157 +0100
+--- src/version.c 2019-02-16 16:46:41.599260036 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 933,
+ /**/
+
+--
+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.0934 b/data/vim/patches/8.1.0934
new file mode 100644
index 000000000..2220c024d
--- /dev/null
+++ b/data/vim/patches/8.1.0934
@@ -0,0 +1,69 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0934
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0934
+Problem: Invalid memory access in search pattern. (Kuang-che Wu)
+Solution: Check for incomplete equivalence class. (closes #3970)
+Files: src/regexp.c, src/testdir/test_regexp_latin.vim
+
+
+*** ../vim-8.1.0933/src/regexp.c 2019-02-12 22:32:56.895616785 +0100
+--- src/regexp.c 2019-02-16 17:03:32.114090290 +0100
+***************
+*** 730,736 ****
+ int l = 1;
+ char_u *p = *pp;
+
+! if (p[1] == '=')
+ {
+ if (has_mbyte)
+ l = (*mb_ptr2len)(p + 2);
+--- 730,736 ----
+ int l = 1;
+ char_u *p = *pp;
+
+! if (p[1] == '=' && p[2] != NUL)
+ {
+ if (has_mbyte)
+ l = (*mb_ptr2len)(p + 2);
+*** ../vim-8.1.0933/src/testdir/test_regexp_latin.vim 2019-02-13 20:31:46.883018311 +0100
+--- src/testdir/test_regexp_latin.vim 2019-02-16 17:05:51.357312037 +0100
+***************
+*** 97,99 ****
+--- 97,106 ----
+ " This will be slow...
+ call assert_fails('call search("\\v((n||<)+);")', 'E363:')
+ endfunc
++
++ func Test_get_equi_class()
++ new
++ " Incomplete equivalence class caused invalid memory access
++ s/^/[[=
++ call assert_equal(1, search(getline(1)))
++ endfunc
+*** ../vim-8.1.0933/src/version.c 2019-02-16 16:47:58.130925240 +0100
+--- src/version.c 2019-02-16 17:06:54.052959544 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 934,
+ /**/
+
+--
+CRONE: Who sent you?
+ARTHUR: The Knights Who Say GNU!
+CRONE: Aaaagh! (she looks around in rear) No! We have no licenses here.
+ "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0935 b/data/vim/patches/8.1.0935
new file mode 100644
index 000000000..c9e006aeb
--- /dev/null
+++ b/data/vim/patches/8.1.0935
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0935
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0935
+Problem: Old regexp engine may use invalid buffer for 'iskeyword' or
+ uninitialized buffer pointer. (Kuang-che Wu)
+Solution: Set rex.reg_buf when compiling the pattern. (closes #3972)
+Files: src/regexp.c, src/testdir/test_regexp_latin.vim
+
+
+*** ../vim-8.1.0934/src/regexp.c 2019-02-16 17:07:44.484675212 +0100
+--- src/regexp.c 2019-02-16 17:45:39.915606324 +0100
+***************
+*** 7998,8003 ****
+--- 7998,8005 ----
+ bt_regengine.expr = expr;
+ nfa_regengine.expr = expr;
+ #endif
++ // reg_iswordc() uses rex.reg_buf
++ rex.reg_buf = curbuf;
+
+ /*
+ * First try the NFA engine, unless backtracking was requested.
+*** ../vim-8.1.0934/src/testdir/test_regexp_latin.vim 2019-02-16 17:07:44.484675212 +0100
+--- src/testdir/test_regexp_latin.vim 2019-02-16 17:42:03.660852804 +0100
+***************
+*** 104,106 ****
+--- 104,122 ----
+ s/^/[[=
+ call assert_equal(1, search(getline(1)))
+ endfunc
++
++ func Test_rex_init()
++ set noincsearch
++ set re=1
++ new
++ setlocal iskeyword=a-z
++ call setline(1, ['abc', 'ABC'])
++ call assert_equal(1, search('[[:keyword:]]'))
++ new
++ setlocal iskeyword=A-Z
++ call setline(1, ['abc', 'ABC'])
++ call assert_equal(2, search('[[:keyword:]]'))
++ bwipe!
++ bwipe!
++ set re=0
++ endfunc
+*** ../vim-8.1.0934/src/version.c 2019-02-16 17:07:44.484675212 +0100
+--- src/version.c 2019-02-16 17:47:02.471130460 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 935,
+ /**/
+
+--
+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.0936 b/data/vim/patches/8.1.0936
new file mode 100644
index 000000000..df7a83ad1
--- /dev/null
+++ b/data/vim/patches/8.1.0936
@@ -0,0 +1,137 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0936
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0936
+Problem: May leak memory when using 'vartabstop'. (Kuang-che Wu)
+Solution: Fix handling allocated memory for 'vartabstop'. (closes #3976)
+Files: src/option.c, src/buffer.c
+
+
+*** ../vim-8.1.0935/src/option.c 2019-02-16 15:09:21.213946217 +0100
+--- src/option.c 2019-02-16 18:41:47.573680439 +0100
+***************
+*** 5594,5600 ****
+--- 5594,5602 ----
+ (void)check_clipboard_option();
+ #endif
+ #ifdef FEAT_VARTABS
++ vim_free(curbuf->b_p_vsts_array);
+ tabstop_set(curbuf->b_p_vsts, &curbuf->b_p_vsts_array);
++ vim_free(curbuf->b_p_vts_array);
+ tabstop_set(curbuf->b_p_vts, &curbuf->b_p_vts_array);
+ #endif
+ }
+***************
+*** 7572,7585 ****
+ if (errmsg == NULL)
+ {
+ int *oldarray = curbuf->b_p_vts_array;
+ if (tabstop_set(*varp, &(curbuf->b_p_vts_array)))
+ {
+! if (oldarray)
+! vim_free(oldarray);
+ #ifdef FEAT_FOLDING
+ if (foldmethodIsIndent(curwin))
+ foldUpdateAll(curwin);
+! #endif /* FEAT_FOLDING */
+ }
+ else
+ errmsg = e_invarg;
+--- 7574,7587 ----
+ if (errmsg == NULL)
+ {
+ int *oldarray = curbuf->b_p_vts_array;
++
+ if (tabstop_set(*varp, &(curbuf->b_p_vts_array)))
+ {
+! vim_free(oldarray);
+ #ifdef FEAT_FOLDING
+ if (foldmethodIsIndent(curwin))
+ foldUpdateAll(curwin);
+! #endif
+ }
+ else
+ errmsg = e_invarg;
+***************
+*** 12706,12715 ****
+ return check_opt_strings(p, p_ff_values, FALSE);
+ }
+
+! #ifdef FEAT_VARTABS
+
+ /*
+ * Set the integer values corresponding to the string setting of 'vartabstop'.
+ */
+ int
+ tabstop_set(char_u *var, int **array)
+--- 12708,12718 ----
+ return check_opt_strings(p, p_ff_values, FALSE);
+ }
+
+! #if defined(FEAT_VARTABS) || defined(PROTO)
+
+ /*
+ * Set the integer values corresponding to the string setting of 'vartabstop'.
++ * "array" will be set, caller must free it if needed.
+ */
+ int
+ tabstop_set(char_u *var, int **array)
+***************
+*** 12752,12757 ****
+--- 12755,12762 ----
+ }
+
+ *array = (int *)alloc((unsigned) ((valcount + 1) * sizeof(int)));
++ if (*array == NULL)
++ return FALSE;
+ (*array)[0] = valcount;
+
+ t = 1;
+*** ../vim-8.1.0935/src/buffer.c 2019-02-12 22:37:24.177961507 +0100
+--- src/buffer.c 2019-02-16 18:36:24.507317493 +0100
+***************
+*** 2170,2178 ****
+ vim_free(buf->b_p_vsts_array);
+ buf->b_p_vsts_array = NULL;
+ clear_string_option(&buf->b_p_vts);
+! if (buf->b_p_vts_array)
+! vim_free(buf->b_p_vts_array);
+! buf->b_p_vts_array = NULL;
+ #endif
+ #ifdef FEAT_KEYMAP
+ clear_string_option(&buf->b_p_keymap);
+--- 2170,2176 ----
+ vim_free(buf->b_p_vsts_array);
+ buf->b_p_vsts_array = NULL;
+ clear_string_option(&buf->b_p_vts);
+! VIM_CLEAR(buf->b_p_vts_array);
+ #endif
+ #ifdef FEAT_KEYMAP
+ clear_string_option(&buf->b_p_keymap);
+*** ../vim-8.1.0935/src/version.c 2019-02-16 18:07:53.723796781 +0100
+--- src/version.c 2019-02-16 19:04:41.060527328 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 936,
+ /**/
+
+--
+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.0937 b/data/vim/patches/8.1.0937
new file mode 100644
index 000000000..fbae0946c
--- /dev/null
+++ b/data/vim/patches/8.1.0937
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0937
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0937
+Problem: Invalid memory access in search pattern. (Kuang-che Wu)
+Solution: Check for incomplete collation element. (Dominique Pelle,
+ closes #3985)
+Files: src/regexp.c, src/testdir/test_regexp_latin.vim
+
+
+*** ../vim-8.1.0936/src/regexp.c 2019-02-16 18:07:53.719796804 +0100
+--- src/regexp.c 2019-02-17 13:49:48.773613618 +0100
+***************
+*** 1111,1117 ****
+ int l = 1;
+ char_u *p = *pp;
+
+! if (p[0] != NUL && p[1] == '.')
+ {
+ if (has_mbyte)
+ l = (*mb_ptr2len)(p + 2);
+--- 1111,1117 ----
+ int l = 1;
+ char_u *p = *pp;
+
+! if (p[0] != NUL && p[1] == '.' && p[2] != NUL)
+ {
+ if (has_mbyte)
+ l = (*mb_ptr2len)(p + 2);
+*** ../vim-8.1.0936/src/testdir/test_regexp_latin.vim 2019-02-16 18:07:53.719796804 +0100
+--- src/testdir/test_regexp_latin.vim 2019-02-17 13:50:42.833277435 +0100
+***************
+*** 103,108 ****
+--- 103,110 ----
+ " Incomplete equivalence class caused invalid memory access
+ s/^/[[=
+ call assert_equal(1, search(getline(1)))
++ s/.*/[[.
++ call assert_equal(1, search(getline(1)))
+ endfunc
+
+ func Test_rex_init()
+*** ../vim-8.1.0936/src/version.c 2019-02-16 19:05:07.352324625 +0100
+--- src/version.c 2019-02-17 13:51:42.396907001 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 937,
+ /**/
+
+--
+BEDEVERE: Wait. Wait ... tell me, what also floats on water?
+ALL: Bread? No, no, no. Apples .... gravy ... very small rocks ...
+ARTHUR: 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.0938 b/data/vim/patches/8.1.0938
new file mode 100644
index 000000000..a76ec7f77
--- /dev/null
+++ b/data/vim/patches/8.1.0938
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0938
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0938
+Problem: Background color is wrong in MS-Windows console when not using VTP.
+Solution: Use g_attrCurrent. (Nobuhiro Takasaki, closes #3987)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0937/src/os_win32.c 2019-02-16 16:47:58.126925258 +0100
+--- src/os_win32.c 2019-02-17 14:08:22.838683073 +0100
+***************
+*** 6031,6037 ****
+
+ {
+ fill.Char.AsciiChar = ' ';
+! fill.Attributes = g_attrDefault;
+
+ set_console_color_rgb();
+
+--- 6031,6040 ----
+
+ {
+ fill.Char.AsciiChar = ' ';
+! if (!USE_VTP)
+! fill.Attributes = g_attrCurrent;
+! else
+! fill.Attributes = g_attrDefault;
+
+ set_console_color_rgb();
+
+***************
+*** 6085,6091 ****
+
+ {
+ fill.Char.AsciiChar = ' ';
+! fill.Attributes = g_attrDefault;
+
+ set_console_color_rgb();
+
+--- 6088,6097 ----
+
+ {
+ fill.Char.AsciiChar = ' ';
+! if (!USE_VTP)
+! fill.Attributes = g_attrCurrent;
+! else
+! fill.Attributes = g_attrDefault;
+
+ set_console_color_rgb();
+
+*** ../vim-8.1.0937/src/version.c 2019-02-17 13:53:31.600227794 +0100
+--- src/version.c 2019-02-17 14:10:41.777818565 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 938,
+ /**/
+
+--
+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.0939 b/data/vim/patches/8.1.0939
new file mode 100644
index 000000000..4201039ed
--- /dev/null
+++ b/data/vim/patches/8.1.0939
@@ -0,0 +1,400 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0939
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0939
+Problem: No completion for sign group names.
+Solution: Add completion for sign group names and buffer names. (Yegappan
+ Lakshmanan, closes #3980)
+Files: src/sign.c, src/testdir/test_signs.vim
+
+
+*** ../vim-8.1.0938/src/sign.c 2019-01-24 17:18:37.591462362 +0100
+--- src/sign.c 2019-02-17 14:45:25.699785487 +0100
+***************
+*** 1767,1786 ****
+ EXP_SUBCMD, // expand :sign sub-commands
+ EXP_DEFINE, // expand :sign define {name} args
+ EXP_PLACE, // expand :sign place {id} args
+ EXP_UNPLACE, // expand :sign unplace"
+! EXP_SIGN_NAMES // expand with name of placed signs
+ } expand_what;
+
+ /*
+ * Function given to ExpandGeneric() to obtain the sign command
+ * expansion.
+ */
+ char_u *
+ get_sign_name(expand_T *xp UNUSED, int idx)
+ {
+- sign_T *sp;
+- int current_idx;
+-
+ switch (expand_what)
+ {
+ case EXP_SUBCMD:
+--- 1767,1831 ----
+ EXP_SUBCMD, // expand :sign sub-commands
+ EXP_DEFINE, // expand :sign define {name} args
+ EXP_PLACE, // expand :sign place {id} args
++ EXP_LIST, // expand :sign place args
+ EXP_UNPLACE, // expand :sign unplace"
+! EXP_SIGN_NAMES, // expand with name of placed signs
+! EXP_SIGN_GROUPS // expand with name of placed sign groups
+ } expand_what;
+
+ /*
++ * Return the n'th sign name (used for command line completion)
++ */
++ static char_u *
++ get_nth_sign_name(int idx)
++ {
++ int current_idx;
++ sign_T *sp;
++
++ // Complete with name of signs already defined
++ current_idx = 0;
++ for (sp = first_sign; sp != NULL; sp = sp->sn_next)
++ if (current_idx++ == idx)
++ return sp->sn_name;
++ return NULL;
++ }
++
++ /*
++ * Return the n'th sign group name (used for command line completion)
++ */
++ static char_u *
++ get_nth_sign_group_name(int idx)
++ {
++ int current_idx;
++ int todo;
++ hashitem_T *hi;
++ signgroup_T *group;
++
++ // Complete with name of sign groups already defined
++ current_idx = 0;
++ todo = (int)sg_table.ht_used;
++ for (hi = sg_table.ht_array; todo > 0; ++hi)
++ {
++ if (!HASHITEM_EMPTY(hi))
++ {
++ --todo;
++ if (current_idx++ == idx)
++ {
++ group = HI2SG(hi);
++ return group->sg_name;
++ }
++ }
++ }
++ return NULL;
++ }
++
++ /*
+ * Function given to ExpandGeneric() to obtain the sign command
+ * expansion.
+ */
+ char_u *
+ get_sign_name(expand_T *xp UNUSED, int idx)
+ {
+ switch (expand_what)
+ {
+ case EXP_SUBCMD:
+***************
+*** 1802,1819 ****
+ };
+ return (char_u *)place_arg[idx];
+ }
+ case EXP_UNPLACE:
+ {
+ char *unplace_arg[] = { "group=", "file=", "buffer=", NULL };
+ return (char_u *)unplace_arg[idx];
+ }
+ case EXP_SIGN_NAMES:
+! // Complete with name of signs already defined
+! current_idx = 0;
+! for (sp = first_sign; sp != NULL; sp = sp->sn_next)
+! if (current_idx++ == idx)
+! return sp->sn_name;
+! return NULL;
+ default:
+ return NULL;
+ }
+--- 1847,1869 ----
+ };
+ return (char_u *)place_arg[idx];
+ }
++ case EXP_LIST:
++ {
++ char *list_arg[] =
++ {
++ "group=", "file=", "buffer=", NULL
++ };
++ return (char_u *)list_arg[idx];
++ }
+ case EXP_UNPLACE:
+ {
+ char *unplace_arg[] = { "group=", "file=", "buffer=", NULL };
+ return (char_u *)unplace_arg[idx];
+ }
+ case EXP_SIGN_NAMES:
+! return get_nth_sign_name(idx);
+! case EXP_SIGN_GROUPS:
+! return get_nth_sign_group_name(idx);
+ default:
+ return NULL;
+ }
+***************
+*** 1848,1875 ****
+ // |
+ // begin_subcmd_args
+ begin_subcmd_args = skipwhite(end_subcmd);
+- p = skiptowhite(begin_subcmd_args);
+- if (*p == NUL)
+- {
+- //
+- // Expand first argument of subcmd when possible.
+- // For ":jump {id}" and ":unplace {id}", we could
+- // possibly expand the ids of all signs already placed.
+- //
+- xp->xp_pattern = begin_subcmd_args;
+- switch (cmd_idx)
+- {
+- case SIGNCMD_LIST:
+- case SIGNCMD_UNDEFINE:
+- // :sign list <CTRL-D>
+- // :sign undefine <CTRL-D>
+- expand_what = EXP_SIGN_NAMES;
+- break;
+- default:
+- xp->xp_context = EXPAND_NOTHING;
+- }
+- return;
+- }
+
+ // expand last argument of subcmd
+
+--- 1898,1903 ----
+***************
+*** 1878,1883 ****
+--- 1906,1912 ----
+ // p
+
+ // Loop until reaching last argument.
++ p = begin_subcmd_args;
+ do
+ {
+ p = skipwhite(p);
+***************
+*** 1900,1906 ****
+ expand_what = EXP_DEFINE;
+ break;
+ case SIGNCMD_PLACE:
+! expand_what = EXP_PLACE;
+ break;
+ case SIGNCMD_JUMP:
+ case SIGNCMD_UNPLACE:
+--- 1929,1947 ----
+ expand_what = EXP_DEFINE;
+ break;
+ case SIGNCMD_PLACE:
+! // List placed signs
+! if (VIM_ISDIGIT(*begin_subcmd_args))
+! // :sign place {id} {args}...
+! expand_what = EXP_PLACE;
+! else
+! // :sign place {args}...
+! expand_what = EXP_LIST;
+! break;
+! case SIGNCMD_LIST:
+! case SIGNCMD_UNDEFINE:
+! // :sign list <CTRL-D>
+! // :sign undefine <CTRL-D>
+! expand_what = EXP_SIGN_NAMES;
+ break;
+ case SIGNCMD_JUMP:
+ case SIGNCMD_UNPLACE:
+***************
+*** 1917,1933 ****
+ switch (cmd_idx)
+ {
+ case SIGNCMD_DEFINE:
+! if (STRNCMP(last, "texthl", p - last) == 0
+! || STRNCMP(last, "linehl", p - last) == 0)
+ xp->xp_context = EXPAND_HIGHLIGHT;
+! else if (STRNCMP(last, "icon", p - last) == 0)
+ xp->xp_context = EXPAND_FILES;
+ else
+ xp->xp_context = EXPAND_NOTHING;
+ break;
+ case SIGNCMD_PLACE:
+! if (STRNCMP(last, "name", p - last) == 0)
+ expand_what = EXP_SIGN_NAMES;
+ else
+ xp->xp_context = EXPAND_NOTHING;
+ break;
+--- 1958,1987 ----
+ switch (cmd_idx)
+ {
+ case SIGNCMD_DEFINE:
+! if (STRNCMP(last, "texthl", 6) == 0
+! || STRNCMP(last, "linehl", 6) == 0)
+ xp->xp_context = EXPAND_HIGHLIGHT;
+! else if (STRNCMP(last, "icon", 4) == 0)
+ xp->xp_context = EXPAND_FILES;
+ else
+ xp->xp_context = EXPAND_NOTHING;
+ break;
+ case SIGNCMD_PLACE:
+! if (STRNCMP(last, "name", 4) == 0)
+ expand_what = EXP_SIGN_NAMES;
++ else if (STRNCMP(last, "group", 5) == 0)
++ expand_what = EXP_SIGN_GROUPS;
++ else if (STRNCMP(last, "file", 4) == 0)
++ xp->xp_context = EXPAND_BUFFERS;
++ else
++ xp->xp_context = EXPAND_NOTHING;
++ break;
++ case SIGNCMD_UNPLACE:
++ case SIGNCMD_JUMP:
++ if (STRNCMP(last, "group", 5) == 0)
++ expand_what = EXP_SIGN_GROUPS;
++ else if (STRNCMP(last, "file", 4) == 0)
++ xp->xp_context = EXPAND_BUFFERS;
+ else
+ xp->xp_context = EXPAND_NOTHING;
+ break;
+*** ../vim-8.1.0938/src/testdir/test_signs.vim 2019-01-17 17:36:42.495509219 +0100
+--- src/testdir/test_signs.vim 2019-02-17 14:45:25.699785487 +0100
+***************
+*** 210,222 ****
+ call assert_equal('"sign define Sign linehl=SpellBad SpellCap ' .
+ \ 'SpellLocal SpellRare', @:)
+
+! call writefile(['foo'], 'XsignOne')
+! call writefile(['bar'], 'XsignTwo')
+ call feedkeys(":sign define Sign icon=Xsig\<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign define Sign icon=XsignOne XsignTwo', @:)
+- call delete('XsignOne')
+- call delete('XsignTwo')
+
+ call feedkeys(":sign undefine \<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign undefine Sign1 Sign2', @:)
+
+--- 210,225 ----
+ call assert_equal('"sign define Sign linehl=SpellBad SpellCap ' .
+ \ 'SpellLocal SpellRare', @:)
+
+! call feedkeys(":sign define Sign texthl=Spell\<C-A>\<C-B>\"\<CR>", 'tx')
+! call assert_equal('"sign define Sign texthl=SpellBad SpellCap ' .
+! \ 'SpellLocal SpellRare', @:)
+!
+! call writefile(repeat(["Sun is shining"], 30), "XsignOne")
+! call writefile(repeat(["Sky is blue"], 30), "XsignTwo")
+ call feedkeys(":sign define Sign icon=Xsig\<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign define Sign icon=XsignOne XsignTwo', @:)
+
++ " Test for completion of arguments to ':sign undefine'
+ call feedkeys(":sign undefine \<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign undefine Sign1 Sign2', @:)
+
+***************
+*** 227,243 ****
+--- 230,299 ----
+ call feedkeys(":sign place 1 name=\<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign place 1 name=Sign1 Sign2', @:)
+
++ edit XsignOne
++ sign place 1 name=Sign1 line=5
++ sign place 1 name=Sign1 group=g1 line=10
++ edit XsignTwo
++ sign place 1 name=Sign2 group=g2 line=15
++
++ " Test for completion of group= and file= arguments to ':sign place'
++ call feedkeys(":sign place 1 name=Sign1 file=Xsign\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign place 1 name=Sign1 file=XsignOne XsignTwo', @:)
++ call feedkeys(":sign place 1 name=Sign1 group=\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign place 1 name=Sign1 group=g1 g2', @:)
++
++ " Test for completion of arguments to 'sign place' without sign identifier
++ call feedkeys(":sign place \<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign place buffer= file= group=', @:)
++ call feedkeys(":sign place file=Xsign\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign place file=XsignOne XsignTwo', @:)
++ call feedkeys(":sign place group=\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign place group=g1 g2', @:)
++ call feedkeys(":sign place group=g1 file=\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign place group=g1 file=XsignOne XsignTwo', @:)
++
++ " Test for completion of arguments to ':sign unplace'
+ call feedkeys(":sign unplace 1 \<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign unplace 1 buffer= file= group=', @:)
++ call feedkeys(":sign unplace 1 file=Xsign\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign unplace 1 file=XsignOne XsignTwo', @:)
++ call feedkeys(":sign unplace 1 group=\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign unplace 1 group=g1 g2', @:)
++ call feedkeys(":sign unplace 1 group=g2 file=Xsign\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign unplace 1 group=g2 file=XsignOne XsignTwo', @:)
+
++ " Test for completion of arguments to ':sign list'
+ call feedkeys(":sign list \<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign list Sign1 Sign2', @:)
+
++ " Test for completion of arguments to ':sign jump'
+ call feedkeys(":sign jump 1 \<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"sign jump 1 buffer= file= group=', @:)
++ call feedkeys(":sign jump 1 file=Xsign\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign jump 1 file=XsignOne XsignTwo', @:)
++ call feedkeys(":sign jump 1 group=\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign jump 1 group=g1 g2', @:)
++
++ " Error cases
++ call feedkeys(":sign here\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"sign here', @:)
++ call feedkeys(":sign define Sign here=\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal("\"sign define Sign here=\<C-A>", @:)
++ call feedkeys(":sign place 1 here=\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal("\"sign place 1 here=\<C-A>", @:)
++ call feedkeys(":sign jump 1 here=\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal("\"sign jump 1 here=\<C-A>", @:)
++ call feedkeys(":sign here there\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal("\"sign here there\<C-A>", @:)
++ call feedkeys(":sign here there=\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal("\"sign here there=\<C-A>", @:)
+
++ sign unplace * group=*
+ sign undefine Sign1
+ sign undefine Sign2
++ enew
++ call delete('XsignOne')
++ call delete('XsignTwo')
+ endfunc
+
+ func Test_sign_invalid_commands()
+*** ../vim-8.1.0938/src/version.c 2019-02-17 14:10:52.105754303 +0100
+--- src/version.c 2019-02-17 14:46:51.643306843 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 939,
+ /**/
+
+--
+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.0940 b/data/vim/patches/8.1.0940
new file mode 100644
index 000000000..c14182857
--- /dev/null
+++ b/data/vim/patches/8.1.0940
@@ -0,0 +1,205 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0940
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0940
+Problem: MS-Windows console resizing not handled properly.
+Solution: Handle resizing the console better. (Nobuhiro Takasaki,
+ closes #3968, closes #3611)
+Files: src/ex_docmd.c, src/normal.c, src/os_win32.c,
+ src/proto/os_win32.pro
+
+
+*** ../vim-8.1.0939/src/ex_docmd.c 2019-02-08 14:33:54.818762019 +0100
+--- src/ex_docmd.c 2019-02-17 14:53:03.973230504 +0100
+***************
+*** 9853,9858 ****
+--- 9853,9861 ----
+ if (need_maketitle)
+ maketitle();
+ #endif
++ #if defined(WIN3264) && !defined(FEAT_GUI_W32)
++ resize_console_buf();
++ #endif
+ RedrawingDisabled = r;
+ p_lz = p;
+
+*** ../vim-8.1.0939/src/normal.c 2019-02-16 15:09:21.209946237 +0100
+--- src/normal.c 2019-02-17 14:53:03.973230504 +0100
+***************
+*** 5401,5406 ****
+--- 5401,5409 ----
+ # endif
+ #endif
+ redraw_later(CLEAR);
++ #if defined(WIN3264) && !defined(FEAT_GUI_W32)
++ resize_console_buf();
++ #endif
+ }
+ }
+
+*** ../vim-8.1.0939/src/os_win32.c 2019-02-17 14:10:52.105754303 +0100
+--- src/os_win32.c 2019-02-17 15:00:20.974791478 +0100
+***************
+*** 1492,1497 ****
+--- 1492,1499 ----
+ ui_focus_change((int)g_fJustGotFocus);
+ }
+
++ static void ResizeConBuf(HANDLE hConsole, COORD coordScreen);
++
+ /*
+ * Wait until console input from keyboard or mouse is available,
+ * or the time is up.
+***************
+*** 1657,1667 ****
+ handle_focus_event(ir);
+ else if (ir.EventType == WINDOW_BUFFER_SIZE_EVENT)
+ {
+! /* Only call shell_resized() when the size actually change to
+! * avoid the screen is cleard. */
+! if (ir.Event.WindowBufferSizeEvent.dwSize.X != Columns
+! || ir.Event.WindowBufferSizeEvent.dwSize.Y != Rows)
+ shell_resized();
+ }
+ #ifdef FEAT_MOUSE
+ else if (ir.EventType == MOUSE_EVENT
+--- 1659,1676 ----
+ handle_focus_event(ir);
+ else if (ir.EventType == WINDOW_BUFFER_SIZE_EVENT)
+ {
+! COORD dwSize = ir.Event.WindowBufferSizeEvent.dwSize;
+!
+! // Only call shell_resized() when the size actually change to
+! // avoid the screen is cleard.
+! if (dwSize.X != Columns || dwSize.Y != Rows)
+! {
+! CONSOLE_SCREEN_BUFFER_INFO csbi;
+! GetConsoleScreenBufferInfo(g_hConOut, &csbi);
+! dwSize.Y = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
+! ResizeConBuf(g_hConOut, dwSize);
+ shell_resized();
++ }
+ }
+ #ifdef FEAT_MOUSE
+ else if (ir.EventType == MOUSE_EVENT
+***************
+*** 6327,6333 ****
+ * character was written, otherwise we get stuck. */
+ if (WriteConsoleOutputCharacterW(g_hConOut, unicodebuf, length,
+ coord, &cchwritten) == 0
+! || cchwritten == 0)
+ cchwritten = 1;
+ }
+ else
+--- 6336,6342 ----
+ * character was written, otherwise we get stuck. */
+ if (WriteConsoleOutputCharacterW(g_hConOut, unicodebuf, length,
+ coord, &cchwritten) == 0
+! || cchwritten == 0 || cchwritten == (DWORD)-1)
+ cchwritten = 1;
+ }
+ else
+***************
+*** 6361,6367 ****
+ * character was written, otherwise we get stuck. */
+ if (WriteConsoleOutputCharacter(g_hConOut, (LPCSTR)pchBuf, cbToWrite,
+ coord, &written) == 0
+! || written == 0)
+ written = 1;
+ }
+ else
+--- 6370,6376 ----
+ * character was written, otherwise we get stuck. */
+ if (WriteConsoleOutputCharacter(g_hConOut, (LPCSTR)pchBuf, cbToWrite,
+ coord, &written) == 0
+! || written == 0 || written == (DWORD)-1)
+ written = 1;
+ }
+ else
+***************
+*** 7707,7713 ****
+
+ }
+
+! #ifndef FEAT_GUI_W32
+
+ static void
+ vtp_init(void)
+--- 7716,7722 ----
+
+ }
+
+! #if !defined(FEAT_GUI_W32) || defined(PROTO)
+
+ static void
+ vtp_init(void)
+***************
+*** 7931,7933 ****
+--- 7940,7967 ----
+ {
+ return conpty_stable;
+ }
++
++ #if !defined(FEAT_GUI_W32) || defined(PROTO)
++ void
++ resize_console_buf(void)
++ {
++ CONSOLE_SCREEN_BUFFER_INFO csbi;
++ COORD coord;
++ SMALL_RECT newsize;
++
++ if (GetConsoleScreenBufferInfo(g_hConOut, &csbi))
++ {
++ coord.X = SRWIDTH(csbi.srWindow);
++ coord.Y = SRHEIGHT(csbi.srWindow);
++ SetConsoleScreenBufferSize(g_hConOut, coord);
++
++ newsize.Left = 0;
++ newsize.Top = 0;
++ newsize.Right = coord.X - 1;
++ newsize.Bottom = coord.Y - 1;
++ SetConsoleWindowInfo(g_hConOut, TRUE, &newsize);
++
++ SetConsoleScreenBufferSize(g_hConOut, coord);
++ }
++ }
++ #endif
+*** ../vim-8.1.0939/src/proto/os_win32.pro 2019-02-13 19:23:04.734816702 +0100
+--- src/proto/os_win32.pro 2019-02-17 14:53:03.977230484 +0100
+***************
+*** 75,78 ****
+--- 75,79 ----
+ int has_vtp_working(void);
+ int has_conpty_working(void);
+ int is_conpty_stable(void);
++ void resize_console_buf(void);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0939/src/version.c 2019-02-17 14:50:22.438125825 +0100
+--- src/version.c 2019-02-17 14:56:57.147933610 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 940,
+ /**/
+
+--
+The word "leader" is derived from the word "lead", as in the material that
+bullets are made out of. The term "leader" was popularized at about the same
+time as the invention of firearms. It grew out of the observation that the
+person in charge of every organization was the person whom everyone wanted to
+fill with hot lead.
+ I don't recomment this; it's just a point of historical interest.
+ (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.0941 b/data/vim/patches/8.1.0941
new file mode 100644
index 000000000..fba4e92e6
--- /dev/null
+++ b/data/vim/patches/8.1.0941
@@ -0,0 +1,8713 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0941
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0941
+Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and
+ others.
+Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the
+ GUI build. (Hirohito Higashi, closes #3932)
+Files: src/GvimExt/gvimext.h, src/Make_bc5.mak, src/Make_cyg_ming.mak,
+ src/Make_ivc.mak, src/Make_mvc.mak, src/beval.h, src/blowfish.c,
+ src/channel.c, src/edit.c, src/eval.c, src/evalfunc.c,
+ src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_getln.c,
+ src/feature.h, src/fileio.c, src/getchar.c, src/glbl_ime.cpp,
+ src/globals.h, src/gui.c, src/gui.h, src/gui_beval.c,
+ src/gui_gtk.c, src/gui_gtk_f.c, src/gui_gtk_x11.c,
+ src/if_cscope.c, src/if_cscope.h, src/if_lua.c, src/if_mzsch.c,
+ src/if_ole.cpp, src/if_perl.xs, src/if_python.c, src/if_python3.c,
+ src/if_ruby.c, src/if_tcl.c, src/macros.h, src/main.c,
+ src/mbyte.c, src/memfile.c, src/memline.c, src/menu.c,
+ src/message.c, src/misc1.c, src/misc2.c, src/nbdebug.c,
+ src/netbeans.c, src/normal.c, src/option.c, src/option.h,
+ src/os_mswin.c, src/os_unix.c, src/os_w32exe.c, src/os_win32.c,
+ src/os_win32.h, src/proto.h, src/screen.c, src/search.c,
+ src/structs.h, src/syntax.c, src/term.c, src/terminal.c, src/ui.c,
+ src/undo.c, src/version.c, src/vim.h, src/vim.rc, src/winclip.c
+
+
+
+*** ../vim-8.1.0940/src/GvimExt/gvimext.h 2016-02-21 20:28:32.000000000 +0100
+--- src/GvimExt/gvimext.h 2019-02-17 17:29:18.536788953 +0100
+***************
+*** 31,37 ****
+ # define STRICT
+ #endif
+
+! #define INC_OLE2 // WIN32, get ole2 from windows.h
+
+ /* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
+ #if defined(_MSC_VER) && _MSC_VER >= 1400
+--- 31,37 ----
+ # define STRICT
+ #endif
+
+! #define INC_OLE2 // MS-Windows, get ole2 from windows.h
+
+ /* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
+ #if defined(_MSC_VER) && _MSC_VER >= 1400
+*** ../vim-8.1.0940/src/Make_bc5.mak 2019-02-16 15:09:21.221946179 +0100
+--- src/Make_bc5.mak 2019-02-17 17:29:18.536788953 +0100
+***************
+*** 405,411 ****
+ !endif
+
+ !if ("$(GUI)"=="yes")
+! DEFINES = $(DEFINES) -DFEAT_GUI_W32 -DFEAT_CLIPBOARD
+ !if ("$(DEBUG)"=="yes")
+ TARGET = gvimd.exe
+ !else
+--- 405,411 ----
+ !endif
+
+ !if ("$(GUI)"=="yes")
+! DEFINES = $(DEFINES) -DFEAT_GUI -DFEAT_CLIPBOARD
+ !if ("$(DEBUG)"=="yes")
+ TARGET = gvimd.exe
+ !else
+*** ../vim-8.1.0940/src/Make_cyg_ming.mak 2019-02-16 15:09:21.221946179 +0100
+--- src/Make_cyg_ming.mak 2019-02-17 17:29:18.536788953 +0100
+***************
+*** 491,497 ****
+
+ # See feature.h for a list of options.
+ # Any other defines can be included here.
+! DEF_GUI=-DFEAT_GUI_W32 -DFEAT_CLIPBOARD
+ DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
+ -DHAVE_PATHDEF -DFEAT_$(FEATURES) -DHAVE_STDINT_H
+ ifeq ($(ARCH),x86-64)
+--- 491,497 ----
+
+ # See feature.h for a list of options.
+ # Any other defines can be included here.
+! DEF_GUI=-DFEAT_GUI -DFEAT_CLIPBOARD
+ DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
+ -DHAVE_PATHDEF -DFEAT_$(FEATURES) -DHAVE_STDINT_H
+ ifeq ($(ARCH),x86-64)
+*** ../vim-8.1.0940/src/Make_ivc.mak 2019-02-16 15:09:21.221946179 +0100
+--- src/Make_ivc.mak 2019-02-17 17:29:18.536788953 +0100
+***************
+*** 92,99 ****
+ # ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib version.lib comdlg32.lib comctl32.lib advapi32.lib shell32.lib ole32.lib uuid.lib /nologo /machine:I386 /nodefaultlib
+ # SUBTRACT LINK32 /incremental:yes
+
+! RSC_PROJ= /l 0x409 /d "FEAT_GUI_W32"
+! # ADD RSC /l 0x409 /d "FEAT_GUI_W32"
+
+ !IF "$(CFG)" == "Vim - Win32 Release gvim OLE"
+
+--- 92,99 ----
+ # ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib version.lib comdlg32.lib comctl32.lib advapi32.lib shell32.lib ole32.lib uuid.lib /nologo /machine:I386 /nodefaultlib
+ # SUBTRACT LINK32 /incremental:yes
+
+! RSC_PROJ= /l 0x409 /d "FEAT_GUI"
+! # ADD RSC /l 0x409 /d "FEAT_GUI"
+
+ !IF "$(CFG)" == "Vim - Win32 Release gvim OLE"
+
+***************
+*** 105,112 ****
+ VIM=gvim
+ EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_W32" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+! # ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_W32" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+
+ RSC_PROJ=$(RSC_PROJ) /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
+ # ADD RSC /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
+--- 105,112 ----
+ VIM=gvim
+ EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+! # ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+
+ RSC_PROJ=$(RSC_PROJ) /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
+ # ADD RSC /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
+***************
+*** 124,131 ****
+ VIM=gvimd
+ EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI_W32" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+! # ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI_W32" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+
+ RSC_PROJ=$(RSC_PROJ) /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
+ # ADD RSC /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
+--- 124,131 ----
+ VIM=gvimd
+ EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+! # ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+
+ RSC_PROJ=$(RSC_PROJ) /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
+ # ADD RSC /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
+***************
+*** 144,151 ****
+ VIM=gvim
+ EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_W32" /Fd.\gRel/ /Fo.\gRel/
+! # ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_W32" /Fd.\gRel/ /Fo.\gRel/
+
+ RSC_PROJ=$(RSC_PROJ) /d "NDEBUG" /fo.\gRel\vim.res
+ # ADD RSC /d "NDEBUG" /fo.\gRel\vim.res
+--- 144,151 ----
+ VIM=gvim
+ EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /Fd.\gRel/ /Fo.\gRel/
+! # ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /Fd.\gRel/ /Fo.\gRel/
+
+ RSC_PROJ=$(RSC_PROJ) /d "NDEBUG" /fo.\gRel\vim.res
+ # ADD RSC /d "NDEBUG" /fo.\gRel\vim.res
+***************
+*** 163,170 ****
+ VIM=gvimd
+ EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI_W32" /Fd.\gDbg/ /Fo.\gDbg/
+! # ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI_W32" /Fd.\gDbg/ /Fo.\gDbg/
+
+ RSC_PROJ=$(RSC_PROJ) /d "_DEBUG" /fo.\gDbg\vim.res
+ # ADD RSC /d "_DEBUG" /fo.\gDbg\vim.res
+--- 163,170 ----
+ VIM=gvimd
+ EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /Fd.\gDbg/ /Fo.\gDbg/
+! # ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /Fd.\gDbg/ /Fo.\gDbg/
+
+ RSC_PROJ=$(RSC_PROJ) /d "_DEBUG" /fo.\gDbg\vim.res
+ # ADD RSC /d "_DEBUG" /fo.\gDbg\vim.res
+***************
+*** 508,514 ****
+ # Begin Custom Build
+
+ "$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+! cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_W32" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/ /I ".\oleRel" .\if_ole.cpp
+ @rem This is the default rule with /I "$(IntDir)" added
+
+ # End Custom Build
+--- 508,514 ----
+ # Begin Custom Build
+
+ "$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+! cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/ /I ".\oleRel" .\if_ole.cpp
+ @rem This is the default rule with /I "$(IntDir)" added
+
+ # End Custom Build
+***************
+*** 519,525 ****
+ # Begin Custom Build
+
+ "$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+! cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /Od /D "_DEBUG" /D "FEAT_GUI_W32" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/ /I ".\oleDbg" .\if_ole.cpp
+ @rem This is the default rule with /I "$(IntDir)" added
+
+ # End Custom Build
+--- 519,525 ----
+ # Begin Custom Build
+
+ "$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+! cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/ /I ".\oleDbg" .\if_ole.cpp
+ @rem This is the default rule with /I "$(IntDir)" added
+
+ # End Custom Build
+*** ../vim-8.1.0940/src/Make_mvc.mak 2019-02-16 15:09:21.221946179 +0100
+--- src/Make_mvc.mak 2019-02-17 17:29:18.536788953 +0100
+***************
+*** 791,798 ****
+
+ !if "$(GUI)" == "yes"
+ SUBSYSTEM = windows
+! CFLAGS = $(CFLAGS) -DFEAT_GUI_W32
+! RCFLAGS = $(RCFLAGS) -DFEAT_GUI_W32
+ VIM = g$(VIM)
+ GUI_INCL = \
+ gui.h
+--- 791,798 ----
+
+ !if "$(GUI)" == "yes"
+ SUBSYSTEM = windows
+! CFLAGS = $(CFLAGS) -DFEAT_GUI
+! RCFLAGS = $(RCFLAGS) -DFEAT_GUI
+ VIM = g$(VIM)
+ GUI_INCL = \
+ gui.h
+*** ../vim-8.1.0940/src/beval.h 2018-12-28 19:13:28.591806287 +0100
+--- src/beval.h 2019-02-17 17:29:18.536788953 +0100
+***************
+*** 43,49 ****
+ int y;
+ unsigned int state; /* Button/Modifier key state */
+ # else
+! # if !defined(FEAT_GUI_W32)
+ Widget target; /* widget we are monitoring */
+ Widget balloonShell;
+ Widget balloonLabel;
+--- 43,49 ----
+ int y;
+ unsigned int state; /* Button/Modifier key state */
+ # else
+! # if !defined(FEAT_GUI_MSWIN)
+ Widget target; /* widget we are monitoring */
+ Widget balloonShell;
+ Widget balloonLabel;
+***************
+*** 63,69 ****
+ BeState showState; /* tells us whats currently going on */
+ # endif
+ # endif
+! # if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)
+ Dimension screen_width; /* screen width in pixels */
+ Dimension screen_height; /* screen height in pixels */
+ # endif
+--- 63,69 ----
+ BeState showState; /* tells us whats currently going on */
+ # endif
+ # endif
+! # if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MSWIN)
+ Dimension screen_width; /* screen width in pixels */
+ Dimension screen_height; /* screen height in pixels */
+ # endif
+***************
+*** 76,82 ****
+ int *vts; // vartabstop setting for this buffer
+ #endif
+ char_u *msg;
+! #ifdef FEAT_GUI_W32
+ void *tofree;
+ #endif
+ } BalloonEval;
+--- 76,82 ----
+ int *vts; // vartabstop setting for this buffer
+ #endif
+ char_u *msg;
+! #ifdef FEAT_GUI_MSWIN
+ void *tofree;
+ #endif
+ } BalloonEval;
+*** ../vim-8.1.0940/src/blowfish.c 2019-01-13 23:38:33.375773418 +0100
+--- src/blowfish.c 2019-02-17 17:29:18.536788953 +0100
+***************
+*** 34,40 ****
+ char_u uc[8];
+ } block8;
+
+! #if defined(WIN3264)
+ /* MS-Windows is always little endian */
+ #else
+ # ifdef HAVE_CONFIG_H
+--- 34,40 ----
+ char_u uc[8];
+ } block8;
+
+! #if defined(MSWIN)
+ /* MS-Windows is always little endian */
+ #else
+ # ifdef HAVE_CONFIG_H
+*** ../vim-8.1.0940/src/channel.c 2019-02-10 22:23:23.020415140 +0100
+--- src/channel.c 2019-02-17 17:29:18.536788953 +0100
+***************
+*** 20,26 ****
+ #endif
+
+ /* Note: when making changes here also adjust configure.ac. */
+! #ifdef WIN32
+ /* WinSock API is separated from C API, thus we can't use read(), write(),
+ * errno... */
+ # define SOCK_ERRNO errno = WSAGetLastError()
+--- 20,26 ----
+ #endif
+
+ /* Note: when making changes here also adjust configure.ac. */
+! #ifdef MSWIN
+ /* WinSock API is separated from C API, thus we can't use read(), write(),
+ * errno... */
+ # define SOCK_ERRNO errno = WSAGetLastError()
+***************
+*** 65,71 ****
+
+ static char *part_names[] = {"sock", "out", "err", "in"};
+
+! #ifdef WIN32
+ static int
+ fd_read(sock_T fd, char *buf, size_t len)
+ {
+--- 65,71 ----
+
+ static char *part_names[] = {"sock", "out", "err", "in"};
+
+! #ifdef MSWIN
+ static int
+ fd_read(sock_T fd, char *buf, size_t len)
+ {
+***************
+*** 234,240 ****
+ }
+ }
+
+! #ifdef _WIN32
+ # undef PERROR
+ # define PERROR(msg) (void)semsg("%s: %s", msg, strerror_win32(errno))
+
+--- 234,240 ----
+ }
+ }
+
+! #ifdef MSWIN
+ # undef PERROR
+ # define PERROR(msg) (void)semsg("%s: %s", msg, strerror_win32(errno))
+
+***************
+*** 687,693 ****
+ int sd = -1;
+ struct sockaddr_in server;
+ struct hostent *host;
+! #ifdef WIN32
+ u_short port = port_in;
+ u_long val = 1;
+ #else
+--- 687,693 ----
+ int sd = -1;
+ struct sockaddr_in server;
+ struct hostent *host;
+! #ifdef MSWIN
+ u_short port = port_in;
+ u_long val = 1;
+ #else
+***************
+*** 696,702 ****
+ channel_T *channel;
+ int ret;
+
+! #ifdef WIN32
+ channel_init_winsock();
+ #endif
+
+--- 696,702 ----
+ channel_T *channel;
+ int ret;
+
+! #ifdef MSWIN
+ channel_init_winsock();
+ #endif
+
+***************
+*** 758,764 ****
+ {
+ /* Make connect() non-blocking. */
+ if (
+! #ifdef _WIN32
+ ioctlsocket(sd, FIONBIO, &val) < 0
+ #else
+ fcntl(sd, F_SETFL, O_NONBLOCK) < 0
+--- 758,764 ----
+ {
+ /* Make connect() non-blocking. */
+ if (
+! #ifdef MSWIN
+ ioctlsocket(sd, FIONBIO, &val) < 0
+ #else
+ fcntl(sd, F_SETFL, O_NONBLOCK) < 0
+***************
+*** 804,817 ****
+
+ /* If connect() didn't finish then try using select() to wait for the
+ * connection to be made. For Win32 always use select() to wait. */
+! #ifndef WIN32
+ if (errno != ECONNREFUSED)
+ #endif
+ {
+ struct timeval tv;
+ fd_set rfds;
+ fd_set wfds;
+! #ifndef WIN32
+ int so_error = 0;
+ socklen_t so_error_len = sizeof(so_error);
+ struct timeval start_tv;
+--- 804,817 ----
+
+ /* If connect() didn't finish then try using select() to wait for the
+ * connection to be made. For Win32 always use select() to wait. */
+! #ifndef MSWIN
+ if (errno != ECONNREFUSED)
+ #endif
+ {
+ struct timeval tv;
+ fd_set rfds;
+ fd_set wfds;
+! #ifndef MSWIN
+ int so_error = 0;
+ socklen_t so_error_len = sizeof(so_error);
+ struct timeval start_tv;
+***************
+*** 824,830 ****
+
+ tv.tv_sec = waitnow / 1000;
+ tv.tv_usec = (waitnow % 1000) * 1000;
+! #ifndef WIN32
+ gettimeofday(&start_tv, NULL);
+ #endif
+ ch_log(channel,
+--- 824,830 ----
+
+ tv.tv_sec = waitnow / 1000;
+ tv.tv_usec = (waitnow % 1000) * 1000;
+! #ifndef MSWIN
+ gettimeofday(&start_tv, NULL);
+ #endif
+ ch_log(channel,
+***************
+*** 842,848 ****
+ return NULL;
+ }
+
+! #ifdef WIN32
+ /* On Win32: select() is expected to work and wait for up to
+ * "waitnow" msec for the socket to be open. */
+ if (FD_ISSET(sd, &wfds))
+--- 842,848 ----
+ return NULL;
+ }
+
+! #ifdef MSWIN
+ /* On Win32: select() is expected to work and wait for up to
+ * "waitnow" msec for the socket to be open. */
+ if (FD_ISSET(sd, &wfds))
+***************
+*** 893,899 ****
+ #endif
+ }
+
+! #ifndef WIN32
+ if (waittime > 1 && elapsed_msec < waittime)
+ {
+ /* The port isn't ready but we also didn't get an error.
+--- 893,899 ----
+ #endif
+ }
+
+! #ifndef MSWIN
+ if (waittime > 1 && elapsed_msec < waittime)
+ {
+ /* The port isn't ready but we also didn't get an error.
+***************
+*** 930,936 ****
+
+ if (waittime >= 0)
+ {
+! #ifdef _WIN32
+ val = 0;
+ ioctlsocket(sd, FIONBIO, &val);
+ #else
+--- 930,936 ----
+
+ if (waittime >= 0)
+ {
+! #ifdef MSWIN
+ val = 0;
+ ioctlsocket(sd, FIONBIO, &val);
+ #else
+***************
+*** 1029,1035 ****
+ && (part == PART_OUT || channel->CH_OUT_FD != *fd)
+ && (part == PART_ERR || channel->CH_ERR_FD != *fd))
+ {
+! #ifdef WIN32
+ if (channel->ch_named_pipe)
+ DisconnectNamedPipe((HANDLE)fd);
+ #endif
+--- 1029,1035 ----
+ && (part == PART_OUT || channel->CH_OUT_FD != *fd)
+ && (part == PART_ERR || channel->CH_ERR_FD != *fd))
+ {
+! #ifdef MSWIN
+ if (channel->ch_named_pipe)
+ DisconnectNamedPipe((HANDLE)fd);
+ #endif
+***************
+*** 1427,1433 ****
+ in_part->ch_block_write = 1;
+
+ /* TODO: Win32 implementation, probably using WaitForMultipleObjects() */
+! #ifndef WIN32
+ {
+ # if defined(HAVE_SELECT)
+ struct timeval tval;
+--- 1427,1433 ----
+ in_part->ch_block_write = 1;
+
+ /* TODO: Win32 implementation, probably using WaitForMultipleObjects() */
+! #ifndef MSWIN
+ {
+ # if defined(HAVE_SELECT)
+ struct timeval tval;
+***************
+*** 1759,1765 ****
+ {
+ if (*p == NUL)
+ *p = NL;
+! #ifdef WIN32
+ else if (*p == 0x1b)
+ {
+ // crush the escape sequence OSC 0/1/2: ESC ]0;
+--- 1759,1765 ----
+ {
+ if (*p == NUL)
+ *p = NL;
+! #ifdef MSWIN
+ else if (*p == 0x1b)
+ {
+ // crush the escape sequence OSC 0/1/2: ESC ]0;
+***************
+*** 2064,2070 ****
+ (int)buflen);
+ reader.js_used = 0;
+ chanpart->ch_wait_len = buflen;
+! #ifdef WIN32
+ chanpart->ch_deadline = GetTickCount() + 100L;
+ #else
+ gettimeofday(&chanpart->ch_deadline, NULL);
+--- 2064,2070 ----
+ (int)buflen);
+ reader.js_used = 0;
+ chanpart->ch_wait_len = buflen;
+! #ifdef MSWIN
+ chanpart->ch_deadline = GetTickCount() + 100L;
+ #else
+ gettimeofday(&chanpart->ch_deadline, NULL);
+***************
+*** 2079,2085 ****
+ else
+ {
+ int timeout;
+! #ifdef WIN32
+ timeout = GetTickCount() > chanpart->ch_deadline;
+ #else
+ {
+--- 2079,2085 ----
+ else
+ {
+ int timeout;
+! #ifdef MSWIN
+ timeout = GetTickCount() > chanpart->ch_deadline;
+ #else
+ {
+***************
+*** 3198,3204 ****
+ if (timeout > 0)
+ ch_log(channel, "Waiting for up to %d msec", timeout);
+
+! # ifdef WIN32
+ if (fd != channel->CH_SOCK_FD)
+ {
+ DWORD nread;
+--- 3198,3204 ----
+ if (timeout > 0)
+ ch_log(channel, "Waiting for up to %d msec", timeout);
+
+! # ifdef MSWIN
+ if (fd != channel->CH_SOCK_FD)
+ {
+ DWORD nread;
+***************
+*** 3554,3560 ****
+ timeout = timeout_arg;
+ if (chanpart->ch_wait_len > 0)
+ {
+! #ifdef WIN32
+ timeout = chanpart->ch_deadline - GetTickCount() + 1;
+ #else
+ {
+--- 3554,3560 ----
+ timeout = timeout_arg;
+ if (chanpart->ch_wait_len > 0)
+ {
+! #ifdef MSWIN
+ timeout = chanpart->ch_deadline - GetTickCount() + 1;
+ #else
+ {
+***************
+*** 3680,3686 ****
+ free_job_options(&opt);
+ }
+
+! # if defined(WIN32) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
+ || defined(PROTO)
+ /*
+ * Lookup the channel from the socket. Set "partp" to the fd index.
+--- 3680,3686 ----
+ free_job_options(&opt);
+ }
+
+! # if defined(MSWIN) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
+ || defined(PROTO)
+ /*
+ * Lookup the channel from the socket. Set "partp" to the fd index.
+***************
+*** 3707,3713 ****
+ }
+ # endif
+
+! # if defined(WIN32) || defined(FEAT_GUI) || defined(PROTO)
+ /*
+ * Check the channels for anything that is ready to be read.
+ * The data is put in the read queue.
+--- 3707,3713 ----
+ }
+ # endif
+
+! # if defined(MSWIN) || defined(FEAT_GUI) || defined(PROTO)
+ /*
+ * Check the channels for anything that is ready to be read.
+ * The data is put in the read queue.
+***************
+*** 3772,3778 ****
+
+ if (fd != INVALID_FD)
+ {
+! #ifdef _WIN32
+ u_long val = 1;
+
+ ioctlsocket(fd, FIONBIO, &val);
+--- 3772,3778 ----
+
+ if (fd != INVALID_FD)
+ {
+! #ifdef MSWIN
+ u_long val = 1;
+
+ ioctlsocket(fd, FIONBIO, &val);
+***************
+*** 3853,3859 ****
+ else
+ {
+ res = fd_write(fd, (char *)buf, len);
+! #ifdef WIN32
+ if (channel->ch_named_pipe && res < 0)
+ {
+ DisconnectNamedPipe((HANDLE)fd);
+--- 3853,3859 ----
+ else
+ {
+ res = fd_write(fd, (char *)buf, len);
+! #ifdef MSWIN
+ if (channel->ch_named_pipe && res < 0)
+ {
+ DisconnectNamedPipe((HANDLE)fd);
+***************
+*** 4213,4219 ****
+ }
+ # endif /* UNIX && !HAVE_SELECT */
+
+! # if (!defined(WIN32) && defined(HAVE_SELECT)) || defined(PROTO)
+
+ /*
+ * The "fd_set" type is hidden to avoid problems with the function proto.
+--- 4213,4219 ----
+ }
+ # endif /* UNIX && !HAVE_SELECT */
+
+! # if (!defined(MSWIN) && defined(HAVE_SELECT)) || defined(PROTO)
+
+ /*
+ * The "fd_set" type is hidden to avoid problems with the function proto.
+***************
+*** 4313,4319 ****
+
+ return ret;
+ }
+! # endif /* !WIN32 && HAVE_SELECT */
+
+ /*
+ * Execute queued up commands.
+--- 4313,4319 ----
+
+ return ret;
+ }
+! # endif /* !MSWIN && HAVE_SELECT */
+
+ /*
+ * Execute queued up commands.
+***************
+*** 5039,5045 ****
+ break;
+ opt->jo_cwd = tv_get_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
+ )
+--- 5039,5045 ----
+ break;
+ opt->jo_cwd = tv_get_string_buf_chk(item, opt->jo_cwd_buf);
+ if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd)
+! #ifndef MSWIN // Win32 directories don't have the concept of "executable"
+ || mch_access((char *)opt->jo_cwd, X_OK) != 0
+ #endif
+ )
+***************
+*** 5199,5205 ****
+ #ifdef UNIX
+ vim_free(job->jv_termsig);
+ #endif
+! #ifdef WIN3264
+ vim_free(job->jv_tty_type);
+ #endif
+ free_callback(job->jv_exit_cb, job->jv_exit_partial);
+--- 5199,5205 ----
+ #ifdef UNIX
+ vim_free(job->jv_termsig);
+ #endif
+! #ifdef MSWIN
+ vim_free(job->jv_tty_type);
+ #endif
+ free_callback(job->jv_exit_cb, job->jv_exit_partial);
+***************
+*** 5971,5977 ****
+ #ifdef UNIX
+ dict_add_string(dict, "termsig", job->jv_termsig);
+ #endif
+! #ifdef WIN3264
+ dict_add_string(dict, "tty_type", job->jv_tty_type);
+ #endif
+
+--- 5971,5977 ----
+ #ifdef UNIX
+ dict_add_string(dict, "termsig", job->jv_termsig);
+ #endif
+! #ifdef MSWIN
+ dict_add_string(dict, "tty_type", job->jv_tty_type);
+ #endif
+
+*** ../vim-8.1.0940/src/edit.c 2019-02-16 15:09:21.209946237 +0100
+--- src/edit.c 2019-02-17 17:29:18.540788930 +0100
+***************
+*** 1247,1255 ****
+ did_cursorhold = TRUE;
+ break;
+
+! #ifdef FEAT_GUI_W32
+! /* On Win32 ignore <M-F4>, we get it when closing the window was
+! * cancelled. */
+ case K_F4:
+ if (mod_mask != MOD_MASK_ALT)
+ goto normalchar;
+--- 1247,1255 ----
+ did_cursorhold = TRUE;
+ break;
+
+! #ifdef FEAT_GUI_MSWIN
+! /* On MS-Windows ignore <M-F4>, we get it when closing the window
+! * was cancelled. */
+ case K_F4:
+ if (mod_mask != MOD_MASK_ALT)
+ goto normalchar;
+*** ../vim-8.1.0940/src/eval.c 2019-02-12 22:28:27.845232664 +0100
+--- src/eval.c 2019-02-17 17:29:18.540788930 +0100
+***************
+*** 7460,7466 ****
+ # ifdef UNIX
+ vim_snprintf((char *)buf, NUMBUFLEN,
+ "process %ld %s", (long)job->jv_pid, status);
+! # elif defined(WIN32)
+ vim_snprintf((char *)buf, NUMBUFLEN,
+ "process %ld %s",
+ (long)job->jv_proc_info.dwProcessId,
+--- 7460,7466 ----
+ # ifdef UNIX
+ vim_snprintf((char *)buf, NUMBUFLEN,
+ "process %ld %s", (long)job->jv_pid, status);
+! # elif defined(MSWIN)
+ vim_snprintf((char *)buf, NUMBUFLEN,
+ "process %ld %s",
+ (long)job->jv_proc_info.dwProcessId,
+***************
+*** 9956,9962 ****
+
+ #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) || defined(PROTO)
+
+! #ifdef WIN3264
+ /*
+ * Functions for ":8" filename modifier: get 8.3 version of a filename.
+ */
+--- 9956,9962 ----
+
+ #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) || defined(PROTO)
+
+! #ifdef MSWIN
+ /*
+ * Functions for ":8" filename modifier: get 8.3 version of a filename.
+ */
+***************
+*** 10191,10197 ****
+
+ return OK;
+ }
+! #endif /* WIN3264 */
+
+ /*
+ * Adjust a filename, according to a string of modifiers.
+--- 10191,10197 ----
+
+ return OK;
+ }
+! #endif // MSWIN
+
+ /*
+ * Adjust a filename, according to a string of modifiers.
+***************
+*** 10215,10221 ****
+ char_u dirname[MAXPATHL];
+ int c;
+ int has_fullname = 0;
+! #ifdef WIN3264
+ char_u *fname_start = *fnamep;
+ int has_shortname = 0;
+ #endif
+--- 10215,10221 ----
+ char_u dirname[MAXPATHL];
+ int c;
+ int has_fullname = 0;
+! #ifdef MSWIN
+ char_u *fname_start = *fnamep;
+ int has_shortname = 0;
+ #endif
+***************
+*** 10270,10276 ****
+ return -1;
+ }
+
+! #ifdef WIN3264
+ # if _WIN32_WINNT >= 0x0500
+ if (vim_strchr(*fnamep, '~') != NULL)
+ {
+--- 10270,10276 ----
+ return -1;
+ }
+
+! #ifdef MSWIN
+ # if _WIN32_WINNT >= 0x0500
+ if (vim_strchr(*fnamep, '~') != NULL)
+ {
+***************
+*** 10313,10319 ****
+ *usedlen += 2;
+ if (c == '8')
+ {
+! #ifdef WIN3264
+ has_shortname = 1; /* Postpone this. */
+ #endif
+ continue;
+--- 10313,10319 ----
+ *usedlen += 2;
+ if (c == '8')
+ {
+! #ifdef MSWIN
+ has_shortname = 1; /* Postpone this. */
+ #endif
+ continue;
+***************
+*** 10406,10417 ****
+ if (src[*usedlen] == ':' && src[*usedlen + 1] == '8')
+ {
+ *usedlen += 2;
+! #ifdef WIN3264
+ has_shortname = 1;
+ #endif
+ }
+
+! #ifdef WIN3264
+ /*
+ * Handle ":8" after we have done 'heads' and before we do 'tails'.
+ */
+--- 10406,10417 ----
+ if (src[*usedlen] == ':' && src[*usedlen + 1] == '8')
+ {
+ *usedlen += 2;
+! #ifdef MSWIN
+ has_shortname = 1;
+ #endif
+ }
+
+! #ifdef MSWIN
+ /*
+ * Handle ":8" after we have done 'heads' and before we do 'tails'.
+ */
+***************
+*** 10455,10461 ****
+ *fnamelen = l;
+ }
+ }
+! #endif /* WIN3264 */
+
+ /* ":t" - tail, just the basename */
+ if (src[*usedlen] == ':' && src[*usedlen + 1] == 't')
+--- 10455,10461 ----
+ *fnamelen = l;
+ }
+ }
+! #endif // MSWIN
+
+ /* ":t" - tail, just the basename */
+ if (src[*usedlen] == ':' && src[*usedlen + 1] == 't')
+*** ../vim-8.1.0940/src/evalfunc.c 2019-02-16 15:09:21.217946198 +0100
+--- src/evalfunc.c 2019-02-17 17:29:18.540788930 +0100
+***************
+*** 123,129 ****
+ static void f_count(typval_T *argvars, typval_T *rettv);
+ static void f_cscope_connection(typval_T *argvars, typval_T *rettv);
+ static void f_cursor(typval_T *argsvars, typval_T *rettv);
+! #ifdef WIN3264
+ static void f_debugbreak(typval_T *argvars, typval_T *rettv);
+ #endif
+ static void f_deepcopy(typval_T *argvars, typval_T *rettv);
+--- 123,129 ----
+ static void f_count(typval_T *argvars, typval_T *rettv);
+ static void f_cscope_connection(typval_T *argvars, typval_T *rettv);
+ static void f_cursor(typval_T *argsvars, typval_T *rettv);
+! #ifdef MSWIN
+ static void f_debugbreak(typval_T *argvars, typval_T *rettv);
+ #endif
+ static void f_deepcopy(typval_T *argvars, typval_T *rettv);
+***************
+*** 599,605 ****
+ {"count", 2, 4, f_count},
+ {"cscope_connection",0,3, f_cscope_connection},
+ {"cursor", 1, 3, f_cursor},
+! #ifdef WIN3264
+ {"debugbreak", 1, 1, f_debugbreak},
+ #endif
+ {"deepcopy", 1, 2, f_deepcopy},
+--- 599,605 ----
+ {"count", 2, 4, f_count},
+ {"cscope_connection",0,3, f_cscope_connection},
+ {"cursor", 1, 3, f_cursor},
+! #ifdef MSWIN
+ {"debugbreak", 1, 1, f_debugbreak},
+ #endif
+ {"deepcopy", 1, 2, f_deepcopy},
+***************
+*** 2884,2890 ****
+ rettv->vval.v_number = 0;
+ }
+
+! #ifdef WIN3264
+ /*
+ * "debugbreak()" function
+ */
+--- 2884,2890 ----
+ rettv->vval.v_number = 0;
+ }
+
+! #ifdef MSWIN
+ /*
+ * "debugbreak()" function
+ */
+***************
+*** 4137,4143 ****
+ if (gui.in_use)
+ gui_mch_set_foreground();
+ #else
+! # ifdef WIN32
+ win32_set_foreground();
+ # endif
+ #endif
+--- 4137,4143 ----
+ if (gui.in_use)
+ gui_mch_set_foreground();
+ #else
+! # ifdef MSWIN
+ win32_set_foreground();
+ # endif
+ #endif
+***************
+*** 6152,6158 ****
+ #ifdef VMS
+ "vms",
+ #endif
+! #ifdef WIN32
+ "win32",
+ #endif
+ #if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__))
+--- 6152,6158 ----
+ #ifdef VMS
+ "vms",
+ #endif
+! #ifdef MSWIN
+ "win32",
+ #endif
+ #if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__))
+***************
+*** 6182,6188 ****
+ #endif
+ #ifdef FEAT_BEVAL_GUI
+ "balloon_eval",
+! # ifndef FEAT_GUI_W32 /* other GUIs always have multiline balloons */
+ "balloon_multiline",
+ # endif
+ #endif
+--- 6182,6188 ----
+ #endif
+ #ifdef FEAT_BEVAL_GUI
+ "balloon_eval",
+! # ifndef FEAT_GUI_MSWIN /* other GUIs always have multiline balloons */
+ "balloon_multiline",
+ # endif
+ #endif
+***************
+*** 6196,6202 ****
+ # endif
+ #endif
+ #if defined(FEAT_BROWSE) && (defined(USE_FILE_CHOOSER) \
+! || defined(FEAT_GUI_W32) \
+ || defined(FEAT_GUI_MOTIF))
+ "browsefilter",
+ #endif
+--- 6196,6202 ----
+ # endif
+ #endif
+ #if defined(FEAT_BROWSE) && (defined(USE_FILE_CHOOSER) \
+! || defined(FEAT_GUI_MSWIN) \
+ || defined(FEAT_GUI_MOTIF))
+ "browsefilter",
+ #endif
+***************
+*** 6322,6328 ****
+ #ifdef FEAT_GUI_PHOTON
+ "gui_photon",
+ #endif
+! #ifdef FEAT_GUI_W32
+ "gui_win32",
+ #endif
+ #ifdef FEAT_HANGULIN
+--- 6322,6328 ----
+ #ifdef FEAT_GUI_PHOTON
+ "gui_photon",
+ #endif
+! #ifdef FEAT_GUI_MSWIN
+ "gui_win32",
+ #endif
+ #ifdef FEAT_HANGULIN
+***************
+*** 6526,6532 ****
+ #ifdef FEAT_TERMGUICOLORS
+ "termguicolors",
+ #endif
+! #if defined(FEAT_TERMINAL) && !defined(WIN3264)
+ "terminal",
+ #endif
+ #ifdef TERMINFO
+--- 6526,6532 ----
+ #ifdef FEAT_TERMGUICOLORS
+ "termguicolors",
+ #endif
+! #if defined(FEAT_TERMINAL) && !defined(MSWIN)
+ "terminal",
+ #endif
+ #ifdef TERMINFO
+***************
+*** 6658,6664 ****
+ n = stdout_isatty;
+ else if (STRICMP(name, "multi_byte_encoding") == 0)
+ n = has_mbyte;
+! #if defined(FEAT_BEVAL) && defined(FEAT_GUI_W32)
+ else if (STRICMP(name, "balloon_multiline") == 0)
+ n = multiline_balloon_available();
+ #endif
+--- 6658,6664 ----
+ n = stdout_isatty;
+ else if (STRICMP(name, "multi_byte_encoding") == 0)
+ n = has_mbyte;
+! #if defined(FEAT_BEVAL) && defined(FEAT_GUI_MSWIN)
+ else if (STRICMP(name, "balloon_multiline") == 0)
+ n = multiline_balloon_available();
+ #endif
+***************
+*** 6731,6741 ****
+ else if (STRICMP(name, "netbeans_enabled") == 0)
+ n = netbeans_active();
+ #endif
+! #if defined(FEAT_TERMINAL) && defined(WIN3264)
+ else if (STRICMP(name, "terminal") == 0)
+ n = terminal_enabled();
+ #endif
+! #if defined(FEAT_TERMINAL) && defined(WIN3264)
+ else if (STRICMP(name, "conpty") == 0)
+ n = use_conpty();
+ #endif
+--- 6731,6741 ----
+ else if (STRICMP(name, "netbeans_enabled") == 0)
+ n = netbeans_active();
+ #endif
+! #if defined(FEAT_TERMINAL) && defined(MSWIN)
+ else if (STRICMP(name, "terminal") == 0)
+ n = terminal_enabled();
+ #endif
+! #if defined(FEAT_TERMINAL) && defined(MSWIN)
+ else if (STRICMP(name, "conpty") == 0)
+ n = use_conpty();
+ #endif
+***************
+*** 9309,9315 ****
+ return FAIL;
+ n1 = list_find_nr(arg->vval.v_list, 0L, &error);
+ n2 = list_find_nr(arg->vval.v_list, 1L, &error);
+! # ifdef WIN3264
+ tm->HighPart = n1;
+ tm->LowPart = n2;
+ # else
+--- 9309,9315 ----
+ return FAIL;
+ n1 = list_find_nr(arg->vval.v_list, 0L, &error);
+ n2 = list_find_nr(arg->vval.v_list, 1L, &error);
+! # ifdef MSWIN
+ tm->HighPart = n1;
+ tm->LowPart = n2;
+ # else
+***************
+*** 9354,9360 ****
+ {
+ long n1, n2;
+
+! # ifdef WIN3264
+ n1 = res.HighPart;
+ n2 = res.LowPart;
+ # else
+--- 9354,9360 ----
+ {
+ long n1, n2;
+
+! # ifdef MSWIN
+ n1 = res.HighPart;
+ n2 = res.LowPart;
+ # else
+***************
+*** 9443,9449 ****
+ char_u *r = NULL;
+ char_u buf[NUMBUFLEN];
+ int timeout = 0;
+! # ifdef WIN32
+ HWND w;
+ # else
+ Window w;
+--- 9443,9449 ----
+ char_u *r = NULL;
+ char_u buf[NUMBUFLEN];
+ int timeout = 0;
+! # ifdef MSWIN
+ HWND w;
+ # else
+ Window w;
+***************
+*** 9464,9470 ****
+ if (server_name == NULL)
+ return; /* type error; errmsg already given */
+ keys = tv_get_string_buf(&argvars[1], buf);
+! # ifdef WIN32
+ if (serverSendToVim(server_name, keys, &r, &w, expr, timeout, TRUE) < 0)
+ # else
+ if (serverSendToVim(X_DISPLAY, server_name, keys, &r, &w, expr, timeout,
+--- 9464,9470 ----
+ if (server_name == NULL)
+ return; /* type error; errmsg already given */
+ keys = tv_get_string_buf(&argvars[1], buf);
+! # ifdef MSWIN
+ if (serverSendToVim(server_name, keys, &r, &w, expr, timeout, TRUE) < 0)
+ # else
+ if (serverSendToVim(X_DISPLAY, server_name, keys, &r, &w, expr, timeout,
+***************
+*** 9522,9528 ****
+ f_remote_foreground(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_CLIENTSERVER
+! # ifdef WIN32
+ /* On Win32 it's done in this application. */
+ {
+ char_u *server_name = tv_get_string_chk(&argvars[0]);
+--- 9522,9528 ----
+ f_remote_foreground(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_CLIENTSERVER
+! # ifdef MSWIN
+ /* On Win32 it's done in this application. */
+ {
+ char_u *server_name = tv_get_string_chk(&argvars[0]);
+***************
+*** 9549,9555 ****
+ #ifdef FEAT_CLIENTSERVER
+ dictitem_T v;
+ char_u *s = NULL;
+! # ifdef WIN32
+ long_u n = 0;
+ # endif
+ char_u *serverid;
+--- 9549,9555 ----
+ #ifdef FEAT_CLIENTSERVER
+ dictitem_T v;
+ char_u *s = NULL;
+! # ifdef MSWIN
+ long_u n = 0;
+ # endif
+ char_u *serverid;
+***************
+*** 9565,9571 ****
+ rettv->vval.v_number = -1;
+ return; /* type error; errmsg already given */
+ }
+! # ifdef WIN32
+ sscanf((const char *)serverid, SCANF_HEX_LONG_U, &n);
+ if (n == 0)
+ rettv->vval.v_number = -1;
+--- 9565,9571 ----
+ rettv->vval.v_number = -1;
+ return; /* type error; errmsg already given */
+ }
+! # ifdef MSWIN
+ sscanf((const char *)serverid, SCANF_HEX_LONG_U, &n);
+ if (n == 0)
+ rettv->vval.v_number = -1;
+***************
+*** 9609,9615 ****
+ if (serverid != NULL && !check_restricted() && !check_secure())
+ {
+ int timeout = 0;
+! # ifdef WIN32
+ /* The server's HWND is encoded in the 'id' parameter */
+ long_u n = 0;
+ # endif
+--- 9609,9615 ----
+ if (serverid != NULL && !check_restricted() && !check_secure())
+ {
+ int timeout = 0;
+! # ifdef MSWIN
+ /* The server's HWND is encoded in the 'id' parameter */
+ long_u n = 0;
+ # endif
+***************
+*** 9617,9623 ****
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ timeout = tv_get_number(&argvars[1]);
+
+! # ifdef WIN32
+ sscanf((char *)serverid, SCANF_HEX_LONG_U, &n);
+ if (n != 0)
+ r = serverGetReply((HWND)n, FALSE, TRUE, TRUE, timeout);
+--- 9617,9623 ----
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ timeout = tv_get_number(&argvars[1]);
+
+! # ifdef MSWIN
+ sscanf((char *)serverid, SCANF_HEX_LONG_U, &n);
+ if (n != 0)
+ r = serverGetReply((HWND)n, FALSE, TRUE, TRUE, timeout);
+***************
+*** 10789,10795 ****
+ char_u *r = NULL;
+
+ #ifdef FEAT_CLIENTSERVER
+! # ifdef WIN32
+ r = serverGetVimNames();
+ # else
+ make_connection();
+--- 10789,10795 ----
+ char_u *r = NULL;
+
+ #ifdef FEAT_CLIENTSERVER
+! # ifdef MSWIN
+ r = serverGetVimNames();
+ # else
+ make_connection();
+*** ../vim-8.1.0940/src/ex_cmds.c 2019-02-16 15:09:21.213946217 +0100
+--- src/ex_cmds.c 2019-02-17 17:29:18.544788906 +0100
+***************
+*** 1618,1624 ****
+ */
+ #ifndef FEAT_GUI_MSWIN
+ if (cmd == NULL
+! # ifdef WIN3264
+ || (winstart && !need_wait_return)
+ # endif
+ )
+--- 1618,1624 ----
+ */
+ #ifndef FEAT_GUI_MSWIN
+ if (cmd == NULL
+! # ifdef MSWIN
+ || (winstart && !need_wait_return)
+ # endif
+ )
+***************
+*** 1643,1649 ****
+ # endif
+ no_wait_return = save_nwr;
+ }
+! #endif /* FEAT_GUI_W32 */
+
+ #ifdef MSWIN
+ if (!winstart) /* if winstart==TRUE, never stopped termcap! */
+--- 1643,1649 ----
+ # endif
+ no_wait_return = save_nwr;
+ }
+! #endif /* FEAT_GUI_MSWIN */
+
+ #ifdef MSWIN
+ if (!winstart) /* if winstart==TRUE, never stopped termcap! */
+***************
+*** 1935,1941 ****
+ int shortname = FALSE; /* use 8.3 file name */
+ stat_T st_old; /* mch_stat() of existing viminfo file */
+ #endif
+! #ifdef WIN3264
+ int hidden = FALSE;
+ #endif
+
+--- 1935,1941 ----
+ int shortname = FALSE; /* use 8.3 file name */
+ stat_T st_old; /* mch_stat() of existing viminfo file */
+ #endif
+! #ifdef MSWIN
+ int hidden = FALSE;
+ #endif
+
+***************
+*** 1999,2005 ****
+ goto end;
+ }
+ #endif
+! #ifdef WIN3264
+ /* Get the file attributes of the existing viminfo file. */
+ hidden = mch_ishidden(fname);
+ #endif
+--- 1999,2005 ----
+ goto end;
+ }
+ #endif
+! #ifdef MSWIN
+ /* Get the file attributes of the existing viminfo file. */
+ hidden = mch_ishidden(fname);
+ #endif
+***************
+*** 2195,2201 ****
+ ++viminfo_errcnt;
+ semsg(_("E886: Can't rename viminfo file to %s!"), fname);
+ }
+! # ifdef WIN3264
+ /* If the viminfo file was hidden then also hide the new file. */
+ else if (hidden)
+ mch_hide(fname);
+--- 2195,2201 ----
+ ++viminfo_errcnt;
+ semsg(_("E886: Can't rename viminfo file to %s!"), fname);
+ }
+! # ifdef MSWIN
+ /* If the viminfo file was hidden then also hide the new file. */
+ else if (hidden)
+ mch_hide(fname);
+*** ../vim-8.1.0940/src/ex_cmds2.c 2019-02-16 00:00:24.804989830 +0100
+--- src/ex_cmds2.c 2019-02-17 17:29:18.544788906 +0100
+***************
+*** 1048,1054 ****
+ void
+ profile_start(proftime_T *tm)
+ {
+! # ifdef WIN3264
+ QueryPerformanceCounter(tm);
+ # else
+ gettimeofday(tm, NULL);
+--- 1048,1054 ----
+ void
+ profile_start(proftime_T *tm)
+ {
+! # ifdef MSWIN
+ QueryPerformanceCounter(tm);
+ # else
+ gettimeofday(tm, NULL);
+***************
+*** 1063,1069 ****
+ {
+ proftime_T now;
+
+! # ifdef WIN3264
+ QueryPerformanceCounter(&now);
+ tm->QuadPart = now.QuadPart - tm->QuadPart;
+ # else
+--- 1063,1069 ----
+ {
+ proftime_T now;
+
+! # ifdef MSWIN
+ QueryPerformanceCounter(&now);
+ tm->QuadPart = now.QuadPart - tm->QuadPart;
+ # else
+***************
+*** 1084,1090 ****
+ void
+ profile_sub(proftime_T *tm, proftime_T *tm2)
+ {
+! # ifdef WIN3264
+ tm->QuadPart -= tm2->QuadPart;
+ # else
+ tm->tv_usec -= tm2->tv_usec;
+--- 1084,1090 ----
+ void
+ profile_sub(proftime_T *tm, proftime_T *tm2)
+ {
+! # ifdef MSWIN
+ tm->QuadPart -= tm2->QuadPart;
+ # else
+ tm->tv_usec -= tm2->tv_usec;
+***************
+*** 1106,1112 ****
+ {
+ static char buf[50];
+
+! # ifdef WIN3264
+ LARGE_INTEGER fr;
+
+ QueryPerformanceFrequency(&fr);
+--- 1106,1112 ----
+ {
+ static char buf[50];
+
+! # ifdef MSWIN
+ LARGE_INTEGER fr;
+
+ QueryPerformanceFrequency(&fr);
+***************
+*** 1124,1130 ****
+ float_T
+ profile_float(proftime_T *tm)
+ {
+! # ifdef WIN3264
+ LARGE_INTEGER fr;
+
+ QueryPerformanceFrequency(&fr);
+--- 1124,1130 ----
+ float_T
+ profile_float(proftime_T *tm)
+ {
+! # ifdef MSWIN
+ LARGE_INTEGER fr;
+
+ QueryPerformanceFrequency(&fr);
+***************
+*** 1145,1151 ****
+ profile_zero(tm);
+ else
+ {
+! # ifdef WIN3264
+ LARGE_INTEGER fr;
+
+ QueryPerformanceCounter(tm);
+--- 1145,1151 ----
+ profile_zero(tm);
+ else
+ {
+! # ifdef MSWIN
+ LARGE_INTEGER fr;
+
+ QueryPerformanceCounter(tm);
+***************
+*** 1170,1176 ****
+ {
+ proftime_T now;
+
+! # ifdef WIN3264
+ if (tm->QuadPart == 0) /* timer was not set */
+ return FALSE;
+ QueryPerformanceCounter(&now);
+--- 1170,1176 ----
+ {
+ proftime_T now;
+
+! # ifdef MSWIN
+ if (tm->QuadPart == 0) /* timer was not set */
+ return FALSE;
+ QueryPerformanceCounter(&now);
+***************
+*** 1190,1196 ****
+ void
+ profile_zero(proftime_T *tm)
+ {
+! # ifdef WIN3264
+ tm->QuadPart = 0;
+ # else
+ tm->tv_usec = 0;
+--- 1190,1196 ----
+ void
+ profile_zero(proftime_T *tm)
+ {
+! # ifdef MSWIN
+ tm->QuadPart = 0;
+ # else
+ tm->tv_usec = 0;
+***************
+*** 1207,1213 ****
+ long
+ proftime_time_left(proftime_T *due, proftime_T *now)
+ {
+! # ifdef WIN3264
+ LARGE_INTEGER fr;
+
+ if (now->QuadPart > due->QuadPart)
+--- 1207,1213 ----
+ long
+ proftime_time_left(proftime_T *due, proftime_T *now)
+ {
+! # ifdef MSWIN
+ LARGE_INTEGER fr;
+
+ if (now->QuadPart > due->QuadPart)
+***************
+*** 1592,1598 ****
+ profile_zero(tm2);
+ else
+ {
+! # ifdef WIN3264
+ tm2->QuadPart = tm->QuadPart / count;
+ # else
+ double usec = (tm->tv_sec * 1000000.0 + tm->tv_usec) / count;
+--- 1592,1598 ----
+ profile_zero(tm2);
+ else
+ {
+! # ifdef MSWIN
+ tm2->QuadPart = tm->QuadPart / count;
+ # else
+ double usec = (tm->tv_sec * 1000000.0 + tm->tv_usec) / count;
+***************
+*** 1617,1623 ****
+ void
+ profile_add(proftime_T *tm, proftime_T *tm2)
+ {
+! # ifdef WIN3264
+ tm->QuadPart += tm2->QuadPart;
+ # else
+ tm->tv_usec += tm2->tv_usec;
+--- 1617,1623 ----
+ void
+ profile_add(proftime_T *tm, proftime_T *tm2)
+ {
+! # ifdef MSWIN
+ tm->QuadPart += tm2->QuadPart;
+ # else
+ tm->tv_usec += tm2->tv_usec;
+***************
+*** 1638,1644 ****
+ {
+ /* Check that the result won't be negative. Can happen with recursive
+ * calls. */
+! #ifdef WIN3264
+ if (total->QuadPart <= children->QuadPart)
+ return;
+ #else
+--- 1638,1644 ----
+ {
+ /* Check that the result won't be negative. Can happen with recursive
+ * calls. */
+! #ifdef MSWIN
+ if (total->QuadPart <= children->QuadPart)
+ return;
+ #else
+***************
+*** 1678,1684 ****
+ int
+ profile_equal(proftime_T *tm1, proftime_T *tm2)
+ {
+! # ifdef WIN3264
+ return (tm1->QuadPart == tm2->QuadPart);
+ # else
+ return (tm1->tv_usec == tm2->tv_usec && tm1->tv_sec == tm2->tv_sec);
+--- 1678,1684 ----
+ int
+ profile_equal(proftime_T *tm1, proftime_T *tm2)
+ {
+! # ifdef MSWIN
+ return (tm1->QuadPart == tm2->QuadPart);
+ # else
+ return (tm1->tv_usec == tm2->tv_usec && tm1->tv_sec == tm2->tv_sec);
+***************
+*** 1691,1697 ****
+ int
+ profile_cmp(const proftime_T *tm1, const proftime_T *tm2)
+ {
+! # ifdef WIN3264
+ return (int)(tm2->QuadPart - tm1->QuadPart);
+ # else
+ if (tm1->tv_sec == tm2->tv_sec)
+--- 1691,1697 ----
+ int
+ profile_cmp(const proftime_T *tm1, const proftime_T *tm2)
+ {
+! # ifdef MSWIN
+ return (int)(tm2->QuadPart - tm1->QuadPart);
+ # else
+ if (tm1->tv_sec == tm2->tv_sec)
+***************
+*** 4286,4292 ****
+
+ static char_u *get_one_sourceline(struct source_cookie *sp);
+
+! #if (defined(WIN32) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC)
+ # define USE_FOPEN_NOINH
+ /*
+ * Special function to open a file without handle inheritance.
+--- 4286,4292 ----
+
+ static char_u *get_one_sourceline(struct source_cookie *sp);
+
+! #if (defined(MSWIN) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC)
+ # define USE_FOPEN_NOINH
+ /*
+ * Special function to open a file without handle inheritance.
+***************
+*** 4295,4301 ****
+ static FILE *
+ fopen_noinh_readbin(char *filename)
+ {
+! # ifdef WIN32
+ int fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0);
+ # else
+ int fd_tmp = mch_open(filename, O_RDONLY, 0);
+--- 4295,4301 ----
+ static FILE *
+ fopen_noinh_readbin(char *filename)
+ {
+! # ifdef MSWIN
+ int fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0);
+ # else
+ int fd_tmp = mch_open(filename, O_RDONLY, 0);
+***************
+*** 5201,5207 ****
+ /* Obtain the locale value from the libraries. */
+ loc = (char_u *)setlocale(what, NULL);
+
+! # ifdef WIN32
+ if (loc != NULL)
+ {
+ char_u *p;
+--- 5201,5207 ----
+ /* Obtain the locale value from the libraries. */
+ loc = (char_u *)setlocale(what, NULL);
+
+! # ifdef MSWIN
+ if (loc != NULL)
+ {
+ char_u *p;
+***************
+*** 5230,5236 ****
+ #endif
+
+
+! #ifdef WIN32
+ /*
+ * On MS-Windows locale names are strings like "German_Germany.1252", but
+ * gettext expects "de". Try to translate one into another here for a few
+--- 5230,5236 ----
+ #endif
+
+
+! #ifdef MSWIN
+ /*
+ * On MS-Windows locale names are strings like "German_Germany.1252", but
+ * gettext expects "de". Try to translate one into another here for a few
+***************
+*** 5307,5313 ****
+ p = mch_getenv((char_u *)"LANG");
+ }
+ # endif
+! # ifdef WIN32
+ p = gettext_lang(p);
+ # endif
+ return is_valid_mess_lang(p) ? p : NULL;
+--- 5307,5313 ----
+ p = mch_getenv((char_u *)"LANG");
+ }
+ # endif
+! # ifdef MSWIN
+ p = gettext_lang(p);
+ # endif
+ return is_valid_mess_lang(p) ? p : NULL;
+***************
+*** 5479,5485 ****
+
+ /* Clear $LANGUAGE because GNU gettext uses it. */
+ vim_setenv((char_u *)"LANGUAGE", (char_u *)"");
+! # ifdef WIN32
+ /* Apparently MS-Windows printf() may cause a crash when
+ * we give it 8-bit text while it's expecting text in the
+ * current locale. This call avoids that. */
+--- 5479,5485 ----
+
+ /* Clear $LANGUAGE because GNU gettext uses it. */
+ vim_setenv((char_u *)"LANGUAGE", (char_u *)"");
+! # ifdef MSWIN
+ /* Apparently MS-Windows printf() may cause a crash when
+ * we give it 8-bit text while it's expecting text in the
+ * current locale. This call avoids that. */
+***************
+*** 5489,5495 ****
+ if (what != LC_CTYPE)
+ {
+ char_u *mname;
+! #ifdef WIN32
+ mname = gettext_lang(name);
+ #else
+ mname = name;
+--- 5489,5495 ----
+ if (what != LC_CTYPE)
+ {
+ char_u *mname;
+! #ifdef MSWIN
+ mname = gettext_lang(name);
+ #else
+ mname = name;
+***************
+*** 5516,5522 ****
+
+ static char_u **locales = NULL; /* Array of all available locales */
+
+! # ifndef WIN32
+ static int did_init_locales = FALSE;
+
+ /* Return an array of strings for all available locales + NULL for the
+--- 5516,5522 ----
+
+ static char_u **locales = NULL; /* Array of all available locales */
+
+! # ifndef MSWIN
+ static int did_init_locales = FALSE;
+
+ /* Return an array of strings for all available locales + NULL for the
+***************
+*** 5567,5573 ****
+ static void
+ init_locales(void)
+ {
+! # ifndef WIN32
+ if (!did_init_locales)
+ {
+ did_init_locales = TRUE;
+--- 5567,5573 ----
+ static void
+ init_locales(void)
+ {
+! # ifndef MSWIN
+ if (!did_init_locales)
+ {
+ did_init_locales = TRUE;
+*** ../vim-8.1.0940/src/ex_docmd.c 2019-02-17 15:00:48.446637100 +0100
+--- src/ex_docmd.c 2019-02-17 17:29:18.544788906 +0100
+***************
+*** 177,183 ****
+ # define ex_gui ex_nogui
+ static void ex_nogui(exarg_T *eap);
+ #endif
+! #if defined(FEAT_GUI_W32) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+ static void ex_tearoff(exarg_T *eap);
+ #else
+ # define ex_tearoff ex_ni
+--- 177,183 ----
+ # define ex_gui ex_nogui
+ static void ex_nogui(exarg_T *eap);
+ #endif
+! #if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+ static void ex_tearoff(exarg_T *eap);
+ #else
+ # define ex_tearoff ex_ni
+***************
+*** 8866,8872 ****
+ }
+ #endif
+
+! #if defined(FEAT_GUI_W32) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+ static void
+ ex_tearoff(exarg_T *eap)
+ {
+--- 8866,8872 ----
+ }
+ #endif
+
+! #if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+ static void
+ ex_tearoff(exarg_T *eap)
+ {
+***************
+*** 9853,9859 ****
+ if (need_maketitle)
+ maketitle();
+ #endif
+! #if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ resize_console_buf();
+ #endif
+ RedrawingDisabled = r;
+--- 9853,9859 ----
+ if (need_maketitle)
+ maketitle();
+ #endif
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ resize_console_buf();
+ #endif
+ RedrawingDisabled = r;
+*** ../vim-8.1.0940/src/ex_getln.c 2019-02-16 15:09:21.213946217 +0100
+--- src/ex_getln.c 2019-02-17 17:29:18.544788906 +0100
+***************
+*** 1899,1907 ****
+ /* Ignore mouse event or open_cmdwin() result. */
+ goto cmdline_not_changed;
+
+! #ifdef FEAT_GUI_W32
+! /* On Win32 ignore <M-F4>, we get it when closing the window was
+! * cancelled. */
+ case K_F4:
+ if (mod_mask == MOD_MASK_ALT)
+ {
+--- 1899,1907 ----
+ /* Ignore mouse event or open_cmdwin() result. */
+ goto cmdline_not_changed;
+
+! #ifdef FEAT_GUI_MSWIN
+! /* On MS-Windows ignore <M-F4>, we get it when closing the window
+! * was cancelled. */
+ case K_F4:
+ if (mod_mask == MOD_MASK_ALT)
+ {
+*** ../vim-8.1.0940/src/feature.h 2019-01-26 17:28:22.224599141 +0100
+--- src/feature.h 2019-02-17 17:29:18.544788906 +0100
+***************
+*** 61,67 ****
+ */
+ #if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
+ && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
+! # if defined(UNIX) || defined(WIN3264) || defined(MACOS_X)
+ # define FEAT_HUGE
+ # else
+ # if defined(MSWIN) || defined(VMS) || defined(AMIGA)
+--- 61,67 ----
+ */
+ #if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
+ && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
+! # if defined(UNIX) || defined(MSWIN) || defined(MACOS_X)
+ # define FEAT_HUGE
+ # else
+ # if defined(MSWIN) || defined(VMS) || defined(AMIGA)
+***************
+*** 343,352 ****
+ */
+ #ifdef FEAT_NORMAL
+ # define FEAT_EVAL
+! # if defined(HAVE_FLOAT_FUNCS) || defined(WIN3264) || defined(MACOS_X)
+ # define FEAT_FLOAT
+ # endif
+! # if defined(HAVE_STDINT_H) || defined(WIN3264) || (VIM_SIZEOF_LONG >= 8)
+ # define FEAT_NUM64
+ # endif
+ #endif
+--- 333,342 ----
+ */
+ #ifdef FEAT_NORMAL
+ # define FEAT_EVAL
+! # if defined(HAVE_FLOAT_FUNCS) || defined(MSWIN) || defined(MACOS_X)
+ # define FEAT_FLOAT
+ # endif
+! # if defined(HAVE_STDINT_H) || defined(MSWIN) || (VIM_SIZEOF_LONG >= 8)
+ # define FEAT_NUM64
+ # endif
+ #endif
+***************
+*** 361,367 ****
+ #if defined(FEAT_HUGE) \
+ && defined(FEAT_EVAL) \
+ && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
+! || defined(WIN3264))
+ # define FEAT_PROFILE
+ #endif
+
+--- 351,357 ----
+ #if defined(FEAT_HUGE) \
+ && defined(FEAT_EVAL) \
+ && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
+! || defined(MSWIN))
+ # define FEAT_PROFILE
+ #endif
+
+***************
+*** 371,384 ****
+ #if defined(FEAT_NORMAL) \
+ && defined(FEAT_EVAL) \
+ && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
+! || defined(WIN3264))
+ # define FEAT_RELTIME
+ #endif
+
+ /*
+ * +timers timer_start()
+ */
+! #if defined(FEAT_RELTIME) && (defined(UNIX) || defined(WIN32) || defined(VMS) )
+ # define FEAT_TIMERS
+ #endif
+
+--- 361,374 ----
+ #if defined(FEAT_NORMAL) \
+ && defined(FEAT_EVAL) \
+ && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
+! || defined(MSWIN))
+ # define FEAT_RELTIME
+ #endif
+
+ /*
+ * +timers timer_start()
+ */
+! #if defined(FEAT_RELTIME) && (defined(UNIX) || defined(MSWIN) || defined(VMS) )
+ # define FEAT_TIMERS
+ #endif
+
+***************
+*** 603,609 ****
+ * +multi_byte_ime Win32 IME input method. Only for far-east Windows, so
+ * IME can be used to input chars. Not tested much!
+ */
+! #if defined(FEAT_GUI_W32) && !defined(FEAT_MBYTE_IME)
+ /* #define FEAT_MBYTE_IME */
+ # endif
+
+--- 593,599 ----
+ * +multi_byte_ime Win32 IME input method. Only for far-east Windows, so
+ * IME can be used to input chars. Not tested much!
+ */
+! #if defined(FEAT_GUI_MSWIN) && !defined(FEAT_MBYTE_IME)
+ /* #define FEAT_MBYTE_IME */
+ # endif
+
+***************
+*** 659,665 ****
+ #if defined(HAVE_DLOPEN) && defined(HAVE_DLSYM)
+ # define USE_DLOPEN
+ #endif
+! #if defined(FEAT_EVAL) && (defined(WIN3264) || ((defined(UNIX) || defined(VMS)) \
+ && (defined(USE_DLOPEN) || defined(HAVE_SHL_LOAD))))
+ # define FEAT_LIBCALL
+ #endif
+--- 649,655 ----
+ #if defined(HAVE_DLOPEN) && defined(HAVE_DLSYM)
+ # define USE_DLOPEN
+ #endif
+! #if defined(FEAT_EVAL) && (defined(MSWIN) || ((defined(UNIX) || defined(VMS)) \
+ && (defined(USE_DLOPEN) || defined(HAVE_SHL_LOAD))))
+ # define FEAT_LIBCALL
+ #endif
+***************
+*** 669,675 ****
+ */
+ #ifdef FEAT_NORMAL
+ # define FEAT_MENU
+! # ifdef FEAT_GUI_W32
+ # define FEAT_TEAROFF
+ # endif
+ #endif
+--- 659,665 ----
+ */
+ #ifdef FEAT_NORMAL
+ # define FEAT_MENU
+! # ifdef FEAT_GUI_MSWIN
+ # define FEAT_TEAROFF
+ # endif
+ #endif
+***************
+*** 757,763 ****
+ #endif
+ #if !defined(FEAT_GUI_DIALOG) && (defined(FEAT_GUI_MOTIF) \
+ || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
+! || defined(FEAT_GUI_W32))
+ /* need a dialog to show error messages when starting from the desktop */
+ # define FEAT_GUI_DIALOG
+ #endif
+--- 747,753 ----
+ #endif
+ #if !defined(FEAT_GUI_DIALOG) && (defined(FEAT_GUI_MOTIF) \
+ || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
+! || defined(FEAT_GUI_MSWIN))
+ /* need a dialog to show error messages when starting from the desktop */
+ # define FEAT_GUI_DIALOG
+ #endif
+***************
+*** 828,834 ****
+ */
+ #if defined(FEAT_NORMAL) \
+ && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
+! || defined(WIN3264))
+ # define STARTUPTIME 1
+ #endif
+
+--- 818,824 ----
+ */
+ #if defined(FEAT_NORMAL) \
+ && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
+! || defined(MSWIN))
+ # define STARTUPTIME 1
+ #endif
+
+***************
+*** 1039,1045 ****
+ # ifdef FEAT_BIG
+ # define FEAT_MOUSE_SGR
+ # endif
+! # if defined(FEAT_NORMAL) && defined(WIN3264)
+ # define DOS_MOUSE
+ # endif
+ # if defined(FEAT_NORMAL) && defined(__QNX__)
+--- 1029,1035 ----
+ # ifdef FEAT_BIG
+ # define FEAT_MOUSE_SGR
+ # endif
+! # if defined(FEAT_NORMAL) && defined(MSWIN)
+ # define DOS_MOUSE
+ # endif
+ # if defined(FEAT_NORMAL) && defined(__QNX__)
+***************
+*** 1136,1142 ****
+ * +clientserver Remote control via the remote_send() function
+ * and the --remote argument
+ */
+! #if (defined(WIN32) || defined(FEAT_XCLIPBOARD)) && defined(FEAT_EVAL)
+ # define FEAT_CLIENTSERVER
+ #endif
+
+--- 1126,1132 ----
+ * +clientserver Remote control via the remote_send() function
+ * and the --remote argument
+ */
+! #if (defined(MSWIN) || defined(FEAT_XCLIPBOARD)) && defined(FEAT_EVAL)
+ # define FEAT_CLIENTSERVER
+ #endif
+
+***************
+*** 1145,1151 ****
+ * when --servername is not passed on the command line.
+ */
+ #if defined(FEAT_CLIENTSERVER) && !defined(FEAT_AUTOSERVERNAME)
+! # ifdef WIN3264
+ /* Always enabled on MS-Windows. */
+ # define FEAT_AUTOSERVERNAME
+ # else
+--- 1135,1141 ----
+ * when --servername is not passed on the command line.
+ */
+ #if defined(FEAT_CLIENTSERVER) && !defined(FEAT_AUTOSERVERNAME)
+! # ifdef MSWIN
+ /* Always enabled on MS-Windows. */
+ # define FEAT_AUTOSERVERNAME
+ # else
+***************
+*** 1169,1178 ****
+ */
+ #ifdef FEAT_NORMAL
+ /* MS-DOS console and Win32 console can change cursor shape */
+! # if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ # define MCH_CURSOR_SHAPE
+ # endif
+! # if defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF) \
+ || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
+ || defined(FEAT_GUI_PHOTON)
+ # define FEAT_MOUSESHAPE
+--- 1159,1168 ----
+ */
+ #ifdef FEAT_NORMAL
+ /* MS-DOS console and Win32 console can change cursor shape */
+! # if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ # define MCH_CURSOR_SHAPE
+ # endif
+! # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
+ || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
+ || defined(FEAT_GUI_PHOTON)
+ # define FEAT_MOUSESHAPE
+***************
+*** 1189,1195 ****
+ # define CURSOR_SHAPE
+ #endif
+
+! #if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_W32) || defined(FEAT_GUI_GTK) \
+ || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
+ || defined(FEAT_GUI_MAC))
+ # define MZSCHEME_GUI_THREADS
+--- 1179,1185 ----
+ # define CURSOR_SHAPE
+ #endif
+
+! #if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
+ || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
+ || defined(FEAT_GUI_MAC))
+ # define MZSCHEME_GUI_THREADS
+***************
+*** 1263,1269 ****
+ # if ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
+ && defined(HAVE_X11_XPM_H)) \
+ || defined(FEAT_GUI_GTK) \
+! || (defined(WIN32) && defined(FEAT_GUI))
+ # define FEAT_SIGN_ICONS
+ # endif
+ #endif
+--- 1253,1259 ----
+ # if ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
+ && defined(HAVE_X11_XPM_H)) \
+ || defined(FEAT_GUI_GTK) \
+! || (defined(MSWIN) && defined(FEAT_GUI))
+ # define FEAT_SIGN_ICONS
+ # endif
+ #endif
+***************
+*** 1274,1286 ****
+ * Only for GUIs where it was implemented.
+ */
+ #if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
+! || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)) \
+ && ( ((defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)) \
+! && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)) \
+ || defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL))
+ # define FEAT_BEVAL_GUI
+ # if !defined(FEAT_XFONTSET) && !defined(FEAT_GUI_GTK) \
+! && !defined(FEAT_GUI_W32)
+ # define FEAT_XFONTSET
+ # endif
+ #endif
+--- 1264,1276 ----
+ * Only for GUIs where it was implemented.
+ */
+ #if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
+! || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)) \
+ && ( ((defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)) \
+! && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MSWIN)) \
+ || defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL))
+ # define FEAT_BEVAL_GUI
+ # if !defined(FEAT_XFONTSET) && !defined(FEAT_GUI_GTK) \
+! && !defined(FEAT_GUI_MSWIN)
+ # define FEAT_XFONTSET
+ # endif
+ #endif
+***************
+*** 1293,1299 ****
+ * +balloon_eval_term Allow balloon expression evaluation in the terminal.
+ */
+ #if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \
+! (defined(UNIX) || defined(VMS) || (defined(WIN32) && !defined(FEAT_GUI_W32)))
+ # define FEAT_BEVAL_TERM
+ #endif
+
+--- 1283,1289 ----
+ * +balloon_eval_term Allow balloon expression evaluation in the terminal.
+ */
+ #if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \
+! (defined(UNIX) || defined(VMS) || (defined(MSWIN) && !defined(FEAT_GUI_MSWIN)))
+ # define FEAT_BEVAL_TERM
+ #endif
+
+***************
+*** 1340,1352 ****
+ * +filterpipe
+ */
+ #if (defined(UNIX) && !defined(USE_SYSTEM)) \
+! || (defined(WIN3264) && defined(FEAT_GUI_W32))
+ # define FEAT_FILTERPIPE
+ #endif
+
+ /*
+ * +vtp: Win32 virtual console.
+ */
+! #if !defined(FEAT_GUI) && defined(WIN3264)
+ # define FEAT_VTP
+ #endif
+--- 1330,1342 ----
+ * +filterpipe
+ */
+ #if (defined(UNIX) && !defined(USE_SYSTEM)) \
+! || (defined(MSWIN) && defined(FEAT_GUI_MSWIN))
+ # define FEAT_FILTERPIPE
+ #endif
+
+ /*
+ * +vtp: Win32 virtual console.
+ */
+! #if !defined(FEAT_GUI) && defined(MSWIN)
+ # define FEAT_VTP
+ #endif
+*** ../vim-8.1.0940/src/fileio.c 2019-02-15 21:06:05.338289743 +0100
+--- src/fileio.c 2019-02-17 17:29:18.548788886 +0100
+***************
+*** 49,55 ****
+ #define FIO_UCS2 0x04 /* convert UCS-2 */
+ #define FIO_UCS4 0x08 /* convert UCS-4 */
+ #define FIO_UTF16 0x10 /* convert UTF-16 */
+! #ifdef WIN3264
+ # define FIO_CODEPAGE 0x20 /* convert MS-Windows codepage */
+ # define FIO_PUT_CP(x) (((x) & 0xffff) << 16) /* put codepage in top word */
+ # define FIO_GET_CP(x) (((x)>>16) & 0xffff) /* get codepage from top word */
+--- 49,55 ----
+ #define FIO_UCS2 0x04 /* convert UCS-2 */
+ #define FIO_UCS4 0x08 /* convert UCS-4 */
+ #define FIO_UTF16 0x10 /* convert UTF-16 */
+! #ifdef MSWIN
+ # define FIO_CODEPAGE 0x20 /* convert MS-Windows codepage */
+ # define FIO_PUT_CP(x) (((x) & 0xffff) << 16) /* put codepage in top word */
+ # define FIO_GET_CP(x) (((x)>>16) & 0xffff) /* get codepage from top word */
+***************
+*** 106,112 ****
+ static int get_fio_flags(char_u *ptr);
+ static char_u *check_for_bom(char_u *p, long size, int *lenp, int flags);
+ static int make_bom(char_u *buf, char_u *name);
+! #ifdef WIN3264
+ static int get_win_fio_flags(char_u *ptr);
+ #endif
+ #ifdef MACOS_CONVERT
+--- 106,112 ----
+ static int get_fio_flags(char_u *ptr);
+ static char_u *check_for_bom(char_u *p, long size, int *lenp, int flags);
+ static int make_bom(char_u *buf, char_u *name);
+! #ifdef MSWIN
+ static int get_win_fio_flags(char_u *ptr);
+ #endif
+ #ifdef MACOS_CONVERT
+***************
+*** 1038,1044 ****
+ else if (enc_utf8 || STRCMP(p_enc, "latin1") == 0)
+ fio_flags = get_fio_flags(fenc);
+
+! #ifdef WIN3264
+ /*
+ * Conversion from an MS-Windows codepage to UTF-8 or another codepage
+ * is handled with MultiByteToWideChar().
+--- 1038,1044 ----
+ else if (enc_utf8 || STRCMP(p_enc, "latin1") == 0)
+ fio_flags = get_fio_flags(fenc);
+
+! #ifdef MSWIN
+ /*
+ * Conversion from an MS-Windows codepage to UTF-8 or another codepage
+ * is handled with MultiByteToWideChar().
+***************
+*** 1229,1235 ****
+ size = (size * 2 / 3) & ~3;
+ else if (fio_flags == FIO_UCSBOM)
+ size = size / ICONV_MULT; /* worst case */
+! #ifdef WIN3264
+ else if (fio_flags & FIO_CODEPAGE)
+ size = size / ICONV_MULT; /* also worst case */
+ #endif
+--- 1229,1235 ----
+ size = (size * 2 / 3) & ~3;
+ else if (fio_flags == FIO_UCSBOM)
+ size = size / ICONV_MULT; /* worst case */
+! #ifdef MSWIN
+ else if (fio_flags & FIO_CODEPAGE)
+ size = size / ICONV_MULT; /* also worst case */
+ #endif
+***************
+*** 1590,1596 ****
+ }
+ #endif
+
+! #ifdef WIN3264
+ if (fio_flags & FIO_CODEPAGE)
+ {
+ char_u *src, *dst;
+--- 1590,1596 ----
+ }
+ #endif
+
+! #ifdef MSWIN
+ if (fio_flags & FIO_CODEPAGE)
+ {
+ char_u *src, *dst;
+***************
+*** 2559,2565 ****
+ curbuf->b_op_end.lnum = from + linecnt;
+ curbuf->b_op_end.col = 0;
+
+! #ifdef WIN32
+ /*
+ * Work around a weird problem: When a file has two links (only
+ * possible on NTFS) and we write through one link, then stat() it
+--- 2559,2565 ----
+ curbuf->b_op_end.lnum = from + linecnt;
+ curbuf->b_op_end.col = 0;
+
+! #ifdef MSWIN
+ /*
+ * Work around a weird problem: When a file has two links (only
+ * possible on NTFS) and we write through one link, then stat() it
+***************
+*** 3601,3613 ****
+ */
+ if (!(append && *p_pm == NUL) && !filtering && perm >= 0 && dobackup)
+ {
+! #if defined(UNIX) || defined(WIN32)
+ stat_T st;
+ #endif
+
+ if ((bkc & BKC_YES) || append) /* "yes" */
+ backup_copy = TRUE;
+! #if defined(UNIX) || defined(WIN32)
+ else if ((bkc & BKC_AUTO)) /* "auto" */
+ {
+ int i;
+--- 3601,3613 ----
+ */
+ if (!(append && *p_pm == NUL) && !filtering && perm >= 0 && dobackup)
+ {
+! #if defined(UNIX) || defined(MSWIN)
+ stat_T st;
+ #endif
+
+ if ((bkc & BKC_YES) || append) /* "yes" */
+ backup_copy = TRUE;
+! #if defined(UNIX) || defined(MSWIN)
+ else if ((bkc & BKC_AUTO)) /* "auto" */
+ {
+ int i;
+***************
+*** 3632,3638 ****
+ backup_copy = TRUE;
+ else
+ # else
+! # ifdef WIN32
+ /* On NTFS file systems hard links are possible. */
+ if (mch_is_linked(fname))
+ backup_copy = TRUE;
+--- 3632,3638 ----
+ backup_copy = TRUE;
+ else
+ # else
+! # ifdef MSWIN
+ /* On NTFS file systems hard links are possible. */
+ if (mch_is_linked(fname))
+ backup_copy = TRUE;
+***************
+*** 3715,3721 ****
+ && (lstat_res != 0 || st.st_ino == st_old.st_ino))
+ backup_copy = FALSE;
+ # else
+! # if defined(WIN32)
+ /* Symlinks. */
+ if ((bkc & BKC_BREAKSYMLINK) && mch_is_symbolic_link(fname))
+ backup_copy = FALSE;
+--- 3715,3721 ----
+ && (lstat_res != 0 || st.st_ino == st_old.st_ino))
+ backup_copy = FALSE;
+ # else
+! # if defined(MSWIN)
+ /* Symlinks. */
+ if ((bkc & BKC_BREAKSYMLINK) && mch_is_symbolic_link(fname))
+ backup_copy = FALSE;
+***************
+*** 3744,3750 ****
+ stat_T st_new;
+ char_u *dirp;
+ char_u *rootname;
+! #if defined(UNIX) || defined(WIN3264)
+ char_u *p;
+ #endif
+ #if defined(UNIX)
+--- 3744,3750 ----
+ stat_T st_new;
+ char_u *dirp;
+ char_u *rootname;
+! #if defined(UNIX) || defined(MSWIN)
+ char_u *p;
+ #endif
+ #if defined(UNIX)
+***************
+*** 3785,3791 ****
+ */
+ (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
+--- 3785,3791 ----
+ */
+ (void)copy_option_part(&dirp, copybuf, BUFSIZE, ",");
+
+! #if defined(UNIX) || defined(MSWIN)
+ p = copybuf + STRLEN(copybuf);
+ if (after_pathsep(copybuf, p) && p[-1] == p[-2])
+ // Ends with '//', use full path
+***************
+*** 4018,4024 ****
+ */
+ (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
+--- 4018,4024 ----
+ */
+ (void)copy_option_part(&dirp, IObuff, IOSIZE, ",");
+
+! #if defined(UNIX) || defined(MSWIN)
+ p = IObuff + STRLEN(IObuff);
+ if (after_pathsep(IObuff, p) && p[-1] == p[-2])
+ // path ends with '//', use full path
+***************
+*** 4177,4183 ****
+ }
+ }
+
+! #ifdef WIN3264
+ if (converted && wb_flags == 0 && (wb_flags = get_win_fio_flags(fenc)) != 0)
+ {
+ /* Convert UTF-8 -> UCS-2 and UCS-2 -> DBCS. Worst-case * 4: */
+--- 4177,4183 ----
+ }
+ }
+
+! #ifdef MSWIN
+ if (converted && wb_flags == 0 && (wb_flags = get_win_fio_flags(fenc)) != 0)
+ {
+ /* Convert UTF-8 -> UCS-2 and UCS-2 -> DBCS. Worst-case * 4: */
+***************
+*** 4416,4422 ****
+ vim_ignored = ftruncate(fd, (off_t)0);
+ #endif
+
+! #if defined(WIN3264)
+ if (backup != NULL && overwriting && !append)
+ {
+ if (backup_copy)
+--- 4416,4422 ----
+ vim_ignored = ftruncate(fd, (off_t)0);
+ #endif
+
+! #if defined(MSWIN)
+ if (backup != NULL && overwriting && !append)
+ {
+ if (backup_copy)
+***************
+*** 5430,5436 ****
+ }
+ }
+
+! #ifdef WIN3264
+ else if (flags & FIO_CODEPAGE)
+ {
+ /*
+--- 5430,5436 ----
+ }
+ }
+
+! #ifdef MSWIN
+ else if (flags & FIO_CODEPAGE)
+ {
+ /*
+***************
+*** 5869,5875 ****
+ return 0;
+ }
+
+! #ifdef WIN3264
+ /*
+ * Check "ptr" for a MS-Windows codepage name and return the FIO_ flags needed
+ * for the conversion MS-Windows can do for us. Also accept "utf-8".
+--- 5869,5875 ----
+ return 0;
+ }
+
+! #ifdef MSWIN
+ /*
+ * Check "ptr" for a MS-Windows codepage name and return the FIO_ flags needed
+ * for the conversion MS-Windows can do for us. Also accept "utf-8".
+***************
+*** 6041,6049 ****
+ p = full_path + len;
+ #if defined(MSWIN)
+ /*
+! * MSWIN: when a file is in the root directory, dir_name will end in a
+! * slash, since C: by itself does not define a specific dir. In this
+! * case p may already be correct. <negri>
+ */
+ if (!((len > 2) && (*(p - 2) == ':')))
+ #endif
+--- 6041,6049 ----
+ p = full_path + len;
+ #if defined(MSWIN)
+ /*
+! * MS-Windows: when a file is in the root directory, dir_name will end
+! * in a slash, since C: by itself does not define a specific dir. In
+! * this case p may already be correct. <negri>
+ */
+ if (!((len > 2) && (*(p - 2) == ':')))
+ #endif
+***************
+*** 6298,6304 ****
+ else if ((int)STRLEN(e) + extlen > 4)
+ s = e + 4 - extlen;
+ }
+! #ifdef WIN3264
+ /*
+ * If there is no file name, and the extension starts with '.', put a
+ * '_' before the dot, because just ".ext" may be invalid if it's on a
+--- 6298,6304 ----
+ else if ((int)STRLEN(e) + extlen > 4)
+ s = e + 4 - extlen;
+ }
+! #ifdef MSWIN
+ /*
+ * If there is no file name, and the extension starts with '.', put a
+ * '_' before the dot, because just ".ext" may be invalid if it's on a
+***************
+*** 6427,6433 ****
+ use_tmp_file = TRUE;
+ }
+ #endif
+! #ifdef WIN3264
+ {
+ BY_HANDLE_FILE_INFORMATION info1, info2;
+
+--- 6427,6433 ----
+ use_tmp_file = TRUE;
+ }
+ #endif
+! #ifdef MSWIN
+ {
+ BY_HANDLE_FILE_INFORMATION info1, info2;
+
+***************
+*** 7189,7195 ****
+ /* A symbolic link to a directory itself is deleted, not the directory it
+ * points to. */
+ if (
+! # if defined(UNIX) || defined(WIN32)
+ mch_isrealdir(name)
+ # else
+ mch_isdir(name)
+--- 7189,7195 ----
+ /* A symbolic link to a directory itself is deleted, not the directory it
+ * points to. */
+ if (
+! # if defined(UNIX) || defined(MSWIN)
+ mch_isrealdir(name)
+ # else
+ mch_isdir(name)
+***************
+*** 7276,7282 ****
+ {
+ #ifdef USE_TMPNAM
+ char_u itmp[L_tmpnam]; /* use tmpnam() */
+! #elif defined(WIN3264)
+ WCHAR itmp[TEMPNAMELEN];
+ #else
+ char_u itmp[TEMPNAMELEN];
+--- 7276,7282 ----
+ {
+ #ifdef USE_TMPNAM
+ char_u itmp[L_tmpnam]; /* use tmpnam() */
+! #elif defined(MSWIN)
+ WCHAR itmp[TEMPNAMELEN];
+ #else
+ char_u itmp[TEMPNAMELEN];
+***************
+*** 7398,7404 ****
+
+ #else /* TEMPDIRNAMES */
+
+! # ifdef WIN3264
+ WCHAR wszTempFile[_MAX_PATH + 1];
+ WCHAR buf4[4];
+ char_u *retval;
+--- 7398,7404 ----
+
+ #else /* TEMPDIRNAMES */
+
+! # ifdef MSWIN
+ WCHAR wszTempFile[_MAX_PATH + 1];
+ WCHAR buf4[4];
+ char_u *retval;
+***************
+*** 7428,7434 ****
+ *p = '/';
+ return retval;
+
+! # else /* WIN3264 */
+
+ # ifdef USE_TMPNAM
+ char_u *p;
+--- 7428,7434 ----
+ *p = '/';
+ return retval;
+
+! # else // MSWIN
+
+ # ifdef USE_TMPNAM
+ char_u *p;
+***************
+*** 7466,7472 ****
+ # endif
+
+ return vim_strsave(itmp);
+! # endif /* WIN3264 */
+ #endif /* TEMPDIRNAMES */
+ }
+
+--- 7466,7472 ----
+ # endif
+
+ return vim_strsave(itmp);
+! # endif // MSWIN
+ #endif /* TEMPDIRNAMES */
+ }
+
+*** ../vim-8.1.0940/src/getchar.c 2019-02-16 15:09:21.213946217 +0100
+--- src/getchar.c 2019-02-17 17:29:18.548788886 +0100
+***************
+*** 1623,1629 ****
+ }
+ c = TO_SPECIAL(c2, c);
+
+! #if defined(FEAT_GUI_W32) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+ /* Handle K_TEAROFF here, the caller of vgetc() doesn't need to
+ * know that a menu was torn off */
+ if (c == K_TEAROFF)
+--- 1623,1629 ----
+ }
+ c = TO_SPECIAL(c2, c);
+
+! #if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+ /* Handle K_TEAROFF here, the caller of vgetc() doesn't need to
+ * know that a menu was torn off */
+ if (c == K_TEAROFF)
+***************
+*** 1679,1685 ****
+ 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;
+--- 1679,1685 ----
+ case K_KMULTIPLY: c = '*'; break;
+ case K_KENTER: c = CAR; break;
+ case K_KPOINT:
+! #ifdef MSWIN
+ // Can be either '.' or a ',',
+ // depending on the type of keypad.
+ c = MapVirtualKey(VK_DECIMAL, 2); break;
+***************
+*** 3107,3113 ****
+ if (p[0] == NUL || (p[0] == K_SPECIAL
+ /* timeout may generate K_CURSORHOLD */
+ && (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD)
+! #if defined(WIN3264) && !defined(FEAT_GUI)
+ /* Win32 console passes modifiers */
+ && (i < 2 || p[1] != KS_MODIFIER)
+ #endif
+--- 3107,3113 ----
+ if (p[0] == NUL || (p[0] == K_SPECIAL
+ /* timeout may generate K_CURSORHOLD */
+ && (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD)
+! #if defined(MSWIN) && !defined(FEAT_GUI)
+ /* Win32 console passes modifiers */
+ && (i < 2 || p[1] != KS_MODIFIER)
+ #endif
+*** ../vim-8.1.0940/src/glbl_ime.cpp 2019-01-24 17:18:37.599462306 +0100
+--- src/glbl_ime.cpp 2019-02-17 17:29:18.548788886 +0100
+***************
+*** 134,140 ****
+ if (pIApp == NULL || pIApp->OnDefWindowProc(hWnd, Msg,
+ wParam, lParam, &lResult) != S_OK)
+ {
+! #if defined(WIN3264)
+ if (wide_WindowProc)
+ lResult = DefWindowProcW(hWnd, Msg, wParam, lParam);
+ else
+--- 134,140 ----
+ if (pIApp == NULL || pIApp->OnDefWindowProc(hWnd, Msg,
+ wParam, lParam, &lResult) != S_OK)
+ {
+! #if defined(MSWIN)
+ if (wide_WindowProc)
+ lResult = DefWindowProcW(hWnd, Msg, wParam, lParam);
+ else
+*** ../vim-8.1.0940/src/globals.h 2019-02-16 15:09:21.217946198 +0100
+--- src/globals.h 2019-02-17 17:29:18.548788886 +0100
+***************
+*** 19,25 ****
+ */
+ EXTERN long Rows /* nr of rows in the screen */
+ #ifdef DO_INIT
+! # if defined(WIN3264)
+ = 25L
+ # else
+ = 24L
+--- 19,25 ----
+ */
+ EXTERN long Rows /* nr of rows in the screen */
+ #ifdef DO_INIT
+! # if defined(MSWIN)
+ = 25L
+ # else
+ = 24L
+***************
+*** 818,824 ****
+ EXTERN int enc_unicode INIT(= 0); /* 2: UCS-2 or UTF-16, 4: UCS-4 */
+ EXTERN int enc_utf8 INIT(= FALSE); /* UTF-8 encoded Unicode */
+ EXTERN int enc_latin1like INIT(= TRUE); /* 'encoding' is latin1 comp. */
+! #if defined(WIN3264) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+ /* Codepage nr of 'encoding'. Negative means it's not been set yet, zero
+ * means 'encoding' is not a valid codepage. */
+ EXTERN int enc_codepage INIT(= -1);
+--- 818,824 ----
+ EXTERN int enc_unicode INIT(= 0); /* 2: UCS-2 or UTF-16, 4: UCS-4 */
+ EXTERN int enc_utf8 INIT(= FALSE); /* UTF-8 encoded Unicode */
+ EXTERN int enc_latin1like INIT(= TRUE); /* 'encoding' is latin1 comp. */
+! #if defined(MSWIN) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+ /* Codepage nr of 'encoding'. Negative means it's not been set yet, zero
+ * means 'encoding' is not a valid codepage. */
+ EXTERN int enc_codepage INIT(= -1);
+***************
+*** 826,832 ****
+ #endif
+ EXTERN int has_mbyte INIT(= 0); /* any multi-byte encoding */
+
+! #if defined(WIN3264)
+ EXTERN int wide_WindowProc INIT(= FALSE); /* use wide WindowProc() */
+ #endif
+
+--- 826,832 ----
+ #endif
+ EXTERN int has_mbyte INIT(= 0); /* any multi-byte encoding */
+
+! #if defined(MSWIN)
+ EXTERN int wide_WindowProc INIT(= FALSE); /* use wide WindowProc() */
+ #endif
+
+***************
+*** 1296,1302 ****
+ EXTERN int echo_wid_arg INIT(= FALSE); /* --echo-wid argument */
+ #endif
+
+! #ifdef FEAT_GUI_W32
+ /*
+ * The value of the --windowid argument.
+ * For embedding gvim inside another application.
+--- 1296,1302 ----
+ EXTERN int echo_wid_arg INIT(= FALSE); /* --echo-wid argument */
+ #endif
+
+! #ifdef FEAT_GUI_MSWIN
+ /*
+ * The value of the --windowid argument.
+ * For embedding gvim inside another application.
+***************
+*** 1645,1651 ****
+ EXTERN int *eval_lavars_used INIT(= NULL);
+ #endif
+
+! #ifdef WIN3264
+ EXTERN int ctrl_break_was_pressed INIT(= FALSE);
+ #endif
+
+--- 1645,1651 ----
+ EXTERN int *eval_lavars_used INIT(= NULL);
+ #endif
+
+! #ifdef MSWIN
+ EXTERN int ctrl_break_was_pressed INIT(= FALSE);
+ #endif
+
+*** ../vim-8.1.0940/src/gui.c 2019-01-31 18:26:05.734803539 +0100
+--- src/gui.c 2019-02-17 17:29:18.548788886 +0100
+***************
+*** 749,755 ****
+ &general_beval_cb, NULL);
+ }
+ # else
+! # ifdef FEAT_GUI_W32
+ balloonEval = gui_mch_create_beval_area(NULL, NULL,
+ &general_beval_cb, NULL);
+ # endif
+--- 749,755 ----
+ &general_beval_cb, NULL);
+ }
+ # else
+! # ifdef FEAT_GUI_MSWIN
+ balloonEval = gui_mch_create_beval_area(NULL, NULL,
+ &general_beval_cb, NULL);
+ # endif
+***************
+*** 2432,2438 ****
+ int curr_wide = FALSE; /* use 'guifontwide' */
+ int prev_wide = FALSE;
+ int wide_changed;
+! # ifdef WIN3264
+ int sep_comp = FALSE; /* Don't separate composing chars. */
+ # else
+ int sep_comp = TRUE; /* Separate composing chars. */
+--- 2432,2438 ----
+ int curr_wide = FALSE; /* use 'guifontwide' */
+ int prev_wide = FALSE;
+ int wide_changed;
+! # ifdef MSWIN
+ int sep_comp = FALSE; /* Don't separate composing chars. */
+ # else
+ int sep_comp = TRUE; /* Separate composing chars. */
+***************
+*** 2568,2574 ****
+ /* Draw the sign on top of the spaces. */
+ gui_mch_drawsign(gui.row, col, gui.highlight_mask);
+ # if defined(FEAT_NETBEANS_INTG) && (defined(FEAT_GUI_X11) \
+! || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32))
+ if (multi_sign)
+ netbeans_draw_multisign_indicator(gui.row);
+ # endif
+--- 2568,2574 ----
+ /* Draw the sign on top of the spaces. */
+ gui_mch_drawsign(gui.row, col, gui.highlight_mask);
+ # if defined(FEAT_NETBEANS_INTG) && (defined(FEAT_GUI_X11) \
+! || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN))
+ if (multi_sign)
+ netbeans_draw_multisign_indicator(gui.row);
+ # endif
+***************
+*** 3561,3567 ****
+ fix_size = TRUE;
+ }
+ #endif
+! #if defined(FEAT_MENU) && !(defined(WIN3264) && !defined(FEAT_TEAROFF))
+ if (using_tearoff != prev_tearoff)
+ {
+ gui_mch_toggle_tearoffs(using_tearoff);
+--- 3561,3567 ----
+ fix_size = TRUE;
+ }
+ #endif
+! #if defined(FEAT_MENU) && !(defined(MSWIN) && !defined(FEAT_TEAROFF))
+ if (using_tearoff != prev_tearoff)
+ {
+ gui_mch_toggle_tearoffs(using_tearoff);
+***************
+*** 4125,4131 ****
+ /* Update the horizontal scrollbar */
+ gui_update_horiz_scrollbar(force);
+
+! #ifndef WIN3264
+ /* Return straight away if there is neither a left nor right scrollbar.
+ * On MS-Windows this is required anyway for scrollwheel messages. */
+ if (!gui.which_scrollbars[SBAR_LEFT] && !gui.which_scrollbars[SBAR_RIGHT])
+--- 4125,4131 ----
+ /* Update the horizontal scrollbar */
+ gui_update_horiz_scrollbar(force);
+
+! #ifndef MSWIN
+ /* Return straight away if there is neither a left nor right scrollbar.
+ * On MS-Windows this is required anyway for scrollwheel messages. */
+ if (!gui.which_scrollbars[SBAR_LEFT] && !gui.which_scrollbars[SBAR_RIGHT])
+***************
+*** 4879,4887 ****
+
+ /*
+ * Find window where the mouse pointer "x" / "y" coordinate is in.
+ */
+ static win_T *
+! xy2win(int x UNUSED, int y UNUSED)
+ {
+ int row;
+ int col;
+--- 4879,4888 ----
+
+ /*
+ * Find window where the mouse pointer "x" / "y" coordinate is in.
++ * As a side effect update the shape of the mouse pointer.
+ */
+ static win_T *
+! xy2win(int x, int y)
+ {
+ int row;
+ int col;
+***************
+*** 4951,4958 ****
+ ex_next(eap);
+ }
+
+! #if ((defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32) \
+! || defined(FEAT_GUI_PHOTON)) && defined(FEAT_TOOLBAR)) || defined(PROTO)
+ /*
+ * This is shared between Athena, Motif and GTK.
+ */
+--- 4952,4960 ----
+ ex_next(eap);
+ }
+
+! #if ((defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
+! || defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_PHOTON)) \
+! && defined(FEAT_TOOLBAR)) || defined(PROTO)
+ /*
+ * This is shared between Athena, Motif and GTK.
+ */
+*** ../vim-8.1.0940/src/gui.h 2019-01-24 17:18:37.599462306 +0100
+--- src/gui.h 2019-02-17 17:29:18.548788886 +0100
+***************
+*** 90,96 ****
+ * X_2_COL - Convert X pixel coord into character column.
+ * Y_2_ROW - Convert Y pixel coord into character row.
+ */
+! #ifdef FEAT_GUI_W32
+ # define TEXT_X(col) ((col) * gui.char_width)
+ # define TEXT_Y(row) ((row) * gui.char_height + gui.char_ascent)
+ # define FILL_X(col) ((col) * gui.char_width)
+--- 90,96 ----
+ * X_2_COL - Convert X pixel coord into character column.
+ * Y_2_ROW - Convert Y pixel coord into character row.
+ */
+! #ifdef FEAT_GUI_MSWIN
+ # define TEXT_X(col) ((col) * gui.char_width)
+ # define TEXT_Y(row) ((row) * gui.char_height + gui.char_ascent)
+ # define FILL_X(col) ((col) * gui.char_width)
+***************
+*** 406,412 ****
+ #endif /* FEAT_GUI_GTK */
+
+ #if defined(FEAT_GUI_TABLINE) \
+! && (defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF) \
+ || defined(FEAT_GUI_MAC))
+ int tabline_height;
+ #endif
+--- 406,412 ----
+ #endif /* FEAT_GUI_GTK */
+
+ #if defined(FEAT_GUI_TABLINE) \
+! && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
+ || defined(FEAT_GUI_MAC))
+ int tabline_height;
+ #endif
+*** ../vim-8.1.0940/src/gui_beval.c 2019-01-17 15:43:21.761878368 +0100
+--- src/gui_beval.c 2019-02-17 17:29:18.548788886 +0100
+***************
+*** 13,19 ****
+ #if defined(FEAT_BEVAL_GUI) || defined(PROTO)
+
+ /* on Win32 only get_beval_info() is required */
+! #if !defined(FEAT_GUI_W32) || defined(PROTO)
+
+ #ifdef FEAT_GUI_GTK
+ # if GTK_CHECK_VERSION(3,0,0)
+--- 13,19 ----
+ #if defined(FEAT_BEVAL_GUI) || defined(PROTO)
+
+ /* on Win32 only get_beval_info() is required */
+! #if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
+
+ #ifdef FEAT_GUI_GTK
+ # if GTK_CHECK_VERSION(3,0,0)
+***************
+*** 197,206 ****
+ return current_beval;
+ }
+ #endif
+! #endif /* !FEAT_GUI_W32 */
+
+ #if defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL) || defined(PROTO)
+! # if !defined(FEAT_GUI_W32) || defined(PROTO)
+
+ /*
+ * Show a balloon with "mesg".
+--- 197,206 ----
+ return current_beval;
+ }
+ #endif
+! #endif /* !FEAT_GUI_MSWIN */
+
+ #if defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL) || defined(PROTO)
+! # if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
+
+ /*
+ * Show a balloon with "mesg".
+***************
+*** 214,223 ****
+ else
+ undrawBalloon(beval);
+ }
+! # endif /* !FEAT_GUI_W32 */
+ #endif /* FEAT_NETBEANS_INTG || PROTO */
+
+! #if !defined(FEAT_GUI_W32) || defined(PROTO)
+ #if defined(FEAT_BEVAL_TIP) || defined(PROTO)
+ /*
+ * Hide the given balloon.
+--- 214,223 ----
+ else
+ undrawBalloon(beval);
+ }
+! # endif /* !FEAT_GUI_MSWIN */
+ #endif /* FEAT_NETBEANS_INTG || PROTO */
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
+ #if defined(FEAT_BEVAL_TIP) || defined(PROTO)
+ /*
+ * Hide the given balloon.
+***************
+*** 1220,1225 ****
+ }
+
+ #endif /* !FEAT_GUI_GTK */
+! #endif /* !FEAT_GUI_W32 */
+
+ #endif /* FEAT_BEVAL_GUI */
+--- 1220,1225 ----
+ }
+
+ #endif /* !FEAT_GUI_GTK */
+! #endif /* !FEAT_GUI_MSWIN */
+
+ #endif /* FEAT_BEVAL_GUI */
+*** ../vim-8.1.0940/src/gui_gtk.c 2018-11-16 16:21:01.637310049 +0100
+--- src/gui_gtk.c 2019-02-17 17:29:18.548788886 +0100
+***************
+*** 76,82 ****
+ # include <gdk/gdkkeysyms.h>
+ # endif
+ # include <gdk/gdk.h>
+! # ifdef WIN3264
+ # include <gdk/gdkwin32.h>
+ # else
+ # include <gdk/gdkx.h>
+--- 76,82 ----
+ # include <gdk/gdkkeysyms.h>
+ # endif
+ # include <gdk/gdk.h>
+! # ifdef MSWIN
+ # include <gdk/gdkwin32.h>
+ # else
+ # include <gdk/gdkx.h>
+*** ../vim-8.1.0940/src/gui_gtk_f.c 2018-09-18 22:29:59.888041388 +0200
+--- src/gui_gtk_f.c 2019-02-17 17:29:18.548788886 +0100
+***************
+*** 32,38 ****
+ #if !GTK_CHECK_VERSION(3,0,0)
+ # include <gtk/gtksignal.h>
+ #endif
+! #ifdef WIN3264
+ # include <gdk/gdkwin32.h>
+ #else
+ # include <gdk/gdkx.h>
+--- 32,38 ----
+ #if !GTK_CHECK_VERSION(3,0,0)
+ # include <gtk/gtksignal.h>
+ #endif
+! #ifdef MSWIN
+ # include <gdk/gdkwin32.h>
+ #else
+ # include <gdk/gdkx.h>
+*** ../vim-8.1.0940/src/gui_gtk_x11.c 2019-02-03 15:28:25.052353153 +0100
+--- src/gui_gtk_x11.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 86,92 ****
+ # include <gdk/gdkkeysyms.h>
+ # endif
+ # include <gdk/gdk.h>
+! # ifdef WIN3264
+ # include <gdk/gdkwin32.h>
+ # else
+ # include <gdk/gdkx.h>
+--- 86,92 ----
+ # include <gdk/gdkkeysyms.h>
+ # endif
+ # include <gdk/gdk.h>
+! # ifdef MSWIN
+ # include <gdk/gdkwin32.h>
+ # else
+ # include <gdk/gdkx.h>
+*** ../vim-8.1.0940/src/if_cscope.c 2019-01-19 17:43:03.409449198 +0100
+--- src/if_cscope.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 548,554 ****
+ goto add_err;
+
+ while (fname[strlen(fname)-1] == '/'
+! #ifdef WIN32
+ || fname[strlen(fname)-1] == '\\'
+ #endif
+ )
+--- 548,554 ----
+ goto add_err;
+
+ while (fname[strlen(fname)-1] == '/'
+! #ifdef MSWIN
+ || fname[strlen(fname)-1] == '\\'
+ #endif
+ )
+***************
+*** 790,796 ****
+ #endif
+ int len;
+ char *prog, *cmd, *ppath = NULL;
+! #ifdef WIN32
+ int fd;
+ SECURITY_ATTRIBUTES sa;
+ PROCESS_INFORMATION pi;
+--- 790,796 ----
+ #endif
+ int len;
+ char *prog, *cmd, *ppath = NULL;
+! #ifdef MSWIN
+ int fd;
+ SECURITY_ATTRIBUTES sa;
+ PROCESS_INFORMATION pi;
+***************
+*** 844,850 ****
+ (void)close(to_cs[1]);
+ (void)close(from_cs[0]);
+ #else
+! /* WIN32 */
+ /* Create pipes to communicate with cscope */
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+ sa.bInheritHandle = TRUE;
+--- 844,850 ----
+ (void)close(to_cs[1]);
+ (void)close(from_cs[0]);
+ #else
+! /* MSWIN */
+ /* Create pipes to communicate with cscope */
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+ sa.bInheritHandle = TRUE;
+***************
+*** 874,880 ****
+ #ifdef UNIX
+ return CSCOPE_FAILURE;
+ #else
+! /* WIN32 */
+ goto err_closing;
+ #endif
+ }
+--- 874,880 ----
+ #ifdef UNIX
+ return CSCOPE_FAILURE;
+ #else
+! /* MSWIN */
+ goto err_closing;
+ #endif
+ }
+***************
+*** 891,897 ****
+ #ifdef UNIX
+ return CSCOPE_FAILURE;
+ #else
+! /* WIN32 */
+ goto err_closing;
+ #endif
+ }
+--- 891,897 ----
+ #ifdef UNIX
+ return CSCOPE_FAILURE;
+ #else
+! /* MSWIN */
+ goto err_closing;
+ #endif
+ }
+***************
+*** 910,916 ****
+ #ifdef UNIX
+ return CSCOPE_FAILURE;
+ #else
+! /* WIN32 */
+ goto err_closing;
+ #endif
+ }
+--- 910,916 ----
+ #ifdef UNIX
+ return CSCOPE_FAILURE;
+ #else
+! /* MSWIN */
+ goto err_closing;
+ #endif
+ }
+***************
+*** 919,925 ****
+ #if defined(UNIX)
+ (void)sprintf(cmd, "exec %s -dl -f %s", prog, csinfo[i].fname);
+ #else
+! /* WIN32 */
+ (void)sprintf(cmd, "%s -dl -f %s", prog, csinfo[i].fname);
+ #endif
+ if (csinfo[i].ppath != NULL)
+--- 919,925 ----
+ #if defined(UNIX)
+ (void)sprintf(cmd, "exec %s -dl -f %s", prog, csinfo[i].fname);
+ #else
+! /* MSWIN */
+ (void)sprintf(cmd, "%s -dl -f %s", prog, csinfo[i].fname);
+ #endif
+ if (csinfo[i].ppath != NULL)
+***************
+*** 971,977 ****
+ }
+
+ #else
+! /* WIN32 */
+ /* Create a new process to run cscope and use pipes to talk with it */
+ GetStartupInfo(&si);
+ si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
+--- 971,977 ----
+ }
+
+ #else
+! /* MSWIN */
+ /* Create a new process to run cscope and use pipes to talk with it */
+ GetStartupInfo(&si);
+ si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
+***************
+*** 1330,1336 ****
+ csinfo[i].pid = 0;
+ csinfo[i].fr_fp = NULL;
+ csinfo[i].to_fp = NULL;
+! #if defined(WIN32)
+ csinfo[i].hProc = NULL;
+ #endif
+ }
+--- 1330,1336 ----
+ csinfo[i].pid = 0;
+ csinfo[i].fr_fp = NULL;
+ csinfo[i].to_fp = NULL;
+! #if defined(MSWIN)
+ csinfo[i].hProc = NULL;
+ #endif
+ }
+***************
+*** 1940,1952 ****
+ s = path + strlen(path) - 1;
+ for (i = 0; i < p_cspc; ++i)
+ while (s > path && *--s != '/'
+! #ifdef WIN32
+ && *--s != '\\'
+ #endif
+ )
+ ;
+ if ((s > path && *s == '/')
+! #ifdef WIN32
+ || (s > path && *s == '\\')
+ #endif
+ )
+--- 1940,1952 ----
+ s = path + strlen(path) - 1;
+ for (i = 0; i < p_cspc; ++i)
+ while (s > path && *--s != '/'
+! #ifdef MSWIN
+ && *--s != '\\'
+ #endif
+ )
+ ;
+ if ((s > path && *s == '/')
+! #ifdef MSWIN
+ || (s > path && *s == '\\')
+ #endif
+ )
+***************
+*** 2433,2439 ****
+ if (csinfo[i].ppath != NULL
+ && (strncmp(name, csinfo[i].ppath, strlen(csinfo[i].ppath)) != 0)
+ && (name[0] != '/')
+! #ifdef WIN32
+ && name[0] != '\\' && name[1] != ':'
+ #endif
+ )
+--- 2433,2439 ----
+ if (csinfo[i].ppath != NULL
+ && (strncmp(name, csinfo[i].ppath, strlen(csinfo[i].ppath)) != 0)
+ && (name[0] != '/')
+! #ifdef MSWIN
+ && name[0] != '\\' && name[1] != ':'
+ #endif
+ )
+*** ../vim-8.1.0940/src/if_cscope.h 2016-08-29 22:42:20.000000000 +0200
+--- src/if_cscope.h 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 11,17 ****
+
+ #if defined(FEAT_CSCOPE) || defined(PROTO)
+
+! #if defined (WIN32)
+ # ifndef WIN32_LEAN_AND_MEAN
+ # define WIN32_LEAN_AND_MEAN
+ # endif
+--- 11,17 ----
+
+ #if defined(FEAT_CSCOPE) || defined(PROTO)
+
+! #if defined (MSWIN)
+ # ifndef WIN32_LEAN_AND_MEAN
+ # define WIN32_LEAN_AND_MEAN
+ # endif
+***************
+*** 45,51 ****
+ dev_t st_dev; /* ID of dev containing cscope db */
+ ino_t st_ino; /* inode number of cscope db */
+ #else
+! # if defined(WIN32)
+ DWORD pid; /* PID of the connected cscope process. */
+ HANDLE hProc; /* cscope process handle */
+ DWORD nVolume; /* Volume serial number, instead of st_dev */
+--- 45,51 ----
+ dev_t st_dev; /* ID of dev containing cscope db */
+ ino_t st_ino; /* inode number of cscope db */
+ #else
+! # if defined(MSWIN)
+ DWORD pid; /* PID of the connected cscope process. */
+ HANDLE hProc; /* cscope process handle */
+ DWORD nVolume; /* Volume serial number, instead of st_dev */
+*** ../vim-8.1.0940/src/if_lua.c 2019-01-13 23:38:33.395773275 +0100
+--- src/if_lua.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 80,86 ****
+
+ #ifdef DYNAMIC_LUA
+
+! #ifndef WIN3264
+ # include <dlfcn.h>
+ # define HANDLE void*
+ # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
+--- 80,86 ----
+
+ #ifdef DYNAMIC_LUA
+
+! #ifndef MSWIN
+ # include <dlfcn.h>
+ # define HANDLE void*
+ # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
+*** ../vim-8.1.0940/src/if_mzsch.c 2019-01-19 17:43:03.417449145 +0100
+--- src/if_mzsch.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 47,53 ****
+ * racket-6.3. See
+ * http://docs.racket-lang.org/inside/im_memoryalloc.html?q=scheme_register_tls_space
+ */
+! #if MZSCHEME_VERSION_MAJOR >= 500 && defined(WIN32) \
+ && defined(USE_THREAD_LOCAL) \
+ && (!defined(_WIN64) || MZSCHEME_VERSION_MAJOR >= 603)
+ # define HAVE_TLS_SPACE 1
+--- 47,53 ----
+ * racket-6.3. See
+ * http://docs.racket-lang.org/inside/im_memoryalloc.html?q=scheme_register_tls_space
+ */
+! #if MZSCHEME_VERSION_MAJOR >= 500 && defined(MSWIN) \
+ && defined(USE_THREAD_LOCAL) \
+ && (!defined(_WIN64) || MZSCHEME_VERSION_MAJOR >= 603)
+ # define HAVE_TLS_SPACE 1
+***************
+*** 807,813 ****
+ /* MzScheme threads scheduling stuff */
+ static int mz_threads_allow = 0;
+
+! #if defined(FEAT_GUI_W32)
+ static void CALLBACK timer_proc(HWND, UINT, UINT_PTR, DWORD);
+ static UINT timer_id = 0;
+ #elif defined(FEAT_GUI_GTK)
+--- 807,813 ----
+ /* MzScheme threads scheduling stuff */
+ static int mz_threads_allow = 0;
+
+! #if defined(FEAT_GUI_MSWIN)
+ static void CALLBACK timer_proc(HWND, UINT, UINT_PTR, DWORD);
+ static UINT timer_id = 0;
+ #elif defined(FEAT_GUI_GTK)
+***************
+*** 822,828 ****
+ static EventLoopTimerUPP timerUPP;
+ #endif
+
+! #ifndef FEAT_GUI_W32 /* Win32 console and Unix */
+ void
+ mzvim_check_threads(void)
+ {
+--- 822,828 ----
+ static EventLoopTimerUPP timerUPP;
+ #endif
+
+! #ifndef FEAT_GUI_MSWIN /* Win32 console and Unix */
+ void
+ mzvim_check_threads(void)
+ {
+***************
+*** 847,853 ****
+ static void remove_timer(void);
+
+ /* timers are presented in GUI only */
+! # if defined(FEAT_GUI_W32)
+ static void CALLBACK
+ timer_proc(HWND hwnd UNUSED, UINT uMsg UNUSED, UINT_PTR idEvent UNUSED, DWORD dwTime UNUSED)
+ # elif defined(FEAT_GUI_GTK)
+--- 847,853 ----
+ static void remove_timer(void);
+
+ /* timers are presented in GUI only */
+! # if defined(FEAT_GUI_MSWIN)
+ static void CALLBACK
+ timer_proc(HWND hwnd UNUSED, UINT uMsg UNUSED, UINT_PTR idEvent UNUSED, DWORD dwTime UNUSED)
+ # elif defined(FEAT_GUI_GTK)
+***************
+*** 875,881 ****
+ static void
+ setup_timer(void)
+ {
+! # if defined(FEAT_GUI_W32)
+ timer_id = SetTimer(NULL, 0, p_mzq, timer_proc);
+ # elif defined(FEAT_GUI_GTK)
+ timer_id = g_timeout_add((guint)p_mzq, (GSourceFunc)timer_proc, NULL);
+--- 875,881 ----
+ static void
+ setup_timer(void)
+ {
+! # if defined(FEAT_GUI_MSWIN)
+ timer_id = SetTimer(NULL, 0, p_mzq, timer_proc);
+ # elif defined(FEAT_GUI_GTK)
+ timer_id = g_timeout_add((guint)p_mzq, (GSourceFunc)timer_proc, NULL);
+***************
+*** 891,897 ****
+ static void
+ remove_timer(void)
+ {
+! # if defined(FEAT_GUI_W32)
+ KillTimer(NULL, timer_id);
+ # elif defined(FEAT_GUI_GTK)
+ g_source_remove(timer_id);
+--- 891,897 ----
+ static void
+ remove_timer(void)
+ {
+! # if defined(FEAT_GUI_MSWIN)
+ KillTimer(NULL, timer_id);
+ # elif defined(FEAT_GUI_GTK)
+ g_source_remove(timer_id);
+*** ../vim-8.1.0940/src/if_ole.cpp 2018-07-11 22:57:47.947564638 +0200
+--- src/if_ole.cpp 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 6,12 ****
+ * Do ":help credits" in Vim to see a list of people who contributed.
+ */
+
+! #if defined(FEAT_OLE) && defined(FEAT_GUI_W32)
+ /*
+ * OLE server implementation.
+ *
+--- 6,12 ----
+ * Do ":help credits" in Vim to see a list of people who contributed.
+ */
+
+! #if defined(FEAT_OLE) && defined(WIN32) && defined(FEAT_GUI)
+ /*
+ * OLE server implementation.
+ *
+*** ../vim-8.1.0940/src/if_perl.xs 2019-02-08 14:33:54.818762019 +0100
+--- src/if_perl.xs 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 100,106 ****
+
+ // 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
+--- 100,106 ----
+
+ // Work around for ActivePerl 5.20.3+: Avoid generating (g)vim.lib.
+ #if defined(ACTIVEPERL_VERSION) && (ACTIVEPERL_VERSION >= 2003) \
+! && defined(MSWIN) && defined(USE_DYNAMIC_LOADING)
+ # undef XS_EXTERNAL
+ # define XS_EXTERNAL(name) XSPROTO(name)
+ #endif
+***************
+*** 154,160 ****
+ #if defined(DYNAMIC_PERL) || defined(PROTO)
+
+ # ifndef DYNAMIC_PERL /* just generating prototypes */
+! # ifdef WIN3264
+ typedef int HANDLE;
+ # endif
+ typedef int XSINIT_t;
+--- 154,160 ----
+ #if defined(DYNAMIC_PERL) || defined(PROTO)
+
+ # ifndef DYNAMIC_PERL /* just generating prototypes */
+! # ifdef MSWIN
+ typedef int HANDLE;
+ # endif
+ typedef int XSINIT_t;
+***************
+*** 164,170 ****
+ typedef int perl_key;
+ # endif
+
+! # ifndef WIN3264
+ # include <dlfcn.h>
+ # define HANDLE void*
+ # define PERL_PROC void*
+--- 164,170 ----
+ typedef int perl_key;
+ # endif
+
+! # ifndef MSWIN
+ # include <dlfcn.h>
+ # define HANDLE void*
+ # define PERL_PROC void*
+*** ../vim-8.1.0940/src/if_python.c 2019-02-01 22:10:12.996410746 +0100
+--- src/if_python.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 35,41 ****
+ # undef _POSIX_THREADS
+ #endif
+
+! #if defined(_WIN32) && defined(HAVE_FCNTL_H)
+ # undef HAVE_FCNTL_H
+ #endif
+
+--- 35,41 ----
+ # undef _POSIX_THREADS
+ #endif
+
+! #if defined(MSWIN) && defined(HAVE_FCNTL_H)
+ # undef HAVE_FCNTL_H
+ #endif
+
+***************
+*** 127,133 ****
+ # define HINSTANCE long_u /* for generating prototypes */
+ # endif
+
+! # ifndef WIN3264
+ # include <dlfcn.h>
+ # define FARPROC void*
+ # define HINSTANCE void*
+--- 127,133 ----
+ # define HINSTANCE long_u /* for generating prototypes */
+ # endif
+
+! # ifndef MSWIN
+ # include <dlfcn.h>
+ # define FARPROC void*
+ # define HINSTANCE void*
+*** ../vim-8.1.0940/src/if_python3.c 2019-01-13 23:38:33.395773275 +0100
+--- src/if_python3.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 34,40 ****
+
+ #include <limits.h>
+
+! #if defined(_WIN32) && defined(HAVE_FCNTL_H)
+ # undef HAVE_FCNTL_H
+ #endif
+
+--- 34,40 ----
+
+ #include <limits.h>
+
+! #if defined(MSWIN) && defined(HAVE_FCNTL_H)
+ # undef HAVE_FCNTL_H
+ #endif
+
+***************
+*** 112,118 ****
+
+ #if defined(DYNAMIC_PYTHON3) || defined(PROTO)
+
+! # ifndef WIN3264
+ # include <dlfcn.h>
+ # define FARPROC void*
+ # define HINSTANCE void*
+--- 112,118 ----
+
+ #if defined(DYNAMIC_PYTHON3) || defined(PROTO)
+
+! # ifndef MSWIN
+ # include <dlfcn.h>
+ # define FARPROC void*
+ # define HINSTANCE void*
+*** ../vim-8.1.0940/src/if_ruby.c 2019-02-03 15:18:31.480095521 +0100
+--- src/if_ruby.c 2019-02-17 17:33:56.639221336 +0100
+***************
+*** 64,70 ****
+ # define RUBY_EXPORT
+ # endif
+
+! #if !(defined(WIN32) || defined(_WIN64))
+ # include <dlfcn.h>
+ # define HINSTANCE void*
+ # define RUBY_PROC void*
+--- 64,70 ----
+ # define RUBY_EXPORT
+ # endif
+
+! #if !defined(MSWIN)
+ # include <dlfcn.h>
+ # define HINSTANCE void*
+ # define RUBY_PROC void*
+***************
+*** 331,337 ****
+ # endif
+ # define ruby_init dll_ruby_init
+ # define ruby_init_loadpath dll_ruby_init_loadpath
+! # ifdef WIN3264
+ # ifdef RUBY19_OR_LATER
+ # define ruby_sysinit dll_ruby_sysinit
+ # else
+--- 331,337 ----
+ # endif
+ # define ruby_init dll_ruby_init
+ # define ruby_init_loadpath dll_ruby_init_loadpath
+! # ifdef MSWIN
+ # ifdef RUBY19_OR_LATER
+ # define ruby_sysinit dll_ruby_sysinit
+ # else
+***************
+*** 447,453 ****
+ # endif
+ static void (*dll_ruby_init) (void);
+ static void (*dll_ruby_init_loadpath) (void);
+! # ifdef WIN3264
+ # ifdef RUBY19_OR_LATER
+ static void (*dll_ruby_sysinit) (int*, char***);
+ # else
+--- 447,453 ----
+ # endif
+ static void (*dll_ruby_init) (void);
+ static void (*dll_ruby_init_loadpath) (void);
+! # ifdef MSWIN
+ # ifdef RUBY19_OR_LATER
+ static void (*dll_ruby_sysinit) (int*, char***);
+ # else
+***************
+*** 666,672 ****
+ # endif
+ {"ruby_init", (RUBY_PROC*)&dll_ruby_init},
+ {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
+! # ifdef WIN3264
+ # ifdef RUBY19_OR_LATER
+ {"ruby_sysinit", (RUBY_PROC*)&dll_ruby_sysinit},
+ # else
+--- 666,672 ----
+ # endif
+ {"ruby_init", (RUBY_PROC*)&dll_ruby_init},
+ {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
+! # ifdef MSWIN
+ # ifdef RUBY19_OR_LATER
+ {"ruby_sysinit", (RUBY_PROC*)&dll_ruby_sysinit},
+ # else
+***************
+*** 949,955 ****
+ if (ruby_enabled(TRUE))
+ {
+ #endif
+! #ifdef _WIN32
+ /* suggested by Ariya Mizutani */
+ int argc = 1;
+ char *argv[] = {"gvim.exe"};
+--- 949,955 ----
+ if (ruby_enabled(TRUE))
+ {
+ #endif
+! #ifdef MSWIN
+ /* suggested by Ariya Mizutani */
+ int argc = 1;
+ char *argv[] = {"gvim.exe"};
+*** ../vim-8.1.0940/src/if_tcl.c 2019-01-19 17:43:03.417449145 +0100
+--- src/if_tcl.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 160,166 ****
+ typedef int HANDLE;
+ # endif
+
+! # ifndef WIN3264
+ # include <dlfcn.h>
+ # define HANDLE void*
+ # define TCL_PROC void*
+--- 160,166 ----
+ typedef int HANDLE;
+ # endif
+
+! # ifndef MSWIN
+ # include <dlfcn.h>
+ # define HANDLE void*
+ # define TCL_PROC void*
+***************
+*** 1741,1751 ****
+ #endif
+
+ Tcl_SetChannelOption(interp, ch1, "-buffering", "line");
+! #ifdef WIN3264
+ Tcl_SetChannelOption(interp, ch1, "-translation", "lf");
+ #endif
+ Tcl_SetChannelOption(interp, ch2, "-buffering", "line");
+! #ifdef WIN3264
+ Tcl_SetChannelOption(interp, ch2, "-translation", "lf");
+ #endif
+
+--- 1741,1751 ----
+ #endif
+
+ Tcl_SetChannelOption(interp, ch1, "-buffering", "line");
+! #ifdef MSWIN
+ Tcl_SetChannelOption(interp, ch1, "-translation", "lf");
+ #endif
+ Tcl_SetChannelOption(interp, ch2, "-buffering", "line");
+! #ifdef MSWIN
+ Tcl_SetChannelOption(interp, ch2, "-translation", "lf");
+ #endif
+
+*** ../vim-8.1.0940/src/macros.h 2019-01-26 17:28:22.224599141 +0100
+--- src/macros.h 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 160,170 ****
+ # define mch_stat(n, p) stat(vms_fixfilename(n), (p))
+ # define mch_rmdir(n) rmdir(vms_fixfilename(n))
+ #else
+! # ifndef WIN32
+ # 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
+--- 160,170 ----
+ # define mch_stat(n, p) stat(vms_fixfilename(n), (p))
+ # define mch_rmdir(n) rmdir(vms_fixfilename(n))
+ #else
+! # ifndef MSWIN
+ # 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
+***************
+*** 194,200 ****
+ #if defined(UNIX) || defined(VMS) /* open in rw------- mode */
+ # define mch_open_rw(n, f) mch_open((n), (f), (mode_t)0600)
+ #else
+! # if defined(MSWIN) /* open read/write */
+ # define mch_open_rw(n, f) mch_open((n), (f), S_IREAD | S_IWRITE)
+ # else
+ # define mch_open_rw(n, f) mch_open((n), (f), 0)
+--- 194,200 ----
+ #if defined(UNIX) || defined(VMS) /* open in rw------- mode */
+ # define mch_open_rw(n, f) mch_open((n), (f), (mode_t)0600)
+ #else
+! # if defined(MSWIN) // open read/write
+ # define mch_open_rw(n, f) mch_open((n), (f), S_IREAD | S_IWRITE)
+ # else
+ # define mch_open_rw(n, f) mch_open((n), (f), 0)
+***************
+*** 269,275 ****
+ # include <math.h>
+ # endif
+ # ifdef USING_FLOAT_STUFF
+! # if defined(WIN32)
+ # ifndef isnan
+ # define isnan(x) _isnan(x)
+ static __inline int isinf(double x) { return !_finite(x) && !_isnan(x); }
+--- 269,275 ----
+ # include <math.h>
+ # endif
+ # ifdef USING_FLOAT_STUFF
+! # ifdef MSWIN
+ # ifndef isnan
+ # define isnan(x) _isnan(x)
+ static __inline int isinf(double x) { return !_finite(x) && !_isnan(x); }
+*** ../vim-8.1.0940/src/main.c 2019-02-16 15:09:21.209946237 +0100
+--- src/main.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 11,17 ****
+ #include "vim.h"
+
+ #ifdef __CYGWIN__
+! # ifndef WIN32
+ # include <cygwin/version.h>
+ # include <sys/cygwin.h> /* for cygwin_conv_to_posix_path() and/or
+ * cygwin_conv_path() */
+--- 11,17 ----
+ #include "vim.h"
+
+ #ifdef __CYGWIN__
+! # ifndef MSWIN
+ # include <cygwin/version.h>
+ # include <sys/cygwin.h> /* for cygwin_conv_to_posix_path() and/or
+ * cygwin_conv_path() */
+***************
+*** 19,25 ****
+ # include <limits.h>
+ #endif
+
+! #if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ # include "iscygpty.h"
+ #endif
+
+--- 19,25 ----
+ # include <limits.h>
+ #endif
+
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ # include "iscygpty.h"
+ #endif
+
+***************
+*** 119,125 ****
+ */
+ mch_early_init();
+
+! #if defined(WIN32)
+ /*
+ * MinGW expands command line arguments, which confuses our code to
+ * convert when 'encoding' changes. Get the unexpanded arguments.
+--- 119,125 ----
+ */
+ mch_early_init();
+
+! #ifdef MSWIN
+ /*
+ * MinGW expands command line arguments, which confuses our code to
+ * convert when 'encoding' changes. Get the unexpanded arguments.
+***************
+*** 250,256 ****
+ params.fname = alist_name(&GARGLIST[0]);
+ }
+
+! #if defined(WIN32)
+ {
+ extern void set_alist_count(void);
+
+--- 250,256 ----
+ params.fname = alist_name(&GARGLIST[0]);
+ }
+
+! #ifdef MSWIN
+ {
+ extern void set_alist_count(void);
+
+***************
+*** 854,860 ****
+ }
+ #endif
+
+! #if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ mch_set_winsize_now(); /* Allow winsize changes from now on */
+ #endif
+
+--- 854,860 ----
+ }
+ #endif
+
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ mch_set_winsize_now(); /* Allow winsize changes from now on */
+ #endif
+
+***************
+*** 880,886 ****
+ {
+ # ifdef FEAT_GUI
+ # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \
+! && !defined(FEAT_GUI_W32)
+ if (gui.in_use)
+ {
+ mch_errmsg(_("netbeans is not supported with this GUI\n"));
+--- 880,886 ----
+ {
+ # ifdef FEAT_GUI
+ # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \
+! && !defined(FEAT_GUI_MSWIN)
+ if (gui.in_use)
+ {
+ mch_errmsg(_("netbeans is not supported with this GUI\n"));
+***************
+*** 1534,1540 ****
+ if (garbage_collect_at_exit)
+ garbage_collect(FALSE);
+ #endif
+! #if defined(WIN32)
+ free_cmd_argsW();
+ #endif
+
+--- 1534,1540 ----
+ if (garbage_collect_at_exit)
+ garbage_collect(FALSE);
+ #endif
+! #ifdef MSWIN
+ free_cmd_argsW();
+ #endif
+
+***************
+*** 1559,1565 ****
+ setlocale(LC_NUMERIC, "C");
+ # endif
+
+! # ifdef WIN32
+ /* Apparently MS-Windows printf() may cause a crash when we give it 8-bit
+ * text while it's expecting text in the current locale. This call avoids
+ * that. */
+--- 1559,1565 ----
+ setlocale(LC_NUMERIC, "C");
+ # endif
+
+! # ifdef MSWIN
+ /* Apparently MS-Windows printf() may cause a crash when we give it 8-bit
+ * text while it's expecting text in the current locale. This call avoids
+ * that. */
+***************
+*** 1642,1649 ****
+ }
+ # endif
+
+! # if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)
+! # ifdef FEAT_GUI_W32
+ else if (STRICMP(argv[i], "--windowid") == 0)
+ # else
+ else if (STRICMP(argv[i], "--socketid") == 0)
+--- 1642,1649 ----
+ }
+ # endif
+
+! # if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
+! # ifdef FEAT_GUI_MSWIN
+ else if (STRICMP(argv[i], "--windowid") == 0)
+ # else
+ else if (STRICMP(argv[i], "--socketid") == 0)
+***************
+*** 1661,1667 ****
+ if (count != 1)
+ mainerr(ME_INVALID_ARG, (char_u *)argv[i]);
+ else
+! # ifdef FEAT_GUI_W32
+ win_socket_id = id;
+ # else
+ gtk_socket_id = id;
+--- 1661,1667 ----
+ if (count != 1)
+ mainerr(ME_INVALID_ARG, (char_u *)argv[i]);
+ else
+! # ifdef FEAT_GUI_MSWIN
+ win_socket_id = id;
+ # else
+ gtk_socket_id = id;
+***************
+*** 1942,1948 ****
+ }
+ }
+ #endif
+! #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)
+ # ifdef FEAT_GUI_GTK
+ else if (STRNICMP(argv[0] + argv_idx, "socketid", 8) == 0)
+ # else
+--- 1942,1948 ----
+ }
+ }
+ #endif
+! #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
+ # ifdef FEAT_GUI_GTK
+ else if (STRNICMP(argv[0] + argv_idx, "socketid", 8) == 0)
+ # else
+***************
+*** 2237,2243 ****
+ case 'u': /* "-u {vimrc}" vim inits file */
+ case 'U': /* "-U {gvimrc}" gvim inits file */
+ case 'W': /* "-W {scriptout}" overwrite */
+! #ifdef FEAT_GUI_W32
+ case 'P': /* "-P {parent title}" MDI parent */
+ #endif
+ want_argument = TRUE;
+--- 2237,2243 ----
+ case 'u': /* "-u {vimrc}" vim inits file */
+ case 'U': /* "-U {gvimrc}" gvim inits file */
+ case 'W': /* "-W {scriptout}" overwrite */
+! #ifdef FEAT_GUI_MSWIN
+ case 'P': /* "-P {parent title}" MDI parent */
+ #endif
+ want_argument = TRUE;
+***************
+*** 2399,2405 ****
+ }
+ break;
+
+! #ifdef FEAT_GUI_W32
+ case 'P': /* "-P {parent title}" MDI parent */
+ gui_mch_set_parent(argv[0]);
+ break;
+--- 2399,2405 ----
+ }
+ break;
+
+! #ifdef FEAT_GUI_MSWIN
+ case 'P': /* "-P {parent title}" MDI parent */
+ gui_mch_set_parent(argv[0]);
+ break;
+***************
+*** 2445,2451 ****
+ }
+ }
+ #endif
+! #if defined(__CYGWIN32__) && !defined(WIN32)
+ /*
+ * If vim is invoked by non-Cygwin tools, convert away any
+ * DOS paths, so things like .swp files are created correctly.
+--- 2445,2451 ----
+ }
+ }
+ #endif
+! #if defined(__CYGWIN32__) && !defined(MSWIN)
+ /*
+ * If vim is invoked by non-Cygwin tools, convert away any
+ * DOS paths, so things like .swp files are created correctly.
+***************
+*** 2481,2487 ****
+ #endif
+ );
+
+! #if defined(WIN32)
+ {
+ /* Remember this argument has been added to the argument list.
+ * Needed when 'encoding' is changed. */
+--- 2481,2487 ----
+ #endif
+ );
+
+! #ifdef MSWIN
+ {
+ /* Remember this argument has been added to the argument list.
+ * Needed when 'encoding' is changed. */
+***************
+*** 2561,2567 ****
+ exit(1);
+ }
+ #endif
+! #if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ if (is_cygpty_used())
+ {
+ # if defined(HAVE_BIND_TEXTDOMAIN_CODESET) \
+--- 2561,2567 ----
+ exit(1);
+ }
+ #endif
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ if (is_cygpty_used())
+ {
+ # if defined(HAVE_BIND_TEXTDOMAIN_CODESET) \
+***************
+*** 3423,3429 ****
+ main_msg(_("--socketid <xid>\tOpen Vim inside another GTK widget"));
+ main_msg(_("--echo-wid\t\tMake gvim echo the Window ID on stdout"));
+ #endif
+! #ifdef FEAT_GUI_W32
+ main_msg(_("-P <parent title>\tOpen Vim inside parent application"));
+ main_msg(_("--windowid <HWND>\tOpen Vim inside another win32 widget"));
+ #endif
+--- 3423,3429 ----
+ main_msg(_("--socketid <xid>\tOpen Vim inside another GTK widget"));
+ main_msg(_("--echo-wid\t\tMake gvim echo the Window ID on stdout"));
+ #endif
+! #ifdef FEAT_GUI_MSWIN
+ main_msg(_("-P <parent title>\tOpen Vim inside parent application"));
+ main_msg(_("--windowid <HWND>\tOpen Vim inside another win32 widget"));
+ #endif
+***************
+*** 3460,3466 ****
+ #if defined(STARTUPTIME) || defined(PROTO)
+ static struct timeval prev_timeval;
+
+! # ifdef WIN3264
+ /*
+ * Windows doesn't have gettimeofday(), although it does have struct timeval.
+ */
+--- 3460,3466 ----
+ #if defined(STARTUPTIME) || defined(PROTO)
+ static struct timeval prev_timeval;
+
+! # ifdef MSWIN
+ /*
+ * Windows doesn't have gettimeofday(), although it does have struct timeval.
+ */
+***************
+*** 3567,3573 ****
+ {
+ char_u *val = argv0;
+
+! # if defined(WIN32)
+ /* A relative path containing a "/" will become invalid when using ":cd",
+ * turn it into a full path.
+ * On MS-Windows "vim" should be expanded to "vim.exe", thus always do
+--- 3567,3573 ----
+ {
+ char_u *val = argv0;
+
+! # ifdef MSWIN
+ /* A relative path containing a "/" will become invalid when using ":cd",
+ * turn it into a full path.
+ * On MS-Windows "vim" should be expanded to "vim.exe", thus always do
+***************
+*** 3600,3606 ****
+
+ set_vim_var_string(VV_PROGPATH, val, -1);
+
+! # ifdef WIN32
+ vim_free(path);
+ # endif
+ }
+--- 3600,3606 ----
+
+ set_vim_var_string(VV_PROGPATH, val, -1);
+
+! # ifdef MSWIN
+ vim_free(path);
+ # endif
+ }
+***************
+*** 3623,3629 ****
+ {
+ if (parmp->serverName_arg == NULL || *parmp->serverName_arg != NUL)
+ {
+! # ifdef WIN32
+ /* Initialise the client/server messaging infrastructure. */
+ serverInitMessaging();
+ # endif
+--- 3623,3629 ----
+ {
+ if (parmp->serverName_arg == NULL || *parmp->serverName_arg != NUL)
+ {
+! # ifdef MSWIN
+ /* Initialise the client/server messaging infrastructure. */
+ serverInitMessaging();
+ # endif
+***************
+*** 3645,3651 ****
+ * clipboard first, it's further down. */
+ parmp->servername = serverMakeName(parmp->serverName_arg,
+ parmp->argv[0]);
+! # ifdef WIN32
+ if (parmp->servername != NULL)
+ {
+ serverSetName(parmp->servername);
+--- 3645,3651 ----
+ * clipboard first, it's further down. */
+ parmp->servername = serverMakeName(parmp->serverName_arg,
+ parmp->argv[0]);
+! # ifdef MSWIN
+ if (parmp->servername != NULL)
+ {
+ serverSetName(parmp->servername);
+***************
+*** 3842,3848 ****
+ break;
+ }
+
+! # ifdef FEAT_GUI_W32
+ /* Guess that when the server name starts with "g" it's a GUI
+ * server, which we can bring to the foreground here.
+ * Foreground() in the server doesn't work very well. */
+--- 3842,3848 ----
+ break;
+ }
+
+! # ifdef FEAT_GUI_MSWIN
+ /* Guess that when the server name starts with "g" it's a GUI
+ * server, which we can bring to the foreground here.
+ * Foreground() in the server doesn't work very well. */
+***************
+*** 3860,3866 ****
+ int j;
+ char_u *done = alloc(numFiles);
+ char_u *p;
+! # ifdef FEAT_GUI_W32
+ NOTIFYICONDATA ni;
+ int count = 0;
+ extern HWND message_window;
+--- 3860,3866 ----
+ int j;
+ char_u *done = alloc(numFiles);
+ char_u *p;
+! # ifdef FEAT_GUI_MSWIN
+ NOTIFYICONDATA ni;
+ int count = 0;
+ extern HWND message_window;
+***************
+*** 3870,3876 ****
+ /* Skip "+cmd" argument, don't wait for it to be edited. */
+ --numFiles;
+
+! # ifdef FEAT_GUI_W32
+ ni.cbSize = sizeof(ni);
+ ni.hWnd = message_window;
+ ni.uID = 0;
+--- 3870,3876 ----
+ /* Skip "+cmd" argument, don't wait for it to be edited. */
+ --numFiles;
+
+! # ifdef FEAT_GUI_MSWIN
+ ni.cbSize = sizeof(ni);
+ ni.hWnd = message_window;
+ ni.uID = 0;
+***************
+*** 3884,3890 ****
+ vim_memset(done, 0, numFiles);
+ while (memchr(done, 0, numFiles) != NULL)
+ {
+! # ifdef WIN32
+ p = serverGetReply(srv, NULL, TRUE, TRUE, 0);
+ if (p == NULL)
+ break;
+--- 3884,3890 ----
+ vim_memset(done, 0, numFiles);
+ while (memchr(done, 0, numFiles) != NULL)
+ {
+! # ifdef MSWIN
+ p = serverGetReply(srv, NULL, TRUE, TRUE, 0);
+ if (p == NULL)
+ break;
+***************
+*** 3895,3901 ****
+ j = atoi((char *)p);
+ if (j >= 0 && j < numFiles)
+ {
+! # ifdef FEAT_GUI_W32
+ ++count;
+ sprintf(ni.szTip, _("%d of %d edited"),
+ count, numFiles);
+--- 3895,3901 ----
+ j = atoi((char *)p);
+ if (j >= 0 && j < numFiles)
+ {
+! # ifdef FEAT_GUI_MSWIN
+ ++count;
+ sprintf(ni.szTip, _("%d of %d edited"),
+ count, numFiles);
+***************
+*** 3904,3910 ****
+ done[j] = 1;
+ }
+ }
+! # ifdef FEAT_GUI_W32
+ Shell_NotifyIcon(NIM_DELETE, &ni);
+ # endif
+ }
+--- 3904,3910 ----
+ done[j] = 1;
+ }
+ }
+! # ifdef FEAT_GUI_MSWIN
+ Shell_NotifyIcon(NIM_DELETE, &ni);
+ # endif
+ }
+***************
+*** 3913,3919 ****
+ {
+ if (i == *argc - 1)
+ mainerr_arg_missing((char_u *)argv[i]);
+! # ifdef WIN32
+ /* Win32 always works? */
+ if (serverSendToVim(sname, (char_u *)argv[i + 1],
+ &res, NULL, 1, 0, FALSE) < 0)
+--- 3913,3919 ----
+ {
+ if (i == *argc - 1)
+ mainerr_arg_missing((char_u *)argv[i]);
+! # ifdef MSWIN
+ /* Win32 always works? */
+ if (serverSendToVim(sname, (char_u *)argv[i + 1],
+ &res, NULL, 1, 0, FALSE) < 0)
+***************
+*** 3935,3941 ****
+ }
+ else if (STRICMP(argv[i], "--serverlist") == 0)
+ {
+! # ifdef WIN32
+ /* Win32 always works? */
+ res = serverGetVimNames();
+ # else
+--- 3935,3941 ----
+ }
+ else if (STRICMP(argv[i], "--serverlist") == 0)
+ {
+! # ifdef MSWIN
+ /* Win32 always works? */
+ res = serverGetVimNames();
+ # else
+*** ../vim-8.1.0940/src/mbyte.c 2019-01-26 17:28:22.228599112 +0100
+--- src/mbyte.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 97,103 ****
+ # define WINBYTE BYTE
+ #endif
+
+! #if (defined(WIN3264) || defined(WIN32UNIX)) && !defined(__MINGW32__)
+ # include <winnls.h>
+ #endif
+
+--- 97,103 ----
+ # define WINBYTE BYTE
+ #endif
+
+! #if (defined(MSWIN) || defined(WIN32UNIX)) && !defined(__MINGW32__)
+ # include <winnls.h>
+ #endif
+
+***************
+*** 117,123 ****
+ # else
+ # include <gdk/gdkkeysyms.h>
+ # endif
+! # ifdef WIN3264
+ # include <gdk/gdkwin32.h>
+ # else
+ # include <gdk/gdkx.h>
+--- 117,123 ----
+ # else
+ # include <gdk/gdkkeysyms.h>
+ # endif
+! # ifdef MSWIN
+ # include <gdk/gdkwin32.h>
+ # else
+ # include <gdk/gdkx.h>
+***************
+*** 364,370 ****
+ {"cyrillic", IDX_ISO_5},
+ {"arabic", IDX_ISO_6},
+ {"greek", IDX_ISO_7},
+! #ifdef WIN3264
+ {"hebrew", IDX_CP1255},
+ #else
+ {"hebrew", IDX_ISO_8},
+--- 364,370 ----
+ {"cyrillic", IDX_ISO_5},
+ {"arabic", IDX_ISO_6},
+ {"greek", IDX_ISO_7},
+! #ifdef MSWIN
+ {"hebrew", IDX_CP1255},
+ #else
+ {"hebrew", IDX_ISO_8},
+***************
+*** 412,418 ****
+ {"euccn", IDX_EUC_CN},
+ {"gb2312", IDX_EUC_CN},
+ {"euctw", IDX_EUC_TW},
+! #if defined(WIN3264) || defined(WIN32UNIX) || defined(MACOS_X)
+ {"japan", IDX_CP932},
+ {"korea", IDX_CP949},
+ {"prc", IDX_CP936},
+--- 412,418 ----
+ {"euccn", IDX_EUC_CN},
+ {"gb2312", IDX_EUC_CN},
+ {"euctw", IDX_EUC_TW},
+! #if defined(MSWIN) || defined(WIN32UNIX) || defined(MACOS_X)
+ {"japan", IDX_CP932},
+ {"korea", IDX_CP949},
+ {"prc", IDX_CP936},
+***************
+*** 465,471 ****
+ i = enc_canon_search(name);
+ if (i >= 0)
+ return enc_canon_table[i].prop;
+! #ifdef WIN3264
+ if (name[0] == 'c' && name[1] == 'p' && VIM_ISDIGIT(name[2]))
+ {
+ CPINFO cpinfo;
+--- 465,471 ----
+ i = enc_canon_search(name);
+ if (i >= 0)
+ return enc_canon_table[i].prop;
+! #ifdef MSWIN
+ if (name[0] == 'c' && name[1] == 'p' && VIM_ISDIGIT(name[2]))
+ {
+ CPINFO cpinfo;
+***************
+*** 509,515 ****
+ int idx;
+ int n;
+ int enc_dbcs_new = 0;
+! #if defined(USE_ICONV) && !defined(WIN3264) && !defined(WIN32UNIX) \
+ && !defined(MACOS_CONVERT)
+ # define LEN_FROM_CONV
+ vimconv_T vimconv;
+--- 509,515 ----
+ int idx;
+ int n;
+ int enc_dbcs_new = 0;
+! #if defined(USE_ICONV) && !defined(MSWIN) && !defined(WIN32UNIX) \
+ && !defined(MACOS_CONVERT)
+ # define LEN_FROM_CONV
+ vimconv_T vimconv;
+***************
+*** 527,533 ****
+ return NULL;
+ }
+
+! #ifdef WIN3264
+ if (p_enc[0] == 'c' && p_enc[1] == 'p' && VIM_ISDIGIT(p_enc[2]))
+ {
+ CPINFO cpinfo;
+--- 527,533 ----
+ return NULL;
+ }
+
+! #ifdef MSWIN
+ if (p_enc[0] == 'c' && p_enc[1] == 'p' && VIM_ISDIGIT(p_enc[2]))
+ {
+ CPINFO cpinfo;
+***************
+*** 566,572 ****
+ }
+ else if (STRNCMP(p_enc, "2byte-", 6) == 0)
+ {
+! #ifdef WIN3264
+ /* Windows: accept only valid codepage numbers, check below. */
+ if (p_enc[6] != 'c' || p_enc[7] != 'p'
+ || (enc_dbcs_new = atoi((char *)p_enc + 8)) == 0)
+--- 566,572 ----
+ }
+ else if (STRNCMP(p_enc, "2byte-", 6) == 0)
+ {
+! #ifdef MSWIN
+ /* Windows: accept only valid codepage numbers, check below. */
+ if (p_enc[6] != 'c' || p_enc[7] != 'p'
+ || (enc_dbcs_new = atoi((char *)p_enc + 8)) == 0)
+***************
+*** 607,613 ****
+
+ if (enc_dbcs_new != 0)
+ {
+! #ifdef WIN3264
+ /* Check if the DBCS code page is OK. */
+ if (!IsValidCodePage(enc_dbcs_new))
+ goto codepage_invalid;
+--- 607,613 ----
+
+ if (enc_dbcs_new != 0)
+ {
+! #ifdef MSWIN
+ /* Check if the DBCS code page is OK. */
+ if (!IsValidCodePage(enc_dbcs_new))
+ goto codepage_invalid;
+***************
+*** 618,624 ****
+ enc_dbcs = enc_dbcs_new;
+ has_mbyte = (enc_dbcs != 0 || enc_utf8);
+
+! #if defined(WIN3264) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+ enc_codepage = encname2codepage(p_enc);
+ enc_latin9 = (STRCMP(p_enc, "iso-8859-15") == 0);
+ #endif
+--- 618,624 ----
+ enc_dbcs = enc_dbcs_new;
+ has_mbyte = (enc_dbcs != 0 || enc_utf8);
+
+! #if defined(MSWIN) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+ enc_codepage = encname2codepage(p_enc);
+ enc_latin9 = (STRCMP(p_enc, "iso-8859-15") == 0);
+ #endif
+***************
+*** 699,705 ****
+ n = 1;
+ else
+ {
+! #if defined(WIN3264) || defined(WIN32UNIX)
+ /* enc_dbcs is set by setting 'fileencoding'. It becomes a Windows
+ * CodePage identifier, which we can pass directly in to Windows
+ * API */
+--- 699,705 ----
+ n = 1;
+ else
+ {
+! #if defined(MSWIN) || defined(WIN32UNIX)
+ /* enc_dbcs is set by setting 'fileencoding'. It becomes a Windows
+ * CodePage identifier, which we can pass directly in to Windows
+ * API */
+***************
+*** 783,789 ****
+ enc_utf8 ? "utf-8" : (char *)p_enc);
+ #endif
+
+! #ifdef WIN32
+ /* When changing 'encoding' while starting up, then convert the command
+ * line arguments from the active codepage to 'encoding'. */
+ if (starting != 0)
+--- 783,789 ----
+ enc_utf8 ? "utf-8" : (char *)p_enc);
+ #endif
+
+! #ifdef MSWIN
+ /* When changing 'encoding' while starting up, then convert the command
+ * line arguments from the active codepage to 'encoding'. */
+ if (starting != 0)
+***************
+*** 909,915 ****
+ unsigned char tb = trail;
+
+ /* convert process code to JIS */
+! # if defined(WIN3264) || defined(WIN32UNIX) || defined(MACOS_X)
+ /* process code is SJIS */
+ if (lb <= 0x9f)
+ lb = (lb - 0x81) * 2 + 0x21;
+--- 909,915 ----
+ unsigned char tb = trail;
+
+ /* convert process code to JIS */
+! # if defined(MSWIN) || defined(WIN32UNIX) || defined(MACOS_X)
+ /* process code is SJIS */
+ if (lb <= 0x9f)
+ lb = (lb - 0x81) * 2 + 0x21;
+***************
+*** 1006,1012 ****
+ if (c1 >= 0xB0 && c1 <= 0xC8)
+ /* Hangul */
+ return 20;
+! #if defined(WIN3264) || defined(WIN32UNIX)
+ else if (c1 <= 0xA0 || c2 <= 0xA0)
+ /* Extended Hangul Region : MS UHC(Unified Hangul Code) */
+ /* c1: 0x81-0xA0 with c2: 0x41-0x5A, 0x61-0x7A, 0x81-0xFE
+--- 1006,1012 ----
+ if (c1 >= 0xB0 && c1 <= 0xC8)
+ /* Hangul */
+ return 20;
+! #if defined(MSWIN) || defined(WIN32UNIX)
+ else if (c1 <= 0xA0 || c2 <= 0xA0)
+ /* Extended Hangul Region : MS UHC(Unified Hangul Code) */
+ /* c1: 0x81-0xA0 with c2: 0x41-0x5A, 0x61-0x7A, 0x81-0xFE
+***************
+*** 4393,4399 ****
+ # include <langinfo.h>
+ #endif
+
+! #ifndef FEAT_GUI_W32
+ /*
+ * Get the canonicalized encoding from the specified locale string "locale"
+ * or from the environment variables LC_ALL, LC_CTYPE and LANG.
+--- 4393,4399 ----
+ # include <langinfo.h>
+ #endif
+
+! #ifndef FEAT_GUI_MSWIN
+ /*
+ * Get the canonicalized encoding from the specified locale string "locale"
+ * or from the environment variables LC_ALL, LC_CTYPE and LANG.
+***************
+*** 4460,4466 ****
+ char_u *
+ enc_locale(void)
+ {
+! #ifdef WIN3264
+ char buf[50];
+ long acp = GetACP();
+
+--- 4460,4466 ----
+ char_u *
+ enc_locale(void)
+ {
+! #ifdef MSWIN
+ char buf[50];
+ long acp = GetACP();
+
+***************
+*** 4487,4493 ****
+ #endif
+ }
+
+! # if defined(WIN3264) || defined(PROTO) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+ /*
+ * Convert an encoding name to an MS-Windows codepage.
+ * Returns zero if no codepage can be figured out.
+--- 4487,4493 ----
+ #endif
+ }
+
+! # if defined(MSWIN) || defined(PROTO) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+ /*
+ * Convert an encoding name to an MS-Windows codepage.
+ * Returns zero if no codepage can be figured out.
+***************
+*** 6570,6576 ****
+ /* Internal utf-8 -> latin9 conversion. */
+ vcp->vc_type = CONV_TO_LATIN9;
+ }
+! #ifdef WIN3264
+ /* Win32-specific codepage <-> codepage conversion without iconv. */
+ else if ((from_is_utf8 || encname2codepage(from) > 0)
+ && (to_is_utf8 || encname2codepage(to) > 0))
+--- 6570,6576 ----
+ /* Internal utf-8 -> latin9 conversion. */
+ vcp->vc_type = CONV_TO_LATIN9;
+ }
+! #ifdef MSWIN
+ /* Win32-specific codepage <-> codepage conversion without iconv. */
+ else if ((from_is_utf8 || encname2codepage(from) > 0)
+ && (to_is_utf8 || encname2codepage(to) > 0))
+***************
+*** 6620,6626 ****
+ return OK;
+ }
+
+! #if defined(FEAT_GUI) || defined(AMIGA) || defined(WIN3264) \
+ || defined(PROTO)
+ /*
+ * Do conversion on typed input characters in-place.
+--- 6620,6626 ----
+ return OK;
+ }
+
+! #if defined(FEAT_GUI) || defined(AMIGA) || defined(MSWIN) \
+ || defined(PROTO)
+ /*
+ * Do conversion on typed input characters in-place.
+***************
+*** 6870,6876 ****
+ retval = iconv_string(vcp, ptr, len, unconvlenp, lenp);
+ break;
+ # endif
+! # ifdef WIN3264
+ case CONV_CODEPAGE: /* codepage -> codepage */
+ {
+ int retlen;
+--- 6870,6876 ----
+ retval = iconv_string(vcp, ptr, len, unconvlenp, lenp);
+ break;
+ # endif
+! # ifdef MSWIN
+ case CONV_CODEPAGE: /* codepage -> codepage */
+ {
+ int retlen;
+*** ../vim-8.1.0940/src/memfile.c 2019-02-14 12:56:31.686115921 +0100
+--- src/memfile.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 621,627 ****
+ status = FAIL;
+ }
+ #endif
+! #ifdef WIN32
+ if (_commit(mfp->mf_fd))
+ status = FAIL;
+ #endif
+--- 621,627 ----
+ status = FAIL;
+ }
+ #endif
+! #ifdef MSWIN
+ if (_commit(mfp->mf_fd))
+ status = FAIL;
+ #endif
+***************
+*** 1265,1271 ****
+ * try to open the file
+ */
+ flags |= O_EXTRA | O_NOFOLLOW;
+! #ifdef WIN32
+ /* Prevent handle inheritance that cause problems with Cscope
+ * (swap file may not be deleted if cscope connection was open after
+ * the file) */
+--- 1265,1271 ----
+ * try to open the file
+ */
+ flags |= O_EXTRA | O_NOFOLLOW;
+! #ifdef MSWIN
+ /* Prevent handle inheritance that cause problems with Cscope
+ * (swap file may not be deleted if cscope connection was open after
+ * the file) */
+*** ../vim-8.1.0940/src/memline.c 2019-01-26 17:28:22.228599112 +0100
+--- src/memline.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 1807,1813 ****
+ #else
+ names[0] = vim_strsave((char_u *)"*.sw?");
+ #endif
+! #if defined(UNIX) || defined(WIN3264)
+ /* For Unix names starting with a dot are special. MS-Windows
+ * supports this too, on some file systems. */
+ names[1] = vim_strsave((char_u *)".*.sw?");
+--- 1807,1813 ----
+ #else
+ names[0] = vim_strsave((char_u *)"*.sw?");
+ #endif
+! #if defined(UNIX) || defined(MSWIN)
+ /* For Unix names starting with a dot are special. MS-Windows
+ * supports this too, on some file systems. */
+ names[1] = vim_strsave((char_u *)".*.sw?");
+***************
+*** 1834,1840 ****
+ #else
+ names[0] = concat_fnames(dir_name, (char_u *)"*.sw?", TRUE);
+ #endif
+! #if defined(UNIX) || defined(WIN3264)
+ /* For Unix names starting with a dot are special. MS-Windows
+ * supports this too, on some file systems. */
+ names[1] = concat_fnames(dir_name, (char_u *)".*.sw?", TRUE);
+--- 1834,1840 ----
+ #else
+ names[0] = concat_fnames(dir_name, (char_u *)"*.sw?", TRUE);
+ #endif
+! #if defined(UNIX) || defined(MSWIN)
+ /* For Unix names starting with a dot are special. MS-Windows
+ * supports this too, on some file systems. */
+ names[1] = concat_fnames(dir_name, (char_u *)".*.sw?", TRUE);
+***************
+*** 1851,1857 ****
+ }
+ else
+ {
+! #if defined(UNIX) || defined(WIN3264)
+ int len = (int)STRLEN(dir_name);
+
+ p = dir_name + len;
+--- 1851,1857 ----
+ }
+ else
+ {
+! #if defined(UNIX) || defined(MSWIN)
+ int len = (int)STRLEN(dir_name);
+
+ p = dir_name + len;
+***************
+*** 1999,2005 ****
+ 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
+--- 1999,2005 ----
+ return file_count;
+ }
+
+! #if defined(UNIX) || defined(MSWIN) || defined(PROTO)
+ /*
+ * Need _very_ long file names.
+ * Append the full path to name with path separators made into percent
+***************
+*** 2207,2213 ****
+ */
+ char_u *p;
+ int i;
+! # ifndef WIN3264
+ int shortname = curbuf->b_shortname;
+
+ curbuf->b_shortname = FALSE;
+--- 2207,2213 ----
+ */
+ char_u *p;
+ int i;
+! # ifndef MSWIN
+ int shortname = curbuf->b_shortname;
+
+ curbuf->b_shortname = FALSE;
+***************
+*** 2252,2258 ****
+ else
+ ++num_names;
+
+! # ifndef WIN3264
+ /*
+ * Also try with 'shortname' set, in case the file is on a DOS filesystem.
+ */
+--- 2252,2258 ----
+ else
+ ++num_names;
+
+! # ifndef MSWIN
+ /*
+ * Also try with 'shortname' set, in case the file is on a DOS filesystem.
+ */
+***************
+*** 2279,2285 ****
+ # endif
+
+ end:
+! # ifndef WIN3264
+ curbuf->b_shortname = shortname;
+ # endif
+
+--- 2279,2285 ----
+ # endif
+
+ end:
+! # ifndef MSWIN
+ curbuf->b_shortname = shortname;
+ # endif
+
+***************
+*** 4253,4259 ****
+ char_u fname_buf[MAXPATHL];
+ #endif
+
+! #if defined(UNIX) || defined(WIN3264) /* Need _very_ long file names */
+ int len = (int)STRLEN(dir_name);
+
+ s = dir_name + len;
+--- 4253,4259 ----
+ char_u fname_buf[MAXPATHL];
+ #endif
+
+! #if defined(UNIX) || defined(MSWIN) // Need _very_ long file names
+ int len = (int)STRLEN(dir_name);
+
+ s = dir_name + len;
+***************
+*** 4343,4349 ****
+ else
+ retval = concat_fnames(dname, tail, TRUE);
+
+! #ifdef WIN3264
+ if (retval != NULL)
+ for (t = gettail(retval); *t != NUL; MB_PTR_ADV(t))
+ if (*t == ':')
+--- 4343,4349 ----
+ else
+ retval = concat_fnames(dname, tail, TRUE);
+
+! #ifdef MSWIN
+ if (retval != NULL)
+ for (t = gettail(retval); *t != NUL; MB_PTR_ADV(t))
+ if (*t == ':')
+***************
+*** 4474,4480 ****
+ # define CREATE_DUMMY_FILE
+ FILE *dummyfd = NULL;
+
+! # ifdef WIN3264
+ if (buf_fname != NULL && !mch_isFullName(buf_fname)
+ && vim_strchr(gettail(buf_fname), ':'))
+ {
+--- 4474,4480 ----
+ # define CREATE_DUMMY_FILE
+ FILE *dummyfd = NULL;
+
+! # ifdef MSWIN
+ if (buf_fname != NULL && !mch_isFullName(buf_fname)
+ && vim_strchr(gettail(buf_fname), ':'))
+ {
+***************
+*** 4927,4933 ****
+ mch_remove(buf_fname);
+ }
+ #endif
+! #ifdef WIN3264
+ if (buf_fname != buf->b_fname)
+ vim_free(buf_fname);
+ #endif
+--- 4927,4933 ----
+ mch_remove(buf_fname);
+ }
+ #endif
+! #ifdef MSWIN
+ if (buf_fname != buf->b_fname)
+ vim_free(buf_fname);
+ #endif
+*** ../vim-8.1.0940/src/menu.c 2019-01-26 17:28:22.228599112 +0100
+--- src/menu.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 18,24 ****
+
+ #define MENUDEPTH 10 /* maximum depth of menus */
+
+! #ifdef FEAT_GUI_W32
+ static int add_menu_path(char_u *, vimmenu_T *, int *, char_u *, int);
+ #else
+ static int add_menu_path(char_u *, vimmenu_T *, int *, char_u *);
+--- 18,24 ----
+
+ #define MENUDEPTH 10 /* maximum depth of menus */
+
+! #ifdef FEAT_GUI_MSWIN
+ static int add_menu_path(char_u *, vimmenu_T *, int *, char_u *, int);
+ #else
+ static int add_menu_path(char_u *, vimmenu_T *, int *, char_u *);
+***************
+*** 35,41 ****
+ static char_u *popup_mode_name(char_u *name, int idx);
+ static char_u *menu_text(char_u *text, int *mnemonic, char_u **actext);
+
+! #if defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF)
+ static void gui_create_tearoffs_recurse(vimmenu_T *menu, const char_u *pname, int *pri_tab, int pri_idx);
+ static void gui_add_tearoff(char_u *tearpath, int *pri_tab, int pri_idx);
+ static void gui_destroy_tearoffs_recurse(vimmenu_T *menu);
+--- 35,41 ----
+ static char_u *popup_mode_name(char_u *name, int idx);
+ static char_u *menu_text(char_u *text, int *mnemonic, char_u **actext);
+
+! #if defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF)
+ static void gui_create_tearoffs_recurse(vimmenu_T *menu, const char_u *pname, int *pri_tab, int pri_idx);
+ static void gui_add_tearoff(char_u *tearpath, int *pri_tab, int pri_idx);
+ static void gui_destroy_tearoffs_recurse(vimmenu_T *menu);
+***************
+*** 43,49 ****
+ #endif
+
+ static int menu_is_hidden(char_u *name);
+! #if defined(FEAT_CMDL_COMPL) || (defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF))
+ static int menu_is_tearoff(char_u *name);
+ #endif
+
+--- 43,49 ----
+ #endif
+
+ static int menu_is_hidden(char_u *name);
+! #if defined(FEAT_CMDL_COMPL) || (defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF))
+ static int menu_is_tearoff(char_u *name);
+ #endif
+
+***************
+*** 122,128 ****
+ int i;
+ #if defined(FEAT_GUI) && !defined(FEAT_GUI_GTK)
+ int old_menu_height;
+! # if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+ int old_toolbar_height;
+ # endif
+ #endif
+--- 122,128 ----
+ int i;
+ #if defined(FEAT_GUI) && !defined(FEAT_GUI_GTK)
+ int old_menu_height;
+! # if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
+ int old_toolbar_height;
+ # endif
+ #endif
+***************
+*** 295,301 ****
+ }
+ #if defined(FEAT_GUI) && !(defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON))
+ old_menu_height = gui.menu_height;
+! # if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+ old_toolbar_height = gui.toolbar_height;
+ # endif
+ #endif
+--- 295,301 ----
+ }
+ #if defined(FEAT_GUI) && !(defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON))
+ old_menu_height = gui.menu_height;
+! # if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
+ old_toolbar_height = gui.toolbar_height;
+ # endif
+ #endif
+***************
+*** 381,387 ****
+ menuarg.noremap[0] = noremap;
+ menuarg.silent[0] = silent;
+ add_menu_path(menu_path, &menuarg, pri_tab, map_to
+! #ifdef FEAT_GUI_W32
+ , TRUE
+ #endif
+ );
+--- 381,387 ----
+ menuarg.noremap[0] = noremap;
+ menuarg.silent[0] = silent;
+ add_menu_path(menu_path, &menuarg, pri_tab, map_to
+! #ifdef FEAT_GUI_MSWIN
+ , TRUE
+ #endif
+ );
+***************
+*** 405,411 ****
+ menuarg.icon_builtin = FALSE;
+ #endif
+ add_menu_path(p, &menuarg, pri_tab, map_to
+! #ifdef FEAT_GUI_W32
+ , TRUE
+ #endif
+ );
+--- 405,411 ----
+ menuarg.icon_builtin = FALSE;
+ #endif
+ add_menu_path(p, &menuarg, pri_tab, map_to
+! #ifdef FEAT_GUI_MSWIN
+ , TRUE
+ #endif
+ );
+***************
+*** 421,427 ****
+ /* If the menubar height changed, resize the window */
+ if (gui.in_use
+ && (gui.menu_height != old_menu_height
+! # if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+ || gui.toolbar_height != old_toolbar_height
+ # endif
+ ))
+--- 421,427 ----
+ /* If the menubar height changed, resize the window */
+ if (gui.in_use
+ && (gui.menu_height != old_menu_height
+! # if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
+ || gui.toolbar_height != old_toolbar_height
+ # endif
+ ))
+***************
+*** 455,461 ****
+ icon_builtin, silent[0], noremap[0] */
+ int *pri_tab,
+ char_u *call_data
+! #ifdef FEAT_GUI_W32
+ , int addtearoff /* may add tearoff item */
+ #endif
+ )
+--- 455,461 ----
+ icon_builtin, silent[0], noremap[0] */
+ int *pri_tab,
+ char_u *call_data
+! #ifdef FEAT_GUI_MSWIN
+ , int addtearoff /* may add tearoff item */
+ #endif
+ )
+***************
+*** 537,543 ****
+ goto erret;
+ }
+ if (*next_name != NUL && menu->children == NULL
+! #ifdef FEAT_GUI_W32
+ && addtearoff
+ #endif
+ )
+--- 537,543 ----
+ goto erret;
+ }
+ if (*next_name != NUL && menu->children == NULL
+! #ifdef FEAT_GUI_MSWIN
+ && addtearoff
+ #endif
+ )
+***************
+*** 630,636 ****
+ if (*next_name == NUL && menuarg->iconfile != NULL)
+ menu->iconfile = vim_strsave(menuarg->iconfile);
+ #endif
+! #if defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF)
+ /* the tearoff item must be present in the modes of each item. */
+ if (parent != NULL && menu_is_tearoff(parent->children->dname))
+ parent->children->modes |= modes;
+--- 630,636 ----
+ if (*next_name == NUL && menuarg->iconfile != NULL)
+ menu->iconfile = vim_strsave(menuarg->iconfile);
+ #endif
+! #if defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF)
+ /* the tearoff item must be present in the modes of each item. */
+ if (parent != NULL && menu_is_tearoff(parent->children->dname))
+ parent->children->modes |= modes;
+***************
+*** 645,651 ****
+ * modes, then make sure it's available for this one now
+ * Also enable a menu when it's created or changed.
+ */
+! #ifdef FEAT_GUI_W32
+ /* If adding a tearbar (addtearoff == FALSE) don't update modes */
+ if (addtearoff)
+ #endif
+--- 645,651 ----
+ * modes, then make sure it's available for this one now
+ * Also enable a menu when it's created or changed.
+ */
+! #ifdef FEAT_GUI_MSWIN
+ /* If adding a tearbar (addtearoff == FALSE) don't update modes */
+ if (addtearoff)
+ #endif
+***************
+*** 680,686 ****
+ }
+ }
+
+! # if defined(FEAT_GUI_W32) & defined(FEAT_TEAROFF)
+ /* When adding a new submenu, may add a tearoff item */
+ if ( addtearoff
+ && *next_name
+--- 680,686 ----
+ }
+ }
+
+! # if defined(FEAT_GUI_MSWIN) & defined(FEAT_TEAROFF)
+ /* When adding a new submenu, may add a tearoff item */
+ if ( addtearoff
+ && *next_name
+***************
+*** 758,764 ****
+ c = 0;
+ d = 0;
+ if (amenu && call_data != NULL && *call_data != NUL
+! #ifdef FEAT_GUI_W32
+ && addtearoff
+ #endif
+ )
+--- 758,764 ----
+ c = 0;
+ d = 0;
+ if (amenu && call_data != NULL && *call_data != NUL
+! #ifdef FEAT_GUI_MSWIN
+ && addtearoff
+ #endif
+ )
+***************
+*** 808,814 ****
+ menu->silent[i] = menuarg->silent[0];
+ }
+ }
+! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) \
+ && (defined(FEAT_BEVAL_GUI) || defined(FEAT_GUI_GTK))
+ /* Need to update the menu tip. */
+ if (modes & MENU_TIP_MODE)
+--- 808,814 ----
+ menu->silent[i] = menuarg->silent[0];
+ }
+ }
+! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN) \
+ && (defined(FEAT_BEVAL_GUI) || defined(FEAT_GUI_GTK))
+ /* Need to update the menu tip. */
+ if (modes & MENU_TIP_MODE)
+***************
+*** 938,944 ****
+ }
+ if ((menu->modes & modes) != 0x0)
+ {
+! #if defined(FEAT_GUI_W32) & defined(FEAT_TEAROFF)
+ /*
+ * If we are removing all entries for this menu,MENU_ALL_MODES,
+ * Then kill any tearoff before we start
+--- 938,944 ----
+ }
+ if ((menu->modes & modes) != 0x0)
+ {
+! #if defined(FEAT_GUI_MSWIN) & defined(FEAT_TEAROFF)
+ /*
+ * If we are removing all entries for this menu,MENU_ALL_MODES,
+ * Then kill any tearoff before we start
+***************
+*** 992,998 ****
+
+ /* Recalculate modes for menu based on the new updated children */
+ menu->modes &= ~modes;
+! #if defined(FEAT_GUI_W32) & defined(FEAT_TEAROFF)
+ if ((s_tearoffs) && (menu->children != NULL)) /* there's a tear bar.. */
+ child = menu->children->next; /* don't count tearoff bar */
+ else
+--- 992,998 ----
+
+ /* Recalculate modes for menu based on the new updated children */
+ menu->modes &= ~modes;
+! #if defined(FEAT_GUI_MSWIN) & defined(FEAT_TEAROFF)
+ if ((s_tearoffs) && (menu->children != NULL)) /* there's a tear bar.. */
+ child = menu->children->next; /* don't count tearoff bar */
+ else
+***************
+*** 1003,1009 ****
+ if (modes & MENU_TIP_MODE)
+ {
+ free_menu_string(menu, MENU_INDEX_TIP);
+! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) \
+ && (defined(FEAT_BEVAL_GUI) || defined(FEAT_GUI_GTK))
+ /* Need to update the menu tip. */
+ if (gui.in_use)
+--- 1003,1009 ----
+ if (modes & MENU_TIP_MODE)
+ {
+ free_menu_string(menu, MENU_INDEX_TIP);
+! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN) \
+ && (defined(FEAT_BEVAL_GUI) || defined(FEAT_GUI_GTK))
+ /* Need to update the menu tip. */
+ if (gui.in_use)
+***************
+*** 1013,1019 ****
+ if ((menu->modes & MENU_ALL_MODES) == 0)
+ {
+ /* The menu item is no longer valid in ANY mode, so delete it */
+! #if defined(FEAT_GUI_W32) & defined(FEAT_TEAROFF)
+ if (s_tearoffs && menu->children != NULL) /* there's a tear bar.. */
+ free_menu(&menu->children);
+ #endif
+--- 1013,1019 ----
+ if ((menu->modes & MENU_ALL_MODES) == 0)
+ {
+ /* The menu item is no longer valid in ANY mode, so delete it */
+! #if defined(FEAT_GUI_MSWIN) & defined(FEAT_TEAROFF)
+ if (s_tearoffs && menu->children != NULL) /* there's a tear bar.. */
+ free_menu(&menu->children);
+ #endif
+***************
+*** 1867,1873 ****
+ }
+
+ #if defined(FEAT_CMDL_COMPL) \
+! || (defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF))
+ /*
+ * Return TRUE if the menu is the tearoff menu.
+ */
+--- 1867,1873 ----
+ }
+
+ #if defined(FEAT_CMDL_COMPL) \
+! || (defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF))
+ /*
+ * Return TRUE if the menu is the tearoff menu.
+ */
+***************
+*** 2031,2037 ****
+ while (menu)
+ {
+ if ((menu->modes & menu->enabled & mode)
+! # if defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF)
+ || menu_is_tearoff(menu->dname)
+ # endif
+ )
+--- 2031,2037 ----
+ while (menu)
+ {
+ if ((menu->modes & menu->enabled & mode)
+! # if defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF)
+ || menu_is_tearoff(menu->dname)
+ # endif
+ )
+***************
+*** 2105,2111 ****
+ # endif
+ #endif /* FEAT_GUI */
+
+! #if (defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF)) || defined(PROTO)
+
+ /*
+ * Deal with tearoff items that are added like a menu item.
+--- 2105,2111 ----
+ # endif
+ #endif /* FEAT_GUI */
+
+! #if (defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF)) || defined(PROTO)
+
+ /*
+ * Deal with tearoff items that are added like a menu item.
+***************
+*** 2257,2263 ****
+ }
+ }
+
+! #endif /* FEAT_GUI_W32 && FEAT_TEAROFF */
+
+ /*
+ * Execute "menu". Use by ":emenu" and the window toolbar.
+--- 2257,2263 ----
+ }
+ }
+
+! #endif /* FEAT_GUI_MSWIN && FEAT_TEAROFF */
+
+ /*
+ * Execute "menu". Use by ":emenu" and the window toolbar.
+*** ../vim-8.1.0940/src/message.c 2019-02-15 21:06:05.338289743 +0100
+--- src/message.c 2019-02-17 17:29:18.552788863 +0100
+***************
+*** 2556,2562 ****
+ msg_use_printf(void)
+ {
+ return (!msg_check_screen()
+! #if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
+ || !termcap_active
+ #endif
+ || (swapping_screen() && !termcap_active)
+--- 2556,2562 ----
+ msg_use_printf(void)
+ {
+ return (!msg_check_screen()
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ || !termcap_active
+ #endif
+ || (swapping_screen() && !termcap_active)
+***************
+*** 2573,2579 ****
+ char_u *buf = NULL;
+ char_u *p = s;
+
+! #ifdef WIN3264
+ if (!(silent_mode && p_verbose == 0))
+ mch_settmode(TMODE_COOK); /* handle CR and NL correctly */
+ #endif
+--- 2573,2579 ----
+ char_u *buf = NULL;
+ char_u *p = s;
+
+! #ifdef MSWIN
+ if (!(silent_mode && p_verbose == 0))
+ mch_settmode(TMODE_COOK); /* handle CR and NL correctly */
+ #endif
+***************
+*** 2633,2639 ****
+
+ msg_didout = TRUE; // assume that line is not empty
+
+! #ifdef WIN3264
+ if (!(silent_mode && p_verbose == 0))
+ mch_settmode(TMODE_RAW);
+ #endif
+--- 2633,2639 ----
+
+ msg_didout = TRUE; // assume that line is not empty
+
+! #ifdef MSWIN
+ if (!(silent_mode && p_verbose == 0))
+ mch_settmode(TMODE_RAW);
+ #endif
+***************
+*** 2934,2940 ****
+ void
+ mch_errmsg(char *str)
+ {
+! #if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
+ int len = (int)STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode = 0;
+--- 2934,2940 ----
+ void
+ mch_errmsg(char *str)
+ {
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ int len = (int)STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode = 0;
+***************
+*** 3022,3028 ****
+ void
+ mch_msg(char *str)
+ {
+! #if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
+ int len = (int)STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode;
+--- 3022,3028 ----
+ void
+ mch_msg(char *str)
+ {
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ int len = (int)STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode;
+***************
+*** 4008,4014 ****
+ filter = BROWSE_FILTER_DEFAULT;
+ if (flags & BROWSE_DIR)
+ {
+! # if defined(FEAT_GUI_GTK) || defined(WIN3264)
+ /* For systems that have a directory dialog. */
+ fname = gui_mch_browsedir(title, initdir);
+ # else
+--- 4008,4014 ----
+ filter = BROWSE_FILTER_DEFAULT;
+ if (flags & BROWSE_DIR)
+ {
+! # if defined(FEAT_GUI_GTK) || defined(MSWIN)
+ /* For systems that have a directory dialog. */
+ fname = gui_mch_browsedir(title, initdir);
+ # else
+***************
+*** 4754,4760 ****
+ else if (length_modifier == 'L')
+ {
+ # ifdef FEAT_NUM64
+! # ifdef WIN3264
+ f[f_l++] = 'I';
+ f[f_l++] = '6';
+ f[f_l++] = '4';
+--- 4754,4760 ----
+ else if (length_modifier == 'L')
+ {
+ # ifdef FEAT_NUM64
+! # ifdef MSWIN
+ f[f_l++] = 'I';
+ f[f_l++] = '6';
+ f[f_l++] = '4';
+*** ../vim-8.1.0940/src/misc1.c 2019-02-13 22:45:21.512636158 +0100
+--- src/misc1.c 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 14,20 ****
+ #include "vim.h"
+ #include "version.h"
+
+! #if defined(FEAT_CMDL_COMPL) && defined(WIN3264)
+ # include <lm.h>
+ #endif
+
+--- 14,20 ----
+ #include "vim.h"
+ #include "version.h"
+
+! #if defined(FEAT_CMDL_COMPL) && defined(MSWIN)
+ # include <lm.h>
+ #endif
+
+***************
+*** 3852,3858 ****
+ var = mch_getenv((char_u *)"HOME");
+ #endif
+
+! #ifdef WIN3264
+ /*
+ * Typically, $HOME is not defined on Windows, unless the user has
+ * specifically defined it for Vim's sake. However, on Windows NT
+--- 3852,3858 ----
+ var = mch_getenv((char_u *)"HOME");
+ #endif
+
+! #ifdef MSWIN
+ /*
+ * Typically, $HOME is not defined on Windows, unless the user has
+ * specifically defined it for Vim's sake. However, on Windows NT
+***************
+*** 4318,4324 ****
+
+ if (p != NULL)
+ {
+! #if defined(WIN3264)
+ if (enc_utf8)
+ {
+ int len;
+--- 4318,4324 ----
+
+ if (p != NULL)
+ {
+! #if defined(MSWIN)
+ if (enc_utf8)
+ {
+ int len;
+***************
+*** 4362,4368 ****
+ else
+ p = mch_getenv((char_u *)"VIM");
+
+! #if defined(WIN3264)
+ if (enc_utf8)
+ {
+ int len;
+--- 4362,4368 ----
+ else
+ p = mch_getenv((char_u *)"VIM");
+
+! #if defined(MSWIN)
+ if (enc_utf8)
+ {
+ int len;
+***************
+*** 4688,4694 ****
+ add_user((char_u *)pw->pw_name, TRUE);
+ endpwent();
+ }
+! # elif defined(WIN3264)
+ {
+ DWORD nusers = 0, ntotal = 0, i;
+ PUSER_INFO_0 uinfo;
+--- 4688,4694 ----
+ add_user((char_u *)pw->pw_name, TRUE);
+ endpwent();
+ }
+! # elif defined(MSWIN)
+ {
+ DWORD nusers = 0, ntotal = 0, i;
+ PUSER_INFO_0 uinfo;
+***************
+*** 4820,4826 ****
+ #else
+ homedir_env_orig = homedir_env = mch_getenv((char_u *)"HOME");
+ #endif
+! #ifdef WIN3264
+ if (homedir_env == NULL)
+ homedir_env_orig = homedir_env = mch_getenv((char_u *)"USERPROFILE");
+ #endif
+--- 4820,4826 ----
+ #else
+ homedir_env_orig = homedir_env = mch_getenv((char_u *)"HOME");
+ #endif
+! #ifdef MSWIN
+ if (homedir_env == NULL)
+ homedir_env_orig = homedir_env = mch_getenv((char_u *)"USERPROFILE");
+ #endif
+***************
+*** 5619,5625 ****
+ static int expand_backtick(garray_T *gap, char_u *pat, int flags);
+ # endif
+
+! # if defined(WIN3264)
+ /*
+ * File name expansion code for MS-DOS, Win16 and Win32. It's here because
+ * it's shared between these systems.
+--- 5619,5625 ----
+ static int expand_backtick(garray_T *gap, char_u *pat, int flags);
+ # endif
+
+! # if defined(MSWIN)
+ /*
+ * File name expansion code for MS-DOS, Win16 and Win32. It's here because
+ * it's shared between these systems.
+***************
+*** 5898,5904 ****
+ {
+ return dos_expandpath(gap, path, 0, flags, FALSE);
+ }
+! # endif /* WIN3264 */
+
+ #if (defined(UNIX) && !defined(VMS)) || defined(USE_UNIXFILENAME) \
+ || defined(PROTO)
+--- 5898,5904 ----
+ {
+ return dos_expandpath(gap, path, 0, flags, FALSE);
+ }
+! # endif // MSWIN
+
+ #if (defined(UNIX) && !defined(VMS)) || defined(USE_UNIXFILENAME) \
+ || defined(PROTO)
+***************
+*** 6646,6652 ****
+ {
+ char_u *p;
+
+! #ifdef WIN3264
+ p = gettail(p_sh);
+ p = vim_strnsave(p, (int)(skiptowhite(p) - p));
+ #else
+--- 6646,6652 ----
+ {
+ char_u *p;
+
+! #ifdef MSWIN
+ p = gettail(p_sh);
+ p = vim_strnsave(p, (int)(skiptowhite(p) - p));
+ #else
+*** ../vim-8.1.0940/src/misc2.c 2019-02-13 22:45:21.512636158 +0100
+--- src/misc2.c 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 1427,1433 ****
+ length = (unsigned)STRLEN(string) + 3; /* two quotes and a trailing NUL */
+ for (p = string; *p != NUL; MB_PTR_ADV(p))
+ {
+! # ifdef WIN32
+ if (!p_ssl)
+ {
+ if (*p == '"')
+--- 1427,1433 ----
+ length = (unsigned)STRLEN(string) + 3; /* two quotes and a trailing NUL */
+ for (p = string; *p != NUL; MB_PTR_ADV(p))
+ {
+! # ifdef MSWIN
+ if (!p_ssl)
+ {
+ if (*p == '"')
+***************
+*** 1458,1464 ****
+ d = escaped_string;
+
+ /* add opening quote */
+! # ifdef WIN32
+ if (!p_ssl)
+ *d++ = '"';
+ else
+--- 1458,1464 ----
+ d = escaped_string;
+
+ /* add opening quote */
+! # ifdef MSWIN
+ if (!p_ssl)
+ *d++ = '"';
+ else
+***************
+*** 1467,1473 ****
+
+ for (p = string; *p != NUL; )
+ {
+! # ifdef WIN32
+ if (!p_ssl)
+ {
+ if (*p == '"')
+--- 1467,1473 ----
+
+ for (p = string; *p != NUL; )
+ {
+! # ifdef MSWIN
+ if (!p_ssl)
+ {
+ if (*p == '"')
+***************
+*** 1510,1516 ****
+ }
+
+ /* add terminating quote and finish with a NUL */
+! # ifdef WIN32
+ if (!p_ssl)
+ *d++ = '"';
+ else
+--- 1510,1516 ----
+ }
+
+ /* add terminating quote and finish with a NUL */
+! # ifdef MSWIN
+ if (!p_ssl)
+ *d++ = '"';
+ else
+***************
+*** 2169,2175 ****
+ }
+ }
+
+! #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264) \
+ || defined(PROTO)
+ /*
+ * Append the text in "gap" below the cursor line and clear "gap".
+--- 2169,2175 ----
+ }
+ }
+
+! #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(MSWIN) \
+ || defined(PROTO)
+ /*
+ * Append the text in "gap" below the cursor line and clear "gap".
+***************
+*** 4185,4191 ****
+ perm = mch_getperm(fname);
+ #endif
+ if (
+! # ifdef WIN3264
+ mch_writable(fname) &&
+ # else
+ # if defined(UNIX) || defined(VMS)
+--- 4185,4191 ----
+ perm = mch_getperm(fname);
+ #endif
+ if (
+! # ifdef MSWIN
+ mch_writable(fname) &&
+ # else
+ # if defined(UNIX) || defined(VMS)
+***************
+*** 4437,4443 ****
+ for (i = 0; i < MAX_REPEAT_PARSE; ++i)
+ {
+ // For Win32 mch_breakcheck() does not check for input, do it here.
+! # if defined(WIN32) && defined(FEAT_JOB_CHANNEL)
+ channel_handle_events(FALSE);
+ # endif
+
+--- 4437,4443 ----
+ for (i = 0; i < MAX_REPEAT_PARSE; ++i)
+ {
+ // For Win32 mch_breakcheck() does not check for input, do it here.
+! # if defined(MSWIN) && defined(FEAT_JOB_CHANNEL)
+ channel_handle_events(FALSE);
+ # endif
+
+*** ../vim-8.1.0940/src/nbdebug.c 2019-01-17 15:43:21.761878368 +0100
+--- src/nbdebug.c 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 124,130 ****
+
+ expand_env((char_u *) file, (char_u *) buf, BUFSIZ);
+ return
+! #ifndef FEAT_GUI_W32
+ (access(buf, F_OK) == 0);
+ #else
+ (access(buf, 0) == 0);
+--- 124,130 ----
+
+ expand_env((char_u *) file, (char_u *) buf, BUFSIZ);
+ return
+! #ifndef FEAT_GUI_MSWIN
+ (access(buf, F_OK) == 0);
+ #else
+ (access(buf, 0) == 0);
+*** ../vim-8.1.0940/src/netbeans.c 2019-01-26 17:28:22.228599112 +0100
+--- src/netbeans.c 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 27,33 ****
+
+ #if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
+
+! #ifndef WIN32
+ # include <netdb.h>
+ # ifdef HAVE_LIBGEN_H
+ # include <libgen.h>
+--- 27,33 ----
+
+ #if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
+
+! #ifndef MSWIN
+ # include <netdb.h>
+ # ifdef HAVE_LIBGEN_H
+ # include <libgen.h>
+***************
+*** 2347,2353 ****
+ {
+ #ifdef FEAT_GUI
+ # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \
+! && !defined(FEAT_GUI_W32)
+ if (gui.in_use)
+ {
+ emsg(_("E838: netbeans is not supported with this GUI"));
+--- 2347,2353 ----
+ {
+ #ifdef FEAT_GUI
+ # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \
+! && !defined(FEAT_GUI_MSWIN)
+ if (gui.in_use)
+ {
+ emsg(_("E838: netbeans is not supported with this GUI"));
+***************
+*** 2567,2573 ****
+ }
+ #endif
+
+! #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_W32) || defined(PROTO)
+ /*
+ * Tell netbeans that the window was moved or resized.
+ */
+--- 2567,2573 ----
+ }
+ #endif
+
+! #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) || defined(PROTO)
+ /*
+ * Tell netbeans that the window was moved or resized.
+ */
+*** ../vim-8.1.0940/src/normal.c 2019-02-17 15:00:48.450637077 +0100
+--- src/normal.c 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 5401,5407 ****
+ # endif
+ #endif
+ redraw_later(CLEAR);
+! #if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ resize_console_buf();
+ #endif
+ }
+--- 5401,5407 ----
+ # endif
+ #endif
+ redraw_later(CLEAR);
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ resize_console_buf();
+ #endif
+ }
+*** ../vim-8.1.0940/src/option.c 2019-02-16 19:05:07.348324655 +0100
+--- src/option.c 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 505,511 ****
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {
+! #if (defined(WIN3264)) && !defined(FEAT_GUI_W32)
+ (char_u *)128L,
+ #else
+ (char_u *)224L,
+--- 505,511 ----
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ (char_u *)128L,
+ #else
+ (char_u *)224L,
+***************
+*** 575,581 ****
+ {"background", "bg", P_STRING|P_VI_DEF|P_RCLR,
+ (char_u *)&p_bg, PV_NONE,
+ {
+! #if (defined(WIN3264)) && !defined(FEAT_GUI)
+ (char_u *)"dark",
+ #else
+ (char_u *)"light",
+--- 575,581 ----
+ {"background", "bg", P_STRING|P_VI_DEF|P_RCLR,
+ (char_u *)&p_bg, PV_NONE,
+ {
+! #if (defined(MSWIN)) && !defined(FEAT_GUI)
+ (char_u *)"dark",
+ #else
+ (char_u *)"light",
+***************
+*** 1309,1315 ****
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_gp, PV_GP,
+ {
+! # ifdef WIN3264
+ /* may be changed to "grep -n" in os_win32.c */
+ (char_u *)"findstr /n",
+ # else
+--- 1309,1315 ----
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_gp, PV_GP,
+ {
+! # ifdef MSWIN
+ /* may be changed to "grep -n" in os_win32.c */
+ (char_u *)"findstr /n",
+ # else
+***************
+*** 1739,1745 ****
+ {"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
+ (char_u *)&Rows, PV_NONE,
+ {
+! #if defined(WIN3264)
+ (char_u *)25L,
+ #else
+ (char_u *)24L,
+--- 1739,1745 ----
+ {"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
+ (char_u *)&Rows, PV_NONE,
+ {
+! #if defined(MSWIN)
+ (char_u *)25L,
+ #else
+ (char_u *)24L,
+***************
+*** 1751,1757 ****
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! #ifdef FEAT_GUI_W32
+ {(char_u *)1L, (char_u *)0L}
+ #else
+ {(char_u *)0L, (char_u *)0L}
+--- 1751,1757 ----
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! #ifdef FEAT_GUI_MSWIN
+ {(char_u *)1L, (char_u *)0L}
+ #else
+ {(char_u *)0L, (char_u *)0L}
+***************
+*** 1897,1903 ****
+ {"mouse", NULL, P_STRING|P_VI_DEF|P_FLAGLIST,
+ (char_u *)&p_mouse, PV_NONE,
+ {
+! #if defined(WIN3264)
+ (char_u *)"a",
+ #else
+ (char_u *)"",
+--- 1897,1903 ----
+ {"mouse", NULL, P_STRING|P_VI_DEF|P_FLAGLIST,
+ (char_u *)&p_mouse, PV_NONE,
+ {
+! #if defined(MSWIN)
+ (char_u *)"a",
+ #else
+ (char_u *)"",
+***************
+*** 2260,2266 ****
+ (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,
+--- 2260,2266 ----
+ (char_u *)&p_report, PV_NONE,
+ {(char_u *)2L, (char_u *)0L} SCTX_INIT},
+ {"restorescreen", "rs", P_BOOL|P_VI_DEF,
+! #ifdef MSWIN
+ (char_u *)&p_rs, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+***************
+*** 2363,2369 ****
+ #ifdef VMS
+ (char_u *)"-",
+ #else
+! # if defined(WIN3264)
+ (char_u *)"", /* set in set_init_1() */
+ # else
+ (char_u *)"sh",
+--- 2363,2369 ----
+ #ifdef VMS
+ (char_u *)"-",
+ #else
+! # if defined(MSWIN)
+ (char_u *)"", /* set in set_init_1() */
+ # else
+ (char_u *)"sh",
+***************
+*** 2429,2435 ****
+ {"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_sxe, PV_NONE,
+ {
+! #if defined(WIN3264)
+ (char_u *)"\"&|<>()@^",
+ #else
+ (char_u *)"",
+--- 2429,2435 ----
+ {"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_sxe, PV_NONE,
+ {
+! #if defined(MSWIN)
+ (char_u *)"\"&|<>()@^",
+ #else
+ (char_u *)"",
+***************
+*** 2720,2726 ****
+ #endif
+ SCTX_INIT},
+ {"termwintype", "twt", P_STRING|P_ALLOCED|P_VI_DEF,
+! #if defined(WIN3264) && defined(FEAT_TERMINAL)
+ (char_u *)&p_twt, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ #else
+--- 2720,2726 ----
+ #endif
+ SCTX_INIT},
+ {"termwintype", "twt", P_STRING|P_ALLOCED|P_VI_DEF,
+! #if defined(MSWIN) && defined(FEAT_TERMINAL)
+ (char_u *)&p_twt, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ #else
+***************
+*** 2795,2801 ****
+ #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,
+ {(char_u *)"icons,tooltips", (char_u *)0L}
+ #else
+--- 2795,2801 ----
+ #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_MSWIN)
+ (char_u *)&p_toolbar, PV_NONE,
+ {(char_u *)"icons,tooltips", (char_u *)0L}
+ #else
+***************
+*** 2857,2863 ****
+ {"undolevels", "ul", P_NUM|P_VI_DEF,
+ (char_u *)&p_ul, PV_UL,
+ {
+! #if defined(UNIX) || defined(WIN3264) || defined(VMS)
+ (char_u *)1000L,
+ #else
+ (char_u *)100L,
+--- 2857,2863 ----
+ {"undolevels", "ul", P_NUM|P_VI_DEF,
+ (char_u *)&p_ul, PV_UL,
+ {
+! #if defined(UNIX) || defined(MSWIN) || defined(VMS)
+ (char_u *)1000L,
+ #else
+ (char_u *)100L,
+***************
+*** 3033,3039 ****
+ (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, {
+ # ifdef _WIN64
+ (char_u *)"winpty64.dll",
+--- 3033,3039 ----
+ (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(MSWIN) && defined(FEAT_TERMINAL)
+ (char_u *)&p_winptydll, PV_NONE, {
+ # ifdef _WIN64
+ (char_u *)"winpty64.dll",
+***************
+*** 3209,3215 ****
+ #ifdef FEAT_SIGNS
+ static char *(p_scl_values[]) = {"yes", "no", "auto", NULL};
+ #endif
+! #if defined(WIN3264) && defined(FEAT_TERMINAL)
+ static char *(p_twt_values[]) = {"winpty", "conpty", "", NULL};
+ #endif
+
+--- 3209,3215 ----
+ #ifdef FEAT_SIGNS
+ static char *(p_scl_values[]) = {"yes", "no", "auto", NULL};
+ #endif
+! #if defined(MSWIN) && defined(FEAT_TERMINAL)
+ static char *(p_twt_values[]) = {"winpty", "conpty", "", NULL};
+ #endif
+
+***************
+*** 3306,3312 ****
+ if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL)
+ #if defined(MSWIN)
+ || ((p = mch_getenv((char_u *)"COMSPEC")) != NULL && *p != NUL)
+! # ifdef WIN3264
+ || ((p = (char_u *)default_shell()) != NULL && *p != NUL)
+ # endif
+ #endif
+--- 3306,3312 ----
+ if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL)
+ #if defined(MSWIN)
+ || ((p = mch_getenv((char_u *)"COMSPEC")) != NULL && *p != NUL)
+! # ifdef MSWIN
+ || ((p = (char_u *)default_shell()) != NULL && *p != NUL)
+ # endif
+ #endif
+***************
+*** 3575,3581 ****
+
+ didset_options2();
+
+! # if defined(WIN3264) && defined(FEAT_GETTEXT)
+ /*
+ * If $LANG isn't set, try to get a good value for it. This makes the
+ * right language be used automatically. Don't do this for English.
+--- 3575,3581 ----
+
+ didset_options2();
+
+! # if defined(MSWIN) && defined(FEAT_GETTEXT)
+ /*
+ * If $LANG isn't set, try to get a good value for it. This makes the
+ * right language be used automatically. Don't do this for English.
+***************
+*** 3658,3664 ****
+ }
+ #endif
+
+! #if defined(WIN3264) && !defined(FEAT_GUI)
+ /* Win32 console: When GetACP() returns a different value from
+ * GetConsoleCP() set 'termencoding'. */
+ if (GetACP() != GetConsoleCP())
+--- 3658,3664 ----
+ }
+ #endif
+
+! #if defined(MSWIN) && !defined(FEAT_GUI)
+ /* Win32 console: When GetACP() returns a different value from
+ * GetConsoleCP() set 'termencoding'. */
+ if (GetACP() != GetConsoleCP())
+***************
+*** 3687,3693 ****
+ p_tenc = empty_option;
+ }
+ #endif
+! #if defined(WIN3264)
+ /* $HOME may have characters in active code page. */
+ init_homedir();
+ #endif
+--- 3687,3693 ----
+ p_tenc = empty_option;
+ }
+ #endif
+! #if defined(MSWIN)
+ /* $HOME may have characters in active code page. */
+ init_homedir();
+ #endif
+***************
+*** 3922,3928 ****
+ set_number_default("window", Rows - 1);
+
+ /* For DOS console the default is always black. */
+! #if !((defined(WIN3264)) && !defined(FEAT_GUI))
+ /*
+ * If 'background' wasn't set by the user, try guessing the value,
+ * depending on the terminal name. Only need to check for terminals
+--- 3922,3928 ----
+ set_number_default("window", Rows - 1);
+
+ /* For DOS console the default is always black. */
+! #if !((defined(MSWIN)) && !defined(FEAT_GUI))
+ /*
+ * If 'background' wasn't set by the user, try guessing the value,
+ * depending on the terminal name. Only need to check for terminals
+***************
+*** 3965,3971 ****
+ static char_u *
+ term_bg_default(void)
+ {
+! #if defined(WIN3264)
+ /* DOS console is nearly always black */
+ return (char_u *)"dark";
+ #else
+--- 3965,3971 ----
+ static char_u *
+ term_bg_default(void)
+ {
+! #if defined(MSWIN)
+ /* DOS console is nearly always black */
+ return (char_u *)"dark";
+ #else
+***************
+*** 3990,3996 ****
+ void
+ set_init_3(void)
+ {
+! #if defined(UNIX) || defined(WIN3264)
+ /*
+ * Set 'shellpipe' and 'shellredir', depending on the 'shell' option.
+ * This is done after other initializations, where 'shell' might have been
+--- 3990,3996 ----
+ void
+ set_init_3(void)
+ {
+! #if defined(UNIX) || defined(MSWIN)
+ /*
+ * Set 'shellpipe' and 'shellredir', depending on the 'shell' option.
+ * This is done after other initializations, where 'shell' might have been
+***************
+*** 4025,4031 ****
+ */
+ if ( fnamecmp(p, "csh") == 0
+ || fnamecmp(p, "tcsh") == 0
+! # if defined(WIN3264) /* also check with .exe extension */
+ || fnamecmp(p, "csh.exe") == 0
+ || fnamecmp(p, "tcsh.exe") == 0
+ # endif
+--- 4025,4031 ----
+ */
+ if ( fnamecmp(p, "csh") == 0
+ || fnamecmp(p, "tcsh") == 0
+! # if defined(MSWIN) // also check with .exe extension
+ || fnamecmp(p, "csh.exe") == 0
+ || fnamecmp(p, "tcsh.exe") == 0
+ # endif
+***************
+*** 4034,4040 ****
+ # if defined(FEAT_QUICKFIX)
+ if (do_sp)
+ {
+! # ifdef WIN3264
+ p_sp = (char_u *)">&";
+ # else
+ p_sp = (char_u *)"|& tee";
+--- 4034,4040 ----
+ # if defined(FEAT_QUICKFIX)
+ if (do_sp)
+ {
+! # ifdef MSWIN
+ p_sp = (char_u *)">&";
+ # else
+ p_sp = (char_u *)"|& tee";
+***************
+*** 4058,4064 ****
+ || fnamecmp(p, "zsh-beta") == 0
+ || fnamecmp(p, "bash") == 0
+ || fnamecmp(p, "fish") == 0
+! # ifdef WIN3264
+ || fnamecmp(p, "cmd") == 0
+ || fnamecmp(p, "sh.exe") == 0
+ || fnamecmp(p, "ksh.exe") == 0
+--- 4058,4064 ----
+ || fnamecmp(p, "zsh-beta") == 0
+ || fnamecmp(p, "bash") == 0
+ || fnamecmp(p, "fish") == 0
+! # ifdef MSWIN
+ || fnamecmp(p, "cmd") == 0
+ || fnamecmp(p, "sh.exe") == 0
+ || fnamecmp(p, "ksh.exe") == 0
+***************
+*** 4074,4080 ****
+ # if defined(FEAT_QUICKFIX)
+ if (do_sp)
+ {
+! # ifdef WIN3264
+ p_sp = (char_u *)">%s 2>&1";
+ # else
+ p_sp = (char_u *)"2>&1| tee";
+--- 4074,4080 ----
+ # if defined(FEAT_QUICKFIX)
+ if (do_sp)
+ {
+! # ifdef MSWIN
+ p_sp = (char_u *)">%s 2>&1";
+ # else
+ p_sp = (char_u *)"2>&1| tee";
+***************
+*** 4092,4098 ****
+ }
+ #endif
+
+! #if defined(WIN3264)
+ /*
+ * Set 'shellcmdflag', 'shellxquote', and 'shellquote' depending on the
+ * 'shell' option.
+--- 4092,4098 ----
+ }
+ #endif
+
+! #if defined(MSWIN)
+ /*
+ * Set 'shellcmdflag', 'shellxquote', and 'shellquote' depending on the
+ * 'shell' option.
+***************
+*** 5553,5559 ****
+ (void)compile_cap_prog(curwin->w_s);
+ (void)did_set_spell_option(TRUE);
+ #endif
+! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+ (void)opt_strings_flags(p_toolbar, p_toolbar_values, &toolbar_flags, TRUE);
+ #endif
+ #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK)
+--- 5553,5559 ----
+ (void)compile_cap_prog(curwin->w_s);
+ (void)did_set_spell_option(TRUE);
+ #endif
+! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
+ (void)opt_strings_flags(p_toolbar, p_toolbar_values, &toolbar_flags, TRUE);
+ #endif
+ #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK)
+***************
+*** 6403,6409 ****
+ }
+ }
+
+! #if defined(WIN3264)
+ /* $HOME may have characters in active code page. */
+ if (varp == &p_enc)
+ init_homedir();
+--- 6403,6409 ----
+ }
+ }
+
+! #if defined(MSWIN)
+ /* $HOME may have characters in active code page. */
+ if (varp == &p_enc)
+ init_homedir();
+***************
+*** 6810,6816 ****
+ {
+ out_str(T_ME);
+ redraw_later(CLEAR);
+! #if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ /* Since t_me has been set, this probably means that the user
+ * wants to use this as default colors. Need to reset default
+ * background/foreground colors. */
+--- 6810,6816 ----
+ {
+ out_str(T_ME);
+ redraw_later(CLEAR);
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ /* Since t_me has been set, this probably means that the user
+ * wants to use this as default colors. Need to reset default
+ * background/foreground colors. */
+***************
+*** 7228,7234 ****
+ #endif
+
+
+! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+ /* 'toolbar' */
+ else if (varp == &p_toolbar)
+ {
+--- 7228,7234 ----
+ #endif
+
+
+! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
+ /* 'toolbar' */
+ else if (varp == &p_toolbar)
+ {
+***************
+*** 7498,7504 ****
+ errmsg = e_invarg;
+ }
+ }
+! # if defined(WIN3264)
+ // 'termwintype'
+ else if (varp == &p_twt)
+ {
+--- 7498,7504 ----
+ errmsg = e_invarg;
+ }
+ }
+! # if defined(MSWIN)
+ // 'termwintype'
+ else if (varp == &p_twt)
+ {
+*** ../vim-8.1.0940/src/option.h 2019-02-15 21:06:05.342289715 +0100
+--- src/option.h 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 18,24 ****
+ #ifdef AMIGA
+ # 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__)
+--- 18,24 ----
+ #ifdef AMIGA
+ # 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(MSWIN)
+ # 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__)
+***************
+*** 546,555 ****
+ #ifdef FEAT_RIGHTLEFT
+ EXTERN int p_hkmap; /* 'hkmap' */
+ EXTERN int p_hkmapp; /* 'hkmapp' */
+- # ifdef FEAT_FKMAP
+- EXTERN int p_fkmap; /* 'fkmap' */
+- EXTERN int p_altkeymap; /* 'altkeymap' */
+- # endif
+ # ifdef FEAT_ARABIC
+ EXTERN int p_arshape; /* 'arabicshape' */
+ # endif
+--- 546,551 ----
+***************
+*** 694,700 ****
+ #if defined(FEAT_QUICKFIX)
+ EXTERN long p_pvh; /* 'previewheight' */
+ #endif
+! #ifdef WIN3264
+ EXTERN int p_rs; /* 'restorescreen' */
+ #endif
+ #ifdef FEAT_RIGHTLEFT
+--- 690,696 ----
+ #if defined(FEAT_QUICKFIX)
+ EXTERN long p_pvh; /* 'previewheight' */
+ #endif
+! #ifdef MSWIN
+ EXTERN int p_rs; /* 'restorescreen' */
+ #endif
+ #ifdef FEAT_RIGHTLEFT
+***************
+*** 827,833 ****
+ #ifdef FEAT_TERMGUICOLORS
+ EXTERN int p_tgc; /* 'termguicolors' */
+ #endif
+! #if defined(WIN3264) && defined(FEAT_TERMINAL)
+ EXTERN char_u *p_twt; // 'termwintype'
+ #endif
+ EXTERN int p_terse; /* 'terse' */
+--- 823,829 ----
+ #ifdef FEAT_TERMGUICOLORS
+ EXTERN int p_tgc; /* 'termguicolors' */
+ #endif
+! #if defined(MSWIN) && defined(FEAT_TERMINAL)
+ EXTERN char_u *p_twt; // 'termwintype'
+ #endif
+ EXTERN int p_terse; /* 'terse' */
+***************
+*** 848,854 ****
+ EXTERN long p_ttm; /* 'ttimeoutlen' */
+ EXTERN int p_tbi; /* 'ttybuiltin' */
+ EXTERN int p_tf; /* 'ttyfast' */
+! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+ EXTERN char_u *p_toolbar; /* 'toolbar' */
+ EXTERN unsigned toolbar_flags;
+ # ifdef IN_OPTION_C
+--- 844,850 ----
+ EXTERN long p_ttm; /* 'ttimeoutlen' */
+ EXTERN int p_tbi; /* 'ttybuiltin' */
+ EXTERN int p_tf; /* 'ttyfast' */
+! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
+ EXTERN char_u *p_toolbar; /* 'toolbar' */
+ EXTERN unsigned toolbar_flags;
+ # ifdef IN_OPTION_C
+***************
+*** 945,951 ****
+ EXTERN long p_wmh; /* 'winminheight' */
+ EXTERN long p_wmw; /* 'winminwidth' */
+ EXTERN long p_wiw; /* 'winwidth' */
+! #if defined(WIN3264) && defined(FEAT_TERMINAL)
+ EXTERN char_u *p_winptydll; /* 'winptydll' */
+ #endif
+ EXTERN int p_ws; /* 'wrapscan' */
+--- 941,947 ----
+ EXTERN long p_wmh; /* 'winminheight' */
+ EXTERN long p_wmw; /* 'winminwidth' */
+ EXTERN long p_wiw; /* 'winwidth' */
+! #if defined(MSWIN) && defined(FEAT_TERMINAL)
+ EXTERN char_u *p_winptydll; /* 'winptydll' */
+ #endif
+ EXTERN int p_ws; /* 'wrapscan' */
+*** ../vim-8.1.0940/src/os_mswin.c 2019-02-14 14:08:01.178543302 +0100
+--- src/os_mswin.c 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 32,38 ****
+ #endif
+
+ #ifndef PROTO
+! # if defined(FEAT_TITLE) && !defined(FEAT_GUI_W32)
+ # include <shellapi.h>
+ # endif
+
+--- 32,38 ----
+ #endif
+
+ #ifndef PROTO
+! # if defined(FEAT_TITLE) && !defined(FEAT_GUI_MSWIN)
+ # include <shellapi.h>
+ # endif
+
+***************
+*** 3091,3097 ****
+ }
+ if (STRCMP(name, "*") == 0)
+ {
+! #if defined(FEAT_GUI_W32)
+ CHOOSEFONT cf;
+ /* if name is "*", bring up std font dialog: */
+ vim_memset(&cf, 0, sizeof(cf));
+--- 3091,3097 ----
+ }
+ if (STRCMP(name, "*") == 0)
+ {
+! #if defined(FEAT_GUI_MSWIN)
+ CHOOSEFONT cf;
+ /* if name is "*", bring up std font dialog: */
+ vim_memset(&cf, 0, sizeof(cf));
+*** ../vim-8.1.0940/src/os_unix.c 2019-02-10 22:43:30.158824050 +0100
+--- src/os_unix.c 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 49,55 ****
+ #endif
+
+ #ifdef __CYGWIN__
+! # ifndef WIN32
+ # include <cygwin/version.h>
+ # include <sys/cygwin.h> /* for cygwin_conv_to_posix_path() and/or
+ * for cygwin_conv_path() */
+--- 49,55 ----
+ #endif
+
+ #ifdef __CYGWIN__
+! # ifndef MSWIN
+ # include <cygwin/version.h>
+ # include <sys/cygwin.h> /* for cygwin_conv_to_posix_path() and/or
+ * for cygwin_conv_path() */
+*** ../vim-8.1.0940/src/os_w32exe.c 2019-01-24 16:38:58.272712472 +0100
+--- src/os_w32exe.c 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 22,28 ****
+
+ /* cproto doesn't create a prototype for main() */
+ int _cdecl
+! #if defined(FEAT_GUI_W32)
+ VimMain
+ #else
+ main
+--- 22,28 ----
+
+ /* cproto doesn't create a prototype for main() */
+ int _cdecl
+! #if defined(FEAT_GUI_MSWIN)
+ VimMain
+ #else
+ main
+***************
+*** 104,110 ****
+ pSaveInst = SaveInst;
+ # endif
+ pmain =
+! # if defined(FEAT_GUI_W32)
+ //&& defined(__MINGW32__)
+ VimMain
+ # else
+--- 104,110 ----
+ pSaveInst = SaveInst;
+ # endif
+ pmain =
+! # if defined(FEAT_GUI_MSWIN)
+ //&& defined(__MINGW32__)
+ VimMain
+ # else
+*** ../vim-8.1.0940/src/os_win32.c 2019-02-17 15:00:48.450637077 +0100
+--- src/os_win32.c 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 10,16 ****
+ * os_win32.c
+ *
+ * Used for both the console version and the Win32 GUI. A lot of code is for
+! * the console version only, so there is a lot of "#ifndef FEAT_GUI_W32".
+ *
+ * Win32 (Windows NT and Windows 95) system-dependent routines.
+ * Portions lifted from the Win32 SDK samples, the MSDOS-dependent code,
+--- 10,16 ----
+ * os_win32.c
+ *
+ * Used for both the console version and the Win32 GUI. A lot of code is for
+! * the console version only, so there is a lot of "#ifndef FEAT_GUI_MSWIN".
+ *
+ * Win32 (Windows NT and Windows 95) system-dependent routines.
+ * Portions lifted from the Win32 SDK samples, the MSDOS-dependent code,
+***************
+*** 45,51 ****
+ #endif
+
+ #ifndef PROTO
+! # if defined(FEAT_TITLE) && !defined(FEAT_GUI_W32)
+ # include <shellapi.h>
+ # endif
+ #endif
+--- 45,51 ----
+ #endif
+
+ #ifndef PROTO
+! # if defined(FEAT_TITLE) && !defined(FEAT_GUI_MSWIN)
+ # include <shellapi.h>
+ # endif
+ #endif
+***************
+*** 151,157 ****
+ # define wcsicmp(a, b) wcscmpi((a), (b))
+ #endif
+
+! #ifndef FEAT_GUI_W32
+ /* Win32 Console handles for input and output */
+ static HANDLE g_hConIn = INVALID_HANDLE_VALUE;
+ static HANDLE g_hConOut = INVALID_HANDLE_VALUE;
+--- 151,157 ----
+ # define wcsicmp(a, b) wcscmpi((a), (b))
+ #endif
+
+! #ifndef FEAT_GUI_MSWIN
+ /* Win32 Console handles for input and output */
+ static HANDLE g_hConIn = INVALID_HANDLE_VALUE;
+ static HANDLE g_hConOut = INVALID_HANDLE_VALUE;
+***************
+*** 193,199 ****
+ static int conpty_stable = 0;
+ static void vtp_flag_init();
+
+! #ifndef FEAT_GUI_W32
+ static int vtp_working = 0;
+ static void vtp_init();
+ static void vtp_exit();
+--- 193,199 ----
+ static int conpty_stable = 0;
+ static void vtp_flag_init();
+
+! #ifndef FEAT_GUI_MSWIN
+ static int vtp_working = 0;
+ static void vtp_init();
+ static void vtp_exit();
+***************
+*** 227,233 ****
+ # define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
+ #endif
+
+! #ifndef FEAT_GUI_W32
+ static int suppress_winsize = 1; /* don't fiddle with console */
+ #endif
+
+--- 227,233 ----
+ # define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
+ #endif
+
+! #ifndef FEAT_GUI_MSWIN
+ static int suppress_winsize = 1; /* don't fiddle with console */
+ #endif
+
+***************
+*** 235,241 ****
+
+ static BOOL win8_or_later = FALSE;
+
+! #ifndef FEAT_GUI_W32
+ /* Dynamic loading for portability */
+ typedef struct _DYN_CONSOLE_SCREEN_BUFFER_INFOEX
+ {
+--- 235,241 ----
+
+ static BOOL win8_or_later = FALSE;
+
+! #ifndef FEAT_GUI_MSWIN
+ /* Dynamic loading for portability */
+ typedef struct _DYN_CONSOLE_SCREEN_BUFFER_INFOEX
+ {
+***************
+*** 284,290 ****
+ return ver;
+ }
+
+! #ifndef FEAT_GUI_W32
+ /*
+ * Version of ReadConsoleInput() that works with IME.
+ * Works around problems on Windows 8.
+--- 284,290 ----
+ return ver;
+ }
+
+! #ifndef FEAT_GUI_MSWIN
+ /*
+ * Version of ReadConsoleInput() that works with IME.
+ * Works around problems on Windows 8.
+***************
+*** 830,836 ****
+ }
+ }
+
+! #ifndef FEAT_GUI_W32
+
+ #define SHIFT (SHIFT_PRESSED)
+ #define CTRL (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED)
+--- 830,836 ----
+ }
+ }
+
+! #ifndef FEAT_GUI_MSWIN
+
+ #define SHIFT (SHIFT_PRESSED)
+ #define CTRL (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED)
+***************
+*** 1122,1128 ****
+ # pragma optimize("", on)
+ #endif
+
+! #endif /* FEAT_GUI_W32 */
+
+
+ #ifdef FEAT_MOUSE
+--- 1122,1128 ----
+ # pragma optimize("", on)
+ #endif
+
+! #endif /* FEAT_GUI_MSWIN */
+
+
+ #ifdef FEAT_MOUSE
+***************
+*** 1130,1136 ****
+ /*
+ * For the GUI the mouse handling is in gui_w32.c.
+ */
+! # ifdef FEAT_GUI_W32
+ void
+ mch_setmouse(int on UNUSED)
+ {
+--- 1130,1136 ----
+ /*
+ * For the GUI the mouse handling is in gui_w32.c.
+ */
+! # ifdef FEAT_GUI_MSWIN
+ void
+ mch_setmouse(int on UNUSED)
+ {
+***************
+*** 1441,1447 ****
+ return TRUE;
+ }
+
+! # endif /* FEAT_GUI_W32 */
+ #endif /* FEAT_MOUSE */
+
+
+--- 1441,1447 ----
+ return TRUE;
+ }
+
+! # endif /* FEAT_GUI_MSWIN */
+ #endif /* FEAT_MOUSE */
+
+
+***************
+*** 1481,1487 ****
+ }
+ #endif
+
+! #ifndef FEAT_GUI_W32 /* this isn't used for the GUI */
+ /*
+ * Handle FOCUS_EVENT.
+ */
+--- 1481,1487 ----
+ }
+ #endif
+
+! #ifndef FEAT_GUI_MSWIN /* this isn't used for the GUI */
+ /*
+ * Handle FOCUS_EVENT.
+ */
+***************
+*** 1775,1781 ****
+ #endif
+ }
+ }
+! #endif /* !FEAT_GUI_W32 */
+
+
+ /*
+--- 1775,1781 ----
+ #endif
+ }
+ }
+! #endif /* !FEAT_GUI_MSWIN */
+
+
+ /*
+***************
+*** 1793,1799 ****
+ long time UNUSED,
+ int tb_change_cnt UNUSED)
+ {
+! #ifndef FEAT_GUI_W32 /* this isn't used for the GUI */
+
+ int len;
+ int c;
+--- 1793,1799 ----
+ long time UNUSED,
+ int tb_change_cnt UNUSED)
+ {
+! #ifndef FEAT_GUI_MSWIN /* this isn't used for the GUI */
+
+ int len;
+ int c;
+***************
+*** 2006,2014 ****
+ }
+ return len;
+
+! #else /* FEAT_GUI_W32 */
+ return 0;
+! #endif /* FEAT_GUI_W32 */
+ }
+
+ #ifndef PROTO
+--- 2006,2014 ----
+ }
+ return len;
+
+! #else /* FEAT_GUI_MSWIN */
+ return 0;
+! #endif /* FEAT_GUI_MSWIN */
+ }
+
+ #ifndef PROTO
+***************
+*** 2123,2129 ****
+ # define SET_INVALID_PARAM_HANDLER
+ #endif
+
+! #ifdef FEAT_GUI_W32
+
+ /*
+ * GUI version of mch_init().
+--- 2123,2129 ----
+ # define SET_INVALID_PARAM_HANDLER
+ #endif
+
+! #ifdef FEAT_GUI_MSWIN
+
+ /*
+ * GUI version of mch_init().
+***************
+*** 2196,2202 ****
+ }
+
+
+! #else /* FEAT_GUI_W32 */
+
+ #define SRWIDTH(sr) ((sr).Right - (sr).Left + 1)
+ #define SRHEIGHT(sr) ((sr).Bottom - (sr).Top + 1)
+--- 2196,2202 ----
+ }
+
+
+! #else /* FEAT_GUI_MSWIN */
+
+ #define SRWIDTH(sr) ((sr).Right - (sr).Left + 1)
+ #define SRHEIGHT(sr) ((sr).Bottom - (sr).Top + 1)
+***************
+*** 2751,2757 ****
+
+ exit(r);
+ }
+! #endif /* !FEAT_GUI_W32 */
+
+ /*
+ * Do we have an interactive window?
+--- 2751,2757 ----
+
+ exit(r);
+ }
+! #endif /* !FEAT_GUI_MSWIN */
+
+ /*
+ * Do we have an interactive window?
+***************
+*** 2763,2769 ****
+ {
+ get_exe_name();
+
+! #ifdef FEAT_GUI_W32
+ return OK; /* GUI always has a tty */
+ #else
+ if (isatty(1))
+--- 2763,2769 ----
+ {
+ get_exe_name();
+
+! #ifdef FEAT_GUI_MSWIN
+ return OK; /* GUI always has a tty */
+ #else
+ if (isatty(1))
+***************
+*** 3852,3858 ****
+ #endif
+ }
+
+! #ifndef FEAT_GUI_W32
+
+ /*
+ * handler for ctrl-break, ctrl-c interrupts, and fatal events.
+--- 3852,3858 ----
+ #endif
+ }
+
+! #ifndef FEAT_GUI_MSWIN
+
+ /*
+ * handler for ctrl-break, ctrl-c interrupts, and fatal events.
+***************
+*** 4168,4174 ****
+ }
+ suppress_winsize = 0;
+ }
+! #endif /* FEAT_GUI_W32 */
+
+ static BOOL
+ vim_create_process(
+--- 4168,4174 ----
+ }
+ suppress_winsize = 0;
+ }
+! #endif /* FEAT_GUI_MSWIN */
+
+ static BOOL
+ vim_create_process(
+***************
+*** 4249,4255 ****
+ }
+
+
+! #if defined(FEAT_GUI_W32) || defined(PROTO)
+
+ /*
+ * Specialised version of system() for Win32 GUI mode.
+--- 4249,4255 ----
+ }
+
+
+! #if defined(FEAT_GUI_MSWIN) || defined(PROTO)
+
+ /*
+ * Specialised version of system() for Win32 GUI mode.
+***************
+*** 5124,5130 ****
+ else
+ {
+ x = -1;
+! #ifdef FEAT_GUI_W32
+ emsg(_("E371: Command not found"));
+ #endif
+ }
+--- 5124,5130 ----
+ else
+ {
+ x = -1;
+! #ifdef FEAT_GUI_MSWIN
+ emsg(_("E371: Command not found"));
+ #endif
+ }
+***************
+*** 5144,5150 ****
+ else
+ {
+ cmdlen = (
+! #ifdef FEAT_GUI_W32
+ (!p_stmp ? 0 : STRLEN(vimrun_path)) +
+ #endif
+ STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10);
+--- 5144,5150 ----
+ else
+ {
+ cmdlen = (
+! #ifdef FEAT_GUI_MSWIN
+ (!p_stmp ? 0 : STRLEN(vimrun_path)) +
+ #endif
+ STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10);
+***************
+*** 5152,5158 ****
+ newcmd = lalloc(cmdlen, TRUE);
+ if (newcmd != NULL)
+ {
+! #if defined(FEAT_GUI_W32)
+ if (need_vimrun_warning)
+ {
+ char *msg = _("VIMRUN.EXE not found in your $PATH.\n"
+--- 5152,5158 ----
+ newcmd = lalloc(cmdlen, TRUE);
+ if (newcmd != NULL)
+ {
+! #if defined(FEAT_GUI_MSWIN)
+ if (need_vimrun_warning)
+ {
+ char *msg = _("VIMRUN.EXE not found in your $PATH.\n"
+***************
+*** 5196,5202 ****
+
+ /* Print the return value, unless "vimrun" was used. */
+ if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent
+! #if defined(FEAT_GUI_W32)
+ && ((options & SHELL_DOOUT) || s_dont_use_vimrun || !p_stmp)
+ #endif
+ )
+--- 5196,5202 ----
+
+ /* Print the return value, unless "vimrun" was used. */
+ if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent
+! #if defined(FEAT_GUI_MSWIN)
+ && ((options & SHELL_DOOUT) || s_dont_use_vimrun || !p_stmp)
+ #endif
+ )
+***************
+*** 5736,5742 ****
+ #endif
+
+
+! #ifndef FEAT_GUI_W32
+
+ /*
+ * Start termcap mode
+--- 5736,5742 ----
+ #endif
+
+
+! #ifndef FEAT_GUI_MSWIN
+
+ /*
+ * Start termcap mode
+***************
+*** 5852,5861 ****
+
+ g_fTermcapMode = FALSE;
+ }
+! #endif /* FEAT_GUI_W32 */
+
+
+! #ifdef FEAT_GUI_W32
+ void
+ mch_write(
+ char_u *s UNUSED,
+--- 5852,5861 ----
+
+ g_fTermcapMode = FALSE;
+ }
+! #endif /* FEAT_GUI_MSWIN */
+
+
+! #ifdef FEAT_GUI_MSWIN
+ void
+ mch_write(
+ char_u *s UNUSED,
+***************
+*** 6692,6698 ****
+ #endif
+ }
+
+! #endif /* FEAT_GUI_W32 */
+
+
+ /*
+--- 6692,6698 ----
+ #endif
+ }
+
+! #endif /* FEAT_GUI_MSWIN */
+
+
+ /*
+***************
+*** 6703,6709 ****
+ long msec,
+ int ignoreinput UNUSED)
+ {
+! #ifdef FEAT_GUI_W32
+ Sleep((int)msec); /* never wait for input */
+ #else /* Console */
+ if (ignoreinput)
+--- 6703,6709 ----
+ long msec,
+ int ignoreinput UNUSED)
+ {
+! #ifdef FEAT_GUI_MSWIN
+ Sleep((int)msec); /* never wait for input */
+ #else /* Console */
+ if (ignoreinput)
+***************
+*** 6771,6777 ****
+ void
+ mch_breakcheck(int force)
+ {
+! #ifndef FEAT_GUI_W32 /* never used */
+ if (g_fCtrlCPressed || g_fCBrkPressed)
+ {
+ ctrl_break_was_pressed = g_fCBrkPressed;
+--- 6771,6777 ----
+ void
+ mch_breakcheck(int force)
+ {
+! #ifndef FEAT_GUI_MSWIN /* never used */
+ if (g_fCtrlCPressed || g_fCBrkPressed)
+ {
+ ctrl_break_was_pressed = g_fCBrkPressed;
+***************
+*** 7696,7702 ****
+ vtp_flag_init(void)
+ {
+ DWORD ver = get_build_number();
+! #ifndef FEAT_GUI_W32
+ DWORD mode;
+ HANDLE out;
+
+--- 7696,7702 ----
+ vtp_flag_init(void)
+ {
+ DWORD ver = get_build_number();
+! #ifndef FEAT_GUI_MSWIN
+ DWORD mode;
+ HANDLE out;
+
+***************
+*** 7716,7722 ****
+
+ }
+
+! #if !defined(FEAT_GUI_W32) || defined(PROTO)
+
+ static void
+ vtp_init(void)
+--- 7716,7722 ----
+
+ }
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
+
+ static void
+ vtp_init(void)
+***************
+*** 7941,7947 ****
+ return conpty_stable;
+ }
+
+! #if !defined(FEAT_GUI_W32) || defined(PROTO)
+ void
+ resize_console_buf(void)
+ {
+--- 7941,7947 ----
+ return conpty_stable;
+ }
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
+ void
+ resize_console_buf(void)
+ {
+*** ../vim-8.1.0940/src/os_win32.h 2019-01-24 17:18:37.599462306 +0100
+--- src/os_win32.h 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 70,76 ****
+ #if defined(__DATE__) && defined(__TIME__)
+ # define HAVE_DATE_TIME
+ #endif
+! #ifndef FEAT_GUI_W32 /* GUI works different */
+ # define BREAKCHECK_SKIP 1 /* call mch_breakcheck() each time, it's fast */
+ #endif
+
+--- 70,76 ----
+ #if defined(__DATE__) && defined(__TIME__)
+ # define HAVE_DATE_TIME
+ #endif
+! #ifndef FEAT_GUI_MSWIN /* GUI works different */
+ # define BREAKCHECK_SKIP 1 /* call mch_breakcheck() each time, it's fast */
+ #endif
+
+***************
+*** 78,84 ****
+
+ #define HAVE_PUTENV /* at least Bcc 5.2 and MSC have it */
+
+! #ifdef FEAT_GUI_W32
+ # define NO_CONSOLE /* don't included console-only code */
+ #endif
+
+--- 78,84 ----
+
+ #define HAVE_PUTENV /* at least Bcc 5.2 and MSC have it */
+
+! #ifdef FEAT_GUI_MSWIN
+ # define NO_CONSOLE /* don't included console-only code */
+ #endif
+
+*** ../vim-8.1.0940/src/proto.h 2019-02-16 15:09:21.217946198 +0100
+--- src/proto.h 2019-02-17 17:29:18.556788840 +0100
+***************
+*** 38,44 ****
+ # if defined(UNIX) || defined(VMS)
+ # include "os_unix.pro"
+ # endif
+! # ifdef WIN3264
+ # include "os_win32.pro"
+ # include "os_mswin.pro"
+ # include "winclip.pro"
+--- 38,44 ----
+ # if defined(UNIX) || defined(VMS)
+ # include "os_unix.pro"
+ # endif
+! # ifdef MSWIN
+ # include "os_win32.pro"
+ # include "os_mswin.pro"
+ # include "winclip.pro"
+***************
+*** 266,272 ****
+ extern char_u *vimpty_getenv(const char_u *string); /* in misc2.c */
+ # endif
+ # endif
+! # ifdef FEAT_GUI_W32
+ # include "gui_w32.pro"
+ # endif
+ # ifdef FEAT_GUI_GTK
+--- 266,272 ----
+ extern char_u *vimpty_getenv(const char_u *string); /* in misc2.c */
+ # endif
+ # endif
+! # ifdef FEAT_GUI_MSWIN
+ # include "gui_w32.pro"
+ # endif
+ # ifdef FEAT_GUI_GTK
+*** ../vim-8.1.0940/src/screen.c 2019-02-16 15:09:21.217946198 +0100
+--- src/screen.c 2019-02-17 17:29:18.560788817 +0100
+***************
+*** 7974,7980 ****
+
+ screen_attr = attr;
+ if (full_screen
+! #ifdef WIN3264
+ && termcap_active
+ #endif
+ )
+--- 7974,7980 ----
+
+ screen_attr = attr;
+ if (full_screen
+! #ifdef MSWIN
+ && termcap_active
+ #endif
+ )
+***************
+*** 8081,8087 ****
+ int do_ME = FALSE; /* output T_ME code */
+
+ if (screen_attr != 0
+! #ifdef WIN3264
+ && termcap_active
+ #endif
+ )
+--- 8081,8087 ----
+ int do_ME = FALSE; /* output T_ME code */
+
+ if (screen_attr != 0
+! #ifdef MSWIN
+ && termcap_active
+ #endif
+ )
+*** ../vim-8.1.0940/src/search.c 2019-02-16 15:09:21.213946217 +0100
+--- src/search.c 2019-02-17 17:29:18.560788817 +0100
+***************
+*** 1246,1252 ****
+ }
+ if (options & SEARCH_REV)
+ {
+! #ifdef WIN32
+ /* There is a bug in the Visual C++ 2.2 compiler which means that
+ * dirc always ends up being '/' */
+ dirc = (dirc == '/') ? '?' : '/';
+--- 1246,1252 ----
+ }
+ if (options & SEARCH_REV)
+ {
+! #ifdef MSWIN
+ /* There is a bug in the Visual C++ 2.2 compiler which means that
+ * dirc always ends up being '/' */
+ dirc = (dirc == '/') ? '?' : '/';
+*** ../vim-8.1.0940/src/structs.h 2019-02-16 15:09:21.217946198 +0100
+--- src/structs.h 2019-02-17 17:29:18.560788817 +0100
+***************
+*** 1073,1079 ****
+ {
+ int vc_type; /* zero or one of the CONV_ values */
+ int vc_factor; /* max. expansion factor */
+! # ifdef WIN3264
+ int vc_cpfrom; /* codepage to convert from (CONV_CODEPAGE) */
+ int vc_cpto; /* codepage to convert to (CONV_CODEPAGE) */
+ # endif
+--- 1073,1079 ----
+ {
+ int vc_type; /* zero or one of the CONV_ values */
+ int vc_factor; /* max. expansion factor */
+! # ifdef MSWIN
+ int vc_cpfrom; /* codepage to convert from (CONV_CODEPAGE) */
+ int vc_cpto; /* codepage to convert to (CONV_CODEPAGE) */
+ # endif
+***************
+*** 1101,1107 ****
+ #define CONV_TO_LATIN1 3
+ #define CONV_TO_LATIN9 4
+ #define CONV_ICONV 5
+! #ifdef WIN3264
+ # define CONV_CODEPAGE 10 /* codepage -> codepage */
+ #endif
+ #ifdef MACOS_X
+--- 1101,1107 ----
+ #define CONV_TO_LATIN1 3
+ #define CONV_TO_LATIN9 4
+ #define CONV_ICONV 5
+! #ifdef MSWIN
+ # define CONV_CODEPAGE 10 /* codepage -> codepage */
+ #endif
+ #ifdef MACOS_X
+***************
+*** 1187,1193 ****
+
+ #ifdef FEAT_NUM64
+ /* Use 64-bit Number. */
+! # ifdef WIN3264
+ # ifdef PROTO
+ typedef long varnumber_T;
+ typedef unsigned long uvarnumber_T;
+--- 1187,1193 ----
+
+ #ifdef FEAT_NUM64
+ /* Use 64-bit Number. */
+! # ifdef MSWIN
+ # ifdef PROTO
+ typedef long varnumber_T;
+ typedef unsigned long uvarnumber_T;
+***************
+*** 1543,1549 ****
+ #ifdef UNIX
+ pid_t jv_pid;
+ #endif
+! #ifdef WIN32
+ PROCESS_INFORMATION jv_proc_info;
+ HANDLE jv_job_object;
+ #endif
+--- 1543,1549 ----
+ #ifdef UNIX
+ pid_t jv_pid;
+ #endif
+! #ifdef MSWIN
+ PROCESS_INFORMATION jv_proc_info;
+ HANDLE jv_job_object;
+ #endif
+***************
+*** 1554,1560 ****
+ #ifdef UNIX
+ char_u *jv_termsig; /* allocated */
+ #endif
+! #ifdef WIN3264
+ char_u *jv_tty_type; // allocated
+ #endif
+ int jv_exitval;
+--- 1554,1560 ----
+ #ifdef UNIX
+ char_u *jv_termsig; /* allocated */
+ #endif
+! #ifdef MSWIN
+ char_u *jv_tty_type; // allocated
+ #endif
+ int jv_exitval;
+***************
+*** 1670,1676 ****
+ * message when the deadline was set. If it gets longer (something was
+ * received) the deadline is reset. */
+ size_t ch_wait_len;
+! #ifdef WIN32
+ DWORD ch_deadline;
+ #else
+ struct timeval ch_deadline;
+--- 1670,1676 ----
+ * message when the deadline was set. If it gets longer (something was
+ * received) the deadline is reset. */
+ size_t ch_wait_len;
+! #ifdef MSWIN
+ DWORD ch_deadline;
+ #else
+ struct timeval ch_deadline;
+***************
+*** 1720,1726 ****
+ /* callback for Netbeans when channel is
+ * closed */
+
+! #ifdef WIN32
+ int ch_named_pipe; /* using named pipe instead of pty */
+ #endif
+ char_u *ch_callback; /* call when any msg is not handled */
+--- 1720,1726 ----
+ /* callback for Netbeans when channel is
+ * closed */
+
+! #ifdef MSWIN
+ int ch_named_pipe; /* using named pipe instead of pty */
+ #endif
+ char_u *ch_callback; /* call when any msg is not handled */
+***************
+*** 3225,3231 ****
+ #ifdef FEAT_BEVAL_TIP
+ BalloonEval *tip; /* tooltip for this menu item */
+ #endif
+! #ifdef FEAT_GUI_W32
+ UINT id; /* Id of menu item */
+ HMENU submenu_id; /* If this is submenu, add children here */
+ HWND tearoff_handle; /* hWnd of tearoff if created */
+--- 3225,3231 ----
+ #ifdef FEAT_BEVAL_TIP
+ BalloonEval *tip; /* tooltip for this menu item */
+ #endif
+! #ifdef FEAT_GUI_MSWIN
+ UINT id; /* Id of menu item */
+ HMENU submenu_id; /* If this is submenu, add children here */
+ HWND tearoff_handle; /* hWnd of tearoff if created */
+*** ../vim-8.1.0940/src/syntax.c 2019-01-24 17:18:37.595462334 +0100
+--- src/syntax.c 2019-02-17 17:29:18.560788817 +0100
+***************
+*** 8274,8280 ****
+ void
+ restore_cterm_colors(void)
+ {
+! #if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ /* Since t_me has been set, this probably means that the user
+ * wants to use this as default colors. Need to reset default
+ * background/foreground colors. */
+--- 8274,8280 ----
+ void
+ restore_cterm_colors(void)
+ {
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ /* Since t_me has been set, this probably means that the user
+ * wants to use this as default colors. Need to reset default
+ * background/foreground colors. */
+***************
+*** 9559,9565 ****
+ at_en.ae_u.cterm.fg_color = sgp->sg_cterm_fg;
+ at_en.ae_u.cterm.bg_color = sgp->sg_cterm_bg;
+ # ifdef FEAT_TERMGUICOLORS
+! # ifdef WIN3264
+ {
+ int id;
+ guicolor_T fg, bg;
+--- 9559,9565 ----
+ at_en.ae_u.cterm.fg_color = sgp->sg_cterm_fg;
+ at_en.ae_u.cterm.bg_color = sgp->sg_cterm_bg;
+ # ifdef FEAT_TERMGUICOLORS
+! # ifdef MSWIN
+ {
+ int id;
+ guicolor_T fg, bg;
+***************
+*** 9822,9829 ****
+ }
+ #endif
+
+! #if (defined(WIN3264) \
+! && !defined(FEAT_GUI_W32) \
+ && defined(FEAT_TERMGUICOLORS)) || defined(PROTO)
+ void
+ syn_id2cterm_bg(int hl_id, int *fgp, int *bgp)
+--- 9822,9829 ----
+ }
+ #endif
+
+! #if (defined(MSWIN) \
+! && !defined(FEAT_GUI_MSWIN) \
+ && defined(FEAT_TERMGUICOLORS)) || defined(PROTO)
+ void
+ syn_id2cterm_bg(int hl_id, int *fgp, int *bgp)
+*** ../vim-8.1.0940/src/term.c 2019-02-16 16:47:58.130925240 +0100
+--- src/term.c 2019-02-17 17:29:18.560788817 +0100
+***************
+*** 533,539 ****
+ {K_PAGEUP, "\316I"},
+ # endif
+
+! # if defined(WIN3264) || defined(ALL_BUILTIN_TCAPS)
+ /*
+ * These codes are valid for the Win32 Console . The entries that start with
+ * ESC | are translated into console calls in os_win32.c. The function keys
+--- 533,539 ----
+ {K_PAGEUP, "\316I"},
+ # endif
+
+! # if defined(MSWIN) || defined(ALL_BUILTIN_TCAPS)
+ /*
+ * These codes are valid for the Win32 Console . The entries that start with
+ * ESC | are translated into console calls in os_win32.c. The function keys
+***************
+*** 2036,2042 ****
+ /* termcap failed to report size */
+ /* set defaults, in case ui_get_shellsize() also fails */
+ width = 80;
+! #if defined(WIN3264)
+ height = 25; /* console is often 25 lines */
+ #else
+ height = 24; /* most terminals are 24 lines */
+--- 2036,2042 ----
+ /* termcap failed to report size */
+ /* set defaults, in case ui_get_shellsize() also fails */
+ width = 80;
+! #if defined(MSWIN)
+ height = 25; /* console is often 25 lines */
+ #else
+ height = 24; /* most terminals are 24 lines */
+***************
+*** 4082,4088 ****
+ return;
+ }
+
+! #if defined(WIN3264) && !defined(FEAT_GUI)
+ s = vim_strnsave(string, (int)STRLEN(string) + 1);
+ #else
+ s = vim_strsave(string);
+--- 4082,4088 ----
+ return;
+ }
+
+! #if defined(MSWIN) && !defined(FEAT_GUI)
+ s = vim_strnsave(string, (int)STRLEN(string) + 1);
+ #else
+ s = vim_strsave(string);
+***************
+*** 4097,4103 ****
+ s[0] = term_7to8bit(string);
+ }
+
+! #if defined(WIN3264) && !defined(FEAT_GUI)
+ if (s[0] == K_NUL)
+ {
+ STRMOVE(s + 1, s);
+--- 4097,4103 ----
+ s[0] = term_7to8bit(string);
+ }
+
+! #if defined(MSWIN) && !defined(FEAT_GUI)
+ if (s[0] == K_NUL)
+ {
+ STRMOVE(s + 1, s);
+***************
+*** 6721,6727 ****
+ }
+ #endif
+
+! #if (defined(WIN3264) && !defined(FEAT_GUI)) || defined(PROTO)
+ static char ksme_str[20];
+ static char ksmr_str[20];
+ static char ksmd_str[20];
+--- 6721,6727 ----
+ }
+ #endif
+
+! #if (defined(MSWIN) && !defined(FEAT_GUI)) || defined(PROTO)
+ static char ksme_str[20];
+ static char ksmr_str[20];
+ static char ksmd_str[20];
+***************
+*** 6917,6923 ****
+ /* On MS-Windows an RGB macro is available and it produces 0x00bbggrr color
+ * values as used by the MS-Windows GDI api. It should be used only for
+ * MS-Windows GDI builds. */
+! # if defined(RGB) && defined(WIN32) && !defined(FEAT_GUI)
+ # undef RGB
+ # endif
+ # ifndef RGB
+--- 6917,6923 ----
+ /* On MS-Windows an RGB macro is available and it produces 0x00bbggrr color
+ * values as used by the MS-Windows GDI api. It should be used only for
+ * MS-Windows GDI builds. */
+! # if defined(RGB) && defined(MSWIN) && !defined(FEAT_GUI)
+ # undef RGB
+ # endif
+ # ifndef RGB
+***************
+*** 7085,7091 ****
+ }
+ #endif
+
+! #if (defined(WIN3264) && !defined(FEAT_GUI_W32)) || defined(FEAT_TERMINAL) \
+ || defined(PROTO)
+ static int cube_value[] = {
+ 0x00, 0x5F, 0x87, 0xAF, 0xD7, 0xFF
+--- 7085,7091 ----
+ }
+ #endif
+
+! #if (defined(MSWIN) && !defined(FEAT_GUI_MSWIN)) || defined(FEAT_TERMINAL) \
+ || defined(PROTO)
+ static int cube_value[] = {
+ 0x00, 0x5F, 0x87, 0xAF, 0xD7, 0xFF
+***************
+*** 7162,7164 ****
+--- 7162,7165 ----
+ }
+ }
+ #endif
++
+*** ../vim-8.1.0940/src/terminal.c 2019-02-16 13:35:09.841639346 +0100
+--- src/terminal.c 2019-02-17 17:29:18.560788817 +0100
+***************
+*** 66,72 ****
+ char_u *sb_text; // for tl_scrollback_postponed
+ } sb_line_T;
+
+! #ifdef WIN3264
+ # ifndef HPCON
+ # define HPCON VOID*
+ # endif
+--- 66,72 ----
+ char_u *sb_text; // for tl_scrollback_postponed
+ } sb_line_T;
+
+! #ifdef MSWIN
+ # ifndef HPCON
+ # define HPCON VOID*
+ # endif
+***************
+*** 112,118 ****
+
+ char_u *tl_arg0_cmd; // To format the status bar
+
+! #ifdef WIN3264
+ void *tl_winpty_config;
+ void *tl_winpty;
+
+--- 112,118 ----
+
+ char_u *tl_arg0_cmd; // To format the status bar
+
+! #ifdef MSWIN
+ void *tl_winpty_config;
+ void *tl_winpty;
+
+***************
+*** 172,178 ****
+ /* Terminal active in terminal_loop(). */
+ static term_T *in_terminal_loop = NULL;
+
+! #ifdef WIN3264
+ static BOOL has_winpty = FALSE;
+ static BOOL has_conpty = FALSE;
+ #endif
+--- 172,178 ----
+ /* Terminal active in terminal_loop(). */
+ static term_T *in_terminal_loop = NULL;
+
+! #ifdef MSWIN
+ static BOOL has_winpty = FALSE;
+ static BOOL has_conpty = FALSE;
+ #endif
+***************
+*** 324,330 ****
+ static void
+ setup_job_options(jobopt_T *opt, int rows, int cols)
+ {
+! #ifndef WIN3264
+ /* Win32: Redirecting the job output won't work, thus always connect stdout
+ * here. */
+ if (!(opt->jo_set & JO_OUT_IO))
+--- 324,330 ----
+ static void
+ setup_job_options(jobopt_T *opt, int rows, int cols)
+ {
+! #ifndef MSWIN
+ /* Win32: Redirecting the job output won't work, thus always connect stdout
+ * here. */
+ if (!(opt->jo_set & JO_OUT_IO))
+***************
+*** 337,343 ****
+ opt->jo_set |= JO_OUT_IO + JO_OUT_BUF + JO_OUT_MODIFIABLE;
+ }
+
+! #ifndef WIN3264
+ /* Win32: Redirecting the job output won't work, thus always connect stderr
+ * here. */
+ if (!(opt->jo_set & JO_ERR_IO))
+--- 337,343 ----
+ opt->jo_set |= JO_OUT_IO + JO_OUT_BUF + JO_OUT_MODIFIABLE;
+ }
+
+! #ifndef MSWIN
+ /* Win32: Redirecting the job output won't work, thus always connect stderr
+ * here. */
+ if (!(opt->jo_set & JO_ERR_IO))
+***************
+*** 570,576 ****
+ curbuf->b_p_ma = FALSE;
+
+ set_term_and_win_size(term);
+! #ifdef WIN3264
+ mch_memmove(orig_opt.jo_io, opt->jo_io, sizeof(orig_opt.jo_io));
+ #endif
+ setup_job_options(opt, term->tl_rows, term->tl_cols);
+--- 570,576 ----
+ curbuf->b_p_ma = FALSE;
+
+ set_term_and_win_size(term);
+! #ifdef MSWIN
+ mch_memmove(orig_opt.jo_io, opt->jo_io, sizeof(orig_opt.jo_io));
+ #endif
+ setup_job_options(opt, term->tl_rows, term->tl_cols);
+***************
+*** 748,754 ****
+ vim_free(buf);
+ *p = ' ';
+ }
+! #ifdef WIN3264
+ else if ((int)(p - cmd) == 4 && STRNICMP(cmd, "type", 4) == 0
+ && ep != NULL)
+ {
+--- 748,754 ----
+ vim_free(buf);
+ *p = ' ';
+ }
+! #ifdef MSWIN
+ else if ((int)(p - cmd) == 4 && STRNICMP(cmd, "type", 4) == 0
+ && ep != NULL)
+ {
+***************
+*** 824,830 ****
+ if (fprintf(fd, "terminal ++curwin ++cols=%d ++rows=%d ",
+ term->tl_cols, term->tl_rows) < 0)
+ return FAIL;
+! #ifdef WIN3264
+ if (fprintf(fd, "++type=%s ", term->tl_job->jv_tty_type) < 0)
+ return FAIL;
+ #endif
+--- 824,830 ----
+ if (fprintf(fd, "terminal ++curwin ++cols=%d ++rows=%d ",
+ term->tl_cols, term->tl_rows) < 0)
+ return FAIL;
+! #ifdef MSWIN
+ if (fprintf(fd, "++type=%s ", term->tl_job->jv_tty_type) < 0)
+ return FAIL;
+ #endif
+***************
+*** 932,938 ****
+ vim_free(term->tl_opencmd);
+ vim_free(term->tl_eof_chars);
+ vim_free(term->tl_arg0_cmd);
+! #ifdef WIN3264
+ if (term->tl_out_fd != NULL)
+ fclose(term->tl_out_fd);
+ #endif
+--- 932,938 ----
+ vim_free(term->tl_opencmd);
+ vim_free(term->tl_eof_chars);
+ vim_free(term->tl_arg0_cmd);
+! #ifdef MSWIN
+ if (term->tl_out_fd != NULL)
+ fclose(term->tl_out_fd);
+ #endif
+***************
+*** 1027,1033 ****
+ size_t len = STRLEN(msg);
+ term_T *term = buffer->b_term;
+
+! #ifdef WIN3264
+ /* Win32: Cannot redirect output of the job, intercept it here and write to
+ * the file. */
+ if (term->tl_out_fd != NULL)
+--- 1027,1033 ----
+ size_t len = STRLEN(msg);
+ term_T *term = buffer->b_term;
+
+! #ifdef MSWIN
+ /* Win32: Cannot redirect output of the job, intercept it here and write to
+ * the file. */
+ if (term->tl_out_fd != NULL)
+***************
+*** 1471,1477 ****
+ int empty = (buf->b_ml.ml_flags & ML_EMPTY);
+ linenr_T lnum = buf->b_ml.ml_line_count;
+
+! #ifdef WIN3264
+ if (!enc_utf8 && enc_codepage > 0)
+ {
+ WCHAR *ret = NULL;
+--- 1471,1477 ----
+ int empty = (buf->b_ml.ml_flags & ML_EMPTY);
+ linenr_T lnum = buf->b_ml.ml_line_count;
+
+! #ifdef MSWIN
+ if (!enc_utf8 && enc_codepage > 0)
+ {
+ WCHAR *ret = NULL;
+***************
+*** 1875,1881 ****
+
+ State = TERMINAL;
+ got_int = FALSE;
+! #ifdef WIN3264
+ ctrl_break_was_pressed = FALSE;
+ #endif
+ c = vgetc();
+--- 1875,1881 ----
+
+ State = TERMINAL;
+ got_int = FALSE;
+! #ifdef MSWIN
+ ctrl_break_was_pressed = FALSE;
+ #endif
+ c = vgetc();
+***************
+*** 2016,2022 ****
+ for (item = l->lv_first; item != NULL; item = item->li_next)
+ {
+ char_u *s = tv_get_string(&item->li_tv);
+! #ifdef WIN3264
+ char_u *tmp = s;
+
+ if (!enc_utf8 && enc_codepage > 0)
+--- 2016,2022 ----
+ for (item = l->lv_first; item != NULL; item = item->li_next)
+ {
+ char_u *s = tv_get_string(&item->li_tv);
+! #ifdef MSWIN
+ char_u *tmp = s;
+
+ if (!enc_utf8 && enc_codepage > 0)
+***************
+*** 2036,2042 ****
+ #endif
+ channel_send(curbuf->b_term->tl_job->jv_channel, PART_IN,
+ s, (int)STRLEN(s), NULL);
+! #ifdef WIN3264
+ if (tmp != s)
+ vim_free(s);
+ #endif
+--- 2036,2042 ----
+ #endif
+ channel_send(curbuf->b_term->tl_job->jv_channel, PART_IN,
+ s, (int)STRLEN(s), NULL);
+! #ifdef MSWIN
+ if (tmp != s)
+ vim_free(s);
+ #endif
+***************
+*** 2293,2299 ****
+ }
+ #endif
+
+! #ifdef WIN3264
+ /* On Windows winpty handles CTRL-C, don't send a CTRL_C_EVENT.
+ * Use CTRL-BREAK to kill the job. */
+ if (ctrl_break_was_pressed)
+--- 2293,2299 ----
+ }
+ #endif
+
+! #ifdef MSWIN
+ /* On Windows winpty handles CTRL-C, don't send a CTRL_C_EVENT.
+ * Use CTRL-BREAK to kill the job. */
+ if (ctrl_break_was_pressed)
+***************
+*** 2370,2376 ****
+ goto theend;
+ }
+ }
+! # ifdef WIN3264
+ if (!enc_utf8 && has_mbyte && c >= 0x80)
+ {
+ WCHAR wc;
+--- 2370,2376 ----
+ goto theend;
+ }
+ }
+! # ifdef MSWIN
+ if (!enc_utf8 && has_mbyte && c >= 0x80)
+ {
+ WCHAR wc;
+***************
+*** 2719,2725 ****
+ // Empty corrupted data of winpty
+ else if (STRNCMP(" - ", (char_u *)value->string, 4) == 0)
+ term->tl_title = NULL;
+! #ifdef WIN3264
+ else if (!enc_utf8 && enc_codepage > 0)
+ {
+ WCHAR *ret = NULL;
+--- 2719,2725 ----
+ // Empty corrupted data of winpty
+ else if (STRNCMP(" - ", (char_u *)value->string, 4) == 0)
+ term->tl_title = NULL;
+! #ifdef MSWIN
+ else if (!enc_utf8 && enc_codepage > 0)
+ {
+ WCHAR *ret = NULL;
+***************
+*** 3072,3078 ****
+
+ VIM_CLEAR(term->tl_title);
+ VIM_CLEAR(term->tl_status_text);
+! #ifdef WIN3264
+ if (term->tl_out_fd != NULL)
+ {
+ fclose(term->tl_out_fd);
+--- 3072,3078 ----
+
+ VIM_CLEAR(term->tl_title);
+ VIM_CLEAR(term->tl_status_text);
+! #ifdef MSWIN
+ if (term->tl_out_fd != NULL)
+ {
+ fclose(term->tl_out_fd);
+***************
+*** 3184,3190 ****
+ ScreenLinesUC[off] = NUL;
+ }
+ }
+! #ifdef WIN3264
+ else if (has_mbyte && c >= 0x80)
+ {
+ char_u mb[MB_MAXBYTES+1];
+--- 3184,3190 ----
+ ScreenLinesUC[off] = NUL;
+ }
+ }
+! #ifdef MSWIN
+ else if (has_mbyte && c >= 0x80)
+ {
+ char_u mb[MB_MAXBYTES+1];
+***************
+*** 3557,3563 ****
+ }
+ else
+ {
+! #if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ int tmp;
+ #endif
+
+--- 3557,3563 ----
+ }
+ else
+ {
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ int tmp;
+ #endif
+
+***************
+*** 3565,3571 ****
+ if (cterm_normal_fg_color > 0)
+ {
+ cterm_color2vterm(cterm_normal_fg_color - 1, fg);
+! # if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ tmp = fg->red;
+ fg->red = fg->blue;
+ fg->blue = tmp;
+--- 3565,3571 ----
+ if (cterm_normal_fg_color > 0)
+ {
+ cterm_color2vterm(cterm_normal_fg_color - 1, fg);
+! # if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ tmp = fg->red;
+ fg->red = fg->blue;
+ fg->blue = tmp;
+***************
+*** 3579,3585 ****
+ if (cterm_normal_bg_color > 0)
+ {
+ cterm_color2vterm(cterm_normal_bg_color - 1, bg);
+! # if defined(WIN3264) && !defined(FEAT_GUI_W32)
+ tmp = bg->red;
+ bg->red = bg->blue;
+ bg->blue = tmp;
+--- 3579,3585 ----
+ if (cterm_normal_bg_color > 0)
+ {
+ cterm_color2vterm(cterm_normal_bg_color - 1, bg);
+! # if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ tmp = bg->red;
+ bg->red = bg->blue;
+ bg->blue = tmp;
+***************
+*** 3922,3928 ****
+ /* For unix do not use a blinking cursor. In an xterm this causes the
+ * cursor to blink if it's blinking in the xterm.
+ * For Windows we respect the system wide setting. */
+! #ifdef WIN3264
+ if (GetCaretBlinkTime() == INFINITE)
+ value.boolean = 0;
+ else
+--- 3922,3928 ----
+ /* For unix do not use a blinking cursor. In an xterm this causes the
+ * cursor to blink if it's blinking in the xterm.
+ * For Windows we respect the system wide setting. */
+! #ifdef MSWIN
+ if (GetCaretBlinkTime() == INFINITE)
+ value.boolean = 0;
+ else
+***************
+*** 5588,5594 ****
+ (int)STRLEN(term->tl_eof_chars), NULL);
+ channel_send(ch, PART_IN, (char_u *)"\r", 1, NULL);
+ }
+! # ifdef WIN3264
+ else
+ /* Default: CTRL-D */
+ channel_send(ch, PART_IN, (char_u *)"\004\r", 2, NULL);
+--- 5588,5594 ----
+ (int)STRLEN(term->tl_eof_chars), NULL);
+ channel_send(ch, PART_IN, (char_u *)"\r", 1, NULL);
+ }
+! # ifdef MSWIN
+ else
+ /* Default: CTRL-D */
+ channel_send(ch, PART_IN, (char_u *)"\004\r", 2, NULL);
+***************
+*** 5604,5610 ****
+ }
+ #endif
+
+! # if defined(WIN3264) || defined(PROTO)
+
+ /**************************************
+ * 2. MS-Windows implementation.
+--- 5604,5610 ----
+ }
+ #endif
+
+! # if defined(MSWIN) || defined(PROTO)
+
+ /**************************************
+ * 2. MS-Windows implementation.
+*** ../vim-8.1.0940/src/ui.c 2019-01-28 22:32:54.891909109 +0100
+--- src/ui.c 2019-02-17 17:29:18.560788817 +0100
+***************
+*** 40,46 ****
+ /* Don't output anything in silent mode ("ex -s") unless 'verbose' set */
+ if (!(silent_mode && p_verbose == 0))
+ {
+! #if !defined(WIN3264)
+ char_u *tofree = NULL;
+
+ if (output_conv.vc_type != CONV_NONE)
+--- 40,46 ----
+ /* Don't output anything in silent mode ("ex -s") unless 'verbose' set */
+ if (!(silent_mode && p_verbose == 0))
+ {
+! #if !defined(MSWIN)
+ char_u *tofree = NULL;
+
+ if (output_conv.vc_type != CONV_NONE)
+***************
+*** 54,60 ****
+
+ mch_write(s, len);
+
+! # if !defined(WIN3264)
+ if (output_conv.vc_type != CONV_NONE)
+ vim_free(tofree);
+ # endif
+--- 54,60 ----
+
+ mch_write(s, len);
+
+! # if !defined(MSWIN)
+ if (output_conv.vc_type != CONV_NONE)
+ vim_free(tofree);
+ # endif
+***************
+*** 62,68 ****
+ #endif
+ }
+
+! #if defined(UNIX) || defined(VMS) || defined(PROTO) || defined(WIN3264)
+ /*
+ * When executing an external program, there may be some typed characters that
+ * are not consumed by it. Give them back to ui_inchar() and they are stored
+--- 62,68 ----
+ #endif
+ }
+
+! #if defined(UNIX) || defined(VMS) || defined(PROTO) || defined(MSWIN)
+ /*
+ * When executing an external program, there may be some typed characters that
+ * are not consumed by it. Give them back to ui_inchar() and they are stored
+***************
+*** 3435,3441 ****
+
+ #endif /* FEAT_MOUSE */
+
+! #if defined(FEAT_GUI) || defined(WIN3264) || defined(PROTO)
+ /*
+ * Called when focus changed. Used for the GUI or for systems where this can
+ * be done in the console (Win32).
+--- 3435,3441 ----
+
+ #endif /* FEAT_MOUSE */
+
+! #if defined(FEAT_GUI) || defined(MSWIN) || defined(PROTO)
+ /*
+ * Called when focus changed. Used for the GUI or for systems where this can
+ * be done in the console (Win32).
+*** ../vim-8.1.0940/src/undo.c 2019-01-26 17:28:22.236599060 +0100
+--- src/undo.c 2019-02-17 17:29:18.560788817 +0100
+***************
+*** 645,651 ****
+ u_getbot();
+ }
+
+! #if !defined(UNIX) && !defined(WIN32)
+ /*
+ * With Amiga we can't handle big undo's, because
+ * then u_alloc_line would have to allocate a block larger than 32K
+--- 645,651 ----
+ u_getbot();
+ }
+
+! #if !defined(UNIX) && !defined(MSWIN)
+ /*
+ * With Amiga we can't handle big undo's, because
+ * then u_alloc_line would have to allocate a block larger than 32K
+***************
+*** 1740,1746 ****
+ if (!write_ok)
+ semsg(_("E829: write error in undo file: %s"), file_name);
+
+! #if defined(WIN3264)
+ /* Copy file attributes; for systems where this can only be done after
+ * closing the file. */
+ if (buf->b_ffname != NULL)
+--- 1740,1746 ----
+ if (!write_ok)
+ semsg(_("E829: write error in undo file: %s"), file_name);
+
+! #if defined(MSWIN)
+ /* Copy file attributes; for systems where this can only be done after
+ * closing the file. */
+ if (buf->b_ffname != NULL)
+*** ../vim-8.1.0940/src/version.c 2019-02-17 15:00:48.450637077 +0100
+--- src/version.c 2019-02-17 17:32:06.247840630 +0100
+***************
+*** 222,228 ****
+ #else
+ "-digraphs",
+ #endif
+! #ifdef FEAT_GUI_W32
+ # ifdef FEAT_DIRECTX
+ "+directx",
+ # else
+--- 222,228 ----
+ #else
+ "-digraphs",
+ #endif
+! #ifdef FEAT_GUI_MSWIN
+ # ifdef FEAT_DIRECTX
+ "+directx",
+ # else
+***************
+*** 481,487 ****
+ #else
+ "-num64",
+ #endif
+! #ifdef FEAT_GUI_W32
+ # ifdef FEAT_OLE
+ "+ole",
+ # else
+--- 481,487 ----
+ #else
+ "-num64",
+ #endif
+! #ifdef FEAT_GUI_MSWIN
+ # ifdef FEAT_OLE
+ "+ole",
+ # else
+***************
+*** 700,706 ****
+ "-viminfo",
+ #endif
+ "+vreplace",
+! #ifdef WIN3264
+ # ifdef FEAT_VTP
+ "+vtp",
+ # else
+--- 700,706 ----
+ "-viminfo",
+ #endif
+ "+vreplace",
+! #ifdef MSWIN
+ # ifdef FEAT_VTP
+ "+vtp",
+ # else
+***************
+*** 740,746 ****
+ #else
+ "-xim",
+ #endif
+! #ifdef WIN3264
+ # ifdef FEAT_XPM_W32
+ "+xpm_w32",
+ # else
+--- 740,746 ----
+ #else
+ "-xim",
+ #endif
+! #ifdef MSWIN
+ # ifdef FEAT_XPM_W32
+ "+xpm_w32",
+ # else
+***************
+*** 2852,2867 ****
+ */
+ init_longVersion();
+ msg(longVersion);
+! #ifdef WIN3264
+! # ifdef FEAT_GUI_W32
+ # ifdef _WIN64
+ msg_puts(_("\nMS-Windows 64-bit GUI version"));
+ # else
+ msg_puts(_("\nMS-Windows 32-bit GUI version"));
+ # endif
+! # ifdef FEAT_OLE
+ msg_puts(_(" with OLE support"));
+! # endif
+ # else
+ # ifdef _WIN64
+ msg_puts(_("\nMS-Windows 64-bit console version"));
+--- 2854,2869 ----
+ */
+ init_longVersion();
+ msg(longVersion);
+! #ifdef MSWIN
+! # ifdef FEAT_GUI_MSWIN
+ # ifdef _WIN64
+ msg_puts(_("\nMS-Windows 64-bit GUI version"));
+ # else
+ msg_puts(_("\nMS-Windows 32-bit GUI version"));
+ # endif
+! # ifdef FEAT_OLE
+ msg_puts(_(" with OLE support"));
+! # endif
+ # else
+ # ifdef _WIN64
+ msg_puts(_("\nMS-Windows 64-bit console version"));
+*** ../vim-8.1.0940/src/vim.h 2019-02-14 14:08:01.178543302 +0100
+--- src/vim.h 2019-02-17 17:36:58.154209335 +0100
+***************
+*** 11,18 ****
+
+ #include "protodef.h"
+
+! /* use fastcall for Borland, when compiling for Win32 */
+! #if defined(__BORLANDC__) && defined(WIN32) && !defined(DEBUG)
+ #if defined(FEAT_PERL) || \
+ defined(FEAT_PYTHON) || \
+ defined(FEAT_PYTHON3) || \
+--- 11,27 ----
+
+ #include "protodef.h"
+
+! // _WIN32 is defined as 1 when the compilation target is 32-bit or 64-bit.
+! // Note: If you want to check for 64-bit use the _WIN64 macro.
+! #if defined(WIN32) || defined(_WIN32)
+! # define MSWIN
+! # ifdef FEAT_GUI
+! # define FEAT_GUI_MSWIN
+! # endif
+! #endif
+!
+! // use fastcall for Borland, when compiling for MS-Windows
+! #if defined(__BORLANDC__) && defined(MSWIN) && !defined(DEBUG)
+ #if defined(FEAT_PERL) || \
+ defined(FEAT_PYTHON) || \
+ defined(FEAT_PYTHON3) || \
+***************
+*** 29,35 ****
+ # endif
+ #endif
+
+! #if defined(WIN32) || defined(_WIN64)
+ # include "vimio.h"
+ #endif
+
+--- 38,44 ----
+ # endif
+ #endif
+
+! #ifdef MSWIN
+ # include "vimio.h"
+ #endif
+
+***************
+*** 103,109 ****
+ || defined(FEAT_GUI_GTK) \
+ || defined(FEAT_GUI_ATHENA) \
+ || defined(FEAT_GUI_MAC) \
+! || defined(FEAT_GUI_W32) \
+ || defined(FEAT_GUI_PHOTON)
+ # define FEAT_GUI_ENABLED /* also defined with NO_X11_INCLUDES */
+ # if !defined(FEAT_GUI) && !defined(NO_X11_INCLUDES)
+--- 112,118 ----
+ || defined(FEAT_GUI_GTK) \
+ || defined(FEAT_GUI_ATHENA) \
+ || defined(FEAT_GUI_MAC) \
+! || defined(FEAT_GUI_MSWIN) \
+ || defined(FEAT_GUI_PHOTON)
+ # define FEAT_GUI_ENABLED /* also defined with NO_X11_INCLUDES */
+ # if !defined(FEAT_GUI) && !defined(NO_X11_INCLUDES)
+***************
+*** 124,145 ****
+ # define _CRT_NONSTDC_NO_DEPRECATE
+ #endif
+
+- #if defined(FEAT_GUI_W32)
+- # define FEAT_GUI_MSWIN
+- #endif
+- #if defined(WIN32) || defined(_WIN64)
+- # define MSWIN
+- #endif
+- /* Practically everything is common to both Win32 and Win64 */
+- #if defined(WIN32) || defined(_WIN64)
+- # define WIN3264
+- #endif
+-
+ /*
+ * VIM_SIZEOF_INT is used in feature.h, and the system-specific included files
+ * need items from feature.h. Therefore define VIM_SIZEOF_INT here.
+ */
+! #ifdef WIN3264
+ # define VIM_SIZEOF_INT 4
+ #endif
+
+--- 133,143 ----
+ # define _CRT_NONSTDC_NO_DEPRECATE
+ #endif
+
+ /*
+ * VIM_SIZEOF_INT is used in feature.h, and the system-specific included files
+ * need items from feature.h. Therefore define VIM_SIZEOF_INT here.
+ */
+! #ifdef MSWIN
+ # define VIM_SIZEOF_INT 4
+ #endif
+
+***************
+*** 276,282 ****
+ # include "os_amiga.h"
+ #endif
+
+! #ifdef WIN3264
+ # include "os_win32.h"
+ #endif
+
+--- 274,280 ----
+ # include "os_amiga.h"
+ #endif
+
+! #ifdef MSWIN
+ # include "os_win32.h"
+ #endif
+
+***************
+*** 456,463 ****
+ # include <sys/stat.h>
+ #endif
+
+! #if defined(HAVE_ERRNO_H) \
+! || defined(WIN32) || defined(_WIN64)
+ # include <errno.h>
+ #endif
+
+--- 454,460 ----
+ # include <sys/stat.h>
+ #endif
+
+! #if defined(HAVE_ERRNO_H) || defined(MSWIN)
+ # include <errno.h>
+ #endif
+
+***************
+*** 509,515 ****
+ #ifndef HAVE_SELECT
+ # ifdef HAVE_SYS_POLL_H
+ # include <sys/poll.h>
+! # elif defined(WIN32)
+ # define HAVE_SELECT
+ # else
+ # ifdef HAVE_POLL_H
+--- 506,512 ----
+ #ifndef HAVE_SELECT
+ # ifdef HAVE_SYS_POLL_H
+ # include <sys/poll.h>
+! # elif defined(MSWIN)
+ # define HAVE_SELECT
+ # else
+ # ifdef HAVE_POLL_H
+***************
+*** 1752,1758 ****
+ #define MB_MAXBYTES 21
+
+ #if (defined(FEAT_PROFILE) || defined(FEAT_RELTIME)) && !defined(PROTO)
+! # ifdef WIN3264
+ typedef LARGE_INTEGER proftime_T;
+ # else
+ typedef struct timeval proftime_T;
+--- 1749,1755 ----
+ #define MB_MAXBYTES 21
+
+ #if (defined(FEAT_PROFILE) || defined(FEAT_RELTIME)) && !defined(PROTO)
+! # ifdef MSWIN
+ typedef LARGE_INTEGER proftime_T;
+ # else
+ typedef struct timeval proftime_T;
+***************
+*** 1769,1775 ****
+ #ifdef PROTO
+ typedef long time_T;
+ #else
+! # ifdef WIN3264
+ typedef __time64_t time_T;
+ # else
+ typedef time_t time_T;
+--- 1766,1772 ----
+ #ifdef PROTO
+ typedef long time_T;
+ #else
+! # ifdef MSWIN
+ typedef __time64_t time_T;
+ # else
+ typedef time_t time_T;
+***************
+*** 2005,2011 ****
+ # define SELECT_MODE_WORD 1
+ # define SELECT_MODE_LINE 2
+
+! # ifdef FEAT_GUI_W32
+ # ifdef FEAT_OLE
+ # define WM_OLE (WM_APP+0)
+ # endif
+--- 2002,2008 ----
+ # define SELECT_MODE_WORD 1
+ # define SELECT_MODE_LINE 2
+
+! # ifdef FEAT_GUI_MSWIN
+ # ifdef FEAT_OLE
+ # define WM_OLE (WM_APP+0)
+ # endif
+***************
+*** 2103,2109 ****
+ #endif
+
+ # if defined(FEAT_EVAL) \
+! && (!defined(FEAT_GUI_W32) \
+ || !(defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
+ && !(defined(FEAT_GUI_MAC) && defined(MACOS_CONVERT))
+ /* Whether IME is supported by im_get_status() defined in mbyte.c.
+--- 2100,2106 ----
+ #endif
+
+ # if defined(FEAT_EVAL) \
+! && (!defined(FEAT_GUI_MSWIN) \
+ || !(defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
+ && !(defined(FEAT_GUI_MAC) && defined(MACOS_CONVERT))
+ /* Whether IME is supported by im_get_status() defined in mbyte.c.
+***************
+*** 2115,2121 ****
+
+ #if defined(FEAT_XIM) \
+ || defined(IME_WITHOUT_XIM) \
+! || (defined(FEAT_GUI_W32) \
+ && (defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
+ || defined(FEAT_GUI_MAC)
+ /* im_set_active() is available */
+--- 2112,2118 ----
+
+ #if defined(FEAT_XIM) \
+ || defined(IME_WITHOUT_XIM) \
+! || (defined(FEAT_GUI_MSWIN) \
+ && (defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
+ || defined(FEAT_GUI_MAC)
+ /* im_set_active() is available */
+***************
+*** 2129,2135 ****
+
+ /* This must come after including proto.h.
+ * For VMS this is defined in macros.h. */
+! #if !defined(WIN3264) && !defined(VMS)
+ # define mch_open(n, m, p) open((n), (m), (p))
+ # define mch_fopen(n, p) fopen((n), (p))
+ #endif
+--- 2126,2132 ----
+
+ /* This must come after including proto.h.
+ * For VMS this is defined in macros.h. */
+! #if !defined(MSWIN) && !defined(VMS)
+ # define mch_open(n, m, p) open((n), (m), (p))
+ # define mch_fopen(n, p) fopen((n), (p))
+ #endif
+***************
+*** 2169,2175 ****
+ #endif
+
+ /* stop using fastcall for Borland */
+! #if defined(__BORLANDC__) && defined(WIN32) && !defined(DEBUG)
+ #pragma option -p.
+ #endif
+
+--- 2166,2172 ----
+ #endif
+
+ /* stop using fastcall for Borland */
+! #if defined(__BORLANDC__) && defined(MSWIN) && !defined(DEBUG)
+ #pragma option -p.
+ #endif
+
+***************
+*** 2461,2467 ****
+ # define MAX_OPEN_CHANNELS 0
+ #endif
+
+! #if defined(WIN32)
+ # define MAX_NAMED_PIPE_SIZE 65535
+ #endif
+
+--- 2458,2464 ----
+ # define MAX_OPEN_CHANNELS 0
+ #endif
+
+! #if defined(MSWIN)
+ # define MAX_NAMED_PIPE_SIZE 65535
+ #endif
+
+***************
+*** 2579,2585 ****
+ # define ELAPSED_FUNC(v) elapsed(&v)
+ typedef struct timeval elapsed_T;
+ long elapsed(struct timeval *start_tv);
+! #elif defined(WIN32)
+ # define ELAPSED_TICKCOUNT
+ # define ELAPSED_INIT(v) v = GetTickCount()
+ # define ELAPSED_FUNC(v) elapsed(v)
+--- 2576,2582 ----
+ # define ELAPSED_FUNC(v) elapsed(&v)
+ typedef struct timeval elapsed_T;
+ long elapsed(struct timeval *start_tv);
+! #elif defined(MSWIN)
+ # define ELAPSED_TICKCOUNT
+ # define ELAPSED_INIT(v) v = GetTickCount()
+ # define ELAPSED_FUNC(v) elapsed(v)
+*** ../vim-8.1.0940/src/vim.rc 2016-08-29 22:42:21.000000000 +0200
+--- src/vim.rc 2019-02-17 17:29:18.560788817 +0100
+***************
+*** 23,29 ****
+ //
+ IDR_VIM ICON "vim.ico"
+
+! #ifdef FEAT_GUI_W32
+ IDR_VIM_ERROR ICON "vim_error.ico"
+ IDR_VIM_ALERT ICON "vim_alert.ico"
+ IDR_VIM_INFO ICON "vim_info.ico"
+--- 23,29 ----
+ //
+ IDR_VIM ICON "vim.ico"
+
+! #ifdef FEAT_GUI
+ IDR_VIM_ERROR ICON "vim_error.ico"
+ IDR_VIM_ALERT ICON "vim_alert.ico"
+ IDR_VIM_INFO ICON "vim_info.ico"
+***************
+*** 46,52 ****
+ #endif
+
+ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gvim.exe.mnf"
+! #endif // FEAT_GUI_W32
+
+ //
+ // Type Library
+--- 46,52 ----
+ #endif
+
+ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gvim.exe.mnf"
+! #endif // FEAT_GUI
+
+ //
+ // Type Library
+*** ../vim-8.1.0940/src/winclip.c 2019-01-24 17:18:37.599462306 +0100
+--- src/winclip.c 2019-02-17 17:29:18.560788817 +0100
+***************
+*** 22,28 ****
+ * posix environment.
+ */
+ #ifdef FEAT_CYGWIN_WIN32_CLIPBOARD
+! # define WIN3264
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+ # include "winclip.pro"
+--- 22,28 ----
+ * posix environment.
+ */
+ #ifdef FEAT_CYGWIN_WIN32_CLIPBOARD
+! # define MSWIN
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+ # include "winclip.pro"
+***************
+*** 299,305 ****
+ VimClipType_t metadata = { -1, -1, -1, -1 };
+ HGLOBAL hMem = NULL;
+ char_u *str = NULL;
+! #if defined(WIN3264)
+ char_u *to_free = NULL;
+ #endif
+ HGLOBAL rawh = NULL;
+--- 299,305 ----
+ VimClipType_t metadata = { -1, -1, -1, -1 };
+ HGLOBAL hMem = NULL;
+ char_u *str = NULL;
+! #if defined(MSWIN)
+ char_u *to_free = NULL;
+ #endif
+ HGLOBAL rawh = NULL;
+***************
+*** 361,367 ****
+ }
+ if (str == NULL)
+ {
+! #if defined(WIN3264)
+ /* Try to get the clipboard in Unicode if it's not an empty string. */
+ if (IsClipboardFormatAvailable(CF_UNICODETEXT) && metadata.ucslen != 0)
+ {
+--- 361,367 ----
+ }
+ if (str == NULL)
+ {
+! #if defined(MSWIN)
+ /* Try to get the clipboard in Unicode if it's not an empty string. */
+ if (IsClipboardFormatAvailable(CF_UNICODETEXT) && metadata.ucslen != 0)
+ {
+***************
+*** 417,423 ****
+ break;
+ }
+
+! #if defined(WIN3264)
+ /* The text is in the active codepage. Convert to
+ * 'encoding', going through UTF-16. */
+ acp_to_enc(str, str_size, &to_free, &maxlen);
+--- 417,423 ----
+ break;
+ }
+
+! #if defined(MSWIN)
+ /* The text is in the active codepage. Convert to
+ * 'encoding', going through UTF-16. */
+ acp_to_enc(str, str_size, &to_free, &maxlen);
+***************
+*** 454,460 ****
+ if (rawh != NULL)
+ GlobalUnlock(rawh);
+ CloseClipboard();
+! #if defined(WIN3264)
+ vim_free(to_free);
+ #endif
+ }
+--- 454,460 ----
+ if (rawh != NULL)
+ GlobalUnlock(rawh);
+ CloseClipboard();
+! #if defined(MSWIN)
+ vim_free(to_free);
+ #endif
+ }
+***************
+*** 471,477 ****
+ HGLOBAL hMemRaw = NULL;
+ HGLOBAL hMem = NULL;
+ HGLOBAL hMemVim = NULL;
+! # if defined(WIN3264)
+ HGLOBAL hMemW = NULL;
+ # endif
+
+--- 471,477 ----
+ HGLOBAL hMemRaw = NULL;
+ HGLOBAL hMem = NULL;
+ HGLOBAL hMemVim = NULL;
+! # if defined(MSWIN)
+ HGLOBAL hMemW = NULL;
+ # endif
+
+***************
+*** 508,514 ****
+ metadata.rawlen = 0;
+ }
+
+! # if defined(WIN3264)
+ {
+ WCHAR *out;
+ int len = metadata.txtlen;
+--- 508,514 ----
+ metadata.rawlen = 0;
+ }
+
+! # if defined(MSWIN)
+ {
+ WCHAR *out;
+ int len = metadata.txtlen;
+***************
+*** 590,596 ****
+ {
+ SetClipboardData(cbd->format, hMemVim);
+ hMemVim = 0;
+! # if defined(WIN3264)
+ if (hMemW != NULL)
+ {
+ if (SetClipboardData(CF_UNICODETEXT, hMemW) != NULL)
+--- 590,596 ----
+ {
+ SetClipboardData(cbd->format, hMemVim);
+ hMemVim = 0;
+! # if defined(MSWIN)
+ if (hMemW != NULL)
+ {
+ if (SetClipboardData(CF_UNICODETEXT, hMemW) != NULL)
+***************
+*** 611,617 ****
+ GlobalFree(hMemRaw);
+ if (hMem)
+ GlobalFree(hMem);
+! # if defined(WIN3264)
+ if (hMemW)
+ GlobalFree(hMemW);
+ # endif
+--- 611,617 ----
+ GlobalFree(hMemRaw);
+ if (hMem)
+ GlobalFree(hMem);
+! # if defined(MSWIN)
+ if (hMemW)
+ GlobalFree(hMemW);
+ # endif
+***************
+*** 746,752 ****
+ return enc_str;
+ }
+
+! #if defined(WIN3264) || defined(PROTO)
+ /*
+ * Convert from the active codepage to 'encoding'.
+ * Input is "str[str_size]".
+--- 746,752 ----
+ return enc_str;
+ }
+
+! #if defined(MSWIN) || defined(PROTO)
+ /*
+ * Convert from the active codepage to 'encoding'.
+ * Input is "str[str_size]".
+*** ../vim-8.1.0940/src/version.c 2019-02-17 15:00:48.450637077 +0100
+--- src/version.c 2019-02-17 17:32:06.247840630 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 941,
+ /**/
+
+--
+Lower life forms have more fun!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0942 b/data/vim/patches/8.1.0942
new file mode 100644
index 000000000..b1996942f
--- /dev/null
+++ b/data/vim/patches/8.1.0942
@@ -0,0 +1,153 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0942
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0942
+Problem: Options window still checks for the multi_byte feature.
+Solution: Remove the unnecessary check. (Dominique Pelle, closes #3990)
+Files: runtime/optwin.vim
+
+
+*** ../vim-8.1.0941/runtime/optwin.vim 2019-02-08 12:46:03.588784187 +0100
+--- runtime/optwin.vim 2019-02-17 17:50:03.382330578 +0100
+***************
+*** 685,696 ****
+ call append("$", "printencoding\tencoding used to print the PostScript file for :hardcopy")
+ call <SID>OptionG("penc", &penc)
+ endif
+! if has("multi_byte")
+! call append("$", "printmbcharset\tthe CJK character set to be used for CJK output from :hardcopy")
+! call <SID>OptionG("pmbcs", &pmbcs)
+! call append("$", "printmbfont\tlist of font names to be used for CJK output from :hardcopy")
+! call <SID>OptionG("pmbfn", &pmbfn)
+! endif
+ endif
+
+ call <SID>Header("messages and info")
+--- 685,694 ----
+ call append("$", "printencoding\tencoding used to print the PostScript file for :hardcopy")
+ call <SID>OptionG("penc", &penc)
+ endif
+! call append("$", "printmbcharset\tthe CJK character set to be used for CJK output from :hardcopy")
+! call <SID>OptionG("pmbcs", &pmbcs)
+! call append("$", "printmbfont\tlist of font names to be used for CJK output from :hardcopy")
+! call <SID>OptionG("pmbfn", &pmbfn)
+ endif
+
+ call <SID>Header("messages and info")
+***************
+*** 996,1006 ****
+ call append("$", "fixendofline\tfixes missing end-of-line at end of text file")
+ call append("$", "\t(local to buffer)")
+ call <SID>BinOptionL("fixeol")
+! if has("multi_byte")
+! call append("$", "bomb\tprepend a Byte Order Mark to the file")
+! call append("$", "\t(local to buffer)")
+! call <SID>BinOptionL("bomb")
+! endif
+ call append("$", "fileformat\tend-of-line format: \"dos\", \"unix\" or \"mac\"")
+ call append("$", "\t(local to buffer)")
+ call <SID>OptionL("ff")
+--- 994,1002 ----
+ call append("$", "fixendofline\tfixes missing end-of-line at end of text file")
+ call append("$", "\t(local to buffer)")
+ call <SID>BinOptionL("fixeol")
+! call append("$", "bomb\tprepend a Byte Order Mark to the file")
+! call append("$", "\t(local to buffer)")
+! call <SID>BinOptionL("bomb")
+ call append("$", "fileformat\tend-of-line format: \"dos\", \"unix\" or \"mac\"")
+ call append("$", "\t(local to buffer)")
+ call <SID>OptionL("ff")
+***************
+*** 1252,1284 ****
+ endif
+
+
+! if has("multi_byte")
+! call <SID>Header("multi-byte characters")
+! call append("$", "encoding\tcharacter encoding used in Vim: \"latin1\", \"utf-8\"")
+! call append("$", "\t\"euc-jp\", \"big5\", etc.")
+! call <SID>OptionG("enc", &enc)
+! call append("$", "fileencoding\tcharacter encoding for the current file")
+! call append("$", "\t(local to buffer)")
+! call <SID>OptionL("fenc")
+! call append("$", "fileencodings\tautomatically detected character encodings")
+! call <SID>OptionG("fencs", &fencs)
+! call append("$", "termencoding\tcharacter encoding used by the terminal")
+! call <SID>OptionG("tenc", &tenc)
+! call append("$", "charconvert\texpression used for character encoding conversion")
+! call <SID>OptionG("ccv", &ccv)
+! call append("$", "delcombine\tdelete combining (composing) characters on their own")
+! call <SID>BinOptionG("deco", &deco)
+! call append("$", "maxcombine\tmaximum number of combining (composing) characters displayed")
+! call <SID>OptionG("mco", &mco)
+! if has("xim") && has("gui_gtk")
+! call append("$", "imactivatekey\tkey that activates the X input method")
+! call <SID>OptionG("imak", &imak)
+! endif
+! call append("$", "ambiwidth\twidth of ambiguous width characters")
+! call <SID>OptionG("ambw", &ambw)
+! call append("$", "emoji\temoji characters are full width")
+! call <SID>BinOptionG("emo", &emo)
+! endif
+
+
+ call <SID>Header("various")
+--- 1248,1278 ----
+ endif
+
+
+! call <SID>Header("multi-byte characters")
+! call append("$", "encoding\tcharacter encoding used in Vim: \"latin1\", \"utf-8\"")
+! call append("$", "\t\"euc-jp\", \"big5\", etc.")
+! call <SID>OptionG("enc", &enc)
+! call append("$", "fileencoding\tcharacter encoding for the current file")
+! call append("$", "\t(local to buffer)")
+! call <SID>OptionL("fenc")
+! call append("$", "fileencodings\tautomatically detected character encodings")
+! call <SID>OptionG("fencs", &fencs)
+! call append("$", "termencoding\tcharacter encoding used by the terminal")
+! call <SID>OptionG("tenc", &tenc)
+! call append("$", "charconvert\texpression used for character encoding conversion")
+! call <SID>OptionG("ccv", &ccv)
+! call append("$", "delcombine\tdelete combining (composing) characters on their own")
+! call <SID>BinOptionG("deco", &deco)
+! call append("$", "maxcombine\tmaximum number of combining (composing) characters displayed")
+! call <SID>OptionG("mco", &mco)
+! if has("xim") && has("gui_gtk")
+! call append("$", "imactivatekey\tkey that activates the X input method")
+! call <SID>OptionG("imak", &imak)
+! endif
+! call append("$", "ambiwidth\twidth of ambiguous width characters")
+! call <SID>OptionG("ambw", &ambw)
+! call append("$", "emoji\temoji characters are full width")
+! call <SID>BinOptionG("emo", &emo)
+
+
+ call <SID>Header("various")
+*** ../vim-8.1.0941/src/version.c 2019-02-17 17:44:36.223875455 +0100
+--- src/version.c 2019-02-17 17:53:15.193377945 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 942,
+ /**/
+
+--
+Team-building exercises come in many forms but they all trace their roots back
+to the prison system. In your typical team-building exercise the employees
+are subjected to a variety of unpleasant situations until they become either a
+cohesive team or a ring of car jackers.
+ (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.0943 b/data/vim/patches/8.1.0943
new file mode 100644
index 000000000..6c52fe530
--- /dev/null
+++ b/data/vim/patches/8.1.0943
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0943
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0943
+Problem: Still a trace of Farsi support.
+Solution: Remove defining macros.
+Files: src/feature.h
+
+
+*** ../vim-8.1.0942/src/feature.h 2019-02-17 17:44:36.207875527 +0100
+--- src/feature.h 2019-02-17 17:29:18.544788906 +0100
+***************
+*** 265,282 ****
+
+ /*
+ * +farsi Farsi (Persian language) Keymap support.
+! * Requires FEAT_RIGHTLEFT.
+! *
+! * Disabled for EBCDIC as it requires multibyte.
+ */
+- #if defined(FEAT_BIG) && !defined(DISABLE_FARSI) && !defined(EBCDIC)
+- # define FEAT_FKMAP
+- #endif
+- #ifdef FEAT_FKMAP
+- # ifndef FEAT_RIGHTLEFT
+- # define FEAT_RIGHTLEFT
+- # endif
+- #endif
+
+ /*
+ * +arabic Arabic keymap and shaping support.
+--- 265,272 ----
+
+ /*
+ * +farsi Farsi (Persian language) Keymap support.
+! * Removed in patch 8.1.0932
+ */
+
+ /*
+ * +arabic Arabic keymap and shaping support.
+*** ../vim-8.1.0942/src/version.c 2019-02-17 17:53:46.681219289 +0100
+--- src/version.c 2019-02-17 18:58:36.198853262 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 943,
+ /**/
+
+--
+The acknowledged parents of reengineering are Michael Hammer and James Champy.
+When I say they're the "parents" I don't mean they had sex - and I apologize
+for making you think about it. I mean they wrote the best-selling business
+book _Reengineering the Corporation_, which was published in 1993.
+ Businesses flocked to reengineering like frat boys to a drunken
+cheerleader. (This analogy wasn't necessary, but I'm trying to get my mind
+off that Hammer and Champy thing.)
+ (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.0944 b/data/vim/patches/8.1.0944
new file mode 100644
index 000000000..b3676b76f
--- /dev/null
+++ b/data/vim/patches/8.1.0944
@@ -0,0 +1,144 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0944
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0944
+Problem: Format of nbdbg() arguments is not checked.
+Solution: Add format attribute. Fix reported problems. (Dominique Pelle,
+ closes #3992)
+Files: src/nbdebug.h, src/netbeans.c
+
+
+*** ../vim-8.1.0943/src/nbdebug.h 2016-08-29 22:42:20.000000000 +0200
+--- src/nbdebug.h 2019-02-17 19:10:08.447050070 +0100
+***************
+*** 42,48 ****
+ } WtWait;
+
+
+! void nbdbg(char *, ...);
+
+ void nbdebug_wait(u_int wait_flags, char *wait_var, u_int wait_secs);
+ void nbdebug_log_init(char *log_var, char *level_var);
+--- 42,52 ----
+ } WtWait;
+
+
+! void nbdbg(char *, ...)
+! #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+! __attribute__((format(printf, 1, 2)))
+! #endif
+! ;
+
+ void nbdebug_wait(u_int wait_flags, char *wait_var, u_int wait_secs);
+ void nbdebug_log_init(char *log_var, char *level_var);
+*** ../vim-8.1.0943/src/netbeans.c 2019-02-17 17:44:36.215875493 +0100
+--- src/netbeans.c 2019-02-17 19:10:08.451050047 +0100
+***************
+*** 934,940 ****
+ {
+ mch_memmove(newtext, oldtext, first);
+ STRMOVE(newtext + first, oldtext + lastbyte + 1);
+! nbdebug((" NEW LINE %d: %s\n", lnum, newtext));
+ ml_replace(lnum, newtext, FALSE);
+ }
+ }
+--- 934,940 ----
+ {
+ mch_memmove(newtext, oldtext, first);
+ STRMOVE(newtext + first, oldtext + lastbyte + 1);
+! nbdebug((" NEW LINE %ld: %s\n", lnum, newtext));
+ ml_replace(lnum, newtext, FALSE);
+ }
+ }
+***************
+*** 1166,1172 ****
+ return FAIL;
+ }
+ first = *pos;
+! nbdebug((" FIRST POS: line %d, col %d\n",
+ first.lnum, first.col));
+ pos = off2pos(buf->bufp, off+count-1);
+ if (!pos)
+--- 1166,1172 ----
+ return FAIL;
+ }
+ first = *pos;
+! nbdebug((" FIRST POS: line %ld, col %d\n",
+ first.lnum, first.col));
+ pos = off2pos(buf->bufp, off+count-1);
+ if (!pos)
+***************
+*** 1178,1184 ****
+ return FAIL;
+ }
+ last = *pos;
+! nbdebug((" LAST POS: line %d, col %d\n",
+ last.lnum, last.col));
+ del_from_lnum = first.lnum;
+ del_to_lnum = last.lnum;
+--- 1178,1184 ----
+ return FAIL;
+ }
+ last = *pos;
+! nbdebug((" LAST POS: line %ld, col %d\n",
+ last.lnum, last.col));
+ del_from_lnum = first.lnum;
+ del_to_lnum = last.lnum;
+***************
+*** 1264,1270 ****
+ }
+ }
+
+! nbdebug((" Deleting lines %d through %d\n",
+ del_from_lnum, del_to_lnum));
+ curwin->w_cursor.lnum = del_from_lnum;
+ curwin->w_cursor.col = 0;
+--- 1264,1270 ----
+ }
+ }
+
+! nbdebug((" Deleting lines %ld through %ld\n",
+ del_from_lnum, del_to_lnum));
+ curwin->w_cursor.lnum = del_from_lnum;
+ curwin->w_cursor.col = 0;
+***************
+*** 1540,1546 ****
+ {
+ if (!buf->bufp->b_netbeans_file)
+ {
+! nbdebug(("E658: NetBeans connection lost for buffer %ld\n", buf->bufp->b_fnum));
+ semsg(_("E658: NetBeans connection lost for buffer %d"),
+ buf->bufp->b_fnum);
+ }
+--- 1540,1546 ----
+ {
+ if (!buf->bufp->b_netbeans_file)
+ {
+! nbdebug(("E658: NetBeans connection lost for buffer %d\n", buf->bufp->b_fnum));
+ semsg(_("E658: NetBeans connection lost for buffer %d"),
+ buf->bufp->b_fnum);
+ }
+*** ../vim-8.1.0943/src/version.c 2019-02-17 18:59:07.114686682 +0100
+--- src/version.c 2019-02-17 19:10:31.334922632 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 944,
+ /**/
+
+--
+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.0945 b/data/vim/patches/8.1.0945
new file mode 100644
index 000000000..d0c639065
--- /dev/null
+++ b/data/vim/patches/8.1.0945
@@ -0,0 +1,89 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0945
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0945
+Problem: Internal error when using pattern with NL in the range.
+Solution: Use an actual newline for the range. (closes #3989) Also fix
+ error message. (Dominique Pelle)
+Files: src/regexp_nfa.c, src/testdir/test_regexp_latin.vim
+
+
+*** ../vim-8.1.0944/src/regexp_nfa.c 2019-02-14 20:55:05.983776869 +0100
+--- src/regexp_nfa.c 2019-02-17 20:11:05.243105933 +0100
+***************
+*** 245,251 ****
+
+ static char_u e_nul_found[] = N_("E865: (NFA) Regexp end encountered prematurely");
+ static char_u e_misplaced[] = N_("E866: (NFA regexp) Misplaced %c");
+! static char_u e_ill_char_class[] = N_("E877: (NFA regexp) Invalid character class: %ld");
+
+ // Variables only used in nfa_regcomp() and descendants.
+ static int nfa_re_flags; // re_flags passed to nfa_regcomp()
+--- 245,251 ----
+
+ static char_u e_nul_found[] = N_("E865: (NFA) Regexp end encountered prematurely");
+ static char_u e_misplaced[] = N_("E866: (NFA regexp) Misplaced %c");
+! static char_u e_ill_char_class[] = N_("E877: (NFA regexp) Invalid character class: %d");
+
+ // Variables only used in nfa_regcomp() and descendants.
+ static int nfa_re_flags; // re_flags passed to nfa_regcomp()
+***************
+*** 1785,1791 ****
+ MB_PTR_ADV(regparse);
+
+ if (*regparse == 'n')
+! startc = reg_string ? NL : NFA_NEWL;
+ else
+ if (*regparse == 'd'
+ || *regparse == 'o'
+--- 1785,1792 ----
+ MB_PTR_ADV(regparse);
+
+ if (*regparse == 'n')
+! startc = (reg_string || emit_range
+! || regparse[1] == '-') ? NL : NFA_NEWL;
+ else
+ if (*regparse == 'd'
+ || *regparse == 'o'
+*** ../vim-8.1.0944/src/testdir/test_regexp_latin.vim 2019-02-17 13:53:31.600227794 +0100
+--- src/testdir/test_regexp_latin.vim 2019-02-17 20:10:57.103144259 +0100
+***************
+*** 122,124 ****
+--- 122,132 ----
+ bwipe!
+ set re=0
+ endfunc
++
++ func Test_range_with_newline()
++ new
++ call setline(1, "a")
++ call assert_equal(0, search("[ -*\\n- ]"))
++ call assert_equal(0, search("[ -*\\t-\\n]"))
++ bwipe!
++ endfunc
+*** ../vim-8.1.0944/src/version.c 2019-02-17 19:12:17.646329910 +0100
+--- src/version.c 2019-02-17 20:11:44.602919414 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 945,
+ /**/
+
+--
+An easy way to determine if you have enough teamwork to be doomed is simply to
+measure how long it takes from the time you decide to go to lunch together
+until the time you actually eat.
+ (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.0946 b/data/vim/patches/8.1.0946
new file mode 100644
index 000000000..e190da4cf
--- /dev/null
+++ b/data/vim/patches/8.1.0946
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0946
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0946
+Problem: Coveralls is not very useful.
+Solution: Remove Coveralls badge, add badge for packages.
+Files: README.md
+
+
+*** ../vim-8.1.0945/README.md 2018-09-13 19:04:45.437477554 +0200
+--- README.md 2019-02-17 23:25:04.322706692 +0100
+***************
+*** 1,12 ****
+ ![Vim Logo](https://github.com/vim/vim/blob/master/runtime/vimlogo.gif)
+
+ [![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)
+ [![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim)
+
+
+ ## What is Vim? ##
+--- 1,12 ----
+ ![Vim Logo](https://github.com/vim/vim/blob/master/runtime/vimlogo.gif)
+
+ [![Build Status](https://travis-ci.org/vim/vim.svg?branch=master)](https://travis-ci.org/vim/vim)
+ [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim)
++ [![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master)
+ [![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)
++ [![Packages](https://repology.org/badge/tiny-repos/vim.svg)](https://repology.org/metapackage/vim)
+
+
+ ## What is Vim? ##
+*** ../vim-8.1.0945/src/version.c 2019-02-17 20:16:58.101377164 +0100
+--- src/version.c 2019-02-17 23:26:26.538280085 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 946,
+ /**/
+
+--
+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.0947 b/data/vim/patches/8.1.0947
new file mode 100644
index 000000000..c4ac472e8
--- /dev/null
+++ b/data/vim/patches/8.1.0947
@@ -0,0 +1,95 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0947
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0947
+Problem: Using MSWIN before it is defined. (Cesar Romani)
+Solution: Move the block that uses MSWIN to below including vim.h. (Ken
+ Takata)
+Files: src/if_ruby.c
+
+
+*** ../vim-8.1.0946/src/if_ruby.c 2019-02-17 17:44:36.211875510 +0100
+--- src/if_ruby.c 2019-02-18 20:39:17.771644504 +0100
+***************
+*** 64,86 ****
+ # define RUBY_EXPORT
+ # endif
+
+! #if !defined(MSWIN)
+! # include <dlfcn.h>
+! # define HINSTANCE void*
+! # define RUBY_PROC void*
+! # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
+! # define symbol_from_dll dlsym
+! # define close_dll dlclose
+! #else
+! # define RUBY_PROC FARPROC
+! # define load_dll vimLoadLib
+! # define symbol_from_dll GetProcAddress
+! # define close_dll FreeLibrary
+! #endif
+!
+! #endif /* ifdef DYNAMIC_RUBY */
+
+! /* suggested by Ariya Mizutani */
+ #if (_MSC_VER == 1200)
+ # undef _WIN32_WINNT
+ #endif
+--- 64,72 ----
+ # define RUBY_EXPORT
+ # endif
+
+! #endif // ifdef DYNAMIC_RUBY
+
+! // suggested by Ariya Mizutani
+ #if (_MSC_VER == 1200)
+ # undef _WIN32_WINNT
+ #endif
+***************
+*** 183,188 ****
+--- 169,190 ----
+ #include "vim.h"
+ #include "version.h"
+
++ #ifdef DYNAMIC_RUBY
++ # if !defined(MSWIN) // must come after including vim.h, where it is defined
++ # include <dlfcn.h>
++ # define HINSTANCE void*
++ # define RUBY_PROC void*
++ # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
++ # define symbol_from_dll dlsym
++ # define close_dll dlclose
++ # else
++ # define RUBY_PROC FARPROC
++ # define load_dll vimLoadLib
++ # define symbol_from_dll GetProcAddress
++ # define close_dll FreeLibrary
++ # endif
++ #endif
++
+ #if defined(PROTO) && !defined(FEAT_RUBY)
+ /* Define these to be able to generate the function prototypes. */
+ # define VALUE int
+*** ../vim-8.1.0946/src/version.c 2019-02-17 23:26:47.210170294 +0100
+--- src/version.c 2019-02-18 20:41:21.910682697 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 947,
+ /**/
+
+--
+Git catch 22: "merge is not possible because you have unmerged files."
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0948 b/data/vim/patches/8.1.0948
new file mode 100644
index 000000000..540aa7f29
--- /dev/null
+++ b/data/vim/patches/8.1.0948
@@ -0,0 +1,93 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0948
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0948
+Problem: When built without +eval "Vim --clean" produces errors. (James
+ McCoy)
+Solution: Do not enable filetype detection.
+Files: runtime/defaults.vim
+
+
+*** ../vim-8.1.0947/runtime/defaults.vim 2017-06-13 16:10:28.000000000 +0200
+--- runtime/defaults.vim 2019-02-18 21:31:47.744615974 +0100
+***************
+*** 1,7 ****
+ " The default vimrc file.
+ "
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last change: 2017 Jun 13
+ "
+ " This is loaded if no vimrc file was found.
+ " Except when Vim is run with "-u NONE" or "-C".
+--- 1,7 ----
+ " The default vimrc file.
+ "
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last change: 2019 Feb 18
+ "
+ " This is loaded if no vimrc file was found.
+ " Except when Vim is run with "-u NONE" or "-C".
+***************
+*** 90,97 ****
+ let c_comment_strings=1
+ endif
+
+! " Only do this part when compiled with support for autocommands.
+! if has("autocmd")
+
+ " Enable file type detection.
+ " Use the default filetype settings, so that mail gets 'tw' set to 72,
+--- 90,97 ----
+ let c_comment_strings=1
+ endif
+
+! " Only do this part when Vim was compiled with the +eval feature.
+! if 1
+
+ " Enable file type detection.
+ " Use the default filetype settings, so that mail gets 'tw' set to 72,
+***************
+*** 116,122 ****
+
+ augroup END
+
+! endif " has("autocmd")
+
+ " Convenient command to see the difference between the current buffer and the
+ " file it was loaded from, thus the changes you made.
+--- 116,122 ----
+
+ augroup END
+
+! endif
+
+ " Convenient command to see the difference between the current buffer and the
+ " file it was loaded from, thus the changes you made.
+*** ../vim-8.1.0947/src/version.c 2019-02-18 20:42:46.834041670 +0100
+--- src/version.c 2019-02-18 21:27:19.370490199 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 948,
+ /**/
+
+--
+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.0949 b/data/vim/patches/8.1.0949
new file mode 100644
index 000000000..4a4938a4c
--- /dev/null
+++ b/data/vim/patches/8.1.0949
@@ -0,0 +1,296 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0949
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0949
+Problem: MS-windows defines GUI macros different than other systems.
+Solution: Swap FEAT_GUI and FEAT_GUI_MSWIN. (Hirohito Higashi, closes #3996)
+Files: src/Make_bc5.mak, src/Make_cyg_ming.mak, src/Make_ivc.mak,
+ src/Make_mvc.mak, src/if_ole.cpp, src/vim.h, src/vim.rc
+
+
+*** ../vim-8.1.0948/src/Make_bc5.mak 2019-02-17 17:44:36.195875582 +0100
+--- src/Make_bc5.mak 2019-02-18 21:35:12.847350760 +0100
+***************
+*** 405,411 ****
+ !endif
+
+ !if ("$(GUI)"=="yes")
+! DEFINES = $(DEFINES) -DFEAT_GUI -DFEAT_CLIPBOARD
+ !if ("$(DEBUG)"=="yes")
+ TARGET = gvimd.exe
+ !else
+--- 405,411 ----
+ !endif
+
+ !if ("$(GUI)"=="yes")
+! DEFINES = $(DEFINES) -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD
+ !if ("$(DEBUG)"=="yes")
+ TARGET = gvimd.exe
+ !else
+*** ../vim-8.1.0948/src/Make_cyg_ming.mak 2019-02-17 17:44:36.195875582 +0100
+--- src/Make_cyg_ming.mak 2019-02-18 21:35:12.847350760 +0100
+***************
+*** 491,497 ****
+
+ # See feature.h for a list of options.
+ # Any other defines can be included here.
+! DEF_GUI=-DFEAT_GUI -DFEAT_CLIPBOARD
+ DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
+ -DHAVE_PATHDEF -DFEAT_$(FEATURES) -DHAVE_STDINT_H
+ ifeq ($(ARCH),x86-64)
+--- 491,497 ----
+
+ # See feature.h for a list of options.
+ # Any other defines can be included here.
+! DEF_GUI=-DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD
+ DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
+ -DHAVE_PATHDEF -DFEAT_$(FEATURES) -DHAVE_STDINT_H
+ ifeq ($(ARCH),x86-64)
+*** ../vim-8.1.0948/src/Make_ivc.mak 2019-02-17 17:44:36.195875582 +0100
+--- src/Make_ivc.mak 2019-02-18 21:35:12.847350760 +0100
+***************
+*** 92,99 ****
+ # ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib version.lib comdlg32.lib comctl32.lib advapi32.lib shell32.lib ole32.lib uuid.lib /nologo /machine:I386 /nodefaultlib
+ # SUBTRACT LINK32 /incremental:yes
+
+! RSC_PROJ= /l 0x409 /d "FEAT_GUI"
+! # ADD RSC /l 0x409 /d "FEAT_GUI"
+
+ !IF "$(CFG)" == "Vim - Win32 Release gvim OLE"
+
+--- 92,99 ----
+ # ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib version.lib comdlg32.lib comctl32.lib advapi32.lib shell32.lib ole32.lib uuid.lib /nologo /machine:I386 /nodefaultlib
+ # SUBTRACT LINK32 /incremental:yes
+
+! RSC_PROJ= /l 0x409 /d "FEAT_GUI_MSWIN"
+! # ADD RSC /l 0x409 /d "FEAT_GUI_MSWIN"
+
+ !IF "$(CFG)" == "Vim - Win32 Release gvim OLE"
+
+***************
+*** 105,112 ****
+ VIM=gvim
+ EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+! # ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+
+ RSC_PROJ=$(RSC_PROJ) /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
+ # ADD RSC /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
+--- 105,112 ----
+ VIM=gvim
+ EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_MSWIN" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+! # ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_MSWIN" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+
+ RSC_PROJ=$(RSC_PROJ) /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
+ # ADD RSC /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
+***************
+*** 124,131 ****
+ VIM=gvimd
+ EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+! # ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+
+ RSC_PROJ=$(RSC_PROJ) /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
+ # ADD RSC /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
+--- 124,131 ----
+ VIM=gvimd
+ EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI_MSWIN" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+! # ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI_MSWIN" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+
+ RSC_PROJ=$(RSC_PROJ) /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
+ # ADD RSC /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
+***************
+*** 144,151 ****
+ VIM=gvim
+ EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /Fd.\gRel/ /Fo.\gRel/
+! # ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /Fd.\gRel/ /Fo.\gRel/
+
+ RSC_PROJ=$(RSC_PROJ) /d "NDEBUG" /fo.\gRel\vim.res
+ # ADD RSC /d "NDEBUG" /fo.\gRel\vim.res
+--- 144,151 ----
+ VIM=gvim
+ EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_MSWIN" /Fd.\gRel/ /Fo.\gRel/
+! # ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_MSWIN" /Fd.\gRel/ /Fo.\gRel/
+
+ RSC_PROJ=$(RSC_PROJ) /d "NDEBUG" /fo.\gRel\vim.res
+ # ADD RSC /d "NDEBUG" /fo.\gRel\vim.res
+***************
+*** 163,170 ****
+ VIM=gvimd
+ EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /Fd.\gDbg/ /Fo.\gDbg/
+! # ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /Fd.\gDbg/ /Fo.\gDbg/
+
+ RSC_PROJ=$(RSC_PROJ) /d "_DEBUG" /fo.\gDbg\vim.res
+ # ADD RSC /d "_DEBUG" /fo.\gDbg\vim.res
+--- 163,170 ----
+ VIM=gvimd
+ EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+
+! CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI_MSWIN" /Fd.\gDbg/ /Fo.\gDbg/
+! # ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI_MSWIN" /Fd.\gDbg/ /Fo.\gDbg/
+
+ RSC_PROJ=$(RSC_PROJ) /d "_DEBUG" /fo.\gDbg\vim.res
+ # ADD RSC /d "_DEBUG" /fo.\gDbg\vim.res
+***************
+*** 508,514 ****
+ # Begin Custom Build
+
+ "$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+! cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/ /I ".\oleRel" .\if_ole.cpp
+ @rem This is the default rule with /I "$(IntDir)" added
+
+ # End Custom Build
+--- 508,514 ----
+ # Begin Custom Build
+
+ "$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+! cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_MSWIN" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/ /I ".\oleRel" .\if_ole.cpp
+ @rem This is the default rule with /I "$(IntDir)" added
+
+ # End Custom Build
+***************
+*** 519,525 ****
+ # Begin Custom Build
+
+ "$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+! cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/ /I ".\oleDbg" .\if_ole.cpp
+ @rem This is the default rule with /I "$(IntDir)" added
+
+ # End Custom Build
+--- 519,525 ----
+ # Begin Custom Build
+
+ "$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+! cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /Od /D "_DEBUG" /D "FEAT_GUI_MSWIN" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/ /I ".\oleDbg" .\if_ole.cpp
+ @rem This is the default rule with /I "$(IntDir)" added
+
+ # End Custom Build
+*** ../vim-8.1.0948/src/Make_mvc.mak 2019-02-17 17:44:36.195875582 +0100
+--- src/Make_mvc.mak 2019-02-18 21:35:12.847350760 +0100
+***************
+*** 791,798 ****
+
+ !if "$(GUI)" == "yes"
+ SUBSYSTEM = windows
+! CFLAGS = $(CFLAGS) -DFEAT_GUI
+! RCFLAGS = $(RCFLAGS) -DFEAT_GUI
+ VIM = g$(VIM)
+ GUI_INCL = \
+ gui.h
+--- 791,798 ----
+
+ !if "$(GUI)" == "yes"
+ SUBSYSTEM = windows
+! CFLAGS = $(CFLAGS) -DFEAT_GUI_MSWIN
+! RCFLAGS = $(RCFLAGS) -DFEAT_GUI_MSWIN
+ VIM = g$(VIM)
+ GUI_INCL = \
+ gui.h
+*** ../vim-8.1.0948/src/if_ole.cpp 2019-02-17 17:44:36.211875510 +0100
+--- src/if_ole.cpp 2019-02-18 21:35:12.847350760 +0100
+***************
+*** 6,12 ****
+ * Do ":help credits" in Vim to see a list of people who contributed.
+ */
+
+! #if defined(FEAT_OLE) && defined(WIN32) && defined(FEAT_GUI)
+ /*
+ * OLE server implementation.
+ *
+--- 6,12 ----
+ * Do ":help credits" in Vim to see a list of people who contributed.
+ */
+
+! #if defined(FEAT_OLE) && defined(FEAT_GUI_MSWIN)
+ /*
+ * OLE server implementation.
+ *
+*** ../vim-8.1.0948/src/vim.h 2019-02-17 17:44:36.223875455 +0100
+--- src/vim.h 2019-02-18 21:35:12.847350760 +0100
+***************
+*** 15,23 ****
+ // Note: If you want to check for 64-bit use the _WIN64 macro.
+ #if defined(WIN32) || defined(_WIN32)
+ # define MSWIN
+- # ifdef FEAT_GUI
+- # define FEAT_GUI_MSWIN
+- # endif
+ #endif
+
+ // use fastcall for Borland, when compiling for MS-Windows
+--- 15,20 ----
+*** ../vim-8.1.0948/src/vim.rc 2019-02-17 17:44:36.223875455 +0100
+--- src/vim.rc 2019-02-18 21:35:12.847350760 +0100
+***************
+*** 23,29 ****
+ //
+ IDR_VIM ICON "vim.ico"
+
+! #ifdef FEAT_GUI
+ IDR_VIM_ERROR ICON "vim_error.ico"
+ IDR_VIM_ALERT ICON "vim_alert.ico"
+ IDR_VIM_INFO ICON "vim_info.ico"
+--- 23,29 ----
+ //
+ IDR_VIM ICON "vim.ico"
+
+! #ifdef FEAT_GUI_MSWIN
+ IDR_VIM_ERROR ICON "vim_error.ico"
+ IDR_VIM_ALERT ICON "vim_alert.ico"
+ IDR_VIM_INFO ICON "vim_info.ico"
+***************
+*** 46,52 ****
+ #endif
+
+ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gvim.exe.mnf"
+! #endif // FEAT_GUI
+
+ //
+ // Type Library
+--- 46,52 ----
+ #endif
+
+ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gvim.exe.mnf"
+! #endif // FEAT_GUI_MSWIN
+
+ //
+ // Type Library
+*** ../vim-8.1.0948/src/version.c 2019-02-18 21:31:58.228542920 +0100
+--- src/version.c 2019-02-18 21:36:43.591027837 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 949,
+ /**/
+
+--
+For humans, honesty is a matter of degree. Engineers are always honest in
+matters of technology and human relationships. That's why it's a good idea
+to keep engineers away from customers, romantic interests, and other people
+who can't handle the truth.
+ (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.0950 b/data/vim/patches/8.1.0950
new file mode 100644
index 000000000..d49ab803e
--- /dev/null
+++ b/data/vim/patches/8.1.0950
@@ -0,0 +1,126 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0950
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0950
+Problem: Using :python sets 'pyxversion' even when not executed.
+Solution: Check the "skip" flag. (Shane Harper, closes #3995)
+Files: src/if_python.c, src/if_python3.c, src/testdir/test_python2.vim,
+ src/testdir/test_python3.vim
+
+
+*** ../vim-8.1.0949/src/if_python.c 2019-02-17 17:44:36.211875510 +0100
+--- src/if_python.c 2019-02-18 22:03:51.645989786 +0100
+***************
+*** 1109,1120 ****
+ {
+ char_u *script;
+
+- if (p_pyx == 0)
+- p_pyx = 2;
+-
+ script = script_get(eap, eap->arg);
+ if (!eap->skip)
+ {
+ DoPyCommand(script == NULL ? (char *) eap->arg : (char *) script,
+ (rangeinitializer) init_range_cmd,
+ (runner) run_cmd,
+--- 1109,1120 ----
+ {
+ char_u *script;
+
+ script = script_get(eap, eap->arg);
+ if (!eap->skip)
+ {
++ if (p_pyx == 0)
++ p_pyx = 2;
++
+ DoPyCommand(script == NULL ? (char *) eap->arg : (char *) script,
+ (rangeinitializer) init_range_cmd,
+ (runner) run_cmd,
+*** ../vim-8.1.0949/src/if_python3.c 2019-02-17 17:44:36.211875510 +0100
+--- src/if_python3.c 2019-02-18 22:03:59.553940718 +0100
+***************
+*** 1010,1021 ****
+ {
+ char_u *script;
+
+- if (p_pyx == 0)
+- p_pyx = 3;
+-
+ script = script_get(eap, eap->arg);
+ if (!eap->skip)
+ {
+ DoPyCommand(script == NULL ? (char *) eap->arg : (char *) script,
+ (rangeinitializer) init_range_cmd,
+ (runner) run_cmd,
+--- 1010,1021 ----
+ {
+ char_u *script;
+
+ script = script_get(eap, eap->arg);
+ if (!eap->skip)
+ {
++ if (p_pyx == 0)
++ p_pyx = 3;
++
+ DoPyCommand(script == NULL ? (char *) eap->arg : (char *) script,
+ (rangeinitializer) init_range_cmd,
+ (runner) run_cmd,
+*** ../vim-8.1.0949/src/testdir/test_python2.vim 2018-12-22 18:59:00.790537016 +0100
+--- src/testdir/test_python2.vim 2019-02-18 21:57:07.812473174 +0100
+***************
+*** 63,65 ****
+--- 63,73 ----
+ py del f
+ delfunc s:foo
+ endfunc
++
++ func Test_skipped_python_command_does_not_affect_pyxversion()
++ set pyxversion=0
++ if 0
++ python import vim
++ endif
++ call assert_equal(0, &pyxversion) " This assertion would have failed with Vim 8.0.0251. (pyxversion was introduced in 8.0.0251.)
++ endfunc
+*** ../vim-8.1.0949/src/testdir/test_python3.vim 2018-12-22 18:59:00.790537016 +0100
+--- src/testdir/test_python3.vim 2019-02-18 21:48:57.287378639 +0100
+***************
+*** 63,65 ****
+--- 63,73 ----
+ py3 del f
+ delfunc s:foo
+ endfunc
++
++ func Test_skipped_python3_command_does_not_affect_pyxversion()
++ set pyxversion=0
++ if 0
++ python3 import vim
++ endif
++ call assert_equal(0, &pyxversion) " This assertion would have failed with Vim 8.0.0251. (pyxversion was introduced in 8.0.0251.)
++ endfunc
+*** ../vim-8.1.0949/src/version.c 2019-02-18 21:41:34.477750367 +0100
+--- src/version.c 2019-02-18 22:04:11.605865915 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 950,
+ /**/
+
+--
+Female engineers become irresistible at the age of consent and remain that
+way until about thirty minutes after their clinical death. Longer if it's a
+warm day.
+ (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.0951 b/data/vim/patches/8.1.0951
new file mode 100644
index 000000000..a4fd225bd
--- /dev/null
+++ b/data/vim/patches/8.1.0951
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0951
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0951
+Problem: Using WIN64 even though it is never defined.
+Solution: Only use _WIN64. (Ken Takata, closes #3997)
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.0950/src/evalfunc.c 2019-02-17 17:44:36.203875545 +0100
+--- src/evalfunc.c 2019-02-18 22:13:26.310437264 +0100
+***************
+*** 6158,6164 ****
+ #if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__))
+ "win32unix",
+ #endif
+! #if defined(WIN64) || defined(_WIN64)
+ "win64",
+ #endif
+ #ifdef EBCDIC
+--- 6158,6164 ----
+ #if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__))
+ "win32unix",
+ #endif
+! #ifdef _WIN64
+ "win64",
+ #endif
+ #ifdef EBCDIC
+*** ../vim-8.1.0950/src/version.c 2019-02-18 22:04:52.949609091 +0100
+--- src/version.c 2019-02-18 22:12:46.674681786 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 951,
+ /**/
+
+--
+Engineers are widely recognized as superior marriage material: intelligent,
+dependable, employed, honest, and handy around the house.
+ (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.0952 b/data/vim/patches/8.1.0952
new file mode 100644
index 000000000..6610fab02
--- /dev/null
+++ b/data/vim/patches/8.1.0952
@@ -0,0 +1,181 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0952
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0952
+Problem: Compilation warnings when building the MS-Windows installer.
+Solution: Fix buffer sizes. (Yasuhiro Matsumoto, closes #3999)
+Files: src/dosinst.c, src/dosinst.h, src/uninstal.c
+
+
+*** ../vim-8.1.0951/src/dosinst.c 2019-02-10 21:48:21.381272052 +0100
+--- src/dosinst.c 2019-02-18 22:17:31.948915199 +0100
+***************
+*** 456,462 ****
+ static int
+ run_silent_uninstall(char *uninst_exe)
+ {
+! char vimrt_dir[BUFSIZE];
+ char temp_uninst[BUFSIZE];
+ char temp_dir[MAX_PATH];
+ char buf[BUFSIZE * 2 + 10];
+--- 456,462 ----
+ static int
+ run_silent_uninstall(char *uninst_exe)
+ {
+! char vimrt_dir[MAX_PATH];
+ char temp_uninst[BUFSIZE];
+ char temp_dir[MAX_PATH];
+ char buf[BUFSIZE * 2 + 10];
+***************
+*** 505,511 ****
+ HKEY uninstall_key_handle;
+ char *uninstall_key = "software\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
+ char subkey_name_buff[BUFSIZE];
+! char temp_string_buffer[BUFSIZE];
+ DWORD local_bufsize = BUFSIZE;
+ FILETIME temp_pfiletime;
+ DWORD key_index;
+--- 505,511 ----
+ HKEY uninstall_key_handle;
+ char *uninstall_key = "software\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
+ char subkey_name_buff[BUFSIZE];
+! char temp_string_buffer[BUFSIZE-2];
+ DWORD local_bufsize = BUFSIZE;
+ FILETIME temp_pfiletime;
+ DWORD key_index;
+***************
+*** 1614,1620 ****
+ const char *vim_ext_ThreadingModel = "Apartment";
+ const char *vim_ext_name = "Vim Shell Extension";
+ const char *vim_ext_clsid = "{51EEE242-AD87-11d3-9C1E-0090278BBD99}";
+! char vim_exe_path[BUFSIZE];
+ char display_name[BUFSIZE];
+ char uninstall_string[BUFSIZE];
+ char icon_string[BUFSIZE];
+--- 1614,1620 ----
+ const char *vim_ext_ThreadingModel = "Apartment";
+ const char *vim_ext_name = "Vim Shell Extension";
+ const char *vim_ext_clsid = "{51EEE242-AD87-11d3-9C1E-0090278BBD99}";
+! char vim_exe_path[MAX_PATH];
+ char display_name[BUFSIZE];
+ char uninstall_string[BUFSIZE];
+ char icon_string[BUFSIZE];
+***************
+*** 1869,1875 ****
+ const char *link_name,
+ const char *shell_folder_name)
+ {
+! char shell_folder_path[BUFSIZE];
+
+ if (get_shell_folder_path(shell_folder_path, shell_folder_name) == FAIL)
+ {
+--- 1869,1875 ----
+ const char *link_name,
+ const char *shell_folder_name)
+ {
+! char shell_folder_path[MAX_PATH];
+
+ if (get_shell_folder_path(shell_folder_path, shell_folder_name) == FAIL)
+ {
+***************
+*** 2278,2285 ****
+ int i;
+ int vimfiles_dir_choice = choices[idx].arg;
+ char *p;
+! char vimdir_path[BUFSIZE];
+! char vimfiles_path[BUFSIZE];
+ char tmp_dirname[BUFSIZE];
+
+ /* switch on the location that the user wants the plugin directories
+--- 2278,2285 ----
+ int i;
+ int vimfiles_dir_choice = choices[idx].arg;
+ char *p;
+! char vimdir_path[MAX_PATH];
+! char vimfiles_path[MAX_PATH + 9];
+ char tmp_dirname[BUFSIZE];
+
+ /* switch on the location that the user wants the plugin directories
+*** ../vim-8.1.0951/src/dosinst.h 2017-10-14 17:17:35.000000000 +0200
+--- src/dosinst.h 2019-02-18 22:17:31.948915199 +0100
+***************
+*** 388,394 ****
+ run_command(char *cmd)
+ {
+ char *cmd_path;
+! char cmd_buf[BUFSIZE];
+ char *p;
+
+ /* On WinNT, 'start' is a shell built-in for cmd.exe rather than an
+--- 388,394 ----
+ run_command(char *cmd)
+ {
+ char *cmd_path;
+! char cmd_buf[BUFSIZE * 2 + 35];
+ char *p;
+
+ /* On WinNT, 'start' is a shell built-in for cmd.exe rather than an
+***************
+*** 498,504 ****
+ }
+
+
+! char installdir[BUFSIZE]; /* top of the installation dir, where the
+ install.exe is located, E.g.:
+ "c:\vim\vim60" */
+ int runtimeidx; /* index in installdir[] where "vim60" starts */
+--- 498,504 ----
+ }
+
+
+! char installdir[MAX_PATH-9]; /* top of the installation dir, where the
+ install.exe is located, E.g.:
+ "c:\vim\vim60" */
+ int runtimeidx; /* index in installdir[] where "vim60" starts */
+*** ../vim-8.1.0951/src/uninstal.c 2017-10-14 17:17:35.000000000 +0200
+--- src/uninstal.c 2019-02-18 22:17:31.948915199 +0100
+***************
+*** 321,328 ****
+ int i;
+ struct stat st;
+ char icon[BUFSIZE];
+! char path[BUFSIZE];
+! char popup_path[BUFSIZE];
+
+ /* The nsis uninstaller calls us with a "-nsis" argument. */
+ if (argc == 2 && stricmp(argv[1], "-nsis") == 0)
+--- 321,328 ----
+ int i;
+ struct stat st;
+ char icon[BUFSIZE];
+! char path[MAX_PATH];
+! char popup_path[MAX_PATH];
+
+ /* The nsis uninstaller calls us with a "-nsis" argument. */
+ if (argc == 2 && stricmp(argv[1], "-nsis") == 0)
+*** ../vim-8.1.0951/src/version.c 2019-02-18 22:14:15.198135199 +0100
+--- src/version.c 2019-02-18 22:18:54.292402946 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 952,
+ /**/
+
+--
+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.0953 b/data/vim/patches/8.1.0953
new file mode 100644
index 000000000..ea45f0f43
--- /dev/null
+++ b/data/vim/patches/8.1.0953
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0953
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0953
+Problem: A very long file is truncated at 2^31 lines.
+Solution: Use LONG_MAX for MAXLNUM. (Dominique Pelle, closes #4011)
+Files: src/vim.h
+
+
+*** ../vim-8.1.0952/src/vim.h 2019-02-18 21:41:34.477750367 +0100
+--- src/vim.h 2019-02-19 21:24:24.887720755 +0100
+***************
+*** 54,59 ****
+--- 54,62 ----
+ Error: configure did not run properly. Check auto/config.log.
+ # endif
+
++ // for INT_MAX, LONG_MAX et al.
++ #include <limits.h>
++
+ /*
+ * Cygwin may have fchdir() in a newer release, but in most versions it
+ * doesn't work well and avoiding it keeps the binary backward compatible.
+***************
+*** 455,463 ****
+ # include <errno.h>
+ #endif
+
+- /* for INT_MAX et al. */
+- #include <limits.h>
+-
+ /*
+ * Allow other (non-unix) systems to configure themselves now
+ * These are also in os_unix.h, because osdef.sh needs them there.
+--- 458,463 ----
+***************
+*** 1666,1682 ****
+ * not a real problem. BTW: Longer lines are split.
+ */
+ #ifdef __MVS__
+! # define MAXCOL (0x3fffffffL) /* maximum column number, 30 bits */
+! # define MAXLNUM (0x3fffffffL) /* maximum (invalid) line number */
+ #else
+! # define MAXCOL (0x7fffffffL) /* maximum column number, 31 bits */
+! # define MAXLNUM (0x7fffffffL) /* maximum (invalid) line number */
+ #endif
+
+! #define SHOWCMD_COLS 10 /* columns needed by shown command */
+! #define STL_MAX_ITEM 80 /* max nr of %<flag> in statusline */
+
+! typedef void *vim_acl_T; /* dummy to pass an ACL to a function */
+
+ #ifndef mch_memmove
+ # define mch_memmove(to, from, len) memmove((char*)(to), (char*)(from), (size_t)(len))
+--- 1666,1682 ----
+ * not a real problem. BTW: Longer lines are split.
+ */
+ #ifdef __MVS__
+! # define MAXCOL (0x3fffffffL) // maximum column number, 30 bits
+! # define MAXLNUM (0x3fffffffL) // maximum (invalid) line number
+ #else
+! # define MAXCOL INT_MAX // maximum column number
+! # define MAXLNUM LONG_MAX // maximum (invalid) line number
+ #endif
+
+! #define SHOWCMD_COLS 10 // columns needed by shown command
+! #define STL_MAX_ITEM 80 // max nr of %<flag> in statusline
+
+! typedef void *vim_acl_T; // dummy to pass an ACL to a function
+
+ #ifndef mch_memmove
+ # define mch_memmove(to, from, len) memmove((char*)(to), (char*)(from), (size_t)(len))
+*** ../vim-8.1.0952/src/version.c 2019-02-18 22:19:29.124186022 +0100
+--- src/version.c 2019-02-19 21:19:41.165686811 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 953,
+ /**/
+
+--
+It doesn't really matter what you are able to do if you don't do it.
+ (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.0954 b/data/vim/patches/8.1.0954
new file mode 100644
index 000000000..63b6cd01f
--- /dev/null
+++ b/data/vim/patches/8.1.0954
@@ -0,0 +1,137 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0954
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0954
+Problem: Arguments of semsg() and siemsg() are not checked.
+Solution: Add function prototype with __attribute__.
+Files: src/message.c, src/proto/message.pro, src/proto.h
+
+
+*** ../vim-8.1.0953/src/message.c 2019-02-17 17:44:36.215875493 +0100
+--- src/message.c 2019-02-19 21:28:21.094091607 +0100
+***************
+*** 730,735 ****
+--- 730,736 ----
+ return TRUE; /* no error messages at the moment */
+ }
+
++ #ifndef PROTO // manual proto with __attribute__
+ /*
+ * Print an error message with format string and variable arguments.
+ * Note: caller must not pass 'IObuff' as 1st argument.
+***************
+*** 749,754 ****
+--- 750,756 ----
+ }
+ return TRUE; /* no error messages at the moment */
+ }
++ #endif
+
+ /*
+ * Same as emsg(...), but abort on error when ABORT_ON_INTERNAL_ERROR is
+***************
+*** 765,770 ****
+--- 767,773 ----
+ #endif
+ }
+
++ #ifndef PROTO // manual proto with __attribute__
+ /*
+ * Same as semsg(...) but abort on error when ABORT_ON_INTERNAL_ERROR is
+ * defined. It is used for internal errors only, so that they can be
+***************
+*** 783,792 ****
+ va_end(ap);
+ emsg_core(IObuff);
+ }
+! #ifdef ABORT_ON_INTERNAL_ERROR
+ abort();
+! #endif
+ }
+
+ /*
+ * Give an "Internal error" message.
+--- 786,796 ----
+ va_end(ap);
+ emsg_core(IObuff);
+ }
+! # ifdef ABORT_ON_INTERNAL_ERROR
+ abort();
+! # endif
+ }
++ #endif
+
+ /*
+ * Give an "Internal error" message.
+*** ../vim-8.1.0953/src/proto/message.pro 2019-01-19 17:43:03.425449092 +0100
+--- src/proto/message.pro 2019-02-19 21:29:46.765501862 +0100
+***************
+*** 11,19 ****
+ void ignore_error_for_testing(char_u *error);
+ void do_perror(char *msg);
+ int emsg(char *s);
+- int semsg(const char *s, ...);
+ void iemsg(char *s);
+- void siemsg(const char *s, ...);
+ void internal_error(char *where);
+ void emsg_invreg(int name);
+ char *msg_trunc_attr(char *s, int force, int attr);
+--- 11,17 ----
+*** ../vim-8.1.0953/src/proto.h 2019-02-17 17:44:36.219875473 +0100
+--- src/proto.h 2019-02-19 21:32:14.388486699 +0100
+***************
+*** 134,139 ****
+--- 134,161 ----
+ #endif
+ ;
+
++ /* These prototypes cannot be produced automatically. */
++ int
++ # ifdef __BORLANDC__
++ _RTLENTRYF
++ # endif
++ semsg(const char *, ...)
++ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
++ __attribute__((format(printf, 1, 0)))
++ #endif
++ ;
++
++ /* These prototypes cannot be produced automatically. */
++ void
++ # ifdef __BORLANDC__
++ _RTLENTRYF
++ # endif
++ siemsg(const char *, ...)
++ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
++ __attribute__((format(printf, 1, 0)))
++ #endif
++ ;
++
+ int
+ # ifdef __BORLANDC__
+ _RTLENTRYF
+*** ../vim-8.1.0953/src/version.c 2019-02-19 21:24:50.559543423 +0100
+--- src/version.c 2019-02-19 21:33:16.472060095 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 954,
+ /**/
+
+--
+No engineer can take a shower without wondering if some sort of Teflon coating
+would make showering unnecessary.
+ (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.0955 b/data/vim/patches/8.1.0955
new file mode 100644
index 000000000..1a8d7cadb
--- /dev/null
+++ b/data/vim/patches/8.1.0955
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0955
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0955
+Problem: Matchit autoload directory not in installer. (Chris Morgan)
+Solution: Adjust the NSIS script. (Christian Brabandt, closes #4006)
+Files: nsis/gvim.nsi
+
+
+*** ../vim-8.1.0954/nsis/gvim.nsi 2018-12-21 17:59:30.100109769 +0100
+--- nsis/gvim.nsi 2019-02-19 21:38:40.617834969 +0100
+***************
+*** 379,384 ****
+--- 379,386 ----
+ File ${VIMRT}\pack\dist\opt\matchit\doc\*.*
+ SetOutPath $0\pack\dist\opt\matchit\plugin
+ File ${VIMRT}\pack\dist\opt\matchit\plugin\*.*
++ SetOutPath $0\pack\dist\opt\matchit\autoload
++ File ${VIMRT}\pack\dist\opt\matchit\autoload\*.*
+
+ SetOutPath $0\pack\dist\opt\shellmenu\plugin
+ File ${VIMRT}\pack\dist\opt\shellmenu\plugin\*.*
+*** ../vim-8.1.0954/src/version.c 2019-02-19 21:34:01.987747438 +0100
+--- src/version.c 2019-02-19 21:39:43.229405490 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 955,
+ /**/
+
+--
+Normal people believe that if it ain't broke, don't fix it. Engineers believe
+that if it ain't broke, it doesn't have enough features yet.
+ (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.0956 b/data/vim/patches/8.1.0956
new file mode 100644
index 000000000..af4ca31d8
--- /dev/null
+++ b/data/vim/patches/8.1.0956
@@ -0,0 +1,153 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0956
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0956
+Problem: Using context:0 in 'diffopt' does not work well.
+Solution: Make zero context do the same as one line context. (closes #4005)
+Files: src/diff.c, src/testdir/test_diffmode.vim,
+ src/testdir/dumps/Test_diff_06.0.dump,
+ src/testdir/dumps/Test_diff_06.1.dump,
+ src/testdir/dumps/Test_diff_06.2.dump
+
+
+*** ../vim-8.1.0955/src/diff.c 2019-02-15 21:06:05.334289769 +0100
+--- src/diff.c 2019-02-19 22:48:57.940746351 +0100
+***************
+*** 2277,2283 ****
+ 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;
+
+--- 2277,2283 ----
+ tp->tp_diff_invalid = TRUE;
+
+ diff_flags = diff_flags_new;
+! diff_context = diff_context_new == 0 ? 1 : diff_context_new;
+ diff_foldcolumn = diff_foldcolumn_new;
+ diff_algorithm = diff_algorithm_new;
+
+*** ../vim-8.1.0955/src/testdir/test_diffmode.vim 2018-12-04 22:24:12.193693584 +0100
+--- src/testdir/test_diffmode.vim 2019-02-19 22:58:57.241162183 +0100
+***************
+*** 783,788 ****
+--- 783,799 ----
+ 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', '')
+
++ " Variants on test 6 with different context settings
++ call term_sendkeys(buf, ":set diffopt+=context:2\<cr>")
++ call VerifyScreenDump(buf, 'Test_diff_06.2', {})
++ call term_sendkeys(buf, ":set diffopt-=context:2\<cr>")
++ call term_sendkeys(buf, ":set diffopt+=context:1\<cr>")
++ call VerifyScreenDump(buf, 'Test_diff_06.1', {})
++ call term_sendkeys(buf, ":set diffopt-=context:1\<cr>")
++ call term_sendkeys(buf, ":set diffopt+=context:0\<cr>")
++ call VerifyScreenDump(buf, 'Test_diff_06.0', {})
++ call term_sendkeys(buf, ":set diffopt-=context:0\<cr>")
++
+ " 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: ");',
+*** ../vim-8.1.0955/src/testdir/dumps/Test_diff_06.0.dump 2019-02-19 22:59:57.128800249 +0100
+--- src/testdir/dumps/Test_diff_06.0.dump 2019-02-19 22:56:37.406005390 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |++0#0000e05#a8a8a8255| >+|-@1| @1|3| |l|i|n|e|s|:| |1|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|3| |l|i|n|e|s|:| |1|-@19
++ | @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| @1|4| |l|i|n|e|s|:| |6|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |6|-@19
++ | @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
++ | +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|+|=|c|o|n|t|e|x|t|:|0| @51
+*** ../vim-8.1.0955/src/testdir/dumps/Test_diff_06.1.dump 2019-02-19 22:59:57.132800224 +0100
+--- src/testdir/dumps/Test_diff_06.1.dump 2019-02-19 22:43:30.442648520 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |++0#0000e05#a8a8a8255| >+|-@1| @1|3| |l|i|n|e|s|:| |1|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|3| |l|i|n|e|s|:| |1|-@19
++ | @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| @1|4| |l|i|n|e|s|:| |6|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |6|-@19
++ | @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
++ | +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|+|=|c|o|n|t|e|x|t|:|1| @51
+*** ../vim-8.1.0955/src/testdir/dumps/Test_diff_06.2.dump 2019-02-19 22:59:57.132800224 +0100
+--- src/testdir/dumps/Test_diff_06.2.dump 2019-02-19 22:43:29.386654543 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |++0#0000e05#a8a8a8255| >+|-@1| @1|2| |l|i|n|e|s|:| |1|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |1|-@19
++ | @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| @1|2| |l|i|n|e|s|:| |7|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |7|-@19
++ | @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
++ |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&&@1|s|e|t| |d|i|f@1|o|p|t|+|=|c|o|n|t|e|x|t|:|2| @50
+*** ../vim-8.1.0955/src/version.c 2019-02-19 21:40:22.617135352 +0100
+--- src/version.c 2019-02-19 23:00:04.592755112 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 956,
+ /**/
+
+--
+I think that you'll agree that engineers are very effective in their social
+interactions. It's the "normal" people who are nuts.
+ (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.0957 b/data/vim/patches/8.1.0957
new file mode 100644
index 000000000..48102d50b
--- /dev/null
+++ b/data/vim/patches/8.1.0957
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0957
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0957 (after 8.1.0915)
+Problem: Mac: fsync fails on network share.
+Solution: Check for ENOTSUP. (Yee Cheng Chin, closes #4016)
+Files: src/fileio.c
+
+
+*** ../vim-8.1.0956/src/fileio.c 2019-02-17 17:44:36.207875527 +0100
+--- src/fileio.c 2019-02-20 20:33:52.970385671 +0100
+***************
+*** 5135,5141 ****
+
+ # ifdef MACOS_X
+ r = fcntl(fd, F_FULLFSYNC);
+! if (r != 0 && errno == ENOTTY)
+ # endif
+ r = fsync(fd);
+ return r;
+--- 5135,5141 ----
+
+ # ifdef MACOS_X
+ r = fcntl(fd, F_FULLFSYNC);
+! if (r != 0 && (errno == ENOTTY || errno == ENOTSUP))
+ # endif
+ r = fsync(fd);
+ return r;
+*** ../vim-8.1.0956/src/version.c 2019-02-19 23:00:19.568664524 +0100
+--- src/version.c 2019-02-20 20:35:20.869889955 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 957,
+ /**/
+
+--
+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.0958 b/data/vim/patches/8.1.0958
new file mode 100644
index 000000000..1c73bb3ff
--- /dev/null
+++ b/data/vim/patches/8.1.0958
@@ -0,0 +1,239 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0958
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0958
+Problem: Compiling weird regexp pattern is very slow.
+Solution: When reallocating post list increase size by 50%. (Kuang-che Wu,
+ closes #4012) Make assert_inrange() accept float values.
+Files: src/regexp_nfa.c, src/eval.c, src/testdir/test_regexp_latin.vim,
+ src/testdir/test_assert.vim
+
+
+*** ../vim-8.1.0957/src/regexp_nfa.c 2019-02-17 20:16:58.101377164 +0100
+--- src/regexp_nfa.c 2019-02-20 21:57:19.818765782 +0100
+***************
+*** 509,518 ****
+ realloc_post_list(void)
+ {
+ int nstate_max = (int)(post_end - post_start);
+! int new_max = nstate_max + 1000;
+ int *new_start;
+ int *old_start;
+
+ new_start = (int *)lalloc(new_max * sizeof(int), TRUE);
+ if (new_start == NULL)
+ return FAIL;
+--- 509,521 ----
+ realloc_post_list(void)
+ {
+ int nstate_max = (int)(post_end - post_start);
+! int new_max;
+ int *new_start;
+ int *old_start;
+
++ // For weird patterns the number of states can be very high. Increasing by
++ // 50% seems a reasonable compromise between memory use and speed.
++ new_max = nstate_max * 3 / 2;
+ new_start = (int *)lalloc(new_max * sizeof(int), TRUE);
+ if (new_start == NULL)
+ return FAIL;
+*** ../vim-8.1.0957/src/eval.c 2019-02-17 17:44:36.203875545 +0100
+--- src/eval.c 2019-02-20 21:51:44.813447677 +0100
+***************
+*** 9365,9396 ****
+ {
+ garray_T ga;
+ int error = FALSE;
+- varnumber_T lower = tv_get_number_chk(&argvars[0], &error);
+- varnumber_T upper = tv_get_number_chk(&argvars[1], &error);
+- varnumber_T actual = tv_get_number_chk(&argvars[2], &error);
+ char_u *tofree;
+ char msg[200];
+ char_u numbuf[NUMBUFLEN];
+
+! if (error)
+! return 0;
+! if (actual < lower || actual > upper)
+! {
+! prepare_assert_error(&ga);
+! if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+! ga_concat(&ga, tv2string(&argvars[3], &tofree, numbuf, 0));
+! vim_free(tofree);
+ }
+! else
+ {
+! vim_snprintf(msg, 200, "Expected range %ld - %ld, but got %ld",
+ (long)lower, (long)upper, (long)actual);
+! ga_concat(&ga, (char_u *)msg);
+ }
+- assert_error(&ga);
+- ga_clear(&ga);
+- return 1;
+ }
+ return 0;
+ }
+--- 9365,9429 ----
+ {
+ garray_T ga;
+ int error = FALSE;
+ char_u *tofree;
+ char msg[200];
+ char_u numbuf[NUMBUFLEN];
+
+! #ifdef FEAT_FLOAT
+! if (argvars[0].v_type == VAR_FLOAT
+! || argvars[1].v_type == VAR_FLOAT
+! || argvars[2].v_type == VAR_FLOAT)
+! {
+! float_T flower = tv_get_float(&argvars[0]);
+! float_T fupper = tv_get_float(&argvars[1]);
+! float_T factual = tv_get_float(&argvars[2]);
+!
+! if (factual < flower || factual > fupper)
+ {
+! prepare_assert_error(&ga);
+! if (argvars[3].v_type != VAR_UNKNOWN)
+! {
+! ga_concat(&ga, tv2string(&argvars[3], &tofree, numbuf, 0));
+! vim_free(tofree);
+! }
+! else
+! {
+! vim_snprintf(msg, 200, "Expected range %g - %g, but got %g",
+! flower, fupper, factual);
+! ga_concat(&ga, (char_u *)msg);
+! }
+! assert_error(&ga);
+! ga_clear(&ga);
+! return 1;
+ }
+! }
+! else
+! #endif
+! {
+! varnumber_T lower = tv_get_number_chk(&argvars[0], &error);
+! varnumber_T upper = tv_get_number_chk(&argvars[1], &error);
+! varnumber_T actual = tv_get_number_chk(&argvars[2], &error);
+!
+! if (error)
+! return 0;
+! if (actual < lower || actual > upper)
+ {
+! prepare_assert_error(&ga);
+! if (argvars[3].v_type != VAR_UNKNOWN)
+! {
+! ga_concat(&ga, tv2string(&argvars[3], &tofree, numbuf, 0));
+! vim_free(tofree);
+! }
+! else
+! {
+! vim_snprintf(msg, 200, "Expected range %ld - %ld, but got %ld",
+ (long)lower, (long)upper, (long)actual);
+! ga_concat(&ga, (char_u *)msg);
+! }
+! assert_error(&ga);
+! ga_clear(&ga);
+! return 1;
+ }
+ }
+ return 0;
+ }
+***************
+*** 9822,9835 ****
+ {
+ float_T f1, f2;
+
+! if (typ1->v_type == VAR_FLOAT)
+! f1 = typ1->vval.v_float;
+! else
+! f1 = tv_get_number(typ1);
+! if (typ2->v_type == VAR_FLOAT)
+! f2 = typ2->vval.v_float;
+! else
+! f2 = tv_get_number(typ2);
+ n1 = FALSE;
+ switch (type)
+ {
+--- 9855,9862 ----
+ {
+ float_T f1, f2;
+
+! f1 = tv_get_float(typ1);
+! f2 = tv_get_float(typ2);
+ n1 = FALSE;
+ switch (type)
+ {
+*** ../vim-8.1.0957/src/testdir/test_regexp_latin.vim 2019-02-17 20:16:58.101377164 +0100
+--- src/testdir/test_regexp_latin.vim 2019-02-20 21:56:49.094997247 +0100
+***************
+*** 130,132 ****
+--- 130,143 ----
+ call assert_equal(0, search("[ -*\\t-\\n]"))
+ bwipe!
+ endfunc
++
++ func Test_pattern_compile_speed()
++ if !exists('+spellcapcheck') || !has('reltime')
++ return
++ endif
++ let start = reltime()
++ " this used to be very slow, not it should be about a second
++ set spc=\\v(((((Nxxxxxxx&&xxxx){179})+)+)+){179}
++ call assert_inrange(0.01, 10.0, reltimefloat(reltime(start)))
++ set spc=
++ endfunc
+*** ../vim-8.1.0957/src/testdir/test_assert.vim 2019-01-25 20:48:29.381157353 +0100
+--- src/testdir/test_assert.vim 2019-02-20 21:55:13.587732935 +0100
+***************
+*** 190,195 ****
+--- 190,211 ----
+ call remove(v:errors, 0)
+
+ call assert_fails('call assert_inrange(1, 1)', 'E119:')
++
++ if has('float')
++ call assert_equal(0, assert_inrange(7.0, 7, 7))
++ call assert_equal(0, assert_inrange(7, 7.0, 7))
++ call assert_equal(0, assert_inrange(7, 7, 7.0))
++ call assert_equal(0, assert_inrange(5, 7, 5.0))
++ call assert_equal(0, assert_inrange(5, 7, 6.0))
++ call assert_equal(0, assert_inrange(5, 7, 7.0))
++
++ call assert_equal(1, assert_inrange(5, 7, 4.0))
++ call assert_match("Expected range 5.0 - 7.0, but got 4.0", v:errors[0])
++ call remove(v:errors, 0)
++ call assert_equal(1, assert_inrange(5, 7, 8.0))
++ call assert_match("Expected range 5.0 - 7.0, but got 8.0", v:errors[0])
++ call remove(v:errors, 0)
++ endif
+ endfunc
+
+ func Test_assert_with_msg()
+*** ../vim-8.1.0957/src/version.c 2019-02-20 20:36:55.741352867 +0100
+--- src/version.c 2019-02-20 22:03:18.520201671 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 958,
+ /**/
+
+--
+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.0959 b/data/vim/patches/8.1.0959
new file mode 100644
index 000000000..c7299e0f7
--- /dev/null
+++ b/data/vim/patches/8.1.0959
@@ -0,0 +1,199 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0959
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0959
+Problem: Sorting large numbers is not tested and does not work properly.
+Solution: Add test. Fix comparing lines with and without a number.
+ (Dominique Pelle, closes #4017)
+Files: src/ex_cmds.c, src/testdir/test_sort.vim
+
+*** ../vim-8.1.0958/src/ex_cmds.c 2019-02-17 17:44:36.203875545 +0100
+--- src/ex_cmds.c 2019-02-20 22:15:27.631399246 +0100
+***************
+*** 303,309 ****
+ varnumber_T start_col_nr; /* starting column number */
+ varnumber_T end_col_nr; /* ending column number */
+ } line;
+! varnumber_T value; /* value if sorting by integer */
+ #ifdef FEAT_FLOAT
+ float_T value_flt; /* value if sorting by float */
+ #endif
+--- 303,313 ----
+ varnumber_T start_col_nr; /* starting column number */
+ varnumber_T end_col_nr; /* ending column number */
+ } line;
+! struct
+! {
+! varnumber_T value; /* value if sorting by integer */
+! int is_number; /* TRUE when line contains a number */
+! } num;
+ #ifdef FEAT_FLOAT
+ float_T value_flt; /* value if sorting by float */
+ #endif
+***************
+*** 335,345 ****
+ if (got_int)
+ sort_abort = TRUE;
+
+- /* When sorting numbers "start_col_nr" is the number, not the column
+- * number. */
+ if (sort_nr)
+! result = l1.st_u.value == l2.st_u.value ? 0
+! : l1.st_u.value > l2.st_u.value ? 1 : -1;
+ #ifdef FEAT_FLOAT
+ else if (sort_flt)
+ result = l1.st_u.value_flt == l2.st_u.value_flt ? 0
+--- 339,352 ----
+ if (got_int)
+ sort_abort = TRUE;
+
+ if (sort_nr)
+! {
+! if (l1.st_u.num.is_number != l2.st_u.num.is_number)
+! result = l1.st_u.num.is_number - l2.st_u.num.is_number;
+! else
+! result = l1.st_u.num.value == l2.st_u.num.value ? 0
+! : l1.st_u.num.value > l2.st_u.num.value ? 1 : -1;
+! }
+ #ifdef FEAT_FLOAT
+ else if (sort_flt)
+ result = l1.st_u.value_flt == l2.st_u.value_flt ? 0
+***************
+*** 553,563 ****
+ if (s > p && s[-1] == '-')
+ --s; /* include preceding negative sign */
+ if (*s == NUL)
+! /* empty line should sort before any number */
+! nrs[lnum - eap->line1].st_u.value = -MAXLNUM;
+ else
+ vim_str2nr(s, NULL, NULL, sort_what,
+! &nrs[lnum - eap->line1].st_u.value, NULL, 0);
+ }
+ #ifdef FEAT_FLOAT
+ else
+--- 560,576 ----
+ if (s > p && s[-1] == '-')
+ --s; /* include preceding negative sign */
+ if (*s == NUL)
+! {
+! /* line without number should sort before any number */
+! nrs[lnum - eap->line1].st_u.num.is_number = FALSE;
+! nrs[lnum - eap->line1].st_u.num.value = 0;
+! }
+ else
++ {
++ nrs[lnum - eap->line1].st_u.num.is_number = TRUE;
+ vim_str2nr(s, NULL, NULL, sort_what,
+! &nrs[lnum - eap->line1].st_u.num.value, NULL, 0);
+! }
+ }
+ #ifdef FEAT_FLOAT
+ else
+*** ../vim-8.1.0958/src/testdir/test_sort.vim 2018-09-21 12:46:16.341772938 +0200
+--- src/testdir/test_sort.vim 2019-02-20 22:15:27.631399246 +0100
+***************
+*** 1222,1227 ****
+--- 1222,1298 ----
+ enew!
+ endfunc
+
++ func Test_sort_large_num()
++ new
++ a
++ -2147483648
++ -2147483647
++
++ -1
++ 0
++ 1
++ -2147483646
++ 2147483646
++ 2147483647
++ 2147483647
++ -2147483648
++ abc
++
++ .
++ " Numerical sort. Non-numeric lines are ordered before numerical lines.
++ " Ordering of non-numerical is stable.
++ sort n
++ call assert_equal(['',
++ \ 'abc',
++ \ '',
++ \ '-2147483648',
++ \ '-2147483648',
++ \ '-2147483647',
++ \ '-2147483646',
++ \ '-1',
++ \ '0',
++ \ '1',
++ \ '2147483646',
++ \ '2147483647',
++ \ '2147483647'], getline(1, '$'))
++ bwipe!
++
++ if has('num64')
++ new
++ a
++ -9223372036854775808
++ -9223372036854775807
++
++ -1
++ 0
++ 1
++ -9223372036854775806
++ 9223372036854775806
++ 9223372036854775807
++ 9223372036854775807
++ -9223372036854775808
++ abc
++
++ .
++ sort n
++ call assert_equal(['',
++ \ 'abc',
++ \ '',
++ \ '-9223372036854775808',
++ \ '-9223372036854775808',
++ \ '-9223372036854775807',
++ \ '-9223372036854775806',
++ \ '-1',
++ \ '0',
++ \ '1',
++ \ '9223372036854775806',
++ \ '9223372036854775807',
++ \ '9223372036854775807'], getline(1, '$'))
++ bwipe!
++ endif
++ endfunc
++
++
+ func Test_sort_cmd_report()
+ enew!
+ call append(0, repeat([1], 3) + repeat([2], 3) + repeat([3], 3))
+*** ../vim-8.1.0958/src/version.c 2019-02-20 22:04:28.823721308 +0100
+--- src/version.c 2019-02-20 22:17:16.762701596 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 959,
+ /**/
+
+
+--
+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.0960 b/data/vim/patches/8.1.0960
new file mode 100644
index 000000000..d0be8afe1
--- /dev/null
+++ b/data/vim/patches/8.1.0960
@@ -0,0 +1,127 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0960
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0960
+Problem: When using ConPTY garbage collection has undefined behavior.
+Solution: Free the channel in a better way. (Nobuhiro Takasaki, closes #4020)
+Files: src/channel.c
+
+
+*** ../vim-8.1.0959/src/channel.c 2019-02-17 17:44:36.199875566 +0100
+--- src/channel.c 2019-02-20 22:44:26.019845642 +0100
+***************
+*** 191,197 ****
+
+ static int did_log_msg = TRUE;
+
+! #ifndef PROTO /* prototype is in vim.h */
+ void
+ ch_log(channel_T *ch, const char *fmt, ...)
+ {
+--- 191,197 ----
+
+ static int did_log_msg = TRUE;
+
+! #ifndef PROTO // prototype is in proto.h
+ void
+ ch_log(channel_T *ch, const char *fmt, ...)
+ {
+***************
+*** 4348,4367 ****
+ {
+ channel->ch_to_be_closed = (1U << PART_COUNT);
+ channel_close_now(channel);
+! /* channel may have been freed, start over */
+ channel = first_channel;
+ continue;
+ }
+ if (channel->ch_to_be_freed || channel->ch_killing)
+ {
+ channel_free(channel);
+! /* channel has been freed, start over */
+ channel = first_channel;
+ continue;
+ }
+ if (channel->ch_refcount == 0 && !channel_still_useful(channel))
+ {
+! /* channel is no longer useful, free it */
+ channel_free(channel);
+ channel = first_channel;
+ part = PART_SOCK;
+--- 4348,4372 ----
+ {
+ channel->ch_to_be_closed = (1U << PART_COUNT);
+ channel_close_now(channel);
+! // channel may have been freed, start over
+ channel = first_channel;
+ continue;
+ }
+ if (channel->ch_to_be_freed || channel->ch_killing)
+ {
++ if (channel->ch_killing)
++ {
++ channel_free_contents(channel);
++ channel->ch_job->jv_channel = NULL;
++ }
+ channel_free(channel);
+! // channel has been freed, start over
+ channel = first_channel;
+ continue;
+ }
+ if (channel->ch_refcount == 0 && !channel_still_useful(channel))
+ {
+! // channel is no longer useful, free it
+ channel_free(channel);
+ channel = first_channel;
+ part = PART_SOCK;
+***************
+*** 5487,5501 ****
+ channel_need_redraw = TRUE;
+ }
+
+! if (job->jv_channel != NULL
+! && job->jv_channel->ch_anonymous_pipe && !job->jv_channel->ch_killing)
+! {
+! ++safe_to_invoke_callback;
+! channel_free_contents(job->jv_channel);
+! job->jv_channel->ch_job = NULL;
+! job->jv_channel = NULL;
+! --safe_to_invoke_callback;
+! }
+
+ // Do not free the job in case the close callback of the associated channel
+ // isn't invoked yet and may get information by job_info().
+--- 5492,5499 ----
+ channel_need_redraw = TRUE;
+ }
+
+! if (job->jv_channel != NULL && job->jv_channel->ch_anonymous_pipe)
+! job->jv_channel->ch_killing = TRUE;
+
+ // Do not free the job in case the close callback of the associated channel
+ // isn't invoked yet and may get information by job_info().
+*** ../vim-8.1.0959/src/version.c 2019-02-20 22:18:59.990044254 +0100
+--- src/version.c 2019-02-20 22:43:03.024385639 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 960,
+ /**/
+
+--
+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.0961 b/data/vim/patches/8.1.0961
new file mode 100644
index 000000000..d47940538
--- /dev/null
+++ b/data/vim/patches/8.1.0961
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0961
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0961 (after 8.1.0957)
+Problem: Mac: fsync may fail sometimes.
+Solution: Do not check errno. (Yee Cheng Chin, closes #4025)
+Files: src/fileio.c
+
+
+*** ../vim-8.1.0960/src/fileio.c 2019-02-20 20:36:55.741352867 +0100
+--- src/fileio.c 2019-02-21 12:12:58.205743165 +0100
+***************
+*** 5135,5141 ****
+
+ # ifdef MACOS_X
+ r = fcntl(fd, F_FULLFSYNC);
+! if (r != 0 && (errno == ENOTTY || errno == ENOTSUP))
+ # endif
+ r = fsync(fd);
+ return r;
+--- 5135,5141 ----
+
+ # ifdef MACOS_X
+ r = fcntl(fd, F_FULLFSYNC);
+! if (r != 0) // F_FULLFSYNC not working or not supported
+ # endif
+ r = fsync(fd);
+ return r;
+*** ../vim-8.1.0960/src/version.c 2019-02-20 22:45:01.723613804 +0100
+--- src/version.c 2019-02-21 12:14:05.965310253 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 961,
+ /**/
+
+--
+Contrary to popular belief, it's often your clothing that gets promoted, not
+you.
+ (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.0962 b/data/vim/patches/8.1.0962
new file mode 100644
index 000000000..245fec627
--- /dev/null
+++ b/data/vim/patches/8.1.0962
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0962
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0962
+Problem: Building with MinGW and static libs doesn't work. (Salman Halim)
+Solution: Add -lgcc. (Ken Takata)
+Files: src/Make_cyg_ming.mak
+
+
+*** ../vim-8.1.0961/src/Make_cyg_ming.mak 2019-02-18 21:41:34.477750367 +0100
+--- src/Make_cyg_ming.mak 2019-02-21 13:31:45.794026911 +0100
+***************
+*** 932,938 ****
+ LINK = $(CXX)
+ ifeq (yes, $(STATIC_STDCPLUS))
+ #LIB += -static-libstdc++ -static-libgcc
+! LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
+ endif
+ else
+ LINK = $(CC)
+--- 932,938 ----
+ LINK = $(CXX)
+ ifeq (yes, $(STATIC_STDCPLUS))
+ #LIB += -static-libstdc++ -static-libgcc
+! LIB += -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
+ endif
+ else
+ LINK = $(CC)
+*** ../vim-8.1.0961/src/version.c 2019-02-21 12:16:06.196542536 +0100
+--- src/version.c 2019-02-21 13:33:26.713508414 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 962,
+ /**/
+
+--
+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.0963 b/data/vim/patches/8.1.0963
new file mode 100644
index 000000000..47fce01ca
--- /dev/null
+++ b/data/vim/patches/8.1.0963
@@ -0,0 +1,99 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0963
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0963
+Problem: Illegal memory access when using 'incsearch'.
+Solution: Reset highlight_match when changing text. (closes #4022)
+Files: src/testdir/test_search.vim, src/misc1.c,
+ src/testdir/dumps/Test_incsearch_change_01.dump
+
+
+*** ../vim-8.1.0962/src/testdir/test_search.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_search.vim 2019-02-21 16:07:35.842336038 +0100
+***************
+*** 981,986 ****
+--- 981,1010 ----
+ call delete('Xis_subst_script')
+ endfunc
+
++ func Test_incsearch_with_change()
++ if !has('timers') || !exists('+incsearch') || !CanRunVimInTerminal()
++ return
++ endif
++
++ call writefile([
++ \ 'set incsearch hlsearch scrolloff=0',
++ \ 'call setline(1, ["one", "two ------ X", "three"])',
++ \ 'call timer_start(200, { _ -> setline(2, "x")})',
++ \ ], 'Xis_change_script')
++ let buf = RunVimInTerminal('-S Xis_change_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
++
++ " Highlight X, it will be deleted by the timer callback.
++ call term_sendkeys(buf, ':%s/X')
++ call VerifyScreenDump(buf, 'Test_incsearch_change_01', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ call StopVimInTerminal(buf)
++ call delete('Xis_change_script')
++ endfunc
++
+ " Similar to Test_incsearch_substitute_dump() for :sort
+ func Test_incsearch_sort_dump()
+ if !exists('+incsearch')
+*** ../vim-8.1.0962/src/misc1.c 2019-02-17 17:44:36.215875493 +0100
+--- src/misc1.c 2019-02-21 16:17:56.586907659 +0100
+***************
+*** 2854,2859 ****
+--- 2854,2864 ----
+ changed_int();
+ }
+ ++CHANGEDTICK(curbuf);
++
++ #ifdef FEAT_SEARCH_EXTRA
++ // If a pattern is highlighted, the position may now be invalid.
++ highlight_match = FALSE;
++ #endif
+ }
+
+ /*
+*** ../vim-8.1.0962/src/testdir/dumps/Test_incsearch_change_01.dump 2019-02-21 16:20:53.053943804 +0100
+--- src/testdir/dumps/Test_incsearch_change_01.dump 2019-02-21 16:07:47.146272743 +0100
+***************
+*** 0 ****
+--- 1,9 ----
++ |o+0&#ffffff0|n|e| @66
++ |x+1&&| +0&&@68
++ |t|h|r|e@1| @64
++ |~+0#4040ff13&| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |:+0#0000000&|%|s|/|X> @64
+*** ../vim-8.1.0962/src/version.c 2019-02-21 13:34:01.801327590 +0100
+--- src/version.c 2019-02-21 15:58:49.013231419 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 963,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+4. Your eyeglasses have a web site burned in on 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.0964 b/data/vim/patches/8.1.0964
new file mode 100644
index 000000000..596ba94cf
--- /dev/null
+++ b/data/vim/patches/8.1.0964
@@ -0,0 +1,74 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0964
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0964
+Problem: Cannot see in CI why a screenshot test failed.
+Solution: Add info about the failure.
+Files: src/testdir/screendump.vim
+
+
+*** ../vim-8.1.0963/src/testdir/screendump.vim 2019-01-27 16:55:44.276707556 +0100
+--- src/testdir/screendump.vim 2019-02-21 16:58:24.225445414 +0100
+***************
+*** 111,117 ****
+ sleep 10m
+ call delete(testfile)
+ call term_dumpwrite(a:buf, testfile, a:options)
+! if readfile(reference) == readfile(testfile)
+ call delete(testfile)
+ break
+ endif
+--- 111,119 ----
+ sleep 10m
+ call delete(testfile)
+ call term_dumpwrite(a:buf, testfile, a:options)
+! let testdump = readfile(testfile)
+! let refdump = readfile(reference)
+! if refdump == testdump
+ call delete(testfile)
+ break
+ endif
+***************
+*** 121,126 ****
+--- 123,139 ----
+ if a:0 == 1
+ let msg = a:1 . ': ' . msg
+ endif
++ if len(testdump) != len(refdump)
++ let msg = msg . '; line count is ' . len(testdump) . ' instead of ' . len(refdump)
++ endif
++ for i in range(len(refdump))
++ if i >= len(testdump)
++ break
++ endif
++ if testdump[i] != refdump[i]
++ let msg = msg . '; difference in line ' . (i + 1) . ': "' . testdump[i] . '"'
++ endif
++ endfor
+ call assert_report(msg)
+ return 1
+ endif
+*** ../vim-8.1.0963/src/version.c 2019-02-21 16:21:16.369816652 +0100
+--- src/version.c 2019-02-21 17:04:39.827378693 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 964,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+6. You refuse to go to a vacation spot with no electricity and no phone lines.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0965 b/data/vim/patches/8.1.0965
new file mode 100644
index 000000000..f0c35eb16
--- /dev/null
+++ b/data/vim/patches/8.1.0965
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0965
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0965
+Problem: Search test fails.
+Solution: Wait a bit longer for the 'ambiwidth' redraw.
+Files: src/testdir/test_search.vim,
+ src/testdir/dumps/Test_incsearch_change_01.dump
+
+
+*** ../vim-8.1.0964/src/testdir/test_search.vim 2019-02-21 16:21:16.369816652 +0100
+--- src/testdir/test_search.vim 2019-02-21 17:47:06.869655471 +0100
+***************
+*** 994,1000 ****
+ let buf = RunVimInTerminal('-S Xis_change_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
+
+ " Highlight X, it will be deleted by the timer callback.
+ call term_sendkeys(buf, ':%s/X')
+--- 994,1000 ----
+ let buf = RunVimInTerminal('-S Xis_change_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 300m
+
+ " Highlight X, it will be deleted by the timer callback.
+ call term_sendkeys(buf, ':%s/X')
+*** ../vim-8.1.0964/src/testdir/dumps/Test_incsearch_change_01.dump 2019-02-21 16:21:16.369816652 +0100
+--- src/testdir/dumps/Test_incsearch_change_01.dump 2019-02-21 17:42:24.559235283 +0100
+***************
+*** 1,5 ****
+ |o+0&#ffffff0|n|e| @66
+! |x+1&&| +0&&@68
+ |t|h|r|e@1| @64
+ |~+0#4040ff13&| @68
+ |~| @68
+--- 1,5 ----
+ |o+0&#ffffff0|n|e| @66
+! |x| @68
+ |t|h|r|e@1| @64
+ |~+0#4040ff13&| @68
+ |~| @68
+*** ../vim-8.1.0964/src/version.c 2019-02-21 17:05:54.082970901 +0100
+--- src/version.c 2019-02-21 17:46:24.285914835 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 965,
+ /**/
+
+--
+Everybody wants to go to heaven, but nobody wants to die.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0966 b/data/vim/patches/8.1.0966
new file mode 100644
index 000000000..342ea7271
--- /dev/null
+++ b/data/vim/patches/8.1.0966
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0966
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0966
+Problem: One terminal test is flaky.
+Solution: Add to list of flaky tests.
+Files: src/testdir/runtest.vim
+
+
+*** ../vim-8.1.0965/src/testdir/runtest.vim 2019-02-10 23:04:07.111243690 +0100
+--- src/testdir/runtest.vim 2019-02-21 18:15:47.999856593 +0100
+***************
+*** 307,312 ****
+--- 307,313 ----
+ \ 'Test_terminal_ansicolors_func()',
+ \ 'Test_terminal_ansicolors_global()',
+ \ 'Test_terminal_composing_unicode()',
++ \ 'Test_terminal_does_not_truncate_last_newlines()',
+ \ 'Test_terminal_env()',
+ \ 'Test_terminal_hide_buffer()',
+ \ 'Test_terminal_make_change()',
+*** ../vim-8.1.0965/src/version.c 2019-02-21 17:48:55.485002030 +0100
+--- src/version.c 2019-02-21 18:16:30.447620587 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 966,
+ /**/
+
+--
+The goal of science is to build better mousetraps.
+The goal of nature is to build better mice.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0967 b/data/vim/patches/8.1.0967
new file mode 100644
index 000000000..87988ce5a
--- /dev/null
+++ b/data/vim/patches/8.1.0967
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0967
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0967
+Problem: Stray dependency in test Makefile.
+Solution: Remove it. (Masato Nishihata, closes #4018)
+Files: src/testdir/Makefile
+
+
+*** ../vim-8.1.0966/src/testdir/Makefile 2019-01-11 19:19:40.685585822 +0100
+--- src/testdir/Makefile 2019-02-21 21:49:05.932296943 +0100
+***************
+*** 148,154 ****
+ newtestssilent: $(NEW_TESTS_RES)
+
+
+! .vim.res: writevimcmd
+ @echo "$(VIMPROG)" > vimcmd
+ @echo "$(RUN_VIMTEST)" >> vimcmd
+ $(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim $(REDIR_TEST_TO_NULL)
+--- 148,154 ----
+ newtestssilent: $(NEW_TESTS_RES)
+
+
+! .vim.res:
+ @echo "$(VIMPROG)" > vimcmd
+ @echo "$(RUN_VIMTEST)" >> vimcmd
+ $(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim $(REDIR_TEST_TO_NULL)
+*** ../vim-8.1.0966/src/version.c 2019-02-21 18:17:03.455437109 +0100
+--- src/version.c 2019-02-21 21:50:13.667914632 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 967,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+8. You spend half of the plane trip with your laptop on your lap...and your
+ child in the overhead compartment.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0968 b/data/vim/patches/8.1.0968
new file mode 100644
index 000000000..35262fbca
--- /dev/null
+++ b/data/vim/patches/8.1.0968
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0968
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0968
+Problem: Crash when using search pattern \%Ufffffc23.
+Solution: Limit character to INT_MAX. (closes #4009)
+Files: src/regexp_nfa.c, src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0967/src/regexp_nfa.c 2019-02-20 22:04:28.819721333 +0100
+--- src/regexp_nfa.c 2019-02-21 22:26:06.112676413 +0100
+***************
+*** 1475,1481 ****
+ default: nr = -1; break;
+ }
+
+! if (nr < 0)
+ EMSG2_RET_FAIL(
+ _("E678: Invalid character after %s%%[dxouU]"),
+ reg_magic == MAGIC_ALL);
+--- 1475,1481 ----
+ default: nr = -1; break;
+ }
+
+! if (nr < 0 || nr > INT_MAX)
+ EMSG2_RET_FAIL(
+ _("E678: Invalid character after %s%%[dxouU]"),
+ reg_magic == MAGIC_ALL);
+*** ../vim-8.1.0967/src/testdir/test_search.vim 2019-02-21 17:48:55.485002030 +0100
+--- src/testdir/test_search.vim 2019-02-21 22:24:23.981817630 +0100
+***************
+*** 1211,1213 ****
+--- 1211,1222 ----
+ call assert_equal(bufcontent[1], @/)
+ call Incsearch_cleanup()
+ endfunc
++
++ func Test_large_hex_chars()
++ " This used to cause a crash, the character becomes an NFA state.
++ try
++ /\%Ufffffc23
++ catch
++ call assert_match('E678:', v:exception)
++ endtry
++ endfunc
+*** ../vim-8.1.0967/src/version.c 2019-02-21 21:50:42.603751312 +0100
+--- src/version.c 2019-02-21 22:25:56.016785474 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 968,
+ /**/
+
+--
+"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.0969 b/data/vim/patches/8.1.0969
new file mode 100644
index 000000000..a114decde
--- /dev/null
+++ b/data/vim/patches/8.1.0969
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0969
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0969
+Problem: Message written during startup is truncated.
+Solution: Restore message after truncating. (closes 3969)
+Files: src/message.c, src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.0968/src/message.c 2019-02-19 21:34:01.987747438 +0100
+--- src/message.c 2019-02-22 13:32:52.707946070 +0100
+***************
+*** 2627,2638 ****
+--- 2627,2645 ----
+
+ if (*p != NUL && !(silent_mode && p_verbose == 0))
+ {
++ int c = -1;
++
+ if (maxlen > 0 && STRLEN(p) > (size_t)maxlen)
++ {
++ c = p[maxlen];
+ p[maxlen] = 0;
++ }
+ if (info_message)
+ mch_msg((char *)p);
+ else
+ mch_errmsg((char *)p);
++ if (c != -1)
++ p[maxlen] = c;
+ }
+
+ msg_didout = TRUE; // assume that line is not empty
+*** ../vim-8.1.0968/src/testdir/test_startup.vim 2018-12-28 18:32:52.464575534 +0100
+--- src/testdir/test_startup.vim 2019-02-22 13:34:18.979403981 +0100
+***************
+*** 537,539 ****
+--- 537,549 ----
+ endif
+ call delete('Xtestout')
+ endfunc
++
++ func Test_issue_3969()
++ if has('gui_running')
++ " Can't catch the output of gvim.
++ return
++ endif
++ " Check that message is not truncated.
++ let out = system(GetVimCommand() . ' -es -X -V1 -c "echon ''hello''" -cq')
++ call assert_equal('hello', out)
++ endfunc
+*** ../vim-8.1.0968/src/version.c 2019-02-21 22:28:48.247020124 +0100
+--- src/version.c 2019-02-22 13:39:18.929527227 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 969,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+10. And even your night dreams are in 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.0970 b/data/vim/patches/8.1.0970
new file mode 100644
index 000000000..a8ab23987
--- /dev/null
+++ b/data/vim/patches/8.1.0970
@@ -0,0 +1,77 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0970
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0970
+Problem: Text properties test fails when 'encoding' is not utf-8.
+Solution: Compare with original value of 'encoding'. (Christian Brabandt,
+ closes #3986)
+Files: src/testdir/runtest.vim, src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.0969/src/testdir/runtest.vim 2019-02-21 18:17:03.455437109 +0100
+--- src/testdir/runtest.vim 2019-02-22 13:49:22.893861633 +0100
+***************
+*** 50,56 ****
+ set nocp viminfo+=nviminfo
+
+ " Use utf-8 by default, instead of whatever the system default happens to be.
+! " Individual tests can overrule this at the top of the file.
+ set encoding=utf-8
+
+ " REDIR_TEST_TO_NULL has a very permissive SwapExists autocommand which is for
+--- 50,58 ----
+ set nocp viminfo+=nviminfo
+
+ " Use utf-8 by default, instead of whatever the system default happens to be.
+! " Individual tests can overrule this at the top of the file and use
+! " g:orig_encoding if needed.
+! let g:orig_encoding = &encoding
+ set encoding=utf-8
+
+ " REDIR_TEST_TO_NULL has a very permissive SwapExists autocommand which is for
+*** ../vim-8.1.0969/src/testdir/test_textprop.vim 2019-01-08 23:07:21.309386047 +0100
+--- src/testdir/test_textprop.vim 2019-02-22 14:26:46.375944605 +0100
+***************
+*** 518,524 ****
+
+ " screenshot test with textprop highlighting
+ funct Test_textprop_screenshots()
+! if !CanRunVimInTerminal() || &encoding != 'utf-8'
+ return
+ endif
+ call writefile([
+--- 518,525 ----
+
+ " screenshot test with textprop highlighting
+ funct Test_textprop_screenshots()
+! " The Vim running in the terminal needs to use utf-8.
+! if !CanRunVimInTerminal() || g:orig_encoding != 'utf-8'
+ return
+ endif
+ call writefile([
+*** ../vim-8.1.0969/src/version.c 2019-02-22 13:42:00.276540703 +0100
+--- src/version.c 2019-02-22 14:31:30.658167883 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 970,
+ /**/
+
+--
+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.0971 b/data/vim/patches/8.1.0971
new file mode 100644
index 000000000..6c37d5e91
--- /dev/null
+++ b/data/vim/patches/8.1.0971
@@ -0,0 +1,242 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0971
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0971
+Problem: Failure for selecting quoted text object moves cursor.
+Solution: Restore the Visual selection on failure. (Christian Brabandt,
+ closes #4024)
+Files: src/search.c, src/testdir/test_textobjects.vim
+
+
+*** ../vim-8.1.0970/src/search.c 2019-02-17 17:44:36.219875473 +0100
+--- src/search.c 2019-02-22 14:55:16.869702567 +0100
+***************
+*** 4359,4369 ****
+ int col_end;
+ int col_start = curwin->w_cursor.col;
+ int inclusive = FALSE;
+! int vis_empty = TRUE; /* Visual selection <= 1 char */
+! int vis_bef_curs = FALSE; /* Visual starts before cursor */
+! int inside_quotes = FALSE; /* Looks like "i'" done before */
+! int selected_quote = FALSE; /* Has quote inside selection */
+ int i;
+
+ /* Correct cursor when 'selection' is "exclusive". */
+ if (VIsual_active)
+--- 4359,4370 ----
+ int col_end;
+ int col_start = curwin->w_cursor.col;
+ int inclusive = FALSE;
+! int vis_empty = TRUE; // Visual selection <= 1 char
+! int vis_bef_curs = FALSE; // Visual starts before cursor
+! int inside_quotes = FALSE; // Looks like "i'" done before
+! int selected_quote = FALSE; // Has quote inside selection
+ int i;
++ int restore_vis_bef = FALSE; // restore VIsual on abort
+
+ /* Correct cursor when 'selection' is "exclusive". */
+ if (VIsual_active)
+***************
+*** 4377,4388 ****
+ {
+ if (!vis_bef_curs)
+ {
+! /* VIsual needs to be start of Visual selection. */
+ pos_T t = curwin->w_cursor;
+
+ curwin->w_cursor = VIsual;
+ VIsual = t;
+ vis_bef_curs = TRUE;
+ }
+ dec_cursor();
+ }
+--- 4378,4390 ----
+ {
+ if (!vis_bef_curs)
+ {
+! // VIsual needs to be the start of Visual selection.
+ pos_T t = curwin->w_cursor;
+
+ curwin->w_cursor = VIsual;
+ VIsual = t;
+ vis_bef_curs = TRUE;
++ restore_vis_bef = TRUE;
+ }
+ dec_cursor();
+ }
+***************
+*** 4431,4437 ****
+ * opening quote. */
+ col_start = find_next_quote(line, col_start + 1, quotechar, NULL);
+ if (col_start < 0)
+! return FALSE;
+ col_end = find_next_quote(line, col_start + 1, quotechar,
+ curbuf->b_p_qe);
+ if (col_end < 0)
+--- 4433,4439 ----
+ * opening quote. */
+ col_start = find_next_quote(line, col_start + 1, quotechar, NULL);
+ if (col_start < 0)
+! goto abort_search;
+ col_end = find_next_quote(line, col_start + 1, quotechar,
+ curbuf->b_p_qe);
+ if (col_end < 0)
+***************
+*** 4445,4451 ****
+ {
+ col_end = find_prev_quote(line, col_start, quotechar, NULL);
+ if (line[col_end] != quotechar)
+! return FALSE;
+ col_start = find_prev_quote(line, col_end, quotechar,
+ curbuf->b_p_qe);
+ if (line[col_start] != quotechar)
+--- 4447,4453 ----
+ {
+ col_end = find_prev_quote(line, col_start, quotechar, NULL);
+ if (line[col_end] != quotechar)
+! goto abort_search;
+ col_start = find_prev_quote(line, col_end, quotechar,
+ curbuf->b_p_qe);
+ if (line[col_start] != quotechar)
+***************
+*** 4480,4491 ****
+ /* Find open quote character. */
+ col_start = find_next_quote(line, col_start, quotechar, NULL);
+ if (col_start < 0 || col_start > first_col)
+! return FALSE;
+ /* Find close quote character. */
+ col_end = find_next_quote(line, col_start + 1, quotechar,
+ curbuf->b_p_qe);
+ if (col_end < 0)
+! return FALSE;
+ /* If is cursor between start and end quote character, it is
+ * target text object. */
+ if (col_start <= first_col && first_col <= col_end)
+--- 4482,4493 ----
+ /* Find open quote character. */
+ col_start = find_next_quote(line, col_start, quotechar, NULL);
+ if (col_start < 0 || col_start > first_col)
+! goto abort_search;
+ /* Find close quote character. */
+ col_end = find_next_quote(line, col_start + 1, quotechar,
+ curbuf->b_p_qe);
+ if (col_end < 0)
+! goto abort_search;
+ /* If is cursor between start and end quote character, it is
+ * target text object. */
+ if (col_start <= first_col && first_col <= col_end)
+***************
+*** 4502,4515 ****
+ /* No quote before the cursor, look after the cursor. */
+ col_start = find_next_quote(line, col_start, quotechar, NULL);
+ if (col_start < 0)
+! return FALSE;
+ }
+
+ /* Find close quote character. */
+ col_end = find_next_quote(line, col_start + 1, quotechar,
+ curbuf->b_p_qe);
+ if (col_end < 0)
+! return FALSE;
+ }
+
+ /* When "include" is TRUE, include spaces after closing quote or before
+--- 4504,4517 ----
+ /* No quote before the cursor, look after the cursor. */
+ col_start = find_next_quote(line, col_start, quotechar, NULL);
+ if (col_start < 0)
+! goto abort_search;
+ }
+
+ /* Find close quote character. */
+ col_end = find_next_quote(line, col_start + 1, quotechar,
+ curbuf->b_p_qe);
+ if (col_end < 0)
+! goto abort_search;
+ }
+
+ /* When "include" is TRUE, include spaces after closing quote or before
+***************
+*** 4596,4601 ****
+--- 4598,4617 ----
+ }
+
+ return OK;
++
++ abort_search:
++ if (VIsual_active && *p_sel == 'e')
++ {
++ inc_cursor();
++ if (restore_vis_bef)
++ {
++ pos_T t = curwin->w_cursor;
++
++ curwin->w_cursor = VIsual;
++ VIsual = t;
++ }
++ }
++ return FALSE;
+ }
+
+ #endif /* FEAT_TEXTOBJ */
+*** ../vim-8.1.0970/src/testdir/test_textobjects.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_textobjects.vim 2019-02-22 14:56:31.897291834 +0100
+***************
+*** 52,57 ****
+--- 52,82 ----
+ bw!
+ endfunc
+
++ func Test_quote_selection_selection_exclusive_abort()
++ new
++ set selection=exclusive
++ call setline(1, "'abzzc'")
++ let exp_curs = [0, 1, 6, 0]
++ call cursor(1,1)
++ exe 'norm! fcdvi"'
++ " make sure to end visual mode to have a clear state
++ exe "norm! \<esc>"
++ call assert_equal(exp_curs, getpos('.'))
++ call cursor(1,1)
++ exe 'norm! fcvi"'
++ exe "norm! \<esc>"
++ call assert_equal(exp_curs, getpos('.'))
++ call cursor(1,2)
++ exe 'norm! vfcoi"'
++ exe "norm! \<esc>"
++ let exp_curs = [0, 1, 2, 0]
++ let exp_visu = [0, 1, 7, 0]
++ call assert_equal(exp_curs, getpos('.'))
++ call assert_equal(exp_visu, getpos("'>"))
++ set selection&vim
++ bw!
++ endfunc
++
+ " Tests for string and html text objects
+ func Test_string_html_objects()
+ enew!
+*** ../vim-8.1.0970/src/version.c 2019-02-22 14:38:46.447452832 +0100
+--- src/version.c 2019-02-22 15:02:30.395260732 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 971,
+ /**/
+
+--
+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.0972 b/data/vim/patches/8.1.0972
new file mode 100644
index 000000000..bf2268a1f
--- /dev/null
+++ b/data/vim/patches/8.1.0972
@@ -0,0 +1,134 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0972
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0972
+Problem: Cannot switch from terminal window to next tabpage.
+Solution: Make CTRL-W gt move to next tabpage.
+Files: src/window.c, src/testdir/test_terminal.vim,
+ runtime/doc/terminal.txt
+
+
+*** ../vim-8.1.0971/src/window.c 2019-02-16 15:09:21.217946198 +0100
+--- src/window.c 2019-02-22 15:48:48.790106681 +0100
+***************
+*** 67,73 ****
+ static char *m_onlyone = N_("Already only one window");
+
+ /*
+! * all CTRL-W window commands are handled here, called from normal_cmd().
+ */
+ void
+ do_window(
+--- 67,73 ----
+ static char *m_onlyone = N_("Already only one window");
+
+ /*
+! * All CTRL-W window commands are handled here, called from normal_cmd().
+ */
+ void
+ do_window(
+***************
+*** 584,589 ****
+--- 584,593 ----
+ nchar = xchar;
+ goto wingotofile;
+ #endif
++ case 't': // CTRL-W gt: go to next tab page
++ goto_tabpage((int)Prenum);
++ break;
++
+ default:
+ beep_flush();
+ break;
+*** ../vim-8.1.0971/src/testdir/test_terminal.vim 2019-02-15 01:06:09.283099564 +0100
+--- src/testdir/test_terminal.vim 2019-02-22 16:06:24.095723103 +0100
+***************
+*** 1571,1576 ****
+--- 1571,1578 ----
+ func Test_terminal_termwinkey()
+ call assert_equal(1, winnr('$'))
+ let thiswin = win_getid()
++ tabnew
++ tabnext
+
+ let buf = Run_shell_in_terminal({})
+ let termwin = bufwinid(buf)
+***************
+*** 1578,1589 ****
+--- 1580,1601 ----
+ call feedkeys("\<C-L>w", 'tx')
+ call assert_equal(thiswin, win_getid())
+ call feedkeys("\<C-W>w", 'tx')
++ call assert_equal(termwin, win_getid())
++
++ let tnr = tabpagenr()
++ call feedkeys("\<C-L>gt", "xt")
++ call assert_notequal(tnr, tabpagenr())
++ tabnext
++ call assert_equal(tnr, tabpagenr())
++ call assert_equal(termwin, win_getid())
+
+ let job = term_getjob(buf)
+ call feedkeys("\<C-L>\<C-C>", 'tx')
+ call WaitForAssert({-> assert_equal("dead", job_status(job))})
+
+ set termwinkey&
++ tabnext
++ tabclose
+ endfunc
+
+ func Test_terminal_out_err()
+*** ../vim-8.1.0971/runtime/doc/terminal.txt 2019-02-16 13:35:09.841639346 +0100
+--- runtime/doc/terminal.txt 2019-02-22 15:37:26.906339197 +0100
+***************
+*** 80,85 ****
+--- 80,86 ----
+ Also works with the = register to insert the result of
+ evaluating an expression.
+ CTRL-W CTRL-C ends the job, see below |t_CTRL-W_CTRL-C|
++ CTRL-W gt go to next tabpage, same as `gt`
+
+ See option 'termwinkey' for specifying another key instead of CTRL-W that
+ will work like CTRL-W. However, typing 'termwinkey' twice sends 'termwinkey'
+***************
+*** 110,116 ****
+ to Terminal-Normal mode: >
+ tnoremap <F1> <C-W>N
+ You can use Esc, but you need to make sure it won't cause other keys to
+! break: >
+ tnoremap <Esc> <C-W>N
+ set notimeout ttimeout timeoutlen=100
+
+--- 111,117 ----
+ to Terminal-Normal mode: >
+ tnoremap <F1> <C-W>N
+ You can use Esc, but you need to make sure it won't cause other keys to
+! break (cursor keys start with an Esc, so they may break): >
+ tnoremap <Esc> <C-W>N
+ set notimeout ttimeout timeoutlen=100
+
+*** ../vim-8.1.0971/src/version.c 2019-02-22 15:04:09.714683845 +0100
+--- src/version.c 2019-02-22 16:07:34.099302623 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 972,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+12. You turn off your Wifi and get this awful empty feeling, like you just
+ pulled the plug on a loved one.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0973 b/data/vim/patches/8.1.0973
new file mode 100644
index 000000000..a7f4203e5
--- /dev/null
+++ b/data/vim/patches/8.1.0973
@@ -0,0 +1,121 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0973
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0973
+Problem: Pattern with syntax error gives threee error messages. (Kuang-che
+ Wu)
+Solution: Remove outdated internal error. Don't fall back to other engine
+ after an error.(closes #4035)
+Files: src/regexp_nfa.c, src/testdir/test_search.vim, src/regexp.c
+
+
+*** ../vim-8.1.0972/src/regexp_nfa.c 2019-02-21 22:28:48.247020124 +0100
+--- src/regexp_nfa.c 2019-02-22 16:41:08.995016894 +0100
+***************
+*** 7252,7263 ****
+ * (and count its size). */
+ postfix = re2post();
+ if (postfix == NULL)
+- {
+- /* TODO: only give this error for debugging? */
+- if (post_ptr >= post_end)
+- siemsg("Internal error: estimated max number of states insufficient: %ld", post_end - post_start);
+ goto fail; /* Cascaded (syntax?) error */
+- }
+
+ /*
+ * In order to build the NFA, we parse the input regexp twice:
+--- 7252,7258 ----
+*** ../vim-8.1.0972/src/testdir/test_search.vim 2019-02-21 22:28:48.247020124 +0100
+--- src/testdir/test_search.vim 2019-02-22 16:42:41.518448221 +0100
+***************
+*** 1220,1222 ****
+--- 1220,1227 ----
+ call assert_match('E678:', v:exception)
+ endtry
+ endfunc
++
++ func Test_one_error_msg()
++ " This was also giving an internal error
++ call assert_fails('call search(" \\((\\v[[=P=]]){185}+ ")', 'E871:')
++ endfunc
+*** ../vim-8.1.0972/src/regexp.c 2019-02-17 13:53:31.600227794 +0100
+--- src/regexp.c 2019-02-22 17:14:48.603178939 +0100
+***************
+*** 7969,7974 ****
+--- 7969,7975 ----
+ {
+ regprog_T *prog = NULL;
+ char_u *expr = expr_arg;
++ int save_called_emsg;
+
+ regexp_engine = p_re;
+
+***************
+*** 8004,8009 ****
+--- 8005,8012 ----
+ /*
+ * First try the NFA engine, unless backtracking was requested.
+ */
++ save_called_emsg = called_emsg;
++ called_emsg = FALSE;
+ if (regexp_engine != BACKTRACKING_ENGINE)
+ prog = nfa_regengine.regcomp(expr,
+ re_flags + (regexp_engine == AUTOMATIC_ENGINE ? RE_AUTO : 0));
+***************
+*** 8032,8044 ****
+ * If the NFA engine failed, try the backtracking engine.
+ * The NFA engine also fails for patterns that it can't handle well
+ * but are still valid patterns, thus a retry should work.
+ */
+! if (regexp_engine == AUTOMATIC_ENGINE)
+ {
+ regexp_engine = BACKTRACKING_ENGINE;
+ prog = bt_regengine.regcomp(expr, re_flags);
+ }
+ }
+
+ if (prog != NULL)
+ {
+--- 8035,8049 ----
+ * If the NFA engine failed, try the backtracking engine.
+ * The NFA engine also fails for patterns that it can't handle well
+ * but are still valid patterns, thus a retry should work.
++ * But don't try if an error message was given.
+ */
+! if (regexp_engine == AUTOMATIC_ENGINE && !called_emsg)
+ {
+ regexp_engine = BACKTRACKING_ENGINE;
+ prog = bt_regengine.regcomp(expr, re_flags);
+ }
+ }
++ called_emsg |= save_called_emsg;
+
+ if (prog != NULL)
+ {
+*** ../vim-8.1.0972/src/version.c 2019-02-22 16:09:06.578746015 +0100
+--- src/version.c 2019-02-22 17:15:43.734875931 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 973,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+15. Your heart races faster and beats irregularly each time you see a new WWW
+ site address in print or on TV, even though you've never had heart
+ problems before.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0974 b/data/vim/patches/8.1.0974
new file mode 100644
index 000000000..3fe65fbed
--- /dev/null
+++ b/data/vim/patches/8.1.0974
@@ -0,0 +1,169 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0974
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0974
+Problem: Cannot switch from terminal window to previous tabpage.
+Solution: Make CTRL-W gT move to previous tabpage.
+Files: src/window.c, src/testdir/test_terminal.vim,
+ runtime/doc/terminal.txt
+
+
+*** ../vim-8.1.0973/src/window.c 2019-02-22 16:09:06.578746015 +0100
+--- src/window.c 2019-02-22 17:39:19.674664417 +0100
+***************
+*** 87,96 ****
+ #endif
+ char_u cbuf[40];
+
+! if (Prenum == 0)
+! Prenum1 = 1;
+! else
+! Prenum1 = Prenum;
+
+ #ifdef FEAT_CMDWIN
+ # define CHECK_CMDWIN \
+--- 87,93 ----
+ #endif
+ char_u cbuf[40];
+
+! Prenum1 = Prenum == 0 ? 1 : Prenum;
+
+ #ifdef FEAT_CMDWIN
+ # define CHECK_CMDWIN \
+***************
+*** 588,593 ****
+--- 585,594 ----
+ goto_tabpage((int)Prenum);
+ break;
+
++ case 'T': // CTRL-W gT: go to previous tab page
++ goto_tabpage(-(int)Prenum1);
++ break;
++
+ default:
+ beep_flush();
+ break;
+*** ../vim-8.1.0973/src/testdir/test_terminal.vim 2019-02-22 16:09:06.578746015 +0100
+--- src/testdir/test_terminal.vim 2019-02-22 17:51:42.925520407 +0100
+***************
+*** 1569,1578 ****
+ endfunc
+
+ func Test_terminal_termwinkey()
+ call assert_equal(1, winnr('$'))
+ let thiswin = win_getid()
+- tabnew
+- tabnext
+
+ let buf = Run_shell_in_terminal({})
+ let termwin = bufwinid(buf)
+--- 1569,1582 ----
+ endfunc
+
+ func Test_terminal_termwinkey()
++ " make three tabpages, terminal in the middle
++ 0tabnew
++ tabnext
++ tabnew
++ tabprev
+ call assert_equal(1, winnr('$'))
++ call assert_equal(2, tabpagenr())
+ let thiswin = win_getid()
+
+ let buf = Run_shell_in_terminal({})
+ let termwin = bufwinid(buf)
+***************
+*** 1582,1592 ****
+ call feedkeys("\<C-W>w", 'tx')
+ call assert_equal(termwin, win_getid())
+
+- let tnr = tabpagenr()
+ call feedkeys("\<C-L>gt", "xt")
+! call assert_notequal(tnr, tabpagenr())
+ tabnext
+! call assert_equal(tnr, tabpagenr())
+ call assert_equal(termwin, win_getid())
+
+ let job = term_getjob(buf)
+--- 1586,1601 ----
+ call feedkeys("\<C-W>w", 'tx')
+ call assert_equal(termwin, win_getid())
+
+ call feedkeys("\<C-L>gt", "xt")
+! call assert_equal(3, tabpagenr())
+! tabprev
+! call assert_equal(2, tabpagenr())
+! call assert_equal(termwin, win_getid())
+!
+! call feedkeys("\<C-L>gT", "xt")
+! call assert_equal(1, tabpagenr())
+ tabnext
+! call assert_equal(2, tabpagenr())
+ call assert_equal(termwin, win_getid())
+
+ let job = term_getjob(buf)
+***************
+*** 1596,1601 ****
+--- 1605,1612 ----
+ set termwinkey&
+ tabnext
+ tabclose
++ tabprev
++ tabclose
+ endfunc
+
+ func Test_terminal_out_err()
+*** ../vim-8.1.0973/runtime/doc/terminal.txt 2019-02-22 16:09:06.578746015 +0100
+--- runtime/doc/terminal.txt 2019-02-22 17:41:35.569722575 +0100
+***************
+*** 44,50 ****
+
+ {Vi does not have any of these commands}
+ {only available when compiled with the |+terminal| feature}
+! The terminal feature requires the |+multi_byte|, |+job| and |+channel| features.
+
+ ==============================================================================
+ 1. Basic use *terminal-use*
+--- 44,50 ----
+
+ {Vi does not have any of these commands}
+ {only available when compiled with the |+terminal| feature}
+! The terminal feature requires the |+job| and |+channel| features.
+
+ ==============================================================================
+ 1. Basic use *terminal-use*
+***************
+*** 81,86 ****
+--- 81,87 ----
+ evaluating an expression.
+ CTRL-W CTRL-C ends the job, see below |t_CTRL-W_CTRL-C|
+ CTRL-W gt go to next tabpage, same as `gt`
++ CTRL-W gT go to previous tabpage, same as `gT`
+
+ See option 'termwinkey' for specifying another key instead of CTRL-W that
+ will work like CTRL-W. However, typing 'termwinkey' twice sends 'termwinkey'
+*** ../vim-8.1.0973/src/version.c 2019-02-22 17:26:57.739029029 +0100
+--- src/version.c 2019-02-22 17:52:10.157342450 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 974,
+ /**/
+
+--
+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.0975 b/data/vim/patches/8.1.0975
new file mode 100644
index 000000000..ffddf1c0e
--- /dev/null
+++ b/data/vim/patches/8.1.0975
@@ -0,0 +1,125 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0975
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0975
+Problem: Using STRNCPY() wrongly. Warning for uninitialized variable.
+Solution: Use mch_memmove(). Initialize variable. (Yasuhiro Matsumoto,
+ closes #3979)
+Files: src/screen.c, src/textprop.c
+
+
+*** ../vim-8.1.0974/src/screen.c 2019-02-17 17:44:36.219875473 +0100
+--- src/screen.c 2019-02-22 19:07:05.421051380 +0100
+***************
+*** 2547,2556 ****
+ {
+ #ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+! STRNCPY(current_ScreenLine, text, len);
+ else
+ #endif
+! STRNCPY(current_ScreenLine + col, text, len);
+ col += len;
+ }
+ }
+--- 2547,2556 ----
+ {
+ #ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+! mch_memmove(current_ScreenLine, text, len);
+ else
+ #endif
+! mch_memmove(current_ScreenLine + col, text, len);
+ col += len;
+ }
+ }
+***************
+*** 3396,3402 ****
+ {
+ 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)
+--- 3396,3402 ----
+ {
+ 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)
+*** ../vim-8.1.0974/src/textprop.c 2019-01-13 23:38:33.415773131 +0100
+--- src/textprop.c 2019-02-22 19:09:28.700119037 +0100
+***************
+*** 17,22 ****
+--- 17,23 ----
+ * Text properties have a type, which can be used to specify highlighting.
+ *
+ * TODO:
++ * - When using 'cursorline' attributes should be merged. (#3912)
+ * - Adjust text property column and length when text is inserted/deleted.
+ * -> a :substitute with a multi-line match
+ * -> search for changed_bytes() from misc1.c
+***************
+*** 27,33 ****
+ * the index, like DB_MARKED?
+ * - Also test line2byte() with many lines, so that ml_updatechunk() is taken
+ * into account.
+! * - add mechanism to keep track of changed lines.
+ */
+
+ #include "vim.h"
+--- 28,37 ----
+ * the index, like DB_MARKED?
+ * - Also test line2byte() with many lines, so that ml_updatechunk() is taken
+ * into account.
+! * - Add mechanism to keep track of changed lines, so that plugin can update
+! * text properties in these.
+! * - Perhaps have a window-local option to disable highlighting from text
+! * properties?
+ */
+
+ #include "vim.h"
+***************
+*** 158,164 ****
+ char_u *newtext;
+ int proplen;
+ size_t textlen;
+! char_u *props;
+ char_u *newprops;
+ textprop_T tmp_prop;
+ int i;
+--- 162,168 ----
+ char_u *newtext;
+ int proplen;
+ size_t textlen;
+! char_u *props = NULL;
+ char_u *newprops;
+ textprop_T tmp_prop;
+ int i;
+*** ../vim-8.1.0974/src/version.c 2019-02-22 17:56:02.787842436 +0100
+--- src/version.c 2019-02-22 19:12:30.286948558 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 975,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+19. All of your friends have an @ in their names.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0976 b/data/vim/patches/8.1.0976
new file mode 100644
index 000000000..4f5d32056
--- /dev/null
+++ b/data/vim/patches/8.1.0976
@@ -0,0 +1,454 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0976
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0976
+Problem: Dosinstall still has buffer overflow problems.
+Solution: Adjust buffer sizes. (Yasuhiro Matsumoto, closes #4002)
+Files: src/dosinst.c, src/dosinst.h, src/uninstal.c
+
+
+*** ../vim-8.1.0975/src/dosinst.c 2019-02-18 22:19:29.124186022 +0100
+--- src/dosinst.c 2019-02-22 19:37:38.442404717 +0100
+***************
+*** 388,394 ****
+
+ /* First get $VIMRUNTIME. If it's set, remove the tail. */
+ vim = getenv("VIMRUNTIME");
+! if (vim != NULL && *vim != 0 && strlen(vim) < BUFSIZE)
+ {
+ strcpy(buf, vim);
+ remove_tail(buf);
+--- 388,394 ----
+
+ /* First get $VIMRUNTIME. If it's set, remove the tail. */
+ vim = getenv("VIMRUNTIME");
+! if (vim != NULL && *vim != 0 && strlen(vim) < sizeof(buf))
+ {
+ strcpy(buf, vim);
+ remove_tail(buf);
+***************
+*** 411,417 ****
+
+ /* NSIS also uses GetTempPath(), thus we should get the same directory
+ * name as where NSIS will look for vimini.ini. */
+! GetTempPath(BUFSIZE, fname);
+ add_pathsep(fname);
+ strcat(fname, "vimini.ini");
+
+--- 411,417 ----
+
+ /* NSIS also uses GetTempPath(), thus we should get the same directory
+ * name as where NSIS will look for vimini.ini. */
+! GetTempPath(sizeof(fname) - 12, fname);
+ add_pathsep(fname);
+ strcat(fname, "vimini.ini");
+
+***************
+*** 456,462 ****
+ static int
+ run_silent_uninstall(char *uninst_exe)
+ {
+! char vimrt_dir[MAX_PATH];
+ char temp_uninst[BUFSIZE];
+ char temp_dir[MAX_PATH];
+ char buf[BUFSIZE * 2 + 10];
+--- 456,462 ----
+ static int
+ run_silent_uninstall(char *uninst_exe)
+ {
+! char vimrt_dir[BUFSIZE];
+ char temp_uninst[BUFSIZE];
+ char temp_dir[MAX_PATH];
+ char buf[BUFSIZE * 2 + 10];
+***************
+*** 506,512 ****
+ char *uninstall_key = "software\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
+ char subkey_name_buff[BUFSIZE];
+ char temp_string_buffer[BUFSIZE-2];
+! DWORD local_bufsize = BUFSIZE;
+ FILETIME temp_pfiletime;
+ DWORD key_index;
+ char input;
+--- 506,512 ----
+ char *uninstall_key = "software\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
+ char subkey_name_buff[BUFSIZE];
+ char temp_string_buffer[BUFSIZE-2];
+! DWORD local_bufsize;
+ FILETIME temp_pfiletime;
+ DWORD key_index;
+ char input;
+***************
+*** 521,532 ****
+ KEY_WOW64_64KEY | KEY_READ, &key_handle);
+ CHECK_REG_ERROR(code);
+
+! for (key_index = 0;
+! RegEnumKeyEx(key_handle, key_index, subkey_name_buff, &local_bufsize,
+! NULL, NULL, NULL, &temp_pfiletime) != ERROR_NO_MORE_ITEMS;
+! key_index++)
+ {
+! local_bufsize = BUFSIZE;
+ if (strncmp("Vim", subkey_name_buff, 3) == 0)
+ {
+ /* Open the key named Vim* */
+--- 521,534 ----
+ KEY_WOW64_64KEY | KEY_READ, &key_handle);
+ CHECK_REG_ERROR(code);
+
+! key_index = 0;
+! while (TRUE)
+ {
+! local_bufsize = sizeof(subkey_name_buff);
+! if (RegEnumKeyEx(key_handle, key_index, subkey_name_buff, &local_bufsize,
+! NULL, NULL, NULL, &temp_pfiletime) == ERROR_NO_MORE_ITEMS)
+! break;
+!
+ if (strncmp("Vim", subkey_name_buff, 3) == 0)
+ {
+ /* Open the key named Vim* */
+***************
+*** 535,544 ****
+ CHECK_REG_ERROR(code);
+
+ /* get the DisplayName out of it to show the user */
+ code = RegQueryValueEx(uninstall_key_handle, "displayname", 0,
+ &value_type, (LPBYTE)temp_string_buffer,
+ &local_bufsize);
+- local_bufsize = BUFSIZE;
+ CHECK_REG_ERROR(code);
+
+ allow_silent = 0;
+--- 537,546 ----
+ CHECK_REG_ERROR(code);
+
+ /* get the DisplayName out of it to show the user */
++ local_bufsize = sizeof(temp_string_buffer);
+ code = RegQueryValueEx(uninstall_key_handle, "displayname", 0,
+ &value_type, (LPBYTE)temp_string_buffer,
+ &local_bufsize);
+ CHECK_REG_ERROR(code);
+
+ allow_silent = 0;
+***************
+*** 568,576 ****
+ fflush(stdout);
+
+ /* get the UninstallString */
+ code = RegQueryValueEx(uninstall_key_handle, "uninstallstring", 0,
+ &value_type, (LPBYTE)temp_string_buffer, &local_bufsize);
+- local_bufsize = BUFSIZE;
+ CHECK_REG_ERROR(code);
+
+ /* Remember the directory, it is used as the default for NSIS. */
+--- 570,578 ----
+ fflush(stdout);
+
+ /* get the UninstallString */
++ local_bufsize = sizeof(temp_string_buffer);
+ code = RegQueryValueEx(uninstall_key_handle, "uninstallstring", 0,
+ &value_type, (LPBYTE)temp_string_buffer, &local_bufsize);
+ CHECK_REG_ERROR(code);
+
+ /* Remember the directory, it is used as the default for NSIS. */
+***************
+*** 683,688 ****
+--- 685,692 ----
+
+ RegCloseKey(uninstall_key_handle);
+ }
++
++ key_index++;
+ }
+ RegCloseKey(key_handle);
+
+***************
+*** 1826,1832 ****
+ /* translate the (possibly) multibyte shortcut filename to windows
+ * Unicode so it can be used as a file name.
+ */
+! MultiByteToWideChar(CP_ACP, 0, shortcut_name, -1, wsz, BUFSIZE);
+
+ /* set the attributes */
+ shelllink_ptr->lpVtbl->SetPath(shelllink_ptr, shortcut_target);
+--- 1830,1836 ----
+ /* translate the (possibly) multibyte shortcut filename to windows
+ * Unicode so it can be used as a file name.
+ */
+! MultiByteToWideChar(CP_ACP, 0, shortcut_name, -1, wsz, sizeof(wsz)/sizeof(wsz[0]));
+
+ /* set the attributes */
+ shelllink_ptr->lpVtbl->SetPath(shelllink_ptr, shortcut_target);
+***************
+*** 2135,2141 ****
+ * result in "to[]".
+ */
+ static void
+! dir_remove_last(const char *path, char to[BUFSIZE])
+ {
+ char c;
+ long last_char_to_copy;
+--- 2139,2145 ----
+ * result in "to[]".
+ */
+ static void
+! dir_remove_last(const char *path, char to[MAX_PATH])
+ {
+ char c;
+ long last_char_to_copy;
+***************
+*** 2206,2212 ****
+ 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)
+--- 2210,2216 ----
+ if (homepath == NULL || *homepath == NUL)
+ homepath = "\\";
+ if (homedrive != NULL
+! && strlen(homedrive) + strlen(homepath) < sizeof(buf))
+ {
+ sprintf(buf, "%s%s", homedrive, homepath);
+ if (buf[0] != NUL)
+***************
+*** 2234,2243 ****
+ 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;
+ }
+ }
+--- 2238,2246 ----
+ buf[p - (var + 1)] = NUL;
+ exp = getenv(buf);
+ if (exp != NULL && *exp != NUL
+! && strlen(exp) + strlen(p) < sizeof(buf))
+ {
+! sprintf(buf, "%s%s", exp, p + 1);
+ var = buf;
+ }
+ }
+***************
+*** 2351,2360 ****
+
+ // 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;
+! sprintf(tmp_dirname, "%s\\vimfiles\\compiler", getenv("HOME"));
+ if (stat(tmp_dirname, &st) == 0)
+ vimfiles_dir_choice = (int)vimfiles_dir_none;
+ }
+--- 2354,2364 ----
+
+ // Check if the "compiler" directory already exists. That's a good
+ // indication that the plugin directories were already created.
+! p = getenv("HOME");
+! if (p != NULL)
+ {
+ vimfiles_dir_choice = (int)vimfiles_dir_home;
+! sprintf(tmp_dirname, "%s\\vimfiles\\compiler", p);
+ if (stat(tmp_dirname, &st) == 0)
+ vimfiles_dir_choice = (int)vimfiles_dir_none;
+ }
+*** ../vim-8.1.0975/src/dosinst.h 2019-02-18 22:19:29.124186022 +0100
+--- src/dosinst.h 2019-02-22 19:33:42.519738742 +0100
+***************
+*** 59,65 ****
+ /* ---------------------------------------- */
+
+
+! #define BUFSIZE 512 /* long enough to hold a file name path */
+ #define NUL 0
+
+ #define FAIL 0
+--- 59,65 ----
+ /* ---------------------------------------- */
+
+
+! #define BUFSIZE (MAX_PATH*2) /* long enough to hold a file name path */
+ #define NUL 0
+
+ #define FAIL 0
+***************
+*** 93,107 ****
+ static void *
+ alloc(int len)
+ {
+! char *s;
+
+! s = malloc(len);
+! if (s == NULL)
+ {
+ printf("ERROR: out of memory\n");
+ exit(1);
+ }
+! return (void *)s;
+ }
+
+ /*
+--- 93,107 ----
+ static void *
+ alloc(int len)
+ {
+! void *p;
+
+! p = malloc(len);
+! if (p == NULL)
+ {
+ printf("ERROR: out of memory\n");
+ exit(1);
+ }
+! return p;
+ }
+
+ /*
+***************
+*** 512,518 ****
+ do_inits(char **argv)
+ {
+ /* Find out the full path of our executable. */
+! if (my_fullpath(installdir, argv[0], BUFSIZE) == NULL)
+ {
+ printf("ERROR: Cannot get name of executable\n");
+ myexit(1);
+--- 512,518 ----
+ do_inits(char **argv)
+ {
+ /* Find out the full path of our executable. */
+! if (my_fullpath(installdir, argv[0], sizeof(installdir)) == NULL)
+ {
+ printf("ERROR: Cannot get name of executable\n");
+ myexit(1);
+*** ../vim-8.1.0975/src/uninstal.c 2019-02-18 22:19:29.124186022 +0100
+--- src/uninstal.c 2019-02-22 19:33:42.519738742 +0100
+***************
+*** 60,70 ****
+ * Returns non-zero when it's found.
+ */
+ static int
+! popup_gvim_path(char *buf)
+ {
+ HKEY key_handle;
+ DWORD value_type;
+- DWORD bufsize = BUFSIZE;
+ int r;
+
+ /* Open the key where the path to gvim.exe is stored. */
+--- 60,69 ----
+ * Returns non-zero when it's found.
+ */
+ static int
+! popup_gvim_path(char *buf, DWORD bufsize)
+ {
+ HKEY key_handle;
+ DWORD value_type;
+ int r;
+
+ /* Open the key where the path to gvim.exe is stored. */
+***************
+*** 87,97 ****
+ * Returns non-zero when it's found.
+ */
+ static int
+! openwith_gvim_path(char *buf)
+ {
+ HKEY key_handle;
+ DWORD value_type;
+- DWORD bufsize = BUFSIZE;
+ int r;
+
+ /* Open the key where the path to gvim.exe is stored. */
+--- 86,95 ----
+ * Returns non-zero when it's found.
+ */
+ static int
+! openwith_gvim_path(char *buf, DWORD bufsize)
+ {
+ HKEY key_handle;
+ DWORD value_type;
+ int r;
+
+ /* Open the key where the path to gvim.exe is stored. */
+***************
+*** 209,215 ****
+ fd = fopen(path, "r");
+ if (fd != NULL)
+ {
+! while (fgets(line, BUFSIZE, fd) != NULL)
+ {
+ for (p = line; *p != 0; ++p)
+ /* don't accept "vim60an" when looking for "vim60". */
+--- 207,213 ----
+ fd = fopen(path, "r");
+ if (fd != NULL)
+ {
+! while (fgets(line, sizeof(line), fd) != NULL)
+ {
+ for (p = line; *p != 0; ++p)
+ /* don't accept "vim60an" when looking for "vim60". */
+***************
+*** 335,341 ****
+
+ printf("This program will remove the following items:\n");
+
+! if (popup_gvim_path(popup_path))
+ {
+ printf(" - the \"Edit with Vim\" entry in the popup menu\n");
+ printf(" which uses \"%s\"\n", popup_path);
+--- 333,339 ----
+
+ printf("This program will remove the following items:\n");
+
+! if (popup_gvim_path(popup_path, sizeof(popup_path)))
+ {
+ printf(" - the \"Edit with Vim\" entry in the popup menu\n");
+ printf(" which uses \"%s\"\n", popup_path);
+***************
+*** 349,355 ****
+ remove_openwith();
+ }
+ }
+! else if (openwith_gvim_path(popup_path))
+ {
+ printf(" - the Vim \"Open With...\" entry in the popup menu\n");
+ printf(" which uses \"%s\"\n", popup_path);
+--- 347,353 ----
+ remove_openwith();
+ }
+ }
+! else if (openwith_gvim_path(popup_path, sizeof(popup_path)))
+ {
+ printf(" - the Vim \"Open With...\" entry in the popup menu\n");
+ printf(" which uses \"%s\"\n", popup_path);
+*** ../vim-8.1.0975/src/version.c 2019-02-22 19:14:46.774074872 +0100
+--- src/version.c 2019-02-22 19:34:21.703520330 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 976,
+ /**/
+
+--
+When a fly lands on the ceiling, does it do a half roll or
+a half 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.0977 b/data/vim/patches/8.1.0977
new file mode 100644
index 000000000..0bbeb86ac
--- /dev/null
+++ b/data/vim/patches/8.1.0977
@@ -0,0 +1,84 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0977
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0977
+Problem: Blob not tested with Ruby.
+Solution: Add more test coverage. fixes a crash. (Dominique Pelle,
+ closes #4036)
+Files: src/if_ruby.c, src/testdir/test_ruby.vim
+
+
+*** ../vim-8.1.0976/src/if_ruby.c 2019-02-18 20:42:46.834041670 +0100
+--- src/if_ruby.c 2019-02-23 14:17:11.461680173 +0100
+***************
+*** 1267,1273 ****
+ int i;
+ for (i = 0; i < RSTRING_LEN(str); i++)
+ {
+! sprintf(buf, "%02X", RSTRING_PTR(str)[i]);
+ rb_str_concat(result, rb_str_new2(buf));
+ }
+ return result;
+--- 1267,1273 ----
+ int i;
+ for (i = 0; i < RSTRING_LEN(str); i++)
+ {
+! sprintf(buf, "%02X", (unsigned char)(RSTRING_PTR(str)[i]));
+ rb_str_concat(result, rb_str_new2(buf));
+ }
+ return result;
+*** ../vim-8.1.0976/src/testdir/test_ruby.vim 2018-08-11 14:24:06.945748177 +0200
+--- src/testdir/test_ruby.vim 2019-02-23 14:22:47.707724036 +0100
+***************
+*** 306,311 ****
+--- 306,314 ----
+ call assert_equal('foo', RubyEval('Vim::evaluate("\"foo\"")'))
+ call assert_equal('String', RubyEval('Vim::evaluate("\"foo\"").class'))
+
++ call assert_equal('["\x01\xAB"]', RubyEval('Vim::evaluate("0z01ab").unpack("M")'))
++ call assert_equal('String', RubyEval('Vim::evaluate("0z01ab").class'))
++
+ call assert_equal('[1, 2]', RubyEval('Vim::evaluate("[1, 2]")'))
+ call assert_equal('Array', RubyEval('Vim::evaluate("[1, 2]").class'))
+
+***************
+*** 324,329 ****
+--- 327,339 ----
+ call assert_equal('FalseClass',RubyEval('Vim::evaluate("v:false").class'))
+ endfunc
+
++ func Test_Vim_blob()
++ call assert_equal('0z', RubyEval('Vim::blob("")'))
++ call assert_equal('0z31326162', RubyEval('Vim::blob("12ab")'))
++ call assert_equal('0z00010203', RubyEval('Vim::blob("\x00\x01\x02\x03")'))
++ call assert_equal('0z8081FEFF', RubyEval('Vim::blob("\x80\x81\xfe\xff")'))
++ endfunc
++
+ func Test_Vim_evaluate_list()
+ call setline(line('$'), ['2 line 2'])
+ ruby Vim.command("normal /^2\n")
+*** ../vim-8.1.0976/src/version.c 2019-02-22 19:40:57.693250456 +0100
+--- src/version.c 2019-02-23 14:18:10.413345154 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 977,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+22. You've already visited all the links at Yahoo and you're halfway through
+ Lycos.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0978 b/data/vim/patches/8.1.0978
new file mode 100644
index 000000000..c4d654a22
--- /dev/null
+++ b/data/vim/patches/8.1.0978
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0978
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0978
+Problem: Blob not tested with Perl.
+Solution: Add more test coverage. Fixes a crash. (Dominique Pelle,
+ closes #4037)
+Files: src/if_perl.c, src/testdir/test_ruby.vim
+
+
+*** ../vim-8.1.0977/src/if_perl.xs 2019-02-17 17:44:36.211875510 +0100
+--- src/if_perl.xs 2019-02-23 15:00:57.748553084 +0100
+***************
+*** 1570,1576 ****
+ newsv = newSVpv("0z", 2);
+ for (i = 0; i < len; i++)
+ {
+! sprintf(buf, "%02X", s[i]);
+ sv_catpvn(newsv, buf, 2);
+ }
+ RETVAL = newsv;
+--- 1570,1576 ----
+ newsv = newSVpv("0z", 2);
+ for (i = 0; i < len; i++)
+ {
+! sprintf(buf, "%02X", (unsigned char)(s[i]));
+ sv_catpvn(newsv, buf, 2);
+ }
+ RETVAL = newsv;
+*** ../vim-8.1.0977/src/testdir/test_perl.vim 2018-08-02 21:46:47.579548771 +0200
+--- src/testdir/test_perl.vim 2019-02-23 15:00:57.748553084 +0100
+***************
+*** 29,34 ****
+--- 29,41 ----
+ call assert_equal('abc/def/', getline('$'))
+ endfunc
+
++ funct Test_VIM_Blob()
++ call assert_equal('0z', perleval('VIM::Blob("")'))
++ call assert_equal('0z31326162', perleval('VIM::Blob("12ab")'))
++ call assert_equal('0z00010203', perleval('VIM::Blob("\x00\x01\x02\x03")'))
++ call assert_equal('0z8081FEFF', perleval('VIM::Blob("\x80\x81\xfe\xff")'))
++ endfunc
++
+ func Test_buffer_Delete()
+ new
+ call setline(1, ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])
+*** ../vim-8.1.0977/src/version.c 2019-02-23 14:22:59.567653374 +0100
+--- src/version.c 2019-02-23 15:03:24.831570654 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 978,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+23. You can't call your mother... she doesn't have VOIP
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0979 b/data/vim/patches/8.1.0979
new file mode 100644
index 000000000..b0a61beec
--- /dev/null
+++ b/data/vim/patches/8.1.0979
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0979
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0979
+Problem: Compiler warning for unused functions. (Yasuhiro Matsumoto)
+Solution: Adjust #ifdef.
+Files: src/screen.c
+
+
+*** ../vim-8.1.0978/src/screen.c 2019-02-22 19:14:46.774074872 +0100
+--- src/screen.c 2019-02-25 05:36:30.020974182 +0100
+***************
+*** 832,838 ****
+ return OK;
+ }
+
+! #if defined(FEAT_SIGNS) || defined(FEAT_GUI) || defined(FEAT_CONCEAL)
+ /*
+ * Prepare for updating one or more windows.
+ * Caller must check for "updating_screen" already set to avoid recursiveness.
+--- 832,838 ----
+ return OK;
+ }
+
+! #if defined(FEAT_NETBEANS_INTG) || defined(FEAT_GUI)
+ /*
+ * Prepare for updating one or more windows.
+ * Caller must check for "updating_screen" already set to avoid recursiveness.
+*** ../vim-8.1.0978/src/version.c 2019-02-23 15:04:12.891251272 +0100
+--- src/version.c 2019-02-25 05:37:50.204408829 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 979,
+ /**/
+
+--
+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.0980 b/data/vim/patches/8.1.0980
new file mode 100644
index 000000000..091d95943
--- /dev/null
+++ b/data/vim/patches/8.1.0980
@@ -0,0 +1,133 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0980
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0980
+Problem: extend() insufficiently tested.
+Solution: Add more tests. (Dominique Pelle, closes #4040)
+Files: src/testdir/test_listdict.vim
+
+
+*** ../vim-8.1.0979/src/testdir/test_listdict.vim 2019-02-10 22:14:24.184352831 +0100
+--- src/testdir/test_listdict.vim 2019-02-25 05:51:20.254607204 +0100
+***************
+*** 641,659 ****
+ endfunc
+
+ func Test_listdict_extend()
+ " Pass the same List to extend()
+! let l = [1, 2, 3, 4, 5]
+! call extend(l, l)
+! call assert_equal([1, 2, 3, 4, 5, 1, 2, 3, 4, 5], l)
+
+ " Pass the same Dict to extend()
+ let d = { 'a': {'b': 'B'}}
+ call extend(d, d)
+ call assert_equal({'a': {'b': 'B'}}, d)
+
+! " Pass the same Dict to extend() with "error"
+! call assert_fails("call extend(d, d, 'error')", 'E737:')
+! call assert_equal({'a': {'b': 'B'}}, d)
+ endfunc
+
+ func s:check_scope_dict(x, fixed)
+--- 641,709 ----
+ endfunc
+
+ func Test_listdict_extend()
++ " Test extend() with lists
++
+ " Pass the same List to extend()
+! let l = [1, 2, 3]
+! call assert_equal([1, 2, 3, 1, 2, 3], extend(l, l))
+! call assert_equal([1, 2, 3, 1, 2, 3], l)
+!
+! let l = [1, 2, 3]
+! call assert_equal([1, 2, 3, 4, 5, 6], extend(l, [4, 5, 6]))
+! call assert_equal([1, 2, 3, 4, 5, 6], l)
+!
+! let l = [1, 2, 3]
+! call extend(l, [4, 5, 6], 0)
+! call assert_equal([4, 5, 6, 1, 2, 3], l)
+!
+! let l = [1, 2, 3]
+! call extend(l, [4, 5, 6], 1)
+! call assert_equal([1, 4, 5, 6, 2, 3], l)
+!
+! let l = [1, 2, 3]
+! call extend(l, [4, 5, 6], 3)
+! call assert_equal([1, 2, 3, 4, 5, 6], l)
+!
+! let l = [1, 2, 3]
+! call extend(l, [4, 5, 6], -1)
+! call assert_equal([1, 2, 4, 5, 6, 3], l)
+!
+! let l = [1, 2, 3]
+! call extend(l, [4, 5, 6], -3)
+! call assert_equal([4, 5, 6, 1, 2, 3], l)
+!
+! let l = [1, 2, 3]
+! call assert_fails("call extend(l, [4, 5, 6], 4)", 'E684:')
+! call assert_fails("call extend(l, [4, 5, 6], -4)", 'E684:')
+! call assert_fails("call extend(l, [4, 5, 6], 1.2)", 'E805:')
+!
+! " Test extend() with dictionaries.
+
+ " Pass the same Dict to extend()
+ let d = { 'a': {'b': 'B'}}
+ call extend(d, d)
+ call assert_equal({'a': {'b': 'B'}}, d)
+
+! let d = {'a': 'A', 'b': 'B'}
+! call assert_equal({'a': 'A', 'b': 0, 'c': 'C'}, extend(d, {'b': 0, 'c':'C'}))
+! call assert_equal({'a': 'A', 'b': 0, 'c': 'C'}, d)
+!
+! let d = {'a': 'A', 'b': 'B'}
+! call extend(d, {'a': 'A', 'b': 0, 'c': 'C'}, "force")
+! call assert_equal({'a': 'A', 'b': 0, 'c': 'C'}, d)
+!
+! let d = {'a': 'A', 'b': 'B'}
+! call extend(d, {'b': 0, 'c':'C'}, "keep")
+! call assert_equal({'a': 'A', 'b': 'B', 'c': 'C'}, d)
+!
+! let d = {'a': 'A', 'b': 'B'}
+! call assert_fails("call extend(d, {'b': 0, 'c':'C'}, 'error')", 'E737:')
+! call assert_fails("call extend(d, {'b': 0, 'c':'C'}, 'xxx')", 'E475:')
+! call assert_fails("call extend(d, {'b': 0, 'c':'C'}, 1.2)", 'E806:')
+! call assert_equal({'a': 'A', 'b': 'B'}, d)
+!
+! call assert_fails("call extend([1, 2], 1)", 'E712:')
+! call assert_fails("call extend([1, 2], {})", 'E712:')
+ endfunc
+
+ func s:check_scope_dict(x, fixed)
+*** ../vim-8.1.0979/src/version.c 2019-02-25 05:40:59.171067556 +0100
+--- src/version.c 2019-02-25 05:54:54.821056710 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 980,
+ /**/
+
+--
+Bypasses are devices that allow some people to dash from point A to
+point B very fast while other people dash from point B to point A very
+fast. People living at point C, being a point directly in between, are
+often given to wonder what's so great about point A that so many people
+from point B are so keen to get there and what's so great about point B
+that so many people from point A are so keen to get there. They often
+wish that people would just once and for all work out where the hell
+they wanted to be.
+ -- 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.0981 b/data/vim/patches/8.1.0981
new file mode 100644
index 000000000..fc3724e5e
--- /dev/null
+++ b/data/vim/patches/8.1.0981
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0981
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0981
+Problem: Pasting in terminal insufficiently tested.
+Solution: Add more tests. (Dominique Pelle, closes #4040)
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0980/src/testdir/test_terminal.vim 2019-02-22 17:56:02.787842436 +0100
+--- src/testdir/test_terminal.vim 2019-02-25 06:09:32.174944867 +0100
+***************
+*** 82,87 ****
+--- 82,102 ----
+ unlet g:job
+ endfunc
+
++ func Test_terminal_paste_register()
++ let @" = "text to paste"
++
++ let buf = Run_shell_in_terminal({})
++ " Wait for the shell to display a prompt
++ call WaitForAssert({-> assert_notequal('', term_getline(buf, 1))})
++
++ call feedkeys("echo \<C-W>\"\" \<C-W>\"=37 + 5\<CR>\<CR>", 'xt')
++ call WaitForAssert({-> assert_match("echo text to paste 42$", getline(1))})
++ call WaitForAssert({-> assert_equal('text to paste 42', getline(2))})
++
++ exe buf . 'bwipe!'
++ unlet g:job
++ endfunc
++
+ func Test_terminal_wipe_buffer()
+ let buf = Run_shell_in_terminal({})
+ call assert_fails(buf . 'bwipe', 'E517')
+*** ../vim-8.1.0980/src/version.c 2019-02-25 05:56:04.444553044 +0100
+--- src/version.c 2019-02-25 06:10:59.082334313 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 981,
+ /**/
+
+--
+Don't Panic!
+ -- 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.0982 b/data/vim/patches/8.1.0982
new file mode 100644
index 000000000..050689473
--- /dev/null
+++ b/data/vim/patches/8.1.0982
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0982
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0982
+Problem: update_cursor() called twice in :shell.
+Solution: Remove one of the calls. (Yasuhiro Matsumoto, closes #4039)
+Files: src/terminal.c
+
+
+*** ../vim-8.1.0981/src/terminal.c 2019-02-17 17:44:36.223875455 +0100
+--- src/terminal.c 2019-02-25 06:24:22.988617186 +0100
+***************
+*** 3265,3271 ****
+
+ term->tl_dirty_row_start = MAX_ROW;
+ term->tl_dirty_row_end = 0;
+- update_cursor(term, TRUE);
+ }
+ #endif
+
+--- 3265,3270 ----
+*** ../vim-8.1.0981/src/version.c 2019-02-25 06:11:19.026193863 +0100
+--- src/version.c 2019-02-25 06:28:36.786799556 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 982,
+ /**/
+
+--
+Far back in the mists of ancient time, in the great and glorious days of the
+former Galactic Empire, life was wild, rich and largely tax free.
+Mighty starships plied their way between exotic suns, seeking adventure and
+reward among the furthest reaches of Galactic space. In those days, spirits
+were brave, the stakes were high, men were real men, women were real women
+and small furry creatures from Alpha Centauri were real small furry creatures
+from Alpha Centauri. And all dared to brave unknown terrors, to do mighty
+deeds, to boldly split infinitives that no man had split before -- and thus
+was the Empire forged.
+ -- 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.0983 b/data/vim/patches/8.1.0983
new file mode 100644
index 000000000..ca58507f9
--- /dev/null
+++ b/data/vim/patches/8.1.0983
@@ -0,0 +1,126 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0983
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0983
+Problem: Checking __CYGWIN32__ unnecessarily.
+Solution: Remove the checks. (Ken Takata)
+Files: src/evalfunc.c, src/os_unix.c, src/os_win32.c
+
+
+*** ../vim-8.1.0982/src/evalfunc.c 2019-02-18 22:14:15.198135199 +0100
+--- src/evalfunc.c 2019-02-26 16:58:06.575888744 +0100
+***************
+*** 6155,6161 ****
+ #ifdef MSWIN
+ "win32",
+ #endif
+! #if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__))
+ "win32unix",
+ #endif
+ #ifdef _WIN64
+--- 6155,6161 ----
+ #ifdef MSWIN
+ "win32",
+ #endif
+! #if defined(UNIX) && defined(__CYGWIN__)
+ "win32unix",
+ #endif
+ #ifdef _WIN64
+*** ../vim-8.1.0982/src/os_unix.c 2019-02-17 17:44:36.219875473 +0100
+--- src/os_unix.c 2019-02-26 16:58:06.575888744 +0100
+***************
+*** 1605,1611 ****
+ {
+ /* This function should not return, it causes exit(). Longjump instead. */
+ LONGJMP(lc_jump_env, 1);
+! # if defined(VMS) || defined(__CYGWIN__) || defined(__CYGWIN32__)
+ return 0; /* avoid the compiler complains about missing return value */
+ # endif
+ }
+--- 1605,1611 ----
+ {
+ /* This function should not return, it causes exit(). Longjump instead. */
+ LONGJMP(lc_jump_env, 1);
+! # if defined(VMS) || defined(__CYGWIN__)
+ return 0; /* avoid the compiler complains about missing return value */
+ # endif
+ }
+***************
+*** 1627,1633 ****
+
+ /* This function should not return, it causes exit(). Longjump instead. */
+ LONGJMP(x_jump_env, 1);
+! # if defined(VMS) || defined(__CYGWIN__) || defined(__CYGWIN32__)
+ return 0; /* avoid the compiler complains about missing return value */
+ # endif
+ }
+--- 1627,1633 ----
+
+ /* This function should not return, it causes exit(). Longjump instead. */
+ LONGJMP(x_jump_env, 1);
+! # if defined(VMS) || defined(__CYGWIN__)
+ return 0; /* avoid the compiler complains about missing return value */
+ # endif
+ }
+***************
+*** 6713,6719 ****
+ }
+ vim_free(tempname);
+
+! # if defined(__CYGWIN__) || defined(__CYGWIN32__)
+ /* Translate <CR><NL> into <NL>. Caution, buffer may contain NUL. */
+ p = buffer;
+ for (i = 0; i < (int)len; ++i)
+--- 6713,6719 ----
+ }
+ vim_free(tempname);
+
+! # ifdef __CYGWIN__
+ /* Translate <CR><NL> into <NL>. Caution, buffer may contain NUL. */
+ p = buffer;
+ for (i = 0; i < (int)len; ++i)
+*** ../vim-8.1.0982/src/os_win32.c 2019-02-17 17:44:36.219875473 +0100
+--- src/os_win32.c 2019-02-26 16:58:06.575888744 +0100
+***************
+*** 2094,2101 ****
+ return TRUE;
+ }
+
+! #if ((defined(__MINGW32__) || defined (__CYGWIN32__)) && \
+! __MSVCRT_VERSION__ >= 0x800) || (defined(_MSC_VER) && _MSC_VER >= 1400)
+ /*
+ * Bad parameter handler.
+ *
+--- 2094,2101 ----
+ return TRUE;
+ }
+
+! #if (defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x800) || \
+! (defined(_MSC_VER) && _MSC_VER >= 1400)
+ /*
+ * Bad parameter handler.
+ *
+*** ../vim-8.1.0982/src/version.c 2019-02-25 06:28:53.754677936 +0100
+--- src/version.c 2019-02-26 17:02:33.638021985 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 983,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+2. Page yourself over the intercom. Don't disguise your voice.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0984 b/data/vim/patches/8.1.0984
new file mode 100644
index 000000000..a84f25d50
--- /dev/null
+++ b/data/vim/patches/8.1.0984
@@ -0,0 +1,199 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0984
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0984
+Problem: Unnecessary #ifdefs.
+Solution: Remove the #ifdefs. (Ken Takata)
+Files: src/winclip.c
+
+
+*** ../vim-8.1.0983/src/winclip.c 2019-02-17 17:44:36.223875455 +0100
+--- src/winclip.c 2019-02-27 14:09:35.870685717 +0100
+***************
+*** 22,28 ****
+ * posix environment.
+ */
+ #ifdef FEAT_CYGWIN_WIN32_CLIPBOARD
+- # define MSWIN
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+ # include "winclip.pro"
+--- 22,27 ----
+***************
+*** 299,307 ****
+ VimClipType_t metadata = { -1, -1, -1, -1 };
+ HGLOBAL hMem = NULL;
+ char_u *str = NULL;
+- #if defined(MSWIN)
+ char_u *to_free = NULL;
+- #endif
+ HGLOBAL rawh = NULL;
+ int str_size = 0;
+ int maxlen;
+--- 298,304 ----
+***************
+*** 361,367 ****
+ }
+ if (str == NULL)
+ {
+- #if defined(MSWIN)
+ /* Try to get the clipboard in Unicode if it's not an empty string. */
+ if (IsClipboardFormatAvailable(CF_UNICODETEXT) && metadata.ucslen != 0)
+ {
+--- 358,363 ----
+***************
+*** 391,400 ****
+ GlobalUnlock(hMemW);
+ }
+ }
+! else
+! #endif
+! /* Get the clipboard in the Active codepage. */
+! if (IsClipboardFormatAvailable(CF_TEXT))
+ {
+ if ((hMem = GetClipboardData(CF_TEXT)) != NULL)
+ {
+--- 387,394 ----
+ GlobalUnlock(hMemW);
+ }
+ }
+! /* Get the clipboard in the Active codepage. */
+! else if (IsClipboardFormatAvailable(CF_TEXT))
+ {
+ if ((hMem = GetClipboardData(CF_TEXT)) != NULL)
+ {
+***************
+*** 417,423 ****
+ break;
+ }
+
+- #if defined(MSWIN)
+ /* The text is in the active codepage. Convert to
+ * 'encoding', going through UTF-16. */
+ acp_to_enc(str, str_size, &to_free, &maxlen);
+--- 411,416 ----
+***************
+*** 426,432 ****
+ str_size = maxlen;
+ str = to_free;
+ }
+- #endif
+ }
+ }
+ }
+--- 419,424 ----
+***************
+*** 454,462 ****
+ if (rawh != NULL)
+ GlobalUnlock(rawh);
+ CloseClipboard();
+- #if defined(MSWIN)
+ vim_free(to_free);
+- #endif
+ }
+
+ /*
+--- 446,452 ----
+***************
+*** 471,479 ****
+ HGLOBAL hMemRaw = NULL;
+ HGLOBAL hMem = NULL;
+ HGLOBAL hMemVim = NULL;
+- # if defined(MSWIN)
+ HGLOBAL hMemW = NULL;
+- # endif
+
+ /* If the '*' register isn't already filled in, fill it in now */
+ cbd->owned = TRUE;
+--- 461,467 ----
+***************
+*** 508,514 ****
+ metadata.rawlen = 0;
+ }
+
+- # if defined(MSWIN)
+ {
+ WCHAR *out;
+ int len = metadata.txtlen;
+--- 496,501 ----
+***************
+*** 550,556 ****
+ metadata.ucslen = len;
+ }
+ }
+- # endif
+
+ /* Allocate memory for the text, add one NUL byte to terminate the string.
+ */
+--- 537,542 ----
+***************
+*** 590,602 ****
+ {
+ SetClipboardData(cbd->format, hMemVim);
+ hMemVim = 0;
+- # if defined(MSWIN)
+ if (hMemW != NULL)
+ {
+ if (SetClipboardData(CF_UNICODETEXT, hMemW) != NULL)
+ hMemW = NULL;
+ }
+- # endif
+ /* Always use CF_TEXT. On Win98 Notepad won't obtain the
+ * CF_UNICODETEXT text, only CF_TEXT. */
+ SetClipboardData(CF_TEXT, hMem);
+--- 576,586 ----
+***************
+*** 611,620 ****
+ GlobalFree(hMemRaw);
+ if (hMem)
+ GlobalFree(hMem);
+- # if defined(MSWIN)
+ if (hMemW)
+ GlobalFree(hMemW);
+- # endif
+ if (hMemVim)
+ GlobalFree(hMemVim);
+ }
+--- 595,602 ----
+***************
+*** 746,752 ****
+ return enc_str;
+ }
+
+- #if defined(MSWIN) || defined(PROTO)
+ /*
+ * Convert from the active codepage to 'encoding'.
+ * Input is "str[str_size]".
+--- 728,733 ----
+***************
+*** 796,799 ****
+ vim_free(widestr);
+ }
+ }
+- #endif
+--- 777,779 ----
+*** ../vim-8.1.0983/src/version.c 2019-02-26 17:03:49.845487937 +0100
+--- src/version.c 2019-02-27 14:10:55.106118602 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 984,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+5. Put decaf in the coffee maker for 3 weeks. Once everyone has gotten
+ over their caffeine addictions, switch to espresso.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0985 b/data/vim/patches/8.1.0985
new file mode 100644
index 000000000..4a395af69
--- /dev/null
+++ b/data/vim/patches/8.1.0985
@@ -0,0 +1,123 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0985
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0985
+Problem: Crash with large number in regexp. (Kuang-che Wu)
+Solution: Check for long becoming negative int. (closes #)
+Files: src/regexp.c, src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0984/src/regexp.c 2019-02-22 17:26:57.739029029 +0100
+--- src/regexp.c 2019-02-28 06:23:19.097348062 +0100
+***************
+*** 2228,2234 ****
+ default: i = -1; break;
+ }
+
+! if (i < 0)
+ EMSG2_RET_NULL(
+ _("E678: Invalid character after %s%%[dxouU]"),
+ reg_magic == MAGIC_ALL);
+--- 2228,2234 ----
+ default: i = -1; break;
+ }
+
+! if (i < 0 || i > INT_MAX)
+ EMSG2_RET_NULL(
+ _("E678: Invalid character after %s%%[dxouU]"),
+ reg_magic == MAGIC_ALL);
+***************
+*** 3293,3299 ****
+ case 'u': nr = gethexchrs(4); break;
+ case 'U': nr = gethexchrs(8); break;
+ }
+! if (nr < 0)
+ {
+ /* If getting the number fails be backwards compatible: the character
+ * is a backslash. */
+--- 3293,3299 ----
+ case 'u': nr = gethexchrs(4); break;
+ case 'U': nr = gethexchrs(8); break;
+ }
+! if (nr < 0 || nr > INT_MAX)
+ {
+ /* If getting the number fails be backwards compatible: the character
+ * is a backslash. */
+*** ../vim-8.1.0984/src/testdir/test_search.vim 2019-02-22 17:26:57.735029052 +0100
+--- src/testdir/test_search.vim 2019-02-28 06:22:23.121696028 +0100
+***************
+*** 1212,1224 ****
+ call Incsearch_cleanup()
+ endfunc
+
+! func Test_large_hex_chars()
+ " This used to cause a crash, the character becomes an NFA state.
+ try
+ /\%Ufffffc23
+ catch
+ call assert_match('E678:', v:exception)
+ endtry
+ endfunc
+
+ func Test_one_error_msg()
+--- 1212,1247 ----
+ call Incsearch_cleanup()
+ endfunc
+
+! func Test_large_hex_chars1()
+ " This used to cause a crash, the character becomes an NFA state.
+ try
+ /\%Ufffffc23
+ catch
+ call assert_match('E678:', v:exception)
+ endtry
++ try
++ set re=1
++ /\%Ufffffc23
++ catch
++ call assert_match('E678:', v:exception)
++ endtry
++ set re&
++ endfunc
++
++ func Test_large_hex_chars2()
++ " This used to cause a crash, the character becomes an NFA state.
++ try
++ /[\Ufffffc1f]
++ catch
++ call assert_match('E486:', v:exception)
++ endtry
++ try
++ set re=1
++ /[\Ufffffc1f]
++ catch
++ call assert_match('E486:', v:exception)
++ endtry
++ set re&
+ endfunc
+
+ func Test_one_error_msg()
+*** ../vim-8.1.0984/src/version.c 2019-02-27 14:11:56.977675599 +0100
+--- src/version.c 2019-02-28 06:24:21.756953772 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 985,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+12. Sing along at the opera.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0986 b/data/vim/patches/8.1.0986
new file mode 100644
index 000000000..0afc1762a
--- /dev/null
+++ b/data/vim/patches/8.1.0986
@@ -0,0 +1,186 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0986
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0986
+Problem: rename() is not propertly tested.
+Solution: Add tests. (Dominique Pelle, closes #4061)
+Files: src/testdir/Make_all.mak, src/testdir/test_alot.vim,
+ src/testdir/test_rename.vim
+
+
+*** ../vim-8.1.0985/src/testdir/Make_all.mak 2019-02-16 15:09:21.221946179 +0100
+--- src/testdir/Make_all.mak 2019-03-02 06:26:53.035719393 +0100
+***************
+*** 212,217 ****
+--- 212,218 ----
+ test_regexp_utf8 \
+ test_registers \
+ test_reltime \
++ test_rename \
+ test_restricted \
+ test_retab \
+ test_ruby \
+*** ../vim-8.1.0985/src/testdir/test_alot.vim 2019-02-15 20:14:56.740255481 +0100
+--- src/testdir/test_alot.vim 2019-03-02 06:26:53.035719393 +0100
+***************
+*** 48,53 ****
+--- 48,54 ----
+ source test_put.vim
+ source test_recover.vim
+ source test_reltime.vim
++ source test_rename.vim
+ source test_scroll_opt.vim
+ source test_searchpos.vim
+ source test_set.vim
+*** ../vim-8.1.0985/src/testdir/test_rename.vim 2019-03-02 06:41:13.965527235 +0100
+--- src/testdir/test_rename.vim 2019-03-02 06:26:53.035719393 +0100
+***************
+*** 0 ****
+--- 1,118 ----
++ " Test rename()
++
++ func Test_rename_file_to_file()
++ call writefile(['foo'], 'Xrename1')
++
++ call assert_equal(0, rename('Xrename1', 'Xrename2'))
++
++ call assert_equal('', glob('Xrename1'))
++ call assert_equal(['foo'], readfile('Xrename2'))
++
++ " When the destination file already exists, it should be overwritten.
++ call writefile(['foo'], 'Xrename1')
++ call writefile(['bar'], 'Xrename2')
++
++ call assert_equal(0, rename('Xrename1', 'Xrename2'))
++ call assert_equal('', glob('Xrename1'))
++ call assert_equal(['foo'], readfile('Xrename2'))
++
++ call delete('Xrename2')
++ endfunc
++
++ func Test_rename_file_ignore_case()
++ " With 'fileignorecase', renaming file will go through a temp file
++ " when the source and destination file only differ by case.
++ set fileignorecase
++ call writefile(['foo'], 'Xrename')
++
++ call assert_equal(0, rename('Xrename', 'XRENAME'))
++
++ call assert_equal(['foo'], readfile('XRENAME'))
++
++ set fileignorecase&
++ call delete('XRENAME')
++ endfunc
++
++ func Test_rename_same_file()
++ call writefile(['foo'], 'Xrename')
++
++ " When the source and destination are the same file, nothing
++ " should be done. The source file should not be deleted.
++ call assert_equal(0, rename('Xrename', 'Xrename'))
++ call assert_equal(['foo'], readfile('Xrename'))
++
++ call assert_equal(0, rename('./Xrename', 'Xrename'))
++ call assert_equal(['foo'], readfile('Xrename'))
++
++ call delete('Xrename')
++ endfunc
++
++ func Test_rename_dir_to_dir()
++ call mkdir('Xrenamedir1')
++ call writefile(['foo'], 'Xrenamedir1/Xrenamefile')
++
++ call assert_equal(0, rename('Xrenamedir1', 'Xrenamedir2'))
++
++ call assert_equal('', glob('Xrenamedir1'))
++ call assert_equal(['foo'], readfile('Xrenamedir2/Xrenamefile'))
++
++ call delete('Xrenamedir2/Xrenamefile')
++ call delete('Xrenamedir2', 'd')
++ endfunc
++
++ func Test_rename_same_dir()
++ call mkdir('Xrenamedir')
++ call writefile(['foo'], 'Xrenamedir/Xrenamefile')
++
++ call assert_equal(0, rename('Xrenamedir', 'Xrenamedir'))
++
++ call assert_equal(['foo'], readfile('Xrenamedir/Xrenamefile'))
++
++ call delete('Xrenamedir/Xrenamefile')
++ call delete('Xrenamedir', 'd')
++ endfunc
++
++ func Test_rename_copy()
++ " Check that when original file can't be deleted, rename()
++ " still succeeds but copies the file.
++ call mkdir('Xrenamedir')
++ call writefile(['foo'], 'Xrenamedir/Xrenamefile')
++ call setfperm('Xrenamedir', 'r-xr-xr-x')
++
++ call assert_equal(0, rename('Xrenamedir/Xrenamefile', 'Xrenamefile'))
++
++ if !has('win32')
++ " On Windows, the source file is removed despite
++ " its directory being made not writable.
++ call assert_equal(['foo'], readfile('Xrenamedir/Xrenamefile'))
++ endif
++ call assert_equal(['foo'], readfile('Xrenamefile'))
++
++ call setfperm('Xrenamedir', 'rwxrwxrwx')
++ call delete('Xrenamedir/Xrenamefile')
++ call delete('Xrenamedir', 'd')
++ call delete('Xrenamefile')
++ endfunc
++
++ func Test_rename_fails()
++ call writefile(['foo'], 'Xrenamefile')
++
++ " Can't rename into a non-existing directory.
++ call assert_notequal(0, rename('Xrenamefile', 'Xdoesnotexist/Xrenamefile'))
++
++ " Can't rename a non-existing file.
++ call assert_notequal(0, rename('Xdoesnotexist', 'Xrenamefile2'))
++ call assert_equal('', glob('Xrenamefile2'))
++
++ " When rename() fails, the destination file should not be deleted.
++ call assert_notequal(0, rename('Xdoesnotexist', 'Xrenamefile'))
++ call assert_equal(['foo'], readfile('Xrenamefile'))
++
++ " Can't rename to en empty file name.
++ call assert_notequal(0, rename('Xrenamefile', ''))
++
++ call assert_fails('call rename("Xrenamefile", [])', 'E730')
++ call assert_fails('call rename(0z, "Xrenamefile")', 'E976')
++
++ call delete('Xrenamefile')
++ endfunc
+*** ../vim-8.1.0985/src/version.c 2019-02-28 06:24:49.788775847 +0100
+--- src/version.c 2019-03-02 06:36:51.203611823 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 986,
+ /**/
+
+--
+This planet has -- or rather had -- a problem, which was this: most
+of the people living on it were unhappy for pretty much of the time.
+Many solutions were suggested for this problem, but most of these
+were largely concerned with the movements of small green pieces of
+paper, which is odd because on the whole it wasn't the small green
+pieces of paper that were unhappy.
+ -- 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.0987 b/data/vim/patches/8.1.0987
new file mode 100644
index 000000000..b4a4f0b33
--- /dev/null
+++ b/data/vim/patches/8.1.0987
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0987
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0987
+Problem: Unnecessary condition in #ifdef.
+Solution: Remove using CYGWIN32. (Ken Takata)
+Files: src/os_unix.h, src/xxd/xxd.c
+
+
+*** ../vim-8.1.0986/src/os_unix.h 2018-12-21 11:48:48.320680492 +0100
+--- src/os_unix.h 2019-03-02 07:11:31.998923994 +0100
+***************
+*** 33,39 ****
+ # include <stdlib.h>
+ #endif
+
+! #if defined(__CYGWIN__) || defined(__CYGWIN32__)
+ # define WIN32UNIX /* Compiling for Win32 using Unix files. */
+ # define BINARY_FILE_IO
+
+--- 33,39 ----
+ # include <stdlib.h>
+ #endif
+
+! #ifdef __CYGWIN__
+ # define WIN32UNIX /* Compiling for Win32 using Unix files. */
+ # define BINARY_FILE_IO
+
+*** ../vim-8.1.0986/src/xxd/xxd.c 2019-01-31 11:00:38.767870492 +0100
+--- src/xxd/xxd.c 2019-03-02 07:11:31.998923994 +0100
+***************
+*** 71,77 ****
+ # define _CRT_SECURE_NO_DEPRECATE
+ # define _CRT_NONSTDC_NO_DEPRECATE
+ #endif
+! #if !defined(CYGWIN) && (defined(CYGWIN32) || defined(__CYGWIN__) || defined(__CYGWIN32__))
+ # define CYGWIN
+ #endif
+
+--- 71,77 ----
+ # define _CRT_SECURE_NO_DEPRECATE
+ # define _CRT_NONSTDC_NO_DEPRECATE
+ #endif
+! #if !defined(CYGWIN) && defined(__CYGWIN__)
+ # define CYGWIN
+ #endif
+
+*** ../vim-8.1.0986/src/version.c 2019-03-02 06:41:34.345330494 +0100
+--- src/version.c 2019-03-02 07:14:29.773705050 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 987,
+ /**/
+
+--
+Tips for aliens in New York: Land anywhere. Central Park, anywhere.
+No one will care or indeed even notice.
+ -- 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.0988 b/data/vim/patches/8.1.0988
new file mode 100644
index 000000000..1f2dc29f9
--- /dev/null
+++ b/data/vim/patches/8.1.0988
@@ -0,0 +1,129 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0988
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0988
+Problem: Deleting a location list buffer breaks location list window
+ functionality.
+Solution: (Yegappan Lakshmanan, closes #4056)
+Files: src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0987/src/quickfix.c 2019-02-10 22:58:58.976414779 +0100
+--- src/quickfix.c 2019-03-02 07:55:18.877241143 +0100
+***************
+*** 3981,3986 ****
+--- 3981,4007 ----
+ }
+
+ /*
++ * Set options for the buffer in the quickfix or location list window.
++ */
++ static void
++ qf_set_cwindow_options(void)
++ {
++ // 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 *)"hide", 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
++ }
++
++ /*
+ * 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.
+***************
+*** 4032,4054 ****
+ // 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 *)"hide", 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
+ // save the number of the new buffer
+ qi->qf_bufnr = curbuf->b_fnum;
+ }
+
+ // 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)
+--- 4053,4068 ----
+ // Create a new quickfix buffer
+ (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, oldwin);
+
+ // save the number of the new buffer
+ qi->qf_bufnr = curbuf->b_fnum;
+ }
+
++ // Set the options for the quickfix buffer/window (if not already done)
++ // Do this even if the quickfix buffer was already present, as an autocmd
++ // might have previously deleted (:bdelete) the quickfix buffer.
++ if (curbuf->b_p_bt[0] != 'q')
++ qf_set_cwindow_options();
++
+ // 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)
+*** ../vim-8.1.0987/src/testdir/test_quickfix.vim 2019-02-10 22:58:58.976414779 +0100
+--- src/testdir/test_quickfix.vim 2019-03-02 07:55:18.877241143 +0100
+***************
+*** 3933,3938 ****
+--- 3933,3948 ----
+ call assert_match(qfbnum . ' h- "\[Location List]"', execute('ls'))
+ call assert_true(bufloaded(qfbnum))
+
++ " After deleting a location list buffer using ":bdelete", opening the
++ " location list window should mark the buffer as a location list buffer.
++ exe "bdelete " . qfbnum
++ lopen
++ call assert_equal("quickfix", &buftype)
++ call assert_equal(1, getwininfo(win_getid(winnr()))[0].loclist)
++ call assert_equal(wid, getloclist(0, {'filewinid' : 0}).filewinid)
++ call assert_false(&swapfile)
++ lclose
++
+ " When the location list is cleared for the window, the buffer should be
+ " removed
+ call setloclist(0, [], 'f')
+*** ../vim-8.1.0987/src/version.c 2019-03-02 07:15:20.217458790 +0100
+--- src/version.c 2019-03-02 07:56:37.372654522 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 988,
+ /**/
+
+--
+What a wonderfully exciting cough! Do you mind if I join you?
+ -- 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.0989 b/data/vim/patches/8.1.0989
new file mode 100644
index 000000000..fbc51331d
--- /dev/null
+++ b/data/vim/patches/8.1.0989
@@ -0,0 +1,533 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0989
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0989
+Problem: Various small code ugliness.
+Solution: Remove pointless NULL checks. Fix function calls. Fix typos.
+ (Dominique Pelle, closes #4060)
+Files: src/buffer.c, src/crypt.c, src/evalfunc.c, src/ex_cmds2.c,
+ src/globals.h, src/gui_gtk_f.c, src/gui_gtk_x11.c, src/gui_mac.c,
+ src/ops.c, src/option.h, src/os_unix.c, src/os_win32.c,
+ src/popupmnu.c, src/regexp.c, src/ui.c, src/version.c
+
+
+*** ../vim-8.1.0988/src/buffer.c 2019-02-16 19:05:07.352324625 +0100
+--- src/buffer.c 2019-03-02 09:59:25.003064488 +0100
+***************
+*** 2163,2173 ****
+ clear_string_option(&buf->b_p_isk);
+ #ifdef FEAT_VARTABS
+ clear_string_option(&buf->b_p_vsts);
+! if (buf->b_p_vsts_nopaste)
+! vim_free(buf->b_p_vsts_nopaste);
+ buf->b_p_vsts_nopaste = NULL;
+! if (buf->b_p_vsts_array)
+! vim_free(buf->b_p_vsts_array);
+ buf->b_p_vsts_array = NULL;
+ clear_string_option(&buf->b_p_vts);
+ VIM_CLEAR(buf->b_p_vts_array);
+--- 2163,2171 ----
+ clear_string_option(&buf->b_p_isk);
+ #ifdef FEAT_VARTABS
+ clear_string_option(&buf->b_p_vsts);
+! vim_free(buf->b_p_vsts_nopaste);
+ buf->b_p_vsts_nopaste = NULL;
+! vim_free(buf->b_p_vsts_array);
+ buf->b_p_vsts_array = NULL;
+ clear_string_option(&buf->b_p_vts);
+ VIM_CLEAR(buf->b_p_vts_array);
+*** ../vim-8.1.0988/src/crypt.c 2019-01-19 17:43:03.401449251 +0100
+--- src/crypt.c 2019-03-02 09:59:25.003064488 +0100
+***************
+*** 42,48 ****
+ /* Optional function pointer for a self-test. */
+ int (* self_test_fn)();
+
+! /* Function pointer for initializing encryption/decription. */
+ void (* init_fn)(cryptstate_T *state, char_u *key,
+ char_u *salt, int salt_len, char_u *seed, int seed_len);
+
+--- 42,48 ----
+ /* Optional function pointer for a self-test. */
+ int (* self_test_fn)();
+
+! // Function pointer for initializing encryption/description.
+ void (* init_fn)(cryptstate_T *state, char_u *key,
+ char_u *salt, int salt_len, char_u *seed, int seed_len);
+
+*** ../vim-8.1.0988/src/evalfunc.c 2019-02-26 17:03:49.841487966 +0100
+--- src/evalfunc.c 2019-03-02 09:59:25.003064488 +0100
+***************
+*** 2451,2457 ****
+ utf8 = (int)tv_get_number_chk(&argvars[1], NULL);
+
+ if (utf8)
+! rettv->vval.v_number = (*utf_ptr2char)(tv_get_string(&argvars[0]));
+ else
+ rettv->vval.v_number = (*mb_ptr2char)(tv_get_string(&argvars[0]));
+ }
+--- 2451,2457 ----
+ utf8 = (int)tv_get_number_chk(&argvars[1], NULL);
+
+ if (utf8)
+! rettv->vval.v_number = utf_ptr2char(tv_get_string(&argvars[0]));
+ else
+ rettv->vval.v_number = (*mb_ptr2char)(tv_get_string(&argvars[0]));
+ }
+***************
+*** 8701,8707 ****
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ utf8 = (int)tv_get_number_chk(&argvars[1], NULL);
+ if (utf8)
+! buf[(*utf_char2bytes)((int)tv_get_number(&argvars[0]), buf)] = NUL;
+ else
+ buf[(*mb_char2bytes)((int)tv_get_number(&argvars[0]), buf)] = NUL;
+ }
+--- 8701,8707 ----
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ utf8 = (int)tv_get_number_chk(&argvars[1], NULL);
+ if (utf8)
+! buf[utf_char2bytes((int)tv_get_number(&argvars[0]), buf)] = NUL;
+ else
+ buf[(*mb_char2bytes)((int)tv_get_number(&argvars[0]), buf)] = NUL;
+ }
+***************
+*** 11647,11653 ****
+
+ rettv->vval.v_number = -1;
+
+! // Sign identifer
+ sign_id = (int)tv_get_number_chk(&argvars[0], &notanum);
+ if (notanum)
+ return;
+--- 11647,11653 ----
+
+ rettv->vval.v_number = -1;
+
+! // Sign identifier
+ sign_id = (int)tv_get_number_chk(&argvars[0], &notanum);
+ if (notanum)
+ return;
+***************
+*** 11699,11705 ****
+
+ rettv->vval.v_number = -1;
+
+! // Sign identifer
+ sign_id = (int)tv_get_number_chk(&argvars[0], &notanum);
+ if (notanum)
+ return;
+--- 11699,11705 ----
+
+ rettv->vval.v_number = -1;
+
+! // Sign identifier
+ sign_id = (int)tv_get_number_chk(&argvars[0], &notanum);
+ if (notanum)
+ return;
+*** ../vim-8.1.0988/src/ex_cmds2.c 2019-02-17 17:44:36.203875545 +0100
+--- src/ex_cmds2.c 2019-03-02 09:59:25.003064488 +0100
+***************
+*** 2380,2386 ****
+
+ goto_tabpage_win(tp, wp);
+
+! /* Paranoia: did autocms wipe out the buffer with changes? */
+ if (!bufref_valid(&bufref))
+ goto theend;
+ goto buf_found;
+--- 2380,2386 ----
+
+ goto_tabpage_win(tp, wp);
+
+! // Paranoia: did autocmd wipe out the buffer with changes?
+ if (!bufref_valid(&bufref))
+ goto theend;
+ goto buf_found;
+*** ../vim-8.1.0988/src/globals.h 2019-02-17 17:44:36.207875527 +0100
+--- src/globals.h 2019-03-02 09:59:25.007064462 +0100
+***************
+*** 426,432 ****
+ # if defined(FEAT_MOUSE_DEC)
+ /*
+ * When the DEC mouse has been pressed but not yet released we enable
+! * automatic querys for the mouse position.
+ */
+ EXTERN int WantQueryMouse INIT(= FALSE);
+ # endif
+--- 426,432 ----
+ # if defined(FEAT_MOUSE_DEC)
+ /*
+ * When the DEC mouse has been pressed but not yet released we enable
+! * automatic queries for the mouse position.
+ */
+ EXTERN int WantQueryMouse INIT(= FALSE);
+ # endif
+*** ../vim-8.1.0988/src/gui_gtk_f.c 2019-02-17 17:44:36.207875527 +0100
+--- src/gui_gtk_f.c 2019-03-02 09:59:25.007064462 +0100
+***************
+*** 561,567 ****
+ * gtk_widget_size_allocate() in advance with a well-posed
+ * allocation for a given child widget in order to set a
+ * certain private GtkWidget variable, called
+! * widget->priv->alloc_need, to the proper value; othewise,
+ * gtk_widget_draw() fails and the relevant scrollbar won't
+ * appear on the screen.
+ *
+--- 561,567 ----
+ * gtk_widget_size_allocate() in advance with a well-posed
+ * allocation for a given child widget in order to set a
+ * certain private GtkWidget variable, called
+! * widget->priv->alloc_need, to the proper value; otherwise,
+ * gtk_widget_draw() fails and the relevant scrollbar won't
+ * appear on the screen.
+ *
+*** ../vim-8.1.0988/src/gui_gtk_x11.c 2019-02-17 17:44:36.211875510 +0100
+--- src/gui_gtk_x11.c 2019-03-02 09:59:25.007064462 +0100
+***************
+*** 7015,7021 ****
+ (double)(MIN(height, SIGN_HEIGHT))) < 1.15)
+ {
+ /* Change the aspect ratio by at most 15% to fill the
+! * available space completly. */
+ height = (double)SIGN_HEIGHT * SIGN_ASPECT / aspect;
+ height = MIN(height, SIGN_HEIGHT);
+ }
+--- 7015,7021 ----
+ (double)(MIN(height, SIGN_HEIGHT))) < 1.15)
+ {
+ /* Change the aspect ratio by at most 15% to fill the
+! * available space completely. */
+ height = (double)SIGN_HEIGHT * SIGN_ASPECT / aspect;
+ height = MIN(height, SIGN_HEIGHT);
+ }
+*** ../vim-8.1.0988/src/gui_mac.c 2019-01-24 15:04:44.674887811 +0100
+--- src/gui_mac.c 2019-03-02 09:59:25.007064462 +0100
+***************
+*** 1342,1351 ****
+ }
+ error = AEInstallEventHandler('KAHL', 'MOD ',
+ NewAEEventHandlerUPP(Handle_KAHL_MOD_AE), 0, false);
+- if (error)
+- {
+- return error;
+- }
+ #endif
+
+ return error;
+--- 1342,1347 ----
+*** ../vim-8.1.0988/src/ops.c 2019-02-15 21:06:05.342289715 +0100
+--- src/ops.c 2019-03-02 09:59:25.007064462 +0100
+***************
+*** 5402,5408 ****
+ 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++;
+--- 5402,5408 ----
+ linenr_T amount = Prenum1;
+
+ // do_addsub() might trigger re-evaluation of 'foldexpr' halfway, when the
+! // buffer is not completely updated yet. Postpone updating folds until before
+ // the call to changed_lines().
+ #ifdef FEAT_FOLDING
+ disable_fold_update++;
+*** ../vim-8.1.0988/src/option.h 2019-02-17 17:44:36.215875493 +0100
+--- src/option.h 2019-03-02 09:59:25.007064462 +0100
+***************
+*** 193,200 ****
+ #define SHM_WRI 'w' /* "[w]" instead of "written" */
+ #define SHM_A "rmfixlnw" /* represented by 'a' flag */
+ #define SHM_WRITE 'W' /* don't use "written" at all */
+! #define SHM_TRUNC 't' /* trunctate file messages */
+! #define SHM_TRUNCALL 'T' /* trunctate all messages */
+ #define SHM_OVER 'o' /* overwrite file messages */
+ #define SHM_OVERALL 'O' /* overwrite more messages */
+ #define SHM_SEARCH 's' /* no search hit bottom messages */
+--- 193,200 ----
+ #define SHM_WRI 'w' /* "[w]" instead of "written" */
+ #define SHM_A "rmfixlnw" /* represented by 'a' flag */
+ #define SHM_WRITE 'W' /* don't use "written" at all */
+! #define SHM_TRUNC 't' /* truncate file messages */
+! #define SHM_TRUNCALL 'T' /* truncate all messages */
+ #define SHM_OVER 'o' /* overwrite file messages */
+ #define SHM_OVERALL 'O' /* overwrite more messages */
+ #define SHM_SEARCH 's' /* no search hit bottom messages */
+*** ../vim-8.1.0988/src/os_unix.c 2019-02-26 17:03:49.845487937 +0100
+--- src/os_unix.c 2019-03-02 09:59:25.007064462 +0100
+***************
+*** 6418,6424 ****
+ int shell_style = STYLE_ECHO;
+ int check_spaces;
+ static int did_find_nul = FALSE;
+! int ampersent = FALSE;
+ /* vimglob() function to define for Posix shell */
+ static char *sh_vimglob_func = "vimglob() { while [ $# -ge 1 ]; do echo \"$1\"; shift; done }; vimglob >";
+
+--- 6418,6424 ----
+ int shell_style = STYLE_ECHO;
+ int check_spaces;
+ static int did_find_nul = FALSE;
+! int ampersand = FALSE;
+ /* vimglob() function to define for Posix shell */
+ static char *sh_vimglob_func = "vimglob() { while [ $# -ge 1 ]; do echo \"$1\"; shift; done }; vimglob >";
+
+***************
+*** 6535,6541 ****
+ --p;
+ if (*p == '&') /* remove trailing '&' */
+ {
+! ampersent = TRUE;
+ *p = ' ';
+ }
+ STRCAT(command, ">");
+--- 6535,6541 ----
+ --p;
+ if (*p == '&') /* remove trailing '&' */
+ {
+! ampersand = TRUE;
+ *p = ' ';
+ }
+ STRCAT(command, ">");
+***************
+*** 6604,6610 ****
+ }
+ if (flags & EW_SILENT)
+ show_shell_mess = FALSE;
+! if (ampersent)
+ STRCAT(command, "&"); /* put the '&' after the redirection */
+
+ /*
+--- 6604,6610 ----
+ }
+ if (flags & EW_SILENT)
+ show_shell_mess = FALSE;
+! if (ampersand)
+ STRCAT(command, "&"); /* put the '&' after the redirection */
+
+ /*
+***************
+*** 6630,6636 ****
+
+ /* When running in the background, give it some time to create the temp
+ * file, but don't wait for it to finish. */
+! if (ampersent)
+ mch_delay(10L, TRUE);
+
+ extra_shell_arg = NULL; /* cleanup */
+--- 6630,6636 ----
+
+ /* When running in the background, give it some time to create the temp
+ * file, but don't wait for it to finish. */
+! if (ampersand)
+ mch_delay(10L, TRUE);
+
+ extra_shell_arg = NULL; /* cleanup */
+*** ../vim-8.1.0988/src/os_win32.c 2019-02-26 17:03:49.845487937 +0100
+--- src/os_win32.c 2019-03-02 09:59:25.011064430 +0100
+***************
+*** 2646,2652 ****
+ 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;
+
+--- 2646,2652 ----
+ if (cterm_normal_bg_color == 0)
+ cterm_normal_bg_color = ((g_attrCurrent >> 4) & 0xf) + 1;
+
+! // Fg and Bg color index number at startup
+ g_color_index_fg = g_attrDefault & 0xf;
+ g_color_index_bg = (g_attrDefault >> 4) & 0xf;
+
+***************
+*** 4210,4217 ****
+ (LPSTARTUPINFOW)si, /* Startup information */
+ pi); /* Process information */
+ vim_free(wcmd);
+! if (wcwd != NULL)
+! vim_free(wcwd);
+ return ret;
+ }
+ fallback:
+--- 4210,4216 ----
+ (LPSTARTUPINFOW)si, /* Startup information */
+ pi); /* Process information */
+ vim_free(wcmd);
+! vim_free(wcwd);
+ return ret;
+ }
+ fallback:
+***************
+*** 5312,5319 ****
+ *((WCHAR*)gap->ga_data + gap->ga_len++) = wval[n];
+ *((WCHAR*)gap->ga_data + gap->ga_len++) = L'\0';
+ }
+! if (wkey != NULL) vim_free(wkey);
+! if (wval != NULL) vim_free(wval);
+ }
+ }
+ }
+--- 5311,5318 ----
+ *((WCHAR*)gap->ga_data + gap->ga_len++) = wval[n];
+ *((WCHAR*)gap->ga_data + gap->ga_len++) = L'\0';
+ }
+! vim_free(wkey);
+! vim_free(wval);
+ }
+ }
+ }
+*** ../vim-8.1.0988/src/popupmnu.c 2019-01-30 21:40:58.943219829 +0100
+--- src/popupmnu.c 2019-03-02 09:59:25.011064430 +0100
+***************
+*** 405,411 ****
+ char_u *p = NULL;
+ int totwidth, width, w;
+ int thumb_pos = 0;
+! int thumb_heigth = 1;
+ int round;
+ int n;
+
+--- 405,411 ----
+ char_u *p = NULL;
+ int totwidth, width, w;
+ int thumb_pos = 0;
+! int thumb_height = 1;
+ int round;
+ int n;
+
+***************
+*** 423,432 ****
+
+ if (pum_scrollbar)
+ {
+! thumb_heigth = pum_height * pum_height / pum_size;
+! if (thumb_heigth == 0)
+! thumb_heigth = 1;
+! thumb_pos = (pum_first * (pum_height - thumb_heigth)
+ + (pum_size - pum_height) / 2)
+ / (pum_size - pum_height);
+ }
+--- 423,432 ----
+
+ if (pum_scrollbar)
+ {
+! thumb_height = pum_height * pum_height / pum_size;
+! if (thumb_height == 0)
+! thumb_height = 1;
+! thumb_pos = (pum_first * (pum_height - thumb_height)
+ + (pum_size - pum_height) / 2)
+ / (pum_size - pum_height);
+ }
+***************
+*** 600,611 ****
+ #ifdef FEAT_RIGHTLEFT
+ if (curwin->w_p_rl)
+ screen_putchar(' ', row, pum_col - pum_width,
+! i >= thumb_pos && i < thumb_pos + thumb_heigth
+ ? attr_thumb : attr_scroll);
+ else
+ #endif
+ screen_putchar(' ', row, pum_col + pum_width,
+! i >= thumb_pos && i < thumb_pos + thumb_heigth
+ ? attr_thumb : attr_scroll);
+ }
+
+--- 600,611 ----
+ #ifdef FEAT_RIGHTLEFT
+ if (curwin->w_p_rl)
+ screen_putchar(' ', row, pum_col - pum_width,
+! i >= thumb_pos && i < thumb_pos + thumb_height
+ ? attr_thumb : attr_scroll);
+ else
+ #endif
+ screen_putchar(' ', row, pum_col + pum_width,
+! i >= thumb_pos && i < thumb_pos + thumb_height
+ ? attr_thumb : attr_scroll);
+ }
+
+*** ../vim-8.1.0988/src/regexp.c 2019-02-28 06:24:49.788775847 +0100
+--- src/regexp.c 2019-03-02 09:59:25.011064430 +0100
+***************
+*** 6457,6463 ****
+ }
+ else if (op == RE_LNUM || op == RE_COL || op == RE_VCOL)
+ {
+! /* one int plus comperator */
+ fprintf(f, " count %ld", OPERAND_MIN(s));
+ s += 5;
+ }
+--- 6457,6463 ----
+ }
+ else if (op == RE_LNUM || op == RE_COL || op == RE_VCOL)
+ {
+! /* one int plus comparator */
+ fprintf(f, " count %ld", OPERAND_MIN(s));
+ s += 5;
+ }
+*** ../vim-8.1.0988/src/ui.c 2019-02-17 17:44:36.223875455 +0100
+--- src/ui.c 2019-03-02 09:59:25.011064430 +0100
+***************
+*** 1738,1744 ****
+ if (!clip_did_set_selection)
+ {
+ /* Updating postponed, so that accessing the system clipboard won't
+! * hang Vim when accessing it many times (e.g. on a :g comand). */
+ if ((cbd == &clip_plus && (clip_unnamed_saved & CLIP_UNNAMED_PLUS))
+ || (cbd == &clip_star && (clip_unnamed_saved & CLIP_UNNAMED)))
+ {
+--- 1738,1744 ----
+ if (!clip_did_set_selection)
+ {
+ /* Updating postponed, so that accessing the system clipboard won't
+! * hang Vim when accessing it many times (e.g. on a :g command). */
+ if ((cbd == &clip_plus && (clip_unnamed_saved & CLIP_UNNAMED_PLUS))
+ || (cbd == &clip_star && (clip_unnamed_saved & CLIP_UNNAMED)))
+ {
+*** ../vim-8.1.0988/src/version.c 2019-03-02 07:57:12.236395037 +0100
+--- src/version.c 2019-03-02 10:00:49.182459575 +0100
+***************
+*** 41,47 ****
+ {
+ /*
+ * Construct the long version string. Necessary because
+! * VAX C can't catenate strings in the preprocessor.
+ */
+ strcpy(longVersion, VIM_VERSION_LONG_DATE);
+ strcat(longVersion, __DATE__);
+--- 41,47 ----
+ {
+ /*
+ * Construct the long version string. Necessary because
+! * VAX C can't concatenate strings in the preprocessor.
+ */
+ strcpy(longVersion, VIM_VERSION_LONG_DATE);
+ strcat(longVersion, __DATE__);
+*** ../vim-8.1.0988/src/version.c 2019-03-02 07:57:12.236395037 +0100
+--- src/version.c 2019-03-02 10:00:49.182459575 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 989,
+ /**/
+
+--
+Due knot trussed yore spell chequer two fined awl miss steaks.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0990 b/data/vim/patches/8.1.0990
new file mode 100644
index 000000000..14269031c
--- /dev/null
+++ b/data/vim/patches/8.1.0990
@@ -0,0 +1,221 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0990
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0990
+Problem: Floating point exception with "%= 0" and "/= 0".
+Solution: Avoid dividing by zero. (Dominique Pelle, closes #4058)
+Files: src/eval.c, src/testdir/test_vimscript.vim
+
+
+*** ../vim-8.1.0989/src/eval.c 2019-02-20 22:04:28.823721308 +0100
+--- src/eval.c 2019-03-02 11:55:06.947996350 +0100
+***************
+*** 253,258 ****
+--- 253,291 ----
+ /* for VIM_VERSION_ defines */
+ #include "version.h"
+
++ /*
++ * Return "n1" divided by "n2", taking care of dividing by zero.
++ */
++ static varnumber_T
++ num_divide(varnumber_T n1, varnumber_T n2)
++ {
++ varnumber_T result;
++
++ if (n2 == 0) // give an error message?
++ {
++ if (n1 == 0)
++ result = VARNUM_MIN; // similar to NaN
++ else if (n1 < 0)
++ result = -VARNUM_MAX;
++ else
++ result = VARNUM_MAX;
++ }
++ else
++ result = n1 / n2;
++
++ return result;
++ }
++
++ /*
++ * Return "n1" modulus "n2", taking care of dividing by zero.
++ */
++ static varnumber_T
++ num_modulus(varnumber_T n1, varnumber_T n2)
++ {
++ // Give an error when n2 is 0?
++ return (n2 == 0) ? 0 : (n1 % n2);
++ }
++
+
+ #if defined(EBCDIC) || defined(PROTO)
+ /*
+***************
+*** 1758,1765 ****
+ case '+': n = numval + n; break;
+ case '-': n = numval - n; break;
+ case '*': n = numval * n; break;
+! case '/': n = numval / n; break;
+! case '%': n = numval % n; break;
+ }
+ }
+ else if (opt_type == 0 && stringval != NULL) // string
+--- 1791,1798 ----
+ case '+': n = numval + n; break;
+ case '-': n = numval - n; break;
+ case '*': n = numval * n; break;
+! case '/': n = (long)num_divide(numval, n); break;
+! case '%': n = (long)num_modulus(numval, n); break;
+ }
+ }
+ else if (opt_type == 0 && stringval != NULL) // string
+***************
+*** 2538,2545 ****
+ case '+': n += tv_get_number(tv2); break;
+ case '-': n -= tv_get_number(tv2); break;
+ case '*': n *= tv_get_number(tv2); break;
+! case '/': n /= tv_get_number(tv2); break;
+! case '%': n %= tv_get_number(tv2); break;
+ }
+ clear_tv(tv1);
+ tv1->v_type = VAR_NUMBER;
+--- 2571,2578 ----
+ case '+': n += tv_get_number(tv2); break;
+ case '-': n -= tv_get_number(tv2); break;
+ case '*': n *= tv_get_number(tv2); break;
+! case '/': n = num_divide(n, tv_get_number(tv2)); break;
+! case '%': n = num_modulus(n, tv_get_number(tv2)); break;
+ }
+ clear_tv(tv1);
+ tv1->v_type = VAR_NUMBER;
+***************
+*** 4113,4138 ****
+ if (op == '*')
+ n1 = n1 * n2;
+ else if (op == '/')
+! {
+! if (n2 == 0) /* give an error message? */
+! {
+! if (n1 == 0)
+! n1 = VARNUM_MIN; /* similar to NaN */
+! else if (n1 < 0)
+! n1 = -VARNUM_MAX;
+! else
+! n1 = VARNUM_MAX;
+! }
+! else
+! n1 = n1 / n2;
+! }
+ else
+! {
+! if (n2 == 0) /* give an error message? */
+! n1 = 0;
+! else
+! n1 = n1 % n2;
+! }
+ rettv->v_type = VAR_NUMBER;
+ rettv->vval.v_number = n1;
+ }
+--- 4146,4155 ----
+ if (op == '*')
+ n1 = n1 * n2;
+ else if (op == '/')
+! n1 = num_divide(n1, n2);
+ else
+! n1 = num_modulus(n1, n2);
+!
+ rettv->v_type = VAR_NUMBER;
+ rettv->vval.v_number = n1;
+ }
+*** ../vim-8.1.0989/src/testdir/test_vimscript.vim 2019-02-12 22:28:27.845232664 +0100
+--- src/testdir/test_vimscript.vim 2019-03-02 11:49:05.814627589 +0100
+***************
+*** 21,27 ****
+ "
+ " Create a script that consists of the body of the function a:funcname.
+ " Replace any ":return" by a ":finish", any argument variable by a global
+! " variable, and and every ":call" by a ":source" for the next following argument
+ " in the variable argument list. This function is useful if similar tests are
+ " to be made for a ":return" from a function call or a ":finish" in a script
+ " file.
+--- 21,27 ----
+ "
+ " Create a script that consists of the body of the function a:funcname.
+ " Replace any ":return" by a ":finish", any argument variable by a global
+! " variable, and every ":call" by a ":source" for the next following argument
+ " in the variable argument list. This function is useful if similar tests are
+ " to be made for a ":return" from a function call or a ":finish" in a script
+ " file.
+***************
+*** 1457,1462 ****
+--- 1457,1499 ----
+ let x .= 'n'
+ call assert_equal('2n', x)
+
++ " Test special cases: division or modulus with 0.
++ let x = 1
++ let x /= 0
++ if has('num64')
++ call assert_equal(0x7FFFFFFFFFFFFFFF, x)
++ else
++ call assert_equal(0x7fffffff, x)
++ endif
++
++ let x = -1
++ let x /= 0
++ if has('num64')
++ call assert_equal(-0x7FFFFFFFFFFFFFFF, x)
++ else
++ call assert_equal(-0x7fffffff, x)
++ endif
++
++ let x = 0
++ let x /= 0
++ if has('num64')
++ call assert_equal(-0x7FFFFFFFFFFFFFFF - 1, x)
++ else
++ call assert_equal(-0x7FFFFFFF - 1, x)
++ endif
++
++ let x = 1
++ let x %= 0
++ call assert_equal(0, x)
++
++ let x = -1
++ let x %= 0
++ call assert_equal(0, x)
++
++ let x = 0
++ let x %= 0
++ call assert_equal(0, x)
++
+ " Test for string
+ let x = 'str'
+ let x .= 'ing'
+*** ../vim-8.1.0989/src/version.c 2019-03-02 10:13:36.800974804 +0100
+--- src/version.c 2019-03-02 11:51:59.125366185 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 990,
+ /**/
+
+--
+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.0991 b/data/vim/patches/8.1.0991
new file mode 100644
index 000000000..2bdad5f40
--- /dev/null
+++ b/data/vim/patches/8.1.0991
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0991
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0991
+Problem: Cannot build with FEAT_EVAL defined and FEAT_SEARCH_EXTRA
+ undefined, and with FEAT_DIFF defined and FEAT_EVAL undefined.
+Solution: Add a couple of #ifdefs. (closes #4067)
+Files: src/diff.c, src/search.c
+
+
+*** ../vim-8.1.0990/src/diff.c 2019-02-19 23:00:19.568664524 +0100
+--- src/diff.c 2019-03-03 14:39:58.327049083 +0100
+***************
+*** 866,872 ****
+ int
+ diff_internal(void)
+ {
+! return (diff_flags & DIFF_INTERNAL) != 0 && *p_dex == NUL;
+ }
+
+ /*
+--- 866,876 ----
+ int
+ diff_internal(void)
+ {
+! return (diff_flags & DIFF_INTERNAL) != 0
+! #ifdef FEAT_EVAL
+! && *p_dex == NUL
+! #endif
+! ;
+ }
+
+ /*
+*** ../vim-8.1.0990/src/search.c 2019-02-22 15:04:09.714683845 +0100
+--- src/search.c 2019-03-03 14:40:31.510802007 +0100
+***************
+*** 567,573 ****
+--- 567,575 ----
+ saved_spats[idx].pat = NULL;
+ else
+ saved_spats[idx].pat = vim_strsave(spats[idx].pat);
++ # ifdef FEAT_SEARCH_EXTRA
+ saved_spats_last_idx = last_idx;
++ # endif
+ }
+ # ifdef FEAT_SEARCH_EXTRA
+ /* If 'hlsearch' set and search pat changed: need redraw. */
+*** ../vim-8.1.0990/src/version.c 2019-03-02 11:57:06.159125888 +0100
+--- src/version.c 2019-03-03 14:39:03.215460299 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 991,
+ /**/
+
+--
+Q. What happens to programmers when they die?
+A: MS-Windows programmers are reinstalled. C++ programmers become undefined,
+ anyone who refers to them will die as well. Java programmers reincarnate
+ after being garbage collected, unless they are in permgen, in which case
+ they become zombies. Zimbu programmers leave a stack trace that tells us
+ exactly where they died and how they got there.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0992 b/data/vim/patches/8.1.0992
new file mode 100644
index 000000000..c0bcddbe5
--- /dev/null
+++ b/data/vim/patches/8.1.0992
@@ -0,0 +1,129 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0992
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0992
+Problem: A :normal command while executing a register resets the
+ reg_executing() result.
+Solution: Save and restore reg_executing. (closes #4066)
+Files: src/ex_docmd.c, src/structs.h, src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0991/src/ex_docmd.c 2019-02-17 17:44:36.203875545 +0100
+--- src/ex_docmd.c 2019-03-04 11:25:11.856705429 +0100
+***************
+*** 10260,10265 ****
+--- 10260,10266 ----
+ sst->save_insertmode = p_im;
+ sst->save_finish_op = finish_op;
+ sst->save_opcount = opcount;
++ sst->save_reg_executing = reg_executing;
+
+ msg_scroll = FALSE; /* no msg scrolling in Normal mode */
+ restart_edit = 0; /* don't go to Insert mode */
+***************
+*** 10285,10290 ****
+--- 10286,10292 ----
+ p_im = sst->save_insertmode;
+ finish_op = sst->save_finish_op;
+ opcount = sst->save_opcount;
++ reg_executing = sst->save_reg_executing;
+ msg_didout |= sst->save_msg_didout; /* don't reset msg_didout now */
+
+ /* Restore the state (needed when called from a function executed for
+*** ../vim-8.1.0991/src/structs.h 2019-02-17 17:44:36.219875473 +0100
+--- src/structs.h 2019-03-04 11:27:37.271660673 +0100
+***************
+*** 2625,2643 ****
+ */
+ struct frame_S
+ {
+! char fr_layout; /* FR_LEAF, FR_COL or FR_ROW */
+ int fr_width;
+! int fr_newwidth; /* new width used in win_equal_rec() */
+ int fr_height;
+! int fr_newheight; /* new height used in win_equal_rec() */
+! frame_T *fr_parent; /* containing frame or NULL */
+! frame_T *fr_next; /* frame right or below in same parent, NULL
+! for first */
+! frame_T *fr_prev; /* frame left or above in same parent, NULL
+! for last */
+! /* fr_child and fr_win are mutually exclusive */
+! frame_T *fr_child; /* first contained frame */
+! win_T *fr_win; /* window that fills this frame */
+ };
+
+ #define FR_LEAF 0 /* frame is a leaf */
+--- 2625,2643 ----
+ */
+ struct frame_S
+ {
+! char fr_layout; // FR_LEAF, FR_COL or FR_ROW
+ int fr_width;
+! int fr_newwidth; // new width used in win_equal_rec()
+ int fr_height;
+! int fr_newheight; // new height used in win_equal_rec()
+! frame_T *fr_parent; // containing frame or NULL
+! frame_T *fr_next; // frame right or below in same parent, NULL
+! // for last
+! frame_T *fr_prev; // frame left or above in same parent, NULL
+! // for first
+! // fr_child and fr_win are mutually exclusive
+! frame_T *fr_child; // first contained frame
+! win_T *fr_win; // window that fills this frame
+ };
+
+ #define FR_LEAF 0 /* frame is a leaf */
+***************
+*** 3527,3532 ****
+--- 3527,3533 ----
+ int save_insertmode;
+ int save_finish_op;
+ int save_opcount;
++ int save_reg_executing;
+ tasave_T tabuf;
+ } save_state_T;
+
+*** ../vim-8.1.0991/src/testdir/test_functions.vim 2019-02-10 23:18:49.038187525 +0100
+--- src/testdir/test_functions.vim 2019-03-04 11:37:13.379506401 +0100
+***************
+*** 1137,1142 ****
+--- 1137,1151 ----
+ call feedkeys("q\"\"=s:save_reg_stat()\<CR>pq", 'xt')
+ call assert_equal('":', s:reg_stat)
+
++ " :normal command saves and restores reg_executing
++ let @q = ":call TestFunc()\<CR>:call s:save_reg_stat()\<CR>"
++ func TestFunc() abort
++ normal! ia
++ endfunc
++ call feedkeys("@q", 'xt')
++ call assert_equal(':q', s:reg_stat)
++ delfunc TestFunc
++
+ bwipe!
+ delfunc s:save_reg_stat
+ unlet s:reg_stat
+*** ../vim-8.1.0991/src/version.c 2019-03-03 14:42:04.782109771 +0100
+--- src/version.c 2019-03-04 11:38:16.315045207 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 992,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+34. You laugh at people with a 10 Mbit connection.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0993 b/data/vim/patches/8.1.0993
new file mode 100644
index 000000000..a214f4c23
--- /dev/null
+++ b/data/vim/patches/8.1.0993
@@ -0,0 +1,271 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0993
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0993
+Problem: ch_read() may return garbage if terminating NL is missing.
+Solution: Add terminating NUL. (Ozaki Kiichi, closes #4065)
+Files: src/channel.c, src/testdir/test_channel.vim
+
+
+*** ../vim-8.1.0992/src/channel.c 2019-02-20 22:45:01.723613804 +0100
+--- src/channel.c 2019-03-04 12:04:42.771564943 +0100
+***************
+*** 1797,1802 ****
+--- 1797,1803 ----
+
+ mch_memmove(buf, buf + len, node->rq_buflen - len);
+ node->rq_buflen -= len;
++ node->rq_buffer[node->rq_buflen] = NUL;
+ }
+
+ /*
+***************
+*** 1819,1825 ****
+ return FAIL;
+
+ last_node = node->rq_next;
+! len = node->rq_buflen + last_node->rq_buflen + 1;
+ if (want_nl)
+ while (last_node->rq_next != NULL
+ && channel_first_nl(last_node) == NULL)
+--- 1820,1826 ----
+ return FAIL;
+
+ last_node = node->rq_next;
+! len = node->rq_buflen + last_node->rq_buflen;
+ if (want_nl)
+ while (last_node->rq_next != NULL
+ && channel_first_nl(last_node) == NULL)
+***************
+*** 1828,1834 ****
+ len += last_node->rq_buflen;
+ }
+
+! p = newbuf = alloc(len);
+ if (newbuf == NULL)
+ return FAIL; /* out of memory */
+ mch_memmove(p, node->rq_buffer, node->rq_buflen);
+--- 1829,1835 ----
+ len += last_node->rq_buflen;
+ }
+
+! p = newbuf = alloc(len + 1);
+ if (newbuf == NULL)
+ return FAIL; /* out of memory */
+ mch_memmove(p, node->rq_buffer, node->rq_buflen);
+***************
+*** 1842,1847 ****
+--- 1843,1849 ----
+ p += n->rq_buflen;
+ vim_free(n->rq_buffer);
+ }
++ *p = NUL;
+ node->rq_buflen = (long_u)(p - newbuf);
+
+ /* dispose of the collapsed nodes and their buffers */
+***************
+*** 2666,2695 ****
+ }
+ buf = node->rq_buffer;
+
+! if (nl == NULL)
+! {
+! /* Flush remaining message that is missing a NL. */
+! char_u *new_buf;
+!
+! new_buf = vim_realloc(buf, node->rq_buflen + 1);
+! if (new_buf == NULL)
+! /* This might fail over and over again, should the message
+! * be dropped? */
+! return FALSE;
+! buf = new_buf;
+! node->rq_buffer = buf;
+! nl = buf + node->rq_buflen++;
+! *nl = NUL;
+! }
+!
+! /* Convert NUL to NL, the internal representation. */
+! for (p = buf; p < nl && p < buf + node->rq_buflen; ++p)
+ if (*p == NUL)
+ *p = NL;
+
+! if (nl + 1 == buf + node->rq_buflen)
+ {
+! /* get the whole buffer, drop the NL */
+ msg = channel_get(channel, part, NULL);
+ *nl = NUL;
+ }
+--- 2668,2687 ----
+ }
+ buf = node->rq_buffer;
+
+! // Convert NUL to NL, the internal representation.
+! for (p = buf; (nl == NULL || p < nl)
+! && p < buf + node->rq_buflen; ++p)
+ if (*p == NUL)
+ *p = NL;
+
+! if (nl == NULL)
+! {
+! // get the whole buffer, drop the NL
+! msg = channel_get(channel, part, NULL);
+! }
+! else if (nl + 1 == buf + node->rq_buflen)
+ {
+! // get the whole buffer
+ msg = channel_get(channel, part, NULL);
+ *nl = NUL;
+ }
+*** ../vim-8.1.0992/src/testdir/test_channel.vim 2019-02-11 22:00:07.671917613 +0100
+--- src/testdir/test_channel.vim 2019-03-04 12:01:07.813113919 +0100
+***************
+*** 203,210 ****
+ let start = reltime()
+ call assert_equal(v:none, ch_read(handle, {'timeout': 333}))
+ let elapsed = reltime(start)
+! call assert_true(reltimefloat(elapsed) > 0.3)
+! call assert_true(reltimefloat(elapsed) < 0.6)
+
+ " Send without waiting for a response, then wait for a response.
+ call ch_sendexpr(handle, 'wait a bit')
+--- 203,209 ----
+ let start = reltime()
+ call assert_equal(v:none, ch_read(handle, {'timeout': 333}))
+ let elapsed = reltime(start)
+! call assert_inrange(0.3, 0.6, reltimefloat(reltime(start)))
+
+ " Send without waiting for a response, then wait for a response.
+ call ch_sendexpr(handle, 'wait a bit')
+***************
+*** 434,442 ****
+ else
+ " Failed connection should wait about 500 msec. Can be longer if the
+ " computer is busy with other things.
+! let elapsed = reltime(start)
+! call assert_true(reltimefloat(elapsed) > 0.3)
+! call assert_true(reltimefloat(elapsed) < 1.5)
+ endif
+ catch
+ if v:exception !~ 'Connection reset by peer'
+--- 433,439 ----
+ else
+ " Failed connection should wait about 500 msec. Can be longer if the
+ " computer is busy with other things.
+! call assert_inrange(0.3, 1.5, reltimefloat(reltime(start)))
+ endif
+ catch
+ if v:exception !~ 'Connection reset by peer'
+***************
+*** 1590,1597 ****
+ else
+ let elapsed = 1.0
+ endif
+! call assert_true(elapsed > 0.5)
+! call assert_true(elapsed < 1.0)
+ endfunc
+
+ """""""""
+--- 1587,1593 ----
+ else
+ let elapsed = 1.0
+ endif
+! call assert_inrange(0.5, 1.0, elapsed)
+ endfunc
+
+ """""""""
+***************
+*** 1764,1773 ****
+ bwipe!
+ endfunc
+
+- func MyLineCountCb(ch, msg)
+- let g:linecount += 1
+- endfunc
+-
+ func Test_read_nonl_line()
+ if !has('job')
+ return
+--- 1760,1765 ----
+***************
+*** 1775,1782 ****
+
+ let g:linecount = 0
+ let arg = 'import sys;sys.stdout.write("1\n2\n3")'
+! call job_start([s:python, '-c', arg], {'callback': 'MyLineCountCb'})
+ call WaitForAssert({-> assert_equal(3, g:linecount)})
+ endfunc
+
+ func Test_read_from_terminated_job()
+--- 1767,1794 ----
+
+ let g:linecount = 0
+ let arg = 'import sys;sys.stdout.write("1\n2\n3")'
+! call job_start([s:python, '-c', arg], {'callback': {-> execute('let g:linecount += 1')}})
+ call WaitForAssert({-> assert_equal(3, g:linecount)})
++ unlet g:linecount
++ endfunc
++
++ func Test_read_nonl_in_close_cb()
++ if !has('job')
++ return
++ endif
++
++ func s:close_cb(ch)
++ while ch_status(a:ch) == 'buffered'
++ let g:out .= ch_read(a:ch)
++ endwhile
++ endfunc
++
++ let g:out = ''
++ let arg = 'import sys;sys.stdout.write("1\n2\n3")'
++ call job_start([s:python, '-c', arg], {'close_cb': function('s:close_cb')})
++ call WaitForAssert({-> assert_equal('123', g:out)})
++ unlet g:out
++ delfunc s:close_cb
+ endfunc
+
+ func Test_read_from_terminated_job()
+***************
+*** 1786,1793 ****
+
+ let g:linecount = 0
+ let arg = 'import os,sys;os.close(1);sys.stderr.write("test\n")'
+! call job_start([s:python, '-c', arg], {'callback': 'MyLineCountCb'})
+ call WaitForAssert({-> assert_equal(1, g:linecount)})
+ endfunc
+
+ func Test_job_start_windows()
+--- 1798,1806 ----
+
+ let g:linecount = 0
+ let arg = 'import os,sys;os.close(1);sys.stderr.write("test\n")'
+! call job_start([s:python, '-c', arg], {'callback': {-> execute('let g:linecount += 1')}})
+ call WaitForAssert({-> assert_equal(1, g:linecount)})
++ unlet g:linecount
+ endfunc
+
+ func Test_job_start_windows()
+*** ../vim-8.1.0992/src/version.c 2019-03-04 11:40:06.274241644 +0100
+--- src/version.c 2019-03-04 12:07:44.178258107 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 993,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+35. Your husband tells you he's had that beard for 2 months.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0994 b/data/vim/patches/8.1.0994
new file mode 100644
index 000000000..766c0de2c
--- /dev/null
+++ b/data/vim/patches/8.1.0994
@@ -0,0 +1,308 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0994
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0994
+Problem: Relative cursor position is not calculated correctly.
+Solution: Always set topline, also when window is one line only.
+ (Robert Webb) Add more info to getwininfo() for testing.
+Files: src/window.c, src/evalfunc.c, runtime/doc/eval.txt,
+ src/testdir/test_window_cmd.vim
+
+
+*** ../vim-8.1.0993/src/window.c 2019-02-22 17:56:02.787842436 +0100
+--- src/window.c 2019-03-04 13:13:19.387148607 +0100
+***************
+*** 5719,5726 ****
+ set_fraction(win_T *wp)
+ {
+ if (wp->w_height > 1)
+ wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT
+! + wp->w_height / 2) / (long)wp->w_height;
+ }
+
+ /*
+--- 5719,5729 ----
+ set_fraction(win_T *wp)
+ {
+ if (wp->w_height > 1)
++ // When cursor is in the first line the percentage is computed as if
++ // it's halfway that line. Thus with two lines it is 25%, with three
++ // lines 17%, etc. Similarly for the last line: 75%, 83%, etc.
+ wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT
+! + FRACTION_MULT / 2) / (long)wp->w_height;
+ }
+
+ /*
+***************
+*** 5770,5777 ****
+ int sline, line_size;
+ int height = wp->w_height;
+
+! /* Don't change w_topline when height is zero. Don't set w_topline when
+! * 'scrollbind' is set and this isn't the current window. */
+ if (height > 0 && (!wp->w_p_scb || wp == curwin))
+ {
+ /*
+--- 5773,5780 ----
+ int sline, line_size;
+ int height = wp->w_height;
+
+! // Don't change w_topline when height is zero. Don't set w_topline when
+! // 'scrollbind' is set and this isn't the current window.
+ if (height > 0 && (!wp->w_p_scb || wp == curwin))
+ {
+ /*
+***************
+*** 5781,5788 ****
+ lnum = wp->w_cursor.lnum;
+ if (lnum < 1) /* can happen when starting up */
+ lnum = 1;
+! wp->w_wrow = ((long)wp->w_fraction * (long)height - 1L
+! + FRACTION_MULT / 2) / FRACTION_MULT;
+ line_size = plines_win_col(wp, lnum, (long)(wp->w_cursor.col)) - 1;
+ sline = wp->w_wrow - line_size;
+
+--- 5784,5791 ----
+ lnum = wp->w_cursor.lnum;
+ if (lnum < 1) /* can happen when starting up */
+ lnum = 1;
+! wp->w_wrow = ((long)wp->w_fraction * (long)height - 1L)
+! / FRACTION_MULT;
+ line_size = plines_win_col(wp, lnum, (long)(wp->w_cursor.col)) - 1;
+ sline = wp->w_wrow - line_size;
+
+***************
+*** 5818,5824 ****
+ --wp->w_wrow;
+ }
+ }
+- set_topline(wp, lnum);
+ }
+ else if (sline > 0)
+ {
+--- 5821,5826 ----
+***************
+*** 5859,5871 ****
+ }
+ else if (sline > 0)
+ {
+! /* First line of file reached, use that as topline. */
+ lnum = 1;
+ wp->w_wrow -= sline;
+ }
+-
+- set_topline(wp, lnum);
+ }
+ }
+
+ if (wp == curwin)
+--- 5861,5872 ----
+ }
+ else if (sline > 0)
+ {
+! // First line of file reached, use that as topline.
+ lnum = 1;
+ wp->w_wrow -= sline;
+ }
+ }
++ set_topline(wp, lnum);
+ }
+
+ if (wp == curwin)
+*** ../vim-8.1.0993/src/evalfunc.c 2019-03-02 10:13:36.792974862 +0100
+--- src/evalfunc.c 2019-03-02 14:10:35.133529737 +0100
+***************
+*** 5762,5767 ****
+--- 5762,5769 ----
+ dict_add_number(dict, "winid", wp->w_id);
+ dict_add_number(dict, "height", wp->w_height);
+ dict_add_number(dict, "winrow", wp->w_winrow + 1);
++ dict_add_number(dict, "topline", wp->w_topline);
++ dict_add_number(dict, "botline", wp->w_botline - 1);
+ #ifdef FEAT_MENU
+ dict_add_number(dict, "winbar", wp->w_winbar_height);
+ #endif
+*** ../vim-8.1.0993/runtime/doc/eval.txt 2019-02-12 22:28:27.841232690 +0100
+--- runtime/doc/eval.txt 2019-03-02 14:09:27.798085747 +0100
+***************
+*** 5195,5200 ****
+--- 5228,5234 ----
+ tab pages is returned.
+
+ Each List item is a Dictionary with the following entries:
++ botline last displayed buffer line
+ bufnr number of buffer in the window
+ height window height (excluding winbar)
+ loclist 1 if showing a location list
+***************
+*** 5204,5209 ****
+--- 5238,5244 ----
+ terminal 1 if a terminal window
+ {only with the +terminal feature}
+ tabnr tab page number
++ topline first displayed buffer line
+ variables a reference to the dictionary with
+ window-local variables
+ width window width
+*** ../vim-8.1.0993/src/testdir/test_window_cmd.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_window_cmd.vim 2019-03-04 13:09:05.308910495 +0100
+***************
+*** 615,618 ****
+--- 615,746 ----
+ delfunc Fun_RenewFile
+ endfunc
+
++ func Test_relative_cursor_position_in_one_line_window()
++ new
++ only
++ call setline(1, range(1, 10000))
++ normal 50%
++ let lnum = getcurpos()[1]
++ split
++ split
++ " make third window take as many lines as possible, other windows will
++ " become one line
++ 3wincmd w
++ for i in range(1, &lines - 6)
++ wincmd +
++ redraw!
++ endfor
++
++ " first and second window should show cursor line
++ let wininfo = getwininfo()
++ call assert_equal(lnum, wininfo[0].topline)
++ call assert_equal(lnum, wininfo[1].topline)
++
++ only!
++ bwipe!
++ endfunc
++
++ func Test_relative_cursor_position_after_move_and_resize()
++ let so_save = &so
++ set so=0
++ enew
++ call setline(1, range(1, 10000))
++ normal 50%
++ split
++ 1wincmd w
++ " Move cursor to first line in window
++ normal H
++ redraw!
++ " Reduce window height to two lines
++ let height = winheight(0)
++ while winheight(0) > 2
++ wincmd -
++ redraw!
++ endwhile
++ " move cursor to second/last line in window
++ normal j
++ " restore previous height
++ while winheight(0) < height
++ wincmd +
++ redraw!
++ endwhile
++ " make window two lines again
++ while winheight(0) > 2
++ wincmd -
++ redraw!
++ endwhile
++
++ " cursor should be at bottom line
++ let info = getwininfo(win_getid())[0]
++ call assert_equal(info.topline + 1, getcurpos()[1])
++
++ only!
++ bwipe!
++ let &so = so_save
++ endfunc
++
++ func Test_relative_cursor_position_after_resize()
++ let so_save = &so
++ set so=0
++ enew
++ call setline(1, range(1, 10000))
++ normal 50%
++ split
++ 1wincmd w
++ let winid1 = win_getid()
++ let info = getwininfo(winid1)[0]
++ " Move cursor to second line in window
++ exe "normal " . (info.topline + 1) . "G"
++ redraw!
++ let lnum = getcurpos()[1]
++
++ " Make the window only two lines high, cursor should end up in top line
++ 2wincmd w
++ exe (info.height - 2) . "wincmd +"
++ redraw!
++ let info = getwininfo(winid1)[0]
++ call assert_equal(lnum, info.topline)
++
++ only!
++ bwipe!
++ let &so = so_save
++ endfunc
++
++ func Test_relative_cursor_second_line_after_resize()
++ let so_save = &so
++ set so=0
++ enew
++ call setline(1, range(1, 10000))
++ normal 50%
++ split
++ 1wincmd w
++ let winid1 = win_getid()
++ let info = getwininfo(winid1)[0]
++
++ " Make the window only two lines high
++ 2wincmd _
++
++ " Move cursor to second line in window
++ normal H
++ normal j
++
++ " Make window size bigger, then back to 2 lines
++ for i in range(1, 10)
++ wincmd +
++ redraw!
++ endfor
++ for i in range(1, 10)
++ wincmd -
++ redraw!
++ endfor
++
++ " cursor should end up in bottom line
++ let info = getwininfo(winid1)[0]
++ call assert_equal(info.topline + 1, getcurpos()[1])
++
++ only!
++ bwipe!
++ let &so = so_save
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.0993/src/version.c 2019-03-04 12:09:43.905395998 +0100
+--- src/version.c 2019-03-04 13:16:17.053913047 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 994,
+ /**/
+
+--
+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.0995 b/data/vim/patches/8.1.0995
new file mode 100644
index 000000000..a0fb83ee4
--- /dev/null
+++ b/data/vim/patches/8.1.0995
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0995
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0995
+Problem: A getchar() call while executing a register resets the
+ reg_executing() result.
+Solution: Save and restore reg_executing. (closes #406
+Files: src/evalfunc.c, src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0994/src/evalfunc.c 2019-03-04 13:18:15.973053562 +0100
+--- src/evalfunc.c 2019-03-05 12:20:59.289230547 +0100
+***************
+*** 4811,4816 ****
+--- 4811,4817 ----
+ {
+ varnumber_T n;
+ int error = FALSE;
++ int save_reg_executing = reg_executing;
+
+ #ifdef MESSAGE_QUEUE
+ // vpeekc() used to check for messages, but that caused problems, invoking
+***************
+*** 4845,4850 ****
+--- 4846,4852 ----
+ }
+ --no_mapping;
+ --allow_keys;
++ reg_executing = save_reg_executing;
+
+ set_vim_var_nr(VV_MOUSE_WIN, 0);
+ set_vim_var_nr(VV_MOUSE_WINID, 0);
+*** ../vim-8.1.0994/src/testdir/test_functions.vim 2019-03-04 11:40:06.274241644 +0100
+--- src/testdir/test_functions.vim 2019-03-05 12:23:17.332290854 +0100
+***************
+*** 1138,1143 ****
+--- 1138,1144 ----
+ call assert_equal('":', s:reg_stat)
+
+ " :normal command saves and restores reg_executing
++ let s:reg_stat = ''
+ let @q = ":call TestFunc()\<CR>:call s:save_reg_stat()\<CR>"
+ func TestFunc() abort
+ normal! ia
+***************
+*** 1146,1151 ****
+--- 1147,1170 ----
+ call assert_equal(':q', s:reg_stat)
+ delfunc TestFunc
+
++ " getchar() command saves and restores reg_executing
++ map W :call TestFunc()<CR>
++ let @q = "W"
++ func TestFunc() abort
++ let g:reg1 = reg_executing()
++ let g:typed = getchar(0)
++ let g:reg2 = reg_executing()
++ endfunc
++ call feedkeys("@qy", 'xt')
++ call assert_equal(char2nr("y"), g:typed)
++ call assert_equal('q', g:reg1)
++ call assert_equal('q', g:reg2)
++ delfunc TestFunc
++ unmap W
++ unlet g:typed
++ unlet g:reg1
++ unlet g:reg2
++
+ bwipe!
+ delfunc s:save_reg_stat
+ unlet s:reg_stat
+*** ../vim-8.1.0994/src/version.c 2019-03-04 13:18:15.977053527 +0100
+--- src/version.c 2019-03-05 12:22:11.840738054 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 995,
+ /**/
+
+--
+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.0996 b/data/vim/patches/8.1.0996
new file mode 100644
index 000000000..97c6cfc6d
--- /dev/null
+++ b/data/vim/patches/8.1.0996
@@ -0,0 +1,102 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0996
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0996 (after 8.1.0994)
+Problem: A few screendump tests fail because of scrolling.
+Solution: Update the screendumps.
+Files: 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.0995/src/testdir/dumps/Test_incsearch_substitute_11.dump 2018-09-16 17:07:40.125853848 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_11.dump 2019-03-05 12:55:43.885114509 +0100
+***************
+*** 2,9 ****
+ |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
+--- 2,9 ----
+ |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| |2| +0&#ffffff0@64
+ |f+0&#ffff4012|o@1| |3| +0&#ffffff0@64
+! |f+0&#ffff4012|o@1| |4| +0&#ffffff0@64
+! |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|1|2|%
+ |:+0&&|%|s|/|.> @64
+*** ../vim-8.1.0995/src/testdir/dumps/Test_incsearch_substitute_12.dump 2018-09-16 17:07:40.125853848 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_12.dump 2019-03-05 12:55:44.929106347 +0100
+***************
+*** 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
+--- 1,9 ----
+! |f+0&#ffffff0|o@1| |2| @64
+ |f|o@1| |3| @64
++ |f|o@1| |4| @64
+ |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @38|1|,|1| @11|T|o|p
+! |f+0&&|o@1| |2| @64
+ |f|o@1| |3| @64
+! |f|o@1| |4| @64
+! |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|1|2|%
+ |:+0&&|%|s|/> @65
+*** ../vim-8.1.0995/src/testdir/dumps/Test_incsearch_substitute_13.dump 2018-09-16 17:07:40.125853848 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_13.dump 2019-03-05 12:55:45.973098189 +0100
+***************
+*** 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
+--- 1,9 ----
+! >f+0&#ffffff0|o@1| |2| @64
+ |f|o@1| |3| @64
+! |f|o@1| |4| @64
+! |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|1|2|%
+! |f+0&&|o@1| |2| @64
+ |f|o@1| |3| @64
+! |f|o@1| |4| @64
+! |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|1|2|%
+ | +0&&@69
+*** ../vim-8.1.0995/src/version.c 2019-03-05 12:24:04.795965374 +0100
+--- src/version.c 2019-03-05 13:21:50.974030654 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 996,
+ /**/
+
+--
+The users that I support would double-click on a landmine to find out
+what happens. -- A system administrator
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0997 b/data/vim/patches/8.1.0997
new file mode 100644
index 000000000..cbc342488
--- /dev/null
+++ b/data/vim/patches/8.1.0997
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0997
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0997
+Problem: Using GUI colors in vim.exe when 'termguicolors' is off.
+Solution: Add condition for 'termguicolors' set. (Ken Takata, closes #4078)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0996/src/os_win32.c 2019-03-02 10:13:36.796974835 +0100
+--- src/os_win32.c 2019-03-07 06:39:34.779317778 +0100
+***************
+*** 7844,7850 ****
+ return;
+
+ id = syn_name2id((char_u *)"Normal");
+! if (id > 0)
+ syn_id2colors(id, &fg, &bg);
+ if (fg == INVALCOLOR)
+ {
+--- 7844,7850 ----
+ return;
+
+ id = syn_name2id((char_u *)"Normal");
+! if (id > 0 && p_tgc)
+ syn_id2colors(id, &fg, &bg);
+ if (fg == INVALCOLOR)
+ {
+*** ../vim-8.1.0996/src/version.c 2019-03-05 13:26:49.752005833 +0100
+--- src/version.c 2019-03-07 06:40:14.999021501 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 997,
+ /**/
+
+--
+Bumper sticker: Honk if you love peace and quiet.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0998 b/data/vim/patches/8.1.0998
new file mode 100644
index 000000000..6ec1ac126
--- /dev/null
+++ b/data/vim/patches/8.1.0998
@@ -0,0 +1,90 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0998
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0998
+Problem: getcurpos() unexpectedly changes "curswant".
+Solution: Save and restore "curswant". (closes #4069)
+Files: src/evalfunc.c, src/testdir/test_visual.vim
+
+
+*** ../vim-8.1.0997/src/evalfunc.c 2019-03-05 12:24:04.795965374 +0100
+--- src/evalfunc.c 2019-03-07 11:22:40.709060946 +0100
+***************
+*** 5474,5482 ****
+--- 5474,5496 ----
+ (varnumber_T)0);
+ if (getcurpos)
+ {
++ int save_set_curswant = curwin->w_set_curswant;
++ colnr_T save_curswant = curwin->w_curswant;
++ colnr_T save_virtcol = curwin->w_virtcol;
++
+ update_curswant();
+ list_append_number(l, curwin->w_curswant == MAXCOL ?
+ (varnumber_T)MAXCOL : (varnumber_T)curwin->w_curswant + 1);
++
++ // Do not change "curswant", as it is unexpected that a get
++ // function has a side effect.
++ if (save_set_curswant)
++ {
++ curwin->w_set_curswant = save_set_curswant;
++ curwin->w_curswant = save_curswant;
++ curwin->w_virtcol = save_virtcol;
++ curwin->w_valid &= ~VALID_VIRTCOL;
++ }
+ }
+ }
+ else
+*** ../vim-8.1.0997/src/testdir/test_visual.vim 2019-01-24 17:59:35.143217444 +0100
+--- src/testdir/test_visual.vim 2019-03-07 11:19:56.382273108 +0100
+***************
+*** 1,8 ****
+ " Tests for various Visual mode.
+- if !has('visual')
+- finish
+- endif
+-
+
+ func Test_block_shift_multibyte()
+ " Uses double-wide character.
+--- 1,4 ----
+***************
+*** 397,399 ****
+--- 393,406 ----
+
+ bwipe!
+ endfunc
++
++ func Test_curswant_not_changed()
++ new
++ call setline(1, ['one', 'two'])
++ au InsertLeave * call getcurpos()
++ call feedkeys("gg0\<C-V>jI123 \<Esc>j", 'xt')
++ call assert_equal([0, 2, 1, 0, 1], getcurpos())
++
++ bwipe!
++ au! InsertLeave
++ endfunc
+*** ../vim-8.1.0997/src/version.c 2019-03-07 06:40:23.950955576 +0100
+--- src/version.c 2019-03-07 11:21:38.637518405 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 998,
+ /**/
+
+--
+Nothing is fool-proof to a sufficiently talented fool.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.0999 b/data/vim/patches/8.1.0999
new file mode 100644
index 000000000..7727bbe03
--- /dev/null
+++ b/data/vim/patches/8.1.0999
@@ -0,0 +1,176 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0999
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0999
+Problem: Use register one too often and not properly tested.
+Solution: Do not always use register one when specifying a register.
+ (closes #4085) Add more tests.
+Files: src/ops.c, src/testdir/test_registers.vim
+
+
+*** ../vim-8.1.0998/src/ops.c 2019-03-02 10:13:36.796974835 +0100
+--- src/ops.c 2019-03-08 09:40:28.698980987 +0100
+***************
+*** 1747,1753 ****
+ struct block_def bd;
+ linenr_T old_lcount = curbuf->b_ml.ml_line_count;
+ int did_yank = FALSE;
+- int orig_regname = oap->regname;
+
+ if (curbuf->b_ml.ml_flags & ML_EMPTY) /* nothing to do */
+ return OK;
+--- 1747,1752 ----
+***************
+*** 1833,1844 ****
+
+ /*
+ * Put deleted text into register 1 and shift number registers if the
+! * delete contains a line break, or when a regname has been specified.
+ * Use the register name from before adjust_clip_reg() may have
+ * changed it.
+ */
+! if (orig_regname != 0 || oap->motion_type == MLINE
+! || oap->line_count > 1 || oap->use_reg_one)
+ {
+ shift_delete_registers();
+ if (op_yank(oap, TRUE, FALSE) == OK)
+--- 1832,1844 ----
+
+ /*
+ * Put deleted text into register 1 and shift number registers if the
+! * delete contains a line break, or when using a specific operator (Vi
+! * compatible)
+ * Use the register name from before adjust_clip_reg() may have
+ * changed it.
+ */
+! if (oap->motion_type == MLINE || oap->line_count > 1
+! || oap->use_reg_one)
+ {
+ shift_delete_registers();
+ if (op_yank(oap, TRUE, FALSE) == OK)
+*** ../vim-8.1.0998/src/testdir/test_registers.vim 2018-05-06 17:30:57.000000000 +0200
+--- src/testdir/test_registers.vim 2019-03-08 09:43:27.357600672 +0100
+***************
+*** 42,48 ****
+ call assert_match('^\n--- Registers ---\n'
+ \ . '"" a\n'
+ \ . '"0 ba\n'
+- \ . '"1 b\n'
+ \ . '"a b\n'
+ \ . '.*'
+ \ . '"- a\n'
+--- 42,47 ----
+***************
+*** 63,65 ****
+--- 62,148 ----
+
+ bwipe!
+ endfunc
++
++ func Test_register_one()
++ " delete a line goes into register one
++ new
++ call setline(1, "one")
++ normal dd
++ call assert_equal("one\n", @1)
++
++ " delete a word does not change register one, does change "-
++ call setline(1, "two")
++ normal de
++ call assert_equal("one\n", @1)
++ call assert_equal("two", @-)
++
++ " delete a word with a register does not change register one
++ call setline(1, "three")
++ normal "ade
++ call assert_equal("three", @a)
++ call assert_equal("one\n", @1)
++
++ " delete a word with register DOES change register one with one of a list of
++ " operators
++ " %
++ call setline(1, ["(12)3"])
++ normal "ad%
++ call assert_equal("(12)", @a)
++ call assert_equal("(12)", @1)
++
++ " (
++ call setline(1, ["first second"])
++ normal $"ad(
++ call assert_equal("first secon", @a)
++ call assert_equal("first secon", @1)
++
++ " )
++ call setline(1, ["First Second."])
++ normal gg0"ad)
++ call assert_equal("First Second.", @a)
++ call assert_equal("First Second.", @1)
++
++ " `
++ call setline(1, ["start here."])
++ normal gg0fhmx0"ad`x
++ call assert_equal("start ", @a)
++ call assert_equal("start ", @1)
++
++ " /
++ call setline(1, ["searchX"])
++ exe "normal gg0\"ad/X\<CR>"
++ call assert_equal("search", @a)
++ call assert_equal("search", @1)
++
++ " ?
++ call setline(1, ["Ysearch"])
++ exe "normal gg$\"ad?Y\<CR>"
++ call assert_equal("Ysearc", @a)
++ call assert_equal("Ysearc", @1)
++
++ " n
++ call setline(1, ["Ynext"])
++ normal gg$"adn
++ call assert_equal("Ynex", @a)
++ call assert_equal("Ynex", @1)
++
++ " N
++ call setline(1, ["prevY"])
++ normal gg0"adN
++ call assert_equal("prev", @a)
++ call assert_equal("prev", @1)
++
++ " }
++ call setline(1, ["one", ""])
++ normal gg0"ad}
++ call assert_equal("one\n", @a)
++ call assert_equal("one\n", @1)
++
++ " {
++ call setline(1, ["", "two"])
++ normal 2G$"ad{
++ call assert_equal("\ntw", @a)
++ call assert_equal("\ntw", @1)
++
++ bwipe!
++ endfunc
+*** ../vim-8.1.0998/src/version.c 2019-03-07 11:25:24.455856096 +0100
+--- src/version.c 2019-03-08 08:00:52.934102877 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 999,
+ /**/
+
+--
+Latest survey shows that 3 out of 4 people make up 75% of the
+world's population.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1000 b/data/vim/patches/8.1.1000
new file mode 100644
index 000000000..2eacb772a
--- /dev/null
+++ b/data/vim/patches/8.1.1000
@@ -0,0 +1,439 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1000
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1000
+Problem: Indenting is off.
+Solution: Make indenting consistent and update comments. (Ozaki Kiichi,
+ closes #4079)
+Files: src/getchar.c, src/ops.c
+
+
+*** ../vim-8.1.0999/src/getchar.c 2019-02-17 17:44:36.207875527 +0100
+--- src/getchar.c 2019-03-09 08:53:59.569644721 +0100
+***************
+*** 1577,1684 ****
+ }
+ else
+ {
+! mod_mask = 0x0;
+! last_recorded_len = 0;
+! for (;;) /* this is done twice if there are modifiers */
+! {
+! int did_inc = FALSE;
+!
+! if (mod_mask
+! #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
+! || im_is_preediting()
+! #endif
+! )
+! {
+! /* no mapping after modifier has been read */
+! ++no_mapping;
+! ++allow_keys;
+! did_inc = TRUE; /* mod_mask may change value */
+! }
+! c = vgetorpeek(TRUE);
+! if (did_inc)
+ {
+! --no_mapping;
+! --allow_keys;
+! }
+
+! /* Get two extra bytes for special keys */
+! if (c == K_SPECIAL
+! #ifdef FEAT_GUI
+! || c == CSI
+ #endif
+! )
+! {
+! int save_allow_keys = allow_keys;
+!
+! ++no_mapping;
+! allow_keys = 0; /* make sure BS is not found */
+! c2 = vgetorpeek(TRUE); /* no mapping for these chars */
+ c = vgetorpeek(TRUE);
+! --no_mapping;
+! allow_keys = save_allow_keys;
+! if (c2 == KS_MODIFIER)
+ {
+! mod_mask = c;
+! continue;
+ }
+- c = TO_SPECIAL(c2, c);
+
+! #if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+! /* Handle K_TEAROFF here, the caller of vgetc() doesn't need to
+! * know that a menu was torn off */
+! if (c == K_TEAROFF)
+ {
+! char_u name[200];
+! int i;
+
+! /* get menu path, it ends with a <CR> */
+! for (i = 0; (c = vgetorpeek(TRUE)) != '\r'; )
+ {
+! name[i] = c;
+! if (i < 199)
+! ++i;
+ }
+- name[i] = NUL;
+- gui_make_tearoff(name);
+- continue;
+- }
+ #endif
+ #if defined(FEAT_GUI) && defined(FEAT_GUI_GTK) && defined(FEAT_MENU)
+! /* GTK: <F10> normally selects the menu, but it's passed until
+! * here to allow mapping it. Intercept and invoke the GTK
+! * behavior if it's not mapped. */
+! if (c == K_F10 && gui.menubar != NULL)
+! {
+! gtk_menu_shell_select_first(GTK_MENU_SHELL(gui.menubar), FALSE);
+! continue;
+! }
+ #endif
+ #ifdef FEAT_GUI
+! /* Handle focus event here, so that the caller doesn't need to
+! * know about it. Return K_IGNORE so that we loop once (needed if
+! * 'lazyredraw' is set). */
+! if (c == K_FOCUSGAINED || c == K_FOCUSLOST)
+! {
+! ui_focus_change(c == K_FOCUSGAINED);
+! c = K_IGNORE;
+! }
+
+! /* Translate K_CSI to CSI. The special key is only used to avoid
+! * it being recognized as the start of a special key. */
+! if (c == K_CSI)
+! c = CSI;
+ #endif
+! }
+! /* a keypad or special function key was not mapped, use it like
+! * 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 MSWIN
+ // Can be either '.' or a ',',
+ // depending on the type of keypad.
+--- 1577,1685 ----
+ }
+ else
+ {
+! mod_mask = 0x0;
+! last_recorded_len = 0;
+! for (;;) // this is done twice if there are modifiers
+ {
+! int did_inc = FALSE;
+
+! if (mod_mask
+! #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
+! || im_is_preediting()
+ #endif
+! )
+! {
+! // no mapping after modifier has been read
+! ++no_mapping;
+! ++allow_keys;
+! did_inc = TRUE; // mod_mask may change value
+! }
+ c = vgetorpeek(TRUE);
+! if (did_inc)
+ {
+! --no_mapping;
+! --allow_keys;
+ }
+
+! // Get two extra bytes for special keys
+! if (c == K_SPECIAL
+! #ifdef FEAT_GUI
+! || c == CSI
+! #endif
+! )
+ {
+! int save_allow_keys = allow_keys;
+
+! ++no_mapping;
+! allow_keys = 0; // make sure BS is not found
+! c2 = vgetorpeek(TRUE); // no mapping for these chars
+! c = vgetorpeek(TRUE);
+! --no_mapping;
+! allow_keys = save_allow_keys;
+! if (c2 == KS_MODIFIER)
+ {
+! mod_mask = c;
+! continue;
+! }
+! c = TO_SPECIAL(c2, c);
+!
+! #if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+! // Handle K_TEAROFF here, the caller of vgetc() doesn't need to
+! // know that a menu was torn off
+! if (c == K_TEAROFF)
+! {
+! char_u name[200];
+! int i;
+!
+! // get menu path, it ends with a <CR>
+! for (i = 0; (c = vgetorpeek(TRUE)) != '\r'; )
+! {
+! name[i] = c;
+! if (i < 199)
+! ++i;
+! }
+! name[i] = NUL;
+! gui_make_tearoff(name);
+! continue;
+ }
+ #endif
+ #if defined(FEAT_GUI) && defined(FEAT_GUI_GTK) && defined(FEAT_MENU)
+! // GTK: <F10> normally selects the menu, but it's passed until
+! // here to allow mapping it. Intercept and invoke the GTK
+! // behavior if it's not mapped.
+! if (c == K_F10 && gui.menubar != NULL)
+! {
+! gtk_menu_shell_select_first(
+! GTK_MENU_SHELL(gui.menubar), FALSE);
+! continue;
+! }
+ #endif
+ #ifdef FEAT_GUI
+! // Handle focus event here, so that the caller doesn't need to
+! // know about it. Return K_IGNORE so that we loop once (needed
+! // if 'lazyredraw' is set).
+! if (c == K_FOCUSGAINED || c == K_FOCUSLOST)
+! {
+! ui_focus_change(c == K_FOCUSGAINED);
+! c = K_IGNORE;
+! }
+
+! // Translate K_CSI to CSI. The special key is only used to
+! // avoid it being recognized as the start of a special key.
+! if (c == K_CSI)
+! c = CSI;
+ #endif
+! }
+! // a keypad or special function key was not mapped, use it like
+! // 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 MSWIN
+ // Can be either '.' or a ',',
+ // depending on the type of keypad.
+***************
+*** 1686,1704 ****
+ #else
+ c = '.'; break;
+ #endif
+! case K_K0: c = '0'; break;
+! case K_K1: c = '1'; break;
+! case K_K2: c = '2'; break;
+! case K_K3: c = '3'; break;
+! case K_K4: c = '4'; break;
+! case K_K5: c = '5'; break;
+! case K_K6: c = '6'; break;
+! case K_K7: c = '7'; break;
+! case K_K8: c = '8'; break;
+! case K_K9: c = '9'; break;
+
+! case K_XHOME:
+! case K_ZHOME: if (mod_mask == MOD_MASK_SHIFT)
+ {
+ c = K_S_HOME;
+ mod_mask = 0;
+--- 1687,1705 ----
+ #else
+ c = '.'; break;
+ #endif
+! case K_K0: c = '0'; break;
+! case K_K1: c = '1'; break;
+! case K_K2: c = '2'; break;
+! case K_K3: c = '3'; break;
+! case K_K4: c = '4'; break;
+! case K_K5: c = '5'; break;
+! case K_K6: c = '6'; break;
+! case K_K7: c = '7'; break;
+! case K_K8: c = '8'; break;
+! case K_K9: c = '9'; break;
+
+! case K_XHOME:
+! case K_ZHOME: if (mod_mask == MOD_MASK_SHIFT)
+ {
+ c = K_S_HOME;
+ mod_mask = 0;
+***************
+*** 1711,1718 ****
+ else
+ c = K_HOME;
+ break;
+! case K_XEND:
+! case K_ZEND: if (mod_mask == MOD_MASK_SHIFT)
+ {
+ c = K_S_END;
+ mod_mask = 0;
+--- 1712,1719 ----
+ else
+ c = K_HOME;
+ break;
+! case K_XEND:
+! case K_ZEND: if (mod_mask == MOD_MASK_SHIFT)
+ {
+ c = K_S_END;
+ mod_mask = 0;
+***************
+*** 1726,1770 ****
+ c = K_END;
+ break;
+
+! case K_XUP: c = K_UP; break;
+! case K_XDOWN: c = K_DOWN; break;
+! case K_XLEFT: c = K_LEFT; break;
+! case K_XRIGHT: c = K_RIGHT; break;
+! }
+
+! /* For a multi-byte character get all the bytes and return the
+! * converted character.
+! * Note: This will loop until enough bytes are received!
+! */
+! if (has_mbyte && (n = MB_BYTE2LEN_CHECK(c)) > 1)
+! {
+! ++no_mapping;
+! buf[0] = c;
+! for (i = 1; i < n; ++i)
+ {
+! buf[i] = vgetorpeek(TRUE);
+! if (buf[i] == K_SPECIAL
+ #ifdef FEAT_GUI
+! || buf[i] == CSI
+ #endif
+! )
+! {
+! /* Must be a K_SPECIAL - KS_SPECIAL - KE_FILLER sequence,
+! * which represents a K_SPECIAL (0x80),
+! * or a CSI - KS_EXTRA - KE_CSI sequence, which represents
+! * a CSI (0x9B),
+! * of a K_SPECIAL - KS_EXTRA - KE_CSI, which is CSI too. */
+! c = vgetorpeek(TRUE);
+! if (vgetorpeek(TRUE) == (int)KE_CSI && c == KS_EXTRA)
+! buf[i] = CSI;
+ }
+ }
+- --no_mapping;
+- c = (*mb_ptr2char)(buf);
+- }
+
+! break;
+! }
+ }
+
+ #ifdef FEAT_EVAL
+--- 1727,1771 ----
+ c = K_END;
+ break;
+
+! case K_XUP: c = K_UP; break;
+! case K_XDOWN: c = K_DOWN; break;
+! case K_XLEFT: c = K_LEFT; break;
+! case K_XRIGHT: c = K_RIGHT; break;
+! }
+
+! // For a multi-byte character get all the bytes and return the
+! // converted character.
+! // Note: This will loop until enough bytes are received!
+! if (has_mbyte && (n = MB_BYTE2LEN_CHECK(c)) > 1)
+ {
+! ++no_mapping;
+! buf[0] = c;
+! for (i = 1; i < n; ++i)
+! {
+! buf[i] = vgetorpeek(TRUE);
+! if (buf[i] == K_SPECIAL
+ #ifdef FEAT_GUI
+! || buf[i] == CSI
+ #endif
+! )
+! {
+! // Must be a K_SPECIAL - KS_SPECIAL - KE_FILLER
+! // sequence, which represents a K_SPECIAL (0x80),
+! // or a CSI - KS_EXTRA - KE_CSI sequence, which
+! // represents a CSI (0x9B),
+! // or a K_SPECIAL - KS_EXTRA - KE_CSI, which is CSI
+! // too.
+! c = vgetorpeek(TRUE);
+! if (vgetorpeek(TRUE) == (int)KE_CSI && c == KS_EXTRA)
+! buf[i] = CSI;
+! }
+ }
++ --no_mapping;
++ c = (*mb_ptr2char)(buf);
+ }
+
+! break;
+! }
+ }
+
+ #ifdef FEAT_EVAL
+*** ../vim-8.1.0999/src/ops.c 2019-03-08 09:50:43.058308765 +0100
+--- src/ops.c 2019-03-09 09:06:12.268015674 +0100
+***************
+*** 1245,1254 ****
+ emsg(_(e_nolastcmd));
+ return FAIL;
+ }
+! VIM_CLEAR(new_last_cmdline); /* don't keep the cmdline containing @: */
+! /* Escape all control characters with a CTRL-V */
+ p = vim_strsave_escaped_ext(last_cmdline,
+! (char_u *)"\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037", Ctrl_V, FALSE);
+ if (p != NULL)
+ {
+ /* When in Visual mode "'<,'>" will be prepended to the command.
+--- 1245,1259 ----
+ emsg(_(e_nolastcmd));
+ return FAIL;
+ }
+! // don't keep the cmdline containing @:
+! VIM_CLEAR(new_last_cmdline);
+! // Escape all control characters with a CTRL-V
+ p = vim_strsave_escaped_ext(last_cmdline,
+! (char_u *)"\001\002\003\004\005\006\007"
+! "\010\011\012\013\014\015\016\017"
+! "\020\021\022\023\024\025\026\027"
+! "\030\031\032\033\034\035\036\037",
+! Ctrl_V, FALSE);
+ if (p != NULL)
+ {
+ /* When in Visual mode "'<,'>" will be prepended to the command.
+*** ../vim-8.1.0999/src/version.c 2019-03-08 09:50:43.062308735 +0100
+--- src/version.c 2019-03-09 09:01:15.642242661 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1000,
+ /**/
+
+--
+I started out with nothing, and I still have most of it.
+ -- Michael Davis -- "Tonight Show"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1001 b/data/vim/patches/8.1.1001
new file mode 100644
index 000000000..ef8b1be23
--- /dev/null
+++ b/data/vim/patches/8.1.1001
@@ -0,0 +1,116 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1001
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1001
+Problem: Visual area not correct when using 'cursorline'.
+Solution: Update w_last_cursorline also in Visual mode. (Hirohito Higashi,
+ closes #4086)
+Files: src/screen.c, src/testdir/test_highlight.vim,
+ src/testdir/dumps/Test_cursorline_with_visualmode_01.dump
+
+
+*** ../vim-8.1.1000/src/screen.c 2019-02-25 05:40:59.171067556 +0100
+--- src/screen.c 2019-03-09 11:42:45.459445530 +0100
+***************
+*** 3704,3717 ****
+ #endif
+
+ #ifdef FEAT_SYN_HL
+! /* Cursor line highlighting for 'cursorline' in the current window. Not
+! * when Visual mode is active, because it's not clear what is selected
+! * then. */
+! if (wp->w_p_cul && lnum == wp->w_cursor.lnum
+! && !(wp == curwin && VIsual_active))
+ {
+! line_attr = HL_ATTR(HLF_CUL);
+! area_highlighting = TRUE;
+ wp->w_last_cursorline = wp->w_cursor.lnum;
+ }
+ #endif
+--- 3704,3719 ----
+ #endif
+
+ #ifdef FEAT_SYN_HL
+! // Cursor line highlighting for 'cursorline' in the current window.
+! if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
+ {
+! // Do not show the cursor line when Visual mode is active, because it's
+! // not clear what is selected then. Do update w_last_cursorline.
+! if (!(wp == curwin && VIsual_active))
+! {
+! line_attr = HL_ATTR(HLF_CUL);
+! area_highlighting = TRUE;
+! }
+ wp->w_last_cursorline = wp->w_cursor.lnum;
+ }
+ #endif
+*** ../vim-8.1.1000/src/testdir/test_highlight.vim 2019-01-30 21:40:58.943219829 +0100
+--- src/testdir/test_highlight.vim 2019-03-09 11:31:13.860508767 +0100
+***************
+*** 552,554 ****
+--- 552,574 ----
+ call StopVimInTerminal(buf)
+ call delete('Xtest_cursorline_yank')
+ endfunc
++
++ func Test_cursorline_with_visualmode()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
++ call writefile([
++ \ 'set cul',
++ \ 'call setline(1, repeat(["abc"], 50))',
++ \ ], 'Xtest_cursorline_with_visualmode')
++ let buf = RunVimInTerminal('-S Xtest_cursorline_with_visualmode', {'rows': 12})
++ call term_wait(buf)
++ call term_sendkeys(buf, "V\<C-f>kkkjk")
++
++ call VerifyScreenDump(buf, 'Test_cursorline_with_visualmode_01', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('Xtest_cursorline_with_visualmode')
++ endfunc
+*** ../vim-8.1.1000/src/testdir/dumps/Test_cursorline_with_visualmode_01.dump 2019-03-09 11:45:20.782315358 +0100
+--- src/testdir/dumps/Test_cursorline_with_visualmode_01.dump 2019-03-09 11:31:13.860508767 +0100
+***************
+*** 0 ****
+--- 1,12 ----
++ |a+0&#e0e0e08|b|c| | +0&#ffffff0@70
++ |a+0&#e0e0e08|b|c| | +0&#ffffff0@70
++ |a+0&#e0e0e08|b|c| | +0&#ffffff0@70
++ |a+0&#e0e0e08|b|c| | +0&#ffffff0@70
++ |a+0&#e0e0e08|b|c| | +0&#ffffff0@70
++ >a|b+0&#e0e0e08|c| | +0&#ffffff0@70
++ |a|b|c| @71
++ |a|b|c| @71
++ |a|b|c| @71
++ |a|b|c| @71
++ |a|b|c| @71
++ |-+2&&@1| |V|I|S|U|A|L| |L|I|N|E| |-@1| +0&&@29|1|2| @7|1|2|,|1| @9|1|5|%|
+*** ../vim-8.1.1000/src/version.c 2019-03-09 11:23:53.215751899 +0100
+--- src/version.c 2019-03-09 11:34:32.823050052 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1001,
+ /**/
+
+--
+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.1002 b/data/vim/patches/8.1.1002
new file mode 100644
index 000000000..c7a1afe56
--- /dev/null
+++ b/data/vim/patches/8.1.1002
@@ -0,0 +1,101 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1002
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1002
+Problem: "gf" does not always work when URL has a port number. (Jakob
+ Schöttl)
+Solution: When a URL is recognized also accept ":". (closes #4082)
+Files: src/findfile.c, src/testdir/test_gf.vim
+
+
+*** ../vim-8.1.1001/src/findfile.c 2019-02-13 22:45:21.508636195 +0100
+--- src/findfile.c 2019-03-09 12:28:08.627614610 +0100
+***************
+*** 2017,2026 ****
+ len = 0;
+ while (vim_isfilec(ptr[len]) || (ptr[len] == '\\' && ptr[len + 1] == ' ')
+ || ((options & FNAME_HYP) && path_is_url(ptr + len))
+! || (is_url && vim_strchr((char_u *)"?&=", ptr[len]) != NULL))
+ {
+! // After type:// we also include ?, & and = as valid characters, so that
+! // http://google.com?q=this&that=ok works.
+ if ((ptr[len] >= 'A' && ptr[len] <= 'Z') || (ptr[len] >= 'a' && ptr[len] <= 'z'))
+ {
+ if (in_type && path_is_url(ptr + len + 1))
+--- 2017,2026 ----
+ len = 0;
+ while (vim_isfilec(ptr[len]) || (ptr[len] == '\\' && ptr[len + 1] == ' ')
+ || ((options & FNAME_HYP) && path_is_url(ptr + len))
+! || (is_url && vim_strchr((char_u *)":?&=", ptr[len]) != NULL))
+ {
+! // After type:// we also include :, ?, & and = as valid characters, so that
+! // http://google.com:8080?q=this&that=ok works.
+ if ((ptr[len] >= 'A' && ptr[len] <= 'Z') || (ptr[len] >= 'a' && ptr[len] <= 'z'))
+ {
+ if (in_type && path_is_url(ptr + len + 1))
+*** ../vim-8.1.1001/src/testdir/test_gf.vim 2017-12-25 14:22:11.000000000 +0100
+--- src/testdir/test_gf.vim 2019-03-09 12:29:00.295238774 +0100
+***************
+*** 9,14 ****
+--- 9,15 ----
+ \ "third test for URL:\\\\machine.name\\vimtest2c and other text",
+ \ "fourth test for URL:\\\\machine.name\\tmp\\vimtest2d, and other text",
+ \ "fifth test for URL://machine.name/tmp?q=vim&opt=yes and other text",
++ \ "sixth test for URL://machine.name:1234?q=vim and other text",
+ \ ])
+ call cursor(1,1)
+ call search("^first")
+***************
+*** 20,26 ****
+ if has("ebcdic")
+ set isf=@,240-249,/,.,-,_,+,,,$,:,~,\
+ else
+! set isf=@,48-57,/,.,-,_,+,,,$,:,~,\
+ endif
+ call search("^third")
+ call search("name")
+--- 21,27 ----
+ if has("ebcdic")
+ set isf=@,240-249,/,.,-,_,+,,,$,:,~,\
+ else
+! set isf=@,48-57,/,.,-,_,+,,,$,~,\
+ endif
+ call search("^third")
+ call search("name")
+***************
+*** 33,38 ****
+--- 34,43 ----
+ call search("URL")
+ call assert_equal("URL://machine.name/tmp?q=vim&opt=yes", expand("<cfile>"))
+
++ call search("^sixth")
++ call search("URL")
++ call assert_equal("URL://machine.name:1234?q=vim", expand("<cfile>"))
++
+ set isf&vim
+ enew!
+ endfunc
+*** ../vim-8.1.1001/src/version.c 2019-03-09 11:45:45.650134366 +0100
+--- src/version.c 2019-03-09 12:31:49.770005496 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1002,
+ /**/
+
+--
+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.1003 b/data/vim/patches/8.1.1003
new file mode 100644
index 000000000..3e3bec803
--- /dev/null
+++ b/data/vim/patches/8.1.1003
@@ -0,0 +1,78 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1003
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1003
+Problem: Playing back recorded key sequence mistakes key code.
+Solution: Insert a <Nop> after the <Esc>. (closes #4068)
+Files: src/getchar.c, src/testdir/test_registers.vim
+
+
+*** ../vim-8.1.1002/src/getchar.c 2019-03-09 11:23:53.211751929 +0100
+--- src/getchar.c 2019-03-09 13:35:15.158641211 +0100
+***************
+*** 2913,2918 ****
+--- 2913,2929 ----
+ if (gui.in_use && shape_changed)
+ gui_update_cursor(TRUE, FALSE);
+ #endif
++ if (timedout && c == ESC)
++ {
++ char_u nop_buf[3];
++
++ // When recording there will be no timeout. Add a <Nop> after the ESC
++ // to avoid that it forms a key code with following characters.
++ nop_buf[0] = K_SPECIAL;
++ nop_buf[1] = KS_EXTRA;
++ nop_buf[2] = KE_NOP;
++ gotchars(nop_buf, 3);
++ }
+
+ --vgetc_busy;
+
+*** ../vim-8.1.1002/src/testdir/test_registers.vim 2019-03-08 09:50:43.058308765 +0100
+--- src/testdir/test_registers.vim 2019-03-09 13:27:34.746145278 +0100
+***************
+*** 146,148 ****
+--- 146,162 ----
+
+ bwipe!
+ endfunc
++
++ " Check that replaying a typed sequence does not use an Esc and following
++ " characters as an escape sequence.
++ func Test_recording_esc_sequence()
++ new
++ let save_F2 = &t_F2
++ let t_F2 = "\<Esc>OQ"
++ call feedkeys("qqiTest\<Esc>", "xt")
++ call feedkeys("OQuirk\<Esc>q", "xt")
++ call feedkeys("Go\<Esc>@q", "xt")
++ call assert_equal(['Quirk', 'Test', 'Quirk', 'Test'], getline(1, 4))
++ bwipe!
++ let t_F2 = save_F2
++ endfunc
+*** ../vim-8.1.1002/src/version.c 2019-03-09 12:32:50.673562149 +0100
+--- src/version.c 2019-03-10 08:30:11.025545447 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1003,
+ /**/
+
+--
+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.1004 b/data/vim/patches/8.1.1004
new file mode 100644
index 000000000..0008d3fdc
--- /dev/null
+++ b/data/vim/patches/8.1.1004
@@ -0,0 +1,50 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1004
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1004
+Problem: Function "luaV_setref()" not covered with tests.
+Solution: Add a test. (Dominique Pelle, closes #4089)
+Files: src/testdir/test_lua.vim
+
+
+*** ../vim-8.1.1003/src/testdir/test_lua.vim 2019-01-01 00:41:50.040176062 +0100
+--- src/testdir/test_lua.vim 2019-03-10 08:23:10.904885380 +0100
+***************
+*** 4,9 ****
+--- 4,14 ----
+ finish
+ endif
+
++ func TearDown()
++ " Run garbage collection after each test to exercise luaV_setref().
++ call test_garbagecollect_now()
++ endfunc
++
+ " Check that switching to another buffer does not trigger ml_get error.
+ func Test_command_new_no_ml_get_error()
+ new
+*** ../vim-8.1.1003/src/version.c 2019-03-10 09:41:46.474817008 +0100
+--- src/version.c 2019-03-10 09:45:14.993360260 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1004,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+44. Your friends no longer send you e-mail...they just log on to your 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.1005 b/data/vim/patches/8.1.1005
new file mode 100644
index 000000000..8a6875513
--- /dev/null
+++ b/data/vim/patches/8.1.1005
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1005
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1005 (after 8.1.1003)
+Problem: Test fails because t_F2 is not set.
+Solution: Add try-catch.
+Files: src/testdir/test_registers.vim
+
+
+*** ../vim-8.1.1004/src/testdir/test_registers.vim 2019-03-10 09:41:46.474817008 +0100
+--- src/testdir/test_registers.vim 2019-03-11 07:54:15.468318601 +0100
+***************
+*** 151,162 ****
+ " characters as an escape sequence.
+ func Test_recording_esc_sequence()
+ new
+! let save_F2 = &t_F2
+ let t_F2 = "\<Esc>OQ"
+ call feedkeys("qqiTest\<Esc>", "xt")
+ call feedkeys("OQuirk\<Esc>q", "xt")
+ call feedkeys("Go\<Esc>@q", "xt")
+ call assert_equal(['Quirk', 'Test', 'Quirk', 'Test'], getline(1, 4))
+ bwipe!
+! let t_F2 = save_F2
+ endfunc
+--- 151,167 ----
+ " characters as an escape sequence.
+ func Test_recording_esc_sequence()
+ new
+! try
+! let save_F2 = &t_F2
+! catch
+! endtry
+ let t_F2 = "\<Esc>OQ"
+ call feedkeys("qqiTest\<Esc>", "xt")
+ call feedkeys("OQuirk\<Esc>q", "xt")
+ call feedkeys("Go\<Esc>@q", "xt")
+ call assert_equal(['Quirk', 'Test', 'Quirk', 'Test'], getline(1, 4))
+ bwipe!
+! if exists('save_F2')
+! let t_F2 = save_F2
+! endif
+ endfunc
+*** ../vim-8.1.1004/src/version.c 2019-03-10 09:48:55.711808501 +0100
+--- src/version.c 2019-03-11 07:55:54.287601232 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1005,
+ /**/
+
+--
+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.1006 b/data/vim/patches/8.1.1006
new file mode 100644
index 000000000..ddc8001b5
--- /dev/null
+++ b/data/vim/patches/8.1.1006
@@ -0,0 +1,730 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1006
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1006
+Problem: Repeated code in quickfix support.
+Solution: Move code to functions. (Yegappan Lakshmanan, closes #4091)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.1006/src/quickfix.c 2019-03-02 07:57:12.236395037 +0100
+--- src/quickfix.c 2019-03-13 06:47:54.581059538 +0100
+***************
+*** 172,178 ****
+ 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 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);
+--- 172,178 ----
+ 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_list_T *qfl, buf_T *buf, qfline_T *old_last);
+ 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);
+***************
+*** 1803,1808 ****
+--- 1803,1817 ----
+ }
+
+ /*
++ * Return a pointer to the current list in the specified quickfix stack
++ */
++ static qf_list_T *
++ qf_get_curlist(qf_info_T *qi)
++ {
++ return &qi->qf_lists[qi->qf_curlist];
++ }
++
++ /*
+ * Prepare for adding a new quickfix list. If the current list is in the
+ * middle of the stack, then all the following lists are freed and then
+ * the new list is added.
+***************
+*** 1830,1836 ****
+ }
+ 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->qfl_type = qi->qfl_type;
+--- 1839,1845 ----
+ }
+ else
+ qi->qf_curlist = qi->qf_listcount++;
+! qfl = qf_get_curlist(qi);
+ vim_memset(qfl, 0, (size_t)(sizeof(qf_list_T)));
+ qf_store_title(qfl, qf_title);
+ qfl->qfl_type = qi->qfl_type;
+***************
+*** 2726,2731 ****
+--- 2735,2750 ----
+ }
+
+ /*
++ * Set the location list for the specified window to 'qi'.
++ */
++ static void
++ win_set_loclist(win_T *wp, qf_info_T *qi)
++ {
++ wp->w_llist = qi;
++ qi->qf_refcount++;
++ }
++
++ /*
+ * Find a help window or open one. If 'newwin' is TRUE, then open a new help
+ * window.
+ */
+***************
+*** 2766,2775 ****
+ // 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++;
+! }
+ }
+
+ if (!p_im)
+--- 2785,2791 ----
+ // 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)
+! win_set_loclist(curwin, qi);
+ }
+
+ if (!p_im)
+***************
+*** 2848,2859 ****
+ 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++;
+! }
+ return OK;
+ }
+
+--- 2864,2872 ----
+ swb_flags = 0;
+ RESET_BINDING(curwin);
+ if (ll_ref != NULL)
+ // The new window should use the location list from the
+ // location list window
+! win_set_loclist(curwin, ll_ref);
+ return OK;
+ }
+
+***************
+*** 2894,2904 ****
+ // 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;
+! if (ll_ref != NULL)
+! ll_ref->qf_refcount++;
+! }
+ }
+
+ /*
+--- 2907,2913 ----
+ // 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_set_loclist(win, ll_ref);
+ }
+
+ /*
+***************
+*** 3022,3028 ****
+ int prev_winid,
+ 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;
+--- 3031,3037 ----
+ int prev_winid,
+ int *opened_window)
+ {
+! qf_list_T *qfl = qf_get_curlist(qi);
+ qfltype_T qfl_type = qfl->qfl_type;
+ int retval = OK;
+ int old_qf_curlist = qi->qf_curlist;
+***************
+*** 3146,3152 ****
+ 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.
+--- 3155,3161 ----
+ if (!msg_scrolled)
+ update_topline_redraw();
+ sprintf((char *)IObuff, _("(%d of %d)%s%s: "), qf_index,
+! qf_get_curlist(qi)->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.
+***************
+*** 3311,3317 ****
+
+ incr_quickfix_busy();
+
+! qfl = &qi->qf_lists[qi->qf_curlist];
+
+ qf_ptr = qfl->qf_ptr;
+ old_qf_ptr = qf_ptr;
+--- 3320,3326 ----
+
+ incr_quickfix_busy();
+
+! qfl = qf_get_curlist(qi);
+
+ qf_ptr = qfl->qf_ptr;
+ old_qf_ptr = qf_ptr;
+***************
+*** 3512,3518 ****
+ emsg(_(e_trailing));
+ return;
+ }
+! qfl = &qi->qf_lists[qi->qf_curlist];
+ if (plus)
+ {
+ i = qfl->qf_index;
+--- 3521,3527 ----
+ emsg(_(e_trailing));
+ return;
+ }
+! qfl = qf_get_curlist(qi);
+ if (plus)
+ {
+ i = qfl->qf_index;
+***************
+*** 3900,3906 ****
+ return;
+ }
+
+! qfl = &qi->qf_lists[qi->qf_curlist];
+
+ // Look for an existing quickfix window.
+ win = qf_find_win(qi);
+--- 3909,3915 ----
+ return;
+ }
+
+! qfl = qf_get_curlist(qi);
+
+ // Look for an existing quickfix window.
+ win = qf_find_win(qi);
+***************
+*** 4120,4133 ****
+ 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();
+
+--- 4129,4142 ----
+ return;
+ }
+
+! qfl = qf_get_curlist(qi);
+ 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(qfl, curbuf, NULL);
+
+ decr_quickfix_busy();
+
+***************
+*** 4195,4201 ****
+ // In the location list window, use the referenced location list
+ qi = wp->w_llist_ref;
+
+! return qi->qf_lists[qi->qf_curlist].qf_index;
+ }
+
+ /*
+--- 4204,4210 ----
+ // In the location list window, use the referenced location list
+ qi = wp->w_llist_ref;
+
+! return qf_get_curlist(qi)->qf_index;
+ }
+
+ /*
+***************
+*** 4208,4214 ****
+ 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.
+--- 4217,4223 ----
+ int old_qf_index) // previous qf_index or zero
+ {
+ win_T *win;
+! int qf_index = qf_get_curlist(qi)->qf_index;
+
+ // Put the cursor on the current error in the quickfix window, so that
+ // it's viewable.
+***************
+*** 4306,4312 ****
+ {
+ curwin_save = curwin;
+ curwin = win;
+! qf_set_title_var(&qi->qf_lists[qi->qf_curlist]);
+ curwin = curwin_save;
+ }
+ }
+--- 4315,4321 ----
+ {
+ curwin_save = curwin;
+ curwin = win;
+! qf_set_title_var(qf_get_curlist(qi));
+ curwin = curwin_save;
+ }
+ }
+***************
+*** 4333,4339 ****
+
+ qf_update_win_titlevar(qi);
+
+! qf_fill_buffer(qi, buf, old_last);
+ ++CHANGEDTICK(buf);
+
+ if (old_last == NULL)
+--- 4342,4348 ----
+
+ qf_update_win_titlevar(qi);
+
+! qf_fill_buffer(qf_get_curlist(qi), buf, old_last);
+ ++CHANGEDTICK(buf);
+
+ if (old_last == NULL)
+***************
+*** 4433,4439 ****
+ * ml_delete() is used and autocommands will be triggered.
+ */
+ static void
+! qf_fill_buffer(qf_info_T *qi, buf_T *buf, qfline_T *old_last)
+ {
+ linenr_T lnum;
+ qfline_T *qfp;
+--- 4442,4448 ----
+ * ml_delete() is used and autocommands will be triggered.
+ */
+ static void
+! qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last)
+ {
+ linenr_T lnum;
+ qfline_T *qfp;
+***************
+*** 4453,4461 ****
+ }
+
+ // 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;
+--- 4462,4469 ----
+ }
+
+ // Check if there is anything to display
+! if (qfl != NULL)
+ {
+ char_u dirname[MAXPATHL];
+
+ *dirname = NUL;
+***************
+*** 4551,4557 ****
+ {
+ int curlist;
+
+! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
+ {
+ curlist = qf_id2nr(qi, save_qfid);
+ if (curlist < 0)
+--- 4559,4565 ----
+ {
+ int curlist;
+
+! if (qf_get_curlist(qi)->qf_id != save_qfid)
+ {
+ curlist = qf_id2nr(qi, save_qfid);
+ if (curlist < 0)
+***************
+*** 4769,4779 ****
+ 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.
+! save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+--- 4777,4787 ----
+ goto cleanup;
+ }
+ if (res >= 0)
+! qf_list_changed(qf_get_curlist(qi));
+
+ // Remember the current quickfix list identifier, so that we can
+ // check for autocommands changing the current quickfix list.
+! save_qfid = qf_get_curlist(qi)->qf_id;
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+***************
+*** 4808,4814 ****
+ 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)
+ {
+--- 4816,4822 ----
+ return 0;
+ }
+
+! qfl = qf_get_curlist(qi);
+ for (i = 0, qfp = qfl->qf_start; i < qfl->qf_count && qfp != NULL;
+ ++i, qfp = qfp->qf_next)
+ {
+***************
+*** 4845,4851 ****
+ return 0;
+ }
+
+! return qi->qf_lists[qi->qf_curlist].qf_index;
+ }
+
+ /*
+--- 4853,4859 ----
+ return 0;
+ }
+
+! return qf_get_curlist(qi)->qf_index;
+ }
+
+ /*
+***************
+*** 4869,4875 ****
+ return 1;
+ }
+
+! qfl = &qi->qf_lists[qi->qf_curlist];
+ qfp = qfl->qf_start;
+
+ // check if the list has valid errors
+--- 4877,4883 ----
+ return 1;
+ }
+
+! qfl = qf_get_curlist(qi);
+ qfp = qfl->qf_start;
+
+ // check if the list has valid errors
+***************
+*** 4985,4991 ****
+ // 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],
+ eap->addr_count > 0 ? (int)eap->line1 : 1,
+ eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo);
+
+--- 4993,4999 ----
+ // 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(qf_get_curlist(qi),
+ eap->addr_count > 0 ? (int)eap->line1 : 1,
+ eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo);
+
+***************
+*** 5114,5121 ****
+ }
+ }
+ 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);
+
+--- 5122,5129 ----
+ }
+ }
+ if (res >= 0)
+! qf_list_changed(qf_get_curlist(qi));
+! save_qfid = qf_get_curlist(qi)->qf_id;
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, NULL, FALSE, curbuf);
+
+***************
+*** 5236,5244 ****
+ }
+
+ /*
+! * Check whether a quickfix/location list valid. Autocmds may remove or change
+! * a quickfix list when vimgrep is running. If the list is not found, create a
+! * new list.
+ */
+ static int
+ vgr_qflist_valid(
+--- 5244,5252 ----
+ }
+
+ /*
+! * Check whether a quickfix/location list is valid. Autocmds may remove or
+! * change a quickfix list when vimgrep is running. If the list is not found,
+! * create a new list.
+ */
+ static int
+ vgr_qflist_valid(
+***************
+*** 5479,5485 ****
+
+ // 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;
+ for (fi = 0; fi < fcount && !got_int && tomatch > 0; ++fi)
+--- 5487,5493 ----
+
+ // Remember the current quickfix list identifier, so that we can check for
+ // autocommands changing the current quickfix list.
+! save_qfid = qf_get_curlist(qi)->qf_id;
+
+ seconds = (time_t)0;
+ for (fi = 0; fi < fcount && !got_int && tomatch > 0; ++fi)
+***************
+*** 5515,5521 ****
+ decr_quickfix_busy();
+ goto theend;
+ }
+! save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
+
+ if (buf == NULL)
+ {
+--- 5523,5529 ----
+ decr_quickfix_busy();
+ goto theend;
+ }
+! save_qfid = qf_get_curlist(qi)->qf_id;
+
+ if (buf == NULL)
+ {
+***************
+*** 5595,5601 ****
+
+ FreeWild(fcount, fnames);
+
+! qfl = &qi->qf_lists[qi->qf_curlist];
+ qfl->qf_nonevalid = FALSE;
+ qfl->qf_ptr = qfl->qf_start;
+ qfl->qf_index = 1;
+--- 5603,5609 ----
+
+ FreeWild(fcount, fnames);
+
+! qfl = qf_get_curlist(qi);
+ qfl->qf_nonevalid = FALSE;
+ qfl->qf_ptr = qfl->qf_start;
+ qfl->qf_index = 1;
+***************
+*** 6602,6608 ****
+
+ // If the current list is modified and it is displayed in the quickfix
+ // window, then Update it.
+! if (qi->qf_lists[qi->qf_curlist].qf_id == qfl->qf_id)
+ qf_win_pos_update(qi, old_qfidx);
+
+ return OK;
+--- 6610,6616 ----
+
+ // If the current list is modified and it is displayed in the quickfix
+ // window, then Update it.
+! if (qf_get_curlist(qi)->qf_id == qfl->qf_id)
+ qf_win_pos_update(qi, old_qfidx);
+
+ return OK;
+***************
+*** 6668,6674 ****
+ {
+ // 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);
+ }
+
+--- 6676,6682 ----
+ {
+ // If the quickfix/location list window is open, then clear it
+ if (qi->qf_curlist < qi->qf_listcount)
+! qf_free(qf_get_curlist(qi));
+ qf_update_buffer(qi, NULL);
+ }
+
+***************
+*** 6700,6709 ****
+
+ qfwin->w_llist_ref = new_ll;
+ if (wp != qfwin)
+! {
+! wp->w_llist = new_ll;
+! new_ll->qf_refcount++;
+! }
+ }
+ }
+
+--- 6708,6714 ----
+
+ qfwin->w_llist_ref = new_ll;
+ if (wp != qfwin)
+! win_set_loclist(wp, new_ll);
+ }
+ }
+
+***************
+*** 6745,6751 ****
+ {
+ retval = qf_add_entries(qi, qi->qf_curlist, list, title, action);
+ if (retval == OK)
+! qf_list_changed(&qi->qf_lists[qi->qf_curlist]);
+ }
+
+ decr_quickfix_busy();
+--- 6750,6756 ----
+ {
+ retval = qf_add_entries(qi, qi->qf_curlist, list, title, action);
+ if (retval == OK)
+! qf_list_changed(qf_get_curlist(qi));
+ }
+
+ decr_quickfix_busy();
+***************
+*** 6900,6910 ****
+ return;
+ }
+ 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.
+! save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
+ if (au_name != NULL)
+ {
+ buf_T *curbuf_old = curbuf;
+--- 6905,6915 ----
+ return;
+ }
+ if (res >= 0)
+! qf_list_changed(qf_get_curlist(qi));
+
+ // Remember the current quickfix list identifier, so that we can
+ // check for autocommands changing the current quickfix list.
+! save_qfid = qf_get_curlist(qi)->qf_id;
+ if (au_name != NULL)
+ {
+ buf_T *curbuf_old = curbuf;
+***************
+*** 6991,7001 ****
+ 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.
+! save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+--- 6996,7006 ----
+ goto cleanup;
+ }
+ if (res >= 0)
+! qf_list_changed(qf_get_curlist(qi));
+
+ // Remember the current quickfix list identifier, so that we can
+ // check for autocommands changing the current quickfix list.
+! save_qfid = qf_get_curlist(qi)->qf_id;
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+***************
+*** 7259,7265 ****
+
+ 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;
+--- 7264,7270 ----
+
+ vim_regfree(regmatch.regprog);
+
+! qfl = qf_get_curlist(qi);
+ qfl->qf_nonevalid = FALSE;
+ qfl->qf_ptr = qfl->qf_start;
+ qfl->qf_index = 1;
+*** ../vim-8.1.1006/src/version.c 2019-03-11 08:05:02.203622705 +0100
+--- src/version.c 2019-03-13 06:47:34.877223961 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1006,
+ /**/
+
+--
+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.1007 b/data/vim/patches/8.1.1007
new file mode 100644
index 000000000..706b30457
--- /dev/null
+++ b/data/vim/patches/8.1.1007
@@ -0,0 +1,613 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1007
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1007
+Problem: Using closure may consume a lot of memory.
+Solution: unreference items that are no longer needed. Add a test. (Ozaki
+ Kiichi, closes #3961)
+Files: src/testdir/Make_all.mak, src/testdir/test_memory_usage.vim,
+ src/userfunc.c
+
+
+*** ../vim-8.1.1006/src/testdir/Make_all.mak 2019-03-02 06:41:34.345330494 +0100
+--- src/testdir/Make_all.mak 2019-03-14 13:22:28.717839506 +0100
+***************
+*** 63,70 ****
+ # Individual tests, including the ones part of test_alot.
+ # Please keep sorted up to test_alot.
+ NEW_TESTS = \
+- test_arglist \
+ test_arabic \
+ test_assert \
+ test_assign \
+ test_autochdir \
+--- 63,70 ----
+ # Individual tests, including the ones part of test_alot.
+ # Please keep sorted up to test_alot.
+ NEW_TESTS = \
+ test_arabic \
++ test_arglist \
+ test_assert \
+ test_assign \
+ test_autochdir \
+***************
+*** 108,118 ****
+ test_ex_equal \
+ test_ex_undo \
+ test_ex_z \
+- test_exit \
+ test_exec_while_if \
+ test_execute_func \
+ test_exists \
+ test_exists_autocmd \
+ test_expand \
+ test_expand_dllpath \
+ test_expand_func \
+--- 108,118 ----
+ test_ex_equal \
+ test_ex_undo \
+ test_ex_z \
+ test_exec_while_if \
+ test_execute_func \
+ test_exists \
+ test_exists_autocmd \
++ test_exit \
+ test_expand \
+ test_expand_dllpath \
+ test_expand_func \
+***************
+*** 179,184 ****
+--- 179,185 ----
+ test_match \
+ test_matchadd_conceal \
+ test_matchadd_conceal_utf8 \
++ test_memory_usage \
+ test_menu \
+ test_messages \
+ test_mksession \
+***************
+*** 355,360 ****
+--- 356,362 ----
+ test_maparg.res \
+ test_marks.res \
+ test_matchadd_conceal.res \
++ test_memory_usage.res \
+ test_mksession.res \
+ test_nested_function.res \
+ test_netbeans.res \
+*** ../vim-8.1.1006/src/testdir/test_memory_usage.vim 2019-03-14 13:42:48.909493098 +0100
+--- src/testdir/test_memory_usage.vim 2019-03-14 13:26:00.264275955 +0100
+***************
+*** 0 ****
+--- 1,144 ----
++ " Tests for memory usage.
++
++ if !has('terminal') || has('gui_running') || $ASAN_OPTIONS !=# ''
++ " Skip tests on Travis CI ASAN build because it's difficult to estimate
++ " memory usage.
++ finish
++ endif
++
++ source shared.vim
++
++ func s:pick_nr(str) abort
++ return substitute(a:str, '[^0-9]', '', 'g') * 1
++ endfunc
++
++ if has('win32')
++ if !executable('wmic')
++ finish
++ endif
++ func s:memory_usage(pid) abort
++ let cmd = printf('wmic process where processid=%d get WorkingSetSize', a:pid)
++ return s:pick_nr(system(cmd)) / 1024
++ endfunc
++ elseif has('unix')
++ if !executable('ps')
++ finish
++ endif
++ func s:memory_usage(pid) abort
++ return s:pick_nr(system('ps -o rss= -p ' . a:pid))
++ endfunc
++ else
++ finish
++ endif
++
++ " Wait for memory usage to level off.
++ func s:monitor_memory_usage(pid) abort
++ let proc = {}
++ let proc.pid = a:pid
++ let proc.hist = []
++ let proc.min = 0
++ let proc.max = 0
++
++ func proc.op() abort
++ " Check the last 200ms.
++ let val = s:memory_usage(self.pid)
++ if self.min > val
++ let self.min = val
++ elseif self.max < val
++ let self.max = val
++ endif
++ call add(self.hist, val)
++ if len(self.hist) < 20
++ return 0
++ endif
++ let sample = remove(self.hist, 0)
++ return len(uniq([sample] + self.hist)) == 1
++ endfunc
++
++ call WaitFor({-> proc.op()}, 10000)
++ return {'last': get(proc.hist, -1), 'min': proc.min, 'max': proc.max}
++ endfunc
++
++ let s:term_vim = {}
++
++ func s:term_vim.start(...) abort
++ let self.buf = term_start([GetVimProg()] + a:000)
++ let self.job = term_getjob(self.buf)
++ call WaitFor({-> job_status(self.job) ==# 'run'})
++ let self.pid = job_info(self.job).process
++ endfunc
++
++ func s:term_vim.stop() abort
++ call term_sendkeys(self.buf, ":qall!\<CR>")
++ call WaitFor({-> job_status(self.job) ==# 'dead'})
++ exe self.buf . 'bwipe!'
++ endfunc
++
++ func s:vim_new() abort
++ return copy(s:term_vim)
++ endfunc
++
++ func Test_memory_func_capture_vargs()
++ " Case: if a local variable captures a:000, funccall object will be free
++ " just after it finishes.
++ let testfile = 'Xtest.vim'
++ call writefile([
++ \ 'func s:f(...)',
++ \ ' let x = a:000',
++ \ 'endfunc',
++ \ 'for _ in range(10000)',
++ \ ' call s:f(0)',
++ \ 'endfor',
++ \ ], testfile)
++
++ let vim = s:vim_new()
++ call vim.start('--clean', '-c', 'set noswapfile', testfile)
++ let before = s:monitor_memory_usage(vim.pid).last
++
++ call term_sendkeys(vim.buf, ":so %\<CR>")
++ call WaitFor({-> term_getcursor(vim.buf)[0] == 1})
++ let after = s:monitor_memory_usage(vim.pid)
++
++ " Estimate the limit of max usage as 2x initial usage.
++ call assert_inrange(before, 2 * before, after.max)
++ " In this case, garbase collecting is not needed.
++ call assert_equal(after.last, after.max)
++
++ call vim.stop()
++ call delete(testfile)
++ endfunc
++
++ func Test_memory_func_capture_lvars()
++ " Case: if a local variable captures l: dict, funccall object will not be
++ " free until garbage collector runs, but after that memory usage doesn't
++ " increase so much even when rerun Xtest.vim since system memory caches.
++ let testfile = 'Xtest.vim'
++ call writefile([
++ \ 'func s:f()',
++ \ ' let x = l:',
++ \ 'endfunc',
++ \ 'for _ in range(10000)',
++ \ ' call s:f()',
++ \ 'endfor',
++ \ ], testfile)
++
++ let vim = s:vim_new()
++ call vim.start('--clean', '-c', 'set noswapfile', testfile)
++ let before = s:monitor_memory_usage(vim.pid).last
++
++ call term_sendkeys(vim.buf, ":so %\<CR>")
++ call WaitFor({-> term_getcursor(vim.buf)[0] == 1})
++ let after = s:monitor_memory_usage(vim.pid)
++
++ " Rerun Xtest.vim.
++ for _ in range(3)
++ call term_sendkeys(vim.buf, ":so %\<CR>")
++ call WaitFor({-> term_getcursor(vim.buf)[0] == 1})
++ let last = s:monitor_memory_usage(vim.pid).last
++ endfor
++
++ call assert_inrange(before, after.max + (after.last - before), last)
++
++ call vim.stop()
++ call delete(testfile)
++ endfunc
+*** ../vim-8.1.1006/src/userfunc.c 2019-02-14 13:43:33.779220100 +0100
+--- src/userfunc.c 2019-03-14 13:35:20.756552196 +0100
+***************
+*** 39,50 ****
+ /* Used by get_func_tv() */
+ static garray_T funcargs = GA_EMPTY;
+
+! /* pointer to funccal for currently active function */
+! funccall_T *current_funccal = NULL;
+
+! /* Pointer to list of previously used funccal, still around because some
+! * item in it is still being used. */
+! funccall_T *previous_funccal = NULL;
+
+ static char *e_funcexts = N_("E122: Function %s already exists, add ! to replace it");
+ static char *e_funcdict = N_("E717: Dictionary entry already exists");
+--- 39,50 ----
+ /* Used by get_func_tv() */
+ static garray_T funcargs = GA_EMPTY;
+
+! // pointer to funccal for currently active function
+! static funccall_T *current_funccal = NULL;
+
+! // Pointer to list of previously used funccal, still around because some
+! // item in it is still being used.
+! static funccall_T *previous_funccal = NULL;
+
+ static char *e_funcexts = N_("E122: Function %s already exists, add ! to replace it");
+ static char *e_funcdict = N_("E717: Dictionary entry already exists");
+***************
+*** 586,628 ****
+ }
+
+ /*
+! * Free "fc" and what it contains.
+ */
+! static void
+! free_funccal(
+! funccall_T *fc,
+! int free_val) /* a: vars were allocated */
+ {
+! listitem_T *li;
+! int i;
+
+ for (i = 0; i < fc->fc_funcs.ga_len; ++i)
+ {
+! ufunc_T *fp = ((ufunc_T **)(fc->fc_funcs.ga_data))[i];
+
+! /* When garbage collecting a funccall_T may be freed before the
+! * function that references it, clear its uf_scoped field.
+! * The function may have been redefined and point to another
+! * funccall_T, don't clear it then. */
+ if (fp != NULL && fp->uf_scoped == fc)
+ fp->uf_scoped = NULL;
+ }
+ ga_clear(&fc->fc_funcs);
+
+! /* The a: variables typevals may not have been allocated, only free the
+! * allocated variables. */
+! vars_clear_ext(&fc->l_avars.dv_hashtab, free_val);
+
+! /* free all l: variables */
+ vars_clear(&fc->l_vars.dv_hashtab);
+
+! /* Free the a:000 variables if they were allocated. */
+! if (free_val)
+! for (li = fc->l_varlist.lv_first; li != NULL; li = li->li_next)
+! clear_tv(&li->li_tv);
+
+! func_ptr_unref(fc->func);
+! vim_free(fc);
+ }
+
+ /*
+--- 586,636 ----
+ }
+
+ /*
+! * Free "fc".
+ */
+! static void
+! free_funccal(funccall_T *fc)
+ {
+! int i;
+
+ for (i = 0; i < fc->fc_funcs.ga_len; ++i)
+ {
+! ufunc_T *fp = ((ufunc_T **)(fc->fc_funcs.ga_data))[i];
+
+! // When garbage collecting a funccall_T may be freed before the
+! // function that references it, clear its uf_scoped field.
+! // The function may have been redefined and point to another
+! // funccall_T, don't clear it then.
+ if (fp != NULL && fp->uf_scoped == fc)
+ fp->uf_scoped = NULL;
+ }
+ ga_clear(&fc->fc_funcs);
+
+! func_ptr_unref(fc->func);
+! vim_free(fc);
+! }
+
+! /*
+! * Free "fc" and what it contains.
+! * Can be called only when "fc" is kept beyond the period of it called,
+! * i.e. after cleanup_function_call(fc).
+! */
+! static void
+! free_funccal_contents(funccall_T *fc)
+! {
+! listitem_T *li;
+!
+! // Free all l: variables.
+ vars_clear(&fc->l_vars.dv_hashtab);
+
+! // Free all a: variables.
+! vars_clear(&fc->l_avars.dv_hashtab);
+
+! // Free the a:000 variables.
+! for (li = fc->l_varlist.lv_first; li != NULL; li = li->li_next)
+! clear_tv(&li->li_tv);
+!
+! free_funccal(fc);
+ }
+
+ /*
+***************
+*** 632,682 ****
+ static void
+ cleanup_function_call(funccall_T *fc)
+ {
+ current_funccal = fc->caller;
+
+! /* If the a:000 list and the l: and a: dicts are not referenced and there
+! * is no closure using it, we can free the funccall_T and what's in it. */
+! if (fc->l_varlist.lv_refcount == DO_NOT_FREE_CNT
+! && fc->l_vars.dv_refcount == DO_NOT_FREE_CNT
+! && fc->l_avars.dv_refcount == DO_NOT_FREE_CNT
+! && fc->fc_refcount <= 0)
+! {
+! free_funccal(fc, FALSE);
+! }
+ else
+ {
+! hashitem_T *hi;
+! listitem_T *li;
+! int todo;
+! dictitem_T *v;
+! static int made_copy = 0;
+!
+! /* "fc" is still in use. This can happen when returning "a:000",
+! * assigning "l:" to a global variable or defining a closure.
+! * Link "fc" in the list for garbage collection later. */
+! fc->caller = previous_funccal;
+! previous_funccal = fc;
+
+! /* Make a copy of the a: variables, since we didn't do that above. */
+ todo = (int)fc->l_avars.dv_hashtab.ht_used;
+ for (hi = fc->l_avars.dv_hashtab.ht_array; todo > 0; ++hi)
+ {
+ if (!HASHITEM_EMPTY(hi))
+ {
+ --todo;
+! v = HI2DI(hi);
+! copy_tv(&v->di_tv, &v->di_tv);
+ }
+ }
+
+! /* Make a copy of the a:000 items, since we didn't do that above. */
+ for (li = fc->l_varlist.lv_first; li != NULL; li = li->li_next)
+ copy_tv(&li->li_tv, &li->li_tv);
+
+! if (++made_copy == 10000)
+ {
+! // We have made a lot of copies. This can happen when
+! // repetitively calling a function that creates a reference to
+ // itself somehow. Call the garbage collector soon to avoid using
+ // too much memory.
+ made_copy = 0;
+--- 640,714 ----
+ static void
+ cleanup_function_call(funccall_T *fc)
+ {
++ int may_free_fc = fc->fc_refcount <= 0;
++ int free_fc = TRUE;
++
+ current_funccal = fc->caller;
+
+! // Free all l: variables if not referred.
+! if (may_free_fc && fc->l_vars.dv_refcount == DO_NOT_FREE_CNT)
+! vars_clear(&fc->l_vars.dv_hashtab);
+! else
+! free_fc = FALSE;
+!
+! // If the a:000 list and the l: and a: dicts are not referenced and
+! // there is no closure using it, we can free the funccall_T and what's
+! // in it.
+! if (may_free_fc && fc->l_avars.dv_refcount == DO_NOT_FREE_CNT)
+! vars_clear_ext(&fc->l_avars.dv_hashtab, FALSE);
+ else
+ {
+! int todo;
+! hashitem_T *hi;
+! dictitem_T *di;
+
+! free_fc = FALSE;
+!
+! // Make a copy of the a: variables, since we didn't do that above.
+ todo = (int)fc->l_avars.dv_hashtab.ht_used;
+ for (hi = fc->l_avars.dv_hashtab.ht_array; todo > 0; ++hi)
+ {
+ if (!HASHITEM_EMPTY(hi))
+ {
+ --todo;
+! di = HI2DI(hi);
+! copy_tv(&di->di_tv, &di->di_tv);
+ }
+ }
++ }
++
++ if (may_free_fc && fc->l_varlist.lv_refcount == DO_NOT_FREE_CNT)
++ fc->l_varlist.lv_first = NULL;
++ else
++ {
++ listitem_T *li;
+
+! free_fc = FALSE;
+!
+! // Make a copy of the a:000 items, since we didn't do that above.
+ for (li = fc->l_varlist.lv_first; li != NULL; li = li->li_next)
+ copy_tv(&li->li_tv, &li->li_tv);
++ }
++
++ if (free_fc)
++ free_funccal(fc);
++ else
++ {
++ static int made_copy = 0;
+
+! // "fc" is still in use. This can happen when returning "a:000",
+! // assigning "l:" to a global variable or defining a closure.
+! // Link "fc" in the list for garbage collection later.
+! fc->caller = previous_funccal;
+! previous_funccal = fc;
+!
+! if (want_garbage_collect)
+! // If garbage collector is ready, clear count.
+! made_copy = 0;
+! else if (++made_copy >= (int)((4096 * 1024) / sizeof(*fc)))
+ {
+! // We have made a lot of copies, worth 4 Mbyte. This can happen
+! // when repetitively calling a function that creates a reference to
+ // itself somehow. Call the garbage collector soon to avoid using
+ // too much memory.
+ made_copy = 0;
+***************
+*** 731,737 ****
+
+ line_breakcheck(); /* check for CTRL-C hit */
+
+! fc = (funccall_T *)alloc(sizeof(funccall_T));
+ if (fc == NULL)
+ return;
+ fc->caller = current_funccal;
+--- 763,769 ----
+
+ line_breakcheck(); /* check for CTRL-C hit */
+
+! fc = (funccall_T *)alloc_clear(sizeof(funccall_T));
+ if (fc == NULL)
+ return;
+ fc->caller = current_funccal;
+***************
+*** 832,847 ****
+ {
+ v = &fc->fixvar[fixvar_idx++].var;
+ v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
+ }
+ else
+ {
+! v = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T)
+! + STRLEN(name)));
+ if (v == NULL)
+ break;
+! v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX | DI_FLAGS_ALLOC;
+ }
+- STRCPY(v->di_key, name);
+
+ /* Note: the values are copied directly to avoid alloc/free.
+ * "argvars" must have VAR_FIXED for v_lock. */
+--- 864,878 ----
+ {
+ v = &fc->fixvar[fixvar_idx++].var;
+ v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
++ STRCPY(v->di_key, name);
+ }
+ else
+ {
+! v = dictitem_alloc(name);
+ if (v == NULL)
+ break;
+! v->di_flags |= DI_FLAGS_RO | DI_FLAGS_FIX;
+ }
+
+ /* Note: the values are copied directly to avoid alloc/free.
+ * "argvars" must have VAR_FIXED for v_lock. */
+***************
+*** 860,868 ****
+
+ if (ai >= 0 && ai < MAX_FUNC_ARGS)
+ {
+! list_append(&fc->l_varlist, &fc->l_listitems[ai]);
+! fc->l_listitems[ai].li_tv = argvars[i];
+! fc->l_listitems[ai].li_tv.v_lock = VAR_FIXED;
+ }
+ }
+
+--- 891,901 ----
+
+ if (ai >= 0 && ai < MAX_FUNC_ARGS)
+ {
+! listitem_T *li = &fc->l_listitems[ai];
+!
+! li->li_tv = argvars[i];
+! li->li_tv.v_lock = VAR_FIXED;
+! list_append(&fc->l_varlist, li);
+ }
+ }
+
+***************
+*** 1088,1094 ****
+ if (fc == *pfc)
+ {
+ *pfc = fc->caller;
+! free_funccal(fc, TRUE);
+ return;
+ }
+ }
+--- 1121,1127 ----
+ if (fc == *pfc)
+ {
+ *pfc = fc->caller;
+! free_funccal_contents(fc);
+ return;
+ }
+ }
+***************
+*** 3646,3652 ****
+ {
+ fc = *pfc;
+ *pfc = fc->caller;
+! free_funccal(fc, TRUE);
+ did_free = TRUE;
+ did_free_funccal = TRUE;
+ }
+--- 3679,3685 ----
+ {
+ fc = *pfc;
+ *pfc = fc->caller;
+! free_funccal_contents(fc);
+ did_free = TRUE;
+ did_free_funccal = TRUE;
+ }
+*** ../vim-8.1.1006/src/version.c 2019-03-13 06:49:20.492351919 +0100
+--- src/version.c 2019-03-14 13:27:08.671770246 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1007,
+ /**/
+
+--
+"I don’t know how to make a screenshot" - Richard Stallman, July 2002
+(when asked to send a screenshot of his desktop for unix.se)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1008 b/data/vim/patches/8.1.1008
new file mode 100644
index 000000000..0dee32419
--- /dev/null
+++ b/data/vim/patches/8.1.1008
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1008
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1008
+Problem: MS-Windows: HAVE_STDINT_H only defined for non-debug version.
+Solution: Move definition of HAVE_STDINT_H up. (Taro Muraoka, closes #4109)
+Files: src/Make_mvc.mak
+
+
+*** ../vim-8.1.1007/src/Make_mvc.mak 2019-02-18 21:41:34.477750367 +0100
+--- src/Make_mvc.mak 2019-03-14 21:34:20.287929702 +0100
+***************
+*** 626,631 ****
+--- 626,635 ----
+ !endif
+ !endif
+
++ # VC10 or later has stdint.h.
++ !if $(MSVC_MAJOR) >= 10
++ CFLAGS = $(CFLAGS) -DHAVE_STDINT_H
++ !endif
+
+ !ifdef NODEBUG
+ VIM = vim
+***************
+*** 649,659 ****
+ CFLAGS=$(CFLAGS) $(WP64CHECK)
+ !endif
+
+- # VC10 or later has stdint.h.
+- !if $(MSVC_MAJOR) >= 10
+- CFLAGS = $(CFLAGS) -DHAVE_STDINT_H
+- !endif
+-
+ # Static code analysis generally available starting with VS2012 (VC11) or
+ # Windows SDK 7.1 (VC10)
+ !if ("$(ANALYZE)" == "yes") && ($(MSVC_MAJOR) >= 10)
+--- 653,658 ----
+*** ../vim-8.1.1007/src/version.c 2019-03-14 13:42:57.169435481 +0100
+--- src/version.c 2019-03-14 21:36:19.887149941 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1008,
+ /**/
+
+--
+Creating the world with Emacs: M-x let-there-be-light
+Creating the world with Vim: :make world
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1009 b/data/vim/patches/8.1.1009
new file mode 100644
index 000000000..8e1ec0458
--- /dev/null
+++ b/data/vim/patches/8.1.1009
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1009
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1009
+Problem: MS-Windows: some text is not baseline aligned.
+Solution: Use bottom alignment. (Taro Muraoka, closes #4116, closes #1520)
+Files: src/gui_dwrite.cpp
+
+
+*** ../vim-8.1.1008/src/gui_dwrite.cpp 2018-02-07 22:09:25.000000000 +0100
+--- src/gui_dwrite.cpp 2019-03-16 15:22:30.310481849 +0100
+***************
+*** 822,828 ****
+
+ if (SUCCEEDED(hr))
+ hr = pTextFormat->SetParagraphAlignment(
+! DWRITE_PARAGRAPH_ALIGNMENT_CENTER);
+
+ if (SUCCEEDED(hr))
+ hr = pTextFormat->SetWordWrapping(DWRITE_WORD_WRAPPING_NO_WRAP);
+--- 822,828 ----
+
+ if (SUCCEEDED(hr))
+ hr = pTextFormat->SetParagraphAlignment(
+! DWRITE_PARAGRAPH_ALIGNMENT_FAR);
+
+ if (SUCCEEDED(hr))
+ hr = pTextFormat->SetWordWrapping(DWRITE_WORD_WRAPPING_NO_WRAP);
+*** ../vim-8.1.1008/src/version.c 2019-03-14 21:37:13.138804591 +0100
+--- src/version.c 2019-03-16 15:24:28.169733499 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1009,
+ /**/
+
+--
+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.1010 b/data/vim/patches/8.1.1010
new file mode 100644
index 000000000..707e5923b
--- /dev/null
+++ b/data/vim/patches/8.1.1010
@@ -0,0 +1,92 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1010
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1010
+Problem: Lua interface leaks memory.
+Solution: Clear typeval after copying it.
+Files: src/if_lua.c
+
+
+*** ../vim-8.1.1009/src/if_lua.c 2019-02-17 17:44:36.211875510 +0100
+--- src/if_lua.c 2019-03-16 16:37:33.641028413 +0100
+***************
+*** 844,853 ****
+ lua_settop(L, 2);
+ luaV_checktypval(L, 2, &v, "adding list item");
+ if (list_append_tv(l, &v) == FAIL)
+- {
+- clear_tv(&v);
+ luaL_error(L, "failed to add item to list");
+- }
+ clear_tv(&v);
+ lua_settop(L, 1);
+ return 1;
+--- 844,850 ----
+***************
+*** 872,881 ****
+ lua_settop(L, 2);
+ luaV_checktypval(L, 2, &v, "inserting list item");
+ if (list_insert_tv(l, &v, li) == FAIL)
+- {
+- clear_tv(&v);
+ luaL_error(L, "failed to add item to list");
+- }
+ clear_tv(&v);
+ lua_settop(L, 1);
+ return 1;
+--- 869,875 ----
+***************
+*** 981,986 ****
+--- 975,981 ----
+ char_u *key = (char_u *) luaL_checkstring(L, 2);
+ dictitem_T *di;
+ typval_T v;
++
+ if (d->dv_lock)
+ luaL_error(L, "dict is locked");
+ if (key == NULL)
+***************
+*** 1104,1109 ****
+--- 1099,1105 ----
+ {
+ luaV_checktypval(L, i + 2, &v, "calling funcref");
+ list_append_tv(f->args.vval.v_list, &v);
++ clear_tv(&v);
+ }
+ status = func_call(f->tv.vval.v_string, &f->args,
+ NULL, f->self, &rettv);
+***************
+*** 1571,1576 ****
+--- 1567,1573 ----
+ {
+ luaV_checktypval(L, -1, &v, "vim.list");
+ list_append_tv(l, &v);
++ clear_tv(&v);
+ }
+ lua_pop(L, 1); /* value */
+ } while (notnil);
+*** ../vim-8.1.1009/src/version.c 2019-03-16 15:24:39.333662581 +0100
+--- src/version.c 2019-03-16 16:38:26.984716746 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1010,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+66. You create a homepage with the impression to cure the afflicted...but
+ your hidden agenda is to receive more 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.1011 b/data/vim/patches/8.1.1011
new file mode 100644
index 000000000..d93a137af
--- /dev/null
+++ b/data/vim/patches/8.1.1011
@@ -0,0 +1,77 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1011
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1011
+Problem: Indent from autoindent not removed from blank line. (Daniel Hahler)
+Solution: Do not reset did_ai when text follows. (closes #4119)
+Files: src/misc1.c, src/testdir/test_edit.vim
+
+
+*** ../vim-8.1.1010/src/misc1.c 2019-02-21 16:21:16.369816652 +0100
+--- src/misc1.c 2019-03-16 18:04:31.121472482 +0100
+***************
+*** 1497,1504 ****
+ ++less_cols_off;
+ }
+ }
+- if (*p_extra != NUL)
+- did_ai = FALSE; /* append some text, don't truncate now */
+
+ /* columns for marks adjusted for removed columns */
+ less_cols = (int)(p_extra - saved_line);
+--- 1497,1502 ----
+*** ../vim-8.1.1010/src/testdir/test_edit.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_edit.vim 2019-03-16 17:16:29.511198226 +0100
+***************
+*** 399,406 ****
+ call feedkeys("A {\<cr>more\<cr>}\<esc>", 'tnix')
+ call assert_equal(["\tabc {", "\t\tmore", "\t}"], getline(1, '$'))
+ set smartindent& autoindent&
+! bw!
+ endif
+ endfunc
+
+ func Test_edit_CR()
+--- 399,417 ----
+ call feedkeys("A {\<cr>more\<cr>}\<esc>", 'tnix')
+ call assert_equal(["\tabc {", "\t\tmore", "\t}"], getline(1, '$'))
+ set smartindent& autoindent&
+! bwipe!
+ endif
++
++ " Test autoindent removing indent of blank line.
++ new
++ call setline(1, ' foo bar baz')
++ set autoindent
++ exe "normal 0eea\<CR>\<CR>\<Esc>"
++ call assert_equal(" foo bar", getline(1))
++ call assert_equal("", getline(2))
++ call assert_equal(" baz", getline(3))
++ set autoindent&
++ bwipe!
+ endfunc
+
+ func Test_edit_CR()
+*** ../vim-8.1.1010/src/version.c 2019-03-16 16:38:37.560654505 +0100
+--- src/version.c 2019-03-16 18:10:38.583155585 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1011,
+ /**/
+
+--
+I got a new desk stapler. It broke on the first desk I tried.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1012 b/data/vim/patches/8.1.1012
new file mode 100644
index 000000000..81d58dbef
--- /dev/null
+++ b/data/vim/patches/8.1.1012
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1012
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1012
+Problem: Memory leak with E461.
+Solution: Clear the typeval. (Dominique Pelle, closes #4111)
+Files: src/eval.c
+
+
+*** ../vim-8.1.1011/src/eval.c 2019-03-02 11:57:06.159125888 +0100
+--- src/eval.c 2019-03-17 14:41:34.694024036 +0100
+***************
+*** 2138,2143 ****
+--- 2138,2144 ----
+ || &lp->ll_dict->dv_hashtab == get_funccal_args_ht())
+ {
+ semsg(_(e_illvar), name);
++ clear_tv(&var1);
+ return NULL;
+ }
+
+*** ../vim-8.1.1011/src/version.c 2019-03-16 18:11:03.646997858 +0100
+--- src/version.c 2019-03-17 14:43:14.761426257 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1012,
+ /**/
+
+--
+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.1013 b/data/vim/patches/8.1.1013
new file mode 100644
index 000000000..7cac40eee
--- /dev/null
+++ b/data/vim/patches/8.1.1013
@@ -0,0 +1,130 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1013
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1013
+Problem: MS-Windows: Scrolling fails when dividing the screen.
+Solution: Position the cursor before calling ScrollConsoleScreenBuffer().
+ (Nobuhiro Takasaki, closes #4115)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.1012/src/os_win32.c 2019-03-07 06:40:23.950955576 +0100
+--- src/os_win32.c 2019-03-17 14:54:32.693363582 +0100
+***************
+*** 6024,6029 ****
+--- 6024,6031 ----
+ COORD dest;
+ CHAR_INFO fill;
+
++ gotoxy(g_srScrollRegion.Left + 1, g_srScrollRegion.Top + 1);
++
+ dest.X = g_srScrollRegion.Left;
+ dest.Y = g_coord.Y + cLines;
+
+***************
+*** 6037,6053 ****
+ clip.Right = g_srScrollRegion.Right;
+ clip.Bottom = g_srScrollRegion.Bottom;
+
+! {
+! fill.Char.AsciiChar = ' ';
+! if (!USE_VTP)
+! fill.Attributes = g_attrCurrent;
+! else
+! fill.Attributes = g_attrDefault;
+
+! set_console_color_rgb();
+
+- ScrollConsoleScreenBuffer(g_hConOut, &source, &clip, dest, &fill);
+- }
+ // Here we have to deal with a win32 console flake: If the scroll
+ // region looks like abc and we scroll c to a and fill with d we get
+ // cbd... if we scroll block c one line at a time to a, we get cdd...
+--- 6039,6054 ----
+ clip.Right = g_srScrollRegion.Right;
+ clip.Bottom = g_srScrollRegion.Bottom;
+
+! fill.Char.AsciiChar = ' ';
+! if (!USE_VTP)
+! fill.Attributes = g_attrCurrent;
+! else
+! fill.Attributes = g_attrDefault;
+
+! set_console_color_rgb();
+!
+! ScrollConsoleScreenBuffer(g_hConOut, &source, &clip, dest, &fill);
+
+ // Here we have to deal with a win32 console flake: If the scroll
+ // region looks like abc and we scroll c to a and fill with d we get
+ // cbd... if we scroll block c one line at a time to a, we get cdd...
+***************
+*** 6081,6086 ****
+--- 6082,6089 ----
+ CHAR_INFO fill;
+ int nb;
+
++ gotoxy(g_srScrollRegion.Left + 1, g_srScrollRegion.Top + 1);
++
+ dest.X = g_srScrollRegion.Left;
+ dest.Y = g_coord.Y;
+
+***************
+*** 6094,6110 ****
+ clip.Right = g_srScrollRegion.Right;
+ clip.Bottom = g_srScrollRegion.Bottom;
+
+! {
+! fill.Char.AsciiChar = ' ';
+! if (!USE_VTP)
+! fill.Attributes = g_attrCurrent;
+! else
+! fill.Attributes = g_attrDefault;
+
+! set_console_color_rgb();
+
+- ScrollConsoleScreenBuffer(g_hConOut, &source, &clip, dest, &fill);
+- }
+ // Here we have to deal with a win32 console flake; See insert_lines()
+ // above.
+
+--- 6097,6112 ----
+ clip.Right = g_srScrollRegion.Right;
+ clip.Bottom = g_srScrollRegion.Bottom;
+
+! fill.Char.AsciiChar = ' ';
+! if (!USE_VTP)
+! fill.Attributes = g_attrCurrent;
+! else
+! fill.Attributes = g_attrDefault;
+
+! set_console_color_rgb();
+!
+! ScrollConsoleScreenBuffer(g_hConOut, &source, &clip, dest, &fill);
+
+ // Here we have to deal with a win32 console flake; See insert_lines()
+ // above.
+
+*** ../vim-8.1.1012/src/version.c 2019-03-17 14:43:28.477344179 +0100
+--- src/version.c 2019-03-17 14:53:15.733826579 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1013,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+76. Your ISP regards you as a business partner rather than as a customer.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1014 b/data/vim/patches/8.1.1014
new file mode 100644
index 000000000..c048d39a3
--- /dev/null
+++ b/data/vim/patches/8.1.1014
@@ -0,0 +1,65 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1014
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1014
+Problem: MS-Windows: /analyze only defined for non-debug version.
+Solution: Move adding of /analyze up. (Taro Muraoka, closes #4114)
+Files: src/Make_mvc.mak
+
+
+*** ../vim-8.1.1013/src/Make_mvc.mak 2019-03-14 21:37:13.138804591 +0100
+--- src/Make_mvc.mak 2019-03-17 15:44:47.626456403 +0100
+***************
+*** 631,636 ****
+--- 631,642 ----
+ CFLAGS = $(CFLAGS) -DHAVE_STDINT_H
+ !endif
+
++ # Static code analysis generally available starting with VS2012 (VC11) or
++ # Windows SDK 7.1 (VC10)
++ !if ("$(ANALYZE)" == "yes") && ($(MSVC_MAJOR) >= 10)
++ CFLAGS=$(CFLAGS) /analyze
++ !endif
++
+ !ifdef NODEBUG
+ VIM = vim
+ !if "$(OPTIMIZE)" == "SPACE"
+***************
+*** 653,664 ****
+ CFLAGS=$(CFLAGS) $(WP64CHECK)
+ !endif
+
+- # Static code analysis generally available starting with VS2012 (VC11) or
+- # Windows SDK 7.1 (VC10)
+- !if ("$(ANALYZE)" == "yes") && ($(MSVC_MAJOR) >= 10)
+- CFLAGS=$(CFLAGS) /analyze
+- !endif
+-
+ CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
+ RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
+ ! ifdef USE_MSVCRT
+--- 659,664 ----
+*** ../vim-8.1.1013/src/version.c 2019-03-17 14:54:50.453256679 +0100
+--- src/version.c 2019-03-17 15:45:52.394053094 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1014,
+ /**/
+
+--
+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.1015 b/data/vim/patches/8.1.1015
new file mode 100644
index 000000000..fee064175
--- /dev/null
+++ b/data/vim/patches/8.1.1015
@@ -0,0 +1,449 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1015
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1015
+Problem: Quickfix buffer shows up in list, can't get buffer number.
+Solution: Make the quickfix buffer unlisted when the quickfix window is
+ closed. get the quickfix buffer number with getqflist().
+ (Yegappan Lakshmanan, closes #4113)
+Files: runtime/doc/eval.txt, runtime/doc/quickfix.txt, src/quickfix.c,
+ src/testdir/test_quickfix.vim, src/window.c
+
+
+*** ../vim-8.1.1014/runtime/doc/eval.txt 2019-03-04 13:18:15.977053527 +0100
+--- runtime/doc/eval.txt 2019-03-17 16:34:27.019774609 +0100
+***************
+*** 4931,4940 ****
+ 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
+--- 4964,4979 ----
+ 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}.
+!
+! In addition to the items supported by |getqflist()| in {what},
+! the following item is supported by |getloclist()|:
+!
+! filewinid id of the window used to display files
+! from the location list. This field is
+! applicable only when called from a
+! location list window. See
+! |location-list-file-window| for more
+! details.
+
+ getmatches() *getmatches()*
+ Returns a |List| with all matches previously defined by
+***************
+*** 5036,5041 ****
+--- 5075,5083 ----
+ nr get information for this quickfix list; zero
+ means the current quickfix list and "$" means
+ the last quickfix list
++ qfbufnr number of the buffer displayed in the quickfix
++ window. Returns 0 if the quickfix buffer is
++ not present. See |quickfix-buffer|.
+ size number of entries in the quickfix list
+ title get the list title |quickfix-title|
+ winid get the quickfix |window-ID|
+***************
+*** 5064,5069 ****
+--- 5106,5113 ----
+ items quickfix list entries. If not present, set to
+ an empty list.
+ nr quickfix list number. If not present, set to 0
++ qfbufnr number of the buffer displayed in the quickfix
++ window. If not present, set to 0.
+ size number of entries in the quickfix list. If not
+ present, set to 0.
+ title quickfix list title text. If not present, set
+*** ../vim-8.1.1014/runtime/doc/quickfix.txt 2019-01-11 14:49:25.380107431 +0100
+--- runtime/doc/quickfix.txt 2019-03-17 16:34:27.019774609 +0100
+***************
+*** 111,124 ****
+ :[count]lne[xt][!] Same as ":cnext", except the location list for the
+ current window is used instead of the quickfix list.
+
+! :[count]cN[ext][!] *:cp* *:cprevious* *:cN* *:cNext*
+ :[count]cp[revious][!] Display the [count] previous error in the list that
+ includes a file name. If there are no file names at
+ all, go to the [count] previous error. See |:cc| for
+ [!] and 'switchbuf'.
+
+
+! :[count]lN[ext][!] *:lp* *:lprevious* *:lN* *:lNext*
+ :[count]lp[revious][!] Same as ":cNext" and ":cprevious", except the location
+ list for the current window is used instead of the
+ quickfix list.
+--- 111,124 ----
+ :[count]lne[xt][!] Same as ":cnext", except the location list for the
+ current window is used instead of the quickfix list.
+
+! :[count]cN[ext][!] *:cp* *:cprevious* *:cprev* *:cN* *:cNext*
+ :[count]cp[revious][!] Display the [count] previous error in the list that
+ includes a file name. If there are no file names at
+ all, go to the [count] previous error. See |:cc| for
+ [!] and 'switchbuf'.
+
+
+! :[count]lN[ext][!] *:lp* *:lprevious* *:lprev* *:lN* *:lNext*
+ :[count]lp[revious][!] Same as ":cNext" and ":cprevious", except the location
+ list for the current window is used instead of the
+ quickfix list.
+***************
+*** 367,374 ****
+ <
+ *quickfix-index*
+ When you jump to a quickfix/location list entry using any of the quickfix
+! commands (e.g. |cc|, |cnext|, |cprev|, etc.), that entry becomes the currently
+! selected entry. The index of the currently selected entry in a
+ quickfix/location list can be obtained using the getqflist()/getloclist()
+ functions. Examples: >
+ echo getqflist({'idx' : 0}).idx
+--- 367,374 ----
+ <
+ *quickfix-index*
+ When you jump to a quickfix/location list entry using any of the quickfix
+! commands (e.g. |:cc|, |:cnext|, |:cprev|, etc.), that entry becomes the
+! currently selected entry. The index of the currently selected entry in a
+ quickfix/location list can be obtained using the getqflist()/getloclist()
+ functions. Examples: >
+ echo getqflist({'idx' : 0}).idx
+***************
+*** 496,501 ****
+--- 496,502 ----
+ second quickfix window. If [height] is given the
+ existing window will be resized to it.
+
++ *quickfix-buffer*
+ The window will contain a special buffer, with
+ 'buftype' equal to "quickfix". Don't change this!
+ The window will have the w:quickfix_title variable set
+***************
+*** 504,510 ****
+ status line if the value of 'statusline' is adjusted
+ properly. Whenever this buffer is modified by a
+ quickfix command or function, the |b:changedtick|
+! variable is incremented.
+
+ *:lop* *:lopen*
+ :lop[en] [height] Open a window to show the location list for the
+--- 505,515 ----
+ status line if the value of 'statusline' is adjusted
+ properly. Whenever this buffer is modified by a
+ quickfix command or function, the |b:changedtick|
+! variable is incremented. You can get the number of
+! this buffer using the getqflist() and getloclist()
+! functions by passing the 'qfbufnr' item. For a
+! location list, this buffer is wiped out when the
+! location list is removed.
+
+ *:lop* *:lopen*
+ :lop[en] [height] Open a window to show the location list for the
+***************
+*** 670,681 ****
+--- 675,692 ----
+ " get the quickfix list window id
+ :echo getqflist({'winid' : 0}).winid
+
++ " get the quickfix list window buffer number
++ :echo getqflist({'qfbufnr' : 0}).qfbufnr
++
+ " get the context of the current location list
+ :echo getloclist(0, {'context' : 0}).context
+
+ " get the location list window id of the third window
+ :echo getloclist(3, {'winid' : 0}).winid
+
++ " get the location list window buffer number of the third window
++ :echo getloclist(3, {'qfbufnr' : 0}).qfbufnr
++
+ " get the file window id of a location list window (winnr: 4)
+ :echo getloclist(4, {'filewinid' : 0}).filewinid
+ <
+*** ../vim-8.1.1014/src/quickfix.c 2019-03-13 06:49:20.492351919 +0100
+--- src/quickfix.c 2019-03-17 16:34:27.019774609 +0100
+***************
+*** 5907,5913 ****
+ QF_GETLIST_SIZE = 0x80,
+ QF_GETLIST_TICK = 0x100,
+ QF_GETLIST_FILEWINID = 0x200,
+! QF_GETLIST_ALL = 0x3FF,
+ };
+
+ /*
+--- 5907,5914 ----
+ QF_GETLIST_SIZE = 0x80,
+ QF_GETLIST_TICK = 0x100,
+ QF_GETLIST_FILEWINID = 0x200,
+! QF_GETLIST_QFBUFNR = 0x400,
+! QF_GETLIST_ALL = 0x7FF,
+ };
+
+ /*
+***************
+*** 5977,5982 ****
+--- 5978,5994 ----
+ }
+
+ /*
++ * Returns the number of the buffer displayed in the quickfix/location list
++ * window. If there is no buffer associated with the list, then returns 0.
++ */
++ static int
++ qf_getprop_qfbufnr(qf_info_T *qi, dict_T *retdict)
++ {
++ return dict_add_number(retdict, "qfbufnr",
++ (qi == NULL) ? 0 : qi->qf_bufnr);
++ }
++
++ /*
+ * Convert the keys in 'what' to quickfix list property flags.
+ */
+ static int
+***************
+*** 6022,6027 ****
+--- 6034,6042 ----
+ if (loclist && dict_find(what, (char_u *)"filewinid", -1) != NULL)
+ flags |= QF_GETLIST_FILEWINID;
+
++ if (dict_find(what, (char_u *)"qfbufnr", -1) != NULL)
++ flags |= QF_GETLIST_QFBUFNR;
++
+ return flags;
+ }
+
+***************
+*** 6114,6119 ****
+--- 6129,6136 ----
+ status = dict_add_number(retdict, "changedtick", 0);
+ if ((status == OK) && locstack && (flags & QF_GETLIST_FILEWINID))
+ status = dict_add_number(retdict, "filewinid", 0);
++ if ((status == OK) && (flags & QF_GETLIST_QFBUFNR))
++ status = qf_getprop_qfbufnr(qi, retdict);
+
+ return status;
+ }
+***************
+*** 6259,6264 ****
+--- 6276,6283 ----
+ 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);
++ if ((status == OK) && (flags & QF_GETLIST_QFBUFNR))
++ status = qf_getprop_qfbufnr(qi, retdict);
+
+ return status;
+ }
+*** ../vim-8.1.1014/src/testdir/test_quickfix.vim 2019-03-02 07:57:12.236395037 +0100
+--- src/testdir/test_quickfix.vim 2019-03-17 16:34:27.019774609 +0100
+***************
+*** 3110,3128 ****
+ 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
+ let qfwinid = (a:cchar == 'c') ? win_getid() : 0
+ call assert_equal(qfwinid, g:Xgetlist({'winid' : 0}).winid)
+ Xclose
+
+--- 3110,3130 ----
+ 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, 'qfbufnr' : 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,
+! \ 'qfbufnr' : 0},
+ \ g:Xgetlist({'all' : 0}))
+ endif
+
+ " Quickfix window with empty stack
+ silent! Xopen
+ let qfwinid = (a:cchar == 'c') ? win_getid() : 0
++ let qfbufnr = (a:cchar == 'c') ? bufnr('') : 0
+ call assert_equal(qfwinid, g:Xgetlist({'winid' : 0}).winid)
+ Xclose
+
+***************
+*** 3154,3164 ****
+ 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
+
+--- 3156,3167 ----
+ if a:cchar == 'c'
+ call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [],
+ \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0,
++ \ 'qfbufnr' : qfbufnr,
+ \ '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, 'qfbufnr' : 0},
+ \ g:Xgetlist({'id' : qfid, 'all' : 0}))
+ endif
+
+***************
+*** 3175,3185 ****
+ 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
+--- 3178,3189 ----
+ if a:cchar == 'c'
+ call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [],
+ \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0,
+! \ 'changedtick' : 0, 'qfbufnr' : qfbufnr},
+! \ 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, 'qfbufnr' : 0},
+ \ g:Xgetlist({'nr' : 5, 'all' : 0}))
+ endif
+ endfunc
+***************
+*** 3912,3917 ****
+--- 3916,3922 ----
+ Xclose
+ " Even after the quickfix window is closed, the buffer should be loaded
+ call assert_true(bufloaded(qfbnum))
++ call assert_true(qfbnum, g:Xgetlist({'qfbufnr' : 0}).qfbufnr)
+ Xopen
+ " Buffer should be reused when opening the window again
+ call assert_equal(qfbnum, bufnr(''))
+***************
+*** 3930,3936 ****
+ close
+ " When the location list window is closed, the buffer name should not
+ " change to 'Quickfix List'
+! call assert_match(qfbnum . ' h- "\[Location List]"', execute('ls'))
+ call assert_true(bufloaded(qfbnum))
+
+ " After deleting a location list buffer using ":bdelete", opening the
+--- 3935,3941 ----
+ close
+ " When the location list window is closed, the buffer name should not
+ " change to 'Quickfix List'
+! call assert_match(qfbnum . 'u h- "\[Location List]"', execute('ls!'))
+ call assert_true(bufloaded(qfbnum))
+
+ " After deleting a location list buffer using ":bdelete", opening the
+***************
+*** 3947,3952 ****
+--- 3952,3958 ----
+ " removed
+ call setloclist(0, [], 'f')
+ call assert_false(bufexists(qfbnum))
++ call assert_equal(0, getloclist(0, {'qfbufnr' : 0}).qfbufnr)
+
+ " When the location list is freed with the location list window open, the
+ " location list buffer should not be lost. It should be reused when the
+*** ../vim-8.1.1014/src/window.c 2019-03-04 13:18:15.973053562 +0100
+--- src/window.c 2019-03-17 16:36:49.002856677 +0100
+***************
+*** 2382,2399 ****
+ }
+
+ #ifdef FEAT_GUI
+! /* Avoid trouble with scrollbars that are going to be deleted in
+! * win_free(). */
+ if (gui.in_use)
+ out_flush();
+ #endif
+
+ #ifdef FEAT_SYN_HL
+! /* Free independent synblock before the buffer is freed. */
+ if (win->w_buffer != NULL)
+ reset_synblock(win);
+ #endif
+
+ /*
+ * Close the link to the buffer.
+ */
+--- 2382,2405 ----
+ }
+
+ #ifdef FEAT_GUI
+! // Avoid trouble with scrollbars that are going to be deleted in
+! // win_free().
+ if (gui.in_use)
+ out_flush();
+ #endif
+
+ #ifdef FEAT_SYN_HL
+! // Free independent synblock before the buffer is freed.
+ if (win->w_buffer != NULL)
+ reset_synblock(win);
+ #endif
+
++ #ifdef FEAT_QUICKFIX
++ // When the quickfix/location list window is closed, unlist the buffer.
++ if (win->w_buffer != NULL && bt_quickfix(win->w_buffer))
++ win->w_buffer->b_p_bl = FALSE;
++ #endif
++
+ /*
+ * Close the link to the buffer.
+ */
+*** ../vim-8.1.1014/src/version.c 2019-03-17 15:47:22.589492071 +0100
+--- src/version.c 2019-03-17 16:33:12.068262826 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1015,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+79. All of your most erotic dreams have a scrollbar at the right side.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1016 b/data/vim/patches/8.1.1016
new file mode 100644
index 000000000..b4ce829da
--- /dev/null
+++ b/data/vim/patches/8.1.1016
@@ -0,0 +1,189 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1016
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1016
+Problem: MS-Windows: No color in shell when using "!" in 'guioptions.
+Solution: Don't stop termcap when using a terminal window for the shell.
+ (vim-jp, closes #4117)
+Files: src/ex_cmds.c
+
+
+*** ../vim-8.1.1015/src/ex_cmds.c 2019-02-20 22:18:59.990044254 +0100
+--- src/ex_cmds.c 2019-03-17 16:56:37.691336310 +0100
+***************
+*** 1542,1547 ****
+--- 1542,1548 ----
+ #endif
+ #ifdef MSWIN
+ int winstart = FALSE;
++ int keep_termcap = FALSE;
+ #endif
+
+ /*
+***************
+*** 1557,1604 ****
+
+ #ifdef MSWIN
+ /*
+! * Check if ":!start" is used.
+ */
+ if (cmd != NULL)
+! winstart = (STRNICMP(cmd, "start ", 6) == 0);
+ #endif
+
+ /*
+ * For autocommands we want to get the output on the current screen, to
+ * avoid having to type return below.
+ */
+! msg_putchar('\r'); /* put cursor at start of line */
+ if (!autocmd_busy)
+ {
+ #ifdef MSWIN
+! if (!winstart)
+ #endif
+ stoptermcap();
+ }
+ #ifdef MSWIN
+ if (!winstart)
+ #endif
+! msg_putchar('\n'); /* may shift screen one line up */
+
+! /* warning message before calling the shell */
+ if (p_warn && !autocmd_busy && msg_silent == 0)
+ FOR_ALL_BUFFERS(buf)
+ if (bufIsChangedNotTerm(buf))
+ {
+ #ifdef FEAT_GUI_MSWIN
+! if (!winstart)
+! starttermcap(); /* don't want a message box here */
+ #endif
+ msg_puts(_("[No write since last change]\n"));
+ #ifdef FEAT_GUI_MSWIN
+! if (!winstart)
+ stoptermcap();
+ #endif
+ break;
+ }
+
+! /* This windgoto is required for when the '\n' resulted in a "delete line
+! * 1" command to the terminal. */
+ if (!swapping_screen())
+ windgoto(msg_row, msg_col);
+ cursor_on();
+--- 1558,1611 ----
+
+ #ifdef MSWIN
+ /*
+! * Check if ":!start" is used. This implies not stopping termcap mode.
+ */
+ if (cmd != NULL)
+! keep_termcap = winstart = (STRNICMP(cmd, "start ", 6) == 0);
+!
+! # if defined(FEAT_GUI) && defined(FEAT_TERMINAL)
+! // Don't stop termcap mode when using a terminal window for the shell.
+! if (gui.in_use && vim_strchr(p_go, GO_TERMINAL) != NULL)
+! keep_termcap = TRUE;
+! # endif
+ #endif
+
+ /*
+ * For autocommands we want to get the output on the current screen, to
+ * avoid having to type return below.
+ */
+! msg_putchar('\r'); // put cursor at start of line
+ if (!autocmd_busy)
+ {
+ #ifdef MSWIN
+! if (!keep_termcap)
+ #endif
+ stoptermcap();
+ }
+ #ifdef MSWIN
+ if (!winstart)
+ #endif
+! msg_putchar('\n'); // may shift screen one line up
+
+! // warning message before calling the shell
+ if (p_warn && !autocmd_busy && msg_silent == 0)
+ FOR_ALL_BUFFERS(buf)
+ if (bufIsChangedNotTerm(buf))
+ {
+ #ifdef FEAT_GUI_MSWIN
+! if (!keep_termcap)
+! starttermcap(); // don't want a message box here
+ #endif
+ msg_puts(_("[No write since last change]\n"));
+ #ifdef FEAT_GUI_MSWIN
+! if (!keep_termcap)
+ stoptermcap();
+ #endif
+ break;
+ }
+
+! // This windgoto is required for when the '\n' resulted in a "delete line
+! // 1" command to the terminal.
+ if (!swapping_screen())
+ windgoto(msg_row, msg_col);
+ cursor_on();
+***************
+*** 1632,1638 ****
+ #ifndef FEAT_GUI_MSWIN
+ if (cmd == NULL
+ # ifdef MSWIN
+! || (winstart && !need_wait_return)
+ # endif
+ )
+ {
+--- 1639,1645 ----
+ #ifndef FEAT_GUI_MSWIN
+ if (cmd == NULL
+ # ifdef MSWIN
+! || (keep_termcap && !need_wait_return)
+ # endif
+ )
+ {
+***************
+*** 1659,1667 ****
+ #endif /* FEAT_GUI_MSWIN */
+
+ #ifdef MSWIN
+! if (!winstart) /* if winstart==TRUE, never stopped termcap! */
+ #endif
+! starttermcap(); /* start termcap if not done by wait_return() */
+
+ /*
+ * In an Amiga window redrawing is caused by asking the window size.
+--- 1666,1674 ----
+ #endif /* FEAT_GUI_MSWIN */
+
+ #ifdef MSWIN
+! if (!keep_termcap) // if keep_termcap is TRUE didn't stop termcap
+ #endif
+! starttermcap(); // start termcap if not done by wait_return()
+
+ /*
+ * In an Amiga window redrawing is caused by asking the window size.
+*** ../vim-8.1.1015/src/version.c 2019-03-17 16:39:01.566006172 +0100
+--- src/version.c 2019-03-17 16:58:06.018782269 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1016,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+80. At parties, you introduce your spouse as your "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.1017 b/data/vim/patches/8.1.1017
new file mode 100644
index 000000000..dbe34952c
--- /dev/null
+++ b/data/vim/patches/8.1.1017
@@ -0,0 +1,132 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1017
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1017
+Problem: Off-by-one error in filetype detection.
+Solution: Also check the last line of the file.
+Files: runtime/autoload/dist/ft.vim
+
+
+*** ../vim-8.1.1016/runtime/autoload/dist/ft.vim 2019-01-18 21:45:14.593232311 +0100
+--- runtime/autoload/dist/ft.vim 2019-03-08 07:47:10.095812063 +0100
+***************
+*** 197,203 ****
+ exe 'setf ' . g:filetype_euphoria
+ else
+ let n = 1
+! while n < 100 && n < line("$")
+ if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$"
+ setf specman
+ return
+--- 197,203 ----
+ exe 'setf ' . g:filetype_euphoria
+ else
+ let n = 1
+! while n < 100 && n <= line("$")
+ if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$"
+ setf specman
+ return
+***************
+*** 211,217 ****
+ " Distinguish between HTML, XHTML and Django
+ func dist#ft#FThtml()
+ let n = 1
+! while n < 10 && n < line("$")
+ if getline(n) =~ '\<DTD\s\+XHTML\s'
+ setf xhtml
+ return
+--- 211,217 ----
+ " Distinguish between HTML, XHTML and Django
+ func dist#ft#FThtml()
+ let n = 1
+! while n < 10 && n <= line("$")
+ if getline(n) =~ '\<DTD\s\+XHTML\s'
+ setf xhtml
+ return
+***************
+*** 222,234 ****
+ endif
+ let n = n + 1
+ endwhile
+! setf html
+ endfunc
+
+ " Distinguish between standard IDL and MS-IDL
+ func dist#ft#FTidl()
+ let n = 1
+! while n < 50 && n < line("$")
+ if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"'
+ setf msidl
+ return
+--- 222,234 ----
+ endif
+ let n = n + 1
+ endwhile
+! setf FALLBACK html
+ endfunc
+
+ " Distinguish between standard IDL and MS-IDL
+ func dist#ft#FTidl()
+ let n = 1
+! while n < 50 && n <= line("$")
+ if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"'
+ setf msidl
+ return
+***************
+*** 699,705 ****
+
+ func dist#ft#FTxml()
+ let n = 1
+! while n < 100 && n < line("$")
+ let line = getline(n)
+ " DocBook 4 or DocBook 5.
+ let is_docbook4 = line =~ '<!DOCTYPE.*DocBook'
+--- 699,705 ----
+
+ func dist#ft#FTxml()
+ let n = 1
+! while n < 100 && n <= line("$")
+ let line = getline(n)
+ " DocBook 4 or DocBook 5.
+ let is_docbook4 = line =~ '<!DOCTYPE.*DocBook'
+***************
+*** 725,731 ****
+
+ func dist#ft#FTy()
+ let n = 1
+! while n < 100 && n < line("$")
+ let line = getline(n)
+ if line =~ '^\s*%'
+ setf yacc
+--- 725,731 ----
+
+ func dist#ft#FTy()
+ let n = 1
+! while n < 100 && n <= line("$")
+ let line = getline(n)
+ if line =~ '^\s*%'
+ setf yacc
+*** ../vim-8.1.1016/src/version.c 2019-03-17 16:59:38.582201903 +0100
+--- src/version.c 2019-03-17 17:15:09.505371214 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1017,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+82. AT&T names you Customer of the Month for the third consecutive 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.1018 b/data/vim/patches/8.1.1018
new file mode 100644
index 000000000..1abf17a11
--- /dev/null
+++ b/data/vim/patches/8.1.1018
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1018
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1018
+Problem: Window cleared when entering Terminal-Normal twice. (Epheien)
+Solution: Don't cleanup scrollback when there is no postponed scrollback.
+ (Christian Brabandt, closes #4126)
+Files: src/terminal.c
+
+
+*** ../vim-8.1.1017/src/terminal.c 2019-02-25 06:28:53.754677936 +0100
+--- src/terminal.c 2019-03-19 20:49:51.138615634 +0100
+***************
+*** 2952,2958 ****
+ {
+ int i;
+
+! ch_log(NULL, "Moving postponed scrollback to scrollback");
+ // First remove the lines that were appended before, the pushed lines go
+ // above it.
+ cleanup_scrollback(term);
+--- 2952,2961 ----
+ {
+ int i;
+
+! if (term->tl_scrollback_postponed.ga_len == 0)
+! return;
+! ch_log(NULL, "Moving postponed scrollback to scrollback");
+!
+ // First remove the lines that were appended before, the pushed lines go
+ // above it.
+ cleanup_scrollback(term);
+*** ../vim-8.1.1017/src/version.c 2019-03-17 17:16:01.917080501 +0100
+--- src/version.c 2019-03-19 20:48:59.007255224 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1018,
+ /**/
+
+--
+From "know your smileys":
+ ~#:-( I just washed my hair, and I can't do nuthin' with 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.1019 b/data/vim/patches/8.1.1019
new file mode 100644
index 000000000..013f436ae
--- /dev/null
+++ b/data/vim/patches/8.1.1019
@@ -0,0 +1,671 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1019
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1019
+Problem: Lua: may garbage collect function reference in use.
+Solution: Keep the function name instead of the typeval. Make luaV_setref()
+ handle funcref objects. (Ozaki Kiichi, closes #4127)
+Files: src/if_lua.c, src/testdir/test_lua.vim
+
+
+*** ../vim-8.1.1018/src/if_lua.c 2019-03-16 16:38:37.560654505 +0100
+--- src/if_lua.c 2019-03-19 21:57:33.226164566 +0100
+***************
+*** 29,36 ****
+ typedef dict_T *luaV_Dict;
+ typedef list_T *luaV_List;
+ typedef struct {
+! typval_T tv; // funcref
+! typval_T args;
+ dict_T *self; // selfdict
+ } luaV_Funcref;
+ typedef void (*msgfunc_T)(char_u *);
+--- 29,35 ----
+ typedef dict_T *luaV_Dict;
+ typedef list_T *luaV_List;
+ typedef struct {
+! char_u *name; // funcref
+ dict_T *self; // selfdict
+ } luaV_Funcref;
+ typedef void (*msgfunc_T)(char_u *);
+***************
+*** 69,75 ****
+
+ static luaV_List *luaV_pushlist(lua_State *L, list_T *lis);
+ static luaV_Dict *luaV_pushdict(lua_State *L, dict_T *dic);
+! static luaV_Funcref *luaV_pushfuncref(lua_State *L, typval_T *tv);
+
+ #if LUA_VERSION_NUM <= 501
+ #define luaV_openlib(L, l, n) luaL_openlib(L, NULL, l, n)
+--- 68,74 ----
+
+ static luaV_List *luaV_pushlist(lua_State *L, list_T *lis);
+ static luaV_Dict *luaV_pushdict(lua_State *L, dict_T *dic);
+! static luaV_Funcref *luaV_pushfuncref(lua_State *L, char_u *name);
+
+ #if LUA_VERSION_NUM <= 501
+ #define luaV_openlib(L, l, n) luaL_openlib(L, NULL, l, n)
+***************
+*** 443,449 ****
+
+ #if LUA_VERSION_NUM > 501
+ static int
+! luaL_typeerror (lua_State *L, int narg, const char *tname)
+ {
+ const char *msg = lua_pushfstring(L, "%s expected, got %s",
+ tname, luaL_typename(L, narg));
+--- 442,448 ----
+
+ #if LUA_VERSION_NUM > 501
+ static int
+! luaL_typeerror(lua_State *L, int narg, const char *tname)
+ {
+ const char *msg = lua_pushfstring(L, "%s expected, got %s",
+ tname, luaL_typename(L, narg));
+***************
+*** 540,546 ****
+ lua_pushnil(L);
+ break;
+ case VAR_FUNC:
+! luaV_pushfuncref(L, tv);
+ break;
+ default:
+ lua_pushnil(L);
+--- 539,545 ----
+ lua_pushnil(L);
+ break;
+ case VAR_FUNC:
+! luaV_pushfuncref(L, tv->vval.v_string);
+ break;
+ default:
+ lua_pushnil(L);
+***************
+*** 610,616 ****
+ if (lua_rawequal(L, -1, -4))
+ {
+ luaV_Funcref *f = (luaV_Funcref *) p;
+! copy_tv(&f->tv, tv);
+ lua_pop(L, 4); /* MTs */
+ break;
+ }
+--- 609,617 ----
+ if (lua_rawequal(L, -1, -4))
+ {
+ luaV_Funcref *f = (luaV_Funcref *) p;
+! func_ref(f->name);
+! tv->v_type = VAR_FUNC;
+! tv->vval.v_string = vim_strsave(f->name);
+ lua_pop(L, 4); /* MTs */
+ break;
+ }
+***************
+*** 693,699 ****
+
+ #define luaV_newtype(typ,tname,luatyp,luatname) \
+ static luatyp * \
+! luaV_new##tname (lua_State *L, typ *obj) \
+ { \
+ luatyp *o = (luatyp *) lua_newuserdata(L, sizeof(luatyp)); \
+ *o = obj; \
+--- 694,700 ----
+
+ #define luaV_newtype(typ,tname,luatyp,luatname) \
+ static luatyp * \
+! luaV_new##tname(lua_State *L, typ *obj) \
+ { \
+ luatyp *o = (luatyp *) lua_newuserdata(L, sizeof(luatyp)); \
+ *o = obj; \
+***************
+*** 725,731 ****
+
+ #define luaV_type_tostring(tname,luatname) \
+ static int \
+! luaV_##tname##_tostring (lua_State *L) \
+ { \
+ lua_pushfstring(L, "%s: %p", luatname, lua_touserdata(L, 1)); \
+ return 1; \
+--- 726,732 ----
+
+ #define luaV_type_tostring(tname,luatname) \
+ static int \
+! luaV_##tname##_tostring(lua_State *L) \
+ { \
+ lua_pushfstring(L, "%s: %p", luatname, lua_touserdata(L, 1)); \
+ return 1; \
+***************
+*** 734,740 ****
+ /* ======= List type ======= */
+
+ static luaV_List *
+! luaV_newlist (lua_State *L, list_T *lis)
+ {
+ luaV_List *l = (luaV_List *) lua_newuserdata(L, sizeof(luaV_List));
+ *l = lis;
+--- 735,741 ----
+ /* ======= List type ======= */
+
+ static luaV_List *
+! luaV_newlist(lua_State *L, list_T *lis)
+ {
+ luaV_List *l = (luaV_List *) lua_newuserdata(L, sizeof(luaV_List));
+ *l = lis;
+***************
+*** 749,755 ****
+ luaV_type_tostring(list, LUAVIM_LIST)
+
+ static int
+! luaV_list_len (lua_State *L)
+ {
+ list_T *l = luaV_unbox(L, luaV_List, 1);
+ lua_pushinteger(L, (l == NULL) ? 0 : (int) l->lv_len);
+--- 750,756 ----
+ luaV_type_tostring(list, LUAVIM_LIST)
+
+ static int
+! luaV_list_len(lua_State *L)
+ {
+ list_T *l = luaV_unbox(L, luaV_List, 1);
+ lua_pushinteger(L, (l == NULL) ? 0 : (int) l->lv_len);
+***************
+*** 757,763 ****
+ }
+
+ static int
+! luaV_list_iter (lua_State *L)
+ {
+ listitem_T *li = (listitem_T *) lua_touserdata(L, lua_upvalueindex(2));
+ if (li == NULL) return 0;
+--- 758,764 ----
+ }
+
+ static int
+! luaV_list_iter(lua_State *L)
+ {
+ listitem_T *li = (listitem_T *) lua_touserdata(L, lua_upvalueindex(2));
+ if (li == NULL) return 0;
+***************
+*** 768,774 ****
+ }
+
+ static int
+! luaV_list_call (lua_State *L)
+ {
+ list_T *l = luaV_unbox(L, luaV_List, 1);
+ lua_pushvalue(L, lua_upvalueindex(1)); /* pass cache table along */
+--- 769,775 ----
+ }
+
+ static int
+! luaV_list_call(lua_State *L)
+ {
+ list_T *l = luaV_unbox(L, luaV_List, 1);
+ lua_pushvalue(L, lua_upvalueindex(1)); /* pass cache table along */
+***************
+*** 778,784 ****
+ }
+
+ static int
+! luaV_list_index (lua_State *L)
+ {
+ list_T *l = luaV_unbox(L, luaV_List, 1);
+ if (lua_isnumber(L, 2)) /* list item? */
+--- 779,785 ----
+ }
+
+ static int
+! luaV_list_index(lua_State *L)
+ {
+ list_T *l = luaV_unbox(L, luaV_List, 1);
+ if (lua_isnumber(L, 2)) /* list item? */
+***************
+*** 807,813 ****
+ }
+
+ static int
+! luaV_list_newindex (lua_State *L)
+ {
+ list_T *l = luaV_unbox(L, luaV_List, 1);
+ long n = (long) luaL_checkinteger(L, 2);
+--- 808,814 ----
+ }
+
+ static int
+! luaV_list_newindex(lua_State *L)
+ {
+ list_T *l = luaV_unbox(L, luaV_List, 1);
+ long n = (long) luaL_checkinteger(L, 2);
+***************
+*** 834,840 ****
+ }
+
+ static int
+! luaV_list_add (lua_State *L)
+ {
+ luaV_List *lis = luaV_checkudata(L, 1, LUAVIM_LIST);
+ list_T *l = (list_T *) luaV_checkcache(L, (void *) *lis);
+--- 835,841 ----
+ }
+
+ static int
+! luaV_list_add(lua_State *L)
+ {
+ luaV_List *lis = luaV_checkudata(L, 1, LUAVIM_LIST);
+ list_T *l = (list_T *) luaV_checkcache(L, (void *) *lis);
+***************
+*** 851,857 ****
+ }
+
+ static int
+! luaV_list_insert (lua_State *L)
+ {
+ luaV_List *lis = luaV_checkudata(L, 1, LUAVIM_LIST);
+ list_T *l = (list_T *) luaV_checkcache(L, (void *) *lis);
+--- 852,858 ----
+ }
+
+ static int
+! luaV_list_insert(lua_State *L)
+ {
+ luaV_List *lis = luaV_checkudata(L, 1, LUAVIM_LIST);
+ list_T *l = (list_T *) luaV_checkcache(L, (void *) *lis);
+***************
+*** 890,896 ****
+ /* ======= Dict type ======= */
+
+ static luaV_Dict *
+! luaV_newdict (lua_State *L, dict_T *dic)
+ {
+ luaV_Dict *d = (luaV_Dict *) lua_newuserdata(L, sizeof(luaV_Dict));
+ *d = dic;
+--- 891,897 ----
+ /* ======= Dict type ======= */
+
+ static luaV_Dict *
+! luaV_newdict(lua_State *L, dict_T *dic)
+ {
+ luaV_Dict *d = (luaV_Dict *) lua_newuserdata(L, sizeof(luaV_Dict));
+ *d = dic;
+***************
+*** 905,911 ****
+ luaV_type_tostring(dict, LUAVIM_DICT)
+
+ static int
+! luaV_dict_len (lua_State *L)
+ {
+ dict_T *d = luaV_unbox(L, luaV_Dict, 1);
+ lua_pushinteger(L, (d == NULL) ? 0 : (int) d->dv_hashtab.ht_used);
+--- 906,912 ----
+ luaV_type_tostring(dict, LUAVIM_DICT)
+
+ static int
+! luaV_dict_len(lua_State *L)
+ {
+ dict_T *d = luaV_unbox(L, luaV_Dict, 1);
+ lua_pushinteger(L, (d == NULL) ? 0 : (int) d->dv_hashtab.ht_used);
+***************
+*** 913,919 ****
+ }
+
+ static int
+! luaV_dict_iter (lua_State *L UNUSED)
+ {
+ #ifdef FEAT_EVAL
+ hashitem_T *hi = (hashitem_T *) lua_touserdata(L, lua_upvalueindex(2));
+--- 914,920 ----
+ }
+
+ static int
+! luaV_dict_iter(lua_State *L UNUSED)
+ {
+ #ifdef FEAT_EVAL
+ hashitem_T *hi = (hashitem_T *) lua_touserdata(L, lua_upvalueindex(2));
+***************
+*** 935,941 ****
+ }
+
+ static int
+! luaV_dict_call (lua_State *L)
+ {
+ dict_T *d = luaV_unbox(L, luaV_Dict, 1);
+ hashtab_T *ht = &d->dv_hashtab;
+--- 936,942 ----
+ }
+
+ static int
+! luaV_dict_call(lua_State *L)
+ {
+ dict_T *d = luaV_unbox(L, luaV_Dict, 1);
+ hashtab_T *ht = &d->dv_hashtab;
+***************
+*** 1037,1047 ****
+
+ if (name != NULL)
+ {
+! func_ref(name); /* as in copy_tv */
+! f->tv.vval.v_string = vim_strsave(name);
+ }
+- f->tv.v_type = VAR_FUNC;
+- f->args.v_type = VAR_LIST;
+ f->self = NULL;
+ luaV_getfield(L, LUAVIM_FUNCREF);
+ lua_setmetatable(L, -2);
+--- 1038,1046 ----
+
+ if (name != NULL)
+ {
+! func_ref(name);
+! f->name = vim_strsave(name);
+ }
+ f->self = NULL;
+ luaV_getfield(L, LUAVIM_FUNCREF);
+ lua_setmetatable(L, -2);
+***************
+*** 1049,1060 ****
+ }
+
+ static luaV_Funcref *
+! luaV_pushfuncref(lua_State *L, typval_T *tv)
+ {
+! luaV_Funcref *f = luaV_newfuncref(L, NULL);
+! copy_tv(tv, &f->tv);
+! clear_tv(tv);
+! return f;
+ }
+
+
+--- 1048,1056 ----
+ }
+
+ static luaV_Funcref *
+! luaV_pushfuncref(lua_State *L, char_u *name)
+ {
+! return luaV_newfuncref(L, name);
+ }
+
+
+***************
+*** 1065,1073 ****
+ {
+ luaV_Funcref *f = (luaV_Funcref *) lua_touserdata(L, 1);
+
+! func_unref(f->tv.vval.v_string);
+! vim_free(f->tv.vval.v_string);
+! dict_unref(f->self);
+ return 0;
+ }
+
+--- 1061,1070 ----
+ {
+ luaV_Funcref *f = (luaV_Funcref *) lua_touserdata(L, 1);
+
+! func_unref(f->name);
+! vim_free(f->name);
+! // NOTE: Don't call "dict_unref(f->self)", because the dict of "f->self"
+! // will be (or has been already) freed by Vim's garbage collection.
+ return 0;
+ }
+
+***************
+*** 1077,1083 ****
+ {
+ luaV_Funcref *f = (luaV_Funcref *) lua_touserdata(L, 1);
+
+! lua_pushstring(L, (const char *) f->tv.vval.v_string);
+ return 1;
+ }
+
+--- 1074,1080 ----
+ {
+ luaV_Funcref *f = (luaV_Funcref *) lua_touserdata(L, 1);
+
+! lua_pushstring(L, (const char *) f->name);
+ return 1;
+ }
+
+***************
+*** 1085,1111 ****
+ luaV_funcref_call(lua_State *L)
+ {
+ luaV_Funcref *f = (luaV_Funcref *) lua_touserdata(L, 1);
+! int i, n = lua_gettop(L) - 1; /* #args */
+! int status;
+! typval_T v, rettv;
+!
+! f->args.vval.v_list = list_alloc();
+! rettv.v_type = VAR_UNKNOWN; /* as in clear_tv */
+! if (f->args.vval.v_list == NULL)
+! status = FAIL;
+! else
+ {
+ for (i = 0; i < n; i++)
+ {
+ luaV_checktypval(L, i + 2, &v, "calling funcref");
+! list_append_tv(f->args.vval.v_list, &v);
+ clear_tv(&v);
+ }
+! status = func_call(f->tv.vval.v_string, &f->args,
+! NULL, f->self, &rettv);
+ if (status == OK)
+ luaV_pushtypval(L, &rettv);
+! clear_tv(&f->args);
+ clear_tv(&rettv);
+ }
+ if (status != OK)
+--- 1082,1109 ----
+ luaV_funcref_call(lua_State *L)
+ {
+ luaV_Funcref *f = (luaV_Funcref *) lua_touserdata(L, 1);
+! int i, n = lua_gettop(L) - 1; // #args
+! int status = FAIL;
+! typval_T args;
+! typval_T rettv;
+!
+! args.v_type = VAR_LIST;
+! args.vval.v_list = list_alloc();
+! rettv.v_type = VAR_UNKNOWN; // as in clear_tv
+! if (args.vval.v_list != NULL)
+ {
++ typval_T v;
++
+ for (i = 0; i < n; i++)
+ {
+ luaV_checktypval(L, i + 2, &v, "calling funcref");
+! list_append_tv(args.vval.v_list, &v);
+ clear_tv(&v);
+ }
+! status = func_call(f->name, &args, NULL, f->self, &rettv);
+ if (status == OK)
+ luaV_pushtypval(L, &rettv);
+! clear_tv(&args);
+ clear_tv(&rettv);
+ }
+ if (status != OK)
+***************
+*** 1368,1374 ****
+ }
+
+ static int
+! luaV_window_newindex (lua_State *L)
+ {
+ win_T *w = (win_T *) luaV_checkvalid(L, luaV_Window, 1);
+ const char *s = luaL_checkstring(L, 2);
+--- 1366,1372 ----
+ }
+
+ static int
+! luaV_window_newindex(lua_State *L)
+ {
+ win_T *w = (win_T *) luaV_checkvalid(L, luaV_Window, 1);
+ const char *s = luaL_checkstring(L, 2);
+***************
+*** 1768,1774 ****
+ }
+
+ static int
+! luaV_luaeval (lua_State *L)
+ {
+ luaL_Buffer b;
+ size_t l;
+--- 1766,1772 ----
+ }
+
+ static int
+! luaV_luaeval(lua_State *L)
+ {
+ luaL_Buffer b;
+ size_t l;
+***************
+*** 1797,1828 ****
+ }
+
+ static int
+! luaV_setref (lua_State *L)
+ {
+! int copyID = lua_tointeger(L, 1);
+! int abort = FALSE;
+! typval_T tv;
+
+ luaV_getfield(L, LUAVIM_LIST);
+ luaV_getfield(L, LUAVIM_DICT);
+ lua_pushnil(L);
+! /* traverse cache table */
+ while (!abort && lua_next(L, lua_upvalueindex(1)) != 0)
+ {
+ lua_getmetatable(L, -1);
+! if (lua_rawequal(L, -1, 2)) /* list? */
+ {
+! tv.v_type = VAR_LIST;
+! tv.vval.v_list = (list_T *) lua_touserdata(L, 4); /* key */
+! abort = set_ref_in_item(&tv, copyID, NULL, NULL);
+ }
+! else if (lua_rawequal(L, -1, 3)) /* dict? */
+ {
+! tv.v_type = VAR_DICT;
+! tv.vval.v_dict = (dict_T *) lua_touserdata(L, 4); /* key */
+! abort = set_ref_in_item(&tv, copyID, NULL, NULL);
+ }
+! lua_pop(L, 2); /* metatable and value */
+ }
+ lua_pushinteger(L, abort);
+ return 1;
+--- 1795,1844 ----
+ }
+
+ static int
+! luaV_setref(lua_State *L)
+ {
+! int copyID = lua_tointeger(L, 1);
+! int abort = FALSE;
+
+ luaV_getfield(L, LUAVIM_LIST);
+ luaV_getfield(L, LUAVIM_DICT);
++ luaV_getfield(L, LUAVIM_FUNCREF);
+ lua_pushnil(L);
+! // traverse cache table
+ while (!abort && lua_next(L, lua_upvalueindex(1)) != 0)
+ {
+ lua_getmetatable(L, -1);
+! if (lua_rawequal(L, -1, 2)) // list?
+! {
+! list_T *l = (list_T *)lua_touserdata(L, 5); // key
+!
+! if (l->lv_copyID != copyID)
+! {
+! l->lv_copyID = copyID;
+! abort = set_ref_in_list(l, copyID, NULL);
+! }
+! }
+! else if (lua_rawequal(L, -1, 3)) // dict?
+ {
+! dict_T *d = (dict_T *)lua_touserdata(L, 5); // key
+!
+! if (d->dv_copyID != copyID)
+! {
+! d->dv_copyID = copyID;
+! abort = set_ref_in_ht(&d->dv_hashtab, copyID, NULL);
+! }
+ }
+! else if (lua_rawequal(L, -1, 4)) // funcref?
+ {
+! luaV_Funcref *f = (luaV_Funcref *)lua_touserdata(L, 5); // key
+!
+! if (f->self != NULL && f->self->dv_copyID != copyID)
+! {
+! f->self->dv_copyID = copyID;
+! abort = set_ref_in_ht(&f->self->dv_hashtab, copyID, NULL);
+! }
+ }
+! lua_pop(L, 2); // metatable and value
+ }
+ lua_pushinteger(L, abort);
+ return 1;
+***************
+*** 2053,2059 ****
+ luaV_freetype(win_T, window)
+
+ void
+! do_luaeval (char_u *str, typval_T *arg, typval_T *rettv)
+ {
+ lua_init();
+ luaV_getfield(L, LUAVIM_LUAEVAL);
+--- 2069,2075 ----
+ luaV_freetype(win_T, window)
+
+ void
+! do_luaeval(char_u *str, typval_T *arg, typval_T *rettv)
+ {
+ lua_init();
+ luaV_getfield(L, LUAVIM_LUAEVAL);
+***************
+*** 2064,2070 ****
+ }
+
+ int
+! set_ref_in_lua (int copyID)
+ {
+ int aborted = 0;
+
+--- 2080,2086 ----
+ }
+
+ int
+! set_ref_in_lua(int copyID)
+ {
+ int aborted = 0;
+
+*** ../vim-8.1.1018/src/testdir/test_lua.vim 2019-03-10 09:48:55.711808501 +0100
+--- src/testdir/test_lua.vim 2019-03-19 21:50:17.437605532 +0100
+***************
+*** 449,454 ****
+--- 449,455 ----
+ lua d.len = vim.funcref"Mylen" -- assign d as 'self'
+ lua res = (d.len() == vim.funcref"len"(vim.eval"l")) and "OK" or "FAIL"
+ call assert_equal("OK", luaeval('res'))
++ call assert_equal(function('Mylen', {'data': l, 'len': function('Mylen')}), mydict.len)
+
+ lua i1, i2, msg, d, res = nil
+ endfunc
+*** ../vim-8.1.1018/src/version.c 2019-03-19 20:50:40.290035255 +0100
+--- src/version.c 2019-03-19 21:53:59.151973880 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1019,
+ /**/
+
+--
+From "know your smileys":
+ :-O>-o Smiley American tourist (note big mouth and camera)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1020 b/data/vim/patches/8.1.1020
new file mode 100644
index 000000000..c069866af
--- /dev/null
+++ b/data/vim/patches/8.1.1020
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1020
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1020
+Problem: Compiler warning for Python3 interface.
+Solution: Add type cast. (Ozaki Kiichi, closes #4128, closes #4103)
+Files: src/if_python3.c
+
+
+*** ../vim-8.1.1019/src/if_python3.c 2019-02-18 22:04:52.949609091 +0100
+--- src/if_python3.c 2019-03-19 22:08:39.907136767 +0100
+***************
+*** 799,808 ****
+ */
+ #include "if_py_both.h"
+
+ #define GET_ATTR_STRING(name, nameobj) \
+ char *name = ""; \
+ if (PyUnicode_Check(nameobj)) \
+! name = _PyUnicode_AsString(nameobj)
+
+ #define PY3OBJ_DELETED(obj) (obj->ob_base.ob_refcnt<=0)
+
+--- 799,809 ----
+ */
+ #include "if_py_both.h"
+
++ // NOTE: Must always be used at the start of a block, since it declares "name".
+ #define GET_ATTR_STRING(name, nameobj) \
+ char *name = ""; \
+ if (PyUnicode_Check(nameobj)) \
+! name = (char *)_PyUnicode_AsString(nameobj)
+
+ #define PY3OBJ_DELETED(obj) (obj->ob_base.ob_refcnt<=0)
+
+*** ../vim-8.1.1019/src/version.c 2019-03-19 21:59:16.268914799 +0100
+--- src/version.c 2019-03-19 22:09:49.170503232 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1020,
+ /**/
+
+--
+From "know your smileys":
+ :-)-O Smiling doctor with stethoscope
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1021 b/data/vim/patches/8.1.1021
new file mode 100644
index 000000000..b4cc9188d
--- /dev/null
+++ b/data/vim/patches/8.1.1021
@@ -0,0 +1,163 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1021
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1021
+Problem: pyeval() and py3eval() leak memory.
+Solution: Do not increase the reference count twice. (Ozaki Kiichi,
+ closes #4129)
+Files: src/if_python.c, src/if_python3.c
+
+
+*** ../vim-8.1.1020/src/if_python.c 2019-02-18 22:04:52.949609091 +0100
+--- src/if_python.c 2019-03-19 22:21:25.028534491 +0100
+***************
+*** 1555,1584 ****
+ }
+
+ void
+! do_pyeval (char_u *str, typval_T *rettv)
+ {
+ DoPyCommand((char *) str,
+ (rangeinitializer) init_range_eval,
+ (runner) run_eval,
+ (void *) rettv);
+! switch (rettv->v_type)
+ {
+! case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
+! case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
+! case VAR_FUNC: func_ref(rettv->vval.v_string); break;
+! case VAR_PARTIAL: ++rettv->vval.v_partial->pt_refcount; break;
+! case VAR_UNKNOWN:
+! rettv->v_type = VAR_NUMBER;
+! rettv->vval.v_number = 0;
+! break;
+! case VAR_NUMBER:
+! case VAR_STRING:
+! case VAR_FLOAT:
+! case VAR_SPECIAL:
+! case VAR_JOB:
+! case VAR_CHANNEL:
+! case VAR_BLOB:
+! break;
+ }
+ }
+
+--- 1555,1570 ----
+ }
+
+ void
+! do_pyeval(char_u *str, typval_T *rettv)
+ {
+ DoPyCommand((char *) str,
+ (rangeinitializer) init_range_eval,
+ (runner) run_eval,
+ (void *) rettv);
+! if (rettv->v_type == VAR_UNKNOWN)
+ {
+! rettv->v_type = VAR_NUMBER;
+! rettv->vval.v_number = 0;
+ }
+ }
+
+***************
+*** 1594,1600 ****
+ #endif /* Python 1.4 */
+
+ int
+! set_ref_in_python (int copyID)
+ {
+ return set_ref_in_py(copyID);
+ }
+--- 1580,1586 ----
+ #endif /* Python 1.4 */
+
+ int
+! set_ref_in_python(int copyID)
+ {
+ return set_ref_in_py(copyID);
+ }
+*** ../vim-8.1.1020/src/if_python3.c 2019-03-19 22:11:37.933528483 +0100
+--- src/if_python3.c 2019-03-19 22:21:25.028534491 +0100
+***************
+*** 1663,1697 ****
+ }
+
+ void
+! do_py3eval (char_u *str, typval_T *rettv)
+ {
+ DoPyCommand((char *) str,
+ (rangeinitializer) init_range_eval,
+ (runner) run_eval,
+ (void *) rettv);
+! switch(rettv->v_type)
+ {
+! case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
+! case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
+! case VAR_FUNC: func_ref(rettv->vval.v_string); break;
+! case VAR_PARTIAL: ++rettv->vval.v_partial->pt_refcount; break;
+! case VAR_UNKNOWN:
+! rettv->v_type = VAR_NUMBER;
+! rettv->vval.v_number = 0;
+! break;
+! case VAR_NUMBER:
+! case VAR_STRING:
+! case VAR_FLOAT:
+! case VAR_SPECIAL:
+! case VAR_JOB:
+! case VAR_CHANNEL:
+! case VAR_BLOB:
+! break;
+ }
+ }
+
+ int
+! set_ref_in_python3 (int copyID)
+ {
+ return set_ref_in_py(copyID);
+ }
+--- 1663,1683 ----
+ }
+
+ void
+! do_py3eval(char_u *str, typval_T *rettv)
+ {
+ DoPyCommand((char *) str,
+ (rangeinitializer) init_range_eval,
+ (runner) run_eval,
+ (void *) rettv);
+! if (rettv->v_type == VAR_UNKNOWN)
+ {
+! rettv->v_type = VAR_NUMBER;
+! rettv->vval.v_number = 0;
+ }
+ }
+
+ int
+! set_ref_in_python3(int copyID)
+ {
+ return set_ref_in_py(copyID);
+ }
+*** ../vim-8.1.1020/src/version.c 2019-03-19 22:11:37.933528483 +0100
+--- src/version.c 2019-03-19 22:21:12.036641890 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1021,
+ /**/
+
+--
+In order for something to become clean, something else must become dirty;
+but you can get everything dirty without getting anything clean.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1022 b/data/vim/patches/8.1.1022
new file mode 100644
index 000000000..7881d096b
--- /dev/null
+++ b/data/vim/patches/8.1.1022
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1022
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1022
+Problem: May use NULL pointer when out of memory. (Coverity)
+Solution: Check for blob_alloc() returning NULL.
+Files: src/blob.c
+
+
+*** ../vim-8.1.1021/src/blob.c 2019-01-24 12:31:40.752926550 +0100
+--- src/blob.c 2019-03-19 22:52:20.432751553 +0100
+***************
+*** 232,237 ****
+--- 232,239 ----
+ blob_T *blob = blob_alloc();
+ char_u *s = str;
+
++ if (blob == NULL)
++ return NULL;
+ if (s[0] != '0' || (s[1] != 'z' && s[1] != 'Z'))
+ goto failed;
+ s += 2;
+*** ../vim-8.1.1021/src/version.c 2019-03-19 22:22:51.807819390 +0100
+--- src/version.c 2019-03-19 22:52:59.520428452 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1022,
+ /**/
+
+--
+From "know your smileys":
+ :q vi user saying, "How do I get out of this damn emacs editor?"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1023 b/data/vim/patches/8.1.1023
new file mode 100644
index 000000000..01a3ca487
--- /dev/null
+++ b/data/vim/patches/8.1.1023
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1023
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1023
+Problem: May use NULL pointer when indexing a blob. (Coverity)
+Solution: Break out of loop after using index on blob
+Files: src/eval.c
+
+
+*** ../vim-8.1.1022/src/eval.c 2019-03-17 14:43:28.477344179 +0100
+--- src/eval.c 2019-03-19 23:02:37.331678827 +0100
+***************
+*** 2208,2213 ****
+--- 2208,2214 ----
+ }
+ lp->ll_blob = lp->ll_tv->vval.v_blob;
+ lp->ll_tv = NULL;
++ break;
+ }
+ else
+ {
+***************
+*** 9219,9225 ****
+ }
+ }
+
+! /* reset v:option_new, v:option_old and v:option_type */
+ void
+ reset_v_option_vars(void)
+ {
+--- 9220,9228 ----
+ }
+ }
+
+! /*
+! * Reset v:option_new, v:option_old and v:option_type.
+! */
+ void
+ reset_v_option_vars(void)
+ {
+*** ../vim-8.1.1022/src/version.c 2019-03-19 23:03:24.199294996 +0100
+--- src/version.c 2019-03-19 23:04:00.534997511 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1023,
+ /**/
+
+--
+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.1024 b/data/vim/patches/8.1.1024
new file mode 100644
index 000000000..f7262a522
--- /dev/null
+++ b/data/vim/patches/8.1.1024
@@ -0,0 +1,65 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1024
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1024
+Problem: Stray log calls in terminal code. (Christian Brabandt)
+Solution: Remove the calls.
+Files: src/terminal.c
+
+
+*** ../vim-8.1.1023/src/terminal.c 2019-03-19 20:50:40.290035255 +0100
+--- src/terminal.c 2019-03-20 20:35:52.655652545 +0100
+***************
+*** 1786,1792 ****
+ static void
+ set_terminal_mode(term_T *term, int normal_mode)
+ {
+- ch_log(NULL, "set_terminal_mode(): %d", normal_mode);
+ term->tl_normal_mode = normal_mode;
+ if (!normal_mode)
+ handle_postponed_scrollback(term);
+--- 1786,1791 ----
+***************
+*** 2854,2860 ****
+ // must not change it. Postpone adding the scrollback lines.
+ gap = &term->tl_scrollback_postponed;
+ update_buffer = FALSE;
+- ch_log(NULL, "handle_pushline(): add to postponed");
+ }
+ else
+ {
+--- 2853,2858 ----
+***************
+*** 2863,2869 ****
+ cleanup_scrollback(term);
+ gap = &term->tl_scrollback;
+ update_buffer = TRUE;
+- ch_log(NULL, "handle_pushline(): add to window");
+ }
+
+ limit_scrollback(term, gap, update_buffer);
+--- 2861,2866 ----
+*** ../vim-8.1.1023/src/version.c 2019-03-19 23:04:13.762889231 +0100
+--- src/version.c 2019-03-20 20:37:55.618844023 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1024,
+ /**/
+
+--
+From "know your smileys":
+ *<|:-) Santa Claus (Ho Ho Ho)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1025 b/data/vim/patches/8.1.1025
new file mode 100644
index 000000000..820624813
--- /dev/null
+++ b/data/vim/patches/8.1.1025
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1025
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1025
+Problem: Checking NULL pointer after addition. (Coverity)
+Solution: First check for NULL, then add the column.
+Files: src/regexp.c
+
+
+*** ../vim-8.1.1024/src/regexp.c 2019-03-02 10:13:36.800974804 +0100
+--- src/regexp.c 2019-03-20 21:14:49.926961731 +0100
+***************
+*** 7784,7792 ****
+ if (lnum < 0 || rsm.sm_mmatch->endpos[no].lnum < 0)
+ return NULL;
+
+! s = reg_getline_submatch(lnum) + rsm.sm_mmatch->startpos[no].col;
+! if (s == NULL) /* anti-crash check, cannot happen? */
+ break;
+ if (rsm.sm_mmatch->endpos[no].lnum == lnum)
+ {
+ /* Within one line: take form start to end col. */
+--- 7784,7793 ----
+ if (lnum < 0 || rsm.sm_mmatch->endpos[no].lnum < 0)
+ return NULL;
+
+! s = reg_getline_submatch(lnum);
+! if (s == NULL) // anti-crash check, cannot happen?
+ break;
++ s += rsm.sm_mmatch->startpos[no].col;
+ if (rsm.sm_mmatch->endpos[no].lnum == lnum)
+ {
+ /* Within one line: take form start to end col. */
+*** ../vim-8.1.1024/src/version.c 2019-03-20 20:38:40.378550979 +0100
+--- src/version.c 2019-03-20 21:15:30.486656439 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1025,
+ /**/
+
+--
+From "know your smileys":
+ :-{} Too much lipstick
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1026 b/data/vim/patches/8.1.1026
new file mode 100644
index 000000000..00eddb1b3
--- /dev/null
+++ b/data/vim/patches/8.1.1026
@@ -0,0 +1,169 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1026
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1026
+Problem: Unused condition. (Coverity)
+Solution: Remove the condition. Also remove unused #define.
+Files: src/move.c
+
+
+*** ../vim-8.1.1025/src/move.c 2019-01-31 18:26:05.738803509 +0100
+--- src/move.c 2019-03-20 21:21:50.291049890 +0100
+***************
+*** 2574,2580 ****
+ return;
+ }
+
+- /* #define KEEP_SCREEN_LINE */
+ /*
+ * Scroll 'scroll' lines up or down.
+ */
+--- 2574,2579 ----
+***************
+*** 2628,2641 ****
+ curwin->w_topfill = diff_check_fill(curwin, curwin->w_topline);
+ #endif
+
+- #ifndef KEEP_SCREEN_LINE
+ if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
+ {
+ ++curwin->w_cursor.lnum;
+ curwin->w_valid &=
+ ~(VALID_VIRTCOL|VALID_CHEIGHT|VALID_WCOL);
+ }
+- #endif
+ }
+ curwin->w_valid &= ~(VALID_CROW|VALID_WROW);
+ scrolled += i;
+--- 2627,2638 ----
+***************
+*** 2666,2672 ****
+ }
+ }
+
+- #ifndef KEEP_SCREEN_LINE
+ /*
+ * When hit bottom of the file: move cursor down.
+ */
+--- 2663,2668 ----
+***************
+*** 2688,2708 ****
+ curwin->w_cursor.lnum += n;
+ check_cursor_lnum();
+ }
+- #else
+- /* try to put the cursor in the same screen line */
+- while ((curwin->w_cursor.lnum < curwin->w_topline || scrolled > 0)
+- && curwin->w_cursor.lnum < curwin->w_botline - 1)
+- {
+- scrolled -= plines(curwin->w_cursor.lnum);
+- if (scrolled < 0 && curwin->w_cursor.lnum >= curwin->w_topline)
+- break;
+- # ifdef FEAT_FOLDING
+- (void)hasFolding(curwin->w_cursor.lnum, NULL,
+- &curwin->w_cursor.lnum);
+- # endif
+- ++curwin->w_cursor.lnum;
+- }
+- #endif
+ }
+ else
+ {
+--- 2684,2689 ----
+***************
+*** 2715,2722 ****
+ if (curwin->w_topfill < diff_check_fill(curwin, curwin->w_topline))
+ {
+ i = 1;
+! if (--n < 0 && scrolled > 0)
+! break;
+ ++curwin->w_topfill;
+ }
+ else
+--- 2696,2702 ----
+ if (curwin->w_topfill < diff_check_fill(curwin, curwin->w_topline))
+ {
+ i = 1;
+! --n;
+ ++curwin->w_topfill;
+ }
+ else
+***************
+*** 2737,2751 ****
+ curwin->w_valid &= ~(VALID_CROW|VALID_WROW|
+ VALID_BOTLINE|VALID_BOTLINE_AP);
+ scrolled += i;
+- #ifndef KEEP_SCREEN_LINE
+ if (curwin->w_cursor.lnum > 1)
+ {
+ --curwin->w_cursor.lnum;
+ curwin->w_valid &= ~(VALID_VIRTCOL|VALID_CHEIGHT|VALID_WCOL);
+ }
+- #endif
+ }
+! #ifndef KEEP_SCREEN_LINE
+ /*
+ * When hit top of the file: move cursor up.
+ */
+--- 2717,2729 ----
+ curwin->w_valid &= ~(VALID_CROW|VALID_WROW|
+ VALID_BOTLINE|VALID_BOTLINE_AP);
+ scrolled += i;
+ if (curwin->w_cursor.lnum > 1)
+ {
+ --curwin->w_cursor.lnum;
+ curwin->w_valid &= ~(VALID_VIRTCOL|VALID_CHEIGHT|VALID_WCOL);
+ }
+ }
+!
+ /*
+ * When hit top of the file: move cursor up.
+ */
+***************
+*** 2768,2788 ****
+ # endif
+ curwin->w_cursor.lnum -= n;
+ }
+- #else
+- /* try to put the cursor in the same screen line */
+- scrolled += n; /* move cursor when topline is 1 */
+- while (curwin->w_cursor.lnum > curwin->w_topline
+- && (scrolled > 0 || curwin->w_cursor.lnum >= curwin->w_botline))
+- {
+- scrolled -= plines(curwin->w_cursor.lnum - 1);
+- if (scrolled < 0 && curwin->w_cursor.lnum < curwin->w_botline)
+- break;
+- --curwin->w_cursor.lnum;
+- # ifdef FEAT_FOLDING
+- foldAdjustCursor();
+- # endif
+- }
+- #endif
+ }
+ # ifdef FEAT_FOLDING
+ /* Move cursor to first line of closed fold. */
+--- 2746,2751 ----
+*** ../vim-8.1.1025/src/version.c 2019-03-20 21:18:31.237018906 +0100
+--- src/version.c 2019-03-20 21:22:35.106627485 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1026,
+ /**/
+
+--
+From "know your smileys":
+ <<<:-{ Worf (Never smiles anyways, so he's a bad smiley)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1027 b/data/vim/patches/8.1.1027
new file mode 100644
index 000000000..b435c6b0d
--- /dev/null
+++ b/data/vim/patches/8.1.1027
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1027
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1027
+Problem: Memory usage test sometimes fails.
+Solution: Use 80% of before.last as the lower limit. (Christian Brabandt)
+Files: src/testdir/test_memory_usage.vim
+
+
+*** ../vim-8.1.1026/src/testdir/test_memory_usage.vim 2019-03-14 13:42:57.169435481 +0100
+--- src/testdir/test_memory_usage.vim 2019-03-20 22:43:43.280574636 +0100
+***************
+*** 137,143 ****
+ let last = s:monitor_memory_usage(vim.pid).last
+ endfor
+
+! call assert_inrange(before, after.max + (after.last - before), last)
+
+ call vim.stop()
+ call delete(testfile)
+--- 137,145 ----
+ let last = s:monitor_memory_usage(vim.pid).last
+ endfor
+
+! " The usage may be a bit less than the last value
+! let lower = before * 8 / 10
+! call assert_inrange(lower, after.max + (after.last - before), last)
+
+ call vim.stop()
+ call delete(testfile)
+*** ../vim-8.1.1026/src/version.c 2019-03-20 21:42:16.832737656 +0100
+--- src/version.c 2019-03-20 22:36:25.828348477 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1027,
+ /**/
+
+--
+From "know your smileys":
+ 8-O "Omigod!!" (done "rm -rf *" ?)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1028 b/data/vim/patches/8.1.1028
new file mode 100644
index 000000000..df375b3e5
--- /dev/null
+++ b/data/vim/patches/8.1.1028
@@ -0,0 +1,48 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1028
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1028
+Problem: MS-Windows: memory leak when creating terminal fails.
+Solution: Free the command. (Ken Takata, closes #4138)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.1027/src/os_win32.c 2019-03-17 14:54:50.453256679 +0100
+--- src/os_win32.c 2019-03-21 19:56:14.860462625 +0100
+***************
+*** 4866,4872 ****
+--- 4866,4875 ----
+ argvar[1].v_type = VAR_UNKNOWN;
+ buf = term_start(argvar, NULL, &opt, TERM_START_SYSTEM);
+ if (buf == NULL)
++ {
++ vim_free(newcmd);
+ return 255;
++ }
+
+ job = term_getjob(buf->b_term);
+ ++job->jv_refcount;
+*** ../vim-8.1.1027/src/version.c 2019-03-20 22:44:58.439933744 +0100
+--- src/version.c 2019-03-21 19:57:20.720047863 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1028,
+ /**/
+
+--
+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.1029 b/data/vim/patches/8.1.1029
new file mode 100644
index 000000000..5ecfed11c
--- /dev/null
+++ b/data/vim/patches/8.1.1029
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1029
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1029
+Problem: DirectWrite doesn't take 'linespace' into account.
+Solution: Include 'linespace' in the position. (Ken Takata, closes #4137)
+Files: src/gui_dwrite.cpp, src/gui_w32.c
+
+
+*** ../vim-8.1.1028/src/gui_dwrite.cpp 2019-03-16 15:24:39.333662581 +0100
+--- src/gui_dwrite.cpp 2019-03-21 20:47:49.029799122 +0100
+***************
+*** 1031,1037 ****
+
+ TextRenderer renderer(this);
+ TextRendererContext context = { color, FLOAT(cellWidth), 0.0f };
+! textLayout->Draw(&context, &renderer, FLOAT(x), FLOAT(y) - 0.5f);
+ }
+
+ SafeRelease(&textLayout);
+--- 1031,1037 ----
+
+ TextRenderer renderer(this);
+ TextRendererContext context = { color, FLOAT(cellWidth), 0.0f };
+! textLayout->Draw(&context, &renderer, FLOAT(x), FLOAT(y));
+ }
+
+ SafeRelease(&textLayout);
+*** ../vim-8.1.1028/src/gui_w32.c 2019-01-28 22:32:54.891909109 +0100
+--- src/gui_w32.c 2019-03-21 20:47:49.029799122 +0100
+***************
+*** 6337,6343 ****
+ {
+ /* Add one to "cells" for italics. */
+ DWriteContext_DrawText(s_dwc, unicodebuf, wlen,
+! TEXT_X(col), TEXT_Y(row), FILL_X(cells + 1), FILL_Y(1),
+ gui.char_width, gui.currFgColor,
+ foptions, pcliprect, unicodepdy);
+ }
+--- 6337,6344 ----
+ {
+ /* Add one to "cells" for italics. */
+ DWriteContext_DrawText(s_dwc, unicodebuf, wlen,
+! TEXT_X(col), TEXT_Y(row),
+! FILL_X(cells + 1), FILL_Y(1) - p_linespace,
+ gui.char_width, gui.currFgColor,
+ foptions, pcliprect, unicodepdy);
+ }
+*** ../vim-8.1.1028/src/version.c 2019-03-21 19:57:57.491816288 +0100
+--- src/version.c 2019-03-21 20:49:23.325083994 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1029,
+ /**/
+
+--
+There's no place like $(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.1030 b/data/vim/patches/8.1.1030
new file mode 100644
index 000000000..9f58124a9
--- /dev/null
+++ b/data/vim/patches/8.1.1030
@@ -0,0 +1,889 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1030
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1030
+Problem: Quickfix function arguments are inconsistent.
+Solution: Pass a list pointer instead of info and index. (Yegappan
+ Lakshmanan, closes #4135)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.1029/src/quickfix.c 2019-03-17 16:39:01.566006172 +0100
+--- src/quickfix.c 2019-03-21 21:09:35.184333803 +0100
+***************
+*** 160,169 ****
+ 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);
+ 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 *);
+--- 160,169 ----
+ 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_list_T *qfl, 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_list_T *qfl, 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 *);
+***************
+*** 1322,1329 ****
+ */
+ static int
+ qf_parse_multiline_pfx(
+- qf_info_T *qi,
+- int qf_idx,
+ int idx,
+ qf_list_T *qfl,
+ qffields_T *fields)
+--- 1322,1327 ----
+***************
+*** 1361,1367 ****
+ qfprev->qf_col = fields->col;
+ qfprev->qf_viscol = fields->use_viscol;
+ if (!qfprev->qf_fnum)
+! qfprev->qf_fnum = qf_get_fnum(qi, qf_idx,
+ qfl->qf_directory,
+ *fields->namebuf || qfl->qf_directory != NULL
+ ? fields->namebuf
+--- 1359,1365 ----
+ qfprev->qf_col = fields->col;
+ qfprev->qf_viscol = fields->use_viscol;
+ if (!qfprev->qf_fnum)
+! qfprev->qf_fnum = qf_get_fnum(qfl,
+ qfl->qf_directory,
+ *fields->namebuf || qfl->qf_directory != NULL
+ ? fields->namebuf
+***************
+*** 1381,1388 ****
+ */
+ static int
+ qf_parse_line(
+! qf_info_T *qi,
+! int qf_idx,
+ char_u *linebuf,
+ int linelen,
+ efm_T *fmt_first,
+--- 1379,1385 ----
+ */
+ static int
+ qf_parse_line(
+! qf_list_T *qfl,
+ char_u *linebuf,
+ int linelen,
+ efm_T *fmt_first,
+***************
+*** 1391,1397 ****
+ efm_T *fmt_ptr;
+ int idx = 0;
+ char_u *tail = NULL;
+- qf_list_T *qfl = &qi->qf_lists[qf_idx];
+ int status;
+
+ restofline:
+--- 1388,1393 ----
+***************
+*** 1450,1456 ****
+ }
+ 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;
+ }
+--- 1446,1452 ----
+ }
+ else if (vim_strchr((char_u *)"CZ", idx) != NULL)
+ { // continuation of multi-line msg
+! status = qf_parse_multiline_pfx(idx, qfl, fields);
+ if (status != QF_OK)
+ return status;
+ }
+***************
+*** 1485,1495 ****
+ * 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;
+ }
+
+ /*
+--- 1481,1498 ----
+ * Returns TRUE if the specified quickfix/location list is empty.
+ */
+ static int
+! qf_list_empty(qf_list_T *qfl)
+! {
+! return qfl == NULL || qfl->qf_count <= 0;
+! }
+!
+! /*
+! * Return a pointer to a list in the specified quickfix stack
+! */
+! static qf_list_T *
+! qf_get_list(qf_info_T *qi, int idx)
+ {
+! return &qi->qf_lists[idx];
+ }
+
+ /*
+***************
+*** 1631,1641 ****
+ {
+ // 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;
+ }
+
+! 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)
+--- 1634,1644 ----
+ {
+ // Adding to existing list, use last entry.
+ adding = TRUE;
+! if (!qf_list_empty(qf_get_list(qi, qf_idx)))
+ old_last = qi->qf_lists[qf_idx].qf_last;
+ }
+
+! qfl = qf_get_list(qi, qf_idx);
+
+ // Use the local value of 'errorformat' if it's set.
+ if (errorformat == p_efm && tv == NULL && *buf->b_p_efm != NUL)
+***************
+*** 1675,1681 ****
+ if (status == QF_END_OF_INPUT) // end of input
+ break;
+
+! status = qf_parse_line(qi, qf_idx, state.linebuf, state.linelen,
+ fmt_first, &fields);
+ if (status == QF_FAIL)
+ goto error2;
+--- 1678,1684 ----
+ if (status == QF_END_OF_INPUT) // end of input
+ break;
+
+! status = qf_parse_line(qfl, state.linebuf, state.linelen,
+ fmt_first, &fields);
+ if (status == QF_FAIL)
+ goto error2;
+***************
+*** 1684,1691 ****
+ if (status == QF_IGNORE_LINE)
+ continue;
+
+! if (qf_add_entry(qi,
+! qf_idx,
+ qfl->qf_directory,
+ (*fields.namebuf || qfl->qf_directory != NULL)
+ ? fields.namebuf
+--- 1687,1693 ----
+ if (status == QF_IGNORE_LINE)
+ continue;
+
+! if (qf_add_entry(qfl,
+ qfl->qf_directory,
+ (*fields.namebuf || qfl->qf_directory != NULL)
+ ? fields.namebuf
+***************
+*** 1808,1814 ****
+ static qf_list_T *
+ qf_get_curlist(qf_info_T *qi)
+ {
+! return &qi->qf_lists[qi->qf_curlist];
+ }
+
+ /*
+--- 1810,1816 ----
+ static qf_list_T *
+ qf_get_curlist(qf_info_T *qi)
+ {
+! return qf_get_list(qi, qi->qf_curlist);
+ }
+
+ /*
+***************
+*** 1924,1930 ****
+ wipe_qf_buffer(qi);
+
+ for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(&qi->qf_lists[i]);
+ vim_free(qi);
+ }
+ }
+--- 1926,1932 ----
+ wipe_qf_buffer(qi);
+
+ for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(qf_get_list(qi, i));
+ vim_free(qi);
+ }
+ }
+***************
+*** 1947,1953 ****
+ else
+ // quickfix list
+ for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(&qi->qf_lists[i]);
+ }
+
+ /*
+--- 1949,1955 ----
+ else
+ // quickfix list
+ for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(qf_get_list(qi, i));
+ }
+
+ /*
+***************
+*** 2010,2017 ****
+ */
+ 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
+--- 2012,2018 ----
+ */
+ static int
+ qf_add_entry(
+! qf_list_T *qfl, // quickfix list entry
+ char_u *dir, // optional directory name
+ char_u *fname, // file name or NULL
+ char_u *module, // module name or NULL
+***************
+*** 2025,2031 ****
+ 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
+
+--- 2026,2031 ----
+***************
+*** 2041,2047 ****
+ IS_QF_LIST(qfl) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
+ }
+ else
+! qfp->qf_fnum = qf_get_fnum(qi, qf_idx, dir, fname);
+ if ((qfp->qf_text = vim_strsave(mesg)) == NULL)
+ {
+ vim_free(qfp);
+--- 2041,2047 ----
+ IS_QF_LIST(qfl) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
+ }
+ else
+! qfp->qf_fnum = qf_get_fnum(qfl, dir, fname);
+ if ((qfp->qf_text = vim_strsave(mesg)) == NULL)
+ {
+ vim_free(qfp);
+***************
+*** 2074,2080 ****
+ 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;
+--- 2074,2080 ----
+ qfp->qf_valid = valid;
+
+ lastp = &qfl->qf_last;
+! if (qf_list_empty(qfl)) // first element in the list
+ {
+ qfl->qf_start = qfp;
+ qfl->qf_ptr = qfp;
+***************
+*** 2141,2147 ****
+ * 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;
+--- 2141,2147 ----
+ * 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)
+ {
+ int i;
+ qfline_T *from_qfp;
+***************
+*** 2152,2159 ****
+ 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,
+--- 2152,2158 ----
+ i < from_qfl->qf_count && from_qfp != NULL;
+ ++i, from_qfp = from_qfp->qf_next)
+ {
+! if (qf_add_entry(to_qfl,
+ NULL,
+ NULL,
+ from_qfp->qf_module,
+***************
+*** 2185,2191 ****
+ * 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->qfl_type = from_qfl->qfl_type;
+--- 2184,2190 ----
+ * Copy the specified location list 'from_qfl' to 'to_qfl'.
+ */
+ static int
+! copy_loclist(qf_list_T *from_qfl, qf_list_T *to_qfl)
+ {
+ // Some of the fields are populated by qf_add_entry()
+ to_qfl->qfl_type = from_qfl->qfl_type;
+***************
+*** 2209,2215 ****
+ 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
+--- 2208,2214 ----
+ to_qfl->qf_ctx = NULL;
+
+ if (from_qfl->qf_count)
+! if (copy_loclist_entries(from_qfl, to_qfl) == FAIL)
+ return FAIL;
+
+ to_qfl->qf_index = from_qfl->qf_index; // current index in the list
+***************
+*** 2260,2267 ****
+ {
+ 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;
+--- 2259,2266 ----
+ {
+ to->w_llist->qf_curlist = idx;
+
+! if (copy_loclist(qf_get_list(qi, idx),
+! qf_get_list(to->w_llist, idx)) == FAIL)
+ {
+ qf_free_all(to);
+ return;
+***************
+*** 2276,2284 ****
+ * Also sets the b_has_qf_entry flag.
+ */
+ 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;
+--- 2275,2282 ----
+ * Also sets the b_has_qf_entry flag.
+ */
+ static int
+! qf_get_fnum(qf_list_T *qfl, char_u *directory, char_u *fname)
+ {
+ char_u *ptr = NULL;
+ buf_T *buf;
+ char_u *bufname;
+***************
+*** 2906,2912 ****
+
+ // 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_set_loclist(win, ll_ref);
+ }
+
+--- 2904,2910 ----
+
+ // 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 && ll_ref != NULL)
+ win_set_loclist(win, ll_ref);
+ }
+
+***************
+*** 3312,3318 ****
+ if (qi == NULL)
+ qi = &ql_info;
+
+! if (qf_stack_empty(qi) || qf_list_empty(qi, qi->qf_curlist))
+ {
+ emsg(_(e_quickfix));
+ return;
+--- 3310,3316 ----
+ if (qi == NULL)
+ qi = &ql_info;
+
+! if (qf_stack_empty(qi) || qf_list_empty(qf_get_curlist(qi)))
+ {
+ emsg(_(e_quickfix));
+ return;
+***************
+*** 3506,3512 ****
+ }
+ }
+
+! if (qf_stack_empty(qi) || qf_list_empty(qi, qi->qf_curlist))
+ {
+ emsg(_(e_quickfix));
+ return;
+--- 3504,3510 ----
+ }
+ }
+
+! if (qf_stack_empty(qi) || qf_list_empty(qf_get_curlist(qi)))
+ {
+ emsg(_(e_quickfix));
+ return;
+***************
+*** 3790,3798 ****
+ }
+
+ 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)
+ if (qfp->qf_fnum == curbuf->b_fnum)
+ {
+--- 3788,3799 ----
+ }
+
+ for (idx = 0; idx < qi->qf_listcount; ++idx)
+! {
+! qf_list_T *qfl = qf_get_list(qi, idx);
+!
+! if (!qf_list_empty(qfl))
+! for (i = 0, qfp = qfl->qf_start;
+! i < qfl->qf_count && qfp != NULL;
+ ++i, qfp = qfp->qf_next)
+ if (qfp->qf_fnum == curbuf->b_fnum)
+ {
+***************
+*** 3807,3812 ****
+--- 3808,3814 ----
+ else if (amount_after && qfp->qf_lnum > line2)
+ qfp->qf_lnum += amount_after;
+ }
++ }
+
+ if (!found_one)
+ curbuf->b_has_qf_entry &= ~buf_has_flag;
+***************
+*** 3872,3878 ****
+ if (IS_LL_WINDOW(curwin))
+ qi = GET_LOC_LIST(curwin);
+
+! if (qf_list_empty(qi, qi->qf_curlist))
+ {
+ emsg(_(e_quickfix));
+ return;
+--- 3874,3880 ----
+ if (IS_LL_WINDOW(curwin))
+ qi = GET_LOC_LIST(curwin);
+
+! if (qf_list_empty(qf_get_curlist(qi)))
+ {
+ emsg(_(e_quickfix));
+ return;
+***************
+*** 3919,3925 ****
+ // 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)
+ ex_cclose(eap);
+--- 3921,3927 ----
+ // it if we have errors; otherwise, leave it closed.
+ if (qf_stack_empty(qi)
+ || qfl->qf_nonevalid
+! || qf_list_empty(qf_get_curlist(qi)))
+ {
+ if (win != NULL)
+ ex_cclose(eap);
+***************
+*** 4580,4586 ****
+ return;
+
+ // Autocommands might have cleared the list, check for that.
+! if (!qf_list_empty(qi, qi->qf_curlist))
+ qf_jump(qi, 0, 0, forceit);
+ }
+
+--- 4582,4588 ----
+ return;
+
+ // Autocommands might have cleared the list, check for that.
+! if (!qf_list_empty(qf_get_curlist(qi)))
+ qf_jump(qi, 0, 0, forceit);
+ }
+
+***************
+*** 5305,5312 ****
+ // 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,
+--- 5307,5313 ----
+ // 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(qf_get_curlist(qi),
+ NULL, // dir
+ fname,
+ NULL,
+***************
+*** 5624,5630 ****
+ }
+
+ // 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,
+--- 5625,5631 ----
+ }
+
+ // Jump to first match.
+! if (!qf_list_empty(qf_get_curlist(qi)))
+ {
+ if ((flags & VGR_NOJUMP) == 0)
+ vgr_jump_to_match(qi, eap->forceit, &redraw_for_dummy,
+***************
+*** 5837,5842 ****
+--- 5838,5844 ----
+ get_errorlist(qf_info_T *qi_arg, win_T *wp, int qf_idx, list_T *list)
+ {
+ qf_info_T *qi = qi_arg;
++ qf_list_T *qfl;
+ dict_T *dict;
+ char_u buf[2];
+ qfline_T *qfp;
+***************
+*** 5857,5867 ****
+ 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;
+! 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;
+--- 5859,5873 ----
+ if (qf_idx == INVALID_QFIDX)
+ qf_idx = qi->qf_curlist;
+
+! if (qf_idx >= qi->qf_listcount)
+! return FAIL;
+!
+! qfl = qf_get_list(qi, qf_idx);
+! if (qf_list_empty(qfl))
+ return FAIL;
+
+! qfp = qfl->qf_start;
+! for (i = 1; !got_int && i <= qfl->qf_count; ++i)
+ {
+ // Handle entries with a non-existing buffer number.
+ bufnum = qfp->qf_fnum;
+***************
+*** 6215,6224 ****
+ * 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);
+--- 6221,6230 ----
+ * Return the current quickfix list index as 'idx' in retdict
+ */
+ static int
+! qf_getprop_idx(qf_list_T *qfl, dict_T *retdict)
+ {
+! int curidx = qfl->qf_index;
+! if (qf_list_empty(qfl))
+ // For empty lists, current index is set to 0
+ curidx = 0;
+ return dict_add_number(retdict, "idx", curidx);
+***************
+*** 6254,6260 ****
+ if (qf_stack_empty(qi) || qf_idx == INVALID_QFIDX)
+ return qf_getprop_defaults(qi, flags, wp != NULL, retdict);
+
+! qfl = &qi->qf_lists[qf_idx];
+
+ if (flags & QF_GETLIST_TITLE)
+ status = qf_getprop_title(qfl, retdict);
+--- 6260,6266 ----
+ if (qf_stack_empty(qi) || qf_idx == INVALID_QFIDX)
+ return qf_getprop_defaults(qi, flags, wp != NULL, retdict);
+
+! qfl = qf_get_list(qi, qf_idx);
+
+ if (flags & QF_GETLIST_TITLE)
+ status = qf_getprop_title(qfl, retdict);
+***************
+*** 6269,6275 ****
+ 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))
+--- 6275,6281 ----
+ 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(qfl, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_SIZE))
+ status = dict_add_number(retdict, "size", qfl->qf_count);
+ if ((status == OK) && (flags & QF_GETLIST_TICK))
+***************
+*** 6289,6296 ****
+ */
+ static int
+ qf_add_entry_from_dict(
+! qf_info_T *qi,
+! int qf_idx,
+ dict_T *d,
+ int first_entry,
+ int *valid_entry)
+--- 6295,6301 ----
+ */
+ static int
+ qf_add_entry_from_dict(
+! qf_list_T *qfl,
+ dict_T *d,
+ int first_entry,
+ int *valid_entry)
+***************
+*** 6337,6344 ****
+ if ((dict_find(d, (char_u *)"valid", -1)) != NULL)
+ valid = (int)dict_get_number(d, (char_u *)"valid");
+
+! status = qf_add_entry(qi,
+! qf_idx,
+ NULL, // dir
+ filename,
+ module,
+--- 6342,6348 ----
+ if ((dict_find(d, (char_u *)"valid", -1)) != NULL)
+ valid = (int)dict_get_number(d, (char_u *)"valid");
+
+! status = qf_add_entry(qfl,
+ NULL, // dir
+ filename,
+ module,
+***************
+*** 6376,6382 ****
+ 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;
+--- 6380,6386 ----
+ char_u *title,
+ int action)
+ {
+! qf_list_T *qfl = qf_get_list(qi, qf_idx);
+ listitem_T *li;
+ dict_T *d;
+ qfline_T *old_last = NULL;
+***************
+*** 6388,6396 ****
+ // 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')
+--- 6392,6400 ----
+ // make place for a new list
+ qf_new_list(qi, title);
+ qf_idx = qi->qf_curlist;
+! qfl = qf_get_list(qi, qf_idx);
+ }
+! else if (action == 'a' && !qf_list_empty(qfl))
+ // Adding to existing list, use last entry.
+ old_last = qfl->qf_last;
+ else if (action == 'r')
+***************
+*** 6408,6414 ****
+ if (d == NULL)
+ continue;
+
+! retval = qf_add_entry_from_dict(qi, qf_idx, d, li == list->lv_first,
+ &valid_entry);
+ if (retval == FAIL)
+ break;
+--- 6412,6418 ----
+ if (d == NULL)
+ continue;
+
+! retval = qf_add_entry_from_dict(qfl, d, li == list->lv_first,
+ &valid_entry);
+ if (retval == FAIL)
+ break;
+***************
+*** 6427,6433 ****
+
+ // Update the current error index if not appending to the list or if the
+ // list was empty before and it is not empty now.
+! if ((action != 'a' || qfl->qf_index == 0) && !qf_list_empty(qi, qf_idx))
+ qfl->qf_index = 1;
+
+ // Don't update the cursor in quickfix window when appending entries
+--- 6431,6437 ----
+
+ // Update the current error index if not appending to the list or if the
+ // list was empty before and it is not empty now.
+! if ((action != 'a' || qfl->qf_index == 0) && !qf_list_empty(qfl))
+ qfl->qf_index = 1;
+
+ // Don't update the cursor in quickfix window when appending entries
+***************
+*** 6504,6510 ****
+ 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;
+--- 6508,6514 ----
+ static int
+ qf_setprop_title(qf_info_T *qi, int qf_idx, dict_T *what, dictitem_T *di)
+ {
+! qf_list_T *qfl = qf_get_list(qi, qf_idx);
+
+ if (di->di_tv.v_type != VAR_STRING)
+ return FAIL;
+***************
+*** 6663,6669 ****
+ 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)
+--- 6667,6673 ----
+ qf_idx = qi->qf_curlist;
+ }
+
+! qfl = qf_get_list(qi, 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)
+***************
+*** 7113,7120 ****
+ while (l > 0 && line[l - 1] <= ' ')
+ line[--l] = NUL;
+
+! if (qf_add_entry(qi,
+! qi->qf_curlist,
+ NULL, // dir
+ fname,
+ NULL,
+--- 7117,7123 ----
+ while (l > 0 && line[l - 1] <= ' ')
+ line[--l] = NUL;
+
+! if (qf_add_entry(qf_get_curlist(qi),
+ NULL, // dir
+ fname,
+ NULL,
+***************
+*** 7310,7316 ****
+ }
+
+ // Jump to first match.
+! if (!qf_list_empty(qi, qi->qf_curlist))
+ qf_jump(qi, 0, 0, FALSE);
+ else
+ semsg(_(e_nomatch2), eap->arg);
+--- 7313,7319 ----
+ }
+
+ // Jump to first match.
+! if (!qf_list_empty(qf_get_curlist(qi)))
+ qf_jump(qi, 0, 0, FALSE);
+ else
+ semsg(_(e_nomatch2), eap->arg);
+*** ../vim-8.1.1029/src/version.c 2019-03-21 20:50:08.868741864 +0100
+--- src/version.c 2019-03-21 21:11:51.083222658 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1030,
+ /**/
+
+--
+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.1031 b/data/vim/patches/8.1.1031
new file mode 100644
index 000000000..3462c5d04
--- /dev/null
+++ b/data/vim/patches/8.1.1031
@@ -0,0 +1,128 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1031
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1031
+Problem: Memory usage test may still fail.
+Solution: Drop the unused min value. (Christian Brabandt)
+Files: src/testdir/test_memory_usage.vim
+
+
+*** ../vim-8.1.1030/src/testdir/test_memory_usage.vim 2019-03-20 22:44:58.439933744 +0100
+--- src/testdir/test_memory_usage.vim 2019-03-21 21:15:30.477266842 +0100
+***************
+*** 36,50 ****
+ let proc = {}
+ let proc.pid = a:pid
+ let proc.hist = []
+- let proc.min = 0
+ let proc.max = 0
+
+ func proc.op() abort
+ " Check the last 200ms.
+ let val = s:memory_usage(self.pid)
+! if self.min > val
+! let self.min = val
+! elseif self.max < val
+ let self.max = val
+ endif
+ call add(self.hist, val)
+--- 36,47 ----
+ let proc = {}
+ let proc.pid = a:pid
+ let proc.hist = []
+ let proc.max = 0
+
+ func proc.op() abort
+ " Check the last 200ms.
+ let val = s:memory_usage(self.pid)
+! if self.max < val
+ let self.max = val
+ endif
+ call add(self.hist, val)
+***************
+*** 56,62 ****
+ endfunc
+
+ call WaitFor({-> proc.op()}, 10000)
+! return {'last': get(proc.hist, -1), 'min': proc.min, 'max': proc.max}
+ endfunc
+
+ let s:term_vim = {}
+--- 53,59 ----
+ endfunc
+
+ call WaitFor({-> proc.op()}, 10000)
+! return {'last': get(proc.hist, -1), 'max': proc.max}
+ endfunc
+
+ let s:term_vim = {}
+***************
+*** 101,108 ****
+
+ " Estimate the limit of max usage as 2x initial usage.
+ call assert_inrange(before, 2 * before, after.max)
+! " In this case, garbase collecting is not needed.
+! call assert_equal(after.last, after.max)
+
+ call vim.stop()
+ call delete(testfile)
+--- 98,108 ----
+
+ " Estimate the limit of max usage as 2x initial usage.
+ call assert_inrange(before, 2 * before, after.max)
+! " In this case, garbage collecting is not needed. The value might fluctuate
+! " a bit, allow for 3% tolerance.
+! let lower = after.last * 97 / 100
+! let upper = after.last * 103 / 100
+! call assert_inrange(lower, upper, after.max)
+
+ call vim.stop()
+ call delete(testfile)
+***************
+*** 137,145 ****
+ let last = s:monitor_memory_usage(vim.pid).last
+ endfor
+
+! " The usage may be a bit less than the last value
+ let lower = before * 8 / 10
+! call assert_inrange(lower, after.max + (after.last - before), last)
+
+ call vim.stop()
+ call delete(testfile)
+--- 137,147 ----
+ let last = s:monitor_memory_usage(vim.pid).last
+ endfor
+
+! " The usage may be a bit less than the last value, use 80%.
+! " Allow for 1% tolerance at the upper limit.
+ let lower = before * 8 / 10
+! let upper = (after.max + (after.last - before)) * 101 / 100
+! call assert_inrange(lower, upper, last)
+
+ call vim.stop()
+ call delete(testfile)
+*** ../vim-8.1.1030/src/version.c 2019-03-21 21:12:46.282715864 +0100
+--- src/version.c 2019-03-21 21:14:25.381831859 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1031,
+ /**/
+
+--
+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.1032 b/data/vim/patches/8.1.1032
new file mode 100644
index 000000000..7d159fecf
--- /dev/null
+++ b/data/vim/patches/8.1.1032
@@ -0,0 +1,387 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1032
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1032
+Problem: Warnings from clang static analyzer. (Yegappan Lakshmanan)
+Solution: Fix relevant warnings.
+Files: src/arabic.c, src/edit.c, src/eval.c, src/fileio.c, src/normal.c,
+ src/option.c, src/os_unix.c, src/regexp.c, src/screen.c,
+ src/channel.c, src/charset.c, src/message.c
+
+
+*** ../vim-8.1.1031/src/arabic.c 2018-09-30 21:43:17.175693433 +0200
+--- src/arabic.c 2019-03-20 22:22:35.211792256 +0100
+***************
+*** 578,586 ****
+ /* half-shape current and previous character */
+ shape_c = half_shape(prev_c);
+
+- /* Save away current character */
+- curr_c = c;
+-
+ curr_laa = A_firstc_laa(c, *c1p);
+ prev_laa = A_firstc_laa(prev_c, prev_c1);
+
+--- 578,583 ----
+*** ../vim-8.1.1031/src/edit.c 2019-02-17 17:44:36.199875566 +0100
+--- src/edit.c 2019-03-20 22:27:34.349141549 +0100
+***************
+*** 4109,4119 ****
+ static buf_T *
+ ins_compl_next_buf(buf_T *buf, int flag)
+ {
+! static win_T *wp;
+
+! if (flag == 'w') /* just windows */
+ {
+! if (buf == curbuf) /* first call for this flag/expansion */
+ wp = curwin;
+ while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin
+ && wp->w_buffer->b_scanned)
+--- 4109,4119 ----
+ static buf_T *
+ ins_compl_next_buf(buf_T *buf, int flag)
+ {
+! static win_T *wp = NULL;
+
+! if (flag == 'w') // just windows
+ {
+! if (buf == curbuf || wp == NULL) // first call for this flag/expansion
+ wp = curwin;
+ while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin
+ && wp->w_buffer->b_scanned)
+*** ../vim-8.1.1031/src/eval.c 2019-03-19 23:04:13.762889231 +0100
+--- src/eval.c 2019-03-21 21:26:31.371960388 +0100
+***************
+*** 8544,8550 ****
+ char_u *p;
+ garray_T ga;
+ int len;
+! int save_did_emsg = did_emsg;
+
+ ga_init2(&ga, 1, 80);
+
+--- 8544,8550 ----
+ char_u *p;
+ garray_T ga;
+ int len;
+! int save_did_emsg;
+
+ ga_init2(&ga, 1, 80);
+
+***************
+*** 8552,8558 ****
+ ++emsg_skip;
+ while (*arg != NUL && *arg != '|' && *arg != '\n')
+ {
+- p = arg;
+ ret = eval1_emsg(&arg, &rettv, !eap->skip);
+ if (ret == FAIL)
+ break;
+--- 8552,8557 ----
+*** ../vim-8.1.1031/src/fileio.c 2019-02-21 12:16:06.196542536 +0100
+--- src/fileio.c 2019-03-21 21:27:36.035466453 +0100
+***************
+*** 2322,2331 ****
+ vim_free(fenc);
+ #ifdef USE_ICONV
+ if (iconv_fd != (iconv_t)-1)
+- {
+ iconv_close(iconv_fd);
+- iconv_fd = (iconv_t)-1;
+- }
+ #endif
+
+ if (!read_buffer && !read_stdin)
+--- 2322,2328 ----
+*** ../vim-8.1.1031/src/normal.c 2019-02-17 17:44:36.215875493 +0100
+--- src/normal.c 2019-03-21 21:28:19.967132356 +0100
+***************
+*** 214,220 ****
+ {NL, nv_down, 0, FALSE},
+ {Ctrl_K, nv_error, 0, 0},
+ {Ctrl_L, nv_clear, 0, 0},
+! {Ctrl_M, nv_down, 0, TRUE},
+ {Ctrl_N, nv_down, NV_STS, FALSE},
+ {Ctrl_O, nv_ctrlo, 0, 0},
+ {Ctrl_P, nv_up, NV_STS, FALSE},
+--- 214,220 ----
+ {NL, nv_down, 0, FALSE},
+ {Ctrl_K, nv_error, 0, 0},
+ {Ctrl_L, nv_clear, 0, 0},
+! {CAR, nv_down, 0, TRUE},
+ {Ctrl_N, nv_down, NV_STS, FALSE},
+ {Ctrl_O, nv_ctrlo, 0, 0},
+ {Ctrl_P, nv_up, NV_STS, FALSE},
+***************
+*** 4263,4269 ****
+ CLEAR_POS(&found_pos);
+ for (;;)
+ {
+- valid = FALSE;
+ t = searchit(curwin, curbuf, &curwin->w_cursor, NULL, FORWARD,
+ pat, 1L, searchflags, RE_LAST, (linenr_T)0, NULL, NULL);
+ if (curwin->w_cursor.lnum >= old_pos.lnum)
+--- 4263,4268 ----
+*** ../vim-8.1.1031/src/option.c 2019-02-17 17:44:36.215875493 +0100
+--- src/option.c 2019-03-21 21:29:31.654589459 +0100
+***************
+*** 4405,4411 ****
+ key = 0;
+ if (*arg == '<')
+ {
+- nextchar = 0;
+ opt_idx = -1;
+ /* look out for <t_>;> */
+ if (arg[1] == 't' && arg[2] == '_' && arg[3] && arg[4])
+--- 4405,4410 ----
+***************
+*** 7945,7951 ****
+ && p[len] == ':'
+ && p[len + 1] != NUL)
+ {
+! c1 = c2 = c3 = 0;
+ s = p + len + 1;
+ c1 = mb_ptr2char_adv(&s);
+ if (mb_char2cells(c1) > 1)
+--- 7944,7950 ----
+ && p[len] == ':'
+ && p[len + 1] != NUL)
+ {
+! c2 = c3 = 0;
+ s = p + len + 1;
+ c1 = mb_ptr2char_adv(&s);
+ if (mb_char2cells(c1) > 1)
+***************
+*** 9379,9384 ****
+--- 9378,9384 ----
+ 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_snprintf((char *)buf_new, 10, "%ld", value);
+ vim_snprintf((char *)buf_type, 7, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global");
+*** ../vim-8.1.1031/src/os_unix.c 2019-03-02 10:13:36.796974835 +0100
+--- src/os_unix.c 2019-03-21 21:30:50.757993290 +0100
+***************
+*** 6147,6155 ****
+ }
+ # endif
+ #ifdef FEAT_JOB_CHANNEL
+! /* also call when ret == 0, we may be polling a keep-open channel */
+ if (ret >= 0)
+! ret = channel_poll_check(ret, &fds);
+ #endif
+
+ #else /* HAVE_SELECT */
+--- 6147,6155 ----
+ }
+ # endif
+ #ifdef FEAT_JOB_CHANNEL
+! // also call when ret == 0, we may be polling a keep-open channel
+ if (ret >= 0)
+! channel_poll_check(ret, &fds);
+ #endif
+
+ #else /* HAVE_SELECT */
+*** ../vim-8.1.1031/src/regexp.c 2019-03-20 21:18:31.233018949 +0100
+--- src/regexp.c 2019-03-21 21:31:39.977623686 +0100
+***************
+*** 2785,2791 ****
+ *place++ = op;
+ *place++ = NUL;
+ *place++ = NUL;
+! place = re_put_long(place, (long_u)val);
+ }
+
+ /*
+--- 2785,2791 ----
+ *place++ = op;
+ *place++ = NUL;
+ *place++ = NUL;
+! re_put_long(place, (long_u)val);
+ }
+
+ /*
+*** ../vim-8.1.1031/src/screen.c 2019-03-09 11:45:45.650134366 +0100
+--- src/screen.c 2019-03-21 21:34:18.596438405 +0100
+***************
+*** 4900,4906 ****
+ else
+ {
+ char_u *p;
+! int len = n_extra;
+ int i;
+ int saved_nextra = n_extra;
+
+--- 4900,4906 ----
+ else
+ {
+ char_u *p;
+! int len;
+ int i;
+ int saved_nextra = n_extra;
+
+***************
+*** 5505,5512 ****
+ if (vcol < v + col - win_col_off(wp))
+ vcol = v + col - win_col_off(wp);
+ #ifdef FEAT_CONCEAL
+! /* Get rid of the boguscols now, we want to draw until the right
+! * edge for 'cursorcolumn'. */
+ col -= boguscols;
+ boguscols = 0;
+ #endif
+--- 5505,5512 ----
+ if (vcol < v + col - win_col_off(wp))
+ vcol = v + col - win_col_off(wp);
+ #ifdef FEAT_CONCEAL
+! // Get rid of the boguscols now, we want to draw until the right
+! // edge for 'cursorcolumn'.
+ col -= boguscols;
+ boguscols = 0;
+ #endif
+***************
+*** 10466,10472 ****
+
+ attr = attr_nosel;
+ tabcount = 0;
+- scol = 0;
+ for (tp = first_tabpage; tp != NULL && col < Columns - 4;
+ tp = tp->tp_next)
+ {
+--- 10466,10471 ----
+***************
+*** 10799,10805 ****
+ int o;
+ int this_ru_col;
+ int off = 0;
+! int width = Columns;
+
+ /* If 'ruler' off or redrawing disabled, don't do anything */
+ if (!p_ru)
+--- 10798,10804 ----
+ int o;
+ int this_ru_col;
+ int off = 0;
+! int width;
+
+ /* If 'ruler' off or redrawing disabled, don't do anything */
+ if (!p_ru)
+*** ../vim-8.1.1031/src/channel.c 2019-03-04 12:09:43.901396026 +0100
+--- src/channel.c 2019-03-21 21:35:28.531918170 +0100
+***************
+*** 1720,1726 ****
+ channel_get_all(channel_T *channel, ch_part_T part, int *outlen)
+ {
+ readq_T *head = &channel->ch_part[part].ch_head;
+! readq_T *node = head->rq_next;
+ long_u len = 0;
+ char_u *res;
+ char_u *p;
+--- 1720,1726 ----
+ channel_get_all(channel_T *channel, ch_part_T part, int *outlen)
+ {
+ readq_T *head = &channel->ch_part[part].ch_head;
+! readq_T *node;
+ long_u len = 0;
+ char_u *res;
+ char_u *p;
+*** ../vim-8.1.1031/src/charset.c 2019-02-16 15:09:21.213946217 +0100
+--- src/charset.c 2019-03-21 21:36:34.535428275 +0100
+***************
+*** 1055,1061 ****
+ if (col2 >= colmax) /* doesn't fit */
+ {
+ size = colmax - col + col_adj;
+- tab_corr = FALSE;
+ break;
+ }
+ }
+--- 1055,1060 ----
+***************
+*** 1108,1114 ****
+ {
+ /* calculate effective window width */
+ int width = (colnr_T)wp->w_width - sbrlen - numberwidth;
+! int prev_width = col ? ((colnr_T)wp->w_width - (sbrlen + col)) : 0;
+ if (width == 0)
+ width = (colnr_T)wp->w_width;
+ added += ((size - prev_width) / width) * vim_strsize(p_sbr);
+--- 1107,1114 ----
+ {
+ /* calculate effective window width */
+ int width = (colnr_T)wp->w_width - sbrlen - numberwidth;
+! int prev_width = col
+! ? ((colnr_T)wp->w_width - (sbrlen + col)) : 0;
+ if (width == 0)
+ width = (colnr_T)wp->w_width;
+ added += ((size - prev_width) / width) * vim_strsize(p_sbr);
+***************
+*** 1963,1969 ****
+
+ /*
+ * Return TRUE if "str" starts with a backslash that should be removed.
+! * For MS-DOS, WIN32 and OS/2 this is only done when the character after the
+ * backslash is not a normal file name character.
+ * '$' is a valid file name character, we don't remove the backslash before
+ * it. This means it is not possible to use an environment variable after a
+--- 1963,1969 ----
+
+ /*
+ * Return TRUE if "str" starts with a backslash that should be removed.
+! * For MS-DOS, MSWIN and OS/2 this is only done when the character after the
+ * backslash is not a normal file name character.
+ * '$' is a valid file name character, we don't remove the backslash before
+ * it. This means it is not possible to use an environment variable after a
+*** ../vim-8.1.1031/src/message.c 2019-02-22 13:42:00.276540703 +0100
+--- src/message.c 2019-03-21 21:38:41.270490119 +0100
+***************
+*** 4491,4497 ****
+ case 'c':
+ case 's':
+ case 'S':
+- length_modifier = '\0';
+ str_arg_l = 1;
+ switch (fmt_spec)
+ {
+--- 4491,4496 ----
+***************
+*** 4872,4878 ****
+ * zero value is formatted with an
+ * explicit precision of zero */
+ precision = num_of_digits + 1;
+- precision_specified = 1;
+ }
+ }
+ /* zero padding to specified precision? */
+--- 4871,4876 ----
+*** ../vim-8.1.1031/src/version.c 2019-03-21 21:16:32.988734329 +0100
+--- src/version.c 2019-03-21 21:44:22.203978084 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1032,
+ /**/
+
+--
+The primary purpose of the DATA statement is to give names to constants;
+instead of referring to pi as 3.141592653589793 at every appearance, the
+variable PI can be given that value with a DATA statement and used instead
+of the longer form of the constant. This also simplifies modifying the
+program, should the value of pi change.
+ -- FORTRAN manual for Xerox Computers
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1033 b/data/vim/patches/8.1.1033
new file mode 100644
index 000000000..d4ecab3fe
--- /dev/null
+++ b/data/vim/patches/8.1.1033
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1033
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1033
+Problem: Memory usage test may still fail on some systems. (Elimar
+ Riesebieter)
+Solution: Increase tolerance from 1% to 3%.
+Files: src/testdir/test_memory_usage.vim
+
+
+*** ../vim-8.1.1032/src/testdir/test_memory_usage.vim 2019-03-21 21:16:32.988734329 +0100
+--- src/testdir/test_memory_usage.vim 2019-03-22 11:30:54.389943874 +0100
+***************
+*** 138,146 ****
+ endfor
+
+ " The usage may be a bit less than the last value, use 80%.
+! " Allow for 1% tolerance at the upper limit.
+ let lower = before * 8 / 10
+! let upper = (after.max + (after.last - before)) * 101 / 100
+ call assert_inrange(lower, upper, last)
+
+ call vim.stop()
+--- 138,146 ----
+ endfor
+
+ " The usage may be a bit less than the last value, use 80%.
+! " Allow for 3% tolerance at the upper limit.
+ let lower = before * 8 / 10
+! let upper = (after.max + (after.last - before)) * 103 / 100
+ call assert_inrange(lower, upper, last)
+
+ call vim.stop()
+*** ../vim-8.1.1032/src/version.c 2019-03-21 21:45:30.887282025 +0100
+--- src/version.c 2019-03-22 11:31:39.321673113 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1033,
+ /**/
+
+--
+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.1034 b/data/vim/patches/8.1.1034
new file mode 100644
index 000000000..ded247acc
--- /dev/null
+++ b/data/vim/patches/8.1.1034
@@ -0,0 +1,464 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1034
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1034
+Problem: Too many #ifdefs.
+Solution: Merge FEAT_MOUSE_SGR into FEAT_MOUSE_XTERM / FEAT_MOUSE_TTY.
+Files: src/evalfunc.c, src/misc2.c, src/os_unix.c, src/term.c,
+ src/version.c, src/feature.h
+
+
+*** ../vim-8.1.1033/src/evalfunc.c 2019-03-07 11:25:24.455856096 +0100
+--- src/evalfunc.c 2019-03-22 11:50:43.386780312 +0100
+***************
+*** 6414,6420 ****
+ # ifdef FEAT_MOUSE_PTERM
+ "mouse_pterm",
+ # endif
+! # ifdef FEAT_MOUSE_SGR
+ "mouse_sgr",
+ # endif
+ # ifdef FEAT_SYSMOUSE
+--- 6414,6420 ----
+ # ifdef FEAT_MOUSE_PTERM
+ "mouse_pterm",
+ # endif
+! # ifdef FEAT_MOUSE_XTERM
+ "mouse_sgr",
+ # endif
+ # ifdef FEAT_SYSMOUSE
+*** ../vim-8.1.1033/src/misc2.c 2019-02-17 17:44:36.215875493 +0100
+--- src/misc2.c 2019-03-22 11:50:57.118697587 +0100
+***************
+*** 2453,2462 ****
+ #ifdef FEAT_MOUSE_URXVT
+ {K_URXVT_MOUSE, (char_u *)"UrxvtMouse"},
+ #endif
+- #ifdef FEAT_MOUSE_SGR
+ {K_SGR_MOUSE, (char_u *)"SgrMouse"},
+ {K_SGR_MOUSERELEASE, (char_u *)"SgrMouseRelelase"},
+- #endif
+ {K_LEFTMOUSE, (char_u *)"LeftMouse"},
+ {K_LEFTMOUSE_NM, (char_u *)"LeftMouseNM"},
+ {K_LEFTDRAG, (char_u *)"LeftDrag"},
+--- 2453,2460 ----
+*** ../vim-8.1.1033/src/os_unix.c 2019-03-21 21:45:30.879282125 +0100
+--- src/os_unix.c 2019-03-22 11:51:47.062396710 +0100
+***************
+*** 3596,3602 ****
+ }
+ # endif
+
+- # ifdef FEAT_MOUSE_SGR
+ if (ttym_flags == TTYM_SGR)
+ {
+ /* SGR mode supports columns above 223 */
+--- 3596,3601 ----
+***************
+*** 3606,3612 ****
+ : IF_EB("\033[?1006l", ESC_STR "[?1006l")));
+ mouse_ison = on;
+ }
+- # endif
+
+ # ifdef FEAT_BEVAL_TERM
+ if (bevalterm_ison != (p_bevalterm && on))
+--- 3605,3610 ----
+***************
+*** 3864,3874 ****
+ else
+ del_mouse_termcode(KS_URXVT_MOUSE);
+ # endif
+- # ifdef FEAT_MOUSE_SGR
+ if (use_xterm_mouse() == 4
+! # ifdef FEAT_GUI
+ && !gui.in_use
+! # endif
+ )
+ {
+ set_mouse_termcode(KS_SGR_MOUSE, (char_u *)(term_is_8bit(T_NAME)
+--- 3862,3871 ----
+ else
+ del_mouse_termcode(KS_URXVT_MOUSE);
+ # endif
+ if (use_xterm_mouse() == 4
+! # ifdef FEAT_GUI
+ && !gui.in_use
+! # endif
+ )
+ {
+ set_mouse_termcode(KS_SGR_MOUSE, (char_u *)(term_is_8bit(T_NAME)
+***************
+*** 3890,3896 ****
+ del_mouse_termcode(KS_SGR_MOUSE);
+ del_mouse_termcode(KS_SGR_MOUSE_RELEASE);
+ }
+- # endif
+ }
+ #endif
+
+--- 3887,3892 ----
+*** ../vim-8.1.1033/src/term.c 2019-02-17 17:44:36.219875473 +0100
+--- src/term.c 2019-03-22 11:54:14.909506042 +0100
+***************
+*** 2126,2138 ****
+ has_mouse_termcode |= HMT_URXVT;
+ else
+ # endif
+- # ifdef FEAT_MOUSE_SGR
+ if (n == KS_SGR_MOUSE)
+ has_mouse_termcode |= HMT_SGR;
+ else if (n == KS_SGR_MOUSE_RELEASE)
+ has_mouse_termcode |= HMT_SGR_REL;
+ else
+- # endif
+ has_mouse_termcode |= HMT_NORMAL;
+ # endif
+ }
+--- 2126,2136 ----
+***************
+*** 2175,2187 ****
+ has_mouse_termcode &= ~HMT_URXVT;
+ else
+ # endif
+- # ifdef FEAT_MOUSE_SGR
+ if (n == KS_SGR_MOUSE)
+ has_mouse_termcode &= ~HMT_SGR;
+ else if (n == KS_SGR_MOUSE_RELEASE)
+ has_mouse_termcode &= ~HMT_SGR_REL;
+ else
+- # endif
+ has_mouse_termcode &= ~HMT_NORMAL;
+ # endif
+ }
+--- 2173,2183 ----
+***************
+*** 4690,4696 ****
+ if (tp[1 + (tp[0] != CSI)] == '>' && semicols == 2)
+ {
+ int need_flush = FALSE;
+- # ifdef FEAT_MOUSE_SGR
+ int is_iterm2 = FALSE;
+ int is_mintty = FALSE;
+
+--- 4686,4691 ----
+***************
+*** 4698,4704 ****
+ // (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 */
+ if (version >= 141)
+--- 4693,4698 ----
+***************
+*** 4718,4729 ****
+ * 256, libvterm supports even more. */
+ if (mch_getenv((char_u *)"COLORS") == NULL)
+ may_adjust_color_count(256);
+- # ifdef FEAT_MOUSE_SGR
+ /* Libvterm can handle SGR mouse reporting. */
+ if (!option_was_set((char_u *)"ttym"))
+ set_option_value((char_u *)"ttym", 0L,
+ (char_u *)"sgr", 0);
+- # endif
+ }
+
+ if (version == 95)
+--- 4712,4721 ----
+***************
+*** 4734,4747 ****
+ is_not_xterm = TRUE;
+ is_mac_terminal = TRUE;
+ }
+- # ifdef FEAT_MOUSE_SGR
+ // iTerm2 sends 0;95;0
+ if (STRNCMP(tp + extra - 2, "0;95;0c", 7) == 0)
+ is_iterm2 = TRUE;
+- else
+- # endif
+ // old iTerm2 sends 0;95;
+! if (STRNCMP(tp + extra - 2, "0;95;c", 6) == 0)
+ is_not_xterm = TRUE;
+ }
+
+--- 4726,4736 ----
+ is_not_xterm = TRUE;
+ is_mac_terminal = TRUE;
+ }
+ // iTerm2 sends 0;95;0
+ if (STRNCMP(tp + extra - 2, "0;95;0c", 7) == 0)
+ is_iterm2 = TRUE;
+ // old iTerm2 sends 0;95;
+! else if (STRNCMP(tp + extra - 2, "0;95;c", 6) == 0)
+ is_not_xterm = TRUE;
+ }
+
+***************
+*** 4749,4765 ****
+ * by the user already. */
+ if (!option_was_set((char_u *)"ttym"))
+ {
+- # 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
+- # endif
+ /* if xterm version >= 95 use mouse dragging */
+! if (version >= 95)
+ set_option_value((char_u *)"ttym", 0L,
+ (char_u *)"xterm2", 0);
+ }
+--- 4738,4751 ----
+ * by the user already. */
+ if (!option_was_set((char_u *)"ttym"))
+ {
+ /* 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);
+ /* if xterm version >= 95 use mouse dragging */
+! else if (version >= 95)
+ set_option_value((char_u *)"ttym", 0L,
+ (char_u *)"xterm2", 0);
+ }
+***************
+*** 5127,5137 ****
+ # ifdef FEAT_MOUSE_URXVT
+ || key_name[0] == KS_URXVT_MOUSE
+ # endif
+- # ifdef FEAT_MOUSE_SGR
+ || key_name[0] == KS_SGR_MOUSE
+! || key_name[0] == KS_SGR_MOUSE_RELEASE
+! # endif
+! )
+ {
+ is_click = is_drag = FALSE;
+
+--- 5113,5120 ----
+ # ifdef FEAT_MOUSE_URXVT
+ || key_name[0] == KS_URXVT_MOUSE
+ # endif
+ || key_name[0] == KS_SGR_MOUSE
+! || key_name[0] == KS_SGR_MOUSE_RELEASE)
+ {
+ is_click = is_drag = FALSE;
+
+***************
+*** 5163,5169 ****
+ */
+ for (;;)
+ {
+! #ifdef FEAT_GUI
+ if (gui.in_use)
+ {
+ /* GUI uses more bits for columns > 223 */
+--- 5146,5152 ----
+ */
+ for (;;)
+ {
+! # ifdef FEAT_GUI
+ if (gui.in_use)
+ {
+ /* GUI uses more bits for columns > 223 */
+***************
+*** 5177,5183 ****
+ + bytes[4] - ' ' - 1;
+ }
+ else
+! #endif
+ {
+ num_bytes = get_bytes_from_buf(tp + slen, bytes, 3);
+ if (num_bytes == -1) /* not enough coordinates */
+--- 5160,5166 ----
+ + bytes[4] - ' ' - 1;
+ }
+ else
+! # endif
+ {
+ num_bytes = get_bytes_from_buf(tp + slen, bytes, 3);
+ if (num_bytes == -1) /* not enough coordinates */
+***************
+*** 5191,5211 ****
+ /* If the following bytes is also a mouse code and it has
+ * the same code, dump this one and get the next. This
+ * makes dragging a whole lot faster. */
+! #ifdef FEAT_GUI
+ if (gui.in_use)
+ j = 3;
+ else
+! #endif
+ j = termcodes[idx].len;
+ if (STRNCMP(tp, tp + slen, (size_t)j) == 0
+ && tp[slen + j] == mouse_code
+ && tp[slen + j + 1] != NUL
+ && tp[slen + j + 2] != NUL
+! #ifdef FEAT_GUI
+ && (!gui.in_use
+ || (tp[slen + j + 3] != NUL
+ && tp[slen + j + 4] != NUL))
+! #endif
+ )
+ slen += j;
+ else
+--- 5174,5194 ----
+ /* If the following bytes is also a mouse code and it has
+ * the same code, dump this one and get the next. This
+ * makes dragging a whole lot faster. */
+! # ifdef FEAT_GUI
+ if (gui.in_use)
+ j = 3;
+ else
+! # endif
+ j = termcodes[idx].len;
+ if (STRNCMP(tp, tp + slen, (size_t)j) == 0
+ && tp[slen + j] == mouse_code
+ && tp[slen + j + 1] != NUL
+ && tp[slen + j + 2] != NUL
+! # ifdef FEAT_GUI
+ && (!gui.in_use
+ || (tp[slen + j + 3] != NUL
+ && tp[slen + j + 4] != NUL))
+! # endif
+ )
+ slen += j;
+ else
+***************
+*** 5213,5219 ****
+ }
+ }
+
+- # if defined(FEAT_MOUSE_URXVT) || defined(FEAT_MOUSE_SGR)
+ if (key_name[0] == KS_URXVT_MOUSE
+ || key_name[0] == KS_SGR_MOUSE
+ || key_name[0] == KS_SGR_MOUSE_RELEASE)
+--- 5196,5201 ----
+***************
+*** 5267,5283 ****
+ * modifier keys (alt/shift/ctrl/meta) state. */
+ modifiers = 0;
+ }
+- # endif
+
+ if (key_name[0] == (int)KS_MOUSE
+! #ifdef FEAT_MOUSE_URXVT
+ || key_name[0] == (int)KS_URXVT_MOUSE
+! #endif
+! #ifdef FEAT_MOUSE_SGR
+ || key_name[0] == KS_SGR_MOUSE
+! || key_name[0] == KS_SGR_MOUSE_RELEASE
+! #endif
+! )
+ {
+ # if !defined(MSWIN)
+ /*
+--- 5249,5261 ----
+ * modifier keys (alt/shift/ctrl/meta) state. */
+ modifiers = 0;
+ }
+
+ if (key_name[0] == (int)KS_MOUSE
+! # ifdef FEAT_MOUSE_URXVT
+ || key_name[0] == (int)KS_URXVT_MOUSE
+! # endif
+ || key_name[0] == KS_SGR_MOUSE
+! || key_name[0] == KS_SGR_MOUSE_RELEASE)
+ {
+ # if !defined(MSWIN)
+ /*
+*** ../vim-8.1.1033/src/version.c 2019-03-22 11:33:04.445160178 +0100
+--- src/version.c 2019-03-22 11:54:42.521339700 +0100
+***************
+*** 426,432 ****
+ #endif
+
+ #if defined(UNIX) || defined(VMS)
+! # ifdef FEAT_MOUSE_SGR
+ "+mouse_sgr",
+ # else
+ "-mouse_sgr",
+--- 426,432 ----
+ #endif
+
+ #if defined(UNIX) || defined(VMS)
+! # ifdef FEAT_MOUSE_XTERM
+ "+mouse_sgr",
+ # else
+ "-mouse_sgr",
+*** ../vim-8.1.1033/src/feature.h 2019-02-17 18:59:07.114686682 +0100
+--- src/feature.h 2019-03-22 11:55:41.280985721 +0100
+***************
+*** 1026,1034 ****
+ # ifdef FEAT_BIG
+ # define FEAT_MOUSE_URXVT
+ # endif
+- # ifdef FEAT_BIG
+- # define FEAT_MOUSE_SGR
+- # endif
+ # if defined(FEAT_NORMAL) && defined(MSWIN)
+ # define DOS_MOUSE
+ # endif
+--- 1026,1031 ----
+***************
+*** 1057,1067 ****
+ # define FEAT_MOUSE_XTERM
+ #endif
+
+- /* sgr is a small variation of mouse_xterm, and shares its code */
+- #if defined(FEAT_MOUSE_SGR) && !defined(FEAT_MOUSE_XTERM)
+- # define FEAT_MOUSE_XTERM
+- #endif
+-
+ /* Define FEAT_MOUSE when any of the above is defined or FEAT_GUI. */
+ #if !defined(FEAT_MOUSE_TTY) \
+ && (defined(FEAT_MOUSE_XTERM) \
+--- 1054,1059 ----
+***************
+*** 1072,1079 ****
+ || defined(FEAT_MOUSE_JSB) \
+ || defined(FEAT_MOUSE_PTERM) \
+ || defined(FEAT_SYSMOUSE) \
+! || defined(FEAT_MOUSE_URXVT) \
+! || defined(FEAT_MOUSE_SGR))
+ # define FEAT_MOUSE_TTY /* include non-GUI mouse support */
+ #endif
+ #if !defined(FEAT_MOUSE) && (defined(FEAT_MOUSE_TTY) || defined(FEAT_GUI))
+--- 1064,1070 ----
+ || defined(FEAT_MOUSE_JSB) \
+ || defined(FEAT_MOUSE_PTERM) \
+ || defined(FEAT_SYSMOUSE) \
+! || defined(FEAT_MOUSE_URXVT))
+ # define FEAT_MOUSE_TTY /* include non-GUI mouse support */
+ #endif
+ #if !defined(FEAT_MOUSE) && (defined(FEAT_MOUSE_TTY) || defined(FEAT_GUI))
+*** ../vim-8.1.1033/src/version.c 2019-03-22 11:33:04.445160178 +0100
+--- src/version.c 2019-03-22 11:54:42.521339700 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1034,
+ /**/
+
+--
+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.1035 b/data/vim/patches/8.1.1035
new file mode 100644
index 000000000..891c7c3b5
--- /dev/null
+++ b/data/vim/patches/8.1.1035
@@ -0,0 +1,171 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1035
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1035
+Problem: prop_remove() second argument is not optional.
+Solution: Fix argument count. Use "buf" instead of "curbuf". (closes #4147)
+Files: src/evalfunc.c, src/testdir/test_textprop.vim, src/textprop.c
+
+
+*** ../vim-8.1.1034/src/evalfunc.c 2019-03-22 12:03:26.583533911 +0100
+--- src/evalfunc.c 2019-03-22 13:13:27.209011192 +0100
+***************
+*** 788,794 ****
+ {"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},
+--- 788,794 ----
+ {"prop_add", 3, 3, f_prop_add},
+ {"prop_clear", 1, 3, f_prop_clear},
+ {"prop_list", 1, 2, f_prop_list},
+! {"prop_remove", 1, 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},
+*** ../vim-8.1.1034/src/testdir/test_textprop.vim 2019-02-22 14:38:46.447452832 +0100
+--- src/testdir/test_textprop.vim 2019-03-22 13:19:41.448110561 +0100
+***************
+*** 166,193 ****
+ 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
+--- 166,229 ----
+ new
+ let bufnr = bufnr('')
+ call AddPropTypes()
+! for lnum in range(1, 4)
+! call setline(lnum, 'one two three')
+! endfor
+ wincmd w
+! for lnum in range(1, 4)
+! call prop_add(lnum, 1, {'length': 3, 'id': 11, 'type': 'one', 'bufnr': bufnr})
+! call prop_add(lnum, 5, {'length': 3, 'id': 12, 'type': 'two', 'bufnr': bufnr})
+! call prop_add(lnum, 11, {'length': 3, 'id': 13, 'type': 'three', 'bufnr': bufnr})
+! endfor
+!
+ 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
+! let before_props = deepcopy(props)
+ unlet props[1]
++
++ call prop_remove({'id': 12, 'bufnr': bufnr}, 1)
++ call assert_equal(props, prop_list(1, {'bufnr': bufnr}))
++ call assert_equal(before_props, prop_list(2, {'bufnr': bufnr}))
++ call assert_equal(before_props, prop_list(3, {'bufnr': bufnr}))
++ call assert_equal(before_props, prop_list(4, {'bufnr': bufnr}))
++
++ call prop_remove({'id': 12, 'bufnr': bufnr}, 3, 4)
+ call assert_equal(props, prop_list(1, {'bufnr': bufnr}))
++ call assert_equal(before_props, prop_list(2, {'bufnr': bufnr}))
++ call assert_equal(props, prop_list(3, {'bufnr': bufnr}))
++ call assert_equal(props, prop_list(4, {'bufnr': bufnr}))
++
++ call prop_remove({'id': 12, 'bufnr': bufnr})
++ for lnum in range(1, 4)
++ call assert_equal(props, prop_list(lnum, {'bufnr': bufnr}))
++ endfor
+
+ " remove by type
+! let before_props = deepcopy(props)
+ unlet props[0]
++
++ call prop_remove({'type': 'one', 'bufnr': bufnr}, 1)
+ call assert_equal(props, prop_list(1, {'bufnr': bufnr}))
++ call assert_equal(before_props, prop_list(2, {'bufnr': bufnr}))
++ call assert_equal(before_props, prop_list(3, {'bufnr': bufnr}))
++ call assert_equal(before_props, prop_list(4, {'bufnr': bufnr}))
++
++ call prop_remove({'type': 'one', 'bufnr': bufnr}, 3, 4)
++ call assert_equal(props, prop_list(1, {'bufnr': bufnr}))
++ call assert_equal(before_props, prop_list(2, {'bufnr': bufnr}))
++ call assert_equal(props, prop_list(3, {'bufnr': bufnr}))
++ call assert_equal(props, prop_list(4, {'bufnr': bufnr}))
++
++ call prop_remove({'type': 'one', 'bufnr': bufnr})
++ for lnum in range(1, 4)
++ call assert_equal(props, prop_list(lnum, {'bufnr': bufnr}))
++ endfor
+
+ call DeletePropTypes()
+ wincmd w
+*** ../vim-8.1.1034/src/textprop.c 2019-02-22 19:14:46.774074872 +0100
+--- src/textprop.c 2019-03-22 13:13:27.209011192 +0100
+***************
+*** 629,635 ****
+ 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
+--- 629,638 ----
+ mch_memmove(newptr, buf->b_ml.ml_line_ptr,
+ buf->b_ml.ml_line_len);
+ buf->b_ml.ml_line_ptr = newptr;
+! buf->b_ml.ml_flags |= ML_LINE_DIRTY;
+!
+! cur_prop = buf->b_ml.ml_line_ptr + len
+! + idx * sizeof(textprop_T);
+ }
+
+ taillen = buf->b_ml.ml_line_len - len
+*** ../vim-8.1.1034/src/version.c 2019-03-22 12:03:26.587533860 +0100
+--- src/version.c 2019-03-22 13:14:52.784892767 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1035,
+ /**/
+
+--
+From "know your smileys":
+ :-E Has major dental problems
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1036 b/data/vim/patches/8.1.1036
new file mode 100644
index 000000000..5d112c65e
--- /dev/null
+++ b/data/vim/patches/8.1.1036
@@ -0,0 +1,271 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1036
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1036
+Problem: Quickfix function arguments are inconsistent.
+Solution: Pass a list pointer to more functions. (Yegappan Lakshmanan,
+ closes #4149)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.1035/src/quickfix.c 2019-03-21 21:12:46.282715864 +0100
+--- src/quickfix.c 2019-03-22 14:14:13.850223057 +0100
+***************
+*** 1629,1645 ****
+ // 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(qf_get_list(qi, qf_idx)))
+! old_last = qi->qf_lists[qf_idx].qf_last;
+ }
+
+- qfl = qf_get_list(qi, 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;
+--- 1629,1645 ----
+ // make place for a new list
+ qf_new_list(qi, qf_title);
+ qf_idx = qi->qf_curlist;
++ qfl = qf_get_list(qi, qf_idx);
+ }
+ else
+ {
+ // Adding to existing list, use last entry.
+ adding = TRUE;
+! qfl = qf_get_list(qi, qf_idx);
+! if (!qf_list_empty(qfl))
+! old_last = qfl->qf_last;
+ }
+
+ // 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;
+***************
+*** 3921,3927 ****
+ // it if we have errors; otherwise, leave it closed.
+ if (qf_stack_empty(qi)
+ || qfl->qf_nonevalid
+! || qf_list_empty(qf_get_curlist(qi)))
+ {
+ if (win != NULL)
+ ex_cclose(eap);
+--- 3921,3927 ----
+ // it if we have errors; otherwise, leave it closed.
+ if (qf_stack_empty(qi)
+ || qfl->qf_nonevalid
+! || qf_list_empty(qfl))
+ {
+ if (win != NULL)
+ ex_cclose(eap);
+***************
+*** 5286,5292 ****
+ */
+ static int
+ vgr_match_buflines(
+! qf_info_T *qi,
+ char_u *fname,
+ buf_T *buf,
+ regmmatch_T *regmatch,
+--- 5286,5292 ----
+ */
+ static int
+ vgr_match_buflines(
+! qf_list_T *qfl,
+ char_u *fname,
+ buf_T *buf,
+ regmmatch_T *regmatch,
+***************
+*** 5307,5313 ****
+ // 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(qf_get_curlist(qi),
+ NULL, // dir
+ fname,
+ NULL,
+--- 5307,5313 ----
+ // 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(qfl,
+ NULL, // dir
+ fname,
+ NULL,
+***************
+*** 5535,5541 ****
+ {
+ // 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)
+--- 5535,5542 ----
+ {
+ // Try for a match in all lines of the buffer.
+ // For ":1vimgrep" look for first match only.
+! found_match = vgr_match_buflines(qf_get_curlist(qi),
+! fname, buf, &regmatch,
+ &tomatch, duplicate_name, flags);
+
+ if (using_dummy)
+***************
+*** 7082,7088 ****
+ */
+ static void
+ hgr_search_file(
+! qf_info_T *qi,
+ char_u *fname,
+ vimconv_T *p_vc,
+ regmatch_T *p_regmatch)
+--- 7083,7089 ----
+ */
+ static void
+ hgr_search_file(
+! qf_list_T *qfl,
+ char_u *fname,
+ vimconv_T *p_vc,
+ regmatch_T *p_regmatch)
+***************
+*** 7117,7123 ****
+ while (l > 0 && line[l - 1] <= ' ')
+ line[--l] = NUL;
+
+! if (qf_add_entry(qf_get_curlist(qi),
+ NULL, // dir
+ fname,
+ NULL,
+--- 7118,7124 ----
+ while (l > 0 && line[l - 1] <= ' ')
+ line[--l] = NUL;
+
+! if (qf_add_entry(qfl,
+ NULL, // dir
+ fname,
+ NULL,
+***************
+*** 7153,7159 ****
+ */
+ static void
+ hgr_search_files_in_dir(
+! qf_info_T *qi,
+ char_u *dirname,
+ regmatch_T *p_regmatch,
+ vimconv_T *p_vc
+--- 7154,7160 ----
+ */
+ static void
+ hgr_search_files_in_dir(
+! qf_list_T *qfl,
+ char_u *dirname,
+ regmatch_T *p_regmatch,
+ vimconv_T *p_vc
+***************
+*** 7186,7192 ****
+ continue;
+ #endif
+
+! hgr_search_file(qi, fnames[fi], p_vc, p_regmatch);
+ }
+ FreeWild(fcount, fnames);
+ }
+--- 7187,7193 ----
+ continue;
+ #endif
+
+! hgr_search_file(qfl, fnames[fi], p_vc, p_regmatch);
+ }
+ FreeWild(fcount, fnames);
+ }
+***************
+*** 7199,7205 ****
+ * specified language are found.
+ */
+ static void
+! hgr_search_in_rtp(qf_info_T *qi, regmatch_T *p_regmatch, char_u *lang)
+ {
+ char_u *p;
+
+--- 7200,7206 ----
+ * specified language are found.
+ */
+ static void
+! hgr_search_in_rtp(qf_list_T *qfl, regmatch_T *p_regmatch, char_u *lang)
+ {
+ char_u *p;
+
+***************
+*** 7217,7223 ****
+ {
+ copy_option_part(&p, NameBuff, MAXPATHL, ",");
+
+! hgr_search_files_in_dir(qi, NameBuff, p_regmatch, &vc
+ #ifdef FEAT_MULTI_LANG
+ , lang
+ #endif
+--- 7218,7224 ----
+ {
+ copy_option_part(&p, NameBuff, MAXPATHL, ",");
+
+! hgr_search_files_in_dir(qfl, NameBuff, p_regmatch, &vc
+ #ifdef FEAT_MULTI_LANG
+ , lang
+ #endif
+***************
+*** 7281,7292 ****
+
+ // create a new quickfix list
+ qf_new_list(qi, qf_cmdtitle(*eap->cmdlinep));
+
+! hgr_search_in_rtp(qi, &regmatch, lang);
+
+ vim_regfree(regmatch.regprog);
+
+- qfl = qf_get_curlist(qi);
+ qfl->qf_nonevalid = FALSE;
+ qfl->qf_ptr = qfl->qf_start;
+ qfl->qf_index = 1;
+--- 7282,7293 ----
+
+ // create a new quickfix list
+ qf_new_list(qi, qf_cmdtitle(*eap->cmdlinep));
++ qfl = qf_get_curlist(qi);
+
+! hgr_search_in_rtp(qfl, &regmatch, lang);
+
+ vim_regfree(regmatch.regprog);
+
+ qfl->qf_nonevalid = FALSE;
+ qfl->qf_ptr = qfl->qf_start;
+ qfl->qf_index = 1;
+*** ../vim-8.1.1035/src/version.c 2019-03-22 13:20:40.091897268 +0100
+--- src/version.c 2019-03-22 14:15:08.653809071 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1036,
+ /**/
+
+--
+From "know your smileys":
+ :-| :-| Deja' vu!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1037 b/data/vim/patches/8.1.1037
new file mode 100644
index 000000000..aa8415092
--- /dev/null
+++ b/data/vim/patches/8.1.1037
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1037
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1037
+Problem: Memory usage test may still fail on some systems.
+Solution: Increase tolerance from 3% to 20%.
+Files: src/testdir/test_memory_usage.vim
+
+
+*** ../vim-8.1.1036/src/testdir/test_memory_usage.vim 2019-03-22 11:33:04.445160178 +0100
+--- src/testdir/test_memory_usage.vim 2019-03-22 14:36:02.166938817 +0100
+***************
+*** 138,146 ****
+ endfor
+
+ " The usage may be a bit less than the last value, use 80%.
+! " Allow for 3% tolerance at the upper limit.
+ let lower = before * 8 / 10
+! let upper = (after.max + (after.last - before)) * 103 / 100
+ call assert_inrange(lower, upper, last)
+
+ call vim.stop()
+--- 138,147 ----
+ endfor
+
+ " The usage may be a bit less than the last value, use 80%.
+! " Allow for 20% tolerance at the upper limit. That's very permissive, but
+! " otherwise the test fails sometimes.
+ let lower = before * 8 / 10
+! let upper = (after.max + (after.last - before)) * 12 / 10
+ call assert_inrange(lower, upper, last)
+
+ call vim.stop()
+*** ../vim-8.1.1036/src/version.c 2019-03-22 14:16:02.877160892 +0100
+--- src/version.c 2019-03-22 14:36:39.330677890 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1037,
+ /**/
+
+--
+From "know your smileys":
+ :.-( 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.1038 b/data/vim/patches/8.1.1038
new file mode 100644
index 000000000..079eab27e
--- /dev/null
+++ b/data/vim/patches/8.1.1038
@@ -0,0 +1,2458 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1038
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1038
+Problem: Arabic support excludes Farsi.
+Solution: Add Farsi support to the Arabic support. (Ali Gholami Rudi,
+ Ameretat Reith)
+Files: Filelist, src/arabic.c, src/arabic.h, src/globals.h, src/macros.h,
+ src/mbyte.c, src/proto/arabic.pro, src/proto/mbyte.pro,
+ src/Makefile, src/testdir/test_arabic.vim
+
+
+*** ../vim-8.1.1037/Filelist 2019-02-16 15:09:21.209946237 +0100
+--- Filelist 2019-03-22 15:28:28.674998090 +0100
+***************
+*** 12,18 ****
+ src/README.txt \
+ src/alloc.h \
+ src/arabic.c \
+- src/arabic.h \
+ src/ascii.h \
+ src/autocmd.c \
+ src/beval.c \
+--- 12,17 ----
+*** ../vim-8.1.1037/src/arabic.c 2019-03-21 21:45:30.871282226 +0100
+--- src/arabic.c 2019-03-22 16:19:36.840005367 +0100
+***************
+*** 11,551 ****
+ * arabic.c: functions for Arabic language
+ *
+ * Author: Nadim Shaikli & Isam Bayazidi
+ */
+
+ #include "vim.h"
+
+ #if defined(FEAT_ARABIC) || defined(PROTO)
+
+! static int A_firstc_laa(int c1, int c);
+! static int A_is_harakat(int c);
+! static int A_is_iso(int c);
+! static int A_is_formb(int c);
+! static int A_is_ok(int c);
+! static int A_is_valid(int c);
+! static int A_is_special(int c);
+!
+
+ /*
+! * Returns True if c is an ISO-8859-6 shaped ARABIC letter (user entered)
+ */
+ static int
+! A_is_a(int cur_c)
+ {
+! switch (cur_c)
+ {
+- case a_HAMZA:
+ case a_ALEF_MADDA:
+ case a_ALEF_HAMZA_ABOVE:
+! case a_WAW_HAMZA:
+ case a_ALEF_HAMZA_BELOW:
+! case a_YEH_HAMZA:
+ case a_ALEF:
+! case a_BEH:
+! case a_TEH_MARBUTA:
+! case a_TEH:
+! case a_THEH:
+! case a_JEEM:
+! case a_HAH:
+! case a_KHAH:
+! case a_DAL:
+! case a_THAL:
+! case a_REH:
+! case a_ZAIN:
+! case a_SEEN:
+! case a_SHEEN:
+! case a_SAD:
+! case a_DAD:
+! case a_TAH:
+! case a_ZAH:
+! case a_AIN:
+! case a_GHAIN:
+! case a_TATWEEL:
+! case a_FEH:
+! case a_QAF:
+! case a_KAF:
+! case a_LAM:
+! case a_MEEM:
+! case a_NOON:
+! case a_HEH:
+! case a_WAW:
+! case a_ALEF_MAKSURA:
+! case a_YEH:
+! return TRUE;
+! }
+!
+! return FALSE;
+! }
+!
+!
+! /*
+! * Returns True if c is an Isolated Form-B ARABIC letter
+! */
+! static int
+! A_is_s(int cur_c)
+! {
+! switch (cur_c)
+! {
+! case a_s_HAMZA:
+! case a_s_ALEF_MADDA:
+! case a_s_ALEF_HAMZA_ABOVE:
+! case a_s_WAW_HAMZA:
+! case a_s_ALEF_HAMZA_BELOW:
+! case a_s_YEH_HAMZA:
+! case a_s_ALEF:
+! case a_s_BEH:
+! case a_s_TEH_MARBUTA:
+! case a_s_TEH:
+! case a_s_THEH:
+! case a_s_JEEM:
+! case a_s_HAH:
+! case a_s_KHAH:
+! case a_s_DAL:
+! case a_s_THAL:
+! case a_s_REH:
+! case a_s_ZAIN:
+! case a_s_SEEN:
+! case a_s_SHEEN:
+! case a_s_SAD:
+! case a_s_DAD:
+! case a_s_TAH:
+! case a_s_ZAH:
+! case a_s_AIN:
+! case a_s_GHAIN:
+! case a_s_FEH:
+! case a_s_QAF:
+! case a_s_KAF:
+! case a_s_LAM:
+! case a_s_MEEM:
+! case a_s_NOON:
+! case a_s_HEH:
+! case a_s_WAW:
+! case a_s_ALEF_MAKSURA:
+! case a_s_YEH:
+! return TRUE;
+ }
+
+! return FALSE;
+ }
+
+-
+ /*
+! * Returns True if c is a Final shape of an ARABIC letter
+ */
+ static int
+! A_is_f(int cur_c)
+ {
+! switch (cur_c)
+! {
+! case a_f_ALEF_MADDA:
+! case a_f_ALEF_HAMZA_ABOVE:
+! case a_f_WAW_HAMZA:
+! case a_f_ALEF_HAMZA_BELOW:
+! case a_f_YEH_HAMZA:
+! case a_f_ALEF:
+! case a_f_BEH:
+! case a_f_TEH_MARBUTA:
+! case a_f_TEH:
+! case a_f_THEH:
+! case a_f_JEEM:
+! case a_f_HAH:
+! case a_f_KHAH:
+! case a_f_DAL:
+! case a_f_THAL:
+! case a_f_REH:
+! case a_f_ZAIN:
+! case a_f_SEEN:
+! case a_f_SHEEN:
+! case a_f_SAD:
+! case a_f_DAD:
+! case a_f_TAH:
+! case a_f_ZAH:
+! case a_f_AIN:
+! case a_f_GHAIN:
+! case a_f_FEH:
+! case a_f_QAF:
+! case a_f_KAF:
+! case a_f_LAM:
+! case a_f_MEEM:
+! case a_f_NOON:
+! case a_f_HEH:
+! case a_f_WAW:
+! case a_f_ALEF_MAKSURA:
+! case a_f_YEH:
+! case a_f_LAM_ALEF_MADDA_ABOVE:
+! case a_f_LAM_ALEF_HAMZA_ABOVE:
+! case a_f_LAM_ALEF_HAMZA_BELOW:
+! case a_f_LAM_ALEF:
+! return TRUE;
+! }
+! return FALSE;
+! }
+
+!
+! /*
+! * Change shape - from ISO-8859-6/Isolated to Form-B Isolated
+! */
+! static int
+! chg_c_a2s(int cur_c)
+! {
+! switch (cur_c)
+ {
+! case a_HAMZA: return a_s_HAMZA;
+! case a_ALEF_MADDA: return a_s_ALEF_MADDA;
+! case a_ALEF_HAMZA_ABOVE: return a_s_ALEF_HAMZA_ABOVE;
+! case a_WAW_HAMZA: return a_s_WAW_HAMZA;
+! case a_ALEF_HAMZA_BELOW: return a_s_ALEF_HAMZA_BELOW;
+! case a_YEH_HAMZA: return a_s_YEH_HAMZA;
+! case a_ALEF: return a_s_ALEF;
+! case a_TEH_MARBUTA: return a_s_TEH_MARBUTA;
+! case a_DAL: return a_s_DAL;
+! case a_THAL: return a_s_THAL;
+! case a_REH: return a_s_REH;
+! case a_ZAIN: return a_s_ZAIN;
+! case a_TATWEEL: return cur_c; /* exceptions */
+! case a_WAW: return a_s_WAW;
+! case a_ALEF_MAKSURA: return a_s_ALEF_MAKSURA;
+! case a_BEH: return a_s_BEH;
+! case a_TEH: return a_s_TEH;
+! case a_THEH: return a_s_THEH;
+! case a_JEEM: return a_s_JEEM;
+! case a_HAH: return a_s_HAH;
+! case a_KHAH: return a_s_KHAH;
+! case a_SEEN: return a_s_SEEN;
+! case a_SHEEN: return a_s_SHEEN;
+! case a_SAD: return a_s_SAD;
+! case a_DAD: return a_s_DAD;
+! case a_TAH: return a_s_TAH;
+! case a_ZAH: return a_s_ZAH;
+! case a_AIN: return a_s_AIN;
+! case a_GHAIN: return a_s_GHAIN;
+! case a_FEH: return a_s_FEH;
+! case a_QAF: return a_s_QAF;
+! case a_KAF: return a_s_KAF;
+! case a_LAM: return a_s_LAM;
+! case a_MEEM: return a_s_MEEM;
+! case a_NOON: return a_s_NOON;
+! case a_HEH: return a_s_HEH;
+! case a_YEH: return a_s_YEH;
+ }
+- return 0;
+- }
+
+!
+! /*
+! * Change shape - from ISO-8859-6/Isolated to Initial
+! */
+! static int
+! chg_c_a2i(int cur_c)
+! {
+! switch (cur_c)
+! {
+! case a_YEH_HAMZA: return a_i_YEH_HAMZA;
+! case a_HAMZA: /* exceptions */
+! return a_s_HAMZA;
+! case a_ALEF_MADDA: /* exceptions */
+! return a_s_ALEF_MADDA;
+! case a_ALEF_HAMZA_ABOVE: /* exceptions */
+! return a_s_ALEF_HAMZA_ABOVE;
+! case a_WAW_HAMZA: /* exceptions */
+! return a_s_WAW_HAMZA;
+! case a_ALEF_HAMZA_BELOW: /* exceptions */
+! return a_s_ALEF_HAMZA_BELOW;
+! case a_ALEF: /* exceptions */
+! return a_s_ALEF;
+! case a_TEH_MARBUTA: /* exceptions */
+! return a_s_TEH_MARBUTA;
+! case a_DAL: /* exceptions */
+! return a_s_DAL;
+! case a_THAL: /* exceptions */
+! return a_s_THAL;
+! case a_REH: /* exceptions */
+! return a_s_REH;
+! case a_ZAIN: /* exceptions */
+! return a_s_ZAIN;
+! case a_TATWEEL: /* exceptions */
+! return cur_c;
+! case a_WAW: /* exceptions */
+! return a_s_WAW;
+! case a_ALEF_MAKSURA: /* exceptions */
+! return a_s_ALEF_MAKSURA;
+! case a_BEH: return a_i_BEH;
+! case a_TEH: return a_i_TEH;
+! case a_THEH: return a_i_THEH;
+! case a_JEEM: return a_i_JEEM;
+! case a_HAH: return a_i_HAH;
+! case a_KHAH: return a_i_KHAH;
+! case a_SEEN: return a_i_SEEN;
+! case a_SHEEN: return a_i_SHEEN;
+! case a_SAD: return a_i_SAD;
+! case a_DAD: return a_i_DAD;
+! case a_TAH: return a_i_TAH;
+! case a_ZAH: return a_i_ZAH;
+! case a_AIN: return a_i_AIN;
+! case a_GHAIN: return a_i_GHAIN;
+! case a_FEH: return a_i_FEH;
+! case a_QAF: return a_i_QAF;
+! case a_KAF: return a_i_KAF;
+! case a_LAM: return a_i_LAM;
+! case a_MEEM: return a_i_MEEM;
+! case a_NOON: return a_i_NOON;
+! case a_HEH: return a_i_HEH;
+! case a_YEH: return a_i_YEH;
+! }
+! return 0;
+ }
+
+-
+ /*
+! * Change shape - from ISO-8859-6/Isolated to Medial
+ */
+ static int
+! chg_c_a2m(int cur_c)
+ {
+! switch (cur_c)
+! {
+! case a_HAMZA: return a_s_HAMZA; /* exception */
+! case a_ALEF_MADDA: return a_f_ALEF_MADDA; /* exception */
+! case a_ALEF_HAMZA_ABOVE: return a_f_ALEF_HAMZA_ABOVE; /* exception */
+! case a_WAW_HAMZA: return a_f_WAW_HAMZA; /* exception */
+! case a_ALEF_HAMZA_BELOW: return a_f_ALEF_HAMZA_BELOW; /* exception */
+! case a_YEH_HAMZA: return a_m_YEH_HAMZA;
+! case a_ALEF: return a_f_ALEF; /* exception */
+! case a_BEH: return a_m_BEH;
+! case a_TEH_MARBUTA: return a_f_TEH_MARBUTA; /* exception */
+! case a_TEH: return a_m_TEH;
+! case a_THEH: return a_m_THEH;
+! case a_JEEM: return a_m_JEEM;
+! case a_HAH: return a_m_HAH;
+! case a_KHAH: return a_m_KHAH;
+! case a_DAL: return a_f_DAL; /* exception */
+! case a_THAL: return a_f_THAL; /* exception */
+! case a_REH: return a_f_REH; /* exception */
+! case a_ZAIN: return a_f_ZAIN; /* exception */
+! case a_SEEN: return a_m_SEEN;
+! case a_SHEEN: return a_m_SHEEN;
+! case a_SAD: return a_m_SAD;
+! case a_DAD: return a_m_DAD;
+! case a_TAH: return a_m_TAH;
+! case a_ZAH: return a_m_ZAH;
+! case a_AIN: return a_m_AIN;
+! case a_GHAIN: return a_m_GHAIN;
+! case a_TATWEEL: return cur_c; /* exception */
+! case a_FEH: return a_m_FEH;
+! case a_QAF: return a_m_QAF;
+! case a_KAF: return a_m_KAF;
+! case a_LAM: return a_m_LAM;
+! case a_MEEM: return a_m_MEEM;
+! case a_NOON: return a_m_NOON;
+! case a_HEH: return a_m_HEH;
+! case a_WAW: return a_f_WAW; /* exception */
+! case a_ALEF_MAKSURA: return a_f_ALEF_MAKSURA; /* exception */
+! case a_YEH: return a_m_YEH;
+! }
+! return 0;
+! }
+!
+
+! /*
+! * Change shape - from ISO-8859-6/Isolated to final
+! */
+! static int
+! chg_c_a2f(int cur_c)
+! {
+! /* NOTE: these encodings need to be accounted for
+! * a_f_ALEF_MADDA;
+! * a_f_ALEF_HAMZA_ABOVE;
+! * a_f_ALEF_HAMZA_BELOW;
+! * a_f_LAM_ALEF_MADDA_ABOVE;
+! * a_f_LAM_ALEF_HAMZA_ABOVE;
+! * a_f_LAM_ALEF_HAMZA_BELOW;
+! */
+! switch (cur_c)
+! {
+! case a_HAMZA: return a_s_HAMZA; /* exception */
+! case a_ALEF_MADDA: return a_f_ALEF_MADDA;
+! case a_ALEF_HAMZA_ABOVE: return a_f_ALEF_HAMZA_ABOVE;
+! case a_WAW_HAMZA: return a_f_WAW_HAMZA;
+! case a_ALEF_HAMZA_BELOW: return a_f_ALEF_HAMZA_BELOW;
+! case a_YEH_HAMZA: return a_f_YEH_HAMZA;
+! case a_ALEF: return a_f_ALEF;
+! case a_BEH: return a_f_BEH;
+! case a_TEH_MARBUTA: return a_f_TEH_MARBUTA;
+! case a_TEH: return a_f_TEH;
+! case a_THEH: return a_f_THEH;
+! case a_JEEM: return a_f_JEEM;
+! case a_HAH: return a_f_HAH;
+! case a_KHAH: return a_f_KHAH;
+! case a_DAL: return a_f_DAL;
+! case a_THAL: return a_f_THAL;
+! case a_REH: return a_f_REH;
+! case a_ZAIN: return a_f_ZAIN;
+! case a_SEEN: return a_f_SEEN;
+! case a_SHEEN: return a_f_SHEEN;
+! case a_SAD: return a_f_SAD;
+! case a_DAD: return a_f_DAD;
+! case a_TAH: return a_f_TAH;
+! case a_ZAH: return a_f_ZAH;
+! case a_AIN: return a_f_AIN;
+! case a_GHAIN: return a_f_GHAIN;
+! case a_TATWEEL: return cur_c; /* exception */
+! case a_FEH: return a_f_FEH;
+! case a_QAF: return a_f_QAF;
+! case a_KAF: return a_f_KAF;
+! case a_LAM: return a_f_LAM;
+! case a_MEEM: return a_f_MEEM;
+! case a_NOON: return a_f_NOON;
+! case a_HEH: return a_f_HEH;
+! case a_WAW: return a_f_WAW;
+! case a_ALEF_MAKSURA: return a_f_ALEF_MAKSURA;
+! case a_YEH: return a_f_YEH;
+! }
+! return 0;
+ }
+
+-
+ /*
+! * Change shape - from Initial to Medial
+! * This code is unreachable, because for the relevant characters ARABIC_CHAR()
+! * is FALSE;
+ */
+! #if 0
+! static int
+! chg_c_i2m(int cur_c)
+ {
+! switch (cur_c)
+! {
+! case a_i_YEH_HAMZA: return a_m_YEH_HAMZA;
+! case a_i_BEH: return a_m_BEH;
+! case a_i_TEH: return a_m_TEH;
+! case a_i_THEH: return a_m_THEH;
+! case a_i_JEEM: return a_m_JEEM;
+! case a_i_HAH: return a_m_HAH;
+! case a_i_KHAH: return a_m_KHAH;
+! case a_i_SEEN: return a_m_SEEN;
+! case a_i_SHEEN: return a_m_SHEEN;
+! case a_i_SAD: return a_m_SAD;
+! case a_i_DAD: return a_m_DAD;
+! case a_i_TAH: return a_m_TAH;
+! case a_i_ZAH: return a_m_ZAH;
+! case a_i_AIN: return a_m_AIN;
+! case a_i_GHAIN: return a_m_GHAIN;
+! case a_i_FEH: return a_m_FEH;
+! case a_i_QAF: return a_m_QAF;
+! case a_i_KAF: return a_m_KAF;
+! case a_i_LAM: return a_m_LAM;
+! case a_i_MEEM: return a_m_MEEM;
+! case a_i_NOON: return a_m_NOON;
+! case a_i_HEH: return a_m_HEH;
+! case a_i_YEH: return a_m_YEH;
+! }
+! return 0;
+ }
+- #endif
+-
+
+ /*
+! * Change shape - from Final to Medial
+ */
+! static int
+! chg_c_f2m(int cur_c)
+ {
+! switch (cur_c)
+! {
+! /* NOTE: these encodings are multi-positional, no ?
+! * case a_f_ALEF_MADDA:
+! * case a_f_ALEF_HAMZA_ABOVE:
+! * case a_f_ALEF_HAMZA_BELOW:
+! */
+! case a_f_YEH_HAMZA: return a_m_YEH_HAMZA;
+! case a_f_WAW_HAMZA: /* exceptions */
+! case a_f_ALEF:
+! case a_f_TEH_MARBUTA:
+! case a_f_DAL:
+! case a_f_THAL:
+! case a_f_REH:
+! case a_f_ZAIN:
+! case a_f_WAW:
+! case a_f_ALEF_MAKSURA:
+! return cur_c;
+! case a_f_BEH: return a_m_BEH;
+! case a_f_TEH: return a_m_TEH;
+! case a_f_THEH: return a_m_THEH;
+! case a_f_JEEM: return a_m_JEEM;
+! case a_f_HAH: return a_m_HAH;
+! case a_f_KHAH: return a_m_KHAH;
+! case a_f_SEEN: return a_m_SEEN;
+! case a_f_SHEEN: return a_m_SHEEN;
+! case a_f_SAD: return a_m_SAD;
+! case a_f_DAD: return a_m_DAD;
+! case a_f_TAH: return a_m_TAH;
+! case a_f_ZAH: return a_m_ZAH;
+! case a_f_AIN: return a_m_AIN;
+! case a_f_GHAIN: return a_m_GHAIN;
+! case a_f_FEH: return a_m_FEH;
+! case a_f_QAF: return a_m_QAF;
+! case a_f_KAF: return a_m_KAF;
+! case a_f_LAM: return a_m_LAM;
+! case a_f_MEEM: return a_m_MEEM;
+! case a_f_NOON: return a_m_NOON;
+! case a_f_HEH: return a_m_HEH;
+! case a_f_YEH: return a_m_YEH;
+!
+! /* NOTE: these encodings are multi-positional, no ?
+! * case a_f_LAM_ALEF_MADDA_ABOVE:
+! * case a_f_LAM_ALEF_HAMZA_ABOVE:
+! * case a_f_LAM_ALEF_HAMZA_BELOW:
+! * case a_f_LAM_ALEF:
+! */
+! }
+! return 0;
+ }
+
+-
+ /*
+! * Change shape - from Combination (2 char) to an Isolated
+ */
+ static int
+! chg_c_laa2i(int hid_c)
+ {
+! switch (hid_c)
+! {
+! case a_ALEF_MADDA: return a_s_LAM_ALEF_MADDA_ABOVE;
+! case a_ALEF_HAMZA_ABOVE: return a_s_LAM_ALEF_HAMZA_ABOVE;
+! case a_ALEF_HAMZA_BELOW: return a_s_LAM_ALEF_HAMZA_BELOW;
+! case a_ALEF: return a_s_LAM_ALEF;
+! }
+! return 0;
+ }
+
+-
+ /*
+! * Change shape - from Combination-Isolated to Final
+ */
+ static int
+! chg_c_laa2f(int hid_c)
+ {
+! switch (hid_c)
+! {
+! case a_ALEF_MADDA: return a_f_LAM_ALEF_MADDA_ABOVE;
+! case a_ALEF_HAMZA_ABOVE: return a_f_LAM_ALEF_HAMZA_ABOVE;
+! case a_ALEF_HAMZA_BELOW: return a_f_LAM_ALEF_HAMZA_BELOW;
+! case a_ALEF: return a_f_LAM_ALEF;
+! }
+! return 0;
+ }
+
+ /*
+! * Do "half-shaping" on character "c". Return zero if no shaping.
+ */
+ static int
+! half_shape(int c)
+ {
+! if (A_is_a(c))
+! return chg_c_a2i(c);
+! if (A_is_valid(c) && A_is_f(c))
+! return chg_c_f2m(c);
+! return 0;
+ }
+
+ /*
+--- 11,321 ----
+ * arabic.c: functions for Arabic language
+ *
+ * Author: Nadim Shaikli & Isam Bayazidi
++ * Farsi support and restructuring to make adding new letters easier by Ali
++ * Gholami Rudi. Further work by Ameretat Reith.
++ */
++
++ /*
++ * Sorted list of unicode Arabic characters. Each entry holds the
++ * presentation forms of a letter.
++ *
++ * Arabic characters are categorized into following types:
++ *
++ * Isolated - iso-8859-6 form
++ * Initial - unicode form-B start
++ * Medial - unicode form-B middle
++ * Final - unicode form-B final
++ * Stand-Alone - unicode form-B isolated
+ */
+
+ #include "vim.h"
+
+ #if defined(FEAT_ARABIC) || defined(PROTO)
+
+! // Unicode values for Arabic characters.
+! #define a_HAMZA 0x0621
+! #define a_ALEF_MADDA 0x0622
+! #define a_ALEF_HAMZA_ABOVE 0x0623
+! #define a_WAW_HAMZA 0x0624
+! #define a_ALEF_HAMZA_BELOW 0x0625
+! #define a_YEH_HAMZA 0x0626
+! #define a_ALEF 0x0627
+! #define a_BEH 0x0628
+! #define a_TEH_MARBUTA 0x0629
+! #define a_TEH 0x062a
+! #define a_THEH 0x062b
+! #define a_JEEM 0x062c
+! #define a_HAH 0x062d
+! #define a_KHAH 0x062e
+! #define a_DAL 0x062f
+! #define a_THAL 0x0630
+! #define a_REH 0x0631
+! #define a_ZAIN 0x0632
+! #define a_SEEN 0x0633
+! #define a_SHEEN 0x0634
+! #define a_SAD 0x0635
+! #define a_DAD 0x0636
+! #define a_TAH 0x0637
+! #define a_ZAH 0x0638
+! #define a_AIN 0x0639
+! #define a_GHAIN 0x063a
+! #define a_TATWEEL 0x0640
+! #define a_FEH 0x0641
+! #define a_QAF 0x0642
+! #define a_KAF 0x0643
+! #define a_LAM 0x0644
+! #define a_MEEM 0x0645
+! #define a_NOON 0x0646
+! #define a_HEH 0x0647
+! #define a_WAW 0x0648
+! #define a_ALEF_MAKSURA 0x0649
+! #define a_YEH 0x064a
+! #define a_FATHATAN 0x064b
+! #define a_DAMMATAN 0x064c
+! #define a_KASRATAN 0x064d
+! #define a_FATHA 0x064e
+! #define a_DAMMA 0x064f
+! #define a_KASRA 0x0650
+! #define a_SHADDA 0x0651
+! #define a_SUKUN 0x0652
+! #define a_MADDA_ABOVE 0x0653
+! #define a_HAMZA_ABOVE 0x0654
+! #define a_HAMZA_BELOW 0x0655
+!
+! #define a_PEH 0x067e
+! #define a_TCHEH 0x0686
+! #define a_JEH 0x0698
+! #define a_FKAF 0x06a9
+! #define a_GAF 0x06af
+! #define a_FYEH 0x06cc
+!
+! #define a_s_LAM_ALEF_MADDA_ABOVE 0xfef5
+! #define a_f_LAM_ALEF_MADDA_ABOVE 0xfef6
+! #define a_s_LAM_ALEF_HAMZA_ABOVE 0xfef7
+! #define a_f_LAM_ALEF_HAMZA_ABOVE 0xfef8
+! #define a_s_LAM_ALEF_HAMZA_BELOW 0xfef9
+! #define a_f_LAM_ALEF_HAMZA_BELOW 0xfefa
+! #define a_s_LAM_ALEF 0xfefb
+! #define a_f_LAM_ALEF 0xfefc
+!
+! static struct achar {
+! unsigned c;
+! unsigned isolated;
+! unsigned initial;
+! unsigned medial;
+! unsigned final;
+! } achars[] = {
+! {a_HAMZA, 0xfe80, 0, 0, 0},
+! {a_ALEF_MADDA, 0xfe81, 0, 0, 0xfe82},
+! {a_ALEF_HAMZA_ABOVE, 0xfe83, 0, 0, 0xfe84},
+! {a_WAW_HAMZA, 0xfe85, 0, 0, 0xfe86},
+! {a_ALEF_HAMZA_BELOW, 0xfe87, 0, 0, 0xfe88},
+! {a_YEH_HAMZA, 0xfe89, 0xfe8b, 0xfe8c, 0xfe8a},
+! {a_ALEF, 0xfe8d, 0, 0, 0xfe8e},
+! {a_BEH, 0xfe8f, 0xfe91, 0xfe92, 0xfe90},
+! {a_TEH_MARBUTA, 0xfe93, 0, 0, 0xfe94},
+! {a_TEH, 0xfe95, 0xfe97, 0xfe98, 0xfe96},
+! {a_THEH, 0xfe99, 0xfe9b, 0xfe9c, 0xfe9a},
+! {a_JEEM, 0xfe9d, 0xfe9f, 0xfea0, 0xfe9e},
+! {a_HAH, 0xfea1, 0xfea3, 0xfea4, 0xfea2},
+! {a_KHAH, 0xfea5, 0xfea7, 0xfea8, 0xfea6},
+! {a_DAL, 0xfea9, 0, 0, 0xfeaa},
+! {a_THAL, 0xfeab, 0, 0, 0xfeac},
+! {a_REH, 0xfead, 0, 0, 0xfeae},
+! {a_ZAIN, 0xfeaf, 0, 0, 0xfeb0},
+! {a_SEEN, 0xfeb1, 0xfeb3, 0xfeb4, 0xfeb2},
+! {a_SHEEN, 0xfeb5, 0xfeb7, 0xfeb8, 0xfeb6},
+! {a_SAD, 0xfeb9, 0xfebb, 0xfebc, 0xfeba},
+! {a_DAD, 0xfebd, 0xfebf, 0xfec0, 0xfebe},
+! {a_TAH, 0xfec1, 0xfec3, 0xfec4, 0xfec2},
+! {a_ZAH, 0xfec5, 0xfec7, 0xfec8, 0xfec6},
+! {a_AIN, 0xfec9, 0xfecb, 0xfecc, 0xfeca},
+! {a_GHAIN, 0xfecd, 0xfecf, 0xfed0, 0xfece},
+! {a_TATWEEL, 0, 0x0640, 0x0640, 0x0640},
+! {a_FEH, 0xfed1, 0xfed3, 0xfed4, 0xfed2},
+! {a_QAF, 0xfed5, 0xfed7, 0xfed8, 0xfed6},
+! {a_KAF, 0xfed9, 0xfedb, 0xfedc, 0xfeda},
+! {a_LAM, 0xfedd, 0xfedf, 0xfee0, 0xfede},
+! {a_MEEM, 0xfee1, 0xfee3, 0xfee4, 0xfee2},
+! {a_NOON, 0xfee5, 0xfee7, 0xfee8, 0xfee6},
+! {a_HEH, 0xfee9, 0xfeeb, 0xfeec, 0xfeea},
+! {a_WAW, 0xfeed, 0, 0, 0xfeee},
+! {a_ALEF_MAKSURA, 0xfeef, 0, 0, 0xfef0},
+! {a_YEH, 0xfef1, 0xfef3, 0xfef4, 0xfef2},
+! {a_FATHATAN, 0xfe70, 0, 0, 0},
+! {a_DAMMATAN, 0xfe72, 0, 0, 0},
+! {a_KASRATAN, 0xfe74, 0, 0, 0},
+! {a_FATHA, 0xfe76, 0, 0xfe77, 0},
+! {a_DAMMA, 0xfe78, 0, 0xfe79, 0},
+! {a_KASRA, 0xfe7a, 0, 0xfe7b, 0},
+! {a_SHADDA, 0xfe7c, 0, 0xfe7c, 0},
+! {a_SUKUN, 0xfe7e, 0, 0xfe7f, 0},
+! {a_MADDA_ABOVE, 0, 0, 0, 0},
+! {a_HAMZA_ABOVE, 0, 0, 0, 0},
+! {a_HAMZA_BELOW, 0, 0, 0, 0},
+! {a_PEH, 0xfb56, 0xfb58, 0xfb59, 0xfb57},
+! {a_TCHEH, 0xfb7a, 0xfb7c, 0xfb7d, 0xfb7b},
+! {a_JEH, 0xfb8a, 0, 0, 0xfb8b},
+! {a_FKAF, 0xfb8e, 0xfb90, 0xfb91, 0xfb8f},
+! {a_GAF, 0xfb92, 0xfb94, 0xfb95, 0xfb93},
+! {a_FYEH, 0xfbfc, 0xfbfe, 0xfbff, 0xfbfd},
+! };
+!
+! #define a_BYTE_ORDER_MARK 0xfeff
+!
+! #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+!
+! /*
+! * Find the struct achar pointer to the given Arabic char.
+! * Returns NULL if not found.
+! */
+! static struct achar *
+! find_achar(int c)
+! {
+! int h, m, l;
+!
+! // using binary search to find c
+! h = ARRAY_SIZE(achars);
+! l = 0;
+! while (l < h)
+! {
+! m = (h + l) / 2;
+! if (achars[m].c == (unsigned)c)
+! return &achars[m];
+! if ((unsigned)c < achars[m].c)
+! h = m;
+! else
+! l = m + 1;
+! }
+! return NULL;
+! }
+
+ /*
+! * Change shape - from Combination (2 char) to an Isolated
+ */
+ static int
+! chg_c_laa2i(int hid_c)
+ {
+! int tempc;
+!
+! switch (hid_c)
+ {
+ case a_ALEF_MADDA:
++ tempc = a_s_LAM_ALEF_MADDA_ABOVE;
++ break;
+ case a_ALEF_HAMZA_ABOVE:
+! tempc = a_s_LAM_ALEF_HAMZA_ABOVE;
+! break;
+ case a_ALEF_HAMZA_BELOW:
+! tempc = a_s_LAM_ALEF_HAMZA_BELOW;
+! break;
+ case a_ALEF:
+! tempc = a_s_LAM_ALEF;
+! break;
+! default:
+! tempc = 0;
+ }
+
+! return tempc;
+ }
+
+ /*
+! * Change shape - from Combination-Isolated to Final
+ */
+ static int
+! chg_c_laa2f(int hid_c)
+ {
+! int tempc;
+
+! switch (hid_c)
+ {
+! case a_ALEF_MADDA:
+! tempc = a_f_LAM_ALEF_MADDA_ABOVE;
+! break;
+! case a_ALEF_HAMZA_ABOVE:
+! tempc = a_f_LAM_ALEF_HAMZA_ABOVE;
+! break;
+! case a_ALEF_HAMZA_BELOW:
+! tempc = a_f_LAM_ALEF_HAMZA_BELOW;
+! break;
+! case a_ALEF:
+! tempc = a_f_LAM_ALEF;
+! break;
+! default:
+! tempc = 0;
+ }
+
+! return tempc;
+ }
+
+ /*
+! * Returns whether it is possible to join the given letters
+ */
+ static int
+! can_join(int c1, int c2)
+ {
+! struct achar *a1 = find_achar(c1);
+! struct achar *a2 = find_achar(c2);
+
+! return a1 && a2 && (a1->initial || a1->medial) && (a2->final || a2->medial);
+ }
+
+ /*
+! * Check whether we are dealing with a character that could be regarded as an
+! * Arabic combining character, need to check the character before this.
+ */
+! int
+! arabic_maycombine(int two)
+ {
+! if (p_arshape && !p_tbidi)
+! return (two == a_ALEF_MADDA
+! || two == a_ALEF_HAMZA_ABOVE
+! || two == a_ALEF_HAMZA_BELOW
+! || two == a_ALEF);
+! return FALSE;
+ }
+
+ /*
+! * Check whether we are dealing with Arabic combining characters.
+! * Note: these are NOT really composing characters!
+ */
+! int
+! arabic_combine(
+! int one, // first character
+! int two) // character just after "one"
+ {
+! if (one == a_LAM)
+! return arabic_maycombine(two);
+! return FALSE;
+ }
+
+ /*
+! * A_is_iso returns true if 'c' is an Arabic ISO-8859-6 character
+! * (alphabet/number/punctuation)
+ */
+ static int
+! A_is_iso(int c)
+ {
+! return find_achar(c) != NULL;
+ }
+
+ /*
+! * A_is_ok returns true if 'c' is an Arabic 10646 (8859-6 or Form-B)
+ */
+ static int
+! A_is_ok(int c)
+ {
+! return (A_is_iso(c) || c == a_BYTE_ORDER_MARK);
+ }
+
+ /*
+! * A_is_valid returns true if 'c' is an Arabic 10646 (8859-6 or Form-B)
+! * with some exceptions/exclusions
+ */
+ static int
+! A_is_valid(int c)
+ {
+! return (A_is_ok(c) && c != a_HAMZA);
+ }
+
+ /*
+***************
+*** 567,614 ****
+ int next_c)
+ {
+ int curr_c;
+- int shape_c;
+ int curr_laa;
+ int prev_laa;
+
+! /* Deal only with Arabic character, pass back all others */
+ if (!A_is_ok(c))
+ return c;
+
+! /* half-shape current and previous character */
+! shape_c = half_shape(prev_c);
+!
+! curr_laa = A_firstc_laa(c, *c1p);
+! prev_laa = A_firstc_laa(prev_c, prev_c1);
+
+ if (curr_laa)
+ {
+! if (A_is_valid(prev_c) && !A_is_f(shape_c)
+! && !A_is_s(shape_c) && !prev_laa)
+! curr_c = chg_c_laa2f(curr_laa);
+ else
+! curr_c = chg_c_laa2i(curr_laa);
+
+! /* Remove the composing character */
+ *c1p = 0;
+ }
+- else if (!A_is_valid(prev_c) && A_is_valid(next_c))
+- curr_c = chg_c_a2i(c);
+- else if (!shape_c || A_is_f(shape_c) || A_is_s(shape_c) || prev_laa)
+- curr_c = A_is_valid(next_c) ? chg_c_a2i(c) : chg_c_a2s(c);
+- else if (A_is_valid(next_c))
+- #if 0
+- curr_c = A_is_iso(c) ? chg_c_a2m(c) : chg_c_i2m(c);
+- #else
+- curr_c = A_is_iso(c) ? chg_c_a2m(c) : 0;
+- #endif
+- else if (A_is_valid(prev_c))
+- curr_c = chg_c_a2f(c);
+ else
+! curr_c = chg_c_a2s(c);
+
+! /* Sanity check -- curr_c should, in the future, never be 0.
+! * We should, in the future, insert a fatal error here. */
+ if (curr_c == NUL)
+ curr_c = c;
+
+--- 337,380 ----
+ int next_c)
+ {
+ int curr_c;
+ int curr_laa;
+ int prev_laa;
+
+! // Deal only with Arabic characters, pass back all others
+ if (!A_is_ok(c))
+ return c;
+
+! curr_laa = arabic_combine(c, *c1p);
+! prev_laa = arabic_combine(prev_c, prev_c1);
+
+ if (curr_laa)
+ {
+! if (A_is_valid(prev_c) && can_join(prev_c, a_LAM) && !prev_laa)
+! curr_c = chg_c_laa2f(*c1p);
+ else
+! curr_c = chg_c_laa2i(*c1p);
+
+! // Remove the composing character
+ *c1p = 0;
+ }
+ else
+! {
+! struct achar *curr_a = find_achar(c);
+! int backward_combine = !prev_laa && can_join(prev_c, c);
+! int forward_combine = can_join(c, next_c);
+!
+! if (backward_combine && forward_combine)
+! curr_c = curr_a->medial;
+! if (backward_combine && !forward_combine)
+! curr_c = curr_a->final;
+! if (!backward_combine && forward_combine)
+! curr_c = curr_a->initial;
+! if (!backward_combine && !forward_combine)
+! curr_c = curr_a->isolated;
+! }
+
+! // Sanity check -- curr_c should, in the future, never be 0.
+! // We should, in the future, insert a fatal error here.
+ if (curr_c == NUL)
+ curr_c = c;
+
+***************
+*** 616,712 ****
+ {
+ char_u buf[MB_MAXBYTES + 1];
+
+! /* Update the first byte of the character. */
+ (*mb_char2bytes)(curr_c, buf);
+ *ccp = buf[0];
+ }
+
+! /* Return the shaped character */
+ return curr_c;
+ }
+!
+!
+! /*
+! * A_firstc_laa returns first character of LAA combination if it exists
+! */
+! static int
+! A_firstc_laa(
+! int c, /* base character */
+! int c1) /* first composing character */
+! {
+! if (c1 != NUL && c == a_LAM && !A_is_harakat(c1))
+! return c1;
+! return 0;
+! }
+!
+!
+! /*
+! * A_is_harakat returns TRUE if 'c' is an Arabic Harakat character
+! * (harakat/tanween)
+! */
+! static int
+! A_is_harakat(int c)
+! {
+! return (c >= a_FATHATAN && c <= a_SUKUN);
+! }
+!
+!
+! /*
+! * A_is_iso returns TRUE if 'c' is an Arabic ISO-8859-6 character
+! * (alphabet/number/punctuation)
+! */
+! static int
+! A_is_iso(int c)
+! {
+! return ((c >= a_HAMZA && c <= a_GHAIN)
+! || (c >= a_TATWEEL && c <= a_HAMZA_BELOW)
+! || c == a_MINI_ALEF);
+! }
+!
+!
+! /*
+! * A_is_formb returns TRUE if 'c' is an Arabic 10646-1 FormB character
+! * (alphabet/number/punctuation)
+! */
+! static int
+! A_is_formb(int c)
+! {
+! return ((c >= a_s_FATHATAN && c <= a_s_DAMMATAN)
+! || c == a_s_KASRATAN
+! || (c >= a_s_FATHA && c <= a_f_LAM_ALEF)
+! || c == a_BYTE_ORDER_MARK);
+! }
+!
+!
+! /*
+! * A_is_ok returns TRUE if 'c' is an Arabic 10646 (8859-6 or Form-B)
+! */
+! static int
+! A_is_ok(int c)
+! {
+! return (A_is_iso(c) || A_is_formb(c));
+! }
+!
+!
+! /*
+! * A_is_valid returns TRUE if 'c' is an Arabic 10646 (8859-6 or Form-B)
+! * with some exceptions/exclusions
+! */
+! static int
+! A_is_valid(int c)
+! {
+! return (A_is_ok(c) && !A_is_special(c));
+! }
+!
+!
+! /*
+! * A_is_special returns TRUE if 'c' is not a special Arabic character.
+! * Specials don't adhere to most of the rules.
+! */
+! static int
+! A_is_special(int c)
+! {
+! return (c == a_HAMZA || c == a_s_HAMZA);
+! }
+!
+! #endif /* FEAT_ARABIC */
+--- 382,393 ----
+ {
+ char_u buf[MB_MAXBYTES + 1];
+
+! // Update the first byte of the character.
+ (*mb_char2bytes)(curr_c, buf);
+ *ccp = buf[0];
+ }
+
+! // Return the shaped character
+ return curr_c;
+ }
+! #endif // FEAT_ARABIC
+*** ../vim-8.1.1037/src/arabic.h 2016-08-29 22:42:20.000000000 +0200
+--- src/arabic.h 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,258 ****
+- /* 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.
+- */
+-
+- /*
+- * Arabic characters are categorized into following types:
+- *
+- * Isolated - iso-8859-6 form char denoted with a_*
+- * Initial - unicode form-B start char denoted with a_i_*
+- * Medial - unicode form-B middle char denoted with a_m_*
+- * Final - unicode form-B final char denoted with a_f_*
+- * Stand-Alone - unicode form-B isolated char denoted with a_s_* (NOT USED)
+- *
+- * --
+- *
+- * Author: Nadim Shaikli & Isam Bayazidi
+- * - (based on Unicode)
+- *
+- */
+-
+- /*
+- * Arabic ISO-10646-1 character set definition
+- */
+-
+- /*
+- * Arabic ISO-8859-6 (subset of 10646; 0600 - 06FF)
+- */
+- #define a_COMMA 0x060C
+- #define a_SEMICOLON 0x061B
+- #define a_QUESTION 0x061F
+- #define a_HAMZA 0x0621
+- #define a_ALEF_MADDA 0x0622
+- #define a_ALEF_HAMZA_ABOVE 0x0623
+- #define a_WAW_HAMZA 0x0624
+- #define a_ALEF_HAMZA_BELOW 0x0625
+- #define a_YEH_HAMZA 0x0626
+- #define a_ALEF 0x0627
+- #define a_BEH 0x0628
+- #define a_TEH_MARBUTA 0x0629
+- #define a_TEH 0x062a
+- #define a_THEH 0x062b
+- #define a_JEEM 0x062c
+- #define a_HAH 0x062d
+- #define a_KHAH 0x062e
+- #define a_DAL 0x062f
+- #define a_THAL 0x0630
+- #define a_REH 0x0631
+- #define a_ZAIN 0x0632
+- #define a_SEEN 0x0633
+- #define a_SHEEN 0x0634
+- #define a_SAD 0x0635
+- #define a_DAD 0x0636
+- #define a_TAH 0x0637
+- #define a_ZAH 0x0638
+- #define a_AIN 0x0639
+- #define a_GHAIN 0x063a
+- #define a_TATWEEL 0x0640
+- #define a_FEH 0x0641
+- #define a_QAF 0x0642
+- #define a_KAF 0x0643
+- #define a_LAM 0x0644
+- #define a_MEEM 0x0645
+- #define a_NOON 0x0646
+- #define a_HEH 0x0647
+- #define a_WAW 0x0648
+- #define a_ALEF_MAKSURA 0x0649
+- #define a_YEH 0x064a
+-
+- #define a_FATHATAN 0x064b
+- #define a_DAMMATAN 0x064c
+- #define a_KASRATAN 0x064d
+- #define a_FATHA 0x064e
+- #define a_DAMMA 0x064f
+- #define a_KASRA 0x0650
+- #define a_SHADDA 0x0651
+- #define a_SUKUN 0x0652
+-
+- #define a_MADDA_ABOVE 0x0653
+- #define a_HAMZA_ABOVE 0x0654
+- #define a_HAMZA_BELOW 0x0655
+-
+- #define a_ZERO 0x0660
+- #define a_ONE 0x0661
+- #define a_TWO 0x0662
+- #define a_THREE 0x0663
+- #define a_FOUR 0x0664
+- #define a_FIVE 0x0665
+- #define a_SIX 0x0666
+- #define a_SEVEN 0x0667
+- #define a_EIGHT 0x0668
+- #define a_NINE 0x0669
+- #define a_PERCENT 0x066a
+- #define a_DECIMAL 0x066b
+- #define a_THOUSANDS 0x066c
+- #define a_STAR 0x066d
+- #define a_MINI_ALEF 0x0670
+- /* Rest of 8859-6 does not relate to Arabic */
+-
+- /*
+- * Arabic Presentation Form-B (subset of 10646; FE70 - FEFF)
+- *
+- * s -> isolated
+- * i -> initial
+- * m -> medial
+- * f -> final
+- *
+- */
+- #define a_s_FATHATAN 0xfe70
+- #define a_m_TATWEEL_FATHATAN 0xfe71
+- #define a_s_DAMMATAN 0xfe72
+-
+- #define a_s_KASRATAN 0xfe74
+-
+- #define a_s_FATHA 0xfe76
+- #define a_m_FATHA 0xfe77
+- #define a_s_DAMMA 0xfe78
+- #define a_m_DAMMA 0xfe79
+- #define a_s_KASRA 0xfe7a
+- #define a_m_KASRA 0xfe7b
+- #define a_s_SHADDA 0xfe7c
+- #define a_m_SHADDA 0xfe7d
+- #define a_s_SUKUN 0xfe7e
+- #define a_m_SUKUN 0xfe7f
+-
+- #define a_s_HAMZA 0xfe80
+- #define a_s_ALEF_MADDA 0xfe81
+- #define a_f_ALEF_MADDA 0xfe82
+- #define a_s_ALEF_HAMZA_ABOVE 0xfe83
+- #define a_f_ALEF_HAMZA_ABOVE 0xfe84
+- #define a_s_WAW_HAMZA 0xfe85
+- #define a_f_WAW_HAMZA 0xfe86
+- #define a_s_ALEF_HAMZA_BELOW 0xfe87
+- #define a_f_ALEF_HAMZA_BELOW 0xfe88
+- #define a_s_YEH_HAMZA 0xfe89
+- #define a_f_YEH_HAMZA 0xfe8a
+- #define a_i_YEH_HAMZA 0xfe8b
+- #define a_m_YEH_HAMZA 0xfe8c
+- #define a_s_ALEF 0xfe8d
+- #define a_f_ALEF 0xfe8e
+- #define a_s_BEH 0xfe8f
+- #define a_f_BEH 0xfe90
+- #define a_i_BEH 0xfe91
+- #define a_m_BEH 0xfe92
+- #define a_s_TEH_MARBUTA 0xfe93
+- #define a_f_TEH_MARBUTA 0xfe94
+- #define a_s_TEH 0xfe95
+- #define a_f_TEH 0xfe96
+- #define a_i_TEH 0xfe97
+- #define a_m_TEH 0xfe98
+- #define a_s_THEH 0xfe99
+- #define a_f_THEH 0xfe9a
+- #define a_i_THEH 0xfe9b
+- #define a_m_THEH 0xfe9c
+- #define a_s_JEEM 0xfe9d
+- #define a_f_JEEM 0xfe9e
+- #define a_i_JEEM 0xfe9f
+- #define a_m_JEEM 0xfea0
+- #define a_s_HAH 0xfea1
+- #define a_f_HAH 0xfea2
+- #define a_i_HAH 0xfea3
+- #define a_m_HAH 0xfea4
+- #define a_s_KHAH 0xfea5
+- #define a_f_KHAH 0xfea6
+- #define a_i_KHAH 0xfea7
+- #define a_m_KHAH 0xfea8
+- #define a_s_DAL 0xfea9
+- #define a_f_DAL 0xfeaa
+- #define a_s_THAL 0xfeab
+- #define a_f_THAL 0xfeac
+- #define a_s_REH 0xfead
+- #define a_f_REH 0xfeae
+- #define a_s_ZAIN 0xfeaf
+- #define a_f_ZAIN 0xfeb0
+- #define a_s_SEEN 0xfeb1
+- #define a_f_SEEN 0xfeb2
+- #define a_i_SEEN 0xfeb3
+- #define a_m_SEEN 0xfeb4
+- #define a_s_SHEEN 0xfeb5
+- #define a_f_SHEEN 0xfeb6
+- #define a_i_SHEEN 0xfeb7
+- #define a_m_SHEEN 0xfeb8
+- #define a_s_SAD 0xfeb9
+- #define a_f_SAD 0xfeba
+- #define a_i_SAD 0xfebb
+- #define a_m_SAD 0xfebc
+- #define a_s_DAD 0xfebd
+- #define a_f_DAD 0xfebe
+- #define a_i_DAD 0xfebf
+- #define a_m_DAD 0xfec0
+- #define a_s_TAH 0xfec1
+- #define a_f_TAH 0xfec2
+- #define a_i_TAH 0xfec3
+- #define a_m_TAH 0xfec4
+- #define a_s_ZAH 0xfec5
+- #define a_f_ZAH 0xfec6
+- #define a_i_ZAH 0xfec7
+- #define a_m_ZAH 0xfec8
+- #define a_s_AIN 0xfec9
+- #define a_f_AIN 0xfeca
+- #define a_i_AIN 0xfecb
+- #define a_m_AIN 0xfecc
+- #define a_s_GHAIN 0xfecd
+- #define a_f_GHAIN 0xfece
+- #define a_i_GHAIN 0xfecf
+- #define a_m_GHAIN 0xfed0
+- #define a_s_FEH 0xfed1
+- #define a_f_FEH 0xfed2
+- #define a_i_FEH 0xfed3
+- #define a_m_FEH 0xfed4
+- #define a_s_QAF 0xfed5
+- #define a_f_QAF 0xfed6
+- #define a_i_QAF 0xfed7
+- #define a_m_QAF 0xfed8
+- #define a_s_KAF 0xfed9
+- #define a_f_KAF 0xfeda
+- #define a_i_KAF 0xfedb
+- #define a_m_KAF 0xfedc
+- #define a_s_LAM 0xfedd
+- #define a_f_LAM 0xfede
+- #define a_i_LAM 0xfedf
+- #define a_m_LAM 0xfee0
+- #define a_s_MEEM 0xfee1
+- #define a_f_MEEM 0xfee2
+- #define a_i_MEEM 0xfee3
+- #define a_m_MEEM 0xfee4
+- #define a_s_NOON 0xfee5
+- #define a_f_NOON 0xfee6
+- #define a_i_NOON 0xfee7
+- #define a_m_NOON 0xfee8
+- #define a_s_HEH 0xfee9
+- #define a_f_HEH 0xfeea
+- #define a_i_HEH 0xfeeb
+- #define a_m_HEH 0xfeec
+- #define a_s_WAW 0xfeed
+- #define a_f_WAW 0xfeee
+- #define a_s_ALEF_MAKSURA 0xfeef
+- #define a_f_ALEF_MAKSURA 0xfef0
+- #define a_s_YEH 0xfef1
+- #define a_f_YEH 0xfef2
+- #define a_i_YEH 0xfef3
+- #define a_m_YEH 0xfef4
+- #define a_s_LAM_ALEF_MADDA_ABOVE 0xfef5
+- #define a_f_LAM_ALEF_MADDA_ABOVE 0xfef6
+- #define a_s_LAM_ALEF_HAMZA_ABOVE 0xfef7
+- #define a_f_LAM_ALEF_HAMZA_ABOVE 0xfef8
+- #define a_s_LAM_ALEF_HAMZA_BELOW 0xfef9
+- #define a_f_LAM_ALEF_HAMZA_BELOW 0xfefa
+- #define a_s_LAM_ALEF 0xfefb
+- #define a_f_LAM_ALEF 0xfefc
+-
+- #define a_BYTE_ORDER_MARK 0xfeff
+-
+- /* Range of Arabic characters that might be shaped. */
+- #define ARABIC_CHAR(c) ((c) >= a_HAMZA && (c) <= a_MINI_ALEF)
+--- 0 ----
+*** ../vim-8.1.1037/src/globals.h 2019-03-02 10:13:36.792974862 +0100
+--- src/globals.h 2019-03-22 15:28:28.674998090 +0100
+***************
+*** 1652,1661 ****
+ #ifdef FEAT_TEXT_PROP
+ EXTERN int text_prop_frozen INIT(= 0);
+ #endif
+-
+- /*
+- * Optional Arabic support. Include it here, so EXTERN and INIT are defined.
+- */
+- #ifdef FEAT_ARABIC
+- # include "arabic.h"
+- #endif
+--- 1652,1654 ----
+*** ../vim-8.1.1037/src/macros.h 2019-02-17 17:44:36.211875510 +0100
+--- src/macros.h 2019-03-22 15:28:28.674998090 +0100
+***************
+*** 210,215 ****
+--- 210,216 ----
+ #define REPLACE_NORMAL(s) (((s) & REPLACE_FLAG) && !((s) & VREPLACE_FLAG))
+
+ #ifdef FEAT_ARABIC
++ # define ARABIC_CHAR(ch) (((ch) & 0xFF00) == 0x0600)
+ # define UTF_COMPOSINGLIKE(p1, p2) utf_composinglike((p1), (p2))
+ #else
+ # define UTF_COMPOSINGLIKE(p1, p2) utf_iscomposing(utf_ptr2char(p2))
+*** ../vim-8.1.1037/src/mbyte.c 2019-02-17 17:44:36.211875510 +0100
+--- src/mbyte.c 2019-03-22 15:28:28.674998090 +0100
+***************
+*** 1912,1946 ****
+
+ #if defined(FEAT_ARABIC) || defined(PROTO)
+ /*
+- * Check whether we are dealing with Arabic combining characters.
+- * Note: these are NOT really composing characters!
+- */
+- int
+- arabic_combine(
+- int one, /* first character */
+- int two) /* character just after "one" */
+- {
+- if (one == a_LAM)
+- return arabic_maycombine(two);
+- return FALSE;
+- }
+-
+- /*
+- * Check whether we are dealing with a character that could be regarded as an
+- * Arabic combining character, need to check the character before this.
+- */
+- int
+- arabic_maycombine(int two)
+- {
+- if (p_arshape && !p_tbidi)
+- return (two == a_ALEF_MADDA
+- || two == a_ALEF_HAMZA_ABOVE
+- || two == a_ALEF_HAMZA_BELOW
+- || two == a_ALEF);
+- return FALSE;
+- }
+-
+- /*
+ * Check if the character pointed to by "p2" is a composing character when it
+ * comes after "p1". For Arabic sometimes "ab" is replaced with "c", which
+ * behaves like a composing character.
+--- 1912,1917 ----
+*** ../vim-8.1.1037/src/proto/arabic.pro 2018-05-17 13:52:28.000000000 +0200
+--- src/proto/arabic.pro 2019-03-22 15:36:14.387738510 +0100
+***************
+*** 1,3 ****
+--- 1,5 ----
+ /* arabic.c */
++ int arabic_maycombine(int two);
++ int arabic_combine(int one, int two);
+ int arabic_shape(int c, int *ccp, int *c1p, int prev_c, int prev_c1, int next_c);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1037/src/proto/mbyte.pro 2019-01-13 23:38:33.407773189 +0100
+--- src/proto/mbyte.pro 2019-03-22 15:36:17.435717792 +0100
+***************
+*** 25,32 ****
+ int utf_ptr2char(char_u *p);
+ int mb_ptr2char_adv(char_u **pp);
+ int mb_cptr2char_adv(char_u **pp);
+- int arabic_combine(int one, int two);
+- int arabic_maycombine(int two);
+ int utf_composinglike(char_u *p1, char_u *p2);
+ int utfc_ptr2char(char_u *p, int *pcc);
+ int utfc_ptr2char_len(char_u *p, int *pcc, int maxlen);
+--- 25,30 ----
+*** ../vim-8.1.1037/src/Makefile 2019-02-16 15:09:21.221946179 +0100
+--- src/Makefile 2019-03-22 15:33:31.316856342 +0100
+***************
+*** 3386,3671 ****
+ 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 arabic.h
+ objects/autocmd.o: autocmd.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 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 arabic.h
+ objects/blob.o: blob.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 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 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 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 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 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 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 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 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 \
+! proto.h globals.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 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 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 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 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 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 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 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 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 arabic.h
+ objects/findfile.o: findfile.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 arabic.h libvterm/include/vterm.h \
+ libvterm/include/vterm_keycodes.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 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 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 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 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 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 arabic.h version.h
+ objects/indent.o: indent.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 arabic.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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 arabic.h
+ objects/sign.o: sign.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 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 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 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 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 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 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 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 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 \
+! proto.h globals.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 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 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 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 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 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 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 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 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 \
+ ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm ../pixmaps/tb_save.xpm \
+--- 3386,3671 ----
+ 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
+ objects/autocmd.o: autocmd.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
+ 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
+ objects/blob.o: blob.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
+ 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
+ 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 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
+ 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
+ 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
+ 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
+ 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 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 \
+! proto.h globals.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
+ 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 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 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 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 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 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
+ 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
+ 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
+ objects/findfile.o: findfile.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 libvterm/include/vterm.h \
+ libvterm/include/vterm_keycodes.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
+ 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
+ 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 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
+ 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 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 version.h
+ objects/indent.o: indent.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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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 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
+ 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
+ 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
+ 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
+ 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 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
+ 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
+ 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
+ objects/sign.o: sign.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
+ 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
+ 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
+ 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
+ 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
+ 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 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 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
+ 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
+ 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
+ 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
+ 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 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
+ 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
+ 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 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 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 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 \
+ ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm ../pixmaps/tb_save.xpm \
+***************
+*** 3686,3700 ****
+ 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 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 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 arabic.h gui_at_sb.h gui_x11_pm.h \
+ ../pixmaps/tb_new.xpm ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm \
+ ../pixmaps/tb_save.xpm ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm \
+ ../pixmaps/tb_copy.xpm ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
+--- 3686,3700 ----
+ 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
+ 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 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 gui_at_sb.h gui_x11_pm.h \
+ ../pixmaps/tb_new.xpm ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm \
+ ../pixmaps/tb_save.xpm ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm \
+ ../pixmaps/tb_copy.xpm ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
+***************
+*** 3713,3797 ****
+ 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 arabic.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 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 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 \
+--- 3713,3797 ----
+ 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 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 ../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 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 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 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 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 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 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
+ 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
+ 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 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
+ 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
+ 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 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 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
+ 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 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
+ 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 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
+ 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 \
+***************
+*** 3823,3829 ****
+ 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 \
+! 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 \
+--- 3823,3829 ----
+ 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 \
+! 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 \
+***************
+*** 3832,3838 ****
+ 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 \
+! 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 \
+--- 3832,3838 ----
+ 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 \
+! 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 \
+***************
+*** 3841,3847 ****
+ 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 \
+! 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 \
+--- 3841,3847 ----
+ 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 \
+! 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 \
+***************
+*** 3850,3856 ****
+ 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 \
+! 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 \
+--- 3850,3856 ----
+ 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 \
+! 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 \
+***************
+*** 3859,3865 ****
+ 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 \
+! 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 \
+--- 3859,3865 ----
+ 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 \
+! 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 \
+***************
+*** 3868,3872 ****
+ 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 \
+! arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+--- 3868,3872 ----
+ 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 \
+! xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+*** ../vim-8.1.1037/src/testdir/test_arabic.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_arabic.vim 2019-03-22 15:43:21.528878362 +0100
+***************
+*** 524,576 ****
+ bwipe!
+ endfunc
+
+! func Test_shape_final_to_medial()
+! new
+! set arabicshape
+!
+! " Shaping arabic {testchar} arabic Tests chg_c_f2m().
+! " This does not test much...
+! " pair[0] = testchar, pair[1] = current-result
+! for pair in [[s:a_f_YEH_HAMZA, s:a_f_BEH],
+! \[s:a_f_WAW_HAMZA, s:a_s_BEH],
+! \[s:a_f_ALEF, s:a_s_BEH],
+! \[s:a_f_TEH_MARBUTA, s:a_s_BEH],
+! \[s:a_f_DAL, s:a_s_BEH],
+! \[s:a_f_THAL, s:a_s_BEH],
+! \[s:a_f_REH, s:a_s_BEH],
+! \[s:a_f_ZAIN, s:a_s_BEH],
+! \[s:a_f_WAW, s:a_s_BEH],
+! \[s:a_f_ALEF_MAKSURA, s:a_s_BEH],
+! \[s:a_f_BEH, s:a_f_BEH],
+! \[s:a_f_TEH, s:a_f_BEH],
+! \[s:a_f_THEH, s:a_f_BEH],
+! \[s:a_f_JEEM, s:a_f_BEH],
+! \[s:a_f_HAH, s:a_f_BEH],
+! \[s:a_f_KHAH, s:a_f_BEH],
+! \[s:a_f_SEEN, s:a_f_BEH],
+! \[s:a_f_SHEEN, s:a_f_BEH],
+! \[s:a_f_SAD, s:a_f_BEH],
+! \[s:a_f_DAD, s:a_f_BEH],
+! \[s:a_f_TAH, s:a_f_BEH],
+! \[s:a_f_ZAH, s:a_f_BEH],
+! \[s:a_f_AIN, s:a_f_BEH],
+! \[s:a_f_GHAIN, s:a_f_BEH],
+! \[s:a_f_FEH, s:a_f_BEH],
+! \[s:a_f_QAF, s:a_f_BEH],
+! \[s:a_f_KAF, s:a_f_BEH],
+! \[s:a_f_LAM, s:a_f_BEH],
+! \[s:a_f_MEEM, s:a_f_BEH],
+! \[s:a_f_NOON, s:a_f_BEH],
+! \[s:a_f_HEH, s:a_f_BEH],
+! \[s:a_f_YEH, s:a_f_BEH],
+! \ ]
+! call setline(1, ' ' . s:a_BEH . pair[0])
+! call assert_equal([' ' . pair[1] . pair[0]], ScreenLines(1, 3))
+! endfor
+!
+! set arabicshape&
+! bwipe!
+! endfunc
+
+ func Test_shape_combination_final()
+ new
+--- 524,577 ----
+ bwipe!
+ endfunc
+
+! " TODO: this test now fails
+! "func Test_shape_final_to_medial()
+! " new
+! " set arabicshape
+! "
+! " " Shaping arabic {testchar} arabic Tests chg_c_f2m().
+! " " This does not test much...
+! " " pair[0] = testchar, pair[1] = current-result
+! " for pair in [[s:a_f_YEH_HAMZA, s:a_f_BEH],
+! " \[s:a_f_WAW_HAMZA, s:a_s_BEH],
+! " \[s:a_f_ALEF, s:a_s_BEH],
+! " \[s:a_f_TEH_MARBUTA, s:a_s_BEH],
+! " \[s:a_f_DAL, s:a_s_BEH],
+! " \[s:a_f_THAL, s:a_s_BEH],
+! " \[s:a_f_REH, s:a_s_BEH],
+! " \[s:a_f_ZAIN, s:a_s_BEH],
+! " \[s:a_f_WAW, s:a_s_BEH],
+! " \[s:a_f_ALEF_MAKSURA, s:a_s_BEH],
+! " \[s:a_f_BEH, s:a_f_BEH],
+! " \[s:a_f_TEH, s:a_f_BEH],
+! " \[s:a_f_THEH, s:a_f_BEH],
+! " \[s:a_f_JEEM, s:a_f_BEH],
+! " \[s:a_f_HAH, s:a_f_BEH],
+! " \[s:a_f_KHAH, s:a_f_BEH],
+! " \[s:a_f_SEEN, s:a_f_BEH],
+! " \[s:a_f_SHEEN, s:a_f_BEH],
+! " \[s:a_f_SAD, s:a_f_BEH],
+! " \[s:a_f_DAD, s:a_f_BEH],
+! " \[s:a_f_TAH, s:a_f_BEH],
+! " \[s:a_f_ZAH, s:a_f_BEH],
+! " \[s:a_f_AIN, s:a_f_BEH],
+! " \[s:a_f_GHAIN, s:a_f_BEH],
+! " \[s:a_f_FEH, s:a_f_BEH],
+! " \[s:a_f_QAF, s:a_f_BEH],
+! " \[s:a_f_KAF, s:a_f_BEH],
+! " \[s:a_f_LAM, s:a_f_BEH],
+! " \[s:a_f_MEEM, s:a_f_BEH],
+! " \[s:a_f_NOON, s:a_f_BEH],
+! " \[s:a_f_HEH, s:a_f_BEH],
+! " \[s:a_f_YEH, s:a_f_BEH],
+! " \ ]
+! " call setline(1, ' ' . s:a_BEH . pair[0])
+! " call assert_equal([' ' . pair[1] . pair[0]], ScreenLines(1, 3))
+! " endfor
+! "
+! " set arabicshape&
+! " bwipe!
+! "endfunc
+
+ func Test_shape_combination_final()
+ new
+*** ../vim-8.1.1037/src/version.c 2019-03-22 14:36:55.730563142 +0100
+--- src/version.c 2019-03-22 15:44:40.760354778 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1038,
+ /**/
+
+--
+From "know your smileys":
+ |-( Contact lenses, but has lost 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.1039 b/data/vim/patches/8.1.1039
new file mode 100644
index 000000000..7833d2c05
--- /dev/null
+++ b/data/vim/patches/8.1.1039
@@ -0,0 +1,773 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1039
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1039
+Problem: MS-Windows build fails.
+Solution: Remove dependency on arabic.h
+Files: src/Make_cyg_ming.mak, src/Make_mvc.mak, src/Make_vms.mms
+
+
+*** ../vim-8.1.1038/src/Make_cyg_ming.mak 2019-02-21 13:34:01.801327590 +0100
+--- src/Make_cyg_ming.mak 2019-03-22 16:56:09.634270303 +0100
+***************
+*** 1004,1010 ****
+ $(MAKE) -C tee clean
+
+ ###########################################################################
+! INCL = vim.h alloc.h arabic.h ascii.h ex_cmds.h feature.h globals.h \
+ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
+ spell.h structs.h term.h beval.h $(NBDEBUG_INCL)
+ GUI_INCL = gui.h
+--- 1004,1010 ----
+ $(MAKE) -C tee clean
+
+ ###########################################################################
+! INCL = vim.h alloc.h ascii.h ex_cmds.h feature.h globals.h \
+ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
+ spell.h structs.h term.h beval.h $(NBDEBUG_INCL)
+ GUI_INCL = gui.h
+*** ../vim-8.1.1038/src/Make_mvc.mak 2019-03-17 15:47:22.585492095 +0100
+--- src/Make_mvc.mak 2019-03-22 16:56:14.670238750 +0100
+***************
+*** 693,699 ****
+ !include Make_all.mak
+ !include testdir\Make_all.mak
+
+! INCL = vim.h alloc.h arabic.h ascii.h ex_cmds.h feature.h globals.h \
+ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
+ spell.h structs.h term.h beval.h $(NBDEBUG_INCL)
+
+--- 693,699 ----
+ !include Make_all.mak
+ !include testdir\Make_all.mak
+
+! INCL = vim.h alloc.h ascii.h ex_cmds.h feature.h globals.h \
+ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
+ spell.h structs.h term.h beval.h $(NBDEBUG_INCL)
+
+*** ../vim-8.1.1038/src/Make_vms.mms 2019-02-16 15:09:21.221946179 +0100
+--- src/Make_vms.mms 2019-03-22 16:56:58.201966027 +0100
+***************
+*** 2,8 ****
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 Feb 16
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+--- 2,8 ----
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 Mar 22
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+***************
+*** 514,791 ****
+ buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ crypt.obj : crypt.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h arabic.h
+ crypt_zip.obj : crypt_zip.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h arabic.h
+ dict.obj : dict.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h arabic.h
+ diff.obj : diff.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ digraph.obj : digraph.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ edit.obj : edit.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ eval.obj : eval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h version.h
+ evalfunc.obj : evalfunc.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h arabic.h version.h
+ ex_cmds.obj : ex_cmds.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ ex_cmds2.obj : ex_cmds2.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ ex_docmd.obj : ex_docmd.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ ex_eval.obj : ex_eval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ ex_getln.obj : ex_getln.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ fileio.obj : fileio.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ findfile.obj : findfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ fold.obj : fold.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ getchar.obj : getchar.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ hardcopy.obj : hardcopy.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ hashtab.obj : hashtab.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_cscope.obj : if_cscope.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h if_cscope.h
+ if_xcmdsrv.obj : if_xcmdsrv.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ if_mzsch.obj : if_mzsch.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro ex_cmds.h proto.h \
+! globals.h arabic.h if_mzsch.h
+ indent.obj : indent.c vim.h [.auto]config.h feature.h os_unix.h
+ json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h version.h
+ list.obj : list.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h arabic.h
+ main.obj : main.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h arabic.c
+ mark.obj : mark.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ memfile.obj : memfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ memline.obj : memline.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ menu.obj : menu.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ message.obj : message.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ misc1.obj : misc1.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h version.h
+ misc2.obj : misc2.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ move.obj : move.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ mbyte.obj : mbyte.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ normal.obj : normal.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ ops.obj : ops.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ option.obj : option.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ os_unix.obj : os_unix.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h os_unixx.h
+ os_vms.obj : os_vms.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h os_unixx.h
+ pathdef.obj : pathdef.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ popupmnu.obj : popupmnu.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ quickfix.obj : quickfix.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ regexp.obj : regexp.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ screen.obj : screen.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ search.obj : search.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ sha256.obj : sha256.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h arabic.h
+ sign.obj : sign.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h arabic.h
+ spell.obj : spell.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ spellfile.obj : spellfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h arabic.h
+ syntax.obj : syntax.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ tag.obj : tag.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ term.obj : term.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ termlib.obj : termlib.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ textprop.obj : textprop.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ ui.obj : ui.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ undo.obj : undo.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ userfunc.obj : userfunc.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h arabic.h
+ version.obj : version.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ window.obj : window.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ gui.obj : gui.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ gui_gtk.obj : gui_gtk.c gui_gtk_f.h vim.h [.auto]config.h feature.h \
+ os_unix.h ascii.h keymap.h term.h macros.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h \
+! proto.h globals.h arabic.h [-.pixmaps]stock_icons.h
+ gui_gtk_f.obj : gui_gtk_f.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h gui_gtk_f.h
+ gui_motif.obj : gui_motif.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h [-.pixmaps]alert.xpm [-.pixmaps]error.xpm \
+ [-.pixmaps]generic.xpm [-.pixmaps]info.xpm [-.pixmaps]quest.xpm
+ gui_athena.obj : gui_athena.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h gui_at_sb.h
+ gui_gtk_x11.obj : gui_gtk_x11.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h gui_gtk_f.h [-.runtime]vim32x32.xpm \
+ [-.runtime]vim16x16.xpm [-.runtime]vim48x48.xpm
+ gui_x11.obj : gui_x11.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h [-.runtime]vim32x32.xpm \
+ [-.runtime]vim16x16.xpm [-.runtime]vim48x48.xpm [-.pixmaps]tb_new.xpm \
+ [-.pixmaps]tb_open.xpm [-.pixmaps]tb_close.xpm [-.pixmaps]tb_save.xpm \
+ [-.pixmaps]tb_print.xpm [-.pixmaps]tb_cut.xpm [-.pixmaps]tb_copy.xpm \
+--- 514,791 ----
+ buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h version.h
+ charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ crypt.obj : crypt.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h
+ crypt_zip.obj : crypt_zip.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h
+ dict.obj : dict.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h
+ diff.obj : diff.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ digraph.obj : digraph.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ edit.obj : edit.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ eval.obj : eval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! version.h
+ evalfunc.obj : evalfunc.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h version.h
+ ex_cmds.obj : ex_cmds.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h version.h
+ ex_cmds2.obj : ex_cmds2.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h version.h
+ ex_docmd.obj : ex_docmd.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ ex_eval.obj : ex_eval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ ex_getln.obj : ex_getln.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ fileio.obj : fileio.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ findfile.obj : findfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ fold.obj : fold.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ getchar.obj : getchar.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ hardcopy.obj : hardcopy.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ hashtab.obj : hashtab.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ if_cscope.obj : if_cscope.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h if_cscope.h
+ if_xcmdsrv.obj : if_xcmdsrv.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h version.h
+ if_mzsch.obj : if_mzsch.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro ex_cmds.h proto.h \
+! globals.h if_mzsch.h
+ indent.obj : indent.c vim.h [.auto]config.h feature.h os_unix.h
+ json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! version.h
+ list.obj : list.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h
+ main.obj : main.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.c
+ mark.obj : mark.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ memfile.obj : memfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ memline.obj : memline.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ menu.obj : menu.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ message.obj : message.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ misc1.obj : misc1.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! version.h
+ misc2.obj : misc2.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ move.obj : move.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ mbyte.obj : mbyte.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ normal.obj : normal.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ ops.obj : ops.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ option.obj : option.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ os_unix.obj : os_unix.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h os_unixx.h
+ os_vms.obj : os_vms.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h os_unixx.h
+ pathdef.obj : pathdef.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ popupmnu.obj : popupmnu.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ quickfix.obj : quickfix.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ regexp.obj : regexp.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ screen.obj : screen.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ search.obj : search.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ sha256.obj : sha256.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h
+ sign.obj : sign.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+! globals.h
+ spell.obj : spell.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ spellfile.obj : spellfile.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h
+ syntax.obj : syntax.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ tag.obj : tag.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ term.obj : term.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ termlib.obj : termlib.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ textprop.obj : textprop.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ ui.obj : ui.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ undo.obj : undo.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ userfunc.obj : userfunc.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+! proto.h globals.h
+ version.obj : version.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h version.h
+ window.obj : window.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ gui.obj : gui.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ gui_gtk.obj : gui_gtk.c gui_gtk_f.h vim.h [.auto]config.h feature.h \
+ os_unix.h ascii.h keymap.h term.h macros.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h \
+! proto.h globals.h [-.pixmaps]stock_icons.h
+ gui_gtk_f.obj : gui_gtk_f.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h gui_gtk_f.h
+ gui_motif.obj : gui_motif.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h [-.pixmaps]alert.xpm [-.pixmaps]error.xpm \
+ [-.pixmaps]generic.xpm [-.pixmaps]info.xpm [-.pixmaps]quest.xpm
+ gui_athena.obj : gui_athena.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h gui_at_sb.h
+ gui_gtk_x11.obj : gui_gtk_x11.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h gui_gtk_f.h [-.runtime]vim32x32.xpm \
+ [-.runtime]vim16x16.xpm [-.runtime]vim48x48.xpm
+ gui_x11.obj : gui_x11.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h [-.runtime]vim32x32.xpm \
+ [-.runtime]vim16x16.xpm [-.runtime]vim48x48.xpm [-.pixmaps]tb_new.xpm \
+ [-.pixmaps]tb_open.xpm [-.pixmaps]tb_close.xpm [-.pixmaps]tb_save.xpm \
+ [-.pixmaps]tb_print.xpm [-.pixmaps]tb_cut.xpm [-.pixmaps]tb_copy.xpm \
+***************
+*** 805,864 ****
+ gui_at_sb.obj : gui_at_sb.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h gui_at_sb.h
+ gui_at_fs.obj : gui_at_fs.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h gui_at_sb.h
+ pty.obj : pty.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+! arabic.h
+ hangulin.obj : hangulin.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_perl.obj : [.auto]if_perl.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_perlsfio.obj : if_perlsfio.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_python.obj : if_python.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_tcl.obj : if_tcl.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ if_ruby.obj : if_ruby.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ beval.obj : beval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ gui_beval.obj : gui_beval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h
+ workshop.obj : workshop.c [.auto]config.h integration.h vim.h feature.h \
+ os_unix.h ascii.h keymap.h term.h macros.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h \
+! proto.h globals.h arabic.h version.h workshop.h
+ wsdebug.obj : wsdebug.c
+ integration.obj : integration.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h integration.h
+ netbeans.obj : netbeans.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h arabic.h version.h
+ gui_xmdlg.obj : gui_xmdlg.c [.auto]config.h vim.h feature.h os_unix.h
+ gui_xmebw.obj : gui_xmebw.c [.auto]config.h vim.h feature.h os_unix.h
+ xdiffi.obj : [.xdiff]xdiffi.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
+--- 805,864 ----
+ gui_at_sb.obj : gui_at_sb.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h gui_at_sb.h
+ gui_at_fs.obj : gui_at_fs.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h gui_at_sb.h
+ pty.obj : pty.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+!
+ hangulin.obj : hangulin.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ if_perl.obj : [.auto]if_perl.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ if_perlsfio.obj : if_perlsfio.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ if_python.obj : if_python.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ if_tcl.obj : if_tcl.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ if_ruby.obj : if_ruby.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h version.h
+ beval.obj : beval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h option.h ex_cmds.h proto.h \
+! globals.h
+ gui_beval.obj : gui_beval.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h
+ workshop.obj : workshop.c [.auto]config.h integration.h vim.h feature.h \
+ os_unix.h ascii.h keymap.h term.h macros.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h \
+! proto.h globals.h version.h workshop.h
+ wsdebug.obj : wsdebug.c
+ integration.obj : integration.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h integration.h
+ netbeans.obj : netbeans.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+! globals.h version.h
+ gui_xmdlg.obj : gui_xmdlg.c [.auto]config.h vim.h feature.h os_unix.h
+ gui_xmebw.obj : gui_xmebw.c [.auto]config.h vim.h feature.h os_unix.h
+ xdiffi.obj : [.xdiff]xdiffi.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
+*** ../vim-8.1.1038/src/version.c 2019-03-22 16:33:03.487016094 +0100
+--- src/version.c 2019-03-22 16:55:22.818563647 +0100
+***************
+*** 781,782 ****
+--- 781,784 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1039,
+ /**/
+
+--
+# echo reboot >universe
+# chmod +x universe
+# ./universe
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1040 b/data/vim/patches/8.1.1040
new file mode 100644
index 000000000..169941405
--- /dev/null
+++ b/data/vim/patches/8.1.1040
@@ -0,0 +1,240 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1040
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1040
+Problem: FEAT_TAG_ANYWHITE is not enabled in any build.
+Solution: Remove the feature.
+Files: src/feature.h, src/tag.c, src/evalfunc.c, src/version.c,
+ src/Make_vms.mms
+
+
+*** ../vim-8.1.1039/src/feature.h 2019-03-22 12:03:26.587533860 +0100
+--- src/feature.h 2019-03-22 16:38:39.508875325 +0100
+***************
+*** 313,324 ****
+ #endif
+
+ /*
+- * +tag_any_white Allow any white space to separate the fields in a tags
+- * file. When not defined, only a TAB is allowed.
+- */
+- /* #define FEAT_TAG_ANYWHITE */
+-
+- /*
+ * +cscope Unix only: Cscope support.
+ */
+ #if defined(UNIX) && defined(FEAT_BIG) && !defined(FEAT_CSCOPE) && !defined(MACOS_X)
+--- 313,318 ----
+*** ../vim-8.1.1039/src/tag.c 2019-02-15 21:06:05.342289715 +0100
+--- src/tag.c 2019-03-22 16:41:08.227934510 +0100
+***************
+*** 1931,1943 ****
+ {
+ vim_memset(&tagp, 0, sizeof(tagp));
+ tagp.tagname = lbuf;
+- #ifdef FEAT_TAG_ANYWHITE
+- tagp.tagname_end = skiptowhite(lbuf);
+- if (*tagp.tagname_end == NUL)
+- #else
+ tagp.tagname_end = vim_strchr(lbuf, TAB);
+ if (tagp.tagname_end == NULL)
+- #endif
+ {
+ if (vim_strchr(lbuf, NL) == NULL)
+ {
+--- 1931,1938 ----
+***************
+*** 1976,1995 ****
+ if (*p == ':')
+ {
+ if (tagp.fname == NULL)
+- # ifdef FEAT_TAG_ANYWHITE
+- tagp.fname = skipwhite(tagp.tagname_end);
+- # else
+ tagp.fname = tagp.tagname_end + 1;
+! # endif
+! if ( fnamencmp(lbuf, tagp.fname, p - lbuf) == 0
+! # ifdef FEAT_TAG_ANYWHITE
+! && VIM_ISWHITE(tagp.fname[p - lbuf])
+! # else
+! && tagp.fname[p - lbuf] == TAB
+! # endif
+! )
+ {
+! /* found one */
+ tagp.tagname = p + 1;
+ break;
+ }
+--- 1971,1981 ----
+ if (*p == ':')
+ {
+ if (tagp.fname == NULL)
+ tagp.fname = tagp.tagname_end + 1;
+! if (fnamencmp(lbuf, tagp.fname, p - lbuf) == 0
+! && tagp.fname[p - lbuf] == TAB)
+ {
+! // found one
+ tagp.tagname = p + 1;
+ break;
+ }
+***************
+*** 2112,2131 ****
+ #ifdef FEAT_TAG_OLDSTATIC
+ if (tagp.fname == NULL)
+ #endif
+- #ifdef FEAT_TAG_ANYWHITE
+- tagp.fname = skipwhite(tagp.tagname_end);
+- #else
+ tagp.fname = tagp.tagname_end + 1;
+- #endif
+- #ifdef FEAT_TAG_ANYWHITE
+- tagp.fname_end = skiptowhite(tagp.fname);
+- tagp.command = skipwhite(tagp.fname_end);
+- if (*tagp.command == NUL)
+- #else
+ tagp.fname_end = vim_strchr(tagp.fname, TAB);
+ tagp.command = tagp.fname_end + 1;
+ if (tagp.fname_end == NULL)
+- #endif
+ i = FAIL;
+ else
+ i = OK;
+--- 2098,2107 ----
+***************
+*** 2843,2883 ****
+ else /* not an Emacs tag */
+ {
+ #endif
+! /* Isolate the tagname, from lbuf up to the first white */
+ tagp->tagname = lbuf;
+- #ifdef FEAT_TAG_ANYWHITE
+- p = skiptowhite(lbuf);
+- #else
+ p = vim_strchr(lbuf, TAB);
+ if (p == NULL)
+ return FAIL;
+- #endif
+ tagp->tagname_end = p;
+
+! /* Isolate file name, from first to second white space */
+! #ifdef FEAT_TAG_ANYWHITE
+! p = skipwhite(p);
+! #else
+ if (*p != NUL)
+ ++p;
+- #endif
+ tagp->fname = p;
+- #ifdef FEAT_TAG_ANYWHITE
+- p = skiptowhite(p);
+- #else
+ p = vim_strchr(p, TAB);
+ if (p == NULL)
+ return FAIL;
+- #endif
+ tagp->fname_end = p;
+
+! /* find start of search command, after second white space */
+! #ifdef FEAT_TAG_ANYWHITE
+! p = skipwhite(p);
+! #else
+ if (*p != NUL)
+ ++p;
+- #endif
+ if (*p == NUL)
+ return FAIL;
+ tagp->command = p;
+--- 2819,2843 ----
+ else /* not an Emacs tag */
+ {
+ #endif
+! // Isolate the tagname, from lbuf up to the first white
+ tagp->tagname = lbuf;
+ p = vim_strchr(lbuf, TAB);
+ if (p == NULL)
+ return FAIL;
+ tagp->tagname_end = p;
+
+! // Isolate file name, from first to second white space
+ if (*p != NUL)
+ ++p;
+ tagp->fname = p;
+ p = vim_strchr(p, TAB);
+ if (p == NULL)
+ return FAIL;
+ tagp->fname_end = p;
+
+! // find start of search command, after second white space
+ if (*p != NUL)
+ ++p;
+ if (*p == NUL)
+ return FAIL;
+ tagp->command = p;
+*** ../vim-8.1.1039/src/evalfunc.c 2019-03-22 13:20:40.091897268 +0100
+--- src/evalfunc.c 2019-03-22 16:59:04.297176245 +0100
+***************
+*** 6533,6541 ****
+ #ifdef FEAT_TAG_OLDSTATIC
+ "tag_old_static",
+ #endif
+- #ifdef FEAT_TAG_ANYWHITE
+- "tag_any_white",
+- #endif
+ #ifdef FEAT_TCL
+ # ifndef DYNAMIC_TCL
+ "tcl",
+--- 6533,6538 ----
+*** ../vim-8.1.1039/src/version.c 2019-03-22 16:57:42.061691287 +0100
+--- src/version.c 2019-03-22 17:01:04.704422303 +0100
+***************
+*** 610,620 ****
+ #else
+ "-tag_old_static",
+ #endif
+- #ifdef FEAT_TAG_ANYWHITE
+- "+tag_any_white",
+- #else
+ "-tag_any_white",
+- #endif
+ #ifdef FEAT_TCL
+ # ifdef DYNAMIC_TCL
+ "+tcl/dyn",
+--- 610,616 ----
+*** ../vim-8.1.1039/src/Make_vms.mms 2019-03-22 16:57:42.061691287 +0100
+--- src/Make_vms.mms 2019-03-22 16:59:53.828866076 +0100
+***************
+*** 256,266 ****
+ .ENDIF
+ .ENDIF
+
+- .IFDEF VIM_TAG_ANYWHITE
+- # TAG_ANYWHITE related setup.
+- TAG_DEF = ,"FEAT_TAG_ANYWHITE"
+- .ENDIF
+-
+ .IFDEF VIM_MZSCHEME
+ # MZSCHEME related setup
+ MZSCH_DEF = ,"FEAT_MZSCHEME"
+--- 256,261 ----
+*** ../vim-8.1.1039/src/version.c 2019-03-22 16:57:42.061691287 +0100
+--- src/version.c 2019-03-22 17:01:04.704422303 +0100
+***************
+*** 781,782 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1040,
+ /**/
+
+--
+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.1041 b/data/vim/patches/8.1.1041
new file mode 100644
index 000000000..43d36a612
--- /dev/null
+++ b/data/vim/patches/8.1.1041
@@ -0,0 +1,94 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1041
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1041
+Problem: Test for Arabic no longer needed.
+Solution: Remove the test for something that was intentionally left out.
+Files: src/testdir/test_arabic.vim
+
+
+*** ../vim-8.1.1040/src/testdir/test_arabic.vim 2019-03-22 16:33:03.487016094 +0100
+--- src/testdir/test_arabic.vim 2019-03-23 12:58:34.467041758 +0100
+***************
+*** 524,578 ****
+ bwipe!
+ endfunc
+
+- " TODO: this test now fails
+- "func Test_shape_final_to_medial()
+- " new
+- " set arabicshape
+- "
+- " " Shaping arabic {testchar} arabic Tests chg_c_f2m().
+- " " This does not test much...
+- " " pair[0] = testchar, pair[1] = current-result
+- " for pair in [[s:a_f_YEH_HAMZA, s:a_f_BEH],
+- " \[s:a_f_WAW_HAMZA, s:a_s_BEH],
+- " \[s:a_f_ALEF, s:a_s_BEH],
+- " \[s:a_f_TEH_MARBUTA, s:a_s_BEH],
+- " \[s:a_f_DAL, s:a_s_BEH],
+- " \[s:a_f_THAL, s:a_s_BEH],
+- " \[s:a_f_REH, s:a_s_BEH],
+- " \[s:a_f_ZAIN, s:a_s_BEH],
+- " \[s:a_f_WAW, s:a_s_BEH],
+- " \[s:a_f_ALEF_MAKSURA, s:a_s_BEH],
+- " \[s:a_f_BEH, s:a_f_BEH],
+- " \[s:a_f_TEH, s:a_f_BEH],
+- " \[s:a_f_THEH, s:a_f_BEH],
+- " \[s:a_f_JEEM, s:a_f_BEH],
+- " \[s:a_f_HAH, s:a_f_BEH],
+- " \[s:a_f_KHAH, s:a_f_BEH],
+- " \[s:a_f_SEEN, s:a_f_BEH],
+- " \[s:a_f_SHEEN, s:a_f_BEH],
+- " \[s:a_f_SAD, s:a_f_BEH],
+- " \[s:a_f_DAD, s:a_f_BEH],
+- " \[s:a_f_TAH, s:a_f_BEH],
+- " \[s:a_f_ZAH, s:a_f_BEH],
+- " \[s:a_f_AIN, s:a_f_BEH],
+- " \[s:a_f_GHAIN, s:a_f_BEH],
+- " \[s:a_f_FEH, s:a_f_BEH],
+- " \[s:a_f_QAF, s:a_f_BEH],
+- " \[s:a_f_KAF, s:a_f_BEH],
+- " \[s:a_f_LAM, s:a_f_BEH],
+- " \[s:a_f_MEEM, s:a_f_BEH],
+- " \[s:a_f_NOON, s:a_f_BEH],
+- " \[s:a_f_HEH, s:a_f_BEH],
+- " \[s:a_f_YEH, s:a_f_BEH],
+- " \ ]
+- " call setline(1, ' ' . s:a_BEH . pair[0])
+- " call assert_equal([' ' . pair[1] . pair[0]], ScreenLines(1, 3))
+- " endfor
+- "
+- " set arabicshape&
+- " bwipe!
+- "endfunc
+-
+ func Test_shape_combination_final()
+ new
+ set arabicshape
+--- 524,529 ----
+*** ../vim-8.1.1040/src/version.c 2019-03-22 17:03:01.783689365 +0100
+--- src/version.c 2019-03-23 12:58:19.611133095 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1041,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+97. Your mother tells you to remember something, and you look for
+ a File/Save command.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1042 b/data/vim/patches/8.1.1042
new file mode 100644
index 000000000..6191b7a40
--- /dev/null
+++ b/data/vim/patches/8.1.1042
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1042
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1042
+Problem: The paste test doesn't work properly in the Windows console.
+Solution: Disable the test.
+Files: src/testdir/test_paste.vim
+
+
+*** ../vim-8.1.1041/src/testdir/test_paste.vim 2018-03-13 15:39:16.000000000 +0100
+--- src/testdir/test_paste.vim 2019-03-23 13:25:04.277287476 +0100
+***************
+*** 1,7 ****
+ " Tests for bracketed paste and other forms of pasting.
+
+! " Bracketed paste only works with "xterm". Not in GUI.
+! if has('gui_running')
+ finish
+ endif
+ set term=xterm
+--- 1,7 ----
+ " Tests for bracketed paste and other forms of pasting.
+
+! " Bracketed paste only works with "xterm". Not in GUI or Windows console.
+! if has('gui_running') || has('win32')
+ finish
+ endif
+ set term=xterm
+*** ../vim-8.1.1041/src/version.c 2019-03-23 12:59:36.262661906 +0100
+--- src/version.c 2019-03-23 13:26:06.392906662 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1042,
+ /**/
+
+--
+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.1043 b/data/vim/patches/8.1.1043
new file mode 100644
index 000000000..f57e0bde1
--- /dev/null
+++ b/data/vim/patches/8.1.1043
@@ -0,0 +1,680 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1043
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1043
+Problem: Lua interface does not support Blob.
+Solution: Add support to Blob. (Ozaki Kiichi, closes #4151)
+Files: runtime/doc/if_lua.txt, src/if_lua.c, src/testdir/test_lua.vim
+
+
+
+*** ../vim-8.1.1042/runtime/doc/if_lua.txt 2018-07-01 19:49:23.605793273 +0200
+--- runtime/doc/if_lua.txt 2019-03-23 13:53:32.131159759 +0100
+***************
+*** 10,20 ****
+ 2. The vim module |lua-vim|
+ 3. List userdata |lua-list|
+ 4. Dict userdata |lua-dict|
+! 5. Funcref userdata |lua-funcref|
+! 6. Buffer userdata |lua-buffer|
+! 7. Window userdata |lua-window|
+! 8. The luaeval function |lua-luaeval|
+! 9. Dynamic loading |lua-dynamic|
+
+ {Vi does not have any of these commands}
+
+--- 10,21 ----
+ 2. The vim module |lua-vim|
+ 3. List userdata |lua-list|
+ 4. Dict userdata |lua-dict|
+! 5. Blob userdata |lua-blob|
+! 6. Funcref userdata |lua-funcref|
+! 7. Buffer userdata |lua-buffer|
+! 8. Window userdata |lua-window|
+! 9. luaeval() Vim function |lua-luaeval|
+! 10. Dynamic loading |lua-dynamic|
+
+ {Vi does not have any of these commands}
+
+***************
+*** 125,133 ****
+ Non-numeric keys are not used to initialize
+ the list. See also |lua-eval| for conversion
+ rules. Example: >
+! :lua t = {math.pi, false, say = 'hi'}
+! :echo luaeval('vim.list(t)')
+! :" [3.141593, v:false], 'say' is ignored
+ <
+ vim.dict([arg]) Returns an empty dictionary or, if "arg" is a
+ Lua table, returns a dict d such that d[k] =
+--- 126,134 ----
+ Non-numeric keys are not used to initialize
+ the list. See also |lua-eval| for conversion
+ rules. Example: >
+! :lua t = {math.pi, false, say = 'hi'}
+! :echo luaeval('vim.list(t)')
+! :" [3.141593, v:false], 'say' is ignored
+ <
+ vim.dict([arg]) Returns an empty dictionary or, if "arg" is a
+ Lua table, returns a dict d such that d[k] =
+***************
+*** 136,147 ****
+ strings. Keys that are not strings are not
+ used to initialize the dictionary. See also
+ |lua-eval| for conversion rules. Example: >
+! :lua t = {math.pi, false, say = 'hi'}
+! :echo luaeval('vim.dict(t)')
+! :" {'say': 'hi'}, numeric keys ignored
+ <
+ vim.funcref({name}) Returns a Funcref to function {name} (see
+! |Funcref|). It is equivalent to Vim's function().
+
+ vim.buffer([arg]) If "arg" is a number, returns buffer with
+ number "arg" in the buffer list or, if "arg"
+--- 137,158 ----
+ strings. Keys that are not strings are not
+ used to initialize the dictionary. See also
+ |lua-eval| for conversion rules. Example: >
+! :lua t = {math.pi, false, say = 'hi'}
+! :echo luaeval('vim.dict(t)')
+! :" {'1': 3.141593, '2': v:false,
+! :" 'say': 'hi'}
+! <
+! vim.blob([arg]) Returns an empty blob or, if "arg" is a Lua
+! string, returns a blob b such that b is
+! equivalent to "arg" as a byte string.
+! Examples: >
+! :lua s = "12ab\x00\x80\xfe\xff"
+! :echo luaeval('vim.blob(s)')
+! :" 0z31326162.0080FEFF
+ <
+ vim.funcref({name}) Returns a Funcref to function {name} (see
+! |Funcref|). It is equivalent to Vim's
+! function().
+
+ vim.buffer([arg]) If "arg" is a number, returns buffer with
+ number "arg" in the buffer list or, if "arg"
+***************
+*** 258,264 ****
+ <
+
+ ==============================================================================
+! 5. Funcref userdata *lua-funcref*
+
+ Funcref userdata represent funcref variables in Vim. Funcrefs that were
+ defined with a "dict" attribute need to be obtained as a dictionary key
+--- 269,302 ----
+ <
+
+ ==============================================================================
+! 5. Blob userdata *lua-blob*
+!
+! Blob userdata represent vim blobs. A blob "b" has the following properties:
+!
+! Properties
+! ----------
+! o "#b" is the length of blob "b", equivalent to "len(b)" in Vim.
+! o "b[k]" returns the k-th item in "b"; "b" is zero-indexed, as in Vim.
+! To modify the k-th item, simply do "b[k] = number"; in particular,
+! "b[#b] = number" can append a byte to tail.
+!
+! Methods
+! -------
+! o "b:add(bytes)" appends "bytes" to the end of "b".
+!
+! Examples:
+! >
+! :let b = 0z001122
+! :lua b = vim.eval('b') -- same 'b'
+! :lua print(b, b[0], #b)
+! :lua b[1] = 32
+! :lua b[#b] = 0x33 -- append a byte to tail
+! :lua b:add("\x80\x81\xfe\xff")
+! :echo b
+! <
+!
+! ==============================================================================
+! 6. Funcref userdata *lua-funcref*
+
+ Funcref userdata represent funcref variables in Vim. Funcrefs that were
+ defined with a "dict" attribute need to be obtained as a dictionary key
+***************
+*** 291,297 ****
+ <
+
+ ==============================================================================
+! 6. Buffer userdata *lua-buffer*
+
+ Buffer userdata represent vim buffers. A buffer userdata "b" has the following
+ properties and methods:
+--- 329,335 ----
+ <
+
+ ==============================================================================
+! 7. Buffer userdata *lua-buffer*
+
+ Buffer userdata represent vim buffers. A buffer userdata "b" has the following
+ properties and methods:
+***************
+*** 343,349 ****
+ <
+
+ ==============================================================================
+! 7. Window userdata *lua-window*
+
+ Window objects represent vim windows. A window userdata "w" has the following
+ properties and methods:
+--- 381,387 ----
+ <
+
+ ==============================================================================
+! 8. Window userdata *lua-window*
+
+ Window objects represent vim windows. A window userdata "w" has the following
+ properties and methods:
+***************
+*** 375,381 ****
+ <
+
+ ==============================================================================
+! 8. The luaeval function *lua-luaeval* *lua-eval*
+
+ The (dual) equivalent of "vim.eval" for passing Lua values to Vim is
+ "luaeval". "luaeval" takes an expression string and an optional argument and
+--- 413,419 ----
+ <
+
+ ==============================================================================
+! 9. luaeval() Vim function *lua-luaeval* *lua-eval*
+
+ The (dual) equivalent of "vim.eval" for passing Lua values to Vim is
+ "luaeval". "luaeval" takes an expression string and an optional argument and
+***************
+*** 388,397 ****
+ end
+ <
+ Note that "_A" receives the argument to "luaeval". Lua numbers, strings, and
+! list, dict, and funcref userdata are converted to their Vim respective types,
+! while Lua booleans are converted to numbers. An error is thrown if conversion
+! of any of the remaining Lua types, including userdata other than lists, dicts,
+! and funcrefs, is attempted.
+
+ Examples: >
+
+--- 426,435 ----
+ end
+ <
+ Note that "_A" receives the argument to "luaeval". Lua numbers, strings, and
+! list, dict, blob, and funcref userdata are converted to their Vim respective
+! types, while Lua booleans are converted to numbers. An error is thrown if
+! conversion of any of the remaining Lua types, including userdata other than
+! lists, dicts, blobs, and funcrefs, is attempted.
+
+ Examples: >
+
+***************
+*** 406,412 ****
+
+
+ ==============================================================================
+! 9. Dynamic loading *lua-dynamic*
+
+ On MS-Windows and Unix the Lua library can be loaded dynamically. The
+ |:version| output then includes |+lua/dyn|.
+--- 444,450 ----
+
+
+ ==============================================================================
+! 10. Dynamic loading *lua-dynamic*
+
+ On MS-Windows and Unix the Lua library can be loaded dynamically. The
+ |:version| output then includes |+lua/dyn|.
+*** ../vim-8.1.1042/src/if_lua.c 2019-03-19 21:59:16.268914799 +0100
+--- src/if_lua.c 2019-03-23 13:53:32.131159759 +0100
+***************
+*** 28,33 ****
+--- 28,34 ----
+ typedef win_T *luaV_Window;
+ typedef dict_T *luaV_Dict;
+ typedef list_T *luaV_List;
++ typedef blob_T *luaV_Blob;
+ typedef struct {
+ char_u *name; // funcref
+ dict_T *self; // selfdict
+***************
+*** 36,41 ****
+--- 37,43 ----
+
+ static const char LUAVIM_DICT[] = "dict";
+ static const char LUAVIM_LIST[] = "list";
++ static const char LUAVIM_BLOB[] = "blob";
+ static const char LUAVIM_FUNCREF[] = "funcref";
+ static const char LUAVIM_BUFFER[] = "buffer";
+ static const char LUAVIM_WINDOW[] = "window";
+***************
+*** 68,73 ****
+--- 70,76 ----
+
+ static luaV_List *luaV_pushlist(lua_State *L, list_T *lis);
+ static luaV_Dict *luaV_pushdict(lua_State *L, dict_T *dic);
++ static luaV_Blob *luaV_pushblob(lua_State *L, blob_T *blo);
+ static luaV_Funcref *luaV_pushfuncref(lua_State *L, char_u *name);
+
+ #if LUA_VERSION_NUM <= 501
+***************
+*** 541,546 ****
+--- 544,552 ----
+ case VAR_FUNC:
+ luaV_pushfuncref(L, tv->vval.v_string);
+ break;
++ case VAR_BLOB:
++ luaV_pushblob(L, tv->vval.v_blob);
++ break;
+ default:
+ lua_pushnil(L);
+ }
+***************
+*** 582,624 ****
+ {
+ void *p = lua_touserdata(L, pos);
+
+! if (lua_getmetatable(L, pos)) /* has metatable? */
+ {
+! /* check list */
+ luaV_getfield(L, LUAVIM_LIST);
+ if (lua_rawequal(L, -1, -2))
+ {
+ tv->v_type = VAR_LIST;
+ tv->vval.v_list = *((luaV_List *) p);
+ ++tv->vval.v_list->lv_refcount;
+! lua_pop(L, 2); /* MTs */
+ break;
+ }
+! /* check dict */
+ luaV_getfield(L, LUAVIM_DICT);
+ if (lua_rawequal(L, -1, -3))
+ {
+ tv->v_type = VAR_DICT;
+ tv->vval.v_dict = *((luaV_Dict *) p);
+ ++tv->vval.v_dict->dv_refcount;
+! lua_pop(L, 3); /* MTs */
+ break;
+ }
+! /* check funcref */
+! luaV_getfield(L, LUAVIM_FUNCREF);
+ if (lua_rawequal(L, -1, -4))
+ {
+ luaV_Funcref *f = (luaV_Funcref *) p;
+ func_ref(f->name);
+ tv->v_type = VAR_FUNC;
+ tv->vval.v_string = vim_strsave(f->name);
+! lua_pop(L, 4); /* MTs */
+ break;
+ }
+! lua_pop(L, 4); /* MTs */
+ }
+ }
+! /* FALLTHROUGH */
+ default:
+ tv->v_type = VAR_NUMBER;
+ tv->vval.v_number = 0;
+--- 588,640 ----
+ {
+ void *p = lua_touserdata(L, pos);
+
+! if (lua_getmetatable(L, pos)) // has metatable?
+ {
+! // check list
+ luaV_getfield(L, LUAVIM_LIST);
+ if (lua_rawequal(L, -1, -2))
+ {
+ tv->v_type = VAR_LIST;
+ tv->vval.v_list = *((luaV_List *) p);
+ ++tv->vval.v_list->lv_refcount;
+! lua_pop(L, 2); // MTs
+ break;
+ }
+! // check dict
+ luaV_getfield(L, LUAVIM_DICT);
+ if (lua_rawequal(L, -1, -3))
+ {
+ tv->v_type = VAR_DICT;
+ tv->vval.v_dict = *((luaV_Dict *) p);
+ ++tv->vval.v_dict->dv_refcount;
+! lua_pop(L, 3); // MTs
+ break;
+ }
+! // check blob
+! luaV_getfield(L, LUAVIM_BLOB);
+ if (lua_rawequal(L, -1, -4))
+ {
++ tv->v_type = VAR_BLOB;
++ tv->vval.v_blob = *((luaV_Blob *) p);
++ ++tv->vval.v_blob->bv_refcount;
++ lua_pop(L, 4); // MTs
++ break;
++ }
++ // check funcref
++ luaV_getfield(L, LUAVIM_FUNCREF);
++ if (lua_rawequal(L, -1, -5))
++ {
+ luaV_Funcref *f = (luaV_Funcref *) p;
+ func_ref(f->name);
+ tv->v_type = VAR_FUNC;
+ tv->vval.v_string = vim_strsave(f->name);
+! lua_pop(L, 5); // MTs
+ break;
+ }
+! lua_pop(L, 4); // MTs
+ }
+ }
+! // FALLTHROUGH
+ default:
+ tv->v_type = VAR_NUMBER;
+ tv->vval.v_number = 0;
+***************
+*** 753,759 ****
+ luaV_list_len(lua_State *L)
+ {
+ list_T *l = luaV_unbox(L, luaV_List, 1);
+! lua_pushinteger(L, (l == NULL) ? 0 : (int) l->lv_len);
+ return 1;
+ }
+
+--- 769,775 ----
+ luaV_list_len(lua_State *L)
+ {
+ list_T *l = luaV_unbox(L, luaV_List, 1);
+! lua_pushinteger(L, (int) list_len(l));
+ return 1;
+ }
+
+***************
+*** 909,915 ****
+ luaV_dict_len(lua_State *L)
+ {
+ dict_T *d = luaV_unbox(L, luaV_Dict, 1);
+! lua_pushinteger(L, (d == NULL) ? 0 : (int) d->dv_hashtab.ht_used);
+ return 1;
+ }
+
+--- 925,931 ----
+ luaV_dict_len(lua_State *L)
+ {
+ dict_T *d = luaV_unbox(L, luaV_Dict, 1);
+! lua_pushinteger(L, (int) dict_len(d));
+ return 1;
+ }
+
+***************
+*** 1029,1034 ****
+--- 1045,1168 ----
+ };
+
+
++ /* ======= Blob type ======= */
++
++ static luaV_Blob *
++ luaV_newblob(lua_State *L, blob_T *blo)
++ {
++ luaV_Blob *b = (luaV_Blob *) lua_newuserdata(L, sizeof(luaV_Blob));
++ *b = blo;
++ blo->bv_refcount++; /* reference in Lua */
++ luaV_setudata(L, blo); /* cache[blo] = udata */
++ luaV_getfield(L, LUAVIM_BLOB);
++ lua_setmetatable(L, -2);
++ return b;
++ }
++
++ luaV_pushtype(blob_T, blob, luaV_Blob)
++ luaV_type_tostring(blob, LUAVIM_BLOB)
++
++ static int
++ luaV_blob_gc(lua_State *L)
++ {
++ blob_T *b = luaV_unbox(L, luaV_Blob, 1);
++ blob_unref(b);
++ return 0;
++ }
++
++ static int
++ luaV_blob_len(lua_State *L)
++ {
++ blob_T *b = luaV_unbox(L, luaV_Blob, 1);
++ lua_pushinteger(L, (int) blob_len(b));
++ return 1;
++ }
++
++ static int
++ luaV_blob_index(lua_State *L)
++ {
++ blob_T *b = luaV_unbox(L, luaV_Blob, 1);
++ if (lua_isnumber(L, 2))
++ {
++ int idx = luaL_checkinteger(L, 2);
++ if (idx < blob_len(b))
++ lua_pushnumber(L, (lua_Number) blob_get(b, idx));
++ else
++ lua_pushnil(L);
++ }
++ else if (lua_isstring(L, 2))
++ {
++ const char *s = lua_tostring(L, 2);
++ if (strncmp(s, "add", 3) == 0)
++ {
++ lua_getmetatable(L, 1);
++ lua_getfield(L, -1, s);
++ }
++ else
++ lua_pushnil(L);
++ }
++ else
++ lua_pushnil(L);
++ return 1;
++ }
++
++ static int
++ luaV_blob_newindex(lua_State *L)
++ {
++ blob_T *b = luaV_unbox(L, luaV_Blob, 1);
++ if (b->bv_lock)
++ luaL_error(L, "blob is locked");
++ if (lua_isnumber(L, 2))
++ {
++ long len = blob_len(b);
++ int idx = luaL_checkinteger(L, 2);
++ int val = luaL_checkinteger(L, 3);
++ if (idx < len || (idx == len && ga_grow(&b->bv_ga, 1) == OK))
++ {
++ blob_set(b, idx, (char_u) val);
++ if (idx == len)
++ ++b->bv_ga.ga_len;
++ }
++ else
++ luaL_error(L, "index out of range");
++ }
++ return 0;
++ }
++
++ static int
++ luaV_blob_add(lua_State *L)
++ {
++ luaV_Blob *blo = luaV_checkudata(L, 1, LUAVIM_BLOB);
++ blob_T *b = (blob_T *) luaV_checkcache(L, (void *) *blo);
++ if (b->bv_lock)
++ luaL_error(L, "blob is locked");
++ lua_settop(L, 2);
++ if (!lua_isstring(L, 2))
++ luaL_error(L, "string expected, got %s", luaL_typename(L, 2));
++ else
++ {
++ size_t i, l = 0;
++ const char *s = lua_tolstring(L, 2, &l);
++
++ ga_grow(&b->bv_ga, l);
++ for (i = 0; i < l; ++i)
++ ga_append(&b->bv_ga, s[i]);
++ }
++ lua_settop(L, 1);
++ return 1;
++ }
++
++ static const luaL_Reg luaV_Blob_mt[] = {
++ {"__tostring", luaV_blob_tostring},
++ {"__gc", luaV_blob_gc},
++ {"__len", luaV_blob_len},
++ {"__index", luaV_blob_index},
++ {"__newindex", luaV_blob_newindex},
++ {"add", luaV_blob_add},
++ {NULL, NULL}
++ };
++
++
+ /* ======= Funcref type ======= */
+
+ static luaV_Funcref *
+***************
+*** 1624,1629 ****
+--- 1758,1790 ----
+ }
+
+ static int
++ luaV_blob(lua_State *L)
++ {
++ blob_T *b;
++ int initarg = !lua_isnoneornil(L, 1);
++
++ if (initarg && !lua_isstring(L, 1))
++ luaL_error(L, "string expected, got %s", luaL_typename(L, 1));
++ b = blob_alloc();
++ if (b == NULL)
++ lua_pushnil(L);
++ else
++ {
++ luaV_newblob(L, b);
++ if (initarg)
++ {
++ size_t i, l = 0;
++ const char *s = lua_tolstring(L, 1, &l);
++
++ ga_grow(&b->bv_ga, l);
++ for (i = 0; i < l; ++i)
++ ga_append(&b->bv_ga, s[i]);
++ }
++ }
++ return 1;
++ }
++
++ static int
+ luaV_funcref(lua_State *L)
+ {
+ const char *name = luaL_checkstring(L, 1);
+***************
+*** 1717,1722 ****
+--- 1878,1889 ----
+ lua_pushstring(L, "dict");
+ return 1;
+ }
++ luaV_getfield(L, LUAVIM_BLOB);
++ if (lua_rawequal(L, -1, 2))
++ {
++ lua_pushstring(L, "blob");
++ return 1;
++ }
+ luaV_getfield(L, LUAVIM_FUNCREF);
+ if (lua_rawequal(L, -1, 2))
+ {
+***************
+*** 1748,1753 ****
+--- 1915,1921 ----
+ {"line", luaV_line},
+ {"list", luaV_list},
+ {"dict", luaV_dict},
++ {"blob", luaV_blob},
+ {"funcref", luaV_funcref},
+ {"buffer", luaV_buffer},
+ {"window", luaV_window},
+***************
+*** 1883,1888 ****
+--- 2051,2059 ----
+ luaV_newmetatable(L, LUAVIM_DICT);
+ lua_pushvalue(L, 1);
+ luaV_openlib(L, luaV_Dict_mt, 1);
++ luaV_newmetatable(L, LUAVIM_BLOB);
++ lua_pushvalue(L, 1);
++ luaV_openlib(L, luaV_Blob_mt, 1);
+ luaV_newmetatable(L, LUAVIM_FUNCREF);
+ lua_pushvalue(L, 1);
+ luaV_openlib(L, luaV_Funcref_mt, 1);
+*** ../vim-8.1.1042/src/testdir/test_lua.vim 2019-03-19 21:59:16.268914799 +0100
+--- src/testdir/test_lua.vim 2019-03-23 13:53:32.131159759 +0100
+***************
+*** 50,55 ****
+--- 50,60 ----
+ call assert_equal('dict', luaeval('vim.type(v)'))
+ call assert_equal({'a':'b'}, luaeval('v'))
+
++ " lua.eval with a blob
++ lua v = vim.eval("0z00112233.deadbeef")
++ call assert_equal('blob', luaeval('vim.type(v)'))
++ call assert_equal(0z00112233.deadbeef, luaeval('v'))
++
+ call assert_fails('lua v = vim.eval(nil)',
+ \ "[string \"vim chunk\"]:1: bad argument #1 to 'eval' (string expected, got nil)")
+ call assert_fails('lua v = vim.eval(true)',
+***************
+*** 428,433 ****
+--- 433,462 ----
+ lua str, d = nil
+ endfunc
+
++ func Test_blob()
++ call assert_equal(0z, luaeval('vim.blob("")'))
++ call assert_equal(0z31326162, luaeval('vim.blob("12ab")'))
++ call assert_equal(0z00010203, luaeval('vim.blob("\x00\x01\x02\x03")'))
++ call assert_equal(0z8081FEFF, luaeval('vim.blob("\x80\x81\xfe\xff")'))
++
++ lua b = vim.blob("\x00\x00\x00\x00")
++ call assert_equal(0z00000000, luaeval('b'))
++ call assert_equal(4.0, luaeval('#b'))
++ lua b[0], b[1], b[2], b[3] = 1, 32, 256, 0xff
++ call assert_equal(0z012000ff, luaeval('b'))
++ lua b[4] = string.byte("z", 1)
++ call assert_equal(0z012000ff.7a, luaeval('b'))
++ call assert_equal(5.0, luaeval('#b'))
++ call assert_fails('lua b[#b+1] = 0x80', '[string "vim chunk"]:1: index out of range')
++ lua b:add("12ab")
++ call assert_equal(0z012000ff.7a313261.62, luaeval('b'))
++ call assert_equal(9.0, luaeval('#b'))
++ call assert_fails('lua b:add(nil)', '[string "vim chunk"]:1: string expected, got nil')
++ call assert_fails('lua b:add(true)', '[string "vim chunk"]:1: string expected, got boolean')
++ call assert_fails('lua b:add({})', '[string "vim chunk"]:1: string expected, got table')
++ lua b = nil
++ endfunc
++
+ func Test_funcref()
+ function I(x)
+ return a:x
+*** ../vim-8.1.1042/src/version.c 2019-03-23 13:30:19.251356505 +0100
+--- src/version.c 2019-03-23 13:54:37.582657565 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1043,
+ /**/
+
+--
+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.1044 b/data/vim/patches/8.1.1044
new file mode 100644
index 000000000..334298971
--- /dev/null
+++ b/data/vim/patches/8.1.1044
@@ -0,0 +1,296 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1044
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1044
+Problem: No way to check the reference count of objects.
+Solution: Add test_refcount(). (Ozaki Kiichi, closes #4124)
+Files: runtime/doc/eval.txt, src/evalfunc.c,
+ src/testdir/test_vimscript.vim
+
+
+*** ../vim-8.1.1043/runtime/doc/eval.txt 2019-03-17 16:39:01.562006195 +0100
+--- runtime/doc/eval.txt 2019-03-23 14:11:43.603170194 +0100
+***************
+*** 2645,2650 ****
+--- 2672,2678 ----
+ 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_refcount({expr}) Number get the reference count of {expr}
+ test_scrollbar({which}, {value}, {dragging})
+ none scroll in the GUI for testing
+ test_settime({expr}) none set current time for testing
+***************
+*** 9532,9537 ****
+--- 9590,9600 ----
+ < The value of "starting" is saved. It is restored by: >
+ call test_override('starting', 0)
+
++ test_refcount({expr}) *test_refcount()*
++ Return the reference count of {expr}. When {expr} is of a
++ type that does not have a reference count, returns -1. Only
++ to be used for testing.
++
+ test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()*
+ Pretend using scrollbar {which} to move it to position
+ {value}. {which} can be:
+*** ../vim-8.1.1043/src/evalfunc.c 2019-03-22 17:03:01.783689365 +0100
+--- src/evalfunc.c 2019-03-23 14:09:39.184057626 +0100
+***************
+*** 428,433 ****
+--- 428,434 ----
+ 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_refcount(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);
+ static void f_test_null_blob(typval_T *argvars, typval_T *rettv);
+***************
+*** 952,958 ****
+ {"test_feedinput", 1, 1, f_test_feedinput},
+ {"test_garbagecollect_now", 0, 0, f_test_garbagecollect_now},
+ {"test_ignore_error", 1, 1, f_test_ignore_error},
+! {"test_null_blob", 0, 0, f_test_null_blob},
+ #ifdef FEAT_JOB_CHANNEL
+ {"test_null_channel", 0, 0, f_test_null_channel},
+ #endif
+--- 953,959 ----
+ {"test_feedinput", 1, 1, f_test_feedinput},
+ {"test_garbagecollect_now", 0, 0, f_test_garbagecollect_now},
+ {"test_ignore_error", 1, 1, f_test_ignore_error},
+! {"test_null_blob", 0, 0, f_test_null_blob},
+ #ifdef FEAT_JOB_CHANNEL
+ {"test_null_channel", 0, 0, f_test_null_channel},
+ #endif
+***************
+*** 964,970 ****
+ {"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},
+ #ifdef FEAT_GUI
+ {"test_scrollbar", 3, 3, f_test_scrollbar},
+ #endif
+--- 965,972 ----
+ {"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_refcount", 1, 1, f_test_refcount},
+ #ifdef FEAT_GUI
+ {"test_scrollbar", 3, 3, f_test_scrollbar},
+ #endif
+***************
+*** 13847,13852 ****
+--- 13849,13915 ----
+ }
+
+ /*
++ * "test_refcount({expr})" function
++ */
++ static void
++ f_test_refcount(typval_T *argvars, typval_T *rettv)
++ {
++ int retval = -1;
++
++ switch (argvars[0].v_type)
++ {
++ case VAR_UNKNOWN:
++ case VAR_NUMBER:
++ case VAR_FLOAT:
++ case VAR_SPECIAL:
++ case VAR_STRING:
++ break;
++ case VAR_JOB:
++ #ifdef FEAT_JOB_CHANNEL
++ if (argvars[0].vval.v_job != NULL)
++ retval = argvars[0].vval.v_job->jv_refcount - 1;
++ #endif
++ break;
++ case VAR_CHANNEL:
++ #ifdef FEAT_JOB_CHANNEL
++ if (argvars[0].vval.v_channel != NULL)
++ retval = argvars[0].vval.v_channel->ch_refcount - 1;
++ #endif
++ break;
++ case VAR_FUNC:
++ if (argvars[0].vval.v_string != NULL)
++ {
++ ufunc_T *fp;
++
++ fp = find_func(argvars[0].vval.v_string);
++ if (fp != NULL)
++ retval = fp->uf_refcount;
++ }
++ break;
++ case VAR_PARTIAL:
++ if (argvars[0].vval.v_partial != NULL)
++ retval = argvars[0].vval.v_partial->pt_refcount - 1;
++ break;
++ case VAR_BLOB:
++ if (argvars[0].vval.v_blob != NULL)
++ retval = argvars[0].vval.v_blob->bv_refcount - 1;
++ break;
++ case VAR_LIST:
++ if (argvars[0].vval.v_list != NULL)
++ retval = argvars[0].vval.v_list->lv_refcount - 1;
++ break;
++ case VAR_DICT:
++ if (argvars[0].vval.v_dict != NULL)
++ retval = argvars[0].vval.v_dict->dv_refcount - 1;
++ break;
++ }
++
++ rettv->v_type = VAR_NUMBER;
++ rettv->vval.v_number = retval;
++
++ }
++
++ /*
+ * "test_garbagecollect_now()" function
+ */
+ static void
+*** ../vim-8.1.1043/src/testdir/test_vimscript.vim 2019-03-02 11:57:06.159125888 +0100
+--- src/testdir/test_vimscript.vim 2019-03-23 14:21:08.991161181 +0100
+***************
+*** 1556,1561 ****
+--- 1556,1670 ----
+ let @/ = ''
+ endfunc
+
++ func Test_refcount()
++ " Immediate values
++ call assert_equal(-1, test_refcount(1))
++ call assert_equal(-1, test_refcount('s'))
++ call assert_equal(-1, test_refcount(v:true))
++ call assert_equal(0, test_refcount([]))
++ call assert_equal(0, test_refcount({}))
++ call assert_equal(0, test_refcount(0zff))
++ call assert_equal(0, test_refcount({-> line('.')}))
++ if has('float')
++ call assert_equal(-1, test_refcount(0.1))
++ endif
++ if has('job')
++ call assert_equal(0, test_refcount(job_start([&shell, &shellcmdflag, 'echo .'])))
++ endif
++
++ " No refcount types
++ let x = 1
++ call assert_equal(-1, test_refcount(x))
++ let x = 's'
++ call assert_equal(-1, test_refcount(x))
++ let x = v:true
++ call assert_equal(-1, test_refcount(x))
++ if has('float')
++ let x = 0.1
++ call assert_equal(-1, test_refcount(x))
++ endif
++
++ " Check refcount
++ let x = []
++ call assert_equal(1, test_refcount(x))
++
++ let x = {}
++ call assert_equal(1, test_refcount(x))
++
++ let x = 0zff
++ call assert_equal(1, test_refcount(x))
++
++ let X = {-> line('.')}
++ call assert_equal(1, test_refcount(X))
++ let Y = X
++ call assert_equal(2, test_refcount(X))
++
++ if has('job')
++ let job = job_start([&shell, &shellcmdflag, 'echo .'])
++ call assert_equal(1, test_refcount(job))
++ call assert_equal(1, test_refcount(job_getchannel(job)))
++ call assert_equal(1, test_refcount(job))
++ endif
++
++ " Function arguments, copying and unassigning
++ func ExprCheck(x, i)
++ let i = a:i + 1
++ call assert_equal(i, test_refcount(a:x))
++ let Y = a:x
++ call assert_equal(i + 1, test_refcount(a:x))
++ call assert_equal(test_refcount(a:x), test_refcount(Y))
++ let Y = 0
++ call assert_equal(i, test_refcount(a:x))
++ endfunc
++ call ExprCheck([], 0)
++ call ExprCheck({}, 0)
++ call ExprCheck(0zff, 0)
++ call ExprCheck({-> line('.')}, 0)
++ if has('job')
++ call ExprCheck(job, 1)
++ call ExprCheck(job_getchannel(job), 1)
++ call job_stop(job)
++ endif
++ delfunc ExprCheck
++
++ " Regarding function
++ func Func(x) abort
++ call assert_equal(2, test_refcount(function('Func')))
++ call assert_equal(0, test_refcount(funcref('Func')))
++ endfunc
++ call assert_equal(1, test_refcount(function('Func')))
++ call assert_equal(0, test_refcount(function('Func', [1])))
++ call assert_equal(0, test_refcount(funcref('Func')))
++ call assert_equal(0, test_refcount(funcref('Func', [1])))
++ let X = function('Func')
++ let Y = X
++ call assert_equal(1, test_refcount(X))
++ let X = function('Func', [1])
++ let Y = X
++ call assert_equal(2, test_refcount(X))
++ let X = funcref('Func')
++ let Y = X
++ call assert_equal(2, test_refcount(X))
++ let X = funcref('Func', [1])
++ let Y = X
++ call assert_equal(2, test_refcount(X))
++ unlet X
++ unlet Y
++ call Func(1)
++ delfunc Func
++
++ " Function with dict
++ func DictFunc() dict
++ call assert_equal(3, test_refcount(self))
++ endfunc
++ let d = {'Func': function('DictFunc')}
++ call assert_equal(1, test_refcount(d))
++ call assert_equal(0, test_refcount(d.Func))
++ call d.Func()
++ unlet d
++ delfunc DictFunc
++ endfunc
++
+ "-------------------------------------------------------------------------------
+ " Modelines {{{1
+ " vim: ts=8 sw=4 tw=80 fdm=marker
+*** ../vim-8.1.1043/src/version.c 2019-03-23 13:56:30.189804811 +0100
+--- src/version.c 2019-03-23 14:10:54.583519509 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1044,
+ /**/
+
+--
+A meeting is an event at which the minutes are kept and the hours are lost.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1045 b/data/vim/patches/8.1.1045
new file mode 100644
index 000000000..753c1ed1f
--- /dev/null
+++ b/data/vim/patches/8.1.1045
@@ -0,0 +1,262 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1045
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1045
+Problem: E315 ml_get error when using Python and hidden buffer.
+Solution: Make sure the cursor position is valid. (Ben Jackson,
+ closes #4153, closes #4154)
+Files: src/if_py_both.h, src/testdir/test_python2.vim,
+ src/testdir/test_python3.vim
+
+
+*** ../vim-8.1.1044/src/if_py_both.h 2019-02-14 13:28:42.143415639 +0100
+--- src/if_py_both.h 2019-03-23 17:26:05.958992217 +0100
+***************
+*** 4392,4398 ****
+ RAISE_DELETE_LINE_FAIL;
+ else
+ {
+! if (buf == curbuf)
+ py_fix_cursor((linenr_T)n, (linenr_T)n + 1, (linenr_T)-1);
+ if (save_curbuf.br_buf == NULL)
+ /* Only adjust marks if we managed to switch to a window that
+--- 4392,4401 ----
+ RAISE_DELETE_LINE_FAIL;
+ else
+ {
+! if (buf == curbuf && (save_curwin != NULL
+! || save_curbuf.br_buf == NULL))
+! // Using an existing window for the buffer, adjust the cursor
+! // position.
+ py_fix_cursor((linenr_T)n, (linenr_T)n + 1, (linenr_T)-1);
+ if (save_curbuf.br_buf == NULL)
+ /* Only adjust marks if we managed to switch to a window that
+***************
+*** 4642,4648 ****
+ (long)MAXLNUM, (long)extra);
+ changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra);
+
+! if (buf == curbuf)
+ py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)extra);
+
+ /* END of region without "return". */
+--- 4645,4654 ----
+ (long)MAXLNUM, (long)extra);
+ changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra);
+
+! if (buf == curbuf && (save_curwin != NULL
+! || save_curbuf.br_buf == NULL))
+! // Using an existing window for the buffer, adjust the cursor
+! // position.
+ py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)extra);
+
+ /* END of region without "return". */
+*** ../vim-8.1.1044/src/testdir/test_python2.vim 2019-02-18 22:04:52.949609091 +0100
+--- src/testdir/test_python2.vim 2019-03-23 17:19:39.117394146 +0100
+***************
+*** 71,73 ****
+--- 71,157 ----
+ endif
+ call assert_equal(0, &pyxversion) " This assertion would have failed with Vim 8.0.0251. (pyxversion was introduced in 8.0.0251.)
+ endfunc
++
++ func _SetUpHiddenBuffer()
++ py import vim
++ new
++ edit hidden
++ setlocal bufhidden=hide
++
++ enew
++ let lnum = 0
++ while lnum < 10
++ call append( 1, string( lnum ) )
++ let lnum = lnum + 1
++ endwhile
++ normal G
++
++ call assert_equal( line( '.' ), 11 )
++ endfunc
++
++ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Clear()
++ call _SetUpHiddenBuffer()
++ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = None
++ call assert_equal( line( '.' ), 11 )
++ bwipe!
++ endfunc
++
++ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_List()
++ call _SetUpHiddenBuffer()
++ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = [ 'test' ]
++ call assert_equal( line( '.' ), 11 )
++ bwipe!
++ endfunc
++
++ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Str()
++ call _SetUpHiddenBuffer()
++ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = 'test'
++ call assert_equal( line( '.' ), 11 )
++ bwipe!
++ endfunc
++
++ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_ClearLine()
++ call _SetUpHiddenBuffer()
++ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = None
++ call assert_equal( line( '.' ), 11 )
++ bwipe!
++ endfunc
++
++ func _SetUpVisibleBuffer()
++ py import vim
++ new
++ let lnum = 0
++ while lnum < 10
++ call append( 1, string( lnum ) )
++ let lnum = lnum + 1
++ endwhile
++ normal G
++ call assert_equal( line( '.' ), 11 )
++ endfunc
++
++ func Test_Write_To_Current_Buffer_Fixes_Cursor_Clear()
++ call _SetUpVisibleBuffer()
++
++ py vim.current.buffer[:] = None
++ call assert_equal( line( '.' ), 1 )
++
++ bwipe!
++ endfunc
++
++ func Test_Write_To_Current_Buffer_Fixes_Cursor_List()
++ call _SetUpVisibleBuffer()
++
++ py vim.current.buffer[:] = [ 'test' ]
++ call assert_equal( line( '.' ), 1 )
++
++ bwipe!
++ endfunction
++
++ func Test_Write_To_Current_Buffer_Fixes_Cursor_Str()
++ call _SetUpVisibleBuffer()
++
++ py vim.current.buffer[-1] = None
++ call assert_equal( line( '.' ), 10 )
++
++ bwipe!
++ endfunction
+*** ../vim-8.1.1044/src/testdir/test_python3.vim 2019-02-18 22:04:52.949609091 +0100
+--- src/testdir/test_python3.vim 2019-03-23 17:19:39.117394146 +0100
+***************
+*** 71,73 ****
+--- 71,157 ----
+ endif
+ call assert_equal(0, &pyxversion) " This assertion would have failed with Vim 8.0.0251. (pyxversion was introduced in 8.0.0251.)
+ endfunc
++
++ func _SetUpHiddenBuffer()
++ py3 import vim
++ new
++ edit hidden
++ setlocal bufhidden=hide
++
++ enew
++ let lnum = 0
++ while lnum < 10
++ call append( 1, string( lnum ) )
++ let lnum = lnum + 1
++ endwhile
++ normal G
++
++ call assert_equal( line( '.' ), 11 )
++ endfunc
++
++ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Clear()
++ call _SetUpHiddenBuffer()
++ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = None
++ call assert_equal( line( '.' ), 11 )
++ bwipe!
++ endfunc
++
++ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_List()
++ call _SetUpHiddenBuffer()
++ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = [ 'test' ]
++ call assert_equal( line( '.' ), 11 )
++ bwipe!
++ endfunc
++
++ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Str()
++ call _SetUpHiddenBuffer()
++ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = 'test'
++ call assert_equal( line( '.' ), 11 )
++ bwipe!
++ endfunc
++
++ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_ClearLine()
++ call _SetUpHiddenBuffer()
++ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = None
++ call assert_equal( line( '.' ), 11 )
++ bwipe!
++ endfunc
++
++ func _SetUpVisibleBuffer()
++ py3 import vim
++ new
++ let lnum = 0
++ while lnum < 10
++ call append( 1, string( lnum ) )
++ let lnum = lnum + 1
++ endwhile
++ normal G
++ call assert_equal( line( '.' ), 11 )
++ endfunc
++
++ func Test_Write_To_Current_Buffer_Fixes_Cursor_Clear()
++ call _SetUpVisibleBuffer()
++
++ py3 vim.current.buffer[:] = None
++ call assert_equal( line( '.' ), 1 )
++
++ bwipe!
++ endfunc
++
++ func Test_Write_To_Current_Buffer_Fixes_Cursor_List()
++ call _SetUpVisibleBuffer()
++
++ py3 vim.current.buffer[:] = [ 'test' ]
++ call assert_equal( line( '.' ), 1 )
++
++ bwipe!
++ endfunction
++
++ func Test_Write_To_Current_Buffer_Fixes_Cursor_Str()
++ call _SetUpVisibleBuffer()
++
++ py3 vim.current.buffer[-1] = None
++ call assert_equal( line( '.' ), 10 )
++
++ bwipe!
++ endfunction
+*** ../vim-8.1.1044/src/version.c 2019-03-23 14:23:02.138361658 +0100
+--- src/version.c 2019-03-23 17:40:28.001674801 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1045,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+106. When told to "go to your room" you inform your parents that you
+ can't...because you were kicked out and banned.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1046 b/data/vim/patches/8.1.1046
new file mode 100644
index 000000000..85a705659
--- /dev/null
+++ b/data/vim/patches/8.1.1046
@@ -0,0 +1,81 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1046
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1046
+Problem: the "secure" variable is used inconsistently. (Justin M. Keyes)
+Solution: Set it to one instead of incrementing.
+Files: src/buffer.c, src/option.c
+
+
+*** ../vim-8.1.1045/src/buffer.c 2019-03-02 10:13:36.788974890 +0100
+--- src/buffer.c 2019-03-24 13:48:30.222662964 +0100
+***************
+*** 5498,5504 ****
+ 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);
+
+--- 5498,5504 ----
+ current_sctx.sc_lnum = 0;
+ #endif
+ // Make sure no risky things are executed as a side effect.
+! secure = 1;
+
+ retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
+
+*** ../vim-8.1.1045/src/option.c 2019-03-21 21:45:30.879282125 +0100
+--- src/option.c 2019-03-24 13:50:57.149725126 +0100
+***************
+*** 5151,5163 ****
+ // 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)))
+! ++secure;
+
+ // Handle side effects, and set the global value
+ // for ":set" on local options. Note: when setting
+--- 5151,5162 ----
+ // effects in secure mode. Also when the value was
+ // set with the P_INSECURE flag and is not
+ // completely replaced.
+! if ((opt_flags & OPT_MODELINE)
+ #ifdef HAVE_SANDBOX
+! || sandbox != 0
+ #endif
+! || (!value_is_replaced && (*p & P_INSECURE)))
+! secure = 1;
+
+ // Handle side effects, and set the global value
+ // for ":set" on local options. Note: when setting
+*** ../vim-8.1.1045/src/version.c 2019-03-23 17:41:56.217138373 +0100
+--- src/version.c 2019-03-24 13:53:30.596743493 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1046,
+ /**/
+
+--
+In a world without walls and borders, who needs windows and gates?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1047 b/data/vim/patches/8.1.1047
new file mode 100644
index 000000000..aaa191b9a
--- /dev/null
+++ b/data/vim/patches/8.1.1047
@@ -0,0 +1,103 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.10
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1047
+Problem: WINCH signal is not tested.
+Solution: Add a test. (Dominique Pelle, closes #4158)
+Files: src/testdir/Make_all.mak, src/testdir/test_signals.vim
+
+
+*** ../vim-8.1.1046/src/testdir/Make_all.mak 2019-03-14 13:42:57.169435481 +0100
+--- src/testdir/Make_all.mak 2019-03-24 14:54:25.343711086 +0100
+***************
+*** 224,229 ****
+--- 224,230 ----
+ test_searchpos \
+ test_set \
+ test_sha256 \
++ test_signals \
+ test_signs \
+ test_smartindent \
+ test_sort \
+***************
+*** 385,390 ****
+--- 386,392 ----
+ test_scrollbind.res \
+ test_search.res \
+ test_shortpathname.res \
++ test_signals.res \
+ test_signs.res \
+ test_smartindent.res \
+ test_source.res \
+*** ../vim-8.1.1046/src/testdir/test_signals.vim 2019-03-24 14:57:43.686391002 +0100
+--- src/testdir/test_signals.vim 2019-03-24 14:53:51.031939485 +0100
+***************
+*** 0 ****
+--- 1,44 ----
++ " Test signal handling.
++
++ if !has('unix')
++ finish
++ endif
++
++ source shared.vim
++
++ " Test signal WINCH (window resize signal)
++ func Test_signal_WINCH()
++ let signals = system('kill -l')
++ if signals !~ '\<WINCH\>'
++ " signal WINCH is not available, skip the test.
++ return
++ endif
++
++ " We do not actually want to change the size of the terminal.
++ let old_WS = ''
++ if exists('&t_WS')
++ let old_WS = &t_WS
++ let &t_WS = ''
++ endif
++
++ let old_lines = &lines
++ let old_columns = &columns
++ let new_lines = &lines - 2
++ let new_columns = &columns - 2
++
++ exe 'set lines=' . new_lines
++ exe 'set columns=' . new_columns
++ call assert_equal(new_lines, &lines)
++ call assert_equal(new_columns, &columns)
++
++ " Send signal and wait for signal to be processed.
++ " 'lines' and 'columns' should have been restored
++ " after handing signal WINCH.
++ exe 'silent !kill -s WINCH ' . getpid()
++ call WaitForAssert({-> assert_equal(old_lines, &lines)})
++ call assert_equal(old_columns, &columns)
++
++ if old_WS != ''
++ let &t_WS = old_WS
++ endif
++ endfunc
+*** ../vim-8.1.1046/src/version.c 2019-03-24 14:02:00.981468747 +0100
+--- src/version.c 2019-03-24 14:30:13.869404055 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1047,
+ /**/
+
+--
+Corduroy pillows: They're making headlines!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1048 b/data/vim/patches/8.1.1048
new file mode 100644
index 000000000..ba54b3a52
--- /dev/null
+++ b/data/vim/patches/8.1.1048
@@ -0,0 +1,125 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1048
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1048
+Problem: Minor issues with tests.
+Solution: Delete unused test OK file. Add missing entries in list of tests.
+ Fix readme file. (Masato Nishihata, closes #4160)
+Files: src/testdir/test85.ok, src/testdir/Make_all.mak,
+ src/testdir/README.txt
+
+
+*** ../vim-8.1.1047/src/testdir/test85.ok 2013-04-15 13:12:47.000000000 +0200
+--- src/testdir/test85.ok 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,7 ****
+- 1 changed line 1
+- scalar test OK
+- 2 line 2
+- dictionary with list OK
+- circular test OK
+- [123.0, 'abc', [1, 2, 3], {'a': 1, 'b': 2, 'c': 3}]
+- {'4': 123.0, '5': 'abc', '6': [1, 2, 3], '7': {'a': 1, 'b': 2, 'c': 3}}
+--- 0 ----
+*** ../vim-8.1.1047/src/testdir/Make_all.mak 2019-03-24 14:58:09.966216115 +0100
+--- src/testdir/Make_all.mak 2019-03-24 20:10:42.134572368 +0100
+***************
+*** 224,229 ****
+--- 224,230 ----
+ test_searchpos \
+ test_set \
+ test_sha256 \
++ test_shortpathname \
+ test_signals \
+ test_signs \
+ test_smartindent \
+***************
+*** 258,263 ****
+--- 259,265 ----
+ test_true_false \
+ test_undo \
+ test_unlet \
++ test_user_func \
+ test_usercommands \
+ test_utf8 \
+ test_utf8_comparisons \
+*** ../vim-8.1.1047/src/testdir/README.txt 2019-01-11 17:30:13.294241849 +0100
+--- src/testdir/README.txt 2019-03-24 20:15:01.944881800 +0100
+***************
+*** 34,50 ****
+
+ - 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
+--- 34,47 ----
+
+ - Use try/catch to avoid an exception aborts the test.
+
+! - Use test_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. Add a new one to
+! alloc_id_T, before aid_last.
+
+ - 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
+***************
+*** 64,70 ****
+ 1) Create test_<subject>.in and test_<subject>.ok files.
+ 2) Add test_<subject>.out to SCRIPTS_ALL in Make_all.mak in alphabetical order.
+ 3) Use make test_<subject>.out to run a single test in src/testdir/.
+! Use make test_<subject> to run a single test in src/.
+ 4) Also add an entry in src/Makefile.
+
+ Keep in mind that the files are used as if everything was typed:
+--- 61,67 ----
+ 1) Create test_<subject>.in and test_<subject>.ok files.
+ 2) Add test_<subject>.out to SCRIPTS_ALL in Make_all.mak in alphabetical order.
+ 3) Use make test_<subject>.out to run a single test in src/testdir/.
+! Use make test_<subject> to run a single test in src/.
+ 4) Also add an entry in src/Makefile.
+
+ Keep in mind that the files are used as if everything was typed:
+*** ../vim-8.1.1047/src/version.c 2019-03-24 14:58:09.966216115 +0100
+--- src/version.c 2019-03-24 20:11:33.734236524 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1048,
+ /**/
+
+--
+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.1049 b/data/vim/patches/8.1.1049
new file mode 100644
index 000000000..1cae03e24
--- /dev/null
+++ b/data/vim/patches/8.1.1049
@@ -0,0 +1,123 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1049
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1049
+Problem: When user tries to exit with CTRL-C message is confusing.
+Solution: Only mention ":qa!" when there is a changed buffer. (closes #4163)
+Files: src/undo.c, src/proto/undo.pro, src/normal.c,
+ src/testdir/test_normal.vim
+
+
+*** ../vim-8.1.1048/src/undo.c 2019-02-17 17:44:36.223875455 +0100
+--- src/undo.c 2019-03-25 21:52:25.512531373 +0100
+***************
+*** 3531,3536 ****
+--- 3531,3549 ----
+ }
+
+ /*
++ * Return TRUE if any buffer has changes. Also buffers that are not written.
++ */
++ int
++ anyBufIsChanged(void)
++ {
++ buf_T *buf;
++
++ FOR_ALL_BUFFERS(buf)
++ if (bufIsChanged(buf))
++ return TRUE;
++ }
++
++ /*
+ * Like bufIsChanged() but ignoring a terminal window.
+ */
+ int
+*** ../vim-8.1.1048/src/proto/undo.pro 2018-05-17 13:52:54.000000000 +0200
+--- src/proto/undo.pro 2019-03-25 21:53:33.311966690 +0100
+***************
+*** 25,30 ****
+--- 25,31 ----
+ void u_undoline(void);
+ void u_blockfree(buf_T *buf);
+ int bufIsChanged(buf_T *buf);
++ int anyBufIsChanged(void);
+ int bufIsChangedNotTerm(buf_T *buf);
+ int curbufIsChanged(void);
+ void u_eval_tree(u_header_T *first_uhp, list_T *list);
+*** ../vim-8.1.1048/src/normal.c 2019-03-21 21:45:30.879282125 +0100
+--- src/normal.c 2019-03-25 21:59:53.073771115 +0100
+***************
+*** 8886,8892 ****
+ #endif
+ && !VIsual_active
+ && no_reason)
+! msg(_("Type :qa! and press <Enter> to abandon all changes and exit Vim"));
+
+ /* Don't reset "restart_edit" when 'insertmode' is set, it won't be
+ * set again below when halfway a mapping. */
+--- 8886,8897 ----
+ #endif
+ && !VIsual_active
+ && no_reason)
+! {
+! if (anyBufIsChanged())
+! msg(_("Type :qa! and press <Enter> to abandon all changes and exit Vim"));
+! else
+! msg(_("Type :qa and press <Enter> to exit Vim"));
+! }
+
+ /* Don't reset "restart_edit" when 'insertmode' is set, it won't be
+ * set again below when halfway a mapping. */
+*** ../vim-8.1.1048/src/testdir/test_normal.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_normal.vim 2019-03-25 22:00:48.625478173 +0100
+***************
+*** 1,5 ****
+--- 1,7 ----
+ " Test for various Normal mode commands
+
++ source shared.vim
++
+ func Setup_NewWindow()
+ 10new
+ call setline(1, range(1,100))
+***************
+*** 2542,2544 ****
+--- 2544,2556 ----
+
+ %bwipeout!
+ endfunc
++
++ func Test_message_when_using_ctrl_c()
++ exe "normal \<C-C>"
++ call assert_match("Type :qa and press <Enter> to exit Vim", Screenline(&lines))
++ new
++ cal setline(1, 'hi!')
++ exe "normal \<C-C>"
++ call assert_match("Type :qa! and press <Enter> to abandon all changes and exit Vim", Screenline(&lines))
++ bwipe!
++ endfunc
+*** ../vim-8.1.1048/src/version.c 2019-03-24 20:18:36.827484226 +0100
+--- src/version.c 2019-03-25 21:59:16.845953994 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1049,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+119. You are reading a book and look for the scroll bar to get to
+ the next 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.1050 b/data/vim/patches/8.1.1050
new file mode 100644
index 000000000..ecc694662
--- /dev/null
+++ b/data/vim/patches/8.1.1050
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1050
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1050
+Problem: Blank srceen when DirectWrite failed.
+Solution: Call redraw_later_clear() after recreating the Direct2D render
+ target. (Ken Takata, closes #4172)
+Files: src/gui_dwrite.cpp
+
+
+*** ../vim-8.1.1049/src/gui_dwrite.cpp 2019-03-21 20:50:08.868741864 +0100
+--- src/gui_dwrite.cpp 2019-03-25 22:45:35.316700366 +0100
+***************
+*** 930,935 ****
+--- 930,937 ----
+ }
+ }
+
++ extern "C" void redraw_later_clear(void);
++
+ HRESULT
+ DWriteContext::SetDrawingMode(DrawingMode mode)
+ {
+***************
+*** 952,957 ****
+--- 954,960 ----
+ hr = S_OK;
+ DiscardDeviceResources();
+ CreateDeviceResources();
++ redraw_later_clear();
+ }
+ mDrawing = false;
+ }
+*** ../vim-8.1.1049/src/version.c 2019-03-25 22:21:21.557069182 +0100
+--- src/version.c 2019-03-25 22:47:41.831650803 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1050,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+121. You ask for e-mail adresses instead of telephone numbers.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1051 b/data/vim/patches/8.1.1051
new file mode 100644
index 000000000..8ac7eca8e
--- /dev/null
+++ b/data/vim/patches/8.1.1051
@@ -0,0 +1,69 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1051
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1051
+Problem: Not all ways to switch terminal mode are tested.
+Solution: Add more test cases.
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1050/src/testdir/test_terminal.vim 2019-02-25 06:11:19.026193863 +0100
+--- src/testdir/test_terminal.vim 2019-03-25 22:59:23.369949783 +0100
+***************
+*** 1772,1777 ****
+--- 1772,1800 ----
+ bwipe!
+ endfunc
+
++ func Test_terminal_switch_mode()
++ term
++ let bnr = bufnr('$')
++ call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
++ call feedkeys("\<C-W>N", 'xt')
++ call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
++ call feedkeys("A", 'xt')
++ call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
++ call feedkeys("\<C-W>N", 'xt')
++ call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
++ call feedkeys("I", 'xt')
++ call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
++ call feedkeys("\<C-W>Nv", 'xt')
++ call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
++ call feedkeys("I", 'xt')
++ call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
++ call feedkeys("\<C-W>Nv", 'xt')
++ call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
++ call feedkeys("A", 'xt')
++ call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
++ bwipe!
++ endfunc
++
+ func Test_terminal_hidden_and_close()
+ if !has('unix')
+ return
+*** ../vim-8.1.1050/src/version.c 2019-03-25 22:48:14.699379700 +0100
+--- src/version.c 2019-03-25 23:01:08.869101987 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1051,
+ /**/
+
+--
+~
+~
+~
+".signature" 4 lines, 50 characters written
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1052 b/data/vim/patches/8.1.1052
new file mode 100644
index 000000000..a5c29b5f9
--- /dev/null
+++ b/data/vim/patches/8.1.1052
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1052
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1052
+Problem: test for CTRL-C message sometimes fails
+Solution: Make sure there are no changed buffers.
+Files: src/testdir/test_normal.vim
+
+
+*** ../vim-8.1.1051/src/testdir/test_normal.vim 2019-03-25 22:21:21.557069182 +0100
+--- src/testdir/test_normal.vim 2019-03-25 23:15:12.149198642 +0100
+***************
+*** 2546,2556 ****
+--- 2546,2561 ----
+ endfunc
+
+ func Test_message_when_using_ctrl_c()
++ " Make sure no buffers are changed.
++ %bwipe!
++
+ exe "normal \<C-C>"
+ call assert_match("Type :qa and press <Enter> to exit Vim", Screenline(&lines))
++
+ new
+ cal setline(1, 'hi!')
+ exe "normal \<C-C>"
+ call assert_match("Type :qa! and press <Enter> to abandon all changes and exit Vim", Screenline(&lines))
++
+ bwipe!
+ endfunc
+*** ../vim-8.1.1051/src/version.c 2019-03-25 23:01:34.324897627 +0100
+--- src/version.c 2019-03-25 23:16:01.200756323 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1052,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+122. You ask if the Netaholics Anonymous t-shirt you ordered can be
+ sent to you via 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.1053 b/data/vim/patches/8.1.1053
new file mode 100644
index 000000000..f4c6e6fdc
--- /dev/null
+++ b/data/vim/patches/8.1.1053
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1053
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1053
+Problem: Warning for missing return statement. (Dominique Pelle)
+Solution: Add return statement.
+Files: src/undo.c
+
+
+*** ../vim-8.1.1052/src/undo.c 2019-03-25 22:21:21.553069212 +0100
+--- src/undo.c 2019-03-26 00:29:13.021982250 +0100
+***************
+*** 3541,3546 ****
+--- 3541,3547 ----
+ FOR_ALL_BUFFERS(buf)
+ if (bufIsChanged(buf))
+ return TRUE;
++ return FALSE;
+ }
+
+ /*
+*** ../vim-8.1.1052/src/version.c 2019-03-25 23:16:30.600492534 +0100
+--- src/version.c 2019-03-26 00:29:53.741677195 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1053,
+ /**/
+
+--
+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.1054 b/data/vim/patches/8.1.1054
new file mode 100644
index 000000000..cd4844b86
--- /dev/null
+++ b/data/vim/patches/8.1.1054
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1054
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1054
+Problem: Not checking return value of ga_grow(). (Coverity)
+Solution: Only append when ga_grow() returns OK.
+Files: src/if_lua.c
+
+
+*** ../vim-8.1.1053/src/if_lua.c 2019-03-23 13:56:30.189804811 +0100
+--- src/if_lua.c 2019-03-26 21:40:15.851115489 +0100
+***************
+*** 1144,1152 ****
+ size_t i, l = 0;
+ const char *s = lua_tolstring(L, 2, &l);
+
+! ga_grow(&b->bv_ga, l);
+! for (i = 0; i < l; ++i)
+! ga_append(&b->bv_ga, s[i]);
+ }
+ lua_settop(L, 1);
+ return 1;
+--- 1144,1152 ----
+ size_t i, l = 0;
+ const char *s = lua_tolstring(L, 2, &l);
+
+! if (ga_grow(&b->bv_ga, l) == OK)
+! for (i = 0; i < l; ++i)
+! ga_append(&b->bv_ga, s[i]);
+ }
+ lua_settop(L, 1);
+ return 1;
+***************
+*** 1776,1784 ****
+ size_t i, l = 0;
+ const char *s = lua_tolstring(L, 1, &l);
+
+! ga_grow(&b->bv_ga, l);
+! for (i = 0; i < l; ++i)
+! ga_append(&b->bv_ga, s[i]);
+ }
+ }
+ return 1;
+--- 1776,1784 ----
+ size_t i, l = 0;
+ const char *s = lua_tolstring(L, 1, &l);
+
+! if (ga_grow(&b->bv_ga, l) == OK)
+! for (i = 0; i < l; ++i)
+! ga_append(&b->bv_ga, s[i]);
+ }
+ }
+ return 1;
+*** ../vim-8.1.1053/src/version.c 2019-03-26 00:31:17.221047734 +0100
+--- src/version.c 2019-03-26 21:41:01.734718469 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1054,
+ /**/
+
+--
+I'm writing a book. I've got the page numbers done.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1055 b/data/vim/patches/8.1.1055
new file mode 100644
index 000000000..cc2c58b4e
--- /dev/null
+++ b/data/vim/patches/8.1.1055
@@ -0,0 +1,301 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1055
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1055
+Problem: CTRL-G U in Insert mode doesn't work to avoid splitting the undo
+ sequence for shift-left and shift-right.
+Solution: Also check dont_sync_undo for shifted cursor keys. (Christian
+ Brabandt)
+Files: src/edit.c, src/testdir/test_mapping.vim
+
+
+*** ../vim-8.1.1054/src/edit.c 2019-03-21 21:45:30.875282175 +0100
+--- src/edit.c 2019-03-26 21:58:45.370578667 +0100
+***************
+*** 236,246 ****
+ #if defined(FEAT_GUI_TABLINE) || defined(PROTO)
+ static void ins_tabline(int c);
+ #endif
+! static void ins_left(int end_change);
+ static void ins_home(int c);
+ static void ins_end(int c);
+ static void ins_s_left(void);
+! static void ins_right(int end_change);
+ static void ins_s_right(void);
+ static void ins_up(int startcol);
+ static void ins_pageup(void);
+--- 236,246 ----
+ #if defined(FEAT_GUI_TABLINE) || defined(PROTO)
+ static void ins_tabline(int c);
+ #endif
+! static void ins_left(void);
+ static void ins_home(int c);
+ static void ins_end(int c);
+ static void ins_s_left(void);
+! static void ins_right(void);
+ static void ins_s_right(void);
+ static void ins_up(int startcol);
+ static void ins_pageup(void);
+***************
+*** 290,299 ****
+ char. Set when edit() is called.
+ after that arrow_used is used. */
+
+! static int did_add_space = FALSE; /* auto_format() added an extra space
+! under the cursor */
+! static int dont_sync_undo = FALSE; /* CTRL-G U prevents syncing undo for
+! the next left/right cursor */
+
+ /*
+ * edit(): Start inserting text.
+--- 290,299 ----
+ char. Set when edit() is called.
+ after that arrow_used is used. */
+
+! static int did_add_space = FALSE; // auto_format() added an extra space
+! // under the cursor
+! static int dont_sync_undo = FALSE; // CTRL-G U prevents syncing undo for
+! // the next left/right cursor key
+
+ /*
+ * edit(): Start inserting text.
+***************
+*** 1284,1290 ****
+ if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL))
+ ins_s_left();
+ else
+! ins_left(dont_sync_undo == FALSE);
+ break;
+
+ case K_S_LEFT: /* <S-Left> */
+--- 1284,1290 ----
+ if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL))
+ ins_s_left();
+ else
+! ins_left();
+ break;
+
+ case K_S_LEFT: /* <S-Left> */
+***************
+*** 1296,1302 ****
+ if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL))
+ ins_s_right();
+ else
+! ins_right(dont_sync_undo == FALSE);
+ break;
+
+ case K_S_RIGHT: /* <S-Right> */
+--- 1296,1302 ----
+ if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL))
+ ins_s_right();
+ else
+! ins_right();
+ break;
+
+ case K_S_RIGHT: /* <S-Right> */
+***************
+*** 9291,9300 ****
+ #endif
+
+ static void
+! ins_left(
+! int end_change) /* end undoable change */
+ {
+ pos_T tpos;
+
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_HOR) && KeyTyped)
+--- 9291,9300 ----
+ #endif
+
+ static void
+! ins_left(void)
+ {
+ pos_T tpos;
++ int end_change = dont_sync_undo == FALSE; // end undoable change
+
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_HOR) && KeyTyped)
+***************
+*** 9378,9385 ****
+ }
+
+ static void
+! ins_s_left(void)
+ {
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_HOR) && KeyTyped)
+ foldOpenCursor();
+--- 9378,9386 ----
+ }
+
+ static void
+! ins_s_left()
+ {
++ int end_change = dont_sync_undo == FALSE; // end undoable change
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_HOR) && KeyTyped)
+ foldOpenCursor();
+***************
+*** 9387,9404 ****
+ undisplay_dollar();
+ if (curwin->w_cursor.lnum > 1 || curwin->w_cursor.col > 0)
+ {
+! start_arrow(&curwin->w_cursor);
+ (void)bck_word(1L, FALSE, FALSE);
+ curwin->w_set_curswant = TRUE;
+ }
+ else
+ vim_beep(BO_CRSR);
+ }
+
+ static void
+! ins_right(
+! int end_change) /* end undoable change */
+ {
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_HOR) && KeyTyped)
+ foldOpenCursor();
+--- 9388,9409 ----
+ undisplay_dollar();
+ if (curwin->w_cursor.lnum > 1 || curwin->w_cursor.col > 0)
+ {
+! start_arrow_with_change(&curwin->w_cursor, end_change);
+! if (!end_change)
+! AppendCharToRedobuff(K_S_LEFT);
+ (void)bck_word(1L, FALSE, FALSE);
+ curwin->w_set_curswant = TRUE;
+ }
+ else
+ vim_beep(BO_CRSR);
++ dont_sync_undo = FALSE;
+ }
+
+ static void
+! ins_right(void)
+ {
++ int end_change = dont_sync_undo == FALSE; // end undoable change
++
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_HOR) && KeyTyped)
+ foldOpenCursor();
+***************
+*** 9442,9449 ****
+ }
+
+ static void
+! ins_s_right(void)
+ {
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_HOR) && KeyTyped)
+ foldOpenCursor();
+--- 9447,9455 ----
+ }
+
+ static void
+! ins_s_right()
+ {
++ int end_change = dont_sync_undo == FALSE; // end undoable change
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_HOR) && KeyTyped)
+ foldOpenCursor();
+***************
+*** 9452,9463 ****
+ if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count
+ || gchar_cursor() != NUL)
+ {
+! start_arrow(&curwin->w_cursor);
+ (void)fwd_word(1L, FALSE, 0);
+ curwin->w_set_curswant = TRUE;
+ }
+ else
+ vim_beep(BO_CRSR);
+ }
+
+ static void
+--- 9458,9472 ----
+ if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count
+ || gchar_cursor() != NUL)
+ {
+! start_arrow_with_change(&curwin->w_cursor, end_change);
+! if (!end_change)
+! AppendCharToRedobuff(K_S_RIGHT);
+ (void)fwd_word(1L, FALSE, 0);
+ curwin->w_set_curswant = TRUE;
+ }
+ else
+ vim_beep(BO_CRSR);
++ dont_sync_undo = FALSE;
+ }
+
+ static void
+*** ../vim-8.1.1054/src/testdir/test_mapping.vim 2019-01-30 22:01:36.982854408 +0100
+--- src/testdir/test_mapping.vim 2019-03-26 21:53:59.040601292 +0100
+***************
+*** 140,148 ****
+ imapclear
+ endfunc
+
+ " This isn't actually testing a mapping, but similar use of CTRL-G U as above.
+ func Test_break_undo()
+! :set whichwrap=<,>,[,]
+ call feedkeys("G4o2k", "xt")
+ exe ":norm! iTest3: text with a (parenthesis here\<C-G>U\<Right>new line here\<esc>\<up>\<up>."
+ call assert_equal('new line here', getline(line('$') - 3))
+--- 140,171 ----
+ imapclear
+ endfunc
+
++ func Test_map_cursor_ctrl_gU()
++ " <c-g>U<cursor> works only within a single line
++ nnoremap c<* *Ncgn<C-r>"<C-G>U<S-Left>
++ call setline(1, ['foo', 'foobar', '', 'foo'])
++ call cursor(1,2)
++ call feedkeys("c<*PREFIX\<esc>.", 'xt')
++ call assert_equal(['PREFIXfoo', 'foobar', '', 'PREFIXfoo'], getline(1,'$'))
++ " break undo manually
++ set ul=1000
++ exe ":norm! uu"
++ call assert_equal(['foo', 'foobar', '', 'foo'], getline(1,'$'))
++
++ " Test that it does not work if the cursor moves to the previous line
++ " 2 times <S-Left> move to the previous line
++ nnoremap c<* *Ncgn<C-r>"<C-G>U<S-Left><C-G>U<S-Left>
++ call setline(1, ['', ' foo', 'foobar', '', 'foo'])
++ call cursor(2,3)
++ call feedkeys("c<*PREFIX\<esc>.", 'xt')
++ call assert_equal(['PREFIXPREFIX', ' foo', 'foobar', '', 'foo'], getline(1,'$'))
++ nmapclear
++ endfunc
++
++
+ " This isn't actually testing a mapping, but similar use of CTRL-G U as above.
+ func Test_break_undo()
+! set whichwrap=<,>,[,]
+ call feedkeys("G4o2k", "xt")
+ exe ":norm! iTest3: text with a (parenthesis here\<C-G>U\<Right>new line here\<esc>\<up>\<up>."
+ call assert_equal('new line here', getline(line('$') - 3))
+*** ../vim-8.1.1054/src/version.c 2019-03-26 21:44:16.825047310 +0100
+--- src/version.c 2019-03-26 22:45:04.210432805 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1055,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+127. You bring your laptop and cellular phone to church.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1056 b/data/vim/patches/8.1.1056
new file mode 100644
index 000000000..c9118a0ca
--- /dev/null
+++ b/data/vim/patches/8.1.1056
@@ -0,0 +1,1973 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1056
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1056
+Problem: No eval function for Ruby.
+Solution: Add rubyeval(). (Ozaki Kiichi, closes #4152)
+Files: runtime/doc/eval.txt, runtime/doc/if_ruby.txt, src/evalfunc.c,
+ src/if_ruby.c, src/proto/if_ruby.pro, src/testdir/test_ruby.vim
+
+
+*** ../vim-8.1.1055/runtime/doc/eval.txt 2019-03-23 14:23:02.134361686 +0100
+--- runtime/doc/eval.txt 2019-03-26 22:40:42.456751899 +0100
+***************
+*** 2486,2499 ****
+ remote_send({server}, {string} [, {idvar}])
+ String send key sequence
+ remote_startserver({name}) none become server {name}
+! String send key sequence
+! remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
+ remove({dict}, {key}) any remove entry {key} from {dict}
+ rename({from}, {to}) Number rename (move) file from {from} to {to}
+ repeat({expr}, {count}) String repeat {expr} {count} times
+ resolve({filename}) String get filename a shortcut points to
+ reverse({list}) List reverse {list} in-place
+ round({expr}) Float round off {expr}
+ screenattr({row}, {col}) Number attribute at screen position
+ screenchar({row}, {col}) Number character at screen position
+ screencol() Number current cursor column
+--- 2511,2527 ----
+ remote_send({server}, {string} [, {idvar}])
+ String send key sequence
+ remote_startserver({name}) none become server {name}
+! remove({list}, {idx} [, {end}]) any/List
+! remove items {idx}-{end} from {list}
+! remove({blob}, {idx} [, {end}]) Number/Blob
+! remove bytes {idx}-{end} from {blob}
+ remove({dict}, {key}) any remove entry {key} from {dict}
+ rename({from}, {to}) Number rename (move) file from {from} to {to}
+ repeat({expr}, {count}) String repeat {expr} {count} times
+ resolve({filename}) String get filename a shortcut points to
+ reverse({list}) List reverse {list} in-place
+ round({expr}) Float round off {expr}
++ rubyeval({expr}) any evaluate |Ruby| expression
+ screenattr({row}, {col}) Number attribute at screen position
+ screenchar({row}, {col}) Number character at screen position
+ screencol() Number current cursor column
+***************
+*** 7379,7384 ****
+--- 7433,7449 ----
+ < -5.0
+ {only available when compiled with the |+float| feature}
+
++ rubyeval({expr}) *rubyeval()*
++ Evaluate Ruby expression {expr} and return its result
++ converted to Vim data structures.
++ Numbers, floats and strings are returned as they are (strings
++ are copied though).
++ Arrays are represented as Vim |List| type.
++ Hashes are represented as Vim |Dictionary| type.
++ Other objects are represented as strings resulted from their
++ "Object#to_s" method.
++ {only available when compiled with the |+ruby| feature}
++
+ screenattr({row}, {col}) *screenattr()*
+ Like |screenchar()|, but return the attribute. This is a rather
+ arbitrary number that can only be used to compare to the
+*** ../vim-8.1.1055/runtime/doc/if_ruby.txt 2019-01-12 22:47:01.256088105 +0100
+--- runtime/doc/if_ruby.txt 2019-03-26 22:40:42.456751899 +0100
+***************
+*** 11,17 ****
+ 3. Vim::Buffer objects |ruby-buffer|
+ 4. Vim::Window objects |ruby-window|
+ 5. Global variables |ruby-globals|
+! 6. Dynamic loading |ruby-dynamic|
+
+ {Vi does not have any of these commands}
+ *E266* *E267* *E268* *E269* *E270* *E271* *E272* *E273*
+--- 11,18 ----
+ 3. Vim::Buffer objects |ruby-buffer|
+ 4. Vim::Window objects |ruby-window|
+ 5. Global variables |ruby-globals|
+! 6. rubyeval() Vim function |ruby-rubyeval|
+! 7. Dynamic loading |ruby-dynamic|
+
+ {Vi does not have any of these commands}
+ *E266* *E267* *E268* *E269* *E270* *E271* *E272* *E273*
+***************
+*** 112,118 ****
+
+ *ruby-blob*
+ Vim::blob({arg})
+! Return Blob literal string from {arg}.
+
+ *ruby-set_option*
+ Vim::set_option({arg})
+--- 113,119 ----
+
+ *ruby-blob*
+ Vim::blob({arg})
+! Return |Blob| literal string from {arg}.
+
+ *ruby-set_option*
+ Vim::set_option({arg})
+***************
+*** 198,204 ****
+ $curbuf The current buffer object.
+
+ ==============================================================================
+! 6. Dynamic loading *ruby-dynamic*
+
+ On MS-Windows and Unix the Ruby library can be loaded dynamically. The
+ |:version| output then includes |+ruby/dyn|.
+--- 199,214 ----
+ $curbuf The current buffer object.
+
+ ==============================================================================
+! 6. rubyeval() Vim function *ruby-rubyeval*
+!
+! To facilitate bi-directional interface, you can use |rubyeval()| function to
+! evaluate Ruby expressions and pass their values to Vim script.
+!
+! The Ruby value "true", "false" and "nil" are converted to v:true, v:false and
+! v:null, respectively.
+!
+! ==============================================================================
+! 7. Dynamic loading *ruby-dynamic*
+
+ On MS-Windows and Unix the Ruby library can be loaded dynamically. The
+ |:version| output then includes |+ruby/dyn|.
+*** ../vim-8.1.1055/src/evalfunc.c 2019-03-23 14:23:02.138361658 +0100
+--- src/evalfunc.c 2019-03-26 22:40:42.456751899 +0100
+***************
+*** 338,343 ****
+--- 338,346 ----
+ #ifdef FEAT_FLOAT
+ static void f_round(typval_T *argvars, typval_T *rettv);
+ #endif
++ #ifdef FEAT_RUBY
++ static void f_rubyeval(typval_T *argvars, typval_T *rettv);
++ #endif
+ static void f_screenattr(typval_T *argvars, typval_T *rettv);
+ static void f_screenchar(typval_T *argvars, typval_T *rettv);
+ static void f_screencol(typval_T *argvars, typval_T *rettv);
+***************
+*** 829,834 ****
+--- 832,840 ----
+ #ifdef FEAT_FLOAT
+ {"round", 1, 1, f_round},
+ #endif
++ #ifdef FEAT_RUBY
++ {"rubyeval", 1, 1, f_rubyeval},
++ #endif
+ {"screenattr", 2, 2, f_screenattr},
+ {"screenchar", 2, 2, f_screenchar},
+ {"screencol", 0, 0, f_screencol},
+***************
+*** 10351,10356 ****
+--- 10357,10377 ----
+ }
+ #endif
+
++ #ifdef FEAT_RUBY
++ /*
++ * "rubyeval()" function
++ */
++ static void
++ f_rubyeval(typval_T *argvars, typval_T *rettv)
++ {
++ char_u *str;
++ char_u buf[NUMBUFLEN];
++
++ str = tv_get_string_buf(&argvars[0], buf);
++ do_rubyeval(str, rettv);
++ }
++ #endif
++
+ /*
+ * "screenattr()" function
+ */
+*** ../vim-8.1.1055/src/if_ruby.c 2019-02-23 14:22:59.567653374 +0100
+--- src/if_ruby.c 2019-03-26 22:40:42.456751899 +0100
+***************
+*** 205,210 ****
+--- 205,211 ----
+ static void error_print(int);
+ static void ruby_io_init(void);
+ static void ruby_vim_init(void);
++ static int ruby_convert_to_vim_value(VALUE val, typval_T *rettv);
+
+ #if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK)
+ # if defined(__ia64) && !defined(ruby_init_stack)
+***************
+*** 259,264 ****
+--- 260,266 ----
+ # endif
+ # define rb_global_variable dll_rb_global_variable
+ # define rb_hash_aset dll_rb_hash_aset
++ # define rb_hash_foreach dll_rb_hash_foreach
+ # define rb_hash_new dll_rb_hash_new
+ # define rb_inspect dll_rb_inspect
+ # define rb_int2inum dll_rb_int2inum
+***************
+*** 275,280 ****
+--- 277,283 ----
+ # endif
+ # define rb_num2uint dll_rb_num2uint
+ # endif
++ # define rb_num2dbl dll_rb_num2dbl
+ # define rb_lastline_get dll_rb_lastline_get
+ # define rb_lastline_set dll_rb_lastline_set
+ # define rb_protect dll_rb_protect
+***************
+*** 409,414 ****
+--- 412,418 ----
+ # endif
+ static void (*dll_rb_global_variable) (VALUE*);
+ static VALUE (*dll_rb_hash_aset) (VALUE, VALUE, VALUE);
++ static VALUE (*dll_rb_hash_foreach) (VALUE, int (*)(VALUE, VALUE, VALUE), VALUE);
+ static VALUE (*dll_rb_hash_new) (void);
+ static VALUE (*dll_rb_inspect) (VALUE);
+ static VALUE (*dll_rb_int2inum) (long);
+***************
+*** 418,423 ****
+--- 422,428 ----
+ static long (*dll_rb_num2int) (VALUE);
+ static unsigned long (*dll_rb_num2uint) (VALUE);
+ # endif
++ static double (*dll_rb_num2dbl) (VALUE);
+ static VALUE (*dll_rb_lastline_get) (void);
+ static void (*dll_rb_lastline_set) (VALUE);
+ static VALUE (*dll_rb_protect) (VALUE (*)(VALUE), VALUE, int*);
+***************
+*** 501,542 ****
+
+ # if defined(RUBY19_OR_LATER) && !defined(PROTO)
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 22
+! long rb_num2long_stub(VALUE x)
+ # else
+! SIGNED_VALUE rb_num2long_stub(VALUE x)
+ # endif
+ {
+ return dll_rb_num2long(x);
+ }
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 26
+! VALUE rb_int2big_stub(intptr_t x)
+ # else
+! VALUE rb_int2big_stub(SIGNED_VALUE x)
+ # endif
+ {
+ return dll_rb_int2big(x);
+ }
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
+ && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+! long rb_fix2int_stub(VALUE x)
+ {
+ return dll_rb_fix2int(x);
+ }
+! long rb_num2int_stub(VALUE x)
+ {
+ return dll_rb_num2int(x);
+ }
+ # endif
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
+! VALUE
+ rb_float_new_in_heap(double d)
+ {
+ return dll_rb_float_new(d);
+ }
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 22
+! unsigned long rb_num2ulong(VALUE x)
+ # else
+! VALUE rb_num2ulong(VALUE x)
+ # endif
+ {
+ return (long)RSHIFT((SIGNED_VALUE)(x),1);
+--- 506,555 ----
+
+ # if defined(RUBY19_OR_LATER) && !defined(PROTO)
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 22
+! long
+! rb_num2long_stub(VALUE x)
+ # else
+! SIGNED_VALUE
+! rb_num2long_stub(VALUE x)
+ # endif
+ {
+ return dll_rb_num2long(x);
+ }
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 26
+! VALUE
+! rb_int2big_stub(intptr_t x)
+ # else
+! VALUE
+! rb_int2big_stub(SIGNED_VALUE x)
+ # endif
+ {
+ return dll_rb_int2big(x);
+ }
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
+ && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+! long
+! rb_fix2int_stub(VALUE x)
+ {
+ return dll_rb_fix2int(x);
+ }
+! long
+! rb_num2int_stub(VALUE x)
+ {
+ return dll_rb_num2int(x);
+ }
+ # endif
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
+! VALUE
+ rb_float_new_in_heap(double d)
+ {
+ return dll_rb_float_new(d);
+ }
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 22
+! unsigned long
+! rb_num2ulong(VALUE x)
+ # else
+! VALUE
+! rb_num2ulong(VALUE x)
+ # endif
+ {
+ return (long)RSHIFT((SIGNED_VALUE)(x),1);
+***************
+*** 547,558 ****
+ /* Do not generate a prototype here, VALUE isn't always defined. */
+ # if defined(USE_RGENGC) && USE_RGENGC && !defined(PROTO)
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER == 21
+! void rb_gc_writebarrier_unprotect_promoted_stub(VALUE obj)
+ {
+ dll_rb_gc_writebarrier_unprotect_promoted(obj);
+ }
+ # else
+! void rb_gc_writebarrier_unprotect_stub(VALUE obj)
+ {
+ dll_rb_gc_writebarrier_unprotect(obj);
+ }
+--- 560,573 ----
+ /* Do not generate a prototype here, VALUE isn't always defined. */
+ # if defined(USE_RGENGC) && USE_RGENGC && !defined(PROTO)
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER == 21
+! void
+! rb_gc_writebarrier_unprotect_promoted_stub(VALUE obj)
+ {
+ dll_rb_gc_writebarrier_unprotect_promoted(obj);
+ }
+ # else
+! void
+! rb_gc_writebarrier_unprotect_stub(VALUE obj)
+ {
+ dll_rb_gc_writebarrier_unprotect(obj);
+ }
+***************
+*** 560,566 ****
+ # endif
+
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 26
+! void rb_ary_detransient_stub(VALUE x)
+ {
+ dll_rb_ary_detransient(x);
+ }
+--- 575,582 ----
+ # endif
+
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 26
+! void
+! rb_ary_detransient_stub(VALUE x)
+ {
+ dll_rb_ary_detransient(x);
+ }
+***************
+*** 629,634 ****
+--- 645,651 ----
+ # endif
+ {"rb_global_variable", (RUBY_PROC*)&dll_rb_global_variable},
+ {"rb_hash_aset", (RUBY_PROC*)&dll_rb_hash_aset},
++ {"rb_hash_foreach", (RUBY_PROC*)&dll_rb_hash_foreach},
+ {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
+ {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
+ {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
+***************
+*** 638,643 ****
+--- 655,661 ----
+ {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
+ {"rb_num2uint", (RUBY_PROC*)&dll_rb_num2uint},
+ # endif
++ {"rb_num2dbl", (RUBY_PROC*)&dll_rb_num2dbl},
+ {"rb_lastline_get", (RUBY_PROC*)&dll_rb_lastline_get},
+ {"rb_lastline_set", (RUBY_PROC*)&dll_rb_lastline_set},
+ {"rb_protect", (RUBY_PROC*)&dll_rb_protect},
+***************
+*** 789,795 ****
+ #endif
+ }
+
+! void ex_ruby(exarg_T *eap)
+ {
+ int state;
+ char *script = NULL;
+--- 807,814 ----
+ #endif
+ }
+
+! void
+! ex_ruby(exarg_T *eap)
+ {
+ int state;
+ char *script = NULL;
+***************
+*** 860,866 ****
+ return rb_eval_string_protect(str, state);
+ }
+
+! void ex_rubydo(exarg_T *eap)
+ {
+ int state;
+ linenr_T i;
+--- 879,886 ----
+ return rb_eval_string_protect(str, state);
+ }
+
+! void
+! ex_rubydo(exarg_T *eap)
+ {
+ int state;
+ linenr_T i;
+***************
+*** 906,918 ****
+ }
+ }
+
+! static VALUE rb_load_wrap(VALUE file_to_load)
+ {
+ rb_load(file_to_load, 0);
+ return Qnil;
+ }
+
+! void ex_rubyfile(exarg_T *eap)
+ {
+ int state;
+
+--- 926,940 ----
+ }
+ }
+
+! static VALUE
+! rb_load_wrap(VALUE file_to_load)
+ {
+ rb_load(file_to_load, 0);
+ return Qnil;
+ }
+
+! void
+! ex_rubyfile(exarg_T *eap)
+ {
+ int state;
+
+***************
+*** 925,931 ****
+ }
+ }
+
+! void ruby_buffer_free(buf_T *buf)
+ {
+ if (buf->b_ruby_ref)
+ {
+--- 947,954 ----
+ }
+ }
+
+! void
+! ruby_buffer_free(buf_T *buf)
+ {
+ if (buf->b_ruby_ref)
+ {
+***************
+*** 934,940 ****
+ }
+ }
+
+! void ruby_window_free(win_T *win)
+ {
+ if (win->w_ruby_ref)
+ {
+--- 957,964 ----
+ }
+ }
+
+! void
+! ruby_window_free(win_T *win)
+ {
+ if (win->w_ruby_ref)
+ {
+***************
+*** 943,949 ****
+ }
+ }
+
+! static int ensure_ruby_initialized(void)
+ {
+ if (!ruby_initialized)
+ {
+--- 967,974 ----
+ }
+ }
+
+! static int
+! ensure_ruby_initialized(void)
+ {
+ if (!ruby_initialized)
+ {
+***************
+*** 993,999 ****
+ return ruby_initialized;
+ }
+
+! static void error_print(int state)
+ {
+ #if !defined(DYNAMIC_RUBY) && !defined(RUBY19_OR_LATER)
+ RUBYEXTERN VALUE ruby_errinfo;
+--- 1018,1025 ----
+ return ruby_initialized;
+ }
+
+! static void
+! error_print(int state)
+ {
+ #if !defined(DYNAMIC_RUBY) && !defined(RUBY19_OR_LATER)
+ RUBYEXTERN VALUE ruby_errinfo;
+***************
+*** 1018,1083 ****
+
+ switch (state)
+ {
+! case TAG_RETURN:
+! emsg(_("E267: unexpected return"));
+! break;
+! case TAG_NEXT:
+! emsg(_("E268: unexpected next"));
+! break;
+! case TAG_BREAK:
+! emsg(_("E269: unexpected break"));
+! break;
+! case TAG_REDO:
+! emsg(_("E270: unexpected redo"));
+! break;
+! case TAG_RETRY:
+! emsg(_("E271: retry outside of rescue clause"));
+! break;
+! 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"));
+! }
+! else
+! {
+! VALUE epath;
+! char *p;
+
+! epath = rb_class_path(eclass);
+! vim_snprintf(buff, BUFSIZ, "%s: %s",
+! RSTRING_PTR(epath), RSTRING_PTR(einfo));
+! p = strchr(buff, '\n');
+! 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(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(RSTRING_PTR(RARRAY_PTR(bt)[i]), attr);
+! # endif
+! break;
+! default:
+! vim_snprintf(buff, BUFSIZ, _("E273: unknown longjmp status %d"), state);
+! emsg(buff);
+! break;
+ }
+ }
+
+! static VALUE vim_message(VALUE self UNUSED, VALUE str)
+ {
+ char *buff, *p;
+
+--- 1044,1110 ----
+
+ switch (state)
+ {
+! case TAG_RETURN:
+! emsg(_("E267: unexpected return"));
+! break;
+! case TAG_NEXT:
+! emsg(_("E268: unexpected next"));
+! break;
+! case TAG_BREAK:
+! emsg(_("E269: unexpected break"));
+! break;
+! case TAG_REDO:
+! emsg(_("E270: unexpected redo"));
+! break;
+! case TAG_RETRY:
+! emsg(_("E271: retry outside of rescue clause"));
+! break;
+! 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"));
+! }
+! else
+! {
+! VALUE epath;
+! char *p;
+
+! epath = rb_class_path(eclass);
+! vim_snprintf(buff, BUFSIZ, "%s: %s",
+! RSTRING_PTR(epath), RSTRING_PTR(einfo));
+! p = strchr(buff, '\n');
+! 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(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(RSTRING_PTR(RARRAY_PTR(bt)[i]), attr);
+! # endif
+! break;
+! default:
+! vim_snprintf(buff, BUFSIZ, _("E273: unknown longjmp status %d"), state);
+! emsg(buff);
+! break;
+ }
+ }
+
+! static VALUE
+! vim_message(VALUE self UNUSED, VALUE str)
+ {
+ char *buff, *p;
+
+***************
+*** 1098,1118 ****
+ return Qnil;
+ }
+
+! static VALUE vim_set_option(VALUE self UNUSED, VALUE str)
+ {
+ do_set((char_u *)StringValuePtr(str), 0);
+ update_screen(NOT_VALID);
+ return Qnil;
+ }
+
+! static VALUE vim_command(VALUE self UNUSED, VALUE str)
+ {
+ do_cmdline_cmd((char_u *)StringValuePtr(str));
+ return Qnil;
+ }
+
+ #ifdef FEAT_EVAL
+! static VALUE vim_to_ruby(typval_T *tv)
+ {
+ VALUE result = Qnil;
+
+--- 1125,1148 ----
+ return Qnil;
+ }
+
+! static VALUE
+! vim_set_option(VALUE self UNUSED, VALUE str)
+ {
+ do_set((char_u *)StringValuePtr(str), 0);
+ update_screen(NOT_VALID);
+ return Qnil;
+ }
+
+! static VALUE
+! vim_command(VALUE self UNUSED, VALUE str)
+ {
+ do_cmdline_cmd((char_u *)StringValuePtr(str));
+ return Qnil;
+ }
+
+ #ifdef FEAT_EVAL
+! static VALUE
+! vim_to_ruby(typval_T *tv)
+ {
+ VALUE result = Qnil;
+
+***************
+*** 1188,1194 ****
+ }
+ #endif
+
+! static VALUE vim_evaluate(VALUE self UNUSED, VALUE str)
+ {
+ #ifdef FEAT_EVAL
+ typval_T *tv;
+--- 1218,1225 ----
+ }
+ #endif
+
+! static VALUE
+! vim_evaluate(VALUE self UNUSED, VALUE str)
+ {
+ #ifdef FEAT_EVAL
+ typval_T *tv;
+***************
+*** 1221,1233 ****
+ # endif
+ };
+
+! static size_t buffer_dsize(const void *buf UNUSED)
+ {
+ return sizeof(buf_T);
+ }
+ #endif
+
+! static VALUE buffer_new(buf_T *buf)
+ {
+ if (buf->b_ruby_ref)
+ {
+--- 1252,1266 ----
+ # endif
+ };
+
+! static size_t
+! buffer_dsize(const void *buf UNUSED)
+ {
+ return sizeof(buf_T);
+ }
+ #endif
+
+! static VALUE
+! buffer_new(buf_T *buf)
+ {
+ if (buf->b_ruby_ref)
+ {
+***************
+*** 1246,1252 ****
+ }
+ }
+
+! static buf_T *get_buf(VALUE obj)
+ {
+ buf_T *buf;
+
+--- 1279,1286 ----
+ }
+ }
+
+! static buf_T *
+! get_buf(VALUE obj)
+ {
+ buf_T *buf;
+
+***************
+*** 1260,1266 ****
+ return buf;
+ }
+
+! static VALUE vim_blob(VALUE self UNUSED, VALUE str)
+ {
+ VALUE result = rb_str_new("0z", 2);
+ char buf[4];
+--- 1294,1301 ----
+ return buf;
+ }
+
+! static VALUE
+! vim_blob(VALUE self UNUSED, VALUE str)
+ {
+ VALUE result = rb_str_new("0z", 2);
+ char buf[4];
+***************
+*** 1273,1284 ****
+ return result;
+ }
+
+! static VALUE buffer_s_current(void)
+ {
+ return buffer_new(curbuf);
+ }
+
+! static VALUE buffer_s_count(void)
+ {
+ buf_T *b;
+ int n = 0;
+--- 1308,1321 ----
+ return result;
+ }
+
+! static VALUE
+! buffer_s_current(void)
+ {
+ return buffer_new(curbuf);
+ }
+
+! static VALUE
+! buffer_s_count(void)
+ {
+ buf_T *b;
+ int n = 0;
+***************
+*** 1294,1300 ****
+ return INT2NUM(n);
+ }
+
+! static VALUE buffer_s_aref(VALUE self UNUSED, VALUE num)
+ {
+ buf_T *b;
+ int n = NUM2INT(num);
+--- 1331,1338 ----
+ return INT2NUM(n);
+ }
+
+! static VALUE
+! buffer_s_aref(VALUE self UNUSED, VALUE num)
+ {
+ buf_T *b;
+ int n = NUM2INT(num);
+***************
+*** 1314,1348 ****
+ return Qnil;
+ }
+
+! static VALUE buffer_name(VALUE self)
+ {
+ buf_T *buf = get_buf(self);
+
+ return buf->b_ffname ? rb_str_new2((char *)buf->b_ffname) : Qnil;
+ }
+
+! static VALUE buffer_number(VALUE self)
+ {
+ buf_T *buf = get_buf(self);
+
+ return INT2NUM(buf->b_fnum);
+ }
+
+! static VALUE buffer_count(VALUE self)
+ {
+ buf_T *buf = get_buf(self);
+
+ return INT2NUM(buf->b_ml.ml_line_count);
+ }
+
+! static VALUE get_buffer_line(buf_T *buf, linenr_T n)
+ {
+ if (n <= 0 || n > buf->b_ml.ml_line_count)
+ rb_raise(rb_eIndexError, "line number %ld out of range", (long)n);
+ return vim_str2rb_enc_str((char *)ml_get_buf(buf, n, FALSE));
+ }
+
+! static VALUE buffer_aref(VALUE self, VALUE num)
+ {
+ buf_T *buf = get_buf(self);
+
+--- 1352,1391 ----
+ return Qnil;
+ }
+
+! static VALUE
+! buffer_name(VALUE self)
+ {
+ buf_T *buf = get_buf(self);
+
+ return buf->b_ffname ? rb_str_new2((char *)buf->b_ffname) : Qnil;
+ }
+
+! static VALUE
+! buffer_number(VALUE self)
+ {
+ buf_T *buf = get_buf(self);
+
+ return INT2NUM(buf->b_fnum);
+ }
+
+! static VALUE
+! buffer_count(VALUE self)
+ {
+ buf_T *buf = get_buf(self);
+
+ return INT2NUM(buf->b_ml.ml_line_count);
+ }
+
+! static VALUE
+! get_buffer_line(buf_T *buf, linenr_T n)
+ {
+ if (n <= 0 || n > buf->b_ml.ml_line_count)
+ rb_raise(rb_eIndexError, "line number %ld out of range", (long)n);
+ return vim_str2rb_enc_str((char *)ml_get_buf(buf, n, FALSE));
+ }
+
+! static VALUE
+! buffer_aref(VALUE self, VALUE num)
+ {
+ buf_T *buf = get_buf(self);
+
+***************
+*** 1351,1357 ****
+ return Qnil; /* For stop warning */
+ }
+
+! static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str)
+ {
+ char *line = StringValuePtr(str);
+ aco_save_T aco;
+--- 1394,1401 ----
+ return Qnil; /* For stop warning */
+ }
+
+! static VALUE
+! set_buffer_line(buf_T *buf, linenr_T n, VALUE str)
+ {
+ char *line = StringValuePtr(str);
+ aco_save_T aco;
+***************
+*** 1383,1389 ****
+ return str;
+ }
+
+! static VALUE buffer_aset(VALUE self, VALUE num, VALUE str)
+ {
+ buf_T *buf = get_buf(self);
+
+--- 1427,1434 ----
+ return str;
+ }
+
+! static VALUE
+! buffer_aset(VALUE self, VALUE num, VALUE str)
+ {
+ buf_T *buf = get_buf(self);
+
+***************
+*** 1392,1398 ****
+ return str;
+ }
+
+! static VALUE buffer_delete(VALUE self, VALUE num)
+ {
+ buf_T *buf = get_buf(self);
+ long n = NUM2LONG(num);
+--- 1437,1444 ----
+ return str;
+ }
+
+! static VALUE
+! buffer_delete(VALUE self, VALUE num)
+ {
+ buf_T *buf = get_buf(self);
+ long n = NUM2LONG(num);
+***************
+*** 1427,1433 ****
+ return Qnil;
+ }
+
+! static VALUE buffer_append(VALUE self, VALUE num, VALUE str)
+ {
+ buf_T *buf = get_buf(self);
+ char *line = StringValuePtr(str);
+--- 1473,1480 ----
+ return Qnil;
+ }
+
+! static VALUE
+! buffer_append(VALUE self, VALUE num, VALUE str)
+ {
+ buf_T *buf = get_buf(self);
+ char *line = StringValuePtr(str);
+***************
+*** 1479,1491 ****
+ # endif
+ };
+
+! static size_t window_dsize(const void *win UNUSED)
+ {
+ return sizeof(win_T);
+ }
+ #endif
+
+! static VALUE window_new(win_T *win)
+ {
+ if (win->w_ruby_ref)
+ {
+--- 1526,1540 ----
+ # endif
+ };
+
+! static size_t
+! window_dsize(const void *win UNUSED)
+ {
+ return sizeof(win_T);
+ }
+ #endif
+
+! static VALUE
+! window_new(win_T *win)
+ {
+ if (win->w_ruby_ref)
+ {
+***************
+*** 1504,1510 ****
+ }
+ }
+
+! static win_T *get_win(VALUE obj)
+ {
+ win_T *win;
+
+--- 1553,1560 ----
+ }
+ }
+
+! static win_T *
+! get_win(VALUE obj)
+ {
+ win_T *win;
+
+***************
+*** 1518,1524 ****
+ return win;
+ }
+
+! static VALUE window_s_current(void)
+ {
+ return window_new(curwin);
+ }
+--- 1568,1575 ----
+ return win;
+ }
+
+! static VALUE
+! window_s_current(void)
+ {
+ return window_new(curwin);
+ }
+***************
+*** 1527,1550 ****
+ * Added line manipulation functions
+ * SegPhault - 03/07/05
+ */
+! static VALUE line_s_current(void)
+ {
+ return get_buffer_line(curbuf, curwin->w_cursor.lnum);
+ }
+
+! static VALUE set_current_line(VALUE self UNUSED, VALUE str)
+ {
+ return set_buffer_line(curbuf, curwin->w_cursor.lnum, str);
+ }
+
+! static VALUE current_line_number(void)
+ {
+ return INT2FIX((int)curwin->w_cursor.lnum);
+ }
+
+!
+!
+! static VALUE window_s_count(void)
+ {
+ win_T *w;
+ int n = 0;
+--- 1578,1603 ----
+ * Added line manipulation functions
+ * SegPhault - 03/07/05
+ */
+! static VALUE
+! line_s_current(void)
+ {
+ return get_buffer_line(curbuf, curwin->w_cursor.lnum);
+ }
+
+! static VALUE
+! set_current_line(VALUE self UNUSED, VALUE str)
+ {
+ return set_buffer_line(curbuf, curwin->w_cursor.lnum, str);
+ }
+
+! static VALUE
+! current_line_number(void)
+ {
+ return INT2FIX((int)curwin->w_cursor.lnum);
+ }
+
+! static VALUE
+! window_s_count(void)
+ {
+ win_T *w;
+ int n = 0;
+***************
+*** 1554,1560 ****
+ return INT2NUM(n);
+ }
+
+! static VALUE window_s_aref(VALUE self UNUSED, VALUE num)
+ {
+ win_T *w;
+ int n = NUM2INT(num);
+--- 1607,1614 ----
+ return INT2NUM(n);
+ }
+
+! static VALUE
+! window_s_aref(VALUE self UNUSED, VALUE num)
+ {
+ win_T *w;
+ int n = NUM2INT(num);
+***************
+*** 1565,1585 ****
+ return Qnil;
+ }
+
+! static VALUE window_buffer(VALUE self)
+ {
+ win_T *win = get_win(self);
+
+ return buffer_new(win->w_buffer);
+ }
+
+! static VALUE window_height(VALUE self)
+ {
+ win_T *win = get_win(self);
+
+ return INT2NUM(win->w_height);
+ }
+
+! static VALUE window_set_height(VALUE self, VALUE height)
+ {
+ win_T *win = get_win(self);
+ win_T *savewin = curwin;
+--- 1619,1642 ----
+ return Qnil;
+ }
+
+! static VALUE
+! window_buffer(VALUE self)
+ {
+ win_T *win = get_win(self);
+
+ return buffer_new(win->w_buffer);
+ }
+
+! static VALUE
+! window_height(VALUE self)
+ {
+ win_T *win = get_win(self);
+
+ return INT2NUM(win->w_height);
+ }
+
+! static VALUE
+! window_set_height(VALUE self, VALUE height)
+ {
+ win_T *win = get_win(self);
+ win_T *savewin = curwin;
+***************
+*** 1590,1601 ****
+ return height;
+ }
+
+! static VALUE window_width(VALUE self UNUSED)
+ {
+ return INT2NUM(get_win(self)->w_width);
+ }
+
+! static VALUE window_set_width(VALUE self UNUSED, VALUE width)
+ {
+ win_T *win = get_win(self);
+ win_T *savewin = curwin;
+--- 1647,1660 ----
+ return height;
+ }
+
+! static VALUE
+! window_width(VALUE self UNUSED)
+ {
+ return INT2NUM(get_win(self)->w_width);
+ }
+
+! static VALUE
+! window_set_width(VALUE self UNUSED, VALUE width)
+ {
+ win_T *win = get_win(self);
+ win_T *savewin = curwin;
+***************
+*** 1606,1619 ****
+ return width;
+ }
+
+! static VALUE window_cursor(VALUE self)
+ {
+ win_T *win = get_win(self);
+
+ return rb_assoc_new(INT2NUM(win->w_cursor.lnum), INT2NUM(win->w_cursor.col));
+ }
+
+! static VALUE window_set_cursor(VALUE self, VALUE pos)
+ {
+ VALUE lnum, col;
+ win_T *win = get_win(self);
+--- 1665,1680 ----
+ return width;
+ }
+
+! static VALUE
+! window_cursor(VALUE self)
+ {
+ win_T *win = get_win(self);
+
+ return rb_assoc_new(INT2NUM(win->w_cursor.lnum), INT2NUM(win->w_cursor.col));
+ }
+
+! static VALUE
+! window_set_cursor(VALUE self, VALUE pos)
+ {
+ VALUE lnum, col;
+ win_T *win = get_win(self);
+***************
+*** 1631,1642 ****
+ return Qnil;
+ }
+
+! static VALUE f_nop(VALUE self UNUSED)
+ {
+ return Qnil;
+ }
+
+! static VALUE f_p(int argc, VALUE *argv, VALUE self UNUSED)
+ {
+ int i;
+ VALUE str = rb_str_new("", 0);
+--- 1692,1705 ----
+ return Qnil;
+ }
+
+! static VALUE
+! f_nop(VALUE self UNUSED)
+ {
+ return Qnil;
+ }
+
+! static VALUE
+! f_p(int argc, VALUE *argv, VALUE self UNUSED)
+ {
+ int i;
+ VALUE str = rb_str_new("", 0);
+***************
+*** 1656,1662 ****
+ return ret;
+ }
+
+! static void ruby_io_init(void)
+ {
+ #ifndef DYNAMIC_RUBY
+ RUBYEXTERN VALUE rb_stdout;
+--- 1719,1726 ----
+ return ret;
+ }
+
+! static void
+! ruby_io_init(void)
+ {
+ #ifndef DYNAMIC_RUBY
+ RUBYEXTERN VALUE rb_stdout;
+***************
+*** 1672,1678 ****
+ rb_define_global_function("p", f_p, -1);
+ }
+
+! static void ruby_vim_init(void)
+ {
+ objtbl = rb_hash_new();
+ rb_global_variable(&objtbl);
+--- 1736,1743 ----
+ rb_define_global_function("p", f_p, -1);
+ }
+
+! static void
+! ruby_vim_init(void)
+ {
+ objtbl = rb_hash_new();
+ rb_global_variable(&objtbl);
+***************
+*** 1736,1743 ****
+ rb_define_virtual_variable("$curwin", window_s_current, 0);
+ }
+
+! void vim_ruby_init(void *stack_start)
+ {
+ /* should get machine stack start address early in main function */
+ ruby_stack_start = stack_start;
+ }
+--- 1801,1939 ----
+ rb_define_virtual_variable("$curwin", window_s_current, 0);
+ }
+
+! void
+! vim_ruby_init(void *stack_start)
+ {
+ /* should get machine stack start address early in main function */
+ ruby_stack_start = stack_start;
+ }
++
++ static int
++ convert_hash2dict(VALUE key, VALUE val, VALUE arg)
++ {
++ dict_T *d = (dict_T *)arg;
++ dictitem_T *di;
++
++ di = dictitem_alloc((char_u *)RSTRING_PTR(RSTRING(rb_obj_as_string(key))));
++ if (di == NULL || ruby_convert_to_vim_value(val, &di->di_tv) != OK
++ || dict_add(d, di) != OK)
++ {
++ d->dv_hashtab.ht_error = TRUE;
++ return ST_STOP;
++ }
++ return ST_CONTINUE;
++ }
++
++ static int
++ ruby_convert_to_vim_value(VALUE val, typval_T *rettv)
++ {
++ switch (TYPE(val))
++ {
++ case T_NIL:
++ rettv->v_type = VAR_SPECIAL;
++ rettv->vval.v_number = VVAL_NULL;
++ break;
++ case T_TRUE:
++ rettv->v_type = VAR_SPECIAL;
++ rettv->vval.v_number = VVAL_TRUE;
++ break;
++ case T_FALSE:
++ rettv->v_type = VAR_SPECIAL;
++ rettv->vval.v_number = VVAL_FALSE;
++ break;
++ case T_BIGNUM:
++ case T_FIXNUM:
++ rettv->v_type = VAR_NUMBER;
++ rettv->vval.v_number = (varnumber_T)NUM2LONG(val);
++ break;
++ #ifdef FEAT_FLOAT
++ case T_FLOAT:
++ rettv->v_type = VAR_FLOAT;
++ rettv->vval.v_float = (float_T)NUM2DBL(val);
++ break;
++ #endif
++ default:
++ val = rb_obj_as_string(val);
++ // FALLTHROUGH
++ case T_STRING:
++ {
++ VALUE str = (VALUE)RSTRING(val);
++
++ rettv->v_type = VAR_STRING;
++ rettv->vval.v_string = vim_strnsave((char_u *)RSTRING_PTR(str),
++ (int)RSTRING_LEN(str));
++ }
++ break;
++ case T_ARRAY:
++ {
++ list_T *l;
++ long i;
++ typval_T v;
++
++ l = list_alloc();
++ if (l == NULL)
++ return FAIL;
++
++ for (i = 0; i < RARRAY_LEN(val); ++i)
++ {
++ if (ruby_convert_to_vim_value((VALUE)RARRAY_PTR(val)[i],
++ &v) != OK)
++ {
++ list_unref(l);
++ return FAIL;
++ }
++ list_append_tv(l, &v);
++ clear_tv(&v);
++ }
++
++ rettv->v_type = VAR_LIST;
++ rettv->vval.v_list = l;
++ ++l->lv_refcount;
++ }
++ break;
++ case T_HASH:
++ {
++ dict_T *d;
++
++ d = dict_alloc();
++ if (d == NULL)
++ return FAIL;
++
++ rb_hash_foreach(val, convert_hash2dict, (VALUE)d);
++ if (d->dv_hashtab.ht_error)
++ {
++ dict_unref(d);
++ return FAIL;
++ }
++
++ rettv->v_type = VAR_DICT;
++ rettv->vval.v_dict = d;
++ ++d->dv_refcount;
++ }
++ break;
++ }
++ return OK;
++ }
++
++ void
++ do_rubyeval(char_u *str, typval_T *rettv)
++ {
++ int retval = FAIL;
++
++ if (ensure_ruby_initialized())
++ {
++ int state;
++ VALUE obj;
++
++ obj = rb_eval_string_protect((const char *)str, &state);
++ if (state)
++ error_print(state);
++ else
++ retval = ruby_convert_to_vim_value(obj, rettv);
++ }
++ if (retval == FAIL)
++ {
++ rettv->v_type = VAR_NUMBER;
++ rettv->vval.v_number = 0;
++ }
++ }
+*** ../vim-8.1.1055/src/proto/if_ruby.pro 2018-05-17 13:52:41.000000000 +0200
+--- src/proto/if_ruby.pro 2019-03-26 22:40:42.456751899 +0100
+***************
+*** 7,10 ****
+--- 7,11 ----
+ void ruby_buffer_free(buf_T *buf);
+ void ruby_window_free(win_T *win);
+ void vim_ruby_init(void *stack_start);
++ void do_rubyeval(char_u *str, typval_T *rettv);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1055/src/testdir/test_ruby.vim 2019-02-23 14:22:59.567653374 +0100
+--- src/testdir/test_ruby.vim 2019-03-26 22:40:42.456751899 +0100
+***************
+*** 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")
+--- 4,9 ----
+***************
+*** 49,60 ****
+ 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')
+--- 42,53 ----
+ 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')
+***************
+*** 65,89 ****
+ 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
+--- 58,82 ----
+ 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(v:null, rubyeval('$curbuf.name'))
+ endfunc
+
+ " Test buffer.number (number of the buffer).
+ func Test_buffer_number()
+ new
+! call assert_equal(bufnr('%'), rubyeval('$curbuf.number'))
+ new
+! call assert_equal(bufnr('%'), rubyeval('$curbuf.number'))
+
+ %bwipe
+ endfunc
+***************
+*** 124,130 ****
+ 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, '$'))
+--- 117,123 ----
+ 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, '$'))
+***************
+*** 137,143 ****
+ new
+ call setline(1, ['one', 'two', 'three'])
+ 2
+! call assert_equal('2', RubyEval('$curbuf.line_number'))
+
+ bwipe!
+ endfunc
+--- 130,136 ----
+ new
+ call setline(1, ['one', 'two', 'three'])
+ 2
+! call assert_equal(2, rubyeval('$curbuf.line_number'))
+
+ bwipe!
+ endfunc
+***************
+*** 145,152 ****
+ 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')
+--- 138,145 ----
+ 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')
+***************
+*** 178,184 ****
+ call assert_equal(2, winheight(0))
+
+ " Test getting window height
+! call assert_equal('2', RubyEval('$curwin.height'))
+
+ bwipe
+ endfunc
+--- 171,177 ----
+ call assert_equal(2, winheight(0))
+
+ " Test getting window height
+! call assert_equal(2, rubyeval('$curwin.height'))
+
+ bwipe
+ endfunc
+***************
+*** 192,198 ****
+ call assert_equal(2, winwidth(0))
+
+ " Test getting window width
+! call assert_equal('2', RubyEval('$curwin.width'))
+
+ bwipe
+ endfunc
+--- 185,191 ----
+ call assert_equal(2, winwidth(0))
+
+ " Test getting window width
+! call assert_equal(2, rubyeval('$curwin.width'))
+
+ bwipe
+ endfunc
+***************
+*** 207,216 ****
+ 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
+--- 200,209 ----
+ 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(bufnr('Xfoo1'), rubyeval('$w1.buffer.number'))
+! call assert_equal(bufnr('Xfoo2'), rubyeval('$w2.buffer.number'))
+
+ ruby $b1, $w1, $b2, $w2 = nil
+ %bwipe
+***************
+*** 218,225 ****
+
+ " 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
+
+--- 211,218 ----
+
+ " 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
+
+***************
+*** 228,254 ****
+ 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
+
+--- 221,247 ----
+ 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(v:null, 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
+
+***************
+*** 256,264 ****
+ 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)
+--- 249,257 ----
+ 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)
+***************
+*** 267,275 ****
+ 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
+--- 260,268 ----
+ new Xfoo2
+
+ " Index of Vim::Buffer[n] goes from 0 to the number of buffers.
+! call assert_equal(v:null, 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
+***************
+*** 295,337 ****
+ 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('["\x01\xAB"]', RubyEval('Vim::evaluate("0z01ab").unpack("M")'))
+! call assert_equal('String', RubyEval('Vim::evaluate("0z01ab").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_blob()
+! call assert_equal('0z', RubyEval('Vim::blob("")'))
+! call assert_equal('0z31326162', RubyEval('Vim::blob("12ab")'))
+! call assert_equal('0z00010203', RubyEval('Vim::blob("\x00\x01\x02\x03")'))
+! call assert_equal('0z8081FEFF', RubyEval('Vim::blob("\x80\x81\xfe\xff")'))
+ endfunc
+
+ func Test_Vim_evaluate_list()
+--- 288,330 ----
+ 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(["\x01\xAB"], rubyeval('Vim::evaluate("0z01ab").unpack("M")'))
+! call assert_equal('String', rubyeval('Vim::evaluate("0z01ab").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(v:null, rubyeval('Vim::evaluate("v:null")'))
+! call assert_equal('NilClass', rubyeval('Vim::evaluate("v:null").class'))
+
+! call assert_equal(v:null, rubyeval('Vim::evaluate("v:none")'))
+! call assert_equal('NilClass', rubyeval('Vim::evaluate("v:none").class'))
+
+! call assert_equal(v:true, rubyeval('Vim::evaluate("v:true")'))
+! call assert_equal('TrueClass', rubyeval('Vim::evaluate("v:true").class'))
+! call assert_equal(v:false, rubyeval('Vim::evaluate("v:false")'))
+! call assert_equal('FalseClass',rubyeval('Vim::evaluate("v:false").class'))
+ endfunc
+
+ func Test_Vim_blob()
+! call assert_equal('0z', rubyeval('Vim::blob("")'))
+! call assert_equal('0z31326162', rubyeval('Vim::blob("12ab")'))
+! call assert_equal('0z00010203', rubyeval('Vim::blob("\x00\x01\x02\x03")'))
+! call assert_equal('0z8081FEFF', rubyeval('Vim::blob("\x80\x81\xfe\xff")'))
+ endfunc
+
+ func Test_Vim_evaluate_list()
+***************
+*** 364,372 ****
+ 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()
+--- 357,378 ----
+ endfunc
+
+ func Test_print()
+! func RubyPrint(expr)
+! return trim(execute('ruby print ' . a:expr))
+! endfunc
+!
+! call assert_equal('123', RubyPrint('123'))
+! call assert_equal('1.23', RubyPrint('1.23'))
+! call assert_equal('Hello World!', RubyPrint('"Hello World!"'))
+! call assert_equal('[1, 2]', RubyPrint('[1, 2]'))
+! call assert_equal('{"k1"=>"v1", "k2"=>"v2"}', RubyPrint('({"k1" => "v1", "k2" => "v2"})'))
+! call assert_equal('true', RubyPrint('true'))
+! call assert_equal('false', RubyPrint('false'))
+! call assert_equal('', RubyPrint('nil'))
+! call assert_match('Vim', RubyPrint('Vim'))
+! call assert_match('Module', RubyPrint('Vim.class'))
+!
+! delfunc RubyPrint
+ endfunc
+
+ func Test_p()
+***************
+*** 376,388 ****
+
+ " 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))
+--- 382,394 ----
+
+ " 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(v:true, rubyeval('p() == nil'))
+
+ let messages = split(execute('message'), "\n")
+ call assert_equal(0, len(messages))
+*** ../vim-8.1.1055/src/version.c 2019-03-26 22:46:01.885928372 +0100
+--- src/version.c 2019-03-26 22:49:08.868304682 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1056,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+128. You can access the Net -- via your portable and cellular phone.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1057 b/data/vim/patches/8.1.1057
new file mode 100644
index 000000000..6f923eb3e
--- /dev/null
+++ b/data/vim/patches/8.1.1057
@@ -0,0 +1,91 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1057
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1057
+Problem: Nsis config is too complicated.
+Solution: Use "File /r" for the macros and pack directories. (Ken Takata,
+ closes #4169)
+Files: nsis/gvim.nsi
+
+
+*** ../vim-8.1.1056/nsis/gvim.nsi 2019-02-19 21:40:22.617135352 +0100
+--- nsis/gvim.nsi 2019-03-26 23:01:26.654031369 +0100
+***************
+*** 354,395 ****
+ File ${VIMRT}\indent\*.*
+
+ SetOutPath $0\macros
+! File ${VIMRT}\macros\*.*
+! SetOutPath $0\macros\hanoi
+! File ${VIMRT}\macros\hanoi\*.*
+! SetOutPath $0\macros\life
+! File ${VIMRT}\macros\life\*.*
+! SetOutPath $0\macros\maze
+! File ${VIMRT}\macros\maze\*.*
+! SetOutPath $0\macros\urm
+! File ${VIMRT}\macros\urm\*.*
+
+! SetOutPath $0\pack\dist\opt\dvorak\dvorak
+! File ${VIMRT}\pack\dist\opt\dvorak\dvorak\*.*
+! SetOutPath $0\pack\dist\opt\dvorak\plugin
+! File ${VIMRT}\pack\dist\opt\dvorak\plugin\*.*
+!
+! SetOutPath $0\pack\dist\opt\editexisting\plugin
+! File ${VIMRT}\pack\dist\opt\editexisting\plugin\*.*
+!
+! SetOutPath $0\pack\dist\opt\justify\plugin
+! File ${VIMRT}\pack\dist\opt\justify\plugin\*.*
+!
+! SetOutPath $0\pack\dist\opt\matchit\doc
+! File ${VIMRT}\pack\dist\opt\matchit\doc\*.*
+! SetOutPath $0\pack\dist\opt\matchit\plugin
+! File ${VIMRT}\pack\dist\opt\matchit\plugin\*.*
+! SetOutPath $0\pack\dist\opt\matchit\autoload
+! File ${VIMRT}\pack\dist\opt\matchit\autoload\*.*
+!
+! SetOutPath $0\pack\dist\opt\shellmenu\plugin
+! File ${VIMRT}\pack\dist\opt\shellmenu\plugin\*.*
+!
+! SetOutPath $0\pack\dist\opt\swapmouse\plugin
+! File ${VIMRT}\pack\dist\opt\swapmouse\plugin\*.*
+!
+! SetOutPath $0\pack\dist\opt\termdebug\plugin
+! File ${VIMRT}\pack\dist\opt\termdebug\plugin\*.*
+
+ SetOutPath $0\plugin
+ File ${VIMRT}\plugin\*.*
+--- 354,363 ----
+ File ${VIMRT}\indent\*.*
+
+ SetOutPath $0\macros
+! File /r ${VIMRT}\macros\*.*
+
+! SetOutPath $0\pack
+! File /r ${VIMRT}\pack\*.*
+
+ SetOutPath $0\plugin
+ File ${VIMRT}\plugin\*.*
+*** ../vim-8.1.1056/src/version.c 2019-03-26 22:50:19.155698089 +0100
+--- src/version.c 2019-03-26 23:02:29.409508107 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1057,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+129. You cancel your newspaper subscription.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1058 b/data/vim/patches/8.1.1058
new file mode 100644
index 000000000..73b226fdc
--- /dev/null
+++ b/data/vim/patches/8.1.1058
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1058
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1058
+Problem: Memory usage test may still fail on some systems.
+Solution: Use 98% of the lower limit. (Christian Brabandt)
+Files: src/testdir/test_memory_usage.vim
+
+
+*** ../vim-8.1.1057/src/testdir/test_memory_usage.vim 2019-03-22 14:36:55.730563142 +0100
+--- src/testdir/test_memory_usage.vim 2019-03-27 21:38:59.970905401 +0100
+***************
+*** 97,105 ****
+ let after = s:monitor_memory_usage(vim.pid)
+
+ " Estimate the limit of max usage as 2x initial usage.
+! call assert_inrange(before, 2 * before, after.max)
+! " In this case, garbage collecting is not needed. The value might fluctuate
+! " a bit, allow for 3% tolerance.
+ let lower = after.last * 97 / 100
+ let upper = after.last * 103 / 100
+ call assert_inrange(lower, upper, after.max)
+--- 97,107 ----
+ let after = s:monitor_memory_usage(vim.pid)
+
+ " Estimate the limit of max usage as 2x initial usage.
+! " The lower limit can fluctuate a bit, use 98%.
+! call assert_inrange(before * 98 / 100, 2 * before, after.max)
+!
+! " In this case, garbage collecting is not needed.
+! " The value might fluctuate a bit, allow for 3% tolerance.
+ let lower = after.last * 97 / 100
+ let upper = after.last * 103 / 100
+ call assert_inrange(lower, upper, after.max)
+*** ../vim-8.1.1057/src/version.c 2019-03-26 23:02:42.621397857 +0100
+--- src/version.c 2019-03-27 21:39:53.746514506 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1058,
+ /**/
+
+--
+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.1059 b/data/vim/patches/8.1.1059
new file mode 100644
index 000000000..a8e1409d7
--- /dev/null
+++ b/data/vim/patches/8.1.1059
@@ -0,0 +1,77 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1059
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1059
+Problem: MS-Windows: PlatformId() is called unnecessarily.
+Solution: Remove calls to PlatformId(). (Ken Takata, closes #4170)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.1058/src/os_win32.c 2019-03-21 19:57:57.491816288 +0100
+--- src/os_win32.c 2019-03-27 21:48:51.893590550 +0100
+***************
+*** 6796,6802 ****
+ {
+ MEMORYSTATUSEX ms;
+
+- PlatformId();
+ /* Need to use GlobalMemoryStatusEx() when there is more memory than
+ * what fits in 32 bits. But it's not always available. */
+ ms.dwLength = sizeof(MEMORYSTATUSEX);
+--- 6796,6801 ----
+***************
+*** 6982,6989 ****
+ char *
+ default_shell(void)
+ {
+- PlatformId();
+-
+ return "cmd.exe";
+ }
+
+--- 6981,6986 ----
+***************
+*** 7327,7333 ****
+ mch_copy_file_attribute(char_u *from, char_u *to)
+ {
+ /* File streams only work on Windows NT and later. */
+- PlatformId();
+ copy_infostreams(from, to);
+ return 0;
+ }
+--- 7324,7329 ----
+***************
+*** 7358,7365 ****
+ DWORD nPageSize;
+ DWORD dummy;
+
+- PlatformId();
+-
+ /* We need to know the system page size. */
+ GetSystemInfo(&si);
+ nPageSize = si.dwPageSize;
+--- 7354,7359 ----
+*** ../vim-8.1.1058/src/version.c 2019-03-27 21:41:32.965793744 +0100
+--- src/version.c 2019-03-27 21:48:47.677634093 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1059,
+ /**/
+
+--
+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.1060 b/data/vim/patches/8.1.1060
new file mode 100644
index 000000000..aaee41cbd
--- /dev/null
+++ b/data/vim/patches/8.1.1060
@@ -0,0 +1,286 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1060
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1060
+Problem: MS-Windows: get_cmd_args() is no longer needed, get_cmd_argsW() is
+ always used.
+Solution: Remove get_cmd_args(). (Ken Takata, closes #4171)
+Files: src/gui_w32.c, src/os_w32exe.c
+
+
+*** ../vim-8.1.1059/src/gui_w32.c 2019-03-21 20:50:08.868741864 +0100
+--- src/gui_w32.c 2019-03-27 21:56:47.457072295 +0100
+***************
+*** 3882,4032 ****
+ }
+
+
+- /*
+- * Get command line arguments.
+- * Use "prog" as the name of the program and "cmdline" as the arguments.
+- * Copy the arguments to allocated memory.
+- * Return the number of arguments (including program name).
+- * Return pointers to the arguments in "argvp". Memory is allocated with
+- * malloc(), use free() instead of vim_free().
+- * Return pointer to buffer in "tofree".
+- * Returns zero when out of memory.
+- */
+- int
+- get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree)
+- {
+- int i;
+- char *p;
+- char *progp;
+- char *pnew = NULL;
+- char *newcmdline;
+- int inquote;
+- int argc;
+- char **argv = NULL;
+- int round;
+-
+- *tofree = NULL;
+-
+- /* Try using the Unicode version first, it takes care of conversion when
+- * 'encoding' is changed. */
+- argc = get_cmd_argsW(&argv);
+- if (argc != 0)
+- goto done;
+-
+- /* Handle the program name. Remove the ".exe" extension, and find the 1st
+- * non-space. */
+- p = strrchr(prog, '.');
+- if (p != NULL)
+- *p = NUL;
+- for (progp = prog; *progp == ' '; ++progp)
+- ;
+-
+- /* The command line is copied to allocated memory, so that we can change
+- * it. Add the size of the string, the separating NUL and a terminating
+- * NUL. */
+- newcmdline = malloc(STRLEN(cmdline) + STRLEN(progp) + 2);
+- if (newcmdline == NULL)
+- return 0;
+-
+- /*
+- * First round: count the number of arguments ("pnew" == NULL).
+- * Second round: produce the arguments.
+- */
+- for (round = 1; round <= 2; ++round)
+- {
+- /* First argument is the program name. */
+- if (pnew != NULL)
+- {
+- argv[0] = pnew;
+- strcpy(pnew, progp);
+- pnew += strlen(pnew);
+- *pnew++ = NUL;
+- }
+-
+- /*
+- * Isolate each argument and put it in argv[].
+- */
+- p = cmdline;
+- argc = 1;
+- while (*p != NUL)
+- {
+- inquote = FALSE;
+- if (pnew != NULL)
+- argv[argc] = pnew;
+- ++argc;
+- while (*p != NUL && (inquote || (*p != ' ' && *p != '\t')))
+- {
+- /* Backslashes are only special when followed by a double
+- * quote. */
+- i = (int)strspn(p, "\\");
+- if (p[i] == '"')
+- {
+- /* Halve the number of backslashes. */
+- if (i > 1 && pnew != NULL)
+- {
+- vim_memset(pnew, '\\', i / 2);
+- pnew += i / 2;
+- }
+-
+- /* Even nr of backslashes toggles quoting, uneven copies
+- * the double quote. */
+- if ((i & 1) == 0)
+- inquote = !inquote;
+- else if (pnew != NULL)
+- *pnew++ = '"';
+- p += i + 1;
+- }
+- else if (i > 0)
+- {
+- /* Copy span of backslashes unmodified. */
+- if (pnew != NULL)
+- {
+- vim_memset(pnew, '\\', i);
+- pnew += i;
+- }
+- p += i;
+- }
+- else
+- {
+- if (pnew != NULL)
+- *pnew++ = *p;
+- /* Can't use mb_* functions, because 'encoding' is not
+- * initialized yet here. */
+- if (IsDBCSLeadByte(*p))
+- {
+- ++p;
+- if (pnew != NULL)
+- *pnew++ = *p;
+- }
+- ++p;
+- }
+- }
+-
+- if (pnew != NULL)
+- *pnew++ = NUL;
+- while (*p == ' ' || *p == '\t')
+- ++p; /* advance until a non-space */
+- }
+-
+- if (round == 1)
+- {
+- argv = (char **)malloc((argc + 1) * sizeof(char *));
+- if (argv == NULL )
+- {
+- free(newcmdline);
+- return 0; /* malloc error */
+- }
+- pnew = newcmdline;
+- *tofree = newcmdline;
+- }
+- }
+-
+- done:
+- argv[argc] = NULL; /* NULL-terminated list */
+- *argvp = argv;
+- return argc;
+- }
+-
+ #ifdef FEAT_XPM_W32
+ # include "xpm_w32.h"
+ #endif
+--- 3882,3887 ----
+*** ../vim-8.1.1059/src/os_w32exe.c 2019-02-17 17:44:36.219875473 +0100
+--- src/os_w32exe.c 2019-03-27 21:56:47.457072295 +0100
+***************
+*** 10,16 ****
+ /*
+ * Windows GUI: main program (EXE) entry point:
+ *
+! * Ron Aaron <ronaharon@yahoo.com> wrote this and the DLL support code.
+ */
+ #include "vim.h"
+
+--- 10,16 ----
+ /*
+ * Windows GUI: main program (EXE) entry point:
+ *
+! * Ron Aaron <ronaharon@yahoo.com> wrote this and the DLL support code.
+ */
+ #include "vim.h"
+
+***************
+*** 42,77 ****
+ WinMain(
+ HINSTANCE hInstance UNUSED,
+ HINSTANCE hPrevInst UNUSED,
+! LPSTR lpszCmdLine,
+ int nCmdShow UNUSED)
+ {
+ int argc = 0;
+! char **argv;
+! char *tofree;
+! char prog[256];
+ #ifdef VIMDLL
+ char *p;
+ HANDLE hLib;
+- #endif
+
+ /* Ron: added full path name so that the $VIM variable will get set to our
+ * startup path (so the .vimrc file can be found w/o a VIM env. var.) */
+ GetModuleFileName(NULL, prog, 255);
+
+! argc = get_cmd_args(prog, (char *)lpszCmdLine, &argv, &tofree);
+! if (argc == 0)
+! {
+! MessageBox(0, "Could not allocate memory for command line.",
+! "VIM Error", 0);
+! return 0;
+! }
+!
+! #ifdef DYNAMIC_GETTEXT
+ /* Initialize gettext library */
+ dyn_libintl_init();
+! #endif
+
+- #ifdef VIMDLL
+ // LoadLibrary - get name of dll to load in here:
+ p = strrchr(prog, '\\');
+ if (p != NULL)
+--- 42,66 ----
+ WinMain(
+ HINSTANCE hInstance UNUSED,
+ HINSTANCE hPrevInst UNUSED,
+! LPSTR lpszCmdLine UNUSED,
+ int nCmdShow UNUSED)
+ {
+ int argc = 0;
+! char **argv = NULL;
+ #ifdef VIMDLL
++ char prog[256];
+ char *p;
+ HANDLE hLib;
+
+ /* Ron: added full path name so that the $VIM variable will get set to our
+ * startup path (so the .vimrc file can be found w/o a VIM env. var.) */
+ GetModuleFileName(NULL, prog, 255);
+
+! # ifdef DYNAMIC_GETTEXT
+ /* Initialize gettext library */
+ dyn_libintl_init();
+! # endif
+
+ // LoadLibrary - get name of dll to load in here:
+ p = strrchr(prog, '\\');
+ if (p != NULL)
+***************
+*** 127,135 ****
+ FreeLibrary(hLib);
+ errout:
+ #endif
+- free(argv);
+- if (tofree != NULL)
+- free(tofree);
+ free_cmd_argsW();
+
+ return 0;
+--- 116,121 ----
+*** ../vim-8.1.1059/src/version.c 2019-03-27 21:49:10.761396675 +0100
+--- src/version.c 2019-03-27 21:58:01.508417951 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1060,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+133. You communicate with people on other continents more than you
+ do with your own neighbors.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1061 b/data/vim/patches/8.1.1061
new file mode 100644
index 000000000..c82656821
--- /dev/null
+++ b/data/vim/patches/8.1.1061
@@ -0,0 +1,101 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1061
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1061
+Problem: When substitute string throws error, substitute happens anyway.
+Solution: Skip substitution when aborting. (closes #4161)
+Files: src/ex_cmds.c, src/testdir/test_substitute.vim
+
+
+*** ../vim-8.1.1060/src/ex_cmds.c 2019-03-17 16:59:38.582201903 +0100
+--- src/ex_cmds.c 2019-03-24 22:26:56.525595616 +0100
+***************
+*** 5574,5580 ****
+ sub_firstlnum - regmatch.startpos[0].lnum,
+ sub, sub_firstline, FALSE, p_magic, TRUE);
+ #ifdef FEAT_EVAL
+! /* Don't keep flags set by a recursive call. */
+ subflags = subflags_save;
+ if (subflags.do_count)
+ {
+--- 5574,5585 ----
+ sub_firstlnum - regmatch.startpos[0].lnum,
+ sub, sub_firstline, FALSE, p_magic, TRUE);
+ #ifdef FEAT_EVAL
+! // If getting the substitute string caused an error, don't do
+! // the replacement.
+! if (aborting())
+! goto skip;
+!
+! // Don't keep flags set by a recursive call.
+ subflags = subflags_save;
+ if (subflags.do_count)
+ {
+*** ../vim-8.1.1060/src/testdir/test_substitute.vim 2019-02-10 22:50:08.011856775 +0100
+--- src/testdir/test_substitute.vim 2019-03-27 22:33:23.761578469 +0100
+***************
+*** 610,612 ****
+--- 610,642 ----
+ enew!
+ set titlestring&
+ endfunc
++
++ func Test_nocatch_sub_failure_handling()
++ " normal error results in all replacements
++ func! Foo()
++ foobar
++ endfunc
++ new
++ call setline(1, ['1 aaa', '2 aaa', '3 aaa'])
++ %s/aaa/\=Foo()/g
++ call assert_equal(['1 0', '2 0', '3 0'], getline(1, 3))
++
++ " Trow without try-catch causes abort after the first line.
++ " We cannot test this, since it would stop executing the test script.
++
++ " try/catch does not result in any changes
++ func! Foo()
++ throw 'error'
++ endfunc
++ call setline(1, ['1 aaa', '2 aaa', '3 aaa'])
++ let error_caught = 0
++ try
++ %s/aaa/\=Foo()/g
++ catch
++ let error_caught = 1
++ endtry
++ call assert_equal(1, error_caught)
++ call assert_equal(['1 aaa', '2 aaa', '3 aaa'], getline(1, 3))
++
++ bwipe!
++ endfunc
+*** ../vim-8.1.1060/src/version.c 2019-03-27 21:59:40.903552946 +0100
+--- src/version.c 2019-03-27 22:34:08.561183332 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1061,
+ /**/
+
+--
+"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.1062 b/data/vim/patches/8.1.1062
new file mode 100644
index 000000000..f3d34777e
--- /dev/null
+++ b/data/vim/patches/8.1.1062
@@ -0,0 +1,620 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1062
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1062
+Problem: Quickfix code is repeated.
+Solution: Define FOR_ALL_QFL_ITEMS(). Move some code to separate functions.
+ (Yegappan Lakshmanan, closes #4166)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.1061/src/quickfix.c 2019-03-22 14:16:02.877160892 +0100
+--- src/quickfix.c 2019-03-28 20:29:41.737770187 +0100
+***************
+*** 195,200 ****
+--- 195,205 ----
+ */
+ #define GET_LOC_LIST(wp) (IS_LL_WINDOW(wp) ? wp->w_llist_ref : wp->w_llist)
+
++ #define FOR_ALL_QFL_ITEMS(qfl, qfp, i) \
++ for (i = 0, qfp = qfl->qf_start; \
++ !got_int && i < qfl->qf_count && qfp != NULL; \
++ ++i, qfp = qfp->qf_next)
++
+ /*
+ * Looking up a buffer can be slow if there are many. Remember the last one
+ * to make this a lot faster if there are multiple matches in the same file.
+***************
+*** 2148,2156 ****
+ 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_qfl,
+ NULL,
+--- 2153,2159 ----
+ qfline_T *prevp;
+
+ // copy all the location entries in this list
+! FOR_ALL_QFL_ITEMS(from_qfl, from_qfp, i)
+ {
+ if (qf_add_entry(to_qfl,
+ NULL,
+***************
+*** 2544,2552 ****
+ 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
+--- 2547,2554 ----
+ int i;
+
+ // Search for the entry in the current list
+! FOR_ALL_QFL_ITEMS(qfl, qfp, i)
+! if (qfp == qf_ptr)
+ break;
+
+ if (i == qfl->qf_count) // Entry is not found
+***************
+*** 3792,3800 ****
+ qf_list_T *qfl = qf_get_list(qi, idx);
+
+ if (!qf_list_empty(qfl))
+! for (i = 0, qfp = qfl->qf_start;
+! i < qfl->qf_count && qfp != NULL;
+! ++i, qfp = qfp->qf_next)
+ if (qfp->qf_fnum == curbuf->b_fnum)
+ {
+ found_one = TRUE;
+--- 3794,3800 ----
+ qf_list_T *qfl = qf_get_list(qi, idx);
+
+ if (!qf_list_empty(qfl))
+! FOR_ALL_QFL_ITEMS(qfl, qfp, i)
+ if (qfp->qf_fnum == curbuf->b_fnum)
+ {
+ found_one = TRUE;
+***************
+*** 4819,4826 ****
+ }
+
+ qfl = qf_get_curlist(qi);
+! for (i = 0, qfp = qfl->qf_start; i < qfl->qf_count && qfp != NULL;
+! ++i, qfp = qfp->qf_next)
+ {
+ if (qfp->qf_valid)
+ {
+--- 4819,4825 ----
+ }
+
+ qfl = qf_get_curlist(qi);
+! FOR_ALL_QFL_ITEMS(qfl, qfp, i)
+ {
+ if (qfp->qf_valid)
+ {
+***************
+*** 5056,5061 ****
+--- 5055,5078 ----
+ }
+
+ /*
++ * Return the autocmd name for the :cfile Ex commands
++ */
++ static char_u *
++ cfile_get_auname(cmdidx_T cmdidx)
++ {
++ switch (cmdidx)
++ {
++ case CMD_cfile: return (char_u *)"cfile";
++ case CMD_cgetfile: return (char_u *)"cgetfile";
++ case CMD_caddfile: return (char_u *)"caddfile";
++ case CMD_lfile: return (char_u *)"lfile";
++ case CMD_lgetfile: return (char_u *)"lgetfile";
++ case CMD_laddfile: return (char_u *)"laddfile";
++ default: return NULL;
++ }
++ }
++
++ /*
+ * ":cfile"/":cgetfile"/":caddfile" commands.
+ * ":lfile"/":lgetfile"/":laddfile" commands.
+ */
+***************
+*** 5069,5086 ****
+ int_u save_qfid = 0; // init for gcc
+ int res;
+
+! switch (eap->cmdidx)
+! {
+! case CMD_cfile: au_name = (char_u *)"cfile"; break;
+! case CMD_cgetfile: au_name = (char_u *)"cgetfile"; break;
+! case CMD_caddfile: au_name = (char_u *)"caddfile"; break;
+! case CMD_lfile: au_name = (char_u *)"lfile"; break;
+! case CMD_lgetfile: au_name = (char_u *)"lgetfile"; break;
+! case CMD_laddfile: au_name = (char_u *)"laddfile"; break;
+! default: break;
+! }
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name, NULL, FALSE, curbuf);
+ enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc;
+ #ifdef FEAT_BROWSE
+ if (cmdmod.browse)
+--- 5086,5095 ----
+ int_u save_qfid = 0; // init for gcc
+ int res;
+
+! au_name = cfile_get_auname(eap->cmdidx);
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name, NULL, FALSE, curbuf);
++
+ enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc;
+ #ifdef FEAT_BROWSE
+ if (cmdmod.browse)
+***************
+*** 5832,5837 ****
+--- 5841,5884 ----
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+ /*
++ * Copy the specified quickfix entry items into a new dict and appened the dict
++ * to 'list'. Returns OK on success.
++ */
++ static int
++ get_qfline_items(qfline_T *qfp, list_T *list)
++ {
++ int bufnum;
++ dict_T *dict;
++ char_u buf[2];
++
++ // Handle entries with a non-existing buffer number.
++ bufnum = qfp->qf_fnum;
++ if (bufnum != 0 && (buflist_findnr(bufnum) == NULL))
++ bufnum = 0;
++
++ if ((dict = dict_alloc()) == NULL)
++ return FAIL;
++ if (list_append_dict(list, dict) == FAIL)
++ return FAIL;
++
++ buf[0] = qfp->qf_type;
++ buf[1] = NUL;
++ if (dict_add_number(dict, "bufnr", (long)bufnum) == FAIL
++ || dict_add_number(dict, "lnum", (long)qfp->qf_lnum) == FAIL
++ || dict_add_number(dict, "col", (long)qfp->qf_col) == FAIL
++ || dict_add_number(dict, "vcol", (long)qfp->qf_viscol) == FAIL
++ || dict_add_number(dict, "nr", (long)qfp->qf_nr) == FAIL
++ || dict_add_string(dict, "module", qfp->qf_module) == FAIL
++ || dict_add_string(dict, "pattern", qfp->qf_pattern) == FAIL
++ || dict_add_string(dict, "text", qfp->qf_text) == FAIL
++ || dict_add_string(dict, "type", buf) == FAIL
++ || dict_add_number(dict, "valid", (long)qfp->qf_valid) == FAIL)
++ return FAIL;
++
++ return OK;
++ }
++
++ /*
+ * Add each quickfix error to list "list" as a dictionary.
+ * If qf_idx is -1, use the current list. Otherwise, use the specified list.
+ */
+***************
+*** 5840,5850 ****
+ {
+ qf_info_T *qi = qi_arg;
+ qf_list_T *qfl;
+- dict_T *dict;
+- char_u buf[2];
+ qfline_T *qfp;
+ int i;
+- int bufnum;
+
+ if (qi == NULL)
+ {
+--- 5887,5894 ----
+***************
+*** 5867,5903 ****
+ if (qf_list_empty(qfl))
+ return FAIL;
+
+! qfp = qfl->qf_start;
+! for (i = 1; !got_int && i <= qfl->qf_count; ++i)
+ {
+! // Handle entries with a non-existing buffer number.
+! bufnum = qfp->qf_fnum;
+! if (bufnum != 0 && (buflist_findnr(bufnum) == NULL))
+! bufnum = 0;
+!
+! if ((dict = dict_alloc()) == NULL)
+ return FAIL;
+- if (list_append_dict(list, dict) == FAIL)
+- return FAIL;
+-
+- buf[0] = qfp->qf_type;
+- buf[1] = NUL;
+- if ( dict_add_number(dict, "bufnr", (long)bufnum) == FAIL
+- || dict_add_number(dict, "lnum", (long)qfp->qf_lnum) == FAIL
+- || dict_add_number(dict, "col", (long)qfp->qf_col) == FAIL
+- || dict_add_number(dict, "vcol", (long)qfp->qf_viscol) == FAIL
+- || dict_add_number(dict, "nr", (long)qfp->qf_nr) == FAIL
+- || dict_add_string(dict, "module", qfp->qf_module) == FAIL
+- || dict_add_string(dict, "pattern", qfp->qf_pattern) == FAIL
+- || dict_add_string(dict, "text", qfp->qf_text) == FAIL
+- || dict_add_string(dict, "type", buf) == FAIL
+- || dict_add_number(dict, "valid", (long)qfp->qf_valid) == FAIL)
+- return FAIL;
+-
+- qfp = qfp->qf_next;
+- if (qfp == NULL)
+- break;
+ }
+ return OK;
+ }
+
+--- 5911,5922 ----
+ if (qf_list_empty(qfl))
+ return FAIL;
+
+! FOR_ALL_QFL_ITEMS(qfl, qfp, i)
+ {
+! if (get_qfline_items(qfp, list) == FAIL)
+ return FAIL;
+ }
++
+ return OK;
+ }
+
+***************
+*** 6842,6847 ****
+--- 6861,6934 ----
+ #endif
+
+ /*
++ * Return the autocmd name for the :cbuffer Ex commands
++ */
++ static char_u *
++ cbuffer_get_auname(cmdidx_T cmdidx)
++ {
++ switch (cmdidx)
++ {
++ case CMD_cbuffer: return (char_u *)"cbuffer";
++ case CMD_cgetbuffer: return (char_u *)"cgetbuffer";
++ case CMD_caddbuffer: return (char_u *)"caddbuffer";
++ case CMD_lbuffer: return (char_u *)"lbuffer";
++ case CMD_lgetbuffer: return (char_u *)"lgetbuffer";
++ case CMD_laddbuffer: return (char_u *)"laddbuffer";
++ default: return NULL;
++ }
++ }
++
++ /*
++ * Process and validate the arguments passed to the :cbuffer, :caddbuffer,
++ * :cgetbuffer, :lbuffer, :laddbuffer, :lgetbuffer Ex commands.
++ */
++ static int
++ cbuffer_process_args(
++ exarg_T *eap,
++ buf_T **bufp,
++ linenr_T *line1,
++ linenr_T *line2)
++ {
++ buf_T *buf = NULL;
++
++ if (*eap->arg == NUL)
++ buf = curbuf;
++ else if (*skipwhite(skipdigits(eap->arg)) == NUL)
++ buf = buflist_findnr(atoi((char *)eap->arg));
++
++ if (buf == NULL)
++ {
++ emsg(_(e_invarg));
++ return FAIL;
++ }
++
++ if (buf->b_ml.ml_mfp == NULL)
++ {
++ emsg(_("E681: Buffer is not loaded"));
++ return FAIL;
++ }
++
++ if (eap->addr_count == 0)
++ {
++ eap->line1 = 1;
++ eap->line2 = buf->b_ml.ml_line_count;
++ }
++
++ if (eap->line1 < 1 || eap->line1 > buf->b_ml.ml_line_count
++ || eap->line2 < 1 || eap->line2 > buf->b_ml.ml_line_count)
++ {
++ emsg(_(e_invrange));
++ return FAIL;
++ }
++
++ *line1 = eap->line1;
++ *line2 = eap->line2;
++ *bufp = buf;
++
++ return OK;
++ }
++
++ /*
+ * ":[range]cbuffer [bufnr]" command.
+ * ":[range]caddbuffer [bufnr]" command.
+ * ":[range]cgetbuffer [bufnr]" command.
+***************
+*** 6858,6876 ****
+ int res;
+ int_u save_qfid;
+ win_T *wp = NULL;
+
+! switch (eap->cmdidx)
+! {
+! case CMD_cbuffer: au_name = (char_u *)"cbuffer"; break;
+! case CMD_cgetbuffer: au_name = (char_u *)"cgetbuffer"; break;
+! case CMD_caddbuffer: au_name = (char_u *)"caddbuffer"; break;
+! case CMD_lbuffer: au_name = (char_u *)"lbuffer"; break;
+! case CMD_lgetbuffer: au_name = (char_u *)"lgetbuffer"; break;
+! case CMD_laddbuffer: au_name = (char_u *)"laddbuffer"; break;
+! default: break;
+! }
+ if (au_name != NULL && apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
+! curbuf->b_fname, TRUE, curbuf))
+ {
+ #ifdef FEAT_EVAL
+ if (aborting())
+--- 6945,6957 ----
+ int res;
+ int_u save_qfid;
+ win_T *wp = NULL;
++ char_u *qf_title;
++ linenr_T line1;
++ linenr_T line2;
+
+! au_name = cbuffer_get_auname(eap->cmdidx);
+ if (au_name != NULL && apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
+! curbuf->b_fname, TRUE, curbuf))
+ {
+ #ifdef FEAT_EVAL
+ if (aborting())
+***************
+*** 6887,6965 ****
+ wp = curwin;
+ }
+
+! if (*eap->arg == NUL)
+! buf = curbuf;
+! else if (*skipwhite(skipdigits(eap->arg)) == NUL)
+! buf = buflist_findnr(atoi((char *)eap->arg));
+! if (buf == NULL)
+! emsg(_(e_invarg));
+! else if (buf->b_ml.ml_mfp == NULL)
+! emsg(_("E681: Buffer is not loaded"));
+! else
+! {
+! if (eap->addr_count == 0)
+! {
+! eap->line1 = 1;
+! eap->line2 = buf->b_ml.ml_line_count;
+! }
+! if (eap->line1 < 1 || eap->line1 > buf->b_ml.ml_line_count
+! || eap->line2 < 1 || eap->line2 > buf->b_ml.ml_line_count)
+! emsg(_(e_invrange));
+! else
+! {
+! char_u *qf_title = qf_cmdtitle(*eap->cmdlinep);
+
+! if (buf->b_sfname)
+! {
+! vim_snprintf((char *)IObuff, IOSIZE, "%s (%s)",
+! (char *)qf_title, (char *)buf->b_sfname);
+! 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(qf_get_curlist(qi));
+
+! // Remember the current quickfix list identifier, so that we can
+! // check for autocommands changing the current quickfix list.
+! save_qfid = qf_get_curlist(qi)->qf_id;
+! if (au_name != NULL)
+! {
+! buf_T *curbuf_old = curbuf;
+
+! apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+! curbuf->b_fname, TRUE, curbuf);
+! if (curbuf != curbuf_old)
+! // Autocommands changed buffer, don't jump now, "qi" may
+! // be invalid.
+! res = 0;
+! }
+! // Jump to the first error for a new list and if autocmds didn't
+! // free the list.
+! 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);
+
+! decr_quickfix_busy();
+! }
+ }
+ }
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+ /*
+ * ":cexpr {expr}", ":cgetexpr {expr}", ":caddexpr {expr}" command.
+ * ":lexpr {expr}", ":lgetexpr {expr}", ":laddexpr {expr}" command.
+ */
+--- 6968,7045 ----
+ wp = curwin;
+ }
+
+! if (cbuffer_process_args(eap, &buf, &line1, &line2) == FAIL)
+! return;
+
+! qf_title = qf_cmdtitle(*eap->cmdlinep);
+
+! if (buf->b_sfname)
+! {
+! vim_snprintf((char *)IObuff, IOSIZE, "%s (%s)",
+! (char *)qf_title, (char *)buf->b_sfname);
+! 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),
+! line1, line2,
+! qf_title, NULL);
+! if (qf_stack_empty(qi))
+! {
+! decr_quickfix_busy();
+! return;
+! }
+! if (res >= 0)
+! qf_list_changed(qf_get_curlist(qi));
+
+! // Remember the current quickfix list identifier, so that we can
+! // check for autocommands changing the current quickfix list.
+! save_qfid = qf_get_curlist(qi)->qf_id;
+! if (au_name != NULL)
+! {
+! buf_T *curbuf_old = curbuf;
+
+! apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, curbuf->b_fname,
+! TRUE, curbuf);
+! if (curbuf != curbuf_old)
+! // Autocommands changed buffer, don't jump now, "qi" may
+! // be invalid.
+! res = 0;
+ }
++ // Jump to the first error for a new list and if autocmds didn't
++ // free the list.
++ 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);
++
++ decr_quickfix_busy();
+ }
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+ /*
++ * Return the autocmd name for the :cexpr Ex commands.
++ */
++ static char_u *
++ cexpr_get_auname(cmdidx_T cmdidx)
++ {
++ switch (cmdidx)
++ {
++ case CMD_cexpr: return (char_u *)"cexpr";
++ case CMD_cgetexpr: return (char_u *)"cgetexpr";
++ case CMD_caddexpr: return (char_u *)"caddexpr";
++ case CMD_lexpr: return (char_u *)"lexpr";
++ case CMD_lgetexpr: return (char_u *)"lgetexpr";
++ case CMD_laddexpr: return (char_u *)"laddexpr";
++ default: return NULL;
++ }
++ }
++
++ /*
+ * ":cexpr {expr}", ":cgetexpr {expr}", ":caddexpr {expr}" command.
+ * ":lexpr {expr}", ":lgetexpr {expr}", ":laddexpr {expr}" command.
+ */
+***************
+*** 6973,6988 ****
+ int_u save_qfid;
+ win_T *wp = NULL;
+
+! switch (eap->cmdidx)
+! {
+! case CMD_cexpr: au_name = (char_u *)"cexpr"; break;
+! case CMD_cgetexpr: au_name = (char_u *)"cgetexpr"; break;
+! case CMD_caddexpr: au_name = (char_u *)"caddexpr"; break;
+! case CMD_lexpr: au_name = (char_u *)"lexpr"; break;
+! case CMD_lgetexpr: au_name = (char_u *)"lgetexpr"; break;
+! case CMD_laddexpr: au_name = (char_u *)"laddexpr"; break;
+! default: break;
+! }
+ if (au_name != NULL && apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
+ curbuf->b_fname, TRUE, curbuf))
+ {
+--- 7053,7059 ----
+ int_u save_qfid;
+ win_T *wp = NULL;
+
+! au_name = cexpr_get_auname(eap->cmdidx);
+ if (au_name != NULL && apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
+ curbuf->b_fname, TRUE, curbuf))
+ {
+***************
+*** 7257,7266 ****
+ #endif
+ }
+
+- // Make 'cpoptions' empty, the 'l' flag should not be used here.
+- save_cpo = p_cpo;
+- p_cpo = empty_option;
+-
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = hgr_get_ll(&new_qi);
+--- 7328,7333 ----
+***************
+*** 7268,7273 ****
+--- 7335,7344 ----
+ return;
+ }
+
++ // Make 'cpoptions' empty, the 'l' flag should not be used here.
++ save_cpo = p_cpo;
++ p_cpo = empty_option;
++
+ incr_quickfix_busy();
+
+ #ifdef FEAT_MULTI_LANG
+*** ../vim-8.1.1061/src/version.c 2019-03-27 22:53:49.919226659 +0100
+--- src/version.c 2019-03-28 20:30:09.001593202 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1062,
+ /**/
+
+--
+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.1063 b/data/vim/patches/8.1.1063
new file mode 100644
index 000000000..5d98629d9
--- /dev/null
+++ b/data/vim/patches/8.1.1063
@@ -0,0 +1,100 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1063
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1063
+Problem: Insufficient testing for wildmenu completion.
+Solution: Extend the test case. (Dominique Pelle, closes #4182)
+Files: src/testdir/test_cmdline.vim
+
+
+*** ../vim-8.1.1062/src/testdir/test_cmdline.vim 2019-01-27 20:43:38.131329221 +0100
+--- src/testdir/test_cmdline.vim 2019-03-28 21:25:45.568869400 +0100
+***************
+*** 14,27 ****
+ endfunc
+
+ func Test_complete_wildmenu()
+! call writefile(['testfile1'], 'Xtestfile1')
+! call writefile(['testfile2'], 'Xtestfile2')
+ set wildmenu
+! call feedkeys(":e Xtest\t\t\r", "tx")
+ call assert_equal('testfile2', getline(1))
+
+! call delete('Xtestfile1')
+! call delete('Xtestfile2')
+ set nowildmenu
+ endfunc
+
+--- 14,61 ----
+ endfunc
+
+ func Test_complete_wildmenu()
+! call mkdir('Xdir1/Xdir2', 'p')
+! call writefile(['testfile1'], 'Xdir1/Xtestfile1')
+! call writefile(['testfile2'], 'Xdir1/Xtestfile2')
+! call writefile(['testfile3'], 'Xdir1/Xdir2/Xtestfile3')
+! call writefile(['testfile3'], 'Xdir1/Xdir2/Xtestfile4')
+ set wildmenu
+!
+! " Pressing <Tab> completes, and moves to next files when pressing again.
+! call feedkeys(":e Xdir1/\<Tab>\<Tab>\<CR>", 'tx')
+! call assert_equal('testfile1', getline(1))
+! call feedkeys(":e Xdir1/\<Tab>\<Tab>\<Tab>\<CR>", 'tx')
+! call assert_equal('testfile2', getline(1))
+!
+! " <S-Tab> is like <Tab> but begin with the last match and then go to
+! " previous.
+! call feedkeys(":e Xdir1/Xtest\<S-Tab>\<CR>", 'tx')
+ call assert_equal('testfile2', getline(1))
++ call feedkeys(":e Xdir1/Xtest\<S-Tab>\<S-Tab>\<CR>", 'tx')
++ call assert_equal('testfile1', getline(1))
++
++ " <Left>/<Right> to move to previous/next file.
++ call feedkeys(":e Xdir1/\<Tab>\<Right>\<CR>", 'tx')
++ call assert_equal('testfile1', getline(1))
++ call feedkeys(":e Xdir1/\<Tab>\<Right>\<Right>\<CR>", 'tx')
++ call assert_equal('testfile2', getline(1))
++ call feedkeys(":e Xdir1/\<Tab>\<Right>\<Right>\<Left>\<CR>", 'tx')
++ call assert_equal('testfile1', getline(1))
++
++ " <Up>/<Down> to go up/down directories.
++ call feedkeys(":e Xdir1/\<Tab>\<Down>\<CR>", 'tx')
++ call assert_equal('testfile3', getline(1))
++ call feedkeys(":e Xdir1/\<Tab>\<Down>\<Up>\<Right>\<CR>", 'tx')
++ call assert_equal('testfile1', getline(1))
+
+! " cleanup
+! %bwipe
+! call delete('Xdir1/Xdir2/Xtestfile4')
+! call delete('Xdir1/Xdir2/Xtestfile3')
+! call delete('Xdir1/Xtestfile2')
+! call delete('Xdir1/Xtestfile1')
+! call delete('Xdir1/Xdir2', 'd')
+! call delete('Xdir1', 'd')
+ set nowildmenu
+ endfunc
+
+*** ../vim-8.1.1062/src/version.c 2019-03-28 20:31:03.416924480 +0100
+--- src/version.c 2019-03-28 21:24:31.133423039 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1063,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+138. You develop a liking for cold coffee.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1064 b/data/vim/patches/8.1.1064
new file mode 100644
index 000000000..beb9a5613
--- /dev/null
+++ b/data/vim/patches/8.1.1064
@@ -0,0 +1,60 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1064
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1064
+Problem: No test for output conversion in the GTK GUI.
+Solution: Add a simplistic test.
+Files: src/testdir/test_gui.vim
+
+
+*** ../vim-8.1.1063/src/testdir/test_gui.vim 2019-01-08 21:05:47.820952657 +0100
+--- src/testdir/test_gui.vim 2019-03-28 21:47:50.312889040 +0100
+***************
+*** 720,725 ****
+--- 720,740 ----
+ let &guipty = guipty_saved
+ endfunc
+
++ func Test_encoding_conversion()
++ " GTK supports conversion between 'encoding' and "utf-8"
++ if has('gui_gtk')
++ let encoding_saved = &encoding
++ set encoding=latin1
++
++ " would be nice if we could take a screenshot
++ intro
++ " sets the window title
++ edit SomeFile
++
++ let &encoding = encoding_saved
++ endif
++ endfunc
++
+ func Test_shell_command()
+ new
+ r !echo hello
+*** ../vim-8.1.1063/src/version.c 2019-03-28 21:26:19.252618909 +0100
+--- src/version.c 2019-03-28 21:48:35.060652258 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1064,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+139. You down your lunch in five minutes, at your desk, so you can
+ spend the rest of the hour surfing the Net.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1065 b/data/vim/patches/8.1.1065
new file mode 100644
index 000000000..6d6391bb5
--- /dev/null
+++ b/data/vim/patches/8.1.1065
@@ -0,0 +1,60 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1065
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1065
+Problem: No test for using and deleting menu in the GUI.
+Solution: Add a test.
+Files: src/testdir/test_gui.vim
+
+
+*** ../vim-8.1.1064/src/testdir/test_gui.vim 2019-03-28 21:49:17.464422874 +0100
+--- src/testdir/test_gui.vim 2019-03-28 22:03:27.531223712 +0100
+***************
+*** 707,712 ****
+--- 707,727 ----
+ bwipe!
+ endfunc
+
++ func Test_menu()
++ " Check Help menu exists
++ let help_menu = execute('menu Help')
++ call assert_match('Overview', help_menu)
++
++ " Check Help menu works
++ emenu Help.Overview
++ call assert_equal('help', &buftype)
++ close
++
++ " Check deleting menu doesn't cause trouble.
++ aunmenu Help
++ call assert_fails('menu Help', 'E329:')
++ endfunc
++
+ func Test_set_guipty()
+ let guipty_saved = &guipty
+
+*** ../vim-8.1.1064/src/version.c 2019-03-28 21:49:17.464422874 +0100
+--- src/version.c 2019-03-28 22:04:20.406879634 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1065,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+140. You'd rather catch a score on the web than watch the game as
+ it is being played 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.1066 b/data/vim/patches/8.1.1066
new file mode 100644
index 000000000..e840e1eca
--- /dev/null
+++ b/data/vim/patches/8.1.1066
@@ -0,0 +1,370 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1066
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1066
+Problem: VIMDLL isn't actually used.
+Solution: Remove VIMDLL support.
+Files: src/gui_w32.c, src/main.c, src/os_w32exe.c, src/Make_bc5.mak,
+ src/os_w32dll.c
+
+
+*** ../vim-8.1.1065/src/gui_w32.c 2019-03-27 21:59:40.899552980 +0100
+--- src/gui_w32.c 2019-03-28 22:34:37.623933989 +0100
+***************
+*** 2280,2288 ****
+
+ #ifndef PROTO
+ void
+- #ifdef VIMDLL
+- _export
+- #endif
+ _cdecl
+ SaveInst(HINSTANCE hInst)
+ {
+--- 2280,2285 ----
+*** ../vim-8.1.1065/src/main.c 2019-02-17 17:44:36.211875510 +0100
+--- src/main.c 2019-03-28 22:34:52.943815136 +0100
+***************
+*** 96,104 ****
+ static int has_dash_c_arg = FALSE;
+
+ int
+- # ifdef VIMDLL
+- _export
+- # endif
+ # ifdef FEAT_GUI_MSWIN
+ # ifdef __BORLANDC__
+ _cdecl
+--- 96,101 ----
+*** ../vim-8.1.1065/src/os_w32exe.c 2019-03-27 21:59:40.899552980 +0100
+--- src/os_w32exe.c 2019-03-28 22:36:24.711105859 +0100
+***************
+*** 32,40 ****
+
+ #ifndef PROTO
+ #ifdef FEAT_GUI
+- #ifndef VIMDLL
+ void _cdecl SaveInst(HINSTANCE hInst);
+- #endif
+ static void (_cdecl *pSaveInst)(HINSTANCE);
+ #endif
+
+--- 32,38 ----
+***************
+*** 47,106 ****
+ {
+ int argc = 0;
+ char **argv = NULL;
+! #ifdef VIMDLL
+! char prog[256];
+! char *p;
+! HANDLE hLib;
+!
+! /* Ron: added full path name so that the $VIM variable will get set to our
+! * startup path (so the .vimrc file can be found w/o a VIM env. var.) */
+! GetModuleFileName(NULL, prog, 255);
+!
+! # ifdef DYNAMIC_GETTEXT
+! /* Initialize gettext library */
+! dyn_libintl_init();
+! # endif
+!
+! // LoadLibrary - get name of dll to load in here:
+! p = strrchr(prog, '\\');
+! if (p != NULL)
+! {
+! # ifdef DEBUG
+! strcpy(p+1, "vim32d.dll");
+! # else
+! strcpy(p+1, "vim32.dll");
+! # endif
+! }
+! hLib = LoadLibrary(prog);
+! if (hLib == NULL)
+! {
+! MessageBox(0, _("Could not load vim32.dll!"), _("VIM Error"), 0);
+! goto errout;
+! }
+! // fix up the function pointers
+! # ifdef FEAT_GUI
+! pSaveInst = GetProcAddress(hLib, (LPCSTR)2);
+! # endif
+! pmain = GetProcAddress(hLib, (LPCSTR)1);
+! if (pmain == NULL)
+! {
+! MessageBox(0, _("Could not fix up function pointers to the DLL!"),
+! _("VIM Error"),0);
+! goto errout;
+! }
+! #else
+! # ifdef FEAT_GUI
+ pSaveInst = SaveInst;
+! # endif
+ pmain =
+! # if defined(FEAT_GUI_MSWIN)
+ //&& defined(__MINGW32__)
+ VimMain
+! # else
+ main
+- # endif
+- ;
+ #endif
+ #ifdef FEAT_GUI
+ pSaveInst(
+ #ifdef __MINGW32__
+--- 45,61 ----
+ {
+ int argc = 0;
+ char **argv = NULL;
+! #ifdef FEAT_GUI
+ pSaveInst = SaveInst;
+! #endif
+ pmain =
+! #if defined(FEAT_GUI_MSWIN)
+ //&& defined(__MINGW32__)
+ VimMain
+! #else
+ main
+ #endif
++ ;
+ #ifdef FEAT_GUI
+ pSaveInst(
+ #ifdef __MINGW32__
+***************
+*** 112,121 ****
+ #endif
+ pmain(argc, argv);
+
+- #ifdef VIMDLL
+- FreeLibrary(hLib);
+- errout:
+- #endif
+ free_cmd_argsW();
+
+ return 0;
+--- 67,72 ----
+*** ../vim-8.1.1065/src/Make_bc5.mak 2019-02-18 21:41:34.477750367 +0100
+--- src/Make_bc5.mak 2019-03-28 22:41:57.052566361 +0100
+***************
+*** 72,78 ****
+ # 3 for 386, 4 for 486, 5 for pentium, 6 for pentium pro.
+ # USEDLL no or yes: set to yes to use the Runtime library DLL (no)
+ # For USEDLL=yes the cc3250.dll is required to run Vim.
+- # VIMDLL no or yes: create vim32.dll, and stub (g)vim.exe (no)
+ # ALIGN 1, 2 or 4: Alignment to use (4 for Win32)
+ # FASTCALL no or yes: set to yes to use register-based function protocol (yes)
+ # OPTIMIZE SPACE, SPEED, or MAXSPEED: type of optimization (MAXSPEED)
+--- 72,77 ----
+***************
+*** 187,195 ****
+ USEDLL = no
+ !endif
+
+- ### VIMDLL: yes for a DLL version of VIM (NOT RECOMMENDED), no otherwise
+- #VIMDLL = yes
+-
+ ### ALIGN: alignment you desire: (1,2 or 4: s/b 4 for Win32)
+ !if ("$(ALIGN)"=="")
+ ALIGN = 4
+--- 186,191 ----
+***************
+*** 411,422 ****
+ !else
+ TARGET = gvim.exe
+ !endif
+- !if ("$(VIMDLL)"=="yes")
+- EXETYPE=-WD
+- DEFINES = $(DEFINES) -DVIMDLL
+- !else
+ EXETYPE=-W
+- !endif
+ STARTUPOBJ = c0w32.obj
+ LINK2 = -aa
+ RESFILE = vim.res
+--- 407,413 ----
+***************
+*** 424,430 ****
+ !undef NETBEANS
+ !undef CHANNEL
+ !undef XPM
+- !undef VIMDLL
+ !if ("$(DEBUG)"=="yes")
+ TARGET = vimd.exe
+ !else
+--- 415,420 ----
+***************
+*** 515,527 ****
+
+ vimmain = \
+ $(OBJDIR)\os_w32exe.obj
+- !if ("$(VIMDLL)"=="yes")
+- vimwinmain = \
+- $(OBJDIR)\os_w32dll.obj
+- !else
+ vimwinmain = \
+ $(OBJDIR)\os_w32exe.obj
+- !endif
+
+ vimobj = \
+ $(OBJDIR)\arabic.obj \
+--- 505,512 ----
+***************
+*** 638,654 ****
+ $(OBJDIR)\xpm_w32.obj
+ !endif
+
+- !if ("$(VIMDLL)"=="yes")
+- vimdllobj = $(vimobj)
+- !if ("$(DEBUG)"=="yes")
+- DLLTARGET = vim32d.dll
+- !else
+- DLLTARGET = vim32.dll
+- !endif
+- !else
+- DLLTARGET = joebob
+- !endif
+-
+ !if ("$(GUI)"=="yes")
+ vimobj = $(vimobj) \
+ $(vimwinmain) \
+--- 623,628 ----
+***************
+*** 670,678 ****
+ !if ("$(USEDLL)"=="yes")
+ MSG = $(MSG) USEDLL
+ !endif
+- !if ("$(VIMDLL)"=="yes")
+- MSG = $(MSG) VIMDLL
+- !endif
+ !if ("$(FASTCALL)"=="yes")
+ MSG = $(MSG) FASTCALL
+ !endif
+--- 644,649 ----
+***************
+*** 747,755 ****
+
+ !message $(MSG)
+
+- !if ("$(VIMDLL)"=="yes")
+- TARGETS = $(DLLTARGET)
+- !endif
+ TARGETS = $(TARGETS) $(TARGET)
+
+ # Targets:
+--- 718,723 ----
+***************
+*** 832,891 ****
+ $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
+ cd ..
+
+- $(DLLTARGET): $(OBJDIR) $(vimdllobj)
+- $(LINK) @&&|
+- $(LFLAGSDLL) +
+- c0d32.obj +
+- $(vimdllobj)
+- $<,$*
+- !if ("$(CODEGUARD)"=="yes")
+- cg32.lib+
+- !endif
+- # $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
+- ole2w32.lib +
+- import32.lib+
+- !ifdef LUA
+- $(LUA_LIB_FLAG)lua.lib+
+- !endif
+- !ifdef PERL
+- $(PERL_LIB_FLAG)perl.lib+
+- !endif
+- !ifdef PYTHON
+- $(PYTHON_LIB_FLAG)python.lib+
+- !endif
+- !ifdef PYTHON3
+- $(PYTHON3_LIB_FLAG)python3.lib+
+- !endif
+- !ifdef RUBY
+- $(RUBY_LIB_FLAG)ruby.lib+
+- !endif
+- !ifdef TCL
+- $(TCL_LIB_FLAG)tcl.lib+
+- !endif
+- !ifdef XPM
+- xpm.lib+
+- !endif
+- !if ("$(USEDLL)"=="yes")
+- cw32i.lib
+- !else
+- cw32.lib
+- !endif
+- vim.def
+- |
+
+- !if ("$(VIMDLL)"=="yes")
+- $(TARGET): $(OBJDIR) $(DLLTARGET) $(vimmain) $(OBJDIR)\$(RESFILE)
+- !else
+ $(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
+- !endif
+ $(LINK) @&&|
+ $(LFLAGS) +
+ $(STARTUPOBJ) +
+- !if ("$(VIMDLL)"=="yes")
+- $(vimmain)
+- !else
+ $(vimobj)
+- !endif
+ $<,$*
+ !if ("$(CODEGUARD)"=="yes")
+ cg32.lib+
+--- 800,811 ----
+*** ../vim-8.1.1065/src/os_w32dll.c 2016-08-29 22:42:20.000000000 +0200
+--- src/os_w32dll.c 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,24 ****
+- /* vi:set ts=8 sts=4 sw=4 noet:
+- *
+- * VIM - Vi IMproved by Bram Moolenaar
+- * GUI support by Robert Webb
+- *
+- * 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.
+- */
+- /*
+- * Windows GUI: main program (DLL) entry point:
+- *
+- * Ron Aaron <ronaharon@yahoo.com> wrote this and the DLL support code.
+- */
+- #ifndef WIN32_LEAN_AND_MEAN
+- # define WIN32_LEAN_AND_MEAN
+- #endif
+- #include <windows.h>
+-
+- BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+- {
+- return TRUE;
+- }
+-
+--- 0 ----
+*** ../vim-8.1.1065/src/version.c 2019-03-28 22:04:53.290665042 +0100
+--- src/version.c 2019-03-28 22:42:21.808378560 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1066,
+ /**/
+
+--
+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.1067 b/data/vim/patches/8.1.1067
new file mode 100644
index 000000000..3c8d4cfc4
--- /dev/null
+++ b/data/vim/patches/8.1.1067
@@ -0,0 +1,95 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1067
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1067
+Problem: Issues added on github are unstructured.
+Solution: Add a bug and feature request template. (Ken Takata, closes #4183)
+Files: .github/ISSUE_TEMPLATE/feature_request.md,
+ .github/ISSUE_TEMPLATE/bug_report.md
+
+
+*** ../vim-8.1.1066/.github/ISSUE_TEMPLATE/feature_request.md 1970-01-01 01:00:00.000000000 +0100
+--- .github/ISSUE_TEMPLATE/feature_request.md 2019-03-29 10:51:32.460184550 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ ---
++ name: Feature request
++ about: Suggest an idea for this project
++ title: ''
++ labels: enhancement
++
++ ---
++
++ **Is your feature request related to a problem? Please describe.**
++ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
++ (If it is related to runtime files, please discuss with the maintainer.)
++
++ **Describe the solution you'd like**
++ A clear and concise description of what you want to happen.
++
++ **Describe alternatives you've considered**
++ A clear and concise description of any alternative solutions or features you've considered.
++
++ **Additional context**
++ Add any other context or screenshots about the feature request here.
+*** ../vim-8.1.1066/.github/ISSUE_TEMPLATE/bug_report.md 1970-01-01 01:00:00.000000000 +0100
+--- .github/ISSUE_TEMPLATE/bug_report.md 2019-03-29 10:51:32.460184550 +0100
+***************
+*** 0 ****
+--- 1,31 ----
++ ---
++ name: Bug report
++ about: Create a report to help us improve
++ title: ''
++ labels: ''
++
++ ---
++
++ **Describe the bug**
++ A clear and concise description of what the bug is.
++ (Issues related to the runtime files should be reported to the each maintainer. Not here.)
++
++ **To Reproduce**
++ Steps to reproduce the behavior:
++ 1. Run `vim --clean` (or `gvim --clean`, etc.)
++ 2. Type '....'
++ 3. See error
++
++ **Expected behavior**
++ A clear and concise description of what you expected to happen.
++
++ **Screenshots**
++ If applicable, add screenshots to help explain your problem.
++
++ **Environment (please complete the following information):**
++ - Version [e.g. 8.1.1234] (Or paste the result of `vim --version`.)
++ - OS: [e.g. Ubuntu 18.04, Windows 10 1809, macOS 10.14]
++ - Terminal: [e.g. GNOME Terminal, mintty, iTerm2, tmux, GNU screen] (Use NONE if you use the GUI.)
++
++ **Additional context**
++ Add any other context about the problem here.
+*** ../vim-8.1.1066/src/version.c 2019-03-28 22:43:12.103997449 +0100
+--- src/version.c 2019-03-29 10:52:49.675728803 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1067,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+142. You dream about creating the world's greatest web site.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1068 b/data/vim/patches/8.1.1068
new file mode 100644
index 000000000..48a5c99db
--- /dev/null
+++ b/data/vim/patches/8.1.1068
@@ -0,0 +1,588 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1068
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1068
+Problem: Cannot get all the information about current completion.
+Solution: Add complete_info(). (Shougo, Hirohito Higashi, closes #4106)
+Files: runtime/doc/eval.txt, runtime/doc/insert.txt,
+ runtime/doc/usr_41.txt, src/edit.c, src/evalfunc.c,
+ src/proto/edit.pro, src/testdir/test_popup.vim
+
+
+*** ../vim-8.1.1067/runtime/doc/eval.txt 2019-03-26 22:50:19.147698161 +0100
+--- runtime/doc/eval.txt 2019-03-29 12:09:44.357635376 +0100
+***************
+*** 2242,2254 ****
+ complete({startcol}, {matches}) none set Insert mode completion
+ complete_add({expr}) Number add completion match
+ complete_check() Number check for key typed during completion
+ confirm({msg} [, {choices} [, {default} [, {type}]]])
+ Number number of choice picked by user
+ copy({expr}) any make a shallow copy of {expr}
+ cos({expr}) Float cosine of {expr}
+ cosh({expr}) Float hyperbolic cosine of {expr}
+! count({list}, {expr} [, {ic} [, {start}]])
+! Number count how many {expr} are in {list}
+ cscope_connection([{num}, {dbpath} [, {prepend}]])
+ Number checks existence of cscope connection
+ cursor({lnum}, {col} [, {off}])
+--- 2267,2280 ----
+ complete({startcol}, {matches}) none set Insert mode completion
+ complete_add({expr}) Number add completion match
+ complete_check() Number check for key typed during completion
++ complete_info([{what}]) Dict get current completion information
+ confirm({msg} [, {choices} [, {default} [, {type}]]])
+ Number number of choice picked by user
+ copy({expr}) any make a shallow copy of {expr}
+ cos({expr}) Float cosine of {expr}
+ cosh({expr}) Float hyperbolic cosine of {expr}
+! count({comp}, {expr} [, {ic} [, {start}]])
+! Number count how many {expr} are in {comp}
+ cscope_connection([{num}, {dbpath} [, {prepend}]])
+ Number checks existence of cscope connection
+ cursor({lnum}, {col} [, {off}])
+***************
+*** 3512,3520 ****
+ Only to be used by the function specified with the
+ 'completefunc' option.
+
+ *confirm()*
+ confirm({msg} [, {choices} [, {default} [, {type}]]])
+! Confirm() offers the user a dialog, from which a choice can be
+ made. It returns the number of the choice. For the first
+ choice this is 1.
+ Note: confirm() is only supported when compiled with dialog
+--- 3539,3596 ----
+ Only to be used by the function specified with the
+ 'completefunc' option.
+
++ *complete_info()*
++ complete_info([{what}])
++ Returns a Dictionary with information about Insert mode
++ completion. See |ins-completion|.
++ The items are:
++ mode Current completion mode name string.
++ See |completion_info_mode| for the values.
++ pum_visible |TRUE| if popup menu is visible.
++ See |pumvisible()|.
++ items List of completion matches. Each item is a
++ dictionary containing the entries "word",
++ "abbr", "menu", "kind", "info" and "user_data".
++ See |complete-items|.
++ selected Selected item index. First index is zero.
++ Index is -1 if no item is selected (showing
++ typed text only)
++ inserted Inserted string. [NOT IMPLEMENT YET]
++
++ *complete_info_mode*
++ mode values are:
++ "" Not in completion mode
++ "keyword" Keyword completion |i_CTRL-X_CTRL-N|
++ "ctrl_x" Just pressed CTRL-X |i_CTRL-X|
++ "whole_line" Whole lines |i_CTRL-X_CTRL-L|
++ "files" File names |i_CTRL-X_CTRL-F|
++ "tags" Tags |i_CTRL-X_CTRL-]|
++ "path_defines" Definition completion |i_CTRL-X_CTRL-D|
++ "path_patterns" Include completion |i_CTRL-X_CTRL-I|
++ "dictionary" Dictionary |i_CTRL-X_CTRL-K|
++ "thesaurus" Thesaurus |i_CTRL-X_CTRL-T|
++ "cmdline" Vim Command line |i_CTRL-X_CTRL-V|
++ "function" User defined completion |i_CTRL-X_CTRL-U|
++ "omni" Omni completion |i_CTRL-X_CTRL-O|
++ "spell" Spelling suggestions |i_CTRL-X_s|
++ "eval" |complete()| completion
++ "unknown" Other internal modes
++
++ If the optional {what} list argument is supplied, then only
++ the items listed in {what} are returned. Unsupported items in
++ {what} are silently ignored.
++
++ Examples: >
++ " Get all items
++ call complete_info()
++ " Get only 'mode'
++ call complete_info(['mode'])
++ " Get only 'mode' and 'pum_visible'
++ call complete_info(['mode', 'pum_visible'])
++ <
+ *confirm()*
+ confirm({msg} [, {choices} [, {default} [, {type}]]])
+! confirm() offers the user a dialog, from which a choice can be
+ made. It returns the number of the choice. For the first
+ choice this is 1.
+ Note: confirm() is only supported when compiled with dialog
+*** ../vim-8.1.1067/runtime/doc/insert.txt 2019-01-11 13:02:20.101567912 +0100
+--- runtime/doc/insert.txt 2019-03-29 11:55:56.275979508 +0100
+***************
+*** 642,647 ****
+--- 642,648 ----
+ not a valid CTRL-X mode command. Valid keys are the CTRL-X command itself,
+ CTRL-N (next), and CTRL-P (previous).
+
++ To get the current completion information, |complete_info()| can be used.
+ Also see the 'infercase' option if you want to adjust the case of the match.
+
+ *complete_CTRL-E*
+***************
+*** 1051,1063 ****
+ number between zero and the cursor column "col('.')". This involves looking
+ at the characters just before the cursor and including those characters that
+ could be part of the completed item. The text between this column and the
+! cursor column will be replaced with the matches.
+
+! Special return values:
+! -1 If no completion can be done, the completion will be cancelled with an
+! error message.
+! -2 To cancel silently and stay in completion mode.
+! -3 To cancel silently and leave completion mode.
+
+ On the second invocation the arguments are:
+ a:findstart 0
+--- 1052,1064 ----
+ number between zero and the cursor column "col('.')". This involves looking
+ at the characters just before the cursor and including those characters that
+ could be part of the completed item. The text between this column and the
+! cursor column will be replaced with the matches. If the returned value is
+! larger than the cursor column, the cursor column is used.
+
+! Negative return values:
+! -2 To cancel silently and stay in completion mode.
+! -3 To cancel silently and leave completion mode.
+! Another negative value: completion starts at the cursor column
+
+ On the second invocation the arguments are:
+ a:findstart 0
+*** ../vim-8.1.1067/runtime/doc/usr_41.txt 2019-01-11 13:42:31.680331155 +0100
+--- runtime/doc/usr_41.txt 2019-03-29 11:55:56.275979508 +0100
+***************
+*** 829,834 ****
+--- 834,840 ----
+ complete() set found matches
+ complete_add() add to found matches
+ complete_check() check if completion should be aborted
++ complete_info() get current completion information
+ pumvisible() check if the popup menu is displayed
+
+ Folding: *folding-functions*
+*** ../vim-8.1.1067/src/edit.c 2019-03-26 22:46:01.885928372 +0100
+--- src/edit.c 2019-03-29 12:12:58.388217318 +0100
+***************
+*** 15,21 ****
+
+ #ifdef FEAT_INS_EXPAND
+ /*
+! * definitions used for CTRL-X submode
+ */
+ # define CTRL_X_WANT_IDENT 0x100
+
+--- 15,23 ----
+
+ #ifdef FEAT_INS_EXPAND
+ /*
+! * Definitions used for CTRL-X submode.
+! * Note: If you change CTRL-X submode, you must also maintain ctrl_x_msgs[] and
+! * ctrl_x_mode_names[].
+ */
+ # define CTRL_X_WANT_IDENT 0x100
+
+***************
+*** 40,57 ****
+ # define CTRL_X_MSG(i) ctrl_x_msgs[(i) & ~CTRL_X_WANT_IDENT]
+ # define CTRL_X_MODE_LINE_OR_EVAL(m) ((m) == CTRL_X_WHOLE_LINE || (m) == CTRL_X_EVAL)
+
+! /* Message for CTRL-X mode, index is ctrl_x_mode. */
+ static char *ctrl_x_msgs[] =
+ {
+! N_(" Keyword completion (^N^P)"), /* CTRL_X_NORMAL, ^P/^N compl. */
+ N_(" ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)"),
+! NULL, /* CTRL_X_SCROLL: depends on state */
+ N_(" Whole line completion (^L^N^P)"),
+ N_(" File name completion (^F^N^P)"),
+ N_(" Tag completion (^]^N^P)"),
+ N_(" Path pattern completion (^N^P)"),
+ N_(" Definition completion (^D^N^P)"),
+! NULL, /* CTRL_X_FINISHED */
+ N_(" Dictionary completion (^K^N^P)"),
+ N_(" Thesaurus completion (^T^N^P)"),
+ N_(" Command-line completion (^V^N^P)"),
+--- 42,59 ----
+ # define CTRL_X_MSG(i) ctrl_x_msgs[(i) & ~CTRL_X_WANT_IDENT]
+ # define CTRL_X_MODE_LINE_OR_EVAL(m) ((m) == CTRL_X_WHOLE_LINE || (m) == CTRL_X_EVAL)
+
+! // Message for CTRL-X mode, index is ctrl_x_mode.
+ static char *ctrl_x_msgs[] =
+ {
+! N_(" Keyword completion (^N^P)"), // CTRL_X_NORMAL, ^P/^N compl.
+ N_(" ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)"),
+! NULL, // CTRL_X_SCROLL: depends on state
+ N_(" Whole line completion (^L^N^P)"),
+ N_(" File name completion (^F^N^P)"),
+ N_(" Tag completion (^]^N^P)"),
+ N_(" Path pattern completion (^N^P)"),
+ N_(" Definition completion (^D^N^P)"),
+! NULL, // CTRL_X_FINISHED
+ N_(" Dictionary completion (^K^N^P)"),
+ N_(" Thesaurus completion (^T^N^P)"),
+ N_(" Command-line completion (^V^N^P)"),
+***************
+*** 59,67 ****
+ N_(" Omni completion (^O^N^P)"),
+ N_(" Spelling suggestion (s^N^P)"),
+ N_(" Keyword Local completion (^N^P)"),
+! NULL, /* CTRL_X_EVAL doesn't use msg. */
+ };
+
+ static char e_hitend[] = N_("Hit end of paragraph");
+ # ifdef FEAT_COMPL_FUNC
+ static char e_complwin[] = N_("E839: Completion function changed window");
+--- 61,90 ----
+ N_(" Omni completion (^O^N^P)"),
+ N_(" Spelling suggestion (s^N^P)"),
+ N_(" Keyword Local completion (^N^P)"),
+! NULL, // CTRL_X_EVAL doesn't use msg.
+ };
+
++ static char *ctrl_x_mode_names[] = {
++ "keyword",
++ "ctrl_x",
++ "unknown", // CTRL_X_SCROLL
++ "whole_line",
++ "files",
++ "tags",
++ "path_patterns",
++ "path_defines",
++ "unknown", // CTRL_X_FINISHED
++ "dictionary",
++ "thesaurus",
++ "cmdline",
++ "function",
++ "omni",
++ "spell",
++ NULL, // CTRL_X_LOCAL_MSG only used in "ctrl_x_msgs"
++ "eval"
++ };
++
++
+ static char e_hitend[] = N_("Hit end of paragraph");
+ # ifdef FEAT_COMPL_FUNC
+ static char e_complwin[] = N_("E839: Completion function changed window");
+***************
+*** 163,168 ****
+--- 186,192 ----
+ static char_u *find_line_end(char_u *ptr);
+ static void ins_compl_free(void);
+ static void ins_compl_clear(void);
++ static char_u *ins_compl_mode(void);
+ static int ins_compl_bs(void);
+ static int ins_compl_need_restart(void);
+ static void ins_compl_new_leader(void);
+***************
+*** 3525,3530 ****
+--- 3549,3656 ----
+ return compl_started;
+ }
+
++
++ /*
++ * Get complete information
++ */
++ void
++ get_complete_info(list_T *what_list, dict_T *retdict)
++ {
++ int ret = OK;
++ listitem_T *item;
++ #define CI_WHAT_MODE 0x01
++ #define CI_WHAT_PUM_VISIBLE 0x02
++ #define CI_WHAT_ITEMS 0x04
++ #define CI_WHAT_SELECTED 0x08
++ #define CI_WHAT_INSERTED 0x10
++ #define CI_WHAT_ALL 0xff
++ int what_flag;
++
++ if (what_list == NULL)
++ what_flag = CI_WHAT_ALL;
++ else
++ {
++ what_flag = 0;
++ for (item = what_list->lv_first; item != NULL; item = item->li_next)
++ {
++ char_u *what = tv_get_string(&item->li_tv);
++
++ if (STRCMP(what, "mode") == 0)
++ what_flag |= CI_WHAT_MODE;
++ else if (STRCMP(what, "pum_visible") == 0)
++ what_flag |= CI_WHAT_PUM_VISIBLE;
++ else if (STRCMP(what, "items") == 0)
++ what_flag |= CI_WHAT_ITEMS;
++ else if (STRCMP(what, "selected") == 0)
++ what_flag |= CI_WHAT_SELECTED;
++ else if (STRCMP(what, "inserted") == 0)
++ what_flag |= CI_WHAT_INSERTED;
++ }
++ }
++
++ if (ret == OK && (what_flag & CI_WHAT_MODE))
++ ret = dict_add_string(retdict, "mode", ins_compl_mode());
++
++ if (ret == OK && (what_flag & CI_WHAT_PUM_VISIBLE))
++ ret = dict_add_number(retdict, "pum_visible", pum_visible());
++
++ if (ret == OK && (what_flag & CI_WHAT_ITEMS))
++ {
++ list_T *li;
++ dict_T *di;
++ compl_T *match;
++
++ li = list_alloc();
++ if (li == NULL)
++ return;
++ ret = dict_add_list(retdict, "items", li);
++ if (ret == OK && compl_first_match != NULL)
++ {
++ match = compl_first_match;
++ do
++ {
++ if (!(match->cp_flags & ORIGINAL_TEXT))
++ {
++ di = dict_alloc();
++ if (di == NULL)
++ return;
++ ret = list_append_dict(li, di);
++ if (ret != OK)
++ return;
++ dict_add_string(di, "word", match->cp_str);
++ dict_add_string(di, "abbr", match->cp_text[CPT_ABBR]);
++ dict_add_string(di, "menu", match->cp_text[CPT_MENU]);
++ dict_add_string(di, "kind", match->cp_text[CPT_KIND]);
++ dict_add_string(di, "info", match->cp_text[CPT_INFO]);
++ dict_add_string(di, "user_data",
++ match->cp_text[CPT_USER_DATA]);
++ }
++ match = match->cp_next;
++ }
++ while (match != NULL && match != compl_first_match);
++ }
++ }
++
++ if (ret == OK && (what_flag & CI_WHAT_SELECTED))
++ ret = dict_add_number(retdict, "selected", (compl_curr_match != NULL) ?
++ compl_curr_match->cp_number - 1 : -1);
++
++ // TODO
++ // if (ret == OK && (what_flag & CI_WHAT_INSERTED))
++ }
++
++ /*
++ * Return Insert completion mode name string
++ */
++ static char_u *
++ ins_compl_mode(void)
++ {
++ if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET || compl_started)
++ return (char_u *)ctrl_x_mode_names[ctrl_x_mode & ~CTRL_X_WANT_IDENT];
++
++ return (char_u *)"";
++ }
++
+ /*
+ * Delete one character before the cursor and show the subset of the matches
+ * that match the word that is now before the cursor.
+*** ../vim-8.1.1067/src/evalfunc.c 2019-03-26 22:50:19.151698126 +0100
+--- src/evalfunc.c 2019-03-29 12:15:43.859016653 +0100
+***************
+*** 113,118 ****
+--- 113,119 ----
+ static void f_complete(typval_T *argvars, typval_T *rettv);
+ static void f_complete_add(typval_T *argvars, typval_T *rettv);
+ static void f_complete_check(typval_T *argvars, typval_T *rettv);
++ static void f_complete_info(typval_T *argvars, typval_T *rettv);
+ #endif
+ static void f_confirm(typval_T *argvars, typval_T *rettv);
+ static void f_copy(typval_T *argvars, typval_T *rettv);
+***************
+*** 593,598 ****
+--- 594,600 ----
+ {"complete", 2, 2, f_complete},
+ {"complete_add", 1, 1, f_complete_add},
+ {"complete_check", 0, 0, f_complete_check},
++ {"complete_info", 0, 1, f_complete_info},
+ #endif
+ {"confirm", 1, 4, f_confirm},
+ {"copy", 1, 1, f_copy},
+***************
+*** 2600,2605 ****
+--- 2602,2630 ----
+ rettv->vval.v_number = compl_interrupted;
+ RedrawingDisabled = saved;
+ }
++
++ /*
++ * "complete_info()" function
++ */
++ static void
++ f_complete_info(typval_T *argvars, typval_T *rettv)
++ {
++ list_T *what_list = NULL;
++
++ if (rettv_dict_alloc(rettv) != OK)
++ return;
++
++ if (argvars[0].v_type != VAR_UNKNOWN)
++ {
++ if (argvars[0].v_type != VAR_LIST)
++ {
++ emsg(_(e_listreq));
++ return;
++ }
++ what_list = argvars[0].vval.v_list;
++ }
++ get_complete_info(what_list, rettv->vval.v_dict);
++ }
+ #endif
+
+ /*
+*** ../vim-8.1.1067/src/proto/edit.pro 2019-01-31 13:47:51.126632619 +0100
+--- src/proto/edit.pro 2019-03-29 12:13:26.104015732 +0100
+***************
+*** 18,23 ****
+--- 18,24 ----
+ char_u *find_word_start(char_u *ptr);
+ char_u *find_word_end(char_u *ptr);
+ int ins_compl_active(void);
++ void get_complete_info(list_T *what_list, dict_T *retdict);
+ int ins_compl_add_tv(typval_T *tv, int dir);
+ void ins_compl_check_keys(int frequency, int in_compl_func);
+ int get_literal(void);
+*** ../vim-8.1.1067/src/testdir/test_popup.vim 2019-01-06 13:10:46.332499076 +0100
+--- src/testdir/test_popup.vim 2019-03-29 11:55:56.279979474 +0100
+***************
+*** 896,899 ****
+--- 896,1000 ----
+ endtry
+ endfunc
+
++ func Test_popup_complete_info_01()
++ new
++ inoremap <buffer><F5> <C-R>=complete_info().mode<CR>
++ func s:complTestEval() abort
++ call complete(1, ['aa', 'ab'])
++ return ''
++ endfunc
++ inoremap <buffer><F6> <C-R>=s:complTestEval()<CR>
++ call writefile([
++ \ 'dummy dummy.txt 1',
++ \], 'Xdummy.txt')
++ setlocal tags=Xdummy.txt
++ setlocal dictionary=Xdummy.txt
++ setlocal thesaurus=Xdummy.txt
++ setlocal omnifunc=syntaxcomplete#Complete
++ setlocal completefunc=syntaxcomplete#Complete
++ setlocal spell
++ for [keys, mode_name] in [
++ \ ["", ''],
++ \ ["\<C-X>", 'ctrl_x'],
++ \ ["\<C-X>\<C-N>", 'keyword'],
++ \ ["\<C-X>\<C-P>", 'keyword'],
++ \ ["\<C-X>\<C-L>", 'whole_line'],
++ \ ["\<C-X>\<C-F>", 'files'],
++ \ ["\<C-X>\<C-]>", 'tags'],
++ \ ["\<C-X>\<C-D>", 'path_defines'],
++ \ ["\<C-X>\<C-I>", 'path_patterns'],
++ \ ["\<C-X>\<C-K>", 'dictionary'],
++ \ ["\<C-X>\<C-T>", 'thesaurus'],
++ \ ["\<C-X>\<C-V>", 'cmdline'],
++ \ ["\<C-X>\<C-U>", 'function'],
++ \ ["\<C-X>\<C-O>", 'omni'],
++ \ ["\<C-X>s", 'spell'],
++ \ ["\<F6>", 'eval'],
++ \]
++ call feedkeys("i" . keys . "\<F5>\<Esc>", 'tx')
++ call assert_equal(mode_name, getline('.'))
++ %d
++ endfor
++ call delete('Xdummy.txt')
++ bwipe!
++ endfunc
++
++ func UserDefinedComplete(findstart, base)
++ if a:findstart
++ return 0
++ else
++ return [
++ \ { 'word': 'Jan', 'menu': 'January' },
++ \ { 'word': 'Feb', 'menu': 'February' },
++ \ { 'word': 'Mar', 'menu': 'March' },
++ \ { 'word': 'Apr', 'menu': 'April' },
++ \ { 'word': 'May', 'menu': 'May' },
++ \ ]
++ endif
++ endfunc
++
++ func GetCompleteInfo()
++ if empty(g:compl_what)
++ let g:compl_info = complete_info()
++ else
++ let g:compl_info = complete_info(g:compl_what)
++ endif
++ return ''
++ endfunc
++
++ func Test_popup_complete_info_02()
++ new
++ inoremap <buffer><F5> <C-R>=GetCompleteInfo()<CR>
++ setlocal completefunc=UserDefinedComplete
++
++ let d = {
++ \ 'mode': 'function',
++ \ 'pum_visible': 1,
++ \ 'items': [
++ \ {'word': 'Jan', 'menu': 'January', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''},
++ \ {'word': 'Feb', 'menu': 'February', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''},
++ \ {'word': 'Mar', 'menu': 'March', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''},
++ \ {'word': 'Apr', 'menu': 'April', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''},
++ \ {'word': 'May', 'menu': 'May', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''}
++ \ ],
++ \ 'selected': 0,
++ \ }
++
++ let g:compl_what = []
++ call feedkeys("i\<C-X>\<C-U>\<F5>", 'tx')
++ call assert_equal(d, g:compl_info)
++
++ let g:compl_what = ['mode', 'pum_visible', 'selected']
++ call remove(d, 'items')
++ call feedkeys("i\<C-X>\<C-U>\<F5>", 'tx')
++ call assert_equal(d, g:compl_info)
++
++ let g:compl_what = ['mode']
++ call remove(d, 'selected')
++ call remove(d, 'pum_visible')
++ call feedkeys("i\<C-X>\<C-U>\<F5>", 'tx')
++ call assert_equal(d, g:compl_info)
++ bwipe!
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.1067/src/version.c 2019-03-29 10:54:17.711209062 +0100
+--- src/version.c 2019-03-29 11:57:29.903220370 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1068,
+ /**/
+
+--
+Drink wet cement and get really stoned.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1069 b/data/vim/patches/8.1.1069
new file mode 100644
index 000000000..564ceb6e9
--- /dev/null
+++ b/data/vim/patches/8.1.1069
@@ -0,0 +1,415 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1069
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1069
+Problem: Source README file doesn't look nice on github.
+Solution: Turn it into markdown, still readable as plain text.
+ (WenxuanHuang, closes #4141)
+Files: src/README.txt, src/README.md, Filelist
+
+
+*** ../vim-8.1.1068/src/README.txt 2019-02-13 22:45:21.508636195 +0100
+--- src/README.txt 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,162 ****
+- README for the Vim source code
+-
+- Here are a few hints for finding your way around the source code. This
+- doesn't make it less complex than it is, but it gets you started.
+-
+- You might also want to read ":help development".
+-
+-
+- JUMPING AROUND
+-
+- First of all, use ":make tags" to generate a tags file, so that you can jump
+- around in the source code.
+-
+- To jump to a function or variable definition, move the cursor on the name and
+- use the CTRL-] command. Use CTRL-T or CTRL-O to jump back.
+-
+- To jump to a file, move the cursor on its name and use the "gf" command.
+-
+- Most code can be found in a file with an obvious name (incomplete list):
+- autocmd.c autocommands
+- buffer.c manipulating buffers (loaded files)
+- diff.c diff mode (vimdiff)
+- eval.c expression evaluation
+- fileio.c reading and writing files
+- findfile.c search for files in 'path'
+- fold.c folding
+- getchar.c getting characters and key mapping
+- indent.c C and Lisp indentation
+- mark.c marks
+- mbyte.c multi-byte character handling
+- memfile.c storing lines for buffers in a swapfile
+- memline.c storing lines for buffers in memory
+- menu.c menus
+- message.c (error) messages
+- ops.c handling operators ("d", "y", "p")
+- option.c options
+- quickfix.c quickfix commands (":make", ":cn")
+- regexp.c pattern matching
+- screen.c updating the windows
+- search.c pattern searching
+- sign.c signs
+- spell.c spell checking
+- syntax.c syntax and other highlighting
+- tag.c tags
+- term.c terminal handling, termcap codes
+- undo.c undo and redo
+- window.c handling split windows
+-
+-
+- DEBUGGING
+-
+- If you have a reasonable recent version of gdb, you can use the :Termdebug
+- command to debug Vim. See ":help :Termdebug".
+-
+- When something is time critical or stepping through code is a hassle, use the
+- channel logging to create a time-stamped log file. Add lines to the code like
+- this:
+- ch_log(NULL, "Value is now %02x", value);
+- After compiling and starting Vim, do:
+- :call ch_logfile('debuglog', 'w')
+- And edit "debuglog" to see what happens. The channel functions already have
+- ch_log() calls, thus you always see that in the log.
+-
+-
+- IMPORTANT VARIABLES
+-
+- The current mode is stored in "State". The values it can have are NORMAL,
+- INSERT, CMDLINE, and a few others.
+-
+- The current window is "curwin". The current buffer is "curbuf". These point
+- to structures with the cursor position in the window, option values, the file
+- name, etc. These are defined in structs.h.
+-
+- All the global variables are declared in globals.h.
+-
+-
+- THE MAIN LOOP
+-
+- This is conveniently called main_loop(). It updates a few things and then
+- calls normal_cmd() to process a command. This returns when the command is
+- finished.
+-
+- The basic idea is that Vim waits for the user to type a character and
+- processes it until another character is needed. Thus there are several places
+- where Vim waits for a character to be typed. The vgetc() function is used for
+- this. It also handles mapping.
+-
+- Updating the screen is mostly postponed until a command or a sequence of
+- commands has finished. The work is done by update_screen(), which calls
+- win_update() for every window, which calls win_line() for every line.
+- See the start of screen.c for more explanations.
+-
+-
+- COMMAND-LINE MODE
+-
+- When typing a ":", normal_cmd() will call getcmdline() to obtain a line with
+- an Ex command. getcmdline() contains a loop that will handle each typed
+- character. It returns when hitting <CR> or <Esc> or some other character that
+- ends the command line mode.
+-
+-
+- EX COMMANDS
+-
+- Ex commands are handled by the function do_cmdline(). It does the generic
+- parsing of the ":" command line and calls do_one_cmd() for each separate
+- command. It also takes care of while loops.
+-
+- do_one_cmd() parses the range and generic arguments and puts them in the
+- exarg_t and passes it to the function that handles the command.
+-
+- The ":" commands are listed in ex_cmds.h. The third entry of each item is the
+- name of the function that handles the command. The last entry are the flags
+- that are used for the command.
+-
+-
+- NORMAL MODE COMMANDS
+-
+- The Normal mode commands are handled by the normal_cmd() function. It also
+- handles the optional count and an extra character for some commands. These
+- are passed in a cmdarg_t to the function that handles the command.
+-
+- There is a table nv_cmds in normal.c which lists the first character of every
+- command. The second entry of each item is the name of the function that
+- handles the command.
+-
+-
+- INSERT MODE COMMANDS
+-
+- When doing an "i" or "a" command, normal_cmd() will call the edit() function.
+- It contains a loop that waits for the next character and handles it. It
+- returns when leaving Insert mode.
+-
+-
+- OPTIONS
+-
+- There is a list with all option names in option.c, called options[].
+-
+-
+- THE GUI
+-
+- Most of the GUI code is implemented like it was a clever terminal. Typing a
+- character, moving a scrollbar, clicking the mouse, etc. are all translated
+- into events which are written in the input buffer. These are read by the
+- main code, just like reading from a terminal. The code for this is scattered
+- through gui.c. For example: gui_send_mouse_event() for a mouse click and
+- gui_menu_cb() for a menu action. Key hits are handled by the system-specific
+- GUI code, which calls add_to_input_buf() to send the key code.
+-
+- Updating the GUI window is done by writing codes in the output buffer, just
+- like writing to a terminal. When the buffer gets full or is flushed,
+- gui_write() will parse the codes and draw the appropriate items. Finally the
+- system-specific GUI code will be called to do the work.
+-
+-
+- DEBUGGING THE GUI
+-
+- Remember to prevent that gvim forks and the debugger thinks Vim has exited,
+- add the "-f" argument. In gdb: "run -f -g".
+-
+- When stepping through display updating code, the focus event is triggered
+- when going from the debugger to Vim and back. To avoid this, recompile with
+- some code in gui_focus_change() disabled.
+--- 0 ----
+*** ../vim-8.1.1068/src/README.md 2019-03-29 13:09:27.404892258 +0100
+--- src/README.md 2019-03-29 13:03:37.460960186 +0100
+***************
+*** 0 ****
+--- 1,190 ----
++ ![Vim Logo](https://github.com/vim/vim/blob/master/runtime/vimlogo.gif)
++
++ # Vim source code #
++
++ Here are a few hints for finding your way around the source code. This
++ doesn't make it less complex than it is, but it gets you started.
++
++ You might also want to read
++ [`:help development`](http://vimdoc.sourceforge.net/htmldoc/develop.html#development).
++
++
++ ## Jumping around ##
++
++ First of all, use `:make tags` to generate a tags file, so that you can jump
++ around in the source code.
++
++ To jump to a function or variable definition, move the cursor on the name and
++ use the `CTRL-]` command. Use `CTRL-T` or `CTRL-O` to jump back.
++
++ To jump to a file, move the cursor on its name and use the `gf` command.
++
++ Most code can be found in a file with an obvious name (incomplete list):
++
++ File name | Description
++ --------- | -----------
++ autocmd.c | autocommands
++ buffer.c | manipulating buffers (loaded files)
++ diff.c | diff mode (vimdiff)
++ eval.c | expression evaluation
++ fileio.c | reading and writing files
++ findfile.c | search for files in 'path'
++ fold.c | folding
++ getchar.c | getting characters and key mapping
++ indent.c | C and Lisp indentation
++ mark.c | marks
++ mbyte.c | multi-byte character handling
++ memfile.c | storing lines for buffers in a swapfile
++ memline.c | storing lines for buffers in memory
++ menu.c | menus
++ message.c | (error) messages
++ ops.c | handling operators ("d", "y", "p")
++ option.c | options
++ quickfix.c | quickfix commands (":make", ":cn")
++ regexp.c | pattern matching
++ screen.c | updating the windows
++ search.c | pattern searching
++ sign.c | signs
++ spell.c | spell checking
++ syntax.c | syntax and other highlighting
++ tag.c | tags
++ term.c | terminal handling, termcap codes
++ undo.c | undo and redo
++ window.c | handling split windows
++
++
++ ## Debugging ##
++
++ If you have a reasonable recent version of gdb, you can use the `:Termdebug`
++ command to debug Vim. See `:help :Termdebug`.
++
++ When something is time critical or stepping through code is a hassle, use the
++ channel logging to create a time-stamped log file. Add lines to the code like
++ this:
++
++ ch_log(NULL, "Value is now %02x", value);
++
++ After compiling and starting Vim, do:
++
++ :call ch_logfile('debuglog', 'w')
++
++ And edit `debuglog` to see what happens. The channel functions already have
++ `ch_log()` calls, thus you always see that in the log.
++
++
++ ## Important Variables ##
++
++ The current mode is stored in `State`. The values it can have are `NORMAL`,
++ `INSERT`, `CMDLINE`, and a few others.
++
++ The current window is `curwin`. The current buffer is `curbuf`. These point
++ to structures with the cursor position in the window, option values, the file
++ name, etc. These are defined in
++ [`structs.h`](https://github.com/vim/vim/blob/master/src/globals.h).
++
++ All the global variables are declared in
++ [`globals.h`](https://github.com/vim/vim/blob/master/src/structs.h).
++
++
++ ## The main loop ##
++
++ This is conveniently called `main_loop()`. It updates a few things and then
++ calls `normal_cmd()` to process a command. This returns when the command is
++ finished.
++
++ The basic idea is that Vim waits for the user to type a character and
++ processes it until another character is needed. Thus there are several places
++ where Vim waits for a character to be typed. The `vgetc()` function is used
++ for this. It also handles mapping.
++
++ Updating the screen is mostly postponed until a command or a sequence of
++ commands has finished. The work is done by `update_screen()`, which calls
++ `win_update()` for every window, which calls `win_line()` for every line.
++ See the start of
++ [`screen.c`](https://github.com/vim/vim/blob/master/src/screen.c)
++ for more explanations.
++
++
++ ## Command-line mode ##
++
++ When typing a `:`, `normal_cmd()` will call `getcmdline()` to obtain a line
++ with an Ex command. `getcmdline()` contains a loop that will handle each typed
++ character. It returns when hitting `CR` or `Esc` or some other character that
++ ends the command line mode.
++
++
++ ## Ex commands ##
++
++ Ex commands are handled by the function `do_cmdline()`. It does the generic
++ parsing of the `:` command line and calls `do_one_cmd()` for each separate
++ command. It also takes care of while loops.
++
++ `do_one_cmd()` parses the range and generic arguments and puts them in the
++ `exarg_t` and passes it to the function that handles the command.
++
++ The `:` commands are listed in `ex_cmds.h`. The third entry of each item is
++ the name of the function that handles the command. The last entry are the
++ flags that are used for the command.
++
++
++ ## Normal mode commands ##
++
++ The Normal mode commands are handled by the `normal_cmd()` function. It also
++ handles the optional count and an extra character for some commands. These
++ are passed in a `cmdarg_t` to the function that handles the command.
++
++ There is a table `nv_cmds` in
++ [`normal.c`](https://github.com/vim/vim/blob/master/src/normal.c)
++ which lists the first character of every command. The second entry of each
++ item is the name of the function that handles the command.
++
++
++ ## Insert mode commands ##
++
++ When doing an `i` or `a` command, `normal_cmd()` will call the `edit()`
++ function. It contains a loop that waits for the next character and handles it.
++ It returns when leaving Insert mode.
++
++
++ ## Options ##
++
++ There is a list with all option names in
++ [`option.c`](https://github.com/vim/vim/blob/master/src/option.c),
++ called `options[]`.
++
++
++ ## The GUI ##
++
++ Most of the GUI code is implemented like it was a clever terminal. Typing a
++ character, moving a scrollbar, clicking the mouse, etc. are all translated
++ into events which are written in the input buffer. These are read by the
++ main code, just like reading from a terminal. The code for this is scattered
++ through [`gui.c`](https://github.com/vim/vim/blob/master/src/gui.c).
++ For example, `gui_send_mouse_event()` for a mouse click and `gui_menu_cb()` for
++ a menu action. Key hits are handled by the system-specific GUI code, which
++ calls `add_to_input_buf()` to send the key code.
++
++ Updating the GUI window is done by writing codes in the output buffer, just
++ like writing to a terminal. When the buffer gets full or is flushed,
++ `gui_write()` will parse the codes and draw the appropriate items. Finally the
++ system-specific GUI code will be called to do the work.
++
++
++ ## Debugging the GUI ##
++
++ Remember to prevent that gvim forks and the debugger thinks Vim has exited,
++ add the `-f` argument. In gdb: `run -f -g`.
++
++ When stepping through display updating code, the focus event is triggered
++ when going from the debugger to Vim and back. To avoid this, recompile with
++ some code in `gui_focus_change()` disabled.
++
++
++ ## Contributing ##
++
++ If you would like to help making Vim better, see the
++ [`CONTRIBUTING.md`](https://github.com/vim/vim/blob/master/CONTRIBUTING.md)
++ file.
++
++
++ This is `README.md` for version 8.1 of the Vim source code.
+*** ../vim-8.1.1068/Filelist 2019-03-22 16:33:03.483016118 +0100
+--- Filelist 2019-03-29 13:09:00.533173252 +0100
+***************
+*** 9,15 ****
+ appveyor.yml \
+ ci/appveyor.bat \
+ src/Make_all.mak \
+! src/README.txt \
+ src/alloc.h \
+ src/arabic.c \
+ src/ascii.h \
+--- 9,15 ----
+ appveyor.yml \
+ ci/appveyor.bat \
+ src/Make_all.mak \
+! src/README.md \
+ src/alloc.h \
+ src/arabic.c \
+ src/ascii.h \
+*** ../vim-8.1.1068/src/version.c 2019-03-29 12:19:34.953348924 +0100
+--- src/version.c 2019-03-29 12:55:49.505486487 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1069,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+145. You e-mail your boss, informing him you'll be late.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1070 b/data/vim/patches/8.1.1070
new file mode 100644
index 000000000..b2fa8715e
--- /dev/null
+++ b/data/vim/patches/8.1.1070
@@ -0,0 +1,140 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1070
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1070
+Problem: Issue templates are not good enough.
+Solution: Rephrase to anticipate unexperienced users.
+Files: .github/ISSUE_TEMPLATE/feature_request.md,
+ .github/ISSUE_TEMPLATE/bug_report.md
+
+
+*** ../vim-8.1.1069/.github/ISSUE_TEMPLATE/feature_request.md 2019-03-29 10:54:17.711209062 +0100
+--- .github/ISSUE_TEMPLATE/feature_request.md 2019-03-29 11:14:35.536012616 +0100
+***************
+*** 1,14 ****
+ ---
+ name: Feature request
+! about: Suggest an idea for this project
+ title: ''
+ labels: enhancement
+
+ ---
+
+! **Is your feature request related to a problem? Please describe.**
+! A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+! (If it is related to runtime files, please discuss with the maintainer.)
+
+ **Describe the solution you'd like**
+ A clear and concise description of what you want to happen.
+--- 1,16 ----
+ ---
+ name: Feature request
+! about: Suggest an enhancement for Vim
+ title: ''
+ labels: enhancement
+
+ ---
+
+! _Instructions: Replace the template text and remove irrelevant text (including this line)_
+!
+! **Is your feature request related something that is currently hard to do? Please describe.**
+! A clear and concise description of what is hard to do. Ex. It is difficult to [...] when [...]
+! (If it is related to runtime files, please check their header for where to discuss enhancements.)
+
+ **Describe the solution you'd like**
+ A clear and concise description of what you want to happen.
+*** ../vim-8.1.1069/.github/ISSUE_TEMPLATE/bug_report.md 2019-03-29 10:54:17.711209062 +0100
+--- .github/ISSUE_TEMPLATE/bug_report.md 2019-03-29 11:08:15.042261774 +0100
+***************
+*** 1,31 ****
+ ---
+ name: Bug report
+! about: Create a report to help us improve
+ title: ''
+ labels: ''
+
+ ---
+
+ **Describe the bug**
+ A clear and concise description of what the bug is.
+! (Issues related to the runtime files should be reported to the each maintainer. Not here.)
+
+ **To Reproduce**
+! Steps to reproduce the behavior:
+ 1. Run `vim --clean` (or `gvim --clean`, etc.)
+! 2. Type '....'
+! 3. See error
+
+ **Expected behavior**
+ A clear and concise description of what you expected to happen.
+
+ **Screenshots**
+! If applicable, add screenshots to help explain your problem.
+
+ **Environment (please complete the following information):**
+! - Version [e.g. 8.1.1234] (Or paste the result of `vim --version`.)
+ - OS: [e.g. Ubuntu 18.04, Windows 10 1809, macOS 10.14]
+! - Terminal: [e.g. GNOME Terminal, mintty, iTerm2, tmux, GNU screen] (Use NONE if you use the GUI.)
+
+ **Additional context**
+ Add any other context about the problem here.
+--- 1,34 ----
+ ---
+ name: Bug report
+! about: Create a report to help us improve Vim
+ title: ''
+ labels: ''
+
+ ---
+
++ _Instructions: Replace the template text and remove irrelevant text (including this line)_
++
+ **Describe the bug**
+ A clear and concise description of what the bug is.
+! (Issues related to the runtime files should be reported to their maintainer, check the file header.)
+
+ **To Reproduce**
+! Detailed steps to reproduce the behavior:
+ 1. Run `vim --clean` (or `gvim --clean`, etc.)
+! 2. Edit `filename`
+! 3. Type '....'
+! 4. Describe the error
+
+ **Expected behavior**
+ A clear and concise description of what you expected to happen.
+
+ **Screenshots**
+! If applicable, copy/paste the text or add screenshots to help explain your problem.
+
+ **Environment (please complete the following information):**
+! - Vim version [e.g. 8.1.1234] (Or paste the result of `vim --version`.)
+ - OS: [e.g. Ubuntu 18.04, Windows 10 1809, macOS 10.14]
+! - Terminal: [e.g. GNOME Terminal, mintty, iTerm2, tmux, GNU screen] (Use GUI if you use the GUI.)
+
+ **Additional context**
+ Add any other context about the problem here.
+*** ../vim-8.1.1069/src/version.c 2019-03-29 13:09:37.972782868 +0100
+--- src/version.c 2019-03-29 13:11:50.039463519 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1070,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+146. You experience ACTUAL physical withdrawal symptoms when away
+ from your 'puter and the net.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1071 b/data/vim/patches/8.1.1071
new file mode 100644
index 000000000..32bed27a3
--- /dev/null
+++ b/data/vim/patches/8.1.1071
@@ -0,0 +1,321 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1071
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1071
+Problem: Cannot get composing characters from the screen.
+Solution: Add screenchars() and screenstring(). (partly by Ozaki Kiichi,
+ closes #4059)
+Files: runtime/doc/eval.txt, runtime/doc/usr_41.txt, src/evalfunc.c,
+ src/testdir/test_utf8.vim, src/testdir/view_util.vim
+
+
+*** ../vim-8.1.1070/runtime/doc/eval.txt 2019-03-29 12:19:34.949348952 +0100
+--- runtime/doc/eval.txt 2019-03-29 13:32:41.481037953 +0100
+***************
+*** 2500,2507 ****
+--- 2525,2534 ----
+ rubyeval({expr}) any evaluate |Ruby| expression
+ screenattr({row}, {col}) Number attribute at screen position
+ screenchar({row}, {col}) Number character at screen position
++ screenchars({row}, {col}) List List of characters at screen position
+ screencol() Number current cursor column
+ screenrow() Number current cursor row
++ screenstring({row}, {col}) String characters at screen position
+ search({pattern} [, {flags} [, {stopline} [, {timeout}]]])
+ Number search for {pattern}
+ searchdecl({name} [, {global} [, {thisblock}]])
+***************
+*** 7458,7463 ****
+--- 7512,7524 ----
+ This is mainly to be used for testing.
+ Returns -1 when row or col is out of range.
+
++ screenchars({row}, {col}) *screenchars()*
++ The result is a List of Numbers. The first number is the same
++ as what |screenchar()| returns. Further numbers are
++ composing characters on top of the base character.
++ This is mainly to be used for testing.
++ Returns an empty List when row or col is out of range.
++
+ screencol() *screencol()*
+ The result is a Number, which is the current screen column of
+ the cursor. The leftmost column has number 1.
+***************
+*** 7479,7484 ****
+--- 7540,7553 ----
+
+ Note: Same restrictions as with |screencol()|.
+
++ screenstring({row}, {col}) *screenstring()*
++ The result is a String that contains the base character and
++ any composing characters at position [row, col] on the screen.
++ This is like |screenchars()| but returning a String with the
++ characters.
++ This is mainly to be used for testing.
++ Returns an empty String when row or col is out of range.
++
+ search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()*
+ Search for regexp pattern {pattern}. The search starts at the
+ cursor position (you can use |cursor()| to set it).
+*** ../vim-8.1.1070/runtime/doc/usr_41.txt 2019-03-29 12:19:34.953348924 +0100
+--- runtime/doc/usr_41.txt 2019-03-29 13:44:52.996710729 +0100
+***************
+*** 722,727 ****
+--- 723,730 ----
+ diff_filler() get the number of filler lines above a line
+ screenattr() get attribute at a screen line/row
+ screenchar() get character code at a screen line/row
++ screenchars() get character codes at a screen line/row
++ screenstring() get string of characters at a screen line/row
+
+ Working with text in the current buffer: *text-functions*
+ getline() get a line or list of lines from the buffer
+*** ../vim-8.1.1070/src/evalfunc.c 2019-03-29 12:19:34.953348924 +0100
+--- src/evalfunc.c 2019-03-29 13:44:04.812822817 +0100
+***************
+*** 344,351 ****
+--- 344,353 ----
+ #endif
+ static void f_screenattr(typval_T *argvars, typval_T *rettv);
+ static void f_screenchar(typval_T *argvars, typval_T *rettv);
++ static void f_screenchars(typval_T *argvars, typval_T *rettv);
+ static void f_screencol(typval_T *argvars, typval_T *rettv);
+ static void f_screenrow(typval_T *argvars, typval_T *rettv);
++ static void f_screenstring(typval_T *argvars, typval_T *rettv);
+ static void f_search(typval_T *argvars, typval_T *rettv);
+ static void f_searchdecl(typval_T *argvars, typval_T *rettv);
+ static void f_searchpair(typval_T *argvars, typval_T *rettv);
+***************
+*** 839,846 ****
+--- 841,850 ----
+ #endif
+ {"screenattr", 2, 2, f_screenattr},
+ {"screenchar", 2, 2, f_screenchar},
++ {"screenchars", 2, 2, f_screenchars},
+ {"screencol", 0, 0, f_screencol},
+ {"screenrow", 0, 0, f_screenrow},
++ {"screenstring", 2, 2, f_screenstring},
+ {"search", 1, 4, f_search},
+ {"searchdecl", 1, 3, f_searchdecl},
+ {"searchpair", 3, 7, f_searchpair},
+***************
+*** 10430,10437 ****
+
+ row = (int)tv_get_number_chk(&argvars[0], NULL) - 1;
+ col = (int)tv_get_number_chk(&argvars[1], NULL) - 1;
+! if (row < 0 || row >= screen_Rows
+! || col < 0 || col >= screen_Columns)
+ c = -1;
+ else
+ {
+--- 10434,10440 ----
+
+ row = (int)tv_get_number_chk(&argvars[0], NULL) - 1;
+ col = (int)tv_get_number_chk(&argvars[1], NULL) - 1;
+! if (row < 0 || row >= screen_Rows || col < 0 || col >= screen_Columns)
+ c = -1;
+ else
+ {
+***************
+*** 10445,10450 ****
+--- 10448,10486 ----
+ }
+
+ /*
++ * "screenchars()" function
++ */
++ static void
++ f_screenchars(typval_T *argvars, typval_T *rettv)
++ {
++ int row;
++ int col;
++ int off;
++ int c;
++ int i;
++
++ if (rettv_list_alloc(rettv) == FAIL)
++ return;
++ row = (int)tv_get_number_chk(&argvars[0], NULL) - 1;
++ col = (int)tv_get_number_chk(&argvars[1], NULL) - 1;
++ if (row < 0 || row >= screen_Rows || col < 0 || col >= screen_Columns)
++ return;
++
++ off = LineOffset[row] + col;
++ if (enc_utf8 && ScreenLinesUC[off] != 0)
++ c = ScreenLinesUC[off];
++ else
++ c = ScreenLines[off];
++ list_append_number(rettv->vval.v_list, (varnumber_T)c);
++
++ if (enc_utf8)
++
++ for (i = 0; i < Screen_mco && ScreenLinesC[i][off] != 0; ++i)
++ list_append_number(rettv->vval.v_list,
++ (varnumber_T)ScreenLinesC[i][off]);
++ }
++
++ /*
+ * "screencol()" function
+ *
+ * First column is 1 to be consistent with virtcol().
+***************
+*** 10465,10470 ****
+--- 10501,10543 ----
+ }
+
+ /*
++ * "screenstring()" function
++ */
++ static void
++ f_screenstring(typval_T *argvars, typval_T *rettv)
++ {
++ int row;
++ int col;
++ int off;
++ int c;
++ int i;
++ char_u buf[MB_MAXBYTES + 1];
++ int buflen = 0;
++
++ rettv->vval.v_string = NULL;
++ rettv->v_type = VAR_STRING;
++
++ row = (int)tv_get_number_chk(&argvars[0], NULL) - 1;
++ col = (int)tv_get_number_chk(&argvars[1], NULL) - 1;
++ if (row < 0 || row >= screen_Rows || col < 0 || col >= screen_Columns)
++ return;
++
++ off = LineOffset[row] + col;
++ if (enc_utf8 && ScreenLinesUC[off] != 0)
++ c = ScreenLinesUC[off];
++ else
++ c = ScreenLines[off];
++ buflen += mb_char2bytes(c, buf);
++
++ if (enc_utf8)
++ for (i = 0; i < Screen_mco && ScreenLinesC[i][off] != 0; ++i)
++ buflen += mb_char2bytes(ScreenLinesC[i][off], buf + buflen);
++
++ buf[buflen] = NUL;
++ rettv->vval.v_string = vim_strsave(buf);
++ }
++
++ /*
+ * "search()" function
+ */
+ static void
+*** ../vim-8.1.1070/src/testdir/test_utf8.vim 2019-01-24 17:59:35.143217444 +0100
+--- src/testdir/test_utf8.vim 2019-03-29 14:01:18.960304440 +0100
+***************
+*** 1,5 ****
+--- 1,6 ----
+ " Tests for Unicode manipulations
+
++ source view_util.vim
+
+ " Visual block Insert adjusts for multi-byte char
+ func Test_visual_block_insert()
+***************
+*** 60,62 ****
+--- 61,97 ----
+ call assert_equal(2, virtcol("'["))
+ call assert_equal(2, virtcol("']"))
+ endfunc
++
++ func Test_screenchar_utf8()
++ new
++
++ " 1-cell, with composing characters
++ call setline(1, ["ABC\u0308"])
++ redraw
++ call assert_equal([0x0041], screenchars(1, 1))
++ call assert_equal([0x0042], screenchars(1, 2))
++ call assert_equal([0x0043, 0x0308], screenchars(1, 3))
++ call assert_equal("A", screenstring(1, 1))
++ call assert_equal("B", screenstring(1, 2))
++ call assert_equal("C\u0308", screenstring(1, 3))
++
++ " 2-cells, with composing characters
++ let text = "\u3042\u3044\u3046\u3099"
++ call setline(1, text)
++ redraw
++ call assert_equal([0x3042], screenchars(1, 1))
++ call assert_equal([0], screenchars(1, 2))
++ call assert_equal([0x3044], screenchars(1, 3))
++ call assert_equal([0], screenchars(1, 4))
++ call assert_equal([0x3046, 0x3099], screenchars(1, 5))
++
++ call assert_equal("\u3042", screenstring(1, 1))
++ call assert_equal("", screenstring(1, 2))
++ call assert_equal("\u3044", screenstring(1, 3))
++ call assert_equal("", screenstring(1, 4))
++ call assert_equal("\u3046\u3099", screenstring(1, 5))
++
++ call assert_equal([text . ' '], ScreenLinesUtf8(1, 8))
++
++ bwipe!
++ endfunc
+*** ../vim-8.1.1070/src/testdir/view_util.vim 2017-09-30 20:54:26.000000000 +0200
+--- src/testdir/view_util.vim 2019-03-29 13:57:25.433562107 +0100
+***************
+*** 5,10 ****
+--- 5,11 ----
+ finish
+ endif
+
++ " Get text on the screen, without composing characters.
+ " ScreenLines(lnum, width) or
+ " ScreenLines([start, end], width)
+ function! ScreenLines(lnum, width) abort
+***************
+*** 22,27 ****
+--- 23,47 ----
+ endfor
+ return lines
+ endfunction
++
++ " Get text on the screen, including composing characters.
++ " ScreenLines(lnum, width) or
++ " ScreenLines([start, end], width)
++ function! ScreenLinesUtf8(lnum, width) abort
++ redraw!
++ if type(a:lnum) == v:t_list
++ let start = a:lnum[0]
++ let end = a:lnum[1]
++ else
++ let start = a:lnum
++ let end = a:lnum
++ endif
++ let lines = []
++ for l in range(start, end)
++ let lines += [join(map(range(1, a:width), 'screenstring(l, v:val)'), '')]
++ endfor
++ return lines
++ endfunction
+
+ function! ScreenAttrs(lnum, width) abort
+ redraw!
+*** ../vim-8.1.1070/src/version.c 2019-03-29 13:12:36.163021160 +0100
+--- src/version.c 2019-03-29 14:02:22.863949517 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1071,
+ /**/
+
+--
+We are the Borg of GNU GPL. We will assimilate your source code.
+Resistance is futile.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1072 b/data/vim/patches/8.1.1072
new file mode 100644
index 000000000..8ac8a2202
--- /dev/null
+++ b/data/vim/patches/8.1.1072
@@ -0,0 +1,1388 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1072
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1072
+Problem: Extending sign and foldcolumn below the text is confusing.
+Solution: Let the sign and foldcolumn stop at the last text line, just like
+ the line number column. Also stop the command line window leader.
+ (Christian Brabandt, closes #3964)
+Files: src/screen.c, src/testdir/test_diffmode.vim,
+ src/testdir/dumps/Test_diff_of_diff_01.dump,
+ 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_06.0.dump,
+ src/testdir/dumps/Test_diff_06.1.dump,
+ src/testdir/dumps/Test_diff_06.2.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/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,
+ 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/testdir/dumps/Test_folds_with_rnu_01.dump,
+ src/testdir/dumps/Test_folds_with_rnu_02.dump
+
+
+*** ../vim-8.1.1071/src/screen.c 2019-03-21 21:45:30.883282076 +0100
+--- src/screen.c 2019-03-29 17:08:14.578317867 +0100
+***************
+*** 123,129 ****
+
+ static void win_update(win_T *wp);
+ static void win_redr_status(win_T *wp, int ignore_pum);
+! static void win_draw_end(win_T *wp, int c1, int c2, int row, int endrow, hlf_T hl);
+ #ifdef FEAT_FOLDING
+ static void fold_line(win_T *wp, long fold_count, foldinfo_T *foldinfo, linenr_T lnum, int row);
+ static void fill_foldcolumn(char_u *p, win_T *wp, int closed, linenr_T lnum);
+--- 123,129 ----
+
+ static void win_update(win_T *wp);
+ static void win_redr_status(win_T *wp, int ignore_pum);
+! static void win_draw_end(win_T *wp, int c1, int c2, int draw_margin, int row, int endrow, hlf_T hl);
+ #ifdef FEAT_FOLDING
+ static void fold_line(win_T *wp, long fold_count, foldinfo_T *foldinfo, linenr_T lnum, int row);
+ static void fill_foldcolumn(char_u *p, win_T *wp, int closed, linenr_T lnum);
+***************
+*** 2217,2223 ****
+ }
+ else
+ {
+! win_draw_end(wp, '@', ' ', srow, wp->w_height, HLF_AT);
+ wp->w_botline = lnum;
+ }
+ }
+--- 2217,2223 ----
+ }
+ else
+ {
+! win_draw_end(wp, '@', ' ', TRUE, srow, wp->w_height, HLF_AT);
+ wp->w_botline = lnum;
+ }
+ }
+***************
+*** 2231,2246 ****
+ j = diff_check_fill(wp, wp->w_botline);
+ if (j > 0 && !wp->w_botfill)
+ {
+! /*
+! * Display filler lines at the end of the file
+! */
+ if (char2cells(fill_diff) > 1)
+ i = '-';
+ else
+ i = fill_diff;
+ if (row + j > wp->w_height)
+ j = wp->w_height - row;
+! win_draw_end(wp, i, i, row, row + (int)j, HLF_DED);
+ row += j;
+ }
+ #endif
+--- 2231,2244 ----
+ j = diff_check_fill(wp, wp->w_botline);
+ if (j > 0 && !wp->w_botfill)
+ {
+! // Display filler lines at the end of the file.
+ if (char2cells(fill_diff) > 1)
+ i = '-';
+ else
+ i = fill_diff;
+ if (row + j > wp->w_height)
+ j = wp->w_height - row;
+! win_draw_end(wp, i, i, TRUE, row, row + (int)j, HLF_DED);
+ row += j;
+ }
+ #endif
+***************
+*** 2248,2256 ****
+ else if (dollar_vcol == -1)
+ wp->w_botline = lnum;
+
+! /* make sure the rest of the screen is blank */
+! /* put '~'s on rows that aren't part of the file. */
+! win_draw_end(wp, '~', ' ', row, wp->w_height, HLF_EOB);
+ }
+
+ #ifdef SYN_TIME_LIMIT
+--- 2246,2254 ----
+ else if (dollar_vcol == -1)
+ wp->w_botline = lnum;
+
+! // Make sure the rest of the screen is blank
+! // put '~'s on rows that aren't part of the file.
+! win_draw_end(wp, '~', ' ', FALSE, row, wp->w_height, HLF_EOB);
+ }
+
+ #ifdef SYN_TIME_LIMIT
+***************
+*** 2305,2417 ****
+ }
+
+ /*
+! * Clear the rest of the window and mark the unused lines with "c1". use "c2"
+! * as the filler character.
+ */
+ static void
+ win_draw_end(
+ win_T *wp,
+ int c1,
+ int c2,
+ int row,
+ int endrow,
+ hlf_T hl)
+ {
+- #if defined(FEAT_FOLDING) || defined(FEAT_SIGNS) || defined(FEAT_CMDWIN)
+ int n = 0;
+! # define FDC_OFF n
+! #else
+! # define FDC_OFF 0
+! #endif
+ #ifdef FEAT_FOLDING
+! int fdc = compute_foldcolumn(wp, 0);
+ #endif
+
+ #ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+ {
+- /* No check for cmdline window: should never be right-left. */
+- # ifdef FEAT_FOLDING
+- n = fdc;
+-
+- if (n > 0)
+- {
+- /* draw the fold column at the right */
+- if (n > wp->w_width)
+- n = wp->w_width;
+- screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+- W_ENDCOL(wp) - n, (int)W_ENDCOL(wp),
+- ' ', ' ', HL_ATTR(HLF_FC));
+- }
+- # endif
+- # ifdef FEAT_SIGNS
+- if (signcolumn_on(wp))
+- {
+- int nn = n + 2;
+-
+- /* draw the sign column left of the fold column */
+- if (nn > wp->w_width)
+- nn = wp->w_width;
+- screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+- W_ENDCOL(wp) - nn, (int)W_ENDCOL(wp) - n,
+- ' ', ' ', HL_ATTR(HLF_SC));
+- n = nn;
+- }
+- # endif
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+! wp->w_wincol, W_ENDCOL(wp) - 1 - FDC_OFF,
+ c2, c2, HL_ATTR(hl));
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+! W_ENDCOL(wp) - 1 - FDC_OFF, W_ENDCOL(wp) - FDC_OFF,
+ c1, c2, HL_ATTR(hl));
+ }
+ else
+ #endif
+ {
+- #ifdef FEAT_CMDWIN
+- if (cmdwin_type != 0 && wp == curwin)
+- {
+- /* draw the cmdline character in the leftmost column */
+- n = 1;
+- if (n > wp->w_width)
+- n = wp->w_width;
+- screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+- wp->w_wincol, (int)wp->w_wincol + n,
+- cmdwin_type, ' ', HL_ATTR(HLF_AT));
+- }
+- #endif
+- #ifdef FEAT_FOLDING
+- if (fdc > 0)
+- {
+- int nn = n + fdc;
+-
+- /* draw the fold column at the left */
+- if (nn > wp->w_width)
+- nn = wp->w_width;
+- screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+- wp->w_wincol + n, (int)wp->w_wincol + nn,
+- ' ', ' ', HL_ATTR(HLF_FC));
+- n = nn;
+- }
+- #endif
+- #ifdef FEAT_SIGNS
+- if (signcolumn_on(wp))
+- {
+- int nn = n + 2;
+-
+- /* draw the sign column after the fold column */
+- if (nn > wp->w_width)
+- nn = wp->w_width;
+- screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+- wp->w_wincol + n, (int)wp->w_wincol + nn,
+- ' ', ' ', HL_ATTR(HLF_SC));
+- n = nn;
+- }
+- #endif
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+! wp->w_wincol + FDC_OFF, (int)W_ENDCOL(wp),
+ c1, c2, HL_ATTR(hl));
+ }
+ set_empty_rows(wp, row);
+ }
+
+--- 2303,2399 ----
+ }
+
+ /*
+! * Call screen_fill() with the columns adjusted for 'rightleft' if needed.
+! * Return the new offset.
+! */
+! static int
+! screen_fill_end(
+! win_T *wp,
+! int c1,
+! int c2,
+! int off,
+! int width,
+! int row,
+! int endrow,
+! int attr)
+! {
+! int nn = off + width;
+!
+! if (nn > wp->w_width)
+! nn = wp->w_width;
+! #ifdef FEAT_RIGHTLEFT
+! if (wp->w_p_rl)
+! {
+! screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+! W_ENDCOL(wp) - nn, (int)W_ENDCOL(wp) - off,
+! c1, c2, attr);
+! }
+! else
+! #endif
+! screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+! wp->w_wincol + off, (int)wp->w_wincol + nn,
+! c1, c2, attr);
+! return nn;
+! }
+!
+! /*
+! * Clear lines near the end the window and mark the unused lines with "c1".
+! * use "c2" as the filler character.
+! * When "draw_margin" is TRUE then draw the sign, fold and number columns.
+ */
+ static void
+ win_draw_end(
+ win_T *wp,
+ int c1,
+ int c2,
++ int draw_margin,
+ int row,
+ int endrow,
+ hlf_T hl)
+ {
+ int n = 0;
+!
+! if (draw_margin)
+! {
+ #ifdef FEAT_FOLDING
+! int fdc = compute_foldcolumn(wp, 0);
+!
+! if (fdc > 0)
+! // draw the fold column
+! n = screen_fill_end(wp, ' ', ' ', n, fdc,
+! row, endrow, HL_ATTR(HLF_FC));
+ #endif
++ #ifdef FEAT_SIGNS
++ if (signcolumn_on(wp))
++ // draw the sign column
++ n = screen_fill_end(wp, ' ', ' ', n, 2,
++ row, endrow, HL_ATTR(HLF_SC));
++ #endif
++ if ((wp->w_p_nu || wp->w_p_rnu)
++ && vim_strchr(p_cpo, CPO_NUMCOL) == NULL)
++ // draw the number column
++ n = screen_fill_end(wp, ' ', ' ', n, number_width(wp) + 1,
++ row, endrow, HL_ATTR(HLF_N));
++ }
+
+ #ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+ {
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+! wp->w_wincol, W_ENDCOL(wp) - 1 - n,
+ c2, c2, HL_ATTR(hl));
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+! W_ENDCOL(wp) - 1 - n, W_ENDCOL(wp) - n,
+ c1, c2, HL_ATTR(hl));
+ }
+ else
+ #endif
+ {
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+! wp->w_wincol + n, (int)W_ENDCOL(wp),
+ c1, c2, HL_ATTR(hl));
+ }
++
+ set_empty_rows(wp, row);
+ }
+
+***************
+*** 5885,5891 ****
+ #endif
+ )
+ {
+! win_draw_end(wp, '@', ' ', row, wp->w_height, HLF_AT);
+ draw_vsep_win(wp, row);
+ row = endrow;
+ }
+--- 5867,5873 ----
+ #endif
+ )
+ {
+! win_draw_end(wp, '@', ' ', TRUE, row, wp->w_height, HLF_AT);
+ draw_vsep_win(wp, row);
+ row = endrow;
+ }
+*** ../vim-8.1.1071/src/testdir/test_diffmode.vim 2019-02-19 23:00:19.568664524 +0100
+--- src/testdir/test_diffmode.vim 2019-03-29 17:49:39.374664588 +0100
+***************
+*** 757,763 ****
+ " 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")
+
+--- 757,763 ----
+ " 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")
+
+***************
+*** 915,920 ****
+--- 915,922 ----
+ \ 'vnew',
+ \ 'call setline(1, ["aa","bb","cc"])',
+ \ 'windo diffthis',
++ \ '1wincmd w',
++ \ 'setlocal number',
+ \ ], 'Xtest_diff_diff')
+ let buf = RunVimInTerminal('-S Xtest_diff_diff', {})
+
+*** ../vim-8.1.1071/src/testdir/dumps/Test_diff_of_diff_01.dump 2018-10-31 22:57:07.913017514 +0100
+--- src/testdir/dumps/Test_diff_of_diff_01.dump 2019-03-29 17:49:46.406620536 +0100
+***************
+*** 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
+--- 1,20 ----
+! | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| >a+0#0000000&@1| @28||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32
+! | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|2| |b+0#0000000&@1| @28||+1&&| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0@1| @32
+! | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|3| |c+0#0000000&@1| @28||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32
+! | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|-+0#4040ff13#afffff255@30||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|@+0#0000000#5fd7ff255@1| |-|3|,|2| |+|5|,|7| |@@1| @19
+! | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|-+0#4040ff13#afffff255@30||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255@1| @32
+! | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|-+0#4040ff13#afffff255@30||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|e+0#0000000#5fd7ff255@1| @32
+! | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|-+0#4040ff13#afffff255@30||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|f+0#0000000#5fd7ff255@1| @32
+! |~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1
+ | +0&&@74
+*** ../vim-8.1.1071/src/testdir/dumps/Test_diff_01.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_01.dump 2019-03-29 17:11:57.288892936 +0100
+***************
+*** 6,20 ****
+ | +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
+--- 6,20 ----
+ | +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
+! |~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_02.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_02.dump 2019-03-29 17:11:58.360886115 +0100
+***************
+*** 6,20 ****
+ | +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
+--- 6,20 ----
+ | +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
+! |~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_03.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_03.dump 2019-03-29 17:11:59.432879298 +0100
+***************
+*** 6,20 ****
+ | +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
+--- 6,20 ----
+ | +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#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_04.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_04.dump 2019-03-29 17:12:00.496872532 +0100
+***************
+*** 6,20 ****
+ | +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
+--- 6,20 ----
+ | +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&#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_05.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_05.dump 2019-03-29 17:12:01.564865741 +0100
+***************
+*** 10,20 ****
+ | +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
+--- 10,20 ----
+ | +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&#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_06.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_06.dump 2019-03-29 17:12:02.636858923 +0100
+***************
+*** 10,20 ****
+ | +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
+--- 10,20 ----
+ | +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#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_06.0.dump 2019-02-19 23:00:19.568664524 +0100
+--- src/testdir/dumps/Test_diff_06.0.dump 2019-03-29 17:12:05.828838631 +0100
+***************
+*** 5,20 ****
+ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |6|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |6|-@19
+ | @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
+! | +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|+|=|c|o|n|t|e|x|t|:|0| @51
+--- 5,20 ----
+ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |6|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |6|-@19
+ | @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#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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|+|=|c|o|n|t|e|x|t|:|0| @51
+*** ../vim-8.1.1071/src/testdir/dumps/Test_diff_06.1.dump 2019-02-19 23:00:19.568664524 +0100
+--- src/testdir/dumps/Test_diff_06.1.dump 2019-03-29 17:12:04.760845419 +0100
+***************
+*** 5,20 ****
+ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |6|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |6|-@19
+ | @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
+! | +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|+|=|c|o|n|t|e|x|t|:|1| @51
+--- 5,20 ----
+ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |6|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |6|-@19
+ | @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#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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|+|=|c|o|n|t|e|x|t|:|1| @51
+*** ../vim-8.1.1071/src/testdir/dumps/Test_diff_06.2.dump 2019-02-19 23:00:19.568664524 +0100
+--- src/testdir/dumps/Test_diff_06.2.dump 2019-03-29 17:12:03.696852183 +0100
+***************
+*** 8,20 ****
+ | @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
+ |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&&@1|s|e|t| |d|i|f@1|o|p|t|+|=|c|o|n|t|e|x|t|:|2| @50
+--- 8,20 ----
+ | @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#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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&&@1|s|e|t| |d|i|f@1|o|p|t|+|=|c|o|n|t|e|x|t|:|2| @50
+*** ../vim-8.1.1071/src/testdir/dumps/Test_diff_10.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_10.dump 2019-03-29 17:12:07.052830846 +0100
+***************
+*** 8,20 ****
+ | +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
+--- 8,20 ----
+ | +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#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_11.dump 2018-12-04 22:24:12.193693584 +0100
+--- src/testdir/dumps/Test_diff_11.dump 2019-03-29 17:12:10.252810506 +0100
+***************
+*** 8,20 ****
+ | +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&&| @73
+--- 8,20 ----
+ | +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#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_12.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_12.dump 2019-03-29 17:12:11.324803692 +0100
+***************
+*** 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
+--- 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
+! |~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_13.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_13.dump 2019-03-29 17:12:12.396796877 +0100
+***************
+*** 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
+--- 1,20 ----
+ |-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@34||+1&&|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@34
+! |~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_14.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_14.dump 2019-03-29 17:12:13.472790039 +0100
+***************
+*** 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
+--- 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#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_15.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_15.dump 2019-03-29 17:12:14.544783228 +0100
+***************
+*** 6,20 ****
+ | +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
+--- 6,20 ----
+ | +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#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_16.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_16.dump 2019-03-29 17:12:15.600776515 +0100
+***************
+*** 6,20 ****
+ | +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
+--- 6,20 ----
+ | +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#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_17.dump 2018-09-15 19:17:07.510653263 +0200
+--- src/testdir/dumps/Test_diff_17.dump 2019-03-29 17:12:16.676769679 +0100
+***************
+*** 3,20 ****
+ | +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
+--- 3,20 ----
+ | +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#4040ff13&| @35||+1#0000000&| +0#0000e05#a8a8a8255@1|y+2#0000000#ff404010@2| +0&#ffd7ff255@31
+! |~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_18.dump 2018-09-15 19:17:07.510653263 +0200
+--- src/testdir/dumps/Test_diff_18.dump 2019-03-29 17:12:19.864749422 +0100
+***************
+*** 3,20 ****
+ | +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
+--- 3,20 ----
+ | +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#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_19.dump 2018-09-15 19:17:07.510653263 +0200
+--- src/testdir/dumps/Test_diff_19.dump 2019-03-29 17:12:20.936742609 +0100
+***************
+*** 6,20 ****
+ | +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
+--- 6,20 ----
+ | +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#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_20.dump 2018-09-15 19:17:07.514653227 +0200
+--- src/testdir/dumps/Test_diff_20.dump 2019-03-29 17:12:21.996735874 +0100
+***************
+*** 6,20 ****
+ | +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
+--- 6,20 ----
+ | +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#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |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.1071/src/testdir/dumps/Test_diff_with_cursorline_01.dump 2018-10-02 18:25:41.420867587 +0200
+--- src/testdir/dumps/Test_diff_with_cursorline_01.dump 2019-03-29 17:12:28.344695550 +0100
+***************
+*** 3,20 ****
+ | +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
+--- 3,20 ----
+ | +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#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |[+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.1071/src/testdir/dumps/Test_diff_with_cursorline_02.dump 2018-10-02 18:25:41.420867587 +0200
+--- src/testdir/dumps/Test_diff_with_cursorline_02.dump 2019-03-29 17:12:29.408688793 +0100
+***************
+*** 3,20 ****
+ | +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
+--- 3,20 ----
+ | +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#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |[+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.1071/src/testdir/dumps/Test_diff_with_cursorline_03.dump 2018-10-02 18:25:41.420867587 +0200
+--- src/testdir/dumps/Test_diff_with_cursorline_03.dump 2019-03-29 17:12:30.472682035 +0100
+***************
+*** 3,20 ****
+ | +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
+--- 3,20 ----
+ | +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#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+! |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |[+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.1071/src/testdir/dumps/Test_folds_with_rnu_01.dump 2018-10-02 21:20:08.688088162 +0200
+--- src/testdir/dumps/Test_folds_with_rnu_01.dump 2019-03-29 17:12:50.240556546 +0100
+***************
+*** 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|
+--- 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
+! |~+0#4040ff13#ffffff0| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+ | +0#0000000&@56|1|,|1| @10|A|l@1|
+*** ../vim-8.1.1071/src/testdir/dumps/Test_folds_with_rnu_02.dump 2018-10-02 21:20:08.688088162 +0200
+--- src/testdir/dumps/Test_folds_with_rnu_02.dump 2019-03-29 17:12:51.288549896 +0100
+***************
+*** 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|
+--- 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
+! |~+0#4040ff13#ffffff0| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+! |~| @73
+ | +0#0000000&@56|3|,|1| @10|A|l@1|
+*** ../vim-8.1.1071/src/version.c 2019-03-29 14:16:34.142861770 +0100
+--- src/version.c 2019-03-29 18:06:33.664327403 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1072,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+148. You find it easier to dial-up the National Weather Service
+ Weather/your_town/now.html than to simply look out the 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.1073 b/data/vim/patches/8.1.1073
new file mode 100644
index 000000000..df4bb1914
--- /dev/null
+++ b/data/vim/patches/8.1.1073
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1073
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1073
+Problem: Space in number column is on wrong side with 'rightleft' set.
+Solution: Move the space to the text side. Add a test.
+Files: src/screen.c, src/testdir/test_diffmode.vim,
+ src/testdir/dumps/Test_diff_of_diff_02.dump
+
+
+*** ../vim-8.1.1072/src/screen.c 2019-03-29 18:08:12.611773724 +0100
+--- src/screen.c 2019-03-29 18:21:25.807652045 +0100
+***************
+*** 3896,3902 ****
+ *p_extra = '-';
+ #ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl) /* reverse line numbers */
+! rl_mirror(extra);
+ #endif
+ p_extra = extra;
+ c_extra = NUL;
+--- 3896,3914 ----
+ *p_extra = '-';
+ #ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl) /* reverse line numbers */
+! {
+! char_u *p1, *p2;
+! int t;
+!
+! // like rl_mirror(), but keep the space at the end
+! p2 = skiptowhite(extra) - 1;
+! for (p1 = extra; p1 < p2; ++p1, --p2)
+! {
+! t = *p1;
+! *p1 = *p2;
+! *p2 = t;
+! }
+! }
+ #endif
+ p_extra = extra;
+ c_extra = NUL;
+*** ../vim-8.1.1072/src/testdir/test_diffmode.vim 2019-03-29 18:08:12.611773724 +0100
+--- src/testdir/test_diffmode.vim 2019-03-29 18:10:29.047146437 +0100
+***************
+*** 922,927 ****
+--- 922,930 ----
+
+ call VerifyScreenDump(buf, 'Test_diff_of_diff_01', {})
+
++ call term_sendkeys(buf, ":set rightleft\<cr>")
++ call VerifyScreenDump(buf, 'Test_diff_of_diff_02', {})
++
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_diff_diff')
+*** ../vim-8.1.1072/src/testdir/dumps/Test_diff_of_diff_02.dump 2019-03-29 18:29:09.512965690 +0100
+--- src/testdir/dumps/Test_diff_of_diff_02.dump 2019-03-29 18:24:22.538639610 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0&#ffffff0@28|a>a| +0#af5f00255&|1| @1| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32
++ @29|b@1| +0#af5f00255&|2| @1| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0@1| @32
++ @29|c@1| +0#af5f00255&|3| @1| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32
++ |-+0#4040ff13#afffff255@30| +0#af5f00255#ffffff0@3| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|@+0#0000000#5fd7ff255@1| |-|3|,|2| |+|5|,|7| |@@1| @19
++ |-+0#4040ff13#afffff255@30| +0#af5f00255#ffffff0@3| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255@1| @32
++ |-+0#4040ff13#afffff255@30| +0#af5f00255#ffffff0@3| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|e+0#0000000#5fd7ff255@1| @32
++ |-+0#4040ff13#afffff255@30| +0#af5f00255#ffffff0@3| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|f+0#0000000#5fd7ff255@1| @32
++ | +0#4040ff13#ffffff0@35|~||+1#0000000&|~+0#4040ff13&| @35
++ @36|~||+1#0000000&|~+0#4040ff13&| @35
++ @36|~||+1#0000000&|~+0#4040ff13&| @35
++ @36|~||+1#0000000&|~+0#4040ff13&| @35
++ @36|~||+1#0000000&|~+0#4040ff13&| @35
++ @36|~||+1#0000000&|~+0#4040ff13&| @35
++ @36|~||+1#0000000&|~+0#4040ff13&| @35
++ @36|~||+1#0000000&|~+0#4040ff13&| @35
++ @36|~||+1#0000000&|~+0#4040ff13&| @35
++ @36|~||+1#0000000&|~+0#4040ff13&| @35
++ @36|~||+1#0000000&|~+0#4040ff13&| @35
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1
++ |:+0&&|s|e|t| |r|i|g|h|t|l|e|f|t| @60
+*** ../vim-8.1.1072/src/version.c 2019-03-29 18:08:12.619773688 +0100
+--- src/version.c 2019-03-29 18:28:08.681322876 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1073,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+149. You find your computer sexier than your girlfriend
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1074 b/data/vim/patches/8.1.1074
new file mode 100644
index 000000000..3d7eccd9d
--- /dev/null
+++ b/data/vim/patches/8.1.1074
@@ -0,0 +1,183 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1074
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1074
+Problem: Python test doesn't wipe out hidden buffer.
+Solution: Wipe out the buffer. (Ben Jackson, closes #4189)
+Files: src/testdir/test_python2.vim, src/testdir/test_python3.vim
+
+
+*** ../vim-8.1.1073/src/testdir/test_python2.vim 2019-03-23 17:41:56.217138373 +0100
+--- src/testdir/test_python2.vim 2019-03-30 12:31:36.758040812 +0100
+***************
+*** 89,120 ****
+ call assert_equal( line( '.' ), 11 )
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Clear()
+ call _SetUpHiddenBuffer()
+ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = None
+ call assert_equal( line( '.' ), 11 )
+! bwipe!
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_List()
+ call _SetUpHiddenBuffer()
+ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = [ 'test' ]
+ call assert_equal( line( '.' ), 11 )
+! bwipe!
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Str()
+ call _SetUpHiddenBuffer()
+ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = 'test'
+ call assert_equal( line( '.' ), 11 )
+! bwipe!
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_ClearLine()
+ call _SetUpHiddenBuffer()
+ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = None
+ call assert_equal( line( '.' ), 11 )
+! bwipe!
+ endfunc
+
+ func _SetUpVisibleBuffer()
+--- 89,125 ----
+ call assert_equal( line( '.' ), 11 )
+ endfunc
+
++ func _CleanUpHiddenBuffer()
++ bwipe! hidden
++ bwipe!
++ endfunc
++
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Clear()
+ call _SetUpHiddenBuffer()
+ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = None
+ call assert_equal( line( '.' ), 11 )
+! call _CleanUpHiddenBuffer()
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_List()
+ call _SetUpHiddenBuffer()
+ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = [ 'test' ]
+ call assert_equal( line( '.' ), 11 )
+! call _CleanUpHiddenBuffer()
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Str()
+ call _SetUpHiddenBuffer()
+ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = 'test'
+ call assert_equal( line( '.' ), 11 )
+! call _CleanUpHiddenBuffer()
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_ClearLine()
+ call _SetUpHiddenBuffer()
+ py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = None
+ call assert_equal( line( '.' ), 11 )
+! call _CleanUpHiddenBuffer()
+ endfunc
+
+ func _SetUpVisibleBuffer()
+*** ../vim-8.1.1073/src/testdir/test_python3.vim 2019-03-23 17:41:56.217138373 +0100
+--- src/testdir/test_python3.vim 2019-03-30 12:29:18.918904930 +0100
+***************
+*** 89,120 ****
+ call assert_equal( line( '.' ), 11 )
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Clear()
+ call _SetUpHiddenBuffer()
+ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = None
+ call assert_equal( line( '.' ), 11 )
+! bwipe!
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_List()
+ call _SetUpHiddenBuffer()
+ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = [ 'test' ]
+ call assert_equal( line( '.' ), 11 )
+! bwipe!
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Str()
+ call _SetUpHiddenBuffer()
+ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = 'test'
+ call assert_equal( line( '.' ), 11 )
+! bwipe!
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_ClearLine()
+ call _SetUpHiddenBuffer()
+ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = None
+ call assert_equal( line( '.' ), 11 )
+! bwipe!
+ endfunc
+
+ func _SetUpVisibleBuffer()
+--- 89,125 ----
+ call assert_equal( line( '.' ), 11 )
+ endfunc
+
++ func _CleanUpHiddenBuffer()
++ bwipe! hidden
++ bwipe!
++ endfunc
++
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Clear()
+ call _SetUpHiddenBuffer()
+ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = None
+ call assert_equal( line( '.' ), 11 )
+! call _CleanUpHiddenBuffer()
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_List()
+ call _SetUpHiddenBuffer()
+ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = [ 'test' ]
+ call assert_equal( line( '.' ), 11 )
+! call _CleanUpHiddenBuffer()
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Str()
+ call _SetUpHiddenBuffer()
+ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = 'test'
+ call assert_equal( line( '.' ), 11 )
+! call _CleanUpHiddenBuffer()
+ endfunc
+
+ func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_ClearLine()
+ call _SetUpHiddenBuffer()
+ py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = None
+ call assert_equal( line( '.' ), 11 )
+! call _CleanUpHiddenBuffer()
+ endfunc
+
+ func _SetUpVisibleBuffer()
+*** ../vim-8.1.1073/src/version.c 2019-03-29 18:29:28.452854266 +0100
+--- src/version.c 2019-03-30 12:32:24.165745410 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1074,
+ /**/
+
+--
+Although the scythe isn't pre-eminent among the weapons of war, anyone who
+has been on the wrong end of, say, a peasants' revolt will know that in
+skilled hands it is fearsome.
+ -- (Terry Pratchett, Mort)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1075 b/data/vim/patches/8.1.1075
new file mode 100644
index 000000000..eeb7c339a
--- /dev/null
+++ b/data/vim/patches/8.1.1075
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1075
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1075
+Problem: Function reference count wrong in Python code.
+Solution: Use "O" instead of "N" for the arguments. (Ben Jackson,
+ closes #4188)
+Files: src/if_py_both.h
+
+
+*** ../vim-8.1.1074/src/if_py_both.h 2019-03-23 17:41:56.217138373 +0100
+--- src/if_py_both.h 2019-03-30 12:46:19.752622049 +0100
+***************
+*** 1210,1216 ****
+ if (!(paths = Vim_GetPaths(self)))
+ return NULL;
+
+! spec = PyObject_CallFunction(py_find_spec, "sNN", fullname, paths, target);
+
+ Py_DECREF(paths);
+
+--- 1210,1216 ----
+ if (!(paths = Vim_GetPaths(self)))
+ return NULL;
+
+! spec = PyObject_CallFunction(py_find_spec, "sOO", fullname, paths, target);
+
+ Py_DECREF(paths);
+
+*** ../vim-8.1.1074/src/version.c 2019-03-30 12:33:07.845473937 +0100
+--- src/version.c 2019-03-30 12:47:47.860086777 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1075,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+153. You find yourself staring at your "inbox" waiting for new e-mail
+ to arrive.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1076 b/data/vim/patches/8.1.1076
new file mode 100644
index 000000000..4e18d4463
--- /dev/null
+++ b/data/vim/patches/8.1.1076
@@ -0,0 +1,9225 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1076
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1076
+Problem: File for Insert mode is much too big.
+Solution: Split off the code for Insert completion. (Yegappan Lakshmanan,
+ closes #4044)
+Files: Filelist, src/Make_bc5.mak, src/Make_cyg_ming.mak,
+ src/Make_dice.mak, src/Make_ivc.mak, src/Make_manx.mak,
+ src/Make_morph.mak, src/Make_mvc.mak, src/Make_sas.mak,
+ src/Make_vms.mms, src/Makefile, src/edit.c, src/evalfunc.c,
+ src/globals.h, src/insexpand.c, src/misc2.c, src/proto.h,
+ src/proto/edit.pro, src/proto/insexpand.pro, src/search.c,
+ src/spell.c, src/structs.h, src/tag.c
+
+
+*** ../vim-8.1.1075/Filelist 2019-03-29 13:09:37.972782868 +0100
+--- Filelist 2019-03-30 12:54:54.297407936 +0100
+***************
+*** 48,53 ****
+--- 48,54 ----
+ src/hardcopy.c \
+ src/hashtab.c \
+ src/indent.c \
++ src/insexpand.c \
+ src/json.c \
+ src/json_test.c \
+ src/kword_test.c \
+***************
+*** 175,180 ****
+--- 176,182 ----
+ src/proto/hardcopy.pro \
+ src/proto/hashtab.pro \
+ src/proto/indent.pro \
++ src/proto/insexpand.pro \
+ src/proto/json.pro \
+ src/proto/list.pro \
+ src/proto/main.pro \
+*** ../vim-8.1.1075/src/Make_bc5.mak 2019-03-28 22:43:12.103997449 +0100
+--- src/Make_bc5.mak 2019-03-30 12:54:54.297407936 +0100
+***************
+*** 534,539 ****
+--- 534,540 ----
+ $(OBJDIR)\hardcopy.obj \
+ $(OBJDIR)\hashtab.obj \
+ $(OBJDIR)\indent.obj \
++ $(OBJDIR)\insexpand.obj \
+ $(OBJDIR)\json.obj \
+ $(OBJDIR)\list.obj \
+ $(OBJDIR)\main.obj \
+*** ../vim-8.1.1075/src/Make_cyg_ming.mak 2019-03-22 16:57:42.061691287 +0100
+--- src/Make_cyg_ming.mak 2019-03-30 12:54:54.297407936 +0100
+***************
+*** 721,726 ****
+--- 721,727 ----
+ $(OUTDIR)/hardcopy.o \
+ $(OUTDIR)/hashtab.o \
+ $(OUTDIR)/indent.o \
++ $(OUTDIR)/insexpand.o \
+ $(OUTDIR)/json.o \
+ $(OUTDIR)/list.o \
+ $(OUTDIR)/main.o \
+*** ../vim-8.1.1075/src/Make_dice.mak 2019-02-16 15:09:21.221946179 +0100
+--- src/Make_dice.mak 2019-03-30 12:54:54.297407936 +0100
+***************
+*** 51,56 ****
+--- 51,57 ----
+ hardcopy.c \
+ hashtab.c \
+ indent.c \
++ insexpand.c \
+ json.c \
+ list.c \
+ main.c \
+***************
+*** 110,115 ****
+--- 111,117 ----
+ o/hardcopy.o \
+ o/hashtab.o \
+ o/indent.o \
++ o/insexpand.o \
+ o/json.o \
+ o/list.o \
+ o/main.o \
+***************
+*** 213,218 ****
+--- 215,222 ----
+
+ o/indent.o: indent.c $(SYMS)
+
++ o/insexpand.o: insexpand.c $(SYMS)
++
+ o/json.o: json.c $(SYMS)
+
+ o/list.o: list.c $(SYMS)
+*** ../vim-8.1.1075/src/Make_ivc.mak 2019-02-18 21:41:34.477750367 +0100
+--- src/Make_ivc.mak 2019-03-30 12:54:54.297407936 +0100
+***************
+*** 235,240 ****
+--- 235,241 ----
+ "$(INTDIR)/hardcopy.obj" \
+ "$(INTDIR)/hashtab.obj" \
+ "$(INTDIR)/indent.obj" \
++ "$(INTDIR)/insexpand.obj" \
+ "$(INTDIR)/json.obj" \
+ "$(INTDIR)/list.obj" \
+ "$(INTDIR)/main.obj" \
+***************
+*** 439,444 ****
+--- 440,449 ----
+ SOURCE=.\indent.c
+ # End Source File
+ # Begin Source File
++ #
++ SOURCE=.\insexpand.c
++ # End Source File
++ # Begin Source File
+
+ SOURCE=.\gui.c
+
+*** ../vim-8.1.1075/src/Make_manx.mak 2019-02-16 15:09:21.221946179 +0100
+--- src/Make_manx.mak 2019-03-30 12:54:54.297407936 +0100
+***************
+*** 61,66 ****
+--- 61,67 ----
+ hardcopy.c \
+ hashtab.c \
+ indent.c \
++ insexpand.c \
+ json.c \
+ list.c \
+ main.c \
+***************
+*** 122,127 ****
+--- 123,129 ----
+ obj/hardcopy.o \
+ obj/hashtab.o \
+ obj/indent.o \
++ obj/insexpand.o \
+ obj/json.o \
+ obj/list.o \
+ obj/main.o \
+***************
+*** 181,186 ****
+--- 183,189 ----
+ proto/hardcopy.pro \
+ proto/hashtab.pro \
+ proto/indent.pro \
++ proto/insexpand.pro \
+ proto/json.pro \
+ proto/list.pro \
+ proto/main.pro \
+***************
+*** 335,340 ****
+--- 338,346 ----
+ obj/indent.o: indent.c
+ $(CCSYM) $@ indent.c
+
++ obj/insexpand.o: insexpand.c
++ $(CCSYM) $@ insexpand.c
++
+ obj/json.o: json.c
+ $(CCSYM) $@ json.c
+
+*** ../vim-8.1.1075/src/Make_morph.mak 2019-02-16 15:09:21.221946179 +0100
+--- src/Make_morph.mak 2019-03-30 12:54:54.297407936 +0100
+***************
+*** 49,54 ****
+--- 49,55 ----
+ hardcopy.c \
+ hashtab.c \
+ indent.c \
++ insexpand.c \
+ json.c \
+ list.c \
+ main.c \
+*** ../vim-8.1.1075/src/Make_mvc.mak 2019-03-22 16:57:42.061691287 +0100
+--- src/Make_mvc.mak 2019-03-30 12:54:54.297407936 +0100
+***************
+*** 725,730 ****
+--- 725,731 ----
+ $(OUTDIR)\hardcopy.obj \
+ $(OUTDIR)\hashtab.obj \
+ $(OUTDIR)\indent.obj \
++ $(OUTDIR)\insexpand.obj \
+ $(OUTDIR)\json.obj \
+ $(OUTDIR)\list.obj \
+ $(OUTDIR)\main.obj \
+***************
+*** 1416,1421 ****
+--- 1417,1424 ----
+
+ $(OUTDIR)/indent.obj: $(OUTDIR) indent.c $(INCL)
+
++ $(OUTDIR)/insexpand.obj: $(OUTDIR) insexpand.c $(INCL)
++
+ $(OUTDIR)/gui.obj: $(OUTDIR) gui.c $(INCL) $(GUI_INCL)
+
+ $(OUTDIR)/gui_beval.obj: $(OUTDIR) gui_beval.c $(INCL) $(GUI_INCL)
+***************
+*** 1648,1653 ****
+--- 1651,1657 ----
+ proto/hardcopy.pro \
+ proto/hashtab.pro \
+ proto/indent.pro \
++ proto/insexpand.pro \
+ proto/json.pro \
+ proto/list.pro \
+ proto/main.pro \
+*** ../vim-8.1.1075/src/Make_sas.mak 2019-02-16 15:09:21.221946179 +0100
+--- src/Make_sas.mak 2019-03-30 12:54:54.297407936 +0100
+***************
+*** 114,119 ****
+--- 114,120 ----
+ hardcopy.c \
+ hashtab.c \
+ indent.c \
++ insexpand.c \
+ json.c \
+ list.c \
+ main.c \
+***************
+*** 174,179 ****
+--- 175,181 ----
+ hardcopy.o \
+ hashtab.o \
+ indent.o \
++ insexpand.o \
+ json.o \
+ list.o \
+ main.o \
+***************
+*** 234,239 ****
+--- 236,242 ----
+ proto/hardcopy.pro \
+ proto/hashtab.pro \
+ proto/indent.pro \
++ proto/insexpand.pro \
+ proto/json.pro \
+ proto/list.pro \
+ proto/main.pro \
+***************
+*** 373,378 ****
+--- 376,383 ----
+ proto/hashtab.pro: hashtab.c
+ indent.o: indent.c
+ proto/indent.pro: indent.c
++ insexpand.o: insexpand.c
++ proto/insexpand.pro: insexpand.c
+ json.o: json.c
+ proto/json.pro: json.c
+ list.o: list.c
+*** ../vim-8.1.1075/src/Make_vms.mms 2019-03-22 17:03:01.783689365 +0100
+--- src/Make_vms.mms 2019-03-30 12:54:54.301407905 +0100
+***************
+*** 311,319 ****
+ crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
+ ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c \
+ if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c hardcopy.c \
+! hashtab.c indent.c json.c list.c main.c mark.c menu.c mbyte.c \
+! memfile.c memline.c message.c misc1.c misc2.c move.c normal.c ops.c \
+! option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+ spell.c spellfile.c syntax.c tag.c term.c termlib.c textprop.c ui.c \
+ undo.c userfunc.c version.c screen.c window.c os_unix.c os_vms.c \
+ pathdef.c
+--- 311,319 ----
+ crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
+ ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c \
+ if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c hardcopy.c \
+! hashtab.c indent.c insexpand.c json.c list.c main.c mark.c menu.c \
+! mbyte.c memfile.c memline.c message.c misc1.c misc2.c move.c normal.c \
+! ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+ spell.c spellfile.c syntax.c tag.c term.c termlib.c textprop.c ui.c \
+ undo.c userfunc.c version.c screen.c window.c os_unix.c os_vms.c \
+ pathdef.c
+***************
+*** 325,337 ****
+ edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj \
+ ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj \
+ fileio.obj findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
+! indent.obj json.obj list.obj main.obj mark.obj menu.obj memfile.obj \
+! memline.obj message.obj misc1.obj misc2.obj move.obj mbyte.obj \
+! normal.obj ops.obj option.obj popupmnu.obj quickfix.obj regexp.obj \
+! search.obj sha256.obj sign.obj spell.obj spellfile.obj syntax.obj \
+! tag.obj term.obj termlib.obj textprop.obj ui.obj undo.obj \
+! userfunc.obj screen.obj version.obj window.obj os_unix.obj os_vms.obj \
+! pathdef.obj if_mzsch.obj \
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+ $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ)
+
+--- 325,337 ----
+ edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj \
+ ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj \
+ fileio.obj findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
+! indent.obj insexpand.obj json.obj list.obj main.obj mark.obj \
+! menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+! move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj \
+! quickfix.obj regexp.obj search.obj sha256.obj sign.obj spell.obj \
+! spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \
+! ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj \
+! os_unix.obj os_vms.obj pathdef.obj if_mzsch.obj \
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+ $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ)
+
+***************
+*** 603,608 ****
+--- 603,609 ----
+ regexp.h gui.h beval.h [.proto]gui_beval.pro ex_cmds.h proto.h \
+ globals.h if_mzsch.h
+ indent.obj : indent.c vim.h [.auto]config.h feature.h os_unix.h
++ insexpand.obj : insexpand.c vim.h [.auto]config.h feature.h os_unix.h
+ json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+*** ../vim-8.1.1075/src/Makefile 2019-03-22 16:33:03.487016094 +0100
+--- src/Makefile 2019-03-30 12:54:54.301407905 +0100
+***************
+*** 1599,1604 ****
+--- 1599,1605 ----
+ if_cscope.c \
+ if_xcmdsrv.c \
+ indent.c \
++ insexpand.c \
+ json.c \
+ list.c \
+ main.c \
+***************
+*** 1713,1718 ****
+--- 1714,1720 ----
+ objects/if_cscope.o \
+ objects/if_xcmdsrv.o \
+ objects/indent.o \
++ objects/insexpand.o \
+ objects/list.o \
+ objects/mark.o \
+ objects/memline.o \
+***************
+*** 1844,1849 ****
+--- 1846,1852 ----
+ if_ruby.pro \
+ if_xcmdsrv.pro \
+ indent.pro \
++ insexpand.pro \
+ json.pro \
+ list.pro \
+ main.pro \
+***************
+*** 3098,3103 ****
+--- 3101,3109 ----
+ objects/indent.o: indent.c
+ $(CCC) -o $@ indent.c
+
++ objects/insexpand.o: insexpand.c
++ $(CCC) -o $@ insexpand.c
++
+ objects/json.o: json.c
+ $(CCC) -o $@ json.c
+
+***************
+*** 3500,3505 ****
+--- 3506,3515 ----
+ 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
++ objects/insexpand.o: insexpand.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
+ 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 \
+*** ../vim-8.1.1075/src/edit.c 2019-03-29 12:19:34.953348924 +0100
+--- src/edit.c 2019-03-30 13:46:18.517111390 +0100
+***************
+*** 13,222 ****
+
+ #include "vim.h"
+
+! #ifdef FEAT_INS_EXPAND
+! /*
+! * Definitions used for CTRL-X submode.
+! * Note: If you change CTRL-X submode, you must also maintain ctrl_x_msgs[] and
+! * ctrl_x_mode_names[].
+! */
+! # define CTRL_X_WANT_IDENT 0x100
+!
+! # define CTRL_X_NORMAL 0 /* CTRL-N CTRL-P completion, default */
+! # define CTRL_X_NOT_DEFINED_YET 1
+! # define CTRL_X_SCROLL 2
+! # define CTRL_X_WHOLE_LINE 3
+! # define CTRL_X_FILES 4
+! # define CTRL_X_TAGS (5 + CTRL_X_WANT_IDENT)
+! # define CTRL_X_PATH_PATTERNS (6 + CTRL_X_WANT_IDENT)
+! # define CTRL_X_PATH_DEFINES (7 + CTRL_X_WANT_IDENT)
+! # define CTRL_X_FINISHED 8
+! # define CTRL_X_DICTIONARY (9 + CTRL_X_WANT_IDENT)
+! # define CTRL_X_THESAURUS (10 + CTRL_X_WANT_IDENT)
+! # define CTRL_X_CMDLINE 11
+! # define CTRL_X_FUNCTION 12
+! # define CTRL_X_OMNI 13
+! # define CTRL_X_SPELL 14
+! # define CTRL_X_LOCAL_MSG 15 /* only used in "ctrl_x_msgs" */
+! # define CTRL_X_EVAL 16 /* for builtin function complete() */
+!
+! # define CTRL_X_MSG(i) ctrl_x_msgs[(i) & ~CTRL_X_WANT_IDENT]
+! # define CTRL_X_MODE_LINE_OR_EVAL(m) ((m) == CTRL_X_WHOLE_LINE || (m) == CTRL_X_EVAL)
+!
+! // Message for CTRL-X mode, index is ctrl_x_mode.
+! static char *ctrl_x_msgs[] =
+! {
+! N_(" Keyword completion (^N^P)"), // CTRL_X_NORMAL, ^P/^N compl.
+! N_(" ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)"),
+! NULL, // CTRL_X_SCROLL: depends on state
+! N_(" Whole line completion (^L^N^P)"),
+! N_(" File name completion (^F^N^P)"),
+! N_(" Tag completion (^]^N^P)"),
+! N_(" Path pattern completion (^N^P)"),
+! N_(" Definition completion (^D^N^P)"),
+! NULL, // CTRL_X_FINISHED
+! N_(" Dictionary completion (^K^N^P)"),
+! N_(" Thesaurus completion (^T^N^P)"),
+! N_(" Command-line completion (^V^N^P)"),
+! N_(" User defined completion (^U^N^P)"),
+! N_(" Omni completion (^O^N^P)"),
+! N_(" Spelling suggestion (s^N^P)"),
+! N_(" Keyword Local completion (^N^P)"),
+! NULL, // CTRL_X_EVAL doesn't use msg.
+! };
+!
+! static char *ctrl_x_mode_names[] = {
+! "keyword",
+! "ctrl_x",
+! "unknown", // CTRL_X_SCROLL
+! "whole_line",
+! "files",
+! "tags",
+! "path_patterns",
+! "path_defines",
+! "unknown", // CTRL_X_FINISHED
+! "dictionary",
+! "thesaurus",
+! "cmdline",
+! "function",
+! "omni",
+! "spell",
+! NULL, // CTRL_X_LOCAL_MSG only used in "ctrl_x_msgs"
+! "eval"
+! };
+!
+!
+! static char e_hitend[] = N_("Hit end of paragraph");
+! # ifdef FEAT_COMPL_FUNC
+! static char e_complwin[] = N_("E839: Completion function changed window");
+! static char e_compldel[] = N_("E840: Completion function deleted text");
+! # endif
+!
+! /*
+! * Structure used to store one match for insert completion.
+! */
+! typedef struct compl_S compl_T;
+! struct compl_S
+! {
+! compl_T *cp_next;
+! compl_T *cp_prev;
+! char_u *cp_str; /* matched text */
+! char cp_icase; /* TRUE or FALSE: ignore case */
+! char_u *(cp_text[CPT_COUNT]); /* text for the menu */
+! char_u *cp_fname; /* file containing the match, allocated when
+! * cp_flags has FREE_FNAME */
+! int cp_flags; /* ORIGINAL_TEXT, CONT_S_IPOS or FREE_FNAME */
+! int cp_number; /* sequence number */
+! };
+!
+! # define ORIGINAL_TEXT (1) /* the original text when the expansion begun */
+! # define FREE_FNAME (2)
+!
+! /*
+! * All the current matches are stored in a list.
+! * "compl_first_match" points to the start of the list.
+! * "compl_curr_match" points to the currently selected entry.
+! * "compl_shown_match" is different from compl_curr_match during
+! * ins_compl_get_exp().
+! */
+! static compl_T *compl_first_match = NULL;
+! static compl_T *compl_curr_match = NULL;
+! static compl_T *compl_shown_match = NULL;
+! static compl_T *compl_old_match = NULL;
+!
+! /* After using a cursor key <Enter> selects a match in the popup menu,
+! * otherwise it inserts a line break. */
+! static int compl_enter_selects = FALSE;
+!
+! /* When "compl_leader" is not NULL only matches that start with this string
+! * are used. */
+! static char_u *compl_leader = NULL;
+!
+! static int compl_get_longest = FALSE; /* put longest common string
+! in compl_leader */
+!
+! static int compl_no_insert = FALSE; /* FALSE: select & insert
+! TRUE: noinsert */
+! static int compl_no_select = FALSE; /* FALSE: select & insert
+! TRUE: noselect */
+!
+! static int compl_used_match; /* Selected one of the matches. When
+! FALSE the match was edited or using
+! the longest common string. */
+!
+! static int compl_was_interrupted = FALSE; /* didn't finish finding
+! completions. */
+!
+! static int compl_restarting = FALSE; /* don't insert match */
+!
+! /* When the first completion is done "compl_started" is set. When it's
+! * FALSE the word to be completed must be located. */
+! static int compl_started = FALSE;
+!
+! /* Which Ctrl-X mode are we in? */
+! static int ctrl_x_mode = CTRL_X_NORMAL;
+
+ /* Set when doing something for completion that may call edit() recursively,
+ * which is not allowed. */
+! static int compl_busy = FALSE;
+!
+! static int compl_matches = 0;
+! static char_u *compl_pattern = NULL;
+! static int compl_direction = FORWARD;
+! static int compl_shows_dir = FORWARD;
+! static int compl_pending = 0; /* > 1 for postponed CTRL-N */
+! static pos_T compl_startpos;
+! static colnr_T compl_col = 0; /* column where the text starts
+! * that is being completed */
+! static char_u *compl_orig_text = NULL; /* text as it was before
+! * completion started */
+! static int compl_cont_mode = 0;
+! static expand_T compl_xp;
+!
+! static int compl_opt_refresh_always = FALSE;
+! static int compl_opt_suppress_empty = FALSE;
+!
+! static void ins_ctrl_x(void);
+! 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 void ins_compl_longest_match(compl_T *match);
+! static void ins_compl_del_pum(void);
+! static int pum_wanted(void);
+! 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);
+! static void ins_compl_clear(void);
+! static char_u *ins_compl_mode(void);
+! static int ins_compl_bs(void);
+! static int ins_compl_need_restart(void);
+! static void ins_compl_new_leader(void);
+! static void ins_compl_addleader(int c);
+! static int ins_compl_len(void);
+! static void ins_compl_restart(void);
+! static void ins_compl_set_original_text(char_u *str);
+! static void ins_compl_addfrommatch(void);
+! static int ins_compl_prep(int c);
+! static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg);
+! # 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 void ins_compl_delete(void);
+! static void ins_compl_insert(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_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);
+ #endif /* FEAT_INS_EXPAND */
+
+- #define BACKSPACE_CHAR 1
+- #define BACKSPACE_WORD 2
+- #define BACKSPACE_WORD_NOT_SPACE 3
+- #define BACKSPACE_LINE 4
+
+- static void ins_redraw(int ready);
+ static void ins_ctrl_v(void);
+ #ifdef FEAT_JOB_CHANNEL
+ static void init_prompt(int cmdchar_todo);
+--- 13,30 ----
+
+ #include "vim.h"
+
+! #define BACKSPACE_CHAR 1
+! #define BACKSPACE_WORD 2
+! #define BACKSPACE_WORD_NOT_SPACE 3
+! #define BACKSPACE_LINE 4
+
++ #ifdef FEAT_INS_EXPAND
+ /* Set when doing something for completion that may call edit() recursively,
+ * which is not allowed. */
+! static int compl_busy = FALSE;
+ #endif /* FEAT_INS_EXPAND */
+
+
+ static void ins_ctrl_v(void);
+ #ifdef FEAT_JOB_CHANNEL
+ static void init_prompt(int cmdchar_todo);
+***************
+*** 226,237 ****
+ static void internal_format(int textwidth, int second_indent, int flags, int format_only, int c);
+ 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_common(pos_T *end_insert_pos, int change);
+ #ifdef FEAT_SPELL
+ static void check_spell_redraw(void);
+- static void spell_back_to_badword(void);
+- static int spell_bad_len = 0; /* length of located bad word */
+ #endif
+ static void stop_insert(pos_T *end_insert_pos, int esc, int nomove);
+ static int echeck_abbr(int);
+--- 34,42 ----
+***************
+*** 274,280 ****
+ static void ins_drop(void);
+ #endif
+ static int ins_tab(void);
+- static int ins_eol(int c);
+ #ifdef FEAT_DIGRAPHS
+ static int ins_digraph(void);
+ #endif
+--- 79,84 ----
+***************
+*** 285,291 ****
+ #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 */
+--- 89,94 ----
+***************
+*** 393,399 ****
+
+ #ifdef FEAT_INS_EXPAND
+ /* Don't allow recursive insert mode when busy with completion. */
+! if (compl_started || compl_busy || pum_visible())
+ {
+ emsg(_(e_secure));
+ return FALSE;
+--- 196,202 ----
+
+ #ifdef FEAT_INS_EXPAND
+ /* Don't allow recursive insert mode when busy with completion. */
+! if (ins_compl_active() || compl_busy || pum_visible())
+ {
+ emsg(_(e_secure));
+ return FALSE;
+***************
+*** 834,861 ****
+ * and the cursor is still in the completed word. Only when there is
+ * a match, skip this when no matches were found.
+ */
+! if (compl_started
+ && pum_wanted()
+! && curwin->w_cursor.col >= compl_col
+! && (compl_shown_match == NULL
+! || compl_shown_match != compl_shown_match->cp_next))
+ {
+ /* BS: Delete one character from "compl_leader". */
+ if ((c == K_BS || c == Ctrl_H)
+! && curwin->w_cursor.col > compl_col
+ && (c = ins_compl_bs()) == NUL)
+ continue;
+
+ /* When no match was selected or it was edited. */
+! if (!compl_used_match)
+ {
+ /* CTRL-L: Add one character from the current match to
+ * "compl_leader". Except when at the original match and
+ * there is nothing to add, CTRL-L works like CTRL-P then. */
+ if (c == Ctrl_L
+! && (!CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)
+! || (int)STRLEN(compl_shown_match->cp_str)
+! > curwin->w_cursor.col - compl_col))
+ {
+ ins_compl_addfrommatch();
+ continue;
+--- 637,662 ----
+ * and the cursor is still in the completed word. Only when there is
+ * a match, skip this when no matches were found.
+ */
+! if (ins_compl_active()
+ && pum_wanted()
+! && curwin->w_cursor.col >= ins_compl_col()
+! && ins_compl_has_shown_match())
+ {
+ /* BS: Delete one character from "compl_leader". */
+ if ((c == K_BS || c == Ctrl_H)
+! && curwin->w_cursor.col > ins_compl_col()
+ && (c = ins_compl_bs()) == NUL)
+ continue;
+
+ /* When no match was selected or it was edited. */
+! if (!ins_compl_used_match())
+ {
+ /* CTRL-L: Add one character from the current match to
+ * "compl_leader". Except when at the original match and
+ * there is nothing to add, CTRL-L works like CTRL-P then. */
+ if (c == Ctrl_L
+! && (!ctrl_x_mode_line_or_eval()
+! || ins_compl_long_shown_match()))
+ {
+ ins_compl_addfrommatch();
+ continue;
+***************
+*** 883,890 ****
+ }
+
+ /* Pressing CTRL-Y selects the current match. When
+! * compl_enter_selects is set the Enter key does the same. */
+! if ((c == Ctrl_Y || (compl_enter_selects
+ && (c == CAR || c == K_KENTER || c == NL)))
+ && stop_arrow() == OK)
+ {
+--- 684,692 ----
+ }
+
+ /* Pressing CTRL-Y selects the current match. When
+! * ins_compl_enter_selects() is set the Enter key does the
+! * same. */
+! if ((c == Ctrl_Y || (ins_compl_enter_selects()
+ && (c == CAR || c == K_KENTER || c == NL)))
+ && stop_arrow() == OK)
+ {
+***************
+*** 896,902 ****
+
+ /* Prepare for or stop CTRL-X mode. This doesn't do completion, but
+ * it does fix up the text when finishing completion. */
+! compl_get_longest = FALSE;
+ if (ins_compl_prep(c))
+ continue;
+ #endif
+--- 698,704 ----
+
+ /* Prepare for or stop CTRL-X mode. This doesn't do completion, but
+ * it does fix up the text when finishing completion. */
+! ins_compl_init_get_longest();
+ if (ins_compl_prep(c))
+ continue;
+ #endif
+***************
+*** 939,945 ****
+ #endif
+
+ #ifdef FEAT_INS_EXPAND
+! if ((c == Ctrl_V || c == Ctrl_Q) && ctrl_x_mode == CTRL_X_CMDLINE)
+ goto docomplete;
+ #endif
+ if (c == Ctrl_V || c == Ctrl_Q)
+--- 741,747 ----
+ #endif
+
+ #ifdef FEAT_INS_EXPAND
+! if ((c == Ctrl_V || c == Ctrl_Q) && ctrl_x_mode_cmdline())
+ goto docomplete;
+ #endif
+ if (c == Ctrl_V || c == Ctrl_Q)
+***************
+*** 952,958 ****
+ #ifdef FEAT_CINDENT
+ if (cindent_on()
+ # ifdef FEAT_INS_EXPAND
+! && ctrl_x_mode == 0
+ # endif
+ )
+ {
+--- 754,760 ----
+ #ifdef FEAT_CINDENT
+ if (cindent_on()
+ # ifdef FEAT_INS_EXPAND
+! && ctrl_x_mode_none()
+ # endif
+ )
+ {
+***************
+*** 1073,1079 ****
+
+ case Ctrl_O: /* execute one command */
+ #ifdef FEAT_COMPL_FUNC
+! if (ctrl_x_mode == CTRL_X_OMNI)
+ goto docomplete;
+ #endif
+ if (echeck_abbr(Ctrl_O + ABBR_OFF))
+--- 875,881 ----
+
+ case Ctrl_O: /* execute one command */
+ #ifdef FEAT_COMPL_FUNC
+! if (ctrl_x_mode_omni())
+ goto docomplete;
+ #endif
+ if (echeck_abbr(Ctrl_O + ABBR_OFF))
+***************
+*** 1149,1162 ****
+
+ case Ctrl_D: /* Make indent one shiftwidth smaller. */
+ #if defined(FEAT_INS_EXPAND) && defined(FEAT_FIND_ID)
+! if (ctrl_x_mode == CTRL_X_PATH_DEFINES)
+ goto docomplete;
+ #endif
+ /* FALLTHROUGH */
+
+ case Ctrl_T: /* Make indent one shiftwidth greater. */
+ # ifdef FEAT_INS_EXPAND
+! if (c == Ctrl_T && ctrl_x_mode == CTRL_X_THESAURUS)
+ {
+ if (has_compl_option(FALSE))
+ goto docomplete;
+--- 951,964 ----
+
+ case Ctrl_D: /* Make indent one shiftwidth smaller. */
+ #if defined(FEAT_INS_EXPAND) && defined(FEAT_FIND_ID)
+! if (ctrl_x_mode_path_defines())
+ goto docomplete;
+ #endif
+ /* FALLTHROUGH */
+
+ case Ctrl_T: /* Make indent one shiftwidth greater. */
+ # ifdef FEAT_INS_EXPAND
+! if (c == Ctrl_T && ctrl_x_mode_thesaurus())
+ {
+ if (has_compl_option(FALSE))
+ goto docomplete;
+***************
+*** 1200,1206 ****
+ case Ctrl_U: /* delete all inserted text in current line */
+ # ifdef FEAT_COMPL_FUNC
+ /* CTRL-X CTRL-U completes with 'completefunc'. */
+! if (ctrl_x_mode == CTRL_X_FUNCTION)
+ goto docomplete;
+ # endif
+ did_backspace = ins_bs(c, BACKSPACE_LINE, &inserted_space);
+--- 1002,1008 ----
+ case Ctrl_U: /* delete all inserted text in current line */
+ # ifdef FEAT_COMPL_FUNC
+ /* CTRL-X CTRL-U completes with 'completefunc'. */
+! if (ctrl_x_mode_function())
+ goto docomplete;
+ # endif
+ did_backspace = ins_bs(c, BACKSPACE_LINE, &inserted_space);
+***************
+*** 1382,1388 ****
+
+ case TAB: /* TAB or Complete patterns along path */
+ #if defined(FEAT_INS_EXPAND) && defined(FEAT_FIND_ID)
+! if (ctrl_x_mode == CTRL_X_PATH_PATTERNS)
+ goto docomplete;
+ #endif
+ inserted_space = FALSE;
+--- 1184,1190 ----
+
+ case TAB: /* TAB or Complete patterns along path */
+ #if defined(FEAT_INS_EXPAND) && defined(FEAT_FIND_ID)
+! if (ctrl_x_mode_path_patterns())
+ goto docomplete;
+ #endif
+ inserted_space = FALSE;
+***************
+*** 1436,1442 ****
+ #if defined(FEAT_DIGRAPHS) || defined(FEAT_INS_EXPAND)
+ case Ctrl_K: /* digraph or keyword completion */
+ # ifdef FEAT_INS_EXPAND
+! if (ctrl_x_mode == CTRL_X_DICTIONARY)
+ {
+ if (has_compl_option(TRUE))
+ goto docomplete;
+--- 1238,1244 ----
+ #if defined(FEAT_DIGRAPHS) || defined(FEAT_INS_EXPAND)
+ case Ctrl_K: /* digraph or keyword completion */
+ # ifdef FEAT_INS_EXPAND
+! if (ctrl_x_mode_dictionary())
+ {
+ if (has_compl_option(TRUE))
+ goto docomplete;
+***************
+*** 1457,1481 ****
+ break;
+
+ case Ctrl_RSB: /* Tag name completion after ^X */
+! if (ctrl_x_mode != CTRL_X_TAGS)
+ goto normalchar;
+ goto docomplete;
+
+ case Ctrl_F: /* File name completion after ^X */
+! if (ctrl_x_mode != CTRL_X_FILES)
+ goto normalchar;
+ goto docomplete;
+
+ case 's': /* Spelling completion after ^X */
+ case Ctrl_S:
+! if (ctrl_x_mode != CTRL_X_SPELL)
+ goto normalchar;
+ goto docomplete;
+ #endif
+
+ case Ctrl_L: /* Whole line completion after ^X */
+ #ifdef FEAT_INS_EXPAND
+! if (ctrl_x_mode != CTRL_X_WHOLE_LINE)
+ #endif
+ {
+ /* CTRL-L with 'insertmode' set: Leave Insert mode */
+--- 1259,1283 ----
+ break;
+
+ case Ctrl_RSB: /* Tag name completion after ^X */
+! if (!ctrl_x_mode_tags())
+ goto normalchar;
+ goto docomplete;
+
+ case Ctrl_F: /* File name completion after ^X */
+! if (!ctrl_x_mode_files())
+ goto normalchar;
+ goto docomplete;
+
+ case 's': /* Spelling completion after ^X */
+ case Ctrl_S:
+! if (!ctrl_x_mode_spell())
+ goto normalchar;
+ goto docomplete;
+ #endif
+
+ case Ctrl_L: /* Whole line completion after ^X */
+ #ifdef FEAT_INS_EXPAND
+! if (!ctrl_x_mode_whole_line())
+ #endif
+ {
+ /* CTRL-L with 'insertmode' set: Leave Insert mode */
+***************
+*** 1495,1502 ****
+ /* if 'complete' is empty then plain ^P is no longer special,
+ * but it is under other ^X modes */
+ if (*curbuf->b_p_cpt == NUL
+! && (ctrl_x_mode == CTRL_X_NORMAL
+! || ctrl_x_mode == CTRL_X_WHOLE_LINE)
+ && !(compl_cont_status & CONT_LOCAL))
+ goto normalchar;
+
+--- 1297,1303 ----
+ /* if 'complete' is empty then plain ^P is no longer special,
+ * but it is under other ^X modes */
+ if (*curbuf->b_p_cpt == NUL
+! && (ctrl_x_mode_normal() || ctrl_x_mode_whole_line())
+ && !(compl_cont_status & CONT_LOCAL))
+ goto normalchar;
+
+***************
+*** 1608,1614 ****
+ if (c != K_CURSORHOLD
+ #ifdef FEAT_COMPL_FUNC
+ /* but not in CTRL-X mode, a script can't restore the state */
+! && ctrl_x_mode == CTRL_X_NORMAL
+ #endif
+ )
+ did_cursorhold = FALSE;
+--- 1409,1415 ----
+ if (c != K_CURSORHOLD
+ #ifdef FEAT_COMPL_FUNC
+ /* but not in CTRL-X mode, a script can't restore the state */
+! && ctrl_x_mode_normal()
+ #endif
+ )
+ did_cursorhold = FALSE;
+***************
+*** 1620,1626 ****
+ #ifdef FEAT_CINDENT
+ if (can_cindent && cindent_on()
+ # ifdef FEAT_INS_EXPAND
+! && ctrl_x_mode == CTRL_X_NORMAL
+ # endif
+ )
+ {
+--- 1421,1427 ----
+ #ifdef FEAT_CINDENT
+ if (can_cindent && cindent_on()
+ # ifdef FEAT_INS_EXPAND
+! && ctrl_x_mode_normal()
+ # endif
+ )
+ {
+***************
+*** 1641,1646 ****
+--- 1442,1453 ----
+ /* NOTREACHED */
+ }
+
++ int
++ ins_need_undo_get(void)
++ {
++ return ins_need_undo;
++ }
++
+ /*
+ * Redraw for Insert mode.
+ * This is postponed until getting the next character to make '$' in the 'cpo'
+***************
+*** 1648,1654 ****
+ * Only redraw when there are no characters available. This speeds up
+ * inserting sequences of characters (e.g., for CTRL-R).
+ */
+! static void
+ ins_redraw(
+ int ready UNUSED) /* not busy with something */
+ {
+--- 1455,1461 ----
+ * Only redraw when there are no characters available. This speeds up
+ * inserting sequences of characters (e.g., for CTRL-R).
+ */
+! void
+ ins_redraw(
+ int ready UNUSED) /* not busy with something */
+ {
+***************
+*** 2313,6031 ****
+ return TRUE;
+ }
+
+- #if defined(FEAT_INS_EXPAND) || defined(PROTO)
+- /*
+- * CTRL-X pressed in Insert mode.
+- */
+- static void
+- ins_ctrl_x(void)
+- {
+- /* CTRL-X after CTRL-X CTRL-V doesn't do anything, so that CTRL-X
+- * CTRL-V works like CTRL-N */
+- if (ctrl_x_mode != CTRL_X_CMDLINE)
+- {
+- /* if the next ^X<> won't ADD nothing, then reset
+- * compl_cont_status */
+- if (compl_cont_status & CONT_N_ADDS)
+- compl_cont_status |= CONT_INTRPT;
+- else
+- compl_cont_status = 0;
+- /* We're not sure which CTRL-X mode it will be yet */
+- ctrl_x_mode = CTRL_X_NOT_DEFINED_YET;
+- edit_submode = (char_u *)_(CTRL_X_MSG(ctrl_x_mode));
+- edit_submode_pre = NULL;
+- showmode();
+- }
+- }
+-
+- /*
+- * Whether other than default completion has been selected.
+- */
+- int
+- ctrl_x_mode_not_default(void)
+- {
+- return ctrl_x_mode != CTRL_X_NORMAL;
+- }
+-
+- /*
+- * Whether CTRL-X was typed without a following character.
+- */
+- int
+- ctrl_x_mode_not_defined_yet(void)
+- {
+- return ctrl_x_mode == CTRL_X_NOT_DEFINED_YET;
+- }
+-
+- /*
+- * Return TRUE if the 'dict' or 'tsr' option can be used.
+- */
+- static int
+- has_compl_option(int dict_opt)
+- {
+- if (dict_opt ? (*curbuf->b_p_dict == NUL && *p_dict == NUL
+- # ifdef FEAT_SPELL
+- && !curwin->w_p_spell
+- # endif
+- )
+- : (*curbuf->b_p_tsr == NUL && *p_tsr == NUL))
+- {
+- ctrl_x_mode = CTRL_X_NORMAL;
+- edit_submode = NULL;
+- msg_attr(dict_opt ? _("'dictionary' option is empty")
+- : _("'thesaurus' option is empty"),
+- HL_ATTR(HLF_E));
+- if (emsg_silent == 0)
+- {
+- vim_beep(BO_COMPL);
+- setcursor();
+- out_flush();
+- #ifdef FEAT_EVAL
+- if (!get_vim_var_nr(VV_TESTING))
+- #endif
+- ui_delay(2000L, FALSE);
+- }
+- return FALSE;
+- }
+- return TRUE;
+- }
+-
+- /*
+- * Is the character 'c' a valid key to go to or keep us in CTRL-X mode?
+- * This depends on the current mode.
+- */
+- int
+- vim_is_ctrl_x_key(int c)
+- {
+- // Always allow ^R - let its results then be checked
+- if (c == Ctrl_R)
+- return TRUE;
+-
+- /* Accept <PageUp> and <PageDown> if the popup menu is visible. */
+- if (ins_compl_pum_key(c))
+- return TRUE;
+-
+- switch (ctrl_x_mode)
+- {
+- case 0: /* Not in any CTRL-X mode */
+- return (c == Ctrl_N || c == Ctrl_P || c == Ctrl_X);
+- case CTRL_X_NOT_DEFINED_YET:
+- return ( c == Ctrl_X || c == Ctrl_Y || c == Ctrl_E
+- || c == Ctrl_L || c == Ctrl_F || c == Ctrl_RSB
+- || c == Ctrl_I || c == Ctrl_D || c == Ctrl_P
+- || c == Ctrl_N || c == Ctrl_T || c == Ctrl_V
+- || c == Ctrl_Q || c == Ctrl_U || c == Ctrl_O
+- || c == Ctrl_S || c == Ctrl_K || c == 's');
+- case CTRL_X_SCROLL:
+- return (c == Ctrl_Y || c == Ctrl_E);
+- case CTRL_X_WHOLE_LINE:
+- return (c == Ctrl_L || c == Ctrl_P || c == Ctrl_N);
+- case CTRL_X_FILES:
+- return (c == Ctrl_F || c == Ctrl_P || c == Ctrl_N);
+- case CTRL_X_DICTIONARY:
+- return (c == Ctrl_K || c == Ctrl_P || c == Ctrl_N);
+- case CTRL_X_THESAURUS:
+- return (c == Ctrl_T || c == Ctrl_P || c == Ctrl_N);
+- case CTRL_X_TAGS:
+- return (c == Ctrl_RSB || c == Ctrl_P || c == Ctrl_N);
+- #ifdef FEAT_FIND_ID
+- case CTRL_X_PATH_PATTERNS:
+- return (c == Ctrl_P || c == Ctrl_N);
+- case CTRL_X_PATH_DEFINES:
+- return (c == Ctrl_D || c == Ctrl_P || c == Ctrl_N);
+- #endif
+- case CTRL_X_CMDLINE:
+- return (c == Ctrl_V || c == Ctrl_Q || c == Ctrl_P || c == Ctrl_N
+- || c == Ctrl_X);
+- #ifdef FEAT_COMPL_FUNC
+- case CTRL_X_FUNCTION:
+- return (c == Ctrl_U || c == Ctrl_P || c == Ctrl_N);
+- case CTRL_X_OMNI:
+- return (c == Ctrl_O || c == Ctrl_P || c == Ctrl_N);
+- #endif
+- case CTRL_X_SPELL:
+- return (c == Ctrl_S || c == Ctrl_P || c == Ctrl_N);
+- case CTRL_X_EVAL:
+- return (c == Ctrl_P || c == Ctrl_N);
+- }
+- internal_error("vim_is_ctrl_x_key()");
+- return FALSE;
+- }
+-
+- /*
+- * Return TRUE when character "c" is part of the item currently being
+- * completed. Used to decide whether to abandon complete mode when the menu
+- * is visible.
+- */
+- static int
+- ins_compl_accept_char(int c)
+- {
+- if (ctrl_x_mode & CTRL_X_WANT_IDENT)
+- /* When expanding an identifier only accept identifier chars. */
+- return vim_isIDc(c);
+-
+- switch (ctrl_x_mode)
+- {
+- case CTRL_X_FILES:
+- /* When expanding file name only accept file name chars. But not
+- * path separators, so that "proto/<Tab>" expands files in
+- * "proto", not "proto/" as a whole */
+- return vim_isfilec(c) && !vim_ispathsep(c);
+-
+- case CTRL_X_CMDLINE:
+- case CTRL_X_OMNI:
+- /* Command line and Omni completion can work with just about any
+- * printable character, but do stop at white space. */
+- return vim_isprintc(c) && !VIM_ISWHITE(c);
+-
+- case CTRL_X_WHOLE_LINE:
+- /* For while line completion a space can be part of the line. */
+- return vim_isprintc(c);
+- }
+- return vim_iswordc(c);
+- }
+-
+- /*
+- * This is like ins_compl_add(), but if 'ic' and 'inf' are set, then the
+- * case of the originally typed text is used, and the case of the completed
+- * text is inferred, ie this tries to work out what case you probably wanted
+- * the rest of the word to be in -- webb
+- */
+- int
+- ins_compl_add_infercase(
+- char_u *str,
+- int len,
+- int icase,
+- char_u *fname,
+- int dir,
+- int flags)
+- {
+- char_u *p;
+- int i, c;
+- int actual_len; /* Take multi-byte characters */
+- int actual_compl_length; /* into account. */
+- int min_len;
+- int *wca; /* Wide character array. */
+- int has_lower = FALSE;
+- int was_letter = FALSE;
+-
+- if (p_ic && curbuf->b_p_inf && len > 0)
+- {
+- /* Infer case of completed part. */
+-
+- /* Find actual length of completion. */
+- if (has_mbyte)
+- {
+- p = str;
+- actual_len = 0;
+- while (*p != NUL)
+- {
+- MB_PTR_ADV(p);
+- ++actual_len;
+- }
+- }
+- else
+- actual_len = len;
+-
+- /* Find actual length of original text. */
+- if (has_mbyte)
+- {
+- p = compl_orig_text;
+- actual_compl_length = 0;
+- while (*p != NUL)
+- {
+- MB_PTR_ADV(p);
+- ++actual_compl_length;
+- }
+- }
+- else
+- actual_compl_length = compl_length;
+-
+- /* "actual_len" may be smaller than "actual_compl_length" when using
+- * thesaurus, only use the minimum when comparing. */
+- min_len = actual_len < actual_compl_length
+- ? actual_len : actual_compl_length;
+-
+- /* Allocate wide character array for the completion and fill it. */
+- wca = (int *)alloc((unsigned)(actual_len * sizeof(int)));
+- if (wca != NULL)
+- {
+- p = str;
+- for (i = 0; i < actual_len; ++i)
+- if (has_mbyte)
+- wca[i] = mb_ptr2char_adv(&p);
+- else
+- wca[i] = *(p++);
+-
+- /* Rule 1: Were any chars converted to lower? */
+- p = compl_orig_text;
+- for (i = 0; i < min_len; ++i)
+- {
+- if (has_mbyte)
+- c = mb_ptr2char_adv(&p);
+- else
+- c = *(p++);
+- if (MB_ISLOWER(c))
+- {
+- has_lower = TRUE;
+- if (MB_ISUPPER(wca[i]))
+- {
+- /* Rule 1 is satisfied. */
+- for (i = actual_compl_length; i < actual_len; ++i)
+- wca[i] = MB_TOLOWER(wca[i]);
+- break;
+- }
+- }
+- }
+-
+- /*
+- * Rule 2: No lower case, 2nd consecutive letter converted to
+- * upper case.
+- */
+- if (!has_lower)
+- {
+- p = compl_orig_text;
+- for (i = 0; i < min_len; ++i)
+- {
+- if (has_mbyte)
+- c = mb_ptr2char_adv(&p);
+- else
+- c = *(p++);
+- if (was_letter && MB_ISUPPER(c) && MB_ISLOWER(wca[i]))
+- {
+- /* Rule 2 is satisfied. */
+- for (i = actual_compl_length; i < actual_len; ++i)
+- wca[i] = MB_TOUPPER(wca[i]);
+- break;
+- }
+- was_letter = MB_ISLOWER(c) || MB_ISUPPER(c);
+- }
+- }
+-
+- /* Copy the original case of the part we typed. */
+- p = compl_orig_text;
+- for (i = 0; i < min_len; ++i)
+- {
+- if (has_mbyte)
+- c = mb_ptr2char_adv(&p);
+- else
+- c = *(p++);
+- if (MB_ISLOWER(c))
+- wca[i] = MB_TOLOWER(wca[i]);
+- else if (MB_ISUPPER(c))
+- wca[i] = MB_TOUPPER(wca[i]);
+- }
+-
+- /*
+- * Generate encoding specific output from wide character array.
+- * Multi-byte characters can occupy up to five bytes more than
+- * ASCII characters, and we also need one byte for NUL, so stay
+- * six bytes away from the edge of IObuff.
+- */
+- p = IObuff;
+- i = 0;
+- while (i < actual_len && (p - IObuff + 6) < IOSIZE)
+- if (has_mbyte)
+- p += (*mb_char2bytes)(wca[i++], p);
+- else
+- *(p++) = wca[i++];
+- *p = NUL;
+-
+- vim_free(wca);
+- }
+-
+- return ins_compl_add(IObuff, len, icase, fname, NULL, dir,
+- flags, FALSE);
+- }
+- return ins_compl_add(str, len, icase, fname, NULL, dir, flags, FALSE);
+- }
+-
+- /*
+- * Add a match to the list of matches.
+- * If the given string is already in the list of completions, then return
+- * NOTDONE, otherwise add it to the list and return OK. If there is an error,
+- * maybe because alloc() returns NULL, then FAIL is returned.
+- */
+- static int
+- ins_compl_add(
+- char_u *str,
+- int len,
+- int icase,
+- char_u *fname,
+- char_u **cptext, /* extra text for popup menu or NULL */
+- int cdir,
+- int flags,
+- int adup) /* accept duplicate match */
+- {
+- compl_T *match;
+- int dir = (cdir == 0 ? compl_direction : cdir);
+-
+- ui_breakcheck();
+- if (got_int)
+- return FAIL;
+- if (len < 0)
+- len = (int)STRLEN(str);
+-
+- /*
+- * If the same match is already present, don't add it.
+- */
+- if (compl_first_match != NULL && !adup)
+- {
+- match = compl_first_match;
+- do
+- {
+- if ( !(match->cp_flags & ORIGINAL_TEXT)
+- && STRNCMP(match->cp_str, str, len) == 0
+- && match->cp_str[len] == NUL)
+- return NOTDONE;
+- match = match->cp_next;
+- } while (match != NULL && match != compl_first_match);
+- }
+-
+- /* Remove any popup menu before changing the list of matches. */
+- ins_compl_del_pum();
+-
+- /*
+- * Allocate a new match structure.
+- * Copy the values to the new match structure.
+- */
+- match = (compl_T *)alloc_clear((unsigned)sizeof(compl_T));
+- if (match == NULL)
+- return FAIL;
+- match->cp_number = -1;
+- if (flags & ORIGINAL_TEXT)
+- match->cp_number = 0;
+- if ((match->cp_str = vim_strnsave(str, len)) == NULL)
+- {
+- vim_free(match);
+- return FAIL;
+- }
+- match->cp_icase = icase;
+-
+- /* match-fname is:
+- * - compl_curr_match->cp_fname if it is a string equal to fname.
+- * - a copy of fname, FREE_FNAME is set to free later THE allocated mem.
+- * - NULL otherwise. --Acevedo */
+- if (fname != NULL
+- && compl_curr_match != NULL
+- && compl_curr_match->cp_fname != NULL
+- && STRCMP(fname, compl_curr_match->cp_fname) == 0)
+- match->cp_fname = compl_curr_match->cp_fname;
+- else if (fname != NULL)
+- {
+- match->cp_fname = vim_strsave(fname);
+- flags |= FREE_FNAME;
+- }
+- else
+- match->cp_fname = NULL;
+- match->cp_flags = flags;
+-
+- if (cptext != NULL)
+- {
+- int i;
+-
+- for (i = 0; i < CPT_COUNT; ++i)
+- if (cptext[i] != NULL && *cptext[i] != NUL)
+- match->cp_text[i] = vim_strsave(cptext[i]);
+- }
+-
+- /*
+- * Link the new match structure in the list of matches.
+- */
+- if (compl_first_match == NULL)
+- match->cp_next = match->cp_prev = NULL;
+- else if (dir == FORWARD)
+- {
+- match->cp_next = compl_curr_match->cp_next;
+- match->cp_prev = compl_curr_match;
+- }
+- else /* BACKWARD */
+- {
+- match->cp_next = compl_curr_match;
+- match->cp_prev = compl_curr_match->cp_prev;
+- }
+- if (match->cp_next)
+- match->cp_next->cp_prev = match;
+- if (match->cp_prev)
+- match->cp_prev->cp_next = match;
+- else /* if there's nothing before, it is the first match */
+- compl_first_match = match;
+- compl_curr_match = match;
+-
+- /*
+- * Find the longest common string if still doing that.
+- */
+- if (compl_get_longest && (flags & ORIGINAL_TEXT) == 0)
+- ins_compl_longest_match(match);
+-
+- return OK;
+- }
+-
+- /*
+- * Return TRUE if "str[len]" matches with match->cp_str, considering
+- * match->cp_icase.
+- */
+- static int
+- ins_compl_equal(compl_T *match, char_u *str, int len)
+- {
+- if (match->cp_icase)
+- return STRNICMP(match->cp_str, str, (size_t)len) == 0;
+- return STRNCMP(match->cp_str, str, (size_t)len) == 0;
+- }
+-
+- /*
+- * Reduce the longest common string for match "match".
+- */
+- static void
+- ins_compl_longest_match(compl_T *match)
+- {
+- char_u *p, *s;
+- int c1, c2;
+- int had_match;
+-
+- if (compl_leader == NULL)
+- {
+- /* First match, use it as a whole. */
+- compl_leader = vim_strsave(match->cp_str);
+- if (compl_leader != NULL)
+- {
+- had_match = (curwin->w_cursor.col > compl_col);
+- ins_compl_delete();
+- ins_bytes(compl_leader + ins_compl_len());
+- ins_redraw(FALSE);
+-
+- /* When the match isn't there (to avoid matching itself) remove it
+- * again after redrawing. */
+- if (!had_match)
+- ins_compl_delete();
+- compl_used_match = FALSE;
+- }
+- }
+- else
+- {
+- /* Reduce the text if this match differs from compl_leader. */
+- p = compl_leader;
+- s = match->cp_str;
+- while (*p != NUL)
+- {
+- if (has_mbyte)
+- {
+- c1 = mb_ptr2char(p);
+- c2 = mb_ptr2char(s);
+- }
+- else
+- {
+- c1 = *p;
+- c2 = *s;
+- }
+- if (match->cp_icase ? (MB_TOLOWER(c1) != MB_TOLOWER(c2))
+- : (c1 != c2))
+- break;
+- if (has_mbyte)
+- {
+- MB_PTR_ADV(p);
+- MB_PTR_ADV(s);
+- }
+- else
+- {
+- ++p;
+- ++s;
+- }
+- }
+-
+- if (*p != NUL)
+- {
+- /* Leader was shortened, need to change the inserted text. */
+- *p = NUL;
+- had_match = (curwin->w_cursor.col > compl_col);
+- ins_compl_delete();
+- ins_bytes(compl_leader + ins_compl_len());
+- ins_redraw(FALSE);
+-
+- /* When the match isn't there (to avoid matching itself) remove it
+- * again after redrawing. */
+- if (!had_match)
+- ins_compl_delete();
+- }
+-
+- compl_used_match = FALSE;
+- }
+- }
+-
+- /*
+- * Add an array of matches to the list of matches.
+- * Frees matches[].
+- */
+- static void
+- ins_compl_add_matches(
+- int num_matches,
+- char_u **matches,
+- int icase)
+- {
+- int i;
+- int add_r = OK;
+- int dir = compl_direction;
+-
+- for (i = 0; i < num_matches && add_r != FAIL; i++)
+- if ((add_r = ins_compl_add(matches[i], -1, icase,
+- NULL, NULL, dir, 0, FALSE)) == OK)
+- /* if dir was BACKWARD then honor it just once */
+- dir = FORWARD;
+- FreeWild(num_matches, matches);
+- }
+-
+- /* Make the completion list cyclic.
+- * Return the number of matches (excluding the original).
+- */
+- static int
+- ins_compl_make_cyclic(void)
+- {
+- compl_T *match;
+- int count = 0;
+-
+- if (compl_first_match != NULL)
+- {
+- /*
+- * Find the end of the list.
+- */
+- match = compl_first_match;
+- /* there's always an entry for the compl_orig_text, it doesn't count. */
+- while (match->cp_next != NULL && match->cp_next != compl_first_match)
+- {
+- match = match->cp_next;
+- ++count;
+- }
+- match->cp_next = compl_first_match;
+- compl_first_match->cp_prev = match;
+- }
+- return count;
+- }
+-
+- /*
+- * Set variables that store noselect and noinsert behavior from the
+- * 'completeopt' value.
+- */
+- void
+- completeopt_was_set(void)
+- {
+- compl_no_insert = FALSE;
+- compl_no_select = FALSE;
+- if (strstr((char *)p_cot, "noselect") != NULL)
+- compl_no_select = TRUE;
+- if (strstr((char *)p_cot, "noinsert") != NULL)
+- compl_no_insert = TRUE;
+- }
+-
+- /*
+- * Start completion for the complete() function.
+- * "startcol" is where the matched text starts (1 is first column).
+- * "list" is the list of matches.
+- */
+- void
+- set_completion(colnr_T startcol, list_T *list)
+- {
+- int save_w_wrow = curwin->w_wrow;
+- int save_w_leftcol = curwin->w_leftcol;
+-
+- /* If already doing completions stop it. */
+- if (ctrl_x_mode != CTRL_X_NORMAL)
+- ins_compl_prep(' ');
+- ins_compl_clear();
+- ins_compl_free();
+-
+- compl_direction = FORWARD;
+- if (startcol > curwin->w_cursor.col)
+- startcol = curwin->w_cursor.col;
+- compl_col = startcol;
+- compl_length = (int)curwin->w_cursor.col - (int)startcol;
+- /* compl_pattern doesn't need to be set */
+- compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
+- if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
+- -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
+- return;
+-
+- ctrl_x_mode = CTRL_X_EVAL;
+-
+- ins_compl_add_list(list);
+- compl_matches = ins_compl_make_cyclic();
+- compl_started = TRUE;
+- compl_used_match = TRUE;
+- compl_cont_status = 0;
+-
+- compl_curr_match = compl_first_match;
+- if (compl_no_insert || compl_no_select)
+- {
+- ins_complete(K_DOWN, FALSE);
+- if (compl_no_select)
+- /* Down/Up has no real effect. */
+- ins_complete(K_UP, FALSE);
+- }
+- else
+- ins_complete(Ctrl_N, FALSE);
+- compl_enter_selects = compl_no_insert;
+-
+- /* Lazily show the popup menu, unless we got interrupted. */
+- if (!compl_interrupted)
+- show_pum(save_w_wrow, save_w_leftcol);
+- out_flush();
+- }
+-
+-
+- /* "compl_match_array" points the currently displayed list of entries in the
+- * popup menu. It is NULL when there is no popup menu. */
+- static pumitem_T *compl_match_array = NULL;
+- static int compl_match_arraysize;
+-
+- /*
+- * Update the screen and when there is any scrolling remove the popup menu.
+- */
+- static void
+- ins_compl_upd_pum(void)
+- {
+- int h;
+-
+- if (compl_match_array != NULL)
+- {
+- h = curwin->w_cline_height;
+- // Update the screen later, before drawing the popup menu over it.
+- pum_call_update_screen();
+- if (h != curwin->w_cline_height)
+- ins_compl_del_pum();
+- }
+- }
+-
+- /*
+- * Remove any popup menu.
+- */
+- static void
+- ins_compl_del_pum(void)
+- {
+- if (compl_match_array != NULL)
+- {
+- pum_undisplay();
+- VIM_CLEAR(compl_match_array);
+- }
+- }
+-
+- /*
+- * Return TRUE if the popup menu should be displayed.
+- */
+- static int
+- pum_wanted(void)
+- {
+- /* 'completeopt' must contain "menu" or "menuone" */
+- if (vim_strchr(p_cot, 'm') == NULL)
+- return FALSE;
+-
+- /* The display looks bad on a B&W display. */
+- if (t_colors < 8
+- #ifdef FEAT_GUI
+- && !gui.in_use
+- #endif
+- )
+- return FALSE;
+- return TRUE;
+- }
+-
+- /*
+- * Return TRUE if there are two or more matches to be shown in the popup menu.
+- * One if 'completopt' contains "menuone".
+- */
+- static int
+- pum_enough_matches(void)
+- {
+- compl_T *compl;
+- int i;
+-
+- /* Don't display the popup menu if there are no matches or there is only
+- * one (ignoring the original text). */
+- compl = compl_first_match;
+- i = 0;
+- do
+- {
+- if (compl == NULL
+- || ((compl->cp_flags & ORIGINAL_TEXT) == 0 && ++i == 2))
+- break;
+- compl = compl->cp_next;
+- } while (compl != compl_first_match);
+-
+- if (strstr((char *)p_cot, "menuone") != NULL)
+- return (i >= 1);
+- return (i >= 2);
+- }
+-
+- /*
+- * Show the popup menu for the list of matches.
+- * Also adjusts "compl_shown_match" to an entry that is actually displayed.
+- */
+- void
+- ins_compl_show_pum(void)
+- {
+- compl_T *compl;
+- compl_T *shown_compl = NULL;
+- int did_find_shown_match = FALSE;
+- int shown_match_ok = FALSE;
+- int i;
+- int cur = -1;
+- colnr_T col;
+- int lead_len = 0;
+-
+- if (!pum_wanted() || !pum_enough_matches())
+- return;
+-
+- #if defined(FEAT_EVAL)
+- /* Dirty hard-coded hack: remove any matchparen highlighting. */
+- do_cmdline_cmd((char_u *)"if exists('g:loaded_matchparen')|3match none|endif");
+- #endif
+-
+- // Update the screen later, before drawing the popup menu over it.
+- pum_call_update_screen();
+-
+- if (compl_match_array == NULL)
+- {
+- /* Need to build the popup menu list. */
+- compl_match_arraysize = 0;
+- compl = compl_first_match;
+- if (compl_leader != NULL)
+- lead_len = (int)STRLEN(compl_leader);
+- do
+- {
+- if ((compl->cp_flags & ORIGINAL_TEXT) == 0
+- && (compl_leader == NULL
+- || ins_compl_equal(compl, compl_leader, lead_len)))
+- ++compl_match_arraysize;
+- compl = compl->cp_next;
+- } while (compl != NULL && compl != compl_first_match);
+- if (compl_match_arraysize == 0)
+- return;
+- compl_match_array = (pumitem_T *)alloc_clear(
+- (unsigned)(sizeof(pumitem_T)
+- * compl_match_arraysize));
+- if (compl_match_array != NULL)
+- {
+- /* If the current match is the original text don't find the first
+- * match after it, don't highlight anything. */
+- if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
+- shown_match_ok = TRUE;
+-
+- i = 0;
+- compl = compl_first_match;
+- do
+- {
+- if ((compl->cp_flags & ORIGINAL_TEXT) == 0
+- && (compl_leader == NULL
+- || ins_compl_equal(compl, compl_leader, lead_len)))
+- {
+- if (!shown_match_ok)
+- {
+- if (compl == compl_shown_match || did_find_shown_match)
+- {
+- /* This item is the shown match or this is the
+- * first displayed item after the shown match. */
+- compl_shown_match = compl;
+- did_find_shown_match = TRUE;
+- shown_match_ok = TRUE;
+- }
+- else
+- /* Remember this displayed match for when the
+- * shown match is just below it. */
+- shown_compl = compl;
+- cur = i;
+- }
+-
+- if (compl->cp_text[CPT_ABBR] != NULL)
+- compl_match_array[i].pum_text =
+- compl->cp_text[CPT_ABBR];
+- else
+- compl_match_array[i].pum_text = compl->cp_str;
+- compl_match_array[i].pum_kind = compl->cp_text[CPT_KIND];
+- compl_match_array[i].pum_info = compl->cp_text[CPT_INFO];
+- if (compl->cp_text[CPT_MENU] != NULL)
+- compl_match_array[i++].pum_extra =
+- compl->cp_text[CPT_MENU];
+- else
+- compl_match_array[i++].pum_extra = compl->cp_fname;
+- }
+-
+- if (compl == compl_shown_match)
+- {
+- did_find_shown_match = TRUE;
+-
+- /* When the original text is the shown match don't set
+- * compl_shown_match. */
+- if (compl->cp_flags & ORIGINAL_TEXT)
+- shown_match_ok = TRUE;
+-
+- if (!shown_match_ok && shown_compl != NULL)
+- {
+- /* The shown match isn't displayed, set it to the
+- * previously displayed match. */
+- compl_shown_match = shown_compl;
+- shown_match_ok = TRUE;
+- }
+- }
+- compl = compl->cp_next;
+- } while (compl != NULL && compl != compl_first_match);
+-
+- if (!shown_match_ok) /* no displayed match at all */
+- cur = -1;
+- }
+- }
+- else
+- {
+- /* popup menu already exists, only need to find the current item.*/
+- for (i = 0; i < compl_match_arraysize; ++i)
+- if (compl_match_array[i].pum_text == compl_shown_match->cp_str
+- || compl_match_array[i].pum_text
+- == compl_shown_match->cp_text[CPT_ABBR])
+- {
+- cur = i;
+- break;
+- }
+- }
+-
+- if (compl_match_array != NULL)
+- {
+- /* In Replace mode when a $ is displayed at the end of the line only
+- * part of the screen would be updated. We do need to redraw here. */
+- dollar_vcol = -1;
+-
+- /* Compute the screen column of the start of the completed text.
+- * Use the cursor to get all wrapping and other settings right. */
+- col = curwin->w_cursor.col;
+- curwin->w_cursor.col = compl_col;
+- pum_display(compl_match_array, compl_match_arraysize, cur);
+- curwin->w_cursor.col = col;
+- }
+- }
+-
+- #define DICT_FIRST (1) /* use just first element in "dict" */
+- #define DICT_EXACT (2) /* "dict" is the exact name of a file */
+-
+- /*
+- * Add any identifiers that match the given pattern in the list of dictionary
+- * files "dict_start" to the list of completions.
+- */
+- static void
+- ins_compl_dictionaries(
+- char_u *dict_start,
+- char_u *pat,
+- int flags, /* DICT_FIRST and/or DICT_EXACT */
+- int thesaurus) /* Thesaurus completion */
+- {
+- char_u *dict = dict_start;
+- char_u *ptr;
+- char_u *buf;
+- regmatch_T regmatch;
+- char_u **files;
+- int count;
+- int save_p_scs;
+- int dir = compl_direction;
+-
+- if (*dict == NUL)
+- {
+- #ifdef FEAT_SPELL
+- /* When 'dictionary' is empty and spell checking is enabled use
+- * "spell". */
+- if (!thesaurus && curwin->w_p_spell)
+- dict = (char_u *)"spell";
+- else
+- #endif
+- return;
+- }
+-
+- buf = alloc(LSIZE);
+- if (buf == NULL)
+- return;
+- regmatch.regprog = NULL; /* so that we can goto theend */
+-
+- /* If 'infercase' is set, don't use 'smartcase' here */
+- save_p_scs = p_scs;
+- if (curbuf->b_p_inf)
+- p_scs = FALSE;
+-
+- /* When invoked to match whole lines for CTRL-X CTRL-L adjust the pattern
+- * to only match at the start of a line. Otherwise just match the
+- * pattern. Also need to double backslashes. */
+- if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
+- {
+- char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
+- size_t len;
+-
+- if (pat_esc == NULL)
+- goto theend;
+- len = STRLEN(pat_esc) + 10;
+- ptr = alloc((unsigned)len);
+- if (ptr == NULL)
+- {
+- vim_free(pat_esc);
+- goto theend;
+- }
+- vim_snprintf((char *)ptr, len, "^\\s*\\zs\\V%s", pat_esc);
+- regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
+- vim_free(pat_esc);
+- vim_free(ptr);
+- }
+- else
+- {
+- regmatch.regprog = vim_regcomp(pat, p_magic ? RE_MAGIC : 0);
+- if (regmatch.regprog == NULL)
+- goto theend;
+- }
+-
+- /* ignore case depends on 'ignorecase', 'smartcase' and "pat" */
+- regmatch.rm_ic = ignorecase(pat);
+- while (*dict != NUL && !got_int && !compl_interrupted)
+- {
+- /* copy one dictionary file name into buf */
+- if (flags == DICT_EXACT)
+- {
+- count = 1;
+- files = &dict;
+- }
+- else
+- {
+- /* Expand wildcards in the dictionary name, but do not allow
+- * backticks (for security, the 'dict' option may have been set in
+- * a modeline). */
+- copy_option_part(&dict, buf, LSIZE, ",");
+- # ifdef FEAT_SPELL
+- if (!thesaurus && STRCMP(buf, "spell") == 0)
+- count = -1;
+- else
+- # endif
+- if (vim_strchr(buf, '`') != NULL
+- || expand_wildcards(1, &buf, &count, &files,
+- EW_FILE|EW_SILENT) != OK)
+- count = 0;
+- }
+-
+- # ifdef FEAT_SPELL
+- if (count == -1)
+- {
+- /* Complete from active spelling. Skip "\<" in the pattern, we
+- * don't use it as a RE. */
+- if (pat[0] == '\\' && pat[1] == '<')
+- ptr = pat + 2;
+- else
+- ptr = pat;
+- spell_dump_compl(ptr, regmatch.rm_ic, &dir, 0);
+- }
+- else
+- # endif
+- if (count > 0) /* avoid warning for using "files" uninit */
+- {
+- ins_compl_files(count, files, thesaurus, flags,
+- &regmatch, buf, &dir);
+- if (flags != DICT_EXACT)
+- FreeWild(count, files);
+- }
+- if (flags != 0)
+- break;
+- }
+-
+- theend:
+- p_scs = save_p_scs;
+- vim_regfree(regmatch.regprog);
+- vim_free(buf);
+- }
+-
+- static void
+- ins_compl_files(
+- int count,
+- char_u **files,
+- int thesaurus,
+- int flags,
+- regmatch_T *regmatch,
+- char_u *buf,
+- int *dir)
+- {
+- char_u *ptr;
+- int i;
+- FILE *fp;
+- int add_r;
+-
+- for (i = 0; i < count && !got_int && !compl_interrupted; i++)
+- {
+- fp = mch_fopen((char *)files[i], "r"); /* open dictionary file */
+- if (flags != DICT_EXACT)
+- {
+- vim_snprintf((char *)IObuff, IOSIZE,
+- _("Scanning dictionary: %s"), (char *)files[i]);
+- (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
+- }
+-
+- if (fp != NULL)
+- {
+- /*
+- * Read dictionary file line by line.
+- * Check each line for a match.
+- */
+- while (!got_int && !compl_interrupted
+- && !vim_fgets(buf, LSIZE, fp))
+- {
+- ptr = buf;
+- while (vim_regexec(regmatch, buf, (colnr_T)(ptr - buf)))
+- {
+- ptr = regmatch->startp[0];
+- if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
+- ptr = find_line_end(ptr);
+- else
+- ptr = find_word_end(ptr);
+- add_r = ins_compl_add_infercase(regmatch->startp[0],
+- (int)(ptr - regmatch->startp[0]),
+- p_ic, files[i], *dir, 0);
+- if (thesaurus)
+- {
+- char_u *wstart;
+-
+- /*
+- * Add the other matches on the line
+- */
+- ptr = buf;
+- while (!got_int)
+- {
+- /* Find start of the next word. Skip white
+- * space and punctuation. */
+- ptr = find_word_start(ptr);
+- if (*ptr == NUL || *ptr == NL)
+- break;
+- wstart = ptr;
+-
+- /* Find end of the word. */
+- if (has_mbyte)
+- /* Japanese words may have characters in
+- * different classes, only separate words
+- * with single-byte non-word characters. */
+- while (*ptr != NUL)
+- {
+- int l = (*mb_ptr2len)(ptr);
+-
+- if (l < 2 && !vim_iswordc(*ptr))
+- break;
+- ptr += l;
+- }
+- else
+- ptr = find_word_end(ptr);
+-
+- /* Add the word. Skip the regexp match. */
+- if (wstart != regmatch->startp[0])
+- add_r = ins_compl_add_infercase(wstart,
+- (int)(ptr - wstart),
+- p_ic, files[i], *dir, 0);
+- }
+- }
+- if (add_r == OK)
+- /* if dir was BACKWARD then honor it just once */
+- *dir = FORWARD;
+- else if (add_r == FAIL)
+- break;
+- /* avoid expensive call to vim_regexec() when at end
+- * of line */
+- if (*ptr == '\n' || got_int)
+- break;
+- }
+- line_breakcheck();
+- ins_compl_check_keys(50, FALSE);
+- }
+- fclose(fp);
+- }
+- }
+- }
+-
+- /*
+- * Find the start of the next word.
+- * Returns a pointer to the first char of the word. Also stops at a NUL.
+- */
+- char_u *
+- find_word_start(char_u *ptr)
+- {
+- if (has_mbyte)
+- while (*ptr != NUL && *ptr != '\n' && mb_get_class(ptr) <= 1)
+- ptr += (*mb_ptr2len)(ptr);
+- else
+- while (*ptr != NUL && *ptr != '\n' && !vim_iswordc(*ptr))
+- ++ptr;
+- return ptr;
+- }
+-
+- /*
+- * Find the end of the word. Assumes it starts inside a word.
+- * Returns a pointer to just after the word.
+- */
+- char_u *
+- find_word_end(char_u *ptr)
+- {
+- int start_class;
+-
+- if (has_mbyte)
+- {
+- start_class = mb_get_class(ptr);
+- if (start_class > 1)
+- while (*ptr != NUL)
+- {
+- ptr += (*mb_ptr2len)(ptr);
+- if (mb_get_class(ptr) != start_class)
+- break;
+- }
+- }
+- else
+- while (vim_iswordc(*ptr))
+- ++ptr;
+- return ptr;
+- }
+-
+- /*
+- * Find the end of the line, omitting CR and NL at the end.
+- * Returns a pointer to just after the line.
+- */
+- static char_u *
+- find_line_end(char_u *ptr)
+- {
+- char_u *s;
+-
+- s = ptr + STRLEN(ptr);
+- while (s > ptr && (s[-1] == CAR || s[-1] == NL))
+- --s;
+- return s;
+- }
+-
+- /*
+- * Free the list of completions
+- */
+- static void
+- ins_compl_free(void)
+- {
+- compl_T *match;
+- int i;
+-
+- VIM_CLEAR(compl_pattern);
+- VIM_CLEAR(compl_leader);
+-
+- if (compl_first_match == NULL)
+- return;
+-
+- ins_compl_del_pum();
+- pum_clear();
+-
+- compl_curr_match = compl_first_match;
+- do
+- {
+- match = compl_curr_match;
+- compl_curr_match = compl_curr_match->cp_next;
+- vim_free(match->cp_str);
+- /* several entries may use the same fname, free it just once. */
+- if (match->cp_flags & FREE_FNAME)
+- vim_free(match->cp_fname);
+- for (i = 0; i < CPT_COUNT; ++i)
+- vim_free(match->cp_text[i]);
+- vim_free(match);
+- } while (compl_curr_match != NULL && compl_curr_match != compl_first_match);
+- compl_first_match = compl_curr_match = NULL;
+- compl_shown_match = NULL;
+- compl_old_match = NULL;
+- }
+-
+- static void
+- ins_compl_clear(void)
+- {
+- compl_cont_status = 0;
+- compl_started = FALSE;
+- compl_matches = 0;
+- VIM_CLEAR(compl_pattern);
+- VIM_CLEAR(compl_leader);
+- edit_submode_extra = NULL;
+- VIM_CLEAR(compl_orig_text);
+- compl_enter_selects = FALSE;
+- /* clear v:completed_item */
+- set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED));
+- }
+-
+- /*
+- * Return TRUE when Insert completion is active.
+- */
+- int
+- ins_compl_active(void)
+- {
+- return compl_started;
+- }
+-
+-
+- /*
+- * Get complete information
+- */
+- void
+- get_complete_info(list_T *what_list, dict_T *retdict)
+- {
+- int ret = OK;
+- listitem_T *item;
+- #define CI_WHAT_MODE 0x01
+- #define CI_WHAT_PUM_VISIBLE 0x02
+- #define CI_WHAT_ITEMS 0x04
+- #define CI_WHAT_SELECTED 0x08
+- #define CI_WHAT_INSERTED 0x10
+- #define CI_WHAT_ALL 0xff
+- int what_flag;
+-
+- if (what_list == NULL)
+- what_flag = CI_WHAT_ALL;
+- else
+- {
+- what_flag = 0;
+- for (item = what_list->lv_first; item != NULL; item = item->li_next)
+- {
+- char_u *what = tv_get_string(&item->li_tv);
+-
+- if (STRCMP(what, "mode") == 0)
+- what_flag |= CI_WHAT_MODE;
+- else if (STRCMP(what, "pum_visible") == 0)
+- what_flag |= CI_WHAT_PUM_VISIBLE;
+- else if (STRCMP(what, "items") == 0)
+- what_flag |= CI_WHAT_ITEMS;
+- else if (STRCMP(what, "selected") == 0)
+- what_flag |= CI_WHAT_SELECTED;
+- else if (STRCMP(what, "inserted") == 0)
+- what_flag |= CI_WHAT_INSERTED;
+- }
+- }
+-
+- if (ret == OK && (what_flag & CI_WHAT_MODE))
+- ret = dict_add_string(retdict, "mode", ins_compl_mode());
+-
+- if (ret == OK && (what_flag & CI_WHAT_PUM_VISIBLE))
+- ret = dict_add_number(retdict, "pum_visible", pum_visible());
+-
+- if (ret == OK && (what_flag & CI_WHAT_ITEMS))
+- {
+- list_T *li;
+- dict_T *di;
+- compl_T *match;
+-
+- li = list_alloc();
+- if (li == NULL)
+- return;
+- ret = dict_add_list(retdict, "items", li);
+- if (ret == OK && compl_first_match != NULL)
+- {
+- match = compl_first_match;
+- do
+- {
+- if (!(match->cp_flags & ORIGINAL_TEXT))
+- {
+- di = dict_alloc();
+- if (di == NULL)
+- return;
+- ret = list_append_dict(li, di);
+- if (ret != OK)
+- return;
+- dict_add_string(di, "word", match->cp_str);
+- dict_add_string(di, "abbr", match->cp_text[CPT_ABBR]);
+- dict_add_string(di, "menu", match->cp_text[CPT_MENU]);
+- dict_add_string(di, "kind", match->cp_text[CPT_KIND]);
+- dict_add_string(di, "info", match->cp_text[CPT_INFO]);
+- dict_add_string(di, "user_data",
+- match->cp_text[CPT_USER_DATA]);
+- }
+- match = match->cp_next;
+- }
+- while (match != NULL && match != compl_first_match);
+- }
+- }
+-
+- if (ret == OK && (what_flag & CI_WHAT_SELECTED))
+- ret = dict_add_number(retdict, "selected", (compl_curr_match != NULL) ?
+- compl_curr_match->cp_number - 1 : -1);
+-
+- // TODO
+- // if (ret == OK && (what_flag & CI_WHAT_INSERTED))
+- }
+-
+- /*
+- * Return Insert completion mode name string
+- */
+- static char_u *
+- ins_compl_mode(void)
+- {
+- if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET || compl_started)
+- return (char_u *)ctrl_x_mode_names[ctrl_x_mode & ~CTRL_X_WANT_IDENT];
+-
+- return (char_u *)"";
+- }
+-
+- /*
+- * Delete one character before the cursor and show the subset of the matches
+- * that match the word that is now before the cursor.
+- * Returns the character to be used, NUL if the work is done and another char
+- * to be got from the user.
+- */
+- static int
+- ins_compl_bs(void)
+- {
+- char_u *line;
+- char_u *p;
+-
+- line = ml_get_curline();
+- p = line + curwin->w_cursor.col;
+- MB_PTR_BACK(line, p);
+-
+- /* Stop completion when the whole word was deleted. For Omni completion
+- * allow the word to be deleted, we won't match everything.
+- * Respect the 'backspace' option. */
+- if ((int)(p - line) - (int)compl_col < 0
+- || ((int)(p - line) - (int)compl_col == 0
+- && ctrl_x_mode != CTRL_X_OMNI) || ctrl_x_mode == CTRL_X_EVAL
+- || (!can_bs(BS_START) && (int)(p - line) - (int)compl_col
+- - compl_length < 0))
+- return K_BS;
+-
+- /* Deleted more than what was used to find matches or didn't finish
+- * finding all matches: need to look for matches all over again. */
+- if (curwin->w_cursor.col <= compl_col + compl_length
+- || ins_compl_need_restart())
+- ins_compl_restart();
+-
+- vim_free(compl_leader);
+- compl_leader = vim_strnsave(line + compl_col, (int)(p - line) - compl_col);
+- if (compl_leader != NULL)
+- {
+- ins_compl_new_leader();
+- if (compl_shown_match != NULL)
+- /* Make sure current match is not a hidden item. */
+- compl_curr_match = compl_shown_match;
+- return NUL;
+- }
+- return K_BS;
+- }
+-
+- /*
+- * Return TRUE when we need to find matches again, ins_compl_restart() is to
+- * be called.
+- */
+- static int
+- ins_compl_need_restart(void)
+- {
+- /* Return TRUE if we didn't complete finding matches or when the
+- * 'completefunc' returned "always" in the "refresh" dictionary item. */
+- return compl_was_interrupted
+- || ((ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI)
+- && compl_opt_refresh_always);
+- }
+-
+- /*
+- * Called after changing "compl_leader".
+- * Show the popup menu with a different set of matches.
+- * May also search for matches again if the previous search was interrupted.
+- */
+- static void
+- ins_compl_new_leader(void)
+- {
+- ins_compl_del_pum();
+- ins_compl_delete();
+- ins_bytes(compl_leader + ins_compl_len());
+- compl_used_match = FALSE;
+-
+- if (compl_started)
+- ins_compl_set_original_text(compl_leader);
+- else
+- {
+- #ifdef FEAT_SPELL
+- spell_bad_len = 0; /* need to redetect bad word */
+- #endif
+- /*
+- * Matches were cleared, need to search for them now. Befor drawing
+- * the popup menu display the changed text before the cursor. Set
+- * "compl_restarting" to avoid that the first match is inserted.
+- */
+- pum_call_update_screen();
+- #ifdef FEAT_GUI
+- if (gui.in_use)
+- {
+- /* Show the cursor after the match, not after the redrawn text. */
+- setcursor();
+- out_flush_cursor(FALSE, FALSE);
+- }
+- #endif
+- compl_restarting = TRUE;
+- if (ins_complete(Ctrl_N, TRUE) == FAIL)
+- compl_cont_status = 0;
+- compl_restarting = FALSE;
+- }
+-
+- compl_enter_selects = !compl_used_match;
+-
+- /* Show the popup menu with a different set of matches. */
+- ins_compl_show_pum();
+-
+- /* Don't let Enter select the original text when there is no popup menu. */
+- if (compl_match_array == NULL)
+- compl_enter_selects = FALSE;
+- }
+-
+- /*
+- * Return the length of the completion, from the completion start column to
+- * the cursor column. Making sure it never goes below zero.
+- */
+- static int
+- ins_compl_len(void)
+- {
+- int off = (int)curwin->w_cursor.col - (int)compl_col;
+-
+- if (off < 0)
+- return 0;
+- return off;
+- }
+-
+- /*
+- * Append one character to the match leader. May reduce the number of
+- * matches.
+- */
+- static void
+- ins_compl_addleader(int c)
+- {
+- int cc;
+-
+- if (stop_arrow() == FAIL)
+- return;
+- if (has_mbyte && (cc = (*mb_char2len)(c)) > 1)
+- {
+- char_u buf[MB_MAXBYTES + 1];
+-
+- (*mb_char2bytes)(c, buf);
+- buf[cc] = NUL;
+- ins_char_bytes(buf, cc);
+- if (compl_opt_refresh_always)
+- AppendToRedobuff(buf);
+- }
+- else
+- {
+- ins_char(c);
+- if (compl_opt_refresh_always)
+- AppendCharToRedobuff(c);
+- }
+-
+- /* If we didn't complete finding matches we must search again. */
+- if (ins_compl_need_restart())
+- ins_compl_restart();
+-
+- /* When 'always' is set, don't reset compl_leader. While completing,
+- * cursor doesn't point original position, changing compl_leader would
+- * break redo. */
+- if (!compl_opt_refresh_always)
+- {
+- vim_free(compl_leader);
+- compl_leader = vim_strnsave(ml_get_curline() + compl_col,
+- (int)(curwin->w_cursor.col - compl_col));
+- if (compl_leader != NULL)
+- ins_compl_new_leader();
+- }
+- }
+-
+- /*
+- * Setup for finding completions again without leaving CTRL-X mode. Used when
+- * BS or a key was typed while still searching for matches.
+- */
+- static void
+- ins_compl_restart(void)
+- {
+- ins_compl_free();
+- compl_started = FALSE;
+- compl_matches = 0;
+- compl_cont_status = 0;
+- compl_cont_mode = 0;
+- }
+-
+- /*
+- * Set the first match, the original text.
+- */
+- static void
+- ins_compl_set_original_text(char_u *str)
+- {
+- char_u *p;
+-
+- /* Replace the original text entry.
+- * The ORIGINAL_TEXT flag is either at the first item or might possibly be
+- * at the last item for backward completion */
+- if (compl_first_match->cp_flags & ORIGINAL_TEXT) /* safety check */
+- {
+- p = vim_strsave(str);
+- if (p != NULL)
+- {
+- vim_free(compl_first_match->cp_str);
+- compl_first_match->cp_str = p;
+- }
+- }
+- else if (compl_first_match->cp_prev != NULL
+- && (compl_first_match->cp_prev->cp_flags & ORIGINAL_TEXT))
+- {
+- p = vim_strsave(str);
+- if (p != NULL)
+- {
+- vim_free(compl_first_match->cp_prev->cp_str);
+- compl_first_match->cp_prev->cp_str = p;
+- }
+- }
+- }
+-
+- /*
+- * Append one character to the match leader. May reduce the number of
+- * matches.
+- */
+- static void
+- ins_compl_addfrommatch(void)
+- {
+- char_u *p;
+- int len = (int)curwin->w_cursor.col - (int)compl_col;
+- int c;
+- compl_T *cp;
+-
+- p = compl_shown_match->cp_str;
+- if ((int)STRLEN(p) <= len) /* the match is too short */
+- {
+- /* When still at the original match use the first entry that matches
+- * the leader. */
+- if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
+- {
+- p = NULL;
+- for (cp = compl_shown_match->cp_next; cp != NULL
+- && cp != compl_first_match; cp = cp->cp_next)
+- {
+- if (compl_leader == NULL
+- || ins_compl_equal(cp, compl_leader,
+- (int)STRLEN(compl_leader)))
+- {
+- p = cp->cp_str;
+- break;
+- }
+- }
+- if (p == NULL || (int)STRLEN(p) <= len)
+- return;
+- }
+- else
+- return;
+- }
+- p += len;
+- c = PTR2CHAR(p);
+- ins_compl_addleader(c);
+- }
+-
+- /*
+- * Prepare for Insert mode completion, or stop it.
+- * Called just after typing a character in Insert mode.
+- * Returns TRUE when the character is not to be inserted;
+- */
+- static int
+- ins_compl_prep(int c)
+- {
+- char_u *ptr;
+- int want_cindent;
+- int retval = FALSE;
+-
+- /* Forget any previous 'special' messages if this is actually
+- * a ^X mode key - bar ^R, in which case we wait to see what it gives us.
+- */
+- if (c != Ctrl_R && vim_is_ctrl_x_key(c))
+- edit_submode_extra = NULL;
+-
+- /* Ignore end of Select mode mapping and mouse scroll buttons. */
+- if (c == K_SELECT || c == K_MOUSEDOWN || c == K_MOUSEUP
+- || c == K_MOUSELEFT || c == K_MOUSERIGHT)
+- return retval;
+-
+- /* Set "compl_get_longest" when finding the first matches. */
+- if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET
+- || (ctrl_x_mode == CTRL_X_NORMAL && !compl_started))
+- {
+- compl_get_longest = (strstr((char *)p_cot, "longest") != NULL);
+- compl_used_match = TRUE;
+-
+- }
+-
+- if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET)
+- {
+- /*
+- * We have just typed CTRL-X and aren't quite sure which CTRL-X mode
+- * it will be yet. Now we decide.
+- */
+- switch (c)
+- {
+- case Ctrl_E:
+- case Ctrl_Y:
+- ctrl_x_mode = CTRL_X_SCROLL;
+- if (!(State & REPLACE_FLAG))
+- edit_submode = (char_u *)_(" (insert) Scroll (^E/^Y)");
+- else
+- edit_submode = (char_u *)_(" (replace) Scroll (^E/^Y)");
+- edit_submode_pre = NULL;
+- showmode();
+- break;
+- case Ctrl_L:
+- ctrl_x_mode = CTRL_X_WHOLE_LINE;
+- break;
+- case Ctrl_F:
+- ctrl_x_mode = CTRL_X_FILES;
+- break;
+- case Ctrl_K:
+- ctrl_x_mode = CTRL_X_DICTIONARY;
+- break;
+- case Ctrl_R:
+- /* Simply allow ^R to happen without affecting ^X mode */
+- break;
+- case Ctrl_T:
+- ctrl_x_mode = CTRL_X_THESAURUS;
+- break;
+- #ifdef FEAT_COMPL_FUNC
+- case Ctrl_U:
+- ctrl_x_mode = CTRL_X_FUNCTION;
+- break;
+- case Ctrl_O:
+- ctrl_x_mode = CTRL_X_OMNI;
+- break;
+- #endif
+- case 's':
+- case Ctrl_S:
+- ctrl_x_mode = CTRL_X_SPELL;
+- #ifdef FEAT_SPELL
+- ++emsg_off; /* Avoid getting the E756 error twice. */
+- spell_back_to_badword();
+- --emsg_off;
+- #endif
+- break;
+- case Ctrl_RSB:
+- ctrl_x_mode = CTRL_X_TAGS;
+- break;
+- #ifdef FEAT_FIND_ID
+- case Ctrl_I:
+- case K_S_TAB:
+- ctrl_x_mode = CTRL_X_PATH_PATTERNS;
+- break;
+- case Ctrl_D:
+- ctrl_x_mode = CTRL_X_PATH_DEFINES;
+- break;
+- #endif
+- case Ctrl_V:
+- case Ctrl_Q:
+- ctrl_x_mode = CTRL_X_CMDLINE;
+- break;
+- case Ctrl_P:
+- case Ctrl_N:
+- /* ^X^P means LOCAL expansion if nothing interrupted (eg we
+- * just started ^X mode, or there were enough ^X's to cancel
+- * the previous mode, say ^X^F^X^X^P or ^P^X^X^X^P, see below)
+- * do normal expansion when interrupting a different mode (say
+- * ^X^F^X^P or ^P^X^X^P, see below)
+- * nothing changes if interrupting mode 0, (eg, the flag
+- * doesn't change when going to ADDING mode -- Acevedo */
+- if (!(compl_cont_status & CONT_INTRPT))
+- compl_cont_status |= CONT_LOCAL;
+- else if (compl_cont_mode != 0)
+- compl_cont_status &= ~CONT_LOCAL;
+- /* FALLTHROUGH */
+- default:
+- /* If we have typed at least 2 ^X's... for modes != 0, we set
+- * compl_cont_status = 0 (eg, as if we had just started ^X
+- * mode).
+- * For mode 0, we set "compl_cont_mode" to an impossible
+- * value, in both cases ^X^X can be used to restart the same
+- * mode (avoiding ADDING mode).
+- * Undocumented feature: In a mode != 0 ^X^P and ^X^X^P start
+- * 'complete' and local ^P expansions respectively.
+- * In mode 0 an extra ^X is needed since ^X^P goes to ADDING
+- * mode -- Acevedo */
+- if (c == Ctrl_X)
+- {
+- if (compl_cont_mode != 0)
+- compl_cont_status = 0;
+- else
+- compl_cont_mode = CTRL_X_NOT_DEFINED_YET;
+- }
+- ctrl_x_mode = CTRL_X_NORMAL;
+- edit_submode = NULL;
+- showmode();
+- break;
+- }
+- }
+- else if (ctrl_x_mode != CTRL_X_NORMAL)
+- {
+- /* We're already in CTRL-X mode, do we stay in it? */
+- if (!vim_is_ctrl_x_key(c))
+- {
+- if (ctrl_x_mode == CTRL_X_SCROLL)
+- ctrl_x_mode = CTRL_X_NORMAL;
+- else
+- ctrl_x_mode = CTRL_X_FINISHED;
+- edit_submode = NULL;
+- }
+- showmode();
+- }
+-
+- if (compl_started || ctrl_x_mode == CTRL_X_FINISHED)
+- {
+- /* Show error message from attempted keyword completion (probably
+- * 'Pattern not found') until another key is hit, then go back to
+- * showing what mode we are in. */
+- showmode();
+- if ((ctrl_x_mode == CTRL_X_NORMAL && c != Ctrl_N && c != Ctrl_P
+- && c != Ctrl_R && !ins_compl_pum_key(c))
+- || ctrl_x_mode == CTRL_X_FINISHED)
+- {
+- /* Get here when we have finished typing a sequence of ^N and
+- * ^P or other completion characters in CTRL-X mode. Free up
+- * memory that was used, and make sure we can redo the insert. */
+- if (compl_curr_match != NULL || compl_leader != NULL || c == Ctrl_E)
+- {
+- /*
+- * If any of the original typed text has been changed, eg when
+- * ignorecase is set, we must add back-spaces to the redo
+- * buffer. We add as few as necessary to delete just the part
+- * of the original text that has changed.
+- * When using the longest match, edited the match or used
+- * CTRL-E then don't use the current match.
+- */
+- if (compl_curr_match != NULL && compl_used_match && c != Ctrl_E)
+- ptr = compl_curr_match->cp_str;
+- else
+- ptr = NULL;
+- ins_compl_fixRedoBufForLeader(ptr);
+- }
+-
+- #ifdef FEAT_CINDENT
+- want_cindent = (can_cindent && cindent_on());
+- #endif
+- /*
+- * When completing whole lines: fix indent for 'cindent'.
+- * Otherwise, break line if it's too long.
+- */
+- if (compl_cont_mode == CTRL_X_WHOLE_LINE)
+- {
+- #ifdef FEAT_CINDENT
+- /* re-indent the current line */
+- if (want_cindent)
+- {
+- do_c_expr_indent();
+- want_cindent = FALSE; /* don't do it again */
+- }
+- #endif
+- }
+- else
+- {
+- int prev_col = curwin->w_cursor.col;
+-
+- /* put the cursor on the last char, for 'tw' formatting */
+- if (prev_col > 0)
+- dec_cursor();
+- /* only format when something was inserted */
+- if (!arrow_used && !ins_need_undo && c != Ctrl_E)
+- insertchar(NUL, 0, -1);
+- if (prev_col > 0
+- && ml_get_curline()[curwin->w_cursor.col] != NUL)
+- inc_cursor();
+- }
+-
+- /* If the popup menu is displayed pressing CTRL-Y means accepting
+- * the selection without inserting anything. When
+- * compl_enter_selects is set the Enter key does the same. */
+- if ((c == Ctrl_Y || (compl_enter_selects
+- && (c == CAR || c == K_KENTER || c == NL)))
+- && pum_visible())
+- retval = TRUE;
+-
+- /* CTRL-E means completion is Ended, go back to the typed text.
+- * but only do this, if the Popup is still visible */
+- if (c == Ctrl_E)
+- {
+- ins_compl_delete();
+- if (compl_leader != NULL)
+- ins_bytes(compl_leader + ins_compl_len());
+- else if (compl_first_match != NULL)
+- ins_bytes(compl_orig_text + ins_compl_len());
+- retval = TRUE;
+- }
+-
+- auto_format(FALSE, TRUE);
+-
+- ins_compl_free();
+- compl_started = FALSE;
+- compl_matches = 0;
+- if (!shortmess(SHM_COMPLETIONMENU))
+- msg_clr_cmdline(); /* necessary for "noshowmode" */
+- ctrl_x_mode = CTRL_X_NORMAL;
+- compl_enter_selects = FALSE;
+- if (edit_submode != NULL)
+- {
+- edit_submode = NULL;
+- showmode();
+- }
+-
+- #ifdef FEAT_CMDWIN
+- if (c == Ctrl_C && cmdwin_type != 0)
+- /* Avoid the popup menu remains displayed when leaving the
+- * command line window. */
+- update_screen(0);
+- #endif
+- #ifdef FEAT_CINDENT
+- /*
+- * Indent now if a key was typed that is in 'cinkeys'.
+- */
+- if (want_cindent && in_cinkeys(KEY_COMPLETE, ' ', inindent(0)))
+- do_c_expr_indent();
+- #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() */
+- if (!vim_is_ctrl_x_key(c))
+- {
+- compl_cont_status = 0;
+- compl_cont_mode = 0;
+- }
+-
+- return retval;
+- }
+-
+- /*
+- * Fix the redo buffer for the completion leader replacing some of the typed
+- * text. This inserts backspaces and appends the changed text.
+- * "ptr" is the known leader text or NUL.
+- */
+- static void
+- ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
+- {
+- int len;
+- char_u *p;
+- char_u *ptr = ptr_arg;
+-
+- if (ptr == NULL)
+- {
+- if (compl_leader != NULL)
+- ptr = compl_leader;
+- else
+- return; /* nothing to do */
+- }
+- if (compl_orig_text != NULL)
+- {
+- p = compl_orig_text;
+- for (len = 0; p[len] != NUL && p[len] == ptr[len]; ++len)
+- ;
+- if (len > 0)
+- len -= (*mb_head_off)(p, p + len);
+- for (p += len; *p != NUL; MB_PTR_ADV(p))
+- AppendCharToRedobuff(K_BS);
+- }
+- else
+- len = 0;
+- if (ptr != NULL)
+- AppendToRedobuffLit(ptr + len, -1);
+- }
+-
+- /*
+- * Loops through the list of windows, loaded-buffers or non-loaded-buffers
+- * (depending on flag) starting from buf and looking for a non-scanned
+- * buffer (other than curbuf). curbuf is special, if it is called with
+- * buf=curbuf then it has to be the first call for a given flag/expansion.
+- *
+- * Returns the buffer to scan, if any, otherwise returns curbuf -- Acevedo
+- */
+- static buf_T *
+- ins_compl_next_buf(buf_T *buf, int flag)
+- {
+- static win_T *wp = NULL;
+-
+- if (flag == 'w') // just windows
+- {
+- if (buf == curbuf || wp == NULL) // first call for this flag/expansion
+- wp = curwin;
+- while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin
+- && wp->w_buffer->b_scanned)
+- ;
+- buf = wp->w_buffer;
+- }
+- else
+- /* 'b' (just loaded buffers), 'u' (just non-loaded buffers) or 'U'
+- * (unlisted buffers)
+- * When completing whole lines skip unloaded buffers. */
+- while ((buf = (buf->b_next != NULL ? buf->b_next : firstbuf)) != curbuf
+- && ((flag == 'U'
+- ? buf->b_p_bl
+- : (!buf->b_p_bl
+- || (buf->b_ml.ml_mfp == NULL) != (flag == 'u')))
+- || buf->b_scanned))
+- ;
+- return buf;
+- }
+-
+- #ifdef FEAT_COMPL_FUNC
+- /*
+- * Execute user defined complete function 'completefunc' or 'omnifunc', and
+- * get matches in "matches".
+- */
+- static void
+- expand_by_function(
+- int type, /* CTRL_X_OMNI or CTRL_X_FUNCTION */
+- char_u *base)
+- {
+- list_T *matchlist = NULL;
+- dict_T *matchdict = NULL;
+- typval_T args[3];
+- char_u *funcname;
+- pos_T pos;
+- win_T *curwin_save;
+- buf_T *curbuf_save;
+- typval_T rettv;
+- int save_State = State;
+-
+- funcname = (type == CTRL_X_FUNCTION) ? curbuf->b_p_cfu : curbuf->b_p_ofu;
+- if (*funcname == NUL)
+- return;
+-
+- /* Call 'completefunc' to obtain the list of matches. */
+- args[0].v_type = VAR_NUMBER;
+- args[0].vval.v_number = 0;
+- args[1].v_type = VAR_STRING;
+- args[1].vval.v_string = base != NULL ? base : (char_u *)"";
+- args[2].v_type = VAR_UNKNOWN;
+-
+- pos = curwin->w_cursor;
+- curwin_save = curwin;
+- 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)
+- {
+- case VAR_LIST:
+- matchlist = rettv.vval.v_list;
+- break;
+- case VAR_DICT:
+- matchdict = rettv.vval.v_dict;
+- break;
+- case VAR_SPECIAL:
+- if (rettv.vval.v_number == VVAL_NONE)
+- compl_opt_suppress_empty = TRUE;
+- // FALLTHROUGH
+- default:
+- // TODO: Give error message?
+- clear_tv(&rettv);
+- break;
+- }
+- }
+-
+- if (curwin_save != curwin || curbuf_save != curbuf)
+- {
+- emsg(_(e_complwin));
+- goto theend;
+- }
+- curwin->w_cursor = pos; /* restore the cursor position */
+- validate_cursor();
+- if (!EQUAL_POS(curwin->w_cursor, pos))
+- {
+- emsg(_(e_compldel));
+- goto theend;
+- }
+-
+- if (matchlist != NULL)
+- ins_compl_add_list(matchlist);
+- else if (matchdict != NULL)
+- ins_compl_add_dict(matchdict);
+-
+- theend:
+- // Restore State, it might have been changed.
+- State = save_State;
+-
+- if (matchdict != NULL)
+- dict_unref(matchdict);
+- if (matchlist != NULL)
+- list_unref(matchlist);
+- }
+- #endif /* FEAT_COMPL_FUNC */
+-
+- #if defined(FEAT_COMPL_FUNC) || defined(FEAT_EVAL) || defined(PROTO)
+- /*
+- * Add completions from a list.
+- */
+- static void
+- ins_compl_add_list(list_T *list)
+- {
+- listitem_T *li;
+- int dir = compl_direction;
+-
+- /* Go through the List with matches and add each of them. */
+- for (li = list->lv_first; li != NULL; li = li->li_next)
+- {
+- if (ins_compl_add_tv(&li->li_tv, dir) == OK)
+- /* if dir was BACKWARD then honor it just once */
+- dir = FORWARD;
+- else if (did_emsg)
+- break;
+- }
+- }
+-
+- /*
+- * Add completions from a dict.
+- */
+- static void
+- ins_compl_add_dict(dict_T *dict)
+- {
+- dictitem_T *di_refresh;
+- dictitem_T *di_words;
+-
+- /* Check for optional "refresh" item. */
+- compl_opt_refresh_always = FALSE;
+- di_refresh = dict_find(dict, (char_u *)"refresh", 7);
+- if (di_refresh != NULL && di_refresh->di_tv.v_type == VAR_STRING)
+- {
+- char_u *v = di_refresh->di_tv.vval.v_string;
+-
+- if (v != NULL && STRCMP(v, (char_u *)"always") == 0)
+- compl_opt_refresh_always = TRUE;
+- }
+-
+- /* Add completions from a "words" list. */
+- di_words = dict_find(dict, (char_u *)"words", 5);
+- if (di_words != NULL && di_words->di_tv.v_type == VAR_LIST)
+- ins_compl_add_list(di_words->di_tv.vval.v_list);
+- }
+-
+- /*
+- * Add a match to the list of matches from a typeval_T.
+- * If the given string is already in the list of completions, then return
+- * NOTDONE, otherwise add it to the list and return OK. If there is an error,
+- * maybe because alloc() returns NULL, then FAIL is returned.
+- */
+- int
+- ins_compl_add_tv(typval_T *tv, int dir)
+- {
+- char_u *word;
+- int icase = FALSE;
+- int adup = FALSE;
+- int aempty = FALSE;
+- char_u *(cptext[CPT_COUNT]);
+-
+- if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
+- {
+- word = dict_get_string(tv->vval.v_dict, (char_u *)"word", FALSE);
+- cptext[CPT_ABBR] = dict_get_string(tv->vval.v_dict,
+- (char_u *)"abbr", FALSE);
+- cptext[CPT_MENU] = dict_get_string(tv->vval.v_dict,
+- (char_u *)"menu", FALSE);
+- cptext[CPT_KIND] = dict_get_string(tv->vval.v_dict,
+- (char_u *)"kind", FALSE);
+- cptext[CPT_INFO] = dict_get_string(tv->vval.v_dict,
+- (char_u *)"info", FALSE);
+- cptext[CPT_USER_DATA] = dict_get_string(tv->vval.v_dict,
+- (char_u *)"user_data", FALSE);
+- if (dict_get_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL)
+- icase = dict_get_number(tv->vval.v_dict, (char_u *)"icase");
+- if (dict_get_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
+- adup = dict_get_number(tv->vval.v_dict, (char_u *)"dup");
+- if (dict_get_string(tv->vval.v_dict, (char_u *)"empty", FALSE) != NULL)
+- aempty = dict_get_number(tv->vval.v_dict, (char_u *)"empty");
+- }
+- else
+- {
+- word = tv_get_string_chk(tv);
+- vim_memset(cptext, 0, sizeof(cptext));
+- }
+- if (word == NULL || (!aempty && *word == NUL))
+- return FAIL;
+- return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup);
+- }
+- #endif
+-
+- /*
+- * Get the next expansion(s), using "compl_pattern".
+- * The search starts at position "ini" in curbuf and in the direction
+- * compl_direction.
+- * When "compl_started" is FALSE start at that position, otherwise continue
+- * where we stopped searching before.
+- * This may return before finding all the matches.
+- * Return the total number of matches or -1 if still unknown -- Acevedo
+- */
+- static int
+- ins_compl_get_exp(pos_T *ini)
+- {
+- static pos_T first_match_pos;
+- static pos_T last_match_pos;
+- static char_u *e_cpt = (char_u *)""; /* curr. entry in 'complete' */
+- static int found_all = FALSE; /* Found all matches of a
+- certain type. */
+- static buf_T *ins_buf = NULL; /* buffer being scanned */
+-
+- pos_T *pos;
+- char_u **matches;
+- int save_p_scs;
+- int save_p_ws;
+- int save_p_ic;
+- int i;
+- int num_matches;
+- int len;
+- int found_new_match;
+- int type = ctrl_x_mode;
+- char_u *ptr;
+- char_u *dict = NULL;
+- int dict_f = 0;
+- int set_match_pos;
+-
+- if (!compl_started)
+- {
+- FOR_ALL_BUFFERS(ins_buf)
+- ins_buf->b_scanned = 0;
+- found_all = FALSE;
+- ins_buf = curbuf;
+- e_cpt = (compl_cont_status & CONT_LOCAL)
+- ? (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;
+- set_match_pos = FALSE;
+-
+- /* For ^N/^P pick a new entry from e_cpt if compl_started is off,
+- * or if found_all says this entry is done. For ^X^L only use the
+- * entries from 'complete' that look in loaded buffers. */
+- if ((ctrl_x_mode == CTRL_X_NORMAL
+- || CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
+- && (!compl_started || found_all))
+- {
+- found_all = FALSE;
+- while (*e_cpt == ',' || *e_cpt == ' ')
+- e_cpt++;
+- if (*e_cpt == '.' && !curbuf->b_scanned)
+- {
+- ins_buf = curbuf;
+- first_match_pos = *ini;
+- /* Move the cursor back one character so that ^N can match the
+- * word immediately after the cursor. */
+- if (ctrl_x_mode == CTRL_X_NORMAL && dec(&first_match_pos) < 0)
+- {
+- /* Move the cursor to after the last character in the
+- * buffer, so that word at start of buffer is found
+- * correctly. */
+- first_match_pos.lnum = ins_buf->b_ml.ml_line_count;
+- first_match_pos.col =
+- (colnr_T)STRLEN(ml_get(first_match_pos.lnum));
+- }
+- last_match_pos = first_match_pos;
+- type = 0;
+-
+- /* Remember the first match so that the loop stops when we
+- * wrap and come back there a second time. */
+- set_match_pos = TRUE;
+- }
+- else if (vim_strchr((char_u *)"buwU", *e_cpt) != NULL
+- && (ins_buf = ins_compl_next_buf(ins_buf, *e_cpt)) != curbuf)
+- {
+- /* Scan a buffer, but not the current one. */
+- if (ins_buf->b_ml.ml_mfp != NULL) /* loaded buffer */
+- {
+- compl_started = TRUE;
+- first_match_pos.col = last_match_pos.col = 0;
+- first_match_pos.lnum = ins_buf->b_ml.ml_line_count + 1;
+- last_match_pos.lnum = 0;
+- type = 0;
+- }
+- else /* unloaded buffer, scan like dictionary */
+- {
+- found_all = TRUE;
+- if (ins_buf->b_fname == NULL)
+- continue;
+- type = CTRL_X_DICTIONARY;
+- dict = ins_buf->b_fname;
+- dict_f = DICT_EXACT;
+- }
+- vim_snprintf((char *)IObuff, IOSIZE, _("Scanning: %s"),
+- ins_buf->b_fname == NULL
+- ? buf_spname(ins_buf)
+- : ins_buf->b_sfname == NULL
+- ? ins_buf->b_fname
+- : ins_buf->b_sfname);
+- (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
+- }
+- else if (*e_cpt == NUL)
+- break;
+- else
+- {
+- if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
+- type = -1;
+- else if (*e_cpt == 'k' || *e_cpt == 's')
+- {
+- if (*e_cpt == 'k')
+- type = CTRL_X_DICTIONARY;
+- else
+- type = CTRL_X_THESAURUS;
+- if (*++e_cpt != ',' && *e_cpt != NUL)
+- {
+- dict = e_cpt;
+- dict_f = DICT_FIRST;
+- }
+- }
+- #ifdef FEAT_FIND_ID
+- else if (*e_cpt == 'i')
+- type = CTRL_X_PATH_PATTERNS;
+- else if (*e_cpt == 'd')
+- type = CTRL_X_PATH_DEFINES;
+- #endif
+- else if (*e_cpt == ']' || *e_cpt == 't')
+- {
+- type = CTRL_X_TAGS;
+- vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
+- (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
+- }
+- else
+- type = -1;
+-
+- /* in any case e_cpt is advanced to the next entry */
+- (void)copy_option_part(&e_cpt, IObuff, IOSIZE, ",");
+-
+- found_all = TRUE;
+- if (type == -1)
+- continue;
+- }
+- }
+-
+- /* If complete() was called then compl_pattern has been reset. The
+- * following won't work then, bail out. */
+- if (compl_pattern == NULL)
+- break;
+-
+- switch (type)
+- {
+- case -1:
+- break;
+- #ifdef FEAT_FIND_ID
+- case CTRL_X_PATH_PATTERNS:
+- case CTRL_X_PATH_DEFINES:
+- find_pattern_in_path(compl_pattern, compl_direction,
+- (int)STRLEN(compl_pattern), FALSE, FALSE,
+- (type == CTRL_X_PATH_DEFINES
+- && !(compl_cont_status & CONT_SOL))
+- ? FIND_DEFINE : FIND_ANY, 1L, ACTION_EXPAND,
+- (linenr_T)1, (linenr_T)MAXLNUM);
+- break;
+- #endif
+-
+- case CTRL_X_DICTIONARY:
+- case CTRL_X_THESAURUS:
+- ins_compl_dictionaries(
+- dict != NULL ? dict
+- : (type == CTRL_X_THESAURUS
+- ? (*curbuf->b_p_tsr == NUL
+- ? p_tsr
+- : curbuf->b_p_tsr)
+- : (*curbuf->b_p_dict == NUL
+- ? p_dict
+- : curbuf->b_p_dict)),
+- compl_pattern,
+- dict != NULL ? dict_f
+- : 0, type == CTRL_X_THESAURUS);
+- dict = NULL;
+- break;
+-
+- case CTRL_X_TAGS:
+- /* set p_ic according to p_ic, p_scs and pat for find_tags(). */
+- save_p_ic = p_ic;
+- p_ic = ignorecase(compl_pattern);
+-
+- /* Find up to TAG_MANY matches. Avoids that an enormous number
+- * of matches is found when compl_pattern is empty */
+- if (find_tags(compl_pattern, &num_matches, &matches,
+- TAG_REGEXP | TAG_NAMES | TAG_NOIC | TAG_INS_COMP
+- | (ctrl_x_mode != CTRL_X_NORMAL ? TAG_VERBOSE : 0),
+- TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
+- {
+- ins_compl_add_matches(num_matches, matches, p_ic);
+- }
+- p_ic = save_p_ic;
+- break;
+-
+- case CTRL_X_FILES:
+- if (expand_wildcards(1, &compl_pattern, &num_matches, &matches,
+- EW_FILE|EW_DIR|EW_ADDSLASH|EW_SILENT) == OK)
+- {
+-
+- /* May change home directory back to "~". */
+- tilde_replace(compl_pattern, num_matches, matches);
+- ins_compl_add_matches(num_matches, matches, p_fic || p_wic);
+- }
+- break;
+-
+- case CTRL_X_CMDLINE:
+- if (expand_cmdline(&compl_xp, compl_pattern,
+- (int)STRLEN(compl_pattern),
+- &num_matches, &matches) == EXPAND_OK)
+- ins_compl_add_matches(num_matches, matches, FALSE);
+- break;
+-
+- #ifdef FEAT_COMPL_FUNC
+- case CTRL_X_FUNCTION:
+- case CTRL_X_OMNI:
+- expand_by_function(type, compl_pattern);
+- break;
+- #endif
+-
+- case CTRL_X_SPELL:
+- #ifdef FEAT_SPELL
+- num_matches = expand_spelling(first_match_pos.lnum,
+- compl_pattern, &matches);
+- if (num_matches > 0)
+- ins_compl_add_matches(num_matches, matches, p_ic);
+- #endif
+- break;
+-
+- default: /* normal ^P/^N and ^X^L */
+- /*
+- * If 'infercase' is set, don't use 'smartcase' here
+- */
+- save_p_scs = p_scs;
+- if (ins_buf->b_p_inf)
+- p_scs = FALSE;
+-
+- /* Buffers other than curbuf are scanned from the beginning or the
+- * end but never from the middle, thus setting nowrapscan in this
+- * buffers is a good idea, on the other hand, we always set
+- * wrapscan for curbuf to avoid missing matches -- Acevedo,Webb */
+- save_p_ws = p_ws;
+- if (ins_buf != curbuf)
+- p_ws = FALSE;
+- else if (*e_cpt == '.')
+- p_ws = TRUE;
+- for (;;)
+- {
+- int flags = 0;
+-
+- ++msg_silent; /* Don't want messages for wrapscan. */
+-
+- /* CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)
+- * || word-wise search that
+- * has added a word that was at the beginning of the line */
+- if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)
+- || (compl_cont_status & CONT_SOL))
+- found_new_match = search_for_exact_line(ins_buf, pos,
+- compl_direction, compl_pattern);
+- else
+- found_new_match = searchit(NULL, ins_buf, pos, NULL,
+- compl_direction,
+- compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
+- RE_LAST, (linenr_T)0, NULL, NULL);
+- --msg_silent;
+- if (!compl_started || set_match_pos)
+- {
+- /* set "compl_started" even on fail */
+- compl_started = TRUE;
+- first_match_pos = *pos;
+- last_match_pos = *pos;
+- set_match_pos = FALSE;
+- }
+- else if (first_match_pos.lnum == last_match_pos.lnum
+- && first_match_pos.col == last_match_pos.col)
+- found_new_match = FAIL;
+- if (found_new_match == FAIL)
+- {
+- if (ins_buf == curbuf)
+- found_all = TRUE;
+- break;
+- }
+-
+- /* when ADDING, the text before the cursor matches, skip it */
+- if ( (compl_cont_status & CONT_ADDING) && ins_buf == curbuf
+- && ini->lnum == pos->lnum
+- && ini->col == pos->col)
+- continue;
+- ptr = ml_get_buf(ins_buf, pos->lnum, FALSE) + pos->col;
+- if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
+- {
+- if (compl_cont_status & CONT_ADDING)
+- {
+- if (pos->lnum >= ins_buf->b_ml.ml_line_count)
+- continue;
+- ptr = ml_get_buf(ins_buf, pos->lnum + 1, FALSE);
+- if (!p_paste)
+- ptr = skipwhite(ptr);
+- }
+- len = (int)STRLEN(ptr);
+- }
+- else
+- {
+- char_u *tmp_ptr = ptr;
+-
+- if (compl_cont_status & CONT_ADDING)
+- {
+- tmp_ptr += compl_length;
+- /* Skip if already inside a word. */
+- if (vim_iswordp(tmp_ptr))
+- continue;
+- /* Find start of next word. */
+- tmp_ptr = find_word_start(tmp_ptr);
+- }
+- /* Find end of this word. */
+- tmp_ptr = find_word_end(tmp_ptr);
+- len = (int)(tmp_ptr - ptr);
+-
+- if ((compl_cont_status & CONT_ADDING)
+- && len == compl_length)
+- {
+- if (pos->lnum < ins_buf->b_ml.ml_line_count)
+- {
+- /* Try next line, if any. the new word will be
+- * "join" as if the normal command "J" was used.
+- * IOSIZE is always greater than
+- * compl_length, so the next STRNCPY always
+- * works -- Acevedo */
+- STRNCPY(IObuff, ptr, len);
+- ptr = ml_get_buf(ins_buf, pos->lnum + 1, FALSE);
+- tmp_ptr = ptr = skipwhite(ptr);
+- /* Find start of next word. */
+- tmp_ptr = find_word_start(tmp_ptr);
+- /* Find end of next word. */
+- tmp_ptr = find_word_end(tmp_ptr);
+- if (tmp_ptr > ptr)
+- {
+- if (*ptr != ')' && IObuff[len - 1] != TAB)
+- {
+- if (IObuff[len - 1] != ' ')
+- IObuff[len++] = ' ';
+- /* IObuf =~ "\k.* ", thus len >= 2 */
+- if (p_js
+- && (IObuff[len - 2] == '.'
+- || (vim_strchr(p_cpo, CPO_JOINSP)
+- == NULL
+- && (IObuff[len - 2] == '?'
+- || IObuff[len - 2] == '!'))))
+- IObuff[len++] = ' ';
+- }
+- /* copy as much as possible of the new word */
+- if (tmp_ptr - ptr >= IOSIZE - len)
+- tmp_ptr = ptr + IOSIZE - len - 1;
+- STRNCPY(IObuff + len, ptr, tmp_ptr - ptr);
+- len += (int)(tmp_ptr - ptr);
+- flags |= CONT_S_IPOS;
+- }
+- IObuff[len] = NUL;
+- ptr = IObuff;
+- }
+- if (len == compl_length)
+- continue;
+- }
+- }
+- if (ins_compl_add_infercase(ptr, len, p_ic,
+- ins_buf == curbuf ? NULL : ins_buf->b_sfname,
+- 0, flags) != NOTDONE)
+- {
+- found_new_match = OK;
+- break;
+- }
+- }
+- p_scs = save_p_scs;
+- p_ws = save_p_ws;
+- }
+-
+- /* check if compl_curr_match has changed, (e.g. other type of
+- * expansion added something) */
+- if (type != 0 && compl_curr_match != compl_old_match)
+- found_new_match = OK;
+-
+- /* break the loop for specialized modes (use 'complete' just for the
+- * generic ctrl_x_mode == CTRL_X_NORMAL) or when we've found a new
+- * match */
+- if ((ctrl_x_mode != CTRL_X_NORMAL
+- && !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
+- || found_new_match != FAIL)
+- {
+- if (got_int)
+- break;
+- /* Fill the popup menu as soon as possible. */
+- if (type != -1)
+- ins_compl_check_keys(0, FALSE);
+-
+- if ((ctrl_x_mode != CTRL_X_NORMAL
+- && !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
+- || compl_interrupted)
+- break;
+- compl_started = TRUE;
+- }
+- else
+- {
+- /* Mark a buffer scanned when it has been scanned completely */
+- if (type == 0 || type == CTRL_X_PATH_PATTERNS)
+- ins_buf->b_scanned = TRUE;
+-
+- compl_started = FALSE;
+- }
+- }
+- compl_started = TRUE;
+-
+- if ((ctrl_x_mode == CTRL_X_NORMAL || CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
+- && *e_cpt == NUL) /* Got to end of 'complete' */
+- found_new_match = FAIL;
+-
+- i = -1; /* total of matches, unknown */
+- if (found_new_match == FAIL || (ctrl_x_mode != CTRL_X_NORMAL
+- && !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)))
+- i = ins_compl_make_cyclic();
+-
+- if (compl_old_match != NULL)
+- {
+- /* If several matches were added (FORWARD) or the search failed and has
+- * just been made cyclic then we have to move compl_curr_match to the
+- * next or previous entry (if any) -- Acevedo */
+- compl_curr_match = compl_direction == FORWARD ? compl_old_match->cp_next
+- : compl_old_match->cp_prev;
+- if (compl_curr_match == NULL)
+- compl_curr_match = compl_old_match;
+- }
+- return i;
+- }
+-
+- /* Delete the old text being completed. */
+- static void
+- ins_compl_delete(void)
+- {
+- int col;
+-
+- /*
+- * In insert mode: Delete the typed part.
+- * In replace mode: Put the old characters back, if any.
+- */
+- col = compl_col + (compl_cont_status & CONT_ADDING ? compl_length : 0);
+- if ((int)curwin->w_cursor.col > col)
+- {
+- if (stop_arrow() == FAIL)
+- return;
+- backspace_until_column(col);
+- }
+-
+- /* TODO: is this sufficient for redrawing? Redrawing everything causes
+- * flicker, thus we can't do that. */
+- changed_cline_bef_curs();
+- /* clear v:completed_item */
+- set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED));
+- }
+-
+- /*
+- * Insert the new text being completed.
+- * "in_compl_func" is TRUE when called from complete_check().
+- */
+- static void
+- ins_compl_insert(int in_compl_func)
+- {
+- dict_T *dict;
+-
+- ins_bytes(compl_shown_match->cp_str + ins_compl_len());
+- if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
+- compl_used_match = FALSE;
+- else
+- compl_used_match = TRUE;
+-
+- /* Set completed item. */
+- /* { word, abbr, menu, kind, info } */
+- dict = dict_alloc_lock(VAR_FIXED);
+- if (dict != NULL)
+- {
+- dict_add_string(dict, "word", compl_shown_match->cp_str);
+- dict_add_string(dict, "abbr", compl_shown_match->cp_text[CPT_ABBR]);
+- dict_add_string(dict, "menu", compl_shown_match->cp_text[CPT_MENU]);
+- dict_add_string(dict, "kind", compl_shown_match->cp_text[CPT_KIND]);
+- dict_add_string(dict, "info", compl_shown_match->cp_text[CPT_INFO]);
+- dict_add_string(dict, "user_data",
+- compl_shown_match->cp_text[CPT_USER_DATA]);
+- }
+- set_vim_var_dict(VV_COMPLETED_ITEM, dict);
+- if (!in_compl_func)
+- compl_curr_match = compl_shown_match;
+- }
+-
+- /*
+- * Fill in the next completion in the current direction.
+- * If "allow_get_expansion" is TRUE, then we may call ins_compl_get_exp() to
+- * get more completions. If it is FALSE, then we just do nothing when there
+- * are no more completions in a given direction. The latter case is used when
+- * we are still in the middle of finding completions, to allow browsing
+- * through the ones found so far.
+- * Return the total number of matches, or -1 if still unknown -- webb.
+- *
+- * compl_curr_match is currently being used by ins_compl_get_exp(), so we use
+- * compl_shown_match here.
+- *
+- * Note that this function may be called recursively once only. First with
+- * "allow_get_expansion" TRUE, which calls ins_compl_get_exp(), which in turn
+- * calls this function with "allow_get_expansion" FALSE.
+- */
+- static int
+- ins_compl_next(
+- int allow_get_expansion,
+- int count, /* repeat completion this many times; should
+- be at least 1 */
+- int insert_match, /* Insert the newly selected match */
+- int in_compl_func) /* called from complete_check() */
+- {
+- int num_matches = -1;
+- int todo = count;
+- compl_T *found_compl = NULL;
+- int found_end = FALSE;
+- int advance;
+- int started = compl_started;
+-
+- /* When user complete function return -1 for findstart which is next
+- * time of 'always', compl_shown_match become NULL. */
+- if (compl_shown_match == NULL)
+- return -1;
+-
+- if (compl_leader != NULL
+- && (compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0)
+- {
+- /* Set "compl_shown_match" to the actually shown match, it may differ
+- * when "compl_leader" is used to omit some of the matches. */
+- while (!ins_compl_equal(compl_shown_match,
+- compl_leader, (int)STRLEN(compl_leader))
+- && compl_shown_match->cp_next != NULL
+- && compl_shown_match->cp_next != compl_first_match)
+- compl_shown_match = compl_shown_match->cp_next;
+-
+- /* If we didn't find it searching forward, and compl_shows_dir is
+- * backward, find the last match. */
+- if (compl_shows_dir == BACKWARD
+- && !ins_compl_equal(compl_shown_match,
+- compl_leader, (int)STRLEN(compl_leader))
+- && (compl_shown_match->cp_next == NULL
+- || compl_shown_match->cp_next == compl_first_match))
+- {
+- while (!ins_compl_equal(compl_shown_match,
+- compl_leader, (int)STRLEN(compl_leader))
+- && compl_shown_match->cp_prev != NULL
+- && compl_shown_match->cp_prev != compl_first_match)
+- compl_shown_match = compl_shown_match->cp_prev;
+- }
+- }
+-
+- if (allow_get_expansion && insert_match
+- && (!(compl_get_longest || compl_restarting) || compl_used_match))
+- /* Delete old text to be replaced */
+- ins_compl_delete();
+-
+- /* When finding the longest common text we stick at the original text,
+- * don't let CTRL-N or CTRL-P move to the first match. */
+- advance = count != 1 || !allow_get_expansion || !compl_get_longest;
+-
+- /* When restarting the search don't insert the first match either. */
+- if (compl_restarting)
+- {
+- advance = FALSE;
+- compl_restarting = FALSE;
+- }
+-
+- /* Repeat this for when <PageUp> or <PageDown> is typed. But don't wrap
+- * around. */
+- while (--todo >= 0)
+- {
+- if (compl_shows_dir == FORWARD && compl_shown_match->cp_next != NULL)
+- {
+- compl_shown_match = compl_shown_match->cp_next;
+- found_end = (compl_first_match != NULL
+- && (compl_shown_match->cp_next == compl_first_match
+- || compl_shown_match == compl_first_match));
+- }
+- else if (compl_shows_dir == BACKWARD
+- && compl_shown_match->cp_prev != NULL)
+- {
+- found_end = (compl_shown_match == compl_first_match);
+- compl_shown_match = compl_shown_match->cp_prev;
+- found_end |= (compl_shown_match == compl_first_match);
+- }
+- else
+- {
+- if (!allow_get_expansion)
+- {
+- if (advance)
+- {
+- if (compl_shows_dir == BACKWARD)
+- compl_pending -= todo + 1;
+- else
+- compl_pending += todo + 1;
+- }
+- return -1;
+- }
+-
+- if (!compl_no_select && advance)
+- {
+- if (compl_shows_dir == BACKWARD)
+- --compl_pending;
+- else
+- ++compl_pending;
+- }
+-
+- /* Find matches. */
+- num_matches = ins_compl_get_exp(&compl_startpos);
+-
+- /* handle any pending completions */
+- while (compl_pending != 0 && compl_direction == compl_shows_dir
+- && advance)
+- {
+- if (compl_pending > 0 && compl_shown_match->cp_next != NULL)
+- {
+- compl_shown_match = compl_shown_match->cp_next;
+- --compl_pending;
+- }
+- if (compl_pending < 0 && compl_shown_match->cp_prev != NULL)
+- {
+- compl_shown_match = compl_shown_match->cp_prev;
+- ++compl_pending;
+- }
+- else
+- break;
+- }
+- found_end = FALSE;
+- }
+- if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0
+- && compl_leader != NULL
+- && !ins_compl_equal(compl_shown_match,
+- compl_leader, (int)STRLEN(compl_leader)))
+- ++todo;
+- else
+- /* Remember a matching item. */
+- found_compl = compl_shown_match;
+-
+- /* Stop at the end of the list when we found a usable match. */
+- if (found_end)
+- {
+- if (found_compl != NULL)
+- {
+- compl_shown_match = found_compl;
+- break;
+- }
+- todo = 1; /* use first usable match after wrapping around */
+- }
+- }
+-
+- /* Insert the text of the new completion, or the compl_leader. */
+- if (compl_no_insert && !started)
+- {
+- ins_bytes(compl_orig_text + ins_compl_len());
+- compl_used_match = FALSE;
+- }
+- else if (insert_match)
+- {
+- if (!compl_get_longest || compl_used_match)
+- ins_compl_insert(in_compl_func);
+- else
+- ins_bytes(compl_leader + ins_compl_len());
+- }
+- else
+- compl_used_match = FALSE;
+-
+- if (!allow_get_expansion)
+- {
+- /* may undisplay the popup menu first */
+- ins_compl_upd_pum();
+-
+- if (pum_enough_matches())
+- // Will display the popup menu, don't redraw yet to avoid flicker.
+- pum_call_update_screen();
+- else
+- // Not showing the popup menu yet, redraw to show the user what was
+- // inserted.
+- update_screen(0);
+-
+- /* display the updated popup menu */
+- ins_compl_show_pum();
+- #ifdef FEAT_GUI
+- if (gui.in_use)
+- {
+- /* Show the cursor after the match, not after the redrawn text. */
+- setcursor();
+- out_flush_cursor(FALSE, FALSE);
+- }
+- #endif
+-
+- /* Delete old text to be replaced, since we're still searching and
+- * don't want to match ourselves! */
+- ins_compl_delete();
+- }
+-
+- /* Enter will select a match when the match wasn't inserted and the popup
+- * menu is visible. */
+- if (compl_no_insert && !started)
+- compl_enter_selects = TRUE;
+- else
+- compl_enter_selects = !insert_match && compl_match_array != NULL;
+-
+- /*
+- * Show the file name for the match (if any)
+- * Truncate the file name to avoid a wait for return.
+- */
+- if (compl_shown_match->cp_fname != NULL)
+- {
+- char *lead = _("match in file");
+- int space = sc_col - vim_strsize((char_u *)lead) - 2;
+- char_u *s;
+- char_u *e;
+-
+- if (space > 0)
+- {
+- /* We need the tail that fits. With double-byte encoding going
+- * back from the end is very slow, thus go from the start and keep
+- * the text that fits in "space" between "s" and "e". */
+- for (s = e = compl_shown_match->cp_fname; *e != NUL; MB_PTR_ADV(e))
+- {
+- space -= ptr2cells(e);
+- while (space < 0)
+- {
+- space += ptr2cells(s);
+- MB_PTR_ADV(s);
+- }
+- }
+- vim_snprintf((char *)IObuff, IOSIZE, "%s %s%s", lead,
+- s > compl_shown_match->cp_fname ? "<" : "", s);
+- msg((char *)IObuff);
+- redraw_cmdline = FALSE; /* don't overwrite! */
+- }
+- }
+-
+- return num_matches;
+- }
+-
+- /*
+- * Call this while finding completions, to check whether the user has hit a key
+- * that should change the currently displayed completion, or exit completion
+- * mode. Also, when compl_pending is not zero, show a completion as soon as
+- * possible. -- webb
+- * "frequency" specifies out of how many calls we actually check.
+- * "in_compl_func" is TRUE when called from complete_check(), don't set
+- * compl_curr_match.
+- */
+- void
+- ins_compl_check_keys(int frequency, int in_compl_func)
+- {
+- static int count = 0;
+- int c;
+-
+- /* Don't check when reading keys from a script, :normal or feedkeys().
+- * That would break the test scripts. But do check for keys when called
+- * from complete_check(). */
+- if (!in_compl_func && (using_script() || ex_normal_busy))
+- return;
+-
+- /* Only do this at regular intervals */
+- if (++count < frequency)
+- return;
+- count = 0;
+-
+- /* Check for a typed key. Do use mappings, otherwise vim_is_ctrl_x_key()
+- * can't do its work correctly. */
+- c = vpeekc_any();
+- if (c != NUL)
+- {
+- if (vim_is_ctrl_x_key(c) && c != Ctrl_X && c != Ctrl_R)
+- {
+- c = safe_vgetc(); /* Eat the character */
+- compl_shows_dir = ins_compl_key2dir(c);
+- (void)ins_compl_next(FALSE, ins_compl_key2count(c),
+- c != K_UP && c != K_DOWN, in_compl_func);
+- }
+- else
+- {
+- /* Need to get the character to have KeyTyped set. We'll put it
+- * back with vungetc() below. But skip K_IGNORE. */
+- c = safe_vgetc();
+- if (c != K_IGNORE)
+- {
+- /* Don't interrupt completion when the character wasn't typed,
+- * e.g., when doing @q to replay keys. */
+- if (c != Ctrl_R && KeyTyped)
+- compl_interrupted = TRUE;
+-
+- vungetc(c);
+- }
+- }
+- }
+- if (compl_pending != 0 && !got_int && !compl_no_insert)
+- {
+- int todo = compl_pending > 0 ? compl_pending : -compl_pending;
+-
+- compl_pending = 0;
+- (void)ins_compl_next(FALSE, todo, TRUE, in_compl_func);
+- }
+- }
+-
+- /*
+- * Decide the direction of Insert mode complete from the key typed.
+- * Returns BACKWARD or FORWARD.
+- */
+- static int
+- ins_compl_key2dir(int c)
+- {
+- if (c == Ctrl_P || c == Ctrl_L
+- || c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP || c == K_UP)
+- return BACKWARD;
+- return FORWARD;
+- }
+-
+- /*
+- * Return TRUE for keys that are used for completion only when the popup menu
+- * is visible.
+- */
+- static int
+- ins_compl_pum_key(int c)
+- {
+- return pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP
+- || c == K_PAGEDOWN || c == K_KPAGEDOWN || c == K_S_DOWN
+- || c == K_UP || c == K_DOWN);
+- }
+-
+- /*
+- * Decide the number of completions to move forward.
+- * Returns 1 for most keys, height of the popup menu for page-up/down keys.
+- */
+- static int
+- ins_compl_key2count(int c)
+- {
+- int h;
+-
+- if (ins_compl_pum_key(c) && c != K_UP && c != K_DOWN)
+- {
+- h = pum_get_height();
+- if (h > 3)
+- h -= 2; /* keep some context */
+- return h;
+- }
+- return 1;
+- }
+-
+- /*
+- * Return TRUE if completion with "c" should insert the match, FALSE if only
+- * to change the currently selected completion.
+- */
+- static int
+- ins_compl_use_match(int c)
+- {
+- switch (c)
+- {
+- case K_UP:
+- case K_DOWN:
+- case K_PAGEDOWN:
+- case K_KPAGEDOWN:
+- case K_S_DOWN:
+- case K_PAGEUP:
+- case K_KPAGEUP:
+- case K_S_UP:
+- return FALSE;
+- }
+- return TRUE;
+- }
+-
+- /*
+- * Do Insert mode completion.
+- * Called when character "c" was typed, which has a meaning for completion.
+- * Returns OK if completion was done, FAIL if something failed (out of mem).
+- */
+- static int
+- ins_complete(int c, int enable_pum)
+- {
+- char_u *line;
+- int startcol = 0; /* column where searched text starts */
+- colnr_T curs_col; /* cursor column */
+- int n;
+- int save_w_wrow;
+- int save_w_leftcol;
+- int insert_match;
+- int save_did_ai = did_ai;
+-
+- compl_direction = ins_compl_key2dir(c);
+- insert_match = ins_compl_use_match(c);
+-
+- if (!compl_started)
+- {
+- /* First time we hit ^N or ^P (in a row, I mean) */
+-
+- did_ai = FALSE;
+- #ifdef FEAT_SMARTINDENT
+- did_si = FALSE;
+- can_si = FALSE;
+- can_si_back = FALSE;
+- #endif
+- if (stop_arrow() == FAIL)
+- return FAIL;
+-
+- line = ml_get(curwin->w_cursor.lnum);
+- curs_col = curwin->w_cursor.col;
+- compl_pending = 0;
+-
+- /* If this same ctrl_x_mode has been interrupted use the text from
+- * "compl_startpos" to the cursor as a pattern to add a new word
+- * instead of expand the one before the cursor, in word-wise if
+- * "compl_startpos" is not in the same line as the cursor then fix it
+- * (the line has been split because it was longer than 'tw'). if SOL
+- * is set then skip the previous pattern, a word at the beginning of
+- * the line has been inserted, we'll look for that -- Acevedo. */
+- if ((compl_cont_status & CONT_INTRPT) == CONT_INTRPT
+- && compl_cont_mode == ctrl_x_mode)
+- {
+- /*
+- * it is a continued search
+- */
+- compl_cont_status &= ~CONT_INTRPT; /* remove INTRPT */
+- if (ctrl_x_mode == CTRL_X_NORMAL
+- || ctrl_x_mode == CTRL_X_PATH_PATTERNS
+- || ctrl_x_mode == CTRL_X_PATH_DEFINES)
+- {
+- if (compl_startpos.lnum != curwin->w_cursor.lnum)
+- {
+- /* line (probably) wrapped, set compl_startpos to the
+- * first non_blank in the line, if it is not a wordchar
+- * include it to get a better pattern, but then we don't
+- * want the "\\<" prefix, check it bellow */
+- compl_col = (colnr_T)getwhitecols(line);
+- compl_startpos.col = compl_col;
+- compl_startpos.lnum = curwin->w_cursor.lnum;
+- compl_cont_status &= ~CONT_SOL; /* clear SOL if present */
+- }
+- else
+- {
+- /* S_IPOS was set when we inserted a word that was at the
+- * beginning of the line, which means that we'll go to SOL
+- * mode but first we need to redefine compl_startpos */
+- if (compl_cont_status & CONT_S_IPOS)
+- {
+- compl_cont_status |= CONT_SOL;
+- compl_startpos.col = (colnr_T)(skipwhite(
+- line + compl_length
+- + compl_startpos.col) - line);
+- }
+- compl_col = compl_startpos.col;
+- }
+- compl_length = curwin->w_cursor.col - (int)compl_col;
+- /* IObuff is used to add a "word from the next line" would we
+- * have enough space? just being paranoid */
+- #define MIN_SPACE 75
+- if (compl_length > (IOSIZE - MIN_SPACE))
+- {
+- compl_cont_status &= ~CONT_SOL;
+- compl_length = (IOSIZE - MIN_SPACE);
+- compl_col = curwin->w_cursor.col - compl_length;
+- }
+- compl_cont_status |= CONT_ADDING | CONT_N_ADDS;
+- if (compl_length < 1)
+- compl_cont_status &= CONT_LOCAL;
+- }
+- else if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
+- compl_cont_status = CONT_ADDING | CONT_N_ADDS;
+- else
+- compl_cont_status = 0;
+- }
+- else
+- compl_cont_status &= CONT_LOCAL;
+-
+- if (!(compl_cont_status & CONT_ADDING)) /* normal expansion */
+- {
+- compl_cont_mode = ctrl_x_mode;
+- if (ctrl_x_mode != CTRL_X_NORMAL)
+- /* Remove LOCAL if ctrl_x_mode != CTRL_X_NORMAL */
+- compl_cont_status = 0;
+- compl_cont_status |= CONT_N_ADDS;
+- compl_startpos = curwin->w_cursor;
+- startcol = (int)curs_col;
+- compl_col = 0;
+- }
+-
+- /* Work out completion pattern and original text -- webb */
+- if (ctrl_x_mode == CTRL_X_NORMAL || (ctrl_x_mode & CTRL_X_WANT_IDENT))
+- {
+- if ((compl_cont_status & CONT_SOL)
+- || ctrl_x_mode == CTRL_X_PATH_DEFINES)
+- {
+- if (!(compl_cont_status & CONT_ADDING))
+- {
+- while (--startcol >= 0 && vim_isIDc(line[startcol]))
+- ;
+- compl_col += ++startcol;
+- compl_length = curs_col - startcol;
+- }
+- if (p_ic)
+- compl_pattern = str_foldcase(line + compl_col,
+- compl_length, NULL, 0);
+- else
+- compl_pattern = vim_strnsave(line + compl_col,
+- compl_length);
+- if (compl_pattern == NULL)
+- return FAIL;
+- }
+- else if (compl_cont_status & CONT_ADDING)
+- {
+- char_u *prefix = (char_u *)"\\<";
+-
+- /* we need up to 2 extra chars for the prefix */
+- compl_pattern = alloc(quote_meta(NULL, line + compl_col,
+- compl_length) + 2);
+- if (compl_pattern == NULL)
+- return FAIL;
+- if (!vim_iswordp(line + compl_col)
+- || (compl_col > 0
+- && (vim_iswordp(mb_prevptr(line, line + compl_col)))))
+- prefix = (char_u *)"";
+- STRCPY((char *)compl_pattern, prefix);
+- (void)quote_meta(compl_pattern + STRLEN(prefix),
+- line + compl_col, compl_length);
+- }
+- else if (--startcol < 0
+- || !vim_iswordp(mb_prevptr(line, line + startcol + 1)))
+- {
+- /* Match any word of at least two chars */
+- compl_pattern = vim_strsave((char_u *)"\\<\\k\\k");
+- if (compl_pattern == NULL)
+- return FAIL;
+- compl_col += curs_col;
+- compl_length = 0;
+- }
+- else
+- {
+- /* Search the point of change class of multibyte character
+- * or not a word single byte character backward. */
+- if (has_mbyte)
+- {
+- int base_class;
+- int head_off;
+-
+- startcol -= (*mb_head_off)(line, line + startcol);
+- base_class = mb_get_class(line + startcol);
+- while (--startcol >= 0)
+- {
+- head_off = (*mb_head_off)(line, line + startcol);
+- if (base_class != mb_get_class(line + startcol
+- - head_off))
+- break;
+- startcol -= head_off;
+- }
+- }
+- else
+- while (--startcol >= 0 && vim_iswordc(line[startcol]))
+- ;
+- compl_col += ++startcol;
+- compl_length = (int)curs_col - startcol;
+- if (compl_length == 1)
+- {
+- /* Only match word with at least two chars -- webb
+- * there's no need to call quote_meta,
+- * alloc(7) is enough -- Acevedo
+- */
+- compl_pattern = alloc(7);
+- if (compl_pattern == NULL)
+- return FAIL;
+- STRCPY((char *)compl_pattern, "\\<");
+- (void)quote_meta(compl_pattern + 2, line + compl_col, 1);
+- STRCAT((char *)compl_pattern, "\\k");
+- }
+- else
+- {
+- compl_pattern = alloc(quote_meta(NULL, line + compl_col,
+- compl_length) + 2);
+- if (compl_pattern == NULL)
+- return FAIL;
+- STRCPY((char *)compl_pattern, "\\<");
+- (void)quote_meta(compl_pattern + 2, line + compl_col,
+- compl_length);
+- }
+- }
+- }
+- else if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
+- {
+- compl_col = (colnr_T)getwhitecols(line);
+- compl_length = (int)curs_col - (int)compl_col;
+- if (compl_length < 0) /* cursor in indent: empty pattern */
+- compl_length = 0;
+- if (p_ic)
+- compl_pattern = str_foldcase(line + compl_col, compl_length,
+- NULL, 0);
+- else
+- compl_pattern = vim_strnsave(line + compl_col, compl_length);
+- if (compl_pattern == NULL)
+- return FAIL;
+- }
+- else if (ctrl_x_mode == CTRL_X_FILES)
+- {
+- /* Go back to just before the first filename character. */
+- if (startcol > 0)
+- {
+- char_u *p = line + startcol;
+-
+- MB_PTR_BACK(line, p);
+- while (p > line && vim_isfilec(PTR2CHAR(p)))
+- MB_PTR_BACK(line, p);
+- if (p == line && vim_isfilec(PTR2CHAR(p)))
+- startcol = 0;
+- else
+- startcol = (int)(p - line) + 1;
+- }
+-
+- compl_col += startcol;
+- compl_length = (int)curs_col - startcol;
+- compl_pattern = addstar(line + compl_col, compl_length,
+- EXPAND_FILES);
+- if (compl_pattern == NULL)
+- return FAIL;
+- }
+- else if (ctrl_x_mode == CTRL_X_CMDLINE)
+- {
+- compl_pattern = vim_strnsave(line, curs_col);
+- if (compl_pattern == NULL)
+- return FAIL;
+- set_cmd_context(&compl_xp, compl_pattern,
+- (int)STRLEN(compl_pattern), curs_col, FALSE);
+- if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL
+- || compl_xp.xp_context == EXPAND_NOTHING)
+- /* No completion possible, use an empty pattern to get a
+- * "pattern not found" message. */
+- compl_col = curs_col;
+- else
+- compl_col = (int)(compl_xp.xp_pattern - compl_pattern);
+- compl_length = curs_col - compl_col;
+- }
+- else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI)
+- {
+- #ifdef FEAT_COMPL_FUNC
+- /*
+- * Call user defined function 'completefunc' with "a:findstart"
+- * set to 1 to obtain the length of text to use for completion.
+- */
+- typval_T args[3];
+- int col;
+- char_u *funcname;
+- pos_T pos;
+- win_T *curwin_save;
+- buf_T *curbuf_save;
+- int save_State = State;
+-
+- /* Call 'completefunc' or 'omnifunc' and get pattern length as a
+- * string */
+- funcname = ctrl_x_mode == CTRL_X_FUNCTION
+- ? curbuf->b_p_cfu : curbuf->b_p_ofu;
+- if (*funcname == NUL)
+- {
+- semsg(_(e_notset), ctrl_x_mode == CTRL_X_FUNCTION
+- ? "completefunc" : "omnifunc");
+- /* restore did_ai, so that adding comment leader works */
+- did_ai = save_did_ai;
+- return FAIL;
+- }
+-
+- args[0].v_type = VAR_NUMBER;
+- args[0].vval.v_number = 1;
+- args[1].v_type = VAR_STRING;
+- args[1].vval.v_string = (char_u *)"";
+- args[2].v_type = VAR_UNKNOWN;
+- pos = curwin->w_cursor;
+- curwin_save = curwin;
+- curbuf_save = curbuf;
+- col = call_func_retnr(funcname, 2, args);
+-
+- State = save_State;
+- if (curwin_save != curwin || curbuf_save != curbuf)
+- {
+- emsg(_(e_complwin));
+- return FAIL;
+- }
+- curwin->w_cursor = pos; /* restore the cursor position */
+- validate_cursor();
+- if (!EQUAL_POS(curwin->w_cursor, pos))
+- {
+- emsg(_(e_compldel));
+- return FAIL;
+- }
+-
+- /* Return value -2 means the user complete function wants to
+- * cancel the complete without an error.
+- * Return value -3 does the same as -2 and leaves CTRL-X mode.*/
+- if (col == -2)
+- return FAIL;
+- if (col == -3)
+- {
+- ctrl_x_mode = CTRL_X_NORMAL;
+- edit_submode = NULL;
+- if (!shortmess(SHM_COMPLETIONMENU))
+- msg_clr_cmdline();
+- return FAIL;
+- }
+-
+- /*
+- * Reset extended parameters of completion, when start new
+- * completion.
+- */
+- compl_opt_refresh_always = FALSE;
+- compl_opt_suppress_empty = FALSE;
+-
+- if (col < 0)
+- col = curs_col;
+- compl_col = col;
+- if (compl_col > curs_col)
+- compl_col = curs_col;
+-
+- /* Setup variables for completion. Need to obtain "line" again,
+- * it may have become invalid. */
+- line = ml_get(curwin->w_cursor.lnum);
+- compl_length = curs_col - compl_col;
+- compl_pattern = vim_strnsave(line + compl_col, compl_length);
+- if (compl_pattern == NULL)
+- #endif
+- return FAIL;
+- }
+- else if (ctrl_x_mode == CTRL_X_SPELL)
+- {
+- #ifdef FEAT_SPELL
+- if (spell_bad_len > 0)
+- compl_col = curs_col - spell_bad_len;
+- else
+- compl_col = spell_word_start(startcol);
+- if (compl_col >= (colnr_T)startcol)
+- {
+- compl_length = 0;
+- compl_col = curs_col;
+- }
+- else
+- {
+- spell_expand_check_cap(compl_col);
+- compl_length = (int)curs_col - compl_col;
+- }
+- /* Need to obtain "line" again, it may have become invalid. */
+- line = ml_get(curwin->w_cursor.lnum);
+- compl_pattern = vim_strnsave(line + compl_col, compl_length);
+- if (compl_pattern == NULL)
+- #endif
+- return FAIL;
+- }
+- else
+- {
+- internal_error("ins_complete()");
+- return FAIL;
+- }
+-
+- if (compl_cont_status & CONT_ADDING)
+- {
+- edit_submode_pre = (char_u *)_(" Adding");
+- if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
+- {
+- /* Insert a new line, keep indentation but ignore 'comments' */
+- #ifdef FEAT_COMMENTS
+- char_u *old = curbuf->b_p_com;
+-
+- curbuf->b_p_com = (char_u *)"";
+- #endif
+- compl_startpos.lnum = curwin->w_cursor.lnum;
+- compl_startpos.col = compl_col;
+- ins_eol('\r');
+- #ifdef FEAT_COMMENTS
+- curbuf->b_p_com = old;
+- #endif
+- compl_length = 0;
+- compl_col = curwin->w_cursor.col;
+- }
+- }
+- else
+- {
+- edit_submode_pre = NULL;
+- compl_startpos.col = compl_col;
+- }
+-
+- if (compl_cont_status & CONT_LOCAL)
+- edit_submode = (char_u *)_(ctrl_x_msgs[CTRL_X_LOCAL_MSG]);
+- else
+- edit_submode = (char_u *)_(CTRL_X_MSG(ctrl_x_mode));
+-
+- /* If any of the original typed text has been changed we need to fix
+- * the redo buffer. */
+- ins_compl_fixRedoBufForLeader(NULL);
+-
+- /* Always add completion for the original text. */
+- vim_free(compl_orig_text);
+- compl_orig_text = vim_strnsave(line + compl_col, compl_length);
+- if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
+- -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
+- {
+- VIM_CLEAR(compl_pattern);
+- VIM_CLEAR(compl_orig_text);
+- return FAIL;
+- }
+-
+- /* showmode might reset the internal line pointers, so it must
+- * be called before line = ml_get(), or when this address is no
+- * longer needed. -- Acevedo.
+- */
+- edit_submode_extra = (char_u *)_("-- Searching...");
+- edit_submode_highl = HLF_COUNT;
+- showmode();
+- edit_submode_extra = NULL;
+- out_flush();
+- }
+- else if (insert_match && stop_arrow() == FAIL)
+- return FAIL;
+-
+- compl_shown_match = compl_curr_match;
+- compl_shows_dir = compl_direction;
+-
+- /*
+- * Find next match (and following matches).
+- */
+- save_w_wrow = curwin->w_wrow;
+- save_w_leftcol = curwin->w_leftcol;
+- n = ins_compl_next(TRUE, ins_compl_key2count(c), insert_match, FALSE);
+-
+- /* may undisplay the popup menu */
+- ins_compl_upd_pum();
+-
+- if (n > 1) /* all matches have been found */
+- compl_matches = n;
+- compl_curr_match = compl_shown_match;
+- compl_direction = compl_shows_dir;
+-
+- /* Eat the ESC that vgetc() returns after a CTRL-C to avoid leaving Insert
+- * mode. */
+- if (got_int && !global_busy)
+- {
+- (void)vgetc();
+- got_int = FALSE;
+- }
+-
+- /* we found no match if the list has only the "compl_orig_text"-entry */
+- if (compl_first_match == compl_first_match->cp_next)
+- {
+- edit_submode_extra = (compl_cont_status & CONT_ADDING)
+- && compl_length > 1
+- ? (char_u *)_(e_hitend) : (char_u *)_(e_patnotf);
+- edit_submode_highl = HLF_E;
+- /* remove N_ADDS flag, so next ^X<> won't try to go to ADDING mode,
+- * because we couldn't expand anything at first place, but if we used
+- * ^P, ^N, ^X^I or ^X^D we might want to add-expand a single-char-word
+- * (such as M in M'exico) if not tried already. -- Acevedo */
+- if ( compl_length > 1
+- || (compl_cont_status & CONT_ADDING)
+- || (ctrl_x_mode != CTRL_X_NORMAL
+- && ctrl_x_mode != CTRL_X_PATH_PATTERNS
+- && ctrl_x_mode != CTRL_X_PATH_DEFINES))
+- compl_cont_status &= ~CONT_N_ADDS;
+- }
+-
+- if (compl_curr_match->cp_flags & CONT_S_IPOS)
+- compl_cont_status |= CONT_S_IPOS;
+- else
+- compl_cont_status &= ~CONT_S_IPOS;
+-
+- if (edit_submode_extra == NULL)
+- {
+- if (compl_curr_match->cp_flags & ORIGINAL_TEXT)
+- {
+- edit_submode_extra = (char_u *)_("Back at original");
+- edit_submode_highl = HLF_W;
+- }
+- else if (compl_cont_status & CONT_S_IPOS)
+- {
+- edit_submode_extra = (char_u *)_("Word from other line");
+- edit_submode_highl = HLF_COUNT;
+- }
+- else if (compl_curr_match->cp_next == compl_curr_match->cp_prev)
+- {
+- edit_submode_extra = (char_u *)_("The only match");
+- edit_submode_highl = HLF_COUNT;
+- }
+- else
+- {
+- /* Update completion sequence number when needed. */
+- if (compl_curr_match->cp_number == -1)
+- {
+- int number = 0;
+- compl_T *match;
+-
+- if (compl_direction == FORWARD)
+- {
+- /* search backwards for the first valid (!= -1) number.
+- * This should normally succeed already at the first loop
+- * cycle, so it's fast! */
+- for (match = compl_curr_match->cp_prev; match != NULL
+- && match != compl_first_match;
+- match = match->cp_prev)
+- if (match->cp_number != -1)
+- {
+- number = match->cp_number;
+- break;
+- }
+- if (match != NULL)
+- /* go up and assign all numbers which are not assigned
+- * yet */
+- for (match = match->cp_next;
+- match != NULL && match->cp_number == -1;
+- match = match->cp_next)
+- match->cp_number = ++number;
+- }
+- else /* BACKWARD */
+- {
+- /* search forwards (upwards) for the first valid (!= -1)
+- * number. This should normally succeed already at the
+- * first loop cycle, so it's fast! */
+- for (match = compl_curr_match->cp_next; match != NULL
+- && match != compl_first_match;
+- match = match->cp_next)
+- if (match->cp_number != -1)
+- {
+- number = match->cp_number;
+- break;
+- }
+- if (match != NULL)
+- /* go down and assign all numbers which are not
+- * assigned yet */
+- for (match = match->cp_prev; match
+- && match->cp_number == -1;
+- match = match->cp_prev)
+- match->cp_number = ++number;
+- }
+- }
+-
+- /* The match should always have a sequence number now, this is
+- * just a safety check. */
+- if (compl_curr_match->cp_number != -1)
+- {
+- /* Space for 10 text chars. + 2x10-digit no.s = 31.
+- * Translations may need more than twice that. */
+- static char_u match_ref[81];
+-
+- if (compl_matches > 0)
+- vim_snprintf((char *)match_ref, sizeof(match_ref),
+- _("match %d of %d"),
+- compl_curr_match->cp_number, compl_matches);
+- else
+- vim_snprintf((char *)match_ref, sizeof(match_ref),
+- _("match %d"),
+- compl_curr_match->cp_number);
+- edit_submode_extra = match_ref;
+- edit_submode_highl = HLF_R;
+- if (dollar_vcol >= 0)
+- curs_columns(FALSE);
+- }
+- }
+- }
+-
+- // Show a message about what (completion) mode we're in.
+- if (!compl_opt_suppress_empty)
+- {
+- showmode();
+- if (!shortmess(SHM_COMPLETIONMENU))
+- {
+- if (edit_submode_extra != NULL)
+- {
+- if (!p_smd)
+- msg_attr((char *)edit_submode_extra,
+- edit_submode_highl < HLF_COUNT
+- ? HL_ATTR(edit_submode_highl) : 0);
+- }
+- else
+- msg_clr_cmdline(); // necessary for "noshowmode"
+- }
+- }
+-
+- /* Show the popup menu, unless we got interrupted. */
+- if (enable_pum && !compl_interrupted)
+- show_pum(save_w_wrow, save_w_leftcol);
+-
+- compl_was_interrupted = compl_interrupted;
+- compl_interrupted = FALSE;
+-
+- return OK;
+- }
+-
+- static void
+- show_pum(int prev_w_wrow, int prev_w_leftcol)
+- {
+- /* RedrawingDisabled may be set when invoked through complete(). */
+- int n = RedrawingDisabled;
+-
+- RedrawingDisabled = 0;
+-
+- /* If the cursor moved or the display scrolled we need to remove the pum
+- * first. */
+- setcursor();
+- if (prev_w_wrow != curwin->w_wrow || prev_w_leftcol != curwin->w_leftcol)
+- ins_compl_del_pum();
+-
+- ins_compl_show_pum();
+- setcursor();
+- RedrawingDisabled = n;
+- }
+-
+- /*
+- * Looks in the first "len" chars. of "src" for search-metachars.
+- * If dest is not NULL the chars. are copied there quoting (with
+- * a backslash) the metachars, and dest would be NUL terminated.
+- * Returns the length (needed) of dest
+- */
+- static unsigned
+- quote_meta(char_u *dest, char_u *src, int len)
+- {
+- unsigned m = (unsigned)len + 1; /* one extra for the NUL */
+-
+- for ( ; --len >= 0; src++)
+- {
+- switch (*src)
+- {
+- case '.':
+- case '*':
+- case '[':
+- if (ctrl_x_mode == CTRL_X_DICTIONARY
+- || ctrl_x_mode == CTRL_X_THESAURUS)
+- break;
+- /* FALLTHROUGH */
+- case '~':
+- if (!p_magic) /* quote these only if magic is set */
+- break;
+- /* FALLTHROUGH */
+- case '\\':
+- if (ctrl_x_mode == CTRL_X_DICTIONARY
+- || ctrl_x_mode == CTRL_X_THESAURUS)
+- break;
+- /* FALLTHROUGH */
+- case '^': /* currently it's not needed. */
+- case '$':
+- m++;
+- if (dest != NULL)
+- *dest++ = '\\';
+- break;
+- }
+- if (dest != NULL)
+- *dest++ = *src;
+- /* Copy remaining bytes of a multibyte character. */
+- if (has_mbyte)
+- {
+- int i, mb_len;
+-
+- mb_len = (*mb_ptr2len)(src) - 1;
+- if (mb_len > 0 && len >= mb_len)
+- for (i = 0; i < mb_len; ++i)
+- {
+- --len;
+- ++src;
+- if (dest != NULL)
+- *dest++ = *src;
+- }
+- }
+- }
+- if (dest != NULL)
+- *dest = NUL;
+-
+- return m;
+- }
+- #endif /* FEAT_INS_EXPAND */
+-
+ /*
+ * Next character is interpreted literally.
+ * A one, two or three digit decimal number is interpreted as its byte value.
+--- 2120,2125 ----
+***************
+*** 7054,7060 ****
+ * start_arrow() is called when an arrow key is used in insert mode.
+ * For undo/redo it resembles hitting the <ESC> key.
+ */
+! static void
+ start_arrow(
+ pos_T *end_insert_pos) /* can be NULL */
+ {
+--- 3148,3154 ----
+ * start_arrow() is called when an arrow key is used in insert mode.
+ * For undo/redo it resembles hitting the <ESC> key.
+ */
+! void
+ start_arrow(
+ pos_T *end_insert_pos) /* can be NULL */
+ {
+***************
+*** 7111,7129 ****
+ }
+ }
+
+- /*
+- * Called when starting CTRL_X_SPELL mode: Move backwards to a previous badly
+- * spelled word, if there is one.
+- */
+- static void
+- spell_back_to_badword(void)
+- {
+- pos_T tpos = curwin->w_cursor;
+-
+- spell_bad_len = spell_move_to(curwin, BACKWARD, TRUE, TRUE, NULL);
+- if (curwin->w_cursor.col != tpos.col)
+- start_arrow(&tpos);
+- }
+ #endif
+
+ /*
+--- 3205,3210 ----
+***************
+*** 7340,7348 ****
+ free_last_insert(void)
+ {
+ VIM_CLEAR(last_insert);
+- # ifdef FEAT_INS_EXPAND
+- VIM_CLEAR(compl_orig_text);
+- # endif
+ }
+ #endif
+
+--- 3421,3426 ----
+***************
+*** 9978,9984 ****
+ * Handle CR or NL in insert mode.
+ * Return FAIL when out of memory or can't undo.
+ */
+! static int
+ ins_eol(int c)
+ {
+ int i;
+--- 6056,6062 ----
+ * Handle CR or NL in insert mode.
+ * Return FAIL when out of memory or can't undo.
+ */
+! int
+ ins_eol(int c)
+ {
+ int i;
+***************
+*** 10174,10180 ****
+ int c = tc;
+
+ #ifdef FEAT_INS_EXPAND
+! if (ctrl_x_mode == CTRL_X_SCROLL)
+ {
+ if (c == Ctrl_Y)
+ scrolldown_clamp();
+--- 6252,6258 ----
+ int c = tc;
+
+ #ifdef FEAT_INS_EXPAND
+! if (ctrl_x_mode_scroll())
+ {
+ if (c == Ctrl_Y)
+ scrolldown_clamp();
+***************
+*** 10370,10379 ****
+ }
+ #endif
+
+ /*
+ * Trigger "event" and take care of fixing undo.
+ */
+! static int
+ ins_apply_autocmds(event_T event)
+ {
+ varnumber_T tick = CHANGEDTICK(curbuf);
+--- 6448,6465 ----
+ }
+ #endif
+
++ #if defined(FEAT_CINDENT) || defined(PROTO)
++ int
++ can_cindent_get(void)
++ {
++ return can_cindent;
++ }
++ #endif
++
+ /*
+ * Trigger "event" and take care of fixing undo.
+ */
+! int
+ ins_apply_autocmds(event_T event)
+ {
+ varnumber_T tick = CHANGEDTICK(curbuf);
+*** ../vim-8.1.1075/src/evalfunc.c 2019-03-29 14:16:34.142861770 +0100
+--- src/evalfunc.c 2019-03-30 12:54:54.305407871 +0100
+***************
+*** 2603,2609 ****
+
+ RedrawingDisabled = 0;
+ ins_compl_check_keys(0, TRUE);
+! rettv->vval.v_number = compl_interrupted;
+ RedrawingDisabled = saved;
+ }
+
+--- 2603,2609 ----
+
+ RedrawingDisabled = 0;
+ ins_compl_check_keys(0, TRUE);
+! rettv->vval.v_number = ins_compl_interrupted();
+ RedrawingDisabled = saved;
+ }
+
+*** ../vim-8.1.1075/src/globals.h 2019-03-22 16:33:03.483016118 +0100
+--- src/globals.h 2019-03-30 12:54:54.305407871 +0100
+***************
+*** 119,128 ****
+ * by the match.) */
+ EXTERN int compl_length INIT(= 0);
+
+- /* Set when character typed while looking for matches and it means we should
+- * stop looking for matches. */
+- EXTERN int compl_interrupted INIT(= FALSE);
+-
+ /* List of flags for method of completion. */
+ EXTERN int compl_cont_status INIT(= 0);
+ # define CONT_ADDING 1 /* "normal" or "adding" expansion */
+--- 119,124 ----
+*** ../vim-8.1.1075/src/insexpand.c 2019-03-30 13:32:12.890308674 +0100
+--- src/insexpand.c 2019-03-30 13:48:00.960469588 +0100
+***************
+*** 0 ****
+--- 1,3992 ----
++ /* 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.
++ */
++
++ /*
++ * insexpand.c: functions for Insert mode completion
++ */
++
++ #include "vim.h"
++
++ #ifdef FEAT_INS_EXPAND
++ /*
++ * Definitions used for CTRL-X submode.
++ * Note: If you change CTRL-X submode, you must also maintain ctrl_x_msgs[] and
++ * ctrl_x_mode_names[] below.
++ */
++ # define CTRL_X_WANT_IDENT 0x100
++
++ # define CTRL_X_NORMAL 0 /* CTRL-N CTRL-P completion, default */
++ # define CTRL_X_NOT_DEFINED_YET 1
++ # define CTRL_X_SCROLL 2
++ # define CTRL_X_WHOLE_LINE 3
++ # define CTRL_X_FILES 4
++ # define CTRL_X_TAGS (5 + CTRL_X_WANT_IDENT)
++ # define CTRL_X_PATH_PATTERNS (6 + CTRL_X_WANT_IDENT)
++ # define CTRL_X_PATH_DEFINES (7 + CTRL_X_WANT_IDENT)
++ # define CTRL_X_FINISHED 8
++ # define CTRL_X_DICTIONARY (9 + CTRL_X_WANT_IDENT)
++ # define CTRL_X_THESAURUS (10 + CTRL_X_WANT_IDENT)
++ # define CTRL_X_CMDLINE 11
++ # define CTRL_X_FUNCTION 12
++ # define CTRL_X_OMNI 13
++ # define CTRL_X_SPELL 14
++ # define CTRL_X_LOCAL_MSG 15 /* only used in "ctrl_x_msgs" */
++ # define CTRL_X_EVAL 16 /* for builtin function complete() */
++
++ # define CTRL_X_MSG(i) ctrl_x_msgs[(i) & ~CTRL_X_WANT_IDENT]
++
++ // Message for CTRL-X mode, index is ctrl_x_mode.
++ static char *ctrl_x_msgs[] =
++ {
++ N_(" Keyword completion (^N^P)"), // CTRL_X_NORMAL, ^P/^N compl.
++ N_(" ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)"),
++ NULL, // CTRL_X_SCROLL: depends on state
++ N_(" Whole line completion (^L^N^P)"),
++ N_(" File name completion (^F^N^P)"),
++ N_(" Tag completion (^]^N^P)"),
++ N_(" Path pattern completion (^N^P)"),
++ N_(" Definition completion (^D^N^P)"),
++ NULL, // CTRL_X_FINISHED
++ N_(" Dictionary completion (^K^N^P)"),
++ N_(" Thesaurus completion (^T^N^P)"),
++ N_(" Command-line completion (^V^N^P)"),
++ N_(" User defined completion (^U^N^P)"),
++ N_(" Omni completion (^O^N^P)"),
++ N_(" Spelling suggestion (s^N^P)"),
++ N_(" Keyword Local completion (^N^P)"),
++ NULL, // CTRL_X_EVAL doesn't use msg.
++ };
++
++ static char *ctrl_x_mode_names[] = {
++ "keyword",
++ "ctrl_x",
++ "unknown", // CTRL_X_SCROLL
++ "whole_line",
++ "files",
++ "tags",
++ "path_patterns",
++ "path_defines",
++ "unknown", // CTRL_X_FINISHED
++ "dictionary",
++ "thesaurus",
++ "cmdline",
++ "function",
++ "omni",
++ "spell",
++ NULL, // CTRL_X_LOCAL_MSG only used in "ctrl_x_msgs"
++ "eval"
++ };
++
++ /*
++ * Array indexes used for cp_text[].
++ */
++ #define CPT_ABBR 0 // "abbr"
++ #define CPT_MENU 1 // "menu"
++ #define CPT_KIND 2 // "kind"
++ #define CPT_INFO 3 // "info"
++ #define CPT_USER_DATA 4 // "user data"
++ #define CPT_COUNT 5 // Number of entries
++
++ /*
++ * Structure used to store one match for insert completion.
++ */
++ typedef struct compl_S compl_T;
++ struct compl_S
++ {
++ compl_T *cp_next;
++ compl_T *cp_prev;
++ char_u *cp_str; /* matched text */
++ char cp_icase; /* TRUE or FALSE: ignore case */
++ char_u *(cp_text[CPT_COUNT]); /* text for the menu */
++ char_u *cp_fname; /* file containing the match, allocated when
++ * cp_flags has FREE_FNAME */
++ int cp_flags; /* ORIGINAL_TEXT, CONT_S_IPOS or FREE_FNAME */
++ int cp_number; /* sequence number */
++ };
++
++ # define ORIGINAL_TEXT (1) /* the original text when the expansion begun */
++ # define FREE_FNAME (2)
++
++ static char e_hitend[] = N_("Hit end of paragraph");
++ # ifdef FEAT_COMPL_FUNC
++ static char e_complwin[] = N_("E839: Completion function changed window");
++ static char e_compldel[] = N_("E840: Completion function deleted text");
++ # endif
++
++ /*
++ * All the current matches are stored in a list.
++ * "compl_first_match" points to the start of the list.
++ * "compl_curr_match" points to the currently selected entry.
++ * "compl_shown_match" is different from compl_curr_match during
++ * ins_compl_get_exp().
++ */
++ static compl_T *compl_first_match = NULL;
++ static compl_T *compl_curr_match = NULL;
++ static compl_T *compl_shown_match = NULL;
++ static compl_T *compl_old_match = NULL;
++
++ // After using a cursor key <Enter> selects a match in the popup menu,
++ // otherwise it inserts a line break.
++ static int compl_enter_selects = FALSE;
++
++ // When "compl_leader" is not NULL only matches that start with this string
++ // are used.
++ static char_u *compl_leader = NULL;
++
++ static int compl_get_longest = FALSE; // put longest common string
++ // in compl_leader
++
++ static int compl_no_insert = FALSE; // FALSE: select & insert
++ // TRUE: noinsert
++ static int compl_no_select = FALSE; // FALSE: select & insert
++ // TRUE: noselect
++
++ // Selected one of the matches. When FALSE the match was edited or using the
++ // longest common string.
++ static int compl_used_match;
++
++ // didn't finish finding completions.
++ static int compl_was_interrupted = FALSE;
++
++ // Set when character typed while looking for matches and it means we should
++ // stop looking for matches.
++ static int compl_interrupted = FALSE;
++
++ static int compl_restarting = FALSE; // don't insert match
++
++ // When the first completion is done "compl_started" is set. When it's
++ // FALSE the word to be completed must be located.
++ static int compl_started = FALSE;
++
++ // Which Ctrl-X mode are we in?
++ static int ctrl_x_mode = CTRL_X_NORMAL;
++
++ static int compl_matches = 0;
++ static char_u *compl_pattern = NULL;
++ static int compl_direction = FORWARD;
++ static int compl_shows_dir = FORWARD;
++ static int compl_pending = 0; // > 1 for postponed CTRL-N
++ static pos_T compl_startpos;
++ static colnr_T compl_col = 0; // column where the text starts
++ // that is being completed
++ static char_u *compl_orig_text = NULL; // text as it was before
++ // completion started
++ static int compl_cont_mode = 0;
++ static expand_T compl_xp;
++
++ static int compl_opt_refresh_always = FALSE;
++ static int compl_opt_suppress_empty = FALSE;
++
++ 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 void ins_compl_longest_match(compl_T *match);
++ static void ins_compl_del_pum(void);
++ 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);
++ static char_u *ins_compl_mode(void);
++ static int ins_compl_need_restart(void);
++ static void ins_compl_new_leader(void);
++ static int ins_compl_len(void);
++ static void ins_compl_restart(void);
++ static void ins_compl_set_original_text(char_u *str);
++ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg);
++ # 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_key2dir(int c);
++ static int ins_compl_pum_key(int c);
++ static int ins_compl_key2count(int c);
++ static void show_pum(int prev_w_wrow, int prev_w_leftcol);
++ static unsigned quote_meta(char_u *dest, char_u *str, int len);
++ #endif // FEAT_INS_EXPAND
++
++ #ifdef FEAT_SPELL
++ static void spell_back_to_badword(void);
++ static int spell_bad_len = 0; // length of located bad word
++ #endif
++
++ #if defined(FEAT_INS_EXPAND) || defined(PROTO)
++ /*
++ * CTRL-X pressed in Insert mode.
++ */
++ void
++ ins_ctrl_x(void)
++ {
++ // CTRL-X after CTRL-X CTRL-V doesn't do anything, so that CTRL-X
++ // CTRL-V works like CTRL-N
++ if (ctrl_x_mode != CTRL_X_CMDLINE)
++ {
++ // if the next ^X<> won't ADD nothing, then reset
++ // compl_cont_status
++ if (compl_cont_status & CONT_N_ADDS)
++ compl_cont_status |= CONT_INTRPT;
++ else
++ compl_cont_status = 0;
++ // We're not sure which CTRL-X mode it will be yet
++ ctrl_x_mode = CTRL_X_NOT_DEFINED_YET;
++ edit_submode = (char_u *)_(CTRL_X_MSG(ctrl_x_mode));
++ edit_submode_pre = NULL;
++ showmode();
++ }
++ }
++
++ /*
++ * Functions to check the current CTRL-X mode.
++ */
++ int ctrl_x_mode_none(void) { return ctrl_x_mode == 0; }
++ int ctrl_x_mode_normal(void) { return ctrl_x_mode == CTRL_X_NORMAL; }
++ int ctrl_x_mode_scroll(void) { return ctrl_x_mode == CTRL_X_SCROLL; }
++ int ctrl_x_mode_whole_line(void) { return ctrl_x_mode == CTRL_X_WHOLE_LINE; }
++ int ctrl_x_mode_files(void) { return ctrl_x_mode == CTRL_X_FILES; }
++ int ctrl_x_mode_tags(void) { return ctrl_x_mode == CTRL_X_TAGS; }
++ int ctrl_x_mode_path_patterns(void) {
++ return ctrl_x_mode == CTRL_X_PATH_PATTERNS; }
++ int ctrl_x_mode_path_defines(void) {
++ return ctrl_x_mode == CTRL_X_PATH_DEFINES; }
++ int ctrl_x_mode_dictionary(void) { return ctrl_x_mode == CTRL_X_DICTIONARY; }
++ int ctrl_x_mode_thesaurus(void) { return ctrl_x_mode == CTRL_X_THESAURUS; }
++ int ctrl_x_mode_cmdline(void) { return ctrl_x_mode == CTRL_X_CMDLINE; }
++ int ctrl_x_mode_function(void) { return ctrl_x_mode == CTRL_X_FUNCTION; }
++ int ctrl_x_mode_omni(void) { return ctrl_x_mode == CTRL_X_OMNI; }
++ int ctrl_x_mode_spell(void) { return ctrl_x_mode == CTRL_X_SPELL; }
++ int ctrl_x_mode_line_or_eval(void) {
++ return ctrl_x_mode == CTRL_X_WHOLE_LINE || ctrl_x_mode == CTRL_X_EVAL; }
++
++ /*
++ * Whether other than default completion has been selected.
++ */
++ int
++ ctrl_x_mode_not_default(void)
++ {
++ return ctrl_x_mode != CTRL_X_NORMAL;
++ }
++
++ /*
++ * Whether CTRL-X was typed without a following character.
++ */
++ int
++ ctrl_x_mode_not_defined_yet(void)
++ {
++ return ctrl_x_mode == CTRL_X_NOT_DEFINED_YET;
++ }
++
++ /*
++ * Return TRUE if the 'dict' or 'tsr' option can be used.
++ */
++ int
++ has_compl_option(int dict_opt)
++ {
++ if (dict_opt ? (*curbuf->b_p_dict == NUL && *p_dict == NUL
++ # ifdef FEAT_SPELL
++ && !curwin->w_p_spell
++ # endif
++ )
++ : (*curbuf->b_p_tsr == NUL && *p_tsr == NUL))
++ {
++ ctrl_x_mode = CTRL_X_NORMAL;
++ edit_submode = NULL;
++ msg_attr(dict_opt ? _("'dictionary' option is empty")
++ : _("'thesaurus' option is empty"),
++ HL_ATTR(HLF_E));
++ if (emsg_silent == 0)
++ {
++ vim_beep(BO_COMPL);
++ setcursor();
++ out_flush();
++ #ifdef FEAT_EVAL
++ if (!get_vim_var_nr(VV_TESTING))
++ #endif
++ ui_delay(2000L, FALSE);
++ }
++ return FALSE;
++ }
++ return TRUE;
++ }
++
++ /*
++ * Is the character 'c' a valid key to go to or keep us in CTRL-X mode?
++ * This depends on the current mode.
++ */
++ int
++ vim_is_ctrl_x_key(int c)
++ {
++ // Always allow ^R - let its results then be checked
++ if (c == Ctrl_R)
++ return TRUE;
++
++ // Accept <PageUp> and <PageDown> if the popup menu is visible.
++ if (ins_compl_pum_key(c))
++ return TRUE;
++
++ switch (ctrl_x_mode)
++ {
++ case 0: // Not in any CTRL-X mode
++ return (c == Ctrl_N || c == Ctrl_P || c == Ctrl_X);
++ case CTRL_X_NOT_DEFINED_YET:
++ return ( c == Ctrl_X || c == Ctrl_Y || c == Ctrl_E
++ || c == Ctrl_L || c == Ctrl_F || c == Ctrl_RSB
++ || c == Ctrl_I || c == Ctrl_D || c == Ctrl_P
++ || c == Ctrl_N || c == Ctrl_T || c == Ctrl_V
++ || c == Ctrl_Q || c == Ctrl_U || c == Ctrl_O
++ || c == Ctrl_S || c == Ctrl_K || c == 's');
++ case CTRL_X_SCROLL:
++ return (c == Ctrl_Y || c == Ctrl_E);
++ case CTRL_X_WHOLE_LINE:
++ return (c == Ctrl_L || c == Ctrl_P || c == Ctrl_N);
++ case CTRL_X_FILES:
++ return (c == Ctrl_F || c == Ctrl_P || c == Ctrl_N);
++ case CTRL_X_DICTIONARY:
++ return (c == Ctrl_K || c == Ctrl_P || c == Ctrl_N);
++ case CTRL_X_THESAURUS:
++ return (c == Ctrl_T || c == Ctrl_P || c == Ctrl_N);
++ case CTRL_X_TAGS:
++ return (c == Ctrl_RSB || c == Ctrl_P || c == Ctrl_N);
++ #ifdef FEAT_FIND_ID
++ case CTRL_X_PATH_PATTERNS:
++ return (c == Ctrl_P || c == Ctrl_N);
++ case CTRL_X_PATH_DEFINES:
++ return (c == Ctrl_D || c == Ctrl_P || c == Ctrl_N);
++ #endif
++ case CTRL_X_CMDLINE:
++ return (c == Ctrl_V || c == Ctrl_Q || c == Ctrl_P || c == Ctrl_N
++ || c == Ctrl_X);
++ #ifdef FEAT_COMPL_FUNC
++ case CTRL_X_FUNCTION:
++ return (c == Ctrl_U || c == Ctrl_P || c == Ctrl_N);
++ case CTRL_X_OMNI:
++ return (c == Ctrl_O || c == Ctrl_P || c == Ctrl_N);
++ #endif
++ case CTRL_X_SPELL:
++ return (c == Ctrl_S || c == Ctrl_P || c == Ctrl_N);
++ case CTRL_X_EVAL:
++ return (c == Ctrl_P || c == Ctrl_N);
++ }
++ internal_error("vim_is_ctrl_x_key()");
++ return FALSE;
++ }
++
++ /*
++ * Return TRUE when character "c" is part of the item currently being
++ * completed. Used to decide whether to abandon complete mode when the menu
++ * is visible.
++ */
++ int
++ ins_compl_accept_char(int c)
++ {
++ if (ctrl_x_mode & CTRL_X_WANT_IDENT)
++ // When expanding an identifier only accept identifier chars.
++ return vim_isIDc(c);
++
++ switch (ctrl_x_mode)
++ {
++ case CTRL_X_FILES:
++ // When expanding file name only accept file name chars. But not
++ // path separators, so that "proto/<Tab>" expands files in
++ // "proto", not "proto/" as a whole
++ return vim_isfilec(c) && !vim_ispathsep(c);
++
++ case CTRL_X_CMDLINE:
++ case CTRL_X_OMNI:
++ // Command line and Omni completion can work with just about any
++ // printable character, but do stop at white space.
++ return vim_isprintc(c) && !VIM_ISWHITE(c);
++
++ case CTRL_X_WHOLE_LINE:
++ // For while line completion a space can be part of the line.
++ return vim_isprintc(c);
++ }
++ return vim_iswordc(c);
++ }
++
++ /*
++ * This is like ins_compl_add(), but if 'ic' and 'inf' are set, then the
++ * case of the originally typed text is used, and the case of the completed
++ * text is inferred, ie this tries to work out what case you probably wanted
++ * the rest of the word to be in -- webb
++ */
++ int
++ ins_compl_add_infercase(
++ char_u *str,
++ int len,
++ int icase,
++ char_u *fname,
++ int dir,
++ int flags)
++ {
++ char_u *p;
++ int i, c;
++ int actual_len; // Take multi-byte characters
++ int actual_compl_length; // into account.
++ int min_len;
++ int *wca; // Wide character array.
++ int has_lower = FALSE;
++ int was_letter = FALSE;
++
++ if (p_ic && curbuf->b_p_inf && len > 0)
++ {
++ // Infer case of completed part.
++
++ // Find actual length of completion.
++ if (has_mbyte)
++ {
++ p = str;
++ actual_len = 0;
++ while (*p != NUL)
++ {
++ MB_PTR_ADV(p);
++ ++actual_len;
++ }
++ }
++ else
++ actual_len = len;
++
++ // Find actual length of original text.
++ if (has_mbyte)
++ {
++ p = compl_orig_text;
++ actual_compl_length = 0;
++ while (*p != NUL)
++ {
++ MB_PTR_ADV(p);
++ ++actual_compl_length;
++ }
++ }
++ else
++ actual_compl_length = compl_length;
++
++ // "actual_len" may be smaller than "actual_compl_length" when using
++ // thesaurus, only use the minimum when comparing.
++ min_len = actual_len < actual_compl_length
++ ? actual_len : actual_compl_length;
++
++ // Allocate wide character array for the completion and fill it.
++ wca = (int *)alloc((unsigned)(actual_len * sizeof(int)));
++ if (wca != NULL)
++ {
++ p = str;
++ for (i = 0; i < actual_len; ++i)
++ if (has_mbyte)
++ wca[i] = mb_ptr2char_adv(&p);
++ else
++ wca[i] = *(p++);
++
++ // Rule 1: Were any chars converted to lower?
++ p = compl_orig_text;
++ for (i = 0; i < min_len; ++i)
++ {
++ if (has_mbyte)
++ c = mb_ptr2char_adv(&p);
++ else
++ c = *(p++);
++ if (MB_ISLOWER(c))
++ {
++ has_lower = TRUE;
++ if (MB_ISUPPER(wca[i]))
++ {
++ // Rule 1 is satisfied.
++ for (i = actual_compl_length; i < actual_len; ++i)
++ wca[i] = MB_TOLOWER(wca[i]);
++ break;
++ }
++ }
++ }
++
++ // Rule 2: No lower case, 2nd consecutive letter converted to
++ // upper case.
++ if (!has_lower)
++ {
++ p = compl_orig_text;
++ for (i = 0; i < min_len; ++i)
++ {
++ if (has_mbyte)
++ c = mb_ptr2char_adv(&p);
++ else
++ c = *(p++);
++ if (was_letter && MB_ISUPPER(c) && MB_ISLOWER(wca[i]))
++ {
++ // Rule 2 is satisfied.
++ for (i = actual_compl_length; i < actual_len; ++i)
++ wca[i] = MB_TOUPPER(wca[i]);
++ break;
++ }
++ was_letter = MB_ISLOWER(c) || MB_ISUPPER(c);
++ }
++ }
++
++ // Copy the original case of the part we typed.
++ p = compl_orig_text;
++ for (i = 0; i < min_len; ++i)
++ {
++ if (has_mbyte)
++ c = mb_ptr2char_adv(&p);
++ else
++ c = *(p++);
++ if (MB_ISLOWER(c))
++ wca[i] = MB_TOLOWER(wca[i]);
++ else if (MB_ISUPPER(c))
++ wca[i] = MB_TOUPPER(wca[i]);
++ }
++
++ // Generate encoding specific output from wide character array.
++ // Multi-byte characters can occupy up to five bytes more than
++ // ASCII characters, and we also need one byte for NUL, so stay
++ // six bytes away from the edge of IObuff.
++ p = IObuff;
++ i = 0;
++ while (i < actual_len && (p - IObuff + 6) < IOSIZE)
++ if (has_mbyte)
++ p += (*mb_char2bytes)(wca[i++], p);
++ else
++ *(p++) = wca[i++];
++ *p = NUL;
++
++ vim_free(wca);
++ }
++
++ return ins_compl_add(IObuff, len, icase, fname, NULL, dir,
++ flags, FALSE);
++ }
++ return ins_compl_add(str, len, icase, fname, NULL, dir, flags, FALSE);
++ }
++
++ /*
++ * Add a match to the list of matches.
++ * If the given string is already in the list of completions, then return
++ * NOTDONE, otherwise add it to the list and return OK. If there is an error,
++ * maybe because alloc() returns NULL, then FAIL is returned.
++ */
++ static int
++ ins_compl_add(
++ char_u *str,
++ int len,
++ int icase,
++ char_u *fname,
++ char_u **cptext, // extra text for popup menu or NULL
++ int cdir,
++ int flags,
++ int adup) // accept duplicate match
++ {
++ compl_T *match;
++ int dir = (cdir == 0 ? compl_direction : cdir);
++
++ ui_breakcheck();
++ if (got_int)
++ return FAIL;
++ if (len < 0)
++ len = (int)STRLEN(str);
++
++ // If the same match is already present, don't add it.
++ if (compl_first_match != NULL && !adup)
++ {
++ match = compl_first_match;
++ do
++ {
++ if ( !(match->cp_flags & ORIGINAL_TEXT)
++ && STRNCMP(match->cp_str, str, len) == 0
++ && match->cp_str[len] == NUL)
++ return NOTDONE;
++ match = match->cp_next;
++ } while (match != NULL && match != compl_first_match);
++ }
++
++ // Remove any popup menu before changing the list of matches.
++ ins_compl_del_pum();
++
++ // Allocate a new match structure.
++ // Copy the values to the new match structure.
++ match = (compl_T *)alloc_clear((unsigned)sizeof(compl_T));
++ if (match == NULL)
++ return FAIL;
++ match->cp_number = -1;
++ if (flags & ORIGINAL_TEXT)
++ match->cp_number = 0;
++ if ((match->cp_str = vim_strnsave(str, len)) == NULL)
++ {
++ vim_free(match);
++ return FAIL;
++ }
++ match->cp_icase = icase;
++
++ // match-fname is:
++ // - compl_curr_match->cp_fname if it is a string equal to fname.
++ // - a copy of fname, FREE_FNAME is set to free later THE allocated mem.
++ // - NULL otherwise. --Acevedo
++ if (fname != NULL
++ && compl_curr_match != NULL
++ && compl_curr_match->cp_fname != NULL
++ && STRCMP(fname, compl_curr_match->cp_fname) == 0)
++ match->cp_fname = compl_curr_match->cp_fname;
++ else if (fname != NULL)
++ {
++ match->cp_fname = vim_strsave(fname);
++ flags |= FREE_FNAME;
++ }
++ else
++ match->cp_fname = NULL;
++ match->cp_flags = flags;
++
++ if (cptext != NULL)
++ {
++ int i;
++
++ for (i = 0; i < CPT_COUNT; ++i)
++ if (cptext[i] != NULL && *cptext[i] != NUL)
++ match->cp_text[i] = vim_strsave(cptext[i]);
++ }
++
++ // Link the new match structure in the list of matches.
++ if (compl_first_match == NULL)
++ match->cp_next = match->cp_prev = NULL;
++ else if (dir == FORWARD)
++ {
++ match->cp_next = compl_curr_match->cp_next;
++ match->cp_prev = compl_curr_match;
++ }
++ else // BACKWARD
++ {
++ match->cp_next = compl_curr_match;
++ match->cp_prev = compl_curr_match->cp_prev;
++ }
++ if (match->cp_next)
++ match->cp_next->cp_prev = match;
++ if (match->cp_prev)
++ match->cp_prev->cp_next = match;
++ else // if there's nothing before, it is the first match
++ compl_first_match = match;
++ compl_curr_match = match;
++
++ // Find the longest common string if still doing that.
++ if (compl_get_longest && (flags & ORIGINAL_TEXT) == 0)
++ ins_compl_longest_match(match);
++
++ return OK;
++ }
++
++ /*
++ * Return TRUE if "str[len]" matches with match->cp_str, considering
++ * match->cp_icase.
++ */
++ static int
++ ins_compl_equal(compl_T *match, char_u *str, int len)
++ {
++ if (match->cp_icase)
++ return STRNICMP(match->cp_str, str, (size_t)len) == 0;
++ return STRNCMP(match->cp_str, str, (size_t)len) == 0;
++ }
++
++ /*
++ * Reduce the longest common string for match "match".
++ */
++ static void
++ ins_compl_longest_match(compl_T *match)
++ {
++ char_u *p, *s;
++ int c1, c2;
++ int had_match;
++
++ if (compl_leader == NULL)
++ {
++ // First match, use it as a whole.
++ compl_leader = vim_strsave(match->cp_str);
++ if (compl_leader != NULL)
++ {
++ had_match = (curwin->w_cursor.col > compl_col);
++ ins_compl_delete();
++ ins_bytes(compl_leader + ins_compl_len());
++ ins_redraw(FALSE);
++
++ // When the match isn't there (to avoid matching itself) remove it
++ // again after redrawing.
++ if (!had_match)
++ ins_compl_delete();
++ compl_used_match = FALSE;
++ }
++ }
++ else
++ {
++ // Reduce the text if this match differs from compl_leader.
++ p = compl_leader;
++ s = match->cp_str;
++ while (*p != NUL)
++ {
++ if (has_mbyte)
++ {
++ c1 = mb_ptr2char(p);
++ c2 = mb_ptr2char(s);
++ }
++ else
++ {
++ c1 = *p;
++ c2 = *s;
++ }
++ if (match->cp_icase ? (MB_TOLOWER(c1) != MB_TOLOWER(c2))
++ : (c1 != c2))
++ break;
++ if (has_mbyte)
++ {
++ MB_PTR_ADV(p);
++ MB_PTR_ADV(s);
++ }
++ else
++ {
++ ++p;
++ ++s;
++ }
++ }
++
++ if (*p != NUL)
++ {
++ // Leader was shortened, need to change the inserted text.
++ *p = NUL;
++ had_match = (curwin->w_cursor.col > compl_col);
++ ins_compl_delete();
++ ins_bytes(compl_leader + ins_compl_len());
++ ins_redraw(FALSE);
++
++ // When the match isn't there (to avoid matching itself) remove it
++ // again after redrawing.
++ if (!had_match)
++ ins_compl_delete();
++ }
++
++ compl_used_match = FALSE;
++ }
++ }
++
++ /*
++ * Add an array of matches to the list of matches.
++ * Frees matches[].
++ */
++ static void
++ ins_compl_add_matches(
++ int num_matches,
++ char_u **matches,
++ int icase)
++ {
++ int i;
++ int add_r = OK;
++ int dir = compl_direction;
++
++ for (i = 0; i < num_matches && add_r != FAIL; i++)
++ if ((add_r = ins_compl_add(matches[i], -1, icase,
++ NULL, NULL, dir, 0, FALSE)) == OK)
++ // if dir was BACKWARD then honor it just once
++ dir = FORWARD;
++ FreeWild(num_matches, matches);
++ }
++
++ /*
++ * Make the completion list cyclic.
++ * Return the number of matches (excluding the original).
++ */
++ static int
++ ins_compl_make_cyclic(void)
++ {
++ compl_T *match;
++ int count = 0;
++
++ if (compl_first_match != NULL)
++ {
++ // Find the end of the list.
++ match = compl_first_match;
++ // there's always an entry for the compl_orig_text, it doesn't count.
++ while (match->cp_next != NULL && match->cp_next != compl_first_match)
++ {
++ match = match->cp_next;
++ ++count;
++ }
++ match->cp_next = compl_first_match;
++ compl_first_match->cp_prev = match;
++ }
++ return count;
++ }
++
++ /*
++ * Return whether there currently is a shown match.
++ */
++ int
++ ins_compl_has_shown_match(void)
++ {
++ return compl_shown_match == NULL
++ || compl_shown_match != compl_shown_match->cp_next;
++ }
++
++ /*
++ * Return whether the shown match is long enough.
++ */
++ int
++ ins_compl_long_shown_match(void)
++ {
++ return (int)STRLEN(compl_shown_match->cp_str)
++ > curwin->w_cursor.col - compl_col;
++ }
++
++ /*
++ * Set variables that store noselect and noinsert behavior from the
++ * 'completeopt' value.
++ */
++ void
++ completeopt_was_set(void)
++ {
++ compl_no_insert = FALSE;
++ compl_no_select = FALSE;
++ if (strstr((char *)p_cot, "noselect") != NULL)
++ compl_no_select = TRUE;
++ if (strstr((char *)p_cot, "noinsert") != NULL)
++ compl_no_insert = TRUE;
++ }
++
++ /*
++ * Start completion for the complete() function.
++ * "startcol" is where the matched text starts (1 is first column).
++ * "list" is the list of matches.
++ */
++ void
++ set_completion(colnr_T startcol, list_T *list)
++ {
++ int save_w_wrow = curwin->w_wrow;
++ int save_w_leftcol = curwin->w_leftcol;
++
++ // If already doing completions stop it.
++ if (ctrl_x_mode != CTRL_X_NORMAL)
++ ins_compl_prep(' ');
++ ins_compl_clear();
++ ins_compl_free();
++
++ compl_direction = FORWARD;
++ if (startcol > curwin->w_cursor.col)
++ startcol = curwin->w_cursor.col;
++ compl_col = startcol;
++ compl_length = (int)curwin->w_cursor.col - (int)startcol;
++ // compl_pattern doesn't need to be set
++ compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
++ if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
++ -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
++ return;
++
++ ctrl_x_mode = CTRL_X_EVAL;
++
++ ins_compl_add_list(list);
++ compl_matches = ins_compl_make_cyclic();
++ compl_started = TRUE;
++ compl_used_match = TRUE;
++ compl_cont_status = 0;
++
++ compl_curr_match = compl_first_match;
++ if (compl_no_insert || compl_no_select)
++ {
++ ins_complete(K_DOWN, FALSE);
++ if (compl_no_select)
++ // Down/Up has no real effect.
++ ins_complete(K_UP, FALSE);
++ }
++ else
++ ins_complete(Ctrl_N, FALSE);
++ compl_enter_selects = compl_no_insert;
++
++ // Lazily show the popup menu, unless we got interrupted.
++ if (!compl_interrupted)
++ show_pum(save_w_wrow, save_w_leftcol);
++ out_flush();
++ }
++
++
++ // "compl_match_array" points the currently displayed list of entries in the
++ // popup menu. It is NULL when there is no popup menu.
++ static pumitem_T *compl_match_array = NULL;
++ static int compl_match_arraysize;
++
++ /*
++ * Update the screen and when there is any scrolling remove the popup menu.
++ */
++ static void
++ ins_compl_upd_pum(void)
++ {
++ int h;
++
++ if (compl_match_array != NULL)
++ {
++ h = curwin->w_cline_height;
++ // Update the screen later, before drawing the popup menu over it.
++ pum_call_update_screen();
++ if (h != curwin->w_cline_height)
++ ins_compl_del_pum();
++ }
++ }
++
++ /*
++ * Remove any popup menu.
++ */
++ static void
++ ins_compl_del_pum(void)
++ {
++ if (compl_match_array != NULL)
++ {
++ pum_undisplay();
++ VIM_CLEAR(compl_match_array);
++ }
++ }
++
++ /*
++ * Return TRUE if the popup menu should be displayed.
++ */
++ int
++ pum_wanted(void)
++ {
++ // 'completeopt' must contain "menu" or "menuone"
++ if (vim_strchr(p_cot, 'm') == NULL)
++ return FALSE;
++
++ // The display looks bad on a B&W display.
++ if (t_colors < 8
++ #ifdef FEAT_GUI
++ && !gui.in_use
++ #endif
++ )
++ return FALSE;
++ return TRUE;
++ }
++
++ /*
++ * Return TRUE if there are two or more matches to be shown in the popup menu.
++ * One if 'completopt' contains "menuone".
++ */
++ static int
++ pum_enough_matches(void)
++ {
++ compl_T *compl;
++ int i;
++
++ // Don't display the popup menu if there are no matches or there is only
++ // one (ignoring the original text).
++ compl = compl_first_match;
++ i = 0;
++ do
++ {
++ if (compl == NULL
++ || ((compl->cp_flags & ORIGINAL_TEXT) == 0 && ++i == 2))
++ break;
++ compl = compl->cp_next;
++ } while (compl != compl_first_match);
++
++ if (strstr((char *)p_cot, "menuone") != NULL)
++ return (i >= 1);
++ return (i >= 2);
++ }
++
++ /*
++ * Show the popup menu for the list of matches.
++ * Also adjusts "compl_shown_match" to an entry that is actually displayed.
++ */
++ void
++ ins_compl_show_pum(void)
++ {
++ compl_T *compl;
++ compl_T *shown_compl = NULL;
++ int did_find_shown_match = FALSE;
++ int shown_match_ok = FALSE;
++ int i;
++ int cur = -1;
++ colnr_T col;
++ int lead_len = 0;
++
++ if (!pum_wanted() || !pum_enough_matches())
++ return;
++
++ #if defined(FEAT_EVAL)
++ // Dirty hard-coded hack: remove any matchparen highlighting.
++ do_cmdline_cmd((char_u *)"if exists('g:loaded_matchparen')|3match none|endif");
++ #endif
++
++ // Update the screen later, before drawing the popup menu over it.
++ pum_call_update_screen();
++
++ if (compl_match_array == NULL)
++ {
++ // Need to build the popup menu list.
++ compl_match_arraysize = 0;
++ compl = compl_first_match;
++ if (compl_leader != NULL)
++ lead_len = (int)STRLEN(compl_leader);
++ do
++ {
++ if ((compl->cp_flags & ORIGINAL_TEXT) == 0
++ && (compl_leader == NULL
++ || ins_compl_equal(compl, compl_leader, lead_len)))
++ ++compl_match_arraysize;
++ compl = compl->cp_next;
++ } while (compl != NULL && compl != compl_first_match);
++ if (compl_match_arraysize == 0)
++ return;
++ compl_match_array = (pumitem_T *)alloc_clear(
++ (unsigned)(sizeof(pumitem_T)
++ * compl_match_arraysize));
++ if (compl_match_array != NULL)
++ {
++ // If the current match is the original text don't find the first
++ // match after it, don't highlight anything.
++ if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
++ shown_match_ok = TRUE;
++
++ i = 0;
++ compl = compl_first_match;
++ do
++ {
++ if ((compl->cp_flags & ORIGINAL_TEXT) == 0
++ && (compl_leader == NULL
++ || ins_compl_equal(compl, compl_leader, lead_len)))
++ {
++ if (!shown_match_ok)
++ {
++ if (compl == compl_shown_match || did_find_shown_match)
++ {
++ // This item is the shown match or this is the
++ // first displayed item after the shown match.
++ compl_shown_match = compl;
++ did_find_shown_match = TRUE;
++ shown_match_ok = TRUE;
++ }
++ else
++ // Remember this displayed match for when the
++ // shown match is just below it.
++ shown_compl = compl;
++ cur = i;
++ }
++
++ if (compl->cp_text[CPT_ABBR] != NULL)
++ compl_match_array[i].pum_text =
++ compl->cp_text[CPT_ABBR];
++ else
++ compl_match_array[i].pum_text = compl->cp_str;
++ compl_match_array[i].pum_kind = compl->cp_text[CPT_KIND];
++ compl_match_array[i].pum_info = compl->cp_text[CPT_INFO];
++ if (compl->cp_text[CPT_MENU] != NULL)
++ compl_match_array[i++].pum_extra =
++ compl->cp_text[CPT_MENU];
++ else
++ compl_match_array[i++].pum_extra = compl->cp_fname;
++ }
++
++ if (compl == compl_shown_match)
++ {
++ did_find_shown_match = TRUE;
++
++ // When the original text is the shown match don't set
++ // compl_shown_match.
++ if (compl->cp_flags & ORIGINAL_TEXT)
++ shown_match_ok = TRUE;
++
++ if (!shown_match_ok && shown_compl != NULL)
++ {
++ // The shown match isn't displayed, set it to the
++ // previously displayed match.
++ compl_shown_match = shown_compl;
++ shown_match_ok = TRUE;
++ }
++ }
++ compl = compl->cp_next;
++ } while (compl != NULL && compl != compl_first_match);
++
++ if (!shown_match_ok) // no displayed match at all
++ cur = -1;
++ }
++ }
++ else
++ {
++ // popup menu already exists, only need to find the current item.
++ for (i = 0; i < compl_match_arraysize; ++i)
++ if (compl_match_array[i].pum_text == compl_shown_match->cp_str
++ || compl_match_array[i].pum_text
++ == compl_shown_match->cp_text[CPT_ABBR])
++ {
++ cur = i;
++ break;
++ }
++ }
++
++ if (compl_match_array != NULL)
++ {
++ // In Replace mode when a $ is displayed at the end of the line only
++ // part of the screen would be updated. We do need to redraw here.
++ dollar_vcol = -1;
++
++ // Compute the screen column of the start of the completed text.
++ // Use the cursor to get all wrapping and other settings right.
++ col = curwin->w_cursor.col;
++ curwin->w_cursor.col = compl_col;
++ pum_display(compl_match_array, compl_match_arraysize, cur);
++ curwin->w_cursor.col = col;
++ }
++ }
++
++ #define DICT_FIRST (1) // use just first element in "dict"
++ #define DICT_EXACT (2) // "dict" is the exact name of a file
++
++ /*
++ * Add any identifiers that match the given pattern in the list of dictionary
++ * files "dict_start" to the list of completions.
++ */
++ static void
++ ins_compl_dictionaries(
++ char_u *dict_start,
++ char_u *pat,
++ int flags, // DICT_FIRST and/or DICT_EXACT
++ int thesaurus) // Thesaurus completion
++ {
++ char_u *dict = dict_start;
++ char_u *ptr;
++ char_u *buf;
++ regmatch_T regmatch;
++ char_u **files;
++ int count;
++ int save_p_scs;
++ int dir = compl_direction;
++
++ if (*dict == NUL)
++ {
++ #ifdef FEAT_SPELL
++ // When 'dictionary' is empty and spell checking is enabled use
++ // "spell".
++ if (!thesaurus && curwin->w_p_spell)
++ dict = (char_u *)"spell";
++ else
++ #endif
++ return;
++ }
++
++ buf = alloc(LSIZE);
++ if (buf == NULL)
++ return;
++ regmatch.regprog = NULL; // so that we can goto theend
++
++ // If 'infercase' is set, don't use 'smartcase' here
++ save_p_scs = p_scs;
++ if (curbuf->b_p_inf)
++ p_scs = FALSE;
++
++ // When invoked to match whole lines for CTRL-X CTRL-L adjust the pattern
++ // to only match at the start of a line. Otherwise just match the
++ // pattern. Also need to double backslashes.
++ if (ctrl_x_mode_line_or_eval())
++ {
++ char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
++ size_t len;
++
++ if (pat_esc == NULL)
++ goto theend;
++ len = STRLEN(pat_esc) + 10;
++ ptr = alloc((unsigned)len);
++ if (ptr == NULL)
++ {
++ vim_free(pat_esc);
++ goto theend;
++ }
++ vim_snprintf((char *)ptr, len, "^\\s*\\zs\\V%s", pat_esc);
++ regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
++ vim_free(pat_esc);
++ vim_free(ptr);
++ }
++ else
++ {
++ regmatch.regprog = vim_regcomp(pat, p_magic ? RE_MAGIC : 0);
++ if (regmatch.regprog == NULL)
++ goto theend;
++ }
++
++ // ignore case depends on 'ignorecase', 'smartcase' and "pat"
++ regmatch.rm_ic = ignorecase(pat);
++ while (*dict != NUL && !got_int && !compl_interrupted)
++ {
++ // copy one dictionary file name into buf
++ if (flags == DICT_EXACT)
++ {
++ count = 1;
++ files = &dict;
++ }
++ else
++ {
++ // Expand wildcards in the dictionary name, but do not allow
++ // backticks (for security, the 'dict' option may have been set in
++ // a modeline).
++ copy_option_part(&dict, buf, LSIZE, ",");
++ # ifdef FEAT_SPELL
++ if (!thesaurus && STRCMP(buf, "spell") == 0)
++ count = -1;
++ else
++ # endif
++ if (vim_strchr(buf, '`') != NULL
++ || expand_wildcards(1, &buf, &count, &files,
++ EW_FILE|EW_SILENT) != OK)
++ count = 0;
++ }
++
++ # ifdef FEAT_SPELL
++ if (count == -1)
++ {
++ // Complete from active spelling. Skip "\<" in the pattern, we
++ // don't use it as a RE.
++ if (pat[0] == '\\' && pat[1] == '<')
++ ptr = pat + 2;
++ else
++ ptr = pat;
++ spell_dump_compl(ptr, regmatch.rm_ic, &dir, 0);
++ }
++ else
++ # endif
++ if (count > 0) // avoid warning for using "files" uninit
++ {
++ ins_compl_files(count, files, thesaurus, flags,
++ &regmatch, buf, &dir);
++ if (flags != DICT_EXACT)
++ FreeWild(count, files);
++ }
++ if (flags != 0)
++ break;
++ }
++
++ theend:
++ p_scs = save_p_scs;
++ vim_regfree(regmatch.regprog);
++ vim_free(buf);
++ }
++
++ static void
++ ins_compl_files(
++ int count,
++ char_u **files,
++ int thesaurus,
++ int flags,
++ regmatch_T *regmatch,
++ char_u *buf,
++ int *dir)
++ {
++ char_u *ptr;
++ int i;
++ FILE *fp;
++ int add_r;
++
++ for (i = 0; i < count && !got_int && !compl_interrupted; i++)
++ {
++ fp = mch_fopen((char *)files[i], "r"); // open dictionary file
++ if (flags != DICT_EXACT)
++ {
++ vim_snprintf((char *)IObuff, IOSIZE,
++ _("Scanning dictionary: %s"), (char *)files[i]);
++ (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
++ }
++
++ if (fp != NULL)
++ {
++ // Read dictionary file line by line.
++ // Check each line for a match.
++ while (!got_int && !compl_interrupted
++ && !vim_fgets(buf, LSIZE, fp))
++ {
++ ptr = buf;
++ while (vim_regexec(regmatch, buf, (colnr_T)(ptr - buf)))
++ {
++ ptr = regmatch->startp[0];
++ if (ctrl_x_mode_line_or_eval())
++ ptr = find_line_end(ptr);
++ else
++ ptr = find_word_end(ptr);
++ add_r = ins_compl_add_infercase(regmatch->startp[0],
++ (int)(ptr - regmatch->startp[0]),
++ p_ic, files[i], *dir, 0);
++ if (thesaurus)
++ {
++ char_u *wstart;
++
++ // Add the other matches on the line
++ ptr = buf;
++ while (!got_int)
++ {
++ // Find start of the next word. Skip white
++ // space and punctuation.
++ ptr = find_word_start(ptr);
++ if (*ptr == NUL || *ptr == NL)
++ break;
++ wstart = ptr;
++
++ // Find end of the word.
++ if (has_mbyte)
++ // Japanese words may have characters in
++ // different classes, only separate words
++ // with single-byte non-word characters.
++ while (*ptr != NUL)
++ {
++ int l = (*mb_ptr2len)(ptr);
++
++ if (l < 2 && !vim_iswordc(*ptr))
++ break;
++ ptr += l;
++ }
++ else
++ ptr = find_word_end(ptr);
++
++ // Add the word. Skip the regexp match.
++ if (wstart != regmatch->startp[0])
++ add_r = ins_compl_add_infercase(wstart,
++ (int)(ptr - wstart),
++ p_ic, files[i], *dir, 0);
++ }
++ }
++ if (add_r == OK)
++ // if dir was BACKWARD then honor it just once
++ *dir = FORWARD;
++ else if (add_r == FAIL)
++ break;
++ // avoid expensive call to vim_regexec() when at end
++ // of line
++ if (*ptr == '\n' || got_int)
++ break;
++ }
++ line_breakcheck();
++ ins_compl_check_keys(50, FALSE);
++ }
++ fclose(fp);
++ }
++ }
++ }
++
++ /*
++ * Find the start of the next word.
++ * Returns a pointer to the first char of the word. Also stops at a NUL.
++ */
++ char_u *
++ find_word_start(char_u *ptr)
++ {
++ if (has_mbyte)
++ while (*ptr != NUL && *ptr != '\n' && mb_get_class(ptr) <= 1)
++ ptr += (*mb_ptr2len)(ptr);
++ else
++ while (*ptr != NUL && *ptr != '\n' && !vim_iswordc(*ptr))
++ ++ptr;
++ return ptr;
++ }
++
++ /*
++ * Find the end of the word. Assumes it starts inside a word.
++ * Returns a pointer to just after the word.
++ */
++ char_u *
++ find_word_end(char_u *ptr)
++ {
++ int start_class;
++
++ if (has_mbyte)
++ {
++ start_class = mb_get_class(ptr);
++ if (start_class > 1)
++ while (*ptr != NUL)
++ {
++ ptr += (*mb_ptr2len)(ptr);
++ if (mb_get_class(ptr) != start_class)
++ break;
++ }
++ }
++ else
++ while (vim_iswordc(*ptr))
++ ++ptr;
++ return ptr;
++ }
++
++ /*
++ * Find the end of the line, omitting CR and NL at the end.
++ * Returns a pointer to just after the line.
++ */
++ static char_u *
++ find_line_end(char_u *ptr)
++ {
++ char_u *s;
++
++ s = ptr + STRLEN(ptr);
++ while (s > ptr && (s[-1] == CAR || s[-1] == NL))
++ --s;
++ return s;
++ }
++
++ /*
++ * Free the list of completions
++ */
++ static void
++ ins_compl_free(void)
++ {
++ compl_T *match;
++ int i;
++
++ VIM_CLEAR(compl_pattern);
++ VIM_CLEAR(compl_leader);
++
++ if (compl_first_match == NULL)
++ return;
++
++ ins_compl_del_pum();
++ pum_clear();
++
++ compl_curr_match = compl_first_match;
++ do
++ {
++ match = compl_curr_match;
++ compl_curr_match = compl_curr_match->cp_next;
++ vim_free(match->cp_str);
++ // several entries may use the same fname, free it just once.
++ if (match->cp_flags & FREE_FNAME)
++ vim_free(match->cp_fname);
++ for (i = 0; i < CPT_COUNT; ++i)
++ vim_free(match->cp_text[i]);
++ vim_free(match);
++ } while (compl_curr_match != NULL && compl_curr_match != compl_first_match);
++ compl_first_match = compl_curr_match = NULL;
++ compl_shown_match = NULL;
++ compl_old_match = NULL;
++ }
++
++ void
++ ins_compl_clear(void)
++ {
++ compl_cont_status = 0;
++ compl_started = FALSE;
++ compl_matches = 0;
++ VIM_CLEAR(compl_pattern);
++ VIM_CLEAR(compl_leader);
++ edit_submode_extra = NULL;
++ VIM_CLEAR(compl_orig_text);
++ compl_enter_selects = FALSE;
++ // clear v:completed_item
++ set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED));
++ }
++
++ /*
++ * Return TRUE when Insert completion is active.
++ */
++ int
++ ins_compl_active(void)
++ {
++ return compl_started;
++ }
++
++ /*
++ * Get complete information
++ */
++ void
++ get_complete_info(list_T *what_list, dict_T *retdict)
++ {
++ int ret = OK;
++ listitem_T *item;
++ #define CI_WHAT_MODE 0x01
++ #define CI_WHAT_PUM_VISIBLE 0x02
++ #define CI_WHAT_ITEMS 0x04
++ #define CI_WHAT_SELECTED 0x08
++ #define CI_WHAT_INSERTED 0x10
++ #define CI_WHAT_ALL 0xff
++ int what_flag;
++
++ if (what_list == NULL)
++ what_flag = CI_WHAT_ALL;
++ else
++ {
++ what_flag = 0;
++ for (item = what_list->lv_first; item != NULL; item = item->li_next)
++ {
++ char_u *what = tv_get_string(&item->li_tv);
++
++ if (STRCMP(what, "mode") == 0)
++ what_flag |= CI_WHAT_MODE;
++ else if (STRCMP(what, "pum_visible") == 0)
++ what_flag |= CI_WHAT_PUM_VISIBLE;
++ else if (STRCMP(what, "items") == 0)
++ what_flag |= CI_WHAT_ITEMS;
++ else if (STRCMP(what, "selected") == 0)
++ what_flag |= CI_WHAT_SELECTED;
++ else if (STRCMP(what, "inserted") == 0)
++ what_flag |= CI_WHAT_INSERTED;
++ }
++ }
++
++ if (ret == OK && (what_flag & CI_WHAT_MODE))
++ ret = dict_add_string(retdict, "mode", ins_compl_mode());
++
++ if (ret == OK && (what_flag & CI_WHAT_PUM_VISIBLE))
++ ret = dict_add_number(retdict, "pum_visible", pum_visible());
++
++ if (ret == OK && (what_flag & CI_WHAT_ITEMS))
++ {
++ list_T *li;
++ dict_T *di;
++ compl_T *match;
++
++ li = list_alloc();
++ if (li == NULL)
++ return;
++ ret = dict_add_list(retdict, "items", li);
++ if (ret == OK && compl_first_match != NULL)
++ {
++ match = compl_first_match;
++ do
++ {
++ if (!(match->cp_flags & ORIGINAL_TEXT))
++ {
++ di = dict_alloc();
++ if (di == NULL)
++ return;
++ ret = list_append_dict(li, di);
++ if (ret != OK)
++ return;
++ dict_add_string(di, "word", match->cp_str);
++ dict_add_string(di, "abbr", match->cp_text[CPT_ABBR]);
++ dict_add_string(di, "menu", match->cp_text[CPT_MENU]);
++ dict_add_string(di, "kind", match->cp_text[CPT_KIND]);
++ dict_add_string(di, "info", match->cp_text[CPT_INFO]);
++ dict_add_string(di, "user_data",
++ match->cp_text[CPT_USER_DATA]);
++ }
++ match = match->cp_next;
++ }
++ while (match != NULL && match != compl_first_match);
++ }
++ }
++
++ if (ret == OK && (what_flag & CI_WHAT_SELECTED))
++ ret = dict_add_number(retdict, "selected", (compl_curr_match != NULL) ?
++ compl_curr_match->cp_number - 1 : -1);
++
++ // TODO
++ // if (ret == OK && (what_flag & CI_WHAT_INSERTED))
++ }
++
++ /*
++ * Return Insert completion mode name string
++ */
++ static char_u *
++ ins_compl_mode(void)
++ {
++ if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET || compl_started)
++ return (char_u *)ctrl_x_mode_names[ctrl_x_mode & ~CTRL_X_WANT_IDENT];
++
++ return (char_u *)"";
++ }
++
++ /*
++ * Selected one of the matches. When FALSE the match was edited or using the
++ * longest common string.
++ */
++ int
++ ins_compl_used_match(void)
++ {
++ return compl_used_match;
++ }
++
++ /*
++ * Initialize get longest common string.
++ */
++ void
++ ins_compl_init_get_longest(void)
++ {
++ compl_get_longest = FALSE;
++ }
++
++ /*
++ * Returns TRUE when insert completion is interrupted.
++ */
++ int
++ ins_compl_interrupted(void)
++ {
++ return compl_interrupted;
++ }
++
++ /*
++ * Returns TRUE if the <Enter> key selects a match in the completion popup
++ * menu.
++ */
++ int
++ ins_compl_enter_selects(void)
++ {
++ return compl_enter_selects;
++ }
++
++ /*
++ * Return the column where the text starts that is being completed
++ */
++ colnr_T
++ ins_compl_col(void)
++ {
++ return compl_col;
++ }
++
++ /*
++ * Delete one character before the cursor and show the subset of the matches
++ * that match the word that is now before the cursor.
++ * Returns the character to be used, NUL if the work is done and another char
++ * to be got from the user.
++ */
++ int
++ ins_compl_bs(void)
++ {
++ char_u *line;
++ char_u *p;
++
++ line = ml_get_curline();
++ p = line + curwin->w_cursor.col;
++ MB_PTR_BACK(line, p);
++
++ // Stop completion when the whole word was deleted. For Omni completion
++ // allow the word to be deleted, we won't match everything.
++ // Respect the 'backspace' option.
++ if ((int)(p - line) - (int)compl_col < 0
++ || ((int)(p - line) - (int)compl_col == 0
++ && ctrl_x_mode != CTRL_X_OMNI) || ctrl_x_mode == CTRL_X_EVAL
++ || (!can_bs(BS_START) && (int)(p - line) - (int)compl_col
++ - compl_length < 0))
++ return K_BS;
++
++ // Deleted more than what was used to find matches or didn't finish
++ // finding all matches: need to look for matches all over again.
++ if (curwin->w_cursor.col <= compl_col + compl_length
++ || ins_compl_need_restart())
++ ins_compl_restart();
++
++ vim_free(compl_leader);
++ compl_leader = vim_strnsave(line + compl_col, (int)(p - line) - compl_col);
++ if (compl_leader != NULL)
++ {
++ ins_compl_new_leader();
++ if (compl_shown_match != NULL)
++ // Make sure current match is not a hidden item.
++ compl_curr_match = compl_shown_match;
++ return NUL;
++ }
++ return K_BS;
++ }
++
++ /*
++ * Return TRUE when we need to find matches again, ins_compl_restart() is to
++ * be called.
++ */
++ static int
++ ins_compl_need_restart(void)
++ {
++ // Return TRUE if we didn't complete finding matches or when the
++ // 'completefunc' returned "always" in the "refresh" dictionary item.
++ return compl_was_interrupted
++ || ((ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI)
++ && compl_opt_refresh_always);
++ }
++
++ /*
++ * Called after changing "compl_leader".
++ * Show the popup menu with a different set of matches.
++ * May also search for matches again if the previous search was interrupted.
++ */
++ static void
++ ins_compl_new_leader(void)
++ {
++ ins_compl_del_pum();
++ ins_compl_delete();
++ ins_bytes(compl_leader + ins_compl_len());
++ compl_used_match = FALSE;
++
++ if (compl_started)
++ ins_compl_set_original_text(compl_leader);
++ else
++ {
++ #ifdef FEAT_SPELL
++ spell_bad_len = 0; // need to redetect bad word
++ #endif
++ // Matches were cleared, need to search for them now. Befor drawing
++ // the popup menu display the changed text before the cursor. Set
++ // "compl_restarting" to avoid that the first match is inserted.
++ pum_call_update_screen();
++ #ifdef FEAT_GUI
++ if (gui.in_use)
++ {
++ // Show the cursor after the match, not after the redrawn text.
++ setcursor();
++ out_flush_cursor(FALSE, FALSE);
++ }
++ #endif
++ compl_restarting = TRUE;
++ if (ins_complete(Ctrl_N, TRUE) == FAIL)
++ compl_cont_status = 0;
++ compl_restarting = FALSE;
++ }
++
++ compl_enter_selects = !compl_used_match;
++
++ // Show the popup menu with a different set of matches.
++ ins_compl_show_pum();
++
++ // Don't let Enter select the original text when there is no popup menu.
++ if (compl_match_array == NULL)
++ compl_enter_selects = FALSE;
++ }
++
++ /*
++ * Return the length of the completion, from the completion start column to
++ * the cursor column. Making sure it never goes below zero.
++ */
++ static int
++ ins_compl_len(void)
++ {
++ int off = (int)curwin->w_cursor.col - (int)compl_col;
++
++ if (off < 0)
++ return 0;
++ return off;
++ }
++
++ /*
++ * Append one character to the match leader. May reduce the number of
++ * matches.
++ */
++ void
++ ins_compl_addleader(int c)
++ {
++ int cc;
++
++ if (stop_arrow() == FAIL)
++ return;
++ if (has_mbyte && (cc = (*mb_char2len)(c)) > 1)
++ {
++ char_u buf[MB_MAXBYTES + 1];
++
++ (*mb_char2bytes)(c, buf);
++ buf[cc] = NUL;
++ ins_char_bytes(buf, cc);
++ if (compl_opt_refresh_always)
++ AppendToRedobuff(buf);
++ }
++ else
++ {
++ ins_char(c);
++ if (compl_opt_refresh_always)
++ AppendCharToRedobuff(c);
++ }
++
++ // If we didn't complete finding matches we must search again.
++ if (ins_compl_need_restart())
++ ins_compl_restart();
++
++ // When 'always' is set, don't reset compl_leader. While completing,
++ // cursor doesn't point original position, changing compl_leader would
++ // break redo.
++ if (!compl_opt_refresh_always)
++ {
++ vim_free(compl_leader);
++ compl_leader = vim_strnsave(ml_get_curline() + compl_col,
++ (int)(curwin->w_cursor.col - compl_col));
++ if (compl_leader != NULL)
++ ins_compl_new_leader();
++ }
++ }
++
++ /*
++ * Setup for finding completions again without leaving CTRL-X mode. Used when
++ * BS or a key was typed while still searching for matches.
++ */
++ static void
++ ins_compl_restart(void)
++ {
++ ins_compl_free();
++ compl_started = FALSE;
++ compl_matches = 0;
++ compl_cont_status = 0;
++ compl_cont_mode = 0;
++ }
++
++ /*
++ * Set the first match, the original text.
++ */
++ static void
++ ins_compl_set_original_text(char_u *str)
++ {
++ char_u *p;
++
++ // Replace the original text entry.
++ // The ORIGINAL_TEXT flag is either at the first item or might possibly be
++ // at the last item for backward completion
++ if (compl_first_match->cp_flags & ORIGINAL_TEXT) // safety check
++ {
++ p = vim_strsave(str);
++ if (p != NULL)
++ {
++ vim_free(compl_first_match->cp_str);
++ compl_first_match->cp_str = p;
++ }
++ }
++ else if (compl_first_match->cp_prev != NULL
++ && (compl_first_match->cp_prev->cp_flags & ORIGINAL_TEXT))
++ {
++ p = vim_strsave(str);
++ if (p != NULL)
++ {
++ vim_free(compl_first_match->cp_prev->cp_str);
++ compl_first_match->cp_prev->cp_str = p;
++ }
++ }
++ }
++
++ /*
++ * Append one character to the match leader. May reduce the number of
++ * matches.
++ */
++ void
++ ins_compl_addfrommatch(void)
++ {
++ char_u *p;
++ int len = (int)curwin->w_cursor.col - (int)compl_col;
++ int c;
++ compl_T *cp;
++
++ p = compl_shown_match->cp_str;
++ if ((int)STRLEN(p) <= len) // the match is too short
++ {
++ // When still at the original match use the first entry that matches
++ // the leader.
++ if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
++ {
++ p = NULL;
++ for (cp = compl_shown_match->cp_next; cp != NULL
++ && cp != compl_first_match; cp = cp->cp_next)
++ {
++ if (compl_leader == NULL
++ || ins_compl_equal(cp, compl_leader,
++ (int)STRLEN(compl_leader)))
++ {
++ p = cp->cp_str;
++ break;
++ }
++ }
++ if (p == NULL || (int)STRLEN(p) <= len)
++ return;
++ }
++ else
++ return;
++ }
++ p += len;
++ c = PTR2CHAR(p);
++ ins_compl_addleader(c);
++ }
++
++ /*
++ * Prepare for Insert mode completion, or stop it.
++ * Called just after typing a character in Insert mode.
++ * Returns TRUE when the character is not to be inserted;
++ */
++ int
++ ins_compl_prep(int c)
++ {
++ char_u *ptr;
++ int want_cindent;
++ int retval = FALSE;
++
++ // Forget any previous 'special' messages if this is actually
++ // a ^X mode key - bar ^R, in which case we wait to see what it gives us.
++ if (c != Ctrl_R && vim_is_ctrl_x_key(c))
++ edit_submode_extra = NULL;
++
++ // Ignore end of Select mode mapping and mouse scroll buttons.
++ if (c == K_SELECT || c == K_MOUSEDOWN || c == K_MOUSEUP
++ || c == K_MOUSELEFT || c == K_MOUSERIGHT)
++ return retval;
++
++ // Set "compl_get_longest" when finding the first matches.
++ if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET
++ || (ctrl_x_mode == CTRL_X_NORMAL && !compl_started))
++ {
++ compl_get_longest = (strstr((char *)p_cot, "longest") != NULL);
++ compl_used_match = TRUE;
++
++ }
++
++ if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET)
++ {
++ // We have just typed CTRL-X and aren't quite sure which CTRL-X mode
++ // it will be yet. Now we decide.
++ switch (c)
++ {
++ case Ctrl_E:
++ case Ctrl_Y:
++ ctrl_x_mode = CTRL_X_SCROLL;
++ if (!(State & REPLACE_FLAG))
++ edit_submode = (char_u *)_(" (insert) Scroll (^E/^Y)");
++ else
++ edit_submode = (char_u *)_(" (replace) Scroll (^E/^Y)");
++ edit_submode_pre = NULL;
++ showmode();
++ break;
++ case Ctrl_L:
++ ctrl_x_mode = CTRL_X_WHOLE_LINE;
++ break;
++ case Ctrl_F:
++ ctrl_x_mode = CTRL_X_FILES;
++ break;
++ case Ctrl_K:
++ ctrl_x_mode = CTRL_X_DICTIONARY;
++ break;
++ case Ctrl_R:
++ // Simply allow ^R to happen without affecting ^X mode
++ break;
++ case Ctrl_T:
++ ctrl_x_mode = CTRL_X_THESAURUS;
++ break;
++ #ifdef FEAT_COMPL_FUNC
++ case Ctrl_U:
++ ctrl_x_mode = CTRL_X_FUNCTION;
++ break;
++ case Ctrl_O:
++ ctrl_x_mode = CTRL_X_OMNI;
++ break;
++ #endif
++ case 's':
++ case Ctrl_S:
++ ctrl_x_mode = CTRL_X_SPELL;
++ #ifdef FEAT_SPELL
++ ++emsg_off; // Avoid getting the E756 error twice.
++ spell_back_to_badword();
++ --emsg_off;
++ #endif
++ break;
++ case Ctrl_RSB:
++ ctrl_x_mode = CTRL_X_TAGS;
++ break;
++ #ifdef FEAT_FIND_ID
++ case Ctrl_I:
++ case K_S_TAB:
++ ctrl_x_mode = CTRL_X_PATH_PATTERNS;
++ break;
++ case Ctrl_D:
++ ctrl_x_mode = CTRL_X_PATH_DEFINES;
++ break;
++ #endif
++ case Ctrl_V:
++ case Ctrl_Q:
++ ctrl_x_mode = CTRL_X_CMDLINE;
++ break;
++ case Ctrl_P:
++ case Ctrl_N:
++ // ^X^P means LOCAL expansion if nothing interrupted (eg we
++ // just started ^X mode, or there were enough ^X's to cancel
++ // the previous mode, say ^X^F^X^X^P or ^P^X^X^X^P, see below)
++ // do normal expansion when interrupting a different mode (say
++ // ^X^F^X^P or ^P^X^X^P, see below)
++ // nothing changes if interrupting mode 0, (eg, the flag
++ // doesn't change when going to ADDING mode -- Acevedo
++ if (!(compl_cont_status & CONT_INTRPT))
++ compl_cont_status |= CONT_LOCAL;
++ else if (compl_cont_mode != 0)
++ compl_cont_status &= ~CONT_LOCAL;
++ // FALLTHROUGH
++ default:
++ // If we have typed at least 2 ^X's... for modes != 0, we set
++ // compl_cont_status = 0 (eg, as if we had just started ^X
++ // mode).
++ // For mode 0, we set "compl_cont_mode" to an impossible
++ // value, in both cases ^X^X can be used to restart the same
++ // mode (avoiding ADDING mode).
++ // Undocumented feature: In a mode != 0 ^X^P and ^X^X^P start
++ // 'complete' and local ^P expansions respectively.
++ // In mode 0 an extra ^X is needed since ^X^P goes to ADDING
++ // mode -- Acevedo
++ if (c == Ctrl_X)
++ {
++ if (compl_cont_mode != 0)
++ compl_cont_status = 0;
++ else
++ compl_cont_mode = CTRL_X_NOT_DEFINED_YET;
++ }
++ ctrl_x_mode = CTRL_X_NORMAL;
++ edit_submode = NULL;
++ showmode();
++ break;
++ }
++ }
++ else if (ctrl_x_mode != CTRL_X_NORMAL)
++ {
++ // We're already in CTRL-X mode, do we stay in it?
++ if (!vim_is_ctrl_x_key(c))
++ {
++ if (ctrl_x_mode == CTRL_X_SCROLL)
++ ctrl_x_mode = CTRL_X_NORMAL;
++ else
++ ctrl_x_mode = CTRL_X_FINISHED;
++ edit_submode = NULL;
++ }
++ showmode();
++ }
++
++ if (compl_started || ctrl_x_mode == CTRL_X_FINISHED)
++ {
++ // Show error message from attempted keyword completion (probably
++ // 'Pattern not found') until another key is hit, then go back to
++ // showing what mode we are in.
++ showmode();
++ if ((ctrl_x_mode == CTRL_X_NORMAL && c != Ctrl_N && c != Ctrl_P
++ && c != Ctrl_R && !ins_compl_pum_key(c))
++ || ctrl_x_mode == CTRL_X_FINISHED)
++ {
++ // Get here when we have finished typing a sequence of ^N and
++ // ^P or other completion characters in CTRL-X mode. Free up
++ // memory that was used, and make sure we can redo the insert.
++ if (compl_curr_match != NULL || compl_leader != NULL || c == Ctrl_E)
++ {
++ // If any of the original typed text has been changed, eg when
++ // ignorecase is set, we must add back-spaces to the redo
++ // buffer. We add as few as necessary to delete just the part
++ // of the original text that has changed.
++ // When using the longest match, edited the match or used
++ // CTRL-E then don't use the current match.
++ if (compl_curr_match != NULL && compl_used_match && c != Ctrl_E)
++ ptr = compl_curr_match->cp_str;
++ else
++ ptr = NULL;
++ ins_compl_fixRedoBufForLeader(ptr);
++ }
++
++ #ifdef FEAT_CINDENT
++ want_cindent = (can_cindent_get() && cindent_on());
++ #endif
++ // When completing whole lines: fix indent for 'cindent'.
++ // Otherwise, break line if it's too long.
++ if (compl_cont_mode == CTRL_X_WHOLE_LINE)
++ {
++ #ifdef FEAT_CINDENT
++ // re-indent the current line
++ if (want_cindent)
++ {
++ do_c_expr_indent();
++ want_cindent = FALSE; // don't do it again
++ }
++ #endif
++ }
++ else
++ {
++ int prev_col = curwin->w_cursor.col;
++
++ // put the cursor on the last char, for 'tw' formatting
++ if (prev_col > 0)
++ dec_cursor();
++ // only format when something was inserted
++ if (!arrow_used && !ins_need_undo_get() && c != Ctrl_E)
++ insertchar(NUL, 0, -1);
++ if (prev_col > 0
++ && ml_get_curline()[curwin->w_cursor.col] != NUL)
++ inc_cursor();
++ }
++
++ // If the popup menu is displayed pressing CTRL-Y means accepting
++ // the selection without inserting anything. When
++ // compl_enter_selects is set the Enter key does the same.
++ if ((c == Ctrl_Y || (compl_enter_selects
++ && (c == CAR || c == K_KENTER || c == NL)))
++ && pum_visible())
++ retval = TRUE;
++
++ // CTRL-E means completion is Ended, go back to the typed text.
++ // but only do this, if the Popup is still visible
++ if (c == Ctrl_E)
++ {
++ ins_compl_delete();
++ if (compl_leader != NULL)
++ ins_bytes(compl_leader + ins_compl_len());
++ else if (compl_first_match != NULL)
++ ins_bytes(compl_orig_text + ins_compl_len());
++ retval = TRUE;
++ }
++
++ auto_format(FALSE, TRUE);
++
++ ins_compl_free();
++ compl_started = FALSE;
++ compl_matches = 0;
++ if (!shortmess(SHM_COMPLETIONMENU))
++ msg_clr_cmdline(); // necessary for "noshowmode"
++ ctrl_x_mode = CTRL_X_NORMAL;
++ compl_enter_selects = FALSE;
++ if (edit_submode != NULL)
++ {
++ edit_submode = NULL;
++ showmode();
++ }
++
++ #ifdef FEAT_CMDWIN
++ if (c == Ctrl_C && cmdwin_type != 0)
++ // Avoid the popup menu remains displayed when leaving the
++ // command line window.
++ update_screen(0);
++ #endif
++ #ifdef FEAT_CINDENT
++ // Indent now if a key was typed that is in 'cinkeys'.
++ if (want_cindent && in_cinkeys(KEY_COMPLETE, ' ', inindent(0)))
++ do_c_expr_indent();
++ #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()
++ if (!vim_is_ctrl_x_key(c))
++ {
++ compl_cont_status = 0;
++ compl_cont_mode = 0;
++ }
++
++ return retval;
++ }
++
++ /*
++ * Fix the redo buffer for the completion leader replacing some of the typed
++ * text. This inserts backspaces and appends the changed text.
++ * "ptr" is the known leader text or NUL.
++ */
++ static void
++ ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
++ {
++ int len;
++ char_u *p;
++ char_u *ptr = ptr_arg;
++
++ if (ptr == NULL)
++ {
++ if (compl_leader != NULL)
++ ptr = compl_leader;
++ else
++ return; // nothing to do
++ }
++ if (compl_orig_text != NULL)
++ {
++ p = compl_orig_text;
++ for (len = 0; p[len] != NUL && p[len] == ptr[len]; ++len)
++ ;
++ if (len > 0)
++ len -= (*mb_head_off)(p, p + len);
++ for (p += len; *p != NUL; MB_PTR_ADV(p))
++ AppendCharToRedobuff(K_BS);
++ }
++ else
++ len = 0;
++ if (ptr != NULL)
++ AppendToRedobuffLit(ptr + len, -1);
++ }
++
++ /*
++ * Loops through the list of windows, loaded-buffers or non-loaded-buffers
++ * (depending on flag) starting from buf and looking for a non-scanned
++ * buffer (other than curbuf). curbuf is special, if it is called with
++ * buf=curbuf then it has to be the first call for a given flag/expansion.
++ *
++ * Returns the buffer to scan, if any, otherwise returns curbuf -- Acevedo
++ */
++ static buf_T *
++ ins_compl_next_buf(buf_T *buf, int flag)
++ {
++ static win_T *wp = NULL;
++
++ if (flag == 'w') // just windows
++ {
++ if (buf == curbuf || wp == NULL) // first call for this flag/expansion
++ wp = curwin;
++ while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin
++ && wp->w_buffer->b_scanned)
++ ;
++ buf = wp->w_buffer;
++ }
++ else
++ // 'b' (just loaded buffers), 'u' (just non-loaded buffers) or 'U'
++ // (unlisted buffers)
++ // When completing whole lines skip unloaded buffers.
++ while ((buf = (buf->b_next != NULL ? buf->b_next : firstbuf)) != curbuf
++ && ((flag == 'U'
++ ? buf->b_p_bl
++ : (!buf->b_p_bl
++ || (buf->b_ml.ml_mfp == NULL) != (flag == 'u')))
++ || buf->b_scanned))
++ ;
++ return buf;
++ }
++
++ #ifdef FEAT_COMPL_FUNC
++ /*
++ * Execute user defined complete function 'completefunc' or 'omnifunc', and
++ * get matches in "matches".
++ */
++ static void
++ expand_by_function(
++ int type, // CTRL_X_OMNI or CTRL_X_FUNCTION
++ char_u *base)
++ {
++ list_T *matchlist = NULL;
++ dict_T *matchdict = NULL;
++ typval_T args[3];
++ char_u *funcname;
++ pos_T pos;
++ win_T *curwin_save;
++ buf_T *curbuf_save;
++ typval_T rettv;
++ int save_State = State;
++
++ funcname = (type == CTRL_X_FUNCTION) ? curbuf->b_p_cfu : curbuf->b_p_ofu;
++ if (*funcname == NUL)
++ return;
++
++ // Call 'completefunc' to obtain the list of matches.
++ args[0].v_type = VAR_NUMBER;
++ args[0].vval.v_number = 0;
++ args[1].v_type = VAR_STRING;
++ args[1].vval.v_string = base != NULL ? base : (char_u *)"";
++ args[2].v_type = VAR_UNKNOWN;
++
++ pos = curwin->w_cursor;
++ curwin_save = curwin;
++ 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)
++ {
++ case VAR_LIST:
++ matchlist = rettv.vval.v_list;
++ break;
++ case VAR_DICT:
++ matchdict = rettv.vval.v_dict;
++ break;
++ case VAR_SPECIAL:
++ if (rettv.vval.v_number == VVAL_NONE)
++ compl_opt_suppress_empty = TRUE;
++ // FALLTHROUGH
++ default:
++ // TODO: Give error message?
++ clear_tv(&rettv);
++ break;
++ }
++ }
++
++ if (curwin_save != curwin || curbuf_save != curbuf)
++ {
++ emsg(_(e_complwin));
++ goto theend;
++ }
++ curwin->w_cursor = pos; // restore the cursor position
++ validate_cursor();
++ if (!EQUAL_POS(curwin->w_cursor, pos))
++ {
++ emsg(_(e_compldel));
++ goto theend;
++ }
++
++ if (matchlist != NULL)
++ ins_compl_add_list(matchlist);
++ else if (matchdict != NULL)
++ ins_compl_add_dict(matchdict);
++
++ theend:
++ // Restore State, it might have been changed.
++ State = save_State;
++
++ if (matchdict != NULL)
++ dict_unref(matchdict);
++ if (matchlist != NULL)
++ list_unref(matchlist);
++ }
++ #endif // FEAT_COMPL_FUNC
++
++ #if defined(FEAT_COMPL_FUNC) || defined(FEAT_EVAL) || defined(PROTO)
++ /*
++ * Add completions from a list.
++ */
++ static void
++ ins_compl_add_list(list_T *list)
++ {
++ listitem_T *li;
++ int dir = compl_direction;
++
++ // Go through the List with matches and add each of them.
++ for (li = list->lv_first; li != NULL; li = li->li_next)
++ {
++ if (ins_compl_add_tv(&li->li_tv, dir) == OK)
++ // if dir was BACKWARD then honor it just once
++ dir = FORWARD;
++ else if (did_emsg)
++ break;
++ }
++ }
++
++ /*
++ * Add completions from a dict.
++ */
++ static void
++ ins_compl_add_dict(dict_T *dict)
++ {
++ dictitem_T *di_refresh;
++ dictitem_T *di_words;
++
++ // Check for optional "refresh" item.
++ compl_opt_refresh_always = FALSE;
++ di_refresh = dict_find(dict, (char_u *)"refresh", 7);
++ if (di_refresh != NULL && di_refresh->di_tv.v_type == VAR_STRING)
++ {
++ char_u *v = di_refresh->di_tv.vval.v_string;
++
++ if (v != NULL && STRCMP(v, (char_u *)"always") == 0)
++ compl_opt_refresh_always = TRUE;
++ }
++
++ // Add completions from a "words" list.
++ di_words = dict_find(dict, (char_u *)"words", 5);
++ if (di_words != NULL && di_words->di_tv.v_type == VAR_LIST)
++ ins_compl_add_list(di_words->di_tv.vval.v_list);
++ }
++
++ /*
++ * Add a match to the list of matches from a typeval_T.
++ * If the given string is already in the list of completions, then return
++ * NOTDONE, otherwise add it to the list and return OK. If there is an error,
++ * maybe because alloc() returns NULL, then FAIL is returned.
++ */
++ int
++ ins_compl_add_tv(typval_T *tv, int dir)
++ {
++ char_u *word;
++ int icase = FALSE;
++ int adup = FALSE;
++ int aempty = FALSE;
++ char_u *(cptext[CPT_COUNT]);
++
++ if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
++ {
++ word = dict_get_string(tv->vval.v_dict, (char_u *)"word", FALSE);
++ cptext[CPT_ABBR] = dict_get_string(tv->vval.v_dict,
++ (char_u *)"abbr", FALSE);
++ cptext[CPT_MENU] = dict_get_string(tv->vval.v_dict,
++ (char_u *)"menu", FALSE);
++ cptext[CPT_KIND] = dict_get_string(tv->vval.v_dict,
++ (char_u *)"kind", FALSE);
++ cptext[CPT_INFO] = dict_get_string(tv->vval.v_dict,
++ (char_u *)"info", FALSE);
++ cptext[CPT_USER_DATA] = dict_get_string(tv->vval.v_dict,
++ (char_u *)"user_data", FALSE);
++ if (dict_get_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL)
++ icase = dict_get_number(tv->vval.v_dict, (char_u *)"icase");
++ if (dict_get_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
++ adup = dict_get_number(tv->vval.v_dict, (char_u *)"dup");
++ if (dict_get_string(tv->vval.v_dict, (char_u *)"empty", FALSE) != NULL)
++ aempty = dict_get_number(tv->vval.v_dict, (char_u *)"empty");
++ }
++ else
++ {
++ word = tv_get_string_chk(tv);
++ vim_memset(cptext, 0, sizeof(cptext));
++ }
++ if (word == NULL || (!aempty && *word == NUL))
++ return FAIL;
++ return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup);
++ }
++ #endif
++
++ /*
++ * Get the next expansion(s), using "compl_pattern".
++ * The search starts at position "ini" in curbuf and in the direction
++ * compl_direction.
++ * When "compl_started" is FALSE start at that position, otherwise continue
++ * where we stopped searching before.
++ * This may return before finding all the matches.
++ * Return the total number of matches or -1 if still unknown -- Acevedo
++ */
++ static int
++ ins_compl_get_exp(pos_T *ini)
++ {
++ static pos_T first_match_pos;
++ static pos_T last_match_pos;
++ static char_u *e_cpt = (char_u *)""; // curr. entry in 'complete'
++ static int found_all = FALSE; // Found all matches of a
++ // certain type.
++ static buf_T *ins_buf = NULL; // buffer being scanned
++
++ pos_T *pos;
++ char_u **matches;
++ int save_p_scs;
++ int save_p_ws;
++ int save_p_ic;
++ int i;
++ int num_matches;
++ int len;
++ int found_new_match;
++ int type = ctrl_x_mode;
++ char_u *ptr;
++ char_u *dict = NULL;
++ int dict_f = 0;
++ int set_match_pos;
++
++ if (!compl_started)
++ {
++ FOR_ALL_BUFFERS(ins_buf)
++ ins_buf->b_scanned = 0;
++ found_all = FALSE;
++ ins_buf = curbuf;
++ e_cpt = (compl_cont_status & CONT_LOCAL)
++ ? (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;
++ set_match_pos = FALSE;
++
++ // For ^N/^P pick a new entry from e_cpt if compl_started is off,
++ // or if found_all says this entry is done. For ^X^L only use the
++ // entries from 'complete' that look in loaded buffers.
++ if ((ctrl_x_mode == CTRL_X_NORMAL
++ || ctrl_x_mode_line_or_eval())
++ && (!compl_started || found_all))
++ {
++ found_all = FALSE;
++ while (*e_cpt == ',' || *e_cpt == ' ')
++ e_cpt++;
++ if (*e_cpt == '.' && !curbuf->b_scanned)
++ {
++ ins_buf = curbuf;
++ first_match_pos = *ini;
++ // Move the cursor back one character so that ^N can match the
++ // word immediately after the cursor.
++ if (ctrl_x_mode == CTRL_X_NORMAL && dec(&first_match_pos) < 0)
++ {
++ // Move the cursor to after the last character in the
++ // buffer, so that word at start of buffer is found
++ // correctly.
++ first_match_pos.lnum = ins_buf->b_ml.ml_line_count;
++ first_match_pos.col =
++ (colnr_T)STRLEN(ml_get(first_match_pos.lnum));
++ }
++ last_match_pos = first_match_pos;
++ type = 0;
++
++ // Remember the first match so that the loop stops when we
++ // wrap and come back there a second time.
++ set_match_pos = TRUE;
++ }
++ else if (vim_strchr((char_u *)"buwU", *e_cpt) != NULL
++ && (ins_buf = ins_compl_next_buf(ins_buf, *e_cpt)) != curbuf)
++ {
++ // Scan a buffer, but not the current one.
++ if (ins_buf->b_ml.ml_mfp != NULL) // loaded buffer
++ {
++ compl_started = TRUE;
++ first_match_pos.col = last_match_pos.col = 0;
++ first_match_pos.lnum = ins_buf->b_ml.ml_line_count + 1;
++ last_match_pos.lnum = 0;
++ type = 0;
++ }
++ else // unloaded buffer, scan like dictionary
++ {
++ found_all = TRUE;
++ if (ins_buf->b_fname == NULL)
++ continue;
++ type = CTRL_X_DICTIONARY;
++ dict = ins_buf->b_fname;
++ dict_f = DICT_EXACT;
++ }
++ vim_snprintf((char *)IObuff, IOSIZE, _("Scanning: %s"),
++ ins_buf->b_fname == NULL
++ ? buf_spname(ins_buf)
++ : ins_buf->b_sfname == NULL
++ ? ins_buf->b_fname
++ : ins_buf->b_sfname);
++ (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
++ }
++ else if (*e_cpt == NUL)
++ break;
++ else
++ {
++ if (ctrl_x_mode_line_or_eval())
++ type = -1;
++ else if (*e_cpt == 'k' || *e_cpt == 's')
++ {
++ if (*e_cpt == 'k')
++ type = CTRL_X_DICTIONARY;
++ else
++ type = CTRL_X_THESAURUS;
++ if (*++e_cpt != ',' && *e_cpt != NUL)
++ {
++ dict = e_cpt;
++ dict_f = DICT_FIRST;
++ }
++ }
++ #ifdef FEAT_FIND_ID
++ else if (*e_cpt == 'i')
++ type = CTRL_X_PATH_PATTERNS;
++ else if (*e_cpt == 'd')
++ type = CTRL_X_PATH_DEFINES;
++ #endif
++ else if (*e_cpt == ']' || *e_cpt == 't')
++ {
++ type = CTRL_X_TAGS;
++ vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
++ (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
++ }
++ else
++ type = -1;
++
++ // in any case e_cpt is advanced to the next entry
++ (void)copy_option_part(&e_cpt, IObuff, IOSIZE, ",");
++
++ found_all = TRUE;
++ if (type == -1)
++ continue;
++ }
++ }
++
++ // If complete() was called then compl_pattern has been reset. The
++ // following won't work then, bail out.
++ if (compl_pattern == NULL)
++ break;
++
++ switch (type)
++ {
++ case -1:
++ break;
++ #ifdef FEAT_FIND_ID
++ case CTRL_X_PATH_PATTERNS:
++ case CTRL_X_PATH_DEFINES:
++ find_pattern_in_path(compl_pattern, compl_direction,
++ (int)STRLEN(compl_pattern), FALSE, FALSE,
++ (type == CTRL_X_PATH_DEFINES
++ && !(compl_cont_status & CONT_SOL))
++ ? FIND_DEFINE : FIND_ANY, 1L, ACTION_EXPAND,
++ (linenr_T)1, (linenr_T)MAXLNUM);
++ break;
++ #endif
++
++ case CTRL_X_DICTIONARY:
++ case CTRL_X_THESAURUS:
++ ins_compl_dictionaries(
++ dict != NULL ? dict
++ : (type == CTRL_X_THESAURUS
++ ? (*curbuf->b_p_tsr == NUL
++ ? p_tsr
++ : curbuf->b_p_tsr)
++ : (*curbuf->b_p_dict == NUL
++ ? p_dict
++ : curbuf->b_p_dict)),
++ compl_pattern,
++ dict != NULL ? dict_f
++ : 0, type == CTRL_X_THESAURUS);
++ dict = NULL;
++ break;
++
++ case CTRL_X_TAGS:
++ // set p_ic according to p_ic, p_scs and pat for find_tags().
++ save_p_ic = p_ic;
++ p_ic = ignorecase(compl_pattern);
++
++ // Find up to TAG_MANY matches. Avoids that an enormous number
++ // of matches is found when compl_pattern is empty
++ if (find_tags(compl_pattern, &num_matches, &matches,
++ TAG_REGEXP | TAG_NAMES | TAG_NOIC | TAG_INS_COMP
++ | (ctrl_x_mode != CTRL_X_NORMAL ? TAG_VERBOSE : 0),
++ TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
++ {
++ ins_compl_add_matches(num_matches, matches, p_ic);
++ }
++ p_ic = save_p_ic;
++ break;
++
++ case CTRL_X_FILES:
++ if (expand_wildcards(1, &compl_pattern, &num_matches, &matches,
++ EW_FILE|EW_DIR|EW_ADDSLASH|EW_SILENT) == OK)
++ {
++
++ // May change home directory back to "~".
++ tilde_replace(compl_pattern, num_matches, matches);
++ ins_compl_add_matches(num_matches, matches, p_fic || p_wic);
++ }
++ break;
++
++ case CTRL_X_CMDLINE:
++ if (expand_cmdline(&compl_xp, compl_pattern,
++ (int)STRLEN(compl_pattern),
++ &num_matches, &matches) == EXPAND_OK)
++ ins_compl_add_matches(num_matches, matches, FALSE);
++ break;
++
++ #ifdef FEAT_COMPL_FUNC
++ case CTRL_X_FUNCTION:
++ case CTRL_X_OMNI:
++ expand_by_function(type, compl_pattern);
++ break;
++ #endif
++
++ case CTRL_X_SPELL:
++ #ifdef FEAT_SPELL
++ num_matches = expand_spelling(first_match_pos.lnum,
++ compl_pattern, &matches);
++ if (num_matches > 0)
++ ins_compl_add_matches(num_matches, matches, p_ic);
++ #endif
++ break;
++
++ default: // normal ^P/^N and ^X^L
++ // If 'infercase' is set, don't use 'smartcase' here
++ save_p_scs = p_scs;
++ if (ins_buf->b_p_inf)
++ p_scs = FALSE;
++
++ // Buffers other than curbuf are scanned from the beginning or the
++ // end but never from the middle, thus setting nowrapscan in this
++ // buffers is a good idea, on the other hand, we always set
++ // wrapscan for curbuf to avoid missing matches -- Acevedo,Webb
++ save_p_ws = p_ws;
++ if (ins_buf != curbuf)
++ p_ws = FALSE;
++ else if (*e_cpt == '.')
++ p_ws = TRUE;
++ for (;;)
++ {
++ int flags = 0;
++
++ ++msg_silent; // Don't want messages for wrapscan.
++
++ // ctrl_x_mode_line_or_eval() || word-wise search that
++ // has added a word that was at the beginning of the line
++ if (ctrl_x_mode_line_or_eval()
++ || (compl_cont_status & CONT_SOL))
++ found_new_match = search_for_exact_line(ins_buf, pos,
++ compl_direction, compl_pattern);
++ else
++ found_new_match = searchit(NULL, ins_buf, pos, NULL,
++ compl_direction,
++ compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
++ RE_LAST, (linenr_T)0, NULL, NULL);
++ --msg_silent;
++ if (!compl_started || set_match_pos)
++ {
++ // set "compl_started" even on fail
++ compl_started = TRUE;
++ first_match_pos = *pos;
++ last_match_pos = *pos;
++ set_match_pos = FALSE;
++ }
++ else if (first_match_pos.lnum == last_match_pos.lnum
++ && first_match_pos.col == last_match_pos.col)
++ found_new_match = FAIL;
++ if (found_new_match == FAIL)
++ {
++ if (ins_buf == curbuf)
++ found_all = TRUE;
++ break;
++ }
++
++ // when ADDING, the text before the cursor matches, skip it
++ if ( (compl_cont_status & CONT_ADDING) && ins_buf == curbuf
++ && ini->lnum == pos->lnum
++ && ini->col == pos->col)
++ continue;
++ ptr = ml_get_buf(ins_buf, pos->lnum, FALSE) + pos->col;
++ if (ctrl_x_mode_line_or_eval())
++ {
++ if (compl_cont_status & CONT_ADDING)
++ {
++ if (pos->lnum >= ins_buf->b_ml.ml_line_count)
++ continue;
++ ptr = ml_get_buf(ins_buf, pos->lnum + 1, FALSE);
++ if (!p_paste)
++ ptr = skipwhite(ptr);
++ }
++ len = (int)STRLEN(ptr);
++ }
++ else
++ {
++ char_u *tmp_ptr = ptr;
++
++ if (compl_cont_status & CONT_ADDING)
++ {
++ tmp_ptr += compl_length;
++ // Skip if already inside a word.
++ if (vim_iswordp(tmp_ptr))
++ continue;
++ // Find start of next word.
++ tmp_ptr = find_word_start(tmp_ptr);
++ }
++ // Find end of this word.
++ tmp_ptr = find_word_end(tmp_ptr);
++ len = (int)(tmp_ptr - ptr);
++
++ if ((compl_cont_status & CONT_ADDING)
++ && len == compl_length)
++ {
++ if (pos->lnum < ins_buf->b_ml.ml_line_count)
++ {
++ // Try next line, if any. the new word will be
++ // "join" as if the normal command "J" was used.
++ // IOSIZE is always greater than
++ // compl_length, so the next STRNCPY always
++ // works -- Acevedo
++ STRNCPY(IObuff, ptr, len);
++ ptr = ml_get_buf(ins_buf, pos->lnum + 1, FALSE);
++ tmp_ptr = ptr = skipwhite(ptr);
++ // Find start of next word.
++ tmp_ptr = find_word_start(tmp_ptr);
++ // Find end of next word.
++ tmp_ptr = find_word_end(tmp_ptr);
++ if (tmp_ptr > ptr)
++ {
++ if (*ptr != ')' && IObuff[len - 1] != TAB)
++ {
++ if (IObuff[len - 1] != ' ')
++ IObuff[len++] = ' ';
++ // IObuf =~ "\k.* ", thus len >= 2
++ if (p_js
++ && (IObuff[len - 2] == '.'
++ || (vim_strchr(p_cpo, CPO_JOINSP)
++ == NULL
++ && (IObuff[len - 2] == '?'
++ || IObuff[len - 2] == '!'))))
++ IObuff[len++] = ' ';
++ }
++ // copy as much as possible of the new word
++ if (tmp_ptr - ptr >= IOSIZE - len)
++ tmp_ptr = ptr + IOSIZE - len - 1;
++ STRNCPY(IObuff + len, ptr, tmp_ptr - ptr);
++ len += (int)(tmp_ptr - ptr);
++ flags |= CONT_S_IPOS;
++ }
++ IObuff[len] = NUL;
++ ptr = IObuff;
++ }
++ if (len == compl_length)
++ continue;
++ }
++ }
++ if (ins_compl_add_infercase(ptr, len, p_ic,
++ ins_buf == curbuf ? NULL : ins_buf->b_sfname,
++ 0, flags) != NOTDONE)
++ {
++ found_new_match = OK;
++ break;
++ }
++ }
++ p_scs = save_p_scs;
++ p_ws = save_p_ws;
++ }
++
++ // check if compl_curr_match has changed, (e.g. other type of
++ // expansion added something)
++ if (type != 0 && compl_curr_match != compl_old_match)
++ found_new_match = OK;
++
++ // break the loop for specialized modes (use 'complete' just for the
++ // generic ctrl_x_mode == CTRL_X_NORMAL) or when we've found a new
++ // match
++ if ((ctrl_x_mode != CTRL_X_NORMAL
++ && !ctrl_x_mode_line_or_eval()) || found_new_match != FAIL)
++ {
++ if (got_int)
++ break;
++ // Fill the popup menu as soon as possible.
++ if (type != -1)
++ ins_compl_check_keys(0, FALSE);
++
++ if ((ctrl_x_mode != CTRL_X_NORMAL
++ && !ctrl_x_mode_line_or_eval()) || compl_interrupted)
++ break;
++ compl_started = TRUE;
++ }
++ else
++ {
++ // Mark a buffer scanned when it has been scanned completely
++ if (type == 0 || type == CTRL_X_PATH_PATTERNS)
++ ins_buf->b_scanned = TRUE;
++
++ compl_started = FALSE;
++ }
++ }
++ compl_started = TRUE;
++
++ if ((ctrl_x_mode == CTRL_X_NORMAL || ctrl_x_mode_line_or_eval())
++ && *e_cpt == NUL) // Got to end of 'complete'
++ found_new_match = FAIL;
++
++ i = -1; // total of matches, unknown
++ if (found_new_match == FAIL || (ctrl_x_mode != CTRL_X_NORMAL
++ && !ctrl_x_mode_line_or_eval()))
++ i = ins_compl_make_cyclic();
++
++ if (compl_old_match != NULL)
++ {
++ // If several matches were added (FORWARD) or the search failed and has
++ // just been made cyclic then we have to move compl_curr_match to the
++ // next or previous entry (if any) -- Acevedo
++ compl_curr_match = compl_direction == FORWARD ? compl_old_match->cp_next
++ : compl_old_match->cp_prev;
++ if (compl_curr_match == NULL)
++ compl_curr_match = compl_old_match;
++ }
++ return i;
++ }
++
++ /*
++ * Delete the old text being completed.
++ */
++ void
++ ins_compl_delete(void)
++ {
++ int col;
++
++ // In insert mode: Delete the typed part.
++ // In replace mode: Put the old characters back, if any.
++ col = compl_col + (compl_cont_status & CONT_ADDING ? compl_length : 0);
++ if ((int)curwin->w_cursor.col > col)
++ {
++ if (stop_arrow() == FAIL)
++ return;
++ backspace_until_column(col);
++ }
++
++ // TODO: is this sufficient for redrawing? Redrawing everything causes
++ // flicker, thus we can't do that.
++ changed_cline_bef_curs();
++ // clear v:completed_item
++ set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED));
++ }
++
++ /*
++ * Insert the new text being completed.
++ * "in_compl_func" is TRUE when called from complete_check().
++ */
++ void
++ ins_compl_insert(int in_compl_func)
++ {
++ dict_T *dict;
++
++ ins_bytes(compl_shown_match->cp_str + ins_compl_len());
++ if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
++ compl_used_match = FALSE;
++ else
++ compl_used_match = TRUE;
++
++ // Set completed item.
++ // { word, abbr, menu, kind, info }
++ dict = dict_alloc_lock(VAR_FIXED);
++ if (dict != NULL)
++ {
++ dict_add_string(dict, "word", compl_shown_match->cp_str);
++ dict_add_string(dict, "abbr", compl_shown_match->cp_text[CPT_ABBR]);
++ dict_add_string(dict, "menu", compl_shown_match->cp_text[CPT_MENU]);
++ dict_add_string(dict, "kind", compl_shown_match->cp_text[CPT_KIND]);
++ dict_add_string(dict, "info", compl_shown_match->cp_text[CPT_INFO]);
++ dict_add_string(dict, "user_data",
++ compl_shown_match->cp_text[CPT_USER_DATA]);
++ }
++ set_vim_var_dict(VV_COMPLETED_ITEM, dict);
++ if (!in_compl_func)
++ compl_curr_match = compl_shown_match;
++ }
++
++ /*
++ * Fill in the next completion in the current direction.
++ * If "allow_get_expansion" is TRUE, then we may call ins_compl_get_exp() to
++ * get more completions. If it is FALSE, then we just do nothing when there
++ * are no more completions in a given direction. The latter case is used when
++ * we are still in the middle of finding completions, to allow browsing
++ * through the ones found so far.
++ * Return the total number of matches, or -1 if still unknown -- webb.
++ *
++ * compl_curr_match is currently being used by ins_compl_get_exp(), so we use
++ * compl_shown_match here.
++ *
++ * Note that this function may be called recursively once only. First with
++ * "allow_get_expansion" TRUE, which calls ins_compl_get_exp(), which in turn
++ * calls this function with "allow_get_expansion" FALSE.
++ */
++ static int
++ ins_compl_next(
++ int allow_get_expansion,
++ int count, // repeat completion this many times; should
++ // be at least 1
++ int insert_match, // Insert the newly selected match
++ int in_compl_func) // called from complete_check()
++ {
++ int num_matches = -1;
++ int todo = count;
++ compl_T *found_compl = NULL;
++ int found_end = FALSE;
++ int advance;
++ int started = compl_started;
++
++ // When user complete function return -1 for findstart which is next
++ // time of 'always', compl_shown_match become NULL.
++ if (compl_shown_match == NULL)
++ return -1;
++
++ if (compl_leader != NULL
++ && (compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0)
++ {
++ // Set "compl_shown_match" to the actually shown match, it may differ
++ // when "compl_leader" is used to omit some of the matches.
++ while (!ins_compl_equal(compl_shown_match,
++ compl_leader, (int)STRLEN(compl_leader))
++ && compl_shown_match->cp_next != NULL
++ && compl_shown_match->cp_next != compl_first_match)
++ compl_shown_match = compl_shown_match->cp_next;
++
++ // If we didn't find it searching forward, and compl_shows_dir is
++ // backward, find the last match.
++ if (compl_shows_dir == BACKWARD
++ && !ins_compl_equal(compl_shown_match,
++ compl_leader, (int)STRLEN(compl_leader))
++ && (compl_shown_match->cp_next == NULL
++ || compl_shown_match->cp_next == compl_first_match))
++ {
++ while (!ins_compl_equal(compl_shown_match,
++ compl_leader, (int)STRLEN(compl_leader))
++ && compl_shown_match->cp_prev != NULL
++ && compl_shown_match->cp_prev != compl_first_match)
++ compl_shown_match = compl_shown_match->cp_prev;
++ }
++ }
++
++ if (allow_get_expansion && insert_match
++ && (!(compl_get_longest || compl_restarting) || compl_used_match))
++ // Delete old text to be replaced
++ ins_compl_delete();
++
++ // When finding the longest common text we stick at the original text,
++ // don't let CTRL-N or CTRL-P move to the first match.
++ advance = count != 1 || !allow_get_expansion || !compl_get_longest;
++
++ // When restarting the search don't insert the first match either.
++ if (compl_restarting)
++ {
++ advance = FALSE;
++ compl_restarting = FALSE;
++ }
++
++ // Repeat this for when <PageUp> or <PageDown> is typed. But don't wrap
++ // around.
++ while (--todo >= 0)
++ {
++ if (compl_shows_dir == FORWARD && compl_shown_match->cp_next != NULL)
++ {
++ compl_shown_match = compl_shown_match->cp_next;
++ found_end = (compl_first_match != NULL
++ && (compl_shown_match->cp_next == compl_first_match
++ || compl_shown_match == compl_first_match));
++ }
++ else if (compl_shows_dir == BACKWARD
++ && compl_shown_match->cp_prev != NULL)
++ {
++ found_end = (compl_shown_match == compl_first_match);
++ compl_shown_match = compl_shown_match->cp_prev;
++ found_end |= (compl_shown_match == compl_first_match);
++ }
++ else
++ {
++ if (!allow_get_expansion)
++ {
++ if (advance)
++ {
++ if (compl_shows_dir == BACKWARD)
++ compl_pending -= todo + 1;
++ else
++ compl_pending += todo + 1;
++ }
++ return -1;
++ }
++
++ if (!compl_no_select && advance)
++ {
++ if (compl_shows_dir == BACKWARD)
++ --compl_pending;
++ else
++ ++compl_pending;
++ }
++
++ // Find matches.
++ num_matches = ins_compl_get_exp(&compl_startpos);
++
++ // handle any pending completions
++ while (compl_pending != 0 && compl_direction == compl_shows_dir
++ && advance)
++ {
++ if (compl_pending > 0 && compl_shown_match->cp_next != NULL)
++ {
++ compl_shown_match = compl_shown_match->cp_next;
++ --compl_pending;
++ }
++ if (compl_pending < 0 && compl_shown_match->cp_prev != NULL)
++ {
++ compl_shown_match = compl_shown_match->cp_prev;
++ ++compl_pending;
++ }
++ else
++ break;
++ }
++ found_end = FALSE;
++ }
++ if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0
++ && compl_leader != NULL
++ && !ins_compl_equal(compl_shown_match,
++ compl_leader, (int)STRLEN(compl_leader)))
++ ++todo;
++ else
++ // Remember a matching item.
++ found_compl = compl_shown_match;
++
++ // Stop at the end of the list when we found a usable match.
++ if (found_end)
++ {
++ if (found_compl != NULL)
++ {
++ compl_shown_match = found_compl;
++ break;
++ }
++ todo = 1; // use first usable match after wrapping around
++ }
++ }
++
++ // Insert the text of the new completion, or the compl_leader.
++ if (compl_no_insert && !started)
++ {
++ ins_bytes(compl_orig_text + ins_compl_len());
++ compl_used_match = FALSE;
++ }
++ else if (insert_match)
++ {
++ if (!compl_get_longest || compl_used_match)
++ ins_compl_insert(in_compl_func);
++ else
++ ins_bytes(compl_leader + ins_compl_len());
++ }
++ else
++ compl_used_match = FALSE;
++
++ if (!allow_get_expansion)
++ {
++ // may undisplay the popup menu first
++ ins_compl_upd_pum();
++
++ if (pum_enough_matches())
++ // Will display the popup menu, don't redraw yet to avoid flicker.
++ pum_call_update_screen();
++ else
++ // Not showing the popup menu yet, redraw to show the user what was
++ // inserted.
++ update_screen(0);
++
++ // display the updated popup menu
++ ins_compl_show_pum();
++ #ifdef FEAT_GUI
++ if (gui.in_use)
++ {
++ // Show the cursor after the match, not after the redrawn text.
++ setcursor();
++ out_flush_cursor(FALSE, FALSE);
++ }
++ #endif
++
++ // Delete old text to be replaced, since we're still searching and
++ // don't want to match ourselves!
++ ins_compl_delete();
++ }
++
++ // Enter will select a match when the match wasn't inserted and the popup
++ // menu is visible.
++ if (compl_no_insert && !started)
++ compl_enter_selects = TRUE;
++ else
++ compl_enter_selects = !insert_match && compl_match_array != NULL;
++
++ // Show the file name for the match (if any)
++ // Truncate the file name to avoid a wait for return.
++ if (compl_shown_match->cp_fname != NULL)
++ {
++ char *lead = _("match in file");
++ int space = sc_col - vim_strsize((char_u *)lead) - 2;
++ char_u *s;
++ char_u *e;
++
++ if (space > 0)
++ {
++ // We need the tail that fits. With double-byte encoding going
++ // back from the end is very slow, thus go from the start and keep
++ // the text that fits in "space" between "s" and "e".
++ for (s = e = compl_shown_match->cp_fname; *e != NUL; MB_PTR_ADV(e))
++ {
++ space -= ptr2cells(e);
++ while (space < 0)
++ {
++ space += ptr2cells(s);
++ MB_PTR_ADV(s);
++ }
++ }
++ vim_snprintf((char *)IObuff, IOSIZE, "%s %s%s", lead,
++ s > compl_shown_match->cp_fname ? "<" : "", s);
++ msg((char *)IObuff);
++ redraw_cmdline = FALSE; // don't overwrite!
++ }
++ }
++
++ return num_matches;
++ }
++
++ /*
++ * Call this while finding completions, to check whether the user has hit a key
++ * that should change the currently displayed completion, or exit completion
++ * mode. Also, when compl_pending is not zero, show a completion as soon as
++ * possible. -- webb
++ * "frequency" specifies out of how many calls we actually check.
++ * "in_compl_func" is TRUE when called from complete_check(), don't set
++ * compl_curr_match.
++ */
++ void
++ ins_compl_check_keys(int frequency, int in_compl_func)
++ {
++ static int count = 0;
++ int c;
++
++ // Don't check when reading keys from a script, :normal or feedkeys().
++ // That would break the test scripts. But do check for keys when called
++ // from complete_check().
++ if (!in_compl_func && (using_script() || ex_normal_busy))
++ return;
++
++ // Only do this at regular intervals
++ if (++count < frequency)
++ return;
++ count = 0;
++
++ // Check for a typed key. Do use mappings, otherwise vim_is_ctrl_x_key()
++ // can't do its work correctly.
++ c = vpeekc_any();
++ if (c != NUL)
++ {
++ if (vim_is_ctrl_x_key(c) && c != Ctrl_X && c != Ctrl_R)
++ {
++ c = safe_vgetc(); // Eat the character
++ compl_shows_dir = ins_compl_key2dir(c);
++ (void)ins_compl_next(FALSE, ins_compl_key2count(c),
++ c != K_UP && c != K_DOWN, in_compl_func);
++ }
++ else
++ {
++ // Need to get the character to have KeyTyped set. We'll put it
++ // back with vungetc() below. But skip K_IGNORE.
++ c = safe_vgetc();
++ if (c != K_IGNORE)
++ {
++ // Don't interrupt completion when the character wasn't typed,
++ // e.g., when doing @q to replay keys.
++ if (c != Ctrl_R && KeyTyped)
++ compl_interrupted = TRUE;
++
++ vungetc(c);
++ }
++ }
++ }
++ if (compl_pending != 0 && !got_int && !compl_no_insert)
++ {
++ int todo = compl_pending > 0 ? compl_pending : -compl_pending;
++
++ compl_pending = 0;
++ (void)ins_compl_next(FALSE, todo, TRUE, in_compl_func);
++ }
++ }
++
++ /*
++ * Decide the direction of Insert mode complete from the key typed.
++ * Returns BACKWARD or FORWARD.
++ */
++ static int
++ ins_compl_key2dir(int c)
++ {
++ if (c == Ctrl_P || c == Ctrl_L
++ || c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP || c == K_UP)
++ return BACKWARD;
++ return FORWARD;
++ }
++
++ /*
++ * Return TRUE for keys that are used for completion only when the popup menu
++ * is visible.
++ */
++ static int
++ ins_compl_pum_key(int c)
++ {
++ return pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP
++ || c == K_PAGEDOWN || c == K_KPAGEDOWN || c == K_S_DOWN
++ || c == K_UP || c == K_DOWN);
++ }
++
++ /*
++ * Decide the number of completions to move forward.
++ * Returns 1 for most keys, height of the popup menu for page-up/down keys.
++ */
++ static int
++ ins_compl_key2count(int c)
++ {
++ int h;
++
++ if (ins_compl_pum_key(c) && c != K_UP && c != K_DOWN)
++ {
++ h = pum_get_height();
++ if (h > 3)
++ h -= 2; // keep some context
++ return h;
++ }
++ return 1;
++ }
++
++ /*
++ * Return TRUE if completion with "c" should insert the match, FALSE if only
++ * to change the currently selected completion.
++ */
++ static int
++ ins_compl_use_match(int c)
++ {
++ switch (c)
++ {
++ case K_UP:
++ case K_DOWN:
++ case K_PAGEDOWN:
++ case K_KPAGEDOWN:
++ case K_S_DOWN:
++ case K_PAGEUP:
++ case K_KPAGEUP:
++ case K_S_UP:
++ return FALSE;
++ }
++ return TRUE;
++ }
++
++ /*
++ * Do Insert mode completion.
++ * Called when character "c" was typed, which has a meaning for completion.
++ * Returns OK if completion was done, FAIL if something failed (out of mem).
++ */
++ int
++ ins_complete(int c, int enable_pum)
++ {
++ char_u *line;
++ int startcol = 0; // column where searched text starts
++ colnr_T curs_col; // cursor column
++ int n;
++ int save_w_wrow;
++ int save_w_leftcol;
++ int insert_match;
++ int save_did_ai = did_ai;
++
++ compl_direction = ins_compl_key2dir(c);
++ insert_match = ins_compl_use_match(c);
++
++ if (!compl_started)
++ {
++ // First time we hit ^N or ^P (in a row, I mean)
++
++ did_ai = FALSE;
++ #ifdef FEAT_SMARTINDENT
++ did_si = FALSE;
++ can_si = FALSE;
++ can_si_back = FALSE;
++ #endif
++ if (stop_arrow() == FAIL)
++ return FAIL;
++
++ line = ml_get(curwin->w_cursor.lnum);
++ curs_col = curwin->w_cursor.col;
++ compl_pending = 0;
++
++ // If this same ctrl_x_mode has been interrupted use the text from
++ // "compl_startpos" to the cursor as a pattern to add a new word
++ // instead of expand the one before the cursor, in word-wise if
++ // "compl_startpos" is not in the same line as the cursor then fix it
++ // (the line has been split because it was longer than 'tw'). if SOL
++ // is set then skip the previous pattern, a word at the beginning of
++ // the line has been inserted, we'll look for that -- Acevedo.
++ if ((compl_cont_status & CONT_INTRPT) == CONT_INTRPT
++ && compl_cont_mode == ctrl_x_mode)
++ {
++ // it is a continued search
++ compl_cont_status &= ~CONT_INTRPT; // remove INTRPT
++ if (ctrl_x_mode == CTRL_X_NORMAL
++ || ctrl_x_mode == CTRL_X_PATH_PATTERNS
++ || ctrl_x_mode == CTRL_X_PATH_DEFINES)
++ {
++ if (compl_startpos.lnum != curwin->w_cursor.lnum)
++ {
++ // line (probably) wrapped, set compl_startpos to the
++ // first non_blank in the line, if it is not a wordchar
++ // include it to get a better pattern, but then we don't
++ // want the "\\<" prefix, check it bellow
++ compl_col = (colnr_T)getwhitecols(line);
++ compl_startpos.col = compl_col;
++ compl_startpos.lnum = curwin->w_cursor.lnum;
++ compl_cont_status &= ~CONT_SOL; // clear SOL if present
++ }
++ else
++ {
++ // S_IPOS was set when we inserted a word that was at the
++ // beginning of the line, which means that we'll go to SOL
++ // mode but first we need to redefine compl_startpos
++ if (compl_cont_status & CONT_S_IPOS)
++ {
++ compl_cont_status |= CONT_SOL;
++ compl_startpos.col = (colnr_T)(skipwhite(
++ line + compl_length
++ + compl_startpos.col) - line);
++ }
++ compl_col = compl_startpos.col;
++ }
++ compl_length = curwin->w_cursor.col - (int)compl_col;
++ // IObuff is used to add a "word from the next line" would we
++ // have enough space? just being paranoid
++ #define MIN_SPACE 75
++ if (compl_length > (IOSIZE - MIN_SPACE))
++ {
++ compl_cont_status &= ~CONT_SOL;
++ compl_length = (IOSIZE - MIN_SPACE);
++ compl_col = curwin->w_cursor.col - compl_length;
++ }
++ compl_cont_status |= CONT_ADDING | CONT_N_ADDS;
++ if (compl_length < 1)
++ compl_cont_status &= CONT_LOCAL;
++ }
++ else if (ctrl_x_mode_line_or_eval())
++ compl_cont_status = CONT_ADDING | CONT_N_ADDS;
++ else
++ compl_cont_status = 0;
++ }
++ else
++ compl_cont_status &= CONT_LOCAL;
++
++ if (!(compl_cont_status & CONT_ADDING)) // normal expansion
++ {
++ compl_cont_mode = ctrl_x_mode;
++ if (ctrl_x_mode != CTRL_X_NORMAL)
++ // Remove LOCAL if ctrl_x_mode != CTRL_X_NORMAL
++ compl_cont_status = 0;
++ compl_cont_status |= CONT_N_ADDS;
++ compl_startpos = curwin->w_cursor;
++ startcol = (int)curs_col;
++ compl_col = 0;
++ }
++
++ // Work out completion pattern and original text -- webb
++ if (ctrl_x_mode == CTRL_X_NORMAL || (ctrl_x_mode & CTRL_X_WANT_IDENT))
++ {
++ if ((compl_cont_status & CONT_SOL)
++ || ctrl_x_mode == CTRL_X_PATH_DEFINES)
++ {
++ if (!(compl_cont_status & CONT_ADDING))
++ {
++ while (--startcol >= 0 && vim_isIDc(line[startcol]))
++ ;
++ compl_col += ++startcol;
++ compl_length = curs_col - startcol;
++ }
++ if (p_ic)
++ compl_pattern = str_foldcase(line + compl_col,
++ compl_length, NULL, 0);
++ else
++ compl_pattern = vim_strnsave(line + compl_col,
++ compl_length);
++ if (compl_pattern == NULL)
++ return FAIL;
++ }
++ else if (compl_cont_status & CONT_ADDING)
++ {
++ char_u *prefix = (char_u *)"\\<";
++
++ // we need up to 2 extra chars for the prefix
++ compl_pattern = alloc(quote_meta(NULL, line + compl_col,
++ compl_length) + 2);
++ if (compl_pattern == NULL)
++ return FAIL;
++ if (!vim_iswordp(line + compl_col)
++ || (compl_col > 0
++ && (vim_iswordp(mb_prevptr(line, line + compl_col)))))
++ prefix = (char_u *)"";
++ STRCPY((char *)compl_pattern, prefix);
++ (void)quote_meta(compl_pattern + STRLEN(prefix),
++ line + compl_col, compl_length);
++ }
++ else if (--startcol < 0
++ || !vim_iswordp(mb_prevptr(line, line + startcol + 1)))
++ {
++ // Match any word of at least two chars
++ compl_pattern = vim_strsave((char_u *)"\\<\\k\\k");
++ if (compl_pattern == NULL)
++ return FAIL;
++ compl_col += curs_col;
++ compl_length = 0;
++ }
++ else
++ {
++ // Search the point of change class of multibyte character
++ // or not a word single byte character backward.
++ if (has_mbyte)
++ {
++ int base_class;
++ int head_off;
++
++ startcol -= (*mb_head_off)(line, line + startcol);
++ base_class = mb_get_class(line + startcol);
++ while (--startcol >= 0)
++ {
++ head_off = (*mb_head_off)(line, line + startcol);
++ if (base_class != mb_get_class(line + startcol
++ - head_off))
++ break;
++ startcol -= head_off;
++ }
++ }
++ else
++ while (--startcol >= 0 && vim_iswordc(line[startcol]))
++ ;
++ compl_col += ++startcol;
++ compl_length = (int)curs_col - startcol;
++ if (compl_length == 1)
++ {
++ // Only match word with at least two chars -- webb
++ // there's no need to call quote_meta,
++ // alloc(7) is enough -- Acevedo
++ compl_pattern = alloc(7);
++ if (compl_pattern == NULL)
++ return FAIL;
++ STRCPY((char *)compl_pattern, "\\<");
++ (void)quote_meta(compl_pattern + 2, line + compl_col, 1);
++ STRCAT((char *)compl_pattern, "\\k");
++ }
++ else
++ {
++ compl_pattern = alloc(quote_meta(NULL, line + compl_col,
++ compl_length) + 2);
++ if (compl_pattern == NULL)
++ return FAIL;
++ STRCPY((char *)compl_pattern, "\\<");
++ (void)quote_meta(compl_pattern + 2, line + compl_col,
++ compl_length);
++ }
++ }
++ }
++ else if (ctrl_x_mode_line_or_eval())
++ {
++ compl_col = (colnr_T)getwhitecols(line);
++ compl_length = (int)curs_col - (int)compl_col;
++ if (compl_length < 0) // cursor in indent: empty pattern
++ compl_length = 0;
++ if (p_ic)
++ compl_pattern = str_foldcase(line + compl_col, compl_length,
++ NULL, 0);
++ else
++ compl_pattern = vim_strnsave(line + compl_col, compl_length);
++ if (compl_pattern == NULL)
++ return FAIL;
++ }
++ else if (ctrl_x_mode == CTRL_X_FILES)
++ {
++ // Go back to just before the first filename character.
++ if (startcol > 0)
++ {
++ char_u *p = line + startcol;
++
++ MB_PTR_BACK(line, p);
++ while (p > line && vim_isfilec(PTR2CHAR(p)))
++ MB_PTR_BACK(line, p);
++ if (p == line && vim_isfilec(PTR2CHAR(p)))
++ startcol = 0;
++ else
++ startcol = (int)(p - line) + 1;
++ }
++
++ compl_col += startcol;
++ compl_length = (int)curs_col - startcol;
++ compl_pattern = addstar(line + compl_col, compl_length,
++ EXPAND_FILES);
++ if (compl_pattern == NULL)
++ return FAIL;
++ }
++ else if (ctrl_x_mode == CTRL_X_CMDLINE)
++ {
++ compl_pattern = vim_strnsave(line, curs_col);
++ if (compl_pattern == NULL)
++ return FAIL;
++ set_cmd_context(&compl_xp, compl_pattern,
++ (int)STRLEN(compl_pattern), curs_col, FALSE);
++ if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL
++ || compl_xp.xp_context == EXPAND_NOTHING)
++ // No completion possible, use an empty pattern to get a
++ // "pattern not found" message.
++ compl_col = curs_col;
++ else
++ compl_col = (int)(compl_xp.xp_pattern - compl_pattern);
++ compl_length = curs_col - compl_col;
++ }
++ else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI)
++ {
++ #ifdef FEAT_COMPL_FUNC
++ // Call user defined function 'completefunc' with "a:findstart"
++ // set to 1 to obtain the length of text to use for completion.
++ typval_T args[3];
++ int col;
++ char_u *funcname;
++ pos_T pos;
++ win_T *curwin_save;
++ buf_T *curbuf_save;
++ int save_State = State;
++
++ // Call 'completefunc' or 'omnifunc' and get pattern length as a
++ // string
++ funcname = ctrl_x_mode == CTRL_X_FUNCTION
++ ? curbuf->b_p_cfu : curbuf->b_p_ofu;
++ if (*funcname == NUL)
++ {
++ semsg(_(e_notset), ctrl_x_mode == CTRL_X_FUNCTION
++ ? "completefunc" : "omnifunc");
++ // restore did_ai, so that adding comment leader works
++ did_ai = save_did_ai;
++ return FAIL;
++ }
++
++ args[0].v_type = VAR_NUMBER;
++ args[0].vval.v_number = 1;
++ args[1].v_type = VAR_STRING;
++ args[1].vval.v_string = (char_u *)"";
++ args[2].v_type = VAR_UNKNOWN;
++ pos = curwin->w_cursor;
++ curwin_save = curwin;
++ curbuf_save = curbuf;
++ col = call_func_retnr(funcname, 2, args);
++
++ State = save_State;
++ if (curwin_save != curwin || curbuf_save != curbuf)
++ {
++ emsg(_(e_complwin));
++ return FAIL;
++ }
++ curwin->w_cursor = pos; // restore the cursor position
++ validate_cursor();
++ if (!EQUAL_POS(curwin->w_cursor, pos))
++ {
++ emsg(_(e_compldel));
++ return FAIL;
++ }
++
++ // Return value -2 means the user complete function wants to
++ // cancel the complete without an error.
++ // Return value -3 does the same as -2 and leaves CTRL-X mode.
++ if (col == -2)
++ return FAIL;
++ if (col == -3)
++ {
++ ctrl_x_mode = CTRL_X_NORMAL;
++ edit_submode = NULL;
++ if (!shortmess(SHM_COMPLETIONMENU))
++ msg_clr_cmdline();
++ return FAIL;
++ }
++
++ // Reset extended parameters of completion, when start new
++ // completion.
++ compl_opt_refresh_always = FALSE;
++ compl_opt_suppress_empty = FALSE;
++
++ if (col < 0)
++ col = curs_col;
++ compl_col = col;
++ if (compl_col > curs_col)
++ compl_col = curs_col;
++
++ // Setup variables for completion. Need to obtain "line" again,
++ // it may have become invalid.
++ line = ml_get(curwin->w_cursor.lnum);
++ compl_length = curs_col - compl_col;
++ compl_pattern = vim_strnsave(line + compl_col, compl_length);
++ if (compl_pattern == NULL)
++ #endif
++ return FAIL;
++ }
++ else if (ctrl_x_mode == CTRL_X_SPELL)
++ {
++ #ifdef FEAT_SPELL
++ if (spell_bad_len > 0)
++ compl_col = curs_col - spell_bad_len;
++ else
++ compl_col = spell_word_start(startcol);
++ if (compl_col >= (colnr_T)startcol)
++ {
++ compl_length = 0;
++ compl_col = curs_col;
++ }
++ else
++ {
++ spell_expand_check_cap(compl_col);
++ compl_length = (int)curs_col - compl_col;
++ }
++ // Need to obtain "line" again, it may have become invalid.
++ line = ml_get(curwin->w_cursor.lnum);
++ compl_pattern = vim_strnsave(line + compl_col, compl_length);
++ if (compl_pattern == NULL)
++ #endif
++ return FAIL;
++ }
++ else
++ {
++ internal_error("ins_complete()");
++ return FAIL;
++ }
++
++ if (compl_cont_status & CONT_ADDING)
++ {
++ edit_submode_pre = (char_u *)_(" Adding");
++ if (ctrl_x_mode_line_or_eval())
++ {
++ // Insert a new line, keep indentation but ignore 'comments'
++ #ifdef FEAT_COMMENTS
++ char_u *old = curbuf->b_p_com;
++
++ curbuf->b_p_com = (char_u *)"";
++ #endif
++ compl_startpos.lnum = curwin->w_cursor.lnum;
++ compl_startpos.col = compl_col;
++ ins_eol('\r');
++ #ifdef FEAT_COMMENTS
++ curbuf->b_p_com = old;
++ #endif
++ compl_length = 0;
++ compl_col = curwin->w_cursor.col;
++ }
++ }
++ else
++ {
++ edit_submode_pre = NULL;
++ compl_startpos.col = compl_col;
++ }
++
++ if (compl_cont_status & CONT_LOCAL)
++ edit_submode = (char_u *)_(ctrl_x_msgs[CTRL_X_LOCAL_MSG]);
++ else
++ edit_submode = (char_u *)_(CTRL_X_MSG(ctrl_x_mode));
++
++ // If any of the original typed text has been changed we need to fix
++ // the redo buffer.
++ ins_compl_fixRedoBufForLeader(NULL);
++
++ // Always add completion for the original text.
++ vim_free(compl_orig_text);
++ compl_orig_text = vim_strnsave(line + compl_col, compl_length);
++ if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
++ -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
++ {
++ VIM_CLEAR(compl_pattern);
++ VIM_CLEAR(compl_orig_text);
++ return FAIL;
++ }
++
++ // showmode might reset the internal line pointers, so it must
++ // be called before line = ml_get(), or when this address is no
++ // longer needed. -- Acevedo.
++ edit_submode_extra = (char_u *)_("-- Searching...");
++ edit_submode_highl = HLF_COUNT;
++ showmode();
++ edit_submode_extra = NULL;
++ out_flush();
++ }
++ else if (insert_match && stop_arrow() == FAIL)
++ return FAIL;
++
++ compl_shown_match = compl_curr_match;
++ compl_shows_dir = compl_direction;
++
++ // Find next match (and following matches).
++ save_w_wrow = curwin->w_wrow;
++ save_w_leftcol = curwin->w_leftcol;
++ n = ins_compl_next(TRUE, ins_compl_key2count(c), insert_match, FALSE);
++
++ // may undisplay the popup menu
++ ins_compl_upd_pum();
++
++ if (n > 1) // all matches have been found
++ compl_matches = n;
++ compl_curr_match = compl_shown_match;
++ compl_direction = compl_shows_dir;
++
++ // Eat the ESC that vgetc() returns after a CTRL-C to avoid leaving Insert
++ // mode.
++ if (got_int && !global_busy)
++ {
++ (void)vgetc();
++ got_int = FALSE;
++ }
++
++ // we found no match if the list has only the "compl_orig_text"-entry
++ if (compl_first_match == compl_first_match->cp_next)
++ {
++ edit_submode_extra = (compl_cont_status & CONT_ADDING)
++ && compl_length > 1
++ ? (char_u *)_(e_hitend) : (char_u *)_(e_patnotf);
++ edit_submode_highl = HLF_E;
++ // remove N_ADDS flag, so next ^X<> won't try to go to ADDING mode,
++ // because we couldn't expand anything at first place, but if we used
++ // ^P, ^N, ^X^I or ^X^D we might want to add-expand a single-char-word
++ // (such as M in M'exico) if not tried already. -- Acevedo
++ if ( compl_length > 1
++ || (compl_cont_status & CONT_ADDING)
++ || (ctrl_x_mode != CTRL_X_NORMAL
++ && ctrl_x_mode != CTRL_X_PATH_PATTERNS
++ && ctrl_x_mode != CTRL_X_PATH_DEFINES))
++ compl_cont_status &= ~CONT_N_ADDS;
++ }
++
++ if (compl_curr_match->cp_flags & CONT_S_IPOS)
++ compl_cont_status |= CONT_S_IPOS;
++ else
++ compl_cont_status &= ~CONT_S_IPOS;
++
++ if (edit_submode_extra == NULL)
++ {
++ if (compl_curr_match->cp_flags & ORIGINAL_TEXT)
++ {
++ edit_submode_extra = (char_u *)_("Back at original");
++ edit_submode_highl = HLF_W;
++ }
++ else if (compl_cont_status & CONT_S_IPOS)
++ {
++ edit_submode_extra = (char_u *)_("Word from other line");
++ edit_submode_highl = HLF_COUNT;
++ }
++ else if (compl_curr_match->cp_next == compl_curr_match->cp_prev)
++ {
++ edit_submode_extra = (char_u *)_("The only match");
++ edit_submode_highl = HLF_COUNT;
++ }
++ else
++ {
++ // Update completion sequence number when needed.
++ if (compl_curr_match->cp_number == -1)
++ {
++ int number = 0;
++ compl_T *match;
++
++ if (compl_direction == FORWARD)
++ {
++ // search backwards for the first valid (!= -1) number.
++ // This should normally succeed already at the first loop
++ // cycle, so it's fast!
++ for (match = compl_curr_match->cp_prev; match != NULL
++ && match != compl_first_match;
++ match = match->cp_prev)
++ if (match->cp_number != -1)
++ {
++ number = match->cp_number;
++ break;
++ }
++ if (match != NULL)
++ // go up and assign all numbers which are not assigned
++ // yet
++ for (match = match->cp_next;
++ match != NULL && match->cp_number == -1;
++ match = match->cp_next)
++ match->cp_number = ++number;
++ }
++ else // BACKWARD
++ {
++ // search forwards (upwards) for the first valid (!= -1)
++ // number. This should normally succeed already at the
++ // first loop cycle, so it's fast!
++ for (match = compl_curr_match->cp_next; match != NULL
++ && match != compl_first_match;
++ match = match->cp_next)
++ if (match->cp_number != -1)
++ {
++ number = match->cp_number;
++ break;
++ }
++ if (match != NULL)
++ // go down and assign all numbers which are not
++ // assigned yet
++ for (match = match->cp_prev; match
++ && match->cp_number == -1;
++ match = match->cp_prev)
++ match->cp_number = ++number;
++ }
++ }
++
++ // The match should always have a sequence number now, this is
++ // just a safety check.
++ if (compl_curr_match->cp_number != -1)
++ {
++ // Space for 10 text chars. + 2x10-digit no.s = 31.
++ // Translations may need more than twice that.
++ static char_u match_ref[81];
++
++ if (compl_matches > 0)
++ vim_snprintf((char *)match_ref, sizeof(match_ref),
++ _("match %d of %d"),
++ compl_curr_match->cp_number, compl_matches);
++ else
++ vim_snprintf((char *)match_ref, sizeof(match_ref),
++ _("match %d"),
++ compl_curr_match->cp_number);
++ edit_submode_extra = match_ref;
++ edit_submode_highl = HLF_R;
++ if (dollar_vcol >= 0)
++ curs_columns(FALSE);
++ }
++ }
++ }
++
++ // Show a message about what (completion) mode we're in.
++ if (!compl_opt_suppress_empty)
++ {
++ showmode();
++ if (!shortmess(SHM_COMPLETIONMENU))
++ {
++ if (edit_submode_extra != NULL)
++ {
++ if (!p_smd)
++ msg_attr((char *)edit_submode_extra,
++ edit_submode_highl < HLF_COUNT
++ ? HL_ATTR(edit_submode_highl) : 0);
++ }
++ else
++ msg_clr_cmdline(); // necessary for "noshowmode"
++ }
++ }
++
++ // Show the popup menu, unless we got interrupted.
++ if (enable_pum && !compl_interrupted)
++ show_pum(save_w_wrow, save_w_leftcol);
++
++ compl_was_interrupted = compl_interrupted;
++ compl_interrupted = FALSE;
++
++ return OK;
++ }
++
++ static void
++ show_pum(int prev_w_wrow, int prev_w_leftcol)
++ {
++ // RedrawingDisabled may be set when invoked through complete().
++ int n = RedrawingDisabled;
++
++ RedrawingDisabled = 0;
++
++ // If the cursor moved or the display scrolled we need to remove the pum
++ // first.
++ setcursor();
++ if (prev_w_wrow != curwin->w_wrow || prev_w_leftcol != curwin->w_leftcol)
++ ins_compl_del_pum();
++
++ ins_compl_show_pum();
++ setcursor();
++ RedrawingDisabled = n;
++ }
++
++ /*
++ * Looks in the first "len" chars. of "src" for search-metachars.
++ * If dest is not NULL the chars. are copied there quoting (with
++ * a backslash) the metachars, and dest would be NUL terminated.
++ * Returns the length (needed) of dest
++ */
++ static unsigned
++ quote_meta(char_u *dest, char_u *src, int len)
++ {
++ unsigned m = (unsigned)len + 1; // one extra for the NUL
++
++ for ( ; --len >= 0; src++)
++ {
++ switch (*src)
++ {
++ case '.':
++ case '*':
++ case '[':
++ if (ctrl_x_mode == CTRL_X_DICTIONARY
++ || ctrl_x_mode == CTRL_X_THESAURUS)
++ break;
++ // FALLTHROUGH
++ case '~':
++ if (!p_magic) // quote these only if magic is set
++ break;
++ // FALLTHROUGH
++ case '\\':
++ if (ctrl_x_mode == CTRL_X_DICTIONARY
++ || ctrl_x_mode == CTRL_X_THESAURUS)
++ break;
++ // FALLTHROUGH
++ case '^': // currently it's not needed.
++ case '$':
++ m++;
++ if (dest != NULL)
++ *dest++ = '\\';
++ break;
++ }
++ if (dest != NULL)
++ *dest++ = *src;
++ // Copy remaining bytes of a multibyte character.
++ if (has_mbyte)
++ {
++ int i, mb_len;
++
++ mb_len = (*mb_ptr2len)(src) - 1;
++ if (mb_len > 0 && len >= mb_len)
++ for (i = 0; i < mb_len; ++i)
++ {
++ --len;
++ ++src;
++ if (dest != NULL)
++ *dest++ = *src;
++ }
++ }
++ }
++ if (dest != NULL)
++ *dest = NUL;
++
++ return m;
++ }
++
++ # if defined(EXITFREE) || defined(PROTO)
++ void
++ free_insexpand_stuff(void)
++ {
++ VIM_CLEAR(compl_orig_text);
++ }
++ # endif
++
++ # ifdef FEAT_SPELL
++ /*
++ * Called when starting CTRL_X_SPELL mode: Move backwards to a previous badly
++ * spelled word, if there is one.
++ */
++ static void
++ spell_back_to_badword(void)
++ {
++ pos_T tpos = curwin->w_cursor;
++
++ spell_bad_len = spell_move_to(curwin, BACKWARD, TRUE, TRUE, NULL);
++ if (curwin->w_cursor.col != tpos.col)
++ start_arrow(&tpos);
++ }
++ # endif
++
++ #endif // FEAT_INS_EXPAND
+*** ../vim-8.1.1075/src/misc2.c 2019-03-22 12:03:26.583533911 +0100
+--- src/misc2.c 2019-03-30 12:54:54.305407871 +0100
+***************
+*** 1130,1135 ****
+--- 1130,1136 ----
+ free_search_patterns();
+ free_old_sub();
+ free_last_insert();
++ free_insexpand_stuff();
+ free_prev_shellcmd();
+ free_regexp_stuff();
+ free_tag_stuff();
+*** ../vim-8.1.1075/src/proto.h 2019-02-19 21:34:01.987747438 +0100
+--- src/proto.h 2019-03-30 12:54:54.305407871 +0100
+***************
+*** 89,94 ****
+--- 89,97 ----
+ # include "hardcopy.pro"
+ # include "hashtab.pro"
+ # include "indent.pro"
++ # ifdef FEAT_INS_EXPAND
++ # include "insexpand.pro"
++ # endif
+ # include "json.pro"
+ # include "list.pro"
+ # include "blob.pro"
+*** ../vim-8.1.1075/src/proto/edit.pro 2019-03-29 12:19:34.953348924 +0100
+--- src/proto/edit.pro 2019-03-30 12:56:24.004687230 +0100
+***************
+*** 1,5 ****
+--- 1,7 ----
+ /* edit.c */
+ int edit(int cmdchar, int startln, long count);
++ int ins_need_undo_get(void);
++ void ins_redraw(int ready);
+ void edit_putchar(int c, int highlight);
+ char_u *prompt_text(void);
+ int prompt_curpos_editable(void);
+***************
+*** 8,30 ****
+ void change_indent(int type, int amount, int round, int replaced, int call_changed_bytes);
+ void truncate_spaces(char_u *line);
+ void backspace_until_column(int col);
+- int ctrl_x_mode_not_default(void);
+- int ctrl_x_mode_not_defined_yet(void);
+- int vim_is_ctrl_x_key(int c);
+- int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname, int dir, int flags);
+- void completeopt_was_set(void);
+- void set_completion(colnr_T startcol, list_T *list);
+- void ins_compl_show_pum(void);
+- char_u *find_word_start(char_u *ptr);
+- char_u *find_word_end(char_u *ptr);
+- int ins_compl_active(void);
+- void get_complete_info(list_T *what_list, dict_T *retdict);
+- int ins_compl_add_tv(typval_T *tv, int dir);
+- void ins_compl_check_keys(int frequency, int in_compl_func);
+ int get_literal(void);
+ void insertchar(int c, int flags, int second_indent);
+ void auto_format(int trailblank, int prev_line);
+ int comp_textwidth(int ff);
+ int stop_arrow(void);
+ void set_last_insert(int c);
+ void free_last_insert(void);
+--- 10,20 ----
+ void change_indent(int type, int amount, int round, int replaced, int call_changed_bytes);
+ void truncate_spaces(char_u *line);
+ void backspace_until_column(int col);
+ int get_literal(void);
+ void insertchar(int c, int flags, int second_indent);
+ void auto_format(int trailblank, int prev_line);
+ int comp_textwidth(int ff);
++ void start_arrow(pos_T *end_insert_pos);
+ int stop_arrow(void);
+ void set_last_insert(int c);
+ void free_last_insert(void);
+***************
+*** 43,48 ****
+--- 33,41 ----
+ int bracketed_paste(paste_mode_T mode, int drop, garray_T *gap);
+ void ins_scroll(void);
+ void ins_horscroll(void);
++ int ins_eol(int c);
+ int ins_copychar(linenr_T lnum);
+ colnr_T get_nolist_virtcol(void);
++ int can_cindent_get(void);
++ int ins_apply_autocmds(event_T event);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1075/src/proto/insexpand.pro 2019-03-30 13:32:12.906308579 +0100
+--- src/proto/insexpand.pro 2019-03-30 13:49:17.191991200 +0100
+***************
+*** 0 ****
+--- 1,50 ----
++ /* insexpand.c */
++ void ins_ctrl_x(void);
++ int ctrl_x_mode_none(void);
++ int ctrl_x_mode_normal(void);
++ int ctrl_x_mode_scroll(void);
++ int ctrl_x_mode_whole_line(void);
++ int ctrl_x_mode_files(void);
++ int ctrl_x_mode_tags(void);
++ int ctrl_x_mode_path_patterns(void);
++ int ctrl_x_mode_path_defines(void);
++ int ctrl_x_mode_dictionary(void);
++ int ctrl_x_mode_thesaurus(void);
++ int ctrl_x_mode_cmdline(void);
++ int ctrl_x_mode_function(void);
++ int ctrl_x_mode_omni(void);
++ int ctrl_x_mode_spell(void);
++ int ctrl_x_mode_line_or_eval(void);
++ int ctrl_x_mode_not_default(void);
++ int ctrl_x_mode_not_defined_yet(void);
++ int has_compl_option(int dict_opt);
++ int vim_is_ctrl_x_key(int c);
++ int ins_compl_accept_char(int c);
++ int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname, int dir, int flags);
++ int ins_compl_has_shown_match(void);
++ int ins_compl_long_shown_match(void);
++ void completeopt_was_set(void);
++ void set_completion(colnr_T startcol, list_T *list);
++ int pum_wanted(void);
++ void ins_compl_show_pum(void);
++ char_u *find_word_start(char_u *ptr);
++ char_u *find_word_end(char_u *ptr);
++ void ins_compl_clear(void);
++ int ins_compl_active(void);
++ void get_complete_info(list_T *what_list, dict_T *retdict);
++ int ins_compl_used_match(void);
++ void ins_compl_init_get_longest(void);
++ int ins_compl_interrupted(void);
++ int ins_compl_enter_selects(void);
++ colnr_T ins_compl_col(void);
++ int ins_compl_bs(void);
++ void ins_compl_addleader(int c);
++ void ins_compl_addfrommatch(void);
++ int ins_compl_prep(int c);
++ int ins_compl_add_tv(typval_T *tv, int dir);
++ void ins_compl_delete(void);
++ void ins_compl_insert(int in_compl_func);
++ void ins_compl_check_keys(int frequency, int in_compl_func);
++ int ins_complete(int c, int enable_pum);
++ void free_insexpand_stuff(void);
++ /* vim: set ft=c : */
+*** ../vim-8.1.1075/src/search.c 2019-03-03 14:42:04.782109771 +0100
+--- src/search.c 2019-03-30 12:54:54.305407871 +0100
+***************
+*** 5479,5485 ****
+ #ifdef FEAT_INS_EXPAND
+ if (action == ACTION_EXPAND)
+ ins_compl_check_keys(30, FALSE);
+! if (got_int || compl_interrupted)
+ #else
+ if (got_int)
+ #endif
+--- 5479,5485 ----
+ #ifdef FEAT_INS_EXPAND
+ if (action == ACTION_EXPAND)
+ ins_compl_check_keys(30, FALSE);
+! if (got_int || ins_compl_interrupted())
+ #else
+ if (got_int)
+ #endif
+***************
+*** 5550,5556 ****
+ )
+ {
+ #ifdef FEAT_INS_EXPAND
+! if (got_int || compl_interrupted)
+ #else
+ if (got_int)
+ #endif
+--- 5550,5556 ----
+ )
+ {
+ #ifdef FEAT_INS_EXPAND
+! if (got_int || ins_compl_interrupted())
+ #else
+ if (got_int)
+ #endif
+*** ../vim-8.1.1075/src/spell.c 2019-01-26 17:28:22.232599086 +0100
+--- src/spell.c 2019-03-30 13:33:40.365785214 +0100
+***************
+*** 8473,8479 ****
+ arridx[0] = 0;
+ curi[0] = 1;
+ while (depth >= 0 && !got_int
+! && (pat == NULL || !compl_interrupted))
+ {
+ if (curi[depth] > byts[arridx[depth]])
+ {
+--- 8473,8479 ----
+ arridx[0] = 0;
+ curi[0] = 1;
+ while (depth >= 0 && !got_int
+! && (pat == NULL || !ins_compl_interrupted()))
+ {
+ if (curi[depth] > byts[arridx[depth]])
+ {
+*** ../vim-8.1.1075/src/structs.h 2019-03-04 11:40:06.274241644 +0100
+--- src/structs.h 2019-03-30 13:47:56.176499590 +0100
+***************
+*** 1191,1226 ****
+ # ifdef PROTO
+ typedef long varnumber_T;
+ typedef unsigned long uvarnumber_T;
+! #define VARNUM_MIN LONG_MIN
+! #define VARNUM_MAX LONG_MAX
+! #define UVARNUM_MAX ULONG_MAX
+ # else
+ typedef __int64 varnumber_T;
+ typedef unsigned __int64 uvarnumber_T;
+! #define VARNUM_MIN _I64_MIN
+! #define VARNUM_MAX _I64_MAX
+! #define UVARNUM_MAX _UI64_MAX
+ # endif
+ # elif defined(HAVE_STDINT_H)
+ typedef int64_t varnumber_T;
+ typedef uint64_t uvarnumber_T;
+! #define VARNUM_MIN INT64_MIN
+! #define VARNUM_MAX INT64_MAX
+! #define UVARNUM_MAX UINT64_MAX
+ # else
+ typedef long varnumber_T;
+ typedef unsigned long uvarnumber_T;
+! #define VARNUM_MIN LONG_MIN
+! #define VARNUM_MAX LONG_MAX
+! #define UVARNUM_MAX ULONG_MAX
+ # endif
+ #else
+ /* Use 32-bit Number. */
+ typedef int varnumber_T;
+ typedef unsigned int uvarnumber_T;
+! #define VARNUM_MIN INT_MIN
+! #define VARNUM_MAX INT_MAX
+! #define UVARNUM_MAX UINT_MAX
+ #endif
+
+ typedef double float_T;
+--- 1191,1226 ----
+ # ifdef PROTO
+ typedef long varnumber_T;
+ typedef unsigned long uvarnumber_T;
+! # define VARNUM_MIN LONG_MIN
+! # define VARNUM_MAX LONG_MAX
+! # define UVARNUM_MAX ULONG_MAX
+ # else
+ typedef __int64 varnumber_T;
+ typedef unsigned __int64 uvarnumber_T;
+! # define VARNUM_MIN _I64_MIN
+! # define VARNUM_MAX _I64_MAX
+! # define UVARNUM_MAX _UI64_MAX
+ # endif
+ # elif defined(HAVE_STDINT_H)
+ typedef int64_t varnumber_T;
+ typedef uint64_t uvarnumber_T;
+! # define VARNUM_MIN INT64_MIN
+! # define VARNUM_MAX INT64_MAX
+! # define UVARNUM_MAX UINT64_MAX
+ # else
+ typedef long varnumber_T;
+ typedef unsigned long uvarnumber_T;
+! # define VARNUM_MIN LONG_MIN
+! # define VARNUM_MAX LONG_MAX
+! # define UVARNUM_MAX ULONG_MAX
+ # endif
+ #else
+ /* Use 32-bit Number. */
+ typedef int varnumber_T;
+ typedef unsigned int uvarnumber_T;
+! # define VARNUM_MIN INT_MIN
+! # define VARNUM_MAX INT_MAX
+! # define UVARNUM_MAX UINT_MAX
+ #endif
+
+ typedef double float_T;
+***************
+*** 3340,3355 ****
+ void *tn_search_ctx;
+ } tagname_T;
+
+- /*
+- * Array indexes used for cptext argument of ins_compl_add().
+- */
+- #define CPT_ABBR 0 /* "abbr" */
+- #define CPT_MENU 1 /* "menu" */
+- #define CPT_KIND 2 /* "kind" */
+- #define CPT_INFO 3 /* "info" */
+- #define CPT_USER_DATA 4 /* "user data" */
+- #define CPT_COUNT 5 /* Number of entries */
+-
+ typedef struct {
+ UINT32_T total[2];
+ UINT32_T state[8];
+--- 3340,3345 ----
+*** ../vim-8.1.1075/src/tag.c 2019-03-22 17:03:01.779689390 +0100
+--- src/tag.c 2019-03-30 12:54:54.309407840 +0100
+***************
+*** 1591,1597 ****
+ #ifdef FEAT_INS_EXPAND
+ if ((flags & TAG_INS_COMP)) /* Double brackets for gcc */
+ ins_compl_check_keys(30, FALSE);
+! if (got_int || compl_interrupted)
+ #else
+ if (got_int)
+ #endif
+--- 1591,1597 ----
+ #ifdef FEAT_INS_EXPAND
+ if ((flags & TAG_INS_COMP)) /* Double brackets for gcc */
+ ins_compl_check_keys(30, FALSE);
+! if (got_int || ins_compl_interrupted())
+ #else
+ if (got_int)
+ #endif
+*** ../vim-8.1.1075/src/version.c 2019-03-30 12:51:18.626808012 +0100
+--- src/version.c 2019-03-30 13:00:27.254840750 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1076,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+154. You fondle your 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.1077 b/data/vim/patches/8.1.1077
new file mode 100644
index 000000000..3e625862c
--- /dev/null
+++ b/data/vim/patches/8.1.1077
@@ -0,0 +1,141 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1077
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1077
+Problem: reg_executing() is reset by calling input().
+Solution: Implement a more generic way to save and restore reg_executing.
+ (Ozaki Kiichi, closes #4192)
+Files: src/evalfunc.c, src/ex_docmd.c, src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.1076/src/evalfunc.c 2019-03-30 13:53:26.170425120 +0100
+--- src/evalfunc.c 2019-03-30 14:20:39.794888514 +0100
+***************
+*** 4848,4854 ****
+ {
+ varnumber_T n;
+ int error = FALSE;
+- int save_reg_executing = reg_executing;
+
+ #ifdef MESSAGE_QUEUE
+ // vpeekc() used to check for messages, but that caused problems, invoking
+--- 4848,4853 ----
+***************
+*** 4883,4889 ****
+ }
+ --no_mapping;
+ --allow_keys;
+- reg_executing = save_reg_executing;
+
+ set_vim_var_nr(VV_MOUSE_WIN, 0);
+ set_vim_var_nr(VV_MOUSE_WINID, 0);
+--- 4882,4887 ----
+*** ../vim-8.1.1076/src/ex_docmd.c 2019-03-04 11:40:06.274241644 +0100
+--- src/ex_docmd.c 2019-03-30 14:20:39.794888514 +0100
+***************
+*** 1699,1704 ****
+--- 1699,1705 ----
+ exarg_T ea; /* Ex command arguments */
+ int save_msg_scroll = msg_scroll;
+ cmdmod_T save_cmdmod;
++ int save_reg_executing = reg_executing;
+ int ni; /* set when Not Implemented */
+ char_u *cmd;
+
+***************
+*** 2579,2584 ****
+--- 2580,2586 ----
+
+ free_cmdmod();
+ cmdmod = save_cmdmod;
++ reg_executing = save_reg_executing;
+
+ if (ea.save_msg_silent != -1)
+ {
+*** ../vim-8.1.1076/src/testdir/test_functions.vim 2019-03-05 12:24:04.795965374 +0100
+--- src/testdir/test_functions.vim 2019-03-30 14:20:39.794888514 +0100
+***************
+*** 1150,1169 ****
+ " getchar() command saves and restores reg_executing
+ map W :call TestFunc()<CR>
+ let @q = "W"
+ func TestFunc() abort
+! let g:reg1 = reg_executing()
+ let g:typed = getchar(0)
+! let g:reg2 = reg_executing()
+ endfunc
+ call feedkeys("@qy", 'xt')
+ call assert_equal(char2nr("y"), g:typed)
+! call assert_equal('q', g:reg1)
+! call assert_equal('q', g:reg2)
+ delfunc TestFunc
+ unmap W
+ unlet g:typed
+! unlet g:reg1
+! unlet g:reg2
+
+ bwipe!
+ delfunc s:save_reg_stat
+--- 1150,1187 ----
+ " getchar() command saves and restores reg_executing
+ map W :call TestFunc()<CR>
+ let @q = "W"
++ let g:typed = ''
++ let g:regs = []
+ func TestFunc() abort
+! let g:regs += [reg_executing()]
+ let g:typed = getchar(0)
+! let g:regs += [reg_executing()]
+ endfunc
+ call feedkeys("@qy", 'xt')
+ call assert_equal(char2nr("y"), g:typed)
+! call assert_equal(['q', 'q'], g:regs)
+ delfunc TestFunc
+ unmap W
+ unlet g:typed
+! unlet g:regs
+!
+! " input() command saves and restores reg_executing
+! map W :call TestFunc()<CR>
+! let @q = "W"
+! let g:typed = ''
+! let g:regs = []
+! func TestFunc() abort
+! let g:regs += [reg_executing()]
+! let g:typed = input('?')
+! let g:regs += [reg_executing()]
+! endfunc
+! call feedkeys("@qy\<CR>", 'xt')
+! call assert_equal("y", g:typed)
+! call assert_equal(['q', 'q'], g:regs)
+! delfunc TestFunc
+! unmap W
+! unlet g:typed
+! unlet g:regs
+
+ bwipe!
+ delfunc s:save_reg_stat
+*** ../vim-8.1.1076/src/version.c 2019-03-30 13:53:26.174425093 +0100
+--- src/version.c 2019-03-30 14:22:17.738221749 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1077,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+155. You forget to eat because you're too busy surfing the net.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1078 b/data/vim/patches/8.1.1078
new file mode 100644
index 000000000..3390ef63f
--- /dev/null
+++ b/data/vim/patches/8.1.1078
@@ -0,0 +1,134 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1078
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1078
+Problem: When 'listchars' is set a composing char on a space is wrong.
+Solution: Separate handling a non-breaking space and a space. (Yasuhiro
+ Matsumoto, closes #4046)
+Files: src/screen.c, src/testdir/test_listchars.vim
+
+
+*** ../vim-8.1.1077/src/screen.c 2019-03-29 18:29:28.448854292 +0100
+--- src/screen.c 2019-03-30 15:28:43.077813100 +0100
+***************
+*** 4808,4837 ****
+ }
+ #endif
+
+! /* 'list': change char 160 to lcs_nbsp and space to lcs_space.
+! */
+! if (wp->w_p_list
+! && (((c == 160
+! || (mb_utf8 && (mb_c == 160 || mb_c == 0x202f)))
+! && lcs_nbsp)
+! || (c == ' ' && lcs_space && ptr - line <= trailcol)))
+ {
+! c = (c == ' ') ? lcs_space : lcs_nbsp;
+! if (area_attr == 0 && search_attr == 0)
+ {
+! n_attr = 1;
+! extra_attr = HL_ATTR(HLF_8);
+! saved_attr2 = char_attr; /* save current attr */
+ }
+! mb_c = c;
+! if (enc_utf8 && utf_char2len(c) > 1)
+ {
+! mb_utf8 = TRUE;
+! u8cc[0] = 0;
+! c = 0xc0;
+ }
+- else
+- mb_utf8 = FALSE;
+ }
+
+ if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
+--- 4808,4841 ----
+ }
+ #endif
+
+! // 'list': change char 160 to lcs_nbsp and space to lcs_space.
+! if (wp->w_p_list)
+ {
+! if ((c == 160
+! || (mb_utf8 && (mb_c == 160 || mb_c == 0x202f)))
+! && lcs_nbsp)
+ {
+! c = lcs_nbsp;
+! mb_c = c;
+! if (enc_utf8 && utf_char2len(c) > 1)
+! {
+! mb_utf8 = TRUE;
+! u8cc[0] = 0;
+! c = 0xc0;
+! }
+! else
+! mb_utf8 = FALSE;
+ }
+! else if (c == ' ' && lcs_space && ptr - line <= trailcol)
+ {
+! c = lcs_space;
+! if (mb_utf8 == FALSE && area_attr == 0 && search_attr == 0)
+! {
+! n_attr = 1;
+! extra_attr = HL_ATTR(HLF_8);
+! saved_attr2 = char_attr; // save current attr
+! }
+ }
+ }
+
+ if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
+*** ../vim-8.1.1077/src/testdir/test_listchars.vim 2019-01-31 21:57:15.517462657 +0100
+--- src/testdir/test_listchars.vim 2019-03-30 15:23:31.463867726 +0100
+***************
+*** 113,115 ****
+--- 113,138 ----
+ enew!
+ set listchars& ff&
+ endfunc
++
++ func Test_listchars_composing()
++ enew!
++ let oldencoding=&encoding
++ set encoding=utf-8
++ set ff=unix
++ set list
++
++ set listchars=eol:$,space:_
++ call append(0, [
++ \ " \u3099 \u309A"
++ \ ])
++ let expected = [
++ \ "_ \u3099^I \u309A$"
++ \ ]
++ redraw!
++ call cursor(1, 1)
++ let got = ScreenLinesUtf8(1, virtcol('$'))
++ bw!
++ call assert_equal(expected, got)
++ let &encoding=oldencoding
++ set listchars& ff&
++ endfunction
+*** ../vim-8.1.1077/src/version.c 2019-03-30 14:26:15.268619122 +0100
+--- src/version.c 2019-03-30 15:34:33.791529846 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1078,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+158. You get a tuner card so you can watch TV while surfing.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1079 b/data/vim/patches/8.1.1079
new file mode 100644
index 000000000..b9e803184
--- /dev/null
+++ b/data/vim/patches/8.1.1079
@@ -0,0 +1,116 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1079
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1079
+Problem: No need for a separate ScreenLinesUtf8() test function.
+Solution: Get the composing characters with ScreenLines().
+Files: src/testdir/view_util.vim, src/testdir/test_listchars.vim,
+ src/testdir/test_utf8.vim
+
+
+*** ../vim-8.1.1078/src/testdir/view_util.vim 2019-03-29 14:16:34.142861770 +0100
+--- src/testdir/view_util.vim 2019-03-30 15:42:00.064646502 +0100
+***************
+*** 5,33 ****
+ finish
+ endif
+
+- " Get text on the screen, without composing characters.
+- " ScreenLines(lnum, width) or
+- " ScreenLines([start, end], width)
+- function! ScreenLines(lnum, width) abort
+- redraw!
+- if type(a:lnum) == v:t_list
+- let start = a:lnum[0]
+- let end = a:lnum[1]
+- else
+- let start = a:lnum
+- let end = a:lnum
+- endif
+- let lines = []
+- for l in range(start, end)
+- let lines += [join(map(range(1, a:width), 'nr2char(screenchar(l, v:val))'), '')]
+- endfor
+- return lines
+- endfunction
+-
+ " Get text on the screen, including composing characters.
+ " ScreenLines(lnum, width) or
+ " ScreenLines([start, end], width)
+! function! ScreenLinesUtf8(lnum, width) abort
+ redraw!
+ if type(a:lnum) == v:t_list
+ let start = a:lnum[0]
+--- 5,14 ----
+ finish
+ endif
+
+ " Get text on the screen, including composing characters.
+ " ScreenLines(lnum, width) or
+ " ScreenLines([start, end], width)
+! function! ScreenLines(lnum, width) abort
+ redraw!
+ if type(a:lnum) == v:t_list
+ let start = a:lnum[0]
+*** ../vim-8.1.1078/src/testdir/test_listchars.vim 2019-03-30 15:34:42.715472004 +0100
+--- src/testdir/test_listchars.vim 2019-03-30 15:41:24.208877625 +0100
+***************
+*** 130,136 ****
+ \ ]
+ redraw!
+ call cursor(1, 1)
+! let got = ScreenLinesUtf8(1, virtcol('$'))
+ bw!
+ call assert_equal(expected, got)
+ let &encoding=oldencoding
+--- 130,136 ----
+ \ ]
+ redraw!
+ call cursor(1, 1)
+! let got = ScreenLines(1, virtcol('$'))
+ bw!
+ call assert_equal(expected, got)
+ let &encoding=oldencoding
+*** ../vim-8.1.1078/src/testdir/test_utf8.vim 2019-03-29 14:16:34.142861770 +0100
+--- src/testdir/test_utf8.vim 2019-03-30 15:41:40.588772034 +0100
+***************
+*** 91,97 ****
+ call assert_equal("", screenstring(1, 4))
+ call assert_equal("\u3046\u3099", screenstring(1, 5))
+
+! call assert_equal([text . ' '], ScreenLinesUtf8(1, 8))
+
+ bwipe!
+ endfunc
+--- 91,97 ----
+ call assert_equal("", screenstring(1, 4))
+ call assert_equal("\u3046\u3099", screenstring(1, 5))
+
+! call assert_equal([text . ' '], ScreenLines(1, 8))
+
+ bwipe!
+ endfunc
+*** ../vim-8.1.1078/src/version.c 2019-03-30 15:34:42.715472004 +0100
+--- src/version.c 2019-03-30 15:40:47.517114213 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1079,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+159. You get excited whenever discussing your hard drive.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1080 b/data/vim/patches/8.1.1080
new file mode 100644
index 000000000..48a5be57d
--- /dev/null
+++ b/data/vim/patches/8.1.1080
@@ -0,0 +1,74 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.10
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1080
+Problem: When a screendump test fails, moving the file is a hassle.
+Solution: Instead of appending ".failed" to the file name, keep the same
+ file name but put the screendump in the "failed" directory.
+ Then the file name only needs to be typed once when moving a
+ screendump.
+Files: src/testdir/screendump.vim
+
+
+*** ../vim-8.1.1079/src/testdir/screendump.vim 2019-02-21 17:05:54.082970901 +0100
+--- src/testdir/screendump.vim 2019-03-30 15:50:25.749604609 +0100
+***************
+*** 103,109 ****
+ " Returns non-zero when verification fails.
+ func VerifyScreenDump(buf, filename, options, ...)
+ let reference = 'dumps/' . a:filename . '.dump'
+! let testfile = a:filename . '.dump.failed'
+
+ let i = 0
+ while 1
+--- 103,115 ----
+ " Returns non-zero when verification fails.
+ func VerifyScreenDump(buf, filename, options, ...)
+ let reference = 'dumps/' . a:filename . '.dump'
+! let testfile = 'failed/' . a:filename . '.dump'
+!
+! let did_mkdir = 0
+! if !isdirectory('failed')
+! let did_mkdir = 1
+! call mkdir('failed')
+! endif
+
+ let i = 0
+ while 1
+***************
+*** 115,120 ****
+--- 121,129 ----
+ let refdump = readfile(reference)
+ if refdump == testdump
+ call delete(testfile)
++ if did_mkdir
++ call delete('failed', 'd')
++ endif
+ break
+ endif
+ if i == 100
+*** ../vim-8.1.1079/src/version.c 2019-03-30 15:44:14.027783548 +0100
+--- src/version.c 2019-03-30 15:52:54.016715147 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1080,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+160. You get in the elevator and double-click the button for the floor
+ you want.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1081 b/data/vim/patches/8.1.1081
new file mode 100644
index 000000000..9b833db8c
--- /dev/null
+++ b/data/vim/patches/8.1.1081
@@ -0,0 +1,1264 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1081
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1081
+Problem: MS-Windows: cannot use fonts whose name cannot be represented in
+ the current code page.
+Solution: Use wide font functions. (Ken Takata, closes #4000)
+Files: src/gui_w32.c, src/os_mswin.c, src/proto/gui_w32.pro,
+ src/proto/os_mswin.pro
+
+
+*** ../vim-8.1.1080/src/gui_w32.c 2019-03-28 22:43:12.103997449 +0100
+--- src/gui_w32.c 2019-03-30 16:20:37.994106945 +0100
+***************
+*** 253,259 ****
+ typedef int HBRUSH;
+ typedef int HDROP;
+ typedef int INT;
+! typedef int LOGFONT[];
+ typedef int LPARAM;
+ typedef int LPCREATESTRUCT;
+ typedef int LPCSTR;
+--- 253,259 ----
+ typedef int HBRUSH;
+ typedef int HDROP;
+ typedef int INT;
+! typedef int LOGFONTW[];
+ typedef int LPARAM;
+ typedef int LPCREATESTRUCT;
+ typedef int LPCSTR;
+***************
+*** 501,515 ****
+ /*
+ * For control IME.
+ *
+! * These LOGFONT used for IME.
+ */
+ #if defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)
+! /* holds LOGFONT for 'guifontwide' if available, otherwise 'guifont' */
+! static LOGFONT norm_logfont;
+ #endif
+ #ifdef FEAT_MBYTE_IME
+! /* holds LOGFONT for 'guifont' always. */
+! static LOGFONT sub_logfont;
+ #endif
+
+ #ifdef FEAT_MBYTE_IME
+--- 501,515 ----
+ /*
+ * For control IME.
+ *
+! * These LOGFONTW used for IME.
+ */
+ #if defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)
+! /* holds LOGFONTW for 'guifontwide' if available, otherwise 'guifont' */
+! static LOGFONTW norm_logfont;
+ #endif
+ #ifdef FEAT_MBYTE_IME
+! /* holds LOGFONTW for 'guifont' always. */
+! static LOGFONTW sub_logfont;
+ #endif
+
+ #ifdef FEAT_MBYTE_IME
+***************
+*** 1520,1531 ****
+ }
+
+ static GuiFont
+! get_font_handle(LOGFONT *lf)
+ {
+ HFONT font = NULL;
+
+ /* Load the font */
+! font = CreateFontIndirect(lf);
+
+ if (font == NULL)
+ return NOFONT;
+--- 1520,1531 ----
+ }
+
+ static GuiFont
+! get_font_handle(LOGFONTW *lf)
+ {
+ HFONT font = NULL;
+
+ /* Load the font */
+! font = CreateFontIndirectW(lf);
+
+ if (font == NULL)
+ return NOFONT;
+***************
+*** 1556,1562 ****
+ char_u *name,
+ int giveErrorIfMissing)
+ {
+! LOGFONT lf;
+ GuiFont font = NOFONT;
+
+ if (get_logfont(&lf, name, NULL, giveErrorIfMissing) == OK)
+--- 1556,1562 ----
+ char_u *name,
+ int giveErrorIfMissing)
+ {
+! LOGFONTW lf;
+ GuiFont font = NOFONT;
+
+ if (get_logfont(&lf, name, NULL, giveErrorIfMissing) == OK)
+***************
+*** 3201,3223 ****
+ }
+
+ static char_u *
+! logfont2name(LOGFONT lf)
+ {
+ char *p;
+ char *res;
+ char *charset_name;
+ char *quality_name;
+! char *font_name = lf.lfFaceName;
+
+ charset_name = charset_id2name((int)lf.lfCharSet);
+- /* Convert a font name from the current codepage to 'encoding'.
+- * TODO: Use Wide APIs (including LOGFONTW) instead of ANSI APIs. */
+- if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+- {
+- int len;
+- acp_to_enc((char_u *)lf.lfFaceName, (int)strlen(lf.lfFaceName),
+- (char_u **)&font_name, &len);
+- }
+ quality_name = quality_id2name((int)lf.lfQuality);
+
+ res = (char *)alloc((unsigned)(strlen(font_name) + 20
+--- 3201,3218 ----
+ }
+
+ static char_u *
+! logfont2name(LOGFONTW lf)
+ {
+ char *p;
+ char *res;
+ char *charset_name;
+ char *quality_name;
+! char *font_name;
+
++ font_name = (char *)utf16_to_enc(lf.lfFaceName, NULL);
++ if (font_name == NULL)
++ return NULL;
+ charset_name = charset_id2name((int)lf.lfCharSet);
+ quality_name = quality_id2name((int)lf.lfQuality);
+
+ res = (char *)alloc((unsigned)(strlen(font_name) + 20
+***************
+*** 3254,3278 ****
+ }
+ }
+
+! if (font_name != lf.lfFaceName)
+! vim_free(font_name);
+ return (char_u *)res;
+ }
+
+
+ #ifdef FEAT_MBYTE_IME
+ /*
+! * Set correct LOGFONT to IME. Use 'guifontwide' if available, otherwise use
+ * 'guifont'
+ */
+ static void
+ update_im_font(void)
+ {
+! LOGFONT lf_wide;
+
+ if (p_guifontwide != NULL && *p_guifontwide != NUL
+ && gui.wide_font != NOFONT
+! && GetObject((HFONT)gui.wide_font, sizeof(lf_wide), &lf_wide))
+ norm_logfont = lf_wide;
+ else
+ norm_logfont = sub_logfont;
+--- 3249,3272 ----
+ }
+ }
+
+! vim_free(font_name);
+ return (char_u *)res;
+ }
+
+
+ #ifdef FEAT_MBYTE_IME
+ /*
+! * Set correct LOGFONTW to IME. Use 'guifontwide' if available, otherwise use
+ * 'guifont'
+ */
+ static void
+ update_im_font(void)
+ {
+! LOGFONTW lf_wide;
+
+ if (p_guifontwide != NULL && *p_guifontwide != NUL
+ && gui.wide_font != NOFONT
+! && GetObjectW((HFONT)gui.wide_font, sizeof(lf_wide), &lf_wide))
+ norm_logfont = lf_wide;
+ else
+ norm_logfont = sub_logfont;
+***************
+*** 3286,3292 ****
+ void
+ gui_mch_wide_font_changed(void)
+ {
+! LOGFONT lf;
+
+ #ifdef FEAT_MBYTE_IME
+ update_im_font();
+--- 3280,3286 ----
+ void
+ gui_mch_wide_font_changed(void)
+ {
+! LOGFONTW lf;
+
+ #ifdef FEAT_MBYTE_IME
+ update_im_font();
+***************
+*** 3300,3306 ****
+ gui.wide_boldital_font = NOFONT;
+
+ if (gui.wide_font
+! && GetObject((HFONT)gui.wide_font, sizeof(lf), &lf))
+ {
+ if (!lf.lfItalic)
+ {
+--- 3294,3300 ----
+ gui.wide_boldital_font = NOFONT;
+
+ if (gui.wide_font
+! && GetObjectW((HFONT)gui.wide_font, sizeof(lf), &lf))
+ {
+ if (!lf.lfItalic)
+ {
+***************
+*** 3328,3334 ****
+ int
+ gui_mch_init_font(char_u *font_name, int fontset UNUSED)
+ {
+! LOGFONT lf;
+ GuiFont font = NOFONT;
+ char_u *p;
+
+--- 3322,3328 ----
+ int
+ gui_mch_init_font(char_u *font_name, int fontset UNUSED)
+ {
+! LOGFONTW lf;
+ GuiFont font = NOFONT;
+ char_u *p;
+
+***************
+*** 4225,4232 ****
+ static BOOL (WINAPI *pImmReleaseContext)(HWND, HIMC);
+ static BOOL (WINAPI *pImmGetOpenStatus)(HIMC);
+ static BOOL (WINAPI *pImmSetOpenStatus)(HIMC, BOOL);
+! static BOOL (WINAPI *pImmGetCompositionFont)(HIMC, LPLOGFONTA);
+! static BOOL (WINAPI *pImmSetCompositionFont)(HIMC, LPLOGFONTA);
+ static BOOL (WINAPI *pImmSetCompositionWindow)(HIMC, LPCOMPOSITIONFORM);
+ static BOOL (WINAPI *pImmGetConversionStatus)(HIMC, LPDWORD, LPDWORD);
+ static BOOL (WINAPI *pImmSetConversionStatus)(HIMC, DWORD, DWORD);
+--- 4219,4226 ----
+ static BOOL (WINAPI *pImmReleaseContext)(HWND, HIMC);
+ static BOOL (WINAPI *pImmGetOpenStatus)(HIMC);
+ static BOOL (WINAPI *pImmSetOpenStatus)(HIMC, BOOL);
+! static BOOL (WINAPI *pImmGetCompositionFontW)(HIMC, LPLOGFONTW);
+! static BOOL (WINAPI *pImmSetCompositionFontW)(HIMC, LPLOGFONTW);
+ static BOOL (WINAPI *pImmSetCompositionWindow)(HIMC, LPCOMPOSITIONFORM);
+ static BOOL (WINAPI *pImmGetConversionStatus)(HIMC, LPDWORD, LPDWORD);
+ static BOOL (WINAPI *pImmSetConversionStatus)(HIMC, DWORD, DWORD);
+***************
+*** 4239,4246 ****
+ # define pImmReleaseContext ImmReleaseContext
+ # define pImmGetOpenStatus ImmGetOpenStatus
+ # define pImmSetOpenStatus ImmSetOpenStatus
+! # define pImmGetCompositionFont ImmGetCompositionFontA
+! # define pImmSetCompositionFont ImmSetCompositionFontA
+ # define pImmSetCompositionWindow ImmSetCompositionWindow
+ # define pImmGetConversionStatus ImmGetConversionStatus
+ # define pImmSetConversionStatus ImmSetConversionStatus
+--- 4233,4240 ----
+ # define pImmReleaseContext ImmReleaseContext
+ # define pImmGetOpenStatus ImmGetOpenStatus
+ # define pImmSetOpenStatus ImmSetOpenStatus
+! # define pImmGetCompositionFontW ImmGetCompositionFontW
+! # define pImmSetCompositionFontW ImmSetCompositionFontW
+ # define pImmSetCompositionWindow ImmSetCompositionWindow
+ # define pImmGetConversionStatus ImmGetConversionStatus
+ # define pImmSetConversionStatus ImmSetConversionStatus
+***************
+*** 4379,4392 ****
+ * Return OK or FAIL.
+ */
+ static int
+! gui_w32_get_menu_font(LOGFONT *lf)
+ {
+! NONCLIENTMETRICS nm;
+
+! nm.cbSize = sizeof(NONCLIENTMETRICS);
+! if (!SystemParametersInfo(
+ SPI_GETNONCLIENTMETRICS,
+! sizeof(NONCLIENTMETRICS),
+ &nm,
+ 0))
+ return FAIL;
+--- 4373,4386 ----
+ * Return OK or FAIL.
+ */
+ static int
+! gui_w32_get_menu_font(LOGFONTW *lf)
+ {
+! NONCLIENTMETRICSW nm;
+
+! nm.cbSize = sizeof(NONCLIENTMETRICSW);
+! if (!SystemParametersInfoW(
+ SPI_GETNONCLIENTMETRICS,
+! sizeof(NONCLIENTMETRICSW),
+ &nm,
+ 0))
+ return FAIL;
+***************
+*** 4403,4409 ****
+ static void
+ set_tabline_font(void)
+ {
+! LOGFONT lfSysmenu;
+ HFONT font;
+ HWND hwnd;
+ HDC hdc;
+--- 4397,4403 ----
+ static void
+ set_tabline_font(void)
+ {
+! LOGFONTW lfSysmenu;
+ HFONT font;
+ HWND hwnd;
+ HDC hdc;
+***************
+*** 4413,4419 ****
+ if (gui_w32_get_menu_font(&lfSysmenu) != OK)
+ return;
+
+! font = CreateFontIndirect(&lfSysmenu);
+
+ SendMessage(s_tabhwnd, WM_SETFONT, (WPARAM)font, TRUE);
+
+--- 4407,4413 ----
+ if (gui_w32_get_menu_font(&lfSysmenu) != OK)
+ return;
+
+! font = CreateFontIndirectW(&lfSysmenu);
+
+ SendMessage(s_tabhwnd, WM_SETFONT, (WPARAM)font, TRUE);
+
+***************
+*** 5562,5568 ****
+ case IMN_SETOPENSTATUS:
+ if (pImmGetOpenStatus(hImc))
+ {
+! pImmSetCompositionFont(hImc, &norm_logfont);
+ im_set_position(gui.row, gui.col);
+
+ /* Disable langmap */
+--- 5556,5562 ----
+ case IMN_SETOPENSTATUS:
+ if (pImmGetOpenStatus(hImc))
+ {
+! pImmSetCompositionFontW(hImc, &norm_logfont);
+ im_set_position(gui.row, gui.col);
+
+ /* Disable langmap */
+***************
+*** 5703,5715 ****
+ * set font to IM.
+ */
+ void
+! im_set_font(LOGFONT *lf)
+ {
+ HIMC hImc;
+
+ if (pImmGetContext && (hImc = pImmGetContext(s_hwnd)) != (HIMC)0)
+ {
+! pImmSetCompositionFont(hImc, lf);
+ pImmReleaseContext(s_hwnd, hImc);
+ }
+ }
+--- 5697,5709 ----
+ * set font to IM.
+ */
+ void
+! im_set_font(LOGFONTW *lf)
+ {
+ HIMC hImc;
+
+ if (pImmGetContext && (hImc = pImmGetContext(s_hwnd)) != (HIMC)0)
+ {
+! pImmSetCompositionFontW(hImc, lf);
+ pImmReleaseContext(s_hwnd, hImc);
+ }
+ }
+***************
+*** 6829,6835 ****
+ int dlgPaddingX;
+ int dlgPaddingY;
+ #ifdef USE_SYSMENU_FONT
+! LOGFONT lfSysmenu;
+ int use_lfSysmenu = FALSE;
+ #endif
+ garray_T ga;
+--- 6823,6829 ----
+ int dlgPaddingX;
+ int dlgPaddingY;
+ #ifdef USE_SYSMENU_FONT
+! LOGFONTW lfSysmenu;
+ int use_lfSysmenu = FALSE;
+ #endif
+ garray_T ga;
+***************
+*** 6894,6900 ****
+ #ifdef USE_SYSMENU_FONT
+ if (gui_w32_get_menu_font(&lfSysmenu) == OK)
+ {
+! font = CreateFontIndirect(&lfSysmenu);
+ use_lfSysmenu = TRUE;
+ }
+ else
+--- 6888,6894 ----
+ #ifdef USE_SYSMENU_FONT
+ if (gui_w32_get_menu_font(&lfSysmenu) == OK)
+ {
+! font = CreateFontIndirectW(&lfSysmenu);
+ use_lfSysmenu = TRUE;
+ }
+ else
+***************
+*** 7123,7129 ****
+ /* point size */
+ *p++ = -MulDiv(lfSysmenu.lfHeight, 72,
+ GetDeviceCaps(hdc, LOGPIXELSY));
+! nchar = nCopyAnsiToWideChar(p, lfSysmenu.lfFaceName, FALSE);
+ }
+ else
+ #endif
+--- 7117,7124 ----
+ /* point size */
+ *p++ = -MulDiv(lfSysmenu.lfHeight, 72,
+ GetDeviceCaps(hdc, LOGPIXELSY));
+! wcscpy(p, lfSysmenu.lfFaceName);
+! nchar = (int)wcslen(lfSysmenu.lfFaceName) + 1;
+ }
+ else
+ #endif
+***************
+*** 7488,7501 ****
+ DWORD dlgFontSize;
+ SIZE size;
+ #ifdef USE_SYSMENU_FONT
+! LOGFONT lfSysmenu;
+ #endif
+
+ s_usenewlook = FALSE;
+
+ #ifdef USE_SYSMENU_FONT
+ if (gui_w32_get_menu_font(&lfSysmenu) == OK)
+! hfontTools = CreateFontIndirect(&lfSysmenu);
+ else
+ #endif
+ hfontTools = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0,
+--- 7483,7496 ----
+ DWORD dlgFontSize;
+ SIZE size;
+ #ifdef USE_SYSMENU_FONT
+! LOGFONTW lfSysmenu;
+ #endif
+
+ s_usenewlook = FALSE;
+
+ #ifdef USE_SYSMENU_FONT
+ if (gui_w32_get_menu_font(&lfSysmenu) == OK)
+! hfontTools = CreateFontIndirectW(&lfSysmenu);
+ else
+ #endif
+ hfontTools = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0,
+***************
+*** 7563,7569 ****
+ int x;
+ int y;
+ #ifdef USE_SYSMENU_FONT
+! LOGFONT lfSysmenu;
+ int use_lfSysmenu = FALSE;
+ #endif
+
+--- 7558,7564 ----
+ int x;
+ int y;
+ #ifdef USE_SYSMENU_FONT
+! LOGFONTW lfSysmenu;
+ int use_lfSysmenu = FALSE;
+ #endif
+
+***************
+*** 7599,7605 ****
+ #ifdef USE_SYSMENU_FONT
+ if (gui_w32_get_menu_font(&lfSysmenu) == OK)
+ {
+! font = CreateFontIndirect(&lfSysmenu);
+ use_lfSysmenu = TRUE;
+ }
+ else
+--- 7594,7600 ----
+ #ifdef USE_SYSMENU_FONT
+ if (gui_w32_get_menu_font(&lfSysmenu) == OK)
+ {
+! font = CreateFontIndirectW(&lfSysmenu);
+ use_lfSysmenu = TRUE;
+ }
+ else
+***************
+*** 7708,7714 ****
+ /* point size */
+ *p++ = -MulDiv(lfSysmenu.lfHeight, 72,
+ GetDeviceCaps(hdc, LOGPIXELSY));
+! nchar = nCopyAnsiToWideChar(p, lfSysmenu.lfFaceName, FALSE);
+ }
+ else
+ #endif
+--- 7703,7710 ----
+ /* point size */
+ *p++ = -MulDiv(lfSysmenu.lfHeight, 72,
+ GetDeviceCaps(hdc, LOGPIXELSY));
+! wcscpy(p, lfSysmenu.lfFaceName);
+! nchar = (int)wcslen(lfSysmenu.lfFaceName) + 1;
+ }
+ else
+ #endif
+***************
+*** 8136,8145 ****
+ = (void *)GetProcAddress(hLibImm, "ImmGetOpenStatus");
+ pImmSetOpenStatus
+ = (void *)GetProcAddress(hLibImm, "ImmSetOpenStatus");
+! pImmGetCompositionFont
+! = (void *)GetProcAddress(hLibImm, "ImmGetCompositionFontA");
+! pImmSetCompositionFont
+! = (void *)GetProcAddress(hLibImm, "ImmSetCompositionFontA");
+ pImmSetCompositionWindow
+ = (void *)GetProcAddress(hLibImm, "ImmSetCompositionWindow");
+ pImmGetConversionStatus
+--- 8132,8141 ----
+ = (void *)GetProcAddress(hLibImm, "ImmGetOpenStatus");
+ pImmSetOpenStatus
+ = (void *)GetProcAddress(hLibImm, "ImmSetOpenStatus");
+! pImmGetCompositionFontW
+! = (void *)GetProcAddress(hLibImm, "ImmGetCompositionFontW");
+! pImmSetCompositionFontW
+! = (void *)GetProcAddress(hLibImm, "ImmSetCompositionFontW");
+ pImmSetCompositionWindow
+ = (void *)GetProcAddress(hLibImm, "ImmSetCompositionWindow");
+ pImmGetConversionStatus
+***************
+*** 8154,8161 ****
+ || pImmReleaseContext == NULL
+ || pImmGetOpenStatus == NULL
+ || pImmSetOpenStatus == NULL
+! || pImmGetCompositionFont == NULL
+! || pImmSetCompositionFont == NULL
+ || pImmSetCompositionWindow == NULL
+ || pImmGetConversionStatus == NULL
+ || pImmSetConversionStatus == NULL)
+--- 8150,8157 ----
+ || pImmReleaseContext == NULL
+ || pImmGetOpenStatus == NULL
+ || pImmSetOpenStatus == NULL
+! || pImmGetCompositionFontW == NULL
+! || pImmSetCompositionFontW == NULL
+ || pImmSetCompositionWindow == NULL
+ || pImmGetConversionStatus == NULL
+ || pImmSetConversionStatus == NULL)
+*** ../vim-8.1.1080/src/os_mswin.c 2019-02-17 17:44:36.215875493 +0100
+--- src/os_mswin.c 2019-03-30 16:20:37.994106945 +0100
+***************
+*** 85,91 ****
+ typedef int CONSOLE_CURSOR_INFO;
+ typedef int COORD;
+ typedef int DWORD;
+! typedef int ENUMLOGFONT;
+ typedef int HANDLE;
+ typedef int HDC;
+ typedef int HFONT;
+--- 85,91 ----
+ typedef int CONSOLE_CURSOR_INFO;
+ typedef int COORD;
+ typedef int DWORD;
+! typedef int ENUMLOGFONTW;
+ typedef int HANDLE;
+ typedef int HDC;
+ typedef int HFONT;
+***************
+*** 93,99 ****
+ typedef int HWND;
+ typedef int INPUT_RECORD;
+ typedef int KEY_EVENT_RECORD;
+! typedef int LOGFONT;
+ typedef int LPARAM;
+ typedef int LPBOOL;
+ typedef int LPCSTR;
+--- 93,99 ----
+ typedef int HWND;
+ typedef int INPUT_RECORD;
+ typedef int KEY_EVENT_RECORD;
+! typedef int LOGFONTW;
+ typedef int LPARAM;
+ typedef int LPBOOL;
+ typedef int LPCSTR;
+***************
+*** 103,109 ****
+ typedef int LPWSTR;
+ typedef int LRESULT;
+ typedef int MOUSE_EVENT_RECORD;
+! typedef int NEWTEXTMETRIC;
+ typedef int PACL;
+ typedef int PRINTDLG;
+ typedef int PSECURITY_DESCRIPTOR;
+--- 103,109 ----
+ typedef int LPWSTR;
+ typedef int LRESULT;
+ typedef int MOUSE_EVENT_RECORD;
+! typedef int NEWTEXTMETRICW;
+ typedef int PACL;
+ typedef int PRINTDLG;
+ typedef int PSECURITY_DESCRIPTOR;
+***************
+*** 1420,1426 ****
+ static int stored_nCopies = 1;
+ static int stored_nFlags = 0;
+
+! LOGFONT fLogFont;
+ int pifItalic;
+ int pifBold;
+ int pifUnderline;
+--- 1420,1426 ----
+ static int stored_nCopies = 1;
+ static int stored_nFlags = 0;
+
+! LOGFONTW fLogFont;
+ int pifItalic;
+ int pifBold;
+ int pifUnderline;
+***************
+*** 1577,1583 ****
+ fLogFont.lfItalic = pifItalic;
+ fLogFont.lfUnderline = pifUnderline;
+ prt_font_handles[pifBold][pifItalic][pifUnderline]
+! = CreateFontIndirect(&fLogFont);
+ }
+
+ SetBkMode(prt_dlg.hDC, OPAQUE);
+--- 1577,1583 ----
+ fLogFont.lfItalic = pifItalic;
+ fLogFont.lfUnderline = pifUnderline;
+ prt_font_handles[pifBold][pifItalic][pifUnderline]
+! = CreateFontIndirectW(&fLogFont);
+ }
+
+ SetBkMode(prt_dlg.hDC, OPAQUE);
+***************
+*** 2915,2926 ****
+ return qp->name;
+ }
+
+! static const LOGFONT s_lfDefault =
+ {
+ -12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
+ OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
+ PROOF_QUALITY, FIXED_PITCH | FF_DONTCARE,
+! "Fixedsys" /* see _ReadVimIni */
+ };
+
+ /* Initialise the "current height" to -12 (same as s_lfDefault) just
+--- 2915,2926 ----
+ return qp->name;
+ }
+
+! static const LOGFONTW s_lfDefault =
+ {
+ -12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
+ OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
+ PROOF_QUALITY, FIXED_PITCH | FF_DONTCARE,
+! L"Fixedsys" /* see _ReadVimIni */
+ };
+
+ /* Initialise the "current height" to -12 (same as s_lfDefault) just
+***************
+*** 2937,2943 ****
+ * calculation is for a vertical (height) size or a horizontal (width) one.
+ */
+ static int
+! points_to_pixels(char_u *str, char_u **end, int vertical, long_i pprinter_dc)
+ {
+ int pixels;
+ int points = 0;
+--- 2937,2943 ----
+ * calculation is for a vertical (height) size or a horizontal (width) one.
+ */
+ static int
+! points_to_pixels(WCHAR *str, WCHAR **end, int vertical, long_i pprinter_dc)
+ {
+ int pixels;
+ int points = 0;
+***************
+*** 2948,2954 ****
+
+ while (*str != NUL)
+ {
+! if (*str == '.' && divisor == 0)
+ {
+ /* Start keeping a divisor, for later */
+ divisor = 1;
+--- 2948,2954 ----
+
+ while (*str != NUL)
+ {
+! if (*str == L'.' && divisor == 0)
+ {
+ /* Start keeping a divisor, for later */
+ divisor = 1;
+***************
+*** 2959,2965 ****
+ break;
+
+ points *= 10;
+! points += *str - '0';
+ divisor *= 10;
+ }
+ ++str;
+--- 2959,2965 ----
+ break;
+
+ points *= 10;
+! points += *str - L'0';
+ divisor *= 10;
+ }
+ ++str;
+***************
+*** 2989,3003 ****
+
+ static int CALLBACK
+ font_enumproc(
+! ENUMLOGFONT *elf,
+! NEWTEXTMETRIC *ntm UNUSED,
+! int type UNUSED,
+ LPARAM lparam)
+ {
+ /* Return value:
+ * 0 = terminate now (monospace & ANSI)
+ * 1 = continue, still no luck...
+! * 2 = continue, but we have an acceptable LOGFONT
+ * (monospace, not ANSI)
+ * We use these values, as EnumFontFamilies returns 1 if the
+ * callback function is never called. So, we check the return as
+--- 2989,3003 ----
+
+ static int CALLBACK
+ font_enumproc(
+! ENUMLOGFONTW *elf,
+! NEWTEXTMETRICW *ntm UNUSED,
+! DWORD type UNUSED,
+ LPARAM lparam)
+ {
+ /* Return value:
+ * 0 = terminate now (monospace & ANSI)
+ * 1 = continue, still no luck...
+! * 2 = continue, but we have an acceptable LOGFONTW
+ * (monospace, not ANSI)
+ * We use these values, as EnumFontFamilies returns 1 if the
+ * callback function is never called. So, we check the return as
+***************
+*** 3005,3011 ****
+ * It's not pretty, but it works!
+ */
+
+! LOGFONT *lf = (LOGFONT *)(lparam);
+
+ #ifndef FEAT_PROPORTIONAL_FONTS
+ /* Ignore non-monospace fonts without further ado */
+--- 3005,3011 ----
+ * It's not pretty, but it works!
+ */
+
+! LOGFONTW *lf = (LOGFONTW *)(lparam);
+
+ #ifndef FEAT_PROPORTIONAL_FONTS
+ /* Ignore non-monospace fonts without further ado */
+***************
+*** 3013,3019 ****
+ return 1;
+ #endif
+
+! /* Remember this LOGFONT as a "possible" */
+ *lf = elf->elfLogFont;
+
+ /* Terminate the scan as soon as we find an ANSI font */
+--- 3013,3019 ----
+ return 1;
+ #endif
+
+! /* Remember this LOGFONTW as a "possible" */
+ *lf = elf->elfLogFont;
+
+ /* Terminate the scan as soon as we find an ANSI font */
+***************
+*** 3027,3041 ****
+ }
+
+ static int
+! init_logfont(LOGFONT *lf)
+ {
+ int n;
+ HWND hwnd = GetDesktopWindow();
+ HDC hdc = GetWindowDC(hwnd);
+
+! n = EnumFontFamilies(hdc,
+! (LPCSTR)lf->lfFaceName,
+! (FONTENUMPROC)font_enumproc,
+ (LPARAM)lf);
+
+ ReleaseDC(hwnd, hdc);
+--- 3027,3041 ----
+ }
+
+ static int
+! init_logfont(LOGFONTW *lf)
+ {
+ int n;
+ HWND hwnd = GetDesktopWindow();
+ HDC hdc = GetWindowDC(hwnd);
+
+! n = EnumFontFamiliesW(hdc,
+! lf->lfFaceName,
+! (FONTENUMPROCW)font_enumproc,
+ (LPARAM)lf);
+
+ ReleaseDC(hwnd, hdc);
+***************
+*** 3044,3050 ****
+ if (n == 1)
+ return FAIL;
+
+! /* Tidy up the rest of the LOGFONT structure. We set to a basic
+ * font - get_logfont() sets bold, italic, etc based on the user's
+ * input.
+ */
+--- 3044,3050 ----
+ if (n == 1)
+ return FAIL;
+
+! /* Tidy up the rest of the LOGFONTW structure. We set to a basic
+ * font - get_logfont() sets bold, italic, etc based on the user's
+ * input.
+ */
+***************
+*** 3060,3098 ****
+ }
+
+ /*
+ * Get font info from "name" into logfont "lf".
+ * Return OK for a valid name, FAIL otherwise.
+ */
+ int
+ get_logfont(
+! LOGFONT *lf,
+ char_u *name,
+ HDC printer_dc,
+ int verbose)
+ {
+! char_u *p;
+ int i;
+ int ret = FAIL;
+! static LOGFONT *lastlf = NULL;
+! char_u *acpname = NULL;
+
+ *lf = s_lfDefault;
+ if (name == NULL)
+ return OK;
+
+! /* Convert 'name' from 'encoding' to the current codepage, because
+! * lf->lfFaceName uses the current codepage.
+! * TODO: Use Wide APIs instead of ANSI APIs. */
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! int len;
+! enc_to_acp(name, (int)STRLEN(name), &acpname, &len);
+! name = acpname;
+! }
+! if (STRCMP(name, "*") == 0)
+ {
+ #if defined(FEAT_GUI_MSWIN)
+! CHOOSEFONT cf;
+ /* if name is "*", bring up std font dialog: */
+ vim_memset(&cf, 0, sizeof(cf));
+ cf.lStructSize = sizeof(cf);
+--- 3060,3110 ----
+ }
+
+ /*
++ * Compare a UTF-16 string and an ASCII string literally.
++ * Only works all the code points are inside ASCII range.
++ */
++ static int
++ utf16ascncmp(const WCHAR *w, const char *p, size_t n)
++ {
++ size_t i;
++
++ for (i = 0; i < n; i++)
++ {
++ if (w[i] == 0 || w[i] != p[i])
++ return w[i] - p[i];
++ }
++ return 0;
++ }
++
++ /*
+ * Get font info from "name" into logfont "lf".
+ * Return OK for a valid name, FAIL otherwise.
+ */
+ int
+ get_logfont(
+! LOGFONTW *lf,
+ char_u *name,
+ HDC printer_dc,
+ int verbose)
+ {
+! WCHAR *p;
+ int i;
+ int ret = FAIL;
+! static LOGFONTW *lastlf = NULL;
+! WCHAR *wname;
+
+ *lf = s_lfDefault;
+ if (name == NULL)
+ return OK;
+
+! wname = enc_to_utf16(name, NULL);
+! if (wname == NULL)
+! return FAIL;
+!
+! if (wcscmp(wname, L"*") == 0)
+ {
+ #if defined(FEAT_GUI_MSWIN)
+! CHOOSEFONTW cf;
+ /* if name is "*", bring up std font dialog: */
+ vim_memset(&cf, 0, sizeof(cf));
+ cf.lStructSize = sizeof(cf);
+***************
+*** 3102,3108 ****
+ *lf = *lastlf;
+ cf.lpLogFont = lf;
+ cf.nFontType = 0 ; //REGULAR_FONTTYPE;
+! if (ChooseFont(&cf))
+ ret = OK;
+ #endif
+ goto theend;
+--- 3114,3120 ----
+ *lf = *lastlf;
+ cf.lpLogFont = lf;
+ cf.nFontType = 0 ; //REGULAR_FONTTYPE;
+! if (ChooseFontW(&cf))
+ ret = OK;
+ #endif
+ goto theend;
+***************
+*** 3111,3124 ****
+ /*
+ * Split name up, it could be <name>:h<height>:w<width> etc.
+ */
+! for (p = name; *p && *p != ':'; p++)
+ {
+! if (p - name + 1 >= LF_FACESIZE)
+ goto theend; /* Name too long */
+! lf->lfFaceName[p - name] = *p;
+ }
+! if (p != name)
+! lf->lfFaceName[p - name] = NUL;
+
+ /* First set defaults */
+ lf->lfHeight = -12;
+--- 3123,3136 ----
+ /*
+ * Split name up, it could be <name>:h<height>:w<width> etc.
+ */
+! for (p = wname; *p && *p != L':'; p++)
+ {
+! if (p - wname + 1 >= LF_FACESIZE)
+ goto theend; /* Name too long */
+! lf->lfFaceName[p - wname] = *p;
+ }
+! if (p != wname)
+! lf->lfFaceName[p - wname] = NUL;
+
+ /* First set defaults */
+ lf->lfHeight = -12;
+***************
+*** 3136,3153 ****
+ int did_replace = FALSE;
+
+ for (i = 0; lf->lfFaceName[i]; ++i)
+! if (IsDBCSLeadByte(lf->lfFaceName[i]))
+! ++i;
+! else if (lf->lfFaceName[i] == '_')
+ {
+! lf->lfFaceName[i] = ' ';
+ did_replace = TRUE;
+ }
+ if (!did_replace || init_logfont(lf) == FAIL)
+ goto theend;
+ }
+
+! while (*p == ':')
+ p++;
+
+ /* Set the values found after ':' */
+--- 3148,3163 ----
+ int did_replace = FALSE;
+
+ for (i = 0; lf->lfFaceName[i]; ++i)
+! if (lf->lfFaceName[i] == L'_')
+ {
+! lf->lfFaceName[i] = L' ';
+ did_replace = TRUE;
+ }
+ if (!did_replace || init_logfont(lf) == FAIL)
+ goto theend;
+ }
+
+! while (*p == L':')
+ p++;
+
+ /* Set the values found after ':' */
+***************
+*** 3155,3184 ****
+ {
+ switch (*p++)
+ {
+! case 'h':
+ lf->lfHeight = - points_to_pixels(p, &p, TRUE, (long_i)printer_dc);
+ break;
+! case 'w':
+ lf->lfWidth = points_to_pixels(p, &p, FALSE, (long_i)printer_dc);
+ break;
+! case 'b':
+ lf->lfWeight = FW_BOLD;
+ break;
+! case 'i':
+ lf->lfItalic = TRUE;
+ break;
+! case 'u':
+ lf->lfUnderline = TRUE;
+ break;
+! case 's':
+ lf->lfStrikeOut = TRUE;
+ break;
+! case 'c':
+ {
+ struct charset_pair *cp;
+
+ for (cp = charset_pairs; cp->name != NULL; ++cp)
+! if (STRNCMP(p, cp->name, strlen(cp->name)) == 0)
+ {
+ lf->lfCharSet = cp->charset;
+ p += strlen(cp->name);
+--- 3165,3194 ----
+ {
+ switch (*p++)
+ {
+! case L'h':
+ lf->lfHeight = - points_to_pixels(p, &p, TRUE, (long_i)printer_dc);
+ break;
+! case L'w':
+ lf->lfWidth = points_to_pixels(p, &p, FALSE, (long_i)printer_dc);
+ break;
+! case L'b':
+ lf->lfWeight = FW_BOLD;
+ break;
+! case L'i':
+ lf->lfItalic = TRUE;
+ break;
+! case L'u':
+ lf->lfUnderline = TRUE;
+ break;
+! case L's':
+ lf->lfStrikeOut = TRUE;
+ break;
+! case L'c':
+ {
+ struct charset_pair *cp;
+
+ for (cp = charset_pairs; cp->name != NULL; ++cp)
+! if (utf16ascncmp(p, cp->name, strlen(cp->name)) == 0)
+ {
+ lf->lfCharSet = cp->charset;
+ p += strlen(cp->name);
+***************
+*** 3186,3202 ****
+ }
+ if (cp->name == NULL && verbose)
+ {
+! semsg(_("E244: Illegal charset name \"%s\" in font name \"%s\""), p, name);
+ break;
+ }
+ break;
+ }
+! case 'q':
+ {
+ struct quality_pair *qp;
+
+ for (qp = quality_pairs; qp->name != NULL; ++qp)
+! if (STRNCMP(p, qp->name, strlen(qp->name)) == 0)
+ {
+ lf->lfQuality = qp->quality;
+ p += strlen(qp->name);
+--- 3196,3214 ----
+ }
+ if (cp->name == NULL && verbose)
+ {
+! char_u *s = utf16_to_enc(p, NULL);
+! semsg(_("E244: Illegal charset name \"%s\" in font name \"%s\""), s, name);
+! vim_free(s);
+ break;
+ }
+ break;
+ }
+! case L'q':
+ {
+ struct quality_pair *qp;
+
+ for (qp = quality_pairs; qp->name != NULL; ++qp)
+! if (utf16ascncmp(p, qp->name, strlen(qp->name)) == 0)
+ {
+ lf->lfQuality = qp->quality;
+ p += strlen(qp->name);
+***************
+*** 3204,3210 ****
+ }
+ if (qp->name == NULL && verbose)
+ {
+! semsg(_("E244: Illegal quality name \"%s\" in font name \"%s\""), p, name);
+ break;
+ }
+ break;
+--- 3216,3224 ----
+ }
+ if (qp->name == NULL && verbose)
+ {
+! char_u *s = utf16_to_enc(p, NULL);
+! semsg(_("E244: Illegal quality name \"%s\" in font name \"%s\""), s, name);
+! vim_free(s);
+ break;
+ }
+ break;
+***************
+*** 3214,3220 ****
+ semsg(_("E245: Illegal char '%c' in font name \"%s\""), p[-1], name);
+ goto theend;
+ }
+! while (*p == ':')
+ p++;
+ }
+ ret = OK;
+--- 3228,3234 ----
+ semsg(_("E245: Illegal char '%c' in font name \"%s\""), p[-1], name);
+ goto theend;
+ }
+! while (*p == L':')
+ p++;
+ }
+ ret = OK;
+***************
+*** 3224,3234 ****
+ if (ret == OK && printer_dc == NULL)
+ {
+ vim_free(lastlf);
+! lastlf = (LOGFONT *)alloc(sizeof(LOGFONT));
+ if (lastlf != NULL)
+! mch_memmove(lastlf, lf, sizeof(LOGFONT));
+ }
+! vim_free(acpname);
+
+ return ret;
+ }
+--- 3238,3248 ----
+ if (ret == OK && printer_dc == NULL)
+ {
+ vim_free(lastlf);
+! lastlf = (LOGFONTW *)alloc(sizeof(LOGFONTW));
+ if (lastlf != NULL)
+! mch_memmove(lastlf, lf, sizeof(LOGFONTW));
+ }
+! vim_free(wname);
+
+ return ret;
+ }
+*** ../vim-8.1.1080/src/proto/gui_w32.pro 2019-02-01 20:42:18.718884011 +0100
+--- src/proto/gui_w32.pro 2019-03-30 16:20:37.994106945 +0100
+***************
+*** 70,76 ****
+ void gui_mch_set_fg_color(guicolor_T color);
+ void gui_mch_set_bg_color(guicolor_T color);
+ void gui_mch_set_sp_color(guicolor_T color);
+! void im_set_font(LOGFONT *lf);
+ void im_set_position(int row, int col);
+ void im_set_active(int active);
+ int im_get_status(void);
+--- 70,76 ----
+ void gui_mch_set_fg_color(guicolor_T color);
+ void gui_mch_set_bg_color(guicolor_T color);
+ void gui_mch_set_sp_color(guicolor_T color);
+! void im_set_font(LOGFONTW *lf);
+ void im_set_position(int row, int col);
+ void im_set_active(int active);
+ int im_get_status(void);
+*** ../vim-8.1.1080/src/proto/os_mswin.pro 2019-02-10 23:18:49.038187525 +0100
+--- src/proto/os_mswin.pro 2019-03-30 16:20:37.994106945 +0100
+***************
+*** 49,54 ****
+ void serverProcessPendingMessages(void);
+ char *charset_id2name(int id);
+ char *quality_id2name(DWORD id);
+! int get_logfont(LOGFONT *lf, char_u *name, HDC printer_dc, int verbose);
+ void channel_init_winsock(void);
+ /* vim: set ft=c : */
+--- 49,54 ----
+ void serverProcessPendingMessages(void);
+ char *charset_id2name(int id);
+ char *quality_id2name(DWORD id);
+! int get_logfont(LOGFONTW *lf, char_u *name, HDC printer_dc, int verbose);
+ void channel_init_winsock(void);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1080/src/version.c 2019-03-30 15:59:48.086175476 +0100
+--- src/version.c 2019-03-30 16:22:38.549119396 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1081,
+ /**/
+
+--
+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.1082 b/data/vim/patches/8.1.1082
new file mode 100644
index 000000000..0201d7049
--- /dev/null
+++ b/data/vim/patches/8.1.1082
@@ -0,0 +1,77 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1082
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1082
+Problem: "Conceal" match is mixed up with 'hlsearch' match.
+Solution: Check that a match is found, not a 'hlsearch' item. (Andy
+ Massimino, closes #4073)
+Files: src/screen.c
+
+
+*** ../vim-8.1.1081/src/screen.c 2019-03-30 15:34:42.715472004 +0100
+--- src/screen.c 2019-03-30 16:38:50.942088873 +0100
+***************
+*** 4133,4140 ****
+ shl->endcol = tmp_col;
+ shl->attr_cur = shl->attr;
+ #ifdef FEAT_CONCEAL
+! if (cur != NULL && syn_name2id((char_u *)"Conceal")
+! == cur->hlg_id)
+ {
+ has_match_conc =
+ v == (long)shl->startcol ? 2 : 1;
+--- 4133,4144 ----
+ shl->endcol = tmp_col;
+ shl->attr_cur = shl->attr;
+ #ifdef FEAT_CONCEAL
+! // Match with the "Conceal" group results in hiding
+! // the match.
+! if (cur != NULL
+! && shl != &search_hl
+! && syn_name2id((char_u *)"Conceal")
+! == cur->hlg_id)
+ {
+ has_match_conc =
+ v == (long)shl->startcol ? 2 : 1;
+***************
+*** 5175,5182 ****
+ #ifdef FEAT_CONCEAL
+ if ( wp->w_p_cole > 0
+ && (wp != curwin || lnum != wp->w_cursor.lnum ||
+! conceal_cursor_line(wp) )
+! && ( (syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0)
+ && !(lnum_in_visual_area
+ && vim_strchr(wp->w_p_cocu, 'v') == NULL))
+ {
+--- 5179,5186 ----
+ #ifdef FEAT_CONCEAL
+ if ( wp->w_p_cole > 0
+ && (wp != curwin || lnum != wp->w_cursor.lnum ||
+! conceal_cursor_line(wp))
+! && ((syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0)
+ && !(lnum_in_visual_area
+ && vim_strchr(wp->w_p_cocu, 'v') == NULL))
+ {
+*** ../vim-8.1.1081/src/version.c 2019-03-30 16:24:12.240380238 +0100
+--- src/version.c 2019-03-30 16:37:02.526829666 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1082,
+ /**/
+
+--
+Two sheep in a meadow. One says "baaah". The other says "exactly!".
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1083 b/data/vim/patches/8.1.1083
new file mode 100644
index 000000000..7d5af266b
--- /dev/null
+++ b/data/vim/patches/8.1.1083
@@ -0,0 +1,343 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1083
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1083
+Problem: MS-Windows: hang when opening a file on network share.
+Solution: Avoid using FindFirstFile(), use GetLongPathNameW(). (Ken Takata,
+ closes #3923)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.1082/src/os_win32.c 2019-03-27 21:49:10.761396675 +0100
+--- src/os_win32.c 2019-03-30 17:27:31.757250891 +0100
+***************
+*** 2772,2907 ****
+ #endif
+ }
+
+-
+ /*
+! * fname_casew(): Wide version of fname_case(). Set the case of the file name,
+! * if it already exists. When "len" is > 0, also expand short to long
+! * filenames.
+! * Return FAIL if wide functions are not available, OK otherwise.
+! * NOTE: much of this is identical to fname_case(), keep in sync!
+! */
+! static int
+! fname_casew(
+! WCHAR *name,
+! int len)
+! {
+! WCHAR szTrueName[_MAX_PATH + 2];
+! WCHAR szTrueNameTemp[_MAX_PATH + 2];
+! WCHAR *ptrue, *ptruePrev;
+! WCHAR *porig, *porigPrev;
+! int flen;
+! WIN32_FIND_DATAW fb;
+! HANDLE hFind = INVALID_HANDLE_VALUE;
+! int c;
+! int slen;
+!
+! flen = (int)wcslen(name);
+! if (flen > _MAX_PATH)
+! return OK;
+!
+! /* slash_adjust(name) not needed, already adjusted by fname_case(). */
+!
+! /* Build the new name in szTrueName[] one component at a time. */
+! porig = name;
+! ptrue = szTrueName;
+!
+! if (iswalpha(porig[0]) && porig[1] == L':')
+! {
+! /* copy leading drive letter */
+! *ptrue++ = *porig++;
+! *ptrue++ = *porig++;
+! }
+! *ptrue = NUL; /* in case nothing follows */
+!
+! while (*porig != NUL)
+! {
+! /* copy \ characters */
+! while (*porig == psepc)
+! *ptrue++ = *porig++;
+!
+! ptruePrev = ptrue;
+! porigPrev = porig;
+! while (*porig != NUL && *porig != psepc)
+! {
+! *ptrue++ = *porig++;
+! }
+! *ptrue = NUL;
+!
+! /* To avoid a slow failure append "\*" when searching a directory,
+! * server or network share. */
+! wcscpy(szTrueNameTemp, szTrueName);
+! slen = (int)wcslen(szTrueNameTemp);
+! if (*porig == psepc && slen + 2 < _MAX_PATH)
+! wcscpy(szTrueNameTemp + slen, L"\\*");
+!
+! /* Skip "", "." and "..". */
+! if (ptrue > ptruePrev
+! && (ptruePrev[0] != L'.'
+! || (ptruePrev[1] != NUL
+! && (ptruePrev[1] != L'.' || ptruePrev[2] != NUL)))
+! && (hFind = FindFirstFileW(szTrueNameTemp, &fb))
+! != INVALID_HANDLE_VALUE)
+! {
+! c = *porig;
+! *porig = NUL;
+!
+! /* Only use the match when it's the same name (ignoring case) or
+! * expansion is allowed and there is a match with the short name
+! * and there is enough room. */
+! if (_wcsicoll(porigPrev, fb.cFileName) == 0
+! || (len > 0
+! && (_wcsicoll(porigPrev, fb.cAlternateFileName) == 0
+! && (int)(ptruePrev - szTrueName)
+! + (int)wcslen(fb.cFileName) < len)))
+! {
+! wcscpy(ptruePrev, fb.cFileName);
+!
+! /* Look for exact match and prefer it if found. Must be a
+! * long name, otherwise there would be only one match. */
+! while (FindNextFileW(hFind, &fb))
+! {
+! if (*fb.cAlternateFileName != NUL
+! && (wcscoll(porigPrev, fb.cFileName) == 0
+! || (len > 0
+! && (_wcsicoll(porigPrev,
+! fb.cAlternateFileName) == 0
+! && (int)(ptruePrev - szTrueName)
+! + (int)wcslen(fb.cFileName) < len))))
+! {
+! wcscpy(ptruePrev, fb.cFileName);
+! break;
+! }
+! }
+! }
+! FindClose(hFind);
+! *porig = c;
+! ptrue = ptruePrev + wcslen(ptruePrev);
+! }
+! }
+!
+! wcscpy(name, szTrueName);
+! return OK;
+! }
+!
+! /*
+! * fname_case(): Set the case of the file name, if it already exists.
+ * When "len" is > 0, also expand short to long filenames.
+- * NOTE: much of this is identical to fname_casew(), keep in sync!
+ */
+ void
+ fname_case(
+ char_u *name,
+ int len)
+ {
+! char szTrueName[_MAX_PATH + 2];
+! char szTrueNameTemp[_MAX_PATH + 2];
+! char *ptrue, *ptruePrev;
+! char *porig, *porigPrev;
+! int flen;
+! WIN32_FIND_DATA fb;
+! HANDLE hFind;
+! int c;
+! int slen;
+
+ flen = (int)STRLEN(name);
+ if (flen == 0)
+--- 2772,2789 ----
+ #endif
+ }
+
+ /*
+! * Set the case of the file name, if it already exists.
+ * When "len" is > 0, also expand short to long filenames.
+ */
+ void
+ fname_case(
+ char_u *name,
+ int len)
+ {
+! int flen;
+! WCHAR *p;
+! WCHAR buf[_MAX_PATH + 1];
+
+ flen = (int)STRLEN(name);
+ if (flen == 0)
+***************
+*** 2909,3034 ****
+
+ slash_adjust(name);
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *p = enc_to_utf16(name, NULL);
+!
+! if (p != NULL)
+! {
+! char_u *q;
+! WCHAR buf[_MAX_PATH + 1];
+!
+! wcsncpy(buf, p, _MAX_PATH);
+! buf[_MAX_PATH] = L'\0';
+! vim_free(p);
+!
+! if (fname_casew(buf, (len > 0) ? _MAX_PATH : 0) == OK)
+! {
+! q = utf16_to_enc(buf, NULL);
+! if (q != NULL)
+! {
+! vim_strncpy(name, q, (len > 0) ? len - 1 : flen);
+! vim_free(q);
+! return;
+! }
+! }
+! }
+! return;
+! }
+!
+! /* If 'enc' is utf-8, flen can be larger than _MAX_PATH.
+! * So we should check this after calling wide function. */
+! if (flen > _MAX_PATH)
+ return;
+
+! /* Build the new name in szTrueName[] one component at a time. */
+! porig = (char *)name;
+! ptrue = szTrueName;
+!
+! if (isalpha(porig[0]) && porig[1] == ':')
+ {
+! /* copy leading drive letter */
+! *ptrue++ = *porig++;
+! *ptrue++ = *porig++;
+! }
+! *ptrue = NUL; /* in case nothing follows */
+!
+! while (*porig != NUL)
+! {
+! /* copy \ characters */
+! while (*porig == psepc)
+! *ptrue++ = *porig++;
+
+! ptruePrev = ptrue;
+! porigPrev = porig;
+! while (*porig != NUL && *porig != psepc)
+ {
+! int l;
+!
+! if (enc_dbcs)
+! {
+! l = (*mb_ptr2len)((char_u *)porig);
+! while (--l >= 0)
+! *ptrue++ = *porig++;
+! }
+! else
+! *ptrue++ = *porig++;
+! }
+! *ptrue = NUL;
+!
+! /* To avoid a slow failure append "\*" when searching a directory,
+! * server or network share. */
+! STRCPY(szTrueNameTemp, szTrueName);
+! slen = (int)strlen(szTrueNameTemp);
+! if (*porig == psepc && slen + 2 < _MAX_PATH)
+! STRCPY(szTrueNameTemp + slen, "\\*");
+!
+! /* Skip "", "." and "..". */
+! if (ptrue > ptruePrev
+! && (ptruePrev[0] != '.'
+! || (ptruePrev[1] != NUL
+! && (ptruePrev[1] != '.' || ptruePrev[2] != NUL)))
+! && (hFind = FindFirstFile(szTrueNameTemp, &fb))
+! != INVALID_HANDLE_VALUE)
+! {
+! c = *porig;
+! *porig = NUL;
+!
+! /* Only use the match when it's the same name (ignoring case) or
+! * expansion is allowed and there is a match with the short name
+! * and there is enough room. */
+! if (_stricoll(porigPrev, fb.cFileName) == 0
+! || (len > 0
+! && (_stricoll(porigPrev, fb.cAlternateFileName) == 0
+! && (int)(ptruePrev - szTrueName)
+! + (int)strlen(fb.cFileName) < len)))
+! {
+! STRCPY(ptruePrev, fb.cFileName);
+!
+! /* Look for exact match and prefer it if found. Must be a
+! * long name, otherwise there would be only one match. */
+! while (FindNextFile(hFind, &fb))
+! {
+! if (*fb.cAlternateFileName != NUL
+! && (strcoll(porigPrev, fb.cFileName) == 0
+! || (len > 0
+! && (_stricoll(porigPrev,
+! fb.cAlternateFileName) == 0
+! && (int)(ptruePrev - szTrueName)
+! + (int)strlen(fb.cFileName) < len))))
+! {
+! STRCPY(ptruePrev, fb.cFileName);
+! break;
+! }
+! }
+! }
+! FindClose(hFind);
+! *porig = c;
+! ptrue = ptruePrev + strlen(ptruePrev);
+ }
+ }
+!
+! STRCPY(name, szTrueName);
+ }
+
+
+--- 2791,2812 ----
+
+ slash_adjust(name);
+
+! p = enc_to_utf16(name, NULL);
+! if (p == NULL)
+ return;
+
+! if (GetLongPathNameW(p, buf, _MAX_PATH))
+ {
+! char_u *q = utf16_to_enc(buf, NULL);
+
+! if (q != NULL)
+ {
+! if (len > 0 || flen >= (int)STRLEN(q))
+! vim_strncpy(name, q, (len > 0) ? len - 1 : flen);
+! vim_free(q);
+ }
+ }
+! vim_free(p);
+ }
+
+
+*** ../vim-8.1.1082/src/version.c 2019-03-30 16:39:01.402017674 +0100
+--- src/version.c 2019-03-30 17:24:46.354268220 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1083,
+ /**/
+
+--
+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.1084 b/data/vim/patches/8.1.1084
new file mode 100644
index 000000000..9589667e4
--- /dev/null
+++ b/data/vim/patches/8.1.1084
@@ -0,0 +1,633 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1084
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1084
+Problem: Cannot delete a match from another window. (Paul Jolly)
+Solution: Add window ID argument to matchdelete(), clearmatches(),
+ getmatches() and setmatches(). (Andy Massimino, closes #4178)
+Files: runtime/doc/eval.txt, src/evalfunc.c, src/testdir/test_match.vim
+
+*** ../vim-8.1.1083/runtime/doc/eval.txt 2019-03-29 14:16:34.138861795 +0100
+--- runtime/doc/eval.txt 2019-03-30 17:50:40.288425654 +0100
+***************
+*** 2237,2243 ****
+ changenr() Number current change number
+ char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
+ cindent({lnum}) Number C indent for line {lnum}
+! clearmatches() none clear all matches
+ col({expr}) Number column nr of cursor or mark
+ complete({startcol}, {matches}) none set Insert mode completion
+ complete_add({expr}) Number add completion match
+--- 2265,2271 ----
+ changenr() Number current change number
+ char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
+ cindent({lnum}) Number C indent for line {lnum}
+! clearmatches([{win}]) none clear all matches
+ col({expr}) Number column nr of cursor or mark
+ complete({startcol}, {matches}) none set Insert mode completion
+ complete_add({expr}) Number add completion match
+***************
+*** 2331,2337 ****
+ getline({lnum}) String line {lnum} of current buffer
+ getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
+ getloclist({nr} [, {what}]) List list of location list items
+! getmatches() List list of current matches
+ getpid() Number process ID of Vim
+ getpos({expr}) List position of cursor, mark, etc.
+ getqflist([{what}]) List list of quickfix items
+--- 2359,2365 ----
+ getline({lnum}) String line {lnum} of current buffer
+ getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
+ getloclist({nr} [, {what}]) List list of location list items
+! getmatches([{win}]) List list of current matches
+ getpid() Number process ID of Vim
+ getpos({expr}) List position of cursor, mark, etc.
+ getqflist([{what}]) List list of quickfix items
+***************
+*** 2422,2428 ****
+ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
+ Number highlight positions with {group}
+ matcharg({nr}) List arguments of |:match|
+! matchdelete({id}) Number delete match identified by {id}
+ matchend({expr}, {pat} [, {start} [, {count}]])
+ Number position where {pat} ends in {expr}
+ matchlist({expr}, {pat} [, {start} [, {count}]])
+--- 2450,2456 ----
+ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
+ Number highlight positions with {group}
+ matcharg({nr}) List arguments of |:match|
+! matchdelete({id} [, {win}]) Number delete match identified by {id}
+ matchend({expr}, {pat} [, {start} [, {count}]])
+ Number position where {pat} ends in {expr}
+ matchlist({expr}, {pat} [, {start} [, {count}]])
+***************
+*** 2528,2534 ****
+ setline({lnum}, {line}) Number set line {lnum} to {line}
+ setloclist({nr}, {list} [, {action} [, {what}]])
+ Number modify location list using {list}
+! setmatches({list}) Number restore a list of matches
+ setpos({expr}, {list}) Number set the {expr} position to {list}
+ setqflist({list} [, {action} [, {what}]])
+ Number modify quickfix list using {list}
+--- 2556,2562 ----
+ setline({lnum}, {line}) Number set line {lnum} to {line}
+ setloclist({nr}, {list} [, {action} [, {what}]])
+ Number modify location list using {list}
+! setmatches({list} [, {win}]) Number restore a list of matches
+ setpos({expr}, {list}) Number set the {expr} position to {list}
+ setqflist({list} [, {action} [, {what}]])
+ Number modify quickfix list using {list}
+***************
+*** 3428,3436 ****
+ feature, -1 is returned.
+ See |C-indenting|.
+
+! clearmatches() *clearmatches()*
+! Clears all matches previously defined by |matchadd()| and the
+! |:match| commands.
+
+ *col()*
+ col({expr}) The result is a Number, which is the byte index of the column
+--- 3461,3471 ----
+ feature, -1 is returned.
+ See |C-indenting|.
+
+! clearmatches([{win}]) *clearmatches()*
+! Clears all matches previously defined for the current window
+! by |matchadd()| and the |:match| commands.
+! If {win} is specified, use the window with this number or
+! window ID instead of the current window.
+
+ *col()*
+ col({expr}) The result is a Number, which is the byte index of the column
+***************
+*** 4998,5008 ****
+ |location-list-file-window| for more
+ details.
+
+! getmatches() *getmatches()*
+! Returns a |List| with all matches previously defined by
+! |matchadd()| and the |:match| commands. |getmatches()| is
+! useful in combination with |setmatches()|, as |setmatches()|
+! can restore a list of matches saved by |getmatches()|.
+ Example: >
+ :echo getmatches()
+ < [{'group': 'MyGroup1', 'pattern': 'TODO',
+--- 5038,5049 ----
+ |location-list-file-window| for more
+ details.
+
+! getmatches([{win}]) *getmatches()*
+! Returns a |List| with all matches previously defined for the
+! current window by |matchadd()| and the |:match| commands.
+! |getmatches()| is useful in combination with |setmatches()|,
+! as |setmatches()| can restore a list of matches saved by
+! |getmatches()|.
+ Example: >
+ :echo getmatches()
+ < [{'group': 'MyGroup1', 'pattern': 'TODO',
+***************
+*** 6303,6313 ****
+--- 6349,6362 ----
+ When {expr} is a |List| then this returns the index of the
+ first item where {pat} matches. Each item is used as a
+ String, |Lists| and |Dictionaries| are used as echoed.
++
+ Otherwise, {expr} is used as a String. The result is a
+ Number, which gives the index (byte offset) in {expr} where
+ {pat} matches.
++
+ A match at the first character or |List| item returns zero.
+ If there is no match -1 is returned.
++
+ For getting submatches see |matchlist()|.
+ Example: >
+ :echo match("testing", "ing") " results in 4
+***************
+*** 6359,6365 ****
+ Defines a pattern to be highlighted in the current window (a
+ "match"). It will be highlighted with {group}. Returns an
+ identification number (ID), which can be used to delete the
+! match using |matchdelete()|.
+ Matching is case sensitive and magic, unless case sensitivity
+ or magicness are explicitly overridden in {pattern}. The
+ 'magic', 'smartcase' and 'ignorecase' options are not used.
+--- 6408,6414 ----
+ Defines a pattern to be highlighted in the current window (a
+ "match"). It will be highlighted with {group}. Returns an
+ identification number (ID), which can be used to delete the
+! match using |matchdelete()|. The ID is bound to the window.
+ Matching is case sensitive and magic, unless case sensitivity
+ or magicness are explicitly overridden in {pattern}. The
+ 'magic', 'smartcase' and 'ignorecase' options are not used.
+***************
+*** 6455,6465 ****
+ Highlighting matches using the |:match| commands are limited
+ to three matches. |matchadd()| does not have this limitation.
+
+! matchdelete({id}) *matchdelete()* *E802* *E803*
+ Deletes a match with ID {id} previously defined by |matchadd()|
+ or one of the |:match| commands. Returns 0 if successful,
+ otherwise -1. See example for |matchadd()|. All matches can
+ be deleted in one operation by |clearmatches()|.
+
+ matchend({expr}, {pat} [, {start} [, {count}]]) *matchend()*
+ Same as |match()|, but return the index of first character
+--- 6504,6516 ----
+ Highlighting matches using the |:match| commands are limited
+ to three matches. |matchadd()| does not have this limitation.
+
+! matchdelete({id} [, {win}) *matchdelete()* *E802* *E803*
+ Deletes a match with ID {id} previously defined by |matchadd()|
+ or one of the |:match| commands. Returns 0 if successful,
+ otherwise -1. See example for |matchadd()|. All matches can
+ be deleted in one operation by |clearmatches()|.
++ If {win} is specified, use the window with this number or
++ window ID instead of the current window.
+
+ matchend({expr}, {pat} [, {start} [, {count}]]) *matchend()*
+ Same as |match()|, but return the index of first character
+***************
+*** 7852,7861 ****
+ only the items listed in {what} are set. Refer to |setqflist()|
+ for the list of supported keys in {what}.
+
+! setmatches({list}) *setmatches()*
+! Restores a list of matches saved by |getmatches()|. Returns 0
+! if successful, otherwise -1. All current matches are cleared
+! before the list is restored. See example for |getmatches()|.
+
+ *setpos()*
+ setpos({expr}, {list})
+--- 7921,7933 ----
+ only the items listed in {what} are set. Refer to |setqflist()|
+ for the list of supported keys in {what}.
+
+! setmatches({list} [, {win}]) *setmatches()*
+! Restores a list of matches saved by |getmatches() for the
+! current window|. Returns 0 if successful, otherwise -1. All
+! current matches are cleared before the list is restored. See
+! example for |getmatches()|.
+! If {win} is specified, use the window with this number or
+! window ID instead of the current window.
+
+ *setpos()*
+ setpos({expr}, {list})
+*** ../vim-8.1.1083/src/evalfunc.c 2019-03-30 14:26:15.268619122 +0100
+--- src/evalfunc.c 2019-03-30 18:04:15.531433052 +0100
+***************
+*** 31,36 ****
+--- 31,37 ----
+ static char *e_listarg = N_("E686: Argument of %s must be a List");
+ static char *e_listblobarg = N_("E899: Argument of %s must be a List or Blob");
+ static char *e_stringreq = N_("E928: String required");
++ static char *e_invalwindow = N_("E957: Invalid window number");
+
+ #ifdef FEAT_FLOAT
+ static void f_abs(typval_T *argvars, typval_T *rettv);
+***************
+*** 590,596 ****
+ {"changenr", 0, 0, f_changenr},
+ {"char2nr", 1, 2, f_char2nr},
+ {"cindent", 1, 1, f_cindent},
+! {"clearmatches", 0, 0, f_clearmatches},
+ {"col", 1, 1, f_col},
+ #if defined(FEAT_INS_EXPAND)
+ {"complete", 2, 2, f_complete},
+--- 591,597 ----
+ {"changenr", 0, 0, f_changenr},
+ {"char2nr", 1, 2, f_char2nr},
+ {"cindent", 1, 1, f_cindent},
+! {"clearmatches", 0, 1, f_clearmatches},
+ {"col", 1, 1, f_col},
+ #if defined(FEAT_INS_EXPAND)
+ {"complete", 2, 2, f_complete},
+***************
+*** 677,683 ****
+ {"getjumplist", 0, 2, f_getjumplist},
+ {"getline", 1, 2, f_getline},
+ {"getloclist", 1, 2, f_getloclist},
+! {"getmatches", 0, 0, f_getmatches},
+ {"getpid", 0, 0, f_getpid},
+ {"getpos", 1, 1, f_getpos},
+ {"getqflist", 0, 1, f_getqflist},
+--- 678,684 ----
+ {"getjumplist", 0, 2, f_getjumplist},
+ {"getline", 1, 2, f_getline},
+ {"getloclist", 1, 2, f_getloclist},
+! {"getmatches", 0, 1, f_getmatches},
+ {"getpid", 0, 0, f_getpid},
+ {"getpos", 1, 1, f_getpos},
+ {"getqflist", 0, 1, f_getqflist},
+***************
+*** 761,767 ****
+ {"matchadd", 2, 5, f_matchadd},
+ {"matchaddpos", 2, 5, f_matchaddpos},
+ {"matcharg", 1, 1, f_matcharg},
+! {"matchdelete", 1, 1, f_matchdelete},
+ {"matchend", 2, 4, f_matchend},
+ {"matchlist", 2, 4, f_matchlist},
+ {"matchstr", 2, 4, f_matchstr},
+--- 762,768 ----
+ {"matchadd", 2, 5, f_matchadd},
+ {"matchaddpos", 2, 5, f_matchaddpos},
+ {"matcharg", 1, 1, f_matcharg},
+! {"matchdelete", 1, 2, f_matchdelete},
+ {"matchend", 2, 4, f_matchend},
+ {"matchlist", 2, 4, f_matchlist},
+ {"matchstr", 2, 4, f_matchstr},
+***************
+*** 859,865 ****
+ {"setfperm", 2, 2, f_setfperm},
+ {"setline", 2, 2, f_setline},
+ {"setloclist", 2, 4, f_setloclist},
+! {"setmatches", 1, 1, f_setmatches},
+ {"setpos", 2, 2, f_setpos},
+ {"setqflist", 1, 3, f_setqflist},
+ {"setreg", 2, 3, f_setreg},
+--- 860,866 ----
+ {"setfperm", 2, 2, f_setfperm},
+ {"setline", 2, 2, f_setline},
+ {"setloclist", 2, 4, f_setloclist},
+! {"setmatches", 1, 2, f_setmatches},
+ {"setpos", 2, 2, f_setpos},
+ {"setqflist", 1, 3, f_setqflist},
+ {"setreg", 2, 3, f_setreg},
+***************
+*** 2496,2501 ****
+--- 2497,2519 ----
+ rettv->vval.v_number = -1;
+ }
+
++ static win_T *
++ get_optional_window(typval_T *argvars, int idx)
++ {
++ win_T *win = curwin;
++
++ if (argvars[idx].v_type != VAR_UNKNOWN)
++ {
++ win = find_win_by_nr_or_id(&argvars[idx]);
++ if (win == NULL)
++ {
++ emsg(_(e_invalwindow));
++ return NULL;
++ }
++ }
++ return win;
++ }
++
+ /*
+ * "clearmatches()" function
+ */
+***************
+*** 2503,2509 ****
+ f_clearmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+! clear_matches(curwin);
+ #endif
+ }
+
+--- 2521,2530 ----
+ f_clearmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+! win_T *win = get_optional_window(argvars, 0);
+!
+! if (win != NULL)
+! clear_matches(win);
+ #endif
+ }
+
+***************
+*** 5412,5471 ****
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+ dict_T *dict;
+! matchitem_T *cur = curwin->w_match_head;
+ int i;
+
+! if (rettv_list_alloc(rettv) == OK)
+ {
+! while (cur != NULL)
+ {
+! dict = dict_alloc();
+! if (dict == NULL)
+! return;
+! if (cur->match.regprog == NULL)
+ {
+! /* match added with matchaddpos() */
+! for (i = 0; i < MAXPOSMATCH; ++i)
+! {
+! llpos_T *llpos;
+! char buf[6];
+! list_T *l;
+
+! llpos = &cur->pos.pos[i];
+! if (llpos->lnum == 0)
+! break;
+! l = list_alloc();
+! if (l == NULL)
+! break;
+! list_append_number(l, (varnumber_T)llpos->lnum);
+! if (llpos->col > 0)
+! {
+! list_append_number(l, (varnumber_T)llpos->col);
+! list_append_number(l, (varnumber_T)llpos->len);
+! }
+! sprintf(buf, "pos%d", i + 1);
+! dict_add_list(dict, buf, l);
+ }
+ }
+! else
+! {
+! dict_add_string(dict, "pattern", cur->pattern);
+! }
+! dict_add_string(dict, "group", syn_id2name(cur->hlg_id));
+! dict_add_number(dict, "priority", (long)cur->priority);
+! dict_add_number(dict, "id", (long)cur->id);
+ # if defined(FEAT_CONCEAL)
+! if (cur->conceal_char)
+! {
+! char_u buf[MB_MAXBYTES + 1];
+
+! buf[(*mb_char2bytes)((int)cur->conceal_char, buf)] = NUL;
+! dict_add_string(dict, "conceal", (char_u *)&buf);
+! }
+! # endif
+! list_append_dict(rettv->vval.v_list, dict);
+! cur = cur->next;
+ }
+ }
+ #endif
+ }
+--- 5433,5494 ----
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+ dict_T *dict;
+! matchitem_T *cur;
+ int i;
++ win_T *win = get_optional_window(argvars, 0);
+
+! if (rettv_list_alloc(rettv) == FAIL || win == NULL)
+! return;
+!
+! cur = win->w_match_head;
+! while (cur != NULL)
+ {
+! dict = dict_alloc();
+! if (dict == NULL)
+! return;
+! if (cur->match.regprog == NULL)
+ {
+! /* match added with matchaddpos() */
+! for (i = 0; i < MAXPOSMATCH; ++i)
+ {
+! llpos_T *llpos;
+! char buf[6];
+! list_T *l;
+
+! llpos = &cur->pos.pos[i];
+! if (llpos->lnum == 0)
+! break;
+! l = list_alloc();
+! if (l == NULL)
+! break;
+! list_append_number(l, (varnumber_T)llpos->lnum);
+! if (llpos->col > 0)
+! {
+! list_append_number(l, (varnumber_T)llpos->col);
+! list_append_number(l, (varnumber_T)llpos->len);
+ }
++ sprintf(buf, "pos%d", i + 1);
++ dict_add_list(dict, buf, l);
+ }
+! }
+! else
+! {
+! dict_add_string(dict, "pattern", cur->pattern);
+! }
+! dict_add_string(dict, "group", syn_id2name(cur->hlg_id));
+! dict_add_number(dict, "priority", (long)cur->priority);
+! dict_add_number(dict, "id", (long)cur->id);
+ # if defined(FEAT_CONCEAL)
+! if (cur->conceal_char)
+! {
+! char_u buf[MB_MAXBYTES + 1];
+
+! buf[(*mb_char2bytes)((int)cur->conceal_char, buf)] = NUL;
+! dict_add_string(dict, "conceal", (char_u *)&buf);
+ }
++ # endif
++ list_append_dict(rettv->vval.v_list, dict);
++ cur = cur->next;
+ }
+ #endif
+ }
+***************
+*** 8245,8251 ****
+ *win = find_win_by_nr_or_id(&di->di_tv);
+ if (*win == NULL)
+ {
+! emsg(_("E957: Invalid window number"));
+ return FAIL;
+ }
+ }
+--- 8268,8274 ----
+ *win = find_win_by_nr_or_id(&di->di_tv);
+ if (*win == NULL)
+ {
+! emsg(_(e_invalwindow));
+ return FAIL;
+ }
+ }
+***************
+*** 8393,8399 ****
+ f_matchdelete(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+! rettv->vval.v_number = match_delete(curwin,
+ (int)tv_get_number(&argvars[0]), TRUE);
+ #endif
+ }
+--- 8416,8427 ----
+ f_matchdelete(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+ {
+ #ifdef FEAT_SEARCH_EXTRA
+! win_T *win = get_optional_window(argvars, 1);
+!
+! if (win == NULL)
+! rettv->vval.v_number = -1;
+! else
+! rettv->vval.v_number = match_delete(win,
+ (int)tv_get_number(&argvars[0]), TRUE);
+ #endif
+ }
+***************
+*** 11206,11211 ****
+--- 11234,11240 ----
+ listitem_T *li;
+ dict_T *d;
+ list_T *s = NULL;
++ win_T *win = get_optional_window(argvars, 1);
+
+ rettv->vval.v_number = -1;
+ if (argvars[0].v_type != VAR_LIST)
+***************
+*** 11213,11221 ****
+ emsg(_(e_listreq));
+ return;
+ }
+ if ((l = argvars[0].vval.v_list) != NULL)
+ {
+-
+ /* To some extent make sure that we are dealing with a list from
+ * "getmatches()". */
+ li = l->lv_first;
+--- 11242,11252 ----
+ emsg(_(e_listreq));
+ return;
+ }
++ if (win == NULL)
++ return;
++
+ if ((l = argvars[0].vval.v_list) != NULL)
+ {
+ /* To some extent make sure that we are dealing with a list from
+ * "getmatches()". */
+ li = l->lv_first;
+***************
+*** 11239,11245 ****
+ li = li->li_next;
+ }
+
+! clear_matches(curwin);
+ li = l->lv_first;
+ while (li != NULL)
+ {
+--- 11270,11276 ----
+ li = li->li_next;
+ }
+
+! clear_matches(win);
+ li = l->lv_first;
+ while (li != NULL)
+ {
+***************
+*** 11286,11298 ****
+ : NULL;
+ if (i == 0)
+ {
+! match_add(curwin, group,
+ dict_get_string(d, (char_u *)"pattern", FALSE),
+ priority, id, NULL, conceal);
+ }
+ else
+ {
+! match_add(curwin, group, NULL, priority, id, s, conceal);
+ list_unref(s);
+ s = NULL;
+ }
+--- 11317,11329 ----
+ : NULL;
+ if (i == 0)
+ {
+! match_add(win, group,
+ dict_get_string(d, (char_u *)"pattern", FALSE),
+ priority, id, NULL, conceal);
+ }
+ else
+ {
+! match_add(win, group, NULL, priority, id, s, conceal);
+ list_unref(s);
+ s = NULL;
+ }
+*** ../vim-8.1.1083/src/testdir/test_match.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_match.vim 2019-03-30 17:48:06.817387861 +0100
+***************
+*** 205,210 ****
+--- 205,223 ----
+ call assert_equal(screenattr(1,2), screenattr(2,2))
+ call assert_notequal(screenattr(1,2), screenattr(1,4))
+
++ let savematches = getmatches(winid)
++ let expect = [
++ \ {'group': 'Search', 'pattern': '4', 'priority': 10, 'id': 4},
++ \ {'group': 'Error', 'id': 5, 'priority': 10, 'pos1': [1, 2, 1], 'pos2': [2, 2, 1]},
++ \]
++ call assert_equal(expect, savematches)
++
++ call clearmatches(winid)
++ call assert_equal([], getmatches(winid))
++
++ call setmatches(savematches, winid)
++ call assert_equal(expect, savematches)
++
+ wincmd w
+ bwipe!
+ call clearmatches()
+*** ../vim-8.1.1083/src/version.c 2019-03-30 17:28:11.920987602 +0100
+--- src/version.c 2019-03-30 17:51:29.572116891 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1084,
+ /**/
+
+
+--
+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.1085 b/data/vim/patches/8.1.1085
new file mode 100644
index 000000000..06a0193c2
--- /dev/null
+++ b/data/vim/patches/8.1.1085
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1085
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1085
+Problem: Compiler warning for possibly uninitialized variable. (Tony
+ Mechelynck)
+Solution: Make conditions more logical.
+Files: src/arabic.c
+
+
+*** ../vim-8.1.1084/src/arabic.c 2019-03-22 16:33:03.483016118 +0100
+--- src/arabic.c 2019-03-30 18:22:15.920979930 +0100
+***************
+*** 363,380 ****
+ int backward_combine = !prev_laa && can_join(prev_c, c);
+ int forward_combine = can_join(c, next_c);
+
+! if (backward_combine && forward_combine)
+! curr_c = curr_a->medial;
+! if (backward_combine && !forward_combine)
+! curr_c = curr_a->final;
+! if (!backward_combine && forward_combine)
+! curr_c = curr_a->initial;
+! if (!backward_combine && !forward_combine)
+! curr_c = curr_a->isolated;
+ }
+
+! // Sanity check -- curr_c should, in the future, never be 0.
+! // We should, in the future, insert a fatal error here.
+ if (curr_c == NUL)
+ curr_c = c;
+
+--- 363,385 ----
+ int backward_combine = !prev_laa && can_join(prev_c, c);
+ int forward_combine = can_join(c, next_c);
+
+! if (backward_combine)
+! {
+! if (forward_combine)
+! curr_c = curr_a->medial;
+! else
+! curr_c = curr_a->final;
+! }
+! else
+! {
+! if (forward_combine)
+! curr_c = curr_a->initial;
+! else
+! curr_c = curr_a->isolated;
+! }
+ }
+
+! // Character missing from the table means using original character.
+ if (curr_c == NUL)
+ curr_c = c;
+
+*** ../vim-8.1.1084/src/version.c 2019-03-30 18:10:57.653082357 +0100
+--- src/version.c 2019-03-30 18:18:29.270361252 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1085,
+ /**/
+
+--
+If you feel lonely, try schizophrenia.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1086 b/data/vim/patches/8.1.1086
new file mode 100644
index 000000000..6c8ded11e
--- /dev/null
+++ b/data/vim/patches/8.1.1086
@@ -0,0 +1,1395 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1086
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1086
+Problem: Too many curly braces.
+Solution: Remove curly braces where they are not needed. (Hirohito Higashi,
+ closes #3982)
+Files: src/autocmd.c, src/buffer.c, src/crypt_zip.c, src/dosinst.c,
+ src/edit.c, src/insexpand.c, src/evalfunc.c, src/ex_cmds.c,
+ src/ex_docmd.c, src/ex_getln.c, src/getchar.c, src/gui.c,
+ src/gui_gtk.c, src/gui_mac.c, src/gui_motif.c, src/gui_photon.c,
+ src/gui_w32.c, src/gui_x11.c, src/if_mzsch.c, src/if_python3.c,
+ src/if_ruby.c, src/if_tcl.c, src/indent.c, src/libvterm/src/pen.c,
+ src/macros.h, src/memline.c, src/menu.c, src/misc1.c, src/move.c,
+ src/netbeans.c, src/normal.c, src/ops.c, src/option.c,
+ src/os_mswin.c, src/os_qnx.c, src/os_unix.c, src/os_win32.c,
+ src/regexp_nfa.c, src/screen.c, src/spell.c, src/terminal.c
+
+
+*** ../vim-8.1.1085/src/autocmd.c 2019-01-26 16:20:44.264683546 +0100
+--- src/autocmd.c 2019-03-30 18:37:32.355407021 +0100
+***************
+*** 517,525 ****
+ }
+ vim_free(AUGROUP_NAME(i));
+ if (in_use)
+- {
+ AUGROUP_NAME(i) = get_deleted_augroup();
+- }
+ else
+ AUGROUP_NAME(i) = NULL;
+ }
+--- 517,523 ----
+*** ../vim-8.1.1085/src/buffer.c 2019-03-24 14:02:00.981468747 +0100
+--- src/buffer.c 2019-03-30 18:37:32.355407021 +0100
+***************
+*** 1595,1603 ****
+ set_curbuf(buf, action);
+
+ if (action == DOBUF_SPLIT)
+- {
+ RESET_BINDING(curwin); /* reset 'scrollbind' and 'cursorbind' */
+- }
+
+ #if defined(FEAT_EVAL)
+ if (aborting()) /* autocmds may abort script processing */
+--- 1595,1601 ----
+***************
+*** 3054,3062 ****
+ /* put "line 999" in column 40 or after the file name */
+ i = 40 - vim_strsize(IObuff);
+ do
+- {
+ IObuff[len++] = ' ';
+! } while (--i > 0 && len < IOSIZE - 18);
+ vim_snprintf((char *)IObuff + len, (size_t)(IOSIZE - len),
+ _("line %ld"), buf == curbuf ? curwin->w_cursor.lnum
+ : (long)buflist_findlnum(buf));
+--- 3052,3059 ----
+ /* put "line 999" in column 40 or after the file name */
+ i = 40 - vim_strsize(IObuff);
+ do
+ IObuff[len++] = ' ';
+! while (--i > 0 && len < IOSIZE - 18);
+ vim_snprintf((char *)IObuff + len, (size_t)(IOSIZE - len),
+ _("line %ld"), buf == curbuf ? curwin->w_cursor.lnum
+ : (long)buflist_findlnum(buf));
+*** ../vim-8.1.1085/src/crypt_zip.c 2019-01-24 17:59:35.131217488 +0100
+--- src/crypt_zip.c 2019-03-30 18:37:32.355407021 +0100
+***************
+*** 68,79 ****
+ /*
+ * Update the encryption keys with the next byte of plain text.
+ */
+! #define UPDATE_KEYS_ZIP(keys, c) { \
+ keys[0] = CRC32(keys[0], (c)); \
+ keys[1] += keys[0] & 0xff; \
+ keys[1] = keys[1] * 134775813L + 1; \
+ keys[2] = CRC32(keys[2], (int)(keys[1] >> 24)); \
+! }
+
+ /*
+ * Initialize for encryption/decryption.
+--- 68,79 ----
+ /*
+ * Update the encryption keys with the next byte of plain text.
+ */
+! #define UPDATE_KEYS_ZIP(keys, c) do { \
+ keys[0] = CRC32(keys[0], (c)); \
+ keys[1] += keys[0] & 0xff; \
+ keys[1] = keys[1] * 134775813L + 1; \
+ keys[2] = CRC32(keys[2], (int)(keys[1] >> 24)); \
+! } while (0)
+
+ /*
+ * Initialize for encryption/decryption.
+***************
+*** 98,106 ****
+ zs->keys[1] = 591751049L;
+ zs->keys[2] = 878082192L;
+ for (p = key; *p != NUL; ++p)
+- {
+ UPDATE_KEYS_ZIP(zs->keys, (int)*p);
+- }
+ }
+
+ /*
+--- 98,104 ----
+*** ../vim-8.1.1085/src/dosinst.c 2019-02-22 19:40:57.693250456 +0100
+--- src/dosinst.c 2019-03-30 18:37:32.355407021 +0100
+***************
+*** 849,855 ****
+ * for MSDOS and NT.
+ * The order of preference is:
+ * 1. $VIMRUNTIME/vim.exe (user preference)
+! * 2. $VIM/vim70/vim.exe (hard coded version)
+ * 3. installdir/vim.exe (hard coded install directory)
+ */
+ fprintf(fd, "set VIM_EXE_DIR=%s\n", installdir);
+--- 849,855 ----
+ * for MSDOS and NT.
+ * The order of preference is:
+ * 1. $VIMRUNTIME/vim.exe (user preference)
+! * 2. $VIM/vim81/vim.exe (hard coded version)
+ * 3. installdir/vim.exe (hard coded install directory)
+ */
+ fprintf(fd, "set VIM_EXE_DIR=%s\n", installdir);
+***************
+*** 1568,1576 ****
+
+ for (i = 0; ERROR_SUCCESS == lRet
+ && i < sizeof(openwith) / sizeof(openwith[0]); i++)
+- {
+ lRet = reg_create_key_and_value(hRootKey, openwith[i], NULL, "", flag);
+- }
+ }
+
+ return lRet;
+--- 1568,1574 ----
+*** ../vim-8.1.1085/src/edit.c 2019-03-30 13:53:26.170425120 +0100
+--- src/edit.c 2019-03-30 18:37:32.355407021 +0100
+***************
+*** 5363,5371 ****
+ 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.
+--- 5363,5370 ----
+ 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.
+*** ../vim-8.1.1085/src/insexpand.c 2019-03-30 13:53:26.174425093 +0100
+--- src/insexpand.c 2019-03-30 18:38:17.835144688 +0100
+***************
+*** 2606,2614 ****
+ TAG_REGEXP | TAG_NAMES | TAG_NOIC | TAG_INS_COMP
+ | (ctrl_x_mode != CTRL_X_NORMAL ? TAG_VERBOSE : 0),
+ TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
+- {
+ ins_compl_add_matches(num_matches, matches, p_ic);
+- }
+ p_ic = save_p_ic;
+ break;
+
+--- 2606,2612 ----
+*** ../vim-8.1.1085/src/evalfunc.c 2019-03-30 18:10:57.649082383 +0100
+--- src/evalfunc.c 2019-03-30 18:37:32.359406998 +0100
+***************
+*** 3568,3576 ****
+ && argvars[2].v_type != VAR_UNKNOWN
+ && tv_get_number_chk(&argvars[2], &error)
+ && !error)
+- {
+ rettv_list_set(rettv, NULL);
+- }
+
+ s = tv_get_string(&argvars[0]);
+ if (*s == '%' || *s == '#' || *s == '<')
+--- 3568,3574 ----
+***************
+*** 6081,6089 ****
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+ if (tv_get_number_chk(&argvars[2], &error))
+- {
+ rettv_list_set(rettv, NULL);
+- }
+ if (argvars[3].v_type != VAR_UNKNOWN
+ && tv_get_number_chk(&argvars[3], &error))
+ options |= WILD_ALLLINKS;
+--- 6079,6085 ----
+***************
+*** 6137,6145 ****
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+ if (tv_get_number_chk(&argvars[3], &error))
+- {
+ rettv_list_set(rettv, NULL);
+- }
+ if (argvars[4].v_type != VAR_UNKNOWN
+ && tv_get_number_chk(&argvars[4], &error))
+ flags |= WILD_ALLLINKS;
+--- 6133,6139 ----
+*** ../vim-8.1.1085/src/ex_cmds.c 2019-03-27 22:53:49.915226686 +0100
+--- src/ex_cmds.c 2019-03-30 18:37:32.359406998 +0100
+***************
+*** 3361,3369 ****
+ /* Change directories when the 'acd' option is set and the file name
+ * got changed or set. */
+ if (eap->cmdidx == CMD_saveas || name_was_missing)
+- {
+ DO_AUTOCHDIR;
+- }
+ }
+
+ theend:
+--- 3361,3367 ----
+*** ../vim-8.1.1085/src/ex_docmd.c 2019-03-30 14:26:15.268619122 +0100
+--- src/ex_docmd.c 2019-03-30 18:37:32.359406998 +0100
+***************
+*** 8407,8415 ****
+ || cmdmod.browse
+ # endif
+ )
+- {
+ RESET_BINDING(curwin);
+- }
+ else
+ do_check_scrollbind(FALSE);
+ do_exedit(eap, old_curwin);
+--- 8407,8413 ----
+*** ../vim-8.1.1085/src/ex_getln.c 2019-02-17 17:44:36.207875527 +0100
+--- src/ex_getln.c 2019-03-30 18:37:32.363406975 +0100
+***************
+*** 1029,1037 ****
+ /* Get a character. Ignore K_IGNORE and K_NOP, they should not do
+ * anything, such as stop completion. */
+ do
+- {
+ c = safe_vgetc();
+! } while (c == K_IGNORE || c == K_NOP);
+
+ if (KeyTyped)
+ {
+--- 1029,1036 ----
+ /* Get a character. Ignore K_IGNORE and K_NOP, they should not do
+ * anything, such as stop completion. */
+ do
+ c = safe_vgetc();
+! while (c == K_IGNORE || c == K_NOP);
+
+ if (KeyTyped)
+ {
+***************
+*** 2833,2841 ****
+ if (*p == TAB)
+ {
+ do
+- {
+ msg_putchar(' ');
+! } while (++vcol % 8);
+ ++p;
+ }
+ else
+--- 2832,2839 ----
+ if (*p == TAB)
+ {
+ do
+ msg_putchar(' ');
+! while (++vcol % 8);
+ ++p;
+ }
+ else
+***************
+*** 2908,2916 ****
+ {
+ /* Don't use chartabsize(), 'ts' can be different */
+ do
+- {
+ msg_putchar(' ');
+! } while (++vcol % 8);
+ }
+ else
+ {
+--- 2906,2913 ----
+ {
+ /* Don't use chartabsize(), 'ts' can be different */
+ do
+ msg_putchar(' ');
+! while (++vcol % 8);
+ }
+ else
+ {
+*** ../vim-8.1.1085/src/getchar.c 2019-03-10 09:41:46.474817008 +0100
+--- src/getchar.c 2019-03-30 18:37:32.363406975 +0100
+***************
+*** 1813,1821 ****
+ int c;
+
+ do
+- {
+ c = safe_vgetc();
+! } while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
+
+ if (c == K_PS)
+ /* Only handle the first pasted character. Drop the rest, since we
+--- 1813,1820 ----
+ int c;
+
+ do
+ c = safe_vgetc();
+! while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
+
+ if (c == K_PS)
+ /* Only handle the first pasted character. Drop the rest, since we
+*** ../vim-8.1.1085/src/gui.c 2019-02-17 17:44:36.207875527 +0100
+--- src/gui.c 2019-03-30 18:37:32.363406975 +0100
+***************
+*** 3508,3516 ****
+ else
+ {
+ FOR_ALL_WINDOWS(wp)
+- {
+ gui_do_scrollbar(wp, i, gui.which_scrollbars[i]);
+- }
+ }
+ if (gui.which_scrollbars[i] != prev_which_scrollbars[i])
+ {
+--- 3508,3514 ----
+***************
+*** 3830,3838 ****
+ else
+ {
+ FOR_ALL_WINDOWS(wp)
+- {
+ gui_do_scrollbar(wp, i, FALSE);
+- }
+ }
+ curtab->tp_prev_which_scrollbars[i] = -1;
+ }
+--- 3828,3834 ----
+*** ../vim-8.1.1085/src/gui_gtk.c 2019-02-17 17:44:36.207875527 +0100
+--- src/gui_gtk.c 2019-03-30 18:37:32.363406975 +0100
+***************
+*** 2573,2581 ****
+ nonempty = (entry_text[0] != '\0');
+
+ if (dialog == find_widgets.dialog)
+- {
+ gtk_widget_set_sensitive(find_widgets.find, nonempty);
+- }
+
+ if (dialog == repl_widgets.dialog)
+ {
+--- 2573,2579 ----
+*** ../vim-8.1.1085/src/gui_mac.c 2019-03-02 10:13:36.796974835 +0100
+--- src/gui_mac.c 2019-03-30 18:37:32.363406975 +0100
+***************
+*** 360,368 ****
+ for (c = Cstring, p = PascalString+1, len = 0; (*c != 0) && (len < 255); c++)
+ {
+ if ((*c == '\\') && (c[1] != 0))
+- {
+ c++;
+- }
+ *p = *c;
+ p++;
+ len++;
+--- 360,366 ----
+***************
+*** 1259,1283 ****
+ error = AEInstallEventHandler(kCoreEventClass, kAEOpenApplication,
+ NewAEEventHandlerUPP(Handle_aevt_oapp_AE), 0, false);
+ if (error)
+- {
+ return error;
+- }
+
+ /* install quit application handler */
+ error = AEInstallEventHandler(kCoreEventClass, kAEQuitApplication,
+ NewAEEventHandlerUPP(Handle_aevt_quit_AE), 0, false);
+ if (error)
+- {
+ return error;
+- }
+
+ /* install open document handler */
+ error = AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments,
+ NewAEEventHandlerUPP(HandleODocAE), 0, false);
+ if (error)
+- {
+ return error;
+- }
+
+ /* install print document handler */
+ error = AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments,
+--- 1257,1275 ----
+***************
+*** 1331,1345 ****
+ error = AEInstallEventHandler('KAHL', 'GTTX',
+ NewAEEventHandlerUPP(Handle_KAHL_GTTX_AE), 0, false);
+ if (error)
+- {
+ return error;
+- }
+ error = AEInstallEventHandler('KAHL', 'SRCH',
+ NewAEEventHandlerUPP(Handle_KAHL_SRCH_AE), 0, false);
+ if (error)
+- {
+ return error;
+- }
+ error = AEInstallEventHandler('KAHL', 'MOD ',
+ NewAEEventHandlerUPP(Handle_KAHL_MOD_AE), 0, false);
+ #endif
+--- 1323,1333 ----
+***************
+*** 3857,3865 ****
+ /* SelectFont(hdc, gui.currFont); */
+
+ if (flags & DRAW_TRANSP)
+- {
+ TextMode(srcOr);
+- }
+
+ MoveTo(TEXT_X(col), TEXT_Y(row));
+ DrawText((char *)s, 0, len);
+--- 3845,3851 ----
+***************
+*** 3939,3947 ****
+
+ /* SelectFont(hdc, gui.currFont); */
+ if (flags & DRAW_TRANSP)
+- {
+ TextMode(srcOr);
+- }
+
+ MoveTo(TEXT_X(col), TEXT_Y(row));
+
+--- 3925,3931 ----
+***************
+*** 4620,4632 ****
+ GetWindowBounds(gui.VimWindow, kWindowGlobalPortRgn, &VimBound);
+
+ if (gui.which_scrollbars[SBAR_LEFT])
+- {
+ VimBound.left = -gui.scrollbar_width + 1;
+- }
+ else
+- {
+ VimBound.left = 0;
+- }
+
+ SetWindowBounds(gui.VimWindow, kWindowGlobalPortRgn, &VimBound);
+
+--- 4604,4612 ----
+***************
+*** 5675,5683 ****
+
+ /* Hang until one of the button is hit */
+ do
+- {
+ ModalDialog(dialogUPP, &itemHit);
+! } while ((itemHit < 1) || (itemHit > lastButton));
+
+ #ifdef USE_CARBONKEYHANDLER
+ dialog_busy = FALSE;
+--- 5655,5662 ----
+
+ /* Hang until one of the button is hit */
+ do
+ ModalDialog(dialogUPP, &itemHit);
+! while ((itemHit < 1) || (itemHit > lastButton));
+
+ #ifdef USE_CARBONKEYHANDLER
+ dialog_busy = FALSE;
+*** ../vim-8.1.1085/src/gui_motif.c 2019-01-17 17:13:25.920984090 +0100
+--- src/gui_motif.c 2019-03-30 18:37:32.363406975 +0100
+***************
+*** 916,928 ****
+ # endif
+ {
+ if (gui.menu_bg_pixel != INVALCOLOR)
+- {
+ XtSetArg(arg[0], XmNbackground, gui.menu_bg_pixel); n++;
+- }
+ if (gui.menu_fg_pixel != INVALCOLOR)
+- {
+ XtSetArg(arg[1], XmNforeground, gui.menu_fg_pixel); n++;
+- }
+ menu->submenu_id = XmCreatePopupMenu(textArea, "contextMenu",
+ arg, n);
+ menu->id = (Widget)0;
+--- 916,924 ----
+***************
+*** 1243,1251 ****
+ else
+ {
+ if (menu->xpm_fname != NULL)
+- {
+ XtSetArg(args[n], XmNpixmapFile, menu->xpm_fname); n++;
+- }
+ XtSetArg(args[n], XmNpixmapData, menu->xpm); n++;
+ XtSetArg(args[n], XmNlabelLocation, XmBOTTOM); n++;
+ }
+--- 1239,1245 ----
+*** ../vim-8.1.1085/src/gui_photon.c 2019-01-28 22:32:54.891909109 +0100
+--- src/gui_photon.c 2019-03-30 18:37:32.363406975 +0100
+***************
+*** 451,459 ****
+
+ /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */
+ if (key->key_flags & Pk_KF_Compose)
+- {
+ return Pt_CONTINUE;
+- }
+
+ if ((key->key_flags & Pk_KF_Cap_Valid) &&
+ PkIsKeyDown(key->key_flags))
+--- 451,457 ----
+***************
+*** 1011,1019 ****
+ for (i = 0; i < num_panels; i++)
+ {
+ if (STRCMP(panel_titles[ i ], name) != 0)
+- {
+ *s++ = panel_titles[ i ];
+- }
+ }
+ num_panels--;
+
+--- 1009,1015 ----
+***************
+*** 1334,1342 ****
+
+ PtAppAddWorkProc(NULL, exit_gui_mch_update, &working);
+ while ((working == TRUE) && !vim_is_input_buf_full())
+- {
+ PtProcessEvent();
+- }
+ }
+
+ int
+--- 1330,1336 ----
+***************
+*** 2408,2416 ****
+
+ if (menu->iconidx >= 0 &&
+ (menu->iconidx < ARRAY_LENGTH(gui_ph_toolbar_images)))
+- {
+ return gui_ph_toolbar_images[menu->iconidx];
+- }
+
+ return NULL;
+ }
+--- 2402,2408 ----
+*** ../vim-8.1.1085/src/gui_w32.c 2019-03-30 16:24:12.236380270 +0100
+--- src/gui_w32.c 2019-03-30 18:37:32.367406953 +0100
+***************
+*** 1155,1163 ****
+ /* If the OS is Windows NT, and 'encoding' differs from active codepage:
+ * convert text from wide string. */
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+- {
+ findrep_wtoa(&s_findrep_struct, &s_findrep_struct_w);
+- }
+
+ if (s_findrep_struct.Flags & FR_DIALOGTERM)
+ /* Give main window the focus back. */
+--- 1155,1161 ----
+***************
+*** 2633,2641 ****
+ }
+ }
+ if (wstr == NULL)
+- {
+ TabCtrl_SetItem(s_tabhwnd, nr, &tie);
+- }
+ }
+
+ /* Remove any old labels. */
+--- 2631,2637 ----
+***************
+*** 4289,4297 ****
+ }
+
+ if (fix_window && menu_height != old_menu_height)
+- {
+ gui_set_shellsize(FALSE, FALSE, RESIZE_VERT);
+- }
+ old_menu_height = menu_height;
+
+ return menu_height;
+--- 4285,4291 ----
+***************
+*** 4861,4869 ****
+ default:
+ #ifdef MSWIN_FIND_REPLACE
+ if (uMsg == s_findrep_msg && s_findrep_msg != 0)
+- {
+ _OnFindRepl();
+- }
+ #endif
+ return MyWindowProc(hwnd, uMsg, wParam, lParam);
+ }
+--- 4855,4861 ----
+*** ../vim-8.1.1085/src/gui_x11.c 2019-01-28 22:32:54.895909080 +0100
+--- src/gui_x11.c 2019-03-30 18:37:32.367406953 +0100
+***************
+*** 3015,3023 ****
+
+ if (e->type == PropertyNotify && e->window == commWindow
+ && e->atom == commProperty && e->state == PropertyNewValue)
+- {
+ serverEventProc(gui.dpy, event, 0);
+- }
+ }
+ #endif
+
+--- 3015,3021 ----
+*** ../vim-8.1.1085/src/if_mzsch.c 2019-02-17 17:44:36.211875510 +0100
+--- src/if_mzsch.c 2019-03-30 18:37:32.367406953 +0100
+***************
+*** 3805,3813 ****
+ Scheme_Object *item = SCHEME_CAR(requested_access);
+ if (scheme_eq(item, M_write) || scheme_eq(item, M_read)
+ || scheme_eq(item, M_execute) || scheme_eq(item, M_delete))
+- {
+ raise_vim_exn(_("not allowed in the Vim sandbox"));
+- }
+ requested_access = SCHEME_CDR(requested_access);
+ }
+ }
+--- 3805,3811 ----
+*** ../vim-8.1.1085/src/if_python3.c 2019-03-19 22:22:51.807819390 +0100
+--- src/if_python3.c 2019-03-30 18:37:32.367406953 +0100
+***************
+*** 1236,1244 ****
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
+ &start, &stop,
+ &step, &slicelen) < 0)
+- {
+ return NULL;
+- }
+ return BufferSlice((BufferObject *)(self), start, stop);
+ }
+ else
+--- 1236,1242 ----
+***************
+*** 1268,1276 ****
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
+ &start, &stop,
+ &step, &slicelen) < 0)
+- {
+ return -1;
+- }
+ return RBAsSlice((BufferObject *)(self), start, stop, val, 1,
+ (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count,
+ NULL);
+--- 1266,1272 ----
+***************
+*** 1352,1360 ****
+ ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
+ &start, &stop,
+ &step, &slicelen) < 0)
+- {
+ return NULL;
+- }
+ return RangeSlice((RangeObject *)(self), start, stop);
+ }
+ else
+--- 1348,1354 ----
+***************
+*** 1371,1377 ****
+ {
+ long n = PyLong_AsLong(idx);
+ return RangeAsItem(self, n, val);
+! } else if (PySlice_Check(idx))
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+--- 1365,1372 ----
+ {
+ long n = PyLong_AsLong(idx);
+ return RangeAsItem(self, n, val);
+! }
+! else if (PySlice_Check(idx))
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+***************
+*** 1379,1387 ****
+ ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
+ &start, &stop,
+ &step, &slicelen) < 0)
+- {
+ return -1;
+- }
+ return RangeAsSlice(self, start, stop, val);
+ }
+ else
+--- 1374,1380 ----
+*** ../vim-8.1.1085/src/if_ruby.c 2019-03-26 22:50:19.151698126 +0100
+--- src/if_ruby.c 2019-03-30 18:37:32.367406953 +0100
+***************
+*** 846,854 ****
+ enc = rb_enc_find((char *)sval);
+ vim_free(sval);
+ if (enc)
+- {
+ return rb_enc_str_new(s, (long)strlen(s), enc);
+- }
+ }
+ #endif
+ return rb_str_new2(s);
+--- 846,852 ----
+***************
+*** 1171,1179 ****
+ if (list != NULL)
+ {
+ for (curr = list->lv_first; curr != NULL; curr = curr->li_next)
+- {
+ rb_ary_push(result, vim_to_ruby(&curr->li_tv));
+- }
+ }
+ }
+ else if (tv->v_type == VAR_DICT)
+--- 1169,1175 ----
+***************
+*** 1227,1235 ****
+
+ tv = eval_expr((char_u *)StringValuePtr(str), NULL);
+ if (tv == NULL)
+- {
+ return Qnil;
+- }
+ result = vim_to_ruby(tv);
+
+ free_tv(tv);
+--- 1223,1229 ----
+*** ../vim-8.1.1085/src/if_tcl.c 2019-02-17 17:44:36.211875510 +0100
+--- src/if_tcl.c 2019-03-30 18:37:32.367406953 +0100
+***************
+*** 811,819 ****
+
+ pos = NULL;
+ if (line[0] != '\0' && line[1] == '\0')
+- {
+ pos = getmark(line[0], FALSE);
+- }
+ if (pos == NULL)
+ {
+ Tcl_SetResult(interp, _("invalid mark name"), TCL_STATIC);
+--- 811,817 ----
+***************
+*** 1529,1537 ****
+ if (reflist->interp == interp && reflist->vimobj == vimobj)
+ {
+ if (reflist->delcmd)
+- {
+ Tcl_DecrRefCount(reflist->delcmd);
+- }
+ Tcl_IncrRefCount(delcmd);
+ reflist->delcmd = delcmd;
+ return TCL_OK;
+--- 1527,1533 ----
+*** ../vim-8.1.1085/src/indent.c 2019-02-04 20:30:13.973460115 +0100
+--- src/indent.c 2019-03-30 18:37:32.367406953 +0100
+***************
+*** 3870,3878 ****
+ // this must be the if that we want!
+ // match the indent level of that if.
+ if (elselevel <= 0 && whilelevel <= 0)
+- {
+ return OK;
+- }
+ }
+ }
+ return FAIL;
+--- 3870,3876 ----
+*** ../vim-8.1.1085/src/libvterm/src/pen.c 2018-04-24 18:12:35.000000000 +0200
+--- src/libvterm/src/pen.c 2019-03-30 18:46:34.232215820 +0100
+***************
+*** 385,396 ****
+ break;
+ }
+
+! if(!done)
+ {
+ DEBUG_LOG1("libvterm: Unhandled CSI SGR %lu\n", arg);
+ }
+
+! while(CSI_ARG_HAS_MORE(args[argi++]));
+ }
+ }
+
+--- 385,397 ----
+ break;
+ }
+
+! if (!done)
+ {
+ DEBUG_LOG1("libvterm: Unhandled CSI SGR %lu\n", arg);
+ }
+
+! while (CSI_ARG_HAS_MORE(args[argi++]))
+! ;
+ }
+ }
+
+*** ../vim-8.1.1085/src/macros.h 2019-03-22 16:33:03.483016118 +0100
+--- src/macros.h 2019-03-30 18:37:32.367406953 +0100
+***************
+*** 32,38 ****
+ ? (a)->col < (b)->col \
+ : (a)->coladd < (b)->coladd)
+ #define EQUAL_POS(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd))
+! #define CLEAR_POS(a) {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;}
+
+ #define LTOREQ_POS(a, b) (LT_POS(a, b) || EQUAL_POS(a, b))
+
+--- 32,38 ----
+ ? (a)->col < (b)->col \
+ : (a)->coladd < (b)->coladd)
+ #define EQUAL_POS(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd))
+! #define CLEAR_POS(a) do {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;} while (0)
+
+ #define LTOREQ_POS(a, b) (LT_POS(a, b) || EQUAL_POS(a, b))
+
+***************
+*** 240,246 ****
+ /* get length of multi-byte char, not including composing chars */
+ #define MB_CPTR2LEN(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
+
+! #define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
+ #define MB_CHARLEN(p) (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
+ #define MB_CHAR2LEN(c) (has_mbyte ? mb_char2len(c) : 1)
+ #define PTR2CHAR(p) (has_mbyte ? mb_ptr2char(p) : (int)*(p))
+--- 240,246 ----
+ /* get length of multi-byte char, not including composing chars */
+ #define MB_CPTR2LEN(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
+
+! #define MB_COPY_CHAR(f, t) do { if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++; } while (0)
+ #define MB_CHARLEN(p) (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
+ #define MB_CHAR2LEN(c) (has_mbyte ? mb_char2len(c) : 1)
+ #define PTR2CHAR(p) (has_mbyte ? mb_ptr2char(p) : (int)*(p))
+***************
+*** 251,257 ****
+ # define DO_AUTOCHDIR do { /**/ } while (0)
+ #endif
+
+! #define RESET_BINDING(wp) (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE
+
+ #ifdef FEAT_DIFF
+ # define PLINES_NOFILL(x) plines_nofill(x)
+--- 251,258 ----
+ # define DO_AUTOCHDIR do { /**/ } while (0)
+ #endif
+
+! #define RESET_BINDING(wp) do { (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE; \
+! } while (0)
+
+ #ifdef FEAT_DIFF
+ # define PLINES_NOFILL(x) plines_nofill(x)
+*** ../vim-8.1.1085/src/memline.c 2019-02-17 17:44:36.211875510 +0100
+--- src/memline.c 2019-03-30 18:37:32.371406930 +0100
+***************
+*** 1359,1367 ****
+ && ((mch_stat((char *)mfp->mf_fname, &swp_stat) != -1
+ && org_stat.st_mtime > swp_stat.st_mtime)
+ || org_stat.st_mtime != mtime))
+- {
+ emsg(_("E308: Warning: Original file may have been changed"));
+- }
+ out_flush();
+
+ /* Get the 'fileformat' and 'fileencoding' from block zero. */
+--- 1359,1365 ----
+***************
+*** 5307,5315 ****
+ curix < buf->b_ml.ml_usedchunks - 1
+ && line >= curline + buf->b_ml.ml_chunksize[curix].mlcs_numlines;
+ curix++)
+- {
+ 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)
+--- 5305,5311 ----
+*** ../vim-8.1.1085/src/menu.c 2019-02-17 17:44:36.215875493 +0100
+--- src/menu.c 2019-03-30 18:37:32.371406930 +0100
+***************
+*** 1701,1709 ****
+ {
+ 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;
+ }
+--- 1701,1707 ----
+***************
+*** 1889,1897 ****
+ {
+ #ifdef FEAT_TERMINAL
+ if (term_use_loop())
+- {
+ return MENU_INDEX_TERMINAL;
+- }
+ #endif
+ if (VIsual_active)
+ {
+--- 1887,1893 ----
+*** ../vim-8.1.1085/src/misc1.c 2019-03-16 18:11:03.642997885 +0100
+--- src/misc1.c 2019-03-30 18:37:32.371406930 +0100
+***************
+*** 1949,1957 ****
+ string = vim_strchr(part_buf, ':');
+ if (string == NULL) /* If everything is fine, this cannot actually
+ * happen. */
+- {
+ continue;
+- }
+ *string++ = NUL; /* Isolate flags from string. */
+ com_leader = string;
+
+--- 1949,1955 ----
+***************
+*** 4093,4101 ****
+ || (*src == '%' && *tail != '%')
+ #endif
+ ))
+- {
+ *var++ = *tail++;
+- }
+ }
+
+ #if defined(MSWIN) || defined(UNIX)
+--- 4091,4097 ----
+*** ../vim-8.1.1085/src/move.c 2019-03-20 21:42:16.832737656 +0100
+--- src/move.c 2019-03-30 18:37:32.371406930 +0100
+***************
+*** 1614,1622 ****
+ lp->height = 1;
+ else
+ #endif
+- {
+ lp->height = PLINES_NOFILL(lp->lnum);
+- }
+ }
+ }
+
+--- 1614,1620 ----
+*** ../vim-8.1.1085/src/netbeans.c 2019-02-17 19:12:17.642329933 +0100
+--- src/netbeans.c 2019-03-30 18:37:32.371406930 +0100
+***************
+*** 1509,1517 ****
+ long savedChars = atol((char *)args);
+
+ if (buf == NULL || buf->bufp == NULL)
+- {
+ nbdebug((" invalid buffer identifier in saveDone\n"));
+- }
+ else
+ print_save_msg(buf, savedChars);
+ /* =====================================================================*/
+--- 1509,1515 ----
+***************
+*** 1990,1998 ****
+ args = (char_u *)cp;
+ # ifdef NBDEBUG
+ if (vim_ignored != -1)
+- {
+ nbdebug((" partial line annotation -- Not Yet Implemented!\n"));
+- }
+ # endif
+ if (serNum >= GUARDEDOFFSET)
+ {
+--- 1988,1994 ----
+*** ../vim-8.1.1085/src/normal.c 2019-03-25 22:21:21.557069182 +0100
+--- src/normal.c 2019-03-30 18:37:32.371406930 +0100
+***************
+*** 811,819 ****
+ }
+ else if ((nv_cmds[idx].cmd_flags & NV_SSS)
+ && (mod_mask & MOD_MASK_SHIFT))
+- {
+ mod_mask &= ~MOD_MASK_SHIFT;
+- }
+ }
+ }
+
+--- 811,817 ----
+***************
+*** 3507,3515 ****
+ && col <= (int)startcol
+ && find_is_eval_item(ptr + col, &col, &bn, FORWARD))
+ )
+- {
+ ++col;
+- }
+
+ return col;
+ }
+--- 3505,3511 ----
+***************
+*** 4329,4337 ****
+ * inside a comment, continue searching. For K&R style function
+ * declarations this skips the function header without types. */
+ if (!valid)
+- {
+ CLEAR_POS(&found_pos);
+- }
+ else
+ found_pos = curwin->w_cursor;
+ /* Remove SEARCH_START from flags to avoid getting stuck at one
+--- 4325,4331 ----
+***************
+*** 9449,9457 ****
+ v_swap_corners(cap->cmdchar);
+ #ifdef FEAT_JOB_CHANNEL
+ else if (bt_prompt(curbuf))
+- {
+ clearopbeep(cap->oap);
+- }
+ #endif
+ else
+ n_opencmd(cap);
+--- 9443,9449 ----
+*** ../vim-8.1.1085/src/ops.c 2019-03-09 11:23:53.211751929 +0100
+--- src/ops.c 2019-03-30 18:37:32.371406930 +0100
+***************
+*** 259,267 ****
+ #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT)
+ if (first_char != '#' || !preprocs_left())
+ #endif
+- {
+ shift_line(oap->op_type == OP_LSHIFT, p_sr, amount, FALSE);
+- }
+ ++curwin->w_cursor.lnum;
+ }
+
+--- 259,265 ----
+***************
+*** 3157,3165 ****
+ if (startcol > endcol || is_oneChar)
+ bd.textlen = 0;
+ else
+- {
+ bd.textlen = endcol - startcol + oap->inclusive;
+- }
+ bd.textstart = p + startcol;
+ if (yank_copy_line(&bd, y_idx) == FAIL)
+ goto fail;
+--- 3155,3161 ----
+***************
+*** 4391,4399 ****
+ {
+ if (*comment_flags == COM_END
+ || *comment_flags == ':')
+- {
+ break;
+- }
+ ++comment_flags;
+ }
+
+--- 4387,4393 ----
+***************
+*** 5851,5859 ****
+ goto theend;
+ ptr = buf1;
+ if (negative && (!visual || was_positive))
+- {
+ *ptr++ = '-';
+- }
+ if (pre)
+ {
+ *ptr++ = '0';
+--- 5845,5851 ----
+*** ../vim-8.1.1085/src/option.c 2019-03-24 14:02:00.981468747 +0100
+--- src/option.c 2019-03-30 18:37:32.371406930 +0100
+***************
+*** 6058,6066 ****
+ || sandbox != 0
+ #endif
+ ) && (options[opt_idx].flags & P_SECURE))
+- {
+ 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
+--- 6058,6064 ----
+***************
+*** 6070,6078 ****
+ ? "/\\*?[|;&<>\r\n" : "/\\*?[<>\r\n")) != NULL)
+ || ((options[opt_idx].flags & P_NDNAME)
+ && vim_strpbrk(*varp, (char_u *)"*?[|;&<>\r\n") != NULL))
+- {
+ errmsg = e_invarg;
+- }
+
+ /* 'term' */
+ else if (varp == &T_NAME)
+--- 6068,6074 ----
+***************
+*** 6722,6730 ****
+ break;
+ }
+ if (*s == 'n') /* name is always last one */
+- {
+ break;
+- }
+ else if (*s == 'r') /* skip until next ',' */
+ {
+ while (*++s && *s != ',')
+--- 6718,6724 ----
+***************
+*** 8318,8326 ****
+
+ /* 'compatible' */
+ if ((int *)varp == &p_cp)
+- {
+ compatible_set();
+- }
+
+ #ifdef FEAT_LANGMAP
+ if ((int *)varp == &p_lrm)
+--- 8312,8318 ----
+***************
+*** 8547,8555 ****
+--- 8539,8549 ----
+
+ /* when 'textauto' is set or reset also change 'fileformats' */
+ else if ((int *)varp == &p_ta)
++ {
+ set_string_option_direct((char_u *)"ffs", -1,
+ p_ta ? (char_u *)DFLT_FFS_VIM : (char_u *)"",
+ OPT_FREE | opt_flags, 0);
++ }
+
+ /*
+ * When 'lisp' option changes include/exclude '-' in
+*** ../vim-8.1.1085/src/os_mswin.c 2019-03-30 16:24:12.240380238 +0100
+--- src/os_mswin.c 2019-03-30 18:37:32.371406930 +0100
+***************
+*** 1123,1131 ****
+ BOOL ret;
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+- {
+ wp = enc_to_utf16(s, NULL);
+- }
+ if (wp != NULL)
+ {
+ ret = SetDlgItemTextW(hDlg, nIDDlgItem, wp);
+--- 1123,1129 ----
+***************
+*** 1731,1739 ****
+ int wlen = len;
+
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+- {
+ wp = enc_to_utf16(p, &wlen);
+- }
+ if (wp != NULL)
+ {
+ int ret = FALSE;
+--- 1729,1735 ----
+*** ../vim-8.1.1085/src/os_qnx.c 2016-08-29 22:42:20.000000000 +0200
+--- src/os_qnx.c 2019-03-30 18:37:32.371406930 +0100
+***************
+*** 95,103 ****
+ }
+
+ if ((clip_text != NULL) && (clip_length > 0))
+- {
+ clip_yank_selection(type, clip_text, clip_length, cbd);
+- }
+
+ PhClipboardPasteFinish(cbdata);
+ }
+--- 95,101 ----
+*** ../vim-8.1.1085/src/os_unix.c 2019-03-22 12:03:26.583533911 +0100
+--- src/os_unix.c 2019-03-30 18:37:32.371406930 +0100
+***************
+*** 6119,6127 ****
+ # endif
+ # ifdef FEAT_MOUSE_GPM
+ if (gpm_idx >= 0 && (fds[gpm_idx].revents & POLLIN))
+- {
+ *check_for_gpm = 1;
+- }
+ # endif
+ # ifdef USE_XSMP
+ if (xsmp_idx >= 0 && (fds[xsmp_idx].revents & (POLLIN | POLLHUP)))
+--- 6119,6125 ----
+*** ../vim-8.1.1085/src/os_win32.c 2019-03-30 17:28:11.920987602 +0100
+--- src/os_win32.c 2019-03-30 18:37:32.375406907 +0100
+***************
+*** 2224,2237 ****
+ coord.Y = 0;
+ if (!FillConsoleOutputCharacter(g_hConOut, ' ', NumCells,
+ coord, &dummy))
+- {
+ return FALSE;
+- }
+ if (!FillConsoleOutputAttribute(g_hConOut, wAttribute, NumCells,
+ coord, &dummy))
+- {
+ return FALSE;
+- }
+
+ return TRUE;
+ }
+--- 2224,2233 ----
+***************
+*** 2467,2475 ****
+ cb->BufferSize, /* dimensions of our buffer */
+ BufferCoord, /* offset in our buffer */
+ &WriteRegion)) /* region to restore */
+- {
+ return FALSE;
+- }
+ }
+ }
+
+--- 2463,2469 ----
+*** ../vim-8.1.1085/src/regexp_nfa.c 2019-02-22 17:26:57.735029052 +0100
+--- src/regexp_nfa.c 2019-03-30 18:37:32.375406907 +0100
+***************
+*** 1790,1797 ****
+ if (*regparse == 'n')
+ startc = (reg_string || emit_range
+ || regparse[1] == '-') ? NL : NFA_NEWL;
+! else
+! if (*regparse == 'd'
+ || *regparse == 'o'
+ || *regparse == 'x'
+ || *regparse == 'u'
+--- 1790,1796 ----
+ if (*regparse == 'n')
+ startc = (reg_string || emit_range
+ || regparse[1] == '-') ? NL : NFA_NEWL;
+! else if (*regparse == 'd'
+ || *regparse == 'o'
+ || *regparse == 'x'
+ || *regparse == 'u'
+***************
+*** 2919,2932 ****
+ }
+ # else
+ for (p2 = postfix; p2 < end; p2++)
+- {
+ fprintf(df, "%d, ", *p2);
+- }
+ fprintf(df, "\nCurrent position is: ");
+ for (p2 = postfix; p2 <= p; p2 ++)
+- {
+ fprintf(df, "%d, ", *p2);
+- }
+ # endif
+ fprintf(df, "\n--------------------------\n");
+ fclose(df);
+--- 2918,2927 ----
+*** ../vim-8.1.1085/src/screen.c 2019-03-30 16:39:01.402017674 +0100
+--- src/screen.c 2019-03-30 18:37:32.375406907 +0100
+***************
+*** 232,240 ****
+ win_T *wp;
+
+ FOR_ALL_WINDOWS(wp)
+- {
+ redraw_win_later(wp, type);
+- }
+ // This may be needed when switching tabs.
+ if (must_redraw < type)
+ must_redraw = type;
+--- 232,238 ----
+***************
+*** 3525,3533 ****
+ #endif
+ virtual_active() ||
+ (VIsual_active && wp->w_buffer == curwin->w_buffer)))
+- {
+ vcol = v;
+- }
+
+ /* Handle a character that's not completely on the screen: Put ptr at
+ * that character but skip the first few screen characters. */
+--- 3523,3529 ----
+***************
+*** 10761,10769 ****
+ #endif
+ #if defined(FEAT_STL_OPT)
+ if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height)
+- {
+ redraw_custom_statusline(curwin);
+- }
+ else
+ #endif
+ #ifdef FEAT_CMDL_INFO
+--- 10757,10763 ----
+*** ../vim-8.1.1085/src/spell.c 2019-03-30 13:53:26.174425093 +0100
+--- src/spell.c 2019-03-30 18:37:32.375406907 +0100
+***************
+*** 445,453 ****
+ if (spell_iswordp(mi.mi_fend, wp))
+ {
+ do
+- {
+ MB_PTR_ADV(mi.mi_fend);
+! } while (*mi.mi_fend != NUL && spell_iswordp(mi.mi_fend, wp));
+
+ if (capcol != NULL && *capcol == 0 && wp->w_s->b_cap_prog != NULL)
+ {
+--- 445,452 ----
+ if (spell_iswordp(mi.mi_fend, wp))
+ {
+ do
+ MB_PTR_ADV(mi.mi_fend);
+! while (*mi.mi_fend != NUL && spell_iswordp(mi.mi_fend, wp));
+
+ if (capcol != NULL && *capcol == 0 && wp->w_s->b_cap_prog != NULL)
+ {
+***************
+*** 1463,1471 ****
+
+ p = mip->mi_fend;
+ do
+- {
+ MB_PTR_ADV(mip->mi_fend);
+! } while (*mip->mi_fend != NUL && spell_iswordp(mip->mi_fend, mip->mi_win));
+
+ /* Include the non-word character so that we can check for the word end. */
+ if (*mip->mi_fend != NUL)
+--- 1462,1469 ----
+
+ p = mip->mi_fend;
+ do
+ MB_PTR_ADV(mip->mi_fend);
+! while (*mip->mi_fend != NUL && spell_iswordp(mip->mi_fend, mip->mi_win));
+
+ /* Include the non-word character so that we can check for the word end. */
+ if (*mip->mi_fend != NUL)
+*** ../vim-8.1.1085/src/terminal.c 2019-03-20 20:38:40.378550979 +0100
+--- src/terminal.c 2019-03-30 18:37:32.375406907 +0100
+***************
+*** 4199,4207 ****
+ if (cell.width != prev_cell.width || !same_attr)
+ {
+ if (cell.width == 2)
+- {
+ fputs("*", fd);
+- }
+ else
+ fputs("+", fd);
+
+--- 4199,4205 ----
+*** ../vim-8.1.1085/src/version.c 2019-03-30 18:25:34.643764060 +0100
+--- src/version.c 2019-03-30 18:40:30.834370374 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1086,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+164. You got out to buy software, instead of going out for a beer.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1087 b/data/vim/patches/8.1.1087
new file mode 100644
index 000000000..6e9b53ff2
--- /dev/null
+++ b/data/vim/patches/8.1.1087
@@ -0,0 +1,167 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1087
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1087
+Problem: tag stack is incorrect after CTRL-T and then :tag
+Solution: Handle DT_TAG differently. (test by Andy Massimino, closes #3944,
+ closes #4177)
+Files: src/tag.c, src/testdir/test_tagjump.vim
+
+
+*** ../vim-8.1.1086/src/tag.c 2019-03-30 13:53:26.174425093 +0100
+--- src/tag.c 2019-03-30 18:56:28.956626257 +0100
+***************
+*** 504,516 ****
+ tagmatchname = vim_strsave(name);
+ }
+
+! if (type == DT_TAG || type == DT_SELECT || type == DT_JUMP
+ #if defined(FEAT_QUICKFIX)
+ || type == DT_LTAG
+ #endif
+ )
+ cur_match = MAXCOL - 1;
+! max_num_matches = cur_match + 1;
+
+ /* when the argument starts with '/', use it as a regexp */
+ if (!no_regexp && *name == '/')
+--- 504,519 ----
+ tagmatchname = vim_strsave(name);
+ }
+
+! if (type == DT_SELECT || type == DT_JUMP
+ #if defined(FEAT_QUICKFIX)
+ || type == DT_LTAG
+ #endif
+ )
+ cur_match = MAXCOL - 1;
+! if (type == DT_TAG)
+! max_num_matches = MAXCOL;
+! else
+! max_num_matches = cur_match + 1;
+
+ /* when the argument starts with '/', use it as a regexp */
+ if (!no_regexp && *name == '/')
+***************
+*** 583,589 ****
+ }
+ else
+ #endif
+! if (type == DT_TAG)
+ /*
+ * If a count is supplied to the ":tag <name>" command, then
+ * jump to count'th matching tag.
+--- 586,592 ----
+ }
+ else
+ #endif
+! if (type == DT_TAG && *tag != NUL)
+ /*
+ * If a count is supplied to the ":tag <name>" command, then
+ * jump to count'th matching tag.
+*** ../vim-8.1.1086/src/testdir/test_tagjump.vim 2018-11-11 15:20:32.436704418 +0100
+--- src/testdir/test_tagjump.vim 2019-03-30 19:10:53.703143736 +0100
+***************
+*** 366,369 ****
+--- 366,442 ----
+ set tags&
+ endfunc
+
++ func Test_tag_with_count()
++ call writefile([
++ \ 'test Xtest.h /^void test();$/;" p typeref:typename:void signature:()',
++ \ ], 'Xtags')
++ call writefile([
++ \ 'main Xtest.c /^int main()$/;" f typeref:typename:int signature:()',
++ \ 'test Xtest.c /^void test()$/;" f typeref:typename:void signature:()',
++ \ ], 'Ytags')
++ cal writefile([
++ \ 'int main()',
++ \ 'void test()',
++ \ ], 'Xtest.c')
++ cal writefile([
++ \ 'void test();',
++ \ ], 'Xtest.h')
++ set tags=Xtags,Ytags
++
++ new Xtest.c
++ let tl = taglist('test', 'Xtest.c')
++ call assert_equal(tl[0].filename, 'Xtest.c')
++ call assert_equal(tl[1].filename, 'Xtest.h')
++
++ tag test
++ call assert_equal(bufname('%'), 'Xtest.c')
++ 1tag test
++ call assert_equal(bufname('%'), 'Xtest.c')
++ 2tag test
++ call assert_equal(bufname('%'), 'Xtest.h')
++
++ set tags&
++ call delete('Xtags')
++ call delete('Ytags')
++ bwipe Xtest.h
++ bwipe Xtest.c
++ call delete('Xtest.h')
++ call delete('Xtest.c')
++ endfunc
++
++ func Test_tagnr_recall()
++ call writefile([
++ \ 'test Xtest.h /^void test();$/;" p',
++ \ 'main Xtest.c /^int main()$/;" f',
++ \ 'test Xtest.c /^void test()$/;" f',
++ \ ], 'Xtags')
++ cal writefile([
++ \ 'int main()',
++ \ 'void test()',
++ \ ], 'Xtest.c')
++ cal writefile([
++ \ 'void test();',
++ \ ], 'Xtest.h')
++ set tags=Xtags
++
++ new Xtest.c
++ let tl = taglist('test', 'Xtest.c')
++ call assert_equal(tl[0].filename, 'Xtest.c')
++ call assert_equal(tl[1].filename, 'Xtest.h')
++
++ 2tag test
++ call assert_equal(bufname('%'), 'Xtest.h')
++ pop
++ call assert_equal(bufname('%'), 'Xtest.c')
++ tag
++ call assert_equal(bufname('%'), 'Xtest.h')
++
++ set tag&
++ call delete('Xtags')
++ bwipe Xtest.h
++ bwipe Xtest.c
++ call delete('Xtest.h')
++ call delete('Xtest.c')
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.1086/src/version.c 2019-03-30 18:46:57.364077307 +0100
+--- src/version.c 2019-03-30 18:58:03.612051381 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1087,
+ /**/
+
+--
+You're as much use as a condom machine at the Vatican.
+ -- Rimmer to Holly in Red Dwarf 'Queeg'
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1088 b/data/vim/patches/8.1.1088
new file mode 100644
index 000000000..2945b6630
--- /dev/null
+++ b/data/vim/patches/8.1.1088
@@ -0,0 +1,116 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1088
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1088
+Problem: Height of quickfix window not retained with vertical split.
+Solution: Use frame_fixed_height() and frame_fixed_width(). (Hongbo Liu,
+ closes #4013, closes #2998)
+Files: src/testdir/test_winbuf_close.vim, src/window.c
+
+
+*** ../vim-8.1.1087/src/testdir/test_winbuf_close.vim 2018-05-04 20:13:46.000000000 +0200
+--- src/testdir/test_winbuf_close.vim 2019-03-30 19:17:00.580125232 +0100
+***************
+*** 158,160 ****
+--- 158,186 ----
+ %bwipeout!
+ setlocal nowinfixwidth splitbelow& splitright&
+ endfunction
++
++ " Test that 'winfixheight' will be respected even there is non-leaf frame
++ fun! Test_winfixheight_non_leaf_frame()
++ vsplit
++ botright 11new
++ let l:wid = win_getid()
++ setlocal winfixheight
++ call assert_equal(11, winheight(l:wid))
++ botright new
++ bwipe!
++ call assert_equal(11, winheight(l:wid))
++ %bwipe!
++ endf
++
++ " Test that 'winfixwidth' will be respected even there is non-leaf frame
++ fun! Test_winfixwidth_non_leaf_frame()
++ split
++ topleft 11vnew
++ let l:wid = win_getid()
++ setlocal winfixwidth
++ call assert_equal(11, winwidth(l:wid))
++ topleft new
++ bwipe!
++ call assert_equal(11, winwidth(l:wid))
++ %bwipe!
++ endf
+*** ../vim-8.1.1087/src/window.c 2019-03-17 16:39:01.566006172 +0100
+--- src/window.c 2019-03-30 19:17:00.580125232 +0100
+***************
+*** 2677,2686 ****
+ {
+ if (frp != NULL)
+ {
+! if (frp->fr_win != NULL && !frp->fr_win->w_p_wfh)
+ {
+ frp2 = frp;
+! wp = frp->fr_win;
+ break;
+ }
+ frp = frp->fr_prev;
+--- 2677,2686 ----
+ {
+ if (frp != NULL)
+ {
+! if (!frame_fixed_height(frp))
+ {
+ frp2 = frp;
+! wp = frame2win(frp2);
+ break;
+ }
+ frp = frp->fr_prev;
+***************
+*** 2714,2723 ****
+ {
+ if (frp != NULL)
+ {
+! if (frp->fr_win != NULL && !frp->fr_win->w_p_wfw)
+ {
+ frp2 = frp;
+! wp = frp->fr_win;
+ break;
+ }
+ frp = frp->fr_prev;
+--- 2714,2723 ----
+ {
+ if (frp != NULL)
+ {
+! if (!frame_fixed_width(frp))
+ {
+ frp2 = frp;
+! wp = frame2win(frp2);
+ break;
+ }
+ frp = frp->fr_prev;
+*** ../vim-8.1.1087/src/version.c 2019-03-30 19:11:58.530574234 +0100
+--- src/version.c 2019-03-30 19:43:23.301306005 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1088,
+ /**/
+
+--
+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.1089 b/data/vim/patches/8.1.1089
new file mode 100644
index 000000000..3b6dd3a85
--- /dev/null
+++ b/data/vim/patches/8.1.1089
@@ -0,0 +1,132 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.10
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1089
+Problem: Tutor does not check $LC_MESSAGES.
+Solution: Let $LC_MESSAGES overrule $LANG. (Miklos Vajna, closes #4112)
+Files: runtime/tutor/tutor.vim
+
+
+*** ../vim-8.1.1088/runtime/tutor/tutor.vim 2018-04-11 22:36:41.000000000 +0200
+--- runtime/tutor/tutor.vim 2019-03-30 19:52:42.933244626 +0100
+***************
+*** 1,7 ****
+ " Vim tutor support file
+ " Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
+ " Maintainer: Bram Moolenaar
+! " Last Change: 2018 Apr 11
+
+ " This Vim script is used for detecting if a translation of the
+ " tutor file exist, i.e., a tutor.xx file, where xx is the language.
+--- 1,7 ----
+ " Vim tutor support file
+ " Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
+ " Maintainer: Bram Moolenaar
+! " Last Change: 2019 Mar 30
+
+ " This Vim script is used for detecting if a translation of the
+ " tutor file exist, i.e., a tutor.xx file, where xx is the language.
+***************
+*** 22,27 ****
+--- 22,33 ----
+ let s:lang = v:lang
+ elseif $LC_ALL =~ '\a\a'
+ let s:lang = $LC_ALL
++ elseif $LC_MESSAGES =~ '\a\a' || $LC_MESSAGES ==# "C"
++ " LC_MESSAGES=C can be used to explicitly ask for English messages while
++ " keeping LANG non-English; don't set s:lang then.
++ if $LC_MESSAGES =~ '\a\a'
++ let s:lang = $LC_MESSAGES
++ endif
+ elseif $LANG =~ '\a\a'
+ let s:lang = $LANG
+ endif
+***************
+*** 59,65 ****
+ let s:ext = ""
+ endif
+
+! " The japanese tutor is available in two encodings, guess which one to use
+ " The "sjis" one is actually "cp932", it doesn't matter for this text.
+ if s:ext =~? '\.ja'
+ if &enc =~ "euc"
+--- 65,71 ----
+ let s:ext = ""
+ endif
+
+! " The Japanese tutor is available in three encodings, guess which one to use
+ " The "sjis" one is actually "cp932", it doesn't matter for this text.
+ if s:ext =~? '\.ja'
+ if &enc =~ "euc"
+***************
+*** 69,75 ****
+ endif
+ endif
+
+! " The korean tutor is available in two encodings, guess which one to use
+ if s:ext =~? '\.ko'
+ if &enc != "utf-8"
+ let s:ext = ".ko.euc"
+--- 75,81 ----
+ endif
+ endif
+
+! " The Korean tutor is available in two encodings, guess which one to use
+ if s:ext =~? '\.ko'
+ if &enc != "utf-8"
+ let s:ext = ".ko.euc"
+***************
+*** 169,183 ****
+ endif
+ endif
+
+- " Esperanto is only available in utf-8
+- if s:ext =~? '\.eo'
+- let s:ext = ".eo.utf-8"
+- endif
+- " Vietnamese is only available in utf-8
+- if s:ext =~? '\.vi'
+- let s:ext = ".vi.utf-8"
+- endif
+-
+ " If 'encoding' is utf-8 s:ext must end in utf-8.
+ if &enc == 'utf-8' && s:ext !~ '\.utf-8'
+ let s:ext .= '.utf-8'
+--- 175,180 ----
+***************
+*** 190,195 ****
+--- 187,195 ----
+ " 3. Finding the file:
+ if filereadable(s:tutorxx)
+ let $TUTOR = s:tutorxx
++ elseif s:ext !~ '\.utf-8' && filereadable(s:tutorxx . ".utf-8")
++ " Fallback to utf-8 if available.
++ let $TUTOR = s:tutorxx . ".utf-8"
+ else
+ let $TUTOR = $VIMRUNTIME . s:tutorfile
+ echo "The file " . s:tutorxx . " does not exist.\n"
+*** ../vim-8.1.1088/src/version.c 2019-03-30 19:49:03.262806533 +0100
+--- src/version.c 2019-03-30 19:54:38.312439091 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1089,
+ /**/
+
+--
+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.1090 b/data/vim/patches/8.1.1090
new file mode 100644
index 000000000..0b3d5b82c
--- /dev/null
+++ b/data/vim/patches/8.1.1090
@@ -0,0 +1,83 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1090
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1090
+Problem: MS-Windows: modify_fname() has problems with some 'encoding'.
+Solution: Use GetLongPathNameW() instead of GetLongPathName(). (Ken Takata,
+ closes #4007)
+Files: src/eval.c
+
+
+*** ../vim-8.1.1089/src/eval.c 2019-03-21 21:45:30.875282175 +0100
+--- src/eval.c 2019-03-30 20:03:26.716826345 +0100
+***************
+*** 10321,10339 ****
+ # if _WIN32_WINNT >= 0x0500
+ if (vim_strchr(*fnamep, '~') != NULL)
+ {
+! /* Expand 8.3 filename to full path. Needed to make sure the same
+! * file does not have two different names.
+! * Note: problem does not occur if _WIN32_WINNT < 0x0500. */
+! p = alloc(_MAX_PATH + 1);
+! if (p != NULL)
+ {
+! if (GetLongPathName((LPSTR)*fnamep, (LPSTR)p, _MAX_PATH))
+ {
+! vim_free(*bufp);
+! *bufp = *fnamep = p;
+ }
+! else
+! vim_free(p);
+ }
+ }
+ # endif
+--- 10321,10345 ----
+ # if _WIN32_WINNT >= 0x0500
+ if (vim_strchr(*fnamep, '~') != NULL)
+ {
+! // Expand 8.3 filename to full path. Needed to make sure the same
+! // file does not have two different names.
+! // Note: problem does not occur if _WIN32_WINNT < 0x0500.
+! WCHAR *wfname = enc_to_utf16(*fnamep, NULL);
+! WCHAR buf[_MAX_PATH];
+!
+! if (wfname != NULL)
+ {
+! if (GetLongPathNameW(wfname, buf, _MAX_PATH))
+ {
+! char_u *p = utf16_to_enc(buf, NULL);
+!
+! if (p != NULL)
+! {
+! vim_free(*bufp); // free any allocated file name
+! *bufp = *fnamep = p;
+! }
+ }
+! vim_free(wfname);
+ }
+ }
+ # endif
+*** ../vim-8.1.1089/src/version.c 2019-03-30 19:55:24.396119565 +0100
+--- src/version.c 2019-03-30 20:03:37.464753703 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1090,
+ /**/
+
+--
+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.1091 b/data/vim/patches/8.1.1091
new file mode 100644
index 000000000..28fb9cdb5
--- /dev/null
+++ b/data/vim/patches/8.1.1091
@@ -0,0 +1,213 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1091
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1091
+Problem: MS-Windows: cannot use multi-byte chars in environment var.
+Solution: Use the wide API. (Ken Takata, closes #4008)
+Files: src/misc1.c, src/testdir/test_let.vim
+
+
+*** ../vim-8.1.1090/src/misc1.c 2019-03-30 18:46:57.356077354 +0100
+--- src/misc1.c 2019-03-30 20:10:00.966173750 +0100
+***************
+*** 4301,4341 ****
+ char_u *
+ vim_getenv(char_u *name, int *mustfree)
+ {
+! char_u *p;
+ char_u *pend;
+ int vimruntime;
+
+! #if defined(MSWIN)
+! /* use "C:/" when $HOME is not set */
+ if (STRCMP(name, "HOME") == 0)
+ return homedir;
+- #endif
+
+! p = mch_getenv(name);
+! if (p != NULL && *p == NUL) /* empty is the same as not set */
+! p = NULL;
+
+! if (p != NULL)
+ {
+! #if defined(MSWIN)
+! if (enc_utf8)
+! {
+! int len;
+! char_u *pp = NULL;
+
+! /* Convert from active codepage to UTF-8. Other conversions are
+! * not done, because they would fail for non-ASCII characters. */
+! acp_to_enc(p, (int)STRLEN(p), &pp, &len);
+! if (pp != NULL)
+! {
+! p = pp;
+! *mustfree = TRUE;
+! }
+! }
+! #endif
+ return p;
+ }
+
+ vimruntime = (STRCMP(name, "VIMRUNTIME") == 0);
+ if (!vimruntime && STRCMP(name, "VIM") != 0)
+ return NULL;
+--- 4301,4346 ----
+ char_u *
+ vim_getenv(char_u *name, int *mustfree)
+ {
+! char_u *p = NULL;
+ char_u *pend;
+ int vimruntime;
++ #ifdef MSWIN
++ WCHAR *wn, *wp;
+
+! // use "C:/" when $HOME is not set
+ if (STRCMP(name, "HOME") == 0)
+ return homedir;
+
+! // Use Wide function
+! wn = enc_to_utf16(name, NULL);
+! if (wn == NULL)
+! return NULL;
+
+! wp = _wgetenv(wn);
+! vim_free(wn);
+!
+! if (wp != NULL && *wp == NUL) // empty is the same as not set
+! wp = NULL;
+!
+! if (wp != NULL)
+ {
+! p = utf16_to_enc(wp, NULL);
+! if (p == NULL)
+! return NULL;
+
+! *mustfree = TRUE;
+ return p;
+ }
++ #else
++ p = mch_getenv(name);
++ if (p != NULL && *p == NUL) // empty is the same as not set
++ p = NULL;
+
++ if (p != NULL)
++ return p;
++ #endif
++
++ // handling $VIMRUNTIME and $VIM is below, bail out if it's another name.
+ vimruntime = (STRCMP(name, "VIMRUNTIME") == 0);
+ if (!vimruntime && STRCMP(name, "VIM") != 0)
+ return NULL;
+***************
+*** 4350,4357 ****
+ #endif
+ )
+ {
+ p = mch_getenv((char_u *)"VIM");
+! if (p != NULL && *p == NUL) /* empty is the same as not set */
+ p = NULL;
+ if (p != NULL)
+ {
+--- 4355,4379 ----
+ #endif
+ )
+ {
++ #ifdef MSWIN
++ // Use Wide function
++ wp = _wgetenv(L"VIM");
++ if (wp != NULL && *wp == NUL) // empty is the same as not set
++ wp = NULL;
++ if (wp != NULL)
++ {
++ char_u *q = utf16_to_enc(wp, NULL);
++ if (q != NULL)
++ {
++ p = vim_version_dir(q);
++ *mustfree = TRUE;
++ if (p == NULL)
++ p = q;
++ }
++ }
++ #else
+ p = mch_getenv((char_u *)"VIM");
+! if (p != NULL && *p == NUL) // empty is the same as not set
+ p = NULL;
+ if (p != NULL)
+ {
+***************
+*** 4360,4386 ****
+ *mustfree = TRUE;
+ else
+ p = mch_getenv((char_u *)"VIM");
+-
+- #if defined(MSWIN)
+- if (enc_utf8)
+- {
+- int len;
+- char_u *pp = NULL;
+-
+- /* Convert from active codepage to UTF-8. Other conversions
+- * are not done, because they would fail for non-ASCII
+- * characters. */
+- acp_to_enc(p, (int)STRLEN(p), &pp, &len);
+- if (pp != NULL)
+- {
+- if (*mustfree)
+- vim_free(p);
+- p = pp;
+- *mustfree = TRUE;
+- }
+- }
+- #endif
+ }
+ }
+
+ /*
+--- 4382,4389 ----
+ *mustfree = TRUE;
+ else
+ p = mch_getenv((char_u *)"VIM");
+ }
++ #endif
+ }
+
+ /*
+*** ../vim-8.1.1090/src/testdir/test_let.vim 2019-02-11 22:00:07.671917613 +0100
+--- src/testdir/test_let.vim 2019-03-30 20:07:06.947341962 +0100
+***************
+*** 146,148 ****
+--- 146,153 ----
+ call assert_fails('call s:set_varg8(1)', 'E742:')
+ call s:set_varg9([0])
+ endfunction
++
++ func Test_let_utf8_environment()
++ let $a = 'ĀĒĪŌŪあいうえお'
++ call assert_equal('ĀĒĪŌŪあいうえお', $a)
++ endfunc
+*** ../vim-8.1.1090/src/version.c 2019-03-30 20:04:05.024567549 +0100
+--- src/version.c 2019-03-30 20:07:53.131031588 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1091,
+ /**/
+
+--
+Microsoft says that MS-Windows is much better for you than Linux.
+That's like the Pope saying that catholicism is much better for
+you than protestantism.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1092 b/data/vim/patches/8.1.1092
new file mode 100644
index 000000000..2c5f0a5d9
--- /dev/null
+++ b/data/vim/patches/8.1.1092
@@ -0,0 +1,98 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1092
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1092
+Problem: Setting 'guifont' when maximized resizes the Vim window. When
+ 'guioptions' contains "k" gvim may open with a tiny window.
+Solution: Avoid un-maximizing when setting 'guifont'. (Yee Cheng Chin,
+ closes #3808)
+Files: src/gui.c
+
+
+*** ../vim-8.1.1091/src/gui.c 2019-03-30 18:46:57.352077376 +0100
+--- src/gui.c 2019-03-30 20:22:59.088541285 +0100
+***************
+*** 681,688 ****
+ #ifndef FEAT_GUI_GTK
+ // Set the shell size, adjusted for the screen size. For GTK this only
+ // works after the shell has been opened, thus it is further down.
+! // For MS-Windows pass FALSE for "mustset" to make --windowid work.
+! gui_set_shellsize(FALSE, TRUE, RESIZE_BOTH);
+ #endif
+ #if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU)
+ /* Need to set the size of the menubar after all the menus have been
+--- 681,693 ----
+ #ifndef FEAT_GUI_GTK
+ // Set the shell size, adjusted for the screen size. For GTK this only
+ // works after the shell has been opened, thus it is further down.
+! // If the window is already maximized (e.g. when --windowid is passed in),
+! // we want to use the system-provided dimensions by passing FALSE to
+! // mustset. Otherwise, we want to initialize with the default rows/columns.
+! if (gui_mch_maximized())
+! gui_set_shellsize(FALSE, TRUE, RESIZE_BOTH);
+! else
+! gui_set_shellsize(TRUE, TRUE, RESIZE_BOTH);
+ #endif
+ #if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU)
+ /* Need to set the size of the menubar after all the menus have been
+***************
+*** 721,727 ****
+ # endif
+
+ /* Now make sure the shell fits on the screen. */
+! gui_set_shellsize(TRUE, TRUE, RESIZE_BOTH);
+ #endif
+ /* When 'lines' was set while starting up the topframe may have to be
+ * resized. */
+--- 726,735 ----
+ # endif
+
+ /* Now make sure the shell fits on the screen. */
+! if (gui_mch_maximized())
+! gui_set_shellsize(FALSE, TRUE, RESIZE_BOTH);
+! else
+! gui_set_shellsize(TRUE, TRUE, RESIZE_BOTH);
+ #endif
+ /* When 'lines' was set while starting up the topframe may have to be
+ * resized. */
+***************
+*** 906,912 ****
+ # endif
+ gui_mch_set_font(gui.norm_font);
+ #endif
+! gui_set_shellsize(TRUE, TRUE, RESIZE_BOTH);
+ }
+
+ return ret;
+--- 914,920 ----
+ # endif
+ gui_mch_set_font(gui.norm_font);
+ #endif
+! gui_set_shellsize(FALSE, TRUE, RESIZE_BOTH);
+ }
+
+ return ret;
+*** ../vim-8.1.1091/src/version.c 2019-03-30 20:11:45.749471761 +0100
+--- src/version.c 2019-03-30 20:28:23.410094136 +0100
+***************
+*** 777,778 ****
+--- 777,780 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1092,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+168. You have your own domain name.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1093 b/data/vim/patches/8.1.1093
new file mode 100644
index 000000000..c8c0d4c0d
--- /dev/null
+++ b/data/vim/patches/8.1.1093
@@ -0,0 +1,291 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1093
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1093
+Problem: Support for outdated tags format slows down tag parsing.
+Solution: Remove FEAT_TAG_OLDSTATIC.
+Files: runtime/doc/tagsrch.txt, src/feature.h, src/tag.c, src/version.c
+
+
+*** ../vim-8.1.1092/runtime/doc/tagsrch.txt 2019-02-13 21:19:09.503999092 +0100
+--- runtime/doc/tagsrch.txt 2019-03-30 20:56:01.965618011 +0100
+***************
+*** 529,556 ****
+ part of the gnat package.
+
+
+! The lines in the tags file must have one of these three formats:
+
+ 1. {tagname} {TAB} {tagfile} {TAB} {tagaddress}
+! 2. {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
+! 3. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..
+
+! The first is a normal tag, which is completely compatible with Vi. It is the
+! only format produced by traditional ctags implementations. This is often used
+! for functions that are global, also referenced in other files.
+
+ The lines in the tags file can end in <LF> or <CR><LF>. On the Macintosh <CR>
+ also works. The <CR> and <NL> characters can never appear inside a line.
+
+! *tag-old-static*
+! The second format is for a static tag only. It is obsolete now, replaced by
+! the third format. It is only supported by Elvis 1.x and Vim and a few
+! versions of ctags. A static tag is often used for functions that are local,
+! only referenced in the file {tagfile}. Note that for the static tag, the two
+! occurrences of {tagfile} must be exactly the same. Also see |tags-option|
+! below, for how static tags are used.
+!
+! The third format is new. It includes additional information in optional
+ fields at the end of each line. It is backwards compatible with Vi. It is
+ only supported by new versions of ctags (such as Exuberant ctags).
+
+--- 529,549 ----
+ part of the gnat package.
+
+
+! The lines in the tags file must have one of these two formats:
+
+ 1. {tagname} {TAB} {tagfile} {TAB} {tagaddress}
+! 2. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..
+
+! Previously an old format was supported, see |tag-old-static|.
+!
+! The first format is a normal tag, which is completely compatible with Vi. It
+! is the only format produced by traditional ctags implementations. This is
+! often used for functions that are global, also referenced in other files.
+
+ The lines in the tags file can end in <LF> or <CR><LF>. On the Macintosh <CR>
+ also works. The <CR> and <NL> characters can never appear inside a line.
+
+! The second format is new. It includes additional information in optional
+ fields at the end of each line. It is backwards compatible with Vi. It is
+ only supported by new versions of ctags (such as Exuberant ctags).
+
+***************
+*** 558,565 ****
+ be any identifier. It cannot contain a <Tab>.
+ {TAB} One <Tab> character. Note: previous versions allowed any
+ white space here. This has been abandoned to allow spaces in
+! {tagfile}. It can be re-enabled by including the
+! |+tag_any_white| feature at compile time. *tag-any-white*
+ {tagfile} The file that contains the definition of {tagname}. It can
+ have an absolute or relative path. It may contain environment
+ variables and wildcards (although the use of wildcards is
+--- 551,557 ----
+ be any identifier. It cannot contain a <Tab>.
+ {TAB} One <Tab> character. Note: previous versions allowed any
+ white space here. This has been abandoned to allow spaces in
+! {tagfile}.
+ {tagfile} The file that contains the definition of {tagname}. It can
+ have an absolute or relative path. It may contain environment
+ variables and wildcards (although the use of wildcards is
+***************
+*** 613,620 ****
+ The value '2' should be used then:
+ !_TAG_FILE_SORTED<Tab>2<Tab>{anything} ~
+
+! The other tag that Vim recognizes, but only when compiled with the
+! |+multi_byte| feature, is the encoding of the tags file:
+ !_TAG_FILE_ENCODING<Tab>utf-8<Tab>{anything} ~
+ Here "utf-8" is the encoding used for the tags. Vim will then convert the tag
+ being searched for from 'encoding' to the encoding of the tags file. And when
+--- 606,612 ----
+ The value '2' should be used then:
+ !_TAG_FILE_SORTED<Tab>2<Tab>{anything} ~
+
+! The other tag that Vim recognizes is the encoding of the tags file:
+ !_TAG_FILE_ENCODING<Tab>utf-8<Tab>{anything} ~
+ Here "utf-8" is the encoding used for the tags. Vim will then convert the tag
+ being searched for from 'encoding' to the encoding of the tags file. And when
+***************
+*** 653,658 ****
+--- 645,665 ----
+ followed by white space and a '('. This will find macro names and function
+ names with a type prepended. {the extra searches are not in Vi}
+
++
++ *tag-old-static*
++ Until March 2019 (patch 8.1.1092) an outdated format was supported:
++ {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
++
++ This format is for a static tag only. It is obsolete now, replaced by
++ the second format. It is only supported by Elvis 1.x, older Vim versions and
++ a few versions of ctags. A static tag is often used for functions that are
++ local, only referenced in the file {tagfile}. Note that for the static tag,
++ the two occurrences of {tagfile} must be exactly the same. Also see
++ |tags-option| below, for how static tags are used.
++
++ The support was removed, since when you can update to the new Vim version you
++ should also be able to update ctags to one that supports the second format.
++
+ ==============================================================================
+ 6. Include file searches *include-search* *definition-search*
+ *E387* *E388* *E389*
+*** ../vim-8.1.1092/src/feature.h 2019-03-22 17:03:01.779689390 +0100
+--- src/feature.h 2019-03-30 20:48:58.697388584 +0100
+***************
+*** 305,316 ****
+ #endif
+
+ /*
+! * +tag_old_static Old style static tags: "file:tag file ..". Slows
+! * down tag searching a bit.
+ */
+- #ifdef FEAT_NORMAL
+- # define FEAT_TAG_OLDSTATIC
+- #endif
+
+ /*
+ * +cscope Unix only: Cscope support.
+--- 305,313 ----
+ #endif
+
+ /*
+! * +tag_old_static Old style static tags: "file:tag file ..".
+! * Support was removed in 8.1.1093.
+ */
+
+ /*
+ * +cscope Unix only: Cscope support.
+*** ../vim-8.1.1092/src/tag.c 2019-03-30 19:11:58.530574234 +0100
+--- src/tag.c 2019-03-30 20:58:31.360196405 +0100
+***************
+*** 1964,1991 ****
+ break;
+ }
+
+- #ifdef FEAT_TAG_OLDSTATIC
+- /*
+- * Check for old style static tag: "file:tag file .."
+- */
+- tagp.fname = NULL;
+- for (p = lbuf; p < tagp.tagname_end; ++p)
+- {
+- if (*p == ':')
+- {
+- if (tagp.fname == NULL)
+- tagp.fname = tagp.tagname_end + 1;
+- if (fnamencmp(lbuf, tagp.fname, p - lbuf) == 0
+- && tagp.fname[p - lbuf] == TAB)
+- {
+- // found one
+- tagp.tagname = p + 1;
+- break;
+- }
+- }
+- }
+- #endif
+-
+ /*
+ * Skip this line if the length of the tag is different and
+ * there is no regexp, or the tag is too short.
+--- 1964,1969 ----
+***************
+*** 2098,2107 ****
+ /*
+ * Can be a matching tag, isolate the file name and command.
+ */
+! #ifdef FEAT_TAG_OLDSTATIC
+! if (tagp.fname == NULL)
+! #endif
+! tagp.fname = tagp.tagname_end + 1;
+ tagp.fname_end = vim_strchr(tagp.fname, TAB);
+ tagp.command = tagp.fname_end + 1;
+ if (tagp.fname_end == NULL)
+--- 2076,2082 ----
+ /*
+ * Can be a matching tag, isolate the file name and command.
+ */
+! tagp.fname = tagp.tagname_end + 1;
+ tagp.fname_end = vim_strchr(tagp.fname, TAB);
+ tagp.command = tagp.fname_end + 1;
+ if (tagp.fname_end == NULL)
+***************
+*** 2201,2214 ****
+ is_static = FALSE;
+ if (!is_etag) /* emacs tags are never static */
+ #endif
+! {
+! #ifdef FEAT_TAG_OLDSTATIC
+! if (tagp.tagname != lbuf)
+! is_static = TRUE; /* detected static tag before */
+! else
+! #endif
+! is_static = test_for_static(&tagp);
+! }
+
+ /* decide in which of the sixteen tables to store this
+ * match */
+--- 2176,2182 ----
+ is_static = FALSE;
+ if (!is_etag) /* emacs tags are never static */
+ #endif
+! is_static = test_for_static(&tagp);
+
+ /* decide in which of the sixteen tables to store this
+ * match */
+***************
+*** 2870,2892 ****
+ {
+ char_u *p;
+
+- #ifdef FEAT_TAG_OLDSTATIC
+- int len;
+-
+- /*
+- * Check for old style static tag: "file:tag file .."
+- */
+- len = (int)(tagp->fname_end - tagp->fname);
+- p = tagp->tagname + len;
+- if ( p < tagp->tagname_end
+- && *p == ':'
+- && fnamencmp(tagp->tagname, tagp->fname, len) == 0)
+- {
+- tagp->tagname = p + 1;
+- return TRUE;
+- }
+- #endif
+-
+ /*
+ * Check for new style static tag ":...<Tab>file:[<Tab>...]"
+ */
+--- 2838,2843 ----
+*** ../vim-8.1.1092/src/version.c 2019-03-30 20:31:19.020816257 +0100
+--- src/version.c 2019-03-30 21:03:07.281770175 +0100
+***************
+*** 605,615 ****
+ #else
+ "-tag_binary",
+ #endif
+- #ifdef FEAT_TAG_OLDSTATIC
+- "+tag_old_static",
+- #else
+ "-tag_old_static",
+- #endif
+ "-tag_any_white",
+ #ifdef FEAT_TCL
+ # ifdef DYNAMIC_TCL
+--- 605,611 ----
+*** ../vim-8.1.1092/src/version.c 2019-03-30 20:31:19.020816257 +0100
+--- src/version.c 2019-03-30 21:03:07.281770175 +0100
+***************
+*** 777,778 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1093,
+ /**/
+
+--
+"Hit any key to continue" does _not_ mean you can hit the on/off 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.1094 b/data/vim/patches/8.1.1094
new file mode 100644
index 000000000..8de51e2ec
--- /dev/null
+++ b/data/vim/patches/8.1.1094
@@ -0,0 +1,141 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1094
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1094
+Problem: Long line in tags file causes error.
+Solution: Check for overlong line earlier. (Andy Massimino, closes #4051,
+ closes #4084)
+Files: src/tag.c, src/testdir/test_tagjump.vim
+
+
+*** ../vim-8.1.1093/src/tag.c 2019-03-30 21:19:16.426170240 +0100
+--- src/tag.c 2019-03-30 21:35:15.693644971 +0100
+***************
+*** 1921,1926 ****
+--- 1921,1952 ----
+ }
+
+ parse_line:
++ if (vim_strchr(lbuf, NL) == NULL
++ #ifdef FEAT_CSCOPE
++ && !use_cscope
++ #endif
++ )
++ {
++ // Truncated line, ignore it. Has been reported for
++ // Mozilla JS with extremely long names.
++ if (p_verbose >= 5)
++ {
++ verbose_enter();
++ msg(_("Ignoring long line in tags file"));
++ verbose_leave();
++ }
++ #ifdef FEAT_TAG_BINS
++ if (state != TS_LINEAR)
++ {
++ // Avoid getting stuck.
++ linear = TRUE;
++ state = TS_LINEAR;
++ vim_fseek(fp, search_info.low_offset, SEEK_SET);
++ }
++ #endif
++ continue;
++ }
++
+ /*
+ * Figure out where the different strings are in this line.
+ * For "normal" tags: Do a quick check if the tag matches.
+***************
+*** 1937,1964 ****
+ tagp.tagname_end = vim_strchr(lbuf, TAB);
+ if (tagp.tagname_end == NULL)
+ {
+- if (vim_strchr(lbuf, NL) == NULL)
+- {
+- /* Truncated line, ignore it. Has been reported for
+- * Mozilla JS with extremely long names. */
+- if (p_verbose >= 5)
+- {
+- verbose_enter();
+- msg(_("Ignoring long line in tags file"));
+- verbose_leave();
+- }
+- #ifdef FEAT_TAG_BINS
+- if (state != TS_LINEAR)
+- {
+- /* Avoid getting stuck. */
+- linear = TRUE;
+- state = TS_LINEAR;
+- vim_fseek(fp, search_info.low_offset, SEEK_SET);
+- }
+- #endif
+- continue;
+- }
+-
+ /* Corrupted tag line. */
+ line_error = TRUE;
+ break;
+--- 1963,1968 ----
+*** ../vim-8.1.1093/src/testdir/test_tagjump.vim 2019-03-30 19:11:58.530574234 +0100
+--- src/testdir/test_tagjump.vim 2019-03-30 21:33:21.530692816 +0100
+***************
+*** 439,442 ****
+--- 439,473 ----
+ call delete('Xtest.c')
+ endfunc
+
++ func Test_tag_line_toolong()
++ call writefile([
++ \ '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 django/contrib/admin/templates/admin/edit_inline/stacked.html 16;" j line:16 language:HTML'
++ \ ], 'Xtags')
++ set tags=Xtags
++ let old_vbs = &verbose
++ set verbose=5
++ " ":tjump" should give "tag not found" not "Format error in tags file"
++ call assert_fails('tj /foo', 'E426')
++ try
++ tj /foo
++ catch /^Vim\%((\a\+)\)\=:E431/
++ call assert_report(v:exception)
++ catch /.*/
++ endtry
++ call assert_equal('Ignoring long line in tags file', split(execute('messages'), '\n')[-1])
++ call writefile([
++ \ '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 django/contrib/admin/templates/admin/edit_inline/stacked.html 16;" j line:16 language:HTML'
++ \ ], 'Xtags')
++ call assert_fails('tj /foo', 'E426')
++ try
++ tj /foo
++ catch /^Vim\%((\a\+)\)\=:E431/
++ call assert_report(v:exception)
++ catch /.*/
++ endtry
++ call assert_equal('Ignoring long line in tags file', split(execute('messages'), '\n')[-1])
++ call delete('Xtags')
++ let &verbose = old_vbs
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.1093/src/version.c 2019-03-30 21:19:16.430170210 +0100
+--- src/version.c 2019-03-30 21:33:49.938428730 +0100
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1094,
+ /**/
+
+--
+"Hit any key to continue" is very confusing when you have two keyboards.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1095 b/data/vim/patches/8.1.1095
new file mode 100644
index 000000000..8488593f9
--- /dev/null
+++ b/data/vim/patches/8.1.1095
@@ -0,0 +1,124 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1095
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1095
+Problem: MS-Windows: executable() fails on very long filename.
+Solution: (Ken Takata, closes #4015)
+Files: src/os_win32.c, src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.1094/src/os_win32.c 2019-03-30 18:46:57.360077328 +0100
+--- src/os_win32.c 2019-03-30 21:48:58.918721126 +0100
+***************
+*** 3299,3312 ****
+ int
+ mch_can_exe(char_u *name, char_u **path, int use_path)
+ {
+! 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;
+--- 3299,3315 ----
+ int
+ mch_can_exe(char_u *name, char_u **path, int use_path)
+ {
+! // WinNT and later can use _MAX_PATH wide characters for a pathname, which
+! // means that the maximum pathname is _MAX_PATH * 3 bytes when 'enc' is
+! // UTF-8.
+! char_u buf[_MAX_PATH * 3];
+ int len = (int)STRLEN(name);
+ char_u *p, *saved;
+
+! if (len >= sizeof(buf)) // safety check
+ return FALSE;
+
+! // Try 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;
+***************
+*** 3339,3345 ****
+ }
+ vim_free(saved);
+
+! vim_strncpy(buf, name, _MAX_PATH - 1);
+ p = mch_getenv("PATHEXT");
+ if (p == NULL)
+ p = (char_u *)".com;.exe;.bat;.cmd";
+--- 3342,3348 ----
+ }
+ vim_free(saved);
+
+! vim_strncpy(buf, name, sizeof(buf) - 1);
+ p = mch_getenv("PATHEXT");
+ if (p == NULL)
+ p = (char_u *)".com;.exe;.bat;.cmd";
+***************
+*** 3354,3360 ****
+ ++p;
+ }
+ else
+! copy_option_part(&p, buf + len, _MAX_PATH - len, ";");
+ if (executable_exists((char *)buf, path, use_path))
+ return TRUE;
+ }
+--- 3357,3363 ----
+ ++p;
+ }
+ else
+! copy_option_part(&p, buf + len, sizeof(buf) - len, ";");
+ if (executable_exists((char *)buf, path, use_path))
+ return TRUE;
+ }
+*** ../vim-8.1.1094/src/testdir/test_functions.vim 2019-03-30 14:26:15.268619122 +0100
+--- src/testdir/test_functions.vim 2019-03-30 21:48:58.918721126 +0100
+***************
+*** 944,949 ****
+--- 944,960 ----
+ endif
+ endfunc
+
++ func Test_executable_longname()
++ if !has('win32')
++ return
++ endif
++
++ let fname = 'X' . repeat('あ', 200) . '.bat'
++ call writefile([], fname)
++ call assert_equal(1, executable(fname))
++ call delete(fname)
++ endfunc
++
+ func Test_hostname()
+ let hostname_vim = hostname()
+ if has('unix')
+*** ../vim-8.1.1094/src/version.c 2019-03-30 21:41:44.218279831 +0100
+--- src/version.c 2019-03-30 21:49:22.994527582 +0100
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1095,
+ /**/
+
+--
+"Hit any key to continue" it said, but nothing happened after F sharp.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1096 b/data/vim/patches/8.1.1096
new file mode 100644
index 000000000..21e903c27
--- /dev/null
+++ b/data/vim/patches/8.1.1096
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1096
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1096
+Problem: MS-Windows: cannot distinguish BS and CTRL-H.
+Solution: Add code for VK_BACK. (Linwei, closes #1833)
+Files: src/term.c, src/os_win32.c
+
+
+*** ../vim-8.1.1095/src/term.c 2019-03-22 12:03:26.583533911 +0100
+--- src/term.c 2019-03-30 22:04:24.738819092 +0100
+***************
+*** 663,668 ****
+--- 663,669 ----
+ {K_K7, "\316\366"},
+ {K_K8, "\316\372"},
+ {K_K9, "\316\376"},
++ {K_BS, "\316x"},
+ # endif
+
+ # if defined(VMS) || defined(ALL_BUILTIN_TCAPS)
+*** ../vim-8.1.1095/src/os_win32.c 2019-03-30 21:51:25.021550461 +0100
+--- src/os_win32.c 2019-03-30 22:06:45.997460347 +0100
+***************
+*** 882,887 ****
+--- 882,888 ----
+ { VK_NEXT, TRUE, 'Q', '\322', 'v', '\323', }, // PgDn
+ { VK_INSERT,TRUE, 'R', '\324', '\325', '\326', },
+ { VK_DELETE,TRUE, 'S', '\327', '\330', '\331', },
++ { VK_BACK, TRUE, 'x', 'y', 'z', '{', }, // Backspace
+
+ { VK_SNAPSHOT,TRUE, 0, 0, 0, 'r', }, // PrtScrn
+
+***************
+*** 911,918 ****
+ { 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', },
+!
+ };
+
+
+--- 912,918 ----
+ { 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', '|', '}', },
+ };
+
+
+*** ../vim-8.1.1095/src/version.c 2019-03-30 21:51:25.021550461 +0100
+--- src/version.c 2019-03-30 22:08:14.368634584 +0100
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1096,
+ /**/
+
+--
+"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.1097 b/data/vim/patches/8.1.1097
new file mode 100644
index 000000000..c7a13286b
--- /dev/null
+++ b/data/vim/patches/8.1.1097
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1097
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1097 (after 8.1.1092)
+Problem: Motif build fails. (Paul Jolly)
+Solution: Only use gui_mch_maximized() for MS-Windows. (closes #4194)
+Files: src/gui.c
+
+
+*** ../vim-8.1.1096/src/gui.c 2019-03-30 20:31:19.020816257 +0100
+--- src/gui.c 2019-03-30 22:26:00.955377419 +0100
+***************
+*** 678,684 ****
+ /* All components of the GUI have been created now */
+ gui.shell_created = TRUE;
+
+! #ifndef FEAT_GUI_GTK
+ // Set the shell size, adjusted for the screen size. For GTK this only
+ // works after the shell has been opened, thus it is further down.
+ // If the window is already maximized (e.g. when --windowid is passed in),
+--- 678,684 ----
+ /* All components of the GUI have been created now */
+ gui.shell_created = TRUE;
+
+! #ifdef FEAT_GUI_MSWIN
+ // Set the shell size, adjusted for the screen size. For GTK this only
+ // works after the shell has been opened, thus it is further down.
+ // If the window is already maximized (e.g. when --windowid is passed in),
+***************
+*** 688,693 ****
+--- 688,697 ----
+ gui_set_shellsize(FALSE, TRUE, RESIZE_BOTH);
+ else
+ gui_set_shellsize(TRUE, TRUE, RESIZE_BOTH);
++ #else
++ # ifndef FEAT_GUI_GTK
++ gui_set_shellsize(FALSE, TRUE, RESIZE_BOTH);
++ # endif
+ #endif
+ #if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU)
+ /* Need to set the size of the menubar after all the menus have been
+*** ../vim-8.1.1096/src/version.c 2019-03-30 22:11:17.534968563 +0100
+--- src/version.c 2019-03-30 22:23:26.524675731 +0100
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1097,
+ /**/
+
+--
+Keep America beautiful. Swallow your beer cans.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1098 b/data/vim/patches/8.1.1098
new file mode 100644
index 000000000..c12b78bb9
--- /dev/null
+++ b/data/vim/patches/8.1.1098
@@ -0,0 +1,470 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1098
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1098
+Problem: Quickfix code duplication.
+Solution: Refactor the qf_init_ext() function. (Yegappan Lakshmanan,
+ closes #4193)
+Files: src/README.md, src/quickfix.c
+
+
+*** ../vim-8.1.1097/src/README.md 2019-03-29 13:09:37.972782868 +0100
+--- src/README.md 2019-03-31 15:28:56.837503882 +0200
+***************
+*** 32,37 ****
+--- 32,38 ----
+ fold.c | folding
+ getchar.c | getting characters and key mapping
+ indent.c | C and Lisp indentation
++ insexpand.c | Insert mode completion
+ mark.c | marks
+ mbyte.c | multi-byte character handling
+ memfile.c | storing lines for buffers in a swapfile
+*** ../vim-8.1.1097/src/quickfix.c 2019-03-28 20:31:03.412924538 +0100
+--- src/quickfix.c 2019-03-31 15:28:56.837503882 +0200
+***************
+*** 195,203 ****
+ */
+ #define GET_LOC_LIST(wp) (IS_LL_WINDOW(wp) ? wp->w_llist_ref : wp->w_llist)
+
+ #define FOR_ALL_QFL_ITEMS(qfl, qfp, i) \
+! for (i = 0, qfp = qfl->qf_start; \
+! !got_int && i < qfl->qf_count && qfp != NULL; \
+ ++i, qfp = qfp->qf_next)
+
+ /*
+--- 195,205 ----
+ */
+ #define GET_LOC_LIST(wp) (IS_LL_WINDOW(wp) ? wp->w_llist_ref : wp->w_llist)
+
++ // Macro to loop through all the items in a quickfix list
++ // Quickfix item index starts from 1, so i below starts at 1
+ #define FOR_ALL_QFL_ITEMS(qfl, qfp, i) \
+! for (i = 1, qfp = qfl->qf_start; \
+! !got_int && i <= qfl->qf_count && qfp != NULL; \
+ ++i, qfp = qfp->qf_next)
+
+ /*
+***************
+*** 1585,1590 ****
+--- 1587,1633 ----
+ }
+
+ /*
++ * Process the next line from a file/buffer/list/string and add it
++ * to the quickfix list 'qfl'.
++ */
++ static int
++ qf_init_process_nextline(
++ qf_list_T *qfl,
++ efm_T *fmt_first,
++ qfstate_T *state,
++ qffields_T *fields)
++ {
++ int status;
++
++ // Get the next line from a file/buffer/list/string
++ status = qf_get_nextline(state);
++ if (status != QF_OK)
++ return status;
++
++ status = qf_parse_line(qfl, state->linebuf, state->linelen,
++ fmt_first, fields);
++ if (status != QF_OK)
++ return status;
++
++ return qf_add_entry(qfl,
++ qfl->qf_directory,
++ (*fields->namebuf || qfl->qf_directory != NULL)
++ ? fields->namebuf
++ : ((qfl->qf_currfile != NULL && fields->valid)
++ ? qfl->qf_currfile : (char_u *)NULL),
++ fields->module,
++ 0,
++ fields->errmsg,
++ fields->lnum,
++ fields->col,
++ fields->use_viscol,
++ fields->pattern,
++ fields->enr,
++ fields->type,
++ fields->valid);
++ }
++
++ /*
+ * Read the errorfile "efile" into memory, line by line, building the error
+ * list.
+ * Alternative: when "efile" is NULL read errors from buffer "buf".
+***************
+*** 1676,1714 ****
+ // 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(qfl, state.linebuf, state.linelen,
+- fmt_first, &fields);
+ if (status == QF_FAIL)
+ goto error2;
+- if (status == QF_NOMEM)
+- goto qf_init_end;
+- if (status == QF_IGNORE_LINE)
+- continue;
+
+- if (qf_add_entry(qfl,
+- qfl->qf_directory,
+- (*fields.namebuf || qfl->qf_directory != NULL)
+- ? fields.namebuf
+- : ((qfl->qf_currfile != NULL && fields.valid)
+- ? qfl->qf_currfile : (char_u *)NULL),
+- fields.module,
+- 0,
+- fields.errmsg,
+- fields.lnum,
+- fields.col,
+- fields.use_viscol,
+- fields.pattern,
+- fields.enr,
+- fields.type,
+- fields.valid) == FAIL)
+- goto error2;
+ line_breakcheck();
+ }
+ if (state.fd == NULL || !ferror(state.fd))
+--- 1719,1732 ----
+ // Try to recognize one of the error formats in each line.
+ while (!got_int)
+ {
+! status = qf_init_process_nextline(qfl, fmt_first, &state, &fields);
+ if (status == QF_NOMEM) // memory alloc failure
+ goto qf_init_end;
+ if (status == QF_END_OF_INPUT) // end of input
+ break;
+ if (status == QF_FAIL)
+ goto error2;
+
+ line_breakcheck();
+ }
+ if (state.fd == NULL || !ferror(state.fd))
+***************
+*** 2013,2019 ****
+
+ /*
+ * Add an entry to the end of the list of errors.
+! * Returns OK or FAIL.
+ */
+ static int
+ qf_add_entry(
+--- 2031,2037 ----
+
+ /*
+ * Add an entry to the end of the list of errors.
+! * Returns QF_OK or QF_FAIL.
+ */
+ static int
+ qf_add_entry(
+***************
+*** 2035,2041 ****
+ qfline_T **lastp; // pointer to qf_last or NULL
+
+ if ((qfp = (qfline_T *)alloc((unsigned)sizeof(qfline_T))) == NULL)
+! return FAIL;
+ if (bufnum != 0)
+ {
+ buf_T *buf = buflist_findnr(bufnum);
+--- 2053,2059 ----
+ qfline_T **lastp; // pointer to qf_last or NULL
+
+ if ((qfp = (qfline_T *)alloc((unsigned)sizeof(qfline_T))) == NULL)
+! return QF_FAIL;
+ if (bufnum != 0)
+ {
+ buf_T *buf = buflist_findnr(bufnum);
+***************
+*** 2050,2056 ****
+ if ((qfp->qf_text = vim_strsave(mesg)) == NULL)
+ {
+ vim_free(qfp);
+! return FAIL;
+ }
+ qfp->qf_lnum = lnum;
+ qfp->qf_col = col;
+--- 2068,2074 ----
+ if ((qfp->qf_text = vim_strsave(mesg)) == NULL)
+ {
+ vim_free(qfp);
+! return QF_FAIL;
+ }
+ qfp->qf_lnum = lnum;
+ qfp->qf_col = col;
+***************
+*** 2061,2067 ****
+ {
+ vim_free(qfp->qf_text);
+ vim_free(qfp);
+! return FAIL;
+ }
+ if (module == NULL || *module == NUL)
+ qfp->qf_module = NULL;
+--- 2079,2085 ----
+ {
+ vim_free(qfp->qf_text);
+ vim_free(qfp);
+! return QF_FAIL;
+ }
+ if (module == NULL || *module == NUL)
+ qfp->qf_module = NULL;
+***************
+*** 2070,2076 ****
+ vim_free(qfp->qf_text);
+ vim_free(qfp->qf_pattern);
+ vim_free(qfp);
+! return FAIL;
+ }
+ qfp->qf_nr = nr;
+ if (type != 1 && !vim_isprintc(type)) // only printable chars allowed
+--- 2088,2094 ----
+ vim_free(qfp->qf_text);
+ vim_free(qfp->qf_pattern);
+ vim_free(qfp);
+! return QF_FAIL;
+ }
+ qfp->qf_nr = nr;
+ if (type != 1 && !vim_isprintc(type)) // only printable chars allowed
+***************
+*** 2101,2107 ****
+ qfl->qf_ptr = qfp;
+ }
+
+! return OK;
+ }
+
+ /*
+--- 2119,2125 ----
+ qfl->qf_ptr = qfp;
+ }
+
+! return QF_OK;
+ }
+
+ /*
+***************
+*** 2167,2173 ****
+ 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
+--- 2185,2191 ----
+ from_qfp->qf_pattern,
+ from_qfp->qf_nr,
+ 0,
+! from_qfp->qf_valid) == QF_FAIL)
+ return FAIL;
+
+ // qf_add_entry() will not set the qf_num field, as the
+***************
+*** 2551,2557 ****
+ if (qfp == qf_ptr)
+ break;
+
+! if (i == qfl->qf_count) // Entry is not found
+ return FALSE;
+
+ return TRUE;
+--- 2569,2575 ----
+ if (qfp == qf_ptr)
+ break;
+
+! if (i > qfl->qf_count) // Entry is not found
+ return FALSE;
+
+ return TRUE;
+***************
+*** 3554,3574 ****
+
+ 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;
+- if (qfp == NULL)
+- break;
+- ++i;
+ ui_breakcheck();
+ }
+ }
+--- 3572,3582 ----
+
+ if (qfl->qf_nonevalid)
+ all = TRUE;
+! FOR_ALL_QFL_ITEMS(qfl, qfp, i)
+ {
+ if ((qfp->qf_valid || all) && idx1 <= i && i <= idx2)
+ qf_list_entry(qfp, i, i == qfl->qf_index);
+
+ ui_breakcheck();
+ }
+ }
+***************
+*** 4915,4921 ****
+ 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;
+
+--- 4923,4929 ----
+ static int
+ qf_get_nth_valid_entry(qf_list_T *qfl, int n, int fdo)
+ {
+! qfline_T *qfp;
+ int i, eidx;
+ int prev_fnum = 0;
+
+***************
+*** 4923,4930 ****
+ if (qfl->qf_count <= 0 || qfl->qf_nonevalid)
+ return 1;
+
+! for (i = 1, eidx = 0; i <= qfl->qf_count && qfp != NULL;
+! i++, qfp = qfp->qf_next)
+ {
+ if (qfp->qf_valid)
+ {
+--- 4931,4938 ----
+ if (qfl->qf_count <= 0 || qfl->qf_nonevalid)
+ return 1;
+
+! eidx = 0;
+! FOR_ALL_QFL_ITEMS(qfl, qfp, i)
+ {
+ if (qfp->qf_valid)
+ {
+***************
+*** 5330,5336 ****
+ 0, // nr
+ 0, // type
+ TRUE // valid
+! ) == FAIL)
+ {
+ got_int = TRUE;
+ break;
+--- 5338,5344 ----
+ 0, // nr
+ 0, // type
+ TRUE // valid
+! ) == QF_FAIL)
+ {
+ got_int = TRUE;
+ break;
+***************
+*** 6434,6440 ****
+
+ retval = qf_add_entry_from_dict(qfl, d, li == list->lv_first,
+ &valid_entry);
+! if (retval == FAIL)
+ break;
+ }
+
+--- 6442,6448 ----
+
+ retval = qf_add_entry_from_dict(qfl, d, li == list->lv_first,
+ &valid_entry);
+! if (retval == QF_FAIL)
+ break;
+ }
+
+***************
+*** 6744,6757 ****
+ // If the location list window is open, then create a new empty
+ // location list
+ qf_info_T *new_ll = qf_alloc_stack(QFLT_LOCATION);
+- new_ll->qf_bufnr = qfwin->w_buffer->b_fnum;
+
+! // first free the list reference in the location list window
+! ll_free_all(&qfwin->w_llist_ref);
+
+! qfwin->w_llist_ref = new_ll;
+! if (wp != qfwin)
+! win_set_loclist(wp, new_ll);
+ }
+ }
+
+--- 6752,6769 ----
+ // If the location list window is open, then create a new empty
+ // location list
+ qf_info_T *new_ll = qf_alloc_stack(QFLT_LOCATION);
+
+! if (new_ll != NULL)
+! {
+! new_ll->qf_bufnr = qfwin->w_buffer->b_fnum;
+
+! // first free the list reference in the location list window
+! ll_free_all(&qfwin->w_llist_ref);
+!
+! qfwin->w_llist_ref = new_ll;
+! if (wp != qfwin)
+! win_set_loclist(wp, new_ll);
+! }
+ }
+ }
+
+***************
+*** 7203,7209 ****
+ 0, // nr
+ 1, // type
+ TRUE // valid
+! ) == FAIL)
+ {
+ got_int = TRUE;
+ if (line != IObuff)
+--- 7215,7221 ----
+ 0, // nr
+ 1, // type
+ TRUE // valid
+! ) == QF_FAIL)
+ {
+ got_int = TRUE;
+ if (line != IObuff)
+*** ../vim-8.1.1097/src/version.c 2019-03-30 22:26:35.091091278 +0100
+--- src/version.c 2019-03-31 15:30:09.781016061 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1098,
+ /**/
+
+--
+Living in Hollywood is like living in a bowl of granola. What ain't
+fruits and nuts is flakes.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1099 b/data/vim/patches/8.1.1099
new file mode 100644
index 000000000..9aa426928
--- /dev/null
+++ b/data/vim/patches/8.1.1099
@@ -0,0 +1,1326 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1099
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1099
+Problem: The do_tag() function is too long.
+Solution: Factor parts out to separate functions. Move simplify_filename()
+ to a file where it fits better. (Andy Massimino, closes #4195)
+Files: src/tag.c, src/proto/tag.pro, src/findfile.c,
+ src/proto/findfile.pro
+
+
+*** ../vim-8.1.1098/src/tag.c 2019-03-30 21:41:44.218279831 +0100
+--- src/tag.c 2019-03-31 19:14:18.988597395 +0200
+***************
+*** 74,79 ****
+--- 74,83 ----
+ static int test_for_current(char_u *, char_u *, char_u *, char_u *);
+ #endif
+ static int find_extra(char_u **pp);
++ static void print_tag_list(int new_tag, int use_tagstack, int num_matches, char_u **matches);
++ #if defined(FEAT_QUICKFIX) && defined(FEAT_EVAL)
++ static int add_llist_tags(char_u *tag, int num_matches, char_u **matches);
++ #endif
+
+ static char_u *bottommsg = (char_u *)N_("E555: at bottom of tag stack");
+ static char_u *topmsg = (char_u *)N_("E556: at top of tag stack");
+***************
+*** 125,149 ****
+ int prevtagstackidx = tagstackidx;
+ int prev_num_matches;
+ int new_tag = FALSE;
+! int other_name;
+! int i, j, k;
+! int idx;
+ int ic;
+- char_u *p;
+- char_u *name;
+ int no_regexp = FALSE;
+ int error_cur_match = 0;
+- char_u *command_end;
+ int save_pos = FALSE;
+ fmark_T saved_fmark;
+- int taglen;
+ #ifdef FEAT_CSCOPE
+ int jumped_to_tag = FALSE;
+ #endif
+- tagptrs_T tagp, tagp2;
+ int new_num_matches;
+ char_u **new_matches;
+- int attr;
+ int use_tagstack;
+ int skip_msg = FALSE;
+ char_u *buf_ffname = curbuf->b_ffname; /* name to use for
+--- 129,145 ----
+ int prevtagstackidx = tagstackidx;
+ int prev_num_matches;
+ int new_tag = FALSE;
+! int i;
+ int ic;
+ int no_regexp = FALSE;
+ int error_cur_match = 0;
+ int save_pos = FALSE;
+ fmark_T saved_fmark;
+ #ifdef FEAT_CSCOPE
+ int jumped_to_tag = FALSE;
+ #endif
+ int new_num_matches;
+ char_u **new_matches;
+ int use_tagstack;
+ int skip_msg = FALSE;
+ char_u *buf_ffname = curbuf->b_ffname; /* name to use for
+***************
+*** 482,487 ****
+--- 478,486 ----
+ */
+ for (;;)
+ {
++ int other_name;
++ char_u *name;
++
+ /*
+ * When desired match not found yet, try to find it (and others).
+ */
+***************
+*** 541,549 ****
+ * ":tnext" and jumping to another file. */
+ if (!new_tag && !other_name)
+ {
+ /* Find the position of each old match in the new list. Need
+ * to use parse_match() to find the tag line. */
+- idx = 0;
+ for (j = 0; j < num_matches; ++j)
+ {
+ parse_match(matches[j], &tagp);
+--- 540,551 ----
+ * ":tnext" and jumping to another file. */
+ if (!new_tag && !other_name)
+ {
++ int j, k;
++ int idx = 0;
++ tagptrs_T tagp, tagp2;
++
+ /* Find the position of each old match in the new list. Need
+ * to use parse_match() to find the tag line. */
+ for (j = 0; j < num_matches; ++j)
+ {
+ parse_match(matches[j], &tagp);
+***************
+*** 552,558 ****
+ parse_match(new_matches[i], &tagp2);
+ if (STRCMP(tagp.tagname, tagp2.tagname) == 0)
+ {
+! p = new_matches[i];
+ for (k = i; k > idx; --k)
+ new_matches[k] = new_matches[k - 1];
+ new_matches[idx++] = p;
+--- 554,560 ----
+ parse_match(new_matches[i], &tagp2);
+ if (STRCMP(tagp.tagname, tagp2.tagname) == 0)
+ {
+! char_u *p = new_matches[i];
+ for (k = i; k > idx; --k)
+ new_matches[k] = new_matches[k - 1];
+ new_matches[idx++] = p;
+***************
+*** 587,927 ****
+ else
+ #endif
+ if (type == DT_TAG && *tag != NUL)
+! /*
+! * If a count is supplied to the ":tag <name>" command, then
+! * jump to count'th matching tag.
+! */
+ cur_match = count > 0 ? count - 1 : 0;
+ else if (type == DT_SELECT || (type == DT_JUMP && num_matches > 1))
+ {
+! /*
+! * List all the matching tags.
+! * Assume that the first match indicates how long the tags can
+! * be, and align the file names to that.
+! */
+! parse_match(matches[0], &tagp);
+! taglen = (int)(tagp.tagname_end - tagp.tagname + 2);
+! if (taglen < 18)
+! taglen = 18;
+! if (taglen > Columns - 25)
+! taglen = MAXCOL;
+! if (msg_col == 0)
+! msg_didout = FALSE; /* overwrite previous message */
+! msg_start();
+! msg_puts_attr(_(" # pri kind tag"), HL_ATTR(HLF_T));
+! msg_clr_eos();
+! taglen_advance(taglen);
+! msg_puts_attr(_("file\n"), HL_ATTR(HLF_T));
+!
+! for (i = 0; i < num_matches && !got_int; ++i)
+! {
+! parse_match(matches[i], &tagp);
+! if (!new_tag && (
+! #if defined(FEAT_QUICKFIX)
+! (g_do_tagpreview != 0
+! && i == ptag_entry.cur_match) ||
+! #endif
+! (use_tagstack
+! && i == tagstack[tagstackidx].cur_match)))
+! *IObuff = '>';
+! else
+! *IObuff = ' ';
+! vim_snprintf((char *)IObuff + 1, IOSIZE - 1,
+! "%2d %s ", i + 1,
+! mt_names[matches[i][0] & MT_MASK]);
+! msg_puts((char *)IObuff);
+! if (tagp.tagkind != NULL)
+! msg_outtrans_len(tagp.tagkind,
+! (int)(tagp.tagkind_end - tagp.tagkind));
+! msg_advance(13);
+! msg_outtrans_len_attr(tagp.tagname,
+! (int)(tagp.tagname_end - tagp.tagname),
+! HL_ATTR(HLF_T));
+! msg_putchar(' ');
+! taglen_advance(taglen);
+!
+! /* Find out the actual file name. If it is long, truncate
+! * it and put "..." in the middle */
+! p = tag_full_fname(&tagp);
+! if (p != NULL)
+! {
+! msg_outtrans_long_attr(p, HL_ATTR(HLF_D));
+! vim_free(p);
+! }
+! if (msg_col > 0)
+! msg_putchar('\n');
+! if (got_int)
+! break;
+! msg_advance(15);
+!
+! /* print any extra fields */
+! command_end = tagp.command_end;
+! if (command_end != NULL)
+! {
+! p = command_end + 3;
+! while (*p && *p != '\r' && *p != '\n')
+! {
+! while (*p == TAB)
+! ++p;
+!
+! /* skip "file:" without a value (static tag) */
+! if (STRNCMP(p, "file:", 5) == 0
+! && vim_isspace(p[5]))
+! {
+! p += 5;
+! continue;
+! }
+! /* skip "kind:<kind>" and "<kind>" */
+! if (p == tagp.tagkind
+! || (p + 5 == tagp.tagkind
+! && STRNCMP(p, "kind:", 5) == 0))
+! {
+! p = tagp.tagkind_end;
+! continue;
+! }
+! /* print all other extra fields */
+! attr = HL_ATTR(HLF_CM);
+! while (*p && *p != '\r' && *p != '\n')
+! {
+! if (msg_col + ptr2cells(p) >= Columns)
+! {
+! msg_putchar('\n');
+! if (got_int)
+! break;
+! msg_advance(15);
+! }
+! p = msg_outtrans_one(p, attr);
+! if (*p == TAB)
+! {
+! msg_puts_attr(" ", attr);
+! break;
+! }
+! if (*p == ':')
+! attr = 0;
+! }
+! }
+! if (msg_col > 15)
+! {
+! msg_putchar('\n');
+! if (got_int)
+! break;
+! msg_advance(15);
+! }
+! }
+! else
+! {
+! for (p = tagp.command;
+! *p && *p != '\r' && *p != '\n'; ++p)
+! ;
+! command_end = p;
+! }
+!
+! /*
+! * Put the info (in several lines) at column 15.
+! * Don't display "/^" and "?^".
+! */
+! p = tagp.command;
+! if (*p == '/' || *p == '?')
+! {
+! ++p;
+! if (*p == '^')
+! ++p;
+! }
+! /* Remove leading whitespace from pattern */
+! while (p != command_end && vim_isspace(*p))
+! ++p;
+!
+! while (p != command_end)
+! {
+! if (msg_col + (*p == TAB ? 1 : ptr2cells(p)) > Columns)
+! msg_putchar('\n');
+! if (got_int)
+! break;
+! msg_advance(15);
+!
+! /* skip backslash used for escaping a command char or
+! * a backslash */
+! if (*p == '\\' && (*(p + 1) == *tagp.command
+! || *(p + 1) == '\\'))
+! ++p;
+!
+! if (*p == TAB)
+! {
+! msg_putchar(' ');
+! ++p;
+! }
+! else
+! p = msg_outtrans_one(p, 0);
+!
+! /* don't display the "$/;\"" and "$?;\"" */
+! if (p == command_end - 2 && *p == '$'
+! && *(p + 1) == *tagp.command)
+! break;
+! /* don't display matching '/' or '?' */
+! if (p == command_end - 1 && *p == *tagp.command
+! && (*p == '/' || *p == '?'))
+! break;
+! }
+! if (msg_col)
+! msg_putchar('\n');
+! ui_breakcheck();
+! }
+! if (got_int)
+! got_int = FALSE; /* only stop the listing */
+ ask_for_selection = TRUE;
+ }
+ #if defined(FEAT_QUICKFIX) && defined(FEAT_EVAL)
+ else if (type == DT_LTAG)
+ {
+! list_T *list;
+! char_u tag_name[128 + 1];
+! char_u *fname;
+! char_u *cmd;
+!
+! /*
+! * Add the matching tags to the location list for the current
+! * window.
+! */
+!
+! fname = alloc(MAXPATHL + 1);
+! cmd = alloc(CMDBUFFSIZE + 1);
+! list = list_alloc();
+! if (list == NULL || fname == NULL || cmd == NULL)
+! {
+! vim_free(cmd);
+! vim_free(fname);
+! if (list != NULL)
+! list_free(list);
+ goto end_do_tag;
+- }
+-
+- for (i = 0; i < num_matches; ++i)
+- {
+- int len, cmd_len;
+- long lnum;
+- dict_T *dict;
+-
+- parse_match(matches[i], &tagp);
+-
+- /* Save the tag name */
+- len = (int)(tagp.tagname_end - tagp.tagname);
+- if (len > 128)
+- len = 128;
+- vim_strncpy(tag_name, tagp.tagname, len);
+- tag_name[len] = NUL;
+-
+- /* Save the tag file name */
+- p = tag_full_fname(&tagp);
+- if (p == NULL)
+- continue;
+- vim_strncpy(fname, p, MAXPATHL);
+- vim_free(p);
+-
+- /*
+- * Get the line number or the search pattern used to locate
+- * the tag.
+- */
+- lnum = 0;
+- if (isdigit(*tagp.command))
+- /* Line number is used to locate the tag */
+- lnum = atol((char *)tagp.command);
+- else
+- {
+- char_u *cmd_start, *cmd_end;
+-
+- /* Search pattern is used to locate the tag */
+-
+- /* Locate the end of the command */
+- cmd_start = tagp.command;
+- cmd_end = tagp.command_end;
+- if (cmd_end == NULL)
+- {
+- for (p = tagp.command;
+- *p && *p != '\r' && *p != '\n'; ++p)
+- ;
+- cmd_end = p;
+- }
+-
+- /*
+- * Now, cmd_end points to the character after the
+- * command. Adjust it to point to the last
+- * character of the command.
+- */
+- cmd_end--;
+-
+- /*
+- * Skip the '/' and '?' characters at the
+- * beginning and end of the search pattern.
+- */
+- if (*cmd_start == '/' || *cmd_start == '?')
+- cmd_start++;
+-
+- if (*cmd_end == '/' || *cmd_end == '?')
+- cmd_end--;
+-
+- len = 0;
+- cmd[0] = NUL;
+-
+- /*
+- * If "^" is present in the tag search pattern, then
+- * copy it first.
+- */
+- if (*cmd_start == '^')
+- {
+- STRCPY(cmd, "^");
+- cmd_start++;
+- len++;
+- }
+-
+- /*
+- * Precede the tag pattern with \V to make it very
+- * nomagic.
+- */
+- STRCAT(cmd, "\\V");
+- len += 2;
+-
+- cmd_len = (int)(cmd_end - cmd_start + 1);
+- if (cmd_len > (CMDBUFFSIZE - 5))
+- cmd_len = CMDBUFFSIZE - 5;
+- STRNCAT(cmd, cmd_start, cmd_len);
+- len += cmd_len;
+-
+- if (cmd[len - 1] == '$')
+- {
+- /*
+- * Replace '$' at the end of the search pattern
+- * with '\$'
+- */
+- cmd[len - 1] = '\\';
+- cmd[len] = '$';
+- len++;
+- }
+-
+- cmd[len] = NUL;
+- }
+-
+- if ((dict = dict_alloc()) == NULL)
+- continue;
+- if (list_append_dict(list, dict) == FAIL)
+- {
+- vim_free(dict);
+- continue;
+- }
+-
+- dict_add_string(dict, "text", tag_name);
+- dict_add_string(dict, "filename", fname);
+- dict_add_number(dict, "lnum", lnum);
+- if (lnum == 0)
+- dict_add_string(dict, "pattern", cmd);
+- }
+-
+- vim_snprintf((char *)IObuff, IOSIZE, "ltag %s", tag);
+- set_errorlist(curwin, list, ' ', IObuff, NULL);
+-
+- list_free(list);
+- vim_free(fname);
+- vim_free(cmd);
+-
+ cur_match = 0; /* Jump to the first tag */
+ }
+ #endif
+--- 589,607 ----
+ else
+ #endif
+ if (type == DT_TAG && *tag != NUL)
+! // If a count is supplied to the ":tag <name>" command, then
+! // jump to count'th matching tag.
+ cur_match = count > 0 ? count - 1 : 0;
+ else if (type == DT_SELECT || (type == DT_JUMP && num_matches > 1))
+ {
+! print_tag_list(new_tag, use_tagstack, num_matches, matches);
+ ask_for_selection = TRUE;
+ }
+ #if defined(FEAT_QUICKFIX) && defined(FEAT_EVAL)
+ else if (type == DT_LTAG)
+ {
+! if (add_llist_tags(tag, num_matches, matches) == FAIL)
+ goto end_do_tag;
+ cur_match = 0; /* Jump to the first tag */
+ }
+ #endif
+***************
+*** 1089,1094 ****
+--- 769,1116 ----
+ }
+
+ /*
++ * List all the matching tags.
++ */
++ static void
++ print_tag_list(
++ int new_tag,
++ int use_tagstack,
++ int num_matches,
++ char_u **matches)
++ {
++ taggy_T *tagstack = curwin->w_tagstack;
++ int tagstackidx = curwin->w_tagstackidx;
++ int i;
++ char_u *p;
++ char_u *command_end;
++ tagptrs_T tagp;
++ int taglen;
++ int attr;
++
++ /*
++ * Assume that the first match indicates how long the tags can
++ * be, and align the file names to that.
++ */
++ parse_match(matches[0], &tagp);
++ taglen = (int)(tagp.tagname_end - tagp.tagname + 2);
++ if (taglen < 18)
++ taglen = 18;
++ if (taglen > Columns - 25)
++ taglen = MAXCOL;
++ if (msg_col == 0)
++ msg_didout = FALSE; // overwrite previous message
++ msg_start();
++ msg_puts_attr(_(" # pri kind tag"), HL_ATTR(HLF_T));
++ msg_clr_eos();
++ taglen_advance(taglen);
++ msg_puts_attr(_("file\n"), HL_ATTR(HLF_T));
++
++ for (i = 0; i < num_matches && !got_int; ++i)
++ {
++ parse_match(matches[i], &tagp);
++ if (!new_tag && (
++ #if defined(FEAT_QUICKFIX)
++ (g_do_tagpreview != 0
++ && i == ptag_entry.cur_match) ||
++ #endif
++ (use_tagstack
++ && i == tagstack[tagstackidx].cur_match)))
++ *IObuff = '>';
++ else
++ *IObuff = ' ';
++ vim_snprintf((char *)IObuff + 1, IOSIZE - 1,
++ "%2d %s ", i + 1,
++ mt_names[matches[i][0] & MT_MASK]);
++ msg_puts((char *)IObuff);
++ if (tagp.tagkind != NULL)
++ msg_outtrans_len(tagp.tagkind,
++ (int)(tagp.tagkind_end - tagp.tagkind));
++ msg_advance(13);
++ msg_outtrans_len_attr(tagp.tagname,
++ (int)(tagp.tagname_end - tagp.tagname),
++ HL_ATTR(HLF_T));
++ msg_putchar(' ');
++ taglen_advance(taglen);
++
++ // Find out the actual file name. If it is long, truncate
++ // it and put "..." in the middle
++ p = tag_full_fname(&tagp);
++ if (p != NULL)
++ {
++ msg_outtrans_long_attr(p, HL_ATTR(HLF_D));
++ vim_free(p);
++ }
++ if (msg_col > 0)
++ msg_putchar('\n');
++ if (got_int)
++ break;
++ msg_advance(15);
++
++ // print any extra fields
++ command_end = tagp.command_end;
++ if (command_end != NULL)
++ {
++ p = command_end + 3;
++ while (*p && *p != '\r' && *p != '\n')
++ {
++ while (*p == TAB)
++ ++p;
++
++ // skip "file:" without a value (static tag)
++ if (STRNCMP(p, "file:", 5) == 0
++ && vim_isspace(p[5]))
++ {
++ p += 5;
++ continue;
++ }
++ // skip "kind:<kind>" and "<kind>"
++ if (p == tagp.tagkind
++ || (p + 5 == tagp.tagkind
++ && STRNCMP(p, "kind:", 5) == 0))
++ {
++ p = tagp.tagkind_end;
++ continue;
++ }
++ // print all other extra fields
++ attr = HL_ATTR(HLF_CM);
++ while (*p && *p != '\r' && *p != '\n')
++ {
++ if (msg_col + ptr2cells(p) >= Columns)
++ {
++ msg_putchar('\n');
++ if (got_int)
++ break;
++ msg_advance(15);
++ }
++ p = msg_outtrans_one(p, attr);
++ if (*p == TAB)
++ {
++ msg_puts_attr(" ", attr);
++ break;
++ }
++ if (*p == ':')
++ attr = 0;
++ }
++ }
++ if (msg_col > 15)
++ {
++ msg_putchar('\n');
++ if (got_int)
++ break;
++ msg_advance(15);
++ }
++ }
++ else
++ {
++ for (p = tagp.command;
++ *p && *p != '\r' && *p != '\n'; ++p)
++ ;
++ command_end = p;
++ }
++
++ // Put the info (in several lines) at column 15.
++ // Don't display "/^" and "?^".
++ p = tagp.command;
++ if (*p == '/' || *p == '?')
++ {
++ ++p;
++ if (*p == '^')
++ ++p;
++ }
++ // Remove leading whitespace from pattern
++ while (p != command_end && vim_isspace(*p))
++ ++p;
++
++ while (p != command_end)
++ {
++ if (msg_col + (*p == TAB ? 1 : ptr2cells(p)) > Columns)
++ msg_putchar('\n');
++ if (got_int)
++ break;
++ msg_advance(15);
++
++ // skip backslash used for escaping a command char or
++ // a backslash
++ if (*p == '\\' && (*(p + 1) == *tagp.command
++ || *(p + 1) == '\\'))
++ ++p;
++
++ if (*p == TAB)
++ {
++ msg_putchar(' ');
++ ++p;
++ }
++ else
++ p = msg_outtrans_one(p, 0);
++
++ // don't display the "$/;\"" and "$?;\""
++ if (p == command_end - 2 && *p == '$'
++ && *(p + 1) == *tagp.command)
++ break;
++ // don't display matching '/' or '?'
++ if (p == command_end - 1 && *p == *tagp.command
++ && (*p == '/' || *p == '?'))
++ break;
++ }
++ if (msg_col)
++ msg_putchar('\n');
++ ui_breakcheck();
++ }
++ if (got_int)
++ got_int = FALSE; // only stop the listing
++ }
++
++ #if defined(FEAT_QUICKFIX) && defined(FEAT_EVAL)
++ /*
++ * Add the matching tags to the location list for the current
++ * window.
++ */
++ static int
++ add_llist_tags(
++ char_u *tag,
++ int num_matches,
++ char_u **matches)
++ {
++ list_T *list;
++ char_u tag_name[128 + 1];
++ char_u *fname;
++ char_u *cmd;
++ int i;
++ char_u *p;
++ tagptrs_T tagp;
++
++ fname = alloc(MAXPATHL + 1);
++ cmd = alloc(CMDBUFFSIZE + 1);
++ list = list_alloc();
++ if (list == NULL || fname == NULL || cmd == NULL)
++ {
++ vim_free(cmd);
++ vim_free(fname);
++ if (list != NULL)
++ list_free(list);
++ return FAIL;
++ }
++
++ for (i = 0; i < num_matches; ++i)
++ {
++ int len, cmd_len;
++ long lnum;
++ dict_T *dict;
++
++ parse_match(matches[i], &tagp);
++
++ /* Save the tag name */
++ len = (int)(tagp.tagname_end - tagp.tagname);
++ if (len > 128)
++ len = 128;
++ vim_strncpy(tag_name, tagp.tagname, len);
++ tag_name[len] = NUL;
++
++ // Save the tag file name
++ p = tag_full_fname(&tagp);
++ if (p == NULL)
++ continue;
++ vim_strncpy(fname, p, MAXPATHL);
++ vim_free(p);
++
++ // Get the line number or the search pattern used to locate
++ // the tag.
++ lnum = 0;
++ if (isdigit(*tagp.command))
++ // Line number is used to locate the tag
++ lnum = atol((char *)tagp.command);
++ else
++ {
++ char_u *cmd_start, *cmd_end;
++
++ // Search pattern is used to locate the tag
++
++ // Locate the end of the command
++ cmd_start = tagp.command;
++ cmd_end = tagp.command_end;
++ if (cmd_end == NULL)
++ {
++ for (p = tagp.command;
++ *p && *p != '\r' && *p != '\n'; ++p)
++ ;
++ cmd_end = p;
++ }
++
++ // Now, cmd_end points to the character after the
++ // command. Adjust it to point to the last
++ // character of the command.
++ cmd_end--;
++
++ // Skip the '/' and '?' characters at the
++ // beginning and end of the search pattern.
++ if (*cmd_start == '/' || *cmd_start == '?')
++ cmd_start++;
++
++ if (*cmd_end == '/' || *cmd_end == '?')
++ cmd_end--;
++
++ len = 0;
++ cmd[0] = NUL;
++
++ // If "^" is present in the tag search pattern, then
++ // copy it first.
++ if (*cmd_start == '^')
++ {
++ STRCPY(cmd, "^");
++ cmd_start++;
++ len++;
++ }
++
++ // Precede the tag pattern with \V to make it very
++ // nomagic.
++ STRCAT(cmd, "\\V");
++ len += 2;
++
++ cmd_len = (int)(cmd_end - cmd_start + 1);
++ if (cmd_len > (CMDBUFFSIZE - 5))
++ cmd_len = CMDBUFFSIZE - 5;
++ STRNCAT(cmd, cmd_start, cmd_len);
++ len += cmd_len;
++
++ if (cmd[len - 1] == '$')
++ {
++ // Replace '$' at the end of the search pattern
++ // with '\$'
++ cmd[len - 1] = '\\';
++ cmd[len] = '$';
++ len++;
++ }
++
++ cmd[len] = NUL;
++ }
++
++ if ((dict = dict_alloc()) == NULL)
++ continue;
++ if (list_append_dict(list, dict) == FAIL)
++ {
++ vim_free(dict);
++ continue;
++ }
++
++ dict_add_string(dict, "text", tag_name);
++ dict_add_string(dict, "filename", fname);
++ dict_add_number(dict, "lnum", lnum);
++ if (lnum == 0)
++ dict_add_string(dict, "pattern", cmd);
++ }
++
++ vim_snprintf((char *)IObuff, IOSIZE, "ltag %s", tag);
++ set_errorlist(curwin, list, ' ', IObuff, NULL);
++
++ list_free(list);
++ vim_free(fname);
++ vim_free(cmd);
++
++ return OK;
++ }
++ #endif
++
++ /*
+ * Free cached tags.
+ */
+ void
+***************
+*** 3431,3648 ****
+ }
+
+ /*
+- * Converts a file name into a canonical form. It simplifies a file name into
+- * its simplest form by stripping out unneeded components, if any. The
+- * resulting file name is simplified in place and will either be the same
+- * length as that supplied, or shorter.
+- */
+- void
+- simplify_filename(char_u *filename)
+- {
+- #ifndef AMIGA /* Amiga doesn't have "..", it uses "/" */
+- int components = 0;
+- char_u *p, *tail, *start;
+- int stripping_disabled = FALSE;
+- int relative = TRUE;
+-
+- p = filename;
+- #ifdef BACKSLASH_IN_FILENAME
+- if (p[1] == ':') /* skip "x:" */
+- p += 2;
+- #endif
+-
+- if (vim_ispathsep(*p))
+- {
+- relative = FALSE;
+- do
+- ++p;
+- while (vim_ispathsep(*p));
+- }
+- start = p; /* remember start after "c:/" or "/" or "///" */
+-
+- do
+- {
+- /* At this point "p" is pointing to the char following a single "/"
+- * or "p" is at the "start" of the (absolute or relative) path name. */
+- #ifdef VMS
+- /* VMS allows device:[path] - don't strip the [ in directory */
+- if ((*p == '[' || *p == '<') && p > filename && p[-1] == ':')
+- {
+- /* :[ or :< composition: vms directory component */
+- ++components;
+- p = getnextcomp(p + 1);
+- }
+- /* allow remote calls as host"user passwd"::device:[path] */
+- else if (p[0] == ':' && p[1] == ':' && p > filename && p[-1] == '"' )
+- {
+- /* ":: composition: vms host/passwd component */
+- ++components;
+- p = getnextcomp(p + 2);
+- }
+- else
+- #endif
+- if (vim_ispathsep(*p))
+- STRMOVE(p, p + 1); /* remove duplicate "/" */
+- else if (p[0] == '.' && (vim_ispathsep(p[1]) || p[1] == NUL))
+- {
+- if (p == start && relative)
+- p += 1 + (p[1] != NUL); /* keep single "." or leading "./" */
+- else
+- {
+- /* Strip "./" or ".///". If we are at the end of the file name
+- * and there is no trailing path separator, either strip "/." if
+- * we are after "start", or strip "." if we are at the beginning
+- * of an absolute path name . */
+- tail = p + 1;
+- if (p[1] != NUL)
+- while (vim_ispathsep(*tail))
+- MB_PTR_ADV(tail);
+- else if (p > start)
+- --p; /* strip preceding path separator */
+- STRMOVE(p, tail);
+- }
+- }
+- else if (p[0] == '.' && p[1] == '.' &&
+- (vim_ispathsep(p[2]) || p[2] == NUL))
+- {
+- /* Skip to after ".." or "../" or "..///". */
+- tail = p + 2;
+- while (vim_ispathsep(*tail))
+- MB_PTR_ADV(tail);
+-
+- if (components > 0) /* strip one preceding component */
+- {
+- int do_strip = FALSE;
+- char_u saved_char;
+- stat_T st;
+-
+- /* Don't strip for an erroneous file name. */
+- if (!stripping_disabled)
+- {
+- /* If the preceding component does not exist in the file
+- * system, we strip it. On Unix, we don't accept a symbolic
+- * link that refers to a non-existent file. */
+- saved_char = p[-1];
+- p[-1] = NUL;
+- #ifdef UNIX
+- if (mch_lstat((char *)filename, &st) < 0)
+- #else
+- if (mch_stat((char *)filename, &st) < 0)
+- #endif
+- do_strip = TRUE;
+- p[-1] = saved_char;
+-
+- --p;
+- /* Skip back to after previous '/'. */
+- while (p > start && !after_pathsep(start, p))
+- MB_PTR_BACK(start, p);
+-
+- if (!do_strip)
+- {
+- /* If the component exists in the file system, check
+- * that stripping it won't change the meaning of the
+- * file name. First get information about the
+- * unstripped file name. This may fail if the component
+- * to strip is not a searchable directory (but a regular
+- * file, for instance), since the trailing "/.." cannot
+- * be applied then. We don't strip it then since we
+- * don't want to replace an erroneous file name by
+- * a valid one, and we disable stripping of later
+- * components. */
+- saved_char = *tail;
+- *tail = NUL;
+- if (mch_stat((char *)filename, &st) >= 0)
+- do_strip = TRUE;
+- else
+- stripping_disabled = TRUE;
+- *tail = saved_char;
+- #ifdef UNIX
+- if (do_strip)
+- {
+- stat_T new_st;
+-
+- /* On Unix, the check for the unstripped file name
+- * above works also for a symbolic link pointing to
+- * a searchable directory. But then the parent of
+- * the directory pointed to by the link must be the
+- * same as the stripped file name. (The latter
+- * exists in the file system since it is the
+- * component's parent directory.) */
+- if (p == start && relative)
+- (void)mch_stat(".", &new_st);
+- else
+- {
+- saved_char = *p;
+- *p = NUL;
+- (void)mch_stat((char *)filename, &new_st);
+- *p = saved_char;
+- }
+-
+- if (new_st.st_ino != st.st_ino ||
+- new_st.st_dev != st.st_dev)
+- {
+- do_strip = FALSE;
+- /* We don't disable stripping of later
+- * components since the unstripped path name is
+- * still valid. */
+- }
+- }
+- #endif
+- }
+- }
+-
+- if (!do_strip)
+- {
+- /* Skip the ".." or "../" and reset the counter for the
+- * components that might be stripped later on. */
+- p = tail;
+- components = 0;
+- }
+- else
+- {
+- /* Strip previous component. If the result would get empty
+- * and there is no trailing path separator, leave a single
+- * "." instead. If we are at the end of the file name and
+- * there is no trailing path separator and a preceding
+- * component is left after stripping, strip its trailing
+- * path separator as well. */
+- if (p == start && relative && tail[-1] == '.')
+- {
+- *p++ = '.';
+- *p = NUL;
+- }
+- else
+- {
+- if (p > start && tail[-1] == '.')
+- --p;
+- STRMOVE(p, tail); /* strip previous component */
+- }
+-
+- --components;
+- }
+- }
+- else if (p == start && !relative) /* leading "/.." or "/../" */
+- STRMOVE(p, tail); /* strip ".." or "../" */
+- else
+- {
+- if (p == start + 2 && p[-2] == '.') /* leading "./../" */
+- {
+- STRMOVE(p - 2, p); /* strip leading "./" */
+- tail -= 2;
+- }
+- p = tail; /* skip to char after ".." or "../" */
+- }
+- }
+- else
+- {
+- ++components; /* simple path component */
+- p = getnextcomp(p);
+- }
+- } while (*p != NUL);
+- #endif /* !AMIGA */
+- }
+-
+- /*
+ * Check if we have a tag for the buffer with name "buf_ffname".
+ * This is a bit slow, because of the full path compare in fullpathcmp().
+ * Return TRUE if tag for file "fname" if tag file "tag_fname" is for current
+--- 3453,3458 ----
+*** ../vim-8.1.1098/src/proto/tag.pro 2018-11-11 15:20:32.436704418 +0100
+--- src/proto/tag.pro 2019-03-31 19:09:23.798893253 +0200
+***************
+*** 6,12 ****
+ void free_tag_stuff(void);
+ int get_tagfname(tagname_T *tnp, int first, char_u *buf);
+ void tagname_free(tagname_T *tnp);
+- 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);
+--- 6,11 ----
+*** ../vim-8.1.1098/src/findfile.c 2019-03-09 12:32:50.673562149 +0100
+--- src/findfile.c 2019-03-31 19:09:15.586959263 +0200
+***************
+*** 2605,2607 ****
+--- 2605,2819 ----
+ }
+
+ #endif // FEAT_SEARCHPATH
++
++ /*
++ * Converts a file name into a canonical form. It simplifies a file name into
++ * its simplest form by stripping out unneeded components, if any. The
++ * resulting file name is simplified in place and will either be the same
++ * length as that supplied, or shorter.
++ */
++ void
++ simplify_filename(char_u *filename)
++ {
++ #ifndef AMIGA // Amiga doesn't have "..", it uses "/"
++ int components = 0;
++ char_u *p, *tail, *start;
++ int stripping_disabled = FALSE;
++ int relative = TRUE;
++
++ p = filename;
++ # ifdef BACKSLASH_IN_FILENAME
++ if (p[1] == ':') // skip "x:"
++ p += 2;
++ # endif
++
++ if (vim_ispathsep(*p))
++ {
++ relative = FALSE;
++ do
++ ++p;
++ while (vim_ispathsep(*p));
++ }
++ start = p; // remember start after "c:/" or "/" or "///"
++
++ do
++ {
++ // At this point "p" is pointing to the char following a single "/"
++ // or "p" is at the "start" of the (absolute or relative) path name.
++ # ifdef VMS
++ // VMS allows device:[path] - don't strip the [ in directory
++ if ((*p == '[' || *p == '<') && p > filename && p[-1] == ':')
++ {
++ // :[ or :< composition: vms directory component
++ ++components;
++ p = getnextcomp(p + 1);
++ }
++ // allow remote calls as host"user passwd"::device:[path]
++ else if (p[0] == ':' && p[1] == ':' && p > filename && p[-1] == '"' )
++ {
++ // ":: composition: vms host/passwd component
++ ++components;
++ p = getnextcomp(p + 2);
++ }
++ else
++ # endif
++ if (vim_ispathsep(*p))
++ STRMOVE(p, p + 1); // remove duplicate "/"
++ else if (p[0] == '.' && (vim_ispathsep(p[1]) || p[1] == NUL))
++ {
++ if (p == start && relative)
++ p += 1 + (p[1] != NUL); // keep single "." or leading "./"
++ else
++ {
++ // Strip "./" or ".///". If we are at the end of the file name
++ // and there is no trailing path separator, either strip "/." if
++ // we are after "start", or strip "." if we are at the beginning
++ // of an absolute path name .
++ tail = p + 1;
++ if (p[1] != NUL)
++ while (vim_ispathsep(*tail))
++ MB_PTR_ADV(tail);
++ else if (p > start)
++ --p; // strip preceding path separator
++ STRMOVE(p, tail);
++ }
++ }
++ else if (p[0] == '.' && p[1] == '.' &&
++ (vim_ispathsep(p[2]) || p[2] == NUL))
++ {
++ // Skip to after ".." or "../" or "..///".
++ tail = p + 2;
++ while (vim_ispathsep(*tail))
++ MB_PTR_ADV(tail);
++
++ if (components > 0) // strip one preceding component
++ {
++ int do_strip = FALSE;
++ char_u saved_char;
++ stat_T st;
++
++ /* Don't strip for an erroneous file name. */
++ if (!stripping_disabled)
++ {
++ // If the preceding component does not exist in the file
++ // system, we strip it. On Unix, we don't accept a symbolic
++ // link that refers to a non-existent file.
++ saved_char = p[-1];
++ p[-1] = NUL;
++ # ifdef UNIX
++ if (mch_lstat((char *)filename, &st) < 0)
++ # else
++ if (mch_stat((char *)filename, &st) < 0)
++ # endif
++ do_strip = TRUE;
++ p[-1] = saved_char;
++
++ --p;
++ // Skip back to after previous '/'.
++ while (p > start && !after_pathsep(start, p))
++ MB_PTR_BACK(start, p);
++
++ if (!do_strip)
++ {
++ // If the component exists in the file system, check
++ // that stripping it won't change the meaning of the
++ // file name. First get information about the
++ // unstripped file name. This may fail if the component
++ // to strip is not a searchable directory (but a regular
++ // file, for instance), since the trailing "/.." cannot
++ // be applied then. We don't strip it then since we
++ // don't want to replace an erroneous file name by
++ // a valid one, and we disable stripping of later
++ // components.
++ saved_char = *tail;
++ *tail = NUL;
++ if (mch_stat((char *)filename, &st) >= 0)
++ do_strip = TRUE;
++ else
++ stripping_disabled = TRUE;
++ *tail = saved_char;
++ # ifdef UNIX
++ if (do_strip)
++ {
++ stat_T new_st;
++
++ // On Unix, the check for the unstripped file name
++ // above works also for a symbolic link pointing to
++ // a searchable directory. But then the parent of
++ // the directory pointed to by the link must be the
++ // same as the stripped file name. (The latter
++ // exists in the file system since it is the
++ // component's parent directory.)
++ if (p == start && relative)
++ (void)mch_stat(".", &new_st);
++ else
++ {
++ saved_char = *p;
++ *p = NUL;
++ (void)mch_stat((char *)filename, &new_st);
++ *p = saved_char;
++ }
++
++ if (new_st.st_ino != st.st_ino ||
++ new_st.st_dev != st.st_dev)
++ {
++ do_strip = FALSE;
++ // We don't disable stripping of later
++ // components since the unstripped path name is
++ // still valid.
++ }
++ }
++ # endif
++ }
++ }
++
++ if (!do_strip)
++ {
++ // Skip the ".." or "../" and reset the counter for the
++ // components that might be stripped later on.
++ p = tail;
++ components = 0;
++ }
++ else
++ {
++ // Strip previous component. If the result would get empty
++ // and there is no trailing path separator, leave a single
++ // "." instead. If we are at the end of the file name and
++ // there is no trailing path separator and a preceding
++ // component is left after stripping, strip its trailing
++ // path separator as well.
++ if (p == start && relative && tail[-1] == '.')
++ {
++ *p++ = '.';
++ *p = NUL;
++ }
++ else
++ {
++ if (p > start && tail[-1] == '.')
++ --p;
++ STRMOVE(p, tail); // strip previous component
++ }
++
++ --components;
++ }
++ }
++ else if (p == start && !relative) // leading "/.." or "/../"
++ STRMOVE(p, tail); // strip ".." or "../"
++ else
++ {
++ if (p == start + 2 && p[-2] == '.') // leading "./../"
++ {
++ STRMOVE(p - 2, p); // strip leading "./"
++ tail -= 2;
++ }
++ p = tail; // skip to char after ".." or "../"
++ }
++ }
++ else
++ {
++ ++components; // simple path component
++ p = getnextcomp(p);
++ }
++ } while (*p != NUL);
++ #endif // !AMIGA
++ }
+*** ../vim-8.1.1098/src/proto/findfile.pro 2019-02-13 22:45:21.512636158 +0100
+--- src/proto/findfile.pro 2019-03-31 19:09:20.870916772 +0200
+***************
+*** 15,18 ****
+--- 15,19 ----
+ int vim_ispathlistsep(int c);
+ void uniquefy_paths(garray_T *gap, char_u *pattern);
+ int expand_in_path(garray_T *gap, char_u *pattern, int flags);
++ void simplify_filename(char_u *filename);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1098/src/version.c 2019-03-31 15:31:54.592053004 +0200
+--- src/version.c 2019-03-31 19:39:26.094371299 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1099,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+175. You send yourself e-mail before you go to bed to remind you
+ what to do when you wake 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.1100 b/data/vim/patches/8.1.1100
new file mode 100644
index 000000000..21069ab39
--- /dev/null
+++ b/data/vim/patches/8.1.1100
@@ -0,0 +1,88 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1100
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1100
+Problem: Tag file without trailing newline no longer works. (Marco Hinz)
+Solution: Don't expect a newline at the end of the file. (closes #4200)
+Files: src/tag.c, src/testdir/test_taglist.vim
+
+
+*** ../vim-8.1.1099/src/tag.c 2019-03-31 19:40:03.814129134 +0200
+--- src/tag.c 2019-04-02 21:20:40.024713057 +0200
+***************
+*** 1943,1956 ****
+ }
+
+ parse_line:
+! if (vim_strchr(lbuf, NL) == NULL
+ #ifdef FEAT_CSCOPE
+ && !use_cscope
+ #endif
+ )
+ {
+- // Truncated line, ignore it. Has been reported for
+- // Mozilla JS with extremely long names.
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+--- 1943,1958 ----
+ }
+
+ parse_line:
+! // When the line is too long the NUL will not be in the
+! // last-but-one byte (see vim_fgets()).
+! // Has been reported for Mozilla JS with extremely long names.
+! // In that case we can't parse it and we ignore the line.
+! if (lbuf[LSIZE - 2] != NUL
+ #ifdef FEAT_CSCOPE
+ && !use_cscope
+ #endif
+ )
+ {
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+*** ../vim-8.1.1099/src/testdir/test_taglist.vim 2019-02-13 21:19:09.503999092 +0100
+--- src/testdir/test_taglist.vim 2019-04-02 20:44:59.661214578 +0200
+***************
+*** 98,100 ****
+--- 98,113 ----
+ call delete('Xtags2')
+ bd
+ endfunc
++
++ " For historical reasons we support a tags file where the last line is missing
++ " the newline.
++ func Test_tagsfile_without_trailing_newline()
++ call writefile(["Foo\tfoo\t1"], 'Xtags', 'b')
++ set tags=Xtags
++
++ let tl = taglist('.*')
++ call assert_equal(1, len(tl))
++ call assert_equal('Foo', tl[0].name)
++
++ call delete('Xtags')
++ endfunc
+*** ../vim-8.1.1099/src/version.c 2019-03-31 19:40:03.818129110 +0200
+--- src/version.c 2019-04-02 20:35:30.113177877 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1100,
+ /**/
+
+--
+Rule #1: Don't give somebody a tool that he's going to hurt himself with.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1101 b/data/vim/patches/8.1.1101
new file mode 100644
index 000000000..2acc5f086
--- /dev/null
+++ b/data/vim/patches/8.1.1101
@@ -0,0 +1,50 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1101
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1101
+Problem: Signals test may fail in the GUI.
+Solution: Skip the test for the GUI. (Yee Checng Chin, closes #4202)
+Files: src/testdir/test_signals.vim
+
+
+*** ../vim-8.1.1100/src/testdir/test_signals.vim 2019-03-24 14:58:09.966216115 +0100
+--- src/testdir/test_signals.vim 2019-04-02 21:42:15.929309336 +0200
+***************
+*** 4,9 ****
+--- 4,14 ----
+ finish
+ endif
+
++ if has('gui_running')
++ " Signals only work for terminals, and won't work for GUI.
++ finish
++ endif
++
+ source shared.vim
+
+ " Test signal WINCH (window resize signal)
+*** ../vim-8.1.1100/src/version.c 2019-04-02 21:25:58.354360122 +0200
+--- src/version.c 2019-04-02 21:44:50.120571960 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1101,
+ /**/
+
+--
+Wizards had always known that the act of observation changed the thing that
+was observed, and sometimes forgot that it also changed the observer too.
+ Terry Pratchett - Interesting times
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1102 b/data/vim/patches/8.1.1102
new file mode 100644
index 000000000..1e931e5e3
--- /dev/null
+++ b/data/vim/patches/8.1.1102
@@ -0,0 +1,138 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1102
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1102
+Problem: Win32 exe file contains unused code.
+Solution: Remove unused #ifdefs and code. (Ken Takata, closes #4198)
+Files: src/os_w32exe.c
+
+
+*** ../vim-8.1.1101/src/os_w32exe.c 2019-03-28 22:43:12.103997449 +0100
+--- src/os_w32exe.c 2019-04-02 22:01:29.722718578 +0200
+***************
+*** 10,16 ****
+ /*
+ * Windows GUI: main program (EXE) entry point:
+ *
+! * Ron Aaron <ronaharon@yahoo.com> wrote this and the DLL support code.
+ */
+ #include "vim.h"
+
+--- 10,17 ----
+ /*
+ * Windows GUI: main program (EXE) entry point:
+ *
+! * Ron Aaron <ronaharon@yahoo.com> wrote this and the (now deleted) DLL support
+! * code.
+ */
+ #include "vim.h"
+
+***************
+*** 20,73 ****
+ # endif
+ #endif
+
+! /* cproto doesn't create a prototype for main() */
+! int _cdecl
+! #if defined(FEAT_GUI_MSWIN)
+! VimMain
+! #else
+! main
+! #endif
+! (int argc, char **argv);
+! static int (_cdecl *pmain)(int, char **);
+!
+! #ifndef PROTO
+ #ifdef FEAT_GUI
+ void _cdecl SaveInst(HINSTANCE hInst);
+- static void (_cdecl *pSaveInst)(HINSTANCE);
+ #endif
+
+ int WINAPI
+ WinMain(
+! HINSTANCE hInstance UNUSED,
+ HINSTANCE hPrevInst UNUSED,
+ LPSTR lpszCmdLine UNUSED,
+ int nCmdShow UNUSED)
+ {
+ int argc = 0;
+ char **argv = NULL;
+- #ifdef FEAT_GUI
+- pSaveInst = SaveInst;
+- #endif
+- pmain =
+- #if defined(FEAT_GUI_MSWIN)
+- //&& defined(__MINGW32__)
+- VimMain
+- #else
+- main
+- #endif
+- ;
+- #ifdef FEAT_GUI
+- pSaveInst(
+- #ifdef __MINGW32__
+- GetModuleHandle(NULL)
+- #else
+- hInstance
+- #endif
+- );
+- #endif
+- pmain(argc, argv);
+
+! free_cmd_argsW();
+
+ return 0;
+ }
+--- 21,47 ----
+ # endif
+ #endif
+
+! // cproto doesn't create a prototype for VimMain()
+! int _cdecl VimMain(int argc, char **argv);
+ #ifdef FEAT_GUI
+ void _cdecl SaveInst(HINSTANCE hInst);
+ #endif
+
++ #ifndef PROTO
+ int WINAPI
+ WinMain(
+! HINSTANCE hInstance,
+ HINSTANCE hPrevInst UNUSED,
+ LPSTR lpszCmdLine UNUSED,
+ int nCmdShow UNUSED)
+ {
+ int argc = 0;
+ char **argv = NULL;
+
+! # ifdef FEAT_GUI
+! SaveInst(hInstance);
+! # endif
+! VimMain(argc, argv);
+
+ return 0;
+ }
+*** ../vim-8.1.1101/src/version.c 2019-04-02 21:45:38.260326643 +0200
+--- src/version.c 2019-04-02 22:00:18.847163631 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1102,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+182. You may not know what is happening in the world, but you know
+ every bit of net-gossip there 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.1103 b/data/vim/patches/8.1.1103
new file mode 100644
index 000000000..7cdc909d0
--- /dev/null
+++ b/data/vim/patches/8.1.1103
@@ -0,0 +1,4150 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1103
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1103
+Problem: MS-Windows: old API calls are no longer needed.
+Solution: Always use the wide functions. (Ken Takata, closes #4199)
+Files: src/glbl_ime.cpp, src/globals.h, src/gui_w32.c, src/misc1.c,
+ src/os_mswin.c, src/os_win32.c, src/vim.h
+
+
+*** ../vim-8.1.1102/src/glbl_ime.cpp 2019-02-17 17:44:36.207875527 +0100
+--- src/glbl_ime.cpp 2019-04-02 22:04:17.785655516 +0200
+***************
+*** 133,146 ****
+
+ if (pIApp == NULL || pIApp->OnDefWindowProc(hWnd, Msg,
+ wParam, lParam, &lResult) != S_OK)
+! {
+! #if defined(MSWIN)
+! if (wide_WindowProc)
+! lResult = DefWindowProcW(hWnd, Msg, wParam, lParam);
+! else
+! #endif
+! lResult = DefWindowProc(hWnd, Msg, wParam, lParam);
+! }
+ return lResult;
+ }
+
+--- 133,139 ----
+
+ if (pIApp == NULL || pIApp->OnDefWindowProc(hWnd, Msg,
+ wParam, lParam, &lResult) != S_OK)
+! lResult = DefWindowProcW(hWnd, Msg, wParam, lParam);
+ return lResult;
+ }
+
+*** ../vim-8.1.1102/src/globals.h 2019-03-30 13:53:26.170425120 +0100
+--- src/globals.h 2019-04-02 22:04:17.785655516 +0200
+***************
+*** 822,831 ****
+ #endif
+ EXTERN int has_mbyte INIT(= 0); /* any multi-byte encoding */
+
+- #if defined(MSWIN)
+- EXTERN int wide_WindowProc INIT(= FALSE); /* use wide WindowProc() */
+- #endif
+-
+ /*
+ * To speed up BYTELEN() we fill a table with the byte lengths whenever
+ * enc_utf8 or enc_dbcs changes.
+--- 822,827 ----
+*** ../vim-8.1.1102/src/gui_w32.c 2019-03-30 18:46:57.352077376 +0100
+--- src/gui_w32.c 2019-04-02 22:10:34.450870828 +0200
+***************
+*** 313,324 ****
+ static int destroying = FALSE; /* call DestroyWindow() ourselves */
+
+ #ifdef MSWIN_FIND_REPLACE
+! static UINT s_findrep_msg = 0; /* set in gui_w[16/32].c */
+! static FINDREPLACE s_findrep_struct;
+! static FINDREPLACEW s_findrep_struct_w;
+ static HWND s_findrep_hwnd = NULL;
+! static int s_findrep_is_find; /* TRUE for find dialog, FALSE
+! for find/replace dialog */
+ #endif
+
+ static HINSTANCE s_hinst = NULL;
+--- 313,323 ----
+ static int destroying = FALSE; /* call DestroyWindow() ourselves */
+
+ #ifdef MSWIN_FIND_REPLACE
+! static UINT s_findrep_msg = 0; // set in gui_w[16/32].c
+! static FINDREPLACEW s_findrep_struct;
+ static HWND s_findrep_hwnd = NULL;
+! static int s_findrep_is_find; // TRUE for find dialog, FALSE
+! // for find/replace dialog
+ #endif
+
+ static HINSTANCE s_hinst = NULL;
+***************
+*** 391,397 ****
+ }
+ #endif
+
+! /* use of WindowProc depends on wide_WindowProc */
+ #define MyWindowProc vim_WindowProc
+
+ extern int current_font_height; /* this is in os_mswin.c */
+--- 390,396 ----
+ }
+ #endif
+
+! /* use of WindowProc depends on Global IME */
+ #define MyWindowProc vim_WindowProc
+
+ extern int current_font_height; /* this is in os_mswin.c */
+***************
+*** 1107,1149 ****
+
+ #ifdef MSWIN_FIND_REPLACE
+ /*
+- * copy useful data from structure LPFINDREPLACE to structure LPFINDREPLACEW
+- */
+- static void
+- findrep_atow(LPFINDREPLACEW lpfrw, LPFINDREPLACE lpfr)
+- {
+- WCHAR *wp;
+-
+- lpfrw->hwndOwner = lpfr->hwndOwner;
+- lpfrw->Flags = lpfr->Flags;
+-
+- wp = enc_to_utf16((char_u *)lpfr->lpstrFindWhat, NULL);
+- wcsncpy(lpfrw->lpstrFindWhat, wp, lpfrw->wFindWhatLen - 1);
+- vim_free(wp);
+-
+- /* the field "lpstrReplaceWith" doesn't need to be copied */
+- }
+-
+- /*
+- * copy useful data from structure LPFINDREPLACEW to structure LPFINDREPLACE
+- */
+- static void
+- findrep_wtoa(LPFINDREPLACE lpfr, LPFINDREPLACEW lpfrw)
+- {
+- char_u *p;
+-
+- lpfr->Flags = lpfrw->Flags;
+-
+- p = utf16_to_enc((short_u*)lpfrw->lpstrFindWhat, NULL);
+- vim_strncpy((char_u *)lpfr->lpstrFindWhat, p, lpfr->wFindWhatLen - 1);
+- vim_free(p);
+-
+- p = utf16_to_enc((short_u*)lpfrw->lpstrReplaceWith, NULL);
+- vim_strncpy((char_u *)lpfr->lpstrReplaceWith, p, lpfr->wReplaceWithLen - 1);
+- vim_free(p);
+- }
+-
+- /*
+ * Handle a Find/Replace window message.
+ */
+ static void
+--- 1106,1111 ----
+***************
+*** 1152,1162 ****
+ int flags = 0;
+ int down;
+
+- /* If the OS is Windows NT, and 'encoding' differs from active codepage:
+- * convert text from wide string. */
+- if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+- findrep_wtoa(&s_findrep_struct, &s_findrep_struct_w);
+-
+ if (s_findrep_struct.Flags & FR_DIALOGTERM)
+ /* Give main window the focus back. */
+ (void)SetFocus(s_hwnd);
+--- 1114,1119 ----
+***************
+*** 1184,1197 ****
+
+ if (flags != 0)
+ {
+ /* Call the generic GUI function to do the actual work. */
+ if (s_findrep_struct.Flags & FR_WHOLEWORD)
+ flags |= FRD_WHOLE_WORD;
+ if (s_findrep_struct.Flags & FR_MATCHCASE)
+ flags |= FRD_MATCH_CASE;
+ down = (s_findrep_struct.Flags & FR_DOWN) != 0;
+! gui_do_findrepl(flags, (char_u *)s_findrep_struct.lpstrFindWhat,
+! (char_u *)s_findrep_struct.lpstrReplaceWith, down);
+ }
+ }
+ #endif
+--- 1141,1160 ----
+
+ if (flags != 0)
+ {
++ char_u *p, *q;
++
+ /* Call the generic GUI function to do the actual work. */
+ if (s_findrep_struct.Flags & FR_WHOLEWORD)
+ flags |= FRD_WHOLE_WORD;
+ if (s_findrep_struct.Flags & FR_MATCHCASE)
+ flags |= FRD_MATCH_CASE;
+ down = (s_findrep_struct.Flags & FR_DOWN) != 0;
+! p = utf16_to_enc(s_findrep_struct.lpstrFindWhat, NULL);
+! q = utf16_to_enc(s_findrep_struct.lpstrReplaceWith, NULL);
+! if (p != NULL && q != NULL)
+! gui_do_findrepl(flags, p, q, down);
+! vim_free(p);
+! vim_free(q);
+ }
+ }
+ #endif
+***************
+*** 1310,1318 ****
+ #ifdef GLOBAL_IME
+ return global_ime_DefWindowProc(hwnd, message, wParam, lParam);
+ #else
+! if (wide_WindowProc)
+! return DefWindowProcW(hwnd, message, wParam, lParam);
+! return DefWindowProc(hwnd, message, wParam, lParam);
+ #endif
+ }
+
+--- 1273,1279 ----
+ #ifdef GLOBAL_IME
+ return global_ime_DefWindowProc(hwnd, message, wParam, lParam);
+ #else
+! return DefWindowProcW(hwnd, message, wParam, lParam);
+ #endif
+ }
+
+***************
+*** 2332,2352 ****
+ int n;
+ int wlen = len;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! /* 'encoding' differs from active codepage: convert text and use wide
+! * function */
+! wstr = enc_to_utf16(str, &wlen);
+! if (wstr != NULL)
+! {
+! n = GetTextExtentPointW(hdc, wstr, wlen, &size);
+! vim_free(wstr);
+! if (n)
+! return size.cx;
+! }
+! }
+
+! return GetTextWidth(hdc, str, len);
+ }
+
+ static void get_work_area(RECT *spi_rect);
+--- 2293,2307 ----
+ int n;
+ int wlen = len;
+
+! wstr = enc_to_utf16(str, &wlen);
+! if (wstr == NULL)
+! return 0;
+
+! n = GetTextExtentPointW(hdc, wstr, wlen, &size);
+! vim_free(wstr);
+! if (n)
+! return size.cx;
+! return 0;
+ }
+
+ static void get_work_area(RECT *spi_rect);
+***************
+*** 2423,2441 ****
+ if (showit)
+ {
+ # ifndef TB_SETUNICODEFORMAT
+! /* For older compilers. We assume this never changes. */
+ # define TB_SETUNICODEFORMAT 0x2005
+ # endif
+! /* Enable/disable unicode support */
+! int uu = (enc_codepage >= 0 && (int)GetACP() != enc_codepage);
+! SendMessage(s_toolbarhwnd, TB_SETUNICODEFORMAT, (WPARAM)uu, (LPARAM)0);
+ ShowWindow(s_toolbarhwnd, SW_SHOW);
+ }
+ else
+ ShowWindow(s_toolbarhwnd, SW_HIDE);
+ }
+
+! /* Then number of bitmaps is fixed. Exit is missing! */
+ #define TOOLBAR_BITMAP_COUNT 31
+
+ #endif
+--- 2378,2396 ----
+ if (showit)
+ {
+ # ifndef TB_SETUNICODEFORMAT
+! // For older compilers. We assume this never changes.
+ # define TB_SETUNICODEFORMAT 0x2005
+ # endif
+! // Enable unicode support
+! SendMessage(s_toolbarhwnd, TB_SETUNICODEFORMAT, (WPARAM)TRUE,
+! (LPARAM)0);
+ ShowWindow(s_toolbarhwnd, SW_SHOW);
+ }
+ else
+ ShowWindow(s_toolbarhwnd, SW_HIDE);
+ }
+
+! /* The number of bitmaps is fixed. Exit is missing! */
+ #define TOOLBAR_BITMAP_COUNT 31
+
+ #endif
+***************
+*** 2444,2483 ****
+ static void
+ add_tabline_popup_menu_entry(HMENU pmenu, UINT item_id, char_u *item_text)
+ {
+! WCHAR *wn = NULL;
+!
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! /* 'encoding' differs from active codepage: convert menu name
+! * and use wide function */
+! wn = enc_to_utf16(item_text, NULL);
+! if (wn != NULL)
+! {
+! MENUITEMINFOW infow;
+!
+! infow.cbSize = sizeof(infow);
+! infow.fMask = MIIM_TYPE | MIIM_ID;
+! infow.wID = item_id;
+! infow.fType = MFT_STRING;
+! infow.dwTypeData = wn;
+! infow.cch = (UINT)wcslen(wn);
+! InsertMenuItemW(pmenu, item_id, FALSE, &infow);
+! vim_free(wn);
+! }
+! }
+
+ if (wn == NULL)
+! {
+! MENUITEMINFO info;
+
+! info.cbSize = sizeof(info);
+! info.fMask = MIIM_TYPE | MIIM_ID;
+! info.wID = item_id;
+! info.fType = MFT_STRING;
+! info.dwTypeData = (LPTSTR)item_text;
+! info.cch = (UINT)STRLEN(item_text);
+! InsertMenuItem(pmenu, item_id, FALSE, &info);
+! }
+ }
+
+ static void
+--- 2399,2419 ----
+ static void
+ add_tabline_popup_menu_entry(HMENU pmenu, UINT item_id, char_u *item_text)
+ {
+! WCHAR *wn;
+! MENUITEMINFOW infow;
+
++ wn = enc_to_utf16(item_text, NULL);
+ if (wn == NULL)
+! return;
+
+! infow.cbSize = sizeof(infow);
+! infow.fMask = MIIM_TYPE | MIIM_ID;
+! infow.wID = item_id;
+! infow.fType = MFT_STRING;
+! infow.dwTypeData = wn;
+! infow.cch = (UINT)wcslen(wn);
+! InsertMenuItemW(pmenu, item_id, FALSE, &infow);
+! vim_free(wn);
+ }
+
+ static void
+***************
+*** 2573,2580 ****
+ int nr = 0;
+ int curtabidx = 0;
+ int tabadded = 0;
+- static int use_unicode = FALSE;
+- int uu;
+ WCHAR *wstr = NULL;
+
+ if (s_tabhwnd == NULL)
+--- 2509,2514 ----
+***************
+*** 2584,2596 ****
+ /* For older compilers. We assume this never changes. */
+ # define CCM_SETUNICODEFORMAT 0x2005
+ #endif
+! uu = (enc_codepage >= 0 && (int)GetACP() != enc_codepage);
+! if (uu != use_unicode)
+! {
+! /* Enable/disable unicode support */
+! SendMessage(s_tabhwnd, CCM_SETUNICODEFORMAT, (WPARAM)uu, (LPARAM)0);
+! use_unicode = uu;
+! }
+
+ tie.mask = TCIF_TEXT;
+ tie.iImage = -1;
+--- 2518,2525 ----
+ /* For older compilers. We assume this never changes. */
+ # define CCM_SETUNICODEFORMAT 0x2005
+ #endif
+! // Enable unicode support
+! SendMessage(s_tabhwnd, CCM_SETUNICODEFORMAT, (WPARAM)TRUE, (LPARAM)0);
+
+ tie.mask = TCIF_TEXT;
+ tie.iImage = -1;
+***************
+*** 2614,2637 ****
+
+ get_tabline_label(tp, FALSE);
+ tie.pszText = (LPSTR)NameBuff;
+! wstr = NULL;
+! if (use_unicode)
+ {
+! /* Need to go through Unicode. */
+! wstr = enc_to_utf16(NameBuff, NULL);
+! if (wstr != NULL)
+! {
+! TCITEMW tiw;
+
+! tiw.mask = TCIF_TEXT;
+! tiw.iImage = -1;
+! tiw.pszText = wstr;
+! SendMessage(s_tabhwnd, TCM_SETITEMW, (WPARAM)nr, (LPARAM)&tiw);
+! vim_free(wstr);
+! }
+ }
+- if (wstr == NULL)
+- TabCtrl_SetItem(s_tabhwnd, nr, &tie);
+ }
+
+ /* Remove any old labels. */
+--- 2543,2560 ----
+
+ get_tabline_label(tp, FALSE);
+ tie.pszText = (LPSTR)NameBuff;
+!
+! wstr = enc_to_utf16(NameBuff, NULL);
+! if (wstr != NULL)
+ {
+! TCITEMW tiw;
+
+! tiw.mask = TCIF_TEXT;
+! tiw.iImage = -1;
+! tiw.pszText = wstr;
+! SendMessage(s_tabhwnd, TCM_SETITEMW, (WPARAM)nr, (LPARAM)&tiw);
+! vim_free(wstr);
+ }
+ }
+
+ /* Remove any old labels. */
+***************
+*** 2720,2727 ****
+ if (wword)
+ s_findrep_struct.Flags |= FR_WHOLEWORD;
+ if (entry_text != NULL && *entry_text != NUL)
+! vim_strncpy((char_u *)s_findrep_struct.lpstrFindWhat, entry_text,
+! s_findrep_struct.wFindWhatLen - 1);
+ vim_free(entry_text);
+ }
+ #endif
+--- 2643,2659 ----
+ if (wword)
+ s_findrep_struct.Flags |= FR_WHOLEWORD;
+ if (entry_text != NULL && *entry_text != NUL)
+! {
+! WCHAR *p = enc_to_utf16(entry_text, NULL);
+! if (p != NULL)
+! {
+! int len = s_findrep_struct.wFindWhatLen - 1;
+!
+! wcsncpy(s_findrep_struct.lpstrFindWhat, p, len);
+! s_findrep_struct.lpstrFindWhat[len] = NUL;
+! vim_free(p);
+! }
+! }
+ vim_free(entry_text);
+ }
+ #endif
+***************
+*** 2729,2735 ****
+ static void
+ set_window_title(HWND hwnd, char *title)
+ {
+! if (title != NULL && enc_codepage >= 0 && enc_codepage != (int)GetACP())
+ {
+ WCHAR *wbuf;
+
+--- 2661,2667 ----
+ static void
+ set_window_title(HWND hwnd, char *title)
+ {
+! if (title != NULL)
+ {
+ WCHAR *wbuf;
+
+***************
+*** 2740,2748 ****
+ SetWindowTextW(hwnd, wbuf);
+ vim_free(wbuf);
+ }
+- return;
+ }
+! (void)SetWindowText(hwnd, (LPCSTR)title);
+ }
+
+ void
+--- 2672,2680 ----
+ SetWindowTextW(hwnd, wbuf);
+ vim_free(wbuf);
+ }
+ }
+! else
+! (void)SetWindowTextW(hwnd, NULL);
+ }
+
+ void
+***************
+*** 2757,2772 ****
+ if (!IsWindow(s_findrep_hwnd))
+ {
+ initialise_findrep(eap->arg);
+! /* If the OS is Windows NT, and 'encoding' differs from active
+! * codepage: convert text and use wide function. */
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! findrep_atow(&s_findrep_struct_w, &s_findrep_struct);
+! s_findrep_hwnd = FindTextW(
+! (LPFINDREPLACEW) &s_findrep_struct_w);
+! }
+! else
+! s_findrep_hwnd = FindText((LPFINDREPLACE) &s_findrep_struct);
+ }
+
+ set_window_title(s_findrep_hwnd, _("Find string"));
+--- 2689,2695 ----
+ if (!IsWindow(s_findrep_hwnd))
+ {
+ initialise_findrep(eap->arg);
+! s_findrep_hwnd = FindTextW((LPFINDREPLACEW) &s_findrep_struct);
+ }
+
+ set_window_title(s_findrep_hwnd, _("Find string"));
+***************
+*** 2790,2804 ****
+ if (!IsWindow(s_findrep_hwnd))
+ {
+ initialise_findrep(eap->arg);
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! findrep_atow(&s_findrep_struct_w, &s_findrep_struct);
+! s_findrep_hwnd = ReplaceTextW(
+! (LPFINDREPLACEW) &s_findrep_struct_w);
+! }
+! else
+! s_findrep_hwnd = ReplaceText(
+! (LPFINDREPLACE) &s_findrep_struct);
+ }
+
+ set_window_title(s_findrep_hwnd, _("Find & Replace"));
+--- 2713,2719 ----
+ if (!IsWindow(s_findrep_hwnd))
+ {
+ initialise_findrep(eap->arg);
+! s_findrep_hwnd = ReplaceTextW((LPFINDREPLACEW) &s_findrep_struct);
+ }
+
+ set_window_title(s_findrep_hwnd, _("Find & Replace"));
+***************
+*** 4147,4153 ****
+ #define USE_SYSMENU_FONT
+
+ #define VIM_NAME "vim"
+- #define VIM_CLASS "Vim"
+ #define VIM_CLASSW L"Vim"
+
+ /* Initial size for the dialog template. For gui_mch_dialog() it's fixed,
+--- 4062,4067 ----
+***************
+*** 5021,5029 ****
+ int
+ gui_mch_init(void)
+ {
+- const char szVimWndClass[] = VIM_CLASS;
+- const char szTextAreaClass[] = "VimTextArea";
+- WNDCLASS wndclass;
+ const WCHAR szVimWndClassW[] = VIM_CLASSW;
+ const WCHAR szTextAreaClassW[] = L"VimTextArea";
+ WNDCLASSW wndclassw;
+--- 4935,4940 ----
+***************
+*** 5073,5122 ****
+ #endif
+ RegisterClassW(&wndclassw)) == 0)
+ return FAIL;
+- else
+- wide_WindowProc = TRUE;
+ }
+
+- if (!wide_WindowProc)
+- if (GetClassInfo(s_hinst, szVimWndClass, &wndclass) == 0)
+- {
+- wndclass.style = CS_DBLCLKS;
+- wndclass.lpfnWndProc = _WndProc;
+- wndclass.cbClsExtra = 0;
+- wndclass.cbWndExtra = 0;
+- wndclass.hInstance = s_hinst;
+- wndclass.hIcon = LoadIcon(wndclass.hInstance, "IDR_VIM");
+- wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
+- wndclass.hbrBackground = s_brush;
+- wndclass.lpszMenuName = NULL;
+- wndclass.lpszClassName = szVimWndClass;
+-
+- if ((
+- #ifdef GLOBAL_IME
+- atom =
+- #endif
+- RegisterClass(&wndclass)) == 0)
+- return FAIL;
+- }
+-
+ if (vim_parent_hwnd != NULL)
+ {
+ #ifdef HAVE_TRY_EXCEPT
+ __try
+ {
+ #endif
+! /* Open inside the specified parent window.
+! * TODO: last argument should point to a CLIENTCREATESTRUCT
+! * structure. */
+! s_hwnd = CreateWindowEx(
+ WS_EX_MDICHILD,
+! szVimWndClass, "Vim MSWindows GUI",
+ WS_OVERLAPPEDWINDOW | WS_CHILD
+ | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | 0xC000,
+ gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x,
+ gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y,
+! 100, /* Any value will do */
+! 100, /* Any value will do */
+ vim_parent_hwnd, NULL,
+ s_hinst, NULL);
+ #ifdef HAVE_TRY_EXCEPT
+--- 4984,5009 ----
+ #endif
+ RegisterClassW(&wndclassw)) == 0)
+ return FAIL;
+ }
+
+ if (vim_parent_hwnd != NULL)
+ {
+ #ifdef HAVE_TRY_EXCEPT
+ __try
+ {
+ #endif
+! // Open inside the specified parent window.
+! // TODO: last argument should point to a CLIENTCREATESTRUCT
+! // structure.
+! s_hwnd = CreateWindowExW(
+ WS_EX_MDICHILD,
+! szVimWndClassW, L"Vim MSWindows GUI",
+ WS_OVERLAPPEDWINDOW | WS_CHILD
+ | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | 0xC000,
+ gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x,
+ gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y,
+! 100, // Any value will do
+! 100, // Any value will do
+ vim_parent_hwnd, NULL,
+ s_hinst, NULL);
+ #ifdef HAVE_TRY_EXCEPT
+***************
+*** 5141,5148 ****
+
+ /* Create a window. If win_socket_id is not zero without border and
+ * titlebar, it will be reparented below. */
+! s_hwnd = CreateWindow(
+! szVimWndClass, "Vim MSWindows GUI",
+ (win_socket_id == 0 ? WS_OVERLAPPEDWINDOW : WS_POPUP)
+ | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
+ gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x,
+--- 5028,5035 ----
+
+ /* Create a window. If win_socket_id is not zero without border and
+ * titlebar, it will be reparented below. */
+! s_hwnd = CreateWindowW(
+! szVimWndClassW, L"Vim MSWindows GUI",
+ (win_socket_id == 0 ? WS_OVERLAPPEDWINDOW : WS_POPUP)
+ | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
+ gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x,
+***************
+*** 5169,5228 ****
+ #endif
+
+ /* Create the text area window */
+! if (wide_WindowProc)
+ {
+! if (GetClassInfoW(s_hinst, szTextAreaClassW, &wndclassw) == 0)
+! {
+! wndclassw.style = CS_OWNDC;
+! wndclassw.lpfnWndProc = _TextAreaWndProc;
+! wndclassw.cbClsExtra = 0;
+! wndclassw.cbWndExtra = 0;
+! wndclassw.hInstance = s_hinst;
+! wndclassw.hIcon = NULL;
+! wndclassw.hCursor = LoadCursor(NULL, IDC_ARROW);
+! wndclassw.hbrBackground = NULL;
+! wndclassw.lpszMenuName = NULL;
+! wndclassw.lpszClassName = szTextAreaClassW;
+!
+! if (RegisterClassW(&wndclassw) == 0)
+! return FAIL;
+! }
+!
+! s_textArea = CreateWindowExW(
+! 0,
+! szTextAreaClassW, L"Vim text area",
+! WS_CHILD | WS_VISIBLE, 0, 0,
+! 100, // Any value will do for now
+! 100, // Any value will do for now
+! s_hwnd, NULL,
+! s_hinst, NULL);
+! }
+! else if (GetClassInfo(s_hinst, szTextAreaClass, &wndclass) == 0)
+! {
+! wndclass.style = CS_OWNDC;
+! wndclass.lpfnWndProc = _TextAreaWndProc;
+! wndclass.cbClsExtra = 0;
+! wndclass.cbWndExtra = 0;
+! wndclass.hInstance = s_hinst;
+! wndclass.hIcon = NULL;
+! wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
+! wndclass.hbrBackground = NULL;
+! wndclass.lpszMenuName = NULL;
+! wndclass.lpszClassName = szTextAreaClass;
+
+! if (RegisterClass(&wndclass) == 0)
+ return FAIL;
+-
+- s_textArea = CreateWindowEx(
+- 0,
+- szTextAreaClass, "Vim text area",
+- WS_CHILD | WS_VISIBLE, 0, 0,
+- 100, // Any value will do for now
+- 100, // Any value will do for now
+- s_hwnd, NULL,
+- s_hinst, NULL);
+ }
+
+ if (s_textArea == NULL)
+ return FAIL;
+
+--- 5056,5087 ----
+ #endif
+
+ /* Create the text area window */
+! if (GetClassInfoW(s_hinst, szTextAreaClassW, &wndclassw) == 0)
+ {
+! wndclassw.style = CS_OWNDC;
+! wndclassw.lpfnWndProc = _TextAreaWndProc;
+! wndclassw.cbClsExtra = 0;
+! wndclassw.cbWndExtra = 0;
+! wndclassw.hInstance = s_hinst;
+! wndclassw.hIcon = NULL;
+! wndclassw.hCursor = LoadCursor(NULL, IDC_ARROW);
+! wndclassw.hbrBackground = NULL;
+! wndclassw.lpszMenuName = NULL;
+! wndclassw.lpszClassName = szTextAreaClassW;
+
+! if (RegisterClassW(&wndclassw) == 0)
+ return FAIL;
+ }
+
++ s_textArea = CreateWindowExW(
++ 0,
++ szTextAreaClassW, L"Vim text area",
++ WS_CHILD | WS_VISIBLE, 0, 0,
++ 100, // Any value will do for now
++ 100, // Any value will do for now
++ s_hwnd, NULL,
++ s_hinst, NULL);
++
+ if (s_textArea == NULL)
+ return FAIL;
+
+***************
+*** 5299,5319 ****
+
+ /* Initialise the struct */
+ s_findrep_struct.lStructSize = sizeof(s_findrep_struct);
+! s_findrep_struct.lpstrFindWhat = (LPSTR)alloc(MSWIN_FR_BUFSIZE);
+ s_findrep_struct.lpstrFindWhat[0] = NUL;
+! s_findrep_struct.lpstrReplaceWith = (LPSTR)alloc(MSWIN_FR_BUFSIZE);
+ s_findrep_struct.lpstrReplaceWith[0] = NUL;
+ s_findrep_struct.wFindWhatLen = MSWIN_FR_BUFSIZE;
+ s_findrep_struct.wReplaceWithLen = MSWIN_FR_BUFSIZE;
+- s_findrep_struct_w.lStructSize = sizeof(s_findrep_struct_w);
+- s_findrep_struct_w.lpstrFindWhat =
+- (LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR));
+- s_findrep_struct_w.lpstrFindWhat[0] = NUL;
+- s_findrep_struct_w.lpstrReplaceWith =
+- (LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR));
+- s_findrep_struct_w.lpstrReplaceWith[0] = NUL;
+- s_findrep_struct_w.wFindWhatLen = MSWIN_FR_BUFSIZE;
+- s_findrep_struct_w.wReplaceWithLen = MSWIN_FR_BUFSIZE;
+ #endif
+
+ #ifdef FEAT_EVAL
+--- 5158,5171 ----
+
+ /* Initialise the struct */
+ s_findrep_struct.lStructSize = sizeof(s_findrep_struct);
+! s_findrep_struct.lpstrFindWhat =
+! (LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR));
+ s_findrep_struct.lpstrFindWhat[0] = NUL;
+! s_findrep_struct.lpstrReplaceWith =
+! (LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR));
+ s_findrep_struct.lpstrReplaceWith[0] = NUL;
+ s_findrep_struct.wFindWhatLen = MSWIN_FR_BUFSIZE;
+ s_findrep_struct.wReplaceWithLen = MSWIN_FR_BUFSIZE;
+ #endif
+
+ #ifdef FEAT_EVAL
+***************
+*** 6344,6392 ****
+
+ if (menu_is_menubar(menu->name))
+ {
+! WCHAR *wn = NULL;
+!
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! /* 'encoding' differs from active codepage: convert menu name
+! * and use wide function */
+! wn = enc_to_utf16(menu->name, NULL);
+! if (wn != NULL)
+! {
+! MENUITEMINFOW infow;
+!
+! infow.cbSize = sizeof(infow);
+! infow.fMask = MIIM_DATA | MIIM_TYPE | MIIM_ID
+! | MIIM_SUBMENU;
+! infow.dwItemData = (long_u)menu;
+! infow.wID = menu->id;
+! infow.fType = MFT_STRING;
+! infow.dwTypeData = wn;
+! infow.cch = (UINT)wcslen(wn);
+! infow.hSubMenu = menu->submenu_id;
+! InsertMenuItemW((parent == NULL)
+! ? s_menuBar : parent->submenu_id,
+! (UINT)pos, TRUE, &infow);
+! vim_free(wn);
+! }
+! }
+
+ if (wn == NULL)
+! {
+! MENUITEMINFO info;
+
+! info.cbSize = sizeof(info);
+! info.fMask = MIIM_DATA | MIIM_TYPE | MIIM_ID | MIIM_SUBMENU;
+! info.dwItemData = (long_u)menu;
+! info.wID = menu->id;
+! info.fType = MFT_STRING;
+! info.dwTypeData = (LPTSTR)menu->name;
+! info.cch = (UINT)STRLEN(menu->name);
+! info.hSubMenu = menu->submenu_id;
+! InsertMenuItem((parent == NULL)
+! ? s_menuBar : parent->submenu_id,
+! (UINT)pos, TRUE, &info);
+! }
+ }
+
+ /* Fix window size if menu may have wrapped */
+--- 6196,6221 ----
+
+ if (menu_is_menubar(menu->name))
+ {
+! WCHAR *wn;
+! MENUITEMINFOW infow;
+
++ wn = enc_to_utf16(menu->name, NULL);
+ if (wn == NULL)
+! return;
+
+! infow.cbSize = sizeof(infow);
+! infow.fMask = MIIM_DATA | MIIM_TYPE | MIIM_ID
+! | MIIM_SUBMENU;
+! infow.dwItemData = (long_u)menu;
+! infow.wID = menu->id;
+! infow.fType = MFT_STRING;
+! infow.dwTypeData = wn;
+! infow.cch = (UINT)wcslen(wn);
+! infow.hSubMenu = menu->submenu_id;
+! InsertMenuItemW((parent == NULL)
+! ? s_menuBar : parent->submenu_id,
+! (UINT)pos, TRUE, &infow);
+! vim_free(wn);
+ }
+
+ /* Fix window size if menu may have wrapped */
+***************
+*** 6499,6525 ****
+ else
+ #endif
+ {
+! WCHAR *wn = NULL;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+! /* 'encoding' differs from active codepage: convert menu item name
+! * and use wide function */
+! wn = enc_to_utf16(menu->name, NULL);
+! if (wn != NULL)
+! {
+! InsertMenuW(parent->submenu_id, (UINT)idx,
+! (menu_is_separator(menu->name)
+! ? MF_SEPARATOR : MF_STRING) | MF_BYPOSITION,
+! (UINT)menu->id, wn);
+! vim_free(wn);
+! }
+ }
+- if (wn == NULL)
+- InsertMenu(parent->submenu_id, (UINT)idx,
+- (menu_is_separator(menu->name) ? MF_SEPARATOR : MF_STRING)
+- | MF_BYPOSITION,
+- (UINT)menu->id, (LPCTSTR)menu->name);
+ #ifdef FEAT_TEAROFF
+ if (IsWindow(parent->tearoff_handle))
+ rebuild_tearoff(parent);
+--- 6328,6344 ----
+ else
+ #endif
+ {
+! WCHAR *wn;
+
+! wn = enc_to_utf16(menu->name, NULL);
+! if (wn != NULL)
+ {
+! InsertMenuW(parent->submenu_id, (UINT)idx,
+! (menu_is_separator(menu->name)
+! ? MF_SEPARATOR : MF_STRING) | MF_BYPOSITION,
+! (UINT)menu->id, wn);
+! vim_free(wn);
+ }
+ #ifdef FEAT_TEAROFF
+ if (IsWindow(parent->tearoff_handle))
+ rebuild_tearoff(parent);
+***************
+*** 6709,6730 ****
+ /* If the edit box exists, copy the string. */
+ if (s_textfield != NULL)
+ {
+! /* If the OS is Windows NT, and 'encoding' differs from active
+! * codepage: use wide function and convert text. */
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *wp = (WCHAR *)alloc(IOSIZE * sizeof(WCHAR));
+! char_u *p;
+
+! GetDlgItemTextW(hwnd, DLG_NONBUTTON_CONTROL + 2, wp, IOSIZE);
+! p = utf16_to_enc(wp, NULL);
+! vim_strncpy(s_textfield, p, IOSIZE);
+! vim_free(p);
+! vim_free(wp);
+! }
+! else
+! GetDlgItemText(hwnd, DLG_NONBUTTON_CONTROL + 2,
+! (LPSTR)s_textfield, IOSIZE);
+ }
+
+ /*
+--- 6528,6541 ----
+ /* If the edit box exists, copy the string. */
+ if (s_textfield != NULL)
+ {
+! WCHAR *wp = (WCHAR *)alloc(IOSIZE * sizeof(WCHAR));
+! char_u *p;
+
+! GetDlgItemTextW(hwnd, DLG_NONBUTTON_CONTROL + 2, wp, IOSIZE);
+! p = utf16_to_enc(wp, NULL);
+! vim_strncpy(s_textfield, p, IOSIZE);
+! vim_free(p);
+! vim_free(wp);
+ }
+
+ /*
+***************
+*** 8411,8417 ****
+ }
+
+ static void
+! make_tooltipw(BalloonEval *beval, char *text, POINT pt)
+ {
+ TOOLINFOW *pti;
+ int ToolInfoSize;
+--- 8222,8228 ----
+ }
+
+ static void
+! make_tooltip(BalloonEval *beval, char *text, POINT pt)
+ {
+ TOOLINFOW *pti;
+ int ToolInfoSize;
+***************
+*** 8473,8549 ****
+ /*
+ * HACK: force tooltip to appear, because it'll not appear until
+ * first mouse move. D*mn M$
+- * Amazingly moving (2, 2) and then (-1, -1) the mouse doesn't move.
+- */
+- mouse_event(MOUSEEVENTF_MOVE, 2, 2, 0, 0);
+- mouse_event(MOUSEEVENTF_MOVE, (DWORD)-1, (DWORD)-1, 0, 0);
+- vim_free(pti);
+- }
+-
+- static void
+- make_tooltip(BalloonEval *beval, char *text, POINT pt)
+- {
+- TOOLINFO *pti;
+- int ToolInfoSize;
+-
+- if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+- {
+- make_tooltipw(beval, text, pt);
+- return;
+- }
+-
+- if (multiline_balloon_available() == TRUE)
+- ToolInfoSize = sizeof(TOOLINFO_NEW);
+- else
+- ToolInfoSize = sizeof(TOOLINFO);
+-
+- pti = (TOOLINFO *)alloc(ToolInfoSize);
+- if (pti == NULL)
+- return;
+-
+- beval->balloon = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS,
+- NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
+- CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+- beval->target, NULL, s_hinst, NULL);
+-
+- SetWindowPos(beval->balloon, HWND_TOPMOST, 0, 0, 0, 0,
+- SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+-
+- pti->cbSize = ToolInfoSize;
+- pti->uFlags = TTF_SUBCLASS;
+- pti->hwnd = beval->target;
+- pti->hinst = 0; /* Don't use string resources */
+- pti->uId = ID_BEVAL_TOOLTIP;
+-
+- if (multiline_balloon_available() == TRUE)
+- {
+- RECT rect;
+- TOOLINFO_NEW *ptin = (TOOLINFO_NEW *)pti;
+- pti->lpszText = LPSTR_TEXTCALLBACK;
+- beval->tofree = vim_strsave((char_u*)text);
+- ptin->lParam = (LPARAM)beval->tofree;
+- if (GetClientRect(s_textArea, &rect)) /* switch multiline tooltips on */
+- SendMessage(beval->balloon, TTM_SETMAXTIPWIDTH, 0,
+- (LPARAM)rect.right);
+- }
+- else
+- pti->lpszText = text; /* do this old way */
+-
+- /* Limit ballooneval bounding rect to CursorPos neighbourhood */
+- pti->rect.left = pt.x - 3;
+- pti->rect.top = pt.y - 3;
+- pti->rect.right = pt.x + 3;
+- pti->rect.bottom = pt.y + 3;
+-
+- SendMessage(beval->balloon, TTM_ADDTOOL, 0, (LPARAM)pti);
+- /* Make tooltip appear sooner */
+- SendMessage(beval->balloon, TTM_SETDELAYTIME, TTDT_INITIAL, 10);
+- /* I've performed some tests and it seems the longest possible life time
+- * of tooltip is 30 seconds */
+- SendMessage(beval->balloon, TTM_SETDELAYTIME, TTDT_AUTOPOP, 30000);
+- /*
+- * HACK: force tooltip to appear, because it'll not appear until
+- * first mouse move. D*mn M$
+ * Amazingly moving (2, 2) and then (-1, -1) the mouse doesn't move.
+ */
+ mouse_event(MOUSEEVENTF_MOVE, 2, 2, 0, 0);
+--- 8284,8289 ----
+*** ../vim-8.1.1102/src/misc1.c 2019-03-30 20:11:45.749471761 +0100
+--- src/misc1.c 2019-04-02 22:11:36.386340616 +0200
+***************
+*** 5670,5680 ****
+ int matches;
+ int len;
+ int starstar = FALSE;
+! static int stardepth = 0; /* depth for "**" expansion */
+! WIN32_FIND_DATA fb;
+! HANDLE hFind = (HANDLE)0;
+ WIN32_FIND_DATAW wfb;
+! WCHAR *wn = NULL; /* UCS-2 name, NULL when not used. */
+ char_u *matchname;
+ int ok;
+
+--- 5670,5679 ----
+ int matches;
+ int len;
+ int starstar = FALSE;
+! static int stardepth = 0; // depth for "**" expansion
+! HANDLE hFind = INVALID_HANDLE_VALUE;
+ WIN32_FIND_DATAW wfb;
+! WCHAR *wn = NULL; // UCS-2 name, NULL when not used.
+ char_u *matchname;
+ int ok;
+
+***************
+*** 5783,5815 ****
+
+ /* Scan all files in the directory with "dir/ *.*" */
+ STRCPY(s, "*.*");
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! /* The active codepage differs from 'encoding'. Attempt using the
+! * wide function. If it fails because it is not implemented fall back
+! * to the non-wide version (for Windows 98) */
+! wn = enc_to_utf16(buf, NULL);
+! if (wn != NULL)
+! {
+! hFind = FindFirstFileW(wn, &wfb);
+! if (hFind == INVALID_HANDLE_VALUE
+! && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+! VIM_CLEAR(wn);
+! }
+! }
+!
+! if (wn == NULL)
+! hFind = FindFirstFile((LPCSTR)buf, &fb);
+ ok = (hFind != INVALID_HANDLE_VALUE);
+
+ while (ok)
+ {
+! if (wn != NULL)
+! p = utf16_to_enc(wfb.cFileName, NULL); /* p is allocated here */
+! else
+! p = (char_u *)fb.cFileName;
+! /* Ignore entries starting with a dot, unless when asked for. Accept
+! * all entries found with "matchname". */
+ if ((p[0] != '.' || starts_with_dot
+ || ((flags & EW_DODOT)
+ && p[1] != NUL && (p[1] != '.' || p[2] != NUL)))
+--- 5782,5797 ----
+
+ /* Scan all files in the directory with "dir/ *.*" */
+ STRCPY(s, "*.*");
+! wn = enc_to_utf16(buf, NULL);
+! if (wn != NULL)
+! hFind = FindFirstFileW(wn, &wfb);
+ ok = (hFind != INVALID_HANDLE_VALUE);
+
+ while (ok)
+ {
+! p = utf16_to_enc(wfb.cFileName, NULL); // p is allocated here
+! // Ignore entries starting with a dot, unless when asked for. Accept
+! // all entries found with "matchname".
+ if ((p[0] != '.' || starts_with_dot
+ || ((flags & EW_DODOT)
+ && p[1] != NUL && (p[1] != '.' || p[2] != NUL)))
+***************
+*** 5851,5863 ****
+ }
+ }
+
+! if (wn != NULL)
+! {
+! vim_free(p);
+! ok = FindNextFileW(hFind, &wfb);
+! }
+! else
+! ok = FindNextFile(hFind, &fb);
+
+ /* If no more matches and no match was used, try expanding the name
+ * itself. Finds the long name of a short filename. */
+--- 5833,5840 ----
+ }
+ }
+
+! vim_free(p);
+! ok = FindNextFileW(hFind, &wfb);
+
+ /* If no more matches and no match was used, try expanding the name
+ * itself. Finds the long name of a short filename. */
+***************
+*** 5865,5879 ****
+ {
+ STRCPY(s, matchname);
+ FindClose(hFind);
+ if (wn != NULL)
+! {
+! vim_free(wn);
+! wn = enc_to_utf16(buf, NULL);
+! if (wn != NULL)
+! hFind = FindFirstFileW(wn, &wfb);
+! }
+! if (wn == NULL)
+! hFind = FindFirstFile((LPCSTR)buf, &fb);
+ ok = (hFind != INVALID_HANDLE_VALUE);
+ VIM_CLEAR(matchname);
+ }
+--- 5842,5853 ----
+ {
+ STRCPY(s, matchname);
+ FindClose(hFind);
++ vim_free(wn);
++ wn = enc_to_utf16(buf, NULL);
+ if (wn != NULL)
+! hFind = FindFirstFileW(wn, &wfb);
+! else
+! hFind = INVALID_HANDLE_VALUE;
+ ok = (hFind != INVALID_HANDLE_VALUE);
+ VIM_CLEAR(matchname);
+ }
+*** ../vim-8.1.1102/src/os_mswin.c 2019-03-30 18:46:57.360077328 +0100
+--- src/os_mswin.c 2019-04-02 22:04:17.789655489 +0200
+***************
+*** 105,111 ****
+ typedef int MOUSE_EVENT_RECORD;
+ typedef int NEWTEXTMETRICW;
+ typedef int PACL;
+! typedef int PRINTDLG;
+ typedef int PSECURITY_DESCRIPTOR;
+ typedef int PSID;
+ typedef int SECURITY_INFORMATION;
+--- 105,111 ----
+ typedef int MOUSE_EVENT_RECORD;
+ typedef int NEWTEXTMETRICW;
+ typedef int PACL;
+! typedef int PRINTDLGW;
+ typedef int PSECURITY_DESCRIPTOR;
+ typedef int PSID;
+ typedef int SECURITY_INFORMATION;
+***************
+*** 282,300 ****
+ # else
+ if (title != NULL)
+ {
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! /* Convert the title from 'encoding' to the active codepage. */
+! WCHAR *wp = enc_to_utf16(title, NULL);
+
+! if (wp != NULL)
+! {
+! SetConsoleTitleW(wp);
+! vim_free(wp);
+! return;
+! }
+! }
+! SetConsoleTitle((LPCSTR)title);
+ }
+ # endif
+ }
+--- 282,295 ----
+ # else
+ if (title != NULL)
+ {
+! WCHAR *wp = enc_to_utf16(title, NULL);
+
+! if (wp == NULL)
+! return;
+!
+! SetConsoleTitleW(wp);
+! vim_free(wp);
+! return;
+ }
+ # endif
+ }
+***************
+*** 359,398 ****
+ else
+ #endif
+ {
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *wname;
+! WCHAR wbuf[MAX_PATH];
+! char_u *cname = NULL;
+!
+! /* Use the wide function:
+! * - convert the fname from 'encoding' to UCS2.
+! * - invoke _wfullpath()
+! * - convert the result from UCS2 to 'encoding'.
+! */
+! wname = enc_to_utf16(fname, NULL);
+! if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH) != NULL)
+! {
+! cname = utf16_to_enc((short_u *)wbuf, NULL);
+! if (cname != NULL)
+! {
+! vim_strncpy(buf, cname, len - 1);
+! nResult = OK;
+! }
+! }
+! vim_free(wname);
+! vim_free(cname);
+! }
+! if (nResult == FAIL) /* fall back to non-wide function */
+ {
+! if (_fullpath((char *)buf, (const char *)fname, len - 1) == NULL)
+ {
+! /* failed, use relative path name */
+! vim_strncpy(buf, fname, len - 1);
+! }
+! else
+ nResult = OK;
+ }
+ }
+
+ #ifdef USE_FNAME_CASE
+--- 354,375 ----
+ else
+ #endif
+ {
+! WCHAR *wname;
+! WCHAR wbuf[MAX_PATH];
+! char_u *cname = NULL;
+!
+! wname = enc_to_utf16(fname, NULL);
+! if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH) != NULL)
+ {
+! cname = utf16_to_enc((short_u *)wbuf, NULL);
+! if (cname != NULL)
+ {
+! vim_strncpy(buf, cname, len - 1);
+ nResult = OK;
++ }
+ }
++ vim_free(wname);
++ vim_free(cname);
+ }
+
+ #ifdef USE_FNAME_CASE
+***************
+*** 480,536 ****
+ #endif
+
+ static int
+- stat_symlink_aware(const char *name, stat_T *stp)
+- {
+- #if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__MINGW32__)
+- /* Work around for VC12 or earlier (and MinGW). stat() can't handle
+- * symlinks properly.
+- * VC9 or earlier: stat() doesn't support a symlink at all. It retrieves
+- * status of a symlink itself.
+- * VC10: stat() supports a symlink to a normal file, but it doesn't support
+- * a symlink to a directory (always returns an error).
+- * VC11 and VC12: stat() doesn't return an error for a symlink to a
+- * directory, but it doesn't set S_IFDIR flag.
+- * MinGW: Same as VC9. */
+- WIN32_FIND_DATA findData;
+- HANDLE hFind, h;
+- DWORD attr = 0;
+- BOOL is_symlink = FALSE;
+-
+- hFind = FindFirstFile(name, &findData);
+- if (hFind != INVALID_HANDLE_VALUE)
+- {
+- attr = findData.dwFileAttributes;
+- if ((attr & FILE_ATTRIBUTE_REPARSE_POINT)
+- && (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK))
+- is_symlink = TRUE;
+- FindClose(hFind);
+- }
+- if (is_symlink)
+- {
+- h = CreateFile(name, FILE_READ_ATTRIBUTES,
+- FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+- OPEN_EXISTING,
+- (attr & FILE_ATTRIBUTE_DIRECTORY)
+- ? FILE_FLAG_BACKUP_SEMANTICS : 0,
+- NULL);
+- if (h != INVALID_HANDLE_VALUE)
+- {
+- int fd, n;
+-
+- fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY);
+- n = _fstat(fd, (struct _stat *)stp);
+- if ((n == 0) && (attr & FILE_ATTRIBUTE_DIRECTORY))
+- stp->st_mode = (stp->st_mode & ~S_IFREG) | S_IFDIR;
+- _close(fd);
+- return n;
+- }
+- }
+- #endif
+- return stat(name, stp);
+- }
+-
+- static int
+ wstat_symlink_aware(const WCHAR *name, stat_T *stp)
+ {
+ #if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__MINGW32__)
+--- 457,462 ----
+***************
+*** 593,598 ****
+--- 519,526 ----
+ * UTF-8. */
+ char_u buf[_MAX_PATH * 3 + 1];
+ char_u *p;
++ WCHAR *wp;
++ int n;
+
+ vim_strncpy((char_u *)buf, (char_u *)name, sizeof(buf) - 1);
+ p = buf + STRLEN(buf);
+***************
+*** 614,632 ****
+ STRCAT(buf, "\\");
+ }
+ }
+- if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+- {
+- WCHAR *wp = enc_to_utf16(buf, NULL);
+- int n;
+
+! if (wp != NULL)
+! {
+! n = wstat_symlink_aware(wp, stp);
+! vim_free(wp);
+! return n;
+! }
+! }
+! return stat_symlink_aware((char *)buf, stp);
+ }
+
+ #if defined(FEAT_GUI_MSWIN) || defined(PROTO)
+--- 542,555 ----
+ STRCAT(buf, "\\");
+ }
+ }
+
+! wp = enc_to_utf16(buf, NULL);
+! if (wp == NULL)
+! return -1;
+!
+! n = wstat_symlink_aware(wp, stp);
+! vim_free(wp);
+! return n;
+ }
+
+ #if defined(FEAT_GUI_MSWIN) || defined(PROTO)
+***************
+*** 758,763 ****
+--- 681,689 ----
+ int
+ mch_chdir(char *path)
+ {
++ WCHAR *p;
++ int n;
++
+ if (path[0] == NUL) /* just checking... */
+ return -1;
+
+***************
+*** 779,798 ****
+ if (*path == NUL) /* drive name only */
+ return 0;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *p = enc_to_utf16((char_u *)path, NULL);
+! int n;
+!
+! if (p != NULL)
+! {
+! n = _wchdir(p);
+! vim_free(p);
+! return n;
+! }
+! }
+
+! return chdir(path); /* let the normal chdir() do the rest */
+ }
+
+
+--- 705,717 ----
+ if (*path == NUL) /* drive name only */
+ return 0;
+
+! p = enc_to_utf16((char_u *)path, NULL);
+! if (p == NULL)
+! return -1;
+
+! n = _wchdir(p);
+! vim_free(p);
+! return n;
+ }
+
+
+***************
+*** 1097,1103 ****
+ */
+
+ static HFONT prt_font_handles[2][2][2];
+! static PRINTDLG prt_dlg;
+ static const int boldface[2] = {FW_REGULAR, FW_BOLD};
+ static TEXTMETRIC prt_tm;
+ static int prt_line_height;
+--- 1016,1022 ----
+ */
+
+ static HFONT prt_font_handles[2][2][2];
+! static PRINTDLGW prt_dlg;
+ static const int boldface[2] = {FW_REGULAR, FW_BOLD};
+ static TEXTMETRIC prt_tm;
+ static int prt_line_height;
+***************
+*** 1119,1136 ****
+ static BOOL
+ vimSetDlgItemText(HWND hDlg, int nIDDlgItem, char_u *s)
+ {
+! WCHAR *wp = NULL;
+ BOOL ret;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! wp = enc_to_utf16(s, NULL);
+! if (wp != NULL)
+! {
+! ret = SetDlgItemTextW(hDlg, nIDDlgItem, wp);
+! vim_free(wp);
+! return ret;
+! }
+! return SetDlgItemText(hDlg, nIDDlgItem, (LPCSTR)s);
+ }
+
+ /*
+--- 1038,1053 ----
+ static BOOL
+ vimSetDlgItemText(HWND hDlg, int nIDDlgItem, char_u *s)
+ {
+! WCHAR *wp;
+ BOOL ret;
+
+! wp = enc_to_utf16(s, NULL);
+! if (wp == NULL)
+! return FALSE;
+!
+! ret = SetDlgItemTextW(hDlg, nIDDlgItem, wp);
+! vim_free(wp);
+! return ret;
+ }
+
+ /*
+***************
+*** 1248,1254 ****
+ {
+ HWND hwndOwner;
+ RECT rc, rcDlg, rcOwner;
+! PRINTDLG *pPD;
+
+ if (uiMsg == WM_INITDIALOG)
+ {
+--- 1165,1171 ----
+ {
+ HWND hwndOwner;
+ RECT rc, rcDlg, rcOwner;
+! PRINTDLGW *pPD;
+
+ if (uiMsg == WM_INITDIALOG)
+ {
+***************
+*** 1280,1286 ****
+ SWP_NOSIZE);
+
+ /* tackle the printdlg copiesctrl problem */
+! pPD = (PRINTDLG *)lParam;
+ pPD->nCopies = (WORD)pPD->lCustData;
+ SetDlgItemInt( hDlg, edt3, pPD->nCopies, FALSE );
+ /* Bring the window to top */
+--- 1197,1203 ----
+ SWP_NOSIZE);
+
+ /* tackle the printdlg copiesctrl problem */
+! pPD = (PRINTDLGW *)lParam;
+ pPD->nCopies = (WORD)pPD->lCustData;
+ SetDlgItemInt( hDlg, edt3, pPD->nCopies, FALSE );
+ /* Bring the window to top */
+***************
+*** 1423,1435 ****
+ int pifBold;
+ int pifUnderline;
+
+! DEVMODE *mem;
+ DEVNAMES *devname;
+ int i;
+
+ bUserAbort = &(psettings->user_abort);
+! vim_memset(&prt_dlg, 0, sizeof(PRINTDLG));
+! prt_dlg.lStructSize = sizeof(PRINTDLG);
+ #ifndef FEAT_GUI
+ GetConsoleHwnd(); /* get value of s_hwnd */
+ #endif
+--- 1340,1352 ----
+ int pifBold;
+ int pifUnderline;
+
+! DEVMODEW *mem;
+ DEVNAMES *devname;
+ int i;
+
+ bUserAbort = &(psettings->user_abort);
+! vim_memset(&prt_dlg, 0, sizeof(PRINTDLGW));
+! prt_dlg.lStructSize = sizeof(PRINTDLGW);
+ #ifndef FEAT_GUI
+ GetConsoleHwnd(); /* get value of s_hwnd */
+ #endif
+***************
+*** 1470,1480 ****
+ else
+ {
+ prt_dlg.Flags |= PD_RETURNDEFAULT;
+! if (PrintDlg(&prt_dlg) == 0)
+ goto init_fail_dlg;
+ }
+ }
+! else if (PrintDlg(&prt_dlg) == 0)
+ goto init_fail_dlg;
+ else
+ {
+--- 1387,1397 ----
+ else
+ {
+ prt_dlg.Flags |= PD_RETURNDEFAULT;
+! if (PrintDlgW(&prt_dlg) == 0)
+ goto init_fail_dlg;
+ }
+ }
+! else if (PrintDlgW(&prt_dlg) == 0)
+ goto init_fail_dlg;
+ else
+ {
+***************
+*** 1510,1516 ****
+ * passed back correctly. It must be retrieved from the
+ * hDevMode struct.
+ */
+! mem = (DEVMODE *)GlobalLock(prt_dlg.hDevMode);
+ if (mem != NULL)
+ {
+ if (mem->dmCopies != 1)
+--- 1427,1433 ----
+ * passed back correctly. It must be retrieved from the
+ * hDevMode struct.
+ */
+! mem = (DEVMODEW *)GlobalLock(prt_dlg.hDevMode);
+ if (mem != NULL)
+ {
+ if (mem->dmCopies != 1)
+***************
+*** 1525,1558 ****
+ devname = (DEVNAMES *)GlobalLock(prt_dlg.hDevNames);
+ if (devname != 0)
+ {
+! char_u *printer_name = (char_u *)devname + devname->wDeviceOffset;
+! char_u *port_name = (char_u *)devname +devname->wOutputOffset;
+ char_u *text = (char_u *)_("to %s on %s");
+! char_u *printer_name_orig = printer_name;
+! char_u *port_name_orig = port_name;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! char_u *to_free = NULL;
+! int maxlen;
+!
+! acp_to_enc(printer_name, (int)STRLEN(printer_name), &to_free,
+! &maxlen);
+! if (to_free != NULL)
+! printer_name = to_free;
+! acp_to_enc(port_name, (int)STRLEN(port_name), &to_free, &maxlen);
+! if (to_free != NULL)
+! port_name = to_free;
+! }
+! prt_name = alloc((unsigned)(STRLEN(printer_name) + STRLEN(port_name)
+! + STRLEN(text)));
+ if (prt_name != NULL)
+ wsprintf((char *)prt_name, (const char *)text,
+ printer_name, port_name);
+! if (printer_name != printer_name_orig)
+! vim_free(printer_name);
+! if (port_name != port_name_orig)
+! vim_free(port_name);
+ }
+ GlobalUnlock(prt_dlg.hDevNames);
+
+--- 1442,1461 ----
+ devname = (DEVNAMES *)GlobalLock(prt_dlg.hDevNames);
+ if (devname != 0)
+ {
+! WCHAR *wprinter_name = (WCHAR *)devname + devname->wDeviceOffset;
+! WCHAR *wport_name = (WCHAR *)devname + devname->wOutputOffset;
+ char_u *text = (char_u *)_("to %s on %s");
+! char_u *printer_name = utf16_to_enc(wprinter_name, NULL);
+! char_u *port_name = utf16_to_enc(wport_name, NULL);
+
+! if (printer_name != NULL && port_name != NULL)
+! prt_name = alloc((unsigned)(STRLEN(printer_name)
+! + STRLEN(port_name) + STRLEN(text)));
+ if (prt_name != NULL)
+ wsprintf((char *)prt_name, (const char *)text,
+ printer_name, port_name);
+! vim_free(printer_name);
+! vim_free(port_name);
+ }
+ GlobalUnlock(prt_dlg.hDevNames);
+
+***************
+*** 1639,1647 ****
+ int
+ mch_print_begin(prt_settings_T *psettings)
+ {
+! int ret;
+ char szBuffer[300];
+! WCHAR *wp = NULL;
+
+ hDlgPrint = CreateDialog(GetModuleHandle(NULL), TEXT("PrintDlgBox"),
+ prt_dlg.hwndOwner, PrintDlgProc);
+--- 1542,1550 ----
+ int
+ mch_print_begin(prt_settings_T *psettings)
+ {
+! int ret = 0;
+ char szBuffer[300];
+! WCHAR *wp;
+
+ hDlgPrint = CreateDialog(GetModuleHandle(NULL), TEXT("PrintDlgBox"),
+ prt_dlg.hwndOwner, PrintDlgProc);
+***************
+*** 1649,1656 ****
+ wsprintf(szBuffer, _("Printing '%s'"), gettail(psettings->jobname));
+ vimSetDlgItemText(hDlgPrint, IDC_PRINTTEXT1, (char_u *)szBuffer);
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! wp = enc_to_utf16(psettings->jobname, NULL);
+ if (wp != NULL)
+ {
+ DOCINFOW di;
+--- 1552,1558 ----
+ wsprintf(szBuffer, _("Printing '%s'"), gettail(psettings->jobname));
+ vimSetDlgItemText(hDlgPrint, IDC_PRINTTEXT1, (char_u *)szBuffer);
+
+! wp = enc_to_utf16(psettings->jobname, NULL);
+ if (wp != NULL)
+ {
+ DOCINFOW di;
+***************
+*** 1661,1675 ****
+ ret = StartDocW(prt_dlg.hDC, &di);
+ vim_free(wp);
+ }
+- else
+- {
+- DOCINFO di;
+-
+- vim_memset(&di, 0, sizeof(di));
+- di.cbSize = sizeof(di);
+- di.lpszDocName = (LPCSTR)psettings->jobname;
+- ret = StartDoc(prt_dlg.hDC, &di);
+- }
+
+ #ifdef FEAT_GUI
+ /* Give focus back to main window (when using MDI). */
+--- 1563,1568 ----
+***************
+*** 1725,1774 ****
+ mch_print_text_out(char_u *p, int len)
+ {
+ SIZE sz;
+! WCHAR *wp = NULL;
+ int wlen = len;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! wp = enc_to_utf16(p, &wlen);
+! if (wp != NULL)
+! {
+! int ret = FALSE;
+
+! TextOutW(prt_dlg.hDC, prt_pos_x + prt_left_margin,
+! prt_pos_y + prt_top_margin, wp, wlen);
+! GetTextExtentPoint32W(prt_dlg.hDC, wp, wlen, &sz);
+! vim_free(wp);
+! prt_pos_x += (sz.cx - prt_tm.tmOverhang);
+! /* This is wrong when printing spaces for a TAB. */
+! if (p[len] != NUL)
+ {
+! wlen = MB_PTR2LEN(p + len);
+! wp = enc_to_utf16(p + len, &wlen);
+! if (wp != NULL)
+! {
+! GetTextExtentPoint32W(prt_dlg.hDC, wp, 1, &sz);
+! ret = (prt_pos_x + prt_left_margin + sz.cx > prt_right_margin);
+! vim_free(wp);
+! }
+ }
+- return ret;
+ }
+! TextOut(prt_dlg.hDC, prt_pos_x + prt_left_margin,
+! prt_pos_y + prt_top_margin,
+! (LPCSTR)p, len);
+! #ifndef FEAT_PROPORTIONAL_FONTS
+! prt_pos_x += len * prt_tm.tmAveCharWidth;
+! return (prt_pos_x + prt_left_margin + prt_tm.tmAveCharWidth
+! + prt_tm.tmOverhang > prt_right_margin);
+! #else
+! GetTextExtentPoint32(prt_dlg.hDC, (LPCSTR)p, len, &sz);
+! prt_pos_x += (sz.cx - prt_tm.tmOverhang);
+! /* This is wrong when printing spaces for a TAB. */
+! if (p[len] == NUL)
+! return FALSE;
+! GetTextExtentPoint32(prt_dlg.hDC, p + len, 1, &sz);
+! return (prt_pos_x + prt_left_margin + sz.cx > prt_right_margin);
+! #endif
+ }
+
+ void
+--- 1618,1649 ----
+ mch_print_text_out(char_u *p, int len)
+ {
+ SIZE sz;
+! WCHAR *wp;
+ int wlen = len;
++ int ret = FALSE;
+
+! wp = enc_to_utf16(p, &wlen);
+! if (wp == NULL)
+! return FALSE;
+
+! TextOutW(prt_dlg.hDC, prt_pos_x + prt_left_margin,
+! prt_pos_y + prt_top_margin, wp, wlen);
+! GetTextExtentPoint32W(prt_dlg.hDC, wp, wlen, &sz);
+! vim_free(wp);
+! prt_pos_x += (sz.cx - prt_tm.tmOverhang);
+! /* This is wrong when printing spaces for a TAB. */
+! if (p[len] != NUL)
+! {
+! wlen = MB_PTR2LEN(p + len);
+! wp = enc_to_utf16(p + len, &wlen);
+! if (wp != NULL)
+ {
+! GetTextExtentPoint32W(prt_dlg.hDC, wp, 1, &sz);
+! ret = (prt_pos_x + prt_left_margin + sz.cx > prt_right_margin);
+! vim_free(wp);
+ }
+ }
+! return ret;
+ }
+
+ void
+***************
+*** 1863,1868 ****
+--- 1738,1744 ----
+ {
+ HANDLE h = INVALID_HANDLE_VALUE;
+ DWORD size;
++ WCHAR *p;
+ char_u *rfname = NULL;
+ FILE_NAME_INFO_ *nameinfo = NULL;
+ WCHAR buff[MAX_PATH], *volnames = NULL;
+***************
+*** 1887,1919 ****
+ return NULL;
+ }
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *p;
+!
+! p = enc_to_utf16(fname, NULL);
+! if (p == NULL)
+! goto fail;
+!
+! if ((GetFileAttributesW(p) & FILE_ATTRIBUTE_REPARSE_POINT) == 0)
+! {
+! vim_free(p);
+! goto fail;
+! }
+
+! h = CreateFileW(p, 0, 0, NULL, OPEN_EXISTING,
+! FILE_FLAG_BACKUP_SEMANTICS, NULL);
+ vim_free(p);
+ }
+- else
+- {
+- if ((GetFileAttributes((char*) fname) &
+- FILE_ATTRIBUTE_REPARSE_POINT) == 0)
+- goto fail;
+
+! h = CreateFile((char*) fname, 0, 0, NULL, OPEN_EXISTING,
+! FILE_FLAG_BACKUP_SEMANTICS, NULL);
+! }
+
+ if (h == INVALID_HANDLE_VALUE)
+ goto fail;
+--- 1763,1781 ----
+ return NULL;
+ }
+
+! p = enc_to_utf16(fname, NULL);
+! if (p == NULL)
+! goto fail;
+
+! if ((GetFileAttributesW(p) & FILE_ATTRIBUTE_REPARSE_POINT) == 0)
+! {
+ vim_free(p);
++ goto fail;
+ }
+
+! h = CreateFileW(p, 0, 0, NULL, OPEN_EXISTING,
+! FILE_FLAG_BACKUP_SEMANTICS, NULL);
+! vim_free(p);
+
+ if (h == INVALID_HANDLE_VALUE)
+ goto fail;
+***************
+*** 1988,1995 ****
+ IShellLink *psl = NULL;
+ IPersistFile *ppf = NULL;
+ OLECHAR wsz[MAX_PATH];
+- WIN32_FIND_DATA ffd; // we get those free of charge
+- CHAR buf[MAX_PATH]; // could have simply reused 'wsz'...
+ char_u *rfname = NULL;
+ int len;
+ IShellLinkW *pslw = NULL;
+--- 1850,1855 ----
+***************
+*** 2005,2084 ****
+
+ CoInitialize(NULL);
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+! // create a link manager object and request its interface
+! hr = CoCreateInstance(
+! &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
+! &IID_IShellLinkW, (void**)&pslw);
+! if (hr == S_OK)
+! {
+! WCHAR *p = enc_to_utf16(fname, NULL);
+
+! if (p != NULL)
+! {
+! // Get a pointer to the IPersistFile interface.
+! hr = pslw->lpVtbl->QueryInterface(
+! pslw, &IID_IPersistFile, (void**)&ppf);
+! if (hr != S_OK)
+! goto shortcut_errorw;
+!
+! // "load" the name and resolve the link
+! hr = ppf->lpVtbl->Load(ppf, p, STGM_READ);
+! if (hr != S_OK)
+! goto shortcut_errorw;
+! # if 0 // This makes Vim wait a long time if the target does not exist.
+! hr = pslw->lpVtbl->Resolve(pslw, NULL, SLR_NO_UI);
+! if (hr != S_OK)
+! goto shortcut_errorw;
+! # endif
+
+! // Get the path to the link target.
+! ZeroMemory(wsz, MAX_PATH * sizeof(WCHAR));
+! hr = pslw->lpVtbl->GetPath(pslw, wsz, MAX_PATH, &ffdw, 0);
+! if (hr == S_OK && wsz[0] != NUL)
+! rfname = utf16_to_enc(wsz, NULL);
+
+ shortcut_errorw:
+! vim_free(p);
+! goto shortcut_end;
+! }
+ }
+- goto shortcut_end;
+ }
+- // create a link manager object and request its interface
+- hr = CoCreateInstance(
+- &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
+- &IID_IShellLink, (void**)&psl);
+- if (hr != S_OK)
+- goto shortcut_end;
+-
+- // Get a pointer to the IPersistFile interface.
+- hr = psl->lpVtbl->QueryInterface(
+- psl, &IID_IPersistFile, (void**)&ppf);
+- if (hr != S_OK)
+- goto shortcut_end;
+-
+- // full path string must be in Unicode.
+- MultiByteToWideChar(CP_ACP, 0, (LPCSTR)fname, -1, wsz, MAX_PATH);
+-
+- // "load" the name and resolve the link
+- hr = ppf->lpVtbl->Load(ppf, wsz, STGM_READ);
+- if (hr != S_OK)
+- goto shortcut_end;
+- # if 0 // This makes Vim wait a long time if the target doesn't exist.
+- hr = psl->lpVtbl->Resolve(psl, NULL, SLR_NO_UI);
+- if (hr != S_OK)
+- goto shortcut_end;
+- # endif
+-
+- // Get the path to the link target.
+- ZeroMemory(buf, MAX_PATH);
+- hr = psl->lpVtbl->GetPath(psl, buf, MAX_PATH, &ffd, 0);
+- if (hr == S_OK && buf[0] != NUL)
+- rfname = vim_strsave((char_u *)buf);
+
+- shortcut_end:
+ // Release all interface pointers (both belong to the same object)
+ if (ppf != NULL)
+ ppf->lpVtbl->Release(ppf);
+--- 1865,1907 ----
+
+ CoInitialize(NULL);
+
+! // create a link manager object and request its interface
+! hr = CoCreateInstance(
+! &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
+! &IID_IShellLinkW, (void**)&pslw);
+! if (hr == S_OK)
+ {
+! WCHAR *p = enc_to_utf16(fname, NULL);
+
+! if (p != NULL)
+! {
+! // Get a pointer to the IPersistFile interface.
+! hr = pslw->lpVtbl->QueryInterface(
+! pslw, &IID_IPersistFile, (void**)&ppf);
+! if (hr != S_OK)
+! goto shortcut_errorw;
+!
+! // "load" the name and resolve the link
+! hr = ppf->lpVtbl->Load(ppf, p, STGM_READ);
+! if (hr != S_OK)
+! goto shortcut_errorw;
+! # if 0 // This makes Vim wait a long time if the target does not exist.
+! hr = pslw->lpVtbl->Resolve(pslw, NULL, SLR_NO_UI);
+! if (hr != S_OK)
+! goto shortcut_errorw;
+! # endif
+
+! // Get the path to the link target.
+! ZeroMemory(wsz, MAX_PATH * sizeof(WCHAR));
+! hr = pslw->lpVtbl->GetPath(pslw, wsz, MAX_PATH, &ffdw, 0);
+! if (hr == S_OK && wsz[0] != NUL)
+! rfname = utf16_to_enc(wsz, NULL);
+
+ shortcut_errorw:
+! vim_free(p);
+ }
+ }
+
+ // Release all interface pointers (both belong to the same object)
+ if (ppf != NULL)
+ ppf->lpVtbl->Release(ppf);
+*** ../vim-8.1.1102/src/os_win32.c 2019-03-30 22:11:17.534968563 +0100
+--- src/os_win32.c 2019-04-02 22:14:38.712846295 +0200
+***************
+*** 586,592 ****
+ static char *null_libintl_textdomain(const char *);
+ static char *null_libintl_bindtextdomain(const char *, const char *);
+ static char *null_libintl_bind_textdomain_codeset(const char *, const char *);
+- static int null_libintl_putenv(const char *);
+ static int null_libintl_wputenv(const wchar_t *);
+
+ static HINSTANCE hLibintlDLL = NULL;
+--- 586,591 ----
+***************
+*** 598,604 ****
+ = null_libintl_bindtextdomain;
+ char *(*dyn_libintl_bind_textdomain_codeset)(const char *, const char *)
+ = null_libintl_bind_textdomain_codeset;
+- int (*dyn_libintl_putenv)(const char *) = null_libintl_putenv;
+ int (*dyn_libintl_wputenv)(const wchar_t *) = null_libintl_wputenv;
+
+ int
+--- 597,602 ----
+***************
+*** 666,680 ****
+ dyn_libintl_bind_textdomain_codeset =
+ null_libintl_bind_textdomain_codeset;
+
+! /* _putenv() function for the libintl.dll is optional. */
+ hmsvcrt = find_imported_module_by_funcname(hLibintlDLL, "getenv");
+ if (hmsvcrt != NULL)
+- {
+- dyn_libintl_putenv = (void *)GetProcAddress(hmsvcrt, "_putenv");
+ dyn_libintl_wputenv = (void *)GetProcAddress(hmsvcrt, "_wputenv");
+- }
+- if (dyn_libintl_putenv == NULL || dyn_libintl_putenv == _putenv)
+- dyn_libintl_putenv = null_libintl_putenv;
+ if (dyn_libintl_wputenv == NULL || dyn_libintl_wputenv == _wputenv)
+ dyn_libintl_wputenv = null_libintl_wputenv;
+
+--- 664,673 ----
+ dyn_libintl_bind_textdomain_codeset =
+ null_libintl_bind_textdomain_codeset;
+
+! /* _wputenv() function for the libintl.dll is optional. */
+ hmsvcrt = find_imported_module_by_funcname(hLibintlDLL, "getenv");
+ if (hmsvcrt != NULL)
+ dyn_libintl_wputenv = (void *)GetProcAddress(hmsvcrt, "_wputenv");
+ if (dyn_libintl_wputenv == NULL || dyn_libintl_wputenv == _wputenv)
+ dyn_libintl_wputenv = null_libintl_wputenv;
+
+***************
+*** 692,698 ****
+ dyn_libintl_textdomain = null_libintl_textdomain;
+ dyn_libintl_bindtextdomain = null_libintl_bindtextdomain;
+ dyn_libintl_bind_textdomain_codeset = null_libintl_bind_textdomain_codeset;
+- dyn_libintl_putenv = null_libintl_putenv;
+ dyn_libintl_wputenv = null_libintl_wputenv;
+ }
+
+--- 685,690 ----
+***************
+*** 734,745 ****
+ }
+
+ static int
+- null_libintl_putenv(const char *envstring UNUSED)
+- {
+- return 0;
+- }
+-
+- static int
+ null_libintl_wputenv(const wchar_t *envstring UNUSED)
+ {
+ return 0;
+--- 726,731 ----
+***************
+*** 2027,2035 ****
+ static int
+ executable_exists(char *name, char_u **path, int use_path)
+ {
+! char *dum;
+! char fname[_MAX_PATH];
+! char *curpath, *newpath;
+ long n;
+
+ if (!use_path)
+--- 2013,2022 ----
+ static int
+ executable_exists(char *name, char_u **path, int use_path)
+ {
+! WCHAR *p;
+! WCHAR fnamew[_MAX_PATH];
+! WCHAR *dumw;
+! WCHAR *wcurpath, *wnewpath;
+ long n;
+
+ if (!use_path)
+***************
+*** 2048,2096 ****
+ return FALSE;
+ }
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *p = enc_to_utf16((char_u *)name, NULL);
+! WCHAR fnamew[_MAX_PATH];
+! WCHAR *dumw;
+! WCHAR *wcurpath, *wnewpath;
+!
+! if (p != NULL)
+! {
+! wcurpath = _wgetenv(L"PATH");
+! wnewpath = (WCHAR*)alloc((unsigned)(wcslen(wcurpath) + 3)
+! * sizeof(WCHAR));
+! if (wnewpath == NULL)
+! return FALSE;
+! wcscpy(wnewpath, L".;");
+! wcscat(wnewpath, wcurpath);
+! n = (long)SearchPathW(wnewpath, p, NULL, _MAX_PATH, fnamew, &dumw);
+! vim_free(wnewpath);
+! vim_free(p);
+! if (n == 0)
+! return FALSE;
+! if (GetFileAttributesW(fnamew) & FILE_ATTRIBUTE_DIRECTORY)
+! return FALSE;
+! if (path != NULL)
+! *path = utf16_to_enc(fnamew, NULL);
+! return TRUE;
+! }
+! }
+
+! curpath = getenv("PATH");
+! newpath = (char*)alloc((unsigned)(STRLEN(curpath) + 3));
+! if (newpath == NULL)
+ return FALSE;
+! STRCPY(newpath, ".;");
+! STRCAT(newpath, curpath);
+! n = (long)SearchPath(newpath, name, NULL, _MAX_PATH, fname, &dum);
+! vim_free(newpath);
+ if (n == 0)
+ return FALSE;
+! if (mch_isdir((char_u *)fname))
+ return FALSE;
+ if (path != NULL)
+! *path = vim_strsave((char_u *)fname);
+ return TRUE;
+ }
+
+--- 2035,2060 ----
+ return FALSE;
+ }
+
+! p = enc_to_utf16((char_u *)name, NULL);
+! if (p == NULL)
+! return FALSE;
+
+! wcurpath = _wgetenv(L"PATH");
+! wnewpath = (WCHAR*)alloc((unsigned)(wcslen(wcurpath) + 3)
+! * sizeof(WCHAR));
+! if (wnewpath == NULL)
+ return FALSE;
+! wcscpy(wnewpath, L".;");
+! wcscat(wnewpath, wcurpath);
+! n = (long)SearchPathW(wnewpath, p, NULL, _MAX_PATH, fnamew, &dumw);
+! vim_free(wnewpath);
+! vim_free(p);
+ if (n == 0)
+ return FALSE;
+! if (GetFileAttributesW(fnamew) & FILE_ATTRIBUTE_DIRECTORY)
+ return FALSE;
+ if (path != NULL)
+! *path = utf16_to_enc(fnamew, NULL);
+ return TRUE;
+ }
+
+***************
+*** 2812,2842 ****
+ char_u *s,
+ int len)
+ {
+! char szUserName[256 + 1]; /* UNLEN is 256 */
+! DWORD cch = sizeof szUserName;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+! WCHAR wszUserName[256 + 1]; /* UNLEN is 256 */
+! DWORD wcch = sizeof(wszUserName) / sizeof(WCHAR);
+
+! if (GetUserNameW(wszUserName, &wcch))
+ {
+! char_u *p = utf16_to_enc(wszUserName, NULL);
+!
+! if (p != NULL)
+! {
+! vim_strncpy(s, p, len - 1);
+! vim_free(p);
+! return OK;
+! }
+ }
+ }
+- if (GetUserName(szUserName, &cch))
+- {
+- vim_strncpy(s, (char_u *)szUserName, len - 1);
+- return OK;
+- }
+ s[0] = NUL;
+ return FAIL;
+ }
+--- 2776,2795 ----
+ char_u *s,
+ int len)
+ {
+! WCHAR wszUserName[256 + 1]; /* UNLEN is 256 */
+! DWORD wcch = sizeof(wszUserName) / sizeof(WCHAR);
+
+! if (GetUserNameW(wszUserName, &wcch))
+ {
+! char_u *p = utf16_to_enc(wszUserName, NULL);
+
+! if (p != NULL)
+ {
+! vim_strncpy(s, p, len - 1);
+! vim_free(p);
+! return OK;
+ }
+ }
+ s[0] = NUL;
+ return FAIL;
+ }
+***************
+*** 2850,2876 ****
+ char_u *s,
+ int len)
+ {
+! DWORD cch = len;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+! WCHAR wszHostName[256 + 1];
+! DWORD wcch = sizeof(wszHostName) / sizeof(WCHAR);
+
+! if (GetComputerNameW(wszHostName, &wcch))
+ {
+! char_u *p = utf16_to_enc(wszHostName, NULL);
+!
+! if (p != NULL)
+! {
+! vim_strncpy(s, p, len - 1);
+! vim_free(p);
+! return;
+! }
+ }
+ }
+- if (!GetComputerName((LPSTR)s, &cch))
+- vim_strncpy(s, (char_u *)"PC (Win32 Vim)", len - 1);
+ }
+
+
+--- 2803,2822 ----
+ char_u *s,
+ int len)
+ {
+! WCHAR wszHostName[256 + 1];
+! DWORD wcch = sizeof(wszHostName) / sizeof(WCHAR);
+
+! if (GetComputerNameW(wszHostName, &wcch))
+ {
+! char_u *p = utf16_to_enc(wszHostName, NULL);
+
+! if (p != NULL)
+ {
+! vim_strncpy(s, p, len - 1);
+! vim_free(p);
+! return;
+ }
+ }
+ }
+
+
+***************
+*** 2893,2900 ****
+ char_u *buf,
+ int len)
+ {
+! char_u abuf[_MAX_PATH + 1];
+! DWORD lfnlen;
+
+ /*
+ * Originally this was:
+--- 2839,2845 ----
+ char_u *buf,
+ int len)
+ {
+! WCHAR wbuf[_MAX_PATH + 1];
+
+ /*
+ * Originally this was:
+***************
+*** 2902,2948 ****
+ * But the Win32s known bug list says that getcwd() doesn't work
+ * so use the Win32 system call instead. <Negri>
+ */
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+! WCHAR wbuf[_MAX_PATH + 1];
+
+! 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)
+ {
+! vim_strncpy(buf, p, len - 1);
+ vim_free(p);
+! return OK;
+ }
+ }
+! return FAIL;
+! }
+! 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;
+ }
+
+ /*
+--- 2847,2878 ----
+ * But the Win32s known bug list says that getcwd() doesn't work
+ * so use the Win32 system call instead. <Negri>
+ */
+! 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)
+! {
+! vim_strncpy(buf, p, len - 1);
+! vim_free(p);
+! return OK;
+! }
+! }
+! return FAIL;
+ }
+
+ /*
+***************
+*** 2968,2989 ****
+ int
+ mch_setperm(char_u *name, long perm)
+ {
+! long n = -1;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *p = enc_to_utf16(name, NULL);
+
+! if (p != NULL)
+! {
+! n = _wchmod(p, perm);
+! vim_free(p);
+! if (n == -1)
+! return FAIL;
+! }
+! }
+! if (n == -1)
+! n = _chmod((const char *)name, perm);
+ if (n == -1)
+ return FAIL;
+
+--- 2898,2912 ----
+ int
+ mch_setperm(char_u *name, long perm)
+ {
+! long n;
+! WCHAR *p;
+
+! p = enc_to_utf16(name, NULL);
+! if (p == NULL)
+! return FAIL;
+
+! n = _wchmod(p, perm);
+! vim_free(p);
+ if (n == -1)
+ return FAIL;
+
+***************
+*** 3053,3071 ****
+ int
+ mch_mkdir(char_u *name)
+ {
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *p;
+! int retval;
+
+! p = enc_to_utf16(name, NULL);
+! if (p == NULL)
+! return -1;
+! retval = _wmkdir(p);
+! vim_free(p);
+! return retval;
+! }
+! return _mkdir((const char *)name);
+ }
+
+ /*
+--- 2976,2990 ----
+ int
+ mch_mkdir(char_u *name)
+ {
+! WCHAR *p;
+! int retval;
+
+! p = enc_to_utf16(name, NULL);
+! if (p == NULL)
+! return -1;
+! retval = _wmkdir(p);
+! vim_free(p);
+! return retval;
+ }
+
+ /*
+***************
+*** 3075,3093 ****
+ int
+ mch_rmdir(char_u *name)
+ {
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *p;
+! int retval;
+
+! p = enc_to_utf16(name, NULL);
+! if (p == NULL)
+! return -1;
+! retval = _wrmdir(p);
+! vim_free(p);
+! return retval;
+! }
+! return _rmdir((const char *)name);
+ }
+
+ /*
+--- 2994,3008 ----
+ int
+ mch_rmdir(char_u *name)
+ {
+! WCHAR *p;
+! int retval;
+
+! p = enc_to_utf16(name, NULL);
+! if (p == NULL)
+! return -1;
+! retval = _wrmdir(p);
+! vim_free(p);
+! return retval;
+ }
+
+ /*
+***************
+*** 3110,3144 ****
+ {
+ HANDLE hFind;
+ int res = FALSE;
+- WIN32_FIND_DATAA findDataA;
+ DWORD fileFlags = 0, reparseTag = 0;
+! WCHAR *wn = NULL;
+ WIN32_FIND_DATAW findDataW;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! wn = enc_to_utf16(name, NULL);
+! if (wn != NULL)
+! {
+! hFind = FindFirstFileW(wn, &findDataW);
+! vim_free(wn);
+! if (hFind != INVALID_HANDLE_VALUE)
+! {
+! fileFlags = findDataW.dwFileAttributes;
+! reparseTag = findDataW.dwReserved0;
+! }
+! }
+! else
+! {
+! hFind = FindFirstFile((LPCSTR)name, &findDataA);
+! if (hFind != INVALID_HANDLE_VALUE)
+! {
+! fileFlags = findDataA.dwFileAttributes;
+! reparseTag = findDataA.dwReserved0;
+! }
+! }
+
+ if (hFind != INVALID_HANDLE_VALUE)
+ FindClose(hFind);
+
+ if ((fileFlags & FILE_ATTRIBUTE_REPARSE_POINT)
+ && (reparseTag == IO_REPARSE_TAG_SYMLINK
+--- 3025,3046 ----
+ {
+ HANDLE hFind;
+ int res = FALSE;
+ DWORD fileFlags = 0, reparseTag = 0;
+! WCHAR *wn;
+ WIN32_FIND_DATAW findDataW;
+
+! wn = enc_to_utf16(name, NULL);
+! if (wn == NULL)
+! return FALSE;
+
++ hFind = FindFirstFileW(wn, &findDataW);
++ vim_free(wn);
+ if (hFind != INVALID_HANDLE_VALUE)
++ {
++ fileFlags = findDataW.dwFileAttributes;
++ reparseTag = findDataW.dwReserved0;
+ FindClose(hFind);
++ }
+
+ if ((fileFlags & FILE_ATTRIBUTE_REPARSE_POINT)
+ && (reparseTag == IO_REPARSE_TAG_SYMLINK
+***************
+*** 3172,3204 ****
+ {
+ HANDLE hFile;
+ int res = FILEINFO_READ_FAIL;
+! WCHAR *wn = NULL;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! wn = enc_to_utf16(fname, NULL);
+! if (wn == NULL)
+! return FILEINFO_ENC_FAIL;
+! }
+! if (wn != NULL)
+! {
+! hFile = CreateFileW(wn, /* file name */
+! GENERIC_READ, /* access mode */
+! FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */
+! NULL, /* security descriptor */
+! OPEN_EXISTING, /* creation disposition */
+! FILE_FLAG_BACKUP_SEMANTICS, /* file attributes */
+! NULL); /* handle to template file */
+! vim_free(wn);
+! }
+! else
+! hFile = CreateFile((LPCSTR)fname, /* file name */
+! GENERIC_READ, /* access mode */
+! FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */
+! NULL, /* security descriptor */
+! OPEN_EXISTING, /* creation disposition */
+! FILE_FLAG_BACKUP_SEMANTICS, /* file attributes */
+! NULL); /* handle to template file */
+
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+--- 3074,3093 ----
+ {
+ HANDLE hFile;
+ int res = FILEINFO_READ_FAIL;
+! WCHAR *wn;
+
+! wn = enc_to_utf16(fname, NULL);
+! if (wn == NULL)
+! return FILEINFO_ENC_FAIL;
+!
+! hFile = CreateFileW(wn, // file name
+! GENERIC_READ, // access mode
+! FILE_SHARE_READ | FILE_SHARE_WRITE, // share mode
+! NULL, // security descriptor
+! OPEN_EXISTING, // creation disposition
+! FILE_FLAG_BACKUP_SEMANTICS, // file attributes
+! NULL); // handle to template file
+! vim_free(wn);
+
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+***************
+*** 3221,3238 ****
+ win32_getattrs(char_u *name)
+ {
+ int attr;
+! WCHAR *p = NULL;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! p = enc_to_utf16(name, NULL);
+
+! if (p != NULL)
+! {
+! attr = GetFileAttributesW(p);
+! vim_free(p);
+! }
+! else
+! attr = GetFileAttributes((char *)name);
+
+ return attr;
+ }
+--- 3110,3123 ----
+ win32_getattrs(char_u *name)
+ {
+ int attr;
+! WCHAR *p;
+
+! p = enc_to_utf16(name, NULL);
+! if (p == NULL)
+! return INVALID_FILE_ATTRIBUTES;
+
+! attr = GetFileAttributesW(p);
+! vim_free(p);
+
+ return attr;
+ }
+***************
+*** 3245,3263 ****
+ static int
+ win32_setattrs(char_u *name, int attrs)
+ {
+! int res;
+! WCHAR *p = NULL;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! p = enc_to_utf16(name, NULL);
+
+! if (p != NULL)
+! {
+! res = SetFileAttributesW(p, attrs);
+! vim_free(p);
+! }
+! else
+! res = SetFileAttributes((char *)name, attrs);
+
+ return res ? 0 : -1;
+ }
+--- 3130,3144 ----
+ static int
+ win32_setattrs(char_u *name, int attrs)
+ {
+! int res;
+! WCHAR *p;
+
+! p = enc_to_utf16(name, NULL);
+! if (p == NULL)
+! return -1;
+
+! res = SetFileAttributesW(p, attrs);
+! vim_free(p);
+
+ return res ? 0 : -1;
+ }
+***************
+*** 3375,3381 ****
+ {
+ HANDLE hFile;
+ int type;
+! WCHAR *wn = NULL;
+
+ /* We can't open a file with a name "\\.\con" or "\\.\prn" and trying to
+ * read from it later will cause Vim to hang. Thus return NODE_WRITABLE
+--- 3256,3262 ----
+ {
+ HANDLE hFile;
+ int type;
+! WCHAR *wn;
+
+ /* We can't open a file with a name "\\.\con" or "\\.\prn" and trying to
+ * read from it later will cause Vim to hang. Thus return NODE_WRITABLE
+***************
+*** 3383,3411 ****
+ if (STRNCMP(name, "\\\\.\\", 4) == 0)
+ return NODE_WRITABLE;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! wn = enc_to_utf16(name, NULL);
+!
+! if (wn != NULL)
+! {
+! hFile = CreateFileW(wn, /* file name */
+! GENERIC_WRITE, /* access mode */
+! 0, /* share mode */
+! NULL, /* security descriptor */
+! OPEN_EXISTING, /* creation disposition */
+! 0, /* file attributes */
+! NULL); /* handle to template file */
+! vim_free(wn);
+! }
+! else
+! hFile = CreateFile((LPCSTR)name, /* file name */
+! GENERIC_WRITE, /* access mode */
+! 0, /* share mode */
+! NULL, /* security descriptor */
+! OPEN_EXISTING, /* creation disposition */
+! 0, /* file attributes */
+! NULL); /* handle to template file */
+
+ if (hFile == INVALID_HANDLE_VALUE)
+ return NODE_NORMAL;
+
+--- 3264,3281 ----
+ if (STRNCMP(name, "\\\\.\\", 4) == 0)
+ return NODE_WRITABLE;
+
+! wn = enc_to_utf16(name, NULL);
+! if (wn == NULL)
+! return NODE_NORMAL;
+
++ hFile = CreateFileW(wn, // file name
++ GENERIC_WRITE, // access mode
++ 0, // share mode
++ NULL, // security descriptor
++ OPEN_EXISTING, // creation disposition
++ 0, // file attributes
++ NULL); // handle to template file
++ vim_free(wn);
+ if (hFile == INVALID_HANDLE_VALUE)
+ return NODE_NORMAL;
+
+***************
+*** 3445,3525 ****
+ p = (struct my_acl *)alloc_clear((unsigned)sizeof(struct my_acl));
+ if (p != NULL)
+ {
+! WCHAR *wn = NULL;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! wn = enc_to_utf16(fname, NULL);
+! if (wn != NULL)
+! {
+! /* Try to retrieve the entire security descriptor. */
+! err = GetNamedSecurityInfoW(
+! wn, // Abstract filename
+! SE_FILE_OBJECT, // File Object
+! OWNER_SECURITY_INFORMATION |
+! GROUP_SECURITY_INFORMATION |
+! DACL_SECURITY_INFORMATION |
+! SACL_SECURITY_INFORMATION,
+! &p->pSidOwner, // Ownership information.
+! &p->pSidGroup, // Group membership.
+! &p->pDacl, // Discretionary information.
+! &p->pSacl, // For auditing purposes.
+ &p->pSecurityDescriptor);
+- if (err == ERROR_ACCESS_DENIED ||
+- err == ERROR_PRIVILEGE_NOT_HELD)
+- {
+- /* Retrieve only DACL. */
+- (void)GetNamedSecurityInfoW(
+- wn,
+- SE_FILE_OBJECT,
+- DACL_SECURITY_INFORMATION,
+- NULL,
+- NULL,
+- &p->pDacl,
+- NULL,
+- &p->pSecurityDescriptor);
+- }
+- if (p->pSecurityDescriptor == NULL)
+- {
+- mch_free_acl((vim_acl_T)p);
+- p = NULL;
+- }
+- vim_free(wn);
+ }
+! else
+ {
+! /* Try to retrieve the entire security descriptor. */
+! err = GetNamedSecurityInfo(
+! (LPSTR)fname, // Abstract filename
+! SE_FILE_OBJECT, // File Object
+! OWNER_SECURITY_INFORMATION |
+! GROUP_SECURITY_INFORMATION |
+! DACL_SECURITY_INFORMATION |
+! SACL_SECURITY_INFORMATION,
+! &p->pSidOwner, // Ownership information.
+! &p->pSidGroup, // Group membership.
+! &p->pDacl, // Discretionary information.
+! &p->pSacl, // For auditing purposes.
+! &p->pSecurityDescriptor);
+! if (err == ERROR_ACCESS_DENIED ||
+! err == ERROR_PRIVILEGE_NOT_HELD)
+! {
+! /* Retrieve only DACL. */
+! (void)GetNamedSecurityInfo(
+! (LPSTR)fname,
+! SE_FILE_OBJECT,
+! DACL_SECURITY_INFORMATION,
+! NULL,
+! NULL,
+! &p->pDacl,
+! NULL,
+! &p->pSecurityDescriptor);
+! }
+! if (p->pSecurityDescriptor == NULL)
+! {
+! mch_free_acl((vim_acl_T)p);
+! p = NULL;
+! }
+ }
+ }
+
+ return (vim_acl_T)p;
+--- 3315,3359 ----
+ p = (struct my_acl *)alloc_clear((unsigned)sizeof(struct my_acl));
+ if (p != NULL)
+ {
+! WCHAR *wn;
+!
+! wn = enc_to_utf16(fname, NULL);
+! if (wn == NULL)
+! return NULL;
+
+! // Try to retrieve the entire security descriptor.
+! err = GetNamedSecurityInfoW(
+! wn, // Abstract filename
+! SE_FILE_OBJECT, // File Object
+! OWNER_SECURITY_INFORMATION |
+! GROUP_SECURITY_INFORMATION |
+! DACL_SECURITY_INFORMATION |
+! SACL_SECURITY_INFORMATION,
+! &p->pSidOwner, // Ownership information.
+! &p->pSidGroup, // Group membership.
+! &p->pDacl, // Discretionary information.
+! &p->pSacl, // For auditing purposes.
+! &p->pSecurityDescriptor);
+! if (err == ERROR_ACCESS_DENIED ||
+! err == ERROR_PRIVILEGE_NOT_HELD)
+! {
+! // Retrieve only DACL.
+! (void)GetNamedSecurityInfoW(
+! wn,
+! SE_FILE_OBJECT,
+! DACL_SECURITY_INFORMATION,
+! NULL,
+! NULL,
+! &p->pDacl,
+! NULL,
+ &p->pSecurityDescriptor);
+ }
+! if (p->pSecurityDescriptor == NULL)
+ {
+! mch_free_acl((vim_acl_T)p);
+! p = NULL;
+ }
++ vim_free(wn);
+ }
+
+ return (vim_acl_T)p;
+***************
+*** 3560,3615 ****
+ #ifdef HAVE_ACL
+ struct my_acl *p = (struct my_acl *)acl;
+ SECURITY_INFORMATION sec_info = 0;
+
+! if (p != NULL)
+! {
+! WCHAR *wn = NULL;
+
+! /* Set security flags */
+! if (p->pSidOwner)
+! sec_info |= OWNER_SECURITY_INFORMATION;
+! if (p->pSidGroup)
+! sec_info |= GROUP_SECURITY_INFORMATION;
+! if (p->pDacl)
+! {
+! sec_info |= DACL_SECURITY_INFORMATION;
+! /* Do not inherit its parent's DACL.
+! * If the DACL is inherited, Cygwin permissions would be changed.
+! */
+! if (!is_acl_inherited(p->pDacl))
+! sec_info |= PROTECTED_DACL_SECURITY_INFORMATION;
+! }
+! if (p->pSacl)
+! sec_info |= SACL_SECURITY_INFORMATION;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! wn = enc_to_utf16(fname, NULL);
+! if (wn != NULL)
+! {
+! (void)SetNamedSecurityInfoW(
+! wn, // Abstract filename
+! SE_FILE_OBJECT, // File Object
+! sec_info,
+! p->pSidOwner, // Ownership information.
+! p->pSidGroup, // Group membership.
+! p->pDacl, // Discretionary information.
+! p->pSacl // For auditing purposes.
+! );
+! vim_free(wn);
+! }
+! else
+! {
+! (void)SetNamedSecurityInfo(
+! (LPSTR)fname, // Abstract filename
+! SE_FILE_OBJECT, // File Object
+! sec_info,
+! p->pSidOwner, // Ownership information.
+! p->pSidGroup, // Group membership.
+! p->pDacl, // Discretionary information.
+! p->pSacl // For auditing purposes.
+! );
+! }
+! }
+ #endif
+ }
+
+--- 3394,3434 ----
+ #ifdef HAVE_ACL
+ struct my_acl *p = (struct my_acl *)acl;
+ SECURITY_INFORMATION sec_info = 0;
++ WCHAR *wn;
+
+! if (p == NULL)
+! return;
+
+! wn = enc_to_utf16(fname, NULL);
+! if (wn == NULL)
+! return;
+
+! // Set security flags
+! if (p->pSidOwner)
+! sec_info |= OWNER_SECURITY_INFORMATION;
+! if (p->pSidGroup)
+! sec_info |= GROUP_SECURITY_INFORMATION;
+! if (p->pDacl)
+! {
+! sec_info |= DACL_SECURITY_INFORMATION;
+! // Do not inherit its parent's DACL.
+! // If the DACL is inherited, Cygwin permissions would be changed.
+! if (!is_acl_inherited(p->pDacl))
+! sec_info |= PROTECTED_DACL_SECURITY_INFORMATION;
+! }
+! if (p->pSacl)
+! sec_info |= SACL_SECURITY_INFORMATION;
+!
+! (void)SetNamedSecurityInfoW(
+! wn, // Abstract filename
+! SE_FILE_OBJECT, // File Object
+! sec_info,
+! p->pSidOwner, // Ownership information.
+! p->pSidGroup, // Group membership.
+! p->pDacl, // Discretionary information.
+! p->pSacl // For auditing purposes.
+! );
+! vim_free(wn);
+ #endif
+ }
+
+***************
+*** 3955,4005 ****
+ LPVOID *env,
+ char *cwd)
+ {
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! BOOL ret;
+! WCHAR *wcmd, *wcwd = NULL;
+
+! wcmd = enc_to_utf16((char_u *)cmd, NULL);
+! if (wcmd == NULL)
+! goto fallback;
+! if (cwd != NULL)
+! {
+! wcwd = enc_to_utf16((char_u *)cwd, NULL);
+! if (wcwd == NULL)
+! {
+! vim_free(wcmd);
+! goto fallback;
+! }
+! }
+!
+! ret = CreateProcessW(
+! NULL, /* Executable name */
+! wcmd, /* Command to execute */
+! NULL, /* Process security attributes */
+! NULL, /* Thread security attributes */
+! inherit_handles, /* Inherit handles */
+! flags, /* Creation flags */
+! env, /* Environment */
+! wcwd, /* Current directory */
+! (LPSTARTUPINFOW)si, /* Startup information */
+! pi); /* Process information */
+! vim_free(wcmd);
+! vim_free(wcwd);
+! return ret;
+! }
+! fallback:
+! return CreateProcess(
+! NULL, /* Executable name */
+! cmd, /* Command to execute */
+! NULL, /* Process security attributes */
+! NULL, /* Thread security attributes */
+! inherit_handles, /* Inherit handles */
+! flags, /* Creation flags */
+! env, /* Environment */
+! cwd, /* Current directory */
+! si, /* Startup information */
+! pi); /* Process information */
+ }
+
+
+--- 3774,3807 ----
+ LPVOID *env,
+ char *cwd)
+ {
+! BOOL ret = FALSE;
+! WCHAR *wcmd, *wcwd = NULL;
+
+! wcmd = enc_to_utf16((char_u *)cmd, NULL);
+! if (wcmd == NULL)
+! return FALSE;
+! if (cwd != NULL)
+! {
+! wcwd = enc_to_utf16((char_u *)cwd, NULL);
+! if (wcwd == NULL)
+! goto theend;
+! }
+!
+! ret = CreateProcessW(
+! NULL, // Executable name
+! wcmd, // Command to execute
+! NULL, // Process security attributes
+! NULL, // Thread security attributes
+! inherit_handles, // Inherit handles
+! flags, // Creation flags
+! env, // Environment
+! wcwd, // Current directory
+! (LPSTARTUPINFOW)si, // Startup information
+! pi); // Process information
+! theend:
+! vim_free(wcmd);
+! vim_free(wcwd);
+! return ret;
+ }
+
+
+***************
+*** 4008,4025 ****
+ char *cmd,
+ INT n_show_cmd)
+ {
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *wcmd = enc_to_utf16((char_u *)cmd, NULL);
+! if (wcmd != NULL)
+! {
+! HINSTANCE ret;
+! ret = ShellExecuteW(NULL, NULL, wcmd, NULL, NULL, n_show_cmd);
+! vim_free(wcmd);
+! return ret;
+! }
+! }
+! return ShellExecute(NULL, NULL, cmd, NULL, NULL, n_show_cmd);
+ }
+
+
+--- 3810,3825 ----
+ char *cmd,
+ INT n_show_cmd)
+ {
+! HINSTANCE ret;
+! WCHAR *wcmd;
+!
+! wcmd = enc_to_utf16((char_u *)cmd, NULL);
+! if (wcmd == NULL)
+! return (HINSTANCE) 0;
+!
+! ret = ShellExecuteW(NULL, NULL, wcmd, NULL, NULL, n_show_cmd);
+! vim_free(wcmd);
+! return ret;
+ }
+
+
+***************
+*** 4582,4598 ****
+ static int
+ mch_system(char *cmd, int options)
+ {
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *wcmd = enc_to_utf16((char_u *)cmd, NULL);
+! if (wcmd != NULL)
+! {
+! int ret = _wsystem(wcmd);
+! vim_free(wcmd);
+! return ret;
+! }
+! }
+! return system(cmd);
+ }
+
+ #endif
+--- 4382,4397 ----
+ static int
+ mch_system(char *cmd, int options)
+ {
+! int ret;
+! WCHAR *wcmd;
+!
+! wcmd = enc_to_utf16((char_u *)cmd, NULL);
+! if (wcmd == NULL)
+! return -1;
+!
+! ret = _wsystem(wcmd);
+! vim_free(wcmd);
+! return ret;
+ }
+
+ #endif
+***************
+*** 4692,4742 ****
+ int x = 0;
+ int tmode = cur_tmode;
+ #ifdef FEAT_TITLE
+! char szShellTitle[512];
+! int did_set_title = FALSE;
+
+ /* Change the title to reflect that we are in a subshell. */
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+! WCHAR szShellTitle[512];
+!
+! if (GetConsoleTitleW(szShellTitle,
+! sizeof(szShellTitle)/sizeof(WCHAR) - 4) > 0)
+ {
+! if (cmd == NULL)
+! wcscat(szShellTitle, L" :sh");
+! else
+! {
+! WCHAR *wn = enc_to_utf16((char_u *)cmd, NULL);
+
+! if (wn != NULL)
+! {
+! wcscat(szShellTitle, L" - !");
+! if ((wcslen(szShellTitle) + wcslen(wn) <
+! sizeof(szShellTitle)/sizeof(WCHAR)))
+! wcscat(szShellTitle, wn);
+! SetConsoleTitleW(szShellTitle);
+! vim_free(wn);
+! did_set_title = TRUE;
+! }
+! }
+! }
+! }
+! if (!did_set_title)
+! /* Change the title to reflect that we are in a subshell. */
+! if (GetConsoleTitle(szShellTitle, sizeof(szShellTitle) - 4) > 0)
+! {
+! if (cmd == NULL)
+! strcat(szShellTitle, " :sh");
+! else
+ {
+! strcat(szShellTitle, " - !");
+! if ((strlen(szShellTitle) + strlen((char *)cmd)
+! < sizeof(szShellTitle)))
+! strcat(szShellTitle, (char *)cmd);
+ }
+- SetConsoleTitle(szShellTitle);
+ }
+ #endif
+
+ out_flush();
+--- 4491,4519 ----
+ int x = 0;
+ int tmode = cur_tmode;
+ #ifdef FEAT_TITLE
+! WCHAR szShellTitle[512];
+
+ /* Change the title to reflect that we are in a subshell. */
+! if (GetConsoleTitleW(szShellTitle,
+! sizeof(szShellTitle)/sizeof(WCHAR) - 4) > 0)
+ {
+! if (cmd == NULL)
+! wcscat(szShellTitle, L" :sh");
+! else
+ {
+! WCHAR *wn = enc_to_utf16((char_u *)cmd, NULL);
+
+! if (wn != NULL)
+ {
+! wcscat(szShellTitle, L" - !");
+! if ((wcslen(szShellTitle) + wcslen(wn) <
+! sizeof(szShellTitle)/sizeof(WCHAR)))
+! wcscat(szShellTitle, wn);
+! SetConsoleTitleW(szShellTitle);
+! vim_free(wn);
+ }
+ }
++ }
+ #endif
+
+ out_flush();
+***************
+*** 4936,4953 ****
+ "External commands will not pause after completion.\n"
+ "See :help win32-vimrun for more information.");
+ char *title = _("Vim Warning");
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *wmsg = enc_to_utf16((char_u *)msg, NULL);
+! WCHAR *wtitle = enc_to_utf16((char_u *)title, NULL);
+
+! if (wmsg != NULL && wtitle != NULL)
+! MessageBoxW(NULL, wmsg, wtitle, MB_ICONWARNING);
+! vim_free(wmsg);
+! vim_free(wtitle);
+! }
+! else
+! MessageBox(NULL, msg, title, MB_ICONWARNING);
+ need_vimrun_warning = FALSE;
+ }
+ if (!s_dont_use_vimrun && p_stmp)
+--- 4713,4725 ----
+ "External commands will not pause after completion.\n"
+ "See :help win32-vimrun for more information.");
+ char *title = _("Vim Warning");
+! WCHAR *wmsg = enc_to_utf16((char_u *)msg, NULL);
+! WCHAR *wtitle = enc_to_utf16((char_u *)title, NULL);
+
+! if (wmsg != NULL && wtitle != NULL)
+! MessageBoxW(NULL, wmsg, wtitle, MB_ICONWARNING);
+! vim_free(wmsg);
+! vim_free(wtitle);
+ need_vimrun_warning = FALSE;
+ }
+ if (!s_dont_use_vimrun && p_stmp)
+***************
+*** 5011,5033 ****
+ DWORD dwFlagsAndAttributes)
+ {
+ HANDLE h;
+! WCHAR *wn = NULL;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! wn = enc_to_utf16(fname, NULL);
+! if (wn != NULL)
+! {
+! h = CreateFileW(wn, dwDesiredAccess, dwShareMode,
+! lpSecurityAttributes, dwCreationDisposition,
+! dwFlagsAndAttributes, NULL);
+! vim_free(wn);
+! }
+! }
+ if (wn == NULL)
+! h = CreateFile((LPCSTR)fname, dwDesiredAccess, dwShareMode,
+! lpSecurityAttributes, dwCreationDisposition,
+! dwFlagsAndAttributes, NULL);
+ return h;
+ }
+
+--- 4783,4798 ----
+ DWORD dwFlagsAndAttributes)
+ {
+ HANDLE h;
+! WCHAR *wn;
+
+! wn = enc_to_utf16(fname, NULL);
+ if (wn == NULL)
+! return INVALID_HANDLE_VALUE;
+!
+! h = CreateFileW(wn, dwDesiredAccess, dwShareMode,
+! lpSecurityAttributes, dwCreationDisposition,
+! dwFlagsAndAttributes, NULL);
+! vim_free(wn);
+ return h;
+ }
+
+***************
+*** 6085,6165 ****
+ char_u *pchBuf,
+ DWORD cbToWrite)
+ {
+! COORD coord = g_coord;
+! DWORD written;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+! static WCHAR *unicodebuf = NULL;
+! static int unibuflen = 0;
+! int length;
+! DWORD n, cchwritten, cells;
+!
+! length = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)pchBuf, cbToWrite, 0, 0);
+! if (unicodebuf == NULL || length > unibuflen)
+! {
+! vim_free(unicodebuf);
+! unicodebuf = (WCHAR *)lalloc(length * sizeof(WCHAR), FALSE);
+! unibuflen = length;
+! }
+! MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)pchBuf, cbToWrite,
+! unicodebuf, unibuflen);
+!
+! cells = mb_string2cells(pchBuf, cbToWrite);
+!
+! if (!USE_VTP)
+! {
+! FillConsoleOutputAttribute(g_hConOut, g_attrCurrent, cells,
+! coord, &written);
+! /* When writing fails or didn't write a single character, pretend one
+! * character was written, otherwise we get stuck. */
+! if (WriteConsoleOutputCharacterW(g_hConOut, unicodebuf, length,
+! coord, &cchwritten) == 0
+! || cchwritten == 0 || cchwritten == (DWORD)-1)
+! cchwritten = 1;
+! }
+! else
+! {
+! if (WriteConsoleW(g_hConOut, unicodebuf, length, &cchwritten,
+ NULL) == 0 || cchwritten == 0)
+! cchwritten = 1;
+! }
+
+! if (cchwritten == length)
+! {
+! written = cbToWrite;
+! g_coord.X += (SHORT)cells;
+! }
+! else
+! {
+! char_u *p = pchBuf;
+! for (n = 0; n < cchwritten; n++)
+! MB_CPTR_ADV(p);
+! written = p - pchBuf;
+! g_coord.X += (SHORT)mb_string2cells(pchBuf, written);
+! }
+ }
+ else
+ {
+! if (!USE_VTP)
+! {
+! FillConsoleOutputAttribute(g_hConOut, g_attrCurrent, cbToWrite,
+! coord, &written);
+! /* When writing fails or didn't write a single character, pretend one
+! * character was written, otherwise we get stuck. */
+! if (WriteConsoleOutputCharacter(g_hConOut, (LPCSTR)pchBuf, cbToWrite,
+! coord, &written) == 0
+! || written == 0 || written == (DWORD)-1)
+! written = 1;
+! }
+! else
+! {
+! if (WriteConsole(g_hConOut, (LPCSTR)pchBuf, cbToWrite, &written,
+! NULL) == 0 || written == 0)
+! written = 1;
+! }
+!
+! g_coord.X += (SHORT) written;
+ }
+
+ while (g_coord.X > g_srScrollRegion.Right)
+--- 5850,5905 ----
+ char_u *pchBuf,
+ DWORD cbToWrite)
+ {
+! COORD coord = g_coord;
+! DWORD written;
+! DWORD n, cchwritten, cells;
+! static WCHAR *unicodebuf = NULL;
+! static int unibuflen = 0;
+! int length;
+! int cp = enc_utf8 ? CP_UTF8 : enc_codepage;
+!
+! length = MultiByteToWideChar(cp, 0, (LPCSTR)pchBuf, cbToWrite, 0, 0);
+! if (unicodebuf == NULL || length > unibuflen)
+! {
+! vim_free(unicodebuf);
+! unicodebuf = (WCHAR *)lalloc(length * sizeof(WCHAR), FALSE);
+! unibuflen = length;
+! }
+! MultiByteToWideChar(cp, 0, (LPCSTR)pchBuf, cbToWrite,
+! unicodebuf, unibuflen);
+!
+! cells = mb_string2cells(pchBuf, cbToWrite);
+
+! if (!USE_VTP)
+ {
+! FillConsoleOutputAttribute(g_hConOut, g_attrCurrent, cells,
+! coord, &written);
+! // When writing fails or didn't write a single character, pretend one
+! // character was written, otherwise we get stuck.
+! if (WriteConsoleOutputCharacterW(g_hConOut, unicodebuf, length,
+! coord, &cchwritten) == 0
+! || cchwritten == 0 || cchwritten == (DWORD)-1)
+! cchwritten = 1;
+! }
+! else
+! {
+! if (WriteConsoleW(g_hConOut, unicodebuf, length, &cchwritten,
+ NULL) == 0 || cchwritten == 0)
+! cchwritten = 1;
+! }
+
+! if (cchwritten == length)
+! {
+! written = cbToWrite;
+! g_coord.X += (SHORT)cells;
+ }
+ else
+ {
+! char_u *p = pchBuf;
+! for (n = 0; n < cchwritten; n++)
+! MB_CPTR_ADV(p);
+! written = p - pchBuf;
+! g_coord.X += (SHORT)mb_string2cells(pchBuf, written);
+ }
+
+ while (g_coord.X > g_srScrollRegion.Right)
+***************
+*** 6518,6524 ****
+ int
+ mch_remove(char_u *name)
+ {
+! WCHAR *wn = NULL;
+ int n;
+
+ /*
+--- 6258,6264 ----
+ int
+ mch_remove(char_u *name)
+ {
+! WCHAR *wn;
+ int n;
+
+ /*
+***************
+*** 6530,6546 ****
+
+ win32_setattrs(name, FILE_ATTRIBUTE_NORMAL);
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! wn = enc_to_utf16(name, NULL);
+! if (wn != NULL)
+! {
+! n = DeleteFileW(wn) ? 0 : -1;
+! vim_free(wn);
+! return n;
+! }
+! }
+! return DeleteFile((LPCSTR)name) ? 0 : -1;
+ }
+
+
+--- 6270,6282 ----
+
+ win32_setattrs(name, FILE_ATTRIBUTE_NORMAL);
+
+! wn = enc_to_utf16(name, NULL);
+! if (wn == NULL)
+! return -1;
+!
+! n = DeleteFileW(wn) ? 0 : -1;
+! vim_free(wn);
+! return n;
+ }
+
+
+***************
+*** 6590,6597 ****
+ }
+
+ /*
+! * Same code as below, but with wide functions and no comments.
+! * Return 0 for success, non-zero for failure.
+ */
+ int
+ mch_wrename(WCHAR *wold, WCHAR *wnew)
+--- 6326,6348 ----
+ }
+
+ /*
+! * mch_wrename() works around a bug in rename (aka MoveFile) in
+! * Windows 95: rename("foo.bar", "foo.bar~") will generate a
+! * file whose short file name is "FOO.BAR" (its long file name will
+! * be correct: "foo.bar~"). Because a file can be accessed by
+! * either its SFN or its LFN, "foo.bar" has effectively been
+! * renamed to "foo.bar", which is not at all what was wanted. This
+! * seems to happen only when renaming files with three-character
+! * extensions by appending a suffix that does not include ".".
+! * Windows NT gets it right, however, with an SFN of "FOO~1.BAR".
+! *
+! * There is another problem, which isn't really a bug but isn't right either:
+! * When renaming "abcdef~1.txt" to "abcdef~1.txt~", the short name can be
+! * "abcdef~1.txt" again. This has been reported on Windows NT 4.0 with
+! * service pack 6. Doesn't seem to happen on Windows 98.
+! *
+! * Like rename(), returns 0 upon success, non-zero upon failure.
+! * Should probably set errno appropriately when errors occur.
+ */
+ int
+ mch_wrename(WCHAR *wold, WCHAR *wnew)
+***************
+*** 6602,6607 ****
+--- 6353,6360 ----
+ WCHAR szNewPath[_MAX_PATH + 1];
+ HANDLE hf;
+
++ // No need to play tricks unless the file name contains a "~" as the
++ // seventh character.
+ p = wold;
+ for (i = 0; wold[i] != NUL; ++i)
+ if ((wold[i] == '/' || wold[i] == '\\' || wold[i] == ':')
+***************
+*** 6610,6642 ****
+--- 6363,6414 ----
+ if ((int)(wold + i - p) < 8 || p[6] != '~')
+ return (MoveFileW(wold, wnew) == 0);
+
++ // Get base path of new file name. Undocumented feature: If pszNewFile is
++ // a directory, no error is returned and pszFilePart will be NULL.
+ if (GetFullPathNameW(wnew, _MAX_PATH, szNewPath, &p) == 0 || p == NULL)
+ return -1;
+ *p = NUL;
+
++ // Get (and create) a unique temporary file name in directory of new file
+ if (GetTempFileNameW(szNewPath, L"VIM", 0, szTempFile) == 0)
+ return -2;
+
++ // blow the temp file away
+ if (!DeleteFileW(szTempFile))
+ return -3;
+
++ // rename old file to the temp file
+ if (!MoveFileW(wold, szTempFile))
+ return -4;
+
++ // now create an empty file called pszOldFile; this prevents the operating
++ // system using pszOldFile as an alias (SFN) if we're renaming within the
++ // same directory. For example, we're editing a file called
++ // filename.asc.txt by its SFN, filena~1.txt. If we rename filena~1.txt
++ // to filena~1.txt~ (i.e., we're making a backup while writing it), the
++ // SFN for filena~1.txt~ will be filena~1.txt, by default, which will
++ // cause all sorts of problems later in buf_write(). So, we create an
++ // empty file called filena~1.txt and the system will have to find some
++ // other SFN for filena~1.txt~, such as filena~2.txt
+ if ((hf = CreateFileW(wold, GENERIC_WRITE, 0, NULL, CREATE_NEW,
+ FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE)
+ return -5;
+ if (!CloseHandle(hf))
+ return -6;
+
++ // rename the temp file to the new file
+ if (!MoveFileW(szTempFile, wnew))
+ {
++ // Renaming failed. Rename the file back to its old name, so that it
++ // looks like nothing happened.
+ (void)MoveFileW(szTempFile, wold);
+ return -7;
+ }
+
++ // Seems to be left around on Novell filesystems
+ DeleteFileW(szTempFile);
+
++ // finally, remove the empty old file
+ if (!DeleteFileW(wold))
+ return -8;
+
+***************
+*** 6645,6753 ****
+
+
+ /*
+! * mch_rename() works around a bug in rename (aka MoveFile) in
+! * Windows 95: rename("foo.bar", "foo.bar~") will generate a
+! * file whose short file name is "FOO.BAR" (its long file name will
+! * be correct: "foo.bar~"). Because a file can be accessed by
+! * either its SFN or its LFN, "foo.bar" has effectively been
+! * renamed to "foo.bar", which is not at all what was wanted. This
+! * seems to happen only when renaming files with three-character
+! * extensions by appending a suffix that does not include ".".
+! * Windows NT gets it right, however, with an SFN of "FOO~1.BAR".
+! *
+! * There is another problem, which isn't really a bug but isn't right either:
+! * When renaming "abcdef~1.txt" to "abcdef~1.txt~", the short name can be
+! * "abcdef~1.txt" again. This has been reported on Windows NT 4.0 with
+! * service pack 6. Doesn't seem to happen on Windows 98.
+! *
+ * Like rename(), returns 0 upon success, non-zero upon failure.
+- * Should probably set errno appropriately when errors occur.
+ */
+ int
+ mch_rename(
+ const char *pszOldFile,
+ const char *pszNewFile)
+ {
+- char szTempFile[_MAX_PATH+1];
+- char szNewPath[_MAX_PATH+1];
+- char *pszFilePart;
+- HANDLE hf;
+ WCHAR *wold = NULL;
+ WCHAR *wnew = NULL;
+ int retval = -1;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! wold = enc_to_utf16((char_u *)pszOldFile, NULL);
+! wnew = enc_to_utf16((char_u *)pszNewFile, NULL);
+! if (wold != NULL && wnew != NULL)
+! retval = mch_wrename(wold, wnew);
+! vim_free(wold);
+! vim_free(wnew);
+! return retval;
+! }
+!
+! /*
+! * No need to play tricks unless the file name contains a "~" as the
+! * seventh character.
+! */
+! pszFilePart = (char *)gettail((char_u *)pszOldFile);
+! if (STRLEN(pszFilePart) < 8 || pszFilePart[6] != '~')
+! return rename(pszOldFile, pszNewFile);
+!
+! /* Get base path of new file name. Undocumented feature: If pszNewFile is
+! * a directory, no error is returned and pszFilePart will be NULL. */
+! if (GetFullPathName(pszNewFile, _MAX_PATH, szNewPath, &pszFilePart) == 0
+! || pszFilePart == NULL)
+! return -1;
+! *pszFilePart = NUL;
+!
+! /* Get (and create) a unique temporary file name in directory of new file */
+! if (GetTempFileName(szNewPath, "VIM", 0, szTempFile) == 0)
+! return -2;
+!
+! /* blow the temp file away */
+! if (!DeleteFile(szTempFile))
+! return -3;
+!
+! /* rename old file to the temp file */
+! if (!MoveFile(pszOldFile, szTempFile))
+! return -4;
+!
+! /* now create an empty file called pszOldFile; this prevents the operating
+! * system using pszOldFile as an alias (SFN) if we're renaming within the
+! * same directory. For example, we're editing a file called
+! * filename.asc.txt by its SFN, filena~1.txt. If we rename filena~1.txt
+! * to filena~1.txt~ (i.e., we're making a backup while writing it), the
+! * SFN for filena~1.txt~ will be filena~1.txt, by default, which will
+! * cause all sorts of problems later in buf_write(). So, we create an
+! * empty file called filena~1.txt and the system will have to find some
+! * other SFN for filena~1.txt~, such as filena~2.txt
+! */
+! if ((hf = CreateFile(pszOldFile, GENERIC_WRITE, 0, NULL, CREATE_NEW,
+! FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE)
+! return -5;
+! if (!CloseHandle(hf))
+! return -6;
+!
+! /* rename the temp file to the new file */
+! if (!MoveFile(szTempFile, pszNewFile))
+! {
+! /* Renaming failed. Rename the file back to its old name, so that it
+! * looks like nothing happened. */
+! (void)MoveFile(szTempFile, pszOldFile);
+!
+! return -7;
+! }
+!
+! /* Seems to be left around on Novell filesystems */
+! DeleteFile(szTempFile);
+!
+! /* finally, remove the empty old file */
+! if (!DeleteFile(pszOldFile))
+! return -8;
+!
+! return 0; /* success */
+ }
+
+ /*
+--- 6417,6441 ----
+
+
+ /*
+! * Converts the filenames to UTF-16, then call mch_wrename().
+ * Like rename(), returns 0 upon success, non-zero upon failure.
+ */
+ int
+ mch_rename(
+ const char *pszOldFile,
+ const char *pszNewFile)
+ {
+ WCHAR *wold = NULL;
+ WCHAR *wnew = NULL;
+ int retval = -1;
+
+! wold = enc_to_utf16((char_u *)pszOldFile, NULL);
+! wnew = enc_to_utf16((char_u *)pszNewFile, NULL);
+! if (wold != NULL && wnew != NULL)
+! retval = mch_wrename(wold, wnew);
+! vim_free(wold);
+! vim_free(wnew);
+! return retval;
+ }
+
+ /*
+***************
+*** 6768,6822 ****
+ {
+ HANDLE hFile;
+ int retval = -1; /* default: fail */
+! WCHAR *wn = NULL;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! wn = enc_to_utf16((char_u *)n, NULL);
+
+ if (mch_isdir((char_u *)n))
+ {
+- char TempName[_MAX_PATH + 16] = "";
+ WCHAR TempNameW[_MAX_PATH + 16] = L"";
+
+ if (p & R_OK)
+ {
+ /* Read check is performed by seeing if we can do a find file on
+ * the directory for any file. */
+! if (wn != NULL)
+! {
+! int i;
+! WIN32_FIND_DATAW d;
+
+! for (i = 0; i < _MAX_PATH && wn[i] != 0; ++i)
+! TempNameW[i] = wn[i];
+! if (TempNameW[i - 1] != '\\' && TempNameW[i - 1] != '/')
+! TempNameW[i++] = '\\';
+! TempNameW[i++] = '*';
+! TempNameW[i++] = 0;
+!
+! hFile = FindFirstFileW(TempNameW, &d);
+! if (hFile == INVALID_HANDLE_VALUE)
+! goto getout;
+! else
+! (void)FindClose(hFile);
+! }
+ else
+- {
+- char *pch;
+- WIN32_FIND_DATA d;
+-
+- vim_strncpy((char_u *)TempName, (char_u *)n, _MAX_PATH);
+- pch = TempName + STRLEN(TempName) - 1;
+- if (*pch != '\\' && *pch != '/')
+- *++pch = '\\';
+- *++pch = '*';
+- *++pch = NUL;
+-
+- hFile = FindFirstFile(TempName, &d);
+- if (hFile == INVALID_HANDLE_VALUE)
+- goto getout;
+ (void)FindClose(hFile);
+- }
+ }
+
+ if (p & W_OK)
+--- 6456,6490 ----
+ {
+ HANDLE hFile;
+ int retval = -1; /* default: fail */
+! WCHAR *wn;
+
+! wn = enc_to_utf16((char_u *)n, NULL);
+! if (wn == NULL)
+! return -1;
+
+ if (mch_isdir((char_u *)n))
+ {
+ WCHAR TempNameW[_MAX_PATH + 16] = L"";
+
+ if (p & R_OK)
+ {
+ /* Read check is performed by seeing if we can do a find file on
+ * the directory for any file. */
+! int i;
+! WIN32_FIND_DATAW d;
+
+! for (i = 0; i < _MAX_PATH && wn[i] != 0; ++i)
+! TempNameW[i] = wn[i];
+! if (TempNameW[i - 1] != '\\' && TempNameW[i - 1] != '/')
+! TempNameW[i++] = '\\';
+! TempNameW[i++] = '*';
+! TempNameW[i++] = 0;
+!
+! hFile = FindFirstFileW(TempNameW, &d);
+! if (hFile == INVALID_HANDLE_VALUE)
+! goto getout;
+ else
+ (void)FindClose(hFile);
+ }
+
+ if (p & W_OK)
+***************
+*** 6825,6843 ****
+ * directories on read-only network shares. However, in
+ * directories whose ACL allows writes but denies deletes will end
+ * up keeping the temporary file :-(. */
+! if (wn != NULL)
+! {
+! if (!GetTempFileNameW(wn, L"VIM", 0, TempNameW))
+! goto getout;
+! else
+! DeleteFileW(TempNameW);
+! }
+ else
+! {
+! if (!GetTempFileName(n, "VIM", 0, TempName))
+! goto getout;
+! mch_remove((char_u *)TempName);
+! }
+ }
+ }
+ else
+--- 6493,6502 ----
+ * directories on read-only network shares. However, in
+ * directories whose ACL allows writes but denies deletes will end
+ * up keeping the temporary file :-(. */
+! if (!GetTempFileNameW(wn, L"VIM", 0, TempNameW))
+! goto getout;
+ else
+! DeleteFileW(TempNameW);
+ }
+ }
+ else
+***************
+*** 6850,6861 ****
+ DWORD access_mode = ((p & W_OK) ? GENERIC_WRITE : 0)
+ | ((p & R_OK) ? GENERIC_READ : 0);
+
+! if (wn != NULL)
+! hFile = CreateFileW(wn, access_mode, share_mode,
+! NULL, OPEN_EXISTING, 0, NULL);
+! else
+! hFile = CreateFile(n, access_mode, share_mode,
+! NULL, OPEN_EXISTING, 0, NULL);
+ if (hFile == INVALID_HANDLE_VALUE)
+ goto getout;
+ CloseHandle(hFile);
+--- 6509,6516 ----
+ DWORD access_mode = ((p & W_OK) ? GENERIC_WRITE : 0)
+ | ((p & R_OK) ? GENERIC_READ : 0);
+
+! hFile = CreateFileW(wn, access_mode, share_mode,
+! NULL, OPEN_EXISTING, 0, NULL);
+ if (hFile == INVALID_HANDLE_VALUE)
+ goto getout;
+ CloseHandle(hFile);
+***************
+*** 6878,6895 ****
+ WCHAR *wn;
+ int f;
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! wn = enc_to_utf16((char_u *)name, NULL);
+! if (wn != NULL)
+! {
+! f = _wopen(wn, flags, mode);
+! vim_free(wn);
+! return f;
+! }
+! }
+! #endif
+
+ /* open() can open a file which name is longer than _MAX_PATH bytes
+ * and shorter than _MAX_PATH characters successfully, but sometimes it
+ * causes unexpected error in another part. We make it an error explicitly
+--- 6533,6546 ----
+ WCHAR *wn;
+ int f;
+
+! wn = enc_to_utf16((char_u *)name, NULL);
+! if (wn == NULL)
+! return -1;
+
++ f = _wopen(wn, flags, mode);
++ vim_free(wn);
++ return f;
++ #else
+ /* open() can open a file which name is longer than _MAX_PATH bytes
+ * and shorter than _MAX_PATH characters successfully, but sometimes it
+ * causes unexpected error in another part. We make it an error explicitly
+***************
+*** 6898,6907 ****
+ return -1;
+
+ return open(name, flags, mode);
+ }
+
+ /*
+! * Version of fopen() that may use UTF-16 file name.
+ */
+ FILE *
+ mch_fopen(const char *name, const char *mode)
+--- 6549,6559 ----
+ return -1;
+
+ return open(name, flags, mode);
++ #endif
+ }
+
+ /*
+! * Version of fopen() that uses UTF-16 file name.
+ */
+ FILE *
+ mch_fopen(const char *name, const char *mode)
+***************
+*** 6909,6949 ****
+ WCHAR *wn, *wm;
+ FILE *f = NULL;
+
+- if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+- {
+ #if defined(DEBUG) && _MSC_VER >= 1400
+! /* Work around an annoying assertion in the Microsoft debug CRT
+! * when mode's text/binary setting doesn't match _get_fmode(). */
+! char newMode = mode[strlen(mode) - 1];
+! int oldMode = 0;
+!
+! _get_fmode(&oldMode);
+! if (newMode == 't')
+! _set_fmode(_O_TEXT);
+! else if (newMode == 'b')
+! _set_fmode(_O_BINARY);
+! #endif
+! wn = enc_to_utf16((char_u *)name, NULL);
+! wm = enc_to_utf16((char_u *)mode, NULL);
+! if (wn != NULL && wm != NULL)
+! f = _wfopen(wn, wm);
+! vim_free(wn);
+! vim_free(wm);
+
+ #if defined(DEBUG) && _MSC_VER >= 1400
+! _set_fmode(oldMode);
+ #endif
+! return f;
+! }
+!
+! /* fopen() can open a file which name is longer than _MAX_PATH bytes
+! * and shorter than _MAX_PATH characters successfully, but sometimes it
+! * causes unexpected error in another part. We make it an error explicitly
+! * here. */
+! if (strlen(name) >= _MAX_PATH)
+! return NULL;
+!
+! return fopen(name, mode);
+ }
+
+ /*
+--- 6561,6589 ----
+ WCHAR *wn, *wm;
+ FILE *f = NULL;
+
+ #if defined(DEBUG) && _MSC_VER >= 1400
+! /* Work around an annoying assertion in the Microsoft debug CRT
+! * when mode's text/binary setting doesn't match _get_fmode(). */
+! char newMode = mode[strlen(mode) - 1];
+! int oldMode = 0;
+!
+! _get_fmode(&oldMode);
+! if (newMode == 't')
+! _set_fmode(_O_TEXT);
+! else if (newMode == 'b')
+! _set_fmode(_O_BINARY);
+! #endif
+! wn = enc_to_utf16((char_u *)name, NULL);
+! wm = enc_to_utf16((char_u *)mode, NULL);
+! if (wn != NULL && wm != NULL)
+! f = _wfopen(wn, wm);
+! vim_free(wn);
+! vim_free(wm);
+
+ #if defined(DEBUG) && _MSC_VER >= 1400
+! _set_fmode(oldMode);
+ #endif
+! return f;
+ }
+
+ /*
+***************
+*** 7418,7423 ****
+--- 7058,7064 ----
+ mch_setenv(char *var, char *value, int x)
+ {
+ char_u *envbuf;
++ WCHAR *p;
+
+ envbuf = alloc((unsigned)(STRLEN(var) + STRLEN(value) + 2));
+ if (envbuf == NULL)
+***************
+*** 7425,7453 ****
+
+ sprintf((char *)envbuf, "%s=%s", var, value);
+
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *p = enc_to_utf16(envbuf, NULL);
+
+! vim_free(envbuf);
+! if (p == NULL)
+! return -1;
+! _wputenv(p);
+ #ifdef libintl_wputenv
+! libintl_wputenv(p);
+ #endif
+! /* Unlike Un*x systems, we can free the string for _wputenv(). */
+! vim_free(p);
+! }
+! else
+! {
+! _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);
+! }
+
+ return 0;
+ }
+--- 7066,7082 ----
+
+ sprintf((char *)envbuf, "%s=%s", var, value);
+
+! p = enc_to_utf16(envbuf, NULL);
+
+! vim_free(envbuf);
+! if (p == NULL)
+! return -1;
+! _wputenv(p);
+ #ifdef libintl_wputenv
+! libintl_wputenv(p);
+ #endif
+! // Unlike Un*x systems, we can free the string for _wputenv().
+! vim_free(p);
+
+ return 0;
+ }
+*** ../vim-8.1.1102/src/vim.h 2019-02-19 21:24:50.559543423 +0100
+--- src/vim.h 2019-04-02 22:04:17.789655489 +0200
+***************
+*** 536,542 ****
+ extern char *(*dyn_libintl_bindtextdomain)(const char *domainname, const char *dirname);
+ extern char *(*dyn_libintl_bind_textdomain_codeset)(const char *domainname, const char *codeset);
+ extern char *(*dyn_libintl_textdomain)(const char *domainname);
+! extern int (*dyn_libintl_putenv)(const char *envstring);
+ #endif
+
+
+--- 536,542 ----
+ extern char *(*dyn_libintl_bindtextdomain)(const char *domainname, const char *dirname);
+ extern char *(*dyn_libintl_bind_textdomain_codeset)(const char *domainname, const char *codeset);
+ extern char *(*dyn_libintl_textdomain)(const char *domainname);
+! extern int (*dyn_libintl_wputenv)(const wchar_t *envstring);
+ #endif
+
+
+***************
+*** 559,565 ****
+ # define HAVE_BIND_TEXTDOMAIN_CODESET 1
+ # endif
+ # define textdomain(domain) (*dyn_libintl_textdomain)(domain)
+- # define libintl_putenv(envstring) (*dyn_libintl_putenv)(envstring)
+ # define libintl_wputenv(envstring) (*dyn_libintl_wputenv)(envstring)
+ # else
+ # include <libintl.h>
+--- 559,564 ----
+*** ../vim-8.1.1102/src/version.c 2019-04-02 22:02:28.606347252 +0200
+--- src/version.c 2019-04-02 22:05:50.325066421 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1103,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+183. You move your coffeemaker next to your 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.1104 b/data/vim/patches/8.1.1104
new file mode 100644
index 000000000..5bb4bd0ac
--- /dev/null
+++ b/data/vim/patches/8.1.1104
@@ -0,0 +1,239 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1104
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1104
+Problem: MS-Windows: not all environment variables can be used.
+Solution: Use the wide version of WinMain() and main(). (Ken Takata,
+ closes #4206)
+Files: src/Make_cyg.mak, src/Make_cyg_ming.mak, src/Make_mvc.mak,
+ src/main.c, src/os_w32exe.c
+
+
+*** ../vim-8.1.1103/src/Make_cyg.mak 2017-09-23 19:38:55.000000000 +0200
+--- src/Make_cyg.mak 2019-04-03 20:28:04.221969137 +0200
+***************
+*** 37,49 ****
+ #RUBY=/cygdribe/c/ruby
+
+
+! # Use MinGW(-w64) cross compiler.
+! # There are three MinGW packages in Cygwin:
+! # 32-bit: mingw-gcc-g++ and mingw64-i686-gcc-g++
+ # 64-bit: mingw64-x86_64-gcc-g++
+ # You may also need to set 'ARCH' in Make_cyg_ming.mak.
+! CROSS_COMPILE = i686-pc-mingw32-
+! #CROSS_COMPILE = i686-w64-mingw32-
+ #CROSS_COMPILE = x86_64-w64-mingw32-
+
+
+--- 37,48 ----
+ #RUBY=/cygdribe/c/ruby
+
+
+! # Use MinGW-w64 cross compiler.
+! # There are two MinGW-w64 packages in Cygwin:
+! # 32-bit: mingw64-i686-gcc-g++
+ # 64-bit: mingw64-x86_64-gcc-g++
+ # You may also need to set 'ARCH' in Make_cyg_ming.mak.
+! CROSS_COMPILE = i686-w64-mingw32-
+ #CROSS_COMPILE = x86_64-w64-mingw32-
+
+
+*** ../vim-8.1.1103/src/Make_cyg_ming.mak 2019-03-30 13:53:26.166425144 +0100
+--- src/Make_cyg_ming.mak 2019-04-03 20:28:04.221969137 +0200
+***************
+*** 691,697 ****
+ endif
+
+ LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion
+! GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o $(OUTDIR)/os_w32exe.o
+ CUIOBJ = $(OUTDIR)/iscygpty.o
+ OBJ = \
+ $(OUTDIR)/arabic.o \
+--- 691,697 ----
+ endif
+
+ LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion
+! GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o
+ CUIOBJ = $(OUTDIR)/iscygpty.o
+ OBJ = \
+ $(OUTDIR)/arabic.o \
+***************
+*** 737,745 ****
+ $(OUTDIR)/normal.o \
+ $(OUTDIR)/ops.o \
+ $(OUTDIR)/option.o \
+- $(OUTDIR)/os_win32.o \
+ $(OUTDIR)/os_mswin.o \
+! $(OUTDIR)/winclip.o \
+ $(OUTDIR)/pathdef.o \
+ $(OUTDIR)/popupmnu.o \
+ $(OUTDIR)/quickfix.o \
+--- 737,745 ----
+ $(OUTDIR)/normal.o \
+ $(OUTDIR)/ops.o \
+ $(OUTDIR)/option.o \
+ $(OUTDIR)/os_mswin.o \
+! $(OUTDIR)/os_w32exe.o \
+! $(OUTDIR)/os_win32.o \
+ $(OUTDIR)/pathdef.o \
+ $(OUTDIR)/popupmnu.o \
+ $(OUTDIR)/quickfix.o \
+***************
+*** 759,764 ****
+--- 759,765 ----
+ $(OUTDIR)/userfunc.o \
+ $(OUTDIR)/version.o \
+ $(OUTDIR)/vimrc.o \
++ $(OUTDIR)/winclip.o \
+ $(OUTDIR)/window.o
+
+ ifdef PERL
+***************
+*** 865,870 ****
+--- 866,873 ----
+ MZSCHEME_SUFFIX = Z
+ endif
+
++ LFLAGS += -municode
++
+ ifeq ($(GUI),yes)
+ TARGET := gvim$(DEBUG_SUFFIX).exe
+ DEFINES += $(DEF_GUI)
+*** ../vim-8.1.1103/src/Make_mvc.mak 2019-03-30 13:53:26.166425144 +0100
+--- src/Make_mvc.mak 2019-04-03 20:28:04.221969137 +0200
+***************
+*** 742,748 ****
+ $(OUTDIR)\ops.obj \
+ $(OUTDIR)\option.obj \
+ $(OUTDIR)\os_mswin.obj \
+! $(OUTDIR)\winclip.obj \
+ $(OUTDIR)\os_win32.obj \
+ $(OUTDIR)\pathdef.obj \
+ $(OUTDIR)\popupmnu.obj \
+--- 742,748 ----
+ $(OUTDIR)\ops.obj \
+ $(OUTDIR)\option.obj \
+ $(OUTDIR)\os_mswin.obj \
+! $(OUTDIR)\os_w32exe.obj \
+ $(OUTDIR)\os_win32.obj \
+ $(OUTDIR)\pathdef.obj \
+ $(OUTDIR)\popupmnu.obj \
+***************
+*** 761,766 ****
+--- 761,767 ----
+ $(OUTDIR)\ui.obj \
+ $(OUTDIR)\undo.obj \
+ $(OUTDIR)\userfunc.obj \
++ $(OUTDIR)\winclip.obj \
+ $(OUTDIR)\window.obj \
+ $(OUTDIR)\vim.res
+
+***************
+*** 799,806 ****
+ GUI_OBJ = \
+ $(OUTDIR)\gui.obj \
+ $(OUTDIR)\gui_beval.obj \
+! $(OUTDIR)\gui_w32.obj \
+! $(OUTDIR)\os_w32exe.obj
+ GUI_LIB = \
+ gdi32.lib version.lib $(IME_LIB) \
+ winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib \
+--- 800,806 ----
+ GUI_OBJ = \
+ $(OUTDIR)\gui.obj \
+ $(OUTDIR)\gui_beval.obj \
+! $(OUTDIR)\gui_w32.obj
+ GUI_LIB = \
+ gdi32.lib version.lib $(IME_LIB) \
+ winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib \
+*** ../vim-8.1.1103/src/main.c 2019-03-28 22:43:12.103997449 +0100
+--- src/main.c 2019-04-03 20:28:04.225969114 +0200
+***************
+*** 96,102 ****
+ static int has_dash_c_arg = FALSE;
+
+ int
+! # ifdef FEAT_GUI_MSWIN
+ # ifdef __BORLANDC__
+ _cdecl
+ # endif
+--- 96,102 ----
+ static int has_dash_c_arg = FALSE;
+
+ int
+! # ifdef MSWIN
+ # ifdef __BORLANDC__
+ _cdecl
+ # endif
+*** ../vim-8.1.1103/src/os_w32exe.c 2019-04-02 22:02:28.606347252 +0200
+--- src/os_w32exe.c 2019-04-03 20:28:04.225969114 +0200
+***************
+*** 28,47 ****
+ #endif
+
+ #ifndef PROTO
+ int WINAPI
+! WinMain(
+ HINSTANCE hInstance,
+ HINSTANCE hPrevInst UNUSED,
+! LPSTR lpszCmdLine UNUSED,
+ int nCmdShow UNUSED)
+ {
+- int argc = 0;
+- char **argv = NULL;
+-
+ # ifdef FEAT_GUI
+ SaveInst(hInstance);
+ # endif
+! VimMain(argc, argv);
+
+ return 0;
+ }
+--- 28,49 ----
+ #endif
+
+ #ifndef PROTO
++ # ifdef FEAT_GUI
+ int WINAPI
+! wWinMain(
+ HINSTANCE hInstance,
+ HINSTANCE hPrevInst UNUSED,
+! LPWSTR lpszCmdLine UNUSED,
+ int nCmdShow UNUSED)
++ # else
++ int
++ wmain(int argc UNUSED, wchar_t **argv UNUSED)
++ # endif
+ {
+ # ifdef FEAT_GUI
+ SaveInst(hInstance);
+ # endif
+! VimMain(0, NULL);
+
+ return 0;
+ }
+*** ../vim-8.1.1103/src/version.c 2019-04-02 22:15:51.348273497 +0200
+--- src/version.c 2019-04-03 20:27:55.890015117 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1104,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+186. You overstay in the office so you can have more time surfing the net.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1105 b/data/vim/patches/8.1.1105
new file mode 100644
index 000000000..cae02b6c8
--- /dev/null
+++ b/data/vim/patches/8.1.1105
@@ -0,0 +1,133 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1105
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1105
+Problem: Long escape sequences may be split up.
+Solution: Assume esccape sequences can be up to 80 bytes long. (Nobuhiro
+ Takasaki, closes #4196)
+Files: src/term.c
+
+
+*** ../vim-8.1.1104/src/term.c 2019-03-30 22:11:17.534968563 +0100
+--- src/term.c 2019-04-03 20:43:35.324955447 +0200
+***************
+*** 2538,2549 ****
+ }
+
+ /*
+! * the number of calls to ui_write is reduced by using the buffer "out_buf"
+ */
+ #define OUT_SIZE 2047
+! /* Add one to allow mch_write() in os_win32.c to append a NUL */
+ static char_u out_buf[OUT_SIZE + 1];
+! static int out_pos = 0; /* number of chars in out_buf */
+
+ /*
+ * out_flush(): flush the output buffer
+--- 2538,2555 ----
+ }
+
+ /*
+! * The number of calls to ui_write is reduced by using "out_buf".
+ */
+ #define OUT_SIZE 2047
+!
+! // add one to allow mch_write() in os_win32.c to append a NUL
+ static char_u out_buf[OUT_SIZE + 1];
+!
+! static int out_pos = 0; // number of chars in out_buf
+!
+! // Since the maximum number of SGR parameters shown as a normal value range is
+! // 16, the escape sequence length can be 4 * 16 + lead + tail.
+! #define MAX_ESC_SEQ_LEN 80
+
+ /*
+ * out_flush(): flush the output buffer
+***************
+*** 2660,2671 ****
+ void
+ out_str_nf(char_u *s)
+ {
+! if (out_pos > OUT_SIZE - 20) /* avoid terminal strings being split up */
+ out_flush();
+ while (*s)
+ out_char_nf(*s++);
+
+! /* For testing we write one string at a time. */
+ if (p_wd)
+ out_flush();
+ }
+--- 2666,2679 ----
+ void
+ out_str_nf(char_u *s)
+ {
+! // avoid terminal strings being split up
+! if (out_pos > OUT_SIZE - MAX_ESC_SEQ_LEN)
+ out_flush();
++
+ while (*s)
+ out_char_nf(*s++);
+
+! // For testing we write one string at a time.
+ if (p_wd)
+ out_flush();
+ }
+***************
+*** 2694,2700 ****
+ return;
+ }
+ #endif
+! if (out_pos > OUT_SIZE - 20)
+ out_flush();
+ #ifdef HAVE_TGETENT
+ for (p = s; *s; ++s)
+--- 2702,2708 ----
+ return;
+ }
+ #endif
+! if (out_pos > OUT_SIZE - MAX_ESC_SEQ_LEN)
+ out_flush();
+ #ifdef HAVE_TGETENT
+ for (p = s; *s; ++s)
+***************
+*** 2762,2768 ****
+ }
+ #endif
+ /* avoid terminal strings being split up */
+! if (out_pos > OUT_SIZE - 20)
+ out_flush();
+ #ifdef HAVE_TGETENT
+ tputs((char *)s, 1, TPUTSFUNCAST out_char_nf);
+--- 2770,2776 ----
+ }
+ #endif
+ /* avoid terminal strings being split up */
+! if (out_pos > OUT_SIZE - MAX_ESC_SEQ_LEN)
+ out_flush();
+ #ifdef HAVE_TGETENT
+ tputs((char *)s, 1, TPUTSFUNCAST out_char_nf);
+*** ../vim-8.1.1104/src/version.c 2019-04-03 20:30:56.085017544 +0200
+--- src/version.c 2019-04-03 20:38:21.846531027 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1105,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+187. You promise yourself that you'll only stay online for another
+ 15 minutes...at least once every 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.1106 b/data/vim/patches/8.1.1106
new file mode 100644
index 000000000..daca010ff
--- /dev/null
+++ b/data/vim/patches/8.1.1106
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1106
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1106
+Problem: No test for 'writedelay'.
+Solution: Add a test.
+Files: src/testdir/test_options.vim
+
+
+*** ../vim-8.1.1105/src/testdir/test_options.vim 2019-01-31 18:26:05.742803481 +0100
+--- src/testdir/test_options.vim 2019-04-03 21:41:55.649964073 +0200
+***************
+*** 518,520 ****
+--- 518,540 ----
+ set so&
+ set siso&
+ endfunc
++
++ func Test_writedelay()
++ if !has('reltime')
++ return
++ endif
++ new
++ call setline(1, 'empty')
++ redraw
++ set writedelay=10
++ let start = reltime()
++ call setline(1, repeat('x', 70))
++ redraw
++ let elapsed = reltimefloat(reltime(start))
++ set writedelay=0
++ " With 'writedelay' set should take at least 30 * 10 msec
++ call assert_inrange(30 * 0.01, 999.0, elapsed)
++
++ bwipe!
++ delfunc ChangeText
++ endfunc
+*** ../vim-8.1.1105/src/version.c 2019-04-03 21:15:54.802752719 +0200
+--- src/version.c 2019-04-03 21:41:14.466191300 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1106,
+ /**/
+
+--
+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.1107 b/data/vim/patches/8.1.1107
new file mode 100644
index 000000000..1ed6f08fe
--- /dev/null
+++ b/data/vim/patches/8.1.1107
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1107
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1107
+Problem: No test for 'visualbell'.
+Solution: Add a test.
+Files: src/testdir/test_options.vim
+
+
+*** ../vim-8.1.1106/src/testdir/test_options.vim 2019-04-03 21:42:30.997769093 +0200
+--- src/testdir/test_options.vim 2019-04-03 21:51:24.743154720 +0200
+***************
+*** 536,540 ****
+ call assert_inrange(30 * 0.01, 999.0, elapsed)
+
+ bwipe!
+! delfunc ChangeText
+ endfunc
+--- 536,545 ----
+ call assert_inrange(30 * 0.01, 999.0, elapsed)
+
+ bwipe!
+! endfunc
+!
+! func Test_visualbell()
+! set visualbell
+! call assert_beeps('normal 0h')
+! set novisualbell
+ endfunc
+*** ../vim-8.1.1106/src/version.c 2019-04-03 21:42:31.001769069 +0200
+--- src/version.c 2019-04-03 21:52:26.590930963 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1107,
+ /**/
+
+--
+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.1108 b/data/vim/patches/8.1.1108
new file mode 100644
index 000000000..b85a0d76c
--- /dev/null
+++ b/data/vim/patches/8.1.1108
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1108
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1108
+Problem: Test for 'visualbell' doesn't work.
+Solution: Make 'belloff' empty.
+Files: src/testdir/test_options.vim
+
+
+*** ../vim-8.1.1107/src/testdir/test_options.vim 2019-04-03 21:53:30.170689219 +0200
+--- src/testdir/test_options.vim 2019-04-03 22:50:59.985375441 +0200
+***************
+*** 539,545 ****
+--- 539,547 ----
+ endfunc
+
+ func Test_visualbell()
++ set belloff=
+ set visualbell
+ call assert_beeps('normal 0h')
+ set novisualbell
++ set belloff=all
+ endfunc
+*** ../vim-8.1.1107/src/version.c 2019-04-03 21:53:30.170689219 +0200
+--- src/version.c 2019-04-03 22:51:58.761068995 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1108,
+ /**/
+
+--
+I'm in shape. Round IS a shape.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1109 b/data/vim/patches/8.1.1109
new file mode 100644
index 000000000..f26ec1cfa
--- /dev/null
+++ b/data/vim/patches/8.1.1109
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1109
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1109
+Problem: Deleted file still in list of distributed files.
+Solution: Remove the src/os_w32dll.c entry.
+Files: Filelist
+
+
+*** ../vim-8.1.1108/Filelist 2019-03-30 13:53:26.166425144 +0100
+--- Filelist 2019-04-04 13:09:46.925402636 +0200
+***************
+*** 450,456 ****
+ src/iscygpty.h \
+ src/iid_ole.c \
+ src/os_dos.h \
+- src/os_w32dll.c \
+ src/os_w32exe.c \
+ src/os_win32.c \
+ src/os_mswin.c \
+--- 450,455 ----
+*** ../vim-8.1.1108/src/version.c 2019-04-03 22:52:30.112905530 +0200
+--- src/version.c 2019-04-04 13:11:54.764499309 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1109,
+ /**/
+
+--
+What is the difference between a professional and an amateur?
+The ark was built by an amateur; professionals gave us the Titanic.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1110 b/data/vim/patches/8.1.1110
new file mode 100644
index 000000000..b8f33f7ef
--- /dev/null
+++ b/data/vim/patches/8.1.1110
@@ -0,0 +1,189 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1110
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1110
+Problem: Composing chars on space wrong when 'listchars' is set.
+Solution: Do not use "space" and "nbsp" entries of 'listchars' when there is
+ a composing character. (Yee Cheng Chin, closes #4197)
+Files: src/screen.c, src/testdir/test_listchars.vim
+
+
+*** ../vim-8.1.1109/src/screen.c 2019-03-30 18:46:57.360077328 +0100
+--- src/screen.c 2019-04-04 13:20:05.804978752 +0200
+***************
+*** 4808,4841 ****
+ }
+ #endif
+
+! // 'list': change char 160 to lcs_nbsp and space to lcs_space.
+! if (wp->w_p_list)
+ {
+! if ((c == 160
+! || (mb_utf8 && (mb_c == 160 || mb_c == 0x202f)))
+! && lcs_nbsp)
+ {
+! c = lcs_nbsp;
+! mb_c = c;
+! if (enc_utf8 && utf_char2len(c) > 1)
+! {
+! mb_utf8 = TRUE;
+! u8cc[0] = 0;
+! c = 0xc0;
+! }
+! else
+! mb_utf8 = FALSE;
+ }
+! else if (c == ' ' && lcs_space && ptr - line <= trailcol)
+ {
+! c = lcs_space;
+! if (mb_utf8 == FALSE && area_attr == 0 && search_attr == 0)
+! {
+! n_attr = 1;
+! extra_attr = HL_ATTR(HLF_8);
+! saved_attr2 = char_attr; // save current attr
+! }
+ }
+ }
+
+ if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
+--- 4808,4843 ----
+ }
+ #endif
+
+! // 'list': Change char 160 to lcs_nbsp and space to lcs_space.
+! // But not when the character is followed by a composing
+! // character (use mb_l to check that).
+! if (wp->w_p_list
+! && ((((c == 160 && mb_l == 1)
+! || (mb_utf8
+! && ((mb_c == 160 && mb_l == 2)
+! || (mb_c == 0x202f && mb_l == 3))))
+! && lcs_nbsp)
+! || (c == ' '
+! && mb_l == 1
+! && lcs_space
+! && ptr - line <= trailcol)))
+ {
+! c = (c == ' ') ? lcs_space : lcs_nbsp;
+! if (area_attr == 0 && search_attr == 0)
+ {
+! n_attr = 1;
+! extra_attr = HL_ATTR(HLF_8);
+! saved_attr2 = char_attr; /* save current attr */
+ }
+! mb_c = c;
+! if (enc_utf8 && utf_char2len(c) > 1)
+ {
+! mb_utf8 = TRUE;
+! u8cc[0] = 0;
+! c = 0xc0;
+ }
++ else
++ mb_utf8 = FALSE;
+ }
+
+ if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
+*** ../vim-8.1.1109/src/testdir/test_listchars.vim 2019-03-30 15:44:14.023783571 +0100
+--- src/testdir/test_listchars.vim 2019-04-04 13:14:10.463479095 +0200
+***************
+*** 114,119 ****
+--- 114,146 ----
+ set listchars& ff&
+ endfunc
+
++ " Test that unicode listchars characters get properly inserted
++ func Test_listchars_unicode()
++ enew!
++ let oldencoding=&encoding
++ set encoding=utf-8
++ set ff=unix
++
++ set listchars=eol:⇔,space:␣,nbsp:≠,tab:←↔→
++ set list
++
++ let nbsp = nr2char(0xa0)
++ call append(0, [
++ \ "a\tb c".nbsp."d"
++ \ ])
++ let expected = [
++ \ 'a←↔↔↔↔↔→b␣c≠d⇔'
++ \ ]
++ redraw!
++ call cursor(1, 1)
++ call assert_equal(expected, ScreenLines(1, virtcol('$')))
++ let &encoding=oldencoding
++ enew!
++ set listchars& ff&
++ endfunction
++
++ " Tests that space characters following composing character won't get replaced
++ " by listchars.
+ func Test_listchars_composing()
+ enew!
+ let oldencoding=&encoding
+***************
+*** 121,138 ****
+ set ff=unix
+ set list
+
+! set listchars=eol:$,space:_
+ call append(0, [
+! \ " \u3099 \u309A"
+ \ ])
+ let expected = [
+! \ "_ \u3099^I \u309A$"
+ \ ]
+ redraw!
+ call cursor(1, 1)
+! let got = ScreenLines(1, virtcol('$'))
+! bw!
+! call assert_equal(expected, got)
+ let &encoding=oldencoding
+ set listchars& ff&
+ endfunction
+--- 148,167 ----
+ set ff=unix
+ set list
+
+! set listchars=eol:$,space:_,nbsp:=
+!
+! let nbsp1 = nr2char(0xa0)
+! let nbsp2 = nr2char(0x202f)
+ call append(0, [
+! \ " \u3099\t \u309A".nbsp1.nbsp1."\u0302".nbsp2.nbsp2."\u0302",
+ \ ])
+ let expected = [
+! \ "_ \u3099^I \u309A=".nbsp1."\u0302=".nbsp2."\u0302$"
+ \ ]
+ redraw!
+ call cursor(1, 1)
+! call assert_equal(expected, ScreenLines(1, virtcol('$')))
+ let &encoding=oldencoding
++ enew!
+ set listchars& ff&
+ endfunction
+*** ../vim-8.1.1109/src/version.c 2019-04-04 13:12:03.688430723 +0200
+--- src/version.c 2019-04-04 13:27:53.489896954 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1110,
+ /**/
+
+--
+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.1111 b/data/vim/patches/8.1.1111
new file mode 100644
index 000000000..663aebf89
--- /dev/null
+++ b/data/vim/patches/8.1.1111
@@ -0,0 +1,164 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1111
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1111
+Problem: It is not easy to check for infinity.
+Solution: Add isinf(). (Ozaki Kiichi, closes #3787)
+Files: runtime/doc/eval.txt, src/evalfunc.c,
+ src/testdir/test_float_func.vim
+
+
+*** ../vim-8.1.1110/runtime/doc/eval.txt 2019-03-30 18:10:57.649082383 +0100
+--- runtime/doc/eval.txt 2019-04-04 13:41:14.644823418 +0200
+***************
+*** 2383,2388 ****
+--- 2411,2418 ----
+ insert({object}, {item} [, {idx}]) List insert {item} in {object} [before {idx}]
+ invert({expr}) Number bitwise invert
+ isdirectory({directory}) Number |TRUE| if {directory} is a directory
++ isinf({expr}) Number determine if {expr} is infinity value
++ (positive or negative)
+ islocked({expr}) Number |TRUE| if {expr} is locked
+ isnan({expr}) Number |TRUE| if {expr} is NaN
+ items({dict}) List key-value pairs in {dict}
+***************
+*** 5738,5743 ****
+--- 5774,5789 ----
+ exist, or isn't a directory, the result is |FALSE|. {directory}
+ is any expression, which is used as a String.
+
++ isinf({expr}) *isinf()*
++ Return 1 if {expr} is a positive infinity, or -1 a negative
++ infinity, otherwise 0. >
++ :echo isinf(1.0 / 0.0)
++ < 1 >
++ :echo isinf(-1.0 / 0.0)
++ < -1
++
++ {only available when compiled with the |+float| feature}
++
+ islocked({expr}) *islocked()* *E786*
+ The result is a Number, which is |TRUE| when {expr} is the
+ name of a locked variable.
+*** ../vim-8.1.1110/src/evalfunc.c 2019-03-30 18:46:57.344077426 +0100
+--- src/evalfunc.c 2019-04-04 13:41:14.644823418 +0200
+***************
+*** 237,242 ****
+--- 237,243 ----
+ static void f_isdirectory(typval_T *argvars, typval_T *rettv);
+ static void f_islocked(typval_T *argvars, typval_T *rettv);
+ #if defined(FEAT_FLOAT) && defined(HAVE_MATH_H)
++ static void f_isinf(typval_T *argvars, typval_T *rettv);
+ static void f_isnan(typval_T *argvars, typval_T *rettv);
+ #endif
+ static void f_items(typval_T *argvars, typval_T *rettv);
+***************
+*** 721,726 ****
+--- 722,730 ----
+ {"insert", 2, 3, f_insert},
+ {"invert", 1, 1, f_invert},
+ {"isdirectory", 1, 1, f_isdirectory},
++ #if defined(FEAT_FLOAT) && defined(HAVE_MATH_H)
++ {"isinf", 1, 1, f_isinf},
++ #endif
+ {"islocked", 1, 1, f_islocked},
+ #if defined(FEAT_FLOAT) && defined(HAVE_MATH_H)
+ {"isnan", 1, 1, f_isnan},
+***************
+*** 6582,6590 ****
+ #ifdef FEAT_TAG_BINS
+ "tag_binary",
+ #endif
+- #ifdef FEAT_TAG_OLDSTATIC
+- "tag_old_static",
+- #endif
+ #ifdef FEAT_TCL
+ # ifndef DYNAMIC_TCL
+ "tcl",
+--- 6586,6591 ----
+***************
+*** 7443,7448 ****
+--- 7444,7459 ----
+
+ #if defined(FEAT_FLOAT) && defined(HAVE_MATH_H)
+ /*
++ * "isinf()" function
++ */
++ static void
++ f_isinf(typval_T *argvars, typval_T *rettv)
++ {
++ if (argvars[0].v_type == VAR_FLOAT && isinf(argvars[0].vval.v_float))
++ rettv->vval.v_number = argvars[0].vval.v_float > 0.0 ? 1 : -1;
++ }
++
++ /*
+ * "isnan()" function
+ */
+ static void
+*** ../vim-8.1.1110/src/testdir/test_float_func.vim 2017-06-04 19:45:13.000000000 +0200
+--- src/testdir/test_float_func.vim 2019-04-04 13:41:14.644823418 +0200
+***************
+*** 288,300 ****
+ call assert_fails("call trunc('')", 'E808:')
+ endfunc
+
+ func Test_isnan()
+! call assert_equal(0, isnan(1.0))
+! call assert_equal(1, isnan(0.0/0.0))
+! call assert_equal(0, isnan(1.0/0.0))
+! call assert_equal(0, isnan('a'))
+! call assert_equal(0, isnan([]))
+! call assert_equal(0, isnan({}))
+ endfunc
+
+ " This was converted from test65
+--- 288,311 ----
+ call assert_fails("call trunc('')", 'E808:')
+ endfunc
+
++ func Test_isinf()
++ call assert_equal(1, isinf(1.0/0.0))
++ call assert_equal(-1, isinf(-1.0/0.0))
++ call assert_false(isinf(1.0))
++ call assert_false(isinf(0.0/0.0))
++ call assert_false(isinf('a'))
++ call assert_false(isinf([]))
++ call assert_false(isinf({}))
++ endfunc
++
+ func Test_isnan()
+! call assert_true(isnan(0.0/0.0))
+! call assert_false(isnan(1.0))
+! call assert_false(isnan(1.0/0.0))
+! call assert_false(isnan(-1.0/0.0))
+! call assert_false(isnan('a'))
+! call assert_false(isnan([]))
+! call assert_false(isnan({}))
+ endfunc
+
+ " This was converted from test65
+*** ../vim-8.1.1110/src/version.c 2019-04-04 13:28:41.205589908 +0200
+--- src/version.c 2019-04-04 13:41:43.928639977 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1111,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+193. You ask your girlfriend to drive home so you can sit back with
+ your PDA and download the information to your 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.1112 b/data/vim/patches/8.1.1112
new file mode 100644
index 000000000..c4927ac6e
--- /dev/null
+++ b/data/vim/patches/8.1.1112
@@ -0,0 +1,614 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1112
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1112
+Problem: Duplicate code in quickfix file.
+Solution: Move code into functions. (Yegappan Lakshmanan, closes #4207)
+Files: src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.1111/src/quickfix.c 2019-03-31 15:31:54.592053004 +0200
+--- src/quickfix.c 2019-04-04 14:00:13.428106803 +0200
+***************
+*** 2161,2166 ****
+--- 2161,2214 ----
+ }
+
+ /*
++ * Get the quickfix/location list stack to use for the specified Ex command.
++ * For a location list command, returns the stack for the current window. If
++ * the location list is not found, then returns NULL and prints an error
++ * message if 'print_emsg' is TRUE.
++ */
++ static qf_info_T *
++ qf_cmd_get_stack(exarg_T *eap, int print_emsg)
++ {
++ qf_info_T *qi = &ql_info;
++
++ if (is_loclist_cmd(eap->cmdidx))
++ {
++ qi = GET_LOC_LIST(curwin);
++ if (qi == NULL)
++ {
++ if (print_emsg)
++ emsg(_(e_loclist));
++ return NULL;
++ }
++ }
++
++ return qi;
++ }
++
++ /*
++ * Get the quickfix/location list stack to use for the specified Ex command.
++ * For a location list command, returns the stack for the current window.
++ * If the location list is not present, then allocates a new one.
++ * Returns NULL if the allocation fails. For a location list command, sets
++ * 'pwinp' to curwin.
++ */
++ static qf_info_T *
++ qf_cmd_get_or_alloc_stack(exarg_T *eap, win_T **pwinp)
++ {
++ qf_info_T *qi = &ql_info;
++
++ if (is_loclist_cmd(eap->cmdidx))
++ {
++ qi = ll_get_or_alloc_list(curwin);
++ if (qi == NULL)
++ return NULL;
++ *pwinp = curwin;
++ }
++
++ return qi;
++ }
++
++ /*
+ * Copy location list entries from 'from_qfl' to 'to_qfl'.
+ */
+ static int
+***************
+*** 3512,3528 ****
+ 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))
+! {
+! qi = GET_LOC_LIST(curwin);
+! if (qi == NULL)
+! {
+! emsg(_(e_loclist));
+! return;
+! }
+! }
+
+ if (qf_stack_empty(qi) || qf_list_empty(qf_get_curlist(qi)))
+ {
+--- 3560,3569 ----
+ int plus = FALSE;
+ int all = eap->forceit; // if not :cl!, only show
+ // recognised errors
+! qf_info_T *qi;
+
+! if ((qi = qf_cmd_get_stack(eap, TRUE)) == NULL)
+! return;
+
+ if (qf_stack_empty(qi) || qf_list_empty(qf_get_curlist(qi)))
+ {
+***************
+*** 3647,3664 ****
+ void
+ qf_age(exarg_T *eap)
+ {
+! qf_info_T *qi = &ql_info;
+ int count;
+
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! qi = GET_LOC_LIST(curwin);
+! if (qi == NULL)
+! {
+! emsg(_(e_loclist));
+! return;
+! }
+! }
+
+ if (eap->addr_count != 0)
+ count = eap->line2;
+--- 3688,3698 ----
+ void
+ qf_age(exarg_T *eap)
+ {
+! qf_info_T *qi;
+ int count;
+
+! if ((qi = qf_cmd_get_stack(eap, TRUE)) == NULL)
+! return;
+
+ if (eap->addr_count != 0)
+ count = eap->line2;
+***************
+*** 3695,3705 ****
+ void
+ qf_history(exarg_T *eap)
+ {
+! qf_info_T *qi = &ql_info;
+ int i;
+
+- if (is_loclist_cmd(eap->cmdidx))
+- qi = GET_LOC_LIST(curwin);
+ if (qf_stack_empty(qi))
+ msg(_("No entries"));
+ else
+--- 3729,3737 ----
+ void
+ qf_history(exarg_T *eap)
+ {
+! qf_info_T *qi = qf_cmd_get_stack(eap, FALSE);
+ int i;
+
+ if (qf_stack_empty(qi))
+ msg(_("No entries"));
+ else
+***************
+*** 3908,3923 ****
+ void
+ ex_cwindow(exarg_T *eap)
+ {
+! qf_info_T *qi = &ql_info;
+ qf_list_T *qfl;
+ win_T *win;
+
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! qi = GET_LOC_LIST(curwin);
+! if (qi == NULL)
+! return;
+! }
+
+ qfl = qf_get_curlist(qi);
+
+--- 3940,3951 ----
+ void
+ ex_cwindow(exarg_T *eap)
+ {
+! qf_info_T *qi;
+ qf_list_T *qfl;
+ win_T *win;
+
+! if ((qi = qf_cmd_get_stack(eap, TRUE)) == NULL)
+! return;
+
+ qfl = qf_get_curlist(qi);
+
+***************
+*** 3946,3959 ****
+ ex_cclose(exarg_T *eap)
+ {
+ win_T *win = NULL;
+! qf_info_T *qi = &ql_info;
+
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! qi = GET_LOC_LIST(curwin);
+! if (qi == NULL)
+! return;
+! }
+
+ // Find existing quickfix window and close it.
+ win = qf_find_win(qi);
+--- 3974,3983 ----
+ ex_cclose(exarg_T *eap)
+ {
+ win_T *win = NULL;
+! qf_info_T *qi;
+
+! if ((qi = qf_cmd_get_stack(eap, FALSE)) == NULL)
+! return;
+
+ // Find existing quickfix window and close it.
+ win = qf_find_win(qi);
+***************
+*** 4100,4120 ****
+ void
+ ex_copen(exarg_T *eap)
+ {
+! qf_info_T *qi = &ql_info;
+ qf_list_T *qfl;
+ int height;
+ int status = FAIL;
+ int lnum;
+
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! qi = GET_LOC_LIST(curwin);
+! if (qi == NULL)
+! {
+! emsg(_(e_loclist));
+! return;
+! }
+! }
+
+ incr_quickfix_busy();
+
+--- 4124,4137 ----
+ void
+ ex_copen(exarg_T *eap)
+ {
+! qf_info_T *qi;
+ qf_list_T *qfl;
+ int height;
+ int status = FAIL;
+ int lnum;
+
+! if ((qi = qf_cmd_get_stack(eap, TRUE)) == NULL)
+! return;
+
+ incr_quickfix_busy();
+
+***************
+*** 4183,4200 ****
+ 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)
+! {
+! emsg(_(e_loclist));
+! return;
+! }
+! }
+
+ win = qf_find_win(qi);
+ if (win != NULL && win->w_cursor.lnum != win->w_buffer->b_ml.ml_line_count)
+--- 4200,4210 ----
+ void
+ ex_cbottom(exarg_T *eap)
+ {
+! qf_info_T *qi;
+ win_T *win;
+
+! if ((qi = qf_cmd_get_stack(eap, TRUE)) == NULL)
+! return;
+
+ win = qf_find_win(qi);
+ if (win != NULL && win->w_cursor.lnum != win->w_buffer->b_ml.ml_line_count)
+***************
+*** 4812,4830 ****
+ int
+ 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;
+
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! // Location list
+! qi = GET_LOC_LIST(curwin);
+! if (qi == NULL)
+! return 0;
+! }
+
+ qfl = qf_get_curlist(qi);
+ FOR_ALL_QFL_ITEMS(qfl, qfp, i)
+--- 4822,4835 ----
+ int
+ qf_get_size(exarg_T *eap)
+ {
+! qf_info_T *qi;
+ qf_list_T *qfl;
+ qfline_T *qfp;
+ int i, sz = 0;
+ int prev_fnum = 0;
+
+! if ((qi = qf_cmd_get_stack(eap, FALSE)) == NULL)
+! return 0;
+
+ qfl = qf_get_curlist(qi);
+ FOR_ALL_QFL_ITEMS(qfl, qfp, i)
+***************
+*** 4852,4866 ****
+ int
+ qf_get_cur_idx(exarg_T *eap)
+ {
+! qf_info_T *qi = &ql_info;
+
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! // Location list
+! qi = GET_LOC_LIST(curwin);
+! if (qi == NULL)
+! return 0;
+! }
+
+ return qf_get_curlist(qi)->qf_index;
+ }
+--- 4857,4866 ----
+ int
+ qf_get_cur_idx(exarg_T *eap)
+ {
+! qf_info_T *qi;
+
+! if ((qi = qf_cmd_get_stack(eap, FALSE)) == NULL)
+! return 0;
+
+ return qf_get_curlist(qi)->qf_index;
+ }
+***************
+*** 4872,4890 ****
+ int
+ qf_get_cur_valid_idx(exarg_T *eap)
+ {
+! qf_info_T *qi = &ql_info;
+ qf_list_T *qfl;
+ qfline_T *qfp;
+ int i, eidx = 0;
+ int prev_fnum = 0;
+
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! // Location list
+! qi = GET_LOC_LIST(curwin);
+! if (qi == NULL)
+! return 1;
+! }
+
+ qfl = qf_get_curlist(qi);
+ qfp = qfl->qf_start;
+--- 4872,4885 ----
+ int
+ qf_get_cur_valid_idx(exarg_T *eap)
+ {
+! qf_info_T *qi;
+ qf_list_T *qfl;
+ qfline_T *qfp;
+ int i, eidx = 0;
+ int prev_fnum = 0;
+
+! if ((qi = qf_cmd_get_stack(eap, FALSE)) == NULL)
+! return 1;
+
+ qfl = qf_get_curlist(qi);
+ qfp = qfl->qf_start;
+***************
+*** 4967,4984 ****
+ void
+ ex_cc(exarg_T *eap)
+ {
+! qf_info_T *qi = &ql_info;
+ int errornr;
+
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! qi = GET_LOC_LIST(curwin);
+! if (qi == NULL)
+! {
+! emsg(_(e_loclist));
+! return;
+! }
+! }
+
+ if (eap->addr_count > 0)
+ errornr = (int)eap->line2;
+--- 4962,4972 ----
+ void
+ ex_cc(exarg_T *eap)
+ {
+! qf_info_T *qi;
+ int errornr;
+
+! if ((qi = qf_cmd_get_stack(eap, TRUE)) == NULL)
+! return;
+
+ if (eap->addr_count > 0)
+ errornr = (int)eap->line2;
+***************
+*** 5017,5035 ****
+ void
+ ex_cnext(exarg_T *eap)
+ {
+! qf_info_T *qi = &ql_info;
+ int errornr;
+ int dir;
+
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! qi = GET_LOC_LIST(curwin);
+! if (qi == NULL)
+! {
+! emsg(_(e_loclist));
+! return;
+! }
+! }
+
+ if (eap->addr_count > 0
+ && (eap->cmdidx != CMD_cdo && eap->cmdidx != CMD_ldo
+--- 5005,5016 ----
+ void
+ ex_cnext(exarg_T *eap)
+ {
+! qf_info_T *qi;
+ int errornr;
+ int dir;
+
+! if ((qi = qf_cmd_get_stack(eap, TRUE)) == NULL)
+! return;
+
+ if (eap->addr_count > 0
+ && (eap->cmdidx != CMD_cdo && eap->cmdidx != CMD_ldo
+***************
+*** 5410,5416 ****
+ char_u *s;
+ char_u *p;
+ int fi;
+! qf_info_T *qi = &ql_info;
+ qf_list_T *qfl;
+ int_u save_qfid;
+ win_T *wp = NULL;
+--- 5391,5397 ----
+ char_u *s;
+ char_u *p;
+ int fi;
+! qf_info_T *qi;
+ qf_list_T *qfl;
+ int_u save_qfid;
+ win_T *wp = NULL;
+***************
+*** 5439,5451 ****
+ #endif
+ }
+
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! qi = ll_get_or_alloc_list(curwin);
+! if (qi == NULL)
+! return;
+! wp = curwin;
+! }
+
+ if (eap->addr_count > 0)
+ tomatch = eap->line2;
+--- 5420,5428 ----
+ #endif
+ }
+
+! qi = qf_cmd_get_or_alloc_stack(eap, &wp);
+! if (qi == NULL)
+! return;
+
+ if (eap->addr_count > 0)
+ tomatch = eap->line2;
+***************
+*** 6952,6958 ****
+ ex_cbuffer(exarg_T *eap)
+ {
+ buf_T *buf = NULL;
+! qf_info_T *qi = &ql_info;
+ char_u *au_name = NULL;
+ int res;
+ int_u save_qfid;
+--- 6929,6935 ----
+ ex_cbuffer(exarg_T *eap)
+ {
+ buf_T *buf = NULL;
+! qf_info_T *qi;
+ char_u *au_name = NULL;
+ int res;
+ int_u save_qfid;
+***************
+*** 6972,6984 ****
+ }
+
+ // Must come after autocommands.
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! qi = ll_get_or_alloc_list(curwin);
+! if (qi == NULL)
+! return;
+! wp = curwin;
+! }
+
+ if (cbuffer_process_args(eap, &buf, &line1, &line2) == FAIL)
+ return;
+--- 6949,6957 ----
+ }
+
+ // Must come after autocommands.
+! qi = qf_cmd_get_or_alloc_stack(eap, &wp);
+! if (qi == NULL)
+! return;
+
+ if (cbuffer_process_args(eap, &buf, &line1, &line2) == FAIL)
+ return;
+***************
+*** 7059,7065 ****
+ ex_cexpr(exarg_T *eap)
+ {
+ typval_T *tv;
+! qf_info_T *qi = &ql_info;
+ char_u *au_name = NULL;
+ int res;
+ int_u save_qfid;
+--- 7032,7038 ----
+ ex_cexpr(exarg_T *eap)
+ {
+ typval_T *tv;
+! qf_info_T *qi;
+ char_u *au_name = NULL;
+ int res;
+ int_u save_qfid;
+***************
+*** 7075,7087 ****
+ #endif
+ }
+
+! if (is_loclist_cmd(eap->cmdidx))
+! {
+! qi = ll_get_or_alloc_list(curwin);
+! if (qi == NULL)
+! return;
+! wp = curwin;
+! }
+
+ // Evaluate the expression. When the result is a string or a list we can
+ // use it to fill the errorlist.
+--- 7048,7056 ----
+ #endif
+ }
+
+! qi = qf_cmd_get_or_alloc_stack(eap, &wp);
+! if (qi == NULL)
+! return;
+
+ // Evaluate the expression. When the result is a string or a list we can
+ // use it to fill the errorlist.
+*** ../vim-8.1.1111/src/testdir/test_quickfix.vim 2019-03-17 16:39:01.566006172 +0100
+--- src/testdir/test_quickfix.vim 2019-04-04 14:00:13.428106803 +0200
+***************
+*** 163,168 ****
+--- 163,174 ----
+ func XageTests(cchar)
+ call s:setup_commands(a:cchar)
+
++ if a:cchar == 'l'
++ " No location list for the current window
++ call assert_fails('lolder', 'E776:')
++ call assert_fails('lnewer', 'E776:')
++ endif
++
+ let list = [{'bufnr': bufnr('%'), 'lnum': 1}]
+ call g:Xsetlist(list)
+
+*** ../vim-8.1.1111/src/version.c 2019-04-04 13:44:31.035594516 +0200
+--- src/version.c 2019-04-04 14:03:33.855089513 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1112,
+ /**/
+
+--
+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.1113 b/data/vim/patches/8.1.1113
new file mode 100644
index 000000000..57c3479d5
--- /dev/null
+++ b/data/vim/patches/8.1.1113
@@ -0,0 +1,431 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1113
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1113
+Problem: Making an autocommand trigger once is not so easy.
+Solution: Add the ++once argument. Also add ++nested as an alias for
+ "nested". (Justin M. Keyes, closes #4100)
+Files: runtime/doc/autocmd.txt, src/autocmd.c,
+ src/testdir/test_autocmd.vim, src/globals.h
+
+
+*** ../vim-8.1.1112/runtime/doc/autocmd.txt 2019-01-12 13:25:42.633479785 +0100
+--- runtime/doc/autocmd.txt 2019-04-04 14:27:44.234127778 +0200
+***************
+*** 52,58 ****
+ 2. Defining autocommands *autocmd-define*
+
+ *:au* *:autocmd*
+! :au[tocmd] [group] {event} {pat} [nested] {cmd}
+ Add {cmd} to the list of commands that Vim will
+ execute automatically on {event} for a file matching
+ {pat} |autocmd-patterns|.
+--- 52,58 ----
+ 2. Defining autocommands *autocmd-define*
+
+ *:au* *:autocmd*
+! :au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd}
+ Add {cmd} to the list of commands that Vim will
+ execute automatically on {event} for a file matching
+ {pat} |autocmd-patterns|.
+***************
+*** 60,66 ****
+ :autocmd and won't start a comment.
+ Vim always adds the {cmd} after existing autocommands,
+ so that the autocommands execute in the order in which
+! they were given. See |autocmd-nested| for [nested].
+
+ The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
+ See |autocmd-buflocal|.
+--- 60,72 ----
+ :autocmd and won't start a comment.
+ Vim always adds the {cmd} after existing autocommands,
+ so that the autocommands execute in the order in which
+! they were given.
+! See |autocmd-nested| for [++nested]. "nested"
+! (without the ++) can also be used, for backwards
+! compatibility.
+! *autocmd-once*
+! If [++once] is supplied the command is executed once,
+! then removed ("one shot").
+
+ The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
+ See |autocmd-buflocal|.
+***************
+*** 128,137 ****
+ ==============================================================================
+ 3. Removing autocommands *autocmd-remove*
+
+! :au[tocmd]! [group] {event} {pat} [nested] {cmd}
+ Remove all autocommands associated with {event} and
+! {pat}, and add the command {cmd}. See
+! |autocmd-nested| for [nested].
+
+ :au[tocmd]! [group] {event} {pat}
+ Remove all autocommands associated with {event} and
+--- 134,144 ----
+ ==============================================================================
+ 3. Removing autocommands *autocmd-remove*
+
+! :au[tocmd]! [group] {event} {pat} [++once] [++nested] {cmd}
+ Remove all autocommands associated with {event} and
+! {pat}, and add the command {cmd}.
+! See |autocmd-once| for [++once].
+! See |autocmd-nested| for [++nested].
+
+ :au[tocmd]! [group] {event} {pat}
+ Remove all autocommands associated with {event} and
+***************
+*** 1454,1464 ****
+ instead of ":q!".
+
+ *autocmd-nested* *E218*
+! By default, autocommands do not nest. If you use ":e" or ":w" in an
+! autocommand, Vim does not execute the BufRead and BufWrite autocommands for
+ those commands. If you do want this, use the "nested" flag for those commands
+ in which you want nesting. For example: >
+! :autocmd FileChangedShell *.c nested e!
+ The nesting is limited to 10 levels to get out of recursive loops.
+
+ It's possible to use the ":au" command in an autocommand. This can be a
+--- 1476,1486 ----
+ instead of ":q!".
+
+ *autocmd-nested* *E218*
+! By default, autocommands do not nest. For example, if you use ":e" or ":w" in
+! an autocommand, Vim does not execute the BufRead and BufWrite autocommands for
+ those commands. If you do want this, use the "nested" flag for those commands
+ in which you want nesting. For example: >
+! :autocmd FileChangedShell *.c ++nested e!
+ The nesting is limited to 10 levels to get out of recursive loops.
+
+ It's possible to use the ":au" command in an autocommand. This can be a
+*** ../vim-8.1.1112/src/autocmd.c 2019-03-30 18:46:57.340077448 +0100
+--- src/autocmd.c 2019-04-04 15:00:05.275752148 +0200
+***************
+*** 52,57 ****
+--- 52,58 ----
+ {
+ char_u *cmd; // The command to be executed (NULL
+ // when command has been removed).
++ char once; // "One shot": removed after execution
+ char nested; // If autocommands nest here.
+ char last; // last command in list
+ #ifdef FEAT_EVAL
+***************
+*** 256,262 ****
+
+ static char_u *event_nr2name(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);
+ static void auto_next_pat(AutoPatCmd *apc, int stop_at_last);
+ static int au_find_group(char_u *name);
+--- 257,263 ----
+
+ static char_u *event_nr2name(event_T event);
+ static int au_get_grouparg(char_u **argp);
+! static int do_autocmd_event(event_T event, char_u *pat, int once, 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);
+ static void auto_next_pat(AutoPatCmd *apc, int stop_at_last);
+ static int au_find_group(char_u *name);
+***************
+*** 361,366 ****
+--- 362,374 ----
+ au_need_clean = TRUE;
+ }
+
++ // Delete one command from an autocmd pattern.
++ static void au_del_cmd(AutoCmd *ac)
++ {
++ VIM_CLEAR(ac->cmd);
++ au_need_clean = TRUE;
++ }
++
+ /*
+ * Cleanup autocommands and patterns that have been deleted.
+ * This is only done when not executing autocommands.
+***************
+*** 385,390 ****
+--- 393,400 ----
+ {
+ // loop over all commands for this pattern
+ prev_ac = &(ap->cmds);
++ int has_cmd = FALSE;
++
+ for (ac = *prev_ac; ac != NULL; ac = *prev_ac)
+ {
+ // remove the command if the pattern is to be deleted or when
+***************
+*** 395,402 ****
+ vim_free(ac->cmd);
+ vim_free(ac);
+ }
+! else
+ prev_ac = &(ac->next);
+ }
+
+ // remove the pattern if it has been marked for deletion
+--- 405,420 ----
+ vim_free(ac->cmd);
+ vim_free(ac);
+ }
+! else {
+! has_cmd = TRUE;
+ prev_ac = &(ac->next);
++ }
++ }
++
++ if (ap->pat != NULL && !has_cmd) {
++ // Pattern was not marked for deletion, but all of its
++ // commands were. So mark the pattern for deletion.
++ au_remove_pat(ap);
+ }
+
+ // remove the pattern if it has been marked for deletion
+***************
+*** 815,821 ****
+--- 833,841 ----
+ event_T event;
+ int need_free = FALSE;
+ int nested = FALSE;
++ int once = FALSE;
+ int group;
++ int i;
+
+ if (*arg == '|')
+ {
+***************
+*** 874,888 ****
+ pat = envpat;
+ }
+
+- /*
+- * Check for "nested" flag.
+- */
+ cmd = skipwhite(cmd);
+! if (*cmd != NUL && STRNCMP(cmd, "nested", 6) == 0
+! && VIM_ISWHITE(cmd[6]))
+ {
+! nested = TRUE;
+! cmd = skipwhite(cmd + 6);
+ }
+
+ /*
+--- 894,931 ----
+ pat = envpat;
+ }
+
+ cmd = skipwhite(cmd);
+! for (i = 0; i < 2; i++)
+ {
+! if (*cmd != NUL)
+! {
+! // Check for "++once" flag.
+! if (STRNCMP(cmd, "++once", 6) == 0 && VIM_ISWHITE(cmd[6]))
+! {
+! if (once)
+! semsg(_(e_duparg2), "++once");
+! once = TRUE;
+! cmd = skipwhite(cmd + 6);
+! }
+!
+! // Check for "++nested" flag.
+! if ((STRNCMP(cmd, "++nested", 8) == 0 && VIM_ISWHITE(cmd[8])))
+! {
+! if (nested)
+! semsg(_(e_duparg2), "++nested");
+! nested = TRUE;
+! cmd = skipwhite(cmd + 8);
+! }
+!
+! // Check for the old "nested" flag.
+! if (STRNCMP(cmd, "nested", 6) == 0 && VIM_ISWHITE(cmd[6]))
+! {
+! if (nested)
+! semsg(_(e_duparg2), "nested");
+! nested = TRUE;
+! cmd = skipwhite(cmd + 6);
+! }
+! }
+ }
+
+ /*
+***************
+*** 915,928 ****
+ for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
+ event = (event_T)((int)event + 1))
+ if (do_autocmd_event(event, pat,
+! nested, cmd, forceit, group) == FAIL)
+ break;
+ }
+ else
+ {
+ while (*arg && *arg != '|' && !VIM_ISWHITE(*arg))
+ if (do_autocmd_event(event_name2nr(arg, &arg), pat,
+! nested, cmd, forceit, group) == FAIL)
+ break;
+ }
+
+--- 958,971 ----
+ for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
+ event = (event_T)((int)event + 1))
+ if (do_autocmd_event(event, pat,
+! once, nested, cmd, forceit, group) == FAIL)
+ break;
+ }
+ else
+ {
+ while (*arg && *arg != '|' && !VIM_ISWHITE(*arg))
+ if (do_autocmd_event(event_name2nr(arg, &arg), pat,
+! once, nested, cmd, forceit, group) == FAIL)
+ break;
+ }
+
+***************
+*** 973,978 ****
+--- 1016,1022 ----
+ do_autocmd_event(
+ event_T event,
+ char_u *pat,
++ int once,
+ int nested,
+ char_u *cmd,
+ int forceit,
+***************
+*** 1212,1217 ****
+--- 1256,1262 ----
+ }
+ ac->next = NULL;
+ *prev_ac = ac;
++ ac->once = once;
+ ac->nested = nested;
+ }
+ }
+***************
+*** 2319,2324 ****
+--- 2364,2372 ----
+ verbose_leave_scroll();
+ }
+ retval = vim_strsave(ac->cmd);
++ // Remove one-shot ("once") autocmd in anticipation of its execution.
++ if (ac->once)
++ au_del_cmd(ac);
+ autocmd_nested = ac->nested;
+ #ifdef FEAT_EVAL
+ current_sctx = ac->script_ctx;
+*** ../vim-8.1.1112/src/testdir/test_autocmd.vim 2019-02-03 14:52:42.505867463 +0100
+--- src/testdir/test_autocmd.vim 2019-04-04 14:53:47.308581458 +0200
+***************
+*** 1415,1418 ****
+--- 1415,1488 ----
+ bwipe!
+ endfunc
+
++ func Test_autocmd_nested()
++ let g:did_nested = 0
++ augroup Testing
++ au WinNew * edit somefile
++ au BufNew * let g:did_nested = 1
++ augroup END
++ split
++ call assert_equal(0, g:did_nested)
++ close
++ bwipe! somefile
++
++ " old nested argument still works
++ augroup Testing
++ au!
++ au WinNew * nested edit somefile
++ au BufNew * let g:did_nested = 1
++ augroup END
++ split
++ call assert_equal(1, g:did_nested)
++ close
++ bwipe! somefile
++
++ " New ++nested argument works
++ augroup Testing
++ au!
++ au WinNew * ++nested edit somefile
++ au BufNew * let g:did_nested = 1
++ augroup END
++ split
++ call assert_equal(1, g:did_nested)
++ close
++ bwipe! somefile
++
++ augroup Testing
++ au!
++ augroup END
++
++ call assert_fails('au WinNew * ++nested ++nested echo bad', 'E983:')
++ call assert_fails('au WinNew * nested nested echo bad', 'E983:')
++ endfunc
++
++ func Test_autocmd_once()
++ " Without ++once WinNew triggers twice
++ let g:did_split = 0
++ augroup Testing
++ au WinNew * let g:did_split += 1
++ augroup END
++ split
++ split
++ call assert_equal(2, g:did_split)
++ call assert_true(exists('#WinNew'))
++ close
++ close
++
++ " With ++once WinNew triggers once
++ let g:did_split = 0
++ augroup Testing
++ au!
++ au WinNew * ++once let g:did_split += 1
++ augroup END
++ split
++ split
++ call assert_equal(1, g:did_split)
++ call assert_false(exists('#WinNew'))
++ close
++ close
++
++ call assert_fails('au WinNew * ++once ++once echo bad', 'E983:')
++ endfunc
++
+ " FileChangedShell tested in test_filechanged.vim
+*** ../vim-8.1.1112/src/globals.h 2019-04-02 22:15:51.340273562 +0200
+--- src/globals.h 2019-04-04 14:53:34.904592944 +0200
+***************
+*** 1401,1406 ****
+--- 1401,1407 ----
+ EXTERN char e_invaddr[] INIT(= N_("E14: Invalid address"));
+ EXTERN char e_invarg[] INIT(= N_("E474: Invalid argument"));
+ EXTERN char e_invarg2[] INIT(= N_("E475: Invalid argument: %s"));
++ EXTERN char e_duparg2[] INIT(= N_("E983: Duplicate argument: %s"));
+ EXTERN char e_invargval[] INIT(= N_("E475: Invalid value for argument %s"));
+ EXTERN char e_invargNval[] INIT(= N_("E475: Invalid value for argument %s: %s"));
+ #ifdef FEAT_EVAL
+*** ../vim-8.1.1112/src/version.c 2019-04-04 14:04:06.994917179 +0200
+--- src/version.c 2019-04-04 14:14:16.251624114 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1113,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+195. Your cat has its own 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.1114 b/data/vim/patches/8.1.1114
new file mode 100644
index 000000000..9e2453f14
--- /dev/null
+++ b/data/vim/patches/8.1.1114
@@ -0,0 +1,273 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1114
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1114
+Problem: Confusing overloaded operator "." for string concatenation.
+Solution: Add ".." for string concatenation. Also "let a ..= b".
+Files: src/eval.c, src/testdir/test_eval_stuff.vim, runtime/doc/eval.txt
+
+
+*** ../vim-8.1.1113/src/eval.c 2019-03-30 20:04:05.024567549 +0100
+--- src/eval.c 2019-04-04 15:23:48.333402717 +0200
+***************
+*** 1234,1239 ****
+--- 1234,1240 ----
+ * ":let var /= expr" assignment command.
+ * ":let var %= expr" assignment command.
+ * ":let var .= expr" assignment command.
++ * ":let var ..= expr" assignment command.
+ * ":let [var1, var2] = expr" unpack list.
+ */
+ void
+***************
+*** 1255,1262 ****
+ if (argend > arg && argend[-1] == '.') // for var.='str'
+ --argend;
+ expr = skipwhite(argend);
+! if (*expr != '=' && !(vim_strchr((char_u *)"+-*/%.", *expr) != NULL
+! && expr[1] == '='))
+ {
+ /*
+ * ":let" without "=": list variables
+--- 1256,1263 ----
+ if (argend > arg && argend[-1] == '.') // for var.='str'
+ --argend;
+ expr = skipwhite(argend);
+! if (*expr != '=' && !((vim_strchr((char_u *)"+-*/%.", *expr) != NULL
+! && expr[1] == '=') || STRNCMP(expr, "..=", 3) == 0))
+ {
+ /*
+ * ":let" without "=": list variables
+***************
+*** 1286,1292 ****
+--- 1287,1297 ----
+ if (*expr != '=')
+ {
+ if (vim_strchr((char_u *)"+-*/%.", *expr) != NULL)
++ {
+ op[0] = *expr; // +=, -=, *=, /=, %= or .=
++ if (expr[0] == '.' && expr[1] == '.') // ..=
++ ++expr;
++ }
+ expr = skipwhite(expr + 2);
+ }
+ else
+***************
+*** 3813,3818 ****
+--- 3818,3824 ----
+ * + number addition
+ * - number subtraction
+ * . string concatenation
++ * .. string concatenation
+ *
+ * "arg" must point to the first non-white of the expression.
+ * "arg" is advanced to the next non-white after the recognized expression.
+***************
+*** 3872,3877 ****
+--- 3878,3885 ----
+ /*
+ * Get the second variable.
+ */
++ if (op == '.' && *(*arg + 1) == '.') // .. string concatenation
++ ++*arg;
+ *arg = skipwhite(*arg + 1);
+ if (eval6(arg, &var2, evaluate, op == '.') == FAIL)
+ {
+*** ../vim-8.1.1113/src/testdir/test_eval_stuff.vim 2019-01-24 13:58:05.817568979 +0100
+--- src/testdir/test_eval_stuff.vim 2019-04-04 15:17:26.815290594 +0200
+***************
+*** 94,96 ****
+--- 94,125 ----
+ call assert_fails('let v:errmsg = []', 'E730:')
+ let v:errmsg = ''
+ endfunc
++
++ func Test_string_concatenation()
++ call assert_equal('ab', 'a'.'b')
++ call assert_equal('ab', 'a' .'b')
++ call assert_equal('ab', 'a'. 'b')
++ call assert_equal('ab', 'a' . 'b')
++
++ call assert_equal('ab', 'a'..'b')
++ call assert_equal('ab', 'a' ..'b')
++ call assert_equal('ab', 'a'.. 'b')
++ call assert_equal('ab', 'a' .. 'b')
++
++ let a = 'a'
++ let b = 'b'
++ let a .= b
++ call assert_equal('ab', a)
++
++ let a = 'a'
++ let a.=b
++ call assert_equal('ab', a)
++
++ let a = 'a'
++ let a ..= b
++ call assert_equal('ab', a)
++
++ let a = 'a'
++ let a..=b
++ call assert_equal('ab', a)
++ endfunc
+*** ../vim-8.1.1113/runtime/doc/eval.txt 2019-04-04 13:44:31.031594540 +0200
+--- runtime/doc/eval.txt 2019-04-04 15:26:47.752500735 +0200
+***************
+*** 773,782 ****
+ expr2 ? expr1 : expr1 if-then-else
+
+ |expr2| expr3
+! expr3 || expr3 .. logical OR
+
+ |expr3| expr4
+! expr4 && expr4 .. logical AND
+
+ |expr4| expr5
+ expr5 == expr5 equal
+--- 786,795 ----
+ expr2 ? expr1 : expr1 if-then-else
+
+ |expr2| expr3
+! expr3 || expr3 ... logical OR
+
+ |expr3| expr4
+! expr4 && expr4 ... logical AND
+
+ |expr4| expr5
+ expr5 == expr5 equal
+***************
+*** 793,810 ****
+ etc. As above, append ? for ignoring case, # for
+ matching case
+
+! expr5 is expr5 same |List| instance
+! expr5 isnot expr5 different |List| instance
+
+ |expr5| expr6
+! expr6 + expr6 .. number addition, list or blob concatenation
+! expr6 - expr6 .. number subtraction
+! expr6 . expr6 .. string concatenation
+
+ |expr6| expr7
+! expr7 * expr7 .. number multiplication
+! expr7 / expr7 .. number division
+! expr7 % expr7 .. number modulo
+
+ |expr7| expr8
+ ! expr7 logical NOT
+--- 806,825 ----
+ etc. As above, append ? for ignoring case, # for
+ matching case
+
+! expr5 is expr5 same |List|, |Dictionary| or |Blob| instance
+! expr5 isnot expr5 different |List|, |Dictionary| or |Blob|
+! instance
+
+ |expr5| expr6
+! expr6 + expr6 ... number addition, list or blob concatenation
+! expr6 - expr6 ... number subtraction
+! expr6 . expr6 ... string concatenation
+! expr6 .. expr6 ... string concatenation
+
+ |expr6| expr7
+! expr7 * expr7 ... number multiplication
+! expr7 / expr7 ... number division
+! expr7 % expr7 ... number modulo
+
+ |expr7| expr8
+ ! expr7 logical NOT
+***************
+*** 833,839 ****
+ {args -> expr1} lambda expression
+
+
+! ".." indicates that the operations in this level can be concatenated.
+ Example: >
+ &nu || &list && &shell == "csh"
+
+--- 848,854 ----
+ {args -> expr1} lambda expression
+
+
+! "..." indicates that the operations in this level can be concatenated.
+ Example: >
+ &nu || &list && &shell == "csh"
+
+***************
+*** 1012,1027 ****
+
+ expr5 and expr6 *expr5* *expr6*
+ ---------------
+! expr6 + expr6 .. Number addition or |List| concatenation *expr-+*
+! expr6 - expr6 .. Number subtraction *expr--*
+! expr6 . expr6 .. String concatenation *expr-.*
+
+ For |Lists| only "+" is possible and then both expr6 must be a list. The
+ result is a new list with the two lists Concatenated.
+
+! expr7 * expr7 .. Number multiplication *expr-star*
+! expr7 / expr7 .. Number division *expr-/*
+! expr7 % expr7 .. Number modulo *expr-%*
+
+ For all, except ".", Strings are converted to Numbers.
+ For bitwise operators see |and()|, |or()| and |xor()|.
+--- 1027,1046 ----
+
+ expr5 and expr6 *expr5* *expr6*
+ ---------------
+! expr6 + expr6 Number addition, |List| or |Blob| concatenation *expr-+*
+! expr6 - expr6 Number subtraction *expr--*
+! expr6 . expr6 String concatenation *expr-.*
+! expr6 .. expr6 String concatenation *expr-..*
+
+ For |Lists| only "+" is possible and then both expr6 must be a list. The
+ result is a new list with the two lists Concatenated.
+
+! For String concatenation ".." is preferred, since "." is ambiguous, it is also
+! used for |Dict| member access and floating point numbers.
+!
+! expr7 * expr7 Number multiplication *expr-star*
+! expr7 / expr7 Number division *expr-/*
+! expr7 % expr7 Number modulo *expr-%*
+
+ For all, except ".", Strings are converted to Numbers.
+ For bitwise operators see |and()|, |or()| and |xor()|.
+***************
+*** 1080,1085 ****
+--- 1099,1111 ----
+
+ expr8 *expr8*
+ -----
++ This expression is either |expr9| or a sequence of the alternatives below,
++ in any order. E.g., these are all possible:
++ expr9[expr1].name
++ expr9.name[expr1]
++ expr9(expr1, ...)[expr1].name
++
++
+ expr8[expr1] item of String or |List| *expr-[]* *E111*
+ *E909* *subscript*
+ If expr8 is a Number or String this results in a String that contains the
+*** ../vim-8.1.1113/src/version.c 2019-04-04 15:04:32.966792195 +0200
+--- src/version.c 2019-04-04 15:32:15.826390483 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1114,
+ /**/
+
+--
+Press any key to continue, press any other key to quit.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1115 b/data/vim/patches/8.1.1115
new file mode 100644
index 000000000..1c881d064
--- /dev/null
+++ b/data/vim/patches/8.1.1115
@@ -0,0 +1,100 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.11
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1115
+Problem: Cannot build with older C compiler.
+Solution: Move variable declaration to start of block.
+Files: src/autocmd.c
+
+
+*** ../vim-8.1.1114/src/autocmd.c 2019-04-04 15:04:32.966792195 +0200
+--- src/autocmd.c 2019-04-04 15:38:27.276170676 +0200
+***************
+*** 391,400 ****
+ prev_ap = &(first_autopat[(int)event]);
+ for (ap = *prev_ap; ap != NULL; ap = *prev_ap)
+ {
+- // loop over all commands for this pattern
+- prev_ac = &(ap->cmds);
+ int has_cmd = FALSE;
+
+ for (ac = *prev_ac; ac != NULL; ac = *prev_ac)
+ {
+ // remove the command if the pattern is to be deleted or when
+--- 391,400 ----
+ prev_ap = &(first_autopat[(int)event]);
+ for (ap = *prev_ap; ap != NULL; ap = *prev_ap)
+ {
+ int has_cmd = FALSE;
+
++ // loop over all commands for this pattern
++ prev_ac = &(ap->cmds);
+ for (ac = *prev_ac; ac != NULL; ac = *prev_ac)
+ {
+ // remove the command if the pattern is to be deleted or when
+***************
+*** 405,421 ****
+ vim_free(ac->cmd);
+ vim_free(ac);
+ }
+! else {
+ has_cmd = TRUE;
+ prev_ac = &(ac->next);
+ }
+ }
+
+! if (ap->pat != NULL && !has_cmd) {
+ // Pattern was not marked for deletion, but all of its
+ // commands were. So mark the pattern for deletion.
+ au_remove_pat(ap);
+- }
+
+ // remove the pattern if it has been marked for deletion
+ if (ap->pat == NULL)
+--- 405,421 ----
+ vim_free(ac->cmd);
+ vim_free(ac);
+ }
+! else
+! {
+ has_cmd = TRUE;
+ prev_ac = &(ac->next);
+ }
+ }
+
+! if (ap->pat != NULL && !has_cmd)
+ // Pattern was not marked for deletion, but all of its
+ // commands were. So mark the pattern for deletion.
+ au_remove_pat(ap);
+
+ // remove the pattern if it has been marked for deletion
+ if (ap->pat == NULL)
+*** ../vim-8.1.1114/src/version.c 2019-04-04 15:35:42.833132544 +0200
+--- src/version.c 2019-04-04 15:39:05.447951004 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1115,
+ /**/
+
+--
+% 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.1116 b/data/vim/patches/8.1.1116
new file mode 100644
index 000000000..b13fd5ed8
--- /dev/null
+++ b/data/vim/patches/8.1.1116
@@ -0,0 +1,772 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1116
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1116
+Problem: Cannot enforce a Vim script style.
+Solution: Add the :scriptversion command. (closes #3857)
+Files: runtime/doc/repeat.txt, runtime/doc/eval.txt, src/eval.c,
+ src/ex_cmds.h, src/evalfunc.c, src/ex_cmds2.c,
+ src/proto/ex_cmds2.pro, src/structs.h, src/buffer.c, src/main.c,
+ src/option.c, src/ex_cmdidxs.h, src/testdir/test_eval_stuff.vim
+
+
+*** ../vim-8.1.1115/runtime/doc/repeat.txt 2018-11-30 22:40:09.098211991 +0100
+--- runtime/doc/repeat.txt 2019-04-04 16:16:57.187793562 +0200
+***************
+*** 323,332 ****
+ set encoding=utf-8
+ scriptencoding utf-8
+ <
+- When compiled without the |+multi_byte| feature this
+- command is ignored.
+ {not in Vi}
+
+ *:scr* *:scriptnames*
+ :scr[iptnames] List all sourced script names, in the order they were
+ first sourced. The number is used for the script ID
+--- 323,341 ----
+ set encoding=utf-8
+ scriptencoding utf-8
+ <
+ {not in Vi}
+
++ :scriptv[ersion] {version} *:scriptv* *:scriptversion*
++ *E999* *E984*
++ Specify the version of Vim for the lines that follow.
++ Does not apply to sourced scripts.
++
++ If {version} is higher than what the current Vim
++ version supports E999 will be given. You either need
++ to rewrite the script to make it work with an older
++ Vim version, or update Vim to a newer version. See
++ |vimscript-version| for what changed between versions.
++
+ *:scr* *:scriptnames*
+ :scr[iptnames] List all sourced script names, in the order they were
+ first sourced. The number is used for the script ID
+*** ../vim-8.1.1115/runtime/doc/eval.txt 2019-04-04 15:35:42.833132544 +0200
+--- runtime/doc/eval.txt 2019-04-04 18:13:06.835496283 +0200
+***************
+*** 1024,1029 ****
+--- 1038,1044 ----
+
+ For String concatenation ".." is preferred, since "." is ambiguous, it is also
+ used for |Dict| member access and floating point numbers.
++ When |vimscript-version| is 2 or higher, using "." is not allowed.
+
+ expr7 * expr7 Number multiplication *expr-star*
+ expr7 / expr7 Number division *expr-/*
+***************
+*** 10418,10444 ****
+ vcon Win32: Virtual console support is working, can use
+ 'termguicolors'. Also see |+vtp|.
+ vertsplit Compiled with vertically split windows |:vsplit|.
+ vim_starting True while initial source'ing takes place. |startup|
+ *vim_starting*
+ viminfo Compiled with viminfo support.
+! virtualedit Compiled with 'virtualedit' option.
+! visual Compiled with Visual mode.
+! visualextra Compiled with extra Visual mode commands.
+! |blockwise-operators|.
+ vms VMS version of Vim.
+! vreplace Compiled with |gR| and |gr| commands.
+ vtp Compiled for vcon support |+vtp| (check vcon to find
+ out if it works in the current console).
+ wildignore Compiled with 'wildignore' option.
+ wildmenu Compiled with 'wildmenu' option.
+! win16 old version for MS-Windows 3.1 (always False)
+ win32 Win32 version of Vim (MS-Windows 95 and later, 32 or
+ 64 bits)
+ win32unix Win32 version of Vim, using Unix files (Cygwin)
+ win64 Win64 version of Vim (MS-Windows 64 bit).
+! win95 Win32 version for MS-Windows 95/98/ME (always False)
+ winaltkeys Compiled with 'winaltkeys' option.
+ windows Compiled with support for more than one window.
+ writebackup Compiled with 'writebackup' default on.
+ xfontset Compiled with X fontset support |xfontset|.
+ xim Compiled with X input method support |xim|.
+--- 10474,10504 ----
+ vcon Win32: Virtual console support is working, can use
+ 'termguicolors'. Also see |+vtp|.
+ vertsplit Compiled with vertically split windows |:vsplit|.
++ (always true)
+ vim_starting True while initial source'ing takes place. |startup|
+ *vim_starting*
+ viminfo Compiled with viminfo support.
+! vimscript-1 Compiled Vim script version 1 support
+! vimscript-2 Compiled Vim script version 2 support
+! virtualedit Compiled with 'virtualedit' option. (always true)
+! visual Compiled with Visual mode. (always true)
+! visualextra Compiled with extra Visual mode commands. (always
+! true) |blockwise-operators|.
+ vms VMS version of Vim.
+! vreplace Compiled with |gR| and |gr| commands. (always true)
+ vtp Compiled for vcon support |+vtp| (check vcon to find
+ out if it works in the current console).
+ wildignore Compiled with 'wildignore' option.
+ wildmenu Compiled with 'wildmenu' option.
+! win16 old version for MS-Windows 3.1 (always false)
+ win32 Win32 version of Vim (MS-Windows 95 and later, 32 or
+ 64 bits)
+ win32unix Win32 version of Vim, using Unix files (Cygwin)
+ win64 Win64 version of Vim (MS-Windows 64 bit).
+! win95 Win32 version for MS-Windows 95/98/ME (always false)
+ winaltkeys Compiled with 'winaltkeys' option.
+ windows Compiled with support for more than one window.
++ (always true)
+ writebackup Compiled with 'writebackup' default on.
+ xfontset Compiled with X fontset support |xfontset|.
+ xim Compiled with X input method support |xim|.
+***************
+*** 10910,10925 ****
+ When the selected range of items is partly past the
+ end of the list, items will be added.
+
+! *:let+=* *:let-=* *:letstar=*
+! *:let/=* *:let%=* *:let.=* *E734*
+ :let {var} += {expr1} Like ":let {var} = {var} + {expr1}".
+ :let {var} -= {expr1} Like ":let {var} = {var} - {expr1}".
+ :let {var} *= {expr1} Like ":let {var} = {var} * {expr1}".
+ :let {var} /= {expr1} Like ":let {var} = {var} / {expr1}".
+ :let {var} %= {expr1} Like ":let {var} = {var} % {expr1}".
+ :let {var} .= {expr1} Like ":let {var} = {var} . {expr1}".
+ These fail if {var} was not set yet and when the type
+ of {var} and {expr1} don't fit the operator.
+
+
+ :let ${env-name} = {expr1} *:let-environment* *:let-$*
+--- 10970,10988 ----
+ When the selected range of items is partly past the
+ end of the list, items will be added.
+
+! *:let+=* *:let-=* *:letstar=*
+! *:let/=* *:let%=* *:let.=* *:let..=* *E734* *E985*
+ :let {var} += {expr1} Like ":let {var} = {var} + {expr1}".
+ :let {var} -= {expr1} Like ":let {var} = {var} - {expr1}".
+ :let {var} *= {expr1} Like ":let {var} = {var} * {expr1}".
+ :let {var} /= {expr1} Like ":let {var} = {var} / {expr1}".
+ :let {var} %= {expr1} Like ":let {var} = {var} % {expr1}".
+ :let {var} .= {expr1} Like ":let {var} = {var} . {expr1}".
++ :let {var} ..= {expr1} Like ":let {var} = {var} .. {expr1}".
+ These fail if {var} was not set yet and when the type
+ of {var} and {expr1} don't fit the operator.
++ `.=` is not supported with Vim script version 2 and
++ later, see |vimscript-version|.
+
+
+ :let ${env-name} = {expr1} *:let-environment* *:let-$*
+***************
+*** 12547,12553 ****
+ unlet scriptnames_output
+
+ ==============================================================================
+! 10. No +eval feature *no-eval-feature*
+
+ When the |+eval| feature was disabled at compile time, none of the expression
+ evaluation commands are available. To prevent this from causing Vim scripts
+--- 12616,12649 ----
+ unlet scriptnames_output
+
+ ==============================================================================
+! 10. Vim script versions *vimscript-version* *vimscript-versions*
+!
+! Over time many features have been added to Vim script. This includes Ex
+! commands, functions, variable types, etc. Each individual feature can be
+! checked with the |has()| and |exists()| functions.
+!
+! Sometimes old syntax of functionality gets in the way of making Vim better.
+! When support is taken away this will break older Vim scripts. To make this
+! explicit the |:scriptversion| command can be used. When a Vim script is not
+! compatible with older versions of Vim this will give an explicit error,
+! instead of failing in mysterious ways. >
+!
+! :scriptversion 1
+! < This is the original Vim script, same as not using a |:scriptversion|
+! command. Can be used to go back to old syntax for a range of lines.
+! Test for support with: >
+! has('vimscript-1')
+!
+! :scriptversion 2
+! < String concatenation with "." is not supported, use ".." instead.
+! This avoids the ambiguity using "." for Dict member access and
+! floating point numbers. Now ".5" means the number 0.5.
+! Test for support with: >
+! has('vimscript-2')
+!
+!
+! ==============================================================================
+! 11. No +eval feature *no-eval-feature*
+
+ When the |+eval| feature was disabled at compile time, none of the expression
+ evaluation commands are available. To prevent this from causing Vim scripts
+***************
+*** 12578,12584 ****
+ silently ignored, and the command is executed.
+
+ ==============================================================================
+! 11. The sandbox *eval-sandbox* *sandbox* *E48*
+
+ The 'foldexpr', 'formatexpr', 'includeexpr', 'indentexpr', 'statusline' and
+ 'foldtext' options may be evaluated in a sandbox. This means that you are
+--- 12674,12680 ----
+ silently ignored, and the command is executed.
+
+ ==============================================================================
+! 12. The sandbox *eval-sandbox* *sandbox* *E48*
+
+ The 'foldexpr', 'formatexpr', 'includeexpr', 'indentexpr', 'statusline' and
+ 'foldtext' options may be evaluated in a sandbox. This means that you are
+***************
+*** 12611,12622 ****
+ - sourcing a .vimrc or .exrc in the current directory
+ - while executing in the sandbox
+ - value coming from a modeline
+
+ Note that when in the sandbox and saving an option value and restoring it, the
+ option will still be marked as it was set in the sandbox.
+
+ ==============================================================================
+! 12. Textlock *textlock*
+
+ In a few situations it is not allowed to change the text in the buffer, jump
+ to another window and some other things that might confuse or break what Vim
+--- 12707,12719 ----
+ - sourcing a .vimrc or .exrc in the current directory
+ - while executing in the sandbox
+ - value coming from a modeline
++ - executing a function that was defined in the sandbox
+
+ Note that when in the sandbox and saving an option value and restoring it, the
+ option will still be marked as it was set in the sandbox.
+
+ ==============================================================================
+! 13. Textlock *textlock*
+
+ In a few situations it is not allowed to change the text in the buffer, jump
+ to another window and some other things that might confuse or break what Vim
+***************
+*** 12632,12638 ****
+ - etc.
+
+ ==============================================================================
+! 13. Testing *testing*
+
+ Vim can be tested after building it, usually with "make test".
+ The tests are located in the directory "src/testdir".
+--- 12729,12735 ----
+ - etc.
+
+ ==============================================================================
+! 14. Testing *testing*
+
+ Vim can be tested after building it, usually with "make test".
+ The tests are located in the directory "src/testdir".
+*** ../vim-8.1.1115/src/eval.c 2019-04-04 15:35:42.829132566 +0200
+--- src/eval.c 2019-04-04 18:09:27.848677159 +0200
+***************
+*** 1249,1254 ****
+--- 1249,1255 ----
+ char_u op[2];
+ char_u *argend;
+ int first = TRUE;
++ int concat;
+
+ argend = skip_var_list(arg, &var_count, &semicolon);
+ if (argend == NULL)
+***************
+*** 1256,1269 ****
+ if (argend > arg && argend[-1] == '.') // for var.='str'
+ --argend;
+ expr = skipwhite(argend);
+! if (*expr != '=' && !((vim_strchr((char_u *)"+-*/%.", *expr) != NULL
+! && expr[1] == '=') || STRNCMP(expr, "..=", 3) == 0))
+ {
+ /*
+ * ":let" without "=": list variables
+ */
+ if (*arg == '[')
+ emsg(_(e_invarg));
+ else if (!ends_excmd(*arg))
+ /* ":let var1 var2" */
+ arg = list_arg_vars(eap, arg, &first);
+--- 1257,1275 ----
+ if (argend > arg && argend[-1] == '.') // for var.='str'
+ --argend;
+ expr = skipwhite(argend);
+! concat = expr[0] == '.'
+! && ((expr[1] == '=' && current_sctx.sc_version < 2)
+! || (expr[1] == '.' && expr[2] == '='));
+! if (*expr != '=' && !((vim_strchr((char_u *)"+-*/%", *expr) != NULL
+! && expr[1] == '=') || concat))
+ {
+ /*
+ * ":let" without "=": list variables
+ */
+ if (*arg == '[')
+ emsg(_(e_invarg));
++ else if (expr[0] == '.')
++ emsg(_("E985: .= is not supported with script version 2"));
+ else if (!ends_excmd(*arg))
+ /* ":let var1 var2" */
+ arg = list_arg_vars(eap, arg, &first);
+***************
+*** 3817,3823 ****
+ * Handle fourth level expression:
+ * + number addition
+ * - number subtraction
+! * . string concatenation
+ * .. string concatenation
+ *
+ * "arg" must point to the first non-white of the expression.
+--- 3823,3829 ----
+ * Handle fourth level expression:
+ * + number addition
+ * - number subtraction
+! * . string concatenation (if script version is 1)
+ * .. string concatenation
+ *
+ * "arg" must point to the first non-white of the expression.
+***************
+*** 3838,3843 ****
+--- 3844,3850 ----
+ char_u *s1, *s2;
+ char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN];
+ char_u *p;
++ int concat;
+
+ /*
+ * Get the first variable.
+***************
+*** 3850,3857 ****
+ */
+ for (;;)
+ {
+ op = **arg;
+! if (op != '+' && op != '-' && op != '.')
+ break;
+
+ if ((op != '+' || (rettv->v_type != VAR_LIST
+--- 3857,3867 ----
+ */
+ for (;;)
+ {
++ // "." is only string concatenation when scriptversion is 1
+ op = **arg;
+! concat = op == '.'
+! && (*(*arg + 1) == '.' || current_sctx.sc_version < 2);
+! if (op != '+' && op != '-' && !concat)
+ break;
+
+ if ((op != '+' || (rettv->v_type != VAR_LIST
+***************
+*** 4224,4229 ****
+--- 4234,4250 ----
+ *arg = skipwhite(*arg + 1);
+ end_leader = *arg;
+
++ if (**arg == '.' && (!isdigit(*(*arg + 1))
++ #ifdef FEAT_FLOAT
++ || current_sctx.sc_version < 2
++ #endif
++ ))
++ {
++ semsg(_(e_invexpr2), *arg);
++ ++*arg;
++ return FAIL;
++ }
++
+ switch (**arg)
+ {
+ /*
+***************
+*** 4239,4254 ****
+ case '7':
+ case '8':
+ case '9':
+ {
+ #ifdef FEAT_FLOAT
+! char_u *p = skipdigits(*arg + 1);
+ int get_float = FALSE;
+
+ /* We accept a float when the format matches
+ * "[0-9]\+\.[0-9]\+\([eE][+-]\?[0-9]\+\)\?". This is very
+ * strict to avoid backwards compatibility problems.
+ * Don't look for a float after the "." operator, so that
+ * ":let vers = 1.2.3" doesn't fail. */
+ if (!want_string && p[0] == '.' && vim_isdigit(p[1]))
+ {
+ get_float = TRUE;
+--- 4260,4282 ----
+ case '7':
+ case '8':
+ case '9':
++ case '.':
+ {
+ #ifdef FEAT_FLOAT
+! char_u *p;
+ int get_float = FALSE;
+
+ /* We accept a float when the format matches
+ * "[0-9]\+\.[0-9]\+\([eE][+-]\?[0-9]\+\)\?". This is very
+ * strict to avoid backwards compatibility problems.
++ * With script version 2 and later the leading digit can be
++ * omitted.
+ * Don't look for a float after the "." operator, so that
+ * ":let vers = 1.2.3" doesn't fail. */
++ if (**arg == '.')
++ p = *arg;
++ else
++ p = skipdigits(*arg + 1);
+ if (!want_string && p[0] == '.' && vim_isdigit(p[1]))
+ {
+ get_float = TRUE;
+*** ../vim-8.1.1115/src/ex_cmds.h 2019-02-08 16:50:22.786660536 +0100
+--- src/ex_cmds.h 2019-04-04 16:14:40.560510525 +0200
+***************
+*** 1269,1274 ****
+--- 1269,1277 ----
+ EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding,
+ WORD1|TRLBAR|CMDWIN,
+ ADDR_LINES),
++ EX(CMD_scriptversion, "scriptversion", ex_scriptversion,
++ WORD1|TRLBAR|CMDWIN,
++ ADDR_LINES),
+ EX(CMD_scscope, "scscope", ex_scscope,
+ EXTRA|NOTRLCOM,
+ ADDR_LINES),
+*** ../vim-8.1.1115/src/evalfunc.c 2019-04-04 13:44:31.031594540 +0200
+--- src/evalfunc.c 2019-04-04 15:50:54.400014083 +0200
+***************
+*** 6631,6640 ****
+ #ifdef FEAT_VARTABS
+ "vartabs",
+ #endif
+ #ifdef FEAT_VIMINFO
+ "viminfo",
+ #endif
+! "vertsplit",
+ "virtualedit",
+ "visual",
+ "visualextra",
+--- 6631,6642 ----
+ #ifdef FEAT_VARTABS
+ "vartabs",
+ #endif
++ "vertsplit",
+ #ifdef FEAT_VIMINFO
+ "viminfo",
+ #endif
+! "vimscript-1",
+! "vimscript-2",
+ "virtualedit",
+ "visual",
+ "visualextra",
+*** ../vim-8.1.1115/src/ex_cmds2.c 2019-03-02 10:13:36.792974862 +0100
+--- src/ex_cmds2.c 2019-04-04 16:46:05.875239523 +0200
+***************
+*** 2321,2327 ****
+ else
+ #endif
+ /* Try auto-writing the buffer. If this fails but the buffer no
+! * longer exists it's not changed, that's OK. */
+ if (check_changed(buf, (p_awa ? CCGD_AW : 0)
+ | CCGD_MULTWIN
+ | CCGD_ALLBUF) && bufref_valid(&bufref))
+--- 2321,2327 ----
+ else
+ #endif
+ /* Try auto-writing the buffer. If this fails but the buffer no
+! * longer exists it's not changed, that's OK. */
+ if (check_changed(buf, (p_awa ? CCGD_AW : 0)
+ | CCGD_MULTWIN
+ | CCGD_ALLBUF) && bufref_valid(&bufref))
+***************
+*** 4501,4512 ****
+ * 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);
+ # endif
+--- 4501,4514 ----
+ * Also starts profiling timer for nested script. */
+ save_funccal(&funccalp_entry);
+
++ save_current_sctx = current_sctx;
++ current_sctx.sc_lnum = 0;
++ current_sctx.sc_version = 1;
++
+ // 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.
+ current_sctx.sc_seq = ++last_current_SID_seq;
+ # ifdef UNIX
+ stat_ok = (mch_stat((char *)fname_exp, &st) >= 0);
+ # endif
+***************
+*** 5077,5086 ****
+
+ /*
+ * ":scriptencoding": Set encoding conversion for a sourced script.
+- * Without the multi-byte feature it's simply ignored.
+ */
+ void
+! ex_scriptencoding(exarg_T *eap UNUSED)
+ {
+ struct source_cookie *sp;
+ char_u *name;
+--- 5079,5087 ----
+
+ /*
+ * ":scriptencoding": Set encoding conversion for a sourced script.
+ */
+ void
+! ex_scriptencoding(exarg_T *eap)
+ {
+ struct source_cookie *sp;
+ char_u *name;
+***************
+*** 5108,5113 ****
+--- 5109,5137 ----
+ vim_free(name);
+ }
+
++ /*
++ * ":scriptversion": Set Vim script version for a sourced script.
++ */
++ void
++ ex_scriptversion(exarg_T *eap UNUSED)
++ {
++ int nr;
++
++ if (!getline_equal(eap->getline, eap->cookie, getsourceline))
++ {
++ emsg(_("E984: :scriptversion used outside of a sourced file"));
++ return;
++ }
++
++ nr = getdigits(&eap->arg);
++ if (nr == 0 || *eap->arg != NUL)
++ emsg(_(e_invarg));
++ else if (nr > 2)
++ semsg(_("E999: scriptversion not supported: %d"), nr);
++ else
++ current_sctx.sc_version = nr;
++ }
++
+ #if defined(FEAT_EVAL) || defined(PROTO)
+ /*
+ * ":finish": Mark a sourced file as finished.
+*** ../vim-8.1.1115/src/proto/ex_cmds2.pro 2019-02-15 21:06:05.342289715 +0100
+--- src/proto/ex_cmds2.pro 2019-04-04 16:32:19.198927017 +0200
+***************
+*** 98,103 ****
+--- 98,104 ----
+ void script_line_exec(void);
+ void script_line_end(void);
+ void ex_scriptencoding(exarg_T *eap);
++ void ex_scriptversion(exarg_T *eap);
+ void ex_finish(exarg_T *eap);
+ void do_finish(exarg_T *eap, int reanimate);
+ int source_finished(char_u *(*fgetline)(int, void *, int), void *cookie);
+*** ../vim-8.1.1115/src/structs.h 2019-03-30 13:53:26.174425093 +0100
+--- src/structs.h 2019-04-04 16:24:11.821503583 +0200
+***************
+*** 79,84 ****
+--- 79,85 ----
+ scid_T sc_sid; // script ID
+ int sc_seq; // sourcing sequence number
+ linenr_T sc_lnum; // line number
++ int sc_version; // :scriptversion
+ } sctx_T;
+
+ /*
+*** ../vim-8.1.1115/src/buffer.c 2019-03-30 18:46:57.340077448 +0100
+--- src/buffer.c 2019-04-04 16:25:06.765213438 +0200
+***************
+*** 5493,5498 ****
+--- 5493,5499 ----
+ current_sctx.sc_sid = SID_MODELINE;
+ current_sctx.sc_seq = 0;
+ current_sctx.sc_lnum = 0;
++ current_sctx.sc_version = 1;
+ #endif
+ // Make sure no risky things are executed as a side effect.
+ secure = 1;
+*** ../vim-8.1.1115/src/main.c 2019-04-03 20:30:56.085017544 +0200
+--- src/main.c 2019-04-04 16:29:16.515893423 +0200
+***************
+*** 3166,3171 ****
+--- 3166,3172 ----
+ current_sctx.sc_sid = SID_ENV;
+ current_sctx.sc_seq = 0;
+ current_sctx.sc_lnum = 0;
++ current_sctx.sc_version = 1;
+ #endif
+ do_cmdline_cmd(initstr);
+ sourcing_name = save_sourcing_name;
+*** ../vim-8.1.1115/src/option.c 2019-03-30 18:46:57.360077328 +0100
+--- src/option.c 2019-04-04 16:33:07.574671018 +0200
+***************
+*** 407,413 ****
+ 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
+--- 407,413 ----
+ 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, 1}
+ #else
+ # define SCTX_INIT
+ #endif
+***************
+*** 5911,5916 ****
+--- 5911,5917 ----
+ script_ctx.sc_sid = set_sid;
+ script_ctx.sc_seq = 0;
+ script_ctx.sc_lnum = 0;
++ script_ctx.sc_version = 1;
+ }
+ set_option_sctx_idx(idx, opt_flags, script_ctx);
+ }
+*** ../vim-8.1.1115/src/ex_cmdidxs.h 2019-01-17 15:43:21.765878343 +0100
+--- src/ex_cmdidxs.h 2019-04-04 16:33:38.390507927 +0200
+***************
+*** 24,36 ****
+ /* q */ 348,
+ /* r */ 351,
+ /* s */ 371,
+! /* t */ 438,
+! /* u */ 481,
+! /* v */ 492,
+! /* w */ 510,
+! /* x */ 524,
+! /* y */ 533,
+! /* z */ 534
+ };
+
+ /*
+--- 24,36 ----
+ /* q */ 348,
+ /* r */ 351,
+ /* s */ 371,
+! /* t */ 439,
+! /* u */ 482,
+! /* v */ 493,
+! /* w */ 511,
+! /* x */ 525,
+! /* y */ 534,
+! /* z */ 535
+ };
+
+ /*
+***************
+*** 59,65 ****
+ /* p */ { 1, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 0, 0, 16, 17, 26, 0, 27, 0, 28, 0 },
+ /* 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, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 19, 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 },
+--- 59,65 ----
+ /* p */ { 1, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 0, 0, 16, 17, 26, 0, 27, 0, 28, 0 },
+ /* 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, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 19, 0, 0, 0, 0 },
+! /* s */ { 2, 6, 15, 0, 19, 23, 0, 25, 26, 0, 0, 29, 31, 35, 39, 41, 0, 49, 0, 50, 0, 62, 63, 0, 64, 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 },
+***************
+*** 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;
+--- 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 = 548;
+*** ../vim-8.1.1115/src/testdir/test_eval_stuff.vim 2019-04-04 15:35:42.829132566 +0200
+--- src/testdir/test_eval_stuff.vim 2019-04-04 17:32:12.165223462 +0200
+***************
+*** 123,125 ****
+--- 123,161 ----
+ let a..=b
+ call assert_equal('ab', a)
+ endfunc
++
++ scriptversion 2
++ func Test_string_concat_scriptversion2()
++ let a = 'a'
++ let b = 'b'
++
++ call assert_fails('echo a . b', 'E15:')
++ call assert_fails('let a .= b', 'E985:')
++ call assert_fails('let vers = 1.2.3', 'E15:')
++
++ if has('float')
++ let f = .5
++ call assert_equal(0.5, f)
++ endif
++ endfunc
++
++ scriptversion 1
++ func Test_string_concat_scriptversion1()
++ let a = 'a'
++ let b = 'b'
++
++ echo a . b
++ let a .= b
++ let vers = 1.2.3
++ call assert_equal('123', vers)
++
++ if has('float')
++ call assert_fails('let f = .5', 'E15:')
++ endif
++ endfunc
++
++ func Test_scriptversion()
++ call writefile(['scriptversion 9'], 'Xversionscript')
++ call assert_fails('source Xversionscript', 'E999:')
++ call delete('Xversionscript')
++ endfunc
+*** ../vim-8.1.1115/src/version.c 2019-04-04 15:40:53.011337945 +0200
+--- src/version.c 2019-04-04 15:49:17.156543611 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1116,
+ /**/
+
+--
+Some of the well known MS-Windows errors:
+ ESLEEP Operator fell asleep
+ ENOERR No error yet
+ EDOLLAR OS too expensive
+ EWINDOWS MS-Windows loaded, system in danger
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1117 b/data/vim/patches/8.1.1117
new file mode 100644
index 000000000..70b79a19e
--- /dev/null
+++ b/data/vim/patches/8.1.1117
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1117
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1117
+Problem: Build failure without the +eval feature.
+Solution: Add #ifdef.
+Files: src/ex_cmds2.c
+
+
+*** ../vim-8.1.1116/src/ex_cmds2.c 2019-04-04 18:15:05.770857065 +0200
+--- src/ex_cmds2.c 2019-04-04 19:05:34.683510607 +0200
+***************
+*** 5115,5120 ****
+--- 5115,5121 ----
+ void
+ ex_scriptversion(exarg_T *eap UNUSED)
+ {
++ #ifdef FEAT_EVAL
+ int nr;
+
+ if (!getline_equal(eap->getline, eap->cookie, getsourceline))
+***************
+*** 5130,5135 ****
+--- 5131,5137 ----
+ semsg(_("E999: scriptversion not supported: %d"), nr);
+ else
+ current_sctx.sc_version = nr;
++ #endif
+ }
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+*** ../vim-8.1.1116/src/version.c 2019-04-04 18:15:05.770857065 +0200
+--- src/version.c 2019-04-04 19:03:26.268129228 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1117,
+ /**/
+
+--
+Some of the well known MS-Windows errors:
+ ETIME Wrong time, wait a little while
+ ECRASH Try again...
+ EDETECT Unable to detect errors
+ EOVER You lost! Play another game?
+ ENOCLUE Eh, what did you want?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1118 b/data/vim/patches/8.1.1118
new file mode 100644
index 000000000..a5bb18311
--- /dev/null
+++ b/data/vim/patches/8.1.1118
@@ -0,0 +1,141 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1118
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1118
+Problem: A couple of conditions are hard to understand.
+Solution: Split the conditions into pieces. (Ozaki Kiichi, closes #3879)
+Files: src/getchar.c, src/os_unix.c
+
+
+*** ../vim-8.1.1117/src/getchar.c 2019-03-30 18:46:57.348077402 +0100
+--- src/getchar.c 2019-04-04 20:05:56.187300570 +0200
+***************
+*** 2030,2035 ****
+--- 2030,2037 ----
+ */
+ for (;;)
+ {
++ long wait_time;
++
+ /*
+ * ui_breakcheck() is slow, don't use it too often when
+ * inside a mapping. But call it each time for typed
+***************
+*** 2828,2845 ****
+ // that has a <Nop> RHS.
+ timedout = FALSE;
+
+ wait_tb_len = typebuf.tb_len;
+ c = inchar(typebuf.tb_buf + typebuf.tb_off + typebuf.tb_len,
+ typebuf.tb_buflen - typebuf.tb_off - typebuf.tb_len - 1,
+! !advance
+! ? 0
+! : ((typebuf.tb_len == 0
+! || !(p_timeout || (p_ttimeout
+! && keylen == KEYLEN_PART_KEY)))
+! ? -1L
+! : ((keylen == KEYLEN_PART_KEY && p_ttm >= 0)
+! ? p_ttm
+! : p_tm)));
+
+ #ifdef FEAT_CMDL_INFO
+ if (i != 0)
+--- 2830,2854 ----
+ // that has a <Nop> RHS.
+ timedout = FALSE;
+
++ if (advance)
++ {
++ if (typebuf.tb_len == 0
++ || !(p_timeout
++ || (p_ttimeout && keylen == KEYLEN_PART_KEY)))
++ // blocking wait
++ wait_time = -1L;
++ else if (keylen == KEYLEN_PART_KEY && p_ttm >= 0)
++ wait_time = p_ttm;
++ else
++ wait_time = p_tm;
++ }
++ else
++ wait_time = 0;
++
+ wait_tb_len = typebuf.tb_len;
+ c = inchar(typebuf.tb_buf + typebuf.tb_off + typebuf.tb_len,
+ typebuf.tb_buflen - typebuf.tb_off - typebuf.tb_len - 1,
+! wait_time);
+
+ #ifdef FEAT_CMDL_INFO
+ if (i != 0)
+*** ../vim-8.1.1117/src/os_unix.c 2019-03-30 18:46:57.360077328 +0100
+--- src/os_unix.c 2019-04-04 20:08:33.214471353 +0200
+***************
+*** 5607,5625 ****
+ close(fd_err[1]);
+ if (channel != NULL)
+ {
+! int in_fd = use_file_for_in || use_null_for_in
+! ? INVALID_FD : fd_in[1] < 0 ? pty_master_fd : fd_in[1];
+! int out_fd = use_file_for_out || use_null_for_out
+! ? INVALID_FD : fd_out[0] < 0 ? pty_master_fd : fd_out[0];
+! /* When using pty_master_fd only set it for stdout, do not duplicate it
+! * for stderr, it only needs to be read once. */
+! int err_fd = use_out_for_err || use_file_for_err || use_null_for_err
+! ? INVALID_FD
+! : fd_err[0] >= 0
+! ? fd_err[0]
+! : (out_fd == pty_master_fd
+! ? INVALID_FD
+! : pty_master_fd);
+
+ channel_set_pipes(channel, in_fd, out_fd, err_fd);
+ channel_set_job(channel, job, options);
+--- 5607,5631 ----
+ close(fd_err[1]);
+ if (channel != NULL)
+ {
+! int in_fd = INVALID_FD;
+! int out_fd = INVALID_FD;
+! int err_fd = INVALID_FD;
+!
+! if (!(use_file_for_in || use_null_for_in))
+! in_fd = fd_in[1] >= 0 ? fd_in[1] : pty_master_fd;
+!
+! if (!(use_file_for_out || use_null_for_out))
+! out_fd = fd_out[0] >= 0 ? fd_out[0] : pty_master_fd;
+!
+! // When using pty_master_fd only set it for stdout, do not duplicate
+! // it for stderr, it only needs to be read once.
+! if (!(use_out_for_err || use_file_for_err || use_null_for_err))
+! {
+! if (fd_err[0] >= 0)
+! err_fd = fd_err[0];
+! else if (out_fd != pty_master_fd)
+! err_fd = pty_master_fd;
+! }
+
+ channel_set_pipes(channel, in_fd, out_fd, err_fd);
+ channel_set_job(channel, job, options);
+*** ../vim-8.1.1117/src/version.c 2019-04-04 19:06:11.147333162 +0200
+--- src/version.c 2019-04-04 20:00:40.008936695 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1118,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+197. Your desk collapses under the weight of your computer peripherals.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1119 b/data/vim/patches/8.1.1119
new file mode 100644
index 000000000..e58bf52c6
--- /dev/null
+++ b/data/vim/patches/8.1.1119
Binary files differ
diff --git a/data/vim/patches/8.1.1120 b/data/vim/patches/8.1.1120
new file mode 100644
index 000000000..8a4dbd67e
--- /dev/null
+++ b/data/vim/patches/8.1.1120
@@ -0,0 +1,424 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1120
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1120
+Problem: Cannot easily get directory entry matches.
+Solution: Add the readdir() function. (Yasuhiro Matsumoto, closes #2439)
+Files: runtime/doc/eval.txt, src/eval.c, src/evalfunc.c, src/misc1.c,
+ src/proto/eval.pro, src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.1119/runtime/doc/eval.txt 2019-04-04 18:15:05.762857109 +0200
+--- runtime/doc/eval.txt 2019-04-05 22:34:13.788012348 +0200
+***************
+*** 2486,2491 ****
+--- 2507,2515 ----
+ pyxeval({expr}) any evaluate |python_x| expression
+ range({expr} [, {max} [, {stride}]])
+ List items from {expr} to {max}
++ readdir({directory} [, {expr}])
++ List file names on {dir} with evalating
++ {expr}
+ readfile({fname} [, {type} [, {max}]])
+ List get list of lines from file {fname}
+ reg_executing() String get the executing register name
+***************
+*** 7206,7211 ****
+--- 7259,7291 ----
+ range(0) " []
+ range(2, 0) " error!
+ <
++ *readdir()*
++ readdir({directory} [, {expr}])
++ Return a list with file and directory names in {directory}.
++
++ When {expr} is omitted all entries are included.
++ When {expr} is given, it is evaluated to check what to do:
++ If {expr} results in -1 then no further entries will
++ be handled.
++ If {expr} results in 0 then this entry will not be
++ added to the list.
++ If {expr} results in 1 then this entry will be added
++ to the list.
++ Each time {expr} is evaluated |v:val| is set to the entry name.
++ When {expr} is a function the name is passed as the argument.
++ For example, to get a list of files ending in ".txt": >
++ readdir(dirname, {n -> n =~ '.txt$'})
++ < To skip hidden and backup files: >
++ readdir(dirname, {n -> n !~ '^\.\|\~$'})
++
++ < If you want to get a directory tree: >
++ function! s:tree(dir)
++ return {a:dir : map(readdir(a:dir),
++ \ {_, x -> isdirectory(x) ?
++ \ {x : s:tree(a:dir . '/' . x)} : x})}
++ endfunction
++ echo s:tree(".")
++ <
+ *readfile()*
+ readfile({fname} [, {type} [, {max}]])
+ Read file {fname} and return a |List|, each line of the file
+*** ../vim-8.1.1119/src/eval.c 2019-04-04 18:15:05.766857086 +0200
+--- src/eval.c 2019-04-05 22:05:53.228139171 +0200
+***************
+*** 753,759 ****
+ return ret;
+ }
+
+! static int
+ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv)
+ {
+ char_u *s;
+--- 753,759 ----
+ return ret;
+ }
+
+! int
+ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv)
+ {
+ char_u *s;
+***************
+*** 966,972 ****
+ * Save the current typeval in "save_tv".
+ * When not used yet add the variable to the v: hashtable.
+ */
+! static void
+ prepare_vimvar(int idx, typval_T *save_tv)
+ {
+ *save_tv = vimvars[idx].vv_tv;
+--- 966,972 ----
+ * Save the current typeval in "save_tv".
+ * When not used yet add the variable to the v: hashtable.
+ */
+! void
+ prepare_vimvar(int idx, typval_T *save_tv)
+ {
+ *save_tv = vimvars[idx].vv_tv;
+***************
+*** 978,984 ****
+ * Restore v: variable "idx" to typeval "save_tv".
+ * When no longer defined, remove the variable from the v: hashtable.
+ */
+! static void
+ restore_vimvar(int idx, typval_T *save_tv)
+ {
+ hashitem_T *hi;
+--- 978,984 ----
+ * Restore v: variable "idx" to typeval "save_tv".
+ * When no longer defined, remove the variable from the v: hashtable.
+ */
+! void
+ restore_vimvar(int idx, typval_T *save_tv)
+ {
+ hashitem_T *hi;
+*** ../vim-8.1.1119/src/evalfunc.c 2019-04-04 18:15:05.766857086 +0200
+--- src/evalfunc.c 2019-04-05 22:46:34.967258329 +0200
+***************
+*** 319,324 ****
+--- 319,325 ----
+ static void f_pyxeval(typval_T *argvars, typval_T *rettv);
+ #endif
+ static void f_range(typval_T *argvars, typval_T *rettv);
++ static void f_readdir(typval_T *argvars, typval_T *rettv);
+ static void f_readfile(typval_T *argvars, typval_T *rettv);
+ static void f_reg_executing(typval_T *argvars, typval_T *rettv);
+ static void f_reg_recording(typval_T *argvars, typval_T *rettv);
+***************
+*** 819,824 ****
+--- 820,826 ----
+ {"pyxeval", 1, 1, f_pyxeval},
+ #endif
+ {"range", 1, 3, f_range},
++ {"readdir", 1, 2, f_readdir},
+ {"readfile", 1, 3, f_readfile},
+ {"reg_executing", 0, 0, f_reg_executing},
+ {"reg_recording", 0, 0, f_reg_recording},
+***************
+*** 9118,9123 ****
+--- 9120,9308 ----
+ }
+
+ /*
++ * Evaluate "expr" for readdir().
++ */
++ static int
++ readdir_checkitem(typval_T *expr, char_u *name)
++ {
++ typval_T save_val;
++ typval_T rettv;
++ typval_T argv[2];
++ int retval = 0;
++ int error = FALSE;
++
++ prepare_vimvar(VV_VAL, &save_val);
++ set_vim_var_string(VV_VAL, name, -1);
++ argv[0].v_type = VAR_STRING;
++ argv[0].vval.v_string = name;
++
++ if (eval_expr_typval(expr, argv, 1, &rettv) == FAIL)
++ goto theend;
++
++ retval = tv_get_number_chk(&rettv, &error);
++ if (error)
++ retval = -1;
++ clear_tv(&rettv);
++
++ theend:
++ set_vim_var_string(VV_VAL, NULL, 0);
++ restore_vimvar(VV_VAL, &save_val);
++ return retval;
++ }
++
++ /*
++ * "readdir()" function
++ */
++ static void
++ f_readdir(typval_T *argvars, typval_T *rettv)
++ {
++ typval_T *expr;
++ int failed = FALSE;
++ char_u *path;
++ garray_T ga;
++ int i;
++ #ifdef MSWIN
++ char_u *buf, *p;
++ WIN32_FIND_DATA fb;
++ int ok;
++ HANDLE hFind = INVALID_HANDLE_VALUE;
++ WIN32_FIND_DATAW wfb;
++ WCHAR *wn = NULL; // UCS-2 name, NULL when not used.
++ #endif
++
++ if (rettv_list_alloc(rettv) == FAIL)
++ return;
++ path = tv_get_string(&argvars[0]);
++ expr = &argvars[1];
++ ga_init2(&ga, (int)sizeof(char *), 20);
++
++ #ifdef MSWIN
++ buf = alloc((int)MAXPATHL);
++ if (buf == NULL)
++ return;
++ STRNCPY(buf, path, MAXPATHL-5);
++ p = vim_strpbrk(path, (char_u *)"\\/");
++ if (p != NULL)
++ *p = NUL;
++ STRCAT(buf, "\\*");
++
++ wn = enc_to_utf16(buf, NULL);
++ if (wn != NULL)
++ hFind = FindFirstFileW(wn, &wfb);
++ ok = (hFind != INVALID_HANDLE_VALUE);
++ if (!ok)
++ smsg(_(e_notopen), path);
++ else
++ {
++ while (ok)
++ {
++ int ignore;
++
++ p = utf16_to_enc(wfb.cFileName, NULL); // p is allocated here
++ if (p == NULL)
++ break; // out of memory
++
++ ignore = p[0] == '.' && (p[1] == NUL
++ || (p[1] == '.' && p[2] == NUL));
++ if (!ignore && expr->v_type != VAR_UNKNOWN)
++ {
++ int r = readdir_checkitem(expr, p);
++
++ if (r < 0)
++ {
++ vim_free(p);
++ break;
++ }
++ if (r == 0)
++ ignore = TRUE;
++ }
++
++ if (!ignore)
++ {
++ if (ga_grow(&ga, 1) == OK)
++ ((char_u**)ga.ga_data)[ga.ga_len++] = vim_strsave(p);
++ else
++ {
++ failed = TRUE;
++ vim_free(p);
++ break;
++ }
++ }
++
++ vim_free(p);
++ ok = FindNextFileW(hFind, &wfb);
++ }
++ FindClose(hFind);
++ }
++
++ vim_free(buf);
++ vim_free(wn);
++ #else
++ DIR *dirp;
++ struct dirent *dp;
++ char_u *p;
++
++ dirp = opendir((char *)path);
++ if (dirp == NULL)
++ smsg(_(e_notopen), path);
++ else
++ {
++ for (;;)
++ {
++ int ignore;
++
++ dp = readdir(dirp);
++ if (dp == NULL)
++ break;
++ p = (char_u *)dp->d_name;
++
++ ignore = p[0] == '.' &&
++ (p[1] == NUL ||
++ (p[1] == '.' && p[2] == NUL));
++ if (!ignore && expr->v_type != VAR_UNKNOWN)
++ {
++ int r = readdir_checkitem(expr, p);
++
++ if (r < 0)
++ break;
++ if (r == 0)
++ ignore = TRUE;
++ }
++
++ if (!ignore)
++ {
++ if (ga_grow(&ga, 1) == OK)
++ ((char_u**)ga.ga_data)[ga.ga_len++] = vim_strsave(p);
++ else
++ {
++ failed = TRUE;
++ break;
++ }
++ }
++ }
++
++ closedir(dirp);
++ }
++ #endif
++
++ rettv->vval.v_list = list_alloc();
++ if (!failed && rettv->vval.v_list != NULL)
++ {
++ ++rettv->vval.v_list->lv_refcount;
++ sort_strings((char_u **)ga.ga_data, ga.ga_len);
++ for (i = 0; i < ga.ga_len; i++)
++ {
++ p = ((char_u **)ga.ga_data)[i];
++ list_append_string(rettv->vval.v_list, p, -1);
++ }
++ }
++ for (i = 0; i < ga.ga_len; i++)
++ vim_free(((char_u **)ga.ga_data)[i]);
++
++ ga_clear(&ga);
++ }
++
++ /*
+ * "readfile()" function
+ */
+ static void
+*** ../vim-8.1.1119/src/misc1.c 2019-04-02 22:15:51.344273531 +0200
+--- src/misc1.c 2019-04-05 22:16:03.227748463 +0200
+***************
+*** 5790,5795 ****
+--- 5790,5798 ----
+ while (ok)
+ {
+ p = utf16_to_enc(wfb.cFileName, NULL); // p is allocated here
++ if (p == NULL)
++ break; // out of memory
++
+ // Ignore entries starting with a dot, unless when asked for. Accept
+ // all entries found with "matchname".
+ if ((p[0] != '.' || starts_with_dot
+*** ../vim-8.1.1119/src/proto/eval.pro 2019-02-11 22:00:07.667917634 +0100
+--- src/proto/eval.pro 2019-04-05 22:47:22.082959411 +0200
+***************
+*** 10,21 ****
+--- 10,24 ----
+ void eval_diff(char_u *origfile, char_u *newfile, char_u *outfile);
+ void eval_patch(char_u *origfile, char_u *difffile, char_u *outfile);
+ int eval_to_bool(char_u *arg, int *error, char_u **nextcmd, int skip);
++ int eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv);
+ int eval_expr_to_bool(typval_T *expr, int *error);
+ char_u *eval_to_string_skip(char_u *arg, char_u **nextcmd, int skip);
+ int skip_expr(char_u **pp);
+ char_u *eval_to_string(char_u *arg, char_u **nextcmd, int convert);
+ char_u *eval_to_string_safe(char_u *arg, char_u **nextcmd, int use_sandbox);
+ varnumber_T eval_to_number(char_u *expr);
++ void prepare_vimvar(int idx, typval_T *save_tv);
++ void restore_vimvar(int idx, typval_T *save_tv);
+ 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);
+*** ../vim-8.1.1119/src/testdir/test_functions.vim 2019-03-30 21:51:25.021550461 +0100
+--- src/testdir/test_functions.vim 2019-04-05 22:38:40.294287555 +0200
+***************
+*** 1401,1403 ****
+--- 1401,1433 ----
+ call assert_equal(uname =~? 'CYGWIN\|MSYS', has('win32unix'))
+ endif
+ endfunc
++
++ func Test_readdir()
++ call mkdir('Xdir')
++ call writefile([], 'Xdir/foo.txt')
++ call writefile([], 'Xdir/bar.txt')
++ call mkdir('Xdir/dir')
++
++ " All results
++ let files = readdir('Xdir')
++ call assert_equal(['bar.txt', 'dir', 'foo.txt'], sort(files))
++
++ " Only results containing "f"
++ let files = readdir('Xdir', { x -> stridx(x, 'f') !=- 1 })
++ call assert_equal(['foo.txt'], sort(files))
++
++ " Only .txt files
++ let files = readdir('Xdir', { x -> x =~ '.txt$' })
++ call assert_equal(['bar.txt', 'foo.txt'], sort(files))
++
++ " Only .txt files with string
++ let files = readdir('Xdir', 'v:val =~ ".txt$"')
++ call assert_equal(['bar.txt', 'foo.txt'], sort(files))
++
++ " Limit to 1 result.
++ let l = []
++ let files = readdir('Xdir', {x -> len(add(l, x)) == 2 ? -1 : 1})
++ call assert_equal(1, len(files))
++
++ call delete('Xdir', 'rf')
++ endfunc
+*** ../vim-8.1.1119/src/version.c 2019-04-04 20:31:59.094873282 +0200
+--- src/version.c 2019-04-05 22:06:37.875886164 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1120,
+ /**/
+
+--
+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.1121 b/data/vim/patches/8.1.1121
new file mode 100644
index 000000000..484140eeb
--- /dev/null
+++ b/data/vim/patches/8.1.1121
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1121
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1121
+Problem: Test for term_gettitle() was disabled.
+Solution: Enable the test and bail out only when it doesn't work. (Dominique
+ Pelle, closes #3776)
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1120/src/testdir/test_terminal.vim 2019-03-25 23:01:34.324897627 +0100
+--- src/testdir/test_terminal.vim 2019-04-06 12:38:53.096239041 +0200
+***************
+*** 1842,1858 ****
+ endfunc
+
+ func Test_term_gettitle()
+- if !has('title') || empty(&t_ts)
+- return
+- endif
+- " TODO: this fails on Travis
+- return
+-
+ " term_gettitle() returns an empty string for a non-terminal buffer
+! " or for a non-existing buffer.
+ call assert_equal('', term_gettitle(bufnr('%')))
+ call assert_equal('', term_gettitle(bufnr('$') + 1))
+
+ let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'])
+ call WaitForAssert({-> assert_equal('[No Name] - VIM', term_gettitle(term)) })
+
+--- 1842,1856 ----
+ endfunc
+
+ func Test_term_gettitle()
+ " term_gettitle() returns an empty string for a non-terminal buffer
+! " and for a non-existing buffer.
+ call assert_equal('', term_gettitle(bufnr('%')))
+ call assert_equal('', term_gettitle(bufnr('$') + 1))
+
++ if !has('title') || &title == 0 || empty(&t_ts)
++ throw "Skipped: can't get/set title"
++ endif
++
+ let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'])
+ call WaitForAssert({-> assert_equal('[No Name] - VIM', term_gettitle(term)) })
+
+*** ../vim-8.1.1120/src/version.c 2019-04-05 22:50:35.025737353 +0200
+--- src/version.c 2019-04-06 12:38:00.676500810 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1121,
+ /**/
+
+--
+ "You mean there really is an answer?"
+ "Yes! But you're not going to like it!"
+ "Oh do please tell us!"
+ "You're really not going to like it!"
+ "but we MUST know - tell us"
+ "Alright, the answer is...."
+ "yes..."
+ "... is ..."
+ "yes... come on!"
+ "is 42!"
+ (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.1122 b/data/vim/patches/8.1.1122
new file mode 100644
index 000000000..d9350cd15
--- /dev/null
+++ b/data/vim/patches/8.1.1122
@@ -0,0 +1,334 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1122
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1122
+Problem: char2nr() does not handle composing characters.
+Solution: Add str2list() and list2str(). (Ozaki Kiichi, closes #4190)
+Files: runtime/doc/eval.txt, runtime/doc/usr_41.txt, src/evalfunc.c,
+ src/testdir/test_utf8.vim
+
+
+*** ../vim-8.1.1121/runtime/doc/eval.txt 2019-04-05 22:50:35.021737378 +0200
+--- runtime/doc/eval.txt 2019-04-06 12:56:01.827098437 +0200
+***************
+*** 2421,2426 ****
+--- 2442,2448 ----
+ line({expr}) Number line nr of cursor, last line or mark
+ line2byte({lnum}) Number byte count of line {lnum}
+ lispindent({lnum}) Number Lisp indent for line {lnum}
++ list2str({list} [, {utf8}]) String turn numbers in {list} into a String
+ localtime() Number current time
+ log({expr}) Float natural logarithm (base e) of {expr}
+ log10({expr}) Float logarithm of Float {expr} to base 10
+***************
+*** 2588,2593 ****
+--- 2608,2615 ----
+ List make |List| from {pat} separated {expr}
+ sqrt({expr}) Float square root of {expr}
+ str2float({expr}) Float convert String to Float
++ str2list({expr} [, {utf8}]) List convert each character of {expr} to
++ ASCII/UTF8 value
+ str2nr({expr} [, {base}]) Number convert String to Number
+ strchars({expr} [, {skipcc}]) Number character length of the String {expr}
+ strcharpart({str}, {start} [, {len}])
+***************
+*** 6157,6162 ****
+--- 6197,6216 ----
+ When {lnum} is invalid or Vim was not compiled the
+ |+lispindent| feature, -1 is returned.
+
++ list2str({list} [, {utf8}]) *list2str()*
++ Convert each number in {list} to a character string can
++ concatenate them all. Examples: >
++ list2str([32]) returns " "
++ list2str([65, 66, 67]) returns "ABC"
++ < The same can be done (slowly) with: >
++ join(map(list, {nr, val -> nr2char(val)}), '')
++ < |str2list()| does the opposite.
++
++ When {utf8} is omitted or zero, the current 'encoding' is used.
++ With {utf8} is 1, always return utf-8 characters.
++ With utf-8 composing characters work as expected: >
++ list2str([97, 769]) returns "á"
++ <
+ localtime() *localtime()*
+ Return the current time, measured as seconds since 1st Jan
+ 1970. See also |strftime()| and |getftime()|.
+***************
+*** 8667,8672 ****
+--- 8742,8759 ----
+ let f = str2float(substitute(text, ',', '', 'g'))
+ < {only available when compiled with the |+float| feature}
+
++ str2list({expr} [, {utf8}]) *str2list()*
++ Return a list containing the number values which represent
++ each character in String {expr}. Examples: >
++ str2list(" ") returns [32]
++ str2list("ABC") returns [65, 66, 67]
++ < |list2str()| does the opposite.
++
++ When {utf8} is omitted or zero, the current 'encoding' is used.
++ With {utf8} set to 1, always treat the String as utf-8
++ characters. With utf-8 composing characters are handled
++ properly: >
++ str2list("á") returns [97, 769]
+
+ str2nr({expr} [, {base}]) *str2nr()*
+ Convert string {expr} to a number.
+*** ../vim-8.1.1121/runtime/doc/usr_41.txt 2019-03-29 14:16:34.142861770 +0100
+--- runtime/doc/usr_41.txt 2019-04-06 12:52:38.452115001 +0200
+***************
+*** 577,584 ****
+ the function name to jump to detailed help on it.
+
+ String manipulation: *string-functions*
+! nr2char() get a character by its ASCII value
+! char2nr() get ASCII value of a character
+ str2nr() convert a string to a Number
+ str2float() convert a string to a Float
+ printf() format a string according to % items
+--- 577,586 ----
+ the function name to jump to detailed help on it.
+
+ String manipulation: *string-functions*
+! nr2char() get a character by its number value
+! list2str() get a character string from a list of numbers
+! char2nr() get number value of a character
+! str2list() get list of numbers from a string
+ str2nr() convert a string to a Number
+ str2float() convert a string to a Float
+ printf() format a string according to % items
+*** ../vim-8.1.1121/src/evalfunc.c 2019-04-05 22:50:35.021737378 +0200
+--- src/evalfunc.c 2019-04-06 13:15:54.342175479 +0200
+***************
+*** 262,267 ****
+--- 262,268 ----
+ static void f_line(typval_T *argvars, typval_T *rettv);
+ static void f_line2byte(typval_T *argvars, typval_T *rettv);
+ static void f_lispindent(typval_T *argvars, typval_T *rettv);
++ static void f_list2str(typval_T *argvars, typval_T *rettv);
+ static void f_localtime(typval_T *argvars, typval_T *rettv);
+ #ifdef FEAT_FLOAT
+ static void f_log(typval_T *argvars, typval_T *rettv);
+***************
+*** 401,406 ****
+--- 402,408 ----
+ static void f_sqrt(typval_T *argvars, typval_T *rettv);
+ static void f_str2float(typval_T *argvars, typval_T *rettv);
+ #endif
++ static void f_str2list(typval_T *argvars, typval_T *rettv);
+ static void f_str2nr(typval_T *argvars, typval_T *rettv);
+ static void f_strchars(typval_T *argvars, typval_T *rettv);
+ #ifdef HAVE_STRFTIME
+***************
+*** 752,757 ****
+--- 754,760 ----
+ {"line", 1, 1, f_line},
+ {"line2byte", 1, 1, f_line2byte},
+ {"lispindent", 1, 1, f_lispindent},
++ {"list2str", 1, 2, f_list2str},
+ {"localtime", 0, 0, f_localtime},
+ #ifdef FEAT_FLOAT
+ {"log", 1, 1, f_log},
+***************
+*** 902,907 ****
+--- 905,911 ----
+ {"sqrt", 1, 1, f_sqrt},
+ {"str2float", 1, 1, f_str2float},
+ #endif
++ {"str2list", 1, 2, f_str2list},
+ {"str2nr", 1, 2, f_str2nr},
+ {"strcharpart", 2, 3, f_strcharpart},
+ {"strchars", 1, 2, f_strchars},
+***************
+*** 7850,7855 ****
+--- 7854,7914 ----
+ }
+
+ /*
++ * "list2str()" function
++ */
++ static void
++ f_list2str(typval_T *argvars, typval_T *rettv)
++ {
++ list_T *l;
++ listitem_T *li;
++ garray_T ga;
++ int utf8 = FALSE;
++
++ rettv->v_type = VAR_STRING;
++ rettv->vval.v_string = NULL;
++ if (argvars[0].v_type != VAR_LIST)
++ {
++ emsg(_(e_invarg));
++ return;
++ }
++
++ l = argvars[0].vval.v_list;
++ if (l == NULL)
++ return; // empty list results in empty string
++
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ utf8 = (int)tv_get_number_chk(&argvars[1], NULL);
++
++ ga_init2(&ga, 1, 80);
++ if (has_mbyte || utf8)
++ {
++ char_u buf[MB_MAXBYTES + 1];
++ int (*char2bytes)(int, char_u *);
++
++ if (utf8 || enc_utf8)
++ char2bytes = utf_char2bytes;
++ else
++ char2bytes = mb_char2bytes;
++
++ for (li = l->lv_first; li != NULL; li = li->li_next)
++ {
++ buf[(*char2bytes)(tv_get_number(&li->li_tv), buf)] = NUL;
++ ga_concat(&ga, buf);
++ }
++ ga_append(&ga, NUL);
++ }
++ else if (ga_grow(&ga, list_len(l) + 1) == OK)
++ {
++ for (li = l->lv_first; li != NULL; li = li->li_next)
++ ga_append(&ga, tv_get_number(&li->li_tv));
++ ga_append(&ga, NUL);
++ }
++
++ rettv->v_type = VAR_STRING;
++ rettv->vval.v_string = ga.ga_data;
++ }
++
++ /*
+ * "localtime()" function
+ */
+ static void
+***************
+*** 12901,12906 ****
+--- 12960,13006 ----
+ #endif
+
+ /*
++ * "str2list()" function
++ */
++ static void
++ f_str2list(typval_T *argvars, typval_T *rettv)
++ {
++ char_u *p;
++ int utf8 = FALSE;
++
++ if (rettv_list_alloc(rettv) == FAIL)
++ return;
++
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ utf8 = (int)tv_get_number_chk(&argvars[1], NULL);
++
++ p = tv_get_string(&argvars[0]);
++
++ if (has_mbyte || utf8)
++ {
++ int (*ptr2len)(char_u *);
++ int (*ptr2char)(char_u *);
++
++ if (utf8 || enc_utf8)
++ {
++ ptr2len = utf_ptr2len;
++ ptr2char = utf_ptr2char;
++ }
++ else
++ {
++ ptr2len = mb_ptr2len;
++ ptr2char = mb_ptr2char;
++ }
++
++ for ( ; *p != NUL; p += (*ptr2len)(p))
++ list_append_number(rettv->vval.v_list, (*ptr2char)(p));
++ }
++ else
++ for ( ; *p != NUL; ++p)
++ list_append_number(rettv->vval.v_list, *p);
++ }
++
++ /*
+ * "str2nr()" function
+ */
+ static void
+*** ../vim-8.1.1121/src/testdir/test_utf8.vim 2019-03-30 15:44:14.027783548 +0100
+--- src/testdir/test_utf8.vim 2019-04-06 13:13:15.575213851 +0200
+***************
+*** 62,67 ****
+--- 62,110 ----
+ call assert_equal(2, virtcol("']"))
+ endfunc
+
++ func Test_list2str_str2list_utf8()
++ " One Unicode codepoint
++ let s = "\u3042\u3044"
++ let l = [0x3042, 0x3044]
++ call assert_equal(l, str2list(s, 1))
++ call assert_equal(s, list2str(l, 1))
++ if &enc ==# 'utf-8'
++ call assert_equal(str2list(s), str2list(s, 1))
++ call assert_equal(list2str(l), list2str(l, 1))
++ endif
++
++ " With composing characters
++ let s = "\u304b\u3099\u3044"
++ let l = [0x304b, 0x3099, 0x3044]
++ call assert_equal(l, str2list(s, 1))
++ call assert_equal(s, list2str(l, 1))
++ if &enc ==# 'utf-8'
++ call assert_equal(str2list(s), str2list(s, 1))
++ call assert_equal(list2str(l), list2str(l, 1))
++ endif
++
++ " Null list is the same as an empty list
++ call assert_equal('', list2str([]))
++ call assert_equal('', list2str(test_null_list()))
++ endfunc
++
++ func Test_list2str_str2list_latin1()
++ " When 'encoding' is not multi-byte can still get utf-8 string.
++ " But we need to create the utf-8 string while 'encoding' is utf-8.
++ let s = "\u3042\u3044"
++ let l = [0x3042, 0x3044]
++
++ let save_encoding = &encoding
++ set encoding=latin1
++
++ let lres = str2list(s, 1)
++ let sres = list2str(l, 1)
++
++ let &encoding = save_encoding
++ call assert_equal(l, lres)
++ call assert_equal(s, sres)
++ endfunc
++
+ func Test_screenchar_utf8()
+ new
+
+*** ../vim-8.1.1121/src/version.c 2019-04-06 12:39:47.439967638 +0200
+--- src/version.c 2019-04-06 12:45:29.802257255 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1122,
+ /**/
+
+--
+Your mouse has moved. Windows must be restarted for the change
+to take effect. Reboot now?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1123 b/data/vim/patches/8.1.1123
new file mode 100644
index 000000000..ad96b1932
--- /dev/null
+++ b/data/vim/patches/8.1.1123
@@ -0,0 +1,354 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1123
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1123
+Problem: No way to avoid filtering for autocomplete function, causing
+ flickering of the popup menu.
+Solution: Add the "equal" field to complete items. (closes #3887)
+Files: runtime/doc/insert.txt, src/insexpand.c,
+ src/testdir/test_popup.vim
+
+
+*** ../vim-8.1.1122/runtime/doc/insert.txt 2019-03-29 12:19:34.949348952 +0100
+--- runtime/doc/insert.txt 2019-04-06 13:28:26.273579773 +0200
+***************
+*** 1104,1109 ****
+--- 1105,1113 ----
+ icase when non-zero case is to be ignored when comparing
+ items to be equal; when omitted zero is used, thus
+ items that only differ in case are added
++ equal when non-zero, always treat this item to be equal when
++ comparing. Which means, "equal=1" disables filtering
++ of this item.
+ dup when non-zero this match will be added even when an
+ item with the same word is already present.
+ empty when non-zero this match will be added even when it is
+***************
+*** 1111,1120 ****
+ user_data custom data which is associated with the item and
+ available in |v:completed_item|
+
+! All of these except "icase", "dup" and "empty" must be a string. If an item
+! does not meet these requirements then an error message is given and further
+! items in the list are not used. You can mix string and Dictionary items in
+! the returned list.
+
+ The "menu" item is used in the popup menu and may be truncated, thus it should
+ be relatively short. The "info" item can be longer, it will be displayed in
+--- 1115,1124 ----
+ user_data custom data which is associated with the item and
+ available in |v:completed_item|
+
+! All of these except "icase", "equal", "dup" and "empty" must be a string. If
+! an item does not meet these requirements then an error message is given and
+! further items in the list are not used. You can mix string and Dictionary
+! items in the returned list.
+
+ The "menu" item is used in the popup menu and may be truncated, thus it should
+ be relatively short. The "info" item can be longer, it will be displayed in
+*** ../vim-8.1.1122/src/insexpand.c 2019-03-30 18:46:57.344077426 +0100
+--- src/insexpand.c 2019-04-06 13:37:17.079078108 +0200
+***************
+*** 101,116 ****
+ {
+ compl_T *cp_next;
+ compl_T *cp_prev;
+! char_u *cp_str; /* matched text */
+! char cp_icase; /* TRUE or FALSE: ignore case */
+! char_u *(cp_text[CPT_COUNT]); /* text for the menu */
+! char_u *cp_fname; /* file containing the match, allocated when
+! * cp_flags has FREE_FNAME */
+! int cp_flags; /* ORIGINAL_TEXT, CONT_S_IPOS or FREE_FNAME */
+! int cp_number; /* sequence number */
+ };
+
+! # define ORIGINAL_TEXT (1) /* the original text when the expansion begun */
+ # define FREE_FNAME (2)
+
+ static char e_hitend[] = N_("Hit end of paragraph");
+--- 101,118 ----
+ {
+ compl_T *cp_next;
+ compl_T *cp_prev;
+! char_u *cp_str; // matched text
+! char cp_icase; // TRUE or FALSE: ignore case
+! char cp_equal; // TRUE or FALSE: ins_compl_equal always ok
+! char_u *(cp_text[CPT_COUNT]); // text for the menu
+! char_u *cp_fname; // file containing the match, allocated when
+! // cp_flags has FREE_FNAME
+! int cp_flags; // ORIGINAL_TEXT, CONT_S_IPOS or FREE_FNAME
+! int cp_number; // sequence number
+ };
+
+! // flags for ins_compl_add()
+! # define ORIGINAL_TEXT (1) // the original text when the expansion begun
+ # define FREE_FNAME (2)
+
+ static char e_hitend[] = N_("Hit end of paragraph");
+***************
+*** 183,189 ****
+ static int compl_opt_refresh_always = FALSE;
+ static int compl_opt_suppress_empty = FALSE;
+
+! 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 void ins_compl_longest_match(compl_T *match);
+ static void ins_compl_del_pum(void);
+ static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir);
+--- 185,191 ----
+ static int compl_opt_refresh_always = FALSE;
+ static int compl_opt_suppress_empty = FALSE;
+
+! static int ins_compl_add(char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int adup, int equal);
+ static void ins_compl_longest_match(compl_T *match);
+ static void ins_compl_del_pum(void);
+ static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir);
+***************
+*** 413,425 ****
+ */
+ int
+ ins_compl_add_infercase(
+! char_u *str,
+ int len,
+ int icase,
+ char_u *fname,
+ int dir,
+ int flags)
+ {
+ char_u *p;
+ int i, c;
+ int actual_len; // Take multi-byte characters
+--- 415,428 ----
+ */
+ int
+ ins_compl_add_infercase(
+! char_u *str_arg,
+ int len,
+ int icase,
+ char_u *fname,
+ int dir,
+ int flags)
+ {
++ char_u *str = str_arg;
+ char_u *p;
+ int i, c;
+ int actual_len; // Take multi-byte characters
+***************
+*** 550,559 ****
+ vim_free(wca);
+ }
+
+! return ins_compl_add(IObuff, len, icase, fname, NULL, dir,
+! flags, FALSE);
+ }
+! return ins_compl_add(str, len, icase, fname, NULL, dir, flags, FALSE);
+ }
+
+ /*
+--- 553,563 ----
+ vim_free(wca);
+ }
+
+! str = IObuff;
+ }
+!
+! return ins_compl_add(str, len, icase, fname, NULL, dir,
+! flags, FALSE, FALSE);
+ }
+
+ /*
+***************
+*** 571,577 ****
+ char_u **cptext, // extra text for popup menu or NULL
+ int cdir,
+ int flags,
+! int adup) // accept duplicate match
+ {
+ compl_T *match;
+ int dir = (cdir == 0 ? compl_direction : cdir);
+--- 575,582 ----
+ char_u **cptext, // extra text for popup menu or NULL
+ int cdir,
+ int flags,
+! int adup, // accept duplicate match
+! int equal) // match is always accepted by ins_compl_equal
+ {
+ compl_T *match;
+ int dir = (cdir == 0 ? compl_direction : cdir);
+***************
+*** 613,618 ****
+--- 618,624 ----
+ return FAIL;
+ }
+ match->cp_icase = icase;
++ match->cp_equal = equal;
+
+ // match-fname is:
+ // - compl_curr_match->cp_fname if it is a string equal to fname.
+***************
+*** 676,681 ****
+--- 682,689 ----
+ static int
+ ins_compl_equal(compl_T *match, char_u *str, int len)
+ {
++ if (match->cp_equal)
++ return TRUE;
+ if (match->cp_icase)
+ return STRNICMP(match->cp_str, str, (size_t)len) == 0;
+ return STRNCMP(match->cp_str, str, (size_t)len) == 0;
+***************
+*** 776,782 ****
+
+ for (i = 0; i < num_matches && add_r != FAIL; i++)
+ if ((add_r = ins_compl_add(matches[i], -1, icase,
+! NULL, NULL, dir, 0, FALSE)) == OK)
+ // if dir was BACKWARD then honor it just once
+ dir = FORWARD;
+ FreeWild(num_matches, matches);
+--- 784,790 ----
+
+ for (i = 0; i < num_matches && add_r != FAIL; i++)
+ if ((add_r = ins_compl_add(matches[i], -1, icase,
+! NULL, NULL, dir, 0, FALSE, FALSE)) == OK)
+ // if dir was BACKWARD then honor it just once
+ dir = FORWARD;
+ FreeWild(num_matches, matches);
+***************
+*** 868,874 ****
+ // compl_pattern doesn't need to be set
+ compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
+ if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
+! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
+ return;
+
+ ctrl_x_mode = CTRL_X_EVAL;
+--- 876,882 ----
+ // compl_pattern doesn't need to be set
+ compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
+ if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
+! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE, FALSE) != OK)
+ return;
+
+ ctrl_x_mode = CTRL_X_EVAL;
+***************
+*** 2365,2370 ****
+--- 2373,2379 ----
+ int icase = FALSE;
+ int adup = FALSE;
+ int aempty = FALSE;
++ int aequal = FALSE;
+ char_u *(cptext[CPT_COUNT]);
+
+ if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
+***************
+*** 2386,2391 ****
+--- 2395,2402 ----
+ adup = dict_get_number(tv->vval.v_dict, (char_u *)"dup");
+ if (dict_get_string(tv->vval.v_dict, (char_u *)"empty", FALSE) != NULL)
+ aempty = dict_get_number(tv->vval.v_dict, (char_u *)"empty");
++ if (dict_get_string(tv->vval.v_dict, (char_u *)"equal", FALSE) != NULL)
++ aequal = dict_get_number(tv->vval.v_dict, (char_u *)"equal");
+ }
+ else
+ {
+***************
+*** 2394,2400 ****
+ }
+ if (word == NULL || (!aempty && *word == NUL))
+ return FAIL;
+! return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup);
+ }
+ #endif
+
+--- 2405,2411 ----
+ }
+ if (word == NULL || (!aempty && *word == NUL))
+ return FAIL;
+! return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup, aequal);
+ }
+ #endif
+
+***************
+*** 3694,3700 ****
+ vim_free(compl_orig_text);
+ compl_orig_text = vim_strnsave(line + compl_col, compl_length);
+ if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
+! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
+ {
+ VIM_CLEAR(compl_pattern);
+ VIM_CLEAR(compl_orig_text);
+--- 3705,3711 ----
+ vim_free(compl_orig_text);
+ compl_orig_text = vim_strnsave(line + compl_col, compl_length);
+ if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
+! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE, FALSE) != OK)
+ {
+ VIM_CLEAR(compl_pattern);
+ VIM_CLEAR(compl_orig_text);
+*** ../vim-8.1.1122/src/testdir/test_popup.vim 2019-03-29 12:19:34.953348924 +0100
+--- src/testdir/test_popup.vim 2019-04-06 13:34:17.403736197 +0200
+***************
+*** 276,281 ****
+--- 276,313 ----
+ iunmap <F5>
+ endfunc
+
++ func Test_complete_no_filter()
++ func! s:complTest1() abort
++ call complete(1, [{'word': 'foobar'}])
++ return ''
++ endfunc
++ func! s:complTest2() abort
++ call complete(1, [{'word': 'foobar', 'equal': 1}])
++ return ''
++ endfunc
++
++ let completeopt = &completeopt
++
++ " without equal=1
++ new
++ set completeopt=menuone,noinsert,menu
++ inoremap <F5> <C-R>=s:complTest1()<CR>
++ call feedkeys("i\<F5>z\<CR>\<CR>\<ESC>.", 'tx')
++ call assert_equal('z', getline(1))
++ bwipe!
++
++ " with equal=1
++ new
++ set completeopt=menuone,noinsert,menu
++ inoremap <F5> <C-R>=s:complTest2()<CR>
++ call feedkeys("i\<F5>z\<CR>\<CR>\<ESC>.", 'tx')
++ call assert_equal('foobar', getline(1))
++ bwipe!
++
++ let &completeopt = completeopt
++ iunmap <F5>
++ endfunc
++
+ func Test_compl_vim_cmds_after_register_expr()
+ func! s:test_func()
+ return 'autocmd '
+*** ../vim-8.1.1122/src/version.c 2019-04-06 13:18:06.737335067 +0200
+--- src/version.c 2019-04-06 13:27:34.729885207 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1123,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+210. When you get a divorce, you don't care about who gets the children,
+ but discuss endlessly who can use the email 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.1124 b/data/vim/patches/8.1.1124
new file mode 100644
index 000000000..0b149684b
--- /dev/null
+++ b/data/vim/patches/8.1.1124
@@ -0,0 +1,901 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1124
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1124
+Problem: Insert completion flags are mixed up.
+Solution: Clean up flags use of ins_compl_add() and cp_flags.
+Files: src/insexpand.c, src/proto/insexpand.pro, src/search.c, src/spell.c
+
+
+*** ../vim-8.1.1123/src/insexpand.c 2019-04-06 13:45:51.568756943 +0200
+--- src/insexpand.c 2019-04-06 14:14:19.712671221 +0200
+***************
+*** 102,119 ****
+ compl_T *cp_next;
+ compl_T *cp_prev;
+ char_u *cp_str; // matched text
+- char cp_icase; // TRUE or FALSE: ignore case
+- char cp_equal; // TRUE or FALSE: ins_compl_equal always ok
+ char_u *(cp_text[CPT_COUNT]); // text for the menu
+ char_u *cp_fname; // file containing the match, allocated when
+! // cp_flags has FREE_FNAME
+! int cp_flags; // ORIGINAL_TEXT, CONT_S_IPOS or FREE_FNAME
+ int cp_number; // sequence number
+ };
+
+! // flags for ins_compl_add()
+! # define ORIGINAL_TEXT (1) // the original text when the expansion begun
+! # define FREE_FNAME (2)
+
+ static char e_hitend[] = N_("Hit end of paragraph");
+ # ifdef FEAT_COMPL_FUNC
+--- 102,120 ----
+ compl_T *cp_next;
+ compl_T *cp_prev;
+ char_u *cp_str; // matched text
+ char_u *(cp_text[CPT_COUNT]); // text for the menu
+ char_u *cp_fname; // file containing the match, allocated when
+! // cp_flags has CP_FREE_FNAME
+! int cp_flags; // CP_ values
+ int cp_number; // sequence number
+ };
+
+! // values for cp_flags
+! # define CP_ORIGINAL_TEXT 1 // the original text when the expansion begun
+! # define CP_FREE_FNAME 2 // cp_fname is allocated
+! # define CP_CONT_S_IPOS 4 // use CONT_S_IPOS for compl_cont_status
+! # define CP_EQUAL 8 // ins_compl_equal() always returns TRUE
+! # define CP_ICASE 16 // ins_compl_equal() ignores case
+
+ static char e_hitend[] = N_("Hit end of paragraph");
+ # ifdef FEAT_COMPL_FUNC
+***************
+*** 185,191 ****
+ static int compl_opt_refresh_always = FALSE;
+ static int compl_opt_suppress_empty = FALSE;
+
+! static int ins_compl_add(char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int adup, int equal);
+ static void ins_compl_longest_match(compl_T *match);
+ static void ins_compl_del_pum(void);
+ static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir);
+--- 186,192 ----
+ static int compl_opt_refresh_always = FALSE;
+ static int compl_opt_suppress_empty = FALSE;
+
+! static int ins_compl_add(char_u *str, int len, char_u *fname, char_u **cptext, int cdir, int flags, int adup);
+ static void ins_compl_longest_match(compl_T *match);
+ static void ins_compl_del_pum(void);
+ static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir);
+***************
+*** 420,426 ****
+ int icase,
+ char_u *fname,
+ int dir,
+! int flags)
+ {
+ char_u *str = str_arg;
+ char_u *p;
+--- 421,427 ----
+ int icase,
+ char_u *fname,
+ int dir,
+! int cont_s_ipos) // next ^X<> will set initial_pos
+ {
+ char_u *str = str_arg;
+ char_u *p;
+***************
+*** 431,436 ****
+--- 432,438 ----
+ int *wca; // Wide character array.
+ int has_lower = FALSE;
+ int was_letter = FALSE;
++ int flags = 0;
+
+ if (p_ic && curbuf->b_p_inf && len > 0)
+ {
+***************
+*** 555,563 ****
+
+ str = IObuff;
+ }
+
+! return ins_compl_add(str, len, icase, fname, NULL, dir,
+! flags, FALSE, FALSE);
+ }
+
+ /*
+--- 557,568 ----
+
+ str = IObuff;
+ }
++ if (cont_s_ipos)
++ flags |= CP_CONT_S_IPOS;
++ if (icase)
++ flags |= CP_ICASE;
+
+! return ins_compl_add(str, len, fname, NULL, dir, flags, FALSE);
+ }
+
+ /*
+***************
+*** 570,585 ****
+ ins_compl_add(
+ char_u *str,
+ int len,
+- int icase,
+ char_u *fname,
+ char_u **cptext, // extra text for popup menu or NULL
+ int cdir,
+! int flags,
+! int adup, // accept duplicate match
+! int equal) // match is always accepted by ins_compl_equal
+ {
+ compl_T *match;
+ int dir = (cdir == 0 ? compl_direction : cdir);
+
+ ui_breakcheck();
+ if (got_int)
+--- 575,589 ----
+ ins_compl_add(
+ char_u *str,
+ int len,
+ char_u *fname,
+ char_u **cptext, // extra text for popup menu or NULL
+ int cdir,
+! int flags_arg,
+! int adup) // accept duplicate match
+ {
+ compl_T *match;
+ int dir = (cdir == 0 ? compl_direction : cdir);
++ int flags = flags_arg;
+
+ ui_breakcheck();
+ if (got_int)
+***************
+*** 593,599 ****
+ match = compl_first_match;
+ do
+ {
+! if ( !(match->cp_flags & ORIGINAL_TEXT)
+ && STRNCMP(match->cp_str, str, len) == 0
+ && match->cp_str[len] == NUL)
+ return NOTDONE;
+--- 597,603 ----
+ match = compl_first_match;
+ do
+ {
+! if ( !(match->cp_flags & CP_ORIGINAL_TEXT)
+ && STRNCMP(match->cp_str, str, len) == 0
+ && match->cp_str[len] == NUL)
+ return NOTDONE;
+***************
+*** 610,628 ****
+ if (match == NULL)
+ return FAIL;
+ match->cp_number = -1;
+! if (flags & ORIGINAL_TEXT)
+ match->cp_number = 0;
+ if ((match->cp_str = vim_strnsave(str, len)) == NULL)
+ {
+ vim_free(match);
+ return FAIL;
+ }
+- match->cp_icase = icase;
+- match->cp_equal = equal;
+
+ // match-fname is:
+ // - compl_curr_match->cp_fname if it is a string equal to fname.
+! // - a copy of fname, FREE_FNAME is set to free later THE allocated mem.
+ // - NULL otherwise. --Acevedo
+ if (fname != NULL
+ && compl_curr_match != NULL
+--- 614,630 ----
+ if (match == NULL)
+ return FAIL;
+ match->cp_number = -1;
+! if (flags & CP_ORIGINAL_TEXT)
+ match->cp_number = 0;
+ if ((match->cp_str = vim_strnsave(str, len)) == NULL)
+ {
+ vim_free(match);
+ return FAIL;
+ }
+
+ // match-fname is:
+ // - compl_curr_match->cp_fname if it is a string equal to fname.
+! // - a copy of fname, CP_FREE_FNAME is set to free later THE allocated mem.
+ // - NULL otherwise. --Acevedo
+ if (fname != NULL
+ && compl_curr_match != NULL
+***************
+*** 632,638 ****
+ else if (fname != NULL)
+ {
+ match->cp_fname = vim_strsave(fname);
+! flags |= FREE_FNAME;
+ }
+ else
+ match->cp_fname = NULL;
+--- 634,640 ----
+ else if (fname != NULL)
+ {
+ match->cp_fname = vim_strsave(fname);
+! flags |= CP_FREE_FNAME;
+ }
+ else
+ match->cp_fname = NULL;
+***************
+*** 669,675 ****
+ compl_curr_match = match;
+
+ // Find the longest common string if still doing that.
+! if (compl_get_longest && (flags & ORIGINAL_TEXT) == 0)
+ ins_compl_longest_match(match);
+
+ return OK;
+--- 671,677 ----
+ compl_curr_match = match;
+
+ // Find the longest common string if still doing that.
+! if (compl_get_longest && (flags & CP_ORIGINAL_TEXT) == 0)
+ ins_compl_longest_match(match);
+
+ return OK;
+***************
+*** 677,690 ****
+
+ /*
+ * Return TRUE if "str[len]" matches with match->cp_str, considering
+! * match->cp_icase.
+ */
+ static int
+ ins_compl_equal(compl_T *match, char_u *str, int len)
+ {
+! if (match->cp_equal)
+ return TRUE;
+! if (match->cp_icase)
+ return STRNICMP(match->cp_str, str, (size_t)len) == 0;
+ return STRNCMP(match->cp_str, str, (size_t)len) == 0;
+ }
+--- 679,692 ----
+
+ /*
+ * Return TRUE if "str[len]" matches with match->cp_str, considering
+! * match->cp_flags.
+ */
+ static int
+ ins_compl_equal(compl_T *match, char_u *str, int len)
+ {
+! if (match->cp_flags & CP_EQUAL)
+ return TRUE;
+! if (match->cp_flags & CP_ICASE)
+ return STRNICMP(match->cp_str, str, (size_t)len) == 0;
+ return STRNCMP(match->cp_str, str, (size_t)len) == 0;
+ }
+***************
+*** 734,741 ****
+ c1 = *p;
+ c2 = *s;
+ }
+! if (match->cp_icase ? (MB_TOLOWER(c1) != MB_TOLOWER(c2))
+! : (c1 != c2))
+ break;
+ if (has_mbyte)
+ {
+--- 736,743 ----
+ c1 = *p;
+ c2 = *s;
+ }
+! if ((match->cp_flags & CP_ICASE)
+! ? (MB_TOLOWER(c1) != MB_TOLOWER(c2)) : (c1 != c2))
+ break;
+ if (has_mbyte)
+ {
+***************
+*** 783,790 ****
+ int dir = compl_direction;
+
+ for (i = 0; i < num_matches && add_r != FAIL; i++)
+! if ((add_r = ins_compl_add(matches[i], -1, icase,
+! NULL, NULL, dir, 0, FALSE, FALSE)) == OK)
+ // if dir was BACKWARD then honor it just once
+ dir = FORWARD;
+ FreeWild(num_matches, matches);
+--- 785,792 ----
+ int dir = compl_direction;
+
+ for (i = 0; i < num_matches && add_r != FAIL; i++)
+! if ((add_r = ins_compl_add(matches[i], -1, NULL, NULL, dir,
+! icase ? CP_ICASE : 0, FALSE)) == OK)
+ // if dir was BACKWARD then honor it just once
+ dir = FORWARD;
+ FreeWild(num_matches, matches);
+***************
+*** 861,866 ****
+--- 863,869 ----
+ {
+ int save_w_wrow = curwin->w_wrow;
+ int save_w_leftcol = curwin->w_leftcol;
++ int flags = CP_ORIGINAL_TEXT;
+
+ // If already doing completions stop it.
+ if (ctrl_x_mode != CTRL_X_NORMAL)
+***************
+*** 875,882 ****
+ compl_length = (int)curwin->w_cursor.col - (int)startcol;
+ // compl_pattern doesn't need to be set
+ compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
+ if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
+! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE, FALSE) != OK)
+ return;
+
+ ctrl_x_mode = CTRL_X_EVAL;
+--- 878,887 ----
+ compl_length = (int)curwin->w_cursor.col - (int)startcol;
+ // compl_pattern doesn't need to be set
+ compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
++ if (p_ic)
++ flags |= CP_ICASE;
+ if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
+! -1, NULL, NULL, 0, flags, FALSE) != OK)
+ return;
+
+ ctrl_x_mode = CTRL_X_EVAL;
+***************
+*** 979,985 ****
+ do
+ {
+ if (compl == NULL
+! || ((compl->cp_flags & ORIGINAL_TEXT) == 0 && ++i == 2))
+ break;
+ compl = compl->cp_next;
+ } while (compl != compl_first_match);
+--- 984,990 ----
+ do
+ {
+ if (compl == NULL
+! || ((compl->cp_flags & CP_ORIGINAL_TEXT) == 0 && ++i == 2))
+ break;
+ compl = compl->cp_next;
+ } while (compl != compl_first_match);
+***************
+*** 1025,1031 ****
+ lead_len = (int)STRLEN(compl_leader);
+ do
+ {
+! if ((compl->cp_flags & ORIGINAL_TEXT) == 0
+ && (compl_leader == NULL
+ || ins_compl_equal(compl, compl_leader, lead_len)))
+ ++compl_match_arraysize;
+--- 1030,1036 ----
+ lead_len = (int)STRLEN(compl_leader);
+ do
+ {
+! if ((compl->cp_flags & CP_ORIGINAL_TEXT) == 0
+ && (compl_leader == NULL
+ || ins_compl_equal(compl, compl_leader, lead_len)))
+ ++compl_match_arraysize;
+***************
+*** 1040,1053 ****
+ {
+ // If the current match is the original text don't find the first
+ // match after it, don't highlight anything.
+! if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
+ shown_match_ok = TRUE;
+
+ i = 0;
+ compl = compl_first_match;
+ do
+ {
+! if ((compl->cp_flags & ORIGINAL_TEXT) == 0
+ && (compl_leader == NULL
+ || ins_compl_equal(compl, compl_leader, lead_len)))
+ {
+--- 1045,1058 ----
+ {
+ // If the current match is the original text don't find the first
+ // match after it, don't highlight anything.
+! if (compl_shown_match->cp_flags & CP_ORIGINAL_TEXT)
+ shown_match_ok = TRUE;
+
+ i = 0;
+ compl = compl_first_match;
+ do
+ {
+! if ((compl->cp_flags & CP_ORIGINAL_TEXT) == 0
+ && (compl_leader == NULL
+ || ins_compl_equal(compl, compl_leader, lead_len)))
+ {
+***************
+*** 1088,1094 ****
+
+ // When the original text is the shown match don't set
+ // compl_shown_match.
+! if (compl->cp_flags & ORIGINAL_TEXT)
+ shown_match_ok = TRUE;
+
+ if (!shown_match_ok && shown_compl != NULL)
+--- 1093,1099 ----
+
+ // When the original text is the shown match don't set
+ // compl_shown_match.
+! if (compl->cp_flags & CP_ORIGINAL_TEXT)
+ shown_match_ok = TRUE;
+
+ if (!shown_match_ok && shown_compl != NULL)
+***************
+*** 1307,1313 ****
+ ptr = find_word_end(ptr);
+ add_r = ins_compl_add_infercase(regmatch->startp[0],
+ (int)(ptr - regmatch->startp[0]),
+! p_ic, files[i], *dir, 0);
+ if (thesaurus)
+ {
+ char_u *wstart;
+--- 1312,1318 ----
+ ptr = find_word_end(ptr);
+ add_r = ins_compl_add_infercase(regmatch->startp[0],
+ (int)(ptr - regmatch->startp[0]),
+! p_ic, files[i], *dir, FALSE);
+ if (thesaurus)
+ {
+ char_u *wstart;
+***************
+*** 1343,1349 ****
+ if (wstart != regmatch->startp[0])
+ add_r = ins_compl_add_infercase(wstart,
+ (int)(ptr - wstart),
+! p_ic, files[i], *dir, 0);
+ }
+ }
+ if (add_r == OK)
+--- 1348,1354 ----
+ if (wstart != regmatch->startp[0])
+ add_r = ins_compl_add_infercase(wstart,
+ (int)(ptr - wstart),
+! p_ic, files[i], *dir, FALSE);
+ }
+ }
+ if (add_r == OK)
+***************
+*** 1446,1452 ****
+ compl_curr_match = compl_curr_match->cp_next;
+ vim_free(match->cp_str);
+ // several entries may use the same fname, free it just once.
+! if (match->cp_flags & FREE_FNAME)
+ vim_free(match->cp_fname);
+ for (i = 0; i < CPT_COUNT; ++i)
+ vim_free(match->cp_text[i]);
+--- 1451,1457 ----
+ compl_curr_match = compl_curr_match->cp_next;
+ vim_free(match->cp_str);
+ // several entries may use the same fname, free it just once.
+! if (match->cp_flags & CP_FREE_FNAME)
+ vim_free(match->cp_fname);
+ for (i = 0; i < CPT_COUNT; ++i)
+ vim_free(match->cp_text[i]);
+***************
+*** 1540,1546 ****
+ match = compl_first_match;
+ do
+ {
+! if (!(match->cp_flags & ORIGINAL_TEXT))
+ {
+ di = dict_alloc();
+ if (di == NULL)
+--- 1545,1551 ----
+ match = compl_first_match;
+ do
+ {
+! if (!(match->cp_flags & CP_ORIGINAL_TEXT))
+ {
+ di = dict_alloc();
+ if (di == NULL)
+***************
+*** 1818,1826 ****
+ char_u *p;
+
+ // Replace the original text entry.
+! // The ORIGINAL_TEXT flag is either at the first item or might possibly be
+ // at the last item for backward completion
+! if (compl_first_match->cp_flags & ORIGINAL_TEXT) // safety check
+ {
+ p = vim_strsave(str);
+ if (p != NULL)
+--- 1823,1831 ----
+ char_u *p;
+
+ // Replace the original text entry.
+! // The CP_ORIGINAL_TEXT flag is either at the first item or might possibly be
+ // at the last item for backward completion
+! if (compl_first_match->cp_flags & CP_ORIGINAL_TEXT) // safety check
+ {
+ p = vim_strsave(str);
+ if (p != NULL)
+***************
+*** 1830,1836 ****
+ }
+ }
+ else if (compl_first_match->cp_prev != NULL
+! && (compl_first_match->cp_prev->cp_flags & ORIGINAL_TEXT))
+ {
+ p = vim_strsave(str);
+ if (p != NULL)
+--- 1835,1841 ----
+ }
+ }
+ else if (compl_first_match->cp_prev != NULL
+! && (compl_first_match->cp_prev->cp_flags & CP_ORIGINAL_TEXT))
+ {
+ p = vim_strsave(str);
+ if (p != NULL)
+***************
+*** 1858,1864 ****
+ {
+ // When still at the original match use the first entry that matches
+ // the leader.
+! if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
+ {
+ p = NULL;
+ for (cp = compl_shown_match->cp_next; cp != NULL
+--- 1863,1869 ----
+ {
+ // When still at the original match use the first entry that matches
+ // the leader.
+! if (compl_shown_match->cp_flags & CP_ORIGINAL_TEXT)
+ {
+ p = NULL;
+ for (cp = compl_shown_match->cp_next; cp != NULL
+***************
+*** 2370,2379 ****
+ ins_compl_add_tv(typval_T *tv, int dir)
+ {
+ char_u *word;
+! int icase = FALSE;
+! int adup = FALSE;
+! int aempty = FALSE;
+! int aequal = FALSE;
+ char_u *(cptext[CPT_COUNT]);
+
+ if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
+--- 2375,2383 ----
+ ins_compl_add_tv(typval_T *tv, int dir)
+ {
+ char_u *word;
+! int dup = FALSE;
+! int empty = FALSE;
+! int flags = 0;
+ char_u *(cptext[CPT_COUNT]);
+
+ if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
+***************
+*** 2389,2411 ****
+ (char_u *)"info", FALSE);
+ cptext[CPT_USER_DATA] = dict_get_string(tv->vval.v_dict,
+ (char_u *)"user_data", FALSE);
+! if (dict_get_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL)
+! icase = dict_get_number(tv->vval.v_dict, (char_u *)"icase");
+ if (dict_get_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
+! adup = dict_get_number(tv->vval.v_dict, (char_u *)"dup");
+ if (dict_get_string(tv->vval.v_dict, (char_u *)"empty", FALSE) != NULL)
+! aempty = dict_get_number(tv->vval.v_dict, (char_u *)"empty");
+! if (dict_get_string(tv->vval.v_dict, (char_u *)"equal", FALSE) != NULL)
+! aequal = dict_get_number(tv->vval.v_dict, (char_u *)"equal");
+ }
+ else
+ {
+ word = tv_get_string_chk(tv);
+ vim_memset(cptext, 0, sizeof(cptext));
+ }
+! if (word == NULL || (!aempty && *word == NUL))
+ return FAIL;
+! return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup, aequal);
+ }
+ #endif
+
+--- 2393,2417 ----
+ (char_u *)"info", FALSE);
+ cptext[CPT_USER_DATA] = dict_get_string(tv->vval.v_dict,
+ (char_u *)"user_data", FALSE);
+! if (dict_get_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL
+! && dict_get_number(tv->vval.v_dict, (char_u *)"icase"))
+! flags |= CP_ICASE;
+ if (dict_get_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
+! dup = dict_get_number(tv->vval.v_dict, (char_u *)"dup");
+ if (dict_get_string(tv->vval.v_dict, (char_u *)"empty", FALSE) != NULL)
+! empty = dict_get_number(tv->vval.v_dict, (char_u *)"empty");
+! if (dict_get_string(tv->vval.v_dict, (char_u *)"equal", FALSE) != NULL
+! && dict_get_number(tv->vval.v_dict, (char_u *)"equal"))
+! flags |= CP_EQUAL;
+ }
+ else
+ {
+ word = tv_get_string_chk(tv);
+ vim_memset(cptext, 0, sizeof(cptext));
+ }
+! if (word == NULL || (!empty && *word == NUL))
+ return FAIL;
+! return ins_compl_add(word, -1, NULL, cptext, dir, flags, dup);
+ }
+ #endif
+
+***************
+*** 2672,2678 ****
+ p_ws = TRUE;
+ for (;;)
+ {
+! int flags = 0;
+
+ ++msg_silent; // Don't want messages for wrapscan.
+
+--- 2678,2684 ----
+ p_ws = TRUE;
+ for (;;)
+ {
+! int cont_s_ipos = FALSE;
+
+ ++msg_silent; // Don't want messages for wrapscan.
+
+***************
+*** 2778,2784 ****
+ tmp_ptr = ptr + IOSIZE - len - 1;
+ STRNCPY(IObuff + len, ptr, tmp_ptr - ptr);
+ len += (int)(tmp_ptr - ptr);
+! flags |= CONT_S_IPOS;
+ }
+ IObuff[len] = NUL;
+ ptr = IObuff;
+--- 2784,2790 ----
+ tmp_ptr = ptr + IOSIZE - len - 1;
+ STRNCPY(IObuff + len, ptr, tmp_ptr - ptr);
+ len += (int)(tmp_ptr - ptr);
+! cont_s_ipos = TRUE;
+ }
+ IObuff[len] = NUL;
+ ptr = IObuff;
+***************
+*** 2789,2795 ****
+ }
+ if (ins_compl_add_infercase(ptr, len, p_ic,
+ ins_buf == curbuf ? NULL : ins_buf->b_sfname,
+! 0, flags) != NOTDONE)
+ {
+ found_new_match = OK;
+ break;
+--- 2795,2801 ----
+ }
+ if (ins_compl_add_infercase(ptr, len, p_ic,
+ ins_buf == curbuf ? NULL : ins_buf->b_sfname,
+! 0, cont_s_ipos) != NOTDONE)
+ {
+ found_new_match = OK;
+ break;
+***************
+*** 2889,2895 ****
+ dict_T *dict;
+
+ ins_bytes(compl_shown_match->cp_str + ins_compl_len());
+! if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
+ compl_used_match = FALSE;
+ else
+ compl_used_match = TRUE;
+--- 2895,2901 ----
+ dict_T *dict;
+
+ ins_bytes(compl_shown_match->cp_str + ins_compl_len());
+! if (compl_shown_match->cp_flags & CP_ORIGINAL_TEXT)
+ compl_used_match = FALSE;
+ else
+ compl_used_match = TRUE;
+***************
+*** 2949,2955 ****
+ return -1;
+
+ if (compl_leader != NULL
+! && (compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0)
+ {
+ // Set "compl_shown_match" to the actually shown match, it may differ
+ // when "compl_leader" is used to omit some of the matches.
+--- 2955,2961 ----
+ return -1;
+
+ if (compl_leader != NULL
+! && (compl_shown_match->cp_flags & CP_ORIGINAL_TEXT) == 0)
+ {
+ // Set "compl_shown_match" to the actually shown match, it may differ
+ // when "compl_leader" is used to omit some of the matches.
+***************
+*** 3053,3059 ****
+ }
+ found_end = FALSE;
+ }
+! if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0
+ && compl_leader != NULL
+ && !ins_compl_equal(compl_shown_match,
+ compl_leader, (int)STRLEN(compl_leader)))
+--- 3059,3065 ----
+ }
+ found_end = FALSE;
+ }
+! if ((compl_shown_match->cp_flags & CP_ORIGINAL_TEXT) == 0
+ && compl_leader != NULL
+ && !ins_compl_equal(compl_shown_match,
+ compl_leader, (int)STRLEN(compl_leader)))
+***************
+*** 3304,3309 ****
+--- 3310,3316 ----
+ int save_w_leftcol;
+ int insert_match;
+ int save_did_ai = did_ai;
++ int flags = CP_ORIGINAL_TEXT;
+
+ compl_direction = ins_compl_key2dir(c);
+ insert_match = ins_compl_use_match(c);
+***************
+*** 3704,3711 ****
+ // Always add completion for the original text.
+ vim_free(compl_orig_text);
+ compl_orig_text = vim_strnsave(line + compl_col, compl_length);
+ if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
+! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE, FALSE) != OK)
+ {
+ VIM_CLEAR(compl_pattern);
+ VIM_CLEAR(compl_orig_text);
+--- 3711,3720 ----
+ // Always add completion for the original text.
+ vim_free(compl_orig_text);
+ compl_orig_text = vim_strnsave(line + compl_col, compl_length);
++ if (p_ic)
++ flags |= CP_ICASE;
+ if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
+! -1, NULL, NULL, 0, flags, FALSE) != OK)
+ {
+ VIM_CLEAR(compl_pattern);
+ VIM_CLEAR(compl_orig_text);
+***************
+*** 3767,3780 ****
+ compl_cont_status &= ~CONT_N_ADDS;
+ }
+
+! if (compl_curr_match->cp_flags & CONT_S_IPOS)
+ compl_cont_status |= CONT_S_IPOS;
+ else
+ compl_cont_status &= ~CONT_S_IPOS;
+
+ if (edit_submode_extra == NULL)
+ {
+! if (compl_curr_match->cp_flags & ORIGINAL_TEXT)
+ {
+ edit_submode_extra = (char_u *)_("Back at original");
+ edit_submode_highl = HLF_W;
+--- 3776,3789 ----
+ compl_cont_status &= ~CONT_N_ADDS;
+ }
+
+! if (compl_curr_match->cp_flags & CP_CONT_S_IPOS)
+ compl_cont_status |= CONT_S_IPOS;
+ else
+ compl_cont_status &= ~CONT_S_IPOS;
+
+ if (edit_submode_extra == NULL)
+ {
+! if (compl_curr_match->cp_flags & CP_ORIGINAL_TEXT)
+ {
+ edit_submode_extra = (char_u *)_("Back at original");
+ edit_submode_highl = HLF_W;
+*** ../vim-8.1.1123/src/proto/insexpand.pro 2019-03-30 13:53:26.174425093 +0100
+--- src/proto/insexpand.pro 2019-04-06 14:06:24.070288598 +0200
+***************
+*** 20,26 ****
+ int has_compl_option(int dict_opt);
+ int vim_is_ctrl_x_key(int c);
+ int ins_compl_accept_char(int c);
+! int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname, int dir, int flags);
+ int ins_compl_has_shown_match(void);
+ int ins_compl_long_shown_match(void);
+ void completeopt_was_set(void);
+--- 20,26 ----
+ int has_compl_option(int dict_opt);
+ int vim_is_ctrl_x_key(int c);
+ int ins_compl_accept_char(int c);
+! int ins_compl_add_infercase(char_u *str_arg, int len, int icase, char_u *fname, int dir, int cont_s_ipos);
+ int ins_compl_has_shown_match(void);
+ int ins_compl_long_shown_match(void);
+ void completeopt_was_set(void);
+*** ../vim-8.1.1123/src/search.c 2019-03-30 13:53:26.174425093 +0100
+--- src/search.c 2019-04-06 13:52:12.762824629 +0200
+***************
+*** 5272,5278 ****
+ #ifdef FEAT_INS_EXPAND
+ if (action == ACTION_EXPAND)
+ {
+! int reuse = 0;
+ int add_r;
+ char_u *aux;
+
+--- 5272,5278 ----
+ #ifdef FEAT_INS_EXPAND
+ if (action == ACTION_EXPAND)
+ {
+! int cont_s_ipos = FALSE;
+ int add_r;
+ char_u *aux;
+
+***************
+*** 5333,5339 ****
+ p = aux + IOSIZE - i - 1;
+ STRNCPY(IObuff + i, aux, p - aux);
+ i += (int)(p - aux);
+! reuse |= CONT_S_IPOS;
+ }
+ IObuff[i] = NUL;
+ aux = IObuff;
+--- 5333,5339 ----
+ p = aux + IOSIZE - i - 1;
+ STRNCPY(IObuff + i, aux, p - aux);
+ i += (int)(p - aux);
+! cont_s_ipos = TRUE;
+ }
+ IObuff[i] = NUL;
+ aux = IObuff;
+***************
+*** 5344,5350 ****
+
+ add_r = ins_compl_add_infercase(aux, i, p_ic,
+ curr_fname == curbuf->b_fname ? NULL : curr_fname,
+! dir, reuse);
+ if (add_r == OK)
+ /* if dir was BACKWARD then honor it just once */
+ dir = FORWARD;
+--- 5344,5350 ----
+
+ add_r = ins_compl_add_infercase(aux, i, p_ic,
+ curr_fname == curbuf->b_fname ? NULL : curr_fname,
+! dir, cont_s_ipos);
+ if (add_r == OK)
+ /* if dir was BACKWARD then honor it just once */
+ dir = FORWARD;
+*** ../vim-8.1.1123/src/spell.c 2019-03-30 18:46:57.360077328 +0100
+--- src/spell.c 2019-04-06 13:52:21.666778351 +0200
+***************
+*** 8627,8633 ****
+ ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0
+ : STRNCMP(p, pat, STRLEN(pat)) == 0)
+ && ins_compl_add_infercase(p, (int)STRLEN(p),
+! p_ic, NULL, *dir, 0) == OK)
+ /* if dir was BACKWARD then honor it just once */
+ *dir = FORWARD;
+ }
+--- 8627,8633 ----
+ ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0
+ : STRNCMP(p, pat, STRLEN(pat)) == 0)
+ && ins_compl_add_infercase(p, (int)STRLEN(p),
+! p_ic, NULL, *dir, FALSE) == OK)
+ /* if dir was BACKWARD then honor it just once */
+ *dir = FORWARD;
+ }
+*** ../vim-8.1.1123/src/version.c 2019-04-06 13:45:51.568756943 +0200
+--- src/version.c 2019-04-06 14:19:37.271357326 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1124,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+211. Your husband leaves you...taking the computer with him and you
+ call him crying, and beg him to bring the computer back.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1125 b/data/vim/patches/8.1.1125
new file mode 100644
index 000000000..a8bcd610b
--- /dev/null
+++ b/data/vim/patches/8.1.1125
@@ -0,0 +1,355 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1125
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1125
+Problem: Libvterm does not handle the window position report.
+Solution: Let libvterm call the fallback CSI handler when not handling CSI
+ sequence. Handle the window position report in Vim.
+Files: src/libvterm/src/state.c, src/terminal.c, src/ui.c,
+ src/proto/ui.pro, src/evalfunc.c, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1124/src/libvterm/src/state.c 2018-12-24 21:38:40.814173687 +0100
+--- src/libvterm/src/state.c 2019-04-06 14:44:25.847900874 +0200
+***************
+*** 905,910 ****
+--- 905,911 ----
+ int leader_byte = 0;
+ int intermed_byte = 0;
+ VTermPos oldpos = state->pos;
++ int handled = 1;
+
+ /* Some temporaries for later code */
+ int count, val;
+***************
+*** 1416,1421 ****
+--- 1417,1426 ----
+ case 8: /* CSI 8 ; rows ; cols t set size */
+ if (argcount == 3)
+ on_resize(CSI_ARG(args[1]), CSI_ARG(args[2]), state);
++ break;
++ default:
++ handled = 0;
++ break;
+ }
+ break;
+
+***************
+*** 1450,1455 ****
+--- 1455,1465 ----
+ break;
+
+ default:
++ handled = 0;
++ break;
++ }
++
++ if (!handled) {
+ if(state->fallbacks && state->fallbacks->csi)
+ if((*state->fallbacks->csi)(leader, args, argcount, intermed, command, state->fbdata))
+ return 1;
+*** ../vim-8.1.1124/src/terminal.c 2019-03-30 18:46:57.360077328 +0100
+--- src/terminal.c 2019-04-06 15:25:12.799197577 +0200
+***************
+*** 3842,3855 ****
+ return 1;
+ }
+
+ static VTermParserCallbacks parser_fallbacks = {
+! NULL, /* text */
+! NULL, /* control */
+! NULL, /* escape */
+! NULL, /* csi */
+! parse_osc, /* osc */
+! NULL, /* dcs */
+! NULL /* resize */
+ };
+
+ /*
+--- 3842,3909 ----
+ return 1;
+ }
+
++ /*
++ * Called by libvterm when it cannot recognize a CSI sequence.
++ * We recognize the window position report.
++ */
++ static int
++ parse_csi(
++ const char *leader UNUSED,
++ const long args[],
++ int argcount,
++ const char *intermed UNUSED,
++ char command,
++ void *user)
++ {
++ term_T *term = (term_T *)user;
++ char buf[100];
++ int len;
++ int x = 0;
++ int y = 0;
++ win_T *wp;
++
++ // We recognize only CSI 13 t
++ if (command != 't' || argcount != 1 || args[0] != 13)
++ return 0; // not handled
++
++ // When getting the window position fails it results in zero/zero.
++ (void)ui_get_winpos(&x, &y, (varnumber_T)100);
++
++ FOR_ALL_WINDOWS(wp)
++ if (wp->w_buffer == term->tl_buffer)
++ break;
++ if (wp != NULL)
++ {
++ #ifdef FEAT_GUI
++ if (gui.in_use)
++ {
++ x += wp->w_wincol * gui.char_width;
++ y += W_WINROW(wp) * gui.char_height;
++ }
++ else
++ #endif
++ {
++ // We roughly estimate the position of the terminal window inside
++ // the Vim window by assuing a 10 x 7 character cell.
++ x += wp->w_wincol * 7;
++ y += W_WINROW(wp) * 10;
++ }
++ }
++
++ len = vim_snprintf(buf, 100, "\x1b[3;%d;%dt", x, y);
++ channel_send(term->tl_job->jv_channel, get_tty_part(term),
++ (char_u *)buf, len, NULL);
++ return 1;
++ }
++
+ static VTermParserCallbacks parser_fallbacks = {
+! NULL, // text
+! NULL, // control
+! NULL, // escape
+! parse_csi, // csi
+! parse_osc, // osc
+! NULL, // dcs
+! NULL // resize
+ };
+
+ /*
+*** ../vim-8.1.1124/src/ui.c 2019-03-02 10:13:36.800974804 +0100
+--- src/ui.c 2019-04-06 16:18:21.290945446 +0200
+***************
+*** 627,632 ****
+--- 627,653 ----
+ }
+ }
+
++ #if (defined(FEAT_EVAL) \
++ && (defined(FEAT_GUI) \
++ || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)))) \
++ || defined(PROTO)
++ /*
++ * Get the window position in pixels, if possible.
++ * Return FAIL when not possible.
++ */
++ int
++ ui_get_winpos(int *x, int *y, varnumber_T timeout)
++ {
++ # ifdef FEAT_GUI
++ if (gui.in_use)
++ return gui_mch_get_winpos(x, y);
++ # endif
++ # if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
++ return term_get_winpos(x, y, timeout);
++ # endif
++ }
++ #endif
++
+ void
+ ui_breakcheck(void)
+ {
+*** ../vim-8.1.1124/src/proto/ui.pro 2019-01-27 16:55:44.276707556 +0100
+--- src/proto/ui.pro 2019-04-06 15:15:57.453489712 +0200
+***************
+*** 11,16 ****
+--- 11,17 ----
+ int ui_get_shellsize(void);
+ void ui_set_shellsize(int mustset);
+ void ui_new_shellsize(void);
++ int ui_get_winpos(int *x, int *y, varnumber_T timeout);
+ void ui_breakcheck(void);
+ void ui_breakcheck_force(int force);
+ void clip_init(int can_use);
+*** ../vim-8.1.1124/src/evalfunc.c 2019-04-06 13:18:06.737335067 +0200
+--- src/evalfunc.c 2019-04-06 16:18:24.146930813 +0200
+***************
+*** 5985,6004 ****
+
+ if (rettv_list_alloc(rettv) == FAIL)
+ return;
+! #ifdef FEAT_GUI
+! if (gui.in_use)
+! (void)gui_mch_get_winpos(&x, &y);
+! # if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
+! else
+! # endif
+! #endif
+! #if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
+ {
+ varnumber_T timeout = 100;
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ timeout = tv_get_number(&argvars[0]);
+! term_get_winpos(&x, &y, timeout);
+ }
+ #endif
+ list_append_number(rettv->vval.v_list, (varnumber_T)x);
+--- 5985,5998 ----
+
+ if (rettv_list_alloc(rettv) == FAIL)
+ return;
+! #if defined(FEAT_GUI) || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE))
+ {
+ varnumber_T timeout = 100;
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ timeout = tv_get_number(&argvars[0]);
+!
+! (void)ui_get_winpos(&x, &y, timeout);
+ }
+ #endif
+ list_append_number(rettv->vval.v_list, (varnumber_T)x);
+***************
+*** 6013,6033 ****
+ f_getwinposx(typval_T *argvars UNUSED, typval_T *rettv)
+ {
+ rettv->vval.v_number = -1;
+! #ifdef FEAT_GUI
+! if (gui.in_use)
+! {
+! int x, y;
+!
+! if (gui_mch_get_winpos(&x, &y) == OK)
+! rettv->vval.v_number = x;
+! return;
+! }
+! #endif
+! #if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
+ {
+ int x, y;
+
+! if (term_get_winpos(&x, &y, (varnumber_T)100) == OK)
+ rettv->vval.v_number = x;
+ }
+ #endif
+--- 6007,6017 ----
+ f_getwinposx(typval_T *argvars UNUSED, typval_T *rettv)
+ {
+ rettv->vval.v_number = -1;
+! #if defined(FEAT_GUI) || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE))
+ {
+ int x, y;
+
+! if (ui_get_winpos(&x, &y, 100) == OK)
+ rettv->vval.v_number = x;
+ }
+ #endif
+***************
+*** 6040,6060 ****
+ f_getwinposy(typval_T *argvars UNUSED, typval_T *rettv)
+ {
+ rettv->vval.v_number = -1;
+! #ifdef FEAT_GUI
+! if (gui.in_use)
+! {
+! int x, y;
+!
+! if (gui_mch_get_winpos(&x, &y) == OK)
+! rettv->vval.v_number = y;
+! return;
+! }
+! #endif
+! #if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
+ {
+ int x, y;
+
+! if (term_get_winpos(&x, &y, (varnumber_T)100) == OK)
+ rettv->vval.v_number = y;
+ }
+ #endif
+--- 6024,6034 ----
+ f_getwinposy(typval_T *argvars UNUSED, typval_T *rettv)
+ {
+ rettv->vval.v_number = -1;
+! #if defined(FEAT_GUI) || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE))
+ {
+ int x, y;
+
+! if (ui_get_winpos(&x, &y, 100) == OK)
+ rettv->vval.v_number = y;
+ }
+ #endif
+*** ../vim-8.1.1125/src/testdir/test_terminal.vim 2019-04-06 12:39:47.439967638 +0200
+--- src/testdir/test_terminal.vim 2019-04-06 17:22:33.203006052 +0200
+***************
+*** 1887,1889 ****
+--- 1887,1922 ----
+ au! BufLeave
+ set statusline=
+ endfunc
++
++ func Test_terminal_getwinpos()
++ " split, go to the bottom-right window
++ split
++ wincmd j
++ set splitright
++
++ call writefile([
++ \ 'echo getwinpos()',
++ \ ], 'XTest_getwinpos')
++ let buf = RunVimInTerminal('-S XTest_getwinpos', {'cols': 60})
++ call term_wait(buf)
++
++ " Find the output of getwinpos() in the bottom line.
++ let rows = term_getsize(buf)[0]
++ call WaitForAssert({-> assert_match('\[\d\+, \d\+\]', term_getline(buf, rows))})
++ let line = term_getline(buf, rows)
++ let xpos = str2nr(substitute(line, '\[\(\d\+\), \d\+\]', '\1', ''))
++ let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
++
++ " Position must be bigger than the getwinpos() result of Vim itself.
++ let [xroot, yroot] = getwinpos()
++ call assert_inrange(xroot + 2, xroot + 1000, xpos)
++ call assert_inrange(yroot + 2, yroot + 1000, ypos)
++
++ call term_wait(buf)
++ call term_sendkeys(buf, ":q\<CR>")
++ call StopVimInTerminal(buf)
++ call delete('XTest_getwinpos')
++ exe buf . 'bwipe!'
++ set splitright&
++ only!
++ endfunc
+*** ../vim-8.1.1124/src/version.c 2019-04-06 14:22:17.758642630 +0200
+--- src/version.c 2019-04-06 17:24:10.354521046 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1125,
+ /**/
+
+--
+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.1126 b/data/vim/patches/8.1.1126
new file mode 100644
index 000000000..09a695ad3
--- /dev/null
+++ b/data/vim/patches/8.1.1126
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1126
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1126
+Problem: Build failure with +terminal but without tgetent.
+Solution: Adjust #ifdef.
+Files: src/ui.c
+
+
+*** ../vim-8.1.1125/src/ui.c 2019-04-06 17:33:20.651486473 +0200
+--- src/ui.c 2019-04-06 17:54:45.231351016 +0200
+***************
+*** 628,635 ****
+ }
+
+ #if (defined(FEAT_EVAL) \
+! && (defined(FEAT_GUI) \
+! || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)))) \
+ || defined(PROTO)
+ /*
+ * Get the window position in pixels, if possible.
+--- 628,636 ----
+ }
+
+ #if (defined(FEAT_EVAL) \
+! && (defined(FEAT_GUI) \
+! || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)))) \
+! || defined(FEAT_TERMINAL) \
+ || defined(PROTO)
+ /*
+ * Get the window position in pixels, if possible.
+*** ../vim-8.1.1125/src/version.c 2019-04-06 17:33:20.655486445 +0200
+--- src/version.c 2019-04-06 17:55:34.907070634 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1126,
+ /**/
+
+--
+msdn.microsoft.com:
+ERROR_SUCCESS 0 (0x0) The operation completed successfully.
+I have always suspected that for Microsoft success is an error.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1127 b/data/vim/patches/8.1.1127
new file mode 100644
index 000000000..fd38aae0e
--- /dev/null
+++ b/data/vim/patches/8.1.1127
@@ -0,0 +1,229 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1127
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1127
+Problem: getwinpos() doesn't work in terminal on MS-Windows console.
+Solution: Adjust #ifdefs. Disable test for MS-Windows console.
+Files: src/ui.c, src/term.c, src/terminal.c,
+ src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1126/src/ui.c 2019-04-06 17:56:02.858913247 +0200
+--- src/ui.c 2019-04-06 19:07:23.687802373 +0200
+***************
+*** 627,636 ****
+ }
+ }
+
+! #if (defined(FEAT_EVAL) \
+ && (defined(FEAT_GUI) \
+ || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)))) \
+- || defined(FEAT_TERMINAL) \
+ || defined(PROTO)
+ /*
+ * Get the window position in pixels, if possible.
+--- 627,635 ----
+ }
+ }
+
+! #if ((defined(FEAT_EVAL) || defined(FEAT_TERMINAL)) \
+ && (defined(FEAT_GUI) \
+ || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)))) \
+ || defined(PROTO)
+ /*
+ * Get the window position in pixels, if possible.
+***************
+*** 645,650 ****
+--- 644,651 ----
+ # endif
+ # if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
+ return term_get_winpos(x, y, timeout);
++ # else
++ return FAIL;
+ # endif
+ }
+ #endif
+*** ../vim-8.1.1126/src/term.c 2019-04-03 21:15:54.802752719 +0200
+--- src/term.c 2019-04-06 19:27:47.604897006 +0200
+***************
+*** 2843,2849 ****
+ static int winpos_y = -1;
+ static int did_request_winpos = 0;
+
+! # if (defined(FEAT_EVAL) && defined(HAVE_TGETENT)) || defined(PROTO)
+ /*
+ * Try getting the Vim window position from the terminal.
+ * Returns OK or FAIL.
+--- 2843,2849 ----
+ static int winpos_y = -1;
+ static int did_request_winpos = 0;
+
+! # if defined(FEAT_EVAL) || defined(FEAT_TERMINAL) || defined(PROTO)
+ /*
+ * Try getting the Vim window position from the terminal.
+ * Returns OK or FAIL.
+***************
+*** 4858,4864 ****
+
+ /*
+ * Check for a window position response from the terminal:
+! * {lead}3;{x}:{y}t
+ */
+ else if (did_request_winpos
+ && ((len >= 4 && tp[0] == ESC && tp[1] == '[')
+--- 4858,4864 ----
+
+ /*
+ * Check for a window position response from the terminal:
+! * {lead}3;{x};{y}t
+ */
+ else if (did_request_winpos
+ && ((len >= 4 && tp[0] == ESC && tp[1] == '[')
+***************
+*** 4925,4935 ****
+ if (i - j >= 21 && STRNCMP(tp + j + 3, "rgb:", 4) == 0
+ && tp[j + 11] == '/' && tp[j + 16] == '/')
+ {
+! #ifdef FEAT_TERMINAL
+ int rval = hexhex2nr(tp + j + 7);
+ int gval = hexhex2nr(tp + j + 12);
+ int bval = hexhex2nr(tp + j + 17);
+! #endif
+ if (is_bg)
+ {
+ char *newval = (3 * '6' < tp[j+7] + tp[j+12]
+--- 4925,4935 ----
+ if (i - j >= 21 && STRNCMP(tp + j + 3, "rgb:", 4) == 0
+ && tp[j + 11] == '/' && tp[j + 16] == '/')
+ {
+! # ifdef FEAT_TERMINAL
+ int rval = hexhex2nr(tp + j + 7);
+ int gval = hexhex2nr(tp + j + 12);
+ int bval = hexhex2nr(tp + j + 17);
+! # endif
+ if (is_bg)
+ {
+ char *newval = (3 * '6' < tp[j+7] + tp[j+12]
+***************
+*** 4937,4947 ****
+
+ LOG_TR(("Received RBG response: %s", tp));
+ rbg_status = STATUS_GOT;
+! #ifdef FEAT_TERMINAL
+ bg_r = rval;
+ bg_g = gval;
+ bg_b = bval;
+! #endif
+ if (!option_was_set((char_u *)"bg")
+ && STRCMP(p_bg, newval) != 0)
+ {
+--- 4937,4947 ----
+
+ LOG_TR(("Received RBG response: %s", tp));
+ rbg_status = STATUS_GOT;
+! # ifdef FEAT_TERMINAL
+ bg_r = rval;
+ bg_g = gval;
+ bg_b = bval;
+! # endif
+ if (!option_was_set((char_u *)"bg")
+ && STRCMP(p_bg, newval) != 0)
+ {
+***************
+*** 4952,4958 ****
+ redraw_asap(CLEAR);
+ }
+ }
+! #ifdef FEAT_TERMINAL
+ else
+ {
+ LOG_TR(("Received RFG response: %s", tp));
+--- 4952,4958 ----
+ redraw_asap(CLEAR);
+ }
+ }
+! # ifdef FEAT_TERMINAL
+ else
+ {
+ LOG_TR(("Received RFG response: %s", tp));
+***************
+*** 4961,4967 ****
+ fg_g = gval;
+ fg_b = bval;
+ }
+! #endif
+ }
+
+ /* got finished code: consume it */
+--- 4961,4967 ----
+ fg_g = gval;
+ fg_b = bval;
+ }
+! # endif
+ }
+
+ /* got finished code: consume it */
+*** ../vim-8.1.1126/src/terminal.c 2019-04-06 17:33:20.651486473 +0200
+--- src/terminal.c 2019-04-06 19:05:09.748546225 +0200
+***************
+*** 3866,3873 ****
+ if (command != 't' || argcount != 1 || args[0] != 13)
+ return 0; // not handled
+
+! // When getting the window position fails it results in zero/zero.
+ (void)ui_get_winpos(&x, &y, (varnumber_T)100);
+
+ FOR_ALL_WINDOWS(wp)
+ if (wp->w_buffer == term->tl_buffer)
+--- 3866,3876 ----
+ if (command != 't' || argcount != 1 || args[0] != 13)
+ return 0; // not handled
+
+! // When getting the window position is not possible or it fails it results
+! // in zero/zero.
+! #if defined(FEAT_GUI) || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE))
+ (void)ui_get_winpos(&x, &y, (varnumber_T)100);
++ #endif
+
+ FOR_ALL_WINDOWS(wp)
+ if (wp->w_buffer == term->tl_buffer)
+*** ../vim-8.1.1126/src/testdir/test_terminal.vim 2019-04-06 17:38:21.485301005 +0200
+--- src/testdir/test_terminal.vim 2019-04-06 19:18:02.708208288 +0200
+***************
+*** 1889,1894 ****
+--- 1889,1899 ----
+ endfunc
+
+ func Test_terminal_getwinpos()
++ " does not work in the MS-Windows console
++ if has('win32') && !has('gui')
++ return
++ endif
++
+ " split, go to the bottom-right window
+ split
+ wincmd j
+*** ../vim-8.1.1126/src/version.c 2019-04-06 17:56:02.858913247 +0200
+--- src/version.c 2019-04-06 19:18:24.560082921 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1127,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+215. Your mouse-clicking forearm rivals Popeye'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.1128 b/data/vim/patches/8.1.1128
new file mode 100644
index 000000000..6295be150
--- /dev/null
+++ b/data/vim/patches/8.1.1128
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1128
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1128
+Problem: getwinpos() test does not work on MS-Windows.
+Solution: Skip the test.
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1127/src/testdir/test_terminal.vim 2019-04-06 20:00:15.433129920 +0200
+--- src/testdir/test_terminal.vim 2019-04-06 20:39:13.031416870 +0200
+***************
+*** 1889,1896 ****
+ endfunc
+
+ func Test_terminal_getwinpos()
+! " does not work in the MS-Windows console
+! if has('win32') && !has('gui')
+ return
+ endif
+
+--- 1889,1897 ----
+ endfunc
+
+ func Test_terminal_getwinpos()
+! " getwinpos() does not work in the MS-Windows console, and the GUI runs the
+! " console version in the terminal window.
+! if has('win32')
+ return
+ endif
+
+*** ../vim-8.1.1127/src/version.c 2019-04-06 20:00:15.433129920 +0200
+--- src/version.c 2019-04-06 20:40:00.919140897 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1128,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+216. Your pet rock leaves 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.1129 b/data/vim/patches/8.1.1129
new file mode 100644
index 000000000..6e4342495
--- /dev/null
+++ b/data/vim/patches/8.1.1129
@@ -0,0 +1,91 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1129
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1129
+Problem: When making a new screendump test have to create the file.
+Solution: Continue creating the failed screendump, so it can be moved once
+ it is correct.
+Files: src/testdir/screendump.vim
+
+
+*** ../vim-8.1.1128/src/testdir/screendump.vim 2019-03-30 15:59:48.086175476 +0100
+--- src/testdir/screendump.vim 2019-04-06 16:42:34.414479265 +0200
+***************
+*** 118,124 ****
+ call delete(testfile)
+ call term_dumpwrite(a:buf, testfile, a:options)
+ let testdump = readfile(testfile)
+! let refdump = readfile(reference)
+ if refdump == testdump
+ call delete(testfile)
+ if did_mkdir
+--- 118,129 ----
+ call delete(testfile)
+ call term_dumpwrite(a:buf, testfile, a:options)
+ let testdump = readfile(testfile)
+! if filereadable(reference)
+! let refdump = readfile(reference)
+! else
+! " Must be a new screendump, always fail
+! let refdump = []
+! endif
+ if refdump == testdump
+ call delete(testfile)
+ if did_mkdir
+***************
+*** 127,139 ****
+ break
+ 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
+! if len(testdump) != len(refdump)
+! let msg = msg . '; line count is ' . len(testdump) . ' instead of ' . len(refdump)
+ endif
+ for i in range(len(refdump))
+ if i >= len(testdump)
+--- 132,148 ----
+ break
+ endif
+ if i == 100
+! " Leave the failed dump around for inspection.
+! if filereadable(reference)
+! let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")'
+! if a:0 == 1
+! let msg = a:1 . ': ' . msg
+! endif
+! if len(testdump) != len(refdump)
+! let msg = msg . '; line count is ' . len(testdump) . ' instead of ' . len(refdump)
+! endif
+! else
+! let msg = 'See new dump file: call term_dumpload("' . testfile . '")'
+ endif
+ for i in range(len(refdump))
+ if i >= len(testdump)
+*** ../vim-8.1.1128/src/version.c 2019-04-06 20:40:32.366959630 +0200
+--- src/version.c 2019-04-06 20:50:37.847465919 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1129,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+217. Your sex life has drastically improved...so what if it's only cyber-sex!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1130 b/data/vim/patches/8.1.1130
new file mode 100644
index 000000000..a57ea864a
--- /dev/null
+++ b/data/vim/patches/8.1.1130
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1130
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1130
+Problem: MS-Windows: warning for unused variable.
+Solution: Remove the variable.
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.1129/src/evalfunc.c 2019-04-06 17:33:20.651486473 +0200
+--- src/evalfunc.c 2019-04-06 20:31:32.254067414 +0200
+***************
+*** 9196,9202 ****
+ int i;
+ #ifdef MSWIN
+ char_u *buf, *p;
+- WIN32_FIND_DATA fb;
+ int ok;
+ HANDLE hFind = INVALID_HANDLE_VALUE;
+ WIN32_FIND_DATAW wfb;
+--- 9196,9201 ----
+*** ../vim-8.1.1129/src/version.c 2019-04-06 20:51:46.587069001 +0200
+--- src/version.c 2019-04-06 20:52:39.066765950 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1130,
+ /**/
+
+--
+From the classified section of a city newspaper:
+Dog for sale: eats anything and is fond of children.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1131 b/data/vim/patches/8.1.1131
new file mode 100644
index 000000000..90cd3ad31
--- /dev/null
+++ b/data/vim/patches/8.1.1131
@@ -0,0 +1,201 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1131
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1131
+Problem: getwinpos() does not work in the MS-Windows console.
+Solution: Implement getwinpos().
+Files: src/ui.c, src/evalfunc.c, src/terminal.c,
+ src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1130/src/ui.c 2019-04-06 20:00:15.429129945 +0200
+--- src/ui.c 2019-04-06 21:49:45.780723617 +0200
+***************
+*** 629,634 ****
+--- 629,635 ----
+
+ #if ((defined(FEAT_EVAL) || defined(FEAT_TERMINAL)) \
+ && (defined(FEAT_GUI) \
++ || defined(MSWIN) \
+ || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)))) \
+ || defined(PROTO)
+ /*
+***************
+*** 642,651 ****
+ if (gui.in_use)
+ return gui_mch_get_winpos(x, y);
+ # endif
+! # if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
+! return term_get_winpos(x, y, timeout);
+ # else
+ return FAIL;
+ # endif
+ }
+ #endif
+--- 643,656 ----
+ if (gui.in_use)
+ return gui_mch_get_winpos(x, y);
+ # endif
+! # if defined(MSWIN) && !defined(FEAT_GUI)
+! return mch_get_winpos(x, y);
+ # else
++ # if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
++ return term_get_winpos(x, y, timeout);
++ # else
+ return FAIL;
++ # endif
+ # endif
+ }
+ #endif
+*** ../vim-8.1.1130/src/evalfunc.c 2019-04-06 20:53:26.042494665 +0200
+--- src/evalfunc.c 2019-04-06 21:47:10.709543453 +0200
+***************
+*** 5985,5991 ****
+
+ if (rettv_list_alloc(rettv) == FAIL)
+ return;
+! #if defined(FEAT_GUI) || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE))
+ {
+ varnumber_T timeout = 100;
+
+--- 5985,5993 ----
+
+ if (rettv_list_alloc(rettv) == FAIL)
+ return;
+! #if defined(FEAT_GUI) \
+! || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)) \
+! || defined(MSWIN)
+ {
+ varnumber_T timeout = 100;
+
+***************
+*** 6007,6013 ****
+ f_getwinposx(typval_T *argvars UNUSED, typval_T *rettv)
+ {
+ rettv->vval.v_number = -1;
+! #if defined(FEAT_GUI) || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE))
+ {
+ int x, y;
+
+--- 6009,6018 ----
+ f_getwinposx(typval_T *argvars UNUSED, typval_T *rettv)
+ {
+ rettv->vval.v_number = -1;
+! #if defined(FEAT_GUI) \
+! || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)) \
+! || defined(MSWIN)
+!
+ {
+ int x, y;
+
+***************
+*** 6024,6030 ****
+ f_getwinposy(typval_T *argvars UNUSED, typval_T *rettv)
+ {
+ rettv->vval.v_number = -1;
+! #if defined(FEAT_GUI) || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE))
+ {
+ int x, y;
+
+--- 6029,6037 ----
+ f_getwinposy(typval_T *argvars UNUSED, typval_T *rettv)
+ {
+ rettv->vval.v_number = -1;
+! #if defined(FEAT_GUI) \
+! || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)) \
+! || defined(MSWIN)
+ {
+ int x, y;
+
+*** ../vim-8.1.1130/src/terminal.c 2019-04-06 20:00:15.433129920 +0200
+--- src/terminal.c 2019-04-06 21:47:28.685448823 +0200
+***************
+*** 3868,3874 ****
+
+ // When getting the window position is not possible or it fails it results
+ // in zero/zero.
+! #if defined(FEAT_GUI) || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE))
+ (void)ui_get_winpos(&x, &y, (varnumber_T)100);
+ #endif
+
+--- 3868,3876 ----
+
+ // When getting the window position is not possible or it fails it results
+ // in zero/zero.
+! #if defined(FEAT_GUI) \
+! || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)) \
+! || defined(MSWIN)
+ (void)ui_get_winpos(&x, &y, (varnumber_T)100);
+ #endif
+
+*** ../vim-8.1.1130/src/testdir/test_terminal.vim 2019-04-06 20:40:32.362959652 +0200
+--- src/testdir/test_terminal.vim 2019-04-06 21:58:50.945799533 +0200
+***************
+*** 1889,1900 ****
+ endfunc
+
+ func Test_terminal_getwinpos()
+- " getwinpos() does not work in the MS-Windows console, and the GUI runs the
+- " console version in the terminal window.
+- if has('win32')
+- return
+- endif
+-
+ " split, go to the bottom-right window
+ split
+ wincmd j
+--- 1889,1894 ----
+***************
+*** 1913,1922 ****
+ let xpos = str2nr(substitute(line, '\[\(\d\+\), \d\+\]', '\1', ''))
+ let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
+
+! " Position must be bigger than the getwinpos() result of Vim itself.
+! let [xroot, yroot] = getwinpos()
+! call assert_inrange(xroot + 2, xroot + 1000, xpos)
+! call assert_inrange(yroot + 2, yroot + 1000, ypos)
+
+ call term_wait(buf)
+ call term_sendkeys(buf, ":q\<CR>")
+--- 1907,1923 ----
+ let xpos = str2nr(substitute(line, '\[\(\d\+\), \d\+\]', '\1', ''))
+ let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
+
+! " getwinpos() in the MS-Windows console returns the screen position of the
+! " emulated console.
+! if has('win32')
+! call assert_inrange(0, 4000, xpos)
+! call assert_inrange(0, 2000, ypos)
+! else
+! " Position must be bigger than the getwinpos() result of Vim itself.
+! let [xroot, yroot] = getwinpos()
+! call assert_inrange(xroot + 2, xroot + 1000, xpos)
+! call assert_inrange(yroot + 2, yroot + 1000, ypos)
+! endif
+
+ call term_wait(buf)
+ call term_sendkeys(buf, ":q\<CR>")
+*** ../vim-8.1.1130/src/version.c 2019-04-06 20:53:26.042494665 +0200
+--- src/version.c 2019-04-06 21:59:10.497693909 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1131,
+ /**/
+
+--
+Don't be humble ... you're not that great.
+ -- Golda Meir
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1132 b/data/vim/patches/8.1.1132
new file mode 100644
index 000000000..ed8099ced
--- /dev/null
+++ b/data/vim/patches/8.1.1132
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1132
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1132
+Problem: getwinpos() test fails on MS-Windows.
+Solution: Don't try running this test.
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1131/src/testdir/test_terminal.vim 2019-04-06 22:01:20.756989404 +0200
+--- src/testdir/test_terminal.vim 2019-04-06 22:19:26.599281275 +0200
+***************
+*** 1889,1894 ****
+--- 1889,1898 ----
+ endfunc
+
+ func Test_terminal_getwinpos()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
+ " split, go to the bottom-right window
+ split
+ wincmd j
+***************
+*** 1907,1923 ****
+ let xpos = str2nr(substitute(line, '\[\(\d\+\), \d\+\]', '\1', ''))
+ let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
+
+! " getwinpos() in the MS-Windows console returns the screen position of the
+! " emulated console.
+! if has('win32')
+! call assert_inrange(0, 4000, xpos)
+! call assert_inrange(0, 2000, ypos)
+! else
+! " Position must be bigger than the getwinpos() result of Vim itself.
+! let [xroot, yroot] = getwinpos()
+! call assert_inrange(xroot + 2, xroot + 1000, xpos)
+! call assert_inrange(yroot + 2, yroot + 1000, ypos)
+! endif
+
+ call term_wait(buf)
+ call term_sendkeys(buf, ":q\<CR>")
+--- 1911,1920 ----
+ let xpos = str2nr(substitute(line, '\[\(\d\+\), \d\+\]', '\1', ''))
+ let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
+
+! " Position must be bigger than the getwinpos() result of Vim itself.
+! let [xroot, yroot] = getwinpos()
+! call assert_inrange(xroot + 2, xroot + 1000, xpos)
+! call assert_inrange(yroot + 2, yroot + 1000, ypos)
+
+ call term_wait(buf)
+ call term_sendkeys(buf, ":q\<CR>")
+*** ../vim-8.1.1131/src/version.c 2019-04-06 22:01:20.756989404 +0200
+--- src/version.c 2019-04-06 22:20:16.555014827 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1132,
+ /**/
+
+--
+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.1133 b/data/vim/patches/8.1.1133
new file mode 100644
index 000000000..4f6cb5209
--- /dev/null
+++ b/data/vim/patches/8.1.1133
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1133
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1133
+Problem: Compiler warning for uninitialized struct member. (Yegappan
+ Lakshmanan)
+Solution: Add initializer field.
+Files: src/globals.h
+
+
+*** ../vim-8.1.1132/src/globals.h 2019-04-04 15:04:32.966792195 +0200
+--- src/globals.h 2019-04-07 11:54:07.934548892 +0200
+***************
+*** 320,326 ****
+ 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);
+--- 320,326 ----
+ 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 COMMA 0});
+ #endif
+
+ EXTERN int did_source_packages INIT(= FALSE);
+*** ../vim-8.1.1132/src/version.c 2019-04-06 22:21:19.226680116 +0200
+--- src/version.c 2019-04-07 11:55:58.573935522 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1133,
+ /**/
+
+--
+How do I set the laser printer to stun?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1134 b/data/vim/patches/8.1.1134
new file mode 100644
index 000000000..94d17c276
--- /dev/null
+++ b/data/vim/patches/8.1.1134
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1134
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1134
+Problem: Buffer for quickfix window is reused for another file.
+Solution: Don't reuse the quickfx buffer. (Yegappan Lakshmanan)
+Files: src/buffer.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.1133/src/buffer.c 2019-04-04 18:15:05.770857065 +0200
+--- src/buffer.c 2019-04-07 12:01:05.692262700 +0200
+***************
+*** 1853,1858 ****
+--- 1853,1859 ----
+ && curbuf->b_ffname == NULL
+ && curbuf->b_nwindows <= 1
+ && (curbuf->b_ml.ml_mfp == NULL || BUFEMPTY())
++ && !bt_quickfix(curbuf)
+ && !curbufIsChanged());
+ }
+
+*** ../vim-8.1.1133/src/testdir/test_quickfix.vim 2019-04-04 14:04:06.994917179 +0200
+--- src/testdir/test_quickfix.vim 2019-04-07 12:03:22.011530000 +0200
+***************
+*** 4012,4014 ****
+--- 4012,4028 ----
+ new | only
+ call delete('Xtest1')
+ endfunc
++
++ " Test to make sure that an empty quickfix buffer is not reused for loading
++ " a normal buffer.
++ func Test_empty_qfbuf()
++ enew | only
++ call writefile(["Test"], 'Xfile1')
++ call setqflist([], 'f')
++ copen | only
++ let qfbuf = bufnr('')
++ edit Xfile1
++ call assert_notequal(qfbuf, bufnr(''))
++ enew
++ call delete('Xfile1')
++ endfunc
+*** ../vim-8.1.1133/src/version.c 2019-04-07 11:56:14.913845511 +0200
+--- src/version.c 2019-04-07 12:02:26.731826564 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1134,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+221. Your wife melts your keyboard in the 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.1135 b/data/vim/patches/8.1.1135
new file mode 100644
index 000000000..73146adf1
--- /dev/null
+++ b/data/vim/patches/8.1.1135
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1135
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1135 (after 8.1.1134)
+Problem: Build failure for small version. (Tony Mechelynck)
+Solution: Add #ifdef.
+Files: src/buffer.c
+
+
+*** ../vim-8.1.1134/src/buffer.c 2019-04-07 12:04:48.523067191 +0200
+--- src/buffer.c 2019-04-07 14:17:05.647856945 +0200
+***************
+*** 1853,1859 ****
+--- 1853,1861 ----
+ && curbuf->b_ffname == NULL
+ && curbuf->b_nwindows <= 1
+ && (curbuf->b_ml.ml_mfp == NULL || BUFEMPTY())
++ #if defined(FEAT_QUICKFIX)
+ && !bt_quickfix(curbuf)
++ #endif
+ && !curbufIsChanged());
+ }
+
+*** ../vim-8.1.1134/src/version.c 2019-04-07 12:04:48.523067191 +0200
+--- src/version.c 2019-04-07 14:13:55.340994371 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1135,
+ /**/
+
+--
+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.1136 b/data/vim/patches/8.1.1136
new file mode 100644
index 000000000..e5b738bd5
--- /dev/null
+++ b/data/vim/patches/8.1.1136
@@ -0,0 +1,160 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1136
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1136
+Problem: Decoding of mouse click escape sequence is not tested.
+Solution: Add a test for xterm and SGR using low-level input. Make
+ low-level input execution with feedkeys() work.
+Files: src/testdir/test_termcodes.vim, src/testdir/Make_all.mak,
+ src/evalfunc.c, src/ex_docmd.c
+
+
+*** ../vim-8.1.1135/src/testdir/test_termcodes.vim 2019-04-07 14:20:33.310644684 +0200
+--- src/testdir/test_termcodes.vim 2019-04-07 14:13:21.705198866 +0200
+***************
+*** 0 ****
+--- 1,47 ----
++ " Tests for decoding escape sequences sent by the terminal.
++
++ " This only works for Unix in a terminal
++ if has('gui_running') || !has('unix')
++ finish
++ endif
++
++ func Test_xterm_mouse_click()
++ new
++ let save_mouse = &mouse
++ let save_term = &term
++ let save_ttymouse = &ttymouse
++ set mouse=a
++ set term=xterm
++ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
++ redraw
++
++ " Xterm mouse click
++ set ttymouse=xterm
++ let button = 0x20 " left down
++ let row = 2 + 32
++ let col = 6 + 32
++ call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
++
++ let button = 0x23 " release
++ call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
++
++ call assert_equal([0, 2, 6, 0], getpos('.'))
++
++ " SGR mouse click
++ set ttymouse=sgr
++ let button = 0 " left down
++ let row = 3
++ let col = 9
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
++
++ let button = 3 " release
++ call feedkeys(printf("\<Esc>[<%d;%d;%dm", button, col, row), 'Lx!')
++
++ call assert_equal([0, 3, 9, 0], getpos('.'))
++
++ let &mouse = save_mouse
++ let &term = save_term
++ let &ttymouse = save_ttymouse
++ bwipe!
++ endfunc
++
+*** ../vim-8.1.1135/src/testdir/Make_all.mak 2019-03-24 20:18:36.827484226 +0100
+--- src/testdir/Make_all.mak 2019-04-07 12:14:19.864037012 +0200
+***************
+*** 250,255 ****
+--- 250,256 ----
+ test_taglist \
+ test_tcl \
+ test_termencoding \
++ test_termcodes \
+ test_terminal \
+ test_terminal_fail \
+ test_textformat \
+***************
+*** 402,407 ****
+--- 403,409 ----
+ test_tab.res \
+ test_tcl.res \
+ test_termencoding.res \
++ test_termcodes.res \
+ test_terminal.res \
+ test_terminal_fail.res \
+ test_textformat.res \
+*** ../vim-8.1.1135/src/evalfunc.c 2019-04-06 22:01:20.756989404 +0200
+--- src/evalfunc.c 2019-04-07 13:41:30.844418341 +0200
+***************
+*** 3792,3798 ****
+
+ if (!dangerous)
+ ++ex_normal_busy;
+! exec_normal(TRUE, FALSE, TRUE);
+ if (!dangerous)
+ --ex_normal_busy;
+
+--- 3792,3798 ----
+
+ if (!dangerous)
+ ++ex_normal_busy;
+! exec_normal(TRUE, lowlevel, TRUE);
+ if (!dangerous)
+ --ex_normal_busy;
+
+*** ../vim-8.1.1135/src/ex_docmd.c 2019-03-30 18:46:57.348077402 +0100
+--- src/ex_docmd.c 2019-04-07 13:42:08.252219954 +0200
+***************
+*** 10487,10498 ****
+ 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();
+--- 10487,10501 ----
+ exec_normal(int was_typed, int use_vpeekc, int may_use_terminal_loop UNUSED)
+ {
+ oparg_T oa;
++ int c;
+
++ // When calling vpeekc() from feedkeys() it will return Ctrl_C when there
++ // is nothing to get, so also check for Ctrl_C.
+ clear_oparg(&oa);
+ finish_op = FALSE;
+ while ((!stuff_empty()
+ || ((was_typed || !typebuf_typed()) && typebuf.tb_len > 0)
+! || (use_vpeekc && (c = vpeekc()) != NUL && c != Ctrl_C))
+ && !got_int)
+ {
+ update_topline_cursor();
+*** ../vim-8.1.1135/src/version.c 2019-04-07 14:19:06.323149516 +0200
+--- src/version.c 2019-04-07 14:20:18.542730124 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1136,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+222. You send more than 20 personal e-mails 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.1137 b/data/vim/patches/8.1.1137
new file mode 100644
index 000000000..143a46567
--- /dev/null
+++ b/data/vim/patches/8.1.1137
@@ -0,0 +1,107 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1137
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1137
+Problem: Xterm mouse wheel escape sequence is not tested.
+Solution: Add a test using low-level input. (Dominique Pelle, closes #4221)
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1136/src/testdir/test_termcodes.vim 2019-04-07 14:21:26.226339351 +0200
+--- src/testdir/test_termcodes.vim 2019-04-07 21:52:38.692856529 +0200
+***************
+*** 45,47 ****
+--- 45,113 ----
+ bwipe!
+ endfunc
+
++ func Test_xterm_mouse_wheel()
++ new
++ let save_mouse = &mouse
++ let save_term = &term
++ let save_ttymouse = &ttymouse
++ set mouse=a
++ set term=xterm
++ call setline(1, range(1, 100))
++
++ " Test Xterm mouse wheel.
++ set ttymouse=xterm
++ let button = 0x41 " wheel down.
++ let row = 1 + 32 " cursor position for mouse wheel is not relevant.
++ let col = 1 + 32
++
++ call assert_equal(1, line('w0'))
++ call assert_equal([0, 1, 1, 0], getpos('.'))
++ call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
++ call assert_equal(4, line('w0'))
++ call assert_equal([0, 4, 1, 0], getpos('.'))
++ call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
++ call assert_equal(7, line('w0'))
++ call assert_equal([0, 7, 1, 0], getpos('.'))
++
++ let button = 0x40 " wheel up.
++
++ call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
++ call assert_equal(4, line('w0'))
++ call assert_equal([0, 7, 1, 0], getpos('.'))
++ call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
++ call assert_equal(1, line('w0'))
++ call assert_equal([0, 7, 1, 0], getpos('.'))
++
++ " Test SGR mouse wheel.
++ set ttymouse=sgr
++ go
++ let button = 0x41 " wheel down.
++ let row = 1 " cursor position for mouse wheel is not relevant.
++ let col = 1
++
++ call assert_equal(1, line('w0'))
++ call assert_equal([0, 1, 1, 0], getpos('.'))
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
++ call assert_equal(4, line('w0'))
++ call assert_equal([0, 4, 1, 0], getpos('.'))
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
++ call assert_equal(7, line('w0'))
++ call assert_equal([0, 7, 1, 0], getpos('.'))
++
++ let button = 0x40 " wheel up.
++
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
++ call assert_equal(4, line('w0'))
++ call assert_equal([0, 7, 1, 0], getpos('.'))
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
++ call assert_equal(1, line('w0'))
++ call assert_equal([0, 7, 1, 0], getpos('.'))
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
++ call assert_equal(1, line('w0'))
++ call assert_equal([0, 7, 1, 0], getpos('.'))
++
++ let &mouse = save_mouse
++ let &term = save_term
++ let &ttymouse = save_ttymouse
++ bwipe!
++ endfunc
+*** ../vim-8.1.1136/src/version.c 2019-04-07 14:21:26.230339328 +0200
+--- src/version.c 2019-04-07 21:53:40.908539048 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1137,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+227. You sleep next to your monitor. Or on top 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.1138 b/data/vim/patches/8.1.1138
new file mode 100644
index 000000000..7d100919f
--- /dev/null
+++ b/data/vim/patches/8.1.1138
@@ -0,0 +1,414 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1138
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1138
+Problem: Plugins don't get notified when the popup menu changes.
+Solution: Add the CompleteChanged event. (Andy Massimino. closes #4176)
+Files: runtime/doc/autocmd.txt, src/autocmd.c, src/dict.c,
+ src/insexpand.c, src/popupmnu.c, src/proto/autocmd.pro,
+ src/proto/dict.pro, src/proto/popupmnu.pro,
+ src/testdir/test_popup.vim, src/vim.h
+
+
+*** ../vim-8.1.1137/runtime/doc/autocmd.txt 2019-04-04 15:04:32.962792211 +0200
+--- runtime/doc/autocmd.txt 2019-04-08 18:00:41.100946679 +0200
+***************
+*** 365,370 ****
+--- 367,373 ----
+ |SessionLoadPost| after loading a session file
+
+ |MenuPopup| just before showing the popup menu
++ |CompleteChanged| after Insert mode completion menu changed
+ |CompleteDone| after Insert mode completion is done
+
+ |User| to be used in combination with ":doautocmd"
+***************
+*** 577,583 ****
+--- 580,601 ----
+ ColorSchemePre Before loading a color scheme. |:colorscheme|
+ Useful to setup removing things added by a
+ color scheme, before another one is loaded.
++ CompleteChanged *CompleteChanged*
++ After each time the Insert mode completion
++ menu changed. Not fired on popup menu hide,
++ use |CompleteDone| for that. Never triggered
++ recursively.
++
++ Sets these |v:event| keys:
++ completed_item
++ height nr of items visible
++ width screen cells
++ row top screen row
++ col leftmost screen column
++ size total nr of items
++ scrollbar TRUE if visible
+
++ It is not allowed to change the text |textlock|.
+ *CompleteDone*
+ CompleteDone After Insert mode completion is done. Either
+ when something was completed or abandoning
+*** ../vim-8.1.1137/src/autocmd.c 2019-04-04 15:40:53.011337945 +0200
+--- src/autocmd.c 2019-04-08 17:45:52.897440559 +0200
+***************
+*** 112,117 ****
+--- 112,118 ----
+ {"CmdUndefined", EVENT_CMDUNDEFINED},
+ {"ColorScheme", EVENT_COLORSCHEME},
+ {"ColorSchemePre", EVENT_COLORSCHEMEPRE},
++ {"CompleteChanged", EVENT_COMPLETECHANGED},
+ {"CompleteDone", EVENT_COMPLETEDONE},
+ {"CursorHold", EVENT_CURSORHOLD},
+ {"CursorHoldI", EVENT_CURSORHOLDI},
+***************
+*** 1794,1799 ****
+--- 1795,1811 ----
+ }
+ #endif
+
++ #if defined(FEAT_EVAL) || defined(PROTO)
++ /*
++ * Return TRUE when there is a CompleteChanged autocommand defined.
++ */
++ int
++ has_completechanged(void)
++ {
++ return (first_autopat[(int)EVENT_COMPLETECHANGED] != NULL);
++ }
++ #endif
++
+ /*
+ * Execute autocommands for "event" and file name "fname".
+ * Return TRUE if some commands were executed.
+*** ../vim-8.1.1137/src/dict.c 2019-02-11 22:00:07.667917634 +0100
+--- src/dict.c 2019-04-08 17:45:52.897440559 +0200
+***************
+*** 342,359 ****
+ }
+
+ /*
+! * Add a number entry to dictionary "d".
+ * Returns FAIL when out of memory and when key already exists.
+ */
+! int
+! dict_add_number(dict_T *d, char *key, varnumber_T nr)
+ {
+ dictitem_T *item;
+
+ item = dictitem_alloc((char_u *)key);
+ if (item == NULL)
+ return FAIL;
+! item->di_tv.v_type = VAR_NUMBER;
+ item->di_tv.vval.v_number = nr;
+ if (dict_add(d, item) == FAIL)
+ {
+--- 342,359 ----
+ }
+
+ /*
+! * Add a number or special entry to dictionary "d".
+ * Returns FAIL when out of memory and when key already exists.
+ */
+! static int
+! dict_add_number_special(dict_T *d, char *key, varnumber_T nr, int special)
+ {
+ dictitem_T *item;
+
+ item = dictitem_alloc((char_u *)key);
+ if (item == NULL)
+ return FAIL;
+! item->di_tv.v_type = special ? VAR_SPECIAL : VAR_NUMBER;
+ item->di_tv.vval.v_number = nr;
+ if (dict_add(d, item) == FAIL)
+ {
+***************
+*** 364,369 ****
+--- 364,389 ----
+ }
+
+ /*
++ * Add a number entry to dictionary "d".
++ * Returns FAIL when out of memory and when key already exists.
++ */
++ int
++ dict_add_number(dict_T *d, char *key, varnumber_T nr)
++ {
++ return dict_add_number_special(d, key, nr, FALSE);
++ }
++
++ /*
++ * Add a special entry to dictionary "d".
++ * Returns FAIL when out of memory and when key already exists.
++ */
++ int
++ dict_add_special(dict_T *d, char *key, varnumber_T nr)
++ {
++ return dict_add_number_special(d, key, nr, TRUE);
++ }
++
++ /*
+ * Add a string entry to dictionary "d".
+ * Returns FAIL when out of memory and when key already exists.
+ */
+*** ../vim-8.1.1137/src/insexpand.c 2019-04-06 14:22:17.754642647 +0200
+--- src/insexpand.c 2019-04-08 18:09:25.454100998 +0200
+***************
+*** 203,208 ****
+--- 203,209 ----
+ static void ins_compl_add_list(list_T *list);
+ static void ins_compl_add_dict(dict_T *dict);
+ # endif
++ static dict_T *ins_compl_dict_alloc(compl_T *match);
+ static int ins_compl_key2dir(int c);
+ static int ins_compl_pum_key(int c);
+ static int ins_compl_key2count(int c);
+***************
+*** 994,999 ****
+--- 995,1031 ----
+ return (i >= 2);
+ }
+
++ static void
++ trigger_complete_changed_event(int cur)
++ {
++ dict_T *v_event;
++ dict_T *item;
++ static int recursive = FALSE;
++
++ if (recursive)
++ return;
++
++ v_event = get_vim_var_dict(VV_EVENT);
++ if (cur < 0)
++ item = dict_alloc();
++ else
++ item = ins_compl_dict_alloc(compl_curr_match);
++ if (item == NULL)
++ return;
++ dict_add_dict(v_event, "completed_item", item);
++ pum_set_event_info(v_event);
++ dict_set_items_ro(v_event);
++
++ recursive = TRUE;
++ textlock++;
++ apply_autocmds(EVENT_COMPLETECHANGED, NULL, NULL, FALSE, curbuf);
++ textlock--;
++ recursive = FALSE;
++
++ dict_free_contents(v_event);
++ hash_init(&v_event->dv_hashtab);
++ }
++
+ /*
+ * Show the popup menu for the list of matches.
+ * Also adjusts "compl_shown_match" to an entry that is actually displayed.
+***************
+*** 1136,1141 ****
+--- 1168,1176 ----
+ curwin->w_cursor.col = compl_col;
+ pum_display(compl_match_array, compl_match_arraysize, cur);
+ curwin->w_cursor.col = col;
++
++ if (has_completechanged())
++ trigger_complete_changed_event(cur);
+ }
+ }
+
+***************
+*** 2899,2921 ****
+ compl_used_match = FALSE;
+ else
+ compl_used_match = TRUE;
+
+- // Set completed item.
+- // { word, abbr, menu, kind, info }
+- dict = dict_alloc_lock(VAR_FIXED);
+ if (dict != NULL)
+ {
+! dict_add_string(dict, "word", compl_shown_match->cp_str);
+! dict_add_string(dict, "abbr", compl_shown_match->cp_text[CPT_ABBR]);
+! dict_add_string(dict, "menu", compl_shown_match->cp_text[CPT_MENU]);
+! dict_add_string(dict, "kind", compl_shown_match->cp_text[CPT_KIND]);
+! dict_add_string(dict, "info", compl_shown_match->cp_text[CPT_INFO]);
+! dict_add_string(dict, "user_data",
+! compl_shown_match->cp_text[CPT_USER_DATA]);
+ }
+! set_vim_var_dict(VV_COMPLETED_ITEM, dict);
+! if (!in_compl_func)
+! compl_curr_match = compl_shown_match;
+ }
+
+ /*
+--- 2934,2964 ----
+ compl_used_match = FALSE;
+ else
+ compl_used_match = TRUE;
++ dict = ins_compl_dict_alloc(compl_shown_match);
++ set_vim_var_dict(VV_COMPLETED_ITEM, dict);
++ if (!in_compl_func)
++ compl_curr_match = compl_shown_match;
++ }
++
++ /*
++ * Allocate Dict for the completed item.
++ * { word, abbr, menu, kind, info }
++ */
++ static dict_T *
++ ins_compl_dict_alloc(compl_T *match)
++ {
++ dict_T *dict = dict_alloc_lock(VAR_FIXED);
+
+ if (dict != NULL)
+ {
+! dict_add_string(dict, "word", match->cp_str);
+! dict_add_string(dict, "abbr", match->cp_text[CPT_ABBR]);
+! dict_add_string(dict, "menu", match->cp_text[CPT_MENU]);
+! dict_add_string(dict, "kind", match->cp_text[CPT_KIND]);
+! dict_add_string(dict, "info", match->cp_text[CPT_INFO]);
+! dict_add_string(dict, "user_data", match->cp_text[CPT_USER_DATA]);
+ }
+! return dict;
+ }
+
+ /*
+*** ../vim-8.1.1137/src/popupmnu.c 2019-03-02 10:13:36.796974835 +0100
+--- src/popupmnu.c 2019-04-08 18:05:53.751263571 +0200
+***************
+*** 923,928 ****
+--- 923,944 ----
+ return pum_height;
+ }
+
++ /*
++ * Add size information about the pum to "dict".
++ */
++ void
++ pum_set_event_info(dict_T *dict)
++ {
++ if (!pum_visible())
++ return;
++ dict_add_number(dict, "height", pum_height);
++ dict_add_number(dict, "width", pum_width);
++ dict_add_number(dict, "row", pum_row);
++ dict_add_number(dict, "col", pum_col);
++ dict_add_number(dict, "size", pum_size);
++ dict_add_special(dict, "scrollbar", pum_scrollbar ? VVAL_TRUE : VVAL_FALSE);
++ }
++
+ # if defined(FEAT_BEVAL_TERM) || defined(FEAT_TERM_POPUP_MENU) || defined(PROTO)
+ static void
+ pum_position_at_mouse(int min_width)
+*** ../vim-8.1.1137/src/proto/autocmd.pro 2019-01-26 16:20:44.264683546 +0100
+--- src/proto/autocmd.pro 2019-04-08 18:01:19.088781927 +0200
+***************
+*** 26,31 ****
+--- 26,32 ----
+ int has_cmdundefined(void);
+ int has_funcundefined(void);
+ int has_textyankpost(void);
++ int has_completechanged(void);
+ void block_autocmds(void);
+ void unblock_autocmds(void);
+ int is_autocmd_blocked(void);
+*** ../vim-8.1.1137/src/proto/dict.pro 2018-12-26 22:57:37.978550895 +0100
+--- src/proto/dict.pro 2019-04-08 17:45:52.905440501 +0200
+***************
+*** 14,19 ****
+--- 14,20 ----
+ dict_T *dict_copy(dict_T *orig, int deep, int copyID);
+ int dict_add(dict_T *d, dictitem_T *item);
+ int dict_add_number(dict_T *d, char *key, varnumber_T nr);
++ int dict_add_special(dict_T *d, char *key, varnumber_T nr);
+ int dict_add_string(dict_T *d, char *key, char_u *str);
+ int dict_add_string_len(dict_T *d, char *key, char_u *str, int len);
+ int dict_add_list(dict_T *d, char *key, list_T *list);
+*** ../vim-8.1.1137/src/proto/popupmnu.pro 2019-01-17 21:09:02.045706371 +0100
+--- src/proto/popupmnu.pro 2019-04-08 18:06:01.919216971 +0200
+***************
+*** 8,13 ****
+--- 8,14 ----
+ int pum_visible(void);
+ void pum_may_redraw(void);
+ int pum_get_height(void);
++ void pum_set_event_info(dict_T *dict);
+ int split_message(char_u *mesg, pumitem_T **array);
+ void ui_remove_balloon(void);
+ void ui_post_balloon(char_u *mesg, list_T *list);
+*** ../vim-8.1.1137/src/testdir/test_popup.vim 2019-04-06 13:45:51.568756943 +0200
+--- src/testdir/test_popup.vim 2019-04-08 17:45:52.909440473 +0200
+***************
+*** 1029,1032 ****
+--- 1029,1066 ----
+ bwipe!
+ endfunc
+
++ func Test_CompleteChanged()
++ new
++ call setline(1, ['foo', 'bar', 'foobar', ''])
++ set complete=. completeopt=noinsert,noselect,menuone
++ function! OnPumChange()
++ let g:event = copy(v:event)
++ let g:item = get(v:event, 'completed_item', {})
++ let g:word = get(g:item, 'word', v:null)
++ endfunction
++ augroup AAAAA_Group
++ au!
++ autocmd CompleteChanged * :call OnPumChange()
++ augroup END
++ call cursor(4, 1)
++
++ call feedkeys("Sf\<C-N>", 'tx')
++ call assert_equal({'completed_item': {}, 'width': 15,
++ \ 'height': 2, 'size': 2,
++ \ 'col': 0, 'row': 4, 'scrollbar': v:false}, g:event)
++ call feedkeys("a\<C-N>\<C-N>\<C-E>", 'tx')
++ call assert_equal('foo', g:word)
++ call feedkeys("a\<C-N>\<C-N>\<C-N>\<C-E>", 'tx')
++ call assert_equal('foobar', g:word)
++ call feedkeys("a\<C-N>\<C-N>\<C-N>\<C-N>\<C-E>", 'tx')
++ call assert_equal(v:null, g:word)
++ call feedkeys("a\<C-N>\<C-N>\<C-N>\<C-N>\<C-P>", 'tx')
++ call assert_equal('foobar', g:word)
++
++ autocmd! AAAAA_Group
++ set complete& completeopt&
++ delfunc! OnPumchange
++ bw!
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.1137/src/vim.h 2019-04-02 22:15:51.348273497 +0200
+--- src/vim.h 2019-04-08 17:45:52.909440473 +0200
+***************
+*** 1270,1275 ****
+--- 1270,1276 ----
+ EVENT_CMDWINLEAVE, // before leaving the cmdline window
+ EVENT_COLORSCHEME, // after loading a colorscheme
+ EVENT_COLORSCHEMEPRE, // before loading a colorscheme
++ EVENT_COMPLETECHANGED, // after completion popup menu changed
+ EVENT_COMPLETEDONE, // after finishing insert complete
+ EVENT_CURSORHOLD, // cursor in same position for a while
+ EVENT_CURSORHOLDI, // idem, in Insert mode
+*** ../vim-8.1.1137/src/version.c 2019-04-07 21:55:03.736116273 +0200
+--- src/version.c 2019-04-08 18:14:25.904569298 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1138,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+230. You spend your Friday nights typing away at your keyboard
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1139 b/data/vim/patches/8.1.1139
new file mode 100644
index 000000000..7d1ad6121
--- /dev/null
+++ b/data/vim/patches/8.1.1139
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1139
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1139
+Problem: No test for what is fixed in patch 8.1.0716.
+Solution: Add a test. (Yasuhiro Matsumoto, closes #3797)
+Files: src/testdir/test_ins_complete.vim
+
+*** ../vim-8.1.1138/src/testdir/test_ins_complete.vim 2019-01-11 13:02:20.105567884 +0100
+--- src/testdir/test_ins_complete.vim 2019-04-08 18:56:42.498049152 +0200
+***************
+*** 186,197 ****
+--- 186,200 ----
+
+ func Test_CompleteDoneNone()
+ au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemNone()
++ let oldline = join(map(range(&columns), 'nr2char(screenchar(&lines-1, v:val+1))'), '')
+
+ set completefunc=<SID>CompleteDone_CompleteFuncNone
+ execute "normal a\<C-X>\<C-U>\<C-Y>"
+ set completefunc&
++ let newline = join(map(range(&columns), 'nr2char(screenchar(&lines-1, v:val+1))'), '')
+
+ call assert_true(s:called_completedone)
++ call assert_equal(oldline, newline)
+
+ let s:called_completedone = 0
+ au! CompleteDone
+*** ../vim-8.1.1138/src/version.c 2019-04-08 18:15:36.472223190 +0200
+--- src/version.c 2019-04-08 18:59:05.661264378 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1139,
+ /**/
+
+
+--
+A computer without Windows is like a fish without a bicycle.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1140 b/data/vim/patches/8.1.1140
new file mode 100644
index 000000000..bb8f23751
--- /dev/null
+++ b/data/vim/patches/8.1.1140
@@ -0,0 +1,408 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1140
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1140
+Problem: Not easy to find out what neighbors a window has.
+Solution: Add more arguments to winnr(). (Yegappan Lakshmanan, closes #3993)
+Files: runtime/doc/eval.txt, src/evalfunc.c, src/proto/window.pro,
+ src/testdir/test_window_cmd.vim, src/window.c
+
+
+*** ../vim-8.1.1139/runtime/doc/eval.txt 2019-04-06 13:18:06.733335092 +0200
+--- runtime/doc/eval.txt 2019-04-08 19:56:34.570615478 +0200
+***************
+*** 10139,10155 ****
+ *winnr()*
+ winnr([{arg}]) The result is a Number, which is the number of the current
+ window. The top window has number 1.
+! When the optional argument is "$", the number of the
+! last window is returned (the window count). >
+! let window_count = winnr('$')
+! < When the optional argument is "#", the number of the last
+! accessed window is returned (where |CTRL-W_p| goes to).
+! If there is no previous window or it is in another tab page 0
+! is returned.
+ The number can be used with |CTRL-W_w| and ":wincmd w"
+ |:wincmd|.
+ Also see |tabpagewinnr()| and |win_getid()|.
+!
+ *winrestcmd()*
+ winrestcmd() Returns a sequence of |:resize| commands that should restore
+ the current window sizes. Only works properly when no windows
+--- 10198,10227 ----
+ *winnr()*
+ winnr([{arg}]) The result is a Number, which is the number of the current
+ window. The top window has number 1.
+!
+! The optional argument {arg} supports the following values:
+! $ the number of the last window (the window
+! count).
+! # the number of the last accessed window (where
+! |CTRL-W_p| goes to). If there is no previous
+! window or it is in another tab page 0 is
+! returned.
+! {N}j the number of the Nth window below the
+! current window (where |CTRL-W_j| goes to).
+! {N}k the number of the Nth window above the current
+! window (where |CTRL-W_k| goes to).
+! {N}h the number of the Nth window left of the
+! current window (where |CTRL-W_h| goes to).
+! {N}l the number of the Nth window right of the
+! current window (where |CTRL-W_l| goes to).
+ The number can be used with |CTRL-W_w| and ":wincmd w"
+ |:wincmd|.
+ Also see |tabpagewinnr()| and |win_getid()|.
+! Examples: >
+! let window_count = winnr('$')
+! let prev_window = winnr('#')
+! let wnum = winnr('3k')
+! <
+ *winrestcmd()*
+ winrestcmd() Returns a sequence of |:resize| commands that should restore
+ the current window sizes. Only works properly when no windows
+*** ../vim-8.1.1139/src/evalfunc.c 2019-04-07 14:21:26.230339328 +0200
+--- src/evalfunc.c 2019-04-08 19:53:26.131435229 +0200
+***************
+*** 13982,13987 ****
+--- 13982,13989 ----
+ twin = (tp == curtab) ? curwin : tp->tp_curwin;
+ if (argvar->v_type != VAR_UNKNOWN)
+ {
++ int invalid_arg = FALSE;
++
+ arg = tv_get_string_chk(argvar);
+ if (arg == NULL)
+ nr = 0; /* type error; errmsg already given */
+***************
+*** 13995,14000 ****
+--- 13997,14028 ----
+ }
+ else
+ {
++ long count;
++ char_u *endp;
++
++ // Extract the window count (if specified). e.g. winnr('3j')
++ count = strtol((char *)arg, (char **)&endp, 10);
++ if (count <= 0)
++ count = 1; // if count is not specified, default to 1
++ if (endp != NULL && *endp != '\0')
++ {
++ if (STRCMP(endp, "j") == 0)
++ twin = win_vert_neighbor(tp, twin, FALSE, count);
++ else if (STRCMP(endp, "k") == 0)
++ twin = win_vert_neighbor(tp, twin, TRUE, count);
++ else if (STRCMP(endp, "h") == 0)
++ twin = win_horz_neighbor(tp, twin, TRUE, count);
++ else if (STRCMP(endp, "l") == 0)
++ twin = win_horz_neighbor(tp, twin, FALSE, count);
++ else
++ invalid_arg = TRUE;
++ }
++ else
++ invalid_arg = TRUE;
++ }
++
++ if (invalid_arg)
++ {
+ semsg(_(e_invexpr2), arg);
+ nr = 0;
+ }
+*** ../vim-8.1.1139/src/proto/window.pro 2019-02-13 22:45:21.512636158 +0100
+--- src/proto/window.pro 2019-04-08 19:53:26.131435229 +0200
+***************
+*** 37,42 ****
+--- 37,44 ----
+ void win_goto(win_T *wp);
+ win_T *win_find_nr(int winnr);
+ tabpage_T *win_find_tabpage(win_T *win);
++ win_T *win_vert_neighbor(tabpage_T *tp, win_T *wp, int up, long count);
++ win_T *win_horz_neighbor(tabpage_T *tp, win_T * wp, int left, long count);
+ void win_enter(win_T *wp, int undo_sync);
+ win_T *buf_jump_open_win(buf_T *buf);
+ win_T *buf_jump_open_tab(buf_T *buf);
+*** ../vim-8.1.1139/src/testdir/test_window_cmd.vim 2019-03-04 13:18:15.977053527 +0100
+--- src/testdir/test_window_cmd.vim 2019-04-08 19:53:26.131435229 +0200
+***************
+*** 743,746 ****
+--- 743,791 ----
+ let &so = so_save
+ endfunc
+
++ " Tests for the winnr() function
++ func Test_winnr()
++ only | tabonly
++ call assert_equal(1, winnr('j'))
++ call assert_equal(1, winnr('k'))
++ call assert_equal(1, winnr('h'))
++ call assert_equal(1, winnr('l'))
++
++ " create a set of horizontally and vertically split windows
++ leftabove new | wincmd p
++ leftabove new | wincmd p
++ rightbelow new | wincmd p
++ rightbelow new | wincmd p
++ leftabove vnew | wincmd p
++ leftabove vnew | wincmd p
++ rightbelow vnew | wincmd p
++ rightbelow vnew | wincmd p
++
++ call assert_equal(8, winnr('j'))
++ call assert_equal(2, winnr('k'))
++ call assert_equal(4, winnr('h'))
++ call assert_equal(6, winnr('l'))
++ call assert_equal(9, winnr('2j'))
++ call assert_equal(1, winnr('2k'))
++ call assert_equal(3, winnr('2h'))
++ call assert_equal(7, winnr('2l'))
++
++ " Error cases
++ call assert_fails("echo winnr('0.2k')", 'E15:')
++ call assert_equal(2, winnr('-2k'))
++ call assert_fails("echo winnr('-2xj')", 'E15:')
++ call assert_fails("echo winnr('j2j')", 'E15:')
++ call assert_fails("echo winnr('ll')", 'E15:')
++ call assert_fails("echo winnr('5')", 'E15:')
++ call assert_equal(4, winnr('0h'))
++
++ tabnew
++ call assert_equal(8, tabpagewinnr(1, 'j'))
++ call assert_equal(2, tabpagewinnr(1, 'k'))
++ call assert_equal(4, tabpagewinnr(1, 'h'))
++ call assert_equal(6, tabpagewinnr(1, 'l'))
++
++ only | tabonly
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.1139/src/window.c 2019-03-30 19:49:03.262806533 +0100
+--- src/window.c 2019-04-08 19:58:55.705969739 +0200
+***************
+*** 4218,4235 ****
+ #endif
+
+ /*
+! * Move to window above or below "count" times.
+ */
+! static void
+! win_goto_ver(
+! int up, /* TRUE to go to win above */
+! long count)
+ {
+ frame_T *fr;
+ frame_T *nfr;
+ frame_T *foundfr;
+
+! foundfr = curwin->w_frame;
+ while (count--)
+ {
+ /*
+--- 4218,4236 ----
+ #endif
+
+ /*
+! * Get the above or below neighbor window of the specified window.
+! * up - TRUE for the above neighbor
+! * count - nth neighbor window
+! * Returns the specified window if the neighbor is not found.
+ */
+! win_T *
+! win_vert_neighbor(tabpage_T *tp, win_T *wp, int up, long count)
+ {
+ frame_T *fr;
+ frame_T *nfr;
+ frame_T *foundfr;
+
+! foundfr = wp->w_frame;
+ while (count--)
+ {
+ /*
+***************
+*** 4239,4245 ****
+ fr = foundfr;
+ for (;;)
+ {
+! if (fr == topframe)
+ goto end;
+ if (up)
+ nfr = fr->fr_prev;
+--- 4240,4246 ----
+ fr = foundfr;
+ for (;;)
+ {
+! if (fr == tp->tp_topframe)
+ goto end;
+ if (up)
+ nfr = fr->fr_prev;
+***************
+*** 4266,4272 ****
+ /* Find the frame at the cursor row. */
+ while (fr->fr_next != NULL
+ && frame2win(fr)->w_wincol + fr->fr_width
+! <= curwin->w_wincol + curwin->w_wcol)
+ fr = fr->fr_next;
+ }
+ if (nfr->fr_layout == FR_COL && up)
+--- 4267,4273 ----
+ /* Find the frame at the cursor row. */
+ while (fr->fr_next != NULL
+ && frame2win(fr)->w_wincol + fr->fr_width
+! <= wp->w_wincol + wp->w_wcol)
+ fr = fr->fr_next;
+ }
+ if (nfr->fr_layout == FR_COL && up)
+***************
+*** 4276,4298 ****
+ }
+ }
+ end:
+! if (foundfr != NULL)
+! win_goto(foundfr->fr_win);
+ }
+
+ /*
+! * Move to left or right window.
+ */
+ static void
+! win_goto_hor(
+! int left, /* TRUE to go to left win */
+ long count)
+ {
+ frame_T *fr;
+ frame_T *nfr;
+ frame_T *foundfr;
+
+! foundfr = curwin->w_frame;
+ while (count--)
+ {
+ /*
+--- 4277,4314 ----
+ }
+ }
+ end:
+! return foundfr != NULL ? foundfr->fr_win : NULL;
+ }
+
+ /*
+! * Move to window above or below "count" times.
+ */
+ static void
+! win_goto_ver(
+! int up, // TRUE to go to win above
+ long count)
+ {
++ win_T *win;
++
++ win = win_vert_neighbor(curtab, curwin, up, count);
++ if (win != NULL)
++ win_goto(win);
++ }
++
++ /*
++ * Get the left or right neighbor window of the specified window.
++ * left - TRUE for the left neighbor
++ * count - nth neighbor window
++ * Returns the specified window if the neighbor is not found.
++ */
++ win_T *
++ win_horz_neighbor(tabpage_T *tp, win_T * wp, int left, long count)
++ {
+ frame_T *fr;
+ frame_T *nfr;
+ frame_T *foundfr;
+
+! foundfr = wp->w_frame;
+ while (count--)
+ {
+ /*
+***************
+*** 4302,4308 ****
+ fr = foundfr;
+ for (;;)
+ {
+! if (fr == topframe)
+ goto end;
+ if (left)
+ nfr = fr->fr_prev;
+--- 4318,4324 ----
+ fr = foundfr;
+ for (;;)
+ {
+! if (fr == tp->tp_topframe)
+ goto end;
+ if (left)
+ nfr = fr->fr_prev;
+***************
+*** 4329,4335 ****
+ /* Find the frame at the cursor row. */
+ while (fr->fr_next != NULL
+ && frame2win(fr)->w_winrow + fr->fr_height
+! <= curwin->w_winrow + curwin->w_wrow)
+ fr = fr->fr_next;
+ }
+ if (nfr->fr_layout == FR_ROW && left)
+--- 4345,4351 ----
+ /* Find the frame at the cursor row. */
+ while (fr->fr_next != NULL
+ && frame2win(fr)->w_winrow + fr->fr_height
+! <= wp->w_winrow + wp->w_wrow)
+ fr = fr->fr_next;
+ }
+ if (nfr->fr_layout == FR_ROW && left)
+***************
+*** 4339,4346 ****
+ }
+ }
+ end:
+! if (foundfr != NULL)
+! win_goto(foundfr->fr_win);
+ }
+
+ /*
+--- 4355,4376 ----
+ }
+ }
+ end:
+! return foundfr != NULL ? foundfr->fr_win : NULL;
+! }
+!
+! /*
+! * Move to left or right window.
+! */
+! static void
+! win_goto_hor(
+! int left, // TRUE to go to left win
+! long count)
+! {
+! win_T *win;
+!
+! win = win_horz_neighbor(curtab, curwin, left, count);
+! if (win != NULL)
+! win_goto(win);
+ }
+
+ /*
+*** ../vim-8.1.1139/src/version.c 2019-04-08 18:59:50.973019097 +0200
+--- src/version.c 2019-04-08 20:00:11.881612574 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1140,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+232. You start conversations with, "Have you gotten an ISDN line?"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1141 b/data/vim/patches/8.1.1141
new file mode 100644
index 000000000..da4ced949
--- /dev/null
+++ b/data/vim/patches/8.1.1141
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1141
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1141
+Problem: Terminal winpos test fails with very large terminal. (Dominique
+ Pelle)
+Solution: Compute the expected size more accurately. (closes #4228)
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1140/src/testdir/test_terminal.vim 2019-04-06 22:21:19.226680116 +0200
+--- src/testdir/test_terminal.vim 2019-04-09 21:15:58.026189032 +0200
+***************
+*** 1912,1920 ****
+ let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
+
+ " Position must be bigger than the getwinpos() result of Vim itself.
+ let [xroot, yroot] = getwinpos()
+! call assert_inrange(xroot + 2, xroot + 1000, xpos)
+! call assert_inrange(yroot + 2, yroot + 1000, ypos)
+
+ call term_wait(buf)
+ call term_sendkeys(buf, ":q\<CR>")
+--- 1912,1926 ----
+ let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
+
+ " Position must be bigger than the getwinpos() result of Vim itself.
++ " The calcuation in the console assumes a 10 x 7 character cell.
++ " In the GUI it can be more, let's assume a 20 x 14 cell.
++ " And then add 100 / 200 tolerance.
+ let [xroot, yroot] = getwinpos()
+! let [winrow, wincol] = win_screenpos('.')
+! let xoff = wincol * (has('gui_running') ? 14 : 7) + 100
+! let yoff = winrow * (has('gui_running') ? 20 : 10) + 200
+! call assert_inrange(xroot + 2, xroot + xoff, xpos)
+! call assert_inrange(yroot + 2, yroot + yoff, ypos)
+
+ call term_wait(buf)
+ call term_sendkeys(buf, ":q\<CR>")
+*** ../vim-8.1.1140/src/version.c 2019-04-08 20:01:42.877179442 +0200
+--- src/version.c 2019-04-09 21:16:54.013862851 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1141,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+236. You start saving URL's in your digital 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.1142 b/data/vim/patches/8.1.1142
new file mode 100644
index 000000000..cc682305e
--- /dev/null
+++ b/data/vim/patches/8.1.1142
@@ -0,0 +1,99 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1142
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1142
+Problem: No test for dragging the window separators with the mouse.
+Solution: Add a test. (Dominique Pelle, closes #4226)
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1141/src/testdir/test_termcodes.vim 2019-04-07 21:55:03.732116294 +0200
+--- src/testdir/test_termcodes.vim 2019-04-09 21:49:50.990047878 +0200
+***************
+*** 111,113 ****
+--- 111,171 ----
+ let &ttymouse = save_ttymouse
+ bwipe!
+ endfunc
++
++ func Test_xterm_mouse_drag_window_separator()
++ let save_mouse = &mouse
++ let save_term = &term
++ let save_ttymouse = &ttymouse
++ set mouse=a
++ set term=xterm
++ set ttymouse=sgr
++
++ " Split horizontally and test dragging the horizontal window separator.
++ split
++ let rowseparator = winheight(0) + 1
++
++ let button = 0 " left down.
++ let row = rowseparator
++ let col = 1
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
++
++ let drag = 32
++ let row -= 1
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
++ call assert_equal(rowseparator - 1, winheight(0) + 1)
++ let row += 1
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
++ call assert_equal(rowseparator, winheight(0) + 1)
++
++ let release = 3
++ call feedkeys(printf("\<Esc>[<%d;%d;%dm", release, col, row), 'Lx!')
++ call assert_equal(rowseparator, winheight(0) + 1)
++
++ bwipe!
++
++ " Split vertically and test dragging the vertical window separator.
++ vsplit
++ let colseparator = winwidth(0) + 1
++
++ let button = 0
++ let row = 1
++ let col = colseparator
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
++
++ let drag = 32
++ let col -= 1
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
++ call assert_equal(colseparator - 1, winwidth(0) + 1)
++ let col += 1
++ call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
++ call assert_equal(colseparator, winwidth(0) + 1)
++
++ let release = 3
++ call feedkeys(printf("\<Esc>[<%d;%d;%dm", release, col, row), 'Lx!')
++ call assert_equal(colseparator, winwidth(0) + 1)
++
++ bwipe!
++ let &mouse = save_mouse
++ let &term = save_term
++ let &ttymouse = save_ttymouse
++ endfunc
+*** ../vim-8.1.1141/src/version.c 2019-04-09 21:17:28.837660254 +0200
+--- src/version.c 2019-04-09 21:51:24.301503517 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1142,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+238. You think faxes are old-fashioned.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1143 b/data/vim/patches/8.1.1143
new file mode 100644
index 000000000..9f488c7da
--- /dev/null
+++ b/data/vim/patches/8.1.1143
@@ -0,0 +1,255 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1143
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1143
+Problem: May pass weird strings to file name expansion.
+Solution: Check for matching characters. Disallow control characters.
+Files: src/misc1.c, src/testdir/test_spell.vim, src/option.c,
+ src/proto/option.pro, src/spell.c,
+ src/testdir/test_escaped_glob.vim
+
+
+*** ../vim-8.1.1142/src/misc1.c 2019-04-05 22:50:35.025737353 +0200
+--- src/misc1.c 2019-04-10 21:13:13.037246284 +0200
+***************
+*** 6170,6180 ****
+ {
+ for ( ; *p; MB_PTR_ADV(p))
+ {
+! /* Allow for escaping. */
+! if (*p == '\\' && p[1] != NUL)
+ ++p;
+ else if (vim_strchr((char_u *)SPECIAL_WILDCHAR, *p) != NULL)
+ return TRUE;
+ }
+ return FALSE;
+ }
+--- 6170,6191 ----
+ {
+ for ( ; *p; MB_PTR_ADV(p))
+ {
+! // Disallow line break characters.
+! if (*p == '\r' || *p == '\n')
+! break;
+! // Allow for escaping.
+! if (*p == '\\' && p[1] != NUL && p[1] != '\r' && p[1] != '\n')
+ ++p;
+ else if (vim_strchr((char_u *)SPECIAL_WILDCHAR, *p) != NULL)
++ {
++ // A { must be followed by a matching }.
++ if (*p == '{' && vim_strchr(p, '}') == NULL)
++ continue;
++ // A quote and backtick must be followed by another one.
++ if ((*p == '`' || *p == '\'') && vim_strchr(p, *p) == NULL)
++ continue;
+ return TRUE;
++ }
+ }
+ return FALSE;
+ }
+*** ../vim-8.1.1142/src/testdir/test_spell.vim 2019-01-24 17:59:35.143217444 +0100
+--- src/testdir/test_spell.vim 2019-04-10 22:10:51.295072579 +0200
+***************
+*** 149,154 ****
+--- 149,160 ----
+ set nospell spelllang=en
+ call assert_fails('spellinfo', 'E756:')
+
++ call assert_fails('set spelllang=foo/bar', 'E474:')
++ call assert_fails('set spelllang=foo\ bar', 'E474:')
++ call assert_fails("set spelllang=foo\\\nbar", 'E474:')
++ call assert_fails("set spelllang=foo\\\rbar", 'E474:')
++ call assert_fails("set spelllang=foo+bar", 'E474:')
++
+ set enc& spell& spelllang&
+ bwipe
+ endfunc
+*** ../vim-8.1.1142/src/option.c 2019-04-04 18:15:05.770857065 +0200
+--- src/option.c 2019-04-10 21:30:25.115458657 +0200
+***************
+*** 6006,6026 ****
+ }
+
+ /*
+! * Return TRUE if "val" is a valid 'filetype' name.
+! * Also used for 'syntax' and 'keymap'.
+ */
+ static int
+! valid_filetype(char_u *val)
+ {
+ char_u *s;
+
+ for (s = val; *s != NUL; ++s)
+! if (!ASCII_ISALNUM(*s) && vim_strchr((char_u *)".-_", *s) == NULL)
+ return FALSE;
+ return TRUE;
+ }
+
+ /*
+ * Handle string options that need some action to perform when changed.
+ * Returns NULL for success, or an error message for an error.
+ */
+--- 6006,6045 ----
+ }
+
+ /*
+! * Return TRUE if "val" is a valid name: only consists of alphanumeric ASCII
+! * characters or characters in "allowed".
+ */
+ static int
+! valid_name(char_u *val, char *allowed)
+ {
+ char_u *s;
+
+ for (s = val; *s != NUL; ++s)
+! if (!ASCII_ISALNUM(*s) && vim_strchr((char_u *)allowed, *s) == NULL)
+ return FALSE;
+ return TRUE;
+ }
+
+ /*
++ * Return TRUE if "val" is a valid 'filetype' name.
++ * Also used for 'syntax' and 'keymap'.
++ */
++ static int
++ valid_filetype(char_u *val)
++ {
++ return valid_name(val, ".-_");
++ }
++
++ /*
++ * Return TRUE if "val" is a valid 'spellang' value.
++ */
++ int
++ valid_spellang(char_u *val)
++ {
++ return valid_name(val, ".-_,");
++ }
++
++ /*
+ * Handle string options that need some action to perform when changed.
+ * Returns NULL for success, or an error message for an error.
+ */
+***************
+*** 7082,7088 ****
+ else if (varp == &(curwin->w_s->b_p_spl)
+ || varp == &(curwin->w_s->b_p_spf))
+ {
+! errmsg = did_set_spell_option(varp == &(curwin->w_s->b_p_spf));
+ }
+ /* When 'spellcapcheck' is set compile the regexp program. */
+ else if (varp == &(curwin->w_s->b_p_spc))
+--- 7101,7110 ----
+ else if (varp == &(curwin->w_s->b_p_spl)
+ || varp == &(curwin->w_s->b_p_spf))
+ {
+! if (!valid_spellang(*varp))
+! errmsg = e_invarg;
+! else
+! errmsg = did_set_spell_option(varp == &(curwin->w_s->b_p_spf));
+ }
+ /* When 'spellcapcheck' is set compile the regexp program. */
+ else if (varp == &(curwin->w_s->b_p_spc))
+***************
+*** 7737,7743 ****
+ break;
+ if (p > q)
+ {
+! vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
+ source_runtime(fname, DIP_ALL);
+ }
+ }
+--- 7759,7766 ----
+ break;
+ if (p > q)
+ {
+! vim_snprintf((char *)fname, 200, "spell/%.*s.vim",
+! (int)(p - q), q);
+ source_runtime(fname, DIP_ALL);
+ }
+ }
+*** ../vim-8.1.1142/src/proto/option.pro 2019-01-31 18:26:05.738803509 +0100
+--- src/proto/option.pro 2019-04-10 21:27:23.873325984 +0200
+***************
+*** 21,26 ****
+--- 21,27 ----
+ 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);
++ int valid_spellang(char_u *val);
+ char *check_colorcolumn(win_T *wp);
+ char *check_stl_option(char_u *s);
+ void set_term_option_sctx_idx(char *name, int opt_idx);
+*** ../vim-8.1.1142/src/spell.c 2019-04-06 14:22:17.758642630 +0200
+--- src/spell.c 2019-04-10 21:27:35.049205079 +0200
+***************
+*** 2308,2318 ****
+ /* Loop over comma separated language names. */
+ for (splp = spl_copy; *splp != NUL; )
+ {
+! /* Get one language name. */
+ copy_option_part(&splp, lang, MAXWLEN, ",");
+ region = NULL;
+ len = (int)STRLEN(lang);
+
+ if (STRCMP(lang, "cjk") == 0)
+ {
+ wp->w_s->b_cjk = 1;
+--- 2308,2321 ----
+ /* Loop over comma separated language names. */
+ for (splp = spl_copy; *splp != NUL; )
+ {
+! // Get one language name.
+ copy_option_part(&splp, lang, MAXWLEN, ",");
+ region = NULL;
+ len = (int)STRLEN(lang);
+
++ if (!valid_spellang(lang))
++ continue;
++
+ if (STRCMP(lang, "cjk") == 0)
+ {
+ wp->w_s->b_cjk = 1;
+*** ../vim-8.1.1142/src/testdir/test_escaped_glob.vim 2018-10-14 22:03:52.699698553 +0200
+--- src/testdir/test_escaped_glob.vim 2019-04-10 21:53:04.187852255 +0200
+***************
+*** 17,23 ****
+ " 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\$'))
+--- 17,23 ----
+ " 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\$'))
+*** ../vim-8.1.1142/src/version.c 2019-04-09 21:51:59.177300145 +0200
+--- src/version.c 2019-04-10 22:11:37.682710639 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1143,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+239. You think "surfing" is something you do on dry land.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1144 b/data/vim/patches/8.1.1144
new file mode 100644
index 000000000..0d4771ccc
--- /dev/null
+++ b/data/vim/patches/8.1.1144
@@ -0,0 +1,100 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1144
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1144 (after 8.1.1143)
+Problem: Too strict checking of the 'spellfile' option.
+Solution: Allow for a path.
+Files: src/option.c, src/testdir/test_spell.vim
+
+
+*** ../vim-8.1.1143/src/option.c 2019-04-10 22:15:15.813016799 +0200
+--- src/option.c 2019-04-10 22:27:35.752196096 +0200
+***************
+*** 6040,6045 ****
+--- 6040,6059 ----
+ }
+
+ /*
++ * Return TRUE if "val" is a valid 'spellfile' value.
++ */
++ static int
++ valid_spellfile(char_u *val)
++ {
++ char_u *s;
++
++ for (s = val; *s != NUL; ++s)
++ if (!vim_isfilec(*s) && *s != ',')
++ return FALSE;
++ return TRUE;
++ }
++
++ /*
+ * Handle string options that need some action to perform when changed.
+ * Returns NULL for success, or an error message for an error.
+ */
+***************
+*** 7101,7110 ****
+ else if (varp == &(curwin->w_s->b_p_spl)
+ || varp == &(curwin->w_s->b_p_spf))
+ {
+! if (!valid_spellang(*varp))
+ errmsg = e_invarg;
+ else
+! errmsg = did_set_spell_option(varp == &(curwin->w_s->b_p_spf));
+ }
+ /* When 'spellcapcheck' is set compile the regexp program. */
+ else if (varp == &(curwin->w_s->b_p_spc))
+--- 7115,7127 ----
+ else if (varp == &(curwin->w_s->b_p_spl)
+ || varp == &(curwin->w_s->b_p_spf))
+ {
+! int is_spellfile = varp == &(curwin->w_s->b_p_spf);
+!
+! if ((is_spellfile && !valid_spellfile(*varp))
+! || (!is_spellfile && !valid_spellang(*varp)))
+ errmsg = e_invarg;
+ else
+! errmsg = did_set_spell_option(is_spellfile);
+ }
+ /* When 'spellcapcheck' is set compile the regexp program. */
+ else if (varp == &(curwin->w_s->b_p_spc))
+*** ../vim-8.1.1143/src/testdir/test_spell.vim 2019-04-10 22:15:15.809016828 +0200
+--- src/testdir/test_spell.vim 2019-04-10 22:25:18.728838835 +0200
+***************
+*** 376,381 ****
+--- 376,386 ----
+ call assert_equal("elekwint", SecondSpellWord())
+ endfunc
+
++ func Test_spellfile_value()
++ set spellfile=Xdir/Xtest.latin1.add
++ set spellfile=Xdir/Xtest.utf-8.add,Xtest_other.add
++ endfunc
++
+ func Test_region_error()
+ messages clear
+ call writefile(["/regions=usgbnz", "elequint/0"], "Xtest.latin1.add")
+*** ../vim-8.1.1143/src/version.c 2019-04-10 22:15:15.817016767 +0200
+--- src/version.c 2019-04-10 22:28:01.352066486 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1144,
+ /**/
+
+--
+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.1145 b/data/vim/patches/8.1.1145
new file mode 100644
index 000000000..743863109
--- /dev/null
+++ b/data/vim/patches/8.1.1145
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1145
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1145
+Problem: Compiler warning for unused function. (Tony Mechelynck)
+Solution: Add #ifdef.
+Files: src/option.c
+
+
+*** ../vim-8.1.1144/src/option.c 2019-04-10 22:33:37.514161278 +0200
+--- src/option.c 2019-04-11 11:17:48.038298244 +0200
+***************
+*** 6030,6035 ****
+--- 6030,6036 ----
+ return valid_name(val, ".-_");
+ }
+
++ #if defined(FEAT_SPELL) || defined(PROTO)
+ /*
+ * Return TRUE if "val" is a valid 'spellang' value.
+ */
+***************
+*** 6052,6057 ****
+--- 6053,6059 ----
+ return FALSE;
+ return TRUE;
+ }
++ #endif
+
+ /*
+ * Handle string options that need some action to perform when changed.
+*** ../vim-8.1.1144/src/version.c 2019-04-10 22:33:37.514161278 +0200
+--- src/version.c 2019-04-11 11:18:41.342001795 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1145,
+ /**/
+
+--
+Married is a three ring circus:
+First comes the engagement ring.
+Then comes the wedding ring.
+Then comes the suffering.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1146 b/data/vim/patches/8.1.1146
new file mode 100644
index 000000000..57c20b0be
--- /dev/null
+++ b/data/vim/patches/8.1.1146
@@ -0,0 +1,65 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1146
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1146
+Problem: In MS-Windows console colors in a terminal window are wrong.
+Solution: Use the ansi index also for 16 colors. (Ken Takata)
+Files: src/terminal.c
+
+
+*** ../vim-8.1.1145/src/terminal.c 2019-04-06 22:01:20.756989404 +0200
+--- src/terminal.c 2019-04-11 11:23:46.712315123 +0200
+***************
+*** 2433,2440 ****
+ if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
+ {
+ /* First 16 colors and default: use the ANSI index, because these
+! * colors can be redefined. */
+! if (t_colors >= 16)
+ return color->ansi_index;
+ switch (color->ansi_index)
+ {
+--- 2433,2440 ----
+ if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
+ {
+ /* First 16 colors and default: use the ANSI index, because these
+! * colors can be redefined, we use the RGB values. */
+! if (t_colors > 256)
+ return color->ansi_index;
+ switch (color->ansi_index)
+ {
+***************
+*** 3604,3609 ****
+--- 3604,3610 ----
+ for (; index < 16; index++)
+ {
+ VTermColor color;
++
+ color.red = (unsigned)(rgb[index] >> 16);
+ color.green = (unsigned)(rgb[index] >> 8) & 255;
+ color.blue = (unsigned)rgb[index] & 255;
+*** ../vim-8.1.1145/src/version.c 2019-04-11 11:19:21.553778627 +0200
+--- src/version.c 2019-04-11 11:39:27.027580424 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1146,
+ /**/
+
+--
+"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.1147 b/data/vim/patches/8.1.1147
new file mode 100644
index 000000000..64cb9072b
--- /dev/null
+++ b/data/vim/patches/8.1.1147
@@ -0,0 +1,564 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1147
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1147
+Problem: Desktop file translations are requiring manual updates.
+Solution: Use the .po files for desktop file translations. (Christian
+ Brabandt)
+Files: src/po/Makefile, src/po/gvim.desktop.in, src/po/vim.desktop.in,
+ CONTRIBUTING.md, Filelist, runtime/vim.desktop,
+ runtime/gvim.desktop
+
+
+*** ../vim-8.1.1146/src/po/Makefile 2018-06-24 18:04:45.440091103 +0200
+--- src/po/Makefile 2019-04-11 12:54:31.087730189 +0200
+***************
+*** 25,30 ****
+--- 25,33 ----
+ .SUFFIXES: .po .mo .pot .ck
+ .PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES)
+
++ LINGUAS:
++ @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
++
+ .po.mo:
+ $(MSGFMTCMD) -o $@ $<
+
+***************
+*** 32,38 ****
+ $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
+ touch $@
+
+! all: $(MOFILES) $(MOCONVERTED)
+
+ check: $(CHECKFILES)
+
+--- 35,41 ----
+ $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
+ touch $@
+
+! all: $(MOFILES) $(MOCONVERTED) gvim.desktop vim.desktop
+
+ check: $(CHECKFILES)
+
+***************
+*** 157,168 ****
+ checkclean:
+ rm -f *.ck
+
+! $(PACKAGE).pot: ../*.c ../if_perl.xs ../GvimExt/gvimext.cpp ../globals.h ../if_py_both.h ../vim.h
+ cd ..; $(XGETTEXT) --default-domain=$(PACKAGE) \
+ --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 \
+! *.c if_perl.xs GvimExt/gvimext.cpp globals.h if_py_both.h vim.h
+ mv -f ../$(PACKAGE).po $(PACKAGE).pot
+
+ update-po: $(LANGUAGES)
+
+ # Don't add a dependency here, we only want to update the .po files manually
+--- 160,176 ----
+ checkclean:
+ rm -f *.ck
+
+! $(PACKAGE).pot: ../*.c ../if_perl.xs ../GvimExt/gvimext.cpp ../globals.h ../if_py_both.h ../vim.h gvim.desktop.in vim.desktop.in
+ cd ..; $(XGETTEXT) --default-domain=$(PACKAGE) \
+ --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 \
+! *.c if_perl.xs GvimExt/gvimext.cpp globals.h if_py_both.h vim.h \
+! po/gvim.desktop.in po/vim.desktop.in
+ mv -f ../$(PACKAGE).po $(PACKAGE).pot
+
++ %.desktop: %.desktop.in $(PACKAGE).pot LINGUAS
++ $(MSGFMT) --desktop -d . --template $< -o $@
++ cp -f $@ ../../runtime/$@
++
+ update-po: $(LANGUAGES)
+
+ # Don't add a dependency here, we only want to update the .po files manually
+*** ../vim-8.1.1146/src/po/gvim.desktop.in 2019-04-11 13:00:36.009737119 +0200
+--- src/po/gvim.desktop.in 2019-04-11 13:06:23.859853802 +0200
+***************
+*** 0 ****
+--- 1,97 ----
++ # The gvim.desktop file is generated by src/po/Makefile, do NOT edit.
++ # Edit the src/po/gvim.desktop.in file instead.
++ [Desktop Entry]
++ # Translators: This is the Application Name used in the GVim desktop file
++ Name=GVim
++ # Translators: This is the Generic Application Name used in the Vim desktop file
++ GenericName=Text Editor
++ # Translators: This is the comment used in the Vim desktop file
++ Comment=Edit text files
++ # The translations should come from the po file. Leave them here for now, they will
++ # be overwritten by the po file when generating the desktop.file!
++ GenericName[da]=Teksteditor
++ GenericName[de]=Texteditor
++ GenericName[eo]=Tekstoredaktilo
++ GenericName[fr]=Éditeur de texte
++ GenericName[pl]=Edytor tekstu
++ GenericName[is]=Ritvinnsluforrit
++ Comment[af]=Redigeer tekslêers
++ Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
++ Comment[ar]=حرّر ملفات نصية
++ Comment[az]=Mətn fayllarını redaktə edin
++ Comment[be]=Рэдагаваньне тэкставых файлаў
++ Comment[bg]=Редактиране на текстови файлове
++ Comment[bn]=টেক্স্ট ফাইল এডিট করুন
++ Comment[bs]=Izmijeni tekstualne datoteke
++ Comment[ca]=Edita fitxers de text
++ Comment[cs]=Úprava textových souborů
++ Comment[cy]=Golygu ffeiliau testun
++ Comment[da]=Rediger tekstfiler
++ Comment[de]=Textdateien bearbeiten
++ Comment[el]=Επεξεργασία αρχείων κειμένου
++ Comment[en_CA]=Edit text files
++ Comment[en_GB]=Edit text files
++ Comment[eo]=Redakti tekstajn dosierojn
++ Comment[es]=Edita archivos de texto
++ Comment[et]=Redigeeri tekstifaile
++ Comment[eu]=Editatu testu-fitxategiak
++ Comment[fa]=ویرایش پرونده‌های متنی
++ Comment[fi]=Muokkaa tekstitiedostoja
++ Comment[fr]=Éditer des fichiers textes
++ Comment[ga]=Eagar comhad Téacs
++ Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
++ Comment[he]=ערוך קבצי טקסט
++ Comment[hi]=पाठ फ़ाइलें संपादित करें
++ Comment[hr]=Uređivanje tekstualne datoteke
++ Comment[hu]=Szövegfájlok szerkesztése
++ Comment[id]=Edit file teks
++ Comment[is]=Vinna með textaskrár
++ Comment[it]=Modifica file di testo
++ Comment[ja]=テキストファイルを編集します
++ Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
++ Comment[ko]=텍스트 파일을 편집합니다
++ Comment[lt]=Redaguoti tekstines bylas
++ Comment[lv]=Rediģēt teksta failus
++ Comment[mk]=Уреди текстуални фајлови
++ Comment[ml]=വാചക രചനകള് തിരുത്തുക
++ Comment[mn]=Текст файл боловсруулах
++ Comment[mr]=गद्य फाइल संपादित करा
++ Comment[ms]=Edit fail teks
++ Comment[nb]=Rediger tekstfiler
++ Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस्
++ Comment[nl]=Tekstbestanden bewerken
++ Comment[nn]=Rediger tekstfiler
++ Comment[no]=Rediger tekstfiler
++ Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
++ Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
++ Comment[pl]=Edytuj pliki tekstowe
++ Comment[pt]=Editar ficheiros de texto
++ Comment[pt_BR]=Edite arquivos de texto
++ Comment[ro]=Editare fişiere text
++ Comment[ru]=Редактор текстовых файлов
++ Comment[sk]=Úprava textových súborov
++ Comment[sl]=Urejanje datotek z besedili
++ Comment[sq]=Përpuno files teksti
++ Comment[sr]=Измени текстуалне датотеке
++ Comment[sr@Latn]=Izmeni tekstualne datoteke
++ Comment[sv]=Redigera textfiler
++ Comment[ta]=உரை கோப்புகளை தொகுக்கவும்
++ Comment[th]=แก้ไขแฟ้มข้อความ
++ Comment[tk]=Metin faýllary editle
++ Comment[tr]=Metin dosyalarını düzenle
++ Comment[uk]=Редактор текстових файлів
++ Comment[vi]=Soạn thảo tập tin văn bản
++ Comment[wa]=Asspougnî des fitchîs tecses
++ Comment[zh_CN]=编辑文本文件
++ Comment[zh_TW]=編輯文字檔
++ TryExec=gvim
++ Exec=gvim -f %F
++ Terminal=false
++ Type=Application
++ # Translators: Search terms to find this application. Do NOT change the semicolons! The list MUST also end with a semicolon!
++ Keywords=Text;editor;
++ # Translators: This is the Icon file name. Do NOT translate
++ Icon=gvim
++ Categories=Utility;TextEditor;
++ StartupNotify=true
++ MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
+*** ../vim-8.1.1146/src/po/vim.desktop.in 2019-04-11 13:00:36.013737098 +0200
+--- src/po/vim.desktop.in 2019-04-11 13:05:28.372153537 +0200
+***************
+*** 0 ****
+--- 1,94 ----
++ # The vim.desktop file is generated by src/po/Makefile, do NOT edit.
++ # Edit the src/po/vim.desktop.in file instead.
++ [Desktop Entry]
++ # Translators: This is the Application Name used in the Vim desktop file
++ Name=Vim
++ # Translators: This is the Generic Application Name used in the Vim desktop file
++ GenericName=Text Editor
++ # Translators: This is the comment used in the Vim desktop file
++ Comment=Edit text files
++ # The translations should come from the po file. Leave them here for now, they will
++ # be overwritten by the po file when generating the desktop.file.
++ GenericName[da]=Teksteditor
++ GenericName[de]=Texteditor
++ GenericName[pl]=Edytor tekstu
++ GenericName[is]=Ritvinnsluforrit
++ Comment[af]=Redigeer tekslêers
++ Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
++ Comment[ar]=حرّر ملفات نصية
++ Comment[az]=Mətn fayllarını redaktə edin
++ Comment[be]=Рэдагаваньне тэкставых файлаў
++ Comment[bg]=Редактиране на текстови файлове
++ Comment[bn]=টেক্স্ট ফাইল এডিট করুন
++ Comment[bs]=Izmijeni tekstualne datoteke
++ Comment[ca]=Edita fitxers de text
++ Comment[cs]=Úprava textových souborů
++ Comment[cy]=Golygu ffeiliau testun
++ Comment[da]=Rediger tekstfiler
++ Comment[de]=Textdateien bearbeiten
++ Comment[el]=Επεξεργασία αρχείων κειμένου
++ Comment[en_CA]=Edit text files
++ Comment[en_GB]=Edit text files
++ Comment[es]=Edita archivos de texto
++ Comment[et]=Redigeeri tekstifaile
++ Comment[eu]=Editatu testu-fitxategiak
++ Comment[fa]=ویرایش پرونده‌های متنی
++ Comment[fi]=Muokkaa tekstitiedostoja
++ Comment[fr]=Édite des fichiers texte
++ Comment[ga]=Eagar comhad Téacs
++ Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
++ Comment[he]=ערוך קבצי טקסט
++ Comment[hi]=पाठ फ़ाइलें संपादित करें
++ Comment[hr]=Uređivanje tekstualne datoteke
++ Comment[hu]=Szövegfájlok szerkesztése
++ Comment[id]=Edit file teks
++ Comment[is]=Vinna með textaskrár
++ Comment[it]=Modifica file di testo
++ Comment[ja]=テキストファイルを編集します
++ Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
++ Comment[ko]=텍스트 파일을 편집합니다
++ Comment[lt]=Redaguoti tekstines bylas
++ Comment[lv]=Rediģēt teksta failus
++ Comment[mk]=Уреди текстуални фајлови
++ Comment[ml]=വാചക രചനകള് തിരുത്തുക
++ Comment[mn]=Текст файл боловсруулах
++ Comment[mr]=गद्य फाइल संपादित करा
++ Comment[ms]=Edit fail teks
++ Comment[nb]=Rediger tekstfiler
++ Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस्
++ Comment[nl]=Tekstbestanden bewerken
++ Comment[nn]=Rediger tekstfiler
++ Comment[no]=Rediger tekstfiler
++ Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
++ Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
++ Comment[pl]=Edytuj pliki tekstowe
++ Comment[pt]=Editar ficheiros de texto
++ Comment[pt_BR]=Edite arquivos de texto
++ Comment[ro]=Editare fişiere text
++ Comment[ru]=Редактор текстовых файлов
++ Comment[sk]=Úprava textových súborov
++ Comment[sl]=Urejanje datotek z besedili
++ Comment[sq]=Përpuno files teksti
++ Comment[sr]=Измени текстуалне датотеке
++ Comment[sr@Latn]=Izmeni tekstualne datoteke
++ Comment[sv]=Redigera textfiler
++ Comment[ta]=உரை கோப்புகளை தொகுக்கவும்
++ Comment[th]=แก้ไขแฟ้มข้อความ
++ Comment[tk]=Metin faýllary editle
++ Comment[tr]=Metin dosyalarını düzenle
++ Comment[uk]=Редактор текстових файлів
++ Comment[vi]=Soạn thảo tập tin văn bản
++ Comment[wa]=Asspougnî des fitchîs tecses
++ Comment[zh_CN]=编辑文本文件
++ Comment[zh_TW]=編輯文字檔
++ TryExec=vim
++ Exec=vim %F
++ Terminal=true
++ Type=Application
++ # Translators: Search terms to find this application. Do NOT change the semicolons! The list MUST also end with a semicolon!
++ Keywords=Text;editor;
++ # Translators: This is the Icon file name. Do NOT translate
++ Icon=gvim
++ Categories=Utility;TextEditor;
++ StartupNotify=false
++ MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
+*** ../vim-8.1.1146/CONTRIBUTING.md 2015-09-01 21:22:38.000000000 +0200
+--- CONTRIBUTING.md 2019-04-11 12:59:52.093975793 +0200
+***************
+*** 21,29 ****
+
+ Please use the GitHub issues only for actual issues. If you are not 100% sure
+ that your problem is a Vim issue, please first discuss this on the Vim user
+! maillist. Try reproducing the problem without any plugins or settings:
+
+! vim -N -u NONE
+
+ If you report an issue, please describe exactly how to reproduce it.
+ For example, don't say "insert some text" but say what you did exactly:
+--- 21,29 ----
+
+ Please use the GitHub issues only for actual issues. If you are not 100% sure
+ that your problem is a Vim issue, please first discuss this on the Vim user
+! maillist. Try reproducing the problem without any of your plugins or settings:
+
+! vim --clean
+
+ If you report an issue, please describe exactly how to reproduce it.
+ For example, don't say "insert some text" but say what you did exactly:
+***************
+*** 51,54 ****
+ The maintainer will take care of issues and send updates to Bram for
+ distribution with Vim.
+
+! If the maintainer does not react, contact the vim-dev maillist.
+--- 51,75 ----
+ The maintainer will take care of issues and send updates to Bram for
+ distribution with Vim.
+
+! If the maintainer does not respond, contact the vim-dev maillist.
+!
+!
+! # Translations
+!
+! Translating messages and runtime files is very much appreciated! These things
+! can be translated:
+! * Messages in Vim, see [src/po/README.txt][1]
+! Also used for the desktop icons.
+! * Menus, see [runtime/lang/README.txt][2]
+! * Vim tutor, see [runtime/tutor/README.txt][3]
+! * Manual pages, see [runtime/doc/\*.1][4] for examples
+! * Installer, see [nsis/lang/\*.nsi][5] for examples
+!
+! The help files can be translated and made available separately.
+! See https://www.vim.org/translations.php for examples.
+!
+! [1]: https://github.com/vim/vim/blob/master/src/po/README.txt
+! [2]: https://github.com/vim/vim/blob/master/runtime/lang/README.txt
+! [3]: https://github.com/vim/vim/blob/master/runtime/tutor/README.txt
+! [4]: https://github.com/vim/vim/blob/master/runtime/doc/vim.1
+! [5]: https://github.com/vim/vim/blob/master/nsis/lang/english.nsi
+*** ../vim-8.1.1146/Filelist 2019-04-04 20:31:59.094873282 +0200
+--- Filelist 2019-04-11 12:57:06.906876135 +0200
+***************
+*** 937,942 ****
+--- 937,944 ----
+ src/po/Make_cyg.mak \
+ src/po/Make_ming.mak \
+ src/po/Make_mvc.mak \
++ src/po/vim.desktop.in \
++ src/po/gvim.desktop.in \
+ src/po/sjiscorr.c \
+ src/po/*.po \
+
+*** ../vim-8.1.1146/runtime/vim.desktop 2016-04-02 15:20:04.000000000 +0200
+--- runtime/vim.desktop 2019-04-11 13:06:39.535769159 +0200
+***************
+*** 1,8 ****
+ [Desktop Entry]
+ Name=Vim
+ GenericName=Text Editor
+! GenericName[de]=Texteditor
+ Comment=Edit text files
+ Comment[af]=Redigeer tekslêers
+ Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
+ Comment[ar]=حرّر ملفات نصية
+--- 1,18 ----
++ # The vim.desktop file is generated by src/po/Makefile, do NOT edit.
++ # Edit the src/po/vim.desktop.in file instead.
+ [Desktop Entry]
++ # Translators: This is the Application Name used in the Vim desktop file
+ Name=Vim
++ # Translators: This is the Generic Application Name used in the Vim desktop file
+ GenericName=Text Editor
+! # Translators: This is the comment used in the Vim desktop file
+ Comment=Edit text files
++ # The translations should come from the po file. Leave them here for now, they will
++ # be overwritten by the po file when generating the desktop.file.
++ GenericName[da]=Teksteditor
++ GenericName[de]=Texteditor
++ GenericName[pl]=Edytor tekstu
++ GenericName[is]=Ritvinnsluforrit
+ Comment[af]=Redigeer tekslêers
+ Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
+ Comment[ar]=حرّر ملفات نصية
+***************
+*** 14,20 ****
+ Comment[ca]=Edita fitxers de text
+ Comment[cs]=Úprava textových souborů
+ Comment[cy]=Golygu ffeiliau testun
+! Comment[da]=Redigér tekstfiler
+ Comment[de]=Textdateien bearbeiten
+ Comment[el]=Επεξεργασία αρχείων κειμένου
+ Comment[en_CA]=Edit text files
+--- 24,30 ----
+ Comment[ca]=Edita fitxers de text
+ Comment[cs]=Úprava textových souborů
+ Comment[cy]=Golygu ffeiliau testun
+! Comment[da]=Rediger tekstfiler
+ Comment[de]=Textdateien bearbeiten
+ Comment[el]=Επεξεργασία αρχείων κειμένου
+ Comment[en_CA]=Edit text files
+***************
+*** 32,37 ****
+--- 42,48 ----
+ Comment[hr]=Uređivanje tekstualne datoteke
+ Comment[hu]=Szövegfájlok szerkesztése
+ Comment[id]=Edit file teks
++ Comment[is]=Vinna með textaskrár
+ Comment[it]=Modifica file di testo
+ Comment[ja]=テキストファイルを編集します
+ Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
+***************
+*** 50,56 ****
+ Comment[no]=Rediger tekstfiler
+ Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
+ Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
+! Comment[pl]=Edytor plików tekstowych
+ Comment[pt]=Editar ficheiros de texto
+ Comment[pt_BR]=Edite arquivos de texto
+ Comment[ro]=Editare fişiere text
+--- 61,67 ----
+ Comment[no]=Rediger tekstfiler
+ Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
+ Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
+! Comment[pl]=Edytuj pliki tekstowe
+ Comment[pt]=Editar ficheiros de texto
+ Comment[pt_BR]=Edite arquivos de texto
+ Comment[ro]=Editare fişiere text
+***************
+*** 74,80 ****
+--- 85,93 ----
+ Exec=vim %F
+ Terminal=true
+ Type=Application
++ # Translators: Search terms to find this application. Do NOT change the semicolons! The list MUST also end with a semicolon!
+ Keywords=Text;editor;
++ # Translators: This is the Icon file name. Do NOT translate
+ Icon=gvim
+ Categories=Utility;TextEditor;
+ StartupNotify=false
+*** ../vim-8.1.1146/runtime/gvim.desktop 2016-04-02 15:17:25.000000000 +0200
+--- runtime/gvim.desktop 2019-04-11 13:06:39.223770846 +0200
+***************
+*** 1,8 ****
+ [Desktop Entry]
+ Name=GVim
+ GenericName=Text Editor
+! GenericName[de]=Texteditor
+ Comment=Edit text files
+ Comment[af]=Redigeer tekslêers
+ Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
+ Comment[ar]=حرّر ملفات نصية
+--- 1,20 ----
++ # The gvim.desktop file is generated by src/po/Makefile, do NOT edit.
++ # Edit the src/po/gvim.desktop.in file instead.
+ [Desktop Entry]
++ # Translators: This is the Application Name used in the GVim desktop file
+ Name=GVim
++ # Translators: This is the Generic Application Name used in the Vim desktop file
+ GenericName=Text Editor
+! # Translators: This is the comment used in the Vim desktop file
+ Comment=Edit text files
++ # The translations should come from the po file. Leave them here for now, they will
++ # be overwritten by the po file when generating the desktop.file!
++ GenericName[da]=Teksteditor
++ GenericName[de]=Texteditor
++ GenericName[eo]=Tekstoredaktilo
++ GenericName[fr]=Éditeur de texte
++ GenericName[pl]=Edytor tekstu
++ GenericName[is]=Ritvinnsluforrit
+ Comment[af]=Redigeer tekslêers
+ Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
+ Comment[ar]=حرّر ملفات نصية
+***************
+*** 14,30 ****
+ Comment[ca]=Edita fitxers de text
+ Comment[cs]=Úprava textových souborů
+ Comment[cy]=Golygu ffeiliau testun
+! Comment[da]=Redigér tekstfiler
+ Comment[de]=Textdateien bearbeiten
+ Comment[el]=Επεξεργασία αρχείων κειμένου
+ Comment[en_CA]=Edit text files
+ Comment[en_GB]=Edit text files
+ Comment[es]=Edita archivos de texto
+ Comment[et]=Redigeeri tekstifaile
+ Comment[eu]=Editatu testu-fitxategiak
+ Comment[fa]=ویرایش پرونده‌های متنی
+ Comment[fi]=Muokkaa tekstitiedostoja
+! Comment[fr]=Édite des fichiers texte
+ Comment[ga]=Eagar comhad Téacs
+ Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
+ Comment[he]=ערוך קבצי טקסט
+--- 26,43 ----
+ Comment[ca]=Edita fitxers de text
+ Comment[cs]=Úprava textových souborů
+ Comment[cy]=Golygu ffeiliau testun
+! Comment[da]=Rediger tekstfiler
+ Comment[de]=Textdateien bearbeiten
+ Comment[el]=Επεξεργασία αρχείων κειμένου
+ Comment[en_CA]=Edit text files
+ Comment[en_GB]=Edit text files
++ Comment[eo]=Redakti tekstajn dosierojn
+ Comment[es]=Edita archivos de texto
+ Comment[et]=Redigeeri tekstifaile
+ Comment[eu]=Editatu testu-fitxategiak
+ Comment[fa]=ویرایش پرونده‌های متنی
+ Comment[fi]=Muokkaa tekstitiedostoja
+! Comment[fr]=Éditer des fichiers textes
+ Comment[ga]=Eagar comhad Téacs
+ Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
+ Comment[he]=ערוך קבצי טקסט
+***************
+*** 32,37 ****
+--- 45,51 ----
+ Comment[hr]=Uređivanje tekstualne datoteke
+ Comment[hu]=Szövegfájlok szerkesztése
+ Comment[id]=Edit file teks
++ Comment[is]=Vinna með textaskrár
+ Comment[it]=Modifica file di testo
+ Comment[ja]=テキストファイルを編集します
+ Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
+***************
+*** 50,56 ****
+ Comment[no]=Rediger tekstfiler
+ Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
+ Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
+! Comment[pl]=Edytor plików tekstowych
+ Comment[pt]=Editar ficheiros de texto
+ Comment[pt_BR]=Edite arquivos de texto
+ Comment[ro]=Editare fişiere text
+--- 64,70 ----
+ Comment[no]=Rediger tekstfiler
+ Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
+ Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
+! Comment[pl]=Edytuj pliki tekstowe
+ Comment[pt]=Editar ficheiros de texto
+ Comment[pt_BR]=Edite arquivos de texto
+ Comment[ro]=Editare fişiere text
+***************
+*** 74,80 ****
+--- 88,96 ----
+ Exec=gvim -f %F
+ Terminal=false
+ Type=Application
++ # Translators: Search terms to find this application. Do NOT change the semicolons! The list MUST also end with a semicolon!
+ Keywords=Text;editor;
++ # Translators: This is the Icon file name. Do NOT translate
+ Icon=gvim
+ Categories=Utility;TextEditor;
+ StartupNotify=true
+*** ../vim-8.1.1146/src/version.c 2019-04-11 11:40:08.023371343 +0200
+--- src/version.c 2019-04-11 13:00:09.337882044 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1147,
+ /**/
+
+--
+Eagles may soar, but weasels don't get sucked into jet engines.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1148 b/data/vim/patches/8.1.1148
new file mode 100644
index 000000000..037e00421
--- /dev/null
+++ b/data/vim/patches/8.1.1148
@@ -0,0 +1,141 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1148
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1148
+Problem: CTRL-L with 'incsearch' does not pick up char under cursor.
+ (Smylers)
+Solution: Do not compare the position with the cursor position. (Hirohito
+ Higashi, closes #3620)
+Files: src/ex_getln.c, src/testdir/test_search.vim
+
+
+*** ../vim-8.1.1147/src/ex_getln.c 2019-03-30 18:46:57.348077402 +0100
+--- src/ex_getln.c 2019-04-11 13:44:00.013994955 +0200
+***************
+*** 745,783 ****
+ 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 + skiplen))
+ *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 = '\\';
+- }
+- // 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;
+ }
+! return FAIL;
+ }
+ }
+ }
+ return OK;
+--- 745,779 ----
+ if (is_state->did_incsearch)
+ {
+ curwin->w_cursor = is_state->match_end;
+! *c = gchar_cursor();
+! if (*c != NUL)
+ {
+ // 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 == firstc || vim_strchr((char_u *)(
+! p_magic ? "\\~^$.*[" : "\\^$"), *c) != NULL)
+! {
+! // put a backslash before special characters
+! stuffcharReadbuff(*c);
+! *c = '\\';
+! }
+! // 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;
+ }
++ return FAIL;
+ }
+ }
+ return OK;
+*** ../vim-8.1.1147/src/testdir/test_search.vim 2019-02-28 06:24:49.788775847 +0100
+--- src/testdir/test_search.vim 2019-04-11 13:44:53.725735332 +0200
+***************
+*** 1248,1250 ****
+--- 1248,1267 ----
+ " This was also giving an internal error
+ call assert_fails('call search(" \\((\\v[[=P=]]){185}+ ")', 'E871:')
+ endfunc
++
++ func Test_incsearch_add_char_under_cursor()
++ if !exists('+incsearch')
++ return
++ endif
++ set incsearch
++ new
++ call setline(1, ['find match', 'anything'])
++ 1
++ call test_override('char_avail', 1)
++ call feedkeys("fc/m\<C-L>\<C-L>\<C-L>\<C-L>\<C-L>\<CR>", 'tx')
++ call assert_equal('match', @/)
++ call test_override('char_avail', 0)
++
++ set incsearch&
++ bwipe!
++ endfunc
+*** ../vim-8.1.1147/src/version.c 2019-04-11 13:09:57.790699857 +0200
+--- src/version.c 2019-04-11 13:45:43.457370024 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1148,
+ /**/
+
+--
+"After a few years of marriage a man can look right at a woman
+without seeing her and a woman can see right through a man
+without looking at him."
+ - Helen Rowland
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1149 b/data/vim/patches/8.1.1149
new file mode 100644
index 000000000..77f8fd1e0
--- /dev/null
+++ b/data/vim/patches/8.1.1149
@@ -0,0 +1,200 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1149
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1149
+Problem: Building desktop files fails with older msgfmt.
+Solution: Add autoconf check. Avoid always building the desktop files.
+Files: src/configure.ac, src/auto/configure, src/po/Makefile,
+ src/po/Make_all.mak, src/config.mk.in
+
+
+*** ../vim-8.1.1148/src/configure.ac 2019-02-16 15:09:21.221946179 +0100
+--- src/configure.ac 2019-04-11 15:13:26.738692930 +0200
+***************
+*** 4298,4303 ****
+--- 4298,4312 ----
+ [++_nl_msg_cat_cntr;],
+ AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_NL_MSG_CAT_CNTR),
+ AC_MSG_RESULT([no]))
++ AC_MSG_CHECKING([if msgfmt supports --desktop])
++ MSGFMT_DESKTOP=
++ if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
++ AC_MSG_RESULT([yes])
++ MSGFMT_DESKTOP="gvim.desktop vim.desktop"
++ else
++ AC_MSG_RESULT([no])
++ fi
++ AC_SUBST(MSGFMT_DESKTOP)
+ fi
+ else
+ AC_MSG_RESULT([no "po/Makefile" - disabled]);
+*** ../vim-8.1.1148/src/auto/configure 2019-02-16 15:09:21.221946179 +0100
+--- src/auto/configure 2019-04-11 15:23:30.223694382 +0200
+***************
+*** 623,628 ****
+--- 623,629 ----
+ LIBOBJS
+ LINK_AS_NEEDED
+ DEPEND_CFLAGS_FILTER
++ MSGFMT_DESKTOP
+ MAKEMO
+ MSGFMT
+ INSTALL_TOOL_LANGS
+***************
+*** 14533,14538 ****
+--- 14534,14551 ----
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
++ $as_echo_n "checking if msgfmt supports --desktop... " >&6; }
++ MSGFMT_DESKTOP=
++ if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++ $as_echo "yes" >&6; }
++ MSGFMT_DESKTOP="gvim.desktop vim.desktop"
++ else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++ $as_echo "no" >&6; }
++ fi
++
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
+*** ../vim-8.1.1148/src/po/Makefile 2019-04-11 13:09:57.786699880 +0200
+--- src/po/Makefile 2019-04-11 15:23:02.487832044 +0200
+***************
+*** 25,33 ****
+ .SUFFIXES: .po .mo .pot .ck
+ .PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES)
+
+- LINGUAS:
+- @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+-
+ .po.mo:
+ $(MSGFMTCMD) -o $@ $<
+
+--- 25,30 ----
+***************
+*** 35,41 ****
+ $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
+ touch $@
+
+! all: $(MOFILES) $(MOCONVERTED) gvim.desktop vim.desktop
+
+ check: $(CHECKFILES)
+
+--- 32,38 ----
+ $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
+ touch $@
+
+! all: $(MOFILES) $(MOCONVERTED) $(MSGFMT_DESKTOP)
+
+ check: $(CHECKFILES)
+
+***************
+*** 167,173 ****
+ po/gvim.desktop.in po/vim.desktop.in
+ mv -f ../$(PACKAGE).po $(PACKAGE).pot
+
+! %.desktop: %.desktop.in $(PACKAGE).pot LINGUAS
+ $(MSGFMT) --desktop -d . --template $< -o $@
+ cp -f $@ ../../runtime/$@
+
+--- 164,170 ----
+ po/gvim.desktop.in po/vim.desktop.in
+ mv -f ../$(PACKAGE).po $(PACKAGE).pot
+
+! %.desktop: %.desktop.in $(POFILES)
+ $(MSGFMT) --desktop -d . --template $< -o $@
+ cp -f $@ ../../runtime/$@
+
+*** ../vim-8.1.1148/src/po/Make_all.mak 2018-07-29 16:13:13.431551849 +0200
+--- src/po/Make_all.mak 2019-04-11 15:22:13.924073103 +0200
+***************
+*** 45,50 ****
+--- 45,93 ----
+ zh_TW.UTF-8 \
+
+
++ POFILES = \
++ af.po \
++ ca.po \
++ cs.po \
++ cs.cp1250.po \
++ da.po \
++ de.po \
++ en_GB.po \
++ eo.po \
++ es.po \
++ fi.po \
++ fr.po \
++ ga.po \
++ it.po \
++ ja.po \
++ ja.euc-jp.po \
++ ja.sjis.po \
++ ko.po \
++ ko.UTF-8.po \
++ lv.po \
++ nb.po \
++ nl.po \
++ no.po \
++ pl.po \
++ pl.UTF-8.po \
++ pl.cp1250.po \
++ pt_BR.po \
++ ru.po \
++ ru.cp1251.po \
++ sk.po \
++ sk.cp1250.po \
++ sr.po \
++ sv.po \
++ uk.po \
++ uk.cp1251.po \
++ vi.po \
++ zh_CN.po \
++ zh_CN.UTF-8.po \
++ zh_CN.cp936.po \
++ zh_TW.po \
++ zh_TW.UTF-8.po \
++
++
+ MOFILES = \
+ af.mo \
+ ca.mo \
+*** ../vim-8.1.1148/src/config.mk.in 2019-01-17 15:43:21.753878419 +0100
+--- src/config.mk.in 2019-04-11 15:11:09.159378061 +0200
+***************
+*** 169,174 ****
+--- 169,175 ----
+ MAKEMO = @MAKEMO@
+
+ MSGFMT = @MSGFMT@
++ MSGFMT_DESKTOP = @MSGFMT_DESKTOP@
+
+ # 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.
+*** ../vim-8.1.1148/src/version.c 2019-04-11 13:45:53.125298538 +0200
+--- src/version.c 2019-04-11 15:24:59.551251079 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1149,
+ /**/
+
+--
+If you're sending someone Styrofoam, what do you pack it in?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1150 b/data/vim/patches/8.1.1150
new file mode 100644
index 000000000..9e6695795
--- /dev/null
+++ b/data/vim/patches/8.1.1150
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1150
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1150
+Problem: Generating desktop files not tested on Travis.
+Solution: Install a newer msgfmt package. (Christian Brabandt)
+Files: .travis.yml
+
+
+*** ../vim-8.1.1149/.travis.yml 2019-02-03 13:12:20.344668681 +0100
+--- .travis.yml 2019-04-11 15:04:35.629344234 +0200
+***************
+*** 115,120 ****
+--- 115,127 ----
+ if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "${CC}" = "clang" ]]; then
+ ln -sf "$(which llvm-cov)" /home/travis/bin/gcov
+ fi
++ # Need msgfmt 0.19.8 to be able to generate .desktop files
++ - |
++ if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
++ sudo add-apt-repository ppa:ricotz/toolchain -y &&
++ sudo apt-get update -q &&
++ sudo apt-get install gettext=0.19.8.1-1ubuntu2~14.04~ricotz1 -y
++ fi
+
+ before_script:
+ # Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
+*** ../vim-8.1.1149/src/version.c 2019-04-11 15:25:36.987065321 +0200
+--- src/version.c 2019-04-11 15:47:23.519754726 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1150,
+ /**/
+
+--
+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.1151 b/data/vim/patches/8.1.1151
new file mode 100644
index 000000000..cc074bceb
--- /dev/null
+++ b/data/vim/patches/8.1.1151
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1151
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1151
+Problem: Build fails when using shadow directory.
+Solution: Link the desktop.in files.
+Files: src/Makefile
+
+
+*** ../vim-8.1.1150/src/Makefile 2019-04-11 17:27:24.867999943 +0200
+--- src/Makefile 2019-04-11 16:20:26.817525218 +0200
+***************
+*** 2778,2784 ****
+ mkdir $(SHADOWDIR)/auto
+ cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
+ $(MKDIR_P) $(SHADOWDIR)/po
+! cd $(SHADOWDIR)/po; ln -s ../../po/*.po ../../po/*.mak ../../po/*.vim ../../po/Makefile .
+ cd $(SHADOWDIR); rm -f auto/link.sed
+ cp Makefile configure $(SHADOWDIR)
+ rm -f $(SHADOWDIR)/auto/config.mk $(SHADOWDIR)/config.mk.dist
+--- 2778,2784 ----
+ mkdir $(SHADOWDIR)/auto
+ cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
+ $(MKDIR_P) $(SHADOWDIR)/po
+! cd $(SHADOWDIR)/po; ln -s ../../po/*.po ../../po/*.mak ../../po/*.vim ../../po/*.in ../../po/Makefile .
+ cd $(SHADOWDIR); rm -f auto/link.sed
+ cp Makefile configure $(SHADOWDIR)
+ rm -f $(SHADOWDIR)/auto/config.mk $(SHADOWDIR)/config.mk.dist
+*** ../vim-8.1.1150/src/version.c 2019-04-11 16:21:29.833200930 +0200
+--- src/version.c 2019-04-11 17:20:34.710262502 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1151,
+ /**/
+
+--
+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.1152 b/data/vim/patches/8.1.1152
new file mode 100644
index 000000000..49b62f029
--- /dev/null
+++ b/data/vim/patches/8.1.1152
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1152
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1152
+Problem: Compiler warning with VS2019.
+Solution: Specify different offset for "AMD64". (closes #4235)
+Files: src/GvimExt/Makefile
+
+
+*** ../vim-8.1.1151/src/GvimExt/Makefile 2019-04-04 20:31:59.094873282 +0200
+--- src/GvimExt/Makefile 2019-04-11 17:20:57.006137643 +0200
+***************
+*** 58,64 ****
+ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
+ !endif
+
+! !if "$(CPU)" == "ARM64"
+ OFFSET = 0x11C000000
+ !else
+ OFFSET = 0x1C000000
+--- 58,64 ----
+ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
+ !endif
+
+! !if "$(CPU)" == "AMD64" || "$(CPU)" == "ARM64"
+ OFFSET = 0x11C000000
+ !else
+ OFFSET = 0x1C000000
+*** ../vim-8.1.1151/src/version.c 2019-04-11 16:21:29.833200930 +0200
+--- src/version.c 2019-04-11 17:20:34.710262502 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1152,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+246. You use up your free 1 Gbyte in two days.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1153 b/data/vim/patches/8.1.1153
new file mode 100644
index 000000000..19e4be801
--- /dev/null
+++ b/data/vim/patches/8.1.1153
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1153
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1153
+Problem: Msgfmt complains about missing LINGUAS file. (Tony Mechelynck)
+Solution: Add command to generate LINGUAS.
+Files: src/po/Makefile
+
+
+*** ../vim-8.1.1153/src/po/Makefile 2019-04-11 15:25:36.983065343 +0200
+--- src/po/Makefile 2019-04-11 18:40:31.937057172 +0200
+***************
+*** 165,170 ****
+--- 165,171 ----
+ mv -f ../$(PACKAGE).po $(PACKAGE).pot
+
+ %.desktop: %.desktop.in $(POFILES)
++ @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+ $(MSGFMT) --desktop -d . --template $< -o $@
+ cp -f $@ ../../runtime/$@
+
+*** ../vim-8.1.1153/src/version.c 2019-04-11 17:22:52.481495019 +0200
+--- src/version.c 2019-04-11 18:37:12.266124999 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1153,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+251. You've never seen your closest friends who usually live WAY too far away.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1154 b/data/vim/patches/8.1.1154
new file mode 100644
index 000000000..a683a0ddd
--- /dev/null
+++ b/data/vim/patches/8.1.1154
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1154
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1154
+Problem: Getting a newer msgfmt on Travis is too complicated.
+Solution: Use a "sourcline" entry. (Ozaki Kiichi, closes #4236)
+Files: .travis.yml
+
+
+*** ../vim-8.1.1153/.travis.yml 2019-04-11 15:49:07.479204917 +0200
+--- .travis.yml 2019-04-11 20:12:52.329278761 +0200
+***************
+*** 69,78 ****
+--- 69,82 ----
+
+ addons:
+ apt:
++ sources:
++ # Need msgfmt 0.19.8 to be able to generate .desktop files
++ - sourceline: 'ppa:ricotz/toolchain'
+ packages:
+ - autoconf
+ - clang
+ - lcov
++ - gettext
+ - libperl-dev
+ - python-dev
+ - python3-dev
+***************
+*** 115,127 ****
+ if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "${CC}" = "clang" ]]; then
+ ln -sf "$(which llvm-cov)" /home/travis/bin/gcov
+ fi
+- # Need msgfmt 0.19.8 to be able to generate .desktop files
+- - |
+- if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
+- sudo add-apt-repository ppa:ricotz/toolchain -y &&
+- sudo apt-get update -q &&
+- sudo apt-get install gettext=0.19.8.1-1ubuntu2~14.04~ricotz1 -y
+- fi
+
+ before_script:
+ # Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
+--- 119,124 ----
+*** ../vim-8.1.1153/src/version.c 2019-04-11 18:41:07.608867036 +0200
+--- src/version.c 2019-04-11 20:13:54.824959113 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1154,
+ /**/
+
+--
+Emacs is a nice OS - but it lacks a good text editor.
+That's why I am using Vim. --Anonymous
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1155 b/data/vim/patches/8.1.1155
new file mode 100644
index 000000000..631083f04
--- /dev/null
+++ b/data/vim/patches/8.1.1155
@@ -0,0 +1,372 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1155
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1155
+Problem: Termcodes tests can be improved.
+Solution: Add helper functions to simplify tests. Dragging statusline for
+ xterm and sgr. (Dominique Pelle, closes #4237)
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1154/src/testdir/test_termcodes.vim 2019-04-09 21:51:59.177300145 +0200
+--- src/testdir/test_termcodes.vim 2019-04-11 23:53:26.777268934 +0200
+***************
+*** 5,43 ****
+ finish
+ endif
+
+ func Test_xterm_mouse_click()
+ new
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+! set mouse=a
+! set term=xterm
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+- redraw
+-
+- " Xterm mouse click
+- set ttymouse=xterm
+- let button = 0x20 " left down
+- let row = 2 + 32
+- let col = 6 + 32
+- call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
+-
+- let button = 0x23 " release
+- call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
+-
+- call assert_equal([0, 2, 6, 0], getpos('.'))
+-
+- " SGR mouse click
+- set ttymouse=sgr
+- let button = 0 " left down
+- let row = 3
+- let col = 9
+- call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
+-
+- let button = 3 " release
+- call feedkeys(printf("\<Esc>[<%d;%d;%dm", button, col, row), 'Lx!')
+
+! call assert_equal([0, 3, 9, 0], getpos('.'))
+
+ let &mouse = save_mouse
+ let &term = save_term
+--- 5,65 ----
+ finish
+ endif
+
++ " Helper function to emit a terminal escape code.
++ func TerminalEscapeCode(code_xterm, code_sgr, row, col, m)
++ if &ttymouse ==# 'xterm'
++ " need to use byte encoding here.
++ let str = list2str([a:code_xterm, a:col + 0x20, a:row + 0x20])
++ if has('iconv')
++ let bytes = iconv(str, 'utf-8', 'latin1')
++ else
++ " Hopefully the numbers are not too big.
++ let bytes = str
++ endif
++ call feedkeys("\<Esc>[M" .. bytes, 'Lx!')
++ elseif &ttymouse ==# 'sgr'
++ call feedkeys(printf("\<Esc>[<%d;%d;%d%s", a:code_sgr, a:col, a:row, a:m), 'Lx!')
++ endif
++ endfunc
++
++ func MouseLeftClick(row, col)
++ call TerminalEscapeCode(0x20, 0, a:row, a:col, 'M')
++ endfunc
++
++ func MouseLeftRelease(row, col)
++ call TerminalEscapeCode(0x23, 3, a:row, a:col, 'm')
++ endfunc
++
++ func MouseLeftDrag(row, col)
++ call TerminalEscapeCode(0x43, 0x20, a:row, a:col, 'M')
++ endfunc
++
++ func MouseWheelUp(row, col)
++ call TerminalEscapeCode(0x40, 0x40, a:row, a:col, 'M')
++ endfunc
++
++ func MouseWheelDown(row, col)
++ call TerminalEscapeCode(0x41, 0x41, a:row, a:col, 'M')
++ endfunc
++
+ func Test_xterm_mouse_click()
+ new
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+! set mouse=a term=xterm
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+
+! for ttymouse_val in ['xterm', 'sgr']
+! exe 'set ttymouse=' . ttymouse_val
+! go
+! call assert_equal([0, 1, 1, 0], getpos('.'))
+! let row = 2
+! let col = 6
+! call MouseLeftClick(row, col)
+! call MouseLeftRelease(row, col)
+! call assert_equal([0, 2, 6, 0], getpos('.'))
+! endfor
+
+ let &mouse = save_mouse
+ let &term = save_term
+***************
+*** 50,110 ****
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+! set mouse=a
+! set term=xterm
+ call setline(1, range(1, 100))
+
+! " Test Xterm mouse wheel.
+! set ttymouse=xterm
+! let button = 0x41 " wheel down.
+! let row = 1 + 32 " cursor position for mouse wheel is not relevant.
+! let col = 1 + 32
+!
+! call assert_equal(1, line('w0'))
+! call assert_equal([0, 1, 1, 0], getpos('.'))
+! call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
+! call assert_equal(4, line('w0'))
+! call assert_equal([0, 4, 1, 0], getpos('.'))
+! call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
+! call assert_equal(7, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+!
+! let button = 0x40 " wheel up.
+!
+! call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
+! call assert_equal(4, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+! call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
+! call assert_equal(1, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+!
+! " Test SGR mouse wheel.
+! set ttymouse=sgr
+! go
+! let button = 0x41 " wheel down.
+! let row = 1 " cursor position for mouse wheel is not relevant.
+! let col = 1
+!
+! call assert_equal(1, line('w0'))
+! call assert_equal([0, 1, 1, 0], getpos('.'))
+! call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
+! call assert_equal(4, line('w0'))
+! call assert_equal([0, 4, 1, 0], getpos('.'))
+! call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
+! call assert_equal(7, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+!
+! let button = 0x40 " wheel up.
+!
+! call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
+! call assert_equal(4, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+! call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
+! call assert_equal(1, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+! call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
+! call assert_equal(1, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+
+ let &mouse = save_mouse
+ let &term = save_term
+--- 72,102 ----
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+! set mouse=a term=xterm
+ call setline(1, range(1, 100))
+
+! for ttymouse_val in ['xterm', 'sgr']
+! exe 'set ttymouse=' . ttymouse_val
+! go
+! call assert_equal(1, line('w0'))
+! call assert_equal([0, 1, 1, 0], getpos('.'))
+!
+! call MouseWheelDown(1, 1)
+! call assert_equal(4, line('w0'))
+! call assert_equal([0, 4, 1, 0], getpos('.'))
+!
+! call MouseWheelDown(1, 1)
+! call assert_equal(7, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+!
+! call MouseWheelUp(1, 1)
+! call assert_equal(4, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+!
+! call MouseWheelUp(1, 1)
+! call assert_equal(1, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+! endfor
+
+ let &mouse = save_mouse
+ let &term = save_term
+***************
+*** 116,170 ****
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+! set mouse=a
+! set term=xterm
+! set ttymouse=sgr
+!
+! " Split horizontally and test dragging the horizontal window separator.
+! split
+! let rowseparator = winheight(0) + 1
+!
+! let button = 0 " left down.
+! let row = rowseparator
+! let col = 1
+! call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
+!
+! let drag = 32
+! let row -= 1
+! call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
+! call assert_equal(rowseparator - 1, winheight(0) + 1)
+! let row += 1
+! call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
+! call assert_equal(rowseparator, winheight(0) + 1)
+!
+! let release = 3
+! call feedkeys(printf("\<Esc>[<%d;%d;%dm", release, col, row), 'Lx!')
+! call assert_equal(rowseparator, winheight(0) + 1)
+
+! bwipe!
+
+! " Split vertically and test dragging the vertical window separator.
+! vsplit
+! let colseparator = winwidth(0) + 1
+!
+! let button = 0
+! let row = 1
+! let col = colseparator
+! call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
+!
+! let drag = 32
+! let col -= 1
+! call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
+! call assert_equal(colseparator - 1, winwidth(0) + 1)
+! let col += 1
+! call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
+! call assert_equal(colseparator, winwidth(0) + 1)
+!
+! let release = 3
+! call feedkeys(printf("\<Esc>[<%d;%d;%dm", release, col, row), 'Lx!')
+! call assert_equal(colseparator, winwidth(0) + 1)
+
+- bwipe!
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
+--- 108,187 ----
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+! set mouse=a term=xterm
+
+! for ttymouse_val in ['xterm', 'sgr']
+! exe 'set ttymouse=' . ttymouse_val
+
+! " Split horizontally and test dragging the horizontal window separator.
+! split
+! let rowseparator = winheight(0) + 1
+! let row = rowseparator
+! let col = 1
+! call MouseLeftClick(row, col)
+!
+! let row -= 1
+! call MouseLeftDrag(row, col)
+! call assert_equal(rowseparator - 1, winheight(0) + 1)
+! let row += 1
+! call MouseLeftDrag(row, col)
+! call assert_equal(rowseparator, winheight(0) + 1)
+! call MouseLeftRelease(row, col)
+! call assert_equal(rowseparator, winheight(0) + 1)
+!
+! bwipe!
+!
+! " Split vertically and test dragging the vertical window separator.
+! vsplit
+! let colseparator = winwidth(0) + 1
+!
+! let row = 1
+! let col = colseparator
+! call MouseLeftClick(row, col)
+! let col -= 1
+! call MouseLeftDrag(row, col)
+! call assert_equal(colseparator - 1, winwidth(0) + 1)
+! let col += 1
+! call MouseLeftDrag(row, col)
+! call assert_equal(colseparator, winwidth(0) + 1)
+! call MouseLeftRelease(row, col)
+! call assert_equal(colseparator, winwidth(0) + 1)
+!
+! bwipe!
+! endfor
+!
+! let &mouse = save_mouse
+! let &term = save_term
+! let &ttymouse = save_ttymouse
+! endfunc
+!
+! func Test_xterm_mouse_drag_statusline()
+! let save_mouse = &mouse
+! let save_term = &term
+! let save_ttymouse = &ttymouse
+! set mouse=a term=xterm
+!
+! for ttymouse_val in ['xterm', 'sgr']
+! exe 'set ttymouse=' . ttymouse_val
+!
+! call assert_equal(1, &cmdheight)
+! let rowstatusline = winheight(0) + 1
+! let row = rowstatusline
+! let col = 1
+! call MouseLeftClick(row, col)
+! let row -= 1
+! call MouseLeftDrag(row, col)
+! call assert_equal(2, &cmdheight)
+! call assert_equal(rowstatusline - 1, winheight(0) + 1)
+! let row += 1
+! call MouseLeftDrag(row, col)
+! call assert_equal(1, &cmdheight)
+! call assert_equal(rowstatusline, winheight(0) + 1)
+! call MouseLeftRelease(row, col)
+! call assert_equal(1, &cmdheight)
+! call assert_equal(rowstatusline, winheight(0) + 1)
+! endfor
+
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
+*** ../vim-8.1.1154/src/version.c 2019-04-11 20:14:52.448664389 +0200
+--- src/version.c 2019-04-11 23:02:25.131500056 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1155,
+ /**/
+
+--
+Did you hear about the new 3 million dollar West Virginia State Lottery?
+The winner gets 3 dollars a year for a million years.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1156 b/data/vim/patches/8.1.1156
new file mode 100644
index 000000000..3fc75aac0
--- /dev/null
+++ b/data/vim/patches/8.1.1156
@@ -0,0 +1,49 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1156
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1156
+Problem: Unicode emoji and other image characters not recognized.
+Solution: Add ranges for musical notation, game pieces, etc. (Martin
+ Tournoij, closes #4238)
+Files: src/mbyte.c
+
+
+*** ../vim-8.1.1155/src/mbyte.c 2019-03-22 16:33:03.487016094 +0100
+--- src/mbyte.c 2019-04-12 19:54:25.319829355 +0200
+***************
+*** 2836,2841 ****
+--- 2836,2845 ----
+ {0xff1a, 0xff20, 1}, /* half/fullwidth ASCII */
+ {0xff3b, 0xff40, 1}, /* half/fullwidth ASCII */
+ {0xff5b, 0xff65, 1}, /* half/fullwidth ASCII */
++ {0x1d000, 0x1d24f, 1}, /* Musical notation */
++ {0x1d400, 0x1d7ff, 1}, /* Mathematical Alphanumeric Symbols */
++ {0x1f000, 0x1f2ff, 1}, /* Game pieces; enclosed characters */
++ {0x1f300, 0x1f9ff, 1}, /* Many symbol blocks */
+ {0x20000, 0x2a6df, 0x4e00}, /* CJK Ideographs */
+ {0x2a700, 0x2b73f, 0x4e00}, /* CJK Ideographs */
+ {0x2b740, 0x2b81f, 0x4e00}, /* CJK Ideographs */
+*** ../vim-8.1.1155/src/version.c 2019-04-11 23:53:58.345106670 +0200
+--- src/version.c 2019-04-12 19:57:14.450623617 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1156,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+258. When you want to see your girlfriend, you surf to her homepage.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1157 b/data/vim/patches/8.1.1157
new file mode 100644
index 000000000..866976bd5
--- /dev/null
+++ b/data/vim/patches/8.1.1157
@@ -0,0 +1,270 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1157
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1157
+Problem: Unicode tables are out of date.
+Solution: Update to Unicode 12. (Christian Brabandt, closes #4240)
+Files: src/mbyte.c
+
+
+*** ../vim-8.1.1156/src/mbyte.c 2019-04-12 20:00:18.017363954 +0200
+--- src/mbyte.c 2019-04-12 20:01:57.140718071 +0200
+***************
+*** 1474,1483 ****
+ {0xfe68, 0xfe6b},
+ {0xff01, 0xff60},
+ {0xffe0, 0xffe6},
+! {0x16fe0, 0x16fe1},
+! {0x17000, 0x187f1},
+ {0x18800, 0x18af2},
+ {0x1b000, 0x1b11e},
+ {0x1b170, 0x1b2fb},
+ {0x1f004, 0x1f004},
+ {0x1f0cf, 0x1f0cf},
+--- 1474,1485 ----
+ {0xfe68, 0xfe6b},
+ {0xff01, 0xff60},
+ {0xffe0, 0xffe6},
+! {0x16fe0, 0x16fe3},
+! {0x17000, 0x187f7},
+ {0x18800, 0x18af2},
+ {0x1b000, 0x1b11e},
++ {0x1b150, 0x1b152},
++ {0x1b164, 0x1b167},
+ {0x1b170, 0x1b2fb},
+ {0x1f004, 0x1f004},
+ {0x1f0cf, 0x1f0cf},
+***************
+*** 1509,1524 ****
+ {0x1f680, 0x1f6c5},
+ {0x1f6cc, 0x1f6cc},
+ {0x1f6d0, 0x1f6d2},
+ {0x1f6eb, 0x1f6ec},
+! {0x1f6f4, 0x1f6f9},
+! {0x1f910, 0x1f93e},
+! {0x1f940, 0x1f970},
+ {0x1f973, 0x1f976},
+! {0x1f97a, 0x1f97a},
+! {0x1f97c, 0x1f9a2},
+! {0x1f9b0, 0x1f9b9},
+! {0x1f9c0, 0x1f9c2},
+! {0x1f9d0, 0x1f9ff},
+ {0x20000, 0x2fffd},
+ {0x30000, 0x3fffd}
+ };
+--- 1511,1530 ----
+ {0x1f680, 0x1f6c5},
+ {0x1f6cc, 0x1f6cc},
+ {0x1f6d0, 0x1f6d2},
++ {0x1f6d5, 0x1f6d5},
+ {0x1f6eb, 0x1f6ec},
+! {0x1f6f4, 0x1f6fa},
+! {0x1f7e0, 0x1f7eb},
+! {0x1f90d, 0x1f971},
+ {0x1f973, 0x1f976},
+! {0x1f97a, 0x1f9a2},
+! {0x1f9a5, 0x1f9aa},
+! {0x1f9ae, 0x1f9ca},
+! {0x1f9cd, 0x1f9ff},
+! {0x1fa70, 0x1fa73},
+! {0x1fa78, 0x1fa7a},
+! {0x1fa80, 0x1fa82},
+! {0x1fa90, 0x1fa95},
+ {0x20000, 0x2fffd},
+ {0x30000, 0x3fffd}
+ };
+***************
+*** 2391,2398 ****
+ {0x0e34, 0x0e3a},
+ {0x0e47, 0x0e4e},
+ {0x0eb1, 0x0eb1},
+! {0x0eb4, 0x0eb9},
+! {0x0ebb, 0x0ebc},
+ {0x0ec8, 0x0ecd},
+ {0x0f18, 0x0f19},
+ {0x0f35, 0x0f35},
+--- 2397,2403 ----
+ {0x0e34, 0x0e3a},
+ {0x0e47, 0x0e4e},
+ {0x0eb1, 0x0eb1},
+! {0x0eb4, 0x0ebc},
+ {0x0ec8, 0x0ecd},
+ {0x0f18, 0x0f19},
+ {0x0f35, 0x0f35},
+***************
+*** 2440,2446 ****
+ {0x1cd0, 0x1cd2},
+ {0x1cd4, 0x1ce8},
+ {0x1ced, 0x1ced},
+! {0x1cf2, 0x1cf4},
+ {0x1cf7, 0x1cf9},
+ {0x1dc0, 0x1df9},
+ {0x1dfb, 0x1dff},
+--- 2445,2451 ----
+ {0x1cd0, 0x1cd2},
+ {0x1cd4, 0x1ce8},
+ {0x1ced, 0x1ced},
+! {0x1cf4, 0x1cf4},
+ {0x1cf7, 0x1cf9},
+ {0x1dc0, 0x1df9},
+ {0x1dfb, 0x1dff},
+***************
+*** 2527,2532 ****
+--- 2532,2540 ----
+ {0x116ab, 0x116b7},
+ {0x1171d, 0x1172b},
+ {0x1182c, 0x1183a},
++ {0x119d1, 0x119d7},
++ {0x119da, 0x119e0},
++ {0x119e4, 0x119e4},
+ {0x11a01, 0x11a0a},
+ {0x11a33, 0x11a39},
+ {0x11a3b, 0x11a3e},
+***************
+*** 2548,2554 ****
+ {0x11ef3, 0x11ef6},
+ {0x16af0, 0x16af4},
+ {0x16b30, 0x16b36},
+! {0x16f51, 0x16f7e},
+ {0x16f8f, 0x16f92},
+ {0x1bc9d, 0x1bc9e},
+ {0x1d165, 0x1d169},
+--- 2556,2563 ----
+ {0x11ef3, 0x11ef6},
+ {0x16af0, 0x16af4},
+ {0x16b30, 0x16b36},
+! {0x16f4f, 0x16f4f},
+! {0x16f51, 0x16f87},
+ {0x16f8f, 0x16f92},
+ {0x1bc9d, 0x1bc9e},
+ {0x1d165, 0x1d169},
+***************
+*** 2568,2573 ****
+--- 2577,2584 ----
+ {0x1e01b, 0x1e021},
+ {0x1e023, 0x1e024},
+ {0x1e026, 0x1e02a},
++ {0x1e130, 0x1e136},
++ {0x1e2ec, 0x1e2ef},
+ {0x1e8d0, 0x1e8d6},
+ {0x1e944, 0x1e94a},
+ {0xe0100, 0xe01ef}
+***************
+*** 3090,3096 ****
+ {0xa7b1,0xa7b1,-1,-42282},
+ {0xa7b2,0xa7b2,-1,-42261},
+ {0xa7b3,0xa7b3,-1,928},
+! {0xa7b4,0xa7b8,2,1},
+ {0xab70,0xabbf,1,-38864},
+ {0xff21,0xff3a,1,32},
+ {0x10400,0x10427,1,40},
+--- 3101,3111 ----
+ {0xa7b1,0xa7b1,-1,-42282},
+ {0xa7b2,0xa7b2,-1,-42261},
+ {0xa7b3,0xa7b3,-1,928},
+! {0xa7b4,0xa7be,2,1},
+! {0xa7c2,0xa7c2,-1,1},
+! {0xa7c4,0xa7c4,-1,-48},
+! {0xa7c5,0xa7c5,-1,-42307},
+! {0xa7c6,0xa7c6,-1,-35384},
+ {0xab70,0xabbf,1,-38864},
+ {0xff21,0xff3a,1,32},
+ {0x10400,0x10427,1,40},
+***************
+*** 3310,3316 ****
+ {0xa7b1,0xa7b1,-1,-42282},
+ {0xa7b2,0xa7b2,-1,-42261},
+ {0xa7b3,0xa7b3,-1,928},
+! {0xa7b4,0xa7b8,2,1},
+ {0xff21,0xff3a,1,32},
+ {0x10400,0x10427,1,40},
+ {0x104b0,0x104d3,1,40},
+--- 3325,3335 ----
+ {0xa7b1,0xa7b1,-1,-42282},
+ {0xa7b2,0xa7b2,-1,-42261},
+ {0xa7b3,0xa7b3,-1,928},
+! {0xa7b4,0xa7be,2,1},
+! {0xa7c2,0xa7c2,-1,1},
+! {0xa7c4,0xa7c4,-1,-48},
+! {0xa7c5,0xa7c5,-1,-42307},
+! {0xa7c6,0xa7c6,-1,-35384},
+ {0xff21,0xff3a,1,32},
+ {0x10400,0x10427,1,40},
+ {0x104b0,0x104d3,1,40},
+***************
+*** 3390,3396 ****
+ {0x272,0x272,-1,-213},
+ {0x275,0x275,-1,-214},
+ {0x27d,0x27d,-1,10727},
+! {0x280,0x283,3,-218},
+ {0x287,0x287,-1,42282},
+ {0x288,0x288,-1,-218},
+ {0x289,0x289,-1,-69},
+--- 3409,3417 ----
+ {0x272,0x272,-1,-213},
+ {0x275,0x275,-1,-214},
+ {0x27d,0x27d,-1,10727},
+! {0x280,0x280,-1,-218},
+! {0x282,0x282,-1,42307},
+! {0x283,0x283,-1,-218},
+ {0x287,0x287,-1,42282},
+ {0x288,0x288,-1,-218},
+ {0x289,0x289,-1,-69},
+***************
+*** 3443,3448 ****
+--- 3464,3470 ----
+ {0x1c88,0x1c88,-1,35266},
+ {0x1d79,0x1d79,-1,35332},
+ {0x1d7d,0x1d7d,-1,3814},
++ {0x1d8e,0x1d8e,-1,35384},
+ {0x1e01,0x1e95,2,-1},
+ {0x1e9b,0x1e9b,-1,-59},
+ {0x1ea1,0x1eff,2,-1},
+***************
+*** 3492,3500 ****
+ {0xa77a,0xa77c,2,-1},
+ {0xa77f,0xa787,2,-1},
+ {0xa78c,0xa791,5,-1},
+! {0xa793,0xa797,4,-1},
+! {0xa799,0xa7a9,2,-1},
+! {0xa7b5,0xa7b9,2,-1},
+ {0xab53,0xab53,-1,-928},
+ {0xab70,0xabbf,1,-38864},
+ {0xff41,0xff5a,1,-32},
+--- 3514,3524 ----
+ {0xa77a,0xa77c,2,-1},
+ {0xa77f,0xa787,2,-1},
+ {0xa78c,0xa791,5,-1},
+! {0xa793,0xa793,-1,-1},
+! {0xa794,0xa794,-1,48},
+! {0xa797,0xa7a9,2,-1},
+! {0xa7b5,0xa7bf,2,-1},
+! {0xa7c3,0xa7c3,-1,-1},
+ {0xab53,0xab53,-1,-928},
+ {0xab70,0xabbf,1,-38864},
+ {0xff41,0xff5a,1,-32},
+*** ../vim-8.1.1156/src/version.c 2019-04-12 20:00:18.017363954 +0200
+--- src/version.c 2019-04-12 20:01:51.152756519 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1157,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+260. Co-workers have to E-mail you about the fire alarm to get
+ you out of the building.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1158 b/data/vim/patches/8.1.1158
new file mode 100644
index 000000000..a3574ecb1
--- /dev/null
+++ b/data/vim/patches/8.1.1158
@@ -0,0 +1,82 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1158
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1158
+Problem: Json encoded string is sometimes missing the final NUL.
+Solution: Add the NUL. Also for log messages.
+Files: src/json.c, src/channel.c, src/testdir/test_json.vim
+
+
+*** ../vim-8.1.1157/src/json.c 2019-01-24 15:54:17.786847003 +0100
+--- src/json.c 2019-04-12 21:10:55.244430796 +0200
+***************
+*** 51,56 ****
+--- 51,57 ----
+ /* Store bytes in the growarray. */
+ ga_init2(&ga, 1, 4000);
+ json_encode_gap(&ga, val, options);
++ ga_append(&ga, NUL);
+ return ga.ga_data;
+ }
+
+***************
+*** 82,87 ****
+--- 83,89 ----
+ if (json_encode_gap(&ga, &listtv, options) == OK && (options & JSON_NL))
+ ga_append(&ga, '\n');
+ list_unref(listtv.vval.v_list);
++ ga_append(&ga, NUL);
+ return ga.ga_data;
+ }
+ #endif
+*** ../vim-8.1.1157/src/channel.c 2019-03-21 21:45:30.883282076 +0100
+--- src/channel.c 2019-04-12 21:14:02.015234496 +0200
+***************
+*** 5877,5882 ****
+--- 5877,5883 ----
+ ga_concat(&ga, (char_u *)" ");
+ ga_concat(&ga, (char_u *)argv[i]);
+ }
++ ga_append(&ga, NUL);
+ ch_log(NULL, "Starting job: %s", (char *)ga.ga_data);
+ ga_clear(&ga);
+ }
+*** ../vim-8.1.1157/src/testdir/test_json.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_json.vim 2019-04-12 21:06:44.574119544 +0200
+***************
+*** 289,291 ****
+--- 289,298 ----
+
+ call assert_equal(s:varl5, js_decode(s:jsl5))
+ endfunc
++
++ func Test_json_encode_long()
++ " The growarray uses a grow size of 4000, check that a result that is exactly
++ " 4000 bytes long is not missing the final NUL.
++ let json = json_encode([repeat('a', 3996)])
++ call assert_equal(4000, len(json))
++ endfunc
+*** ../vim-8.1.1157/src/version.c 2019-04-12 20:08:51.478186362 +0200
+--- src/version.c 2019-04-12 21:18:53.745431937 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1158,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+262. Your computer has it's own phone line - but your daughter doesn'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.1159 b/data/vim/patches/8.1.1159
new file mode 100644
index 000000000..ad003cbbf
--- /dev/null
+++ b/data/vim/patches/8.1.1159
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1159
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1159
+Problem: MS-Windows: with a silent (un)install $VIM/_vimrc is removed.
+Solution: Don't delete _vimrc in silent mode. (Ken Takata, closes #4242)
+Files: nsis/gvim.nsi
+
+
+*** ../vim-8.1.1158/nsis/gvim.nsi 2019-03-26 23:02:42.621397857 +0100
+--- nsis/gvim.nsi 2019-04-12 21:27:49.178235685 +0200
+***************
+*** 1096,1102 ****
+ Call un.GetParent
+ Pop $0
+
+! Delete $0\_vimrc
+ RMDir $0
+ SectionEnd
+
+--- 1096,1104 ----
+ Call un.GetParent
+ Pop $0
+
+! ${IfNot} ${Silent}
+! Delete $0\_vimrc
+! ${Endif}
+ RMDir $0
+ SectionEnd
+
+*** ../vim-8.1.1158/src/version.c 2019-04-12 21:19:01.265386241 +0200
+--- src/version.c 2019-04-12 21:29:00.501815917 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1159,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+263. You have more e-mail addresses than shorts.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1160 b/data/vim/patches/8.1.1160
new file mode 100644
index 000000000..866e6a8aa
--- /dev/null
+++ b/data/vim/patches/8.1.1160
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1160
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1160
+Problem: Termcodes test would fail in a very big terminal.
+Solution: Bail out when the row is larger than what will work. (Dominique
+ Pelle, closes #4246)
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1159/src/testdir/test_termcodes.vim 2019-04-11 23:53:58.345106670 +0200
+--- src/testdir/test_termcodes.vim 2019-04-12 21:39:53.125759675 +0200
+***************
+*** 118,123 ****
+--- 118,129 ----
+ let rowseparator = winheight(0) + 1
+ let row = rowseparator
+ let col = 1
++
++ if ttymouse_val ==# 'xterm' && row > 223
++ " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
++ continue
++ endif
++
+ call MouseLeftClick(row, col)
+
+ let row -= 1
+***************
+*** 168,173 ****
+--- 174,185 ----
+ let rowstatusline = winheight(0) + 1
+ let row = rowstatusline
+ let col = 1
++
++ if ttymouse_val ==# 'xterm' && row > 223
++ " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
++ continue
++ endif
++
+ call MouseLeftClick(row, col)
+ let row -= 1
+ call MouseLeftDrag(row, col)
+*** ../vim-8.1.1159/src/version.c 2019-04-12 21:29:30.213641315 +0200
+--- src/version.c 2019-04-12 21:41:38.937017326 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1160,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+264. You turn to the teletext page "surfing report" and are surprised that it
+ is about sizes of waves and a weather forecast for seaside resorts.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1161 b/data/vim/patches/8.1.1161
new file mode 100644
index 000000000..467f63a60
--- /dev/null
+++ b/data/vim/patches/8.1.1161
@@ -0,0 +1,135 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1161
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1161
+Problem: Unreachable code.
+Solution: Remove condition that will never be true. Add tests for all ANSI
+ colors.
+Files: src/terminal.c, src/testdir/test_terminal.vim,
+ src/testdir/dumps/Test_terminal_all_ansi_colors.dump
+
+
+*** ../vim-8.1.1160/src/terminal.c 2019-04-11 11:40:08.023371343 +0200
+--- src/terminal.c 2019-04-12 21:46:30.819063896 +0200
+***************
+*** 2432,2441 ****
+
+ if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
+ {
+! /* First 16 colors and default: use the ANSI index, because these
+! * colors can be redefined, we use the RGB values. */
+! if (t_colors > 256)
+! return color->ansi_index;
+ switch (color->ansi_index)
+ {
+ case 0: return 0;
+--- 2432,2438 ----
+
+ if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
+ {
+! // The first 16 colors and default: use the ANSI index.
+ switch (color->ansi_index)
+ {
+ case 0: return 0;
+*** ../vim-8.1.1160/src/testdir/test_terminal.vim 2019-04-09 21:17:28.837660254 +0200
+--- src/testdir/test_terminal.vim 2019-04-12 22:20:58.870655719 +0200
+***************
+*** 1484,1489 ****
+--- 1484,1540 ----
+ exe buf . 'bwipe'
+ endfunc
+
++ func Test_terminal_all_ansi_colors()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
++ " Use all the ANSI colors.
++ call writefile([
++ \ 'call setline(1, "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPP")',
++ \ 'hi Tblack ctermfg=Black ctermbg=Lightgrey',
++ \ 'hi Tdarkred ctermfg=Darkred ctermbg=Red',
++ \ 'hi Tdarkgreen ctermfg=Darkgreen ctermbg=Green',
++ \ 'hi Tbrown ctermfg=Brown ctermbg=Yello',
++ \ 'hi Tdarkblue ctermfg=Darkblue ctermbg=Blue',
++ \ 'hi Tdarkmagenta ctermfg=Darkmagenta ctermbg=Magenta',
++ \ 'hi Tdarkcyan ctermfg=Darkcyan ctermbg=Cyan',
++ \ 'hi Tlightgrey ctermfg=Lightgrey ctermbg=Black',
++ \ 'hi Tdarkgrey ctermfg=Darkgrey ctermbg=White',
++ \ 'hi Tred ctermfg=Red ctermbg=Darkred',
++ \ 'hi Tgreen ctermfg=Green ctermbg=Darkgreen',
++ \ 'hi Tyellow ctermfg=Yellow ctermbg=Brown',
++ \ 'hi Tblue ctermfg=Blue ctermbg=Darkblue',
++ \ 'hi Tmagenta ctermfg=Magenta ctermbg=Darkmagenta',
++ \ 'hi Tcyan ctermfg=Cyan ctermbg=Darkcyan',
++ \ 'hi Twhite ctermfg=White ctermbg=Darkgrey',
++ \ '',
++ \ 'call matchadd("Tblack", "A")',
++ \ 'call matchadd("Tdarkred", "B")',
++ \ 'call matchadd("Tdarkgreen", "C")',
++ \ 'call matchadd("Tbrown", "D")',
++ \ 'call matchadd("Tdarkblue", "E")',
++ \ 'call matchadd("Tdarkmagenta", "F")',
++ \ 'call matchadd("Tdarkcyan", "G")',
++ \ 'call matchadd("Tlightgrey", "H")',
++ \ 'call matchadd("Tdarkgrey", "I")',
++ \ 'call matchadd("Tred", "J")',
++ \ 'call matchadd("Tgreen", "K")',
++ \ 'call matchadd("Tyellow", "L")',
++ \ 'call matchadd("Tblue", "M")',
++ \ 'call matchadd("Tmagenta", "N")',
++ \ 'call matchadd("Tcyan", "O")',
++ \ 'call matchadd("Twhite", "P")',
++ \ 'redraw',
++ \ ], 'Xcolorscript')
++ let buf = RunVimInTerminal('-S Xcolorscript', {'rows': 10})
++ call VerifyScreenDump(buf, 'Test_terminal_all_ansi_colors', {})
++
++ call term_sendkeys(buf, ":q\<CR>")
++ call StopVimInTerminal(buf)
++ call delete('Xcolorscript')
++ endfunc
++
+ func Test_terminal_termwinsize_option_fixed()
+ if !CanRunVimInTerminal()
+ return
+*** ../vim-8.1.1160/src/testdir/dumps/Test_terminal_all_ansi_colors.dump 2019-04-12 22:26:54.756593491 +0200
+--- src/testdir/dumps/Test_terminal_all_ansi_colors.dump 2019-04-12 22:21:18.058545398 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ >A+0#0000001#e0e0e08@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#af5f00255#ffffff0@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#0000001@1|I+0#6c6c6c255#ffffff16@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#af5f00255@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#6c6c6c255@1| +0#0000000#ffffff0@42
++ @2| +0#4040ff13&@72
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ | +0#0000000&@56|1|,|1| @10|A|l@1|
+*** ../vim-8.1.1160/src/version.c 2019-04-12 21:42:48.692539315 +0200
+--- src/version.c 2019-04-12 22:11:11.485946804 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1161,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+265. Your reason for not staying in touch with family is that
+ they do not have e-mail addresses.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1162 b/data/vim/patches/8.1.1162
new file mode 100644
index 000000000..0b1c46a4c
--- /dev/null
+++ b/data/vim/patches/8.1.1162
@@ -0,0 +1,95 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1162
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1162
+Problem: Incorrect coverage information; typo in color name.
+Solution: Fix the typo. Set environment variables to have a nested Vim
+ write the coverage info in another directory.
+Files: src/testdir/test_terminal.vim, src/testdir/screendump.vim,
+ src/testdir/dumps/Test_terminal_all_ansi_colors.dump
+
+
+*** ../vim-8.1.1161/src/testdir/test_terminal.vim 2019-04-12 22:27:21.632436663 +0200
+--- src/testdir/test_terminal.vim 2019-04-13 12:12:15.361240128 +0200
+***************
+*** 1495,1501 ****
+ \ 'hi Tblack ctermfg=Black ctermbg=Lightgrey',
+ \ 'hi Tdarkred ctermfg=Darkred ctermbg=Red',
+ \ 'hi Tdarkgreen ctermfg=Darkgreen ctermbg=Green',
+! \ 'hi Tbrown ctermfg=Brown ctermbg=Yello',
+ \ 'hi Tdarkblue ctermfg=Darkblue ctermbg=Blue',
+ \ 'hi Tdarkmagenta ctermfg=Darkmagenta ctermbg=Magenta',
+ \ 'hi Tdarkcyan ctermfg=Darkcyan ctermbg=Cyan',
+--- 1495,1501 ----
+ \ 'hi Tblack ctermfg=Black ctermbg=Lightgrey',
+ \ 'hi Tdarkred ctermfg=Darkred ctermbg=Red',
+ \ 'hi Tdarkgreen ctermfg=Darkgreen ctermbg=Green',
+! \ 'hi Tbrown ctermfg=Brown ctermbg=Yellow',
+ \ 'hi Tdarkblue ctermfg=Darkblue ctermbg=Blue',
+ \ 'hi Tdarkmagenta ctermfg=Darkmagenta ctermbg=Magenta',
+ \ 'hi Tdarkcyan ctermfg=Darkcyan ctermbg=Cyan',
+*** ../vim-8.1.1161/src/testdir/screendump.vim 2019-04-06 20:51:46.587069001 +0200
+--- src/testdir/screendump.vim 2019-04-13 13:07:23.815596957 +0200
+***************
+*** 55,62 ****
+ let cmd = GetVimCommandClean()
+
+ " Add -v to have gvim run in the terminal (if possible)
+ let cmd .= ' -v ' . a:arguments
+! let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': cols})
+ if &termwinsize == ''
+ " in the GUI we may end up with a different size, try to set it.
+ if term_getsize(buf) != [rows, cols]
+--- 55,70 ----
+ let cmd = GetVimCommandClean()
+
+ " Add -v to have gvim run in the terminal (if possible)
++ " The GCOV_ environment variables cause the Vim running in the terminal to
++ " write the coverage information in the "nested" directory, to avoid two Vim
++ " instances try to write to the same coverage info file.
+ let cmd .= ' -v ' . a:arguments
+! let buf = term_start(cmd, {
+! \ 'curwin': 1,
+! \ 'term_rows': rows,
+! \ 'term_cols': cols,
+! \ 'env': {'GCOV_PREFIX': 'nested', 'GCOV_PREFIX_STRIP': 99},
+! \ })
+ if &termwinsize == ''
+ " in the GUI we may end up with a different size, try to set it.
+ if term_getsize(buf) != [rows, cols]
+*** ../vim-8.1.1161/src/testdir/dumps/Test_terminal_all_ansi_colors.dump 2019-04-12 22:27:21.632436663 +0200
+--- src/testdir/dumps/Test_terminal_all_ansi_colors.dump 2019-04-13 13:09:33.742938843 +0200
+***************
+*** 1,4 ****
+! >A+0#0000001#e0e0e08@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#af5f00255#ffffff0@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#0000001@1|I+0#6c6c6c255#ffffff16@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#af5f00255@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#6c6c6c255@1| +0#0000000#ffffff0@42
+ @2| +0#4040ff13&@72
+ |~| @73
+ |~| @73
+--- 1,4 ----
+! >A+0#0000001#e0e0e08@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#af5f00255#ffff4012@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#0000001@1|I+0#6c6c6c255#ffffff16@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#af5f00255@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#6c6c6c255@1| +0#0000000#ffffff0@42
+ @2| +0#4040ff13&@72
+ |~| @73
+ |~| @73
+*** ../vim-8.1.1161/src/version.c 2019-04-12 22:27:21.632436663 +0200
+--- src/version.c 2019-04-13 13:09:01.875100170 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1162,
+ /**/
+
+--
+XML is a nice language for computers. Not for humans.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1163 b/data/vim/patches/8.1.1163
new file mode 100644
index 000000000..53120dd0a
--- /dev/null
+++ b/data/vim/patches/8.1.1163
@@ -0,0 +1,48 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1163
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1163
+Problem: Codecov does not report all the coverage information.
+Solution: Make a second run with the nested execution output, expect that
+ Codecov will merge the results.
+Files: .travis.yml
+
+
+*** ../vim-8.1.1162/.travis.yml 2019-04-11 20:14:52.448664389 +0200
+--- .travis.yml 2019-04-13 13:42:38.125213762 +0200
+***************
+*** 170,175 ****
+--- 170,178 ----
+ - |
+ if [[ "${COVERAGE}" = "yes" ]]; then
+ (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
++ # Also do this for nested executions, codecov will merge the results.
++ mv "${SRCDIR}"/testdir/nested/* "${SRCDIR}"/objects
++ (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
+ fi
+
+ # vim:set sts=2 sw=2 tw=0 et:
+*** ../vim-8.1.1162/src/version.c 2019-04-13 13:13:50.837638962 +0200
+--- src/version.c 2019-04-13 13:43:49.544876305 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1163,
+ /**/
+
+--
+Two fish in a tank. One says to the other:
+"Do you know how to drive this thing?"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1164 b/data/vim/patches/8.1.1164
new file mode 100644
index 000000000..f8fef8156
--- /dev/null
+++ b/data/vim/patches/8.1.1164
@@ -0,0 +1,109 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1164
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1164
+Problem: Gettitle test is failing when server name differs. (Kenta Sato)
+Solution: Accept "VIM1" when 'autoservername' is used. (Dominique Pelle,
+ closes #4250, closes #4249)
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1163/src/testdir/test_terminal.vim 2019-04-13 13:13:50.837638962 +0200
+--- src/testdir/test_terminal.vim 2019-04-13 14:19:54.891202354 +0200
+***************
+*** 337,343 ****
+ call VerifyScreenDump(buf, 'Test_terminal_01', {})
+
+ silent !echo 'one more line' >>Xtext
+! " Sceen will not change, move cursor to get a different dump
+ call term_sendkeys(buf, "k")
+ call VerifyScreenDump(buf, 'Test_terminal_02', {})
+
+--- 337,343 ----
+ call VerifyScreenDump(buf, 'Test_terminal_01', {})
+
+ silent !echo 'one more line' >>Xtext
+! " Screen will not change, move cursor to get a different dump
+ call term_sendkeys(buf, "k")
+ call VerifyScreenDump(buf, 'Test_terminal_02', {})
+
+***************
+*** 1596,1602 ****
+ set termwinsize=
+ endfunc
+
+! func Test_terminal_termwinsize_mininmum()
+ set termwinsize=10*50
+ vsplit
+ let buf = Run_shell_in_terminal({})
+--- 1596,1602 ----
+ set termwinsize=
+ endfunc
+
+! func Test_terminal_termwinsize_minimum()
+ set termwinsize=10*50
+ vsplit
+ let buf = Run_shell_in_terminal({})
+***************
+*** 1903,1909 ****
+ endif
+
+ let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'])
+! call WaitForAssert({-> assert_equal('[No Name] - VIM', term_gettitle(term)) })
+
+ call term_sendkeys(term, ":e Xfoo\r")
+ call WaitForAssert({-> assert_match('Xfoo (.*[/\\]testdir) - VIM', term_gettitle(term)) })
+--- 1903,1913 ----
+ endif
+
+ let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'])
+! if has('autoservername')
+! call WaitForAssert({-> assert_equal('[No Name] - VIM1', term_gettitle(term)) })
+! else
+! call WaitForAssert({-> assert_equal('[No Name] - VIM', term_gettitle(term)) })
+! endif
+
+ call term_sendkeys(term, ":e Xfoo\r")
+ call WaitForAssert({-> assert_match('Xfoo (.*[/\\]testdir) - VIM', term_gettitle(term)) })
+***************
+*** 1963,1969 ****
+ let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
+
+ " Position must be bigger than the getwinpos() result of Vim itself.
+! " The calcuation in the console assumes a 10 x 7 character cell.
+ " In the GUI it can be more, let's assume a 20 x 14 cell.
+ " And then add 100 / 200 tolerance.
+ let [xroot, yroot] = getwinpos()
+--- 1967,1973 ----
+ let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
+
+ " Position must be bigger than the getwinpos() result of Vim itself.
+! " The calculation in the console assumes a 10 x 7 character cell.
+ " In the GUI it can be more, let's assume a 20 x 14 cell.
+ " And then add 100 / 200 tolerance.
+ let [xroot, yroot] = getwinpos()
+*** ../vim-8.1.1163/src/version.c 2019-04-13 13:44:27.964693890 +0200
+--- src/version.c 2019-04-13 14:19:28.147401939 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1164,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+269. You wonder how you can make your dustbin produce Sesame Street's
+ Oscar's the Garbage Monster song when you empty 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.1165 b/data/vim/patches/8.1.1165
new file mode 100644
index 000000000..8e575bd06
--- /dev/null
+++ b/data/vim/patches/8.1.1165
@@ -0,0 +1,173 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1165
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1165
+Problem: No test for mouse clicks in the terminal tabpage line.
+Solution: Add a test. (Dominique Pelle, closes #4247). Also init
+ TabPageIdxs[], in case it's used before a redraw.
+Files: src/screen.c, src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1164/src/screen.c 2019-04-04 13:28:41.201589932 +0200
+--- src/screen.c 2019-04-13 14:47:58.600353953 +0200
+***************
+*** 8639,8644 ****
+--- 8639,8656 ----
+ }
+
+ /*
++ * Init TabPageIdxs[] to zero: Clicking outside of tabs has no effect.
++ */
++ static void
++ clear_TabPageIdxs(void)
++ {
++ int scol;
++
++ for (scol = 0; scol < Columns; ++scol)
++ TabPageIdxs[scol] = 0;
++ }
++
++ /*
+ * screen_valid - allocate screen buffers if size changed
+ * If "doclear" is TRUE: clear screen if it has been resized.
+ * Returns TRUE if there is a valid screen to write to.
+***************
+*** 8899,8905 ****
+ must_redraw = CLEAR; /* need to clear the screen later */
+ if (doclear)
+ screenclear2();
+-
+ #ifdef FEAT_GUI
+ else if (gui.in_use
+ && !gui.starting
+--- 8911,8916 ----
+***************
+*** 8919,8924 ****
+--- 8930,8936 ----
+ msg_col = Columns - 1; /* put cursor at last column */
+ }
+ #endif
++ clear_TabPageIdxs();
+
+ entered = FALSE;
+ --RedrawingDisabled;
+***************
+*** 10435,10444 ****
+ return;
+
+ #if defined(FEAT_STL_OPT)
+!
+! /* Init TabPageIdxs[] to zero: Clicking outside of tabs has no effect. */
+! for (scol = 0; scol < Columns; ++scol)
+! TabPageIdxs[scol] = 0;
+
+ /* Use the 'tabline' option if it's set. */
+ if (*p_tal != NUL)
+--- 10447,10453 ----
+ return;
+
+ #if defined(FEAT_STL_OPT)
+! clear_TabPageIdxs();
+
+ /* Use the 'tabline' option if it's set. */
+ if (*p_tal != NUL)
+*** ../vim-8.1.1164/src/testdir/test_termcodes.vim 2019-04-12 21:42:48.692539315 +0200
+--- src/testdir/test_termcodes.vim 2019-04-13 14:50:27.563448008 +0200
+***************
+*** 165,171 ****
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+! set mouse=a term=xterm
+
+ for ttymouse_val in ['xterm', 'sgr']
+ exe 'set ttymouse=' . ttymouse_val
+--- 165,172 ----
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+! let save_laststatus = &laststatus
+! set mouse=a term=xterm laststatus=2
+
+ for ttymouse_val in ['xterm', 'sgr']
+ exe 'set ttymouse=' . ttymouse_val
+***************
+*** 195,200 ****
+--- 196,248 ----
+ endfor
+
+ let &mouse = save_mouse
++ let &term = save_term
++ let &ttymouse = save_ttymouse
++ let &laststatus = save_laststatus
++ endfunc
++
++ func Test_xterm_mouse_click_tab()
++ let save_mouse = &mouse
++ let save_term = &term
++ let save_ttymouse = &ttymouse
++ set mouse=a term=xterm
++ let row = 1
++
++ for ttymouse_val in ['xterm', 'sgr']
++ exe 'set ttymouse=' . ttymouse_val
++ e Xfoo
++ tabnew Xbar
++
++ let a = split(execute(':tabs'), "\n")
++ call assert_equal(['Tab page 1',
++ \ ' Xfoo',
++ \ 'Tab page 2',
++ \ '> Xbar'], a)
++
++ " Test clicking on tab names in the tabline at the top.
++ let col = 2
++ redraw!
++ call MouseLeftClick(row, col)
++ call MouseLeftRelease(row, col)
++ let a = split(execute(':tabs'), "\n")
++ call assert_equal(['Tab page 1',
++ \ '> Xfoo',
++ \ 'Tab page 2',
++ \ ' Xbar'], a)
++
++ let col = 9
++ call MouseLeftClick(row, col)
++ call MouseLeftRelease(row, col)
++ let a = split(execute(':tabs'), "\n")
++ call assert_equal(['Tab page 1',
++ \ ' Xfoo',
++ \ 'Tab page 2',
++ \ '> Xbar'], a)
++
++ %bwipe!
++ endfor
++
++ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
+ endfunc
+*** ../vim-8.1.1164/src/version.c 2019-04-13 14:21:15.846609628 +0200
+--- src/version.c 2019-04-13 14:52:28.490713831 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1165,
+ /**/
+
+--
+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.1166 b/data/vim/patches/8.1.1166
new file mode 100644
index 000000000..30b6df683
--- /dev/null
+++ b/data/vim/patches/8.1.1166
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1166
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1166 (after 8.1.1164)
+Problem: Gettitle test can still fail when another Vim is running.
+Solution: Accept any server name number. (Dominique Pelle, closes #4252)
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1165/src/testdir/test_terminal.vim 2019-04-13 14:21:15.846609628 +0200
+--- src/testdir/test_terminal.vim 2019-04-13 20:37:36.925472198 +0200
+***************
+*** 1904,1917 ****
+
+ let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'])
+ if has('autoservername')
+! call WaitForAssert({-> assert_equal('[No Name] - VIM1', term_gettitle(term)) })
+ else
+ call WaitForAssert({-> assert_equal('[No Name] - VIM', term_gettitle(term)) })
+ endif
+
+- call term_sendkeys(term, ":e Xfoo\r")
+- call WaitForAssert({-> assert_match('Xfoo (.*[/\\]testdir) - VIM', term_gettitle(term)) })
+-
+ call term_sendkeys(term, ":set titlestring=foo\r")
+ call WaitForAssert({-> assert_equal('foo', term_gettitle(term)) })
+
+--- 1904,1918 ----
+
+ let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'])
+ if has('autoservername')
+! call WaitForAssert({-> assert_match('^\[No Name\] - VIM\d\+$', term_gettitle(term)) })
+! call term_sendkeys(term, ":e Xfoo\r")
+! call WaitForAssert({-> assert_match('^Xfoo (.*[/\\]testdir) - VIM\d\+$', term_gettitle(term)) })
+ else
+ call WaitForAssert({-> assert_equal('[No Name] - VIM', term_gettitle(term)) })
++ call term_sendkeys(term, ":e Xfoo\r")
++ call WaitForAssert({-> assert_match('^Xfoo (.*[/\\]testdir) - VIM$', term_gettitle(term)) })
+ endif
+
+ call term_sendkeys(term, ":set titlestring=foo\r")
+ call WaitForAssert({-> assert_equal('foo', term_gettitle(term)) })
+
+*** ../vim-8.1.1165/src/version.c 2019-04-13 14:53:10.886456655 +0200
+--- src/version.c 2019-04-13 20:37:25.821535670 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1166,
+ /**/
+
+--
+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.1167 b/data/vim/patches/8.1.1167
new file mode 100644
index 000000000..ccce2dfc3
--- /dev/null
+++ b/data/vim/patches/8.1.1167
@@ -0,0 +1,187 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1167
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1167
+Problem: No test for closing tab by click in tabline.
+Solution: Add a test. Also fix that dragging window separator could fail in
+ a large terminal. (Dominique Pelle, closes #4253)
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1166/src/testdir/test_termcodes.vim 2019-04-13 14:53:10.886456655 +0200
+--- src/testdir/test_termcodes.vim 2019-04-13 22:10:53.844130253 +0200
+***************
+*** 119,158 ****
+ let row = rowseparator
+ let col = 1
+
+! if ttymouse_val ==# 'xterm' && row > 223
+! " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
+! continue
+ endif
+-
+- call MouseLeftClick(row, col)
+-
+- let row -= 1
+- call MouseLeftDrag(row, col)
+- call assert_equal(rowseparator - 1, winheight(0) + 1)
+- let row += 1
+- call MouseLeftDrag(row, col)
+- call assert_equal(rowseparator, winheight(0) + 1)
+- call MouseLeftRelease(row, col)
+- call assert_equal(rowseparator, winheight(0) + 1)
+-
+ bwipe!
+
+ " Split vertically and test dragging the vertical window separator.
+ vsplit
+ let colseparator = winwidth(0) + 1
+-
+ let row = 1
+ let col = colseparator
+- call MouseLeftClick(row, col)
+- let col -= 1
+- call MouseLeftDrag(row, col)
+- call assert_equal(colseparator - 1, winwidth(0) + 1)
+- let col += 1
+- call MouseLeftDrag(row, col)
+- call assert_equal(colseparator, winwidth(0) + 1)
+- call MouseLeftRelease(row, col)
+- call assert_equal(colseparator, winwidth(0) + 1)
+
+ bwipe!
+ endfor
+
+--- 119,156 ----
+ let row = rowseparator
+ let col = 1
+
+! " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
+! if ttymouse_val !=# 'xterm' || row <= 223
+! call MouseLeftClick(row, col)
+! let row -= 1
+! call MouseLeftDrag(row, col)
+! call assert_equal(rowseparator - 1, winheight(0) + 1)
+! let row += 1
+! call MouseLeftDrag(row, col)
+! call assert_equal(rowseparator, winheight(0) + 1)
+! call MouseLeftRelease(row, col)
+! call assert_equal(rowseparator, winheight(0) + 1)
+ endif
+ bwipe!
+
+ " Split vertically and test dragging the vertical window separator.
+ vsplit
+ let colseparator = winwidth(0) + 1
+ let row = 1
+ let col = colseparator
+
++ " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
++ if ttymouse_val !=# 'xterm' || col <= 223
++ call MouseLeftClick(row, col)
++ let col -= 1
++ call MouseLeftDrag(row, col)
++ call assert_equal(colseparator - 1, winwidth(0) + 1)
++ let col += 1
++ call MouseLeftDrag(row, col)
++ call assert_equal(colseparator, winwidth(0) + 1)
++ call MouseLeftRelease(row, col)
++ call assert_equal(colseparator, winwidth(0) + 1)
++ endif
+ bwipe!
+ endfor
+
+***************
+*** 221,227 ****
+
+ " Test clicking on tab names in the tabline at the top.
+ let col = 2
+! redraw!
+ call MouseLeftClick(row, col)
+ call MouseLeftRelease(row, col)
+ let a = split(execute(':tabs'), "\n")
+--- 219,225 ----
+
+ " Test clicking on tab names in the tabline at the top.
+ let col = 2
+! redraw
+ call MouseLeftClick(row, col)
+ call MouseLeftRelease(row, col)
+ let a = split(execute(':tabs'), "\n")
+***************
+*** 241,246 ****
+--- 239,289 ----
+
+ %bwipe!
+ endfor
++
++ let &mouse = save_mouse
++ let &term = save_term
++ let &ttymouse = save_ttymouse
++ endfunc
++
++ func Test_xterm_mouse_click_X_to_close_tab()
++ let save_mouse = &mouse
++ let save_term = &term
++ let save_ttymouse = &ttymouse
++ set mouse=a term=xterm
++ let row = 1
++ let col = &columns
++
++ for ttymouse_val in ['xterm', 'sgr']
++ if ttymouse_val ==# 'xterm' && col > 223
++ " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
++ continue
++ endif
++ exe 'set ttymouse=' . ttymouse_val
++ e Xtab1
++ tabnew Xtab2
++ tabnew Xtab3
++ tabn 2
++
++ let a = split(execute(':tabs'), "\n")
++ call assert_equal(['Tab page 1',
++ \ ' Xtab1',
++ \ 'Tab page 2',
++ \ '> Xtab2',
++ \ 'Tab page 3',
++ \ ' Xtab3'], a)
++
++ " Click on "X" in tabline to close current tab i.e. Xtab2.
++ redraw
++ call MouseLeftClick(row, col)
++ call MouseLeftRelease(row, col)
++ let a = split(execute(':tabs'), "\n")
++ call assert_equal(['Tab page 1',
++ \ ' Xtab1',
++ \ 'Tab page 2',
++ \ '> Xtab3'], a)
++
++ %bwipe!
++ endfor
+
+ let &mouse = save_mouse
+ let &term = save_term
+*** ../vim-8.1.1166/src/version.c 2019-04-13 20:38:53.745034749 +0200
+--- src/version.c 2019-04-13 22:12:41.423186715 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1167,
+ /**/
+
+--
+Women are probably the main cause of free software starvation.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1168 b/data/vim/patches/8.1.1168
new file mode 100644
index 000000000..52ab8e52f
--- /dev/null
+++ b/data/vim/patches/8.1.1168
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1168
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1168
+Problem: Not all screen update code of the terminal window is executed in
+ tests.
+Solution: Redraw before taking a screenshot.
+Files: src/testdir/screendump.vim
+
+
+*** ../vim-8.1.1167/src/testdir/screendump.vim 2019-04-13 13:13:50.837638962 +0200
+--- src/testdir/screendump.vim 2019-04-13 22:32:59.329700913 +0200
+***************
+*** 113,118 ****
+--- 113,122 ----
+ let reference = 'dumps/' . a:filename . '.dump'
+ let testfile = 'failed/' . a:filename . '.dump'
+
++ " Redraw to execut the code that updates the screen. Otherwise we get the
++ " text and attributes only from the internal buffer.
++ redraw
++
+ let did_mkdir = 0
+ if !isdirectory('failed')
+ let did_mkdir = 1
+*** ../vim-8.1.1167/src/version.c 2019-04-13 22:13:19.630859265 +0200
+--- src/version.c 2019-04-13 22:34:30.537026822 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1168,
+ /**/
+
+--
+Edison's greatest achievement came in 1879, when he invented the
+electric company. Edison's design was a brilliant adaptation of the
+simple electrical circuit: the electric company sends electricity
+through a wire to a customer, then immediately gets the electricity
+back through another wire
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1169 b/data/vim/patches/8.1.1169
new file mode 100644
index 000000000..d8f2ba3ab
--- /dev/null
+++ b/data/vim/patches/8.1.1169
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1169
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1169
+Problem: Writing coverage info in a separate dir is not needed.
+Solution: Revert the changes to use a separate directory.
+Files: .travis.yml, src/testdir/screendump.vim
+
+
+*** ../vim-8.1.1168/.travis.yml 2019-04-13 13:44:27.964693890 +0200
+--- .travis.yml 2019-04-13 22:40:41.438448016 +0200
+***************
+*** 170,178 ****
+ - |
+ if [[ "${COVERAGE}" = "yes" ]]; then
+ (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
+- # Also do this for nested executions, codecov will merge the results.
+- mv "${SRCDIR}"/testdir/nested/* "${SRCDIR}"/objects
+- (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
+ fi
+
+ # vim:set sts=2 sw=2 tw=0 et:
+--- 170,175 ----
+*** ../vim-8.1.1168/src/testdir/screendump.vim 2019-04-13 22:35:24.232630781 +0200
+--- src/testdir/screendump.vim 2019-04-13 22:41:38.110170000 +0200
+***************
+*** 55,69 ****
+ let cmd = GetVimCommandClean()
+
+ " Add -v to have gvim run in the terminal (if possible)
+- " The GCOV_ environment variables cause the Vim running in the terminal to
+- " write the coverage information in the "nested" directory, to avoid two Vim
+- " instances try to write to the same coverage info file.
+ let cmd .= ' -v ' . a:arguments
+ let buf = term_start(cmd, {
+ \ 'curwin': 1,
+ \ 'term_rows': rows,
+ \ 'term_cols': cols,
+- \ 'env': {'GCOV_PREFIX': 'nested', 'GCOV_PREFIX_STRIP': 99},
+ \ })
+ if &termwinsize == ''
+ " in the GUI we may end up with a different size, try to set it.
+--- 55,65 ----
+*** ../vim-8.1.1168/src/version.c 2019-04-13 22:35:24.232630781 +0200
+--- src/version.c 2019-04-13 22:44:21.029306713 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1169,
+ /**/
+
+--
+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.1170 b/data/vim/patches/8.1.1170
new file mode 100644
index 000000000..624b5b8cd
--- /dev/null
+++ b/data/vim/patches/8.1.1170
@@ -0,0 +1,102 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1170
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1170
+Problem: Terminal ANSI color test does not cover all colors.
+Solution: Use the color number, the name is not always resulting in an ANSI
+ color when t_Co is 256.
+Files: src/testdir/test_terminal.vim,
+ src/testdir/dumps/Test_terminal_all_ansi_colors.dump
+
+
+*** ../vim-8.1.1169/src/testdir/test_terminal.vim 2019-04-13 20:38:53.745034749 +0200
+--- src/testdir/test_terminal.vim 2019-04-13 23:14:17.605577009 +0200
+***************
+*** 1492,1513 ****
+ " Use all the ANSI colors.
+ call writefile([
+ \ 'call setline(1, "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPP")',
+! \ 'hi Tblack ctermfg=Black ctermbg=Lightgrey',
+! \ 'hi Tdarkred ctermfg=Darkred ctermbg=Red',
+! \ 'hi Tdarkgreen ctermfg=Darkgreen ctermbg=Green',
+! \ 'hi Tbrown ctermfg=Brown ctermbg=Yellow',
+! \ 'hi Tdarkblue ctermfg=Darkblue ctermbg=Blue',
+! \ 'hi Tdarkmagenta ctermfg=Darkmagenta ctermbg=Magenta',
+! \ 'hi Tdarkcyan ctermfg=Darkcyan ctermbg=Cyan',
+! \ 'hi Tlightgrey ctermfg=Lightgrey ctermbg=Black',
+! \ 'hi Tdarkgrey ctermfg=Darkgrey ctermbg=White',
+! \ 'hi Tred ctermfg=Red ctermbg=Darkred',
+! \ 'hi Tgreen ctermfg=Green ctermbg=Darkgreen',
+! \ 'hi Tyellow ctermfg=Yellow ctermbg=Brown',
+! \ 'hi Tblue ctermfg=Blue ctermbg=Darkblue',
+! \ 'hi Tmagenta ctermfg=Magenta ctermbg=Darkmagenta',
+! \ 'hi Tcyan ctermfg=Cyan ctermbg=Darkcyan',
+! \ 'hi Twhite ctermfg=White ctermbg=Darkgrey',
+ \ '',
+ \ 'call matchadd("Tblack", "A")',
+ \ 'call matchadd("Tdarkred", "B")',
+--- 1492,1513 ----
+ " Use all the ANSI colors.
+ call writefile([
+ \ 'call setline(1, "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPP")',
+! \ 'hi Tblack ctermfg=0 ctermbg=8',
+! \ 'hi Tdarkred ctermfg=1 ctermbg=9',
+! \ 'hi Tdarkgreen ctermfg=2 ctermbg=10',
+! \ 'hi Tbrown ctermfg=3 ctermbg=11',
+! \ 'hi Tdarkblue ctermfg=4 ctermbg=12',
+! \ 'hi Tdarkmagenta ctermfg=5 ctermbg=13',
+! \ 'hi Tdarkcyan ctermfg=6 ctermbg=14',
+! \ 'hi Tlightgrey ctermfg=7 ctermbg=15',
+! \ 'hi Tdarkgrey ctermfg=8 ctermbg=0',
+! \ 'hi Tred ctermfg=9 ctermbg=1',
+! \ 'hi Tgreen ctermfg=10 ctermbg=2',
+! \ 'hi Tyellow ctermfg=11 ctermbg=3',
+! \ 'hi Tblue ctermfg=12 ctermbg=4',
+! \ 'hi Tmagenta ctermfg=13 ctermbg=5',
+! \ 'hi Tcyan ctermfg=14 ctermbg=6',
+! \ 'hi Twhite ctermfg=15 ctermbg=7',
+ \ '',
+ \ 'call matchadd("Tblack", "A")',
+ \ 'call matchadd("Tdarkred", "B")',
+*** ../vim-8.1.1169/src/testdir/dumps/Test_terminal_all_ansi_colors.dump 2019-04-13 13:13:50.837638962 +0200
+--- src/testdir/dumps/Test_terminal_all_ansi_colors.dump 2019-04-13 23:14:40.085509427 +0200
+***************
+*** 1,4 ****
+! >A+0#0000001#e0e0e08@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#af5f00255#ffff4012@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#0000001@1|I+0#6c6c6c255#ffffff16@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#af5f00255@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#6c6c6c255@1| +0#0000000#ffffff0@42
+ @2| +0#4040ff13&@72
+ |~| @73
+ |~| @73
+--- 1,4 ----
+! >A+0#0000001#8080809@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#e0e0004#ffff4012@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#ffffff16@1|I+0#8080809#0000001@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#e0e0004@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#e0e0e08@1| +0#0000000#ffffff0@42
+ @2| +0#4040ff13&@72
+ |~| @73
+ |~| @73
+*** ../vim-8.1.1169/src/version.c 2019-04-13 22:44:48.325154165 +0200
+--- src/version.c 2019-04-13 23:17:36.124879899 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1170,
+ /**/
+
+--
+ We're knights of the round table
+ We dance whene'er we're able
+ We do routines and chorus scenes
+ With footwork impeccable.
+ We dine well here in Camelot
+ We eat ham and jam and spam a lot.
+ "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.1171 b/data/vim/patches/8.1.1171
new file mode 100644
index 000000000..d65cb93a2
--- /dev/null
+++ b/data/vim/patches/8.1.1171
@@ -0,0 +1,185 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1171
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1171
+Problem: Statusline test could fail in large terminal.
+Solution: Make the test work on a huge terminal. (Dominique Pelle,
+ closes #4255)
+Files: src/testdir/test_statusline.vim
+
+
+*** ../vim-8.1.1170/src/testdir/test_statusline.vim 2017-10-26 18:10:36.000000000 +0200
+--- src/testdir/test_statusline.vim 2019-04-14 13:21:11.700906371 +0200
+***************
+*** 62,84 ****
+ only
+ set laststatus=2
+ set splitbelow
+! call setline(1, range(1, 200))
+
+ " %b: Value of character under cursor.
+ " %B: As above, in hexadecimal.
+! call cursor(180, 2)
+ set statusline=%b,%B
+! call assert_match('^56,38\s*$', s:get_statusline())
+
+ " %o: Byte number in file of byte under cursor, first byte is 1.
+ " %O: As above, in hexadecimal.
+ set statusline=%o,%O
+ set fileformat=dos
+! call assert_match('^789,315\s*$', s:get_statusline())
+ set fileformat=mac
+! call assert_match('^610,262\s*$', s:get_statusline())
+ set fileformat=unix
+! call assert_match('^610,262\s*$', s:get_statusline())
+ set fileformat&
+
+ " %f: Path to the file in the buffer, as typed or relative to current dir.
+--- 62,84 ----
+ only
+ set laststatus=2
+ set splitbelow
+! call setline(1, range(1, 10000))
+
+ " %b: Value of character under cursor.
+ " %B: As above, in hexadecimal.
+! call cursor(9000, 1)
+ set statusline=%b,%B
+! call assert_match('^57,39\s*$', s:get_statusline())
+
+ " %o: Byte number in file of byte under cursor, first byte is 1.
+ " %O: As above, in hexadecimal.
+ set statusline=%o,%O
+ set fileformat=dos
+! call assert_match('^52888,CE98\s*$', s:get_statusline())
+ set fileformat=mac
+! call assert_match('^43889,AB71\s*$', s:get_statusline())
+ set fileformat=unix
+! call assert_match('^43889,AB71\s*$', s:get_statusline())
+ set fileformat&
+
+ " %f: Path to the file in the buffer, as typed or relative to current dir.
+***************
+*** 112,118 ****
+ " %L: Number of line in buffer.
+ " %c: Column number.
+ set statusline=%l/%L,%c
+! call assert_match('^180/200,2\s*$', s:get_statusline())
+
+ " %m: Modified flag, text is "[+]", "[-]" if 'modifiable' is off.
+ " %M: Modified flag, text is ",+" or ",-".
+--- 112,118 ----
+ " %L: Number of line in buffer.
+ " %c: Column number.
+ set statusline=%l/%L,%c
+! call assert_match('^9000/10000,1\s*$', s:get_statusline())
+
+ " %m: Modified flag, text is "[+]", "[-]" if 'modifiable' is off.
+ " %M: Modified flag, text is ",+" or ",-".
+***************
+*** 136,142 ****
+ call assert_match('^0,Top\s*$', s:get_statusline())
+ norm G
+ call assert_match('^100,Bot\s*$', s:get_statusline())
+! 180
+ " Don't check the exact percentage as it depends on the window size
+ call assert_match('^90,\(Top\|Bot\|\d\+%\)\s*$', s:get_statusline())
+
+--- 136,142 ----
+ call assert_match('^0,Top\s*$', s:get_statusline())
+ norm G
+ call assert_match('^100,Bot\s*$', s:get_statusline())
+! 9000
+ " Don't check the exact percentage as it depends on the window size
+ call assert_match('^90,\(Top\|Bot\|\d\+%\)\s*$', s:get_statusline())
+
+***************
+*** 165,171 ****
+
+ " %v: Virtual column number.
+ " %V: Virtual column number as -{num}. Not displayed if equal to 'c'.
+! call cursor(180, 2)
+ set statusline=%v,%V
+ call assert_match('^2,\s*$', s:get_statusline())
+ set virtualedit=all
+--- 165,171 ----
+
+ " %v: Virtual column number.
+ " %V: Virtual column number as -{num}. Not displayed if equal to 'c'.
+! call cursor(9000, 2)
+ set statusline=%v,%V
+ call assert_match('^2,\s*$', s:get_statusline())
+ set virtualedit=all
+***************
+*** 195,214 ****
+
+ " Test min/max width, leading zeroes, left/right justify.
+ set statusline=%04B
+! call cursor(180, 2)
+! call assert_match('^0038\s*$', s:get_statusline())
+ set statusline=#%4B#
+! call assert_match('^# 38#\s*$', s:get_statusline())
+ set statusline=#%-4B#
+! call assert_match('^#38 #\s*$', s:get_statusline())
+ set statusline=%.6f
+ call assert_match('^<sline\s*$', s:get_statusline())
+
+ " %<: Where to truncate.
+! exe 'set statusline=a%<b' . repeat('c', 1000) . 'd'
+! call assert_match('^a<c*d$', s:get_statusline())
+! exe 'set statusline=a' . repeat('b', 1000) . '%<c'
+! call assert_match('^ab*>$', s:get_statusline())
+
+ "%{: Evaluate expression between '%{' and '}' and substitute result.
+ syntax on
+--- 195,220 ----
+
+ " Test min/max width, leading zeroes, left/right justify.
+ set statusline=%04B
+! call cursor(9000, 1)
+! call assert_match('^0039\s*$', s:get_statusline())
+ set statusline=#%4B#
+! call assert_match('^# 39#\s*$', s:get_statusline())
+ set statusline=#%-4B#
+! call assert_match('^#39 #\s*$', s:get_statusline())
+ set statusline=%.6f
+ call assert_match('^<sline\s*$', s:get_statusline())
+
+ " %<: Where to truncate.
+! " First check with when %< should not truncate with many columns
+! exe 'set statusline=a%<b' . repeat('c', &columns - 3) . 'd'
+! call assert_match('^abc\+d$', s:get_statusline())
+! exe 'set statusline=a' . repeat('b', &columns - 2) . '%<c'
+! call assert_match('^ab\+c$', s:get_statusline())
+! " Then check when %< should truncate when there with too few columns.
+! exe 'set statusline=a%<b' . repeat('c', &columns - 2) . 'd'
+! call assert_match('^a<c\+d$', s:get_statusline())
+! exe 'set statusline=a' . repeat('b', &columns - 1) . '%<c'
+! call assert_match('^ab\+>$', s:get_statusline())
+
+ "%{: Evaluate expression between '%{' and '}' and substitute result.
+ syntax on
+*** ../vim-8.1.1170/src/version.c 2019-04-13 23:18:18.204706885 +0200
+--- src/version.c 2019-04-14 13:23:02.552186269 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1171,
+ /**/
+
+--
+GOD: That is your purpose Arthur ... the Quest for the 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.1172 b/data/vim/patches/8.1.1172
new file mode 100644
index 000000000..5e36746d7
--- /dev/null
+++ b/data/vim/patches/8.1.1172
@@ -0,0 +1,101 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1172
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1172
+Problem: Cursor properties were not fully tested.
+Solution: Add a test. (Dominique Pelle, closes #4256)
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1171/src/testdir/test_terminal.vim 2019-04-13 23:18:18.204706885 +0200
+--- src/testdir/test_terminal.vim 2019-04-14 14:12:00.814528816 +0200
+***************
+*** 1892,1897 ****
+--- 1892,1954 ----
+ call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) })
+ endfunc
+
++ func Test_term_getcursor()
++ if !has('unix')
++ return
++ endif
++ let buf = Run_shell_in_terminal({})
++
++ " Wait for the shell to display a prompt.
++ call WaitForAssert({-> assert_notequal('', term_getline(buf, 1))})
++
++ " Hide the cursor.
++ call term_sendkeys(buf, "echo -e '\\033[?25l'\r")
++ call WaitForAssert({-> assert_equal(0, term_getcursor(buf)[2].visible)})
++
++ " Show the cursor.
++ call term_sendkeys(buf, "echo -e '\\033[?25h'\r")
++ call WaitForAssert({-> assert_equal(1, term_getcursor(buf)[2].visible)})
++
++ " Change color of cursor.
++ call WaitForAssert({-> assert_equal('', term_getcursor(buf)[2].color)})
++ call term_sendkeys(buf, "echo -e '\\033]12;blue\\007'\r")
++ call WaitForAssert({-> assert_equal('blue', term_getcursor(buf)[2].color)})
++ call term_sendkeys(buf, "echo -e '\\033]12;green\\007'\r")
++ call WaitForAssert({-> assert_equal('green', term_getcursor(buf)[2].color)})
++
++ " Make cursor a blinking block.
++ call term_sendkeys(buf, "echo -e '\\033[1 q'\r")
++ call WaitForAssert({-> assert_equal([1, 1],
++ \ [term_getcursor(buf)[2].blink, term_getcursor(buf)[2].shape])})
++
++ " Make cursor a steady block.
++ call term_sendkeys(buf, "echo -e '\\033[2 q'\r")
++ call WaitForAssert({-> assert_equal([0, 1],
++ \ [term_getcursor(buf)[2].blink, term_getcursor(buf)[2].shape])})
++
++ " Make cursor a blinking underline.
++ call term_sendkeys(buf, "echo -e '\\033[3 q'\r")
++ call WaitForAssert({-> assert_equal([1, 2],
++ \ [term_getcursor(buf)[2].blink, term_getcursor(buf)[2].shape])})
++
++ " Make cursor a steady underline.
++ call term_sendkeys(buf, "echo -e '\\033[4 q'\r")
++ call WaitForAssert({-> assert_equal([0, 2],
++ \ [term_getcursor(buf)[2].blink, term_getcursor(buf)[2].shape])})
++
++ " Make cursor a blinking vertical bar.
++ call term_sendkeys(buf, "echo -e '\\033[5 q'\r")
++ call WaitForAssert({-> assert_equal([1, 3],
++ \ [term_getcursor(buf)[2].blink, term_getcursor(buf)[2].shape])})
++
++ " Make cursor a steady vertical bar.
++ call term_sendkeys(buf, "echo -e '\\033[6 q'\r")
++ call WaitForAssert({-> assert_equal([0, 3],
++ \ [term_getcursor(buf)[2].blink, term_getcursor(buf)[2].shape])})
++
++ call Stop_shell_in_terminal(buf)
++ endfunc
++
+ func Test_term_gettitle()
+ " term_gettitle() returns an empty string for a non-terminal buffer
+ " and for a non-existing buffer.
+*** ../vim-8.1.1171/src/version.c 2019-04-14 13:23:36.911963919 +0200
+--- src/version.c 2019-04-14 14:08:16.615451205 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1172,
+ /**/
+
+--
+There is a fine line between courage and foolishness.
+Unfortunately, it's not a fence.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1173 b/data/vim/patches/8.1.1173
new file mode 100644
index 000000000..a00f8eccf
--- /dev/null
+++ b/data/vim/patches/8.1.1173
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1173
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1173
+Problem: Suspend test has duplicated lines.
+Solution: Use a function.
+Files: src/testdir/test_suspend.vim
+
+
+*** ../vim-8.1.1172/src/testdir/test_suspend.vim 2019-01-17 22:13:50.588531539 +0100
+--- src/testdir/test_suspend.vim 2019-04-14 14:11:42.682607727 +0200
+***************
+*** 2,7 ****
+--- 2,21 ----
+
+ source shared.vim
+
++ func CheckSuspended(buf, fileExists)
++ call WaitForAssert({-> assert_match('[$#] $', term_getline(a:buf, '.'))})
++
++ if a:fileExists
++ call assert_equal(['foo'], readfile('Xfoo'))
++ else
++ " Without 'autowrite', buffer should not be written.
++ call assert_equal(0, filereadable('Xfoo'))
++ endif
++
++ call term_sendkeys(a:buf, "fg\<CR>\<C-L>")
++ call WaitForAssert({-> assert_equal(' 1 foo', term_getline(a:buf, '.'))})
++ endfunc
++
+ func Test_suspend()
+ if !has('terminal') || !executable('/bin/sh')
+ return
+***************
+*** 26,38 ****
+ \ "\<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.
+--- 40,46 ----
+ \ "\<C-Z>"]
+ " Suspend and wait for shell prompt.
+ call term_sendkeys(buf, suspend_cmd)
+! call CheckSuspended(buf, 0)
+ endfor
+
+ " Test that :suspend! with 'autowrite' writes content of buffers if modified.
+***************
+*** 40,49 ****
+ 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, '.'))})
+
+ " Quit gracefully to dump coverage information.
+ call term_sendkeys(buf, ":qall!\<CR>")
+--- 48,54 ----
+ call assert_equal(0, filereadable('Xfoo'))
+ call term_sendkeys(buf, ":suspend\<CR>")
+ " Wait for shell prompt.
+! call CheckSuspended(buf, 1)
+
+ " Quit gracefully to dump coverage information.
+ call term_sendkeys(buf, ":qall!\<CR>")
+*** ../vim-8.1.1172/src/version.c 2019-04-14 14:16:43.257228923 +0200
+--- src/version.c 2019-04-14 14:24:54.250772994 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1173,
+ /**/
+
+--
+MAN: You don't frighten us, English pig-dog! Go and boil your bottoms,
+ son of a silly person. I blow my nose on you, so-called Arthur-king,
+ you and your silly English K...kaniggets.
+ He puts hands to his ears and blows a raspberry.
+ "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.1174 b/data/vim/patches/8.1.1174
new file mode 100644
index 000000000..067c0e94b
--- /dev/null
+++ b/data/vim/patches/8.1.1174
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1174
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1174
+Problem: Cannot build with Ruby 1.8. (Tom G. Christensen)
+Solution: Include ruby/st.h. (Ozaki Kiichi, closes #4257)
+Files: src/if_ruby.c
+
+
+*** ../vim-8.1.1173/src/if_ruby.c 2019-03-30 18:46:57.352077376 +0100
+--- src/if_ruby.c 2019-04-14 19:32:16.590815373 +0200
+***************
+*** 118,125 ****
+ #ifdef RUBY19_OR_LATER
+ # include <ruby/encoding.h>
+ #endif
+
+! #undef off_t /* ruby defines off_t as _int64, Mingw uses long */
+ #undef EXTERN
+ #undef _
+
+--- 118,128 ----
+ #ifdef RUBY19_OR_LATER
+ # include <ruby/encoding.h>
+ #endif
++ #ifndef RUBY19_OR_LATER
++ # include <st.h> // for ST_STOP and ST_CONTINUE
++ #endif
+
+! #undef off_t // ruby defines off_t as _int64, Mingw uses long
+ #undef EXTERN
+ #undef _
+
+*** ../vim-8.1.1173/src/version.c 2019-04-14 14:31:07.040828452 +0200
+--- src/version.c 2019-04-14 19:33:30.346401011 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1174,
+ /**/
+
+--
+Ten bugs in the hand is better than one as yet undetected.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1175 b/data/vim/patches/8.1.1175
new file mode 100644
index 000000000..5e72660b0
--- /dev/null
+++ b/data/vim/patches/8.1.1175
@@ -0,0 +1,142 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1175
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1175
+Problem: No test for dragging a tab with the mouse and for creating a new
+ tab by double clicking in the tabline.
+Solution: Add two tests. (Dominique Pelle, closes #4258)
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1174/src/testdir/test_termcodes.vim 2019-04-13 22:13:19.630859265 +0200
+--- src/testdir/test_termcodes.vim 2019-04-15 20:52:39.616822464 +0200
+***************
+*** 289,291 ****
+--- 289,387 ----
+ let &term = save_term
+ let &ttymouse = save_ttymouse
+ endfunc
++
++ func Test_xterm_mouse_drag_to_move_tab()
++ let save_mouse = &mouse
++ let save_term = &term
++ let save_ttymouse = &ttymouse
++ " Set 'mousetime' to 1 to avoid recognizing a double-click in the loop
++ set mouse=a term=xterm mousetime=1
++ let row = 1
++
++ for ttymouse_val in ['xterm', 'sgr']
++ exe 'set ttymouse=' . ttymouse_val
++ e Xtab1
++ tabnew Xtab2
++
++ let a = split(execute(':tabs'), "\n")
++ call assert_equal(['Tab page 1',
++ \ ' Xtab1',
++ \ 'Tab page 2',
++ \ '> Xtab2'], a)
++ redraw
++
++ " Click in tab2 and drag it to tab1.
++ " Check getcharmod() to verify that click is not
++ " interpreted as a spurious double-click.
++ call MouseLeftClick(row, 10)
++ call assert_equal(0, getcharmod())
++ for col in [9, 8, 7, 6]
++ call MouseLeftDrag(row, col)
++ endfor
++ call MouseLeftRelease(row, col)
++ let a = split(execute(':tabs'), "\n")
++ call assert_equal(['Tab page 1',
++ \ '> Xtab2',
++ \ 'Tab page 2',
++ \ ' Xtab1'], a)
++
++ %bwipe!
++ endfor
++
++ let &mouse = save_mouse
++ let &term = save_term
++ let &ttymouse = save_ttymouse
++ set mousetime&
++ endfunc
++
++ func Test_xterm_mouse_double_click_to_create_tab()
++ let save_mouse = &mouse
++ let save_term = &term
++ let save_ttymouse = &ttymouse
++ " Set 'mousetime' to a small value, so that double-click works but we don't
++ " have to wait long to avoid a triple-click.
++ set mouse=a term=xterm mousetime=100
++ let row = 1
++ let col = 10
++
++ for ttymouse_val in ['xterm', 'sgr']
++ exe 'set ttymouse=' . ttymouse_val
++ e Xtab1
++ tabnew Xtab2
++
++ let a = split(execute(':tabs'), "\n")
++ call assert_equal(['Tab page 1',
++ \ ' Xtab1',
++ \ 'Tab page 2',
++ \ '> Xtab2'], a)
++
++ redraw
++ call MouseLeftClick(row, col)
++ " Check getcharmod() to verify that first click is not
++ " interpreted as a spurious double-click.
++ call assert_equal(0, getcharmod())
++ call MouseLeftRelease(row, col)
++ call MouseLeftClick(row, col)
++ call assert_equal(32, getcharmod()) " double-click
++ call MouseLeftRelease(row, col)
++ let a = split(execute(':tabs'), "\n")
++ call assert_equal(['Tab page 1',
++ \ ' Xtab1',
++ \ 'Tab page 2',
++ \ '> [No Name]',
++ \ 'Tab page 3',
++ \ ' Xtab2'], a)
++
++ if ttymouse_val !=# 'sgr'
++ " We need to sleep, or else MouseLeftClick() in next loop
++ " iteration will be interpreted as a spurious triple-click.
++ sleep 100m
++ endif
++ %bwipe!
++ endfor
++
++ let &mouse = save_mouse
++ let &term = save_term
++ let &ttymouse = save_ttymouse
++ set mousetime&
++ endfunc
+*** ../vim-8.1.1174/src/version.c 2019-04-14 19:42:09.411453809 +0200
+--- src/version.c 2019-04-15 20:55:20.927619813 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1175,
+ /**/
+
+--
+ A KNIGHT rides into shot and hacks him to the ground. He rides off.
+ We stay for a moment on the glade. A MIDDLE-AGED LADY in a C. & A.
+ twin-set emerges from the trees and looks in horror at the body of her
+ HUSBAND.
+MRS HISTORIAN: FRANK!
+ "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.1176 b/data/vim/patches/8.1.1176
new file mode 100644
index 000000000..6b1b36f07
--- /dev/null
+++ b/data/vim/patches/8.1.1176
@@ -0,0 +1,49 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1176
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1176 (after 8.1.1175)
+Problem: Test for dragging a tab is flaky.
+Solution: Add a brief sleep.
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1175/src/testdir/test_termcodes.vim 2019-04-15 20:55:26.879576316 +0200
+--- src/testdir/test_termcodes.vim 2019-04-15 21:46:52.375946220 +0200
+***************
+*** 325,330 ****
+--- 325,332 ----
+ \ 'Tab page 2',
+ \ ' Xtab1'], a)
+
++ " brief sleep to avoid causing a double-click
++ sleep 20m
+ %bwipe!
+ endfor
+
+*** ../vim-8.1.1175/src/version.c 2019-04-15 20:55:26.879576316 +0200
+--- src/version.c 2019-04-15 21:47:40.819595798 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1176,
+ /**/
+
+--
+ 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.1177 b/data/vim/patches/8.1.1177
new file mode 100644
index 000000000..d9e732779
--- /dev/null
+++ b/data/vim/patches/8.1.1177
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1177
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1177
+Problem: .ts files are recognized as xml, while typescript is more common.
+Solution: Recognize .ts files as typescript. (closes #4264)
+Files: runtime/filetype.vim src/testdir/test_filetype.vim
+
+
+*** ../vim-8.1.1176/runtime/filetype.vim 2019-01-18 23:14:39.820211241 +0100
+--- runtime/filetype.vim 2019-04-16 20:32:21.063550598 +0200
+***************
+*** 1695,1700 ****
+--- 1699,1707 ----
+ " TWIG files
+ au BufNewFile,BufReadPost *.twig setf twig
+
++ " Typescript
++ au BufNewFile,BufReadPost *.ts setf typescript
++
+ " Motif UIT/UIL files
+ au BufNewFile,BufRead *.uit,*.uil setf uil
+
+*** ../vim-8.1.1176/src/testdir/test_filetype.vim 2018-12-02 14:55:04.904731741 +0100
+--- src/testdir/test_filetype.vim 2019-04-16 20:33:10.947271595 +0200
+***************
+*** 451,456 ****
+--- 451,457 ----
+ \ 'tssgm': ['file.tssgm'],
+ \ 'tssop': ['file.tssop'],
+ \ 'twig': ['file.twig'],
++ \ 'typescript': ['file.ts'],
+ \ 'uc': ['file.uc'],
+ \ 'udevconf': ['/etc/udev/udev.conf'],
+ \ 'udevperm': ['/etc/udev/permissions.d/file.permissions'],
+***************
+*** 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'],
+--- 486,492 ----
+ \ '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.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.1176/src/version.c 2019-04-15 21:48:19.463316793 +0200
+--- src/version.c 2019-04-16 19:52:47.141946687 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1177,
+ /**/
+
+--
+This is an airconditioned room, do not open 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.1178 b/data/vim/patches/8.1.1178
new file mode 100644
index 000000000..01a458b68
--- /dev/null
+++ b/data/vim/patches/8.1.1178
@@ -0,0 +1,470 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1178
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1178
+Problem: When mouse click tests fails value of 'ttytype' is unknown.
+Solution: Add a message to the assert.
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1177/src/testdir/test_termcodes.vim 2019-04-15 21:48:19.463316793 +0200
+--- src/testdir/test_termcodes.vim 2019-04-17 16:24:40.278144677 +0200
+***************
+*** 51,64 ****
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+
+ for ttymouse_val in ['xterm', 'sgr']
+ exe 'set ttymouse=' . ttymouse_val
+ go
+! call assert_equal([0, 1, 1, 0], getpos('.'))
+ let row = 2
+ let col = 6
+ call MouseLeftClick(row, col)
+ call MouseLeftRelease(row, col)
+! call assert_equal([0, 2, 6, 0], getpos('.'))
+ endfor
+
+ let &mouse = save_mouse
+--- 51,65 ----
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+
+ for ttymouse_val in ['xterm', 'sgr']
++ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ go
+! call assert_equal([0, 1, 1, 0], getpos('.'), msg)
+ let row = 2
+ let col = 6
+ call MouseLeftClick(row, col)
+ call MouseLeftRelease(row, col)
+! call assert_equal([0, 2, 6, 0], getpos('.'), msg)
+ endfor
+
+ let &mouse = save_mouse
+***************
+*** 76,101 ****
+ call setline(1, range(1, 100))
+
+ for ttymouse_val in ['xterm', 'sgr']
+ exe 'set ttymouse=' . ttymouse_val
+ go
+! call assert_equal(1, line('w0'))
+! call assert_equal([0, 1, 1, 0], getpos('.'))
+
+ call MouseWheelDown(1, 1)
+! call assert_equal(4, line('w0'))
+! call assert_equal([0, 4, 1, 0], getpos('.'))
+
+ call MouseWheelDown(1, 1)
+! call assert_equal(7, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+
+ call MouseWheelUp(1, 1)
+! call assert_equal(4, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+
+ call MouseWheelUp(1, 1)
+! call assert_equal(1, line('w0'))
+! call assert_equal([0, 7, 1, 0], getpos('.'))
+ endfor
+
+ let &mouse = save_mouse
+--- 77,103 ----
+ call setline(1, range(1, 100))
+
+ for ttymouse_val in ['xterm', 'sgr']
++ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ go
+! call assert_equal(1, line('w0'), msg)
+! call assert_equal([0, 1, 1, 0], getpos('.'), msg)
+
+ call MouseWheelDown(1, 1)
+! call assert_equal(4, line('w0'), msg)
+! call assert_equal([0, 4, 1, 0], getpos('.'), msg)
+
+ call MouseWheelDown(1, 1)
+! call assert_equal(7, line('w0'), msg)
+! call assert_equal([0, 7, 1, 0], getpos('.'), msg)
+
+ call MouseWheelUp(1, 1)
+! call assert_equal(4, line('w0'), msg)
+! call assert_equal([0, 7, 1, 0], getpos('.'), msg)
+
+ call MouseWheelUp(1, 1)
+! call assert_equal(1, line('w0'), msg)
+! call assert_equal([0, 7, 1, 0], getpos('.'), msg)
+ endfor
+
+ let &mouse = save_mouse
+***************
+*** 111,116 ****
+--- 113,119 ----
+ set mouse=a term=xterm
+
+ for ttymouse_val in ['xterm', 'sgr']
++ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+
+ " Split horizontally and test dragging the horizontal window separator.
+***************
+*** 124,135 ****
+ call MouseLeftClick(row, col)
+ let row -= 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(rowseparator - 1, winheight(0) + 1)
+ let row += 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(rowseparator, winheight(0) + 1)
+ call MouseLeftRelease(row, col)
+! call assert_equal(rowseparator, winheight(0) + 1)
+ endif
+ bwipe!
+
+--- 127,138 ----
+ call MouseLeftClick(row, col)
+ let row -= 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(rowseparator - 1, winheight(0) + 1, msg)
+ let row += 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(rowseparator, winheight(0) + 1, msg)
+ call MouseLeftRelease(row, col)
+! call assert_equal(rowseparator, winheight(0) + 1, msg)
+ endif
+ bwipe!
+
+***************
+*** 144,155 ****
+ call MouseLeftClick(row, col)
+ let col -= 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(colseparator - 1, winwidth(0) + 1)
+ let col += 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(colseparator, winwidth(0) + 1)
+ call MouseLeftRelease(row, col)
+! call assert_equal(colseparator, winwidth(0) + 1)
+ endif
+ bwipe!
+ endfor
+--- 147,158 ----
+ call MouseLeftClick(row, col)
+ let col -= 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(colseparator - 1, winwidth(0) + 1, msg)
+ let col += 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(colseparator, winwidth(0) + 1, msg)
+ call MouseLeftRelease(row, col)
+! call assert_equal(colseparator, winwidth(0) + 1, msg)
+ endif
+ bwipe!
+ endfor
+***************
+*** 167,175 ****
+ set mouse=a term=xterm laststatus=2
+
+ for ttymouse_val in ['xterm', 'sgr']
+ exe 'set ttymouse=' . ttymouse_val
+
+! call assert_equal(1, &cmdheight)
+ let rowstatusline = winheight(0) + 1
+ let row = rowstatusline
+ let col = 1
+--- 170,179 ----
+ set mouse=a term=xterm laststatus=2
+
+ for ttymouse_val in ['xterm', 'sgr']
++ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+
+! call assert_equal(1, &cmdheight, msg)
+ let rowstatusline = winheight(0) + 1
+ let row = rowstatusline
+ let col = 1
+***************
+*** 182,196 ****
+ call MouseLeftClick(row, col)
+ let row -= 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(2, &cmdheight)
+! call assert_equal(rowstatusline - 1, winheight(0) + 1)
+ let row += 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(1, &cmdheight)
+! call assert_equal(rowstatusline, winheight(0) + 1)
+ call MouseLeftRelease(row, col)
+! call assert_equal(1, &cmdheight)
+! call assert_equal(rowstatusline, winheight(0) + 1)
+ endfor
+
+ let &mouse = save_mouse
+--- 186,200 ----
+ call MouseLeftClick(row, col)
+ let row -= 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(2, &cmdheight, msg)
+! call assert_equal(rowstatusline - 1, winheight(0) + 1, msg)
+ let row += 1
+ call MouseLeftDrag(row, col)
+! call assert_equal(1, &cmdheight, msg)
+! call assert_equal(rowstatusline, winheight(0) + 1, msg)
+ call MouseLeftRelease(row, col)
+! call assert_equal(1, &cmdheight, msg)
+! call assert_equal(rowstatusline, winheight(0) + 1, msg)
+ endfor
+
+ let &mouse = save_mouse
+***************
+*** 207,212 ****
+--- 211,217 ----
+ let row = 1
+
+ for ttymouse_val in ['xterm', 'sgr']
++ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ e Xfoo
+ tabnew Xbar
+***************
+*** 215,221 ****
+ call assert_equal(['Tab page 1',
+ \ ' Xfoo',
+ \ 'Tab page 2',
+! \ '> Xbar'], a)
+
+ " Test clicking on tab names in the tabline at the top.
+ let col = 2
+--- 220,226 ----
+ call assert_equal(['Tab page 1',
+ \ ' Xfoo',
+ \ 'Tab page 2',
+! \ '> Xbar'], a, msg)
+
+ " Test clicking on tab names in the tabline at the top.
+ let col = 2
+***************
+*** 226,232 ****
+ call assert_equal(['Tab page 1',
+ \ '> Xfoo',
+ \ 'Tab page 2',
+! \ ' Xbar'], a)
+
+ let col = 9
+ call MouseLeftClick(row, col)
+--- 231,237 ----
+ call assert_equal(['Tab page 1',
+ \ '> Xfoo',
+ \ 'Tab page 2',
+! \ ' Xbar'], a, msg)
+
+ let col = 9
+ call MouseLeftClick(row, col)
+***************
+*** 235,241 ****
+ call assert_equal(['Tab page 1',
+ \ ' Xfoo',
+ \ 'Tab page 2',
+! \ '> Xbar'], a)
+
+ %bwipe!
+ endfor
+--- 240,246 ----
+ call assert_equal(['Tab page 1',
+ \ ' Xfoo',
+ \ 'Tab page 2',
+! \ '> Xbar'], a, msg)
+
+ %bwipe!
+ endfor
+***************
+*** 258,263 ****
+--- 263,269 ----
+ " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
+ continue
+ endif
++ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ e Xtab1
+ tabnew Xtab2
+***************
+*** 270,276 ****
+ \ 'Tab page 2',
+ \ '> Xtab2',
+ \ 'Tab page 3',
+! \ ' Xtab3'], a)
+
+ " Click on "X" in tabline to close current tab i.e. Xtab2.
+ redraw
+--- 276,282 ----
+ \ 'Tab page 2',
+ \ '> Xtab2',
+ \ 'Tab page 3',
+! \ ' Xtab3'], a, msg)
+
+ " Click on "X" in tabline to close current tab i.e. Xtab2.
+ redraw
+***************
+*** 280,286 ****
+ call assert_equal(['Tab page 1',
+ \ ' Xtab1',
+ \ 'Tab page 2',
+! \ '> Xtab3'], a)
+
+ %bwipe!
+ endfor
+--- 286,292 ----
+ call assert_equal(['Tab page 1',
+ \ ' Xtab1',
+ \ 'Tab page 2',
+! \ '> Xtab3'], a, msg)
+
+ %bwipe!
+ endfor
+***************
+*** 299,304 ****
+--- 305,311 ----
+ let row = 1
+
+ for ttymouse_val in ['xterm', 'sgr']
++ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ e Xtab1
+ tabnew Xtab2
+***************
+*** 307,320 ****
+ call assert_equal(['Tab page 1',
+ \ ' Xtab1',
+ \ 'Tab page 2',
+! \ '> Xtab2'], a)
+ redraw
+
+ " Click in tab2 and drag it to tab1.
+ " Check getcharmod() to verify that click is not
+ " interpreted as a spurious double-click.
+ call MouseLeftClick(row, 10)
+! call assert_equal(0, getcharmod())
+ for col in [9, 8, 7, 6]
+ call MouseLeftDrag(row, col)
+ endfor
+--- 314,327 ----
+ call assert_equal(['Tab page 1',
+ \ ' Xtab1',
+ \ 'Tab page 2',
+! \ '> Xtab2'], a, msg)
+ redraw
+
+ " Click in tab2 and drag it to tab1.
+ " Check getcharmod() to verify that click is not
+ " interpreted as a spurious double-click.
+ call MouseLeftClick(row, 10)
+! call assert_equal(0, getcharmod(), msg)
+ for col in [9, 8, 7, 6]
+ call MouseLeftDrag(row, col)
+ endfor
+***************
+*** 323,329 ****
+ call assert_equal(['Tab page 1',
+ \ '> Xtab2',
+ \ 'Tab page 2',
+! \ ' Xtab1'], a)
+
+ " brief sleep to avoid causing a double-click
+ sleep 20m
+--- 330,336 ----
+ call assert_equal(['Tab page 1',
+ \ '> Xtab2',
+ \ 'Tab page 2',
+! \ ' Xtab1'], a, msg)
+
+ " brief sleep to avoid causing a double-click
+ sleep 20m
+***************
+*** 347,352 ****
+--- 354,360 ----
+ let col = 10
+
+ for ttymouse_val in ['xterm', 'sgr']
++ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ e Xtab1
+ tabnew Xtab2
+***************
+*** 355,370 ****
+ call assert_equal(['Tab page 1',
+ \ ' Xtab1',
+ \ 'Tab page 2',
+! \ '> Xtab2'], a)
+
+ redraw
+ call MouseLeftClick(row, col)
+ " Check getcharmod() to verify that first click is not
+ " interpreted as a spurious double-click.
+! call assert_equal(0, getcharmod())
+ call MouseLeftRelease(row, col)
+ call MouseLeftClick(row, col)
+! call assert_equal(32, getcharmod()) " double-click
+ call MouseLeftRelease(row, col)
+ let a = split(execute(':tabs'), "\n")
+ call assert_equal(['Tab page 1',
+--- 363,378 ----
+ call assert_equal(['Tab page 1',
+ \ ' Xtab1',
+ \ 'Tab page 2',
+! \ '> Xtab2'], a, msg)
+
+ redraw
+ call MouseLeftClick(row, col)
+ " Check getcharmod() to verify that first click is not
+ " interpreted as a spurious double-click.
+! call assert_equal(0, getcharmod(), msg)
+ call MouseLeftRelease(row, col)
+ call MouseLeftClick(row, col)
+! call assert_equal(32, getcharmod(), msg) " double-click
+ call MouseLeftRelease(row, col)
+ let a = split(execute(':tabs'), "\n")
+ call assert_equal(['Tab page 1',
+***************
+*** 372,378 ****
+ \ 'Tab page 2',
+ \ '> [No Name]',
+ \ 'Tab page 3',
+! \ ' Xtab2'], a)
+
+ if ttymouse_val !=# 'sgr'
+ " We need to sleep, or else MouseLeftClick() in next loop
+--- 380,386 ----
+ \ 'Tab page 2',
+ \ '> [No Name]',
+ \ 'Tab page 3',
+! \ ' Xtab2'], a, msg)
+
+ if ttymouse_val !=# 'sgr'
+ " We need to sleep, or else MouseLeftClick() in next loop
+*** ../vim-8.1.1177/src/version.c 2019-04-16 22:21:00.042595439 +0200
+--- src/version.c 2019-04-17 16:26:22.281621305 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1178,
+ /**/
+
+--
+ He was not in the least bit scared to be mashed into a pulp
+ Or to have his eyes gouged out and his elbows broken;
+ To have his kneecaps split and his body burned away
+ And his limbs all hacked and mangled, 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.1179 b/data/vim/patches/8.1.1179
new file mode 100644
index 000000000..e55839c0e
--- /dev/null
+++ b/data/vim/patches/8.1.1179
@@ -0,0 +1,100 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1179
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1179
+Problem: No test for mouse clicks in the fold column.
+Solution: Add a test. (Dominique Pelle, closes #4261)
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1178/src/testdir/test_termcodes.vim 2019-04-17 16:26:57.677439389 +0200
+--- src/testdir/test_termcodes.vim 2019-04-17 16:30:54.844217343 +0200
+***************
+*** 395,397 ****
+--- 395,448 ----
+ let &ttymouse = save_ttymouse
+ set mousetime&
+ endfunc
++
++ func Test_xterm_mouse_click_in_fold_columns()
++ new
++ let save_mouse = &mouse
++ let save_term = &term
++ let save_ttymouse = &ttymouse
++ let save_foldcolumn = &foldcolumn
++ set mouse=a term=xterm foldcolumn=3
++
++ " Create 2 nested folds.
++ call setline(1, range(1, 7))
++ 2,6fold
++ norm! zR
++ 4,5fold
++ call assert_equal([-1, -1, -1, 4, 4, -1, -1],
++ \ map(range(1, 7), 'foldclosed(v:val)'))
++
++ " Click in "+" of inner fold in foldcolumn should open it.
++ redraw
++ let row = 4
++ let col = 2
++ call MouseLeftClick(row, col)
++ call MouseLeftRelease(row, col)
++ call assert_equal([-1, -1, -1, -1, -1, -1, -1],
++ \ map(range(1, 7), 'foldclosed(v:val)'))
++
++ " Click in "-" of outer fold in foldcolumn should close it.
++ redraw
++ let row = 2
++ let col = 1
++ call MouseLeftClick(row, col)
++ call MouseLeftRelease(row, col)
++ call assert_equal([-1, 2, 2, 2, 2, 2, -1],
++ \ map(range(1, 7), 'foldclosed(v:val)'))
++ norm! zR
++
++ " Click in "|" of inner fold in foldcolumn should close it.
++ redraw
++ let row = 5
++ let col = 2
++ call MouseLeftClick(row, col)
++ call MouseLeftRelease(row, col)
++ call assert_equal([-1, -1, -1, 4, 4, -1, -1],
++ \ map(range(1, 7), 'foldclosed(v:val)'))
++
++ let &foldcolumn = save_foldcolumn
++ let &ttymouse = save_ttymouse
++ let &term = save_term
++ let &mouse = save_mouse
++ bwipe!
++ endfunc
+*** ../vim-8.1.1178/src/version.c 2019-04-17 16:26:57.677439389 +0200
+--- src/version.c 2019-04-17 16:30:43.908273796 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1179,
+ /**/
+
+--
+The greatest lies of all time:
+ (1) The check is in the mail.
+ (2) We have a really challenging assignment for you.
+ (3) I love you.
+ (4) All bugs have been fixed.
+ (5) This won't hurt a bit.
+ (6) Honey, I just need to debug this program and be home in 5 minutes.
+ (7) I have just sent you an e-mail about that.
+ (8) Of course I'll respect you in the morning.
+ (9) I'm from the government, and I'm here to help 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.1180 b/data/vim/patches/8.1.1180
new file mode 100644
index 000000000..21174606d
--- /dev/null
+++ b/data/vim/patches/8.1.1180
@@ -0,0 +1,524 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1180
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1180
+Problem: Vim script debugger tests are old style.
+Solution: Turn into new style tests. (Yegappan Lakshmanan, closes #4259)
+Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
+ src/testdir/test108.in, src/testdir/test108.ok,
+ src/testdir/test_debugger.vim
+
+
+*** ../vim-8.1.1179/src/Makefile 2019-04-11 18:13:53.337894322 +0200
+--- src/Makefile 2019-04-17 16:49:23.358684152 +0200
+***************
+*** 2176,2182 ****
+ test64 test69 \
+ test70 test72 \
+ test86 test87 test88 \
+! test94 test95 test99 test108:
+ cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTESTTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
+
+ # Run individual NEW style test.
+--- 2176,2182 ----
+ test64 test69 \
+ test70 test72 \
+ test86 test87 test88 \
+! test94 test95 test99:
+ cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTESTTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
+
+ # Run individual NEW style test.
+*** ../vim-8.1.1179/src/testdir/Make_all.mak 2019-04-07 14:21:26.226339351 +0200
+--- src/testdir/Make_all.mak 2019-04-17 16:49:23.358684152 +0200
+***************
+*** 28,34 ****
+ test94.out \
+ test95.out \
+ test99.out \
+- test108.out \
+ test_eval.out
+
+
+--- 28,33 ----
+***************
+*** 97,102 ****
+--- 96,102 ----
+ test_cscope \
+ test_cursor_func \
+ test_curswant \
++ test_debugger \
+ test_delete \
+ test_diffmode \
+ test_digraph \
+***************
+*** 312,317 ****
+--- 312,318 ----
+ test_crypt.res \
+ test_cscope.res \
+ test_curswant.res \
++ test_debugger.res \
+ test_diffmode.res \
+ test_digraph.res \
+ test_display.res \
+*** ../vim-8.1.1179/src/testdir/Make_vms.mms 2018-07-14 21:48:42.444978086 +0200
+--- src/testdir/Make_vms.mms 2019-04-17 16:49:23.358684152 +0200
+***************
+*** 80,86 ****
+ test42.out test44.out test48.out test49.out \
+ test64.out test69.out \
+ test72.out test77a.out test88.out \
+! test94.out test95.out test99.out test108.out \
+ test_eval.out
+
+ # Known problems:
+--- 80,86 ----
+ test42.out test44.out test48.out test49.out \
+ test64.out test69.out \
+ test72.out test77a.out test88.out \
+! test94.out test95.out test99.out \
+ test_eval.out
+
+ # Known problems:
+*** ../vim-8.1.1179/src/testdir/test108.in 2016-01-16 22:06:08.000000000 +0100
+--- src/testdir/test108.in 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,88 ****
+- Tests for backtrace debug commands. vim: set ft=vim :
+-
+- STARTTEST
+- :so small.vim
+- :lang mess C
+- :function! Foo()
+- : let var1 = 1
+- : let var2 = Bar(var1) + 9
+- : return var2
+- :endfunction
+- :
+- :function! Bar(var)
+- : let var1 = 2 + a:var
+- : let var2 = Bazz(var1) + 4
+- : return var2
+- :endfunction
+- :
+- :function! Bazz(var)
+- : let var1 = 3 + a:var
+- : let var3 = "another var"
+- : return var1
+- :endfunction
+- :new
+- :debuggreedy
+- :redir => out
+- :debug echo Foo()
+- step
+- step
+- step
+- step
+- step
+- step
+- echo "- show backtrace:\n"
+- backtrace
+- echo "\nshow variables on different levels:\n"
+- echo var1
+- up
+- back
+- echo var1
+- u
+- bt
+- echo var1
+- echo "\n- undefined vars:\n"
+- step
+- frame 2
+- echo "undefined var3 on former level:"
+- echo var3
+- fr 0
+- echo "here var3 is defined with \"another var\":"
+- echo var3
+- step
+- step
+- step
+- up
+- echo "\nundefined var2 on former level"
+- echo var2
+- down
+- echo "here var2 is defined with 10:"
+- echo var2
+- echo "\n- backtrace movements:\n"
+- b
+- echo "\nnext command cannot go down, we are on bottom\n"
+- down
+- up
+- echo "\nnext command cannot go up, we are on top\n"
+- up
+- b
+- echo "fil is not frame or finish, it is file"
+- fil
+- echo "\n- relative backtrace movement\n"
+- fr -1
+- frame
+- fra +1
+- fram
+- echo "\n- go beyond limits does not crash\n"
+- fr 100
+- fra
+- frame -40
+- fram
+- echo "\n- final result 19:"
+- cont
+- :0debuggreedy
+- :redir END
+- :$put =out
+- :w! test.out
+- :qa!
+- ENDTEST
+-
+--- 0 ----
+*** ../vim-8.1.1179/src/testdir/test108.ok 2018-11-28 20:38:34.564273386 +0100
+--- src/testdir/test108.ok 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,82 ****
+-
+-
+-
+- - show backtrace:
+-
+- 2 function Foo[2]
+- 1 Bar[2]
+- ->0 Bazz
+- line 2: let var3 = "another var"
+-
+- show variables on different levels:
+-
+- 6
+- 2 function Foo[2]
+- ->1 Bar[2]
+- 0 Bazz
+- line 2: let var3 = "another var"
+- 3
+- ->2 function Foo[2]
+- 1 Bar[2]
+- 0 Bazz
+- line 2: let var3 = "another var"
+- 1
+-
+- - undefined vars:
+-
+- undefined var3 on former level:
+- Error detected while processing function Foo[2]..Bar[2]..Bazz:
+- line 3:
+- E121: Undefined variable: var3
+- here var3 is defined with "another var":
+- another var
+-
+- undefined var2 on former level
+- Error detected while processing function Foo[2]..Bar:
+- line 3:
+- E121: Undefined variable: var2
+- here var2 is defined with 10:
+- 10
+-
+- - backtrace movements:
+-
+- 1 function Foo[2]
+- ->0 Bar
+- line 3: End of function
+-
+- next command cannot go down, we are on bottom
+-
+- frame is zero
+-
+- next command cannot go up, we are on top
+-
+- frame at highest level: 1
+- ->1 function Foo[2]
+- 0 Bar
+- line 3: End of function
+- fil is not frame or finish, it is file
+- "[No Name]" --No lines in buffer--
+-
+- - relative backtrace movement
+-
+- 1 function Foo[2]
+- ->0 Bar
+- line 3: End of function
+- ->1 function Foo[2]
+- 0 Bar
+- line 3: End of function
+-
+- - go beyond limits does not crash
+-
+- frame at highest level: 1
+- ->1 function Foo[2]
+- 0 Bar
+- line 3: End of function
+- frame is zero
+- 1 function Foo[2]
+- ->0 Bar
+- line 3: End of function
+-
+- - final result 19:
+- 19
+-
+--- 0 ----
+*** ../vim-8.1.1179/src/testdir/test_debugger.vim 2019-04-17 16:52:46.237656050 +0200
+--- src/testdir/test_debugger.vim 2019-04-17 16:51:44.169971069 +0200
+***************
+*** 0 ****
+--- 1,232 ----
++ " Tests for the Vim script debug commands
++
++ source shared.vim
++ source screendump.vim
++
++ " Run a Vim debugger command
++ " If the expected output argument is supplied, then check for it.
++ func RunDbgCmd(buf, cmd, ...)
++ call term_sendkeys(a:buf, a:cmd . "\r")
++ call term_wait(a:buf)
++
++ if a:0 != 0
++ " Verify the expected output
++ let lnum = 20 - len(a:1)
++ for l in a:1
++ call WaitForAssert({-> assert_equal(l, term_getline(a:buf, lnum))})
++ let lnum += 1
++ endfor
++ endif
++ endfunc
++
++ " Debugger tests
++ func Test_Debugger()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
++ " Create a Vim script with some functions
++ call writefile([
++ \ 'func Foo()',
++ \ ' let var1 = 1',
++ \ ' let var2 = Bar(var1) + 9',
++ \ ' return var2',
++ \ 'endfunc',
++ \ 'func Bar(var)',
++ \ ' let var1 = 2 + a:var',
++ \ ' let var2 = Bazz(var1) + 4',
++ \ ' return var2',
++ \ 'endfunc',
++ \ 'func Bazz(var)',
++ \ ' let var1 = 3 + a:var',
++ \ ' let var3 = "another var"',
++ \ ' let var3 = "value2"',
++ \ ' let var3 = "value3"',
++ \ ' return var1',
++ \ 'endfunc'], 'Xtest.vim')
++
++ " Start Vim in a terminal
++ let buf = RunVimInTerminal('-S Xtest.vim', {})
++
++ " Start the Vim debugger
++ call RunDbgCmd(buf, ':debug echo Foo()')
++
++ " Create a few stack frames by stepping through functions
++ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'step')
++
++ " check backtrace
++ call RunDbgCmd(buf, 'backtrace', [
++ \ ' 2 function Foo[2]',
++ \ ' 1 Bar[2]',
++ \ '->0 Bazz',
++ \ 'line 2: let var3 = "another var"'])
++
++ " Check variables in different stack frames
++ call RunDbgCmd(buf, 'echo var1', ['6'])
++
++ call RunDbgCmd(buf, 'up')
++ call RunDbgCmd(buf, 'back', [
++ \ ' 2 function Foo[2]',
++ \ '->1 Bar[2]',
++ \ ' 0 Bazz',
++ \ 'line 2: let var3 = "another var"'])
++ call RunDbgCmd(buf, 'echo var1', ['3'])
++
++ call RunDbgCmd(buf, 'u')
++ call RunDbgCmd(buf, 'bt', [
++ \ '->2 function Foo[2]',
++ \ ' 1 Bar[2]',
++ \ ' 0 Bazz',
++ \ 'line 2: let var3 = "another var"'])
++ call RunDbgCmd(buf, 'echo var1', ['1'])
++
++ " Undefined variables
++ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'frame 2')
++ call RunDbgCmd(buf, 'echo var3', [
++ \ 'Error detected while processing function Foo[2]..Bar[2]..Bazz:',
++ \ 'line 3:',
++ \ 'E121: Undefined variable: var3'])
++
++ " var3 is defined in this level with some other value
++ call RunDbgCmd(buf, 'fr 0')
++ call RunDbgCmd(buf, 'echo var3', ['another var'])
++
++ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'step', [
++ \ 'function Foo[2]..Bar',
++ \ 'line 3: End of function'])
++ call RunDbgCmd(buf, 'up')
++
++ " Undefined var2
++ call RunDbgCmd(buf, 'echo var2', [
++ \ 'Error detected while processing function Foo[2]..Bar:',
++ \ 'line 3:',
++ \ 'E121: Undefined variable: var2'])
++
++ " Var2 is defined with 10
++ call RunDbgCmd(buf, 'down')
++ call RunDbgCmd(buf, 'echo var2', ['10'])
++
++ " Backtrace movements
++ call RunDbgCmd(buf, 'b', [
++ \ ' 1 function Foo[2]',
++ \ '->0 Bar',
++ \ 'line 3: End of function'])
++
++ " next command cannot go down, we are on bottom
++ call RunDbgCmd(buf, 'down', ['frame is zero'])
++ call RunDbgCmd(buf, 'up')
++
++ " next command cannot go up, we are on top
++ call RunDbgCmd(buf, 'up', ['frame at highest level: 1'])
++ call RunDbgCmd(buf, 'where', [
++ \ '->1 function Foo[2]',
++ \ ' 0 Bar',
++ \ 'line 3: End of function'])
++
++ " fil is not frame or finish, it is file
++ call RunDbgCmd(buf, 'fil', ['"[No Name]" --No lines in buffer--'])
++
++ " relative backtrace movement
++ call RunDbgCmd(buf, 'fr -1')
++ call RunDbgCmd(buf, 'frame', [
++ \ ' 1 function Foo[2]',
++ \ '->0 Bar',
++ \ 'line 3: End of function'])
++
++ call RunDbgCmd(buf, 'fr +1')
++ call RunDbgCmd(buf, 'fram', [
++ \ '->1 function Foo[2]',
++ \ ' 0 Bar',
++ \ 'line 3: End of function'])
++
++ " go beyond limits does not crash
++ call RunDbgCmd(buf, 'fr 100', ['frame at highest level: 1'])
++ call RunDbgCmd(buf, 'fra', [
++ \ '->1 function Foo[2]',
++ \ ' 0 Bar',
++ \ 'line 3: End of function'])
++
++ call RunDbgCmd(buf, 'frame -40', ['frame is zero'])
++ call RunDbgCmd(buf, 'fram', [
++ \ ' 1 function Foo[2]',
++ \ '->0 Bar',
++ \ 'line 3: End of function'])
++
++ " final result 19
++ call RunDbgCmd(buf, 'cont', ['19'])
++
++ " breakpoints tests
++
++ " Start a debug session, so that reading the last line from the terminal
++ " works properly.
++ call RunDbgCmd(buf, ':debug echo Foo()')
++
++ " No breakpoints
++ call RunDbgCmd(buf, 'breakl', ['No breakpoints defined'])
++
++ " Place some breakpoints
++ call RunDbgCmd(buf, 'breaka func Bar')
++ call RunDbgCmd(buf, 'breaklis', [' 1 func Bar line 1'])
++ call RunDbgCmd(buf, 'breakadd func 3 Bazz')
++ call RunDbgCmd(buf, 'breaklist', [' 1 func Bar line 1',
++ \ ' 2 func Bazz line 3'])
++
++ " Check whether the breakpoints are hit
++ call RunDbgCmd(buf, 'cont', [
++ \ 'Breakpoint in "Bar" line 1',
++ \ 'function Foo[2]..Bar',
++ \ 'line 1: let var1 = 2 + a:var'])
++ call RunDbgCmd(buf, 'cont', [
++ \ 'Breakpoint in "Bazz" line 3',
++ \ 'function Foo[2]..Bar[2]..Bazz',
++ \ 'line 3: let var3 = "value2"'])
++
++ " Delete the breakpoints
++ call RunDbgCmd(buf, 'breakd 1')
++ call RunDbgCmd(buf, 'breakli', [' 2 func Bazz line 3'])
++ call RunDbgCmd(buf, 'breakdel func 3 Bazz')
++ call RunDbgCmd(buf, 'breakl', ['No breakpoints defined'])
++
++ call RunDbgCmd(buf, 'cont')
++
++ " Make sure the breakpoints are removed
++ call RunDbgCmd(buf, ':echo Foo()', ['19'])
++
++ " Delete a non-existing breakpoint
++ call RunDbgCmd(buf, ':breakdel 2', ['E161: Breakpoint not found: 2'])
++
++ " Expression breakpoint
++ call RunDbgCmd(buf, ':breakadd func 2 Bazz')
++ call RunDbgCmd(buf, ':echo Bazz(1)')
++ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'breaka expr var3')
++ call RunDbgCmd(buf, 'breakl', [' 4 expr var3'])
++ call RunDbgCmd(buf, 'cont', ['Breakpoint in "Bazz" line 4',
++ \ 'Oldval = "''another var''"',
++ \ 'Newval = "''value2''"',
++ \ 'function Bazz',
++ \ 'line 4: let var3 = "value3"'])
++
++ call RunDbgCmd(buf, 'breakdel *')
++ call RunDbgCmd(buf, 'breakl', ['No breakpoints defined'])
++
++ " finish the current function
++ call RunDbgCmd(buf, 'finish', [
++ \ 'function Bazz',
++ \ 'line 5: End of function'])
++ call RunDbgCmd(buf, 'cont')
++
++ call StopVimInTerminal(buf)
++
++ call delete('Xtest.vim')
++ endfunc
+*** ../vim-8.1.1179/src/version.c 2019-04-17 16:33:42.795349446 +0200
+--- src/version.c 2019-04-17 16:50:55.034220168 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1180,
+ /**/
+
+--
+FIRST HEAD: Oh! quick! get the sword out I want to cut his head off.
+THIRD HEAD: Oh, cut your own head off.
+SECOND HEAD: Yes - do us all a favour.
+ "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.1181 b/data/vim/patches/8.1.1181
new file mode 100644
index 000000000..ca8a2e94c
--- /dev/null
+++ b/data/vim/patches/8.1.1181
@@ -0,0 +1,267 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1181
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1181
+Problem: Tests for mouse clicks are a bit flaky when run in an interactive
+ terminal.
+Solution: Use "xterm2" instead of "xterm" for 'ttymouse' to avoid spurious
+ drag events.
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1180/src/testdir/test_termcodes.vim 2019-04-17 16:33:42.795349446 +0200
+--- src/testdir/test_termcodes.vim 2019-04-17 17:07:17.373210496 +0200
+***************
+*** 7,13 ****
+
+ " Helper function to emit a terminal escape code.
+ func TerminalEscapeCode(code_xterm, code_sgr, row, col, m)
+! if &ttymouse ==# 'xterm'
+ " need to use byte encoding here.
+ let str = list2str([a:code_xterm, a:col + 0x20, a:row + 0x20])
+ if has('iconv')
+--- 7,13 ----
+
+ " Helper function to emit a terminal escape code.
+ func TerminalEscapeCode(code_xterm, code_sgr, row, col, m)
+! if &ttymouse ==# 'xterm2'
+ " need to use byte encoding here.
+ let str = list2str([a:code_xterm, a:col + 0x20, a:row + 0x20])
+ if has('iconv')
+***************
+*** 50,56 ****
+ set mouse=a term=xterm
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+
+! for ttymouse_val in ['xterm', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ go
+--- 50,56 ----
+ set mouse=a term=xterm
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ go
+***************
+*** 76,82 ****
+ set mouse=a term=xterm
+ call setline(1, range(1, 100))
+
+! for ttymouse_val in ['xterm', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ go
+--- 76,82 ----
+ set mouse=a term=xterm
+ call setline(1, range(1, 100))
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ go
+***************
+*** 112,118 ****
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+
+! for ttymouse_val in ['xterm', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+
+--- 112,118 ----
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+
+***************
+*** 122,129 ****
+ let row = rowseparator
+ let col = 1
+
+! " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
+! if ttymouse_val !=# 'xterm' || row <= 223
+ call MouseLeftClick(row, col)
+ let row -= 1
+ call MouseLeftDrag(row, col)
+--- 122,129 ----
+ let row = rowseparator
+ let col = 1
+
+! " When 'ttymouse' is 'xterm2', row/col bigger than 223 are not supported.
+! if ttymouse_val !=# 'xterm2' || row <= 223
+ call MouseLeftClick(row, col)
+ let row -= 1
+ call MouseLeftDrag(row, col)
+***************
+*** 142,149 ****
+ let row = 1
+ let col = colseparator
+
+! " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
+! if ttymouse_val !=# 'xterm' || col <= 223
+ call MouseLeftClick(row, col)
+ let col -= 1
+ call MouseLeftDrag(row, col)
+--- 142,149 ----
+ let row = 1
+ let col = colseparator
+
+! " When 'ttymouse' is 'xterm2', row/col bigger than 223 are not supported.
+! if ttymouse_val !=# 'xterm2' || col <= 223
+ call MouseLeftClick(row, col)
+ let col -= 1
+ call MouseLeftDrag(row, col)
+***************
+*** 169,175 ****
+ let save_laststatus = &laststatus
+ set mouse=a term=xterm laststatus=2
+
+! for ttymouse_val in ['xterm', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+
+--- 169,175 ----
+ let save_laststatus = &laststatus
+ set mouse=a term=xterm laststatus=2
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+
+***************
+*** 178,185 ****
+ let row = rowstatusline
+ let col = 1
+
+! if ttymouse_val ==# 'xterm' && row > 223
+! " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
+ continue
+ endif
+
+--- 178,185 ----
+ let row = rowstatusline
+ let col = 1
+
+! if ttymouse_val ==# 'xterm2' && row > 223
+! " When 'ttymouse' is 'xterm2', row/col bigger than 223 are not supported.
+ continue
+ endif
+
+***************
+*** 210,216 ****
+ set mouse=a term=xterm
+ let row = 1
+
+! for ttymouse_val in ['xterm', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ e Xfoo
+--- 210,216 ----
+ set mouse=a term=xterm
+ let row = 1
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ e Xfoo
+***************
+*** 258,266 ****
+ let row = 1
+ let col = &columns
+
+! for ttymouse_val in ['xterm', 'sgr']
+! if ttymouse_val ==# 'xterm' && col > 223
+! " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
+ continue
+ endif
+ let msg = 'ttymouse=' .. ttymouse_val
+--- 258,266 ----
+ let row = 1
+ let col = &columns
+
+! for ttymouse_val in ['xterm2', 'sgr']
+! if ttymouse_val ==# 'xterm2' && col > 223
+! " When 'ttymouse' is 'xterm2', row/col bigger than 223 are not supported.
+ continue
+ endif
+ let msg = 'ttymouse=' .. ttymouse_val
+***************
+*** 304,310 ****
+ set mouse=a term=xterm mousetime=1
+ let row = 1
+
+! for ttymouse_val in ['xterm', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ e Xtab1
+--- 304,310 ----
+ set mouse=a term=xterm mousetime=1
+ let row = 1
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ e Xtab1
+***************
+*** 353,359 ****
+ let row = 1
+ let col = 10
+
+! for ttymouse_val in ['xterm', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ e Xtab1
+--- 353,359 ----
+ let row = 1
+ let col = 10
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ e Xtab1
+***************
+*** 402,408 ****
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+ let save_foldcolumn = &foldcolumn
+! set mouse=a term=xterm foldcolumn=3
+
+ " Create 2 nested folds.
+ call setline(1, range(1, 7))
+--- 402,408 ----
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+ let save_foldcolumn = &foldcolumn
+! set mouse=a term=xterm foldcolumn=3 ttymouse=xterm2
+
+ " Create 2 nested folds.
+ call setline(1, range(1, 7))
+*** ../vim-8.1.1180/src/version.c 2019-04-17 16:53:44.925357857 +0200
+--- src/version.c 2019-04-17 17:05:59.709607876 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1181,
+ /**/
+
+--
+Life would be so much easier if we could just look at the source code.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1182 b/data/vim/patches/8.1.1182
new file mode 100644
index 000000000..0c4e44d95
--- /dev/null
+++ b/data/vim/patches/8.1.1182
@@ -0,0 +1,172 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1182
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1182
+Problem: Some function prototypes are outdated.
+Solution: Update function prototypes. (Ken Takata, closes #4267)
+Files: src/os_mswin.c, src/proto/ex_getln.pro, src/proto/gui_w32.pro,
+ src/terminal.c, src/proto/terminal.pro, src/proto/window.pro,
+ src/window.c
+
+
+*** ../vim-8.1.1181/src/os_mswin.c 2019-04-02 22:15:51.344273531 +0200
+--- src/os_mswin.c 2019-04-17 18:15:08.392417401 +0200
+***************
+*** 98,105 ****
+--- 98,107 ----
+ typedef int LPBOOL;
+ typedef int LPCSTR;
+ typedef int LPCWSTR;
++ typedef int LPDWORD;
+ typedef int LPSTR;
+ typedef int LPTSTR;
++ typedef int LPVOID;
+ typedef int LPWSTR;
+ typedef int LRESULT;
+ typedef int MOUSE_EVENT_RECORD;
+***************
+*** 1733,1739 ****
+ DWORD nFileSystemNameSize);
+ static pfnGetVolumeInformationByHandleW pGetVolumeInformationByHandleW = NULL;
+
+! char_u *
+ resolve_reparse_point(char_u *fname)
+ {
+ HANDLE h = INVALID_HANDLE_VALUE;
+--- 1735,1741 ----
+ DWORD nFileSystemNameSize);
+ static pfnGetVolumeInformationByHandleW pGetVolumeInformationByHandleW = NULL;
+
+! static char_u *
+ resolve_reparse_point(char_u *fname)
+ {
+ HANDLE h = INVALID_HANDLE_VALUE;
+*** ../vim-8.1.1181/src/proto/ex_getln.pro 2019-01-13 23:38:33.407773189 +0100
+--- src/proto/ex_getln.pro 2019-04-17 18:15:20.736354872 +0200
+***************
+*** 54,60 ****
+ void handle_viminfo_history(garray_T *values, int writing);
+ void finish_viminfo_history(vir_T *virp);
+ void write_viminfo_history(FILE *fp, int merge);
+- void cmd_pchar(int c, int offset);
+- int cmd_gchar(int offset);
+ char_u *script_get(exarg_T *eap, char_u *cmd);
+ /* vim: set ft=c : */
+--- 54,58 ----
+*** ../vim-8.1.1181/src/proto/gui_w32.pro 2019-03-30 16:24:12.240380238 +0100
+--- src/proto/gui_w32.pro 2019-04-17 18:15:40.112256712 +0200
+***************
+*** 60,66 ****
+ void mch_set_mouse_shape(int shape);
+ char_u *gui_mch_browse(int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter);
+ char_u *gui_mch_browsedir(char_u *title, char_u *initdir);
+- int get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree);
+ void gui_mch_set_parent(char *title);
+ void gui_mch_prepare(int *argc, char **argv);
+ int gui_mch_init(void);
+--- 60,65 ----
+*** ../vim-8.1.1181/src/terminal.c 2019-04-12 22:27:21.632436663 +0200
+--- src/terminal.c 2019-04-17 18:21:16.650917924 +0200
+***************
+*** 5663,5668 ****
+--- 5663,5681 ----
+ /**************************************
+ * 2. MS-Windows implementation.
+ */
++ #ifdef PROTO
++ typedef int COORD;
++ typedef int DWORD;
++ typedef int HANDLE;
++ typedef int *DWORD_PTR;
++ typedef int HPCON;
++ typedef int HRESULT;
++ typedef int LPPROC_THREAD_ATTRIBUTE_LIST;
++ typedef int PSIZE_T;
++ typedef int PVOID;
++ typedef int SIZE_T;
++ typedef int WINAPI;
++ #endif
+
+ HRESULT (WINAPI *pCreatePseudoConsole)(COORD, HANDLE, HANDLE, DWORD, HPCON*);
+ HRESULT (WINAPI *pResizePseudoConsole)(HPCON, COORD);
+*** ../vim-8.1.1181/src/proto/terminal.pro 2019-02-03 14:52:42.505867463 +0100
+--- src/proto/terminal.pro 2019-04-17 18:21:18.142912280 +0200
+***************
+*** 56,62 ****
+ void f_term_wait(typval_T *argvars, typval_T *rettv);
+ void term_send_eof(channel_T *ch);
+ job_T *term_getjob(term_T *term);
+- int terminal_enabled(void);
+ void term_free_conpty(term_T *term);
+ int use_conpty(void);
+ /* vim: set ft=c : */
+--- 56,62 ----
+ void f_term_wait(typval_T *argvars, typval_T *rettv);
+ void term_send_eof(channel_T *ch);
+ job_T *term_getjob(term_T *term);
+ void term_free_conpty(term_T *term);
+ int use_conpty(void);
++ int terminal_enabled(void);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1181/src/proto/window.pro 2019-04-08 20:01:42.877179442 +0200
+--- src/proto/window.pro 2019-04-17 18:21:54.058775008 +0200
+***************
+*** 38,44 ****
+ win_T *win_find_nr(int winnr);
+ tabpage_T *win_find_tabpage(win_T *win);
+ win_T *win_vert_neighbor(tabpage_T *tp, win_T *wp, int up, long count);
+! win_T *win_horz_neighbor(tabpage_T *tp, win_T * wp, int left, long count);
+ void win_enter(win_T *wp, int undo_sync);
+ win_T *buf_jump_open_win(buf_T *buf);
+ win_T *buf_jump_open_tab(buf_T *buf);
+--- 38,44 ----
+ win_T *win_find_nr(int winnr);
+ tabpage_T *win_find_tabpage(win_T *win);
+ win_T *win_vert_neighbor(tabpage_T *tp, win_T *wp, int up, long count);
+! win_T *win_horz_neighbor(tabpage_T *tp, win_T *wp, int left, long count);
+ void win_enter(win_T *wp, int undo_sync);
+ win_T *buf_jump_open_win(buf_T *buf);
+ win_T *buf_jump_open_tab(buf_T *buf);
+*** ../vim-8.1.1181/src/window.c 2019-04-08 20:01:42.877179442 +0200
+--- src/window.c 2019-04-17 18:12:36.721185115 +0200
+***************
+*** 4302,4308 ****
+ * Returns the specified window if the neighbor is not found.
+ */
+ win_T *
+! win_horz_neighbor(tabpage_T *tp, win_T * wp, int left, long count)
+ {
+ frame_T *fr;
+ frame_T *nfr;
+--- 4302,4308 ----
+ * Returns the specified window if the neighbor is not found.
+ */
+ win_T *
+! win_horz_neighbor(tabpage_T *tp, win_T *wp, int left, long count)
+ {
+ frame_T *fr;
+ frame_T *nfr;
+*** ../vim-8.1.1181/src/version.c 2019-04-17 17:08:22.896875152 +0200
+--- src/version.c 2019-04-17 18:23:42.050347539 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1182,
+ /**/
+
+--
+Facepalm statement #6: "Estland is a fantasy place, just like Middle Earth and
+Madagaskar"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1183 b/data/vim/patches/8.1.1183
new file mode 100644
index 000000000..de1248d8f
--- /dev/null
+++ b/data/vim/patches/8.1.1183
@@ -0,0 +1,124 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1183
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1183
+Problem: Typos in VisVim comments.
+Solution: Correct the typos. (Christ van Willegen)
+Files: src/VisVim/Commands.cpp, src/VisVim/OleAut.cpp,
+ src/VisVim/README_VisVim.txt
+
+
+*** ../vim-8.1.1182/src/VisVim/Commands.cpp 2016-06-02 22:24:28.000000000 +0200
+--- src/VisVim/Commands.cpp 2019-04-17 18:26:51.841552971 +0200
+***************
+*** 55,61 ****
+ void CCommands::SetApplicationObject(IApplication * pApplication)
+ {
+ // This function assumes pApplication has already been AddRef'd
+! // for us, which CDSAddIn did in it's QueryInterface call
+ // just before it called us.
+ m_pApplication = pApplication;
+ if (! m_pApplication)
+--- 55,61 ----
+ void CCommands::SetApplicationObject(IApplication * pApplication)
+ {
+ // This function assumes pApplication has already been AddRef'd
+! // for us, which CDSAddIn did in its QueryInterface call
+ // just before it called us.
+ m_pApplication = pApplication;
+ if (! m_pApplication)
+***************
+*** 504,510 ****
+ {
+
+ // OLE automation object for com. with Vim
+! // When the object goes out of scope, it's destructor destroys the OLE
+ // connection;
+ // This is important to avoid blocking the object
+ // (in this memory corruption would be likely when terminating Vim
+--- 504,510 ----
+ {
+
+ // OLE automation object for com. with Vim
+! // When the object goes out of scope, its destructor destroys the OLE
+ // connection;
+ // This is important to avoid blocking the object
+ // (in this memory corruption would be likely when terminating Vim
+***************
+*** 653,659 ****
+ VimOle.ErrDiag();
+ }
+
+! // Change directory to the directory the file 'FileName' is in or it's parent
+ // directory according to the setting of the global 'g_ChangeDir':
+ // 'FileName' is expected to contain an absolute DOS path including the drive
+ // letter.
+--- 653,659 ----
+ VimOle.ErrDiag();
+ }
+
+! // Change directory to the directory the file 'FileName' is in or its parent
+ // directory according to the setting of the global 'g_ChangeDir':
+ // 'FileName' is expected to contain an absolute DOS path including the drive
+ // letter.
+*** ../vim-8.1.1182/src/VisVim/OleAut.cpp 2013-05-06 04:04:07.000000000 +0200
+--- src/VisVim/OleAut.cpp 2019-04-17 18:26:51.841552971 +0200
+***************
+*** 71,77 ****
+ }
+
+ // Creates an instance of the Automation object and
+! // obtains it's IDispatch interface.
+ //
+ // Parameters:
+ // ProgId ProgID of Automation object
+--- 71,77 ----
+ }
+
+ // Creates an instance of the Automation object and
+! // obtains its IDispatch interface.
+ //
+ // Parameters:
+ // ProgId ProgID of Automation object
+*** ../vim-8.1.1182/src/VisVim/README_VisVim.txt 2013-05-11 14:42:53.000000000 +0200
+--- src/VisVim/README_VisVim.txt 2019-04-17 18:26:51.841552971 +0200
+***************
+*** 238,244 ****
+ - Added an option to do a :cd before opening the file (having a file opened
+ by clicking it but finding out to be still in C:\Windows\system when trying to
+ open another file by ":e" can be annoying). Change directory can be
+! done to the source file's directory or it's parent directory.
+ - Added some explanations to the error message for the CO_E_CLASSSTRING error
+ ("Use OLE Vim and make sure to register...").
+
+--- 238,244 ----
+ - Added an option to do a :cd before opening the file (having a file opened
+ by clicking it but finding out to be still in C:\Windows\system when trying to
+ open another file by ":e" can be annoying). Change directory can be
+! done to the source file's directory or its parent directory.
+ - Added some explanations to the error message for the CO_E_CLASSSTRING error
+ ("Use OLE Vim and make sure to register...").
+
+*** ../vim-8.1.1182/src/version.c 2019-04-17 18:24:32.010143188 +0200
+--- src/version.c 2019-04-17 18:30:02.872712492 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1183,
+ /**/
+
+--
+Facepalm statement #8: "Drive faster, the petrol is running out"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1184 b/data/vim/patches/8.1.1184
new file mode 100644
index 000000000..b0d1c708a
--- /dev/null
+++ b/data/vim/patches/8.1.1184
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1184
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1184
+Problem: Undo file left behind after running test.
+Solution: Delete the undo file. (Dominique Pelle, closes #4279)
+Files: src/testdir/test_filechanged.vim
+
+
+*** ../vim-8.1.1183/src/testdir/test_filechanged.vim 2019-01-25 21:01:13.240877414 +0100
+--- src/testdir/test_filechanged.vim 2019-04-18 20:27:02.033581745 +0200
+***************
+*** 86,91 ****
+--- 86,92 ----
+
+ au! testreload
+ bwipe!
++ call delete(undofile('Xchanged_r'))
+ call delete('Xchanged_r')
+ endfunc
+
+*** ../vim-8.1.1183/src/version.c 2019-04-17 18:31:15.072386964 +0200
+--- src/version.c 2019-04-18 20:29:22.740768503 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1184,
+ /**/
+
+--
+GALAHAD: No look, really, this isn't nescess ...
+PIGLET: We must examine you.
+GALAHAD: There's nothing wrong with ... 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.1185 b/data/vim/patches/8.1.1185
new file mode 100644
index 000000000..4861b6372
--- /dev/null
+++ b/data/vim/patches/8.1.1185
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1185
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1185
+Problem: Mapping for CTRL-X is inconsistent.
+Solution: Map CTRL-X to "*d also for the MS-Windows console. (Ken Takata,
+ closes #4265)
+Files: src/getchar.c
+
+
+*** ../vim-8.1.1184/src/getchar.c 2019-04-04 20:13:06.001014760 +0200
+--- src/getchar.c 2019-04-18 21:08:36.825225697 +0200
+***************
+*** 5269,5275 ****
+ {(char_u *)"\316\325 \"*y", VIS_SEL}, /* CTRL-Insert is "*y */
+ {(char_u *)"\316\327 \"*d", VIS_SEL}, /* SHIFT-Del is "*d */
+ {(char_u *)"\316\330 \"*d", VIS_SEL}, /* CTRL-Del is "*d */
+! {(char_u *)"\030 \"-d", VIS_SEL}, /* CTRL-X is "-d */
+ # else
+ {(char_u *)"\316\324 P", NORMAL}, /* SHIFT-Insert is P */
+ {(char_u *)"\316\324 \"-dP", VIS_SEL}, /* SHIFT-Insert is "-dP */
+--- 5269,5275 ----
+ {(char_u *)"\316\325 \"*y", VIS_SEL}, /* CTRL-Insert is "*y */
+ {(char_u *)"\316\327 \"*d", VIS_SEL}, /* SHIFT-Del is "*d */
+ {(char_u *)"\316\330 \"*d", VIS_SEL}, /* CTRL-Del is "*d */
+! {(char_u *)"\030 \"*d", VIS_SEL}, /* CTRL-X is "*d */
+ # else
+ {(char_u *)"\316\324 P", NORMAL}, /* SHIFT-Insert is P */
+ {(char_u *)"\316\324 \"-dP", VIS_SEL}, /* SHIFT-Insert is "-dP */
+*** ../vim-8.1.1184/src/version.c 2019-04-18 20:30:50.948453504 +0200
+--- src/version.c 2019-04-18 21:08:03.141390362 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1185,
+ /**/
+
+--
+DINGO: Wicked wicked Zoot ... she is a bad person and she must pay the
+ penalty. And here in Castle Anthrax, we have but one punishment
+ ... you must tie her down on a bed ... and spank her. Come!
+GIRLS: A spanking! A spanking!
+ "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.1186 b/data/vim/patches/8.1.1186
new file mode 100644
index 000000000..624be447d
--- /dev/null
+++ b/data/vim/patches/8.1.1186
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1186
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1186
+Problem: readdir() allocates list twice.
+Solution: Remove second allocation. Also check for zero length.
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.1185/src/evalfunc.c 2019-04-08 20:01:42.877179442 +0200
+--- src/evalfunc.c 2019-04-19 15:20:22.221545619 +0200
+***************
+*** 9324,9333 ****
+ }
+ #endif
+
+! rettv->vval.v_list = list_alloc();
+! if (!failed && rettv->vval.v_list != NULL)
+ {
+- ++rettv->vval.v_list->lv_refcount;
+ sort_strings((char_u **)ga.ga_data, ga.ga_len);
+ for (i = 0; i < ga.ga_len; i++)
+ {
+--- 9324,9331 ----
+ }
+ #endif
+
+! if (!failed && rettv->vval.v_list != NULL && ga.ga_len > 0)
+ {
+ sort_strings((char_u **)ga.ga_data, ga.ga_len);
+ for (i = 0; i < ga.ga_len; i++)
+ {
+***************
+*** 9335,9344 ****
+ list_append_string(rettv->vval.v_list, p, -1);
+ }
+ }
+! for (i = 0; i < ga.ga_len; i++)
+! vim_free(((char_u **)ga.ga_data)[i]);
+!
+! ga_clear(&ga);
+ }
+
+ /*
+--- 9333,9339 ----
+ list_append_string(rettv->vval.v_list, p, -1);
+ }
+ }
+! ga_clear_strings(&ga);
+ }
+
+ /*
+*** ../vim-8.1.1185/src/version.c 2019-04-18 21:08:46.841176544 +0200
+--- src/version.c 2019-04-19 15:19:45.857716573 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1186,
+ /**/
+
+--
+"Intelligence has much less practical application than you'd think."
+ -- Scott Adams, Dilbert.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1187 b/data/vim/patches/8.1.1187
new file mode 100644
index 000000000..48eb25ef9
--- /dev/null
+++ b/data/vim/patches/8.1.1187
@@ -0,0 +1,83 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1187
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1187
+Problem: Cannot recognize Pipfile.
+Solution: Use existing filetypes. (Charles Ross, closes #4280)
+Files: runtime/filetype.vim, src/testdir/test_filetype.vim
+
+
+*** ../vim-8.1.1186/runtime/filetype.vim 2019-04-16 22:21:00.042595439 +0200
+--- runtime/filetype.vim 2019-04-19 23:29:36.178664024 +0200
+***************
+*** 1173,1178 ****
+--- 1174,1183 ----
+ " Pine config
+ au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine
+
++ " Pipenv Pipfiles
++ au BufNewFile,BufRead Pipfile setf config
++ au BufNewFile,BufRead Pipfile.lock setf json
++
+ " PL/1, PL/I
+ au BufNewFile,BufRead *.pli,*.pl1 setf pli
+
+*** ../vim-8.1.1186/src/testdir/test_filetype.vim 2019-04-16 22:21:00.042595439 +0200
+--- src/testdir/test_filetype.vim 2019-04-19 23:30:28.742403366 +0200
+***************
+*** 102,108 ****
+ \ 'coco': ['file.atg'],
+ \ 'conaryrecipe': ['file.recipe'],
+ \ 'conf': ['auto.master'],
+! \ 'config': ['configure.in', 'configure.ac'],
+ \ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi'],
+ \ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh'],
+ \ 'crm': ['file.crm'],
+--- 102,108 ----
+ \ 'coco': ['file.atg'],
+ \ 'conaryrecipe': ['file.recipe'],
+ \ 'conf': ['auto.master'],
+! \ 'config': ['configure.in', 'configure.ac', 'Pipfile'],
+ \ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi'],
+ \ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh'],
+ \ 'crm': ['file.crm'],
+***************
+*** 223,229 ****
+ \ 'jgraph': ['file.jgr'],
+ \ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
+ \ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx'],
+! \ 'json': ['file.json', 'file.jsonp', 'file.webmanifest'],
+ \ 'jsp': ['file.jsp'],
+ \ 'kconfig': ['Kconfig', 'Kconfig.debug'],
+ \ 'kivy': ['file.kv'],
+--- 223,229 ----
+ \ 'jgraph': ['file.jgr'],
+ \ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
+ \ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx'],
+! \ 'json': ['file.json', 'file.jsonp', 'file.webmanifest', 'Pipfile.lock'],
+ \ 'jsp': ['file.jsp'],
+ \ 'kconfig': ['Kconfig', 'Kconfig.debug'],
+ \ 'kivy': ['file.kv'],
+*** ../vim-8.1.1186/src/version.c 2019-04-19 15:20:39.409464105 +0200
+--- src/version.c 2019-04-19 23:28:54.194870162 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1187,
+ /**/
+
+--
+Eight Megabytes And Continually Swapping.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1188 b/data/vim/patches/8.1.1188
new file mode 100644
index 000000000..944400c85
--- /dev/null
+++ b/data/vim/patches/8.1.1188
@@ -0,0 +1,201 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1188
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1188
+Problem: Not all Vim variables require the v: prefix.
+Solution: When scriptversion is 3 all Vim variables can only be used with
+ the v: prefix. (Ken Takata, closes #4274)
+Files: src/eval.c, src/ex_cmds2.c, src/testdir/test_eval_stuff.vim,
+ runtime/doc/eval.txt
+
+
+*** ../vim-8.1.1187/src/eval.c 2019-04-05 22:50:35.021737378 +0200
+--- src/eval.c 2019-04-20 14:31:43.242750787 +0200
+***************
+*** 7672,7681 ****
+ return NULL;
+ *varname = name;
+
+! /* "version" is "v:version" in all scopes */
+! hi = hash_find(&compat_hashtab, name);
+! if (!HASHITEM_EMPTY(hi))
+! return &compat_hashtab;
+
+ ht = get_funccal_local_ht();
+ if (ht == NULL)
+--- 7672,7685 ----
+ return NULL;
+ *varname = name;
+
+! // "version" is "v:version" in all scopes if scriptversion < 3.
+! // Same for a few other variables marked with VV_COMPAT.
+! if (current_sctx.sc_version < 3)
+! {
+! hi = hash_find(&compat_hashtab, name);
+! if (!HASHITEM_EMPTY(hi))
+! return &compat_hashtab;
+! }
+
+ ht = get_funccal_local_ht();
+ if (ht == NULL)
+*** ../vim-8.1.1187/src/ex_cmds2.c 2019-04-04 19:06:11.147333162 +0200
+--- src/ex_cmds2.c 2019-04-20 14:14:58.164709785 +0200
+***************
+*** 5127,5133 ****
+ nr = getdigits(&eap->arg);
+ if (nr == 0 || *eap->arg != NUL)
+ emsg(_(e_invarg));
+! else if (nr > 2)
+ semsg(_("E999: scriptversion not supported: %d"), nr);
+ else
+ current_sctx.sc_version = nr;
+--- 5127,5133 ----
+ nr = getdigits(&eap->arg);
+ if (nr == 0 || *eap->arg != NUL)
+ emsg(_(e_invarg));
+! else if (nr > 3)
+ semsg(_("E999: scriptversion not supported: %d"), nr);
+ else
+ current_sctx.sc_version = nr;
+*** ../vim-8.1.1187/src/testdir/test_eval_stuff.vim 2019-04-04 18:15:05.770857065 +0200
+--- src/testdir/test_eval_stuff.vim 2019-04-20 14:36:27.533187729 +0200
+***************
+*** 154,159 ****
+--- 154,175 ----
+ endif
+ endfunc
+
++ scriptversion 3
++ func Test_vvar_scriptversion3()
++ call assert_fails('echo version', 'E121:')
++ call assert_false(exists('version'))
++ let version = 1
++ call assert_equal(1, version)
++ endfunc
++
++ scriptversion 2
++ func Test_vvar_scriptversion2()
++ call assert_true(exists('version'))
++ echo version
++ call assert_fails('let version = 1', 'E46:')
++ call assert_equal(v:version, version)
++ endfunc
++
+ func Test_scriptversion()
+ call writefile(['scriptversion 9'], 'Xversionscript')
+ call assert_fails('source Xversionscript', 'E999:')
+*** ../vim-8.1.1187/runtime/doc/eval.txt 2019-04-08 20:01:42.873179461 +0200
+--- runtime/doc/eval.txt 2019-04-20 14:27:47.172154658 +0200
+***************
+*** 1668,1674 ****
+ When there are two counts, as in "3d2w", they are multiplied,
+ just like what happens in the command, "d6w" for the example.
+ Also used for evaluating the 'formatexpr' option.
+! "count" also works, for backwards compatibility.
+
+ *v:count1* *count1-variable*
+ v:count1 Just like "v:count", but defaults to one when no count is
+--- 1688,1695 ----
+ When there are two counts, as in "3d2w", they are multiplied,
+ just like what happens in the command, "d6w" for the example.
+ Also used for evaluating the 'formatexpr' option.
+! "count" also works, for backwards compatibility, unless
+! |scriptversion| is 3 or higher.
+
+ *v:count1* *count1-variable*
+ v:count1 Just like "v:count", but defaults to one when no count is
+***************
+*** 1700,1706 ****
+ :silent! next
+ :if v:errmsg != ""
+ : ... handle error
+! < "errmsg" also works, for backwards compatibility.
+
+ *v:errors* *errors-variable* *assert-return*
+ v:errors Errors found by assert functions, such as |assert_true()|.
+--- 1721,1728 ----
+ :silent! next
+ :if v:errmsg != ""
+ : ... handle error
+! < "errmsg" also works, for backwards compatibility, unless
+! |scriptversion| is 3 or higher.
+
+ *v:errors* *errors-variable* *assert-return*
+ v:errors Errors found by assert functions, such as |assert_true()|.
+***************
+*** 2003,2009 ****
+ :if v:shell_error
+ : echo 'could not rename "foo" to "bar"!'
+ :endif
+! < "shell_error" also works, for backwards compatibility.
+
+ *v:statusmsg* *statusmsg-variable*
+ v:statusmsg Last given status message. It's allowed to set this variable.
+--- 2025,2032 ----
+ :if v:shell_error
+ : echo 'could not rename "foo" to "bar"!'
+ :endif
+! < "shell_error" also works, for backwards compatibility, unless
+! |scriptversion| is 3 or higher.
+
+ *v:statusmsg* *statusmsg-variable*
+ v:statusmsg Last given status message. It's allowed to set this variable.
+***************
+*** 2103,2109 ****
+ v:this_session Full filename of the last loaded or saved session file. See
+ |:mksession|. It is allowed to set this variable. When no
+ session file has been saved, this variable is empty.
+! "this_session" also works, for backwards compatibility.
+
+ *v:throwpoint* *throwpoint-variable*
+ v:throwpoint The point where the exception most recently caught and not
+--- 2126,2133 ----
+ v:this_session Full filename of the last loaded or saved session file. See
+ |:mksession|. It is allowed to set this variable. When no
+ session file has been saved, this variable is empty.
+! "this_session" also works, for backwards compatibility, unless
+! |scriptversion| is 3 or higher
+
+ *v:throwpoint* *throwpoint-variable*
+ v:throwpoint The point where the exception most recently caught and not
+***************
+*** 2134,2140 ****
+ v:version Version number of Vim: Major version number times 100 plus
+ minor version number. Version 5.0 is 500. Version 5.1 (5.01)
+ is 501. Read-only. "version" also works, for backwards
+! compatibility.
+ Use |has()| to check if a certain patch was included, e.g.: >
+ if has("patch-7.4.123")
+ < Note that patch numbers are specific to the version, thus both
+--- 2158,2164 ----
+ v:version Version number of Vim: Major version number times 100 plus
+ minor version number. Version 5.0 is 500. Version 5.1 (5.01)
+ is 501. Read-only. "version" also works, for backwards
+! compatibility, unless |scriptversion| is 3 or higher.
+ Use |has()| to check if a certain patch was included, e.g.: >
+ if has("patch-7.4.123")
+ < Note that patch numbers are specific to the version, thus both
+*** ../vim-8.1.1187/src/version.c 2019-04-19 23:32:45.193715199 +0200
+--- src/version.c 2019-04-20 14:17:05.791957040 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1188,
+ /**/
+
+--
+TALL KNIGHT OF 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.1189 b/data/vim/patches/8.1.1189
new file mode 100644
index 000000000..11af372fa
--- /dev/null
+++ b/data/vim/patches/8.1.1189
@@ -0,0 +1,120 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1189
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1189
+Problem: Mode is not cleared when leaving Insert mode.
+Solution: Clear the mode when got_int is set. (Ozaki Kiichi, closes #4270)
+Files: src/edit.c, src/testdir/test_bufline.vim,
+ src/testdir/test_messages.vim
+
+
+*** ../vim-8.1.1188/src/edit.c 2019-03-30 18:46:57.344077426 +0100
+--- src/edit.c 2019-04-20 14:55:19.719612597 +0200
+***************
+*** 4564,4570 ****
+ */
+ if (reg_recording != 0 || restart_edit != NUL)
+ showmode();
+! else if (p_smd && !skip_showmode())
+ msg("");
+
+ return TRUE; /* exit Insert mode */
+--- 4564,4570 ----
+ */
+ if (reg_recording != 0 || restart_edit != NUL)
+ showmode();
+! else if (p_smd && (got_int || !skip_showmode()))
+ msg("");
+
+ return TRUE; /* exit Insert mode */
+*** ../vim-8.1.1188/src/testdir/test_bufline.vim 2018-09-21 16:59:40.113489779 +0200
+--- src/testdir/test_bufline.vim 2019-04-20 14:55:19.719612597 +0200
+***************
+*** 18,24 ****
+ let b = bufnr('%')
+ wincmd w
+ call assert_equal(1, setbufline(b, 5, ['x']))
+! call assert_equal(1, setbufline(1234, 1, ['x']))
+ call assert_equal(0, setbufline(b, 4, ['d', 'e']))
+ call assert_equal(['c'], getbufline(b, 3))
+ call assert_equal(['d'], getbufline(b, 4))
+--- 18,24 ----
+ let b = bufnr('%')
+ wincmd w
+ call assert_equal(1, setbufline(b, 5, ['x']))
+! call assert_equal(1, setbufline(bufnr('$') + 1, 1, ['x']))
+ call assert_equal(0, setbufline(b, 4, ['d', 'e']))
+ call assert_equal(['c'], getbufline(b, 3))
+ call assert_equal(['d'], getbufline(b, 4))
+*** ../vim-8.1.1188/src/testdir/test_messages.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_messages.vim 2019-04-20 14:55:19.719612597 +0200
+***************
+*** 1,5 ****
+--- 1,7 ----
+ " Tests for :messages, :echomsg, :echoerr
+
++ source shared.vim
++
+ function Test_messages()
+ let oldmore = &more
+ try
+***************
+*** 92,94 ****
+--- 94,127 ----
+ call assert_match("function('<lambda>\\d*')", execute(':echoerr {-> 1234}'))
+ call test_ignore_error('RESET')
+ endfunc
++
++ func Test_mode_message_at_leaving_insert_by_ctrl_c()
++ if !has('terminal') || has('gui_running')
++ return
++ endif
++
++ " Set custom statusline built by user-defined function.
++ let testfile = 'Xtest.vim'
++ call writefile([
++ \ 'func StatusLine() abort',
++ \ ' return ""',
++ \ 'endfunc',
++ \ 'set statusline=%!StatusLine()',
++ \ 'set laststatus=2',
++ \ ], testfile)
++
++ let rows = 10
++ let buf = term_start([GetVimProg(), '--clean', '-S', testfile], {'term_rows': rows})
++ call term_wait(buf, 200)
++ call assert_equal('run', job_status(term_getjob(buf)))
++
++ call term_sendkeys(buf, "i")
++ call WaitForAssert({-> assert_match('^-- INSERT --\s*$', term_getline(buf, rows))})
++ call term_sendkeys(buf, "\<C-C>")
++ call WaitForAssert({-> assert_match('^\s*$', term_getline(buf, rows))})
++
++ call term_sendkeys(buf, ":qall!\<CR>")
++ call WaitForAssert({-> assert_equal('dead', job_status(term_getjob(buf)))})
++ exe buf . 'bwipe!'
++ call delete(testfile)
++ endfunc
+*** ../vim-8.1.1188/src/version.c 2019-04-20 14:39:42.796386124 +0200
+--- src/version.c 2019-04-20 15:06:03.740022909 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1189,
+ /**/
+
+--
+Experience is what you get when you don't get what you want.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1190 b/data/vim/patches/8.1.1190
new file mode 100644
index 000000000..43d6a5ae5
--- /dev/null
+++ b/data/vim/patches/8.1.1190
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1190
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1190
+Problem: has('vimscript-3') does not work.
+Solution: Add "vimscript-3" to the list of features.
+Files: src/evalfunc.c, src/testdir/test_eval_stuff.vim
+
+
+*** ../vim-8.1.1189/src/evalfunc.c 2019-04-19 15:20:39.409464105 +0200
+--- src/evalfunc.c 2019-04-20 21:42:38.460576538 +0200
+***************
+*** 6624,6629 ****
+--- 6624,6630 ----
+ #endif
+ "vimscript-1",
+ "vimscript-2",
++ "vimscript-3",
+ "virtualedit",
+ "visual",
+ "visualextra",
+*** ../vim-8.1.1189/src/testdir/test_eval_stuff.vim 2019-04-20 14:39:42.796386124 +0200
+--- src/testdir/test_eval_stuff.vim 2019-04-20 21:51:39.117352434 +0200
+***************
+*** 126,131 ****
+--- 126,132 ----
+
+ scriptversion 2
+ func Test_string_concat_scriptversion2()
++ call assert_true(has('vimscript-2'))
+ let a = 'a'
+ let b = 'b'
+
+***************
+*** 141,146 ****
+--- 142,148 ----
+
+ scriptversion 1
+ func Test_string_concat_scriptversion1()
++ call assert_true(has('vimscript-1'))
+ let a = 'a'
+ let b = 'b'
+
+***************
+*** 156,161 ****
+--- 158,164 ----
+
+ scriptversion 3
+ func Test_vvar_scriptversion3()
++ call assert_true(has('vimscript-3'))
+ call assert_fails('echo version', 'E121:')
+ call assert_false(exists('version'))
+ let version = 1
+*** ../vim-8.1.1189/src/version.c 2019-04-20 15:10:06.382607095 +0200
+--- src/version.c 2019-04-20 21:53:23.380738740 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1190,
+ /**/
+
+--
+Back up my hard drive? I can't find the reverse switch!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1191 b/data/vim/patches/8.1.1191
new file mode 100644
index 000000000..3a4b3217b
--- /dev/null
+++ b/data/vim/patches/8.1.1191
@@ -0,0 +1,307 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1191
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1191
+Problem: Not all debug commands are covered by a test.
+Solution: Add more tests. (Yegappan Lakshmanan, closes #4282)
+Files: src/testdir/test_debugger.vim
+
+
+*** ../vim-8.1.1190/src/testdir/test_debugger.vim 2019-04-17 16:53:44.925357857 +0200
+--- src/testdir/test_debugger.vim 2019-04-20 22:24:23.270833430 +0200
+***************
+*** 38,47 ****
+ \ ' return var2',
+ \ 'endfunc',
+ \ 'func Bazz(var)',
+! \ ' let var1 = 3 + a:var',
+! \ ' let var3 = "another var"',
+! \ ' let var3 = "value2"',
+! \ ' let var3 = "value3"',
+ \ ' return var1',
+ \ 'endfunc'], 'Xtest.vim')
+
+--- 38,50 ----
+ \ ' return var2',
+ \ 'endfunc',
+ \ 'func Bazz(var)',
+! \ ' try',
+! \ ' let var1 = 3 + a:var',
+! \ ' let var3 = "another var"',
+! \ ' let var3 = "value2"',
+! \ ' catch',
+! \ ' let var4 = "exception"',
+! \ ' endtry',
+ \ ' return var1',
+ \ 'endfunc'], 'Xtest.vim')
+
+***************
+*** 58,70 ****
+ call RunDbgCmd(buf, 'step')
+ call RunDbgCmd(buf, 'step')
+ call RunDbgCmd(buf, 'step')
+
+ " check backtrace
+ call RunDbgCmd(buf, 'backtrace', [
+ \ ' 2 function Foo[2]',
+ \ ' 1 Bar[2]',
+ \ '->0 Bazz',
+! \ 'line 2: let var3 = "another var"'])
+
+ " Check variables in different stack frames
+ call RunDbgCmd(buf, 'echo var1', ['6'])
+--- 61,74 ----
+ call RunDbgCmd(buf, 'step')
+ call RunDbgCmd(buf, 'step')
+ call RunDbgCmd(buf, 'step')
++ call RunDbgCmd(buf, 'step')
+
+ " check backtrace
+ call RunDbgCmd(buf, 'backtrace', [
+ \ ' 2 function Foo[2]',
+ \ ' 1 Bar[2]',
+ \ '->0 Bazz',
+! \ 'line 3: let var3 = "another var"'])
+
+ " Check variables in different stack frames
+ call RunDbgCmd(buf, 'echo var1', ['6'])
+***************
+*** 74,80 ****
+ \ ' 2 function Foo[2]',
+ \ '->1 Bar[2]',
+ \ ' 0 Bazz',
+! \ 'line 2: let var3 = "another var"'])
+ call RunDbgCmd(buf, 'echo var1', ['3'])
+
+ call RunDbgCmd(buf, 'u')
+--- 78,84 ----
+ \ ' 2 function Foo[2]',
+ \ '->1 Bar[2]',
+ \ ' 0 Bazz',
+! \ 'line 3: let var3 = "another var"'])
+ call RunDbgCmd(buf, 'echo var1', ['3'])
+
+ call RunDbgCmd(buf, 'u')
+***************
+*** 82,88 ****
+ \ '->2 function Foo[2]',
+ \ ' 1 Bar[2]',
+ \ ' 0 Bazz',
+! \ 'line 2: let var3 = "another var"'])
+ call RunDbgCmd(buf, 'echo var1', ['1'])
+
+ " Undefined variables
+--- 86,92 ----
+ \ '->2 function Foo[2]',
+ \ ' 1 Bar[2]',
+ \ ' 0 Bazz',
+! \ 'line 3: let var3 = "another var"'])
+ call RunDbgCmd(buf, 'echo var1', ['1'])
+
+ " Undefined variables
+***************
+*** 90,96 ****
+ call RunDbgCmd(buf, 'frame 2')
+ call RunDbgCmd(buf, 'echo var3', [
+ \ 'Error detected while processing function Foo[2]..Bar[2]..Bazz:',
+! \ 'line 3:',
+ \ 'E121: Undefined variable: var3'])
+
+ " var3 is defined in this level with some other value
+--- 94,100 ----
+ call RunDbgCmd(buf, 'frame 2')
+ call RunDbgCmd(buf, 'echo var3', [
+ \ 'Error detected while processing function Foo[2]..Bar[2]..Bazz:',
+! \ 'line 4:',
+ \ 'E121: Undefined variable: var3'])
+
+ " var3 is defined in this level with some other value
+***************
+*** 98,106 ****
+ call RunDbgCmd(buf, 'echo var3', ['another var'])
+
+ call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'step')
+ call RunDbgCmd(buf, 'step', [
+ \ 'function Foo[2]..Bar',
+ \ 'line 3: End of function'])
+--- 102,111 ----
+ call RunDbgCmd(buf, 'echo var3', ['another var'])
+
+ call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, '')
+! call RunDbgCmd(buf, '')
+! call RunDbgCmd(buf, '')
+! call RunDbgCmd(buf, '')
+ call RunDbgCmd(buf, 'step', [
+ \ 'function Foo[2]..Bar',
+ \ 'line 3: End of function'])
+***************
+*** 189,195 ****
+ call RunDbgCmd(buf, 'cont', [
+ \ 'Breakpoint in "Bazz" line 3',
+ \ 'function Foo[2]..Bar[2]..Bazz',
+! \ 'line 3: let var3 = "value2"'])
+
+ " Delete the breakpoints
+ call RunDbgCmd(buf, 'breakd 1')
+--- 194,200 ----
+ call RunDbgCmd(buf, 'cont', [
+ \ 'Breakpoint in "Bazz" line 3',
+ \ 'function Foo[2]..Bar[2]..Bazz',
+! \ 'line 3: let var3 = "another var"'])
+
+ " Delete the breakpoints
+ call RunDbgCmd(buf, 'breakd 1')
+***************
+*** 207,229 ****
+
+ " Expression breakpoint
+ call RunDbgCmd(buf, ':breakadd func 2 Bazz')
+! call RunDbgCmd(buf, ':echo Bazz(1)')
+ call RunDbgCmd(buf, 'step')
+ call RunDbgCmd(buf, 'breaka expr var3')
+! call RunDbgCmd(buf, 'breakl', [' 4 expr var3'])
+! call RunDbgCmd(buf, 'cont', ['Breakpoint in "Bazz" line 4',
+ \ 'Oldval = "''another var''"',
+ \ 'Newval = "''value2''"',
+ \ 'function Bazz',
+! \ 'line 4: let var3 = "value3"'])
+
+ call RunDbgCmd(buf, 'breakdel *')
+ call RunDbgCmd(buf, 'breakl', ['No breakpoints defined'])
+
+ " finish the current function
+ call RunDbgCmd(buf, 'finish', [
+ \ 'function Bazz',
+! \ 'line 5: End of function'])
+ call RunDbgCmd(buf, 'cont')
+
+ call StopVimInTerminal(buf)
+--- 212,311 ----
+
+ " Expression breakpoint
+ call RunDbgCmd(buf, ':breakadd func 2 Bazz')
+! call RunDbgCmd(buf, ':echo Bazz(1)', [
+! \ 'Entering Debug mode. Type "cont" to continue.',
+! \ 'function Bazz',
+! \ 'line 2: let var1 = 3 + a:var'])
+! call RunDbgCmd(buf, 'step')
+ call RunDbgCmd(buf, 'step')
+ call RunDbgCmd(buf, 'breaka expr var3')
+! call RunDbgCmd(buf, 'breakl', [' 3 func Bazz line 2',
+! \ ' 4 expr var3'])
+! call RunDbgCmd(buf, 'cont', ['Breakpoint in "Bazz" line 5',
+ \ 'Oldval = "''another var''"',
+ \ 'Newval = "''value2''"',
+ \ 'function Bazz',
+! \ 'line 5: catch'])
+
+ call RunDbgCmd(buf, 'breakdel *')
+ call RunDbgCmd(buf, 'breakl', ['No breakpoints defined'])
+
++ " Check for error cases
++ call RunDbgCmd(buf, 'breakadd abcd', [
++ \ 'Error detected while processing function Bazz:',
++ \ 'line 5:',
++ \ 'E475: Invalid argument: abcd'])
++ call RunDbgCmd(buf, 'breakadd func', ['E475: Invalid argument: func'])
++ call RunDbgCmd(buf, 'breakadd func 2', ['E475: Invalid argument: func 2'])
++ call RunDbgCmd(buf, 'breaka func a()', ['E475: Invalid argument: func a()'])
++ call RunDbgCmd(buf, 'breakd abcd', ['E475: Invalid argument: abcd'])
++ call RunDbgCmd(buf, 'breakd func', ['E475: Invalid argument: func'])
++ call RunDbgCmd(buf, 'breakd func a()', ['E475: Invalid argument: func a()'])
++ call RunDbgCmd(buf, 'breakd func a', ['E161: Breakpoint not found: func a'])
++ call RunDbgCmd(buf, 'breakd expr', ['E475: Invalid argument: expr'])
++ call RunDbgCmd(buf, 'breakd expr x', [
++ \ 'E121: Undefined variable: x',
++ \ 'E161: Breakpoint not found: expr x'])
++
+ " finish the current function
+ call RunDbgCmd(buf, 'finish', [
+ \ 'function Bazz',
+! \ 'line 8: End of function'])
+! call RunDbgCmd(buf, 'cont')
+!
+! " Test for :next
+! call RunDbgCmd(buf, ':debug echo Bar(1)')
+! call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'next')
+! call RunDbgCmd(buf, '', [
+! \ 'function Bar',
+! \ 'line 3: return var2'])
+! call RunDbgCmd(buf, 'c')
+!
+! " Test for :interrupt
+! call RunDbgCmd(buf, ':debug echo Bazz(1)')
+! call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'interrupt', [
+! \ 'Exception thrown: Vim:Interrupt',
+! \ 'function Bazz',
+! \ 'line 5: catch'])
+! call RunDbgCmd(buf, 'c')
+!
+! " Test for :quit
+! call RunDbgCmd(buf, ':debug echo Foo()')
+! call RunDbgCmd(buf, 'breakdel *')
+! call RunDbgCmd(buf, 'breakadd func 3 Foo')
+! call RunDbgCmd(buf, 'breakadd func 3 Bazz')
+! call RunDbgCmd(buf, 'cont', [
+! \ 'Breakpoint in "Bazz" line 3',
+! \ 'function Foo[2]..Bar[2]..Bazz',
+! \ 'line 3: let var3 = "another var"'])
+! call RunDbgCmd(buf, 'quit', [
+! \ 'Breakpoint in "Foo" line 3',
+! \ 'function Foo',
+! \ 'line 3: return var2'])
+! call RunDbgCmd(buf, 'breakdel *')
+! call RunDbgCmd(buf, 'quit')
+! call RunDbgCmd(buf, 'enew! | only!')
+!
+! call StopVimInTerminal(buf)
+!
+! " Tests for :breakadd file and :breakadd here
+! " Breakpoints should be set before sourcing the file
+!
+! call writefile([
+! \ 'let var1 = 10',
+! \ 'let var2 = 20',
+! \ 'let var3 = 30',
+! \ 'let var4 = 40'], 'Xtest.vim')
+!
+! " Start Vim in a terminal
+! let buf = RunVimInTerminal('Xtest.vim', {})
+! call RunDbgCmd(buf, ':breakadd file 2 Xtest.vim')
+! call RunDbgCmd(buf, ':4 | breakadd here')
+! call RunDbgCmd(buf, ':source Xtest.vim', ['line 2: let var2 = 20'])
+! call RunDbgCmd(buf, 'cont', ['line 4: let var4 = 40'])
+ call RunDbgCmd(buf, 'cont')
+
+ call StopVimInTerminal(buf)
+*** ../vim-8.1.1190/src/version.c 2019-04-20 21:54:04.180499034 +0200
+--- src/version.c 2019-04-20 22:27:32.445788446 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1191,
+ /**/
+
+--
+"Never be afraid to tell the world who you are."
+ -- Anonymous
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1192 b/data/vim/patches/8.1.1192
new file mode 100644
index 000000000..eeb06f622
--- /dev/null
+++ b/data/vim/patches/8.1.1192
@@ -0,0 +1,205 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1192
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1192
+Problem: Mode is not cleared when leaving Insert mode with mapped Esc.
+Solution: Clear the mode when redraw_cmdline is set. (closes #4269)
+Files: src/globals.h, src/screen.c, src/testdir/test_messages.vim
+
+
+*** ../vim-8.1.1191/src/globals.h 2019-04-07 11:56:14.913845511 +0200
+--- src/globals.h 2019-04-20 23:27:12.141239823 +0200
+***************
+*** 90,101 ****
+ */
+ EXTERN int cmdline_row;
+
+! EXTERN int redraw_cmdline INIT(= FALSE); /* cmdline must be redrawn */
+! EXTERN int clear_cmdline INIT(= FALSE); /* cmdline must be cleared */
+! EXTERN int mode_displayed INIT(= FALSE); /* mode is being displayed */
+! EXTERN int no_win_do_lines_ins INIT(= FALSE); /* don't insert lines */
+ #if defined(FEAT_CRYPT) || defined(FEAT_EVAL)
+! EXTERN int cmdline_star INIT(= FALSE); /* cmdline is crypted */
+ #endif
+
+ EXTERN int exec_from_reg INIT(= FALSE); /* executing register */
+--- 90,102 ----
+ */
+ EXTERN int cmdline_row;
+
+! EXTERN int redraw_cmdline INIT(= FALSE); // cmdline must be redrawn
+! EXTERN int redraw_mode INIT(= FALSE); // mode must be redrawn
+! EXTERN int clear_cmdline INIT(= FALSE); // cmdline must be cleared
+! EXTERN int mode_displayed INIT(= FALSE); // mode is being displayed
+! EXTERN int no_win_do_lines_ins INIT(= FALSE); // don't insert lines
+ #if defined(FEAT_CRYPT) || defined(FEAT_EVAL)
+! EXTERN int cmdline_star INIT(= FALSE); // cmdline is crypted
+ #endif
+
+ EXTERN int exec_from_reg INIT(= FALSE); /* executing register */
+*** ../vim-8.1.1191/src/screen.c 2019-04-13 14:53:10.886456655 +0200
+--- src/screen.c 2019-04-20 23:31:48.879644412 +0200
+***************
+*** 790,796 ****
+
+ /* Clear or redraw the command line. Done last, because scrolling may
+ * mess up the command line. */
+! if (clear_cmdline || redraw_cmdline)
+ showmode();
+
+ if (no_update)
+--- 790,796 ----
+
+ /* Clear or redraw the command line. Done last, because scrolling may
+ * mess up the command line. */
+! if (clear_cmdline || redraw_cmdline || redraw_mode)
+ showmode();
+
+ if (no_update)
+***************
+*** 857,863 ****
+ static void
+ update_finish(void)
+ {
+! if (redraw_cmdline)
+ showmode();
+
+ # ifdef FEAT_SEARCH_EXTRA
+--- 857,863 ----
+ static void
+ update_finish(void)
+ {
+! if (redraw_cmdline || redraw_mode)
+ showmode();
+
+ # ifdef FEAT_SEARCH_EXTRA
+***************
+*** 10128,10134 ****
+ || !redrawing()
+ || (char_avail() && !KeyTyped))
+ {
+! redraw_cmdline = TRUE; // show mode later
+ return TRUE;
+ }
+ return FALSE;
+--- 10128,10134 ----
+ || !redrawing()
+ || (char_avail() && !KeyTyped))
+ {
+! redraw_mode = TRUE; // show mode later
+ return TRUE;
+ }
+ return FALSE;
+***************
+*** 10140,10145 ****
+--- 10140,10146 ----
+ * If clear_cmdline is TRUE, clear the rest of the cmdline.
+ * If clear_cmdline is FALSE there may be a message there that needs to be
+ * cleared only if a mode is shown.
++ * If redraw_mode is TRUE show or clear the mode.
+ * Return the length of the message (0 if no message).
+ */
+ int
+***************
+*** 10313,10319 ****
+ }
+
+ mode_displayed = TRUE;
+! if (need_clear || clear_cmdline)
+ msg_clr_eos();
+ msg_didout = FALSE; /* overwrite this message */
+ length = msg_col;
+--- 10314,10320 ----
+ }
+
+ mode_displayed = TRUE;
+! if (need_clear || clear_cmdline || redraw_mode)
+ msg_clr_eos();
+ msg_didout = FALSE; /* overwrite this message */
+ length = msg_col;
+***************
+*** 10323,10328 ****
+--- 10324,10334 ----
+ else if (clear_cmdline && msg_silent == 0)
+ /* Clear the whole command line. Will reset "clear_cmdline". */
+ msg_clr_cmdline();
++ else if (redraw_mode)
++ {
++ msg_pos_mode();
++ msg_clr_eos();
++ }
+
+ #ifdef FEAT_CMDL_INFO
+ /* In Visual mode the size of the selected area must be redrawn. */
+***************
+*** 10335,10340 ****
+--- 10341,10347 ----
+ win_redr_ruler(lastwin, TRUE, FALSE);
+ #endif
+ redraw_cmdline = FALSE;
++ redraw_mode = FALSE;
+ clear_cmdline = FALSE;
+
+ return length;
+*** ../vim-8.1.1191/src/testdir/test_messages.vim 2019-04-20 15:10:06.382607095 +0200
+--- src/testdir/test_messages.vim 2019-04-20 22:59:32.707021358 +0200
+***************
+*** 125,127 ****
+--- 125,155 ----
+ exe buf . 'bwipe!'
+ call delete(testfile)
+ endfunc
++
++ func Test_mode_message_at_leaving_insert_with_esc_mapped()
++ if !has('terminal') || has('gui_running')
++ return
++ endif
++
++ " Set custom statusline built by user-defined function.
++ let testfile = 'Xtest.vim'
++ call writefile([
++ \ 'set laststatus=2',
++ \ 'inoremap <Esc> <Esc>00',
++ \ ], testfile)
++
++ let rows = 10
++ let buf = term_start([GetVimProg(), '--clean', '-S', testfile], {'term_rows': rows})
++ call term_wait(buf, 200)
++ call assert_equal('run', job_status(term_getjob(buf)))
++
++ call term_sendkeys(buf, "i")
++ call WaitForAssert({-> assert_match('^-- INSERT --\s*$', term_getline(buf, rows))})
++ call term_sendkeys(buf, "\<Esc>")
++ call WaitForAssert({-> assert_match('^\s*$', term_getline(buf, rows))})
++
++ call term_sendkeys(buf, ":qall!\<CR>")
++ call WaitForAssert({-> assert_equal('dead', job_status(term_getjob(buf)))})
++ exe buf . 'bwipe!'
++ call delete(testfile)
++ endfunc
+*** ../vim-8.1.1191/src/version.c 2019-04-20 22:28:38.961420148 +0200
+--- src/version.c 2019-04-20 23:36:50.069917005 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1192,
+ /**/
+
+--
+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.1193 b/data/vim/patches/8.1.1193
new file mode 100644
index 000000000..cbb60e29e
--- /dev/null
+++ b/data/vim/patches/8.1.1193
@@ -0,0 +1,161 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1193
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1193
+Problem: Typos and small problems in test files.
+Solution: Small improvements.
+Files: src/testdir/test_gn.vim, src/testdir/test_quotestar.vim,
+ src/testdir/test_registers.vim, src/testdir/test_syntax.vim,
+ src/testdir/test_tabpage.vim, src/testdir/test_vartabs.vim
+
+
+*** ../vim-8.1.1192/src/testdir/test_gn.vim 2018-12-23 19:10:05.002359965 +0100
+--- src/testdir/test_gn.vim 2019-01-27 20:54:51.874432967 +0100
+***************
+*** 2,8 ****
+
+ func Test_gn_command()
+ noautocmd new
+! " replace a single char by itsself quoted:
+ call setline('.', 'abc x def x ghi x jkl')
+ let @/ = 'x'
+ exe "norm! cgn'x'\<esc>.."
+--- 2,8 ----
+
+ func Test_gn_command()
+ noautocmd new
+! " replace a single char by itself quoted:
+ call setline('.', 'abc x def x ghi x jkl')
+ let @/ = 'x'
+ exe "norm! cgn'x'\<esc>.."
+*** ../vim-8.1.1192/src/testdir/test_quotestar.vim 2018-04-30 14:27:41.000000000 +0200
+--- src/testdir/test_quotestar.vim 2019-01-27 20:55:38.622096040 +0100
+***************
+*** 97,103 ****
+ if has('unix') && has('gui') && !has('gui_running')
+ let @* = ''
+
+! " Running in a terminal and the GUI is avaiable: Tell the server to open
+ " the GUI and check that the remote command still works.
+ " Need to wait for the GUI to start up, otherwise the send hangs in trying
+ " to send to the terminal window.
+--- 97,103 ----
+ if has('unix') && has('gui') && !has('gui_running')
+ let @* = ''
+
+! " Running in a terminal and the GUI is available: Tell the server to open
+ " the GUI and check that the remote command still works.
+ " Need to wait for the GUI to start up, otherwise the send hangs in trying
+ " to send to the terminal window.
+*** ../vim-8.1.1192/src/testdir/test_registers.vim 2019-03-11 08:05:02.199622735 +0100
+--- src/testdir/test_registers.vim 2019-03-11 10:22:34.100756986 +0100
+***************
+*** 163,167 ****
+--- 163,169 ----
+ bwipe!
+ if exists('save_F2')
+ let t_F2 = save_F2
++ else
++ set t_F2=
+ endif
+ endfunc
+*** ../vim-8.1.1192/src/testdir/test_syntax.vim 2018-12-02 14:55:04.904731741 +0100
+--- src/testdir/test_syntax.vim 2019-04-20 23:44:38.931339618 +0200
+***************
+*** 34,40 ****
+ \ 'CREATE TABLE FOOBAR(',
+ \ ' DLTD_BY VARCHAR2(100)',
+ \ ');',
+! \ ''])
+
+ syntax on
+ set ft=sql
+--- 34,40 ----
+ \ 'CREATE TABLE FOOBAR(',
+ \ ' DLTD_BY VARCHAR2(100)',
+ \ ');',
+! \ ''])
+
+ syntax on
+ set ft=sql
+***************
+*** 519,525 ****
+
+ norm f/
+ call assert_equal(['cComment', 'cCommentStart'], map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'))
+! call assert_equal(['Comment', 'Comment'], map(synstack(line("."), col(".")), 'synIDattr(synIDtrans(v:val), "name")'))
+
+ norm fA
+ call assert_equal(['cComment'], map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'))
+--- 519,525 ----
+
+ norm f/
+ call assert_equal(['cComment', 'cCommentStart'], map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'))
+! call assert_equal(['Comment', 'Comment'], map(synstack(line("."), col(".")), 'synIDattr(synIDtrans(v:val), "name")'))
+
+ norm fA
+ call assert_equal(['cComment'], map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'))
+*** ../vim-8.1.1192/src/testdir/test_tabpage.vim 2019-01-22 22:41:38.362850472 +0100
+--- src/testdir/test_tabpage.vim 2019-01-27 20:55:54.469981869 +0100
+***************
+*** 140,148 ****
+
+ " Test autocommands
+ function Test_tabpage_with_autocmd()
+- if !has('autocmd')
+- return
+- endif
+ command -nargs=1 -bar C :call add(s:li, '=== ' . <q-args> . ' ===')|<args>
+ augroup TestTabpageGroup
+ au!
+--- 140,145 ----
+*** ../vim-8.1.1192/src/testdir/test_vartabs.vim 2019-01-09 23:00:58.001176090 +0100
+--- src/testdir/test_vartabs.vim 2019-04-20 23:47:31.210450516 +0200
+***************
+*** 5,10 ****
+--- 5,11 ----
+ endif
+
+ source view_util.vim
++
+ func s:compare_lines(expect, actual)
+ call assert_equal(join(a:expect, "\n"), join(a:actual, "\n"))
+ endfunc
+***************
+*** 372,374 ****
+--- 373,381 ----
+ call assert_fails('set vts=,8')
+ call assert_fails('set vsts=,8')
+ endfunc
++
++ func Test_vartabs_reset()
++ set vts=8
++ set all&
++ call assert_equal('', &vts)
++ endfunc
+*** ../vim-8.1.1192/src/version.c 2019-04-20 23:38:02.189504258 +0200
+--- src/version.c 2019-04-20 23:43:25.539709608 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1193,
+ /**/
+
+--
+TALL KNIGHT: We shall say Ni! again to you if you do not appease us.
+ARTHUR: All right! What do you want?
+TALL KNIGHT: We want ... a 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.1194 b/data/vim/patches/8.1.1194
new file mode 100644
index 000000000..01a4166b1
--- /dev/null
+++ b/data/vim/patches/8.1.1194
@@ -0,0 +1,238 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1194
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1194
+Problem: Typos and small problems in source files.
+Solution: Small fixes.
+Files: src/channel.c, src/crypt.c, src/edit.c, src/regexp.h, src/tag.c,
+ src/term.c, src/terminal.c, src/userfunc.c, src/installman.sh
+
+
+*** ../vim-8.1.1193/src/channel.c 2019-04-12 21:19:01.265386241 +0200
+--- src/channel.c 2019-04-16 00:01:18.616222855 +0200
+***************
+*** 1906,1912 ****
+
+ if (prepend)
+ {
+! /* preend node to the head of the queue */
+ node->rq_next = head->rq_next;
+ node->rq_prev = NULL;
+ if (head->rq_next == NULL)
+--- 1906,1912 ----
+
+ if (prepend)
+ {
+! // prepend node to the head of the queue
+ node->rq_next = head->rq_next;
+ node->rq_prev = NULL;
+ if (head->rq_next == NULL)
+***************
+*** 1917,1923 ****
+ }
+ else
+ {
+! /* append node to the tail of the queue */
+ node->rq_next = NULL;
+ node->rq_prev = head->rq_prev;
+ if (head->rq_prev == NULL)
+--- 1917,1923 ----
+ }
+ else
+ {
+! // append node to the tail of the queue
+ node->rq_next = NULL;
+ node->rq_prev = head->rq_prev;
+ if (head->rq_prev == NULL)
+*** ../vim-8.1.1193/src/crypt.c 2019-03-02 10:13:36.788974890 +0100
+--- src/crypt.c 2019-03-02 18:30:41.308111802 +0100
+***************
+*** 42,48 ****
+ /* Optional function pointer for a self-test. */
+ int (* self_test_fn)();
+
+! // Function pointer for initializing encryption/description.
+ void (* init_fn)(cryptstate_T *state, char_u *key,
+ char_u *salt, int salt_len, char_u *seed, int seed_len);
+
+--- 42,48 ----
+ /* Optional function pointer for a self-test. */
+ int (* self_test_fn)();
+
+! // Function pointer for initializing encryption/decryption.
+ void (* init_fn)(cryptstate_T *state, char_u *key,
+ char_u *salt, int salt_len, char_u *seed, int seed_len);
+
+*** ../vim-8.1.1193/src/edit.c 2019-04-20 15:10:06.382607095 +0200
+--- src/edit.c 2019-04-20 15:52:26.195775374 +0200
+***************
+*** 4558,4567 ****
+ /* Re-enable bracketed paste mode. */
+ out_str(T_BE);
+
+! /*
+! * When recording or for CTRL-O, need to display the new mode.
+! * Otherwise remove the mode message.
+! */
+ if (reg_recording != 0 || restart_edit != NUL)
+ showmode();
+ else if (p_smd && (got_int || !skip_showmode()))
+--- 4558,4565 ----
+ /* Re-enable bracketed paste mode. */
+ out_str(T_BE);
+
+! // When recording or for CTRL-O, need to display the new mode.
+! // Otherwise remove the mode message.
+ if (reg_recording != 0 || restart_edit != NUL)
+ showmode();
+ else if (p_smd && (got_int || !skip_showmode()))
+*** ../vim-8.1.1193/src/regexp.h 2018-07-17 05:43:50.483214748 +0200
+--- src/regexp.h 2019-02-18 22:23:01.266862344 +0100
+***************
+*** 81,87 ****
+
+ /*
+ * Structure representing a NFA state.
+! * A NFA state may have no outgoing edge, when it is a NFA_MATCH state.
+ */
+ typedef struct nfa_state nfa_state_T;
+ struct nfa_state
+--- 81,87 ----
+
+ /*
+ * Structure representing a NFA state.
+! * An NFA state may have no outgoing edge, when it is a NFA_MATCH state.
+ */
+ typedef struct nfa_state nfa_state_T;
+ struct nfa_state
+*** ../vim-8.1.1193/src/tag.c 2019-04-02 21:25:58.350360150 +0200
+--- src/tag.c 2019-04-11 12:15:00.840680975 +0200
+***************
+*** 2368,2376 ****
+ * Don't add identical matches.
+ * Add all cscope tags, because they are all listed.
+ * "mfp" is used as a hash key, there is a NUL byte to end
+! * the part matters for comparing, more bytes may follow
+! * after it. E.g. help tags store the priority after the
+! * NUL.
+ */
+ #ifdef FEAT_CSCOPE
+ if (use_cscope)
+--- 2368,2376 ----
+ * Don't add identical matches.
+ * Add all cscope tags, because they are all listed.
+ * "mfp" is used as a hash key, there is a NUL byte to end
+! * the part that matters for comparing, more bytes may
+! * follow after it. E.g. help tags store the priority
+! * after the NUL.
+ */
+ #ifdef FEAT_CSCOPE
+ if (use_cscope)
+*** ../vim-8.1.1193/src/term.c 2019-04-06 20:00:15.433129920 +0200
+--- src/term.c 2019-04-20 23:54:27.456223087 +0200
+***************
+*** 21,28 ****
+ * (char **). This define removes that prototype. We include our own prototype
+ * below.
+ */
+-
+ #define tgetstr tgetstr_defined_wrong
+ #include "vim.h"
+
+ #ifdef HAVE_TGETENT
+--- 21,28 ----
+ * (char **). This define removes that prototype. We include our own prototype
+ * below.
+ */
+ #define tgetstr tgetstr_defined_wrong
++
+ #include "vim.h"
+
+ #ifdef HAVE_TGETENT
+*** ../vim-8.1.1193/src/terminal.c 2019-04-17 18:24:32.006143206 +0200
+--- src/terminal.c 2019-04-17 18:21:16.650917924 +0200
+***************
+*** 5671,5679 ****
+ typedef int HPCON;
+ typedef int HRESULT;
+ typedef int LPPROC_THREAD_ATTRIBUTE_LIST;
+ typedef int PSIZE_T;
+ typedef int PVOID;
+- typedef int SIZE_T;
+ typedef int WINAPI;
+ #endif
+
+--- 5671,5679 ----
+ typedef int HPCON;
+ typedef int HRESULT;
+ typedef int LPPROC_THREAD_ATTRIBUTE_LIST;
++ typedef int SIZE_T;
+ typedef int PSIZE_T;
+ typedef int PVOID;
+ typedef int WINAPI;
+ #endif
+
+*** ../vim-8.1.1193/src/userfunc.c 2019-03-14 13:42:57.169435481 +0100
+--- src/userfunc.c 2019-04-04 16:39:12.853059784 +0200
+***************
+*** 508,514 ****
+ *error = ERROR_SCRIPT;
+ else
+ {
+! sprintf((char *)fname_buf + 3, "%ld_", (long)current_sctx.sc_sid);
+ i = (int)STRLEN(fname_buf);
+ }
+ }
+--- 508,515 ----
+ *error = ERROR_SCRIPT;
+ else
+ {
+! sprintf((char *)fname_buf + 3, "%ld_",
+! (long)current_sctx.sc_sid);
+ i = (int)STRLEN(fname_buf);
+ }
+ }
+*** ../vim-8.1.1193/src/installman.sh 2018-07-28 18:16:44.285662961 +0200
+--- src/installman.sh 2019-03-07 12:24:01.775278118 +0100
+***************
+*** 6,12 ****
+ # 2 target directory e.g., "/usr/local/man/it/man1"
+ # 3 language addition e.g., "" or "-it"
+ # 4 vim location as used in manual pages e.g., "/usr/local/share/vim"
+! # 5 runtime dir for menu.vim et al. e.g., "/usr/local/share/vim/vim70"
+ # 6 runtime dir for global vimrc file e.g., "/usr/local/share/vim"
+ # 7 source dir for help files e.g., "../runtime/doc"
+ # 8 mode bits for manpages e.g., "644"
+--- 6,12 ----
+ # 2 target directory e.g., "/usr/local/man/it/man1"
+ # 3 language addition e.g., "" or "-it"
+ # 4 vim location as used in manual pages e.g., "/usr/local/share/vim"
+! # 5 runtime dir for menu.vim et al. e.g., "/usr/local/share/vim/vim81"
+ # 6 runtime dir for global vimrc file e.g., "/usr/local/share/vim"
+ # 7 source dir for help files e.g., "../runtime/doc"
+ # 8 mode bits for manpages e.g., "644"
+*** ../vim-8.1.1193/src/version.c 2019-04-20 23:47:42.518391308 +0200
+--- src/version.c 2019-04-20 23:51:41.749119882 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1194,
+ /**/
+
+--
+FATHER: One day, lad, all this will be yours ...
+PRINCE: What - the curtains?
+ "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.1195 b/data/vim/patches/8.1.1195
new file mode 100644
index 000000000..68b696239
--- /dev/null
+++ b/data/vim/patches/8.1.1195
@@ -0,0 +1,2445 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1195
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1195
+Problem: Vim script debugger functionality needs cleanup.
+Solution: Move debugger code to a separate file. Add more tests. (Yegappan
+ Lakshmanan, closes #4285)
+Files: Filelist, src/Make_bc5.mak, src/Make_cyg_ming.mak,
+ src/Make_dice.mak, src/Make_ivc.mak, src/Make_manx.mak,
+ src/Make_morph.mak, src/Make_mvc.mak, src/Make_sas.mak,
+ src/Make_vms.mms, src/Makefile, src/debugger.c, src/ex_cmds2.c,
+ src/proto.h, src/proto/debugger.pro, src/proto/ex_cmds2.pro
+
+
+*** ../vim-8.1.1194/Filelist 2019-04-11 13:09:57.786699880 +0200
+--- Filelist 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 23,28 ****
+--- 23,29 ----
+ src/charset.c \
+ src/crypt.c \
+ src/crypt_zip.c \
++ src/debugger.c \
+ src/dict.c \
+ src/diff.c \
+ src/digraph.c \
+***************
+*** 156,161 ****
+--- 157,163 ----
+ src/proto/charset.pro \
+ src/proto/crypt.pro \
+ src/proto/crypt_zip.pro \
++ src/proto/debugger.pro \
+ src/proto/dict.pro \
+ src/proto/diff.pro \
+ src/proto/digraph.pro \
+*** ../vim-8.1.1194/src/Make_bc5.mak 2019-03-30 13:53:26.166425144 +0100
+--- src/Make_bc5.mak 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 516,521 ****
+--- 516,522 ----
+ $(OBJDIR)\charset.obj \
+ $(OBJDIR)\crypt.obj \
+ $(OBJDIR)\crypt_zip.obj \
++ $(OBJDIR)\debugger.obj \
+ $(OBJDIR)\dict.obj \
+ $(OBJDIR)\diff.obj \
+ $(OBJDIR)\digraph.obj \
+*** ../vim-8.1.1194/src/Make_cyg_ming.mak 2019-04-03 20:30:56.081017564 +0200
+--- src/Make_cyg_ming.mak 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 703,708 ****
+--- 703,709 ----
+ $(OUTDIR)/charset.o \
+ $(OUTDIR)/crypt.o \
+ $(OUTDIR)/crypt_zip.o \
++ $(OUTDIR)/debugger.o \
+ $(OUTDIR)/dict.o \
+ $(OUTDIR)/diff.o \
+ $(OUTDIR)/digraph.o \
+*** ../vim-8.1.1194/src/Make_dice.mak 2019-03-30 13:53:26.166425144 +0100
+--- src/Make_dice.mak 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 33,38 ****
+--- 33,39 ----
+ charset.c \
+ crypt.c \
+ crypt_zip.c \
++ debugger.c \
+ dict.c \
+ diff.c \
+ digraph.c \
+***************
+*** 93,98 ****
+--- 94,100 ----
+ o/charset.o \
+ o/crypt.o \
+ o/crypt_zip.o \
++ o/debugger.o \
+ o/dict.o \
+ o/diff.o \
+ o/digraph.o \
+***************
+*** 179,184 ****
+--- 181,188 ----
+
+ o/crypt_zip.o: crypt_zip.c $(SYMS)
+
++ o/debugger.o: debugger.c $(SYMS)
++
+ o/dict.o: dict.c $(SYMS)
+
+ o/diff.o: diff.c $(SYMS)
+*** ../vim-8.1.1194/src/Make_ivc.mak 2019-03-30 13:53:26.166425144 +0100
+--- src/Make_ivc.mak 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 217,222 ****
+--- 217,223 ----
+ "$(INTDIR)/charset.obj" \
+ "$(INTDIR)/crypt.obj" \
+ "$(INTDIR)/crypt_zip.obj" \
++ "$(INTDIR)/debugger.obj" \
+ "$(INTDIR)/dict.obj" \
+ "$(INTDIR)/diff.obj" \
+ "$(INTDIR)/digraph.obj" \
+***************
+*** 369,374 ****
+--- 370,379 ----
+ # End Source File
+ # Begin Source File
+
++ SOURCE=.\debugger.c
++ # End Source File
++ # Begin Source File
++
+ SOURCE=.\dict.c
+ # End Source File
+ # Begin Source File
+*** ../vim-8.1.1194/src/Make_manx.mak 2019-03-30 13:53:26.166425144 +0100
+--- src/Make_manx.mak 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 43,48 ****
+--- 43,49 ----
+ charset.c \
+ crypt.c \
+ crypt_zip.c \
++ debugger.c \
+ dict.c \
+ diff.c \
+ digraph.c \
+***************
+*** 105,110 ****
+--- 106,112 ----
+ obj/charset.o \
+ obj/crypt.o \
+ obj/crypt_zip.o \
++ obj/debugger.o \
+ obj/dict.o \
+ obj/diff.o \
+ obj/digraph.o \
+***************
+*** 165,170 ****
+--- 167,173 ----
+ proto/charset.pro \
+ proto/crypt.pro \
+ proto/crypt_zip.pro \
++ proto/debugger.pro \
+ proto/dict.pro \
+ proto/diff.pro \
+ proto/digraph.pro \
+***************
+*** 283,288 ****
+--- 286,294 ----
+ obj/crypt_zip.o: crypt_zip.c
+ $(CCSYM) $@ crypt_zip.c
+
++ obj/debugger.o: debugger.c
++ $(CCSYM) $@ debugger.c
++
+ obj/dict.o: dict.c
+ $(CCSYM) $@ dict.c
+
+*** ../vim-8.1.1194/src/Make_morph.mak 2019-03-30 13:53:26.166425144 +0100
+--- src/Make_morph.mak 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 31,36 ****
+--- 31,37 ----
+ charset.c \
+ crypt.c \
+ crypt_zip.c \
++ debugger.c \
+ dict.c \
+ diff.c \
+ digraph.c \
+*** ../vim-8.1.1194/src/Make_mvc.mak 2019-04-04 20:31:59.094873282 +0200
+--- src/Make_mvc.mak 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 711,716 ****
+--- 711,717 ----
+ $(OUTDIR)\charset.obj \
+ $(OUTDIR)\crypt.obj \
+ $(OUTDIR)\crypt_zip.obj \
++ $(OUTDIR)\debugger.obj \
+ $(OUTDIR)\dict.obj \
+ $(OUTDIR)\diff.obj \
+ $(OUTDIR)\digraph.obj \
+***************
+*** 1367,1372 ****
+--- 1368,1375 ----
+
+ $(OUTDIR)/crypt_zip.obj: $(OUTDIR) crypt_zip.c $(INCL)
+
++ $(OUTDIR)/debugger.obj: $(OUTDIR) debugger.c $(INCL)
++
+ $(OUTDIR)/dict.obj: $(OUTDIR) dict.c $(INCL)
+
+ $(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL)
+***************
+*** 1638,1643 ****
+--- 1641,1647 ----
+ proto/charset.pro \
+ proto/crypt.pro \
+ proto/crypt_zip.pro \
++ proto/debugger.pro \
+ proto/dict.pro \
+ proto/diff.pro \
+ proto/digraph.pro \
+*** ../vim-8.1.1194/src/Make_sas.mak 2019-03-30 13:53:26.166425144 +0100
+--- src/Make_sas.mak 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 96,101 ****
+--- 96,102 ----
+ charset.c \
+ crypt.c \
+ crypt_zip.c \
++ debugger.c \
+ dict.c \
+ diff.c \
+ digraph.c \
+***************
+*** 157,162 ****
+--- 158,164 ----
+ charset.o \
+ crypt.o \
+ crypt_zip.o \
++ debugger.o \
+ dict.o \
+ diff.o \
+ digraph.o \
+***************
+*** 218,223 ****
+--- 220,226 ----
+ proto/charset.pro \
+ proto/crypt.pro \
+ proto/crypt_zip.pro \
++ proto/debugger.pro \
+ proto/dict.pro \
+ proto/diff.pro \
+ proto/digraph.pro \
+***************
+*** 340,345 ****
+--- 343,350 ----
+ proto/crypt.pro: crypt.c
+ crypt_zip.o: crypt_zip.c
+ proto/crypt_zip.pro: crypt_zip.c
++ debugger.o: debugger.c
++ proto/debugger.pro: debugger.c
+ dict.o: dict.c
+ proto/dict.pro: dict.c
+ diff.o: diff.c
+*** ../vim-8.1.1194/src/Make_vms.mms 2019-03-30 13:53:26.166425144 +0100
+--- src/Make_vms.mms 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 308,337 ****
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+ SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c \
+! crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
+! ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c \
+! if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c hardcopy.c \
+! hashtab.c indent.c insexpand.c json.c list.c main.c mark.c menu.c \
+! mbyte.c memfile.c memline.c message.c misc1.c misc2.c move.c normal.c \
+! ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c sign.c \
+! spell.c spellfile.c syntax.c tag.c term.c termlib.c textprop.c ui.c \
+! undo.c userfunc.c version.c screen.c window.c os_unix.c os_vms.c \
+! pathdef.c
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+ OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj \
+! charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj \
+! edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj \
+! ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj \
+ fileio.obj findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
+ indent.obj insexpand.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj \
+ quickfix.obj regexp.obj search.obj sha256.obj sign.obj spell.obj \
+ spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \
+! ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj \
+! os_unix.obj os_vms.obj pathdef.obj if_mzsch.obj \
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+ $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ)
+
+--- 308,337 ----
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+ SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c \
+! crypt.c crypt_zip.c debugger.c dict.c diff.c digraph.c edit.c eval.c \
+! evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c \
+! if_cscope.c if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c \
+! hardcopy.c hashtab.c indent.c insexpand.c json.c list.c main.c mark.c \
+! menu.c mbyte.c memfile.c memline.c message.c misc1.c misc2.c move.c \
+! normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c \
+! sha256.c sign.c spell.c spellfile.c syntax.c tag.c term.c termlib.c \
+! textprop.c ui.c undo.c userfunc.c version.c screen.c window.c \
+! os_unix.c os_vms.c pathdef.c \
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+ OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj \
+! charset.obj crypt.obj crypt_zip.obj debugger.obj dict.obj diff.obj \
+! digraph.obj edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj \
+! ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj \
+ fileio.obj findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
+ indent.obj insexpand.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj \
+ quickfix.obj regexp.obj search.obj sha256.obj sign.obj spell.obj \
+ spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \
+! ui.obj undo.obj userfunc.obj screen.obj version.obj \
+! window.obj os_unix.obj os_vms.obj pathdef.obj if_mzsch.obj \
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+ $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ)
+
+***************
+*** 522,527 ****
+--- 522,531 ----
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+ proto.h globals.h
++ debugger.obj : debugger.c vim.h [.auto]config.h feature.h os_unix.h \
++ ascii.h keymap.h term.h macros.h structs.h regexp.h \
++ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
++ globals.h
+ dict.obj : dict.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
+*** ../vim-8.1.1194/src/Makefile 2019-04-17 16:59:12.575688584 +0200
+--- src/Makefile 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 1579,1584 ****
+--- 1579,1585 ----
+ charset.c \
+ crypt.c \
+ crypt_zip.c \
++ debugger.c \
+ dict.c \
+ diff.c \
+ digraph.c \
+***************
+*** 1693,1698 ****
+--- 1694,1700 ----
+ objects/blowfish.o \
+ objects/crypt.o \
+ objects/crypt_zip.o \
++ objects/debugger.o \
+ objects/dict.o \
+ objects/diff.o \
+ objects/digraph.o \
+***************
+*** 1820,1825 ****
+--- 1822,1828 ----
+ charset.pro \
+ crypt.pro \
+ crypt_zip.pro \
++ debugger.pro \
+ dict.pro \
+ diff.pro \
+ digraph.pro \
+***************
+*** 2963,2968 ****
+--- 2966,2974 ----
+ objects/crypt_zip.o: crypt_zip.c
+ $(CCC) -o $@ crypt_zip.c
+
++ objects/debugger.o: debugger.c
++ $(CCC) -o $@ debugger.c
++
+ objects/dict.o: dict.c
+ $(CCC) -o $@ dict.c
+
+***************
+*** 3425,3430 ****
+--- 3431,3439 ----
+ 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
++ objects/debugger.o: debugger.c vim.h protodef.h auto/config.h feature.h os_unix.h \
++ os_mac.h ascii.h keymap.h term.h macros.h option.h beval.h structs.h \
++ regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.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 \
+*** ../vim-8.1.1194/src/debugger.c 2019-04-21 11:33:08.863781264 +0200
+--- src/debugger.c 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 0 ****
+--- 1,990 ----
++ /* 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.
++ */
++
++ /*
++ * debugger.c: Vim script debugger functions
++ */
++
++ #include "vim.h"
++
++ #if defined(FEAT_EVAL) || defined(PROTO)
++ static int debug_greedy = FALSE; /* batch mode debugging: don't save
++ and restore typeahead. */
++ static void do_setdebugtracelevel(char_u *arg);
++ static void do_checkbacktracelevel(void);
++ static void do_showbacktrace(char_u *cmd);
++
++ static char_u *debug_oldval = NULL; /* old and newval for debug expressions */
++ static char_u *debug_newval = NULL;
++ static int debug_expr = 0; /* use debug_expr */
++
++ int
++ has_watchexpr(void)
++ {
++ return debug_expr;
++ }
++
++ /*
++ * do_debug(): Debug mode.
++ * Repeatedly get Ex commands, until told to continue normal execution.
++ */
++ void
++ do_debug(char_u *cmd)
++ {
++ int save_msg_scroll = msg_scroll;
++ int save_State = State;
++ int save_did_emsg = did_emsg;
++ int save_cmd_silent = cmd_silent;
++ int save_msg_silent = msg_silent;
++ int save_emsg_silent = emsg_silent;
++ int save_redir_off = redir_off;
++ tasave_T typeaheadbuf;
++ int typeahead_saved = FALSE;
++ int save_ignore_script = 0;
++ int save_ex_normal_busy;
++ int n;
++ char_u *cmdline = NULL;
++ char_u *p;
++ char *tail = NULL;
++ static int last_cmd = 0;
++ #define CMD_CONT 1
++ #define CMD_NEXT 2
++ #define CMD_STEP 3
++ #define CMD_FINISH 4
++ #define CMD_QUIT 5
++ #define CMD_INTERRUPT 6
++ #define CMD_BACKTRACE 7
++ #define CMD_FRAME 8
++ #define CMD_UP 9
++ #define CMD_DOWN 10
++
++ #ifdef ALWAYS_USE_GUI
++ /* Can't do this when there is no terminal for input/output. */
++ if (!gui.in_use)
++ {
++ /* Break as soon as possible. */
++ debug_break_level = 9999;
++ return;
++ }
++ #endif
++
++ /* Make sure we are in raw mode and start termcap mode. Might have side
++ * effects... */
++ settmode(TMODE_RAW);
++ starttermcap();
++
++ ++RedrawingDisabled; /* don't redisplay the window */
++ ++no_wait_return; /* don't wait for return */
++ did_emsg = FALSE; /* don't use error from debugged stuff */
++ cmd_silent = FALSE; /* display commands */
++ msg_silent = FALSE; /* display messages */
++ emsg_silent = FALSE; /* display error messages */
++ redir_off = TRUE; /* don't redirect debug commands */
++
++ State = NORMAL;
++ debug_mode = TRUE;
++
++ if (!debug_did_msg)
++ msg(_("Entering Debug mode. Type \"cont\" to continue."));
++ if (debug_oldval != NULL)
++ {
++ smsg(_("Oldval = \"%s\""), debug_oldval);
++ vim_free(debug_oldval);
++ debug_oldval = NULL;
++ }
++ if (debug_newval != NULL)
++ {
++ smsg(_("Newval = \"%s\""), debug_newval);
++ vim_free(debug_newval);
++ debug_newval = NULL;
++ }
++ if (sourcing_name != NULL)
++ msg((char *)sourcing_name);
++ if (sourcing_lnum != 0)
++ smsg(_("line %ld: %s"), (long)sourcing_lnum, cmd);
++ else
++ smsg(_("cmd: %s"), cmd);
++ /*
++ * Repeat getting a command and executing it.
++ */
++ for (;;)
++ {
++ msg_scroll = TRUE;
++ need_wait_return = FALSE;
++
++ /* Save the current typeahead buffer and replace it with an empty one.
++ * This makes sure we get input from the user here and don't interfere
++ * with the commands being executed. Reset "ex_normal_busy" to avoid
++ * the side effects of using ":normal". Save the stuff buffer and make
++ * it empty. Set ignore_script to avoid reading from script input. */
++ save_ex_normal_busy = ex_normal_busy;
++ ex_normal_busy = 0;
++ if (!debug_greedy)
++ {
++ save_typeahead(&typeaheadbuf);
++ typeahead_saved = TRUE;
++ save_ignore_script = ignore_script;
++ ignore_script = TRUE;
++ }
++
++ vim_free(cmdline);
++ cmdline = getcmdline_prompt('>', NULL, 0, EXPAND_NOTHING, NULL);
++
++ if (typeahead_saved)
++ {
++ restore_typeahead(&typeaheadbuf);
++ ignore_script = save_ignore_script;
++ }
++ ex_normal_busy = save_ex_normal_busy;
++
++ cmdline_row = msg_row;
++ msg_starthere();
++ if (cmdline != NULL)
++ {
++ /* If this is a debug command, set "last_cmd".
++ * If not, reset "last_cmd".
++ * For a blank line use previous command. */
++ p = skipwhite(cmdline);
++ if (*p != NUL)
++ {
++ switch (*p)
++ {
++ case 'c': last_cmd = CMD_CONT;
++ tail = "ont";
++ break;
++ case 'n': last_cmd = CMD_NEXT;
++ tail = "ext";
++ break;
++ case 's': last_cmd = CMD_STEP;
++ tail = "tep";
++ break;
++ case 'f':
++ last_cmd = 0;
++ if (p[1] == 'r')
++ {
++ last_cmd = CMD_FRAME;
++ tail = "rame";
++ }
++ else
++ {
++ last_cmd = CMD_FINISH;
++ tail = "inish";
++ }
++ break;
++ case 'q': last_cmd = CMD_QUIT;
++ tail = "uit";
++ break;
++ case 'i': last_cmd = CMD_INTERRUPT;
++ tail = "nterrupt";
++ break;
++ case 'b': last_cmd = CMD_BACKTRACE;
++ if (p[1] == 't')
++ tail = "t";
++ else
++ tail = "acktrace";
++ break;
++ case 'w': last_cmd = CMD_BACKTRACE;
++ tail = "here";
++ break;
++ case 'u': last_cmd = CMD_UP;
++ tail = "p";
++ break;
++ case 'd': last_cmd = CMD_DOWN;
++ tail = "own";
++ break;
++ default: last_cmd = 0;
++ }
++ if (last_cmd != 0)
++ {
++ /* Check that the tail matches. */
++ ++p;
++ while (*p != NUL && *p == *tail)
++ {
++ ++p;
++ ++tail;
++ }
++ if (ASCII_ISALPHA(*p) && last_cmd != CMD_FRAME)
++ last_cmd = 0;
++ }
++ }
++
++ if (last_cmd != 0)
++ {
++ /* Execute debug command: decided where to break next and
++ * return. */
++ switch (last_cmd)
++ {
++ case CMD_CONT:
++ debug_break_level = -1;
++ break;
++ case CMD_NEXT:
++ debug_break_level = ex_nesting_level;
++ break;
++ case CMD_STEP:
++ debug_break_level = 9999;
++ break;
++ case CMD_FINISH:
++ debug_break_level = ex_nesting_level - 1;
++ break;
++ case CMD_QUIT:
++ got_int = TRUE;
++ debug_break_level = -1;
++ break;
++ case CMD_INTERRUPT:
++ got_int = TRUE;
++ debug_break_level = 9999;
++ /* Do not repeat ">interrupt" cmd, continue stepping. */
++ last_cmd = CMD_STEP;
++ break;
++ case CMD_BACKTRACE:
++ do_showbacktrace(cmd);
++ continue;
++ case CMD_FRAME:
++ if (*p == NUL)
++ {
++ do_showbacktrace(cmd);
++ }
++ else
++ {
++ p = skipwhite(p);
++ do_setdebugtracelevel(p);
++ }
++ continue;
++ case CMD_UP:
++ debug_backtrace_level++;
++ do_checkbacktracelevel();
++ continue;
++ case CMD_DOWN:
++ debug_backtrace_level--;
++ do_checkbacktracelevel();
++ continue;
++ }
++ /* Going out reset backtrace_level */
++ debug_backtrace_level = 0;
++ break;
++ }
++
++ /* don't debug this command */
++ n = debug_break_level;
++ debug_break_level = -1;
++ (void)do_cmdline(cmdline, getexline, NULL,
++ DOCMD_VERBOSE|DOCMD_EXCRESET);
++ debug_break_level = n;
++ }
++ lines_left = Rows - 1;
++ }
++ vim_free(cmdline);
++
++ --RedrawingDisabled;
++ --no_wait_return;
++ redraw_all_later(NOT_VALID);
++ need_wait_return = FALSE;
++ msg_scroll = save_msg_scroll;
++ lines_left = Rows - 1;
++ State = save_State;
++ debug_mode = FALSE;
++ did_emsg = save_did_emsg;
++ cmd_silent = save_cmd_silent;
++ msg_silent = save_msg_silent;
++ emsg_silent = save_emsg_silent;
++ redir_off = save_redir_off;
++
++ /* Only print the message again when typing a command before coming back
++ * here. */
++ debug_did_msg = TRUE;
++ }
++
++ static int
++ get_maxbacktrace_level(void)
++ {
++ char *p, *q;
++ int maxbacktrace = 0;
++
++ if (sourcing_name != NULL)
++ {
++ p = (char *)sourcing_name;
++ while ((q = strstr(p, "..")) != NULL)
++ {
++ p = q + 2;
++ maxbacktrace++;
++ }
++ }
++ return maxbacktrace;
++ }
++
++ static void
++ do_setdebugtracelevel(char_u *arg)
++ {
++ int level;
++
++ level = atoi((char *)arg);
++ if (*arg == '+' || level < 0)
++ debug_backtrace_level += level;
++ else
++ debug_backtrace_level = level;
++
++ do_checkbacktracelevel();
++ }
++
++ static void
++ do_checkbacktracelevel(void)
++ {
++ if (debug_backtrace_level < 0)
++ {
++ debug_backtrace_level = 0;
++ msg(_("frame is zero"));
++ }
++ else
++ {
++ int max = get_maxbacktrace_level();
++
++ if (debug_backtrace_level > max)
++ {
++ debug_backtrace_level = max;
++ smsg(_("frame at highest level: %d"), max);
++ }
++ }
++ }
++
++ static void
++ do_showbacktrace(char_u *cmd)
++ {
++ char *cur;
++ char *next;
++ int i = 0;
++ int max = get_maxbacktrace_level();
++
++ if (sourcing_name != NULL)
++ {
++ cur = (char *)sourcing_name;
++ while (!got_int)
++ {
++ next = strstr(cur, "..");
++ if (next != NULL)
++ *next = NUL;
++ if (i == max - debug_backtrace_level)
++ smsg("->%d %s", max - i, cur);
++ else
++ smsg(" %d %s", max - i, cur);
++ ++i;
++ if (next == NULL)
++ break;
++ *next = '.';
++ cur = next + 2;
++ }
++ }
++ if (sourcing_lnum != 0)
++ smsg(_("line %ld: %s"), (long)sourcing_lnum, cmd);
++ else
++ smsg(_("cmd: %s"), cmd);
++ }
++
++ /*
++ * ":debug".
++ */
++ void
++ ex_debug(exarg_T *eap)
++ {
++ int debug_break_level_save = debug_break_level;
++
++ debug_break_level = 9999;
++ do_cmdline_cmd(eap->arg);
++ debug_break_level = debug_break_level_save;
++ }
++
++ static char_u *debug_breakpoint_name = NULL;
++ static linenr_T debug_breakpoint_lnum;
++
++ /*
++ * When debugging or a breakpoint is set on a skipped command, no debug prompt
++ * is shown by do_one_cmd(). This situation is indicated by debug_skipped, and
++ * debug_skipped_name is then set to the source name in the breakpoint case. If
++ * a skipped command decides itself that a debug prompt should be displayed, it
++ * can do so by calling dbg_check_skipped().
++ */
++ static int debug_skipped;
++ static char_u *debug_skipped_name;
++
++ /*
++ * Go to debug mode when a breakpoint was encountered or "ex_nesting_level" is
++ * at or below the break level. But only when the line is actually
++ * executed. Return TRUE and set breakpoint_name for skipped commands that
++ * decide to execute something themselves.
++ * Called from do_one_cmd() before executing a command.
++ */
++ void
++ dbg_check_breakpoint(exarg_T *eap)
++ {
++ char_u *p;
++
++ debug_skipped = FALSE;
++ if (debug_breakpoint_name != NULL)
++ {
++ if (!eap->skip)
++ {
++ /* replace K_SNR with "<SNR>" */
++ if (debug_breakpoint_name[0] == K_SPECIAL
++ && debug_breakpoint_name[1] == KS_EXTRA
++ && debug_breakpoint_name[2] == (int)KE_SNR)
++ p = (char_u *)"<SNR>";
++ else
++ p = (char_u *)"";
++ smsg(_("Breakpoint in \"%s%s\" line %ld"),
++ p,
++ debug_breakpoint_name + (*p == NUL ? 0 : 3),
++ (long)debug_breakpoint_lnum);
++ debug_breakpoint_name = NULL;
++ do_debug(eap->cmd);
++ }
++ else
++ {
++ debug_skipped = TRUE;
++ debug_skipped_name = debug_breakpoint_name;
++ debug_breakpoint_name = NULL;
++ }
++ }
++ else if (ex_nesting_level <= debug_break_level)
++ {
++ if (!eap->skip)
++ do_debug(eap->cmd);
++ else
++ {
++ debug_skipped = TRUE;
++ debug_skipped_name = NULL;
++ }
++ }
++ }
++
++ /*
++ * Go to debug mode if skipped by dbg_check_breakpoint() because eap->skip was
++ * set. Return TRUE when the debug mode is entered this time.
++ */
++ int
++ dbg_check_skipped(exarg_T *eap)
++ {
++ int prev_got_int;
++
++ if (debug_skipped)
++ {
++ /*
++ * Save the value of got_int and reset it. We don't want a previous
++ * interruption cause flushing the input buffer.
++ */
++ prev_got_int = got_int;
++ got_int = FALSE;
++ debug_breakpoint_name = debug_skipped_name;
++ /* eap->skip is TRUE */
++ eap->skip = FALSE;
++ (void)dbg_check_breakpoint(eap);
++ eap->skip = TRUE;
++ got_int |= prev_got_int;
++ return TRUE;
++ }
++ return FALSE;
++ }
++
++ /*
++ * The list of breakpoints: dbg_breakp.
++ * This is a grow-array of structs.
++ */
++ struct debuggy
++ {
++ int dbg_nr; /* breakpoint number */
++ int dbg_type; /* DBG_FUNC, DBG_FILE or DBG_EXPR */
++ char_u *dbg_name; /* function, expression or file name */
++ regprog_T *dbg_prog; /* regexp program */
++ linenr_T dbg_lnum; /* line number in function or file */
++ int dbg_forceit; /* ! used */
++ #ifdef FEAT_EVAL
++ typval_T *dbg_val; /* last result of watchexpression */
++ #endif
++ int dbg_level; /* stored nested level for expr */
++ };
++
++ static garray_T dbg_breakp = {0, 0, sizeof(struct debuggy), 4, NULL};
++ #define BREAKP(idx) (((struct debuggy *)dbg_breakp.ga_data)[idx])
++ #define DEBUGGY(gap, idx) (((struct debuggy *)gap->ga_data)[idx])
++ static int last_breakp = 0; /* nr of last defined breakpoint */
++
++ #ifdef FEAT_PROFILE
++ /* Profiling uses file and func names similar to breakpoints. */
++ static garray_T prof_ga = {0, 0, sizeof(struct debuggy), 4, NULL};
++ #endif
++ #define DBG_FUNC 1
++ #define DBG_FILE 2
++ #define DBG_EXPR 3
++
++ static linenr_T debuggy_find(int file,char_u *fname, linenr_T after, garray_T *gap, int *fp);
++
++ /*
++ * Parse the arguments of ":profile", ":breakadd" or ":breakdel" and put them
++ * in the entry just after the last one in dbg_breakp. Note that "dbg_name"
++ * is allocated.
++ * Returns FAIL for failure.
++ */
++ static int
++ dbg_parsearg(
++ char_u *arg,
++ garray_T *gap) /* either &dbg_breakp or &prof_ga */
++ {
++ char_u *p = arg;
++ char_u *q;
++ struct debuggy *bp;
++ int here = FALSE;
++
++ if (ga_grow(gap, 1) == FAIL)
++ return FAIL;
++ bp = &DEBUGGY(gap, gap->ga_len);
++
++ /* Find "func" or "file". */
++ if (STRNCMP(p, "func", 4) == 0)
++ bp->dbg_type = DBG_FUNC;
++ else if (STRNCMP(p, "file", 4) == 0)
++ bp->dbg_type = DBG_FILE;
++ else if (
++ #ifdef FEAT_PROFILE
++ gap != &prof_ga &&
++ #endif
++ STRNCMP(p, "here", 4) == 0)
++ {
++ if (curbuf->b_ffname == NULL)
++ {
++ emsg(_(e_noname));
++ return FAIL;
++ }
++ bp->dbg_type = DBG_FILE;
++ here = TRUE;
++ }
++ else if (
++ #ifdef FEAT_PROFILE
++ gap != &prof_ga &&
++ #endif
++ STRNCMP(p, "expr", 4) == 0)
++ bp->dbg_type = DBG_EXPR;
++ else
++ {
++ semsg(_(e_invarg2), p);
++ return FAIL;
++ }
++ p = skipwhite(p + 4);
++
++ /* Find optional line number. */
++ if (here)
++ bp->dbg_lnum = curwin->w_cursor.lnum;
++ else if (
++ #ifdef FEAT_PROFILE
++ gap != &prof_ga &&
++ #endif
++ VIM_ISDIGIT(*p))
++ {
++ bp->dbg_lnum = getdigits(&p);
++ p = skipwhite(p);
++ }
++ else
++ bp->dbg_lnum = 0;
++
++ /* Find the function or file name. Don't accept a function name with (). */
++ if ((!here && *p == NUL)
++ || (here && *p != NUL)
++ || (bp->dbg_type == DBG_FUNC && strstr((char *)p, "()") != NULL))
++ {
++ semsg(_(e_invarg2), arg);
++ return FAIL;
++ }
++
++ if (bp->dbg_type == DBG_FUNC)
++ bp->dbg_name = vim_strsave(p);
++ else if (here)
++ bp->dbg_name = vim_strsave(curbuf->b_ffname);
++ else if (bp->dbg_type == DBG_EXPR)
++ {
++ bp->dbg_name = vim_strsave(p);
++ if (bp->dbg_name != NULL)
++ bp->dbg_val = eval_expr(bp->dbg_name, NULL);
++ }
++ else
++ {
++ /* Expand the file name in the same way as do_source(). This means
++ * doing it twice, so that $DIR/file gets expanded when $DIR is
++ * "~/dir". */
++ q = expand_env_save(p);
++ if (q == NULL)
++ return FAIL;
++ p = expand_env_save(q);
++ vim_free(q);
++ if (p == NULL)
++ return FAIL;
++ if (*p != '*')
++ {
++ bp->dbg_name = fix_fname(p);
++ vim_free(p);
++ }
++ else
++ bp->dbg_name = p;
++ }
++
++ if (bp->dbg_name == NULL)
++ return FAIL;
++ return OK;
++ }
++
++ /*
++ * ":breakadd". Also used for ":profile".
++ */
++ void
++ ex_breakadd(exarg_T *eap)
++ {
++ struct debuggy *bp;
++ char_u *pat;
++ garray_T *gap;
++
++ gap = &dbg_breakp;
++ #ifdef FEAT_PROFILE
++ if (eap->cmdidx == CMD_profile)
++ gap = &prof_ga;
++ #endif
++
++ if (dbg_parsearg(eap->arg, gap) == OK)
++ {
++ bp = &DEBUGGY(gap, gap->ga_len);
++ bp->dbg_forceit = eap->forceit;
++
++ if (bp->dbg_type != DBG_EXPR)
++ {
++ pat = file_pat_to_reg_pat(bp->dbg_name, NULL, NULL, FALSE);
++ if (pat != NULL)
++ {
++ bp->dbg_prog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
++ vim_free(pat);
++ }
++ if (pat == NULL || bp->dbg_prog == NULL)
++ vim_free(bp->dbg_name);
++ else
++ {
++ if (bp->dbg_lnum == 0) /* default line number is 1 */
++ bp->dbg_lnum = 1;
++ #ifdef FEAT_PROFILE
++ if (eap->cmdidx != CMD_profile)
++ #endif
++ {
++ DEBUGGY(gap, gap->ga_len).dbg_nr = ++last_breakp;
++ ++debug_tick;
++ }
++ ++gap->ga_len;
++ }
++ }
++ else
++ {
++ /* DBG_EXPR */
++ DEBUGGY(gap, gap->ga_len++).dbg_nr = ++last_breakp;
++ ++debug_tick;
++ }
++ }
++ }
++
++ /*
++ * ":debuggreedy".
++ */
++ void
++ ex_debuggreedy(exarg_T *eap)
++ {
++ if (eap->addr_count == 0 || eap->line2 != 0)
++ debug_greedy = TRUE;
++ else
++ debug_greedy = FALSE;
++ }
++
++ /*
++ * ":breakdel" and ":profdel".
++ */
++ void
++ ex_breakdel(exarg_T *eap)
++ {
++ struct debuggy *bp, *bpi;
++ int nr;
++ int todel = -1;
++ int del_all = FALSE;
++ int i;
++ linenr_T best_lnum = 0;
++ garray_T *gap;
++
++ gap = &dbg_breakp;
++ if (eap->cmdidx == CMD_profdel)
++ {
++ #ifdef FEAT_PROFILE
++ gap = &prof_ga;
++ #else
++ ex_ni(eap);
++ return;
++ #endif
++ }
++
++ if (vim_isdigit(*eap->arg))
++ {
++ /* ":breakdel {nr}" */
++ nr = atol((char *)eap->arg);
++ for (i = 0; i < gap->ga_len; ++i)
++ if (DEBUGGY(gap, i).dbg_nr == nr)
++ {
++ todel = i;
++ break;
++ }
++ }
++ else if (*eap->arg == '*')
++ {
++ todel = 0;
++ del_all = TRUE;
++ }
++ else
++ {
++ /* ":breakdel {func|file|expr} [lnum] {name}" */
++ if (dbg_parsearg(eap->arg, gap) == FAIL)
++ return;
++ bp = &DEBUGGY(gap, gap->ga_len);
++ for (i = 0; i < gap->ga_len; ++i)
++ {
++ bpi = &DEBUGGY(gap, i);
++ if (bp->dbg_type == bpi->dbg_type
++ && STRCMP(bp->dbg_name, bpi->dbg_name) == 0
++ && (bp->dbg_lnum == bpi->dbg_lnum
++ || (bp->dbg_lnum == 0
++ && (best_lnum == 0
++ || bpi->dbg_lnum < best_lnum))))
++ {
++ todel = i;
++ best_lnum = bpi->dbg_lnum;
++ }
++ }
++ vim_free(bp->dbg_name);
++ }
++
++ if (todel < 0)
++ semsg(_("E161: Breakpoint not found: %s"), eap->arg);
++ else
++ {
++ while (gap->ga_len > 0)
++ {
++ vim_free(DEBUGGY(gap, todel).dbg_name);
++ #ifdef FEAT_EVAL
++ if (DEBUGGY(gap, todel).dbg_type == DBG_EXPR
++ && DEBUGGY(gap, todel).dbg_val != NULL)
++ free_tv(DEBUGGY(gap, todel).dbg_val);
++ #endif
++ vim_regfree(DEBUGGY(gap, todel).dbg_prog);
++ --gap->ga_len;
++ if (todel < gap->ga_len)
++ mch_memmove(&DEBUGGY(gap, todel), &DEBUGGY(gap, todel + 1),
++ (gap->ga_len - todel) * sizeof(struct debuggy));
++ #ifdef FEAT_PROFILE
++ if (eap->cmdidx == CMD_breakdel)
++ #endif
++ ++debug_tick;
++ if (!del_all)
++ break;
++ }
++
++ /* If all breakpoints were removed clear the array. */
++ if (gap->ga_len == 0)
++ ga_clear(gap);
++ }
++ }
++
++ /*
++ * ":breaklist".
++ */
++ void
++ ex_breaklist(exarg_T *eap UNUSED)
++ {
++ struct debuggy *bp;
++ int i;
++
++ if (dbg_breakp.ga_len == 0)
++ msg(_("No breakpoints defined"));
++ else
++ for (i = 0; i < dbg_breakp.ga_len; ++i)
++ {
++ bp = &BREAKP(i);
++ if (bp->dbg_type == DBG_FILE)
++ home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE);
++ if (bp->dbg_type != DBG_EXPR)
++ smsg(_("%3d %s %s line %ld"),
++ bp->dbg_nr,
++ bp->dbg_type == DBG_FUNC ? "func" : "file",
++ bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff,
++ (long)bp->dbg_lnum);
++ else
++ smsg(_("%3d expr %s"),
++ bp->dbg_nr, bp->dbg_name);
++ }
++ }
++
++ /*
++ * Find a breakpoint for a function or sourced file.
++ * Returns line number at which to break; zero when no matching breakpoint.
++ */
++ linenr_T
++ dbg_find_breakpoint(
++ int file, /* TRUE for a file, FALSE for a function */
++ char_u *fname, /* file or function name */
++ linenr_T after) /* after this line number */
++ {
++ return debuggy_find(file, fname, after, &dbg_breakp, NULL);
++ }
++
++ #if defined(FEAT_PROFILE) || defined(PROTO)
++ /*
++ * Return TRUE if profiling is on for a function or sourced file.
++ */
++ int
++ has_profiling(
++ int file, /* TRUE for a file, FALSE for a function */
++ char_u *fname, /* file or function name */
++ int *fp) /* return: forceit */
++ {
++ return (debuggy_find(file, fname, (linenr_T)0, &prof_ga, fp)
++ != (linenr_T)0);
++ }
++ #endif
++
++ /*
++ * Common code for dbg_find_breakpoint() and has_profiling().
++ */
++ static linenr_T
++ debuggy_find(
++ int file, /* TRUE for a file, FALSE for a function */
++ char_u *fname, /* file or function name */
++ linenr_T after, /* after this line number */
++ garray_T *gap, /* either &dbg_breakp or &prof_ga */
++ int *fp) /* if not NULL: return forceit */
++ {
++ struct debuggy *bp;
++ int i;
++ linenr_T lnum = 0;
++ char_u *name = fname;
++ int prev_got_int;
++
++ /* Return quickly when there are no breakpoints. */
++ if (gap->ga_len == 0)
++ return (linenr_T)0;
++
++ /* Replace K_SNR in function name with "<SNR>". */
++ if (!file && fname[0] == K_SPECIAL)
++ {
++ name = alloc((unsigned)STRLEN(fname) + 3);
++ if (name == NULL)
++ name = fname;
++ else
++ {
++ STRCPY(name, "<SNR>");
++ STRCPY(name + 5, fname + 3);
++ }
++ }
++
++ for (i = 0; i < gap->ga_len; ++i)
++ {
++ /* Skip entries that are not useful or are for a line that is beyond
++ * an already found breakpoint. */
++ bp = &DEBUGGY(gap, i);
++ if (((bp->dbg_type == DBG_FILE) == file &&
++ bp->dbg_type != DBG_EXPR && (
++ #ifdef FEAT_PROFILE
++ gap == &prof_ga ||
++ #endif
++ (bp->dbg_lnum > after && (lnum == 0 || bp->dbg_lnum < lnum)))))
++ {
++ /*
++ * Save the value of got_int and reset it. We don't want a
++ * previous interruption cancel matching, only hitting CTRL-C
++ * while matching should abort it.
++ */
++ prev_got_int = got_int;
++ got_int = FALSE;
++ if (vim_regexec_prog(&bp->dbg_prog, FALSE, name, (colnr_T)0))
++ {
++ lnum = bp->dbg_lnum;
++ if (fp != NULL)
++ *fp = bp->dbg_forceit;
++ }
++ got_int |= prev_got_int;
++ }
++ #ifdef FEAT_EVAL
++ else if (bp->dbg_type == DBG_EXPR)
++ {
++ typval_T *tv;
++ int line = FALSE;
++
++ prev_got_int = got_int;
++ got_int = FALSE;
++
++ tv = eval_expr(bp->dbg_name, NULL);
++ if (tv != NULL)
++ {
++ if (bp->dbg_val == NULL)
++ {
++ debug_oldval = typval_tostring(NULL);
++ bp->dbg_val = tv;
++ debug_newval = typval_tostring(bp->dbg_val);
++ line = TRUE;
++ }
++ else
++ {
++ if (typval_compare(tv, bp->dbg_val, TYPE_EQUAL,
++ TRUE, FALSE) == OK
++ && tv->vval.v_number == FALSE)
++ {
++ typval_T *v;
++
++ line = TRUE;
++ debug_oldval = typval_tostring(bp->dbg_val);
++ /* Need to evaluate again, typval_compare() overwrites
++ * "tv". */
++ v = eval_expr(bp->dbg_name, NULL);
++ debug_newval = typval_tostring(v);
++ free_tv(bp->dbg_val);
++ bp->dbg_val = v;
++ }
++ free_tv(tv);
++ }
++ }
++ else if (bp->dbg_val != NULL)
++ {
++ debug_oldval = typval_tostring(bp->dbg_val);
++ debug_newval = typval_tostring(NULL);
++ free_tv(bp->dbg_val);
++ bp->dbg_val = NULL;
++ line = TRUE;
++ }
++
++ if (line)
++ {
++ lnum = after > 0 ? after : 1;
++ break;
++ }
++
++ got_int |= prev_got_int;
++ }
++ #endif
++ }
++ if (name != fname)
++ vim_free(name);
++
++ return lnum;
++ }
++
++ /*
++ * Called when a breakpoint was encountered.
++ */
++ void
++ dbg_breakpoint(char_u *name, linenr_T lnum)
++ {
++ /* We need to check if this line is actually executed in do_one_cmd() */
++ debug_breakpoint_name = name;
++ debug_breakpoint_lnum = lnum;
++ }
++ #endif
+*** ../vim-8.1.1194/src/ex_cmds2.c 2019-04-20 14:39:42.796386124 +0200
+--- src/ex_cmds2.c 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 66,1046 ****
+ #endif
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+- static int debug_greedy = FALSE; /* batch mode debugging: don't save
+- and restore typeahead. */
+- static void do_setdebugtracelevel(char_u *arg);
+- static void do_checkbacktracelevel(void);
+- static void do_showbacktrace(char_u *cmd);
+-
+- static char_u *debug_oldval = NULL; /* old and newval for debug expressions */
+- static char_u *debug_newval = NULL;
+- static int debug_expr = 0; /* use debug_expr */
+-
+- int
+- has_watchexpr(void)
+- {
+- return debug_expr;
+- }
+-
+- /*
+- * do_debug(): Debug mode.
+- * Repeatedly get Ex commands, until told to continue normal execution.
+- */
+- void
+- do_debug(char_u *cmd)
+- {
+- int save_msg_scroll = msg_scroll;
+- int save_State = State;
+- int save_did_emsg = did_emsg;
+- int save_cmd_silent = cmd_silent;
+- int save_msg_silent = msg_silent;
+- int save_emsg_silent = emsg_silent;
+- int save_redir_off = redir_off;
+- tasave_T typeaheadbuf;
+- int typeahead_saved = FALSE;
+- int save_ignore_script = 0;
+- int save_ex_normal_busy;
+- int n;
+- char_u *cmdline = NULL;
+- char_u *p;
+- char *tail = NULL;
+- static int last_cmd = 0;
+- #define CMD_CONT 1
+- #define CMD_NEXT 2
+- #define CMD_STEP 3
+- #define CMD_FINISH 4
+- #define CMD_QUIT 5
+- #define CMD_INTERRUPT 6
+- #define CMD_BACKTRACE 7
+- #define CMD_FRAME 8
+- #define CMD_UP 9
+- #define CMD_DOWN 10
+-
+- #ifdef ALWAYS_USE_GUI
+- /* Can't do this when there is no terminal for input/output. */
+- if (!gui.in_use)
+- {
+- /* Break as soon as possible. */
+- debug_break_level = 9999;
+- return;
+- }
+- #endif
+-
+- /* Make sure we are in raw mode and start termcap mode. Might have side
+- * effects... */
+- settmode(TMODE_RAW);
+- starttermcap();
+-
+- ++RedrawingDisabled; /* don't redisplay the window */
+- ++no_wait_return; /* don't wait for return */
+- did_emsg = FALSE; /* don't use error from debugged stuff */
+- cmd_silent = FALSE; /* display commands */
+- msg_silent = FALSE; /* display messages */
+- emsg_silent = FALSE; /* display error messages */
+- redir_off = TRUE; /* don't redirect debug commands */
+-
+- State = NORMAL;
+- debug_mode = TRUE;
+-
+- if (!debug_did_msg)
+- msg(_("Entering Debug mode. Type \"cont\" to continue."));
+- if (debug_oldval != NULL)
+- {
+- smsg(_("Oldval = \"%s\""), debug_oldval);
+- vim_free(debug_oldval);
+- debug_oldval = NULL;
+- }
+- if (debug_newval != NULL)
+- {
+- smsg(_("Newval = \"%s\""), debug_newval);
+- vim_free(debug_newval);
+- debug_newval = NULL;
+- }
+- if (sourcing_name != NULL)
+- msg((char *)sourcing_name);
+- if (sourcing_lnum != 0)
+- smsg(_("line %ld: %s"), (long)sourcing_lnum, cmd);
+- else
+- smsg(_("cmd: %s"), cmd);
+- /*
+- * Repeat getting a command and executing it.
+- */
+- for (;;)
+- {
+- msg_scroll = TRUE;
+- need_wait_return = FALSE;
+-
+- /* Save the current typeahead buffer and replace it with an empty one.
+- * This makes sure we get input from the user here and don't interfere
+- * with the commands being executed. Reset "ex_normal_busy" to avoid
+- * the side effects of using ":normal". Save the stuff buffer and make
+- * it empty. Set ignore_script to avoid reading from script input. */
+- save_ex_normal_busy = ex_normal_busy;
+- ex_normal_busy = 0;
+- if (!debug_greedy)
+- {
+- save_typeahead(&typeaheadbuf);
+- typeahead_saved = TRUE;
+- save_ignore_script = ignore_script;
+- ignore_script = TRUE;
+- }
+-
+- vim_free(cmdline);
+- cmdline = getcmdline_prompt('>', NULL, 0, EXPAND_NOTHING, NULL);
+-
+- if (typeahead_saved)
+- {
+- restore_typeahead(&typeaheadbuf);
+- ignore_script = save_ignore_script;
+- }
+- ex_normal_busy = save_ex_normal_busy;
+-
+- cmdline_row = msg_row;
+- msg_starthere();
+- if (cmdline != NULL)
+- {
+- /* If this is a debug command, set "last_cmd".
+- * If not, reset "last_cmd".
+- * For a blank line use previous command. */
+- p = skipwhite(cmdline);
+- if (*p != NUL)
+- {
+- switch (*p)
+- {
+- case 'c': last_cmd = CMD_CONT;
+- tail = "ont";
+- break;
+- case 'n': last_cmd = CMD_NEXT;
+- tail = "ext";
+- break;
+- case 's': last_cmd = CMD_STEP;
+- tail = "tep";
+- break;
+- case 'f':
+- last_cmd = 0;
+- if (p[1] == 'r')
+- {
+- last_cmd = CMD_FRAME;
+- tail = "rame";
+- }
+- else
+- {
+- last_cmd = CMD_FINISH;
+- tail = "inish";
+- }
+- break;
+- case 'q': last_cmd = CMD_QUIT;
+- tail = "uit";
+- break;
+- case 'i': last_cmd = CMD_INTERRUPT;
+- tail = "nterrupt";
+- break;
+- case 'b': last_cmd = CMD_BACKTRACE;
+- if (p[1] == 't')
+- tail = "t";
+- else
+- tail = "acktrace";
+- break;
+- case 'w': last_cmd = CMD_BACKTRACE;
+- tail = "here";
+- break;
+- case 'u': last_cmd = CMD_UP;
+- tail = "p";
+- break;
+- case 'd': last_cmd = CMD_DOWN;
+- tail = "own";
+- break;
+- default: last_cmd = 0;
+- }
+- if (last_cmd != 0)
+- {
+- /* Check that the tail matches. */
+- ++p;
+- while (*p != NUL && *p == *tail)
+- {
+- ++p;
+- ++tail;
+- }
+- if (ASCII_ISALPHA(*p) && last_cmd != CMD_FRAME)
+- last_cmd = 0;
+- }
+- }
+-
+- if (last_cmd != 0)
+- {
+- /* Execute debug command: decided where to break next and
+- * return. */
+- switch (last_cmd)
+- {
+- case CMD_CONT:
+- debug_break_level = -1;
+- break;
+- case CMD_NEXT:
+- debug_break_level = ex_nesting_level;
+- break;
+- case CMD_STEP:
+- debug_break_level = 9999;
+- break;
+- case CMD_FINISH:
+- debug_break_level = ex_nesting_level - 1;
+- break;
+- case CMD_QUIT:
+- got_int = TRUE;
+- debug_break_level = -1;
+- break;
+- case CMD_INTERRUPT:
+- got_int = TRUE;
+- debug_break_level = 9999;
+- /* Do not repeat ">interrupt" cmd, continue stepping. */
+- last_cmd = CMD_STEP;
+- break;
+- case CMD_BACKTRACE:
+- do_showbacktrace(cmd);
+- continue;
+- case CMD_FRAME:
+- if (*p == NUL)
+- {
+- do_showbacktrace(cmd);
+- }
+- else
+- {
+- p = skipwhite(p);
+- do_setdebugtracelevel(p);
+- }
+- continue;
+- case CMD_UP:
+- debug_backtrace_level++;
+- do_checkbacktracelevel();
+- continue;
+- case CMD_DOWN:
+- debug_backtrace_level--;
+- do_checkbacktracelevel();
+- continue;
+- }
+- /* Going out reset backtrace_level */
+- debug_backtrace_level = 0;
+- break;
+- }
+-
+- /* don't debug this command */
+- n = debug_break_level;
+- debug_break_level = -1;
+- (void)do_cmdline(cmdline, getexline, NULL,
+- DOCMD_VERBOSE|DOCMD_EXCRESET);
+- debug_break_level = n;
+- }
+- lines_left = Rows - 1;
+- }
+- vim_free(cmdline);
+-
+- --RedrawingDisabled;
+- --no_wait_return;
+- redraw_all_later(NOT_VALID);
+- need_wait_return = FALSE;
+- msg_scroll = save_msg_scroll;
+- lines_left = Rows - 1;
+- State = save_State;
+- debug_mode = FALSE;
+- did_emsg = save_did_emsg;
+- cmd_silent = save_cmd_silent;
+- msg_silent = save_msg_silent;
+- emsg_silent = save_emsg_silent;
+- redir_off = save_redir_off;
+-
+- /* Only print the message again when typing a command before coming back
+- * here. */
+- debug_did_msg = TRUE;
+- }
+-
+- static int
+- get_maxbacktrace_level(void)
+- {
+- char *p, *q;
+- int maxbacktrace = 0;
+-
+- if (sourcing_name != NULL)
+- {
+- p = (char *)sourcing_name;
+- while ((q = strstr(p, "..")) != NULL)
+- {
+- p = q + 2;
+- maxbacktrace++;
+- }
+- }
+- return maxbacktrace;
+- }
+-
+- static void
+- do_setdebugtracelevel(char_u *arg)
+- {
+- int level;
+-
+- level = atoi((char *)arg);
+- if (*arg == '+' || level < 0)
+- debug_backtrace_level += level;
+- else
+- debug_backtrace_level = level;
+-
+- do_checkbacktracelevel();
+- }
+-
+- static void
+- do_checkbacktracelevel(void)
+- {
+- if (debug_backtrace_level < 0)
+- {
+- debug_backtrace_level = 0;
+- msg(_("frame is zero"));
+- }
+- else
+- {
+- int max = get_maxbacktrace_level();
+-
+- if (debug_backtrace_level > max)
+- {
+- debug_backtrace_level = max;
+- smsg(_("frame at highest level: %d"), max);
+- }
+- }
+- }
+-
+- static void
+- do_showbacktrace(char_u *cmd)
+- {
+- char *cur;
+- char *next;
+- int i = 0;
+- int max = get_maxbacktrace_level();
+-
+- if (sourcing_name != NULL)
+- {
+- cur = (char *)sourcing_name;
+- while (!got_int)
+- {
+- next = strstr(cur, "..");
+- if (next != NULL)
+- *next = NUL;
+- if (i == max - debug_backtrace_level)
+- smsg("->%d %s", max - i, cur);
+- else
+- smsg(" %d %s", max - i, cur);
+- ++i;
+- if (next == NULL)
+- break;
+- *next = '.';
+- cur = next + 2;
+- }
+- }
+- if (sourcing_lnum != 0)
+- smsg(_("line %ld: %s"), (long)sourcing_lnum, cmd);
+- else
+- smsg(_("cmd: %s"), cmd);
+- }
+-
+- /*
+- * ":debug".
+- */
+- void
+- ex_debug(exarg_T *eap)
+- {
+- int debug_break_level_save = debug_break_level;
+-
+- debug_break_level = 9999;
+- do_cmdline_cmd(eap->arg);
+- debug_break_level = debug_break_level_save;
+- }
+-
+- static char_u *debug_breakpoint_name = NULL;
+- static linenr_T debug_breakpoint_lnum;
+-
+- /*
+- * When debugging or a breakpoint is set on a skipped command, no debug prompt
+- * is shown by do_one_cmd(). This situation is indicated by debug_skipped, and
+- * debug_skipped_name is then set to the source name in the breakpoint case. If
+- * a skipped command decides itself that a debug prompt should be displayed, it
+- * can do so by calling dbg_check_skipped().
+- */
+- static int debug_skipped;
+- static char_u *debug_skipped_name;
+-
+- /*
+- * Go to debug mode when a breakpoint was encountered or "ex_nesting_level" is
+- * at or below the break level. But only when the line is actually
+- * executed. Return TRUE and set breakpoint_name for skipped commands that
+- * decide to execute something themselves.
+- * Called from do_one_cmd() before executing a command.
+- */
+- void
+- dbg_check_breakpoint(exarg_T *eap)
+- {
+- char_u *p;
+-
+- debug_skipped = FALSE;
+- if (debug_breakpoint_name != NULL)
+- {
+- if (!eap->skip)
+- {
+- /* replace K_SNR with "<SNR>" */
+- if (debug_breakpoint_name[0] == K_SPECIAL
+- && debug_breakpoint_name[1] == KS_EXTRA
+- && debug_breakpoint_name[2] == (int)KE_SNR)
+- p = (char_u *)"<SNR>";
+- else
+- p = (char_u *)"";
+- smsg(_("Breakpoint in \"%s%s\" line %ld"),
+- p,
+- debug_breakpoint_name + (*p == NUL ? 0 : 3),
+- (long)debug_breakpoint_lnum);
+- debug_breakpoint_name = NULL;
+- do_debug(eap->cmd);
+- }
+- else
+- {
+- debug_skipped = TRUE;
+- debug_skipped_name = debug_breakpoint_name;
+- debug_breakpoint_name = NULL;
+- }
+- }
+- else if (ex_nesting_level <= debug_break_level)
+- {
+- if (!eap->skip)
+- do_debug(eap->cmd);
+- else
+- {
+- debug_skipped = TRUE;
+- debug_skipped_name = NULL;
+- }
+- }
+- }
+-
+- /*
+- * Go to debug mode if skipped by dbg_check_breakpoint() because eap->skip was
+- * set. Return TRUE when the debug mode is entered this time.
+- */
+- int
+- dbg_check_skipped(exarg_T *eap)
+- {
+- int prev_got_int;
+-
+- if (debug_skipped)
+- {
+- /*
+- * Save the value of got_int and reset it. We don't want a previous
+- * interruption cause flushing the input buffer.
+- */
+- prev_got_int = got_int;
+- got_int = FALSE;
+- debug_breakpoint_name = debug_skipped_name;
+- /* eap->skip is TRUE */
+- eap->skip = FALSE;
+- (void)dbg_check_breakpoint(eap);
+- eap->skip = TRUE;
+- got_int |= prev_got_int;
+- return TRUE;
+- }
+- return FALSE;
+- }
+-
+- /*
+- * The list of breakpoints: dbg_breakp.
+- * This is a grow-array of structs.
+- */
+- struct debuggy
+- {
+- int dbg_nr; /* breakpoint number */
+- int dbg_type; /* DBG_FUNC, DBG_FILE or DBG_EXPR */
+- char_u *dbg_name; /* function, expression or file name */
+- regprog_T *dbg_prog; /* regexp program */
+- linenr_T dbg_lnum; /* line number in function or file */
+- int dbg_forceit; /* ! used */
+- #ifdef FEAT_EVAL
+- typval_T *dbg_val; /* last result of watchexpression */
+- #endif
+- int dbg_level; /* stored nested level for expr */
+- };
+-
+- static garray_T dbg_breakp = {0, 0, sizeof(struct debuggy), 4, NULL};
+- #define BREAKP(idx) (((struct debuggy *)dbg_breakp.ga_data)[idx])
+- #define DEBUGGY(gap, idx) (((struct debuggy *)gap->ga_data)[idx])
+- static int last_breakp = 0; /* nr of last defined breakpoint */
+-
+- #ifdef FEAT_PROFILE
+- /* Profiling uses file and func names similar to breakpoints. */
+- static garray_T prof_ga = {0, 0, sizeof(struct debuggy), 4, NULL};
+- #endif
+- #define DBG_FUNC 1
+- #define DBG_FILE 2
+- #define DBG_EXPR 3
+-
+- static linenr_T debuggy_find(int file,char_u *fname, linenr_T after, garray_T *gap, int *fp);
+-
+- /*
+- * Parse the arguments of ":profile", ":breakadd" or ":breakdel" and put them
+- * in the entry just after the last one in dbg_breakp. Note that "dbg_name"
+- * is allocated.
+- * Returns FAIL for failure.
+- */
+- static int
+- dbg_parsearg(
+- char_u *arg,
+- garray_T *gap) /* either &dbg_breakp or &prof_ga */
+- {
+- char_u *p = arg;
+- char_u *q;
+- struct debuggy *bp;
+- int here = FALSE;
+-
+- if (ga_grow(gap, 1) == FAIL)
+- return FAIL;
+- bp = &DEBUGGY(gap, gap->ga_len);
+-
+- /* Find "func" or "file". */
+- if (STRNCMP(p, "func", 4) == 0)
+- bp->dbg_type = DBG_FUNC;
+- else if (STRNCMP(p, "file", 4) == 0)
+- bp->dbg_type = DBG_FILE;
+- else if (
+- #ifdef FEAT_PROFILE
+- gap != &prof_ga &&
+- #endif
+- STRNCMP(p, "here", 4) == 0)
+- {
+- if (curbuf->b_ffname == NULL)
+- {
+- emsg(_(e_noname));
+- return FAIL;
+- }
+- bp->dbg_type = DBG_FILE;
+- here = TRUE;
+- }
+- else if (
+- #ifdef FEAT_PROFILE
+- gap != &prof_ga &&
+- #endif
+- STRNCMP(p, "expr", 4) == 0)
+- bp->dbg_type = DBG_EXPR;
+- else
+- {
+- semsg(_(e_invarg2), p);
+- return FAIL;
+- }
+- p = skipwhite(p + 4);
+-
+- /* Find optional line number. */
+- if (here)
+- bp->dbg_lnum = curwin->w_cursor.lnum;
+- else if (
+- #ifdef FEAT_PROFILE
+- gap != &prof_ga &&
+- #endif
+- VIM_ISDIGIT(*p))
+- {
+- bp->dbg_lnum = getdigits(&p);
+- p = skipwhite(p);
+- }
+- else
+- bp->dbg_lnum = 0;
+-
+- /* Find the function or file name. Don't accept a function name with (). */
+- if ((!here && *p == NUL)
+- || (here && *p != NUL)
+- || (bp->dbg_type == DBG_FUNC && strstr((char *)p, "()") != NULL))
+- {
+- semsg(_(e_invarg2), arg);
+- return FAIL;
+- }
+-
+- if (bp->dbg_type == DBG_FUNC)
+- bp->dbg_name = vim_strsave(p);
+- else if (here)
+- bp->dbg_name = vim_strsave(curbuf->b_ffname);
+- else if (bp->dbg_type == DBG_EXPR)
+- {
+- bp->dbg_name = vim_strsave(p);
+- if (bp->dbg_name != NULL)
+- bp->dbg_val = eval_expr(bp->dbg_name, NULL);
+- }
+- else
+- {
+- /* Expand the file name in the same way as do_source(). This means
+- * doing it twice, so that $DIR/file gets expanded when $DIR is
+- * "~/dir". */
+- q = expand_env_save(p);
+- if (q == NULL)
+- return FAIL;
+- p = expand_env_save(q);
+- vim_free(q);
+- if (p == NULL)
+- return FAIL;
+- if (*p != '*')
+- {
+- bp->dbg_name = fix_fname(p);
+- vim_free(p);
+- }
+- else
+- bp->dbg_name = p;
+- }
+-
+- if (bp->dbg_name == NULL)
+- return FAIL;
+- return OK;
+- }
+-
+- /*
+- * ":breakadd". Also used for ":profile".
+- */
+- void
+- ex_breakadd(exarg_T *eap)
+- {
+- struct debuggy *bp;
+- char_u *pat;
+- garray_T *gap;
+-
+- gap = &dbg_breakp;
+- #ifdef FEAT_PROFILE
+- if (eap->cmdidx == CMD_profile)
+- gap = &prof_ga;
+- #endif
+-
+- if (dbg_parsearg(eap->arg, gap) == OK)
+- {
+- bp = &DEBUGGY(gap, gap->ga_len);
+- bp->dbg_forceit = eap->forceit;
+-
+- if (bp->dbg_type != DBG_EXPR)
+- {
+- pat = file_pat_to_reg_pat(bp->dbg_name, NULL, NULL, FALSE);
+- if (pat != NULL)
+- {
+- bp->dbg_prog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
+- vim_free(pat);
+- }
+- if (pat == NULL || bp->dbg_prog == NULL)
+- vim_free(bp->dbg_name);
+- else
+- {
+- if (bp->dbg_lnum == 0) /* default line number is 1 */
+- bp->dbg_lnum = 1;
+- #ifdef FEAT_PROFILE
+- if (eap->cmdidx != CMD_profile)
+- #endif
+- {
+- DEBUGGY(gap, gap->ga_len).dbg_nr = ++last_breakp;
+- ++debug_tick;
+- }
+- ++gap->ga_len;
+- }
+- }
+- else
+- {
+- /* DBG_EXPR */
+- DEBUGGY(gap, gap->ga_len++).dbg_nr = ++last_breakp;
+- ++debug_tick;
+- }
+- }
+- }
+-
+- /*
+- * ":debuggreedy".
+- */
+- void
+- ex_debuggreedy(exarg_T *eap)
+- {
+- if (eap->addr_count == 0 || eap->line2 != 0)
+- debug_greedy = TRUE;
+- else
+- debug_greedy = FALSE;
+- }
+-
+- /*
+- * ":breakdel" and ":profdel".
+- */
+- void
+- ex_breakdel(exarg_T *eap)
+- {
+- struct debuggy *bp, *bpi;
+- int nr;
+- int todel = -1;
+- int del_all = FALSE;
+- int i;
+- linenr_T best_lnum = 0;
+- garray_T *gap;
+-
+- gap = &dbg_breakp;
+- if (eap->cmdidx == CMD_profdel)
+- {
+- #ifdef FEAT_PROFILE
+- gap = &prof_ga;
+- #else
+- ex_ni(eap);
+- return;
+- #endif
+- }
+-
+- if (vim_isdigit(*eap->arg))
+- {
+- /* ":breakdel {nr}" */
+- nr = atol((char *)eap->arg);
+- for (i = 0; i < gap->ga_len; ++i)
+- if (DEBUGGY(gap, i).dbg_nr == nr)
+- {
+- todel = i;
+- break;
+- }
+- }
+- else if (*eap->arg == '*')
+- {
+- todel = 0;
+- del_all = TRUE;
+- }
+- else
+- {
+- /* ":breakdel {func|file|expr} [lnum] {name}" */
+- if (dbg_parsearg(eap->arg, gap) == FAIL)
+- return;
+- bp = &DEBUGGY(gap, gap->ga_len);
+- for (i = 0; i < gap->ga_len; ++i)
+- {
+- bpi = &DEBUGGY(gap, i);
+- if (bp->dbg_type == bpi->dbg_type
+- && STRCMP(bp->dbg_name, bpi->dbg_name) == 0
+- && (bp->dbg_lnum == bpi->dbg_lnum
+- || (bp->dbg_lnum == 0
+- && (best_lnum == 0
+- || bpi->dbg_lnum < best_lnum))))
+- {
+- todel = i;
+- best_lnum = bpi->dbg_lnum;
+- }
+- }
+- vim_free(bp->dbg_name);
+- }
+-
+- if (todel < 0)
+- semsg(_("E161: Breakpoint not found: %s"), eap->arg);
+- else
+- {
+- while (gap->ga_len > 0)
+- {
+- vim_free(DEBUGGY(gap, todel).dbg_name);
+- #ifdef FEAT_EVAL
+- if (DEBUGGY(gap, todel).dbg_type == DBG_EXPR
+- && DEBUGGY(gap, todel).dbg_val != NULL)
+- free_tv(DEBUGGY(gap, todel).dbg_val);
+- #endif
+- vim_regfree(DEBUGGY(gap, todel).dbg_prog);
+- --gap->ga_len;
+- if (todel < gap->ga_len)
+- mch_memmove(&DEBUGGY(gap, todel), &DEBUGGY(gap, todel + 1),
+- (gap->ga_len - todel) * sizeof(struct debuggy));
+- #ifdef FEAT_PROFILE
+- if (eap->cmdidx == CMD_breakdel)
+- #endif
+- ++debug_tick;
+- if (!del_all)
+- break;
+- }
+-
+- /* If all breakpoints were removed clear the array. */
+- if (gap->ga_len == 0)
+- ga_clear(gap);
+- }
+- }
+-
+- /*
+- * ":breaklist".
+- */
+- void
+- ex_breaklist(exarg_T *eap UNUSED)
+- {
+- struct debuggy *bp;
+- int i;
+-
+- if (dbg_breakp.ga_len == 0)
+- msg(_("No breakpoints defined"));
+- else
+- for (i = 0; i < dbg_breakp.ga_len; ++i)
+- {
+- bp = &BREAKP(i);
+- if (bp->dbg_type == DBG_FILE)
+- home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE);
+- if (bp->dbg_type != DBG_EXPR)
+- smsg(_("%3d %s %s line %ld"),
+- bp->dbg_nr,
+- bp->dbg_type == DBG_FUNC ? "func" : "file",
+- bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff,
+- (long)bp->dbg_lnum);
+- else
+- smsg(_("%3d expr %s"),
+- bp->dbg_nr, bp->dbg_name);
+- }
+- }
+-
+- /*
+- * Find a breakpoint for a function or sourced file.
+- * Returns line number at which to break; zero when no matching breakpoint.
+- */
+- linenr_T
+- dbg_find_breakpoint(
+- int file, /* TRUE for a file, FALSE for a function */
+- char_u *fname, /* file or function name */
+- linenr_T after) /* after this line number */
+- {
+- return debuggy_find(file, fname, after, &dbg_breakp, NULL);
+- }
+-
+- #if defined(FEAT_PROFILE) || defined(PROTO)
+- /*
+- * Return TRUE if profiling is on for a function or sourced file.
+- */
+- int
+- has_profiling(
+- int file, /* TRUE for a file, FALSE for a function */
+- char_u *fname, /* file or function name */
+- int *fp) /* return: forceit */
+- {
+- return (debuggy_find(file, fname, (linenr_T)0, &prof_ga, fp)
+- != (linenr_T)0);
+- }
+- #endif
+-
+- /*
+- * Common code for dbg_find_breakpoint() and has_profiling().
+- */
+- static linenr_T
+- debuggy_find(
+- int file, /* TRUE for a file, FALSE for a function */
+- char_u *fname, /* file or function name */
+- linenr_T after, /* after this line number */
+- garray_T *gap, /* either &dbg_breakp or &prof_ga */
+- int *fp) /* if not NULL: return forceit */
+- {
+- struct debuggy *bp;
+- int i;
+- linenr_T lnum = 0;
+- char_u *name = fname;
+- int prev_got_int;
+-
+- /* Return quickly when there are no breakpoints. */
+- if (gap->ga_len == 0)
+- return (linenr_T)0;
+-
+- /* Replace K_SNR in function name with "<SNR>". */
+- if (!file && fname[0] == K_SPECIAL)
+- {
+- name = alloc((unsigned)STRLEN(fname) + 3);
+- if (name == NULL)
+- name = fname;
+- else
+- {
+- STRCPY(name, "<SNR>");
+- STRCPY(name + 5, fname + 3);
+- }
+- }
+-
+- for (i = 0; i < gap->ga_len; ++i)
+- {
+- /* Skip entries that are not useful or are for a line that is beyond
+- * an already found breakpoint. */
+- bp = &DEBUGGY(gap, i);
+- if (((bp->dbg_type == DBG_FILE) == file &&
+- bp->dbg_type != DBG_EXPR && (
+- #ifdef FEAT_PROFILE
+- gap == &prof_ga ||
+- #endif
+- (bp->dbg_lnum > after && (lnum == 0 || bp->dbg_lnum < lnum)))))
+- {
+- /*
+- * Save the value of got_int and reset it. We don't want a
+- * previous interruption cancel matching, only hitting CTRL-C
+- * while matching should abort it.
+- */
+- prev_got_int = got_int;
+- got_int = FALSE;
+- if (vim_regexec_prog(&bp->dbg_prog, FALSE, name, (colnr_T)0))
+- {
+- lnum = bp->dbg_lnum;
+- if (fp != NULL)
+- *fp = bp->dbg_forceit;
+- }
+- got_int |= prev_got_int;
+- }
+- #ifdef FEAT_EVAL
+- else if (bp->dbg_type == DBG_EXPR)
+- {
+- typval_T *tv;
+- int line = FALSE;
+-
+- prev_got_int = got_int;
+- got_int = FALSE;
+-
+- tv = eval_expr(bp->dbg_name, NULL);
+- if (tv != NULL)
+- {
+- if (bp->dbg_val == NULL)
+- {
+- debug_oldval = typval_tostring(NULL);
+- bp->dbg_val = tv;
+- debug_newval = typval_tostring(bp->dbg_val);
+- line = TRUE;
+- }
+- else
+- {
+- if (typval_compare(tv, bp->dbg_val, TYPE_EQUAL,
+- TRUE, FALSE) == OK
+- && tv->vval.v_number == FALSE)
+- {
+- typval_T *v;
+-
+- line = TRUE;
+- debug_oldval = typval_tostring(bp->dbg_val);
+- /* Need to evaluate again, typval_compare() overwrites
+- * "tv". */
+- v = eval_expr(bp->dbg_name, NULL);
+- debug_newval = typval_tostring(v);
+- free_tv(bp->dbg_val);
+- bp->dbg_val = v;
+- }
+- free_tv(tv);
+- }
+- }
+- else if (bp->dbg_val != NULL)
+- {
+- debug_oldval = typval_tostring(bp->dbg_val);
+- debug_newval = typval_tostring(NULL);
+- free_tv(bp->dbg_val);
+- bp->dbg_val = NULL;
+- line = TRUE;
+- }
+-
+- if (line)
+- {
+- lnum = after > 0 ? after : 1;
+- break;
+- }
+-
+- got_int |= prev_got_int;
+- }
+- #endif
+- }
+- if (name != fname)
+- vim_free(name);
+-
+- return lnum;
+- }
+-
+- /*
+- * Called when a breakpoint was encountered.
+- */
+- void
+- dbg_breakpoint(char_u *name, linenr_T lnum)
+- {
+- /* We need to check if this line is actually executed in do_one_cmd() */
+- debug_breakpoint_name = name;
+- debug_breakpoint_lnum = lnum;
+- }
+-
+-
+ # if defined(FEAT_PROFILE) || defined(FEAT_RELTIME) || defined(PROTO)
+ /*
+ * Store the current time in "tm".
+--- 66,71 ----
+*** ../vim-8.1.1194/src/proto.h 2019-03-30 13:53:26.174425093 +0100
+--- src/proto.h 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 68,73 ****
+--- 68,74 ----
+ # ifdef FEAT_CSCOPE
+ # include "if_cscope.pro"
+ # endif
++ # include "debugger.pro"
+ # include "dict.pro"
+ # include "diff.pro"
+ # include "digraph.pro"
+*** ../vim-8.1.1194/src/proto/debugger.pro 2019-04-21 11:33:08.875781192 +0200
+--- src/proto/debugger.pro 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 0 ****
+--- 1,14 ----
++ /* debugger.c */
++ int has_watchexpr(void);
++ void do_debug(char_u *cmd);
++ void ex_debug(exarg_T *eap);
++ void dbg_check_breakpoint(exarg_T *eap);
++ int dbg_check_skipped(exarg_T *eap);
++ void ex_breakadd(exarg_T *eap);
++ void ex_debuggreedy(exarg_T *eap);
++ void ex_breakdel(exarg_T *eap);
++ void ex_breaklist(exarg_T *eap);
++ linenr_T dbg_find_breakpoint(int file, char_u *fname, linenr_T after);
++ int has_profiling(int file, char_u *fname, int *fp);
++ void dbg_breakpoint(char_u *name, linenr_T lnum);
++ /* vim: set ft=c : */
+*** ../vim-8.1.1194/src/proto/ex_cmds2.pro 2019-04-04 18:15:05.770857065 +0200
+--- src/proto/ex_cmds2.pro 2019-04-21 11:18:57.688977840 +0200
+***************
+*** 1,16 ****
+ /* ex_cmds2.c */
+- int has_watchexpr(void);
+- void do_debug(char_u *cmd);
+- void ex_debug(exarg_T *eap);
+- void dbg_check_breakpoint(exarg_T *eap);
+- int dbg_check_skipped(exarg_T *eap);
+- void ex_breakadd(exarg_T *eap);
+- void ex_debuggreedy(exarg_T *eap);
+- void ex_breakdel(exarg_T *eap);
+- void ex_breaklist(exarg_T *eap);
+- linenr_T dbg_find_breakpoint(int file, char_u *fname, linenr_T after);
+- int has_profiling(int file, char_u *fname, int *fp);
+- void dbg_breakpoint(char_u *name, linenr_T lnum);
+ void profile_start(proftime_T *tm);
+ void profile_end(proftime_T *tm);
+ void profile_sub(proftime_T *tm, proftime_T *tm2);
+--- 1,4 ----
+*** ../vim-8.1.1194/src/version.c 2019-04-21 00:00:07.946354820 +0200
+--- src/version.c 2019-04-21 11:20:15.084493742 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1195,
+ /**/
+
+--
+FATHER: Make sure the Prince doesn't leave this room until I come and
+ get him.
+FIRST GUARD: Not ... to leave the room ... even if you come and get him.
+FATHER: No. Until I come and get him.
+SECOND GUARD: Hic.
+ "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.1196 b/data/vim/patches/8.1.1196
new file mode 100644
index 000000000..7519f991a
--- /dev/null
+++ b/data/vim/patches/8.1.1196
@@ -0,0 +1,262 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1196
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1196
+Problem: Parallel build may fail.
+Solution: Update dependencies.
+Files: src/Makefile
+
+
+*** ../vim-8.1.1195/src/Makefile 2019-04-21 11:34:36.335256531 +0200
+--- src/Makefile 2019-04-21 15:20:49.961667119 +0200
+***************
+*** 3432,3439 ****
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h
+ objects/debugger.o: debugger.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! os_mac.h ascii.h keymap.h term.h macros.h option.h beval.h structs.h \
+! regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.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 \
+--- 3432,3440 ----
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h
+ objects/debugger.o: debugger.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
+ 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 \
+***************
+*** 3482,3492 ****
+ 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
+! objects/findfile.o: findfile.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 libvterm/include/vterm.h \
+! libvterm/include/vterm_keycodes.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 \
+--- 3483,3492 ----
+ 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
+! objects/findfile.o: findfile.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
+ 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 \
+***************
+*** 3684,3699 ****
+ 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 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 \
+! ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm ../pixmaps/tb_save.xpm \
+! ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm ../pixmaps/tb_copy.xpm \
+! ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
+! ../pixmaps/tb_find_next.xpm ../pixmaps/tb_find_prev.xpm \
+! ../pixmaps/tb_find_help.xpm ../pixmaps/tb_exit.xpm \
+! ../pixmaps/tb_undo.xpm ../pixmaps/tb_redo.xpm ../pixmaps/tb_help.xpm \
+! ../pixmaps/tb_macro.xpm ../pixmaps/tb_make.xpm \
+ ../pixmaps/tb_save_all.xpm ../pixmaps/tb_jump.xpm \
+ ../pixmaps/tb_ctags.xpm ../pixmaps/tb_load_session.xpm \
+ ../pixmaps/tb_save_session.xpm ../pixmaps/tb_new_session.xpm \
+--- 3684,3698 ----
+ 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 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 ../pixmaps/tb_open.xpm \
+! ../pixmaps/tb_close.xpm ../pixmaps/tb_save.xpm ../pixmaps/tb_print.xpm \
+! ../pixmaps/tb_cut.xpm ../pixmaps/tb_copy.xpm ../pixmaps/tb_paste.xpm \
+! ../pixmaps/tb_find.xpm ../pixmaps/tb_find_next.xpm \
+! ../pixmaps/tb_find_prev.xpm ../pixmaps/tb_find_help.xpm \
+! ../pixmaps/tb_exit.xpm ../pixmaps/tb_undo.xpm ../pixmaps/tb_redo.xpm \
+! ../pixmaps/tb_help.xpm ../pixmaps/tb_macro.xpm ../pixmaps/tb_make.xpm \
+ ../pixmaps/tb_save_all.xpm ../pixmaps/tb_jump.xpm \
+ ../pixmaps/tb_ctags.xpm ../pixmaps/tb_load_session.xpm \
+ ../pixmaps/tb_save_session.xpm ../pixmaps/tb_new_session.xpm \
+***************
+*** 3713,3722 ****
+ 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 gui_at_sb.h gui_x11_pm.h \
+! ../pixmaps/tb_new.xpm ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm \
+! ../pixmaps/tb_save.xpm ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm \
+! ../pixmaps/tb_copy.xpm ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
+ ../pixmaps/tb_find_next.xpm ../pixmaps/tb_find_prev.xpm \
+ ../pixmaps/tb_find_help.xpm ../pixmaps/tb_exit.xpm \
+ ../pixmaps/tb_undo.xpm ../pixmaps/tb_redo.xpm ../pixmaps/tb_help.xpm \
+--- 3712,3721 ----
+ 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 gui_at_sb.h gui_x11_pm.h ../pixmaps/tb_new.xpm \
+! ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm ../pixmaps/tb_save.xpm \
+! ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm ../pixmaps/tb_copy.xpm \
+! ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
+ ../pixmaps/tb_find_next.xpm ../pixmaps/tb_find_prev.xpm \
+ ../pixmaps/tb_find_help.xpm ../pixmaps/tb_exit.xpm \
+ ../pixmaps/tb_undo.xpm ../pixmaps/tb_redo.xpm ../pixmaps/tb_help.xpm \
+***************
+*** 3737,3744 ****
+ 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 ../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 \
+--- 3736,3743 ----
+ 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 ../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 \
+***************
+*** 3842,3849 ****
+ 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 \
+! 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 \
+--- 3841,3848 ----
+ 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 \
+! 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 \
+***************
+*** 3851,3858 ****
+ 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 \
+! 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 \
+--- 3850,3857 ----
+ 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 \
+! 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 \
+***************
+*** 3860,3867 ****
+ 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 \
+! 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 \
+--- 3859,3866 ----
+ 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 \
+! 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 \
+***************
+*** 3869,3876 ****
+ 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 \
+! 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 \
+--- 3868,3875 ----
+ 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 \
+! 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 \
+***************
+*** 3878,3885 ****
+ 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 \
+! 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 \
+--- 3877,3884 ----
+ 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 \
+! 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 \
+***************
+*** 3887,3891 ****
+ 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 \
+! xdiff/xtypes.h xdiff/xutils.h \
+! xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+--- 3886,3890 ----
+ 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 \
+! xdiff/xtypes.h xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h \
+! xdiff/xemit.h
+*** ../vim-8.1.1195/src/version.c 2019-04-21 11:34:36.335256531 +0200
+--- src/version.c 2019-04-21 15:22:08.285222121 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1196,
+ /**/
+
+--
+Just think of all the things we haven't thought of yet.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1197 b/data/vim/patches/8.1.1197
new file mode 100644
index 000000000..921b17c29
--- /dev/null
+++ b/data/vim/patches/8.1.1197
@@ -0,0 +1,140 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1197
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1197
+Problem: When starting with multiple tabs file messages is confusing.
+Solution: Set 'shortmess' when loading the other tabs. (Christian Brabandt)
+Files: src/main.c, src/testdir/test_startup.vim,
+ src/testdir/dumps/Test_start_with_tabs.dump
+
+
+*** ../vim-8.1.1196/src/main.c 2019-04-04 18:15:05.770857065 +0200
+--- src/main.c 2019-04-21 15:44:36.733783118 +0200
+***************
+*** 2777,2782 ****
+--- 2777,2783 ----
+ int i;
+ int advance = TRUE;
+ win_T *win;
++ char_u *p_shm_save = NULL;
+
+ /*
+ * Don't execute Win/Buf Enter/Leave autocommands here
+***************
+*** 2812,2817 ****
+--- 2813,2829 ----
+ if (curtab->tp_next == NULL) /* just checking */
+ break;
+ goto_tabpage(0);
++ // Temporarily reset 'shm' option to not print fileinfo when
++ // loading the other buffers. This would overwrite the already
++ // existing fileinfo for the first tab.
++ if (i == 1)
++ {
++ char buf[100];
++
++ p_shm_save = vim_strsave(p_shm);
++ vim_snprintf(buf, 100, "F%s", p_shm);
++ set_option_value((char_u *)"shm", 0L, (char_u *)buf, 0);
++ }
+ }
+ else
+ {
+***************
+*** 2861,2866 ****
+--- 2873,2884 ----
+ }
+ }
+
++ if (p_shm_save != NULL)
++ {
++ set_option_value((char_u *)"shm", 0L, p_shm_save, 0);
++ vim_free(p_shm_save);
++ }
++
+ if (parmp->window_layout == WIN_TABS)
+ goto_tabpage(1);
+ --autocmd_no_enter;
+*** ../vim-8.1.1196/src/testdir/test_startup.vim 2019-02-22 13:42:00.276540703 +0100
+--- src/testdir/test_startup.vim 2019-04-21 15:51:38.395526953 +0200
+***************
+*** 1,6 ****
+--- 1,7 ----
+ " Tests for startup.
+
+ source shared.vim
++ source screendump.vim
+
+ " Check that loading startup.vim works.
+ func Test_startup_script()
+***************
+*** 547,549 ****
+--- 548,562 ----
+ let out = system(GetVimCommand() . ' -es -X -V1 -c "echon ''hello''" -cq')
+ call assert_equal('hello', out)
+ endfunc
++
++ func Test_start_with_tabs()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
++ let buf = RunVimInTerminal('-p a b c', {})
++ call VerifyScreenDump(buf, 'Test_start_with_tabs', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ endfunc
+*** ../vim-8.1.1196/src/testdir/dumps/Test_start_with_tabs.dump 2019-04-21 15:54:14.138672972 +0200
+--- src/testdir/dumps/Test_start_with_tabs.dump 2019-04-21 15:51:45.167490015 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +2&#ffffff0|a| | +8#0000001#e0e0e08|b| @1|c| | +1#0000000#ffffff0@64|X+8#0000001#e0e0e08
++ > +0#0000000#ffffff0@74
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |"+0#0000000&|a|"| |[|N|e|w| |F|i|l|e|]| @42|0|,|0|-|1| @8|A|l@1|
+*** ../vim-8.1.1196/src/version.c 2019-04-21 15:22:35.485067386 +0200
+--- src/version.c 2019-04-21 15:53:39.018866202 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1197,
+ /**/
+
+--
+ "To whoever finds this note -
+ I have been imprisoned by my father who wishes me to marry
+ against my will. Please please please please come and rescue me.
+ I am in the tall tower of Swamp Castle."
+ SIR LAUNCELOT's eyes light up with holy inspiration.
+ "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.1198 b/data/vim/patches/8.1.1198
new file mode 100644
index 000000000..101107ca8
--- /dev/null
+++ b/data/vim/patches/8.1.1198
@@ -0,0 +1,83 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1198
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1198
+Problem: Bracketed paste may remain active after Vim exists, because the
+ terminal emulater restores the setting.
+Solution: Set/reset bracketed paste mode before setting the terminal mode.
+ (closes #3579)
+Files: src/term.c
+
+
+*** ../vim-8.1.1197/src/term.c 2019-04-21 00:00:07.946354820 +0200
+--- src/term.c 2019-04-21 17:11:46.160560182 +0200
+***************
+*** 3496,3514 ****
+ #endif
+ #ifdef FEAT_MOUSE_TTY
+ if (tmode != TMODE_RAW)
+! mch_setmouse(FALSE); /* switch mouse off */
+ #endif
+! if (tmode != TMODE_RAW)
+! out_str(T_BD); /* disable bracketed paste mode */
+ out_flush();
+! mch_settmode(tmode); /* machine specific function */
+ cur_tmode = tmode;
+ #ifdef FEAT_MOUSE
+ if (tmode == TMODE_RAW)
+! setmouse(); /* may switch mouse on */
+ #endif
+- if (tmode == TMODE_RAW)
+- out_str(T_BE); /* enable bracketed paste mode */
+ out_flush();
+ }
+ #ifdef FEAT_TERMRESPONSE
+--- 3496,3518 ----
+ #endif
+ #ifdef FEAT_MOUSE_TTY
+ if (tmode != TMODE_RAW)
+! mch_setmouse(FALSE); // switch mouse off
+ #endif
+! if (termcap_active)
+! {
+! if (tmode != TMODE_RAW)
+! out_str(T_BD); // disable bracketed paste mode
+! else
+! out_str(T_BE); // enable bracketed paste mode (should
+! // be before mch_settmode().
+! }
+ out_flush();
+! mch_settmode(tmode); // machine specific function
+ cur_tmode = tmode;
+ #ifdef FEAT_MOUSE
+ if (tmode == TMODE_RAW)
+! setmouse(); // may switch mouse on
+ #endif
+ out_flush();
+ }
+ #ifdef FEAT_TERMRESPONSE
+*** ../vim-8.1.1197/src/version.c 2019-04-21 15:54:29.606587753 +0200
+--- src/version.c 2019-04-21 17:08:36.253637095 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1198,
+ /**/
+
+--
+Even got a Datapoint 3600(?) with a DD50 connector instead of the
+usual DB25... what a nightmare trying to figure out the pinout
+for *that* with no spex...
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1199 b/data/vim/patches/8.1.1199
new file mode 100644
index 000000000..8679f825f
--- /dev/null
+++ b/data/vim/patches/8.1.1199
@@ -0,0 +1,99 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1199
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1199
+Problem: No test for :abclear.
+Solution: Add a test. (Dominique Pelle, closes #4292)
+Files: src/testdir/test_mapping.vim
+
+
+*** ../vim-8.1.1198/src/testdir/test_mapping.vim 2019-03-26 22:46:01.885928372 +0100
+--- src/testdir/test_mapping.vim 2019-04-23 16:33:42.161016524 +0200
+***************
+*** 11,16 ****
+--- 11,72 ----
+ set nomodified
+ endfunc
+
++ func Test_abclear()
++ abbrev foo foobar
++ iabbrev fooi foobari
++ cabbrev fooc foobarc
++ call assert_equal("\n\n"
++ \ .. "c fooc foobarc\n"
++ \ .. "i fooi foobari\n"
++ \ .. "! foo foobar", execute('abbrev'))
++
++ iabclear
++ call assert_equal("\n\n"
++ \ .. "c fooc foobarc\n"
++ \ .. "c foo foobar", execute('abbrev'))
++ abbrev foo foobar
++ iabbrev fooi foobari
++
++ cabclear
++ call assert_equal("\n\n"
++ \ .. "i fooi foobari\n"
++ \ .. "i foo foobar", execute('abbrev'))
++ abbrev foo foobar
++ cabbrev fooc foobarc
++
++ abclear
++ call assert_equal("\n\nNo abbreviation found", execute('abbrev'))
++ endfunc
++
++ func Test_abclear_buffer()
++ abbrev foo foobar
++ new X1
++ abbrev <buffer> foo1 foobar1
++ new X2
++ abbrev <buffer> foo2 foobar2
++
++ call assert_equal("\n\n"
++ \ .. "! foo2 @foobar2\n"
++ \ .. "! foo foobar", execute('abbrev'))
++
++ abclear <buffer>
++ call assert_equal("\n\n"
++ \ .. "! foo foobar", execute('abbrev'))
++
++ b X1
++ call assert_equal("\n\n"
++ \ .. "! foo1 @foobar1\n"
++ \ .. "! foo foobar", execute('abbrev'))
++ abclear <buffer>
++ call assert_equal("\n\n"
++ \ .. "! foo foobar", execute('abbrev'))
++
++ abclear
++ call assert_equal("\n\nNo abbreviation found", execute('abbrev'))
++
++ %bwipe
++ endfunc
++
+ func Test_map_ctrl_c_insert()
+ " mapping of ctrl-c in Insert mode
+ set cpo-=< cpo-=k
+*** ../vim-8.1.1198/src/version.c 2019-04-21 17:22:29.749014298 +0200
+--- src/version.c 2019-04-23 16:35:21.476465071 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1199,
+ /**/
+
+--
+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.1200 b/data/vim/patches/8.1.1200
new file mode 100644
index 000000000..212f29e1a
--- /dev/null
+++ b/data/vim/patches/8.1.1200
@@ -0,0 +1,740 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1200
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1200
+Problem: Old style comments in debugger source.
+Solution: Use new style comments. (Yegappan Lakshmanan, closes #4286)
+Files: src/README.md, src/debugger.c
+
+
+*** ../vim-8.1.1199/src/README.md 2019-03-31 15:31:54.592053004 +0200
+--- src/README.md 2019-04-23 18:36:55.603847919 +0200
+***************
+*** 25,30 ****
+--- 25,31 ----
+ --------- | -----------
+ autocmd.c | autocommands
+ buffer.c | manipulating buffers (loaded files)
++ debugger.c | vim script debugger
+ diff.c | diff mode (vimdiff)
+ eval.c | expression evaluation
+ fileio.c | reading and writing files
+*** ../vim-8.1.1199/src/debugger.c 2019-04-21 11:34:36.335256531 +0200
+--- src/debugger.c 2019-04-23 18:36:55.603847919 +0200
+***************
+*** 14,28 ****
+ #include "vim.h"
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+! static int debug_greedy = FALSE; /* batch mode debugging: don't save
+! and restore typeahead. */
+ static void do_setdebugtracelevel(char_u *arg);
+ static void do_checkbacktracelevel(void);
+ static void do_showbacktrace(char_u *cmd);
+
+! static char_u *debug_oldval = NULL; /* old and newval for debug expressions */
+ static char_u *debug_newval = NULL;
+! static int debug_expr = 0; /* use debug_expr */
+
+ int
+ has_watchexpr(void)
+--- 14,28 ----
+ #include "vim.h"
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+! static int debug_greedy = FALSE; // batch mode debugging: don't save
+! // and restore typeahead.
+ static void do_setdebugtracelevel(char_u *arg);
+ static void do_checkbacktracelevel(void);
+ static void do_showbacktrace(char_u *cmd);
+
+! static char_u *debug_oldval = NULL; // old and newval for debug expressions
+ static char_u *debug_newval = NULL;
+! static int debug_expr = 0; // use debug_expr
+
+ int
+ has_watchexpr(void)
+***************
+*** 65,91 ****
+ #define CMD_DOWN 10
+
+ #ifdef ALWAYS_USE_GUI
+! /* Can't do this when there is no terminal for input/output. */
+ if (!gui.in_use)
+ {
+! /* Break as soon as possible. */
+ debug_break_level = 9999;
+ return;
+ }
+ #endif
+
+! /* Make sure we are in raw mode and start termcap mode. Might have side
+! * effects... */
+ settmode(TMODE_RAW);
+ starttermcap();
+
+! ++RedrawingDisabled; /* don't redisplay the window */
+! ++no_wait_return; /* don't wait for return */
+! did_emsg = FALSE; /* don't use error from debugged stuff */
+! cmd_silent = FALSE; /* display commands */
+! msg_silent = FALSE; /* display messages */
+! emsg_silent = FALSE; /* display error messages */
+! redir_off = TRUE; /* don't redirect debug commands */
+
+ State = NORMAL;
+ debug_mode = TRUE;
+--- 65,91 ----
+ #define CMD_DOWN 10
+
+ #ifdef ALWAYS_USE_GUI
+! // Can't do this when there is no terminal for input/output.
+ if (!gui.in_use)
+ {
+! // Break as soon as possible.
+ debug_break_level = 9999;
+ return;
+ }
+ #endif
+
+! // Make sure we are in raw mode and start termcap mode. Might have side
+! // effects...
+ settmode(TMODE_RAW);
+ starttermcap();
+
+! ++RedrawingDisabled; // don't redisplay the window
+! ++no_wait_return; // don't wait for return
+! did_emsg = FALSE; // don't use error from debugged stuff
+! cmd_silent = FALSE; // display commands
+! msg_silent = FALSE; // display messages
+! emsg_silent = FALSE; // display error messages
+! redir_off = TRUE; // don't redirect debug commands
+
+ State = NORMAL;
+ debug_mode = TRUE;
+***************
+*** 110,128 ****
+ smsg(_("line %ld: %s"), (long)sourcing_lnum, cmd);
+ else
+ smsg(_("cmd: %s"), cmd);
+! /*
+! * Repeat getting a command and executing it.
+! */
+ for (;;)
+ {
+ msg_scroll = TRUE;
+ need_wait_return = FALSE;
+
+! /* Save the current typeahead buffer and replace it with an empty one.
+! * This makes sure we get input from the user here and don't interfere
+! * with the commands being executed. Reset "ex_normal_busy" to avoid
+! * the side effects of using ":normal". Save the stuff buffer and make
+! * it empty. Set ignore_script to avoid reading from script input. */
+ save_ex_normal_busy = ex_normal_busy;
+ ex_normal_busy = 0;
+ if (!debug_greedy)
+--- 110,127 ----
+ smsg(_("line %ld: %s"), (long)sourcing_lnum, cmd);
+ else
+ smsg(_("cmd: %s"), cmd);
+!
+! // Repeat getting a command and executing it.
+ for (;;)
+ {
+ msg_scroll = TRUE;
+ need_wait_return = FALSE;
+
+! // Save the current typeahead buffer and replace it with an empty one.
+! // This makes sure we get input from the user here and don't interfere
+! // with the commands being executed. Reset "ex_normal_busy" to avoid
+! // the side effects of using ":normal". Save the stuff buffer and make
+! // it empty. Set ignore_script to avoid reading from script input.
+ save_ex_normal_busy = ex_normal_busy;
+ ex_normal_busy = 0;
+ if (!debug_greedy)
+***************
+*** 147,155 ****
+ msg_starthere();
+ if (cmdline != NULL)
+ {
+! /* If this is a debug command, set "last_cmd".
+! * If not, reset "last_cmd".
+! * For a blank line use previous command. */
+ p = skipwhite(cmdline);
+ if (*p != NUL)
+ {
+--- 146,154 ----
+ msg_starthere();
+ if (cmdline != NULL)
+ {
+! // If this is a debug command, set "last_cmd".
+! // If not, reset "last_cmd".
+! // For a blank line use previous command.
+ p = skipwhite(cmdline);
+ if (*p != NUL)
+ {
+***************
+*** 202,208 ****
+ }
+ if (last_cmd != 0)
+ {
+! /* Check that the tail matches. */
+ ++p;
+ while (*p != NUL && *p == *tail)
+ {
+--- 201,207 ----
+ }
+ if (last_cmd != 0)
+ {
+! // Check that the tail matches.
+ ++p;
+ while (*p != NUL && *p == *tail)
+ {
+***************
+*** 216,223 ****
+
+ if (last_cmd != 0)
+ {
+! /* Execute debug command: decided where to break next and
+! * return. */
+ switch (last_cmd)
+ {
+ case CMD_CONT:
+--- 215,222 ----
+
+ if (last_cmd != 0)
+ {
+! // Execute debug command: decided where to break next and
+! // return.
+ switch (last_cmd)
+ {
+ case CMD_CONT:
+***************
+*** 239,245 ****
+ case CMD_INTERRUPT:
+ got_int = TRUE;
+ debug_break_level = 9999;
+! /* Do not repeat ">interrupt" cmd, continue stepping. */
+ last_cmd = CMD_STEP;
+ break;
+ case CMD_BACKTRACE:
+--- 238,244 ----
+ case CMD_INTERRUPT:
+ got_int = TRUE;
+ debug_break_level = 9999;
+! // Do not repeat ">interrupt" cmd, continue stepping.
+ last_cmd = CMD_STEP;
+ break;
+ case CMD_BACKTRACE:
+***************
+*** 265,276 ****
+ do_checkbacktracelevel();
+ continue;
+ }
+! /* Going out reset backtrace_level */
+ debug_backtrace_level = 0;
+ break;
+ }
+
+! /* don't debug this command */
+ n = debug_break_level;
+ debug_break_level = -1;
+ (void)do_cmdline(cmdline, getexline, NULL,
+--- 264,275 ----
+ do_checkbacktracelevel();
+ continue;
+ }
+! // Going out reset backtrace_level
+ debug_backtrace_level = 0;
+ break;
+ }
+
+! // don't debug this command
+ n = debug_break_level;
+ debug_break_level = -1;
+ (void)do_cmdline(cmdline, getexline, NULL,
+***************
+*** 295,302 ****
+ emsg_silent = save_emsg_silent;
+ redir_off = save_redir_off;
+
+! /* Only print the message again when typing a command before coming back
+! * here. */
+ debug_did_msg = TRUE;
+ }
+
+--- 294,301 ----
+ emsg_silent = save_emsg_silent;
+ redir_off = save_redir_off;
+
+! // Only print the message again when typing a command before coming back
+! // here.
+ debug_did_msg = TRUE;
+ }
+
+***************
+*** 428,434 ****
+ {
+ if (!eap->skip)
+ {
+! /* replace K_SNR with "<SNR>" */
+ if (debug_breakpoint_name[0] == K_SPECIAL
+ && debug_breakpoint_name[1] == KS_EXTRA
+ && debug_breakpoint_name[2] == (int)KE_SNR)
+--- 427,433 ----
+ {
+ if (!eap->skip)
+ {
+! // replace K_SNR with "<SNR>"
+ if (debug_breakpoint_name[0] == K_SPECIAL
+ && debug_breakpoint_name[1] == KS_EXTRA
+ && debug_breakpoint_name[2] == (int)KE_SNR)
+***************
+*** 472,485 ****
+
+ if (debug_skipped)
+ {
+! /*
+! * Save the value of got_int and reset it. We don't want a previous
+! * interruption cause flushing the input buffer.
+! */
+ prev_got_int = got_int;
+ got_int = FALSE;
+ debug_breakpoint_name = debug_skipped_name;
+! /* eap->skip is TRUE */
+ eap->skip = FALSE;
+ (void)dbg_check_breakpoint(eap);
+ eap->skip = TRUE;
+--- 471,482 ----
+
+ if (debug_skipped)
+ {
+! // Save the value of got_int and reset it. We don't want a previous
+! // interruption cause flushing the input buffer.
+ prev_got_int = got_int;
+ got_int = FALSE;
+ debug_breakpoint_name = debug_skipped_name;
+! // eap->skip is TRUE
+ eap->skip = FALSE;
+ (void)dbg_check_breakpoint(eap);
+ eap->skip = TRUE;
+***************
+*** 495,519 ****
+ */
+ struct debuggy
+ {
+! int dbg_nr; /* breakpoint number */
+! int dbg_type; /* DBG_FUNC, DBG_FILE or DBG_EXPR */
+! char_u *dbg_name; /* function, expression or file name */
+! regprog_T *dbg_prog; /* regexp program */
+! linenr_T dbg_lnum; /* line number in function or file */
+! int dbg_forceit; /* ! used */
+ #ifdef FEAT_EVAL
+! typval_T *dbg_val; /* last result of watchexpression */
+ #endif
+! int dbg_level; /* stored nested level for expr */
+ };
+
+ static garray_T dbg_breakp = {0, 0, sizeof(struct debuggy), 4, NULL};
+ #define BREAKP(idx) (((struct debuggy *)dbg_breakp.ga_data)[idx])
+ #define DEBUGGY(gap, idx) (((struct debuggy *)gap->ga_data)[idx])
+! static int last_breakp = 0; /* nr of last defined breakpoint */
+
+ #ifdef FEAT_PROFILE
+! /* Profiling uses file and func names similar to breakpoints. */
+ static garray_T prof_ga = {0, 0, sizeof(struct debuggy), 4, NULL};
+ #endif
+ #define DBG_FUNC 1
+--- 492,516 ----
+ */
+ struct debuggy
+ {
+! int dbg_nr; // breakpoint number
+! int dbg_type; // DBG_FUNC, DBG_FILE or DBG_EXPR
+! char_u *dbg_name; // function, expression or file name
+! regprog_T *dbg_prog; // regexp program
+! linenr_T dbg_lnum; // line number in function or file
+! int dbg_forceit; // ! used
+ #ifdef FEAT_EVAL
+! typval_T *dbg_val; // last result of watchexpression
+ #endif
+! int dbg_level; // stored nested level for expr
+ };
+
+ static garray_T dbg_breakp = {0, 0, sizeof(struct debuggy), 4, NULL};
+ #define BREAKP(idx) (((struct debuggy *)dbg_breakp.ga_data)[idx])
+ #define DEBUGGY(gap, idx) (((struct debuggy *)gap->ga_data)[idx])
+! static int last_breakp = 0; // nr of last defined breakpoint
+
+ #ifdef FEAT_PROFILE
+! // Profiling uses file and func names similar to breakpoints.
+ static garray_T prof_ga = {0, 0, sizeof(struct debuggy), 4, NULL};
+ #endif
+ #define DBG_FUNC 1
+***************
+*** 531,537 ****
+ static int
+ dbg_parsearg(
+ char_u *arg,
+! garray_T *gap) /* either &dbg_breakp or &prof_ga */
+ {
+ char_u *p = arg;
+ char_u *q;
+--- 528,534 ----
+ static int
+ dbg_parsearg(
+ char_u *arg,
+! garray_T *gap) // either &dbg_breakp or &prof_ga
+ {
+ char_u *p = arg;
+ char_u *q;
+***************
+*** 542,548 ****
+ return FAIL;
+ bp = &DEBUGGY(gap, gap->ga_len);
+
+! /* Find "func" or "file". */
+ if (STRNCMP(p, "func", 4) == 0)
+ bp->dbg_type = DBG_FUNC;
+ else if (STRNCMP(p, "file", 4) == 0)
+--- 539,545 ----
+ return FAIL;
+ bp = &DEBUGGY(gap, gap->ga_len);
+
+! // Find "func" or "file".
+ if (STRNCMP(p, "func", 4) == 0)
+ bp->dbg_type = DBG_FUNC;
+ else if (STRNCMP(p, "file", 4) == 0)
+***************
+*** 574,580 ****
+ }
+ p = skipwhite(p + 4);
+
+! /* Find optional line number. */
+ if (here)
+ bp->dbg_lnum = curwin->w_cursor.lnum;
+ else if (
+--- 571,577 ----
+ }
+ p = skipwhite(p + 4);
+
+! // Find optional line number.
+ if (here)
+ bp->dbg_lnum = curwin->w_cursor.lnum;
+ else if (
+***************
+*** 589,595 ****
+ else
+ bp->dbg_lnum = 0;
+
+! /* Find the function or file name. Don't accept a function name with (). */
+ if ((!here && *p == NUL)
+ || (here && *p != NUL)
+ || (bp->dbg_type == DBG_FUNC && strstr((char *)p, "()") != NULL))
+--- 586,592 ----
+ else
+ bp->dbg_lnum = 0;
+
+! // Find the function or file name. Don't accept a function name with ().
+ if ((!here && *p == NUL)
+ || (here && *p != NUL)
+ || (bp->dbg_type == DBG_FUNC && strstr((char *)p, "()") != NULL))
+***************
+*** 610,618 ****
+ }
+ else
+ {
+! /* Expand the file name in the same way as do_source(). This means
+! * doing it twice, so that $DIR/file gets expanded when $DIR is
+! * "~/dir". */
+ q = expand_env_save(p);
+ if (q == NULL)
+ return FAIL;
+--- 607,615 ----
+ }
+ else
+ {
+! // Expand the file name in the same way as do_source(). This means
+! // doing it twice, so that $DIR/file gets expanded when $DIR is
+! // "~/dir".
+ q = expand_env_save(p);
+ if (q == NULL)
+ return FAIL;
+***************
+*** 667,673 ****
+ vim_free(bp->dbg_name);
+ else
+ {
+! if (bp->dbg_lnum == 0) /* default line number is 1 */
+ bp->dbg_lnum = 1;
+ #ifdef FEAT_PROFILE
+ if (eap->cmdidx != CMD_profile)
+--- 664,670 ----
+ vim_free(bp->dbg_name);
+ else
+ {
+! if (bp->dbg_lnum == 0) // default line number is 1
+ bp->dbg_lnum = 1;
+ #ifdef FEAT_PROFILE
+ if (eap->cmdidx != CMD_profile)
+***************
+*** 681,687 ****
+ }
+ else
+ {
+! /* DBG_EXPR */
+ DEBUGGY(gap, gap->ga_len++).dbg_nr = ++last_breakp;
+ ++debug_tick;
+ }
+--- 678,684 ----
+ }
+ else
+ {
+! // DBG_EXPR
+ DEBUGGY(gap, gap->ga_len++).dbg_nr = ++last_breakp;
+ ++debug_tick;
+ }
+***************
+*** 727,733 ****
+
+ if (vim_isdigit(*eap->arg))
+ {
+! /* ":breakdel {nr}" */
+ nr = atol((char *)eap->arg);
+ for (i = 0; i < gap->ga_len; ++i)
+ if (DEBUGGY(gap, i).dbg_nr == nr)
+--- 724,730 ----
+
+ if (vim_isdigit(*eap->arg))
+ {
+! // ":breakdel {nr}"
+ nr = atol((char *)eap->arg);
+ for (i = 0; i < gap->ga_len; ++i)
+ if (DEBUGGY(gap, i).dbg_nr == nr)
+***************
+*** 743,749 ****
+ }
+ else
+ {
+! /* ":breakdel {func|file|expr} [lnum] {name}" */
+ if (dbg_parsearg(eap->arg, gap) == FAIL)
+ return;
+ bp = &DEBUGGY(gap, gap->ga_len);
+--- 740,746 ----
+ }
+ else
+ {
+! // ":breakdel {func|file|expr} [lnum] {name}"
+ if (dbg_parsearg(eap->arg, gap) == FAIL)
+ return;
+ bp = &DEBUGGY(gap, gap->ga_len);
+***************
+*** 789,795 ****
+ break;
+ }
+
+! /* If all breakpoints were removed clear the array. */
+ if (gap->ga_len == 0)
+ ga_clear(gap);
+ }
+--- 786,792 ----
+ break;
+ }
+
+! // If all breakpoints were removed clear the array.
+ if (gap->ga_len == 0)
+ ga_clear(gap);
+ }
+***************
+*** 830,838 ****
+ */
+ linenr_T
+ dbg_find_breakpoint(
+! int file, /* TRUE for a file, FALSE for a function */
+! char_u *fname, /* file or function name */
+! linenr_T after) /* after this line number */
+ {
+ return debuggy_find(file, fname, after, &dbg_breakp, NULL);
+ }
+--- 827,835 ----
+ */
+ linenr_T
+ dbg_find_breakpoint(
+! int file, // TRUE for a file, FALSE for a function
+! char_u *fname, // file or function name
+! linenr_T after) // after this line number
+ {
+ return debuggy_find(file, fname, after, &dbg_breakp, NULL);
+ }
+***************
+*** 843,851 ****
+ */
+ int
+ has_profiling(
+! int file, /* TRUE for a file, FALSE for a function */
+! char_u *fname, /* file or function name */
+! int *fp) /* return: forceit */
+ {
+ return (debuggy_find(file, fname, (linenr_T)0, &prof_ga, fp)
+ != (linenr_T)0);
+--- 840,848 ----
+ */
+ int
+ has_profiling(
+! int file, // TRUE for a file, FALSE for a function
+! char_u *fname, // file or function name
+! int *fp) // return: forceit
+ {
+ return (debuggy_find(file, fname, (linenr_T)0, &prof_ga, fp)
+ != (linenr_T)0);
+***************
+*** 857,867 ****
+ */
+ static linenr_T
+ debuggy_find(
+! int file, /* TRUE for a file, FALSE for a function */
+! char_u *fname, /* file or function name */
+! linenr_T after, /* after this line number */
+! garray_T *gap, /* either &dbg_breakp or &prof_ga */
+! int *fp) /* if not NULL: return forceit */
+ {
+ struct debuggy *bp;
+ int i;
+--- 854,864 ----
+ */
+ static linenr_T
+ debuggy_find(
+! int file, // TRUE for a file, FALSE for a function
+! char_u *fname, // file or function name
+! linenr_T after, // after this line number
+! garray_T *gap, // either &dbg_breakp or &prof_ga
+! int *fp) // if not NULL: return forceit
+ {
+ struct debuggy *bp;
+ int i;
+***************
+*** 869,879 ****
+ char_u *name = fname;
+ int prev_got_int;
+
+! /* Return quickly when there are no breakpoints. */
+ if (gap->ga_len == 0)
+ return (linenr_T)0;
+
+! /* Replace K_SNR in function name with "<SNR>". */
+ if (!file && fname[0] == K_SPECIAL)
+ {
+ name = alloc((unsigned)STRLEN(fname) + 3);
+--- 866,876 ----
+ char_u *name = fname;
+ int prev_got_int;
+
+! // Return quickly when there are no breakpoints.
+ if (gap->ga_len == 0)
+ return (linenr_T)0;
+
+! // Replace K_SNR in function name with "<SNR>".
+ if (!file && fname[0] == K_SPECIAL)
+ {
+ name = alloc((unsigned)STRLEN(fname) + 3);
+***************
+*** 888,895 ****
+
+ for (i = 0; i < gap->ga_len; ++i)
+ {
+! /* Skip entries that are not useful or are for a line that is beyond
+! * an already found breakpoint. */
+ bp = &DEBUGGY(gap, i);
+ if (((bp->dbg_type == DBG_FILE) == file &&
+ bp->dbg_type != DBG_EXPR && (
+--- 885,892 ----
+
+ for (i = 0; i < gap->ga_len; ++i)
+ {
+! // Skip entries that are not useful or are for a line that is beyond
+! // an already found breakpoint.
+ bp = &DEBUGGY(gap, i);
+ if (((bp->dbg_type == DBG_FILE) == file &&
+ bp->dbg_type != DBG_EXPR && (
+***************
+*** 898,908 ****
+ #endif
+ (bp->dbg_lnum > after && (lnum == 0 || bp->dbg_lnum < lnum)))))
+ {
+! /*
+! * Save the value of got_int and reset it. We don't want a
+! * previous interruption cancel matching, only hitting CTRL-C
+! * while matching should abort it.
+! */
+ prev_got_int = got_int;
+ got_int = FALSE;
+ if (vim_regexec_prog(&bp->dbg_prog, FALSE, name, (colnr_T)0))
+--- 895,903 ----
+ #endif
+ (bp->dbg_lnum > after && (lnum == 0 || bp->dbg_lnum < lnum)))))
+ {
+! // Save the value of got_int and reset it. We don't want a
+! // previous interruption cancel matching, only hitting CTRL-C
+! // while matching should abort it.
+ prev_got_int = got_int;
+ got_int = FALSE;
+ if (vim_regexec_prog(&bp->dbg_prog, FALSE, name, (colnr_T)0))
+***************
+*** 942,949 ****
+
+ line = TRUE;
+ debug_oldval = typval_tostring(bp->dbg_val);
+! /* Need to evaluate again, typval_compare() overwrites
+! * "tv". */
+ v = eval_expr(bp->dbg_name, NULL);
+ debug_newval = typval_tostring(v);
+ free_tv(bp->dbg_val);
+--- 937,944 ----
+
+ line = TRUE;
+ debug_oldval = typval_tostring(bp->dbg_val);
+! // Need to evaluate again, typval_compare() overwrites
+! // "tv".
+ v = eval_expr(bp->dbg_name, NULL);
+ debug_newval = typval_tostring(v);
+ free_tv(bp->dbg_val);
+***************
+*** 983,989 ****
+ void
+ dbg_breakpoint(char_u *name, linenr_T lnum)
+ {
+! /* We need to check if this line is actually executed in do_one_cmd() */
+ debug_breakpoint_name = name;
+ debug_breakpoint_lnum = lnum;
+ }
+--- 978,984 ----
+ void
+ dbg_breakpoint(char_u *name, linenr_T lnum)
+ {
+! // We need to check if this line is actually executed in do_one_cmd()
+ debug_breakpoint_name = name;
+ debug_breakpoint_lnum = lnum;
+ }
+*** ../vim-8.1.1199/src/version.c 2019-04-23 16:35:59.272261198 +0200
+--- src/version.c 2019-04-23 18:38:15.491378846 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1200,
+ /**/
+
+--
+What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics'
+meaning 'bloodsucking creatures'.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1201 b/data/vim/patches/8.1.1201
new file mode 100644
index 000000000..5943c6692
--- /dev/null
+++ b/data/vim/patches/8.1.1201
@@ -0,0 +1,392 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1201
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1201
+Problem: Output of :command is hard to read.
+Solution: Make some columns wider, some narrower. Truncate the command when
+ listing all.
+Files: src/ex_docmd.c, src/message.c, src/proto/message.pro,
+ src/getchar.c, src/menu.c
+
+
+*** ../vim-8.1.1200/src/ex_docmd.c 2019-04-07 14:21:26.230339328 +0200
+--- src/ex_docmd.c 2019-04-24 23:03:28.879520754 +0200
+***************
+*** 6000,6005 ****
+--- 6000,6006 ----
+ int found = FALSE;
+ ucmd_T *cmd;
+ int len;
++ int over;
+ long a;
+ garray_T *gap;
+
+***************
+*** 6019,6035 ****
+
+ /* Put out the title first time */
+ if (!found)
+! msg_puts_title(_("\n Name Args Address Complete Definition"));
+ found = TRUE;
+ msg_putchar('\n');
+ if (got_int)
+ break;
+
+! /* Special cases */
+! msg_putchar(a & BANG ? '!' : ' ');
+! msg_putchar(a & REGSTR ? '"' : ' ');
+! msg_putchar(gap != &ucmds ? 'b' : ' ');
+! msg_putchar(' ');
+
+ msg_outtrans_attr(cmd->uc_name, HL_ATTR(HLF_D));
+ len = (int)STRLEN(cmd->uc_name) + 4;
+--- 6020,6055 ----
+
+ /* Put out the title first time */
+ if (!found)
+! msg_puts_title(_("\n Name Args Address Complete Definition"));
+ found = TRUE;
+ msg_putchar('\n');
+ if (got_int)
+ break;
+
+! // Special cases
+! len = 4;
+! if (a & BANG)
+! {
+! msg_putchar('!');
+! --len;
+! }
+! if (a & REGSTR)
+! {
+! msg_putchar('"');
+! --len;
+! }
+! if (gap != &ucmds)
+! {
+! msg_putchar('b');
+! --len;
+! }
+! if (a & TRLBAR)
+! {
+! msg_putchar('|');
+! --len;
+! }
+! while (len-- > 0)
+! msg_putchar(' ');
+
+ msg_outtrans_attr(cmd->uc_name, HL_ATTR(HLF_D));
+ len = (int)STRLEN(cmd->uc_name) + 4;
+***************
+*** 6037,6066 ****
+ do {
+ msg_putchar(' ');
+ ++len;
+! } while (len < 16);
+
+ len = 0;
+
+! /* Arguments */
+ switch ((int)(a & (EXTRA|NOSPC|NEEDARG)))
+ {
+! case 0: IObuff[len++] = '0'; break;
+! case (EXTRA): IObuff[len++] = '*'; break;
+! case (EXTRA|NOSPC): IObuff[len++] = '?'; break;
+! case (EXTRA|NEEDARG): IObuff[len++] = '+'; break;
+! case (EXTRA|NOSPC|NEEDARG): IObuff[len++] = '1'; break;
+ }
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 5);
+
+! /* Range */
+ if (a & (RANGE|COUNT))
+ {
+ if (a & COUNT)
+ {
+! /* -count=N */
+ sprintf((char *)IObuff + len, "%ldc", cmd->uc_def);
+ len += (int)STRLEN(IObuff + len);
+ }
+--- 6057,6089 ----
+ do {
+ msg_putchar(' ');
+ ++len;
+! } while (len < 22);
+
++ // "over" is how much longer the name is than the column width for
++ // the name, we'll try to align what comes after.
++ over = len - 22;
+ len = 0;
+
+! // Arguments
+ switch ((int)(a & (EXTRA|NOSPC|NEEDARG)))
+ {
+! case 0: IObuff[len++] = '0'; break;
+! case (EXTRA): IObuff[len++] = '*'; break;
+! case (EXTRA|NOSPC): IObuff[len++] = '?'; break;
+! case (EXTRA|NEEDARG): IObuff[len++] = '+'; break;
+! case (EXTRA|NOSPC|NEEDARG): IObuff[len++] = '1'; break;
+ }
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 5 - over);
+
+! // Address / Range
+ if (a & (RANGE|COUNT))
+ {
+ if (a & COUNT)
+ {
+! // -count=N
+ sprintf((char *)IObuff + len, "%ldc", cmd->uc_def);
+ len += (int)STRLEN(IObuff + len);
+ }
+***************
+*** 6068,6074 ****
+ IObuff[len++] = '%';
+ else if (cmd->uc_def >= 0)
+ {
+! /* -range=N */
+ sprintf((char *)IObuff + len, "%ld", cmd->uc_def);
+ len += (int)STRLEN(IObuff + len);
+ }
+--- 6091,6097 ----
+ IObuff[len++] = '%';
+ else if (cmd->uc_def >= 0)
+ {
+! // -range=N
+ sprintf((char *)IObuff + len, "%ld", cmd->uc_def);
+ len += (int)STRLEN(IObuff + len);
+ }
+***************
+*** 6078,6086 ****
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 11);
+
+! /* Address Type */
+ for (j = 0; addr_type_complete[j].expand != -1; ++j)
+ if (addr_type_complete[j].expand != ADDR_LINES
+ && addr_type_complete[j].expand == cmd->uc_addr_type)
+--- 6101,6109 ----
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 9 - over);
+
+! // Address Type
+ for (j = 0; addr_type_complete[j].expand != -1; ++j)
+ if (addr_type_complete[j].expand != ADDR_LINES
+ && addr_type_complete[j].expand == cmd->uc_addr_type)
+***************
+*** 6092,6100 ****
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 21);
+
+! /* Completion */
+ for (j = 0; command_complete[j].expand != 0; ++j)
+ if (command_complete[j].expand == cmd->uc_compl)
+ {
+--- 6115,6123 ----
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 13 - over);
+
+! // Completion
+ for (j = 0; command_complete[j].expand != 0; ++j)
+ if (command_complete[j].expand == cmd->uc_compl)
+ {
+***************
+*** 6105,6116 ****
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 35);
+
+ IObuff[len] = '\0';
+ msg_outtrans(IObuff);
+
+! msg_outtrans_special(cmd->uc_rep, FALSE);
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+ last_set_msg(cmd->uc_script_ctx);
+--- 6128,6140 ----
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 24 - over);
+
+ IObuff[len] = '\0';
+ msg_outtrans(IObuff);
+
+! msg_outtrans_special(cmd->uc_rep, FALSE,
+! name_len == 0 ? Columns - 46 : 0);
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+ last_set_msg(cmd->uc_script_ctx);
+***************
+*** 6344,6352 ****
+ end = p;
+ name_len = (int)(end - name);
+
+! /* If there is nothing after the name, and no attributes were specified,
+! * we are listing commands
+! */
+ p = skipwhite(end);
+ if (!has_attr && ends_excmd(*p))
+ {
+--- 6368,6375 ----
+ end = p;
+ name_len = (int)(end - name);
+
+! // If there is nothing after the name, and no attributes were specified,
+! // we are listing commands
+ p = skipwhite(end);
+ if (!has_attr && ends_excmd(*p))
+ {
+*** ../vim-8.1.1200/src/message.c 2019-03-21 21:45:30.887282025 +0100
+--- src/message.c 2019-04-24 22:49:10.627784026 +0200
+***************
+*** 1594,1600 ****
+ int
+ msg_outtrans_special(
+ char_u *strstart,
+! int from) /* TRUE for lhs of a mapping */
+ {
+ char_u *str = strstart;
+ int retval = 0;
+--- 1594,1601 ----
+ int
+ msg_outtrans_special(
+ char_u *strstart,
+! int from, // TRUE for lhs of a mapping
+! int maxlen) // screen columns, 0 for unlimeted
+ {
+ char_u *str = strstart;
+ int retval = 0;
+***************
+*** 1614,1619 ****
+--- 1615,1622 ----
+ else
+ text = (char *)str2special(&str, from);
+ len = vim_strsize((char_u *)text);
++ if (maxlen > 0 && retval + len >= maxlen)
++ break;
+ /* Highlight special keys */
+ msg_puts_attr(text, len > 1
+ && (*mb_ptr2len)((char_u *)text) <= 1 ? attr : 0);
+*** ../vim-8.1.1200/src/proto/message.pro 2019-02-19 21:34:01.987747438 +0100
+--- src/proto/message.pro 2019-04-24 22:49:22.943722491 +0200
+***************
+*** 35,41 ****
+ char_u *msg_outtrans_one(char_u *p, int attr);
+ int msg_outtrans_len_attr(char_u *msgstr, int len, int attr);
+ void msg_make(char_u *arg);
+! int msg_outtrans_special(char_u *strstart, int from);
+ char_u *str2special_save(char_u *str, int is_lhs);
+ char_u *str2special(char_u **sp, int from);
+ void str2specialbuf(char_u *sp, char_u *buf, int len);
+--- 35,41 ----
+ char_u *msg_outtrans_one(char_u *p, int attr);
+ int msg_outtrans_len_attr(char_u *msgstr, int len, int attr);
+ void msg_make(char_u *arg);
+! int msg_outtrans_special(char_u *strstart, int from, int maxlen);
+ char_u *str2special_save(char_u *str, int is_lhs);
+ char_u *str2special(char_u **sp, int from);
+ void str2specialbuf(char_u *sp, char_u *buf, int len);
+*** ../vim-8.1.1200/src/getchar.c 2019-04-18 21:08:46.841176544 +0200
+--- src/getchar.c 2019-04-24 22:49:47.187601412 +0200
+***************
+*** 4022,4028 ****
+ msg_putchar(' ');
+
+ /* Display the LHS. Get length of what we write. */
+! len = msg_outtrans_special(mp->m_keys, TRUE);
+ do
+ {
+ msg_putchar(' '); /* padd with blanks */
+--- 4022,4028 ----
+ msg_putchar(' ');
+
+ /* Display the LHS. Get length of what we write. */
+! len = msg_outtrans_special(mp->m_keys, TRUE, 0);
+ do
+ {
+ msg_putchar(' '); /* padd with blanks */
+***************
+*** 4053,4059 ****
+ if (s != NULL)
+ {
+ vim_unescape_csi(s);
+! msg_outtrans_special(s, FALSE);
+ vim_free(s);
+ }
+ }
+--- 4053,4059 ----
+ if (s != NULL)
+ {
+ vim_unescape_csi(s);
+! msg_outtrans_special(s, FALSE, 0);
+ vim_free(s);
+ }
+ }
+*** ../vim-8.1.1200/src/menu.c 2019-03-30 18:46:57.356077354 +0100
+--- src/menu.c 2019-04-24 22:49:52.107576845 +0200
+***************
+*** 1214,1220 ****
+ if (*menu->strings[bit] == NUL)
+ msg_puts_attr("<Nop>", HL_ATTR(HLF_8));
+ else
+! msg_outtrans_special(menu->strings[bit], FALSE);
+ }
+ }
+ else
+--- 1214,1220 ----
+ if (*menu->strings[bit] == NUL)
+ msg_puts_attr("<Nop>", HL_ATTR(HLF_8));
+ else
+! msg_outtrans_special(menu->strings[bit], FALSE, 0);
+ }
+ }
+ else
+*** ../vim-8.1.1200/src/version.c 2019-04-23 18:39:43.694863660 +0200
+--- src/version.c 2019-04-24 23:07:47.734239943 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1201,
+ /**/
+
+--
+ ** Hello and Welcome to the Psychiatric Hotline **
+If you are obsessive-compulsive, please press 1 repeatedly.
+If you are co-dependent, please ask someone to press 2.
+If you have multiple personalities, please press 3, 4, 5 and 6.
+If you are paranoid-delusional, we know who you are and what you want
+ - just stay on the line so we can trace the call.
+If you are schizophrenic, listen carefully and a little voice will
+ tell you which number to press next.
+If you are manic-depressive, it doesn't matter which number you press
+ - no one will answer.
+If you suffer from panic attacks, push every button you can find.
+If you are sane, please hold on - we have the rest of humanity on the
+ other line and they desparately want to ask you a few questions.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1202 b/data/vim/patches/8.1.1202
new file mode 100644
index 000000000..01e78877e
--- /dev/null
+++ b/data/vim/patches/8.1.1202
@@ -0,0 +1,60 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1202
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1202
+Problem: Always get regexp debugging logs when building with -DDEBUG.
+Solution: By default do not create regexp debugging logs. (Ken Takata)
+Files: src/regexp.c
+
+
+*** ../vim-8.1.1201/src/regexp.c 2019-03-21 21:45:30.883282076 +0100
+--- src/regexp.c 2019-04-25 20:04:55.452435740 +0200
+***************
+*** 38,48 ****
+ * Named character class support added by Walter Briscoe (1998 Jul 01)
+ */
+
+! /* Uncomment the first if you do not want to see debugging logs or files
+! * related to regular expressions, even when compiling with -DDEBUG.
+! * Uncomment the second to get the regexp debugging. */
+! /* #undef DEBUG */
+! /* #define DEBUG */
+
+ #include "vim.h"
+
+--- 38,48 ----
+ * Named character class support added by Walter Briscoe (1998 Jul 01)
+ */
+
+! // By default: do not create debugging logs or files related to regular
+! // expressions, even when compiling with -DDEBUG.
+! // Uncomment the second line to get the regexp debugging.
+! #undef DEBUG
+! // #define DEBUG
+
+ #include "vim.h"
+
+*** ../vim-8.1.1201/src/version.c 2019-04-24 23:08:20.082079954 +0200
+--- src/version.c 2019-04-25 20:05:50.439610356 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1202,
+ /**/
+
+--
+'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.1203 b/data/vim/patches/8.1.1203
new file mode 100644
index 000000000..184952574
--- /dev/null
+++ b/data/vim/patches/8.1.1203
@@ -0,0 +1,477 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1203
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1203
+Problem: Some autocmd tests are old style.
+Solution: Turn the tests into new style. (Yegappan Lakshmanan, closes #4295)
+Files: src/Makefile, src/testdir/Make_all.mak,
+ src/testdir/Make_amiga.mak, src/testdir/Make_vms.mms,
+ src/testdir/test11.in, src/testdir/test11.ok,
+ src/testdir/test_autocmd.vim
+
+
+*** ../vim-8.1.1202/src/Makefile 2019-04-21 15:22:35.485067386 +0200
+--- src/Makefile 2019-04-25 20:23:53.866986203 +0200
+***************
+*** 2172,2178 ****
+ # These do not depend on the executable, compile it when needed.
+ test1 \
+ test_eval \
+! test3 test11 test14 test17 \
+ test29 test30 test37 test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+--- 2172,2178 ----
+ # These do not depend on the executable, compile it when needed.
+ test1 \
+ test_eval \
+! test3 test14 test17 \
+ test29 test30 test37 test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+*** ../vim-8.1.1202/src/testdir/Make_all.mak 2019-04-17 16:53:44.925357857 +0200
+--- src/testdir/Make_all.mak 2019-04-25 20:23:53.866986203 +0200
+***************
+*** 33,39 ****
+
+ # Tests that run on most systems, but not on Amiga.
+ SCRIPTS_MORE1 = \
+- test11.out \
+ test52.out \
+ test86.out \
+ test87.out
+--- 33,38 ----
+*** ../vim-8.1.1202/src/testdir/Make_amiga.mak 2019-01-11 17:30:13.290241872 +0100
+--- src/testdir/Make_amiga.mak 2019-04-25 20:23:53.866986203 +0200
+***************
+*** 12,18 ****
+ # These tests don't work (yet):
+ # test2 "\\tmp" doesn't work
+ # test10 'errorformat' is different
+- # test11 "cat" doesn't work properly
+ # test52 only for Win32
+ # test86, 87 no Python interface
+
+--- 12,17 ----
+*** ../vim-8.1.1202/src/testdir/Make_vms.mms 2019-04-17 16:53:44.925357857 +0200
+--- src/testdir/Make_vms.mms 2019-04-25 20:23:53.866986203 +0200
+***************
+*** 122,131 ****
+ SCRIPT_ODS5 = test102.out
+ .ENDIF
+
+- .IFDEF HAVE_GZIP
+- SCRIPT_GZIP = test11.out
+- .ENDIF
+-
+ .IFDEF HAVE_GDIFF
+ SCRIPT_GDIFF = test47.out
+ .ENDIF
+--- 122,127 ----
+***************
+*** 154,160 ****
+ -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.*
+ -@ if "''F$SEARCH("Xtest.*")'" .NES. "" then delete/noconfirm/nolog Xtest.*.*
+
+! all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_ODS5) $(SCRIPT_GZIP) \
+ $(SCRIPT_GDIFF) $(SCRIPT_MZSCH) $(SCRIPT_LUA) $(SCRIPT_PYTHON) nolog
+ -@ write sys$output " "
+ -@ write sys$output "-----------------------------------------------"
+--- 150,156 ----
+ -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.*
+ -@ if "''F$SEARCH("Xtest.*")'" .NES. "" then delete/noconfirm/nolog Xtest.*.*
+
+! all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_ODS5) \
+ $(SCRIPT_GDIFF) $(SCRIPT_MZSCH) $(SCRIPT_LUA) $(SCRIPT_PYTHON) nolog
+ -@ write sys$output " "
+ -@ write sys$output "-----------------------------------------------"
+*** ../vim-8.1.1202/src/testdir/test11.in 2014-10-09 15:34:19.000000000 +0200
+--- src/testdir/test11.in 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,84 ****
+- Tests for autocommands:
+- - FileWritePre writing a compressed file
+- - FileReadPost reading a compressed file
+- - BufNewFile reading a file template
+- - BufReadPre decompressing the file to be read
+- - FilterReadPre substituting characters in the temp file
+- - FilterReadPost substituting characters after filtering
+- - FileReadPre set options for decompression
+- - FileReadPost decompress the file
+-
+- Note: This test is skipped if "gzip" is not available.
+- $GZIP is made empty, "-v" would cause trouble.
+- Use a FileChangedShell autocommand to avoid a prompt for "Xtestfile.gz" being
+- modified outside of Vim (noticed on Solaris).
+-
+- STARTTEST
+- :so small.vim
+- :" drop out when there is no gzip program
+- :if !executable("gzip")
+- : e! test.ok
+- : w! test.out
+- : qa!
+- :endif
+- :let $GZIP = ""
+- :au FileChangedShell * echo "caught FileChangedShell"
+- :set bin
+- :au FileWritePre *.gz '[,']!gzip
+- :au FileWritePost *.gz undo
+- :/^start of testfile/,/^end of testfile/w! Xtestfile.gz
+- :au FileReadPost *.gz '[,']!gzip -d
+- :$r Xtestfile.gz " Read and decompress the testfile
+- :?startstart?,$w! test.out " Write contents of this file
+- :au BufNewFile *.c read Xtest.c
+- :/^start of test.c/+1,/^end of test.c/-1w! Xtest.c
+- :e! foo.c " Will load Xtest.c
+- :au FileAppendPre *.out '[,']s/new/NEW/
+- :au FileAppendPost *.out !cat Xtest.c >>test.out
+- :w>>test.out " Append it to the output file
+- :au! FileAppendPre
+- :" setup autocommands to decompress before reading and re-compress afterwards
+- :au BufReadPre *.gz exe '!gzip -d ' . shellescape(expand("<afile>"))
+- :au BufReadPre *.gz call rename(expand("<afile>:r"), expand("<afile>"))
+- :au BufReadPost *.gz call rename(expand("<afile>"), expand("<afile>:r"))
+- :au BufReadPost *.gz exe '!gzip ' . shellescape(expand("<afile>:r"))
+- :e! Xtestfile.gz " Edit compressed file
+- :w>>test.out " Append it to the output file
+- :set shelltemp " need temp files here
+- :au FilterReadPre *.out call rename(expand("<afile>"), expand("<afile>") . ".t")
+- :au FilterReadPre *.out exe 'silent !sed s/e/E/ ' . shellescape(expand("<afile>")) . ".t >" . shellescape(expand("<afile>"))
+- :au FilterReadPre *.out exe 'silent !rm ' . shellescape(expand("<afile>")) . '.t'
+- :au FilterReadPost *.out '[,']s/x/X/g
+- :e! test.out " Edit the output file
+- :23,$!cat
+- :23,$s/\r$// " remove CR for when sed adds them
+- :au! FileReadPre *.gz exe 'silent !gzip -d ' . shellescape(expand("<afile>"))
+- :au FileReadPre *.gz call rename(expand("<afile>:r"), expand("<afile>"))
+- :au! FileReadPost *.gz '[,']s/l/L/
+- :$r Xtestfile.gz " Read compressed file
+- :w " write it, after filtering
+- :au! " remove all autocommands
+- :e " Edit test.out again
+- :set nobin ff& " use the default fileformat for writing
+- :w
+- :qa!
+- ENDTEST
+-
+- startstart
+- start of testfile
+- line 2 Abcdefghijklmnopqrstuvwxyz
+- line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- line 4 Abcdefghijklmnopqrstuvwxyz
+- line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- line 6 Abcdefghijklmnopqrstuvwxyz
+- line 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- line 8 Abcdefghijklmnopqrstuvwxyz
+- line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- line 10 Abcdefghijklmnopqrstuvwxyz
+- end of testfile
+-
+- start of test.c
+- /*
+- * Here is a new .c file
+- */
+- end of test.c
+--- 0 ----
+*** ../vim-8.1.1202/src/testdir/test11.ok 2010-05-15 13:04:10.000000000 +0200
+--- src/testdir/test11.ok 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,61 ****
+- startstart
+- start of testfile
+- line 2 Abcdefghijklmnopqrstuvwxyz
+- line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- line 4 Abcdefghijklmnopqrstuvwxyz
+- line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- line 6 Abcdefghijklmnopqrstuvwxyz
+- line 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- line 8 Abcdefghijklmnopqrstuvwxyz
+- line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- line 10 Abcdefghijklmnopqrstuvwxyz
+- end of testfile
+-
+- start of test.c
+- /*
+- * Here is a new .c file
+- */
+- end of test.c
+- start of testfile
+- line 2 Abcdefghijklmnopqrstuvwxyz
+- line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- line 4 Abcdefghijklmnopqrstuvwxyz
+- linE 5 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+- linE 6 AbcdefghijklmnopqrstuvwXyz
+- linE 7 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+- linE 8 AbcdefghijklmnopqrstuvwXyz
+- linE 9 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+- linE 10 AbcdefghijklmnopqrstuvwXyz
+- End of testfile
+-
+- /*
+- * HEre is a NEW .c file
+- */
+- /*
+- * HEre is a new .c file
+- */
+- start of tEstfile
+- linE 2 AbcdefghijklmnopqrstuvwXyz
+- linE 3 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+- linE 4 AbcdefghijklmnopqrstuvwXyz
+- linE 5 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+- linE 6 AbcdefghijklmnopqrstuvwXyz
+- linE 7 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+- linE 8 AbcdefghijklmnopqrstuvwXyz
+- linE 9 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+- linE 10 AbcdefghijklmnopqrstuvwXyz
+- End of testfile
+- /*
+- * HEre is a new .c file
+- */
+- start of testfiLe
+- Line 2 Abcdefghijklmnopqrstuvwxyz
+- Line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- Line 4 Abcdefghijklmnopqrstuvwxyz
+- Line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- Line 6 Abcdefghijklmnopqrstuvwxyz
+- Line 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- Line 8 Abcdefghijklmnopqrstuvwxyz
+- Line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+- Line 10 Abcdefghijklmnopqrstuvwxyz
+- end of testfiLe
+--- 0 ----
+*** ../vim-8.1.1202/src/testdir/test_autocmd.vim 2019-04-04 15:04:32.966792195 +0200
+--- src/testdir/test_autocmd.vim 2019-04-25 20:23:53.870985923 +0200
+***************
+*** 1486,1488 ****
+--- 1486,1690 ----
+ endfunc
+
+ " FileChangedShell tested in test_filechanged.vim
++
++ " Tests for the following autocommands:
++ " - FileWritePre writing a compressed file
++ " - FileReadPost reading a compressed file
++ " - BufNewFile reading a file template
++ " - BufReadPre decompressing the file to be read
++ " - FilterReadPre substituting characters in the temp file
++ " - FilterReadPost substituting characters after filtering
++ " - FileReadPre set options for decompression
++ " - FileReadPost decompress the file
++ func Test_ReadWrite_Autocmds()
++ " Run this test only on Unix-like systems and if gzip is available
++ if !has('unix') || !executable("gzip")
++ return
++ endif
++
++ " Make $GZIP empty, "-v" would cause trouble.
++ let $GZIP = ""
++
++ " Use a FileChangedShell autocommand to avoid a prompt for 'Xtestfile.gz'
++ " being modified outside of Vim (noticed on Solaris).
++ au FileChangedShell * echo 'caught FileChangedShell'
++
++ " Test for the FileReadPost, FileWritePre and FileWritePost autocmds
++ augroup Test1
++ au!
++ au FileWritePre *.gz '[,']!gzip
++ au FileWritePost *.gz undo
++ au FileReadPost *.gz '[,']!gzip -d
++ augroup END
++
++ new
++ set bin
++ call append(0, [
++ \ 'line 2 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 4 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 6 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 8 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 10 Abcdefghijklmnopqrstuvwxyz'
++ \ ])
++ 1,9write! Xtestfile.gz
++ enew! | close
++
++ new
++ " Read and decompress the testfile
++ 0read Xtestfile.gz
++ call assert_equal([
++ \ 'line 2 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 4 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 6 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 8 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 10 Abcdefghijklmnopqrstuvwxyz'
++ \ ], getline(1, 9))
++ enew! | close
++
++ augroup Test1
++ au!
++ augroup END
++
++ " Test for the FileAppendPre and FileAppendPost autocmds
++ augroup Test2
++ au!
++ au BufNewFile *.c read Xtest.c
++ au FileAppendPre *.out '[,']s/new/NEW/
++ au FileAppendPost *.out !cat Xtest.c >> test.out
++ augroup END
++
++ call writefile(['/*', ' * Here is a new .c file', ' */'], 'Xtest.c')
++ new foo.c " should load Xtest.c
++ call assert_equal(['/*', ' * Here is a new .c file', ' */'], getline(2, 4))
++ w! >> test.out " append it to the output file
++
++ let contents = readfile('test.out')
++ call assert_equal(' * Here is a NEW .c file', contents[2])
++ call assert_equal(' * Here is a new .c file', contents[5])
++
++ call delete('test.out')
++ enew! | close
++ augroup Test2
++ au!
++ augroup END
++
++ " Test for the BufReadPre and BufReadPost autocmds
++ augroup Test3
++ au!
++ " setup autocommands to decompress before reading and re-compress
++ " afterwards
++ au BufReadPre *.gz exe '!gzip -d ' . shellescape(expand("<afile>"))
++ au BufReadPre *.gz call rename(expand("<afile>:r"), expand("<afile>"))
++ au BufReadPost *.gz call rename(expand("<afile>"), expand("<afile>:r"))
++ au BufReadPost *.gz exe '!gzip ' . shellescape(expand("<afile>:r"))
++ augroup END
++
++ e! Xtestfile.gz " Edit compressed file
++ call assert_equal([
++ \ 'line 2 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 4 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 6 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 8 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 10 Abcdefghijklmnopqrstuvwxyz'
++ \ ], getline(1, 9))
++
++ w! >> test.out " Append it to the output file
++
++ augroup Test3
++ au!
++ augroup END
++
++ " Test for the FilterReadPre and FilterReadPost autocmds.
++ set shelltemp " need temp files here
++ augroup Test4
++ au!
++ au FilterReadPre *.out call rename(expand("<afile>"), expand("<afile>") . ".t")
++ au FilterReadPre *.out exe 'silent !sed s/e/E/ ' . shellescape(expand("<afile>")) . ".t >" . shellescape(expand("<afile>"))
++ au FilterReadPre *.out exe 'silent !rm ' . shellescape(expand("<afile>")) . '.t'
++ au FilterReadPost *.out '[,']s/x/X/g
++ augroup END
++
++ e! test.out " Edit the output file
++ 1,$!cat
++ call assert_equal([
++ \ 'linE 2 AbcdefghijklmnopqrstuvwXyz',
++ \ 'linE 3 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
++ \ 'linE 4 AbcdefghijklmnopqrstuvwXyz',
++ \ 'linE 5 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
++ \ 'linE 6 AbcdefghijklmnopqrstuvwXyz',
++ \ 'linE 7 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
++ \ 'linE 8 AbcdefghijklmnopqrstuvwXyz',
++ \ 'linE 9 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
++ \ 'linE 10 AbcdefghijklmnopqrstuvwXyz'
++ \ ], getline(1, 9))
++ call assert_equal([
++ \ 'line 2 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 4 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 6 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 8 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 10 Abcdefghijklmnopqrstuvwxyz'
++ \ ], readfile('test.out'))
++
++ augroup Test4
++ au!
++ augroup END
++ set shelltemp&vim
++
++ " Test for the FileReadPre and FileReadPost autocmds.
++ augroup Test5
++ au!
++ au FileReadPre *.gz exe 'silent !gzip -d ' . shellescape(expand("<afile>"))
++ au FileReadPre *.gz call rename(expand("<afile>:r"), expand("<afile>"))
++ au FileReadPost *.gz '[,']s/l/L/
++ augroup END
++
++ new
++ 0r Xtestfile.gz " Read compressed file
++ call assert_equal([
++ \ 'Line 2 Abcdefghijklmnopqrstuvwxyz',
++ \ 'Line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'Line 4 Abcdefghijklmnopqrstuvwxyz',
++ \ 'Line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'Line 6 Abcdefghijklmnopqrstuvwxyz',
++ \ 'Line 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'Line 8 Abcdefghijklmnopqrstuvwxyz',
++ \ 'Line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'Line 10 Abcdefghijklmnopqrstuvwxyz'
++ \ ], getline(1, 9))
++ call assert_equal([
++ \ 'line 2 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 4 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 6 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 8 Abcdefghijklmnopqrstuvwxyz',
++ \ 'line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
++ \ 'line 10 Abcdefghijklmnopqrstuvwxyz'
++ \ ], readfile('Xtestfile.gz'))
++
++ augroup Test5
++ au!
++ augroup END
++
++ au! FileChangedShell
++ call delete('Xtestfile.gz')
++ call delete('Xtest.c')
++ call delete('test.out')
++ endfunc
+*** ../vim-8.1.1202/src/version.c 2019-04-25 20:07:44.171328174 +0200
+--- src/version.c 2019-04-25 20:25:59.985374027 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1203,
+ /**/
+
+--
+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.1204 b/data/vim/patches/8.1.1204
new file mode 100644
index 000000000..4ccf57a65
--- /dev/null
+++ b/data/vim/patches/8.1.1204
@@ -0,0 +1,287 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1204
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1204
+Problem: Output of :command with address completion is not nice.
+Solution: Shorten the address completion names.
+Files: src/ex_docmd.c, runtime/doc/map.txt
+
+
+*** ../vim-8.1.1203/src/ex_docmd.c 2019-04-24 23:08:20.078079973 +0200
+--- src/ex_docmd.c 2019-04-25 21:23:03.102569641 +0200
+***************
+*** 5915,5931 ****
+ {
+ int expand;
+ char *name;
+ } addr_type_complete[] =
+ {
+! {ADDR_ARGUMENTS, "arguments"},
+! {ADDR_LINES, "lines"},
+! {ADDR_LOADED_BUFFERS, "loaded_buffers"},
+! {ADDR_TABS, "tabs"},
+! {ADDR_BUFFERS, "buffers"},
+! {ADDR_WINDOWS, "windows"},
+! {ADDR_QUICKFIX, "quickfix"},
+! {ADDR_OTHER, "other"},
+! {-1, NULL}
+ };
+ #endif
+
+--- 5915,5932 ----
+ {
+ int expand;
+ char *name;
++ char *shortname;
+ } addr_type_complete[] =
+ {
+! {ADDR_ARGUMENTS, "arguments", "arg"},
+! {ADDR_LINES, "lines", "line"},
+! {ADDR_LOADED_BUFFERS, "loaded_buffers", "load"},
+! {ADDR_TABS, "tabs", "tab"},
+! {ADDR_BUFFERS, "buffers", "buf"},
+! {ADDR_WINDOWS, "windows", "win"},
+! {ADDR_QUICKFIX, "quickfix", "qf"},
+! {ADDR_OTHER, "other", "?"},
+! {-1, NULL, NULL}
+ };
+ #endif
+
+***************
+*** 6020,6026 ****
+
+ /* Put out the title first time */
+ if (!found)
+! msg_puts_title(_("\n Name Args Address Complete Definition"));
+ found = TRUE;
+ msg_putchar('\n');
+ if (got_int)
+--- 6021,6027 ----
+
+ /* Put out the title first time */
+ if (!found)
+! msg_puts_title(_("\n Name Args Address Complete Definition"));
+ found = TRUE;
+ msg_putchar('\n');
+ if (got_int)
+***************
+*** 6101,6114 ****
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 9 - over);
+
+ // Address Type
+ for (j = 0; addr_type_complete[j].expand != -1; ++j)
+ if (addr_type_complete[j].expand != ADDR_LINES
+ && addr_type_complete[j].expand == cmd->uc_addr_type)
+ {
+! STRCPY(IObuff + len, addr_type_complete[j].name);
+ len += (int)STRLEN(IObuff + len);
+ break;
+ }
+--- 6102,6115 ----
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 8 - over);
+
+ // Address Type
+ for (j = 0; addr_type_complete[j].expand != -1; ++j)
+ if (addr_type_complete[j].expand != ADDR_LINES
+ && addr_type_complete[j].expand == cmd->uc_addr_type)
+ {
+! STRCPY(IObuff + len, addr_type_complete[j].shortname);
+ len += (int)STRLEN(IObuff + len);
+ break;
+ }
+***************
+*** 6128,6140 ****
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 24 - over);
+
+ IObuff[len] = '\0';
+ msg_outtrans(IObuff);
+
+ msg_outtrans_special(cmd->uc_rep, FALSE,
+! name_len == 0 ? Columns - 46 : 0);
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+ last_set_msg(cmd->uc_script_ctx);
+--- 6129,6141 ----
+
+ do {
+ IObuff[len++] = ' ';
+! } while (len < 25 - over);
+
+ IObuff[len] = '\0';
+ msg_outtrans(IObuff);
+
+ msg_outtrans_special(cmd->uc_rep, FALSE,
+! name_len == 0 ? Columns - 47 : 0);
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+ last_set_msg(cmd->uc_script_ctx);
+*** ../vim-8.1.1203/runtime/doc/map.txt 2018-12-08 16:03:18.656085902 +0100
+--- runtime/doc/map.txt 2019-04-25 21:24:01.951735065 +0200
+***************
+*** 371,378 ****
+
+ *omap-info*
+ Operator-pending mappings can be used to define a movement command that can be
+! used with any operator. Simple example: ":omap { w" makes "y{" work like "yw"
+! and "d{" like "dw".
+
+ To ignore the starting cursor position and select different text, you can have
+ the omap start Visual mode to select the text to be operated upon. Example
+--- 371,379 ----
+
+ *omap-info*
+ Operator-pending mappings can be used to define a movement command that can be
+! used with any operator. Simple example: >
+! :omap { w
+! makes "y{" work like "yw" and "d{" like "dw".
+
+ To ignore the starting cursor position and select different text, you can have
+ the omap start Visual mode to select the text to be operated upon. Example
+***************
+*** 383,391 ****
+ before it. That usually is the function name.
+
+ To enter a mapping for Normal and Visual mode, but not Operator-pending mode,
+! first define it for all three modes, then unmap it for Operator-pending mode:
+ :map xx something-difficult
+ :ounmap xx
+ Likewise for a mapping for Visual and Operator-pending mode or Normal and
+ Operator-pending mode.
+
+--- 384,394 ----
+ before it. That usually is the function name.
+
+ To enter a mapping for Normal and Visual mode, but not Operator-pending mode,
+! first define it for all three modes, then unmap it for
+! Operator-pending mode: >
+ :map xx something-difficult
+ :ounmap xx
++
+ Likewise for a mapping for Visual and Operator-pending mode or Normal and
+ Operator-pending mode.
+
+***************
+*** 1190,1198 ****
+
+ :com[mand] *:com* *:command*
+ List all user-defined commands. When listing commands,
+! the characters in the first two columns are
+ ! Command has the -bang attribute
+ " Command has the -register attribute
+ b Command is local to current buffer
+ (see below for details on attributes)
+ The list can be filtered on command name with
+--- 1193,1202 ----
+
+ :com[mand] *:com* *:command*
+ List all user-defined commands. When listing commands,
+! the characters in the first columns are:
+ ! Command has the -bang attribute
+ " Command has the -register attribute
++ | Command has the -bar attribute
+ b Command is local to current buffer
+ (see below for details on attributes)
+ The list can be filtered on command name with
+***************
+*** 1251,1257 ****
+ command can take arguments, using the -nargs attribute. Valid cases are:
+
+ -nargs=0 No arguments are allowed (the default)
+! -nargs=1 Exactly one argument is required, it includes spaces
+ -nargs=* Any number of arguments are allowed (0, 1, or many),
+ separated by white space
+ -nargs=? 0 or 1 arguments are allowed
+--- 1255,1261 ----
+ command can take arguments, using the -nargs attribute. Valid cases are:
+
+ -nargs=0 No arguments are allowed (the default)
+! -nargs=1 Exactly one argument is required, it includes spaces
+ -nargs=* Any number of arguments are allowed (0, 1, or many),
+ separated by white space
+ -nargs=? 0 or 1 arguments are allowed
+***************
+*** 1276,1282 ****
+
+
+ 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
+--- 1280,1286 ----
+
+
+ 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
+***************
+*** 1397,1410 ****
+ by default correspond to the current line, last line and the whole buffer,
+ relate to arguments, (loaded) buffers, windows or tab pages.
+
+! Possible values are:
+! -addr=lines Range of lines (this is the default)
+! -addr=arguments Range for arguments
+! -addr=buffers Range for buffers (also not loaded buffers)
+! -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 ~
+--- 1401,1415 ----
+ by default correspond to the current line, last line and the whole buffer,
+ relate to arguments, (loaded) buffers, windows or tab pages.
+
+! Possible values are (second column is the short name used in listing):
+! -addr=lines Range of lines (this is the default)
+! -addr=arguments arg Range for arguments
+! -addr=buffers buf Range for buffers (also not loaded buffers)
+! -addr=loaded_buffers load Range for loaded buffers
+! -addr=windows win Range for windows
+! -addr=tabs tab Range for tab pages
+! -addr=quickfix qf Range for quickfix entries
+! -addr=other ? other kind of range
+
+
+ Special cases ~
+*** ../vim-8.1.1203/src/version.c 2019-04-25 20:28:53.327979592 +0200
+--- src/version.c 2019-04-25 21:11:47.901549268 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1204,
+ /**/
+
+--
+GUARD #1: Where'd you get the coconut?
+ARTHUR: We found them.
+GUARD #1: Found them? In Mercea? The coconut's tropical!
+ARTHUR: What do you mean?
+GUARD #1: Well, this is a temperate zone.
+ 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.1205 b/data/vim/patches/8.1.1205
new file mode 100644
index 000000000..4f686c635
--- /dev/null
+++ b/data/vim/patches/8.1.1205
@@ -0,0 +1,209 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1205
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1205
+Problem: A BufReadPre autocommand may cause the cursor to move.
+Solution: Restore the cursor position after executing the autocommand,
+ unless the autocommand moved it. (Christian Brabandt,
+ closes #4302, closes #4294)
+Files: src/autocmd.c, src/proto/window.pro, src/structs.h,
+ src/testdir/test_autocmd.vim, src/window.c
+
+
+*** ../vim-8.1.1204/src/autocmd.c 2019-04-08 18:15:36.464223229 +0200
+--- src/autocmd.c 2019-04-25 22:07:17.467246898 +0200
+***************
+*** 2123,2131 ****
+ for (ap = patcmd.curpat; ap->next != NULL; ap = ap->next)
+ ap->last = FALSE;
+ ap->last = TRUE;
+! check_lnums(TRUE); // make sure cursor and topline are valid
+ do_cmdline(NULL, getnextac, (void *)&patcmd,
+ DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
+ #ifdef FEAT_EVAL
+ if (eap != NULL)
+ {
+--- 2123,2138 ----
+ for (ap = patcmd.curpat; ap->next != NULL; ap = ap->next)
+ ap->last = FALSE;
+ ap->last = TRUE;
+!
+! // make sure cursor and topline are valid
+! check_lnums(TRUE);
+!
+ do_cmdline(NULL, getnextac, (void *)&patcmd,
+ DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
++
++ // restore cursor and topline, unless they were changed
++ reset_lnums();
++
+ #ifdef FEAT_EVAL
+ if (eap != NULL)
+ {
+*** ../vim-8.1.1204/src/proto/window.pro 2019-04-17 18:24:32.010143188 +0200
+--- src/proto/window.pro 2019-04-25 22:07:22.791243667 +0200
+***************
+*** 70,75 ****
+--- 70,76 ----
+ int min_rows(void);
+ int only_one_window(void);
+ void check_lnums(int do_curwin);
++ void reset_lnums(void);
+ void make_snapshot(int idx);
+ void restore_snapshot(int idx, int close_curwin);
+ int switch_win(win_T **save_curwin, tabpage_T **save_curtab, win_T *win, tabpage_T *tp, int no_display);
+*** ../vim-8.1.1204/src/structs.h 2019-04-04 18:15:05.770857065 +0200
+--- src/structs.h 2019-04-25 22:11:22.790777615 +0200
+***************
+*** 2715,2720 ****
+--- 2715,2730 ----
+ #endif
+ };
+
++ // Structure to store last cursor position and topline. Used by check_lnums()
++ // and reset_lnums().
++ typedef struct
++ {
++ int w_topline_save; // original topline value
++ int w_topline_corr; // corrected topline value
++ pos_T w_cursor_save; // original cursor position
++ pos_T w_cursor_corr; // corrected cursor position
++ } pos_save_T;
++
+ #ifdef FEAT_MENU
+ typedef struct {
+ int wb_startcol;
+***************
+*** 2803,2808 ****
+--- 2813,2820 ----
+ int w_wincol; /* Leftmost column of window in screen. */
+ int w_width; /* Width of window, excluding separation. */
+ int w_vsep_width; /* Number of separator columns (0 or 1). */
++ pos_save_T w_save_cursor; /* backup of cursor pos and topline */
++
+
+ /*
+ * === start of cached values ====
+*** ../vim-8.1.1204/src/testdir/test_autocmd.vim 2019-04-25 20:28:53.327979592 +0200
+--- src/testdir/test_autocmd.vim 2019-04-25 22:17:58.565083976 +0200
+***************
+*** 1485,1490 ****
+--- 1485,1535 ----
+ call assert_fails('au WinNew * ++once ++once echo bad', 'E983:')
+ endfunc
+
++ func Test_autocmd_bufreadpre()
++ new
++ let b:bufreadpre = 1
++ call append(0, range(100))
++ w! XAutocmdBufReadPre.txt
++ autocmd BufReadPre <buffer> :let b:bufreadpre += 1
++ norm! 50gg
++ sp
++ norm! 100gg
++ wincmd p
++ let g:wsv1 = winsaveview()
++ wincmd p
++ let g:wsv2 = winsaveview()
++ " triggers BufReadPre, should not move the cursor in either window
++ " The topline may change one line in a large window.
++ edit
++ call assert_inrange(g:wsv2.topline - 1, g:wsv2.topline + 1, winsaveview().topline)
++ call assert_equal(g:wsv2.lnum, winsaveview().lnum)
++ call assert_equal(2, b:bufreadpre)
++ wincmd p
++ call assert_equal(g:wsv1.topline, winsaveview().topline)
++ call assert_equal(g:wsv1.lnum, winsaveview().lnum)
++ call assert_equal(2, b:bufreadpre)
++ " Now set the cursor position in an BufReadPre autocommand
++ " (even though the position will be invalid, this should make Vim reset the
++ " cursor position in the other window.
++ wincmd p
++ set cpo+=g
++ " won't do anything, but try to set the cursor on an invalid lnum
++ autocmd BufReadPre <buffer> :norm! 70gg
++ " triggers BufReadPre, should not move the cursor in either window
++ e
++ call assert_equal(1, winsaveview().topline)
++ call assert_equal(1, winsaveview().lnum)
++ call assert_equal(3, b:bufreadpre)
++ wincmd p
++ call assert_equal(g:wsv1.topline, winsaveview().topline)
++ call assert_equal(g:wsv1.lnum, winsaveview().lnum)
++ call assert_equal(3, b:bufreadpre)
++ close
++ close
++ call delete('XAutocmdBufReadPre.txt')
++ set cpo-=g
++ endfunc
++
+ " FileChangedShell tested in test_filechanged.vim
+
+ " Tests for the following autocommands:
+*** ../vim-8.1.1204/src/window.c 2019-04-17 18:24:32.010143188 +0200
+--- src/window.c 2019-04-25 22:20:04.956396595 +0200
+***************
+*** 6196,6205 ****
+--- 6196,6234 ----
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ if ((do_curwin || wp != curwin) && wp->w_buffer == curbuf)
+ {
++ // save the original cursor position and topline
++ wp->w_save_cursor.w_cursor_save = wp->w_cursor;
++ wp->w_save_cursor.w_topline_save = wp->w_topline;
++
+ if (wp->w_cursor.lnum > curbuf->b_ml.ml_line_count)
+ wp->w_cursor.lnum = curbuf->b_ml.ml_line_count;
+ if (wp->w_topline > curbuf->b_ml.ml_line_count)
+ wp->w_topline = curbuf->b_ml.ml_line_count;
++
++ // save the corrected cursor position and topline
++ wp->w_save_cursor.w_cursor_corr = wp->w_cursor;
++ wp->w_save_cursor.w_topline_corr = wp->w_topline;
++ }
++ }
++
++ /*
++ * Reset cursor and topline to its stored values from check_lnums().
++ * check_lnums() must have been called first!
++ */
++ void
++ reset_lnums()
++ {
++ win_T *wp;
++ tabpage_T *tp;
++
++ FOR_ALL_TAB_WINDOWS(tp, wp)
++ if (wp->w_buffer == curbuf)
++ {
++ // Restore the value if the autocommand didn't change it.
++ if (EQUAL_POS(wp->w_save_cursor.w_cursor_corr, wp->w_cursor))
++ wp->w_cursor = wp->w_save_cursor.w_cursor_save;
++ if (wp->w_save_cursor.w_topline_corr == wp->w_topline)
++ wp->w_topline = wp->w_save_cursor.w_topline_save;
+ }
+ }
+
+*** ../vim-8.1.1204/src/version.c 2019-04-25 21:27:40.566186854 +0200
+--- src/version.c 2019-04-25 22:05:46.695243258 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1205,
+ /**/
+
+--
+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.1206 b/data/vim/patches/8.1.1206
new file mode 100644
index 000000000..a42bd51e7
--- /dev/null
+++ b/data/vim/patches/8.1.1206
@@ -0,0 +1,181 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1206
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1206
+Problem: User command parsing and listing not properly tested.
+Solution: Add more tests. (Dominique Pelle, closes #4296)
+Files: src/testdir/test_usercommands.vim
+
+
+*** ../vim-8.1.1205/src/testdir/test_usercommands.vim 2018-12-08 16:03:18.656085902 +0100
+--- src/testdir/test_usercommands.vim 2019-04-25 22:39:52.634511195 +0200
+***************
+*** 304,306 ****
+--- 304,446 ----
+
+ delcommand DoSomething
+ endfunc
++
++ func Test_command_list()
++ command! DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 :",
++ \ execute('command DoCmd'))
++
++ " Test with various -range= and -count= argument values.
++ command! -range DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 . :",
++ \ execute('command DoCmd'))
++ command! -range=% DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 % :",
++ \ execute('command! DoCmd'))
++ command! -range=2 DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 2 :",
++ \ execute('command DoCmd'))
++ command! -count=2 DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 2c :",
++ \ execute('command DoCmd'))
++
++ " Test with various -addr= argument values.
++ command! -addr=lines DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 . :",
++ \ execute('command DoCmd'))
++ command! -addr=arguments DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 . arg :",
++ \ execute('command DoCmd'))
++ command! -addr=buffers DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 . buf :",
++ \ execute('command DoCmd'))
++ command! -addr=loaded_buffers DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 . load :",
++ \ execute('command DoCmd'))
++ command! -addr=windows DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 . win :",
++ \ execute('command DoCmd'))
++ command! -addr=tabs DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 . tab :",
++ \ execute('command DoCmd'))
++ command! -addr=other DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 . ? :",
++ \ execute('command DoCmd'))
++
++ " Test with various -complete= argument values (non-exhaustive list)
++ command! -complete=arglist DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 arglist :",
++ \ execute('command DoCmd'))
++ command! -complete=augroup DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 augroup :",
++ \ execute('command DoCmd'))
++ command! -complete=custom,CustomComplete DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 custom :",
++ \ execute('command DoCmd'))
++ command! -complete=customlist,CustomComplete DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 customlist :",
++ \ execute('command DoCmd'))
++
++ " Test with various -narg= argument values.
++ command! -nargs=0 DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 :",
++ \ execute('command DoCmd'))
++ command! -nargs=1 DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 1 :",
++ \ execute('command DoCmd'))
++ command! -nargs=* DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd * :",
++ \ execute('command DoCmd'))
++ command! -nargs=? DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd ? :",
++ \ execute('command DoCmd'))
++ command! -nargs=+ DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd + :",
++ \ execute('command DoCmd'))
++
++ " Test with other arguments.
++ command! -bang DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n! DoCmd 0 :",
++ \ execute('command DoCmd'))
++ command! -bar DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n| DoCmd 0 :",
++ \ execute('command DoCmd'))
++ command! -register DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n\" DoCmd 0 :",
++ \ execute('command DoCmd'))
++ command! -buffer DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\nb DoCmd 0 :"
++ \ .. "\n\" DoCmd 0 :",
++ \ execute('command DoCmd'))
++ comclear
++
++ " Test with many args.
++ command! -bang -bar -register -buffer -nargs=+ -complete=environment -addr=windows -count=3 DoCmd :
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n!\"b|DoCmd + 3c win environment :",
++ \ execute('command DoCmd'))
++ comclear
++
++ " Test with special characters in command definition.
++ command! DoCmd :<cr><tab><c-d>
++ call assert_equal("\n Name Args Address Complete Definition"
++ \ .. "\n DoCmd 0 :<CR><Tab><C-D>",
++ \ execute('command DoCmd'))
++
++ " Test output in verbose mode.
++ command! DoCmd :
++ call assert_match("^\n"
++ \ .. " Name Args Address Complete Definition\n"
++ \ .. " DoCmd 0 :\n"
++ \ .. "\tLast set from .*/test_usercommands.vim line \\d\\+$",
++ \ execute('verbose command DoCmd'))
++
++ comclear
++ call assert_equal("\nNo user-defined commands found", execute(':command Xxx'))
++ call assert_equal("\nNo user-defined commands found", execute('command'))
++ endfunc
+*** ../vim-8.1.1205/src/version.c 2019-04-25 22:21:56.935749161 +0200
+--- src/version.c 2019-04-25 22:40:47.594283304 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1206,
+ /**/
+
+--
+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.1207 b/data/vim/patches/8.1.1207
new file mode 100644
index 000000000..d92e34926
--- /dev/null
+++ b/data/vim/patches/8.1.1207
@@ -0,0 +1,112 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1207
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1207
+Problem: Some compilers give warning messages.
+Solution: Initialize variables, change printf() argument. (Christian
+ Brabandt, closes #4305)
+Files: src/eval.c, src/screen.c, src/undo.c, src/window.c
+
+
+*** ../vim-8.1.1206/src/eval.c 2019-04-20 14:39:42.792386141 +0200
+--- src/eval.c 2019-04-26 20:24:38.284938333 +0200
+***************
+*** 4051,4057 ****
+ varnumber_T n1, n2;
+ #ifdef FEAT_FLOAT
+ int use_float = FALSE;
+! float_T f1 = 0, f2;
+ #endif
+ int error = FALSE;
+
+--- 4051,4057 ----
+ varnumber_T n1, n2;
+ #ifdef FEAT_FLOAT
+ int use_float = FALSE;
+! float_T f1 = 0, f2 = 0;
+ #endif
+ int error = FALSE;
+
+*** ../vim-8.1.1206/src/screen.c 2019-04-20 23:38:02.189504258 +0200
+--- src/screen.c 2019-04-26 20:24:38.284938333 +0200
+***************
+*** 549,556 ****
+ #endif
+ #ifdef FEAT_GUI
+ int did_undraw = FALSE;
+! int gui_cursor_col;
+! int gui_cursor_row;
+ #endif
+ int no_update = FALSE;
+
+--- 549,556 ----
+ #endif
+ #ifdef FEAT_GUI
+ int did_undraw = FALSE;
+! int gui_cursor_col = 0;
+! int gui_cursor_row = 0;
+ #endif
+ int no_update = FALSE;
+
+*** ../vim-8.1.1206/src/undo.c 2019-03-26 00:31:17.221047734 +0100
+--- src/undo.c 2019-04-26 20:24:38.288938312 +0200
+***************
+*** 2271,2277 ****
+ u_header_T *uhp = NULL;
+ u_header_T *last;
+ int mark;
+! int nomark;
+ int round;
+ int dosec = sec;
+ int dofile = file;
+--- 2271,2277 ----
+ u_header_T *uhp = NULL;
+ u_header_T *last;
+ int mark;
+! int nomark = 0; // shut up compiler
+ int round;
+ int dosec = sec;
+ int dofile = file;
+*** ../vim-8.1.1206/src/window.c 2019-04-25 22:21:56.935749161 +0200
+--- src/window.c 2019-04-26 20:24:38.288938312 +0200
+***************
+*** 3981,3987 ****
+ void
+ goto_tabpage(int n)
+ {
+! tabpage_T *tp;
+ tabpage_T *ttp;
+ int i;
+
+--- 3981,3987 ----
+ void
+ goto_tabpage(int n)
+ {
+! tabpage_T *tp = NULL; // shut up compiler
+ tabpage_T *ttp;
+ int i;
+
+*** ../vim-8.1.1206/src/version.c 2019-04-25 22:42:02.313959805 +0200
+--- src/version.c 2019-04-26 20:26:06.184474166 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1207,
+ /**/
+
+--
+I still remember when I gave up Smoking, Drinking and Sex. It was the
+most *horrifying* hour of my life!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1208 b/data/vim/patches/8.1.1208
new file mode 100644
index 000000000..bacae95f1
--- /dev/null
+++ b/data/vim/patches/8.1.1208
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1208
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1208
+Problem: Links to repository use wrong file name.
+Solution: Swap the file names. (Nahuel Ourthe, closes #4304)
+Files: src/README.md
+
+
+*** ../vim-8.1.1207/src/README.md 2019-04-23 18:39:43.694863660 +0200
+--- src/README.md 2019-04-26 21:28:18.740290946 +0200
+***************
+*** 82,91 ****
+ The current window is `curwin`. The current buffer is `curbuf`. These point
+ to structures with the cursor position in the window, option values, the file
+ name, etc. These are defined in
+! [`structs.h`](https://github.com/vim/vim/blob/master/src/globals.h).
+
+ All the global variables are declared in
+! [`globals.h`](https://github.com/vim/vim/blob/master/src/structs.h).
+
+
+ ## The main loop ##
+--- 82,91 ----
+ The current window is `curwin`. The current buffer is `curbuf`. These point
+ to structures with the cursor position in the window, option values, the file
+ name, etc. These are defined in
+! [`structs.h`](https://github.com/vim/vim/blob/master/src/structs.h).
+
+ All the global variables are declared in
+! [`globals.h`](https://github.com/vim/vim/blob/master/src/globals.h).
+
+
+ ## The main loop ##
+*** ../vim-8.1.1207/src/version.c 2019-04-26 20:32:57.086296530 +0200
+--- src/version.c 2019-04-26 21:29:41.571860368 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1208,
+ /**/
+
+--
+GUARD #2: It could be carried by an African swallow!
+GUARD #1: Oh, yeah, an African swallow maybe, but not a European swallow,
+ that's my point.
+GUARD #2: Oh, yeah, I agree with that...
+ 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.1209 b/data/vim/patches/8.1.1209
new file mode 100644
index 000000000..507de3bab
--- /dev/null
+++ b/data/vim/patches/8.1.1209
@@ -0,0 +1,93 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1209
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1209
+Problem: Clever compiler warns for buffer being too small.
+Solution: Make the buffer bigger (even though it's not really needed).
+Files: src/evalfunc.c, src/syntax.c
+
+
+*** ../vim-8.1.1208/src/evalfunc.c 2019-04-20 21:54:04.180499034 +0200
+--- src/evalfunc.c 2019-04-26 22:31:18.029277040 +0200
+***************
+*** 5460,5466 ****
+ for (i = 0; i < MAXPOSMATCH; ++i)
+ {
+ llpos_T *llpos;
+! char buf[6];
+ list_T *l;
+
+ llpos = &cur->pos.pos[i];
+--- 5460,5466 ----
+ for (i = 0; i < MAXPOSMATCH; ++i)
+ {
+ llpos_T *llpos;
+! char buf[30]; // use 30 to avoid compiler warning
+ list_T *l;
+
+ llpos = &cur->pos.pos[i];
+***************
+*** 11502,11508 ****
+ while (li != NULL)
+ {
+ int i = 0;
+! char_u buf[5];
+ dictitem_T *di;
+ char_u *group;
+ int priority;
+--- 11502,11508 ----
+ while (li != NULL)
+ {
+ int i = 0;
+! char buf[30]; // use 30 to avoid compiler warning
+ dictitem_T *di;
+ char_u *group;
+ int priority;
+*** ../vim-8.1.1208/src/syntax.c 2019-02-17 17:44:36.219875473 +0100
+--- src/syntax.c 2019-04-26 22:32:44.976952709 +0200
+***************
+*** 10014,10020 ****
+ char_u *end;
+ int id;
+ #ifdef USER_HIGHLIGHT
+! char_u userhl[10];
+ # ifdef FEAT_STL_OPT
+ int id_S = -1;
+ int id_SNC = 0;
+--- 10014,10020 ----
+ char_u *end;
+ int id;
+ #ifdef USER_HIGHLIGHT
+! char_u userhl[30]; // use 30 to avoid compiler warning
+ # ifdef FEAT_STL_OPT
+ int id_S = -1;
+ int id_SNC = 0;
+*** ../vim-8.1.1208/src/version.c 2019-04-26 21:31:34.019272940 +0200
+--- src/version.c 2019-04-26 22:33:28.208787901 +0200
+***************
+*** 773,774 ****
+--- 773,776 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1209,
+ /**/
+
+--
+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.1210 b/data/vim/patches/8.1.1210
new file mode 100644
index 000000000..4405c63ae
--- /dev/null
+++ b/data/vim/patches/8.1.1210
@@ -0,0 +1,4639 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1210
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1210
+Problem: Support for user commands is spread out. No good reason to make
+ user commands optional.
+Solution: Move user command support to usercmd.c. Always enable the
+ user_commands feature.
+Files: src/usercmd.c, src/proto/usercmd.pro, Filelist, src/Make_bc5.mak,
+ src/Make_cyg_ming.mak, src/Make_dice.mak, src/Make_ivc.mak,
+ src/Make_manx.mak, src/Make_morph.mak, src/Make_mvc.mak,
+ src/Make_sas.mak, src/Make_vms.mms, src/Makefile, src/README.md,
+ src/buffer.c, src/eval.c, src/evalfunc.c, src/ex_cmds.h,
+ src/ex_docmd.c, src/proto/ex_docmd.pro, src/ex_getln.c,
+ src/feature.h, src/macros.h, src/misc2.c, src/proto.h,
+ src/structs.h, src/version.c, runtime/doc/eval.txt,
+ runtime/doc/various.txt
+
+
+*** ../vim-8.1.1209/src/usercmd.c 2019-04-27 12:58:18.994395422 +0200
+--- src/usercmd.c 2019-04-27 12:54:00.423836989 +0200
+***************
+*** 0 ****
+--- 1,1656 ----
++ /* 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.
++ */
++
++ /*
++ * usercmd.c: User defined command support
++ */
++
++ #include "vim.h"
++
++ typedef struct ucmd
++ {
++ char_u *uc_name; // The command name
++ long_u uc_argt; // The argument type
++ char_u *uc_rep; // The command's replacement string
++ long uc_def; // The default value for a range/count
++ 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
++ # endif
++ } ucmd_T;
++
++ // List of all user commands.
++ static garray_T ucmds = {0, 0, sizeof(ucmd_T), 4, NULL};
++
++ #define USER_CMD(i) (&((ucmd_T *)(ucmds.ga_data))[i])
++ #define USER_CMD_GA(gap, i) (&((ucmd_T *)((gap)->ga_data))[i])
++
++ /*
++ * List of names for completion for ":command" with the EXPAND_ flag.
++ * Must be alphabetical for completion.
++ */
++ static struct
++ {
++ int expand;
++ char *name;
++ } command_complete[] =
++ {
++ {EXPAND_ARGLIST, "arglist"},
++ {EXPAND_AUGROUP, "augroup"},
++ {EXPAND_BEHAVE, "behave"},
++ {EXPAND_BUFFERS, "buffer"},
++ {EXPAND_COLORS, "color"},
++ {EXPAND_COMMANDS, "command"},
++ {EXPAND_COMPILER, "compiler"},
++ #if defined(FEAT_CSCOPE)
++ {EXPAND_CSCOPE, "cscope"},
++ #endif
++ #if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
++ {EXPAND_USER_DEFINED, "custom"},
++ {EXPAND_USER_LIST, "customlist"},
++ #endif
++ {EXPAND_DIRECTORIES, "dir"},
++ {EXPAND_ENV_VARS, "environment"},
++ {EXPAND_EVENTS, "event"},
++ {EXPAND_EXPRESSION, "expression"},
++ {EXPAND_FILES, "file"},
++ {EXPAND_FILES_IN_PATH, "file_in_path"},
++ {EXPAND_FILETYPE, "filetype"},
++ {EXPAND_FUNCTIONS, "function"},
++ {EXPAND_HELP, "help"},
++ {EXPAND_HIGHLIGHT, "highlight"},
++ #if defined(FEAT_CMDHIST)
++ {EXPAND_HISTORY, "history"},
++ #endif
++ #if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
++ {EXPAND_LOCALES, "locale"},
++ #endif
++ {EXPAND_MAPCLEAR, "mapclear"},
++ {EXPAND_MAPPINGS, "mapping"},
++ {EXPAND_MENUS, "menu"},
++ {EXPAND_MESSAGES, "messages"},
++ {EXPAND_OWNSYNTAX, "syntax"},
++ #if defined(FEAT_PROFILE)
++ {EXPAND_SYNTIME, "syntime"},
++ #endif
++ {EXPAND_SETTINGS, "option"},
++ {EXPAND_PACKADD, "packadd"},
++ {EXPAND_SHELLCMD, "shellcmd"},
++ #if defined(FEAT_SIGNS)
++ {EXPAND_SIGN, "sign"},
++ #endif
++ {EXPAND_TAGS, "tag"},
++ {EXPAND_TAGS_LISTFILES, "tag_listfiles"},
++ {EXPAND_USER, "user"},
++ {EXPAND_USER_VARS, "var"},
++ {0, NULL}
++ };
++
++ /*
++ * List of names of address types. Must be alphabetical for completion.
++ */
++ static struct
++ {
++ int expand;
++ char *name;
++ char *shortname;
++ } addr_type_complete[] =
++ {
++ {ADDR_ARGUMENTS, "arguments", "arg"},
++ {ADDR_LINES, "lines", "line"},
++ {ADDR_LOADED_BUFFERS, "loaded_buffers", "load"},
++ {ADDR_TABS, "tabs", "tab"},
++ {ADDR_BUFFERS, "buffers", "buf"},
++ {ADDR_WINDOWS, "windows", "win"},
++ {ADDR_QUICKFIX, "quickfix", "qf"},
++ {ADDR_OTHER, "other", "?"},
++ {-1, NULL, NULL}
++ };
++
++ #define UC_BUFFER 1 // -buffer: local to current buffer
++
++ /*
++ * Search for a user command that matches "eap->cmd".
++ * Return cmdidx in "eap->cmdidx", flags in "eap->argt", idx in "eap->useridx".
++ * Return a pointer to just after the command.
++ * Return NULL if there is no matching command.
++ */
++ char_u *
++ find_ucmd(
++ exarg_T *eap,
++ char_u *p, // end of the command (possibly including count)
++ int *full, // set to TRUE for a full match
++ expand_T *xp, // used for completion, NULL otherwise
++ int *compl UNUSED) // completion flags or NULL
++ {
++ int len = (int)(p - eap->cmd);
++ int j, k, matchlen = 0;
++ ucmd_T *uc;
++ int found = FALSE;
++ int possible = FALSE;
++ char_u *cp, *np; // Point into typed cmd and test name
++ garray_T *gap;
++ int amb_local = FALSE; // Found ambiguous buffer-local command,
++ // only full match global is accepted.
++
++ /*
++ * Look for buffer-local user commands first, then global ones.
++ */
++ gap = &curbuf->b_ucmds;
++ for (;;)
++ {
++ for (j = 0; j < gap->ga_len; ++j)
++ {
++ uc = USER_CMD_GA(gap, j);
++ cp = eap->cmd;
++ np = uc->uc_name;
++ k = 0;
++ while (k < len && *np != NUL && *cp++ == *np++)
++ k++;
++ if (k == len || (*np == NUL && vim_isdigit(eap->cmd[k])))
++ {
++ // If finding a second match, the command is ambiguous. But
++ // not if a buffer-local command wasn't a full match and a
++ // global command is a full match.
++ if (k == len && found && *np != NUL)
++ {
++ if (gap == &ucmds)
++ return NULL;
++ amb_local = TRUE;
++ }
++
++ if (!found || (k == len && *np == NUL))
++ {
++ // If we matched up to a digit, then there could
++ // be another command including the digit that we
++ // should use instead.
++ if (k == len)
++ found = TRUE;
++ else
++ possible = TRUE;
++
++ if (gap == &ucmds)
++ eap->cmdidx = CMD_USER;
++ else
++ eap->cmdidx = CMD_USER_BUF;
++ eap->argt = (long)uc->uc_argt;
++ eap->useridx = j;
++ eap->addr_type = uc->uc_addr_type;
++
++ # ifdef FEAT_CMDL_COMPL
++ if (compl != NULL)
++ *compl = uc->uc_compl;
++ # ifdef FEAT_EVAL
++ 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
++ // Do not search for further abbreviations
++ // if this is an exact match.
++ matchlen = k;
++ if (k == len && *np == NUL)
++ {
++ if (full != NULL)
++ *full = TRUE;
++ amb_local = FALSE;
++ break;
++ }
++ }
++ }
++ }
++
++ // Stop if we found a full match or searched all.
++ if (j < gap->ga_len || gap == &ucmds)
++ break;
++ gap = &ucmds;
++ }
++
++ // Only found ambiguous matches.
++ if (amb_local)
++ {
++ if (xp != NULL)
++ xp->xp_context = EXPAND_UNSUCCESSFUL;
++ return NULL;
++ }
++
++ // The match we found may be followed immediately by a number. Move "p"
++ // back to point to it.
++ if (found || possible)
++ return p + (matchlen - len);
++ return p;
++ }
++
++ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
++
++ char_u *
++ set_context_in_user_cmd(expand_T *xp, char_u *arg_in)
++ {
++ char_u *arg = arg_in;
++ char_u *p;
++
++ // Check for attributes
++ while (*arg == '-')
++ {
++ arg++; // Skip "-"
++ p = skiptowhite(arg);
++ if (*p == NUL)
++ {
++ // Cursor is still in the attribute
++ p = vim_strchr(arg, '=');
++ if (p == NULL)
++ {
++ // No "=", so complete attribute names
++ xp->xp_context = EXPAND_USER_CMD_FLAGS;
++ xp->xp_pattern = arg;
++ return NULL;
++ }
++
++ // For the -complete, -nargs and -addr attributes, we complete
++ // their arguments as well.
++ if (STRNICMP(arg, "complete", p - arg) == 0)
++ {
++ xp->xp_context = EXPAND_USER_COMPLETE;
++ xp->xp_pattern = p + 1;
++ return NULL;
++ }
++ else if (STRNICMP(arg, "nargs", p - arg) == 0)
++ {
++ xp->xp_context = EXPAND_USER_NARGS;
++ xp->xp_pattern = p + 1;
++ return NULL;
++ }
++ else if (STRNICMP(arg, "addr", p - arg) == 0)
++ {
++ xp->xp_context = EXPAND_USER_ADDR_TYPE;
++ xp->xp_pattern = p + 1;
++ return NULL;
++ }
++ return NULL;
++ }
++ arg = skipwhite(p);
++ }
++
++ // After the attributes comes the new command name
++ p = skiptowhite(arg);
++ if (*p == NUL)
++ {
++ xp->xp_context = EXPAND_USER_COMMANDS;
++ xp->xp_pattern = arg;
++ return NULL;
++ }
++
++ // And finally comes a normal command
++ return skipwhite(p);
++ }
++
++ char_u *
++ get_user_command_name(int idx)
++ {
++ return get_user_commands(NULL, idx - (int)CMD_SIZE);
++ }
++
++ /*
++ * Function given to ExpandGeneric() to obtain the list of user command names.
++ */
++ char_u *
++ get_user_commands(expand_T *xp UNUSED, int idx)
++ {
++ if (idx < curbuf->b_ucmds.ga_len)
++ return USER_CMD_GA(&curbuf->b_ucmds, idx)->uc_name;
++ idx -= curbuf->b_ucmds.ga_len;
++ if (idx < ucmds.ga_len)
++ return USER_CMD(idx)->uc_name;
++ return NULL;
++ }
++
++ /*
++ * Function given to ExpandGeneric() to obtain the list of user address type
++ * names.
++ */
++ char_u *
++ get_user_cmd_addr_type(expand_T *xp UNUSED, int idx)
++ {
++ return (char_u *)addr_type_complete[idx].name;
++ }
++
++ /*
++ * Function given to ExpandGeneric() to obtain the list of user command
++ * attributes.
++ */
++ char_u *
++ get_user_cmd_flags(expand_T *xp UNUSED, int idx)
++ {
++ static char *user_cmd_flags[] = {
++ "addr", "bang", "bar", "buffer", "complete",
++ "count", "nargs", "range", "register"
++ };
++
++ if (idx >= (int)(sizeof(user_cmd_flags) / sizeof(user_cmd_flags[0])))
++ return NULL;
++ return (char_u *)user_cmd_flags[idx];
++ }
++
++ /*
++ * Function given to ExpandGeneric() to obtain the list of values for -nargs.
++ */
++ char_u *
++ get_user_cmd_nargs(expand_T *xp UNUSED, int idx)
++ {
++ static char *user_cmd_nargs[] = {"0", "1", "*", "?", "+"};
++
++ if (idx >= (int)(sizeof(user_cmd_nargs) / sizeof(user_cmd_nargs[0])))
++ return NULL;
++ return (char_u *)user_cmd_nargs[idx];
++ }
++
++ /*
++ * Function given to ExpandGeneric() to obtain the list of values for
++ * -complete.
++ */
++ char_u *
++ get_user_cmd_complete(expand_T *xp UNUSED, int idx)
++ {
++ return (char_u *)command_complete[idx].name;
++ }
++
++ int
++ cmdcomplete_str_to_type(char_u *complete_str)
++ {
++ int i;
++
++ for (i = 0; command_complete[i].expand != 0; ++i)
++ if (STRCMP(complete_str, command_complete[i].name) == 0)
++ return command_complete[i].expand;
++
++ return EXPAND_NOTHING;
++ }
++
++ #endif // FEAT_CMDL_COMPL
++
++ /*
++ * List user commands starting with "name[name_len]".
++ */
++ static void
++ uc_list(char_u *name, size_t name_len)
++ {
++ int i, j;
++ int found = FALSE;
++ ucmd_T *cmd;
++ int len;
++ int over;
++ long a;
++ garray_T *gap;
++
++ gap = &curbuf->b_ucmds;
++ for (;;)
++ {
++ for (i = 0; i < gap->ga_len; ++i)
++ {
++ cmd = USER_CMD_GA(gap, i);
++ a = (long)cmd->uc_argt;
++
++ // Skip commands which don't match the requested prefix and
++ // commands filtered out.
++ if (STRNCMP(name, cmd->uc_name, name_len) != 0
++ || message_filtered(cmd->uc_name))
++ continue;
++
++ // Put out the title first time
++ if (!found)
++ msg_puts_title(_("\n Name Args Address Complete Definition"));
++ found = TRUE;
++ msg_putchar('\n');
++ if (got_int)
++ break;
++
++ // Special cases
++ len = 4;
++ if (a & BANG)
++ {
++ msg_putchar('!');
++ --len;
++ }
++ if (a & REGSTR)
++ {
++ msg_putchar('"');
++ --len;
++ }
++ if (gap != &ucmds)
++ {
++ msg_putchar('b');
++ --len;
++ }
++ if (a & TRLBAR)
++ {
++ msg_putchar('|');
++ --len;
++ }
++ while (len-- > 0)
++ msg_putchar(' ');
++
++ msg_outtrans_attr(cmd->uc_name, HL_ATTR(HLF_D));
++ len = (int)STRLEN(cmd->uc_name) + 4;
++
++ do {
++ msg_putchar(' ');
++ ++len;
++ } while (len < 22);
++
++ // "over" is how much longer the name is than the column width for
++ // the name, we'll try to align what comes after.
++ over = len - 22;
++ len = 0;
++
++ // Arguments
++ switch ((int)(a & (EXTRA|NOSPC|NEEDARG)))
++ {
++ case 0: IObuff[len++] = '0'; break;
++ case (EXTRA): IObuff[len++] = '*'; break;
++ case (EXTRA|NOSPC): IObuff[len++] = '?'; break;
++ case (EXTRA|NEEDARG): IObuff[len++] = '+'; break;
++ case (EXTRA|NOSPC|NEEDARG): IObuff[len++] = '1'; break;
++ }
++
++ do {
++ IObuff[len++] = ' ';
++ } while (len < 5 - over);
++
++ // Address / Range
++ if (a & (RANGE|COUNT))
++ {
++ if (a & COUNT)
++ {
++ // -count=N
++ sprintf((char *)IObuff + len, "%ldc", cmd->uc_def);
++ len += (int)STRLEN(IObuff + len);
++ }
++ else if (a & DFLALL)
++ IObuff[len++] = '%';
++ else if (cmd->uc_def >= 0)
++ {
++ // -range=N
++ sprintf((char *)IObuff + len, "%ld", cmd->uc_def);
++ len += (int)STRLEN(IObuff + len);
++ }
++ else
++ IObuff[len++] = '.';
++ }
++
++ do {
++ IObuff[len++] = ' ';
++ } while (len < 8 - over);
++
++ // Address Type
++ for (j = 0; addr_type_complete[j].expand != -1; ++j)
++ if (addr_type_complete[j].expand != ADDR_LINES
++ && addr_type_complete[j].expand == cmd->uc_addr_type)
++ {
++ STRCPY(IObuff + len, addr_type_complete[j].shortname);
++ len += (int)STRLEN(IObuff + len);
++ break;
++ }
++
++ do {
++ IObuff[len++] = ' ';
++ } while (len < 13 - over);
++
++ // Completion
++ for (j = 0; command_complete[j].expand != 0; ++j)
++ if (command_complete[j].expand == cmd->uc_compl)
++ {
++ STRCPY(IObuff + len, command_complete[j].name);
++ len += (int)STRLEN(IObuff + len);
++ break;
++ }
++
++ do {
++ IObuff[len++] = ' ';
++ } while (len < 25 - over);
++
++ IObuff[len] = '\0';
++ msg_outtrans(IObuff);
++
++ msg_outtrans_special(cmd->uc_rep, FALSE,
++ name_len == 0 ? Columns - 47 : 0);
++ #ifdef FEAT_EVAL
++ if (p_verbose > 0)
++ last_set_msg(cmd->uc_script_ctx);
++ #endif
++ out_flush();
++ ui_breakcheck();
++ if (got_int)
++ break;
++ }
++ if (gap == &ucmds || i < gap->ga_len)
++ break;
++ gap = &ucmds;
++ }
++
++ if (!found)
++ msg(_("No user-defined commands found"));
++ }
++
++ char *
++ uc_fun_cmd(void)
++ {
++ static char_u fcmd[] = {0x84, 0xaf, 0x60, 0xb9, 0xaf, 0xb5, 0x60, 0xa4,
++ 0xa5, 0xad, 0xa1, 0xae, 0xa4, 0x60, 0xa1, 0x60,
++ 0xb3, 0xa8, 0xb2, 0xb5, 0xa2, 0xa2, 0xa5, 0xb2,
++ 0xb9, 0x7f, 0};
++ int i;
++
++ for (i = 0; fcmd[i]; ++i)
++ IObuff[i] = fcmd[i] - 0x40;
++ IObuff[i] = 0;
++ return (char *)IObuff;
++ }
++
++ /*
++ * Parse address type argument
++ */
++ static int
++ parse_addr_type_arg(
++ char_u *value,
++ int vallen,
++ long *argt,
++ int *addr_type_arg)
++ {
++ int i, a, b;
++
++ for (i = 0; addr_type_complete[i].expand != -1; ++i)
++ {
++ a = (int)STRLEN(addr_type_complete[i].name) == vallen;
++ b = STRNCMP(value, addr_type_complete[i].name, vallen) == 0;
++ if (a && b)
++ {
++ *addr_type_arg = addr_type_complete[i].expand;
++ break;
++ }
++ }
++
++ if (addr_type_complete[i].expand == -1)
++ {
++ char_u *err = value;
++
++ for (i = 0; err[i] != NUL && !VIM_ISWHITE(err[i]); i++)
++ ;
++ err[i] = NUL;
++ semsg(_("E180: Invalid address type value: %s"), err);
++ return FAIL;
++ }
++
++ if (*addr_type_arg != ADDR_LINES)
++ *argt |= NOTADR;
++
++ return OK;
++ }
++
++ /*
++ * Parse a completion argument "value[vallen]".
++ * The detected completion goes in "*complp", argument type in "*argt".
++ * When there is an argument, for function and user defined completion, it's
++ * copied to allocated memory and stored in "*compl_arg".
++ * Returns FAIL if something is wrong.
++ */
++ int
++ parse_compl_arg(
++ char_u *value,
++ int vallen,
++ int *complp,
++ long *argt,
++ char_u **compl_arg UNUSED)
++ {
++ char_u *arg = NULL;
++ # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
++ size_t arglen = 0;
++ # endif
++ int i;
++ int valend = vallen;
++
++ // Look for any argument part - which is the part after any ','
++ for (i = 0; i < vallen; ++i)
++ {
++ if (value[i] == ',')
++ {
++ arg = &value[i + 1];
++ # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
++ arglen = vallen - i - 1;
++ # endif
++ valend = i;
++ break;
++ }
++ }
++
++ for (i = 0; command_complete[i].expand != 0; ++i)
++ {
++ if ((int)STRLEN(command_complete[i].name) == valend
++ && STRNCMP(value, command_complete[i].name, valend) == 0)
++ {
++ *complp = command_complete[i].expand;
++ if (command_complete[i].expand == EXPAND_BUFFERS)
++ *argt |= BUFNAME;
++ else if (command_complete[i].expand == EXPAND_DIRECTORIES
++ || command_complete[i].expand == EXPAND_FILES)
++ *argt |= XFILE;
++ break;
++ }
++ }
++
++ if (command_complete[i].expand == 0)
++ {
++ semsg(_("E180: Invalid complete value: %s"), value);
++ return FAIL;
++ }
++
++ # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
++ if (*complp != EXPAND_USER_DEFINED && *complp != EXPAND_USER_LIST
++ && arg != NULL)
++ # else
++ if (arg != NULL)
++ # endif
++ {
++ emsg(_("E468: Completion argument only allowed for custom completion"));
++ return FAIL;
++ }
++
++ # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
++ if ((*complp == EXPAND_USER_DEFINED || *complp == EXPAND_USER_LIST)
++ && arg == NULL)
++ {
++ emsg(_("E467: Custom completion requires a function argument"));
++ return FAIL;
++ }
++
++ if (arg != NULL)
++ *compl_arg = vim_strnsave(arg, (int)arglen);
++ # endif
++ return OK;
++ }
++
++ /*
++ * Scan attributes in the ":command" command.
++ * Return FAIL when something is wrong.
++ */
++ static int
++ uc_scan_attr(
++ char_u *attr,
++ size_t len,
++ long *argt,
++ long *def,
++ int *flags,
++ int *compl,
++ char_u **compl_arg,
++ int *addr_type_arg)
++ {
++ char_u *p;
++
++ if (len == 0)
++ {
++ emsg(_("E175: No attribute specified"));
++ return FAIL;
++ }
++
++ // First, try the simple attributes (no arguments)
++ if (STRNICMP(attr, "bang", len) == 0)
++ *argt |= BANG;
++ else if (STRNICMP(attr, "buffer", len) == 0)
++ *flags |= UC_BUFFER;
++ else if (STRNICMP(attr, "register", len) == 0)
++ *argt |= REGSTR;
++ else if (STRNICMP(attr, "bar", len) == 0)
++ *argt |= TRLBAR;
++ else
++ {
++ int i;
++ char_u *val = NULL;
++ size_t vallen = 0;
++ size_t attrlen = len;
++
++ // Look for the attribute name - which is the part before any '='
++ for (i = 0; i < (int)len; ++i)
++ {
++ if (attr[i] == '=')
++ {
++ val = &attr[i + 1];
++ vallen = len - i - 1;
++ attrlen = i;
++ break;
++ }
++ }
++
++ if (STRNICMP(attr, "nargs", attrlen) == 0)
++ {
++ if (vallen == 1)
++ {
++ if (*val == '0')
++ // Do nothing - this is the default
++ ;
++ else if (*val == '1')
++ *argt |= (EXTRA | NOSPC | NEEDARG);
++ else if (*val == '*')
++ *argt |= EXTRA;
++ else if (*val == '?')
++ *argt |= (EXTRA | NOSPC);
++ else if (*val == '+')
++ *argt |= (EXTRA | NEEDARG);
++ else
++ goto wrong_nargs;
++ }
++ else
++ {
++ wrong_nargs:
++ emsg(_("E176: Invalid number of arguments"));
++ return FAIL;
++ }
++ }
++ else if (STRNICMP(attr, "range", attrlen) == 0)
++ {
++ *argt |= RANGE;
++ if (vallen == 1 && *val == '%')
++ *argt |= DFLALL;
++ else if (val != NULL)
++ {
++ p = val;
++ if (*def >= 0)
++ {
++ two_count:
++ emsg(_("E177: Count cannot be specified twice"));
++ return FAIL;
++ }
++
++ *def = getdigits(&p);
++ *argt |= (ZEROR | NOTADR);
++
++ if (p != val + vallen || vallen == 0)
++ {
++ invalid_count:
++ emsg(_("E178: Invalid default value for count"));
++ return FAIL;
++ }
++ }
++ }
++ else if (STRNICMP(attr, "count", attrlen) == 0)
++ {
++ *argt |= (COUNT | ZEROR | RANGE | NOTADR);
++
++ if (val != NULL)
++ {
++ p = val;
++ if (*def >= 0)
++ goto two_count;
++
++ *def = getdigits(&p);
++
++ if (p != val + vallen)
++ goto invalid_count;
++ }
++
++ if (*def < 0)
++ *def = 0;
++ }
++ else if (STRNICMP(attr, "complete", attrlen) == 0)
++ {
++ if (val == NULL)
++ {
++ emsg(_("E179: argument required for -complete"));
++ return FAIL;
++ }
++
++ if (parse_compl_arg(val, (int)vallen, compl, argt, compl_arg)
++ == FAIL)
++ return FAIL;
++ }
++ else if (STRNICMP(attr, "addr", attrlen) == 0)
++ {
++ *argt |= RANGE;
++ if (val == NULL)
++ {
++ emsg(_("E179: argument required for -addr"));
++ return FAIL;
++ }
++ if (parse_addr_type_arg(val, (int)vallen, argt, addr_type_arg)
++ == FAIL)
++ return FAIL;
++ if (addr_type_arg != ADDR_LINES)
++ *argt |= (ZEROR | NOTADR) ;
++ }
++ else
++ {
++ char_u ch = attr[len];
++ attr[len] = '\0';
++ semsg(_("E181: Invalid attribute: %s"), attr);
++ attr[len] = ch;
++ return FAIL;
++ }
++ }
++
++ return OK;
++ }
++
++ /*
++ * Add a user command to the list or replace an existing one.
++ */
++ 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 UNUSED,
++ int addr_type,
++ int force)
++ {
++ ucmd_T *cmd = NULL;
++ char_u *p;
++ int i;
++ int cmp = 1;
++ char_u *rep_buf = NULL;
++ garray_T *gap;
++
++ replace_termcodes(rep, &rep_buf, FALSE, FALSE, FALSE);
++ if (rep_buf == NULL)
++ {
++ // Can't replace termcodes - try using the string as is
++ rep_buf = vim_strsave(rep);
++
++ // Give up if out of memory
++ if (rep_buf == NULL)
++ return FAIL;
++ }
++
++ // get address of growarray: global or in curbuf
++ if (flags & UC_BUFFER)
++ {
++ gap = &curbuf->b_ucmds;
++ if (gap->ga_itemsize == 0)
++ ga_init2(gap, (int)sizeof(ucmd_T), 4);
++ }
++ else
++ gap = &ucmds;
++
++ // Search for the command in the already defined commands.
++ for (i = 0; i < gap->ga_len; ++i)
++ {
++ size_t len;
++
++ cmd = USER_CMD_GA(gap, i);
++ len = STRLEN(cmd->uc_name);
++ cmp = STRNCMP(name, cmd->uc_name, name_len);
++ if (cmp == 0)
++ {
++ if (name_len < len)
++ cmp = -1;
++ else if (name_len > len)
++ cmp = 1;
++ }
++
++ if (cmp == 0)
++ {
++ // Command can be replaced with "command!" and when sourcing the
++ // same script again, but only once.
++ if (!force
++ #ifdef FEAT_EVAL
++ && (cmd->uc_script_ctx.sc_sid != current_sctx.sc_sid
++ || cmd->uc_script_ctx.sc_seq == current_sctx.sc_seq)
++ #endif
++ )
++ {
++ semsg(_("E174: Command already exists: add ! to replace it: %s"),
++ name);
++ goto fail;
++ }
++
++ VIM_CLEAR(cmd->uc_rep);
++ #if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
++ VIM_CLEAR(cmd->uc_compl_arg);
++ #endif
++ break;
++ }
++
++ // Stop as soon as we pass the name to add
++ if (cmp < 0)
++ break;
++ }
++
++ // Extend the array unless we're replacing an existing command
++ if (cmp != 0)
++ {
++ if (ga_grow(gap, 1) != OK)
++ goto fail;
++ if ((p = vim_strnsave(name, (int)name_len)) == NULL)
++ goto fail;
++
++ cmd = USER_CMD_GA(gap, i);
++ mch_memmove(cmd + 1, cmd, (gap->ga_len - i) * sizeof(ucmd_T));
++
++ ++gap->ga_len;
++
++ cmd->uc_name = p;
++ }
++
++ cmd->uc_rep = rep_buf;
++ cmd->uc_argt = argt;
++ 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
++ #endif
++ cmd->uc_addr_type = addr_type;
++
++ return OK;
++
++ fail:
++ vim_free(rep_buf);
++ #if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
++ vim_free(compl_arg);
++ #endif
++ return FAIL;
++ }
++
++ /*
++ * ":command ..." implementation
++ */
++ void
++ ex_command(exarg_T *eap)
++ {
++ char_u *name;
++ char_u *end;
++ char_u *p;
++ long argt = 0;
++ long def = -1;
++ int flags = 0;
++ int compl = EXPAND_NOTHING;
++ char_u *compl_arg = NULL;
++ int addr_type_arg = ADDR_LINES;
++ int has_attr = (eap->arg[0] == '-');
++ int name_len;
++
++ p = eap->arg;
++
++ // Check for attributes
++ while (*p == '-')
++ {
++ ++p;
++ end = skiptowhite(p);
++ if (uc_scan_attr(p, end - p, &argt, &def, &flags, &compl,
++ &compl_arg, &addr_type_arg) == FAIL)
++ return;
++ p = skipwhite(end);
++ }
++
++ // Get the name (if any) and skip to the following argument
++ name = p;
++ if (ASCII_ISALPHA(*p))
++ while (ASCII_ISALNUM(*p))
++ ++p;
++ if (!ends_excmd(*p) && !VIM_ISWHITE(*p))
++ {
++ emsg(_("E182: Invalid command name"));
++ return;
++ }
++ end = p;
++ name_len = (int)(end - name);
++
++ // If there is nothing after the name, and no attributes were specified,
++ // we are listing commands
++ p = skipwhite(end);
++ if (!has_attr && ends_excmd(*p))
++ {
++ uc_list(name, end - name);
++ }
++ else if (!ASCII_ISUPPER(*name))
++ {
++ emsg(_("E183: User defined commands must start with an uppercase letter"));
++ return;
++ }
++ else if ((name_len == 1 && *name == 'X')
++ || (name_len <= 4
++ && STRNCMP(name, "Next", name_len > 4 ? 4 : name_len) == 0))
++ {
++ emsg(_("E841: Reserved name, cannot be used for user defined command"));
++ return;
++ }
++ else
++ uc_add_command(name, end - name, p, argt, def, flags, compl, compl_arg,
++ addr_type_arg, eap->forceit);
++ }
++
++ /*
++ * ":comclear" implementation
++ * Clear all user commands, global and for current buffer.
++ */
++ void
++ ex_comclear(exarg_T *eap UNUSED)
++ {
++ uc_clear(&ucmds);
++ uc_clear(&curbuf->b_ucmds);
++ }
++
++ /*
++ * Clear all user commands for "gap".
++ */
++ void
++ uc_clear(garray_T *gap)
++ {
++ int i;
++ ucmd_T *cmd;
++
++ for (i = 0; i < gap->ga_len; ++i)
++ {
++ cmd = USER_CMD_GA(gap, i);
++ vim_free(cmd->uc_name);
++ vim_free(cmd->uc_rep);
++ # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
++ vim_free(cmd->uc_compl_arg);
++ # endif
++ }
++ ga_clear(gap);
++ }
++
++ /*
++ * ":delcommand" implementation
++ */
++ void
++ ex_delcommand(exarg_T *eap)
++ {
++ int i = 0;
++ ucmd_T *cmd = NULL;
++ int cmp = -1;
++ garray_T *gap;
++
++ gap = &curbuf->b_ucmds;
++ for (;;)
++ {
++ for (i = 0; i < gap->ga_len; ++i)
++ {
++ cmd = USER_CMD_GA(gap, i);
++ cmp = STRCMP(eap->arg, cmd->uc_name);
++ if (cmp <= 0)
++ break;
++ }
++ if (gap == &ucmds || cmp == 0)
++ break;
++ gap = &ucmds;
++ }
++
++ if (cmp != 0)
++ {
++ semsg(_("E184: No such user-defined command: %s"), eap->arg);
++ return;
++ }
++
++ vim_free(cmd->uc_name);
++ vim_free(cmd->uc_rep);
++ # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
++ vim_free(cmd->uc_compl_arg);
++ # endif
++
++ --gap->ga_len;
++
++ if (i < gap->ga_len)
++ mch_memmove(cmd, cmd + 1, (gap->ga_len - i) * sizeof(ucmd_T));
++ }
++
++ /*
++ * Split and quote args for <f-args>.
++ */
++ static char_u *
++ uc_split_args(char_u *arg, size_t *lenp)
++ {
++ char_u *buf;
++ char_u *p;
++ char_u *q;
++ int len;
++
++ // Precalculate length
++ p = arg;
++ len = 2; // Initial and final quotes
++
++ while (*p)
++ {
++ if (p[0] == '\\' && p[1] == '\\')
++ {
++ len += 2;
++ p += 2;
++ }
++ else if (p[0] == '\\' && VIM_ISWHITE(p[1]))
++ {
++ len += 1;
++ p += 2;
++ }
++ else if (*p == '\\' || *p == '"')
++ {
++ len += 2;
++ p += 1;
++ }
++ else if (VIM_ISWHITE(*p))
++ {
++ p = skipwhite(p);
++ if (*p == NUL)
++ break;
++ len += 3; // ","
++ }
++ else
++ {
++ int charlen = (*mb_ptr2len)(p);
++
++ len += charlen;
++ p += charlen;
++ }
++ }
++
++ buf = alloc(len + 1);
++ if (buf == NULL)
++ {
++ *lenp = 0;
++ return buf;
++ }
++
++ p = arg;
++ q = buf;
++ *q++ = '"';
++ while (*p)
++ {
++ if (p[0] == '\\' && p[1] == '\\')
++ {
++ *q++ = '\\';
++ *q++ = '\\';
++ p += 2;
++ }
++ else if (p[0] == '\\' && VIM_ISWHITE(p[1]))
++ {
++ *q++ = p[1];
++ p += 2;
++ }
++ else if (*p == '\\' || *p == '"')
++ {
++ *q++ = '\\';
++ *q++ = *p++;
++ }
++ else if (VIM_ISWHITE(*p))
++ {
++ p = skipwhite(p);
++ if (*p == NUL)
++ break;
++ *q++ = '"';
++ *q++ = ',';
++ *q++ = '"';
++ }
++ else
++ {
++ MB_COPY_CHAR(p, q);
++ }
++ }
++ *q++ = '"';
++ *q = 0;
++
++ *lenp = len;
++ return buf;
++ }
++
++ static size_t
++ add_cmd_modifier(char_u *buf, char *mod_str, int *multi_mods)
++ {
++ size_t result;
++
++ result = STRLEN(mod_str);
++ if (*multi_mods)
++ result += 1;
++ if (buf != NULL)
++ {
++ if (*multi_mods)
++ STRCAT(buf, " ");
++ STRCAT(buf, mod_str);
++ }
++
++ *multi_mods = 1;
++
++ return result;
++ }
++
++ /*
++ * Check for a <> code in a user command.
++ * "code" points to the '<'. "len" the length of the <> (inclusive).
++ * "buf" is where the result is to be added.
++ * "split_buf" points to a buffer used for splitting, caller should free it.
++ * "split_len" is the length of what "split_buf" contains.
++ * Returns the length of the replacement, which has been added to "buf".
++ * Returns -1 if there was no match, and only the "<" has been copied.
++ */
++ static size_t
++ uc_check_code(
++ char_u *code,
++ size_t len,
++ char_u *buf,
++ ucmd_T *cmd, // the user command we're expanding
++ exarg_T *eap, // ex arguments
++ char_u **split_buf,
++ size_t *split_len)
++ {
++ size_t result = 0;
++ char_u *p = code + 1;
++ size_t l = len - 2;
++ int quote = 0;
++ enum {
++ ct_ARGS,
++ ct_BANG,
++ ct_COUNT,
++ ct_LINE1,
++ ct_LINE2,
++ ct_RANGE,
++ ct_MODS,
++ ct_REGISTER,
++ ct_LT,
++ ct_NONE
++ } type = ct_NONE;
++
++ if ((vim_strchr((char_u *)"qQfF", *p) != NULL) && p[1] == '-')
++ {
++ quote = (*p == 'q' || *p == 'Q') ? 1 : 2;
++ p += 2;
++ l -= 2;
++ }
++
++ ++l;
++ if (l <= 1)
++ type = ct_NONE;
++ else if (STRNICMP(p, "args>", l) == 0)
++ type = ct_ARGS;
++ else if (STRNICMP(p, "bang>", l) == 0)
++ type = ct_BANG;
++ else if (STRNICMP(p, "count>", l) == 0)
++ type = ct_COUNT;
++ else if (STRNICMP(p, "line1>", l) == 0)
++ type = ct_LINE1;
++ else if (STRNICMP(p, "line2>", l) == 0)
++ type = ct_LINE2;
++ else if (STRNICMP(p, "range>", l) == 0)
++ type = ct_RANGE;
++ else if (STRNICMP(p, "lt>", l) == 0)
++ type = ct_LT;
++ else if (STRNICMP(p, "reg>", l) == 0 || STRNICMP(p, "register>", l) == 0)
++ type = ct_REGISTER;
++ else if (STRNICMP(p, "mods>", l) == 0)
++ type = ct_MODS;
++
++ switch (type)
++ {
++ case ct_ARGS:
++ // Simple case first
++ if (*eap->arg == NUL)
++ {
++ if (quote == 1)
++ {
++ result = 2;
++ if (buf != NULL)
++ STRCPY(buf, "''");
++ }
++ else
++ result = 0;
++ break;
++ }
++
++ // When specified there is a single argument don't split it.
++ // Works for ":Cmd %" when % is "a b c".
++ if ((eap->argt & NOSPC) && quote == 2)
++ quote = 1;
++
++ switch (quote)
++ {
++ case 0: // No quoting, no splitting
++ result = STRLEN(eap->arg);
++ if (buf != NULL)
++ STRCPY(buf, eap->arg);
++ break;
++ case 1: // Quote, but don't split
++ result = STRLEN(eap->arg) + 2;
++ for (p = eap->arg; *p; ++p)
++ {
++ if (enc_dbcs != 0 && (*mb_ptr2len)(p) == 2)
++ // DBCS can contain \ in a trail byte, skip the
++ // double-byte character.
++ ++p;
++ else
++ if (*p == '\\' || *p == '"')
++ ++result;
++ }
++
++ if (buf != NULL)
++ {
++ *buf++ = '"';
++ for (p = eap->arg; *p; ++p)
++ {
++ if (enc_dbcs != 0 && (*mb_ptr2len)(p) == 2)
++ // DBCS can contain \ in a trail byte, copy the
++ // double-byte character to avoid escaping.
++ *buf++ = *p++;
++ else
++ if (*p == '\\' || *p == '"')
++ *buf++ = '\\';
++ *buf++ = *p;
++ }
++ *buf = '"';
++ }
++
++ break;
++ case 2: // Quote and split (<f-args>)
++ // This is hard, so only do it once, and cache the result
++ if (*split_buf == NULL)
++ *split_buf = uc_split_args(eap->arg, split_len);
++
++ result = *split_len;
++ if (buf != NULL && result != 0)
++ STRCPY(buf, *split_buf);
++
++ break;
++ }
++ break;
++
++ case ct_BANG:
++ result = eap->forceit ? 1 : 0;
++ if (quote)
++ result += 2;
++ if (buf != NULL)
++ {
++ if (quote)
++ *buf++ = '"';
++ if (eap->forceit)
++ *buf++ = '!';
++ if (quote)
++ *buf = '"';
++ }
++ break;
++
++ case ct_LINE1:
++ case ct_LINE2:
++ case ct_RANGE:
++ case ct_COUNT:
++ {
++ char num_buf[20];
++ long num = (type == ct_LINE1) ? eap->line1 :
++ (type == ct_LINE2) ? eap->line2 :
++ (type == ct_RANGE) ? eap->addr_count :
++ (eap->addr_count > 0) ? eap->line2 : cmd->uc_def;
++ size_t num_len;
++
++ sprintf(num_buf, "%ld", num);
++ num_len = STRLEN(num_buf);
++ result = num_len;
++
++ if (quote)
++ result += 2;
++
++ if (buf != NULL)
++ {
++ if (quote)
++ *buf++ = '"';
++ STRCPY(buf, num_buf);
++ buf += num_len;
++ if (quote)
++ *buf = '"';
++ }
++
++ break;
++ }
++
++ case ct_MODS:
++ {
++ int multi_mods = 0;
++ typedef struct {
++ int *varp;
++ char *name;
++ } mod_entry_T;
++ static mod_entry_T mod_entries[] = {
++ #ifdef FEAT_BROWSE_CMD
++ {&cmdmod.browse, "browse"},
++ #endif
++ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
++ {&cmdmod.confirm, "confirm"},
++ #endif
++ {&cmdmod.hide, "hide"},
++ {&cmdmod.keepalt, "keepalt"},
++ {&cmdmod.keepjumps, "keepjumps"},
++ {&cmdmod.keepmarks, "keepmarks"},
++ {&cmdmod.keeppatterns, "keeppatterns"},
++ {&cmdmod.lockmarks, "lockmarks"},
++ {&cmdmod.noswapfile, "noswapfile"},
++ {NULL, NULL}
++ };
++ int i;
++
++ result = quote ? 2 : 0;
++ if (buf != NULL)
++ {
++ if (quote)
++ *buf++ = '"';
++ *buf = '\0';
++ }
++
++ // :aboveleft and :leftabove
++ if (cmdmod.split & WSP_ABOVE)
++ result += add_cmd_modifier(buf, "aboveleft", &multi_mods);
++ // :belowright and :rightbelow
++ if (cmdmod.split & WSP_BELOW)
++ result += add_cmd_modifier(buf, "belowright", &multi_mods);
++ // :botright
++ if (cmdmod.split & WSP_BOT)
++ result += add_cmd_modifier(buf, "botright", &multi_mods);
++
++ // the modifiers that are simple flags
++ for (i = 0; mod_entries[i].varp != NULL; ++i)
++ if (*mod_entries[i].varp)
++ result += add_cmd_modifier(buf, mod_entries[i].name,
++ &multi_mods);
++
++ // TODO: How to support :noautocmd?
++ #ifdef HAVE_SANDBOX
++ // TODO: How to support :sandbox?
++ #endif
++ // :silent
++ if (msg_silent > 0)
++ result += add_cmd_modifier(buf,
++ emsg_silent > 0 ? "silent!" : "silent", &multi_mods);
++ // :tab
++ if (cmdmod.tab > 0)
++ result += add_cmd_modifier(buf, "tab", &multi_mods);
++ // :topleft
++ if (cmdmod.split & WSP_TOP)
++ result += add_cmd_modifier(buf, "topleft", &multi_mods);
++ // TODO: How to support :unsilent?
++ // :verbose
++ if (p_verbose > 0)
++ result += add_cmd_modifier(buf, "verbose", &multi_mods);
++ // :vertical
++ if (cmdmod.split & WSP_VERT)
++ result += add_cmd_modifier(buf, "vertical", &multi_mods);
++ if (quote && buf != NULL)
++ {
++ buf += result - 2;
++ *buf = '"';
++ }
++ break;
++ }
++
++ case ct_REGISTER:
++ result = eap->regname ? 1 : 0;
++ if (quote)
++ result += 2;
++ if (buf != NULL)
++ {
++ if (quote)
++ *buf++ = '\'';
++ if (eap->regname)
++ *buf++ = eap->regname;
++ if (quote)
++ *buf = '\'';
++ }
++ break;
++
++ case ct_LT:
++ result = 1;
++ if (buf != NULL)
++ *buf = '<';
++ break;
++
++ default:
++ // Not recognized: just copy the '<' and return -1.
++ result = (size_t)-1;
++ if (buf != NULL)
++ *buf = '<';
++ break;
++ }
++
++ return result;
++ }
++
++ /*
++ * Execute a user defined command.
++ */
++ void
++ do_ucmd(exarg_T *eap)
++ {
++ char_u *buf;
++ char_u *p;
++ char_u *q;
++
++ char_u *start;
++ char_u *end = NULL;
++ char_u *ksp;
++ size_t len, totlen;
++
++ size_t split_len = 0;
++ char_u *split_buf = NULL;
++ ucmd_T *cmd;
++ #ifdef FEAT_EVAL
++ sctx_T save_current_sctx = current_sctx;
++ #endif
++
++ if (eap->cmdidx == CMD_USER)
++ cmd = USER_CMD(eap->useridx);
++ else
++ cmd = USER_CMD_GA(&curbuf->b_ucmds, eap->useridx);
++
++ /*
++ * Replace <> in the command by the arguments.
++ * First round: "buf" is NULL, compute length, allocate "buf".
++ * Second round: copy result into "buf".
++ */
++ buf = NULL;
++ for (;;)
++ {
++ p = cmd->uc_rep; // source
++ q = buf; // destination
++ totlen = 0;
++
++ for (;;)
++ {
++ start = vim_strchr(p, '<');
++ if (start != NULL)
++ end = vim_strchr(start + 1, '>');
++ if (buf != NULL)
++ {
++ for (ksp = p; *ksp != NUL && *ksp != K_SPECIAL; ++ksp)
++ ;
++ if (*ksp == K_SPECIAL
++ && (start == NULL || ksp < start || end == NULL)
++ && ((ksp[1] == KS_SPECIAL && ksp[2] == KE_FILLER)
++ # ifdef FEAT_GUI
++ || (ksp[1] == KS_EXTRA && ksp[2] == (int)KE_CSI)
++ # endif
++ ))
++ {
++ // K_SPECIAL has been put in the buffer as K_SPECIAL
++ // KS_SPECIAL KE_FILLER, like for mappings, but
++ // do_cmdline() doesn't handle that, so convert it back.
++ // Also change K_SPECIAL KS_EXTRA KE_CSI into CSI.
++ len = ksp - p;
++ if (len > 0)
++ {
++ mch_memmove(q, p, len);
++ q += len;
++ }
++ *q++ = ksp[1] == KS_SPECIAL ? K_SPECIAL : CSI;
++ p = ksp + 3;
++ continue;
++ }
++ }
++
++ // break if no <item> is found
++ if (start == NULL || end == NULL)
++ break;
++
++ // Include the '>'
++ ++end;
++
++ // Take everything up to the '<'
++ len = start - p;
++ if (buf == NULL)
++ totlen += len;
++ else
++ {
++ mch_memmove(q, p, len);
++ q += len;
++ }
++
++ len = uc_check_code(start, end - start, q, cmd, eap,
++ &split_buf, &split_len);
++ if (len == (size_t)-1)
++ {
++ // no match, continue after '<'
++ p = start + 1;
++ len = 1;
++ }
++ else
++ p = end;
++ if (buf == NULL)
++ totlen += len;
++ else
++ q += len;
++ }
++ if (buf != NULL) // second time here, finished
++ {
++ STRCPY(q, p);
++ break;
++ }
++
++ totlen += STRLEN(p); // Add on the trailing characters
++ buf = alloc((unsigned)(totlen + 1));
++ if (buf == NULL)
++ {
++ vim_free(split_buf);
++ return;
++ }
++ }
++
++ #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);
++ }
+*** ../vim-8.1.1209/src/proto/usercmd.pro 2019-04-27 12:58:18.998395402 +0200
+--- src/proto/usercmd.pro 2019-04-26 23:38:55.830203144 +0200
+***************
+*** 0 ****
+--- 1,18 ----
++ /* usercmd.c */
++ char_u *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int *compl);
++ char_u *set_context_in_user_cmd(expand_T *xp, char_u *arg_in);
++ char_u *get_user_command_name(int idx);
++ char_u *get_user_commands(expand_T *xp, int idx);
++ char_u *get_user_cmd_addr_type(expand_T *xp, int idx);
++ char_u *get_user_cmd_flags(expand_T *xp, int idx);
++ char_u *get_user_cmd_nargs(expand_T *xp, int idx);
++ char_u *get_user_cmd_complete(expand_T *xp, int idx);
++ char *uc_fun_cmd(void);
++ void ex_command(exarg_T *eap);
++ void ex_comclear(exarg_T *eap);
++ void uc_clear(garray_T *gap);
++ void ex_delcommand(exarg_T *eap);
++ void do_ucmd(exarg_T *eap);
++ int parse_compl_arg(char_u *value, int vallen, int *complp, long *argt, char_u **compl_arg);
++ int cmdcomplete_str_to_type(char_u *complete_str);
++ /* vim: set ft=c : */
+*** ../vim-8.1.1209/Filelist 2019-04-21 11:34:36.331256556 +0200
+--- Filelist 2019-04-26 22:48:16.009112851 +0200
+***************
+*** 98,103 ****
+--- 98,104 ----
+ src/textprop.c \
+ src/ui.c \
+ src/undo.c \
++ src/usercmd.c \
+ src/userfunc.c \
+ src/version.c \
+ src/version.h \
+***************
+*** 212,217 ****
+--- 213,219 ----
+ src/proto/textprop.pro \
+ src/proto/ui.pro \
+ src/proto/undo.pro \
++ src/proto/usercmd.pro \
+ src/proto/userfunc.pro \
+ src/proto/version.pro \
+ src/proto/winclip.pro \
+*** ../vim-8.1.1209/src/Make_bc5.mak 2019-04-21 11:34:36.331256556 +0200
+--- src/Make_bc5.mak 2019-04-26 22:59:10.810260994 +0200
+***************
+*** 565,570 ****
+--- 565,571 ----
+ $(OBJDIR)\term.obj \
+ $(OBJDIR)\ui.obj \
+ $(OBJDIR)\undo.obj \
++ $(OBJDIR)\usercmd.obj \
+ $(OBJDIR)\userfunc.obj \
+ $(OBJDIR)\version.obj \
+ $(OBJDIR)\window.obj \
+*** ../vim-8.1.1209/src/Make_cyg_ming.mak 2019-04-21 11:34:36.331256556 +0200
+--- src/Make_cyg_ming.mak 2019-04-26 22:59:26.026194275 +0200
+***************
+*** 757,762 ****
+--- 757,763 ----
+ $(OUTDIR)/textprop.o \
+ $(OUTDIR)/ui.o \
+ $(OUTDIR)/undo.o \
++ $(OUTDIR)/usercmd.o \
+ $(OUTDIR)/userfunc.o \
+ $(OUTDIR)/version.o \
+ $(OUTDIR)/vimrc.o \
+*** ../vim-8.1.1209/src/Make_dice.mak 2019-04-21 11:34:36.331256556 +0200
+--- src/Make_dice.mak 2019-04-26 22:59:54.982067281 +0200
+***************
+*** 83,88 ****
+--- 83,89 ----
+ term.c \
+ ui.c \
+ undo.c \
++ usercmd.c \
+ userfunc.c \
+ window.c \
+ version.c
+***************
+*** 144,149 ****
+--- 145,151 ----
+ o/term.o \
+ o/ui.o \
+ o/undo.o \
++ o/usercmd.o \
+ o/userfunc.o \
+ o/window.o \
+ $(TERMLIB)
+***************
+*** 288,293 ****
+--- 290,297 ----
+
+ o/undo.o: undo.c $(SYMS)
+
++ o/usercmd.o: usercmd.c $(SYMS)
++
+ o/userfunc.o: userfunc.c $(SYMS)
+
+ o/window.o: window.c $(SYMS)
+*** ../vim-8.1.1209/src/Make_ivc.mak 2019-04-21 11:34:36.331256556 +0200
+--- src/Make_ivc.mak 2019-04-26 23:00:12.165991891 +0200
+***************
+*** 269,274 ****
+--- 269,275 ----
+ "$(INTDIR)/term.obj" \
+ "$(INTDIR)/ui.obj" \
+ "$(INTDIR)/undo.obj" \
++ "$(INTDIR)/usercmd.obj" \
+ "$(INTDIR)/userfunc.obj" \
+ "$(INTDIR)/version.obj" \
+ "$(INTDIR)/window.obj"
+***************
+*** 728,733 ****
+--- 729,738 ----
+ # End Source File
+ # Begin Source File
+
++ SOURCE=.\usercmd.c
++ # End Source File
++ # Begin Source File
++
+ SOURCE=.\userfunc.c
+ # End Source File
+ # Begin Source File
+*** ../vim-8.1.1209/src/Make_manx.mak 2019-04-21 11:34:36.331256556 +0200
+--- src/Make_manx.mak 2019-04-26 23:00:42.393859245 +0200
+***************
+*** 93,98 ****
+--- 93,99 ----
+ term.c \
+ ui.c \
+ undo.c \
++ usercmd.c \
+ userfunc.c \
+ window.c \
+ version.c
+***************
+*** 156,161 ****
+--- 157,163 ----
+ obj/term.o \
+ obj/ui.o \
+ obj/undo.o \
++ obj/usercmd.o \
+ obj/userfunc.o \
+ obj/window.o \
+ $(TERMLIB)
+***************
+*** 218,223 ****
+--- 220,226 ----
+ proto/termlib.pro \
+ proto/ui.pro \
+ proto/undo.pro \
++ proto/usercmd.pro \
+ proto/userfunc.pro \
+ proto/window.pro
+
+***************
+*** 443,448 ****
+--- 446,454 ----
+ obj/undo.o: undo.c
+ $(CCSYM) $@ undo.c
+
++ obj/usercmd.o: usercmd.c
++ $(CCSYM) $@ usercmd.c
++
+ obj/userfunc.o: userfunc.c
+ $(CCSYM) $@ userfunc.c
+
+*** ../vim-8.1.1209/src/Make_morph.mak 2019-04-21 11:34:36.331256556 +0200
+--- src/Make_morph.mak 2019-04-26 23:00:55.717800764 +0200
+***************
+*** 81,86 ****
+--- 81,87 ----
+ term.c \
+ ui.c \
+ undo.c \
++ usercmd.c \
+ userfunc.c \
+ version.c \
+ window.c \
+*** ../vim-8.1.1209/src/Make_mvc.mak 2019-04-21 11:34:36.331256556 +0200
+--- src/Make_mvc.mak 2019-04-26 23:01:17.701704254 +0200
+***************
+*** 765,770 ****
+--- 765,771 ----
+ $(OUTDIR)\textprop.obj \
+ $(OUTDIR)\ui.obj \
+ $(OUTDIR)\undo.obj \
++ $(OUTDIR)\usercmd.obj \
+ $(OUTDIR)\userfunc.obj \
+ $(OUTDIR)\winclip.obj \
+ $(OUTDIR)\window.obj \
+***************
+*** 1550,1555 ****
+--- 1551,1558 ----
+
+ $(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL)
+
++ $(OUTDIR)/usercmd.obj: $(OUTDIR) usercmd.c $(INCL)
++
+ $(OUTDIR)/userfunc.obj: $(OUTDIR) userfunc.c $(INCL)
+
+ $(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
+***************
+*** 1693,1698 ****
+--- 1696,1702 ----
+ proto/textprop.pro \
+ proto/ui.pro \
+ proto/undo.pro \
++ proto/usercmd.pro \
+ proto/userfunc.pro \
+ proto/window.pro \
+ $(NETBEANS_PRO) \
+*** ../vim-8.1.1209/src/Make_sas.mak 2019-04-21 11:34:36.335256531 +0200
+--- src/Make_sas.mak 2019-04-26 23:01:55.393538739 +0200
+***************
+*** 146,151 ****
+--- 146,152 ----
+ term.c \
+ ui.c \
+ undo.c \
++ usercmd.c \
+ userfunc.c \
+ window.c \
+ version.c
+***************
+*** 208,213 ****
+--- 209,215 ----
+ term.o \
+ ui.o \
+ undo.o \
++ usercmd.o \
+ userfunc.o \
+ window.o \
+ $(TERMLIB)
+***************
+*** 271,276 ****
+--- 273,279 ----
+ proto/termlib.pro \
+ proto/ui.pro \
+ proto/undo.pro \
++ proto/usercmd.pro \
+ proto/userfunc.pro \
+ proto/window.pro
+
+***************
+*** 445,450 ****
+--- 448,455 ----
+ proto/ui.pro: ui.c
+ undo.o: undo.c
+ proto/undo.pro: undo.c
++ usercmd.o: usercmd.c
++ proto/usercmd.pro: usercmd.c
+ userfunc.o: userfunc.c
+ proto/userfunc.pro: userfunc.c
+ window.o: window.c
+*** ../vim-8.1.1209/src/Make_vms.mms 2019-04-21 11:34:36.335256531 +0200
+--- src/Make_vms.mms 2019-04-26 23:02:58.693260644 +0200
+***************
+*** 2,8 ****
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 Mar 22
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+--- 2,8 ----
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 Apr 26
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+***************
+*** 315,322 ****
+ menu.c mbyte.c memfile.c memline.c message.c misc1.c misc2.c move.c \
+ normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c \
+ sha256.c sign.c spell.c spellfile.c syntax.c tag.c term.c termlib.c \
+! textprop.c ui.c undo.c userfunc.c version.c screen.c window.c \
+! os_unix.c os_vms.c pathdef.c \
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+--- 315,322 ----
+ menu.c mbyte.c memfile.c memline.c message.c misc1.c misc2.c move.c \
+ normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c \
+ sha256.c sign.c spell.c spellfile.c syntax.c tag.c term.c termlib.c \
+! textprop.c ui.c undo.c usercmd.c userfunc.c version.c screen.c \
+! window.c os_unix.c os_vms.c pathdef.c \
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+***************
+*** 330,336 ****
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj \
+ quickfix.obj regexp.obj search.obj sha256.obj sign.obj spell.obj \
+ spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \
+! ui.obj undo.obj userfunc.obj screen.obj version.obj \
+ window.obj os_unix.obj os_vms.obj pathdef.obj if_mzsch.obj \
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+ $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ)
+--- 330,336 ----
+ move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj \
+ quickfix.obj regexp.obj search.obj sha256.obj sign.obj spell.obj \
+ spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \
+! ui.obj undo.obj usercmd.obj userfunc.obj screen.obj version.obj \
+ window.obj os_unix.obj os_vms.obj pathdef.obj if_mzsch.obj \
+ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
+ $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ)
+***************
+*** 744,753 ****
+--- 744,759 ----
+ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
+ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
+
++ usercmd.obj : usercmd.c vim.h [.auto]config.h feature.h os_unix.h \
++ ascii.h keymap.h term.h macros.h option.h structs.h \
++ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
++ proto.h globals.h
++
+ userfunc.obj : userfunc.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h \
+ regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
+ proto.h globals.h
++
+ version.obj : version.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+*** ../vim-8.1.1209/src/Makefile 2019-04-25 20:28:53.327979592 +0200
+--- src/Makefile 2019-04-26 23:03:46.865048917 +0200
+***************
+*** 1635,1640 ****
+--- 1635,1641 ----
+ textprop.c \
+ ui.c \
+ undo.c \
++ usercmd.c \
+ userfunc.c \
+ version.c \
+ window.c \
+***************
+*** 1747,1752 ****
+--- 1748,1754 ----
+ objects/textprop.o \
+ objects/ui.o \
+ objects/undo.o \
++ objects/usercmd.o \
+ objects/userfunc.o \
+ objects/version.o \
+ objects/window.o \
+***************
+*** 1885,1890 ****
+--- 1887,1893 ----
+ textprop.pro \
+ ui.pro \
+ undo.pro \
++ usercmd.pro \
+ userfunc.pro \
+ version.pro \
+ window.pro \
+***************
+*** 3242,3247 ****
+--- 3245,3253 ----
+ objects/undo.o: undo.c
+ $(CCC) -o $@ undo.c
+
++ objects/usercmd.o: usercmd.c
++ $(CCC) -o $@ usercmd.c
++
+ objects/userfunc.o: userfunc.c
+ $(CCC) -o $@ userfunc.c
+
+***************
+*** 3657,3662 ****
+--- 3663,3672 ----
+ 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
++ objects/usercmd.o: usercmd.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
+ 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 \
+*** ../vim-8.1.1209/src/README.md 2019-04-26 21:31:34.019272940 +0200
+--- src/README.md 2019-04-26 23:05:11.488676798 +0200
+***************
+*** 28,33 ****
+--- 28,34 ----
+ debugger.c | vim script debugger
+ diff.c | diff mode (vimdiff)
+ eval.c | expression evaluation
++ evalfunc.c | built-in functions
+ fileio.c | reading and writing files
+ findfile.c | search for files in 'path'
+ fold.c | folding
+***************
+*** 40,46 ****
+ memline.c | storing lines for buffers in memory
+ menu.c | menus
+ message.c | (error) messages
+! ops.c | handling operators ("d", "y", "p")
+ option.c | options
+ quickfix.c | quickfix commands (":make", ":cn")
+ regexp.c | pattern matching
+--- 41,47 ----
+ memline.c | storing lines for buffers in memory
+ menu.c | menus
+ message.c | (error) messages
+! ops.c | handling operators ("d", "y", "p")
+ option.c | options
+ quickfix.c | quickfix commands (":make", ":cn")
+ regexp.c | pattern matching
+***************
+*** 49,57 ****
+ sign.c | signs
+ spell.c | spell checking
+ syntax.c | syntax and other highlighting
+! tag.c | tags
+ term.c | terminal handling, termcap codes
+ undo.c | undo and redo
+ window.c | handling split windows
+
+
+--- 50,60 ----
+ sign.c | signs
+ spell.c | spell checking
+ syntax.c | syntax and other highlighting
+! tag.c | tags
+ term.c | terminal handling, termcap codes
+ undo.c | undo and redo
++ usercmd.c | user defined commands
++ userfunc.c | user defined functions
+ window.c | handling split windows
+
+
+*** ../vim-8.1.1209/src/buffer.c 2019-04-07 14:19:06.323149516 +0200
+--- src/buffer.c 2019-04-26 23:07:09.612157048 +0200
+***************
+*** 925,935 ****
+ CHANGEDTICK(buf) = tick;
+ }
+ #endif
+! #ifdef FEAT_USR_CMDS
+! uc_clear(&buf->b_ucmds); /* clear local user commands */
+! #endif
+ #ifdef FEAT_SIGNS
+! buf_delete_signs(buf, (char_u *)"*"); // delete any signs */
+ #endif
+ #ifdef FEAT_NETBEANS_INTG
+ netbeans_file_killed(buf);
+--- 925,933 ----
+ CHANGEDTICK(buf) = tick;
+ }
+ #endif
+! uc_clear(&buf->b_ucmds); // clear local user commands
+ #ifdef FEAT_SIGNS
+! buf_delete_signs(buf, (char_u *)"*"); // delete any signs
+ #endif
+ #ifdef FEAT_NETBEANS_INTG
+ netbeans_file_killed(buf);
+*** ../vim-8.1.1209/src/eval.c 2019-04-26 20:32:57.082296551 +0200
+--- src/eval.c 2019-04-26 23:08:08.499897821 +0200
+***************
+*** 1120,1129 ****
+ return retval;
+ }
+
+! #if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) \
+ || defined(FEAT_COMPL_FUNC) || defined(PROTO)
+
+! # if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) || defined(PROTO)
+ /*
+ * Call Vim script function "func" and return the result as a string.
+ * Returns NULL when calling the function fails.
+--- 1120,1129 ----
+ return retval;
+ }
+
+! #if defined(FEAT_CMDL_COMPL) \
+ || defined(FEAT_COMPL_FUNC) || defined(PROTO)
+
+! # if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ /*
+ * Call Vim script function "func" and return the result as a string.
+ * Returns NULL when calling the function fails.
+*** ../vim-8.1.1209/src/evalfunc.c 2019-04-26 22:33:44.896723710 +0200
+--- src/evalfunc.c 2019-04-26 23:08:24.535827217 +0200
+***************
+*** 6611,6620 ****
+ #if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
+ "unnamedplus",
+ #endif
+- #ifdef FEAT_USR_CMDS
+ "user-commands", /* was accidentally included in 5.4 */
+ "user_commands",
+- #endif
+ #ifdef FEAT_VARTABS
+ "vartabs",
+ #endif
+--- 6611,6618 ----
+*** ../vim-8.1.1209/src/ex_cmds.h 2019-04-04 18:15:05.766857086 +0200
+--- src/ex_cmds.h 2019-04-26 23:27:26.194430566 +0200
+***************
+*** 1753,1765 ****
+ ADDR_LINES),
+
+ #ifndef DO_DECLARE_EXCMD
+- #ifdef FEAT_USR_CMDS
+ CMD_SIZE, /* MUST be after all real commands! */
+ CMD_USER = -1, /* User-defined command */
+ CMD_USER_BUF = -2 /* User-defined command local to buffer */
+- #else
+- CMD_SIZE /* MUST be the last one! */
+- #endif
+ #endif
+ };
+
+--- 1753,1761 ----
+***************
+*** 1795,1803 ****
+ int force_ff; /* ++ff= argument (first char of argument) */
+ int force_enc; /* ++enc= argument (index in cmd[]) */
+ int bad_char; /* BAD_KEEP, BAD_DROP or replacement byte */
+- #ifdef FEAT_USR_CMDS
+ int useridx; /* user command index */
+- #endif
+ char *errmsg; /* returned error message */
+ char_u *(*getline)(int, void *, int);
+ void *cookie; /* argument for getline() */
+--- 1791,1797 ----
+*** ../vim-8.1.1209/src/ex_docmd.c 2019-04-25 21:27:40.562186830 +0200
+--- src/ex_docmd.c 2019-04-27 12:51:27.040691361 +0200
+***************
+*** 19,66 ****
+ # define ex_hardcopy ex_ni
+ #endif
+
+- #ifdef FEAT_USR_CMDS
+- typedef struct ucmd
+- {
+- char_u *uc_name; /* The command name */
+- long_u uc_argt; /* The argument type */
+- char_u *uc_rep; /* The command's replacement string */
+- long uc_def; /* The default value for a range/count */
+- 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
+- # endif
+- } ucmd_T;
+-
+- #define UC_BUFFER 1 /* -buffer: local to current buffer */
+-
+- static garray_T ucmds = {0, 0, sizeof(ucmd_T), 4, NULL};
+-
+- #define USER_CMD(i) (&((ucmd_T *)(ucmds.ga_data))[i])
+- #define USER_CMD_GA(gap, i) (&((ucmd_T *)((gap)->ga_data))[i])
+-
+- static void do_ucmd(exarg_T *eap);
+- static void ex_command(exarg_T *eap);
+- static void ex_delcommand(exarg_T *eap);
+- # ifdef FEAT_CMDL_COMPL
+- static char_u *get_user_command_name(int idx);
+- # endif
+-
+- /* Wether a command index indicates a user command. */
+- # define IS_USER_CMDIDX(idx) ((int)(idx) < 0)
+-
+- #else
+- # define ex_command ex_ni
+- # define ex_comclear ex_ni
+- # define ex_delcommand ex_ni
+- /* Wether a command index indicates a user command. */
+- # define IS_USER_CMDIDX(idx) (FALSE)
+- #endif
+-
+ #ifdef FEAT_EVAL
+ static char_u *do_one_cmd(char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie);
+ #else
+--- 19,24 ----
+***************
+*** 300,309 ****
+ static void close_redir(void);
+ static void ex_mkrc(exarg_T *eap);
+ static void ex_mark(exarg_T *eap);
+- #ifdef FEAT_USR_CMDS
+- static char *uc_fun_cmd(void);
+- static char_u *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int *compl);
+- #endif
+ static void ex_startinsert(exarg_T *eap);
+ static void ex_stopinsert(exarg_T *eap);
+ #ifdef FEAT_FIND_ID
+--- 258,263 ----
+***************
+*** 1929,1949 ****
+ ) ? find_command(&ea, NULL) : ea.cmd;
+ }
+
+- #ifdef FEAT_USR_CMDS
+ if (p == NULL)
+ {
+ if (!ea.skip)
+ errormsg = _("E464: Ambiguous use of user-defined command");
+ goto doend;
+ }
+! /* Check for wrong commands. */
+ if (*p == '!' && ea.cmd[1] == 0151 && ea.cmd[0] == 78
+ && !IS_USER_CMDIDX(ea.cmdidx))
+ {
+ errormsg = uc_fun_cmd();
+ goto doend;
+ }
+! #endif
+ if (ea.cmdidx == CMD_SIZE)
+ {
+ if (!ea.skip)
+--- 1883,1902 ----
+ ) ? find_command(&ea, NULL) : ea.cmd;
+ }
+
+ if (p == NULL)
+ {
+ if (!ea.skip)
+ errormsg = _("E464: Ambiguous use of user-defined command");
+ goto doend;
+ }
+! // Check for wrong commands.
+ if (*p == '!' && ea.cmd[1] == 0151 && ea.cmd[0] == 78
+ && !IS_USER_CMDIDX(ea.cmdidx))
+ {
+ errormsg = uc_fun_cmd();
+ goto doend;
+ }
+!
+ if (ea.cmdidx == CMD_SIZE)
+ {
+ if (!ea.skip)
+***************
+*** 2508,2514 ****
+ * 7. Execute the command.
+ */
+
+- #ifdef FEAT_USR_CMDS
+ if (IS_USER_CMDIDX(ea.cmdidx))
+ {
+ /*
+--- 2461,2466 ----
+***************
+*** 2517,2526 ****
+ do_ucmd(&ea);
+ }
+ else
+- #endif
+ {
+ /*
+! * Call the function to execute the command.
+ */
+ ea.errmsg = NULL;
+ (cmdnames[ea.cmdidx].cmd_func)(&ea);
+--- 2469,2477 ----
+ do_ucmd(&ea);
+ }
+ else
+ {
+ /*
+! * Call the function to execute the builtin command.
+ */
+ ea.errmsg = NULL;
+ (cmdnames[ea.cmdidx].cmd_func)(&ea);
+***************
+*** 3235,3252 ****
+ break;
+ }
+
+! #ifdef FEAT_USR_CMDS
+! /* Look for a user defined command as a last resort. Let ":Print" be
+! * overruled by a user defined command. */
+ if ((eap->cmdidx == CMD_SIZE || eap->cmdidx == CMD_Print)
+ && *eap->cmd >= 'A' && *eap->cmd <= 'Z')
+ {
+! /* User defined commands may contain digits. */
+ while (ASCII_ISALNUM(*p))
+ ++p;
+ p = find_ucmd(eap, p, full, NULL, NULL);
+ }
+- #endif
+ if (p == eap->cmd)
+ eap->cmdidx = CMD_SIZE;
+ }
+--- 3186,3201 ----
+ break;
+ }
+
+! // Look for a user defined command as a last resort. Let ":Print" be
+! // overruled by a user defined command.
+ if ((eap->cmdidx == CMD_SIZE || eap->cmdidx == CMD_Print)
+ && *eap->cmd >= 'A' && *eap->cmd <= 'Z')
+ {
+! // User defined commands may contain digits.
+ while (ASCII_ISALNUM(*p))
+ ++p;
+ p = find_ucmd(eap, p, full, NULL, NULL);
+ }
+ if (p == eap->cmd)
+ eap->cmdidx = CMD_SIZE;
+ }
+***************
+*** 3254,3377 ****
+ return p;
+ }
+
+- #ifdef FEAT_USR_CMDS
+- /*
+- * Search for a user command that matches "eap->cmd".
+- * Return cmdidx in "eap->cmdidx", flags in "eap->argt", idx in "eap->useridx".
+- * Return a pointer to just after the command.
+- * Return NULL if there is no matching command.
+- */
+- static char_u *
+- find_ucmd(
+- exarg_T *eap,
+- char_u *p, /* end of the command (possibly including count) */
+- int *full, /* set to TRUE for a full match */
+- expand_T *xp, /* used for completion, NULL otherwise */
+- int *compl) /* completion flags or NULL */
+- {
+- int len = (int)(p - eap->cmd);
+- int j, k, matchlen = 0;
+- ucmd_T *uc;
+- int found = FALSE;
+- int possible = FALSE;
+- char_u *cp, *np; /* Point into typed cmd and test name */
+- garray_T *gap;
+- int amb_local = FALSE; /* Found ambiguous buffer-local command,
+- only full match global is accepted. */
+-
+- /*
+- * Look for buffer-local user commands first, then global ones.
+- */
+- gap = &curbuf->b_ucmds;
+- for (;;)
+- {
+- for (j = 0; j < gap->ga_len; ++j)
+- {
+- uc = USER_CMD_GA(gap, j);
+- cp = eap->cmd;
+- np = uc->uc_name;
+- k = 0;
+- while (k < len && *np != NUL && *cp++ == *np++)
+- k++;
+- if (k == len || (*np == NUL && vim_isdigit(eap->cmd[k])))
+- {
+- /* If finding a second match, the command is ambiguous. But
+- * not if a buffer-local command wasn't a full match and a
+- * global command is a full match. */
+- if (k == len && found && *np != NUL)
+- {
+- if (gap == &ucmds)
+- return NULL;
+- amb_local = TRUE;
+- }
+-
+- if (!found || (k == len && *np == NUL))
+- {
+- /* If we matched up to a digit, then there could
+- * be another command including the digit that we
+- * should use instead.
+- */
+- if (k == len)
+- found = TRUE;
+- else
+- possible = TRUE;
+-
+- if (gap == &ucmds)
+- eap->cmdidx = CMD_USER;
+- else
+- eap->cmdidx = CMD_USER_BUF;
+- eap->argt = (long)uc->uc_argt;
+- eap->useridx = j;
+- eap->addr_type = uc->uc_addr_type;
+-
+- # ifdef FEAT_CMDL_COMPL
+- if (compl != NULL)
+- *compl = uc->uc_compl;
+- # ifdef FEAT_EVAL
+- 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
+- /* Do not search for further abbreviations
+- * if this is an exact match. */
+- matchlen = k;
+- if (k == len && *np == NUL)
+- {
+- if (full != NULL)
+- *full = TRUE;
+- amb_local = FALSE;
+- break;
+- }
+- }
+- }
+- }
+-
+- /* Stop if we found a full match or searched all. */
+- if (j < gap->ga_len || gap == &ucmds)
+- break;
+- gap = &ucmds;
+- }
+-
+- /* Only found ambiguous matches. */
+- if (amb_local)
+- {
+- if (xp != NULL)
+- xp->xp_context = EXPAND_UNSUCCESSFUL;
+- return NULL;
+- }
+-
+- /* The match we found may be followed immediately by a number. Move "p"
+- * back to point to it. */
+- if (found || possible)
+- return p + (matchlen - len);
+- return p;
+- }
+- #endif
+-
+ #if defined(FEAT_EVAL) || defined(PROTO)
+ static struct cmdmod
+ {
+--- 3203,3208 ----
+***************
+*** 3483,3492 ****
+ char_u *cmd, *arg;
+ int len = 0;
+ exarg_T ea;
+- #if defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)
+- int compl = EXPAND_NOTHING;
+- #endif
+ #ifdef FEAT_CMDL_COMPL
+ int delim;
+ #endif
+ int forceit = FALSE;
+--- 3314,3321 ----
+ char_u *cmd, *arg;
+ int len = 0;
+ exarg_T ea;
+ #ifdef FEAT_CMDL_COMPL
++ int compl = EXPAND_NOTHING;
+ int delim;
+ #endif
+ int forceit = FALSE;
+***************
+*** 3572,3582 ****
+ (size_t)len) == 0)
+ break;
+
+- #ifdef FEAT_USR_CMDS
+ if (cmd[0] >= 'A' && cmd[0] <= 'Z')
+! while (ASCII_ISALNUM(*p) || *p == '*') /* Allow * wild card */
+ ++p;
+- #endif
+ }
+
+ /*
+--- 3401,3409 ----
+ (size_t)len) == 0)
+ break;
+
+ if (cmd[0] >= 'A' && cmd[0] <= 'Z')
+! while (ASCII_ISALNUM(*p) || *p == '*') // Allow * wild card
+ ++p;
+ }
+
+ /*
+***************
+*** 3593,3613 ****
+ ea.cmdidx = CMD_substitute;
+ p = cmd + 1;
+ }
+- #ifdef FEAT_USR_CMDS
+ else if (cmd[0] >= 'A' && cmd[0] <= 'Z')
+ {
+ ea.cmd = cmd;
+ p = find_ucmd(&ea, p, NULL, xp,
+! # if defined(FEAT_CMDL_COMPL)
+ &compl
+! # else
+ NULL
+! # endif
+ );
+ if (p == NULL)
+! ea.cmdidx = CMD_SIZE; /* ambiguous user command */
+ }
+- #endif
+ }
+ if (ea.cmdidx == CMD_SIZE)
+ {
+--- 3420,3438 ----
+ ea.cmdidx = CMD_substitute;
+ p = cmd + 1;
+ }
+ else if (cmd[0] >= 'A' && cmd[0] <= 'Z')
+ {
+ ea.cmd = cmd;
+ p = find_ucmd(&ea, p, NULL, xp,
+! #if defined(FEAT_CMDL_COMPL)
+ &compl
+! #else
+ NULL
+! #endif
+ );
+ if (p == NULL)
+! ea.cmdidx = CMD_SIZE; // ambiguous user command
+ }
+ }
+ if (ea.cmdidx == CMD_SIZE)
+ {
+***************
+*** 3828,3834 ****
+ {
+ xp->xp_context = EXPAND_ENV_VARS;
+ ++xp->xp_pattern;
+! #if defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)
+ /* Avoid that the assignment uses EXPAND_FILES again. */
+ if (compl != EXPAND_USER_DEFINED && compl != EXPAND_USER_LIST)
+ compl = EXPAND_ENV_VARS;
+--- 3653,3659 ----
+ {
+ xp->xp_context = EXPAND_ENV_VARS;
+ ++xp->xp_pattern;
+! #if defined(FEAT_CMDL_COMPL)
+ /* Avoid that the assignment uses EXPAND_FILES again. */
+ if (compl != EXPAND_USER_DEFINED && compl != EXPAND_USER_LIST)
+ compl = EXPAND_ENV_VARS;
+***************
+*** 3944,4011 ****
+ * All completion for the +cmdline_compl feature goes here.
+ */
+
+- # ifdef FEAT_USR_CMDS
+ case CMD_command:
+! /* Check for attributes */
+! while (*arg == '-')
+! {
+! arg++; /* Skip "-" */
+! p = skiptowhite(arg);
+! if (*p == NUL)
+! {
+! /* Cursor is still in the attribute */
+! p = vim_strchr(arg, '=');
+! if (p == NULL)
+! {
+! /* No "=", so complete attribute names */
+! xp->xp_context = EXPAND_USER_CMD_FLAGS;
+! xp->xp_pattern = arg;
+! return NULL;
+! }
+!
+! /* For the -complete, -nargs and -addr attributes, we complete
+! * their arguments as well.
+! */
+! if (STRNICMP(arg, "complete", p - arg) == 0)
+! {
+! xp->xp_context = EXPAND_USER_COMPLETE;
+! xp->xp_pattern = p + 1;
+! return NULL;
+! }
+! else if (STRNICMP(arg, "nargs", p - arg) == 0)
+! {
+! xp->xp_context = EXPAND_USER_NARGS;
+! xp->xp_pattern = p + 1;
+! return NULL;
+! }
+! else if (STRNICMP(arg, "addr", p - arg) == 0)
+! {
+! xp->xp_context = EXPAND_USER_ADDR_TYPE;
+! xp->xp_pattern = p + 1;
+! return NULL;
+! }
+! return NULL;
+! }
+! arg = skipwhite(p);
+! }
+!
+! /* After the attributes comes the new command name */
+! p = skiptowhite(arg);
+! if (*p == NUL)
+! {
+! xp->xp_context = EXPAND_USER_COMMANDS;
+! xp->xp_pattern = arg;
+! break;
+! }
+!
+! /* And finally comes a normal command */
+! return skipwhite(p);
+
+ case CMD_delcommand:
+ xp->xp_context = EXPAND_USER_COMMANDS;
+ xp->xp_pattern = arg;
+ break;
+- # endif
+
+ case CMD_global:
+ case CMD_vglobal:
+--- 3769,3781 ----
+ * All completion for the +cmdline_compl feature goes here.
+ */
+
+ case CMD_command:
+! return set_context_in_user_cmd(xp, arg);
+
+ case CMD_delcommand:
+ xp->xp_context = EXPAND_USER_COMMANDS;
+ xp->xp_pattern = arg;
+ break;
+
+ case CMD_global:
+ case CMD_vglobal:
+***************
+*** 4186,4217 ****
+ xp->xp_context = EXPAND_BUFFERS;
+ xp->xp_pattern = arg;
+ break;
+! #ifdef FEAT_USR_CMDS
+ case CMD_USER:
+ case CMD_USER_BUF:
+ if (compl != EXPAND_NOTHING)
+ {
+! /* XFILE: file names are handled above */
+ if (!(ea.argt & XFILE))
+ {
+! # ifdef FEAT_MENU
+ if (compl == EXPAND_MENUS)
+ return set_context_in_menu_cmd(xp, cmd, arg, forceit);
+! # endif
+ if (compl == EXPAND_COMMANDS)
+ return arg;
+ if (compl == EXPAND_MAPPINGS)
+ return set_context_in_map_cmd(xp, (char_u *)"map",
+ arg, forceit, FALSE, FALSE, CMD_map);
+! /* Find start of last argument. */
+ p = arg;
+ while (*p)
+ {
+ if (*p == ' ')
+! /* argument starts after a space */
+ arg = p + 1;
+ else if (*p == '\\' && *(p + 1) != NUL)
+! ++p; /* skip over escaped character */
+ MB_PTR_ADV(p);
+ }
+ xp->xp_pattern = arg;
+--- 3956,3987 ----
+ xp->xp_context = EXPAND_BUFFERS;
+ xp->xp_pattern = arg;
+ break;
+!
+ case CMD_USER:
+ case CMD_USER_BUF:
+ if (compl != EXPAND_NOTHING)
+ {
+! // XFILE: file names are handled above
+ if (!(ea.argt & XFILE))
+ {
+! #ifdef FEAT_MENU
+ if (compl == EXPAND_MENUS)
+ return set_context_in_menu_cmd(xp, cmd, arg, forceit);
+! #endif
+ if (compl == EXPAND_COMMANDS)
+ return arg;
+ if (compl == EXPAND_MAPPINGS)
+ return set_context_in_map_cmd(xp, (char_u *)"map",
+ arg, forceit, FALSE, FALSE, CMD_map);
+! // Find start of last argument.
+ p = arg;
+ while (*p)
+ {
+ if (*p == ' ')
+! // argument starts after a space
+ arg = p + 1;
+ else if (*p == '\\' && *(p + 1) != NUL)
+! ++p; // skip over escaped character
+ MB_PTR_ADV(p);
+ }
+ xp->xp_pattern = arg;
+***************
+*** 4219,4225 ****
+ xp->xp_context = compl;
+ }
+ break;
+! #endif
+ case CMD_map: case CMD_noremap:
+ case CMD_nmap: case CMD_nnoremap:
+ case CMD_vmap: case CMD_vnoremap:
+--- 3989,3995 ----
+ xp->xp_context = compl;
+ }
+ break;
+!
+ case CMD_map: case CMD_noremap:
+ case CMD_nmap: case CMD_nnoremap:
+ case CMD_vmap: case CMD_vnoremap:
+***************
+*** 5771,5777 ****
+ return OK;
+ }
+
+! #ifdef FEAT_CMDL_COMPL
+ /*
+ * Function given to ExpandGeneric() to obtain the list of command names.
+ */
+--- 5541,5547 ----
+ return OK;
+ }
+
+! #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ /*
+ * Function given to ExpandGeneric() to obtain the list of command names.
+ */
+***************
+*** 5779,7218 ****
+ get_command_name(expand_T *xp UNUSED, int idx)
+ {
+ if (idx >= (int)CMD_SIZE)
+- # ifdef FEAT_USR_CMDS
+ return get_user_command_name(idx);
+- # else
+- return NULL;
+- # endif
+ return cmdnames[idx].cmd_name;
+ }
+ #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)
+- {
+- ucmd_T *cmd = NULL;
+- char_u *p;
+- int i;
+- int cmp = 1;
+- char_u *rep_buf = NULL;
+- garray_T *gap;
+-
+- replace_termcodes(rep, &rep_buf, FALSE, FALSE, FALSE);
+- if (rep_buf == NULL)
+- {
+- /* Can't replace termcodes - try using the string as is */
+- rep_buf = vim_strsave(rep);
+-
+- /* Give up if out of memory */
+- if (rep_buf == NULL)
+- return FAIL;
+- }
+-
+- /* get address of growarray: global or in curbuf */
+- if (flags & UC_BUFFER)
+- {
+- gap = &curbuf->b_ucmds;
+- if (gap->ga_itemsize == 0)
+- ga_init2(gap, (int)sizeof(ucmd_T), 4);
+- }
+- else
+- gap = &ucmds;
+-
+- /* Search for the command in the already defined commands. */
+- for (i = 0; i < gap->ga_len; ++i)
+- {
+- size_t len;
+-
+- cmd = USER_CMD_GA(gap, i);
+- len = STRLEN(cmd->uc_name);
+- cmp = STRNCMP(name, cmd->uc_name, name_len);
+- if (cmp == 0)
+- {
+- if (name_len < len)
+- cmp = -1;
+- else if (name_len > len)
+- cmp = 1;
+- }
+-
+- 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))
+- {
+- semsg(_("E174: Command already exists: add ! to replace it: %s"),
+- name);
+- goto fail;
+- }
+-
+- VIM_CLEAR(cmd->uc_rep);
+- #if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+- VIM_CLEAR(cmd->uc_compl_arg);
+- #endif
+- break;
+- }
+-
+- /* Stop as soon as we pass the name to add */
+- if (cmp < 0)
+- break;
+- }
+-
+- /* Extend the array unless we're replacing an existing command */
+- if (cmp != 0)
+- {
+- if (ga_grow(gap, 1) != OK)
+- goto fail;
+- if ((p = vim_strnsave(name, (int)name_len)) == NULL)
+- goto fail;
+-
+- cmd = USER_CMD_GA(gap, i);
+- mch_memmove(cmd + 1, cmd, (gap->ga_len - i) * sizeof(ucmd_T));
+-
+- ++gap->ga_len;
+-
+- cmd->uc_name = p;
+- }
+-
+- cmd->uc_rep = rep_buf;
+- cmd->uc_argt = argt;
+- 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
+- #endif
+- cmd->uc_addr_type = addr_type;
+-
+- return OK;
+-
+- fail:
+- vim_free(rep_buf);
+- #if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+- vim_free(compl_arg);
+- #endif
+- return FAIL;
+- }
+- #endif
+-
+- #if defined(FEAT_USR_CMDS)
+- static struct
+- {
+- int expand;
+- char *name;
+- char *shortname;
+- } addr_type_complete[] =
+- {
+- {ADDR_ARGUMENTS, "arguments", "arg"},
+- {ADDR_LINES, "lines", "line"},
+- {ADDR_LOADED_BUFFERS, "loaded_buffers", "load"},
+- {ADDR_TABS, "tabs", "tab"},
+- {ADDR_BUFFERS, "buffers", "buf"},
+- {ADDR_WINDOWS, "windows", "win"},
+- {ADDR_QUICKFIX, "quickfix", "qf"},
+- {ADDR_OTHER, "other", "?"},
+- {-1, NULL, NULL}
+- };
+- #endif
+-
+- #if defined(FEAT_USR_CMDS) || defined(FEAT_EVAL) || defined(PROTO)
+- /*
+- * List of names for completion for ":command" with the EXPAND_ flag.
+- * Must be alphabetical for completion.
+- */
+- static struct
+- {
+- int expand;
+- char *name;
+- } command_complete[] =
+- {
+- {EXPAND_ARGLIST, "arglist"},
+- {EXPAND_AUGROUP, "augroup"},
+- {EXPAND_BEHAVE, "behave"},
+- {EXPAND_BUFFERS, "buffer"},
+- {EXPAND_COLORS, "color"},
+- {EXPAND_COMMANDS, "command"},
+- {EXPAND_COMPILER, "compiler"},
+- #if defined(FEAT_CSCOPE)
+- {EXPAND_CSCOPE, "cscope"},
+- #endif
+- #if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+- {EXPAND_USER_DEFINED, "custom"},
+- {EXPAND_USER_LIST, "customlist"},
+- #endif
+- {EXPAND_DIRECTORIES, "dir"},
+- {EXPAND_ENV_VARS, "environment"},
+- {EXPAND_EVENTS, "event"},
+- {EXPAND_EXPRESSION, "expression"},
+- {EXPAND_FILES, "file"},
+- {EXPAND_FILES_IN_PATH, "file_in_path"},
+- {EXPAND_FILETYPE, "filetype"},
+- {EXPAND_FUNCTIONS, "function"},
+- {EXPAND_HELP, "help"},
+- {EXPAND_HIGHLIGHT, "highlight"},
+- #if defined(FEAT_CMDHIST)
+- {EXPAND_HISTORY, "history"},
+- #endif
+- #if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
+- {EXPAND_LOCALES, "locale"},
+- #endif
+- {EXPAND_MAPCLEAR, "mapclear"},
+- {EXPAND_MAPPINGS, "mapping"},
+- {EXPAND_MENUS, "menu"},
+- {EXPAND_MESSAGES, "messages"},
+- {EXPAND_OWNSYNTAX, "syntax"},
+- #if defined(FEAT_PROFILE)
+- {EXPAND_SYNTIME, "syntime"},
+- #endif
+- {EXPAND_SETTINGS, "option"},
+- {EXPAND_PACKADD, "packadd"},
+- {EXPAND_SHELLCMD, "shellcmd"},
+- #if defined(FEAT_SIGNS)
+- {EXPAND_SIGN, "sign"},
+- #endif
+- {EXPAND_TAGS, "tag"},
+- {EXPAND_TAGS_LISTFILES, "tag_listfiles"},
+- {EXPAND_USER, "user"},
+- {EXPAND_USER_VARS, "var"},
+- {0, NULL}
+- };
+- #endif
+-
+- #if defined(FEAT_USR_CMDS) || defined(PROTO)
+- static void
+- uc_list(char_u *name, size_t name_len)
+- {
+- int i, j;
+- int found = FALSE;
+- ucmd_T *cmd;
+- int len;
+- int over;
+- long a;
+- garray_T *gap;
+-
+- gap = &curbuf->b_ucmds;
+- for (;;)
+- {
+- for (i = 0; i < gap->ga_len; ++i)
+- {
+- cmd = USER_CMD_GA(gap, i);
+- a = (long)cmd->uc_argt;
+-
+- /* Skip commands which don't match the requested prefix and
+- * commands filtered out. */
+- if (STRNCMP(name, cmd->uc_name, name_len) != 0
+- || message_filtered(cmd->uc_name))
+- continue;
+-
+- /* Put out the title first time */
+- if (!found)
+- msg_puts_title(_("\n Name Args Address Complete Definition"));
+- found = TRUE;
+- msg_putchar('\n');
+- if (got_int)
+- break;
+-
+- // Special cases
+- len = 4;
+- if (a & BANG)
+- {
+- msg_putchar('!');
+- --len;
+- }
+- if (a & REGSTR)
+- {
+- msg_putchar('"');
+- --len;
+- }
+- if (gap != &ucmds)
+- {
+- msg_putchar('b');
+- --len;
+- }
+- if (a & TRLBAR)
+- {
+- msg_putchar('|');
+- --len;
+- }
+- while (len-- > 0)
+- msg_putchar(' ');
+-
+- msg_outtrans_attr(cmd->uc_name, HL_ATTR(HLF_D));
+- len = (int)STRLEN(cmd->uc_name) + 4;
+-
+- do {
+- msg_putchar(' ');
+- ++len;
+- } while (len < 22);
+-
+- // "over" is how much longer the name is than the column width for
+- // the name, we'll try to align what comes after.
+- over = len - 22;
+- len = 0;
+-
+- // Arguments
+- switch ((int)(a & (EXTRA|NOSPC|NEEDARG)))
+- {
+- case 0: IObuff[len++] = '0'; break;
+- case (EXTRA): IObuff[len++] = '*'; break;
+- case (EXTRA|NOSPC): IObuff[len++] = '?'; break;
+- case (EXTRA|NEEDARG): IObuff[len++] = '+'; break;
+- case (EXTRA|NOSPC|NEEDARG): IObuff[len++] = '1'; break;
+- }
+-
+- do {
+- IObuff[len++] = ' ';
+- } while (len < 5 - over);
+-
+- // Address / Range
+- if (a & (RANGE|COUNT))
+- {
+- if (a & COUNT)
+- {
+- // -count=N
+- sprintf((char *)IObuff + len, "%ldc", cmd->uc_def);
+- len += (int)STRLEN(IObuff + len);
+- }
+- else if (a & DFLALL)
+- IObuff[len++] = '%';
+- else if (cmd->uc_def >= 0)
+- {
+- // -range=N
+- sprintf((char *)IObuff + len, "%ld", cmd->uc_def);
+- len += (int)STRLEN(IObuff + len);
+- }
+- else
+- IObuff[len++] = '.';
+- }
+-
+- do {
+- IObuff[len++] = ' ';
+- } while (len < 8 - over);
+-
+- // Address Type
+- for (j = 0; addr_type_complete[j].expand != -1; ++j)
+- if (addr_type_complete[j].expand != ADDR_LINES
+- && addr_type_complete[j].expand == cmd->uc_addr_type)
+- {
+- STRCPY(IObuff + len, addr_type_complete[j].shortname);
+- len += (int)STRLEN(IObuff + len);
+- break;
+- }
+-
+- do {
+- IObuff[len++] = ' ';
+- } while (len < 13 - over);
+-
+- // Completion
+- for (j = 0; command_complete[j].expand != 0; ++j)
+- if (command_complete[j].expand == cmd->uc_compl)
+- {
+- STRCPY(IObuff + len, command_complete[j].name);
+- len += (int)STRLEN(IObuff + len);
+- break;
+- }
+-
+- do {
+- IObuff[len++] = ' ';
+- } while (len < 25 - over);
+-
+- IObuff[len] = '\0';
+- msg_outtrans(IObuff);
+-
+- msg_outtrans_special(cmd->uc_rep, FALSE,
+- name_len == 0 ? Columns - 47 : 0);
+- #ifdef FEAT_EVAL
+- if (p_verbose > 0)
+- last_set_msg(cmd->uc_script_ctx);
+- #endif
+- out_flush();
+- ui_breakcheck();
+- if (got_int)
+- break;
+- }
+- if (gap == &ucmds || i < gap->ga_len)
+- break;
+- gap = &ucmds;
+- }
+-
+- if (!found)
+- msg(_("No user-defined commands found"));
+- }
+-
+- static char *
+- uc_fun_cmd(void)
+- {
+- static char_u fcmd[] = {0x84, 0xaf, 0x60, 0xb9, 0xaf, 0xb5, 0x60, 0xa4,
+- 0xa5, 0xad, 0xa1, 0xae, 0xa4, 0x60, 0xa1, 0x60,
+- 0xb3, 0xa8, 0xb2, 0xb5, 0xa2, 0xa2, 0xa5, 0xb2,
+- 0xb9, 0x7f, 0};
+- int i;
+-
+- for (i = 0; fcmd[i]; ++i)
+- IObuff[i] = fcmd[i] - 0x40;
+- IObuff[i] = 0;
+- return (char *)IObuff;
+- }
+-
+- static int
+- uc_scan_attr(
+- char_u *attr,
+- size_t len,
+- long *argt,
+- long *def,
+- int *flags,
+- int *compl,
+- char_u **compl_arg,
+- int *addr_type_arg)
+- {
+- char_u *p;
+-
+- if (len == 0)
+- {
+- emsg(_("E175: No attribute specified"));
+- return FAIL;
+- }
+-
+- /* First, try the simple attributes (no arguments) */
+- if (STRNICMP(attr, "bang", len) == 0)
+- *argt |= BANG;
+- else if (STRNICMP(attr, "buffer", len) == 0)
+- *flags |= UC_BUFFER;
+- else if (STRNICMP(attr, "register", len) == 0)
+- *argt |= REGSTR;
+- else if (STRNICMP(attr, "bar", len) == 0)
+- *argt |= TRLBAR;
+- else
+- {
+- int i;
+- char_u *val = NULL;
+- size_t vallen = 0;
+- size_t attrlen = len;
+-
+- /* Look for the attribute name - which is the part before any '=' */
+- for (i = 0; i < (int)len; ++i)
+- {
+- if (attr[i] == '=')
+- {
+- val = &attr[i + 1];
+- vallen = len - i - 1;
+- attrlen = i;
+- break;
+- }
+- }
+-
+- if (STRNICMP(attr, "nargs", attrlen) == 0)
+- {
+- if (vallen == 1)
+- {
+- if (*val == '0')
+- /* Do nothing - this is the default */;
+- else if (*val == '1')
+- *argt |= (EXTRA | NOSPC | NEEDARG);
+- else if (*val == '*')
+- *argt |= EXTRA;
+- else if (*val == '?')
+- *argt |= (EXTRA | NOSPC);
+- else if (*val == '+')
+- *argt |= (EXTRA | NEEDARG);
+- else
+- goto wrong_nargs;
+- }
+- else
+- {
+- wrong_nargs:
+- emsg(_("E176: Invalid number of arguments"));
+- return FAIL;
+- }
+- }
+- else if (STRNICMP(attr, "range", attrlen) == 0)
+- {
+- *argt |= RANGE;
+- if (vallen == 1 && *val == '%')
+- *argt |= DFLALL;
+- else if (val != NULL)
+- {
+- p = val;
+- if (*def >= 0)
+- {
+- two_count:
+- emsg(_("E177: Count cannot be specified twice"));
+- return FAIL;
+- }
+-
+- *def = getdigits(&p);
+- *argt |= (ZEROR | NOTADR);
+-
+- if (p != val + vallen || vallen == 0)
+- {
+- invalid_count:
+- emsg(_("E178: Invalid default value for count"));
+- return FAIL;
+- }
+- }
+- }
+- else if (STRNICMP(attr, "count", attrlen) == 0)
+- {
+- *argt |= (COUNT | ZEROR | RANGE | NOTADR);
+-
+- if (val != NULL)
+- {
+- p = val;
+- if (*def >= 0)
+- goto two_count;
+-
+- *def = getdigits(&p);
+-
+- if (p != val + vallen)
+- goto invalid_count;
+- }
+-
+- if (*def < 0)
+- *def = 0;
+- }
+- else if (STRNICMP(attr, "complete", attrlen) == 0)
+- {
+- if (val == NULL)
+- {
+- emsg(_("E179: argument required for -complete"));
+- return FAIL;
+- }
+-
+- if (parse_compl_arg(val, (int)vallen, compl, argt, compl_arg)
+- == FAIL)
+- return FAIL;
+- }
+- else if (STRNICMP(attr, "addr", attrlen) == 0)
+- {
+- *argt |= RANGE;
+- if (val == NULL)
+- {
+- emsg(_("E179: argument required for -addr"));
+- return FAIL;
+- }
+- if (parse_addr_type_arg(val, (int)vallen, argt, addr_type_arg)
+- == FAIL)
+- return FAIL;
+- if (addr_type_arg != ADDR_LINES)
+- *argt |= (ZEROR | NOTADR) ;
+- }
+- else
+- {
+- char_u ch = attr[len];
+- attr[len] = '\0';
+- semsg(_("E181: Invalid attribute: %s"), attr);
+- attr[len] = ch;
+- return FAIL;
+- }
+- }
+-
+- return OK;
+- }
+-
+- /*
+- * ":command ..."
+- */
+- static void
+- ex_command(exarg_T *eap)
+- {
+- char_u *name;
+- char_u *end;
+- char_u *p;
+- long argt = 0;
+- long def = -1;
+- int flags = 0;
+- int compl = EXPAND_NOTHING;
+- char_u *compl_arg = NULL;
+- int addr_type_arg = ADDR_LINES;
+- int has_attr = (eap->arg[0] == '-');
+- int name_len;
+-
+- p = eap->arg;
+-
+- /* Check for attributes */
+- while (*p == '-')
+- {
+- ++p;
+- end = skiptowhite(p);
+- if (uc_scan_attr(p, end - p, &argt, &def, &flags, &compl,
+- &compl_arg, &addr_type_arg)
+- == FAIL)
+- return;
+- p = skipwhite(end);
+- }
+-
+- /* Get the name (if any) and skip to the following argument */
+- name = p;
+- if (ASCII_ISALPHA(*p))
+- while (ASCII_ISALNUM(*p))
+- ++p;
+- if (!ends_excmd(*p) && !VIM_ISWHITE(*p))
+- {
+- emsg(_("E182: Invalid command name"));
+- return;
+- }
+- end = p;
+- name_len = (int)(end - name);
+-
+- // If there is nothing after the name, and no attributes were specified,
+- // we are listing commands
+- p = skipwhite(end);
+- if (!has_attr && ends_excmd(*p))
+- {
+- uc_list(name, end - name);
+- }
+- else if (!ASCII_ISUPPER(*name))
+- {
+- emsg(_("E183: User defined commands must start with an uppercase letter"));
+- return;
+- }
+- else if ((name_len == 1 && *name == 'X')
+- || (name_len <= 4
+- && STRNCMP(name, "Next", name_len > 4 ? 4 : name_len) == 0))
+- {
+- emsg(_("E841: Reserved name, cannot be used for user defined command"));
+- return;
+- }
+- else
+- uc_add_command(name, end - name, p, argt, def, flags, compl, compl_arg,
+- addr_type_arg, eap->forceit);
+- }
+-
+- /*
+- * ":comclear"
+- * Clear all user commands, global and for current buffer.
+- */
+- void
+- ex_comclear(exarg_T *eap UNUSED)
+- {
+- uc_clear(&ucmds);
+- uc_clear(&curbuf->b_ucmds);
+- }
+-
+- /*
+- * Clear all user commands for "gap".
+- */
+- void
+- uc_clear(garray_T *gap)
+- {
+- int i;
+- ucmd_T *cmd;
+-
+- for (i = 0; i < gap->ga_len; ++i)
+- {
+- cmd = USER_CMD_GA(gap, i);
+- vim_free(cmd->uc_name);
+- vim_free(cmd->uc_rep);
+- # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+- vim_free(cmd->uc_compl_arg);
+- # endif
+- }
+- ga_clear(gap);
+- }
+-
+- static void
+- ex_delcommand(exarg_T *eap)
+- {
+- int i = 0;
+- ucmd_T *cmd = NULL;
+- int cmp = -1;
+- garray_T *gap;
+-
+- gap = &curbuf->b_ucmds;
+- for (;;)
+- {
+- for (i = 0; i < gap->ga_len; ++i)
+- {
+- cmd = USER_CMD_GA(gap, i);
+- cmp = STRCMP(eap->arg, cmd->uc_name);
+- if (cmp <= 0)
+- break;
+- }
+- if (gap == &ucmds || cmp == 0)
+- break;
+- gap = &ucmds;
+- }
+-
+- if (cmp != 0)
+- {
+- semsg(_("E184: No such user-defined command: %s"), eap->arg);
+- return;
+- }
+-
+- vim_free(cmd->uc_name);
+- vim_free(cmd->uc_rep);
+- # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+- vim_free(cmd->uc_compl_arg);
+- # endif
+-
+- --gap->ga_len;
+-
+- if (i < gap->ga_len)
+- mch_memmove(cmd, cmd + 1, (gap->ga_len - i) * sizeof(ucmd_T));
+- }
+-
+- /*
+- * split and quote args for <f-args>
+- */
+- static char_u *
+- uc_split_args(char_u *arg, size_t *lenp)
+- {
+- char_u *buf;
+- char_u *p;
+- char_u *q;
+- int len;
+-
+- /* Precalculate length */
+- p = arg;
+- len = 2; /* Initial and final quotes */
+-
+- while (*p)
+- {
+- if (p[0] == '\\' && p[1] == '\\')
+- {
+- len += 2;
+- p += 2;
+- }
+- else if (p[0] == '\\' && VIM_ISWHITE(p[1]))
+- {
+- len += 1;
+- p += 2;
+- }
+- else if (*p == '\\' || *p == '"')
+- {
+- len += 2;
+- p += 1;
+- }
+- else if (VIM_ISWHITE(*p))
+- {
+- p = skipwhite(p);
+- if (*p == NUL)
+- break;
+- len += 3; /* "," */
+- }
+- else
+- {
+- int charlen = (*mb_ptr2len)(p);
+-
+- len += charlen;
+- p += charlen;
+- }
+- }
+-
+- buf = alloc(len + 1);
+- if (buf == NULL)
+- {
+- *lenp = 0;
+- return buf;
+- }
+-
+- p = arg;
+- q = buf;
+- *q++ = '"';
+- while (*p)
+- {
+- if (p[0] == '\\' && p[1] == '\\')
+- {
+- *q++ = '\\';
+- *q++ = '\\';
+- p += 2;
+- }
+- else if (p[0] == '\\' && VIM_ISWHITE(p[1]))
+- {
+- *q++ = p[1];
+- p += 2;
+- }
+- else if (*p == '\\' || *p == '"')
+- {
+- *q++ = '\\';
+- *q++ = *p++;
+- }
+- else if (VIM_ISWHITE(*p))
+- {
+- p = skipwhite(p);
+- if (*p == NUL)
+- break;
+- *q++ = '"';
+- *q++ = ',';
+- *q++ = '"';
+- }
+- else
+- {
+- MB_COPY_CHAR(p, q);
+- }
+- }
+- *q++ = '"';
+- *q = 0;
+-
+- *lenp = len;
+- return buf;
+- }
+-
+- static size_t
+- add_cmd_modifier(char_u *buf, char *mod_str, int *multi_mods)
+- {
+- size_t result;
+-
+- result = STRLEN(mod_str);
+- if (*multi_mods)
+- result += 1;
+- if (buf != NULL)
+- {
+- if (*multi_mods)
+- STRCAT(buf, " ");
+- STRCAT(buf, mod_str);
+- }
+-
+- *multi_mods = 1;
+-
+- return result;
+- }
+-
+- /*
+- * Check for a <> code in a user command.
+- * "code" points to the '<'. "len" the length of the <> (inclusive).
+- * "buf" is where the result is to be added.
+- * "split_buf" points to a buffer used for splitting, caller should free it.
+- * "split_len" is the length of what "split_buf" contains.
+- * Returns the length of the replacement, which has been added to "buf".
+- * Returns -1 if there was no match, and only the "<" has been copied.
+- */
+- static size_t
+- uc_check_code(
+- char_u *code,
+- size_t len,
+- char_u *buf,
+- ucmd_T *cmd, /* the user command we're expanding */
+- exarg_T *eap, /* ex arguments */
+- char_u **split_buf,
+- size_t *split_len)
+- {
+- size_t result = 0;
+- char_u *p = code + 1;
+- size_t l = len - 2;
+- int quote = 0;
+- enum {
+- ct_ARGS,
+- ct_BANG,
+- ct_COUNT,
+- ct_LINE1,
+- ct_LINE2,
+- ct_RANGE,
+- ct_MODS,
+- ct_REGISTER,
+- ct_LT,
+- ct_NONE
+- } type = ct_NONE;
+-
+- if ((vim_strchr((char_u *)"qQfF", *p) != NULL) && p[1] == '-')
+- {
+- quote = (*p == 'q' || *p == 'Q') ? 1 : 2;
+- p += 2;
+- l -= 2;
+- }
+-
+- ++l;
+- if (l <= 1)
+- type = ct_NONE;
+- else if (STRNICMP(p, "args>", l) == 0)
+- type = ct_ARGS;
+- else if (STRNICMP(p, "bang>", l) == 0)
+- type = ct_BANG;
+- else if (STRNICMP(p, "count>", l) == 0)
+- type = ct_COUNT;
+- else if (STRNICMP(p, "line1>", l) == 0)
+- type = ct_LINE1;
+- else if (STRNICMP(p, "line2>", l) == 0)
+- type = ct_LINE2;
+- else if (STRNICMP(p, "range>", l) == 0)
+- type = ct_RANGE;
+- else if (STRNICMP(p, "lt>", l) == 0)
+- type = ct_LT;
+- else if (STRNICMP(p, "reg>", l) == 0 || STRNICMP(p, "register>", l) == 0)
+- type = ct_REGISTER;
+- else if (STRNICMP(p, "mods>", l) == 0)
+- type = ct_MODS;
+-
+- switch (type)
+- {
+- case ct_ARGS:
+- /* Simple case first */
+- if (*eap->arg == NUL)
+- {
+- if (quote == 1)
+- {
+- result = 2;
+- if (buf != NULL)
+- STRCPY(buf, "''");
+- }
+- else
+- result = 0;
+- break;
+- }
+-
+- /* When specified there is a single argument don't split it.
+- * Works for ":Cmd %" when % is "a b c". */
+- if ((eap->argt & NOSPC) && quote == 2)
+- quote = 1;
+-
+- switch (quote)
+- {
+- case 0: /* No quoting, no splitting */
+- result = STRLEN(eap->arg);
+- if (buf != NULL)
+- STRCPY(buf, eap->arg);
+- break;
+- case 1: /* Quote, but don't split */
+- result = STRLEN(eap->arg) + 2;
+- for (p = eap->arg; *p; ++p)
+- {
+- if (enc_dbcs != 0 && (*mb_ptr2len)(p) == 2)
+- /* DBCS can contain \ in a trail byte, skip the
+- * double-byte character. */
+- ++p;
+- else
+- if (*p == '\\' || *p == '"')
+- ++result;
+- }
+-
+- if (buf != NULL)
+- {
+- *buf++ = '"';
+- for (p = eap->arg; *p; ++p)
+- {
+- if (enc_dbcs != 0 && (*mb_ptr2len)(p) == 2)
+- /* DBCS can contain \ in a trail byte, copy the
+- * double-byte character to avoid escaping. */
+- *buf++ = *p++;
+- else
+- if (*p == '\\' || *p == '"')
+- *buf++ = '\\';
+- *buf++ = *p;
+- }
+- *buf = '"';
+- }
+-
+- break;
+- case 2: /* Quote and split (<f-args>) */
+- /* This is hard, so only do it once, and cache the result */
+- if (*split_buf == NULL)
+- *split_buf = uc_split_args(eap->arg, split_len);
+-
+- result = *split_len;
+- if (buf != NULL && result != 0)
+- STRCPY(buf, *split_buf);
+-
+- break;
+- }
+- break;
+-
+- case ct_BANG:
+- result = eap->forceit ? 1 : 0;
+- if (quote)
+- result += 2;
+- if (buf != NULL)
+- {
+- if (quote)
+- *buf++ = '"';
+- if (eap->forceit)
+- *buf++ = '!';
+- if (quote)
+- *buf = '"';
+- }
+- break;
+-
+- case ct_LINE1:
+- case ct_LINE2:
+- case ct_RANGE:
+- case ct_COUNT:
+- {
+- char num_buf[20];
+- long num = (type == ct_LINE1) ? eap->line1 :
+- (type == ct_LINE2) ? eap->line2 :
+- (type == ct_RANGE) ? eap->addr_count :
+- (eap->addr_count > 0) ? eap->line2 : cmd->uc_def;
+- size_t num_len;
+-
+- sprintf(num_buf, "%ld", num);
+- num_len = STRLEN(num_buf);
+- result = num_len;
+-
+- if (quote)
+- result += 2;
+-
+- if (buf != NULL)
+- {
+- if (quote)
+- *buf++ = '"';
+- STRCPY(buf, num_buf);
+- buf += num_len;
+- if (quote)
+- *buf = '"';
+- }
+-
+- break;
+- }
+-
+- case ct_MODS:
+- {
+- int multi_mods = 0;
+- typedef struct {
+- int *varp;
+- char *name;
+- } mod_entry_T;
+- static mod_entry_T mod_entries[] = {
+- #ifdef FEAT_BROWSE_CMD
+- {&cmdmod.browse, "browse"},
+- #endif
+- #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+- {&cmdmod.confirm, "confirm"},
+- #endif
+- {&cmdmod.hide, "hide"},
+- {&cmdmod.keepalt, "keepalt"},
+- {&cmdmod.keepjumps, "keepjumps"},
+- {&cmdmod.keepmarks, "keepmarks"},
+- {&cmdmod.keeppatterns, "keeppatterns"},
+- {&cmdmod.lockmarks, "lockmarks"},
+- {&cmdmod.noswapfile, "noswapfile"},
+- {NULL, NULL}
+- };
+- int i;
+-
+- result = quote ? 2 : 0;
+- if (buf != NULL)
+- {
+- if (quote)
+- *buf++ = '"';
+- *buf = '\0';
+- }
+-
+- /* :aboveleft and :leftabove */
+- if (cmdmod.split & WSP_ABOVE)
+- result += add_cmd_modifier(buf, "aboveleft", &multi_mods);
+- /* :belowright and :rightbelow */
+- if (cmdmod.split & WSP_BELOW)
+- result += add_cmd_modifier(buf, "belowright", &multi_mods);
+- /* :botright */
+- if (cmdmod.split & WSP_BOT)
+- result += add_cmd_modifier(buf, "botright", &multi_mods);
+-
+- /* the modifiers that are simple flags */
+- for (i = 0; mod_entries[i].varp != NULL; ++i)
+- if (*mod_entries[i].varp)
+- result += add_cmd_modifier(buf, mod_entries[i].name,
+- &multi_mods);
+-
+- /* TODO: How to support :noautocmd? */
+- #ifdef HAVE_SANDBOX
+- /* TODO: How to support :sandbox?*/
+- #endif
+- /* :silent */
+- if (msg_silent > 0)
+- result += add_cmd_modifier(buf,
+- emsg_silent > 0 ? "silent!" : "silent", &multi_mods);
+- /* :tab */
+- if (cmdmod.tab > 0)
+- result += add_cmd_modifier(buf, "tab", &multi_mods);
+- /* :topleft */
+- if (cmdmod.split & WSP_TOP)
+- result += add_cmd_modifier(buf, "topleft", &multi_mods);
+- /* TODO: How to support :unsilent?*/
+- /* :verbose */
+- if (p_verbose > 0)
+- result += add_cmd_modifier(buf, "verbose", &multi_mods);
+- /* :vertical */
+- if (cmdmod.split & WSP_VERT)
+- result += add_cmd_modifier(buf, "vertical", &multi_mods);
+- if (quote && buf != NULL)
+- {
+- buf += result - 2;
+- *buf = '"';
+- }
+- break;
+- }
+-
+- case ct_REGISTER:
+- result = eap->regname ? 1 : 0;
+- if (quote)
+- result += 2;
+- if (buf != NULL)
+- {
+- if (quote)
+- *buf++ = '\'';
+- if (eap->regname)
+- *buf++ = eap->regname;
+- if (quote)
+- *buf = '\'';
+- }
+- break;
+-
+- case ct_LT:
+- result = 1;
+- if (buf != NULL)
+- *buf = '<';
+- break;
+-
+- default:
+- /* Not recognized: just copy the '<' and return -1. */
+- result = (size_t)-1;
+- if (buf != NULL)
+- *buf = '<';
+- break;
+- }
+-
+- return result;
+- }
+-
+- static void
+- do_ucmd(exarg_T *eap)
+- {
+- char_u *buf;
+- char_u *p;
+- char_u *q;
+-
+- char_u *start;
+- char_u *end = NULL;
+- char_u *ksp;
+- size_t len, totlen;
+-
+- size_t split_len = 0;
+- char_u *split_buf = NULL;
+- ucmd_T *cmd;
+- #ifdef FEAT_EVAL
+- sctx_T save_current_sctx = current_sctx;
+- #endif
+-
+- if (eap->cmdidx == CMD_USER)
+- cmd = USER_CMD(eap->useridx);
+- else
+- cmd = USER_CMD_GA(&curbuf->b_ucmds, eap->useridx);
+-
+- /*
+- * Replace <> in the command by the arguments.
+- * First round: "buf" is NULL, compute length, allocate "buf".
+- * Second round: copy result into "buf".
+- */
+- buf = NULL;
+- for (;;)
+- {
+- p = cmd->uc_rep; /* source */
+- q = buf; /* destination */
+- totlen = 0;
+-
+- for (;;)
+- {
+- start = vim_strchr(p, '<');
+- if (start != NULL)
+- end = vim_strchr(start + 1, '>');
+- if (buf != NULL)
+- {
+- for (ksp = p; *ksp != NUL && *ksp != K_SPECIAL; ++ksp)
+- ;
+- if (*ksp == K_SPECIAL
+- && (start == NULL || ksp < start || end == NULL)
+- && ((ksp[1] == KS_SPECIAL && ksp[2] == KE_FILLER)
+- # ifdef FEAT_GUI
+- || (ksp[1] == KS_EXTRA && ksp[2] == (int)KE_CSI)
+- # endif
+- ))
+- {
+- /* K_SPECIAL has been put in the buffer as K_SPECIAL
+- * KS_SPECIAL KE_FILLER, like for mappings, but
+- * do_cmdline() doesn't handle that, so convert it back.
+- * Also change K_SPECIAL KS_EXTRA KE_CSI into CSI. */
+- len = ksp - p;
+- if (len > 0)
+- {
+- mch_memmove(q, p, len);
+- q += len;
+- }
+- *q++ = ksp[1] == KS_SPECIAL ? K_SPECIAL : CSI;
+- p = ksp + 3;
+- continue;
+- }
+- }
+-
+- /* break if no <item> is found */
+- if (start == NULL || end == NULL)
+- break;
+-
+- /* Include the '>' */
+- ++end;
+-
+- /* Take everything up to the '<' */
+- len = start - p;
+- if (buf == NULL)
+- totlen += len;
+- else
+- {
+- mch_memmove(q, p, len);
+- q += len;
+- }
+-
+- len = uc_check_code(start, end - start, q, cmd, eap,
+- &split_buf, &split_len);
+- if (len == (size_t)-1)
+- {
+- /* no match, continue after '<' */
+- p = start + 1;
+- len = 1;
+- }
+- else
+- p = end;
+- if (buf == NULL)
+- totlen += len;
+- else
+- q += len;
+- }
+- if (buf != NULL) /* second time here, finished */
+- {
+- STRCPY(q, p);
+- break;
+- }
+-
+- totlen += STRLEN(p); /* Add on the trailing characters */
+- buf = alloc((unsigned)(totlen + 1));
+- if (buf == NULL)
+- {
+- vim_free(split_buf);
+- return;
+- }
+- }
+-
+- #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);
+- }
+-
+- # if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+- static char_u *
+- get_user_command_name(int idx)
+- {
+- return get_user_commands(NULL, idx - (int)CMD_SIZE);
+- }
+-
+- /*
+- * Function given to ExpandGeneric() to obtain the list of user command names.
+- */
+- char_u *
+- get_user_commands(expand_T *xp UNUSED, int idx)
+- {
+- if (idx < curbuf->b_ucmds.ga_len)
+- return USER_CMD_GA(&curbuf->b_ucmds, idx)->uc_name;
+- idx -= curbuf->b_ucmds.ga_len;
+- if (idx < ucmds.ga_len)
+- return USER_CMD(idx)->uc_name;
+- return NULL;
+- }
+-
+- /*
+- * Function given to ExpandGeneric() to obtain the list of user address type names.
+- */
+- char_u *
+- get_user_cmd_addr_type(expand_T *xp UNUSED, int idx)
+- {
+- return (char_u *)addr_type_complete[idx].name;
+- }
+-
+- /*
+- * Function given to ExpandGeneric() to obtain the list of user command
+- * attributes.
+- */
+- char_u *
+- get_user_cmd_flags(expand_T *xp UNUSED, int idx)
+- {
+- static char *user_cmd_flags[] =
+- {"addr", "bang", "bar", "buffer", "complete",
+- "count", "nargs", "range", "register"};
+-
+- if (idx >= (int)(sizeof(user_cmd_flags) / sizeof(user_cmd_flags[0])))
+- return NULL;
+- return (char_u *)user_cmd_flags[idx];
+- }
+-
+- /*
+- * Function given to ExpandGeneric() to obtain the list of values for -nargs.
+- */
+- char_u *
+- get_user_cmd_nargs(expand_T *xp UNUSED, int idx)
+- {
+- static char *user_cmd_nargs[] = {"0", "1", "*", "?", "+"};
+-
+- if (idx >= (int)(sizeof(user_cmd_nargs) / sizeof(user_cmd_nargs[0])))
+- return NULL;
+- return (char_u *)user_cmd_nargs[idx];
+- }
+-
+- /*
+- * Function given to ExpandGeneric() to obtain the list of values for -complete.
+- */
+- char_u *
+- get_user_cmd_complete(expand_T *xp UNUSED, int idx)
+- {
+- return (char_u *)command_complete[idx].name;
+- }
+- # endif /* FEAT_CMDL_COMPL */
+-
+- /*
+- * Parse address type argument
+- */
+- int
+- parse_addr_type_arg(
+- char_u *value,
+- int vallen,
+- long *argt,
+- int *addr_type_arg)
+- {
+- int i, a, b;
+-
+- for (i = 0; addr_type_complete[i].expand != -1; ++i)
+- {
+- a = (int)STRLEN(addr_type_complete[i].name) == vallen;
+- b = STRNCMP(value, addr_type_complete[i].name, vallen) == 0;
+- if (a && b)
+- {
+- *addr_type_arg = addr_type_complete[i].expand;
+- break;
+- }
+- }
+-
+- if (addr_type_complete[i].expand == -1)
+- {
+- char_u *err = value;
+-
+- for (i = 0; err[i] != NUL && !VIM_ISWHITE(err[i]); i++)
+- ;
+- err[i] = NUL;
+- semsg(_("E180: Invalid address type value: %s"), err);
+- return FAIL;
+- }
+-
+- if (*addr_type_arg != ADDR_LINES)
+- *argt |= NOTADR;
+-
+- return OK;
+- }
+-
+- #endif /* FEAT_USR_CMDS */
+-
+- #if defined(FEAT_USR_CMDS) || defined(FEAT_EVAL) || defined(PROTO)
+- /*
+- * Parse a completion argument "value[vallen]".
+- * The detected completion goes in "*complp", argument type in "*argt".
+- * When there is an argument, for function and user defined completion, it's
+- * copied to allocated memory and stored in "*compl_arg".
+- * Returns FAIL if something is wrong.
+- */
+- int
+- parse_compl_arg(
+- char_u *value,
+- int vallen,
+- int *complp,
+- long *argt,
+- char_u **compl_arg UNUSED)
+- {
+- char_u *arg = NULL;
+- # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+- size_t arglen = 0;
+- # endif
+- int i;
+- int valend = vallen;
+-
+- /* Look for any argument part - which is the part after any ',' */
+- for (i = 0; i < vallen; ++i)
+- {
+- if (value[i] == ',')
+- {
+- arg = &value[i + 1];
+- # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+- arglen = vallen - i - 1;
+- # endif
+- valend = i;
+- break;
+- }
+- }
+-
+- for (i = 0; command_complete[i].expand != 0; ++i)
+- {
+- if ((int)STRLEN(command_complete[i].name) == valend
+- && STRNCMP(value, command_complete[i].name, valend) == 0)
+- {
+- *complp = command_complete[i].expand;
+- if (command_complete[i].expand == EXPAND_BUFFERS)
+- *argt |= BUFNAME;
+- else if (command_complete[i].expand == EXPAND_DIRECTORIES
+- || command_complete[i].expand == EXPAND_FILES)
+- *argt |= XFILE;
+- break;
+- }
+- }
+-
+- if (command_complete[i].expand == 0)
+- {
+- semsg(_("E180: Invalid complete value: %s"), value);
+- return FAIL;
+- }
+-
+- # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+- if (*complp != EXPAND_USER_DEFINED && *complp != EXPAND_USER_LIST
+- && arg != NULL)
+- # else
+- if (arg != NULL)
+- # endif
+- {
+- emsg(_("E468: Completion argument only allowed for custom completion"));
+- return FAIL;
+- }
+-
+- # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+- if ((*complp == EXPAND_USER_DEFINED || *complp == EXPAND_USER_LIST)
+- && arg == NULL)
+- {
+- emsg(_("E467: Custom completion requires a function argument"));
+- return FAIL;
+- }
+-
+- if (arg != NULL)
+- *compl_arg = vim_strnsave(arg, (int)arglen);
+- # endif
+- return OK;
+- }
+-
+- int
+- cmdcomplete_str_to_type(char_u *complete_str)
+- {
+- int i;
+-
+- for (i = 0; command_complete[i].expand != 0; ++i)
+- if (STRCMP(complete_str, command_complete[i].name) == 0)
+- return command_complete[i].expand;
+-
+- return EXPAND_NOTHING;
+- }
+- #endif
+-
+ static void
+ ex_colorscheme(exarg_T *eap)
+ {
+--- 5549,5559 ----
+*** ../vim-8.1.1209/src/proto/ex_docmd.pro 2019-01-13 23:38:33.407773189 +0100
+--- src/proto/ex_docmd.pro 2019-04-26 23:39:53.321890880 +0200
+***************
+*** 19,34 ****
+ char_u *find_nextcmd(char_u *p);
+ char_u *check_nextcmd(char_u *p);
+ char_u *get_command_name(expand_T *xp, int idx);
+- void ex_comclear(exarg_T *eap);
+- void uc_clear(garray_T *gap);
+- char_u *get_user_commands(expand_T *xp, int idx);
+- char_u *get_user_cmd_addr_type(expand_T *xp, int idx);
+- char_u *get_user_cmd_flags(expand_T *xp, int idx);
+- char_u *get_user_cmd_nargs(expand_T *xp, int idx);
+- char_u *get_user_cmd_complete(expand_T *xp, int idx);
+- int parse_addr_type_arg(char_u *value, int vallen, long *argt, int *addr_type_arg);
+- int parse_compl_arg(char_u *value, int vallen, int *complp, long *argt, char_u **compl_arg);
+- int cmdcomplete_str_to_type(char_u *complete_str);
+ void not_exiting(void);
+ void tabpage_close(int forceit);
+ void tabpage_close_other(tabpage_T *tp, int forceit);
+--- 19,24 ----
+*** ../vim-8.1.1209/src/ex_getln.c 2019-04-11 13:45:53.125298538 +0200
+--- src/ex_getln.c 2019-04-26 23:26:22.726894948 +0200
+***************
+*** 111,117 ****
+ # ifdef FEAT_CMDHIST
+ static char_u *get_history_arg(expand_T *xp, int idx);
+ # endif
+! # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL)
+ static int ExpandUserDefined(expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file);
+ static int ExpandUserList(expand_T *xp, int *num_file, char_u ***file);
+ # endif
+--- 111,117 ----
+ # ifdef FEAT_CMDHIST
+ static char_u *get_history_arg(expand_T *xp, int idx);
+ # endif
+! # if defined(FEAT_EVAL)
+ static int ExpandUserDefined(expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file);
+ static int ExpandUserList(expand_T *xp, int *num_file, char_u ***file);
+ # endif
+***************
+*** 939,945 ****
+ {
+ xpc.xp_context = ccline.xp_context;
+ xpc.xp_pattern = ccline.cmdbuff;
+! # if defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)
+ xpc.xp_arg = ccline.xp_arg;
+ # endif
+ }
+--- 939,945 ----
+ {
+ xpc.xp_context = ccline.xp_context;
+ xpc.xp_pattern = ccline.cmdbuff;
+! # if defined(FEAT_CMDL_COMPL)
+ xpc.xp_arg = ccline.xp_arg;
+ # endif
+ }
+***************
+*** 4210,4216 ****
+ #endif
+ xp->xp_numfiles = -1;
+ xp->xp_files = NULL;
+! #if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+ xp->xp_arg = NULL;
+ #endif
+ xp->xp_line = NULL;
+--- 4210,4216 ----
+ #endif
+ xp->xp_numfiles = -1;
+ xp->xp_files = NULL;
+! #if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+ xp->xp_arg = NULL;
+ #endif
+ xp->xp_line = NULL;
+***************
+*** 4879,4885 ****
+ {
+ xp->xp_context = ccline.xp_context;
+ xp->xp_pattern = ccline.cmdbuff;
+! # if defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)
+ xp->xp_arg = ccline.xp_arg;
+ # endif
+ }
+--- 4879,4885 ----
+ {
+ xp->xp_context = ccline.xp_context;
+ xp->xp_pattern = ccline.cmdbuff;
+! # if defined(FEAT_CMDL_COMPL)
+ xp->xp_arg = ccline.xp_arg;
+ # endif
+ }
+***************
+*** 5130,5136 ****
+ char *directories[] = {"syntax", "indent", "ftplugin", NULL};
+ return ExpandRTDir(pat, 0, num_file, file, directories);
+ }
+! # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL)
+ if (xp->xp_context == EXPAND_USER_LIST)
+ return ExpandUserList(xp, num_file, file);
+ # endif
+--- 5130,5136 ----
+ char *directories[] = {"syntax", "indent", "ftplugin", NULL};
+ return ExpandRTDir(pat, 0, num_file, file, directories);
+ }
+! # if defined(FEAT_EVAL)
+ if (xp->xp_context == EXPAND_USER_LIST)
+ return ExpandUserList(xp, num_file, file);
+ # endif
+***************
+*** 5149,5155 ****
+ ret = ExpandSettings(xp, &regmatch, num_file, file);
+ else if (xp->xp_context == EXPAND_MAPPINGS)
+ ret = ExpandMappings(&regmatch, num_file, file);
+! # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL)
+ else if (xp->xp_context == EXPAND_USER_DEFINED)
+ ret = ExpandUserDefined(xp, &regmatch, num_file, file);
+ # endif
+--- 5149,5155 ----
+ ret = ExpandSettings(xp, &regmatch, num_file, file);
+ else if (xp->xp_context == EXPAND_MAPPINGS)
+ ret = ExpandMappings(&regmatch, num_file, file);
+! # if defined(FEAT_EVAL)
+ else if (xp->xp_context == EXPAND_USER_DEFINED)
+ ret = ExpandUserDefined(xp, &regmatch, num_file, file);
+ # endif
+***************
+*** 5170,5182 ****
+ #ifdef FEAT_CMDHIST
+ {EXPAND_HISTORY, get_history_arg, TRUE, TRUE},
+ #endif
+- #ifdef FEAT_USR_CMDS
+ {EXPAND_USER_COMMANDS, get_user_commands, FALSE, TRUE},
+ {EXPAND_USER_ADDR_TYPE, get_user_cmd_addr_type, FALSE, TRUE},
+ {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE, TRUE},
+ {EXPAND_USER_NARGS, get_user_cmd_nargs, FALSE, TRUE},
+ {EXPAND_USER_COMPLETE, get_user_cmd_complete, FALSE, TRUE},
+- #endif
+ #ifdef FEAT_EVAL
+ {EXPAND_USER_VARS, get_user_var_name, FALSE, TRUE},
+ {EXPAND_FUNCTIONS, get_function_name, FALSE, TRUE},
+--- 5170,5180 ----
+***************
+*** 5473,5479 ****
+ }
+
+
+! # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL)
+ /*
+ * Call "user_expand_func()" to invoke a user defined Vim script function and
+ * return the result (either a string or a List).
+--- 5471,5477 ----
+ }
+
+
+! # if defined(FEAT_EVAL)
+ /*
+ * Call "user_expand_func()" to invoke a user defined Vim script function and
+ * return the result (either a string or a List).
+*** ../vim-8.1.1209/src/feature.h 2019-03-30 21:19:16.426170240 +0100
+--- src/feature.h 2019-04-26 23:27:34.074374224 +0200
+***************
+*** 379,388 ****
+
+ /*
+ * +user_commands Allow the user to define his own commands.
+ */
+- #ifdef FEAT_NORMAL
+- # define FEAT_USR_CMDS
+- #endif
+
+ /*
+ * +printer ":hardcopy" command
+--- 379,386 ----
+
+ /*
+ * +user_commands Allow the user to define his own commands.
++ * Now always enabled.
+ */
+
+ /*
+ * +printer ":hardcopy" command
+*** ../vim-8.1.1209/src/macros.h 2019-03-30 18:46:57.356077354 +0100
+--- src/macros.h 2019-04-26 23:12:15.806808513 +0200
+***************
+*** 336,338 ****
+--- 336,341 ----
+ (p) = NULL; \
+ } \
+ } while (0)
++
++ /* Wether a command index indicates a user command. */
++ #define IS_USER_CMDIDX(idx) ((int)(idx) < 0)
+*** ../vim-8.1.1209/src/misc2.c 2019-03-30 13:53:26.174425093 +0100
+--- src/misc2.c 2019-04-26 23:51:39.458250238 +0200
+***************
+*** 1082,1091 ****
+ ui_remove_balloon();
+ # endif
+
+! # if defined(FEAT_USR_CMDS)
+! /* Clear user commands (before deleting buffers). */
+ ex_comclear(NULL);
+- # endif
+
+ # ifdef FEAT_MENU
+ /* Clear menus. */
+--- 1082,1089 ----
+ ui_remove_balloon();
+ # endif
+
+! // Clear user commands (before deleting buffers).
+ ex_comclear(NULL);
+
+ # ifdef FEAT_MENU
+ /* Clear menus. */
+***************
+*** 1130,1136 ****
+--- 1128,1136 ----
+ free_search_patterns();
+ free_old_sub();
+ free_last_insert();
++ # if defined(FEAT_INS_EXPAND)
+ free_insexpand_stuff();
++ # endif
+ free_prev_shellcmd();
+ free_regexp_stuff();
+ free_tag_stuff();
+*** ../vim-8.1.1209/src/proto.h 2019-04-21 11:34:36.335256531 +0200
+--- src/proto.h 2019-04-26 23:05:42.872538740 +0200
+***************
+*** 227,232 ****
+--- 227,233 ----
+ # endif
+ # include "ui.pro"
+ # include "undo.pro"
++ # include "usercmd.pro"
+ # include "userfunc.pro"
+ # include "version.pro"
+ # include "window.pro"
+*** ../vim-8.1.1209/src/structs.h 2019-04-25 22:21:56.931749183 +0200
+--- src/structs.h 2019-04-26 23:28:26.458006469 +0200
+***************
+*** 549,555 ****
+ int xp_context; /* type of expansion */
+ char_u *xp_pattern; /* start of item to expand */
+ 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
+--- 549,555 ----
+ int xp_context; /* type of expansion */
+ char_u *xp_pattern; /* start of item to expand */
+ int xp_pattern_len; /* bytes in xp_pattern before cursor */
+! #if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+ char_u *xp_arg; /* completion function */
+ sctx_T xp_script_ctx; /* SCTX for completion function */
+ #endif
+***************
+*** 2143,2152 ****
+ /* First abbreviation local to a buffer. */
+ mapblock_T *b_first_abbr;
+ #endif
+! #ifdef FEAT_USR_CMDS
+! /* User commands local to the buffer. */
+ garray_T b_ucmds;
+- #endif
+ /*
+ * start and end of an operator, also used for '[ and ']
+ */
+--- 2143,2150 ----
+ /* First abbreviation local to a buffer. */
+ mapblock_T *b_first_abbr;
+ #endif
+! // User commands local to the buffer.
+ garray_T b_ucmds;
+ /*
+ * start and end of an operator, also used for '[ and ']
+ */
+*** ../vim-8.1.1209/src/version.c 2019-04-26 22:33:44.896723710 +0200
+--- src/version.c 2019-04-26 23:33:32.156048100 +0200
+***************
+*** 672,682 ****
+ #else
+ "-toolbar",
+ #endif
+- #ifdef FEAT_USR_CMDS
+ "+user_commands",
+- #else
+- "-user_commands",
+- #endif
+ #ifdef FEAT_VARTABS
+ "+vartabs",
+ #else
+--- 672,678 ----
+*** ../vim-8.1.1209/runtime/doc/eval.txt 2019-04-20 14:39:42.796386124 +0200
+--- runtime/doc/eval.txt 2019-04-27 12:38:38.744951183 +0200
+***************
+*** 10491,10497 ****
+ ttyout output is a terminal (tty)
+ unix Unix version of Vim. *+unix*
+ unnamedplus Compiled with support for "unnamedplus" in 'clipboard'
+! user_commands User-defined commands.
+ vcon Win32: Virtual console support is working, can use
+ 'termguicolors'. Also see |+vtp|.
+ vertsplit Compiled with vertically split windows |:vsplit|.
+--- 10550,10556 ----
+ ttyout output is a terminal (tty)
+ unix Unix version of Vim. *+unix*
+ unnamedplus Compiled with support for "unnamedplus" in 'clipboard'
+! user_commands User-defined commands. (always true)
+ vcon Win32: Virtual console support is working, can use
+ 'termguicolors'. Also see |+vtp|.
+ vertsplit Compiled with vertically split windows |:vsplit|.
+***************
+*** 10501,10506 ****
+--- 10560,10566 ----
+ viminfo Compiled with viminfo support.
+ vimscript-1 Compiled Vim script version 1 support
+ vimscript-2 Compiled Vim script version 2 support
++ vimscript-3 Compiled Vim script version 3 support
+ virtualedit Compiled with 'virtualedit' option. (always true)
+ visual Compiled with Visual mode. (always true)
+ visualextra Compiled with extra Visual mode commands. (always
+***************
+*** 12700,12706 ****
+
+ These items are not allowed in the sandbox:
+ - changing the buffer text
+! - defining or changing mapping, autocommands, functions, user commands
+ - setting certain options (see |option-summary|)
+ - setting certain v: variables (see |v:var|) *E794*
+ - executing a shell command
+--- 12771,12777 ----
+
+ These items are not allowed in the sandbox:
+ - changing the buffer text
+! - defining or changing mapping, autocommands, user commands
+ - setting certain options (see |option-summary|)
+ - setting certain v: variables (see |v:var|) *E794*
+ - executing a shell command
+*** ../vim-8.1.1209/runtime/doc/various.txt 2019-01-11 14:37:16.689248837 +0100
+--- runtime/doc/various.txt 2019-04-27 12:40:20.376390811 +0200
+***************
+*** 458,464 ****
+ N *+timers* the |timer_start()| function
+ N *+title* Setting the window 'title' and 'icon'
+ N *+toolbar* |gui-toolbar|
+! N *+user_commands* User-defined commands. |user-commands|
+ B *+vartabs* Variable-width tabstops. |'vartabstop'|
+ N *+viminfo* |'viminfo'|
+ *+vertsplit* Vertically split windows |:vsplit|; Always enabled
+--- 456,463 ----
+ N *+timers* the |timer_start()| function
+ N *+title* Setting the window 'title' and 'icon'
+ N *+toolbar* |gui-toolbar|
+! T *+user_commands* User-defined commands. |user-commands|
+! Always enabled since 8.1.1210.
+ B *+vartabs* Variable-width tabstops. |'vartabstop'|
+ N *+viminfo* |'viminfo'|
+ *+vertsplit* Vertically split windows |:vsplit|; Always enabled
+*** ../vim-8.1.1209/src/version.c 2019-04-26 22:33:44.896723710 +0200
+--- src/version.c 2019-04-26 23:33:32.156048100 +0200
+***************
+*** 773,774 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1210,
+ /**/
+
+--
+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.1211 b/data/vim/patches/8.1.1211
new file mode 100644
index 000000000..2b83adb9b
--- /dev/null
+++ b/data/vim/patches/8.1.1211
@@ -0,0 +1,161 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1211
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1211
+Problem: Not all user command code is tested.
+Solution: Add more tests.
+Files: src/testdir/test_usercommands.vim
+
+
+*** ../vim-8.1.1210/src/testdir/test_usercommands.vim 2019-04-25 22:42:02.313959805 +0200
+--- src/testdir/test_usercommands.vim 2019-04-27 15:04:04.256811206 +0200
+***************
+*** 73,78 ****
+--- 73,169 ----
+ unlet g:mods
+ endfunction
+
++ func SaveCmdArgs(...)
++ let g:args = a:000
++ endfunc
++
++ func Test_f_args()
++ command -nargs=* TestFArgs call SaveCmdArgs(<f-args>)
++
++ TestFArgs
++ call assert_equal([], g:args)
++
++ TestFArgs one two three
++ call assert_equal(['one', 'two', 'three'], g:args)
++
++ TestFArgs one\\two three
++ call assert_equal(['one\two', 'three'], g:args)
++
++ TestFArgs one\ two three
++ call assert_equal(['one two', 'three'], g:args)
++
++ TestFArgs one\"two three
++ call assert_equal(['one\"two', 'three'], g:args)
++
++ delcommand TestFArgs
++ endfunc
++
++ func Test_q_args()
++ command -nargs=* TestQArgs call SaveCmdArgs(<q-args>)
++
++ TestQArgs
++ call assert_equal([''], g:args)
++
++ TestQArgs one two three
++ call assert_equal(['one two three'], g:args)
++
++ TestQArgs one\\two three
++ call assert_equal(['one\\two three'], g:args)
++
++ TestQArgs one\ two three
++ call assert_equal(['one\ two three'], g:args)
++
++ TestQArgs one\"two three
++ call assert_equal(['one\"two three'], g:args)
++
++ delcommand TestQArgs
++ endfunc
++
++ func Test_reg_arg()
++ command -nargs=* -reg TestRegArg call SaveCmdArgs("<reg>", "<register>")
++
++ TestRegArg
++ call assert_equal(['', ''], g:args)
++
++ TestRegArg x
++ call assert_equal(['x', 'x'], g:args)
++
++ delcommand TestRegArg
++ endfunc
++
++ func Test_no_arg()
++ command -nargs=* TestNoArg call SaveCmdArgs("<args>", "<>", "<x>", "<lt>")
++
++ TestNoArg
++ call assert_equal(['', '<>', '<x>', '<'], g:args)
++
++ TestNoArg one
++ call assert_equal(['one', '<>', '<x>', '<'], g:args)
++
++ delcommand TestNoArg
++ endfunc
++
++ func Test_range_arg()
++ command -range TestRangeArg call SaveCmdArgs(<range>, <line1>, <line2>)
++ new
++ call setline(1, range(100))
++ let lnum = line('.')
++
++ TestRangeArg
++ call assert_equal([0, lnum, lnum], g:args)
++
++ 99TestRangeArg
++ call assert_equal([1, 99, 99], g:args)
++
++ 88,99TestRangeArg
++ call assert_equal([2, 88, 99], g:args)
++
++ call assert_fails('102TestRangeArg', 'E16:')
++
++ bwipe!
++ delcommand TestRangeArg
++ endfunc
++
+ func Test_Ambiguous()
+ command Doit let g:didit = 'yes'
+ command Dothat let g:didthat = 'also'
+***************
+*** 88,93 ****
+--- 179,186 ----
+ Do
+ call assert_equal('also', g:didthat)
+ delcommand Dothat
++
++ call assert_fails("\x4ei\041", ' you demand a ')
+ endfunc
+
+ func Test_redefine_on_reload()
+***************
+*** 139,144 ****
+--- 232,238 ----
+ call assert_fails('com! - DoCmd :', 'E175:')
+ call assert_fails('com! -xxx DoCmd :', 'E181:')
+ call assert_fails('com! -addr DoCmd :', 'E179:')
++ call assert_fails('com! -addr=asdf DoCmd :', 'E180:')
+ call assert_fails('com! -complete DoCmd :', 'E179:')
+ call assert_fails('com! -complete=xxx DoCmd :', 'E180:')
+ call assert_fails('com! -complete=custom DoCmd :', 'E467:')
+*** ../vim-8.1.1210/src/version.c 2019-04-27 13:03:20.012715914 +0200
+--- src/version.c 2019-04-27 14:03:48.652580023 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1211,
+ /**/
+
+--
+DEAD PERSON: I don't want to go in the cart!
+CUSTOMER: Oh, don't be such a baby.
+MORTICIAN: I can't take him...
+DEAD PERSON: I feel fine!
+CUSTOMER: Oh, do us a favor...
+MORTICIAN: I can't.
+ 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.1212 b/data/vim/patches/8.1.1212
new file mode 100644
index 000000000..c402af496
--- /dev/null
+++ b/data/vim/patches/8.1.1212
@@ -0,0 +1,148 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1212
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1212
+Problem: Signal PWR is not tested.
+Solution: Test that PWR updates the swap file. (Dominique Pelle,
+ closes #4312)
+Files: src/testdir/test_signals.vim
+
+
+*** ../vim-8.1.1211/src/testdir/test_signals.vim 2019-04-02 21:45:38.260326643 +0200
+--- src/testdir/test_signals.vim 2019-04-27 17:30:53.055172109 +0200
+***************
+*** 4,21 ****
+ finish
+ endif
+
+- if has('gui_running')
+- " Signals only work for terminals, and won't work for GUI.
+- finish
+- endif
+-
+ source shared.vim
+
+ " Test signal WINCH (window resize signal)
+ func Test_signal_WINCH()
+! let signals = system('kill -l')
+! if signals !~ '\<WINCH\>'
+! " signal WINCH is not available, skip the test.
+ return
+ endif
+
+--- 4,20 ----
+ finish
+ endif
+
+ source shared.vim
+
++ " Check whether a signal is available on this system.
++ func HasSignal(signal)
++ let signals = system('kill -l')
++ return signals =~# '\<' .. a:signal .. '\>'
++ endfunc
++
+ " Test signal WINCH (window resize signal)
+ func Test_signal_WINCH()
+! if has('gui_running') || !HasSignal('WINCH')
+ return
+ endif
+
+***************
+*** 31,45 ****
+ let new_lines = &lines - 2
+ let new_columns = &columns - 2
+
+! exe 'set lines=' . new_lines
+! exe 'set columns=' . new_columns
+ call assert_equal(new_lines, &lines)
+ call assert_equal(new_columns, &columns)
+
+ " Send signal and wait for signal to be processed.
+ " 'lines' and 'columns' should have been restored
+ " after handing signal WINCH.
+! exe 'silent !kill -s WINCH ' . getpid()
+ call WaitForAssert({-> assert_equal(old_lines, &lines)})
+ call assert_equal(old_columns, &columns)
+
+--- 30,44 ----
+ let new_lines = &lines - 2
+ let new_columns = &columns - 2
+
+! exe 'set lines=' .. new_lines
+! exe 'set columns=' .. new_columns
+ call assert_equal(new_lines, &lines)
+ call assert_equal(new_columns, &columns)
+
+ " Send signal and wait for signal to be processed.
+ " 'lines' and 'columns' should have been restored
+ " after handing signal WINCH.
+! exe 'silent !kill -s WINCH ' .. getpid()
+ call WaitForAssert({-> assert_equal(old_lines, &lines)})
+ call assert_equal(old_columns, &columns)
+
+***************
+*** 47,49 ****
+--- 46,77 ----
+ let &t_WS = old_WS
+ endif
+ endfunc
++
++ " Test signal PWR, which should update the swap file.
++ func Test_signal_PWR()
++ if !HasSignal('PWR')
++ return
++ endif
++
++ " Set a very large 'updatetime' and 'updatecount', so that we can be sure
++ " that swap file is updated as a result of sending PWR signal, and not
++ " because of exceeding 'updatetime' or 'updatecount' when changing buffer.
++ set updatetime=100000 updatecount=100000
++ new Xtest_signal_PWR
++ let swap_name = swapname('%')
++ call setline(1, '123')
++ preserve
++ let swap_content = readfile(swap_name, 'b')
++
++ " Update the buffer and check that the swap file is not yet updated,
++ " since we set 'updatetime' and 'updatecount' to large values.
++ call setline(1, 'abc')
++ call assert_equal(swap_content, readfile(swap_name, 'b'))
++
++ " Sending PWR signal should update the swap file.
++ exe 'silent !kill -s PWR ' .. getpid()
++ call WaitForAssert({-> assert_notequal(swap_content, readfile(swap_name, 'b'))})
++
++ bwipe!
++ set updatetime& updatecount&
++ endfunc
+*** ../vim-8.1.1211/src/version.c 2019-04-27 15:05:04.528816589 +0200
+--- src/version.c 2019-04-27 17:31:56.794872746 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1212,
+ /**/
+
+--
+CUSTOMER: You're not fooling anyone y'know. Look, isn't there something
+ you can do?
+DEAD PERSON: I feel happy... I feel happy.
+ [whop]
+CUSTOMER: Ah, thanks very much.
+MORTICIAN: Not at all. See you on Thursday.
+CUSTOMER: Right.
+ 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.1213 b/data/vim/patches/8.1.1213
new file mode 100644
index 000000000..57e5e0043
--- /dev/null
+++ b/data/vim/patches/8.1.1213
@@ -0,0 +1,106 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1213
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1213
+Problem: "make clean" in top dir does not cleanup indent test output.
+Solution: Clean the indent test output. Do not rely on the vim executable
+ for that. (closes #4307)
+Files: Makefile, runtime/indent/Makefile,
+ runtime/indent/testdir/cleantest.vim
+
+
+*** ../vim-8.1.1212/Makefile 2019-01-10 21:49:51.982405995 +0100
+--- Makefile 2019-04-27 17:49:00.718230799 +0200
+***************
+*** 43,55 ****
+ @if test "$@" = "test"; then \
+ $(MAKE) indenttest; \
+ fi
+
+ # Executable used for running the indent tests.
+ VIM_FOR_INDENTTEST = ../../src/vim
+
+ indenttest:
+ cd runtime/indent && \
+! $(MAKE) clean VIM="$(VIM_FOR_INDENTTEST)" && \
+ $(MAKE) test VIM="$(VIM_FOR_INDENTTEST)"
+
+
+--- 43,60 ----
+ @if test "$@" = "test"; then \
+ $(MAKE) indenttest; \
+ fi
++ @# When the target is "clean" also clean for the indent tests.
++ @if test "$@" = "clean" -o "$@" = "distclean" -o "$@" = "testclean"; then \
++ cd runtime/indent && \
++ $(MAKE) clean; \
++ fi
+
+ # Executable used for running the indent tests.
+ VIM_FOR_INDENTTEST = ../../src/vim
+
+ indenttest:
+ cd runtime/indent && \
+! $(MAKE) clean && \
+ $(MAKE) test VIM="$(VIM_FOR_INDENTTEST)"
+
+
+*** ../vim-8.1.1212/runtime/indent/Makefile 2018-12-10 21:36:52.869487030 +0100
+--- runtime/indent/Makefile 2019-04-27 17:53:53.928891963 +0200
+***************
+*** 11,14 ****
+
+
+ clean:
+! VIMRUNTIME=$(VIMRUNTIME) $(VIM) --clean --not-a-term -u testdir/cleantest.vim
+--- 11,14 ----
+
+
+ clean:
+! rm -f testdir/*.fail testdir/*.out
+*** ../vim-8.1.1212/runtime/indent/testdir/cleantest.vim 2018-12-15 17:43:38.870899928 +0100
+--- runtime/indent/testdir/cleantest.vim 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,11 ****
+- " Only do this with the +eval feature
+- if 1
+-
+- " 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
+-
+- endif
+-
+- quit
+--- 0 ----
+*** ../vim-8.1.1212/src/version.c 2019-04-27 17:32:36.390686708 +0200
+--- src/version.c 2019-04-27 17:56:54.892058689 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1213,
+ /**/
+
+--
+ [clop clop]
+ARTHUR: Old woman!
+DENNIS: Man!
+ARTHUR: Man, sorry. What knight lives in that castle over there?
+DENNIS: I'm thirty seven.
+ARTHUR: What?
+DENNIS: I'm thirty seven -- I'm not old!
+ 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.1214 b/data/vim/patches/8.1.1214
new file mode 100644
index 000000000..f2212da20
--- /dev/null
+++ b/data/vim/patches/8.1.1214
@@ -0,0 +1,486 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1214
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1214
+Problem: Old style tests.
+Solution: Move tests from test14 to new style test files. (Yegappan
+ Lakshmanan, closes #4308)
+Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
+ src/testdir/test14.in, src/testdir/test14.ok,
+ src/testdir/test_edit.vim, src/testdir/test_normal.vim,
+ src/testdir/test_search.vim, src/testdir/test_substitute.vim,
+ src/testdir/test_visual.vim
+
+
+*** ../vim-8.1.1213/src/Makefile 2019-04-27 13:03:20.000715982 +0200
+--- src/Makefile 2019-04-27 17:35:39.801824116 +0200
+***************
+*** 2175,2181 ****
+ # These do not depend on the executable, compile it when needed.
+ test1 \
+ test_eval \
+! test3 test14 test17 \
+ test29 test30 test37 test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+--- 2175,2181 ----
+ # These do not depend on the executable, compile it when needed.
+ test1 \
+ test_eval \
+! test3 test17 \
+ test29 test30 test37 test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+*** ../vim-8.1.1213/src/testdir/Make_all.mak 2019-04-25 20:28:53.327979592 +0200
+--- src/testdir/Make_all.mak 2019-04-27 17:35:39.801824116 +0200
+***************
+*** 14,20 ****
+ # Tests that run on all systems.
+ SCRIPTS_ALL = \
+ test3.out \
+- test14.out \
+ test29.out \
+ test37.out \
+ test39.out \
+--- 14,19 ----
+*** ../vim-8.1.1213/src/testdir/Make_vms.mms 2019-04-25 20:28:53.327979592 +0200
+--- src/testdir/Make_vms.mms 2019-04-27 17:35:39.805824096 +0200
+***************
+*** 74,80 ****
+ .SUFFIXES : .out .in
+
+ SCRIPT = test1.out test3.out \
+- test14.out \
+ test29.out \
+ test30.out test37.out test39.out \
+ test42.out test44.out test48.out test49.out \
+--- 74,79 ----
+*** ../vim-8.1.1213/src/testdir/test14.in 2017-03-08 22:48:59.000000000 +0100
+--- src/testdir/test14.in 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,100 ****
+- Tests for "vaBiB", end could be wrong.
+- Also test ":s/pat/sub/" with different ~s in sub.
+- Also test for ^Vxff and ^Vo123 in Insert mode.
+- Also test "[m", "]m", "[M" and "]M"
+- Also test search()
+-
+- STARTTEST
+- :so small.vim
+- :set belloff=all
+- /Start cursor here
+- vaBiBD:?Bug?,/Piece/-2w! test.out
+- /^- Bug
+- :s/u/~u~/
+- :s/i/~u~/
+- :s/o/~~~/
+- :.w >>test.out
+- :if has("ebcdic")
+- : let tt = "o\<C-V>193\<C-V>xc2\<C-V>o303 \<C-V>90a\<C-V>xfg\<C-V>o578\<Esc>"
+- :else
+- : let tt = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>"
+- :endif
+- :exe "normal " . tt
+- :unlet tt
+- :.w >>test.out
+- :set vb
+- /^Piece
+- 2]maA:.w >>test.out
+- j]maB:.w >>test.out
+- ]maC:.w >>test.out
+- [maD:.w >>test.out
+- k2[maE:.w >>test.out
+- 3[maF:.w >>test.out
+- ]MaG:.w >>test.out
+- j2]MaH:.w >>test.out
+- ]M]MaI:.w >>test.out
+- 2[MaJ:.w >>test.out
+- k[MaK:.w >>test.out
+- 3[MaL:.w >>test.out
+- :"
+- /^foobar
+- :let startline = line('.')
+- :call search('foobar', 'c')
+- :call append(line('$'), line('.') - startline)
+- j:call search('^$', 'c')
+- :call append(line('$'), line('.') - startline)
+- :call search('^$', 'bc')
+- :call append(line('$'), line('.') - startline)
+- /two
+- :call search('.', 'c')
+- :call append(line('$'), getline('.')[col('.') - 1:])
+- :"
+- /^substitute
+- :s/foo/bar/
+- :$put =@/
+- /^substitute
+- :keeppatterns s/asdf/xyz/
+- :$put =@/
+- /^substitute
+- Y:$put =@0
+- /bar /e
+- :$put =@0
+- -:keeppatterns /xyz
+- 0dn:/^search()/,$w >>test.out
+- :qa!
+- ENDTEST
+-
+- - Bug in "vPPPP" on this text (Webb):
+- {
+- cmd;
+- {
+- cmd; /* <-- Start cursor here */
+- {
+- }
+- }
+- }
+-
+- Piece of Java
+- {
+- tt m1 {
+- t1;
+- } e1
+-
+- tt m2 {
+- t2;
+- } e2
+-
+- tt m3 {
+- if (x)
+- {
+- t3;
+- }
+- } e3
+- }
+-
+- foobar
+-
+- substitute foo asdf
+-
+- one two
+- search()
+--- 0 ----
+*** ../vim-8.1.1213/src/testdir/test14.ok 2014-01-14 21:16:23.000000000 +0100
+--- src/testdir/test14.ok 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,26 ****
+- - Bug in "vPPPP" on this text (Webb):
+- {
+- }
+- - Bug uuun "vPPPP" uuuuuuuuun this text (Webb):
+- ABC !ag8
+- tt m1 {A
+- tt m2 {B
+- tt m3 {C
+- tt m3 {DC
+- tt m1 {EA
+- {F
+- }G e1
+- }H e3
+- }I
+- }JH e3
+- }K e2
+- {LF
+- search()
+- 0
+- 1
+- 1
+- two
+- foo
+- ^substitute
+- substitute bar xyz
+- xyz
+--- 0 ----
+*** ../vim-8.1.1213/src/testdir/test_edit.vim 2019-03-16 18:11:03.646997858 +0100
+--- src/testdir/test_edit.vim 2019-04-27 17:35:39.805824096 +0200
+***************
+*** 1447,1449 ****
+--- 1447,1465 ----
+ au! InsertLeave
+ iunmap x
+ endfunc
++
++ " Test for inserting characters using CTRL-V followed by a number.
++ func Test_edit_special_chars()
++ new
++
++ if has("ebcdic")
++ let t = "o\<C-V>193\<C-V>xc2\<C-V>o303 \<C-V>90a\<C-V>xfg\<C-V>o578\<Esc>"
++ else
++ let t = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>"
++ endif
++
++ exe "normal " . t
++ call assert_equal("ABC !a\<C-O>g\<C-G>8", getline(2))
++
++ close!
++ endfunc
+*** ../vim-8.1.1213/src/testdir/test_normal.vim 2019-03-25 23:16:30.600492534 +0100
+--- src/testdir/test_normal.vim 2019-04-27 17:35:39.809824077 +0200
+***************
+*** 1358,1368 ****
+ bw!
+ return
+ endif
+! set keywordprg=man\ --pager=cat
+ " Test for using man
+ 2
+ let a = execute('unsilent norm! K')
+! call assert_match("man --pager=cat 'man'", a)
+
+ " clean up
+ let &keywordprg = k
+--- 1358,1378 ----
+ bw!
+ return
+ endif
+!
+! if has('mac')
+! " In MacOS, the option for specifying a pager is different
+! set keywordprg=man\ -P\ cat
+! else
+! set keywordprg=man\ --pager=cat
+! endif
+ " Test for using man
+ 2
+ let a = execute('unsilent norm! K')
+! if has('mac')
+! call assert_match("man -P cat 'man'", a)
+! else
+! call assert_match("man --pager=cat 'man'", a)
+! endif
+
+ " clean up
+ let &keywordprg = k
+***************
+*** 2559,2561 ****
+--- 2569,2649 ----
+
+ bwipe!
+ endfunc
++
++ " Test for '[m', ']m', '[M' and ']M'
++ " Jumping to beginning and end of methods in Java-like languages
++ func Test_java_motion()
++ new
++ a
++ Piece of Java
++ {
++ tt m1 {
++ t1;
++ } e1
++
++ tt m2 {
++ t2;
++ } e2
++
++ tt m3 {
++ if (x)
++ {
++ t3;
++ }
++ } e3
++ }
++ .
++
++ normal gg
++
++ normal 2]maA
++ call assert_equal("\ttt m1 {A", getline('.'))
++ call assert_equal([3, 9, 16], [line('.'), col('.'), virtcol('.')])
++
++ normal j]maB
++ call assert_equal("\ttt m2 {B", getline('.'))
++ call assert_equal([7, 9, 16], [line('.'), col('.'), virtcol('.')])
++
++ normal ]maC
++ call assert_equal("\ttt m3 {C", getline('.'))
++ call assert_equal([11, 9, 16], [line('.'), col('.'), virtcol('.')])
++
++ normal [maD
++ call assert_equal("\ttt m3 {DC", getline('.'))
++ call assert_equal([11, 9, 16], [line('.'), col('.'), virtcol('.')])
++
++ normal k2[maE
++ call assert_equal("\ttt m1 {EA", getline('.'))
++ call assert_equal([3, 9, 16], [line('.'), col('.'), virtcol('.')])
++
++ normal 3[maF
++ call assert_equal("{F", getline('.'))
++ call assert_equal([2, 2, 2], [line('.'), col('.'), virtcol('.')])
++
++ normal ]MaG
++ call assert_equal("\t}G e1", getline('.'))
++ call assert_equal([5, 3, 10], [line('.'), col('.'), virtcol('.')])
++
++ normal j2]MaH
++ call assert_equal("\t}H e3", getline('.'))
++ call assert_equal([16, 3, 10], [line('.'), col('.'), virtcol('.')])
++
++ normal ]M]M
++ normal aI
++ call assert_equal("}I", getline('.'))
++ call assert_equal([17, 2, 2], [line('.'), col('.'), virtcol('.')])
++
++ normal 2[MaJ
++ call assert_equal("\t}JH e3", getline('.'))
++ call assert_equal([16, 3, 10], [line('.'), col('.'), virtcol('.')])
++
++ normal k[MaK
++ call assert_equal("\t}K e2", getline('.'))
++ call assert_equal([9, 3, 10], [line('.'), col('.'), virtcol('.')])
++
++ normal 3[MaL
++ call assert_equal("{LF", getline('.'))
++ call assert_equal([2, 2, 2], [line('.'), col('.'), virtcol('.')])
++
++ close!
++ endfunc
+*** ../vim-8.1.1213/src/testdir/test_search.vim 2019-04-11 13:45:53.125298538 +0200
+--- src/testdir/test_search.vim 2019-04-27 17:35:39.809824077 +0200
+***************
+*** 1265,1267 ****
+--- 1265,1291 ----
+ set incsearch&
+ bwipe!
+ endfunc
++
++ " Test for the search() function with match at the cursor position
++ func Test_search_match_at_curpos()
++ new
++ call append(0, ['foobar', '', 'one two', ''])
++
++ normal gg
++
++ call search('foobar', 'c')
++ call assert_equal([1, 1], [line('.'), col('.')])
++
++ normal j
++ call search('^$', 'c')
++ call assert_equal([2, 1], [line('.'), col('.')])
++
++ call search('^$', 'bc')
++ call assert_equal([2, 1], [line('.'), col('.')])
++
++ exe "normal /two\<CR>"
++ call search('.', 'c')
++ call assert_equal([3, 5], [line('.'), col('.')])
++
++ close!
++ endfunc
+*** ../vim-8.1.1213/src/testdir/test_substitute.vim 2019-03-27 22:53:49.919226659 +0100
+--- src/testdir/test_substitute.vim 2019-04-27 17:35:39.813824056 +0200
+***************
+*** 640,642 ****
+--- 640,691 ----
+
+ bwipe!
+ endfunc
++
++ " Test ":s/pat/sub/" with different ~s in sub.
++ func Test_replace_with_tilde()
++ new
++ " Set the last replace string to empty
++ s/^$//
++ call append(0, ['- Bug in "vPPPP" on this text:'])
++ normal gg
++ s/u/~u~/
++ call assert_equal('- Bug in "vPPPP" on this text:', getline(1))
++ s/i/~u~/
++ call assert_equal('- Bug uuun "vPPPP" on this text:', getline(1))
++ s/o/~~~/
++ call assert_equal('- Bug uuun "vPPPP" uuuuuuuuun this text:', getline(1))
++ close!
++ endfunc
++
++ func Test_replace_keeppatterns()
++ new
++ a
++ foobar
++
++ substitute foo asdf
++
++ one two
++ .
++
++ normal gg
++ /^substitute
++ s/foo/bar/
++ call assert_equal('foo', @/)
++ call assert_equal('substitute bar asdf', getline('.'))
++
++ /^substitute
++ keeppatterns s/asdf/xyz/
++ call assert_equal('^substitute', @/)
++ call assert_equal('substitute bar xyz', getline('.'))
++
++ exe "normal /bar /e\<CR>"
++ call assert_equal(15, col('.'))
++ normal -
++ keeppatterns /xyz
++ call assert_equal('bar ', @/)
++ call assert_equal('substitute bar xyz', getline('.'))
++ exe "normal 0dn"
++ call assert_equal('xyz', getline('.'))
++
++ close!
++ endfunc
+*** ../vim-8.1.1213/src/testdir/test_visual.vim 2019-03-07 11:25:24.455856096 +0100
+--- src/testdir/test_visual.vim 2019-04-27 17:35:39.813824056 +0200
+***************
+*** 404,406 ****
+--- 404,430 ----
+ bwipe!
+ au! InsertLeave
+ endfunc
++
++ " Tests for "vaBiB", end could be wrong.
++ func Test_Visual_Block()
++ new
++ a
++ - Bug in "vPPPP" on this text:
++ {
++ cmd;
++ {
++ cmd;\t/* <-- Start cursor here */
++ {
++ }
++ }
++ }
++ .
++ normal gg
++ call search('Start cursor here')
++ normal vaBiBD
++ call assert_equal(['- Bug in "vPPPP" on this text:',
++ \ "\t{",
++ \ "\t}"], getline(1, '$'))
++
++ close!
++ endfunc
+*** ../vim-8.1.1213/src/version.c 2019-04-27 17:57:28.079905467 +0200
+--- src/version.c 2019-04-27 17:58:31.699611434 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1214,
+ /**/
+
+--
+ARTHUR: Well, I can't just call you `Man'.
+DENNIS: Well, you could say `Dennis'.
+ARTHUR: Well, I didn't know you were called `Dennis.'
+DENNIS: Well, you didn't bother to find out, did 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.1215 b/data/vim/patches/8.1.1215
new file mode 100644
index 000000000..d515c1439
--- /dev/null
+++ b/data/vim/patches/8.1.1215
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1215
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1215
+Problem: "make clean" does not remove generated src/po files.
+Solution: Remove the files for "make clean". (Christian Brabandt)
+Files: src/po/Makefile
+
+
+*** ../vim-8.1.1214/src/po/Makefile 2019-04-11 18:41:07.608867036 +0200
+--- src/po/Makefile 2019-04-27 18:26:10.203608322 +0200
+***************
+*** 151,156 ****
+--- 151,157 ----
+
+ clean: checkclean
+ rm -f core core.* *.old.po *.mo *.pot sjiscorr
++ rm -f LINGUAS vim.desktop gvim.desktop
+
+ distclean: clean
+
+*** ../vim-8.1.1214/src/version.c 2019-04-27 18:00:29.855064546 +0200
+--- src/version.c 2019-04-27 18:29:58.566503922 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1215,
+ /**/
+
+--
+A mathematician is a device for turning coffee into theorems.
+ Paul Erdos
+A computer programmer is a device for turning coffee into bugs.
+ 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.1216 b/data/vim/patches/8.1.1216
new file mode 100644
index 000000000..a198139db
--- /dev/null
+++ b/data/vim/patches/8.1.1216
@@ -0,0 +1,128 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1216
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1216
+Problem: Mouse middle click is not tested.
+Solution: Add a test. (Dominique Pelle, closes #4310)
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1215/src/testdir/test_termcodes.vim 2019-04-17 17:08:22.896875152 +0200
+--- src/testdir/test_termcodes.vim 2019-04-27 19:09:47.706543703 +0200
+***************
+*** 26,35 ****
+--- 26,43 ----
+ call TerminalEscapeCode(0x20, 0, a:row, a:col, 'M')
+ endfunc
+
++ func MouseMiddleClick(row, col)
++ call TerminalEscapeCode(0x21, 1, a:row, a:col, 'M')
++ endfunc
++
+ func MouseLeftRelease(row, col)
+ call TerminalEscapeCode(0x23, 3, a:row, a:col, 'm')
+ endfunc
+
++ func MouseMiddleRelease(row, col)
++ call TerminalEscapeCode(0x23, 3, a:row, a:col, 'm')
++ endfunc
++
+ func MouseLeftDrag(row, col)
+ call TerminalEscapeCode(0x43, 0x20, a:row, a:col, 'M')
+ endfunc
+***************
+*** 42,48 ****
+ call TerminalEscapeCode(0x41, 0x41, a:row, a:col, 'M')
+ endfunc
+
+! func Test_xterm_mouse_click()
+ new
+ let save_mouse = &mouse
+ let save_term = &term
+--- 50,56 ----
+ call TerminalEscapeCode(0x41, 0x41, a:row, a:col, 'M')
+ endfunc
+
+! func Test_xterm_mouse_left_click()
+ new
+ let save_mouse = &mouse
+ let save_term = &term
+***************
+*** 68,73 ****
+--- 76,123 ----
+ bwipe!
+ endfunc
+
++ func Test_xterm_mouse_middle_click()
++ new
++ let save_mouse = &mouse
++ let save_term = &term
++ let save_ttymouse = &ttymouse
++ let save_quotestar = @*
++ let @* = 'abc'
++ set mouse=a term=xterm
++
++ for ttymouse_val in ['xterm2', 'sgr']
++ let msg = 'ttymouse=' .. ttymouse_val
++ exe 'set ttymouse=' . ttymouse_val
++ call setline(1, ['123456789', '123456789'])
++
++ " Middle-click in the middle of the line pastes text where clicked.
++ let row = 1
++ let col = 6
++ call MouseMiddleClick(row, col)
++ call MouseMiddleRelease(row, col)
++ call assert_equal(['12345abc6789', '123456789'], getline(1, '$'), msg)
++
++ " Middle-click beyond end of the line pastes text at the end of the line.
++ let col = 20
++ call MouseMiddleClick(row, col)
++ call MouseMiddleRelease(row, col)
++ call assert_equal(['12345abc6789abc', '123456789'], getline(1, '$'), msg)
++
++ " Middle-click beyond the last line pastes in the last line.
++ let row = 5
++ let col = 3
++ call MouseMiddleClick(row, col)
++ call MouseMiddleRelease(row, col)
++ call assert_equal(['12345abc6789abc', '12abc3456789'], getline(1, '$'), msg)
++ endfor
++
++ let &mouse = save_mouse
++ let &term = save_term
++ let &ttymouse = save_ttymouse
++ let @* = save_quotestar
++ bwipe!
++ endfunc
++
+ func Test_xterm_mouse_wheel()
+ new
+ let save_mouse = &mouse
+*** ../vim-8.1.1215/src/version.c 2019-04-27 18:32:27.821786738 +0200
+--- src/version.c 2019-04-27 19:10:36.410304033 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1216,
+ /**/
+
+--
+ARTHUR: Well, I AM king...
+DENNIS: Oh king, eh, very nice. An' how'd you get that, eh? By exploitin'
+ the workers -- by 'angin' on to outdated imperialist dogma which
+ perpetuates the economic an' social differences in our society! If
+ there's ever going to be any progress--
+ 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.1217 b/data/vim/patches/8.1.1217
new file mode 100644
index 000000000..96f388b7c
--- /dev/null
+++ b/data/vim/patches/8.1.1217
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1217
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1217
+Problem: MS-Windows: no space reserved for font quality name.
+Solution: Add quality_name length if present. (Ken Takata, closes #4311)
+Files: src/gui_w32.c
+
+
+*** ../vim-8.1.1216/src/gui_w32.c 2019-04-02 22:15:51.344273531 +0200
+--- src/gui_w32.c 2019-04-27 19:13:24.605478533 +0200
+***************
+*** 3127,3133 ****
+ quality_name = quality_id2name((int)lf.lfQuality);
+
+ res = (char *)alloc((unsigned)(strlen(font_name) + 20
+! + (charset_name == NULL ? 0 : strlen(charset_name) + 2)));
+ if (res != NULL)
+ {
+ p = res;
+--- 3127,3134 ----
+ quality_name = quality_id2name((int)lf.lfQuality);
+
+ res = (char *)alloc((unsigned)(strlen(font_name) + 20
+! + (charset_name == NULL ? 0 : strlen(charset_name) + 2)
+! + (quality_name == NULL ? 0 : strlen(quality_name) + 2)));
+ if (res != NULL)
+ {
+ p = res;
+*** ../vim-8.1.1216/src/version.c 2019-04-27 19:11:31.346034085 +0200
+--- src/version.c 2019-04-27 19:15:02.161000938 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1217,
+ /**/
+
+--
+Vim is like Emacs without all the typing. (John "Johann" Spetz)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1218 b/data/vim/patches/8.1.1218
new file mode 100644
index 000000000..2532f59ee
--- /dev/null
+++ b/data/vim/patches/8.1.1218
@@ -0,0 +1,1232 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1218
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1218
+Problem: Cannot set a directory for a tab page.
+Solution: Add the tab-local directory. (Yegappan Lakshmanan, closes #4212)
+Files: runtime/doc/autocmd.txt, runtime/doc/editing.txt,
+ runtime/doc/eval.txt, runtime/doc/index.txt,
+ runtime/doc/options.txt, runtime/doc/usr_22.txt,
+ runtime/doc/usr_41.txt, src/eval.c, src/evalfunc.c,
+ src/ex_cmdidxs.h, src/ex_cmds.h, src/ex_docmd.c, src/if_py_both.h,
+ src/proto/eval.pro, src/proto/ex_docmd.pro, src/structs.h,
+ src/testdir/test_getcwd.vim, src/testdir/test_mksession.vim,
+ src/window.c
+
+
+*** ../vim-8.1.1217/runtime/doc/autocmd.txt 2019-04-08 18:15:36.464223229 +0200
+--- runtime/doc/autocmd.txt 2019-04-27 20:06:26.758264881 +0200
+***************
+*** 686,704 ****
+ 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
+ <afile> is set to the new directory name.
+ *ExitPre*
+ ExitPre When using `:quit`, `:wq` in a way it makes
+ Vim exit, or using `:qall`, just after
+ |QuitPre|. Can be used to close any
+! non-essential window.
+ *FileChangedShell*
+ FileChangedShell When Vim notices that the modification time of
+ a file has changed since editing started.
+--- 690,712 ----
+ change or when doing |:diffupdate|.
+ *DirChanged*
+ DirChanged The working directory has changed in response
+! to the |:cd| or |:tcd| or |:lcd| commands, or
+! as a result of the 'autochdir' option.
+ The pattern can be:
+! "window" to trigger on `:lcd`
+! "tabpage" to trigger on `:tcd`
+! "global" to trigger on `:cd`
+! "auto" to trigger on 'autochdir'.
+! "drop" to trigger on editing a file
+ <afile> is set to the new directory name.
+ *ExitPre*
+ ExitPre When using `:quit`, `:wq` in a way it makes
+ Vim exit, or using `:qall`, just after
+ |QuitPre|. Can be used to close any
+! non-essential window. Exiting may still be
+! cancelled if there is a modified buffer that
+! isn't automatically saved, use |VimLeavePre|
+! for really exiting.
+ *FileChangedShell*
+ FileChangedShell When Vim notices that the modification time of
+ a file has changed since editing started.
+*** ../vim-8.1.1217/runtime/doc/editing.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/editing.txt 2019-04-27 20:11:37.192857657 +0200
+***************
+*** 1304,1312 ****
+ ==============================================================================
+ 7. The current directory *current-directory*
+
+! You may use the |:cd| and |:lcd| commands to change to another directory, so
+! you will not have to type that directory name in front of the file names. It
+! also makes a difference for executing external commands, e.g. ":!ls".
+
+ Changing directory fails when the current buffer is modified, the '.' flag is
+ present in 'cpoptions' and "!" is not used in the command.
+--- 1304,1313 ----
+ ==============================================================================
+ 7. The current directory *current-directory*
+
+! You can use the |:cd|, |:tcd| and |:lcd| commands to change to another
+! directory, so you will not have to type that directory name in front of the
+! file names. It also makes a difference for executing external commands, e.g.
+! ":!ls".
+
+ Changing directory fails when the current buffer is modified, the '.' flag is
+ present in 'cpoptions' and "!" is not used in the command.
+***************
+*** 1334,1339 ****
+--- 1335,1351 ----
+ *:chd* *:chdir*
+ :chd[ir][!] [path] Same as |:cd|.
+
++ *:tcd*
++ :tcd[!] {path} Like |:cd|, but only set the directory for the current
++ tab. The current window will also use this directory.
++ The current directory is not changed for windows in
++ other tabs and for windows in the current tab that
++ have their own window-local directory.
++ {not in Vi}
++
++ *:tch* *:tchdir*
++ :tch[dir][!] Same as |:tcd|. {not in Vi}
++
+ *:lc* *:lcd*
+ :lc[d][!] {path} Like |:cd|, but only set the current directory when
+ the cursor is in the current window. The current
+***************
+*** 1348,1364 ****
+ :pw[d] Print the current directory name. {Vi: no pwd}
+ Also see |getcwd()|.
+
+! So long as no |:lcd| command has been used, all windows share the same current
+! directory. Using a command to jump to another window doesn't change anything
+! for the current directory.
+ When a |:lcd| command has been used for a window, the specified directory
+ becomes the current directory for that window. Windows where the |:lcd|
+! command has not been used stick to the global current directory. When jumping
+! to another window the current directory will become the last specified local
+! current directory. If none was specified, the global current directory is
+! used.
+! When a |:cd| command is used, the current window will lose his local current
+! directory and will use the global current directory from now on.
+
+ After using |:cd| the full path name will be used for reading and writing
+ files. On some networked file systems this may cause problems. The result of
+--- 1360,1385 ----
+ :pw[d] Print the current directory name. {Vi: no pwd}
+ Also see |getcwd()|.
+
+! So long as no |:lcd| or |:tcd| command has been used, all windows share the
+! same current directory. Using a command to jump to another window doesn't
+! change anything for the current directory.
+!
+ When a |:lcd| command has been used for a window, the specified directory
+ becomes the current directory for that window. Windows where the |:lcd|
+! command has not been used stick to the global or tab-local current directory.
+! When jumping to another window the current directory will become the last
+! specified local current directory. If none was specified, the global or
+! tab-local current directory is used.
+!
+! When a |:tcd| command has been used for a tab page, the specified directory
+! becomes the current directory for the current tab page and the current window.
+! The current directory of other tab pages is not affected. When jumping to
+! another tab page, the current directory will become the last specified local
+! directory for that tab page. If the current tab has no local current directory
+! the global current directory is used.
+!
+! When a |:cd| command is used, the current window and tab page will lose the
+! local current directory and will use the global current directory from now on.
+
+ After using |:cd| the full path name will be used for reading and writing
+ files. On some networked file systems this may cause problems. The result of
+*** ../vim-8.1.1217/runtime/doc/eval.txt 2019-04-27 13:03:20.012715914 +0200
+--- runtime/doc/eval.txt 2019-04-27 20:14:41.136007351 +0200
+***************
+*** 2377,2382 ****
+--- 2398,2404 ----
+ has_key({dict}, {key}) Number |TRUE| if {dict} has entry {key}
+ haslocaldir([{winnr} [, {tabnr}]])
+ Number |TRUE| if the window executed |:lcd|
++ or |:tcd|
+ hasmapto({what} [, {mode} [, {abbr}]])
+ Number |TRUE| if mapping to {what} exists
+ histadd({history}, {item}) String add an item to a history
+***************
+*** 4880,4886 ****
+ getcwd([{winnr} [, {tabnr}]])
+ The result is a String, which is the name of the current
+ working directory.
+- Without arguments, for the current window.
+
+ With {winnr} return the local current directory of this window
+ in the current tab page. {winnr} can be the window number or
+--- 4911,4916 ----
+***************
+*** 4889,4897 ****
+ directory. See also |haslocaldir()|.
+
+ With {winnr} and {tabnr} return the local current directory of
+! the window in the specified tab page.
+ Return an empty string if the arguments are invalid.
+
+ getfsize({fname}) *getfsize()*
+ The result is a Number, which is the size in bytes of the
+ given file {fname}.
+--- 4919,4946 ----
+ directory. See also |haslocaldir()|.
+
+ With {winnr} and {tabnr} return the local current directory of
+! the window in the specified tab page. If {winnr} is -1 return
+! the working directory of the tabpage.
+! If {winnr} is zero use the current window, if {tabnr} is zero
+! use the current tabpage.
+! Without any arguments, return the working directory of the
+! current window.
+ Return an empty string if the arguments are invalid.
+
++ Examples: >
++ " Get the working directory of the current window
++ :echo getcwd()
++ :echo getcwd(0)
++ :echo getcwd(0, 0)
++ " Get the working directory of window 3 in tabpage 2
++ :echo getcwd(3, 2)
++ " Get the global working directory
++ :echo getcwd(-1)
++ " Get the working directory of tabpage 3
++ :echo getcwd(-1, 3)
++ " Get the working directory of current tabpage
++ :echo getcwd(-1, 0)
++ <
+ getfsize({fname}) *getfsize()*
+ The result is a Number, which is the size in bytes of the
+ given file {fname}.
+***************
+*** 5449,5464 ****
+ an entry with key {key}. Zero otherwise.
+
+ haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()*
+! The result is a Number, which is 1 when the window has set a
+! local path via |:lcd|, and 0 otherwise.
+
+ Without arguments use the current window.
+ With {winnr} use this window in the current tab page.
+ With {winnr} and {tabnr} use the window in the specified tab
+ page.
+ {winnr} can be the window number or the |window-ID|.
+ Return 0 if the arguments are invalid.
+
+ hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
+ The result is a Number, which is 1 if there is a mapping that
+ contains {what} in somewhere in the rhs (what it is mapped to)
+--- 5498,5536 ----
+ an entry with key {key}. Zero otherwise.
+
+ haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()*
+! The result is a Number:
+! 1 when the window has set a local directory via |:lcd|
+! 2 when the tab-page has set a local directory via |:tcd|
+! 0 otherwise.
+
+ Without arguments use the current window.
+ With {winnr} use this window in the current tab page.
+ With {winnr} and {tabnr} use the window in the specified tab
+ page.
+ {winnr} can be the window number or the |window-ID|.
++ If {winnr} is -1 it is ignored and only the tabpage is used.
+ Return 0 if the arguments are invalid.
++ Examples: >
++ if haslocaldir() == 1
++ " window local directory case
++ elseif haslocaldir() == 2
++ " tab-local directory case
++ else
++ " global directory case
++ endif
+
++ " current window
++ :echo haslocaldir()
++ :echo haslocaldir(0)
++ :echo haslocaldir(0, 0)
++ " window n in current tab page
++ :echo haslocaldir(n)
++ :echo haslocaldir(n, 0)
++ " window n in tab page m
++ :echo haslocaldir(n, m)
++ " tab page m
++ :echo haslocaldir(-1, m)
++ <
+ hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
+ The result is a Number, which is 1 if there is a mapping that
+ contains {what} in somewhere in the rhs (what it is mapped to)
+*** ../vim-8.1.1217/runtime/doc/index.txt 2018-10-19 22:35:04.885189994 +0200
+--- runtime/doc/index.txt 2019-04-27 20:05:21.278555302 +0200
+***************
+*** 1573,1578 ****
+--- 1627,1634 ----
+ |:tab| :tab create new tab when opening new window
+ |:tag| :ta[g] jump to tag
+ |:tags| :tags show the contents of the tag stack
++ |:tcd| :tcd change directory for tab page
++ |:tchdir| :tch[dir] change directory for tab page
+ |:tcl| :tc[l] execute Tcl command
+ |:tcldo| :tcld[o] execute Tcl command for each line
+ |:tclfile| :tclf[ile] execute Tcl script file
+*** ../vim-8.1.1217/runtime/doc/options.txt 2019-02-16 15:09:21.225946157 +0100
+--- runtime/doc/options.txt 2019-04-27 20:05:21.278555302 +0200
+***************
+*** 1457,1465 ****
+ {not available when compiled without the
+ |+file_in_path| feature}
+ This is a list of directories which will be searched when using the
+! |:cd| and |:lcd| commands, provided that the directory being searched
+! for has a relative path, not an absolute part starting with "/", "./"
+! or "../", the 'cdpath' option is not used then.
+ The 'cdpath' option's value has the same form and semantics as
+ |'path'|. Also see |file-searching|.
+ The default value is taken from $CDPATH, with a "," prepended to look
+--- 1455,1463 ----
+ {not available when compiled without the
+ |+file_in_path| feature}
+ This is a list of directories which will be searched when using the
+! |:cd|, |:tcd| and |:lcd| commands, provided that the directory being
+! searched for has a relative path, not an absolute part starting with
+! "/", "./" or "../", the 'cdpath' option is not used then.
+ The 'cdpath' option's value has the same form and semantics as
+ |'path'|. Also see |file-searching|.
+ The default value is taken from $CDPATH, with a "," prepended to look
+*** ../vim-8.1.1217/runtime/doc/usr_22.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_22.txt 2019-04-27 20:17:02.375349029 +0200
+***************
+*** 202,215 ****
+ :pwd
+ /home/Bram/VeryLongFileName
+
+! So long as no ":lcd" command has been used, all windows share the same current
+! directory. Doing a ":cd" command in one window will also change the current
+ directory of the other window.
+! For a window where ":lcd" has been used a different current directory is
+! remembered. Using ":cd" or ":lcd" in other windows will not change it.
+! When using a ":cd" command in a window that uses a different current
+ directory, it will go back to using the shared directory.
+
+ ==============================================================================
+ *22.3* Finding a file
+
+--- 202,229 ----
+ :pwd
+ /home/Bram/VeryLongFileName
+
+! So long as no `:lcd` command has been used, all windows share the same current
+! directory. Doing a `:cd` command in one window will also change the current
+ directory of the other window.
+! For a window where `:lcd` has been used a different current directory is
+! remembered. Using `:cd` or `:lcd` in other windows will not change it.
+! When using a `:cd` command in a window that uses a different current
+ directory, it will go back to using the shared directory.
+
++
++ TAB LOCAL DIRECTORY
++
++ When you open a new tab page, it uses the directory of the window in the
++ previous tab page from which the new tab page was opened. You can change the
++ directory of the current tab page using the `:tcd` command. All the windows in
++ a tab page share this directory except for windows with a window-local
++ directory. Any new windows opened in this tab page will use this directory as
++ the current working directory. Using a `:cd` command in a tab page will not
++ change the working directory of tab pages which have a tab local directory.
++ When the global working directory is changed using the ":cd" command in a tab
++ page, it will also change the current tab page working directory.
++
++
+ ==============================================================================
+ *22.3* Finding a file
+
+*** ../vim-8.1.1217/runtime/doc/usr_41.txt 2019-04-06 13:18:06.733335092 +0200
+--- runtime/doc/usr_41.txt 2019-04-27 20:05:21.278555302 +0200
+***************
+*** 765,771 ****
+ isdirectory() check if a directory exists
+ getfsize() get the size of a file
+ getcwd() get the current working directory
+! haslocaldir() check if current window used |:lcd|
+ tempname() get the name of a temporary file
+ mkdir() create a new directory
+ delete() delete a file
+--- 766,772 ----
+ isdirectory() check if a directory exists
+ getfsize() get the size of a file
+ getcwd() get the current working directory
+! haslocaldir() check if current window used |:lcd| or |:tcd|
+ tempname() get the name of a temporary file
+ mkdir() create a new directory
+ delete() delete a file
+*** ../vim-8.1.1217/src/eval.c 2019-04-27 13:03:20.004715961 +0200
+--- src/eval.c 2019-04-27 20:17:32.523208020 +0200
+***************
+*** 8704,8714 ****
+
+ /*
+ * Find window specified by "wvp" in tabpage "tvp".
+ */
+ win_T *
+ find_tabwin(
+! typval_T *wvp, /* VAR_UNKNOWN for current window */
+! typval_T *tvp) /* VAR_UNKNOWN for current tab page */
+ {
+ win_T *wp = NULL;
+ tabpage_T *tp = NULL;
+--- 8704,8716 ----
+
+ /*
+ * Find window specified by "wvp" in tabpage "tvp".
++ * Returns the tab page in 'ptp'
+ */
+ win_T *
+ find_tabwin(
+! typval_T *wvp, // VAR_UNKNOWN for current window
+! typval_T *tvp, // VAR_UNKNOWN for current tab page
+! tabpage_T **ptp)
+ {
+ win_T *wp = NULL;
+ tabpage_T *tp = NULL;
+***************
+*** 8726,8735 ****
+--- 8728,8749 ----
+ tp = curtab;
+
+ if (tp != NULL)
++ {
+ wp = find_win_by_nr(wvp, tp);
++ if (wp == NULL && wvp->v_type == VAR_NUMBER
++ && wvp->vval.v_number != -1)
++ // A window with the specified number is not found
++ tp = NULL;
++ }
+ }
+ else
++ {
+ wp = curwin;
++ tp = curtab;
++ }
++
++ if (ptp != NULL)
++ *ptp = tp;
+
+ return wp;
+ }
+*** ../vim-8.1.1217/src/evalfunc.c 2019-04-27 13:03:20.004715961 +0200
+--- src/evalfunc.c 2019-04-27 20:05:21.282555283 +0200
+***************
+*** 1529,1535 ****
+ win_T *wp;
+
+ rettv->vval.v_number = -1;
+! wp = find_tabwin(&argvars[0], &argvars[1]);
+ if (wp != NULL)
+ rettv->vval.v_number = wp->w_alist->id;
+ }
+--- 1529,1535 ----
+ win_T *wp;
+
+ rettv->vval.v_number = -1;
+! wp = find_tabwin(&argvars[0], &argvars[1], NULL);
+ if (wp != NULL)
+ rettv->vval.v_number = wp->w_alist->id;
+ }
+***************
+*** 5126,5150 ****
+
+ /*
+ * "getcwd()" function
+ */
+ static void
+ f_getcwd(typval_T *argvars, typval_T *rettv)
+ {
+ win_T *wp = NULL;
+ char_u *cwd;
+ int global = FALSE;
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+! if (argvars[0].v_type == VAR_NUMBER && argvars[0].vval.v_number == -1)
+ global = TRUE;
+ else
+! wp = find_tabwin(&argvars[0], &argvars[1]);
+
+ if (wp != NULL && wp->w_localdir != NULL)
+ rettv->vval.v_string = vim_strsave(wp->w_localdir);
+! else if (wp != NULL || global)
+ {
+ if (globaldir != NULL)
+ rettv->vval.v_string = vim_strsave(globaldir);
+--- 5126,5169 ----
+
+ /*
+ * "getcwd()" function
++ *
++ * Return the current working directory of a window in a tab page.
++ * First optional argument 'winnr' is the window number or -1 and the second
++ * optional argument 'tabnr' is the tab page number.
++ *
++ * If no arguments are supplied, then return the directory of the current
++ * window.
++ * If only 'winnr' is specified and is not -1 or 0 then return the directory of
++ * the specified window.
++ * If 'winnr' is 0 then return the directory of the current window.
++ * If both 'winnr and 'tabnr' are specified and 'winnr' is -1 then return the
++ * directory of the specified tab page. Otherwise return the directory of the
++ * specified window in the specified tab page.
++ * If the window or the tab page doesn't exist then return NULL.
+ */
+ static void
+ f_getcwd(typval_T *argvars, typval_T *rettv)
+ {
+ win_T *wp = NULL;
++ tabpage_T *tp = NULL;
+ char_u *cwd;
+ int global = FALSE;
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+
+! if (argvars[0].v_type == VAR_NUMBER
+! && argvars[0].vval.v_number == -1
+! && argvars[1].v_type == VAR_UNKNOWN)
+ global = TRUE;
+ else
+! wp = find_tabwin(&argvars[0], &argvars[1], &tp);
+
+ if (wp != NULL && wp->w_localdir != NULL)
+ rettv->vval.v_string = vim_strsave(wp->w_localdir);
+! else if (tp != NULL && tp->tp_localdir != NULL)
+! rettv->vval.v_string = vim_strsave(tp->tp_localdir);
+! else if (wp != NULL || tp != NULL || global)
+ {
+ if (globaldir != NULL)
+ rettv->vval.v_string = vim_strsave(globaldir);
+***************
+*** 5333,5339 ****
+ return;
+
+ #ifdef FEAT_JUMPLIST
+! wp = find_tabwin(&argvars[0], &argvars[1]);
+ if (wp == NULL)
+ return;
+
+--- 5352,5358 ----
+ return;
+
+ #ifdef FEAT_JUMPLIST
+! wp = find_tabwin(&argvars[0], &argvars[1], NULL);
+ if (wp == NULL)
+ return;
+
+***************
+*** 6824,6833 ****
+ static void
+ f_haslocaldir(typval_T *argvars, typval_T *rettv)
+ {
+ win_T *wp = NULL;
+
+! wp = find_tabwin(&argvars[0], &argvars[1]);
+! rettv->vval.v_number = (wp != NULL && wp->w_localdir != NULL);
+ }
+
+ /*
+--- 6843,6860 ----
+ static void
+ f_haslocaldir(typval_T *argvars, typval_T *rettv)
+ {
++ tabpage_T *tp = NULL;
+ win_T *wp = NULL;
+
+! wp = find_tabwin(&argvars[0], &argvars[1], &tp);
+!
+! // Check for window-local and tab-local directories
+! if (wp != NULL && wp->w_localdir != NULL)
+! rettv->vval.v_number = 1;
+! else if (tp != NULL && tp->tp_localdir != NULL)
+! rettv->vval.v_number = 2;
+! else
+! rettv->vval.v_number = 0;
+ }
+
+ /*
+*** ../vim-8.1.1217/src/ex_cmdidxs.h 2019-04-04 18:15:05.770857065 +0200
+--- src/ex_cmdidxs.h 2019-04-27 20:05:21.282555283 +0200
+***************
+*** 25,36 ****
+ /* r */ 351,
+ /* s */ 371,
+ /* t */ 439,
+! /* u */ 482,
+! /* v */ 493,
+! /* w */ 511,
+! /* x */ 525,
+! /* y */ 534,
+! /* z */ 535
+ };
+
+ /*
+--- 25,36 ----
+ /* r */ 351,
+ /* s */ 371,
+ /* t */ 439,
+! /* u */ 484,
+! /* v */ 495,
+! /* w */ 513,
+! /* x */ 527,
+! /* y */ 536,
+! /* z */ 537
+ };
+
+ /*
+***************
+*** 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, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 19, 0, 0, 0, 0 },
+ /* s */ { 2, 6, 15, 0, 19, 23, 0, 25, 26, 0, 0, 29, 31, 35, 39, 41, 0, 49, 0, 50, 0, 62, 63, 0, 64, 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, 0, 0, 12, 13, 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, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 19, 0, 0, 0, 0 },
+ /* s */ { 2, 6, 15, 0, 19, 23, 0, 25, 26, 0, 0, 29, 31, 35, 39, 41, 0, 49, 0, 50, 0, 62, 63, 0, 64, 0 },
+! /* t */ { 2, 0, 19, 0, 24, 26, 0, 27, 0, 28, 0, 29, 33, 36, 38, 39, 0, 40, 42, 0, 43, 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, 0, 0, 12, 13, 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 = 548;
+--- 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 = 550;
+*** ../vim-8.1.1217/src/ex_cmds.h 2019-04-27 13:03:20.004715961 +0200
+--- src/ex_cmds.h 2019-04-27 20:18:38.294899911 +0200
+***************
+*** 1479,1484 ****
+--- 1479,1490 ----
+ EX(CMD_tabs, "tabs", ex_tabs,
+ TRLBAR|CMDWIN,
+ ADDR_TABS),
++ EX(CMD_tcd, "tcd", ex_cd,
++ BANG|FILE1|TRLBAR|CMDWIN,
++ ADDR_OTHER),
++ EX(CMD_tchdir, "tchdir", ex_cd,
++ BANG|FILE1|TRLBAR|CMDWIN,
++ ADDR_OTHER),
+ EX(CMD_tcl, "tcl", ex_tcl,
+ RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+*** ../vim-8.1.1217/src/ex_docmd.c 2019-04-27 13:03:20.004715961 +0200
+--- src/ex_docmd.c 2019-04-27 20:05:21.282555283 +0200
+***************
+*** 3692,3697 ****
+--- 3692,3699 ----
+ break;
+ case CMD_cd:
+ case CMD_chdir:
++ case CMD_tcd:
++ case CMD_tchdir:
+ case CMD_lcd:
+ case CMD_lchdir:
+ if (xp->xp_context == EXPAND_FILES)
+***************
+*** 7435,7447 ****
+
+ /*
+ * Deal with the side effects of changing the current directory.
+! * When "local" is TRUE then this was after an ":lcd" command.
+ */
+ void
+! post_chdir(int local)
+ {
+ VIM_CLEAR(curwin->w_localdir);
+! if (local)
+ {
+ /* If still in global directory, need to remember current
+ * directory as global directory. */
+--- 7437,7453 ----
+
+ /*
+ * Deal with the side effects of changing the current directory.
+! * When "tablocal" is TRUE then this was after an ":tcd" command.
+! * When "winlocal" is TRUE then this was after an ":lcd" command.
+ */
+ void
+! post_chdir(int tablocal, int winlocal)
+ {
++ if (!winlocal)
++ // Clear tab local directory for both :cd and :tcd
++ VIM_CLEAR(curtab->tp_localdir);
+ VIM_CLEAR(curwin->w_localdir);
+! if (winlocal || tablocal)
+ {
+ /* If still in global directory, need to remember current
+ * directory as global directory. */
+***************
+*** 7449,7455 ****
+ globaldir = vim_strsave(prev_dir);
+ /* Remember this local directory for the window. */
+ if (mch_dirname(NameBuff, MAXPATHL) == OK)
+! curwin->w_localdir = vim_strsave(NameBuff);
+ }
+ else
+ {
+--- 7455,7466 ----
+ globaldir = vim_strsave(prev_dir);
+ /* Remember this local directory for the window. */
+ if (mch_dirname(NameBuff, MAXPATHL) == OK)
+! {
+! if (tablocal)
+! curtab->tp_localdir = vim_strsave(NameBuff);
+! else
+! curwin->w_localdir = vim_strsave(NameBuff);
+! }
+ }
+ else
+ {
+***************
+*** 7463,7469 ****
+
+
+ /*
+! * ":cd", ":lcd", ":chdir" and ":lchdir".
+ */
+ void
+ ex_cd(exarg_T *eap)
+--- 7474,7480 ----
+
+
+ /*
+! * ":cd", ":tcd", ":lcd", ":chdir" ":tchdir" and ":lchdir".
+ */
+ void
+ ex_cd(exarg_T *eap)
+***************
+*** 7532,7550 ****
+ emsg(_(e_failed));
+ else
+ {
+! int is_local_chdir = eap->cmdidx == CMD_lcd
+ || eap->cmdidx == CMD_lchdir;
+
+! post_chdir(is_local_chdir);
+
+ /* Echo the new current directory if the command was typed. */
+ if (KeyTyped || p_verbose >= 5)
+ ex_pwd(eap);
+
+ if (dir_differs)
+! apply_autocmds(EVENT_DIRCHANGED,
+! is_local_chdir ? (char_u *)"window" : (char_u *)"global",
+ new_dir, FALSE, curbuf);
+ }
+ vim_free(tofree);
+ }
+--- 7543,7571 ----
+ emsg(_(e_failed));
+ else
+ {
+! char_u *acmd_fname;
+! int is_winlocal_chdir = eap->cmdidx == CMD_lcd
+ || eap->cmdidx == CMD_lchdir;
++ int is_tablocal_chdir = eap->cmdidx == CMD_tcd
++ || eap->cmdidx == CMD_tchdir;
+
+! post_chdir(is_tablocal_chdir, is_winlocal_chdir);
+
+ /* Echo the new current directory if the command was typed. */
+ if (KeyTyped || p_verbose >= 5)
+ ex_pwd(eap);
+
+ if (dir_differs)
+! {
+! if (is_winlocal_chdir)
+! acmd_fname = (char_u *)"window";
+! else if (is_tablocal_chdir)
+! acmd_fname = (char_u *)"tabpage";
+! else
+! acmd_fname = (char_u *)"global";
+! apply_autocmds(EVENT_DIRCHANGED, acmd_fname,
+ new_dir, FALSE, curbuf);
++ }
+ }
+ vim_free(tofree);
+ }
+***************
+*** 9729,9740 ****
+ }
+ for (tabnr = 1; ; ++tabnr)
+ {
+ int need_tabnext = FALSE;
+ int cnr = 1;
+
+ if ((ssop_flags & SSOP_TABPAGES))
+ {
+! tabpage_T *tp = find_tabpage(tabnr);
+
+ if (tp == NULL)
+ break; /* done all tab pages */
+--- 9750,9762 ----
+ }
+ for (tabnr = 1; ; ++tabnr)
+ {
++ tabpage_T *tp = NULL;
+ int need_tabnext = FALSE;
+ int cnr = 1;
+
+ if ((ssop_flags & SSOP_TABPAGES))
+ {
+! tp = find_tabpage(tabnr);
+
+ if (tp == NULL)
+ break; /* done all tab pages */
+***************
+*** 9833,9838 ****
+--- 9855,9872 ----
+ if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL)
+ return FAIL;
+
++ // Restore the tab-local working directory if specified
++ // Do this before the windows, so that the window-local directory can
++ // override the tab-local directory.
++ if (tp != NULL && tp->tp_localdir != NULL && ssop_flags & SSOP_CURDIR)
++ {
++ if (fputs("tcd ", fd) < 0
++ || ses_put_fname(fd, tp->tp_localdir, &ssop_flags) == FAIL
++ || put_eol(fd) == FAIL)
++ return FAIL;
++ did_lcd = TRUE;
++ }
++
+ /*
+ * Restore the view of the window (options, file, cursor, etc.).
+ */
+*** ../vim-8.1.1217/src/if_py_both.h 2019-03-30 12:51:18.626808012 +0100
+--- src/if_py_both.h 2019-04-27 20:05:21.282555283 +0200
+***************
+*** 1032,1038 ****
+ Py_DECREF(newwd);
+ Py_XDECREF(todecref);
+
+! post_chdir(FALSE);
+
+ if (VimTryEnd())
+ {
+--- 1032,1038 ----
+ Py_DECREF(newwd);
+ Py_XDECREF(todecref);
+
+! post_chdir(FALSE, FALSE);
+
+ if (VimTryEnd())
+ {
+*** ../vim-8.1.1217/src/proto/eval.pro 2019-04-05 22:50:35.025737353 +0200
+--- src/proto/eval.pro 2019-04-27 20:05:21.286555269 +0200
+***************
+*** 116,122 ****
+ 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);
+ char_u *autoload_name(char_u *name);
+--- 116,122 ----
+ 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, tabpage_T **ptp);
+ void getwinvar(typval_T *argvars, typval_T *rettv, int off);
+ void setwinvar(typval_T *argvars, typval_T *rettv, int off);
+ char_u *autoload_name(char_u *name);
+*** ../vim-8.1.1217/src/proto/ex_docmd.pro 2019-04-27 13:03:20.004715961 +0200
+--- src/proto/ex_docmd.pro 2019-04-27 20:05:21.286555269 +0200
+***************
+*** 37,43 ****
+ void tabpage_new(void);
+ void do_exedit(exarg_T *eap, win_T *old_curwin);
+ void free_cd_dir(void);
+! void post_chdir(int local);
+ void ex_cd(exarg_T *eap);
+ void do_sleep(long msec);
+ void ex_may_print(exarg_T *eap);
+--- 37,43 ----
+ void tabpage_new(void);
+ void do_exedit(exarg_T *eap, win_T *old_curwin);
+ void free_cd_dir(void);
+! void post_chdir(int tablocal, int winlocal);
+ void ex_cd(exarg_T *eap);
+ void do_sleep(long msec);
+ void ex_may_print(exarg_T *eap);
+*** ../vim-8.1.1217/src/structs.h 2019-04-27 13:03:20.008715938 +0200
+--- src/structs.h 2019-04-27 20:05:21.286555269 +0200
+***************
+*** 2574,2579 ****
+--- 2574,2582 ----
+ int tp_prev_which_scrollbars[3];
+ /* previous value of which_scrollbars */
+ #endif
++
++ char_u *tp_localdir; // absolute path of local directory or
++ // NULL
+ #ifdef FEAT_DIFF
+ diff_T *tp_first_diff;
+ buf_T *(tp_diffbuf[DB_COUNT]);
+*** ../vim-8.1.1217/src/testdir/test_getcwd.vim 2019-01-09 23:00:57.997176121 +0100
+--- src/testdir/test_getcwd.vim 2019-04-27 20:05:21.286555269 +0200
+***************
+*** 97,102 ****
+--- 97,113 ----
+ call assert_equal("y Xdir2 1", GetCwdInfo(2, tp_nr))
+ call assert_equal("z Xdir3 1", GetCwdInfo(1, tp_nr))
+ call assert_equal(g:topdir, getcwd(-1))
++ " Non existing windows and tab pages
++ call assert_equal('', getcwd(100))
++ call assert_equal(0, haslocaldir(100))
++ call assert_equal('', getcwd(10, 1))
++ call assert_equal(0, haslocaldir(10, 1))
++ call assert_equal('', getcwd(1, 5))
++ call assert_equal(0, haslocaldir(1, 5))
++ call assert_fails('call getcwd([])', 'E745:')
++ call assert_fails('call getcwd(1, [])', 'E745:')
++ call assert_fails('call haslocaldir([])', 'E745:')
++ call assert_fails('call haslocaldir(1, [])', 'E745:')
+ endfunc
+
+ function Test_GetCwd_lcd_shellslash()
+***************
+*** 110,112 ****
+--- 121,264 ----
+ call assert_equal(cwd[-1:], '\')
+ endif
+ endfunc
++
++ " Test for :tcd
++ function Test_Tab_Local_Cwd()
++ enew | only | tabonly
++
++ call mkdir('Xtabdir1')
++ call mkdir('Xtabdir2')
++ call mkdir('Xwindir1')
++ call mkdir('Xwindir2')
++ call mkdir('Xwindir3')
++
++ " Create three tabpages with three windows each
++ edit a
++ botright new b
++ botright new c
++ tabnew m
++ botright new n
++ botright new o
++ tabnew x
++ botright new y
++ botright new z
++
++ " Setup different directories for the tab pages and windows
++ tabrewind
++ 1wincmd w
++ lcd Xwindir1
++ tabnext
++ tcd Xtabdir1
++ 2wincmd w
++ lcd ../Xwindir2
++ tabnext
++ tcd Xtabdir2
++ 3wincmd w
++ lcd ../Xwindir3
++
++ " Check the directories of various windows
++ call assert_equal("a Xwindir1 1", GetCwdInfo(1, 1))
++ call assert_equal("b Xtopdir 0", GetCwdInfo(2, 1))
++ call assert_equal("c Xtopdir 0", GetCwdInfo(3, 1))
++ call assert_equal("m Xtabdir1 2", GetCwdInfo(1, 2))
++ call assert_equal("n Xwindir2 1", GetCwdInfo(2, 2))
++ call assert_equal("o Xtabdir1 2", GetCwdInfo(3, 2))
++ call assert_equal("x Xtabdir2 2", GetCwdInfo(1, 3))
++ call assert_equal("y Xtabdir2 2", GetCwdInfo(2, 3))
++ call assert_equal("z Xwindir3 1", GetCwdInfo(3, 3))
++
++ " Check the tabpage directories
++ call assert_equal('Xtopdir', fnamemodify(getcwd(-1, 1), ':t'))
++ call assert_equal('Xtabdir1', fnamemodify(getcwd(-1, 2), ':t'))
++ call assert_equal('Xtabdir2', fnamemodify(getcwd(-1, 3), ':t'))
++ call assert_equal('', fnamemodify(getcwd(-1, 4), ':t'))
++
++ " Jump to different windows in the tab pages and check the current directory
++ tabrewind | 1wincmd w
++ call assert_equal('Xwindir1', fnamemodify(getcwd(), ':t'))
++ call assert_equal('Xwindir1', fnamemodify(getcwd(0), ':t'))
++ call assert_equal('Xwindir1', fnamemodify(getcwd(0, 0), ':t'))
++ call assert_true(haslocaldir(0))
++ call assert_equal(0, haslocaldir(-1, 0))
++ call assert_equal('Xtopdir', fnamemodify(getcwd(-1, 0), ':t'))
++ call assert_equal(g:topdir, getcwd(-1))
++ 2wincmd w
++ call assert_equal('Xtopdir', fnamemodify(getcwd(), ':t'))
++ call assert_equal('Xtopdir', fnamemodify(getcwd(0), ':t'))
++ call assert_equal('Xtopdir', fnamemodify(getcwd(0, 0), ':t'))
++ call assert_false(haslocaldir(0))
++ call assert_equal(0, haslocaldir(-1, 0))
++ call assert_equal('Xtopdir', fnamemodify(getcwd(-1, 0), ':t'))
++ call assert_equal(g:topdir, getcwd(-1))
++ tabnext | 1wincmd w
++ call assert_equal('Xtabdir1', fnamemodify(getcwd(), ':t'))
++ call assert_equal('Xtabdir1', fnamemodify(getcwd(0), ':t'))
++ call assert_equal('Xtabdir1', fnamemodify(getcwd(0, 0), ':t'))
++ call assert_true(haslocaldir(0))
++ call assert_equal(2, haslocaldir(-1, 0))
++ call assert_equal('Xtabdir1', fnamemodify(getcwd(-1, 0), ':t'))
++ call assert_equal(g:topdir, getcwd(-1))
++ 2wincmd w
++ call assert_equal('Xwindir2', fnamemodify(getcwd(), ':t'))
++ call assert_equal('Xwindir2', fnamemodify(getcwd(0), ':t'))
++ call assert_equal('Xwindir2', fnamemodify(getcwd(0, 0), ':t'))
++ call assert_true(haslocaldir(0))
++ call assert_equal(2, haslocaldir(-1, 0))
++ call assert_equal('Xtabdir1', fnamemodify(getcwd(-1, 0), ':t'))
++ call assert_equal(g:topdir, getcwd(-1))
++ tabnext | 1wincmd w
++ call assert_equal('Xtabdir2', fnamemodify(getcwd(), ':t'))
++ call assert_equal('Xtabdir2', fnamemodify(getcwd(0), ':t'))
++ call assert_equal('Xtabdir2', fnamemodify(getcwd(0, 0), ':t'))
++ call assert_true(haslocaldir(0))
++ call assert_equal(2, haslocaldir(-1, 0))
++ call assert_equal('Xtabdir2', fnamemodify(getcwd(-1, 0), ':t'))
++ call assert_equal(g:topdir, getcwd(-1))
++ 3wincmd w
++ call assert_equal('Xwindir3', fnamemodify(getcwd(), ':t'))
++ call assert_equal('Xwindir3', fnamemodify(getcwd(0), ':t'))
++ call assert_equal('Xwindir3', fnamemodify(getcwd(0, 0), ':t'))
++ call assert_true(haslocaldir(0))
++ call assert_equal(2, haslocaldir(-1, 0))
++ call assert_equal('Xtabdir2', fnamemodify(getcwd(-1, 0), ':t'))
++ call assert_equal(g:topdir, getcwd(-1))
++
++ " A new tab page should inherit the directory of the current tab page
++ tabrewind | 1wincmd w
++ tabnew g
++ call assert_equal("g Xwindir1 1", GetCwdInfo(0, 0))
++ tabclose | tabrewind
++ 2wincmd w
++ tabnew h
++ call assert_equal("h Xtopdir 0", GetCwdInfo(0, 0))
++ tabclose
++ tabnext 2 | 1wincmd w
++ tabnew j
++ call assert_equal("j Xtabdir1 2", GetCwdInfo(0, 0))
++ tabclose
++
++ " Change the global directory for the first tab page
++ tabrewind | 1wincmd w
++ cd ../Xdir1
++ call assert_equal("a Xdir1 0", GetCwdInfo(1, 1))
++ call assert_equal("b Xdir1 0", GetCwdInfo(2, 1))
++ call assert_equal("m Xtabdir1 2", GetCwdInfo(1, 2))
++ call assert_equal("n Xwindir2 1", GetCwdInfo(2, 2))
++
++ " Change the global directory for the second tab page
++ tabnext | 1wincmd w
++ cd ../Xdir3
++ call assert_equal("m Xdir3 0", GetCwdInfo(1, 2))
++ call assert_equal("n Xwindir2 1", GetCwdInfo(2, 2))
++ call assert_equal("o Xdir3 0", GetCwdInfo(3, 2))
++
++ " Change the tab-local directory for the third tab page
++ tabnext | 1wincmd w
++ cd ../Xdir1
++ call assert_equal("x Xdir1 0", GetCwdInfo(1, 3))
++ call assert_equal("y Xdir1 0", GetCwdInfo(2, 3))
++ call assert_equal("z Xwindir3 1", GetCwdInfo(3, 3))
++
++ enew | only | tabonly
++ new
++ endfunc
+*** ../vim-8.1.1217/src/testdir/test_mksession.vim 2019-02-03 14:52:42.505867463 +0100
+--- src/testdir/test_mksession.vim 2019-04-27 20:05:21.286555269 +0200
+***************
+*** 210,215 ****
+--- 210,257 ----
+ call delete('Xtest_mks.out')
+ endfunc
+
++ " Test for tabpage-local directory
++ func Test_mksession_tcd_multiple_tabs()
++ let save_cwd = getcwd()
++ call mkdir('Xtopdir')
++ cd Xtopdir
++ call mkdir('Xtabdir1')
++ call mkdir('Xtabdir2')
++ call mkdir('Xtabdir3')
++ call mkdir('Xwindir1')
++ call mkdir('Xwindir2')
++ call mkdir('Xwindir3')
++ tcd Xtabdir1
++ botright new
++ wincmd t
++ lcd ../Xwindir1
++ tabnew
++ tcd ../Xtabdir2
++ botright new
++ lcd ../Xwindir2
++ tabnew
++ tcd ../Xtabdir3
++ botright new
++ lcd ../Xwindir3
++ tabfirst
++ 1wincmd w
++ mksession! Xtest_mks.out
++ only | tabonly
++ source Xtest_mks.out
++ call assert_equal('Xtabdir1', fnamemodify(getcwd(-1, 1), ':t'))
++ call assert_equal('Xwindir1', fnamemodify(getcwd(1, 1), ':t'))
++ call assert_equal('Xtabdir1', fnamemodify(getcwd(2, 1), ':t'))
++ call assert_equal('Xtabdir2', fnamemodify(getcwd(-1, 2), ':t'))
++ call assert_equal('Xtabdir2', fnamemodify(getcwd(1, 2), ':t'))
++ call assert_equal('Xwindir2', fnamemodify(getcwd(2, 2), ':t'))
++ call assert_equal('Xtabdir3', fnamemodify(getcwd(-1, 3), ':t'))
++ call assert_equal('Xtabdir3', fnamemodify(getcwd(1, 3), ':t'))
++ call assert_equal('Xwindir3', fnamemodify(getcwd(2, 3), ':t'))
++ only | tabonly
++ exe 'cd ' . save_cwd
++ call delete("Xtopdir", "rf")
++ endfunc
++
+ func Test_mksession_blank_tabs()
+ tabnew
+ tabnew
+*** ../vim-8.1.1217/src/window.c 2019-04-26 20:32:57.086296530 +0200
+--- src/window.c 2019-04-27 20:05:21.286555269 +0200
+***************
+*** 3625,3630 ****
+--- 3625,3632 ----
+ unref_var_dict(tp->tp_vars);
+ #endif
+
++ vim_free(tp->tp_localdir);
++
+ #ifdef FEAT_PYTHON
+ python_tabpage_free(tp);
+ #endif
+***************
+*** 3662,3667 ****
+--- 3664,3671 ----
+ }
+ curtab = newtp;
+
++ newtp->tp_localdir = (tp->tp_localdir == NULL)
++ ? NULL : vim_strsave(tp->tp_localdir);
+ /* Create a new empty window. */
+ if (win_alloc_firstwin(tp->tp_curwin) == OK)
+ {
+***************
+*** 3839,3844 ****
+--- 3843,3851 ----
+ tabpage_T *tp;
+ int i = 1;
+
++ if (n == 0)
++ return curtab;
++
+ for (tp = first_tabpage; tp != NULL && i != n; tp = tp->tp_next)
+ ++i;
+ return tp;
+***************
+*** 4451,4461 ****
+ curwin->w_cursor.coladd = 0;
+ changed_line_abv_curs(); /* assume cursor position needs updating */
+
+! if (curwin->w_localdir != NULL)
+ {
+! /* Window has a local directory: Save current directory as global
+! * directory (unless that was done already) and change to the local
+! * directory. */
+ if (globaldir == NULL)
+ {
+ char_u cwd[MAXPATHL];
+--- 4458,4470 ----
+ curwin->w_cursor.coladd = 0;
+ changed_line_abv_curs(); /* assume cursor position needs updating */
+
+! if (curwin->w_localdir != NULL || curtab->tp_localdir != NULL)
+ {
+! char_u *dirname;
+!
+! // Window or tab has a local directory: Save current directory as
+! // global directory (unless that was done already) and change to the
+! // local directory.
+ if (globaldir == NULL)
+ {
+ char_u cwd[MAXPATHL];
+***************
+*** 4463,4469 ****
+ if (mch_dirname(cwd, MAXPATHL) == OK)
+ globaldir = vim_strsave(cwd);
+ }
+! if (mch_chdir((char *)curwin->w_localdir) == 0)
+ shorten_fnames(TRUE);
+ }
+ else if (globaldir != NULL)
+--- 4472,4483 ----
+ if (mch_dirname(cwd, MAXPATHL) == OK)
+ globaldir = vim_strsave(cwd);
+ }
+! if (curwin->w_localdir != NULL)
+! dirname = curwin->w_localdir;
+! else
+! dirname = curtab->tp_localdir;
+!
+! if (mch_chdir((char *)dirname) == 0)
+ shorten_fnames(TRUE);
+ }
+ else if (globaldir != NULL)
+*** ../vim-8.1.1217/src/version.c 2019-04-27 19:15:41.856806819 +0200
+--- src/version.c 2019-04-27 20:04:37.658747152 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1218,
+ /**/
+
+--
+WOMAN: Dennis, there's some lovely filth down here. Oh -- how d'you do?
+ARTHUR: How do you do, good lady. I am Arthur, King of the Britons.
+ Who's castle is that?
+WOMAN: King of the who?
+ 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.1219 b/data/vim/patches/8.1.1219
new file mode 100644
index 000000000..f651f4738
--- /dev/null
+++ b/data/vim/patches/8.1.1219
@@ -0,0 +1,480 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1219
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1219
+Problem: Not checking for NULL return from alloc().
+Solution: Add checks. (Martin Kunev, closes #4303, closes #4174)
+Files: src/beval.c, src/blowfish.c, src/crypt.c, src/crypt_zip.c,
+ src/ops.c, src/option.c, src/popupmnu.c, src/proto/blowfish.pro,
+ src/proto/crypt_zip.pro, src/gui_gtk_f.c, src/gui_gtk_x11.c,
+ src/libvterm/src/state.c, src/libvterm/src/termscreen.c
+
+
+*** ../vim-8.1.1218/src/beval.c 2019-01-17 15:43:21.753878419 +0100
+--- src/beval.c 2019-04-27 21:44:39.226975332 +0200
+***************
+*** 127,132 ****
+--- 127,134 ----
+ #ifdef FEAT_VARTABS
+ vim_free(beval->vts);
+ beval->vts = tabstop_copy(wp->w_buffer->b_p_vts_array);
++ if (wp->w_buffer->b_p_vts_array != NULL && beval->vts == NULL)
++ return FAIL;
+ #endif
+ beval->ts = wp->w_buffer->b_p_ts;
+ return OK;
+*** ../vim-8.1.1218/src/blowfish.c 2019-02-17 17:44:36.199875566 +0100
+--- src/blowfish.c 2019-04-27 21:36:48.073670930 +0200
+***************
+*** 636,642 ****
+ }
+ }
+
+! void
+ crypt_blowfish_init(
+ cryptstate_T *state,
+ char_u* key,
+--- 636,642 ----
+ }
+ }
+
+! int
+ crypt_blowfish_init(
+ cryptstate_T *state,
+ char_u* key,
+***************
+*** 647,652 ****
+--- 647,654 ----
+ {
+ bf_state_T *bfs = (bf_state_T *)alloc_clear(sizeof(bf_state_T));
+
++ if (bfs == NULL)
++ return FAIL;
+ state->method_state = bfs;
+
+ /* "blowfish" uses a 64 byte buffer, causing it to repeat 8 byte groups 8
+***************
+*** 654,663 ****
+ bfs->cfb_len = state->method_nr == CRYPT_M_BF ? BF_MAX_CFB_LEN : BF_BLOCK;
+
+ if (blowfish_self_test() == FAIL)
+! return;
+
+ bf_key_init(bfs, key, salt, salt_len);
+ bf_cfb_init(bfs, seed, seed_len);
+ }
+
+ /*
+--- 656,667 ----
+ bfs->cfb_len = state->method_nr == CRYPT_M_BF ? BF_MAX_CFB_LEN : BF_BLOCK;
+
+ if (blowfish_self_test() == FAIL)
+! return FAIL;
+
+ bf_key_init(bfs, key, salt, salt_len);
+ bf_cfb_init(bfs, seed, seed_len);
++
++ return OK;
+ }
+
+ /*
+*** ../vim-8.1.1218/src/crypt.c 2019-04-21 00:00:07.942354840 +0200
+--- src/crypt.c 2019-04-27 21:38:11.065263015 +0200
+***************
+*** 43,49 ****
+ int (* self_test_fn)();
+
+ // Function pointer for initializing encryption/decryption.
+! void (* init_fn)(cryptstate_T *state, char_u *key,
+ char_u *salt, int salt_len, char_u *seed, int seed_len);
+
+ /* Function pointers for encoding/decoding from one buffer into another.
+--- 43,49 ----
+ int (* self_test_fn)();
+
+ // Function pointer for initializing encryption/decryption.
+! int (* init_fn)(cryptstate_T *state, char_u *key,
+ char_u *salt, int salt_len, char_u *seed, int seed_len);
+
+ /* Function pointers for encoding/decoding from one buffer into another.
+***************
+*** 243,248 ****
+--- 243,249 ----
+
+ /*
+ * Allocate a crypt state and initialize it.
++ * Return NULL for failure.
+ */
+ cryptstate_T *
+ crypt_create(
+***************
+*** 255,262 ****
+ {
+ cryptstate_T *state = (cryptstate_T *)alloc((int)sizeof(cryptstate_T));
+
+ state->method_nr = method_nr;
+! cryptmethods[method_nr].init_fn(state, key, salt, salt_len, seed, seed_len);
+ return state;
+ }
+
+--- 256,271 ----
+ {
+ cryptstate_T *state = (cryptstate_T *)alloc((int)sizeof(cryptstate_T));
+
++ if (state == NULL)
++ return state;
++
+ state->method_nr = method_nr;
+! if (cryptmethods[method_nr].init_fn(
+! state, key, salt, salt_len, seed, seed_len) == FAIL)
+! {
+! vim_free(state);
+! return NULL;
+! }
+ return state;
+ }
+
+*** ../vim-8.1.1218/src/crypt_zip.c 2019-03-30 18:46:57.340077448 +0100
+--- src/crypt_zip.c 2019-04-27 21:39:16.576855289 +0200
+***************
+*** 78,84 ****
+ /*
+ * Initialize for encryption/decryption.
+ */
+! void
+ crypt_zip_init(
+ cryptstate_T *state,
+ char_u *key,
+--- 78,84 ----
+ /*
+ * Initialize for encryption/decryption.
+ */
+! int
+ crypt_zip_init(
+ cryptstate_T *state,
+ char_u *key,
+***************
+*** 91,96 ****
+--- 91,98 ----
+ zip_state_T *zs;
+
+ zs = (zip_state_T *)alloc(sizeof(zip_state_T));
++ if (zs == NULL)
++ return FAIL;
+ state->method_state = zs;
+
+ make_crc_tab();
+***************
+*** 99,104 ****
+--- 101,108 ----
+ zs->keys[2] = 878082192L;
+ for (p = key; *p != NUL; ++p)
+ UPDATE_KEYS_ZIP(zs->keys, (int)*p);
++
++ return OK;
+ }
+
+ /*
+*** ../vim-8.1.1218/src/ops.c 2019-03-30 18:46:57.356077354 +0100
+--- src/ops.c 2019-04-27 21:43:12.119465720 +0200
+***************
+*** 6170,6190 ****
+ y_ptr->y_size = linecount;
+ y_ptr->y_time_set = timestamp;
+ if (linecount == 0)
+ y_ptr->y_array = NULL;
+! else
+ {
+! y_ptr->y_array =
+! (char_u **)alloc((unsigned)(linecount * sizeof(char_u *)));
+! for (i = 0; i < linecount; i++)
+ {
+! if (vp[i + 6].bv_allocated)
+! {
+! y_ptr->y_array[i] = vp[i + 6].bv_string;
+! vp[i + 6].bv_string = NULL;
+! }
+! else
+! y_ptr->y_array[i] = vim_strsave(vp[i + 6].bv_string);
+ }
+ }
+ }
+
+--- 6170,6194 ----
+ y_ptr->y_size = linecount;
+ y_ptr->y_time_set = timestamp;
+ if (linecount == 0)
++ {
+ y_ptr->y_array = NULL;
+! return;
+! }
+! y_ptr->y_array = (char_u **)alloc((unsigned)(linecount * sizeof(char_u *)));
+! if (y_ptr->y_array == NULL)
+! {
+! y_ptr->y_size = 0; // ensure object state is consistent
+! return;
+! }
+! for (i = 0; i < linecount; i++)
+ {
+! if (vp[i + 6].bv_allocated)
+ {
+! y_ptr->y_array[i] = vp[i + 6].bv_string;
+! vp[i + 6].bv_string = NULL;
+ }
++ else
++ y_ptr->y_array[i] = vim_strsave(vp[i + 6].bv_string);
+ }
+ }
+
+*** ../vim-8.1.1218/src/option.c 2019-04-11 11:19:21.549778651 +0200
+--- src/option.c 2019-04-27 21:44:17.207098326 +0200
+***************
+*** 13011,13023 ****
+ int *newts;
+ int t;
+
+! if (oldts == 0)
+! return 0;
+!
+! newts = (int *) alloc((unsigned) ((oldts[0] + 1) * sizeof(int)));
+! for (t = 0; t <= oldts[0]; ++t)
+! newts[t] = oldts[t];
+!
+ return newts;
+ }
+ #endif
+--- 13011,13022 ----
+ int *newts;
+ int t;
+
+! if (oldts == NULL)
+! return NULL;
+! newts = (int *)alloc((unsigned)((oldts[0] + 1) * sizeof(int)));
+! if (newts != NULL)
+! for (t = 0; t <= oldts[0]; ++t)
+! newts[t] = oldts[t];
+ return newts;
+ }
+ #endif
+*** ../vim-8.1.1218/src/popupmnu.c 2019-04-08 18:15:36.468223210 +0200
+--- src/popupmnu.c 2019-04-27 21:45:50.918579053 +0200
+***************
+*** 1102,1113 ****
+ else
+ thislen = item->bytelen;
+
+! /* put indent at the start */
+ p = alloc(thislen + item->indent * 2 + 1);
+ for (ind = 0; ind < item->indent * 2; ++ind)
+ p[ind] = ' ';
+
+! /* exclude spaces at the end of the string */
+ for (copylen = thislen; copylen > 0; --copylen)
+ if (item->start[skip + copylen - 1] != ' ')
+ break;
+--- 1102,1120 ----
+ else
+ thislen = item->bytelen;
+
+! // put indent at the start
+ p = alloc(thislen + item->indent * 2 + 1);
++ if (p == NULL)
++ {
++ for (line = 0; line <= height - 1; ++line)
++ vim_free((*array)[line].pum_text);
++ vim_free(*array);
++ goto failed;
++ }
+ for (ind = 0; ind < item->indent * 2; ++ind)
+ p[ind] = ' ';
+
+! // exclude spaces at the end of the string
+ for (copylen = thislen; copylen > 0; --copylen)
+ if (item->start[skip + copylen - 1] != ' ')
+ break;
+*** ../vim-8.1.1218/src/proto/blowfish.pro 2018-05-17 13:52:28.000000000 +0200
+--- src/proto/blowfish.pro 2019-04-27 21:32:10.894967886 +0200
+***************
+*** 1,6 ****
+ /* blowfish.c */
+ void crypt_blowfish_encode(cryptstate_T *state, char_u *from, size_t len, char_u *to);
+ void crypt_blowfish_decode(cryptstate_T *state, char_u *from, size_t len, char_u *to);
+! void crypt_blowfish_init(cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len);
+ int blowfish_self_test(void);
+ /* vim: set ft=c : */
+--- 1,6 ----
+ /* blowfish.c */
+ void crypt_blowfish_encode(cryptstate_T *state, char_u *from, size_t len, char_u *to);
+ void crypt_blowfish_decode(cryptstate_T *state, char_u *from, size_t len, char_u *to);
+! int crypt_blowfish_init(cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len);
+ int blowfish_self_test(void);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1218/src/proto/crypt_zip.pro 2018-05-17 13:52:30.000000000 +0200
+--- src/proto/crypt_zip.pro 2019-04-27 21:32:10.894967886 +0200
+***************
+*** 1,5 ****
+ /* crypt_zip.c */
+! void crypt_zip_init(cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len);
+ void crypt_zip_encode(cryptstate_T *state, char_u *from, size_t len, char_u *to);
+ void crypt_zip_decode(cryptstate_T *state, char_u *from, size_t len, char_u *to);
+ /* vim: set ft=c : */
+--- 1,5 ----
+ /* crypt_zip.c */
+! int crypt_zip_init(cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len);
+ void crypt_zip_encode(cryptstate_T *state, char_u *from, size_t len, char_u *to);
+ void crypt_zip_decode(cryptstate_T *state, char_u *from, size_t len, char_u *to);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1218/src/gui_gtk_f.c 2019-03-02 10:13:36.792974862 +0100
+--- src/gui_gtk_f.c 2019-04-27 21:48:42.633651485 +0200
+***************
+*** 130,135 ****
+--- 130,137 ----
+
+ /* LINTED: avoid warning: conversion to 'unsigned long' */
+ child = g_new(GtkFormChild, 1);
++ if (child == NULL)
++ return;
+
+ child->widget = child_widget;
+ child->window = NULL;
+*** ../vim-8.1.1218/src/gui_gtk_x11.c 2019-03-02 10:13:36.792974862 +0100
+--- src/gui_gtk_x11.c 2019-04-27 21:51:52.784651485 +0200
+***************
+*** 1576,1587 ****
+ if (string != NULL)
+ {
+ tmpbuf = alloc(length + 2);
+! tmpbuf[0] = 0xff;
+! tmpbuf[1] = 0xfe;
+! mch_memmove(tmpbuf + 2, string, (size_t)length);
+! vim_free(string);
+! string = tmpbuf;
+! length += 2;
+
+ #if !GTK_CHECK_VERSION(3,0,0)
+ /* Looks redundant even for GTK2 because these values are
+--- 1576,1590 ----
+ if (string != NULL)
+ {
+ tmpbuf = alloc(length + 2);
+! if (tmpbuf != NULL)
+! {
+! tmpbuf[0] = 0xff;
+! tmpbuf[1] = 0xfe;
+! mch_memmove(tmpbuf + 2, string, (size_t)length);
+! vim_free(string);
+! string = tmpbuf;
+! length += 2;
+! }
+
+ #if !GTK_CHECK_VERSION(3,0,0)
+ /* Looks redundant even for GTK2 because these values are
+***************
+*** 1606,1615 ****
+ tmpbuf[0] = motion_type;
+ STRCPY(tmpbuf + 1, p_enc);
+ mch_memmove(tmpbuf + l + 2, string, (size_t)length);
+ }
+- length += l + 2;
+- vim_free(string);
+- string = tmpbuf;
+ type = vimenc_atom;
+ }
+
+--- 1609,1618 ----
+ tmpbuf[0] = motion_type;
+ STRCPY(tmpbuf + 1, p_enc);
+ mch_memmove(tmpbuf + l + 2, string, (size_t)length);
++ length += l + 2;
++ vim_free(string);
++ string = tmpbuf;
+ }
+ type = vimenc_atom;
+ }
+
+*** ../vim-8.1.1218/src/libvterm/src/state.c 2019-04-06 17:33:20.651486473 +0200
+--- src/libvterm/src/state.c 2019-04-27 21:57:43.626854093 +0200
+***************
+*** 253,258 ****
+--- 253,260 ----
+ // We'll have at most len codepoints, plus one from a previous incomplete
+ // sequence.
+ codepoints = vterm_allocator_malloc(state->vt, (len + 1) * sizeof(uint32_t));
++ if (codepoints == NULL)
++ return 0;
+
+ encoding =
+ state->gsingle_set ? &state->encoding[state->gsingle_set] :
+***************
+*** 330,335 ****
+--- 332,339 ----
+ break;
+
+ chars = vterm_allocator_malloc(state->vt, (glyph_ends - glyph_starts + 1) * sizeof(uint32_t));
++ if (chars == NULL)
++ break;
+
+ for( ; i < glyph_ends; i++) {
+ int this_width;
+***************
+*** 1626,1631 ****
+--- 1630,1637 ----
+
+ if(cols != state->cols) {
+ unsigned char *newtabstops = vterm_allocator_malloc(state->vt, (cols + 7) / 8);
++ if (newtabstops == NULL)
++ return 0;
+
+ /* TODO: This can all be done much more efficiently bytewise */
+ int col;
+***************
+*** 1651,1656 ****
+--- 1657,1664 ----
+
+ if(rows != state->rows) {
+ VTermLineInfo *newlineinfo = vterm_allocator_malloc(state->vt, rows * sizeof(VTermLineInfo));
++ if (newlineinfo == NULL)
++ return 0;
+
+ int row;
+ for(row = 0; row < state->rows && row < rows; row++) {
+*** ../vim-8.1.1218/src/libvterm/src/termscreen.c 2018-12-24 21:38:40.814173687 +0100
+--- src/libvterm/src/termscreen.c 2019-04-27 21:58:10.334718969 +0200
+***************
+*** 83,88 ****
+--- 83,90 ----
+ ScreenCell *new_buffer = vterm_allocator_malloc(screen->vt, sizeof(ScreenCell) * new_rows * new_cols);
+ int row, col;
+
++ if (new_buffer == NULL)
++ return NULL;
+ for(row = 0; row < new_rows; row++) {
+ for(col = 0; col < new_cols; col++) {
+ ScreenCell *new_cell = new_buffer + row*new_cols + col;
+*** ../vim-8.1.1218/src/version.c 2019-04-27 20:36:52.534303564 +0200
+--- src/version.c 2019-04-27 21:33:25.082620378 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1219,
+ /**/
+
+--
+WOMAN: King of the who?
+ARTHUR: The Britons.
+WOMAN: Who are the Britons?
+ARTHUR: Well, we all are. we're all Britons and 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.1220 b/data/vim/patches/8.1.1220
new file mode 100644
index 000000000..5a760fb2c
--- /dev/null
+++ b/data/vim/patches/8.1.1220
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1220
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1220 (after 8.1.1219)
+Problem: Build fails on MS-Windows.
+Solution: Move declaration to start of block.
+Files: src/libvterm/src/state.c
+
+
+*** ../vim-8.1.1219/src/libvterm/src/state.c 2019-04-27 22:06:33.352200698 +0200
+--- src/libvterm/src/state.c 2019-04-27 22:36:49.400554045 +0200
+***************
+*** 1629,1640 ****
+ VTermPos delta = { 0, 0 };
+
+ if(cols != state->cols) {
+ unsigned char *newtabstops = vterm_allocator_malloc(state->vt, (cols + 7) / 8);
+ if (newtabstops == NULL)
+ return 0;
+
+ /* TODO: This can all be done much more efficiently bytewise */
+- int col;
+ for(col = 0; col < state->cols && col < cols; col++) {
+ unsigned char mask = 1 << (col & 7);
+ if(state->tabstops[col >> 3] & mask)
+--- 1629,1640 ----
+ VTermPos delta = { 0, 0 };
+
+ if(cols != state->cols) {
++ int col;
+ unsigned char *newtabstops = vterm_allocator_malloc(state->vt, (cols + 7) / 8);
+ if (newtabstops == NULL)
+ return 0;
+
+ /* TODO: This can all be done much more efficiently bytewise */
+ for(col = 0; col < state->cols && col < cols; col++) {
+ unsigned char mask = 1 << (col & 7);
+ if(state->tabstops[col >> 3] & mask)
+*** ../vim-8.1.1219/src/version.c 2019-04-27 22:06:33.352200698 +0200
+--- src/version.c 2019-04-27 22:38:18.324146810 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1220,
+ /**/
+
+--
+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.1221 b/data/vim/patches/8.1.1221
new file mode 100644
index 000000000..bc64a892a
--- /dev/null
+++ b/data/vim/patches/8.1.1221
@@ -0,0 +1,212 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1221
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1221
+Problem: Filtering does not work when listing marks.
+Solution: Implement filtering marks. (Marcin Szamotulski, closes #3895)
+Files: runtime/doc/various.txt, src/mark.c,
+ src/testdir/test_filter_cmd.vim
+
+
+*** ../vim-8.1.1220/runtime/doc/various.txt 2019-04-27 13:03:20.012715914 +0200
+--- runtime/doc/various.txt 2019-04-27 22:29:37.358502260 +0200
+***************
+*** 573,589 ****
+ 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.
+--- 571,589 ----
+ 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
+! |:clist| - filter by file name or module name
+! |: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
+! |:marks| - filter by text in the current file,
+! or file name for other files
+! |:oldfiles| - filter by file name
+! |:set| - filter by variable name
+
+ Only normal messages are filtered, error messages are
+ not.
+*** ../vim-8.1.1220/src/mark.c 2019-01-27 15:07:35.161741346 +0100
+--- src/mark.c 2019-04-27 22:28:39.730756612 +0200
+***************
+*** 744,754 ****
+ int c,
+ char_u *arg,
+ pos_T *p,
+! char_u *name,
+ int current) /* in current file */
+ {
+ static int did_title = FALSE;
+ int mustfree = FALSE;
+
+ if (c == -1) /* finish up */
+ {
+--- 744,755 ----
+ int c,
+ char_u *arg,
+ pos_T *p,
+! char_u *name_arg,
+ int current) /* in current file */
+ {
+ static int did_title = FALSE;
+ int mustfree = FALSE;
++ char_u *name = name_arg;
+
+ if (c == -1) /* finish up */
+ {
+***************
+*** 762,796 ****
+ semsg(_("E283: No marks matching \"%s\""), arg);
+ }
+ }
+! /* don't output anything if 'q' typed at --more-- prompt */
+ else if (!got_int
+ && (arg == NULL || vim_strchr(arg, c) != NULL)
+ && p->lnum != 0)
+ {
+! if (!did_title)
+ {
+! /* Highlight title */
+! msg_puts_title(_("\nmark line col file/text"));
+! did_title = TRUE;
+ }
+! msg_putchar('\n');
+! if (!got_int)
+ {
+! sprintf((char *)IObuff, " %c %6ld %4d ", c, p->lnum, p->col);
+! msg_outtrans(IObuff);
+! if (name == NULL && current)
+ {
+! name = mark_line(p, 15);
+! mustfree = TRUE;
+ }
+! if (name != NULL)
+ {
+! msg_outtrans_attr(name, current ? HL_ATTR(HLF_D) : 0);
+! if (mustfree)
+! vim_free(name);
+ }
+ }
+! out_flush(); /* show one line at a time */
+ }
+ }
+
+--- 763,800 ----
+ semsg(_("E283: No marks matching \"%s\""), arg);
+ }
+ }
+! // don't output anything if 'q' typed at --more-- prompt
+ else if (!got_int
+ && (arg == NULL || vim_strchr(arg, c) != NULL)
+ && p->lnum != 0)
+ {
+! if (name == NULL && current)
+ {
+! name = mark_line(p, 15);
+! mustfree = TRUE;
+ }
+! if (!message_filtered(name))
+ {
+! if (!did_title)
+ {
+! // Highlight title
+! msg_puts_title(_("\nmark line col file/text"));
+! did_title = TRUE;
+ }
+! msg_putchar('\n');
+! if (!got_int)
+ {
+! sprintf((char *)IObuff, " %c %6ld %4d ", c, p->lnum, p->col);
+! msg_outtrans(IObuff);
+! if (name != NULL)
+! {
+! msg_outtrans_attr(name, current ? HL_ATTR(HLF_D) : 0);
+! }
+ }
++ out_flush(); // show one line at a time
+ }
+! if (mustfree)
+! vim_free(name);
+ }
+ }
+
+*** ../vim-8.1.1220/src/testdir/test_filter_cmd.vim 2018-11-03 18:59:49.690644045 +0100
+--- src/testdir/test_filter_cmd.vim 2019-04-27 22:33:07.745561137 +0200
+***************
+*** 126,132 ****
+ 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
+--- 126,147 ----
+ let res = split(execute("filter /\.c$/ jumps"), "\n")[1:]
+ call assert_equal([" 2 1 0 file.c", ">"], res)
+
+! " Test filtering :marks command
+! b file.c
+! mark A
+! b file.h
+! mark B
+! let res = split(execute("filter /\.c$/ marks"), "\n")[1:]
+! call assert_equal([" A 1 0 file.c"], res)
+!
+! call setline(1, ['one', 'two', 'three'])
+! 1mark a
+! 2mark b
+! 3mark c
+! let res = split(execute("filter /two/ marks abc"), "\n")[1:]
+! call assert_equal([" b 2 0 two"], res)
+!
+! bwipe! file.c
+! bwipe! file.h
+! bwipe! file.hs
+ endfunc
+*** ../vim-8.1.1220/src/version.c 2019-04-27 22:38:26.788107972 +0200
+--- src/version.c 2019-04-27 22:39:21.911854726 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1221,
+ /**/
+
+--
+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.1222 b/data/vim/patches/8.1.1222
new file mode 100644
index 000000000..4d1128864
--- /dev/null
+++ b/data/vim/patches/8.1.1222
@@ -0,0 +1,65 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1222
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1222 (after 8.1.1219)
+Problem: Build still fails on MS-Windows.
+Solution: Move another declaration to start of block.
+Files: src/libvterm/src/state.c
+
+
+*** ../vim-8.1.1221/src/libvterm/src/state.c 2019-04-27 22:38:26.788107972 +0200
+--- src/libvterm/src/state.c 2019-04-27 22:43:52.602605129 +0200
+***************
+*** 1656,1666 ****
+ }
+
+ if(rows != state->rows) {
+ VTermLineInfo *newlineinfo = vterm_allocator_malloc(state->vt, rows * sizeof(VTermLineInfo));
+ if (newlineinfo == NULL)
+ return 0;
+
+- int row;
+ for(row = 0; row < state->rows && row < rows; row++) {
+ newlineinfo[row] = state->lineinfo[row];
+ }
+--- 1656,1666 ----
+ }
+
+ if(rows != state->rows) {
++ int row;
+ VTermLineInfo *newlineinfo = vterm_allocator_malloc(state->vt, rows * sizeof(VTermLineInfo));
+ if (newlineinfo == NULL)
+ return 0;
+
+ for(row = 0; row < state->rows && row < rows; row++) {
+ newlineinfo[row] = state->lineinfo[row];
+ }
+*** ../vim-8.1.1221/src/version.c 2019-04-27 22:40:03.927661368 +0200
+--- src/version.c 2019-04-27 22:44:21.166472794 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1222,
+ /**/
+
+--
+WOMAN: I didn't know we had a king. I thought we were an autonomous
+ collective.
+DENNIS: You're fooling yourself. We're living in a dictatorship. A
+ self-perpetuating autocracy in which the working classes--
+WOMAN: Oh there you go, bringing class into it again.
+DENNIS: That's what it's all about if only people would--
+ 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.1223 b/data/vim/patches/8.1.1223
new file mode 100644
index 000000000..793d0275d
--- /dev/null
+++ b/data/vim/patches/8.1.1223
@@ -0,0 +1,81 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1223
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1223
+Problem: Middle mouse click test fails without a clipboard.
+Solution: Check if the clipboard can be used. (Dominique Pelle, Christian
+ Brabandt) Also use WorkingClipboard() instead of checking for the
+ "clipboard" feature.
+Files: src/testdir/test_termcodes.vim, src/testdir/test_quotestar.vim
+
+
+*** ../vim-8.1.1222/src/testdir/test_termcodes.vim 2019-04-27 19:11:31.346034085 +0200
+--- src/testdir/test_termcodes.vim 2019-04-28 12:58:35.216400676 +0200
+***************
+*** 5,10 ****
+--- 5,12 ----
+ finish
+ endif
+
++ source shared.vim
++
+ " Helper function to emit a terminal escape code.
+ func TerminalEscapeCode(code_xterm, code_sgr, row, col, m)
+ if &ttymouse ==# 'xterm2'
+***************
+*** 77,82 ****
+--- 79,88 ----
+ endfunc
+
+ func Test_xterm_mouse_middle_click()
++ if !WorkingClipboard()
++ throw 'Skipped: No working clipboard'
++ endif
++
+ new
+ let save_mouse = &mouse
+ let save_term = &term
+*** ../vim-8.1.1222/src/testdir/test_quotestar.vim 2019-04-20 23:47:42.518391308 +0200
+--- src/testdir/test_quotestar.vim 2019-04-28 12:57:47.148658968 +0200
+***************
+*** 1,6 ****
+ " *-register (quotestar) tests
+
+! if !has('clipboard')
+ finish
+ endif
+
+--- 1,7 ----
+ " *-register (quotestar) tests
+
+! source shared.vim
+! if !WorkingClipboard()
+ finish
+ endif
+
+*** ../vim-8.1.1222/src/version.c 2019-04-27 22:44:57.226305660 +0200
+--- src/version.c 2019-04-28 12:58:55.272292884 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1223,
+ /**/
+
+--
+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.1224 b/data/vim/patches/8.1.1224
new file mode 100644
index 000000000..347485a4a
--- /dev/null
+++ b/data/vim/patches/8.1.1224
@@ -0,0 +1,515 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1224
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1224
+Problem: MS-Windows: cannot specify font weight.
+Solution: Add the "W" option to 'guifont'. (closes #4309) Move GUI font
+ explanation out of options.txt.
+Files: runtime/doc/options.txt, runtime/doc/gui.txt,
+ runtime/doc/mbyte.txt, src/gui_w32.c, src/os_mswin.c
+
+
+*** ../vim-8.1.1223/runtime/doc/options.txt 2019-04-27 20:36:52.526303597 +0200
+--- runtime/doc/options.txt 2019-04-28 13:54:11.773008464 +0200
+***************
+*** 3705,3795 ****
+ {not in Vi}
+ {only available when compiled with GUI enabled}
+ This is a list of fonts which will be used for the GUI version of Vim.
+! In its simplest form the value is just one font name. When
+! the font cannot be found you will get an error message. To try other
+! font names a list can be specified, font names separated with commas.
+! The first valid font is used.
+!
+! On systems where 'guifontset' is supported (X11) and 'guifontset' is
+! not empty, then 'guifont' is not used.
+!
+! Note: As to the GTK GUIs, no error is given against any invalid names,
+! and the first element of the list is always picked up and made use of.
+! This is because, instead of identifying a given name with a font, the
+! GTK GUIs use it to construct a pattern and try to look up a font which
+! best matches the pattern among available fonts, and this way, the
+! matching never fails. An invalid name doesn't matter because a number
+! of font properties other than name will do to get the matching done.
+!
+! Spaces after a comma are ignored. To include a comma in a font name
+! precede it with a backslash. Setting an option requires an extra
+! backslash before a space and a backslash. See also
+! |option-backslash|. For example: >
+! :set guifont=Screen15,\ 7x13,font\\,with\\,commas
+! < will make Vim try to use the font "Screen15" first, and if it fails it
+! will try to use "7x13" and then "font,with,commas" instead.
+!
+! If none of the fonts can be loaded, Vim will keep the current setting.
+! If an empty font list is given, Vim will try using other resource
+! settings (for X, it will use the Vim.font resource), and finally it
+! will try some builtin default which should always be there ("7x13" in
+! the case of X). The font names given should be "normal" fonts. Vim
+! will try to find the related bold and italic fonts.
+!
+! For Win32, GTK, Motif, Mac OS and Photon: >
+! :set guifont=*
+! < will bring up a font requester, where you can pick the font you want.
+!
+! The font name depends on the GUI used. See |setting-guifont| for a
+! way to set 'guifont' for various systems.
+!
+! For the GTK+ 2 and 3 GUIs, the font name looks like this: >
+! :set guifont=Andale\ Mono\ 11
+! < That's all. XLFDs are not used. For Chinese this is reported to work
+! well: >
+! if has("gui_gtk2")
+! set guifont=Bitstream\ Vera\ Sans\ Mono\ 12,Fixed\ 12
+! set guifontwide=Microsoft\ Yahei\ 12,WenQuanYi\ Zen\ Hei\ 12
+! endif
+! <
+! (Replace gui_gtk2 with gui_gtk3 for the GTK+ 3 GUI)
+!
+! For Mac OSX you can use something like this: >
+! :set guifont=Monaco:h10
+! < Also see 'macatsui', it can help fix display problems.
+! *E236*
+! Note that the fonts must be mono-spaced (all characters have the same
+! width). An exception is GTK: all fonts are accepted, but mono-spaced
+! fonts look best.
+!
+! To preview a font on X11, you might be able to use the "xfontsel"
+! program. The "xlsfonts" program gives a list of all available fonts.
+!
+! For the Win32 GUI *E244* *E245*
+! - takes these options in the font name:
+! hXX - height is XX (points, can be floating-point)
+! wXX - width is XX (points, can be floating-point)
+! b - bold
+! i - italic
+! u - underline
+! s - strikeout
+! cXX - character set XX. Valid charsets are: ANSI, ARABIC,
+! BALTIC, CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK,
+! HANGEUL, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS,
+! SYMBOL, THAI, TURKISH, VIETNAMESE ANSI and BALTIC.
+! Normally you would use "cDEFAULT".
+! qXX - quality XX. Valid quality names are: PROOF, DRAFT,
+! ANTIALIASED, NONANTIALIASED, CLEARTYPE, DEFAULT.
+! Normally you would use "qDEFAULT".
+! Some quality values are not supported in legacy OSs.
+!
+! Use a ':' to separate the options.
+! - A '_' can be used in the place of a space, so you don't need to use
+! backslashes to escape the spaces.
+! - Examples: >
+! :set guifont=courier_new:h12:w5:b:cRUSSIAN
+! :set guifont=Andale_Mono:h7.5:w4.5
+! < See also |font-sizes|.
+
+ *'guifontset'* *'gfs'*
+ *E250* *E252* *E234* *E597* *E598*
+--- 3727,3734 ----
+ {not in Vi}
+ {only available when compiled with GUI enabled}
+ This is a list of fonts which will be used for the GUI version of Vim.
+! In its simplest form the value is just one font name.
+! See |gui-font| for the details.
+
+ *'guifontset'* *'gfs'*
+ *E250* *E252* *E234* *E597* *E598*
+***************
+*** 3802,3821 ****
+ When not empty, specifies two (or more) fonts to be used. The first
+ one for normal English, the second one for your special language. See
+ |xfontset|.
+! Setting this option also means that all font names will be handled as
+! a fontset name. Also the ones used for the "font" argument of the
+! |:highlight| command.
+! The fonts must match with the current locale. If fonts for the
+! character sets that the current locale uses are not included, setting
+! 'guifontset' will fail.
+! Note the difference between 'guifont' and 'guifontset': In 'guifont'
+! the comma-separated names are alternative names, one of which will be
+! used. In 'guifontset' the whole string is one fontset name,
+! including the commas. It is not possible to specify alternative
+! fontset names.
+! This example works on many X11 systems: >
+! :set guifontset=-*-*-medium-r-normal--16-*-*-*-c-*-*-*
+! <
+ *'guifontwide'* *'gfw'* *E231* *E533* *E534*
+ 'guifontwide' 'gfw' string (default "")
+ global
+--- 3741,3747 ----
+ When not empty, specifies two (or more) fonts to be used. The first
+ one for normal English, the second one for your special language. See
+ |xfontset|.
+!
+ *'guifontwide'* *'gfw'* *E231* *E533* *E534*
+ 'guifontwide' 'gfw' string (default "")
+ global
+***************
+*** 3823,3853 ****
+ {only available when compiled with GUI enabled}
+ When not empty, specifies a comma-separated list of fonts to be used
+ for double-width characters. The first font that can be loaded is
+! used.
+! Note: The size of these fonts must be exactly twice as wide as the one
+! specified with 'guifont' and the same height.
+!
+! All GUI versions but GTK+:
+!
+! 'guifontwide' is only used when 'encoding' is set to "utf-8" and
+! 'guifontset' is empty or invalid.
+! When 'guifont' is set and a valid font is found in it and
+! 'guifontwide' is empty Vim will attempt to find a matching
+! double-width font and set 'guifontwide' to it.
+!
+! GTK+ GUI only: *guifontwide_gtk*
+!
+! If set and valid, 'guifontwide' is always used for double width
+! characters, even if 'encoding' is not set to "utf-8".
+! Vim does not attempt to find an appropriate value for 'guifontwide'
+! automatically. If 'guifontwide' is empty Pango/Xft will choose the
+! font for characters not available in 'guifont'. Thus you do not need
+! to set 'guifontwide' at all unless you want to override the choice
+! made by Pango/Xft.
+!
+! Windows +multibyte only: *guifontwide_win_mbyte*
+!
+! If set and valid, 'guifontwide' is used for IME instead of 'guifont'.
+
+ *'guiheadroom'* *'ghr'*
+ 'guiheadroom' 'ghr' number (default 50)
+--- 3749,3755 ----
+ {only available when compiled with GUI enabled}
+ When not empty, specifies a comma-separated list of fonts to be used
+ for double-width characters. The first font that can be loaded is
+! used. See |gui-fontwide|.
+
+ *'guiheadroom'* *'ghr'*
+ 'guiheadroom' 'ghr' number (default 50)
+*** ../vim-8.1.1223/runtime/doc/gui.txt 2019-01-06 13:10:46.324499127 +0100
+--- runtime/doc/gui.txt 2019-04-28 13:58:23.719831619 +0200
+***************
+*** 1,4 ****
+! *gui.txt* For Vim version 8.1. Last change: 2018 Mar 06
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *gui.txt* For Vim version 8.1. Last change: 2019 Apr 28
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 11,18 ****
+ 3. Mouse Control |gui-mouse|
+ 4. Making GUI Selections |gui-selections|
+ 5. Menus |menus|
+! 6. Extras |gui-extras|
+! 7. Shell Commands |gui-shell|
+
+ Other GUI documentation:
+ |gui_x11.txt| For specific items of the X11 GUI.
+--- 11,19 ----
+ 3. Mouse Control |gui-mouse|
+ 4. Making GUI Selections |gui-selections|
+ 5. Menus |menus|
+! 6. Font |gui-font|
+! 7. Extras |gui-extras|
+! 8. Shell Commands |gui-shell|
+
+ Other GUI documentation:
+ |gui_x11.txt| For specific items of the X11 GUI.
+***************
+*** 1037,1043 ****
+ Note that a menu that starts with ']' will not be displayed.
+
+ ==============================================================================
+! 6. Extras *gui-extras*
+
+ This section describes other features which are related to the GUI.
+
+--- 1038,1176 ----
+ Note that a menu that starts with ']' will not be displayed.
+
+ ==============================================================================
+! 6. Font
+!
+! This section describes font related options.
+!
+! GUIFONT *gui-font*
+!
+! 'guifont' is the option that tells Vim what font to use. In its simplest form
+! the value is just one font name. It can also be a list of font names
+! separated with commas. The first valid font is used. When no valid font can
+! be found you will get an error message.
+!
+! On systems where 'guifontset' is supported (X11) and 'guifontset' is not
+! empty, then 'guifont' is not used. See |xfontset|.
+!
+! Note: As to the GTK GUIs, no error is given against any invalid names, and the
+! first element of the list is always picked up and made use of. This is
+! because, instead of identifying a given name with a font, the GTK GUIs use it
+! to construct a pattern and try to look up a font which best matches the
+! pattern among available fonts, and this way, the matching never fails. An
+! invalid name doesn't matter because a number of font properties other than
+! name will do to get the matching done.
+!
+! Spaces after a comma are ignored. To include a comma in a font name precede
+! it with a backslash. Setting an option requires an extra backslash before a
+! space and a backslash. See also |option-backslash|. For example: >
+! :set guifont=Screen15,\ 7x13,font\\,with\\,commas
+! will make Vim try to use the font "Screen15" first, and if it fails it will
+! try to use "7x13" and then "font,with,commas" instead.
+!
+! If none of the fonts can be loaded, Vim will keep the current setting. If an
+! empty font list is given, Vim will try using other resource settings (for X,
+! it will use the Vim.font resource), and finally it will try some builtin
+! default which should always be there ("7x13" in the case of X). The font
+! names given should be "normal" fonts. Vim will try to find the related bold
+! and italic fonts.
+!
+! For Win32, GTK, Motif, Mac OS and Photon: >
+! :set guifont=*
+! will bring up a font requester, where you can pick the font you want.
+!
+! The font name depends on the GUI used. See |setting-guifont| for a way to set
+! 'guifont' for various systems.
+!
+! For the GTK+ 2 and 3 GUIs, the font name looks like this: >
+! :set guifont=Andale\ Mono\ 11
+! That's all. XLFDs are not used. For Chinese this is reported to work well: >
+! if has("gui_gtk2")
+! set guifont=Bitstream\ Vera\ Sans\ Mono\ 12,Fixed\ 12
+! set guifontwide=Microsoft\ Yahei\ 12,WenQuanYi\ Zen\ Hei\ 12
+! endif
+! <
+! (Replace gui_gtk2 with gui_gtk3 for the GTK+ 3 GUI)
+!
+! For Mac OSX you can use something like this: >
+! :set guifont=Monaco:h10
+! Also see 'macatsui', it can help fix display problems.
+! *E236*
+! Note that the fonts must be mono-spaced (all characters have the same width).
+! An exception is GTK: all fonts are accepted, but mono-spaced fonts look best.
+!
+! To preview a font on X11, you might be able to use the "xfontsel" program.
+! The "xlsfonts" program gives a list of all available fonts.
+!
+! For the Win32 GUI *E244* *E245*
+! - Takes these options in the font name (use a ':' to separate the options):
+! hXX - height is XX (points, can be floating-point)
+! wXX - width is XX (points, can be floating-point)
+! WXX - weight is XX (see Note on Weights below)
+! b - bold. This is equivalent to setting the weight to 700.
+! i - italic
+! u - underline
+! s - strikeout
+! cXX - character set XX. Valid charsets are: ANSI, ARABIC, BALTIC,
+! CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK, HANGEUL,
+! HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS, SYMBOL, THAI,
+! TURKISH, VIETNAMESE ANSI and BALTIC. Normally you would use
+! "cDEFAULT".
+! qXX - quality XX. Valid quality names are: PROOF, DRAFT, ANTIALIASED,
+! NONANTIALIASED, CLEARTYPE, DEFAULT. Normally you would use
+! "qDEFAULT".
+! Some quality values are not supported in legacy OSs.
+! - A '_' can be used in the place of a space, so you don't need to use
+! backslashes to escape the spaces.
+! Examples: >
+! :set guifont=courier_new:h12:w5:b:cRUSSIAN
+! :set guifont=Andale_Mono:h7.5:w4.5
+!
+! See also |font-sizes|.
+!
+! Note on Weights: Fonts often come with a variety of weights. "Normal" weights
+! in Windows have a value of 400 and, left unspecified, this is the value that
+! will be used when attempting to find fonts. Windows will often match fonts
+! based on their weight with higher priority than the font name which means a
+! Book or Medium variant of a font might be used despite specifying a Light or
+! ExtraLight variant. If you are experiencing heavier weight substitution, then
+! explicitly setting a lower weight value may mitigate against this unwanted
+! substitution.
+!
+!
+! GUIFONTWIDE *gui-fontwide*
+!
+! When not empty, 'guifontwide' specifies a comma-separated list of fonts to be
+! used for double-width characters. The first font that can be loaded is
+! used.
+!
+! Note: The size of these fonts must be exactly twice as wide as the one
+! specified with 'guifont' and the same height. If there is a mismatch then
+! the text will not be drawn correctly.
+!
+! All GUI versions but GTK+:
+!
+! 'guifontwide' is only used when 'encoding' is set to "utf-8" and
+! 'guifontset' is empty or invalid.
+! When 'guifont' is set and a valid font is found in it and
+! 'guifontwide' is empty Vim will attempt to find a matching
+! double-width font and set 'guifontwide' to it.
+!
+! GTK+ GUI only: *guifontwide_gtk*
+!
+! If set and valid, 'guifontwide' is always used for double width
+! characters, even if 'encoding' is not set to "utf-8".
+! Vim does not attempt to find an appropriate value for 'guifontwide'
+! automatically. If 'guifontwide' is empty Pango/Xft will choose the
+! font for characters not available in 'guifont'. Thus you do not need
+! to set 'guifontwide' at all unless you want to override the choice
+! made by Pango/Xft.
+!
+! Windows +multibyte only: *guifontwide_win_mbyte*
+!
+! If set and valid, 'guifontwide' is used for IME instead of 'guifont'.
+!
+! ==============================================================================
+! 7. Extras *gui-extras*
+
+ This section describes other features which are related to the GUI.
+
+***************
+*** 1081,1087 ****
+ http://www.lexikan.com/mincho.htm
+
+ ==============================================================================
+! 7. Shell Commands *gui-shell*
+
+ For the X11 GUI the external commands are executed inside the gvim window.
+ See |gui-pty|.
+--- 1214,1220 ----
+ http://www.lexikan.com/mincho.htm
+
+ ==============================================================================
+! 8. Shell Commands *gui-shell*
+
+ For the X11 GUI the external commands are executed inside the gvim window.
+ See |gui-pty|.
+*** ../vim-8.1.1223/runtime/doc/mbyte.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/mbyte.txt 2019-04-28 13:51:04.377867566 +0200
+***************
+*** 633,638 ****
+--- 620,640 ----
+ locale. You have to specify all the fonts that a locale requires in the
+ 'guifontset' option.
+
++ Setting the 'guifontset' option also means that all font names will be handled
++ as a fontset name. Also the ones used for the "font" argument of the
++ |:highlight| command.
++
++ Note the difference between 'guifont' and 'guifontset': In 'guifont'
++ the comma-separated names are alternative names, one of which will be
++ used. In 'guifontset' the whole string is one fontset name,
++ including the commas. It is not possible to specify alternative
++ fontset names.
++ This example works on many X11 systems: >
++ :set guifontset=-*-*-medium-r-normal--16-*-*-*-c-*-*-*
++ <
++ The fonts must match with the current locale. If fonts for the character sets
++ that the current locale uses are not included, setting 'guifontset' will fail.
++
+ NOTE: The fontset always uses the current locale, even though 'encoding' may
+ be set to use a different charset. In that situation you might want to use
+ 'guifont' and 'guifontwide' instead of 'guifontset'.
+*** ../vim-8.1.1223/src/gui_w32.c 2019-04-27 19:15:41.856806819 +0200
+--- src/gui_w32.c 2019-04-28 14:00:23.807264628 +0200
+***************
+*** 3119,3124 ****
+--- 3119,3125 ----
+ char *charset_name;
+ char *quality_name;
+ char *font_name;
++ int points;
+
+ font_name = (char *)utf16_to_enc(lf.lfFaceName, NULL);
+ if (font_name == NULL)
+***************
+*** 3126,3140 ****
+ charset_name = charset_id2name((int)lf.lfCharSet);
+ quality_name = quality_id2name((int)lf.lfQuality);
+
+! res = (char *)alloc((unsigned)(strlen(font_name) + 20
+ + (charset_name == NULL ? 0 : strlen(charset_name) + 2)
+ + (quality_name == NULL ? 0 : strlen(quality_name) + 2)));
+ if (res != NULL)
+ {
+ p = res;
+! /* make a normal font string out of the lf thing:*/
+! sprintf((char *)p, "%s:h%d", font_name, pixels_to_points(
+! lf.lfHeight < 0 ? -lf.lfHeight : lf.lfHeight, TRUE));
+ while (*p)
+ {
+ if (*p == ' ')
+--- 3127,3145 ----
+ charset_name = charset_id2name((int)lf.lfCharSet);
+ quality_name = quality_id2name((int)lf.lfQuality);
+
+! res = (char *)alloc((unsigned)(strlen(font_name) + 30
+ + (charset_name == NULL ? 0 : strlen(charset_name) + 2)
+ + (quality_name == NULL ? 0 : strlen(quality_name) + 2)));
+ if (res != NULL)
+ {
+ p = res;
+! // make a normal font string out of the lf thing:
+! points = pixels_to_points(
+! lf.lfHeight < 0 ? -lf.lfHeight : lf.lfHeight, TRUE);
+! if (lf.lfWeight == FW_NORMAL || lf.lfWeight == FW_BOLD)
+! sprintf((char *)p, "%s:h%d", font_name, points);
+! else
+! sprintf((char *)p, "%s:h%d:W%d", font_name, points, lf.lfWeight);
+ while (*p)
+ {
+ if (*p == ' ')
+***************
+*** 3143,3149 ****
+ }
+ if (lf.lfItalic)
+ STRCAT(p, ":i");
+! if (lf.lfWeight >= FW_BOLD)
+ STRCAT(p, ":b");
+ if (lf.lfUnderline)
+ STRCAT(p, ":u");
+--- 3148,3154 ----
+ }
+ if (lf.lfItalic)
+ STRCAT(p, ":i");
+! if (lf.lfWeight == FW_BOLD)
+ STRCAT(p, ":b");
+ if (lf.lfUnderline)
+ STRCAT(p, ":u");
+*** ../vim-8.1.1223/src/os_mswin.c 2019-04-17 18:24:32.006143206 +0200
+--- src/os_mswin.c 2019-04-28 13:41:04.784425947 +0200
+***************
+*** 2992,2997 ****
+--- 2992,3000 ----
+ case L'w':
+ lf->lfWidth = points_to_pixels(p, &p, FALSE, (long_i)printer_dc);
+ break;
++ case L'W':
++ lf->lfWeight = wcstol(p, &p, 10);
++ break;
+ case L'b':
+ lf->lfWeight = FW_BOLD;
+ break;
+*** ../vim-8.1.1223/src/version.c 2019-04-28 13:00:08.627933382 +0200
+--- src/version.c 2019-04-28 13:41:34.796308949 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1224,
+ /**/
+
+--
+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.1225 b/data/vim/patches/8.1.1225
new file mode 100644
index 000000000..b1412a34f
--- /dev/null
+++ b/data/vim/patches/8.1.1225
@@ -0,0 +1,155 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1225
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1225
+Problem: Cannot create a pty to use with :terminal on FreeBSD.
+Solution: Add support for posix_openpt(). (Ozaki Kiichi, closes #4306,
+ closes #4289)
+Files: src/configure.ac, src/config.h.in, src/auto/configure, src/pty.c
+
+
+*** ../vim-8.1.1224/src/configure.ac 2019-04-11 15:25:36.983065343 +0200
+--- src/configure.ac 2019-04-28 14:36:00.332840687 +0200
+***************
+*** 3746,3752 ****
+ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
+ 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
+
+--- 3746,3752 ----
+ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
+ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
+ strnicmp strpbrk strtol tgetent towlower towupper iswupper \
+! usleep utime utimes mblen ftruncate unsetenv posix_openpt)
+ AC_FUNC_SELECT_ARGTYPES
+ AC_FUNC_FSEEKO
+
+*** ../vim-8.1.1224/src/config.h.in 2019-02-16 15:09:21.221946179 +0100
+--- src/config.h.in 2019-04-28 14:36:00.332840687 +0200
+***************
+*** 180,185 ****
+--- 180,186 ----
+ #undef HAVE_NANOSLEEP
+ #undef HAVE_NL_LANGINFO_CODESET
+ #undef HAVE_OPENDIR
++ #undef HAVE_POSIX_OPENPT
+ #undef HAVE_PUTENV
+ #undef HAVE_QSORT
+ #undef HAVE_READLINK
+*** ../vim-8.1.1224/src/auto/configure 2019-04-11 15:25:36.983065343 +0200
+--- src/auto/configure 2019-04-28 14:42:11.567032096 +0200
+***************
+*** 12658,12664 ****
+ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
+ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
+ strnicmp strpbrk strtol tgetent towlower towupper iswupper \
+! usleep utime utimes mblen ftruncate unsetenv
+ do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+--- 12658,12664 ----
+ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
+ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
+ strnicmp strpbrk strtol tgetent towlower towupper iswupper \
+! usleep utime utimes mblen ftruncate unsetenv posix_openpt
+ do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+*** ../vim-8.1.1224/src/pty.c 2019-01-26 15:12:52.558260916 +0100
+--- src/pty.c 2019-04-28 14:42:05.411065909 +0200
+***************
+*** 136,141 ****
+--- 136,148 ----
+ # define O_NOCTTY 0
+ #endif
+
++ #if defined(HAVE_SVR4_PTYS) || defined(HAVE_POSIX_OPENPT)
++ // These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
++ char *ptsname(int);
++ int unlockpt(int);
++ int grantpt(int);
++ #endif
++
+ static void
+ initmaster(int f UNUSED)
+ {
+***************
+*** 178,183 ****
+--- 185,219 ----
+ return 0;
+ }
+
++ #if defined(HAVE_POSIX_OPENPT) && !defined(PTY_DONE)
++ #define PTY_DONE
++ int
++ mch_openpty(char **ttyn)
++ {
++ int f;
++ char *m;
++ RETSIGTYPE (*sigcld) SIGPROTOARG;
++ static char TtyName[32]; // used for opening a new pty-pair
++
++ if ((f = posix_openpt(O_RDWR | O_NOCTTY | O_EXTRA)) == -1)
++ return -1;
++
++ // SIGCHLD set to SIG_DFL for grantpt() because it fork()s and
++ // exec()s pt_chmod
++ sigcld = signal(SIGCHLD, SIG_DFL);
++ if ((m = ptsname(f)) == NULL || grantpt(f) || unlockpt(f))
++ {
++ signal(SIGCHLD, sigcld);
++ close(f);
++ return -1;
++ }
++ signal(SIGCHLD, sigcld);
++ vim_strncpy((char_u *)TtyName, (char_u *)m, sizeof(TtyName) - 1);
++ initmaster(f);
++ *ttyn = TtyName;
++ return f;
++ }
++ #endif
+
+ #if defined(OSX) && !defined(PTY_DONE)
+ #define PTY_DONE
+***************
+*** 280,288 ****
+ {
+ int f;
+ char *m;
+- char *(ptsname(int));
+- int unlockpt(int);
+- int grantpt(int);
+ RETSIGTYPE (*sigcld) SIGPROTOARG;
+ /* used for opening a new pty-pair: */
+ static char TtyName[32];
+--- 316,321 ----
+*** ../vim-8.1.1224/src/version.c 2019-04-28 14:02:25.414687593 +0200
+--- src/version.c 2019-04-28 14:39:18.375877759 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1225,
+ /**/
+
+--
+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.1226 b/data/vim/patches/8.1.1226
new file mode 100644
index 000000000..c72a00be3
--- /dev/null
+++ b/data/vim/patches/8.1.1226
@@ -0,0 +1,4826 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1226
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1226
+Problem: {not in Vi} remarks get in the way of useful help text.
+Solution: Make a list of all Vi options, instead of mentioning what Vi does
+ not have. Update the help text for options.
+Files: runtime/doc/vi_diff.txt, runtime/doc/options.txt
+
+
+*** ../vim-8.1.1225/runtime/doc/vi_diff.txt 2018-05-17 13:42:04.000000000 +0200
+--- runtime/doc/vi_diff.txt 2019-04-28 15:54:57.973028174 +0200
+***************
+*** 19,26 ****
+ 3. Limits |limits|
+ 4. The most interesting additions |vim-additions|
+ 5. Other vim features |other-features|
+! 6. Command-line arguments |cmdline-arguments|
+! 7. POSIX compliance |posix-compliance|
+
+ ==============================================================================
+ 1. Simulated command *simulated-command*
+--- 19,27 ----
+ 3. Limits |limits|
+ 4. The most interesting additions |vim-additions|
+ 5. Other vim features |other-features|
+! 6. Supported Vi features |vi-features|
+! 7. Command-line arguments |cmdline-arguments|
+! 8. POSIX compliance |posix-compliance|
+
+ ==============================================================================
+ 1. Simulated command *simulated-command*
+***************
+*** 787,793 ****
+ The AUX: device of the Amiga is supported.
+
+ ==============================================================================
+! 6. Command-line arguments *cmdline-arguments*
+
+ Different versions of Vi have different command-line arguments. This can be
+ confusing. To help you, this section gives an overview of the differences.
+--- 788,867 ----
+ The AUX: device of the Amiga is supported.
+
+ ==============================================================================
+! 6. Supported Vi features *vi-features*
+!
+! Vim supports nearly all Vi commands and mostly in the same way. That is when
+! the 'compatible' option is set and 'cpoptions' contains all flags. What the
+! effect is of resetting 'compatible' and removing flags from 'cpoptions' can be
+! found at the help for the specific command.
+!
+! Below is listed what features are present in Vi. Anything else has been added
+! by Vim.
+!
+! The following Ex commands are supported by Vi: ~
+!
+! TODO
+!
+! `:set` but not `:set inv{option}`, `:set option&`, `:set all&`,
+! `:set option+=value`,
+! `:set option^=value`
+! `:set option-=value`
+! `:set option<`
+!
+!
+! The following Normal mode commands are supported by Vi: ~
+!
+! TODO
+!
+!
+! The following options are supported by Vi: ~
+!
+! 'autoindent' 'ai' take indent for new line from previous line
+! 'autowrite' 'aw' automatically write file if changed
+! 'directory' 'dir' list of directory names for the swap file
+! 'edcompatible' 'ed' toggle flags of ":substitute" command
+! 'errorbells' 'eb' ring the bell for error messages
+! 'ignorecase' 'ic' ignore case in search patterns
+! 'lines' number of lines in the display
+! 'lisp' automatic indenting for Lisp
+! 'list' show <Tab> and <EOL>
+! 'magic' changes special characters in search patterns
+! 'modeline' 'ml' recognize 'modelines' at start or end of file
+! {called modelines in some Vi versions}
+! 'number' 'nu' print the line number in front of each line
+! 'paragraphs' 'para' nroff macros that separate paragraphs
+! 'prompt' 'prompt' enable prompt in Ex mode
+! 'readonly' 'ro' disallow writing the buffer {Vim sets 'readonly'
+! when editing a file with `:view`}
+! 'remap' allow mappings to work recursively
+! 'report' threshold for reporting nr. of lines changed
+! 'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D
+! 'sections' 'sect' nroff macros that separate sections
+! 'shell' 'sh' name of shell to use for external commands
+! 'shiftwidth' 'sw' number of spaces to use for (auto)indent step
+! 'showmatch' 'sm' briefly jump to matching bracket if insert one
+! 'showmode' 'smd' message on status line to show current mode
+! 'tabstop' 'ts' number of spaces that <Tab> in file uses
+! 'taglength' 'tl' number of significant characters for a tag
+! 'tags' 'tag' list of file names used by the tag command
+! 'tagstack' 'tgst' push tags onto the tag stack {not in all versions
+! of Vi}
+! 'term' name of the terminal
+! 'terse' shorten some messages
+! 'timeout' 'to' time out on mappings and key codes
+! 'ttytype' 'tty' alias for 'term'
+! 'verbose' 'vbs' give informative messages {only in some Vi
+! versions as a boolean option}
+! 'warn' warn for shell command when buffer was changed
+! 'window' 'wi' nr of lines to scroll for CTRL-F and CTRL-B
+! 'wrapmargin' 'wm' chars from the right where wrapping starts
+! 'wrapscan' 'ws' searches wrap around the end of the file
+! 'writeany' 'wa' write to file with no need for "!" override
+!
+! Also see |missing-options|.
+!
+! ==============================================================================
+! 7. Command-line arguments *cmdline-arguments*
+
+ Different versions of Vi have different command-line arguments. This can be
+ confusing. To help you, this section gives an overview of the differences.
+***************
+*** 967,973 ****
+ @{cmdfile} Vile: use {cmdfile} as startup file.
+
+ ==============================================================================
+! 7. POSIX compliance *posix* *posix-compliance*
+
+ In 2005 the POSIX test suite was run to check the compatibility of Vim. Most
+ of the test was executed properly. There are the few things where Vim
+--- 1041,1047 ----
+ @{cmdfile} Vile: use {cmdfile} as startup file.
+
+ ==============================================================================
+! 8. POSIX compliance *posix* *posix-compliance*
+
+ In 2005 the POSIX test suite was run to check the compatibility of Vim. Most
+ of the test was executed properly. There are the few things where Vim
+***************
+*** 1021,1024 ****
+ - ex test 534 fails because .exrc isn't read in silent mode.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1095,1098 ----
+ - ex test 534 fails because .exrc isn't read in silent mode.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1225/runtime/doc/options.txt 2019-04-28 14:02:25.410687613 +0200
+--- runtime/doc/options.txt 2019-04-28 15:59:07.463883436 +0200
+***************
+*** 42,54 ****
+
+ *:set-!* *:set-inv*
+ :se[t] {option}! or
+! :se[t] inv{option} Toggle option: Invert value. {not in Vi}
+
+ *:set-default* *:set-&* *:set-&vi* *:set-&vim*
+ :se[t] {option}& Reset option to its default value. May depend on the
+! current value of 'compatible'. {not in Vi}
+! :se[t] {option}&vi Reset option to its Vi default value. {not in Vi}
+! :se[t] {option}&vim Reset option to its Vim default value. {not in Vi}
+
+ :se[t] all& Set all options to their default value. The values of
+ these options are not changed:
+--- 42,54 ----
+
+ *:set-!* *:set-inv*
+ :se[t] {option}! or
+! :se[t] inv{option} Toggle option: Invert value.
+
+ *:set-default* *:set-&* *:set-&vi* *:set-&vim*
+ :se[t] {option}& Reset option to its default value. May depend on the
+! current value of 'compatible'.
+! :se[t] {option}&vi Reset option to its Vi default value.
+! :se[t] {option}&vim Reset option to its Vim default value.
+
+ :se[t] all& Set all options to their default value. The values of
+ these options are not changed:
+***************
+*** 62,68 ****
+ 'ttymouse'
+ 'ttytype'
+ Warning: This may have a lot of side effects.
+- {not in Vi}
+
+ *:set-args* *E487* *E521*
+ :se[t] {option}={value} or
+--- 62,67 ----
+***************
+*** 88,94 ****
+ are removed. When adding a flag that was already
+ present the option value doesn't change.
+ Also see |:set-args| above.
+- {not in Vi}
+
+ :se[t] {option}^={value} *:set^=*
+ Multiply the {value} to a number option, or prepend
+--- 87,92 ----
+***************
+*** 96,102 ****
+ comma separated list, a comma is added, unless the
+ value was empty.
+ Also see |:set-args| above.
+- {not in Vi}
+
+ :se[t] {option}-={value} *:set-=*
+ Subtract the {value} from a number option, or remove
+--- 94,99 ----
+***************
+*** 109,115 ****
+ exactly as they appear in the option. Remove flags
+ one by one to avoid problems.
+ Also see |:set-args| above.
+- {not in Vi}
+
+ The {option} arguments to ":set" may be repeated. For example: >
+ :set ai nosi sw=3 ts=3
+--- 106,111 ----
+***************
+*** 120,129 ****
+ When 'verbose' is non-zero, displaying an option value will also tell where it
+ was last set. Example: >
+ :verbose set shiftwidth cindent?
+! < shiftwidth=4 ~
+! Last set from modeline ~
+! cindent ~
+! Last set from /usr/local/share/vim/vim60/ftplugin/c.vim ~
+ This is only done when specific option values are requested, not for ":verbose
+ set all" or ":verbose set" without an argument.
+ When the option was set by hand there is no "Last set" message.
+--- 116,125 ----
+ When 'verbose' is non-zero, displaying an option value will also tell where it
+ was last set. Example: >
+ :verbose set shiftwidth cindent?
+! < shiftwidth=4 ~
+! Last set from modeline line 1 ~
+! cindent ~
+! Last set from /usr/local/share/vim/vim60/ftplugin/c.vim line 30 ~
+ This is only done when specific option values are requested, not for ":verbose
+ set all" or ":verbose set" without an argument.
+ When the option was set by hand there is no "Last set" message.
+***************
+*** 132,138 ****
+ Note that an option may also have been set as a side effect of setting
+ 'compatible'.
+ A few special texts:
+! Last set from modeline ~
+ Option was set in a |modeline|.
+ Last set from --cmd argument ~
+ Option was set with command line argument |--cmd| or +.
+--- 128,134 ----
+ Note that an option may also have been set as a side effect of setting
+ 'compatible'.
+ A few special texts:
+! Last set from modeline line 1 ~
+ Option was set in a |modeline|.
+ Last set from --cmd argument ~
+ Option was set with command line argument |--cmd| or +.
+***************
+*** 305,319 ****
+ before the option name.
+ For a global option the global value is
+ shown (but that might change in the future).
+- {not in Vi}
+
+ :setl[ocal] {option}< Set the local value of {option} to its global value by
+ copying the value.
+- {not in Vi}
+
+ :se[t] {option}< For |global-local| options: Remove the local value of
+ {option}, so that the global value will be used.
+- {not in Vi}
+
+ *:setg* *:setglobal*
+ :setg[lobal] ... Like ":set" but set only the global value for a local
+--- 301,312 ----
+***************
+*** 323,329 ****
+ local options.
+ Without argument: display global values for all local
+ options which are different from the default.
+- {not in Vi}
+
+ For buffer-local and window-local options:
+ Command global value local value ~
+--- 316,321 ----
+***************
+*** 354,365 ****
+ :setlocal makeprg=perlmake
+ You can switch back to using the global value by making the local value empty: >
+ :setlocal makeprg=
+! This only works for a string option. For a boolean option you need to use the
+! "<" flag, like this: >
+ :setlocal autoread<
+! Note that for non-boolean options using "<" copies the global value to the
+! local value, it doesn't switch back to using the global value (that matters
+! when the global value changes later). You can also use: >
+ :set path<
+ This will make the local value of 'path' empty, so that the global value is
+ used. Thus it does the same as: >
+--- 346,357 ----
+ :setlocal makeprg=perlmake
+ You can switch back to using the global value by making the local value empty: >
+ :setlocal makeprg=
+! This only works for a string option. For a number or boolean option you need
+! to use the "<" flag, like this: >
+ :setlocal autoread<
+! Note that for non-boolean and non-number options using "<" copies the global
+! value to the local value, it doesn't switch back to using the global value
+! (that matters when the global value changes later). You can also use: >
+ :set path<
+ This will make the local value of 'path' empty, so that the global value is
+ used. Thus it does the same as: >
+***************
+*** 383,393 ****
+
+ When the optional FALLBACK argument is present, a
+ later :setfiletype command will override the
+! 'filetype'. This is to used for filetype detections
+! that are just a guess. |did_filetype()| will return
+! false after this command.
+!
+! {not in Vi}
+
+ *option-window* *optwin*
+ :bro[wse] se[t] *:set-browse* *:browse-set* *:opt* *:options*
+--- 375,383 ----
+
+ When the optional FALLBACK argument is present, a
+ later :setfiletype command will override the
+! 'filetype'. This is to be used for filetype
+! detections that are just a guess. |did_filetype()|
+! will return false after this command.
+
+ *option-window* *optwin*
+ :bro[wse] se[t] *:set-browse* *:browse-set* *:opt* *:options*
+***************
+*** 444,450 ****
+ CTRL-? CTRL-H
+ not CTRL-? CTRL-?
+
+! (CTRL-? is 0177 octal, 0x7f hex) {not in Vi}
+
+ If your delete key terminal code is wrong, but the
+ code for backspace is alright, you can put this in
+--- 434,440 ----
+ CTRL-? CTRL-H
+ not CTRL-? CTRL-?
+
+! (CTRL-? is 0177 octal, 0x7f hex)
+
+ If your delete key terminal code is wrong, but the
+ code for backspace is alright, you can put this in
+***************
+*** 660,666 ****
+ *'aleph'* *'al'* *aleph* *Aleph*
+ 'aleph' 'al' number (default 128 for MS-DOS, 224 otherwise)
+ global
+- {not in Vi}
+ {only available when compiled with the |+rightleft|
+ feature}
+ The ASCII code for the first letter of the Hebrew alphabet. The
+--- 650,655 ----
+***************
+*** 673,679 ****
+ *'allowrevins'* *'ari'* *'noallowrevins'* *'noari'*
+ 'allowrevins' 'ari' boolean (default off)
+ global
+- {not in Vi}
+ {only available when compiled with the |+rightleft|
+ feature}
+ Allow CTRL-_ in Insert and Command-line mode. This is default off, to
+--- 662,667 ----
+***************
+*** 685,691 ****
+ *'altkeymap'* *'akm'* *'noaltkeymap'* *'noakm'*
+ 'altkeymap' 'akm' boolean (default off)
+ global
+- {not in Vi}
+ {only available when compiled with the |+farsi|
+ feature}
+ This option was for using Farsi, which has been removed. See
+--- 673,678 ----
+***************
+*** 694,702 ****
+ *'ambiwidth'* *'ambw'*
+ 'ambiwidth' 'ambw' string (default: "single")
+ global
+- {not in Vi}
+- {only available when compiled with the |+multi_byte|
+- feature}
+ Only effective when 'encoding' is "utf-8" or another Unicode encoding.
+ Tells Vim what to do with characters with East Asian Width Class
+ Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek
+--- 681,686 ----
+***************
+*** 733,739 ****
+ *'antialias'* *'anti'* *'noantialias'* *'noanti'*
+ 'antialias' 'anti' boolean (default: off)
+ global
+- {not in Vi}
+ {only available when compiled with GUI enabled
+ on Mac OS X}
+ This option only has an effect in the GUI version of Vim on Mac OS X
+--- 717,722 ----
+***************
+*** 746,752 ****
+ *'autochdir'* *'acd'* *'noautochdir'* *'noacd'*
+ 'autochdir' 'acd' boolean (default off)
+ global
+- {not in Vi}
+ {only available when compiled with it, use
+ exists("+autochdir") to check}
+ When on, Vim will change the current working directory whenever you
+--- 729,734 ----
+***************
+*** 758,764 ****
+ *'arabic'* *'arab'* *'noarabic'* *'noarab'*
+ 'arabic' 'arab' boolean (default off)
+ local to window
+- {not in Vi}
+ {only available when compiled with the |+arabic|
+ feature}
+ This option can be set to start editing Arabic text.
+--- 740,745 ----
+***************
+*** 782,788 ****
+ *'noarabicshape'* *'noarshape'*
+ 'arabicshape' 'arshape' boolean (default on)
+ global
+- {not in Vi}
+ {only available when compiled with the |+arabic|
+ feature}
+ When on and 'termbidi' is off, the required visual character
+--- 763,768 ----
+***************
+*** 822,831 ****
+ *'autoread'* *'ar'* *'noautoread'* *'noar'*
+ 'autoread' 'ar' boolean (default off)
+ global or local to buffer |global-local|
+- {not in Vi}
+ When a file has been detected to have been changed outside of Vim and
+ it has not been changed inside of Vim, automatically read it again.
+! When the file has been deleted this is not done. |timestamp|
+ If this option has a local value, use this command to switch back to
+ using the global value: >
+ :set autoread<
+--- 802,812 ----
+ *'autoread'* *'ar'* *'noautoread'* *'noar'*
+ 'autoread' 'ar' boolean (default off)
+ global or local to buffer |global-local|
+ When a file has been detected to have been changed outside of Vim and
+ it has not been changed inside of Vim, automatically read it again.
+! When the file has been deleted this is not done, so you have the text
+! from before it was deleted. When it appears again then it is read.
+! |timestamp|
+ If this option has a local value, use this command to switch back to
+ using the global value: >
+ :set autoread<
+***************
+*** 839,849 ****
+ '{A-Z0-9}, or `{A-Z0-9} command takes one to another file.
+ Note that for some commands the 'autowrite' option is not used, see
+ 'autowriteall' for that.
+
+ *'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'*
+ 'autowriteall' 'awa' boolean (default off)
+ global
+- {not in Vi}
+ Like 'autowrite', but also used for commands ":edit", ":enew", ":quit",
+ ":qall", ":exit", ":xit", ":recover" and closing the Vim window.
+ Setting this option also implies that Vim behaves like 'autowrite' has
+--- 820,831 ----
+ '{A-Z0-9}, or `{A-Z0-9} command takes one to another file.
+ Note that for some commands the 'autowrite' option is not used, see
+ 'autowriteall' for that.
++ Some buffers will not be written, specifically when 'buftype' is
++ "nowrite", "nofile", "terminal" or "prompt".
+
+ *'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'*
+ 'autowriteall' 'awa' boolean (default off)
+ global
+ Like 'autowrite', but also used for commands ":edit", ":enew", ":quit",
+ ":qall", ":exit", ":xit", ":recover" and closing the Vim window.
+ Setting this option also implies that Vim behaves like 'autowrite' has
+***************
+*** 852,858 ****
+ *'background'* *'bg'*
+ 'background' 'bg' string (default "dark" or "light", see below)
+ global
+- {not in Vi}
+ When set to "dark", Vim will try to use colors that look good on a
+ dark background. When set to "light", Vim will try to use colors that
+ look good on a light background. Any other value is illegal.
+--- 834,839 ----
+***************
+*** 918,924 ****
+ 'backspace' 'bs' string (default "", set to "indent,eol,start"
+ in |defaults.vim|)
+ global
+- {not in Vi}
+ Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert
+ mode. This is a list of items, separated by commas. Each item allows
+ a way to backspace over something:
+--- 899,904 ----
+***************
+*** 942,948 ****
+ *'backup'* *'bk'* *'nobackup'* *'nobk'*
+ 'backup' 'bk' boolean (default off)
+ global
+- {not in Vi}
+ Make a backup before overwriting a file. Leave it around after the
+ file has been successfully written. If you do not want to keep the
+ backup file, but you do want a backup while the file is being
+--- 922,927 ----
+***************
+*** 958,964 ****
+ *'backupcopy'* *'bkc'*
+ 'backupcopy' 'bkc' string (Vi default for Unix: "yes", otherwise: "auto")
+ global or local to buffer |global-local|
+- {not in Vi}
+ When writing a file and a backup is made, this option tells how it's
+ done. This is a comma separated list of words.
+
+--- 937,942 ----
+***************
+*** 1029,1035 ****
+ for MS-DOS and Win32: ".,$TEMP,c:/tmp,c:/temp"
+ for Unix: ".,~/tmp,~/")
+ global
+- {not in Vi}
+ List of directories for the backup file, separated with commas.
+ - The backup file will be created in the first directory in the list
+ where this is possible. The directory must exist, Vim will not
+--- 1007,1012 ----
+***************
+*** 1048,1056 ****
+ - 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
+--- 1025,1033 ----
+ - 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 backup 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
+***************
+*** 1075,1081 ****
+ *'backupext'* *'bex'* *E589*
+ 'backupext' 'bex' string (default "~", for VMS: "_")
+ global
+- {not in Vi}
+ String which is appended to a file name to make the name of the
+ backup file. The default is quite unusual, because this avoids
+ accidentally overwriting existing files with a backup file. You might
+--- 1052,1057 ----
+***************
+*** 1094,1100 ****
+ Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*"
+ Mac: "/private/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*")
+ global
+- {not in Vi}
+ {not available when compiled without the |+wildignore|
+ feature}
+ A list of file patterns. When one of the patterns matches with the
+--- 1070,1075 ----
+***************
+*** 1121,1127 ****
+ *'balloondelay'* *'bdlay'*
+ 'balloondelay' 'bdlay' number (default: 600)
+ global
+- {not in Vi}
+ {only available when compiled with the |+balloon_eval|
+ feature}
+ Delay in milliseconds before a balloon may pop up. See |balloon-eval|.
+--- 1096,1101 ----
+***************
+*** 1129,1135 ****
+ *'ballooneval'* *'beval'* *'noballooneval'* *'nobeval'*
+ 'ballooneval' 'beval' boolean (default off)
+ global
+- {not in Vi}
+ {only available when compiled with the |+balloon_eval|
+ feature}
+ Switch on the |balloon-eval| functionality for the GUI.
+--- 1103,1108 ----
+***************
+*** 1138,1144 ****
+ *'nobevalterm'*
+ 'balloonevalterm' 'bevalterm' boolean (default off)
+ global
+- {not in Vi}
+ {only available when compiled with the
+ |+balloon_eval_term| feature}
+ Switch on the |balloon-eval| functionality for the terminal.
+--- 1111,1116 ----
+***************
+*** 1146,1152 ****
+ *'balloonexpr'* *'bexpr'*
+ 'balloonexpr' 'bexpr' string (default "")
+ global or local to buffer |global-local|
+- {not in Vi}
+ {only available when compiled with the |+balloon_eval|
+ feature}
+ Expression for text to show in evaluation balloon. It is only used
+--- 1118,1123 ----
+***************
+*** 1194,1200 ****
+ *'belloff'* *'bo'*
+ 'belloff' 'bo' string (default "")
+ global
+- {not in Vi}
+ Specifies for which events the bell will not be rung. It is a comma
+ separated list of items. For each item that is present, the bell
+ will be silenced. This is most useful to specify specific events in
+--- 1165,1170 ----
+***************
+*** 1235,1241 ****
+ *'binary'* *'bin'* *'nobinary'* *'nobin'*
+ 'binary' 'bin' boolean (default off)
+ local to buffer
+- {not in Vi}
+ This option should be set before editing a binary file. You can also
+ use the |-b| Vim argument. When this option is switched on a few
+ options will be changed (also when it already was on):
+--- 1205,1210 ----
+***************
+*** 1266,1280 ****
+ *'bioskey'* *'biosk'* *'nobioskey'* *'nobiosk'*
+ 'bioskey' 'biosk' boolean (default on)
+ global
+! {not in Vi} {only for MS-DOS}
+ This was for MS-DOS and is no longer supported.
+
+ *'bomb'* *'nobomb'*
+ 'bomb' boolean (default off)
+ local to buffer
+- {not in Vi}
+- {only available when compiled with the |+multi_byte|
+- feature}
+ When writing a file and the following conditions are met, a BOM (Byte
+ Order Mark) is prepended to the file:
+ - this option is on
+--- 1235,1246 ----
+ *'bioskey'* *'biosk'* *'nobioskey'* *'nobiosk'*
+ 'bioskey' 'biosk' boolean (default on)
+ global
+! {only for MS-DOS}
+ This was for MS-DOS and is no longer supported.
+
+ *'bomb'* *'nobomb'*
+ 'bomb' boolean (default off)
+ local to buffer
+ When writing a file and the following conditions are met, a BOM (Byte
+ Order Mark) is prepended to the file:
+ - this option is on
+***************
+*** 1294,1300 ****
+ *'breakat'* *'brk'*
+ 'breakat' 'brk' string (default " ^I!@*-+;:,./?")
+ global
+- {not in Vi}
+ {not available when compiled without the |+linebreak|
+ feature}
+ This option lets you choose which characters might cause a line
+--- 1260,1265 ----
+***************
+*** 1304,1310 ****
+ *'breakindent'* *'bri'* *'nobreakindent'* *'nobri'*
+ 'breakindent' 'bri' boolean (default off)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+linebreak|
+ feature}
+ Every wrapped line will continue visually indented (same amount of
+--- 1269,1274 ----
+***************
+*** 1315,1321 ****
+ *'breakindentopt'* *'briopt'*
+ 'breakindentopt' 'briopt' string (default empty)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+linebreak|
+ feature}
+ Settings for 'breakindent'. It can consist of the following optional
+--- 1279,1284 ----
+***************
+*** 1337,1344 ****
+ *'browsedir'* *'bsdir'*
+ 'browsedir' 'bsdir' string (default: "last")
+ global
+! {not in Vi} {only for Motif, Athena, GTK, Mac and
+! Win32 GUI}
+ Which directory to use for the file browser:
+ last Use same directory as with last file browser, where a
+ file was opened or saved.
+--- 1300,1306 ----
+ *'browsedir'* *'bsdir'*
+ 'browsedir' 'bsdir' string (default: "last")
+ global
+! {only for Motif, Athena, GTK, Mac and Win32 GUI}
+ Which directory to use for the file browser:
+ last Use same directory as with last file browser, where a
+ file was opened or saved.
+***************
+*** 1349,1355 ****
+ *'bufhidden'* *'bh'*
+ 'bufhidden' 'bh' string (default: "")
+ local to buffer
+- {not in Vi}
+ This option specifies what happens when a buffer is no longer
+ displayed in a window:
+ <empty> follow the global 'hidden' option
+--- 1311,1316 ----
+***************
+*** 1373,1379 ****
+ *'buflisted'* *'bl'* *'nobuflisted'* *'nobl'* *E85*
+ 'buflisted' 'bl' boolean (default: on)
+ local to buffer
+- {not in Vi}
+ When this option is set, the buffer shows up in the buffer list. If
+ it is reset it is not used for ":bnext", "ls", the Buffers menu, etc.
+ This option is reset by Vim for buffers that are only used to remember
+--- 1334,1339 ----
+***************
+*** 1383,1389 ****
+ *'buftype'* *'bt'* *E382*
+ 'buftype' 'bt' string (default: "")
+ local to buffer
+- {not in Vi}
+ The value of this option specifies the type of a buffer:
+ <empty> normal buffer
+ nofile buffer which is not related to a file and will not be
+--- 1343,1348 ----
+***************
+*** 1435,1443 ****
+ *'casemap'* *'cmp'*
+ 'casemap' 'cmp' string (default: "internal,keepascii")
+ global
+- {not in Vi}
+- {only available when compiled with the |+multi_byte|
+- feature}
+ Specifies details about changing the case of letters. It may contain
+ these words, separated by a comma:
+ internal Use internal case mapping functions, the current
+--- 1394,1399 ----
+***************
+*** 1453,1459 ****
+ *'cdpath'* *'cd'* *E344* *E346*
+ 'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,")
+ global
+- {not in Vi}
+ {not available when compiled without the
+ |+file_in_path| feature}
+ This is a list of directories which will be searched when using the
+--- 1409,1414 ----
+***************
+*** 1475,1481 ****
+ *'cedit'*
+ 'cedit' string (Vi default: "", Vim default: CTRL-F)
+ global
+- {not in Vi}
+ {not available when compiled without the |+vertsplit|
+ feature}
+ The key used in Command-line Mode to open the command-line window.
+--- 1430,1435 ----
+***************
+*** 1493,1501 ****
+ *'charconvert'* *'ccv'* *E202* *E214* *E513*
+ 'charconvert' 'ccv' string (default "")
+ global
+! {only available when compiled with the |+multi_byte|
+! and |+eval| features}
+! {not in Vi}
+ An expression that is used for character encoding conversion. It is
+ evaluated when a file that is to be read or has been written has a
+ different encoding from what is desired.
+--- 1447,1453 ----
+ *'charconvert'* *'ccv'* *E202* *E214* *E513*
+ 'charconvert' 'ccv' string (default "")
+ global
+! {only available when compiled with the |+eval| feature}
+ An expression that is used for character encoding conversion. It is
+ evaluated when a file that is to be read or has been written has a
+ different encoding from what is desired.
+***************
+*** 1538,1544 ****
+ *'cindent'* *'cin'* *'nocindent'* *'nocin'*
+ 'cindent' 'cin' boolean (default off)
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+cindent|
+ feature}
+ Enables automatic C program indenting. See 'cinkeys' to set the keys
+--- 1490,1495 ----
+***************
+*** 1557,1563 ****
+ *'cinkeys'* *'cink'*
+ 'cinkeys' 'cink' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+cindent|
+ feature}
+ A list of keys that, when typed in Insert mode, cause reindenting of
+--- 1508,1513 ----
+***************
+*** 1569,1575 ****
+ *'cinoptions'* *'cino'*
+ 'cinoptions' 'cino' string (default "")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+cindent|
+ feature}
+ The 'cinoptions' affect the way 'cindent' reindents lines in a C
+--- 1519,1524 ----
+***************
+*** 1580,1586 ****
+ *'cinwords'* *'cinw'*
+ 'cinwords' 'cinw' string (default "if,else,while,do,for,switch")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without both the
+ |+cindent| and the |+smartindent| features}
+ These keywords start an extra indent in the next line when
+--- 1529,1534 ----
+***************
+*** 1594,1600 ****
+ 'clipboard' 'cb' string (default "autoselect,exclude:cons\|linux"
+ for X-windows, "" otherwise)
+ global
+- {not in Vi}
+ {only in GUI versions or when the |+xterm_clipboard|
+ feature is included}
+ This option is a list of comma separated names.
+--- 1542,1547 ----
+***************
+*** 1629,1638 ****
+ area extended, Vim tries to become the owner of the
+ windowing system's global selection or put the
+ selected text on the clipboard used by the selection
+! register "*. See |guioptions_a| and |quotestar| for
+! details. When the GUI is active, the 'a' flag in
+! 'guioptions' is used, when the GUI is not active, this
+! "autoselect" flag is used.
+ Also applies to the modeless selection.
+
+ *clipboard-autoselectplus*
+--- 1576,1585 ----
+ area extended, Vim tries to become the owner of the
+ windowing system's global selection or put the
+ selected text on the clipboard used by the selection
+! register "*. See |'go-a'| and |quotestar| for details.
+! When the GUI is active, the 'a' flag in 'guioptions'
+! is used, when the GUI is not active, this "autoselect"
+! flag is used.
+ Also applies to the modeless selection.
+
+ *clipboard-autoselectplus*
+***************
+*** 1653,1659 ****
+ You probably want to add this only temporarily,
+ possibly use BufEnter autocommands.
+ Only supported for GTK version 2 and later.
+- Only available with the |+multi_byte| feature.
+
+ *clipboard-exclude*
+ exclude:{pattern}
+--- 1600,1605 ----
+***************
+*** 1680,1686 ****
+ *'cmdheight'* *'ch'*
+ 'cmdheight' 'ch' number (default 1)
+ global
+- {not in Vi}
+ Number of screen lines to use for the command-line. Helps avoiding
+ |hit-enter| prompts.
+ The value of this option is stored with the tab page, so that each tab
+--- 1626,1631 ----
+***************
+*** 1689,1695 ****
+ *'cmdwinheight'* *'cwh'*
+ 'cmdwinheight' 'cwh' number (default 7)
+ global
+- {not in Vi}
+ {not available when compiled without the |+vertsplit|
+ feature}
+ Number of screen lines to use for the command-line window. |cmdwin|
+--- 1634,1639 ----
+***************
+*** 1697,1703 ****
+ *'colorcolumn'* *'cc'*
+ 'colorcolumn' 'cc' string (default "")
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ 'colorcolumn' is a comma separated list of screen columns that are
+--- 1641,1646 ----
+***************
+*** 1716,1722 ****
+ *'columns'* *'co'* *E594*
+ 'columns' 'co' number (default 80 or terminal width)
+ global
+- {not in Vi}
+ Number of columns of the screen. Normally this is set by the terminal
+ initialization and does not have to be set by hand. Also see
+ |posix-screen-size|.
+--- 1659,1664 ----
+***************
+*** 1735,1741 ****
+ 'comments' 'com' string (default
+ "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+comments|
+ feature}
+ A comma separated list of strings that can start a comment line. See
+--- 1677,1682 ----
+***************
+*** 1745,1751 ****
+ *'commentstring'* *'cms'* *E537*
+ 'commentstring' 'cms' string (default "/*%s*/")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ A template for a comment. The "%s" in the value is replaced with the
+--- 1686,1691 ----
+***************
+*** 1756,1762 ****
+ 'compatible' 'cp' boolean (default on, off when a |vimrc| or |gvimrc|
+ file is found, reset in |defaults.vim|)
+ global
+- {not in Vi}
+ This option has the effect of making Vim either more Vi-compatible, or
+ make Vim behave in a more useful way.
+
+--- 1696,1701 ----
+***************
+*** 1877,1883 ****
+ *'complete'* *'cpt'* *E535*
+ 'complete' 'cpt' string (default: ".,w,b,u,t,i")
+ local to buffer
+- {not in Vi}
+ This option specifies how keyword completion |ins-completion| works
+ when CTRL-P or CTRL-N are used. It is also used for whole-line
+ completion |i_CTRL-X_CTRL-L|. It indicates the type of completion
+--- 1816,1821 ----
+***************
+*** 1921,1927 ****
+ *'completefunc'* *'cfu'*
+ 'completefunc' 'cfu' string (default: empty)
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+eval|
+ or |+insert_expand| features}
+ This option specifies a function to be used for Insert mode completion
+--- 1859,1864 ----
+***************
+*** 1936,1942 ****
+ global
+ {not available when compiled without the
+ |+insert_expand| feature}
+- {not in Vi}
+ A comma separated list of options for Insert mode completion
+ |ins-completion|. The supported values are:
+
+--- 1873,1878 ----
+***************
+*** 1970,1976 ****
+ *'concealcursor'* *'cocu'*
+ 'concealcursor' 'cocu' string (default: "")
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+conceal|
+ feature}
+ Sets the modes in which text in the cursor line can also be concealed.
+--- 1906,1911 ----
+***************
+*** 1990,1999 ****
+ displayed. E.g., when moving vertically it may change column.
+
+
+! 'conceallevel' 'cole' *'conceallevel'* *'cole'*
+! number (default 0)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+conceal|
+ feature}
+ Determine how text with the "conceal" syntax attribute |:syn-conceal|
+--- 1925,1933 ----
+ displayed. E.g., when moving vertically it may change column.
+
+
+! *'conceallevel'* *'cole'*
+! 'conceallevel' 'cole' number (default 0)
+ local to window
+ {not available when compiled without the |+conceal|
+ feature}
+ Determine how text with the "conceal" syntax attribute |:syn-conceal|
+***************
+*** 2019,2025 ****
+ *'confirm'* *'cf'* *'noconfirm'* *'nocf'*
+ 'confirm' 'cf' boolean (default off)
+ global
+- {not in Vi}
+ When 'confirm' is on, certain operations that would normally
+ fail because of unsaved changes to a buffer, e.g. ":q" and ":e",
+ instead raise a |dialog| asking if you wish to save the current
+--- 1953,1958 ----
+***************
+*** 2032,2044 ****
+ *'conskey'* *'consk'* *'noconskey'* *'noconsk'*
+ 'conskey' 'consk' boolean (default off)
+ global
+- {not in Vi} {only for MS-DOS}
+ This was for MS-DOS and is no longer supported.
+
+ *'copyindent'* *'ci'* *'nocopyindent'* *'noci'*
+ 'copyindent' 'ci' boolean (default off)
+ local to buffer
+- {not in Vi}
+ Copy the structure of the existing lines indent when autoindenting a
+ new line. Normally the new indent is reconstructed by a series of
+ tabs followed by spaces as required (unless |'expandtab'| is enabled,
+--- 1965,1975 ----
+***************
+*** 2054,2060 ****
+ 'cpoptions' 'cpo' string (Vim default: "aABceFs",
+ Vi default: all flags)
+ global
+- {not in Vi}
+ A sequence of single character flags. When a character is present
+ this indicates Vi-compatible behavior. This is used for things where
+ not being Vi-compatible is mostly or sometimes preferred.
+--- 1985,1990 ----
+***************
+*** 2088,2097 ****
+ See also |map_bar|.
+ *cpo-B*
+ B A backslash has no special meaning in mappings,
+! abbreviations and the "to" part of the menu commands.
+! Remove this flag to be able to use a backslash like a
+! CTRL-V. For example, the command ":map X \<Esc>"
+! results in X being mapped to:
+ 'B' included: "\^[" (^[ is a real <Esc>)
+ 'B' excluded: "<Esc>" (5 characters)
+ ('<' excluded in both cases)
+--- 2018,2027 ----
+ See also |map_bar|.
+ *cpo-B*
+ B A backslash has no special meaning in mappings,
+! abbreviations, user commands and the "to" part of the
+! menu commands. Remove this flag to be able to use a
+! backslash like a CTRL-V. For example, the command
+! ":map X \<Esc>" results in X being mapped to:
+ 'B' included: "\^[" (^[ is a real <Esc>)
+ 'B' excluded: "<Esc>" (5 characters)
+ ('<' excluded in both cases)
+***************
+*** 2264,2270 ****
+ deleted only once. Also when repeating "R" with "."
+ and a count.
+ *cpo-y*
+! y A yank command can be redone with ".".
+ *cpo-Z*
+ Z When using "w!" while the 'readonly' option is set,
+ don't reset 'readonly'.
+--- 2194,2203 ----
+ deleted only once. Also when repeating "R" with "."
+ and a count.
+ *cpo-y*
+! y A yank command can be redone with ".". Think twice if
+! you really want to use this, it may break some
+! plugins, since most people expect "." to only repeat a
+! change.
+ *cpo-Z*
+ Z When using "w!" while the 'readonly' option is set,
+ don't reset 'readonly'.
+***************
+*** 2363,2369 ****
+ *'cryptmethod'* *'cm'*
+ 'cryptmethod' 'cm' string (default "blowfish2")
+ global or local to buffer |global-local|
+- {not in Vi}
+ Method used for encryption when the buffer is written to a file:
+ *pkzip*
+ zip PkZip compatible method. A weak kind of encryption.
+--- 2296,2301 ----
+***************
+*** 2405,2411 ****
+ global
+ {not available when compiled without the |+cscope|
+ feature}
+- {not in Vi}
+ Determines how many components of the path to show in a list of tags.
+ See |cscopepathcomp|.
+ NOTE: This option is set to 0 when 'compatible' is set.
+--- 2337,2342 ----
+***************
+*** 2415,2421 ****
+ global
+ {not available when compiled without the |+cscope|
+ feature}
+- {not in Vi}
+ Specifies the command to execute cscope. See |cscopeprg|.
+ This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
+--- 2346,2351 ----
+***************
+*** 2425,2431 ****
+ global
+ {not available when compiled without the |+cscope|
+ or |+quickfix| features}
+- {not in Vi}
+ Specifies whether to use quickfix window to show cscope results.
+ See |cscopequickfix|.
+
+--- 2355,2360 ----
+***************
+*** 2434,2440 ****
+ global
+ {not available when compiled without the |+cscope|
+ feature}
+- {not in Vi}
+ In the absence of a prefix (-P) for cscope. setting this option enables
+ to use the basename of cscope.out path as the prefix.
+ See |cscoperelative|.
+--- 2363,2368 ----
+***************
+*** 2445,2451 ****
+ global
+ {not available when compiled without the |+cscope|
+ feature}
+- {not in Vi}
+ Use cscope for tag commands. See |cscope-options|.
+ NOTE: This option is reset when 'compatible' is set.
+
+--- 2373,2378 ----
+***************
+*** 2454,2460 ****
+ global
+ {not available when compiled without the |+cscope|
+ feature}
+- {not in Vi}
+ Determines the order in which ":cstag" performs a search. See
+ |cscopetagorder|.
+ NOTE: This option is set to 0 when 'compatible' is set.
+--- 2381,2386 ----
+***************
+*** 2465,2478 ****
+ global
+ {not available when compiled without the |+cscope|
+ feature}
+- {not in Vi}
+ Give messages when adding a cscope database. See |cscopeverbose|.
+ NOTE: This option is reset when 'compatible' is set.
+
+ *'cursorbind'* *'crb'* *'nocursorbind'* *'nocrb'*
+ 'cursorbind' 'crb' boolean (default off)
+ local to window
+- {not in Vi}
+ When this option is set, as the cursor in the current
+ window moves other cursorbound windows (windows that also have
+ this option set) move their cursors to the corresponding line and
+--- 2391,2402 ----
+***************
+*** 2485,2491 ****
+ *'cursorcolumn'* *'cuc'* *'nocursorcolumn'* *'nocuc'*
+ 'cursorcolumn' 'cuc' boolean (default off)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ Highlight the screen column of the cursor with CursorColumn
+--- 2409,2414 ----
+***************
+*** 2500,2506 ****
+ *'cursorline'* *'cul'* *'nocursorline'* *'nocul'*
+ 'cursorline' 'cul' boolean (default off)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ Highlight the screen line of the cursor with CursorLine
+--- 2423,2428 ----
+***************
+*** 2513,2519 ****
+ *'debug'*
+ 'debug' string (default "")
+ global
+- {not in Vi}
+ These values can be used:
+ msg Error messages that would otherwise be omitted will be given
+ anyway.
+--- 2435,2440 ----
+***************
+*** 2528,2534 ****
+ *'define'* *'def'*
+ 'define' 'def' string (default "^\s*#\s*define")
+ global or local to buffer |global-local|
+- {not in Vi}
+ Pattern to be used to find a macro definition. It is a search
+ pattern, just like for the "/" command. This option is used for the
+ commands like "[i" and "[d" |include-search|. The 'isident' option is
+--- 2449,2454 ----
+***************
+*** 2539,2552 ****
+ The default value is for C programs. For C++ this value would be
+ useful, to include const type declarations: >
+ ^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\)
+ < When using the ":set" command, you need to double the backslashes!
+
+ *'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'*
+ 'delcombine' 'deco' boolean (default off)
+ global
+- {not in Vi}
+- {only available when compiled with the |+multi_byte|
+- feature}
+ If editing Unicode and this option is set, backspace and Normal mode
+ "x" delete each combining character on its own. When it is off (the
+ default) the character along with its combining characters are
+--- 2459,2478 ----
+ The default value is for C programs. For C++ this value would be
+ useful, to include const type declarations: >
+ ^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\)
++ < You can also use "\ze" just before the name and continue the pattern
++ to check what is following. E.g. for Javascript, if a function is
++ defined with "func_name = function(args)": >
++ ^\s*\ze\i\+\s*=\s*function(
++ < If the function is defined with "func_name : function() {...": >
++ ^\s*\ze\i\+\s*[:]\s*(*function\s*(
+ < When using the ":set" command, you need to double the backslashes!
++ To avoid that use `:let` with a single quote string: >
++ let &l:define = '^\s*\ze\k\+\s*=\s*function('
++ <
+
+ *'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'*
+ 'delcombine' 'deco' boolean (default off)
+ global
+ If editing Unicode and this option is set, backspace and Normal mode
+ "x" delete each combining character on its own. When it is off (the
+ default) the character along with its combining characters are
+***************
+*** 2561,2567 ****
+ *'dictionary'* *'dict'*
+ 'dictionary' 'dict' string (default "")
+ global or local to buffer |global-local|
+- {not in Vi}
+ List of file names, separated by commas, that are used to lookup words
+ for keyword completion commands |i_CTRL-X_CTRL-K|. Each file should
+ contain a list of words. This can be one word per line, or several
+--- 2487,2492 ----
+***************
+*** 2588,2594 ****
+ *'diff'* *'nodiff'*
+ 'diff' boolean (default off)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+diff|
+ feature}
+ Join the current window in the group of windows that shows differences
+--- 2513,2518 ----
+***************
+*** 2597,2603 ****
+ *'dex'* *'diffexpr'*
+ 'diffexpr' 'dex' string (default "")
+ global
+- {not in Vi}
+ {not available when compiled without the |+diff|
+ feature}
+ Expression which is evaluated to obtain a diff file (either ed-style
+--- 2521,2526 ----
+***************
+*** 2608,2614 ****
+ *'dip'* *'diffopt'*
+ 'diffopt' 'dip' string (default "internal,filler")
+ global
+- {not in Vi}
+ {not available when compiled without the |+diff|
+ feature}
+ Option settings for diff mode. It can consist of the following items.
+--- 2531,2536 ----
+***************
+*** 2623,2630 ****
+--- 2545,2564 ----
+ context:{n} Use a context of {n} lines between a change
+ and a fold that contains unchanged lines.
+ When omitted a context of six lines is used.
++ When using zero the context is actually one,
++ since folds require a line in between, also
++ for a deleted line.
+ See |fold-diff|.
+
++ iblank Ignore changes where lines are all blank. Adds
++ the "-B" flag to the "diff" command if
++ 'diffexpr' is empty. Check the documentation
++ of the "diff" command for what this does
++ exactly.
++ NOTE: the diff windows will get out of sync,
++ because no differences between blank lines are
++ taken into account.
++
+ icase Ignore changes in case of text. "a" and "A"
+ are considered the same. Adds the "-i" flag
+ to the "diff" command if 'diffexpr' is empty.
+***************
+*** 2636,2641 ****
+--- 2570,2587 ----
+ exactly. It should ignore adding trailing
+ white space, but not leading white space.
+
++ iwhiteall Ignore all white space changes. Adds
++ the "-w" flag to the "diff" command if
++ 'diffexpr' is empty. Check the documentation
++ of the "diff" command for what this does
++ exactly.
++
++ iwhiteeol Ignore white space changes at end of line.
++ Adds the "-Z" flag to the "diff" command if
++ 'diffexpr' is empty. Check the documentation
++ of the "diff" command for what this does
++ exactly.
++
+ horizontal Start diff mode with horizontal splits (unless
+ explicitly specified otherwise).
+
+***************
+*** 2656,2666 ****
+ 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
+--- 2602,2612 ----
+ 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
+***************
+*** 2677,2683 ****
+ *'digraph'* *'dg'* *'nodigraph'* *'nodg'*
+ 'digraph' 'dg' boolean (default off)
+ global
+- {not in Vi}
+ {not available when compiled without the |+digraphs|
+ feature}
+ Enable the entering of digraphs in Insert mode with {char1} <BS>
+--- 2623,2628 ----
+***************
+*** 2738,2744 ****
+ 'display' 'dy' string (default "", set to "truncate" in
+ |defaults.vim|)
+ global
+- {not in Vi}
+ Change the way text is displayed. This is comma separated list of
+ flags:
+ lastline When included, as much as possible of the last line
+--- 2683,2688 ----
+***************
+*** 2756,2762 ****
+ *'eadirection'* *'ead'*
+ 'eadirection' 'ead' string (default "both")
+ global
+- {not in Vi}
+ {not available when compiled without the |+vertsplit|
+ feature}
+ Tells when the 'equalalways' option applies:
+--- 2700,2705 ----
+***************
+*** 2775,2792 ****
+ *'emoji'* *'emo'* *'noemoji'* *'noemo'*
+ 'emoji' 'emo' boolean (default: on)
+ global
+- {not in Vi}
+- {only available when compiled with the |+multi_byte|
+- feature}
+ When on all Unicode emoji characters are considered to be full width.
+
+
+ *'encoding'* *'enc'* *E543*
+ 'encoding' 'enc' string (default: "latin1" or value from $LANG)
+ global
+- {only available when compiled with the |+multi_byte|
+- feature}
+- {not in Vi}
+ Sets the character encoding used inside Vim. It applies to text in
+ the buffers, registers, Strings in expressions, text stored in the
+ viminfo file, etc. It sets the kind of characters which Vim can work
+--- 2718,2729 ----
+***************
+*** 2849,2855 ****
+ *'endofline'* *'eol'* *'noendofline'* *'noeol'*
+ 'endofline' 'eol' boolean (default on)
+ local to buffer
+- {not in Vi}
+ When writing a file and this option is off and the 'binary' option
+ is on, or 'fixeol' option is off, no <EOL> will be written for the
+ last line in the file. This option is automatically set or reset when
+--- 2786,2791 ----
+***************
+*** 2865,2871 ****
+ *'equalalways'* *'ea'* *'noequalalways'* *'noea'*
+ 'equalalways' 'ea' boolean (default on)
+ global
+- {not in Vi}
+ When on, all the windows are automatically made the same size after
+ splitting or closing a window. This also happens the moment the
+ option is switched on. When off, splitting a window will reduce the
+--- 2801,2806 ----
+***************
+*** 2884,2890 ****
+ *'equalprg'* *'ep'*
+ 'equalprg' 'ep' string (default "")
+ global or local to buffer |global-local|
+- {not in Vi}
+ External program to use for "=" command. When this option is empty
+ the internal formatting functions are used; either 'lisp', 'cindent'
+ or 'indentexpr'. When Vim was compiled without internal formatting,
+--- 2819,2824 ----
+***************
+*** 2908,2914 ****
+ 'errorfile' 'ef' string (Amiga default: "AztecC.Err",
+ others: "errors.err")
+ global
+- {not in Vi}
+ {not available when compiled without the |+quickfix|
+ feature}
+ Name of the errorfile for the QuickFix mode (see |:cf|).
+--- 2842,2847 ----
+***************
+*** 2923,2929 ****
+ *'errorformat'* *'efm'*
+ 'errorformat' 'efm' string (default is very long)
+ global or local to buffer |global-local|
+- {not in Vi}
+ {not available when compiled without the |+quickfix|
+ feature}
+ Scanf-like description of the format for the lines in the error file
+--- 2856,2861 ----
+***************
+*** 2932,2938 ****
+ *'esckeys'* *'ek'* *'noesckeys'* *'noek'*
+ 'esckeys' 'ek' boolean (Vim default: on, Vi default: off)
+ global
+- {not in Vi}
+ Function keys that start with an <Esc> are recognized in Insert
+ mode. When this option is off, the cursor and function keys cannot be
+ used in Insert mode if they start with an <Esc>. The advantage of
+--- 2864,2869 ----
+***************
+*** 2947,2953 ****
+ *'eventignore'* *'ei'*
+ 'eventignore' 'ei' string (default "")
+ global
+- {not in Vi}
+ A list of autocommand event names, which are to be ignored.
+ When set to "all" or when "all" is one of the items, all autocommand
+ events are ignored, autocommands will not be executed.
+--- 2878,2883 ----
+***************
+*** 2957,2963 ****
+ *'expandtab'* *'et'* *'noexpandtab'* *'noet'*
+ 'expandtab' 'et' boolean (default off)
+ local to buffer
+- {not in Vi}
+ In Insert mode: Use the appropriate number of spaces to insert a
+ <Tab>. Spaces are used in indents with the '>' and '<' commands and
+ when 'autoindent' is on. To insert a real tab when 'expandtab' is
+--- 2887,2892 ----
+***************
+*** 2969,2975 ****
+ *'exrc'* *'ex'* *'noexrc'* *'noex'*
+ 'exrc' 'ex' boolean (default off)
+ global
+- {not in Vi}
+ Enables the reading of .vimrc, .exrc and .gvimrc in the current
+ directory.
+
+--- 2898,2903 ----
+***************
+*** 2988,2996 ****
+ *'fileencoding'* *'fenc'* *E213*
+ 'fileencoding' 'fenc' string (default: "")
+ local to buffer
+- {only available when compiled with the |+multi_byte|
+- feature}
+- {not in Vi}
+ Sets the character encoding for the file of this buffer.
+
+ When 'fileencoding' is different from 'encoding', conversion will be
+--- 2916,2921 ----
+***************
+*** 3045,3053 ****
+ "ucs-bom,utf-8,default,latin1" when
+ 'encoding' is set to a Unicode value)
+ global
+- {only available when compiled with the |+multi_byte|
+- feature}
+- {not in Vi}
+ This is a list of character encodings considered when starting to edit
+ an existing file. When a file is read, Vim tries to use the first
+ mentioned character encoding. If an error is detected, the next one
+--- 2970,2975 ----
+***************
+*** 3104,3110 ****
+ 'fileformat' 'ff' string (MS-Windows default: "dos",
+ Unix, macOS default: "unix")
+ local to buffer
+- {not in Vi}
+ This gives the <EOL> of the current buffer, which is used for
+ reading/writing the buffer from/to a file:
+ dos <CR> <NL>
+--- 3026,3031 ----
+***************
+*** 3130,3136 ****
+ Vi Cygwin: "unix,dos",
+ Vi others: "")
+ global
+- {not in Vi}
+ This gives the end-of-line (<EOL>) formats that will be tried when
+ starting to edit a new buffer and when reading a file into an existing
+ buffer:
+--- 3051,3056 ----
+***************
+*** 3186,3199 ****
+ 'fileignorecase' 'fic' boolean (default on for systems where case in file
+ names is normally ignored)
+ global
+- {not in Vi}
+ When set case is ignored when using file names and directories.
+ See 'wildignorecase' for only ignoring case when doing completion.
+
+ *'filetype'* *'ft'*
+ 'filetype' 'ft' string (default: "")
+ local to buffer
+- {not in Vi}
+ When this option is set, the FileType autocommand event is triggered.
+ All autocommands that match with the value of this option will be
+ executed. Thus the value of 'filetype' is used in place of the file
+--- 3106,3117 ----
+***************
+*** 3219,3225 ****
+ *'fillchars'* *'fcs'*
+ 'fillchars' 'fcs' string (default "vert:|,fold:-")
+ global
+- {not in Vi}
+ {not available when compiled without the |+windows|
+ and |+folding| features}
+ Characters to fill the statuslines and vertical separators.
+--- 3137,3142 ----
+***************
+*** 3254,3260 ****
+ *'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
+ 'fixendofline' 'fixeol' boolean (default on)
+ local to buffer
+- {not in Vi}
+ When writing a file and this option is on, <EOL> at the end of file
+ will be restored if missing. Turn this option off if you want to
+ preserve the situation from the original file.
+--- 3171,3176 ----
+***************
+*** 3265,3271 ****
+ *'fkmap'* *'fk'* *'nofkmap'* *'nofk'*
+ 'fkmap' 'fk' boolean (default off) *E198*
+ global
+- {not in Vi}
+ {only available when compiled with the |+rightleft|
+ feature}
+ This option was for using Farsi, which has been removed. See
+--- 3181,3186 ----
+***************
+*** 3274,3280 ****
+ *'foldclose'* *'fcl'*
+ 'foldclose' 'fcl' string (default "")
+ global
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ When set to "all", a fold is closed when the cursor isn't in it and
+--- 3189,3194 ----
+***************
+*** 3284,3290 ****
+ *'foldcolumn'* *'fdc'*
+ 'foldcolumn' 'fdc' number (default 0)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ When non-zero, a column with the specified width is shown at the side
+--- 3198,3203 ----
+***************
+*** 3295,3301 ****
+ *'foldenable'* *'fen'* *'nofoldenable'* *'nofen'*
+ 'foldenable' 'fen' boolean (default on)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ When off, all folds are open. This option can be used to quickly
+--- 3208,3213 ----
+***************
+*** 3309,3315 ****
+ *'foldexpr'* *'fde'*
+ 'foldexpr' 'fde' string (default: "0")
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ or |+eval| features}
+ The expression used for when 'foldmethod' is "expr". It is evaluated
+--- 3221,3226 ----
+***************
+*** 3326,3332 ****
+ *'foldignore'* *'fdi'*
+ 'foldignore' 'fdi' string (default: "#")
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ Used only when 'foldmethod' is "indent". Lines starting with
+--- 3237,3242 ----
+***************
+*** 3337,3343 ****
+ *'foldlevel'* *'fdl'*
+ 'foldlevel' 'fdl' number (default: 0)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ Sets the fold level: Folds with a higher level will be closed.
+--- 3247,3252 ----
+***************
+*** 3349,3355 ****
+ *'foldlevelstart'* *'fdls'*
+ 'foldlevelstart' 'fdls' number (default: -1)
+ global
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ Sets 'foldlevel' when starting to edit another buffer in a window.
+--- 3258,3263 ----
+***************
+*** 3365,3371 ****
+ *'foldmarker'* *'fmr'* *E536*
+ 'foldmarker' 'fmr' string (default: "{{{,}}}")
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ The start and end marker used when 'foldmethod' is "marker". There
+--- 3273,3278 ----
+***************
+*** 3376,3382 ****
+ *'foldmethod'* *'fdm'*
+ 'foldmethod' 'fdm' string (default: "manual")
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ The kind of folding used for the current window. Possible values:
+--- 3283,3288 ----
+***************
+*** 3390,3396 ****
+ *'foldminlines'* *'fml'*
+ 'foldminlines' 'fml' number (default: 1)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ Sets the number of screen lines above which a fold can be displayed
+--- 3296,3301 ----
+***************
+*** 3404,3410 ****
+ *'foldnestmax'* *'fdn'*
+ 'foldnestmax' 'fdn' number (default: 20)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ Sets the maximum nesting of folds for the "indent" and "syntax"
+--- 3309,3314 ----
+***************
+*** 3415,3421 ****
+ 'foldopen' 'fdo' string (default: "block,hor,mark,percent,quickfix,
+ search,tag,undo")
+ global
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ Specifies for which type of commands folds will be opened, if the
+--- 3319,3324 ----
+***************
+*** 3452,3458 ****
+ *'foldtext'* *'fdt'*
+ 'foldtext' 'fdt' string (default: "foldtext()")
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+folding|
+ feature}
+ An expression which is used to specify the text displayed for a closed
+--- 3355,3360 ----
+***************
+*** 3467,3473 ****
+ *'formatexpr'* *'fex'*
+ 'formatexpr' 'fex' string (default "")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+eval|
+ feature}
+ Expression which is evaluated to format a range of lines for the |gq|
+--- 3369,3374 ----
+***************
+*** 3500,3522 ****
+ since changing the buffer text is not allowed.
+ NOTE: This option is set to "" when 'compatible' is set.
+
+- *'formatoptions'* *'fo'*
+- 'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt")
+- local to buffer
+- {not in Vi}
+- This is a sequence of letters which describes how automatic
+- formatting is to be done. See |fo-table|. When the 'paste' option is
+- on, no formatting is done (like 'formatoptions' is empty). Commas can
+- be inserted for readability.
+- To avoid problems with flags that are added in the future, use the
+- "+=" and "-=" feature of ":set" |add-option-flags|.
+- NOTE: This option is set to the Vi default value when 'compatible' is
+- set and to the Vim default value when 'compatible' is reset.
+-
+ *'formatlistpat'* *'flp'*
+ 'formatlistpat' 'flp' string (default: "^\s*\d\+[\]:.)}\t ]\s*")
+ local to buffer
+- {not in Vi}
+ A pattern that is used to recognize a list header. This is used for
+ the "n" flag in 'formatoptions'.
+ The pattern must match exactly the text that will be the indent for
+--- 3401,3409 ----
+***************
+*** 3527,3536 ****
+ The default recognizes a number, followed by an optional punctuation
+ character and white space.
+
+ *'formatprg'* *'fp'*
+ 'formatprg' 'fp' string (default "")
+ global or local to buffer |global-local|
+- {not in Vi}
+ The name of an external program that will be used to format the lines
+ selected with the |gq| operator. The program must take the input on
+ stdin and produce the output on stdout. The Unix program "fmt" is
+--- 3414,3434 ----
+ The default recognizes a number, followed by an optional punctuation
+ character and white space.
+
++ *'formatoptions'* *'fo'*
++ 'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt")
++ local to buffer
++ This is a sequence of letters which describes how automatic
++ formatting is to be done. See |fo-table|. When the 'paste' option is
++ on, no formatting is done (like 'formatoptions' is empty). Commas can
++ be inserted for readability.
++ To avoid problems with flags that are added in the future, use the
++ "+=" and "-=" feature of ":set" |add-option-flags|.
++ NOTE: This option is set to the Vi default value when 'compatible' is
++ set and to the Vim default value when 'compatible' is reset.
++
+ *'formatprg'* *'fp'*
+ 'formatprg' 'fp' string (default "")
+ global or local to buffer |global-local|
+ The name of an external program that will be used to format the lines
+ selected with the |gq| operator. The program must take the input on
+ stdin and produce the output on stdout. The Unix program "fmt" is
+***************
+*** 3546,3552 ****
+ *'fsync'* *'fs'* *'nofsync'* *'nofs'*
+ 'fsync' 'fs' boolean (default on)
+ global
+- {not in Vi}
+ When on, the library function fsync() will be called after writing a
+ file. This will flush a file to disk, ensuring that it is safely
+ written even on filesystems which do metadata-only journaling. This
+--- 3444,3449 ----
+***************
+*** 3562,3568 ****
+ *'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
+ 'gdefault' 'gd' boolean (default off)
+ global
+- {not in Vi}
+ When on, the ":substitute" flag 'g' is default on. This means that
+ all matches in a line are substituted instead of one. When a 'g' flag
+ is given to a ":substitute" command, this will toggle the substitution
+--- 3459,3464 ----
+***************
+*** 3581,3587 ****
+ *'grepformat'* *'gfm'*
+ 'grepformat' 'gfm' string (default "%f:%l:%m,%f:%l%m,%f %l%m")
+ global
+- {not in Vi}
+ Format to recognize for the ":grep" command output.
+ This is a scanf-like string that uses the same format as the
+ 'errorformat' option: see |errorformat|.
+--- 3477,3482 ----
+***************
+*** 3592,3598 ****
+ Win32: "findstr /n" or "grep -n",
+ VMS: "SEARCH/NUMBERS ")
+ global or local to buffer |global-local|
+- {not in Vi}
+ Program to use for the |:grep| command. This option may contain '%'
+ and '#' characters, which are expanded like when used in a command-
+ line. The placeholder "$*" is allowed to specify where the arguments
+--- 3487,3492 ----
+***************
+*** 3623,3629 ****
+ "n-v-c:block,o:hor50,i-ci:hor15,
+ r-cr:hor30,sm:block")
+ global
+- {not in Vi}
+ {only available when compiled with GUI enabled, and
+ for MS-DOS and Win32 console}
+ This option tells Vim what the cursor should look like in different
+--- 3517,3522 ----
+***************
+*** 3702,3708 ****
+ *E235* *E596*
+ 'guifont' 'gfn' string (default "")
+ global
+- {not in Vi}
+ {only available when compiled with GUI enabled}
+ This is a list of fonts which will be used for the GUI version of Vim.
+ In its simplest form the value is just one font name.
+--- 3595,3600 ----
+***************
+*** 3712,3718 ****
+ *E250* *E252* *E234* *E597* *E598*
+ 'guifontset' 'gfs' string (default "")
+ global
+- {not in Vi}
+ {only available when compiled with GUI enabled and
+ with the |+xfontset| feature}
+ {not available in the GTK+ GUI}
+--- 3604,3609 ----
+***************
+*** 3723,3729 ****
+ *'guifontwide'* *'gfw'* *E231* *E533* *E534*
+ 'guifontwide' 'gfw' string (default "")
+ global
+- {not in Vi}
+ {only available when compiled with GUI enabled}
+ When not empty, specifies a comma-separated list of fonts to be used
+ for double-width characters. The first font that can be loaded is
+--- 3614,3619 ----
+***************
+*** 3732,3738 ****
+ *'guiheadroom'* *'ghr'*
+ 'guiheadroom' 'ghr' number (default 50)
+ global
+! {not in Vi} {only for GTK and X11 GUI}
+ The number of pixels subtracted from the screen height when fitting
+ the GUI window on the screen. Set this before the GUI is started,
+ e.g., in your |gvimrc| file. When zero, the whole screen height will
+--- 3622,3628 ----
+ *'guiheadroom'* *'ghr'*
+ 'guiheadroom' 'ghr' number (default 50)
+ global
+! - {only for GTK and X11 GUI}
+ The number of pixels subtracted from the screen height when fitting
+ the GUI window on the screen. Set this before the GUI is started,
+ e.g., in your |gvimrc| file. When zero, the whole screen height will
+***************
+*** 3742,3753 ****
+ screen.
+
+ *'guioptions'* *'go'*
+! 'guioptions' 'go' string (default "egmrLtT" (MS-Windows, "t" is
+! removed in |defaults.vim|),
+ "aegimrLtT" (GTK, Motif and Athena),
+ )
+ global
+- {not in Vi}
+ {only available when compiled with GUI enabled}
+ This option only has an effect in the GUI version of Vim. It is a
+ sequence of letters which describes what components and options of the
+--- 3632,3642 ----
+ screen.
+
+ *'guioptions'* *'go'*
+! 'guioptions' 'go' string (default "egmrLtT" (MS-Windows,
+! "t" is removed in |defaults.vim|),
+ "aegimrLtT" (GTK, Motif and Athena),
+ )
+ global
+ {only available when compiled with GUI enabled}
+ This option only has an effect in the GUI version of Vim. It is a
+ sequence of letters which describes what components and options of the
+***************
+*** 3763,3769 ****
+ terminal to list the command output.
+ The terminal window will be positioned at the bottom, and grow
+ upwards as needed.
+! *guioptions_a* *'go-a'*
+ 'a' Autoselect: If present, then whenever VISUAL mode is started,
+ or the Visual area extended, Vim tries to become the owner of
+ the windowing system's global selection. This means that the
+--- 3652,3658 ----
+ terminal to list the command output.
+ The terminal window will be positioned at the bottom, and grow
+ upwards as needed.
+! *'go-a'*
+ 'a' Autoselect: If present, then whenever VISUAL mode is started,
+ or the Visual area extended, Vim tries to become the owner of
+ the windowing system's global selection. This means that the
+***************
+*** 3874,3880 ****
+ *'guipty'* *'noguipty'*
+ 'guipty' boolean (default on)
+ global
+- {not in Vi}
+ {only available when compiled with GUI enabled}
+ Only in the GUI: If on, an attempt is made to open a pseudo-tty for
+ I/O to/from shell commands. See |gui-pty|.
+--- 3763,3768 ----
+***************
+*** 3882,3888 ****
+ *'guitablabel'* *'gtl'*
+ 'guitablabel' 'gtl' string (default empty)
+ global
+- {not in Vi}
+ {only available when compiled with GUI enabled and
+ with the |+windows| feature}
+ When nonempty describes the text to use in a label of the GUI tab
+--- 3770,3775 ----
+***************
+*** 3901,3907 ****
+ *'guitabtooltip'* *'gtt'*
+ 'guitabtooltip' 'gtt' string (default empty)
+ global
+- {not in Vi}
+ {only available when compiled with GUI enabled and
+ with the |+windows| feature}
+ When nonempty describes the text to use in a tooltip for the GUI tab
+--- 3788,3793 ----
+***************
+*** 3915,3921 ****
+ 'helpfile' 'hf' string (default (MSDOS) "$VIMRUNTIME\doc\help.txt"
+ (others) "$VIMRUNTIME/doc/help.txt")
+ global
+- {not in Vi}
+ Name of the main help file. All distributed help files should be
+ placed together in one directory. Additionally, all "doc" directories
+ in 'runtimepath' will be used.
+--- 3801,3806 ----
+***************
+*** 3929,3935 ****
+ *'helpheight'* *'hh'*
+ 'helpheight' 'hh' number (default 20)
+ global
+- {not in Vi}
+ {not available when compiled without the |+windows|
+ feature}
+ Minimal initial height of the help window when it is opened with the
+--- 3814,3819 ----
+***************
+*** 3943,3949 ****
+ global
+ {only available when compiled with the |+multi_lang|
+ feature}
+- {not in Vi}
+ Comma separated list of languages. Vim will use the first language
+ for which the desired help can be found. The English help will always
+ be used as a last resort. You can add "en" to prefer English over
+--- 3827,3832 ----
+***************
+*** 3960,3966 ****
+ *'hidden'* *'hid'* *'nohidden'* *'nohid'*
+ 'hidden' 'hid' boolean (default off)
+ global
+- {not in Vi}
+ When off a buffer is unloaded when it is |abandon|ed. When on a
+ buffer becomes hidden when it is |abandon|ed. If the buffer is still
+ displayed in another window, it does not become hidden, of course.
+--- 3843,3848 ----
+***************
+*** 3980,3996 ****
+ l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,
+ N:CursorLineNr,r:Question,s:StatusLine,
+ S:StatusLineNC,c:VertSplit,t:Title,
+! v:Visual,w:WarningMsg,W:WildMenu,f:Folded,
+! F:FoldColumn,A:DiffAdd,C:DiffChange,
+! D:DiffDelete,T:DiffText,>:SignColumn,
+ B:SpellBad,P:SpellCap,R:SpellRare,
+! L:SpellLocal,-:Conceal,+:Pmenu,=:PmenuSel,
+ x:PmenuSbar,X:PmenuThumb,*:TabLine,
+ #:TabLineSel,_:TabLineFill,!:CursorColumn,
+ .:CursorLine,o:ColorColumn,q:QuickFixLine,
+ z:StatusLineTerm,Z:StatusLineTermNC")
+ global
+- {not in Vi}
+ This option can be used to set highlighting mode for various
+ occasions. It is a comma separated list of character pairs. The
+ first character in a pair gives the occasion, the second the mode to
+--- 3862,3878 ----
+ l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,
+ N:CursorLineNr,r:Question,s:StatusLine,
+ S:StatusLineNC,c:VertSplit,t:Title,
+! v:Visual,V:VisualNOS,w:WarningMsg,
+! W:WildMenu,f:Folded,F:FoldColumn,
+! A:DiffAdd,C:DiffChange,D:DiffDelete,
+! T:DiffText,>:SignColumn,-:Conceal,
+ B:SpellBad,P:SpellCap,R:SpellRare,
+! L:SpellLocal,+:Pmenu,=:PmenuSel,
+ x:PmenuSbar,X:PmenuThumb,*:TabLine,
+ #:TabLineSel,_:TabLineFill,!:CursorColumn,
+ .:CursorLine,o:ColorColumn,q:QuickFixLine,
+ z:StatusLineTerm,Z:StatusLineTermNC")
+ global
+ This option can be used to set highlighting mode for various
+ occasions. It is a comma separated list of character pairs. The
+ first character in a pair gives the occasion, the second the mode to
+***************
+*** 4029,4044 ****
+ |hl-DiffDelete| D deleted line in diff mode
+ |hl-DiffText| T inserted text in diff mode
+ |hl-SignColumn| > column used for |signs|
+ |hl-SpellBad| B misspelled word |spell|
+ |hl-SpellCap| P word that should start with capital |spell|
+ |hl-SpellRare| R rare word |spell|
+ |hl-SpellLocal| L word from other region |spell|
+! |hl-Conceal| - the placeholders used for concealed characters
+! (see 'conceallevel')
+! |hl-Pmenu| + popup menu normal line
+! |hl-PmenuSel| = popup menu normal line
+! |hl-PmenuSbar| x popup menu scrollbar
+! |hl-PmenuThumb| X popup menu scrollbar thumb
+
+ The display modes are:
+ r reverse (termcap entry "mr" and "me")
+--- 3911,3926 ----
+ |hl-DiffDelete| D deleted line in diff mode
+ |hl-DiffText| T inserted text in diff mode
+ |hl-SignColumn| > column used for |signs|
++ |hl-Conceal| - the placeholders used for concealed characters
++ (see 'conceallevel')
+ |hl-SpellBad| B misspelled word |spell|
+ |hl-SpellCap| P word that should start with capital |spell|
+ |hl-SpellRare| R rare word |spell|
+ |hl-SpellLocal| L word from other region |spell|
+! |hl-Pmenu| + popup menu normal line
+! |hl-PmenuSel| = popup menu selected line
+! |hl-PmenuSbar| x popup menu scrollbar
+! |hl-PmenuThumb| X popup menu scrollbar thumb
+
+ The display modes are:
+ r reverse (termcap entry "mr" and "me")
+***************
+*** 4064,4070 ****
+ 'history' 'hi' number (Vim default: 50, Vi default: 0,
+ set to 200 in |defaults.vim|)
+ global
+- {not in Vi}
+ A history of ":" commands, and a history of previous search patterns
+ is remembered. This option decides how many entries may be stored in
+ each of these histories (see |cmdline-editing|).
+--- 3946,3951 ----
+***************
+*** 4075,4081 ****
+ *'hkmap'* *'hk'* *'nohkmap'* *'nohk'*
+ 'hkmap' 'hk' boolean (default off)
+ global
+- {not in Vi}
+ {only available when compiled with the |+rightleft|
+ feature}
+ When on, the keyboard is mapped for the Hebrew character set.
+--- 3956,3961 ----
+***************
+*** 4086,4092 ****
+ *'hkmapp'* *'hkp'* *'nohkmapp'* *'nohkp'*
+ 'hkmapp' 'hkp' boolean (default off)
+ global
+- {not in Vi}
+ {only available when compiled with the |+rightleft|
+ feature}
+ When on, phonetic keyboard mapping is used. 'hkmap' must also be on.
+--- 3966,3971 ----
+***************
+*** 4097,4103 ****
+ *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'*
+ 'hlsearch' 'hls' boolean (default off)
+ global
+- {not in Vi}
+ {not available when compiled without the
+ |+extra_search| feature}
+ When there is a previous search pattern, highlight all its matches.
+--- 3976,3981 ----
+***************
+*** 4122,4128 ****
+ *'icon'* *'noicon'*
+ 'icon' boolean (default off, on when title can be restored)
+ global
+- {not in Vi}
+ {not available when compiled without the |+title|
+ feature}
+ When on, the icon text of the window will be set to the value of
+--- 4000,4005 ----
+***************
+*** 4141,4147 ****
+ *'iconstring'*
+ 'iconstring' string (default "")
+ global
+- {not in Vi}
+ {not available when compiled without the |+title|
+ feature}
+ When this option is not empty, it will be used for the icon text of
+--- 4018,4023 ----
+***************
+*** 4168,4176 ****
+ *'imactivatefunc'* *'imaf'*
+ 'imactivatefunc' 'imaf' string (default "")
+ global
+- {not in Vi}
+- {only available when compiled with the |+multi_byte|
+- feature}
+ This option specifies a function that will be called to
+ activate or deactivate the Input Method.
+ It is not used in the GUI.
+--- 4044,4049 ----
+***************
+*** 4189,4195 ****
+ *'imactivatekey'* *'imak'*
+ 'imactivatekey' 'imak' string (default "")
+ global
+- {not in Vi}
+ {only available when compiled with |+xim| and
+ |+GUI_GTK|} *E599*
+ Specifies the key that your Input Method in X-Windows uses for
+--- 4062,4067 ----
+***************
+*** 4221,4229 ****
+ *'imcmdline'* *'imc'* *'noimcmdline'* *'noimc'*
+ 'imcmdline' 'imc' boolean (default off)
+ global
+- {not in Vi}
+- {only available when compiled with the |+multi_byte|
+- feature}
+ When set the Input Method is always on when starting to edit a command
+ line, unless entering a search pattern (see 'imsearch' for that).
+ Setting this option is useful when your input method allows entering
+--- 4093,4098 ----
+***************
+*** 4233,4241 ****
+ *'imdisable'* *'imd'* *'noimdisable'* *'noimd'*
+ 'imdisable' 'imd' boolean (default off, on for some systems (SGI))
+ global
+- {not in Vi}
+- {only available when compiled with the |+multi_byte|
+- feature}
+ When set the Input Method is never used. This is useful to disable
+ the IM when it doesn't work properly.
+ Currently this option is on by default for SGI/IRIX machines. This
+--- 4102,4107 ----
+***************
+*** 4244,4250 ****
+ *'iminsert'* *'imi'*
+ 'iminsert' 'imi' number (default 0)
+ local to buffer
+- {not in Vi}
+ Specifies whether :lmap or an Input Method (IM) is to be used in
+ Insert mode. Valid values:
+ 0 :lmap is off and IM is off
+--- 4110,4115 ----
+***************
+*** 4263,4275 ****
+ methods. Use 'imdisable' to disable XIM then.
+
+ You can set 'imactivatefunc' and 'imstatusfunc' to handle IME/XIM
+! via external command if vim is not compiled with the |+xim|,
+ |+multi_byte_ime| or |global-ime|.
+
+ *'imsearch'* *'ims'*
+ 'imsearch' 'ims' number (default -1)
+ local to buffer
+- {not in Vi}
+ Specifies whether :lmap or an Input Method (IM) is to be used when
+ entering a search pattern. Valid values:
+ -1 the value of 'iminsert' is used, makes it look like
+--- 4128,4139 ----
+ methods. Use 'imdisable' to disable XIM then.
+
+ You can set 'imactivatefunc' and 'imstatusfunc' to handle IME/XIM
+! via external command if Vim is not compiled with the |+xim|,
+ |+multi_byte_ime| or |global-ime|.
+
+ *'imsearch'* *'ims'*
+ 'imsearch' 'ims' number (default -1)
+ local to buffer
+ Specifies whether :lmap or an Input Method (IM) is to be used when
+ entering a search pattern. Valid values:
+ -1 the value of 'iminsert' is used, makes it look like
+***************
+*** 4287,4295 ****
+ *'imstatusfunc'* *'imsf'*
+ 'imstatusfunc' 'imsf' string (default "")
+ global
+- {not in Vi}
+- {only available when compiled with the |+multi_byte|
+- feature}
+ This option specifies a function that is called to obtain the status
+ of Input Method. It must return a positive number when IME is active.
+ It is not used in the GUI.
+--- 4151,4156 ----
+***************
+*** 4306,4312 ****
+ *'imstyle'* *'imst'*
+ 'imstyle' 'imst' number (default 1)
+ global
+- {not in Vi}
+ {only available when compiled with |+xim| and
+ |+GUI_GTK|}
+ This option specifies the input style of Input Method:
+--- 4167,4172 ----
+***************
+*** 4323,4329 ****
+ *'include'* *'inc'*
+ 'include' 'inc' string (default "^\s*#\s*include")
+ global or local to buffer |global-local|
+- {not in Vi}
+ {not available when compiled without the
+ |+find_in_path| feature}
+ Pattern to be used to find an include command. It is a search
+--- 4183,4188 ----
+***************
+*** 4341,4347 ****
+ *'includeexpr'* *'inex'*
+ 'includeexpr' 'inex' string (default "")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the
+ |+find_in_path| or |+eval| features}
+ Expression to be used to transform the string found with the 'include'
+--- 4200,4205 ----
+***************
+*** 4363,4376 ****
+ 'incsearch' 'is' boolean (default off, set in |defaults.vim| if the
+ +reltime feature is supported)
+ global
+- {not in Vi}
+ {not available when compiled without the
+ |+extra_search| features}
+ While typing a search command, show where the pattern, as it was typed
+ so far, matches. The matched string is highlighted. If the pattern
+ is invalid or not found, nothing is shown. The screen will be updated
+ often, this is only useful on fast terminals.
+! Note that the match will be shown, but the cursor will return to its
+ original position when no match is found and when pressing <Esc>. You
+ still need to finish the search command with <Enter> to move the
+ cursor to the match.
+--- 4221,4244 ----
+ 'incsearch' 'is' boolean (default off, set in |defaults.vim| if the
+ +reltime feature is supported)
+ global
+ {not available when compiled without the
+ |+extra_search| features}
+ While typing a search command, show where the pattern, as it was typed
+ so far, matches. The matched string is highlighted. If the pattern
+ is invalid or not found, nothing is shown. The screen will be updated
+ often, this is only useful on fast terminals.
+! Also applies to the pattern in commands: >
+! :global
+! :lvimgrep
+! :lvimgrepadd
+! :smagic
+! :snomagic
+! :sort
+! :substitute
+! :vglobal
+! :vimgrep
+! :vimgrepadd
+! < Note that the match will be shown, but the cursor will return to its
+ original position when no match is found and when pressing <Esc>. You
+ still need to finish the search command with <Enter> to move the
+ cursor to the match.
+***************
+*** 4383,4391 ****
+ The highlighting can be set with the 'i' flag in 'highlight'.
+ When 'hlsearch' is on, all matched strings are highlighted too while
+ typing a search command. See also: 'hlsearch'.
+! If you don't want turn 'hlsearch' on, but want to highlight all matches
+! while searching, you can turn on and off 'hlsearch' with autocmd.
+! Example: >
+ augroup vimrc-incsearch-highlight
+ autocmd!
+ autocmd CmdlineEnter /,\? :set hlsearch
+--- 4251,4259 ----
+ The highlighting can be set with the 'i' flag in 'highlight'.
+ When 'hlsearch' is on, all matched strings are highlighted too while
+ typing a search command. See also: 'hlsearch'.
+! If you don't want to turn 'hlsearch' on, but want to highlight all
+! matches while searching, you can turn on and off 'hlsearch' with
+! autocmd. Example: >
+ augroup vimrc-incsearch-highlight
+ autocmd!
+ autocmd CmdlineEnter /,\? :set hlsearch
+***************
+*** 4403,4409 ****
+ *'indentexpr'* *'inde'*
+ 'indentexpr' 'inde' string (default "")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+cindent|
+ or |+eval| features}
+ Expression which is evaluated to obtain the proper indent for a line.
+--- 4271,4276 ----
+***************
+*** 4441,4447 ****
+ *'indentkeys'* *'indk'*
+ 'indentkeys' 'indk' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+cindent|
+ feature}
+ A list of keys that, when typed in Insert mode, cause reindenting of
+--- 4308,4313 ----
+***************
+*** 4452,4458 ****
+ *'infercase'* *'inf'* *'noinfercase'* *'noinf'*
+ 'infercase' 'inf' boolean (default off)
+ local to buffer
+- {not in Vi}
+ When doing keyword completion in insert mode |ins-completion|, and
+ 'ignorecase' is also on, the case of the match is adjusted depending
+ on the typed text. If the typed text contains a lowercase letter
+--- 4318,4323 ----
+***************
+*** 4465,4471 ****
+ *'insertmode'* *'im'* *'noinsertmode'* *'noim'*
+ 'insertmode' 'im' boolean (default off)
+ global
+- {not in Vi}
+ Makes Vim work in a way that Insert mode is the default mode. Useful
+ if you want to use Vim as a modeless editor. Used for |evim|.
+ These Insert mode commands will be useful:
+--- 4330,4335 ----
+***************
+*** 4498,4504 ****
+ for OS/390: "@,240-249,/,.,-,_,+,,,#,$,%,~,="
+ otherwise: "@,48-57,/,.,-,_,+,,,#,$,%,~,=")
+ global
+- {not in Vi}
+ The characters specified by this option are included in file names and
+ path names. Filenames are used for commands like "gf", "[i" and in
+ the tags file. It is also used for "\f" in a |pattern|.
+--- 4362,4367 ----
+***************
+*** 4550,4561 ****
+ "@,48-57,_,128-167,224-235"
+ otherwise: "@,48-57,_,192-255")
+ global
+- {not in Vi}
+ The characters given by this option are included in identifiers.
+ Identifiers are used in recognizing environment variables and after a
+ match of the 'define' option. It is also used for "\i" in a
+ |pattern|. See 'isfname' for a description of the format of this
+! option.
+ Careful: If you change this option, it might break expanding
+ environment variables. E.g., when '/' is included and Vim tries to
+ expand "$HOME/.viminfo". Maybe you should change 'iskeyword' instead.
+--- 4413,4423 ----
+ "@,48-57,_,128-167,224-235"
+ otherwise: "@,48-57,_,192-255")
+ global
+ The characters given by this option are included in identifiers.
+ Identifiers are used in recognizing environment variables and after a
+ match of the 'define' option. It is also used for "\i" in a
+ |pattern|. See 'isfname' for a description of the format of this
+! option. For '@' only characters up to 255 are used.
+ Careful: If you change this option, it might break expanding
+ environment variables. E.g., when '/' is included and Vim tries to
+ expand "$HOME/.viminfo". Maybe you should change 'iskeyword' instead.
+***************
+*** 4566,4576 ****
+ otherwise: "@,48-57,_,192-255"
+ Vi default: "@,48-57,_")
+ local to buffer
+- {not in Vi}
+ Keywords are used in searching and recognizing with many commands:
+ "w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See
+! 'isfname' for a description of the format of this option. For C
+! programs you could use "a-z,A-Z,48-57,_,.,-,>".
+ For a help file it is set to all non-blank printable characters except
+ '*', '"' and '|' (so that CTRL-] on a command finds the help for that
+ command).
+--- 4428,4438 ----
+ otherwise: "@,48-57,_,192-255"
+ Vi default: "@,48-57,_")
+ local to buffer
+ Keywords are used in searching and recognizing with many commands:
+ "w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See
+! 'isfname' for a description of the format of this option. For '@'
+! characters above 255 check the "word" character class.
+! For C programs you could use "a-z,A-Z,48-57,_,.,-,>".
+ For a help file it is set to all non-blank printable characters except
+ '*', '"' and '|' (so that CTRL-] on a command finds the help for that
+ command).
+***************
+*** 4584,4590 ****
+ 'isprint' 'isp' string (default for MS-DOS, Win32, OS/2 and Macintosh:
+ "@,~-255"; otherwise: "@,161-255")
+ global
+- {not in Vi}
+ The characters given by this option are displayed directly on the
+ screen. It is also used for "\p" in a |pattern|. The characters from
+ space (ASCII 32) to '~' (ASCII 126) are always displayed directly,
+--- 4446,4451 ----
+***************
+*** 4615,4621 ****
+ *'joinspaces'* *'js'* *'nojoinspaces'* *'nojs'*
+ 'joinspaces' 'js' boolean (default on)
+ global
+- {not in Vi}
+ Insert two spaces after a '.', '?' and '!' with a join command.
+ When 'cpoptions' includes the 'j' flag, only do this after a '.'.
+ Otherwise only one space is inserted.
+--- 4476,4481 ----
+***************
+*** 4624,4630 ****
+ *'key'*
+ 'key' string (default "")
+ local to buffer
+- {not in Vi}
+ {only available when compiled with the |+cryptv|
+ feature}
+ The key that is used for encrypting and decrypting the current buffer.
+--- 4484,4489 ----
+***************
+*** 4642,4648 ****
+ *'keymap'* *'kmp'* *E544*
+ 'keymap' 'kmp' string (default "")
+ local to buffer
+- {not in Vi}
+ {only available when compiled with the |+keymap|
+ feature}
+ Name of a keyboard mapping. See |mbyte-keymap|.
+--- 4501,4506 ----
+***************
+*** 4654,4660 ****
+ *'keymodel'* *'km'*
+ 'keymodel' 'km' string (default "")
+ global
+- {not in Vi}
+ List of comma separated words, which enable special things that keys
+ can do. These values can be used:
+ startsel Using a shifted special key starts selection (either
+--- 4512,4517 ----
+***************
+*** 4669,4675 ****
+ 'keywordprg' 'kp' string (default "man" or "man -s", DOS: ":help",
+ VMS: "help")
+ global or local to buffer |global-local|
+- {not in Vi}
+ Program to use for the |K| command. Environment variables are
+ expanded |:set_env|. ":help" may be used to access the Vim internal
+ help. (Note that previously setting the global option to the empty
+--- 4526,4531 ----
+***************
+*** 4688,4694 ****
+ *'langmap'* *'lmap'* *E357* *E358*
+ 'langmap' 'lmap' string (default "")
+ global
+- {not in Vi}
+ {only available when compiled with the |+langmap|
+ feature}
+ This option allows switching your keyboard into a special language
+--- 4544,4549 ----
+***************
+*** 4734,4740 ****
+ *'langmenu'* *'lm'*
+ 'langmenu' 'lm' string (default "")
+ global
+- {not in Vi}
+ {only available when compiled with the |+menu| and
+ |+multi_lang| features}
+ Language to use for menu translation. Tells which file is loaded
+--- 4589,4594 ----
+***************
+*** 4759,4765 ****
+ *'langnoremap'* *'lnr'* *'nolangnoremap'* *'nolnr'*
+ 'langnoremap' 'lnr' boolean (default off, set in |defaults.vim|)
+ global
+- {not in Vi}
+ {only available when compiled with the |+langmap|
+ feature}
+ This is just like 'langremap' but with the value inverted. It only
+--- 4613,4618 ----
+***************
+*** 4769,4775 ****
+ *'langremap'* *'lrm'* *'nolangremap'* *'nolrm'*
+ 'langremap' 'lrm' boolean (default on, reset in |defaults.vim|)
+ global
+- {not in Vi}
+ {only available when compiled with the |+langmap|
+ feature}
+ When off, setting 'langmap' does not apply to characters resulting from
+--- 4622,4627 ----
+***************
+*** 4781,4787 ****
+ *'laststatus'* *'ls'*
+ 'laststatus' 'ls' number (default 1)
+ global
+- {not in Vi}
+ The value of this option influences when the last window will have a
+ status line:
+ 0: never
+--- 4633,4638 ----
+***************
+*** 4793,4799 ****
+ *'lazyredraw'* *'lz'* *'nolazyredraw'* *'nolz'*
+ 'lazyredraw' 'lz' boolean (default off)
+ global
+- {not in Vi}
+ When this option is set, the screen will not be redrawn while
+ executing macros, registers and other commands that have not been
+ typed. Also, updating the window title is postponed. To force an
+--- 4644,4649 ----
+***************
+*** 4802,4808 ****
+ *'linebreak'* *'lbr'* *'nolinebreak'* *'nolbr'*
+ 'linebreak' 'lbr' boolean (default off)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+linebreak|
+ feature}
+ If on, Vim will wrap long lines at a character in 'breakat' rather
+--- 4652,4657 ----
+***************
+*** 4835,4841 ****
+ *'linespace'* *'lsp'*
+ 'linespace' 'lsp' number (default 0, 1 for Win32 GUI)
+ global
+- {not in Vi}
+ {only in the GUI}
+ Number of pixel lines inserted between characters. Useful if the font
+ uses the full character cell height, making lines touch each other.
+--- 4684,4689 ----
+***************
+*** 4864,4870 ****
+ *'lispwords'* *'lw'*
+ 'lispwords' 'lw' string (default is very long)
+ global or local to buffer |global-local|
+- {not in Vi}
+ {not available when compiled without the |+lispindent|
+ feature}
+ Comma separated list of words that influence the Lisp indenting.
+--- 4712,4717 ----
+***************
+*** 4889,4895 ****
+ *'listchars'* *'lcs'*
+ 'listchars' 'lcs' string (default "eol:$")
+ global
+- {not in Vi}
+ Strings to use in 'list' mode and for the |:list| command. It is a
+ comma separated list of string settings.
+ *lcs-eol*
+--- 4736,4741 ----
+***************
+*** 4955,4961 ****
+ *'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'*
+ 'loadplugins' 'lpl' boolean (default on)
+ global
+- {not in Vi}
+ When on the plugin scripts are loaded when starting up |load-plugins|.
+ This option can be reset in your |vimrc| file to disable the loading
+ of plugins.
+--- 4801,4806 ----
+***************
+*** 4965,4971 ****
+ *'luadll'*
+ 'luadll' string (default depends on the build)
+ global
+- {not in Vi}
+ {only available when compiled with the |+lua/dyn|
+ feature}
+ Specifies the name of the Lua shared library. The default is
+--- 4810,4815 ----
+***************
+*** 5004,5010 ****
+ *'makeef'* *'mef'*
+ 'makeef' 'mef' string (default: "")
+ global
+- {not in Vi}
+ {not available when compiled without the |+quickfix|
+ feature}
+ Name of the errorfile for the |:make| command (see |:make_makeprg|)
+--- 4848,4853 ----
+***************
+*** 5022,5030 ****
+ *'makeencoding'* *'menc'*
+ 'makeencoding' 'menc' string (default "")
+ global or local to buffer |global-local|
+- {only available when compiled with the |+multi_byte|
+- feature}
+- {not in Vi}
+ Encoding used for reading the output of external commands. When empty,
+ encoding is not converted.
+ This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`,
+--- 4865,4870 ----
+***************
+*** 5041,5047 ****
+ *'makeprg'* *'mp'*
+ 'makeprg' 'mp' string (default "make", VMS: "MMS")
+ global or local to buffer |global-local|
+- {not in Vi}
+ Program to use for the ":make" command. See |:make_makeprg|.
+ This option may contain '%' and '#' characters (see |:_%| and |:_#|),
+ which are expanded to the current and alternate file name. Use |::S|
+--- 4881,4886 ----
+***************
+*** 5061,5067 ****
+ *'matchpairs'* *'mps'*
+ 'matchpairs' 'mps' string (default "(:),{:},[:]")
+ local to buffer
+- {not in Vi}
+ Characters that form pairs. The |%| command jumps from one to the
+ other.
+ Only character pairs are allowed that are different, thus you cannot
+--- 4900,4905 ----
+***************
+*** 5081,5087 ****
+ *'matchtime'* *'mat'*
+ 'matchtime' 'mat' number (default 5)
+ global
+! {not in Vi}{in Nvi}
+ Tenths of a second to show the matching paren, when 'showmatch' is
+ set. Note that this is not in milliseconds, like other options that
+ set a time. This is to be compatible with Nvi.
+--- 4919,4925 ----
+ *'matchtime'* *'mat'*
+ 'matchtime' 'mat' number (default 5)
+ global
+! {in Nvi}
+ Tenths of a second to show the matching paren, when 'showmatch' is
+ set. Note that this is not in milliseconds, like other options that
+ set a time. This is to be compatible with Nvi.
+***************
+*** 5089,5097 ****
+ *'maxcombine'* *'mco'*
+ 'maxcombine' 'mco' number (default 2)
+ global
+- {not in Vi}
+- {only available when compiled with the |+multi_byte|
+- feature}
+ The maximum number of combining characters supported for displaying.
+ Only used when 'encoding' is "utf-8".
+ The default is OK for most languages. Hebrew may require 4.
+--- 4927,4932 ----
+***************
+*** 5103,5109 ****
+ *'maxfuncdepth'* *'mfd'*
+ 'maxfuncdepth' 'mfd' number (default 100)
+ global
+- {not in Vi}
+ {not available when compiled without the |+eval|
+ feature}
+ Maximum depth of function calls for user functions. This normally
+--- 4938,4943 ----
+***************
+*** 5117,5123 ****
+ *'maxmapdepth'* *'mmd'* *E223*
+ 'maxmapdepth' 'mmd' number (default 1000)
+ global
+- {not in Vi}
+ Maximum number of times a mapping is done without resulting in a
+ character to be used. This normally catches endless mappings, like
+ ":map x y" with ":map y x". It still does not catch ":map g wg",
+--- 4951,4956 ----
+***************
+*** 5129,5135 ****
+ dependent) or half the amount of memory
+ available)
+ global
+- {not in Vi}
+ Maximum amount of memory (in Kbyte) to use for one buffer. When this
+ limit is reached allocating extra memory for a buffer will cause
+ other memory to be freed.
+--- 4962,4967 ----
+***************
+*** 5141,5147 ****
+ *'maxmempattern'* *'mmp'*
+ 'maxmempattern' 'mmp' number (default 1000)
+ global
+- {not in Vi}
+ Maximum amount of memory (in Kbyte) to use for pattern matching.
+ The maximum value is about 2000000. Use this to work without a limit.
+ *E363*
+--- 4973,4978 ----
+***************
+*** 5150,5163 ****
+ Running into the limit often means that the pattern is very
+ inefficient or too complex. This may already happen with the pattern
+ "\(.\)*" on a very long line. ".*" works much better.
+! Vim may run out of memory before hitting the 'maxmempattern' limit.
+
+ *'maxmemtot'* *'mmt'*
+ 'maxmemtot' 'mmt' number (default between 2048 and 10240 (system
+ dependent) or half the amount of memory
+ available)
+ global
+- {not in Vi}
+ Maximum amount of memory in Kbyte to use for all buffers together.
+ The maximum usable value is about 2000000 (2 Gbyte). Use this to work
+ without a limit.
+--- 4981,4996 ----
+ Running into the limit often means that the pattern is very
+ inefficient or too complex. This may already happen with the pattern
+ "\(.\)*" on a very long line. ".*" works much better.
+! Might also happen on redraw, when syntax rules try to match a complex
+! text structure.
+! Vim may run out of memory before hitting the 'maxmempattern' limit, in
+! which case you get an "Out of memory" error instead.
+
+ *'maxmemtot'* *'mmt'*
+ 'maxmemtot' 'mmt' number (default between 2048 and 10240 (system
+ dependent) or half the amount of memory
+ available)
+ global
+ Maximum amount of memory in Kbyte to use for all buffers together.
+ The maximum usable value is about 2000000 (2 Gbyte). Use this to work
+ without a limit.
+***************
+*** 5172,5178 ****
+ *'menuitems'* *'mis'*
+ 'menuitems' 'mis' number (default 25)
+ global
+- {not in Vi}
+ {not available when compiled without the |+menu|
+ feature}
+ Maximum number of items to use in a menu. Used for menus that are
+--- 5005,5010 ----
+***************
+*** 5182,5188 ****
+ *'mkspellmem'* *'msm'*
+ 'mkspellmem' 'msm' string (default "460000,2000,500")
+ global
+- {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ Parameters for |:mkspell|. This tunes when to start compressing the
+--- 5014,5019 ----
+***************
+*** 5225,5231 ****
+ *'modelines'* *'mls'*
+ 'modelines' 'mls' number (default 5)
+ global
+- {not in Vi}
+ If 'modeline' is on 'modelines' gives the number of lines that is
+ checked for set commands. If 'modeline' is off or 'modelines' is zero
+ no lines are checked. See |modeline|.
+--- 5056,5061 ----
+***************
+*** 5235,5241 ****
+ *'modifiable'* *'ma'* *'nomodifiable'* *'noma'*
+ 'modifiable' 'ma' boolean (default on)
+ local to buffer
+! {not in Vi} *E21*
+ When off the buffer contents cannot be changed. The 'fileformat' and
+ 'fileencoding' options also can't be changed.
+ Can be reset on startup with the |-M| command line argument.
+--- 5065,5071 ----
+ *'modifiable'* *'ma'* *'nomodifiable'* *'noma'*
+ 'modifiable' 'ma' boolean (default on)
+ local to buffer
+! *E21*
+ When off the buffer contents cannot be changed. The 'fileformat' and
+ 'fileencoding' options also can't be changed.
+ Can be reset on startup with the |-M| command line argument.
+***************
+*** 5243,5249 ****
+ *'modified'* *'mod'* *'nomodified'* *'nomod'*
+ 'modified' 'mod' boolean (default off)
+ local to buffer
+- {not in Vi}
+ When on, the buffer is considered to be modified. This option is set
+ when:
+ 1. A change was made to the text since it was last written. Using the
+--- 5073,5078 ----
+***************
+*** 5269,5275 ****
+ *'more'* *'nomore'*
+ 'more' boolean (Vim default: on, Vi default: off)
+ global
+- {not in Vi}
+ When on, listings pause when the whole screen is filled. You will get
+ the |more-prompt|. When this option is off there are no pauses, the
+ listing continues until finished.
+--- 5098,5103 ----
+***************
+*** 5280,5286 ****
+ 'mouse' string (default "", "a" for GUI, MS-DOS and Win32,
+ set to "a" in |defaults.vim|)
+ global
+- {not in Vi}
+ Enable the use of the mouse. Only works for certain terminals
+ (xterm, MS-DOS, Win32 |win32-mouse|, QNX pterm, *BSD console with
+ sysmouse and Linux console with gpm). For using the mouse in the
+--- 5108,5113 ----
+***************
+*** 5293,5299 ****
+ h all previous modes when editing a help file
+ a all previous modes
+ r for |hit-enter| and |more-prompt| prompt
+! Normally you would enable the mouse in all four modes with: >
+ :set mouse=a
+ < When the mouse is not enabled, the GUI will still use the mouse for
+ modeless selection. This doesn't move the text cursor.
+--- 5120,5126 ----
+ h all previous modes when editing a help file
+ a all previous modes
+ r for |hit-enter| and |more-prompt| prompt
+! Normally you would enable the mouse in all five modes with: >
+ :set mouse=a
+ < When the mouse is not enabled, the GUI will still use the mouse for
+ modeless selection. This doesn't move the text cursor.
+***************
+*** 5308,5314 ****
+ *'mousefocus'* *'mousef'* *'nomousefocus'* *'nomousef'*
+ 'mousefocus' 'mousef' boolean (default off)
+ global
+- {not in Vi}
+ {only works in the GUI}
+ The window that the mouse pointer is on is automatically activated.
+ When changing the window layout or window focus in another way, the
+--- 5135,5140 ----
+***************
+*** 5319,5325 ****
+ *'mousehide'* *'mh'* *'nomousehide'* *'nomh'*
+ 'mousehide' 'mh' boolean (default on)
+ global
+- {not in Vi}
+ {only works in the GUI}
+ When on, the mouse pointer is hidden when characters are typed.
+ The mouse pointer is restored when the mouse is moved.
+--- 5145,5150 ----
+***************
+*** 5327,5333 ****
+ *'mousemodel'* *'mousem'*
+ 'mousemodel' 'mousem' string (default "extend", "popup" for MS-DOS and Win32)
+ global
+- {not in Vi}
+ Sets the model to use for the mouse. The name mostly specifies what
+ the right mouse button is used for:
+ extend Right mouse button extends a selection. This works
+--- 5152,5157 ----
+***************
+*** 5363,5372 ****
+ The 'mousemodel' option is set by the |:behave| command.
+
+ *'mouseshape'* *'mouses'* *E547*
+! 'mouseshape' 'mouses' string (default "i:beam,r:beam,s:updown,sd:cross,
+! m:no,ml:up-arrow,v:rightup-arrow")
+ global
+- {not in Vi}
+ {only available when compiled with the |+mouseshape|
+ feature}
+ This option tells Vim what the mouse pointer should look like in
+--- 5187,5196 ----
+ The 'mousemodel' option is set by the |:behave| command.
+
+ *'mouseshape'* *'mouses'* *E547*
+! 'mouseshape' 'mouses' string (default "i-r:beam,s:updown,sd:udsizing,
+! vs:leftright,vd:lrsizing,m:no,
+! ml:up-arrow,v:rightup-arrow")
+ global
+ {only available when compiled with the |+mouseshape|
+ feature}
+ This option tells Vim what the mouse pointer should look like in
+***************
+*** 5431,5437 ****
+ *'mousetime'* *'mouset'*
+ 'mousetime' 'mouset' number (default 500)
+ global
+- {not in Vi}
+ Only for GUI, MS-DOS, Win32 and Unix with xterm. Defines the maximum
+ time in msec between two mouse clicks for the second click to be
+ recognized as a multi click.
+--- 5255,5260 ----
+***************
+*** 5439,5445 ****
+ *'mzschemedll'*
+ 'mzschemedll' string (default depends on the build)
+ global
+- {not in Vi}
+ {only available when compiled with the |+mzscheme/dyn|
+ feature}
+ Specifies the name of the MzScheme shared library. The default is
+--- 5262,5267 ----
+***************
+*** 5453,5459 ****
+ *'mzschemegcdll'*
+ 'mzschemegcdll' string (default depends on the build)
+ global
+- {not in Vi}
+ {only available when compiled with the |+mzscheme/dyn|
+ feature}
+ Specifies the name of the MzScheme GC shared library. The default is
+--- 5275,5280 ----
+***************
+*** 5466,5472 ****
+ *'mzquantum'* *'mzq'*
+ 'mzquantum' 'mzq' number (default 100)
+ global
+- {not in Vi}
+ {not available when compiled without the |+mzscheme|
+ feature}
+ The number of milliseconds between polls for MzScheme threads.
+--- 5287,5292 ----
+***************
+*** 5478,5484 ****
+ 'nrformats' 'nf' string (default "bin,octal,hex",
+ set to "bin,hex" in |defaults.vim|)
+ local to buffer
+- {not in Vi}
+ This defines what bases Vim will consider for numbers when using the
+ CTRL-A and CTRL-X commands for adding to and subtracting from a number
+ respectively; see |CTRL-A| for more info on these commands.
+--- 5298,5303 ----
+***************
+*** 5525,5531 ****
+ *'numberwidth'* *'nuw'*
+ 'numberwidth' 'nuw' number (Vim default: 4 Vi default: 8)
+ local to window
+- {not in Vi}
+ {only available when compiled with the |+linebreak|
+ feature}
+ Minimal number of columns to use for the line number. Only relevant
+--- 5344,5349 ----
+***************
+*** 5544,5550 ****
+ *'omnifunc'* *'ofu'*
+ 'omnifunc' 'ofu' string (default: empty)
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+eval|
+ or |+insert_expand| features}
+ This option specifies a function to be used for Insert mode omni
+--- 5362,5367 ----
+***************
+*** 5560,5566 ****
+ *'opendevice'* *'odev'* *'noopendevice'* *'noodev'*
+ 'opendevice' 'odev' boolean (default off)
+ global
+- {not in Vi}
+ {only for MS-DOS, MS-Windows and OS/2}
+ Enable reading and writing from devices. This may get Vim stuck on a
+ device that can be opened but doesn't actually do the I/O. Therefore
+--- 5377,5382 ----
+***************
+*** 5572,5578 ****
+ *'operatorfunc'* *'opfunc'*
+ 'operatorfunc' 'opfunc' string (default: empty)
+ global
+- {not in Vi}
+ This option specifies a function to be called by the |g@| operator.
+ See |:map-operator| for more info and an example.
+
+--- 5388,5393 ----
+***************
+*** 5583,5595 ****
+ *'osfiletype'* *'oft'*
+ 'osfiletype' 'oft' string (default: "")
+ local to buffer
+- {not in Vi}
+ This option was supported on RISC OS, which has been removed.
+
+
+ *'packpath'* *'pp'*
+ 'packpath' 'pp' string (default: see 'runtimepath')
+- {not in Vi}
+ Directories used to find packages. See |packages|.
+
+
+--- 5398,5408 ----
+***************
+*** 5602,5608 ****
+ *'paste'* *'nopaste'*
+ 'paste' boolean (default off)
+ global
+- {not in Vi}
+ Put Vim in Paste mode. This is useful if you want to cut or copy
+ some text from one window and paste it in Vim. This will avoid
+ unexpected effects.
+--- 5415,5420 ----
+***************
+*** 5646,5652 ****
+ *'pastetoggle'* *'pt'*
+ 'pastetoggle' 'pt' string (default "")
+ global
+- {not in Vi}
+ When non-empty, specifies the key sequence that toggles the 'paste'
+ option. This is like specifying a mapping: >
+ :map {keys} :set invpaste<CR>
+--- 5458,5463 ----
+***************
+*** 5671,5677 ****
+ *'pex'* *'patchexpr'*
+ 'patchexpr' 'pex' string (default "")
+ global
+- {not in Vi}
+ {not available when compiled without the |+diff|
+ feature}
+ Expression which is evaluated to apply a patch to a file and generate
+--- 5482,5487 ----
+***************
+*** 5680,5686 ****
+ *'patchmode'* *'pm'* *E205* *E206*
+ 'patchmode' 'pm' string (default "")
+ global
+- {not in Vi}
+ When non-empty the oldest version of a file is kept. This can be used
+ to keep the original version of a file if you are changing files in a
+ source distribution. Only the first time that a file is written a
+--- 5490,5495 ----
+***************
+*** 5703,5709 ****
+ on OS/2: ".,/emx/include,,"
+ other systems: ".,,")
+ global or local to buffer |global-local|
+- {not in Vi}
+ This is a list of directories which will be searched when using the
+ |gf|, [f, ]f, ^Wf, |:find|, |:sfind|, |:tabfind| and other commands,
+ provided that the file being searched for has a relative path (not
+--- 5512,5517 ----
+***************
+*** 5756,5762 ****
+ *'perldll'*
+ 'perldll' string (default depends on the build)
+ global
+- {not in Vi}
+ {only available when compiled with the |+perl/dyn|
+ feature}
+ Specifies the name of the Perl shared library. The default is
+--- 5564,5569 ----
+***************
+*** 5768,5774 ****
+ *'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'*
+ 'preserveindent' 'pi' boolean (default off)
+ local to buffer
+- {not in Vi}
+ When changing the indent of the current line, preserve as much of the
+ indent structure as possible. Normally the indent is replaced by a
+ series of tabs followed by spaces as required (unless |'expandtab'| is
+--- 5575,5580 ----
+***************
+*** 5786,5792 ****
+ *'previewheight'* *'pvh'*
+ 'previewheight' 'pvh' number (default 12)
+ global
+- {not in Vi}
+ {not available when compiled without the |+windows| or
+ |+quickfix| features}
+ Default height for a preview window. Used for |:ptag| and associated
+--- 5592,5597 ----
+***************
+*** 5796,5802 ****
+ *'pvw'* *'nopvw'* *E590*
+ 'previewwindow' 'pvw' boolean (default off)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+windows| or
+ |+quickfix| features}
+ Identifies the preview window. Only one window can have this option
+--- 5601,5606 ----
+***************
+*** 5806,5812 ****
+ *'printdevice'* *'pdev'*
+ 'printdevice' 'pdev' string (default empty)
+ global
+- {not in Vi}
+ {only available when compiled with the |+printer|
+ feature}
+ The name of the printer to be used for |:hardcopy|.
+--- 5610,5615 ----
+***************
+*** 5815,5832 ****
+ security reasons.
+
+ *'printencoding'* *'penc'*
+! 'printencoding' 'penc' String (default empty, except for some systems)
+ global
+- {not in Vi}
+ {only available when compiled with the |+printer|
+ and |+postscript| features}
+ Sets the character encoding used when printing.
+ See |penc-option|.
+
+ *'printexpr'* *'pexpr'*
+! 'printexpr' 'pexpr' String (default: see below)
+ global
+- {not in Vi}
+ {only available when compiled with the |+printer|
+ and |+postscript| features}
+ Expression used to print the PostScript produced with |:hardcopy|.
+--- 5618,5633 ----
+ security reasons.
+
+ *'printencoding'* *'penc'*
+! 'printencoding' 'penc' string (default empty, except for some systems)
+ global
+ {only available when compiled with the |+printer|
+ and |+postscript| features}
+ Sets the character encoding used when printing.
+ See |penc-option|.
+
+ *'printexpr'* *'pexpr'*
+! 'printexpr' 'pexpr' string (default: see below)
+ global
+ {only available when compiled with the |+printer|
+ and |+postscript| features}
+ Expression used to print the PostScript produced with |:hardcopy|.
+***************
+*** 5837,5843 ****
+ *'printfont'* *'pfn'*
+ 'printfont' 'pfn' string (default "courier")
+ global
+- {not in Vi}
+ {only available when compiled with the |+printer|
+ feature}
+ The name of the font that will be used for |:hardcopy|.
+--- 5638,5643 ----
+***************
+*** 5846,5852 ****
+ *'printheader'* *'pheader'*
+ 'printheader' 'pheader' string (default "%<%f%h%m%=Page %N")
+ global
+- {not in Vi}
+ {only available when compiled with the |+printer|
+ feature}
+ The format of the header produced in |:hardcopy| output.
+--- 5646,5651 ----
+***************
+*** 5855,5879 ****
+ *'printmbcharset'* *'pmbcs'*
+ 'printmbcharset' 'pmbcs' string (default "")
+ global
+! {not in Vi}
+! {only available when compiled with the |+printer|,
+! |+postscript| and |+multi_byte| features}
+ The CJK character set to be used for CJK output from |:hardcopy|.
+ See |pmbcs-option|.
+
+ *'printmbfont'* *'pmbfn'*
+ 'printmbfont' 'pmbfn' string (default "")
+ global
+! {not in Vi}
+! {only available when compiled with the |+printer|,
+! |+postscript| and |+multi_byte| features}
+ List of font names to be used for CJK output from |:hardcopy|.
+ See |pmbfn-option|.
+
+ *'printoptions'* *'popt'*
+ 'printoptions' 'popt' string (default "")
+ global
+- {not in Vi}
+ {only available when compiled with |+printer| feature}
+ List of items that control the format of the output of |:hardcopy|.
+ See |popt-option|.
+--- 5654,5675 ----
+ *'printmbcharset'* *'pmbcs'*
+ 'printmbcharset' 'pmbcs' string (default "")
+ global
+! {only available when compiled with the |+printer|
+! and |+postscript| features}
+ The CJK character set to be used for CJK output from |:hardcopy|.
+ See |pmbcs-option|.
+
+ *'printmbfont'* *'pmbfn'*
+ 'printmbfont' 'pmbfn' string (default "")
+ global
+! {only available when compiled with the |+printer|
+! and |+postscript| features}
+ List of font names to be used for CJK output from |:hardcopy|.
+ See |pmbfn-option|.
+
+ *'printoptions'* *'popt'*
+ 'printoptions' 'popt' string (default "")
+ global
+ {only available when compiled with |+printer| feature}
+ List of items that control the format of the output of |:hardcopy|.
+ See |popt-option|.
+***************
+*** 5888,5894 ****
+ global
+ {not available when compiled without the
+ |+insert_expand| feature}
+- {not in Vi}
+ Determines the maximum number of items to show in the popup menu for
+ Insert mode completion. When zero as much space as available is used.
+ |ins-completion-menu|.
+--- 5684,5689 ----
+***************
+*** 5898,5911 ****
+ global
+ {not available when compiled without the
+ |+insert_expand| feature}
+- {not in Vi}
+ Determines the minimum width to use for the popup menu for Insert mode
+ completion. |ins-completion-menu|.
+
+ *'pythondll'*
+ 'pythondll' string (default depends on the build)
+ global
+- {not in Vi}
+ {only available when compiled with the |+python/dyn|
+ feature}
+ Specifies the name of the Python 2.x shared library. The default is
+--- 5693,5704 ----
+***************
+*** 5917,5923 ****
+ *'pythonhome'*
+ 'pythonhome' string (default "")
+ global
+- {not in Vi}
+ {only available when compiled with the |+python/dyn|
+ feature}
+ Specifies the name of the Python 2.x home directory. When 'pythonhome'
+--- 5710,5715 ----
+***************
+*** 5931,5937 ****
+ *'pythonthreedll'*
+ 'pythonthreedll' string (default depends on the build)
+ global
+- {not in Vi}
+ {only available when compiled with the |+python3/dyn|
+ feature}
+ Specifies the name of the Python 3 shared library. The default is
+--- 5723,5728 ----
+***************
+*** 5943,5949 ****
+ *'pythonthreehome'*
+ 'pythonthreehome' string (default "")
+ global
+- {not in Vi}
+ {only available when compiled with the |+python3/dyn|
+ feature}
+ Specifies the name of the Python 3 home directory. When
+--- 5734,5739 ----
+***************
+*** 5957,5963 ****
+ *'pyxversion'* *'pyx'*
+ 'pyxversion' 'pyx' number (default depends on the build)
+ global
+- {not in Vi}
+ {only available when compiled with the |+python| or
+ the |+python3| feature}
+ Specifies the python version used for pyx* functions and commands
+--- 5747,5752 ----
+***************
+*** 5985,5991 ****
+ *'quoteescape'* *'qe'*
+ 'quoteescape' 'qe' string (default "\")
+ local to buffer
+- {not in Vi}
+ The characters that are used to escape quotes in a string. Used for
+ objects like a', a" and a` |a'|.
+ When one of the characters in this option is found inside a string,
+--- 5774,5779 ----
+***************
+*** 6000,6013 ****
+ in read-only mode ("vim -R") or when the executable is called "view".
+ When using ":w!" the 'readonly' option is reset for the current
+ buffer, unless the 'Z' flag is in 'cpoptions'.
+! {not in Vi:} When using the ":view" command the 'readonly' option is
+! set for the newly edited buffer.
+ See 'modifiable' for disallowing changes to the buffer.
+
+ *'redrawtime'* *'rdt'*
+ 'redrawtime' 'rdt' number (default 2000)
+ global
+- {not in Vi}
+ {only available when compiled with the |+reltime|
+ feature}
+ The time in milliseconds for redrawing the display. This applies to
+--- 5788,5800 ----
+ in read-only mode ("vim -R") or when the executable is called "view".
+ When using ":w!" the 'readonly' option is reset for the current
+ buffer, unless the 'Z' flag is in 'cpoptions'.
+! When using the ":view" command the 'readonly' option is set for the
+! newly edited buffer.
+ See 'modifiable' for disallowing changes to the buffer.
+
+ *'redrawtime'* *'rdt'*
+ 'redrawtime' 'rdt' number (default 2000)
+ global
+ {only available when compiled with the |+reltime|
+ feature}
+ The time in milliseconds for redrawing the display. This applies to
+***************
+*** 6023,6029 ****
+ *'regexpengine'* *'re'*
+ 'regexpengine' 're' number (default 0)
+ global
+- {not in Vi}
+ This selects the default regexp engine. |two-engines|
+ The possible values are:
+ 0 automatic selection
+--- 5810,5815 ----
+***************
+*** 6040,6046 ****
+ *'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'*
+ 'relativenumber' 'rnu' boolean (default off)
+ local to window
+- {not in Vi}
+ Show the line number relative to the line with the cursor in front of
+ each line. Relative line numbers help you use the |count| you can
+ precede some vertical motion commands (e.g. j k + -) with, without
+--- 5826,5831 ----
+***************
+*** 6072,6078 ****
+ *'renderoptions'* *'rop'*
+ 'renderoptions' 'rop' string (default: empty)
+ global
+- {not in Vi}
+ {only available when compiled with GUI and DIRECTX on
+ MS-Windows}
+ Select a text renderer and set its options. The options depend on the
+--- 5857,5862 ----
+***************
+*** 6179,6185 ****
+ *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
+ 'restorescreen' 'rs' boolean (default on)
+ global
+! {not in Vi} {only in Windows 95/NT console version}
+ When set, the screen contents is restored when exiting Vim. This also
+ happens when executing external commands.
+
+--- 5963,5969 ----
+ *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
+ 'restorescreen' 'rs' boolean (default on)
+ global
+! {only in Windows 95/NT console version}
+ When set, the screen contents is restored when exiting Vim. This also
+ happens when executing external commands.
+
+***************
+*** 6193,6199 ****
+ *'revins'* *'ri'* *'norevins'* *'nori'*
+ 'revins' 'ri' boolean (default off)
+ global
+- {not in Vi}
+ {only available when compiled with the |+rightleft|
+ feature}
+ Inserting characters in Insert mode will work backwards. See "typing
+--- 5977,5982 ----
+***************
+*** 6206,6212 ****
+ *'rightleft'* *'rl'* *'norightleft'* *'norl'*
+ 'rightleft' 'rl' boolean (default off)
+ local to window
+- {not in Vi}
+ {only available when compiled with the |+rightleft|
+ feature}
+ When on, display orientation becomes right-to-left, i.e., characters
+--- 5989,5994 ----
+***************
+*** 6222,6228 ****
+ *'rightleftcmd'* *'rlc'*
+ 'rightleftcmd' 'rlc' string (default "search")
+ local to window
+- {not in Vi}
+ {only available when compiled with the |+rightleft|
+ feature}
+ Each word in this option enables the command line editing to work in
+--- 6004,6009 ----
+***************
+*** 6236,6242 ****
+ *'rubydll'*
+ 'rubydll' string (default: depends on the build)
+ global
+- {not in Vi}
+ {only available when compiled with the |+ruby/dyn|
+ feature}
+ Specifies the name of the Ruby shared library. The default is
+--- 6017,6022 ----
+***************
+*** 6248,6254 ****
+ *'ruler'* *'ru'* *'noruler'* *'noru'*
+ 'ruler' 'ru' boolean (default off, set in |defaults.vim|)
+ global
+- {not in Vi}
+ {not available when compiled without the
+ |+cmdline_info| feature}
+ Show the line and column number of the cursor position, separated by a
+--- 6028,6033 ----
+***************
+*** 6278,6284 ****
+ *'rulerformat'* *'ruf'*
+ 'rulerformat' 'ruf' string (default empty)
+ global
+- {not in Vi}
+ {not available when compiled without the |+statusline|
+ feature}
+ When this option is not empty, it determines the content of the ruler
+--- 6057,6062 ----
+***************
+*** 6318,6324 ****
+ $VIM/vimfiles/after,
+ sys$login:vimfiles/after")
+ global
+- {not in Vi}
+ This is a list of directories which will be searched for runtime
+ files:
+ filetype.vim filetypes by file name |new-filetype|
+--- 6096,6101 ----
+***************
+*** 6393,6399 ****
+ *'scrollbind'* *'scb'* *'noscrollbind'* *'noscb'*
+ 'scrollbind' 'scb' boolean (default off)
+ local to window
+- {not in Vi}
+ See also |scroll-binding|. When this option is set, the current
+ window scrolls as other scrollbind windows (windows that also have
+ this option set) scroll. This option is useful for viewing the
+--- 6170,6175 ----
+***************
+*** 6407,6413 ****
+ *'scrolljump'* *'sj'*
+ 'scrolljump' 'sj' number (default 1)
+ global
+- {not in Vi}
+ Minimal number of lines to scroll when the cursor gets off the
+ screen (e.g., with "j"). Not used for scroll commands (e.g., CTRL-E,
+ CTRL-D). Useful if your terminal scrolls very slowly.
+--- 6183,6188 ----
+***************
+*** 6419,6425 ****
+ *'scrolloff'* *'so'*
+ 'scrolloff' 'so' number (default 0, set to 5 in |defaults.vim|)
+ global or local to window |global-local|
+- {not in Vi}
+ Minimal number of screen lines to keep above and below the cursor.
+ This will make some context visible around where you are working. If
+ you set it to a very large value (999) the cursor line will always be
+--- 6194,6199 ----
+***************
+*** 6435,6441 ****
+ *'scrollopt'* *'sbo'*
+ 'scrollopt' 'sbo' string (default "ver,jump")
+ global
+- {not in Vi}
+ This is a comma-separated list of words that specifies how
+ 'scrollbind' windows should behave. 'sbo' stands for ScrollBind
+ Options.
+--- 6209,6214 ----
+***************
+*** 6474,6480 ****
+ *'secure'* *'nosecure'* *E523*
+ 'secure' boolean (default off)
+ global
+- {not in Vi}
+ When on, ":autocmd", shell and write commands are not allowed in
+ ".vimrc" and ".exrc" in the current directory and map commands are
+ displayed. Switch it off only if you know that you will not run into
+--- 6247,6252 ----
+***************
+*** 6488,6494 ****
+ *'selection'* *'sel'*
+ 'selection' 'sel' string (default "inclusive")
+ global
+- {not in Vi}
+ This option defines the behavior of the selection. It is only used
+ in Visual and Select mode.
+ Possible values:
+--- 6260,6265 ----
+***************
+*** 6512,6518 ****
+ *'selectmode'* *'slm'*
+ 'selectmode' 'slm' string (default "")
+ global
+- {not in Vi}
+ This is a comma separated list of words, which specifies when to start
+ Select mode instead of Visual mode, when a selection is started.
+ Possible values:
+--- 6283,6288 ----
+***************
+*** 6526,6532 ****
+ 'sessionoptions' 'ssop' string (default: "blank,buffers,curdir,folds,
+ help,options,tabpages,winsize,terminal")
+ global
+- {not in Vi}
+ {not available when compiled without the |+mksession|
+ feature}
+ Changes the effect of the |:mksession| command. It is a comma
+--- 6296,6301 ----
+***************
+*** 6556,6562 ****
+ tabpages all tab pages; without this only the current tab page
+ is restored, so that you can make a session for each
+ tab page separately
+! terminal include terminal windows where the command can be restored
+ unix with Unix end-of-line format (single <NL>), even when
+ on Windows or DOS
+ winpos position of the whole Vim window
+--- 6325,6332 ----
+ tabpages all tab pages; without this only the current tab page
+ is restored, so that you can make a session for each
+ tab page separately
+! terminal include terminal windows where the command can be
+! restored
+ unix with Unix end-of-line format (single <NL>), even when
+ on Windows or DOS
+ winpos position of the whole Vim window
+***************
+*** 6592,6598 ****
+ Example with escaped space (Vim will do this when initializing the
+ option from $SHELL): >
+ :set shell=/bin/with\\\ space/sh
+! < The resulting value of 'shell' is "/bin/with\ space/sh", two
+ backslashes are consumed by `:set`.
+
+ Under MS-Windows, when the executable ends in ".com" it must be
+--- 6362,6368 ----
+ Example with escaped space (Vim will do this when initializing the
+ option from $SHELL): >
+ :set shell=/bin/with\\\ space/sh
+! < The resulting value of 'shell' is "/bin/with\ space/sh", two
+ backslashes are consumed by `:set`.
+
+ Under MS-Windows, when the executable ends in ".com" it must be
+***************
+*** 6610,6616 ****
+ MS-DOS and Win32, when 'shell' does not
+ contain "sh" somewhere: "/c")
+ global
+- {not in Vi}
+ Flag passed to the shell to execute "!" and ":!" commands; e.g.,
+ "bash.exe -c ls" or "command.com /c dir". For the MS-DOS-like
+ systems, the default is set according to the value of 'shell', to
+--- 6380,6385 ----
+***************
+*** 6625,6631 ****
+ *'shellpipe'* *'sp'*
+ 'shellpipe' 'sp' string (default ">", "| tee", "|& tee" or "2>&1| tee")
+ global
+- {not in Vi}
+ {not available when compiled without the |+quickfix|
+ feature}
+ String to be used to put the output of the ":make" command in the
+--- 6394,6399 ----
+***************
+*** 6661,6667 ****
+ 'shellquote' 'shq' string (default: ""; MS-DOS and Win32, when 'shell'
+ contains "sh" somewhere: "\"")
+ global
+- {not in Vi}
+ Quoting character(s), put around the command passed to the shell, for
+ the "!" and ":!" commands. The redirection is kept outside of the
+ quoting. See 'shellxquote' to include the redirection. It's
+--- 6429,6434 ----
+***************
+*** 6677,6683 ****
+ *'shellredir'* *'srr'*
+ 'shellredir' 'srr' string (default ">", ">&" or ">%s 2>&1")
+ global
+- {not in Vi}
+ String to be used to put the output of a filter command in a temporary
+ file. See also |:!|. See |option-backslash| about including spaces
+ and backslashes.
+--- 6444,6449 ----
+***************
+*** 6703,6709 ****
+ *'shellslash'* *'ssl'* *'noshellslash'* *'nossl'*
+ 'shellslash' 'ssl' boolean (default off)
+ global
+! {not in Vi} {only for MSDOS, MS-Windows and OS/2}
+ When set, a forward slash is used when expanding file names. This is
+ useful when a Unix-like shell is used instead of command.com or
+ cmd.exe. Backward slashes can still be typed, but they are changed to
+--- 6469,6475 ----
+ *'shellslash'* *'ssl'* *'noshellslash'* *'nossl'*
+ 'shellslash' 'ssl' boolean (default off)
+ global
+! {only for MSDOS, MS-Windows and OS/2}
+ When set, a forward slash is used when expanding file names. This is
+ useful when a Unix-like shell is used instead of command.com or
+ cmd.exe. Backward slashes can still be typed, but they are changed to
+***************
+*** 6718,6724 ****
+ *'shelltemp'* *'stmp'* *'noshelltemp'* *'nostmp'*
+ 'shelltemp' 'stmp' boolean (Vi default off, Vim default on)
+ global
+- {not in Vi}
+ When on, use temp files for shell commands. When off use a pipe.
+ When using a pipe is not possible temp files are used anyway.
+ Currently a pipe is only supported on Unix and MS-Windows 2K and
+--- 6484,6489 ----
+***************
+*** 6739,6745 ****
+ *'shelltype'* *'st'*
+ 'shelltype' 'st' number (default 0)
+ global
+! {not in Vi} {only for the Amiga}
+ On the Amiga this option influences the way how the commands work
+ which use a shell.
+ 0 and 1: always use the shell
+--- 6504,6510 ----
+ *'shelltype'* *'st'*
+ 'shelltype' 'st' number (default 0)
+ global
+! {only for the Amiga}
+ On the Amiga this option influences the way how the commands work
+ which use a shell.
+ 0 and 1: always use the shell
+***************
+*** 6754,6760 ****
+ 'shellxescape' 'sxe' string (default: "";
+ for MS-DOS and MS-Windows: "\"&|<>()@^")
+ global
+- {not in Vi}
+ When 'shellxquote' is set to "(" then the characters listed in this
+ option will be escaped with a '^' character. This makes it possible
+ to execute most external commands with cmd.exe.
+--- 6519,6524 ----
+***************
+*** 6766,6772 ****
+ somewhere: "\""
+ for Unix, when using system(): "\"")
+ global
+- {not in Vi}
+ Quoting character(s), put around the command passed to the shell, for
+ the "!" and ":!" commands. Includes the redirection. See
+ 'shellquote' to exclude the redirection. It's probably not useful
+--- 6530,6535 ----
+***************
+*** 6786,6792 ****
+ *'shiftround'* *'sr'* *'noshiftround'* *'nosr'*
+ 'shiftround' 'sr' boolean (default off)
+ global
+- {not in Vi}
+ Round indent to multiple of 'shiftwidth'. Applies to > and <
+ commands. CTRL-T and CTRL-D in Insert mode always round the indent to
+ a multiple of 'shiftwidth' (this is Vi compatible).
+--- 6549,6554 ----
+***************
+*** 6804,6810 ****
+ 'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "",
+ POSIX default: "A")
+ global
+- {not in Vi}
+ This option helps to avoid all the |hit-enter| prompts caused by file
+ messages, for example with CTRL-G, and to avoid some other messages.
+ It is a list of flags:
+--- 6566,6571 ----
+***************
+*** 6859,6865 ****
+ *'shortname'* *'sn'* *'noshortname'* *'nosn'*
+ 'shortname' 'sn' boolean (default off)
+ local to buffer
+- {not in Vi, not in MS-DOS versions}
+ Filenames are assumed to be 8 characters plus one extension of 3
+ characters. Multiple dots in file names are not allowed. When this
+ option is on, dots in file names are replaced with underscores when
+--- 6620,6625 ----
+***************
+*** 6872,6878 ****
+ *'showbreak'* *'sbr'* *E595*
+ 'showbreak' 'sbr' string (default "")
+ global
+- {not in Vi}
+ {not available when compiled without the |+linebreak|
+ feature}
+ String to put at the start of lines that have been wrapped. Useful
+--- 6632,6637 ----
+***************
+*** 6894,6900 ****
+ 'showcmd' 'sc' boolean (Vim default: on, off for Unix,
+ Vi default: off, set in |defaults.vim|)
+ global
+- {not in Vi}
+ {not available when compiled without the
+ |+cmdline_info| feature}
+ Show (partial) command in the last line of the screen. Set this
+--- 6653,6658 ----
+***************
+*** 6912,6918 ****
+ *'showfulltag'* *'sft'* *'noshowfulltag'* *'nosft'*
+ 'showfulltag' 'sft' boolean (default off)
+ global
+- {not in Vi}
+ When completing a word in insert mode (see |ins-completion|) from the
+ tags file, show both the tag name and a tidied-up form of the search
+ pattern (if there is one) as possible matches. Thus, if you have
+--- 6670,6675 ----
+***************
+*** 6958,6964 ****
+ *'showtabline'* *'stal'*
+ 'showtabline' 'stal' number (default 1)
+ global
+- {not in Vi}
+ {not available when compiled without the |+windows|
+ feature}
+ The value of this option specifies when the line with tab page labels
+--- 6715,6720 ----
+***************
+*** 6973,6979 ****
+ *'sidescroll'* *'ss'*
+ 'sidescroll' 'ss' number (default 0)
+ global
+- {not in Vi}
+ The minimal number of columns to scroll horizontally. Used only when
+ the 'wrap' option is off and the cursor is moved off of the screen.
+ When it is zero the cursor will be put in the middle of the screen.
+--- 6729,6734 ----
+***************
+*** 6984,6990 ****
+ *'sidescrolloff'* *'siso'*
+ 'sidescrolloff' 'siso' number (default 0)
+ global or local to window |global-local|
+- {not in Vi}
+ The minimal number of screen columns to keep to the left and to the
+ right of the cursor if 'nowrap' is set. Setting this option to a
+ value greater than 0 while having |'sidescroll'| also at a non-zero
+--- 6739,6744 ----
+***************
+*** 7009,7015 ****
+ *'signcolumn'* *'scl'*
+ 'signcolumn' 'scl' string (default "auto")
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+signs|
+ feature}
+ Whether or not to draw the signcolumn. Valid values are:
+--- 6763,6768 ----
+***************
+*** 7021,7027 ****
+ *'smartcase'* *'scs'* *'nosmartcase'* *'noscs'*
+ 'smartcase' 'scs' boolean (default off)
+ global
+- {not in Vi}
+ Override the 'ignorecase' option if the search pattern contains upper
+ case characters. Only used when the search pattern is typed and
+ 'ignorecase' option is on. Used for the commands "/", "?", "n", "N",
+--- 6774,6779 ----
+***************
+*** 7033,7039 ****
+ *'smartindent'* *'si'* *'nosmartindent'* *'nosi'*
+ 'smartindent' 'si' boolean (default off)
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the
+ |+smartindent| feature}
+ Do smart autoindenting when starting a new line. Works for C-like
+--- 6785,6790 ----
+***************
+*** 7062,7068 ****
+ *'smarttab'* *'sta'* *'nosmarttab'* *'nosta'*
+ 'smarttab' 'sta' boolean (default off)
+ global
+- {not in Vi}
+ When on, a <Tab> in front of a line inserts blanks according to
+ 'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places. A
+ <BS> will delete a 'shiftwidth' worth of space at the start of the
+--- 6813,6818 ----
+***************
+*** 7080,7086 ****
+ *'softtabstop'* *'sts'*
+ 'softtabstop' 'sts' number (default 0)
+ local to buffer
+- {not in Vi}
+ Number of spaces that a <Tab> counts for while performing editing
+ operations, like inserting a <Tab> or using <BS>. It "feels" like
+ <Tab>s are being inserted, while in fact a mix of spaces and <Tab>s is
+--- 6830,6835 ----
+***************
+*** 7104,7110 ****
+ *'spell'* *'nospell'*
+ 'spell' boolean (default off)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ When on spell checking will be done. See |spell|.
+--- 6853,6858 ----
+***************
+*** 7113,7119 ****
+ *'spellcapcheck'* *'spc'*
+ 'spellcapcheck' 'spc' string (default "[.?!]\_[\])'" \t]\+")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ Pattern to locate the end of a sentence. The following word will be
+--- 6861,6866 ----
+***************
+*** 7129,7135 ****
+ *'spellfile'* *'spf'*
+ 'spellfile' 'spf' string (default empty)
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ Name of the word list file where words are added for the |zg| and |zw|
+--- 6876,6881 ----
+***************
+*** 7156,7162 ****
+ *'spelllang'* *'spl'*
+ 'spelllang' 'spl' string (default "en")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ A comma separated list of word list names. When the 'spell' option is
+--- 6902,6907 ----
+***************
+*** 7164,7170 ****
+ set spelllang=en_us,nl,medical
+ < This means US English, Dutch and medical words are recognized. Words
+ that are not recognized will be highlighted.
+! The word list name must not include a comma or dot. Using a dash is
+ recommended to separate the two letter language name from a
+ specification. Thus "en-rare" is used for rare English words.
+ A region name must come last and have the form "_xx", where "xx" is
+--- 6909,6916 ----
+ set spelllang=en_us,nl,medical
+ < This means US English, Dutch and medical words are recognized. Words
+ that are not recognized will be highlighted.
+! The word list name must consist of alphanumeric characters, a dash or
+! an underscore. It should not include a comma or dot. Using a dash is
+ recommended to separate the two letter language name from a
+ specification. Thus "en-rare" is used for rare English words.
+ A region name must come last and have the form "_xx", where "xx" is
+***************
+*** 7193,7206 ****
+
+ 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|.
+
+
+ *'spellsuggest'* *'sps'*
+ 'spellsuggest' 'sps' string (default "best")
+ global
+- {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ Methods used for spelling suggestions. Both for the |z=| command and
+--- 6939,6951 ----
+
+ 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 or number and
+! not a dash. Also see |set-spc-auto|.
+
+
+ *'spellsuggest'* *'sps'*
+ 'spellsuggest' 'sps' string (default "best")
+ global
+ {not available when compiled without the |+syntax|
+ feature}
+ Methods used for spelling suggestions. Both for the |z=| command and
+***************
+*** 7266,7272 ****
+ *'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'*
+ 'splitbelow' 'sb' boolean (default off)
+ global
+- {not in Vi}
+ {not available when compiled without the |+windows|
+ feature}
+ When on, splitting a window will put the new window below the current
+--- 7011,7016 ----
+***************
+*** 7275,7281 ****
+ *'splitright'* *'spr'* *'nosplitright'* *'nospr'*
+ 'splitright' 'spr' boolean (default off)
+ global
+- {not in Vi}
+ {not available when compiled without the |+vertsplit|
+ feature}
+ When on, splitting a window will put the new window right of the
+--- 7019,7024 ----
+***************
+*** 7284,7290 ****
+ *'startofline'* *'sol'* *'nostartofline'* *'nosol'*
+ 'startofline' 'sol' boolean (default on)
+ global
+- {not in Vi}
+ When "on" the commands listed below move the cursor to the first
+ non-blank of the line. When off the cursor is kept in the same column
+ (if possible). This applies to the commands: CTRL-D, CTRL-U, CTRL-B,
+--- 7027,7032 ----
+***************
+*** 7299,7305 ****
+ *'statusline'* *'stl'* *E540* *E542*
+ 'statusline' 'stl' string (default empty)
+ global or local to window |global-local|
+- {not in Vi}
+ {not available when compiled without the |+statusline|
+ feature}
+ When nonempty, this option determines the content of the status line.
+--- 7041,7046 ----
+***************
+*** 7422,7428 ****
+ line is displayed. The current buffer and current window will be set
+ temporarily to that of the window (and buffer) whose statusline is
+ currently being drawn. The expression will evaluate in this context.
+! The variable "actual_curbuf" is set to the 'bufnr()' number of the
+ real current buffer.
+
+ The 'statusline' option will be evaluated in the |sandbox| if set from
+--- 7163,7169 ----
+ line is displayed. The current buffer and current window will be set
+ temporarily to that of the window (and buffer) whose statusline is
+ currently being drawn. The expression will evaluate in this context.
+! The variable "g:actual_curbuf" is set to the `bufnr()` number of the
+ real current buffer.
+
+ The 'statusline' option will be evaluated in the |sandbox| if set from
+***************
+*** 7466,7472 ****
+ *'suffixes'* *'su'*
+ 'suffixes' 'su' string (default ".bak,~,.o,.h,.info,.swp,.obj")
+ global
+- {not in Vi}
+ Files with these suffixes get a lower priority when multiple files
+ match a wildcard. See |suffixes|. Commas can be used to separate the
+ suffixes. Spaces after the comma are ignored. A dot is also seen as
+--- 7207,7212 ----
+***************
+*** 7481,7487 ****
+ *'suffixesadd'* *'sua'*
+ 'suffixesadd' 'sua' string (default "")
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the
+ |+file_in_path| feature}
+ Comma separated list of suffixes, which are used when searching for a
+--- 7221,7226 ----
+***************
+*** 7491,7497 ****
+ *'swapfile'* *'swf'* *'noswapfile'* *'noswf'*
+ 'swapfile' 'swf' boolean (default on)
+ local to buffer
+- {not in Vi}
+ Use a swapfile for the buffer. This option can be reset when a
+ swapfile is not wanted for a specific buffer. For example, with
+ confidential information that even root must not be able to access.
+--- 7230,7235 ----
+***************
+*** 7514,7520 ****
+ *'swapsync'* *'sws'*
+ 'swapsync' 'sws' string (default "fsync")
+ global
+- {not in Vi}
+ When this option is not empty a swap file is synced to disk after
+ writing to it. This takes some time, especially on busy unix systems.
+ When this option is empty parts of the swap file may be in memory and
+--- 7252,7257 ----
+***************
+*** 7529,7535 ****
+ *'switchbuf'* *'swb'*
+ 'switchbuf' 'swb' string (default "")
+ global
+- {not in Vi}
+ This option controls the behavior when switching between buffers.
+ Possible values (comma separated list):
+ useopen If included, jump to the first open window that
+--- 7266,7271 ----
+***************
+*** 7543,7549 ****
+ pages.
+ split If included, split the current window before loading
+ a buffer for a |quickfix| command that display errors.
+! Otherwise: do not split, use current window.
+ vsplit Just like "split" but split vertically.
+ newtab Like "split", but open a new tab page. Overrules
+ "split" when both are present.
+--- 7279,7287 ----
+ pages.
+ split If included, split the current window before loading
+ a buffer for a |quickfix| command that display errors.
+! Otherwise: do not split, use current window (when used
+! in the quickfix window: the previously used window or
+! split if there is no other window).
+ vsplit Just like "split" but split vertically.
+ newtab Like "split", but open a new tab page. Overrules
+ "split" when both are present.
+***************
+*** 7551,7557 ****
+ *'synmaxcol'* *'smc'*
+ 'synmaxcol' 'smc' number (default 3000)
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ Maximum column in which to search for syntax items. In long lines the
+--- 7289,7294 ----
+***************
+*** 7564,7570 ****
+ *'syntax'* *'syn'*
+ 'syntax' 'syn' string (default empty)
+ local to buffer
+- {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ When this option is set, the syntax with this name is loaded, unless
+--- 7301,7306 ----
+***************
+*** 7594,7600 ****
+ *'tabline'* *'tal'*
+ 'tabline' 'tal' string (default empty)
+ global
+- {not in Vi}
+ {not available when compiled without the |+windows|
+ feature}
+ When nonempty, this option determines the content of the tab pages
+--- 7330,7335 ----
+***************
+*** 7621,7627 ****
+ *'tabpagemax'* *'tpm'*
+ 'tabpagemax' 'tpm' number (default 10)
+ global
+- {not in Vi}
+ {not available when compiled without the |+windows|
+ feature}
+ Maximum number of tab pages to be opened by the |-p| command line
+--- 7356,7361 ----
+***************
+*** 7662,7668 ****
+ *'tagbsearch'* *'tbs'* *'notagbsearch'* *'notbs'*
+ 'tagbsearch' 'tbs' boolean (default on)
+ global
+- {not in Vi}
+ When searching for a tag (e.g., for the |:ta| command), Vim can either
+ use a binary search or a linear search in a tags file. Binary
+ searching makes searching for a tag a LOT faster, but a linear search
+--- 7396,7401 ----
+***************
+*** 7715,7721 ****
+ *'tagcase'* *'tc'*
+ 'tagcase' 'tc' string (default "followic")
+ global or local to buffer |global-local|
+- {not in Vi}
+ This option specifies how case is handled when searching the tags
+ file:
+ followic Follow the 'ignorecase' option
+--- 7448,7453 ----
+***************
+*** 7734,7740 ****
+ *'tagrelative'* *'tr'* *'notagrelative'* *'notr'*
+ 'tagrelative' 'tr' boolean (Vim default: on, Vi default: off)
+ global
+- {not in Vi}
+ If on and using a tags file in another directory, file names in that
+ tags file are relative to the directory where the tags file is.
+ NOTE: This option is set to the Vi default value when 'compatible' is
+--- 7466,7471 ----
+***************
+*** 7771,7777 ****
+ *'tagstack'* *'tgst'* *'notagstack'* *'notgst'*
+ 'tagstack' 'tgst' boolean (default on)
+ global
+- {not in all versions of Vi}
+ When on, the |tagstack| is used normally. When off, a ":tag" or
+ ":tselect" command with an argument will not push the tag onto the
+ tagstack. A following ":tag" without an argument, a ":pop" command or
+--- 7502,7507 ----
+***************
+*** 7783,7789 ****
+ *'tcldll'*
+ 'tcldll' string (default depends on the build)
+ global
+- {not in Vi}
+ {only available when compiled with the |+tcl/dyn|
+ feature}
+ Specifies the name of the Tcl shared library. The default is
+--- 7513,7518 ----
+***************
+*** 7815,7821 ****
+ *'notermbidi'* *'notbidi'*
+ 'termbidi' 'tbidi' boolean (default off, on for "mlterm")
+ global
+- {not in Vi}
+ {only available when compiled with the |+arabic|
+ feature}
+ The terminal is in charge of Bi-directionality of text (as specified
+--- 7544,7549 ----
+***************
+*** 7832,7840 ****
+ 'termencoding' 'tenc' string (default ""; with GTK+ GUI: "utf-8"; with
+ Macintosh GUI: "macroman")
+ global
+- {only available when compiled with the |+multi_byte|
+- feature}
+- {not in Vi}
+ Encoding used for the terminal. This specifies what character
+ encoding the keyboard produces and the display will understand. For
+ the GUI it only applies to the keyboard ('encoding' is used for the
+--- 7560,7565 ----
+***************
+*** 7863,7869 ****
+ *'termguicolors'* *'tgc'* *E954*
+ 'termguicolors' 'tgc' boolean (default off)
+ global
+- {not in Vi}
+ {not available when compiled without the
+ |+termguicolors| feature}
+ When on, uses |highlight-guifg| and |highlight-guibg| attributes in
+--- 7588,7593 ----
+***************
+*** 7881,7900 ****
+ Note that the "cterm" attributes are still used, not the "gui" ones.
+ NOTE: This option is reset when 'compatible' is set.
+
+- *'termwinscroll'* *'twsl'*
+- 'termwinscroll' 'twsl' number (default 10000)
+- local to buffer
+- {not in Vi}
+- {not available when compiled without the
+- |+terminal| feature}
+- Number of scrollback lines to keep. When going over this limit the
+- first 10% of the scrollback lines are deleted. This is just to reduce
+- the memory usage. See |Terminal-Normal|.
+-
+ *'termwinkey'* *'twk'*
+ 'termwinkey' 'twk' string (default "")
+ local to window
+- {not in Vi}
+ The key that starts a CTRL-W command in a terminal window. Other keys
+ are sent to the job running in the window.
+ The <> notation can be used, e.g.: >
+--- 7605,7613 ----
+***************
+*** 7904,7913 ****
+ line. If 'termwinkey' is set to CTRL-L then CTRL-L : gets you to the
+ command line.
+
+ *'termwinsize'* *'tws'*
+ 'termwinsize' 'tws' string (default "")
+ local to window
+- {not in Vi}
+ Size of the |terminal| window. Format: {rows}x{columns} or
+ {rows}*{columns}.
+ - When empty the terminal gets the size from the window.
+--- 7617,7634 ----
+ line. If 'termwinkey' is set to CTRL-L then CTRL-L : gets you to the
+ command line.
+
++ *'termwinscroll'* *'twsl'*
++ 'termwinscroll' 'twsl' number (default 10000)
++ local to buffer
++ {not available when compiled without the
++ |+terminal| feature}
++ Number of scrollback lines to keep. When going over this limit the
++ first 10% of the scrollback lines are deleted. This is just to reduce
++ the memory usage. See |Terminal-Normal|.
++
+ *'termwinsize'* *'tws'*
+ 'termwinsize' 'tws' string (default "")
+ local to window
+ Size of the |terminal| window. Format: {rows}x{columns} or
+ {rows}*{columns}.
+ - When empty the terminal gets the size from the window.
+***************
+*** 7932,7938 ****
+ *'termwintype'* *'twt'*
+ 'termwintype' 'twt' string (default "")
+ global
+- {not in Vi}
+ {only available when compiled with the |terminal|
+ feature on MS-Windows}
+ Specify the virtual console (pty) used when opening the terminal
+--- 7653,7658 ----
+***************
+*** 7960,7966 ****
+ *'textauto'* *'ta'* *'notextauto'* *'nota'*
+ 'textauto' 'ta' boolean (Vim default: on, Vi default: off)
+ global
+- {not in Vi}
+ This option is obsolete. Use 'fileformats'.
+ For backwards compatibility, when 'textauto' is set, 'fileformats' is
+ set to the default value for the current system. When 'textauto' is
+--- 7680,7685 ----
+***************
+*** 7972,7978 ****
+ 'textmode' 'tx' boolean (MS-DOS, Win32 and OS/2: default on,
+ others: default off)
+ local to buffer
+- {not in Vi}
+ This option is obsolete. Use 'fileformat'.
+ For backwards compatibility, when 'textmode' is set, 'fileformat' is
+ set to "dos". When 'textmode' is reset, 'fileformat' is set to
+--- 7691,7696 ----
+***************
+*** 7981,7987 ****
+ *'textwidth'* *'tw'*
+ 'textwidth' 'tw' number (default 0)
+ local to buffer
+- {not in Vi}
+ Maximum width of text that is being inserted. A longer line will be
+ broken after white space to get this width. A zero value disables
+ this.
+--- 7699,7704 ----
+***************
+*** 7995,8009 ****
+ *'thesaurus'* *'tsr'*
+ 'thesaurus' 'tsr' string (default "")
+ global or local to buffer |global-local|
+- {not in Vi}
+ List of file names, separated by commas, that are used to lookup words
+! for thesaurus completion commands |i_CTRL-X_CTRL-T|. Each line in
+! the file should contain words with similar meaning, separated by
+! non-keyword characters (white space is preferred). Maximum line
+! length is 510 bytes.
+! To obtain a file to be used here, check out this ftp site:
+! [Sorry this link doesn't work anymore, do you know the right one?]
+! ftp://ftp.ox.ac.uk/pub/wordlists/ First get the README file.
+ To include a comma in a file name precede it with a backslash. Spaces
+ after a comma are ignored, otherwise spaces are included in the file
+ name. See |option-backslash| about using backslashes.
+--- 7712,7730 ----
+ *'thesaurus'* *'tsr'*
+ 'thesaurus' 'tsr' string (default "")
+ global or local to buffer |global-local|
+ List of file names, separated by commas, that are used to lookup words
+! for thesaurus completion commands |i_CTRL-X_CTRL-T|.
+!
+! Each line in the file should contain words with similar meaning,
+! separated by non-keyword characters (white space is preferred).
+! Maximum line length is 510 bytes.
+!
+! An English word list was added to this github issue:
+! https://github.com/vim/vim/issues/629#issuecomment-443293282
+! Unpack thesaurus_pkg.zip, put the thesaurus.txt file somewhere, e.g.
+! ~/.vim/thesaurus/english.txt, and the 'thesaurus' option to this file
+! name.
+!
+ To include a comma in a file name precede it with a backslash. Spaces
+ after a comma are ignored, otherwise spaces are included in the file
+ name. See |option-backslash| about using backslashes.
+***************
+*** 8015,8021 ****
+ *'tildeop'* *'top'* *'notildeop'* *'notop'*
+ 'tildeop' 'top' boolean (default off)
+ global
+- {not in Vi}
+ When on: The tilde command "~" behaves like an operator.
+ NOTE: This option is reset when 'compatible' is set.
+
+--- 7736,7741 ----
+***************
+*** 8025,8031 ****
+ *'ttimeout'* *'nottimeout'*
+ 'ttimeout' boolean (default off, set in |defaults.vim|)
+ global
+- {not in Vi}
+ These two options together determine the behavior when part of a
+ mapped key sequence or keyboard code has been received:
+
+--- 7745,7750 ----
+***************
+*** 8060,8066 ****
+ *'ttimeoutlen'* *'ttm'*
+ 'ttimeoutlen' 'ttm' number (default -1, set to 100 in |defaults.vim|)
+ global
+- {not in Vi}
+ The time in milliseconds that is waited for a key code or mapped key
+ sequence to complete. Also used for CTRL-\ CTRL-N and CTRL-\ CTRL-G
+ when part of a command has been typed.
+--- 7779,7784 ----
+***************
+*** 8081,8087 ****
+ *'title'* *'notitle'*
+ 'title' boolean (default off, on when title can be restored)
+ global
+- {not in Vi}
+ {not available when compiled without the |+title|
+ feature}
+ When on, the title of the window will be set to the value of
+--- 7799,7804 ----
+***************
+*** 8117,8123 ****
+ *'titlelen'*
+ 'titlelen' number (default 85)
+ global
+- {not in Vi}
+ {not available when compiled without the |+title|
+ feature}
+ Gives the percentage of 'columns' to use for the length of the window
+--- 7834,7839 ----
+***************
+*** 8133,8139 ****
+ *'titleold'*
+ 'titleold' string (default "Thanks for flying Vim")
+ global
+- {not in Vi}
+ {only available when compiled with the |+title|
+ feature}
+ This option will be used for the window title when exiting Vim if the
+--- 7849,7854 ----
+***************
+*** 8144,8150 ****
+ *'titlestring'*
+ 'titlestring' string (default "")
+ global
+- {not in Vi}
+ {not available when compiled without the |+title|
+ feature}
+ When this option is not empty, it will be used for the title of the
+--- 7859,7864 ----
+***************
+*** 8200,8206 ****
+ *'toolbariconsize'* *'tbis'*
+ 'toolbariconsize' 'tbis' string (default "small")
+ global
+- {not in Vi}
+ {only in the GTK+ GUI}
+ Controls the size of toolbar icons. The possible values are:
+ tiny Use tiny icons.
+--- 7914,7919 ----
+***************
+*** 8219,8225 ****
+ *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'*
+ 'ttybuiltin' 'tbi' boolean (default on)
+ global
+- {not in Vi}
+ When on, the builtin termcaps are searched before the external ones.
+ When off the builtin termcaps are searched after the external ones.
+ When this option is changed, you should set the 'term' option next for
+--- 7932,7937 ----
+***************
+*** 8236,8242 ****
+ iris-ansi; also on when running Vim in
+ a DOS console)
+ global
+- {not in Vi}
+ Indicates a fast terminal connection. More characters will be sent to
+ the screen for redrawing, instead of using insert/delete line
+ commands. Improves smoothness of redrawing when there are multiple
+--- 7948,7953 ----
+***************
+*** 8248,8254 ****
+ *'ttymouse'* *'ttym'*
+ 'ttymouse' 'ttym' string (default depends on 'term')
+ global
+- {not in Vi}
+ {only in Unix and VMS, doesn't work in the GUI; not
+ available when compiled without |+mouse|}
+ Name of the terminal type for which mouse codes are to be recognized.
+--- 7959,7964 ----
+***************
+*** 8308,8315 ****
+ |t_RV| is set to the escape sequence to request the xterm version
+ number, more intelligent detection process runs.
+ The "xterm2" value will be set if the xterm version is reported to be
+! from 95 to 276. The "sgr" value will be set if the xterm version is
+! 277 or higher and when Vim detects Mac Terminal.app or iTerm2.
+ If you do not want 'ttymouse' to be set to "xterm2" or "sgr"
+ automatically, set t_RV to an empty string: >
+ :set t_RV=
+--- 8018,8026 ----
+ |t_RV| is set to the escape sequence to request the xterm version
+ number, more intelligent detection process runs.
+ The "xterm2" value will be set if the xterm version is reported to be
+! from 95 to 276. The "sgr" value will be set if Vim detects Mac
+! Terminal.app, iTerm2 or mintty, and when the xterm version is 277 or
+! higher.
+ If you do not want 'ttymouse' to be set to "xterm2" or "sgr"
+ automatically, set t_RV to an empty string: >
+ :set t_RV=
+***************
+*** 8330,8336 ****
+ *'undodir'* *'udir'*
+ 'undodir' 'udir' string (default ".")
+ global
+- {not in Vi}
+ {only when compiled with the |+persistent_undo| feature}
+ List of directory names for undo files, separated with commas.
+ See |'backupdir'| for details of the format.
+--- 8041,8046 ----
+***************
+*** 8348,8354 ****
+ *'undofile'* *'noundofile'* *'udf'* *'noudf'*
+ 'undofile' 'udf' boolean (default off)
+ local to buffer
+- {not in Vi}
+ {only when compiled with the |+persistent_undo| feature}
+ When on, Vim automatically saves undo history to an undo file when
+ writing a buffer to a file, and restores undo history from the same
+--- 8058,8063 ----
+***************
+*** 8364,8370 ****
+ 'undolevels' 'ul' number (default 100, 1000 for Unix, VMS,
+ Win32 and OS/2)
+ global or local to buffer |global-local|
+- {not in Vi}
+ Maximum number of changes that can be undone. Since undo information
+ is kept in memory, higher numbers will cause more memory to be used
+ (nevertheless, a single change can use an unlimited amount of memory).
+--- 8073,8078 ----
+***************
+*** 8386,8392 ****
+ *'undoreload'* *'ur'*
+ 'undoreload' 'ur' number (default 10000)
+ global
+- {not in Vi}
+ Save the whole buffer for undo when reloading it. This applies to the
+ ":e!" command and reloading for when the buffer changed outside of
+ Vim. |FileChangedShell|
+--- 8094,8099 ----
+***************
+*** 8402,8408 ****
+ *'updatecount'* *'uc'*
+ 'updatecount' 'uc' number (default: 200)
+ global
+- {not in Vi}
+ After typing this many characters the swap file will be written to
+ disk. When zero, no swap file will be created at all (see chapter on
+ recovery |crash-recovery|). 'updatecount' is set to zero by starting
+--- 8109,8114 ----
+***************
+*** 8419,8425 ****
+ *'updatetime'* *'ut'*
+ 'updatetime' 'ut' number (default 4000)
+ global
+- {not in Vi}
+ If this many milliseconds nothing is typed the swap file will be
+ written to disk (see |crash-recovery|). Also used for the
+ |CursorHold| autocommand event.
+--- 8125,8130 ----
+***************
+*** 8429,8435 ****
+ local to buffer
+ {only available when compiled with the |+vartabs|
+ feature}
+- {not in Vi}
+ A list of the number of spaces that a <Tab> counts for while editing,
+ such as inserting a <Tab> or using <BS>. It "feels" like variable-
+ width <Tab>s are being inserted, while in fact a mixture of spaces
+--- 8134,8139 ----
+***************
+*** 8437,8447 ****
+ final value applying to all subsequent tabs.
+
+ For example, when editing assembly language files where statements
+! start in the 8th column and comments in the 40th, it may be useful
+ to use the following: >
+ :set varsofttabstop=8,32,8
+! < This will set soft tabstops at the 8th and 40th columns, and at every
+! 8th column thereafter.
+
+ Note that the value of |'softtabstop'| will be ignored while
+ 'varsofttabstop' is set.
+--- 8141,8151 ----
+ final value applying to all subsequent tabs.
+
+ For example, when editing assembly language files where statements
+! start in the 9th column and comments in the 41st, it may be useful
+ to use the following: >
+ :set varsofttabstop=8,32,8
+! < This will set soft tabstops with 8 and 8 + 32 spaces, and 8 more
+! for every column thereafter.
+
+ Note that the value of |'softtabstop'| will be ignored while
+ 'varsofttabstop' is set.
+***************
+*** 8451,8457 ****
+ local to buffer
+ {only available when compiled with the |+vartabs|
+ feature}
+- {not in Vi}
+ A list of the number of spaces that a <Tab> in the file counts for,
+ separated by commas. Each value corresponds to one tab, with the
+ final value applying to all subsequent tabs. For example: >
+--- 8155,8160 ----
+***************
+*** 8465,8472 ****
+ *'verbose'* *'vbs'*
+ 'verbose' 'vbs' number (default 0)
+ global
+- {not in Vi, although some versions have a boolean
+- verbose option}
+ When bigger than zero, Vim will give messages about what it is doing.
+ Currently, these messages are given:
+ >= 1 When the viminfo file is read or written.
+--- 8168,8173 ----
+***************
+*** 8488,8494 ****
+ *'verbosefile'* *'vfile'*
+ 'verbosefile' 'vfile' string (default empty)
+ global
+- {not in Vi}
+ When not empty all messages are written in a file with this name.
+ When the file exists messages are appended.
+ Writing to the file ends when Vim exits or when 'verbosefile' is made
+--- 8189,8194 ----
+***************
+*** 8505,8511 ****
+ for VMS: "sys$login:vimfiles/view"
+ for RiscOS: "Choices:vimfiles/view")
+ global
+- {not in Vi}
+ {not available when compiled without the |+mksession|
+ feature}
+ Name of the directory where to store files for |:mkview|.
+--- 8205,8210 ----
+***************
+*** 8515,8521 ****
+ *'viewoptions'* *'vop'*
+ 'viewoptions' 'vop' string (default: "folds,options,cursor,curdir")
+ global
+- {not in Vi}
+ {not available when compiled without the |+mksession|
+ feature}
+ Changes the effect of the |:mkview| command. It is a comma separated
+--- 8214,8219 ----
+***************
+*** 8543,8549 ****
+ for Amiga: '100,<50,s10,h,rdf0:,rdf1:,rdf2:
+ for others: '100,<50,s10,h)
+ global
+- {not in Vi}
+ {not available when compiled without the |+viminfo|
+ feature}
+ When non-empty, the viminfo file is read upon startup and written
+--- 8241,8246 ----
+***************
+*** 8660,8666 ****
+ *'viminfofile'* *'vif'*
+ 'viminfofile' 'vif' string (default: "")
+ global
+- {not in Vi}
+ {not available when compiled without the |+viminfo|
+ feature}
+ When non-empty, overrides the file name used for viminfo.
+--- 8357,8362 ----
+***************
+*** 8671,8677 ****
+ *'virtualedit'* *'ve'*
+ 'virtualedit' 've' string (default "")
+ global
+- {not in Vi}
+ {not available when compiled without the
+ |+virtualedit| feature}
+ A comma separated list of these words:
+--- 8367,8372 ----
+***************
+*** 8700,8706 ****
+ *'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep*
+ 'visualbell' 'vb' boolean (default off)
+ global
+- {not in Vi}
+ Use a visual bell instead of beeping. The terminal code to display the
+ visual bell is given with 't_vb'. When no beep or flash is wanted,
+ use: >
+--- 8395,8400 ----
+***************
+*** 8734,8740 ****
+ *'weirdinvert'* *'wiv'* *'noweirdinvert'* *'nowiv'*
+ 'weirdinvert' 'wiv' boolean (default off)
+ global
+- {not in Vi}
+ This option has the same effect as the 't_xs' terminal option.
+ It is provided for backwards compatibility with version 4.x.
+ Setting 'weirdinvert' has the effect of making 't_xs' non-empty, and
+--- 8428,8433 ----
+***************
+*** 8743,8749 ****
+ *'whichwrap'* *'ww'*
+ 'whichwrap' 'ww' string (Vim default: "b,s", Vi default: "")
+ global
+- {not in Vi}
+ Allow specified keys that move the cursor left/right to move to the
+ previous/next line when the cursor is on the first/last character in
+ the line. Concatenate characters to allow this for these keys:
+--- 8436,8441 ----
+***************
+*** 8776,8782 ****
+ *'wildchar'* *'wc'*
+ 'wildchar' 'wc' number (Vim default: <Tab>, Vi default: CTRL-E)
+ global
+- {not in Vi}
+ Character you have to type to start wildcard expansion in the
+ command-line, as specified with 'wildmode'.
+ More info here: |cmdline-completion|.
+--- 8468,8473 ----
+***************
+*** 8790,8796 ****
+ *'wildcharm'* *'wcm'*
+ 'wildcharm' 'wcm' number (default: none (0))
+ global
+- {not in Vi}
+ 'wildcharm' works exactly like 'wildchar', except that it is
+ recognized when used inside a macro. You can find "spare" command-line
+ keys suitable for this option by looking at |ex-edit-index|. Normally
+--- 8481,8486 ----
+***************
+*** 8803,8809 ****
+ *'wildignore'* *'wig'*
+ 'wildignore' 'wig' string (default "")
+ global
+- {not in Vi}
+ {not available when compiled without the |+wildignore|
+ feature}
+ A list of file patterns. A file that matches with one of these
+--- 8493,8498 ----
+***************
+*** 8822,8828 ****
+ *'wildignorecase'* *'wic'* *'nowildignorecase'* *'nowic'*
+ 'wildignorecase' 'wic' boolean (default off)
+ global
+- {not in Vi}
+ When set case is ignored when completing file names and directories.
+ Has no effect when 'fileignorecase' is set.
+ Does not apply when the shell is used to expand wildcards, which
+--- 8511,8516 ----
+***************
+*** 8832,8838 ****
+ *'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
+ 'wildmenu' 'wmnu' boolean (default off, set in |defaults.vim|)
+ global
+- {not in Vi}
+ {not available if compiled without the |+wildmenu|
+ feature}
+ When 'wildmenu' is on, command-line completion operates in an enhanced
+--- 8520,8525 ----
+***************
+*** 8873,8879 ****
+ *'wildmode'* *'wim'*
+ 'wildmode' 'wim' string (Vim default: "full")
+ global
+- {not in Vi}
+ Completion mode that is used for the character specified with
+ 'wildchar'. It is a comma separated list of up to four parts. Each
+ part specifies what to do for each consecutive use of 'wildchar'. The
+--- 8560,8565 ----
+***************
+*** 8911,8917 ****
+ *'wildoptions'* *'wop'*
+ 'wildoptions' 'wop' string (default "")
+ global
+- {not in Vi}
+ {not available when compiled without the |+wildignore|
+ feature}
+ A list of words that change how command line completion is done.
+--- 8597,8602 ----
+***************
+*** 8926,8932 ****
+ *'winaltkeys'* *'wak'*
+ 'winaltkeys' 'wak' string (default "menu")
+ global
+- {not in Vi}
+ {only used in Win32, Motif, GTK and Photon GUI}
+ Some GUI versions allow the access to menu entries by using the ALT
+ key in combination with a character that appears underlined in the
+--- 8611,8616 ----
+***************
+*** 8962,8968 ****
+ *'winheight'* *'wh'* *E591*
+ 'winheight' 'wh' number (default 1)
+ global
+- {not in Vi}
+ {not available when compiled without the |+windows|
+ feature}
+ Minimal number of lines for the current window. This is not a hard
+--- 8646,8651 ----
+***************
+*** 8985,8991 ****
+ *'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'*
+ 'winfixheight' 'wfh' boolean (default off)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+windows|
+ feature}
+ Keep the window height when windows are opened or closed and
+--- 8668,8673 ----
+***************
+*** 8996,9002 ****
+ *'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'*
+ 'winfixwidth' 'wfw' boolean (default off)
+ local to window
+- {not in Vi}
+ {not available when compiled without the |+windows|
+ feature}
+ Keep the window width when windows are opened or closed and
+--- 8678,8683 ----
+***************
+*** 9006,9012 ****
+ *'winminheight'* *'wmh'*
+ 'winminheight' 'wmh' number (default 1)
+ global
+- {not in Vi}
+ {not available when compiled without the |+windows|
+ feature}
+ The minimal height of a window, when it's not the current window.
+--- 8687,8692 ----
+***************
+*** 9022,9028 ****
+ *'winminwidth'* *'wmw'*
+ 'winminwidth' 'wmw' number (default 1)
+ global
+- {not in Vi}
+ {not available when compiled without the |+vertsplit|
+ feature}
+ The minimal width of a window, when it's not the current window.
+--- 8702,8707 ----
+***************
+*** 9039,9045 ****
+ *'winptydll'*
+ 'winptydll' string (default "winpty32.dll" or "winpty64.dll")
+ global
+- {not in Vi}
+ {only available when compiled with the |terminal|
+ feature on MS-Windows}
+ Specifies the name of the winpty shared library, used for the
+--- 8718,8723 ----
+***************
+*** 9053,9059 ****
+ *'winwidth'* *'wiw'* *E592*
+ 'winwidth' 'wiw' number (default 20)
+ global
+- {not in Vi}
+ {not available when compiled without the |+vertsplit|
+ feature}
+ Minimal number of columns for the current window. This is not a hard
+--- 8731,8736 ----
+***************
+*** 9069,9075 ****
+ *'wrap'* *'nowrap'*
+ 'wrap' boolean (default on)
+ local to window
+- {not in Vi}
+ This option changes how text is displayed. It doesn't change the text
+ in the buffer, see 'textwidth' for that.
+ When on, lines longer than the width of the window will wrap and
+--- 8746,8751 ----
+***************
+*** 9109,9115 ****
+ *'write'* *'nowrite'*
+ 'write' boolean (default on)
+ global
+- {not in Vi}
+ Allows writing files. When not set, writing a file is not allowed.
+ Can be used for a view-only mode, where modifications to the text are
+ still allowed. Can be reset with the |-m| or |-M| command line
+--- 8785,8790 ----
+***************
+*** 9125,9131 ****
+ 'writebackup' 'wb' boolean (default on with |+writebackup| feature, off
+ otherwise)
+ global
+- {not in Vi}
+ Make a backup before overwriting a file. The backup is removed after
+ the file was successfully written, unless the 'backup' option is
+ also on.
+--- 8800,8805 ----
+***************
+*** 9142,9150 ****
+ *'writedelay'* *'wd'*
+ 'writedelay' 'wd' number (default 0)
+ global
+- {not in Vi}
+ The number of milliseconds to wait for each character sent to the
+ screen. When non-zero, characters are sent to the terminal one by
+ one. For MS-DOS pcterm this does not work. For debugging purposes.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 8816,8823 ----
+ *'writedelay'* *'wd'*
+ 'writedelay' 'wd' number (default 0)
+ global
+ The number of milliseconds to wait for each character sent to the
+ screen. When non-zero, characters are sent to the terminal one by
+ one. For MS-DOS pcterm this does not work. For debugging purposes.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1225/src/version.c 2019-04-28 14:59:55.845503790 +0200
+--- src/version.c 2019-04-28 15:55:46.832806798 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1226,
+ /**/
+
+--
+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.1227 b/data/vim/patches/8.1.1227
new file mode 100644
index 000000000..4b872bf0b
--- /dev/null
+++ b/data/vim/patches/8.1.1227
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1227
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1227
+Problem: Duplicate entries in the generate .desktop files. (Ralf Schandl)
+Solution: Remove translated entries from the .in files. (closes #4313)
+Files: src/po/gvim.desktop.in, src/po/vim.desktop.in
+
+
+*** ../vim-8.1.1226/src/po/gvim.desktop.in 2019-04-11 13:09:57.786699880 +0200
+--- src/po/gvim.desktop.in 2019-04-28 16:05:07.006189049 +0200
+***************
+*** 10,16 ****
+ # The translations should come from the po file. Leave them here for now, they will
+ # be overwritten by the po file when generating the desktop.file!
+ GenericName[da]=Teksteditor
+- GenericName[de]=Texteditor
+ GenericName[eo]=Tekstoredaktilo
+ GenericName[fr]=Éditeur de texte
+ GenericName[pl]=Edytor tekstu
+--- 10,15 ----
+***************
+*** 27,33 ****
+ Comment[cs]=Úprava textových souborů
+ Comment[cy]=Golygu ffeiliau testun
+ Comment[da]=Rediger tekstfiler
+- Comment[de]=Textdateien bearbeiten
+ Comment[el]=Επεξεργασία αρχείων κειμένου
+ Comment[en_CA]=Edit text files
+ Comment[en_GB]=Edit text files
+--- 26,31 ----
+*** ../vim-8.1.1226/src/po/vim.desktop.in 2019-04-11 13:09:57.786699880 +0200
+--- src/po/vim.desktop.in 2019-04-28 16:05:46.202002282 +0200
+***************
+*** 10,16 ****
+ # The translations should come from the po file. Leave them here for now, they will
+ # be overwritten by the po file when generating the desktop.file.
+ GenericName[da]=Teksteditor
+- GenericName[de]=Texteditor
+ GenericName[pl]=Edytor tekstu
+ GenericName[is]=Ritvinnsluforrit
+ Comment[af]=Redigeer tekslêers
+--- 10,15 ----
+***************
+*** 25,31 ****
+ Comment[cs]=Úprava textových souborů
+ Comment[cy]=Golygu ffeiliau testun
+ Comment[da]=Rediger tekstfiler
+- Comment[de]=Textdateien bearbeiten
+ Comment[el]=Επεξεργασία αρχείων κειμένου
+ Comment[en_CA]=Edit text files
+ Comment[en_GB]=Edit text files
+--- 24,29 ----
+*** ../vim-8.1.1226/src/version.c 2019-04-28 16:00:05.367613425 +0200
+--- src/version.c 2019-04-28 16:07:36.845473499 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1227,
+ /**/
+
+--
+DENNIS: Listen -- strange women lying in ponds distributing swords is no
+ basis for a system of government. Supreme executive power derives
+ from a mandate from the masses, not from some farcical aquatic
+ ceremony.
+ 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.1228 b/data/vim/patches/8.1.1228
new file mode 100644
index 000000000..b584c9e6b
--- /dev/null
+++ b/data/vim/patches/8.1.1228
@@ -0,0 +1,1467 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1228
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1228
+Problem: Not possible to process tags with a function.
+Solution: Add tagfunc() (Christian Brabandt, Andy Massimino, closes #4010)
+Files: runtime/doc/options.txt, runtime/doc/tagsrch.txt,
+ runtime/optwin.vim, src/buffer.c, src/dict.c, src/ex_cmds.c,
+ src/globals.h, src/insexpand.c, src/normal.c, src/option.c,
+ src/option.h, src/proto/dict.pro, src/structs.h, src/tag.c,
+ src/testdir/Make_all.mak, src/testdir/test_alot.vim,
+ src/testdir/test_tagfunc.vim, src/vim.h, src/window.c
+
+
+*** ../vim-8.1.1227/runtime/doc/options.txt 2019-04-28 16:00:05.367613425 +0200
+--- runtime/doc/options.txt 2019-04-28 16:53:38.066933372 +0200
+***************
+*** 7458,7463 ****
+--- 7458,7473 ----
+ NOTE: This option is set to the Vi default value when 'compatible' is
+ set and to the Vim default value when 'compatible' is reset.
+
++ *'tagfunc'* *'tfu'*
++ 'tagfunc' 'tfu' string (default: empty)
++ local to buffer
++ {not available when compiled without the |+eval|
++ feature}
++ This option specifies a function to be used to perform tag searches.
++ The function gets the tag pattern and should return a List of matching
++ tags. See |tag-function| for an explanation of how to write the
++ function and an example.
++
+ *'taglength'* *'tl'*
+ 'taglength' 'tl' number (default 0)
+ global
+*** ../vim-8.1.1227/runtime/doc/tagsrch.txt 2019-03-30 21:19:16.426170240 +0100
+--- runtime/doc/tagsrch.txt 2019-04-28 17:43:27.976705157 +0200
+***************
+*** 14,19 ****
+--- 14,20 ----
+ 4. Tags details |tag-details|
+ 5. Tags file format |tags-file-format|
+ 6. Include file searches |include-search|
++ 7. Using 'tagfunc' |tag-function|
+
+ ==============================================================================
+ 1. Jump to a tag *tag-commands*
+***************
+*** 179,186 ****
+ 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
+--- 180,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
+***************
+*** 570,576 ****
+ the bar) and ;" is used to have Vi ignore the rest of the
+ line. Example:
+ APP file.c call cursor(3, 4)|;" v
+!
+ {field} .. A list of optional fields. Each field has the form:
+
+ <Tab>{fieldname}:{value}
+--- 571,577 ----
+ the bar) and ;" is used to have Vi ignore the rest of the
+ line. Example:
+ APP file.c call cursor(3, 4)|;" v
+!
+ {field} .. A list of optional fields. Each field has the form:
+
+ <Tab>{fieldname}:{value}
+***************
+*** 591,596 ****
+--- 592,598 ----
+ The only other field currently recognized by Vim is "file:"
+ (with an empty value). It is used for a static tag.
+
++
+ The first lines in the tags file can contain lines that start with
+ !_TAG_
+ These are sorted to the first lines, only rare tags that start with "!" can
+***************
+*** 870,873 ****
+ < For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern
+ is used as a literal string, not as a search pattern.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 872,941 ----
+ < For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern
+ is used as a literal string, not as a search pattern.
+
+! ==============================================================================
+! 7. Using 'tagfunc' *tag-function*
+!
+! It is possible to provide Vim with a function which will generate a list of
+! tags used for commands like |:tag|, |:tselect| and Normal mode tag commands
+! like |CTRL-]|.
+!
+! The function used for generating the taglist is specified by setting the
+! 'tagfunc' option. The function will be called with three arguments:
+! a:pattern The tag identifier used during the tag search.
+! a:flags List of flags to control the function behavior.
+! a:info Dict containing the following entries:
+! buf_ffname Full filename which can be used for priority.
+! user_data Custom data String, if stored in the tag
+! stack previously by tagfunc.
+!
+! Currently two flags may be passed to the tag function:
+! 'c' The function was invoked by a normal command being processed
+! (mnemonic: the tag function may use the context around the
+! cursor to perform a better job of generating the tag list.)
+! 'i' In Insert mode, the user was completing a tag (with
+! |i_CTRL-X_CTRL-]|).
+!
+! Note that when 'tagfunc' is set, the priority of the tags described in
+! |tag-priority| does not apply. Instead, the priority is exactly as the
+! ordering of the elements in the list returned by the function.
+! *E987*
+! The function should return a List of Dict entries. Each Dict must at least
+! include the following entries and each value must be a string:
+! name Name of the tag.
+! filename Name of the file where the tag is defined. It is
+! either relative to the current directory or a full path.
+! cmd Ex command used to locate the tag in the file. This
+! can be either an Ex search pattern or a line number.
+! Note that the format is similar to that of |taglist()|, which makes it possible
+! to use its output to generate the result.
+! The following fields are optional:
+! kind Type of the tag.
+! user_data String of custom data stored in the tag stack which
+! can be used to disambiguate tags between operations.
+!
+! If the function returns |v:null| instead of a List, a standard tag lookup will
+! be performed instead.
+!
+! It is not allowed to change the tagstack from inside 'tagfunc'. *E986*
+!
+! The following is a hypothetical example of a function used for 'tagfunc'. It
+! uses the output of |taglist()| to generate the result: a list of tags in the
+! inverse order of file names.
+! >
+! function! TagFunc(pattern, flags, info)
+! function! CompareFilenames(item1, item2)
+! let f1 = a:item1['filename']
+! let f2 = a:item2['filename']
+! return f1 >=# f2 ?
+! \ -1 : f1 <=# f2 ? 1 : 0
+! endfunction
+!
+! let result = taglist(a:pattern)
+! call sort(result, "CompareFilenames")
+!
+! return result
+! endfunc
+! set tagfunc=TagFunc
+! <
+!
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1227/runtime/optwin.vim 2019-02-17 17:53:46.681219289 +0100
+--- runtime/optwin.vim 2019-04-28 16:47:48.252732139 +0200
+***************
+*** 300,305 ****
+--- 300,310 ----
+ call <SID>BinOptionG("tgst", &tgst)
+ call append("$", "showfulltag\twhen completing tags in Insert mode show more info")
+ call <SID>BinOptionG("sft", &sft)
++ if has("eval")
++ call append("$", "tagfunc\ta function to be used to perform tag searches")
++ call append("$", "\t(local to buffer)")
++ call <SID>OptionL("tfu")
++ endif
+ if has("cscope")
+ call append("$", "cscopeprg\tcommand for executing cscope")
+ call <SID>OptionG("csprg", &csprg)
+*** ../vim-8.1.1227/src/buffer.c 2019-04-27 13:03:20.000715982 +0200
+--- src/buffer.c 2019-04-28 16:47:48.252732139 +0200
+***************
+*** 2219,2224 ****
+--- 2219,2227 ----
+ clear_string_option(&buf->b_p_path);
+ clear_string_option(&buf->b_p_tags);
+ clear_string_option(&buf->b_p_tc);
++ #ifdef FEAT_EVAL
++ clear_string_option(&buf->b_p_tfu);
++ #endif
+ #ifdef FEAT_INS_EXPAND
+ clear_string_option(&buf->b_p_dict);
+ clear_string_option(&buf->b_p_tsr);
+*** ../vim-8.1.1227/src/dict.c 2019-04-08 18:15:36.464223229 +0200
+--- src/dict.c 2019-04-28 17:48:48.959179176 +0200
+***************
+*** 449,454 ****
+--- 449,503 ----
+ }
+
+ /*
++ * Initializes "iter" for iterating over dictionary items with
++ * dict_iterate_next().
++ * If "var" is not a Dict or an empty Dict then there will be nothing to
++ * iterate over, no error is given.
++ * NOTE: The dictionary must not change until iterating is finished!
++ */
++ void
++ dict_iterate_start(typval_T *var, dict_iterator_T *iter)
++ {
++ if (var->v_type != VAR_DICT || var->vval.v_dict == NULL)
++ iter->dit_todo = 0;
++ else
++ {
++ dict_T *d = var->vval.v_dict;
++
++ iter->dit_todo = d->dv_hashtab.ht_used;
++ iter->dit_hi = d->dv_hashtab.ht_array;
++ }
++ }
++
++ /*
++ * Iterate over the items referred to by "iter". It should be initialized with
++ * dict_iterate_start().
++ * Returns a pointer to the key.
++ * "*tv_result" is set to point to the value for that key.
++ * If there are no more items, NULL is returned.
++ */
++ char_u *
++ dict_iterate_next(dict_iterator_T *iter, typval_T **tv_result)
++ {
++ dictitem_T *di;
++ char_u *result;
++
++ if (iter->dit_todo == 0)
++ return NULL;
++
++ while (HASHITEM_EMPTY(iter->dit_hi))
++ ++iter->dit_hi;
++
++ di = HI2DI(iter->dit_hi);
++ result = di->di_key;
++ *tv_result = &di->di_tv;
++
++ --iter->dit_todo;
++ ++iter->dit_hi;
++ return result;
++ }
++
++ /*
+ * Add a dict entry to dictionary "d".
+ * Returns FAIL when out of memory and when key already exists.
+ */
+*** ../vim-8.1.1227/src/ex_cmds.c 2019-03-30 18:46:57.344077426 +0100
+--- src/ex_cmds.c 2019-04-28 17:16:35.452393443 +0200
+***************
+*** 6813,6819 ****
+
+ *matches = (char_u **)"";
+ *num_matches = 0;
+! flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE;
+ if (keep_lang)
+ flags |= TAG_KEEP_LANG;
+ if (find_tags(IObuff, num_matches, matches, flags, (int)MAXCOL, NULL) == OK
+--- 6813,6819 ----
+
+ *matches = (char_u **)"";
+ *num_matches = 0;
+! flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE | TAG_NO_TAGFUNC;
+ if (keep_lang)
+ flags |= TAG_KEEP_LANG;
+ if (find_tags(IObuff, num_matches, matches, flags, (int)MAXCOL, NULL) == OK
+*** ../vim-8.1.1227/src/globals.h 2019-04-20 23:38:02.189504258 +0200
+--- src/globals.h 2019-04-28 17:21:49.430854857 +0200
+***************
+*** 1067,1075 ****
+ EXTERN int postponed_split_flags INIT(= 0); /* args for win_split() */
+ EXTERN int postponed_split_tab INIT(= 0); /* cmdmod.tab */
+ #ifdef FEAT_QUICKFIX
+! EXTERN int g_do_tagpreview INIT(= 0); /* for tag preview commands:
+! height of preview window */
+ #endif
+ EXTERN int replace_offset INIT(= 0); /* offset for replace_push() */
+
+ EXTERN char_u *escape_chars INIT(= (char_u *)" \t\\\"|");
+--- 1067,1079 ----
+ EXTERN int postponed_split_flags INIT(= 0); /* args for win_split() */
+ EXTERN int postponed_split_tab INIT(= 0); /* cmdmod.tab */
+ #ifdef FEAT_QUICKFIX
+! EXTERN int g_do_tagpreview INIT(= 0); // for tag preview commands:
+! // height of preview window
+ #endif
++ EXTERN int g_tag_at_cursor INIT(= FALSE); // whether the tag command comes
++ // from the command line (0) or was
++ // invoked as a normal command (1)
++
+ EXTERN int replace_offset INIT(= 0); /* offset for replace_push() */
+
+ EXTERN char_u *escape_chars INIT(= (char_u *)" \t\\\"|");
+*** ../vim-8.1.1227/src/insexpand.c 2019-04-08 18:15:36.464223229 +0200
+--- src/insexpand.c 2019-04-28 17:21:29.878951043 +0200
+***************
+*** 2654,2664 ****
+--- 2654,2666 ----
+
+ // Find up to TAG_MANY matches. Avoids that an enormous number
+ // of matches is found when compl_pattern is empty
++ g_tag_at_cursor = TRUE;
+ if (find_tags(compl_pattern, &num_matches, &matches,
+ TAG_REGEXP | TAG_NAMES | TAG_NOIC | TAG_INS_COMP
+ | (ctrl_x_mode != CTRL_X_NORMAL ? TAG_VERBOSE : 0),
+ TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
+ ins_compl_add_matches(num_matches, matches, p_ic);
++ g_tag_at_cursor = FALSE;
+ p_ic = save_p_ic;
+ break;
+
+*** ../vim-8.1.1227/src/normal.c 2019-03-30 18:46:57.356077354 +0100
+--- src/normal.c 2019-04-28 17:21:37.030915863 +0200
+***************
+*** 5724,5730 ****
+--- 5724,5734 ----
+ (void)normal_search(cap, cmdchar == '*' ? '/' : '?', buf, 0);
+ }
+ else
++ {
++ g_tag_at_cursor = TRUE;
+ do_cmdline_cmd(buf);
++ g_tag_at_cursor = FALSE;
++ }
+
+ vim_free(buf);
+ }
+*** ../vim-8.1.1227/src/option.c 2019-04-27 22:06:33.348200718 +0200
+--- src/option.c 2019-04-28 16:47:48.256732118 +0200
+***************
+*** 167,172 ****
+--- 167,175 ----
+ #endif
+ #define PV_SW OPT_BUF(BV_SW)
+ #define PV_SWF OPT_BUF(BV_SWF)
++ #ifdef FEAT_EVAL
++ # define PV_TFU OPT_BUF(BV_TFU)
++ #endif
+ #define PV_TAGS OPT_BOTH(OPT_BUF(BV_TAGS))
+ #define PV_TC OPT_BOTH(OPT_BUF(BV_TC))
+ #define PV_TS OPT_BUF(BV_TS)
+***************
+*** 303,308 ****
+--- 306,314 ----
+ static char_u *p_cfu;
+ static char_u *p_ofu;
+ #endif
++ #ifdef FEAT_EVAL
++ static char_u *p_tfu;
++ #endif
+ static int p_eol;
+ static int p_fixeol;
+ static int p_et;
+***************
+*** 2642,2647 ****
+--- 2648,2662 ----
+ {"tagcase", "tc", P_STRING|P_VIM,
+ (char_u *)&p_tc, PV_TC,
+ {(char_u *)"followic", (char_u *)"followic"} SCTX_INIT},
++ {"tagfunc", "tfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
++ #ifdef FEAT_EVAL
++ (char_u *)&p_tfu, PV_TFU,
++ {(char_u *)"", (char_u *)0L}
++ #else
++ (char_u *)NULL, PV_NONE,
++ {(char_u *)0L, (char_u *)0L}
++ #endif
++ SCTX_INIT},
+ {"taglength", "tl", P_NUM|P_VI_DEF,
+ (char_u *)&p_tl, PV_NONE,
+ {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+***************
+*** 5689,5694 ****
+--- 5704,5712 ----
+ check_string_option(&buf->b_p_cfu);
+ check_string_option(&buf->b_p_ofu);
+ #endif
++ #ifdef FEAT_EVAL
++ check_string_option(&buf->b_p_tfu);
++ #endif
+ #ifdef FEAT_KEYMAP
+ check_string_option(&buf->b_p_keymap);
+ #endif
+***************
+*** 10944,10949 ****
+--- 10962,10970 ----
+ case PV_CFU: return (char_u *)&(curbuf->b_p_cfu);
+ case PV_OFU: return (char_u *)&(curbuf->b_p_ofu);
+ #endif
++ #ifdef FEAT_EVAL
++ case PV_TFU: return (char_u *)&(curbuf->b_p_tfu);
++ #endif
+ case PV_EOL: return (char_u *)&(curbuf->b_p_eol);
+ case PV_FIXEOL: return (char_u *)&(curbuf->b_p_fixeol);
+ case PV_ET: return (char_u *)&(curbuf->b_p_et);
+***************
+*** 11332,11337 ****
+--- 11353,11361 ----
+ buf->b_p_cfu = vim_strsave(p_cfu);
+ buf->b_p_ofu = vim_strsave(p_ofu);
+ #endif
++ #ifdef FEAT_EVAL
++ buf->b_p_tfu = vim_strsave(p_tfu);
++ #endif
+ buf->b_p_sts = p_sts;
+ buf->b_p_sts_nopaste = p_sts_nopaste;
+ #ifdef FEAT_VARTABS
+*** ../vim-8.1.1227/src/option.h 2019-03-02 10:13:36.796974835 +0100
+--- src/option.h 2019-04-28 16:47:48.256732118 +0200
+***************
+*** 1068,1073 ****
+--- 1068,1076 ----
+ #endif
+ , BV_SW
+ , BV_SWF
++ #ifdef FEAT_EVAL
++ , BV_TFU
++ #endif
+ , BV_TAGS
+ , BV_TC
+ , BV_TS
+*** ../vim-8.1.1227/src/proto/dict.pro 2019-04-08 18:15:36.472223190 +0200
+--- src/proto/dict.pro 2019-04-28 17:11:15.121943721 +0200
+***************
+*** 18,23 ****
+--- 18,25 ----
+ int dict_add_string(dict_T *d, char *key, char_u *str);
+ int dict_add_string_len(dict_T *d, char *key, char_u *str, int len);
+ int dict_add_list(dict_T *d, char *key, list_T *list);
++ void dict_iterate_start(typval_T *var, dict_iterator_T *iter);
++ char_u *dict_iterate_next(dict_iterator_T *iter, typval_T **tv_result);
+ int dict_add_dict(dict_T *d, char *key, dict_T *dict);
+ long dict_len(dict_T *d);
+ dictitem_T *dict_find(dict_T *d, char_u *key, int len);
+*** ../vim-8.1.1227/src/structs.h 2019-04-27 20:36:52.534303564 +0200
+--- src/structs.h 2019-04-28 17:31:05.364108835 +0200
+***************
+*** 147,156 ****
+ */
+ typedef struct taggy
+ {
+! char_u *tagname; /* tag name */
+! fmark_T fmark; /* cursor position BEFORE ":tag" */
+! int cur_match; /* match number */
+! int cur_fnum; /* buffer number used for cur_match */
+ } taggy_T;
+
+ /*
+--- 147,157 ----
+ */
+ typedef struct taggy
+ {
+! char_u *tagname; // tag name
+! fmark_T fmark; // cursor position BEFORE ":tag"
+! int cur_match; // match number
+! int cur_fnum; // buffer number used for cur_match
+! char_u *user_data; // used with tagfunc
+ } taggy_T;
+
+ /*
+***************
+*** 1885,1890 ****
+--- 1886,1901 ----
+ struct list_stack_S *prev;
+ } list_stack_T;
+
++ /*
++ * Structure used for iterating over dictionary items.
++ * Initialize with dict_iterate_start().
++ */
++ typedef struct
++ {
++ long_u dit_todo;
++ hashitem_T *dit_hi;
++ } dict_iterator_T;
++
+ /* values for b_syn_spell: what to do with toplevel text */
+ #define SYNSPL_DEFAULT 0 /* spell check if @Spell not defined */
+ #define SYNSPL_TOP 1 /* spell check toplevel text */
+***************
+*** 2245,2250 ****
+--- 2256,2264 ----
+ char_u *b_p_cfu; /* 'completefunc' */
+ char_u *b_p_ofu; /* 'omnifunc' */
+ #endif
++ #ifdef FEAT_EVAL
++ char_u *b_p_tfu; /* 'tagfunc' */
++ #endif
+ int b_p_eol; /* 'endofline' */
+ int b_p_fixeol; /* 'fixendofline' */
+ int b_p_et; /* 'expandtab' */
+*** ../vim-8.1.1227/src/tag.c 2019-04-21 00:00:07.942354840 +0200
+--- src/tag.c 2019-04-28 17:44:56.956284972 +0200
+***************
+*** 18,37 ****
+ */
+ typedef struct tag_pointers
+ {
+! /* filled in by parse_tag_line(): */
+! char_u *tagname; /* start of tag name (skip "file:") */
+! char_u *tagname_end; /* char after tag name */
+! char_u *fname; /* first char of file name */
+! char_u *fname_end; /* char after file name */
+! char_u *command; /* first char of command */
+! /* filled in by parse_match(): */
+! char_u *command_end; /* first char after command */
+! char_u *tag_fname; /* file name of the tags file */
+ #ifdef FEAT_EMACS_TAGS
+! int is_etag; /* TRUE for emacs tag */
+ #endif
+! char_u *tagkind; /* "kind:" value */
+! char_u *tagkind_end; /* end of tagkind */
+ } tagptrs_T;
+
+ /*
+--- 18,40 ----
+ */
+ typedef struct tag_pointers
+ {
+! // filled in by parse_tag_line():
+! char_u *tagname; // start of tag name (skip "file:")
+! char_u *tagname_end; // char after tag name
+! char_u *fname; // first char of file name
+! char_u *fname_end; // char after file name
+! char_u *command; // first char of command
+! // filled in by parse_match():
+! char_u *command_end; // first char after command
+! char_u *tag_fname; // file name of the tags file. This is used
+! // when 'tr' is set.
+ #ifdef FEAT_EMACS_TAGS
+! int is_etag; // TRUE for emacs tag
+ #endif
+! char_u *tagkind; // "kind:" value
+! char_u *tagkind_end; // end of tagkind
+! char_u *user_data; // user_data string
+! char_u *user_data_end; // end of user_data
+ } tagptrs_T;
+
+ /*
+***************
+*** 78,86 ****
+--- 81,94 ----
+ #if defined(FEAT_QUICKFIX) && defined(FEAT_EVAL)
+ static int add_llist_tags(char_u *tag, int num_matches, char_u **matches);
+ #endif
++ static void tagstack_clear_entry(taggy_T *item);
+
+ static char_u *bottommsg = (char_u *)N_("E555: at bottom of tag stack");
+ static char_u *topmsg = (char_u *)N_("E556: at top of tag stack");
++ #ifdef FEAT_EVAL
++ static char_u *recurmsg = (char_u *)N_("E986: cannot modify the tag stack within tagfunc");
++ static char_u *tfu_inv_ret_msg = (char_u *)N_("E987: invalid return value from tagfunc");
++ #endif
+
+ static char_u *tagmatchname = NULL; /* name of last used tag */
+
+***************
+*** 89,97 ****
+ * Tag for preview window is remembered separately, to avoid messing up the
+ * normal tagstack.
+ */
+! static taggy_T ptag_entry = {NULL, {{0, 0, 0}, 0}, 0, 0};
+ #endif
+
+ /*
+ * Jump to tag; handling of tag commands and tag stack
+ *
+--- 97,112 ----
+ * Tag for preview window is remembered separately, to avoid messing up the
+ * normal tagstack.
+ */
+! static taggy_T ptag_entry = {NULL, {{0, 0, 0}, 0}, 0, 0, NULL};
+! #endif
+!
+! #ifdef FEAT_EVAL
+! static int tfu_in_use = FALSE; // disallow recursive call of tagfunc
+ #endif
+
++ // Used instead of NUL to separate tag fields in the growarrays.
++ #define TAG_SEP 0x02
++
+ /*
+ * Jump to tag; handling of tag commands and tag stack
+ *
+***************
+*** 144,149 ****
+--- 159,165 ----
+ int skip_msg = FALSE;
+ char_u *buf_ffname = curbuf->b_ffname; /* name to use for
+ priority computation */
++ int use_tfu = 1;
+
+ /* remember the matches for the last used tag */
+ static int num_matches = 0;
+***************
+*** 151,156 ****
+--- 167,180 ----
+ static char_u **matches = NULL;
+ static int flags;
+
++ #ifdef FEAT_EVAL
++ if (tfu_in_use)
++ {
++ emsg(_(recurmsg));
++ return FALSE;
++ }
++ #endif
++
+ #ifdef EXITFREE
+ if (type == DT_FREE)
+ {
+***************
+*** 168,173 ****
+--- 192,198 ----
+ {
+ type = DT_TAG;
+ no_regexp = TRUE;
++ use_tfu = 0;
+ }
+
+ prev_num_matches = num_matches;
+***************
+*** 187,193 ****
+ #if defined(FEAT_QUICKFIX)
+ if (g_do_tagpreview != 0)
+ {
+! vim_free(ptag_entry.tagname);
+ if ((ptag_entry.tagname = vim_strsave(tag)) == NULL)
+ goto end_do_tag;
+ }
+--- 212,218 ----
+ #if defined(FEAT_QUICKFIX)
+ if (g_do_tagpreview != 0)
+ {
+! tagstack_clear_entry(&ptag_entry);
+ if ((ptag_entry.tagname = vim_strsave(tag)) == NULL)
+ goto end_do_tag;
+ }
+***************
+*** 226,232 ****
+ }
+ else
+ {
+! vim_free(ptag_entry.tagname);
+ if ((ptag_entry.tagname = vim_strsave(tag)) == NULL)
+ goto end_do_tag;
+ }
+--- 251,257 ----
+ }
+ else
+ {
+! tagstack_clear_entry(&ptag_entry);
+ if ((ptag_entry.tagname = vim_strsave(tag)) == NULL)
+ goto end_do_tag;
+ }
+***************
+*** 239,251 ****
+ * stack entries above it.
+ */
+ while (tagstackidx < tagstacklen)
+! vim_free(tagstack[--tagstacklen].tagname);
+
+ /* if the tagstack is full: remove oldest entry */
+ if (++tagstacklen > TAGSTACKSIZE)
+ {
+ tagstacklen = TAGSTACKSIZE;
+! vim_free(tagstack[0].tagname);
+ for (i = 1; i < tagstacklen; ++i)
+ tagstack[i - 1] = tagstack[i];
+ --tagstackidx;
+--- 264,276 ----
+ * stack entries above it.
+ */
+ while (tagstackidx < tagstacklen)
+! tagstack_clear_entry(&tagstack[--tagstacklen]);
+
+ /* if the tagstack is full: remove oldest entry */
+ if (++tagstacklen > TAGSTACKSIZE)
+ {
+ tagstacklen = TAGSTACKSIZE;
+! tagstack_clear_entry(&tagstack[0]);
+ for (i = 1; i < tagstacklen; ++i)
+ tagstack[i - 1] = tagstack[i];
+ --tagstackidx;
+***************
+*** 529,534 ****
+--- 554,563 ----
+ #endif
+ if (verbose)
+ flags |= TAG_VERBOSE;
++
++ if (!use_tfu)
++ flags |= TAG_NO_TAGFUNC;
++
+ if (find_tags(name, &new_num_matches, &new_matches, flags,
+ max_num_matches, buf_ffname) == OK
+ && new_num_matches < max_num_matches)
+***************
+*** 647,654 ****
+--- 676,695 ----
+ }
+ if (use_tagstack)
+ {
++ tagptrs_T tagp;
++
+ tagstack[tagstackidx].cur_match = cur_match;
+ tagstack[tagstackidx].cur_fnum = cur_fnum;
++
++ // store user-provided data originating from tagfunc
++ if (use_tfu && parse_match(matches[cur_match], &tagp) == OK
++ && tagp.user_data)
++ {
++ VIM_CLEAR(tagstack[tagstackidx].user_data);
++ tagstack[tagstackidx].user_data = vim_strnsave(
++ tagp.user_data, tagp.user_data_end - tagp.user_data);
++ }
++
+ ++tagstackidx;
+ }
+ #if defined(FEAT_QUICKFIX)
+***************
+*** 1243,1248 ****
+--- 1284,1520 ----
+ pats->regmatch.regprog = NULL;
+ }
+
++ #ifdef FEAT_EVAL
++ /*
++ * Call the user-defined function to generate a list of tags used by
++ * find_tags().
++ *
++ * Return OK if at least 1 tag has been successfully found,
++ * NOTDONE if the function returns v:null, and FAIL otherwise.
++ */
++ static int
++ find_tagfunc_tags(
++ char_u *pat, // pattern supplied to the user-defined function
++ garray_T *ga, // the tags will be placed here
++ int *match_count, // here the number of tags found will be placed
++ int flags, // flags from find_tags (TAG_*)
++ char_u *buf_ffname) // name of buffer for priority
++ {
++ pos_T save_pos;
++ list_T *taglist;
++ listitem_T *item;
++ int ntags = 0;
++ int result = FAIL;
++ typval_T args[4];
++ typval_T rettv;
++ char_u flagString[3];
++ dict_T *d;
++ taggy_T *tag = &curwin->w_tagstack[curwin->w_tagstackidx];
++
++ if (*curbuf->b_p_tfu == NUL)
++ return FAIL;
++
++ args[0].v_type = VAR_STRING;
++ args[0].vval.v_string = pat;
++ args[1].v_type = VAR_STRING;
++ args[1].vval.v_string = flagString;
++
++ // create 'info' dict argument
++ if ((d = dict_alloc_lock(VAR_FIXED)) == NULL)
++ return FAIL;
++ if (tag->user_data != NULL)
++ dict_add_string(d, "user_data", tag->user_data);
++ if (buf_ffname != NULL)
++ dict_add_string(d, "buf_ffname", buf_ffname);
++
++ ++d->dv_refcount;
++ args[2].v_type = VAR_DICT;
++ args[2].vval.v_dict = d;
++
++ args[3].v_type = VAR_UNKNOWN;
++
++ vim_snprintf((char *)flagString, sizeof(flagString),
++ "%s%s",
++ g_tag_at_cursor ? "c": "",
++ flags & TAG_INS_COMP ? "i": "");
++
++ save_pos = curwin->w_cursor;
++ result = call_vim_function(curbuf->b_p_tfu, 3, args, &rettv);
++ curwin->w_cursor = save_pos; // restore the cursor position
++ --d->dv_refcount;
++
++ if (result == FAIL)
++ return FAIL;
++ if (rettv.v_type == VAR_SPECIAL && rettv.vval.v_number == VVAL_NULL)
++ {
++ clear_tv(&rettv);
++ return NOTDONE;
++ }
++ if (rettv.v_type != VAR_LIST || !rettv.vval.v_list)
++ {
++ clear_tv(&rettv);
++ emsg(_(tfu_inv_ret_msg));
++ return FAIL;
++ }
++ taglist = rettv.vval.v_list;
++
++ for (item = taglist->lv_first; item != NULL; item = item->li_next)
++ {
++ char_u *mfp;
++ char_u *res_name, *res_fname, *res_cmd, *res_kind;
++ int len;
++ dict_iterator_T iter;
++ char_u *dict_key;
++ typval_T *tv;
++ int has_extra = 0;
++ int name_only = flags & TAG_NAMES;
++
++ if (item->li_tv.v_type != VAR_DICT)
++ {
++ emsg(_(tfu_inv_ret_msg));
++ break;
++ }
++
++ #ifdef FEAT_EMACS_TAGS
++ len = 3;
++ #else
++ len = 2;
++ #endif
++ res_name = NULL;
++ res_fname = NULL;
++ res_cmd = NULL;
++ res_kind = NULL;
++
++ dict_iterate_start(&item->li_tv, &iter);
++ while (NULL != (dict_key = dict_iterate_next(&iter, &tv)))
++ {
++ if (tv->v_type != VAR_STRING || tv->vval.v_string == NULL)
++ continue;
++
++ len += STRLEN(tv->vval.v_string) + 1; // Space for "\tVALUE"
++ if (!STRCMP(dict_key, "name"))
++ {
++ res_name = tv->vval.v_string;
++ continue;
++ }
++ if (!STRCMP(dict_key, "filename"))
++ {
++ res_fname = tv->vval.v_string;
++ continue;
++ }
++ if (!STRCMP(dict_key, "cmd"))
++ {
++ res_cmd = tv->vval.v_string;
++ continue;
++ }
++ has_extra = 1;
++ if (!STRCMP(dict_key, "kind"))
++ {
++ res_kind = tv->vval.v_string;
++ continue;
++ }
++ // Other elements will be stored as "\tKEY:VALUE"
++ // Allocate space for the key and the colon
++ len += STRLEN(dict_key) + 1;
++ }
++
++ if (has_extra)
++ len += 2; // need space for ;"
++
++ if (!res_name || !res_fname || !res_cmd)
++ {
++ emsg(_(tfu_inv_ret_msg));
++ break;
++ }
++
++ if (name_only)
++ mfp = vim_strsave(res_name);
++ else
++ mfp = (char_u *)alloc((int)sizeof(char_u) + len + 1);
++
++ if (mfp == NULL)
++ continue;
++
++ if (!name_only)
++ {
++ char_u *p = mfp;
++
++ *p++ = MT_GL_OTH + 1; // mtt
++ *p++ = TAG_SEP; // no tag file name
++ #ifdef FEAT_EMACS_TAGS
++ *p++ = TAG_SEP;
++ #endif
++
++ STRCPY(p, res_name);
++ p += STRLEN(p);
++
++ *p++ = TAB;
++ STRCPY(p, res_fname);
++ p += STRLEN(p);
++
++ *p++ = TAB;
++ STRCPY(p, res_cmd);
++ p += STRLEN(p);
++
++ if (has_extra)
++ {
++ STRCPY(p, ";\"");
++ p += STRLEN(p);
++
++ if (res_kind)
++ {
++ *p++ = TAB;
++ STRCPY(p, res_kind);
++ p += STRLEN(p);
++ }
++
++ dict_iterate_start(&item->li_tv, &iter);
++ while (NULL != (dict_key = dict_iterate_next(&iter, &tv)))
++ {
++ if (tv->v_type != VAR_STRING || tv->vval.v_string == NULL)
++ continue;
++
++ if (!STRCMP(dict_key, "name"))
++ continue;
++ if (!STRCMP(dict_key, "filename"))
++ continue;
++ if (!STRCMP(dict_key, "cmd"))
++ continue;
++ if (!STRCMP(dict_key, "kind"))
++ continue;
++
++ *p++ = TAB;
++ STRCPY(p, dict_key);
++ p += STRLEN(p);
++ STRCPY(p, ":");
++ p += STRLEN(p);
++ STRCPY(p, tv->vval.v_string);
++ p += STRLEN(p);
++ }
++ }
++ }
++
++ // Add all matches because tagfunc should do filtering.
++ if (ga_grow(ga, 1) == OK)
++ {
++ ((char_u **)(ga->ga_data))[ga->ga_len++] = mfp;
++ ++ntags;
++ result = OK;
++ }
++ else
++ {
++ vim_free(mfp);
++ break;
++ }
++ }
++
++ clear_tv(&rettv);
++
++ *match_count = ntags;
++ return result;
++ }
++ #endif
++
+ /*
+ * find_tags() - search for tags in tags files
+ *
+***************
+*** 1268,1273 ****
+--- 1540,1546 ----
+ * TAG_NOIC don't always ignore case
+ * TAG_KEEP_LANG keep language
+ * TAG_CSCOPE use cscope results for tags
++ * TAG_NO_TAGFUNC do not call the 'tagfunc' function
+ */
+ int
+ find_tags(
+***************
+*** 1385,1390 ****
+--- 1658,1666 ----
+ int use_cscope = (flags & TAG_CSCOPE);
+ #endif
+ int verbose = (flags & TAG_VERBOSE);
++ #ifdef FEAT_EVAL
++ int use_tfu = ((flags & TAG_NO_TAGFUNC) == 0);
++ #endif
+ int save_p_ic = p_ic;
+
+ /*
+***************
+*** 1480,1485 ****
+--- 1756,1773 ----
+ vim_memset(&search_info, 0, (size_t)1);
+ #endif
+
++ #ifdef FEAT_EVAL
++ if (*curbuf->b_p_tfu != NUL && use_tfu && !tfu_in_use)
++ {
++ tfu_in_use = TRUE;
++ retval = find_tagfunc_tags(pat, &ga_match[0], &match_count,
++ flags, buf_ffname);
++ tfu_in_use = FALSE;
++ if (retval != NOTDONE)
++ goto findtag_end;
++ }
++ #endif
++
+ /*
+ * When finding a specified number of matches, first try with matching
+ * case, so binary search can be used, and try ignore-case matches in a
+***************
+*** 2308,2314 ****
+ }
+ else
+ {
+- #define TAG_SEP 0x02
+ size_t tag_fname_len = STRLEN(tag_fname);
+ #ifdef FEAT_EMACS_TAGS
+ size_t ebuf_len = 0;
+--- 2596,2601 ----
+***************
+*** 2577,2584 ****
+ tag_freematch();
+
+ # if defined(FEAT_QUICKFIX)
+! if (ptag_entry.tagname)
+! VIM_CLEAR(ptag_entry.tagname);
+ # endif
+ }
+ #endif
+--- 2864,2870 ----
+ tag_freematch();
+
+ # if defined(FEAT_QUICKFIX)
+! tagstack_clear_entry(&ptag_entry);
+ # endif
+ }
+ #endif
+***************
+*** 2940,2945 ****
+--- 3226,3232 ----
+ tagp);
+
+ tagp->tagkind = NULL;
++ tagp->user_data = NULL;
+ tagp->command_end = NULL;
+
+ if (retval == OK)
+***************
+*** 2957,2973 ****
+ while (ASCII_ISALPHA(*p))
+ {
+ if (STRNCMP(p, "kind:", 5) == 0)
+- {
+ tagp->tagkind = p + 5;
+ break;
+- }
+ pc = vim_strchr(p, ':');
+ pt = vim_strchr(p, '\t');
+ if (pc == NULL || (pt != NULL && pc > pt))
+- {
+ tagp->tagkind = p;
+- break;
+- }
+ if (pt == NULL)
+ break;
+ p = pt + 1;
+--- 3244,3258 ----
+ while (ASCII_ISALPHA(*p))
+ {
+ if (STRNCMP(p, "kind:", 5) == 0)
+ tagp->tagkind = p + 5;
++ else if (STRNCMP(p, "user_data:", 10) == 0)
++ tagp->user_data = p + 10;
++ if (tagp->tagkind != NULL && tagp->user_data != NULL)
+ break;
+ pc = vim_strchr(p, ':');
+ pt = vim_strchr(p, '\t');
+ if (pc == NULL || (pt != NULL && pc > pt))
+ tagp->tagkind = p;
+ if (pt == NULL)
+ break;
+ p = pt + 1;
+***************
+*** 2980,2985 ****
+--- 3265,3277 ----
+ ;
+ tagp->tagkind_end = p;
+ }
++ if (tagp->user_data != NULL)
++ {
++ for (p = tagp->user_data;
++ *p && *p != '\t' && *p != '\r' && *p != '\n'; ++p)
++ ;
++ tagp->user_data_end = p;
++ }
+ }
+ return retval;
+ }
+***************
+*** 3547,3552 ****
+--- 3839,3854 ----
+ return FAIL;
+ }
+
++ /*
++ * Free a single entry in a tag stack
++ */
++ static void
++ tagstack_clear_entry(taggy_T *item)
++ {
++ VIM_CLEAR(item->tagname);
++ VIM_CLEAR(item->user_data);
++ }
++
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ int
+ expand_tags(
+***************
+*** 3568,3578 ****
+ tagnmflag = 0;
+ if (pat[0] == '/')
+ ret = find_tags(pat + 1, num_file, file,
+! TAG_REGEXP | tagnmflag | TAG_VERBOSE,
+ TAG_MANY, curbuf->b_ffname);
+ else
+ ret = find_tags(pat, num_file, file,
+! TAG_REGEXP | tagnmflag | TAG_VERBOSE | TAG_NOIC,
+ TAG_MANY, curbuf->b_ffname);
+ if (ret == OK && !tagnames)
+ {
+--- 3870,3880 ----
+ tagnmflag = 0;
+ if (pat[0] == '/')
+ ret = find_tags(pat + 1, num_file, file,
+! TAG_REGEXP | tagnmflag | TAG_VERBOSE | TAG_NO_TAGFUNC,
+ TAG_MANY, curbuf->b_ffname);
+ else
+ ret = find_tags(pat, num_file, file,
+! TAG_REGEXP | tagnmflag | TAG_VERBOSE | TAG_NO_TAGFUNC | TAG_NOIC,
+ TAG_MANY, curbuf->b_ffname);
+ if (ret == OK && !tagnames)
+ {
+***************
+*** 3753,3758 ****
+--- 4055,4062 ----
+ 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 (tag->user_data)
++ dict_add_string(retdict, "user_data", tag->user_data);
+
+ if ((pos = list_alloc_id(aid_tagstack_from)) == NULL)
+ return;
+***************
+*** 3805,3811 ****
+
+ // 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;
+ }
+--- 4109,4115 ----
+
+ // Free the current tag stack
+ for (i = 0; i < wp->w_tagstacklen; ++i)
+! tagstack_clear_entry(&wp->w_tagstack[i]);
+ wp->w_tagstacklen = 0;
+ wp->w_tagstackidx = 0;
+ }
+***************
+*** 3820,3826 ****
+ 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--;
+--- 4124,4130 ----
+ taggy_T *tagstack = wp->w_tagstack;
+ int i;
+
+! tagstack_clear_entry(&tagstack[0]);
+ for (i = 1; i < wp->w_tagstacklen; ++i)
+ tagstack[i - 1] = tagstack[i];
+ wp->w_tagstacklen--;
+***************
+*** 3836,3842 ****
+ 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
+--- 4140,4147 ----
+ int cur_fnum,
+ int cur_match,
+ pos_T mark,
+! int fnum,
+! char_u *user_data)
+ {
+ taggy_T *tagstack = wp->w_tagstack;
+ int idx = wp->w_tagstacklen; // top of the stack
+***************
+*** 3856,3861 ****
+--- 4161,4167 ----
+ tagstack[idx].cur_match = 0;
+ tagstack[idx].fmark.mark = mark;
+ tagstack[idx].fmark.fnum = fnum;
++ tagstack[idx].user_data = user_data;
+ }
+
+ /*
+***************
+*** 3892,3898 ****
+ tagstack_push_item(wp, tagname,
+ (int)dict_get_number(itemdict, (char_u *)"bufnr"),
+ (int)dict_get_number(itemdict, (char_u *)"matchnr") - 1,
+! mark, fnum);
+ }
+ }
+
+--- 4198,4205 ----
+ tagstack_push_item(wp, tagname,
+ (int)dict_get_number(itemdict, (char_u *)"bufnr"),
+ (int)dict_get_number(itemdict, (char_u *)"matchnr") - 1,
+! mark, fnum,
+! dict_get_string(itemdict, (char_u *)"user_data", TRUE));
+ }
+ }
+
+***************
+*** 3920,3925 ****
+--- 4227,4241 ----
+ dictitem_T *di;
+ list_T *l;
+
++ #ifdef FEAT_EVAL
++ // not allowed to alter the tag stack entries from inside tagfunc
++ if (tfu_in_use)
++ {
++ emsg(_(recurmsg));
++ return FAIL;
++ }
++ #endif
++
+ if ((di = dict_find(d, (char_u *)"items", -1)) != NULL)
+ {
+ if (di->di_tv.v_type != VAR_LIST)
+*** ../vim-8.1.1227/src/testdir/Make_all.mak 2019-04-27 18:00:29.851064563 +0200
+--- src/testdir/Make_all.mak 2019-04-28 16:47:48.260732097 +0200
+***************
+*** 244,249 ****
+--- 244,250 ----
+ test_tabline \
+ test_tabpage \
+ test_tagcase \
++ test_tagfunc \
+ test_tagjump \
+ test_taglist \
+ test_tcl \
+*** ../vim-8.1.1227/src/testdir/test_alot.vim 2019-03-02 06:41:34.345330494 +0100
+--- src/testdir/test_alot.vim 2019-04-28 16:47:48.260732097 +0200
+***************
+*** 60,65 ****
+--- 60,66 ----
+ source test_tabline.vim
+ source test_tabpage.vim
+ source test_tagcase.vim
++ source test_tagfunc.vim
+ source test_tagjump.vim
+ source test_taglist.vim
+ source test_timers.vim
+*** ../vim-8.1.1227/src/testdir/test_tagfunc.vim 2019-04-28 18:02:57.627069396 +0200
+--- src/testdir/test_tagfunc.vim 2019-04-28 17:48:10.655362588 +0200
+***************
+*** 0 ****
+--- 1,84 ----
++ " Test 'tagfunc'
++
++ func TagFunc(pat, flag, info)
++ let g:tagfunc_args = [a:pat, a:flag, a:info]
++ let tags = []
++ for num in range(1,10)
++ let tags += [{
++ \ 'cmd': '2', 'name': 'nothing'.num, 'kind': 'm',
++ \ 'filename': 'Xfile1', 'user_data': 'somedata'.num,
++ \}]
++ endfor
++ return tags
++ endfunc
++
++ func Test_tagfunc()
++ set tagfunc=TagFunc
++ new Xfile1
++ call setline(1, ['empty', 'one()', 'empty'])
++ write
++
++ call assert_equal({'cmd': '2', 'static': 0,
++ \ 'name': 'nothing2', 'user_data': 'somedata2',
++ \ 'kind': 'm', 'filename': 'Xfile1'}, taglist('.')[1])
++
++ call settagstack(win_getid(), {'items': []})
++
++ tag arbitrary
++ call assert_equal('arbitrary', g:tagfunc_args[0])
++ call assert_equal('', g:tagfunc_args[1])
++ call assert_equal('somedata1', gettagstack().items[0].user_data)
++ 5tag arbitrary
++ call assert_equal('arbitrary', g:tagfunc_args[0])
++ call assert_equal('', g:tagfunc_args[1])
++ call assert_equal('somedata5', gettagstack().items[1].user_data)
++ pop
++ tag
++ call assert_equal('arbitrary', g:tagfunc_args[0])
++ call assert_equal('', g:tagfunc_args[1])
++ call assert_equal('somedata5', gettagstack().items[1].user_data)
++
++ let g:tagfunc_args=[]
++ execute "normal! \<c-]>"
++ call assert_equal('one', g:tagfunc_args[0])
++ call assert_equal('c', g:tagfunc_args[1])
++
++ set cpt=t
++ let g:tagfunc_args=[]
++ execute "normal! i\<c-n>\<c-y>"
++ call assert_equal('ci', g:tagfunc_args[1])
++ call assert_equal('nothing1', getline('.')[0:7])
++
++ func BadTagFunc1(...)
++ return 0
++ endfunc
++ func BadTagFunc2(...)
++ return [1]
++ endfunc
++ func BadTagFunc3(...)
++ return [{'name': 'foo'}]
++ endfunc
++
++ for &tagfunc in ['BadTagFunc1', 'BadTagFunc2', 'BadTagFunc3']
++ try
++ tag nothing
++ call assert_false(1, 'tag command should have failed')
++ catch
++ call assert_exception('E987:')
++ endtry
++ exe 'delf' &tagfunc
++ endfor
++
++ func NullTagFunc(...)
++ return v:null
++ endfunc
++ set tags= tfu=NullTagFunc
++ call assert_fails('tag nothing', 'E426')
++ delf NullTagFunc
++
++ bwipe!
++ set tags& tfu& cpt&
++ call delete('Xfile1')
++ endfunc
++
++ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.1227/src/vim.h 2019-04-08 18:15:36.472223190 +0200
+--- src/vim.h 2019-04-28 17:18:43.131769441 +0200
+***************
+*** 1133,1151 ****
+ /*
+ * flags for find_tags().
+ */
+! #define TAG_HELP 1 /* only search for help tags */
+! #define TAG_NAMES 2 /* only return name of tag */
+! #define TAG_REGEXP 4 /* use tag pattern as regexp */
+! #define TAG_NOIC 8 /* don't always ignore case */
+ #ifdef FEAT_CSCOPE
+! # define TAG_CSCOPE 16 /* cscope tag */
+ #endif
+! #define TAG_VERBOSE 32 /* message verbosity */
+! #define TAG_INS_COMP 64 /* Currently doing insert completion */
+! #define TAG_KEEP_LANG 128 /* keep current language */
+
+! #define TAG_MANY 300 /* When finding many tags (for completion),
+! find up to this many tags */
+
+ /*
+ * Types of dialogs passed to do_vim_dialog().
+--- 1133,1152 ----
+ /*
+ * flags for find_tags().
+ */
+! #define TAG_HELP 1 // only search for help tags
+! #define TAG_NAMES 2 // only return name of tag
+! #define TAG_REGEXP 4 // use tag pattern as regexp
+! #define TAG_NOIC 8 // don't always ignore case
+ #ifdef FEAT_CSCOPE
+! # define TAG_CSCOPE 16 // cscope tag
+ #endif
+! #define TAG_VERBOSE 32 // message verbosity
+! #define TAG_INS_COMP 64 // Currently doing insert completion
+! #define TAG_KEEP_LANG 128 // keep current language
+! #define TAG_NO_TAGFUNC 256 // do not use 'tagfunc'
+
+! #define TAG_MANY 300 // When finding many tags (for completion),
+! // find up to this many tags
+
+ /*
+ * Types of dialogs passed to do_vim_dialog().
+*** ../vim-8.1.1227/src/window.c 2019-04-27 20:36:52.534303564 +0200
+--- src/window.c 2019-04-28 16:47:48.260732097 +0200
+***************
+*** 1326,1335 ****
+ /* copy tagstack and folds */
+ for (i = 0; i < oldp->w_tagstacklen; i++)
+ {
+! newp->w_tagstack[i] = oldp->w_tagstack[i];
+! if (newp->w_tagstack[i].tagname != NULL)
+! newp->w_tagstack[i].tagname =
+! vim_strsave(newp->w_tagstack[i].tagname);
+ }
+ newp->w_tagstackidx = oldp->w_tagstackidx;
+ newp->w_tagstacklen = oldp->w_tagstacklen;
+--- 1326,1337 ----
+ /* copy tagstack and folds */
+ for (i = 0; i < oldp->w_tagstacklen; i++)
+ {
+! taggy_T *tag = &newp->w_tagstack[i];
+! *tag = oldp->w_tagstack[i];
+! if (tag->tagname != NULL)
+! tag->tagname = vim_strsave(tag->tagname);
+! if (tag->user_data != NULL)
+! tag->user_data = vim_strsave(tag->user_data);
+ }
+ newp->w_tagstackidx = oldp->w_tagstackidx;
+ newp->w_tagstacklen = oldp->w_tagstacklen;
+*** ../vim-8.1.1227/src/version.c 2019-04-28 16:08:26.813234002 +0200
+--- src/version.c 2019-04-28 18:03:04.703034923 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1228,
+ /**/
+
+--
+Courtroom Quote #19:
+Q: Doctor, how many autopsies have you performed on dead people?
+A: All my autopsies have been performed on dead people.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1229 b/data/vim/patches/8.1.1229
new file mode 100644
index 000000000..f096517c2
--- /dev/null
+++ b/data/vim/patches/8.1.1229
@@ -0,0 +1,49 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1229
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1229
+Problem: Warning for posix_openpt() not declared. (Tony Mechelynck)
+Solution: Add declaration.
+Files: src/pty.c
+
+
+*** ../vim-8.1.1228/src/pty.c 2019-04-28 14:59:55.845503790 +0200
+--- src/pty.c 2019-04-28 17:53:07.209936126 +0200
+***************
+*** 141,146 ****
+--- 141,147 ----
+ char *ptsname(int);
+ int unlockpt(int);
+ int grantpt(int);
++ int posix_openpt(int flags);
+ #endif
+
+ static void
+*** ../vim-8.1.1228/src/version.c 2019-04-28 18:04:56.062492159 +0200
+--- src/version.c 2019-04-28 18:38:57.928152107 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1229,
+ /**/
+
+--
+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.1230 b/data/vim/patches/8.1.1230
new file mode 100644
index 000000000..cf5780776
--- /dev/null
+++ b/data/vim/patches/8.1.1230
@@ -0,0 +1,5087 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1230
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1230
+Problem: A lot of code is shared between vim.exe and gvim.exe.
+Solution: Optionally put the shared code in vim.dll. (Ken Takata,
+ closes #4287)
+Files: Filelist, nsis/gvim.nsi, runtime/doc/gui_w32.txt,
+ src/Make_cyg_ming.mak, src/Make_mvc.mak, src/channel.c,
+ src/evalfunc.c, src/ex_cmds.c, src/ex_docmd.c, src/feature.h,
+ src/fileio.c, src/getchar.c, src/globals.h, src/gui.c, src/gui.h,
+ src/gui_gtk_x11.c, src/gui_w32.c, src/if_mzsch.c, src/main.c,
+ src/mbyte.c, src/memline.c, src/message.c, src/misc2.c,
+ src/normal.c, src/option.c, src/os_mswin.c, src/os_w32dll.c,
+ src/os_w32exe.c, src/os_win32.c, src/os_win32.h,
+ src/proto/gui.pro, src/proto/gui_w32.pro, src/proto/misc2.pro,
+ src/proto/os_mswin.pro, src/proto/os_win32.pro, src/syntax.c,
+ src/term.c, src/terminal.c, src/ui.c, src/version.c, src/vim.rc
+
+
+*** ../vim-8.1.1229/Filelist 2019-04-27 13:03:20.000715982 +0200
+--- Filelist 2019-04-28 18:55:14.804080057 +0200
+***************
+*** 454,459 ****
+--- 454,460 ----
+ src/iscygpty.h \
+ src/iid_ole.c \
+ src/os_dos.h \
++ src/os_w32dll.c \
+ src/os_w32exe.c \
+ src/os_win32.c \
+ src/os_mswin.c \
+*** ../vim-8.1.1229/nsis/gvim.nsi 2019-04-12 21:29:30.213641315 +0200
+--- nsis/gvim.nsi 2019-04-28 18:55:14.804080057 +0200
+***************
+*** 322,327 ****
+--- 322,330 ----
+
+ SetOutPath $0
+ File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe
++ !if /FileExists "${VIMSRC}\vim${BIT}.dll"
++ File ${VIMSRC}\vim${BIT}.dll
++ !endif
+ File /oname=install.exe ${VIMSRC}\installw32.exe
+ File /oname=uninstal.exe ${VIMSRC}\uninstalw32.exe
+ File ${VIMSRC}\vimrun.exe
+*** ../vim-8.1.1229/runtime/doc/gui_w32.txt 2018-05-17 13:41:40.000000000 +0200
+--- runtime/doc/gui_w32.txt 2019-04-28 19:12:44.911186981 +0200
+***************
+*** 31,36 ****
+--- 31,47 ----
+ return with a command prompt after starting gvim. If not, you should use the
+ "start" command: >
+ start gvim [options] file ..
++ < *E988*
++ The console version with the |-g| option may also start the GUI by executing
++ gvim.exe: >
++ vim -g [options] file ..
++ To make this work, gvim.exe must exist in the same directory as the vim.exe,
++ and this feature must be enabled at compile time.
++
++ One may also use `:gui` from the console version. However, this is an
++ experimental feature and this feature must be enabled at compile time.
++ It uses a session file to recreate the current state of the console Vim in the
++ GUI Vim.
+
+ Note: All fonts (bold, italic) must be of the same size!!! If you don't do
+ this, text will disappear or mess up the display. Vim does not check the font
+***************
+*** 442,448 ****
+
+ XPM support *w32-xpm-support*
+
+! Gvim can be build on MS-Windows with support for XPM files. |+xpm_w32|
+ See the Make_mvc.mak file for instructions, search for XPM.
+
+ To try out if XPM support works do this: >
+--- 453,459 ----
+
+ XPM support *w32-xpm-support*
+
+! GVim can be build on MS-Windows with support for XPM files. |+xpm_w32|
+ See the Make_mvc.mak file for instructions, search for XPM.
+
+ To try out if XPM support works do this: >
+*** ../vim-8.1.1229/src/Make_cyg_ming.mak 2019-04-27 13:03:20.000715982 +0200
+--- src/Make_cyg_ming.mak 2019-04-28 18:55:14.804080057 +0200
+***************
+*** 36,42 ****
+ 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
+--- 36,42 ----
+ 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
+***************
+*** 44,49 ****
+--- 44,54 ----
+ # set to yes to make gvim, no for vim
+ GUI=yes
+
++ # set to yes to enable the DLL support (EXPERIMENTAL).
++ # Creates vim{32,64}.dll, and stub gvim.exe and vim.exe.
++ # "GUI" should be also set to "yes".
++ #VIMDLL=yes
++
+ # set to no if you do not want to use DirectWrite (DirectX)
+ # MinGW-w64 is needed, and ARCH should be set to i686 or x86-64.
+ DIRECTX=yes
+***************
+*** 687,693 ****
+ CFLAGS += -O2
+ endif
+ endif
+! CFLAGS += -s
+ endif
+
+ LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion
+--- 692,698 ----
+ CFLAGS += -O2
+ endif
+ endif
+! LFLAGS += -s
+ endif
+
+ LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion
+***************
+*** 739,745 ****
+ $(OUTDIR)/ops.o \
+ $(OUTDIR)/option.o \
+ $(OUTDIR)/os_mswin.o \
+- $(OUTDIR)/os_w32exe.o \
+ $(OUTDIR)/os_win32.o \
+ $(OUTDIR)/pathdef.o \
+ $(OUTDIR)/popupmnu.o \
+--- 744,749 ----
+***************
+*** 760,769 ****
+ $(OUTDIR)/usercmd.o \
+ $(OUTDIR)/userfunc.o \
+ $(OUTDIR)/version.o \
+- $(OUTDIR)/vimrc.o \
+ $(OUTDIR)/winclip.o \
+ $(OUTDIR)/window.o
+
+ ifdef PERL
+ OBJ += $(OUTDIR)/if_perl.o
+ endif
+--- 764,780 ----
+ $(OUTDIR)/usercmd.o \
+ $(OUTDIR)/userfunc.o \
+ $(OUTDIR)/version.o \
+ $(OUTDIR)/winclip.o \
+ $(OUTDIR)/window.o
+
++ ifeq ($(VIMDLL),yes)
++ OBJ += $(OUTDIR)/os_w32dll.o $(OUTDIR)/vimrcd.o
++ EXEOBJC = $(OUTDIR)/os_w32exec.o $(OUTDIR)/vimrcc.o
++ EXEOBJG = $(OUTDIR)/os_w32exeg.o $(OUTDIR)/vimrcg.o
++ else
++ OBJ += $(OUTDIR)/os_w32exe.o $(OUTDIR)/vimrc.o
++ endif
++
+ ifdef PERL
+ OBJ += $(OUTDIR)/if_perl.o
+ endif
+***************
+*** 870,885 ****
+
+ LFLAGS += -municode
+
+! ifeq ($(GUI),yes)
+ TARGET := gvim$(DEBUG_SUFFIX).exe
+ DEFINES += $(DEF_GUI)
+ OBJ += $(GUIOBJ)
+ LFLAGS += -mwindows
+ OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
+ else
+ OBJ += $(CUIOBJ)
+ TARGET := vim$(DEBUG_SUFFIX).exe
+ OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
+ endif
+
+ ifdef GETTEXT
+--- 881,916 ----
+
+ LFLAGS += -municode
+
+! ifeq ($(VIMDLL),yes)
+! VIMEXE := vim$(DEBUG_SUFFIX).exe
+! GVIMEXE := gvim$(DEBUG_SUFFIX).exe
+! ifeq ($(ARCH),x86-64)
+! VIMDLLBASE := vim64$(DEBUG_SUFFIX)
+! else
+! VIMDLLBASE := vim32$(DEBUG_SUFFIX)
+! endif
+! TARGET = $(VIMDLLBASE).dll
+! LFLAGS += -shared
+! EXELFLAGS += -municode
+! ifneq ($(DEBUG),yes)
+! EXELFLAGS += -s
+! endif
+! DEFINES += $(DEF_GUI) -DVIMDLL
+! OBJ += $(GUIOBJ) $(CUIOBJ)
+! OUTDIR = dobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
+! MAIN_TARGET = $(GVIMEXE) $(VIMEXE) $(VIMDLLBASE).dll
+! else ifeq ($(GUI),yes)
+ TARGET := gvim$(DEBUG_SUFFIX).exe
+ DEFINES += $(DEF_GUI)
+ OBJ += $(GUIOBJ)
+ LFLAGS += -mwindows
+ OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
++ MAIN_TARGET = $(TARGET)
+ else
+ OBJ += $(CUIOBJ)
+ TARGET := vim$(DEBUG_SUFFIX).exe
+ OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
++ MAIN_TARGET = $(TARGET)
+ endif
+
+ ifdef GETTEXT
+***************
+*** 955,961 ****
+ 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)
+--- 986,992 ----
+ LFLAGS += -Wl,-Map=$(TARGET).map
+ endif
+
+! all: $(MAIN_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)
+***************
+*** 966,973 ****
+--- 997,1015 ----
+ uninstal.exe: uninstal.c
+ $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
+
++ ifeq ($(VIMDLL),yes)
++ $(TARGET): $(OUTDIR) $(OBJ)
++ $(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid -lgdi32 $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
++
++ $(GVIMEXE): $(OUTDIR) $(EXEOBJG) $(VIMDLLBASE).dll
++ $(CC) -L. $(EXELFLAGS) -mwindows -o $@ $(EXEOBJG) -l$(VIMDLLBASE)
++
++ $(VIMEXE): $(OUTDIR) $(EXEOBJC) $(VIMDLLBASE).dll
++ $(CC) -L. $(EXELFLAGS) -o $@ $(EXEOBJC) -l$(VIMDLLBASE)
++ else
+ $(TARGET): $(OUTDIR) $(OBJ)
+ $(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
++ endif
+
+ upx: exes
+ upx gvim.exe
+***************
+*** 996,1002 ****
+ -$(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
+--- 1038,1044 ----
+ -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
+ -$(DEL) $(OUTDIR)$(DIRSLASH)*.res
+ -rmdir $(OUTDIR)
+! -$(DEL) $(MAIN_TARGET) vimrun.exe install.exe uninstal.exe
+ -$(DEL) pathdef.c
+ ifdef PERL
+ -$(DEL) if_perl.c
+***************
+*** 1025,1098 ****
+ $(OUTDIR)/%.o : %.c $(INCL)
+ $(CC) -c $(CFLAGS) $< -o $@
+
+! $(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h
+ $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) \
+ --input-format=rc --output-format=coff -i vim.rc -o $@
+
+ $(OUTDIR):
+ $(MKDIR) $(OUTDIR)
+
+ $(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h
+! $(CC) -c $(CFLAGS) $(CXXFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o
+
+ $(OUTDIR)/gui.o: gui.c $(INCL) $(GUI_INCL)
+! $(CC) -c $(CFLAGS) gui.c -o $(OUTDIR)/gui.o
+
+ $(OUTDIR)/beval.o: beval.c $(INCL) $(GUI_INCL)
+! $(CC) -c $(CFLAGS) beval.c -o $(OUTDIR)/beval.o
+
+ $(OUTDIR)/gui_beval.o: gui_beval.c $(INCL) $(GUI_INCL)
+! $(CC) -c $(CFLAGS) gui_beval.c -o $(OUTDIR)/gui_beval.o
+
+ $(OUTDIR)/gui_w32.o: gui_w32.c $(INCL) $(GUI_INCL)
+! $(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
+
+ $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
+! $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
+
+ $(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) $(MZSCHEME_INCL) $(MZ_EXTRA_DEP)
+! $(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o
+
+ mzscheme_base.c:
+ $(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
+
+ # Remove -D__IID_DEFINED__ for newer versions of the w32api
+ $(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
+ endif
+
+ $(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL)
+ $(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -U_WIN32_WINNT -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
+
+ $(OUTDIR)/main.o: main.c $(INCL) $(CUI_INCL)
+! $(CC) -c $(CFLAGS) main.c -o $(OUTDIR)/main.o
+
+ $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
+! $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
+
+ $(OUTDIR)/os_win32.o: os_win32.c $(INCL) $(MZSCHEME_INCL)
+! $(CC) -c $(CFLAGS) os_win32.c -o $(OUTDIR)/os_win32.o
+
+ $(OUTDIR)/regexp.o: regexp.c regexp_nfa.c $(INCL)
+! $(CC) -c $(CFLAGS) regexp.c -o $(OUTDIR)/regexp.o
+
+ $(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="" \
+--- 1067,1161 ----
+ $(OUTDIR)/%.o : %.c $(INCL)
+ $(CC) -c $(CFLAGS) $< -o $@
+
+! ifeq ($(VIMDLL),yes)
+! $(OUTDIR)/vimrcc.o: vim.rc gvim.exe.mnf version.h gui_w32_rc.h vim.ico
+! $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) -UFEAT_GUI_MSWIN \
+! --input-format=rc --output-format=coff -i vim.rc -o $@
+!
+! $(OUTDIR)/vimrcg.o: vim.rc gvim.exe.mnf version.h gui_w32_rc.h vim.ico
+! $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) \
+! --input-format=rc --output-format=coff -i vim.rc -o $@
+!
+! $(OUTDIR)/vimrcd.o: vim.rc version.h gui_w32_rc.h \
+! tools.bmp tearoff.bmp vim.ico vim_error.ico \
+! vim_alert.ico vim_info.ico vim_quest.ico
+! $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) -DRCDLL -DVIMDLLBASE=\\\"$(VIMDLLBASE)\\\" \
+! --input-format=rc --output-format=coff -i vim.rc -o $@
+! else
+! $(OUTDIR)/vimrc.o: vim.rc gvim.exe.mnf version.h gui_w32_rc.h \
+! tools.bmp tearoff.bmp vim.ico vim_error.ico \
+! vim_alert.ico vim_info.ico vim_quest.ico
+ $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) \
+ --input-format=rc --output-format=coff -i vim.rc -o $@
++ endif
+
+ $(OUTDIR):
+ $(MKDIR) $(OUTDIR)
+
+ $(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h
+! $(CC) -c $(CFLAGS) $(CXXFLAGS) gui_dwrite.cpp -o $@
+
+ $(OUTDIR)/gui.o: gui.c $(INCL) $(GUI_INCL)
+! $(CC) -c $(CFLAGS) gui.c -o $@
+
+ $(OUTDIR)/beval.o: beval.c $(INCL) $(GUI_INCL)
+! $(CC) -c $(CFLAGS) beval.c -o $@
+
+ $(OUTDIR)/gui_beval.o: gui_beval.c $(INCL) $(GUI_INCL)
+! $(CC) -c $(CFLAGS) gui_beval.c -o $@
+
+ $(OUTDIR)/gui_w32.o: gui_w32.c $(INCL) $(GUI_INCL)
+! $(CC) -c $(CFLAGS) gui_w32.c -o $@
+
+ $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
+! $(CC) -c $(CFLAGS) if_cscope.c -o $@
+
+ $(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) $(MZSCHEME_INCL) $(MZ_EXTRA_DEP)
+! $(CC) -c $(CFLAGS) if_mzsch.c -o $@
+
+ mzscheme_base.c:
+ $(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
+
+ # Remove -D__IID_DEFINED__ for newer versions of the w32api
+ $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) if_ole.h
+! $(CC) -c $(CFLAGS) $(CXXFLAGS) if_ole.cpp -o $@
+
+ 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_ruby.o: if_ruby.c $(INCL)
+ ifeq (16, $(RUBY))
+! $(CC) $(CFLAGS) -U_WIN32 -c -o $@ if_ruby.c
+ endif
+
+ $(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL)
+ $(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -U_WIN32_WINNT -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
+
+ $(OUTDIR)/main.o: main.c $(INCL) $(CUI_INCL)
+! $(CC) -c $(CFLAGS) main.c -o $@
+
+ $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
+! $(CC) -c $(CFLAGS) netbeans.c -o $@
+!
+! $(OUTDIR)/os_w32exec.o: os_w32exe.c $(INCL)
+! $(CC) -c $(CFLAGS) -UFEAT_GUI_MSWIN os_w32exe.c -o $@
+!
+! $(OUTDIR)/os_w32exeg.o: os_w32exe.c $(INCL)
+! $(CC) -c $(CFLAGS) os_w32exe.c -o $@
+
+ $(OUTDIR)/os_win32.o: os_win32.c $(INCL) $(MZSCHEME_INCL)
+! $(CC) -c $(CFLAGS) os_win32.c -o $@
+
+ $(OUTDIR)/regexp.o: regexp.c regexp_nfa.c $(INCL)
+! $(CC) -c $(CFLAGS) regexp.c -o $@
+
+ $(OUTDIR)/terminal.o: terminal.c $(INCL) $(TERM_DEPS)
+! $(CC) -c $(CFLAGS) terminal.c -o $@
+
+
+ CCCTERM = $(CC) -c $(CFLAGS) -Ilibvterm/include -DINLINE="" \
+***************
+*** 1100,1149 ****
+ -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)
+! $(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))
+--- 1163,1175 ----
+ -DIS_COMBINING_FUNCTION=utf_iscomposing_uint \
+ -DWCWIDTH_FUNCTION=utf_uint2cells
+
+! $(OUTDIR)/%.o : libvterm/src/%.c $(TERM_DEPS)
+! $(CCCTERM) $< -o $@
+
+
+! $(OUTDIR)/%.o : xdiff/%.c $(XDIFF_DEPS)
+! $(CC) -c $(CFLAGS) $< -o $@
+
+
+ pathdef.c: $(INCL)
+ ifneq (sh.exe, $(SHELL))
+*** ../vim-8.1.1229/src/Make_mvc.mak 2019-04-27 13:03:20.000715982 +0200
+--- src/Make_mvc.mak 2019-04-28 18:55:14.804080057 +0200
+***************
+*** 40,45 ****
+--- 40,51 ----
+ #
+ # Terminal support: TERMINAL=yes (default is yes)
+ #
++ # DLL support (EXPERIMENTAL): VIMDLL=yes (default is no)
++ # Creates vim{32,64}.dll, and stub gvim.exe and vim.exe.
++ # The shared codes between the GUI and the console are built into
++ # the DLL. This reduces the total file size and memory usage.
++ # Also supports `vim -g` and the `:gui` command.
++ #
+ # Lua interface:
+ # LUA=[Path to Lua directory]
+ # DYNAMIC_LUA=yes (to load the Lua DLL dynamically)
+***************
+*** 178,183 ****
+--- 184,193 ----
+
+ TARGETOS = WINNT
+
++ !if "$(VIMDLL)" == "yes"
++ GUI = yes
++ !endif
++
+ !ifndef DIRECTX
+ DIRECTX = $(GUI)
+ !endif
+***************
+*** 185,191 ****
+ # Select one of eight object code directories, depends on GUI, OLE, DEBUG and
+ # interfaces.
+ # If you change something else, do "make clean" first!
+! !if "$(GUI)" == "yes"
+ OBJDIR = .\ObjG
+ !else
+ OBJDIR = .\ObjC
+--- 195,203 ----
+ # Select one of eight object code directories, depends on GUI, OLE, DEBUG and
+ # interfaces.
+ # If you change something else, do "make clean" first!
+! !if "$(VIMDLL)" == "yes"
+! OBJDIR = .\ObjD
+! !elseif "$(GUI)" == "yes"
+ OBJDIR = .\ObjG
+ !else
+ OBJDIR = .\ObjC
+***************
+*** 410,416 ****
+ !endif
+ !endif
+
+! # GUI sepcific features.
+ !if "$(GUI)" == "yes"
+ # Only allow NETBEANS for a GUI build and CHANNEL.
+ !if "$(NETBEANS)" == "yes" && "$(CHANNEL)" == "yes"
+--- 422,428 ----
+ !endif
+ !endif
+
+! # GUI specific features.
+ !if "$(GUI)" == "yes"
+ # Only allow NETBEANS for a GUI build and CHANNEL.
+ !if "$(NETBEANS)" == "yes" && "$(CHANNEL)" == "yes"
+***************
+*** 461,467 ****
+ XPM_OBJ = $(OBJDIR)/xpm_w32.obj
+ XPM_DEFS = -DFEAT_XPM_W32
+ !if $(MSVC_MAJOR) >= 14
+! # VC14 cannot use a library built by VC12 or eariler, because VC14 uses
+ # Universal CRT.
+ XPM_LIB = $(XPM)\lib-vc14\libXpm.lib
+ !else
+--- 473,479 ----
+ XPM_OBJ = $(OBJDIR)/xpm_w32.obj
+ XPM_DEFS = -DFEAT_XPM_W32
+ !if $(MSVC_MAJOR) >= 14
+! # VC14 cannot use a library built by VC12 or earlier, because VC14 uses
+ # Universal CRT.
+ XPM_LIB = $(XPM)\lib-vc14\libXpm.lib
+ !else
+***************
+*** 566,572 ****
+ # VC<11 generates fp87 code by default
+ ! if $(MSVC_MAJOR) < 11
+ CPUARG =
+! # VC>=11 needs explicit insturctions to generate fp87 code
+ ! else
+ CPUARG = /arch:IA32
+ ! endif
+--- 578,584 ----
+ # VC<11 generates fp87 code by default
+ ! if $(MSVC_MAJOR) < 11
+ CPUARG =
+! # VC>=11 needs explicit instructions to generate fp87 code
+ ! else
+ CPUARG = /arch:IA32
+ ! endif
+***************
+*** 612,617 ****
+--- 624,640 ----
+ # Pass CPUARG to GvimExt, to avoid using version-dependent defaults
+ MAKEFLAGS_GVIMEXT = $(MAKEFLAGS_GVIMEXT) CPUARG="$(CPUARG)"
+
++ !if "$(VIMDLL)" == "yes"
++ VIMDLLBASE = vim
++ ! if "$(ASSEMBLY_ARCHITECTURE)" == "i386"
++ VIMDLLBASE = $(VIMDLLBASE)32
++ ! else
++ VIMDLLBASE = $(VIMDLLBASE)64
++ ! endif
++ ! if "$(DEBUG)" == "yes"
++ VIMDLLBASE = $(VIMDLLBASE)d
++ ! endif
++ !endif
+
+ LIBC =
+ DEBUGINFO = /Zi
+***************
+*** 747,753 ****
+ $(OUTDIR)\ops.obj \
+ $(OUTDIR)\option.obj \
+ $(OUTDIR)\os_mswin.obj \
+- $(OUTDIR)\os_w32exe.obj \
+ $(OUTDIR)\os_win32.obj \
+ $(OUTDIR)\pathdef.obj \
+ $(OUTDIR)\popupmnu.obj \
+--- 770,775 ----
+***************
+*** 769,775 ****
+ $(OUTDIR)\userfunc.obj \
+ $(OUTDIR)\winclip.obj \
+ $(OUTDIR)\window.obj \
+! $(OUTDIR)\vim.res
+
+ !if "$(OLE)" == "yes"
+ CFLAGS = $(CFLAGS) -DFEAT_OLE
+--- 791,805 ----
+ $(OUTDIR)\userfunc.obj \
+ $(OUTDIR)\winclip.obj \
+ $(OUTDIR)\window.obj \
+!
+! !if "$(VIMDLL)" == "yes"
+! OBJ = $(OBJ) $(OUTDIR)\os_w32dll.obj $(OUTDIR)\vimd.res
+! EXEOBJC = $(OUTDIR)\os_w32exec.obj $(OUTDIR)\vimc.res
+! EXEOBJG = $(OUTDIR)\os_w32exeg.obj $(OUTDIR)\vimg.res
+! CFLAGS = $(CFLAGS) -DVIMDLL
+! !else
+! OBJ = $(OBJ) $(OUTDIR)\os_w32exe.obj $(OUTDIR)\vim.res
+! !endif
+
+ !if "$(OLE)" == "yes"
+ CFLAGS = $(CFLAGS) -DFEAT_OLE
+***************
+*** 800,806 ****
+--- 830,844 ----
+ SUBSYSTEM = windows
+ CFLAGS = $(CFLAGS) -DFEAT_GUI_MSWIN
+ RCFLAGS = $(RCFLAGS) -DFEAT_GUI_MSWIN
++ ! if "$(VIMDLL)" == "yes"
++ SUBSYSTEM_CON = console
++ GVIM = g$(VIM)
++ CUI_INCL = iscygpty.h
++ CUI_OBJ = $(OUTDIR)\iscygpty.obj
++ RCFLAGS = $(RCFLAGS) -DVIMDLL
++ ! else
+ VIM = g$(VIM)
++ ! endif
+ GUI_INCL = \
+ gui.h
+ GUI_OBJ = \
+***************
+*** 839,844 ****
+--- 877,885 ----
+ !if "$(SUBSYSTEM_VER)" != ""
+ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
+ SUBSYSTEM_TOOLS = $(SUBSYSTEM_TOOLS),$(SUBSYSTEM_VER)
++ ! if "$(VIMDLL)" != "yes"
++ SUBSYSTEM_CON = $(SUBSYSTEM_CON),$(SUBSYSTEM_VER)
++ ! endif
+ # Pass SUBSYSTEM_VER to GvimExt and other tools
+ MAKEFLAGS_GVIMEXT = $(MAKEFLAGS_GVIMEXT) SUBSYSTEM_VER=$(SUBSYSTEM_VER)
+ MAKEFLAGS_TOOLS = $(MAKEFLAGS_TOOLS) SUBSYSTEM_VER=$(SUBSYSTEM_VER)
+***************
+*** 1174,1180 ****
+--- 1215,1225 ----
+ # debug more conveniently (able to look at variables which are in registers)
+ #
+ CFLAGS = $(CFLAGS) /Fd$(OUTDIR)/ $(DEBUGINFO)
++ !if "$(VIMDLL)" == "yes"
++ LINK_PDB = /PDB:$(VIMDLLBASE).pdb -debug
++ !else
+ LINK_PDB = /PDB:$(VIM).pdb -debug
++ !endif
+
+ #
+ # End extra feature include
+***************
+*** 1186,1192 ****
+
+ # Add /opt:ref to remove unreferenced functions and data even when /DEBUG is
+ # added.
+! conflags = /nologo /subsystem:$(SUBSYSTEM) /opt:ref
+
+ PATHDEF_SRC = $(OUTDIR)\pathdef.c
+
+--- 1231,1237 ----
+
+ # Add /opt:ref to remove unreferenced functions and data even when /DEBUG is
+ # added.
+! conflags = /nologo /opt:ref
+
+ PATHDEF_SRC = $(OUTDIR)\pathdef.c
+
+***************
+*** 1219,1225 ****
+ LINKARGS1 = $(LINKARGS1) /HIGHENTROPYVA:NO
+ !endif
+
+! all: $(VIM).exe \
+ vimrun.exe \
+ install.exe \
+ uninstal.exe \
+--- 1264,1276 ----
+ LINKARGS1 = $(LINKARGS1) /HIGHENTROPYVA:NO
+ !endif
+
+! !if "$(VIMDLL)" == "yes"
+! MAIN_TARGET = $(GVIM).exe $(VIM).exe $(VIMDLLBASE).dll
+! !else
+! MAIN_TARGET = $(VIM).exe
+! !endif
+!
+! all: $(MAIN_TARGET) \
+ vimrun.exe \
+ install.exe \
+ uninstal.exe \
+***************
+*** 1227,1243 ****
+ 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)
+ if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1
+
+ $(VIM): $(VIM).exe
+
+ $(OUTDIR):
+--- 1278,1318 ----
+ tee/tee.exe \
+ GvimExt/gvimext.dll
+
++ !if "$(VIMDLL)" == "yes"
++
++ $(VIMDLLBASE).dll: $(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) /dll -out:$(VIMDLLBASE).dll $(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)
++
++ $(GVIM).exe: $(OUTDIR) $(EXEOBJG) $(VIMDLLBASE).dll
++ $(link) $(LINKARGS1) /subsystem:$(SUBSYSTEM) -out:$(GVIM).exe $(EXEOBJG) $(VIMDLLBASE).lib $(LIBC)
++ if exist $(GVIM).exe.manifest mt.exe -nologo -manifest $(GVIM).exe.manifest -updateresource:$(GVIM).exe;1
++
++ $(VIM).exe: $(OUTDIR) $(EXEOBJC) $(VIMDLLBASE).dll
++ $(link) $(LINKARGS1) /subsystem:$(SUBSYSTEM_CON) -out:$(VIM).exe $(EXEOBJC) $(VIMDLLBASE).lib $(LIBC)
++ if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1
++
++ !else
++
+ $(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) /subsystem:$(SUBSYSTEM) -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)
+ if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1
+
++ !endif
++
+ $(VIM): $(VIM).exe
+
+ $(OUTDIR):
+***************
+*** 1287,1292 ****
+--- 1362,1376 ----
+ - if exist $(VIM).pdb del $(VIM).pdb
+ - if exist $(VIM).map del $(VIM).map
+ - if exist $(VIM).ncb del $(VIM).ncb
++ !if "$(VIMDLL)" == "yes"
++ - if exist $(GVIM).exe del $(GVIM).exe
++ - if exist $(GVIM).map del $(GVIM).map
++ - if exist $(VIMDLLBASE).dll del $(VIMDLLBASE).dll
++ - if exist $(VIMDLLBASE).lib del $(VIMDLLBASE).lib
++ - if exist $(VIMDLLBASE).exp del $(VIMDLLBASE).exp
++ - if exist $(VIMDLLBASE).pdb del $(VIMDLLBASE).pdb
++ - if exist $(VIMDLLBASE).map del $(VIMDLLBASE).map
++ !endif
+ - if exist vimrun.exe del vimrun.exe
+ - if exist install.exe del install.exe
+ - if exist uninstal.exe del uninstal.exe
+***************
+*** 1334,1354 ****
+ ###########################################################################
+
+ # Create a default rule for transforming .c files to .obj files in $(OUTDIR)
+- # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
+- !IF "$(_NMAKE_VER)" == ""
+- .c{$(OUTDIR)/}.obj:
+- !ELSE
+ .c{$(OUTDIR)/}.obj::
+! !ENDIF
+ $(CC) $(CFLAGS_OUTDIR) $<
+
+ # Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
+- # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
+- !IF "$(_NMAKE_VER)" == ""
+- .cpp{$(OUTDIR)/}.obj:
+- !ELSE
+ .cpp{$(OUTDIR)/}.obj::
+- !ENDIF
+ $(CC) $(CFLAGS_OUTDIR) $<
+
+ $(OUTDIR)/arabic.obj: $(OUTDIR) arabic.c $(INCL)
+--- 1418,1432 ----
+ ###########################################################################
+
+ # Create a default rule for transforming .c files to .obj files in $(OUTDIR)
+ .c{$(OUTDIR)/}.obj::
+! $(CC) $(CFLAGS_OUTDIR) $<
+!
+! # Create a default rule for xdiff.
+! {xdiff/}.c{$(OUTDIR)/}.obj::
+ $(CC) $(CFLAGS_OUTDIR) $<
+
+ # Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
+ .cpp{$(OUTDIR)/}.obj::
+ $(CC) $(CFLAGS_OUTDIR) $<
+
+ $(OUTDIR)/arabic.obj: $(OUTDIR) arabic.c $(INCL)
+***************
+*** 1376,1397 ****
+ $(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)
+
+--- 1454,1469 ----
+***************
+*** 1516,1523 ****
+--- 1588,1603 ----
+
+ $(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) $(MZSCHEME_INCL)
+
++ $(OUTDIR)/os_w32dll.obj: $(OUTDIR) os_w32dll.c
++
+ $(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL)
+
++ $(OUTDIR)/os_w32exec.obj: $(OUTDIR) os_w32exe.c $(INCL)
++ $(CC) $(CFLAGS:-DFEAT_GUI_MSWIN=) /Fo$@ os_w32exe.c
++
++ $(OUTDIR)/os_w32exeg.obj: $(OUTDIR) os_w32exe.c $(INCL)
++ $(CC) $(CFLAGS) /Fo$@ os_w32exe.c
++
+ $(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL)
+ $(CC) $(CFLAGS_OUTDIR) $(PATHDEF_SRC)
+
+***************
+*** 1560,1569 ****
+ $(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
+ $(CC) $(CFLAGS_OUTDIR) $(XPM_INC) xpm_w32.c
+
+! $(OUTDIR)/vim.res: $(OUTDIR) vim.rc gvim.exe.mnf version.h tools.bmp \
+! tearoff.bmp vim.ico vim_error.ico \
+ vim_alert.ico vim_info.ico vim_quest.ico
+! $(RC) /nologo /l 0x409 /Fo$(OUTDIR)/vim.res $(RCFLAGS) vim.rc
+
+ iid_ole.c if_ole.h vim.tlb: if_ole.idl
+ midl /nologo /error none /proxy nul /iid iid_ole.c /tlb vim.tlb \
+--- 1640,1664 ----
+ $(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
+ $(CC) $(CFLAGS_OUTDIR) $(XPM_INC) xpm_w32.c
+
+! !if "$(VIMDLL)" == "yes"
+! $(OUTDIR)/vimc.res: $(OUTDIR) vim.rc gvim.exe.mnf version.h gui_w32_rc.h \
+! vim.ico
+! $(RC) /nologo /l 0x409 /Fo$@ $(RCFLAGS:-DFEAT_GUI_MSWIN=) vim.rc
+!
+! $(OUTDIR)/vimg.res: $(OUTDIR) vim.rc gvim.exe.mnf version.h gui_w32_rc.h \
+! vim.ico
+! $(RC) /nologo /l 0x409 /Fo$@ $(RCFLAGS) vim.rc
+!
+! $(OUTDIR)/vimd.res: $(OUTDIR) vim.rc version.h gui_w32_rc.h \
+! tools.bmp tearoff.bmp vim.ico vim_error.ico \
+! vim_alert.ico vim_info.ico vim_quest.ico
+! $(RC) /nologo /l 0x409 /Fo$@ $(RCFLAGS) -DRCDLL -DVIMDLLBASE=\"$(VIMDLLBASE)\" vim.rc
+! !else
+! $(OUTDIR)/vim.res: $(OUTDIR) vim.rc gvim.exe.mnf version.h gui_w32_rc.h \
+! tools.bmp tearoff.bmp vim.ico vim_error.ico \
+ vim_alert.ico vim_info.ico vim_quest.ico
+! $(RC) /nologo /l 0x409 /Fo$@ $(RCFLAGS) vim.rc
+! !endif
+
+ iid_ole.c if_ole.h vim.tlb: if_ole.idl
+ midl /nologo /error none /proxy nul /iid iid_ole.c /tlb vim.tlb \
+***************
+*** 1583,1614 ****
+ -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/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
+
+ $(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
+
+
+ # $CFLAGS may contain backslashes and double quotes, escape them both.
+--- 1678,1704 ----
+ -DWCWIDTH_FUNCTION=utf_uint2cells \
+ -D_CRT_SECURE_NO_WARNINGS
+
++ # Create a default rule for libvterm.
++ {libvterm/src/}.c{$(OUTDIR)/}.obj::
++ $(CCCTERM) -Fo$(OUTDIR)/ $<
++
+ $(OUTDIR)/encoding.obj: $(OUTDIR) libvterm/src/encoding.c $(TERM_DEPS)
+
+ $(OUTDIR)/keyboard.obj: $(OUTDIR) libvterm/src/keyboard.c $(TERM_DEPS)
+
+ $(OUTDIR)/mouse.obj: $(OUTDIR) libvterm/src/mouse.c $(TERM_DEPS)
+
+ $(OUTDIR)/parser.obj: $(OUTDIR) libvterm/src/parser.c $(TERM_DEPS)
+
+ $(OUTDIR)/pen.obj: $(OUTDIR) libvterm/src/pen.c $(TERM_DEPS)
+
+ $(OUTDIR)/termscreen.obj: $(OUTDIR) libvterm/src/termscreen.c $(TERM_DEPS)
+
+ $(OUTDIR)/state.obj: $(OUTDIR) libvterm/src/state.c $(TERM_DEPS)
+
+ $(OUTDIR)/unicode.obj: $(OUTDIR) libvterm/src/unicode.c $(TERM_DEPS)
+
+ $(OUTDIR)/vterm.obj: $(OUTDIR) libvterm/src/vterm.c $(TERM_DEPS)
+
+
+ # $CFLAGS may contain backslashes and double quotes, escape them both.
+*** ../vim-8.1.1229/src/channel.c 2019-04-21 00:00:07.942354840 +0200
+--- src/channel.c 2019-04-28 18:55:14.808080039 +0200
+***************
+*** 5319,5325 ****
+ return job_need_end_check(job) || job_channel_still_useful(job);
+ }
+
+! #if defined(GUI_MAY_FORK) || defined(PROTO)
+ /*
+ * Return TRUE when there is any running job that we care about.
+ */
+--- 5319,5325 ----
+ return job_need_end_check(job) || job_channel_still_useful(job);
+ }
+
+! #if defined(GUI_MAY_FORK) || defined(GUI_MAY_SPAWN) || defined(PROTO)
+ /*
+ * Return TRUE when there is any running job that we care about.
+ */
+*** ../vim-8.1.1229/src/evalfunc.c 2019-04-27 20:36:52.530303581 +0200
+--- src/evalfunc.c 2019-04-28 18:55:14.808080039 +0200
+***************
+*** 4201,4211 ****
+ {
+ #ifdef FEAT_GUI
+ if (gui.in_use)
+ gui_mch_set_foreground();
+! #else
+! # ifdef MSWIN
+ win32_set_foreground();
+- # endif
+ #endif
+ }
+
+--- 4201,4213 ----
+ {
+ #ifdef FEAT_GUI
+ if (gui.in_use)
++ {
+ gui_mch_set_foreground();
+! return;
+! }
+! #endif
+! #if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL))
+ win32_set_foreground();
+ #endif
+ }
+
+*** ../vim-8.1.1229/src/ex_cmds.c 2019-04-28 18:04:56.058492178 +0200
+--- src/ex_cmds.c 2019-04-28 18:55:14.808080039 +0200
+***************
+*** 1537,1543 ****
+ int flags) /* may be SHELL_DOOUT when output is redirected */
+ {
+ buf_T *buf;
+! #ifndef FEAT_GUI_MSWIN
+ int save_nwr;
+ #endif
+ #ifdef MSWIN
+--- 1537,1543 ----
+ int flags) /* may be SHELL_DOOUT when output is redirected */
+ {
+ buf_T *buf;
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ int save_nwr;
+ #endif
+ #ifdef MSWIN
+***************
+*** 1636,1667 ****
+ * Otherwise there is probably text on the screen that the user wants
+ * to read before redrawing, so call wait_return().
+ */
+! #ifndef FEAT_GUI_MSWIN
+! if (cmd == NULL
+! # ifdef MSWIN
+! || (keep_termcap && !need_wait_return)
+ # endif
+- )
+- {
+- if (msg_silent == 0)
+- redraw_later_clear();
+- need_wait_return = FALSE;
+- }
+- else
+ {
+! /*
+! * If we switch screens when starttermcap() is called, we really
+! * want to wait for "hit return to continue".
+! */
+! save_nwr = no_wait_return;
+! if (swapping_screen())
+! no_wait_return = FALSE;
+ # ifdef AMIGA
+! wait_return(term_console ? -1 : msg_silent == 0); /* see below */
+ # else
+! wait_return(msg_silent == 0);
+ # endif
+! no_wait_return = save_nwr;
+ }
+ #endif /* FEAT_GUI_MSWIN */
+
+--- 1636,1672 ----
+ * Otherwise there is probably text on the screen that the user wants
+ * to read before redrawing, so call wait_return().
+ */
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+! # ifdef VIMDLL
+! if (!gui.in_use)
+ # endif
+ {
+! if (cmd == NULL
+! # ifdef MSWIN
+! || (keep_termcap && !need_wait_return)
+! # endif
+! )
+! {
+! if (msg_silent == 0)
+! redraw_later_clear();
+! need_wait_return = FALSE;
+! }
+! else
+! {
+! /*
+! * If we switch screens when starttermcap() is called, we
+! * really want to wait for "hit return to continue".
+! */
+! save_nwr = no_wait_return;
+! if (swapping_screen())
+! no_wait_return = FALSE;
+ # ifdef AMIGA
+! wait_return(term_console ? -1 : msg_silent == 0); // see below
+ # else
+! wait_return(msg_silent == 0);
+ # endif
+! no_wait_return = save_nwr;
+! }
+ }
+ #endif /* FEAT_GUI_MSWIN */
+
+*** ../vim-8.1.1229/src/ex_docmd.c 2019-04-27 20:36:52.530303581 +0200
+--- src/ex_docmd.c 2019-04-28 18:55:14.812080022 +0200
+***************
+*** 7756,7762 ****
+ if (*arg == NUL)
+ {
+ # if defined(FEAT_GUI) || defined(MSWIN)
+! # ifdef FEAT_GUI
+ if (gui.in_use && gui_mch_get_winpos(&x, &y) != FAIL)
+ # else
+ if (mch_get_winpos(&x, &y) != FAIL)
+--- 7756,7765 ----
+ if (*arg == NUL)
+ {
+ # if defined(FEAT_GUI) || defined(MSWIN)
+! # ifdef VIMDLL
+! if (gui.in_use ? gui_mch_get_winpos(&x, &y) != FAIL :
+! mch_get_winpos(&x, &y) != FAIL)
+! # elif defined(FEAT_GUI)
+ if (gui.in_use && gui_mch_get_winpos(&x, &y) != FAIL)
+ # else
+ if (mch_get_winpos(&x, &y) != FAIL)
+***************
+*** 7789,7801 ****
+ gui_win_x = x;
+ gui_win_y = y;
+ }
+! # ifdef HAVE_TGETENT
+ else
+ # endif
+! # else
+! # ifdef MSWIN
+ mch_set_winpos(x, y);
+- # endif
+ # endif
+ # ifdef HAVE_TGETENT
+ if (*T_CWP)
+--- 7792,7803 ----
+ gui_win_x = x;
+ gui_win_y = y;
+ }
+! # if defined(HAVE_TGETENT) || defined(VIMDLL)
+ else
+ # endif
+! # endif
+! # if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL))
+ mch_set_winpos(x, y);
+ # endif
+ # ifdef HAVE_TGETENT
+ if (*T_CWP)
+***************
+*** 8239,8246 ****
+ if (need_maketitle)
+ maketitle();
+ #endif
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+! resize_console_buf();
+ #endif
+ RedrawingDisabled = r;
+ p_lz = p;
+--- 8241,8251 ----
+ if (need_maketitle)
+ maketitle();
+ #endif
+! #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! resize_console_buf();
+ #endif
+ RedrawingDisabled = r;
+ p_lz = p;
+*** ../vim-8.1.1229/src/feature.h 2019-04-27 13:03:20.008715938 +0200
+--- src/feature.h 2019-04-28 19:05:41.293187966 +0200
+***************
+*** 712,718 ****
+ * there is no terminal version, and on Windows we can't figure out how to
+ * fork one off with :gui.
+ */
+! #if defined(FEAT_GUI_MSWIN) || (defined(FEAT_GUI_MAC) && !defined(MACOS_X_DARWIN))
+ # define ALWAYS_USE_GUI
+ #endif
+
+--- 712,719 ----
+ * there is no terminal version, and on Windows we can't figure out how to
+ * fork one off with :gui.
+ */
+! #if (defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)) \
+! || (defined(FEAT_GUI_MAC) && !defined(MACOS_X_DARWIN))
+ # define ALWAYS_USE_GUI
+ #endif
+
+***************
+*** 1138,1145 ****
+ * mouse shape Adjust the shape of the mouse pointer to the mode.
+ */
+ #ifdef FEAT_NORMAL
+! /* MS-DOS console and Win32 console can change cursor shape */
+! # if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ # define MCH_CURSOR_SHAPE
+ # endif
+ # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
+--- 1139,1146 ----
+ * mouse shape Adjust the shape of the mouse pointer to the mode.
+ */
+ #ifdef FEAT_NORMAL
+! // Win32 console can change cursor shape
+! # if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+ # define MCH_CURSOR_SHAPE
+ # endif
+ # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
+***************
+*** 1263,1269 ****
+ * +balloon_eval_term Allow balloon expression evaluation in the terminal.
+ */
+ #if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \
+! (defined(UNIX) || defined(VMS) || (defined(MSWIN) && !defined(FEAT_GUI_MSWIN)))
+ # define FEAT_BEVAL_TERM
+ #endif
+
+--- 1264,1271 ----
+ * +balloon_eval_term Allow balloon expression evaluation in the terminal.
+ */
+ #if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \
+! (defined(UNIX) || defined(VMS) || \
+! (defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))))
+ # define FEAT_BEVAL_TERM
+ #endif
+
+***************
+*** 1317,1322 ****
+ /*
+ * +vtp: Win32 virtual console.
+ */
+! #if !defined(FEAT_GUI) && defined(MSWIN)
+ # define FEAT_VTP
+ #endif
+--- 1319,1324 ----
+ /*
+ * +vtp: Win32 virtual console.
+ */
+! #if (!defined(FEAT_GUI) || defined(VIMDLL)) && defined(MSWIN)
+ # define FEAT_VTP
+ #endif
+*** ../vim-8.1.1229/src/fileio.c 2019-03-21 21:45:30.875282175 +0100
+--- src/fileio.c 2019-04-28 18:55:14.812080022 +0200
+***************
+*** 792,798 ****
+ if (!is_not_a_term())
+ {
+ #ifndef ALWAYS_USE_GUI
+! mch_msg(_("Vim: Reading from stdin...\n"));
+ #endif
+ #ifdef FEAT_GUI
+ /* Also write a message in the GUI window, if there is one. */
+--- 792,801 ----
+ if (!is_not_a_term())
+ {
+ #ifndef ALWAYS_USE_GUI
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! mch_msg(_("Vim: Reading from stdin...\n"));
+ #endif
+ #ifdef FEAT_GUI
+ /* Also write a message in the GUI window, if there is one. */
+*** ../vim-8.1.1229/src/getchar.c 2019-04-24 23:08:20.078079973 +0200
+--- src/getchar.c 2019-04-28 18:55:14.812080022 +0200
+***************
+*** 1626,1632 ****
+ #if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+ // Handle K_TEAROFF here, the caller of vgetc() doesn't need to
+ // know that a menu was torn off
+! if (c == K_TEAROFF)
+ {
+ char_u name[200];
+ int i;
+--- 1626,1636 ----
+ #if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+ // Handle K_TEAROFF here, the caller of vgetc() doesn't need to
+ // know that a menu was torn off
+! if (
+! # ifdef VIMDLL
+! gui.in_use &&
+! # endif
+! c == K_TEAROFF)
+ {
+ char_u name[200];
+ int i;
+***************
+*** 3113,3118 ****
+--- 3117,3123 ----
+ p += 2;
+ i -= 2;
+ }
++ # ifndef MSWIN
+ /* When the GUI is not used CSI needs to be escaped. */
+ else if (!gui.in_use && p[0] == CSI)
+ {
+***************
+*** 3122,3133 ****
+ *p = (int)KE_CSI;
+ len += 2;
+ }
+ else
+ #endif
+ if (p[0] == NUL || (p[0] == K_SPECIAL
+ /* timeout may generate K_CURSORHOLD */
+ && (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD)
+! #if defined(MSWIN) && !defined(FEAT_GUI)
+ /* Win32 console passes modifiers */
+ && (i < 2 || p[1] != KS_MODIFIER)
+ #endif
+--- 3127,3142 ----
+ *p = (int)KE_CSI;
+ len += 2;
+ }
++ # endif
+ else
+ #endif
+ if (p[0] == NUL || (p[0] == K_SPECIAL
+ /* timeout may generate K_CURSORHOLD */
+ && (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD)
+! #if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL))
+! # ifdef VIMDLL
+! && !gui.in_use
+! # endif
+ /* Win32 console passes modifiers */
+ && (i < 2 || p[1] != KS_MODIFIER)
+ #endif
+***************
+*** 5232,5251 ****
+
+ #if defined(MSWIN) || defined(MACOS_X)
+
+! #define VIS_SEL (VISUAL+SELECTMODE) /* abbreviation */
+
+ /*
+ * Default mappings for some often used keys.
+ */
+! static struct initmap
+ {
+ char_u *arg;
+ int mode;
+! } initmappings[] =
+ {
+- #if defined(MSWIN)
+- /* Use the Windows (CUA) keybindings. */
+- # ifdef FEAT_GUI
+ /* paste, copy and cut */
+ {(char_u *)"<S-Insert> \"*P", NORMAL},
+ {(char_u *)"<S-Insert> \"-d\"*P", VIS_SEL},
+--- 5241,5261 ----
+
+ #if defined(MSWIN) || defined(MACOS_X)
+
+! # define VIS_SEL (VISUAL+SELECTMODE) /* abbreviation */
+
+ /*
+ * Default mappings for some often used keys.
+ */
+! struct initmap
+ {
+ char_u *arg;
+ int mode;
+! };
+!
+! # ifdef FEAT_GUI_MSWIN
+! /* Use the Windows (CUA) keybindings. (GUI) */
+! static struct initmap initmappings[] =
+ {
+ /* paste, copy and cut */
+ {(char_u *)"<S-Insert> \"*P", NORMAL},
+ {(char_u *)"<S-Insert> \"-d\"*P", VIS_SEL},
+***************
+*** 5255,5261 ****
+ {(char_u *)"<C-Del> \"*d", VIS_SEL},
+ {(char_u *)"<C-X> \"*d", VIS_SEL},
+ /* Missing: CTRL-C (cancel) and CTRL-V (block selection) */
+! # else
+ {(char_u *)"\316w <C-Home>", NORMAL+VIS_SEL},
+ {(char_u *)"\316w <C-Home>", INSERT+CMDLINE},
+ {(char_u *)"\316u <C-End>", NORMAL+VIS_SEL},
+--- 5265,5277 ----
+ {(char_u *)"<C-Del> \"*d", VIS_SEL},
+ {(char_u *)"<C-X> \"*d", VIS_SEL},
+ /* Missing: CTRL-C (cancel) and CTRL-V (block selection) */
+! };
+! # endif
+!
+! # if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL))
+! /* Use the Windows (CUA) keybindings. (Console) */
+! static struct initmap cinitmappings[] =
+! {
+ {(char_u *)"\316w <C-Home>", NORMAL+VIS_SEL},
+ {(char_u *)"\316w <C-Home>", INSERT+CMDLINE},
+ {(char_u *)"\316u <C-End>", NORMAL+VIS_SEL},
+***************
+*** 5278,5287 ****
+ {(char_u *)"\316\327 d", VIS_SEL}, /* SHIFT-Del is d */
+ {(char_u *)"\316\330 d", VIS_SEL}, /* CTRL-Del is d */
+ # endif
+ # endif
+- #endif
+
+! #if defined(MACOS_X)
+ /* Use the Standard MacOS binding. */
+ /* paste, copy and cut */
+ {(char_u *)"<D-v> \"*P", NORMAL},
+--- 5294,5305 ----
+ {(char_u *)"\316\327 d", VIS_SEL}, /* SHIFT-Del is d */
+ {(char_u *)"\316\330 d", VIS_SEL}, /* CTRL-Del is d */
+ # endif
++ };
+ # endif
+
+! # if defined(MACOS_X)
+! static struct initmap initmappings[] =
+! {
+ /* Use the Standard MacOS binding. */
+ /* paste, copy and cut */
+ {(char_u *)"<D-v> \"*P", NORMAL},
+***************
+*** 5290,5297 ****
+ {(char_u *)"<D-c> \"*y", VIS_SEL},
+ {(char_u *)"<D-x> \"*d", VIS_SEL},
+ {(char_u *)"<Backspace> \"-d", VIS_SEL},
+- #endif
+ };
+
+ # undef VIS_SEL
+ #endif
+--- 5308,5315 ----
+ {(char_u *)"<D-c> \"*y", VIS_SEL},
+ {(char_u *)"<D-x> \"*d", VIS_SEL},
+ {(char_u *)"<Backspace> \"-d", VIS_SEL},
+ };
++ # endif
+
+ # undef VIS_SEL
+ #endif
+***************
+*** 5305,5312 ****
+--- 5323,5342 ----
+ #if defined(MSWIN) || defined(MACOS_X)
+ int i;
+
++ # if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
++ # ifdef VIMDLL
++ if (!gui.starting)
++ # endif
++ {
++ for (i = 0;
++ i < (int)(sizeof(cinitmappings) / sizeof(struct initmap)); ++i)
++ add_map(cinitmappings[i].arg, cinitmappings[i].mode);
++ }
++ # endif
++ # if defined(FEAT_GUI_MSWIN) || defined(MACOS_X)
+ for (i = 0; i < (int)(sizeof(initmappings) / sizeof(struct initmap)); ++i)
+ add_map(initmappings[i].arg, initmappings[i].mode);
++ # endif
+ #endif
+ }
+
+*** ../vim-8.1.1229/src/globals.h 2019-04-28 18:04:56.058492178 +0200
+--- src/globals.h 2019-04-28 18:55:14.812080022 +0200
+***************
+*** 1442,1448 ****
+ EXTERN char e_noalt[] INIT(= N_("E23: No alternate file"));
+ EXTERN char e_noabbr[] INIT(= N_("E24: No such abbreviation"));
+ EXTERN char e_nobang[] INIT(= N_("E477: No ! allowed"));
+! #ifndef FEAT_GUI
+ EXTERN char e_nogvim[] INIT(= N_("E25: GUI cannot be used: Not enabled at compile time"));
+ #endif
+ #ifndef FEAT_RIGHTLEFT
+--- 1442,1448 ----
+ EXTERN char e_noalt[] INIT(= N_("E23: No alternate file"));
+ EXTERN char e_noabbr[] INIT(= N_("E24: No such abbreviation"));
+ EXTERN char e_nobang[] INIT(= N_("E477: No ! allowed"));
+! #if !defined(FEAT_GUI) || defined(VIMDLL)
+ EXTERN char e_nogvim[] INIT(= N_("E25: GUI cannot be used: Not enabled at compile time"));
+ #endif
+ #ifndef FEAT_RIGHTLEFT
+***************
+*** 1645,1650 ****
+--- 1645,1651 ----
+
+ #ifdef MSWIN
+ EXTERN int ctrl_break_was_pressed INIT(= FALSE);
++ EXTERN HINSTANCE g_hinst INIT(= NULL);
+ #endif
+
+ #ifdef FEAT_TEXT_PROP
+*** ../vim-8.1.1229/src/gui.c 2019-03-30 22:26:35.091091278 +0100
+--- src/gui.c 2019-04-28 18:55:14.812080022 +0200
+***************
+*** 65,74 ****
+ * recursive call.
+ */
+ void
+! gui_start(void)
+ {
+ char_u *old_term;
+ static int recursive = 0;
+
+ old_term = vim_strsave(T_NAME);
+
+--- 65,77 ----
+ * recursive call.
+ */
+ void
+! gui_start(char_u *arg UNUSED)
+ {
+ char_u *old_term;
+ static int recursive = 0;
++ #ifdef GUI_MAY_SPAWN
++ char *msg = NULL;
++ #endif
+
+ old_term = vim_strsave(T_NAME);
+
+***************
+*** 98,103 ****
+--- 101,122 ----
+ }
+ else
+ #endif
++ #ifdef GUI_MAY_SPAWN
++ if (gui.dospawn
++ # ifdef EXPERIMENTAL_GUI_CMD
++ && gui.dofork
++ # endif
++ && !vim_strchr(p_go, GO_FORG)
++ && !anyBufIsChanged()
++ # ifdef FEAT_JOB_CHANNEL
++ && !job_any_running()
++ # endif
++ )
++ {
++ msg = gui_mch_do_spawn(arg);
++ }
++ else
++ #endif
+ {
+ #ifdef FEAT_GUI_GTK
+ /* If there is 'f' in 'guioptions' and specify -g argument,
+***************
+*** 125,130 ****
+--- 144,153 ----
+ #ifdef FEAT_TITLE
+ set_title_defaults(); /* set 'title' and 'icon' again */
+ #endif
++ #if defined(GUI_MAY_SPAWN) && defined(EXPERIMENTAL_GUI_CMD)
++ if (msg)
++ emsg(msg);
++ #endif
+ }
+
+ vim_free(old_term);
+***************
+*** 431,437 ****
+ gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH;
+ gui.prev_wrap = -1;
+
+! #ifdef ALWAYS_USE_GUI
+ result = OK;
+ #else
+ # ifdef FEAT_GUI_GTK
+--- 454,460 ----
+ gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH;
+ gui.prev_wrap = -1;
+
+! #if defined(ALWAYS_USE_GUI) || defined(VIMDLL)
+ result = OK;
+ #else
+ # ifdef FEAT_GUI_GTK
+***************
+*** 4948,4959 ****
+ }
+ if (!gui.in_use)
+ {
+ /* Clear the command. Needed for when forking+exiting, to avoid part
+ * of the argument ending up after the shell prompt. */
+ msg_clr_eos_force();
+! gui_start();
+! #ifdef FEAT_JOB_CHANNEL
+ channel_gui_register_all();
+ #endif
+ }
+ if (!ends_excmd(*eap->arg))
+--- 4971,4992 ----
+ }
+ if (!gui.in_use)
+ {
++ #if defined(VIMDLL) && !defined(EXPERIMENTAL_GUI_CMD)
++ emsg(_(e_nogvim));
++ return;
++ #else
+ /* Clear the command. Needed for when forking+exiting, to avoid part
+ * of the argument ending up after the shell prompt. */
+ msg_clr_eos_force();
+! # ifdef GUI_MAY_SPAWN
+! if (!ends_excmd(*eap->arg))
+! gui_start(eap->arg);
+! else
+! # endif
+! gui_start(NULL);
+! # ifdef FEAT_JOB_CHANNEL
+ channel_gui_register_all();
++ # endif
+ #endif
+ }
+ if (!ends_excmd(*eap->arg))
+*** ../vim-8.1.1229/src/gui.h 2019-02-17 17:44:36.207875527 +0100
+--- src/gui.h 2019-04-28 18:55:14.812080022 +0200
+***************
+*** 237,242 ****
+--- 237,252 ----
+ # endif
+ #endif
+
++ #ifdef VIMDLL
++ // Use spawn when GUI is starting.
++ # define GUI_MAY_SPAWN
++
++ // Uncomment the next definition if you want to use the `:gui` command on
++ // Windows. It uses `:mksession` to inherit the session from vim.exe to
++ // gvim.exe. So, it doesn't work perfectly. (EXPERIMENTAL)
++ //# define EXPERIMENTAL_GUI_CMD
++ #endif
++
+ typedef struct Gui
+ {
+ int in_focus; /* Vim has input focus */
+***************
+*** 245,250 ****
+--- 255,263 ----
+ int shell_created; /* Has the shell been created yet? */
+ int dying; /* Is vim dying? Then output to terminal */
+ int dofork; /* Use fork() when GUI is starting */
++ #ifdef GUI_MAY_SPAWN
++ int dospawn; /* Use spawn() when GUI is starting */
++ #endif
+ int dragged_sb; /* Which scrollbar being dragged, if any? */
+ win_T *dragged_wp; /* Which WIN's sb being dragged, if any? */
+ int pointer_hidden; /* Is the mouse pointer hidden? */
+*** ../vim-8.1.1229/src/gui_gtk_x11.c 2019-04-27 22:06:33.352200698 +0200
+--- src/gui_gtk_x11.c 2019-04-28 18:55:14.812080022 +0200
+***************
+*** 2315,2389 ****
+ }
+
+ /*
+- * Generate a script that can be used to restore the current editing session.
+- * Save the value of v:this_session before running :mksession in order to make
+- * automagic session save fully transparent. Return TRUE on success.
+- */
+- static int
+- write_session_file(char_u *filename)
+- {
+- char_u *escaped_filename;
+- char *mksession_cmdline;
+- unsigned int save_ssop_flags;
+- int failed;
+-
+- /*
+- * Build an ex command line to create a script that restores the current
+- * session if executed. Escape the filename to avoid nasty surprises.
+- */
+- escaped_filename = vim_strsave_escaped(filename, escape_chars);
+- if (escaped_filename == NULL)
+- return FALSE;
+- mksession_cmdline = g_strconcat("mksession ", (char *)escaped_filename,
+- NULL);
+- vim_free(escaped_filename);
+-
+- /*
+- * Use a reasonable hardcoded set of 'sessionoptions' flags to avoid
+- * unpredictable effects when the session is saved automatically. Also,
+- * we definitely need SSOP_GLOBALS to be able to restore v:this_session.
+- * Don't use SSOP_BUFFERS to prevent the buffer list from becoming
+- * enormously large if the GNOME session feature is used regularly.
+- */
+- save_ssop_flags = ssop_flags;
+- ssop_flags = (SSOP_BLANK|SSOP_CURDIR|SSOP_FOLDS|SSOP_GLOBALS
+- |SSOP_HELP|SSOP_OPTIONS|SSOP_WINSIZE|SSOP_TABPAGES);
+-
+- do_cmdline_cmd((char_u *)"let Save_VV_this_session = v:this_session");
+- failed = (do_cmdline_cmd((char_u *)mksession_cmdline) == FAIL);
+- do_cmdline_cmd((char_u *)"let v:this_session = Save_VV_this_session");
+- do_unlet((char_u *)"Save_VV_this_session", TRUE);
+-
+- ssop_flags = save_ssop_flags;
+- g_free(mksession_cmdline);
+-
+- /*
+- * Reopen the file and append a command to restore v:this_session,
+- * as if this save never happened. This is to avoid conflicts with
+- * the user's own sessions. FIXME: It's probably less hackish to add
+- * a "stealth" flag to 'sessionoptions' -- gotta ask Bram.
+- */
+- if (!failed)
+- {
+- FILE *fd;
+-
+- fd = open_exfile(filename, TRUE, APPENDBIN);
+-
+- failed = (fd == NULL
+- || put_line(fd, "let v:this_session = Save_VV_this_session") == FAIL
+- || put_line(fd, "unlet Save_VV_this_session") == FAIL);
+-
+- if (fd != NULL && fclose(fd) != 0)
+- failed = TRUE;
+-
+- if (failed)
+- mch_remove(filename);
+- }
+-
+- return !failed;
+- }
+-
+- /*
+ * "save_yourself" signal handler. Initiate an interaction to ask the user
+ * for confirmation if necessary. Save the current editing session and tell
+ * the session manager how to restart Vim.
+--- 2315,2320 ----
+*** ../vim-8.1.1229/src/gui_w32.c 2019-04-28 14:02:25.414687593 +0200
+--- src/gui_w32.c 2019-04-28 19:01:10.762451360 +0200
+***************
+*** 320,326 ****
+ // for find/replace dialog
+ #endif
+
+- static HINSTANCE s_hinst = NULL;
+ #if !defined(FEAT_GUI)
+ static
+ #endif
+--- 320,325 ----
+***************
+*** 1424,1430 ****
+ 10, /* Any value will do for now */
+ 10, /* Any value will do for now */
+ s_hwnd, NULL,
+! s_hinst, NULL);
+ }
+
+ /*
+--- 1423,1429 ----
+ 10, /* Any value will do for now */
+ 10, /* Any value will do for now */
+ s_hwnd, NULL,
+! g_hinst, NULL);
+ }
+
+ /*
+***************
+*** 2237,2251 ****
+ }
+ #endif /*FEAT_MENU*/
+
+- #ifndef PROTO
+- void
+- _cdecl
+- SaveInst(HINSTANCE hInst)
+- {
+- s_hinst = hInst;
+- }
+- #endif
+-
+ /*
+ * Return the RGB value of a pixel as a long.
+ */
+--- 2236,2241 ----
+***************
+*** 4839,4844 ****
+--- 4829,4969 ----
+ }
+ #endif
+
++ #if defined(GUI_MAY_SPAWN) || defined(PROTO)
++ static char *
++ gvim_error(void)
++ {
++ char *msg = _("E988: GUI cannot be used. Cannot execute gvim.exe.");
++
++ if (starting)
++ {
++ mch_errmsg(msg);
++ mch_errmsg("\n");
++ mch_exit(2);
++ }
++ return msg;
++ }
++
++ char *
++ gui_mch_do_spawn(char_u *arg)
++ {
++ int len;
++ # if defined(FEAT_SESSION) && defined(EXPERIMENTAL_GUI_CMD)
++ char_u *session = NULL;
++ LPWSTR tofree1 = NULL;
++ # endif
++ WCHAR name[MAX_PATH];
++ LPWSTR cmd, newcmd = NULL, p, warg, tofree2 = NULL;
++ STARTUPINFOW si = {sizeof(si)};
++ PROCESS_INFORMATION pi;
++
++ if (!GetModuleFileNameW(g_hinst, name, MAX_PATH))
++ goto error;
++ p = wcsrchr(name, L'\\');
++ if (p == NULL)
++ goto error;
++ // Replace the executable name from vim(d).exe to gvim(d).exe.
++ # ifdef DEBUG
++ wcscpy(p + 1, L"gvimd.exe");
++ # else
++ wcscpy(p + 1, L"gvim.exe");
++ # endif
++
++ # if defined(FEAT_SESSION) && defined(EXPERIMENTAL_GUI_CMD)
++ if (starting)
++ # endif
++ {
++ // Pass the command line to the new process.
++ p = GetCommandLineW();
++ // Skip 1st argument.
++ while (*p && *p != L' ' && *p != L'\t')
++ {
++ if (*p == L'"')
++ {
++ while (*p && *p != L'"')
++ ++p;
++ if (*p)
++ ++p;
++ }
++ else
++ ++p;
++ }
++ cmd = p;
++ }
++ # if defined(FEAT_SESSION) && defined(EXPERIMENTAL_GUI_CMD)
++ else
++ {
++ // Create a session file and pass it to the new process.
++ LPWSTR wsession;
++ char_u *savebg;
++ int ret;
++
++ session = vim_tempname('s', FALSE);
++ if (session == NULL)
++ goto error;
++ savebg = p_bg;
++ p_bg = vim_strsave((char_u *)"light"); // Set 'bg' to "light".
++ ret = write_session_file(session);
++ vim_free(p_bg);
++ p_bg = savebg;
++ if (!ret)
++ goto error;
++ wsession = enc_to_utf16(session, NULL);
++ if (wsession == NULL)
++ goto error;
++ len = (int)wcslen(wsession) * 2 + 27 + 1;
++ cmd = (LPWSTR)alloc(len * (int)sizeof(WCHAR));
++ if (cmd == NULL)
++ {
++ vim_free(wsession);
++ goto error;
++ }
++ tofree1 = cmd;
++ _snwprintf(cmd, len, L" -S \"%s\" -c \"call delete('%s')\"",
++ wsession, wsession);
++ vim_free(wsession);
++ }
++ # endif
++
++ // Check additional arguments to the `:gui` command.
++ if (arg != NULL)
++ {
++ warg = enc_to_utf16(arg, NULL);
++ if (warg == NULL)
++ goto error;
++ tofree2 = warg;
++ }
++ else
++ warg = L"";
++
++ // Set up the new command line.
++ len = (int)wcslen(name) + (int)wcslen(cmd) + (int)wcslen(warg) + 4;
++ newcmd = (LPWSTR)alloc(len * (int)sizeof(WCHAR));
++ if (newcmd == NULL)
++ goto error;
++ _snwprintf(newcmd, len, L"\"%s\"%s %s", name, cmd, warg);
++
++ // Spawn a new GUI process.
++ if (!CreateProcessW(NULL, newcmd, NULL, NULL, TRUE, 0,
++ NULL, NULL, &si, &pi))
++ goto error;
++ CloseHandle(pi.hProcess);
++ CloseHandle(pi.hThread);
++ mch_exit(0);
++
++ error:
++ # if defined(FEAT_SESSION) && defined(EXPERIMENTAL_GUI_CMD)
++ if (session)
++ mch_remove(session);
++ vim_free(session);
++ vim_free(tofree1);
++ # endif
++ vim_free(newcmd);
++ vim_free(tofree2);
++ return gvim_error();
++ }
++ #endif
++
+ /*
+ * Parse the GUI related command-line arguments. Any arguments used are
+ * deleted from argv, and *argc is decremented accordingly. This is called
+***************
+*** 4957,4963 ****
+ * Load the tearoff bitmap
+ */
+ #ifdef FEAT_TEAROFF
+! s_htearbitmap = LoadBitmap(s_hinst, "IDB_TEAROFF");
+ #endif
+
+ gui.scrollbar_width = GetSystemMetrics(SM_CXVSCROLL);
+--- 5082,5088 ----
+ * Load the tearoff bitmap
+ */
+ #ifdef FEAT_TEAROFF
+! s_htearbitmap = LoadBitmap(g_hinst, "IDB_TEAROFF");
+ #endif
+
+ gui.scrollbar_width = GetSystemMetrics(SM_CXVSCROLL);
+***************
+*** 4971,4983 ****
+
+ /* First try using the wide version, so that we can use any title.
+ * Otherwise only characters in the active codepage will work. */
+! if (GetClassInfoW(s_hinst, szVimWndClassW, &wndclassw) == 0)
+ {
+ wndclassw.style = CS_DBLCLKS;
+ wndclassw.lpfnWndProc = _WndProc;
+ wndclassw.cbClsExtra = 0;
+ wndclassw.cbWndExtra = 0;
+! wndclassw.hInstance = s_hinst;
+ wndclassw.hIcon = LoadIcon(wndclassw.hInstance, "IDR_VIM");
+ wndclassw.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wndclassw.hbrBackground = s_brush;
+--- 5096,5108 ----
+
+ /* First try using the wide version, so that we can use any title.
+ * Otherwise only characters in the active codepage will work. */
+! if (GetClassInfoW(g_hinst, szVimWndClassW, &wndclassw) == 0)
+ {
+ wndclassw.style = CS_DBLCLKS;
+ wndclassw.lpfnWndProc = _WndProc;
+ wndclassw.cbClsExtra = 0;
+ wndclassw.cbWndExtra = 0;
+! wndclassw.hInstance = g_hinst;
+ wndclassw.hIcon = LoadIcon(wndclassw.hInstance, "IDR_VIM");
+ wndclassw.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wndclassw.hbrBackground = s_brush;
+***************
+*** 5011,5017 ****
+ 100, // Any value will do
+ 100, // Any value will do
+ vim_parent_hwnd, NULL,
+! s_hinst, NULL);
+ #ifdef HAVE_TRY_EXCEPT
+ }
+ __except(EXCEPTION_EXECUTE_HANDLER)
+--- 5136,5142 ----
+ 100, // Any value will do
+ 100, // Any value will do
+ vim_parent_hwnd, NULL,
+! g_hinst, NULL);
+ #ifdef HAVE_TRY_EXCEPT
+ }
+ __except(EXCEPTION_EXECUTE_HANDLER)
+***************
+*** 5043,5049 ****
+ 100, /* Any value will do */
+ 100, /* Any value will do */
+ NULL, NULL,
+! s_hinst, NULL);
+ if (s_hwnd != NULL && win_socket_id != 0)
+ {
+ SetParent(s_hwnd, (HWND)win_socket_id);
+--- 5168,5174 ----
+ 100, /* Any value will do */
+ 100, /* Any value will do */
+ NULL, NULL,
+! g_hinst, NULL);
+ if (s_hwnd != NULL && win_socket_id != 0)
+ {
+ SetParent(s_hwnd, (HWND)win_socket_id);
+***************
+*** 5062,5074 ****
+ #endif
+
+ /* Create the text area window */
+! if (GetClassInfoW(s_hinst, szTextAreaClassW, &wndclassw) == 0)
+ {
+ wndclassw.style = CS_OWNDC;
+ wndclassw.lpfnWndProc = _TextAreaWndProc;
+ wndclassw.cbClsExtra = 0;
+ wndclassw.cbWndExtra = 0;
+! wndclassw.hInstance = s_hinst;
+ wndclassw.hIcon = NULL;
+ wndclassw.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wndclassw.hbrBackground = NULL;
+--- 5187,5199 ----
+ #endif
+
+ /* Create the text area window */
+! if (GetClassInfoW(g_hinst, szTextAreaClassW, &wndclassw) == 0)
+ {
+ wndclassw.style = CS_OWNDC;
+ wndclassw.lpfnWndProc = _TextAreaWndProc;
+ wndclassw.cbClsExtra = 0;
+ wndclassw.cbWndExtra = 0;
+! wndclassw.hInstance = g_hinst;
+ wndclassw.hIcon = NULL;
+ wndclassw.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wndclassw.hbrBackground = NULL;
+***************
+*** 5086,5092 ****
+ 100, // Any value will do for now
+ 100, // Any value will do for now
+ s_hwnd, NULL,
+! s_hinst, NULL);
+
+ if (s_textArea == NULL)
+ return FAIL;
+--- 5211,5217 ----
+ 100, // Any value will do for now
+ 100, // Any value will do for now
+ s_hwnd, NULL,
+! g_hinst, NULL);
+
+ if (s_textArea == NULL)
+ return FAIL;
+***************
+*** 6640,6647 ****
+
+ #ifndef NO_CONSOLE
+ /* Don't output anything in silent mode ("ex -s") */
+! if (silent_mode)
+! return dfltbutton; /* return default option */
+ #endif
+
+ if (s_hwnd == NULL)
+--- 6765,6775 ----
+
+ #ifndef NO_CONSOLE
+ /* Don't output anything in silent mode ("ex -s") */
+! # ifdef VIMDLL
+! if (!(gui.in_use || gui.starting))
+! # endif
+! if (silent_mode)
+! return dfltbutton; /* return default option */
+ #endif
+
+ if (s_hwnd == NULL)
+***************
+*** 7050,7056 ****
+
+ /* show the dialog box modally and get a return value */
+ nchar = (int)DialogBoxIndirect(
+! s_hinst,
+ (LPDLGTEMPLATE)pdlgtemplate,
+ s_hwnd,
+ (DLGPROC)dialog_callback);
+--- 7178,7184 ----
+
+ /* show the dialog box modally and get a return value */
+ nchar = (int)DialogBoxIndirect(
+! g_hinst,
+ (LPDLGTEMPLATE)pdlgtemplate,
+ s_hwnd,
+ (DLGPROC)dialog_callback);
+***************
+*** 7644,7650 ****
+
+ /* show modelessly */
+ the_menu->tearoff_handle = CreateDialogIndirectParam(
+! s_hinst,
+ (LPDLGTEMPLATE)pdlgtemplate,
+ s_hwnd,
+ (DLGPROC)tearoff_callback,
+--- 7772,7778 ----
+
+ /* show modelessly */
+ the_menu->tearoff_handle = CreateDialogIndirectParam(
+! g_hinst,
+ (LPDLGTEMPLATE)pdlgtemplate,
+ s_hwnd,
+ (DLGPROC)tearoff_callback,
+***************
+*** 7689,7695 ****
+ WS_CHILD | TBSTYLE_TOOLTIPS | TBSTYLE_FLAT,
+ 4000, //any old big number
+ 31, //number of images in initial bitmap
+! s_hinst,
+ IDR_TOOLBAR1, // id of initial bitmap
+ NULL,
+ 0, // initial number of buttons
+--- 7817,7823 ----
+ WS_CHILD | TBSTYLE_TOOLTIPS | TBSTYLE_FLAT,
+ 4000, //any old big number
+ 31, //number of images in initial bitmap
+! g_hinst,
+ IDR_TOOLBAR1, // id of initial bitmap
+ NULL,
+ 0, // initial number of buttons
+***************
+*** 7790,7796 ****
+ s_tabhwnd = CreateWindow(WC_TABCONTROL, "Vim tabline",
+ WS_CHILD|TCS_FOCUSNEVER|TCS_TOOLTIPS,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+! CW_USEDEFAULT, s_hwnd, NULL, s_hinst, NULL);
+ s_tabline_wndproc = SubclassWindow(s_tabhwnd, tabline_wndproc);
+
+ gui.tabline_height = TABLINE_HEIGHT;
+--- 7918,7924 ----
+ s_tabhwnd = CreateWindow(WC_TABCONTROL, "Vim tabline",
+ WS_CHILD|TCS_FOCUSNEVER|TCS_TOOLTIPS,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+! CW_USEDEFAULT, s_hwnd, NULL, g_hinst, NULL);
+ s_tabline_wndproc = SubclassWindow(s_tabhwnd, tabline_wndproc);
+
+ gui.tabline_height = TABLINE_HEIGHT;
+***************
+*** 8245,8251 ****
+ beval->balloon = CreateWindowExW(WS_EX_TOPMOST, TOOLTIPS_CLASSW,
+ NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+! beval->target, NULL, s_hinst, NULL);
+
+ SetWindowPos(beval->balloon, HWND_TOPMOST, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+--- 8373,8379 ----
+ beval->balloon = CreateWindowExW(WS_EX_TOPMOST, TOOLTIPS_CLASSW,
+ NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+! beval->target, NULL, g_hinst, NULL);
+
+ SetWindowPos(beval->balloon, HWND_TOPMOST, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+*** ../vim-8.1.1229/src/if_mzsch.c 2019-03-30 18:46:57.352077376 +0100
+--- src/if_mzsch.c 2019-04-28 18:55:14.816080005 +0200
+***************
+*** 822,828 ****
+ static EventLoopTimerUPP timerUPP;
+ #endif
+
+! #ifndef FEAT_GUI_MSWIN /* Win32 console and Unix */
+ void
+ mzvim_check_threads(void)
+ {
+--- 822,828 ----
+ static EventLoopTimerUPP timerUPP;
+ #endif
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) /* Win32 console and Unix */
+ void
+ mzvim_check_threads(void)
+ {
+***************
+*** 1775,1783 ****
+--- 1775,1785 ----
+ case -2:
+ MZ_GC_UNREG();
+ raise_vim_exn(_("hidden option"));
++ /*NOTREACHED*/
+ case -3:
+ MZ_GC_UNREG();
+ raise_vim_exn(_("unknown option"));
++ /*NOTREACHED*/
+ }
+ /* unreachable */
+ return scheme_void;
+*** ../vim-8.1.1229/src/main.c 2019-04-21 15:54:29.606587753 +0200
+--- src/main.c 2019-04-28 18:55:14.816080005 +0200
+***************
+*** 19,25 ****
+ # include <limits.h>
+ #endif
+
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ # include "iscygpty.h"
+ #endif
+
+--- 19,25 ----
+ # include <limits.h>
+ #endif
+
+! #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+ # include "iscygpty.h"
+ #endif
+
+***************
+*** 95,100 ****
+--- 95,103 ----
+
+ static int has_dash_c_arg = FALSE;
+
++ # ifdef VIMDLL
++ __declspec(dllexport)
++ # endif
+ int
+ # ifdef MSWIN
+ # ifdef __BORLANDC__
+***************
+*** 174,179 ****
+--- 177,187 ----
+ #endif
+ common_init(&params);
+
++ #ifdef VIMDLL
++ // Check if the current executable file is for the GUI subsystem.
++ gui.starting = mch_is_gui_executable();
++ #endif
++
+ #ifdef FEAT_CLIENTSERVER
+ /*
+ * Do the client-server stuff, unless "--servername ''" was used.
+***************
+*** 292,298 ****
+ * For GTK we can't be sure, but when started from the desktop it doesn't
+ * make sense to try using a terminal.
+ */
+! #if defined(ALWAYS_USE_GUI) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK)
+ if (gui.starting
+ # ifdef FEAT_GUI_GTK
+ && !isatty(2)
+--- 300,307 ----
+ * For GTK we can't be sure, but when started from the desktop it doesn't
+ * make sense to try using a terminal.
+ */
+! #if defined(ALWAYS_USE_GUI) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
+! || defined(VIMDLL)
+ if (gui.starting
+ # ifdef FEAT_GUI_GTK
+ && !isatty(2)
+***************
+*** 542,548 ****
+ putchar('\n');
+ #endif
+
+! gui_start(); /* will set full_screen to TRUE */
+ TIME_MSG("starting GUI");
+
+ /* When running "evim" or "gvim -y" we need the menus, exit if we
+--- 551,557 ----
+ putchar('\n');
+ #endif
+
+! gui_start(NULL); /* will set full_screen to TRUE */
+ TIME_MSG("starting GUI");
+
+ /* When running "evim" or "gvim -y" we need the menus, exit if we
+***************
+*** 851,858 ****
+ }
+ #endif
+
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+! mch_set_winsize_now(); /* Allow winsize changes from now on */
+ #endif
+
+ #if defined(FEAT_GUI)
+--- 860,870 ----
+ }
+ #endif
+
+! #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! mch_set_winsize_now(); /* Allow winsize changes from now on */
+ #endif
+
+ #if defined(FEAT_GUI)
+***************
+*** 1761,1767 ****
+--- 1773,1787 ----
+ #ifdef FEAT_GUI
+ ++initstr;
+ #endif
++ #ifdef GUI_MAY_SPAWN
++ gui.dospawn = FALSE; // No need to spawn a new process.
++ #endif
+ }
++ #ifdef GUI_MAY_SPAWN
++ else
++ gui.dospawn = TRUE; // Not "gvim". Need to spawn gvim.exe.
++ #endif
++
+
+ if (STRNICMP(initstr, "view", 4) == 0)
+ {
+***************
+*** 2181,2187 ****
+
+ case 'v': /* "-v" Vi-mode (as if called "vi") */
+ exmode_active = 0;
+! #ifdef FEAT_GUI
+ gui.starting = FALSE; /* don't start GUI */
+ #endif
+ break;
+--- 2201,2207 ----
+
+ case 'v': /* "-v" Vi-mode (as if called "vi") */
+ exmode_active = 0;
+! #if defined(FEAT_GUI) && !defined(VIMDLL)
+ gui.starting = FALSE; /* don't start GUI */
+ #endif
+ break;
+***************
+*** 2558,2565 ****
+ exit(1);
+ }
+ #endif
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+! if (is_cygpty_used())
+ {
+ # if defined(HAVE_BIND_TEXTDOMAIN_CODESET) \
+ && defined(FEAT_GETTEXT)
+--- 2578,2589 ----
+ exit(1);
+ }
+ #endif
+! #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+! if (
+! # ifdef VIMDLL
+! !gui.starting &&
+! # endif
+! is_cygpty_used())
+ {
+ # if defined(HAVE_BIND_TEXTDOMAIN_CODESET) \
+ && defined(FEAT_GETTEXT)
+***************
+*** 3440,3447 ****
+ main_msg(_("--echo-wid\t\tMake gvim echo the Window ID on stdout"));
+ #endif
+ #ifdef FEAT_GUI_MSWIN
+! main_msg(_("-P <parent title>\tOpen Vim inside parent application"));
+! main_msg(_("--windowid <HWND>\tOpen Vim inside another win32 widget"));
+ #endif
+
+ #ifdef FEAT_GUI_GNOME
+--- 3464,3476 ----
+ main_msg(_("--echo-wid\t\tMake gvim echo the Window ID on stdout"));
+ #endif
+ #ifdef FEAT_GUI_MSWIN
+! # ifdef VIMDLL
+! if (gui.starting)
+! # endif
+! {
+! main_msg(_("-P <parent title>\tOpen Vim inside parent application"));
+! main_msg(_("--windowid <HWND>\tOpen Vim inside another win32 widget"));
+! }
+ #endif
+
+ #ifdef FEAT_GUI_GNOME
+*** ../vim-8.1.1229/src/mbyte.c 2019-04-12 20:08:51.478186362 +0200
+--- src/mbyte.c 2019-04-28 18:55:14.816080005 +0200
+***************
+*** 4392,4398 ****
+ # include <langinfo.h>
+ #endif
+
+! #ifndef FEAT_GUI_MSWIN
+ /*
+ * Get the canonicalized encoding from the specified locale string "locale"
+ * or from the environment variables LC_ALL, LC_CTYPE and LANG.
+--- 4392,4398 ----
+ # include <langinfo.h>
+ #endif
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ /*
+ * Get the canonicalized encoding from the specified locale string "locale"
+ * or from the environment variables LC_ALL, LC_CTYPE and LANG.
+*** ../vim-8.1.1229/src/memline.c 2019-03-30 18:46:57.356077354 +0100
+--- src/memline.c 2019-04-28 18:55:14.816080005 +0200
+***************
+*** 4798,4804 ****
+ // 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);
+--- 4798,4804 ----
+ // the messages displayed in the Vim window when
+ // loading a session from the .gvimrc file.
+ if (gui.starting && !gui.in_use)
+! gui_start(NULL);
+ #endif
+ // Show info about the existing swap file.
+ attention_message(buf, fname);
+*** ../vim-8.1.1229/src/message.c 2019-04-24 23:08:20.078079973 +0200
+--- src/message.c 2019-04-28 18:55:14.816080005 +0200
+***************
+*** 2563,2570 ****
+ msg_use_printf(void)
+ {
+ return (!msg_check_screen()
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ || !termcap_active
+ #endif
+ || (swapping_screen() && !termcap_active)
+ );
+--- 2563,2574 ----
+ msg_use_printf(void)
+ {
+ return (!msg_check_screen()
+! #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+! # ifdef VIMDLL
+! || (!gui.in_use && !termcap_active)
+! # else
+ || !termcap_active
++ # endif
+ #endif
+ || (swapping_screen() && !termcap_active)
+ );
+***************
+*** 2940,2954 ****
+ # undef mch_msg
+ #endif
+
+! /*
+! * Give an error message. To be used when the screen hasn't been initialized
+! * yet. When stderr can't be used, collect error messages until the GUI has
+! * started and they can be displayed in a message box.
+! */
+! void
+! mch_errmsg(char *str)
+ {
+- #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ int len = (int)STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode = 0;
+--- 2944,2953 ----
+ # undef mch_msg
+ #endif
+
+! #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+! static void
+! mch_errmsg_c(char *str)
+ {
+ int len = (int)STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode = 0;
+***************
+*** 2966,2999 ****
+ {
+ fprintf(stderr, "%s", str);
+ }
+! #else
+ int len;
+
+! # if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+ /* On Unix use stderr if it's a tty.
+ * When not going to start the GUI also use stderr.
+ * On Mac, when started from Finder, stderr is the console. */
+ if (
+! # ifdef UNIX
+! # ifdef MACOS_X
+ (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
+! # else
+ isatty(2)
+- # endif
+- # ifdef FEAT_GUI
+- ||
+- # endif
+ # endif
+ # ifdef FEAT_GUI
+! !(gui.in_use || gui.starting)
+ # endif
+ )
+ {
+ fprintf(stderr, "%s", str);
+ return;
+ }
+ # endif
+
+ /* avoid a delay for a message that isn't there */
+ emsg_on_display = FALSE;
+
+--- 2965,3021 ----
+ {
+ fprintf(stderr, "%s", str);
+ }
+! }
+! #endif
+!
+! /*
+! * Give an error message. To be used when the screen hasn't been initialized
+! * yet. When stderr can't be used, collect error messages until the GUI has
+! * started and they can be displayed in a message box.
+! */
+! void
+! mch_errmsg(char *str)
+! {
+! #if !defined(MSWIN) || defined(FEAT_GUI_MSWIN)
+ int len;
++ #endif
+
+! #if (defined(UNIX) || defined(FEAT_GUI)) && (!defined(ALWAYS_USE_GUI) || !defined(VIMDLL))
+ /* On Unix use stderr if it's a tty.
+ * When not going to start the GUI also use stderr.
+ * On Mac, when started from Finder, stderr is the console. */
+ if (
+! # ifdef UNIX
+! # ifdef MACOS_X
+ (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
+! # else
+ isatty(2)
+ # endif
+ # ifdef FEAT_GUI
+! ||
+ # endif
++ # endif
++ # ifdef FEAT_GUI
++ !(gui.in_use || gui.starting)
++ # endif
+ )
+ {
+ fprintf(stderr, "%s", str);
+ return;
+ }
++ #endif
++
++ #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
++ # ifdef VIMDLL
++ if (!(gui.in_use || gui.starting))
+ # endif
++ {
++ mch_errmsg_c(str);
++ return;
++ }
++ #endif
+
++ #if !defined(MSWIN) || defined(FEAT_GUI_MSWIN)
+ /* avoid a delay for a message that isn't there */
+ emsg_on_display = FALSE;
+
+***************
+*** 3028,3042 ****
+ #endif
+ }
+
+! /*
+! * Give a message. To be used when the screen hasn't been initialized yet.
+! * When there is no tty, collect messages until the GUI has started and they
+! * can be displayed in a message box.
+! */
+! void
+! mch_msg(char *str)
+ {
+- #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ int len = (int)STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode;
+--- 3050,3059 ----
+ #endif
+ }
+
+! #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+! static void
+! mch_msg_c(char *str)
+ {
+ int len = (int)STRLEN(str);
+ DWORD nwrite = 0;
+ DWORD mode;
+***************
+*** 3055,3086 ****
+ {
+ printf("%s", str);
+ }
+! #else
+! # if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+ /* On Unix use stdout if we have a tty. This allows "vim -h | more" and
+ * uses mch_errmsg() when started from the desktop.
+ * When not going to start the GUI also use stdout.
+ * On Mac, when started from Finder, stderr is the console. */
+ if (
+! # ifdef UNIX
+! # ifdef MACOS_X
+ (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
+! # else
+ isatty(2)
+- # endif
+- # ifdef FEAT_GUI
+- ||
+ # endif
+- # endif
+ # ifdef FEAT_GUI
+! !(gui.in_use || gui.starting)
+ # endif
+ )
+ {
+ printf("%s", str);
+ return;
+ }
+ # endif
+ mch_errmsg(str);
+ #endif
+ }
+--- 3072,3124 ----
+ {
+ printf("%s", str);
+ }
+! }
+! #endif
+!
+! /*
+! * Give a message. To be used when the screen hasn't been initialized yet.
+! * When there is no tty, collect messages until the GUI has started and they
+! * can be displayed in a message box.
+! */
+! void
+! mch_msg(char *str)
+! {
+! #if (defined(UNIX) || defined(FEAT_GUI)) && (!defined(ALWAYS_USE_GUI) || !defined(VIMDLL))
+ /* On Unix use stdout if we have a tty. This allows "vim -h | more" and
+ * uses mch_errmsg() when started from the desktop.
+ * When not going to start the GUI also use stdout.
+ * On Mac, when started from Finder, stderr is the console. */
+ if (
+! # ifdef UNIX
+! # ifdef MACOS_X
+ (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
+! # else
+ isatty(2)
+ # endif
+ # ifdef FEAT_GUI
+! ||
+ # endif
++ # endif
++ # ifdef FEAT_GUI
++ !(gui.in_use || gui.starting)
++ # endif
+ )
+ {
+ printf("%s", str);
+ return;
+ }
++ #endif
++
++ #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
++ # ifdef VIMDLL
++ if (!(gui.in_use || gui.starting))
+ # endif
++ {
++ mch_msg_c(str);
++ return;
++ }
++ #endif
++ #if !defined(MSWIN) || defined(FEAT_GUI_MSWIN)
+ mch_errmsg(str);
+ #endif
+ }
+*** ../vim-8.1.1229/src/misc2.c 2019-04-27 13:03:20.008715938 +0200
+--- src/misc2.c 2019-04-28 18:55:14.820079984 +0200
+***************
+*** 4650,4652 ****
+--- 4650,4729 ----
+ }
+ # endif
+ #endif
++
++ #if defined(FEAT_SESSION) || defined(PROTO)
++ /*
++ * Generate a script that can be used to restore the current editing session.
++ * Save the value of v:this_session before running :mksession in order to make
++ * automagic session save fully transparent. Return TRUE on success.
++ */
++ int
++ write_session_file(char_u *filename)
++ {
++ char_u *escaped_filename;
++ char *mksession_cmdline;
++ unsigned int save_ssop_flags;
++ int failed;
++
++ /*
++ * Build an ex command line to create a script that restores the current
++ * session if executed. Escape the filename to avoid nasty surprises.
++ */
++ escaped_filename = vim_strsave_escaped(filename, escape_chars);
++ if (escaped_filename == NULL)
++ return FALSE;
++ mksession_cmdline = (char *)alloc(10 + (int)STRLEN(escaped_filename) + 1);
++ if (mksession_cmdline == NULL)
++ {
++ vim_free(escaped_filename);
++ return FALSE;
++ }
++ strcpy(mksession_cmdline, "mksession ");
++ STRCAT(mksession_cmdline, escaped_filename);
++ vim_free(escaped_filename);
++
++ /*
++ * Use a reasonable hardcoded set of 'sessionoptions' flags to avoid
++ * unpredictable effects when the session is saved automatically. Also,
++ * we definitely need SSOP_GLOBALS to be able to restore v:this_session.
++ * Don't use SSOP_BUFFERS to prevent the buffer list from becoming
++ * enormously large if the GNOME session feature is used regularly.
++ */
++ save_ssop_flags = ssop_flags;
++ ssop_flags = (SSOP_BLANK|SSOP_CURDIR|SSOP_FOLDS|SSOP_GLOBALS
++ |SSOP_HELP|SSOP_OPTIONS|SSOP_WINSIZE|SSOP_TABPAGES);
++
++ do_cmdline_cmd((char_u *)"let Save_VV_this_session = v:this_session");
++ failed = (do_cmdline_cmd((char_u *)mksession_cmdline) == FAIL);
++ do_cmdline_cmd((char_u *)"let v:this_session = Save_VV_this_session");
++ do_unlet((char_u *)"Save_VV_this_session", TRUE);
++
++ ssop_flags = save_ssop_flags;
++ vim_free(mksession_cmdline);
++
++ /*
++ * Reopen the file and append a command to restore v:this_session,
++ * as if this save never happened. This is to avoid conflicts with
++ * the user's own sessions. FIXME: It's probably less hackish to add
++ * a "stealth" flag to 'sessionoptions' -- gotta ask Bram.
++ */
++ if (!failed)
++ {
++ FILE *fd;
++
++ fd = open_exfile(filename, TRUE, APPENDBIN);
++
++ failed = (fd == NULL
++ || put_line(fd, "let v:this_session = Save_VV_this_session") == FAIL
++ || put_line(fd, "unlet Save_VV_this_session") == FAIL);
++
++ if (fd != NULL && fclose(fd) != 0)
++ failed = TRUE;
++
++ if (failed)
++ mch_remove(filename);
++ }
++
++ return !failed;
++ }
++ #endif
+*** ../vim-8.1.1229/src/normal.c 2019-04-28 18:04:56.058492178 +0200
+--- src/normal.c 2019-04-28 18:55:14.820079984 +0200
+***************
+*** 5394,5401 ****
+ # endif
+ #endif
+ redraw_later(CLEAR);
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+! resize_console_buf();
+ #endif
+ }
+ }
+--- 5394,5404 ----
+ # endif
+ #endif
+ redraw_later(CLEAR);
+! #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! resize_console_buf();
+ #endif
+ }
+ }
+*** ../vim-8.1.1229/src/option.c 2019-04-28 18:04:56.058492178 +0200
+--- src/option.c 2019-04-28 18:55:14.820079984 +0200
+***************
+*** 3321,3329 ****
+ if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL)
+ #if defined(MSWIN)
+ || ((p = mch_getenv((char_u *)"COMSPEC")) != NULL && *p != NUL)
+- # ifdef MSWIN
+ || ((p = (char_u *)default_shell()) != NULL && *p != NUL)
+- # endif
+ #endif
+ )
+ set_string_default_esc("sh", p, TRUE);
+--- 3321,3327 ----
+***************
+*** 3673,3682 ****
+ }
+ #endif
+
+! #if defined(MSWIN) && !defined(FEAT_GUI)
+ /* Win32 console: When GetACP() returns a different value from
+ * GetConsoleCP() set 'termencoding'. */
+! if (GetACP() != GetConsoleCP())
+ {
+ char buf[50];
+
+--- 3671,3684 ----
+ }
+ #endif
+
+! #if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL))
+ /* Win32 console: When GetACP() returns a different value from
+ * GetConsoleCP() set 'termencoding'. */
+! if (
+! # ifdef VIMDLL
+! (!gui.in_use && !gui.starting) &&
+! # endif
+! GetACP() != GetConsoleCP())
+ {
+ char buf[50];
+
+***************
+*** 6856,6866 ****
+ {
+ out_str(T_ME);
+ redraw_later(CLEAR);
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ /* Since t_me has been set, this probably means that the user
+ * wants to use this as default colors. Need to reset default
+ * background/foreground colors. */
+! mch_set_normal_colors();
+ #endif
+ }
+ if (varp == &T_BE && termcap_active)
+--- 6858,6871 ----
+ {
+ out_str(T_ME);
+ redraw_later(CLEAR);
+! #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+ /* Since t_me has been set, this probably means that the user
+ * wants to use this as default colors. Need to reset default
+ * background/foreground colors. */
+! # ifdef VIMDLL
+! if (!gui.in_use && !gui.starting)
+! # endif
+! mch_set_normal_colors();
+ #endif
+ }
+ if (varp == &T_BE && termcap_active)
+***************
+*** 8838,8844 ****
+ {
+ # ifdef FEAT_VTP
+ /* Do not turn on 'tgc' when 24-bit colors are not supported. */
+! if (!has_vtp_working())
+ {
+ p_tgc = 0;
+ return N_("E954: 24-bit colors are not supported on this environment");
+--- 8843,8853 ----
+ {
+ # ifdef FEAT_VTP
+ /* Do not turn on 'tgc' when 24-bit colors are not supported. */
+! if (
+! # ifdef VIMDLL
+! !gui.in_use && !gui.starting &&
+! # endif
+! !has_vtp_working())
+ {
+ p_tgc = 0;
+ return N_("E954: 24-bit colors are not supported on this environment");
+*** ../vim-8.1.1229/src/os_mswin.c 2019-04-28 14:02:25.414687593 +0200
+--- src/os_mswin.c 2019-04-28 19:00:21.650678844 +0200
+***************
+*** 129,135 ****
+ FILE* fdDump = NULL;
+ #endif
+
+! #ifndef FEAT_GUI_MSWIN
+ extern char g_szOrigTitle[];
+ #endif
+
+--- 129,135 ----
+ FILE* fdDump = NULL;
+ #endif
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ extern char g_szOrigTitle[];
+ #endif
+
+***************
+*** 195,200 ****
+--- 195,211 ----
+ #endif
+
+
++ #ifndef PROTO
++ /*
++ * Save the instance handle of the exe/dll.
++ */
++ void
++ SaveInst(HINSTANCE hInst)
++ {
++ g_hinst = hInst;
++ }
++ #endif
++
+ #if defined(FEAT_GUI_MSWIN) || defined(PROTO)
+ /*
+ * GUI version of mch_exit().
+***************
+*** 202,208 ****
+ * Careful: mch_exit() may be called before mch_init()!
+ */
+ void
+! mch_exit(int r)
+ {
+ exiting = TRUE;
+
+--- 213,219 ----
+ * Careful: mch_exit() may be called before mch_init()!
+ */
+ void
+! mch_exit_g(int r)
+ {
+ exiting = TRUE;
+
+***************
+*** 262,269 ****
+ mch_input_isatty(void)
+ {
+ #ifdef FEAT_GUI_MSWIN
+! return OK; /* GUI always has a tty */
+! #else
+ if (isatty(read_cmd_fd))
+ return TRUE;
+ return FALSE;
+--- 273,284 ----
+ mch_input_isatty(void)
+ {
+ #ifdef FEAT_GUI_MSWIN
+! # ifdef VIMDLL
+! if (gui.in_use)
+! # endif
+! return TRUE; /* GUI always has a tty */
+! #endif
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ if (isatty(read_cmd_fd))
+ return TRUE;
+ return FALSE;
+***************
+*** 280,287 ****
+ char_u *icon)
+ {
+ # ifdef FEAT_GUI_MSWIN
+! gui_mch_settitle(title, icon);
+! # else
+ if (title != NULL)
+ {
+ WCHAR *wp = enc_to_utf16(title, NULL);
+--- 295,309 ----
+ char_u *icon)
+ {
+ # ifdef FEAT_GUI_MSWIN
+! # ifdef VIMDLL
+! if (gui.in_use)
+! # endif
+! {
+! gui_mch_settitle(title, icon);
+! return;
+! }
+! # endif
+! # if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ if (title != NULL)
+ {
+ WCHAR *wp = enc_to_utf16(title, NULL);
+***************
+*** 307,314 ****
+ void
+ mch_restore_title(int which UNUSED)
+ {
+! #ifndef FEAT_GUI_MSWIN
+! SetConsoleTitle(g_szOrigTitle);
+ #endif
+ }
+
+--- 329,339 ----
+ void
+ mch_restore_title(int which UNUSED)
+ {
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! SetConsoleTitle(g_szOrigTitle);
+ #endif
+ }
+
+***************
+*** 554,560 ****
+ return n;
+ }
+
+! #if defined(FEAT_GUI_MSWIN) || defined(PROTO)
+ void
+ mch_settmode(int tmode UNUSED)
+ {
+--- 579,585 ----
+ return n;
+ }
+
+! #if (defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)) || defined(PROTO)
+ void
+ mch_settmode(int tmode UNUSED)
+ {
+***************
+*** 596,640 ****
+
+ #if defined(USE_MCH_ERRMSG) || defined(PROTO)
+
+! #ifdef display_errors
+! # undef display_errors
+! #endif
+
+- #ifdef FEAT_GUI
+ /*
+ * Display the saved error message(s).
+ */
+ void
+ display_errors(void)
+ {
+ char *p;
+
+! if (error_ga.ga_data != NULL)
+ {
+! /* avoid putting up a message box with blanks only */
+! for (p = (char *)error_ga.ga_data; *p; ++p)
+! if (!isspace(*p))
+! {
+! (void)gui_mch_dialog(
+ gui.starting ? VIM_INFO :
+ VIM_ERROR,
+ gui.starting ? (char_u *)_("Message") :
+ (char_u *)_("Error"),
+ (char_u *)p, (char_u *)_("&Ok"),
+ 1, NULL, FALSE);
+! break;
+! }
+! ga_clear(&error_ga);
+ }
+! }
+! #else
+! void
+! display_errors(void)
+! {
+ FlushFileBuffers(GetStdHandle(STD_ERROR_HANDLE));
+ }
+ #endif
+- #endif
+
+
+ /*
+--- 621,668 ----
+
+ #if defined(USE_MCH_ERRMSG) || defined(PROTO)
+
+! # ifdef display_errors
+! # undef display_errors
+! # endif
+
+ /*
+ * Display the saved error message(s).
+ */
+ void
+ display_errors(void)
+ {
++ # ifdef FEAT_GUI
+ char *p;
+
+! # ifdef VIMDLL
+! if (gui.in_use || gui.starting)
+! # endif
+ {
+! if (error_ga.ga_data != NULL)
+! {
+! /* avoid putting up a message box with blanks only */
+! for (p = (char *)error_ga.ga_data; *p; ++p)
+! if (!isspace(*p))
+! {
+! (void)gui_mch_dialog(
+ gui.starting ? VIM_INFO :
+ VIM_ERROR,
+ gui.starting ? (char_u *)_("Message") :
+ (char_u *)_("Error"),
+ (char_u *)p, (char_u *)_("&Ok"),
+ 1, NULL, FALSE);
+! break;
+! }
+! ga_clear(&error_ga);
+! }
+! return;
+ }
+! # endif
+! # if !defined(FEAT_GUI) || defined(VIMDLL)
+ FlushFileBuffers(GetStdHandle(STD_ERROR_HANDLE));
++ # endif
+ }
+ #endif
+
+
+ /*
+***************
+*** 717,723 ****
+ }
+
+
+! #ifdef FEAT_GUI_MSWIN
+ /*
+ * return non-zero if a character is available
+ */
+--- 745,751 ----
+ }
+
+
+! #if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
+ /*
+ * return non-zero if a character is available
+ */
+***************
+*** 955,961 ****
+
+ #endif //_DEBUG
+
+! #if !defined(FEAT_GUI) || defined(PROTO)
+ # ifdef FEAT_TITLE
+ extern HWND g_hWnd; /* This is in os_win32.c. */
+ # endif
+--- 983,989 ----
+
+ #endif //_DEBUG
+
+! #if !defined(FEAT_GUI) || defined(VIMDLL) || defined(PROTO)
+ # ifdef FEAT_TITLE
+ extern HWND g_hWnd; /* This is in os_win32.c. */
+ # endif
+***************
+*** 1121,1128 ****
+ VIM_CLEAR(prt_name);
+ }
+ EnableMenuItem(GetSystemMenu(hDlg, FALSE), SC_CLOSE, MF_GRAYED);
+! #ifndef FEAT_GUI
+! BringWindowToTop(s_hwnd);
+ #endif
+ return TRUE;
+
+--- 1149,1159 ----
+ VIM_CLEAR(prt_name);
+ }
+ EnableMenuItem(GetSystemMenu(hDlg, FALSE), SC_CLOSE, MF_GRAYED);
+! #if !defined(FEAT_GUI) || defined(VIMDLL)
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! BringWindowToTop(s_hwnd);
+ #endif
+ return TRUE;
+
+***************
+*** 1155,1161 ****
+ return !*bUserAbort;
+ }
+
+! #ifndef FEAT_GUI
+
+ static UINT_PTR CALLBACK
+ PrintHookProc(
+--- 1186,1192 ----
+ return !*bUserAbort;
+ }
+
+! #if !defined(FEAT_GUI) || defined(VIMDLL)
+
+ static UINT_PTR CALLBACK
+ PrintHookProc(
+***************
+*** 1349,1356 ****
+ bUserAbort = &(psettings->user_abort);
+ vim_memset(&prt_dlg, 0, sizeof(PRINTDLGW));
+ prt_dlg.lStructSize = sizeof(PRINTDLGW);
+! #ifndef FEAT_GUI
+! GetConsoleHwnd(); /* get value of s_hwnd */
+ #endif
+ prt_dlg.hwndOwner = s_hwnd;
+ prt_dlg.Flags = PD_NOPAGENUMS | PD_NOSELECTION | PD_RETURNDC;
+--- 1380,1390 ----
+ bUserAbort = &(psettings->user_abort);
+ vim_memset(&prt_dlg, 0, sizeof(PRINTDLGW));
+ prt_dlg.lStructSize = sizeof(PRINTDLGW);
+! #if !defined(FEAT_GUI) || defined(VIMDLL)
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! GetConsoleHwnd(); /* get value of s_hwnd */
+ #endif
+ prt_dlg.hwndOwner = s_hwnd;
+ prt_dlg.Flags = PD_NOPAGENUMS | PD_NOSELECTION | PD_RETURNDC;
+***************
+*** 1359,1370 ****
+ prt_dlg.hDevMode = stored_dm;
+ prt_dlg.hDevNames = stored_devn;
+ prt_dlg.lCustData = stored_nCopies; // work around bug in print dialog
+! #ifndef FEAT_GUI
+! /*
+! * Use hook to prevent console window being sent to back
+! */
+! prt_dlg.lpfnPrintHook = PrintHookProc;
+! prt_dlg.Flags |= PD_ENABLEPRINTHOOK;
+ #endif
+ prt_dlg.Flags |= stored_nFlags;
+ }
+--- 1393,1409 ----
+ prt_dlg.hDevMode = stored_dm;
+ prt_dlg.hDevNames = stored_devn;
+ prt_dlg.lCustData = stored_nCopies; // work around bug in print dialog
+! #if !defined(FEAT_GUI) || defined(VIMDLL)
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! {
+! /*
+! * Use hook to prevent console window being sent to back
+! */
+! prt_dlg.lpfnPrintHook = PrintHookProc;
+! prt_dlg.Flags |= PD_ENABLEPRINTHOOK;
+! }
+ #endif
+ prt_dlg.Flags |= stored_nFlags;
+ }
+***************
+*** 1374,1381 ****
+ * never show dialog if we are running over telnet
+ */
+ if (forceit
+! #ifndef FEAT_GUI
+ || !term_console
+ #endif
+ )
+ {
+--- 1413,1424 ----
+ * never show dialog if we are running over telnet
+ */
+ if (forceit
+! #if !defined(FEAT_GUI) || defined(VIMDLL)
+! # ifdef VIMDLL
+! || (!gui.in_use && !term_console)
+! # else
+ || !term_console
++ # endif
+ #endif
+ )
+ {
+***************
+*** 1548,1554 ****
+ char szBuffer[300];
+ WCHAR *wp;
+
+! hDlgPrint = CreateDialog(GetModuleHandle(NULL), TEXT("PrintDlgBox"),
+ prt_dlg.hwndOwner, PrintDlgProc);
+ SetAbortProc(prt_dlg.hDC, AbortProc);
+ wsprintf(szBuffer, _("Printing '%s'"), gettail(psettings->jobname));
+--- 1591,1597 ----
+ char szBuffer[300];
+ WCHAR *wp;
+
+! hDlgPrint = CreateDialog(g_hinst, TEXT("PrintDlgBox"),
+ prt_dlg.hwndOwner, PrintDlgProc);
+ SetAbortProc(prt_dlg.hDC, AbortProc);
+ wsprintf(szBuffer, _("Printing '%s'"), gettail(psettings->jobname));
+***************
+*** 1568,1574 ****
+
+ #ifdef FEAT_GUI
+ /* Give focus back to main window (when using MDI). */
+! SetFocus(s_hwnd);
+ #endif
+
+ return (ret > 0);
+--- 1611,1620 ----
+
+ #ifdef FEAT_GUI
+ /* Give focus back to main window (when using MDI). */
+! # ifdef VIMDLL
+! if (gui.in_use)
+! # endif
+! SetFocus(s_hwnd);
+ #endif
+
+ return (ret > 0);
+***************
+*** 1927,1942 ****
+ }
+ #endif
+
+! #if (defined(FEAT_EVAL) && !defined(FEAT_GUI)) || defined(PROTO)
+ /*
+ * Bring ourselves to the foreground. Does work if the OS doesn't allow it.
+ */
+ void
+ win32_set_foreground(void)
+ {
+- # ifndef FEAT_GUI
+ GetConsoleHwnd(); /* get value of s_hwnd */
+- # endif
+ if (s_hwnd != 0)
+ SetForegroundWindow(s_hwnd);
+ }
+--- 1973,1986 ----
+ }
+ #endif
+
+! #if (defined(FEAT_EVAL) && (!defined(FEAT_GUI) || defined(VIMDLL))) || defined(PROTO)
+ /*
+ * Bring ourselves to the foreground. Does work if the OS doesn't allow it.
+ */
+ void
+ win32_set_foreground(void)
+ {
+ GetConsoleHwnd(); /* get value of s_hwnd */
+ if (s_hwnd != 0)
+ SetForegroundWindow(s_hwnd);
+ }
+***************
+*** 2078,2085 ****
+
+ # ifdef FEAT_GUI
+ /* Wake up the main GUI loop. */
+! if (s_hwnd != 0)
+! PostMessage(s_hwnd, WM_NULL, 0, 0);
+ # endif
+ return 1;
+
+--- 2122,2132 ----
+
+ # ifdef FEAT_GUI
+ /* Wake up the main GUI loop. */
+! # ifdef VIMDLL
+! if (gui.in_use)
+! # endif
+! if (s_hwnd != 0)
+! PostMessage(s_hwnd, WM_NULL, 0, 0);
+ # endif
+ return 1;
+
+***************
+*** 2145,2152 ****
+ {
+ /* When the message window is activated (brought to the foreground),
+ * this actually applies to the text window. */
+! #ifndef FEAT_GUI
+! GetConsoleHwnd(); /* get value of s_hwnd */
+ #endif
+ if (s_hwnd != 0)
+ {
+--- 2192,2202 ----
+ {
+ /* When the message window is activated (brought to the foreground),
+ * this actually applies to the text window. */
+! #if !defined(FEAT_GUI) || defined(VIMDLL)
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! GetConsoleHwnd(); /* get value of s_hwnd */
+ #endif
+ if (s_hwnd != 0)
+ {
+***************
+*** 2166,2172 ****
+ serverInitMessaging(void)
+ {
+ WNDCLASS wndclass;
+- HINSTANCE s_hinst;
+
+ /* Clean up on exit */
+ atexit(CleanUpMessaging);
+--- 2216,2221 ----
+***************
+*** 2174,2185 ****
+ /* Register a window class - we only really care
+ * about the window procedure
+ */
+- s_hinst = (HINSTANCE)GetModuleHandle(0);
+ wndclass.style = 0;
+ wndclass.lpfnWndProc = Messaging_WndProc;
+ wndclass.cbClsExtra = 0;
+ wndclass.cbWndExtra = 0;
+! wndclass.hInstance = s_hinst;
+ wndclass.hIcon = NULL;
+ wndclass.hCursor = NULL;
+ wndclass.hbrBackground = NULL;
+--- 2223,2233 ----
+ /* Register a window class - we only really care
+ * about the window procedure
+ */
+ wndclass.style = 0;
+ wndclass.lpfnWndProc = Messaging_WndProc;
+ wndclass.cbClsExtra = 0;
+ wndclass.cbWndExtra = 0;
+! wndclass.hInstance = g_hinst;
+ wndclass.hIcon = NULL;
+ wndclass.hCursor = NULL;
+ wndclass.hbrBackground = NULL;
+***************
+*** 2194,2200 ****
+ WS_POPUPWINDOW | WS_CAPTION,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ 100, 100, NULL, NULL,
+! s_hinst, NULL);
+ }
+
+ /* Used by serverSendToVim() to find an alternate server name. */
+--- 2242,2248 ----
+ WS_POPUPWINDOW | WS_CAPTION,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ 100, 100, NULL, NULL,
+! g_hinst, NULL);
+ }
+
+ /* Used by serverSendToVim() to find an alternate server name. */
+***************
+*** 2744,2755 ****
+ L"Fixedsys" /* see _ReadVimIni */
+ };
+
+! /* Initialise the "current height" to -12 (same as s_lfDefault) just
+! * in case the user specifies a font in "guifont" with no size before a font
+! * with an explicit size has been set. This defaults the size to this value
+! * (-12 equates to roughly 9pt).
+! */
+! int current_font_height = -12; /* also used in gui_w48.c */
+
+ /* Convert a string representing a point size into pixels. The string should
+ * be a positive decimal number, with an optional decimal point (eg, "12", or
+--- 2792,2802 ----
+ L"Fixedsys" /* see _ReadVimIni */
+ };
+
+! // Initialise the "current height" to -12 (same as s_lfDefault) just
+! // in case the user specifies a font in "guifont" with no size before a font
+! // with an explicit size has been set. This defaults the size to this value
+! // (-12 equates to roughly 9pt).
+! int current_font_height = -12; // also used in gui_w32.c
+
+ /* Convert a string representing a point size into pixels. The string should
+ * be a positive decimal number, with an optional decimal point (eg, "12", or
+*** ../vim-8.1.1229/src/os_w32dll.c 2019-04-28 19:44:58.074429436 +0200
+--- src/os_w32dll.c 2019-04-28 18:58:04.375310506 +0200
+***************
+*** 0 ****
+--- 1,27 ----
++ /* 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.
++ */
++ /*
++ * Windows GUI: main program (DLL) entry point:
++ *
++ * Ron Aaron <ronaharon@yahoo.com> wrote this and the DLL support code.
++ * Adapted by Ken Takata.
++ */
++ #ifndef WIN32_LEAN_AND_MEAN
++ # define WIN32_LEAN_AND_MEAN
++ #endif
++ #include <windows.h>
++
++ void SaveInst(HINSTANCE hInst);
++
++ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
++ {
++ if (fdwReason == DLL_PROCESS_ATTACH)
++ SaveInst(hinstDLL);
++ return TRUE;
++ }
+*** ../vim-8.1.1229/src/os_w32exe.c 2019-04-03 20:30:56.085017544 +0200
+--- src/os_w32exe.c 2019-04-28 18:55:14.820079984 +0200
+***************
+*** 22,29 ****
+ #endif
+
+ // cproto doesn't create a prototype for VimMain()
+ int _cdecl VimMain(int argc, char **argv);
+! #ifdef FEAT_GUI
+ void _cdecl SaveInst(HINSTANCE hInst);
+ #endif
+
+--- 22,32 ----
+ #endif
+
+ // cproto doesn't create a prototype for VimMain()
++ #ifdef VIMDLL
++ __declspec(dllimport)
++ #endif
+ int _cdecl VimMain(int argc, char **argv);
+! #ifndef VIMDLL
+ void _cdecl SaveInst(HINSTANCE hInst);
+ #endif
+
+***************
+*** 40,47 ****
+ wmain(int argc UNUSED, wchar_t **argv UNUSED)
+ # endif
+ {
+! # ifdef FEAT_GUI
+ SaveInst(hInstance);
+ # endif
+ VimMain(0, NULL);
+
+--- 43,54 ----
+ wmain(int argc UNUSED, wchar_t **argv UNUSED)
+ # endif
+ {
+! # ifndef VIMDLL
+! # ifdef FEAT_GUI
+ SaveInst(hInstance);
++ # else
++ SaveInst(GetModuleHandleW(NULL));
++ # endif
+ # endif
+ VimMain(0, NULL);
+
+*** ../vim-8.1.1229/src/os_win32.c 2019-04-02 22:15:51.348273497 +0200
+--- src/os_win32.c 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 151,157 ****
+ # define wcsicmp(a, b) wcscmpi((a), (b))
+ #endif
+
+! #ifndef FEAT_GUI_MSWIN
+ /* Win32 Console handles for input and output */
+ static HANDLE g_hConIn = INVALID_HANDLE_VALUE;
+ static HANDLE g_hConOut = INVALID_HANDLE_VALUE;
+--- 151,157 ----
+ # define wcsicmp(a, b) wcscmpi((a), (b))
+ #endif
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ /* Win32 Console handles for input and output */
+ static HANDLE g_hConIn = INVALID_HANDLE_VALUE;
+ static HANDLE g_hConOut = INVALID_HANDLE_VALUE;
+***************
+*** 179,185 ****
+ static void standout(void);
+ static int s_cursor_visible = TRUE;
+ static int did_create_conin = FALSE;
+! #else
+ static int s_dont_use_vimrun = TRUE;
+ static int need_vimrun_warning = FALSE;
+ static char *vimrun_path = "vimrun ";
+--- 179,186 ----
+ static void standout(void);
+ static int s_cursor_visible = TRUE;
+ static int did_create_conin = FALSE;
+! #endif
+! #ifdef FEAT_GUI_MSWIN
+ static int s_dont_use_vimrun = TRUE;
+ static int need_vimrun_warning = FALSE;
+ static char *vimrun_path = "vimrun ";
+***************
+*** 193,199 ****
+ static int conpty_stable = 0;
+ static void vtp_flag_init();
+
+! #ifndef FEAT_GUI_MSWIN
+ static int vtp_working = 0;
+ static void vtp_init();
+ static void vtp_exit();
+--- 194,200 ----
+ static int conpty_stable = 0;
+ static void vtp_flag_init();
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ static int vtp_working = 0;
+ static void vtp_init();
+ static void vtp_exit();
+***************
+*** 227,233 ****
+ # define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
+ #endif
+
+! #ifndef FEAT_GUI_MSWIN
+ static int suppress_winsize = 1; /* don't fiddle with console */
+ #endif
+
+--- 228,234 ----
+ # define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
+ #endif
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ static int suppress_winsize = 1; /* don't fiddle with console */
+ #endif
+
+***************
+*** 235,241 ****
+
+ static BOOL win8_or_later = FALSE;
+
+! #ifndef FEAT_GUI_MSWIN
+ /* Dynamic loading for portability */
+ typedef struct _DYN_CONSOLE_SCREEN_BUFFER_INFOEX
+ {
+--- 236,242 ----
+
+ static BOOL win8_or_later = FALSE;
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ /* Dynamic loading for portability */
+ typedef struct _DYN_CONSOLE_SCREEN_BUFFER_INFOEX
+ {
+***************
+*** 284,290 ****
+ return ver;
+ }
+
+! #ifndef FEAT_GUI_MSWIN
+ /*
+ * Version of ReadConsoleInput() that works with IME.
+ * Works around problems on Windows 8.
+--- 285,291 ----
+ return ver;
+ }
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ /*
+ * Version of ReadConsoleInput() that works with IME.
+ * Works around problems on Windows 8.
+***************
+*** 496,501 ****
+--- 497,524 ----
+ return dll;
+ }
+
++ #if defined(VIMDLL) || defined(PROTO)
++ /*
++ * Check if the current executable file is for the GUI subsystem.
++ */
++ int
++ mch_is_gui_executable(void)
++ {
++ PBYTE pImage = (PBYTE)GetModuleHandle(NULL);
++ PIMAGE_DOS_HEADER pDOS = (PIMAGE_DOS_HEADER)pImage;
++ PIMAGE_NT_HEADERS pPE;
++
++ if (pDOS->e_magic != IMAGE_DOS_SIGNATURE)
++ return FALSE;
++ pPE = (PIMAGE_NT_HEADERS)(pImage + pDOS->e_lfanew);
++ if (pPE->Signature != IMAGE_NT_SIGNATURE)
++ return FALSE;
++ if (pPE->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI)
++ return TRUE;
++ return FALSE;
++ }
++ #endif
++
+ #if defined(DYNAMIC_ICONV) || defined(DYNAMIC_GETTEXT) || defined(PROTO)
+ /*
+ * Get related information about 'funcname' which is imported by 'hInst'.
+***************
+*** 816,822 ****
+ }
+ }
+
+! #ifndef FEAT_GUI_MSWIN
+
+ #define SHIFT (SHIFT_PRESSED)
+ #define CTRL (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED)
+--- 839,845 ----
+ }
+ }
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+
+ #define SHIFT (SHIFT_PRESSED)
+ #define CTRL (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED)
+***************
+*** 1116,1122 ****
+ /*
+ * For the GUI the mouse handling is in gui_w32.c.
+ */
+! # ifdef FEAT_GUI_MSWIN
+ void
+ mch_setmouse(int on UNUSED)
+ {
+--- 1139,1145 ----
+ /*
+ * For the GUI the mouse handling is in gui_w32.c.
+ */
+! # if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
+ void
+ mch_setmouse(int on UNUSED)
+ {
+***************
+*** 1136,1141 ****
+--- 1159,1168 ----
+ {
+ DWORD cmodein;
+
++ # ifdef VIMDLL
++ if (gui.in_use)
++ return;
++ # endif
+ if (!g_fMouseAvail)
+ return;
+
+***************
+*** 1454,1459 ****
+--- 1481,1491 ----
+ int idx;
+ int thickness;
+
++ # ifdef VIMDLL
++ if (gui.in_use)
++ return;
++ # endif
++
+ /*
+ * How the cursor is drawn depends on the current mode.
+ */
+***************
+*** 1467,1473 ****
+ }
+ #endif
+
+! #ifndef FEAT_GUI_MSWIN /* this isn't used for the GUI */
+ /*
+ * Handle FOCUS_EVENT.
+ */
+--- 1499,1505 ----
+ }
+ #endif
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ /*
+ * Handle FOCUS_EVENT.
+ */
+***************
+*** 1677,1689 ****
+ return FALSE;
+ }
+
+- #ifndef FEAT_GUI_MSWIN
+ /*
+ * return non-zero if a character is available
+ */
+ int
+ mch_char_avail(void)
+ {
+ return WaitForChar(0L, FALSE);
+ }
+
+--- 1709,1724 ----
+ return FALSE;
+ }
+
+ /*
+ * return non-zero if a character is available
+ */
+ int
+ mch_char_avail(void)
+ {
++ # ifdef VIMDLL
++ if (gui.in_use)
++ return TRUE;
++ # endif
+ return WaitForChar(0L, FALSE);
+ }
+
+***************
+*** 1694,1703 ****
+ int
+ mch_check_messages(void)
+ {
+ return WaitForChar(0L, TRUE);
+ }
+ # endif
+- #endif
+
+ /*
+ * Create the console input. Used when reading stdin doesn't work.
+--- 1729,1741 ----
+ int
+ mch_check_messages(void)
+ {
++ # ifdef VIMDLL
++ if (gui.in_use)
++ return TRUE;
++ # endif
+ return WaitForChar(0L, TRUE);
+ }
+ # endif
+
+ /*
+ * Create the console input. Used when reading stdin doesn't work.
+***************
+*** 1779,1785 ****
+ long time UNUSED,
+ int tb_change_cnt UNUSED)
+ {
+! #ifndef FEAT_GUI_MSWIN /* this isn't used for the GUI */
+
+ int len;
+ int c;
+--- 1817,1823 ----
+ long time UNUSED,
+ int tb_change_cnt UNUSED)
+ {
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+
+ int len;
+ int c;
+***************
+*** 1787,1792 ****
+--- 1825,1835 ----
+ static char_u typeahead[TYPEAHEADLEN]; /* previously typed bytes. */
+ static int typeaheadlen = 0;
+
++ # ifdef VIMDLL
++ if (gui.in_use)
++ return 0;
++ # endif
++
+ /* First use any typeahead that was kept because "buf" was too small. */
+ if (typeaheadlen > 0)
+ goto theend;
+***************
+*** 2092,2099 ****
+ /*
+ * GUI version of mch_init().
+ */
+! void
+! mch_init(void)
+ {
+ #ifndef __MINGW32__
+ extern int _fmode;
+--- 2135,2142 ----
+ /*
+ * GUI version of mch_init().
+ */
+! static void
+! mch_init_g(void)
+ {
+ #ifndef __MINGW32__
+ extern int _fmode;
+***************
+*** 2160,2166 ****
+ }
+
+
+! #else /* FEAT_GUI_MSWIN */
+
+ #define SRWIDTH(sr) ((sr).Right - (sr).Left + 1)
+ #define SRHEIGHT(sr) ((sr).Bottom - (sr).Top + 1)
+--- 2203,2211 ----
+ }
+
+
+! #endif /* FEAT_GUI_MSWIN */
+!
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+
+ #define SRWIDTH(sr) ((sr).Right - (sr).Left + 1)
+ #define SRHEIGHT(sr) ((sr).Bottom - (sr).Top + 1)
+***************
+*** 2442,2452 ****
+ static ConsoleBuffer g_cbTermcap = { 0 };
+
+ #ifdef FEAT_TITLE
+- #ifdef __BORLANDC__
+- typedef HWND (__stdcall *GETCONSOLEWINDOWPROC)(VOID);
+- #else
+- typedef HWND (WINAPI *GETCONSOLEWINDOWPROC)(VOID);
+- #endif
+ char g_szOrigTitle[256] = { 0 };
+ HWND g_hWnd = NULL; /* also used in os_mswin.c */
+ static HICON g_hOrigIconSmall = NULL;
+--- 2487,2492 ----
+***************
+*** 2563,2570 ****
+ /*
+ * non-GUI version of mch_init().
+ */
+! void
+! mch_init(void)
+ {
+ #ifndef FEAT_RESTORE_ORIG_SCREEN
+ CONSOLE_SCREEN_BUFFER_INFO csbi;
+--- 2603,2610 ----
+ /*
+ * non-GUI version of mch_init().
+ */
+! static void
+! mch_init_c(void)
+ {
+ #ifndef FEAT_RESTORE_ORIG_SCREEN
+ CONSOLE_SCREEN_BUFFER_INFO csbi;
+***************
+*** 2660,2667 ****
+ * Shut down and exit with status `r'
+ * Careful: mch_exit() may be called before mch_init()!
+ */
+! void
+! mch_exit(int r)
+ {
+ exiting = TRUE;
+
+--- 2700,2707 ----
+ * Shut down and exit with status `r'
+ * Careful: mch_exit() may be called before mch_init()!
+ */
+! static void
+! mch_exit_c(int r)
+ {
+ exiting = TRUE;
+
+***************
+*** 2711,2716 ****
+--- 2751,2786 ----
+ }
+ #endif /* !FEAT_GUI_MSWIN */
+
++ void
++ mch_init(void)
++ {
++ #ifdef VIMDLL
++ if (gui.starting)
++ mch_init_g();
++ else
++ mch_init_c();
++ #elif defined(FEAT_GUI_MSWIN)
++ mch_init_g();
++ #else
++ mch_init_c();
++ #endif
++ }
++
++ void
++ mch_exit(int r)
++ {
++ #ifdef VIMDLL
++ if (gui.starting || gui.in_use)
++ mch_exit_g(r);
++ else
++ mch_exit_c(r);
++ #elif defined(FEAT_GUI_MSWIN)
++ mch_exit_g(r);
++ #else
++ mch_exit_c(r);
++ #endif
++ }
++
+ /*
+ * Do we have an interactive window?
+ */
+***************
+*** 2721,2729 ****
+ {
+ get_exe_name();
+
+! #ifdef FEAT_GUI_MSWIN
+ return OK; /* GUI always has a tty */
+ #else
+ if (isatty(1))
+ return OK;
+ return FAIL;
+--- 2791,2803 ----
+ {
+ get_exe_name();
+
+! #if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
+ return OK; /* GUI always has a tty */
+ #else
++ # ifdef VIMDLL
++ if (gui.in_use)
++ return OK;
++ # endif
+ if (isatty(1))
+ return OK;
+ return FAIL;
+***************
+*** 3446,3452 ****
+ #endif
+ }
+
+! #ifndef FEAT_GUI_MSWIN
+
+ /*
+ * handler for ctrl-break, ctrl-c interrupts, and fatal events.
+--- 3520,3526 ----
+ #endif
+ }
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+
+ /*
+ * handler for ctrl-break, ctrl-c interrupts, and fatal events.
+***************
+*** 3516,3521 ****
+--- 3590,3599 ----
+ DWORD cmodeout;
+ BOOL bEnableHandler;
+
++ # ifdef VIMDLL
++ if (gui.in_use)
++ return;
++ # endif
+ GetConsoleMode(g_hConIn, &cmodein);
+ GetConsoleMode(g_hConOut, &cmodeout);
+ if (tmode == TMODE_RAW)
+***************
+*** 3528,3534 ****
+ #endif
+ cmodeout &= ~(
+ #ifdef FEAT_TERMGUICOLORS
+! /* Do not turn off the ENABLE_PROCESSRD_OUTPUT flag when using
+ * VTP. */
+ ((vtp_working) ? 0 : ENABLE_PROCESSED_OUTPUT) |
+ #else
+--- 3606,3612 ----
+ #endif
+ cmodeout &= ~(
+ #ifdef FEAT_TERMGUICOLORS
+! /* Do not turn off the ENABLE_PROCESSED_OUTPUT flag when using
+ * VTP. */
+ ((vtp_working) ? 0 : ENABLE_PROCESSED_OUTPUT) |
+ #else
+***************
+*** 3570,3575 ****
+--- 3648,3657 ----
+ {
+ CONSOLE_SCREEN_BUFFER_INFO csbi;
+
++ # ifdef VIMDLL
++ if (gui.in_use)
++ return OK;
++ # endif
+ if (!g_fTermcapMode && g_cbTermcap.IsValid)
+ {
+ /*
+***************
+*** 3717,3722 ****
+--- 3799,3808 ----
+ {
+ COORD coordScreen;
+
++ # ifdef VIMDLL
++ if (gui.in_use)
++ return;
++ # endif
+ /* Don't change window size while still starting up */
+ if (suppress_winsize != 0)
+ {
+***************
+*** 3744,3749 ****
+--- 3830,3839 ----
+ void
+ mch_new_shellsize(void)
+ {
++ # ifdef VIMDLL
++ if (gui.in_use)
++ return;
++ # endif
+ set_scroll_region(0, 0, Columns - 1, Rows - 1);
+ }
+
+***************
+*** 4369,4375 ****
+ }
+
+ static int
+! mch_system(char *cmd, int options)
+ {
+ /* if we can pipe and the shelltemp option is off */
+ if (!p_stmp)
+--- 4459,4465 ----
+ }
+
+ static int
+! mch_system_g(char *cmd, int options)
+ {
+ /* if we can pipe and the shelltemp option is off */
+ if (!p_stmp)
+***************
+*** 4377,4386 ****
+ else
+ return mch_system_classic(cmd, options);
+ }
+! #else
+
+ static int
+! mch_system(char *cmd, int options)
+ {
+ int ret;
+ WCHAR *wcmd;
+--- 4467,4477 ----
+ else
+ return mch_system_classic(cmd, options);
+ }
+! #endif
+
++ #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ static int
+! mch_system_c(char *cmd, int options)
+ {
+ int ret;
+ WCHAR *wcmd;
+***************
+*** 4396,4401 ****
+--- 4487,4507 ----
+
+ #endif
+
++ static int
++ mch_system(char *cmd, int options)
++ {
++ #ifdef VIMDLL
++ if (gui.in_use)
++ return mch_system_g(cmd, options);
++ else
++ return mch_system_c(cmd, options);
++ #elif defined(FEAT_GUI_MSWIN)
++ return mch_system_g(cmd, options);
++ #else
++ return mch_system_c(cmd, options);
++ #endif
++ }
++
+ #if defined(FEAT_GUI) && defined(FEAT_TERMINAL)
+ /*
+ * Use a terminal window to run a shell command in.
+***************
+*** 4527,4533 ****
+ #endif
+ #if defined(FEAT_GUI) && defined(FEAT_TERMINAL)
+ /* TODO: make the terminal window work with input or output redirected. */
+! if (vim_strchr(p_go, GO_TERMINAL) != NULL
+ && (options & (SHELL_FILTER|SHELL_DOOUT|SHELL_WRITE|SHELL_READ)) == 0)
+ {
+ /* Use a terminal window to run the command in. */
+--- 4633,4643 ----
+ #endif
+ #if defined(FEAT_GUI) && defined(FEAT_TERMINAL)
+ /* TODO: make the terminal window work with input or output redirected. */
+! if (
+! # ifdef VIMDLL
+! gui.in_use &&
+! # endif
+! vim_strchr(p_go, GO_TERMINAL) != NULL
+ && (options & (SHELL_FILTER|SHELL_DOOUT|SHELL_WRITE|SHELL_READ)) == 0)
+ {
+ /* Use a terminal window to run the command in. */
+***************
+*** 4679,4685 ****
+ {
+ x = -1;
+ #ifdef FEAT_GUI_MSWIN
+! emsg(_("E371: Command not found"));
+ #endif
+ }
+
+--- 4789,4798 ----
+ {
+ x = -1;
+ #ifdef FEAT_GUI_MSWIN
+! # ifdef VIMDLL
+! if (gui.in_use)
+! # endif
+! emsg(_("E371: Command not found"));
+ #endif
+ }
+
+***************
+*** 4699,4705 ****
+ {
+ cmdlen = (
+ #ifdef FEAT_GUI_MSWIN
+! (!p_stmp ? 0 : STRLEN(vimrun_path)) +
+ #endif
+ STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10);
+
+--- 4812,4818 ----
+ {
+ cmdlen = (
+ #ifdef FEAT_GUI_MSWIN
+! (gui.in_use ? (!p_stmp ? 0 : STRLEN(vimrun_path)) : 0) +
+ #endif
+ STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10);
+
+***************
+*** 4707,4713 ****
+ if (newcmd != NULL)
+ {
+ #if defined(FEAT_GUI_MSWIN)
+! if (need_vimrun_warning)
+ {
+ char *msg = _("VIMRUN.EXE not found in your $PATH.\n"
+ "External commands will not pause after completion.\n"
+--- 4820,4830 ----
+ if (newcmd != NULL)
+ {
+ #if defined(FEAT_GUI_MSWIN)
+! if (
+! # ifdef VIMDLL
+! gui.in_use &&
+! # endif
+! need_vimrun_warning)
+ {
+ char *msg = _("VIMRUN.EXE not found in your $PATH.\n"
+ "External commands will not pause after completion.\n"
+***************
+*** 4722,4728 ****
+ vim_free(wtitle);
+ need_vimrun_warning = FALSE;
+ }
+! if (!s_dont_use_vimrun && p_stmp)
+ /* Use vimrun to execute the command. It opens a console
+ * window, which can be closed without killing Vim. */
+ vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s",
+--- 4839,4849 ----
+ vim_free(wtitle);
+ need_vimrun_warning = FALSE;
+ }
+! if (
+! # ifdef VIMDLL
+! gui.in_use &&
+! # endif
+! !s_dont_use_vimrun && p_stmp)
+ /* Use vimrun to execute the command. It opens a console
+ * window, which can be closed without killing Vim. */
+ vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s",
+***************
+*** 4746,4752 ****
+ /* Print the return value, unless "vimrun" was used. */
+ if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent
+ #if defined(FEAT_GUI_MSWIN)
+! && ((options & SHELL_DOOUT) || s_dont_use_vimrun || !p_stmp)
+ #endif
+ )
+ {
+--- 4867,4874 ----
+ /* Print the return value, unless "vimrun" was used. */
+ if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent
+ #if defined(FEAT_GUI_MSWIN)
+! && (gui.in_use ?
+! ((options & SHELL_DOOUT) || s_dont_use_vimrun || !p_stmp) : 1)
+ #endif
+ )
+ {
+***************
+*** 5278,5284 ****
+ #endif
+
+
+! #ifndef FEAT_GUI_MSWIN
+
+ /*
+ * Start termcap mode
+--- 5400,5406 ----
+ #endif
+
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+
+ /*
+ * Start termcap mode
+***************
+*** 5397,5403 ****
+ #endif /* FEAT_GUI_MSWIN */
+
+
+! #ifdef FEAT_GUI_MSWIN
+ void
+ mch_write(
+ char_u *s UNUSED,
+--- 5519,5525 ----
+ #endif /* FEAT_GUI_MSWIN */
+
+
+! #if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
+ void
+ mch_write(
+ char_u *s UNUSED,
+***************
+*** 5694,5700 ****
+
+ /*
+ * Set the current text attribute = (foreground | background)
+! * See ../doc/os_win32.txt for the numbers.
+ */
+ static void
+ textattr(WORD wAttr)
+--- 5816,5822 ----
+
+ /*
+ * Set the current text attribute = (foreground | background)
+! * See ../runtime/doc/os_win32.txt for the numbers.
+ */
+ static void
+ textattr(WORD wAttr)
+***************
+*** 5924,5929 ****
+--- 6046,6056 ----
+ char_u *s,
+ int len)
+ {
++ # ifdef VIMDLL
++ if (gui.in_use)
++ return;
++ # endif
++
+ s[len] = NUL;
+
+ if (!term_console)
+***************
+*** 6222,6230 ****
+ long msec,
+ int ignoreinput UNUSED)
+ {
+! #ifdef FEAT_GUI_MSWIN
+ Sleep((int)msec); /* never wait for input */
+ #else /* Console */
+ if (ignoreinput)
+ # ifdef FEAT_MZSCHEME
+ if (mzthreads_allowed() && p_mzq > 0 && msec > p_mzq)
+--- 6349,6364 ----
+ long msec,
+ int ignoreinput UNUSED)
+ {
+! #if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
+ Sleep((int)msec); /* never wait for input */
+ #else /* Console */
++ # ifdef VIMDLL
++ if (gui.in_use)
++ {
++ Sleep((int)msec); /* never wait for input */
++ return;
++ }
++ # endif
+ if (ignoreinput)
+ # ifdef FEAT_MZSCHEME
+ if (mzthreads_allowed() && p_mzq > 0 && msec > p_mzq)
+***************
+*** 6286,6298 ****
+ void
+ mch_breakcheck(int force)
+ {
+! #ifndef FEAT_GUI_MSWIN /* never used */
+! if (g_fCtrlCPressed || g_fCBrkPressed)
+! {
+! ctrl_break_was_pressed = g_fCBrkPressed;
+! g_fCtrlCPressed = g_fCBrkPressed = FALSE;
+! got_int = TRUE;
+! }
+ #endif
+ }
+
+--- 6420,6435 ----
+ void
+ mch_breakcheck(int force)
+ {
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! if (g_fCtrlCPressed || g_fCBrkPressed)
+! {
+! ctrl_break_was_pressed = g_fCBrkPressed;
+! g_fCtrlCPressed = g_fCBrkPressed = FALSE;
+! got_int = TRUE;
+! }
+ #endif
+ }
+
+***************
+*** 6308,6314 ****
+ MEMORYSTATUSEX ms;
+
+ /* Need to use GlobalMemoryStatusEx() when there is more memory than
+! * what fits in 32 bits. But it's not always available. */
+ ms.dwLength = sizeof(MEMORYSTATUSEX);
+ GlobalMemoryStatusEx(&ms);
+ if (ms.ullAvailVirtual < ms.ullTotalPhys)
+--- 6445,6451 ----
+ MEMORYSTATUSEX ms;
+
+ /* Need to use GlobalMemoryStatusEx() when there is more memory than
+! * what fits in 32 bits. */
+ ms.dwLength = sizeof(MEMORYSTATUSEX);
+ GlobalMemoryStatusEx(&ms);
+ if (ms.ullAvailVirtual < ms.ullTotalPhys)
+***************
+*** 7098,7114 ****
+ vtp_flag_init(void)
+ {
+ DWORD ver = get_build_number();
+! #ifndef FEAT_GUI_MSWIN
+ DWORD mode;
+ HANDLE out;
+
+! out = GetStdHandle(STD_OUTPUT_HANDLE);
+
+! vtp_working = (ver >= VTP_FIRST_SUPPORT_BUILD) ? 1 : 0;
+! GetConsoleMode(out, &mode);
+! mode |= (ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
+! if (SetConsoleMode(out, mode) == 0)
+! vtp_working = 0;
+ #endif
+
+ if (ver >= CONPTY_FIRST_SUPPORT_BUILD)
+--- 7235,7256 ----
+ vtp_flag_init(void)
+ {
+ DWORD ver = get_build_number();
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ DWORD mode;
+ HANDLE out;
+
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! {
+! out = GetStdHandle(STD_OUTPUT_HANDLE);
+
+! vtp_working = (ver >= VTP_FIRST_SUPPORT_BUILD) ? 1 : 0;
+! GetConsoleMode(out, &mode);
+! mode |= (ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
+! if (SetConsoleMode(out, mode) == 0)
+! vtp_working = 0;
+! }
+ #endif
+
+ if (ver >= CONPTY_FIRST_SUPPORT_BUILD)
+***************
+*** 7118,7124 ****
+
+ }
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
+
+ static void
+ vtp_init(void)
+--- 7260,7266 ----
+
+ }
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) || defined(PROTO)
+
+ static void
+ vtp_init(void)
+***************
+*** 7343,7349 ****
+ return conpty_stable;
+ }
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
+ void
+ resize_console_buf(void)
+ {
+--- 7485,7491 ----
+ return conpty_stable;
+ }
+
+! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) || defined(PROTO)
+ void
+ resize_console_buf(void)
+ {
+*** ../vim-8.1.1229/src/os_win32.h 2019-02-17 17:44:36.219875473 +0100
+--- src/os_win32.h 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 78,84 ****
+
+ #define HAVE_PUTENV /* at least Bcc 5.2 and MSC have it */
+
+! #ifdef FEAT_GUI_MSWIN
+ # define NO_CONSOLE /* don't included console-only code */
+ #endif
+
+--- 78,84 ----
+
+ #define HAVE_PUTENV /* at least Bcc 5.2 and MSC have it */
+
+! #if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
+ # define NO_CONSOLE /* don't included console-only code */
+ #endif
+
+*** ../vim-8.1.1229/src/proto/gui.pro 2018-05-17 13:52:58.000000000 +0200
+--- src/proto/gui.pro 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 1,5 ****
+ /* gui.c */
+! void gui_start(void);
+ void gui_prepare(int *argc, char **argv);
+ int gui_init_check(void);
+ void gui_init(void);
+--- 1,5 ----
+ /* gui.c */
+! void gui_start(char_u *arg);
+ void gui_prepare(int *argc, char **argv);
+ int gui_init_check(void);
+ void gui_init(void);
+*** ../vim-8.1.1229/src/proto/gui_w32.pro 2019-04-17 18:24:32.006143206 +0200
+--- src/proto/gui_w32.pro 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 61,66 ****
+--- 61,67 ----
+ char_u *gui_mch_browse(int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter);
+ char_u *gui_mch_browsedir(char_u *title, char_u *initdir);
+ void gui_mch_set_parent(char *title);
++ char *gui_mch_do_spawn(char_u *arg);
+ void gui_mch_prepare(int *argc, char **argv);
+ int gui_mch_init(void);
+ void gui_mch_set_shellsize(int width, int height, int min_width, int min_height, int base_width, int base_height, int direction);
+*** ../vim-8.1.1229/src/proto/misc2.pro 2019-02-13 22:45:21.512636158 +0100
+--- src/proto/misc2.pro 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 108,111 ****
+--- 108,112 ----
+ int mch_parse_cmd(char_u *cmd, int use_shcf, char ***argv, int *argc);
+ int build_argv_from_string(char_u *cmd, char ***argv, int *argc);
+ int build_argv_from_list(list_T *l, char ***argv, int *argc);
++ int write_session_file(char_u *filename);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1229/src/proto/os_mswin.pro 2019-03-30 16:24:12.240380238 +0100
+--- src/proto/os_mswin.pro 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 1,5 ****
+ /* os_mswin.c */
+! void mch_exit(int r);
+ void mch_early_init(void);
+ int mch_input_isatty(void);
+ void mch_settitle(char_u *title, char_u *icon);
+--- 1,5 ----
+ /* os_mswin.c */
+! void mch_exit_g(int r);
+ void mch_early_init(void);
+ int mch_input_isatty(void);
+ void mch_settitle(char_u *title, char_u *icon);
+*** ../vim-8.1.1229/src/proto/os_win32.pro 2019-02-17 15:00:48.450637077 +0100
+--- src/proto/os_win32.pro 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 1,5 ****
+--- 1,6 ----
+ /* os_win32.c */
+ HINSTANCE vimLoadLib(char *name);
++ int mch_is_gui_executable(void);
+ HINSTANCE find_imported_module_by_funcname(HINSTANCE hInst, const char *funcname);
+ void *get_dll_import_func(HINSTANCE hInst, const char *funcname);
+ int dyn_libintl_init(void);
+*** ../vim-8.1.1229/src/syntax.c 2019-04-26 22:33:44.896723710 +0200
+--- src/syntax.c 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 8280,8285 ****
+--- 8280,8292 ----
+ * background/foreground colors. */
+ mch_set_normal_colors();
+ #else
++ # ifdef VIMDLL
++ if (!gui.in_use)
++ {
++ mch_set_normal_colors();
++ return;
++ }
++ # endif
+ cterm_normal_fg_color = 0;
+ cterm_normal_fg_bold = 0;
+ cterm_normal_bg_color = 0;
+***************
+*** 9823,9829 ****
+ #endif
+
+ #if (defined(MSWIN) \
+! && !defined(FEAT_GUI_MSWIN) \
+ && defined(FEAT_TERMGUICOLORS)) || defined(PROTO)
+ void
+ syn_id2cterm_bg(int hl_id, int *fgp, int *bgp)
+--- 9830,9836 ----
+ #endif
+
+ #if (defined(MSWIN) \
+! && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL)) \
+ && defined(FEAT_TERMGUICOLORS)) || defined(PROTO)
+ void
+ syn_id2cterm_bg(int hl_id, int *fgp, int *bgp)
+*** ../vim-8.1.1229/src/term.c 2019-04-21 17:22:29.749014298 +0200
+--- src/term.c 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 4094,4100 ****
+ #if defined(MSWIN) && !defined(FEAT_GUI)
+ s = vim_strnsave(string, (int)STRLEN(string) + 1);
+ #else
+! s = vim_strsave(string);
+ #endif
+ if (s == NULL)
+ return;
+--- 4094,4105 ----
+ #if defined(MSWIN) && !defined(FEAT_GUI)
+ s = vim_strnsave(string, (int)STRLEN(string) + 1);
+ #else
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! s = vim_strnsave(string, (int)STRLEN(string) + 1);
+! else
+! # endif
+! s = vim_strsave(string);
+ #endif
+ if (s == NULL)
+ return;
+***************
+*** 4106,4116 ****
+ s[0] = term_7to8bit(string);
+ }
+
+! #if defined(MSWIN) && !defined(FEAT_GUI)
+! if (s[0] == K_NUL)
+ {
+! STRMOVE(s + 1, s);
+! s[1] = 3;
+ }
+ #endif
+
+--- 4111,4126 ----
+ s[0] = term_7to8bit(string);
+ }
+
+! #if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL))
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+ {
+! if (s[0] == K_NUL)
+! {
+! STRMOVE(s + 1, s);
+! s[1] = 3;
+! }
+ }
+ #endif
+
+***************
+*** 6712,6718 ****
+ }
+ #endif
+
+! #if (defined(MSWIN) && !defined(FEAT_GUI)) || defined(PROTO)
+ static char ksme_str[20];
+ static char ksmr_str[20];
+ static char ksmd_str[20];
+--- 6722,6728 ----
+ }
+ #endif
+
+! #if (defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL))) || defined(PROTO)
+ static char ksme_str[20];
+ static char ksmr_str[20];
+ static char ksmd_str[20];
+***************
+*** 6902,6907 ****
+--- 6912,6930 ----
+ return 0x1ffffff;
+ }
+
++ # ifdef VIMDLL
++ static guicolor_T
++ gui_adjust_rgb(guicolor_T c)
++ {
++ if (gui.in_use)
++ return c;
++ else
++ return ((c & 0xff) << 16) | (c & 0x00ff00) | ((c >> 16) & 0xff);
++ }
++ # else
++ # define gui_adjust_rgb(c) (c)
++ # endif
++
+ guicolor_T
+ gui_get_color_cmn(char_u *name)
+ {
+***************
+*** 6973,6985 ****
+ ((hex_digit(name[5]) << 4) + hex_digit(name[6])));
+ if (color > 0xffffff)
+ return INVALCOLOR;
+! return color;
+ }
+
+ /* Check if the name is one of the colors we know */
+ for (i = 0; i < (int)(sizeof(rgb_table) / sizeof(rgb_table[0])); i++)
+ if (STRICMP(name, rgb_table[i].color_name) == 0)
+! return rgb_table[i].color;
+
+ /*
+ * Last attempt. Look in the file "$VIMRUNTIME/rgb.txt".
+--- 6996,7008 ----
+ ((hex_digit(name[5]) << 4) + hex_digit(name[6])));
+ if (color > 0xffffff)
+ return INVALCOLOR;
+! return gui_adjust_rgb(color);
+ }
+
+ /* Check if the name is one of the colors we know */
+ for (i = 0; i < (int)(sizeof(rgb_table) / sizeof(rgb_table[0])); i++)
+ if (STRICMP(name, rgb_table[i].color_name) == 0)
+! return gui_adjust_rgb(rgb_table[i].color);
+
+ /*
+ * Last attempt. Look in the file "$VIMRUNTIME/rgb.txt".
+***************
+*** 7060,7066 ****
+
+ for (i = 0; i < size; i++)
+ if (STRICMP(name, colornames_table[i].color_name) == 0)
+! return colornames_table[i].color;
+
+ return INVALCOLOR;
+ }
+--- 7083,7089 ----
+
+ for (i = 0; i < size; i++)
+ if (STRICMP(name, colornames_table[i].color_name) == 0)
+! return gui_adjust_rgb(colornames_table[i].color);
+
+ return INVALCOLOR;
+ }
+***************
+*** 7072,7082 ****
+
+ if (color > 0xffffff)
+ return INVALCOLOR;
+! return color;
+ }
+ #endif
+
+! #if (defined(MSWIN) && !defined(FEAT_GUI_MSWIN)) || defined(FEAT_TERMINAL) \
+ || defined(PROTO)
+ static int cube_value[] = {
+ 0x00, 0x5F, 0x87, 0xAF, 0xD7, 0xFF
+--- 7095,7105 ----
+
+ if (color > 0xffffff)
+ return INVALCOLOR;
+! return gui_adjust_rgb(color);
+ }
+ #endif
+
+! #if (defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))) || defined(FEAT_TERMINAL) \
+ || defined(PROTO)
+ static int cube_value[] = {
+ 0x00, 0x5F, 0x87, 0xAF, 0xD7, 0xFF
+*** ../vim-8.1.1229/src/terminal.c 2019-04-21 00:00:07.946354820 +0200
+--- src/terminal.c 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 3553,3559 ****
+ }
+ else
+ {
+! #if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+ int tmp;
+ #endif
+
+--- 3553,3559 ----
+ }
+ else
+ {
+! #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+ int tmp;
+ #endif
+
+***************
+*** 3561,3570 ****
+ if (cterm_normal_fg_color > 0)
+ {
+ cterm_color2vterm(cterm_normal_fg_color - 1, fg);
+! # if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+! tmp = fg->red;
+! fg->red = fg->blue;
+! fg->blue = tmp;
+ # endif
+ }
+ # ifdef FEAT_TERMRESPONSE
+--- 3561,3575 ----
+ if (cterm_normal_fg_color > 0)
+ {
+ cterm_color2vterm(cterm_normal_fg_color - 1, fg);
+! # if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! {
+! tmp = fg->red;
+! fg->red = fg->blue;
+! fg->blue = tmp;
+! }
+ # endif
+ }
+ # ifdef FEAT_TERMRESPONSE
+***************
+*** 3575,3584 ****
+ if (cterm_normal_bg_color > 0)
+ {
+ cterm_color2vterm(cterm_normal_bg_color - 1, bg);
+! # if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+! tmp = bg->red;
+! bg->red = bg->blue;
+! bg->blue = tmp;
+ # endif
+ }
+ # ifdef FEAT_TERMRESPONSE
+--- 3580,3594 ----
+ if (cterm_normal_bg_color > 0)
+ {
+ cterm_color2vterm(cterm_normal_bg_color - 1, bg);
+! # if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+! # ifdef VIMDLL
+! if (!gui.in_use)
+! # endif
+! {
+! tmp = fg->red;
+! fg->red = fg->blue;
+! fg->blue = tmp;
+! }
+ # endif
+ }
+ # ifdef FEAT_TERMRESPONSE
+***************
+*** 3887,3893 ****
+ #endif
+ {
+ // We roughly estimate the position of the terminal window inside
+! // the Vim window by assuing a 10 x 7 character cell.
+ x += wp->w_wincol * 7;
+ y += W_WINROW(wp) * 10;
+ }
+--- 3897,3903 ----
+ #endif
+ {
+ // We roughly estimate the position of the terminal window inside
+! // the Vim window by assuming a 10 x 7 character cell.
+ x += wp->w_wincol * 7;
+ y += W_WINROW(wp) * 10;
+ }
+*** ../vim-8.1.1229/src/ui.c 2019-04-06 22:01:20.756989404 +0200
+--- src/ui.c 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 643,649 ****
+ if (gui.in_use)
+ return gui_mch_get_winpos(x, y);
+ # endif
+! # if defined(MSWIN) && !defined(FEAT_GUI)
+ return mch_get_winpos(x, y);
+ # else
+ # if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
+--- 643,649 ----
+ if (gui.in_use)
+ return gui_mch_get_winpos(x, y);
+ # endif
+! # if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL))
+ return mch_get_winpos(x, y);
+ # else
+ # if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
+*** ../vim-8.1.1229/src/version.c 2019-04-28 18:39:59.559845361 +0200
+--- src/version.c 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 3420,3429 ****
+ msg(longVersion);
+ #ifdef MSWIN
+ # ifdef FEAT_GUI_MSWIN
+! # ifdef _WIN64
+! msg_puts(_("\nMS-Windows 64-bit GUI version"));
+ # else
+ msg_puts(_("\nMS-Windows 32-bit GUI version"));
+ # endif
+ # ifdef FEAT_OLE
+ msg_puts(_(" with OLE support"));
+--- 3422,3439 ----
+ msg(longVersion);
+ #ifdef MSWIN
+ # ifdef FEAT_GUI_MSWIN
+! # ifdef VIMDLL
+! # ifdef _WIN64
+! msg_puts(_("\nMS-Windows 64-bit GUI/console version"));
+! # else
+! msg_puts(_("\nMS-Windows 32-bit GUI/console version"));
+! # endif
+ # else
++ # ifdef _WIN64
++ msg_puts(_("\nMS-Windows 64-bit GUI version"));
++ # else
+ msg_puts(_("\nMS-Windows 32-bit GUI version"));
++ # endif
+ # endif
+ # ifdef FEAT_OLE
+ msg_puts(_(" with OLE support"));
+*** ../vim-8.1.1229/src/vim.rc 2019-02-18 21:41:34.477750367 +0100
+--- src/vim.rc 2019-04-28 18:55:14.828079949 +0200
+***************
+*** 23,29 ****
+ //
+ IDR_VIM ICON "vim.ico"
+
+! #ifdef FEAT_GUI_MSWIN
+ IDR_VIM_ERROR ICON "vim_error.ico"
+ IDR_VIM_ALERT ICON "vim_alert.ico"
+ IDR_VIM_INFO ICON "vim_info.ico"
+--- 23,29 ----
+ //
+ IDR_VIM ICON "vim.ico"
+
+! #if (defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)) || defined(RCDLL)
+ IDR_VIM_ERROR ICON "vim_error.ico"
+ IDR_VIM_ALERT ICON "vim_alert.ico"
+ IDR_VIM_INFO ICON "vim_info.ico"
+***************
+*** 34,40 ****
+--- 34,42 ----
+ //
+ IDB_TEAROFF BITMAP DISCARDABLE "tearoff.bmp"
+ IDR_TOOLBAR1 BITMAP DISCARDABLE "tools.bmp"
++ #endif // FEAT_GUI_MSWIN
+
++ #ifndef RCDLL
+ //
+ // WinXP theme support
+ //
+***************
+*** 46,52 ****
+ #endif
+
+ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gvim.exe.mnf"
+! #endif // FEAT_GUI_MSWIN
+
+ //
+ // Type Library
+--- 48,54 ----
+ #endif
+
+ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gvim.exe.mnf"
+! #endif // RCDLL
+
+ //
+ // Type Library
+***************
+*** 79,85 ****
+--- 81,91 ----
+ #endif
+
+ FILEOS VOS__WINDOWS32
++ #ifdef RCDLL
++ FILETYPE VFT_DLL
++ #else
+ FILETYPE VFT_APP
++ #endif
+ FILESUBTYPE 0x0L
+ BEGIN
+ BLOCK "StringFileInfo"
+***************
+*** 93,99 ****
+ VALUE "InternalName", "VIM\0"
+ VALUE "LegalCopyright", "Copyright \251 1996\0"
+ VALUE "LegalTrademarks", "Vim\0"
+! VALUE "OriginalFilename", "VIM.EXE\0"
+ VALUE "ProductName", "Vim\0"
+ VALUE "ProductVersion", VIM_VERSION_MAJOR_STR ", " VIM_VERSION_MINOR_STR ", " VIM_VERSION_BUILD_STR ", " VIM_VERSION_PATCHLEVEL_STR "\0"
+ END
+--- 99,111 ----
+ VALUE "InternalName", "VIM\0"
+ VALUE "LegalCopyright", "Copyright \251 1996\0"
+ VALUE "LegalTrademarks", "Vim\0"
+! #ifdef VIMDLLBASE
+! VALUE "OriginalFilename", VIMDLLBASE ".dll\0"
+! #elif defined(FEAT_GUI_MSWIN)
+! VALUE "OriginalFilename", "gvim.exe\0"
+! #else
+! VALUE "OriginalFilename", "vim.exe\0"
+! #endif
+ VALUE "ProductName", "Vim\0"
+ VALUE "ProductVersion", VIM_VERSION_MAJOR_STR ", " VIM_VERSION_MINOR_STR ", " VIM_VERSION_BUILD_STR ", " VIM_VERSION_PATCHLEVEL_STR "\0"
+ END
+***************
+*** 104,109 ****
+--- 116,122 ----
+ END
+ END
+
++ #if !defined(VIMDLL) || defined(RCDLL)
+ /*
+ * Printing Status Dialog (should only be used when FEAT_PRINTER is defined)
+ */
+***************
+*** 121,123 ****
+--- 134,137 ----
+ CTEXT "Initializing...",IDC_PROGRESS,24,38,157,9
+ GROUPBOX "",IDC_BOX1,19,9,170,47
+ END
++ #endif
+*** ../vim-8.1.1229/src/version.c 2019-04-28 18:39:59.559845361 +0200
+--- src/version.c 2019-04-28 18:55:14.824079967 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1230,
+ /**/
+
+--
+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.1231 b/data/vim/patches/8.1.1231
new file mode 100644
index 000000000..d7365dffd
--- /dev/null
+++ b/data/vim/patches/8.1.1231
@@ -0,0 +1,943 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1231
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1231
+Problem: Asking about existing swap file unnecessarily.
+Solution: When it is safe, delete the swap file. Remove
+ HAS_SWAP_EXISTS_ACTION, it is always defined. (closes #1237)
+Files: src/memline.c, src/globals.h, src/buffer.c, src/ex_cmds.c,
+ src/fileio.c, src/main.c, src/testdir/test_swap.vim,
+ runtime/doc/usr_11.txt, src/os_win32.c, src/proto/os_win32.pro,
+ src/os_unix.c, src/proto/os_unix.pro
+
+
+*** ../vim-8.1.1230/src/memline.c 2019-04-28 19:46:17.030060105 +0200
+--- src/memline.c 2019-04-28 22:22:42.217091959 +0200
+***************
+*** 2159,2167 ****
+ {
+ msg_puts(_("\n process ID: "));
+ msg_outnum(char_to_long(b0.b0_pid));
+! #if defined(UNIX)
+! /* 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)
+--- 2159,2166 ----
+ {
+ msg_puts(_("\n process ID: "));
+ msg_outnum(char_to_long(b0.b0_pid));
+! #if defined(UNIX) || defined(MSWIN)
+! if (mch_process_running((pid_t)char_to_long(b0.b0_pid)))
+ {
+ msg_puts(_(" (STILL RUNNING)"));
+ # if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+***************
+*** 2193,2198 ****
+--- 2192,2248 ----
+ return x;
+ }
+
++ /*
++ * Return TRUE if the swap file looks OK and there are no changes, thus it can
++ * be safely deleted.
++ */
++ static time_t
++ swapfile_unchanged(char_u *fname)
++ {
++ stat_T st;
++ int fd;
++ struct block0 b0;
++ int ret = TRUE;
++ #ifdef UNIX
++ long pid;
++ #endif
++
++ // must be able to stat the swap file
++ if (mch_stat((char *)fname, &st) == -1)
++ return FALSE;
++
++ // must be able to read the first block
++ fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0);
++ if (fd < 0)
++ return FALSE;
++ if (read_eintr(fd, &b0, sizeof(b0)) != sizeof(b0))
++ {
++ close(fd);
++ return FALSE;
++ }
++
++ // the ID and magic number must be correct
++ if (ml_check_b0_id(&b0) == FAIL|| b0_magic_wrong(&b0))
++ ret = FALSE;
++
++ // must be unchanged
++ if (b0.b0_dirty)
++ ret = FALSE;
++
++ #if defined(UNIX) || defined(MSWIN)
++ // process must known and not be running
++ pid = char_to_long(b0.b0_pid);
++ if (pid == 0L || mch_process_running((pid_t)pid))
++ ret = FALSE;
++ #endif
++
++ // TODO: Should we check if the swap file was created on the current
++ // system? And the current user?
++
++ close(fd);
++ return ret;
++ }
++
+ static int
+ recov_file_names(char_u **names, char_u *path, int prepend_dot)
+ {
+***************
+*** 4757,4765 ****
+ if (differ == FALSE && !(curbuf->b_flags & BF_RECOVERED)
+ && vim_strchr(p_shm, SHM_ATTENTION) == NULL)
+ {
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ int choice = 0;
+! #endif
+ #ifdef CREATE_DUMMY_FILE
+ int did_use_dummy = FALSE;
+
+--- 4807,4814 ----
+ if (differ == FALSE && !(curbuf->b_flags & BF_RECOVERED)
+ && vim_strchr(p_shm, SHM_ATTENTION) == NULL)
+ {
+ int choice = 0;
+! stat_T st;
+ #ifdef CREATE_DUMMY_FILE
+ int did_use_dummy = FALSE;
+
+***************
+*** 4779,4791 ****
+ #if (defined(UNIX) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
+ process_still_running = FALSE;
+ #endif
+ #if defined(FEAT_EVAL)
+ /*
+ * If there is an SwapExists autocommand and we can handle
+ * the response, trigger it. It may return 0 to ask the
+ * user anyway.
+ */
+! if (swap_exists_action != SEA_NONE
+ && has_autocmd(EVENT_SWAPEXISTS, buf_fname, buf))
+ choice = do_swapexists(buf, fname);
+
+--- 4828,4852 ----
+ #if (defined(UNIX) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
+ process_still_running = FALSE;
+ #endif
++ // It's safe to delete the swap file if all these are true:
++ // - the edited file exists
++ // - the swap file has no changes and looks OK
++ if (mch_stat((char *)buf->b_fname, &st) == 0
++ && swapfile_unchanged(fname))
++ {
++ choice = 4;
++ if (p_verbose > 0)
++ verb_msg(_("Found a swap file that is not useful, deleting it"));
++ }
++
+ #if defined(FEAT_EVAL)
+ /*
+ * If there is an SwapExists autocommand and we can handle
+ * the response, trigger it. It may return 0 to ask the
+ * user anyway.
+ */
+! if (choice == 0
+! && swap_exists_action != SEA_NONE
+ && has_autocmd(EVENT_SWAPEXISTS, buf_fname, buf))
+ choice = do_swapexists(buf, fname);
+
+***************
+*** 4850,4856 ****
+ }
+ #endif
+
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ if (choice > 0)
+ {
+ switch (choice)
+--- 4911,4916 ----
+***************
+*** 4880,4886 ****
+ break;
+ }
+ else
+- #endif
+ {
+ msg_puts("\n");
+ if (msg_silent == 0)
+--- 4940,4945 ----
+*** ../vim-8.1.1230/src/globals.h 2019-04-28 19:46:17.026060122 +0200
+--- src/globals.h 2019-04-28 22:14:01.975212661 +0200
+***************
+*** 966,972 ****
+ EXTERN int emsg_noredir INIT(= 0); /* don't redirect error messages */
+ EXTERN int cmd_silent INIT(= FALSE); /* don't echo the command line */
+
+- # define HAS_SWAP_EXISTS_ACTION
+ EXTERN int swap_exists_action INIT(= SEA_NONE);
+ /* For dialog when swap file already
+ * exists. */
+--- 966,971 ----
+***************
+*** 1644,1649 ****
+--- 1643,1651 ----
+ #endif
+
+ #ifdef MSWIN
++ # ifdef PROTO
++ typedef int HINSTANCE;
++ # endif
+ EXTERN int ctrl_break_was_pressed INIT(= FALSE);
+ EXTERN HINSTANCE g_hinst INIT(= NULL);
+ #endif
+*** ../vim-8.1.1230/src/buffer.c 2019-04-28 18:04:56.054492198 +0200
+--- src/buffer.c 2019-04-28 20:19:17.859717974 +0200
+***************
+*** 972,1014 ****
+ int dir,
+ int count)
+ {
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ bufref_T old_curbuf;
+
+ set_bufref(&old_curbuf, curbuf);
+
+ swap_exists_action = SEA_DIALOG;
+- #endif
+ (void)do_buffer(*eap->cmd == 's' ? DOBUF_SPLIT : DOBUF_GOTO,
+ start, dir, count, eap->forceit);
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ if (swap_exists_action == SEA_QUIT && *eap->cmd == 's')
+ {
+! # if defined(FEAT_EVAL)
+ cleanup_T cs;
+
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a window. */
+ enter_cleanup(&cs);
+! # endif
+
+ /* Quitting means closing the split window, nothing else. */
+ win_close(curwin, TRUE);
+ swap_exists_action = SEA_NONE;
+ swap_exists_did_quit = TRUE;
+
+! # 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
+ }
+ else
+ handle_swap_exists(&old_curbuf);
+- #endif
+ }
+
+- #if defined(HAS_SWAP_EXISTS_ACTION) || defined(PROTO)
+ /*
+ * Handle the situation of swap_exists_action being set.
+ * It is allowed for "old_curbuf" to be NULL or invalid.
+--- 972,1009 ----
+ int dir,
+ int count)
+ {
+ bufref_T old_curbuf;
+
+ set_bufref(&old_curbuf, curbuf);
+
+ swap_exists_action = SEA_DIALOG;
+ (void)do_buffer(*eap->cmd == 's' ? DOBUF_SPLIT : DOBUF_GOTO,
+ start, dir, count, eap->forceit);
+ if (swap_exists_action == SEA_QUIT && *eap->cmd == 's')
+ {
+! #if defined(FEAT_EVAL)
+ cleanup_T cs;
+
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a window. */
+ enter_cleanup(&cs);
+! #endif
+
+ /* Quitting means closing the split window, nothing else. */
+ win_close(curwin, TRUE);
+ swap_exists_action = SEA_NONE;
+ swap_exists_did_quit = TRUE;
+
+! #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
+ }
+ else
+ handle_swap_exists(&old_curbuf);
+ }
+
+ /*
+ * Handle the situation of swap_exists_action being set.
+ * It is allowed for "old_curbuf" to be NULL or invalid.
+***************
+*** 1016,1036 ****
+ void
+ handle_swap_exists(bufref_T *old_curbuf)
+ {
+! # if defined(FEAT_EVAL)
+ cleanup_T cs;
+! # endif
+! # ifdef FEAT_SYN_HL
+ long old_tw = curbuf->b_p_tw;
+! # endif
+ buf_T *buf;
+
+ if (swap_exists_action == SEA_QUIT)
+ {
+! # if defined(FEAT_EVAL)
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a buffer. */
+ enter_cleanup(&cs);
+! # endif
+
+ /* User selected Quit at ATTENTION prompt. Go back to previous
+ * buffer. If that buffer is gone or the same as the current one,
+--- 1011,1031 ----
+ void
+ handle_swap_exists(bufref_T *old_curbuf)
+ {
+! #if defined(FEAT_EVAL)
+ cleanup_T cs;
+! #endif
+! #ifdef FEAT_SYN_HL
+ long old_tw = curbuf->b_p_tw;
+! #endif
+ buf_T *buf;
+
+ if (swap_exists_action == SEA_QUIT)
+ {
+! #if defined(FEAT_EVAL)
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a buffer. */
+ enter_cleanup(&cs);
+! #endif
+
+ /* User selected Quit at ATTENTION prompt. Go back to previous
+ * buffer. If that buffer is gone or the same as the current one,
+***************
+*** 1053,1078 ****
+ // 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);
+! # endif
+ }
+ /* If "old_curbuf" is NULL we are in big trouble here... */
+
+! # 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
+ }
+ else if (swap_exists_action == SEA_RECOVER)
+ {
+! # if defined(FEAT_EVAL)
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a buffer. */
+ enter_cleanup(&cs);
+! # endif
+
+ /* User selected Recover at ATTENTION prompt. */
+ msg_scroll = TRUE;
+--- 1048,1073 ----
+ // 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);
+! #endif
+ }
+ /* If "old_curbuf" is NULL we are in big trouble here... */
+
+! #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
+ }
+ else if (swap_exists_action == SEA_RECOVER)
+ {
+! #if defined(FEAT_EVAL)
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a buffer. */
+ enter_cleanup(&cs);
+! #endif
+
+ /* User selected Recover at ATTENTION prompt. */
+ msg_scroll = TRUE;
+***************
+*** 1081,1095 ****
+ cmdline_row = msg_row;
+ do_modelines(0);
+
+! # 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
+ }
+ swap_exists_action = SEA_NONE;
+ }
+- #endif
+
+ /*
+ * do_bufdel() - delete or unload buffer(s)
+--- 1076,1089 ----
+ cmdline_row = msg_row;
+ do_modelines(0);
+
+! #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
+ }
+ swap_exists_action = SEA_NONE;
+ }
+
+ /*
+ * do_bufdel() - delete or unload buffer(s)
+***************
+*** 5259,5286 ****
+ continue;
+
+ /* Open the buffer in this window. */
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ swap_exists_action = SEA_DIALOG;
+- #endif
+ set_curbuf(buf, DOBUF_GOTO);
+ if (!bufref_valid(&bufref))
+ {
+ /* autocommands deleted the buffer!!! */
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ swap_exists_action = SEA_NONE;
+- #endif
+ break;
+ }
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ if (swap_exists_action == SEA_QUIT)
+ {
+! # if defined(FEAT_EVAL)
+ cleanup_T cs;
+
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a window. */
+ enter_cleanup(&cs);
+! # endif
+
+ /* User selected Quit at ATTENTION prompt; close this window. */
+ win_close(curwin, TRUE);
+--- 5253,5275 ----
+ continue;
+
+ /* Open the buffer in this window. */
+ swap_exists_action = SEA_DIALOG;
+ set_curbuf(buf, DOBUF_GOTO);
+ if (!bufref_valid(&bufref))
+ {
+ /* autocommands deleted the buffer!!! */
+ swap_exists_action = SEA_NONE;
+ break;
+ }
+ if (swap_exists_action == SEA_QUIT)
+ {
+! #if defined(FEAT_EVAL)
+ cleanup_T cs;
+
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a window. */
+ enter_cleanup(&cs);
+! #endif
+
+ /* User selected Quit at ATTENTION prompt; close this window. */
+ win_close(curwin, TRUE);
+***************
+*** 5288,5303 ****
+ swap_exists_action = SEA_NONE;
+ swap_exists_did_quit = TRUE;
+
+! # 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
+ }
+ else
+ handle_swap_exists(NULL);
+- #endif
+ }
+
+ ui_breakcheck();
+--- 5277,5291 ----
+ swap_exists_action = SEA_NONE;
+ swap_exists_did_quit = TRUE;
+
+! #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
+ }
+ else
+ handle_swap_exists(NULL);
+ }
+
+ ui_breakcheck();
+*** ../vim-8.1.1230/src/ex_cmds.c 2019-04-28 19:46:17.022060143 +0200
+--- src/ex_cmds.c 2019-04-28 20:19:31.859649114 +0200
+***************
+*** 4258,4266 ****
+ topline = curwin->w_topline;
+ if (!oldbuf) /* need to read the file */
+ {
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ swap_exists_action = SEA_DIALOG;
+- #endif
+ curbuf->b_flags |= BF_CHECK_RO; /* set/reset 'ro' flag */
+
+ /*
+--- 4258,4264 ----
+***************
+*** 4273,4283 ****
+ (void)open_buffer(FALSE, eap, readfile_flags);
+ #endif
+
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ if (swap_exists_action == SEA_QUIT)
+ retval = FAIL;
+ handle_swap_exists(&old_curbuf);
+- #endif
+ }
+ else
+ {
+--- 4271,4279 ----
+*** ../vim-8.1.1230/src/fileio.c 2019-04-28 19:46:17.026060122 +0200
+--- src/fileio.c 2019-04-28 20:19:41.807600177 +0200
+***************
+*** 684,698 ****
+ #endif
+ }
+
+! #if defined(HAS_SWAP_EXISTS_ACTION)
+! /* If "Quit" selected at ATTENTION dialog, don't load the file */
+ if (swap_exists_action == SEA_QUIT)
+ {
+ if (!read_buffer && !read_stdin)
+ close(fd);
+ return FAIL;
+ }
+- #endif
+
+ ++no_wait_return; /* don't wait for return yet */
+
+--- 684,696 ----
+ #endif
+ }
+
+! // If "Quit" selected at ATTENTION dialog, don't load the file
+ if (swap_exists_action == SEA_QUIT)
+ {
+ if (!read_buffer && !read_stdin)
+ close(fd);
+ return FAIL;
+ }
+
+ ++no_wait_return; /* don't wait for return yet */
+
+*** ../vim-8.1.1230/src/main.c 2019-04-28 19:46:17.030060105 +0200
+--- src/main.c 2019-04-28 20:21:01.743207196 +0200
+***************
+*** 50,58 ****
+ static void exe_commands(mparm_T *parmp);
+ static void source_startup_scripts(mparm_T *parmp);
+ static void main_start_gui(void);
+- # if defined(HAS_SWAP_EXISTS_ACTION)
+ static void check_swap_exists_action(void);
+- # endif
+ # ifdef FEAT_EVAL
+ static void set_progpath(char_u *argv0);
+ # endif
+--- 50,56 ----
+***************
+*** 784,802 ****
+ */
+ if (params.tagname != NULL)
+ {
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ swap_exists_did_quit = FALSE;
+- #endif
+
+ vim_snprintf((char *)IObuff, IOSIZE, "ta %s", params.tagname);
+ do_cmdline_cmd(IObuff);
+ TIME_MSG("jumping to tag");
+
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ /* If the user doesn't want to edit the file then we quit here. */
+ if (swap_exists_did_quit)
+ getout(1);
+- #endif
+ }
+
+ /* Execute any "+", "-c" and "-S" arguments. */
+--- 782,796 ----
+***************
+*** 2625,2644 ****
+ {
+ int i;
+
+! #if defined(HAS_SWAP_EXISTS_ACTION)
+! /* When getting the ATTENTION prompt here, use a dialog */
+ swap_exists_action = SEA_DIALOG;
+! #endif
+ no_wait_return = TRUE;
+ i = msg_didany;
+ set_buflisted(TRUE);
+! (void)open_buffer(TRUE, NULL, 0); /* create memfile and read file */
+ no_wait_return = FALSE;
+ msg_didany = i;
+ TIME_MSG("reading stdin");
+! #if defined(HAS_SWAP_EXISTS_ACTION)
+ check_swap_exists_action();
+- #endif
+ #if !(defined(AMIGA) || defined(MACOS_X))
+ /*
+ * Close stdin and dup it from stderr. Required for GPM to work
+--- 2619,2636 ----
+ {
+ int i;
+
+! // When getting the ATTENTION prompt here, use a dialog
+ swap_exists_action = SEA_DIALOG;
+!
+ no_wait_return = TRUE;
+ i = msg_didany;
+ set_buflisted(TRUE);
+! (void)open_buffer(TRUE, NULL, 0); // create memfile and read file
+ no_wait_return = FALSE;
+ msg_didany = i;
+ TIME_MSG("reading stdin");
+!
+ check_swap_exists_action();
+ #if !(defined(AMIGA) || defined(MACOS_X))
+ /*
+ * Close stdin and dup it from stderr. Required for GPM to work
+***************
+*** 2741,2756 ****
+ if (p_fdls >= 0)
+ curwin->w_p_fdl = p_fdls;
+ #endif
+! #if defined(HAS_SWAP_EXISTS_ACTION)
+! /* When getting the ATTENTION prompt here, use a dialog */
+ swap_exists_action = SEA_DIALOG;
+! #endif
+ set_buflisted(TRUE);
+
+ /* create memfile, read file */
+ (void)open_buffer(FALSE, NULL, 0);
+
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ if (swap_exists_action == SEA_QUIT)
+ {
+ if (got_int || only_one_window())
+--- 2733,2746 ----
+ if (p_fdls >= 0)
+ curwin->w_p_fdl = p_fdls;
+ #endif
+! // When getting the ATTENTION prompt here, use a dialog
+ swap_exists_action = SEA_DIALOG;
+!
+ set_buflisted(TRUE);
+
+ /* create memfile, read file */
+ (void)open_buffer(FALSE, NULL, 0);
+
+ if (swap_exists_action == SEA_QUIT)
+ {
+ if (got_int || only_one_window())
+***************
+*** 2768,2774 ****
+ }
+ else
+ handle_swap_exists(NULL);
+- #endif
+ dorewind = TRUE; /* start again */
+ }
+ ui_breakcheck();
+--- 2758,2763 ----
+***************
+*** 2865,2877 ****
+ curwin->w_arg_idx = arg_idx;
+ /* Edit file from arg list, if there is one. When "Quit" selected
+ * at the ATTENTION prompt close the window. */
+- # ifdef HAS_SWAP_EXISTS_ACTION
+ swap_exists_did_quit = FALSE;
+- # endif
+ (void)do_ecmd(0, arg_idx < GARGCOUNT
+ ? alist_name(&GARGLIST[arg_idx]) : NULL,
+ NULL, NULL, ECMD_LASTL, ECMD_HIDE, curwin);
+- # ifdef HAS_SWAP_EXISTS_ACTION
+ if (swap_exists_did_quit)
+ {
+ /* abort or quit selected */
+--- 2854,2863 ----
+***************
+*** 2884,2890 ****
+ win_close(curwin, TRUE);
+ advance = FALSE;
+ }
+- # endif
+ if (arg_idx == GARGCOUNT - 1)
+ arg_had_last = TRUE;
+ ++arg_idx;
+--- 2870,2875 ----
+***************
+*** 3485,3491 ****
+ mch_exit(0);
+ }
+
+- #if defined(HAS_SWAP_EXISTS_ACTION)
+ /*
+ * Check the result of the ATTENTION dialog:
+ * When "Quit" selected, exit Vim.
+--- 3470,3475 ----
+***************
+*** 3498,3504 ****
+ getout(1);
+ handle_swap_exists(NULL);
+ }
+- #endif
+
+ #endif /* NO_VIM_MAIN */
+
+--- 3482,3487 ----
+*** ../vim-8.1.1230/src/testdir/test_swap.vim 2019-01-27 14:29:20.724544960 +0100
+--- src/testdir/test_swap.vim 2019-04-28 21:50:37.397318520 +0200
+***************
+*** 164,166 ****
+--- 164,222 ----
+ call delete('Xtest2')
+ call delete('Xtest3')
+ endfunc
++
++ func Test_swapfile_delete()
++ autocmd! SwapExists
++ function s:swap_exists()
++ let v:swapchoice = s:swap_choice
++ let s:swapname = v:swapname
++ let s:filename = expand('<afile>')
++ endfunc
++ augroup test_swapfile_delete
++ autocmd!
++ autocmd SwapExists * call s:swap_exists()
++ augroup END
++
++
++ " Create a valid swapfile by editing a file.
++ split XswapfileText
++ call setline(1, ['one', 'two', 'three'])
++ write " file is written, not modified
++ " read the swapfile as a Blob
++ let swapfile_name = swapname('%')
++ let swapfile_bytes = readfile(swapfile_name, 'B')
++
++ " Close the file and recreate the swap file.
++ " Now editing the file will run into the process still existing
++ quit
++ call writefile(swapfile_bytes, swapfile_name)
++ let s:swap_choice = 'e'
++ let s:swapname = ''
++ split XswapfileText
++ quit
++ call assert_equal(swapfile_name, s:swapname)
++
++ " Write the swapfile with a modified PID, now it will be automatically
++ " deleted. Process one should never be Vim.
++ let swapfile_bytes[24:27] = 0z01000000
++ call writefile(swapfile_bytes, swapfile_name)
++ let s:swapname = ''
++ split XswapfileText
++ quit
++ call assert_equal('', s:swapname)
++
++ " Now set the modified flag, the swap file will not be deleted
++ let swapfile_bytes[28 + 80 + 899] = 0x55
++ call writefile(swapfile_bytes, swapfile_name)
++ let s:swapname = ''
++ split XswapfileText
++ quit
++ call assert_equal(swapfile_name, s:swapname)
++
++ call delete('XswapfileText')
++ call delete(swapfile_name)
++ augroup test_swapfile_delete
++ autocmd!
++ augroup END
++ augroup! test_swapfile_delete
++ endfunc
+*** ../vim-8.1.1230/runtime/doc/usr_11.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_11.txt 2019-04-28 21:58:09.667057415 +0200
+***************
+*** 120,126 ****
+ USING A SPECIFIC SWAP FILE
+
+ If you know which swap file needs to be used, you can recover by giving the
+! swap file name. Vim will then finds out the name of the original file from
+ the swap file.
+
+ Example: >
+--- 120,126 ----
+ USING A SPECIFIC SWAP FILE
+
+ If you know which swap file needs to be used, you can recover by giving the
+! swap file name. Vim will then find out the name of the original file from
+ the swap file.
+
+ Example: >
+***************
+*** 205,210 ****
+--- 205,217 ----
+ NEWER than swap file! ~
+
+
++ NOTE that in the following situation Vim knows the swap file is not useful and
++ will automatically delete it:
++ - The file is a valid swap file (Magic number is correct).
++ - The flag that the file was modified is not set.
++ - The process is not running.
++
++
+ UNREADABLE SWAP FILE
+
+ Sometimes the line
+***************
+*** 284,289 ****
+--- 291,297 ----
+ 'shortmess' option. But it's very unusual that you need this.
+
+ For remarks about encryption and the swap file, see |:recover-crypt|.
++ For programatic access to the swap file, see |swapinfo()|.
+
+ ==============================================================================
+ *11.4* Further reading
+*** ../vim-8.1.1230/src/os_win32.c 2019-04-28 19:46:17.034060084 +0200
+--- src/os_win32.c 2019-04-28 22:11:28.811767431 +0200
+***************
+*** 2903,2908 ****
+--- 2903,2925 ----
+ return (long)GetCurrentProcessId();
+ }
+
++ /*
++ * return TRUE if process "pid" is still running
++ */
++ int
++ mch_process_running(pid_t pid)
++ {
++ HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, 0, (DWORD)pid);
++ DWORD status = 0;
++ int ret = FALSE;
++
++ if (hProcess == NULL)
++ return FALSE; // might not have access
++ if (GetExitCodeProcess(hProcess, &status) )
++ ret = status == STILL_ACTIVE;
++ CloseHandle(hProcess);
++ return ret;
++ }
+
+ /*
+ * Get name of current directory into buffer 'buf' of length 'len' bytes.
+*** ../vim-8.1.1230/src/proto/os_win32.pro 2019-04-28 19:46:17.034060084 +0200
+--- src/proto/os_win32.pro 2019-04-28 22:14:17.599153672 +0200
+***************
+*** 19,24 ****
+--- 19,25 ----
+ int mch_get_user_name(char_u *s, int len);
+ void mch_get_host_name(char_u *s, int len);
+ long mch_get_pid(void);
++ int mch_process_running(pid_t pid);
+ int mch_dirname(char_u *buf, int len);
+ long mch_getperm(char_u *name);
+ int mch_setperm(char_u *name, long perm);
+*** ../vim-8.1.1230/src/os_unix.c 2019-04-04 20:13:06.001014760 +0200
+--- src/os_unix.c 2019-04-28 22:19:41.013860198 +0200
+***************
+*** 2393,2398 ****
+--- 2393,2408 ----
+ return (long)getpid();
+ }
+
++ /*
++ * return TRUE if process "pid" is still running
++ */
++ int
++ mch_process_running(pid_t pid)
++ {
++ // EMX kill() not working correctly, it seems
++ return kill(pid, 0) == 0;
++ }
++
+ #if !defined(HAVE_STRERROR) && defined(USE_GETCWD)
+ static char *
+ strerror(int err)
+*** ../vim-8.1.1230/src/proto/os_unix.pro 2019-01-20 15:30:36.893328693 +0100
+--- src/proto/os_unix.pro 2019-04-28 22:19:14.453970686 +0200
+***************
+*** 27,32 ****
+--- 27,33 ----
+ int mch_get_uname(uid_t uid, char_u *s, int len);
+ void mch_get_host_name(char_u *s, int len);
+ long mch_get_pid(void);
++ int mch_process_running(pid_t pid);
+ int mch_dirname(char_u *buf, int len);
+ int mch_FullName(char_u *fname, char_u *buf, int len, int force);
+ int mch_isFullName(char_u *fname);
+*** ../vim-8.1.1230/src/version.c 2019-04-28 19:46:17.034060084 +0200
+--- src/version.c 2019-04-28 22:20:54.909549767 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1231,
+ /**/
+
+--
+ARTHUR: What?
+BLACK KNIGHT: None shall pass.
+ARTHUR: I have no quarrel with you, good Sir knight, but I must cross
+ this bridge.
+BLACK KNIGHT: Then you shall die.
+ 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.1232 b/data/vim/patches/8.1.1232
new file mode 100644
index 000000000..f218720ab
--- /dev/null
+++ b/data/vim/patches/8.1.1232
@@ -0,0 +1,234 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1232
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1232
+Problem: Can't build on MS-Windows.
+Solution: Define process_still_running.
+Files: src/memline.c, src/os_win32.c, src/proto/os_win32.pro,
+ src/os_unix.c, src/proto/os_unix.pro
+
+
+*** ../vim-8.1.1231/src/memline.c 2019-04-28 22:25:03.240480046 +0200
+--- src/memline.c 2019-04-28 22:46:02.502595899 +0200
+***************
+*** 2027,2033 ****
+ }
+ #endif
+
+! #if (defined(UNIX) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
+ static int process_still_running;
+ #endif
+
+--- 2027,2035 ----
+ }
+ #endif
+
+! #if (defined(UNIX) || defined(VMS) || defined(MSWIN)) \
+! && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
+! # define HAVE_PROCESS_STILL_RUNNING
+ static int process_still_running;
+ #endif
+
+***************
+*** 2160,2169 ****
+ msg_puts(_("\n process ID: "));
+ msg_outnum(char_to_long(b0.b0_pid));
+ #if defined(UNIX) || defined(MSWIN)
+! if (mch_process_running((pid_t)char_to_long(b0.b0_pid)))
+ {
+ msg_puts(_(" (STILL RUNNING)"));
+! # if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+ process_still_running = TRUE;
+ # endif
+ }
+--- 2162,2171 ----
+ msg_puts(_("\n process ID: "));
+ msg_outnum(char_to_long(b0.b0_pid));
+ #if defined(UNIX) || defined(MSWIN)
+! if (mch_process_running(char_to_long(b0.b0_pid)))
+ {
+ msg_puts(_(" (STILL RUNNING)"));
+! # ifdef HAVE_PROCESS_STILL_RUNNING
+ process_still_running = TRUE;
+ # endif
+ }
+***************
+*** 2203,2209 ****
+ int fd;
+ struct block0 b0;
+ int ret = TRUE;
+! #ifdef UNIX
+ long pid;
+ #endif
+
+--- 2205,2211 ----
+ int fd;
+ struct block0 b0;
+ int ret = TRUE;
+! #if defined(UNIX) || defined(MSWIN)
+ long pid;
+ #endif
+
+***************
+*** 2232,2238 ****
+ #if defined(UNIX) || defined(MSWIN)
+ // process must known and not be running
+ pid = char_to_long(b0.b0_pid);
+! if (pid == 0L || mch_process_running((pid_t)pid))
+ ret = FALSE;
+ #endif
+
+--- 2234,2240 ----
+ #if defined(UNIX) || defined(MSWIN)
+ // process must known and not be running
+ pid = char_to_long(b0.b0_pid);
+! if (pid == 0L || mch_process_running(pid))
+ ret = FALSE;
+ #endif
+
+***************
+*** 4825,4831 ****
+ }
+ #endif
+
+! #if (defined(UNIX) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
+ process_still_running = FALSE;
+ #endif
+ // It's safe to delete the swap file if all these are true:
+--- 4827,4833 ----
+ }
+ #endif
+
+! #ifdef HAVE_PROCESS_STILL_RUNNING
+ process_still_running = FALSE;
+ #endif
+ // It's safe to delete the swap file if all these are true:
+***************
+*** 4893,4905 ****
+ name == NULL
+ ? (char_u *)_("Swap file already exists!")
+ : name,
+! # if defined(UNIX) || defined(VMS)
+ process_still_running
+ ? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") :
+ # endif
+ (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL, FALSE);
+
+! # if defined(UNIX) || defined(VMS)
+ if (process_still_running && choice >= 4)
+ choice++; /* Skip missing "Delete it" button */
+ # endif
+--- 4895,4907 ----
+ name == NULL
+ ? (char_u *)_("Swap file already exists!")
+ : name,
+! # ifdef HAVE_PROCESS_STILL_RUNNING
+ process_still_running
+ ? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") :
+ # endif
+ (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL, FALSE);
+
+! # ifdef HAVE_PROCESS_STILL_RUNNING
+ if (process_still_running && choice >= 4)
+ choice++; /* Skip missing "Delete it" button */
+ # endif
+*** ../vim-8.1.1231/src/os_win32.c 2019-04-28 22:25:03.244480028 +0200
+--- src/os_win32.c 2019-04-28 22:43:27.379376785 +0200
+***************
+*** 2907,2913 ****
+ * return TRUE if process "pid" is still running
+ */
+ int
+! mch_process_running(pid_t pid)
+ {
+ HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, 0, (DWORD)pid);
+ DWORD status = 0;
+--- 2907,2913 ----
+ * return TRUE if process "pid" is still running
+ */
+ int
+! mch_process_running(long pid)
+ {
+ HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, 0, (DWORD)pid);
+ DWORD status = 0;
+*** ../vim-8.1.1231/src/proto/os_win32.pro 2019-04-28 22:25:03.244480028 +0200
+--- src/proto/os_win32.pro 2019-04-28 22:43:53.487244313 +0200
+***************
+*** 19,25 ****
+ int mch_get_user_name(char_u *s, int len);
+ void mch_get_host_name(char_u *s, int len);
+ long mch_get_pid(void);
+! int mch_process_running(pid_t pid);
+ int mch_dirname(char_u *buf, int len);
+ long mch_getperm(char_u *name);
+ int mch_setperm(char_u *name, long perm);
+--- 19,25 ----
+ int mch_get_user_name(char_u *s, int len);
+ void mch_get_host_name(char_u *s, int len);
+ long mch_get_pid(void);
+! int mch_process_running(long pid);
+ int mch_dirname(char_u *buf, int len);
+ long mch_getperm(char_u *name);
+ int mch_setperm(char_u *name, long perm);
+*** ../vim-8.1.1231/src/os_unix.c 2019-04-28 22:25:03.244480028 +0200
+--- src/os_unix.c 2019-04-28 22:44:05.579183106 +0200
+***************
+*** 2397,2403 ****
+ * return TRUE if process "pid" is still running
+ */
+ int
+! mch_process_running(pid_t pid)
+ {
+ // EMX kill() not working correctly, it seems
+ return kill(pid, 0) == 0;
+--- 2397,2403 ----
+ * return TRUE if process "pid" is still running
+ */
+ int
+! mch_process_running(long pid)
+ {
+ // EMX kill() not working correctly, it seems
+ return kill(pid, 0) == 0;
+*** ../vim-8.1.1231/src/proto/os_unix.pro 2019-04-28 22:25:03.248480010 +0200
+--- src/proto/os_unix.pro 2019-04-28 22:44:12.247149409 +0200
+***************
+*** 27,33 ****
+ int mch_get_uname(uid_t uid, char_u *s, int len);
+ void mch_get_host_name(char_u *s, int len);
+ long mch_get_pid(void);
+! int mch_process_running(pid_t pid);
+ int mch_dirname(char_u *buf, int len);
+ int mch_FullName(char_u *fname, char_u *buf, int len, int force);
+ int mch_isFullName(char_u *fname);
+--- 27,33 ----
+ int mch_get_uname(uid_t uid, char_u *s, int len);
+ void mch_get_host_name(char_u *s, int len);
+ long mch_get_pid(void);
+! int mch_process_running(long pid);
+ int mch_dirname(char_u *buf, int len);
+ int mch_FullName(char_u *fname, char_u *buf, int len, int force);
+ int mch_isFullName(char_u *fname);
+*** ../vim-8.1.1231/src/version.c 2019-04-28 22:25:03.248480010 +0200
+--- src/version.c 2019-04-28 22:49:55.861444980 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1232,
+ /**/
+
+--
+ With sufficient thrust, pigs fly just fine.
+ -- RFC 1925
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1233 b/data/vim/patches/8.1.1233
new file mode 100644
index 000000000..0fce58bd9
--- /dev/null
+++ b/data/vim/patches/8.1.1233
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1233
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1233
+Problem: Cannot build tiny version.
+Solution: Remove #ifdef for verb_msg().
+Files: src/message.c
+
+
+*** ../vim-8.1.1232/src/message.c 2019-04-28 19:46:17.030060105 +0200
+--- src/message.c 2019-04-28 22:52:31.300689582 +0200
+***************
+*** 101,108 ****
+ return msg_attr_keep(s, 0, FALSE);
+ }
+
+- #if defined(FEAT_EVAL) || defined(FEAT_X11) || defined(USE_XSMP) \
+- || defined(FEAT_GUI_GTK) || defined(PROTO)
+ /*
+ * Like msg() but keep it silent when 'verbosefile' is set.
+ */
+--- 101,106 ----
+***************
+*** 117,123 ****
+
+ return n;
+ }
+- #endif
+
+ int
+ msg_attr(char *s, int attr)
+--- 115,120 ----
+*** ../vim-8.1.1232/src/version.c 2019-04-28 22:50:36.157248454 +0200
+--- src/version.c 2019-04-28 22:53:03.628533314 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1233,
+ /**/
+
+--
+ f y cn rd ths thn y cn hv grt jb n cmptr prgrmmng
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1234 b/data/vim/patches/8.1.1234
new file mode 100644
index 000000000..a66ecdbd5
--- /dev/null
+++ b/data/vim/patches/8.1.1234
@@ -0,0 +1,74 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1234
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1234
+Problem: Swap file test fails on MS-Windows.
+Solution: Only compare the tail of the file names.
+Files: src/testdir/test_swap.vim
+
+
+*** ../vim-8.1.1233/src/testdir/test_swap.vim 2019-04-28 22:25:03.244480028 +0200
+--- src/testdir/test_swap.vim 2019-04-28 23:03:03.737664627 +0200
+***************
+*** 194,200 ****
+ let s:swapname = ''
+ split XswapfileText
+ quit
+! call assert_equal(swapfile_name, s:swapname)
+
+ " Write the swapfile with a modified PID, now it will be automatically
+ " deleted. Process one should never be Vim.
+--- 194,200 ----
+ let s:swapname = ''
+ split XswapfileText
+ quit
+! call assert_equal(fnamemodify(swapfile_name, ':t'), fnamemodify(s:swapname, ':t'))
+
+ " Write the swapfile with a modified PID, now it will be automatically
+ " deleted. Process one should never be Vim.
+***************
+*** 211,217 ****
+ let s:swapname = ''
+ split XswapfileText
+ quit
+! call assert_equal(swapfile_name, s:swapname)
+
+ call delete('XswapfileText')
+ call delete(swapfile_name)
+--- 211,217 ----
+ let s:swapname = ''
+ split XswapfileText
+ quit
+! call assert_equal(fnamemodify(swapfile_name, ':t'), fnamemodify(s:swapname, ':t'))
+
+ call delete('XswapfileText')
+ call delete(swapfile_name)
+*** ../vim-8.1.1233/src/version.c 2019-04-28 22:53:37.440370169 +0200
+--- src/version.c 2019-04-28 23:05:25.460992485 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1234,
+ /**/
+
+--
+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.1235 b/data/vim/patches/8.1.1235
new file mode 100644
index 000000000..36da22b89
--- /dev/null
+++ b/data/vim/patches/8.1.1235
@@ -0,0 +1,69 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1235
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1235
+Problem: Compiler warnings for using STRLEN() value.
+Solution: Cast to int. (Christian Brabandt, Mike Williams)
+Files: src/tag.c
+
+
+*** ../vim-8.1.1234/src/tag.c 2019-04-28 18:04:56.062492159 +0200
+--- src/tag.c 2019-04-29 19:43:43.182061855 +0200
+***************
+*** 1391,1397 ****
+ if (tv->v_type != VAR_STRING || tv->vval.v_string == NULL)
+ continue;
+
+! len += STRLEN(tv->vval.v_string) + 1; // Space for "\tVALUE"
+ if (!STRCMP(dict_key, "name"))
+ {
+ res_name = tv->vval.v_string;
+--- 1391,1397 ----
+ if (tv->v_type != VAR_STRING || tv->vval.v_string == NULL)
+ continue;
+
+! len += (int)STRLEN(tv->vval.v_string) + 1; // Space for "\tVALUE"
+ if (!STRCMP(dict_key, "name"))
+ {
+ res_name = tv->vval.v_string;
+***************
+*** 1415,1421 ****
+ }
+ // Other elements will be stored as "\tKEY:VALUE"
+ // Allocate space for the key and the colon
+! len += STRLEN(dict_key) + 1;
+ }
+
+ if (has_extra)
+--- 1415,1421 ----
+ }
+ // Other elements will be stored as "\tKEY:VALUE"
+ // Allocate space for the key and the colon
+! len += (int)STRLEN(dict_key) + 1;
+ }
+
+ if (has_extra)
+*** ../vim-8.1.1234/src/version.c 2019-04-28 23:07:13.572480525 +0200
+--- src/version.c 2019-04-29 19:46:15.639507222 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1235,
+ /**/
+
+--
+"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.1236 b/data/vim/patches/8.1.1236
new file mode 100644
index 000000000..f7339e2e8
--- /dev/null
+++ b/data/vim/patches/8.1.1236
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1236
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1236
+Problem: sjiscorr.c not found in shadow directory. (Tony Mechelynck)
+Solution: Link po/*.c files with "make shadow".
+Files: src/Makefile
+
+
+*** ../vim-8.1.1235/src/Makefile 2019-04-27 18:00:29.851064563 +0200
+--- src/Makefile 2019-04-29 20:27:43.896129717 +0200
+***************
+*** 2784,2790 ****
+ mkdir $(SHADOWDIR)/auto
+ cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
+ $(MKDIR_P) $(SHADOWDIR)/po
+! cd $(SHADOWDIR)/po; ln -s ../../po/*.po ../../po/*.mak ../../po/*.vim ../../po/*.in ../../po/Makefile .
+ cd $(SHADOWDIR); rm -f auto/link.sed
+ cp Makefile configure $(SHADOWDIR)
+ rm -f $(SHADOWDIR)/auto/config.mk $(SHADOWDIR)/config.mk.dist
+--- 2784,2790 ----
+ mkdir $(SHADOWDIR)/auto
+ cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
+ $(MKDIR_P) $(SHADOWDIR)/po
+! cd $(SHADOWDIR)/po; ln -s ../../po/*.po ../../po/*.mak ../../po/*.vim ../../po/*.in ../../po/Makefile ../../po/*.c .
+ cd $(SHADOWDIR); rm -f auto/link.sed
+ cp Makefile configure $(SHADOWDIR)
+ rm -f $(SHADOWDIR)/auto/config.mk $(SHADOWDIR)/config.mk.dist
+*** ../vim-8.1.1235/src/version.c 2019-04-29 19:47:19.399571862 +0200
+--- src/version.c 2019-04-29 20:28:32.468258806 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1236,
+ /**/
+
+--
+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.1237 b/data/vim/patches/8.1.1237
new file mode 100644
index 000000000..0aa717f57
--- /dev/null
+++ b/data/vim/patches/8.1.1237
@@ -0,0 +1,146 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1237
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1237
+Problem: Error for using "compl", reserved word in C++.
+Solution: Rename to "complp". (suggestion by Ken Takata)
+Files: src/usercmd.c, src/proto/usercmd.pro
+
+
+*** ../vim-8.1.1236/src/usercmd.c 2019-04-27 13:03:20.000715982 +0200
+--- src/usercmd.c 2019-04-29 21:27:37.239080833 +0200
+***************
+*** 131,137 ****
+ char_u *p, // end of the command (possibly including count)
+ int *full, // set to TRUE for a full match
+ expand_T *xp, // used for completion, NULL otherwise
+! int *compl UNUSED) // completion flags or NULL
+ {
+ int len = (int)(p - eap->cmd);
+ int j, k, matchlen = 0;
+--- 131,137 ----
+ char_u *p, // end of the command (possibly including count)
+ int *full, // set to TRUE for a full match
+ expand_T *xp, // used for completion, NULL otherwise
+! int *complp UNUSED) // completion flags or NULL
+ {
+ int len = (int)(p - eap->cmd);
+ int j, k, matchlen = 0;
+***************
+*** 188,195 ****
+ eap->addr_type = uc->uc_addr_type;
+
+ # ifdef FEAT_CMDL_COMPL
+! if (compl != NULL)
+! *compl = uc->uc_compl;
+ # ifdef FEAT_EVAL
+ if (xp != NULL)
+ {
+--- 188,195 ----
+ eap->addr_type = uc->uc_addr_type;
+
+ # ifdef FEAT_CMDL_COMPL
+! if (complp != NULL)
+! *complp = uc->uc_compl;
+ # ifdef FEAT_EVAL
+ if (xp != NULL)
+ {
+***************
+*** 692,698 ****
+ long *argt,
+ long *def,
+ int *flags,
+! int *compl,
+ char_u **compl_arg,
+ int *addr_type_arg)
+ {
+--- 692,698 ----
+ long *argt,
+ long *def,
+ int *flags,
+! int *complp,
+ char_u **compl_arg,
+ int *addr_type_arg)
+ {
+***************
+*** 810,816 ****
+ return FAIL;
+ }
+
+! if (parse_compl_arg(val, (int)vallen, compl, argt, compl_arg)
+ == FAIL)
+ return FAIL;
+ }
+--- 810,816 ----
+ return FAIL;
+ }
+
+! if (parse_compl_arg(val, (int)vallen, complp, argt, compl_arg)
+ == FAIL)
+ return FAIL;
+ }
+*** ../vim-8.1.1236/src/proto/usercmd.pro 2019-04-27 13:03:20.000715982 +0200
+--- src/proto/usercmd.pro 2019-04-29 21:29:26.838434999 +0200
+***************
+*** 1,5 ****
+ /* usercmd.c */
+! char_u *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int *compl);
+ char_u *set_context_in_user_cmd(expand_T *xp, char_u *arg_in);
+ char_u *get_user_command_name(int idx);
+ char_u *get_user_commands(expand_T *xp, int idx);
+--- 1,5 ----
+ /* usercmd.c */
+! char_u *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int *complp);
+ char_u *set_context_in_user_cmd(expand_T *xp, char_u *arg_in);
+ char_u *get_user_command_name(int idx);
+ char_u *get_user_commands(expand_T *xp, int idx);
+***************
+*** 7,18 ****
+ char_u *get_user_cmd_flags(expand_T *xp, int idx);
+ char_u *get_user_cmd_nargs(expand_T *xp, int idx);
+ char_u *get_user_cmd_complete(expand_T *xp, int idx);
+ char *uc_fun_cmd(void);
+ void ex_command(exarg_T *eap);
+ void ex_comclear(exarg_T *eap);
+ void uc_clear(garray_T *gap);
+ void ex_delcommand(exarg_T *eap);
+ void do_ucmd(exarg_T *eap);
+- int parse_compl_arg(char_u *value, int vallen, int *complp, long *argt, char_u **compl_arg);
+- int cmdcomplete_str_to_type(char_u *complete_str);
+ /* vim: set ft=c : */
+--- 7,18 ----
+ char_u *get_user_cmd_flags(expand_T *xp, int idx);
+ char_u *get_user_cmd_nargs(expand_T *xp, int idx);
+ char_u *get_user_cmd_complete(expand_T *xp, int idx);
++ int cmdcomplete_str_to_type(char_u *complete_str);
+ char *uc_fun_cmd(void);
++ int parse_compl_arg(char_u *value, int vallen, int *complp, long *argt, char_u **compl_arg);
+ void ex_command(exarg_T *eap);
+ void ex_comclear(exarg_T *eap);
+ void uc_clear(garray_T *gap);
+ void ex_delcommand(exarg_T *eap);
+ void do_ucmd(exarg_T *eap);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1236/src/version.c 2019-04-29 20:30:51.148660130 +0200
+--- src/version.c 2019-04-29 21:26:20.567553260 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1237,
+ /**/
+
+--
+The early bird gets the worm. The second mouse gets the cheese.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1238 b/data/vim/patches/8.1.1238
new file mode 100644
index 000000000..dcc5e1611
--- /dev/null
+++ b/data/vim/patches/8.1.1238
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1238
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1238
+Problem: MS-Windows: compiler warning for sprintf() format.
+Solution: Change %d to %ld. (Ken Takata)
+Files: src/gui_w32.c
+
+
+*** ../vim-8.1.1237/src/gui_w32.c 2019-04-28 19:46:17.026060122 +0200
+--- src/gui_w32.c 2019-04-29 21:45:29.693539165 +0200
+***************
+*** 3129,3135 ****
+ if (lf.lfWeight == FW_NORMAL || lf.lfWeight == FW_BOLD)
+ sprintf((char *)p, "%s:h%d", font_name, points);
+ else
+! sprintf((char *)p, "%s:h%d:W%d", font_name, points, lf.lfWeight);
+ while (*p)
+ {
+ if (*p == ' ')
+--- 3129,3135 ----
+ if (lf.lfWeight == FW_NORMAL || lf.lfWeight == FW_BOLD)
+ sprintf((char *)p, "%s:h%d", font_name, points);
+ else
+! sprintf((char *)p, "%s:h%d:W%ld", font_name, points, lf.lfWeight);
+ while (*p)
+ {
+ if (*p == ' ')
+*** ../vim-8.1.1237/src/version.c 2019-04-29 21:30:42.006008952 +0200
+--- src/version.c 2019-04-29 21:44:15.905888652 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1238,
+ /**/
+
+--
+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.1239 b/data/vim/patches/8.1.1239
new file mode 100644
index 000000000..c677f975f
--- /dev/null
+++ b/data/vim/patches/8.1.1239
@@ -0,0 +1,114 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1239
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1239
+Problem: Key with byte sequence containing CSI does not work.
+Solution: Do not recognize CSI as special unless the GUI is active. (Ken
+ Takata, closes #4318)
+Files: src/getchar.c
+
+
+*** ../vim-8.1.1238/src/getchar.c 2019-04-28 19:46:17.026060122 +0200
+--- src/getchar.c 2019-04-29 21:52:57.006045828 +0200
+***************
+*** 1604,1610 ****
+ // Get two extra bytes for special keys
+ if (c == K_SPECIAL
+ #ifdef FEAT_GUI
+! || c == CSI
+ #endif
+ )
+ {
+--- 1604,1610 ----
+ // Get two extra bytes for special keys
+ if (c == K_SPECIAL
+ #ifdef FEAT_GUI
+! || (gui.in_use && c == CSI)
+ #endif
+ )
+ {
+***************
+*** 1659,1677 ****
+ }
+ #endif
+ #ifdef FEAT_GUI
+! // Handle focus event here, so that the caller doesn't need to
+! // know about it. Return K_IGNORE so that we loop once (needed
+! // if 'lazyredraw' is set).
+! if (c == K_FOCUSGAINED || c == K_FOCUSLOST)
+ {
+! ui_focus_change(c == K_FOCUSGAINED);
+! c = K_IGNORE;
+! }
+
+! // Translate K_CSI to CSI. The special key is only used to
+! // avoid it being recognized as the start of a special key.
+! if (c == K_CSI)
+! c = CSI;
+ #endif
+ }
+ // a keypad or special function key was not mapped, use it like
+--- 1659,1681 ----
+ }
+ #endif
+ #ifdef FEAT_GUI
+! if (gui.in_use)
+ {
+! // Handle focus event here, so that the caller doesn't
+! // need to know about it. Return K_IGNORE so that we loop
+! // once (needed if 'lazyredraw' is set).
+! if (c == K_FOCUSGAINED || c == K_FOCUSLOST)
+! {
+! ui_focus_change(c == K_FOCUSGAINED);
+! c = K_IGNORE;
+! }
+
+! // Translate K_CSI to CSI. The special key is only used
+! // to avoid it being recognized as the start of a special
+! // key.
+! if (c == K_CSI)
+! c = CSI;
+! }
+ #endif
+ }
+ // a keypad or special function key was not mapped, use it like
+***************
+*** 1749,1755 ****
+ buf[i] = vgetorpeek(TRUE);
+ if (buf[i] == K_SPECIAL
+ #ifdef FEAT_GUI
+! || buf[i] == CSI
+ #endif
+ )
+ {
+--- 1753,1759 ----
+ buf[i] = vgetorpeek(TRUE);
+ if (buf[i] == K_SPECIAL
+ #ifdef FEAT_GUI
+! || (gui.in_use && buf[i] == CSI)
+ #endif
+ )
+ {
+*** ../vim-8.1.1238/src/version.c 2019-04-29 21:46:22.849288641 +0200
+--- src/version.c 2019-04-29 21:58:16.735900252 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1239,
+ /**/
+
+--
+We learn from our mistakes. Politicians don't make mistakes.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1240 b/data/vim/patches/8.1.1240
new file mode 100644
index 000000000..21f2ec2b7
--- /dev/null
+++ b/data/vim/patches/8.1.1240
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1240
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1240
+Problem: Runtime desktop files are overwritten by build. (Tony Mechelynck)
+Solution: Instead of copying the files find them with "make install".
+Files: src/Makefile, src/po/Makefile
+
+
+*** ../vim-8.1.1239/src/Makefile 2019-04-29 20:30:51.148660130 +0200
+--- src/Makefile 2019-04-30 21:17:29.330825161 +0200
+***************
+*** 2556,2564 ****
+ $(INSTALL_DATA) $(SCRIPTSOURCE)/vim16x16.png $(ICON16PATH)/gvim.png; \
+ fi
+ if test -d $(DESKTOPPATH) -a -w $(DESKTOPPATH); then \
+! $(INSTALL_DATA) $(SCRIPTSOURCE)/vim.desktop \
+! $(SCRIPTSOURCE)/gvim.desktop \
+! $(DESKTOPPATH); \
+ if test -z "$(DESTDIR)" -a -x "$(UPDATE_DESKTOP_DATABASE)"; then \
+ $(UPDATE_DESKTOP_DATABASE) -q $(DESKTOPPATH); \
+ fi \
+--- 2556,2569 ----
+ $(INSTALL_DATA) $(SCRIPTSOURCE)/vim16x16.png $(ICON16PATH)/gvim.png; \
+ fi
+ if test -d $(DESKTOPPATH) -a -w $(DESKTOPPATH); then \
+! if test -f po/vim.desktop -a -f po/gvim.desktop; then \
+! $(INSTALL_DATA) po/vim.desktop po/gvim.desktop \
+! $(DESKTOPPATH); \
+! else \
+! $(INSTALL_DATA) $(SCRIPTSOURCE)/vim.desktop \
+! $(SCRIPTSOURCE)/gvim.desktop \
+! $(DESKTOPPATH); \
+! fi; \
+ if test -z "$(DESTDIR)" -a -x "$(UPDATE_DESKTOP_DATABASE)"; then \
+ $(UPDATE_DESKTOP_DATABASE) -q $(DESKTOPPATH); \
+ fi \
+*** ../vim-8.1.1239/src/po/Makefile 2019-04-27 18:32:27.821786738 +0200
+--- src/po/Makefile 2019-04-30 21:10:46.412923990 +0200
+***************
+*** 168,174 ****
+ %.desktop: %.desktop.in $(POFILES)
+ @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+ $(MSGFMT) --desktop -d . --template $< -o $@
+- cp -f $@ ../../runtime/$@
+
+ update-po: $(LANGUAGES)
+
+--- 168,173 ----
+*** ../vim-8.1.1239/src/version.c 2019-04-29 21:58:37.667769672 +0200
+--- src/version.c 2019-04-30 21:11:49.504599492 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1240,
+ /**/
+
+--
+Be nice to your kids... they'll be the ones choosing your nursing 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.1241 b/data/vim/patches/8.1.1241
new file mode 100644
index 000000000..9b3bbf772
--- /dev/null
+++ b/data/vim/patches/8.1.1241
@@ -0,0 +1,4186 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1241
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1241
+Problem: Ex command info contains confusing information.
+Solution: When using the NOTADR flag use ADDR_OTHER for the address type.
+ Cleanup code using NOTADR. Check for errors in
+ create_cmdidxs.vim. Adjust Makefile to see the errors.
+Files: src/ex_cmds.h, src/ex_docmd.c, src/Makefile,
+ src/create_cmdidxs.vim, src/usercmd.c, src/ex_cmds.c,
+ src/window.c, src/testdir/test_usercommands.vim
+
+
+*** ../vim-8.1.1240/src/ex_cmds.h 2019-04-27 20:36:52.530303581 +0200
+--- src/ex_cmds.h 2019-05-01 17:44:18.023913397 +0200
+***************
+*** 28,77 ****
+ */
+
+ #ifdef RANGE
+! # undef RANGE /* SASC on Amiga defines it */
+ #endif
+
+! #define RANGE 0x001 /* allow a linespecs */
+! #define BANG 0x002 /* allow a ! after the command name */
+! #define EXTRA 0x004 /* allow extra args after command name */
+! #define XFILE 0x008 /* expand wildcards in extra part */
+! #define NOSPC 0x010 /* no spaces allowed in the extra part */
+! #define DFLALL 0x020 /* default file range is 1,$ */
+! #define WHOLEFOLD 0x040 /* extend range to include whole fold also
+! when less than two numbers given */
+! #define NEEDARG 0x080 /* argument required */
+! #define TRLBAR 0x100 /* check for trailing vertical bar */
+! #define REGSTR 0x200 /* allow "x for register designation */
+! #define COUNT 0x400 /* allow count in argument, after command */
+! #define NOTRLCOM 0x800 /* no trailing comment allowed */
+! #define ZEROR 0x1000 /* zero line number allowed */
+! #define USECTRLV 0x2000 /* do not remove CTRL-V from argument */
+! #define NOTADR 0x4000 /* number before command is not an address */
+! #define EDITCMD 0x8000 /* allow "+command" argument */
+! #define BUFNAME 0x10000L /* accepts buffer name */
+! #define BUFUNL 0x20000L /* accepts unlisted buffer too */
+! #define ARGOPT 0x40000L /* allow "++opt=val" argument */
+! #define SBOXOK 0x80000L /* allowed in the sandbox */
+! #define CMDWIN 0x100000L /* allowed in cmdline window; when missing
+! * disallows editing another buffer when
+! * curbuf_lock is set */
+! #define MODIFY 0x200000L /* forbidden in non-'modifiable' buffer */
+! #define EXFLAGS 0x400000L /* allow flags after count in argument */
+! #define RESTRICT 0x800000L /* forbidden in restricted mode */
+! #define FILES (XFILE | EXTRA) /* multiple extra files allowed */
+! #define WORD1 (EXTRA | NOSPC) /* one extra word allowed */
+! #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;
+--- 28,83 ----
+ */
+
+ #ifdef RANGE
+! # undef RANGE // SASC on Amiga defines it
+ #endif
+
+! #define RANGE 0x001 // allow a linespecs
+! #define BANG 0x002 // allow a ! after the command name
+! #define EXTRA 0x004 // allow extra args after command name
+! #define XFILE 0x008 // expand wildcards in extra part
+! #define NOSPC 0x010 // no spaces allowed in the extra part
+! #define DFLALL 0x020 // default file range is 1,$
+! #define WHOLEFOLD 0x040 // extend range to include whole fold also
+! // when less than two numbers given
+! #define NEEDARG 0x080 // argument required
+! #define TRLBAR 0x100 // check for trailing vertical bar
+! #define REGSTR 0x200 // allow "x for register designation
+! #define COUNT 0x400 // allow count in argument, after command
+! #define NOTRLCOM 0x800 // no trailing comment allowed
+! #define ZEROR 0x1000 // zero line number allowed
+! #define USECTRLV 0x2000 // do not remove CTRL-V from argument
+! #define EDITCMD 0x4000 // allow "+command" argument
+! #define BUFNAME 0x8000 // accepts buffer name
+! #define BUFUNL 0x10000L // accepts unlisted buffer too
+! #define ARGOPT 0x20000L // allow "++opt=val" argument
+! #define SBOXOK 0x40000L // allowed in the sandbox
+! #define CMDWIN 0x80000L // allowed in cmdline window; when missing
+! // disallows editing another buffer when
+! // curbuf_lock is set
+! #define MODIFY 0x100000L // forbidden in non-'modifiable' buffer
+! #define EXFLAGS 0x200000L // allow flags after count in argument
+! #define RESTRICT 0x400000L // forbidden in restricted mode
+! #define FILES (XFILE | EXTRA) // multiple extra files allowed
+! #define WORD1 (EXTRA | NOSPC) // one extra word allowed
+! #define FILE1 (FILES | NOSPC) // 1 file allowed, defaults to current file
+
+! #ifndef DO_DECLARE_EXCMD
+! /*
+! * values for cmd_addr_type
+! */
+! typedef enum {
+! ADDR_LINES, // buffer line numbers
+! ADDR_WINDOWS, // window number
+! ADDR_ARGUMENTS, // argument number
+! ADDR_LOADED_BUFFERS, // buffer number of loaded buffer
+! ADDR_BUFFERS, // buffer number
+! ADDR_TABS, // tab page number
+! ADDR_TABS_RELATIVE, // Tab page that only relative
+! ADDR_QUICKFIX, // quickfix list entry number
+! ADDR_OTHER, // something else
+! ADDR_NONE // no range used
+! } cmd_addr_T;
+! #endif
+
+ #ifndef DO_DECLARE_EXCMD
+ typedef struct exarg exarg_T;
+***************
+*** 95,104 ****
+
+ static struct cmdname
+ {
+! char_u *cmd_name; /* name of the command */
+! ex_func_T cmd_func; /* function for this command */
+! long_u cmd_argt; /* flags declared above */
+! int cmd_addr_type; /* flag for address type */
+ } cmdnames[] =
+ #else
+ # define EX(a, b, c, d, e) a
+--- 101,110 ----
+
+ static struct cmdname
+ {
+! char_u *cmd_name; // name of the command
+! ex_func_T cmd_func; // function for this command
+! long_u cmd_argt; // flags declared above
+! cmd_addr_T cmd_addr_type; // flag for address type
+ } cmdnames[] =
+ #else
+ # define EX(a, b, c, d, e) a
+***************
+*** 110,464 ****
+ ADDR_LINES),
+ EX(CMD_abbreviate, "abbreviate", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_abclear, "abclear", ex_abclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_aboveleft, "aboveleft", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_all, "all", ex_all,
+! BANG|RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_amenu, "amenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_anoremenu, "anoremenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_args, "args", ex_args,
+ BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_argadd, "argadd", ex_argadd,
+! BANG|RANGE|NOTADR|ZEROR|FILES|TRLBAR,
+ ADDR_ARGUMENTS),
+ EX(CMD_argdelete, "argdelete", ex_argdelete,
+! BANG|RANGE|NOTADR|FILES|TRLBAR,
+ ADDR_ARGUMENTS),
+ EX(CMD_argdo, "argdo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
+ ADDR_ARGUMENTS),
+ EX(CMD_argedit, "argedit", ex_argedit,
+! BANG|NEEDARG|RANGE|NOTADR|ZEROR|FILES|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_ARGUMENTS),
+ EX(CMD_argglobal, "argglobal", ex_args,
+ BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_arglocal, "arglocal", ex_args,
+ BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_argument, "argument", ex_argument,
+! BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_ARGUMENTS),
+ EX(CMD_ascii, "ascii", do_ascii,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_autocmd, "autocmd", ex_autocmd,
+ BANG|EXTRA|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_augroup, "augroup", ex_autocmd,
+ BANG|WORD1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_aunmenu, "aunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_buffer, "buffer", ex_buffer,
+! BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|EDITCMD|TRLBAR,
+ ADDR_BUFFERS),
+ EX(CMD_bNext, "bNext", ex_bprevious,
+! BANG|RANGE|NOTADR|COUNT|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_ball, "ball", ex_buffer_all,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_badd, "badd", ex_edit,
+ NEEDARG|FILE1|EDITCMD|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_bdelete, "bdelete", ex_bunload,
+! 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,
+! ADDR_LINES),
+ EX(CMD_bfirst, "bfirst", ex_brewind,
+! BANG|RANGE|NOTADR|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_blast, "blast", ex_blast,
+! BANG|RANGE|NOTADR|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_bmodified, "bmodified", ex_bmodified,
+! BANG|RANGE|NOTADR|COUNT|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_bnext, "bnext", ex_bnext,
+! BANG|RANGE|NOTADR|COUNT|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_botright, "botright", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_bprevious, "bprevious", ex_bprevious,
+! BANG|RANGE|NOTADR|COUNT|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_brewind, "brewind", ex_brewind,
+! BANG|RANGE|NOTADR|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_break, "break", ex_break,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_breakadd, "breakadd", ex_breakadd,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_breakdel, "breakdel", ex_breakdel,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_breaklist, "breaklist", ex_breaklist,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_browse, "browse", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_buffers, "buffers", buflist_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_bufdo, "bufdo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
+ ADDR_BUFFERS),
+ EX(CMD_bunload, "bunload", ex_bunload,
+! BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR,
+ ADDR_LOADED_BUFFERS),
+ EX(CMD_bwipeout, "bwipeout", ex_bunload,
+! BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR,
+ ADDR_BUFFERS),
+ EX(CMD_change, "change", ex_change,
+ BANG|WHOLEFOLD|RANGE|COUNT|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_cNext, "cNext", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_cNfile, "cNfile", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_cabbrev, "cabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cabclear, "cabclear", ex_abclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_caddbuffer, "caddbuffer", ex_cbuffer,
+! RANGE|NOTADR|WORD1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_caddexpr, "caddexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_caddfile, "caddfile", ex_cfile,
+ TRLBAR|FILE1,
+! ADDR_LINES),
+ EX(CMD_call, "call", ex_call,
+ RANGE|NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_catch, "catch", ex_catch,
+ EXTRA|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cbuffer, "cbuffer", ex_cbuffer,
+! BANG|RANGE|NOTADR|WORD1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_cbottom, "cbottom", ex_cbottom,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_cc, "cc", ex_cc,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_cclose, "cclose", ex_cclose,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_cd, "cd", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cdo, "cdo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
+ ADDR_QUICKFIX),
+ EX(CMD_center, "center", ex_align,
+ TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_cexpr, "cexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_cfile, "cfile", ex_cfile,
+ TRLBAR|FILE1|BANG,
+! ADDR_LINES),
+ EX(CMD_cfdo, "cfdo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
+ ADDR_QUICKFIX),
+ EX(CMD_cfirst, "cfirst", ex_cc,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_cgetfile, "cgetfile", ex_cfile,
+ TRLBAR|FILE1,
+! ADDR_LINES),
+ EX(CMD_cgetbuffer, "cgetbuffer", ex_cbuffer,
+! RANGE|NOTADR|WORD1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_cgetexpr, "cgetexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_chdir, "chdir", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_changes, "changes", ex_changes,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_checkpath, "checkpath", ex_checkpath,
+ TRLBAR|BANG|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_checktime, "checktime", ex_checktime,
+! RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_chistory, "chistory", qf_history,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_clist, "clist", qf_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_clast, "clast", ex_cc,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_close, "close", ex_close,
+! BANG|RANGE|NOTADR|COUNT|TRLBAR|CMDWIN,
+ ADDR_WINDOWS),
+ EX(CMD_clearjumps, "clearjumps", ex_clearjumps,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cmap, "cmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cmapclear, "cmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cmenu, "cmenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cnext, "cnext", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_cnewer, "cnewer", qf_age,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_cnfile, "cnfile", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_cnoremap, "cnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cnoreabbrev, "cnoreabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cnoremenu, "cnoremenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_copy, "copy", ex_copymove,
+ RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_colder, "colder", qf_age,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_colorscheme, "colorscheme", ex_colorscheme,
+ WORD1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_command, "command", ex_command,
+ EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_comclear, "comclear", ex_comclear,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_compiler, "compiler", ex_compiler,
+ BANG|TRLBAR|WORD1|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_continue, "continue", ex_continue,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_confirm, "confirm", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_copen, "copen", ex_copen,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_cprevious, "cprevious", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_cpfile, "cpfile", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_cquit, "cquit", ex_cquit,
+ TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_crewind, "crewind", ex_cc,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_cscope, "cscope", ex_cscope,
+ EXTRA|NOTRLCOM|XFILE,
+! ADDR_LINES),
+ EX(CMD_cstag, "cstag", ex_cstag,
+ BANG|TRLBAR|WORD1,
+! ADDR_LINES),
+ EX(CMD_cunmap, "cunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cunabbrev, "cunabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cunmenu, "cunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_cwindow, "cwindow", ex_cwindow,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_delete, "delete", ex_operators,
+ RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_delmarks, "delmarks", ex_delmarks,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_debug, "debug", ex_debug,
+ NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_debuggreedy, "debuggreedy", ex_debuggreedy,
+! RANGE|NOTADR|ZEROR|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_delcommand, "delcommand", ex_delcommand,
+ NEEDARG|WORD1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_delfunction, "delfunction", ex_delfunction,
+ BANG|NEEDARG|WORD1|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_display, "display", ex_display,
+ EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_diffupdate, "diffupdate", ex_diffupdate,
+ BANG|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_diffget, "diffget", ex_diffgetput,
+ RANGE|EXTRA|TRLBAR|MODIFY,
+ ADDR_LINES),
+ EX(CMD_diffoff, "diffoff", ex_diffoff,
+ BANG|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_diffpatch, "diffpatch", ex_diffpatch,
+ EXTRA|FILE1|TRLBAR|MODIFY,
+! ADDR_LINES),
+ EX(CMD_diffput, "diffput", ex_diffgetput,
+ RANGE|EXTRA|TRLBAR,
+ ADDR_LINES),
+ EX(CMD_diffsplit, "diffsplit", ex_diffsplit,
+ EXTRA|FILE1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_diffthis, "diffthis", ex_diffthis,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_digraphs, "digraphs", ex_digraphs,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_djump, "djump", ex_findpat,
+ BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA,
+ ADDR_LINES),
+--- 116,470 ----
+ ADDR_LINES),
+ EX(CMD_abbreviate, "abbreviate", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_abclear, "abclear", ex_abclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_aboveleft, "aboveleft", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_all, "all", ex_all,
+! BANG|RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_amenu, "amenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_anoremenu, "anoremenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_args, "args", ex_args,
+ BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_argadd, "argadd", ex_argadd,
+! BANG|RANGE|ZEROR|FILES|TRLBAR,
+ ADDR_ARGUMENTS),
+ EX(CMD_argdelete, "argdelete", ex_argdelete,
+! BANG|RANGE|FILES|TRLBAR,
+ ADDR_ARGUMENTS),
+ EX(CMD_argdo, "argdo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+ ADDR_ARGUMENTS),
+ EX(CMD_argedit, "argedit", ex_argedit,
+! BANG|NEEDARG|RANGE|ZEROR|FILES|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_ARGUMENTS),
+ EX(CMD_argglobal, "argglobal", ex_args,
+ BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_arglocal, "arglocal", ex_args,
+ BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_argument, "argument", ex_argument,
+! BANG|RANGE|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_ARGUMENTS),
+ EX(CMD_ascii, "ascii", do_ascii,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_autocmd, "autocmd", ex_autocmd,
+ BANG|EXTRA|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_augroup, "augroup", ex_autocmd,
+ BANG|WORD1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_aunmenu, "aunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_buffer, "buffer", ex_buffer,
+! BANG|RANGE|BUFNAME|BUFUNL|COUNT|EXTRA|EDITCMD|TRLBAR,
+ ADDR_BUFFERS),
+ EX(CMD_bNext, "bNext", ex_bprevious,
+! BANG|RANGE|COUNT|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_ball, "ball", ex_buffer_all,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_badd, "badd", ex_edit,
+ NEEDARG|FILE1|EDITCMD|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_bdelete, "bdelete", ex_bunload,
+! BANG|RANGE|BUFNAME|COUNT|EXTRA|TRLBAR,
+ ADDR_BUFFERS),
+ EX(CMD_behave, "behave", ex_behave,
+ BANG|NEEDARG|WORD1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_belowright, "belowright", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_bfirst, "bfirst", ex_brewind,
+! BANG|RANGE|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_blast, "blast", ex_blast,
+! BANG|RANGE|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_bmodified, "bmodified", ex_bmodified,
+! BANG|RANGE|COUNT|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_bnext, "bnext", ex_bnext,
+! BANG|RANGE|COUNT|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_botright, "botright", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_bprevious, "bprevious", ex_bprevious,
+! BANG|RANGE|COUNT|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_brewind, "brewind", ex_brewind,
+! BANG|RANGE|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_break, "break", ex_break,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_breakadd, "breakadd", ex_breakadd,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_breakdel, "breakdel", ex_breakdel,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_breaklist, "breaklist", ex_breaklist,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_browse, "browse", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_buffers, "buffers", buflist_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_bufdo, "bufdo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+ ADDR_BUFFERS),
+ EX(CMD_bunload, "bunload", ex_bunload,
+! BANG|RANGE|BUFNAME|COUNT|EXTRA|TRLBAR,
+ ADDR_LOADED_BUFFERS),
+ EX(CMD_bwipeout, "bwipeout", ex_bunload,
+! BANG|RANGE|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR,
+ ADDR_BUFFERS),
+ EX(CMD_change, "change", ex_change,
+ BANG|WHOLEFOLD|RANGE|COUNT|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_cNext, "cNext", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cNfile, "cNfile", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cabbrev, "cabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_cabclear, "cabclear", ex_abclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_caddbuffer, "caddbuffer", ex_cbuffer,
+! RANGE|WORD1|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_caddexpr, "caddexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_caddfile, "caddfile", ex_cfile,
+ TRLBAR|FILE1,
+! ADDR_NONE),
+ EX(CMD_call, "call", ex_call,
+ RANGE|NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_catch, "catch", ex_catch,
+ EXTRA|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_cbuffer, "cbuffer", ex_cbuffer,
+! BANG|RANGE|WORD1|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_cbottom, "cbottom", ex_cbottom,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_cc, "cc", ex_cc,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cclose, "cclose", ex_cclose,
+! TRLBAR,
+! ADDR_NONE),
+ EX(CMD_cd, "cd", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_cdo, "cdo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+ ADDR_QUICKFIX),
+ EX(CMD_center, "center", ex_align,
+ TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_cexpr, "cexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG,
+! ADDR_NONE),
+ EX(CMD_cfile, "cfile", ex_cfile,
+ TRLBAR|FILE1|BANG,
+! ADDR_NONE),
+ EX(CMD_cfdo, "cfdo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+ ADDR_QUICKFIX),
+ EX(CMD_cfirst, "cfirst", ex_cc,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cgetfile, "cgetfile", ex_cfile,
+ TRLBAR|FILE1,
+! ADDR_NONE),
+ EX(CMD_cgetbuffer, "cgetbuffer", ex_cbuffer,
+! RANGE|WORD1|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_cgetexpr, "cgetexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_chdir, "chdir", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_changes, "changes", ex_changes,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_checkpath, "checkpath", ex_checkpath,
+ TRLBAR|BANG|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_checktime, "checktime", ex_checktime,
+! RANGE|BUFNAME|COUNT|EXTRA|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_chistory, "chistory", qf_history,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_clist, "clist", qf_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_clast, "clast", ex_cc,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_close, "close", ex_close,
+! BANG|RANGE|COUNT|TRLBAR|CMDWIN,
+ ADDR_WINDOWS),
+ EX(CMD_clearjumps, "clearjumps", ex_clearjumps,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_cmap, "cmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_cmapclear, "cmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_cmenu, "cmenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_cnext, "cnext", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cnewer, "cnewer", qf_age,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_cnfile, "cnfile", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cnoremap, "cnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_cnoreabbrev, "cnoreabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_cnoremenu, "cnoremenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_copy, "copy", ex_copymove,
+ RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_colder, "colder", qf_age,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_colorscheme, "colorscheme", ex_colorscheme,
+ WORD1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_command, "command", ex_command,
+ EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_comclear, "comclear", ex_comclear,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_compiler, "compiler", ex_compiler,
+ BANG|TRLBAR|WORD1|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_continue, "continue", ex_continue,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_confirm, "confirm", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_copen, "copen", ex_copen,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_cprevious, "cprevious", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cpfile, "cpfile", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cquit, "cquit", ex_cquit,
+ TRLBAR|BANG,
+! ADDR_NONE),
+ EX(CMD_crewind, "crewind", ex_cc,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cscope, "cscope", ex_cscope,
+ EXTRA|NOTRLCOM|XFILE,
+! ADDR_NONE),
+ EX(CMD_cstag, "cstag", ex_cstag,
+ BANG|TRLBAR|WORD1,
+! ADDR_NONE),
+ EX(CMD_cunmap, "cunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_cunabbrev, "cunabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_cunmenu, "cunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_cwindow, "cwindow", ex_cwindow,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_delete, "delete", ex_operators,
+ RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_delmarks, "delmarks", ex_delmarks,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_debug, "debug", ex_debug,
+ NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_debuggreedy, "debuggreedy", ex_debuggreedy,
+! RANGE|ZEROR|TRLBAR|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_delcommand, "delcommand", ex_delcommand,
+ NEEDARG|WORD1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_delfunction, "delfunction", ex_delfunction,
+ BANG|NEEDARG|WORD1|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_display, "display", ex_display,
+ EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_diffupdate, "diffupdate", ex_diffupdate,
+ BANG|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_diffget, "diffget", ex_diffgetput,
+ RANGE|EXTRA|TRLBAR|MODIFY,
+ ADDR_LINES),
+ EX(CMD_diffoff, "diffoff", ex_diffoff,
+ BANG|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_diffpatch, "diffpatch", ex_diffpatch,
+ EXTRA|FILE1|TRLBAR|MODIFY,
+! ADDR_NONE),
+ EX(CMD_diffput, "diffput", ex_diffgetput,
+ RANGE|EXTRA|TRLBAR,
+ ADDR_LINES),
+ EX(CMD_diffsplit, "diffsplit", ex_diffsplit,
+ EXTRA|FILE1|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_diffthis, "diffthis", ex_diffthis,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_digraphs, "digraphs", ex_digraphs,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_djump, "djump", ex_findpat,
+ BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA,
+ ADDR_LINES),
+***************
+*** 467,479 ****
+ ADDR_LINES),
+ EX(CMD_doautocmd, "doautocmd", ex_doautocmd,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_doautoall, "doautoall", ex_doautoall,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_drop, "drop", ex_drop,
+ FILES|EDITCMD|NEEDARG|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_dsearch, "dsearch", ex_findpat,
+ BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN,
+ ADDR_LINES),
+--- 473,485 ----
+ ADDR_LINES),
+ EX(CMD_doautocmd, "doautocmd", ex_doautocmd,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_doautoall, "doautoall", ex_doautoall,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_drop, "drop", ex_drop,
+ FILES|EDITCMD|NEEDARG|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_dsearch, "dsearch", ex_findpat,
+ BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN,
+ ADDR_LINES),
+***************
+*** 482,572 ****
+ ADDR_LINES),
+ EX(CMD_edit, "edit", ex_edit,
+ BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_earlier, "earlier", ex_later,
+ TRLBAR|EXTRA|NOSPC|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_echo, "echo", ex_echo,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_echoerr, "echoerr", ex_execute,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_echohl, "echohl", ex_echohl,
+ EXTRA|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_echomsg, "echomsg", ex_execute,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_echon, "echon", ex_echo,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_else, "else", ex_else,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_elseif, "elseif", ex_else,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_emenu, "emenu", ex_emenu,
+! NEEDARG|EXTRA|TRLBAR|NOTRLCOM|RANGE|NOTADR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_endif, "endif", ex_endif,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_endfunction, "endfunction", ex_endfunction,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_endfor, "endfor", ex_endwhile,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_endtry, "endtry", ex_endtry,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_endwhile, "endwhile", ex_endwhile,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_enew, "enew", ex_edit,
+ BANG|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_ex, "ex", ex_edit,
+ BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_execute, "execute", ex_execute,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_exit, "exit", ex_exit,
+ RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_exusage, "exusage", ex_exusage,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_file, "file", ex_file,
+! RANGE|NOTADR|ZEROR|BANG|FILE1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_files, "files", buflist_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_filetype, "filetype", ex_filetype,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_filter, "filter", ex_wrongmodifier,
+ BANG|NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_find, "find", ex_find,
+! RANGE|NOTADR|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_finally, "finally", ex_finally,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_finish, "finish", ex_finish,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_first, "first", ex_rewind,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_fixdel, "fixdel", do_fixdel,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_fold, "fold", ex_fold,
+ RANGE|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN,
+ ADDR_LINES),
+--- 488,578 ----
+ ADDR_LINES),
+ EX(CMD_edit, "edit", ex_edit,
+ BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_earlier, "earlier", ex_later,
+ TRLBAR|EXTRA|NOSPC|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_echo, "echo", ex_echo,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_echoerr, "echoerr", ex_execute,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_echohl, "echohl", ex_echohl,
+ EXTRA|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_echomsg, "echomsg", ex_execute,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_echon, "echon", ex_echo,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_else, "else", ex_else,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_elseif, "elseif", ex_else,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_emenu, "emenu", ex_emenu,
+! NEEDARG|EXTRA|TRLBAR|NOTRLCOM|RANGE|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_endif, "endif", ex_endif,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_endfunction, "endfunction", ex_endfunction,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_endfor, "endfor", ex_endwhile,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_endtry, "endtry", ex_endtry,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_endwhile, "endwhile", ex_endwhile,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_enew, "enew", ex_edit,
+ BANG|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_ex, "ex", ex_edit,
+ BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_execute, "execute", ex_execute,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_exit, "exit", ex_exit,
+ RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_exusage, "exusage", ex_exusage,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_file, "file", ex_file,
+! RANGE|ZEROR|BANG|FILE1|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_files, "files", buflist_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_filetype, "filetype", ex_filetype,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_filter, "filter", ex_wrongmodifier,
+ BANG|NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_find, "find", ex_find,
+! RANGE|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_finally, "finally", ex_finally,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_finish, "finish", ex_finish,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_first, "first", ex_rewind,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_fixdel, "fixdel", do_fixdel,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_fold, "fold", ex_fold,
+ RANGE|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN,
+ ADDR_LINES),
+***************
+*** 584,650 ****
+ ADDR_LINES),
+ EX(CMD_for, "for", ex_while,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_function, "function", ex_function,
+ EXTRA|BANG|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_global, "global", ex_global,
+ RANGE|WHOLEFOLD|BANG|EXTRA|DFLALL|SBOXOK|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_goto, "goto", ex_goto,
+! RANGE|NOTADR|COUNT|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_grep, "grep", ex_make,
+! RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_LINES),
+ EX(CMD_grepadd, "grepadd", ex_make,
+! RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_LINES),
+ EX(CMD_gui, "gui", ex_gui,
+ BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_gvim, "gvim", ex_gui,
+ BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_help, "help", ex_help,
+ BANG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_helpclose, "helpclose", ex_helpclose,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_helpfind, "helpfind", ex_helpfind,
+ EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_helpgrep, "helpgrep", ex_helpgrep,
+ EXTRA|NOTRLCOM|NEEDARG,
+! ADDR_LINES),
+ EX(CMD_helptags, "helptags", ex_helptags,
+ NEEDARG|FILES|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_hardcopy, "hardcopy", ex_hardcopy,
+ RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG,
+ ADDR_LINES),
+ EX(CMD_highlight, "highlight", ex_highlight,
+ BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_hide, "hide", ex_hide,
+! BANG|RANGE|NOTADR|COUNT|EXTRA|TRLBAR,
+ ADDR_WINDOWS),
+ EX(CMD_history, "history", ex_history,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_insert, "insert", ex_append,
+ BANG|RANGE|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_iabbrev, "iabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_iabclear, "iabclear", ex_abclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_if, "if", ex_if,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_ijump, "ijump", ex_findpat,
+ BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA,
+ ADDR_LINES),
+--- 590,656 ----
+ ADDR_LINES),
+ EX(CMD_for, "for", ex_while,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_function, "function", ex_function,
+ EXTRA|BANG|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_global, "global", ex_global,
+ RANGE|WHOLEFOLD|BANG|EXTRA|DFLALL|SBOXOK|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_goto, "goto", ex_goto,
+! RANGE|COUNT|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_grep, "grep", ex_make,
+! RANGE|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_OTHER),
+ EX(CMD_grepadd, "grepadd", ex_make,
+! RANGE|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_OTHER),
+ EX(CMD_gui, "gui", ex_gui,
+ BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_gvim, "gvim", ex_gui,
+ BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_help, "help", ex_help,
+ BANG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_helpclose, "helpclose", ex_helpclose,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_helpfind, "helpfind", ex_helpfind,
+ EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_helpgrep, "helpgrep", ex_helpgrep,
+ EXTRA|NOTRLCOM|NEEDARG,
+! ADDR_NONE),
+ EX(CMD_helptags, "helptags", ex_helptags,
+ NEEDARG|FILES|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_hardcopy, "hardcopy", ex_hardcopy,
+ RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG,
+ ADDR_LINES),
+ EX(CMD_highlight, "highlight", ex_highlight,
+ BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_hide, "hide", ex_hide,
+! BANG|RANGE|COUNT|EXTRA|TRLBAR,
+ ADDR_WINDOWS),
+ EX(CMD_history, "history", ex_history,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_insert, "insert", ex_append,
+ BANG|RANGE|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_iabbrev, "iabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_iabclear, "iabclear", ex_abclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_if, "if", ex_if,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_ijump, "ijump", ex_findpat,
+ BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA,
+ ADDR_LINES),
+***************
+*** 653,677 ****
+ ADDR_LINES),
+ EX(CMD_imap, "imap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_imapclear, "imapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_imenu, "imenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_inoremap, "inoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_inoreabbrev, "inoreabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_inoremenu, "inoremenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_intro, "intro", ex_intro,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_isearch, "isearch", ex_findpat,
+ BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN,
+ ADDR_LINES),
+--- 659,683 ----
+ ADDR_LINES),
+ EX(CMD_imap, "imap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_imapclear, "imapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_imenu, "imenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_inoremap, "inoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_inoreabbrev, "inoreabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_inoremenu, "inoremenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_intro, "intro", ex_intro,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_isearch, "isearch", ex_findpat,
+ BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN,
+ ADDR_LINES),
+***************
+*** 680,866 ****
+ ADDR_LINES),
+ EX(CMD_iunmap, "iunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_iunabbrev, "iunabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_iunmenu, "iunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_join, "join", ex_join,
+ BANG|RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_jumps, "jumps", ex_jumps,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_k, "k", ex_mark,
+ RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_keepmarks, "keepmarks", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_keepjumps, "keepjumps", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_keeppatterns, "keeppatterns", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_keepalt, "keepalt", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_list, "list", ex_print,
+ RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_lNext, "lNext", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_lNfile, "lNfile", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_last, "last", ex_last,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_language, "language", ex_language,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_laddexpr, "laddexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_laddbuffer, "laddbuffer", ex_cbuffer,
+! RANGE|NOTADR|WORD1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_laddfile, "laddfile", ex_cfile,
+ TRLBAR|FILE1,
+! ADDR_LINES),
+ EX(CMD_later, "later", ex_later,
+ TRLBAR|EXTRA|NOSPC|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_lbuffer, "lbuffer", ex_cbuffer,
+! BANG|RANGE|NOTADR|WORD1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_lbottom, "lbottom", ex_cbottom,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_lcd, "lcd", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_lchdir, "lchdir", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_lclose, "lclose", ex_cclose,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_lcscope, "lcscope", ex_cscope,
+ EXTRA|NOTRLCOM|XFILE,
+! ADDR_LINES),
+ EX(CMD_ldo, "ldo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
+ ADDR_QUICKFIX),
+ EX(CMD_left, "left", ex_align,
+ TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_leftabove, "leftabove", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_let, "let", ex_let,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_lexpr, "lexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_lfile, "lfile", ex_cfile,
+ TRLBAR|FILE1|BANG,
+! ADDR_LINES),
+ EX(CMD_lfdo, "lfdo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
+ ADDR_QUICKFIX),
+ EX(CMD_lfirst, "lfirst", ex_cc,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_lgetfile, "lgetfile", ex_cfile,
+ TRLBAR|FILE1,
+! ADDR_LINES),
+ EX(CMD_lgetbuffer, "lgetbuffer", ex_cbuffer,
+! RANGE|NOTADR|WORD1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_lgetexpr, "lgetexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_lgrep, "lgrep", ex_make,
+! RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_LINES),
+ EX(CMD_lgrepadd, "lgrepadd", ex_make,
+! RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_LINES),
+ EX(CMD_lhelpgrep, "lhelpgrep", ex_helpgrep,
+ EXTRA|NOTRLCOM|NEEDARG,
+! ADDR_LINES),
+ EX(CMD_lhistory, "lhistory", qf_history,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_ll, "ll", ex_cc,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_llast, "llast", ex_cc,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_llist, "llist", qf_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_lmap, "lmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_lmapclear, "lmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_lmake, "lmake", ex_make,
+ BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_LINES),
+ EX(CMD_lnoremap, "lnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_lnext, "lnext", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_lnewer, "lnewer", qf_age,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_lnfile, "lnfile", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_loadview, "loadview", ex_loadview,
+ FILE1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_loadkeymap, "loadkeymap", ex_loadkeymap,
+ CMDWIN,
+! ADDR_LINES),
+ EX(CMD_lockmarks, "lockmarks", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_lockvar, "lockvar", ex_lockvar,
+ BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_lolder, "lolder", qf_age,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_lopen, "lopen", ex_copen,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_lprevious, "lprevious", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_lpfile, "lpfile", ex_cnext,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_lrewind, "lrewind", ex_cc,
+! RANGE|NOTADR|COUNT|TRLBAR|BANG,
+! ADDR_LINES),
+ EX(CMD_ltag, "ltag", ex_tag,
+! NOTADR|TRLBAR|BANG|WORD1,
+! ADDR_LINES),
+ EX(CMD_lunmap, "lunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_lua, "lua", ex_lua,
+ RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+--- 686,872 ----
+ ADDR_LINES),
+ EX(CMD_iunmap, "iunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_iunabbrev, "iunabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_iunmenu, "iunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_join, "join", ex_join,
+ BANG|RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_jumps, "jumps", ex_jumps,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_k, "k", ex_mark,
+ RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_keepmarks, "keepmarks", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_keepjumps, "keepjumps", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_keeppatterns, "keeppatterns", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_keepalt, "keepalt", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_list, "list", ex_print,
+ RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_lNext, "lNext", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_lNfile, "lNfile", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_last, "last", ex_last,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_language, "language", ex_language,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_laddexpr, "laddexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_laddbuffer, "laddbuffer", ex_cbuffer,
+! RANGE|WORD1|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_laddfile, "laddfile", ex_cfile,
+ TRLBAR|FILE1,
+! ADDR_NONE),
+ EX(CMD_later, "later", ex_later,
+ TRLBAR|EXTRA|NOSPC|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_lbuffer, "lbuffer", ex_cbuffer,
+! BANG|RANGE|WORD1|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_lbottom, "lbottom", ex_cbottom,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_lcd, "lcd", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_lchdir, "lchdir", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_lclose, "lclose", ex_cclose,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_lcscope, "lcscope", ex_cscope,
+ EXTRA|NOTRLCOM|XFILE,
+! ADDR_NONE),
+ EX(CMD_ldo, "ldo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+ ADDR_QUICKFIX),
+ EX(CMD_left, "left", ex_align,
+ TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_leftabove, "leftabove", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_let, "let", ex_let,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_lexpr, "lexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG,
+! ADDR_NONE),
+ EX(CMD_lfile, "lfile", ex_cfile,
+ TRLBAR|FILE1|BANG,
+! ADDR_NONE),
+ EX(CMD_lfdo, "lfdo", ex_listdo,
+! BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+ ADDR_QUICKFIX),
+ EX(CMD_lfirst, "lfirst", ex_cc,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_lgetfile, "lgetfile", ex_cfile,
+ TRLBAR|FILE1,
+! ADDR_NONE),
+ EX(CMD_lgetbuffer, "lgetbuffer", ex_cbuffer,
+! RANGE|WORD1|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_lgetexpr, "lgetexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_lgrep, "lgrep", ex_make,
+! RANGE|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_OTHER),
+ EX(CMD_lgrepadd, "lgrepadd", ex_make,
+! RANGE|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_OTHER),
+ EX(CMD_lhelpgrep, "lhelpgrep", ex_helpgrep,
+ EXTRA|NOTRLCOM|NEEDARG,
+! ADDR_NONE),
+ EX(CMD_lhistory, "lhistory", qf_history,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_ll, "ll", ex_cc,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_llast, "llast", ex_cc,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_llist, "llist", qf_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_lmap, "lmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_lmapclear, "lmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_lmake, "lmake", ex_make,
+ BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_NONE),
+ EX(CMD_lnoremap, "lnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_lnext, "lnext", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_lnewer, "lnewer", qf_age,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_lnfile, "lnfile", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_loadview, "loadview", ex_loadview,
+ FILE1|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_loadkeymap, "loadkeymap", ex_loadkeymap,
+ CMDWIN,
+! ADDR_NONE),
+ EX(CMD_lockmarks, "lockmarks", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_lockvar, "lockvar", ex_lockvar,
+ BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_lolder, "lolder", qf_age,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_lopen, "lopen", ex_copen,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_lprevious, "lprevious", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_lpfile, "lpfile", ex_cnext,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_lrewind, "lrewind", ex_cc,
+! RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_ltag, "ltag", ex_tag,
+! TRLBAR|BANG|WORD1,
+! ADDR_NONE),
+ EX(CMD_lunmap, "lunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_lua, "lua", ex_lua,
+ RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+***************
+*** 871,887 ****
+ RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_lvimgrep, "lvimgrep", ex_vimgrep,
+! RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_LINES),
+ EX(CMD_lvimgrepadd, "lvimgrepadd", ex_vimgrep,
+! RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_LINES),
+ EX(CMD_lwindow, "lwindow", ex_cwindow,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_ls, "ls", buflist_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_move, "move", ex_copymove,
+ RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+--- 877,893 ----
+ RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_lvimgrep, "lvimgrep", ex_vimgrep,
+! RANGE|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_OTHER),
+ EX(CMD_lvimgrepadd, "lvimgrepadd", ex_vimgrep,
+! RANGE|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_OTHER),
+ EX(CMD_lwindow, "lwindow", ex_cwindow,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_ls, "ls", buflist_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_move, "move", ex_copymove,
+ RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+***************
+*** 890,935 ****
+ ADDR_LINES),
+ EX(CMD_make, "make", ex_make,
+ BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_LINES),
+ EX(CMD_map, "map", ex_map,
+ BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_mapclear, "mapclear", ex_mapclear,
+ EXTRA|BANG|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_marks, "marks", do_marks,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_match, "match", ex_match,
+! RANGE|NOTADR|EXTRA|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_menu, "menu", ex_menu,
+! RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_menutranslate, "menutranslate", ex_menutranslate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_messages, "messages", ex_messages,
+ EXTRA|TRLBAR|RANGE|CMDWIN,
+ ADDR_OTHER),
+ EX(CMD_mkexrc, "mkexrc", ex_mkrc,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_mksession, "mksession", ex_mkrc,
+ BANG|FILE1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_mkspell, "mkspell", ex_mkspell,
+ BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_LINES),
+ EX(CMD_mkvimrc, "mkvimrc", ex_mkrc,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_mkview, "mkview", ex_mkrc,
+ BANG|FILE1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_mode, "mode", ex_mode,
+ WORD1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_mzscheme, "mzscheme", ex_mzscheme,
+ RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK|RESTRICT,
+ ADDR_LINES),
+--- 896,941 ----
+ ADDR_LINES),
+ EX(CMD_make, "make", ex_make,
+ BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_NONE),
+ EX(CMD_map, "map", ex_map,
+ BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_mapclear, "mapclear", ex_mapclear,
+ EXTRA|BANG|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_marks, "marks", do_marks,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_match, "match", ex_match,
+! RANGE|EXTRA|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_menu, "menu", ex_menu,
+! RANGE|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_menutranslate, "menutranslate", ex_menutranslate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_messages, "messages", ex_messages,
+ EXTRA|TRLBAR|RANGE|CMDWIN,
+ ADDR_OTHER),
+ EX(CMD_mkexrc, "mkexrc", ex_mkrc,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_mksession, "mksession", ex_mkrc,
+ BANG|FILE1|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_mkspell, "mkspell", ex_mkspell,
+ BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_NONE),
+ EX(CMD_mkvimrc, "mkvimrc", ex_mkrc,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_mkview, "mkview", ex_mkrc,
+ BANG|FILE1|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_mode, "mode", ex_mode,
+ WORD1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_mzscheme, "mzscheme", ex_mzscheme,
+ RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK|RESTRICT,
+ ADDR_LINES),
+***************
+*** 937,989 ****
+ RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_next, "next", ex_next,
+! RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_nbkey, "nbkey", ex_nbkey,
+! EXTRA|NOTADR|NEEDARG,
+! ADDR_LINES),
+ EX(CMD_nbclose, "nbclose", ex_nbclose,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_nbstart, "nbstart", ex_nbstart,
+ WORD1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_new, "new", ex_splitview,
+! BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_nmap, "nmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_nmapclear, "nmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_nmenu, "nmenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_nnoremap, "nnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_nnoremenu, "nnoremenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_noremap, "noremap", ex_map,
+ BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_noautocmd, "noautocmd", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_nohlsearch, "nohlsearch", ex_nohlsearch,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_noreabbrev, "noreabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_noremenu, "noremenu", ex_menu,
+! RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_noswapfile, "noswapfile", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_normal, "normal", ex_normal,
+ RANGE|BANG|EXTRA|NEEDARG|NOTRLCOM|USECTRLV|SBOXOK|CMDWIN,
+ ADDR_LINES),
+--- 943,995 ----
+ RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_next, "next", ex_next,
+! RANGE|BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_nbkey, "nbkey", ex_nbkey,
+! EXTRA|NEEDARG,
+! ADDR_NONE),
+ EX(CMD_nbclose, "nbclose", ex_nbclose,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_nbstart, "nbstart", ex_nbstart,
+ WORD1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_new, "new", ex_splitview,
+! BANG|FILE1|RANGE|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_nmap, "nmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_nmapclear, "nmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_nmenu, "nmenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_nnoremap, "nnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_nnoremenu, "nnoremenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_noremap, "noremap", ex_map,
+ BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_noautocmd, "noautocmd", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_nohlsearch, "nohlsearch", ex_nohlsearch,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_noreabbrev, "noreabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_noremenu, "noremenu", ex_menu,
+! RANGE|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_noswapfile, "noswapfile", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_normal, "normal", ex_normal,
+ RANGE|BANG|EXTRA|NEEDARG|NOTRLCOM|USECTRLV|SBOXOK|CMDWIN,
+ ADDR_LINES),
+***************
+*** 992,1049 ****
+ ADDR_LINES),
+ EX(CMD_nunmap, "nunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_nunmenu, "nunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_open, "open", ex_open,
+ RANGE|BANG|EXTRA,
+ ADDR_LINES),
+ EX(CMD_oldfiles, "oldfiles", ex_oldfiles,
+ BANG|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_omap, "omap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_omapclear, "omapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_omenu, "omenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_only, "only", ex_only,
+! BANG|NOTADR|RANGE|COUNT|TRLBAR,
+ ADDR_WINDOWS),
+ EX(CMD_onoremap, "onoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_onoremenu, "onoremenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_options, "options", ex_options,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_ounmap, "ounmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_ounmenu, "ounmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_ownsyntax, "ownsyntax", ex_ownsyntax,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_print, "print", ex_print,
+ RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|SBOXOK,
+ ADDR_LINES),
+ EX(CMD_packadd, "packadd", ex_packadd,
+ BANG|FILE1|NEEDARG|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_packloadall, "packloadall", ex_packloadall,
+ BANG|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_pclose, "pclose", ex_pclose,
+ BANG|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_perl, "perl", ex_perl,
+ RANGE|EXTRA|DFLALL|NEEDARG|SBOXOK|CMDWIN,
+ ADDR_LINES),
+--- 998,1055 ----
+ ADDR_LINES),
+ EX(CMD_nunmap, "nunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_nunmenu, "nunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_open, "open", ex_open,
+ RANGE|BANG|EXTRA,
+ ADDR_LINES),
+ EX(CMD_oldfiles, "oldfiles", ex_oldfiles,
+ BANG|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_omap, "omap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_omapclear, "omapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_omenu, "omenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_only, "only", ex_only,
+! BANG|RANGE|COUNT|TRLBAR,
+ ADDR_WINDOWS),
+ EX(CMD_onoremap, "onoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_onoremenu, "onoremenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_options, "options", ex_options,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_ounmap, "ounmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_ounmenu, "ounmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_ownsyntax, "ownsyntax", ex_ownsyntax,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_print, "print", ex_print,
+ RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|SBOXOK,
+ ADDR_LINES),
+ EX(CMD_packadd, "packadd", ex_packadd,
+ BANG|FILE1|NEEDARG|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_packloadall, "packloadall", ex_packloadall,
+ BANG|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_pclose, "pclose", ex_pclose,
+ BANG|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_perl, "perl", ex_perl,
+ RANGE|EXTRA|DFLALL|NEEDARG|SBOXOK|CMDWIN,
+ ADDR_LINES),
+***************
+*** 1052,1121 ****
+ ADDR_LINES),
+ EX(CMD_pedit, "pedit", ex_pedit,
+ BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_pop, "pop", ex_tag,
+! RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_popup, "popup", ex_popup,
+ NEEDARG|EXTRA|BANG|TRLBAR|NOTRLCOM|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_ppop, "ppop", ex_ptag,
+! RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_preserve, "preserve", ex_preserve,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_previous, "previous", ex_previous,
+! EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_promptfind, "promptfind", gui_mch_find_dialog,
+ EXTRA|NOTRLCOM|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_promptrepl, "promptrepl", gui_mch_replace_dialog,
+ EXTRA|NOTRLCOM|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_profile, "profile", ex_profile,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_profdel, "profdel", ex_breakdel,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_psearch, "psearch", ex_psearch,
+ BANG|RANGE|WHOLEFOLD|DFLALL|EXTRA,
+ ADDR_LINES),
+ EX(CMD_ptag, "ptag", ex_ptag,
+! RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_ptNext, "ptNext", ex_ptag,
+! RANGE|NOTADR|BANG|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_ptfirst, "ptfirst", ex_ptag,
+! RANGE|NOTADR|BANG|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_ptjump, "ptjump", ex_ptag,
+ BANG|TRLBAR|WORD1,
+! ADDR_LINES),
+ EX(CMD_ptlast, "ptlast", ex_ptag,
+ BANG|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_ptnext, "ptnext", ex_ptag,
+! RANGE|NOTADR|BANG|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_ptprevious, "ptprevious", ex_ptag,
+! RANGE|NOTADR|BANG|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_ptrewind, "ptrewind", ex_ptag,
+! RANGE|NOTADR|BANG|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_ptselect, "ptselect", ex_ptag,
+ BANG|TRLBAR|WORD1,
+! ADDR_LINES),
+ EX(CMD_put, "put", ex_put,
+ RANGE|WHOLEFOLD|BANG|REGSTR|TRLBAR|ZEROR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_pwd, "pwd", ex_pwd,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_python, "python", ex_python,
+ RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+--- 1058,1127 ----
+ ADDR_LINES),
+ EX(CMD_pedit, "pedit", ex_pedit,
+ BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_pop, "pop", ex_tag,
+! RANGE|BANG|COUNT|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_popup, "popup", ex_popup,
+ NEEDARG|EXTRA|BANG|TRLBAR|NOTRLCOM|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_ppop, "ppop", ex_ptag,
+! RANGE|BANG|COUNT|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_preserve, "preserve", ex_preserve,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_previous, "previous", ex_previous,
+! EXTRA|RANGE|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_promptfind, "promptfind", gui_mch_find_dialog,
+ EXTRA|NOTRLCOM|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_promptrepl, "promptrepl", gui_mch_replace_dialog,
+ EXTRA|NOTRLCOM|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_profile, "profile", ex_profile,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_profdel, "profdel", ex_breakdel,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_psearch, "psearch", ex_psearch,
+ BANG|RANGE|WHOLEFOLD|DFLALL|EXTRA,
+ ADDR_LINES),
+ EX(CMD_ptag, "ptag", ex_ptag,
+! RANGE|BANG|WORD1|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_ptNext, "ptNext", ex_ptag,
+! RANGE|BANG|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_ptfirst, "ptfirst", ex_ptag,
+! RANGE|BANG|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_ptjump, "ptjump", ex_ptag,
+ BANG|TRLBAR|WORD1,
+! ADDR_NONE),
+ EX(CMD_ptlast, "ptlast", ex_ptag,
+ BANG|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_ptnext, "ptnext", ex_ptag,
+! RANGE|BANG|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_ptprevious, "ptprevious", ex_ptag,
+! RANGE|BANG|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_ptrewind, "ptrewind", ex_ptag,
+! RANGE|BANG|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_ptselect, "ptselect", ex_ptag,
+ BANG|TRLBAR|WORD1,
+! ADDR_NONE),
+ EX(CMD_put, "put", ex_put,
+ RANGE|WHOLEFOLD|BANG|REGSTR|TRLBAR|ZEROR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_pwd, "pwd", ex_pwd,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_python, "python", ex_python,
+ RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+***************
+*** 1150,1208 ****
+ RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_quit, "quit", ex_quit,
+! BANG|RANGE|COUNT|NOTADR|TRLBAR|CMDWIN,
+ ADDR_WINDOWS),
+ EX(CMD_quitall, "quitall", ex_quit_all,
+ BANG|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_qall, "qall", ex_quit_all,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_read, "read", ex_read,
+ BANG|RANGE|WHOLEFOLD|FILE1|ARGOPT|TRLBAR|ZEROR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_recover, "recover", ex_recover,
+ BANG|FILE1|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_redo, "redo", ex_redo,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_redir, "redir", ex_redir,
+ BANG|FILES|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_redraw, "redraw", ex_redraw,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_redrawstatus, "redrawstatus", ex_redrawstatus,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_redrawtabline, "redrawtabline", ex_redrawtabline,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_registers, "registers", ex_display,
+ EXTRA|NOTRLCOM|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_resize, "resize", ex_resize,
+! RANGE|NOTADR|TRLBAR|WORD1|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_retab, "retab", ex_retab,
+ TRLBAR|RANGE|WHOLEFOLD|DFLALL|BANG|WORD1|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_return, "return", ex_return,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_rewind, "rewind", ex_rewind,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_right, "right", ex_align,
+ TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_rightbelow, "rightbelow", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_runtime, "runtime", ex_runtime,
+ BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_ruby, "ruby", ex_ruby,
+ RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+--- 1156,1214 ----
+ RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+ EX(CMD_quit, "quit", ex_quit,
+! BANG|RANGE|COUNT|TRLBAR|CMDWIN,
+ ADDR_WINDOWS),
+ EX(CMD_quitall, "quitall", ex_quit_all,
+ BANG|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_qall, "qall", ex_quit_all,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_read, "read", ex_read,
+ BANG|RANGE|WHOLEFOLD|FILE1|ARGOPT|TRLBAR|ZEROR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_recover, "recover", ex_recover,
+ BANG|FILE1|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_redo, "redo", ex_redo,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_redir, "redir", ex_redir,
+ BANG|FILES|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_redraw, "redraw", ex_redraw,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_redrawstatus, "redrawstatus", ex_redrawstatus,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_redrawtabline, "redrawtabline", ex_redrawtabline,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_registers, "registers", ex_display,
+ EXTRA|NOTRLCOM|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_resize, "resize", ex_resize,
+! RANGE|TRLBAR|WORD1|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_retab, "retab", ex_retab,
+ TRLBAR|RANGE|WHOLEFOLD|DFLALL|BANG|WORD1|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_return, "return", ex_return,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_rewind, "rewind", ex_rewind,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_right, "right", ex_align,
+ TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_rightbelow, "rightbelow", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_runtime, "runtime", ex_runtime,
+ BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_ruby, "ruby", ex_ruby,
+ RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+***************
+*** 1214,1490 ****
+ ADDR_LINES),
+ EX(CMD_rundo, "rundo", ex_rundo,
+ NEEDARG|FILE1,
+! ADDR_LINES),
+ EX(CMD_rviminfo, "rviminfo", ex_viminfo,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_substitute, "substitute", do_sub,
+ RANGE|WHOLEFOLD|EXTRA|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_sNext, "sNext", ex_previous,
+! EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sargument, "sargument", ex_argument,
+! BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_ARGUMENTS),
+ EX(CMD_sall, "sall", ex_all,
+! BANG|RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sandbox, "sandbox", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_saveas, "saveas", ex_write,
+! BANG|DFLALL|FILE1|ARGOPT|CMDWIN|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sbuffer, "sbuffer", ex_buffer,
+! BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|EDITCMD|TRLBAR,
+ ADDR_BUFFERS),
+ EX(CMD_sbNext, "sbNext", ex_bprevious,
+! RANGE|NOTADR|COUNT|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sball, "sball", ex_buffer_all,
+! RANGE|NOTADR|COUNT|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sbfirst, "sbfirst", ex_brewind,
+ EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sblast, "sblast", ex_blast,
+ EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sbmodified, "sbmodified", ex_bmodified,
+! RANGE|NOTADR|COUNT|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sbnext, "sbnext", ex_bnext,
+! RANGE|NOTADR|COUNT|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sbprevious, "sbprevious", ex_bprevious,
+! RANGE|NOTADR|COUNT|EDITCMD|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sbrewind, "sbrewind", ex_brewind,
+ 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),
+ EX(CMD_scriptversion, "scriptversion", ex_scriptversion,
+ WORD1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_scscope, "scscope", ex_scscope,
+ EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_set, "set", ex_set,
+ TRLBAR|EXTRA|CMDWIN|SBOXOK,
+! ADDR_LINES),
+ EX(CMD_setfiletype, "setfiletype", ex_setfiletype,
+ TRLBAR|EXTRA|NEEDARG|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_setglobal, "setglobal", ex_set,
+ TRLBAR|EXTRA|CMDWIN|SBOXOK,
+! ADDR_LINES),
+ EX(CMD_setlocal, "setlocal", ex_set,
+ TRLBAR|EXTRA|CMDWIN|SBOXOK,
+! ADDR_LINES),
+ EX(CMD_sfind, "sfind", ex_splitview,
+! BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sfirst, "sfirst", ex_rewind,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_shell, "shell", ex_shell,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_simalt, "simalt", ex_simalt,
+ NEEDARG|WORD1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_sign, "sign", ex_sign,
+! NEEDARG|RANGE|NOTADR|EXTRA|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_silent, "silent", ex_wrongmodifier,
+ NEEDARG|EXTRA|BANG|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_sleep, "sleep", ex_sleep,
+! RANGE|NOTADR|COUNT|EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_slast, "slast", ex_last,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_smagic, "smagic", ex_submagic,
+ RANGE|WHOLEFOLD|EXTRA|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_smap, "smap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_smapclear, "smapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_smenu, "smenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_snext, "snext", ex_next,
+! RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_snomagic, "snomagic", ex_submagic,
+ RANGE|WHOLEFOLD|EXTRA|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_snoremap, "snoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_snoremenu, "snoremenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_source, "source", ex_source,
+ BANG|FILE1|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_sort, "sort", ex_sort,
+ RANGE|DFLALL|WHOLEFOLD|BANG|EXTRA|NOTRLCOM|MODIFY,
+ ADDR_LINES),
+ EX(CMD_split, "split", ex_splitview,
+! BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_spellgood, "spellgood", ex_spell,
+! BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_spelldump, "spelldump", ex_spelldump,
+ BANG|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_spellinfo, "spellinfo", ex_spellinfo,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_spellrepall, "spellrepall", ex_spellrepall,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_spellundo, "spellundo", ex_spell,
+! BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_spellwrong, "spellwrong", ex_spell,
+! BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sprevious, "sprevious", ex_previous,
+! EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_srewind, "srewind", ex_rewind,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_stop, "stop", ex_stop,
+ TRLBAR|BANG|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_stag, "stag", ex_stag,
+! RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_startinsert, "startinsert", ex_startinsert,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_startgreplace, "startgreplace", ex_startinsert,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_startreplace, "startreplace", ex_startinsert,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_stopinsert, "stopinsert", ex_stopinsert,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_stjump, "stjump", ex_stag,
+ BANG|TRLBAR|WORD1,
+! ADDR_LINES),
+ EX(CMD_stselect, "stselect", ex_stag,
+ BANG|TRLBAR|WORD1,
+! ADDR_LINES),
+ EX(CMD_sunhide, "sunhide", ex_buffer_all,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_sunmap, "sunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_sunmenu, "sunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_suspend, "suspend", ex_stop,
+ TRLBAR|BANG|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_sview, "sview", ex_splitview,
+! BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_swapname, "swapname", ex_swapname,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_syntax, "syntax", ex_syntax,
+ EXTRA|NOTRLCOM|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_syntime, "syntime", ex_syntime,
+ NEEDARG|WORD1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_syncbind, "syncbind", ex_syncbind,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_smile, "smile", ex_smile,
+ TRLBAR|CMDWIN|SBOXOK,
+! ADDR_LINES),
+ EX(CMD_t, "t", ex_copymove,
+ RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_tNext, "tNext", ex_tag,
+! RANGE|NOTADR|BANG|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_tag, "tag", ex_tag,
+! RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_tags, "tags", do_tags,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_tab, "tab", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_TABS),
+ EX(CMD_tabclose, "tabclose", ex_tabclose,
+! BANG|RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR|CMDWIN,
+ ADDR_TABS),
+ EX(CMD_tabdo, "tabdo", ex_listdo,
+! NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
+ ADDR_TABS),
+ EX(CMD_tabedit, "tabedit", ex_splitview,
+! BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_TABS),
+ EX(CMD_tabfind, "tabfind", ex_splitview,
+! BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|NEEDARG|TRLBAR,
+ ADDR_TABS),
+ EX(CMD_tabfirst, "tabfirst", ex_tabnext,
+ TRLBAR,
+! ADDR_TABS),
+ EX(CMD_tabmove, "tabmove", ex_tabmove,
+! RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR,
+ ADDR_TABS),
+ EX(CMD_tablast, "tablast", ex_tabnext,
+ TRLBAR,
+! ADDR_TABS),
+ EX(CMD_tabnext, "tabnext", ex_tabnext,
+! RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR,
+ ADDR_TABS),
+ EX(CMD_tabnew, "tabnew", ex_splitview,
+! BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_TABS),
+ EX(CMD_tabonly, "tabonly", ex_tabonly,
+! BANG|RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR|CMDWIN,
+ ADDR_TABS),
+ EX(CMD_tabprevious, "tabprevious", ex_tabnext,
+! RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR,
+ ADDR_TABS_RELATIVE),
+ EX(CMD_tabNext, "tabNext", ex_tabnext,
+! RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR,
+ ADDR_TABS_RELATIVE),
+ EX(CMD_tabrewind, "tabrewind", ex_tabnext,
+ TRLBAR,
+! ADDR_TABS),
+ EX(CMD_tabs, "tabs", ex_tabs,
+ TRLBAR|CMDWIN,
+! ADDR_TABS),
+ EX(CMD_tcd, "tcd", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_tchdir, "tchdir", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_tcl, "tcl", ex_tcl,
+ RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+--- 1220,1496 ----
+ ADDR_LINES),
+ EX(CMD_rundo, "rundo", ex_rundo,
+ NEEDARG|FILE1,
+! ADDR_NONE),
+ EX(CMD_rviminfo, "rviminfo", ex_viminfo,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_substitute, "substitute", do_sub,
+ RANGE|WHOLEFOLD|EXTRA|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_sNext, "sNext", ex_previous,
+! EXTRA|RANGE|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_sargument, "sargument", ex_argument,
+! BANG|RANGE|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_ARGUMENTS),
+ EX(CMD_sall, "sall", ex_all,
+! BANG|RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_sandbox, "sandbox", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_saveas, "saveas", ex_write,
+! BANG|FILE1|ARGOPT|CMDWIN|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_sbuffer, "sbuffer", ex_buffer,
+! BANG|RANGE|BUFNAME|BUFUNL|COUNT|EXTRA|EDITCMD|TRLBAR,
+ ADDR_BUFFERS),
+ EX(CMD_sbNext, "sbNext", ex_bprevious,
+! RANGE|COUNT|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_sball, "sball", ex_buffer_all,
+! RANGE|COUNT|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_sbfirst, "sbfirst", ex_brewind,
+ EDITCMD|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_sblast, "sblast", ex_blast,
+ EDITCMD|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_sbmodified, "sbmodified", ex_bmodified,
+! RANGE|COUNT|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_sbnext, "sbnext", ex_bnext,
+! RANGE|COUNT|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_sbprevious, "sbprevious", ex_bprevious,
+! RANGE|COUNT|EDITCMD|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_sbrewind, "sbrewind", ex_brewind,
+ EDITCMD|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_scriptnames, "scriptnames", ex_scriptnames,
+! BANG|RANGE|COUNT|TRLBAR|CMDWIN,
+ ADDR_OTHER),
+ EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding,
+ WORD1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_scriptversion, "scriptversion", ex_scriptversion,
+ WORD1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_scscope, "scscope", ex_scscope,
+ EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_set, "set", ex_set,
+ TRLBAR|EXTRA|CMDWIN|SBOXOK,
+! ADDR_NONE),
+ EX(CMD_setfiletype, "setfiletype", ex_setfiletype,
+ TRLBAR|EXTRA|NEEDARG|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_setglobal, "setglobal", ex_set,
+ TRLBAR|EXTRA|CMDWIN|SBOXOK,
+! ADDR_NONE),
+ EX(CMD_setlocal, "setlocal", ex_set,
+ TRLBAR|EXTRA|CMDWIN|SBOXOK,
+! ADDR_NONE),
+ EX(CMD_sfind, "sfind", ex_splitview,
+! BANG|FILE1|RANGE|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_sfirst, "sfirst", ex_rewind,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_shell, "shell", ex_shell,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_simalt, "simalt", ex_simalt,
+ NEEDARG|WORD1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_sign, "sign", ex_sign,
+! NEEDARG|RANGE|EXTRA|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_silent, "silent", ex_wrongmodifier,
+ NEEDARG|EXTRA|BANG|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_sleep, "sleep", ex_sleep,
+! RANGE|COUNT|EXTRA|TRLBAR|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_slast, "slast", ex_last,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_smagic, "smagic", ex_submagic,
+ RANGE|WHOLEFOLD|EXTRA|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_smap, "smap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_smapclear, "smapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_smenu, "smenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_snext, "snext", ex_next,
+! RANGE|BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_snomagic, "snomagic", ex_submagic,
+ RANGE|WHOLEFOLD|EXTRA|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_snoremap, "snoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_snoremenu, "snoremenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_source, "source", ex_source,
+ BANG|FILE1|TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_sort, "sort", ex_sort,
+ RANGE|DFLALL|WHOLEFOLD|BANG|EXTRA|NOTRLCOM|MODIFY,
+ ADDR_LINES),
+ EX(CMD_split, "split", ex_splitview,
+! BANG|FILE1|RANGE|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_spellgood, "spellgood", ex_spell,
+! BANG|RANGE|NEEDARG|EXTRA|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_spelldump, "spelldump", ex_spelldump,
+ BANG|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_spellinfo, "spellinfo", ex_spellinfo,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_spellrepall, "spellrepall", ex_spellrepall,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_spellundo, "spellundo", ex_spell,
+! BANG|RANGE|NEEDARG|EXTRA|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_spellwrong, "spellwrong", ex_spell,
+! BANG|RANGE|NEEDARG|EXTRA|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_sprevious, "sprevious", ex_previous,
+! EXTRA|RANGE|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_srewind, "srewind", ex_rewind,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_stop, "stop", ex_stop,
+ TRLBAR|BANG|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_stag, "stag", ex_stag,
+! RANGE|BANG|WORD1|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_startinsert, "startinsert", ex_startinsert,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_startgreplace, "startgreplace", ex_startinsert,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_startreplace, "startreplace", ex_startinsert,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_stopinsert, "stopinsert", ex_stopinsert,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_stjump, "stjump", ex_stag,
+ BANG|TRLBAR|WORD1,
+! ADDR_NONE),
+ EX(CMD_stselect, "stselect", ex_stag,
+ BANG|TRLBAR|WORD1,
+! ADDR_NONE),
+ EX(CMD_sunhide, "sunhide", ex_buffer_all,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_sunmap, "sunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_sunmenu, "sunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_suspend, "suspend", ex_stop,
+ TRLBAR|BANG|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_sview, "sview", ex_splitview,
+! BANG|FILE1|RANGE|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_swapname, "swapname", ex_swapname,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_syntax, "syntax", ex_syntax,
+ EXTRA|NOTRLCOM|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_syntime, "syntime", ex_syntime,
+ NEEDARG|WORD1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_syncbind, "syncbind", ex_syncbind,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_smile, "smile", ex_smile,
+ TRLBAR|CMDWIN|SBOXOK,
+! ADDR_NONE),
+ EX(CMD_t, "t", ex_copymove,
+ RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY,
+ ADDR_LINES),
+ EX(CMD_tNext, "tNext", ex_tag,
+! RANGE|BANG|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_tag, "tag", ex_tag,
+! RANGE|BANG|WORD1|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_tags, "tags", do_tags,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_tab, "tab", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_tabclose, "tabclose", ex_tabclose,
+! BANG|RANGE|ZEROR|EXTRA|NOSPC|TRLBAR|CMDWIN,
+ ADDR_TABS),
+ EX(CMD_tabdo, "tabdo", ex_listdo,
+! NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+ ADDR_TABS),
+ EX(CMD_tabedit, "tabedit", ex_splitview,
+! BANG|FILE1|RANGE|ZEROR|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_TABS),
+ EX(CMD_tabfind, "tabfind", ex_splitview,
+! BANG|FILE1|RANGE|ZEROR|EDITCMD|ARGOPT|NEEDARG|TRLBAR,
+ ADDR_TABS),
+ EX(CMD_tabfirst, "tabfirst", ex_tabnext,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_tabmove, "tabmove", ex_tabmove,
+! RANGE|ZEROR|EXTRA|NOSPC|TRLBAR,
+ ADDR_TABS),
+ EX(CMD_tablast, "tablast", ex_tabnext,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_tabnext, "tabnext", ex_tabnext,
+! RANGE|ZEROR|EXTRA|NOSPC|TRLBAR,
+ ADDR_TABS),
+ EX(CMD_tabnew, "tabnew", ex_splitview,
+! BANG|FILE1|RANGE|ZEROR|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_TABS),
+ EX(CMD_tabonly, "tabonly", ex_tabonly,
+! BANG|RANGE|ZEROR|EXTRA|NOSPC|TRLBAR|CMDWIN,
+ ADDR_TABS),
+ EX(CMD_tabprevious, "tabprevious", ex_tabnext,
+! RANGE|ZEROR|EXTRA|NOSPC|TRLBAR,
+ ADDR_TABS_RELATIVE),
+ EX(CMD_tabNext, "tabNext", ex_tabnext,
+! RANGE|ZEROR|EXTRA|NOSPC|TRLBAR,
+ ADDR_TABS_RELATIVE),
+ EX(CMD_tabrewind, "tabrewind", ex_tabnext,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_tabs, "tabs", ex_tabs,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_tcd, "tcd", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_tchdir, "tchdir", ex_cd,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_tcl, "tcl", ex_tcl,
+ RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT,
+ ADDR_LINES),
+***************
+*** 1496,1592 ****
+ ADDR_LINES),
+ EX(CMD_tearoff, "tearoff", ex_tearoff,
+ NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_terminal, "terminal", ex_terminal,
+ RANGE|BANG|FILES|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_tfirst, "tfirst", ex_tag,
+! RANGE|NOTADR|BANG|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_throw, "throw", ex_throw,
+ EXTRA|NEEDARG|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_tjump, "tjump", ex_tag,
+ BANG|TRLBAR|WORD1,
+! ADDR_LINES),
+ 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),
+ EX(CMD_tmap, "tmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_tmapclear, "tmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_tnext, "tnext", ex_tag,
+! RANGE|NOTADR|BANG|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_tnoremap, "tnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_topleft, "topleft", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_tprevious, "tprevious", ex_tag,
+! RANGE|NOTADR|BANG|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_trewind, "trewind", ex_tag,
+! RANGE|NOTADR|BANG|TRLBAR|ZEROR,
+! ADDR_LINES),
+ EX(CMD_try, "try", ex_try,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_tselect, "tselect", ex_tag,
+ BANG|TRLBAR|WORD1,
+! ADDR_LINES),
+ EX(CMD_tunmenu, "tunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_tunmap, "tunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_undo, "undo", ex_undo,
+! RANGE|NOTADR|COUNT|ZEROR|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_undojoin, "undojoin", ex_undojoin,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_undolist, "undolist", ex_undolist,
+ TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_unabbreviate, "unabbreviate", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_unhide, "unhide", ex_buffer_all,
+! RANGE|NOTADR|COUNT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_unlet, "unlet", ex_unlet,
+ BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_unlockvar, "unlockvar", ex_lockvar,
+ BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_unmap, "unmap", ex_unmap,
+ BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_unmenu, "unmenu", ex_menu,
+ BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_unsilent, "unsilent", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_update, "update", ex_update,
+ RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR,
+ ADDR_LINES),
+--- 1502,1598 ----
+ ADDR_LINES),
+ EX(CMD_tearoff, "tearoff", ex_tearoff,
+ NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_terminal, "terminal", ex_terminal,
+ RANGE|BANG|FILES|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_tfirst, "tfirst", ex_tag,
+! RANGE|BANG|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_throw, "throw", ex_throw,
+ EXTRA|NEEDARG|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_tjump, "tjump", ex_tag,
+ BANG|TRLBAR|WORD1,
+! ADDR_NONE),
+ EX(CMD_tlast, "tlast", ex_tag,
+ BANG|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_tlmenu, "tlmenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_tlnoremenu, "tlnoremenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_tlunmenu, "tlunmenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_tmenu, "tmenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_tmap, "tmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_tmapclear, "tmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_tnext, "tnext", ex_tag,
+! RANGE|BANG|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_tnoremap, "tnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_topleft, "topleft", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_tprevious, "tprevious", ex_tag,
+! RANGE|BANG|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_trewind, "trewind", ex_tag,
+! RANGE|BANG|TRLBAR|ZEROR,
+! ADDR_OTHER),
+ EX(CMD_try, "try", ex_try,
+ TRLBAR|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_tselect, "tselect", ex_tag,
+ BANG|TRLBAR|WORD1,
+! ADDR_NONE),
+ EX(CMD_tunmenu, "tunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_tunmap, "tunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_undo, "undo", ex_undo,
+! RANGE|COUNT|ZEROR|TRLBAR|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_undojoin, "undojoin", ex_undojoin,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_undolist, "undolist", ex_undolist,
+ TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_unabbreviate, "unabbreviate", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_unhide, "unhide", ex_buffer_all,
+! RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_unlet, "unlet", ex_unlet,
+ BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_unlockvar, "unlockvar", ex_lockvar,
+ BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_unmap, "unmap", ex_unmap,
+ BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_unmenu, "unmenu", ex_menu,
+ BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_unsilent, "unsilent", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_update, "update", ex_update,
+ RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR,
+ ADDR_LINES),
+***************
+*** 1595,1718 ****
+ ADDR_LINES),
+ EX(CMD_version, "version", ex_version,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_verbose, "verbose", ex_wrongmodifier,
+! NEEDARG|RANGE|NOTADR|EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_vertical, "vertical", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_LINES),
+ EX(CMD_visual, "visual", ex_edit,
+ BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_view, "view", ex_edit,
+ BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_vimgrep, "vimgrep", ex_vimgrep,
+! RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_LINES),
+ EX(CMD_vimgrepadd, "vimgrepadd", ex_vimgrep,
+! RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_LINES),
+ EX(CMD_viusage, "viusage", ex_viusage,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_vmap, "vmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_vmapclear, "vmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_vmenu, "vmenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_vnoremap, "vnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_vnew, "vnew", ex_splitview,
+! BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_vnoremenu, "vnoremenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_vsplit, "vsplit", ex_splitview,
+! BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_vunmap, "vunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_vunmenu, "vunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_write, "write", ex_write,
+ RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_wNext, "wNext", ex_wnext,
+! RANGE|WHOLEFOLD|NOTADR|BANG|FILE1|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_wall, "wall", do_wqall,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_while, "while", ex_while,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_winsize, "winsize", ex_winsize,
+ EXTRA|NEEDARG|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_wincmd, "wincmd", ex_wincmd,
+! NEEDARG|WORD1|RANGE|NOTADR|CMDWIN,
+! ADDR_WINDOWS),
+ EX(CMD_windo, "windo", ex_listdo,
+! NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
+ ADDR_WINDOWS),
+ EX(CMD_winpos, "winpos", ex_winpos,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_wnext, "wnext", ex_wnext,
+! RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_wprevious, "wprevious", ex_wnext,
+! RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_wq, "wq", ex_exit,
+ RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR,
+ ADDR_LINES),
+ EX(CMD_wqall, "wqall", do_wqall,
+! BANG|FILE1|ARGOPT|DFLALL|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_wundo, "wundo", ex_wundo,
+ BANG|NEEDARG|FILE1,
+! ADDR_LINES),
+ EX(CMD_wviminfo, "wviminfo", ex_viminfo,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_xit, "xit", ex_exit,
+ RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_xall, "xall", do_wqall,
+ BANG|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_xmap, "xmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_xmapclear, "xmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_xmenu, "xmenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_xnoremap, "xnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_xnoremenu, "xnoremenu", ex_menu,
+! RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_xunmap, "xunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_xunmenu, "xunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_yank, "yank", ex_operators,
+ RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN,
+ ADDR_LINES),
+--- 1601,1724 ----
+ ADDR_LINES),
+ EX(CMD_version, "version", ex_version,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_verbose, "verbose", ex_wrongmodifier,
+! NEEDARG|RANGE|EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_vertical, "vertical", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+! ADDR_NONE),
+ EX(CMD_visual, "visual", ex_edit,
+ BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_view, "view", ex_edit,
+ BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_vimgrep, "vimgrep", ex_vimgrep,
+! RANGE|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_OTHER),
+ EX(CMD_vimgrepadd, "vimgrepadd", ex_vimgrep,
+! RANGE|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE,
+! ADDR_OTHER),
+ EX(CMD_viusage, "viusage", ex_viusage,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_vmap, "vmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_vmapclear, "vmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_vmenu, "vmenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_vnoremap, "vnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_vnew, "vnew", ex_splitview,
+! BANG|FILE1|RANGE|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_vnoremenu, "vnoremenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_vsplit, "vsplit", ex_splitview,
+! BANG|FILE1|RANGE|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_vunmap, "vunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_vunmenu, "vunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_write, "write", ex_write,
+ RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_wNext, "wNext", ex_wnext,
+! RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_wall, "wall", do_wqall,
+ BANG|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_while, "while", ex_while,
+ EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_winsize, "winsize", ex_winsize,
+ EXTRA|NEEDARG|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_wincmd, "wincmd", ex_wincmd,
+! NEEDARG|WORD1|RANGE|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_windo, "windo", ex_listdo,
+! NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+ ADDR_WINDOWS),
+ EX(CMD_winpos, "winpos", ex_winpos,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_wnext, "wnext", ex_wnext,
+! RANGE|BANG|FILE1|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_wprevious, "wprevious", ex_wnext,
+! RANGE|BANG|FILE1|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_wq, "wq", ex_exit,
+ RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR,
+ ADDR_LINES),
+ EX(CMD_wqall, "wqall", do_wqall,
+! BANG|FILE1|ARGOPT|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_wundo, "wundo", ex_wundo,
+ BANG|NEEDARG|FILE1,
+! ADDR_NONE),
+ EX(CMD_wviminfo, "wviminfo", ex_viminfo,
+ BANG|FILE1|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_xit, "xit", ex_exit,
+ RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_xall, "xall", do_wqall,
+ BANG|TRLBAR,
+! ADDR_NONE),
+ EX(CMD_xmap, "xmap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_xmapclear, "xmapclear", ex_mapclear,
+ EXTRA|TRLBAR|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_xmenu, "xmenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_xnoremap, "xnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_xnoremenu, "xnoremenu", ex_menu,
+! RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_xunmap, "xunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_xunmenu, "xunmenu", ex_menu,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+! ADDR_NONE),
+ EX(CMD_yank, "yank", ex_operators,
+ RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN,
+ ADDR_LINES),
+***************
+*** 1746,1759 ****
+ RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_Next, "Next", ex_previous,
+! EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_LINES),
+ EX(CMD_Print, "Print", ex_print,
+ RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_X, "X", ex_X,
+ TRLBAR,
+! ADDR_LINES),
+ EX(CMD_tilde, "~", do_sub,
+ RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+--- 1752,1765 ----
+ RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_Next, "Next", ex_previous,
+! EXTRA|RANGE|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_Print, "Print", ex_print,
+ RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_X, "X", ex_X,
+ TRLBAR,
+! ADDR_NONE),
+ EX(CMD_tilde, "~", do_sub,
+ RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+***************
+*** 1784,1790 ****
+ int addr_count; /* the number of addresses given */
+ linenr_T line1; /* the first line number */
+ linenr_T line2; /* the second line number or count */
+! int addr_type; /* type of the count/range */
+ int flags; /* extra flags after count: EXFLAG_ */
+ char_u *do_ecmd_cmd; /* +command arg to be used in edited file */
+ linenr_T do_ecmd_lnum; /* the line number in an edited file */
+--- 1790,1796 ----
+ int addr_count; /* the number of addresses given */
+ linenr_T line1; /* the first line number */
+ linenr_T line2; /* the second line number or count */
+! cmd_addr_T addr_type; /* type of the count/range */
+ int flags; /* extra flags after count: EXFLAG_ */
+ char_u *do_ecmd_cmd; /* +command arg to be used in edited file */
+ linenr_T do_ecmd_lnum; /* the line number in an edited file */
+*** ../vim-8.1.1240/src/ex_docmd.c 2019-04-28 19:46:17.026060122 +0200
+--- src/ex_docmd.c 2019-05-01 18:00:48.625957045 +0200
+***************
+*** 73,79 ****
+ # define ex_cexpr ex_ni
+ #endif
+
+! 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) \
+--- 73,79 ----
+ # define ex_cexpr ex_ni
+ #endif
+
+! static linenr_T get_address(exarg_T *, char_u **, cmd_addr_T 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) \
+***************
+*** 1577,1582 ****
+--- 1577,1586 ----
+ return buf->b_fnum;
+ }
+
++ /*
++ * Return the window number of "win".
++ * When "win" is NULL return the number of windows.
++ */
+ static int
+ current_win_nr(win_T *win)
+ {
+***************
+*** 1951,1957 ****
+ ea.forceit = FALSE;
+
+ /*
+! * 6. Parse arguments.
+ */
+ if (!IS_USER_CMDIDX(ea.cmdidx))
+ ea.argt = (long)cmdnames[(int)ea.cmdidx].cmd_argt;
+--- 1955,1961 ----
+ ea.forceit = FALSE;
+
+ /*
+! * 6. Parse arguments. Then check for errors.
+ */
+ if (!IS_USER_CMDIDX(ea.cmdidx))
+ ea.argt = (long)cmdnames[(int)ea.cmdidx].cmd_argt;
+***************
+*** 2016,2022 ****
+ * Don't complain about the range if it is not used
+ * (could happen if line_count is accidentally set to 0).
+ */
+! if (!ea.skip && !ni)
+ {
+ /*
+ * If the range is backwards, ask for confirmation and, if given, swap
+--- 2020,2026 ----
+ * Don't complain about the range if it is not used
+ * (could happen if line_count is accidentally set to 0).
+ */
+! if (!ea.skip && !ni && (ea.argt & RANGE))
+ {
+ /*
+ * If the range is backwards, ask for confirmation and, if given, swap
+***************
+*** 2044,2050 ****
+ goto doend;
+ }
+
+! if ((ea.argt & NOTADR) && ea.addr_count == 0) /* default is 1, not cursor */
+ ea.line2 = 1;
+
+ correct_range(&ea);
+--- 2048,2055 ----
+ goto doend;
+ }
+
+! if ((ea.addr_type == ADDR_OTHER) && ea.addr_count == 0)
+! // default is 1, not cursor
+ ea.line2 = 1;
+
+ correct_range(&ea);
+***************
+*** 2191,2196 ****
+--- 2196,2202 ----
+ switch (ea.addr_type)
+ {
+ case ADDR_LINES:
++ case ADDR_OTHER:
+ ea.line2 = curbuf->b_ml.ml_line_count;
+ break;
+ case ADDR_LOADED_BUFFERS:
+***************
+*** 2229,2234 ****
+--- 2235,2243 ----
+ ea.line2 = 1;
+ break;
+ #endif
++ case ADDR_NONE:
++ iemsg(_("INTERNAL: Cannot use DFLALL with ADDR_NONE"));
++ break;
+ }
+ }
+
+***************
+*** 2278,2284 ****
+ errormsg = _(e_zerocount);
+ goto doend;
+ }
+! if (ea.argt & NOTADR) /* e.g. :buffer 2, :sleep 3 */
+ {
+ ea.line2 = n;
+ if (ea.addr_count == 0)
+--- 2287,2293 ----
+ errormsg = _(e_zerocount);
+ goto doend;
+ }
+! if (ea.addr_type != ADDR_LINES) // e.g. :buffer 2, :sleep 3
+ {
+ ea.line2 = n;
+ if (ea.addr_count == 0)
+***************
+*** 2292,2299 ****
+ /*
+ * Be vi compatible: no error message for out of range.
+ */
+! if (ea.addr_type == ADDR_LINES
+! && ea.line2 > curbuf->b_ml.ml_line_count)
+ ea.line2 = curbuf->b_ml.ml_line_count;
+ }
+ }
+--- 2301,2307 ----
+ /*
+ * Be vi compatible: no error message for out of range.
+ */
+! if (ea.line2 > curbuf->b_ml.ml_line_count)
+ ea.line2 = curbuf->b_ml.ml_line_count;
+ }
+ }
+***************
+*** 2876,2881 ****
+--- 2884,2890 ----
+ switch (eap->addr_type)
+ {
+ case ADDR_LINES:
++ case ADDR_OTHER:
+ // default is current line number
+ eap->line2 = curwin->w_cursor.lnum;
+ break;
+***************
+*** 2902,2907 ****
+--- 2911,2919 ----
+ eap->line2 = qf_get_cur_valid_idx(eap);
+ break;
+ #endif
++ case ADDR_NONE:
++ // Will give an error later if a range is found.
++ break;
+ }
+ eap->cmd = skipwhite(eap->cmd);
+ lnum = get_address(eap, &eap->cmd, eap->addr_type, eap->skip, silent,
+***************
+*** 2916,2921 ****
+--- 2928,2934 ----
+ switch (eap->addr_type)
+ {
+ case ADDR_LINES:
++ case ADDR_OTHER:
+ eap->line1 = 1;
+ eap->line2 = curbuf->b_ml.ml_line_count;
+ break;
+***************
+*** 2955,2961 ****
+ }
+ break;
+ case ADDR_TABS_RELATIVE:
+- case ADDR_OTHER:
+ *errormsg = _(e_invrange);
+ return FAIL;
+ case ADDR_ARGUMENTS:
+--- 2968,2973 ----
+***************
+*** 2975,2980 ****
+--- 2987,2995 ----
+ eap->line2 = 1;
+ break;
+ #endif
++ case ADDR_NONE:
++ // Will give an error later if a range is found.
++ break;
+ }
+ ++eap->addr_count;
+ }
+***************
+*** 4207,4218 ****
+ 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;
+ long n;
+--- 4222,4234 ----
+ get_address(
+ exarg_T *eap UNUSED,
+ char_u **ptr,
+! cmd_addr_T addr_type_arg,
+ 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
+ {
++ cmd_addr_T addr_type = addr_type_arg;
+ int c;
+ int i;
+ long n;
+***************
+*** 4233,4238 ****
+--- 4249,4255 ----
+ switch (addr_type)
+ {
+ case ADDR_LINES:
++ case ADDR_OTHER:
+ lnum = curwin->w_cursor.lnum;
+ break;
+ case ADDR_WINDOWS:
+***************
+*** 4249,4254 ****
+--- 4266,4272 ----
+ lnum = CURRENT_TAB_NR;
+ break;
+ case ADDR_TABS_RELATIVE:
++ case ADDR_NONE:
+ emsg(_(e_invrange));
+ cmd = NULL;
+ goto error;
+***************
+*** 4266,4271 ****
+--- 4284,4290 ----
+ switch (addr_type)
+ {
+ case ADDR_LINES:
++ case ADDR_OTHER:
+ lnum = curbuf->b_ml.ml_line_count;
+ break;
+ case ADDR_WINDOWS:
+***************
+*** 4291,4296 ****
+--- 4310,4316 ----
+ lnum = LAST_TAB_NR;
+ break;
+ case ADDR_TABS_RELATIVE:
++ case ADDR_NONE:
+ emsg(_(e_invrange));
+ cmd = NULL;
+ goto error;
+***************
+*** 4460,4466 ****
+ switch (addr_type)
+ {
+ case ADDR_LINES:
+! /* "+1" is same as ".+1" */
+ lnum = curwin->w_cursor.lnum;
+ break;
+ case ADDR_WINDOWS:
+--- 4480,4487 ----
+ switch (addr_type)
+ {
+ case ADDR_LINES:
+! case ADDR_OTHER:
+! // "+1" is same as ".+1"
+ lnum = curwin->w_cursor.lnum;
+ break;
+ case ADDR_WINDOWS:
+***************
+*** 4484,4489 ****
+--- 4505,4512 ----
+ lnum = qf_get_cur_valid_idx(eap);
+ break;
+ #endif
++ case ADDR_NONE:
++ break;
+ }
+ }
+
+***************
+*** 4586,4596 ****
+
+ if (eap->argt & RANGE)
+ {
+! switch(eap->addr_type)
+ {
+ case ADDR_LINES:
+! if (!(eap->argt & NOTADR)
+! && eap->line2 > curbuf->b_ml.ml_line_count
+ #ifdef FEAT_DIFF
+ + (eap->cmdidx == CMD_diffget)
+ #endif
+--- 4609,4618 ----
+
+ if (eap->argt & RANGE)
+ {
+! switch (eap->addr_type)
+ {
+ case ADDR_LINES:
+! if (eap->line2 > curbuf->b_ml.ml_line_count
+ #ifdef FEAT_DIFF
+ + (eap->cmdidx == CMD_diffget)
+ #endif
+***************
+*** 4636,4642 ****
+ return _(e_invrange);
+ break;
+ case ADDR_TABS_RELATIVE:
+! /* Do nothing */
+ break;
+ #ifdef FEAT_QUICKFIX
+ case ADDR_QUICKFIX:
+--- 4658,4665 ----
+ return _(e_invrange);
+ break;
+ case ADDR_TABS_RELATIVE:
+! case ADDR_OTHER:
+! // Any range is OK.
+ break;
+ #ifdef FEAT_QUICKFIX
+ case ADDR_QUICKFIX:
+***************
+*** 4644,4649 ****
+--- 4667,4675 ----
+ return _(e_invrange);
+ break;
+ #endif
++ case ADDR_NONE:
++ // Will give an error elsewhere.
++ break;
+ }
+ }
+ return NULL;
+*** ../vim-8.1.1240/src/Makefile 2019-04-30 21:27:30.943623715 +0200
+--- src/Makefile 2019-05-01 14:05:36.402600986 +0200
+***************
+*** 1987,1993 ****
+ # If this fails because you don't have Vim yet, first build and install Vim
+ # without changes.
+ cmdidxs: ex_cmds.h
+! vim -u NONE -i NONE -X -S create_cmdidxs.vim
+
+
+ # The normal command to compile a .c file to its .o file.
+--- 1987,1993 ----
+ # If this fails because you don't have Vim yet, first build and install Vim
+ # without changes.
+ cmdidxs: ex_cmds.h
+! vim --clean -X -u create_cmdidxs.vim
+
+
+ # The normal command to compile a .c file to its .o file.
+*** ../vim-8.1.1240/src/create_cmdidxs.vim 2017-04-20 21:41:04.000000000 +0200
+--- src/create_cmdidxs.vim 2019-05-01 14:57:29.515057135 +0200
+***************
+*** 10,16 ****
+ let cmds = []
+ let skipped_cmds = 0
+
+! for line in readfile('ex_cmds.h')
+ if line =~ '^EX(CMD_'
+ let m = matchlist(line, '^EX(CMD_\S*,\s*"\([a-z][^"]*\)"')
+ if len(m) >= 2
+--- 10,19 ----
+ let cmds = []
+ let skipped_cmds = 0
+
+! let lines = readfile('ex_cmds.h')
+! let idx = 0
+! while idx < len(lines)
+! let line = lines[idx]
+ if line =~ '^EX(CMD_'
+ let m = matchlist(line, '^EX(CMD_\S*,\s*"\([a-z][^"]*\)"')
+ if len(m) >= 2
+***************
+*** 18,25 ****
+ else
+ let skipped_cmds += 1
+ endif
+ endif
+! endfor
+
+ let cmdidxs1 = {}
+ let cmdidxs2 = {}
+--- 21,48 ----
+ else
+ let skipped_cmds += 1
+ endif
++
++ let idx += 1
++ let flags = lines[idx]
++ let idx += 1
++ let addr_type = lines[idx]
++
++ if flags =~ '\<RANGE\>'
++ if addr_type =~ 'ADDR_NONE'
++ echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Using RANGE with ADDR_NONE: ' .. line
++ endif
++ else
++ if addr_type !~ 'ADDR_NONE'
++ echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing ADDR_NONE: ' .. line
++ endif
++ endif
++
++ if flags =~ '\<DFLALL\>' && (addr_type =~ 'ADDR_OTHER' || addr_type =~ 'ADDR_NONE')
++ echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing misplaced DFLALL: ' .. line
++ endif
+ endif
+! let idx += 1
+! endwhile
+
+ let cmdidxs1 = {}
+ let cmdidxs2 = {}
+*** ../vim-8.1.1240/src/usercmd.c 2019-04-29 21:30:42.006008952 +0200
+--- src/usercmd.c 2019-05-01 17:37:17.322739928 +0200
+***************
+*** 20,26 ****
+ char_u *uc_rep; // The command's replacement string
+ long uc_def; // The default value for a range/count
+ 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
+--- 20,26 ----
+ char_u *uc_rep; // The command's replacement string
+ long uc_def; // The default value for a range/count
+ int uc_compl; // completion type
+! cmd_addr_T 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
+***************
+*** 101,109 ****
+ */
+ static struct
+ {
+! int expand;
+! char *name;
+! char *shortname;
+ } addr_type_complete[] =
+ {
+ {ADDR_ARGUMENTS, "arguments", "arg"},
+--- 101,109 ----
+ */
+ static struct
+ {
+! cmd_addr_T expand;
+! char *name;
+! char *shortname;
+ } addr_type_complete[] =
+ {
+ {ADDR_ARGUMENTS, "arguments", "arg"},
+***************
+*** 114,120 ****
+ {ADDR_WINDOWS, "windows", "win"},
+ {ADDR_QUICKFIX, "quickfix", "qf"},
+ {ADDR_OTHER, "other", "?"},
+! {-1, NULL, NULL}
+ };
+
+ #define UC_BUFFER 1 // -buffer: local to current buffer
+--- 114,120 ----
+ {ADDR_WINDOWS, "windows", "win"},
+ {ADDR_QUICKFIX, "quickfix", "qf"},
+ {ADDR_OTHER, "other", "?"},
+! {ADDR_NONE, NULL, NULL}
+ };
+
+ #define UC_BUFFER 1 // -buffer: local to current buffer
+***************
+*** 495,501 ****
+ } while (len < 8 - over);
+
+ // Address Type
+! for (j = 0; addr_type_complete[j].expand != -1; ++j)
+ if (addr_type_complete[j].expand != ADDR_LINES
+ && addr_type_complete[j].expand == cmd->uc_addr_type)
+ {
+--- 495,501 ----
+ } while (len < 8 - over);
+
+ // Address Type
+! for (j = 0; addr_type_complete[j].expand != ADDR_NONE; ++j)
+ if (addr_type_complete[j].expand != ADDR_LINES
+ && addr_type_complete[j].expand == cmd->uc_addr_type)
+ {
+***************
+*** 566,577 ****
+ parse_addr_type_arg(
+ char_u *value,
+ int vallen,
+! long *argt,
+! int *addr_type_arg)
+ {
+ int i, a, b;
+
+! for (i = 0; addr_type_complete[i].expand != -1; ++i)
+ {
+ a = (int)STRLEN(addr_type_complete[i].name) == vallen;
+ b = STRNCMP(value, addr_type_complete[i].name, vallen) == 0;
+--- 566,576 ----
+ parse_addr_type_arg(
+ char_u *value,
+ int vallen,
+! cmd_addr_T *addr_type_arg)
+ {
+ int i, a, b;
+
+! for (i = 0; addr_type_complete[i].expand != ADDR_NONE; ++i)
+ {
+ a = (int)STRLEN(addr_type_complete[i].name) == vallen;
+ b = STRNCMP(value, addr_type_complete[i].name, vallen) == 0;
+***************
+*** 582,588 ****
+ }
+ }
+
+! if (addr_type_complete[i].expand == -1)
+ {
+ char_u *err = value;
+
+--- 581,587 ----
+ }
+ }
+
+! if (addr_type_complete[i].expand == ADDR_NONE)
+ {
+ char_u *err = value;
+
+***************
+*** 593,601 ****
+ return FAIL;
+ }
+
+- if (*addr_type_arg != ADDR_LINES)
+- *argt |= NOTADR;
+-
+ return OK;
+ }
+
+--- 592,597 ----
+***************
+*** 694,700 ****
+ int *flags,
+ int *complp,
+ char_u **compl_arg,
+! int *addr_type_arg)
+ {
+ char_u *p;
+
+--- 690,696 ----
+ int *flags,
+ int *complp,
+ char_u **compl_arg,
+! cmd_addr_T *addr_type_arg)
+ {
+ char_u *p;
+
+***************
+*** 773,779 ****
+ }
+
+ *def = getdigits(&p);
+! *argt |= (ZEROR | NOTADR);
+
+ if (p != val + vallen || vallen == 0)
+ {
+--- 769,775 ----
+ }
+
+ *def = getdigits(&p);
+! *argt |= ZEROR;
+
+ if (p != val + vallen || vallen == 0)
+ {
+***************
+*** 782,791 ****
+ return FAIL;
+ }
+ }
+ }
+ else if (STRNICMP(attr, "count", attrlen) == 0)
+ {
+! *argt |= (COUNT | ZEROR | RANGE | NOTADR);
+
+ if (val != NULL)
+ {
+--- 778,793 ----
+ return FAIL;
+ }
+ }
++ // default for -range is using buffer lines
++ if (*addr_type_arg == ADDR_NONE)
++ *addr_type_arg = ADDR_LINES;
+ }
+ else if (STRNICMP(attr, "count", attrlen) == 0)
+ {
+! *argt |= (COUNT | ZEROR | RANGE);
+! // default for -count is using any number
+! if (*addr_type_arg == ADDR_NONE)
+! *addr_type_arg = ADDR_OTHER;
+
+ if (val != NULL)
+ {
+***************
+*** 822,832 ****
+ emsg(_("E179: argument required for -addr"));
+ return FAIL;
+ }
+! if (parse_addr_type_arg(val, (int)vallen, argt, addr_type_arg)
+! == FAIL)
+ return FAIL;
+ if (addr_type_arg != ADDR_LINES)
+! *argt |= (ZEROR | NOTADR) ;
+ }
+ else
+ {
+--- 824,833 ----
+ emsg(_("E179: argument required for -addr"));
+ return FAIL;
+ }
+! if (parse_addr_type_arg(val, (int)vallen, addr_type_arg) == FAIL)
+ return FAIL;
+ if (addr_type_arg != ADDR_LINES)
+! *argt |= (ZEROR) ;
+ }
+ else
+ {
+***************
+*** 854,860 ****
+ int flags,
+ int compl,
+ char_u *compl_arg UNUSED,
+! int addr_type,
+ int force)
+ {
+ ucmd_T *cmd = NULL;
+--- 855,861 ----
+ int flags,
+ int compl,
+ char_u *compl_arg UNUSED,
+! cmd_addr_T addr_type,
+ int force)
+ {
+ ucmd_T *cmd = NULL;
+***************
+*** 974,990 ****
+ void
+ ex_command(exarg_T *eap)
+ {
+! char_u *name;
+! char_u *end;
+! char_u *p;
+! long argt = 0;
+! long def = -1;
+! int flags = 0;
+! int compl = EXPAND_NOTHING;
+! char_u *compl_arg = NULL;
+! int addr_type_arg = ADDR_LINES;
+! int has_attr = (eap->arg[0] == '-');
+! int name_len;
+
+ p = eap->arg;
+
+--- 975,991 ----
+ void
+ ex_command(exarg_T *eap)
+ {
+! char_u *name;
+! char_u *end;
+! char_u *p;
+! long argt = 0;
+! long def = -1;
+! int flags = 0;
+! int compl = EXPAND_NOTHING;
+! char_u *compl_arg = NULL;
+! cmd_addr_T addr_type_arg = ADDR_NONE;
+! int has_attr = (eap->arg[0] == '-');
+! int name_len;
+
+ p = eap->arg;
+
+*** ../vim-8.1.1240/src/ex_cmds.c 2019-04-28 22:25:03.244480028 +0200
+--- src/ex_cmds.c 2019-05-01 15:05:28.616274724 +0200
+***************
+*** 3157,3162 ****
+--- 3157,3169 ----
+ void
+ ex_write(exarg_T *eap)
+ {
++ if (eap->cmdidx == CMD_saveas)
++ {
++ // :saveas does not take a range, uses all lines.
++ eap->line1 = 1;
++ eap->line2 = curbuf->b_ml.ml_line_count;
++ }
++
+ if (eap->usefilter) /* input lines to shell command */
+ do_bang(1, eap, FALSE, TRUE, FALSE);
+ else
+*** ../vim-8.1.1240/src/window.c 2019-04-28 18:04:56.062492159 +0200
+--- src/window.c 2019-05-01 15:41:19.093543528 +0200
+***************
+*** 601,607 ****
+ }
+
+ /*
+! * Figure out the address type for ":wnncmd".
+ */
+ void
+ get_wincmd_addr_type(char_u *arg, exarg_T *eap)
+--- 601,607 ----
+ }
+
+ /*
+! * Figure out the address type for ":wincmd".
+ */
+ void
+ get_wincmd_addr_type(char_u *arg, exarg_T *eap)
+***************
+*** 656,668 ****
+ case 'd':
+ case Ctrl_D:
+ #endif
+! /* window size or any count */
+! eap->addr_type = ADDR_LINES;
+ break;
+
+ case Ctrl_HAT:
+ case '^':
+! /* buffer number */
+ eap->addr_type = ADDR_BUFFERS;
+ break;
+
+--- 656,668 ----
+ case 'd':
+ case Ctrl_D:
+ #endif
+! // window size or any count
+! eap->addr_type = ADDR_OTHER;
+ break;
+
+ case Ctrl_HAT:
+ case '^':
+! // buffer number
+ eap->addr_type = ADDR_BUFFERS;
+ break;
+
+***************
+*** 677,683 ****
+ case 'W':
+ case 'x':
+ case Ctrl_X:
+! /* window number */
+ eap->addr_type = ADDR_WINDOWS;
+ break;
+
+--- 677,683 ----
+ case 'W':
+ case 'x':
+ case Ctrl_X:
+! // window number
+ eap->addr_type = ADDR_WINDOWS;
+ break;
+
+***************
+*** 694,701 ****
+ case Ctrl_P:
+ case '=':
+ case CAR:
+! /* no count */
+! eap->addr_type = 0;
+ break;
+ }
+ }
+--- 694,701 ----
+ case Ctrl_P:
+ case '=':
+ case CAR:
+! // no count
+! eap->addr_type = ADDR_NONE;
+ break;
+ }
+ }
+*** ../vim-8.1.1240/src/testdir/test_usercommands.vim 2019-04-27 15:05:04.528816589 +0200
+--- src/testdir/test_usercommands.vim 2019-05-01 17:16:53.029416796 +0200
+***************
+*** 392,400 ****
+ call assert_equal(len(gettabinfo()), g:a2)
+ bwipe
+
+! command! -addr=other DoSomething echo 'nothing'
+ DoSomething
+! call assert_fails('%DoSomething')
+
+ delcommand DoSomething
+ endfunc
+--- 392,404 ----
+ call assert_equal(len(gettabinfo()), g:a2)
+ bwipe
+
+! command! -addr=other DoSomething let g:a1 = <line1> | let g:a2 = <line2>
+ DoSomething
+! call assert_equal(line('.'), g:a1)
+! call assert_equal(line('.'), g:a2)
+! %DoSomething
+! call assert_equal(1, g:a1)
+! call assert_equal(line('$'), g:a2)
+
+ delcommand DoSomething
+ endfunc
+***************
+*** 420,426 ****
+ \ execute('command DoCmd'))
+ command! -count=2 DoCmd :
+ call assert_equal("\n Name Args Address Complete Definition"
+! \ .. "\n DoCmd 0 2c :",
+ \ execute('command DoCmd'))
+
+ " Test with various -addr= argument values.
+--- 424,430 ----
+ \ execute('command DoCmd'))
+ command! -count=2 DoCmd :
+ call assert_equal("\n Name Args Address Complete Definition"
+! \ .. "\n DoCmd 0 2c ? :",
+ \ execute('command DoCmd'))
+
+ " Test with various -addr= argument values.
+*** ../vim-8.1.1240/src/version.c 2019-04-30 21:27:30.943623715 +0200
+--- src/version.c 2019-05-01 13:04:02.709350130 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1241,
+ /**/
+
+--
+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.1242 b/data/vim/patches/8.1.1242
new file mode 100644
index 000000000..efb784533
--- /dev/null
+++ b/data/vim/patches/8.1.1242
@@ -0,0 +1,154 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1242
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1242
+Problem: No cmdline redraw when tabpages have different 'cmdheight'.
+Solution: redraw the command line when 'cmdheight' changes when switching
+ tabpages. (closes #4321)
+Files: src/testdir/test_tabpage.vim, src/window.c,
+ src/testdir/dumps/Test_tabpage_cmdheight.dump,
+ src/testdir/screendump.vim
+
+
+*** ../vim-8.1.1241/src/testdir/test_tabpage.vim 2019-04-20 23:47:42.518391308 +0200
+--- src/testdir/test_tabpage.vim 2019-05-01 20:26:19.508478634 +0200
+***************
+*** 1,5 ****
+--- 1,6 ----
+ " Tests for tabpage
+
++ source screendump.vim
+
+ function Test_tabpage()
+ bw!
+***************
+*** 552,555 ****
+--- 553,579 ----
+ bw!
+ endfunc
+
++ func Test_tabpage_cmdheight()
++ if !CanRunVimInTerminal()
++ throw 'Skipped: only works with terminal'
++ endif
++ call writefile([
++ \ 'set laststatus=2',
++ \ 'set cmdheight=2',
++ \ 'tabnew',
++ \ 'set cmdheight=3',
++ \ 'tabnext',
++ \ 'redraw!',
++ \ 'echo "hello\nthere"',
++ \ 'tabnext',
++ \ 'redraw',
++ \ ], 'XTest_tabpage_cmdheight')
++ " Check that cursor line is concealed
++ let buf = RunVimInTerminal('-S XTest_tabpage_cmdheight', {'statusoff': 3})
++ call VerifyScreenDump(buf, 'Test_tabpage_cmdheight', {})
++
++ call StopVimInTerminal(buf)
++ call delete('XTest_conceal')
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.1241/src/window.c 2019-05-01 18:08:38.271237206 +0200
+--- src/window.c 2019-05-01 20:13:02.064313731 +0200
+***************
+*** 3955,3960 ****
+--- 3955,3962 ----
+ * the frames for that. When the Vim window was resized need to update
+ * frame sizes too. Use the stored value of p_ch, so that it can be
+ * different for each tab page. */
++ if (p_ch != curtab->tp_ch_used)
++ clear_cmdline = TRUE;
+ p_ch = curtab->tp_ch_used;
+ if (curtab->tp_old_Rows != Rows || (old_off != firstwin->w_winrow
+ #ifdef FEAT_GUI_TABLINE
+*** ../vim-8.1.1241/src/testdir/dumps/Test_tabpage_cmdheight.dump 2019-05-01 20:29:45.878696091 +0200
+--- src/testdir/dumps/Test_tabpage_cmdheight.dump 2019-05-01 20:13:12.408265687 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +8#0000001#e0e0e08|[|N|o| |N|a|m|e|]| | +2#0000000#ffffff0|[|N|o| |N|a|m|e|]| | +1&&@51|X+8#0000001#e0e0e08
++ > +0#0000000#ffffff0@74
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
++ | +0&&@74
++ @75
++ @75
+*** ../vim-8.1.1241/src/testdir/screendump.vim 2019-04-13 22:44:48.325154165 +0200
+--- src/testdir/screendump.vim 2019-05-01 20:26:07.864535816 +0200
+***************
+*** 26,31 ****
+--- 26,32 ----
+ " Options is a dictionary, these items are recognized:
+ " "rows" - height of the terminal window (max. 20)
+ " "cols" - width of the terminal window (max. 78)
++ " "statusoff" - number of lines the status is offset from default
+ func RunVimInTerminal(arguments, options)
+ " If Vim doesn't exit a swap file remains, causing other tests to fail.
+ " Remove it here.
+***************
+*** 51,56 ****
+--- 52,58 ----
+ " Make the window 20 lines high and 75 columns, unless told otherwise.
+ let rows = get(a:options, 'rows', 20)
+ let cols = get(a:options, 'cols', 75)
++ let statusoff = get(a:options, 'statusoff', 1)
+
+ let cmd = GetVimCommandClean()
+
+***************
+*** 77,83 ****
+ " using valgrind).
+ " If it fails then show the terminal contents for debugging.
+ try
+! call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1 || len(term_getline(buf, rows - 1)) >= cols - 1})
+ catch /timed out after/
+ let lines = map(range(1, rows), {key, val -> term_getline(buf, val)})
+ call assert_report('RunVimInTerminal() failed, screen contents: ' . join(lines, "<NL>"))
+--- 79,85 ----
+ " using valgrind).
+ " If it fails then show the terminal contents for debugging.
+ try
+! call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1 || len(term_getline(buf, rows - statusoff)) >= cols - 1})
+ catch /timed out after/
+ let lines = map(range(1, rows), {key, val -> term_getline(buf, val)})
+ call assert_report('RunVimInTerminal() failed, screen contents: ' . join(lines, "<NL>"))
+*** ../vim-8.1.1241/src/version.c 2019-05-01 18:08:38.271237206 +0200
+--- src/version.c 2019-05-01 20:12:01.768592391 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1242,
+ /**/
+
+--
+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.1243 b/data/vim/patches/8.1.1243
new file mode 100644
index 000000000..7666b36d1
--- /dev/null
+++ b/data/vim/patches/8.1.1243
@@ -0,0 +1,228 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1243
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1243 (after 8.1.1241)
+Problem: Compiler warnings for incomplete switch statement. (Tony
+ Mechelynck)
+Solution: Add ADDR_QUICKFIX to the list.
+Files: src/ex_docmd.c
+
+
+*** ../vim-8.1.1242/src/ex_docmd.c 2019-05-01 18:08:38.267237229 +0200
+--- src/ex_docmd.c 2019-05-01 21:41:39.121052508 +0200
+***************
+*** 2228,2240 ****
+ else
+ ea.line2 = ARGCOUNT;
+ break;
+- #ifdef FEAT_QUICKFIX
+ case ADDR_QUICKFIX:
+ ea.line2 = qf_get_size(&ea);
+ if (ea.line2 == 0)
+ ea.line2 = 1;
+- break;
+ #endif
+ case ADDR_NONE:
+ iemsg(_("INTERNAL: Cannot use DFLALL with ADDR_NONE"));
+ break;
+--- 2228,2240 ----
+ else
+ ea.line2 = ARGCOUNT;
+ break;
+ case ADDR_QUICKFIX:
++ #ifdef FEAT_QUICKFIX
+ ea.line2 = qf_get_size(&ea);
+ if (ea.line2 == 0)
+ ea.line2 = 1;
+ #endif
++ break;
+ case ADDR_NONE:
+ iemsg(_("INTERNAL: Cannot use DFLALL with ADDR_NONE"));
+ break;
+***************
+*** 2906,2916 ****
+ case ADDR_TABS_RELATIVE:
+ eap->line2 = 1;
+ break;
+- #ifdef FEAT_QUICKFIX
+ case ADDR_QUICKFIX:
+ eap->line2 = qf_get_cur_valid_idx(eap);
+- break;
+ #endif
+ case ADDR_NONE:
+ // Will give an error later if a range is found.
+ break;
+--- 2906,2916 ----
+ case ADDR_TABS_RELATIVE:
+ eap->line2 = 1;
+ break;
+ case ADDR_QUICKFIX:
++ #ifdef FEAT_QUICKFIX
+ eap->line2 = qf_get_cur_valid_idx(eap);
+ #endif
++ break;
+ case ADDR_NONE:
+ // Will give an error later if a range is found.
+ break;
+***************
+*** 2979,2992 ****
+ 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
+ case ADDR_NONE:
+ // Will give an error later if a range is found.
+ break;
+--- 2979,2992 ----
+ eap->line2 = ARGCOUNT;
+ }
+ break;
+ case ADDR_QUICKFIX:
++ #ifdef FEAT_QUICKFIX
+ eap->line1 = 1;
+ eap->line2 = qf_get_size(eap);
+ if (eap->line2 == 0)
+ eap->line2 = 1;
+ #endif
++ break;
+ case ADDR_NONE:
+ // Will give an error later if a range is found.
+ break;
+***************
+*** 4271,4281 ****
+ cmd = NULL;
+ goto error;
+ break;
+- #ifdef FEAT_QUICKFIX
+ case ADDR_QUICKFIX:
+ lnum = qf_get_cur_valid_idx(eap);
+- break;
+ #endif
+ }
+ break;
+
+--- 4271,4281 ----
+ cmd = NULL;
+ goto error;
+ break;
+ case ADDR_QUICKFIX:
++ #ifdef FEAT_QUICKFIX
+ lnum = qf_get_cur_valid_idx(eap);
+ #endif
++ break;
+ }
+ break;
+
+***************
+*** 4315,4327 ****
+ cmd = NULL;
+ goto error;
+ break;
+- #ifdef FEAT_QUICKFIX
+ case ADDR_QUICKFIX:
+ lnum = qf_get_size(eap);
+ if (lnum == 0)
+ lnum = 1;
+- break;
+ #endif
+ }
+ break;
+
+--- 4315,4327 ----
+ cmd = NULL;
+ goto error;
+ break;
+ case ADDR_QUICKFIX:
++ #ifdef FEAT_QUICKFIX
+ lnum = qf_get_size(eap);
+ if (lnum == 0)
+ lnum = 1;
+ #endif
++ break;
+ }
+ break;
+
+***************
+*** 4500,4510 ****
+ case ADDR_TABS_RELATIVE:
+ lnum = 1;
+ break;
+- #ifdef FEAT_QUICKFIX
+ case ADDR_QUICKFIX:
+ lnum = qf_get_cur_valid_idx(eap);
+- break;
+ #endif
+ case ADDR_NONE:
+ break;
+ }
+--- 4500,4510 ----
+ case ADDR_TABS_RELATIVE:
+ lnum = 1;
+ break;
+ case ADDR_QUICKFIX:
++ #ifdef FEAT_QUICKFIX
+ lnum = qf_get_cur_valid_idx(eap);
+ #endif
++ break;
+ case ADDR_NONE:
+ break;
+ }
+***************
+*** 4661,4672 ****
+ case ADDR_OTHER:
+ // Any range is OK.
+ break;
+- #ifdef FEAT_QUICKFIX
+ case ADDR_QUICKFIX:
+ if (eap->line2 != 1 && eap->line2 > qf_get_size(eap))
+ return _(e_invrange);
+- break;
+ #endif
+ case ADDR_NONE:
+ // Will give an error elsewhere.
+ break;
+--- 4661,4672 ----
+ case ADDR_OTHER:
+ // Any range is OK.
+ break;
+ case ADDR_QUICKFIX:
++ #ifdef FEAT_QUICKFIX
+ if (eap->line2 != 1 && eap->line2 > qf_get_size(eap))
+ return _(e_invrange);
+ #endif
++ break;
+ case ADDR_NONE:
+ // Will give an error elsewhere.
+ break;
+*** ../vim-8.1.1242/src/version.c 2019-05-01 20:30:19.598426336 +0200
+--- src/version.c 2019-05-01 21:43:30.252314911 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1243,
+ /**/
+
+--
+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.1244 b/data/vim/patches/8.1.1244
new file mode 100644
index 000000000..d810aa98b
--- /dev/null
+++ b/data/vim/patches/8.1.1244
@@ -0,0 +1,265 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1244
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1244
+Problem: No tests for CTRL-mouse-click.
+Solution: Add a few tests. (Dominique Pelle, closes #4323)
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1243/src/testdir/test_termcodes.vim 2019-04-28 13:00:08.627933382 +0200
+--- src/testdir/test_termcodes.vim 2019-05-01 23:10:28.220053123 +0200
+***************
+*** 32,37 ****
+--- 32,47 ----
+ call TerminalEscapeCode(0x21, 1, a:row, a:col, 'M')
+ endfunc
+
++ func MouseCtrlLeftClick(row, col)
++ let ctrl = 0x10
++ call TerminalEscapeCode(0x20 + ctrl, 0 + ctrl, a:row, a:col, 'M')
++ endfunc
++
++ func MouseCtrlRightClick(row, col)
++ let ctrl = 0x10
++ call TerminalEscapeCode(0x22 + ctrl, 2 + ctrl, a:row, a:col, 'M')
++ endfunc
++
+ func MouseLeftRelease(row, col)
+ call TerminalEscapeCode(0x23, 3, a:row, a:col, 'm')
+ endfunc
+***************
+*** 40,45 ****
+--- 50,59 ----
+ call TerminalEscapeCode(0x23, 3, a:row, a:col, 'm')
+ endfunc
+
++ func MouseRightRelease(row, col)
++ call TerminalEscapeCode(0x23, 3, a:row, a:col, 'm')
++ endfunc
++
+ func MouseLeftDrag(row, col)
+ call TerminalEscapeCode(0x43, 0x20, a:row, a:col, 'M')
+ endfunc
+***************
+*** 62,68 ****
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' . ttymouse_val
+ go
+ call assert_equal([0, 1, 1, 0], getpos('.'), msg)
+ let row = 2
+--- 76,82 ----
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' .. ttymouse_val
+ go
+ call assert_equal([0, 1, 1, 0], getpos('.'), msg)
+ let row = 2
+***************
+*** 78,83 ****
+--- 92,130 ----
+ bwipe!
+ endfunc
+
++ " Test that <C-LeftMouse> jumps to help tag and <C-RightMouse> jumps back.
++ func Test_xterm_mouse_ctrl_click()
++ let save_mouse = &mouse
++ let save_term = &term
++ let save_ttymouse = &ttymouse
++ set mouse=a term=xterm
++
++ for ttymouse_val in ['xterm2', 'sgr']
++ let msg = 'ttymouse=' .. ttymouse_val
++ exe 'set ttymouse=' .. ttymouse_val
++ help
++ /usr_02.txt
++ norm! zt
++ let row = 1
++ let col = 1
++ call MouseCtrlLeftClick(row, col)
++ call MouseLeftRelease(row, col)
++ call assert_match('usr_02.txt$', bufname('%'), msg)
++ call assert_equal('*usr_02.txt*', expand('<cWORD>'))
++
++ call MouseCtrlRightClick(row, col)
++ call MouseLeftRelease(row, col)
++ call assert_match('help.txt$', bufname('%'), msg)
++ call assert_equal('|usr_02.txt|', expand('<cWORD>'))
++
++ helpclose
++ endfor
++
++ let &mouse = save_mouse
++ let &term = save_term
++ let &ttymouse = save_ttymouse
++ endfunc
++
+ func Test_xterm_mouse_middle_click()
+ if !WorkingClipboard()
+ throw 'Skipped: No working clipboard'
+***************
+*** 93,99 ****
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' . ttymouse_val
+ call setline(1, ['123456789', '123456789'])
+
+ " Middle-click in the middle of the line pastes text where clicked.
+--- 140,146 ----
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' .. ttymouse_val
+ call setline(1, ['123456789', '123456789'])
+
+ " Middle-click in the middle of the line pastes text where clicked.
+***************
+*** 134,140 ****
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' . ttymouse_val
+ go
+ call assert_equal(1, line('w0'), msg)
+ call assert_equal([0, 1, 1, 0], getpos('.'), msg)
+--- 181,187 ----
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' .. ttymouse_val
+ go
+ call assert_equal(1, line('w0'), msg)
+ call assert_equal([0, 1, 1, 0], getpos('.'), msg)
+***************
+*** 170,176 ****
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' . ttymouse_val
+
+ " Split horizontally and test dragging the horizontal window separator.
+ split
+--- 217,223 ----
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' .. ttymouse_val
+
+ " Split horizontally and test dragging the horizontal window separator.
+ split
+***************
+*** 227,233 ****
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' . ttymouse_val
+
+ call assert_equal(1, &cmdheight, msg)
+ let rowstatusline = winheight(0) + 1
+--- 274,280 ----
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' .. ttymouse_val
+
+ call assert_equal(1, &cmdheight, msg)
+ let rowstatusline = winheight(0) + 1
+***************
+*** 268,274 ****
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' . ttymouse_val
+ e Xfoo
+ tabnew Xbar
+
+--- 315,321 ----
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' .. ttymouse_val
+ e Xfoo
+ tabnew Xbar
+
+***************
+*** 320,326 ****
+ continue
+ endif
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' . ttymouse_val
+ e Xtab1
+ tabnew Xtab2
+ tabnew Xtab3
+--- 367,373 ----
+ continue
+ endif
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' .. ttymouse_val
+ e Xtab1
+ tabnew Xtab2
+ tabnew Xtab3
+***************
+*** 362,368 ****
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' . ttymouse_val
+ e Xtab1
+ tabnew Xtab2
+
+--- 409,415 ----
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' .. ttymouse_val
+ e Xtab1
+ tabnew Xtab2
+
+***************
+*** 411,417 ****
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' . ttymouse_val
+ e Xtab1
+ tabnew Xtab2
+
+--- 458,464 ----
+
+ for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+! exe 'set ttymouse=' .. ttymouse_val
+ e Xtab1
+ tabnew Xtab2
+
+*** ../vim-8.1.1243/src/version.c 2019-05-01 21:43:39.076257243 +0200
+--- src/version.c 2019-05-01 23:13:24.447121682 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1244,
+ /**/
+
+--
+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.1245 b/data/vim/patches/8.1.1245
new file mode 100644
index 000000000..571ba5a73
--- /dev/null
+++ b/data/vim/patches/8.1.1245
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1245
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1245
+Problem: ":copen 10" sets height in full-height window. (Daniel Hahler)
+Solution: Don't set the height if the quickfix window is full height.
+ (closes #4325)
+Files: src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.1244/src/quickfix.c 2019-04-04 14:04:06.994917179 +0200
+--- src/quickfix.c 2019-05-02 20:10:13.025349544 +0200
+***************
+*** 4016,4022 ****
+ if (sz != win->w_width)
+ win_setwidth(sz);
+ }
+! else if (sz != win->w_height)
+ win_setheight(sz);
+ }
+
+--- 4016,4023 ----
+ if (sz != win->w_width)
+ win_setwidth(sz);
+ }
+! else if (sz != win->w_height
+! && win->w_height + win->w_status_height < cmdline_row)
+ win_setheight(sz);
+ }
+
+*** ../vim-8.1.1244/src/testdir/test_quickfix.vim 2019-04-07 12:04:48.523067191 +0200
+--- src/testdir/test_quickfix.vim 2019-05-02 20:05:29.386925203 +0200
+***************
+*** 279,284 ****
+--- 279,293 ----
+ call XwindowTests('l')
+ endfunc
+
++ func Test_copenHeight()
++ copen
++ wincmd H
++ let height = winheight(0)
++ copen 10
++ call assert_equal(height, winheight(0))
++ quit
++ endfunc
++
+ " Tests for the :cfile, :lfile, :caddfile, :laddfile, :cgetfile and :lgetfile
+ " commands.
+ func XfileTests(cchar)
+*** ../vim-8.1.1244/src/version.c 2019-05-01 23:13:53.270968846 +0200
+--- src/version.c 2019-05-02 20:12:20.432641522 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1245,
+ /**/
+
+--
+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.1246 b/data/vim/patches/8.1.1246
new file mode 100644
index 000000000..5e1f40618
--- /dev/null
+++ b/data/vim/patches/8.1.1246
@@ -0,0 +1,60 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1246
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1246
+Problem: Cannot handle negative mouse coordinate from urxvt.
+Solution: Accept '-' where a digit is expected. (Vincent Vinel, closes
+ #4326)
+Files: src/term.c
+
+
+*** ../vim-8.1.1245/src/term.c 2019-04-28 19:46:17.034060084 +0200
+--- src/term.c 2019-05-02 20:15:43.591512270 +0200
+***************
+*** 4551,4560 ****
+ continue; /* no match */
+ else
+ {
+! /* Skip over the digits, the final char must
+! * follow. */
+ for (j = slen - 2; j < len && (isdigit(tp[j])
+! || tp[j] == ';'); ++j)
+ ;
+ ++j;
+ if (len < j) /* got a partial sequence */
+--- 4551,4561 ----
+ continue; /* no match */
+ else
+ {
+! // Skip over the digits, the final char must
+! // follow. URXVT can use a negative value, thus
+! // also accept '-'.
+ for (j = slen - 2; j < len && (isdigit(tp[j])
+! || tp[j] == '-' || tp[j] == ';'); ++j)
+ ;
+ ++j;
+ if (len < j) /* got a partial sequence */
+*** ../vim-8.1.1245/src/version.c 2019-05-02 20:17:29.322924398 +0200
+--- src/version.c 2019-05-02 20:23:19.224907598 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1246,
+ /**/
+
+--
+The war between Emacs and Vi is over. Vi has won with 3 to 1.
+http://m.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/030/3044/3044s1.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.1247 b/data/vim/patches/8.1.1247
new file mode 100644
index 000000000..eceb1b35e
--- /dev/null
+++ b/data/vim/patches/8.1.1247
@@ -0,0 +1,373 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1247
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1247
+Problem: Urxvt mouse codes are not tested.
+Solution: Also set 'ttymouse' to "urxvt" in the termcodes test.
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1246/src/testdir/test_termcodes.vim 2019-05-01 23:13:53.270968846 +0200
+--- src/testdir/test_termcodes.vim 2019-05-02 21:09:32.053517694 +0200
+***************
+*** 7,17 ****
+
+ source shared.vim
+
+ " Helper function to emit a terminal escape code.
+! func TerminalEscapeCode(code_xterm, code_sgr, row, col, m)
+ if &ttymouse ==# 'xterm2'
+ " need to use byte encoding here.
+! let str = list2str([a:code_xterm, a:col + 0x20, a:row + 0x20])
+ if has('iconv')
+ let bytes = iconv(str, 'utf-8', 'latin1')
+ else
+--- 7,23 ----
+
+ source shared.vim
+
++ " xterm2 and sgr always work, urxvt is optional.
++ let s:test_ttymouse = ['xterm2', 'sgr']
++ if has('mouse_urxvt')
++ call add(s:test_ttymouse, 'urxvt')
++ endif
++
+ " Helper function to emit a terminal escape code.
+! func TerminalEscapeCode(code, row, col, m)
+ if &ttymouse ==# 'xterm2'
+ " need to use byte encoding here.
+! let str = list2str([a:code + 0x20, a:col + 0x20, a:row + 0x20])
+ if has('iconv')
+ let bytes = iconv(str, 'utf-8', 'latin1')
+ else
+***************
+*** 20,69 ****
+ endif
+ call feedkeys("\<Esc>[M" .. bytes, 'Lx!')
+ elseif &ttymouse ==# 'sgr'
+! call feedkeys(printf("\<Esc>[<%d;%d;%d%s", a:code_sgr, a:col, a:row, a:m), 'Lx!')
+ endif
+ endfunc
+
+ func MouseLeftClick(row, col)
+! call TerminalEscapeCode(0x20, 0, a:row, a:col, 'M')
+ endfunc
+
+ func MouseMiddleClick(row, col)
+! call TerminalEscapeCode(0x21, 1, a:row, a:col, 'M')
+ endfunc
+
+ func MouseCtrlLeftClick(row, col)
+ let ctrl = 0x10
+! call TerminalEscapeCode(0x20 + ctrl, 0 + ctrl, a:row, a:col, 'M')
+ endfunc
+
+ func MouseCtrlRightClick(row, col)
+ let ctrl = 0x10
+! call TerminalEscapeCode(0x22 + ctrl, 2 + ctrl, a:row, a:col, 'M')
+ endfunc
+
+ func MouseLeftRelease(row, col)
+! call TerminalEscapeCode(0x23, 3, a:row, a:col, 'm')
+ endfunc
+
+ func MouseMiddleRelease(row, col)
+! call TerminalEscapeCode(0x23, 3, a:row, a:col, 'm')
+ endfunc
+
+ func MouseRightRelease(row, col)
+! call TerminalEscapeCode(0x23, 3, a:row, a:col, 'm')
+ endfunc
+
+ func MouseLeftDrag(row, col)
+! call TerminalEscapeCode(0x43, 0x20, a:row, a:col, 'M')
+ endfunc
+
+ func MouseWheelUp(row, col)
+! call TerminalEscapeCode(0x40, 0x40, a:row, a:col, 'M')
+ endfunc
+
+ func MouseWheelDown(row, col)
+! call TerminalEscapeCode(0x41, 0x41, a:row, a:col, 'M')
+ endfunc
+
+ func Test_xterm_mouse_left_click()
+--- 26,77 ----
+ endif
+ call feedkeys("\<Esc>[M" .. bytes, 'Lx!')
+ elseif &ttymouse ==# 'sgr'
+! call feedkeys(printf("\<Esc>[<%d;%d;%d%s", a:code, a:col, a:row, a:m), 'Lx!')
+! elseif &ttymouse ==# 'urxvt'
+! call feedkeys(printf("\<Esc>[%d;%d;%dM", a:code + 0x20, a:col, a:row), 'Lx!')
+ endif
+ endfunc
+
+ func MouseLeftClick(row, col)
+! call TerminalEscapeCode(0, a:row, a:col, 'M')
+ endfunc
+
+ func MouseMiddleClick(row, col)
+! call TerminalEscapeCode(1, a:row, a:col, 'M')
+ endfunc
+
+ func MouseCtrlLeftClick(row, col)
+ let ctrl = 0x10
+! call TerminalEscapeCode(0 + ctrl, a:row, a:col, 'M')
+ endfunc
+
+ func MouseCtrlRightClick(row, col)
+ let ctrl = 0x10
+! call TerminalEscapeCode(2 + ctrl, a:row, a:col, 'M')
+ endfunc
+
+ func MouseLeftRelease(row, col)
+! call TerminalEscapeCode(3, a:row, a:col, 'm')
+ endfunc
+
+ func MouseMiddleRelease(row, col)
+! call TerminalEscapeCode(3, a:row, a:col, 'm')
+ endfunc
+
+ func MouseRightRelease(row, col)
+! call TerminalEscapeCode(3, a:row, a:col, 'm')
+ endfunc
+
+ func MouseLeftDrag(row, col)
+! call TerminalEscapeCode(0x20, a:row, a:col, 'M')
+ endfunc
+
+ func MouseWheelUp(row, col)
+! call TerminalEscapeCode(0x40, a:row, a:col, 'M')
+ endfunc
+
+ func MouseWheelDown(row, col)
+! call TerminalEscapeCode(0x41, a:row, a:col, 'M')
+ endfunc
+
+ func Test_xterm_mouse_left_click()
+***************
+*** 74,80 ****
+ set mouse=a term=xterm
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ go
+--- 82,88 ----
+ set mouse=a term=xterm
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ go
+***************
+*** 99,105 ****
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ help
+--- 107,113 ----
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ help
+***************
+*** 138,144 ****
+ let @* = 'abc'
+ set mouse=a term=xterm
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ call setline(1, ['123456789', '123456789'])
+--- 146,152 ----
+ let @* = 'abc'
+ set mouse=a term=xterm
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ call setline(1, ['123456789', '123456789'])
+***************
+*** 179,185 ****
+ set mouse=a term=xterm
+ call setline(1, range(1, 100))
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ go
+--- 187,193 ----
+ set mouse=a term=xterm
+ call setline(1, range(1, 100))
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ go
+***************
+*** 215,221 ****
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+
+--- 223,229 ----
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+
+***************
+*** 272,278 ****
+ let save_laststatus = &laststatus
+ set mouse=a term=xterm laststatus=2
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+
+--- 280,286 ----
+ let save_laststatus = &laststatus
+ set mouse=a term=xterm laststatus=2
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+
+***************
+*** 313,319 ****
+ set mouse=a term=xterm
+ let row = 1
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xfoo
+--- 321,327 ----
+ set mouse=a term=xterm
+ let row = 1
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xfoo
+***************
+*** 361,367 ****
+ let row = 1
+ let col = &columns
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ if ttymouse_val ==# 'xterm2' && col > 223
+ " When 'ttymouse' is 'xterm2', row/col bigger than 223 are not supported.
+ continue
+--- 369,375 ----
+ let row = 1
+ let col = &columns
+
+! for ttymouse_val in s:test_ttymouse
+ if ttymouse_val ==# 'xterm2' && col > 223
+ " When 'ttymouse' is 'xterm2', row/col bigger than 223 are not supported.
+ continue
+***************
+*** 407,413 ****
+ set mouse=a term=xterm mousetime=1
+ let row = 1
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xtab1
+--- 415,421 ----
+ set mouse=a term=xterm mousetime=1
+ let row = 1
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xtab1
+***************
+*** 456,467 ****
+ let row = 1
+ let col = 10
+
+! for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xtab1
+ tabnew Xtab2
+
+ let a = split(execute(':tabs'), "\n")
+ call assert_equal(['Tab page 1',
+ \ ' Xtab1',
+--- 464,483 ----
+ let row = 1
+ let col = 10
+
+! let round = 0
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xtab1
+ tabnew Xtab2
+
++ if round > 0
++ " We need to sleep, or else the first MouseLeftClick() will be
++ " interpreted as a spurious triple-click.
++ sleep 100m
++ endif
++ let round += 1
++
+ let a = split(execute(':tabs'), "\n")
+ call assert_equal(['Tab page 1',
+ \ ' Xtab1',
+***************
+*** 485,495 ****
+ \ 'Tab page 3',
+ \ ' Xtab2'], a, msg)
+
+- if ttymouse_val !=# 'sgr'
+- " We need to sleep, or else MouseLeftClick() in next loop
+- " iteration will be interpreted as a spurious triple-click.
+- sleep 100m
+- endif
+ %bwipe!
+ endfor
+
+--- 501,506 ----
+*** ../vim-8.1.1246/src/version.c 2019-05-02 20:24:08.624617859 +0200
+--- src/version.c 2019-05-02 21:11:40.708817159 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1247,
+ /**/
+
+--
+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.1248 b/data/vim/patches/8.1.1248
new file mode 100644
index 000000000..305a98b87
--- /dev/null
+++ b/data/vim/patches/8.1.1248
@@ -0,0 +1,647 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1248
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1248
+Problem: No test for dec mouse.
+Solution: Add some tests for dec mouse. Add "no_query_mouse".
+Files: src/evalfunc.c, src/globals.h, src/os_unix.c,
+ src/testdir/test_termcodes.vim, runtime/doc/eval.txt
+
+
+*** ../vim-8.1.1247/src/evalfunc.c 2019-04-28 19:46:17.022060143 +0200
+--- src/evalfunc.c 2019-05-02 22:23:44.186970564 +0200
+***************
+*** 14302,14313 ****
+--- 14302,14316 ----
+ }
+ else if (STRCMP(name, (char_u *)"nfa_fail") == 0)
+ nfa_fail_for_testing = val;
++ else if (STRCMP(name, (char_u *)"no_query_mouse") == 0)
++ no_query_mouse_for_testing = val;
+ else if (STRCMP(name, (char_u *)"ALL") == 0)
+ {
+ disable_char_avail_for_testing = FALSE;
+ disable_redraw_for_testing = FALSE;
+ ignore_redraw_flag_for_testing = FALSE;
+ nfa_fail_for_testing = FALSE;
++ no_query_mouse_for_testing = FALSE;
+ if (save_starting >= 0)
+ {
+ starting = save_starting;
+*** ../vim-8.1.1247/src/globals.h 2019-04-28 22:25:03.240480046 +0200
+--- src/globals.h 2019-05-02 22:24:08.050849053 +0200
+***************
+*** 1613,1623 ****
+ /* set by alloc_fail(), number of times alloc() returns NULL */
+ 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
+--- 1613,1624 ----
+ /* set by alloc_fail(), number of times alloc() returns NULL */
+ 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 no_query_mouse_for_testing INIT(= FALSE);
+
+ EXTERN int in_free_unref_items INIT(= FALSE);
+ #endif
+*** ../vim-8.1.1247/src/os_unix.c 2019-04-28 22:50:36.157248454 +0200
+--- src/os_unix.c 2019-05-02 22:24:41.454678795 +0200
+***************
+*** 5940,5946 ****
+ if (WantQueryMouse)
+ {
+ WantQueryMouse = FALSE;
+! mch_write((char_u *)IF_EB("\033[1'|", ESC_STR "[1'|"), 5);
+ }
+ #endif
+
+--- 5940,5947 ----
+ if (WantQueryMouse)
+ {
+ WantQueryMouse = FALSE;
+! if (!no_query_mouse_for_testing)
+! mch_write((char_u *)IF_EB("\033[1'|", ESC_STR "[1'|"), 5);
+ }
+ #endif
+
+*** ../vim-8.1.1247/src/testdir/test_termcodes.vim 2019-05-02 21:12:15.800625684 +0200
+--- src/testdir/test_termcodes.vim 2019-05-02 22:56:32.436832987 +0200
+***************
+*** 8,16 ****
+ source shared.vim
+
+ " xterm2 and sgr always work, urxvt is optional.
+! let s:test_ttymouse = ['xterm2', 'sgr']
+ if has('mouse_urxvt')
+! call add(s:test_ttymouse, 'urxvt')
+ endif
+
+ " Helper function to emit a terminal escape code.
+--- 8,23 ----
+ source shared.vim
+
+ " xterm2 and sgr always work, urxvt is optional.
+! let s:ttymouse_values = ['xterm2', 'sgr']
+ if has('mouse_urxvt')
+! call add(s:ttymouse_values, 'urxvt')
+! endif
+!
+! " dec doesn't support all the functionality
+! if has('mouse_dec')
+! let s:ttymouse_dec = ['dec']
+! else
+! let s:ttymouse_dec = []
+ endif
+
+ " Helper function to emit a terminal escape code.
+***************
+*** 32,43 ****
+ endif
+ endfunc
+
+ func MouseLeftClick(row, col)
+! call TerminalEscapeCode(0, a:row, a:col, 'M')
+ endfunc
+
+ func MouseMiddleClick(row, col)
+! call TerminalEscapeCode(1, a:row, a:col, 'M')
+ endfunc
+
+ func MouseCtrlLeftClick(row, col)
+--- 39,62 ----
+ endif
+ endfunc
+
++ func DecEscapeCode(code, down, row, col)
++ call feedkeys(printf("\<Esc>[%d;%d;%d;%d&w", a:code, a:down, a:row, a:col), 'Lx!')
++ endfunc
++
+ func MouseLeftClick(row, col)
+! if &ttymouse ==# 'dec'
+! call DecEscapeCode(2, 4, a:row, a:col)
+! else
+! call TerminalEscapeCode(0, a:row, a:col, 'M')
+! endif
+ endfunc
+
+ func MouseMiddleClick(row, col)
+! if &ttymouse ==# 'dec'
+! call DecEscapeCode(4, 2, a:row, a:col)
+! else
+! call TerminalEscapeCode(1, a:row, a:col, 'M')
+! endif
+ endfunc
+
+ func MouseCtrlLeftClick(row, col)
+***************
+*** 51,61 ****
+ endfunc
+
+ func MouseLeftRelease(row, col)
+! call TerminalEscapeCode(3, a:row, a:col, 'm')
+ endfunc
+
+ func MouseMiddleRelease(row, col)
+! call TerminalEscapeCode(3, a:row, a:col, 'm')
+ endfunc
+
+ func MouseRightRelease(row, col)
+--- 70,88 ----
+ endfunc
+
+ func MouseLeftRelease(row, col)
+! if &ttymouse ==# 'dec'
+! call DecEscapeCode(3, 0, a:row, a:col)
+! else
+! call TerminalEscapeCode(3, a:row, a:col, 'm')
+! endif
+ endfunc
+
+ func MouseMiddleRelease(row, col)
+! if &ttymouse ==# 'dec'
+! call DecEscapeCode(5, 0, a:row, a:col)
+! else
+! call TerminalEscapeCode(3, a:row, a:col, 'm')
+! endif
+ endfunc
+
+ func MouseRightRelease(row, col)
+***************
+*** 63,69 ****
+ endfunc
+
+ func MouseLeftDrag(row, col)
+! call TerminalEscapeCode(0x20, a:row, a:col, 'M')
+ endfunc
+
+ func MouseWheelUp(row, col)
+--- 90,100 ----
+ endfunc
+
+ func MouseLeftDrag(row, col)
+! if &ttymouse ==# 'dec'
+! call DecEscapeCode(1, 4, a:row, a:col)
+! else
+! call TerminalEscapeCode(0x20, a:row, a:col, 'M')
+! endif
+ endfunc
+
+ func MouseWheelUp(row, col)
+***************
+*** 74,88 ****
+ call TerminalEscapeCode(0x41, a:row, a:col, 'M')
+ endfunc
+
+! func Test_xterm_mouse_left_click()
+ new
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ go
+--- 105,120 ----
+ call TerminalEscapeCode(0x41, a:row, a:col, 'M')
+ endfunc
+
+! func Test_term_mouse_left_click()
+ new
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
++ call test_override('no_query_mouse', 1)
+ set mouse=a term=xterm
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ go
+***************
+*** 97,102 ****
+--- 129,135 ----
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
++ call test_override('no_query_mouse', 0)
+ bwipe!
+ endfunc
+
+***************
+*** 107,113 ****
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ help
+--- 140,146 ----
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+
+! for ttymouse_val in s:ttymouse_values
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ help
+***************
+*** 121,127 ****
+ call assert_equal('*usr_02.txt*', expand('<cWORD>'))
+
+ call MouseCtrlRightClick(row, col)
+! call MouseLeftRelease(row, col)
+ call assert_match('help.txt$', bufname('%'), msg)
+ call assert_equal('|usr_02.txt|', expand('<cWORD>'))
+
+--- 154,160 ----
+ call assert_equal('*usr_02.txt*', expand('<cWORD>'))
+
+ call MouseCtrlRightClick(row, col)
+! call MouseRightRelease(row, col)
+ call assert_match('help.txt$', bufname('%'), msg)
+ call assert_equal('|usr_02.txt|', expand('<cWORD>'))
+
+***************
+*** 133,139 ****
+ let &ttymouse = save_ttymouse
+ endfunc
+
+! func Test_xterm_mouse_middle_click()
+ if !WorkingClipboard()
+ throw 'Skipped: No working clipboard'
+ endif
+--- 166,172 ----
+ let &ttymouse = save_ttymouse
+ endfunc
+
+! func Test_term_mouse_middle_click()
+ if !WorkingClipboard()
+ throw 'Skipped: No working clipboard'
+ endif
+***************
+*** 142,152 ****
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+ let save_quotestar = @*
+ let @* = 'abc'
+ set mouse=a term=xterm
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ call setline(1, ['123456789', '123456789'])
+--- 175,186 ----
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
++ call test_override('no_query_mouse', 1)
+ let save_quotestar = @*
+ let @* = 'abc'
+ set mouse=a term=xterm
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ call setline(1, ['123456789', '123456789'])
+***************
+*** 175,185 ****
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
+ let @* = save_quotestar
+ bwipe!
+ endfunc
+
+! func Test_xterm_mouse_wheel()
+ new
+ let save_mouse = &mouse
+ let save_term = &term
+--- 209,222 ----
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
++ call test_override('no_query_mouse', 0)
+ let @* = save_quotestar
+ bwipe!
+ endfunc
+
+! " TODO: for unclear reasons this test fails if it comes after
+! " Test_xterm_mouse_ctrl_click()
+! func Test_1xterm_mouse_wheel()
+ new
+ let save_mouse = &mouse
+ let save_term = &term
+***************
+*** 187,193 ****
+ set mouse=a term=xterm
+ call setline(1, range(1, 100))
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ go
+--- 224,230 ----
+ set mouse=a term=xterm
+ call setline(1, range(1, 100))
+
+! for ttymouse_val in s:ttymouse_values
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ go
+***************
+*** 217,229 ****
+ bwipe!
+ endfunc
+
+! func Test_xterm_mouse_drag_window_separator()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+
+--- 254,267 ----
+ bwipe!
+ endfunc
+
+! func Test_term_mouse_drag_window_separator()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
++ call test_override('no_query_mouse', 1)
+ set mouse=a term=xterm
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+
+***************
+*** 271,286 ****
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
+ endfunc
+
+! func Test_xterm_mouse_drag_statusline()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+ let save_laststatus = &laststatus
+ set mouse=a term=xterm laststatus=2
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+
+--- 309,326 ----
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
++ call test_override('no_query_mouse', 0)
+ endfunc
+
+! func Test_term_mouse_drag_statusline()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
++ call test_override('no_query_mouse', 1)
+ let save_laststatus = &laststatus
+ set mouse=a term=xterm laststatus=2
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+
+***************
+*** 311,327 ****
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
+ let &laststatus = save_laststatus
+ endfunc
+
+! func Test_xterm_mouse_click_tab()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+ let row = 1
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xfoo
+--- 351,369 ----
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
++ call test_override('no_query_mouse', 0)
+ let &laststatus = save_laststatus
+ endfunc
+
+! func Test_term_mouse_click_tab()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
++ call test_override('no_query_mouse', 1)
+ set mouse=a term=xterm
+ let row = 1
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xfoo
+***************
+*** 359,375 ****
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
+ endfunc
+
+! func Test_xterm_mouse_click_X_to_close_tab()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+ set mouse=a term=xterm
+ let row = 1
+ let col = &columns
+
+! for ttymouse_val in s:test_ttymouse
+ if ttymouse_val ==# 'xterm2' && col > 223
+ " When 'ttymouse' is 'xterm2', row/col bigger than 223 are not supported.
+ continue
+--- 401,419 ----
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
++ call test_override('no_query_mouse', 0)
+ endfunc
+
+! func Test_term_mouse_click_X_to_close_tab()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
++ call test_override('no_query_mouse', 1)
+ set mouse=a term=xterm
+ let row = 1
+ let col = &columns
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
+ if ttymouse_val ==# 'xterm2' && col > 223
+ " When 'ttymouse' is 'xterm2', row/col bigger than 223 are not supported.
+ continue
+***************
+*** 405,421 ****
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
+ endfunc
+
+! func Test_xterm_mouse_drag_to_move_tab()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+ " Set 'mousetime' to 1 to avoid recognizing a double-click in the loop
+ set mouse=a term=xterm mousetime=1
+ let row = 1
+
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xtab1
+--- 449,467 ----
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
++ call test_override('no_query_mouse', 0)
+ endfunc
+
+! func Test_term_mouse_drag_to_move_tab()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
++ call test_override('no_query_mouse', 1)
+ " Set 'mousetime' to 1 to avoid recognizing a double-click in the loop
+ set mouse=a term=xterm mousetime=1
+ let row = 1
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xtab1
+***************
+*** 451,463 ****
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
+ set mousetime&
+ endfunc
+
+! func Test_xterm_mouse_double_click_to_create_tab()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
+ " Set 'mousetime' to a small value, so that double-click works but we don't
+ " have to wait long to avoid a triple-click.
+ set mouse=a term=xterm mousetime=100
+--- 497,511 ----
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
++ call test_override('no_query_mouse', 0)
+ set mousetime&
+ endfunc
+
+! func Test_term_mouse_double_click_to_create_tab()
+ let save_mouse = &mouse
+ let save_term = &term
+ let save_ttymouse = &ttymouse
++ call test_override('no_query_mouse', 1)
+ " Set 'mousetime' to a small value, so that double-click works but we don't
+ " have to wait long to avoid a triple-click.
+ set mouse=a term=xterm mousetime=100
+***************
+*** 465,471 ****
+ let col = 10
+
+ let round = 0
+! for ttymouse_val in s:test_ttymouse
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xtab1
+--- 513,519 ----
+ let col = 10
+
+ let round = 0
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xtab1
+***************
+*** 507,512 ****
+--- 555,561 ----
+ let &mouse = save_mouse
+ let &term = save_term
+ let &ttymouse = save_ttymouse
++ call test_override('no_query_mouse', 0)
+ set mousetime&
+ endfunc
+
+*** ../vim-8.1.1247/runtime/doc/eval.txt 2019-04-27 20:36:52.526303597 +0200
+--- runtime/doc/eval.txt 2019-05-02 22:22:22.267386667 +0200
+***************
+*** 9744,9749 ****
+--- 9805,9812 ----
+ starting reset the "starting" variable, see below
+ nfa_fail makes the NFA regexp engine fail to force a
+ fallback to the old engine
++ no_query_mouse do not query the mouse position for "dec"
++ terminals
+ ALL clear all overrides ({val} is not used)
+
+ "starting" is to be used when a test should behave like
+*** ../vim-8.1.1247/src/version.c 2019-05-02 21:12:15.800625684 +0200
+--- src/version.c 2019-05-02 22:57:23.900566422 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1248,
+ /**/
+
+--
+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.1249 b/data/vim/patches/8.1.1249
new file mode 100644
index 000000000..35999e329
--- /dev/null
+++ b/data/vim/patches/8.1.1249
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1249
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1249
+Problem: Compiler warning for uninitialized variable.
+Solution: Initialize it. (Christian Brabandt)
+Files: src/regexp_nfa.c
+
+
+*** ../vim-8.1.1248/src/regexp_nfa.c 2019-03-30 18:46:57.360077328 +0100
+--- src/regexp_nfa.c 2019-05-03 11:18:15.186623628 +0200
+***************
+*** 5510,5517 ****
+ *
+ * When "nfa_endp" is not NULL it is a required end-of-match position.
+ *
+! * Return TRUE if there is a match, FALSE otherwise.
+ * When there is a match "submatch" contains the positions.
+ * Note: Caller must ensure that: start != NULL.
+ */
+ static int
+--- 5510,5519 ----
+ *
+ * When "nfa_endp" is not NULL it is a required end-of-match position.
+ *
+! * Return TRUE if there is a match, FALSE if there is no match,
+! * NFA_TOO_EXPENSIVE if we end up with too many states.
+ * When there is a match "submatch" contains the positions.
++ *
+ * Note: Caller must ensure that: start != NULL.
+ */
+ static int
+***************
+*** 5521,5527 ****
+ regsubs_T *submatch,
+ regsubs_T *m)
+ {
+! int result;
+ size_t size = 0;
+ int flag = 0;
+ int go_to_nextline = FALSE;
+--- 5523,5529 ----
+ regsubs_T *submatch,
+ regsubs_T *m)
+ {
+! int result = FALSE;
+ size_t size = 0;
+ int flag = 0;
+ int go_to_nextline = FALSE;
+*** ../vim-8.1.1248/src/version.c 2019-05-02 23:00:19.227658452 +0200
+--- src/version.c 2019-05-03 11:19:50.042148498 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1249,
+ /**/
+
+--
+TIM: But follow only if you are men of valour. For the entrance to this cave
+ is guarded by a monster, a creature so foul and cruel that no man yet has
+ fought with it and lived. Bones of full fifty men lie strewn about its
+ lair ...
+ "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.1250 b/data/vim/patches/8.1.1250
new file mode 100644
index 000000000..9d6d8936e
--- /dev/null
+++ b/data/vim/patches/8.1.1250
@@ -0,0 +1,130 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1250
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1250
+Problem: No test for netterm mouse.
+Solution: Add some tests for netterm mouse.
+Files: src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1249/src/testdir/test_termcodes.vim 2019-05-02 23:00:19.227658452 +0200
+--- src/testdir/test_termcodes.vim 2019-05-03 13:42:03.533584828 +0200
+***************
+*** 20,25 ****
+--- 20,32 ----
+ let s:ttymouse_dec = []
+ endif
+
++ " netterm only supports left click
++ if has('mouse_netterm')
++ let s:ttymouse_netterm = ['netterm']
++ else
++ let s:ttymouse_netterm = []
++ endif
++
+ " Helper function to emit a terminal escape code.
+ func TerminalEscapeCode(code, row, col, m)
+ if &ttymouse ==# 'xterm2'
+***************
+*** 43,51 ****
+--- 50,64 ----
+ call feedkeys(printf("\<Esc>[%d;%d;%d;%d&w", a:code, a:down, a:row, a:col), 'Lx!')
+ endfunc
+
++ func NettermEscapeCode(row, col)
++ call feedkeys(printf("\<Esc>}%d,%d\r", a:row, a:col), 'Lx!')
++ endfunc
++
+ func MouseLeftClick(row, col)
+ if &ttymouse ==# 'dec'
+ call DecEscapeCode(2, 4, a:row, a:col)
++ elseif &ttymouse ==# 'netterm'
++ call NettermEscapeCode(a:row, a:col)
+ else
+ call TerminalEscapeCode(0, a:row, a:col, 'M')
+ endif
+***************
+*** 72,77 ****
+--- 85,92 ----
+ func MouseLeftRelease(row, col)
+ if &ttymouse ==# 'dec'
+ call DecEscapeCode(3, 0, a:row, a:col)
++ elseif &ttymouse ==# 'netterm'
++ " send nothing
+ else
+ call TerminalEscapeCode(3, a:row, a:col, 'm')
+ endif
+***************
+*** 114,120 ****
+ set mouse=a term=xterm
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ go
+--- 129,135 ----
+ set mouse=a term=xterm
+ call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec + s:ttymouse_netterm
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ go
+***************
+*** 363,369 ****
+ set mouse=a term=xterm
+ let row = 1
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xfoo
+--- 378,384 ----
+ set mouse=a term=xterm
+ let row = 1
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec + s:ttymouse_netterm
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' .. ttymouse_val
+ e Xfoo
+***************
+*** 413,419 ****
+ let row = 1
+ let col = &columns
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
+ if ttymouse_val ==# 'xterm2' && col > 223
+ " When 'ttymouse' is 'xterm2', row/col bigger than 223 are not supported.
+ continue
+--- 428,434 ----
+ let row = 1
+ let col = &columns
+
+! for ttymouse_val in s:ttymouse_values + s:ttymouse_dec + s:ttymouse_netterm
+ if ttymouse_val ==# 'xterm2' && col > 223
+ " When 'ttymouse' is 'xterm2', row/col bigger than 223 are not supported.
+ continue
+*** ../vim-8.1.1249/src/version.c 2019-05-03 11:21:01.645784762 +0200
+--- src/version.c 2019-05-03 13:43:44.645013888 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1250,
+ /**/
+
+--
+Save the plankton - eat a whale.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1251 b/data/vim/patches/8.1.1251
new file mode 100644
index 000000000..4deb14e8c
--- /dev/null
+++ b/data/vim/patches/8.1.1251
@@ -0,0 +1,217 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1251
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1251
+Problem: No test for completion of mapping keys.
+Solution: Add a test. Also clean up the code.
+Files: src/getchar.c, src/term.c, src/proto/term.pro,
+ src/testdir/test_cmdline.vim
+
+
+*** ../vim-8.1.1250/src/getchar.c 2019-04-29 21:58:37.667769672 +0200
+--- src/getchar.c 2019-05-03 14:49:32.298980123 +0200
+***************
+*** 4263,4269 ****
+ }
+
+ /*
+! * Find all mapping/abbreviation names that match regexp 'prog'.
+ * For command line expansion of ":[un]map" and ":[un]abbrev" in all modes.
+ * Return OK if matches found, FAIL otherwise.
+ */
+--- 4263,4269 ----
+ }
+
+ /*
+! * Find all mapping/abbreviation names that match regexp "regmatch"'.
+ * For command line expansion of ":[un]map" and ":[un]abbrev" in all modes.
+ * Return OK if matches found, FAIL otherwise.
+ */
+***************
+*** 4343,4349 ****
+ {
+ if (mp->m_mode & expand_mapmodes)
+ {
+! p = translate_mapping(mp->m_keys, TRUE);
+ if (p != NULL && vim_regexec(regmatch, p, (colnr_T)0))
+ {
+ if (round == 1)
+--- 4343,4349 ----
+ {
+ if (mp->m_mode & expand_mapmodes)
+ {
+! p = translate_mapping(mp->m_keys);
+ if (p != NULL && vim_regexec(regmatch, p, (colnr_T)0))
+ {
+ if (round == 1)
+*** ../vim-8.1.1250/src/term.c 2019-05-02 20:24:08.624617859 +0200
+--- src/term.c 2019-05-03 14:49:53.686860278 +0200
+***************
+*** 6629,6650 ****
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ /*
+ * Translate an internal mapping/abbreviation representation into the
+! * corresponding external one recognized by :map/:abbrev commands;
+! * respects the current B/k/< settings of 'cpoption'.
+ *
+ * This function is called when expanding mappings/abbreviations on the
+! * command-line, and for building the "Ambiguous mapping..." error message.
+ *
+! * It uses a growarray to build the translation string since the
+! * latter can be wider than the original description. The caller has to
+! * free the string afterwards.
+ *
+ * Returns NULL when there is a problem.
+ */
+ char_u *
+! translate_mapping(
+! char_u *str,
+! int expmap) /* TRUE when expanding mappings on command-line */
+ {
+ garray_T ga;
+ int c;
+--- 6629,6648 ----
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ /*
+ * Translate an internal mapping/abbreviation representation into the
+! * corresponding external one recognized by :map/:abbrev commands.
+! * Respects the current B/k/< settings of 'cpoption'.
+ *
+ * This function is called when expanding mappings/abbreviations on the
+! * command-line.
+ *
+! * It uses a growarray to build the translation string since the latter can be
+! * wider than the original description. The caller has to free the string
+! * afterwards.
+ *
+ * Returns NULL when there is a problem.
+ */
+ char_u *
+! translate_mapping(char_u *str)
+ {
+ garray_T ga;
+ int c;
+***************
+*** 6691,6697 ****
+ }
+ if (c == K_SPECIAL && str[1] != NUL && str[2] != NUL)
+ {
+! if (expmap && cpo_special)
+ {
+ ga_clear(&ga);
+ return NULL;
+--- 6689,6695 ----
+ }
+ if (c == K_SPECIAL && str[1] != NUL && str[2] != NUL)
+ {
+! if (cpo_special)
+ {
+ ga_clear(&ga);
+ return NULL;
+***************
+*** 6703,6709 ****
+ }
+ if (IS_SPECIAL(c) || modifiers) /* special key */
+ {
+! if (expmap && cpo_special)
+ {
+ ga_clear(&ga);
+ return NULL;
+--- 6701,6707 ----
+ }
+ if (IS_SPECIAL(c) || modifiers) /* special key */
+ {
+! if (cpo_special)
+ {
+ ga_clear(&ga);
+ return NULL;
+*** ../vim-8.1.1250/src/proto/term.pro 2018-08-21 13:09:06.254115882 +0200
+--- src/proto/term.pro 2019-05-03 14:49:56.962841925 +0200
+***************
+*** 74,80 ****
+ int find_term_bykeys(char_u *src);
+ void show_termcodes(void);
+ int show_one_termcode(char_u *name, char_u *code, int printit);
+! char_u *translate_mapping(char_u *str, int expmap);
+ void update_tcap(int attr);
+ void swap_tcap(void);
+ guicolor_T gui_get_color_cmn(char_u *name);
+--- 74,80 ----
+ int find_term_bykeys(char_u *src);
+ void show_termcodes(void);
+ int show_one_termcode(char_u *name, char_u *code, int printit);
+! char_u *translate_mapping(char_u *str);
+ void update_tcap(int attr);
+ void swap_tcap(void);
+ guicolor_T gui_get_color_cmn(char_u *name);
+*** ../vim-8.1.1250/src/testdir/test_cmdline.vim 2019-03-28 21:26:19.252618909 +0100
+--- src/testdir/test_cmdline.vim 2019-05-03 15:12:43.791275271 +0200
+***************
+*** 77,82 ****
+--- 77,118 ----
+ call assert_equal('"map <special> <nowait>', getreg(':'))
+ call feedkeys(":map <silent> <sp\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <silent> <special>', getreg(':'))
++
++ map ,f commaf
++ map ,g commaf
++ call feedkeys(":map ,\<Tab>\<Home>\"\<CR>", 'xt')
++ call assert_equal('"map ,f', getreg(':'))
++ call feedkeys(":map ,\<Tab>\<Tab>\<Home>\"\<CR>", 'xt')
++ call assert_equal('"map ,g', getreg(':'))
++ unmap ,f
++ unmap ,g
++
++ set cpo-=< cpo-=B cpo-=k
++ map <Left> left
++ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
++ call assert_equal('"map <Left>', getreg(':'))
++ unmap <Left>
++
++ set cpo+=<
++ map <Left> left
++ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
++ call assert_equal('"map <Left>', getreg(':'))
++ unmap <Left>
++ set cpo-=<
++
++ set cpo+=B
++ map <Left> left
++ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
++ call assert_equal('"map <Left>', getreg(':'))
++ unmap <Left>
++ set cpo-=B
++
++ set cpo+=k
++ map <Left> left
++ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
++ call assert_equal('"map <Left>', getreg(':'))
++ unmap <Left>
++ set cpo-=k
+ endfunc
+
+ func Test_match_completion()
+*** ../vim-8.1.1250/src/version.c 2019-05-03 13:44:06.560890132 +0200
+--- src/version.c 2019-05-03 15:13:05.683157641 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1251,
+ /**/
+
+--
+My girlfriend told me I should be more affectionate.
+So I got TWO girlfriends.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1252 b/data/vim/patches/8.1.1252
new file mode 100644
index 000000000..9c684841a
--- /dev/null
+++ b/data/vim/patches/8.1.1252
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1252
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1252
+Problem: Not all mapping completion is tested.
+Solution: Add a few more mapping completion tests.
+Files: src/testdir/test_cmdline.vim
+
+
+*** ../vim-8.1.1251/src/testdir/test_cmdline.vim 2019-05-03 15:13:53.758898729 +0200
+--- src/testdir/test_cmdline.vim 2019-05-03 16:02:33.066718994 +0200
+***************
+*** 78,96 ****
+--- 78,108 ----
+ call feedkeys(":map <silent> <sp\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <silent> <special>', getreg(':'))
+
++ map <Middle>x middle
++
+ map ,f commaf
+ map ,g commaf
++ map <Left> left
++ map <A-Left>x shiftleft
+ call feedkeys(":map ,\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map ,f', getreg(':'))
+ call feedkeys(":map ,\<Tab>\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map ,g', getreg(':'))
++ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
++ call assert_equal('"map <Left>', getreg(':'))
++ call feedkeys(":map <A-Left>\<Tab>\<Home>\"\<CR>", 'xt')
++ call assert_equal('"map <A-Left>x', getreg(':'))
+ unmap ,f
+ unmap ,g
++ unmap <Left>
++ unmap <A-Left>x
+
+ set cpo-=< cpo-=B cpo-=k
+ map <Left> left
+ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <Left>', getreg(':'))
++ call feedkeys(":map <M\<Tab>\<Home>\"\<CR>", 'xt')
++ call assert_equal('"map <M', getreg(':'))
+ unmap <Left>
+
+ set cpo+=<
+***************
+*** 113,118 ****
+--- 125,133 ----
+ call assert_equal('"map <Left>', getreg(':'))
+ unmap <Left>
+ set cpo-=k
++
++ unmap <Middle>x
++ set cpo&vim
+ endfunc
+
+ func Test_match_completion()
+*** ../vim-8.1.1251/src/version.c 2019-05-03 15:13:53.758898729 +0200
+--- src/version.c 2019-05-03 16:05:19.257792890 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1252,
+ /**/
+
+--
+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.1253 b/data/vim/patches/8.1.1253
new file mode 100644
index 000000000..6e0b26973
--- /dev/null
+++ b/data/vim/patches/8.1.1253
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1253
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1253 (after 8.1.1252)
+Problem: Mapping completion test fails.
+Solution: Fix expected output.
+Files: src/testdir/test_cmdline.vim
+
+
+*** ../vim-8.1.1252/src/testdir/test_cmdline.vim 2019-05-03 16:05:37.557690929 +0200
+--- src/testdir/test_cmdline.vim 2019-05-03 16:48:18.962818667 +0200
+***************
+*** 91,97 ****
+ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <Left>', getreg(':'))
+ call feedkeys(":map <A-Left>\<Tab>\<Home>\"\<CR>", 'xt')
+! call assert_equal('"map <A-Left>x', getreg(':'))
+ unmap ,f
+ unmap ,g
+ unmap <Left>
+--- 91,97 ----
+ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <Left>', getreg(':'))
+ call feedkeys(":map <A-Left>\<Tab>\<Home>\"\<CR>", 'xt')
+! call assert_equal("\"map <A-Left>\<Tab>", getreg(':'))
+ unmap ,f
+ unmap ,g
+ unmap <Left>
+***************
+*** 102,108 ****
+ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <Left>', getreg(':'))
+ call feedkeys(":map <M\<Tab>\<Home>\"\<CR>", 'xt')
+! call assert_equal('"map <M', getreg(':'))
+ unmap <Left>
+
+ set cpo+=<
+--- 102,108 ----
+ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <Left>', getreg(':'))
+ call feedkeys(":map <M\<Tab>\<Home>\"\<CR>", 'xt')
+! call assert_equal("\"map <M\<Tab>", getreg(':'))
+ unmap <Left>
+
+ set cpo+=<
+*** ../vim-8.1.1252/src/version.c 2019-05-03 16:05:37.557690929 +0200
+--- src/version.c 2019-05-03 16:49:04.418559979 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1253,
+ /**/
+
+--
+In Africa some of the native tribes have a custom of beating the ground
+with clubs and uttering spine chilling cries. Anthropologists call
+this a form of primitive self-expression. In America we call it golf.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1254 b/data/vim/patches/8.1.1254
new file mode 100644
index 000000000..da82f8eaa
--- /dev/null
+++ b/data/vim/patches/8.1.1254
@@ -0,0 +1,99 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1254
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1254
+Problem: Mapping completion contains dead code.
+Solution: Remove the code.
+Files: src/term.c, src/testdir/test_cmdline.vim
+
+
+*** ../vim-8.1.1253/src/term.c 2019-05-03 15:13:53.758898729 +0200
+--- src/term.c 2019-05-03 21:01:34.992552621 +0200
+***************
+*** 6649,6655 ****
+ int modifiers;
+ int cpo_bslash;
+ int cpo_special;
+- int cpo_keycode;
+
+ ga_init(&ga);
+ ga.ga_itemsize = 1;
+--- 6649,6654 ----
+***************
+*** 6657,6663 ****
+
+ cpo_bslash = (vim_strchr(p_cpo, CPO_BSLASH) != NULL);
+ cpo_special = (vim_strchr(p_cpo, CPO_SPECI) != NULL);
+- cpo_keycode = (vim_strchr(p_cpo, CPO_KEYCODE) == NULL);
+
+ for (; *str; ++str)
+ {
+--- 6656,6661 ----
+***************
+*** 6671,6692 ****
+ modifiers = *++str;
+ c = *++str;
+ }
+- if (cpo_special && cpo_keycode && c == K_SPECIAL && !modifiers)
+- {
+- int i;
+-
+- /* try to find special key in termcodes */
+- for (i = 0; i < tc_len; ++i)
+- if (termcodes[i].name[0] == str[1]
+- && termcodes[i].name[1] == str[2])
+- break;
+- if (i < tc_len)
+- {
+- ga_concat(&ga, termcodes[i].code);
+- str += 2;
+- continue; /* for (str) */
+- }
+- }
+ if (c == K_SPECIAL && str[1] != NUL && str[2] != NUL)
+ {
+ if (cpo_special)
+--- 6669,6674 ----
+*** ../vim-8.1.1253/src/testdir/test_cmdline.vim 2019-05-03 16:49:21.542462554 +0200
+--- src/testdir/test_cmdline.vim 2019-05-03 21:00:30.172928333 +0200
+***************
+*** 107,115 ****
+--- 107,120 ----
+
+ set cpo+=<
+ map <Left> left
++ exe "set t_k6=\<Esc>[17~"
++ call feedkeys(":map \<Esc>[17~x f6x\<CR>", 'xt')
+ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <Left>', getreg(':'))
++ call feedkeys(":map \<Esc>[17~\<Tab>\<Home>\"\<CR>", 'xt')
++ call assert_equal("\"map <F6>x", getreg(':'))
+ unmap <Left>
++ call feedkeys(":unmap \<Esc>[17~x\<CR>", 'xt')
+ set cpo-=<
+
+ set cpo+=B
+*** ../vim-8.1.1253/src/version.c 2019-05-03 16:49:21.542462554 +0200
+--- src/version.c 2019-05-03 21:02:33.692214847 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1254,
+ /**/
+
+--
+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.1255 b/data/vim/patches/8.1.1255
new file mode 100644
index 000000000..f14dd57c6
--- /dev/null
+++ b/data/vim/patches/8.1.1255
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1255
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1255
+Problem: Building desktop files fails on FreeBSD. (Adam Weinberger)
+Solution: Avoid using non-portable construct in Makefile. (closes #4332)
+Files: src/po/Makefile
+
+
+*** ../vim-8.1.1254/src/po/Makefile 2019-04-30 21:27:30.943623715 +0200
+--- src/po/Makefile 2019-05-03 21:08:46.310110828 +0200
+***************
+*** 165,173 ****
+ po/gvim.desktop.in po/vim.desktop.in
+ mv -f ../$(PACKAGE).po $(PACKAGE).pot
+
+! %.desktop: %.desktop.in $(POFILES)
+ @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+! $(MSGFMT) --desktop -d . --template $< -o $@
+
+ update-po: $(LANGUAGES)
+
+--- 165,177 ----
+ po/gvim.desktop.in po/vim.desktop.in
+ mv -f ../$(PACKAGE).po $(PACKAGE).pot
+
+! vim.desktop: vim.desktop.in $(POFILES)
+ @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+! $(MSGFMT) --desktop -d . --template vim.desktop.in -o vim.desktop
+!
+! gvim.desktop: gvim.desktop.in $(POFILES)
+! @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+! $(MSGFMT) --desktop -d . --template gvim.desktop.in -o gvim.desktop
+
+ update-po: $(LANGUAGES)
+
+*** ../vim-8.1.1254/src/version.c 2019-05-03 21:10:32.261521512 +0200
+--- src/version.c 2019-05-03 21:19:26.910579303 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1255,
+ /**/
+
+--
+TIM: That is not an ordinary rabbit ... 'tis the most foul cruel and
+ bad-tempered thing you ever set eyes on.
+ROBIN: You tit. I soiled my armour I was so scared!
+ "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.1256 b/data/vim/patches/8.1.1256
new file mode 100644
index 000000000..cee4de207
--- /dev/null
+++ b/data/vim/patches/8.1.1256
@@ -0,0 +1,810 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1256
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1256
+Problem: Cannot navigate through errors relative to the cursor.
+Solution: Add :cabove, :cbelow, :labove and :lbelow. (Yegappan Lakshmanan,
+ closes #4316)
+Files: runtime/doc/index.txt, runtime/doc/quickfix.txt, src/ex_cmdidxs.h,
+ src/ex_cmds.h, src/ex_docmd.c, src/proto/quickfix.pro,
+ src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.1255/runtime/doc/index.txt 2019-04-27 20:36:52.526303597 +0200
+--- runtime/doc/index.txt 2019-05-03 21:35:09.162087906 +0200
+***************
+*** 1140,1150 ****
+--- 1192,1204 ----
+ |:cNfile| :cNf[ile] go to last error in previous file
+ |:cabbrev| :ca[bbrev] like ":abbreviate" but for Command-line mode
+ |:cabclear| :cabc[lear] clear all abbreviations for Command-line mode
++ |:cabove| :cabo[ve] go to error above current line
+ |:caddbuffer| :cad[dbuffer] add errors from buffer
+ |:caddexpr| :cadde[xpr] add errors from expr
+ |:caddfile| :caddf[ile] add error message to current quickfix list
+ |:call| :cal[l] call a function
+ |:catch| :cat[ch] part of a :try command
++ |:cbelow| :cbe[low] got to error below current line
+ |:cbottom| :cbo[ttom] scroll to the bottom of the quickfix window
+ |:cbuffer| :cb[uffer] parse error messages and jump to first error
+ |:cc| :cc go to specific error
+***************
+*** 1302,1313 ****
+--- 1356,1369 ----
+ |:lNext| :lN[ext] go to previous entry in location list
+ |:lNfile| :lNf[ile] go to last entry in previous file
+ |:list| :l[ist] print lines
++ |:labove| :lab[ove] go to location above current line
+ |:laddexpr| :lad[dexpr] add locations from expr
+ |:laddbuffer| :laddb[uffer] add locations from buffer
+ |:laddfile| :laddf[ile] add locations to current location list
+ |:last| :la[st] go to the last file in the argument list
+ |:language| :lan[guage] set the language (locale)
+ |:later| :lat[er] go to newer change, redo
++ |:lbelow| :lbe[low] go to location below current line
+ |:lbottom| :lbo[ttom] scroll to the bottom of the location window
+ |:lbuffer| :lb[uffer] parse locations and jump to first location
+ |:lcd| :lc[d] change directory locally
+--- 1703,1708 ----
+*** ../vim-8.1.1255/runtime/doc/quickfix.txt 2019-03-17 16:39:01.566006172 +0100
+--- runtime/doc/quickfix.txt 2019-05-03 21:35:09.166087887 +0200
+***************
+*** 123,128 ****
+--- 123,158 ----
+ list for the current window is used instead of the
+ quickfix list.
+
++ *:cabo* *:cabove*
++ :[count]cabo[ve] Go to the [count] error above the current line in the
++ current buffer. If [count] is omitted, then 1 is
++ used. If there are no errors, then an error message
++ is displayed. Assumes that the entries in a quickfix
++ list are sorted by their buffer number and line
++ number. If there are multiple errors on the same line,
++ then only the first entry is used. If [count] exceeds
++ the number of entries above the current line, then the
++ first error in the file is selected.
++
++ *:lab* *:labove*
++ :[count]lab[ove] Same as ":cabove", except the location list for the
++ current window is used instead of the quickfix list.
++
++ *:cbe* *:cbelow*
++ :[count]cbe[low] Go to the [count] error below the current line in the
++ current buffer. If [count] is omitted, then 1 is
++ used. If there are no errors, then an error message
++ is displayed. Assumes that the entries in a quickfix
++ list are sorted by their buffer number and line
++ number. If there are multiple errors on the same
++ line, then only the first entry is used. If [count]
++ exceeds the number of entries below the current line,
++ then the last error in the file is selected.
++
++ *:lbe* *:lbelow*
++ :[count]lbe[low] Same as ":cbelow", except the location list for the
++ current window is used instead of the quickfix list.
++
+ *:cnf* *:cnfile*
+ :[count]cnf[ile][!] Display the first error in the [count] next file in
+ the list that includes a file name. If there are no
+*** ../vim-8.1.1255/src/ex_cmdidxs.h 2019-04-27 20:36:52.530303581 +0200
+--- src/ex_cmdidxs.h 2019-05-03 21:42:06.720008024 +0200
+***************
+*** 8,36 ****
+ /* a */ 0,
+ /* b */ 19,
+ /* c */ 42,
+! /* d */ 103,
+! /* e */ 125,
+! /* f */ 145,
+! /* g */ 161,
+! /* h */ 167,
+! /* i */ 176,
+! /* j */ 194,
+! /* k */ 196,
+! /* l */ 201,
+! /* m */ 259,
+! /* n */ 277,
+! /* o */ 297,
+! /* p */ 309,
+! /* q */ 348,
+! /* r */ 351,
+! /* s */ 371,
+! /* t */ 439,
+! /* u */ 484,
+! /* v */ 495,
+! /* w */ 513,
+! /* x */ 527,
+! /* y */ 536,
+! /* z */ 537
+ };
+
+ /*
+--- 8,36 ----
+ /* a */ 0,
+ /* b */ 19,
+ /* c */ 42,
+! /* d */ 105,
+! /* e */ 127,
+! /* f */ 147,
+! /* g */ 163,
+! /* h */ 169,
+! /* i */ 178,
+! /* j */ 196,
+! /* k */ 198,
+! /* l */ 203,
+! /* m */ 263,
+! /* n */ 281,
+! /* o */ 301,
+! /* p */ 313,
+! /* q */ 352,
+! /* r */ 355,
+! /* s */ 375,
+! /* t */ 443,
+! /* u */ 488,
+! /* v */ 499,
+! /* w */ 517,
+! /* x */ 531,
+! /* y */ 540,
+! /* z */ 541
+ };
+
+ /*
+***************
+*** 43,49 ****
+ { /* a b c d e f g h i j k l m n o p q r s t u v w x y z */
+ /* a */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 0, 0, 0, 7, 15, 0, 16, 0, 0, 0, 0, 0 },
+ /* b */ { 2, 0, 0, 4, 5, 7, 0, 0, 0, 0, 0, 8, 9, 10, 11, 12, 0, 13, 0, 0, 0, 0, 22, 0, 0, 0 },
+! /* c */ { 3, 10, 12, 14, 16, 18, 21, 0, 0, 0, 0, 29, 33, 36, 42, 51, 53, 54, 55, 0, 57, 0, 60, 0, 0, 0 },
+ /* d */ { 0, 0, 0, 0, 0, 0, 0, 0, 6, 15, 0, 16, 0, 0, 17, 0, 0, 19, 20, 0, 0, 0, 0, 0, 0, 0 },
+ /* e */ { 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0 },
+ /* f */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0 },
+--- 43,49 ----
+ { /* a b c d e f g h i j k l m n o p q r s t u v w x y z */
+ /* a */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 0, 0, 0, 7, 15, 0, 16, 0, 0, 0, 0, 0 },
+ /* b */ { 2, 0, 0, 4, 5, 7, 0, 0, 0, 0, 0, 8, 9, 10, 11, 12, 0, 13, 0, 0, 0, 0, 22, 0, 0, 0 },
+! /* c */ { 3, 11, 14, 16, 18, 20, 23, 0, 0, 0, 0, 31, 35, 38, 44, 53, 55, 56, 57, 0, 59, 0, 62, 0, 0, 0 },
+ /* d */ { 0, 0, 0, 0, 0, 0, 0, 0, 6, 15, 0, 16, 0, 0, 17, 0, 0, 19, 20, 0, 0, 0, 0, 0, 0, 0 },
+ /* e */ { 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0 },
+ /* f */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0 },
+***************
+*** 52,58 ****
+ /* i */ { 1, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 5, 6, 0, 0, 0, 0, 0, 13, 0, 15, 0, 0, 0, 0, 0 },
+ /* j */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
+ /* k */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+! /* l */ { 3, 9, 11, 15, 16, 20, 23, 28, 0, 0, 0, 30, 33, 36, 40, 46, 0, 48, 57, 49, 50, 54, 56, 0, 0, 0 },
+ /* m */ { 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 },
+ /* n */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 10, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0 },
+ /* o */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 0, 0, 0, 0, 0, 0, 9, 0, 11, 0, 0, 0 },
+--- 52,58 ----
+ /* i */ { 1, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 5, 6, 0, 0, 0, 0, 0, 13, 0, 15, 0, 0, 0, 0, 0 },
+ /* j */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
+ /* k */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+! /* l */ { 3, 10, 13, 17, 18, 22, 25, 30, 0, 0, 0, 32, 35, 38, 42, 48, 0, 50, 59, 51, 52, 56, 58, 0, 0, 0 },
+ /* m */ { 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 },
+ /* n */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 10, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0 },
+ /* o */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 0, 0, 0, 0, 0, 0, 9, 0, 11, 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 = 550;
+--- 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 = 554;
+*** ../vim-8.1.1255/src/ex_cmds.h 2019-05-01 18:08:38.263237252 +0200
+--- src/ex_cmds.h 2019-05-03 21:43:59.707432410 +0200
+***************
+*** 252,257 ****
+--- 252,260 ----
+ EX(CMD_cabclear, "cabclear", ex_abclear,
+ EXTRA|TRLBAR|CMDWIN,
+ ADDR_NONE),
++ EX(CMD_cabove, "cabove", ex_cbelow,
++ RANGE|TRLBAR,
++ ADDR_OTHER),
+ EX(CMD_caddbuffer, "caddbuffer", ex_cbuffer,
+ RANGE|WORD1|TRLBAR,
+ ADDR_OTHER),
+***************
+*** 270,275 ****
+--- 273,281 ----
+ EX(CMD_cbuffer, "cbuffer", ex_cbuffer,
+ BANG|RANGE|WORD1|TRLBAR,
+ ADDR_OTHER),
++ EX(CMD_cbelow, "cbelow", ex_cbelow,
++ RANGE|TRLBAR,
++ ADDR_OTHER),
+ EX(CMD_cbottom, "cbottom", ex_cbottom,
+ TRLBAR,
+ ADDR_NONE),
+***************
+*** 726,731 ****
+--- 732,740 ----
+ EX(CMD_last, "last", ex_last,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_NONE),
++ EX(CMD_labove, "labove", ex_cbelow,
++ RANGE|TRLBAR,
++ ADDR_OTHER),
+ EX(CMD_language, "language", ex_language,
+ EXTRA|TRLBAR|CMDWIN,
+ ADDR_NONE),
+***************
+*** 744,749 ****
+--- 753,761 ----
+ EX(CMD_lbuffer, "lbuffer", ex_cbuffer,
+ BANG|RANGE|WORD1|TRLBAR,
+ ADDR_OTHER),
++ EX(CMD_lbelow, "lbelow", ex_cbelow,
++ RANGE|TRLBAR,
++ ADDR_OTHER),
+ EX(CMD_lbottom, "lbottom", ex_cbottom,
+ TRLBAR,
+ ADDR_NONE),
+*** ../vim-8.1.1255/src/ex_docmd.c 2019-05-01 21:43:39.076257243 +0200
+--- src/ex_docmd.c 2019-05-03 21:35:09.166087887 +0200
+***************
+*** 56,61 ****
+--- 56,62 ----
+ # define ex_cbuffer ex_ni
+ # define ex_cc ex_ni
+ # define ex_cnext ex_ni
++ # define ex_cbelow ex_ni
+ # define ex_cfile ex_ni
+ # define qf_list ex_ni
+ # define qf_age ex_ni
+*** ../vim-8.1.1255/src/proto/quickfix.pro 2019-02-05 21:23:00.600559169 +0100
+--- src/proto/quickfix.pro 2019-05-03 21:35:09.166087887 +0200
+***************
+*** 23,28 ****
+--- 23,29 ----
+ int qf_get_cur_valid_idx(exarg_T *eap);
+ void ex_cc(exarg_T *eap);
+ void ex_cnext(exarg_T *eap);
++ void ex_cbelow(exarg_T *eap);
+ void ex_cfile(exarg_T *eap);
+ void ex_vimgrep(exarg_T *eap);
+ int get_errorlist(qf_info_T *qi_arg, win_T *wp, int qf_idx, list_T *list);
+*** ../vim-8.1.1255/src/quickfix.c 2019-05-02 20:17:29.318924421 +0200
+--- src/quickfix.c 2019-05-03 21:35:09.166087887 +0200
+***************
+*** 177,182 ****
+--- 177,183 ----
+ static void wipe_dummy_buffer(buf_T *buf, char_u *dirname_start);
+ static void unload_dummy_buffer(buf_T *buf, char_u *dirname_start);
+ static qf_info_T *ll_get_or_alloc_list(win_T *);
++ static char_u *e_no_more_items = (char_u *)N_("E553: No more items");
+
+ // Quickfix window check helper macro
+ #define IS_QF_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref == NULL)
+***************
+*** 1494,1499 ****
+--- 1495,1510 ----
+ }
+
+ /*
++ * Returns TRUE if the specified quickfix/location list is not empty and
++ * has valid entries.
++ */
++ static int
++ qf_list_has_valid_entries(qf_list_T *qfl)
++ {
++ return !qf_list_empty(qfl) && !qfl->qf_nonevalid;
++ }
++
++ /*
+ * Return a pointer to a list in the specified quickfix stack
+ */
+ static qf_list_T *
+***************
+*** 2700,2706 ****
+ 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");
+ char_u *err = e_no_more_items;
+
+ while (errornr--)
+--- 2711,2716 ----
+***************
+*** 4886,4892 ****
+ qfp = qfl->qf_start;
+
+ // check if the list has valid errors
+! if (qfl->qf_count <= 0 || qfl->qf_nonevalid)
+ return 1;
+
+ for (i = 1; i <= qfl->qf_index && qfp!= NULL; i++, qfp = qfp->qf_next)
+--- 4896,4902 ----
+ qfp = qfl->qf_start;
+
+ // check if the list has valid errors
+! if (!qf_list_has_valid_entries(qfl))
+ return 1;
+
+ for (i = 1; i <= qfl->qf_index && qfp!= NULL; i++, qfp = qfp->qf_next)
+***************
+*** 4924,4930 ****
+ int prev_fnum = 0;
+
+ // check if the list has valid errors
+! if (qfl->qf_count <= 0 || qfl->qf_nonevalid)
+ return 1;
+
+ eidx = 0;
+--- 4934,4940 ----
+ int prev_fnum = 0;
+
+ // check if the list has valid errors
+! if (!qf_list_has_valid_entries(qfl))
+ return 1;
+
+ eidx = 0;
+***************
+*** 5045,5050 ****
+--- 5055,5355 ----
+ }
+
+ /*
++ * Find the first entry in the quickfix list 'qfl' from buffer 'bnr'.
++ * The index of the entry is stored in 'errornr'.
++ * Returns NULL if an entry is not found.
++ */
++ static qfline_T *
++ qf_find_first_entry_in_buf(qf_list_T *qfl, int bnr, int *errornr)
++ {
++ qfline_T *qfp = NULL;
++ int idx = 0;
++
++ // Find the first entry in this file
++ FOR_ALL_QFL_ITEMS(qfl, qfp, idx)
++ if (qfp->qf_fnum == bnr)
++ break;
++
++ *errornr = idx;
++ return qfp;
++ }
++
++ /*
++ * Find the first quickfix entry on the same line as 'entry'. Updates 'errornr'
++ * with the error number for the first entry. Assumes the entries are sorted in
++ * the quickfix list by line number.
++ */
++ static qfline_T *
++ qf_find_first_entry_on_line(qfline_T *entry, int *errornr)
++ {
++ while (!got_int
++ && entry->qf_prev != NULL
++ && entry->qf_fnum == entry->qf_prev->qf_fnum
++ && entry->qf_lnum == entry->qf_prev->qf_lnum)
++ {
++ entry = entry->qf_prev;
++ --*errornr;
++ }
++
++ return entry;
++ }
++
++ /*
++ * Find the last quickfix entry on the same line as 'entry'. Updates 'errornr'
++ * with the error number for the last entry. Assumes the entries are sorted in
++ * the quickfix list by line number.
++ */
++ static qfline_T *
++ qf_find_last_entry_on_line(qfline_T *entry, int *errornr)
++ {
++ while (!got_int &&
++ entry->qf_next != NULL
++ && entry->qf_fnum == entry->qf_next->qf_fnum
++ && entry->qf_lnum == entry->qf_next->qf_lnum)
++ {
++ entry = entry->qf_next;
++ ++*errornr;
++ }
++
++ return entry;
++ }
++
++ /*
++ * Find the first quickfix entry below line 'lnum' in buffer 'bnr'.
++ * 'qfp' points to the very first entry in the buffer and 'errornr' is the
++ * index of the very first entry in the quickfix list.
++ * Returns NULL if an entry is not found after 'lnum'.
++ */
++ static qfline_T *
++ qf_find_entry_on_next_line(
++ int bnr,
++ linenr_T lnum,
++ qfline_T *qfp,
++ int *errornr)
++ {
++ if (qfp->qf_lnum > lnum)
++ // First entry is after line 'lnum'
++ return qfp;
++
++ // Find the entry just before or at the line 'lnum'
++ while (qfp->qf_next != NULL
++ && qfp->qf_next->qf_fnum == bnr
++ && qfp->qf_next->qf_lnum <= lnum)
++ {
++ qfp = qfp->qf_next;
++ ++*errornr;
++ }
++
++ if (qfp->qf_next == NULL || qfp->qf_next->qf_fnum != bnr)
++ // No entries found after 'lnum'
++ return NULL;
++
++ // Use the entry just after line 'lnum'
++ qfp = qfp->qf_next;
++ ++*errornr;
++
++ return qfp;
++ }
++
++ /*
++ * Find the first quickfix entry before line 'lnum' in buffer 'bnr'.
++ * 'qfp' points to the very first entry in the buffer and 'errornr' is the
++ * index of the very first entry in the quickfix list.
++ * Returns NULL if an entry is not found before 'lnum'.
++ */
++ static qfline_T *
++ qf_find_entry_on_prev_line(
++ int bnr,
++ linenr_T lnum,
++ qfline_T *qfp,
++ int *errornr)
++ {
++ // Find the entry just before the line 'lnum'
++ while (qfp->qf_next != NULL
++ && qfp->qf_next->qf_fnum == bnr
++ && qfp->qf_next->qf_lnum < lnum)
++ {
++ qfp = qfp->qf_next;
++ ++*errornr;
++ }
++
++ if (qfp->qf_lnum >= lnum) // entry is after 'lnum'
++ return NULL;
++
++ // If multiple entries are on the same line, then use the first entry
++ qfp = qf_find_first_entry_on_line(qfp, errornr);
++
++ return qfp;
++ }
++
++ /*
++ * Find a quickfix entry in 'qfl' closest to line 'lnum' in buffer 'bnr' in
++ * the direction 'dir'.
++ */
++ static qfline_T *
++ qf_find_closest_entry(
++ qf_list_T *qfl,
++ int bnr,
++ linenr_T lnum,
++ int dir,
++ int *errornr)
++ {
++ qfline_T *qfp;
++
++ *errornr = 0;
++
++ // Find the first entry in this file
++ qfp = qf_find_first_entry_in_buf(qfl, bnr, errornr);
++ if (qfp == NULL)
++ return NULL; // no entry in this file
++
++ if (dir == FORWARD)
++ qfp = qf_find_entry_on_next_line(bnr, lnum, qfp, errornr);
++ else
++ qfp = qf_find_entry_on_prev_line(bnr, lnum, qfp, errornr);
++
++ return qfp;
++ }
++
++ /*
++ * Get the nth quickfix entry below the specified entry treating multiple
++ * entries on a single line as one. Searches forward in the list.
++ */
++ static qfline_T *
++ qf_get_nth_below_entry(qfline_T *entry, int *errornr, int n)
++ {
++ while (n-- > 0 && !got_int)
++ {
++ qfline_T *first_entry = entry;
++ int first_errornr = *errornr;
++
++ // Treat all the entries on the same line in this file as one
++ entry = qf_find_last_entry_on_line(entry, errornr);
++
++ if (entry->qf_next == NULL
++ || entry->qf_next->qf_fnum != entry->qf_fnum)
++ {
++ // If multiple entries are on the same line, then use the first
++ // entry
++ entry = first_entry;
++ *errornr = first_errornr;
++ break;
++ }
++
++ entry = entry->qf_next;
++ ++*errornr;
++ }
++
++ return entry;
++ }
++
++ /*
++ * Get the nth quickfix entry above the specified entry treating multiple
++ * entries on a single line as one. Searches backwards in the list.
++ */
++ static qfline_T *
++ qf_get_nth_above_entry(qfline_T *entry, int *errornr, int n)
++ {
++ while (n-- > 0 && !got_int)
++ {
++ if (entry->qf_prev == NULL
++ || entry->qf_prev->qf_fnum != entry->qf_fnum)
++ break;
++
++ entry = entry->qf_prev;
++ --*errornr;
++
++ // If multiple entries are on the same line, then use the first entry
++ entry = qf_find_first_entry_on_line(entry, errornr);
++ }
++
++ return entry;
++ }
++
++ /*
++ * Find the n'th quickfix entry adjacent to line 'lnum' in buffer 'bnr' in the
++ * specified direction.
++ * Returns the error number in the quickfix list or 0 if an entry is not found.
++ */
++ static int
++ qf_find_nth_adj_entry(qf_list_T *qfl, int bnr, linenr_T lnum, int n, int dir)
++ {
++ qfline_T *adj_entry;
++ int errornr;
++
++ // Find an entry closest to the specified line
++ adj_entry = qf_find_closest_entry(qfl, bnr, lnum, dir, &errornr);
++ if (adj_entry == NULL)
++ return 0;
++
++ if (--n > 0)
++ {
++ // Go to the n'th entry in the current buffer
++ if (dir == FORWARD)
++ adj_entry = qf_get_nth_below_entry(adj_entry, &errornr, n);
++ else
++ adj_entry = qf_get_nth_above_entry(adj_entry, &errornr, n);
++ }
++
++ return errornr;
++ }
++
++ /*
++ * Jump to a quickfix entry in the current file nearest to the current line.
++ * ":cabove", ":cbelow", ":labove" and ":lbelow" commands
++ */
++ void
++ ex_cbelow(exarg_T *eap)
++ {
++ qf_info_T *qi;
++ qf_list_T *qfl;
++ int dir;
++ int buf_has_flag;
++ int errornr = 0;
++
++ if (eap->addr_count > 0 && eap->line2 <= 0)
++ {
++ emsg(_(e_invrange));
++ return;
++ }
++
++ // Check whether the current buffer has any quickfix entries
++ if (eap->cmdidx == CMD_cabove || eap->cmdidx == CMD_cbelow)
++ buf_has_flag = BUF_HAS_QF_ENTRY;
++ else
++ buf_has_flag = BUF_HAS_LL_ENTRY;
++ if (!(curbuf->b_has_qf_entry & buf_has_flag))
++ {
++ emsg(_(e_quickfix));
++ return;
++ }
++
++ if ((qi = qf_cmd_get_stack(eap, TRUE)) == NULL)
++ return;
++
++ qfl = qf_get_curlist(qi);
++ // check if the list has valid errors
++ if (!qf_list_has_valid_entries(qfl))
++ {
++ emsg(_(e_quickfix));
++ return;
++ }
++
++ if (eap->cmdidx == CMD_cbelow || eap->cmdidx == CMD_lbelow)
++ dir = FORWARD;
++ else
++ dir = BACKWARD;
++
++ errornr = qf_find_nth_adj_entry(qfl, curbuf->b_fnum, curwin->w_cursor.lnum,
++ eap->addr_count > 0 ? eap->line2 : 0, dir);
++
++ if (errornr > 0)
++ qf_jump(qi, 0, errornr, FALSE);
++ else
++ emsg(_(e_no_more_items));
++ }
++
++ /*
+ * Return the autocmd name for the :cfile Ex commands
+ */
+ static char_u *
+*** ../vim-8.1.1255/src/testdir/test_quickfix.vim 2019-05-02 20:17:29.322924398 +0200
+--- src/testdir/test_quickfix.vim 2019-05-03 21:48:52.249927300 +0200
+***************
+*** 37,42 ****
+--- 37,44 ----
+ command! -nargs=* Xgrepadd <mods> grepadd <args>
+ command! -nargs=* Xhelpgrep helpgrep <args>
+ command! -nargs=0 -count Xcc <count>cc
++ command! -count=1 -nargs=0 Xbelow <mods><count>cbelow
++ command! -count=1 -nargs=0 Xabove <mods><count>cabove
+ let g:Xgetlist = function('getqflist')
+ let g:Xsetlist = function('setqflist')
+ call setqflist([], 'f')
+***************
+*** 70,75 ****
+--- 72,79 ----
+ command! -nargs=* Xgrepadd <mods> lgrepadd <args>
+ command! -nargs=* Xhelpgrep lhelpgrep <args>
+ command! -nargs=0 -count Xcc <count>ll
++ command! -count=1 -nargs=0 Xbelow <mods><count>lbelow
++ command! -count=1 -nargs=0 Xabove <mods><count>labove
+ let g:Xgetlist = function('getloclist', [0])
+ let g:Xsetlist = function('setloclist', [0])
+ call setloclist(0, [], 'f')
+***************
+*** 4035,4037 ****
+--- 4039,4147 ----
+ enew
+ call delete('Xfile1')
+ endfunc
++
++ " Test for the :cbelow, :cabove, :lbelow and :labove commands.
++ func Xtest_below(cchar)
++ call s:setup_commands(a:cchar)
++
++ " No quickfix/location list
++ call assert_fails('Xbelow', 'E42:')
++ call assert_fails('Xabove', 'E42:')
++
++ " Empty quickfix/location list
++ call g:Xsetlist([])
++ call assert_fails('Xbelow', 'E42:')
++ call assert_fails('Xabove', 'E42:')
++
++ call s:create_test_file('X1')
++ call s:create_test_file('X2')
++ call s:create_test_file('X3')
++ call s:create_test_file('X4')
++
++ " Invalid entries
++ edit X1
++ call g:Xsetlist(["E1", "E2"])
++ call assert_fails('Xbelow', 'E42:')
++ call assert_fails('Xabove', 'E42:')
++ call assert_fails('3Xbelow', 'E42:')
++ call assert_fails('4Xabove', 'E42:')
++
++ " Test the commands with various arguments
++ Xexpr ["X1:5:L5", "X2:5:L5", "X2:10:L10", "X2:15:L15", "X3:3:L3"]
++ edit +7 X2
++ Xabove
++ call assert_equal(['X2', 5], [bufname(''), line('.')])
++ call assert_fails('Xabove', 'E553:')
++ normal 2j
++ Xbelow
++ call assert_equal(['X2', 10], [bufname(''), line('.')])
++ " Last error in this file
++ Xbelow 99
++ call assert_equal(['X2', 15], [bufname(''), line('.')])
++ call assert_fails('Xbelow', 'E553:')
++ " First error in this file
++ Xabove 99
++ call assert_equal(['X2', 5], [bufname(''), line('.')])
++ call assert_fails('Xabove', 'E553:')
++ normal gg
++ Xbelow 2
++ call assert_equal(['X2', 10], [bufname(''), line('.')])
++ normal G
++ Xabove 2
++ call assert_equal(['X2', 10], [bufname(''), line('.')])
++ edit X4
++ call assert_fails('Xabove', 'E42:')
++ call assert_fails('Xbelow', 'E42:')
++ if a:cchar == 'l'
++ " If a buffer has location list entries from some other window but not
++ " from the current window, then the commands should fail.
++ edit X1 | split | call setloclist(0, [], 'f')
++ call assert_fails('Xabove', 'E776:')
++ call assert_fails('Xbelow', 'E776:')
++ close
++ endif
++
++ " Test for lines with multiple quickfix entries
++ Xexpr ["X1:5:L5", "X2:5:1:L5_1", "X2:5:2:L5_2", "X2:5:3:L5_3",
++ \ "X2:10:1:L10_1", "X2:10:2:L10_2", "X2:10:3:L10_3",
++ \ "X2:15:1:L15_1", "X2:15:2:L15_2", "X2:15:3:L15_3", "X3:3:L3"]
++ edit +1 X2
++ Xbelow 2
++ call assert_equal(['X2', 10, 1], [bufname(''), line('.'), col('.')])
++ normal gg
++ Xbelow 99
++ call assert_equal(['X2', 15, 1], [bufname(''), line('.'), col('.')])
++ normal G
++ Xabove 2
++ call assert_equal(['X2', 10, 1], [bufname(''), line('.'), col('.')])
++ normal G
++ Xabove 99
++ call assert_equal(['X2', 5, 1], [bufname(''), line('.'), col('.')])
++ normal 10G
++ Xabove
++ call assert_equal(['X2', 5, 1], [bufname(''), line('.'), col('.')])
++ normal 10G
++ Xbelow
++ call assert_equal(['X2', 15, 1], [bufname(''), line('.'), col('.')])
++
++ " Invalid range
++ if a:cchar == 'c'
++ call assert_fails('-2cbelow', 'E553:')
++ " TODO: should go to first error in the current line?
++ 0cabove
++ else
++ call assert_fails('-2lbelow', 'E553:')
++ " TODO: should go to first error in the current line?
++ 0labove
++ endif
++
++ call delete('X1')
++ call delete('X2')
++ call delete('X3')
++ call delete('X4')
++ endfunc
++
++ func Test_cbelow()
++ call Xtest_below('c')
++ call Xtest_below('l')
++ endfunc
+*** ../vim-8.1.1255/src/version.c 2019-05-03 21:19:58.926404208 +0200
+--- src/version.c 2019-05-03 21:35:46.089908080 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1256,
+ /**/
+
+--
+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.1257 b/data/vim/patches/8.1.1257
new file mode 100644
index 000000000..48a1f6d41
--- /dev/null
+++ b/data/vim/patches/8.1.1257
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1257
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1257
+Problem: MSVC: name of object directory now always right.
+Solution: Adjust comment. Don't use different directory for DIRECTX. Do
+ use different directory for USE_MSVCRT. (Ken Takata, closes #4333)
+Files: src/Make_mvc.mak
+
+
+*** ../vim-8.1.1256/src/Make_mvc.mak 2019-04-28 19:46:17.018060159 +0200
+--- src/Make_mvc.mak 2019-05-03 22:13:39.800841637 +0200
+***************
+*** 192,199 ****
+ DIRECTX = $(GUI)
+ !endif
+
+! # Select one of eight object code directories, depends on GUI, OLE, DEBUG and
+! # interfaces.
+ # If you change something else, do "make clean" first!
+ !if "$(VIMDLL)" == "yes"
+ OBJDIR = .\ObjD
+--- 192,198 ----
+ DIRECTX = $(GUI)
+ !endif
+
+! # Select a code directory, depends on GUI, OLE, DEBUG, interfaces and etc.
+ # If you change something else, do "make clean" first!
+ !if "$(VIMDLL)" == "yes"
+ OBJDIR = .\ObjD
+***************
+*** 202,208 ****
+ !else
+ OBJDIR = .\ObjC
+ !endif
+! !if "$(DIRECTX)" == "yes"
+ OBJDIR = $(OBJDIR)X
+ !endif
+ !if "$(OLE)" == "yes"
+--- 201,207 ----
+ !else
+ OBJDIR = .\ObjC
+ !endif
+! !if "$(DIRECTX)" == "yes" && "$(GUI)" == "yes"
+ OBJDIR = $(OBJDIR)X
+ !endif
+ !if "$(OLE)" == "yes"
+***************
+*** 229,234 ****
+--- 228,236 ----
+ !ifdef MZSCHEME
+ OBJDIR = $(OBJDIR)Z
+ !endif
++ !ifdef USE_MSVCRT
++ OBJDIR = $(OBJDIR)V
++ !endif
+ !if "$(DEBUG)" == "yes"
+ OBJDIR = $(OBJDIR)d
+ !endif
+*** ../vim-8.1.1256/src/version.c 2019-05-03 21:56:31.367540560 +0200
+--- src/version.c 2019-05-03 22:13:53.420759606 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1257,
+ /**/
+
+--
+ROBIN: The what?
+ARTHUR: The Holy Hand Grenade of Antioch. 'Tis one of the sacred relics
+ Brother Maynard always carries with him.
+ALL: Yes. Of course.
+ARTHUR: (shouting) Bring up the Holy Hand Grenade!
+ "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.1258 b/data/vim/patches/8.1.1258
new file mode 100644
index 000000000..8f91ab4bf
--- /dev/null
+++ b/data/vim/patches/8.1.1258
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1258
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1258
+Problem: The "N files to edit" message can not be surpressed.
+Solution: Surpress the message with --not-a-term. (closes #4320)
+Files: src/main.c
+
+
+*** ../vim-8.1.1257/src/main.c 2019-04-28 22:25:03.244480028 +0200
+--- src/main.c 2019-05-03 22:22:01.481884022 +0200
+***************
+*** 375,383 ****
+ setvbuf(stdout, NULL, _IOLBF, 0);
+ #endif
+
+! /* This message comes before term inits, but after setting "silent_mode"
+! * when the input is not a tty. */
+! if (GARGCOUNT > 1 && !silent_mode)
+ printf(_("%d files to edit\n"), GARGCOUNT);
+
+ if (params.want_full_screen && !silent_mode)
+--- 375,383 ----
+ setvbuf(stdout, NULL, _IOLBF, 0);
+ #endif
+
+! // This message comes before term inits, but after setting "silent_mode"
+! // when the input is not a tty. Omit the message with --not-a-term.
+! if (GARGCOUNT > 1 && !silent_mode && !is_not_a_term())
+ printf(_("%d files to edit\n"), GARGCOUNT);
+
+ if (params.want_full_screen && !silent_mode)
+*** ../vim-8.1.1257/src/version.c 2019-05-03 22:14:59.452363625 +0200
+--- src/version.c 2019-05-03 22:24:01.537189664 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1258,
+ /**/
+
+--
+An indication you must be a manager:
+You feel sorry for Dilbert's boss.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1259 b/data/vim/patches/8.1.1259
new file mode 100644
index 000000000..f6ff2b1fd
--- /dev/null
+++ b/data/vim/patches/8.1.1259
@@ -0,0 +1,273 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1259
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1259
+Problem: Crash when exiting early. (Ralf Schandl)
+Solution: Only pop/push the title when it was set. (closes #4334)
+Files: src/os_unix.c, src/misc2.c, src/usercmd.c, src/tag.c
+
+
+*** ../vim-8.1.1258/src/os_unix.c 2019-05-02 23:00:19.227658452 +0200
+--- src/os_unix.c 2019-05-03 22:56:29.021478366 +0200
+***************
+*** 2205,2218 ****
+ 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 */
+--- 2205,2223 ----
+ void
+ mch_restore_title(int which)
+ {
++ int do_push_pop = did_set_title || did_set_icon;
++
+ /* 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);
+
+! if (do_push_pop)
+! {
+! // pop and push from/to the stack
+! term_pop_title(which);
+! term_push_title(which);
+! }
+ }
+
+ #endif /* FEAT_TITLE */
+*** ../vim-8.1.1258/src/misc2.c 2019-04-28 19:46:17.030060105 +0200
+--- src/misc2.c 2019-05-03 23:12:59.332791168 +0200
+***************
+*** 1068,1074 ****
+
+ /* Close all tabs and windows. Reset 'equalalways' to avoid redraws. */
+ p_ea = FALSE;
+! if (first_tabpage->tp_next != NULL)
+ do_cmdline_cmd((char_u *)"tabonly!");
+ if (!ONE_WINDOW)
+ do_cmdline_cmd((char_u *)"only!");
+--- 1068,1074 ----
+
+ /* Close all tabs and windows. Reset 'equalalways' to avoid redraws. */
+ p_ea = FALSE;
+! if (first_tabpage != NULL && first_tabpage->tp_next != NULL)
+ do_cmdline_cmd((char_u *)"tabonly!");
+ if (!ONE_WINDOW)
+ do_cmdline_cmd((char_u *)"only!");
+***************
+*** 1085,1113 ****
+ // Clear user commands (before deleting buffers).
+ ex_comclear(NULL);
+
+ # ifdef FEAT_MENU
+! /* Clear menus. */
+! do_cmdline_cmd((char_u *)"aunmenu *");
+ # ifdef FEAT_MULTI_LANG
+! do_cmdline_cmd((char_u *)"menutranslate clear");
+ # endif
+ # endif
+!
+! /* Clear mappings, abbreviations, breakpoints. */
+! do_cmdline_cmd((char_u *)"lmapclear");
+! do_cmdline_cmd((char_u *)"xmapclear");
+! do_cmdline_cmd((char_u *)"mapclear");
+! do_cmdline_cmd((char_u *)"mapclear!");
+! do_cmdline_cmd((char_u *)"abclear");
+ # if defined(FEAT_EVAL)
+! do_cmdline_cmd((char_u *)"breakdel *");
+ # endif
+ # if defined(FEAT_PROFILE)
+! do_cmdline_cmd((char_u *)"profdel *");
+ # endif
+ # if defined(FEAT_KEYMAP)
+! do_cmdline_cmd((char_u *)"set keymap=");
+ #endif
+
+ # ifdef FEAT_TITLE
+ free_titles();
+--- 1085,1117 ----
+ // Clear user commands (before deleting buffers).
+ ex_comclear(NULL);
+
++ // When exiting from mainerr_arg_missing curbuf has not been initialized,
++ // and not much else.
++ if (curbuf != NULL)
++ {
+ # ifdef FEAT_MENU
+! // Clear menus.
+! do_cmdline_cmd((char_u *)"aunmenu *");
+ # ifdef FEAT_MULTI_LANG
+! do_cmdline_cmd((char_u *)"menutranslate clear");
+ # endif
+ # endif
+! // Clear mappings, abbreviations, breakpoints.
+! do_cmdline_cmd((char_u *)"lmapclear");
+! do_cmdline_cmd((char_u *)"xmapclear");
+! do_cmdline_cmd((char_u *)"mapclear");
+! do_cmdline_cmd((char_u *)"mapclear!");
+! do_cmdline_cmd((char_u *)"abclear");
+ # if defined(FEAT_EVAL)
+! do_cmdline_cmd((char_u *)"breakdel *");
+ # endif
+ # if defined(FEAT_PROFILE)
+! do_cmdline_cmd((char_u *)"profdel *");
+ # endif
+ # if defined(FEAT_KEYMAP)
+! do_cmdline_cmd((char_u *)"set keymap=");
+ #endif
++ }
+
+ # ifdef FEAT_TITLE
+ free_titles();
+***************
+*** 1142,1148 ****
+ set_expr_line(NULL);
+ # endif
+ # ifdef FEAT_DIFF
+! diff_clear(curtab);
+ # endif
+ clear_sb_text(TRUE); /* free any scrollback text */
+
+--- 1146,1153 ----
+ set_expr_line(NULL);
+ # endif
+ # ifdef FEAT_DIFF
+! if (curtab != NULL)
+! diff_clear(curtab);
+ # endif
+ clear_sb_text(TRUE); /* free any scrollback text */
+
+***************
+*** 1172,1188 ****
+ tabpage_T *tab;
+
+ qf_free_all(NULL);
+! /* Free all location lists */
+ FOR_ALL_TAB_WINDOWS(tab, win)
+ qf_free_all(win);
+ }
+ #endif
+
+! /* Close all script inputs. */
+ close_all_scripts();
+
+! /* Destroy all windows. Must come before freeing buffers. */
+! win_free_all();
+
+ /* Free all option values. Must come after closing windows. */
+ free_all_options();
+--- 1177,1194 ----
+ tabpage_T *tab;
+
+ qf_free_all(NULL);
+! // Free all location lists
+ FOR_ALL_TAB_WINDOWS(tab, win)
+ qf_free_all(win);
+ }
+ #endif
+
+! // Close all script inputs.
+ close_all_scripts();
+
+! if (curwin != NULL)
+! // Destroy all windows. Must come before freeing buffers.
+! win_free_all();
+
+ /* Free all option values. Must come after closing windows. */
+ free_all_options();
+***************
+*** 1223,1230 ****
+
+ reset_last_sourcing();
+
+! free_tabpage(first_tabpage);
+! first_tabpage = NULL;
+
+ # ifdef UNIX
+ /* Machine-specific free. */
+--- 1229,1239 ----
+
+ reset_last_sourcing();
+
+! if (first_tabpage != NULL)
+! {
+! free_tabpage(first_tabpage);
+! first_tabpage = NULL;
+! }
+
+ # ifdef UNIX
+ /* Machine-specific free. */
+*** ../vim-8.1.1258/src/usercmd.c 2019-05-01 18:08:38.267237229 +0200
+--- src/usercmd.c 2019-05-03 22:58:19.848831337 +0200
+***************
+*** 1045,1051 ****
+ ex_comclear(exarg_T *eap UNUSED)
+ {
+ uc_clear(&ucmds);
+! uc_clear(&curbuf->b_ucmds);
+ }
+
+ /*
+--- 1045,1052 ----
+ ex_comclear(exarg_T *eap UNUSED)
+ {
+ uc_clear(&ucmds);
+! if (curbuf != NULL)
+! uc_clear(&curbuf->b_ucmds);
+ }
+
+ /*
+*** ../vim-8.1.1258/src/tag.c 2019-04-29 19:47:19.399571862 +0200
+--- src/tag.c 2019-05-03 23:01:48.623615434 +0200
+***************
+*** 2860,2866 ****
+ free_tag_stuff(void)
+ {
+ ga_clear_strings(&tag_fnames);
+! do_tag(NULL, DT_FREE, 0, 0, 0);
+ tag_freematch();
+
+ # if defined(FEAT_QUICKFIX)
+--- 2860,2867 ----
+ free_tag_stuff(void)
+ {
+ ga_clear_strings(&tag_fnames);
+! if (curwin != NULL)
+! do_tag(NULL, DT_FREE, 0, 0, 0);
+ tag_freematch();
+
+ # if defined(FEAT_QUICKFIX)
+*** ../vim-8.1.1258/src/version.c 2019-05-03 22:25:36.292643839 +0200
+--- src/version.c 2019-05-03 23:13:33.340662772 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1259,
+ /**/
+
+--
+An indication you must be a manager:
+You give constructive feedback to your dog.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1260 b/data/vim/patches/8.1.1260
new file mode 100644
index 000000000..98f8d1317
--- /dev/null
+++ b/data/vim/patches/8.1.1260
@@ -0,0 +1,65 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1260
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1260
+Problem: Comparing with pointer instead of value.
+Solution: Add a "*". (Ken Takata, closes #4336)
+Files: src/usercmd.c
+
+
+*** ../vim-8.1.1259/src/usercmd.c 2019-05-03 23:15:34.048180407 +0200
+--- src/usercmd.c 2019-05-04 12:39:19.015471736 +0200
+***************
+*** 824,833 ****
+ emsg(_("E179: argument required for -addr"));
+ return FAIL;
+ }
+! if (parse_addr_type_arg(val, (int)vallen, addr_type_arg) == FAIL)
+ return FAIL;
+! if (addr_type_arg != ADDR_LINES)
+! *argt |= (ZEROR) ;
+ }
+ else
+ {
+--- 824,833 ----
+ emsg(_("E179: argument required for -addr"));
+ return FAIL;
+ }
+! if (parse_addr_type_arg(val, (int)vallen, addr_type_arg) == FAIL)
+ return FAIL;
+! if (*addr_type_arg != ADDR_LINES)
+! *argt |= ZEROR;
+ }
+ else
+ {
+*** ../vim-8.1.1259/src/version.c 2019-05-03 23:15:34.048180407 +0200
+--- src/version.c 2019-05-04 14:04:33.370371268 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1260,
+ /**/
+
+--
+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.1261 b/data/vim/patches/8.1.1261
new file mode 100644
index 000000000..5d7cca85c
--- /dev/null
+++ b/data/vim/patches/8.1.1261
@@ -0,0 +1,1036 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1261
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1261
+Problem: No error for quickfix commands with negative range.
+Solution: Add ADDR_UNSIGNED and use it for quickfix commands. Make
+ assert_fails() show the command if the error doesn't match.
+Files: src/ex_cmds.h, src/ex_docmd.c, src/testdir/test_quickfix.vim,
+ runtime/doc/quickfix.txt, src/eval.c, src/quickfix.c,
+ src/proto/quickfix.pro, src/ex_cmds2.c
+
+
+*** ../vim-8.1.1260/src/ex_cmds.h 2019-05-03 21:56:31.363540578 +0200
+--- src/ex_cmds.h 2019-05-04 14:45:32.177702667 +0200
+***************
+*** 73,80 ****
+ ADDR_BUFFERS, // buffer number
+ ADDR_TABS, // tab page number
+ ADDR_TABS_RELATIVE, // Tab page that only relative
+ ADDR_QUICKFIX, // quickfix list entry number
+! ADDR_OTHER, // something else
+ ADDR_NONE // no range used
+ } cmd_addr_T;
+ #endif
+--- 73,82 ----
+ ADDR_BUFFERS, // buffer number
+ ADDR_TABS, // tab page number
+ ADDR_TABS_RELATIVE, // Tab page that only relative
++ ADDR_QUICKFIX_VALID, // quickfix list valid entry number
+ ADDR_QUICKFIX, // quickfix list entry number
+! ADDR_UNSIGNED, // positive count or zero, defaults to 1
+! ADDR_OTHER, // something else, use line number for '$', '%', etc.
+ ADDR_NONE // no range used
+ } cmd_addr_T;
+ #endif
+***************
+*** 92,98 ****
+ * Not supported commands are included to avoid ambiguities.
+ */
+ #ifdef EX
+! # undef EX /* just in case */
+ #endif
+ #ifdef DO_DECLARE_EXCMD
+ # define EX(a, b, c, d, e) {(char_u *)b, c, (long_u)(d), e}
+--- 94,100 ----
+ * Not supported commands are included to avoid ambiguities.
+ */
+ #ifdef EX
+! # undef EX // just in case
+ #endif
+ #ifdef DO_DECLARE_EXCMD
+ # define EX(a, b, c, d, e) {(char_u *)b, c, (long_u)(d), e}
+***************
+*** 242,251 ****
+ ADDR_LINES),
+ EX(CMD_cNext, "cNext", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cNfile, "cNfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cabbrev, "cabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+ ADDR_NONE),
+--- 244,253 ----
+ ADDR_LINES),
+ EX(CMD_cNext, "cNext", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_cNfile, "cNfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_cabbrev, "cabbrev", ex_abbreviate,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+ ADDR_NONE),
+***************
+*** 253,260 ****
+ EXTRA|TRLBAR|CMDWIN,
+ ADDR_NONE),
+ EX(CMD_cabove, "cabove", ex_cbelow,
+! RANGE|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_caddbuffer, "caddbuffer", ex_cbuffer,
+ RANGE|WORD1|TRLBAR,
+ ADDR_OTHER),
+--- 255,262 ----
+ EXTRA|TRLBAR|CMDWIN,
+ ADDR_NONE),
+ EX(CMD_cabove, "cabove", ex_cbelow,
+! RANGE|COUNT|TRLBAR,
+! ADDR_UNSIGNED),
+ EX(CMD_caddbuffer, "caddbuffer", ex_cbuffer,
+ RANGE|WORD1|TRLBAR,
+ ADDR_OTHER),
+***************
+*** 274,287 ****
+ BANG|RANGE|WORD1|TRLBAR,
+ ADDR_OTHER),
+ EX(CMD_cbelow, "cbelow", ex_cbelow,
+! RANGE|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_cbottom, "cbottom", ex_cbottom,
+ TRLBAR,
+ ADDR_NONE),
+ EX(CMD_cc, "cc", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cclose, "cclose", ex_cclose,
+ TRLBAR,
+ ADDR_NONE),
+--- 276,289 ----
+ BANG|RANGE|WORD1|TRLBAR,
+ ADDR_OTHER),
+ EX(CMD_cbelow, "cbelow", ex_cbelow,
+! RANGE|COUNT|TRLBAR,
+! ADDR_UNSIGNED),
+ EX(CMD_cbottom, "cbottom", ex_cbottom,
+ TRLBAR,
+ ADDR_NONE),
+ EX(CMD_cc, "cc", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_QUICKFIX),
+ EX(CMD_cclose, "cclose", ex_cclose,
+ TRLBAR,
+ ADDR_NONE),
+***************
+*** 290,296 ****
+ ADDR_NONE),
+ EX(CMD_cdo, "cdo", ex_listdo,
+ BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+! ADDR_QUICKFIX),
+ EX(CMD_center, "center", ex_align,
+ TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+--- 292,298 ----
+ ADDR_NONE),
+ EX(CMD_cdo, "cdo", ex_listdo,
+ BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+! ADDR_QUICKFIX_VALID),
+ EX(CMD_center, "center", ex_align,
+ TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+***************
+*** 302,311 ****
+ ADDR_NONE),
+ EX(CMD_cfdo, "cfdo", ex_listdo,
+ BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+! ADDR_QUICKFIX),
+ EX(CMD_cfirst, "cfirst", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cgetfile, "cgetfile", ex_cfile,
+ TRLBAR|FILE1,
+ ADDR_NONE),
+--- 304,313 ----
+ ADDR_NONE),
+ EX(CMD_cfdo, "cfdo", ex_listdo,
+ BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+! ADDR_QUICKFIX_VALID),
+ EX(CMD_cfirst, "cfirst", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_cgetfile, "cgetfile", ex_cfile,
+ TRLBAR|FILE1,
+ ADDR_NONE),
+***************
+*** 335,341 ****
+ ADDR_NONE),
+ EX(CMD_clast, "clast", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_close, "close", ex_close,
+ BANG|RANGE|COUNT|TRLBAR|CMDWIN,
+ ADDR_WINDOWS),
+--- 337,343 ----
+ ADDR_NONE),
+ EX(CMD_clast, "clast", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_close, "close", ex_close,
+ BANG|RANGE|COUNT|TRLBAR|CMDWIN,
+ ADDR_WINDOWS),
+***************
+*** 353,365 ****
+ ADDR_OTHER),
+ EX(CMD_cnext, "cnext", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cnewer, "cnewer", qf_age,
+ RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_cnfile, "cnfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cnoremap, "cnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+ ADDR_NONE),
+--- 355,367 ----
+ ADDR_OTHER),
+ EX(CMD_cnext, "cnext", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_cnewer, "cnewer", qf_age,
+ RANGE|COUNT|TRLBAR,
+! ADDR_UNSIGNED),
+ EX(CMD_cnfile, "cnfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_cnoremap, "cnoremap", ex_map,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+ ADDR_NONE),
+***************
+*** 374,380 ****
+ ADDR_LINES),
+ EX(CMD_colder, "colder", qf_age,
+ RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_colorscheme, "colorscheme", ex_colorscheme,
+ WORD1|TRLBAR|CMDWIN,
+ ADDR_NONE),
+--- 376,382 ----
+ ADDR_LINES),
+ EX(CMD_colder, "colder", qf_age,
+ RANGE|COUNT|TRLBAR,
+! ADDR_UNSIGNED),
+ EX(CMD_colorscheme, "colorscheme", ex_colorscheme,
+ WORD1|TRLBAR|CMDWIN,
+ ADDR_NONE),
+***************
+*** 398,404 ****
+ ADDR_OTHER),
+ EX(CMD_cprevious, "cprevious", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cpfile, "cpfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+ ADDR_OTHER),
+--- 400,406 ----
+ ADDR_OTHER),
+ EX(CMD_cprevious, "cprevious", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_cpfile, "cpfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+ ADDR_OTHER),
+***************
+*** 407,413 ****
+ ADDR_NONE),
+ EX(CMD_crewind, "crewind", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_cscope, "cscope", ex_cscope,
+ EXTRA|NOTRLCOM|XFILE,
+ ADDR_NONE),
+--- 409,415 ----
+ ADDR_NONE),
+ EX(CMD_crewind, "crewind", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_cscope, "cscope", ex_cscope,
+ EXTRA|NOTRLCOM|XFILE,
+ ADDR_NONE),
+***************
+*** 725,740 ****
+ ADDR_LINES),
+ EX(CMD_lNext, "lNext", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_lNfile, "lNfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_last, "last", ex_last,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_NONE),
+ EX(CMD_labove, "labove", ex_cbelow,
+! RANGE|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_language, "language", ex_language,
+ EXTRA|TRLBAR|CMDWIN,
+ ADDR_NONE),
+--- 727,742 ----
+ ADDR_LINES),
+ EX(CMD_lNext, "lNext", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_lNfile, "lNfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_last, "last", ex_last,
+ EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR,
+ ADDR_NONE),
+ EX(CMD_labove, "labove", ex_cbelow,
+! RANGE|COUNT|TRLBAR,
+! ADDR_UNSIGNED),
+ EX(CMD_language, "language", ex_language,
+ EXTRA|TRLBAR|CMDWIN,
+ ADDR_NONE),
+***************
+*** 754,761 ****
+ BANG|RANGE|WORD1|TRLBAR,
+ ADDR_OTHER),
+ EX(CMD_lbelow, "lbelow", ex_cbelow,
+! RANGE|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_lbottom, "lbottom", ex_cbottom,
+ TRLBAR,
+ ADDR_NONE),
+--- 756,763 ----
+ BANG|RANGE|WORD1|TRLBAR,
+ ADDR_OTHER),
+ EX(CMD_lbelow, "lbelow", ex_cbelow,
+! RANGE|COUNT|TRLBAR,
+! ADDR_UNSIGNED),
+ EX(CMD_lbottom, "lbottom", ex_cbottom,
+ TRLBAR,
+ ADDR_NONE),
+***************
+*** 773,779 ****
+ ADDR_NONE),
+ EX(CMD_ldo, "ldo", ex_listdo,
+ BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+! ADDR_QUICKFIX),
+ EX(CMD_left, "left", ex_align,
+ TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+--- 775,781 ----
+ ADDR_NONE),
+ EX(CMD_ldo, "ldo", ex_listdo,
+ BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+! ADDR_QUICKFIX_VALID),
+ EX(CMD_left, "left", ex_align,
+ TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
+ ADDR_LINES),
+***************
+*** 791,800 ****
+ ADDR_NONE),
+ EX(CMD_lfdo, "lfdo", ex_listdo,
+ BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+! ADDR_QUICKFIX),
+ EX(CMD_lfirst, "lfirst", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_lgetfile, "lgetfile", ex_cfile,
+ TRLBAR|FILE1,
+ ADDR_NONE),
+--- 793,802 ----
+ ADDR_NONE),
+ EX(CMD_lfdo, "lfdo", ex_listdo,
+ BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|DFLALL,
+! ADDR_QUICKFIX_VALID),
+ EX(CMD_lfirst, "lfirst", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_lgetfile, "lgetfile", ex_cfile,
+ TRLBAR|FILE1,
+ ADDR_NONE),
+***************
+*** 818,827 ****
+ ADDR_NONE),
+ EX(CMD_ll, "ll", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_llast, "llast", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_llist, "llist", qf_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+ ADDR_NONE),
+--- 820,829 ----
+ ADDR_NONE),
+ EX(CMD_ll, "ll", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_QUICKFIX),
+ EX(CMD_llast, "llast", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_llist, "llist", qf_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+ ADDR_NONE),
+***************
+*** 839,851 ****
+ ADDR_NONE),
+ EX(CMD_lnext, "lnext", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_lnewer, "lnewer", qf_age,
+ RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_lnfile, "lnfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_loadview, "loadview", ex_loadview,
+ FILE1|TRLBAR,
+ ADDR_NONE),
+--- 841,853 ----
+ ADDR_NONE),
+ EX(CMD_lnext, "lnext", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_lnewer, "lnewer", qf_age,
+ RANGE|COUNT|TRLBAR,
+! ADDR_UNSIGNED),
+ EX(CMD_lnfile, "lnfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_loadview, "loadview", ex_loadview,
+ FILE1|TRLBAR,
+ ADDR_NONE),
+***************
+*** 860,878 ****
+ ADDR_NONE),
+ EX(CMD_lolder, "lolder", qf_age,
+ RANGE|COUNT|TRLBAR,
+! ADDR_OTHER),
+ EX(CMD_lopen, "lopen", ex_copen,
+ RANGE|COUNT|TRLBAR,
+ ADDR_OTHER),
+ EX(CMD_lprevious, "lprevious", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_lpfile, "lpfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+ ADDR_OTHER),
+ EX(CMD_lrewind, "lrewind", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_OTHER),
+ EX(CMD_ltag, "ltag", ex_tag,
+ TRLBAR|BANG|WORD1,
+ ADDR_NONE),
+--- 862,880 ----
+ ADDR_NONE),
+ EX(CMD_lolder, "lolder", qf_age,
+ RANGE|COUNT|TRLBAR,
+! ADDR_UNSIGNED),
+ EX(CMD_lopen, "lopen", ex_copen,
+ RANGE|COUNT|TRLBAR,
+ ADDR_OTHER),
+ EX(CMD_lprevious, "lprevious", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_lpfile, "lpfile", ex_cnext,
+ RANGE|COUNT|TRLBAR|BANG,
+ ADDR_OTHER),
+ EX(CMD_lrewind, "lrewind", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+! ADDR_UNSIGNED),
+ EX(CMD_ltag, "ltag", ex_tag,
+ TRLBAR|BANG|WORD1,
+ ADDR_NONE),
+*** ../vim-8.1.1260/src/ex_docmd.c 2019-05-03 21:56:31.363540578 +0200
+--- src/ex_docmd.c 2019-05-04 14:56:42.118125419 +0200
+***************
+*** 1786,1792 ****
+ * is equal to the lower.
+ */
+
+! /* ea.addr_type for user commands is set by find_ucmd */
+ if (!IS_USER_CMDIDX(ea.cmdidx))
+ {
+ if (ea.cmdidx != CMD_SIZE)
+--- 1786,1792 ----
+ * is equal to the lower.
+ */
+
+! // ea.addr_type for user commands is set by find_ucmd
+ if (!IS_USER_CMDIDX(ea.cmdidx))
+ {
+ if (ea.cmdidx != CMD_SIZE)
+***************
+*** 1794,1802 ****
+ else
+ ea.addr_type = ADDR_LINES;
+
+! /* :wincmd range depends on the argument. */
+ if (ea.cmdidx == CMD_wincmd && p != NULL)
+ get_wincmd_addr_type(skipwhite(p), &ea);
+ }
+
+ ea.cmd = cmd;
+--- 1794,1807 ----
+ else
+ ea.addr_type = ADDR_LINES;
+
+! // :wincmd range depends on the argument.
+ if (ea.cmdidx == CMD_wincmd && p != NULL)
+ get_wincmd_addr_type(skipwhite(p), &ea);
++ #ifdef FEAT_QUICKFIX
++ // :.cc in quickfix window uses line number
++ if ((ea.cmdidx == CMD_cc || ea.cmdidx == CMD_ll) && bt_quickfix(curbuf))
++ ea.addr_type = ADDR_OTHER;
++ #endif
+ }
+
+ ea.cmd = cmd;
+***************
+*** 2229,2243 ****
+ else
+ ea.line2 = ARGCOUNT;
+ break;
+! case ADDR_QUICKFIX:
+ #ifdef FEAT_QUICKFIX
+! ea.line2 = qf_get_size(&ea);
+ if (ea.line2 == 0)
+ ea.line2 = 1;
+ #endif
+ break;
+ case ADDR_NONE:
+! iemsg(_("INTERNAL: Cannot use DFLALL with ADDR_NONE"));
+ break;
+ }
+ }
+--- 2234,2250 ----
+ else
+ ea.line2 = ARGCOUNT;
+ break;
+! case ADDR_QUICKFIX_VALID:
+ #ifdef FEAT_QUICKFIX
+! ea.line2 = qf_get_valid_size(&ea);
+ if (ea.line2 == 0)
+ ea.line2 = 1;
+ #endif
+ break;
+ case ADDR_NONE:
+! case ADDR_UNSIGNED:
+! case ADDR_QUICKFIX:
+! iemsg(_("INTERNAL: Cannot use DFLALL with ADDR_NONE, ADDR_UNSIGNED or ADDR_QUICKFIX"));
+ break;
+ }
+ }
+***************
+*** 2905,2914 ****
+--- 2912,2927 ----
+ eap->line2 = CURRENT_TAB_NR;
+ break;
+ case ADDR_TABS_RELATIVE:
++ case ADDR_UNSIGNED:
+ eap->line2 = 1;
+ break;
+ case ADDR_QUICKFIX:
+ #ifdef FEAT_QUICKFIX
++ eap->line2 = qf_get_cur_idx(eap);
++ #endif
++ break;
++ case ADDR_QUICKFIX_VALID:
++ #ifdef FEAT_QUICKFIX
+ eap->line2 = qf_get_cur_valid_idx(eap);
+ #endif
+ break;
+***************
+*** 2969,2974 ****
+--- 2982,2989 ----
+ }
+ break;
+ case ADDR_TABS_RELATIVE:
++ case ADDR_UNSIGNED:
++ case ADDR_QUICKFIX:
+ *errormsg = _(e_invrange);
+ return FAIL;
+ case ADDR_ARGUMENTS:
+***************
+*** 2980,2989 ****
+ eap->line2 = ARGCOUNT;
+ }
+ break;
+! case ADDR_QUICKFIX:
+ #ifdef FEAT_QUICKFIX
+ eap->line1 = 1;
+! eap->line2 = qf_get_size(eap);
+ if (eap->line2 == 0)
+ eap->line2 = 1;
+ #endif
+--- 2995,3004 ----
+ eap->line2 = ARGCOUNT;
+ }
+ break;
+! case ADDR_QUICKFIX_VALID:
+ #ifdef FEAT_QUICKFIX
+ eap->line1 = 1;
+! eap->line2 = qf_get_valid_size(eap);
+ if (eap->line2 == 0)
+ eap->line2 = 1;
+ #endif
+***************
+*** 3102,3108 ****
+ /*
+ * Find an Ex command by its name, either built-in or user.
+ * Start of the name can be found at eap->cmd.
+! * Returns pointer to char after the command name.
+ * "full" is set to TRUE if the whole command name matched.
+ * Returns NULL for an ambiguous user command.
+ */
+--- 3117,3123 ----
+ /*
+ * Find an Ex command by its name, either built-in or user.
+ * Start of the name can be found at eap->cmd.
+! * Sets eap->cmdidx and returns a pointer to char after the command name.
+ * "full" is set to TRUE if the whole command name matched.
+ * Returns NULL for an ambiguous user command.
+ */
+***************
+*** 4268,4279 ****
+--- 4283,4300 ----
+ break;
+ case ADDR_TABS_RELATIVE:
+ case ADDR_NONE:
++ case ADDR_UNSIGNED:
+ emsg(_(e_invrange));
+ cmd = NULL;
+ goto error;
+ break;
+ case ADDR_QUICKFIX:
+ #ifdef FEAT_QUICKFIX
++ lnum = qf_get_cur_idx(eap);
++ #endif
++ break;
++ case ADDR_QUICKFIX_VALID:
++ #ifdef FEAT_QUICKFIX
+ lnum = qf_get_cur_valid_idx(eap);
+ #endif
+ break;
+***************
+*** 4312,4317 ****
+--- 4333,4339 ----
+ break;
+ case ADDR_TABS_RELATIVE:
+ case ADDR_NONE:
++ case ADDR_UNSIGNED:
+ emsg(_(e_invrange));
+ cmd = NULL;
+ goto error;
+***************
+*** 4323,4328 ****
+--- 4345,4357 ----
+ lnum = 1;
+ #endif
+ break;
++ case ADDR_QUICKFIX_VALID:
++ #ifdef FEAT_QUICKFIX
++ lnum = qf_get_valid_size(eap);
++ if (lnum == 0)
++ lnum = 1;
++ #endif
++ break;
+ }
+ break;
+
+***************
+*** 4503,4512 ****
+--- 4532,4548 ----
+ break;
+ case ADDR_QUICKFIX:
+ #ifdef FEAT_QUICKFIX
++ lnum = qf_get_cur_idx(eap);
++ #endif
++ break;
++ case ADDR_QUICKFIX_VALID:
++ #ifdef FEAT_QUICKFIX
+ lnum = qf_get_cur_valid_idx(eap);
+ #endif
+ break;
+ case ADDR_NONE:
++ case ADDR_UNSIGNED:
++ lnum = 0;
+ break;
+ }
+ }
+***************
+*** 4603,4608 ****
+--- 4639,4645 ----
+ invalid_range(exarg_T *eap)
+ {
+ buf_T *buf;
++
+ if ( eap->line1 < 0
+ || eap->line2 < 0
+ || eap->line1 > eap->line2)
+***************
+*** 4664,4673 ****
+ break;
+ case ADDR_QUICKFIX:
+ #ifdef FEAT_QUICKFIX
+! if (eap->line2 != 1 && eap->line2 > qf_get_size(eap))
+ return _(e_invrange);
+ #endif
+ break;
+ case ADDR_NONE:
+ // Will give an error elsewhere.
+ break;
+--- 4701,4722 ----
+ break;
+ case ADDR_QUICKFIX:
+ #ifdef FEAT_QUICKFIX
+! // No error for value that is too big, will use the last entry.
+! if (eap->line2 <= 0)
+ return _(e_invrange);
+ #endif
+ break;
++ case ADDR_QUICKFIX_VALID:
++ #ifdef FEAT_QUICKFIX
++ if ((eap->line2 != 1 && eap->line2 > qf_get_valid_size(eap))
++ || eap->line2 < 0)
++ return _(e_invrange);
++ #endif
++ break;
++ case ADDR_UNSIGNED:
++ if (eap->line2 < 0)
++ return _(e_invrange);
++ break;
+ case ADDR_NONE:
+ // Will give an error elsewhere.
+ break;
+*** ../vim-8.1.1260/src/testdir/test_quickfix.vim 2019-05-03 21:56:31.367540560 +0200
+--- src/testdir/test_quickfix.vim 2019-05-04 14:33:20.713745971 +0200
+***************
+*** 28,34 ****
+ command! -count -nargs=* -bang Xprev <mods><count>cprev<bang> <args>
+ command! -nargs=* -bang Xfirst <mods>cfirst<bang> <args>
+ command! -nargs=* -bang Xlast <mods>clast<bang> <args>
+! command! -nargs=* -bang -range Xnfile <mods><count>cnfile<bang> <args>
+ command! -nargs=* -bang Xpfile <mods>cpfile<bang> <args>
+ command! -nargs=* Xexpr <mods>cexpr <args>
+ command! -range -nargs=* Xvimgrep <mods><count>vimgrep <args>
+--- 28,34 ----
+ command! -count -nargs=* -bang Xprev <mods><count>cprev<bang> <args>
+ command! -nargs=* -bang Xfirst <mods>cfirst<bang> <args>
+ command! -nargs=* -bang Xlast <mods>clast<bang> <args>
+! command! -count -nargs=* -bang Xnfile <mods><count>cnfile<bang> <args>
+ command! -nargs=* -bang Xpfile <mods>cpfile<bang> <args>
+ command! -nargs=* Xexpr <mods>cexpr <args>
+ command! -range -nargs=* Xvimgrep <mods><count>vimgrep <args>
+***************
+*** 63,69 ****
+ command! -count -nargs=* -bang Xprev <mods><count>lprev<bang> <args>
+ command! -nargs=* -bang Xfirst <mods>lfirst<bang> <args>
+ command! -nargs=* -bang Xlast <mods>llast<bang> <args>
+! command! -nargs=* -bang -range Xnfile <mods><count>lnfile<bang> <args>
+ command! -nargs=* -bang Xpfile <mods>lpfile<bang> <args>
+ command! -nargs=* Xexpr <mods>lexpr <args>
+ command! -range -nargs=* Xvimgrep <mods><count>lvimgrep <args>
+--- 63,69 ----
+ command! -count -nargs=* -bang Xprev <mods><count>lprev<bang> <args>
+ command! -nargs=* -bang Xfirst <mods>lfirst<bang> <args>
+ command! -nargs=* -bang Xlast <mods>llast<bang> <args>
+! command! -count -nargs=* -bang Xnfile <mods><count>lnfile<bang> <args>
+ command! -nargs=* -bang Xpfile <mods>lpfile<bang> <args>
+ command! -nargs=* Xexpr <mods>lexpr <args>
+ command! -range -nargs=* Xvimgrep <mods><count>lvimgrep <args>
+***************
+*** 4126,4138 ****
+
+ " Invalid range
+ if a:cchar == 'c'
+! call assert_fails('-2cbelow', 'E553:')
+! " TODO: should go to first error in the current line?
+! 0cabove
+ else
+! call assert_fails('-2lbelow', 'E553:')
+! " TODO: should go to first error in the current line?
+! 0labove
+ endif
+
+ call delete('X1')
+--- 4126,4134 ----
+
+ " Invalid range
+ if a:cchar == 'c'
+! call assert_fails('-2cbelow', 'E16:')
+ else
+! call assert_fails('-2lbelow', 'E16:')
+ endif
+
+ call delete('X1')
+***************
+*** 4145,4147 ****
+--- 4141,4179 ----
+ call Xtest_below('c')
+ call Xtest_below('l')
+ endfunc
++
++ func Test_quickfix_count()
++ let commands = [
++ \ 'cNext',
++ \ 'cNfile',
++ \ 'cabove',
++ \ 'cbelow',
++ \ 'cfirst',
++ \ 'clast',
++ \ 'cnewer',
++ \ 'cnext',
++ \ 'cnfile',
++ \ 'colder',
++ \ 'cprevious',
++ \ 'crewind',
++ \
++ \ 'lNext',
++ \ 'lNfile',
++ \ 'labove',
++ \ 'lbelow',
++ \ 'lfirst',
++ \ 'llast',
++ \ 'lnewer',
++ \ 'lnext',
++ \ 'lnfile',
++ \ 'lolder',
++ \ 'lprevious',
++ \ 'lrewind',
++ \ ]
++ for cmd in commands
++ call assert_fails('-1' .. cmd, 'E16:')
++ call assert_fails('.' .. cmd, 'E16:')
++ call assert_fails('%' .. cmd, 'E16:')
++ call assert_fails('$' .. cmd, 'E16:')
++ endfor
++ endfunc
+*** ../vim-8.1.1260/runtime/doc/quickfix.txt 2019-05-03 21:56:31.363540578 +0200
+--- runtime/doc/quickfix.txt 2019-05-04 14:13:00.932098180 +0200
+***************
+*** 87,93 ****
+
+ *:cc*
+ :cc[!] [nr] Display error [nr]. If [nr] is omitted, the same
+! error is displayed again. Without [!] this doesn't
+ work when jumping to another buffer, the current buffer
+ has been changed, there is the only window for the
+ buffer and both 'hidden' and 'autowrite' are off.
+--- 87,93 ----
+
+ *:cc*
+ :cc[!] [nr] Display error [nr]. If [nr] is omitted, the same
+! :[nr]cc[!] error is displayed again. Without [!] this doesn't
+ work when jumping to another buffer, the current buffer
+ has been changed, there is the only window for the
+ buffer and both 'hidden' and 'autowrite' are off.
+***************
+*** 96,105 ****
+ there is another window for this buffer.
+ The 'switchbuf' settings are respected when jumping
+ to a buffer.
+
+ *:ll*
+ :ll[!] [nr] Same as ":cc", except the location list for the
+! current window is used instead of the quickfix list.
+
+ *:cn* *:cnext* *E553*
+ :[count]cn[ext][!] Display the [count] next error in the list that
+--- 96,108 ----
+ there is another window for this buffer.
+ The 'switchbuf' settings are respected when jumping
+ to a buffer.
++ When used in the quickfix window the line number can
++ be used, including "." for the current line and "$"
++ for the last line.
+
+ *:ll*
+ :ll[!] [nr] Same as ":cc", except the location list for the
+! :[nr]ll[!] current window is used instead of the quickfix list.
+
+ *:cn* *:cnext* *E553*
+ :[count]cn[ext][!] Display the [count] next error in the list that
+*** ../vim-8.1.1260/src/eval.c 2019-04-27 20:36:52.530303581 +0200
+--- src/eval.c 2019-05-04 14:31:49.086276905 +0200
+***************
+*** 9595,9608 ****
+ return ret;
+ }
+
+ int
+ assert_fails(typval_T *argvars)
+ {
+ char_u *cmd = tv_get_string_chk(&argvars[0]);
+ garray_T ga;
+ int ret = 0;
+- char_u numbuf[NUMBUFLEN];
+- char_u *tofree;
+
+ called_emsg = FALSE;
+ suppress_errthrow = TRUE;
+--- 9595,9621 ----
+ return ret;
+ }
+
++ static void
++ assert_append_cmd_or_arg(garray_T *gap, typval_T *argvars, char_u *cmd)
++ {
++ char_u *tofree;
++ char_u numbuf[NUMBUFLEN];
++
++ if (argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN)
++ {
++ ga_concat(gap, echo_string(&argvars[2], &tofree, numbuf, 0));
++ vim_free(tofree);
++ }
++ else
++ ga_concat(gap, cmd);
++ }
++
+ int
+ assert_fails(typval_T *argvars)
+ {
+ char_u *cmd = tv_get_string_chk(&argvars[0]);
+ garray_T ga;
+ int ret = 0;
+
+ called_emsg = FALSE;
+ suppress_errthrow = TRUE;
+***************
+*** 9612,9625 ****
+ {
+ 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;
+--- 9625,9631 ----
+ {
+ prepare_assert_error(&ga);
+ ga_concat(&ga, (char_u *)"command did not fail: ");
+! assert_append_cmd_or_arg(&ga, argvars, cmd);
+ assert_error(&ga);
+ ga_clear(&ga);
+ ret = 1;
+***************
+*** 9635,9640 ****
+--- 9641,9648 ----
+ prepare_assert_error(&ga);
+ fill_assert_error(&ga, &argvars[2], NULL, &argvars[1],
+ &vimvars[VV_ERRMSG].vv_tv, ASSERT_OTHER);
++ ga_concat(&ga, (char_u *)": ");
++ assert_append_cmd_or_arg(&ga, argvars, cmd);
+ assert_error(&ga);
+ ga_clear(&ga);
+ ret = 1;
+*** ../vim-8.1.1260/src/quickfix.c 2019-05-03 21:56:31.367540560 +0200
+--- src/quickfix.c 2019-05-04 14:50:58.215954924 +0200
+***************
+*** 4828,4839 ****
+ }
+
+ /*
+! * Returns the number of valid entries in the current quickfix/location list.
+ */
+ int
+ qf_get_size(exarg_T *eap)
+ {
+ qf_info_T *qi;
+ qf_list_T *qfl;
+ qfline_T *qfp;
+ int i, sz = 0;
+--- 4828,4852 ----
+ }
+
+ /*
+! * Returns the number of entries in the current quickfix/location list.
+ */
+ int
+ qf_get_size(exarg_T *eap)
+ {
+ qf_info_T *qi;
++
++ if ((qi = qf_cmd_get_stack(eap, FALSE)) == NULL)
++ return 0;
++ return qf_get_curlist(qi)->qf_count;
++ }
++
++ /*
++ * Returns the number of valid entries in the current quickfix/location list.
++ */
++ int
++ qf_get_valid_size(exarg_T *eap)
++ {
++ qf_info_T *qi;
+ qf_list_T *qfl;
+ qfline_T *qfp;
+ int i, sz = 0;
+*** ../vim-8.1.1260/src/proto/quickfix.pro 2019-05-03 21:56:31.363540578 +0200
+--- src/proto/quickfix.pro 2019-05-04 14:48:27.644759952 +0200
+***************
+*** 19,24 ****
+--- 19,25 ----
+ int grep_internal(cmdidx_T cmdidx);
+ void ex_make(exarg_T *eap);
+ int qf_get_size(exarg_T *eap);
++ int qf_get_valid_size(exarg_T *eap);
+ int qf_get_cur_idx(exarg_T *eap);
+ int qf_get_cur_valid_idx(exarg_T *eap);
+ void ex_cc(exarg_T *eap);
+*** ../vim-8.1.1260/src/ex_cmds2.c 2019-04-21 11:34:36.335256531 +0200
+--- src/ex_cmds2.c 2019-05-04 14:46:24.961418476 +0200
+***************
+*** 2132,2138 ****
+ else if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo
+ || eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
+ {
+! qf_size = qf_get_size(eap);
+ if (qf_size <= 0 || eap->line1 > qf_size)
+ buf = NULL;
+ else
+--- 2132,2138 ----
+ else if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo
+ || eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
+ {
+! qf_size = qf_get_valid_size(eap);
+ if (qf_size <= 0 || eap->line1 > qf_size)
+ buf = NULL;
+ else
+*** ../vim-8.1.1260/src/version.c 2019-05-04 14:05:05.210240329 +0200
+--- src/version.c 2019-05-04 14:05:40.050094734 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1261,
+ /**/
+
+--
+I just planted an Algebra tree. It has square roots.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1262 b/data/vim/patches/8.1.1262
new file mode 100644
index 000000000..fdbcfd1d1
--- /dev/null
+++ b/data/vim/patches/8.1.1262
@@ -0,0 +1,113 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1262
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1262
+Problem: Cannot simulate a mouse click in a test.
+Solution: Add test_setmouse().
+Files: src/evalfunc.c, runtime/doc/eval.txt, runtime/doc/usr_41.txt
+
+
+*** ../vim-8.1.1261/src/evalfunc.c 2019-05-02 23:00:19.223658473 +0200
+--- src/evalfunc.c 2019-05-04 15:35:49.037326346 +0200
+***************
+*** 456,461 ****
+--- 456,462 ----
+ #ifdef FEAT_GUI
+ static void f_test_scrollbar(typval_T *argvars, typval_T *rettv);
+ #endif
++ static void f_test_setmouse(typval_T *argvars, typval_T *rettv);
+ static void f_test_settime(typval_T *argvars, typval_T *rettv);
+ #ifdef FEAT_FLOAT
+ static void f_tan(typval_T *argvars, typval_T *rettv);
+***************
+*** 993,998 ****
+--- 994,1000 ----
+ #ifdef FEAT_GUI
+ {"test_scrollbar", 3, 3, f_test_scrollbar},
+ #endif
++ {"test_setmouse", 2, 2, f_test_setmouse},
+ {"test_settime", 1, 1, f_test_settime},
+ #ifdef FEAT_TIMERS
+ {"timer_info", 0, 1, f_timer_info},
+***************
+*** 14494,14499 ****
+--- 14496,14508 ----
+ #endif
+
+ static void
++ f_test_setmouse(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ mouse_row = (time_t)tv_get_number(&argvars[0]) - 1;
++ mouse_col = (time_t)tv_get_number(&argvars[1]) - 1;
++ }
++
++ static void
+ f_test_settime(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ time_for_testing = (time_t)tv_get_number(&argvars[0]);
+*** ../vim-8.1.1261/runtime/doc/eval.txt 2019-05-02 23:00:19.227658452 +0200
+--- runtime/doc/eval.txt 2019-05-04 15:22:45.893532231 +0200
+***************
+*** 2681,2686 ****
+--- 2700,2706 ----
+ test_refcount({expr}) Number get the reference count of {expr}
+ test_scrollbar({which}, {value}, {dragging})
+ none scroll in the GUI for testing
++ test_setmouse({row}, {col}) none set the mouse position 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
+***************
+*** 9780,9785 ****
+--- 9842,9854 ----
+ Only works when the {which} scrollbar actually exists,
+ obviously only when using the GUI.
+
++ test_setmouse({row}, {col}) *test_setmouse()*
++ Set the mouse position to be used for the next mouse action.
++ {row} and {col} are one based.
++ For example: >
++ call test_setmouse(4, 20)
++ call feedkeys("\<LeftMouse>", "xt")
++
+ 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.1261/runtime/doc/usr_41.txt 2019-04-27 20:36:52.530303581 +0200
+--- runtime/doc/usr_41.txt 2019-05-04 15:23:11.301395183 +0200
+***************
+*** 946,951 ****
+--- 955,964 ----
+ test_null_partial() return a null Partial function
+ test_null_string() return a null String
+ test_settime() set the time Vim uses internally
++ test_setmouse() set the mouse position
++ test_feedinput() add key sequence to input buffer
++ test_option_not_set() reset flag indicating option was set
++ test_scrollbar() simulate scrollbar movement in the GUI
+
+ Inter-process communication: *channel-functions*
+ ch_canread() check if there is something to read
+*** ../vim-8.1.1261/src/version.c 2019-05-04 15:05:24.931269287 +0200
+--- src/version.c 2019-05-04 15:25:24.732676392 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1262,
+ /**/
+
+--
+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.1263 b/data/vim/patches/8.1.1263
new file mode 100644
index 000000000..21ebeafa2
--- /dev/null
+++ b/data/vim/patches/8.1.1263
@@ -0,0 +1,91 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1263
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1263
+Problem: Mouse clicks in WinBar not tested.
+Solution: Add a test for clicking on the WinBar entries.
+Files: src/testdir/test_winbar.vim
+
+
+*** ../vim-8.1.1262/src/testdir/test_winbar.vim 2017-09-16 22:04:33.000000000 +0200
+--- src/testdir/test_winbar.vim 2019-05-04 16:05:05.855652066 +0200
+***************
+*** 21,23 ****
+--- 21,67 ----
+ aunmenu WinBar.Cont
+ close
+ endfunc
++
++ func Test_click_in_winbar()
++ new
++ amenu 1.10 WinBar.Next :let g:did_next = 11<CR>
++ amenu 1.20 WinBar.Cont :let g:did_cont = 12<CR>
++ amenu 1.30 WinBar.Close :close<CR>
++ redraw
++
++ let save_mouse = &mouse
++ set mouse=a
++
++ " Columns of the button edges:
++ " _Next_ _Cont_ _Close_
++ " 2 7 10 15 18 24
++ let g:did_next = 0
++ let g:did_cont = 0
++ for col in [1, 8, 9, 16, 17, 25, 26]
++ call test_setmouse(1, 1)
++ call feedkeys("\<LeftMouse>", "xt")
++ call assert_equal(0, g:did_next, 'col ' .. col)
++ call assert_equal(0, g:did_cont, 'col ' .. col)
++ endfor
++
++ for col in range(2, 7)
++ let g:did_next = 0
++ call test_setmouse(1, col)
++ call feedkeys("\<LeftMouse>", "xt")
++ call assert_equal(11, g:did_next, 'col ' .. col)
++ endfor
++
++ for col in range(10, 15)
++ let g:did_cont = 0
++ call test_setmouse(1, col)
++ call feedkeys("\<LeftMouse>", "xt")
++ call assert_equal(12, g:did_cont, 'col ' .. col)
++ endfor
++
++ let wincount = winnr('$')
++ call test_setmouse(1, 20)
++ call feedkeys("\<LeftMouse>", "xt")
++ call assert_equal(wincount - 1, winnr('$'))
++
++ let &mouse = save_mouse
++ endfunc
+*** ../vim-8.1.1262/src/version.c 2019-05-04 15:47:25.633423491 +0200
+--- src/version.c 2019-05-04 16:03:08.212288693 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1263,
+ /**/
+
+--
+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.1264 b/data/vim/patches/8.1.1264
new file mode 100644
index 000000000..af2878b10
--- /dev/null
+++ b/data/vim/patches/8.1.1264
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1264
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1264
+Problem: Crash when closing window from WinBar click. (Ben Jackson)
+Solution: Check that window pointer is still valid. (closes #4337)
+Files: src/menu.c
+
+
+*** ../vim-8.1.1263/src/menu.c 2019-04-24 23:08:20.078079973 +0200
+--- src/menu.c 2019-05-04 16:52:16.192216117 +0200
+***************
+*** 2488,2494 ****
+
+ if (col >= item->wb_startcol && col <= item->wb_endcol)
+ {
+! win_T *save_curwin = NULL;
+ pos_T save_visual = VIsual;
+ int save_visual_active = VIsual_active;
+ int save_visual_select = VIsual_select;
+--- 2488,2494 ----
+
+ if (col >= item->wb_startcol && col <= item->wb_endcol)
+ {
+! win_T *save_curwin = NULL;
+ pos_T save_visual = VIsual;
+ int save_visual_active = VIsual_active;
+ int save_visual_select = VIsual_select;
+***************
+*** 2506,2514 ****
+ check_cursor();
+ }
+
+ execute_menu(NULL, item->wb_menu, -1);
+
+! if (save_curwin != NULL)
+ {
+ curwin = save_curwin;
+ curbuf = curwin->w_buffer;
+--- 2506,2515 ----
+ check_cursor();
+ }
+
++ // Note: the command might close the current window.
+ execute_menu(NULL, item->wb_menu, -1);
+
+! if (save_curwin != NULL && win_valid(save_curwin))
+ {
+ curwin = save_curwin;
+ curbuf = curwin->w_buffer;
+***************
+*** 2518,2523 ****
+--- 2519,2526 ----
+ VIsual_reselect = save_visual_reselect;
+ VIsual_mode = save_visual_mode;
+ }
++ if (!win_valid(wp))
++ break;
+ }
+ }
+ }
+*** ../vim-8.1.1263/src/version.c 2019-05-04 16:06:08.915310869 +0200
+--- src/version.c 2019-05-04 16:55:03.335008585 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1264,
+ /**/
+
+--
+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.1265 b/data/vim/patches/8.1.1265
new file mode 100644
index 000000000..9276311a0
--- /dev/null
+++ b/data/vim/patches/8.1.1265
@@ -0,0 +1,291 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1265
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1265
+Problem: When GPM mouse support is enabled double clicks in xterm do not
+ work.
+Solution: Use KS_GPM_MOUSE for GPM mouse events.
+Files: src/term.c, src/os_unix.c, src/keymap.h
+
+
+*** ../vim-8.1.1264/src/term.c 2019-05-03 21:10:32.261521512 +0200
+--- src/term.c 2019-05-04 16:45:00.727934730 +0200
+***************
+*** 4396,4404 ****
+ # endif
+ #endif
+ int cpo_koffset;
+- #ifdef FEAT_MOUSE_GPM
+- extern int gpm_flag; /* gpm library variable */
+- #endif
+
+ cpo_koffset = (vim_strchr(p_cpo, CPO_KOFFSET) != NULL);
+
+--- 4396,4401 ----
+***************
+*** 5122,5127 ****
+--- 5119,5127 ----
+ * If it is a mouse click, get the coordinates.
+ */
+ if (key_name[0] == KS_MOUSE
++ # ifdef FEAT_MOUSE_GPM
++ || key_name[0] == KS_GPM_MOUSE
++ # endif
+ # ifdef FEAT_MOUSE_JSB
+ || key_name[0] == KS_JSBTERM_MOUSE
+ # endif
+***************
+*** 5144,5150 ****
+
+ # if !defined(UNIX) || defined(FEAT_MOUSE_XTERM) || defined(FEAT_GUI) \
+ || defined(FEAT_MOUSE_GPM) || defined(FEAT_SYSMOUSE)
+! if (key_name[0] == (int)KS_MOUSE)
+ {
+ /*
+ * For xterm we get "<t_mouse>scr", where
+--- 5144,5154 ----
+
+ # if !defined(UNIX) || defined(FEAT_MOUSE_XTERM) || defined(FEAT_GUI) \
+ || defined(FEAT_MOUSE_GPM) || defined(FEAT_SYSMOUSE)
+! if (key_name[0] == KS_MOUSE
+! # ifdef FEAT_MOUSE_GPM
+! || key_name[0] == KS_GPM_MOUSE
+! # endif
+! )
+ {
+ /*
+ * For xterm we get "<t_mouse>scr", where
+***************
+*** 5274,5282 ****
+ modifiers = 0;
+ }
+
+! if (key_name[0] == (int)KS_MOUSE
+ # ifdef FEAT_MOUSE_URXVT
+! || key_name[0] == (int)KS_URXVT_MOUSE
+ # endif
+ || key_name[0] == KS_SGR_MOUSE
+ || key_name[0] == KS_SGR_MOUSE_RELEASE)
+--- 5278,5289 ----
+ modifiers = 0;
+ }
+
+! if (key_name[0] == KS_MOUSE
+! # ifdef FEAT_MOUSE_GPM
+! || key_name[0] == KS_GPM_MOUSE
+! # endif
+ # ifdef FEAT_MOUSE_URXVT
+! || key_name[0] == KS_URXVT_MOUSE
+ # endif
+ || key_name[0] == KS_SGR_MOUSE
+ || key_name[0] == KS_SGR_MOUSE_RELEASE)
+***************
+*** 5293,5299 ****
+ && !gui.in_use
+ # endif
+ # ifdef FEAT_MOUSE_GPM
+! && gpm_flag == 0
+ # endif
+ )
+ {
+--- 5300,5306 ----
+ && !gui.in_use
+ # endif
+ # ifdef FEAT_MOUSE_GPM
+! && key_name[0] != KS_GPM_MOUSE
+ # endif
+ )
+ {
+***************
+*** 5342,5348 ****
+ }
+ # endif /* !UNIX || FEAT_MOUSE_XTERM */
+ # ifdef FEAT_MOUSE_NET
+! if (key_name[0] == (int)KS_NETTERM_MOUSE)
+ {
+ int mc, mr;
+
+--- 5349,5355 ----
+ }
+ # endif /* !UNIX || FEAT_MOUSE_XTERM */
+ # ifdef FEAT_MOUSE_NET
+! if (key_name[0] == KS_NETTERM_MOUSE)
+ {
+ int mc, mr;
+
+***************
+*** 5365,5371 ****
+ }
+ # endif /* FEAT_MOUSE_NET */
+ # ifdef FEAT_MOUSE_JSB
+! if (key_name[0] == (int)KS_JSBTERM_MOUSE)
+ {
+ int mult, val, iter, button, status;
+
+--- 5372,5378 ----
+ }
+ # endif /* FEAT_MOUSE_NET */
+ # ifdef FEAT_MOUSE_JSB
+! if (key_name[0] == KS_JSBTERM_MOUSE)
+ {
+ int mult, val, iter, button, status;
+
+***************
+*** 5489,5495 ****
+ }
+ # endif /* FEAT_MOUSE_JSB */
+ # ifdef FEAT_MOUSE_DEC
+! if (key_name[0] == (int)KS_DEC_MOUSE)
+ {
+ /* The DEC Locator Input Model
+ * Netterm delivers the code sequence:
+--- 5496,5502 ----
+ }
+ # endif /* FEAT_MOUSE_JSB */
+ # ifdef FEAT_MOUSE_DEC
+! if (key_name[0] == KS_DEC_MOUSE)
+ {
+ /* The DEC Locator Input Model
+ * Netterm delivers the code sequence:
+***************
+*** 5624,5630 ****
+ }
+ # endif /* FEAT_MOUSE_DEC */
+ # ifdef FEAT_MOUSE_PTERM
+! if (key_name[0] == (int)KS_PTERM_MOUSE)
+ {
+ int button, num_clicks, action;
+
+--- 5631,5637 ----
+ }
+ # endif /* FEAT_MOUSE_DEC */
+ # ifdef FEAT_MOUSE_PTERM
+! if (key_name[0] == KS_PTERM_MOUSE)
+ {
+ int button, num_clicks, action;
+
+***************
+*** 5705,5718 ****
+ {
+ # ifdef CHECK_DOUBLE_CLICK
+ # ifdef FEAT_MOUSE_GPM
+- # ifdef FEAT_GUI
+ /*
+! * Only for Unix, when GUI or gpm is not active, we handle
+! * multi-clicks here.
+ */
+! if (gpm_flag == 0 && !gui.in_use)
+ # else
+! if (gpm_flag == 0)
+ # endif
+ # else
+ # ifdef FEAT_GUI
+--- 5712,5725 ----
+ {
+ # ifdef CHECK_DOUBLE_CLICK
+ # ifdef FEAT_MOUSE_GPM
+ /*
+! * Only for Unix, when GUI not active, we handle
+! * multi-clicks here, but not for GPM mouse events.
+ */
+! # ifdef FEAT_GUI
+! if (key_name[0] != KS_GPM_MOUSE && !gui.in_use)
+ # else
+! if (key_name[0] != KS_GPM_MOUSE)
+ # endif
+ # else
+ # ifdef FEAT_GUI
+***************
+*** 5800,5806 ****
+
+ /* Work out our pseudo mouse event. Note that MOUSE_RELEASE gets
+ * added, then it's not mouse up/down. */
+! key_name[0] = (int)KS_EXTRA;
+ if (wheel_code != 0
+ && (wheel_code & MOUSE_RELEASE) != MOUSE_RELEASE)
+ {
+--- 5807,5813 ----
+
+ /* Work out our pseudo mouse event. Note that MOUSE_RELEASE gets
+ * added, then it's not mouse up/down. */
+! key_name[0] = KS_EXTRA;
+ if (wheel_code != 0
+ && (wheel_code & MOUSE_RELEASE) != MOUSE_RELEASE)
+ {
+*** ../vim-8.1.1264/src/os_unix.c 2019-05-03 23:15:34.048180407 +0200
+--- src/os_unix.c 2019-05-04 16:33:38.907403683 +0200
+***************
+*** 3794,3800 ****
+ && !gui.in_use
+ # endif
+ )
+! set_mouse_termcode(KS_MOUSE, (char_u *)IF_EB("\033MG", ESC_STR "MG"));
+ # endif
+
+ # ifdef FEAT_SYSMOUSE
+--- 3794,3803 ----
+ && !gui.in_use
+ # endif
+ )
+! set_mouse_termcode(KS_GPM_MOUSE,
+! (char_u *)IF_EB("\033MG", ESC_STR "MG"));
+! else
+! del_mouse_termcode(KS_GPM_MOUSE);
+ # endif
+
+ # ifdef FEAT_SYSMOUSE
+***************
+*** 7065,7071 ****
+ Gpm_Close();
+ }
+
+! /* Reads gpm event and adds special keys to input buf. Returns length of
+ * generated key sequence.
+ * This function is styled after gui_send_mouse_event().
+ */
+--- 7068,7075 ----
+ Gpm_Close();
+ }
+
+! /*
+! * Reads gpm event and adds special keys to input buf. Returns length of
+ * generated key sequence.
+ * This function is styled after gui_send_mouse_event().
+ */
+*** ../vim-8.1.1264/src/keymap.h 2018-05-01 18:40:08.000000000 +0200
+--- src/keymap.h 2019-05-04 16:32:53.487632660 +0200
+***************
+*** 114,119 ****
+--- 114,122 ----
+ #define KS_SGR_MOUSE 237
+ #define KS_SGR_MOUSE_RELEASE 236
+
++ /* Used for the GPM mouse. */
++ #define KS_GPM_MOUSE 235
++
+ /*
+ * Filler used after KS_SPECIAL and others
+ */
+*** ../vim-8.1.1264/src/version.c 2019-05-04 16:55:15.786921815 +0200
+--- src/version.c 2019-05-04 16:57:04.670178629 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1265,
+ /**/
+
+--
+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.1266 b/data/vim/patches/8.1.1266
new file mode 100644
index 000000000..b327cd9e1
--- /dev/null
+++ b/data/vim/patches/8.1.1266
@@ -0,0 +1,84 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1266
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1266
+Problem: Winbar test doesn't test enough.
+Solution: Check that the WinBar actually shows up. Correct check for clicks
+ with no effect. (Ben Jackson, closes #4338)
+Files: src/testdir/test_winbar.vim
+
+
+*** ../vim-8.1.1265/src/testdir/test_winbar.vim 2019-05-04 16:06:08.915310869 +0200
+--- src/testdir/test_winbar.vim 2019-05-04 17:26:50.707828258 +0200
+***************
+*** 4,13 ****
+--- 4,18 ----
+ finish
+ endif
+
++ source shared.vim
++
+ func Test_add_remove_menu()
+ new
+ amenu 1.10 WinBar.Next :let g:did_next = 11<CR>
+ amenu 1.20 WinBar.Cont :let g:did_cont = 12<CR>
++ redraw
++ call assert_match('Next Cont', Screenline(1))
++
+ emenu WinBar.Next
+ call assert_equal(11, g:did_next)
+ emenu WinBar.Cont
+***************
+*** 28,33 ****
+--- 33,39 ----
+ amenu 1.20 WinBar.Cont :let g:did_cont = 12<CR>
+ amenu 1.30 WinBar.Close :close<CR>
+ redraw
++ call assert_match('Next Cont Close', Screenline(1))
+
+ let save_mouse = &mouse
+ set mouse=a
+***************
+*** 38,44 ****
+ let g:did_next = 0
+ let g:did_cont = 0
+ for col in [1, 8, 9, 16, 17, 25, 26]
+! call test_setmouse(1, 1)
+ call feedkeys("\<LeftMouse>", "xt")
+ call assert_equal(0, g:did_next, 'col ' .. col)
+ call assert_equal(0, g:did_cont, 'col ' .. col)
+--- 44,50 ----
+ let g:did_next = 0
+ let g:did_cont = 0
+ for col in [1, 8, 9, 16, 17, 25, 26]
+! call test_setmouse(1, col)
+ call feedkeys("\<LeftMouse>", "xt")
+ call assert_equal(0, g:did_next, 'col ' .. col)
+ call assert_equal(0, g:did_cont, 'col ' .. col)
+*** ../vim-8.1.1265/src/version.c 2019-05-04 16:58:41.617537336 +0200
+--- src/version.c 2019-05-04 17:29:25.247006408 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1266,
+ /**/
+
+--
+ARTHUR: But if he was dying, he wouldn't bother to carve
+ "Aaaaarrrrrrggghhh". He'd just say it.
+BROTHER MAYNARD: It's down there carved in stone.
+GALAHAD: Perhaps he was dictating.
+ "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.1267 b/data/vim/patches/8.1.1267
new file mode 100644
index 000000000..f94fe4050
--- /dev/null
+++ b/data/vim/patches/8.1.1267
@@ -0,0 +1,129 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1267
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1267
+Problem: Cannot check if GPM mouse support is working.
+Solution: Add the "mouse_gpm_enable" feature.
+Files: src/evalfunc.c, src/os_unix.c, src/proto/os_unix.pro,
+ runtime/doc/eval.txt
+
+
+*** ../vim-8.1.1266/src/evalfunc.c 2019-05-04 15:47:25.629423511 +0200
+--- src/evalfunc.c 2019-05-04 17:14:45.007701328 +0200
+***************
+*** 6810,6815 ****
+--- 6810,6819 ----
+ else if (STRICMP(name, "netbeans_enabled") == 0)
+ n = netbeans_active();
+ #endif
++ #ifdef FEAT_MOUSE_GPM
++ else if (STRICMP(name, "mouse_gpm_enabled") == 0)
++ n = gpm_enabled();
++ #endif
+ #if defined(FEAT_TERMINAL) && defined(MSWIN)
+ else if (STRICMP(name, "terminal") == 0)
+ n = terminal_enabled();
+*** ../vim-8.1.1266/src/os_unix.c 2019-05-04 16:58:41.617537336 +0200
+--- src/os_unix.c 2019-05-04 17:32:01.574164411 +0200
+***************
+*** 7022,7028 ****
+ }
+ #endif /* !HAVE_RENAME */
+
+! #ifdef FEAT_MOUSE_GPM
+ /*
+ * Initializes connection with gpm (if it isn't already opened)
+ * Return 1 if succeeded (or connection already opened), 0 if failed
+--- 7022,7028 ----
+ }
+ #endif /* !HAVE_RENAME */
+
+! #if defined(FEAT_MOUSE_GPM) || defined(PROTO)
+ /*
+ * Initializes connection with gpm (if it isn't already opened)
+ * Return 1 if succeeded (or connection already opened), 0 if failed
+***************
+*** 7059,7070 ****
+ }
+
+ /*
+ * Closes connection to gpm
+ */
+ static void
+ gpm_close(void)
+ {
+! if (gpm_flag && gpm_fd >= 0) /* if Open */
+ Gpm_Close();
+ }
+
+--- 7059,7079 ----
+ }
+
+ /*
++ * Returns TRUE if the GPM mouse is enabled.
++ */
++ int
++ gpm_enabled(void)
++ {
++ return gpm_flag && gpm_fd >= 0;
++ }
++
++ /*
+ * Closes connection to gpm
+ */
+ static void
+ gpm_close(void)
+ {
+! if (gpm_enabled())
+ Gpm_Close();
+ }
+
+*** ../vim-8.1.1266/src/proto/os_unix.pro 2019-04-28 22:50:36.157248454 +0200
+--- src/proto/os_unix.pro 2019-05-04 17:16:15.015180036 +0200
+***************
+*** 72,77 ****
+--- 72,78 ----
+ int mch_has_exp_wildcard(char_u *p);
+ int mch_has_wildcard(char_u *p);
+ int mch_rename(const char *src, const char *dest);
++ int gpm_enabled(void);
+ int mch_libcall(char_u *libname, char_u *funcname, char_u *argstring, int argint, char_u **string_result, int *number_result);
+ void setup_term_clip(void);
+ void start_xterm_trace(int button);
+*** ../vim-8.1.1266/runtime/doc/eval.txt 2019-05-04 15:47:25.633423491 +0200
+--- runtime/doc/eval.txt 2019-05-04 17:33:42.425616784 +0200
+***************
+*** 10470,10475 ****
+--- 10532,10538 ----
+ mouse Compiled with support mouse.
+ mouse_dec Compiled with support for Dec terminal mouse.
+ mouse_gpm Compiled with support for gpm (Linux console mouse)
++ mouse_gpm_enabled GPM mouse is working
+ mouse_netterm Compiled with support for netterm mouse.
+ mouse_pterm Compiled with support for qnx pterm mouse.
+ mouse_sysmouse Compiled with support for sysmouse (*BSD console mouse)
+*** ../vim-8.1.1266/src/version.c 2019-05-04 17:30:02.502806618 +0200
+--- src/version.c 2019-05-04 17:31:16.134410093 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1267,
+ /**/
+
+--
+LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall?
+ARTHUR: No, that's Saint Ives.
+ "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.1268 b/data/vim/patches/8.1.1268
new file mode 100644
index 000000000..7b8bd14ef
--- /dev/null
+++ b/data/vim/patches/8.1.1268
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1268
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1268
+Problem: Map completion test fails in GUI.
+Solution: Skip the test that fails.
+Files: src/testdir/test_cmdline.vim
+
+
+*** ../vim-8.1.1267/src/testdir/test_cmdline.vim 2019-05-03 21:10:32.261521512 +0200
+--- src/testdir/test_cmdline.vim 2019-05-04 19:26:40.093869561 +0200
+***************
+*** 111,118 ****
+ call feedkeys(":map \<Esc>[17~x f6x\<CR>", 'xt')
+ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <Left>', getreg(':'))
+! call feedkeys(":map \<Esc>[17~\<Tab>\<Home>\"\<CR>", 'xt')
+! call assert_equal("\"map <F6>x", getreg(':'))
+ unmap <Left>
+ call feedkeys(":unmap \<Esc>[17~x\<CR>", 'xt')
+ set cpo-=<
+--- 111,120 ----
+ call feedkeys(":map \<Esc>[17~x f6x\<CR>", 'xt')
+ call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <Left>', getreg(':'))
+! if !has('gui_running')
+! call feedkeys(":map \<Esc>[17~\<Tab>\<Home>\"\<CR>", 'xt')
+! call assert_equal("\"map <F6>x", getreg(':'))
+! endif
+ unmap <Left>
+ call feedkeys(":unmap \<Esc>[17~x\<CR>", 'xt')
+ set cpo-=<
+*** ../vim-8.1.1267/src/version.c 2019-05-04 17:34:30.653353882 +0200
+--- src/version.c 2019-05-04 19:24:44.282479634 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1268,
+ /**/
+
+--
+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.1269 b/data/vim/patches/8.1.1269
new file mode 100644
index 000000000..1dd4fd93f
--- /dev/null
+++ b/data/vim/patches/8.1.1269
@@ -0,0 +1,106 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1269
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1269
+Problem: MS-Windows GUI: multibyte chars with a 0x80 byte do not work when
+ compiled with VIMDLL.
+Solution: Adjust the condition for fixing the input buffer. (Ken Takata,
+ closes #4330)
+Files: src/getchar.c
+
+
+*** ../vim-8.1.1268/src/getchar.c 2019-05-03 15:13:53.754898750 +0200
+--- src/getchar.c 2019-05-04 19:57:35.709453545 +0200
+***************
+*** 3095,3101 ****
+
+ /*
+ * Fix typed characters for use by vgetc() and check_termcode().
+! * buf[] must have room to triple the number of bytes!
+ * Returns the new length.
+ */
+ int
+--- 3095,3101 ----
+
+ /*
+ * Fix typed characters for use by vgetc() and check_termcode().
+! * "buf[]" must have room to triple the number of bytes!
+ * Returns the new length.
+ */
+ int
+***************
+*** 3135,3148 ****
+ else
+ #endif
+ if (p[0] == NUL || (p[0] == K_SPECIAL
+! /* timeout may generate K_CURSORHOLD */
+ && (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD)
+ #if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL))
+ # ifdef VIMDLL
+! && !gui.in_use
+ # endif
+! /* Win32 console passes modifiers */
+! && (i < 2 || p[1] != KS_MODIFIER)
+ #endif
+ ))
+ {
+--- 3135,3149 ----
+ else
+ #endif
+ if (p[0] == NUL || (p[0] == K_SPECIAL
+! // timeout may generate K_CURSORHOLD
+ && (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD)
+ #if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL))
++ // Win32 console passes modifiers
++ && (
+ # ifdef VIMDLL
+! gui.in_use ||
+ # endif
+! (i < 2 || p[1] != KS_MODIFIER))
+ #endif
+ ))
+ {
+***************
+*** 3154,3160 ****
+ len += 2;
+ }
+ }
+! *p = NUL; /* add trailing NUL */
+ return len;
+ }
+
+--- 3155,3161 ----
+ len += 2;
+ }
+ }
+! *p = NUL; // add trailing NUL
+ return len;
+ }
+
+*** ../vim-8.1.1268/src/version.c 2019-05-04 19:26:52.865802079 +0200
+--- src/version.c 2019-05-04 19:59:19.404816473 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1269,
+ /**/
+
+--
+ [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.1270 b/data/vim/patches/8.1.1270
new file mode 100644
index 000000000..0a7248263
--- /dev/null
+++ b/data/vim/patches/8.1.1270
@@ -0,0 +1,736 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1270
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1270
+Problem: Cannot see current match position.
+Solution: Show "3/44" when using the "n" command and "S" is not in
+ 'shortmess'. (Christian Brabandt, closes #4317)
+Files: runtime/doc/options.txt, runtime/doc/pattern.txt, src/option.c,
+ src/option.h, src/search.c, src/testdir/Make_all.mak,
+ src/testdir/test_search_stat.vim
+
+
+*** ../vim-8.1.1269/runtime/doc/options.txt 2019-04-28 18:04:56.054492198 +0200
+--- runtime/doc/options.txt 2019-05-04 20:39:29.300113211 +0200
+***************
+*** 1789,1795 ****
+ 'scrolloff' + 0 no scroll offset
+ 'shelltemp' - {unchanged} {set vim default only on resetting 'cp'}
+ 'shiftround' + off indent not rounded to shiftwidth
+! 'shortmess' & "" no shortening of messages
+ 'showcmd' & off command characters not shown
+ 'showmode' & off current mode not shown
+ 'sidescrolloff' + 0 cursor moves to edge of screen in scroll
+--- 1789,1795 ----
+ 'scrolloff' + 0 no scroll offset
+ 'shelltemp' - {unchanged} {set vim default only on resetting 'cp'}
+ 'shiftround' + off indent not rounded to shiftwidth
+! 'shortmess' & "S" no shortening of messages
+ 'showcmd' & off command characters not shown
+ 'showmode' & off current mode not shown
+ 'sidescrolloff' + 0 cursor moves to edge of screen in scroll
+***************
+*** 6563,6570 ****
+ function to get the effective shiftwidth value.
+
+ *'shortmess'* *'shm'*
+! 'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "",
+! POSIX default: "A")
+ global
+ This option helps to avoid all the |hit-enter| prompts caused by file
+ messages, for example with CTRL-G, and to avoid some other messages.
+--- 6563,6570 ----
+ function to get the effective shiftwidth value.
+
+ *'shortmess'* *'shm'*
+! 'shortmess' 'shm' string (Vim default "filnxtToOS", Vi default: "S",
+! POSIX default: "AS")
+ global
+ This option helps to avoid all the |hit-enter| prompts caused by file
+ messages, for example with CTRL-G, and to avoid some other messages.
+***************
+*** 6604,6609 ****
+--- 6604,6611 ----
+ q use "recording" instead of "recording @a"
+ F don't give the file info when editing a file, like `:silent`
+ was used for the command
++ S do not show search count message when searching, e.g.
++ "[1/5]"
+
+ This gives you the opportunity to avoid that a change between buffers
+ requires you to hit <Enter>, but still gives as useful a message as
+*** ../vim-8.1.1269/runtime/doc/pattern.txt 2019-01-31 15:34:35.864056935 +0100
+--- runtime/doc/pattern.txt 2019-05-04 20:40:26.891793904 +0200
+***************
+*** 152,157 ****
+--- 152,168 ----
+ All matches for the last used search pattern will be highlighted if you set
+ the 'hlsearch' option. This can be suspended with the |:nohlsearch| command.
+
++ When 'shortmess' does not include the "S" flag, Vim will automatically show an
++ index, on which the cursor is. This can look like this: >
++
++ [1/5] Cursor is on first of 5 matches.
++ [1/>99] Cursor is on first of more than 99 matches.
++ [>99/>99] Cursor is after 99 match of more than 99 matches.
++ [?/??] Unknown how many matches exists, generating the
++ statistics was aborted because of search timeout.
++
++ Note: the count does not take offset into account.
++
+ When no match is found you get the error: *E486* Pattern not found
+ Note that for the |:global| command this behaves like a normal message, for Vi
+ compatibility. For the |:s| command the "e" flag can be used to avoid the
+***************
+*** 293,298 ****
+--- 304,317 ----
+ the "*" is under your right hand middle finger (search to the right and down).
+ (this depends on your keyboard layout though).
+
++ *E956*
++ In very rare cases a regular expression is used recursively. This can happen
++ when executing a pattern takes a long time and when checking for messages on
++ channels a callback is invoked that also uses a pattern or an autocommand is
++ triggered. In most cases this should be fine, but if a pattern is in use when
++ it's used again it fails. Usually this means there is something wrong with
++ the pattern.
++
+ ==============================================================================
+ 2. The definition of a pattern *search-pattern* *pattern* *[pattern]*
+ *regular-expression* *regexp* *Pattern*
+*** ../vim-8.1.1269/src/option.c 2019-04-28 19:46:17.034060084 +0200
+--- src/option.c 2019-05-04 20:12:23.560448086 +0200
+***************
+*** 2449,2455 ****
+ {(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,
+--- 2449,2455 ----
+ {(char_u *)8L, (char_u *)0L} SCTX_INIT},
+ {"shortmess", "shm", P_STRING|P_VIM|P_FLAGLIST,
+ (char_u *)&p_shm, PV_NONE,
+! {(char_u *)"S", (char_u *)"filnxtToOS"}
+ SCTX_INIT},
+ {"shortname", "sn", P_BOOL|P_VI_DEF,
+ (char_u *)&p_sn, PV_SN,
+***************
+*** 3311,3317 ****
+ if (mch_getenv((char_u *)"VIM_POSIX") != NULL)
+ {
+ set_string_default("cpo", (char_u *)CPO_ALL);
+! set_string_default("shm", (char_u *)"A");
+ }
+
+ /*
+--- 3311,3317 ----
+ if (mch_getenv((char_u *)"VIM_POSIX") != NULL)
+ {
+ set_string_default("cpo", (char_u *)CPO_ALL);
+! set_string_default("shm", (char_u *)SHM_POSIX);
+ }
+
+ /*
+*** ../vim-8.1.1269/src/option.h 2019-04-28 18:04:56.058492178 +0200
+--- src/option.h 2019-05-04 20:41:45.615356951 +0200
+***************
+*** 183,209 ****
+ #define COCU_ALL "nvic" /* flags for 'concealcursor' */
+
+ /* characters for p_shm option: */
+! #define SHM_RO 'r' /* readonly */
+! #define SHM_MOD 'm' /* modified */
+! #define SHM_FILE 'f' /* (file 1 of 2) */
+! #define SHM_LAST 'i' /* last line incomplete */
+! #define SHM_TEXT 'x' /* tx instead of textmode */
+! #define SHM_LINES 'l' /* "L" instead of "lines" */
+! #define SHM_NEW 'n' /* "[New]" instead of "[New file]" */
+! #define SHM_WRI 'w' /* "[w]" instead of "written" */
+! #define SHM_A "rmfixlnw" /* represented by 'a' flag */
+! #define SHM_WRITE 'W' /* don't use "written" at all */
+! #define SHM_TRUNC 't' /* truncate file messages */
+! #define SHM_TRUNCALL 'T' /* truncate all messages */
+! #define SHM_OVER 'o' /* overwrite file messages */
+! #define SHM_OVERALL 'O' /* overwrite more messages */
+! #define SHM_SEARCH 's' /* no search hit bottom messages */
+! #define SHM_ATTENTION 'A' /* no ATTENTION messages */
+! #define SHM_INTRO 'I' /* intro messages */
+! #define SHM_COMPLETIONMENU 'c' /* completion menu messages */
+! #define SHM_RECORDING 'q' /* short recording message */
+! #define SHM_FILEINFO 'F' /* no file info messages */
+! #define SHM_ALL "rmfixlnwaWtToOsAIcqF" /* all possible flags for 'shm' */
+
+ /* characters for p_go: */
+ #define GO_TERMINAL '!' /* use terminal for system commands */
+--- 183,211 ----
+ #define COCU_ALL "nvic" /* flags for 'concealcursor' */
+
+ /* characters for p_shm option: */
+! #define SHM_RO 'r' // readonly
+! #define SHM_MOD 'm' // modified
+! #define SHM_FILE 'f' // (file 1 of 2)
+! #define SHM_LAST 'i' // last line incomplete
+! #define SHM_TEXT 'x' // tx instead of textmode
+! #define SHM_LINES 'l' // "L" instead of "lines"
+! #define SHM_NEW 'n' // "[New]" instead of "[New file]"
+! #define SHM_WRI 'w' // "[w]" instead of "written"
+! #define SHM_A "rmfixlnw" // represented by 'a' flag
+! #define SHM_WRITE 'W' // don't use "written" at all
+! #define SHM_TRUNC 't' // truncate file messages
+! #define SHM_TRUNCALL 'T' // truncate all messages
+! #define SHM_OVER 'o' // overwrite file messages
+! #define SHM_OVERALL 'O' // overwrite more messages
+! #define SHM_SEARCH 's' // no search hit bottom messages
+! #define SHM_ATTENTION 'A' // no ATTENTION messages
+! #define SHM_INTRO 'I' // intro messages
+! #define SHM_COMPLETIONMENU 'c' // completion menu messages
+! #define SHM_RECORDING 'q' // short recording message
+! #define SHM_FILEINFO 'F' // no file info messages
+! #define SHM_SEARCHCOUNT 'S' // search stats: '[1/10]'
+! #define SHM_POSIX "AS" // POSIX value
+! #define SHM_ALL "rmfixlnwaWtToOsAIcqFS" // all possible flags for 'shm'
+
+ /* characters for p_go: */
+ #define GO_TERMINAL '!' /* use terminal for system commands */
+*** ../vim-8.1.1269/src/search.c 2019-04-06 14:22:17.754642647 +0200
+--- src/search.c 2019-05-04 20:54:06.096065458 +0200
+***************
+*** 26,31 ****
+--- 26,32 ----
+ #ifdef FEAT_VIMINFO
+ static void wvsp_one(FILE *fp, int idx, char *s, int sc);
+ #endif
++ static void search_stat(int dirc, pos_T *pos, char_u *msgbuf);
+
+ /*
+ * This file contains various searching-related routines. These fall into
+***************
+*** 1216,1221 ****
+--- 1217,1224 ----
+ char_u *dircp;
+ char_u *strcopy = NULL;
+ char_u *ps;
++ char_u *msgbuf = NULL;
++ size_t len;
+
+ /*
+ * A line offset is not remembered, this is vi compatible.
+***************
+*** 1374,1401 ****
+ if ((options & SEARCH_ECHO) && messaging()
+ && !cmd_silent && msg_silent == 0)
+ {
+- char_u *msgbuf;
+ char_u *trunc;
+
+ if (*searchstr == NUL)
+ p = spats[0].pat;
+ else
+ p = searchstr;
+! msgbuf = alloc((unsigned)(STRLEN(p) + 40));
+ if (msgbuf != NULL)
+ {
+ msgbuf[0] = dirc;
+ if (enc_utf8 && utf_iscomposing(utf_ptr2char(p)))
+ {
+! /* Use a space to draw the composing char on. */
+ msgbuf[1] = ' ';
+! STRCPY(msgbuf + 2, p);
+ }
+ else
+! STRCPY(msgbuf + 1, p);
+ if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
+ {
+! p = msgbuf + STRLEN(msgbuf);
+ *p++ = dirc;
+ if (spats[0].off.end)
+ *p++ = 'e';
+--- 1377,1427 ----
+ if ((options & SEARCH_ECHO) && messaging()
+ && !cmd_silent && msg_silent == 0)
+ {
+ char_u *trunc;
+
++ // Compute msg_row early.
++ msg_start();
++
+ if (*searchstr == NUL)
+ p = spats[0].pat;
+ else
+ p = searchstr;
+!
+! if (!shortmess(SHM_SEARCHCOUNT))
+! {
+! // Reserve enough space for the search pattern + offset +
+! // search stat.
+! if (msg_scrolled != 0)
+! // Use all the columns.
+! len = (int)(Rows - msg_row) * Columns - 1;
+! else
+! // Use up to 'showcmd' column.
+! len = (int)(Rows - msg_row - 1) * Columns + sc_col - 1;
+! if (len < STRLEN(p) + 40 + 11)
+! len = STRLEN(p) + 40 + 11;
+! }
+! else
+! // Reserve enough space for the search pattern + offset.
+! len = STRLEN(p) + 40;
+!
+! msgbuf = alloc((int)len);
+ if (msgbuf != NULL)
+ {
++ vim_memset(msgbuf, ' ', len);
+ msgbuf[0] = dirc;
++ msgbuf[len - 1] = NUL;
++
+ if (enc_utf8 && utf_iscomposing(utf_ptr2char(p)))
+ {
+! // Use a space to draw the composing char on.
+ msgbuf[1] = ' ';
+! STRNCPY(msgbuf + 2, p, STRLEN(p));
+ }
+ else
+! STRNCPY(msgbuf + 1, p, STRLEN(p));
+ if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
+ {
+! p = msgbuf + STRLEN(p) + 1;
+ *p++ = dirc;
+ if (spats[0].off.end)
+ *p++ = 'e';
+***************
+*** 1404,1448 ****
+ if (spats[0].off.off > 0 || spats[0].off.line)
+ *p++ = '+';
+ if (spats[0].off.off != 0 || spats[0].off.line)
+! sprintf((char *)p, "%ld", spats[0].off.off);
+! else
+! *p = NUL;
+ }
+
+- msg_start();
+ trunc = msg_strtrunc(msgbuf, FALSE);
+
+ #ifdef FEAT_RIGHTLEFT
+! /* The search pattern could be shown on the right in rightleft
+! * mode, but the 'ruler' and 'showcmd' area use it too, thus
+! * it would be blanked out again very soon. Show it on the
+! * left, but do reverse the text. */
+ if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
+ {
+ char_u *r;
+
+! r = reverse_text(trunc != NULL ? trunc : msgbuf);
+ if (r != NULL)
+ {
+! vim_free(trunc);
+! trunc = r;
+ }
+ }
+ #endif
+! if (trunc != NULL)
+! {
+! msg_outtrans(trunc);
+! vim_free(trunc);
+! }
+! else
+! msg_outtrans(msgbuf);
+ msg_clr_eos();
+ msg_check();
+- vim_free(msgbuf);
+
+ gotocmdline(FALSE);
+ out_flush();
+! msg_nowait = TRUE; /* don't wait for this message */
+ }
+ }
+
+--- 1430,1479 ----
+ if (spats[0].off.off > 0 || spats[0].off.line)
+ *p++ = '+';
+ if (spats[0].off.off != 0 || spats[0].off.line)
+! {
+! int l = 0;
+! l = sprintf((char *)p, "%ld", spats[0].off.off);
+! p[l] = ' '; // remove NUL from sprintf
+! }
+ }
+
+ trunc = msg_strtrunc(msgbuf, FALSE);
++ if (trunc != NULL)
++ {
++ vim_free(msgbuf);
++ msgbuf = trunc;
++ }
+
+ #ifdef FEAT_RIGHTLEFT
+! // The search pattern could be shown on the right in rightleft
+! // mode, but the 'ruler' and 'showcmd' area use it too, thus
+! // it would be blanked out again very soon. Show it on the
+! // left, but do reverse the text.
+ if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
+ {
+ char_u *r;
+
+! r = reverse_text(msgbuf);
+ if (r != NULL)
+ {
+! vim_free(msgbuf);
+! msgbuf = r;
+! // move reversed text to beginning of buffer
+! while (*r != NUL && *r == ' ')
+! r++;
+! mch_memmove(msgbuf, r, msgbuf + STRLEN(msgbuf) - r);
+! // overwrite old text
+! vim_memset(r, ' ', msgbuf + STRLEN(msgbuf) - r);
+ }
+ }
+ #endif
+! msg_outtrans(msgbuf);
+ msg_clr_eos();
+ msg_check();
+
+ gotocmdline(FALSE);
+ out_flush();
+! msg_nowait = TRUE; // don't wait for this message
+ }
+ }
+
+***************
+*** 1488,1494 ****
+ RE_LAST, (linenr_T)0, tm, timed_out);
+
+ if (dircp != NULL)
+! *dircp = dirc; /* restore second '/' or '?' for normal_cmd() */
+ if (c == FAIL)
+ {
+ retval = 0;
+--- 1519,1531 ----
+ RE_LAST, (linenr_T)0, tm, timed_out);
+
+ if (dircp != NULL)
+! *dircp = dirc; // restore second '/' or '?' for normal_cmd()
+!
+! if (!shortmess(SHM_SEARCH)
+! && ((dirc == '/' && LT_POS(pos, curwin->w_cursor))
+! || (dirc == '?' && LT_POS(curwin->w_cursor, pos))))
+! ui_delay(500L, FALSE); // leave some time for top_bot_msg
+!
+ if (c == FAIL)
+ {
+ retval = 0;
+***************
+*** 1537,1542 ****
+--- 1574,1588 ----
+ }
+ }
+
++ // Show [1/15] if 'S' is not in 'shortmess'.
++ if ((options & SEARCH_ECHO)
++ && messaging()
++ && !(cmd_silent + msg_silent)
++ && c != FAIL
++ && !shortmess(SHM_SEARCHCOUNT)
++ && msgbuf != NULL)
++ search_stat(dirc, &pos, msgbuf);
++
+ /*
+ * The search command can be followed by a ';' to do another search.
+ * For example: "/pat/;/foo/+3;?bar"
+***************
+*** 1567,1572 ****
+--- 1613,1619 ----
+ if ((options & SEARCH_KEEP) || cmdmod.keeppatterns)
+ spats[0].off = old_off;
+ vim_free(strcopy);
++ vim_free(msgbuf);
+
+ return retval;
+ }
+***************
+*** 4857,4862 ****
+--- 4904,5027 ----
+ }
+ #endif
+
++ /*
++ * Add the search count "[3/19]" to "msgbuf".
++ */
++ static void
++ search_stat(
++ int dirc,
++ pos_T *pos,
++ char_u *msgbuf)
++ {
++ int save_ws = p_ws;
++ int wraparound = FALSE;
++ pos_T p = (*pos);
++ static pos_T lastpos = {0, 0, 0};
++ static int cur = 0;
++ static int cnt = 0;
++ static int chgtick = 0;
++ static char_u *lastpat = NULL;
++ static buf_T *lbuf = NULL;
++ #ifdef FEAT_RELTIME
++ proftime_T start;
++ #endif
++ #define OUT_OF_TIME 999
++
++ wraparound = ((dirc == '?' && LT_POS(lastpos, p))
++ || (dirc == '/' && LT_POS(p, lastpos)));
++
++ // If anything relevant changed the count has to be recomputed.
++ // MB_STRNICMP ignores case, but we should not ignore case.
++ // Unfortunately, there is no MB_STRNICMP function.
++ if (!(chgtick == CHANGEDTICK(curbuf)
++ && MB_STRNICMP(lastpat, spats[last_idx].pat, STRLEN(lastpat)) == 0
++ && STRLEN(lastpat) == STRLEN(spats[last_idx].pat)
++ && EQUAL_POS(lastpos, curwin->w_cursor)
++ && lbuf == curbuf) || wraparound || cur < 0 || cur > 99)
++ {
++ cur = 0;
++ cnt = 0;
++ CLEAR_POS(&lastpos);
++ lbuf = curbuf;
++ }
++
++ if (EQUAL_POS(lastpos, curwin->w_cursor) && !wraparound
++ && (dirc == '/' ? cur < cnt : cur > 0))
++ cur += dirc == '/' ? 1 : -1;
++ else
++ {
++ p_ws = FALSE;
++ #ifdef FEAT_RELTIME
++ profile_setlimit(20L, &start);
++ #endif
++ while (!got_int && searchit(curwin, curbuf, &lastpos, NULL,
++ FORWARD, NULL, 1, SEARCH_PEEK + SEARCH_KEEP,
++ RE_LAST, (linenr_T)0, NULL, NULL) != FAIL)
++ {
++ #ifdef FEAT_RELTIME
++ // Stop after passing the time limit.
++ if (profile_passed_limit(&start))
++ {
++ cnt = OUT_OF_TIME;
++ cur = OUT_OF_TIME;
++ break;
++ }
++ #endif
++ cnt++;
++ if (LTOREQ_POS(lastpos, p))
++ cur++;
++ fast_breakcheck();
++ if (cnt > 99)
++ break;
++ }
++ if (got_int)
++ cur = -1; // abort
++ }
++ if (cur > 0)
++ {
++ #define STAT_BUF_LEN 10
++ char t[STAT_BUF_LEN] = "";
++
++ #ifdef FEAT_RIGHTLEFT
++ if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
++ {
++ if (cur == OUT_OF_TIME)
++ vim_snprintf(t, STAT_BUF_LEN, "[?/??]");
++ else if (cnt > 99 && cur > 99)
++ vim_snprintf(t, STAT_BUF_LEN, "[>99/>99]");
++ else if (cnt > 99)
++ vim_snprintf(t, STAT_BUF_LEN, "[>99/%d]", cur);
++ else
++ vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cnt, cur);
++ }
++ else
++ #endif
++ {
++ if (cur == OUT_OF_TIME)
++ vim_snprintf(t, STAT_BUF_LEN, "[?/??]");
++ else if (cnt > 99 && cur > 99)
++ vim_snprintf(t, STAT_BUF_LEN, "[>99/>99]");
++ else if (cnt > 99)
++ vim_snprintf(t, STAT_BUF_LEN, "[%d/>99]", cur);
++ else
++ vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt);
++ }
++ STRNCPY(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t));
++ if (dirc == '?' && cur == 100)
++ cur = -1;
++
++ vim_free(lastpat);
++ lastpat = vim_strsave(spats[last_idx].pat);
++ chgtick = CHANGEDTICK(curbuf);
++ lbuf = curbuf;
++ lastpos = p;
++
++ // keep the message even after redraw
++ give_warning(msgbuf, FALSE);
++ }
++ p_ws = save_ws;
++ }
++
+ #if defined(FEAT_FIND_ID) || defined(PROTO)
+ /*
+ * Find identifiers or defines in included files.
+*** ../vim-8.1.1269/src/testdir/Make_all.mak 2019-04-28 18:04:56.062492159 +0200
+--- src/testdir/Make_all.mak 2019-05-04 20:20:01.218364660 +0200
+***************
+*** 219,224 ****
+--- 219,225 ----
+ test_scroll_opt \
+ test_scrollbind \
+ test_search \
++ test_search_stat \
+ test_searchpos \
+ test_set \
+ test_sha256 \
+***************
+*** 388,393 ****
+--- 389,395 ----
+ test_scriptnames.res \
+ test_scrollbind.res \
+ test_search.res \
++ test_search_stat.res \
+ test_shortpathname.res \
+ test_signals.res \
+ test_signs.res \
+*** ../vim-8.1.1269/src/testdir/test_search_stat.vim 2019-05-04 21:07:16.848124792 +0200
+--- src/testdir/test_search_stat.vim 2019-05-04 21:00:59.010048385 +0200
+***************
+*** 0 ****
+--- 1,108 ----
++ " Tests for search_stats, when "S" is not in 'shortmess'
++ "
++ " This test is fragile, it might not work interactively, but it works when run
++ " as test!
++
++ func! Test_search_stat()
++ new
++ set shortmess-=S
++ call append(0, repeat(['foobar', 'foo', 'fooooobar', 'foba', 'foobar'], 10))
++
++ " 1) match at second line
++ call cursor(1, 1)
++ let @/ = 'fo*\(bar\?\)\?'
++ let g:a = execute(':unsilent :norm! n')
++ let stat = '\[2/50\]'
++ let pat = escape(@/, '()*?'). '\s\+'
++ call assert_match(pat .. stat, g:a)
++
++ " 2) Match at last line
++ call cursor(line('$')-2, 1)
++ let g:a = execute(':unsilent :norm! n')
++ let stat = '\[50/50\]'
++ call assert_match(pat .. stat, g:a)
++
++ " 3) No search stat
++ set shortmess+=S
++ call cursor(1, 1)
++ let stat = '\[2/50\]'
++ let g:a = execute(':unsilent :norm! n')
++ call assert_notmatch(pat .. stat, g:a)
++ set shortmess-=S
++
++ " 4) Many matches
++ call cursor(line('$')-2, 1)
++ let @/ = '.'
++ let pat = escape(@/, '()*?'). '\s\+'
++ let g:a = execute(':unsilent :norm! n')
++ let stat = '\[>99/>99\]'
++ call assert_match(pat .. stat, g:a)
++
++ " 5) Many matches
++ call cursor(1, 1)
++ let g:a = execute(':unsilent :norm! n')
++ let stat = '\[2/>99\]'
++ call assert_match(pat .. stat, g:a)
++
++ " 6) right-left
++ if exists("+rightleft")
++ set rl
++ call cursor(1,1)
++ let @/ = 'foobar'
++ let pat = 'raboof/\s\+'
++ let g:a = execute(':unsilent :norm! n')
++ let stat = '\[20/2\]'
++ call assert_match(pat .. stat, g:a)
++ set norl
++ endif
++
++ " 7) right-left bottom
++ if exists("+rightleft")
++ set rl
++ call cursor('$',1)
++ let pat = 'raboof?\s\+'
++ let g:a = execute(':unsilent :norm! N')
++ let stat = '\[20/20\]'
++ call assert_match(pat .. stat, g:a)
++ set norl
++ endif
++
++ " 8) right-left back at top
++ if exists("+rightleft")
++ set rl
++ call cursor('$',1)
++ let pat = 'raboof/\s\+'
++ let g:a = execute(':unsilent :norm! n')
++ let stat = '\[20/1\]'
++ call assert_match(pat .. stat, g:a)
++ call assert_match('search hit BOTTOM, continuing at TOP', g:a)
++ set norl
++ endif
++
++ " 9) normal, back at top
++ call cursor(1,1)
++ let @/ = 'foobar'
++ let pat = '?foobar\s\+'
++ let g:a = execute(':unsilent :norm! N')
++ let stat = '\[20/20\]'
++ call assert_match(pat .. stat, g:a)
++ call assert_match('search hit TOP, continuing at BOTTOM', g:a)
++
++ " 10) normal, no match
++ call cursor(1,1)
++ let @/ = 'zzzzzz'
++ let g:a = ''
++ try
++ let g:a = execute(':unsilent :norm! n')
++ catch /^Vim\%((\a\+)\)\=:E486/
++ let stat = ''
++ " error message is not redir'ed to g:a, it is empty
++ call assert_true(empty(g:a))
++ catch
++ call assert_false(1)
++ endtry
++
++ " close the window
++ set shortmess+=S
++ bwipe!
++ endfunc
+*** ../vim-8.1.1269/src/version.c 2019-05-04 19:59:56.544589575 +0200
+--- src/version.c 2019-05-04 21:07:03.180195105 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1270,
+ /**/
+
+--
+Dreams are free, but there's a small charge for alterations.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1271 b/data/vim/patches/8.1.1271
new file mode 100644
index 000000000..be4c38bad
--- /dev/null
+++ b/data/vim/patches/8.1.1271
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1271
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1271 (after 8.1.1270)
+Problem: Compiler warnings for use of STRNCPY(). (John Marriott)
+Solution: Use mch_memmove() instead of STRNCPY().
+Files: src/search.c
+
+
+*** ../vim-8.1.1270/src/search.c 2019-05-04 21:08:17.119814244 +0200
+--- src/search.c 2019-05-05 12:59:29.260505205 +0200
+***************
+*** 1415,1424 ****
+ {
+ // Use a space to draw the composing char on.
+ msgbuf[1] = ' ';
+! STRNCPY(msgbuf + 2, p, STRLEN(p));
+ }
+ else
+! STRNCPY(msgbuf + 1, p, STRLEN(p));
+ if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
+ {
+ p = msgbuf + STRLEN(p) + 1;
+--- 1415,1424 ----
+ {
+ // Use a space to draw the composing char on.
+ msgbuf[1] = ' ';
+! mch_memmove(msgbuf + 2, p, STRLEN(p));
+ }
+ else
+! mch_memmove(msgbuf + 1, p, STRLEN(p));
+ if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
+ {
+ p = msgbuf + STRLEN(p) + 1;
+***************
+*** 5006,5012 ****
+ else
+ vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt);
+ }
+! STRNCPY(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t));
+ if (dirc == '?' && cur == 100)
+ cur = -1;
+
+--- 5006,5012 ----
+ else
+ vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt);
+ }
+! mch_memmove(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t));
+ if (dirc == '?' && cur == 100)
+ cur = -1;
+
+*** ../vim-8.1.1270/src/version.c 2019-05-04 21:08:17.119814244 +0200
+--- src/version.c 2019-05-05 13:00:50.092066257 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1271,
+ /**/
+
+--
+VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur
+ and his knights seemed hopeless, when, suddenly ... the animator
+ suffered a fatal heart attack.
+ANIMATOR: Aaaaagh!
+VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could
+ continue.
+ "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.1272 b/data/vim/patches/8.1.1272
new file mode 100644
index 000000000..1a512c897
--- /dev/null
+++ b/data/vim/patches/8.1.1272
@@ -0,0 +1,126 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1272
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1272
+Problem: Click on WinBar of other window not tested.
+Solution: Add a test case.
+Files: src/testdir/test_winbar.vim
+
+
+*** ../vim-8.1.1271/src/testdir/test_winbar.vim 2019-05-04 17:30:02.498806639 +0200
+--- src/testdir/test_winbar.vim 2019-05-05 13:13:01.676081521 +0200
+***************
+*** 27,46 ****
+ close
+ endfunc
+
+! func Test_click_in_winbar()
+! new
+ amenu 1.10 WinBar.Next :let g:did_next = 11<CR>
+ amenu 1.20 WinBar.Cont :let g:did_cont = 12<CR>
+ amenu 1.30 WinBar.Close :close<CR>
+ redraw
+ call assert_match('Next Cont Close', Screenline(1))
+
+ let save_mouse = &mouse
+ set mouse=a
+
+- " Columns of the button edges:
+- " _Next_ _Cont_ _Close_
+- " 2 7 10 15 18 24
+ let g:did_next = 0
+ let g:did_cont = 0
+ for col in [1, 8, 9, 16, 17, 25, 26]
+--- 27,50 ----
+ close
+ endfunc
+
+! " Create a WinBar with three buttons.
+! " Columns of the button edges:
+! " _Next_ _Cont_ _Close_
+! " 2 7 10 15 18 24
+! func SetupWinbar()
+ amenu 1.10 WinBar.Next :let g:did_next = 11<CR>
+ amenu 1.20 WinBar.Cont :let g:did_cont = 12<CR>
+ amenu 1.30 WinBar.Close :close<CR>
+ redraw
+ call assert_match('Next Cont Close', Screenline(1))
++ endfunc
+
++ func Test_click_in_winbar()
++ new
++ call SetupWinbar()
+ let save_mouse = &mouse
+ set mouse=a
+
+ let g:did_next = 0
+ let g:did_cont = 0
+ for col in [1, 8, 9, 16, 17, 25, 26]
+***************
+*** 71,73 ****
+--- 75,112 ----
+
+ let &mouse = save_mouse
+ endfunc
++
++ func Test_click_in_other_winbar()
++ new
++ call SetupWinbar()
++ let save_mouse = &mouse
++ set mouse=a
++ let winid = win_getid()
++
++ split
++ let [row, col] = win_screenpos(winid)
++
++ " Click on Next button in other window
++ let g:did_next = 0
++ call test_setmouse(row, 5)
++ call feedkeys("\<LeftMouse>", "xt")
++ call assert_equal(11, g:did_next)
++
++ " Click on Cont button in other window from Visual mode
++ let g:did_cont = 0
++ call setline(1, 'select XYZ here')
++ call test_setmouse(row, 12)
++ call feedkeys("0fXvfZ\<LeftMouse>x", "xt")
++ call assert_equal(12, g:did_cont)
++ call assert_equal('select here', getline(1))
++
++ " Click on Close button in other window
++ let wincount = winnr('$')
++ let winid = win_getid()
++ call test_setmouse(row, 20)
++ call feedkeys("\<LeftMouse>", "xt")
++ call assert_equal(wincount - 1, winnr('$'))
++ call assert_equal(winid, win_getid())
++
++ bwipe!
++ endfunc
+*** ../vim-8.1.1271/src/version.c 2019-05-05 13:02:05.659655348 +0200
+--- src/version.c 2019-05-05 13:13:39.827873300 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1272,
+ /**/
+
+--
+BEDEVERE: Look! It's the old man from scene 24 - what's he Doing here?
+ARTHUR: He is the keeper of the Bridge. He asks each traveler five
+ questions ...
+GALAHAD: Three questions.
+ "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.1273 b/data/vim/patches/8.1.1273
new file mode 100644
index 000000000..a7502155e
--- /dev/null
+++ b/data/vim/patches/8.1.1273
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1273
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1273
+Problem: Compiler warning in direct write code.
+Solution: Add a type cast.
+Files: src/gui_dwrite.cpp
+
+
+*** ../vim-8.1.1272/src/gui_dwrite.cpp 2019-03-25 22:48:14.699379700 +0100
+--- src/gui_dwrite.cpp 2019-05-05 13:18:45.622497721 +0200
+***************
+*** 949,955 ****
+ if (mDrawing)
+ {
+ hr = mRT->EndDraw();
+! if (hr == D2DERR_RECREATE_TARGET)
+ {
+ hr = S_OK;
+ DiscardDeviceResources();
+--- 949,955 ----
+ if (mDrawing)
+ {
+ hr = mRT->EndDraw();
+! if (hr == (HRESULT)D2DERR_RECREATE_TARGET)
+ {
+ hr = S_OK;
+ DiscardDeviceResources();
+*** ../vim-8.1.1272/src/version.c 2019-05-05 13:14:24.815627694 +0200
+--- src/version.c 2019-05-05 13:19:34.702273290 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1273,
+ /**/
+
+--
+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.1274 b/data/vim/patches/8.1.1274
new file mode 100644
index 000000000..572546ba1
--- /dev/null
+++ b/data/vim/patches/8.1.1274
@@ -0,0 +1,91 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1274
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1274
+Problem: After :unmenu can still execute the menu with :emenu.
+Solution: Do not execute a menu that was disabled for the specified mode.
+Files: src/menu.c, src/testdir/test_menu.vim
+
+
+*** ../vim-8.1.1273/src/menu.c 2019-05-04 16:55:15.786921815 +0200
+--- src/menu.c 2019-05-05 14:08:55.709800738 +0200
+***************
+*** 2337,2343 ****
+ if (idx == -1 || eap == NULL)
+ idx = MENU_INDEX_NORMAL;
+
+! if (idx != MENU_INDEX_INVALID && menu->strings[idx] != NULL)
+ {
+ /* When executing a script or function execute the commands right now.
+ * Also for the window toolbar.
+--- 2337,2344 ----
+ if (idx == -1 || eap == NULL)
+ idx = MENU_INDEX_NORMAL;
+
+! if (idx != MENU_INDEX_INVALID && menu->strings[idx] != NULL
+! && (menu->modes & (1 << idx)))
+ {
+ /* When executing a script or function execute the commands right now.
+ * Also for the window toolbar.
+*** ../vim-8.1.1273/src/testdir/test_menu.vim 2018-10-19 22:35:04.889189955 +0200
+--- src/testdir/test_menu.vim 2019-05-05 14:18:23.034607663 +0200
+***************
+*** 54,61 ****
+ 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>
+--- 54,76 ----
+ emenu c Test.FooBar
+ call assert_equal('cmdline', g:did_menu)
+
+! nunmenu Test.FooBar
+! call assert_fails('emenu n Test.FooBar', 'E335: Menu not defined for Normal mode')
+! vunmenu Test.FooBar
+! call assert_fails('emenu v Test.FooBar', 'E335: Menu not defined for Visual mode')
+! vmenu 2 Test.FooBar :let g:did_menu = 'visual'<CR>
+! sunmenu Test.FooBar
+! call assert_fails('emenu s Test.FooBar', 'E335: Menu not defined for Select mode')
+! ounmenu Test.FooBar
+! call assert_fails('emenu o Test.FooBar', 'E335: Menu not defined for Op-pending mode')
+! iunmenu Test.FooBar
+! call assert_fails('emenu i Test.FooBar', 'E335: Menu not defined for Insert mode')
+! cunmenu Test.FooBar
+! call assert_fails('emenu c Test.FooBar', 'E335: Menu not defined for Cmdline mode')
+ tlunmenu Test.FooBar
++ call assert_fails('emenu t Test.FooBar', 'E335: Menu not defined for Terminal mode')
++
++ aunmenu Test.FooBar
+ call assert_fails('emenu n Test.FooBar', 'E334:')
+
+ nmenu 2 Test.FooBar.Child :let g:did_menu = 'foobar'<CR>
+*** ../vim-8.1.1273/src/version.c 2019-05-05 13:19:59.322159435 +0200
+--- src/version.c 2019-05-05 14:10:37.625221849 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1274,
+ /**/
+
+--
+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.1275 b/data/vim/patches/8.1.1275
new file mode 100644
index 000000000..be6dd626d
--- /dev/null
+++ b/data/vim/patches/8.1.1275
@@ -0,0 +1,1026 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1275
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1275
+Problem: Cannot navigate to errors before/after the cursor.
+Solution: Add the :cbefore and :cafter commands. (Yegappan Lakshmanan,
+ closes #4340)
+Files: runtime/doc/index.txt, runtime/doc/quickfix.txt, src/ex_cmdidxs.h,
+ src/ex_cmds.h, src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.1274/runtime/doc/index.txt 2019-05-03 21:56:31.363540578 +0200
+--- runtime/doc/index.txt 2019-05-05 14:56:42.134251046 +0200
+***************
+*** 1144,1152 ****
+ |:caddbuffer| :cad[dbuffer] add errors from buffer
+ |:caddexpr| :cadde[xpr] add errors from expr
+ |:caddfile| :caddf[ile] add error message to current quickfix list
+ |:call| :cal[l] call a function
+ |:catch| :cat[ch] part of a :try command
+! |:cbelow| :cbe[low] got to error below current line
+ |:cbottom| :cbo[ttom] scroll to the bottom of the quickfix window
+ |:cbuffer| :cb[uffer] parse error messages and jump to first error
+ |:cc| :cc go to specific error
+--- 1196,1206 ----
+ |:caddbuffer| :cad[dbuffer] add errors from buffer
+ |:caddexpr| :cadde[xpr] add errors from expr
+ |:caddfile| :caddf[ile] add error message to current quickfix list
++ |:cafter| :caf[ter] go to error after current cursor
+ |:call| :cal[l] call a function
+ |:catch| :cat[ch] part of a :try command
+! |:cbefore| :cbef[ore] go to error before current cursor
+! |:cbelow| :cbel[ow] go to error below current line
+ |:cbottom| :cbo[ttom] scroll to the bottom of the quickfix window
+ |:cbuffer| :cb[uffer] parse error messages and jump to first error
+ |:cc| :cc go to specific error
+***************
+*** 1308,1317 ****
+ |:laddexpr| :lad[dexpr] add locations from expr
+ |:laddbuffer| :laddb[uffer] add locations from buffer
+ |:laddfile| :laddf[ile] add locations to current location list
+ |:last| :la[st] go to the last file in the argument list
+ |:language| :lan[guage] set the language (locale)
+ |:later| :lat[er] go to newer change, redo
+! |:lbelow| :lbe[low] go to location below current line
+ |:lbottom| :lbo[ttom] scroll to the bottom of the location window
+ |:lbuffer| :lb[uffer] parse locations and jump to first location
+ |:lcd| :lc[d] change directory locally
+--- 1362,1373 ----
+ |:laddexpr| :lad[dexpr] add locations from expr
+ |:laddbuffer| :laddb[uffer] add locations from buffer
+ |:laddfile| :laddf[ile] add locations to current location list
++ |:lafter| :laf[ter] go to location after current cursor
+ |:last| :la[st] go to the last file in the argument list
+ |:language| :lan[guage] set the language (locale)
+ |:later| :lat[er] go to newer change, redo
+! |:lbefore| :lbef[ore] go to location before current cursor
+! |:lbelow| :lbel[ow] go to location below current line
+ |:lbottom| :lbo[ttom] scroll to the bottom of the location window
+ |:lbuffer| :lb[uffer] parse locations and jump to first location
+ |:lcd| :lc[d] change directory locally
+--- 1707,1712 ----
+*** ../vim-8.1.1274/runtime/doc/quickfix.txt 2019-05-04 15:05:24.927269310 +0200
+--- runtime/doc/quickfix.txt 2019-05-05 14:56:42.134251046 +0200
+***************
+*** 152,159 ****
+ exceeds the number of entries below the current line,
+ then the last error in the file is selected.
+
+! *:lbe* *:lbelow*
+! :[count]lbe[low] Same as ":cbelow", except the location list for the
+ current window is used instead of the quickfix list.
+
+ *:cnf* *:cnfile*
+--- 152,187 ----
+ exceeds the number of entries below the current line,
+ then the last error in the file is selected.
+
+! *:lbel* *:lbelow*
+! :[count]lbel[ow] Same as ":cbelow", except the location list for the
+! current window is used instead of the quickfix list.
+!
+! *:cbe* *:cbefore*
+! :[count]cbe[fore] Go to the [count] error before the current cursor
+! position in the current buffer. If [count] is
+! omitted, then 1 is used. If there are no errors, then
+! an error message is displayed. Assumes that the
+! entries in a quickfix list are sorted by their buffer,
+! line and column numbers. If [count] exceeds the
+! number of entries before the current position, then
+! the first error in the file is selected.
+!
+! *:lbef* *:lbefore*
+! :[count]lbef[ore] Same as ":cbefore", except the location list for the
+! current window is used instead of the quickfix list.
+!
+! *:caf* *:cafter*
+! :[count]caf[ter] Go to the [count] error after the current cursor
+! position in the current buffer. If [count] is
+! omitted, then 1 is used. If there are no errors, then
+! an error message is displayed. Assumes that the
+! entries in a quickfix list are sorted by their buffer,
+! line and column numbers. If [count] exceeds the
+! number of entries after the current position, then
+! the last error in the file is selected.
+!
+! *:laf* *:lafter*
+! :[count]laf[ter] Same as ":cafter", except the location list for the
+ current window is used instead of the quickfix list.
+
+ *:cnf* *:cnfile*
+*** ../vim-8.1.1274/src/ex_cmdidxs.h 2019-05-03 21:56:31.363540578 +0200
+--- src/ex_cmdidxs.h 2019-05-05 14:56:42.134251046 +0200
+***************
+*** 8,36 ****
+ /* a */ 0,
+ /* b */ 19,
+ /* c */ 42,
+! /* d */ 105,
+! /* e */ 127,
+! /* f */ 147,
+! /* g */ 163,
+! /* h */ 169,
+! /* i */ 178,
+! /* j */ 196,
+! /* k */ 198,
+! /* l */ 203,
+! /* m */ 263,
+! /* n */ 281,
+! /* o */ 301,
+! /* p */ 313,
+! /* q */ 352,
+! /* r */ 355,
+! /* s */ 375,
+! /* t */ 443,
+! /* u */ 488,
+! /* v */ 499,
+! /* w */ 517,
+! /* x */ 531,
+! /* y */ 540,
+! /* z */ 541
+ };
+
+ /*
+--- 8,36 ----
+ /* a */ 0,
+ /* b */ 19,
+ /* c */ 42,
+! /* d */ 107,
+! /* e */ 129,
+! /* f */ 149,
+! /* g */ 165,
+! /* h */ 171,
+! /* i */ 180,
+! /* j */ 198,
+! /* k */ 200,
+! /* l */ 205,
+! /* m */ 267,
+! /* n */ 285,
+! /* o */ 305,
+! /* p */ 317,
+! /* q */ 356,
+! /* r */ 359,
+! /* s */ 379,
+! /* t */ 447,
+! /* u */ 492,
+! /* v */ 503,
+! /* w */ 521,
+! /* x */ 535,
+! /* y */ 544,
+! /* z */ 545
+ };
+
+ /*
+***************
+*** 43,49 ****
+ { /* a b c d e f g h i j k l m n o p q r s t u v w x y z */
+ /* a */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 0, 0, 0, 7, 15, 0, 16, 0, 0, 0, 0, 0 },
+ /* b */ { 2, 0, 0, 4, 5, 7, 0, 0, 0, 0, 0, 8, 9, 10, 11, 12, 0, 13, 0, 0, 0, 0, 22, 0, 0, 0 },
+! /* c */ { 3, 11, 14, 16, 18, 20, 23, 0, 0, 0, 0, 31, 35, 38, 44, 53, 55, 56, 57, 0, 59, 0, 62, 0, 0, 0 },
+ /* d */ { 0, 0, 0, 0, 0, 0, 0, 0, 6, 15, 0, 16, 0, 0, 17, 0, 0, 19, 20, 0, 0, 0, 0, 0, 0, 0 },
+ /* e */ { 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0 },
+ /* f */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0 },
+--- 43,49 ----
+ { /* a b c d e f g h i j k l m n o p q r s t u v w x y z */
+ /* a */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 0, 0, 0, 7, 15, 0, 16, 0, 0, 0, 0, 0 },
+ /* b */ { 2, 0, 0, 4, 5, 7, 0, 0, 0, 0, 0, 8, 9, 10, 11, 12, 0, 13, 0, 0, 0, 0, 22, 0, 0, 0 },
+! /* c */ { 3, 12, 16, 18, 20, 22, 25, 0, 0, 0, 0, 33, 37, 40, 46, 55, 57, 58, 59, 0, 61, 0, 64, 0, 0, 0 },
+ /* d */ { 0, 0, 0, 0, 0, 0, 0, 0, 6, 15, 0, 16, 0, 0, 17, 0, 0, 19, 20, 0, 0, 0, 0, 0, 0, 0 },
+ /* e */ { 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0 },
+ /* f */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0 },
+***************
+*** 52,58 ****
+ /* i */ { 1, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 5, 6, 0, 0, 0, 0, 0, 13, 0, 15, 0, 0, 0, 0, 0 },
+ /* j */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
+ /* k */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+! /* l */ { 3, 10, 13, 17, 18, 22, 25, 30, 0, 0, 0, 32, 35, 38, 42, 48, 0, 50, 59, 51, 52, 56, 58, 0, 0, 0 },
+ /* m */ { 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 },
+ /* n */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 10, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0 },
+ /* o */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 0, 0, 0, 0, 0, 0, 9, 0, 11, 0, 0, 0 },
+--- 52,58 ----
+ /* i */ { 1, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 5, 6, 0, 0, 0, 0, 0, 13, 0, 15, 0, 0, 0, 0, 0 },
+ /* j */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
+ /* k */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+! /* l */ { 3, 11, 15, 19, 20, 24, 27, 32, 0, 0, 0, 34, 37, 40, 44, 50, 0, 52, 61, 53, 54, 58, 60, 0, 0, 0 },
+ /* m */ { 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 },
+ /* n */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 10, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0 },
+ /* o */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 0, 0, 0, 0, 0, 0, 9, 0, 11, 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 = 554;
+--- 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 = 558;
+*** ../vim-8.1.1274/src/ex_cmds.h 2019-05-04 15:05:24.927269310 +0200
+--- src/ex_cmds.h 2019-05-05 14:56:42.134251046 +0200
+***************
+*** 266,271 ****
+--- 266,274 ----
+ EX(CMD_caddfile, "caddfile", ex_cfile,
+ TRLBAR|FILE1,
+ ADDR_NONE),
++ EX(CMD_cafter, "cafter", ex_cbelow,
++ RANGE|COUNT|TRLBAR,
++ ADDR_UNSIGNED),
+ EX(CMD_call, "call", ex_call,
+ RANGE|NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
+ ADDR_LINES),
+***************
+*** 275,280 ****
+--- 278,286 ----
+ EX(CMD_cbuffer, "cbuffer", ex_cbuffer,
+ BANG|RANGE|WORD1|TRLBAR,
+ ADDR_OTHER),
++ EX(CMD_cbefore, "cbefore", ex_cbelow,
++ RANGE|COUNT|TRLBAR,
++ ADDR_UNSIGNED),
+ EX(CMD_cbelow, "cbelow", ex_cbelow,
+ RANGE|COUNT|TRLBAR,
+ ADDR_UNSIGNED),
+***************
+*** 749,760 ****
+--- 755,772 ----
+ EX(CMD_laddfile, "laddfile", ex_cfile,
+ TRLBAR|FILE1,
+ ADDR_NONE),
++ EX(CMD_lafter, "lafter", ex_cbelow,
++ RANGE|COUNT|TRLBAR,
++ ADDR_UNSIGNED),
+ EX(CMD_later, "later", ex_later,
+ TRLBAR|EXTRA|NOSPC|CMDWIN,
+ ADDR_NONE),
+ EX(CMD_lbuffer, "lbuffer", ex_cbuffer,
+ BANG|RANGE|WORD1|TRLBAR,
+ ADDR_OTHER),
++ EX(CMD_lbefore, "lbefore", ex_cbelow,
++ RANGE|COUNT|TRLBAR,
++ ADDR_UNSIGNED),
+ EX(CMD_lbelow, "lbelow", ex_cbelow,
+ RANGE|COUNT|TRLBAR,
+ ADDR_UNSIGNED),
+*** ../vim-8.1.1274/src/quickfix.c 2019-05-04 15:05:24.927269310 +0200
+--- src/quickfix.c 2019-05-05 14:56:42.138251022 +0200
+***************
+*** 5128,5163 ****
+ }
+
+ /*
+! * Find the first quickfix entry below line 'lnum' in buffer 'bnr'.
+ * 'qfp' points to the very first entry in the buffer and 'errornr' is the
+ * index of the very first entry in the quickfix list.
+! * Returns NULL if an entry is not found after 'lnum'.
+ */
+ static qfline_T *
+! qf_find_entry_on_next_line(
+ int bnr,
+! linenr_T lnum,
+ qfline_T *qfp,
+ int *errornr)
+ {
+! if (qfp->qf_lnum > lnum)
+! // First entry is after line 'lnum'
+ return qfp;
+
+! // Find the entry just before or at the line 'lnum'
+ while (qfp->qf_next != NULL
+ && qfp->qf_next->qf_fnum == bnr
+! && qfp->qf_next->qf_lnum <= lnum)
+ {
+ qfp = qfp->qf_next;
+ ++*errornr;
+ }
+
+ if (qfp->qf_next == NULL || qfp->qf_next->qf_fnum != bnr)
+! // No entries found after 'lnum'
+ return NULL;
+
+! // Use the entry just after line 'lnum'
+ qfp = qfp->qf_next;
+ ++*errornr;
+
+--- 5128,5227 ----
+ }
+
+ /*
+! * Returns TRUE if the specified quickfix entry is
+! * after the given line (linewise is TRUE)
+! * or after the line and column.
+! */
+! static int
+! qf_entry_after_pos(qfline_T *qfp, pos_T *pos, int linewise)
+! {
+! if (linewise)
+! return qfp->qf_lnum > pos->lnum;
+! else
+! return (qfp->qf_lnum > pos->lnum ||
+! (qfp->qf_lnum == pos->lnum && qfp->qf_col > pos->col));
+! }
+!
+! /*
+! * Returns TRUE if the specified quickfix entry is
+! * before the given line (linewise is TRUE)
+! * or before the line and column.
+! */
+! static int
+! qf_entry_before_pos(qfline_T *qfp, pos_T *pos, int linewise)
+! {
+! if (linewise)
+! return qfp->qf_lnum < pos->lnum;
+! else
+! return (qfp->qf_lnum < pos->lnum ||
+! (qfp->qf_lnum == pos->lnum && qfp->qf_col < pos->col));
+! }
+!
+! /*
+! * Returns TRUE if the specified quickfix entry is
+! * on or after the given line (linewise is TRUE)
+! * or on or after the line and column.
+! */
+! static int
+! qf_entry_on_or_after_pos(qfline_T *qfp, pos_T *pos, int linewise)
+! {
+! if (linewise)
+! return qfp->qf_lnum >= pos->lnum;
+! else
+! return (qfp->qf_lnum > pos->lnum ||
+! (qfp->qf_lnum == pos->lnum && qfp->qf_col >= pos->col));
+! }
+!
+! /*
+! * Returns TRUE if the specified quickfix entry is
+! * on or before the given line (linewise is TRUE)
+! * or on or before the line and column.
+! */
+! static int
+! qf_entry_on_or_before_pos(qfline_T *qfp, pos_T *pos, int linewise)
+! {
+! if (linewise)
+! return qfp->qf_lnum <= pos->lnum;
+! else
+! return (qfp->qf_lnum < pos->lnum ||
+! (qfp->qf_lnum == pos->lnum && qfp->qf_col <= pos->col));
+! }
+!
+! /*
+! * Find the first quickfix entry after position 'pos' in buffer 'bnr'.
+! * If 'linewise' is TRUE, returns the entry after the specified line and treats
+! * multiple entries on a single line as one. Otherwise returns the entry after
+! * the specified line and column.
+ * 'qfp' points to the very first entry in the buffer and 'errornr' is the
+ * index of the very first entry in the quickfix list.
+! * Returns NULL if an entry is not found after 'pos'.
+ */
+ static qfline_T *
+! qf_find_entry_after_pos(
+ int bnr,
+! pos_T *pos,
+! int linewise,
+ qfline_T *qfp,
+ int *errornr)
+ {
+! if (qf_entry_after_pos(qfp, pos, linewise))
+! // First entry is after postion 'pos'
+ return qfp;
+
+! // Find the entry just before or at the position 'pos'
+ while (qfp->qf_next != NULL
+ && qfp->qf_next->qf_fnum == bnr
+! && qf_entry_on_or_before_pos(qfp->qf_next, pos, linewise))
+ {
+ qfp = qfp->qf_next;
+ ++*errornr;
+ }
+
+ if (qfp->qf_next == NULL || qfp->qf_next->qf_fnum != bnr)
+! // No entries found after position 'pos'
+ return NULL;
+
+! // Use the entry just after position 'pos'
+ qfp = qfp->qf_next;
+ ++*errornr;
+
+***************
+*** 5165,5210 ****
+ }
+
+ /*
+! * Find the first quickfix entry before line 'lnum' in buffer 'bnr'.
+ * 'qfp' points to the very first entry in the buffer and 'errornr' is the
+ * index of the very first entry in the quickfix list.
+! * Returns NULL if an entry is not found before 'lnum'.
+ */
+ static qfline_T *
+! qf_find_entry_on_prev_line(
+ int bnr,
+! linenr_T lnum,
+ qfline_T *qfp,
+ int *errornr)
+ {
+! // Find the entry just before the line 'lnum'
+ while (qfp->qf_next != NULL
+ && qfp->qf_next->qf_fnum == bnr
+! && qfp->qf_next->qf_lnum < lnum)
+ {
+ qfp = qfp->qf_next;
+ ++*errornr;
+ }
+
+! if (qfp->qf_lnum >= lnum) // entry is after 'lnum'
+ return NULL;
+
+! // If multiple entries are on the same line, then use the first entry
+! qfp = qf_find_first_entry_on_line(qfp, errornr);
+
+ return qfp;
+ }
+
+ /*
+! * Find a quickfix entry in 'qfl' closest to line 'lnum' in buffer 'bnr' in
+ * the direction 'dir'.
+ */
+ static qfline_T *
+ qf_find_closest_entry(
+ qf_list_T *qfl,
+ int bnr,
+! linenr_T lnum,
+ int dir,
+ int *errornr)
+ {
+ qfline_T *qfp;
+--- 5229,5280 ----
+ }
+
+ /*
+! * Find the first quickfix entry before position 'pos' in buffer 'bnr'.
+! * If 'linewise' is TRUE, returns the entry before the specified line and
+! * treats multiple entries on a single line as one. Otherwise returns the entry
+! * before the specified line and column.
+ * 'qfp' points to the very first entry in the buffer and 'errornr' is the
+ * index of the very first entry in the quickfix list.
+! * Returns NULL if an entry is not found before 'pos'.
+ */
+ static qfline_T *
+! qf_find_entry_before_pos(
+ int bnr,
+! pos_T *pos,
+! int linewise,
+ qfline_T *qfp,
+ int *errornr)
+ {
+! // Find the entry just before the position 'pos'
+ while (qfp->qf_next != NULL
+ && qfp->qf_next->qf_fnum == bnr
+! && qf_entry_before_pos(qfp->qf_next, pos, linewise))
+ {
+ qfp = qfp->qf_next;
+ ++*errornr;
+ }
+
+! if (qf_entry_on_or_after_pos(qfp, pos, linewise))
+ return NULL;
+
+! if (linewise)
+! // If multiple entries are on the same line, then use the first entry
+! qfp = qf_find_first_entry_on_line(qfp, errornr);
+
+ return qfp;
+ }
+
+ /*
+! * Find a quickfix entry in 'qfl' closest to position 'pos' in buffer 'bnr' in
+ * the direction 'dir'.
+ */
+ static qfline_T *
+ qf_find_closest_entry(
+ qf_list_T *qfl,
+ int bnr,
+! pos_T *pos,
+ int dir,
++ int linewise,
+ int *errornr)
+ {
+ qfline_T *qfp;
+***************
+*** 5217,5251 ****
+ return NULL; // no entry in this file
+
+ if (dir == FORWARD)
+! qfp = qf_find_entry_on_next_line(bnr, lnum, qfp, errornr);
+ else
+! qfp = qf_find_entry_on_prev_line(bnr, lnum, qfp, errornr);
+
+ return qfp;
+ }
+
+ /*
+! * Get the nth quickfix entry below the specified entry treating multiple
+! * entries on a single line as one. Searches forward in the list.
+ */
+ static qfline_T *
+! qf_get_nth_below_entry(qfline_T *entry, int *errornr, int n)
+ {
+ while (n-- > 0 && !got_int)
+ {
+ qfline_T *first_entry = entry;
+ int first_errornr = *errornr;
+
+! // Treat all the entries on the same line in this file as one
+! entry = qf_find_last_entry_on_line(entry, errornr);
+
+ if (entry->qf_next == NULL
+ || entry->qf_next->qf_fnum != entry->qf_fnum)
+ {
+! // If multiple entries are on the same line, then use the first
+! // entry
+! entry = first_entry;
+! *errornr = first_errornr;
+ break;
+ }
+
+--- 5287,5326 ----
+ return NULL; // no entry in this file
+
+ if (dir == FORWARD)
+! qfp = qf_find_entry_after_pos(bnr, pos, linewise, qfp, errornr);
+ else
+! qfp = qf_find_entry_before_pos(bnr, pos, linewise, qfp, errornr);
+
+ return qfp;
+ }
+
+ /*
+! * Get the nth quickfix entry below the specified entry. Searches forward in
+! * the list. If linewise is TRUE, then treat multiple entries on a single line
+! * as one.
+ */
+ static qfline_T *
+! qf_get_nth_below_entry(qfline_T *entry, int n, int linewise, int *errornr)
+ {
+ while (n-- > 0 && !got_int)
+ {
+ qfline_T *first_entry = entry;
+ int first_errornr = *errornr;
+
+! if (linewise)
+! // Treat all the entries on the same line in this file as one
+! entry = qf_find_last_entry_on_line(entry, errornr);
+
+ if (entry->qf_next == NULL
+ || entry->qf_next->qf_fnum != entry->qf_fnum)
+ {
+! if (linewise)
+! {
+! // If multiple entries are on the same line, then use the first
+! // entry
+! entry = first_entry;
+! *errornr = first_errornr;
+! }
+ break;
+ }
+
+***************
+*** 5257,5267 ****
+ }
+
+ /*
+! * Get the nth quickfix entry above the specified entry treating multiple
+! * entries on a single line as one. Searches backwards in the list.
+ */
+ static qfline_T *
+! qf_get_nth_above_entry(qfline_T *entry, int *errornr, int n)
+ {
+ while (n-- > 0 && !got_int)
+ {
+--- 5332,5343 ----
+ }
+
+ /*
+! * Get the nth quickfix entry above the specified entry. Searches backwards in
+! * the list. If linewise is TRUE, then treat multiple entries on a single line
+! * as one.
+ */
+ static qfline_T *
+! qf_get_nth_above_entry(qfline_T *entry, int n, int linewise, int *errornr)
+ {
+ while (n-- > 0 && !got_int)
+ {
+***************
+*** 5273,5297 ****
+ --*errornr;
+
+ // If multiple entries are on the same line, then use the first entry
+! entry = qf_find_first_entry_on_line(entry, errornr);
+ }
+
+ return entry;
+ }
+
+ /*
+! * Find the n'th quickfix entry adjacent to line 'lnum' in buffer 'bnr' in the
+! * specified direction.
+! * Returns the error number in the quickfix list or 0 if an entry is not found.
+ */
+ static int
+! qf_find_nth_adj_entry(qf_list_T *qfl, int bnr, linenr_T lnum, int n, int dir)
+ {
+ qfline_T *adj_entry;
+ int errornr;
+
+! // Find an entry closest to the specified line
+! adj_entry = qf_find_closest_entry(qfl, bnr, lnum, dir, &errornr);
+ if (adj_entry == NULL)
+ return 0;
+
+--- 5349,5380 ----
+ --*errornr;
+
+ // If multiple entries are on the same line, then use the first entry
+! if (linewise)
+! entry = qf_find_first_entry_on_line(entry, errornr);
+ }
+
+ return entry;
+ }
+
+ /*
+! * Find the n'th quickfix entry adjacent to position 'pos' in buffer 'bnr' in
+! * the specified direction. Returns the error number in the quickfix list or 0
+! * if an entry is not found.
+ */
+ static int
+! qf_find_nth_adj_entry(
+! qf_list_T *qfl,
+! int bnr,
+! pos_T *pos,
+! int n,
+! int dir,
+! int linewise)
+ {
+ qfline_T *adj_entry;
+ int errornr;
+
+! // Find an entry closest to the specified position
+! adj_entry = qf_find_closest_entry(qfl, bnr, pos, dir, linewise, &errornr);
+ if (adj_entry == NULL)
+ return 0;
+
+***************
+*** 5299,5315 ****
+ {
+ // Go to the n'th entry in the current buffer
+ if (dir == FORWARD)
+! adj_entry = qf_get_nth_below_entry(adj_entry, &errornr, n);
+ else
+! adj_entry = qf_get_nth_above_entry(adj_entry, &errornr, n);
+ }
+
+ return errornr;
+ }
+
+ /*
+! * Jump to a quickfix entry in the current file nearest to the current line.
+! * ":cabove", ":cbelow", ":labove" and ":lbelow" commands
+ */
+ void
+ ex_cbelow(exarg_T *eap)
+--- 5382,5402 ----
+ {
+ // Go to the n'th entry in the current buffer
+ if (dir == FORWARD)
+! adj_entry = qf_get_nth_below_entry(adj_entry, n, linewise,
+! &errornr);
+ else
+! adj_entry = qf_get_nth_above_entry(adj_entry, n, linewise,
+! &errornr);
+ }
+
+ return errornr;
+ }
+
+ /*
+! * Jump to a quickfix entry in the current file nearest to the current line or
+! * current line/col.
+! * ":cabove", ":cbelow", ":labove", ":lbelow", ":cafter", ":cbefore",
+! * ":lafter" and ":lbefore" commands
+ */
+ void
+ ex_cbelow(exarg_T *eap)
+***************
+*** 5319,5324 ****
+--- 5406,5412 ----
+ int dir;
+ int buf_has_flag;
+ int errornr = 0;
++ pos_T pos;
+
+ if (eap->addr_count > 0 && eap->line2 <= 0)
+ {
+***************
+*** 5327,5333 ****
+ }
+
+ // Check whether the current buffer has any quickfix entries
+! if (eap->cmdidx == CMD_cabove || eap->cmdidx == CMD_cbelow)
+ buf_has_flag = BUF_HAS_QF_ENTRY;
+ else
+ buf_has_flag = BUF_HAS_LL_ENTRY;
+--- 5415,5422 ----
+ }
+
+ // Check whether the current buffer has any quickfix entries
+! if (eap->cmdidx == CMD_cabove || eap->cmdidx == CMD_cbelow
+! || eap->cmdidx == CMD_cbefore || eap->cmdidx == CMD_cafter)
+ buf_has_flag = BUF_HAS_QF_ENTRY;
+ else
+ buf_has_flag = BUF_HAS_LL_ENTRY;
+***************
+*** 5348,5360 ****
+ return;
+ }
+
+! if (eap->cmdidx == CMD_cbelow || eap->cmdidx == CMD_lbelow)
+ dir = FORWARD;
+ else
+ dir = BACKWARD;
+
+! errornr = qf_find_nth_adj_entry(qfl, curbuf->b_fnum, curwin->w_cursor.lnum,
+! eap->addr_count > 0 ? eap->line2 : 0, dir);
+
+ if (errornr > 0)
+ qf_jump(qi, 0, errornr, FALSE);
+--- 5437,5461 ----
+ return;
+ }
+
+! if (eap->cmdidx == CMD_cbelow
+! || eap->cmdidx == CMD_lbelow
+! || eap->cmdidx == CMD_cafter
+! || eap->cmdidx == CMD_lafter)
+! // Forward motion commands
+ dir = FORWARD;
+ else
+ dir = BACKWARD;
+
+! pos = curwin->w_cursor;
+! // A quickfix entry column number is 1 based whereas cursor column
+! // number is 0 based. Adjust the column number.
+! pos.col++;
+! errornr = qf_find_nth_adj_entry(qfl, curbuf->b_fnum, &pos,
+! eap->addr_count > 0 ? eap->line2 : 0, dir,
+! eap->cmdidx == CMD_cbelow
+! || eap->cmdidx == CMD_lbelow
+! || eap->cmdidx == CMD_cabove
+! || eap->cmdidx == CMD_labove);
+
+ if (errornr > 0)
+ qf_jump(qi, 0, errornr, FALSE);
+*** ../vim-8.1.1274/src/testdir/test_quickfix.vim 2019-05-04 15:05:24.927269310 +0200
+--- src/testdir/test_quickfix.vim 2019-05-05 14:56:42.138251022 +0200
+***************
+*** 39,44 ****
+--- 39,46 ----
+ command! -nargs=0 -count Xcc <count>cc
+ command! -count=1 -nargs=0 Xbelow <mods><count>cbelow
+ command! -count=1 -nargs=0 Xabove <mods><count>cabove
++ command! -count=1 -nargs=0 Xbefore <mods><count>cbefore
++ command! -count=1 -nargs=0 Xafter <mods><count>cafter
+ let g:Xgetlist = function('getqflist')
+ let g:Xsetlist = function('setqflist')
+ call setqflist([], 'f')
+***************
+*** 74,79 ****
+--- 76,83 ----
+ command! -nargs=0 -count Xcc <count>ll
+ command! -count=1 -nargs=0 Xbelow <mods><count>lbelow
+ command! -count=1 -nargs=0 Xabove <mods><count>labove
++ command! -count=1 -nargs=0 Xbefore <mods><count>lbefore
++ command! -count=1 -nargs=0 Xafter <mods><count>lafter
+ let g:Xgetlist = function('getloclist', [0])
+ let g:Xsetlist = function('setloclist', [0])
+ call setloclist(0, [], 'f')
+***************
+*** 4041,4057 ****
+--- 4045,4066 ----
+ endfunc
+
+ " Test for the :cbelow, :cabove, :lbelow and :labove commands.
++ " And for the :cafter, :cbefore, :lafter and :lbefore commands.
+ func Xtest_below(cchar)
+ call s:setup_commands(a:cchar)
+
+ " No quickfix/location list
+ call assert_fails('Xbelow', 'E42:')
+ call assert_fails('Xabove', 'E42:')
++ call assert_fails('Xbefore', 'E42:')
++ call assert_fails('Xafter', 'E42:')
+
+ " Empty quickfix/location list
+ call g:Xsetlist([])
+ call assert_fails('Xbelow', 'E42:')
+ call assert_fails('Xabove', 'E42:')
++ call assert_fails('Xbefore', 'E42:')
++ call assert_fails('Xafter', 'E42:')
+
+ call s:create_test_file('X1')
+ call s:create_test_file('X2')
+***************
+*** 4065,4103 ****
+ call assert_fails('Xabove', 'E42:')
+ call assert_fails('3Xbelow', 'E42:')
+ call assert_fails('4Xabove', 'E42:')
+
+ " Test the commands with various arguments
+! Xexpr ["X1:5:L5", "X2:5:L5", "X2:10:L10", "X2:15:L15", "X3:3:L3"]
+ edit +7 X2
+ Xabove
+ call assert_equal(['X2', 5], [bufname(''), line('.')])
+ call assert_fails('Xabove', 'E553:')
+ normal 2j
+ Xbelow
+ call assert_equal(['X2', 10], [bufname(''), line('.')])
+ " Last error in this file
+ Xbelow 99
+ call assert_equal(['X2', 15], [bufname(''), line('.')])
+ call assert_fails('Xbelow', 'E553:')
+ " First error in this file
+ Xabove 99
+ call assert_equal(['X2', 5], [bufname(''), line('.')])
+ call assert_fails('Xabove', 'E553:')
+ normal gg
+ Xbelow 2
+ call assert_equal(['X2', 10], [bufname(''), line('.')])
+ normal G
+ Xabove 2
+ call assert_equal(['X2', 10], [bufname(''), line('.')])
+ edit X4
+ call assert_fails('Xabove', 'E42:')
+ call assert_fails('Xbelow', 'E42:')
+ if a:cchar == 'l'
+ " If a buffer has location list entries from some other window but not
+ " from the current window, then the commands should fail.
+ edit X1 | split | call setloclist(0, [], 'f')
+ call assert_fails('Xabove', 'E776:')
+ call assert_fails('Xbelow', 'E776:')
+ close
+ endif
+
+--- 4074,4147 ----
+ call assert_fails('Xabove', 'E42:')
+ call assert_fails('3Xbelow', 'E42:')
+ call assert_fails('4Xabove', 'E42:')
++ call assert_fails('Xbefore', 'E42:')
++ call assert_fails('Xafter', 'E42:')
++ call assert_fails('3Xbefore', 'E42:')
++ call assert_fails('4Xafter', 'E42:')
+
+ " Test the commands with various arguments
+! Xexpr ["X1:5:3:L5", "X2:5:2:L5", "X2:10:3:L10", "X2:15:4:L15", "X3:3:5:L3"]
+ edit +7 X2
+ Xabove
+ call assert_equal(['X2', 5], [bufname(''), line('.')])
+ call assert_fails('Xabove', 'E553:')
++ normal 7G
++ Xbefore
++ call assert_equal(['X2', 5, 2], [bufname(''), line('.'), col('.')])
++ call assert_fails('Xbefore', 'E553:')
++
+ normal 2j
+ Xbelow
+ call assert_equal(['X2', 10], [bufname(''), line('.')])
++ normal 7G
++ Xafter
++ call assert_equal(['X2', 10, 3], [bufname(''), line('.'), col('.')])
++
+ " Last error in this file
+ Xbelow 99
+ call assert_equal(['X2', 15], [bufname(''), line('.')])
+ call assert_fails('Xbelow', 'E553:')
++ normal gg
++ Xafter 99
++ call assert_equal(['X2', 15, 4], [bufname(''), line('.'), col('.')])
++ call assert_fails('Xafter', 'E553:')
++
+ " First error in this file
+ Xabove 99
+ call assert_equal(['X2', 5], [bufname(''), line('.')])
+ call assert_fails('Xabove', 'E553:')
++ normal G
++ Xbefore 99
++ call assert_equal(['X2', 5, 2], [bufname(''), line('.'), col('.')])
++ call assert_fails('Xbefore', 'E553:')
++
+ normal gg
+ Xbelow 2
+ call assert_equal(['X2', 10], [bufname(''), line('.')])
++ normal gg
++ Xafter 2
++ call assert_equal(['X2', 10, 3], [bufname(''), line('.'), col('.')])
++
+ normal G
+ Xabove 2
+ call assert_equal(['X2', 10], [bufname(''), line('.')])
++ normal G
++ Xbefore 2
++ call assert_equal(['X2', 10, 3], [bufname(''), line('.'), col('.')])
++
+ edit X4
+ call assert_fails('Xabove', 'E42:')
+ call assert_fails('Xbelow', 'E42:')
++ call assert_fails('Xbefore', 'E42:')
++ call assert_fails('Xafter', 'E42:')
+ if a:cchar == 'l'
+ " If a buffer has location list entries from some other window but not
+ " from the current window, then the commands should fail.
+ edit X1 | split | call setloclist(0, [], 'f')
+ call assert_fails('Xabove', 'E776:')
+ call assert_fails('Xbelow', 'E776:')
++ call assert_fails('Xbefore', 'E776:')
++ call assert_fails('Xafter', 'E776:')
+ close
+ endif
+
+***************
+*** 4108,4134 ****
+--- 4152,4203 ----
+ edit +1 X2
+ Xbelow 2
+ call assert_equal(['X2', 10, 1], [bufname(''), line('.'), col('.')])
++ normal 1G
++ Xafter 2
++ call assert_equal(['X2', 5, 2], [bufname(''), line('.'), col('.')])
++
+ normal gg
+ Xbelow 99
+ call assert_equal(['X2', 15, 1], [bufname(''), line('.'), col('.')])
++ normal gg
++ Xafter 99
++ call assert_equal(['X2', 15, 3], [bufname(''), line('.'), col('.')])
++
+ normal G
+ Xabove 2
+ call assert_equal(['X2', 10, 1], [bufname(''), line('.'), col('.')])
+ normal G
++ Xbefore 2
++ call assert_equal(['X2', 15, 2], [bufname(''), line('.'), col('.')])
++
++ normal G
+ Xabove 99
+ call assert_equal(['X2', 5, 1], [bufname(''), line('.'), col('.')])
++ normal G
++ Xbefore 99
++ call assert_equal(['X2', 5, 1], [bufname(''), line('.'), col('.')])
++
+ normal 10G
+ Xabove
+ call assert_equal(['X2', 5, 1], [bufname(''), line('.'), col('.')])
++ normal 10G$
++ 2Xbefore
++ call assert_equal(['X2', 10, 2], [bufname(''), line('.'), col('.')])
++
+ normal 10G
+ Xbelow
+ call assert_equal(['X2', 15, 1], [bufname(''), line('.'), col('.')])
++ normal 9G
++ 5Xafter
++ call assert_equal(['X2', 15, 2], [bufname(''), line('.'), col('.')])
+
+ " Invalid range
+ if a:cchar == 'c'
+ call assert_fails('-2cbelow', 'E16:')
++ call assert_fails('-2cafter', 'E16:')
+ else
+ call assert_fails('-2lbelow', 'E16:')
++ call assert_fails('-2lafter', 'E16:')
+ endif
+
+ call delete('X1')
+*** ../vim-8.1.1274/src/version.c 2019-05-05 14:19:17.594303166 +0200
+--- src/version.c 2019-05-05 14:58:18.513708487 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1275,
+ /**/
+
+--
+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.1276 b/data/vim/patches/8.1.1276
new file mode 100644
index 000000000..8f1e0f5b9
--- /dev/null
+++ b/data/vim/patches/8.1.1276
@@ -0,0 +1,307 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1276
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1276
+Problem: Cannot combine text properties with syntax highlighting.
+Solution: Add the "combine" field to prop_type_add(). (closes #4343)
+Files: runtime/doc/eval.txt, runtime/doc/textprop.txt, src/screen.c,
+ src/testprop.c, src/structs.h, src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.1275/runtime/doc/eval.txt 2019-05-04 17:34:30.653353882 +0200
+--- runtime/doc/eval.txt 2019-05-05 15:09:25.625993792 +0200
+***************
+*** 7166,7171 ****
+--- 7218,7226 ----
+ properties the one with the highest priority
+ will be used; negative values can be used, the
+ default priority is zero
++ combine when TRUE combine the highlight with any
++ syntax highlight; when omitted of FALSE syntax
++ highlight will not 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
+*** ../vim-8.1.1275/runtime/doc/textprop.txt 2019-01-01 19:47:17.854123944 +0100
+--- runtime/doc/textprop.txt 2019-05-05 15:45:33.194573955 +0200
+***************
+*** 17,22 ****
+--- 17,23 ----
+
+ 1. Introduction |text-prop-intro|
+ 2. Functions |text-prop-functions|
++ 3. When text changes |text-prop-changes|
+
+
+ {Vi does not have text properties}
+***************
+*** 56,61 ****
+--- 57,66 ----
+ 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
++ "combine" when TRUE the text property highlighting is combined
++ with any syntax highligting, when omitted or FALSE the
++ text property highlighting replaces the syntax
++ highlighting
+ "priority" when properties overlap, the one with the highest
+ priority will be used.
+ "start_incl" when TRUE inserts at the start position will be
+***************
+*** 113,117 ****
+--- 118,142 ----
+ prop_remove({props} [, {lnum} [, {lnum-end}]])
+ remove a text property
+
++ ==============================================================================
++ 3. When text changes *text-prop-changes*
++
++ Vim will do its best to keep the text properties on the text where it was
++ attached. When inserting or deleting text the properties after the change
++ will move accordingly.
++
++ When text is deleted and a text property no longer includes any text, it is
++ deleted. However, a text property that was defined as zero-width will remain,
++ unless the whole line is deleted.
++
++ When using replace mode, the text properties stay on the same character
++ positions, even though the characters themselves change.
++
++
++ When text property columns are not updated ~
++
++ - When setting the line with |setline()| or through an interface, such as Lua,
++ Tcl or Python.
++
+
+ vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1275/src/screen.c 2019-04-26 20:32:57.086296530 +0200
+--- src/screen.c 2019-05-05 15:26:39.412312041 +0200
+***************
+*** 3059,3064 ****
+--- 3059,3065 ----
+ int text_props_active = 0;
+ proptype_T *text_prop_type = NULL;
+ int text_prop_attr = 0;
++ int text_prop_combine = FALSE;
+ #endif
+ #ifdef FEAT_SPELL
+ int has_spell = FALSE; /* this buffer has spell checking */
+***************
+*** 4261,4266 ****
+--- 4262,4268 ----
+ text_prop_idxs[text_props_active++] = text_prop_next++;
+
+ text_prop_attr = 0;
++ text_prop_combine = FALSE;
+ if (text_props_active > 0)
+ {
+ // Sort the properties on priority and/or starting last.
+***************
+*** 4273,4289 ****
+ for (pi = 0; pi < text_props_active; ++pi)
+ {
+ int tpi = text_prop_idxs[pi];
+! proptype_T *pt = text_prop_type_by_id(wp->w_buffer, text_props[tpi].tp_type);
+
+ if (pt != NULL)
+ {
+ int pt_attr = syn_id2attr(pt->pt_hl_id);
+
+ text_prop_type = pt;
+! if (text_prop_attr == 0)
+! text_prop_attr = pt_attr;
+! else
+! text_prop_attr = hl_combine_attr(text_prop_attr, pt_attr);
+ }
+ }
+ }
+--- 4275,4291 ----
+ for (pi = 0; pi < text_props_active; ++pi)
+ {
+ int tpi = text_prop_idxs[pi];
+! proptype_T *pt = text_prop_type_by_id(
+! wp->w_buffer, text_props[tpi].tp_type);
+
+ if (pt != NULL)
+ {
+ int pt_attr = syn_id2attr(pt->pt_hl_id);
+
+ text_prop_type = pt;
+! text_prop_attr =
+! hl_combine_attr(text_prop_attr, pt_attr);
+! text_prop_combine = pt->pt_flags & PT_FLAG_COMBINE;
+ }
+ }
+ }
+***************
+*** 4314,4320 ****
+ attr_pri = FALSE;
+ #ifdef FEAT_TEXT_PROP
+ if (text_prop_type != NULL)
+! char_attr = text_prop_attr;
+ else
+ #endif
+ #ifdef FEAT_SYN_HL
+--- 4316,4328 ----
+ attr_pri = FALSE;
+ #ifdef FEAT_TEXT_PROP
+ if (text_prop_type != NULL)
+! {
+! if (text_prop_combine)
+! char_attr = hl_combine_attr(
+! syntax_attr, text_prop_attr);
+! else
+! char_attr = text_prop_attr;
+! }
+ else
+ #endif
+ #ifdef FEAT_SYN_HL
+***************
+*** 4664,4677 ****
+ ptr = line + v;
+
+ # ifdef FEAT_TEXT_PROP
+! // Text properties overrule syntax highlighting.
+! if (text_prop_attr == 0)
+! #endif
+ {
+ if (!attr_pri)
+! char_attr = syntax_attr;
+ else
+! char_attr = hl_combine_attr(syntax_attr, char_attr);
+ }
+ # ifdef FEAT_CONCEAL
+ /* no concealing past the end of the line, it interferes
+--- 4672,4689 ----
+ ptr = line + v;
+
+ # ifdef FEAT_TEXT_PROP
+! // Text properties overrule syntax highlighting or combine.
+! if (text_prop_attr == 0 || text_prop_combine)
+! # endif
+ {
++ int comb_attr = syntax_attr;
++ # ifdef FEAT_TEXT_PROP
++ comb_attr = hl_combine_attr(text_prop_attr, comb_attr);
++ # endif
+ if (!attr_pri)
+! char_attr = comb_attr;
+ else
+! char_attr = hl_combine_attr(comb_attr, char_attr);
+ }
+ # ifdef FEAT_CONCEAL
+ /* no concealing past the end of the line, it interferes
+*** ../vim-8.1.1275/src/structs.h 2019-04-28 18:04:56.058492178 +0200
+--- src/structs.h 2019-05-05 15:13:41.900581185 +0200
+***************
+*** 727,732 ****
+--- 727,733 ----
+
+ #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
++ #define PT_FLAG_COMBINE 4 // combine with syntax highlight
+
+ // Sign group
+ typedef struct signgroup_S
+*** ../vim-8.1.1275/src/testdir/test_textprop.vim 2019-03-22 13:20:40.091897268 +0100
+--- src/testdir/test_textprop.vim 2019-05-05 15:42:06.155642710 +0200
+***************
+*** 559,572 ****
+ return
+ endif
+ call writefile([
+! \ "call setline(1, ['One two', 'Numbér 123 änd thœn 4¾7.', '--aa--bb--cc--dd--'])",
+ \ "hi NumberProp ctermfg=blue",
+ \ "hi LongProp ctermbg=yellow",
+ \ "call prop_type_add('number', {'highlight': 'NumberProp'})",
+ \ "call prop_type_add('long', {'highlight': 'LongProp'})",
+ \ "call prop_type_add('start', {'highlight': 'NumberProp', 'start_incl': 1})",
+ \ "call prop_type_add('end', {'highlight': 'NumberProp', 'end_incl': 1})",
+ \ "call prop_type_add('both', {'highlight': 'NumberProp', 'start_incl': 1, 'end_incl': 1})",
+ \ "call prop_add(1, 4, {'end_lnum': 3, 'end_col': 3, 'type': 'long'})",
+ \ "call prop_add(2, 9, {'length': 3, 'type': 'number'})",
+ \ "call prop_add(2, 24, {'length': 4, 'type': 'number'})",
+--- 559,581 ----
+ return
+ endif
+ call writefile([
+! \ "call setline(1, ["
+! \ .. "'One two',"
+! \ .. "'Numbér 123 änd thœn 4¾7.',"
+! \ .. "'--aa--bb--cc--dd--',"
+! \ .. "'// comment with error in it',"
+! \ .. "])",
+ \ "hi NumberProp ctermfg=blue",
+ \ "hi LongProp ctermbg=yellow",
++ \ "hi BackgroundProp ctermbg=lightgrey",
++ \ "hi UnderlineProp cterm=underline",
+ \ "call prop_type_add('number', {'highlight': 'NumberProp'})",
+ \ "call prop_type_add('long', {'highlight': 'LongProp'})",
+ \ "call prop_type_add('start', {'highlight': 'NumberProp', 'start_incl': 1})",
+ \ "call prop_type_add('end', {'highlight': 'NumberProp', 'end_incl': 1})",
+ \ "call prop_type_add('both', {'highlight': 'NumberProp', 'start_incl': 1, 'end_incl': 1})",
++ \ "call prop_type_add('background', {'highlight': 'BackgroundProp', 'combine': 1})",
++ \ "call prop_type_add('error', {'highlight': 'UnderlineProp', 'combine': 1})",
+ \ "call prop_add(1, 4, {'end_lnum': 3, 'end_col': 3, 'type': 'long'})",
+ \ "call prop_add(2, 9, {'length': 3, 'type': 'number'})",
+ \ "call prop_add(2, 24, {'length': 4, 'type': 'number'})",
+***************
+*** 574,586 ****
+ \ "call prop_add(3, 7, {'length': 2, 'type': 'start'})",
+ \ "call prop_add(3, 11, {'length': 2, 'type': 'end'})",
+ \ "call prop_add(3, 15, {'length': 2, 'type': 'both'})",
+ \ "set number",
+ \ "hi clear SpellBad",
+ \ "set spell",
+ \ "normal 3G0llix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>",
+ \ "normal 3G0lli\<BS>\<Esc>",
+ \], 'XtestProp')
+! let buf = RunVimInTerminal('-S XtestProp', {'rows': 6})
+ call VerifyScreenDump(buf, 'Test_textprop_01', {})
+
+ " clean up
+--- 583,599 ----
+ \ "call prop_add(3, 7, {'length': 2, 'type': 'start'})",
+ \ "call prop_add(3, 11, {'length': 2, 'type': 'end'})",
+ \ "call prop_add(3, 15, {'length': 2, 'type': 'both'})",
++ \ "call prop_add(4, 12, {'length': 10, 'type': 'background'})",
++ \ "call prop_add(4, 17, {'length': 5, 'type': 'error'})",
+ \ "set number",
+ \ "hi clear SpellBad",
+ \ "set spell",
++ \ "syn match Comment '//.*'",
++ \ "hi Comment ctermfg=green",
+ \ "normal 3G0llix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>",
+ \ "normal 3G0lli\<BS>\<Esc>",
+ \], 'XtestProp')
+! let buf = RunVimInTerminal('-S XtestProp', {'rows': 7})
+ call VerifyScreenDump(buf, 'Test_textprop_01', {})
+
+ " clean up
+*** ../vim-8.1.1275/src/version.c 2019-05-05 15:02:26.180319795 +0200
+--- src/version.c 2019-05-05 15:46:19.630332122 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1276,
+ /**/
+
+--
+BRIDGEKEEPER: What is your favorite colour?
+LAUNCELOT: Blue.
+BRIDGEKEEPER: Right. Off you go.
+ "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.1277 b/data/vim/patches/8.1.1277
new file mode 100644
index 000000000..423703ddb
--- /dev/null
+++ b/data/vim/patches/8.1.1277
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1277
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1277 (after 8.1.1276)
+Problem: Missing screenshot update.
+Solution: Update the screenshot.
+Files: src/testdir/dumps/Test_textprop_01.dump
+
+
+*** ../vim-8.1.1276/src/testdir/dumps/Test_textprop_01.dump 2019-01-02 18:00:22.639279766 +0100
+--- src/testdir/dumps/Test_textprop_01.dump 2019-05-05 15:42:12.447610483 +0200
+***************
+*** 1,6 ****
+--- 1,7 ----
+ | +0#af5f00255#ffffff0@1|1| |O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
+ | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| +0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
+ | +0#af5f00255&@1|3| >-+0#0000000#ffff4012|x+0&#ffffff0|a+0#4040ff13&@1|x+0#0000000&|-@1|x+0#4040ff13&|b@1|x+0#0000000&|-@1|x|c+0#4040ff13&@1|x|-+0#0000000&@1|x+0#4040ff13&|d@1|x|-+0#0000000&@1| @45
++ | +0#af5f00255&@1|4| |/+0#40ff4011&@1| |c|o|m@1|e|n|t| |w+0&#e0e0e08|i|t|h| |e+8&&|r@1|o|r| +0&#ffffff0|i|n| |i|t| +0#0000000&@43
+ |~+0#4040ff13&| @73
+ |~| @73
+ | +0#0000000&@56|3|,|1| @10|A|l@1|
+*** ../vim-8.1.1276/src/version.c 2019-05-05 15:47:37.825923529 +0200
+--- src/version.c 2019-05-05 16:09:56.762448651 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1277,
+ /**/
+
+--
+BRIDGEKEEPER: What is your favorite colour?
+GAWAIN: Blue ... No yelloooooww!
+ "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.1278 b/data/vim/patches/8.1.1278
new file mode 100644
index 000000000..cc63aefc0
--- /dev/null
+++ b/data/vim/patches/8.1.1278
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1278
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1278 (after 8.1.1276)
+Problem: Missing change for "combine" field.
+Solution: Also change the textprop implementation.
+Files: src/textprop.c
+
+
+*** ../vim-8.1.1277/src/textprop.c 2019-03-22 13:20:40.091897268 +0100
+--- src/textprop.c 2019-05-05 15:14:12.444413109 +0200
+***************
+*** 733,738 ****
+--- 733,747 ----
+ prop->pt_hl_id = hl_id;
+ }
+
++ di = dict_find(dict, (char_u *)"combine", -1);
++ if (di != NULL)
++ {
++ if (tv_get_number(&di->di_tv))
++ prop->pt_flags |= PT_FLAG_COMBINE;
++ else
++ prop->pt_flags &= ~PT_FLAG_COMBINE;
++ }
++
+ di = dict_find(dict, (char_u *)"priority", -1);
+ if (di != NULL)
+ prop->pt_priority = tv_get_number(&di->di_tv);
+***************
+*** 845,850 ****
+--- 854,861 ----
+ 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, "combine",
++ (prop->pt_flags & PT_FLAG_COMBINE) ? 1 : 0);
+ dict_add_number(d, "start_incl",
+ (prop->pt_flags & PT_FLAG_INS_START_INCL) ? 1 : 0);
+ dict_add_number(d, "end_incl",
+*** ../vim-8.1.1277/src/version.c 2019-05-05 16:10:28.730247307 +0200
+--- src/version.c 2019-05-05 16:33:14.426336001 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1278,
+ /**/
+
+--
+Q: Why does /dev/null accept only integers?
+A: You can't sink a float.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1279 b/data/vim/patches/8.1.1279
new file mode 100644
index 000000000..3391dc642
--- /dev/null
+++ b/data/vim/patches/8.1.1279
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1279
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1279
+Problem: Cannot set 'spellang' to "sr@latin". (Bojan Stipic)
+Solution: Allow using '@' in 'spellang'. (closes #4342)
+Files: src/option.c, src/testdir/gen_opt_test.vim
+
+
+*** ../vim-8.1.1278/src/option.c 2019-05-04 21:08:17.119814244 +0200
+--- src/option.c 2019-05-05 16:46:19.041277075 +0200
+***************
+*** 6057,6063 ****
+ int
+ valid_spellang(char_u *val)
+ {
+! return valid_name(val, ".-_,");
+ }
+
+ /*
+--- 6057,6063 ----
+ int
+ valid_spellang(char_u *val)
+ {
+! return valid_name(val, ".-_,@");
+ }
+
+ /*
+*** ../vim-8.1.1278/src/testdir/gen_opt_test.vim 2019-02-08 12:46:03.588784187 +0100
+--- src/testdir/gen_opt_test.vim 2019-05-05 16:53:53.766340181 +0200
+***************
+*** 125,130 ****
+--- 125,131 ----
+ \ 'sessionoptions': [['', 'blank', 'help,options,slash'], ['xxx']],
+ \ 'signcolumn': [['', 'auto', 'no'], ['xxx', 'no,yes']],
+ \ 'spellfile': [['', 'file.en.add'], ['xxx', '/tmp/file']],
++ \ 'spelllang': [['', 'xxx', 'sr@latin'], ['not&lang', "that\\\rthere"]],
+ \ 'spellsuggest': [['', 'best', 'double,33'], ['xxx']],
+ \ 'switchbuf': [['', 'useopen', 'split,newtab'], ['xxx']],
+ \ 'tagcase': [['smart', 'match'], ['', 'xxx', 'smart,match']],
+*** ../vim-8.1.1278/src/version.c 2019-05-05 16:33:44.490168111 +0200
+--- src/version.c 2019-05-05 16:47:52.912650785 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1279,
+ /**/
+
+--
+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.1280 b/data/vim/patches/8.1.1280
new file mode 100644
index 000000000..c4febf88e
--- /dev/null
+++ b/data/vim/patches/8.1.1280
@@ -0,0 +1,18472 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1280
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1280
+Problem: Remarks about functionality not in Vi clutters the help.
+Solution: Move all info about what is new in Vim or already existed in Vi to
+ vi_diff.txt. Remove {not in Vi} remarks. (closes #4268) Add
+ "noet" to the help files modeline. Also include many other help
+ file improvements.
+Files: runtime/doc/vi_diff.txt, runtime/doc/arabic.txt,
+ runtime/doc/autocmd.txt, runtime/doc/change.txt,
+ runtime/doc/channel.txt, runtime/doc/cmdline.txt,
+ runtime/doc/debugger.txt, runtime/doc/debug.txt,
+ runtime/doc/develop.txt, runtime/doc/diff.txt,
+ runtime/doc/digraph.txt, runtime/doc/editing.txt,
+ runtime/doc/eval.txt, runtime/doc/farsi.txt,
+ runtime/doc/filetype.txt, runtime/doc/fold.txt,
+ runtime/doc/ft_ada.txt, runtime/doc/ft_rust.txt,
+ runtime/doc/ft_sql.txt, runtime/doc/gui.txt,
+ runtime/doc/gui_w32.txt, runtime/doc/gui_x11.txt,
+ runtime/doc/hangulin.txt, runtime/doc/hebrew.txt,
+ runtime/doc/helphelp.txt, runtime/doc/help.txt,
+ runtime/doc/howto.txt, runtime/doc/if_cscop.txt,
+ runtime/doc/if_lua.txt, runtime/doc/if_mzsch.txt,
+ runtime/doc/if_ole.txt, runtime/doc/if_perl.txt,
+ runtime/doc/if_pyth.txt, runtime/doc/if_ruby.txt,
+ runtime/doc/if_sniff.txt, runtime/doc/if_tcl.txt,
+ runtime/doc/indent.txt, runtime/doc/index.txt,
+ runtime/doc/insert.txt, runtime/doc/intro.txt,
+ runtime/doc/map.txt, runtime/doc/mbyte.txt,
+ runtime/doc/message.txt, runtime/doc/mlang.txt,
+ runtime/doc/motion.txt, runtime/doc/netbeans.txt,
+ runtime/doc/options.txt, runtime/doc/os_390.txt,
+ runtime/doc/os_amiga.txt, runtime/doc/os_beos.txt,
+ runtime/doc/os_dos.txt, runtime/doc/os_mac.txt,
+ runtime/doc/os_mint.txt, runtime/doc/os_msdos.txt,
+ runtime/doc/os_os2.txt, runtime/doc/os_qnx.txt,
+ runtime/doc/os_risc.txt, runtime/doc/os_unix.txt,
+ runtime/doc/os_vms.txt, runtime/doc/os_win32.txt,
+ runtime/doc/pattern.txt, runtime/doc/pi_getscript.txt,
+ runtime/doc/pi_gzip.txt, runtime/doc/pi_logipat.txt,
+ runtime/doc/pi_netrw.txt, runtime/doc/pi_paren.txt,
+ runtime/doc/pi_spec.txt, runtime/doc/pi_tar.txt,
+ runtime/doc/pi_vimball.txt, runtime/doc/pi_zip.txt,
+ runtime/doc/print.txt, runtime/doc/quickfix.txt,
+ runtime/doc/quickref.txt, runtime/doc/quotes.txt,
+ runtime/doc/recover.txt, runtime/doc/remote.txt,
+ runtime/doc/repeat.txt, runtime/doc/rileft.txt,
+ runtime/doc/russian.txt, runtime/doc/scroll.txt,
+ runtime/doc/sign.txt, runtime/doc/spell.txt,
+ runtime/doc/sponsor.txt, runtime/doc/starting.txt,
+ runtime/doc/syntax.txt, runtime/doc/tabpage.txt,
+ runtime/doc/tagsrch.txt, runtime/doc/terminal.txt,
+ runtime/doc/term.txt, runtime/doc/textprop.txt,
+ runtime/doc/tips.txt, runtime/doc/todo.txt,
+ runtime/doc/uganda.txt, runtime/doc/undo.txt,
+ runtime/doc/usr_01.txt, runtime/doc/usr_02.txt,
+ runtime/doc/usr_03.txt, runtime/doc/usr_04.txt,
+ runtime/doc/usr_05.txt, runtime/doc/usr_06.txt,
+ runtime/doc/usr_07.txt, runtime/doc/usr_08.txt,
+ runtime/doc/usr_09.txt, runtime/doc/usr_10.txt,
+ runtime/doc/usr_11.txt, runtime/doc/usr_12.txt,
+ runtime/doc/usr_20.txt, runtime/doc/usr_21.txt,
+ runtime/doc/usr_22.txt, runtime/doc/usr_23.txt,
+ runtime/doc/usr_24.txt, runtime/doc/usr_25.txt,
+ runtime/doc/usr_26.txt, runtime/doc/usr_27.txt,
+ runtime/doc/usr_28.txt, runtime/doc/usr_29.txt,
+ runtime/doc/usr_30.txt, runtime/doc/usr_31.txt,
+ runtime/doc/usr_32.txt, runtime/doc/usr_40.txt,
+ runtime/doc/usr_41.txt, runtime/doc/usr_43.txt,
+ runtime/doc/usr_44.txt, runtime/doc/usr_45.txt,
+ runtime/doc/usr_90.txt, runtime/doc/usr_toc.txt,
+ runtime/doc/various.txt, runtime/doc/version4.txt,
+ runtime/doc/version5.txt, runtime/doc/version6.txt,
+ runtime/doc/version7.txt, runtime/doc/version8.txt,
+ runtime/doc/visual.txt, runtime/doc/windows.txt, runtime/doc/tags
+
+
+*** ../vim-8.1.1279/runtime/doc/vi_diff.txt 2019-04-28 16:00:05.363613444 +0200
+--- runtime/doc/vi_diff.txt 2019-05-05 18:01:22.684074302 +0200
+***************
+*** 1,4 ****
+! *vi_diff.txt* For Vim version 8.1. Last change: 2016 Aug 16
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *vi_diff.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 6,14 ****
+
+ Differences between Vim and Vi *vi-differences*
+
+! Throughout the help files differences between Vim and Vi/Ex are given in
+! curly braces, like "{not in Vi}". This file only lists what has not been
+! mentioned in other files and gives an overview.
+
+ Vim is mostly POSIX 1003.2-1 compliant. The only command known to be missing
+ is ":open". There are probably a lot of small differences (either because Vim
+--- 6,13 ----
+
+ Differences between Vim and Vi *vi-differences*
+
+! This file lists the differences between Vim and Vi/Ex and gives an overview of
+! what is in Vim that is not in Vi.
+
+ Vim is mostly POSIX 1003.2-1 compliant. The only command known to be missing
+ is ":open". There are probably a lot of small differences (either because Vim
+***************
+*** 180,185 ****
+--- 179,188 ----
+ line with tab labels can be used to quickly switch between these pages.
+ |tab-page|
+
++ Terminal window. |:terminal|
++ Vim can create a window in which a terminal emulator runs. This can
++ be used to execute an arbitrary command, a shell or a debugger.
++
+ Syntax highlighting. |:syntax|
+ Vim can highlight keywords, patterns and other things. This is
+ defined by a number of |:syntax| commands, and can be made to
+***************
+*** 194,199 ****
+--- 197,207 ----
+ |'hlsearch'|, matching parens |matchparen| and the cursor line and
+ column |'cursorline'| |'cursorcolumn'|.
+
++ Text properties |textprop.txt|
++ Vim supports highlighting text by a plugin. Property types can be
++ specificed with |prop_type_add()| and properties can be placed with
++ |prop_add()|.
++
+ Spell checking. |spell|
+ When the 'spell' option is set Vim will highlight spelling mistakes.
+ About 50 languages are currently supported, selected with the
+***************
+*** 262,267 ****
+--- 270,277 ----
+ ~ swap case
+ u make lowercase
+ U make uppercase
++ {Vi has no Visual mode, the name "visual" is used for Normal mode, to
++ distinguish it from Ex mode}
+
+ Block operators. |visual-block|
+ With Visual mode a rectangular block of text can be selected. Start
+***************
+*** 522,527 ****
+--- 532,541 ----
+ The used tags are remembered. Commands that can be used with the tag stack
+ are CTRL-T, ":pop" and ":tag". ":tags" lists the tag stack.
+
++ Vi uses 'wrapscan' when searching for a tag. When jumping to a tag Vi starts
++ searching in line 2 of another file. It does not find a tag in line 1 of
++ another file when 'wrapscan' is not set.
++
+ The 'tags' option can be set to a list of tag file names. Thus multiple
+ tag files can be used. For file names that start with "./", the "./" is
+ replaced with the path of the current file. This makes it possible to use a
+***************
+*** 795,817 ****
+ effect is of resetting 'compatible' and removing flags from 'cpoptions' can be
+ found at the help for the specific command.
+
+! Below is listed what features are present in Vi. Anything else has been added
+! by Vim.
+
+- The following Ex commands are supported by Vi: ~
+
+! TODO
+
+! `:set` but not `:set inv{option}`, `:set option&`, `:set all&`,
+! `:set option+=value`,
+! `:set option^=value`
+! `:set option-=value`
+! `:set option<`
+
+
+ The following Normal mode commands are supported by Vi: ~
+
+! TODO
+
+
+ The following options are supported by Vi: ~
+--- 809,1039 ----
+ effect is of resetting 'compatible' and removing flags from 'cpoptions' can be
+ found at the help for the specific command.
+
+! The help files used to mark features that are in Vim but not in Vi with {not
+! in Vi}. However, since these remarks cluttered the help files we now do it
+! the other way around: Below is listed what Vi already supported. Anything
+! else has been added by Vim.
+
+
+! The following Ex commands are supported by Vi: ~
+
+! `:abbreviate` enter abbreviation
+! `:append` append text
+! `:args` print the argument list
+! `:cd` change directory; Vi: no "cd -"
+! `:change` replace a line or series of lines
+! `:chdir` change directory
+! `:copy` copy lines
+! `:delete` delete lines
+! `:edit` edit a file
+! `:exit` same as ":xit"
+! `:file` show or set the current file name; Vi: without the column number
+! `:global` execute commands for matching lines
+! `:insert` insert text
+! `:join` join lines; Vi: not :join!
+! `:k` set a mark
+! `:list` print lines
+! `:map` show or enter a mapping
+! `:mark` set a mark
+! `:move` move lines
+! `:Next` go to previous file in the argument list; no count or ++opt
+! `:next` go to next file in the argument list; no count or ++opt
+! `:number` print lines with line number
+! `:open` start open mode (not implemented in Vim)
+! `:pop` jump to older entry in tag stack (only in some versions)
+! `:preserve` write all text to swap file
+! `:print` print lines
+! `:put` insert contents of register in the text
+! `:quit` quit Vi
+! `:read` read file into the text
+! `:recover` recover a file from a swap file
+! `:rewind` go to the first file in the argument list; no ++opt
+! `:set` set option; but not `:set inv{option}`, `:set option&`,
+! `:set all&`, `:set option+=value`, `:set option^=value`
+! `:set option-=value` `:set option<`
+! `:shell` escape to a shell
+! `:source` read Vim or Ex commands from a file
+! `:stop` suspend the editor or escape to a shell
+! `:substitute` find and replace text; Vi: no '&', 'i', 's', 'r' or 'I' flag,
+! confirm prompt only supports 'y' and 'n', no highlighting
+! `:suspend` same as ":stop"
+! `:t` same as ":copy"
+! `:tag` jump to tag
+! `:unabbreviate` remove abbreviation
+! `:undo` undo last change {Vi: only one level}
+! `:unmap` remove mapping
+! `:vglobal` execute commands for not matching lines
+! `:version` print version number and other info
+! `:visual` same as ":edit", but turns off "Ex" mode
+! `:wq` write to a file and quit Vi
+! `:write` write to a file
+! `:xit` write if buffer changed and quit Vi
+! `:yank` yank lines into a register
+! `:z` print some lines {not in all versions of Vi}
+! `:!` filter lines or execute an external command
+! `:"` comment
+! `:#` same as ":number"
+! `:*` execute contents of a register
+! `:&` repeat last ":substitute"
+! `:<` shift lines one 'shiftwidth' left
+! `:=` print the cursor line number
+! `:>` shift lines one 'shiftwidth' right
+! `:@` execute contents of a register; but not `:@`; `:@@` only in
+! some versions
+
+
+ The following Normal mode commands are supported by Vi: ~
+
+! |CTRL-B| scroll N screens Backwards
+! |CTRL-C| interrupt current (search) command
+! |CTRL-D| scroll Down N lines (default: half a screen); Vim scrolls
+! 'scroll' screen lines, Vi scrolls file lines; makes a
+! difference when lines wrap
+! |CTRL-E| scroll N lines upwards (N lines Extra)
+! |CTRL-F| scroll N screens Forward
+! |CTRL-G| display current file name and position
+! |<BS>| same as "h"
+! |CTRL-H| same as "h"
+! |<NL>| same as "j"
+! |CTRL-J| same as "j"
+! |CTRL-L| redraw screen
+! |<CR>| cursor to the first CHAR N lines lower
+! |CTRL-M| same as <CR>
+! |CTRL-N| same as "j"
+! |CTRL-P| same as "k"
+! |CTRL-R| in some Vi versions: same as CTRL-L
+! |CTRL-T| jump to N older Tag in tag list
+! |CTRL-U| N lines Upwards (default: half a screen)
+! |CTRL-Y| scroll N lines downwards
+! |CTRL-Z| suspend program (or start new shell)
+! |CTRL-]| :ta to ident under cursor
+! |CTRL-^| edit alternate file; Vi: no count
+! |<Space>| same as "l"
+! |!| filter Nmove text through the {filter} command
+! |!!| filter N lines through the {filter} command
+! " use register {a-zA-Z0-9.%#:-"} for next delete, yank or put
+! (uppercase to append) ({.%#:} only work with put)
+! |$| cursor to the end of Nth next line
+! |%| find the next (curly/square) bracket on this line and go to
+! its match, or go to matching comment bracket, or go to
+! matching preprocessor directive (Vi: no count supported)
+! |&| repeat last :s
+! |'| jump to mark (Vi: only lowercase marks)
+! |(| cursor N sentences backward
+! |)| cursor N sentences forward
+! |+| same as <CR>
+! |,| repeat latest f, t, F or T in opposite direction N times
+! |-| cursor to the first CHAR N lines higher
+! |.| repeat last change with count replaced with N
+! |/| search forward for the Nth occurrence of {pattern}
+! |0| cursor to the first char of the line
+! |:| start entering an Ex command
+! |;| repeat latest f, t, F or T N times
+! |<| shift Nmove lines one 'shiftwidth' leftwards
+! |<<| shift N lines one 'shiftwidth' leftwards
+! |=| filter Nmove lines through "indent"
+! |==| filter N lines through "indent"
+! |>| shift Nmove lines one 'shiftwidth' rightwards
+! |>>| shift N lines one 'shiftwidth' rightwards
+! |?| search backward for the Nth previous occurrence of {pattern}
+! |@| execute the contents of register {a-z} N times
+! |@@| repeat the previous @{a-z} N times
+! |A| append text after the end of the line N times
+! |B| cursor N WORDS backward
+! |C| change from the cursor position to the end of the line
+! |D| delete the characters under the cursor until the end of the
+! line and N-1 more lines [into register x]; synonym for "d$"
+! |E| cursor forward to the end of WORD N
+! |F| cursor to the Nth occurrence of {char} to the left
+! |G| cursor to line N, default last line
+! |H| cursor to line N from top of screen
+! |I| insert text before the first CHAR on the line N times
+! |J| Join N lines; default is 2
+! |L| cursor to line N from bottom of screen
+! |M| cursor to middle line of screen
+! |N| repeat the latest '/' or '?' N times in opposite direction
+! |O| begin a new line above the cursor and insert text, repeat N
+! times
+! |P| put the text [from register x] before the cursor N times
+! |Q| switch to "Ex" mode
+! |R| enter replace mode: overtype existing characters, repeat the
+! entered text N-1 times
+! |S| delete N lines [into register x] and start insert; synonym for
+! "cc".
+! |T| cursor till after Nth occurrence of {char} to the left
+! |U| undo all latest changes on one line
+! |W| cursor N WORDS forward
+! |X| delete N characters before the cursor [into register x]
+! |Y| yank N lines [into register x]; synonym for "yy"
+! |ZZ| store current file if modified, and exit
+! |[[| cursor N sections backward
+! |]]| cursor N sections forward
+! |^| cursor to the first CHAR of the line
+! |_| cursor to the first CHAR N - 1 lines lower
+! |`| cursor to the mark {a-zA-Z0-9}
+! |a| append text after the cursor N times
+! |b| cursor N words backward
+! |c| delete Nmove text [into register x] and start insert
+! |cc| delete N lines [into register x] and start insert
+! |d| delete Nmove text [into register x]
+! |dd| delete N lines [into register x]
+! |e| cursor forward to the end of word N
+! |f| cursor to Nth occurrence of {char} to the right
+! |h| cursor N chars to the left
+! |i| insert text before the cursor N times
+! |j| cursor N lines downward
+! |k| cursor N lines upward
+! |l| cursor N chars to the right
+! |m| set mark {A-Za-z} at cursor position
+! |n| repeat the latest '/' or '?' N times
+! |o| begin a new line below the cursor and insert text
+! |p| put the text [from register x] after the cursor N times
+! |r| replace N chars with {char}
+! |s| (substitute) delete N characters [into register x] and start
+! insert
+! |t| cursor till before Nth occurrence of {char} to the right
+! |u| undo changes {Vi: only one level}
+! |w| cursor N words forward
+! |x| delete N characters under and after the cursor [into register
+! x]
+! |y| yank Nmove text [into register x]
+! |yy| yank N lines [into register x]
+! |z<CR>| current line to the top
+! |z-| current line to the bottom
+! |z+| cursor on line N
+! |z^| cursor on line N
+! |{| cursor N paragraphs backward
+! | cursor to column N
+! |}| cursor N paragraphs forward
+! |~| switch case of N characters under the cursor; Vim: depends on
+! 'tildeop'
+! |<Del>| same as "x"
+!
+!
+! The following commands are supported in Insert mode by Vi: ~
+!
+! CTRL-@ insert previously inserted text and stop insert
+! CTRL-C quit insert mode, without checking for abbreviation, unless
+! 'insertmode' set.
+! CTRL-D delete one shiftwidth of indent in the current line
+! <BS> delete character before the cursor
+! CTRL-H same as <BS>
+! <Tab> insert a <Tab> character
+! CTRL-I same as <Tab>
+! <NL> same as <CR>
+! CTRL-J same as <CR>
+! <CR> begin new line
+! CTRL-M same as <CR>
+! CTRL-T insert one shiftwidth of indent in current line
+! CTRL-V {char} insert next non-digit literally
+! CTRL-W delete word before the cursor
+! CTRL-Z when 'insertmode' set: suspend Vim
+! <Esc> end insert mode (unless 'insertmode' set)
+! CTRL-[ same as <Esc>
+! 0 CTRL-D delete all indent in the current line
+! ^ CTRL-D delete all indent in the current line, restore it in the next
+! line
+! <Del> delete character under the cursor
+
+
+ The following options are supported by Vi: ~
+***************
+*** 849,859 ****
+--- 1071,1084 ----
+ 'term' name of the terminal
+ 'terse' shorten some messages
+ 'timeout' 'to' time out on mappings and key codes
++ 'timeoutlen' 'tm' time for 'timeout' {only in some Vi versions}
+ 'ttytype' 'tty' alias for 'term'
+ 'verbose' 'vbs' give informative messages {only in some Vi
+ versions as a boolean option}
+ 'warn' warn for shell command when buffer was changed
+ 'window' 'wi' nr of lines to scroll for CTRL-F and CTRL-B
++ {Vi also uses the option to specify the number of
++ displayed lines}
+ 'wrapmargin' 'wm' chars from the right where wrapping starts
+ 'wrapscan' 'ws' searches wrap around the end of the file
+ 'writeany' 'wa' write to file with no need for "!" override
+***************
+*** 968,974 ****
+ -i Elvis: Start each window in Insert mode.
+ -i {viminfo} Vim: Use {viminfo} for viminfo file.
+
+! -L Vim: Same as "-r" (also in some versions of Vi).
+
+ -l Nvi, Vi, Vim: Set 'lisp' and 'showmatch' options.
+
+--- 1193,1200 ----
+ -i Elvis: Start each window in Insert mode.
+ -i {viminfo} Vim: Use {viminfo} for viminfo file.
+
+! -L Vim: Same as "-r" {only in some versions of Vi: "List
+! recoverable edit sessions"}.
+
+ -l Nvi, Vi, Vim: Set 'lisp' and 'showmatch' options.
+
+*** ../vim-8.1.1279/runtime/doc/arabic.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/arabic.txt 2019-05-05 17:35:42.792578962 +0200
+***************
+*** 1,4 ****
+! *arabic.txt* For Vim version 8.1. Last change: 2010 Nov 13
+
+
+ VIM REFERENCE MANUAL by Nadim Shaikli
+--- 1,4 ----
+! *arabic.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Nadim Shaikli
+***************
+*** 6,12 ****
+
+ Arabic Language support (options & mappings) for Vim *Arabic*
+
+- {Vi does not have any of these commands}
+
+ *E800*
+ In order to use right-to-left and Arabic mapping support, it is
+--- 6,11 ----
+***************
+*** 319,322 ****
+
+ No other bugs are known to exist.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 318,321 ----
+
+ No other bugs are known to exist.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/autocmd.txt 2019-04-27 20:36:52.526303597 +0200
+--- runtime/doc/autocmd.txt 2019-05-05 17:35:49.508541837 +0200
+***************
+*** 1,10 ****
+! *autocmd.txt* For Vim version 8.1. Last change: 2018 May 03
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+
+
+! Automatic commands *autocommand*
+
+ For a basic explanation, see section |40.3| in the user manual.
+
+--- 1,10 ----
+! *autocmd.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+
+
+! Automatic commands *autocommand* *autocommands*
+
+ For a basic explanation, see section |40.3| in the user manual.
+
+***************
+*** 20,26 ****
+ 10. Using autocommands |autocmd-use|
+ 11. Disabling autocommands |autocmd-disable|
+
+- {Vi does not have any of these commands}
+
+ ==============================================================================
+ 1. Introduction *autocmd-intro*
+--- 20,25 ----
+***************
+*** 308,313 ****
+--- 307,313 ----
+ |FileChangedShellPost| After handling a file changed since editing started
+ |FileChangedRO| before making the first change to a read-only file
+
++ |DiffUpdated| after diffs have been updated
+ |DirChanged| after the working directory has changed
+
+ |ShellCmdPost| after executing a shell command
+***************
+*** 317,322 ****
+--- 317,323 ----
+ |FuncUndefined| a user function is used but it isn't defined
+ |SpellFileMissing| a spell file is used but it can't be found
+ |SourcePre| before sourcing a Vim script
++ |SourcePost| after sourcing a Vim script
+ |SourceCmd| before sourcing a Vim script |Cmd-event|
+
+ |VimResized| after the Vim window size changed
+***************
+*** 352,358 ****
+ when popup menu is not visible
+ |TextChangedP| after a change was made to the text in Insert mode
+ when popup menu visible
+! |TextYankPost| after text is yanked or deleted
+
+ |ColorSchemePre| before loading a color scheme
+ |ColorScheme| after loading a color scheme
+--- 353,359 ----
+ when popup menu is not visible
+ |TextChangedP| after a change was made to the text in Insert mode
+ when popup menu visible
+! |TextYankPost| after text has been yanked or deleted
+
+ |ColorSchemePre| before loading a color scheme
+ |ColorScheme| after loading a color scheme
+***************
+*** 585,591 ****
+ recursively.
+
+ Sets these |v:event| keys:
+! completed_item
+ height nr of items visible
+ width screen cells
+ row top screen row
+--- 586,592 ----
+ recursively.
+
+ Sets these |v:event| keys:
+! completed_item See |complete-items|.
+ height nr of items visible
+ width screen cells
+ row top screen row
+***************
+*** 642,647 ****
+--- 643,650 ----
+ Not triggered when there is typeahead or when
+ an operator is pending.
+ For an example see |match-parens|.
++ Note: This can not be skipped with
++ `:noautocmd`.
+ Careful: This is triggered very often, don't
+ do anything that the user does not expect or
+ that is slow.
+***************
+*** 782,794 ****
+ Not triggered when 'shelltemp' is off.
+ *FilterWritePost*
+ FilterWritePost After writing a file for a filter command or
+! making a diff.
+ Vim checks the pattern against the name of
+ the current buffer as with FilterWritePre.
+ Not triggered when 'shelltemp' is off.
+ *FilterWritePre*
+ FilterWritePre Before writing a file for a filter command or
+! making a diff.
+ Vim checks the pattern against the name of
+ the current buffer, not the name of the
+ temporary file that is the output of the
+--- 785,798 ----
+ Not triggered when 'shelltemp' is off.
+ *FilterWritePost*
+ FilterWritePost After writing a file for a filter command or
+! making a diff with an external diff (see
+! DiffUpdated for internal diff).
+ Vim checks the pattern against the name of
+ the current buffer as with FilterWritePre.
+ Not triggered when 'shelltemp' is off.
+ *FilterWritePre*
+ FilterWritePre Before writing a file for a filter command or
+! making a diff with an external diff.
+ Vim checks the pattern against the name of
+ the current buffer, not the name of the
+ temporary file that is the output of the
+***************
+*** 889,894 ****
+--- 893,900 ----
+ plugin. You can always use `:noa` to prevent
+ triggering this autocommand.
+
++ When using |:set| in the autocommand the event
++ is not triggered again.
+ *QuickFixCmdPre*
+ QuickFixCmdPre Before a quickfix command is run (|:make|,
+ |:lmake|, |:grep|, |:lgrep|, |:grepadd|,
+***************
+*** 1036,1045 ****
+ anything else that takes time is involved.
+ *TextChanged*
+ TextChanged After a change was made to the text in the
+! current buffer in Normal mode. That is when
+! |b:changedtick| has changed.
+ Not triggered when there is typeahead or when
+ an operator is pending.
+ Careful: This is triggered very often, don't
+ do anything that the user does not expect or
+ that is slow.
+--- 1042,1055 ----
+ anything else that takes time is involved.
+ *TextChanged*
+ TextChanged After a change was made to the text in the
+! current buffer in Normal mode. That is after
+! |b:changedtick| has changed (also when that
+! happened before the TextChanged autocommand
+! was defined).
+ Not triggered when there is typeahead or when
+ an operator is pending.
++ Note: This can not be skipped with
++ `:noautocmd`.
+ Careful: This is triggered very often, don't
+ do anything that the user does not expect or
+ that is slow.
+***************
+*** 1438,1444 ****
+ In commands which expect a file name, you can use "<afile>" for the file name
+ that is being read |:<afile>| (you can also use "%" for the current file
+ name). "<abuf>" can be used for the buffer number of the currently effective
+! buffer. This also works for buffers that doesn't have a name. But it doesn't
+ work for files without a buffer (e.g., with ":r file").
+
+ *gzip-example*
+--- 1448,1454 ----
+ In commands which expect a file name, you can use "<afile>" for the file name
+ that is being read |:<afile>| (you can also use "%" for the current file
+ name). "<abuf>" can be used for the buffer number of the currently effective
+! buffer. This also works for buffers that don't have a name. But it doesn't
+ work for files without a buffer (e.g., with ":r file").
+
+ *gzip-example*
+***************
+*** 1628,1632 ****
+ This will write the file without triggering the autocommands defined by the
+ gzip plugin.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1638,1645 ----
+ This will write the file without triggering the autocommands defined by the
+ gzip plugin.
+
++ Note that some autocommands are not triggered right away, but only later.
++ This specifically applies to |CursorMoved| and |TextChanged|.
+
+!
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/change.txt 2019-01-11 22:15:00.519123428 +0100
+--- runtime/doc/change.txt 2019-05-05 17:36:05.556453071 +0200
+***************
+*** 1,4 ****
+! *change.txt* For Vim version 8.1. Last change: 2018 May 12
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *change.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 34,40 ****
+ deletes the last character of the count.
+ See |:fixdel| if the <Del> key does not do what you
+ want. See |'whichwrap'| for deleting a line break
+! (join lines). {Vi does not support <Del>}
+
+ *X* *dh*
+ ["x]X Delete [count] characters before the cursor [into
+--- 34,40 ----
+ deletes the last character of the count.
+ See |:fixdel| if the <Del> key does not do what you
+ want. See |'whichwrap'| for deleting a line break
+! (join lines).
+
+ *X* *dh*
+ ["x]X Delete [count] characters before the cursor [into
+***************
+*** 59,65 ****
+ {Visual}["x]x or *v_x* *v_d* *v_<Del>*
+ {Visual}["x]d or
+ {Visual}["x]<Del> Delete the highlighted text [into register x] (for
+! {Visual} see |Visual-mode|). {not in Vi}
+
+ {Visual}["x]CTRL-H or *v_CTRL-H* *v_<BS>*
+ {Visual}["x]<BS> When in Select mode: Delete the highlighted text [into
+--- 59,65 ----
+ {Visual}["x]x or *v_x* *v_d* *v_<Del>*
+ {Visual}["x]d or
+ {Visual}["x]<Del> Delete the highlighted text [into register x] (for
+! {Visual} see |Visual-mode|).
+
+ {Visual}["x]CTRL-H or *v_CTRL-H* *v_<BS>*
+ {Visual}["x]<BS> When in Select mode: Delete the highlighted text [into
+***************
+*** 69,75 ****
+ {Visual}["x]D Delete the highlighted lines [into register x] (for
+ {Visual} see |Visual-mode|). In Visual block mode,
+ "D" deletes the highlighted text plus all text until
+! the end of the line. {not in Vi}
+
+ *:d* *:de* *:del* *:delete* *:dl* *:dp*
+ :[range]d[elete] [x] Delete [range] lines (default: current line) [into
+--- 69,75 ----
+ {Visual}["x]D Delete the highlighted lines [into register x] (for
+ {Visual} see |Visual-mode|). In Visual block mode,
+ "D" deletes the highlighted text plus all text until
+! the end of the line.
+
+ *:d* *:de* *:del* *:delete* *:dl* *:dp*
+ :[range]d[elete] [x] Delete [range] lines (default: current line) [into
+***************
+*** 116,131 ****
+ *v_J*
+ {Visual}J Join the highlighted lines, with a minimum of two
+ lines. Remove the indent and insert up to two spaces
+! (see below). {not in Vi}
+
+ *gJ*
+ gJ Join [count] lines, with a minimum of two lines.
+! Don't insert or remove any spaces. {not in Vi}
+
+ *v_gJ*
+ {Visual}gJ Join the highlighted lines, with a minimum of two
+! lines. Don't insert or remove any spaces. {not in
+! Vi}
+
+ *:j* *:join*
+ :[range]j[oin][!] [flags]
+--- 116,130 ----
+ *v_J*
+ {Visual}J Join the highlighted lines, with a minimum of two
+ lines. Remove the indent and insert up to two spaces
+! (see below).
+
+ *gJ*
+ gJ Join [count] lines, with a minimum of two lines.
+! Don't insert or remove any spaces.
+
+ *v_gJ*
+ {Visual}gJ Join the highlighted lines, with a minimum of two
+! lines. Don't insert or remove any spaces.
+
+ *:j* *:join*
+ :[range]j[oin][!] [flags]
+***************
+*** 134,140 ****
+ If a [range] has equal start and end values, this
+ command does nothing. The default behavior is to
+ join the current line with the line below it.
+- {not in Vi: !}
+ See |ex-flags| for [flags].
+
+ :[range]j[oin][!] {count} [flags]
+--- 133,138 ----
+***************
+*** 142,148 ****
+ current line |cmdline-ranges|). Same as "J", except
+ with [!] the join does not insert or delete any
+ spaces.
+- {not in Vi: !}
+ See |ex-flags| for [flags].
+
+ These commands delete the <EOL> between lines. This has the effect of joining
+--- 140,145 ----
+***************
+*** 209,216 ****
+
+ {Visual}["x]c or *v_c* *v_s*
+ {Visual}["x]s Delete the highlighted text [into register x] and
+! start insert (for {Visual} see |Visual-mode|). {not
+! in Vi}
+
+ *v_r*
+ {Visual}["x]r{char} Replace all selected characters by {char}.
+--- 206,212 ----
+
+ {Visual}["x]c or *v_c* *v_s*
+ {Visual}["x]s Delete the highlighted text [into register x] and
+! start insert (for {Visual} see |Visual-mode|).
+
+ *v_r*
+ {Visual}["x]r{char} Replace all selected characters by {char}.
+***************
+*** 218,231 ****
+ *v_C*
+ {Visual}["x]C Delete the highlighted lines [into register x] and
+ start insert. In Visual block mode it works
+! differently |v_b_C|. {not in Vi}
+ *v_S*
+ {Visual}["x]S Delete the highlighted lines [into register x] and
+! start insert (for {Visual} see |Visual-mode|). {not
+! in Vi}
+ *v_R*
+ {Visual}["x]R Currently just like {Visual}["x]S. In a next version
+! it might work differently. {not in Vi}
+
+ Notes:
+ - You can end Insert and Replace mode with <Esc>.
+--- 214,226 ----
+ *v_C*
+ {Visual}["x]C Delete the highlighted lines [into register x] and
+ start insert. In Visual block mode it works
+! differently |v_b_C|.
+ *v_S*
+ {Visual}["x]S Delete the highlighted lines [into register x] and
+! start insert (for {Visual} see |Visual-mode|).
+ *v_R*
+ {Visual}["x]R Currently just like {Visual}["x]S. In a next version
+! it might work differently.
+
+ Notes:
+ - You can end Insert and Replace mode with <Esc>.
+***************
+*** 322,342 ****
+ tilde cannot be used as an operator}
+
+ *g~*
+! g~{motion} Switch case of {motion} text. {not in Vi}
+
+ g~g~ *g~g~* *g~~*
+! g~~ Switch case of current line. {not in Vi}.
+
+ *v_~*
+ {Visual}~ Switch case of highlighted text (for {Visual} see
+! |Visual-mode|). {not in Vi}
+
+ *v_U*
+ {Visual}U Make highlighted text uppercase (for {Visual} see
+! |Visual-mode|). {not in Vi}
+
+ *gU* *uppercase*
+! gU{motion} Make {motion} text uppercase. {not in Vi}
+ Example: >
+ :map! <C-F> <Esc>gUiw`]a
+ < This works in Insert mode: press CTRL-F to make the
+--- 317,337 ----
+ tilde cannot be used as an operator}
+
+ *g~*
+! g~{motion} Switch case of {motion} text.
+
+ g~g~ *g~g~* *g~~*
+! g~~ Switch case of current line.
+
+ *v_~*
+ {Visual}~ Switch case of highlighted text (for {Visual} see
+! |Visual-mode|).
+
+ *v_U*
+ {Visual}U Make highlighted text uppercase (for {Visual} see
+! |Visual-mode|).
+
+ *gU* *uppercase*
+! gU{motion} Make {motion} text uppercase.
+ Example: >
+ :map! <C-F> <Esc>gUiw`]a
+ < This works in Insert mode: press CTRL-F to make the
+***************
+*** 345,371 ****
+
+
+ gUgU *gUgU* *gUU*
+! gUU Make current line uppercase. {not in Vi}.
+
+ *v_u*
+ {Visual}u Make highlighted text lowercase (for {Visual} see
+! |Visual-mode|). {not in Vi}
+
+ *gu* *lowercase*
+! gu{motion} Make {motion} text lowercase. {not in Vi}
+
+ gugu *gugu* *guu*
+! guu Make current line lowercase. {not in Vi}.
+
+ *g?* *rot13*
+! g?{motion} Rot13 encode {motion} text. {not in Vi}
+
+ *v_g?*
+ {Visual}g? Rot13 encode the highlighted text (for {Visual} see
+! |Visual-mode|). {not in Vi}
+
+ g?g? *g?g?* *g??*
+! g?? Rot13 encode current line. {not in Vi}.
+
+ To turn one line into title caps, make every first letter of a word
+ uppercase: >
+--- 340,366 ----
+
+
+ gUgU *gUgU* *gUU*
+! gUU Make current line uppercase.
+
+ *v_u*
+ {Visual}u Make highlighted text lowercase (for {Visual} see
+! |Visual-mode|).
+
+ *gu* *lowercase*
+! gu{motion} Make {motion} text lowercase.
+
+ gugu *gugu* *guu*
+! guu Make current line lowercase.
+
+ *g?* *rot13*
+! g?{motion} Rot13 encode {motion} text.
+
+ *v_g?*
+ {Visual}g? Rot13 encode the highlighted text (for {Visual} see
+! |Visual-mode|).
+
+ g?g? *g?g?* *g??*
+! g?? Rot13 encode current line.
+
+ To turn one line into title caps, make every first letter of a word
+ uppercase: >
+***************
+*** 375,392 ****
+ Adding and subtracting ~
+ *CTRL-A*
+ CTRL-A Add [count] to the number or alphabetic character at
+! or after the cursor. {not in Vi}
+
+ *v_CTRL-A*
+ {Visual}CTRL-A Add [count] to the number or alphabetic character in
+! the highlighted text. {not in Vi}
+
+ *v_g_CTRL-A*
+ {Visual}g CTRL-A Add [count] to the number or alphabetic character in
+ the highlighted text. If several lines are
+ highlighted, each one will be incremented by an
+ additional [count] (so effectively creating a
+! [count] incrementing sequence). {not in Vi}
+ For Example, if you have this list of numbers:
+ 1. ~
+ 1. ~
+--- 370,387 ----
+ Adding and subtracting ~
+ *CTRL-A*
+ CTRL-A Add [count] to the number or alphabetic character at
+! or after the cursor.
+
+ *v_CTRL-A*
+ {Visual}CTRL-A Add [count] to the number or alphabetic character in
+! the highlighted text.
+
+ *v_g_CTRL-A*
+ {Visual}g CTRL-A Add [count] to the number or alphabetic character in
+ the highlighted text. If several lines are
+ highlighted, each one will be incremented by an
+ additional [count] (so effectively creating a
+! [count] incrementing sequence).
+ For Example, if you have this list of numbers:
+ 1. ~
+ 1. ~
+***************
+*** 401,411 ****
+
+ *CTRL-X*
+ CTRL-X Subtract [count] from the number or alphabetic
+! character at or after the cursor. {not in Vi}
+
+ *v_CTRL-X*
+ {Visual}CTRL-X Subtract [count] from the number or alphabetic
+! character in the highlighted text. {not in Vi}
+
+ On MS-Windows, this is mapped to cut Visual text
+ |dos-standard-mappings|. If you want to disable the
+--- 396,406 ----
+
+ *CTRL-X*
+ CTRL-X Subtract [count] from the number or alphabetic
+! character at or after the cursor.
+
+ *v_CTRL-X*
+ {Visual}CTRL-X Subtract [count] from the number or alphabetic
+! character in the highlighted text.
+
+ On MS-Windows, this is mapped to cut Visual text
+ |dos-standard-mappings|. If you want to disable the
+***************
+*** 417,423 ****
+ character in the highlighted text. If several lines
+ are highlighted, each value will be decremented by an
+ additional [count] (so effectively creating a [count]
+! decrementing sequence). {not in Vi}
+
+ The CTRL-A and CTRL-X commands can work for:
+ - signed and unsigned decimal numbers
+--- 412,418 ----
+ character in the highlighted text. If several lines
+ are highlighted, each value will be decremented by an
+ additional [count] (so effectively creating a [count]
+! decrementing sequence).
+
+ The CTRL-A and CTRL-X commands can work for:
+ - signed and unsigned decimal numbers
+***************
+*** 485,492 ****
+
+ *v_<*
+ {Visual}[count]< Shift the highlighted lines [count] 'shiftwidth'
+! leftwards (for {Visual} see |Visual-mode|). {not in
+! Vi}
+
+ *>*
+ >{motion} Shift {motion} lines one 'shiftwidth' rightwards.
+--- 480,486 ----
+
+ *v_<*
+ {Visual}[count]< Shift the highlighted lines [count] 'shiftwidth'
+! leftwards (for {Visual} see |Visual-mode|).
+
+ *>*
+ >{motion} Shift {motion} lines one 'shiftwidth' rightwards.
+***************
+*** 500,507 ****
+
+ *v_>*
+ {Visual}[count]> Shift the highlighted lines [count] 'shiftwidth'
+! rightwards (for {Visual} see |Visual-mode|). {not in
+! Vi}
+
+ *:<*
+ :[range]< Shift [range] lines one 'shiftwidth' left. Repeat '<'
+--- 494,500 ----
+
+ *v_>*
+ {Visual}[count]> Shift the highlighted lines [count] 'shiftwidth'
+! rightwards (for {Visual} see |Visual-mode|).
+
+ *:<*
+ :[range]< Shift [range] lines one 'shiftwidth' left. Repeat '<'
+***************
+*** 512,518 ****
+ Repeat '<' for shifting multiple 'shiftwidth's.
+
+ :[range]le[ft] [indent] left align lines in [range]. Sets the indent in the
+! lines to [indent] (default 0). {not in Vi}
+
+ *:>*
+ :[range]> [flags] Shift {count} [range] lines one 'shiftwidth' right.
+--- 505,511 ----
+ Repeat '<' for shifting multiple 'shiftwidth's.
+
+ :[range]le[ft] [indent] left align lines in [range]. Sets the indent in the
+! lines to [indent] (default 0).
+
+ *:>*
+ :[range]> [flags] Shift {count} [range] lines one 'shiftwidth' right.
+***************
+*** 579,585 ****
+ *v_!*
+ {Visual}!{filter} Filter the highlighted lines through the external
+ program {filter} (for {Visual} see |Visual-mode|).
+- {not in Vi}
+
+ :{range}![!]{filter} [!][arg] *:range!*
+ Filter {range} lines through the external program
+--- 572,577 ----
+***************
+*** 613,619 ****
+
+ *v_=*
+ {Visual}= Filter the highlighted lines like with ={motion}.
+- {not in Vi}
+
+
+ *tempfile* *setuid*
+--- 605,610 ----
+***************
+*** 640,650 ****
+ For the {pattern} see |pattern|.
+ {string} can be a literal string, or something
+ special; see |sub-replace-special|.
+- *E939*
+ When [range] and [count] are omitted, replace in the
+ current line only. When [count] is given, replace in
+ [count] lines, starting with the last line in [range].
+ When [range] is omitted start in the current line.
+ [count] must be a positive number. Also see
+ |cmdline-ranges|.
+
+--- 631,641 ----
+ For the {pattern} see |pattern|.
+ {string} can be a literal string, or something
+ special; see |sub-replace-special|.
+ When [range] and [count] are omitted, replace in the
+ current line only. When [count] is given, replace in
+ [count] lines, starting with the last line in [range].
+ When [range] is omitted start in the current line.
++ *E939*
+ [count] must be a positive number. Also see
+ |cmdline-ranges|.
+
+***************
+*** 678,692 ****
+ For example, when you first do a substitution with
+ `:s/pattern/repl/flags` and then `/search` for
+ something else, `g&` will do `:%s/search/repl/flags`.
+! Mnemonic: global substitute. {not in Vi}
+
+ *:snomagic* *:sno*
+ :[range]sno[magic] ... Same as `:substitute`, but always use 'nomagic'.
+- {not in Vi}
+
+ *:smagic* *:sm*
+ :[range]sm[agic] ... Same as `:substitute`, but always use 'magic'.
+- {not in Vi}
+
+ *:s_flags*
+ The flags that you can use for the substitute commands:
+--- 669,681 ----
+ For example, when you first do a substitution with
+ `:s/pattern/repl/flags` and then `/search` for
+ something else, `g&` will do `:%s/search/repl/flags`.
+! Mnemonic: global substitute.
+
+ *:snomagic* *:sno*
+ :[range]sno[magic] ... Same as `:substitute`, but always use 'nomagic'.
+
+ *:smagic* *:sm*
+ :[range]sm[agic] ... Same as `:substitute`, but always use 'magic'.
+
+ *:s_flags*
+ The flags that you can use for the substitute commands:
+***************
+*** 697,703 ****
+ :&&
+ :s/this/that/&
+ < Note that `:s` and `:&` don't keep the flags.
+- {not in Vi}
+
+ [c] Confirm each substitution. Vim highlights the matching string (with
+ |hl-IncSearch|). You can type: *:s_c*
+--- 686,691 ----
+***************
+*** 705,720 ****
+ 'l' to substitute this match and then quit ("last")
+ 'n' to skip this match
+ <Esc> to quit substituting
+! 'a' to substitute this and all remaining matches {not in Vi}
+! 'q' to quit substituting {not in Vi}
+! CTRL-E to scroll the screen up {not in Vi, not available when
+! compiled without the |+insert_expand| feature}
+! CTRL-Y to scroll the screen down {not in Vi, not available when
+! compiled without the |+insert_expand| feature}
+ If the 'edcompatible' option is on, Vim remembers the [c] flag and
+ toggles it each time you use it, but resets it when you give a new
+ 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
+--- 693,707 ----
+ 'l' to substitute this match and then quit ("last")
+ 'n' to skip this match
+ <Esc> to quit substituting
+! 'a' to substitute this and all remaining matches
+! 'q' to quit substituting
+! CTRL-E to scroll the screen up {not available when compiled
+! without the |+insert_expand| feature}
+! CTRL-Y to scroll the screen down {not available when compiled
+! without the |+insert_expand| feature}
+ If the 'edcompatible' option is on, Vim remembers the [c] flag and
+ toggles it each time you use it, but resets it when you give a new
+ search pattern.
+
+ *:s_e*
+ [e] When the search pattern fails, do not issue an error message and, in
+***************
+*** 726,732 ****
+ No previous substitute regular expression
+ Trailing characters
+ Interrupted
+- {not in Vi}
+
+ *:s_g*
+ [g] Replace all occurrences in the line. Without this argument,
+--- 713,718 ----
+***************
+*** 736,761 ****
+ pattern. If the 'gdefault' option is on, this flag is on by default
+ and the [g] argument switches it off.
+
+ [i] Ignore case for the pattern. The 'ignorecase' and 'smartcase' options
+ are not used.
+- {not in Vi}
+
+ [I] Don't ignore case for the pattern. The 'ignorecase' and 'smartcase'
+ options are not used.
+- {not in Vi}
+
+ [n] Report the number of matches, do not actually substitute. The [c]
+ flag is ignored. The matches are reported as if 'report' is zero.
+ Useful to |count-items|.
+ If \= |sub-replace-expression| is used, the expression will be
+ evaluated in the |sandbox| at every match.
+
+! [p] Print the line containing the last substitute.
+
+! [#] Like [p] and prepend the line number.
+
+! [l] Like [p] but print the text like |:list|.
+
+ [r] Only useful in combination with `:&` or `:s` without arguments. `:&r`
+ works the same way as `:~`: When the search pattern is empty, use the
+ previously used search pattern instead of the search pattern from the
+--- 722,749 ----
+ pattern. If the 'gdefault' option is on, this flag is on by default
+ and the [g] argument switches it off.
+
++ *:s_i*
+ [i] Ignore case for the pattern. The 'ignorecase' and 'smartcase' options
+ are not used.
+
++ *:s_I*
+ [I] Don't ignore case for the pattern. The 'ignorecase' and 'smartcase'
+ options are not used.
+
++ *:s_n*
+ [n] Report the number of matches, do not actually substitute. The [c]
+ flag is ignored. The matches are reported as if 'report' is zero.
+ Useful to |count-items|.
+ If \= |sub-replace-expression| is used, the expression will be
+ evaluated in the |sandbox| at every match.
+
+! [p] Print the line containing the last substitute. *:s_p*
+
+! [#] Like [p] and prepend the line number. *:s_#*
+
+! [l] Like [p] but print the text like |:list|. *:s_l*
+
++ *:s_r*
+ [r] Only useful in combination with `:&` or `:s` without arguments. `:&r`
+ works the same way as `:~`: When the search pattern is empty, use the
+ previously used search pattern instead of the search pattern from the
+***************
+*** 772,778 ****
+ /green
+ :&
+ < The last command will replace "blue" with "red".
+- {not in Vi}
+
+ Note that there is no flag to change the "magicness" of the pattern. A
+ different command is used instead, or you can use |/\v| and friends. The
+--- 760,765 ----
+***************
+*** 854,860 ****
+ - magic is always set without regard to 'magic'.
+ - A ~ inserts a tilde literally.
+ - <CR> and \r inserts a carriage-return (CTRL-M).
+! - \<CR> does not have a special meaning. it's just one of \x.
+
+ Examples: >
+ :s/a\|b/xxx\0xxx/g modifies "a b" to "xxxaxxx xxxbxxx"
+--- 841,847 ----
+ - magic is always set without regard to 'magic'.
+ - A ~ inserts a tilde literally.
+ - <CR> and \r inserts a carriage-return (CTRL-M).
+! - \<CR> does not have a special meaning. It's just one of \x.
+
+ Examples: >
+ :s/a\|b/xxx\0xxx/g modifies "a b" to "xxxaxxx xxxbxxx"
+***************
+*** 940,948 ****
+ breaks. Thus each item becomes a line, except that they can contain line
+ breaks themselves.
+
+! The whole matched text can be accessed with "submatch(0)". The text matched
+! with the first pair of () with "submatch(1)". Likewise for further
+! sub-matches in ().
+
+ Be careful: The separation character must not appear in the expression!
+ Consider using a character like "@" or ":". There is no problem if the result
+--- 927,935 ----
+ breaks. Thus each item becomes a line, except that they can contain line
+ breaks themselves.
+
+! The |submatch()| function can be used to obtain matched text. The whole
+! matched text can be accessed with "submatch(0)". The text matched with the
+! first pair of () with "submatch(1)". Likewise for further sub-matches in ().
+
+ Be careful: The separation character must not appear in the expression!
+ Consider using a character like "@" or ":". There is no problem if the result
+***************
+*** 998,1004 ****
+ a single tabstop. Each value in the list represents
+ the width of one tabstop, except the final value which
+ applies to all following tabstops.
+- {not in Vi}
+
+ *retab-example*
+ Example for using autocommands and ":retab" to edit a file which is stored
+--- 985,990 ----
+***************
+*** 1022,1038 ****
+ :reg[isters] Display the contents of all numbered and named
+ registers. If a register is written to for |:redir|
+ it will not be listed.
+- {not in Vi}
+
+
+ :reg[isters] {arg} Display the contents of the numbered and named
+ registers that are mentioned in {arg}. For example: >
+ :reg 1a
+ < to display registers '1' and 'a'. Spaces are allowed
+! in {arg}. {not in Vi}
+
+ *:di* *:display*
+! :di[splay] [arg] Same as :registers. {not in Vi}
+
+ *y* *yank*
+ ["x]y{motion} Yank {motion} text [into register x]. When no
+--- 1008,1023 ----
+ :reg[isters] Display the contents of all numbered and named
+ registers. If a register is written to for |:redir|
+ it will not be listed.
+
+
+ :reg[isters] {arg} Display the contents of the numbered and named
+ registers that are mentioned in {arg}. For example: >
+ :reg 1a
+ < to display registers '1' and 'a'. Spaces are allowed
+! in {arg}.
+
+ *:di* *:display*
+! :di[splay] [arg] Same as :registers.
+
+ *y* *yank*
+ ["x]y{motion} Yank {motion} text [into register x]. When no
+***************
+*** 1051,1061 ****
+
+ *v_y*
+ {Visual}["x]y Yank the highlighted text [into register x] (for
+! {Visual} see |Visual-mode|). {not in Vi}
+
+ *v_Y*
+ {Visual}["x]Y Yank the highlighted lines [into register x] (for
+! {Visual} see |Visual-mode|). {not in Vi}
+
+ *:y* *:yank* *E850*
+ :[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the
+--- 1036,1046 ----
+
+ *v_y*
+ {Visual}["x]y Yank the highlighted text [into register x] (for
+! {Visual} see |Visual-mode|).
+
+ *v_Y*
+ {Visual}["x]Y Yank the highlighted lines [into register x] (for
+! {Visual} see |Visual-mode|).
+
+ *:y* *:yank* *E850*
+ :[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the
+***************
+*** 1082,1088 ****
+ Leaves the cursor at the end of the new text.
+ Using the mouse only works when 'mouse' contains 'n'
+ or 'a'.
+- {not in Vi}
+ If you have a scrollwheel and often accidentally paste
+ text, you can use these mappings to disable the
+ pasting with the middle mouse button: >
+--- 1067,1072 ----
+***************
+*** 1093,1103 ****
+
+ *gp*
+ ["x]gp Just like "p", but leave the cursor just after the new
+! text. {not in Vi}
+
+ *gP*
+ ["x]gP Just like "P", but leave the cursor just after the new
+! text. {not in Vi}
+
+ *:pu* *:put*
+ :[line]pu[t] [x] Put the text [from register x] after [line] (default
+--- 1077,1087 ----
+
+ *gp*
+ ["x]gp Just like "p", but leave the cursor just after the new
+! text.
+
+ *gP*
+ ["x]gP Just like "P", but leave the cursor just after the new
+! text.
+
+ *:pu* *:put*
+ :[line]pu[t] [x] Put the text [from register x] after [line] (default
+***************
+*** 1125,1138 ****
+ ["x]]p or *]p* *]<MiddleMouse>*
+ ["x]]<MiddleMouse> Like "p", but adjust the indent to the current line.
+ Using the mouse only works when 'mouse' contains 'n'
+! or 'a'. {not in Vi}
+
+ ["x][P or *[P*
+ ["x]]P or *]P*
+ ["x][p or *[p* *[<MiddleMouse>*
+ ["x][<MiddleMouse> Like "P", but adjust the indent to the current line.
+ Using the mouse only works when 'mouse' contains 'n'
+! or 'a'. {not in Vi}
+
+ You can use these commands to copy text from one place to another. Do this
+ by first getting the text into a register with a yank, delete or change
+--- 1109,1122 ----
+ ["x]]p or *]p* *]<MiddleMouse>*
+ ["x]]<MiddleMouse> Like "p", but adjust the indent to the current line.
+ Using the mouse only works when 'mouse' contains 'n'
+! or 'a'.
+
+ ["x][P or *[P*
+ ["x]]P or *]P*
+ ["x][p or *[p* *[<MiddleMouse>*
+ ["x][<MiddleMouse> Like "P", but adjust the indent to the current line.
+ Using the mouse only works when 'mouse' contains 'n'
+! or 'a'.
+
+ You can use these commands to copy text from one place to another. Do this
+ by first getting the text into a register with a yank, delete or change
+***************
+*** 1242,1248 ****
+ 3. Small delete register "- *quote_-* *quote-*
+ This register contains text from commands that delete less than one line,
+ except when the command specifies a register with ["x].
+- {not in Vi}
+
+ 4. Named registers "a to "z or "A to "Z *quote_alpha* *quotea*
+ Vim fills these registers only when you say so. Specify them as lowercase
+--- 1226,1231 ----
+***************
+*** 1252,1258 ****
+
+ 5. Read-only registers ":, ". and "%
+ These are '%', '#', ':' and '.'. You can use them only with the "p", "P",
+! and ":put" commands and with CTRL-R. {not in Vi}
+ *quote_.* *quote.* *E29*
+ ". Contains the last inserted text (the same as what is inserted
+ with the insert mode commands CTRL-A and CTRL-@). Note: this
+--- 1235,1241 ----
+
+ 5. Read-only registers ":, ". and "%
+ These are '%', '#', ':' and '.'. You can use them only with the "p", "P",
+! and ":put" commands and with CTRL-R.
+ *quote_.* *quote.* *E29*
+ ". Contains the last inserted text (the same as what is inserted
+ with the insert mode commands CTRL-A and CTRL-@). Note: this
+***************
+*** 1306,1318 ****
+
+ If the "= register is used for the "p" command, the String is split up at <NL>
+ characters. If the String ends in a <NL>, it is regarded as a linewise
+! register. {not in Vi}
+
+ 8. Selection and drop registers "*, "+ and "~
+ Use these registers for storing and retrieving the selected text for the GUI.
+ See |quotestar| and |quoteplus|. When the clipboard is not available or not
+ working, the unnamed register is used instead. For Unix systems the clipboard
+! is only available when the |+xterm_clipboard| feature is present. {not in Vi}
+
+ Note that there is only a distinction between "* and "+ for X11 systems. For
+ an explanation of the difference, see |x11-selection|. Under MS-Windows, use
+--- 1289,1301 ----
+
+ If the "= register is used for the "p" command, the String is split up at <NL>
+ characters. If the String ends in a <NL>, it is regarded as a linewise
+! register.
+
+ 8. Selection and drop registers "*, "+ and "~
+ Use these registers for storing and retrieving the selected text for the GUI.
+ See |quotestar| and |quoteplus|. When the clipboard is not available or not
+ working, the unnamed register is used instead. For Unix systems the clipboard
+! is only available when the |+xterm_clipboard| feature is present.
+
+ Note that there is only a distinction between "* and "+ for X11 systems. For
+ an explanation of the difference, see |x11-selection|. Under MS-Windows, use
+***************
+*** 1323,1329 ****
+ operation. When something has been dropped onto Vim, the "~ register is
+ filled in and the <Drop> pseudo key is sent for notification. You can remap
+ this key if you want; the default action (for all modes) is to insert the
+! contents of the "~ register at the cursor position. {not in Vi}
+ {only available when compiled with the |+dnd| feature, currently only with the
+ GTK GUI}
+
+--- 1306,1312 ----
+ operation. When something has been dropped onto Vim, the "~ register is
+ filled in and the <Drop> pseudo key is sent for notification. You can remap
+ this key if you want; the default action (for all modes) is to insert the
+! contents of the "~ register at the cursor position.
+ {only available when compiled with the |+dnd| feature, currently only with the
+ GTK GUI}
+
+***************
+*** 1333,1339 ****
+ 9. Black hole register "_ *quote_*
+ When writing to this register, nothing happens. This can be used to delete
+ text without affecting the normal registers. When reading from this register,
+! nothing is returned. {not in Vi}
+
+ 10. Last search pattern register "/ *quote_/* *quote/*
+ Contains the most recent search-pattern. This is used for "n" and 'hlsearch'.
+--- 1316,1322 ----
+ 9. Black hole register "_ *quote_*
+ When writing to this register, nothing happens. This can be used to delete
+ text without affecting the normal registers. When reading from this register,
+! nothing is returned.
+
+ 10. Last search pattern register "/ *quote_/* *quote/*
+ Contains the most recent search-pattern. This is used for "n" and 'hlsearch'.
+***************
+*** 1342,1348 ****
+ register. The search direction is available in |v:searchforward|.
+ Note that the value is restored when returning from a function
+ |function-search-undo|.
+- {not in Vi}
+
+ *@/*
+ You can write to a register with a `:let` command |:let-@|. Example: >
+--- 1325,1330 ----
+***************
+*** 1373,1389 ****
+ :[range]ce[nter] [width] *:ce* *:center*
+ Center lines in [range] between [width] columns
+ (default 'textwidth' or 80 when 'textwidth' is 0).
+- {not in Vi}
+
+ :[range]ri[ght] [width] *:ri* *:right*
+ Right-align lines in [range] at [width] columns
+ (default 'textwidth' or 80 when 'textwidth' is 0).
+- {not in Vi}
+
+ *:le* *:left*
+ :[range]le[ft] [indent]
+ Left-align lines in [range]. Sets the indent in the
+! lines to [indent] (default 0). {not in Vi}
+
+ *gq*
+ gq{motion} Format the lines that {motion} moves over.
+--- 1355,1369 ----
+ :[range]ce[nter] [width] *:ce* *:center*
+ Center lines in [range] between [width] columns
+ (default 'textwidth' or 80 when 'textwidth' is 0).
+
+ :[range]ri[ght] [width] *:ri* *:right*
+ Right-align lines in [range] at [width] columns
+ (default 'textwidth' or 80 when 'textwidth' is 0).
+
+ *:le* *:left*
+ :[range]le[ft] [indent]
+ Left-align lines in [range]. Sets the indent in the
+! lines to [indent] (default 0).
+
+ *gq*
+ gq{motion} Format the lines that {motion} moves over.
+***************
+*** 1410,1433 ****
+
+ gqgq *gqgq* *gqq*
+ gqq Format the current line. With a count format that
+! many lines. {not in Vi}
+
+ *v_gq*
+ {Visual}gq Format the highlighted text. (for {Visual} see
+! |Visual-mode|). {not in Vi}
+
+ *gw*
+ gw{motion} Format the lines that {motion} moves over. Similar to
+ |gq| but puts the cursor back at the same position in
+ the text. However, 'formatprg' and 'formatexpr' are
+! not used. {not in Vi}
+
+ gwgw *gwgw* *gww*
+! gww Format the current line as with "gw". {not in Vi}
+
+ *v_gw*
+ {Visual}gw Format the highlighted text as with "gw". (for
+! {Visual} see |Visual-mode|). {not in Vi}
+
+ Example: To format the current paragraph use: *gqap* >
+ gqap
+--- 1390,1413 ----
+
+ gqgq *gqgq* *gqq*
+ gqq Format the current line. With a count format that
+! many lines.
+
+ *v_gq*
+ {Visual}gq Format the highlighted text. (for {Visual} see
+! |Visual-mode|).
+
+ *gw*
+ gw{motion} Format the lines that {motion} moves over. Similar to
+ |gq| but puts the cursor back at the same position in
+ the text. However, 'formatprg' and 'formatexpr' are
+! not used.
+
+ gwgw *gwgw* *gww*
+! gww Format the current line as with "gw".
+
+ *v_gw*
+ {Visual}gw Format the highlighted text as with "gw". (for
+! {Visual} see |Visual-mode|).
+
+ Example: To format the current paragraph use: *gqap* >
+ gqap
+***************
+*** 1457,1463 ****
+ program.
+
+ *format-formatexpr*
+! The 'formatexpr' option can be set to a Vim Script function that performs
+ reformatting of the buffer. This should usually happen in an |ftplugin|,
+ since formatting is highly dependent on the type of file. It makes
+ sense to use an |autoload| script, so the corresponding script is only loaded
+--- 1437,1443 ----
+ program.
+
+ *format-formatexpr*
+! The 'formatexpr' option can be set to a Vim script function that performs
+ reformatting of the buffer. This should usually happen in an |ftplugin|,
+ since formatting is highly dependent on the type of file. It makes
+ sense to use an |autoload| script, so the corresponding script is only loaded
+***************
+*** 1491,1497 ****
+
+ You can then enable the formatting by executing: >
+ setlocal formatexpr=format#Format()
+! >
+ Note: this function explicitly returns non-zero when called from insert mode
+ (which basically means, text is inserted beyond the 'textwidth' limit). This
+ causes Vim to fall back to reformat the text by using the internal formatter.
+--- 1471,1477 ----
+
+ You can then enable the formatting by executing: >
+ setlocal formatexpr=format#Format()
+!
+ Note: this function explicitly returns non-zero when called from insert mode
+ (which basically means, text is inserted beyond the 'textwidth' limit). This
+ causes Vim to fall back to reformat the text by using the internal formatter.
+***************
+*** 1901,1904 ****
+ process you may end up with duplicated lines. This also depends on the system
+ library function used.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1881,1884 ----
+ process you may end up with duplicated lines. This also depends on the system
+ library function used.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/channel.txt 2018-09-06 16:27:20.664831945 +0200
+--- runtime/doc/channel.txt 2019-05-05 17:36:27.876329529 +0200
+***************
+*** 1,4 ****
+! *channel.txt* For Vim version 8.1. Last change: 2018 Apr 18
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *channel.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 24,30 ****
+ 11. Controlling a job |job-control|
+ 12. Using a prompt buffer |prompt-buffer|
+
+- {Vi does not have any of these features}
+ {only when compiled with the |+channel| feature for channel stuff}
+ You can check this with: `has('channel')`
+ {only when compiled with the |+job| feature for job stuff}
+--- 24,29 ----
+***************
+*** 308,316 ****
+
+ Command "redraw" ~
+
+! The other commands do not update the screen, so that you can send a sequence
+! of commands without the cursor moving around. You must end with the "redraw"
+! command to show any changed text and show the cursor where it belongs.
+
+ The argument is normally an empty string:
+ ["redraw", ""] ~
+--- 307,316 ----
+
+ Command "redraw" ~
+
+! The other commands do not explicitly update the screen, so that you can send a
+! sequence of commands without the cursor moving around. A redraw can happen as
+! a side effect of some commands. You must end with the "redraw" command to
+! show any changed text and show the cursor where it belongs.
+
+ The argument is normally an empty string:
+ ["redraw", ""] ~
+***************
+*** 820,827 ****
+ The user can go to Normal mode and navigate through the buffer. This can be
+ useful see older output or copy text.
+
+ Any command that starts Insert mode, such as "a", "i", "A" and "I", will move
+! the cursor to the last line, after the prompt.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 820,833 ----
+ The user can go to Normal mode and navigate through the buffer. This can be
+ useful see older output or copy text.
+
++ The CTRL-W key can be used to start a window command, such as CTRL-W w to
++ switch to the next window. This also works in Insert mode (use Shift-CTRL-W
++ to delete a word). When leaving the window Insert mode will be stopped. When
++ coming back to the prompt window Insert mode will be restored.
++
+ Any command that starts Insert mode, such as "a", "i", "A" and "I", will move
+! the cursor to the last line. "A" will move to the end of the line, "I" to the
+! start of the line.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/cmdline.txt 2018-09-10 21:04:09.860392752 +0200
+--- runtime/doc/cmdline.txt 2019-05-05 17:32:09.689749856 +0200
+***************
+*** 1,4 ****
+! *cmdline.txt* For Vim version 8.1. Last change: 2018 May 14
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *cmdline.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 66,72 ****
+ - All searches are put in the search history, including the ones that come
+ from commands like "*" and "#". But for a mapping, only the last search is
+ remembered (to avoid that long mappings trash the history).
+- {Vi: no history}
+ {not available when compiled without the |+cmdline_hist| feature}
+
+ There is an automatic completion of names on the command-line; see
+--- 66,71 ----
+***************
+*** 124,135 ****
+ :cnoremap <C-U> <C-E><C-U>
+ <
+ *c_<Insert>* *c_Insert*
+! <Insert> Toggle between insert and overstrike. {not in Vi}
+
+ {char1} <BS> {char2} or *c_digraph*
+ CTRL-K {char1} {char2} *c_CTRL-K*
+ enter digraph (see |digraphs|). When {char1} is a special
+! key, the code for that key is inserted in <> form. {not in Vi}
+
+ CTRL-R {0-9a-z"%#:-=.} *c_CTRL-R* *c_<C-R>*
+ Insert the contents of a numbered or named register. Between
+--- 123,134 ----
+ :cnoremap <C-U> <C-E><C-U>
+ <
+ *c_<Insert>* *c_Insert*
+! <Insert> Toggle between insert and overstrike.
+
+ {char1} <BS> {char2} or *c_digraph*
+ CTRL-K {char1} {char2} *c_CTRL-K*
+ enter digraph (see |digraphs|). When {char1} is a special
+! key, the code for that key is inserted in <> form.
+
+ CTRL-R {0-9a-z"%#:-=.} *c_CTRL-R* *c_<C-R>*
+ Insert the contents of a numbered or named register. Between
+***************
+*** 165,171 ****
+ too.
+ When the result is a Float it's automatically
+ converted to a String.
+! See |registers| about registers. {not in Vi}
+ Implementation detail: When using the |expression| register
+ and invoking setcmdpos(), this sets the position before
+ inserting the resulting string. Use CTRL-R CTRL-R to set the
+--- 164,170 ----
+ too.
+ When the result is a Float it's automatically
+ converted to a String.
+! See |registers| about registers.
+ Implementation detail: When using the |expression| register
+ and invoking setcmdpos(), this sets the position before
+ inserting the resulting string. Use CTRL-R CTRL-R to set the
+***************
+*** 188,194 ****
+ currently displayed match is used. With CTRL-W the part of
+ the word that was already typed is not inserted again.
+
+- {not in Vi}
+ CTRL-F and CTRL-P: {only when |+file_in_path| feature is
+ included}
+
+--- 187,192 ----
+***************
+*** 313,323 ****
+ off, since you are expected to type a command. After
+ switching it on with CTRL-^, the new state is not used again
+ for the next command or Search pattern.
+- {not in Vi}
+
+ *c_CTRL-]*
+! CTRL-] Trigger abbreviation, without inserting a character. {not in
+! Vi}
+
+ For Emacs-style editing on the command-line see |emacs-keys|.
+
+--- 311,319 ----
+ off, since you are expected to type a command. After
+ switching it on with CTRL-^, the new state is not used again
+ for the next command or Search pattern.
+
+ *c_CTRL-]*
+! CTRL-] Trigger abbreviation, without inserting a character.
+
+ For Emacs-style editing on the command-line see |emacs-keys|.
+
+***************
+*** 332,338 ****
+
+ *:his* *:history*
+ :his[tory] Print the history of last entered commands.
+- {not in Vi}
+ {not available when compiled without the |+cmdline_hist|
+ feature}
+
+--- 328,333 ----
+***************
+*** 344,350 ****
+ i[nput] or @ input line history
+ d[ebug] or > debug command history
+ a[ll] all of the above
+- {not in Vi}
+
+ If the numbers {first} and/or {last} are given, the respective
+ range of entries from a history is listed. These numbers can
+--- 339,344 ----
+***************
+*** 534,541 ****
+ to add comments. Example: >
+ :set ai "set 'autoindent' option
+ It is not possible to add a comment to a shell command ":!cmd" or to the
+! ":map" command and a few others, because they see the '"' as part of their
+! argument. This is mentioned where the command is explained.
+
+ *:bar* *:\bar*
+ '|' can be used to separate commands, so you can give multiple commands in one
+--- 528,572 ----
+ to add comments. Example: >
+ :set ai "set 'autoindent' option
+ It is not possible to add a comment to a shell command ":!cmd" or to the
+! ":map" command and a few others (mainly commands that expect expressions)
+! that see the '"' as part of their argument:
+!
+! :argdo
+! :autocmd
+! :bufdo
+! :cexpr (and the like)
+! :cdo (and the like)
+! :command
+! :cscope (and the like)
+! :debug
+! :display
+! :echo (and the like)
+! :elseif
+! :execute
+! :folddoopen
+! :folddoclosed
+! :for
+! :grep (and the like)
+! :help (and the like)
+! :if
+! :let
+! :make
+! :map (and the like including :abbrev commands)
+! :menu (and the like)
+! :mkspell
+! :normal
+! :ownsyntax
+! :popup
+! :promptfind (and the like)
+! :registers
+! :return
+! :sort
+! :syntax
+! :tabdo
+! :tearoff
+! :vimgrep (and the like)
+! :while
+! :windo
+
+ *:bar* *:\bar*
+ '|' can be used to separate commands, so you can give multiple commands in one
+***************
+*** 899,905 ****
+ directory.
+ :. Reduce file name to be relative to current directory, if
+ possible. File name is unmodified if it is not below the
+! current directory.
+ For maximum shortness, use ":~:.".
+ :h Head of the file name (the last component and any separators
+ removed). Cannot be used with :e, :r or :t.
+--- 930,937 ----
+ directory.
+ :. Reduce file name to be relative to current directory, if
+ possible. File name is unmodified if it is not below the
+! current directory, but on MS-Windows the drive is removed if
+! it is the current drive.
+ For maximum shortness, use ":~:.".
+ :h Head of the file name (the last component and any separators
+ removed). Cannot be used with :e, :r or :t.
+***************
+*** 1168,1171 ****
+ @ string for |input()|
+ - text for |:insert| or |:append|
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1200,1203 ----
+ @ string for |input()|
+ - text for |:insert| or |:append|
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/debugger.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/debugger.txt 2019-05-05 17:39:30.515314777 +0200
+***************
+*** 1,4 ****
+! *debugger.txt* For Vim version 8.1. Last change: 2017 Nov 21
+
+
+ VIM REFERENCE MANUAL by Gordon Prieur
+--- 1,4 ----
+! *debugger.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Gordon Prieur
+***************
+*** 10,16 ****
+ 2. Vim Compile Options |debugger-compilation|
+ 3. Integrated Debuggers |debugger-integration|
+
+- {Vi does not have any of these features}
+
+ ==============================================================================
+ 1. Debugger Features *debugger-features*
+--- 10,15 ----
+***************
+*** 139,142 ****
+
+ For Sun NetBeans support see |netbeans|.
+
+! vim:tw=78:sw=4:ts=8:ft=help:norl:
+--- 138,141 ----
+
+ For Sun NetBeans support see |netbeans|.
+
+! vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/debug.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/debug.txt 2018-07-29 14:23:36.355157624 +0200
+***************
+*** 172,175 ****
+ http://msdn.microsoft.com/vstudio/express/visualC/default.aspx
+
+ =========================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 172,175 ----
+ http://msdn.microsoft.com/vstudio/express/visualC/default.aspx
+
+ =========================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/develop.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/develop.txt 2019-02-17 17:26:56.181603202 +0100
+***************
+*** 1,4 ****
+! *develop.txt* For Vim version 8.1. Last change: 2018 May 02
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *develop.txt* For Vim version 8.1. Last change: 2019 Feb 17
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 355,360 ****
+--- 355,378 ----
+ cmd;
+ }
+
++ When a block has one line the braces can be left out. When an if/else has
++ braces on one block, it usually looks better when the other block also has
++ braces:
++ OK: if (cond)
++ cmd;
++ else
++ cmd;
++
++ OK: if (cond)
++ {
++ cmd;
++ }
++ else
++ {
++ cmd;
++ cmd;
++ }
++
+ Use ANSI (new style) function declarations with the return type on a separate
+ indented line.
+
+***************
+*** 367,376 ****
+ */
+ int
+ function_name(
+! int arg1, /* short comment about arg1 */
+! int arg2) /* short comment about arg2 */
+ {
+! int local; /* comment about local */
+
+ local = arg1 * arg2;
+
+--- 385,394 ----
+ */
+ int
+ function_name(
+! int arg1, // short comment about arg1
+! int arg2) // short comment about arg2
+ {
+! int local; // comment about local
+
+ local = arg1 * arg2;
+
+***************
+*** 563,566 ****
+ Note that some compilers cannot handle long lines or strings. The C89
+ standard specifies a limit of 509 characters.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 581,584 ----
+ Note that some compilers cannot handle long lines or strings. The C89
+ standard specifies a limit of 509 characters.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/diff.txt 2018-09-10 17:50:32.709306979 +0200
+--- runtime/doc/diff.txt 2019-05-04 22:37:03.397001141 +0200
+***************
+*** 1,4 ****
+! *diff.txt* For Vim version 8.1. Last change: 2017 Oct 03
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *diff.txt* For Vim version 8.1. Last change: 2019 May 04
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 16,23 ****
+ 4. Copying diffs |copy-diffs|
+ 5. Diff options |diff-options|
+
+- {not in Vi}
+-
+ ==============================================================================
+ 1. Starting diff mode *start-vimdiff*
+
+--- 16,21 ----
+***************
+*** 179,186 ****
+ need another buffer. This command is useful: >
+ command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
+ \ | diffthis | wincmd p | diffthis
+! (this is in |vimrc_example.vim|). Use ":DiffOrig" to see the differences
+! between the current buffer and the file it was loaded from.
+
+ A buffer that is unloaded cannot be used for the diff. But it does work for
+ hidden buffers. You can use ":hide" to close a window without unloading the
+--- 177,184 ----
+ need another buffer. This command is useful: >
+ command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
+ \ | diffthis | wincmd p | diffthis
+! (this is in |defaults.vim|). Use ":DiffOrig" to see the differences between
+! the current buffer and the file it was loaded from.
+
+ A buffer that is unloaded cannot be used for the diff. But it does work for
+ hidden buffers. You can use ":hide" to close a window without unloading the
+*** ../vim-8.1.1279/runtime/doc/digraph.txt 2018-12-14 18:52:57.169528762 +0100
+--- runtime/doc/digraph.txt 2019-05-05 17:39:34.763291093 +0200
+***************
+*** 1,4 ****
+! *digraph.txt* For Vim version 8.1. Last change: 2016 Nov 04
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *digraph.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 18,24 ****
+ 2. Using digraphs |digraphs-use|
+ 3. Default digraphs |digraphs-default|
+
+- {Vi does not have any of these commands}
+
+ ==============================================================================
+ 1. Defining digraphs *digraphs-define*
+--- 18,23 ----
+***************
+*** 59,76 ****
+ "10". That's because NUL characters are internally represented with a NL
+ character. When you write the file it will become a NUL character.
+
+! When Vim was compiled without the |+multi_byte| feature, you need to specify
+! the character in the encoding given with 'encoding'. You might want to use
+! something like this: >
+!
+! if has("multi_byte")
+! digraph oe 339
+! elseif &encoding == "iso-8859-15"
+! digraph oe 189
+! endif
+!
+! This defines the "oe" digraph for a character that is number 339 in Unicode
+! and 189 in latin9 (iso-8859-15).
+
+ ==============================================================================
+ 2. Using digraphs *digraphs-use*
+--- 58,66 ----
+ "10". That's because NUL characters are internally represented with a NL
+ character. When you write the file it will become a NUL character.
+
+! Example: >
+! digraph oe 339
+! This defines the "oe" digraph for a character that is number 339 in Unicode.
+
+ ==============================================================================
+ 2. Using digraphs *digraphs-use*
+***************
+*** 113,123 ****
+
+ You may have problems using Vim with characters which have a value above 128.
+ For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert
+! mode. After leaving the Insert mode everything is fine. Note that fmt
+! removes all characters with a value above 128 from the text being formatted.
+! On some Unix systems this means you have to define the environment-variable
+! LC_CTYPE. If you are using csh, then put the following line in your .cshrc: >
+! setenv LC_CTYPE iso_8859_1
+
+ ==============================================================================
+ 3. Default digraphs *digraphs-default*
+--- 103,116 ----
+
+ You may have problems using Vim with characters which have a value above 128.
+ For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert
+! mode. After leaving the Insert mode everything is fine. On some Unix systems
+! this means you have to define the environment-variable LC_CTYPE. If you are
+! using csh, then put the following line in your .cshrc: >
+! setenv LC_CTYPE en_US.utf8
+! (or similar for a different language or country). The value must be a valid
+! locale on your system, i.e. on Unix-like systems it must be present in the
+! output of >
+! locale -a
+
+ ==============================================================================
+ 3. Default digraphs *digraphs-default*
+***************
+*** 161,168 ****
+ Example: a: is ä and o: is ö
+
+ These are the RFC1345 digraphs for the one-byte characters. See the output of
+! ":digraphs" for the others. The characters above 255 are only available when
+! Vim was compiled with the |+multi_byte| feature.
+
+ EURO
+
+--- 154,160 ----
+ Example: a: is ä and o: is ö
+
+ These are the RFC1345 digraphs for the one-byte characters. See the output of
+! ":digraphs" for the others.
+
+ EURO
+
+***************
+*** 1490,1493 ****
+ ſt ft FB05 64261 LATIN SMALL LIGATURE LONG S T
+ st st FB06 64262 LATIN SMALL LIGATURE ST
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1482,1485 ----
+ ſt ft FB05 64261 LATIN SMALL LIGATURE LONG S T
+ st st FB06 64262 LATIN SMALL LIGATURE ST
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/editing.txt 2019-04-27 20:36:52.526303597 +0200
+--- runtime/doc/editing.txt 2019-05-05 17:40:01.711140762 +0200
+***************
+*** 1,4 ****
+! *editing.txt* For Vim version 8.1. Last change: 2018 Mar 29
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *editing.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 44,50 ****
+ :keepalt {cmd} Execute {cmd} while keeping the current alternate file
+ name. Note that commands invoked indirectly (e.g.,
+ with a function) may still set the alternate file
+! name. {not in Vi}
+
+ All file names are remembered in the buffer list. When you enter a file name,
+ for editing (e.g., with ":e filename") or writing (e.g., with ":w filename"),
+--- 44,50 ----
+ :keepalt {cmd} Execute {cmd} while keeping the current alternate file
+ name. Note that commands invoked indirectly (e.g.,
+ with a function) may still set the alternate file
+! name.
+
+ All file names are remembered in the buffer list. When you enter a file name,
+ for editing (e.g., with ":e filename") or writing (e.g., with ":w filename"),
+***************
+*** 60,73 ****
+ option is set), and the file status (readonly,
+ modified, read errors, new file). See the 'shortmess'
+ option about how to make this message shorter.
+- {Vi does not include column number}
+
+ :f[ile]! like |:file|, but don't truncate the name even when
+ 'shortmess' indicates this.
+
+ {count}CTRL-G Like CTRL-G, but prints the current file name with
+ full path. If the count is higher than 1 the current
+! buffer number is also given. {not in Vi}
+
+ *g_CTRL-G* *word-count* *byte-count*
+ g CTRL-G Prints the current position of the cursor in five
+--- 60,72 ----
+ option is set), and the file status (readonly,
+ modified, read errors, new file). See the 'shortmess'
+ option about how to make this message shorter.
+
+ :f[ile]! like |:file|, but don't truncate the name even when
+ 'shortmess' indicates this.
+
+ {count}CTRL-G Like CTRL-G, but prints the current file name with
+ full path. If the count is higher than 1 the current
+! buffer number is also given.
+
+ *g_CTRL-G* *word-count* *byte-count*
+ g CTRL-G Prints the current position of the cursor in five
+***************
+*** 80,86 ****
+ column are shown, separated with a dash.
+ Also see the 'ruler' option and the |wordcount()|
+ function.
+- {not in Vi}
+
+ *v_g_CTRL-G*
+ {Visual}g CTRL-G Similar to "g CTRL-G", but Word, Character, Line, and
+--- 79,84 ----
+***************
+*** 88,94 ****
+ displayed.
+ In Blockwise mode, Column count is also shown. (For
+ {Visual} see |Visual-mode|.)
+- {not in VI}
+
+ *:file_f*
+ :f[ile][!] {name} Sets the current file name to {name}. The optional !
+--- 86,91 ----
+***************
+*** 98,111 ****
+ to hold the old name.
+ *:0file*
+ :0f[ile][!] Remove the name of the current buffer. The optional !
+! avoids truncating the message, as with |:file|. {not
+! in Vi}
+
+ :buffers
+ :files
+ :ls List all the currently known file names. See
+! 'windows.txt' |:files| |:buffers| |:ls|. {not in
+! Vi}
+
+ Vim will remember the full path name of a file name that you enter. In most
+ cases when the file name is displayed only the name you typed is shown, but
+--- 95,106 ----
+ to hold the old name.
+ *:0file*
+ :0f[ile][!] Remove the name of the current buffer. The optional !
+! avoids truncating the message, as with |:file|.
+
+ :buffers
+ :files
+ :ls List all the currently known file names. See
+! 'windows.txt' |:files| |:buffers| |:ls|.
+
+ Vim will remember the full path name of a file name that you enter. In most
+ cases when the file name is displayed only the name you typed is shown, but
+***************
+*** 244,262 ****
+ If 'fileformats' is not empty, the first format given
+ will be used for the new buffer. If 'fileformats' is
+ empty, the 'fileformat' of the current buffer is used.
+- {not in Vi}
+
+ *:ene!* *:enew!*
+ :ene[w]! Edit a new, unnamed buffer. Discard any changes to
+ the current buffer.
+ Set 'fileformat' like |:enew|.
+- {not in Vi}
+
+ *:fin* *:find*
+ :fin[d][!] [++opt] [+cmd] {file}
+ Find {file} in 'path' and then |:edit| it.
+! {not in Vi} {not available when the |+file_in_path|
+! feature was disabled at compile time}
+
+ :{count}fin[d][!] [++opt] [+cmd] {file}
+ Just like ":find", but use the {count} match in
+--- 239,255 ----
+ If 'fileformats' is not empty, the first format given
+ will be used for the new buffer. If 'fileformats' is
+ empty, the 'fileformat' of the current buffer is used.
+
+ *:ene!* *:enew!*
+ :ene[w]! Edit a new, unnamed buffer. Discard any changes to
+ the current buffer.
+ Set 'fileformat' like |:enew|.
+
+ *:fin* *:find*
+ :fin[d][!] [++opt] [+cmd] {file}
+ Find {file} in 'path' and then |:edit| it.
+! {not available when the |+file_in_path| feature was
+! disabled at compile time}
+
+ :{count}fin[d][!] [++opt] [+cmd] {file}
+ Just like ":find", but use the {count} match in
+***************
+*** 278,284 ****
+ :vie[w][!] [++opt] [+cmd] file
+ When used in Ex mode: Leave |Ex-mode|, go back to
+ Normal mode. Otherwise same as |:edit|, but set
+! 'readonly' option for this buffer. {not in Vi}
+
+ *CTRL-^* *CTRL-6*
+ CTRL-^ Edit the alternate file. Mostly the alternate file is
+--- 271,277 ----
+ :vie[w][!] [++opt] [+cmd] file
+ When used in Ex mode: Leave |Ex-mode|, go back to
+ Normal mode. Otherwise same as |:edit|, but set
+! 'readonly' option for this buffer.
+
+ *CTRL-^* *CTRL-6*
+ CTRL-^ Edit the alternate file. Mostly the alternate file is
+***************
+*** 297,303 ****
+ ":e #[count]"). This is a quick way to switch between
+ files.
+ See |CTRL-^| above for further details.
+- {not in Vi}
+
+ [count]]f *]f* *[f*
+ [count][f Same as "gf". Deprecated.
+--- 290,295 ----
+***************
+*** 331,337 ****
+ For Unix the '~' character is expanded, like in
+ "~user/file". Environment variables are expanded too
+ |expand-env|.
+- {not in Vi}
+ {not available when the |+file_in_path| feature was
+ disabled at compile time}
+
+--- 323,328 ----
+***************
+*** 341,347 ****
+ Leading blanks are skipped, otherwise all blanks and
+ special characters are included in the file name.
+ (For {Visual} see |Visual-mode|.)
+- {not in VI}
+
+ *gF*
+ [count]gF Same as "gf", except if a number follows the file
+--- 332,337 ----
+***************
+*** 637,643 ****
+ still be added to the argument list, but won't be
+ edited. No check for duplicates is done.
+ Also see |++opt| and |+cmd|.
+- {not in Vi}
+
+ :[count]arga[dd] {name} .. *:arga* *:argadd* *E479*
+ :[count]arga[dd]
+--- 627,632 ----
+***************
+*** 659,665 ****
+ There is no check for duplicates, it is possible to
+ add a file to the argument list twice.
+ The currently edited file is not changed.
+- {not in Vi}
+ Note: you can also use this method: >
+ :args ## x
+ < This will add the "x" item and sort the new list.
+--- 648,653 ----
+***************
+*** 673,679 ****
+ when it's deleted from the argument list.
+ Example: >
+ :argdel *.obj
+- < {not in Vi}
+
+ :[range]argd[elete] Delete the {range} files from the argument list.
+ Example: >
+--- 661,666 ----
+***************
+*** 688,694 ****
+ < Removes all the files from the arglist.
+ When the last number in the range is too high, up to
+ the last argument is deleted.
+- {not in Vi}
+
+ *:argu* *:argument*
+ :[count]argu[ment] [count] [++opt] [+cmd]
+--- 675,680 ----
+***************
+*** 697,710 ****
+ when changes have been made and Vim does not want to
+ |abandon| the current buffer.
+ Also see |++opt| and |+cmd|.
+- {not in Vi}
+
+ :[count]argu[ment]! [count] [++opt] [+cmd]
+ Edit file [count] in the argument list, discard any
+ changes to the current buffer. When [count] is
+ omitted the current entry is used.
+ Also see |++opt| and |+cmd|.
+- {not in Vi}
+
+ :[count]n[ext] [++opt] [+cmd] *:n* *:ne* *:next* *E165* *E163*
+ Edit [count] next file. This fails when changes have
+--- 683,694 ----
+***************
+*** 727,733 ****
+ Edit [count] previous file in argument list. This
+ fails when changes have been made and Vim does not
+ want to |abandon| the current buffer.
+! Also see |++opt| and |+cmd|. {Vi: no count or ++opt}.
+
+ :[count]N[ext]! [count] [++opt] [+cmd]
+ Edit [count] previous file in argument list. Discard
+--- 711,717 ----
+ Edit [count] previous file in argument list. This
+ fails when changes have been made and Vim does not
+ want to |abandon| the current buffer.
+! Also see |++opt| and |+cmd|.
+
+ :[count]N[ext]! [count] [++opt] [+cmd]
+ Edit [count] previous file in argument list. Discard
+***************
+*** 748,791 ****
+ :rew[ind]! [++opt] [+cmd]
+ Start editing the first file in the argument list.
+ Discard any changes to the buffer. Also see |++opt|
+! and |+cmd|. {Vi: no ++opt}
+
+ *:fir* *:first*
+ :fir[st][!] [++opt] [+cmd]
+! Other name for ":rewind". {not in Vi}
+
+ *:la* *:last*
+ :la[st] [++opt] [+cmd]
+ Start editing the last file in the argument list.
+ This fails when changes have been made and Vim does
+ not want to |abandon| the current buffer.
+! Also see |++opt| and |+cmd|. {not in Vi}
+
+ :la[st]! [++opt] [+cmd]
+ Start editing the last file in the argument list.
+ Discard any changes to the buffer. Also see |++opt|
+! and |+cmd|. {not in Vi}
+
+ *:wn* *:wnext*
+ :[count]wn[ext] [++opt]
+ Write current file and start editing the [count]
+! next file. Also see |++opt| and |+cmd|. {not in Vi}
+
+ :[count]wn[ext] [++opt] {file}
+ Write current file to {file} and start editing the
+ [count] next file, unless {file} already exists and
+ the 'writeany' option is off. Also see |++opt| and
+! |+cmd|. {not in Vi}
+
+ :[count]wn[ext]! [++opt] {file}
+ Write current file to {file} and start editing the
+! [count] next file. Also see |++opt| and |+cmd|. {not
+! in Vi}
+
+ :[count]wN[ext][!] [++opt] [file] *:wN* *:wNext*
+ :[count]wp[revious][!] [++opt] [file] *:wp* *:wprevious*
+ Same as :wnext, but go to previous file instead of
+! next. {not in Vi}
+
+ The [count] in the commands above defaults to one. For some commands it is
+ possible to use two counts. The last one (rightmost one) is used.
+--- 732,774 ----
+ :rew[ind]! [++opt] [+cmd]
+ Start editing the first file in the argument list.
+ Discard any changes to the buffer. Also see |++opt|
+! and |+cmd|.
+
+ *:fir* *:first*
+ :fir[st][!] [++opt] [+cmd]
+! Other name for ":rewind".
+
+ *:la* *:last*
+ :la[st] [++opt] [+cmd]
+ Start editing the last file in the argument list.
+ This fails when changes have been made and Vim does
+ not want to |abandon| the current buffer.
+! Also see |++opt| and |+cmd|.
+
+ :la[st]! [++opt] [+cmd]
+ Start editing the last file in the argument list.
+ Discard any changes to the buffer. Also see |++opt|
+! and |+cmd|.
+
+ *:wn* *:wnext*
+ :[count]wn[ext] [++opt]
+ Write current file and start editing the [count]
+! next file. Also see |++opt| and |+cmd|.
+
+ :[count]wn[ext] [++opt] {file}
+ Write current file to {file} and start editing the
+ [count] next file, unless {file} already exists and
+ the 'writeany' option is off. Also see |++opt| and
+! |+cmd|.
+
+ :[count]wn[ext]! [++opt] {file}
+ Write current file to {file} and start editing the
+! [count] next file. Also see |++opt| and |+cmd|.
+
+ :[count]wN[ext][!] [++opt] [file] *:wN* *:wNext*
+ :[count]wp[revious][!] [++opt] [file] *:wp* *:wprevious*
+ Same as :wnext, but go to previous file instead of
+! next.
+
+ The [count] in the commands above defaults to one. For some commands it is
+ possible to use two counts. The last one (rightmost one) is used.
+***************
+*** 826,833 ****
+
+ LOCAL ARGUMENT LIST
+
+- {not in Vi}
+-
+ *:arglocal*
+ :argl[ocal] Make a local copy of the global argument list.
+ Doesn't start editing another file.
+--- 809,814 ----
+***************
+*** 878,884 ****
+ autocommand event is disabled by adding it to
+ 'eventignore'. This considerably speeds up editing
+ each file.
+- {not in Vi}
+ Also see |:windo|, |:tabdo|, |:bufdo|, |:cdo|, |:ldo|,
+ |:cfdo| and |:lfdo|
+
+--- 859,864 ----
+***************
+*** 901,908 ****
+ Note: When the 'write' option is off, you are not able to write any file.
+
+ *:w* *:write*
+! *E502* *E503* *E504* *E505*
+! *E512* *E514* *E667* *E796* *E949*
+ :w[rite] [++opt] Write the whole buffer to the current file. This is
+ the normal way to save changes to a file. It fails
+ when the 'readonly' option is set or when there is
+--- 881,888 ----
+ Note: When the 'write' option is off, you are not able to write any file.
+
+ *:w* *:write*
+! *E502* *E503* *E504* *E505*
+! *E512* *E514* *E667* *E796* *E949*
+ :w[rite] [++opt] Write the whole buffer to the current file. This is
+ the normal way to save changes to a file. It fails
+ when the 'readonly' option is set or when there is
+***************
+*** 970,981 ****
+ When 'filetype' is empty filetype detection is done
+ with the new name, before the file is written.
+ When the write was successful 'readonly' is reset.
+- {not in Vi}
+
+ *:up* *:update*
+ :[range]up[date][!] [++opt] [>>] [file]
+ Like ":write", but only write when the buffer has been
+! modified. {not in Vi}
+
+
+ WRITING WITH MULTIPLE BUFFERS *buffer-write*
+--- 950,960 ----
+ When 'filetype' is empty filetype detection is done
+ with the new name, before the file is written.
+ When the write was successful 'readonly' is reset.
+
+ *:up* *:update*
+ :[range]up[date][!] [++opt] [>>] [file]
+ Like ":write", but only write when the buffer has been
+! modified.
+
+
+ WRITING WITH MULTIPLE BUFFERS *buffer-write*
+***************
+*** 983,993 ****
+ *:wa* *:wall*
+ :wa[ll] Write all changed buffers. Buffers without a file
+ name cause an error message. Buffers which are
+! readonly are not written. {not in Vi}
+
+ :wa[ll]! Write all changed buffers, even the ones that are
+ readonly. Buffers without a file name are not
+! written and cause an error message. {not in Vi}
+
+
+ Vim will warn you if you try to overwrite a file that has been changed
+--- 962,972 ----
+ *:wa* *:wall*
+ :wa[ll] Write all changed buffers. Buffers without a file
+ name cause an error message. Buffers which are
+! readonly are not written.
+
+ :wa[ll]! Write all changed buffers, even the ones that are
+ readonly. Buffers without a file name are not
+! written and cause an error message.
+
+
+ Vim will warn you if you try to overwrite a file that has been changed
+***************
+*** 1118,1124 ****
+
+ :conf[irm] q[uit] Quit, but give prompt when changes have been made, or
+ the last file in the argument list has not been
+! edited. See |:confirm| and 'confirm'. {not in Vi}
+
+ :q[uit]! Quit without writing, also when the current buffer has
+ changes. The buffer is unloaded, also when it has
+--- 1097,1103 ----
+
+ :conf[irm] q[uit] Quit, but give prompt when changes have been made, or
+ the last file in the argument list has not been
+! edited. See |:confirm| and 'confirm'.
+
+ :q[uit]! Quit without writing, also when the current buffer has
+ changes. The buffer is unloaded, also when it has
+***************
+*** 1131,1137 ****
+
+ :cq[uit] Quit always, without writing, and return an error
+ code. See |:cq|. Used for Manx's QuickFix mode (see
+! |quickfix|). {not in Vi}
+
+ *:wq*
+ :wq [++opt] Write the current file and quit. Writing fails when
+--- 1110,1116 ----
+
+ :cq[uit] Quit always, without writing, and return an error
+ code. See |:cq|. Used for Manx's QuickFix mode (see
+! |quickfix|).
+
+ *:wq*
+ :wq [++opt] Write the current file and quit. Writing fails when
+***************
+*** 1169,1175 ****
+
+ *ZQ*
+ ZQ Quit without checking for changes (same as ":q!").
+! {not in Vi}
+
+ MULTIPLE WINDOWS AND BUFFERS *window-exit*
+
+--- 1148,1154 ----
+
+ *ZQ*
+ ZQ Quit without checking for changes (same as ":q!").
+!
+
+ MULTIPLE WINDOWS AND BUFFERS *window-exit*
+
+***************
+*** 1177,1212 ****
+ :qa[ll] Exit Vim, unless there are some buffers which have been
+ changed. (Use ":bmod" to go to the next modified buffer).
+ When 'autowriteall' is set all changed buffers will be
+! written, like |:wqall|. {not in Vi}
+
+ :conf[irm] qa[ll]
+ Exit Vim. Bring up a prompt when some buffers have been
+! changed. See |:confirm|. {not in Vi}
+
+! :qa[ll]! Exit Vim. Any changes to buffers are lost. {not in Vi}
+ Also see |:cquit|, it does the same but exits with a non-zero
+ value.
+
+ *:quita* *:quitall*
+! :quita[ll][!] Same as ":qall". {not in Vi}
+
+ :wqa[ll] [++opt] *:wqa* *:wqall* *:xa* *:xall*
+ :xa[ll] Write all changed buffers and exit Vim. If there are buffers
+ without a file name, which are readonly or which cannot be
+! written for another reason, Vim will not quit. {not in Vi}
+
+ :conf[irm] wqa[ll] [++opt]
+ :conf[irm] xa[ll]
+ Write all changed buffers and exit Vim. Bring up a prompt
+ when some buffers are readonly or cannot be written for
+! another reason. See |:confirm|. {not in Vi}
+
+ :wqa[ll]! [++opt]
+ :xa[ll]! Write all changed buffers, even the ones that are readonly,
+ and exit Vim. If there are buffers without a file name or
+ which cannot be written for another reason, or there is a
+ terminal with a running job, Vim will not quit.
+- {not in Vi}
+
+ ==============================================================================
+ 6. Dialogs *edit-dialogs*
+--- 1156,1190 ----
+ :qa[ll] Exit Vim, unless there are some buffers which have been
+ changed. (Use ":bmod" to go to the next modified buffer).
+ When 'autowriteall' is set all changed buffers will be
+! written, like |:wqall|.
+
+ :conf[irm] qa[ll]
+ Exit Vim. Bring up a prompt when some buffers have been
+! changed. See |:confirm|.
+
+! :qa[ll]! Exit Vim. Any changes to buffers are lost.
+ Also see |:cquit|, it does the same but exits with a non-zero
+ value.
+
+ *:quita* *:quitall*
+! :quita[ll][!] Same as ":qall".
+
+ :wqa[ll] [++opt] *:wqa* *:wqall* *:xa* *:xall*
+ :xa[ll] Write all changed buffers and exit Vim. If there are buffers
+ without a file name, which are readonly or which cannot be
+! written for another reason, Vim will not quit.
+
+ :conf[irm] wqa[ll] [++opt]
+ :conf[irm] xa[ll]
+ Write all changed buffers and exit Vim. Bring up a prompt
+ when some buffers are readonly or cannot be written for
+! another reason. See |:confirm|.
+
+ :wqa[ll]! [++opt]
+ :xa[ll]! Write all changed buffers, even the ones that are readonly,
+ and exit Vim. If there are buffers without a file name or
+ which cannot be written for another reason, or there is a
+ terminal with a running job, Vim will not quit.
+
+ ==============================================================================
+ 6. Dialogs *edit-dialogs*
+***************
+*** 1317,1326 ****
+--- 1295,1306 ----
+ name. On Unix systems: Change the current directory
+ to the home directory. Use |:pwd| to print the
+ current directory on all systems.
++ On Unix systems: clear any window-local directory.
+
+ :cd[!] {path} Change the current directory to {path}.
+ If {path} is relative, it is searched for in the
+ directories listed in |'cdpath'|.
++ Clear any window-local directory.
+ Does not change the meaning of an already opened file,
+ because its full path name is remembered. Files from
+ the |arglist| may change though!
+***************
+*** 1330,1336 ****
+ <
+ *:cd-* *E186*
+ :cd[!] - Change to the previous current directory (before the
+! previous ":cd {path}" command). {not in Vi}
+
+ *:chd* *:chdir*
+ :chd[ir][!] [path] Same as |:cd|.
+--- 1310,1316 ----
+ <
+ *:cd-* *E186*
+ :cd[!] - Change to the previous current directory (before the
+! previous ":cd {path}" command).
+
+ *:chd* *:chdir*
+ :chd[ir][!] [path] Same as |:cd|.
+***************
+*** 1341,1360 ****
+ The current directory is not changed for windows in
+ other tabs and for windows in the current tab that
+ have their own window-local directory.
+- {not in Vi}
+
+ *:tch* *:tchdir*
+! :tch[dir][!] Same as |:tcd|. {not in Vi}
+
+ *:lc* *:lcd*
+ :lc[d][!] {path} Like |:cd|, but only set the current directory when
+ the cursor is in the current window. The current
+ directory for other windows is not changed, switching
+ to another window will stop using {path}.
+- {not in Vi}
+
+ *:lch* *:lchdir*
+! :lch[dir][!] Same as |:lcd|. {not in Vi}
+
+ *:pw* *:pwd* *E187*
+ :pw[d] Print the current directory name. {Vi: no pwd}
+--- 1321,1338 ----
+ The current directory is not changed for windows in
+ other tabs and for windows in the current tab that
+ have their own window-local directory.
+
+ *:tch* *:tchdir*
+! :tch[dir][!] Same as |:tcd|.
+
+ *:lc* *:lcd*
+ :lc[d][!] {path} Like |:cd|, but only set the current directory when
+ the cursor is in the current window. The current
+ directory for other windows is not changed, switching
+ to another window will stop using {path}.
+
+ *:lch* *:lchdir*
+! :lch[dir][!] Same as |:lcd|.
+
+ *:pw* *:pwd* *E187*
+ :pw[d] Print the current directory name. {Vi: no pwd}
+***************
+*** 1416,1423 ****
+ file. Otherwise both <CR> <NL> and <NL> are considered to end a line
+ and when the file is written the <NL> will be replaced with <CR> <NL>.
+ - <Nul> characters are shown on the screen as ^@. You can enter them with
+! "CTRL-V CTRL-@" or "CTRL-V 000" {Vi cannot handle <Nul> characters in the
+! file}
+ - To insert a <NL> character in the file split a line. When writing the
+ buffer to a file a <NL> will be written for the <EOL>.
+ - Vim normally appends an <EOL> at the end of the file if there is none.
+--- 1394,1400 ----
+ file. Otherwise both <CR> <NL> and <NL> are considered to end a line
+ and when the file is written the <NL> will be replaced with <CR> <NL>.
+ - <Nul> characters are shown on the screen as ^@. You can enter them with
+! "CTRL-V CTRL-@" or "CTRL-V 000"
+ - To insert a <NL> character in the file split a line. When writing the
+ buffer to a file a <NL> will be written for the <EOL>.
+ - Vim normally appends an <EOL> at the end of the file if there is none.
+***************
+*** 1436,1442 ****
+ The text in the swap file and the undo file is also encrypted. *E843*
+ However, this is done block-by-block and may reduce the time needed to crack a
+ password. You can disable the swap file, but then a crash will cause you to
+! lose your work. The undo file can be disabled without much disadvantage. >
+ :set noundofile
+ :noswapfile edit secrets
+
+--- 1413,1419 ----
+ The text in the swap file and the undo file is also encrypted. *E843*
+ However, this is done block-by-block and may reduce the time needed to crack a
+ password. You can disable the swap file, but then a crash will cause you to
+! lose your work. The undo file can be disabled without too much disadvantage. >
+ :set noundofile
+ :noswapfile edit secrets
+
+***************
+*** 1768,1771 ****
+ currently work with 'path' items that contain a URL or use the double star
+ with depth limiter (/usr/**2) or upward search (;) notations.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1745,1748 ----
+ currently work with 'path' items that contain a URL or use the double star
+ with depth limiter (/usr/**2) or upward search (;) notations.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/eval.txt 2019-05-05 15:47:37.821923550 +0200
+--- runtime/doc/eval.txt 2019-05-05 17:40:12.571080122 +0200
+***************
+*** 1,4 ****
+! *eval.txt* For Vim version 8.1. Last change: 2018 May 17
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *eval.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 27,38 ****
+ 7. Commands |expression-commands|
+ 8. Exception handling |exception-handling|
+ 9. Examples |eval-examples|
+! 10. No +eval feature |no-eval-feature|
+! 11. The sandbox |eval-sandbox|
+! 12. Textlock |textlock|
+! 13. Testing |testing|
+!
+! {Vi does not have any of these commands}
+
+ ==============================================================================
+ 1. Variables *variables*
+--- 27,37 ----
+ 7. Commands |expression-commands|
+ 8. Exception handling |exception-handling|
+ 9. Examples |eval-examples|
+! 10. Vim script version |vimscript-version|
+! 11. No +eval feature |no-eval-feature|
+! 12. The sandbox |eval-sandbox|
+! 13. Textlock |textlock|
+! 14. Testing |testing|
+
+ ==============================================================================
+ 1. Variables *variables*
+***************
+*** 107,113 ****
+ To avoid a leading zero to cause octal conversion, or for using a different
+ base, use |str2nr()|.
+
+! *TRUE* *FALSE*
+ For boolean operators Numbers are used. Zero is FALSE, non-zero is TRUE.
+ You can also use |v:false| and |v:true|. When TRUE is returned from a
+ function it is the Number one, FALSE is the number zero.
+--- 106,112 ----
+ To avoid a leading zero to cause octal conversion, or for using a different
+ base, use |str2nr()|.
+
+! *TRUE* *FALSE* *Boolean*
+ For boolean operators Numbers are used. Zero is FALSE, non-zero is TRUE.
+ You can also use |v:false| and |v:true|. When TRUE is returned from a
+ function it is the Number one, FALSE is the number zero.
+***************
+*** 187,196 ****
+ arguments will be passed to the function. Example: >
+
+ let Cb = function('Callback', ['foo'], myDict)
+! call Cb()
+
+ This will invoke the function as if using: >
+! call myDict.Callback('foo')
+
+ This is very useful when passing a function around, e.g. in the arguments of
+ |ch_open()|.
+--- 186,195 ----
+ arguments will be passed to the function. Example: >
+
+ let Cb = function('Callback', ['foo'], myDict)
+! call Cb('bar')
+
+ This will invoke the function as if using: >
+! call myDict.Callback('foo', 'bar')
+
+ This is very useful when passing a function around, e.g. in the arguments of
+ |ch_open()|.
+***************
+*** 461,467 ****
+
+
+ 1.4 Dictionaries ~
+! *dict* *Dictionaries* *Dictionary*
+ A Dictionary is an associative array: Each entry has a key and a value. The
+ entry can be located with the key. The entries are stored without a specific
+ ordering.
+--- 460,466 ----
+
+
+ 1.4 Dictionaries ~
+! *dict* *Dict* *Dictionaries* *Dictionary*
+ A Dictionary is an associative array: Each entry has a key and a value. The
+ entry can be located with the key. The entries are stored without a specific
+ ordering.
+***************
+*** 525,531 ****
+ :endfor
+
+ If you want both the key and the value use the |items()| function. It returns
+! a List in which each item is a List with two items, the key and the value: >
+ :for [key, value] in items(mydict)
+ : echo key . ': ' . value
+ :endfor
+--- 524,530 ----
+ :endfor
+
+ If you want both the key and the value use the |items()| function. It returns
+! a List in which each item is a List with two items, the key and the value: >
+ :for [key, value] in items(mydict)
+ : echo key . ': ' . value
+ :endfor
+***************
+*** 625,632 ****
+
+ 1.5 Blobs ~
+ *blob* *Blob* *Blobs* *E978*
+! A Blob mostly behaves like a |List| of numbers, where the numbers have an
+! 8-bit value, from 0 to 255.
+
+
+ Blob creation ~
+--- 624,634 ----
+
+ 1.5 Blobs ~
+ *blob* *Blob* *Blobs* *E978*
+! A Blob is a binary object. It can be used to read an image from a file and
+! send it over a channel, for example.
+!
+! A Blob mostly behaves like a |List| of numbers, where each number has the
+! value of an 8-bit byte, from 0 to 255.
+
+
+ Blob creation ~
+***************
+*** 662,667 ****
+--- 664,679 ----
+ :echo get(myblob, idx, 999)
+
+
++ Blob iteration ~
++
++ The |:for| loop executes commands for each byte of a Blob. The loop variable is
++ set to each byte in the Blob. Example: >
++ :for byte in 0z112233
++ : call Doit(byte)
++ :endfor
++ This calls Doit() with 0x11, 0x22 and 0x33.
++
++
+ Blob concatenation ~
+
+ Two blobs can be concatenated with the "+" operator: >
+***************
+*** 686,692 ****
+ :let otherblob = myblob[:] " make a copy of the Blob
+
+ If the first index is beyond the last byte of the Blob or the second index is
+! before the first byte, the result is an empty list. There is no error
+ message.
+
+ If the second index is equal to or greater than the length of the list the
+--- 698,704 ----
+ :let otherblob = myblob[:] " make a copy of the Blob
+
+ If the first index is beyond the last byte of the Blob or the second index is
+! before the first index, the result is an empty Blob. There is no error
+ message.
+
+ If the second index is equal to or greater than the length of the list the
+***************
+*** 964,975 ****
+ if get(Part1, 'name') == get(Part2, 'name')
+ " Part1 and Part2 refer to the same function
+
+! When using "is" or "isnot" with a |List| or a |Dictionary| this checks if the
+! expressions are referring to the same |List| or |Dictionary| instance. A copy
+! of a |List| is different from the original |List|. When using "is" without
+! a |List| or a |Dictionary| it is equivalent to using "equal", using "isnot"
+! equivalent to using "not equal". Except that a different type means the
+! values are different: >
+ echo 4 == '4'
+ 1
+ echo 4 is '4'
+--- 976,987 ----
+ if get(Part1, 'name') == get(Part2, 'name')
+ " Part1 and Part2 refer to the same function
+
+! Using "is" or "isnot" with a |List|, |Dictionary| or |Blob| checks whether
+! the expressions are referring to the same |List|, |Dictionary| or |Blob|
+! instance. A copy of a |List| is different from the original |List|. When
+! using "is" without a |List|, |Dictionary| or |Blob|, it is equivalent to
+! using "equal", using "isnot" equivalent to using "not equal". Except that
+! a different type means the values are different: >
+ echo 4 == '4'
+ 1
+ echo 4 is '4'
+***************
+*** 1030,1036 ****
+ expr7 / expr7 Number division *expr-/*
+ expr7 % expr7 Number modulo *expr-%*
+
+! For all, except ".", Strings are converted to Numbers.
+ For bitwise operators see |and()|, |or()| and |xor()|.
+
+ Note the difference between "+" and ".":
+--- 1042,1048 ----
+ expr7 / expr7 Number division *expr-/*
+ expr7 % expr7 Number modulo *expr-%*
+
+! For all, except "." and "..", Strings are converted to Numbers.
+ For bitwise operators see |and()|, |or()| and |xor()|.
+
+ Note the difference between "+" and ".":
+***************
+*** 1154,1160 ****
+ indexes expr1a and expr1b, inclusive. Examples: >
+ :let b = 0zDEADBEEF
+ :let bs = b[1:2] " 0zADBE
+! :let bs = b[] " copy ov 0zDEADBEEF
+
+ Using expr8[expr1] or expr8[expr1a : expr1b] on a |Funcref| results in an
+ error.
+--- 1166,1172 ----
+ indexes expr1a and expr1b, inclusive. Examples: >
+ :let b = 0zDEADBEEF
+ :let bs = b[1:2] " 0zADBE
+! :let bs = b[:] " copy of 0zDEADBEEF
+
+ Using expr8[expr1] or expr8[expr1a : expr1b] on a |Funcref| results in an
+ error.
+***************
+*** 1227,1237 ****
+ 3. empty {M}
+ 1e40 missing .{M}
+
+- *float-pi* *float-e*
+- A few useful values to copy&paste: >
+- :let pi = 3.14159265359
+- :let e = 2.71828182846
+-
+ Rationale:
+ Before floating point was introduced, the text "123.456" was interpreted as
+ the two numbers "123" and "456", both converted to a string and concatenated,
+--- 1239,1244 ----
+***************
+*** 1240,1245 ****
+--- 1247,1261 ----
+ incompatibility was accepted in favor of being able to use the normal notation
+ for floating point numbers.
+
++ *float-pi* *float-e*
++ A few useful values to copy&paste: >
++ :let pi = 3.14159265359
++ :let e = 2.71828182846
++ Or, if you don't want to write them in as floating-point literals, you can
++ also use functions, like the following: >
++ :let pi = acos(-1.0)
++ :let e = exp(1.0)
++ <
+ *floating-point-precision*
+ The precision and range of floating points numbers depends on what "double"
+ means in the library Vim was compiled with. There is no way to change this at
+***************
+*** 1585,1591 ****
+ variables for each buffer. Use local buffer variables instead |b:var|.
+
+
+! Predefined Vim variables: *vim-variable* *v:var* *v:*
+
+ *v:beval_col* *beval_col-variable*
+ v:beval_col The number of the column, over which the mouse pointer is.
+--- 1601,1609 ----
+ variables for each buffer. Use local buffer variables instead |b:var|.
+
+
+! PREDEFINED VIM VARIABLES *vim-variable* *v:var* *v:*
+! *E963*
+! Some variables can be set by the user, but the type cannot be changed.
+
+ *v:beval_col* *beval_col-variable*
+ v:beval_col The number of the column, over which the mouse pointer is.
+***************
+*** 1878,1884 ****
+ This is the screen column number, like with |virtcol()|. The
+ value is zero when there was no mouse button click.
+
+! *v:none* *none-variable*
+ v:none An empty String. Used to put an empty item in JSON. See
+ |json_encode()|.
+ When used as a number this evaluates to zero.
+--- 1896,1902 ----
+ This is the screen column number, like with |virtcol()|. The
+ value is zero when there was no mouse button click.
+
+! *v:none* *none-variable* *None*
+ v:none An empty String. Used to put an empty item in JSON. See
+ |json_encode()|.
+ When used as a number this evaluates to zero.
+***************
+*** 2036,2062 ****
+ For ":edit +cmd file" the value is ":cmd\r".
+
+ *v:t_TYPE* *v:t_bool* *t_bool-variable*
+! v:t_bool Value of Boolean type. Read-only. See: |type()|
+ *v:t_channel* *t_channel-variable*
+! v:t_channel Value of Channel type. Read-only. See: |type()|
+ *v:t_dict* *t_dict-variable*
+! v:t_dict Value of Dictionary type. Read-only. See: |type()|
+ *v:t_float* *t_float-variable*
+! v:t_float Value of Float type. Read-only. See: |type()|
+ *v:t_func* *t_func-variable*
+! v:t_func Value of Funcref type. Read-only. See: |type()|
+ *v:t_job* *t_job-variable*
+! v:t_job Value of Job type. Read-only. See: |type()|
+ *v:t_list* *t_list-variable*
+! v:t_list Value of List type. Read-only. See: |type()|
+ *v:t_none* *t_none-variable*
+! v:t_none Value of None type. Read-only. See: |type()|
+ *v:t_number* *t_number-variable*
+! v:t_number Value of Number type. Read-only. See: |type()|
+ *v:t_string* *t_string-variable*
+! v:t_string Value of String type. Read-only. See: |type()|
+ *v:t_blob* *t_blob-variable*
+! v:t_blob Value of Blob type. Read-only. See: |type()|
+
+ *v:termresponse* *termresponse-variable*
+ v:termresponse The escape sequence returned by the terminal for the |t_RV|
+--- 2054,2080 ----
+ For ":edit +cmd file" the value is ":cmd\r".
+
+ *v:t_TYPE* *v:t_bool* *t_bool-variable*
+! v:t_bool Value of |Boolean| type. Read-only. See: |type()|
+ *v:t_channel* *t_channel-variable*
+! v:t_channel Value of |Channel| type. Read-only. See: |type()|
+ *v:t_dict* *t_dict-variable*
+! v:t_dict Value of |Dictionary| type. Read-only. See: |type()|
+ *v:t_float* *t_float-variable*
+! v:t_float Value of |Float| type. Read-only. See: |type()|
+ *v:t_func* *t_func-variable*
+! v:t_func Value of |Funcref| type. Read-only. See: |type()|
+ *v:t_job* *t_job-variable*
+! v:t_job Value of |Job| type. Read-only. See: |type()|
+ *v:t_list* *t_list-variable*
+! v:t_list Value of |List| type. Read-only. See: |type()|
+ *v:t_none* *t_none-variable*
+! v:t_none Value of |None| type. Read-only. See: |type()|
+ *v:t_number* *t_number-variable*
+! v:t_number Value of |Number| type. Read-only. See: |type()|
+ *v:t_string* *t_string-variable*
+! v:t_string Value of |String| type. Read-only. See: |type()|
+ *v:t_blob* *t_blob-variable*
+! v:t_blob Value of |Blob| type. Read-only. See: |type()|
+
+ *v:termresponse* *termresponse-variable*
+ v:termresponse The escape sequence returned by the terminal for the |t_RV|
+***************
+*** 2191,2197 ****
+ Number assert file contents is equal
+ assert_exception({error} [, {msg}])
+ Number assert {error} is in v:exception
+! assert_fails({cmd} [, {error}]) Number assert {cmd} fails
+ assert_false({actual} [, {msg}])
+ Number assert {actual} is false
+ assert_inrange({lower}, {upper}, {actual} [, {msg}])
+--- 2209,2216 ----
+ Number assert file contents is equal
+ assert_exception({error} [, {msg}])
+ Number assert {error} is in v:exception
+! assert_fails({cmd} [, {error} [, {msg}]])
+! Number assert {cmd} fails
+ assert_false({actual} [, {msg}])
+ Number assert {actual} is false
+ assert_inrange({lower}, {upper}, {actual} [, {msg}])
+***************
+*** 2276,2282 ****
+ debugbreak({pid}) Number interrupt process being debugged
+ deepcopy({expr} [, {noref}]) any make a full copy of {expr}
+ delete({fname} [, {flags}]) Number delete the file or directory {fname}
+! deletebufline({expr}, {first}[, {last}])
+ Number delete lines from buffer {expr}
+ did_filetype() Number |TRUE| if FileType autocmd event used
+ diff_filler({lnum}) Number diff filler lines about {lnum}
+--- 2295,2301 ----
+ debugbreak({pid}) Number interrupt process being debugged
+ deepcopy({expr} [, {noref}]) any make a full copy of {expr}
+ delete({fname} [, {flags}]) Number delete the file or directory {fname}
+! deletebufline({expr}, {first} [, {last}])
+ Number delete lines from buffer {expr}
+ did_filetype() Number |TRUE| if FileType autocmd event used
+ diff_filler({lnum}) Number diff filler lines about {lnum}
+***************
+*** 2475,2481 ****
+ 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
+--- 2494,2500 ----
+ 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
+***************
+*** 2492,2500 ****
+ pyxeval({expr}) any evaluate |python_x| expression
+ range({expr} [, {max} [, {stride}]])
+ List items from {expr} to {max}
+! readdir({directory} [, {expr}])
+! List file names on {dir} with evalating
+! {expr}
+ readfile({fname} [, {type} [, {max}]])
+ List get list of lines from file {fname}
+ reg_executing() String get the executing register name
+--- 2511,2517 ----
+ pyxeval({expr}) any evaluate |python_x| expression
+ range({expr} [, {max} [, {stride}]])
+ List items from {expr} to {max}
+! readdir({dir} [, {expr}]) List file names in {dir} selected by {expr}
+ readfile({fname} [, {type} [, {max}]])
+ List get list of lines from file {fname}
+ reg_executing() String get the executing register name
+***************
+*** 2542,2549 ****
+ server2client({clientid}, {string})
+ Number send reply string
+ serverlist() String get a list of available servers
+! setbufline({expr}, {lnum}, {line})
+! Number set line {lnum} to {line} in buffer
+ {expr}
+ setbufvar({expr}, {varname}, {val})
+ none set {varname} in buffer {expr} to {val}
+--- 2559,2566 ----
+ server2client({clientid}, {string})
+ Number send reply string
+ serverlist() String get a list of available servers
+! setbufline({expr}, {lnum}, {text})
+! Number set line {lnum} to {text} in buffer
+ {expr}
+ setbufvar({expr}, {varname}, {val})
+ none set {varname} in buffer {expr} to {val}
+***************
+*** 2661,2667 ****
+ term_setrestore({buf}, {command}) none set command to restore terminal
+ term_setsize({buf}, {rows}, {cols})
+ none set the size of a terminal
+! term_start({cmd}, {options}) Number open a terminal window and run a job
+ term_wait({buf} [, {time}]) Number wait for screen to be updated
+ test_alloc_fail({id}, {countdown}, {repeat})
+ none make memory allocation fail
+--- 2678,2684 ----
+ term_setrestore({buf}, {command}) none set command to restore terminal
+ term_setsize({buf}, {rows}, {cols})
+ none set the size of a terminal
+! term_start({cmd} [, {options}]) Number open a terminal window and run a job
+ term_wait({buf} [, {time}]) Number wait for screen to be updated
+ test_alloc_fail({id}, {countdown}, {repeat})
+ none make memory allocation fail
+***************
+*** 2693,2699 ****
+ toupper({expr}) String the String {expr} switched to uppercase
+ tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
+ to chars in {tostr}
+! trim({text}[, {mask}]) String trim characters in {mask} from {text}
+ trunc({expr}) Float truncate Float {expr}
+ type({name}) Number type of variable {name}
+ undofile({name}) String undo file name for {name}
+--- 2710,2716 ----
+ toupper({expr}) String the String {expr} switched to uppercase
+ tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
+ to chars in {tostr}
+! trim({text} [, {mask}]) String trim characters in {mask} from {text}
+ trunc({expr}) Float truncate Float {expr}
+ type({name}) Number type of variable {name}
+ undofile({name}) String undo file name for {name}
+***************
+*** 2772,2781 ****
+ :let flag = and(bits, 0x80)
+
+
+! append({lnum}, {expr}) *append()*
+! When {expr} is a |List|: Append each item of the |List| as a
+ text line below line {lnum} in the current buffer.
+! Otherwise append {expr} as one text line below line {lnum} in
+ the current buffer.
+ {lnum} can be zero to insert a line before the first one.
+ Returns 1 for failure ({lnum} out of range or out of memory),
+--- 2789,2798 ----
+ :let flag = and(bits, 0x80)
+
+
+! append({lnum}, {text}) *append()*
+! When {text} is a |List|: Append each item of the |List| as a
+ text line below line {lnum} in the current buffer.
+! Otherwise append {text} as one text line below line {lnum} in
+ the current buffer.
+ {lnum} can be zero to insert a line before the first one.
+ Returns 1 for failure ({lnum} out of range or out of memory),
+***************
+*** 2884,2890 ****
+ call assert_exception('E492:')
+ endtry
+
+! assert_fails({cmd} [, {error}]) *assert_fails()*
+ Run {cmd} and add an error message to |v:errors| if it does
+ NOT produce an error. Also see |assert-return|.
+ When {error} is given it must match in |v:errmsg|.
+--- 2901,2907 ----
+ call assert_exception('E492:')
+ endtry
+
+! assert_fails({cmd} [, {error} [, {msg}]]) *assert_fails()*
+ Run {cmd} and add an error message to |v:errors| if it does
+ NOT produce an error. Also see |assert-return|.
+ When {error} is given it must match in |v:errmsg|.
+***************
+*** 2893,2899 ****
+
+ assert_false({actual} [, {msg}]) *assert_false()*
+ When {actual} is not false an error message is added to
+! |v:errors|, like with |assert_equal()|.
+ Also see |assert-return|.
+ A value is false when it is zero. When {actual} is not a
+ number the assert fails.
+--- 2910,2916 ----
+
+ assert_false({actual} [, {msg}]) *assert_false()*
+ When {actual} is not false an error message is added to
+! |v:errors|, like with |assert_equal()|.
+ Also see |assert-return|.
+ A value is false when it is zero. When {actual} is not a
+ number the assert fails.
+***************
+*** 2901,2909 ****
+ "Expected False but got {actual}" is produced.
+
+ assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()*
+! This asserts number values. When {actual} is lower than
+! {lower} or higher than {upper} an error message is added to
+! |v:errors|. Also see |assert-return|.
+ When {msg} is omitted an error in the form
+ "Expected range {lower} - {upper}, but got {actual}" is
+ produced.
+--- 2918,2926 ----
+ "Expected False but got {actual}" is produced.
+
+ assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()*
+! This asserts number and |Float| values. When {actual} is lower
+! than {lower} or higher than {upper} an error message is added
+! to |v:errors|. Also see |assert-return|.
+ When {msg} is omitted an error in the form
+ "Expected range {lower} - {upper}, but got {actual}" is
+ produced.
+***************
+*** 3014,3028 ****
+
+ When showing a balloon is not possible nothing happens, no
+ error message.
+! {only available when compiled with the +balloon_eval or
+! +balloon_eval_term feature}
+
+ balloon_split({msg}) *balloon_split()*
+ Split {msg} into lines to be displayed in a balloon. The
+ splits are made for the current window size and optimize to
+ show debugger output.
+ Returns a |List| with the split lines.
+! {only available when compiled with the +balloon_eval_term
+ feature}
+
+ *browse()*
+--- 3031,3045 ----
+
+ When showing a balloon is not possible nothing happens, no
+ error message.
+! {only available when compiled with the |+balloon_eval| or
+! |+balloon_eval_term| feature}
+
+ balloon_split({msg}) *balloon_split()*
+ Split {msg} into lines to be displayed in a balloon. The
+ splits are made for the current window size and optimize to
+ show debugger output.
+ Returns a |List| with the split lines.
+! {only available when compiled with the |+balloon_eval_term|
+ feature}
+
+ *browse()*
+***************
+*** 3274,3280 ****
+ is removed.
+ Note that Vim does not know when the text received on a raw
+ channel is complete, it may only return the first part and you
+! need to use ch_readraw() to fetch the rest.
+ See |channel-use|.
+
+ {only available when compiled with the |+channel| feature}
+--- 3291,3297 ----
+ is removed.
+ Note that Vim does not know when the text received on a raw
+ channel is complete, it may only return the first part and you
+! need to use |ch_readraw()| to fetch the rest.
+ See |channel-use|.
+
+ {only available when compiled with the |+channel| feature}
+***************
+*** 3337,3344 ****
+ When {mode} is omitted or "a" append to the file.
+ When {mode} is "w" start with an empty file.
+
+! The file is flushed after every message, on Unix you can use
+! "tail -f" to see what is going on in real time.
+
+ This function is not available in the |sandbox|.
+ NOTE: the channel communication is stored in the file, be
+--- 3354,3362 ----
+ When {mode} is omitted or "a" append to the file.
+ When {mode} is "w" start with an empty file.
+
+! Use |ch_log()| to write log messages. The file is flushed
+! after every message, on Unix you can use "tail -f" to see what
+! is going on in real time.
+
+ This function is not available in the |sandbox|.
+ NOTE: the channel communication is stored in the file, be
+***************
+*** 3367,3373 ****
+ {only available when compiled with the |+channel| feature}
+
+ ch_readblob({handle} [, {options}]) *ch_readblob()*
+! Like ch_read() but reads binary data and returns a Blob.
+ See |channel-more|.
+ {only available when compiled with the |+channel| feature}
+
+--- 3385,3391 ----
+ {only available when compiled with the |+channel| feature}
+
+ ch_readblob({handle} [, {options}]) *ch_readblob()*
+! Like ch_read() but reads binary data and returns a |Blob|.
+ See |channel-more|.
+ {only available when compiled with the |+channel| feature}
+
+***************
+*** 3388,3394 ****
+ {only available when compiled with the |+channel| feature}
+
+ ch_sendraw({handle}, {expr} [, {options}]) *ch_sendraw()*
+! Send string or Blob {expr} over {handle}.
+ Works like |ch_sendexpr()|, but does not encode the request or
+ decode the response. The caller is responsible for the
+ correct contents. Also does not add a newline for a channel
+--- 3406,3412 ----
+ {only available when compiled with the |+channel| feature}
+
+ ch_sendraw({handle}, {expr} [, {options}]) *ch_sendraw()*
+! Send |String| or |Blob| {expr} over {handle}.
+ Works like |ch_sendexpr()|, but does not encode the request or
+ decode the response. The caller is responsible for the
+ correct contents. Also does not add a newline for a channel
+***************
+*** 3446,3451 ****
+--- 3464,3473 ----
+ < With {utf8} set to 1, always treat as utf-8 characters.
+ A combining character is a separate character.
+ |nr2char()| does the opposite.
++ To turn a string into a list of character numbers: >
++ let str = "ABC"
++ let list = map(split(str, '\zs'), {_, val -> char2nr(val)})
++ < Result: [65, 66, 67]
+
+ cindent({lnum}) *cindent()*
+ Get the amount of indent for line {lnum} according the C
+***************
+*** 3551,3557 ****
+ completion. See |ins-completion|.
+ The items are:
+ mode Current completion mode name string.
+! See |completion_info_mode| for the values.
+ pum_visible |TRUE| if popup menu is visible.
+ See |pumvisible()|.
+ items List of completion matches. Each item is a
+--- 3573,3579 ----
+ completion. See |ins-completion|.
+ The items are:
+ mode Current completion mode name string.
+! See |complete_info_mode| for the values.
+ pum_visible |TRUE| if popup menu is visible.
+ See |pumvisible()|.
+ items List of completion matches. Each item is a
+***************
+*** 3812,3825 ****
+ To delete a line from the buffer use |:delete| or
+ |deletebufline()|.
+
+! deletebufline({expr}, {first}[, {last}]) *deletebufline()*
+ Delete lines {first} to {last} (inclusive) from buffer {expr}.
+ If {last} is omitted then delete line {first} only.
+ On success 0 is returned, on failure 1 is returned.
+
+ For the use of {expr}, see |bufname()| above.
+
+! {first} and {last} are used like with |setline()|. Note that
+ when using |line()| this refers to the current buffer. Use "$"
+ to refer to the last line in buffer {expr}.
+
+--- 3834,3847 ----
+ To delete a line from the buffer use |:delete| or
+ |deletebufline()|.
+
+! deletebufline({expr}, {first} [, {last}]) *deletebufline()*
+ Delete lines {first} to {last} (inclusive) from buffer {expr}.
+ If {last} is omitted then delete line {first} only.
+ On success 0 is returned, on failure 1 is returned.
+
+ For the use of {expr}, see |bufname()| above.
+
+! {first} and {last} are used like with |getline()|. Note that
+ when using |line()| this refers to the current buffer. Use "$"
+ to refer to the last line in buffer {expr}.
+
+***************
+*** 3864,3870 ****
+ - |v:false|, |v:none| and |v:null| are empty, |v:true| is not.
+ - A |Job| is empty when it failed to start.
+ - A |Channel| is empty when it is closed.
+! - A Blob is empty when its length is zero.
+
+ For a long |List| this is much faster than comparing the
+ length with zero.
+--- 3886,3892 ----
+ - |v:false|, |v:none| and |v:null| are empty, |v:true| is not.
+ - A |Job| is empty when it failed to start.
+ - A |Channel| is empty when it is closed.
+! - A |Blob| is empty when its length is zero.
+
+ For a long |List| this is much faster than comparing the
+ length with zero.
+***************
+*** 3880,3887 ****
+ *eval()*
+ eval({string}) Evaluate {string} and return the result. Especially useful to
+ turn the result of |string()| back into the original value.
+! This works for Numbers, Floats, Strings and composites of
+! them. Also works for |Funcref|s that refer to existing
+ functions.
+
+ eventhandler() *eventhandler()*
+--- 3902,3909 ----
+ *eval()*
+ eval({string}) Evaluate {string} and return the result. Especially useful to
+ turn the result of |string()| back into the original value.
+! This works for Numbers, Floats, Strings, Blobs and composites
+! of them. Also works for |Funcref|s that refer to existing
+ functions.
+
+ eventhandler() *eventhandler()*
+***************
+*** 3913,3918 ****
+--- 3935,3941 ----
+ 1 exists
+ 0 does not exist
+ -1 not implemented on this system
++ |exepath()| can be used to get the full path of an executable.
+
+ execute({command} [, {silent}]) *execute()*
+ Execute an Ex command or commands and return the output as a
+***************
+*** 4118,4124 ****
+ all "README" files in the current directory and below: >
+ :echo expand("**/README")
+ <
+! Expand() can also be used to expand variables and environment
+ variables that are only known in a shell. But this can be
+ slow, because a shell may be used to do the expansion. See
+ |expr-env-expand|.
+--- 4141,4147 ----
+ all "README" files in the current directory and below: >
+ :echo expand("**/README")
+ <
+! expand() can also be used to expand variables and environment
+ variables that are only known in a shell. But this can be
+ slow, because a shell may be used to do the expansion. See
+ |expr-env-expand|.
+***************
+*** 4204,4209 ****
+--- 4227,4235 ----
+ will behave as if <Esc> is typed, to avoid getting
+ stuck, waiting for a character to be typed before the
+ script continues.
++ Note that if you manage to call feedkeys() while
++ executing commands, thus calling it recursively, then
++ all typehead will be consumed by the last call.
+ '!' When used with 'x' will not end Insert mode. Can be
+ used in a test when a timer is set to exit Insert mode
+ a little later. Useful for testing CursorHoldI.
+***************
+*** 4604,4610 ****
+ endfor
+ <
+ To get buffer-local options use: >
+! getbufvar({bufnr}, '&')
+
+ <
+ *getbufline()*
+--- 4630,4636 ----
+ endfor
+ <
+ To get buffer-local options use: >
+! getbufvar({bufnr}, '&option_name')
+
+ <
+ *getbufline()*
+***************
+*** 4785,4790 ****
+--- 4811,4818 ----
+ Example: >
+ :cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR>
+ < Also see |getcmdtype()|, |getcmdpos()| and |setcmdpos()|.
++ Returns an empty string when entering a password or using
++ |inputsecret()|.
+
+ getcmdpos() *getcmdpos()*
+ Return the position of the cursor in the command line as a
+***************
+*** 5234,5240 ****
+ tabnr tab page number.
+ variables a reference to the dictionary with
+ tabpage-local variables
+! windows List of |window-ID|s in the tag page.
+
+ gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()*
+ Get the value of a tab-local variable {varname} in tab page
+--- 5262,5268 ----
+ tabnr tab page number.
+ variables a reference to the dictionary with
+ tabpage-local variables
+! windows List of |window-ID|s in the tab page.
+
+ gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()*
+ Get the value of a tab-local variable {varname} in tab page
+***************
+*** 5334,5345 ****
+ winrow topmost screen column of the window,
+ row from |win_screenpos()|
+
+- To obtain all window-local variables use: >
+- gettabwinvar({tabnr}, {winnr}, '&')
+-
+ getwinpos([{timeout}]) *getwinpos()*
+ The result is a list with two numbers, the result of
+! getwinposx() and getwinposy() combined:
+ [x-pos, y-pos]
+ {timeout} can be used to specify how long to wait in msec for
+ a response from the terminal. When omitted 100 msec is used.
+--- 5362,5370 ----
+ winrow topmost screen column of the window,
+ row from |win_screenpos()|
+
+ getwinpos([{timeout}]) *getwinpos()*
+ The result is a list with two numbers, the result of
+! getwinposx() and getwinposy() combined:
+ [x-pos, y-pos]
+ {timeout} can be used to specify how long to wait in msec for
+ a response from the terminal. When omitted 100 msec is used.
+***************
+*** 5347,5353 ****
+ When using a value less than 10 and no response is received
+ within that time, a previously reported position is returned,
+ if available. This can be used to poll for the position and
+! do some work in the mean time: >
+ while 1
+ let res = getwinpos(1)
+ if res[0] >= 0
+--- 5372,5378 ----
+ When using a value less than 10 and no response is received
+ within that time, a previously reported position is returned,
+ if available. This can be used to poll for the position and
+! do some work in the meantime: >
+ while 1
+ let res = getwinpos(1)
+ if res[0] >= 0
+***************
+*** 5394,5399 ****
+--- 5419,5427 ----
+
+ If the expansion fails, the result is an empty String or List.
+
++ You can also use |readdir()| if you need to do complicated
++ things, such as limiting the number of matches.
++
+ A name for a non-existing file is not included. A symbolic
+ link is only included if it points to an existing file.
+ However, when the {alllinks} argument is present and it is
+***************
+*** 5649,5655 ****
+ < Note that Vim uses UTF-8 for all Unicode encodings, conversion
+ from/to UCS-2 is automatically changed to use UTF-8. You
+ cannot use UCS-2 in a string anyway, because of the NUL bytes.
+- {only available when compiled with the |+multi_byte| feature}
+
+ *indent()*
+ indent({lnum}) The result is a Number, which is indent of line {lnum} in the
+--- 5677,5682 ----
+***************
+*** 5833,5839 ****
+ isnan({expr}) *isnan()*
+ Return |TRUE| if {expr} is a float with value NaN. >
+ echo isnan(0.0 / 0.0)
+! < 1 ~
+
+ {only available when compiled with the |+float| feature}
+
+--- 5860,5866 ----
+ isnan({expr}) *isnan()*
+ Return |TRUE| if {expr} is a float with value NaN. >
+ echo isnan(0.0 / 0.0)
+! < 1
+
+ {only available when compiled with the |+float| feature}
+
+***************
+*** 5841,5847 ****
+ Return a |List| with all the key-value pairs of {dict}. Each
+ |List| item is a list with two items: the key of a {dict}
+ entry and the value of this entry. The |List| is in arbitrary
+! order.
+
+ job_getchannel({job}) *job_getchannel()*
+ Get the channel handle that {job} is using.
+--- 5868,5878 ----
+ Return a |List| with all the key-value pairs of {dict}. Each
+ |List| item is a list with two items: the key of a {dict}
+ entry and the value of this entry. The |List| is in arbitrary
+! order. Also see |keys()| and |values()|.
+! Example: >
+! for [key, value] in items(mydict)
+! echo key . ': ' . value
+! endfor
+
+ job_getchannel({job}) *job_getchannel()*
+ Get the channel handle that {job} is using.
+***************
+*** 5884,5889 ****
+--- 5915,5924 ----
+ |:!cmd| this does not wait for the job to finish.
+ To start a job in a terminal window see |term_start()|.
+
++ If the job fails to start then |job_status()| on the returned
++ Job object results in "fail" and none of the callbacks will be
++ invoked.
++
+ {command} can be a String. This works best on MS-Windows. On
+ Unix it is split up in white-separated parts to be passed to
+ execvp(). Arguments in double quotes can contain white space.
+***************
+*** 6035,6040 ****
+--- 6070,6077 ----
+ The decoding is permissive:
+ - A trailing comma in an array and object is ignored, e.g.
+ "[1, 2, ]" is the same as "[1, 2]".
++ - Integer keys are accepted in objects, e.g. {1:2} is the
++ same as {"1":2}.
+ - More floating point numbers are recognized, e.g. "1." for
+ "1.0", or "001.2" for "1.2". Special floating point values
+ "Infinity", "-Infinity" and "NaN" (capitalization ignored)
+***************
+*** 6046,6051 ****
+--- 6083,6090 ----
+ - Control characters U+0000 through U+001F which are not
+ escaped in strings are accepted, e.g. " " (tab
+ character in string) for "\t".
++ - An empty JSON expression or made of only spaces is accepted
++ and results in v:none.
+ - Backslash in an invalid 2-character sequence escape is
+ ignored, e.g. "\a" is decoded as "a".
+ - A correct surrogate pair in JSON strings should normally be
+***************
+*** 6063,6080 ****
+ The encoding is specified in:
+ https://tools.ietf.org/html/rfc7159.html
+ Vim values are converted as follows:
+! Number decimal number
+! Float floating point number
+ Float nan "NaN"
+ Float inf "Infinity"
+ Float -inf "-Infinity"
+! String in double quotes (possibly null)
+! Funcref not possible, error
+! List as an array (possibly null); when
+ used recursively: []
+! Dict as an object (possibly null); when
+ used recursively: {}
+! Blob as an array of the individual bytes
+ v:false "false"
+ v:true "true"
+ v:none "null"
+--- 6102,6119 ----
+ The encoding is specified in:
+ https://tools.ietf.org/html/rfc7159.html
+ Vim values are converted as follows:
+! |Number| decimal number
+! |Float| floating point number
+ Float nan "NaN"
+ Float inf "Infinity"
+ Float -inf "-Infinity"
+! |String| in double quotes (possibly null)
+! |Funcref| not possible, error
+! |List| as an array (possibly null); when
+ used recursively: []
+! |Dict| as an object (possibly null); when
+ used recursively: {}
+! |Blob| as an array of the individual bytes
+ v:false "false"
+ v:true "true"
+ v:none "null"
+***************
+*** 6085,6091 ****
+
+ keys({dict}) *keys()*
+ Return a |List| with all the keys of {dict}. The |List| is in
+! arbitrary order.
+
+ *len()* *E701*
+ len({expr}) The result is a Number, which is the length of the argument.
+--- 6124,6130 ----
+
+ keys({dict}) *keys()*
+ Return a |List| with all the keys of {dict}. The |List| is in
+! arbitrary order. Also see |items()| and |values()|.
+
+ *len()* *E701*
+ len({expr}) The result is a Number, which is the length of the argument.
+***************
+*** 6093,6098 ****
+--- 6132,6138 ----
+ used, as with |strlen()|.
+ When {expr} is a |List| the number of items in the |List| is
+ returned.
++ When {expr} is a |Blob| the number of bytes is returned.
+ When {expr} is a |Dictionary| the number of entries in the
+ |Dictionary| is returned.
+ Otherwise an error is given.
+***************
+*** 6177,6189 ****
+ line(".") line number of the cursor
+ line("'t") line number of mark t
+ line("'" . marker) line number of mark marker
+! < *last-position-jump*
+! This autocommand jumps to the last known position in a file
+! just after opening it, if the '" mark is set: >
+! :au BufReadPost *
+! \ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
+! \ | exe "normal! g`\""
+! \ | endif
+
+ line2byte({lnum}) *line2byte()*
+ Return the byte count from the start of the buffer for line
+--- 6217,6225 ----
+ line(".") line number of the cursor
+ line("'t") line number of mark t
+ line("'" . marker) line number of mark marker
+! <
+! To jump to the last known position when opening a file see
+! |last-position-jump|.
+
+ line2byte({lnum}) *line2byte()*
+ Return the byte count from the start of the buffer for line
+***************
+*** 6641,6648 ****
+--- 6677,6686 ----
+ *mkdir()* *E739*
+ mkdir({name} [, {path} [, {prot}]])
+ Create directory {name}.
++
+ If {path} is "p" then intermediate directories are created as
+ necessary. Otherwise it must be "".
++
+ If {prot} is given it is used to set the protection bits of
+ the new directory. The default is 0755 (rwxr-xr-x: r/w for
+ the user readable for others). Use 0700 to make it unreadable
+***************
+*** 6651,6659 ****
+ with 0755.
+ Example: >
+ :call mkdir($HOME . "/tmp/foo/bar", "p", 0700)
+ < This function is not available in the |sandbox|.
+ There is no error if the directory already exists and the "p"
+! flag is passed (since patch 8.0.1708).
+ Not available on all systems. To check use: >
+ :if exists("*mkdir")
+ <
+--- 6689,6705 ----
+ with 0755.
+ Example: >
+ :call mkdir($HOME . "/tmp/foo/bar", "p", 0700)
++
+ < This function is not available in the |sandbox|.
++
+ There is no error if the directory already exists and the "p"
+! flag is passed (since patch 8.0.1708). However, without the
+! "p" option the call will fail.
+!
+! The function result is a Number, which is 1 if the call was
+! successful or 0 if the directory creation failed or partly
+! failed.
+!
+ Not available on all systems. To check use: >
+ :if exists("*mkdir")
+ <
+***************
+*** 6668,6674 ****
+ nov Operator-pending (forced characterwise |o_v|)
+ noV Operator-pending (forced linewise |o_V|)
+ noCTRL-V Operator-pending (forced blockwise |o_CTRL-V|);
+! CTRL-V is one character
+ 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|
+--- 6714,6720 ----
+ nov Operator-pending (forced characterwise |o_v|)
+ noV Operator-pending (forced linewise |o_V|)
+ noCTRL-V Operator-pending (forced blockwise |o_CTRL-V|);
+! CTRL-V is one character
+ 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|
+***************
+*** 6739,6744 ****
+--- 6785,6794 ----
+ nr2char(10), because NULs are represented with newline
+ characters. nr2char(0) is a real NUL and terminates the
+ string, thus results in an empty string.
++ To turn a list of character numbers into a string: >
++ let list = [65, 66, 67]
++ let str = join(map(list, {_, val -> nr2char(val)}), '')
++ < Result: "ABC"
+
+ or({expr}, {expr}) *or()*
+ Bitwise OR on the two arguments. The arguments are converted
+***************
+*** 6934,6941 ****
+ *printf-S*
+ S The text of the String argument is used. If a
+ precision is specified, no more display cells than the
+! number specified are used. Without the |+multi_byte|
+! feature works just like 's'.
+
+ *printf-f* *E807*
+ f F The Float argument is converted into a string of the
+--- 6984,6990 ----
+ *printf-S*
+ S The text of the String argument is used. If a
+ precision is specified, no more display cells than the
+! number specified are used.
+
+ *printf-f* *E807*
+ f F The Float argument is converted into a string of the
+***************
+*** 7040,7050 ****
+ for a property that does not continue in
+ another line; can be zero
+ end_lnum line number for the end of text
+! end_col column just after the text; not used when "length"
+! is present; when {col} and "end_col" are equal
+! this is a zero-width text property
+ 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
+--- 7089,7100 ----
+ for a property that does not continue in
+ another line; can be zero
+ end_lnum line number for the end of text
+! end_col column just after the text; not used when
+! "length" is present; when {col} and "end_col"
+! are equal, and "end_lnum" is omitted or equal
+! to {lnum}, this is a zero-width text property
+ 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
+***************
+*** 7089,7095 ****
+ 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,
+--- 7139,7145 ----
+ 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,
+***************
+*** 7107,7113 ****
+ 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
+--- 7157,7163 ----
+ 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
+***************
+*** 7279,7284 ****
+--- 7329,7336 ----
+ *readdir()*
+ readdir({directory} [, {expr}])
+ Return a list with file and directory names in {directory}.
++ You can also use |glob()| if you don't need to do complicated
++ things, such as limiting the number of matches.
+
+ When {expr} is omitted all entries are included.
+ When {expr} is given, it is evaluated to check what to do:
+***************
+*** 7344,7350 ****
+
+ reg_recording() *reg_recording()*
+ Returns the single letter name of the register being recorded.
+! Returns an empty string string when not recording. See |q|.
+
+ reltime([{start} [, {end}]]) *reltime()*
+ Return an item that represents a time value. The format of
+--- 7396,7402 ----
+
+ reg_recording() *reg_recording()*
+ Returns the single letter name of the register being recorded.
+! Returns an empty string when not recording. See |q|.
+
+ reltime([{start} [, {end}]]) *reltime()*
+ Return an item that represents a time value. The format of
+***************
+*** 7491,7496 ****
+--- 7543,7551 ----
+ Example: >
+ :echo "last item: " . remove(mylist, -1)
+ :call remove(mylist, 0, 9)
++ <
++ Use |delete()| to remove a file.
++
+ remove({blob}, {idx} [, {end}])
+ Without {end}: Remove the byte at {idx} from |Blob| {blob} and
+ return the byte.
+***************
+*** 7501,7513 ****
+ Example: >
+ :echo "last byte: " . remove(myblob, -1)
+ :call remove(mylist, 0, 9)
+ remove({dict}, {key})
+ Remove the entry from {dict} with key {key}. Example: >
+ :echo "removed " . remove(dict, "one")
+ < If there is no {key} in {dict} this is an error.
+
+- Use |delete()| to remove a file.
+-
+ rename({from}, {to}) *rename()*
+ Rename the file by the name {from} to the name {to}. This
+ should also work to move files across file systems. The
+--- 7556,7567 ----
+ Example: >
+ :echo "last byte: " . remove(myblob, -1)
+ :call remove(mylist, 0, 9)
++
+ remove({dict}, {key})
+ Remove the entry from {dict} with key {key}. Example: >
+ :echo "removed " . remove(dict, "one")
+ < If there is no {key} in {dict} this is an error.
+
+ rename({from}, {to}) *rename()*
+ Rename the file by the name {from} to the name {to}. This
+ should also work to move files across file systems. The
+***************
+*** 7771,7776 ****
+--- 7825,7831 ----
+ When evaluating {skip} causes an error the search is aborted
+ and -1 returned.
+ {skip} can be a string, a lambda, a funcref or a partial.
++ Anything else makes the function fail.
+
+ For {stopline} and {timeout} see |search()|.
+
+***************
+*** 7867,7873 ****
+ <
+ setbufline({expr}, {lnum}, {text}) *setbufline()*
+ Set line {lnum} to {text} in buffer {expr}. To insert
+! lines use |append()|.
+
+ For the use of {expr}, see |bufname()| above.
+
+--- 7922,7929 ----
+ <
+ setbufline({expr}, {lnum}, {text}) *setbufline()*
+ Set line {lnum} to {text} in buffer {expr}. To insert
+! lines use |append()|. Any text properties in {lnum} are
+! cleared.
+
+ For the use of {expr}, see |bufname()| above.
+
+***************
+*** 7947,7953 ****
+ setline({lnum}, {text}) *setline()*
+ Set line {lnum} of the current buffer to {text}. To insert
+ lines use |append()|. To set lines in another buffer use
+! |setbufline()|.
+
+ {lnum} is used like with |getline()|.
+ When {lnum} is just below the last line the {text} will be
+--- 8003,8009 ----
+ setline({lnum}, {text}) *setline()*
+ Set line {lnum} of the current buffer to {text}. To insert
+ lines use |append()|. To set lines in another buffer use
+! |setbufline()|. Any text properties in {lnum} are cleared.
+
+ {lnum} is used like with |getline()|.
+ When {lnum} is just below the last line the {text} will be
+***************
+*** 8437,8443 ****
+ the sign group name. To use the global sign group, use an
+ empty string. {group} functions as a namespace for {id}, thus
+ two groups can use the same IDs. Refer to |sign-identifier|
+! for more information.
+
+ {name} refers to a defined sign.
+ {expr} refers to a buffer name or number. For the accepted
+--- 8493,8499 ----
+ the sign group name. To use the global sign group, use an
+ empty string. {group} functions as a namespace for {id}, thus
+ two groups can use the same IDs. Refer to |sign-identifier|
+! and |sign-group| for more information.
+
+ {name} refers to a defined sign.
+ {expr} refers to a buffer name or number. For the accepted
+***************
+*** 8725,8731 ****
+ as when using a floating point number in an expression, see
+ |floating-point-format|. But it's a bit more permissive.
+ E.g., "1e40" is accepted, while in an expression you need to
+! write "1.0e40".
+ Text after the number is silently ignored.
+ The decimal point is always '.', no matter what the locale is
+ set to. A comma ends the number: "12,345.67" is converted to
+--- 8781,8788 ----
+ as when using a floating point number in an expression, see
+ |floating-point-format|. But it's a bit more permissive.
+ E.g., "1e40" is accepted, while in an expression you need to
+! write "1.0e40". The hexadecimal form "0x123" is also
+! accepted, but not others, like binary or octal.
+ Text after the number is silently ignored.
+ The decimal point is always '.', no matter what the locale is
+ set to. A comma ends the number: "12,345.67" is converted to
+***************
+*** 8794,8803 ****
+
+ strdisplaywidth({expr} [, {col}]) *strdisplaywidth()*
+ The result is a Number, which is the number of display cells
+! String {expr} occupies on the screen when it starts at {col}.
+! When {col} is omitted zero is used. Otherwise it is the
+! screen column where to start. This matters for Tab
+! characters.
+ The option settings of the current window are used. This
+ matters for anything that's displayed differently, such as
+ 'tabstop' and 'display'.
+--- 8851,8860 ----
+
+ strdisplaywidth({expr} [, {col}]) *strdisplaywidth()*
+ The result is a Number, which is the number of display cells
+! String {expr} occupies on the screen when it starts at {col}
+! (first column is zero). When {col} is omitted zero is used.
+! Otherwise it is the screen column where to start. This
+! matters for Tab characters.
+ The option settings of the current window are used. This
+ matters for anything that's displayed differently, such as
+ 'tabstop' and 'display'.
+***************
+*** 8999,9009 ****
+ 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
+--- 9056,9066 ----
+ 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
+***************
+*** 9103,9109 ****
+ concealable region if there are two consecutive regions
+ with the same replacement character. For an example, if
+ the text is "123456" and both "23" and "45" are concealed
+! and replace by the character "X", then:
+ call returns ~
+ synconcealed(lnum, 1) [0, '', 0]
+ synconcealed(lnum, 2) [1, 'X', 1]
+--- 9160,9166 ----
+ concealable region if there are two consecutive regions
+ with the same replacement character. For an example, if
+ the text is "123456" and both "23" and "45" are concealed
+! and replaced by the character "X", then:
+ call returns ~
+ synconcealed(lnum, 1) [0, '', 0]
+ synconcealed(lnum, 2) [1, 'X', 1]
+***************
+*** 9331,9337 ****
+ The top part of the buffer contains the contents of the first
+ file, the bottom part of the buffer contains the contents of
+ the second file. The middle part shows the differences.
+! The parts are separated by a line of dashes.
+
+ If the {options} argument is present, it must be a Dict with
+ these possible members:
+--- 9388,9394 ----
+ The top part of the buffer contains the contents of the first
+ file, the bottom part of the buffer contains the contents of
+ the second file. The middle part shows the differences.
+! The parts are separated by a line of equals.
+
+ If the {options} argument is present, it must be a Dict with
+ these possible members:
+***************
+*** 9376,9382 ****
+ Dump the contents of the terminal screen of {buf} in the file
+ {filename}. This uses a format that can be used with
+ |term_dumpload()| and |term_dumpdiff()|.
+! If {filename} already exists an error is given. *E953*
+ Also see |terminal-diff|.
+
+ {options} is a dictionary with these optional entries:
+--- 9433,9441 ----
+ Dump the contents of the terminal screen of {buf} in the file
+ {filename}. This uses a format that can be used with
+ |term_dumpload()| and |term_dumpdiff()|.
+! If the job in the terminal already finished an error is given:
+! *E958*
+! If {filename} already exists an error is given: *E953*
+ Also see |terminal-diff|.
+
+ {options} is a dictionary with these optional entries:
+***************
+*** 9422,9431 ****
+ "dict" can have these members:
+ "visible" one when the cursor is visible, zero when it
+ is hidden.
+! "blink" one when the cursor is visible, zero when it
+! is hidden.
+ "shape" 1 for a block cursor, 2 for underline and 3
+ for a vertical bar.
+
+ {buf} must be the buffer number of a terminal window. If the
+ buffer does not exist or is not a terminal window, an empty
+--- 9481,9491 ----
+ "dict" can have these members:
+ "visible" one when the cursor is visible, zero when it
+ is hidden.
+! "blink" one when the cursor is blinking, zero when it
+! is not blinking.
+ "shape" 1 for a block cursor, 2 for underline and 3
+ for a vertical bar.
++ "color" color of the cursor, e.g. "green"
+
+ {buf} must be the buffer number of a terminal window. If the
+ buffer does not exist or is not a terminal window, an empty
+***************
+*** 9455,9461 ****
+ used for |term_getline()| and |getline()|, so that: >
+ term_getline(buf, N)
+ < is equal to: >
+! `getline(N + term_getscrolled(buf))
+ < (if that line exists).
+
+ {buf} is used as with |term_getsize()|.
+--- 9515,9521 ----
+ used for |term_getline()| and |getline()|, so that: >
+ term_getline(buf, N)
+ < is equal to: >
+! getline(N + term_getscrolled(buf))
+ < (if that line exists).
+
+ {buf} is used as with |term_getsize()|.
+***************
+*** 9596,9602 ****
+ exist or is not a terminal window, an error is given.
+ {only available when compiled with the |+terminal| feature}
+
+! term_start({cmd}, {options}) *term_start()*
+ Open a terminal window and run {cmd} in it.
+
+ {cmd} can be a string or a List, like with |job_start()|. The
+--- 9656,9662 ----
+ exist or is not a terminal window, an error is given.
+ {only available when compiled with the |+terminal| feature}
+
+! term_start({cmd} [, {options}]) *term_start()*
+ Open a terminal window and run {cmd} in it.
+
+ {cmd} can be a string or a List, like with |job_start()|. The
+***************
+*** 9613,9621 ****
+ |job-options|. However, not all options can be used. These
+ are supported:
+ all timeout options
+! "stoponexit"
+! "callback", "out_cb", "err_cb"
+! "exit_cb", "close_cb"
+ "in_io", "in_top", "in_bot", "in_name", "in_buf"
+ "out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
+ "err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
+--- 9673,9680 ----
+ |job-options|. However, not all options can be used. These
+ are supported:
+ all timeout options
+! "stoponexit", "cwd", "env"
+! "callback", "out_cb", "err_cb", "exit_cb", "close_cb"
+ "in_io", "in_top", "in_bot", "in_name", "in_buf"
+ "out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
+ "err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
+***************
+*** 9735,9741 ****
+ 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!
+ The override is enabled when {val} is non-zero and removed
+ when {val} is zero.
+--- 9794,9800 ----
+ Only to be used for testing!
+
+ test_override({name}, {val}) *test_override()*
+! Overrides certain parts of Vim's internal processing to be able
+ to run tests. Only to be used for testing Vim!
+ The override is enabled when {val} is non-zero and removed
+ when {val} is zero.
+***************
+*** 9906,9912 ****
+ echo tr("<blob>", "<>", "{}")
+ < returns "{blob}"
+
+! trim({text}[, {mask}]) *trim()*
+ Return {text} as a String where any character in {mask} is
+ removed from the beginning and end of {text}.
+ If {mask} is not given, {mask} is all characters up to 0x20,
+--- 9965,9971 ----
+ echo tr("<blob>", "<>", "{}")
+ < returns "{blob}"
+
+! trim({text} [, {mask}]) *trim()*
+ Return {text} as a String where any character in {mask} is
+ removed from the beginning and end of {text}.
+ If {mask} is not given, {mask} is all characters up to 0x20,
+***************
+*** 9946,9955 ****
+ Dictionary: 4 |v:t_dict|
+ Float: 5 |v:t_float|
+ Boolean: 6 |v:t_bool| (v:false and v:true)
+! None 7 |v:t_none| (v:null and v:none)
+! Job 8 |v:t_job|
+! Channel 9 |v:t_channel|
+! Blob 10 |v:t_blob|
+ For backward compatibility, this method can be used: >
+ :if type(myvar) == type(0)
+ :if type(myvar) == type("")
+--- 10005,10014 ----
+ Dictionary: 4 |v:t_dict|
+ Float: 5 |v:t_float|
+ Boolean: 6 |v:t_bool| (v:false and v:true)
+! None: 7 |v:t_none| (v:null and v:none)
+! Job: 8 |v:t_job|
+! Channel: 9 |v:t_channel|
+! Blob: 10 |v:t_blob|
+ For backward compatibility, this method can be used: >
+ :if type(myvar) == type(0)
+ :if type(myvar) == type("")
+***************
+*** 9972,9978 ****
+ If {name} is empty undofile() returns an empty string, since a
+ buffer without a file name will not write an undo file.
+ Useful in combination with |:wundo| and |:rundo|.
+! When compiled without the +persistent_undo option this always
+ returns an empty string.
+
+ undotree() *undotree()*
+--- 10031,10037 ----
+ If {name} is empty undofile() returns an empty string, since a
+ buffer without a file name will not write an undo file.
+ Useful in combination with |:wundo| and |:rundo|.
+! When compiled without the |+persistent_undo| option this always
+ returns an empty string.
+
+ undotree() *undotree()*
+***************
+*** 10028,10034 ****
+
+ values({dict}) *values()*
+ Return a |List| with all the values of {dict}. The |List| is
+! in arbitrary order.
+
+
+ virtcol({expr}) *virtcol()*
+--- 10087,10093 ----
+
+ values({dict}) *values()*
+ Return a |List| with all the values of {dict}. The |List| is
+! in arbitrary order. Also see |items()| and |keys()|.
+
+
+ virtcol({expr}) *virtcol()*
+***************
+*** 10107,10113 ****
+ Get the |window-ID| for the specified window.
+ When {win} is missing use the current window.
+ With {win} this is the window number. The top window has
+! number 1. Use `win_getid(winnr())` for the current window.
+ Without {tab} use the current tab, otherwise the tab with
+ number {tab}. The first tab has number one.
+ Return zero if the window cannot be found.
+--- 10166,10172 ----
+ Get the |window-ID| for the specified window.
+ When {win} is missing use the current window.
+ With {win} this is the window number. The top window has
+! number 1.
+ Without {tab} use the current tab, otherwise the tab with
+ number {tab}. The first tab has number one.
+ Return zero if the window cannot be found.
+***************
+*** 10385,10391 ****
+ amiga Amiga version of Vim.
+ arabic Compiled with Arabic support |Arabic|.
+ arp Compiled with ARP support (Amiga).
+! autocmd Compiled with autocommand support. |autocommand|
+ autoservername Automatically enable |clientserver|
+ balloon_eval Compiled with |balloon-eval| support.
+ balloon_multiline GUI supports multiline balloons.
+--- 10444,10451 ----
+ amiga Amiga version of Vim.
+ arabic Compiled with Arabic support |Arabic|.
+ arp Compiled with ARP support (Amiga).
+! autocmd Compiled with autocommand support. (always true)
+! autochdir Compiled with support for 'autochdir'
+ autoservername Automatically enable |clientserver|
+ balloon_eval Compiled with |balloon-eval| support.
+ balloon_multiline GUI supports multiline balloons.
+***************
+*** 10407,10413 ****
+ conpty Platform where |ConPTY| can be used.
+ cryptv Compiled with encryption support |encryption|.
+ cscope Compiled with |cscope| support.
+! cursorbind Compiled with |cursorbind| (always true)
+ debug Compiled with "DEBUG" defined.
+ dialog_con Compiled with console dialog support.
+ dialog_gui Compiled with GUI dialog support.
+--- 10467,10473 ----
+ conpty Platform where |ConPTY| can be used.
+ cryptv Compiled with encryption support |encryption|.
+ cscope Compiled with |cscope| support.
+! cursorbind Compiled with |'cursorbind'| (always true)
+ debug Compiled with "DEBUG" defined.
+ dialog_con Compiled with console dialog support.
+ dialog_gui Compiled with GUI dialog support.
+***************
+*** 10419,10425 ****
+ emacs_tags Compiled with support for Emacs tags.
+ eval Compiled with expression evaluation support. Always
+ true, of course!
+! ex_extra |+ex_extra|, always true now
+ extra_search Compiled with support for |'incsearch'| and
+ |'hlsearch'|
+ farsi Compiled with Farsi support |farsi|.
+--- 10479,10485 ----
+ emacs_tags Compiled with support for Emacs tags.
+ eval Compiled with expression evaluation support. Always
+ true, of course!
+! ex_extra |+ex_extra| (always true)
+ extra_search Compiled with support for |'incsearch'| and
+ |'hlsearch'|
+ farsi Compiled with Farsi support |farsi|.
+***************
+*** 10481,10487 ****
+ mouse_urxvt Compiled with support for urxvt mouse.
+ mouse_xterm Compiled with support for xterm mouse.
+ mouseshape Compiled with support for 'mouseshape'.
+! multi_byte Compiled with support for 'encoding'
+ multi_byte_encoding 'encoding' is set to a multi-byte encoding.
+ multi_byte_ime Compiled with support for IME input method.
+ multi_lang Compiled with support for multiple languages.
+--- 10541,10547 ----
+ mouse_urxvt Compiled with support for urxvt mouse.
+ mouse_xterm Compiled with support for xterm mouse.
+ mouseshape Compiled with support for 'mouseshape'.
+! multi_byte Compiled with support for 'encoding' (always true)
+ multi_byte_encoding 'encoding' is set to a multi-byte encoding.
+ multi_byte_ime Compiled with support for IME input method.
+ multi_lang Compiled with support for multiple languages.
+***************
+*** 10511,10517 ****
+ reltime Compiled with |reltime()| support.
+ rightleft Compiled with 'rightleft' support.
+ ruby Compiled with Ruby interface |ruby|.
+! scrollbind Compiled with 'scrollbind' support.
+ showcmd Compiled with 'showcmd' support.
+ signs Compiled with |:sign| support.
+ smartindent Compiled with 'smartindent' support.
+--- 10571,10577 ----
+ reltime Compiled with |reltime()| support.
+ rightleft Compiled with 'rightleft' support.
+ ruby Compiled with Ruby interface |ruby|.
+! scrollbind Compiled with 'scrollbind' support. (always true)
+ showcmd Compiled with 'showcmd' support.
+ signs Compiled with |:sign| support.
+ smartindent Compiled with 'smartindent' support.
+***************
+*** 10527,10536 ****
+ system Compiled to use system() instead of fork()/exec().
+ tag_binary Compiled with binary searching in tags files
+ |tag-binary-search|.
+! tag_old_static Compiled with support for old static tags
+ |tag-old-static|.
+- tag_any_white Compiled with support for any white characters in tags
+- files |tag-any-white|.
+ tcl Compiled with Tcl interface.
+ termguicolors Compiled with true color in terminal support.
+ terminal Compiled with |terminal| support.
+--- 10587,10594 ----
+ system Compiled to use system() instead of fork()/exec().
+ tag_binary Compiled with binary searching in tags files
+ |tag-binary-search|.
+! tag_old_static Support for old static tags was removed, see
+ |tag-old-static|.
+ tcl Compiled with Tcl interface.
+ termguicolors Compiled with true color in terminal support.
+ terminal Compiled with |terminal| support.
+***************
+*** 11315,11342 ****
+ NOTE: The ":append" and ":insert" commands don't work
+ properly inside a ":while" and ":for" loop.
+
+! :for {var} in {list} *:for* *E690* *E732*
+ :endfo[r] *:endfo* *:endfor*
+ Repeat the commands between ":for" and ":endfor" for
+! each item in {list}. Variable {var} is set to the
+! value of each item.
+! When an error is detected for a command inside the
+! loop, execution continues after the "endfor".
+! Changing {list} inside the loop affects what items are
+! used. Make a copy if this is unwanted: >
+ :for item in copy(mylist)
+! < When not making a copy, Vim stores a reference to the
+! next item in the list, before executing the commands
+! with the current item. Thus the current item can be
+! removed without effect. Removing any later item means
+! it will not be found. Thus the following example
+! works (an inefficient way to make a list empty): >
+ for item in mylist
+ call remove(mylist, 0)
+ endfor
+! < Note that reordering the list (e.g., with sort() or
+ reverse()) may have unexpected effects.
+
+ :for [{var1}, {var2}, ...] in {listlist}
+ :endfo[r]
+ Like ":for" above, but each item in {listlist} must be
+--- 11373,11406 ----
+ NOTE: The ":append" and ":insert" commands don't work
+ properly inside a ":while" and ":for" loop.
+
+! :for {var} in {object} *:for* *E690* *E732*
+ :endfo[r] *:endfo* *:endfor*
+ Repeat the commands between ":for" and ":endfor" for
+! each item in {object}. {object} can be a |List| or
+! a |Blob|. Variable {var} is set to the value of each
+! item. When an error is detected for a command inside
+! the loop, execution continues after the "endfor".
+! Changing {object} inside the loop affects what items
+! are used. Make a copy if this is unwanted: >
+ :for item in copy(mylist)
+! <
+! When {object} is a |List| and not making a copy, Vim
+! stores a reference to the next item in the |List|
+! before executing the commands with the current item.
+! Thus the current item can be removed without effect.
+! Removing any later item means it will not be found.
+! Thus the following example works (an inefficient way
+! to make a |List| empty): >
+ for item in mylist
+ call remove(mylist, 0)
+ endfor
+! < Note that reordering the |List| (e.g., with sort() or
+ reverse()) may have unexpected effects.
+
++ When {object} is a |Blob|, Vim always makes a copy to
++ iterate over. Unlike with |List|, modifying the
++ |Blob| does not affect the iteration.
++
+ :for [{var1}, {var2}, ...] in {listlist}
+ :endfo[r]
+ Like ":for" above, but each item in {listlist} must be
+***************
+*** 11412,11425 ****
+ commands are skipped.
+ When {pattern} is omitted all errors are caught.
+ Examples: >
+! :catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C)
+! :catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors
+! :catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts
+! :catch /^Vim(write):/ " catch all errors in :write
+! :catch /^Vim\%((\a\+)\)\=:E123/ " catch error E123
+! :catch /my-exception/ " catch user exception
+! :catch /.*/ " catch everything
+! :catch " same as /.*/
+ <
+ Another character can be used instead of / around the
+ {pattern}, so long as it does not have a special
+--- 11476,11489 ----
+ commands are skipped.
+ When {pattern} is omitted all errors are caught.
+ Examples: >
+! :catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C)
+! :catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors
+! :catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts
+! :catch /^Vim(write):/ " catch all errors in :write
+! :catch /^Vim\%((\a\+)\)\=:E123:/ " catch error E123
+! :catch /my-exception/ " catch user exception
+! :catch /.*/ " catch everything
+! :catch " same as /.*/
+ <
+ Another character can be used instead of / around the
+ {pattern}, so long as it does not have a special
+***************
+*** 12689,12695 ****
+
+ ==============================================================================
+ 10. Vim script versions *vimscript-version* *vimscript-versions*
+!
+ Over time many features have been added to Vim script. This includes Ex
+ commands, functions, variable types, etc. Each individual feature can be
+ checked with the |has()| and |exists()| functions.
+--- 12753,12759 ----
+
+ ==============================================================================
+ 10. Vim script versions *vimscript-version* *vimscript-versions*
+! *scriptversion*
+ Over time many features have been added to Vim script. This includes Ex
+ commands, functions, variable types, etc. Each individual feature can be
+ checked with the |has()| and |exists()| functions.
+***************
+*** 12710,12718 ****
+ < String concatenation with "." is not supported, use ".." instead.
+ This avoids the ambiguity using "." for Dict member access and
+ floating point numbers. Now ".5" means the number 0.5.
+! Test for support with: >
+! has('vimscript-2')
+
+
+ ==============================================================================
+ 11. No +eval feature *no-eval-feature*
+--- 12774,12787 ----
+ < String concatenation with "." is not supported, use ".." instead.
+ This avoids the ambiguity using "." for Dict member access and
+ floating point numbers. Now ".5" means the number 0.5.
+! >
+! :scriptversion 3
+! < All |vim-variable|s must be prefixed by "v:". E.g. "version" doesn't
+! work as |v:version| anymore, it can be used as a normal variable.
+! Same for some obvious names as "count" and others.
+
++ Test for support with: >
++ has('vimscript-3')
+
+ ==============================================================================
+ 11. No +eval feature *no-eval-feature*
+***************
+*** 12822,12825 ****
+ Find more information in the file src/testdir/README.txt.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 12891,12894 ----
+ Find more information in the file src/testdir/README.txt.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/farsi.txt 2019-02-16 15:09:21.225946157 +0100
+--- runtime/doc/farsi.txt 2019-05-05 17:40:23.067021524 +0200
+***************
+*** 1,4 ****
+! *farsi.txt* For Vim version 8.1. Last change: 2019 Feb 16
+
+
+ VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
+--- 1,4 ----
+! *farsi.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
+***************
+*** 6,12 ****
+
+ Right to Left and Farsi Mapping for Vim *farsi* *Farsi*
+
+- {Vi does not have any of these commands}
+
+ *E27*
+ Farsi support has been removed in patch 8.1.0932. At that time it was
+--- 6,11 ----
+*** ../vim-8.1.1279/runtime/doc/filetype.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/filetype.txt 2019-05-05 17:40:44.726900525 +0200
+***************
+*** 1,4 ****
+! *filetype.txt* For Vim version 8.1. Last change: 2018 Apr 18
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *filetype.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 12,18 ****
+
+ Also see |autocmd.txt|.
+
+- {Vi does not have any of these commands}
+
+ ==============================================================================
+ 1. Filetypes *filetypes* *file-types*
+--- 12,17 ----
+***************
+*** 320,327 ****
+ Note that the last one is the value of $VIMRUNTIME which has been expanded.
+
+ Note that when using a plugin manager or |packages| many directories will be
+! added to 'runtimepath'. These plugins earch require their own directory,
+! don't put them directly in ~/.vim/plugin.
+
+ What if it looks like your plugin is not being loaded? You can find out what
+ happens when Vim starts up by using the |-V| argument: >
+--- 319,326 ----
+ Note that the last one is the value of $VIMRUNTIME which has been expanded.
+
+ Note that when using a plugin manager or |packages| many directories will be
+! added to 'runtimepath'. These plugins each require their own directory, don't
+! put them directly in ~/.vim/plugin.
+
+ What if it looks like your plugin is not being loaded? You can find out what
+ happens when Vim starts up by using the |-V| argument: >
+***************
+*** 638,648 ****
+
+ setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
+
+! To disable this behaviour, set the following variable in your vimrc: >
+
+ let g:python_recommended_style = 0
+
+
+ RPM SPEC *ft-spec-plugin*
+
+ Since the text for this plugin is rather long it has been put in a separate
+--- 637,676 ----
+
+ setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
+
+! To disable this behavior, set the following variable in your vimrc: >
+
+ let g:python_recommended_style = 0
+
+
++ R MARKDOWN *ft-rmd-plugin*
++
++ By default ftplugin/html.vim is not sourced. If you want it sourced, add to
++ your |vimrc|: >
++ let rmd_include_html = 1
++
++ The 'formatexpr' option is set dynamically with different values for R code
++ and for Markdown code. If you prefer that 'formatexpr' is not set, add to your
++ |vimrc|: >
++ let rmd_dynamic_comments = 0
++
++
++ R RESTRUCTURED TEXT *ft-rrst-plugin*
++
++ The 'formatexpr' option is set dynamically with different values for R code
++ and for ReStructured text. If you prefer that 'formatexpr' is not set, add to
++ your |vimrc|: >
++ let rrst_dynamic_comments = 0
++
++
++ RESTRUCTUREDTEXT *ft-rst-plugin*
++
++ The following formatting setting are optionally available: >
++ setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8
++
++ To enable this behavior, set the following variable in your vimrc: >
++ let g:rst_style = 1
++
++
+ RPM SPEC *ft-spec-plugin*
+
+ Since the text for this plugin is rather long it has been put in a separate
+***************
+*** 695,698 ****
+ <
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 723,726 ----
+ <
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/fold.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/fold.txt 2019-05-05 17:32:54.065507338 +0200
+***************
+*** 1,4 ****
+! *fold.txt* For Vim version 8.1. Last change: 2017 Mar 18
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *fold.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 14,20 ****
+ 3. Fold options |fold-options|
+ 4. Behavior of folds |fold-behavior|
+
+- {Vi has no Folding}
+ {not available when compiled without the |+folding| feature}
+
+ ==============================================================================
+--- 14,19 ----
+***************
+*** 601,604 ****
+ are used.
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 600,603 ----
+ are used.
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/ft_ada.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/ft_ada.txt 2018-06-17 22:23:13.773656146 +0200
+***************
+*** 249,255 ****
+ External command used for |g:decada.Make()| (|'makeprg'|).
+
+ *g:decada.Error_Format*
+! g:decada.Error_Format| string
+ Error format (|'errorformat'|).
+
+ ==============================================================================
+--- 249,255 ----
+ External command used for |g:decada.Make()| (|'makeprg'|).
+
+ *g:decada.Error_Format*
+! g:decada.Error_Format string
+ Error format (|'errorformat'|).
+
+ ==============================================================================
+*** ../vim-8.1.1279/runtime/doc/ft_rust.txt 2017-10-27 21:53:22.000000000 +0200
+--- runtime/doc/ft_rust.txt 2018-08-08 23:07:19.236325204 +0200
+***************
+*** 1,4 ****
+! *ft_rust.txt* Filetype plugin for Rust
+
+ ==============================================================================
+ CONTENTS *rust*
+--- 1,6 ----
+! *ft_rust.txt* For Vim version 8.1. Last change: 2017 Nov 02
+!
+! This is documentation for the Rust filetype plugin.
+
+ ==============================================================================
+ CONTENTS *rust*
+***************
+*** 234,237 ****
+ Note: This binding is only available in MacVim.
+
+ ==============================================================================
+! vim:tw=78:sw=4:noet:ts=8:ft=help:norl:
+--- 236,239 ----
+ Note: This binding is only available in MacVim.
+
+ ==============================================================================
+! vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/ft_sql.txt 2018-05-17 13:41:40.000000000 +0200
+--- runtime/doc/ft_sql.txt 2018-07-29 14:23:36.363157576 +0200
+***************
+*** 777,780 ****
+ as they were.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 777,780 ----
+ as they were.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/gui.txt 2019-04-28 14:02:25.410687613 +0200
+--- runtime/doc/gui.txt 2019-05-05 17:40:49.138875880 +0200
+***************
+*** 1,4 ****
+! *gui.txt* For Vim version 8.1. Last change: 2019 Apr 28
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *gui.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 19,25 ****
+ |gui_x11.txt| For specific items of the X11 GUI.
+ |gui_w32.txt| For specific items of the Win32 GUI.
+
+- {Vi does not have any of these commands}
+
+ ==============================================================================
+ 1. Starting the GUI *gui-start* *E229* *E233*
+--- 19,24 ----
+*** ../vim-8.1.1279/runtime/doc/gui_w32.txt 2019-04-28 19:46:17.018060159 +0200
+--- runtime/doc/gui_w32.txt 2019-05-05 17:40:54.634845175 +0200
+***************
+*** 1,4 ****
+! *gui_w32.txt* For Vim version 8.1. Last change: 2017 Oct 27
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *gui_w32.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 19,25 ****
+ |gui.txt| For generic items of the GUI.
+ |os_win32.txt| For Win32 specific items.
+
+- {Vi does not have a Windows GUI}
+
+ ==============================================================================
+ 1. Starting the GUI *gui-w32-start*
+--- 19,24 ----
+***************
+*** 414,420 ****
+
+ *:simalt* *:sim*
+ :sim[alt] {key} simulate pressing {key} while holding Alt pressed.
+! {not in Vi} {only for Win32 versions}
+ Note: ":si" means ":s" with the "i" flag.
+
+ Normally, Vim takes control of all Alt-<Key> combinations, to increase the
+--- 413,419 ----
+
+ *:simalt* *:sim*
+ :sim[alt] {key} simulate pressing {key} while holding Alt pressed.
+! {only for Win32 versions}
+ Note: ":si" means ":s" with the "i" flag.
+
+ Normally, Vim takes control of all Alt-<Key> combinations, to increase the
+***************
+*** 462,465 ****
+ :exe 'sign place 1 line=1 name=vimxpm file=' . expand('%:p')
+ <
+
+! vim:tw=78:sw=4:ts=8:ft=help:norl:
+--- 461,464 ----
+ :exe 'sign place 1 line=1 name=vimxpm file=' . expand('%:p')
+ <
+
+! vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/gui_x11.txt 2018-05-17 13:41:40.000000000 +0200
+--- runtime/doc/gui_x11.txt 2019-05-05 17:40:59.550817699 +0200
+***************
+*** 1,4 ****
+! *gui_x11.txt* For Vim version 8.1. Last change: 2018 May 06
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *gui_x11.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 19,25 ****
+ Other relevant documentation:
+ |gui.txt| For generic items of the GUI.
+
+- {Vi does not have any of these commands}
+
+ ==============================================================================
+ 1. Starting the X11 GUI *gui-x11-start* *E665*
+--- 19,24 ----
+***************
+*** 48,54 ****
+ ":gui -f". Don't use "vim -fg", because "-fg" specifies the foreground
+ color.
+
+! When using "gvim -f" and then ":gui", Vim will run in the foreground. The
+ "-f" argument will be remembered. To force running Vim in the background use
+ ":gui -b".
+
+--- 47,53 ----
+ ":gui -f". Don't use "vim -fg", because "-fg" specifies the foreground
+ color.
+
+! When using "vim -f" and then ":gui", Vim will run in the foreground. The
+ "-f" argument will be remembered. To force running Vim in the background use
+ ":gui -b".
+
+***************
+*** 376,383 ****
+ distribution.
+
+ For GTK+ 3, an effect similar to the above can be obtained by adding the
+! following snippet of CSS code to $XDG_HOME_DIR/gtk-3.0/gtk.css (usually,
+! $HOME/.config/gtk-3.0/gtk.css):
+
+ For GTK+ 3 < 3.20: >
+
+--- 375,382 ----
+ distribution.
+
+ For GTK+ 3, an effect similar to the above can be obtained by adding the
+! following snippet of CSS code to $XDG_HOME_DIR/gtk-3.0/gtk.css (see the next
+! section):
+
+ For GTK+ 3 < 3.20: >
+
+***************
+*** 408,413 ****
+--- 407,416 ----
+ GTK+ uses CSS for styling and layout of widgets. In this subsection, we'll
+ have a quick look at GTK+ CSS through simple, illustrative examples.
+
++ You can usually edit the config with: >
++ vim $HOME/.config/gtk-3.0/gtk.css
++
++
+ Example 1. Empty Space Adjustment ~
+
+ By default, the toolbar and the tabline of the GTK+ 3 GUI are somewhat larger
+***************
+*** 492,497 ****
+--- 495,510 ----
+ in mind always when you try improving a theme.
+
+
++ Example 3. border color ~
++
++ To eliminate borders when maximized: >
++
++ @define-color bg_color #1B2B34;
++ #vim-main-window {
++ background-color: @bg_color;
++ }
++
++
+ Using Vim as a GTK+ plugin ~
+ *gui-gtk-socketid*
+ When the GTK+ version of Vim starts up normally, it creates its own top level
+***************
+*** 721,724 ****
+ both by choosing to use either of the "* or "+ registers.
+
+
+! vim:tw=78:sw=4:ts=8:ft=help:norl:
+--- 734,737 ----
+ both by choosing to use either of the "* or "+ registers.
+
+
+! vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/hangulin.txt 2018-05-17 13:41:40.000000000 +0200
+--- runtime/doc/hangulin.txt 2018-07-29 14:23:36.363157576 +0200
+***************
+*** 109,112 ****
+ SungHyun Nam <goweol@gmail.com>
+ Chi-Deok Hwang <...>
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 109,112 ----
+ SungHyun Nam <goweol@gmail.com>
+ Chi-Deok Hwang <...>
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/hebrew.txt 2018-05-17 13:41:40.000000000 +0200
+--- runtime/doc/hebrew.txt 2019-05-05 17:41:19.574705732 +0200
+***************
+*** 1,4 ****
+! *hebrew.txt* For Vim version 8.1. Last change: 2007 Jun 14
+
+
+ VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem)
+--- 1,4 ----
+! *hebrew.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem)
+***************
+*** 10,19 ****
+ Lottem. <alottem at gmail dot com> Ron Aaron <ron at ronware dot org> is
+ currently helping support these features.
+
+! {Vi does not have any of these commands}
+!
+! All this is only available when the |+rightleft| feature was enabled at
+! compile time.
+
+
+ Introduction
+--- 10,16 ----
+ Lottem. <alottem at gmail dot com> Ron Aaron <ron at ronware dot org> is
+ currently helping support these features.
+
+! {only available when the |+rightleft| feature was enabled at compile time}
+
+
+ Introduction
+***************
+*** 139,142 ****
+ problem, set isprint=@,128-255.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 136,139 ----
+ problem, set isprint=@,128-255.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/helphelp.txt 2018-05-17 13:41:40.000000000 +0200
+--- runtime/doc/helphelp.txt 2019-05-04 22:41:34.687538617 +0200
+***************
+*** 1,4 ****
+! *helphelp.txt* For Vim version 8.1. Last change: 2017 Mar 19
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *helphelp.txt* For Vim version 8.1. Last change: 2019 May 04
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 24,30 ****
+ the very top.
+ The 'helplang' option is used to select a language, if
+ the main help file is available in several languages.
+- {not in Vi}
+
+ *{subject}* *E149* *E661*
+ :h[elp] {subject} Like ":help", additionally jump to the tag {subject}.
+--- 24,29 ----
+***************
+*** 97,103 ****
+ command from a following command. You need to type
+ CTRL-V first to insert the <LF> or <CR>. Example: >
+ :help so<C-V><CR>only
+- < {not in Vi}
+
+ :h[elp]! [subject] Like ":help", but in non-English help files prefer to
+ find a tag in a file with the same language as the
+--- 96,101 ----
+***************
+*** 133,139 ****
+ |:execute| when needed.
+ Compressed help files will not be searched (Fedora
+ compresses the help files).
+- {not in Vi}
+
+ *:lh* *:lhelpgrep*
+ :lh[elpgrep] {pattern}[@xx]
+--- 131,136 ----
+***************
+*** 147,157 ****
+
+ *:exu* *:exusage*
+ :exu[sage] Show help on Ex commands. Added to simulate the Nvi
+! command. {not in Vi}
+
+ *:viu* *:viusage*
+ :viu[sage] Show help on Normal mode commands. Added to simulate
+! the Nvi command. {not in Vi}
+
+ When no argument is given to |:help| the file given with the 'helpfile' option
+ will be opened. Otherwise the specified tag is searched for in all "doc/tags"
+--- 144,154 ----
+
+ *:exu* *:exusage*
+ :exu[sage] Show help on Ex commands. Added to simulate the Nvi
+! command.
+
+ *:viu* *:viusage*
+ :viu[sage] Show help on Normal mode commands. Added to simulate
+! the Nvi command.
+
+ When no argument is given to |:help| the file given with the 'helpfile' option
+ will be opened. Otherwise the specified tag is searched for in all "doc/tags"
+***************
+*** 199,205 ****
+ Only for backwards compatibility. It now executes the
+ ToolBar.FindHelp menu entry instead of using a builtin
+ dialog. {only when compiled with |+GUI_GTK|}
+- {not in Vi}
+
+ *:helpt* *:helptags*
+ *E154* *E150* *E151* *E152* *E153* *E670*
+--- 196,201 ----
+***************
+*** 224,231 ****
+ To rebuild the help tags in the runtime directory
+ (requires write permission there): >
+ :helptags $VIMRUNTIME/doc
+- < {not in Vi}
+-
+
+ ==============================================================================
+ 2. Translated help files *help-translated*
+--- 220,225 ----
+***************
+*** 370,373 ****
+
+ You can find the details in $VIMRUNTIME/syntax/help.vim
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 364,367 ----
+
+ You can find the details in $VIMRUNTIME/syntax/help.vim
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/help.txt 2019-01-17 15:43:21.749878443 +0100
+--- runtime/doc/help.txt 2019-01-17 14:55:00.628054659 +0100
+***************
+*** 1,4 ****
+! *help.txt* For Vim version 8.1. Last change: 2017 Oct 28
+
+ VIM - main help file
+ k
+--- 1,4 ----
+! *help.txt* For Vim version 8.1. Last change: 2019 Jan 17
+
+ VIM - main help file
+ k
+***************
+*** 10,16 ****
+ Jump to a subject: Position the cursor on a tag (e.g. |bars|) and hit CTRL-].
+ With the mouse: ":set mouse=a" to enable the mouse (in xterm or GUI).
+ Double-click the left mouse button on a tag, e.g. |bars|.
+! Jump back: Type CTRL-T or CTRL-O. Repeat to go further back.
+
+ Get specific help: It is possible to go directly to whatever you want help
+ on, by giving an argument to the |:help| command.
+--- 10,16 ----
+ Jump to a subject: Position the cursor on a tag (e.g. |bars|) and hit CTRL-].
+ With the mouse: ":set mouse=a" to enable the mouse (in xterm or GUI).
+ Double-click the left mouse button on a tag, e.g. |bars|.
+! Jump back: Type CTRL-O. Repeat to go further back.
+
+ Get specific help: It is possible to go directly to whatever you want help
+ on, by giving an argument to the |:help| command.
+***************
+*** 31,43 ****
+ help entries for "word".
+ Or use ":helpgrep word". |:helpgrep|
+
+ Vim stands for Vi IMproved. Most of Vim was made by Bram Moolenaar, but only
+ through the help of many others. See |credits|.
+ ------------------------------------------------------------------------------
+ *doc-file-list* *Q_ct*
+ BASIC:
+ |quickref| Overview of the most common commands you will use
+! |tutor| 30 minutes training course for beginners
+ |copying| About copyrights
+ |iccf| Helping poor children in Uganda
+ |sponsor| Sponsor Vim development, become a registered Vim user
+--- 31,47 ----
+ help entries for "word".
+ Or use ":helpgrep word". |:helpgrep|
+
++ Getting started: Do the Vim tutor, a 20 minute interactive training for the
++ basic commands, see |vimtutor|.
++ Read the user manual from start to end: |usr_01.txt|
++
+ Vim stands for Vi IMproved. Most of Vim was made by Bram Moolenaar, but only
+ through the help of many others. See |credits|.
+ ------------------------------------------------------------------------------
+ *doc-file-list* *Q_ct*
+ BASIC:
+ |quickref| Overview of the most common commands you will use
+! |tutor| 20 minutes training course for beginners
+ |copying| About copyrights
+ |iccf| Helping poor children in Uganda
+ |sponsor| Sponsor Vim development, become a registered Vim user
+***************
+*** 113,119 ****
+ |scroll.txt| scrolling the text in the window
+ |insert.txt| Insert and Replace mode
+ |change.txt| deleting and replacing text
+- |indent.txt| automatic indenting for C and other languages
+ |undo.txt| Undo and Redo
+ |repeat.txt| repeating commands, Vim scripts and debugging
+ |visual.txt| using the Visual mode (selecting a text area)
+--- 117,122 ----
+***************
+*** 126,139 ****
+ |pattern.txt| regexp patterns and search commands
+ |map.txt| key mapping and abbreviations
+ |tagsrch.txt| tags and special searches
+- |quickfix.txt| commands for a quick edit-compile-fix cycle
+ |windows.txt| commands for using multiple windows and buffers
+ |tabpage.txt| commands for using multiple tab pages
+- |syntax.txt| syntax highlighting
+ |spell.txt| spell checking
+ |diff.txt| working with two to four versions of the same file
+ |autocmd.txt| automatically executing commands on an event
+- |filetype.txt| settings done specifically for a type of file
+ |eval.txt| expression evaluation, conditional commands
+ |channel.txt| Jobs, Channels, inter-process communication
+ |fold.txt| hide (fold) ranges of lines
+--- 129,139 ----
+***************
+*** 143,160 ****
+ |remote.txt| using Vim as a server or client
+ |term.txt| using different terminals and mice
+ |terminal.txt| Terminal window support
+ |digraph.txt| list of available digraphs
+ |mbyte.txt| multi-byte text support
+ |mlang.txt| non-English language support
+ |arabic.txt| Arabic language support and editing
+ |farsi.txt| Farsi (Persian) editing
+ |hebrew.txt| Hebrew language support and editing
+ |russian.txt| Russian language support and editing
+- |ft_ada.txt| Ada (the programming language) support
+- |ft_rust.txt| Filetype plugin for Rust
+- |ft_sql.txt| about the SQL filetype plugin
+ |hangulin.txt| Hangul (Korean) input mode
+- |rileft.txt| right-to-left editing mode
+
+ GUI ~
+ |gui.txt| Graphical User Interface (GUI)
+--- 143,169 ----
+ |remote.txt| using Vim as a server or client
+ |term.txt| using different terminals and mice
+ |terminal.txt| Terminal window support
++
++ Programming language support ~
++ |indent.txt| automatic indenting for C and other languages
++ |syntax.txt| syntax highlighting
++ |textprop.txt| Attaching properties to text for highlighting or other
++ |filetype.txt| settings done specifically for a type of file
++ |quickfix.txt| commands for a quick edit-compile-fix cycle
++ |ft_ada.txt| Ada (the programming language) support
++ |ft_rust.txt| Filetype plugin for Rust
++ |ft_sql.txt| about the SQL filetype plugin
++
++ Language support ~
+ |digraph.txt| list of available digraphs
+ |mbyte.txt| multi-byte text support
+ |mlang.txt| non-English language support
++ |rileft.txt| right-to-left editing mode
+ |arabic.txt| Arabic language support and editing
+ |farsi.txt| Farsi (Persian) editing
+ |hebrew.txt| Hebrew language support and editing
+ |russian.txt| Russian language support and editing
+ |hangulin.txt| Hangul (Korean) input mode
+
+ GUI ~
+ |gui.txt| Graphical User Interface (GUI)
+***************
+*** 224,227 ****
+ 'compatible'.
+
+ ------------------------------------------------------------------------------
+! vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
+--- 233,236 ----
+ 'compatible'.
+
+ ------------------------------------------------------------------------------
+! vim:tw=78:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/howto.txt 2018-05-17 13:41:40.000000000 +0200
+--- runtime/doc/howto.txt 2018-07-29 14:23:36.363157576 +0200
+***************
+*** 93,96 ****
+ |2html.vim| convert a colored file to HTML
+ |less| use Vim like less or more with syntax highlighting
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 93,96 ----
+ |2html.vim| convert a colored file to HTML
+ |less| use Vim like less or more with syntax highlighting
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/if_cscop.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/if_cscop.txt 2019-05-05 17:41:29.350651064 +0200
+***************
+*** 1,4 ****
+! *if_cscop.txt* For Vim version 8.1. Last change: 2018 Jan 21
+
+
+ VIM REFERENCE MANUAL by Andy Kahn
+--- 1,4 ----
+! *if_cscop.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Andy Kahn
+***************
+*** 21,27 ****
+ 7. Availability & Information |cscope-info|
+
+ This is currently for Unix and Win32 only.
+- {Vi does not have any of these commands}
+
+ ==============================================================================
+ 1. Cscope introduction *cscope-intro*
+--- 21,26 ----
+***************
+*** 484,487 ****
+ Win32 support was added by Sergey Khorev <sergey.khorev@gmail.com>. Contact
+ him if you have Win32-specific issues.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 483,486 ----
+ Win32 support was added by Sergey Khorev <sergey.khorev@gmail.com>. Contact
+ him if you have Win32-specific issues.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/if_lua.txt 2019-03-23 13:56:30.189804811 +0100
+--- runtime/doc/if_lua.txt 2019-05-05 17:57:40.985303358 +0200
+***************
+*** 1,4 ****
+! *if_lua.txt* For Vim version 8.1. Last change: 2015 Oct 16
+
+
+ VIM REFERENCE MANUAL by Luis Carvalho
+--- 1,4 ----
+! *if_lua.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Luis Carvalho
+***************
+*** 17,33 ****
+ 9. luaeval() Vim function |lua-luaeval|
+ 10. Dynamic loading |lua-dynamic|
+
+! {Vi does not have any of these commands}
+!
+! The Lua interface is available only when Vim was compiled with the
+! |+lua| feature.
+
+ ==============================================================================
+ 1. Commands *lua-commands*
+
+ *:lua*
+ :[range]lua {chunk}
+! Execute Lua chunk {chunk}. {not in Vi}
+
+ Examples:
+ >
+--- 17,30 ----
+ 9. luaeval() Vim function |lua-luaeval|
+ 10. Dynamic loading |lua-dynamic|
+
+! {only available when Vim was compiled with the |+lua| feature}
+
+ ==============================================================================
+ 1. Commands *lua-commands*
+
+ *:lua*
+ :[range]lua {chunk}
+! Execute Lua chunk {chunk}.
+
+ Examples:
+ >
+***************
+*** 38,44 ****
+ :[range]lua << {endmarker}
+ {script}
+ {endmarker}
+! Execute Lua script {script}. {not in Vi}
+ Note: This command doesn't work when the Lua
+ feature wasn't compiled in. To avoid errors, see
+ |script-here|.
+--- 35,41 ----
+ :[range]lua << {endmarker}
+ {script}
+ {endmarker}
+! Execute Lua script {script}.
+ Note: This command doesn't work when the Lua
+ feature wasn't compiled in. To avoid errors, see
+ |script-here|.
+***************
+*** 75,81 ****
+ If the value returned by the function is a string it
+ becomes the text of the line in the current turn. The
+ default for [range] is the whole file: "1,$".
+- {not in Vi}
+
+ Examples:
+ >
+--- 72,77 ----
+***************
+*** 89,95 ****
+
+ *:luafile*
+ :[range]luafile {file}
+! Execute Lua script in {file}. {not in Vi}
+ The whole argument is used as a single file name.
+
+ Examples:
+--- 85,91 ----
+
+ *:luafile*
+ :[range]luafile {file}
+! Execute Lua script in {file}.
+ The whole argument is used as a single file name.
+
+ Examples:
+*** ../vim-8.1.1279/runtime/doc/if_mzsch.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/if_mzsch.txt 2019-05-05 17:58:07.097159011 +0200
+***************
+*** 1,4 ****
+! *if_mzsch.txt* For Vim version 8.1. Last change: 2017 Oct 08
+
+
+ VIM REFERENCE MANUAL by Sergey Khorev
+--- 1,4 ----
+! *if_mzsch.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Sergey Khorev
+***************
+*** 15,24 ****
+ 7. Dynamic loading |mzscheme-dynamic|
+ 8. MzScheme setup |mzscheme-setup|
+
+! {Vi does not have any of these commands}
+!
+! The MzScheme interface is available only if Vim was compiled with the
+! |+mzscheme| feature.
+
+ Based on the work of Brent Fulgham.
+ Dynamic loading added by Sergey Khorev
+--- 15,21 ----
+ 7. Dynamic loading |mzscheme-dynamic|
+ 8. MzScheme setup |mzscheme-setup|
+
+! {only available when Vim was compiled with the |+mzscheme| feature}
+
+ Based on the work of Brent Fulgham.
+ Dynamic loading added by Sergey Khorev
+***************
+*** 40,46 ****
+
+ *:mzscheme* *:mz*
+ :[range]mz[scheme] {stmt}
+! Execute MzScheme statement {stmt}. {not in Vi}
+
+ :[range]mz[scheme] << {endmarker}
+ {script}
+--- 37,43 ----
+
+ *:mzscheme* *:mz*
+ :[range]mz[scheme] {stmt}
+! Execute MzScheme statement {stmt}.
+
+ :[range]mz[scheme] << {endmarker}
+ {script}
+***************
+*** 51,57 ****
+ |script-here|.
+
+ *:mzfile* *:mzf*
+! :[range]mzf[ile] {file} Execute the MzScheme script in {file}. {not in Vi}
+
+ All of these commands do essentially the same thing - they execute a piece of
+ MzScheme code, with the "current range" set to the given line
+--- 48,54 ----
+ |script-here|.
+
+ *:mzfile* *:mzf*
+! :[range]mzf[ile] {file} Execute the MzScheme script in {file}.
+
+ All of these commands do essentially the same thing - they execute a piece of
+ MzScheme code, with the "current range" set to the given line
+***************
+*** 312,315 ****
+ raco pkg install cext-lib # raco ctool command
+ <
+ ======================================================================
+! vim:tw=78:ts=8:sts=4:ft=help:norl:
+--- 309,312 ----
+ raco pkg install cext-lib # raco ctool command
+ <
+ ======================================================================
+! vim:tw=78:ts=8:noet:sts=4:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/if_ole.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/if_ole.txt 2019-05-05 17:42:02.554465232 +0200
+***************
+*** 1,4 ****
+! *if_ole.txt* For Vim version 8.1. Last change: 2008 Aug 16
+
+
+ VIM REFERENCE MANUAL by Paul Moore
+--- 1,4 ----
+! *if_ole.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Paul Moore
+***************
+*** 12,21 ****
+ 4. Registration |ole-registration|
+ 5. MS Visual Studio integration |MSVisualStudio|
+
+! {Vi does not have any of these commands}
+!
+! OLE is only available when compiled with the |+ole| feature. See
+! src/if_ole.INSTALL.
+ An alternative is using the client-server communication |clientserver|.
+
+ ==============================================================================
+--- 12,19 ----
+ 4. Registration |ole-registration|
+ 5. MS Visual Studio integration |MSVisualStudio|
+
+! {only available when compiled with the |+ole| feature. See
+! src/if_ole.INSTALL}
+ An alternative is using the client-server communication |clientserver|.
+
+ ==============================================================================
+***************
+*** 202,205 ****
+ [.Net remarks provided by Dave Fishburn and Brian Sturk]
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 200,203 ----
+ [.Net remarks provided by Dave Fishburn and Brian Sturk]
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/if_perl.txt 2019-01-12 22:47:01.256088105 +0100
+--- runtime/doc/if_perl.txt 2019-05-05 17:58:30.901027316 +0200
+***************
+*** 1,4 ****
+! *if_perl.txt* For Vim version 8.1. Last change: 2017 Nov 24
+
+
+ VIM REFERENCE MANUAL by Sven Verdoolaege
+--- 1,4 ----
+! *if_perl.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Sven Verdoolaege
+***************
+*** 11,19 ****
+ 3. Using the Perl interface |perl-using|
+ 4. Dynamic loading |perl-dynamic|
+
+! {Vi does not have any of these commands}
+!
+! The Perl interface only works when Vim was compiled with the |+perl| feature.
+
+ ==============================================================================
+ 1. Editing Perl files *perl-editing*
+--- 11,17 ----
+ 3. Using the Perl interface |perl-using|
+ 4. Dynamic loading |perl-dynamic|
+
+! {only available when Vim was compiled with the |+perl| feature}
+
+ ==============================================================================
+ 1. Editing Perl files *perl-editing*
+***************
+*** 44,51 ****
+ Sven Verdoolaege <skimo@breughel.ufsia.ac.be>
+ Matt Gerassimof
+
+! Perl for MS-Windows can be found at: http://www.perl.com/
+! The ActiveState one should work.
+
+ ==============================================================================
+ 3. Using the Perl interface *perl-using*
+--- 42,50 ----
+ Sven Verdoolaege <skimo@breughel.ufsia.ac.be>
+ Matt Gerassimof
+
+! Perl for MS-Windows (and other platforms) can be found at:
+! http://www.perl.org/
+! The ActiveState one should work, Strawberry Perl is a good alternative.
+
+ ==============================================================================
+ 3. Using the Perl interface *perl-using*
+***************
+*** 191,197 ****
+ and inserting line breaks.
+
+ *perl-Blob*
+! VIM::Blob({expr}) Return Blob literal string 0zXXXX from scalar value.
+
+ *perl-SetHeight*
+ Window->SetHeight({height})
+--- 190,196 ----
+ and inserting line breaks.
+
+ *perl-Blob*
+! VIM::Blob({expr}) Return |Blob| literal string 0zXXXX from scalar value.
+
+ *perl-SetHeight*
+ Window->SetHeight({height})
+***************
+*** 306,309 ****
+ with.
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 305,308 ----
+ with.
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/if_pyth.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/if_pyth.txt 2019-05-04 22:42:16.327312200 +0200
+***************
+*** 1,4 ****
+! *if_pyth.txt* For Vim version 8.1. Last change: 2018 Jan 30
+
+
+ VIM REFERENCE MANUAL by Paul Moore
+--- 1,4 ----
+! *if_pyth.txt* For Vim version 8.1. Last change: 2019 May 04
+
+
+ VIM REFERENCE MANUAL by Paul Moore
+***************
+*** 19,26 ****
+ 11. Python X |python_x|
+ 12. Building with Python support |python-building|
+
+- {Vi does not have any of these commands}
+-
+ The Python 2.x interface is available only when Vim was compiled with the
+ |+python| feature.
+ The Python 3 interface is available only when Vim was compiled with the
+--- 19,24 ----
+***************
+*** 60,68 ****
+ endfunction
+
+ To see what version of Python you have: >
+- :python import sys
+ :python print(sys.version)
+
+ Note: Python is very sensitive to the indenting. Make sure the "class" line
+ and "EOF" do not have any indent.
+
+--- 58,67 ----
+ endfunction
+
+ To see what version of Python you have: >
+ :python print(sys.version)
+
++ There is no need to import sys, it's done by default.
++
+ Note: Python is very sensitive to the indenting. Make sure the "class" line
+ and "EOF" do not have any indent.
+
+***************
+*** 75,91 ****
+ None. If a string is returned, it becomes the text of
+ the line in the current turn. The default for [range]
+ is the whole file: "1,$".
+- {not in Vi}
+
+ Examples:
+ >
+ :pydo return "%s\t%d" % (line[::-1], len(line))
+ :pydo if line: return "%4d: %s" % (linenr, line)
+ <
+ *:pyfile* *:pyf*
+ :[range]pyf[ile] {file}
+ Execute the Python script in {file}. The whole
+! argument is used as a single file name. {not in Vi}
+
+ Both of these commands do essentially the same thing - they execute a piece of
+ Python code, with the "current range" |python-range| set to the given line
+--- 74,101 ----
+ None. If a string is returned, it becomes the text of
+ the line in the current turn. The default for [range]
+ is the whole file: "1,$".
+
+ Examples:
+ >
+ :pydo return "%s\t%d" % (line[::-1], len(line))
+ :pydo if line: return "%4d: %s" % (linenr, line)
+ <
++ One can use `:pydo` in possible conjunction with `:py` to filter a range using
++ python. For example: >
++
++ :py3 << EOF
++ needle = vim.eval('@a')
++ replacement = vim.eval('@b')
++
++ def py_vim_string_replace(str):
++ return str.replace(needle, replacement)
++ EOF
++ :'<,'>py3do return py_vim_string_replace(line)
++ <
+ *:pyfile* *:pyf*
+ :[range]pyf[ile] {file}
+ Execute the Python script in {file}. The whole
+! argument is used as a single file name.
+
+ Both of these commands do essentially the same thing - they execute a piece of
+ Python code, with the "current range" |python-range| set to the given line
+***************
+*** 98,104 ****
+
+ To pass arguments you need to set sys.argv[] explicitly. Example: >
+
+- :python import sys
+ :python sys.argv = ["foo", "bar"]
+ :pyfile myscript.py
+
+--- 108,113 ----
+***************
+*** 168,178 ****
+ - a dictionary if the Vim expression evaluates to a Vim dictionary
+ Dictionaries and lists are recursively expanded.
+ Examples: >
+ :py text_width = vim.eval("&tw")
+! :py str = vim.eval("12+12") # NB result is a string! Use
+! # string.atoi() to convert to
+! # a number.
+!
+ :py tagList = vim.eval('taglist("eval_expr")')
+ < The latter will return a python list of python dicts, for instance:
+ [{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name': ~
+--- 177,191 ----
+ - a dictionary if the Vim expression evaluates to a Vim dictionary
+ Dictionaries and lists are recursively expanded.
+ Examples: >
++ :" value of the 'textwidth' option
+ :py text_width = vim.eval("&tw")
+! :
+! :" contents of the 'a' register
+! :py a_reg = vim.eval("@a")
+! :
+! :" Result is a string! Use string.atoi() to convert to a number.
+! :py str = vim.eval("12+12")
+! :
+ :py tagList = vim.eval('taglist("eval_expr")')
+ < The latter will return a python list of python dicts, for instance:
+ [{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name': ~
+***************
+*** 924,927 ****
+ one you prefer, before running configure.
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 937,940 ----
+ one you prefer, before running configure.
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/if_ruby.txt 2019-03-26 22:50:19.147698161 +0100
+--- runtime/doc/if_ruby.txt 2019-05-05 17:59:08.636818323 +0200
+***************
+*** 1,4 ****
+! *if_ruby.txt* For Vim version 8.1. Last change: 2018 Mar 15
+
+
+ VIM REFERENCE MANUAL by Shugo Maeda
+--- 1,4 ----
+! *if_ruby.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Shugo Maeda
+***************
+*** 14,23 ****
+ 6. rubyeval() Vim function |ruby-rubyeval|
+ 7. Dynamic loading |ruby-dynamic|
+
+- {Vi does not have any of these commands}
+ *E266* *E267* *E268* *E269* *E270* *E271* *E272* *E273*
+
+! The Ruby interface only works when Vim was compiled with the |+ruby| feature.
+
+ The home page for ruby is http://www.ruby-lang.org/. You can find links for
+ downloading Ruby there.
+--- 14,22 ----
+ 6. rubyeval() Vim function |ruby-rubyeval|
+ 7. Dynamic loading |ruby-dynamic|
+
+ *E266* *E267* *E268* *E269* *E270* *E271* *E272* *E273*
+
+! {only available when Vim was compiled with the |+ruby| feature}
+
+ The home page for ruby is http://www.ruby-lang.org/. You can find links for
+ downloading Ruby there.
+***************
+*** 248,251 ****
+ with.
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 247,250 ----
+ with.
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/if_sniff.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/if_sniff.txt 2018-07-29 14:23:36.363157576 +0200
+***************
+*** 8,11 ****
+ The SNiFF+ support was removed at patch 7.4.1433. If you want to check it out
+ sync to before that.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 8,11 ----
+ The SNiFF+ support was removed at patch 7.4.1433. If you want to check it out
+ sync to before that.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/if_tcl.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/if_tcl.txt 2019-05-05 17:59:23.388736552 +0200
+***************
+*** 1,4 ****
+! *if_tcl.txt* For Vim version 8.1. Last change: 2016 Jan 01
+
+
+ VIM REFERENCE MANUAL by Ingo Wilken
+--- 1,4 ----
+! *if_tcl.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Ingo Wilken
+***************
+*** 16,24 ****
+ 8. Examples |tcl-examples|
+ 9. Dynamic loading |tcl-dynamic|
+
+! {Vi does not have any of these commands} *E280*
+!
+! The Tcl interface only works when Vim was compiled with the |+tcl| feature.
+
+ WARNING: There are probably still some bugs. Please send bug reports,
+ comments, ideas etc to <Ingo.Wilken@informatik.uni-oldenburg.de>
+--- 16,23 ----
+ 8. Examples |tcl-examples|
+ 9. Dynamic loading |tcl-dynamic|
+
+! *E280*
+! {only available when Vim was compiled with the |+tcl| feature}
+
+ WARNING: There are probably still some bugs. Please send bug reports,
+ comments, ideas etc to <Ingo.Wilken@informatik.uni-oldenburg.de>
+***************
+*** 66,77 ****
+ possible to add or delete lines using this command.
+ If {cmd} returns an error, the command is interrupted.
+ The default for [range] is the whole file: "1,$".
+! See |tcl-var-line| and |tcl-var-lnum|. {not in Vi}
+
+ *:tclfile* *:tclf*
+ :tclf[ile] {file} Execute the Tcl script in {file}. This is the same as
+ ":tcl source {file}", but allows file name completion.
+- {not in Vi}
+
+
+ Note that Tcl objects (like variables) persist from one command to the next,
+--- 65,75 ----
+ possible to add or delete lines using this command.
+ If {cmd} returns an error, the command is interrupted.
+ The default for [range] is the whole file: "1,$".
+! See |tcl-var-line| and |tcl-var-lnum|.
+
+ *:tclfile* *:tclf*
+ :tclf[ile] {file} Execute the Tcl script in {file}. This is the same as
+ ":tcl source {file}", but allows file name completion.
+
+
+ Note that Tcl objects (like variables) persist from one command to the next,
+***************
+*** 544,547 ****
+ the shared library must match the Tcl version Vim was compiled with.
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 542,545 ----
+ the shared library must match the Tcl version Vim was compiled with.
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/indent.txt 2019-01-31 14:12:52.760076333 +0100
+--- runtime/doc/indent.txt 2019-02-21 21:42:02.738685574 +0100
+***************
+*** 1,4 ****
+! *indent.txt* For Vim version 8.1. Last change: 2018 Apr 04
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *indent.txt* For Vim version 8.1. Last change: 2019 Feb 21
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 589,596 ****
+ user manual.
+
+ If you want to write your own indent file, it must set the 'indentexpr'
+! option. Setting the 'indentkeys' option is often useful. See the
+! $VIMRUNTIME/indent directory for examples.
+
+
+ REMARKS ABOUT SPECIFIC INDENT FILES ~
+--- 589,597 ----
+ user manual.
+
+ If you want to write your own indent file, it must set the 'indentexpr'
+! option. Setting the 'indentkeys' option is often useful.
+! See the $VIMRUNTIME/indent/README.txt file for hints.
+! See the $VIMRUNTIME/indent directory for examples.
+
+
+ REMARKS ABOUT SPECIFIC INDENT FILES ~
+***************
+*** 603,616 ****
+ These conventions are not universally followed, so the Clojure indent script
+ offers a few configurable options, listed below.
+
+! If the current vim does not include searchpairpos(), the indent script falls
+ back to normal 'lisp' indenting, and the following options are ignored.
+
+ *g:clojure_maxlines*
+
+! Set maximum scan distance of searchpairpos(). Larger values trade performance
+! for correctness when dealing with very long forms. A value of 0 will scan
+! without limits.
+ >
+ " Default
+ let g:clojure_maxlines = 100
+--- 604,617 ----
+ These conventions are not universally followed, so the Clojure indent script
+ offers a few configurable options, listed below.
+
+! If the current vim does not include |searchpairpos()|, the indent script falls
+ back to normal 'lisp' indenting, and the following options are ignored.
+
+ *g:clojure_maxlines*
+
+! Set maximum scan distance of |searchpairpos()|. Larger values trade
+! performance for correctness when dealing with very long forms. A value of 0
+! will scan without limits.
+ >
+ " Default
+ let g:clojure_maxlines = 100
+***************
+*** 908,913 ****
+--- 909,933 ----
+ and 'default:' are indented at the same level than the 'switch()' to avoid
+ meaningless indentation. You can use the above option to return to the
+ traditional way.
++ -------------
++
++ *PHP_noArrowMatching*
++ By default the indent script will indent multi-line chained calls by matching
++ the position of the '->': >
++
++ $user_name_very_long->name()
++ ->age()
++ ->info();
++
++ You can revert to the classic way of indenting by setting this option to 1: >
++ :let g:PHP_noArrowMatching = 1
++
++ You will obtain the following result: >
++
++ $user_name_very_long->name()
++ ->age()
++ ->info();
++
+
+
+ PYTHON *ft-python-indent*
+***************
+*** 917,927 ****
+ that you can change the value of 'shiftwidth' later.
+
+ Indent after an open paren: >
+! let g:pyindent_open_paren = '&sw * 2'
+ Indent after a nested paren: >
+! let g:pyindent_nested_paren = '&sw'
+ Indent for a continuation line: >
+! let g:pyindent_continue = '&sw * 2'
+
+
+ R *ft-r-indent*
+--- 937,957 ----
+ that you can change the value of 'shiftwidth' later.
+
+ Indent after an open paren: >
+! let g:pyindent_open_paren = 'shiftwidth() * 2'
+ Indent after a nested paren: >
+! let g:pyindent_nested_paren = 'shiftwidth()'
+ Indent for a continuation line: >
+! let g:pyindent_continue = 'shiftwidth() * 2'
+!
+! The method uses |searchpair()| to look back for unclosed parenthesis. This
+! can sometimes be slow, thus it timeouts after 150 msec. If you notice the
+! indenting isn't correct, you can set a larger timeout in msec: >
+! let g:pyindent_searchpair_timeout = 500
+!
+! If looking back for unclosed parenthesis is still too slow, especially during
+! a copy-paste operation, or if you don't need indenting inside multi-line
+! parentheses, you can completely disable this feature: >
+! let g:pyindent_disable_parentheses_indenting = 1
+
+
+ R *ft-r-indent*
+***************
+*** 960,965 ****
+--- 990,1000 ----
+ paste(x) paste(x)
+ } }
+ <
++ The code will be indented after lines that match the pattern
++ `'\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\)\s*$'`. If you want indentation after
++ lines that match a different pattern, you should set the appropriate value of
++ `r_indent_op_pattern` in your |vimrc|.
++
+
+ SHELL *ft-sh-indent*
+
+***************
+*** 1010,1016 ****
+ indenting width (default is 'shiftwidth'): >
+
+ let b:verilog_indent_width = 4
+! let b:verilog_indent_width = &sw * 2
+
+ In addition, you can turn the verbose mode for debug issue: >
+
+--- 1045,1051 ----
+ indenting width (default is 'shiftwidth'): >
+
+ let b:verilog_indent_width = 4
+! let b:verilog_indent_width = shiftwidth() * 2
+
+ In addition, you can turn the verbose mode for debug issue: >
+
+***************
+*** 1133,1141 ****
+ For indenting Vim scripts there is one variable that specifies the amount of
+ indent for a continuation line, a line that starts with a backslash: >
+
+! :let g:vim_indent_cont = &sw * 3
+
+ Three times shiftwidth is the default value.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1168,1176 ----
+ For indenting Vim scripts there is one variable that specifies the amount of
+ indent for a continuation line, a line that starts with a backslash: >
+
+! :let g:vim_indent_cont = shiftwidth() * 3
+
+ Three times shiftwidth is the default value.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/index.txt 2019-05-05 15:02:26.176319819 +0200
+--- runtime/doc/index.txt 2019-05-05 14:56:42.134251046 +0200
+***************
+*** 1,4 ****
+! *index.txt* For Vim version 8.1. Last change: 2018 Apr 19
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *index.txt* For Vim version 8.1. Last change: 2019 Apr 24
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 17,25 ****
+ 2.3. Square bracket commands |[|
+ 2.4. Commands starting with 'g' |g|
+ 2.5. Commands starting with 'z' |z|
+ 3. Visual mode |visual-index|
+ 4. Command-line editing |ex-edit-index|
+! 5. EX commands |ex-cmd-index|
+
+ For an overview of options see help.txt |option-list|.
+ For an overview of built-in functions see |functions|.
+--- 17,27 ----
+ 2.3. Square bracket commands |[|
+ 2.4. Commands starting with 'g' |g|
+ 2.5. Commands starting with 'z' |z|
++ 2.6. Operator-pending mode |operator-pending-index|
+ 3. Visual mode |visual-index|
+ 4. Command-line editing |ex-edit-index|
+! 5. Terminal-Job mode |terminal-job-index|
+! 6. EX commands |ex-cmd-index|
+
+ For an overview of options see help.txt |option-list|.
+ For an overview of built-in functions see |functions|.
+***************
+*** 166,171 ****
+--- 168,187 ----
+ |i_CTRL-X_s| CTRL-X s spelling suggestions
+ {not available when compiled without the |+insert_expand| feature}
+
++ commands in completion mode (see |popupmenu-keys|)
++
++ |complete_CTRL-E| CTRL-E stop completion and go back to original text
++ |complete_CTRL-Y| CTRL-Y accept selected match and stop completion
++ CTRL-L insert one character from the current match
++ <CR> insert currently selected match
++ <BS> delete one character and redo search
++ CTRL-H same as <BS>
++ <Up> select the previous match
++ <Down> select the next match
++ <PageUp> select a match several entries back
++ <PageDown> select a match several entries forward
++ other stop completion and insert the typed character
++
+ ==============================================================================
+ 2. Normal mode *normal-index*
+
+***************
+*** 528,537 ****
+ |CTRL-W_CTRL-]| CTRL-W CTRL-] same as "CTRL-W ]"
+ |CTRL-W_CTRL-^| CTRL-W CTRL-^ same as "CTRL-W ^"
+ |CTRL-W_CTRL-_| CTRL-W CTRL-_ same as "CTRL-W _"
+- |CTRL-W_quote| CTRL-W " terminal window: paste register
+ |CTRL-W_+| CTRL-W + increase current window height N lines
+ |CTRL-W_-| CTRL-W - decrease current window height N lines
+- |CTRL-W_.| CTRL-W . terminal window: type CTRL-W
+ |CTRL-W_:| CTRL-W : same as |:|, edit a command line
+ |CTRL-W_<| CTRL-W < decrease current window width N columns
+ |CTRL-W_=| CTRL-W = make all windows the same height & width
+--- 544,551 ----
+***************
+*** 540,546 ****
+ |CTRL-W_J| CTRL-W J move current window to the very bottom
+ |CTRL-W_K| CTRL-W K move current window to the very top
+ |CTRL-W_L| CTRL-W L move current window to the far right
+- |CTRL-W_N| CTRL-W N terminal window: go to Terminal Normal mode
+ |CTRL-W_P| CTRL-W P go to preview window
+ |CTRL-W_R| CTRL-W R rotate windows upwards N times
+ |CTRL-W_S| CTRL-W S same as "CTRL-W s"
+--- 554,559 ----
+***************
+*** 570,575 ****
+--- 583,590 ----
+ |CTRL-W_gF| CTRL-W g F edit file name under the cursor in a new
+ tab page and jump to the line number
+ following the file name.
++ |CTRL-W_gt| CTRL-W g t same as `gt`: go to next tab page
++ |CTRL-W_gT| CTRL-W g T same as `gT`: go to previous tab page
+ |CTRL-W_h| CTRL-W h go to Nth left window (stop at first window)
+ |CTRL-W_i| CTRL-W i split window and jump to declaration of
+ identifier under the cursor
+***************
+*** 847,852 ****
+--- 862,871 ----
+ position the cursor at the start (left
+ side) of the screen
+ |zt| zt redraw, cursor line at top of window
++ |zuw| zuw undo |zw|
++ |zug| zug undo |zg|
++ |zuW| zuW undo |zW|
++ |zuG| zuG undo |zG|
+ |zv| zv open enough folds to view the cursor line
+ |zw| zw mark word as wrong (bad) spelled word
+ |zx| zx re-apply 'foldlevel' and do "zv"
+***************
+*** 855,860 ****
+--- 874,890 ----
+ |z<Right>| z<Right> same as "zl"
+
+ ==============================================================================
++ 2.6 Operator-pending mode *operator-pending-index*
++
++ These can be used after an operator, but before a {motion} has been entered.
++
++ tag char action in Operator-pending mode ~
++ -----------------------------------------------------------------------
++ |o_v| v force operator to work characterwise
++ |o_V| V force operator to work linewise
++ |o_CTRL-V| CTRL-V force operator to work blockwise
++
++ ==============================================================================
+ 3. Visual mode *visual-index*
+
+ Most commands in Visual mode are the same as in Normal mode. The ones listed
+***************
+*** 976,982 ****
+ "Completion" below refers to context-sensitive completion. It will complete
+ file names, tags, commands etc. as appropriate.
+
+! tag command action in Command-line editing mode ~
+ ------------------------------------------------------------------------------
+ CTRL-@ not used
+ |c_CTRL-A| CTRL-A do completion on the pattern in front of the
+--- 1006,1012 ----
+ "Completion" below refers to context-sensitive completion. It will complete
+ file names, tags, commands etc. as appropriate.
+
+! tag command action in Command-line editing mode ~
+ ------------------------------------------------------------------------------
+ CTRL-@ not used
+ |c_CTRL-A| CTRL-A do completion on the pattern in front of the
+***************
+*** 1016,1025 ****
+ command-line from history.
+ |c_CTRL-Q| CTRL-Q same as CTRL-V, unless it's used for terminal
+ control flow
+! |c_CTRL-R| CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A}
+ insert the contents of a register or object
+ under the cursor as if typed
+! |c_CTRL-R_CTRL-R| CTRL-R CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A}
+ insert the contents of a register or object
+ under the cursor literally
+ CTRL-S (used for terminal control flow)
+--- 1046,1056 ----
+ command-line from history.
+ |c_CTRL-Q| CTRL-Q same as CTRL-V, unless it's used for terminal
+ control flow
+! |c_CTRL-R| CTRL-R {regname}
+ insert the contents of a register or object
+ under the cursor as if typed
+! |c_CTRL-R_CTRL-R| CTRL-R CTRL-R {regname}
+! |c_CTRL-R_CTRL-O| CTRL-R CTRL-O {regname}
+ insert the contents of a register or object
+ under the cursor literally
+ CTRL-S (used for terminal control flow)
+***************
+*** 1066,1081 ****
+ |c_<Insert>| <Insert> toggle insert/overstrike mode
+ |c_<LeftMouse>| <LeftMouse> cursor at mouse click
+
+ You found it, Arthur! *holy-grail* *:smile*
+
+ ==============================================================================
+! 5. EX commands *ex-cmd-index* *:index*
+
+ This is a brief but complete listing of all the ":" commands, without
+ mentioning any arguments. The optional part of the command name is inside [].
+ The commands are sorted on the non-optional part of their name.
+
+! tag command action ~
+ ------------------------------------------------------------------------------
+ |:!| :! filter lines or execute an external command
+ |:!!| :!! repeat last ":!" command
+--- 1097,1133 ----
+ |c_<Insert>| <Insert> toggle insert/overstrike mode
+ |c_<LeftMouse>| <LeftMouse> cursor at mouse click
+
++ ==============================================================================
++ 5. Terminal-Job mode *terminal-job-index*
++
++ Most Normal mode commands except for window commands (|CTRL-W|) do not work in
++ a terminal window. Switch to Terminal-Normal mode to use them.
++ This assumes 'termwinkey' is not set.
++
++ tag char action in Terminal-Job mode ~
++ -----------------------------------------------------------------------
++ |t_CTRL-\_CTRL-N| CTRL-\ CTRL-N switch to Terminal-Normal mode
++ |t_CTRL-W_N| CTRL-W N switch to Terminal-Normal mode
++ |t_CTRL-W_:| CTRL-W : enter an Ex command
++ |t_CTRL-W_.| CTRL-W . type CTRL-W in the terminal
++ CTRL-W CTRL-\ send a CTRL-\ to the job in the terminal
++ |t_CTRL-W_quote| CTRL-W " {0-9a-z"%#*:=}
++ paste register in the terminal
++ |t_CTRL-W_CTRL-C| CTRL-W CTRL-C forcefully ends the job
++ |t_CTRL-W_CTRL-W| CTRL-W CTRL-W move focus to the next window
++ |t_CTRL-W_gt| CTRL-W gt go to next tabpage, same as `gt`
++ |t_CTRL-W_gT| CTRL-W gT go to previous tabpage, same as `gT`
++
+ You found it, Arthur! *holy-grail* *:smile*
+
+ ==============================================================================
+! 6. EX commands *ex-cmd-index* *:index*
+
+ This is a brief but complete listing of all the ":" commands, without
+ mentioning any arguments. The optional part of the command name is inside [].
+ The commands are sorted on the non-optional part of their name.
+
+! tag command action ~
+ ------------------------------------------------------------------------------
+ |:!| :! filter lines or execute an external command
+ |:!!| :!! repeat last ":!" command
+***************
+*** 1465,1472 ****
+ |:recover| :rec[over] recover a file from a swap file
+ |:redo| :red[o] redo one undone change
+ |:redir| :redi[r] redirect messages to a file or register
+! |:redraw| :redr[aw] force a redraw of the display
+! |:redrawstatus| :redraws[tatus] force a redraw of the status line(s)
+ |:registers| :reg[isters] display the contents of registers
+ |:resize| :res[ize] change current window height
+ |:retab| :ret[ab] change tab size
+--- 1517,1525 ----
+ |:recover| :rec[over] recover a file from a swap file
+ |:redo| :red[o] redo one undone change
+ |:redir| :redi[r] redirect messages to a file or register
+! |:redraw| :redr[aw] force a redraw of the display
+! |:redrawstatus| :redraws[tatus] force a redraw of the status line(s)
+! |:redrawtabline| :redrawt[abline] force a redraw of the tabline
+ |:registers| :reg[isters] display the contents of registers
+ |:resize| :res[ize] change current window height
+ |:retab| :ret[ab] change tab size
+***************
+*** 1506,1512 ****
+ |:sbrewind| :sbr[ewind] split window and go to first file in the
+ buffer list
+ |:scriptnames| :scr[iptnames] list names of all sourced Vim scripts
+! |:scriptencoding| :scripte[ncoding] encoding used in sourced Vim script
+ |:scscope| :scs[cope] split window and execute cscope command
+ |:set| :se[t] show or set options
+ |:setfiletype| :setf[iletype] set 'filetype', unless it was set already
+--- 1559,1566 ----
+ |:sbrewind| :sbr[ewind] split window and go to first file in the
+ buffer list
+ |:scriptnames| :scr[iptnames] list names of all sourced Vim scripts
+! |:scriptencoding| :scripte[ncoding] encoding used in sourced Vim script
+! |:scriptversion| :scriptv[ersion] version of Vim script used
+ |:scscope| :scs[cope] split window and execute cscope command
+ |:set| :se[t] show or set options
+ |:setfiletype| :setf[iletype] set 'filetype', unless it was set already
+***************
+*** 1653,1659 ****
+ argument list
+ |:wq| :wq write to a file and quit window or Vim
+ |:wqall| :wqa[ll] write all changed buffers and quit Vim
+- |:wsverb| :ws[verb] pass the verb to workshop over IPC
+ |:wundo| :wu[ndo] write undo information to a file
+ |:wviminfo| :wv[iminfo] write to viminfo file
+ |:xit| :x[it] write if buffer changed and quit window or Vim
+--- 1707,1712 ----
+*** ../vim-8.1.1279/runtime/doc/insert.txt 2019-04-06 13:45:51.564756966 +0200
+--- runtime/doc/insert.txt 2019-05-05 17:42:43.198237570 +0200
+***************
+*** 1,4 ****
+! *insert.txt* For Vim version 8.1. Last change: 2018 Feb 10
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *insert.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 62,68 ****
+ CTRL-@ Insert previously inserted text and stop insert. {Vi: only
+ when typed as first char, only up to 128 chars}
+ *i_CTRL-A*
+! CTRL-A Insert previously inserted text. {not in Vi}
+
+ *i_CTRL-H* *i_<BS>* *i_BS*
+ <BS> or CTRL-H Delete the character before the cursor (see |i_backspacing|
+--- 62,68 ----
+ CTRL-@ Insert previously inserted text and stop insert. {Vi: only
+ when typed as first char, only up to 128 chars}
+ *i_CTRL-A*
+! CTRL-A Insert previously inserted text.
+
+ *i_CTRL-H* *i_<BS>* *i_BS*
+ <BS> or CTRL-H Delete the character before the cursor (see |i_backspacing|
+***************
+*** 75,81 ****
+ "eol", delete the <EOL>; the next line is appended after the
+ current one.
+ See |:fixdel| if your <Del> key does not do what you want.
+- {not in Vi}
+ *i_CTRL-W*
+ CTRL-W Delete the word before the cursor (see |i_backspacing| about
+ joining lines). See the section "word motions",
+--- 75,80 ----
+***************
+*** 102,111 ****
+ key, the code for that key is inserted in <> form. For
+ example, the string "<S-Space>" can be entered by typing
+ <C-K><S-Space> (two keys). Neither char is considered for
+! mapping. {not in Vi}
+
+! CTRL-N Find next keyword (see |i_CTRL-N|). {not in Vi}
+! CTRL-P Find previous keyword (see |i_CTRL-P|). {not in Vi}
+
+ CTRL-R {0-9a-z"%#*+:.-=} *i_CTRL-R*
+ Insert the contents of a register. Between typing CTRL-R and
+--- 101,110 ----
+ key, the code for that key is inserted in <> form. For
+ example, the string "<S-Space>" can be entered by typing
+ <C-K><S-Space> (two keys). Neither char is considered for
+! mapping.
+
+! CTRL-N Find next keyword (see |i_CTRL-N|).
+! CTRL-P Find previous keyword (see |i_CTRL-P|).
+
+ CTRL-R {0-9a-z"%#*+:.-=} *i_CTRL-R*
+ Insert the contents of a register. Between typing CTRL-R and
+***************
+*** 142,148 ****
+ converted to a String.
+ When append() or setline() is invoked the undo
+ sequence will be broken.
+! See |registers| about registers. {not in Vi}
+
+ CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
+ Insert the contents of a register. Works like using a single
+--- 141,147 ----
+ converted to a String.
+ When append() or setline() is invoked the undo
+ sequence will be broken.
+! See |registers| about registers.
+
+ CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
+ Insert the contents of a register. Works like using a single
+***************
+*** 154,160 ****
+ < Options 'textwidth', 'formatoptions', etc. still apply. If
+ you also want to avoid these, use CTRL-R CTRL-O, see below.
+ The '.' register (last inserted text) is still inserted as
+! typed. {not in Vi}
+
+ CTRL-R CTRL-O {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-O*
+ Insert the contents of a register literally and don't
+--- 153,159 ----
+ < Options 'textwidth', 'formatoptions', etc. still apply. If
+ you also want to avoid these, use CTRL-R CTRL-O, see below.
+ The '.' register (last inserted text) is still inserted as
+! typed.
+
+ CTRL-R CTRL-O {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-O*
+ Insert the contents of a register literally and don't
+***************
+*** 163,176 ****
+ insert the text above the current line, like with `P`.
+ Does not replace characters!
+ The '.' register (last inserted text) is still inserted as
+! typed. {not in Vi}
+
+ CTRL-R CTRL-P {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-P*
+ Insert the contents of a register literally and fix the
+ indent, like |[<MiddleMouse>|.
+ Does not replace characters!
+ The '.' register (last inserted text) is still inserted as
+! typed. {not in Vi}
+
+ *i_CTRL-T*
+ CTRL-T Insert one shiftwidth of indent at the start of the current
+--- 162,175 ----
+ insert the text above the current line, like with `P`.
+ Does not replace characters!
+ The '.' register (last inserted text) is still inserted as
+! typed.
+
+ CTRL-R CTRL-P {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-P*
+ Insert the contents of a register literally and fix the
+ indent, like |[<MiddleMouse>|.
+ Does not replace characters!
+ The '.' register (last inserted text) is still inserted as
+! typed.
+
+ *i_CTRL-T*
+ CTRL-T Insert one shiftwidth of indent at the start of the current
+***************
+*** 206,217 ****
+
+ CTRL-X Enter CTRL-X mode. This is a sub-mode where commands can
+ be given to complete words or scroll the window. See
+! |i_CTRL-X| and |ins-completion|. {not in Vi}
+
+ *i_CTRL-E*
+! CTRL-E Insert the character which is below the cursor. {not in Vi}
+ *i_CTRL-Y*
+! CTRL-Y Insert the character which is above the cursor. {not in Vi}
+ Note that for CTRL-E and CTRL-Y 'textwidth' is not used, to be
+ able to copy characters from a long line.
+
+--- 205,216 ----
+
+ CTRL-X Enter CTRL-X mode. This is a sub-mode where commands can
+ be given to complete words or scroll the window. See
+! |i_CTRL-X| and |ins-completion|.
+
+ *i_CTRL-E*
+! CTRL-E Insert the character which is below the cursor.
+ *i_CTRL-Y*
+! CTRL-Y Insert the character which is above the cursor.
+ Note that for CTRL-E and CTRL-Y 'textwidth' is not used, to be
+ able to copy characters from a long line.
+
+***************
+*** 228,234 ****
+ is set.
+ Please refer to |rileft.txt| for more information about
+ right-to-left mode.
+- {not in Vi}
+ Only if compiled with the |+rightleft| feature.
+
+ *i_CTRL-^*
+--- 227,232 ----
+***************
+*** 248,261 ****
+ The language mappings are normally used to type characters
+ that are different from what the keyboard produces. The
+ 'keymap' option can be used to install a whole number of them.
+- {not in Vi}
+
+ *i_CTRL-]*
+! CTRL-] Trigger abbreviation, without inserting a character. {not in
+! Vi}
+
+ *i_<Insert>*
+! <Insert> Toggle between Insert and Replace mode. {not in Vi}
+ -----------------------------------------------------------------------
+
+ *i_backspacing*
+--- 246,257 ----
+ The language mappings are normally used to type characters
+ that are different from what the keyboard produces. The
+ 'keymap' option can be used to install a whole number of them.
+
+ *i_CTRL-]*
+! CTRL-] Trigger abbreviation, without inserting a character.
+
+ *i_<Insert>*
+! <Insert> Toggle between Insert and Replace mode.
+ -----------------------------------------------------------------------
+
+ *i_backspacing*
+***************
+*** 379,386 ****
+ CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L*
+ CTRL-G u break undo sequence, start new change *i_CTRL-G_u*
+ CTRL-G U don't break undo with next left/right cursor *i_CTRL-G_U*
+! movement (but only if the cursor stays
+! within same the line)
+ -----------------------------------------------------------------------
+
+ Note: If the cursor keys take you out of Insert mode, check the 'noesckeys'
+--- 375,382 ----
+ CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L*
+ CTRL-G u break undo sequence, start new change *i_CTRL-G_u*
+ CTRL-G U don't break undo with next left/right cursor *i_CTRL-G_U*
+! movement, if the cursor stays within
+! same the line
+ -----------------------------------------------------------------------
+
+ Note: If the cursor keys take you out of Insert mode, check the 'noesckeys'
+***************
+*** 434,444 ****
+
+ This makes it possible to use the cursor keys in Insert mode, without breaking
+ the undo sequence and therefore using |.| (redo) will work as expected.
+! Also entering a text like (with the "(" mapping from above): >
+
+ Lorem ipsum (dolor
+
+! will be repeatable by the |.|to the expected
+
+ Lorem ipsum (dolor)
+
+--- 430,440 ----
+
+ This makes it possible to use the cursor keys in Insert mode, without breaking
+ the undo sequence and therefore using |.| (redo) will work as expected.
+! Also entering a text like (with the "(" mapping from above):
+
+ Lorem ipsum (dolor
+
+! will be repeatable by using |.| to the expected
+
+ Lorem ipsum (dolor)
+
+***************
+*** 519,533 ****
+ character is replaced with several spaces. The result of this is that the
+ number of characters in the line increases. Backspacing will delete one
+ space at a time. The original character will be put back for only one space
+! that you backspace over (the last one). {Vi does not have the 'expandtab'
+! option}
+
+ *ins-smarttab*
+ When the 'smarttab' option is on, a <Tab> inserts 'shiftwidth' positions at
+ the beginning of a line and 'tabstop' positions in other places. This means
+ that often spaces instead of a <Tab> character are inserted. When 'smarttab'
+ is off, a <Tab> always inserts 'tabstop' positions, and 'shiftwidth' is only
+! used for ">>" and the like. {not in Vi}
+
+ *ins-softtabstop*
+ When the 'softtabstop' option is non-zero, a <Tab> inserts 'softtabstop'
+--- 515,528 ----
+ character is replaced with several spaces. The result of this is that the
+ number of characters in the line increases. Backspacing will delete one
+ space at a time. The original character will be put back for only one space
+! that you backspace over (the last one).
+
+ *ins-smarttab*
+ When the 'smarttab' option is on, a <Tab> inserts 'shiftwidth' positions at
+ the beginning of a line and 'tabstop' positions in other places. This means
+ that often spaces instead of a <Tab> character are inserted. When 'smarttab'
+ is off, a <Tab> always inserts 'tabstop' positions, and 'shiftwidth' is only
+! used for ">>" and the like.
+
+ *ins-softtabstop*
+ When the 'softtabstop' option is non-zero, a <Tab> inserts 'softtabstop'
+***************
+*** 567,580 ****
+ several spaces. The result of this is that the number of characters in the
+ line increases. Backspacing will delete one space at a time. The original
+ character will be put back for only one space that you backspace over (the
+! last one). {Vi does not have the 'expandtab' option}
+
+ ==============================================================================
+ 6. Virtual Replace mode *vreplace-mode* *Virtual-Replace-mode*
+
+ Enter Virtual Replace mode with the "gR" command in normal mode.
+ {not available when compiled without the |+vreplace| feature}
+- {Vi does not have Virtual Replace mode}
+
+ Virtual Replace mode is similar to Replace mode, but instead of replacing
+ actual characters in the file, you are replacing screen real estate, so that
+--- 562,574 ----
+ several spaces. The result of this is that the number of characters in the
+ line increases. Backspacing will delete one space at a time. The original
+ character will be put back for only one space that you backspace over (the
+! last one).
+
+ ==============================================================================
+ 6. Virtual Replace mode *vreplace-mode* *Virtual-Replace-mode*
+
+ Enter Virtual Replace mode with the "gR" command in normal mode.
+ {not available when compiled without the |+vreplace| feature}
+
+ Virtual Replace mode is similar to Replace mode, but instead of replacing
+ actual characters in the file, you are replacing screen real estate, so that
+***************
+*** 1079,1085 ****
+ leading text is changed.
+
+ If you want to suppress the warning message for an empty result, return
+! v:none. This is useful to implement asynchronous completion with complete().
+
+ Other items are ignored.
+
+--- 1073,1080 ----
+ leading text is changed.
+
+ If you want to suppress the warning message for an empty result, return
+! |v:none|. This is useful to implement asynchronous completion with
+! |complete()|.
+
+ Other items are ignored.
+
+***************
+*** 1543,1549 ****
+
+ If you wish non-filetype syntax items to also be included, you can use a
+ regular expression syntax (added in version 13.0 of
+! autoload\syntaxcomplete.vim) to add items. Looking at the output from
+ ":syntax list" while editing a PHP file I can see some of these entries: >
+ htmlArg,htmlTag,htmlTagName,javaScriptStatement,javaScriptGlobalObjects
+
+--- 1538,1544 ----
+
+ If you wish non-filetype syntax items to also be included, you can use a
+ regular expression syntax (added in version 13.0 of
+! autoload/syntaxcomplete.vim) to add items. Looking at the output from
+ ":syntax list" while editing a PHP file I can see some of these entries: >
+ htmlArg,htmlTag,htmlTagName,javaScriptStatement,javaScriptGlobalObjects
+
+***************
+*** 1806,1812 ****
+ the last blank.
+
+ *gI*
+! gI Insert text in column 1 [count] times. {not in Vi}
+
+ *gi*
+ gi Insert text in the same position as where Insert mode
+--- 1801,1807 ----
+ the last blank.
+
+ *gI*
+! gI Insert text in column 1 [count] times.
+
+ *gi*
+ gi Insert text in the same position as where Insert mode
+***************
+*** 1817,1823 ****
+ but NOT for inserted/deleted characters.
+ When the |:keepjumps| command modifier is used the |'^|
+ mark won't be changed.
+- {not in Vi}
+
+ *o*
+ o Begin a new line below the cursor and insert text,
+--- 1812,1817 ----
+***************
+*** 1884,1890 ****
+ script, the insertion only starts after the function
+ or script is finished.
+ This command does not work from |:normal|.
+- {not in Vi}
+
+ *:stopi* *:stopinsert*
+ :stopi[nsert] Stop Insert mode as soon as possible. Works like
+--- 1878,1883 ----
+***************
+*** 1901,1912 ****
+ Note that when using this command in a function or
+ script that the replacement will only start after
+ the function or script is finished.
+- {not in Vi}
+
+ *:startgreplace*
+ :startg[replace][!] Just like |:startreplace|, but use Virtual Replace
+ mode, like with |gR|.
+- {not in Vi}
+
+ ==============================================================================
+ 10. Inserting a file *inserting-file*
+--- 1894,1903 ----
+***************
+*** 2013,2016 ****
+ [READ ERRORS] not all of the file could be read
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 2004,2007 ----
+ [READ ERRORS] not all of the file could be read
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/intro.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/intro.txt 2019-05-05 17:43:22.626016554 +0200
+***************
+*** 1,4 ****
+! *intro.txt* For Vim version 8.1. Last change: 2018 Jan 24
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *intro.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 34,42 ****
+ is not located in the default place. You can jump to subjects like with tags:
+ Use CTRL-] to jump to a subject under the cursor, use CTRL-T to jump back.
+
+! Throughout this manual the differences between Vi and Vim are mentioned in
+! curly braces, like this: {Vi does not have on-line help}. See |vi_diff.txt|
+! for a summary of the differences between Vim and Vi.
+
+ This manual refers to Vim on various machines. There may be small differences
+ between different computers and terminals. Besides the remarks given in this
+--- 34,40 ----
+ is not located in the default place. You can jump to subjects like with tags:
+ Use CTRL-] to jump to a subject under the cursor, use CTRL-T to jump back.
+
+! The differences between Vi and Vim are mentioned in |vi_diff.txt|.
+
+ This manual refers to Vim on various machines. There may be small differences
+ between different computers and terminals. Besides the remarks given in this
+***************
+*** 52,80 ****
+ there. For beginners, there is a hands-on |tutor|. To learn using Vim, read
+ the user manual |usr_toc.txt|.
+
+! *book*
+! There are many books on Vi that contain a section for beginners. There are
+! two books I can recommend:
+!
+! "Vim - Vi Improved" by Steve Oualline
+!
+! This is the very first book completely dedicated to Vim. It is very good for
+! beginners. The most often used commands are explained with pictures and
+! examples. The less often used commands are also explained, the more advanced
+! features are summarized. There is a comprehensive index and a quick
+! reference. Parts of this book have been included in the user manual
+! |frombook|.
+! Published by New Riders Publishing. ISBN: 0735710015
+! For more information try one of these:
+! http://iccf-holland.org/click5.html
+! http://www.vim.org/iccf/click5.html
+!
+! "Learning the Vi editor" by Linda Lamb and Arnold Robbins
+!
+! This is a book about Vi that includes a chapter on Vim (in the sixth edition).
+! The first steps in Vi are explained very well. The commands that Vim adds are
+! only briefly mentioned. There is also a German translation.
+! Published by O'Reilly. ISBN: 1-56592-426-6.
+
+ ==============================================================================
+ 2. Vim on the internet *internet*
+--- 50,60 ----
+ there. For beginners, there is a hands-on |tutor|. To learn using Vim, read
+ the user manual |usr_toc.txt|.
+
+! *book* *books*
+! Most books on Vi and Vim contain a section for beginners. Others are spending
+! more words on specific functionality. You can find an overview of Vim books
+! here:
+! http://iccf-holland.org/vim_books.html
+
+ ==============================================================================
+ 2. Vim on the internet *internet*
+***************
+*** 84,92 ****
+ contain links to the most recent version of Vim. The FAQ is a list of
+ Frequently Asked Questions. Read this if you have problems.
+
+! Vim home page: http://www.vim.org/
+! Vim FAQ: http://vimdoc.sf.net/
+! Downloading: ftp://ftp.vim.org/pub/vim/MIRRORS
+
+
+ Usenet News group where Vim is discussed: *news* *usenet*
+--- 64,72 ----
+ contain links to the most recent version of Vim. The FAQ is a list of
+ Frequently Asked Questions. Read this if you have problems.
+
+! Vim home page: https://www.vim.org/
+! Vim FAQ: https://vimhelp.appspot.com/vim_faq.txt.html
+! Downloading: https://www.vim.org/download.php
+
+
+ Usenet News group where Vim is discussed: *news* *usenet*
+***************
+*** 114,123 ****
+ See http://www.vim.org/maillist.php for the latest information.
+
+ NOTE:
+ - You can only send messages to these lists if you have subscribed!
+ - You need to send the messages from the same location as where you subscribed
+ from (to avoid spam mail).
+- - Maximum message size is 40000 characters.
+
+ *subscribe-maillist*
+ If you want to join, send a message to
+--- 94,105 ----
+ See http://www.vim.org/maillist.php for the latest information.
+
+ NOTE:
++ - Anyone can see the archive, e.g. on Google groups. Search this if you have
++ questions.
+ - You can only send messages to these lists if you have subscribed!
++ - The first message is moderated, thus it may take a few hours to show up.
+ - You need to send the messages from the same location as where you subscribed
+ from (to avoid spam mail).
+
+ *subscribe-maillist*
+ If you want to join, send a message to
+***************
+*** 150,156 ****
+ Where reproduce.vim is a script that reproduces the problem. Try different
+ machines, if relevant (is this an MS-Windows specific bug perhaps?).
+
+! Send me patches if you can!
+
+ It will help to include information about the version of Vim you are using and
+ your setup. You can get the information with this command: >
+--- 132,141 ----
+ Where reproduce.vim is a script that reproduces the problem. Try different
+ machines, if relevant (is this an MS-Windows specific bug perhaps?).
+
+! Send me patches if you can! If you create a pull request on
+! https://github.com/vim/vim then the automated checks will run and report any
+! obvious problems. But you can also send the patch by email (use an attachment
+! to avoid white space changes).
+
+ It will help to include information about the version of Vim you are using and
+ your setup. You can get the information with this command: >
+***************
+*** 189,195 ****
+ ==============================================================================
+ 3. Credits *credits* *author* *Bram* *Moolenaar*
+
+! Most of Vim was written by Bram Moolenaar <Bram@vim.org>.
+
+ Parts of the documentation come from several Vi manuals, written by:
+ W.N. Joy
+--- 174,180 ----
+ ==============================================================================
+ 3. Credits *credits* *author* *Bram* *Moolenaar*
+
+! Most of Vim was created by Bram Moolenaar <Bram@vim.org>.
+
+ Parts of the documentation come from several Vi manuals, written by:
+ W.N. Joy
+***************
+*** 268,273 ****
+--- 253,259 ----
+ Ken Takata fixes and features
+ Kazunobu Kuriyama GTK 3
+ Christian Brabandt many fixes, features, user support, etc.
++ Yegappan Lakshmanan many quickfix features
+
+ I wish to thank all the people that sent me bug reports and suggestions. The
+ list is too long to mention them all here. Vim would not be the same without
+***************
+*** 280,288 ****
+ Vi "the original". Without further remarks this is the version
+ of Vi that appeared in Sun OS 4.x. ":version" returns
+ "Version 3.7, 6/7/85". Sometimes other versions are referred
+! to. Only runs under Unix. Source code only available with a
+! license. More information on Vi can be found through:
+! http://vi-editor.org [doesn't currently work...]
+ *Posix*
+ Posix From the IEEE standard 1003.2, Part 2: Shell and utilities.
+ Generally known as "Posix". This is a textual description of
+--- 266,274 ----
+ Vi "the original". Without further remarks this is the version
+ of Vi that appeared in Sun OS 4.x. ":version" returns
+ "Version 3.7, 6/7/85". Sometimes other versions are referred
+! to. Only runs under Unix. Source code is now available under a
+! BSD-style license. More information on Vi can be found through:
+! http://ex-vi.sourceforge.net/
+ *Posix*
+ Posix From the IEEE standard 1003.2, Part 2: Shell and utilities.
+ Generally known as "Posix". This is a textual description of
+***************
+*** 297,305 ****
+ Source code is freely available.
+ *Elvis*
+ Elvis Another Vi clone, made by Steve Kirkendall. Very compact but isn't
+! as flexible as Vim.
+! The version used is 2.1. It is still being developed. Source code is
+! freely available.
+
+ ==============================================================================
+ 4. Notation *notation*
+--- 283,296 ----
+ Source code is freely available.
+ *Elvis*
+ Elvis Another Vi clone, made by Steve Kirkendall. Very compact but isn't
+! as flexible as Vim. Development has stalled, Elvis has left the
+! building! Source code is freely available.
+! *Neovim*
+! Neovim A Vim clone. Forked the Vim source in 2014 and went a different way.
+! Very much bound to github and has many more dependencies, making
+! development more complex and limiting portability. Code has been
+! refactored, resulting in patches not being exchangeable with Vim.
+! Supports a remote GUI and integration with scripting languages.
+
+ ==============================================================================
+ 4. Notation *notation*
+***************
+*** 595,603 ****
+ If the 'showmode' option is on "-- VREPLACE --" is
+ shown at the bottom of the window.
+
+! Insert Normal mode Entered when CTRL-O given in Insert mode. This is
+! like Normal mode, but after executing one command Vim
+! returns to Insert mode.
+ If the 'showmode' option is on "-- (insert) --" is
+ shown at the bottom of the window.
+
+--- 586,594 ----
+ If the 'showmode' option is on "-- VREPLACE --" is
+ shown at the bottom of the window.
+
+! Insert Normal mode Entered when CTRL-O is typed in Insert mode (see
+! |i_CTRL-O|). This is like Normal mode, but after
+! executing one command Vim returns to Insert mode.
+ If the 'showmode' option is on "-- (insert) --" is
+ shown at the bottom of the window.
+
+***************
+*** 710,716 ****
+ like typing ":" commands after another. All command
+ line editing, completion etc. is available.
+ Use the ":vi" command |:visual| to exit "Ex" mode.
+- {not in Vi}
+
+ ==============================================================================
+ 7. The window contents *window-contents*
+--- 701,706 ----
+***************
+*** 906,909 ****
+ 6. ~
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 896,899 ----
+ 6. ~
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/map.txt 2019-04-25 21:27:40.566186854 +0200
+--- runtime/doc/map.txt 2019-05-05 17:43:30.013975122 +0200
+***************
+*** 1,4 ****
+! *map.txt* For Vim version 8.1. Last change: 2018 May 13
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *map.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 76,82 ****
+ Map the key sequence {lhs} to {rhs} for the modes
+ where the map command applies. Disallow mapping of
+ {rhs}, to avoid nested and recursive mappings. Often
+! used to redefine a command. {not in Vi}
+
+
+ :unm[ap] {lhs} |mapmode-nvo| *:unm* *:unmap*
+--- 76,82 ----
+ Map the key sequence {lhs} to {rhs} for the modes
+ where the map command applies. Disallow mapping of
+ {rhs}, to avoid nested and recursive mappings. Often
+! used to redefine a command.
+
+
+ :unm[ap] {lhs} |mapmode-nvo| *:unm* *:unmap*
+***************
+*** 110,116 ****
+ :cmapc[lear] |mapmode-c| *:cmapc* *:cmapclear*
+ :tmapc[lear] |mapmode-t| *:tmapc* *:tmapclear*
+ Remove ALL mappings for the modes where the map
+! command applies. {not in Vi}
+ Use the <buffer> argument to remove buffer-local
+ mappings |:map-<buffer>|
+ Warning: This also removes the default mappings.
+--- 110,116 ----
+ :cmapc[lear] |mapmode-c| *:cmapc* *:cmapclear*
+ :tmapc[lear] |mapmode-t| *:tmapc* *:tmapclear*
+ Remove ALL mappings for the modes where the map
+! command applies.
+ Use the <buffer> argument to remove buffer-local
+ mappings |:map-<buffer>|
+ Warning: This also removes the default mappings.
+***************
+*** 143,149 ****
+ :tma[p] {lhs} |mapmode-t| *:tmap_l*
+ List the key mappings for the key sequences starting
+ with {lhs} in the modes where the map command applies.
+- {not in Vi}
+
+ These commands are used to map a key or key sequence to a string of
+ characters. You can use this to put command sequences under function keys,
+--- 143,148 ----
+***************
+*** 160,166 ****
+ that mapping won't get expanded yet, Vim is waiting for another character.
+ If you type a space, then "foo" will get inserted, plus the space. If you
+ type "a", then "bar" will get inserted.
+- {Vi does not allow ambiguous mappings}
+
+
+ 1.2 SPECIAL ARGUMENTS *:map-arguments*
+--- 159,164 ----
+***************
+*** 1016,1060 ****
+
+ *:norea* *:noreabbrev*
+ :norea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
+! same as ":ab", but no remapping for this {rhs} {not
+! in Vi}
+
+ *:ca* *:cabbrev*
+ :ca[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
+! same as ":ab", but for Command-line mode only. {not
+! in Vi}
+
+ *:cuna* *:cunabbrev*
+! :cuna[bbrev] {lhs} same as ":una", but for Command-line mode only. {not
+! in Vi}
+
+ *:cnorea* *:cnoreabbrev*
+ :cnorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
+ same as ":ab", but for Command-line mode only and no
+! remapping for this {rhs} {not in Vi}
+
+ *:ia* *:iabbrev*
+ :ia[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
+! same as ":ab", but for Insert mode only. {not in Vi}
+
+ *:iuna* *:iunabbrev*
+! :iuna[bbrev] {lhs} same as ":una", but for insert mode only. {not in
+! Vi}
+
+ *:inorea* *:inoreabbrev*
+ :inorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
+! same as ":ab", but for Insert mode only and no
+! remapping for this {rhs} {not in Vi}
+
+ *:abc* *:abclear*
+! :abc[lear] [<buffer>] Remove all abbreviations. {not in Vi}
+
+ *:iabc* *:iabclear*
+! :iabc[lear] [<buffer>] Remove all abbreviations for Insert mode. {not in Vi}
+
+ *:cabc* *:cabclear*
+! :cabc[lear] [<buffer>] Remove all abbreviations for Command-line mode. {not
+! in Vi}
+
+ *using_CTRL-V*
+ It is possible to use special characters in the rhs of an abbreviation.
+--- 1014,1053 ----
+
+ *:norea* *:noreabbrev*
+ :norea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
+! Same as ":ab", but no remapping for this {rhs}.
+
+ *:ca* *:cabbrev*
+ :ca[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
+! Same as ":ab", but for Command-line mode only.
+
+ *:cuna* *:cunabbrev*
+! :cuna[bbrev] {lhs} Same as ":una", but for Command-line mode only.
+
+ *:cnorea* *:cnoreabbrev*
+ :cnorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
+ same as ":ab", but for Command-line mode only and no
+! remapping for this {rhs}
+
+ *:ia* *:iabbrev*
+ :ia[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
+! Same as ":ab", but for Insert mode only.
+
+ *:iuna* *:iunabbrev*
+! :iuna[bbrev] {lhs} Same as ":una", but for insert mode only.
+
+ *:inorea* *:inoreabbrev*
+ :inorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
+! Same as ":ab", but for Insert mode only and no
+! remapping for this {rhs}.
+
+ *:abc* *:abclear*
+! :abc[lear] [<buffer>] Remove all abbreviations.
+
+ *:iabc* *:iabclear*
+! :iabc[lear] [<buffer>] Remove all abbreviations for Insert mode.
+
+ *:cabc* *:cabclear*
+! :cabc[lear] [<buffer>] Remove all abbreviations for Command-line mode.
+
+ *using_CTRL-V*
+ It is possible to use special characters in the rhs of an abbreviation.
+***************
+*** 1147,1154 ****
+ The |:scriptnames| command can be used to see which scripts have been sourced
+ and what their <SNR> number is.
+
+! This is all {not in Vi} and {not available when compiled without the |+eval|
+! feature}.
+
+ ==============================================================================
+ 4. User-defined commands *user-commands*
+--- 1140,1146 ----
+ The |:scriptnames| command can be used to see which scripts have been sourced
+ and what their <SNR> number is.
+
+! This is all {not available when compiled without the |+eval| feature}.
+
+ ==============================================================================
+ 4. User-defined commands *user-commands*
+***************
+*** 1391,1397 ****
+ number.
+ -count=N A count (default N) which is specified either in the line
+ number position, or as an initial argument (like |:Next|).
+! Specifying -count (without a default) acts like -count=0
+
+ Note that -range=N and -count=N are mutually exclusive - only one should be
+ specified.
+--- 1383,1389 ----
+ number.
+ -count=N A count (default N) which is specified either in the line
+ number position, or as an initial argument (like |:Next|).
+! -count acts like -count=0
+
+ Note that -range=N and -count=N are mutually exclusive - only one should be
+ specified.
+***************
+*** 1402,1415 ****
+ relate to arguments, (loaded) buffers, windows or tab pages.
+
+ Possible values are (second column is the short name used in listing):
+! -addr=lines Range of lines (this is the default)
+ -addr=arguments arg Range for arguments
+ -addr=buffers buf Range for buffers (also not loaded buffers)
+ -addr=loaded_buffers load Range for loaded buffers
+ -addr=windows win Range for windows
+ -addr=tabs tab Range for tab pages
+ -addr=quickfix qf Range for quickfix entries
+! -addr=other ? other kind of range
+
+
+ Special cases ~
+--- 1394,1409 ----
+ relate to arguments, (loaded) buffers, windows or tab pages.
+
+ Possible values are (second column is the short name used in listing):
+! -addr=lines Range of lines (this is the default for -range)
+ -addr=arguments arg Range for arguments
+ -addr=buffers buf Range for buffers (also not loaded buffers)
+ -addr=loaded_buffers load Range for loaded buffers
+ -addr=windows win Range for windows
+ -addr=tabs tab Range for tab pages
+ -addr=quickfix qf Range for quickfix entries
+! -addr=other ? other kind of range; can use ".", "$" and "%"
+! as with "lines" (this is the default for
+! -count)
+
+
+ Special cases ~
+***************
+*** 1569,1572 ****
+ invokes the user command, it will run in the context of the script it was
+ defined in. This matters if |<SID>| is used in a command.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1563,1566 ----
+ invokes the user command, it will run in the context of the script it was
+ defined in. This matters if |<SID>| is used in a command.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/mbyte.txt 2019-04-28 14:02:25.410687613 +0200
+--- runtime/doc/mbyte.txt 2019-04-28 13:51:04.377867566 +0200
+***************
+*** 1,4 ****
+! *mbyte.txt* For Vim version 8.1. Last change: 2018 Jan 21
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar et al.
+--- 1,4 ----
+! *mbyte.txt* For Vim version 8.1. Last change: 2019 Apr 28
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar et al.
+***************
+*** 14,22 ****
+ manual.
+ For changing the language of messages and menus see |mlang.txt|.
+
+- {not available when compiled without the |+multi_byte| feature}
+-
+-
+ 1. Getting started |mbyte-first|
+ 2. Locale |mbyte-locale|
+ 3. Encoding |mbyte-encoding|
+--- 14,19 ----
+***************
+*** 44,59 ****
+ languages and it is quite complicated.
+
+
+- COMPILING
+-
+- If you already have a compiled Vim program, check if the |+multi_byte| feature
+- is included. The |:version| command can be used for this.
+-
+- If +multi_byte is not included, you should compile Vim with "normal", "big" or
+- "huge" features. You can further tune what features are included. See the
+- INSTALL files in the source directory.
+-
+-
+ LOCALE
+
+ First of all, you must make sure your current locale is set correctly. If
+--- 41,46 ----
+***************
+*** 1482,1485 ****
+ Taro Muraoka <koron@tka.att.ne.jp>
+ Yasuhiro Matsumoto <mattn@mail.goo.ne.jp>
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1469,1472 ----
+ Taro Muraoka <koron@tka.att.ne.jp>
+ Yasuhiro Matsumoto <mattn@mail.goo.ne.jp>
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/message.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/message.txt 2019-05-05 17:12:07.079736244 +0200
+***************
+*** 1,4 ****
+! *message.txt* For Vim version 8.1. Last change: 2018 Feb 04
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *message.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 557,570 ****
+ tag. Sometimes this message is not given, even though the tags file is not
+ properly sorted.
+
+- *E460* >
+- The resource fork would be lost (add ! to override)
+-
+- On the Macintosh (classic), when writing a file, Vim attempts to preserve all
+- info about a file, including its resource fork. If this is not possible you
+- get this error message. Append "!" to the command name to write anyway (and
+- lose the info).
+-
+ *E424* >
+ Too many different highlighting attributes in use
+
+--- 557,562 ----
+***************
+*** 711,721 ****
+ This happens when an Ex command with mandatory argument(s) was executed, but
+ no argument has been specified.
+
+! *E474* *E475* >
+ Invalid argument
+ Invalid argument: {arg}
+
+! An Ex command has been executed, but an invalid argument has been specified.
+
+ *E488* >
+ Trailing characters
+--- 703,715 ----
+ This happens when an Ex command with mandatory argument(s) was executed, but
+ no argument has been specified.
+
+! *E474* *E475* *E983* >
+ Invalid argument
+ Invalid argument: {arg}
++ Duplicate argument: {arg}
+
+! An Ex command or function has been executed, but an invalid argument has been
+! specified.
+
+ *E488* >
+ Trailing characters
+***************
+*** 836,845 ****
+ G down all the way, until the hit-enter
+ prompt
+
+! <BS> or k or <Up> one line back (*)
+! u up a page (half a screen) (*)
+! b or <PageUp> back a screen (*)
+! g back to the start (*)
+
+ q, <Esc> or CTRL-C stop the listing
+ : stop the listing and enter a
+--- 830,839 ----
+ G down all the way, until the hit-enter
+ prompt
+
+! <BS> or k or <Up> one line back
+! u up a page (half a screen)
+! b or <PageUp> back a screen
+! g back to the start
+
+ q, <Esc> or CTRL-C stop the listing
+ : stop the listing and enter a
+***************
+*** 848,860 ****
+ the clipboard ("* and "+ registers)
+ {menu-entry} what the menu is defined to in
+ Cmdline-mode.
+! <LeftMouse> (**) next page
+
+ Any other key causes the meaning of the keys to be displayed.
+
+! (*) backwards scrolling is {not in Vi}. Only scrolls back to where messages
+! started to scroll.
+! (**) Clicking the left mouse button only works:
+ - For the GUI: in the last line of the screen.
+ - When 'r' is included in 'mouse' (but then selecting text won't work).
+
+--- 842,852 ----
+ the clipboard ("* and "+ registers)
+ {menu-entry} what the menu is defined to in
+ Cmdline-mode.
+! <LeftMouse> next page (*)
+
+ Any other key causes the meaning of the keys to be displayed.
+
+! (*) Clicking the left mouse button only works:
+ - For the GUI: in the last line of the screen.
+ - When 'r' is included in 'mouse' (but then selecting text won't work).
+
+***************
+*** 866,869 ****
+ This is especially useful if you accidentally typed <Space> at the hit-enter
+ prompt.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 858,861 ----
+ This is especially useful if you accidentally typed <Space> at the hit-enter
+ prompt.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/mlang.txt 2018-10-06 15:02:53.797052261 +0200
+--- runtime/doc/mlang.txt 2019-05-05 17:33:25.429335471 +0200
+***************
+*** 1,4 ****
+! *mlang.txt* For Vim version 8.1. Last change: 2018 May 06
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *mlang.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 17,23 ****
+
+ Also see |help-translated| for multi-language help.
+
+- {Vi does not have any of these features}
+ {not available when compiled without the |+multi_lang| feature}
+
+ ==============================================================================
+--- 17,22 ----
+*** ../vim-8.1.1279/runtime/doc/motion.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/motion.txt 2019-05-05 17:33:35.205281824 +0200
+***************
+*** 1,4 ****
+! *motion.txt* For Vim version 8.1. Last change: 2017 Oct 15
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *motion.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 113,119 ****
+ endif<CR>
+ Note that when using ":" any motion becomes characterwise exclusive.
+
+!
+ FORCING A MOTION TO BE LINEWISE, CHARACTERWISE OR BLOCKWISE
+
+ When a motion is not of the type you would like to use, you can force another
+--- 113,119 ----
+ endif<CR>
+ Note that when using ":" any motion becomes characterwise exclusive.
+
+! *forced-motion*
+ FORCING A MOTION TO BE LINEWISE, CHARACTERWISE OR BLOCKWISE
+
+ When a motion is not of the type you would like to use, you can force another
+***************
+*** 185,191 ****
+ TEXT column (if possible). Most other commands stay
+ in the same SCREEN column. <Home> works like "1|",
+ which differs from "0" when the line starts with a
+! <Tab>. {not in Vi}
+
+ *^*
+ ^ To the first non-blank character of the line.
+--- 185,191 ----
+ TEXT column (if possible). Most other commands stay
+ in the same SCREEN column. <Home> works like "1|",
+ which differs from "0" when the line starts with a
+! <Tab>.
+
+ *^*
+ ^ To the first non-blank character of the line.
+***************
+*** 202,208 ****
+
+ *g_*
+ g_ To the last non-blank character of the line and
+! [count - 1] lines downward |inclusive|. {not in Vi}
+
+ *g0* *g<Home>*
+ g0 or g<Home> When lines wrap ('wrap' on): To the first character of
+--- 202,208 ----
+
+ *g_*
+ g_ To the last non-blank character of the line and
+! [count - 1] lines downward |inclusive|.
+
+ *g0* *g<Home>*
+ g0 or g<Home> When lines wrap ('wrap' on): To the first character of
+***************
+*** 211,217 ****
+ When lines don't wrap ('wrap' off): To the leftmost
+ character of the current line that is on the screen.
+ Differs from "0" when the first character of the line
+! is not on the screen. {not in Vi}
+
+ *g^*
+ g^ When lines wrap ('wrap' on): To the first non-blank
+--- 211,217 ----
+ When lines don't wrap ('wrap' off): To the leftmost
+ character of the current line that is on the screen.
+ Differs from "0" when the first character of the line
+! is not on the screen.
+
+ *g^*
+ g^ When lines wrap ('wrap' on): To the first non-blank
+***************
+*** 220,231 ****
+ When lines don't wrap ('wrap' off): To the leftmost
+ non-blank character of the current line that is on the
+ screen. Differs from "^" when the first non-blank
+! character of the line is not on the screen. {not in
+! Vi}
+
+ *gm*
+ gm Like "g0", but half a screenwidth to the right (or as
+! much as possible). {not in Vi}
+
+ *g$* *g<End>*
+ g$ or g<End> When lines wrap ('wrap' on): To the last character of
+--- 220,230 ----
+ When lines don't wrap ('wrap' off): To the leftmost
+ non-blank character of the current line that is on the
+ screen. Differs from "^" when the first non-blank
+! character of the line is not on the screen.
+
+ *gm*
+ gm Like "g0", but half a screenwidth to the right (or as
+! much as possible).
+
+ *g$* *g<End>*
+ g$ or g<End> When lines wrap ('wrap' on): To the last character of
+***************
+*** 240,246 ****
+ instead of going to the end of the line.
+ When 'virtualedit' is enabled moves to the end of the
+ screen line.
+- {not in Vi}
+
+ *bar*
+ | To screen column [count] in the current line.
+--- 239,244 ----
+***************
+*** 296,307 ****
+ gk or *gk* *g<Up>*
+ g<Up> [count] display lines upward. |exclusive| motion.
+ Differs from 'k' when lines wrap, and when used with
+! an operator, because it's not linewise. {not in Vi}
+
+ gj or *gj* *g<Down>*
+ g<Down> [count] display lines downward. |exclusive| motion.
+ Differs from 'j' when lines wrap, and when used with
+! an operator, because it's not linewise. {not in Vi}
+
+ *-*
+ - <minus> [count] lines upward, on the first non-blank
+--- 294,305 ----
+ gk or *gk* *g<Up>*
+ g<Up> [count] display lines upward. |exclusive| motion.
+ Differs from 'k' when lines wrap, and when used with
+! an operator, because it's not linewise.
+
+ gj or *gj* *g<Down>*
+ g<Down> [count] display lines downward. |exclusive| motion.
+ Differs from 'j' when lines wrap, and when used with
+! an operator, because it's not linewise.
+
+ *-*
+ - <minus> [count] lines upward, on the first non-blank
+***************
+*** 320,330 ****
+ G Goto line [count], default last line, on the first
+ non-blank character |linewise|. If 'startofline' not
+ set, keep the same column.
+! G is a one of |jump-motions|.
+
+ *<C-End>*
+ <C-End> Goto line [count], default last line, on the last
+! character |inclusive|. {not in Vi}
+
+ <C-Home> or *gg* *<C-Home>*
+ gg Goto line [count], default first line, on the first
+--- 318,328 ----
+ G Goto line [count], default last line, on the first
+ non-blank character |linewise|. If 'startofline' not
+ set, keep the same column.
+! G is one of the |jump-motions|.
+
+ *<C-End>*
+ <C-End> Goto line [count], default last line, on the last
+! character |inclusive|.
+
+ <C-Home> or *gg* *<C-Home>*
+ gg Goto line [count], default first line, on the first
+***************
+*** 342,348 ****
+ non-blank in the line |linewise|. To compute the new
+ line number this formula is used:
+ ({count} * number-of-lines + 99) / 100
+! See also 'startofline' option. {not in Vi}
+
+ :[range]go[to] [count] *:go* *:goto* *go*
+ [count]go Go to [count] byte in the buffer. Default [count] is
+--- 340,346 ----
+ non-blank in the line |linewise|. To compute the new
+ line number this formula is used:
+ ({count} * number-of-lines + 99) / 100
+! See also 'startofline' option.
+
+ :[range]go[to] [count] *:go* *:goto* *go*
+ [count]go Go to [count] byte in the buffer. Default [count] is
+***************
+*** 352,358 ****
+ 'fileformat' setting.
+ Also see the |line2byte()| function, and the 'o'
+ option in 'statusline'.
+- {not in Vi}
+ {not available when compiled without the
+ |+byte_offset| feature}
+
+--- 350,355 ----
+***************
+*** 516,522 ****
+ without white space, or just the white space. Thus the "inner" commands
+ always select less text than the "a" commands.
+
+- These commands are {not in Vi}.
+ These commands are not available when the |+textobjects| feature has been
+ disabled at compile time.
+ Also see `gn` and `gN`, operating on the last search pattern.
+--- 513,518 ----
+***************
+*** 780,786 ****
+
+ *'A* *'0* *`A* *`0*
+ '{A-Z0-9} `{A-Z0-9} To the mark {A-Z0-9} in the file where it was set (not
+! a motion command when in another file). {not in Vi}
+
+ *g'* *g'a* *g`* *g`a*
+ g'{mark} g`{mark}
+--- 776,782 ----
+
+ *'A* *'0* *`A* *`0*
+ '{A-Z0-9} `{A-Z0-9} To the mark {A-Z0-9} in the file where it was set (not
+! a motion command when in another file).
+
+ *g'* *g'a* *g`* *g`a*
+ g'{mark} g`{mark}
+***************
+*** 790,807 ****
+ < jumps to the last known position in a file. See
+ $VIMRUNTIME/vimrc_example.vim.
+ Also see |:keepjumps|.
+- {not in Vi}
+
+ *:marks*
+ :marks List all the current marks (not a motion command).
+ The |'(|, |')|, |'{| and |'}| marks are not listed.
+ The first column has number zero.
+! {not in Vi}
+ *E283*
+ :marks {arg} List the marks that are mentioned in {arg} (not a
+ motion command). For example: >
+ :marks aB
+! < to list marks 'a' and 'B'. {not in Vi}
+
+ *:delm* *:delmarks*
+ :delm[arks] {marks} Delete the specified marks. Marks that can be deleted
+--- 786,802 ----
+ < jumps to the last known position in a file. See
+ $VIMRUNTIME/vimrc_example.vim.
+ Also see |:keepjumps|.
+
+ *:marks*
+ :marks List all the current marks (not a motion command).
+ The |'(|, |')|, |'{| and |'}| marks are not listed.
+ The first column has number zero.
+!
+ *E283*
+ :marks {arg} List the marks that are mentioned in {arg} (not a
+ motion command). For example: >
+ :marks aB
+! < to list marks 'a' and 'B'.
+
+ *:delm* *:delmarks*
+ :delm[arks] {marks} Delete the specified marks. Marks that can be deleted
+***************
+*** 815,825 ****
+ :delmarks p-z deletes marks in the range p to z
+ :delmarks ^.[] deletes marks ^ . [ ]
+ :delmarks \" deletes mark "
+- < {not in Vi}
+
+ :delm[arks]! Delete all marks for the current buffer, but not marks
+ A-Z or 0-9.
+- {not in Vi}
+
+ A mark is not visible in any way. It is just a position in the file that is
+ remembered. Do not confuse marks with named registers, they are totally
+--- 810,818 ----
+***************
+*** 854,864 ****
+
+ *'[* *`[*
+ '[ `[ To the first character of the previously changed
+! or yanked text. {not in Vi}
+
+ *']* *`]*
+ '] `] To the last character of the previously changed or
+! yanked text. {not in Vi}
+
+ After executing an operator the Cursor is put at the beginning of the text
+ that was operated upon. After a put command ("p" or "P") the cursor is
+--- 847,857 ----
+
+ *'[* *`[*
+ '[ `[ To the first character of the previously changed
+! or yanked text.
+
+ *']* *`]*
+ '] `] To the last character of the previously changed or
+! yanked text.
+
+ After executing an operator the Cursor is put at the beginning of the text
+ that was operated upon. After a put command ("p" or "P") the cursor is
+***************
+*** 876,882 ****
+ '< `< To the first line or character of the last selected
+ Visual area in the current buffer. For block mode it
+ may also be the last character in the first line (to
+! be able to define the block). {not in Vi}.
+
+ *'>* *`>*
+ '> `> To the last line or character of the last selected
+--- 869,875 ----
+ '< `< To the first line or character of the last selected
+ Visual area in the current buffer. For block mode it
+ may also be the last character in the first line (to
+! be able to define the block).
+
+ *'>* *`>*
+ '> `> To the last line or character of the last selected
+***************
+*** 884,890 ****
+ may also be the first character of the last line (to
+ be able to define the block). Note that 'selection'
+ applies, the position may be just after the Visual
+! area. {not in Vi}.
+
+ *''* *``*
+ '' `` To the position before the latest jump, or where the
+--- 877,883 ----
+ may also be the first character of the last line (to
+ be able to define the block). Note that 'selection'
+ applies, the position may be just after the Visual
+! area.
+
+ *''* *``*
+ '' `` To the position before the latest jump, or where the
+***************
+*** 900,912 ****
+ Only one position is remembered per buffer, not one
+ for each window. As long as the buffer is visible in
+ a window the position won't be changed.
+- {not in Vi}.
+
+ *'^* *`^*
+ '^ `^ To the position where the cursor was the last time
+ when Insert mode was stopped. This is used by the
+ |gi| command. Not set when the |:keepjumps| command
+! modifier was used. {not in Vi}
+
+ *'.* *`.*
+ '. `. To the position where the last change was made. The
+--- 893,904 ----
+ Only one position is remembered per buffer, not one
+ for each window. As long as the buffer is visible in
+ a window the position won't be changed.
+
+ *'^* *`^*
+ '^ `^ To the position where the cursor was the last time
+ when Insert mode was stopped. This is used by the
+ |gi| command. Not set when the |:keepjumps| command
+! modifier was used.
+
+ *'.* *`.*
+ '. `. To the position where the last change was made. The
+***************
+*** 916,945 ****
+ command changed. For example when inserting a word,
+ the position will be on the last character.
+ To jump to older changes use |g;|.
+- {not in Vi}
+
+ *'(* *`(*
+ '( `( To the start of the current sentence, like the |(|
+! command. {not in Vi}
+
+ *')* *`)*
+ ') `) To the end of the current sentence, like the |)|
+! command. {not in Vi}
+
+ *'{* *`{*
+ '{ `{ To the start of the current paragraph, like the |{|
+! command. {not in Vi}
+
+ *'}* *`}*
+ '} `} To the end of the current paragraph, like the |}|
+! command. {not in Vi}
+
+ These commands are not marks themselves, but jump to a mark:
+
+ *]'*
+ ]' [count] times to next line with a lowercase mark below
+ the cursor, on the first non-blank character in the
+! line. {not in Vi}
+
+ *]`*
+ ]` [count] times to lowercase mark after the cursor. {not
+--- 908,936 ----
+ command changed. For example when inserting a word,
+ the position will be on the last character.
+ To jump to older changes use |g;|.
+
+ *'(* *`(*
+ '( `( To the start of the current sentence, like the |(|
+! command.
+
+ *')* *`)*
+ ') `) To the end of the current sentence, like the |)|
+! command.
+
+ *'{* *`{*
+ '{ `{ To the start of the current paragraph, like the |{|
+! command.
+
+ *'}* *`}*
+ '} `} To the end of the current paragraph, like the |}|
+! command.
+
+ These commands are not marks themselves, but jump to a mark:
+
+ *]'*
+ ]' [count] times to next line with a lowercase mark below
+ the cursor, on the first non-blank character in the
+! line.
+
+ *]`*
+ ]` [count] times to lowercase mark after the cursor. {not
+***************
+*** 948,958 ****
+ *['*
+ [' [count] times to previous line with a lowercase mark
+ before the cursor, on the first non-blank character in
+! the line. {not in Vi}
+
+ *[`*
+ [` [count] times to lowercase mark before the cursor.
+- {not in Vi}
+
+
+ :loc[kmarks] {command} *:loc* *:lockmarks*
+--- 939,948 ----
+ *['*
+ [' [count] times to previous line with a lowercase mark
+ before the cursor, on the first non-blank character in
+! the line.
+
+ *[`*
+ [` [count] times to lowercase mark before the cursor.
+
+
+ :loc[kmarks] {command} *:loc* *:lockmarks*
+***************
+*** 1019,1051 ****
+ ==============================================================================
+ 8. Jumps *jump-motions*
+
+! A "jump" is one of the following commands: "'", "`", "G", "/", "?", "n",
+! "N", "%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and
+! the commands that start editing a new file. If you make the cursor "jump"
+! with one of these commands, the position of the cursor before the jump is
+! remembered. You can return to that position with the "''" and "``" command,
+! unless the line containing that position was changed or deleted.
+
+ *CTRL-O*
+ CTRL-O Go to [count] Older cursor position in jump list
+ (not a motion command).
+- {not in Vi}
+ {not available without the |+jumplist| feature}
+
+ <Tab> or *CTRL-I* *<Tab>*
+ CTRL-I Go to [count] newer cursor position in jump list
+ (not a motion command).
+- {not in Vi}
+ {not available without the |+jumplist| feature}
+
+ *:ju* *:jumps*
+ :ju[mps] Print the jump list (not a motion command).
+- {not in Vi}
+ {not available without the |+jumplist| feature}
+
+ *:cle* *:clearjumps*
+ :cle[arjumps] Clear the jump list of the current window.
+- {not in Vi}
+ {not available without the |+jumplist| feature}
+
+ *jumplist*
+--- 1009,1038 ----
+ ==============================================================================
+ 8. Jumps *jump-motions*
+
+! A "jump" is a command that normally moves the cursor several lines away. If
+! you make the cursor "jump" the position of the cursor before the jump is
+! remembered. You can return to that position with the "''" and "``" commands,
+! unless the line containing that position was changed or deleted. The
+! following commands are "jump" commands: "'", "`", "G", "/", "?", "n", "N",
+! "%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and the
+! commands that start editing a new file.
+
+ *CTRL-O*
+ CTRL-O Go to [count] Older cursor position in jump list
+ (not a motion command).
+ {not available without the |+jumplist| feature}
+
+ <Tab> or *CTRL-I* *<Tab>*
+ CTRL-I Go to [count] newer cursor position in jump list
+ (not a motion command).
+ {not available without the |+jumplist| feature}
+
+ *:ju* *:jumps*
+ :ju[mps] Print the jump list (not a motion command).
+ {not available without the |+jumplist| feature}
+
+ *:cle* *:clearjumps*
+ :cle[arjumps] Clear the jump list of the current window.
+ {not available without the |+jumplist| feature}
+
+ *jumplist*
+***************
+*** 1130,1143 ****
+ positions go to the oldest change.
+ If there is no older change an error message is given.
+ (not a motion command)
+- {not in Vi}
+ {not available without the |+jumplist| feature}
+
+ *g,* *E663*
+ g, Go to [count] newer cursor position in change list.
+ Just like |g;| but in the opposite direction.
+ (not a motion command)
+- {not in Vi}
+ {not available without the |+jumplist| feature}
+
+ When using a count you jump as far back or forward as possible. Thus you can
+--- 1117,1128 ----
+***************
+*** 1163,1169 ****
+ *:changes*
+ :changes Print the change list. A ">" character indicates the
+ current position. Just after a change it is below the
+! newest entry, indicating that "g;" takes you to the
+ newest entry position. The first column indicates the
+ count needed to take you to this position. Example:
+
+--- 1148,1154 ----
+ *:changes*
+ :changes Print the change list. A ">" character indicates the
+ current position. Just after a change it is below the
+! newest entry, indicating that `g;` takes you to the
+ newest entry position. The first column indicates the
+ count needed to take you to this position. Example:
+
+***************
+*** 1173,1180 ****
+ 1 14 54 the latest changed line
+ >
+
+! The "3g;" command takes you to line 9. Then the
+! output of ":changes is:
+
+ change line col text ~
+ > 0 9 8 bla bla bla
+--- 1158,1165 ----
+ 1 14 54 the latest changed line
+ >
+
+! The `3g;` command takes you to line 9. Then the
+! output of `:changes` is:
+
+ change line col text ~
+ > 0 9 8 bla bla bla
+***************
+*** 1228,1246 ****
+
+ *[(*
+ [( go to [count] previous unmatched '('.
+! |exclusive| motion. {not in Vi}
+
+ *[{*
+ [{ go to [count] previous unmatched '{'.
+! |exclusive| motion. {not in Vi}
+
+ *])*
+ ]) go to [count] next unmatched ')'.
+! |exclusive| motion. {not in Vi}
+
+ *]}*
+ ]} go to [count] next unmatched '}'.
+! |exclusive| motion. {not in Vi}
+
+ The above four commands can be used to go to the start or end of the current
+ code block. It is like doing "%" on the '(', ')', '{' or '}' at the other
+--- 1213,1231 ----
+
+ *[(*
+ [( go to [count] previous unmatched '('.
+! |exclusive| motion.
+
+ *[{*
+ [{ go to [count] previous unmatched '{'.
+! |exclusive| motion.
+
+ *])*
+ ]) go to [count] next unmatched ')'.
+! |exclusive| motion.
+
+ *]}*
+ ]} go to [count] next unmatched '}'.
+! |exclusive| motion.
+
+ The above four commands can be used to go to the start or end of the current
+ code block. It is like doing "%" on the '(', ')', '{' or '}' at the other
+***************
+*** 1253,1277 ****
+ similar structured language). When not before the
+ start of a method, jump to the start or end of the
+ class. When no '{' is found after the cursor, this is
+! an error. |exclusive| motion. {not in Vi}
+ *]M*
+ ]M Go to [count] next end of a method (for Java or
+ similar structured language). When not before the end
+ of a method, jump to the start or end of the class.
+ When no '}' is found after the cursor, this is an
+! error. |exclusive| motion. {not in Vi}
+ *[m*
+ [m Go to [count] previous start of a method (for Java or
+ similar structured language). When not after the
+ start of a method, jump to the start or end of the
+ class. When no '{' is found before the cursor this is
+! an error. |exclusive| motion. {not in Vi}
+ *[M*
+ [M Go to [count] previous end of a method (for Java or
+ similar structured language). When not after the
+ end of a method, jump to the start or end of the
+ class. When no '}' is found before the cursor this is
+! an error. |exclusive| motion. {not in Vi}
+
+ The above two commands assume that the file contains a class with methods.
+ The class definition is surrounded in '{' and '}'. Each method in the class
+--- 1238,1262 ----
+ similar structured language). When not before the
+ start of a method, jump to the start or end of the
+ class. When no '{' is found after the cursor, this is
+! an error. |exclusive| motion.
+ *]M*
+ ]M Go to [count] next end of a method (for Java or
+ similar structured language). When not before the end
+ of a method, jump to the start or end of the class.
+ When no '}' is found after the cursor, this is an
+! error. |exclusive| motion.
+ *[m*
+ [m Go to [count] previous start of a method (for Java or
+ similar structured language). When not after the
+ start of a method, jump to the start or end of the
+ class. When no '{' is found before the cursor this is
+! an error. |exclusive| motion.
+ *[M*
+ [M Go to [count] previous end of a method (for Java or
+ similar structured language). When not after the
+ end of a method, jump to the start or end of the
+ class. When no '}' is found before the cursor this is
+! an error. |exclusive| motion.
+
+ The above two commands assume that the file contains a class with methods.
+ The class definition is surrounded in '{' and '}'. Each method in the class
+***************
+*** 1294,1304 ****
+
+ *[#*
+ [# go to [count] previous unmatched "#if" or "#else".
+! |exclusive| motion. {not in Vi}
+
+ *]#*
+ ]# go to [count] next unmatched "#else" or "#endif".
+! |exclusive| motion. {not in Vi}
+
+ These two commands work in C programs that contain #if/#else/#endif
+ constructs. It brings you to the start or end of the #if/#else/#endif where
+--- 1279,1289 ----
+
+ *[#*
+ [# go to [count] previous unmatched "#if" or "#else".
+! |exclusive| motion.
+
+ *]#*
+ ]# go to [count] next unmatched "#else" or "#endif".
+! |exclusive| motion.
+
+ These two commands work in C programs that contain #if/#else/#endif
+ constructs. It brings you to the start or end of the #if/#else/#endif where
+***************
+*** 1306,1316 ****
+
+ *[star* *[/*
+ [* or [/ go to [count] previous start of a C comment "/*".
+! |exclusive| motion. {not in Vi}
+
+ *]star* *]/*
+ ]* or ]/ go to [count] next end of a C comment "*/".
+! |exclusive| motion. {not in Vi}
+
+
+ *H*
+--- 1291,1301 ----
+
+ *[star* *[/*
+ [* or [/ go to [count] previous start of a C comment "/*".
+! |exclusive| motion.
+
+ *]star* *]/*
+ ]* or ]/ go to [count] next end of a C comment "*/".
+! |exclusive| motion.
+
+
+ *H*
+***************
+*** 1338,1343 ****
+ <LeftMouse> Moves to the position on the screen where the mouse
+ click is |exclusive|. See also |<LeftMouse>|. If the
+ position is in a status line, that window is made the
+! active window and the cursor is not moved. {not in Vi}
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1323,1328 ----
+ <LeftMouse> Moves to the position on the screen where the mouse
+ click is |exclusive|. See also |<LeftMouse>|. If the
+ position is in a status line, that window is made the
+! active window and the cursor is not moved.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/netbeans.txt 2019-01-17 15:43:21.749878443 +0100
+--- runtime/doc/netbeans.txt 2019-05-05 17:43:35.817942573 +0200
+***************
+*** 1,4 ****
+! *netbeans.txt* For Vim version 8.1. Last change: 2019 Jan 17
+
+
+ VIM REFERENCE MANUAL by Gordon Prieur et al.
+--- 1,4 ----
+! *netbeans.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Gordon Prieur et al.
+***************
+*** 24,30 ****
+ 10.4. Obtaining the External Editor Module |obtaining-exted|
+ 10.5. Setting up NetBeans to run with Vim |netbeans-setup|
+
+- {Vi does not have any of these features}
+ {only available when compiled with the |+netbeans_intg| feature}
+
+ ==============================================================================
+--- 24,29 ----
+***************
+*** 1017,1020 ****
+ Editor will only open MIME types specified in this property.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1016,1019 ----
+ Editor will only open MIME types specified in this property.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/options.txt 2019-05-04 21:08:17.115814262 +0200
+--- runtime/doc/options.txt 2019-05-05 17:45:04.085447135 +0200
+***************
+*** 1,4 ****
+! *options.txt* For Vim version 8.1. Last change: 2018 May 15
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *options.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 6163,6171 ****
+ set to half the number of lines in the window when the window size
+ changes. If you give a count to the CTRL-U or CTRL-D command it will
+ be used as the new value for 'scroll'. Reset to half the window
+! height with ":set scroll=0". {Vi is a bit different: 'scroll' gives
+! the number of screen lines instead of file lines, makes a difference
+! when lines wrap}
+
+ *'scrollbind'* *'scb'* *'noscrollbind'* *'noscb'*
+ 'scrollbind' 'scb' boolean (default off)
+--- 6163,6169 ----
+ set to half the number of lines in the window when the window size
+ changes. If you give a count to the CTRL-U or CTRL-D command it will
+ be used as the new value for 'scroll'. Reset to half the window
+! height with ":set scroll=0".
+
+ *'scrollbind'* *'scb'* *'noscrollbind'* *'noscb'*
+ 'scrollbind' 'scb' boolean (default off)
+***************
+*** 7787,7793 ****
+ *'timeoutlen'* *'tm'*
+ 'timeoutlen' 'tm' number (default 1000)
+ global
+! {not in all versions of Vi}
+ *'ttimeoutlen'* *'ttm'*
+ 'ttimeoutlen' 'ttm' number (default -1, set to 100 in |defaults.vim|)
+ global
+--- 7785,7791 ----
+ *'timeoutlen'* *'tm'*
+ 'timeoutlen' 'tm' number (default 1000)
+ global
+!
+ *'ttimeoutlen'* *'ttm'*
+ 'ttimeoutlen' 'ttm' number (default -1, set to 100 in |defaults.vim|)
+ global
+***************
+*** 7990,7998 ****
+ work. See below for how Vim detects this
+ automatically.
+ *netterm-mouse*
+! netterm NetTerm mouse handling. The mouse generates
+ "<Esc>}r,c<CR>", where "r,c" are two decimal numbers
+! for the row and column.
+ *dec-mouse*
+ dec DEC terminal mouse handling. The mouse generates a
+ rather complex sequence, starting with "<Esc>[".
+--- 7988,7997 ----
+ work. See below for how Vim detects this
+ automatically.
+ *netterm-mouse*
+! netterm NetTerm mouse handling. A left mouse click generates
+ "<Esc>}r,c<CR>", where "r,c" are two decimal numbers
+! for the row and column. No other mouse events are
+! supported.
+ *dec-mouse*
+ dec DEC terminal mouse handling. The mouse generates a
+ rather complex sequence, starting with "<Esc>[".
+***************
+*** 8653,8659 ****
+ in a much smarter way, taking care of wrapping lines.
+ When resizing the Vim window, the value is smaller than 1 or more than
+ or equal to 'lines' it will be set to 'lines' minus 1.
+- {Vi also uses the option to specify the number of displayed lines}
+
+ *'winheight'* *'wh'* *E591*
+ 'winheight' 'wh' number (default 1)
+--- 8652,8657 ----
+*** ../vim-8.1.1279/runtime/doc/os_390.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_390.txt 2018-10-05 19:55:43.013424481 +0200
+***************
+*** 83,92 ****
+ ctags out there, that does it right, but we can't be sure. So this seems to
+ be a permanent restriction.
+
+! - The cscope interface (|cscope|) doesn't work for the version of cscope
+! that we use on our mainframe. We have a copy of version 15.0b12, and it
+! causes Vim to hang when using the "cscope add" command. I'm guessing that
+! the binary format of the cscope database isn't quite what Vim is expecting.
+ I've tried to port the current version of cscope (15.3) to z/OS, without
+ much success. If anyone is interested in trying, drop me a line if you
+ make any progress.
+--- 83,92 ----
+ ctags out there, that does it right, but we can't be sure. So this seems to
+ be a permanent restriction.
+
+! - The cscope interface (|cscope|) doesn't work for the version of cscope that
+! we use on our mainframe. We have a copy of version 15.0b12, and it causes
+! Vim to hang when using the "cscope add" command. I'm guessing that the
+! binary format of the cscope database isn't quite what Vim is expecting.
+ I've tried to port the current version of cscope (15.3) to z/OS, without
+ much success. If anyone is interested in trying, drop me a line if you
+ make any progress.
+***************
+*** 131,134 ****
+
+
+ ------------------------------------------------------------------------------
+! vim:tw=78:fo=tcq2:ts=8:ft=help:norl:
+--- 131,134 ----
+
+
+ ------------------------------------------------------------------------------
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/os_amiga.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_amiga.txt 2018-07-29 14:23:36.367157551 +0200
+***************
+*** 144,147 ****
+ ;End VIM
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 144,147 ----
+ ;End VIM
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/os_beos.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_beos.txt 2018-07-29 14:23:36.367157551 +0200
+***************
+*** 144,150 ****
+ :version
+
+ The normal value is /boot/home/config/share/vim. If you don't like it you can
+! set the Vim environment variable to override this, or set 'helpfile' in your
+ .vimrc: >
+
+ :if version >= 500
+--- 144,150 ----
+ :version
+
+ The normal value is /boot/home/config/share/vim. If you don't like it you can
+! set the VIM environment variable to override this, or set 'helpfile' in your
+ .vimrc: >
+
+ :if version >= 500
+***************
+*** 317,320 ****
+ <rhialto@polder.ubc.kun.nl>
+ http://polder.ubc.kun.nl/~rhialto/be
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 317,320 ----
+ <rhialto@polder.ubc.kun.nl>
+ http://polder.ubc.kun.nl/~rhialto/be
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/os_dos.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_dos.txt 2018-07-29 14:23:36.367157551 +0200
+***************
+*** 295,298 ****
+ option. If it is present, Vim sets the 'shellcmdflag' and 'shellquote' or
+ 'shellxquote' options will be set as described above.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 295,298 ----
+ option. If it is present, Vim sets the 'shellcmdflag' and 'shellquote' or
+ 'shellxquote' options will be set as described above.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/os_mac.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_mac.txt 2019-04-21 16:53:20.542893861 +0200
+***************
+*** 1,4 ****
+! *os_mac.txt* For Vim version 8.1. Last change: 2018 Jan 21
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar et al.
+--- 1,4 ----
+! *os_mac.txt* For Vim version 8.1. Last change: 2019 Apr 21
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar et al.
+***************
+*** 179,182 ****
+ from hanging at runtime.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 179,182 ----
+ from hanging at runtime.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/os_mint.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_mint.txt 2018-07-29 14:23:36.367157551 +0200
+***************
+*** 36,39 ****
+
+ Jens M. Felderhoff, e-mail: <jmf@infko.uni-koblenz.de>
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 36,39 ----
+
+ Jens M. Felderhoff, e-mail: <jmf@infko.uni-koblenz.de>
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/os_msdos.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_msdos.txt 2018-07-29 14:23:36.367157551 +0200
+***************
+*** 12,15 ****
+ work on older systems.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 12,15 ----
+ work on older systems.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/os_os2.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_os2.txt 2018-07-29 14:23:36.367157551 +0200
+***************
+*** 10,13 ****
+ The OS/2 support was removed in patch 7.4.1008.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 10,13 ----
+ The OS/2 support was removed in patch 7.4.1008.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/os_qnx.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_qnx.txt 2018-08-08 23:07:19.236325204 +0200
+***************
+*** 135,138 ****
+ - Replace usage of fork() with spawn() when launching external
+ programs.
+
+! vim:tw=78:sw=4:ts=8:ts=8:ft=help:norl:
+--- 135,138 ----
+ - Replace usage of fork() with spawn() when launching external
+ programs.
+
+! vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/os_risc.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_risc.txt 2018-07-29 14:23:36.367157551 +0200
+***************
+*** 9,12 ****
+ If you would like to use Vim on RISC OS get the files from before that patch.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 9,12 ----
+ If you would like to use Vim on RISC OS get the files from before that patch.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/os_unix.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_unix.txt 2018-07-29 14:23:36.367157551 +0200
+***************
+*** 57,60 ****
+ The file "tools/vim132" is a shell script that can be used to put Vim in 132
+ column mode on a vt100 and lookalikes.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 57,60 ----
+ The file "tools/vim132" is a shell script that can be used to put Vim in 132
+ column mode on a vt100 and lookalikes.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/os_vms.txt 2019-01-18 22:58:56.427995669 +0100
+--- runtime/doc/os_vms.txt 2019-01-29 20:29:32.141523385 +0100
+***************
+*** 1,4 ****
+! *os_vms.txt* For Vim version 8.1. Last change: 2019 Jan 18
+
+
+ VIM REFERENCE MANUAL
+--- 1,4 ----
+! *os_vms.txt* For Vim version 8.1. Last change: 2019 Jan 29
+
+
+ VIM REFERENCE MANUAL
+***************
+*** 104,111 ****
+ You may want to use GUI with GTK icons, then you have to download and install
+ GTK for OpenVMS or at least runtime shareable images - LIBGTK from
+ polarhome.com
+! Post 7.2 Vim uses GTK2+ while the last GTK on OpenVMS is 1.2.10, thefore
+! the GTK build is no longer available.
+
+ For more advanced questions, please send your problem to Vim on VMS mailing
+ list <vim-vms@polarhome.com>
+--- 104,111 ----
+ You may want to use GUI with GTK icons, then you have to download and install
+ GTK for OpenVMS or at least runtime shareable images - LIBGTK from
+ polarhome.com
+! Post 7.2 Vim uses GTK2+ while the last GTK on OpenVMS is 1.2.10, therefore
+! the GTK build is no longer available.
+
+ For more advanced questions, please send your problem to Vim on VMS mailing
+ list <vim-vms@polarhome.com>
+***************
+*** 772,780 ****
+ Version 8.0
+ - solve the 100% cpu usage issue while waiting for a keystroke
+ - correct the VMS warnings and errors around handling the INFINITY (used in json.c)
+! - minor VMS port related changes
+! - correct the make_vms.mms file for 8.0
+! - fix [.TESTDIR]make_vms.mms for 8.0
+
+ Version 7.4
+ - Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name"
+--- 772,780 ----
+ Version 8.0
+ - solve the 100% cpu usage issue while waiting for a keystroke
+ - correct the VMS warnings and errors around handling the INFINITY (used in json.c)
+! - minor VMS port related changes
+! - correct the make_vms.mms file for 8.0
+! - fix [.TESTDIR]make_vms.mms for 8.0
+
+ Version 7.4
+ - Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name"
+*** ../vim-8.1.1279/runtime/doc/os_win32.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/os_win32.txt 2018-10-05 19:56:09.269238586 +0200
+***************
+*** 169,175 ****
+ ==============================================================================
+ 6. Running under Windows 3.1 *win32-win3.1*
+
+! *win32s* *windows-3.1* *gui-w32s*
+ There was a special version of gvim that runs under Windows 3.1 and 3.11.
+ Support was removed in patch 7.4.1363.
+
+--- 169,175 ----
+ ==============================================================================
+ 6. Running under Windows 3.1 *win32-win3.1*
+
+! *win32s* *windows-3.1* *gui-w32s* *win16*
+ There was a special version of gvim that runs under Windows 3.1 and 3.11.
+ Support was removed in patch 7.4.1363.
+
+***************
+*** 303,306 ****
+ 'runtimepath'. For example ~/vimfiles/bitmaps/vim.ico.
+
+
+! vim:tw=78:fo=tcq2:ts=8:ft=help:norl:
+--- 303,306 ----
+ 'runtimepath'. For example ~/vimfiles/bitmaps/vim.ico.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/pattern.txt 2019-05-04 21:08:17.119814244 +0200
+--- runtime/doc/pattern.txt 2019-05-05 17:45:17.925369384 +0200
+***************
+*** 1,4 ****
+! *pattern.txt* For Vim version 8.1. Last change: 2018 Mar 13
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *pattern.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 78,101 ****
+ 4. the first non-blank word after the cursor,
+ in the current line
+ Only whole keywords are searched for, like with the
+! command "/\<keyword\>". |exclusive| {not in Vi}
+ 'ignorecase' is used, 'smartcase' is not.
+
+ *#*
+ # Same as "*", but search backward. The pound sign
+ (character 163) also works. If the "#" key works as
+ backspace, try using "stty erase <BS>" before starting
+! Vim (<BS> is CTRL-H or a real backspace). {not in Vi}
+
+ *gstar*
+ g* Like "*", but don't put "\<" and "\>" around the word.
+ This makes the search also find matches that are not a
+! whole word. {not in Vi}
+
+ *g#*
+ g# Like "#", but don't put "\<" and "\>" around the word.
+ This makes the search also find matches that are not a
+! whole word. {not in Vi}
+
+ *gd*
+ gd Goto local Declaration. When the cursor is on a local
+--- 78,101 ----
+ 4. the first non-blank word after the cursor,
+ in the current line
+ Only whole keywords are searched for, like with the
+! command "/\<keyword\>". |exclusive|
+ 'ignorecase' is used, 'smartcase' is not.
+
+ *#*
+ # Same as "*", but search backward. The pound sign
+ (character 163) also works. If the "#" key works as
+ backspace, try using "stty erase <BS>" before starting
+! Vim (<BS> is CTRL-H or a real backspace).
+
+ *gstar*
+ g* Like "*", but don't put "\<" and "\>" around the word.
+ This makes the search also find matches that are not a
+! whole word.
+
+ *g#*
+ g# Like "#", but don't put "\<" and "\>" around the word.
+ This makes the search also find matches that are not a
+! whole word.
+
+ *gd*
+ gd Goto local Declaration. When the cursor is on a local
+***************
+*** 113,134 ****
+ searched use the commands listed in |include-search|.
+ After this command |n| searches forward for the next
+ match (not backward).
+- {not in Vi}
+
+ *gD*
+ gD Goto global Declaration. When the cursor is on a
+ global variable that is defined in the file, this
+ command will jump to its declaration. This works just
+ like "gd", except that the search for the keyword
+! always starts in line 1. {not in Vi}
+
+ *1gd*
+ 1gd Like "gd", but ignore matches inside a {} block that
+! ends before the cursor position. {not in Vi}
+
+ *1gD*
+ 1gD Like "gD", but ignore matches inside a {} block that
+! ends before the cursor position. {not in Vi}
+
+ *CTRL-C*
+ CTRL-C Interrupt current (search) command. Use CTRL-Break on
+--- 113,133 ----
+ searched use the commands listed in |include-search|.
+ After this command |n| searches forward for the next
+ match (not backward).
+
+ *gD*
+ gD Goto global Declaration. When the cursor is on a
+ global variable that is defined in the file, this
+ command will jump to its declaration. This works just
+ like "gd", except that the search for the keyword
+! always starts in line 1.
+
+ *1gd*
+ 1gd Like "gd", but ignore matches inside a {} block that
+! ends before the cursor position.
+
+ *1gD*
+ 1gD Like "gD", but ignore matches inside a {} block that
+! ends before the cursor position.
+
+ *CTRL-C*
+ CTRL-C Interrupt current (search) command. Use CTRL-Break on
+***************
+*** 171,177 ****
+ *search-offset* *{offset}*
+ These commands search for the specified pattern. With "/" and "?" an
+ additional offset may be given. There are two types of offsets: line offsets
+! and character offsets. {the character offsets are not in Vi}
+
+ The offset gives the cursor position relative to the found match:
+ [num] [num] lines downwards, in column 1
+--- 170,176 ----
+ *search-offset* *{offset}*
+ These commands search for the specified pattern. With "/" and "?" an
+ additional offset may be given. There are two types of offsets: line offsets
+! and character offsets.
+
+ The offset gives the cursor position relative to the found match:
+ [num] [num] lines downwards, in column 1
+***************
+*** 409,419 ****
+ ignoring the actual value of the 'magic' option.
+ Use of "\M" makes the pattern after it be interpreted as if 'nomagic' is used.
+ */\v* */\V*
+! Use of "\v" means that in the pattern after it all ASCII characters except
+! '0'-'9', 'a'-'z', 'A'-'Z' and '_' have a special meaning. "very magic"
+
+! Use of "\V" means that in the pattern after it only the backslash and the
+! terminating character (/ or ?) has a special meaning. "very nomagic"
+
+ Examples:
+ after: \v \m \M \V matches ~
+--- 408,418 ----
+ ignoring the actual value of the 'magic' option.
+ Use of "\M" makes the pattern after it be interpreted as if 'nomagic' is used.
+ */\v* */\V*
+! Use of "\v" means that after it, all ASCII characters except '0'-'9', 'a'-'z',
+! 'A'-'Z' and '_' have special meaning: "very magic"
+
+! Use of "\V" means that after it, only a backslash and terminating character
+! (usually / or ?) have special meaning: "very nomagic"
+
+ Examples:
+ after: \v \m \M \V matches ~
+***************
+*** 447,476 ****
+ multi ~
+ 'magic' 'nomagic' matches of the preceding atom ~
+ |/star| * \* 0 or more as many as possible
+! |/\+| \+ \+ 1 or more as many as possible (*)
+! |/\=| \= \= 0 or 1 as many as possible (*)
+! |/\?| \? \? 0 or 1 as many as possible (*)
+!
+! |/\{| \{n,m} \{n,m} n to m as many as possible (*)
+! \{n} \{n} n exactly (*)
+! \{n,} \{n,} at least n as many as possible (*)
+! \{,m} \{,m} 0 to m as many as possible (*)
+! \{} \{} 0 or more as many as possible (same as *) (*)
+!
+! |/\{-| \{-n,m} \{-n,m} n to m as few as possible (*)
+! \{-n} \{-n} n exactly (*)
+! \{-n,} \{-n,} at least n as few as possible (*)
+! \{-,m} \{-,m} 0 to m as few as possible (*)
+! \{-} \{-} 0 or more as few as possible (*)
+
+ *E59*
+! |/\@>| \@> \@> 1, like matching a whole pattern (*)
+! |/\@=| \@= \@= nothing, requires a match |/zero-width| (*)
+! |/\@!| \@! \@! nothing, requires NO match |/zero-width| (*)
+! |/\@<=| \@<= \@<= nothing, requires a match behind |/zero-width| (*)
+! |/\@<!| \@<! \@<! nothing, requires NO match behind |/zero-width| (*)
+!
+! (*) {not in Vi}
+
+
+ Overview of ordinary atoms. */ordinary-atom*
+--- 446,473 ----
+ multi ~
+ 'magic' 'nomagic' matches of the preceding atom ~
+ |/star| * \* 0 or more as many as possible
+! |/\+| \+ \+ 1 or more as many as possible
+! |/\=| \= \= 0 or 1 as many as possible
+! |/\?| \? \? 0 or 1 as many as possible
+!
+! |/\{| \{n,m} \{n,m} n to m as many as possible
+! \{n} \{n} n exactly
+! \{n,} \{n,} at least n as many as possible
+! \{,m} \{,m} 0 to m as many as possible
+! \{} \{} 0 or more as many as possible (same as *)
+!
+! |/\{-| \{-n,m} \{-n,m} n to m as few as possible
+! \{-n} \{-n} n exactly
+! \{-n,} \{-n,} at least n as few as possible
+! \{-,m} \{-,m} 0 to m as few as possible
+! \{-} \{-} 0 or more as few as possible
+
+ *E59*
+! |/\@>| \@> \@> 1, like matching a whole pattern
+! |/\@=| \@= \@= nothing, requires a match |/zero-width|
+! |/\@!| \@! \@! nothing, requires NO match |/zero-width|
+! |/\@<=| \@<= \@<= nothing, requires a match behind |/zero-width|
+! |/\@<!| \@<! \@<! nothing, requires NO match behind |/zero-width|
+
+
+ Overview of ordinary atoms. */ordinary-atom*
+***************
+*** 499,505 ****
+ |/\%c| \%23c \%23c in column 23 |/zero-width|
+ |/\%v| \%23v \%23v in virtual column 23 |/zero-width|
+
+! Character classes {not in Vi}: */character-classes*
+ magic nomagic matches ~
+ |/\i| \i \i identifier character (see 'isident' option)
+ |/\I| \I \I like "\i", but excluding digits
+--- 496,502 ----
+ |/\%c| \%23c \%23c in column 23 |/zero-width|
+ |/\%v| \%23v \%23v in virtual column 23 |/zero-width|
+
+! Character classes: */character-classes*
+ magic nomagic matches ~
+ |/\i| \i \i identifier character (see 'isident' option)
+ |/\I| \I \I like "\i", but excluding digits
+***************
+*** 538,544 ****
+ |/\b| \b \b <BS>
+ |/\n| \n \n end-of-line
+ |/~| ~ \~ last given substitute string
+! |/\1| \1 \1 same string as matched by first \(\) {not in Vi}
+ |/\2| \2 \2 Like "\1", but uses second \(\)
+ ...
+ |/\9| \9 \9 Like "\1", but uses ninth \(\)
+--- 535,541 ----
+ |/\b| \b \b <BS>
+ |/\n| \n \n end-of-line
+ |/~| ~ \~ last given substitute string
+! |/\1| \1 \1 same string as matched by first \(\)
+ |/\2| \2 \2 Like "\1", but uses second \(\)
+ ...
+ |/\9| \9 \9 Like "\1", but uses ninth \(\)
+***************
+*** 616,635 ****
+ character at a time.
+
+ */\+*
+! \+ Matches 1 or more of the preceding atom, as many as possible. {not in
+! Vi}
+ Example matches ~
+ ^.\+$ any non-empty line
+ \s\+ white space of at least one character
+
+ */\=*
+! \= Matches 0 or 1 of the preceding atom, as many as possible. {not in Vi}
+ Example matches ~
+ foo\= "fo" and "foo"
+
+ */\?*
+ \? Just like \=. Cannot be used when searching backwards with the "?"
+! command. {not in Vi}
+
+ */\{* *E60* *E554* *E870*
+ \{n,m} Matches n to m of the preceding atom, as many as possible
+--- 613,631 ----
+ character at a time.
+
+ */\+*
+! \+ Matches 1 or more of the preceding atom, as many as possible.
+ Example matches ~
+ ^.\+$ any non-empty line
+ \s\+ white space of at least one character
+
+ */\=*
+! \= Matches 0 or 1 of the preceding atom, as many as possible.
+ Example matches ~
+ foo\= "fo" and "foo"
+
+ */\?*
+ \? Just like \=. Cannot be used when searching backwards with the "?"
+! command.
+
+ */\{* *E60* *E554* *E870*
+ \{n,m} Matches n to m of the preceding atom, as many as possible
+***************
+*** 643,649 ****
+ \{-n,} matches at least n of the preceding atom, as few as possible
+ \{-,m} matches 0 to m of the preceding atom, as few as possible
+ \{-} matches 0 or more of the preceding atom, as few as possible
+- {Vi does not have any of these}
+
+ n and m are positive decimal numbers or zero
+ *non-greedy*
+--- 639,644 ----
+***************
+*** 666,672 ****
+ The } may optionally be preceded with a backslash: \{n,m\}.
+
+ */\@=*
+! \@= Matches the preceding atom with zero width. {not in Vi}
+ Like "(?=pattern)" in Perl.
+ Example matches ~
+ foo\(bar\)\@= "foo" in "foobar"
+--- 661,667 ----
+ The } may optionally be preceded with a backslash: \{n,m\}.
+
+ */\@=*
+! \@= Matches the preceding atom with zero width.
+ Like "(?=pattern)" in Perl.
+ Example matches ~
+ foo\(bar\)\@= "foo" in "foobar"
+***************
+*** 686,692 ****
+
+ */\@!*
+ \@! Matches with zero width if the preceding atom does NOT match at the
+! current position. |/zero-width| {not in Vi}
+ Like "(?!pattern)" in Perl.
+ Example matches ~
+ foo\(bar\)\@! any "foo" not followed by "bar"
+--- 681,687 ----
+
+ */\@!*
+ \@! Matches with zero width if the preceding atom does NOT match at the
+! current position. |/zero-width|
+ Like "(?!pattern)" in Perl.
+ Example matches ~
+ foo\(bar\)\@! any "foo" not followed by "bar"
+***************
+*** 716,722 ****
+
+ */\@<=*
+ \@<= Matches with zero width if the preceding atom matches just before what
+! follows. |/zero-width| {not in Vi}
+ Like "(?<=pattern)" in Perl, but Vim allows non-fixed-width patterns.
+ Example matches ~
+ \(an\_s\+\)\@<=file "file" after "an" and white space or an
+--- 711,717 ----
+
+ */\@<=*
+ \@<= Matches with zero width if the preceding atom matches just before what
+! follows. |/zero-width|
+ Like "(?<=pattern)" in Perl, but Vim allows non-fixed-width patterns.
+ Example matches ~
+ \(an\_s\+\)\@<=file "file" after "an" and white space or an
+***************
+*** 760,766 ****
+ \@<! Matches with zero width if the preceding atom does NOT match just
+ before what follows. Thus this matches if there is no position in the
+ current or previous line where the atom matches such that it ends just
+! before what follows. |/zero-width| {not in Vi}
+ Like "(?<!pattern)" in Perl, but Vim allows non-fixed-width patterns.
+ The match with the preceding atom is made to end just before the match
+ with what follows, thus an atom that ends in ".*" will work.
+--- 755,761 ----
+ \@<! Matches with zero width if the preceding atom does NOT match just
+ before what follows. Thus this matches if there is no position in the
+ current or previous line where the atom matches such that it ends just
+! before what follows. |/zero-width|
+ Like "(?<!pattern)" in Perl, but Vim allows non-fixed-width patterns.
+ The match with the preceding atom is made to end just before the match
+ with what follows, thus an atom that ends in ".*" will work.
+***************
+*** 776,782 ****
+ slow.
+
+ */\@>*
+! \@> Matches the preceding atom like matching a whole pattern. {not in Vi}
+ Like "(?>pattern)" in Perl.
+ Example matches ~
+ \(a*\)\@>a nothing (the "a*" takes all the "a"'s, there can't be
+--- 771,777 ----
+ slow.
+
+ */\@>*
+! \@> Matches the preceding atom like matching a whole pattern.
+ Like "(?>pattern)" in Perl.
+ Example matches ~
+ \(a*\)\@>a nothing (the "a*" takes all the "a"'s, there can't be
+***************
+*** 855,861 ****
+ /\(.\{-}\zsFab\)\{3}
+ < Finds the third occurrence of "Fab".
+ This cannot be followed by a multi. *E888*
+! {not in Vi} {not available when compiled without the |+syntax| feature}
+ */\ze*
+ \ze Matches at any position, and sets the end of the match there: The
+ previous char is the last char of the whole match. |/zero-width|
+--- 850,856 ----
+ /\(.\{-}\zsFab\)\{3}
+ < Finds the third occurrence of "Fab".
+ This cannot be followed by a multi. *E888*
+! {not available when compiled without the |+syntax| feature}
+ */\ze*
+ \ze Matches at any position, and sets the end of the match there: The
+ previous char is the last char of the whole match. |/zero-width|
+***************
+*** 864,880 ****
+ Example: "end\ze\(if\|for\)" matches the "end" in "endif" and
+ "endfor".
+ This cannot be followed by a multi. |E888|
+! {not in Vi} {not available when compiled without the |+syntax| feature}
+
+ */\%^* *start-of-file*
+ \%^ Matches start of the file. When matching with a string, matches the
+! start of the string. {not in Vi}
+ For example, to find the first "VIM" in a file: >
+ /\%^\_.\{-}\zsVIM
+ <
+ */\%$* *end-of-file*
+ \%$ Matches end of the file. When matching with a string, matches the
+! end of the string. {not in Vi}
+ Note that this does NOT find the last "VIM" in a file: >
+ /VIM\_.\{-}\%$
+ < It will find the next VIM, because the part after it will always
+--- 859,875 ----
+ Example: "end\ze\(if\|for\)" matches the "end" in "endif" and
+ "endfor".
+ This cannot be followed by a multi. |E888|
+! {not available when compiled without the |+syntax| feature}
+
+ */\%^* *start-of-file*
+ \%^ Matches start of the file. When matching with a string, matches the
+! start of the string.
+ For example, to find the first "VIM" in a file: >
+ /\%^\_.\{-}\zsVIM
+ <
+ */\%$* *end-of-file*
+ \%$ Matches end of the file. When matching with a string, matches the
+! end of the string.
+ Note that this does NOT find the last "VIM" in a file: >
+ /VIM\_.\{-}\%$
+ < It will find the next VIM, because the part after it will always
+***************
+*** 898,904 ****
+
+ */\%#* *cursor-position*
+ \%# Matches with the cursor position. Only works when matching in a
+! buffer displayed in a window. {not in Vi}
+ WARNING: When the cursor is moved after the pattern was used, the
+ result becomes invalid. Vim doesn't automatically update the matches.
+ This is especially relevant for syntax highlighting and 'hlsearch'.
+--- 893,899 ----
+
+ */\%#* *cursor-position*
+ \%# Matches with the cursor position. Only works when matching in a
+! buffer displayed in a window.
+ WARNING: When the cursor is moved after the pattern was used, the
+ result becomes invalid. Vim doesn't automatically update the matches.
+ This is especially relevant for syntax highlighting and 'hlsearch'.
+***************
+*** 919,925 ****
+ < Note that two dots are required to include mark 'e in the match. That
+ is because "\%<'e" matches at the character before the 'e mark, and
+ since it's a |/zero-width| match it doesn't include that character.
+- {not in Vi}
+ WARNING: When the mark is moved after the pattern was used, the result
+ becomes invalid. Vim doesn't automatically update the matches.
+ Similar to moving the cursor for "\%#" |/\%#|.
+--- 914,919 ----
+***************
+*** 929,935 ****
+ \%<23l Matches above a specific line (lower line number).
+ \%>23l Matches below a specific line (higher line number).
+ These three can be used to match specific lines in a buffer. The "23"
+! can be any line number. The first line is 1. {not in Vi}
+ WARNING: When inserting or deleting lines Vim does not automatically
+ update the matches. This means Syntax highlighting quickly becomes
+ wrong.
+--- 923,929 ----
+ \%<23l Matches above a specific line (lower line number).
+ \%>23l Matches below a specific line (higher line number).
+ These three can be used to match specific lines in a buffer. The "23"
+! can be any line number. The first line is 1.
+ WARNING: When inserting or deleting lines Vim does not automatically
+ update the matches. This means Syntax highlighting quickly becomes
+ wrong.
+***************
+*** 945,951 ****
+ These three can be used to match specific columns in a buffer or
+ string. The "23" can be any column number. The first column is 1.
+ Actually, the column is the byte number (thus it's not exactly right
+! for multi-byte characters). {not in Vi}
+ WARNING: When inserting or deleting text Vim does not automatically
+ update the matches. This means Syntax highlighting quickly becomes
+ wrong.
+--- 939,945 ----
+ These three can be used to match specific columns in a buffer or
+ string. The "23" can be any column number. The first column is 1.
+ Actually, the column is the byte number (thus it's not exactly right
+! for multi-byte characters).
+ WARNING: When inserting or deleting text Vim does not automatically
+ update the matches. This means Syntax highlighting quickly becomes
+ wrong.
+***************
+*** 967,973 ****
+ The "23" can be any column number. The first column is 1.
+ Note that some virtual column positions will never match, because they
+ are halfway through a tab or other character that occupies more than
+! one screen character. {not in Vi}
+ WARNING: When inserting or deleting text Vim does not automatically
+ update highlighted matches. This means Syntax highlighting quickly
+ becomes wrong.
+--- 961,967 ----
+ The "23" can be any column number. The first column is 1.
+ Note that some virtual column positions will never match, because they
+ are halfway through a tab or other character that occupies more than
+! one screen character.
+ WARNING: When inserting or deleting text Vim does not automatically
+ update highlighted matches. This means Syntax highlighting quickly
+ becomes wrong.
+***************
+*** 990,996 ****
+ where ".*" matches zero characters.
+ <
+
+! Character classes: {not in Vi}
+ \i identifier character (see 'isident' option) */\i*
+ \I like "\i", but excluding digits */\I*
+ \k keyword character (see 'iskeyword' option) */\k*
+--- 984,990 ----
+ where ".*" matches zero characters.
+ <
+
+! Character classes:
+ \i identifier character (see 'isident' option) */\i*
+ \I like "\i", but excluding digits */\I*
+ \k keyword character (see 'iskeyword' option) */\k*
+***************
+*** 1050,1056 ****
+ *E51* *E54* *E55* *E872* *E873*
+
+ \1 Matches the same string that was matched by */\1* *E65*
+! the first sub-expression in \( and \). {not in Vi}
+ Example: "\([a-z]\).\1" matches "ata", "ehe", "tot", etc.
+ \2 Like "\1", but uses second sub-expression, */\2*
+ ... */\3*
+--- 1044,1050 ----
+ *E51* *E54* *E55* *E872* *E873*
+
+ \1 Matches the same string that was matched by */\1* *E65*
+! the first sub-expression in \( and \).
+ Example: "\([a-z]\).\1" matches "ata", "ehe", "tot", etc.
+ \2 Like "\1", but uses second sub-expression, */\2*
+ ... */\3*
+***************
+*** 1062,1068 ****
+ \%(\) A pattern enclosed by escaped parentheses. */\%(\)* */\%(* *E53*
+ Just like \(\), but without counting it as a sub-expression. This
+ allows using more groups and it's a little bit faster.
+- {not in Vi}
+
+ x A single character, with no special meaning, matches itself
+
+--- 1056,1061 ----
+***************
+*** 1146,1152 ****
+ The "Func" column shows what library function is used. The
+ implementation depends on the system. Otherwise:
+ (1) Uses islower() for ASCII and Vim builtin rules for other
+! characters when built with the |+multi_byte| feature.
+ (2) Uses Vim builtin rules
+ (3) As with (1) but using isupper()
+ */[[=* *[==]*
+--- 1139,1145 ----
+ The "Func" column shows what library function is used. The
+ implementation depends on the system. Otherwise:
+ (1) Uses islower() for ASCII and Vim builtin rules for other
+! characters.
+ (2) Uses Vim builtin rules
+ (3) As with (1) but using isupper()
+ */[[=* *[==]*
+***************
+*** 1163,1169 ****
+ backslash before it: "[xyz\]]", "[\^xyz]", "[xy\-z]" and "[xyz\\]".
+ (Note: POSIX does not support the use of a backslash this way). For
+ ']' you can also make it the first character (following a possible
+! "^"): "[]xyz]" or "[^]xyz]" {not in Vi}.
+ For '-' you can also make it the first or last character: "[-xyz]",
+ "[^-xyz]" or "[xyz-]". For '\' you can also let it be followed by
+ any character that's not in "^]-\bdertnoUux". "[\xyz]" matches '\',
+--- 1156,1162 ----
+ backslash before it: "[xyz\]]", "[\^xyz]", "[xy\-z]" and "[xyz\\]".
+ (Note: POSIX does not support the use of a backslash this way). For
+ ']' you can also make it the first character (following a possible
+! "^"): "[]xyz]" or "[^]xyz]".
+ For '-' you can also make it the first or last character: "[-xyz]",
+ "[^-xyz]" or "[xyz-]". For '\' you can also let it be followed by
+ any character that's not in "^]-\bdertnoUux". "[\xyz]" matches '\',
+***************
+*** 1172,1178 ****
+ - Omitting the trailing ] is not considered an error. "[]" works like
+ "[]]", it matches the ']' character.
+ - The following translations are accepted when the 'l' flag is not
+! included in 'cpoptions' {not in Vi}:
+ \e <Esc>
+ \t <Tab>
+ \r <CR> (NOT end-of-line!)
+--- 1165,1171 ----
+ - Omitting the trailing ] is not considered an error. "[]" works like
+ "[]]", it matches the ']' character.
+ - The following translations are accepted when the 'l' flag is not
+! included in 'cpoptions':
+ \e <Esc>
+ \t <Tab>
+ \r <CR> (NOT end-of-line!)
+***************
+*** 1222,1228 ****
+ \%u20AC Matches the character specified with up to four hexadecimal
+ characters.
+ \%U1234abcd Matches the character specified with up to eight hexadecimal
+! characters.
+
+ ==============================================================================
+ 7. Ignoring case in a pattern */ignorecase*
+--- 1215,1221 ----
+ \%u20AC Matches the character specified with up to four hexadecimal
+ characters.
+ \%U1234abcd Matches the character specified with up to eight hexadecimal
+! characters, up to 0x7fffffff
+
+ ==============================================================================
+ 7. Ignoring case in a pattern */ignorecase*
+***************
+*** 1253,1259 ****
+ "CTRL-V 000". This is probably just what you expect. Internally the
+ character is replaced with a <NL> in the search pattern. What is unusual is
+ that typing CTRL-V CTRL-J also inserts a <NL>, thus also searches for a <Nul>
+! in the file. {Vi cannot handle <Nul> characters in the file at all}
+
+ *CR-used-for-NL*
+ When 'fileformat' is "mac", <NL> characters in the file are stored as <CR>
+--- 1246,1252 ----
+ "CTRL-V 000". This is probably just what you expect. Internally the
+ character is replaced with a <NL> in the search pattern. What is unusual is
+ that typing CTRL-V CTRL-J also inserts a <NL>, thus also searches for a <Nul>
+! in the file.
+
+ *CR-used-for-NL*
+ When 'fileformat' is "mac", <NL> characters in the file are stored as <CR>
+***************
+*** 1431,1434 ****
+ ":2match" for another plugin.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1424,1427 ----
+ ":2match" for another plugin.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/pi_getscript.txt 2018-05-17 13:41:49.000000000 +0200
+--- runtime/doc/pi_getscript.txt 2018-07-29 14:23:36.367157551 +0200
+***************
+*** 479,482 ****
+ and they became numbers. Fixes comparison.
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:fdm=marker
+--- 479,482 ----
+ and they became numbers. Fixes comparison.
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:fdm=marker
+*** ../vim-8.1.1279/runtime/doc/pi_gzip.txt 2018-05-17 13:41:55.000000000 +0200
+--- runtime/doc/pi_gzip.txt 2019-05-05 17:45:27.805313884 +0200
+***************
+*** 1,4 ****
+! *pi_gzip.txt* For Vim version 8.1. Last change: 2016 Nov 06
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *pi_gzip.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 13,20 ****
+ You can avoid loading this plugin by setting the "loaded_gzip" variable: >
+ :let loaded_gzip = 1
+
+- {Vi does not have any of this}
+-
+ ==============================================================================
+ 1. Autocommands *gzip-autocmd*
+
+--- 13,18 ----
+***************
+*** 40,43 ****
+ decompression. You have to rename the file if you want this.
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 38,41 ----
+ decompression. You have to rename the file if you want this.
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/pi_logipat.txt 2016-12-12 23:11:48.000000000 +0100
+--- runtime/doc/pi_logipat.txt 2018-07-29 14:23:36.367157551 +0200
+***************
+*** 118,121 ****
+
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help
+--- 118,121 ----
+
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help
+*** ../vim-8.1.1279/runtime/doc/pi_netrw.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/pi_netrw.txt 2019-05-05 17:45:35.061273108 +0200
+***************
+*** 1,4 ****
+! *pi_netrw.txt* For Vim version 8.1. Last change: 2017 Nov 03
+
+ ------------------------------------------------
+ NETRW REFERENCE MANUAL by Charles E. Campbell
+--- 1,4 ----
+! *pi_netrw.txt* For Vim version 8.1. Last change: 2019 May 05
+
+ ------------------------------------------------
+ NETRW REFERENCE MANUAL by Charles E. Campbell
+***************
+*** 114,121 ****
+ 13. Todo..................................................|netrw-todo|
+ 14. Credits...............................................|netrw-credits|
+
+- {Vi does not have any of this}
+-
+ ==============================================================================
+ 2. Starting With Netrw *netrw-start* {{{1
+
+--- 114,119 ----
+***************
+*** 3504,3510 ****
+ - Click "Add..."
+ - Set External Editor (adjust path as needed, include
+ the quotes and !.! at the end):
+! "c:\Program Files\Vim\vim70\gvim.exe" !.!
+ - Check that the filetype in the box below is
+ {asterisk}.{asterisk} (all files), or whatever types
+ you want (cec: change {asterisk} to * ; I had to
+--- 3502,3508 ----
+ - Click "Add..."
+ - Set External Editor (adjust path as needed, include
+ the quotes and !.! at the end):
+! "c:\Program Files\Vim\vim81\gvim.exe" !.!
+ - Check that the filetype in the box below is
+ {asterisk}.{asterisk} (all files), or whatever types
+ you want (cec: change {asterisk} to * ; I had to
+***************
+*** 3754,3761 ****
+
+ The <netrw.vim> script is typically installed on systems as something like:
+ >
+! /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
+! /usr/local/share/vim/vim7x/autoload/netrw.vim
+ (see output of :echo &rtp)
+ <
+ which is loaded automatically at startup (assuming :set nocp). If you
+--- 3752,3759 ----
+
+ The <netrw.vim> script is typically installed on systems as something like:
+ >
+! /usr/local/share/vim/vim8x/plugin/netrwPlugin.vim
+! /usr/local/share/vim/vim8x/autoload/netrw.vim
+ (see output of :echo &rtp)
+ <
+ which is loaded automatically at startup (assuming :set nocp). If you
+***************
+*** 4267,4270 ****
+
+ ==============================================================================
+ Modelines: {{{1
+! vim:tw=78:ts=8:ft=help:norl:fdm=marker
+--- 4265,4268 ----
+
+ ==============================================================================
+ Modelines: {{{1
+! vim:tw=78:ts=8:noet:ft=help:norl:fdm=marker
+*** ../vim-8.1.1279/runtime/doc/pi_paren.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/pi_paren.txt 2018-07-29 14:23:36.371157528 +0200
+***************
+*** 57,60 ****
+ different mechanism.
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 57,60 ----
+ different mechanism.
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/pi_spec.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/pi_spec.txt 2018-07-29 14:23:36.371157528 +0200
+***************
+*** 108,111 ****
+
+ Good luck!!
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 108,111 ----
+
+ Good luck!!
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/pi_tar.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/pi_tar.txt 2018-07-29 14:23:36.371157528 +0200
+***************
+*** 148,151 ****
+ v1 (original) * Michael Toren (see http://michael.toren.net/code/)
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help
+--- 148,151 ----
+ v1 (original) * Michael Toren (see http://michael.toren.net/code/)
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help
+*** ../vim-8.1.1279/runtime/doc/pi_vimball.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/pi_vimball.txt 2018-07-29 14:23:36.371157528 +0200
+***************
+*** 273,276 ****
+
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:fdm=marker
+--- 273,276 ----
+
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:fdm=marker
+*** ../vim-8.1.1279/runtime/doc/pi_zip.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/pi_zip.txt 2018-07-29 14:23:36.371157528 +0200
+***************
+*** 149,152 ****
+ v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:fdm=marker
+--- 149,152 ----
+ v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:fdm=marker
+*** ../vim-8.1.1279/runtime/doc/print.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/print.txt 2019-05-05 17:45:42.337232214 +0200
+***************
+*** 1,4 ****
+! *print.txt* For Vim version 8.1. Last change: 2010 Jul 20
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *print.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 15,21 ****
+ 7. PostScript Utilities |postscript-print-util|
+ 8. Formfeed Characters |printing-formfeed|
+
+- {Vi has None of this}
+ {only available when compiled with the |+printer| feature}
+
+ ==============================================================================
+--- 15,20 ----
+***************
+*** 46,51 ****
+--- 45,52 ----
+ 'printexpr' through |v:cmdarg|. Otherwise [arguments]
+ is ignored. 'printoptions' can be used to specify
+ paper size, duplex, etc.
++ Note: If you want PDF, there are tools such as
++ "ps2pdf" that can convert the PostScript to PDF.
+
+ :[range]ha[rdcopy][!] >{filename}
+ As above, but write the resulting PostScript in file
+***************
+*** 109,118 ****
+ replaced with '-' signs.
+
+ If 'printencoding' is empty or Vim cannot find the file then it will use
+! 'encoding' (if Vim is compiled with |+multi_byte| and it is set an 8-bit
+! encoding) to find the print character encoding file. If Vim is unable to find
+! a character encoding file then it will use the "latin1" print character
+! encoding file.
+
+ When 'encoding' is set to a multi-byte encoding, Vim will try to convert
+ characters to the printing encoding for printing (if 'printencoding' is empty
+--- 110,118 ----
+ replaced with '-' signs.
+
+ If 'printencoding' is empty or Vim cannot find the file then it will use
+! 'encoding' (if it is set an 8-bit encoding) to find the print character
+! encoding file. If Vim is unable to find a character encoding file then it
+! will use the "latin1" print character encoding file.
+
+ When 'encoding' is set to a multi-byte encoding, Vim will try to convert
+ characters to the printing encoding for printing (if 'printencoding' is empty
+***************
+*** 253,261 ****
+ Japanese JIS_C_1978 x x
+ JIS_X_1983 x x
+ JIS_X_1990 x x x
+! MSWINDOWS x
+! KANJITALK6 x
+! KANJITALK7 x
+
+ euc-kr cp949 ucs-2 utf-8 ~
+ Korean KS_X_1992 x
+--- 253,261 ----
+ Japanese JIS_C_1978 x x
+ JIS_X_1983 x x
+ JIS_X_1990 x x x
+! MSWINDOWS x
+! KANJITALK6 x
+! KANJITALK7 x
+
+ euc-kr cp949 ucs-2 utf-8 ~
+ Korean KS_X_1992 x
+***************
+*** 752,755 ****
+ accidental blank pages.
+
+ ==============================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 752,755 ----
+ accidental blank pages.
+
+ ==============================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/quickfix.txt 2019-05-05 15:02:26.176319819 +0200
+--- runtime/doc/quickfix.txt 2019-05-05 17:45:50.533186142 +0200
+***************
+*** 1,4 ****
+! *quickfix.txt* For Vim version 8.1. Last change: 2018 May 01
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *quickfix.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 16,23 ****
+ 8. The directory stack |quickfix-directory-stack|
+ 9. Specific error file formats |errorformats|
+
+- {Vi does not have any of these commands}
+-
+ The quickfix commands are not available when the |+quickfix| feature was
+ disabled at compile time.
+
+--- 16,21 ----
+***************
+*** 502,508 ****
+ autocommand event is disabled by adding it to
+ 'eventignore'. This considerably speeds up editing
+ each buffer.
+- {not in Vi}
+ Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
+ |:ldo|, |:cfdo| and |:lfdo|.
+
+--- 500,505 ----
+***************
+*** 515,521 ****
+ :{cmd}
+ etc.
+ < Otherwise it works the same as `:cdo`.
+- {not in Vi}
+
+ *:ldo*
+ :ld[o][!] {cmd} Execute {cmd} in each valid entry in the location list
+--- 512,517 ----
+***************
+*** 528,534 ****
+ etc.
+ < Only valid entries in the location list are used.
+ Otherwise it works the same as `:cdo`.
+- {not in Vi}
+
+ *:lfdo*
+ :lfdo[!] {cmd} Execute {cmd} in each file in the location list for
+--- 524,529 ----
+***************
+*** 540,546 ****
+ :{cmd}
+ etc.
+ < Otherwise it works the same as `:ldo`.
+- {not in Vi}
+
+ =============================================================================
+ 2. The error window *quickfix-window*
+--- 535,540 ----
+***************
+*** 1906,1909 ****
+
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1900,1903 ----
+
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/quickref.txt 2019-02-16 15:09:21.225946157 +0100
+--- runtime/doc/quickref.txt 2019-04-28 19:50:54.104620388 +0200
+***************
+*** 1,4 ****
+! *quickref.txt* For Vim version 8.1. Last change: 2018 Apr 18
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *quickref.txt* For Vim version 8.1. Last change: 2019 Apr 28
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 600,605 ****
+--- 600,606 ----
+ Short explanation of each option: *option-list*
+ 'aleph' 'al' ASCII code of the letter Aleph (Hebrew)
+ 'allowrevins' 'ari' allow CTRL-_ in Insert and Command-line mode
++ 'altkeymap' 'akm' obsolete option for Farsi
+ 'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
+ 'antialias' 'anti' Mac OS X: use smooth, antialiased fonts
+ 'autochdir' 'acd' change directory to the file in the current window
+***************
+*** 699,704 ****
+--- 700,706 ----
+ 'filetype' 'ft' type of file, used for autocommands
+ 'fillchars' 'fcs' characters to use for displaying special items
+ 'fixendofline' 'fixeol' make sure last line in file has <EOL>
++ 'fkmap' 'fk' obsolete option for Farsi
+ 'foldclose' 'fcl' close a fold when the cursor leaves it
+ 'foldcolumn' 'fdc' width of the column used to indicate folds
+ 'foldenable' 'fen' set to display all folds open
+***************
+*** 767,772 ****
+--- 769,775 ----
+ 'keywordprg' 'kp' program to use for the "K" command
+ 'langmap' 'lmap' alphabetic characters for other language mode
+ 'langmenu' 'lm' language to be used for the menus
++ 'langnoremap' 'lnr' do not apply 'langmap' to mapped characters
+ 'langremap' 'lrm' do apply 'langmap' to mapped characters
+ 'laststatus' 'ls' tells when last window has status lines
+ 'lazyredraw' 'lz' don't redraw while executing macros
+***************
+*** 779,786 ****
+ 'listchars' 'lcs' characters for displaying in list mode
+ 'loadplugins' 'lpl' load plugin scripts when starting up
+ 'luadll' name of the Lua dynamic library
+- 'mzschemedll' name of the MzScheme dynamic library
+- 'mzschemegcdll' name of the MzScheme dynamic library for GC
+ 'macatsui' Mac GUI: use ATSUI text drawing
+ 'magic' changes special characters in search patterns
+ 'makeef' 'mef' name of the errorfile for ":make"
+--- 782,787 ----
+***************
+*** 808,813 ****
+--- 809,816 ----
+ 'mouseshape' 'mouses' shape of the mouse pointer in different modes
+ 'mousetime' 'mouset' max time between mouse double-click
+ 'mzquantum' 'mzq' the interval between polls for MzScheme threads
++ 'mzschemedll' name of the MzScheme dynamic library
++ 'mzschemegcdll' name of the MzScheme dynamic library for GC
+ 'nrformats' 'nf' number formats recognized for CTRL-A command
+ 'number' 'nu' print the line number in front of each line
+ 'numberwidth' 'nuw' number of columns used for the line number
+***************
+*** 916,921 ****
+--- 919,925 ----
+ 'tabstop' 'ts' number of spaces that <Tab> in file uses
+ 'tagbsearch' 'tbs' use binary searching in tags files
+ 'tagcase' 'tc' how to handle case when searching in tags files
++ 'tagfunc' 'tfu' function to get list of tag matches
+ 'taglength' 'tl' number of significant characters for a tag
+ 'tagrelative' 'tr' file names in tag file are relative
+ 'tags' 'tag' list of file names used by the tag command
+***************
+*** 1446,1449 ****
+ |zN| zN fold normal set 'foldenable'
+ |zi| zi invert 'foldenable'
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1450,1453 ----
+ |zN| zN fold normal set 'foldenable'
+ |zi| zi invert 'foldenable'
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/quotes.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/quotes.txt 2018-07-29 14:23:36.371157528 +0200
+***************
+*** 272,275 ****
+ |____/ |_| \___/|_| |_| (_|_) (Tony Nugent, Australia) `
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 272,275 ----
+ |____/ |_| \___/|_| |_| (_|_) (Tony Nugent, Australia) `
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/recover.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/recover.txt 2018-09-16 18:44:22.402360198 +0200
+***************
+*** 28,33 ****
+--- 28,36 ----
+
+ :sw[apname] *:sw* *:swapname*
+
++ Or you can use the |swapname()| function, which also allows for seeing the
++ swap file name of other buffers.
++
+ The name of the swap file is normally the same as the file you are editing,
+ with the extension ".swp".
+ - On Unix, a '.' is prepended to swap file names in the same directory as the
+***************
+*** 234,237 ****
+ file. Thus if you write the text file, you need to use that new key.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 237,240 ----
+ file. Thus if you write the text file, you need to use that new key.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/remote.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/remote.txt 2019-05-05 17:49:07.004107711 +0200
+***************
+*** 1,4 ****
+! *remote.txt* For Vim version 8.1. Last change: 2017 Nov 12
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *remote.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 10,17 ****
+ 2. X11 specific items |x11-clientserver|
+ 3. MS-Windows specific items |w32-clientserver|
+
+- {Vi does not have any of these commands}
+-
+ ==============================================================================
+ 1. Common functionality *clientserver*
+
+--- 10,15 ----
+***************
+*** 63,69 ****
+ --servername {name} Become the server {name}. When used together
+ with one of the --remote commands: connect to
+ server {name} instead of the default (see
+! below).
+ *--remote-send*
+ --remote-send {keys} Send {keys} to server and exit. The {keys}
+ are not mapped. Special key names are
+--- 61,67 ----
+ --servername {name} Become the server {name}. When used together
+ with one of the --remote commands: connect to
+ server {name} instead of the default (see
+! below). The name used will be uppercase.
+ *--remote-send*
+ --remote-send {keys} Send {keys} to server and exit. The {keys}
+ are not mapped. Special key names are
+***************
+*** 204,207 ****
+
+ start /w gvim --remote-wait file.txt
+ <
+! vim:tw=78:sw=4:ts=8:ft=help:norl:
+--- 202,205 ----
+
+ start /w gvim --remote-wait file.txt
+ <
+! vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/repeat.txt 2019-04-04 18:15:05.762857109 +0200
+--- runtime/doc/repeat.txt 2019-05-05 17:49:30.727980452 +0200
+***************
+*** 1,4 ****
+! *repeat.txt* For Vim version 8.1. Last change: 2018 Mar 04
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *repeat.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 163,174 ****
+
+ *:@:*
+ :[addr]@: Repeat last command-line. First set cursor at line
+! [addr] (default is current line). {not in Vi}
+
+ :[addr]@ *:@@*
+ :[addr]@@ Repeat the previous :@{0-9a-z"}. First set cursor at
+! line [addr] (default is current line). {Vi: only in
+! some versions}
+
+ ==============================================================================
+ 4. Using Vim scripts *using-scripts*
+--- 163,173 ----
+
+ *:@:*
+ :[addr]@: Repeat last command-line. First set cursor at line
+! [addr] (default is current line).
+
+ :[addr]@ *:@@*
+ :[addr]@@ Repeat the previous :@{0-9a-z"}. First set cursor at
+! line [addr] (default is current line).
+
+ ==============================================================================
+ 4. Using Vim scripts *using-scripts*
+***************
+*** 187,193 ****
+ |:bufdo|, in a loop or when another command follows
+ the display won't be updated while executing the
+ commands.
+- {not in Vi}
+
+ *:ru* *:runtime*
+ :ru[ntime][!] [where] {file} ..
+--- 186,191 ----
+***************
+*** 230,236 ****
+ when no file could be found.
+ When 'verbose' is two or higher, there is a message
+ about each searched file.
+- {not in Vi}
+
+ *:pa* *:packadd* *E919*
+ :pa[ckadd][!] {name} Search for an optional plugin directory in 'packpath'
+--- 228,233 ----
+***************
+*** 323,334 ****
+ set encoding=utf-8
+ scriptencoding utf-8
+ <
+- {not in Vi}
+
+ :scriptv[ersion] {version} *:scriptv* *:scriptversion*
+ *E999* *E984*
+! Specify the version of Vim for the lines that follow.
+! Does not apply to sourced scripts.
+
+ If {version} is higher than what the current Vim
+ version supports E999 will be given. You either need
+--- 320,331 ----
+ set encoding=utf-8
+ scriptencoding utf-8
+ <
+
+ :scriptv[ersion] {version} *:scriptv* *:scriptversion*
+ *E999* *E984*
+! Specify the version of Vim for the lines that follow
+! in the same file. Only applies at the toplevel of
+! sourced scripts, not inside functions.
+
+ If {version} is higher than what the current Vim
+ version supports E999 will be given. You either need
+***************
+*** 340,350 ****
+ :scr[iptnames] List all sourced script names, in the order they were
+ first sourced. The number is used for the script ID
+ |<SID>|.
+! {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
+--- 337,350 ----
+ :scr[iptnames] List all sourced script names, in the order they were
+ first sourced. The number is used for the script ID
+ |<SID>|.
+! {not available when compiled without the |+eval|
+! feature}
+
+ :scr[iptnames][!] {scriptId} *:script*
+! Edit script {scriptId}. Although ":scriptnames name"
+! works, using ":script name" is recommended.
+! When the current buffer can't be |abandon|ed and the !
+! is not present, the command fails.
+
+ *:fini* *:finish* *E168*
+ :fini[sh] Stop sourcing a script. Can only be used in a Vim
+***************
+*** 354,360 ****
+ following the ":finally" up to the matching |:endtry|
+ are executed first. This process applies to all
+ nested ":try"s in the script. The outermost ":endtry"
+! then stops sourcing the script. {not in Vi}
+
+ All commands and command sequences can be repeated by putting them in a named
+ register and then executing it. There are two ways to get the commands in the
+--- 354,360 ----
+ following the ":finally" up to the matching |:endtry|
+ are executed first. This process applies to all
+ nested ":try"s in the script. The outermost ":endtry"
+! then stops sourcing the script.
+
+ All commands and command sequences can be repeated by putting them in a named
+ register and then executing it. There are two ways to get the commands in the
+***************
+*** 479,486 ****
+ :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',
+--- 479,486 ----
+ :set cpo-=C
+ <
+ *line-continuation-comment*
+! To add a comment in between the lines start with '"\ '. Notice the space
+! after the backslash. Example: >
+ let array = [
+ "\ first entry comment
+ \ 'first',
+***************
+*** 694,700 ****
+ NOTE: The debugging mode is far from perfect. Debugging will have side
+ effects on how Vim works. You cannot use it to debug everything. For
+ example, the display is messed up by the debugging messages.
+- {Vi does not have a debug mode}
+
+ An alternative to debug mode is setting the 'verbose' option. With a bigger
+ number it will give more verbose messages about what Vim is doing.
+--- 694,699 ----
+***************
+*** 928,934 ****
+ Profiling means that Vim measures the time that is spent on executing
+ functions and/or scripts. The |+profile| feature is required for this.
+ It is only included when Vim was compiled with "huge" features.
+- {Vi does not have profiling}
+
+ You can also use the |reltime()| function to measure time. This only requires
+ the |+reltime| feature, which is present more often.
+--- 927,932 ----
+*** ../vim-8.1.1279/runtime/doc/rileft.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/rileft.txt 2019-05-05 17:49:47.735889047 +0200
+***************
+*** 1,4 ****
+! *rileft.txt* For Vim version 8.1. Last change: 2006 Apr 24
+
+
+ VIM REFERENCE MANUAL by Avner Lottem
+--- 1,4 ----
+! *rileft.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Avner Lottem
+***************
+*** 12,19 ****
+ E-mail: alottem@iil.intel.com
+ Phone: +972-4-8307322
+
+- {Vi does not have any of these commands}
+-
+ *E26*
+ {only available when compiled with the |+rightleft| feature}
+
+--- 12,17 ----
+***************
+*** 121,124 ****
+ o There is no full bidirectionality (bidi) support.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 119,122 ----
+ o There is no full bidirectionality (bidi) support.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/russian.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/russian.txt 2019-02-17 17:50:03.378330597 +0100
+***************
+*** 55,62 ****
+ user interface items translations to work.
+
+ After downloading an archive from RuVim project, unpack it into your
+! $VIMRUNTIME directory. We recommend using UTF-8 archive, if your version of
+! Vim is compiled with |+multi_byte| feature enabled.
+
+ In order to use the Russian documentation, make sure you have set the
+ 'helplang' option to "ru".
+--- 55,61 ----
+ user interface items translations to work.
+
+ After downloading an archive from RuVim project, unpack it into your
+! $VIMRUNTIME directory. We recommend using UTF-8 archive.
+
+ In order to use the Russian documentation, make sure you have set the
+ 'helplang' option to "ru".
+***************
+*** 71,74 ****
+ releases of gettext.
+
+ ===============================================================================
+! vim:tw=78:ts=8:ft=help:norl:
+--- 70,73 ----
+ releases of gettext.
+
+ ===============================================================================
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/scroll.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/scroll.txt 2019-05-05 17:29:31.966604778 +0200
+***************
+*** 1,4 ****
+! *scroll.txt* For Vim version 8.1. Last change: 2018 Apr 26
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *scroll.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 45,53 ****
+ difference). When the cursor is on the last line of
+ the buffer nothing happens and a beep is produced.
+ See also 'startofline' option.
+- {difference from vi: Vim scrolls 'scroll' screen
+- lines, instead of file lines; makes a difference when
+- lines wrap}
+
+ <S-Down> or *<S-Down>* *<kPageDown>*
+ <PageDown> or *<PageDown>* *CTRL-F*
+--- 45,50 ----
+***************
+*** 120,126 ****
+
+ *zt*
+ zt Like "z<CR>", but leave the cursor in the same
+! column. {not in Vi}
+
+ *zN<CR>*
+ z{height}<CR> Redraw, make window {height} lines tall. This is
+--- 117,123 ----
+
+ *zt*
+ zt Like "z<CR>", but leave the cursor in the same
+! column.
+
+ *zN<CR>*
+ z{height}<CR> Redraw, make window {height} lines tall. This is
+***************
+*** 136,142 ****
+ *zz*
+ zz Like "z.", but leave the cursor in the same column.
+ Careful: If caps-lock is on, this command becomes
+! "ZZ": write buffer and exit! {not in Vi}
+
+ *z-*
+ z- Redraw, line [count] at bottom of window (default
+--- 133,139 ----
+ *zz*
+ zz Like "z.", but leave the cursor in the same column.
+ Careful: If caps-lock is on, this command becomes
+! "ZZ": write buffer and exit!
+
+ *z-*
+ z- Redraw, line [count] at bottom of window (default
+***************
+*** 145,151 ****
+
+ *zb*
+ zb Like "z-", but leave the cursor in the same column.
+- {not in Vi}
+
+ ==============================================================================
+ 4. Scrolling horizontally *scroll-horizontal*
+--- 142,147 ----
+***************
+*** 158,183 ****
+ z<Right> or *zl* *z<Right>*
+ zl Move the view on the text [count] characters to the
+ right, thus scroll the text [count] characters to the
+! left. This only works when 'wrap' is off. {not in
+! Vi}
+
+ z<Left> or *zh* *z<Left>*
+ zh Move the view on the text [count] characters to the
+ left, thus scroll the text [count] characters to the
+! right. This only works when 'wrap' is off. {not in
+! Vi}
+
+ *zL*
+ zL Move the view on the text half a screenwidth to the
+ right, thus scroll the text half a screenwidth to the
+! left. This only works when 'wrap' is off. {not in
+! Vi}
+
+ *zH*
+ zH Move the view on the text half a screenwidth to the
+ left, thus scroll the text half a screenwidth to the
+! right. This only works when 'wrap' is off. {not in
+! Vi}
+
+ For the following two commands the cursor is not moved in the text, only the
+ text scrolls on the screen.
+--- 154,175 ----
+ z<Right> or *zl* *z<Right>*
+ zl Move the view on the text [count] characters to the
+ right, thus scroll the text [count] characters to the
+! left. This only works when 'wrap' is off.
+
+ z<Left> or *zh* *z<Left>*
+ zh Move the view on the text [count] characters to the
+ left, thus scroll the text [count] characters to the
+! right. This only works when 'wrap' is off.
+
+ *zL*
+ zL Move the view on the text half a screenwidth to the
+ right, thus scroll the text half a screenwidth to the
+! left. This only works when 'wrap' is off.
+
+ *zH*
+ zH Move the view on the text half a screenwidth to the
+ left, thus scroll the text half a screenwidth to the
+! right. This only works when 'wrap' is off.
+
+ For the following two commands the cursor is not moved in the text, only the
+ text scrolls on the screen.
+***************
+*** 185,196 ****
+ *zs*
+ zs Scroll the text horizontally to position the cursor
+ at the start (left side) of the screen. This only
+! works when 'wrap' is off. {not in Vi}
+
+ *ze*
+ ze Scroll the text horizontally to position the cursor
+ at the end (right side) of the screen. This only
+! works when 'wrap' is off. {not in Vi}
+
+ ==============================================================================
+ 5. Scrolling synchronously *scroll-binding*
+--- 177,188 ----
+ *zs*
+ zs Scroll the text horizontally to position the cursor
+ at the start (left side) of the screen. This only
+! works when 'wrap' is off.
+
+ *ze*
+ ze Scroll the text horizontally to position the cursor
+ at the end (right side) of the screen. This only
+! works when 'wrap' is off.
+
+ ==============================================================================
+ 5. Scrolling synchronously *scroll-binding*
+***************
+*** 332,335 ****
+ :map <M-Esc>[65~ <S-ScrollWheelDown>
+ :map! <M-Esc>[65~ <S-ScrollWheelDown>
+ <
+! vim:tw=78:ts=8:ft=help:norl:
+--- 324,327 ----
+ :map <M-Esc>[65~ <S-ScrollWheelDown>
+ :map! <M-Esc>[65~ <S-ScrollWheelDown>
+ <
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/sign.txt 2019-01-11 13:42:31.680331155 +0100
+--- runtime/doc/sign.txt 2019-05-05 17:50:01.187816635 +0200
+***************
+*** 1,4 ****
+! *sign.txt* For Vim version 8.1. Last change: 2016 Aug 17
+
+
+ VIM REFERENCE MANUAL by Gordon Prieur
+--- 1,4 ----
+! *sign.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Gordon Prieur
+***************
+*** 10,16 ****
+ 1. Introduction |sign-intro|
+ 2. Commands |sign-commands|
+
+- {Vi does not have any of these features}
+ {only available when compiled with the |+signs| feature}
+
+ ==============================================================================
+--- 10,15 ----
+***************
+*** 31,37 ****
+ Signs and highlights are not useful just for debuggers. Sun's Visual
+ WorkShop uses signs and highlights to mark build errors and SourceBrowser
+ hits. Additionally, the debugger supports 8 to 10 different signs and
+! highlight colors. |workshop| Same for Netbeans |netbeans|.
+
+ There are two steps in using signs:
+
+--- 30,36 ----
+ Signs and highlights are not useful just for debuggers. Sun's Visual
+ WorkShop uses signs and highlights to mark build errors and SourceBrowser
+ hits. Additionally, the debugger supports 8 to 10 different signs and
+! highlight colors, see |NetBeans|.
+
+ There are two steps in using signs:
+
+***************
+*** 43,48 ****
+--- 42,48 ----
+ displayed. A defined sign can be placed several times in different lines
+ and files.
+
++ *sign-column*
+ When signs are defined for a file, Vim will automatically add a column of two
+ characters to display them in. When the last sign is unplaced the column
+ disappears again. This behavior can be changed with the 'signcolumn' option.
+***************
+*** 55,61 ****
+ *sign-identifier*
+ Each placed sign is identified by a number called the sign identifier. This
+ identifier is used to jump to the sign or to remove the sign. The identifier
+! is assigned when placing the sign using the |sign-place| command or the
+ |sign_place()| function. Each sign identifier should be a unique number. If
+ multiple placed signs use the same identifier, then jumping to or removing a
+ sign becomes unpredictable. To avoid overlapping identifiers, sign groups can
+--- 55,61 ----
+ *sign-identifier*
+ Each placed sign is identified by a number called the sign identifier. This
+ identifier is used to jump to the sign or to remove the sign. The identifier
+! is assigned when placing the sign using the |:sign-place| command or the
+ |sign_place()| function. Each sign identifier should be a unique number. If
+ multiple placed signs use the same identifier, then jumping to or removing a
+ sign becomes unpredictable. To avoid overlapping identifiers, sign groups can
+***************
+*** 76,81 ****
+--- 76,85 ----
+ independent of the sign group. The default priority for a sign is 10. The
+ priority is assigned at the time of placing a sign.
+
++ When the line on which the sign is placed is deleted, the sign is moved to the
++ next line (or the last line of the buffer, if there is no next line). When
++ the delete is undone the sign does not move back.
++
+ ==============================================================================
+ 2. Commands *sign-commands* *:sig* *:sign*
+
+*** ../vim-8.1.1279/runtime/doc/spell.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/spell.txt 2019-05-05 17:50:25.543685303 +0200
+***************
+*** 1,4 ****
+! *spell.txt* For Vim version 8.1. Last change: 2018 Mar 29
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *spell.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 11,20 ****
+ 3. Generating a spell file |spell-mkspell|
+ 4. Spell file format |spell-file-format|
+
+! {Vi does not have any of these commands}
+!
+! Spell checking is not available when the |+syntax| feature has been disabled
+! at compile time.
+
+ Note: There also is a vimspell plugin. If you have it you can do ":help
+ vimspell" to find about it. But you will probably want to get rid of the
+--- 11,17 ----
+ 3. Generating a spell file |spell-mkspell|
+ 4. Spell file format |spell-file-format|
+
+! {not available when the |+syntax| feature has been disabled at compile time}
+
+ Note: There also is a vimspell plugin. If you have it you can do ":help
+ vimspell" to find about it. But you will probably want to get rid of the
+***************
+*** 312,336 ****
+ spell file is used.
+
+ For example, with these values:
+! 'runtimepath' is "~/.vim,/usr/share/vim70,~/.vim/after"
+ 'encoding' is "iso-8859-2"
+ 'spelllang' is "pl"
+
+ Vim will look for:
+ 1. ~/.vim/spell/pl.iso-8859-2.spl
+! 2. /usr/share/vim70/spell/pl.iso-8859-2.spl
+ 3. ~/.vim/spell/pl.iso-8859-2.add.spl
+! 4. /usr/share/vim70/spell/pl.iso-8859-2.add.spl
+ 5. ~/.vim/after/spell/pl.iso-8859-2.add.spl
+
+ This assumes 1. is not found and 2. is found.
+
+ If 'encoding' is "latin1" Vim will look for:
+ 1. ~/.vim/spell/pl.latin1.spl
+! 2. /usr/share/vim70/spell/pl.latin1.spl
+ 3. ~/.vim/after/spell/pl.latin1.spl
+ 4. ~/.vim/spell/pl.ascii.spl
+! 5. /usr/share/vim70/spell/pl.ascii.spl
+ 6. ~/.vim/after/spell/pl.ascii.spl
+
+ This assumes none of them are found (Polish doesn't make sense when leaving
+--- 309,333 ----
+ spell file is used.
+
+ For example, with these values:
+! 'runtimepath' is "~/.vim,/usr/share/vim81,~/.vim/after"
+ 'encoding' is "iso-8859-2"
+ 'spelllang' is "pl"
+
+ Vim will look for:
+ 1. ~/.vim/spell/pl.iso-8859-2.spl
+! 2. /usr/share/vim81/spell/pl.iso-8859-2.spl
+ 3. ~/.vim/spell/pl.iso-8859-2.add.spl
+! 4. /usr/share/vim81/spell/pl.iso-8859-2.add.spl
+ 5. ~/.vim/after/spell/pl.iso-8859-2.add.spl
+
+ This assumes 1. is not found and 2. is found.
+
+ If 'encoding' is "latin1" Vim will look for:
+ 1. ~/.vim/spell/pl.latin1.spl
+! 2. /usr/share/vim81/spell/pl.latin1.spl
+ 3. ~/.vim/after/spell/pl.latin1.spl
+ 4. ~/.vim/spell/pl.ascii.spl
+! 5. /usr/share/vim81/spell/pl.ascii.spl
+ 6. ~/.vim/after/spell/pl.ascii.spl
+
+ This assumes none of them are found (Polish doesn't make sense when leaving
+***************
+*** 577,583 ****
+ vimdiff xx_YY.orig.dic xx_YY.new.dic
+ 3. Take over the changes you like in xx_YY.dic.
+ You may also need to change xx_YY.aff.
+! 4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.new.aff.
+
+
+ SPELL FILE VERSIONS *E770* *E771* *E772*
+--- 574,580 ----
+ vimdiff xx_YY.orig.dic xx_YY.new.dic
+ 3. Take over the changes you like in xx_YY.dic.
+ You may also need to change xx_YY.aff.
+! 4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.orig.aff.
+
+
+ SPELL FILE VERSIONS *E770* *E771* *E772*
+***************
+*** 1582,1587 ****
+--- 1579,1588 ----
+ Forbid three identical characters when compounding. Not
+ supported.
+
++ CHECKSHARPS (Hunspell)) *spell-CHECKSHARPS*
++ SS letter pair in uppercased (German) words may be upper case
++ sharp s (ß). Not supported.
++
+ COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES*
+ Enables using two prefixes. Not supported.
+
+***************
+*** 1595,1606 ****
+ Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
+
+ COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN*
+ Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
+
+! COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
+ Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
+
+ COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE*
+ Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
+
+ COMPOUNDRULES (Hunspell) *spell-COMPOUNDRULES*
+--- 1596,1616 ----
+ Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
+
+ COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN*
++ Words signed with COMPOUNDBEGIN may be first elements in
++ compound words.
+ Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
+
+! COMPOUNDLAST (Hunspell) *spell-COMPOUNDLAST*
+! Words signed with COMPOUNDLAST may be last elements in
+! compound words.
+ Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
+
++ COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
++ Probably the same as COMPOUNDLAST
++
+ COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE*
++ Words signed with COMPOUNDMIDDLE may be middle elements in
++ compound words.
+ Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
+
+ COMPOUNDRULES (Hunspell) *spell-COMPOUNDRULES*
+***************
+*** 1646,1649 ****
+ is no need to separate words before checking them (using a
+ trie instead of a hashtable).
+
+! vim:tw=78:sw=4:ts=8:ft=help:norl:
+--- 1656,1659 ----
+ is no need to separate words before checking them (using a
+ trie instead of a hashtable).
+
+! vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/sponsor.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/sponsor.txt 2018-07-29 14:23:36.371157528 +0200
+***************
+*** 213,216 ****
+
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 213,216 ----
+
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/starting.txt 2019-02-16 15:09:21.225946157 +0100
+--- runtime/doc/starting.txt 2019-05-05 17:56:44.137617228 +0200
+***************
+*** 1,4 ****
+! *starting.txt* For Vim version 8.1. Last change: 2018 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *starting.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 84,90 ****
+ and the first error is displayed. See |quickfix|.
+ If [errorfile] is not given, the 'errorfile' option is used
+ for the file name. See 'errorfile' for the default value.
+- {not in Vi}
+
+ (nothing) Without one of the four items above, Vim will start editing a
+ new buffer. It's empty and doesn't have a file name.
+--- 84,89 ----
+***************
+*** 129,145 ****
+
+ --help *-h* *--help* *-?*
+ -?
+! -h Give usage (help) message and exit. {not in Vi}
+ See |info-message| about capturing the text.
+
+ *--version*
+ --version Print version information and exit. Same output as for
+! |:version| command. {not in Vi}
+ See |info-message| about capturing the text.
+
+ *--noplugin*
+ --noplugin Skip loading plugins. Resets the 'loadplugins' option.
+! {not in Vi}
+ Note that the |-u| argument may also disable loading plugins:
+ argument load: vimrc files plugins defaults.vim ~
+ (nothing) yes yes yes
+--- 128,144 ----
+
+ --help *-h* *--help* *-?*
+ -?
+! -h Give usage (help) message and exit.
+ See |info-message| about capturing the text.
+
+ *--version*
+ --version Print version information and exit. Same output as for
+! |:version| command.
+ See |info-message| about capturing the text.
+
+ *--noplugin*
+ --noplugin Skip loading plugins. Resets the 'loadplugins' option.
+!
+ Note that the |-u| argument may also disable loading plugins:
+ argument load: vimrc files plugins defaults.vim ~
+ (nothing) yes yes yes
+***************
+*** 190,202 ****
+ Note: You can use up to 10 "+" or "-c" arguments in a Vim
+ command. They are executed in the order given. A "-S"
+ argument counts as a "-c" argument as well.
+- {Vi only allows one command}
+
+ --cmd {command} *--cmd*
+ {command} will be executed before processing any vimrc file.
+ Otherwise it acts like -c {command}. You can use up to 10 of
+ these commands, independently from "-c" commands.
+- {not in Vi}
+
+ *-S*
+ -S {file} The {file} will be sourced after the first file has been read.
+--- 189,199 ----
+***************
+*** 205,211 ****
+ < It can be mixed with "-c" arguments and repeated like "-c".
+ The limit of 10 "-c" arguments applies here as well.
+ {file} cannot start with a "-".
+! {not in Vi}
+
+ -S Works like "-S Session.vim". Only when used as the last
+ argument or when another "-" option follows.
+--- 202,210 ----
+ < It can be mixed with "-c" arguments and repeated like "-c".
+ The limit of 10 "-c" arguments applies here as well.
+ {file} cannot start with a "-".
+!
+! Do not use this for running a script to do some work and exit
+! Vim, you won't see error messages. Use |-u| instead.
+
+ -S Works like "-S Session.vim". Only when used as the last
+ argument or when another "-" option follows.
+***************
+*** 217,224 ****
+ |crash-recovery|.
+
+ *-L*
+! -L Same as -r. {only in some versions of Vi: "List recoverable
+! edit sessions"}
+
+ *-R*
+ -R Readonly mode. The 'readonly' option will be set for all the
+--- 216,222 ----
+ |crash-recovery|.
+
+ *-L*
+! -L Same as -r.
+
+ *-R*
+ -R Readonly mode. The 'readonly' option will be set for all the
+***************
+*** 238,244 ****
+ -m Modifications not allowed to be written. The 'write' option
+ will be reset, so that writing files is disabled. However,
+ the 'write' option can be set to enable writing again.
+- {not in Vi}
+
+ *-M*
+ -M Modifications not allowed. The 'modifiable' option will be
+--- 236,241 ----
+***************
+*** 246,252 ****
+ will be reset, so that writing files is disabled. However,
+ the 'modifiable' and 'write' options can be set to enable
+ changes and writing.
+- {not in Vi}
+
+ *-Z* *restricted-mode* *E145* *E981*
+ -Z Restricted mode. All commands that make use of an external
+--- 243,248 ----
+***************
+*** 260,270 ****
+ the Safe module.
+ Note that the user may still find a loophole to execute a
+ shell command, it has only been made difficult.
+- {not in Vi}
+
+ *-g*
+ -g Start Vim in GUI mode. See |gui|. For the opposite see |-v|.
+- {not in Vi}
+
+ *-v*
+ -v Start Ex in Vi mode. Only makes a difference when the
+--- 256,264 ----
+***************
+*** 278,284 ****
+ *-E*
+ -E Start Vim in improved Ex mode |gQ|. Only makes a difference
+ when the executable is not called "exim".
+- {not in Vi}
+
+ *-s-ex*
+ -s Silent or batch mode. Only when Vim was started as "ex" or
+--- 272,277 ----
+***************
+*** 302,307 ****
+--- 295,303 ----
+ "-u" argument).
+ Example: >
+ vim -e -s < thefilter thefile
++ < For the opposite, to see errors from the script, execute the
++ file with the |-u| flag: >
++ vim -u thefilter thefile
+ <
+ *-b*
+ -b Binary mode. File I/O will only recognize <NL> to separate
+***************
+*** 309,315 ****
+ option is set to 0. 'modeline' is reset. The 'binary' option
+ is set. This is done after reading the vimrc/exrc files but
+ before reading any file in the arglist. See also
+! |edit-binary|. {not in Vi}
+
+ *-l*
+ -l Lisp mode. Sets the 'lisp' and 'showmatch' options on.
+--- 305,311 ----
+ option is set to 0. 'modeline' is reset. The 'binary' option
+ is set. This is done after reading the vimrc/exrc files but
+ before reading any file in the arglist. See also
+! |edit-binary|.
+
+ *-l*
+ -l Lisp mode. Sets the 'lisp' and 'showmatch' options on.
+***************
+*** 318,324 ****
+ -A Arabic mode. Sets the 'arabic' option on. (Only when
+ compiled with the |+arabic| features (which include
+ |+rightleft|), otherwise Vim gives an error message
+! and exits.) {not in Vi}
+
+ *-F*
+ -F This was used for Farsi mode, which has been removed.
+--- 314,320 ----
+ -A Arabic mode. Sets the 'arabic' option on. (Only when
+ compiled with the |+arabic| features (which include
+ |+rightleft|), otherwise Vim gives an error message
+! and exits.)
+
+ *-F*
+ -F This was used for Farsi mode, which has been removed.
+***************
+*** 327,339 ****
+ *-H*
+ -H Hebrew mode. Sets the 'hkmap' and 'rightleft' options on.
+ (Only when compiled with the |+rightleft| feature, otherwise
+! Vim gives an error message and exits.) {not in Vi}
+
+ *-V* *verbose*
+ -V[N] Verbose. Sets the 'verbose' option to [N] (default: 10).
+ Messages will be given for each file that is ":source"d and
+ for reading or writing a viminfo file. Can be used to find
+! out what is happening upon startup and exit. {not in Vi}
+ Example: >
+ vim -V8 foobar
+
+--- 323,335 ----
+ *-H*
+ -H Hebrew mode. Sets the 'hkmap' and 'rightleft' options on.
+ (Only when compiled with the |+rightleft| feature, otherwise
+! Vim gives an error message and exits.)
+
+ *-V* *verbose*
+ -V[N] Verbose. Sets the 'verbose' option to [N] (default: 10).
+ Messages will be given for each file that is ":source"d and
+ for reading or writing a viminfo file. Can be used to find
+! out what is happening upon startup and exit.
+ Example: >
+ vim -V8 foobar
+
+***************
+*** 348,354 ****
+ -D Debugging. Go to debugging mode when executing the first
+ command from a script. |debug-mode|
+ {not available when compiled without the |+eval| feature}
+- {not in Vi}
+
+ *-C*
+ -C Compatible mode. Sets the 'compatible' option. You can use
+--- 344,349 ----
+***************
+*** 360,372 ****
+ < Several plugins won't work with 'compatible' set. You may
+ want to set it after startup this way: >
+ vim "+set cp" filename
+! < Also see |compatible-default|. {not in Vi}
+
+ *-N*
+ -N Not compatible mode. Resets the 'compatible' option. You can
+ use this to get 'nocompatible', when there is no .vimrc file
+ or when using "-u NONE".
+! Also see |compatible-default|. {not in Vi}
+
+ *-y* *easy*
+ -y Easy mode. Implied for |evim| and |eview|. Starts with
+--- 355,367 ----
+ < Several plugins won't work with 'compatible' set. You may
+ want to set it after startup this way: >
+ vim "+set cp" filename
+! < Also see |compatible-default|.
+
+ *-N*
+ -N Not compatible mode. Resets the 'compatible' option. You can
+ use this to get 'nocompatible', when there is no .vimrc file
+ or when using "-u NONE".
+! Also see |compatible-default|.
+
+ *-y* *easy*
+ -y Easy mode. Implied for |evim| and |eview|. Starts with
+***************
+*** 374,380 ****
+ This sources the script $VIMRUNTIME/evim.vim. Mappings are
+ set up to work like most click-and-type editors, see
+ |evim-keys|. The GUI is started when available.
+- {not in Vi}
+
+ *-n*
+ -n No swap file will be used. Recovery after a crash will be
+--- 369,374 ----
+***************
+*** 394,400 ****
+ 'updatecount' to very big numbers, and type ":preserve" when
+ you want to save your work. This way you keep the possibility
+ for crash recovery.
+- {not in Vi}
+
+ *-o*
+ -o[N] Open N windows, split horizontally. If [N] is not given,
+--- 388,393 ----
+***************
+*** 402,414 ****
+ there is not enough room, only the first few files get a
+ window. If there are more windows than arguments, the last
+ few windows will be editing an empty file.
+- {not in Vi}
+
+ *-O*
+ -O[N] Open N windows, split vertically. Otherwise it's like -o.
+ If both the -o and the -O option are given, the last one on
+ the command line determines how the windows will be split.
+- {not in Vi}
+
+ *-p*
+ -p[N] Open N tab pages. If [N] is not given, one tab page is opened
+--- 395,405 ----
+***************
+*** 416,435 ****
+ 'tabpagemax' pages (default 10). If there are more tab pages
+ than arguments, the last few tab pages will be editing an
+ empty file. Also see |tabpage|.
+- {not in Vi}
+
+ *-T*
+ -T {terminal} Set the terminal type to "terminal". This influences the
+ codes that Vim will send to your terminal. This is normally
+ not needed, because Vim will be able to find out what type
+! of terminal you are using. (See |terminal-info|.) {not in Vi}
+
+ *--not-a-term*
+ --not-a-term Tells Vim that the user knows that the input and/or output is
+ not connected to a terminal. This will avoid the warning and
+ the two second delay that would happen.
+ Also avoids the "Reading from stdin..." message.
+! {not in Vi}
+
+ *--ttyfail*
+ --ttyfail When the stdin or stdout is not a terminal (tty) then exit
+--- 407,425 ----
+ 'tabpagemax' pages (default 10). If there are more tab pages
+ than arguments, the last few tab pages will be editing an
+ empty file. Also see |tabpage|.
+
+ *-T*
+ -T {terminal} Set the terminal type to "terminal". This influences the
+ codes that Vim will send to your terminal. This is normally
+ not needed, because Vim will be able to find out what type
+! of terminal you are using. (See |terminal-info|.)
+
+ *--not-a-term*
+ --not-a-term Tells Vim that the user knows that the input and/or output is
+ not connected to a terminal. This will avoid the warning and
+ the two second delay that would happen.
+ Also avoids the "Reading from stdin..." message.
+! Also avoids the "N files to edit" message.
+
+ *--ttyfail*
+ --ttyfail When the stdin or stdout is not a terminal (tty) then exit
+***************
+*** 437,444 ****
+
+ *-d*
+ -d Start in diff mode, like |vimdiff|.
+! {not in Vi} {not available when compiled without the |+diff|
+! feature}
+
+ -d {device} Only on the Amiga and when not compiled with the |+diff|
+ feature. Works like "-dev".
+--- 427,433 ----
+
+ *-d*
+ -d Start in diff mode, like |vimdiff|.
+! {not available when compiled without the |+diff| feature}
+
+ -d {device} Only on the Amiga and when not compiled with the |+diff|
+ feature. Works like "-dev".
+***************
+*** 448,454 ****
+ Normally you would use this to set the window position and
+ size: "-d con:x/y/width/height", e.g.,
+ "-d con:30/10/600/150". But you can also use it to start
+! editing on another device, e.g., AUX:. {not in Vi}
+ *-f*
+ -f GUI: Do not disconnect from the program that started Vim.
+ 'f' stands for "foreground". If omitted, the GUI forks a new
+--- 437,443 ----
+ Normally you would use this to set the window position and
+ size: "-d con:x/y/width/height", e.g.,
+ "-d con:30/10/600/150". But you can also use it to start
+! editing on another device, e.g., AUX:.
+ *-f*
+ -f GUI: Do not disconnect from the program that started Vim.
+ 'f' stands for "foreground". If omitted, the GUI forks a new
+***************
+*** 467,473 ****
+ MS-Windows: This option is not supported. However, when
+ running Vim with an installed vim.bat or gvim.bat file it
+ works.
+- {not in Vi}
+
+
+ *--nofork*
+--- 456,461 ----
+***************
+*** 492,504 ****
+
+ When {vimrc} is equal to "DEFAULTS" (all uppercase), this has
+ the same effect as "NONE", but the |defaults.vim| script is
+! loaded, which will also set 'nocompatible'.
+
+ Using the "-u" argument with another argument than DEFAULTS
+ has the side effect that the 'compatible' option will be on by
+ default. This can have unexpected effects. See
+ |'compatible'|.
+- {not in Vi}
+
+ *-U* *E230*
+ -U {gvimrc} The file {gvimrc} is read for initializations when the GUI
+--- 480,492 ----
+
+ When {vimrc} is equal to "DEFAULTS" (all uppercase), this has
+ the same effect as "NONE", but the |defaults.vim| script is
+! loaded, which will also set 'nocompatible'. Also see
+! |--clean|.
+
+ Using the "-u" argument with another argument than DEFAULTS
+ has the side effect that the 'compatible' option will be on by
+ default. This can have unexpected effects. See
+ |'compatible'|.
+
+ *-U* *E230*
+ -U {gvimrc} The file {gvimrc} is read for initializations when the GUI
+***************
+*** 506,529 ****
+ is equal to "NONE", no file is read for GUI initializations at
+ all. |gui-init|
+ Exception: Reading the system-wide menu file is always done.
+- {not in Vi}
+
+ *-i*
+ -i {viminfo} The file "viminfo" is used instead of the default viminfo
+ file. If the name "NONE" is used (all uppercase), no viminfo
+ file is read or written, even if 'viminfo' is set or when
+ ":rv" or ":wv" are used. See also |viminfo-file|.
+- {not in Vi}
+
+ *--clean*
+! --clean Equal to "-u DEFAULTS -U NONE -i NONE":
+ - initializations from files and environment variables is
+ skipped
+ - the |defaults.vim| script is loaded, which implies
+ 'nocompatible': use Vim defaults
+ - no |gvimrc| script is loaded
+ - no viminfo file is read or written
+! - the home directory is excluded from 'runtimepath'
+ *-x*
+ -x Use encryption to read/write files. Will prompt for a key,
+ which is then stored in the 'key' option. All writes will
+--- 494,517 ----
+ is equal to "NONE", no file is read for GUI initializations at
+ all. |gui-init|
+ Exception: Reading the system-wide menu file is always done.
+
+ *-i*
+ -i {viminfo} The file "viminfo" is used instead of the default viminfo
+ file. If the name "NONE" is used (all uppercase), no viminfo
+ file is read or written, even if 'viminfo' is set or when
+ ":rv" or ":wv" are used. See also |viminfo-file|.
+
+ *--clean*
+! --clean Similar to "-u DEFAULTS -U NONE -i NONE":
+ - initializations from files and environment variables is
+ skipped
++ - 'runtimepath' and 'packpath' are set to exclude home
++ directory entries (does not happen with -u DEFAULTS).
+ - the |defaults.vim| script is loaded, which implies
+ 'nocompatible': use Vim defaults
+ - no |gvimrc| script is loaded
+ - no viminfo file is read or written
+!
+ *-x*
+ -x Use encryption to read/write files. Will prompt for a key,
+ which is then stored in the 'key' option. All writes will
+***************
+*** 548,554 ****
+ When the connection is desired later anyway (e.g., for
+ client-server messages), call the |serverlist()| function.
+ This does not enable the XSMP handler though.
+- {not in Vi}
+
+ *-s*
+ -s {scriptin} The script file "scriptin" is read. The characters in the
+--- 536,541 ----
+***************
+*** 557,563 ****
+ of the file is reached before the editor exits, further
+ characters are read from the keyboard. Only works when not
+ started in Ex mode, see |-s-ex|. See also |complex-repeat|.
+- {not in Vi}
+
+ *-w_nr*
+ -w {number}
+--- 544,549 ----
+***************
+*** 570,631 ****
+ ":source!". When the "scriptout" file already exists, new
+ characters are appended. See also |complex-repeat|.
+ {scriptout} cannot start with a digit.
+- {not in Vi}
+
+ *-W*
+ -W {scriptout} Like -w, but do not append, overwrite an existing file.
+- {not in Vi}
+
+ --remote [+{cmd}] {file} ...
+ Open the {file} in another Vim that functions as a server.
+ Any non-file arguments must come before this.
+! See |--remote|. {not in Vi}
+
+ --remote-silent [+{cmd}] {file} ...
+ Like --remote, but don't complain if there is no server.
+! See |--remote-silent|. {not in Vi}
+
+ --remote-wait [+{cmd}] {file} ...
+ Like --remote, but wait for the server to finish editing the
+ file(s).
+! See |--remote-wait|. {not in Vi}
+
+ --remote-wait-silent [+{cmd}] {file} ...
+ Like --remote-wait, but don't complain if there is no server.
+! See |--remote-wait-silent|. {not in Vi}
+
+ --servername {name}
+ Specify the name of the Vim server to send to or to become.
+! See |--servername|. {not in Vi}
+
+ --remote-send {keys}
+ Send {keys} to a Vim server and exit.
+! See |--remote-send|. {not in Vi}
+
+ --remote-expr {expr}
+ Evaluate {expr} in another Vim that functions as a server.
+ The result is printed on stdout.
+! See |--remote-expr|. {not in Vi}
+
+ --serverlist Output a list of Vim server names and exit. See
+! |--serverlist|. {not in Vi}
+
+ --socketid {id} *--socketid*
+ GTK+ GUI Vim only. Make gvim try to use GtkPlug mechanism, so
+ that it runs inside another window. See |gui-gtk-socketid|
+! for details. {not in Vi}
+
+ --windowid {id} *--windowid*
+ Win32 GUI Vim only. Make gvim try to use the window {id} as a
+ parent, so that it runs inside that window. See
+! |gui-w32-windowid| for details. {not in Vi}
+
+ --echo-wid *--echo-wid*
+ GTK+ GUI Vim only. Make gvim echo the Window ID on stdout,
+ which can be used to run gvim in a kpart widget. The format
+ of the output is: >
+ WID: 12345\n
+- < {not in Vi}
+
+ --role {role} *--role*
+ GTK+ 2 GUI only. Set the role of the main window to {role}.
+--- 556,614 ----
+ ":source!". When the "scriptout" file already exists, new
+ characters are appended. See also |complex-repeat|.
+ {scriptout} cannot start with a digit.
+
+ *-W*
+ -W {scriptout} Like -w, but do not append, overwrite an existing file.
+
+ --remote [+{cmd}] {file} ...
+ Open the {file} in another Vim that functions as a server.
+ Any non-file arguments must come before this.
+! See |--remote|.
+
+ --remote-silent [+{cmd}] {file} ...
+ Like --remote, but don't complain if there is no server.
+! See |--remote-silent|.
+
+ --remote-wait [+{cmd}] {file} ...
+ Like --remote, but wait for the server to finish editing the
+ file(s).
+! See |--remote-wait|.
+
+ --remote-wait-silent [+{cmd}] {file} ...
+ Like --remote-wait, but don't complain if there is no server.
+! See |--remote-wait-silent|.
+
+ --servername {name}
+ Specify the name of the Vim server to send to or to become.
+! See |--servername|.
+
+ --remote-send {keys}
+ Send {keys} to a Vim server and exit.
+! See |--remote-send|.
+
+ --remote-expr {expr}
+ Evaluate {expr} in another Vim that functions as a server.
+ The result is printed on stdout.
+! See |--remote-expr|.
+
+ --serverlist Output a list of Vim server names and exit. See
+! |--serverlist|.
+
+ --socketid {id} *--socketid*
+ GTK+ GUI Vim only. Make gvim try to use GtkPlug mechanism, so
+ that it runs inside another window. See |gui-gtk-socketid|
+! for details.
+
+ --windowid {id} *--windowid*
+ Win32 GUI Vim only. Make gvim try to use the window {id} as a
+ parent, so that it runs inside that window. See
+! |gui-w32-windowid| for details.
+
+ --echo-wid *--echo-wid*
+ GTK+ GUI Vim only. Make gvim echo the Window ID on stdout,
+ which can be used to run gvim in a kpart widget. The format
+ of the output is: >
+ WID: 12345\n
+
+ --role {role} *--role*
+ GTK+ 2 GUI only. Set the role of the main window to {role}.
+***************
+*** 633,639 ****
+ identify a window, in order to restore window placement and
+ such. The --role argument is passed automatically when
+ restoring the session on login. See |gui-gnome-session|
+- {not in Vi}
+
+ -P {parent-title} *-P* *MDI* *E671* *E672*
+ Win32 only: Specify the title of the parent application. When
+--- 616,621 ----
+***************
+*** 1264,1279 ****
+ *:mk* *:mkexrc*
+ :mk[exrc] [file] Write current key mappings and changed options to
+ [file] (default ".exrc" in the current directory),
+! unless it already exists. {not in Vi}
+
+ :mk[exrc]! [file] Always write current key mappings and changed
+ options to [file] (default ".exrc" in the current
+! directory). {not in Vi}
+
+ *:mkv* *:mkvimrc*
+ :mkv[imrc][!] [file] Like ":mkexrc", but the default is ".vimrc" in the
+ current directory. The ":version" command is also
+! written to the file. {not in Vi}
+
+ These commands will write ":map" and ":set" commands to a file, in such a way
+ that when these commands are executed, the current key mappings and options
+--- 1246,1261 ----
+ *:mk* *:mkexrc*
+ :mk[exrc] [file] Write current key mappings and changed options to
+ [file] (default ".exrc" in the current directory),
+! unless it already exists.
+
+ :mk[exrc]! [file] Always write current key mappings and changed
+ options to [file] (default ".exrc" in the current
+! directory).
+
+ *:mkv* *:mkvimrc*
+ :mkv[imrc][!] [file] Like ":mkexrc", but the default is ".vimrc" in the
+ current directory. The ":version" command is also
+! written to the file.
+
+ These commands will write ":map" and ":set" commands to a file, in such a way
+ that when these commands are executed, the current key mappings and options
+***************
+*** 1339,1346 ****
+ |-S| argument: >
+ vim -S Session.vim
+ <
+! All this is {not in Vi} and {not available when compiled without the
+! |+mksession| feature}.
+
+ *:mks* *:mksession*
+ :mks[ession][!] [file] Write a Vim script that restores the current editing
+--- 1321,1327 ----
+ |-S| argument: >
+ vim -S Session.vim
+ <
+! All this is {not available when compiled without the |+mksession| feature}.
+
+ *:mks* *:mksession*
+ :mks[ession][!] [file] Write a Vim script that restores the current editing
+***************
+*** 1599,1604 ****
+--- 1580,1587 ----
+ - The "-i" Vim argument can be used to set another file name, |-i|. When the
+ file name given is "NONE" (all uppercase), no viminfo file is ever read or
+ written. Also not for the commands below!
++ - The 'viminfofile' option can be used like the "-i" argument. In fact, the
++ value form the "-i" argument is stored in the 'viminfofile' option.
+ - For the commands below, another file name can be given, overriding the
+ default and the name given with 'viminfo' or "-i" (unless it's NONE).
+
+***************
+*** 1653,1659 ****
+ :rv[iminfo][!] [file] Read from viminfo file [file] (default: see above).
+ If [!] is given, then any information that is
+ already set (registers, marks, |v:oldfiles|, etc.)
+! will be overwritten {not in Vi}
+
+ *:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929*
+ :wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
+--- 1636,1642 ----
+ :rv[iminfo][!] [file] Read from viminfo file [file] (default: see above).
+ If [!] is given, then any information that is
+ already set (registers, marks, |v:oldfiles|, etc.)
+! will be overwritten
+
+ *:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929*
+ :wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
+***************
+*** 1666,1672 ****
+ check that no old temp files were left behind (e.g.
+ ~/.viminf*) and that you can write in the directory of
+ the .viminfo file.
+- {not in Vi}
+
+ *:ol* *:oldfiles*
+ :ol[dfiles] List the files that have marks stored in the viminfo
+--- 1649,1654 ----
+***************
+*** 1676,1683 ****
+ The output can be filtered with |:filter|, e.g.: >
+ filter /\.vim/ oldfiles
+ < The filtering happens on the file name.
+! {not in Vi, only when compiled with the |+eval|
+! feature}
+
+ :bro[wse] ol[dfiles][!]
+ List file names as with |:oldfiles|, and then prompt
+--- 1658,1664 ----
+ The output can be filtered with |:filter|, e.g.: >
+ filter /\.vim/ oldfiles
+ < The filtering happens on the file name.
+! {only when compiled with the |+eval| feature}
+
+ :bro[wse] ol[dfiles][!]
+ List file names as with |:oldfiles|, and then prompt
+***************
+*** 1688,1691 ****
+ Use ! to abandon a modified buffer. |abandon|
+ {not when compiled with tiny or small features}
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1669,1672 ----
+ Use ! to abandon a modified buffer. |abandon|
+ {not when compiled with tiny or small features}
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/syntax.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/syntax.txt 2019-03-29 20:27:11.231682590 +0100
+***************
+*** 1,4 ****
+! *syntax.txt* For Vim version 8.1. Last change: 2018 Apr 30
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *syntax.txt* For Vim version 8.1. Last change: 2019 Mar 29
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 23,43 ****
+ 1. Quick start |:syn-qstart|
+ 2. Syntax files |:syn-files|
+ 3. Syntax loading procedure |syntax-loading|
+! 4. Syntax file remarks |:syn-file-remarks|
+! 5. Defining a syntax |:syn-define|
+! 6. :syntax arguments |:syn-arguments|
+! 7. Syntax patterns |:syn-pattern|
+! 8. Syntax clusters |:syn-cluster|
+! 9. Including syntax files |:syn-include|
+! 10. Synchronizing |:syn-sync|
+! 11. Listing syntax items |:syntax|
+! 12. Highlight command |:highlight|
+! 13. Linking groups |:highlight-link|
+! 14. Cleaning up |:syn-clear|
+! 15. Highlighting tags |tag-highlight|
+! 16. Window-local syntax |:ownsyntax|
+! 17. Color xterms |xterm-color|
+! 18. When syntax is slow |:syntime|
+
+ {Vi does not have any of these commands}
+
+--- 23,44 ----
+ 1. Quick start |:syn-qstart|
+ 2. Syntax files |:syn-files|
+ 3. Syntax loading procedure |syntax-loading|
+! 4. Converting to HTML |2html.vim|
+! 5. Syntax file remarks |:syn-file-remarks|
+! 6. Defining a syntax |:syn-define|
+! 7. :syntax arguments |:syn-arguments|
+! 8. Syntax patterns |:syn-pattern|
+! 9. Syntax clusters |:syn-cluster|
+! 10. Including syntax files |:syn-include|
+! 11. Synchronizing |:syn-sync|
+! 12. Listing syntax items |:syntax|
+! 13. Highlight command |:highlight|
+! 14. Linking groups |:highlight-link|
+! 15. Cleaning up |:syn-clear|
+! 16. Highlighting tags |tag-highlight|
+! 17. Window-local syntax |:ownsyntax|
+! 18. Color xterms |xterm-color|
+! 19. When syntax is slow |:syntime|
+
+ {Vi does not have any of these commands}
+
+***************
+*** 368,387 ****
+ syntax.
+
+ ==============================================================================
+! 4. Syntax file remarks *:syn-file-remarks*
+
+! *b:current_syntax-variable*
+! Vim stores the name of the syntax that has been loaded in the
+! "b:current_syntax" variable. You can use this if you want to load other
+! settings, depending on which syntax is active. Example: >
+! :au BufReadPost * if b:current_syntax == "csh"
+! :au BufReadPost * do-some-things
+! :au BufReadPost * endif
+!
+!
+! 2HTML *2html.vim* *convert-to-HTML*
+!
+! This is not a syntax file itself, but a script that converts the current
+ window into HTML. Vim opens a new window in which it builds the HTML file.
+
+ After you save the resulting file, you can view it with any browser. The
+--- 369,377 ----
+ syntax.
+
+ ==============================================================================
+! 4. Conversion to HTML *2html.vim* *convert-to-HTML*
+
+! 2html is not a syntax file itself, but a script that converts the current
+ window into HTML. Vim opens a new window in which it builds the HTML file.
+
+ After you save the resulting file, you can view it with any browser. The
+***************
+*** 671,682 ****
+ :let g:html_no_pre = 1
+ <
+ *g:html_expand_tabs*
+! Default: 1 if 'tabstop' is 8, 'expandtab' is 0, and no fold column or line
+! numbers occur in the generated HTML;
+! 0 otherwise.
+! When 0, <Tab> characters in the buffer text are replaced with an appropriate
+ number of space characters, or &nbsp; references if |g:html_no_pre| is 1.
+! When 1, if |g:html_no_pre| is 0 or unset, <Tab> characters in the buffer text
+ are included as-is in the generated HTML. This is useful for when you want to
+ allow copy and paste from a browser without losing the actual whitespace in
+ the source document. Note that this can easily break text alignment and
+--- 661,672 ----
+ :let g:html_no_pre = 1
+ <
+ *g:html_expand_tabs*
+! Default: 0 if 'tabstop' is 8, 'expandtab' is 0, 'vartabstop' is not in use,
+! and no fold column or line numbers occur in the generated HTML;
+! 1 otherwise.
+! When 1, <Tab> characters in the buffer text are replaced with an appropriate
+ number of space characters, or &nbsp; references if |g:html_no_pre| is 1.
+! When 0, if |g:html_no_pre| is 0 or unset, <Tab> characters in the buffer text
+ are included as-is in the generated HTML. This is useful for when you want to
+ allow copy and paste from a browser without losing the actual whitespace in
+ the source document. Note that this can easily break text alignment and
+***************
+*** 773,778 ****
+--- 763,780 ----
+ >
+ :let g:html_use_xhtml = 1
+ <
++ ==============================================================================
++ 5. Syntax file remarks *:syn-file-remarks*
++
++ *b:current_syntax-variable*
++ Vim stores the name of the syntax that has been loaded in the
++ "b:current_syntax" variable. You can use this if you want to load other
++ settings, depending on which syntax is active. Example: >
++ :au BufReadPost * if b:current_syntax == "csh"
++ :au BufReadPost * do-some-things
++ :au BufReadPost * endif
++
++
+
+ ABEL *abel.vim* *ft-abel-syntax*
+
+***************
+*** 939,944 ****
+--- 941,949 ----
+ To disable them use ":unlet". Example: >
+ :unlet c_comment_strings
+
++ An alternative is to switch to the C++ highlighting: >
++ :set filetype=cpp
++
+ Variable Highlight ~
+ *c_gnu* GNU gcc specific items
+ *c_comment_strings* strings and numbers inside a comment
+***************
+*** 1265,1271 ****
+ doxygen_end_punctuation '[.]' Set to regexp match for the ending
+ punctuation of brief
+
+! There are also some hilight groups worth mentioning as they can be useful in
+ configuration.
+
+ Highlight Effect ~
+--- 1270,1276 ----
+ doxygen_end_punctuation '[.]' Set to regexp match for the ending
+ punctuation of brief
+
+! There are also some highlight groups worth mentioning as they can be useful in
+ configuration.
+
+ Highlight Effect ~
+***************
+*** 1957,1963 ****
+ the parentheses and backquoted parentheses. Because of the quantity of
+ colorization levels, unlike non-rainbow highlighting, the rainbow mode
+ specifies its highlighting using ctermfg and guifg, thereby bypassing the
+! usual colorscheme control using standard highlighting groups. The actual
+ highlighting used depends on the dark/bright setting (see |'bg'|).
+
+
+--- 1962,1968 ----
+ the parentheses and backquoted parentheses. Because of the quantity of
+ colorization levels, unlike non-rainbow highlighting, the rainbow mode
+ specifies its highlighting using ctermfg and guifg, thereby bypassing the
+! usual color scheme control using standard highlighting groups. The actual
+ highlighting used depends on the dark/bright setting (see |'bg'|).
+
+
+***************
+*** 1977,1983 ****
+
+ LPC *lpc.vim* *ft-lpc-syntax*
+
+! LPC stands for a simple, memory-efficient language: Lars Pensj| C. The
+ file name of LPC is usually *.c. Recognizing these files as LPC would bother
+ users writing only C programs. If you want to use LPC syntax in Vim, you
+ should set a variable in your .vimrc file: >
+--- 1982,1988 ----
+
+ LPC *lpc.vim* *ft-lpc-syntax*
+
+! LPC stands for a simple, memory-efficient language: Lars Pensjö C. The
+ file name of LPC is usually *.c. Recognizing these files as LPC would bother
+ users writing only C programs. If you want to use LPC syntax in Vim, you
+ should set a variable in your .vimrc file: >
+***************
+*** 2641,2646 ****
+--- 2646,2693 ----
+ commands than are actually available to you by the game.
+
+
++ R *r.vim* *ft-r-syntax*
++
++ The parsing of R code for syntax highlight starts 40 lines backwards, but you
++ can set a different value in your |vimrc|. Example: >
++ let r_syntax_minlines = 60
++
++ You can also turn off syntax highlighting of ROxygen: >
++ let r_syntax_hl_roxygen = 0
++
++ enable folding of code delimited by parentheses, square brackets and curly
++ braces: >
++ let r_syntax_folding = 1
++
++ and highlight as functions all keywords followed by an opening parenthesis: >
++ let r_syntax_fun_pattern = 1
++
++
++ R MARKDOWN *rmd.vim* *ft-rmd-syntax*
++
++ To disable syntax highlight of YAML header, add to your |vimrc|: >
++ let rmd_syn_hl_yaml = 0
++
++ To disable syntax highlighting of citation keys: >
++ let rmd_syn_hl_citations = 0
++
++ To highlight R code in knitr chunk headers: >
++ let rmd_syn_hl_chunk = 1
++
++ By default, chunks of R code will be highlighted following the rules of R
++ language. If you want proper syntax highlighting of chunks of other languages,
++ you should add them to either `markdown_fenced_languages` or
++ `rmd_fenced_languages`. For example to properly highlight both R and Python,
++ you may add this to your |vimrc|: >
++ let rmd_fenced_languages = ['r', 'python']
++
++
++ R RESTRUCTURED TEXT *rrst.vim* *ft-rrst-syntax*
++
++ To highlight R code in knitr chunk headers, add to your |vimrc|: >
++ let rrst_syn_hl_chunk = 1
++
++
+ READLINE *readline.vim* *ft-readline-syntax*
+
+ The readline library is primarily used by the BASH shell, which adds quite a
+***************
+*** 2655,2663 ****
+
+ RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax*
+
+! You may set what syntax definitions should be used for code blocks via >
+ let rst_syntax_code_list = ['vim', 'lisp', ...]
+! <
+
+ REXX *rexx.vim* *ft-rexx-syntax*
+
+--- 2702,2730 ----
+
+ RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax*
+
+! Syntax highlighting is enabled for code blocks within the document for a
+! select number of file types. See $VIMRUNTIME/syntax/rst.vim for the default
+! syntax list.
+!
+! To set a user-defined list of code block syntax highlighting: >
+ let rst_syntax_code_list = ['vim', 'lisp', ...]
+!
+! To assign multiple code block types to a single syntax, define
+! `rst_syntax_code_list` as a mapping: >
+! let rst_syntax_code_list = {
+! \ 'cpp' = ['cpp', 'c++'],
+! \ 'bash' = ['bash', 'sh'],
+! ...
+! }
+!
+! To use color highlighting for emphasis text: >
+! let rst_use_emphasis_colors = 1
+!
+! To enable folding of sections: >
+! let rst_fold_enabled = 1
+!
+! Note that folding can cause performance issues on some platforms.
+!
+
+ REXX *rexx.vim* *ft-rexx-syntax*
+
+***************
+*** 2876,2892 ****
+ shells such as bash, dash, posix, and the Korn shells.
+
+ Vim attempts to determine which shell type is in use by specifying that
+! various filenames are of specific types: >
+
+ ksh : .kshrc* *.ksh
+ bash: .bashrc* bashrc bash.bashrc .bash_profile* *.bash
+ <
+! If none of these cases pertain, then the first line of the file is examined
+! (ex. looking for /bin/sh /bin/ksh /bin/bash). If the first line specifies a
+! shelltype, then that shelltype is used. However some files (ex. .profile) are
+! known to be shell files but the type is not apparent. Furthermore, on many
+! systems sh is symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh"
+! (Posix).
+
+ One may specify a global default by instantiating one of the following
+ variables in your <.vimrc>:
+--- 2943,2959 ----
+ shells such as bash, dash, posix, and the Korn shells.
+
+ Vim attempts to determine which shell type is in use by specifying that
+! various filenames are of specific types, e.g.: >
+
+ ksh : .kshrc* *.ksh
+ bash: .bashrc* bashrc bash.bashrc .bash_profile* *.bash
+ <
+! See $VIMRUNTIME/filetype.vim for the full list of patterns. If none of these
+! cases pertain, then the first line of the file is examined (ex. looking for
+! /bin/sh /bin/ksh /bin/bash). If the first line specifies a shelltype, then
+! that shelltype is used. However some files (ex. .profile) are known to be
+! shell files but the type is not apparent. Furthermore, on many systems sh is
+! symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" (Posix).
+
+ One may specify a global default by instantiating one of the following
+ variables in your <.vimrc>:
+***************
+*** 3169,3174 ****
+--- 3236,3247 ----
+ which typically would go in $HOME/after/syntax/tex/[pkgname].vim, to
+ http://vim.sf.net/.
+
++ I've included some support for various popular packages on my website: >
++
++ http://www.drchip.org/astronaut/vim/index.html#LATEXPKGS
++ <
++ The syntax files there go into your .../after/syntax/tex/ directory.
++
+ *tex-error* *g:tex_no_error*
+ Tex: Excessive Error Highlighting? ~
+
+***************
+*** 3433,3439 ****
+ :let g:zsh_fold_enable = 1
+
+ ==============================================================================
+! 5. Defining a syntax *:syn-define* *E410*
+
+ Vim understands three types of syntax items:
+
+--- 3506,3512 ----
+ :let g:zsh_fold_enable = 1
+
+ ==============================================================================
+! 6. Defining a syntax *:syn-define* *E410*
+
+ Vim understands three types of syntax items:
+
+***************
+*** 3792,3798 ****
+ The maximum number of syntax groups is 19999.
+
+ ==============================================================================
+! 6. :syntax arguments *:syn-arguments*
+
+ The :syntax commands that define syntax items take a number of arguments.
+ The common ones are explained here. The arguments may be given in any order
+--- 3865,3871 ----
+ The maximum number of syntax groups is 19999.
+
+ ==============================================================================
+! 7. :syntax arguments *:syn-arguments*
+
+ The :syntax commands that define syntax items take a number of arguments.
+ The common ones are explained here. The arguments may be given in any order
+***************
+*** 4113,4119 ****
+ Show either "syntax conceal on" or "syntax conceal off" (translated).
+
+ ==============================================================================
+! 7. Syntax patterns *:syn-pattern* *E401* *E402*
+
+ In the syntax commands, a pattern must be surrounded by two identical
+ characters. This is like it works for the ":s" command. The most common to
+--- 4186,4192 ----
+ Show either "syntax conceal on" or "syntax conceal off" (translated).
+
+ ==============================================================================
+! 8. Syntax patterns *:syn-pattern* *E401* *E402*
+
+ In the syntax commands, a pattern must be surrounded by two identical
+ characters. This is like it works for the ":s" command. The most common to
+***************
+*** 4291,4297 ****
+ cannot be referred to.
+
+ ==============================================================================
+! 8. Syntax clusters *:syn-cluster* *E400*
+
+ :sy[ntax] cluster {cluster-name} [contains={group-name}..]
+ [add={group-name}..]
+--- 4364,4370 ----
+ cannot be referred to.
+
+ ==============================================================================
+! 9. Syntax clusters *:syn-cluster* *E400*
+
+ :sy[ntax] cluster {cluster-name} [contains={group-name}..]
+ [add={group-name}..]
+***************
+*** 4337,4343 ****
+ The maximum number of clusters is 9767.
+
+ ==============================================================================
+! 9. Including syntax files *:syn-include* *E397*
+
+ It is often useful for one language's syntax file to include a syntax file for
+ a related language. Depending on the exact relationship, this can be done in
+--- 4410,4416 ----
+ The maximum number of clusters is 9767.
+
+ ==============================================================================
+! 10. Including syntax files *:syn-include* *E397*
+
+ It is often useful for one language's syntax file to include a syntax file for
+ a related language. Depending on the exact relationship, this can be done in
+***************
+*** 4378,4384 ****
+ The maximum number of includes is 999.
+
+ ==============================================================================
+! 10. Synchronizing *:syn-sync* *E403* *E404*
+
+ Vim wants to be able to start redrawing in any position in the document. To
+ make this possible it needs to know the syntax state at the position where
+--- 4451,4457 ----
+ The maximum number of includes is 999.
+
+ ==============================================================================
+! 11. Synchronizing *:syn-sync* *E403* *E404*
+
+ Vim wants to be able to start redrawing in any position in the document. To
+ make this possible it needs to know the syntax state at the position where
+***************
+*** 4570,4576 ****
+ :syntax sync clear {sync-group-name} ..
+
+ ==============================================================================
+! 11. Listing syntax items *:syntax* *:sy* *:syn* *:syn-list*
+
+ This command lists all the syntax items: >
+
+--- 4643,4649 ----
+ :syntax sync clear {sync-group-name} ..
+
+ ==============================================================================
+! 12. Listing syntax items *:syntax* *:sy* *:syn* *:syn-list*
+
+ This command lists all the syntax items: >
+
+***************
+*** 4590,4596 ****
+ is mostly used, because it looks better.
+
+ ==============================================================================
+! 12. Highlight command *:highlight* *:hi* *E28* *E411* *E415*
+
+ There are three types of highlight groups:
+ - The ones used for specific languages. For these the name starts with the
+--- 4663,4669 ----
+ is mostly used, because it looks better.
+
+ ==============================================================================
+! 13. Highlight command *:highlight* *:hi* *E28* *E411* *E415*
+
+ There are three types of highlight groups:
+ - The ones used for specific languages. For these the name starts with the
+***************
+*** 4621,4629 ****
+ Doesn't work recursively, thus you can't use
+ ":colorscheme" in a color scheme script.
+
+! To customize a colorscheme use another name, e.g.
+ "~/.vim/colors/mine.vim", and use `:runtime` to load
+! the original colorscheme: >
+ runtime colors/evening.vim
+ hi Statement ctermfg=Blue guifg=Blue
+
+--- 4694,4702 ----
+ Doesn't work recursively, thus you can't use
+ ":colorscheme" in a color scheme script.
+
+! To customize a color scheme use another name, e.g.
+ "~/.vim/colors/mine.vim", and use `:runtime` to load
+! the original color scheme: >
+ runtime colors/evening.vim
+ hi Statement ctermfg=Blue guifg=Blue
+
+***************
+*** 4631,4637 ****
+ |ColorSchemePre| autocommand event is triggered.
+ After the color scheme has been loaded the
+ |ColorScheme| autocommand event is triggered.
+! For info about writing a colorscheme file: >
+ :edit $VIMRUNTIME/colors/README.txt
+
+ :hi[ghlight] List all the current highlight groups that have
+--- 4704,4710 ----
+ |ColorSchemePre| autocommand event is triggered.
+ After the color scheme has been loaded the
+ |ColorScheme| autocommand event is triggered.
+! For info about writing a color scheme file: >
+ :edit $VIMRUNTIME/colors/README.txt
+
+ :hi[ghlight] List all the current highlight groups that have
+***************
+*** 4828,4834 ****
+ explicitly. This causes the highlight groups that depend on
+ 'background' to change! This means you should set the colors for
+ Normal first, before setting other colors.
+! When a colorscheme is being used, changing 'background' causes it to
+ be reloaded, which may reset all colors (including Normal). First
+ delete the "g:colors_name" variable when you don't want this.
+
+--- 4901,4907 ----
+ explicitly. This causes the highlight groups that depend on
+ 'background' to change! This means you should set the colors for
+ Normal first, before setting other colors.
+! When a color scheme is being used, changing 'background' causes it to
+ be reloaded, which may reset all colors (including Normal). First
+ delete the "g:colors_name" variable when you don't want this.
+
+***************
+*** 5083,5089 ****
+ set.
+
+ ==============================================================================
+! 13. Linking groups *:hi-link* *:highlight-link* *E412* *E413*
+
+ When you want to use the same highlighting for several syntax groups, you
+ can do this more easily by linking the groups into one common highlight
+--- 5156,5162 ----
+ set.
+
+ ==============================================================================
+! 14. Linking groups *:hi-link* *:highlight-link* *E412* *E413*
+
+ When you want to use the same highlighting for several syntax groups, you
+ can do this more easily by linking the groups into one common highlight
+***************
+*** 5121,5127 ****
+ overruled when the syntax file is loaded.
+
+ ==============================================================================
+! 14. Cleaning up *:syn-clear* *E391*
+
+ If you want to clear the syntax stuff for the current buffer, you can use this
+ command: >
+--- 5194,5200 ----
+ overruled when the syntax file is loaded.
+
+ ==============================================================================
+! 15. Cleaning up *:syn-clear* *E391*
+
+ If you want to clear the syntax stuff for the current buffer, you can use this
+ command: >
+***************
+*** 5212,5218 ****
+ them.
+
+ ==============================================================================
+! 15. Highlighting tags *tag-highlight*
+
+ If you want to highlight all the tags in your file, you can use the following
+ mappings.
+--- 5285,5291 ----
+ them.
+
+ ==============================================================================
+! 16. Highlighting tags *tag-highlight*
+
+ If you want to highlight all the tags in your file, you can use the following
+ mappings.
+***************
+*** 5247,5253 ****
+ autocmd BufRead,BufNewFile *.[ch] endif
+
+ ==============================================================================
+! 16. Window-local syntax *:ownsyntax*
+
+ Normally all windows on a buffer share the same syntax settings. It is
+ possible, however, to set a particular window on a file to have its own
+--- 5320,5326 ----
+ autocmd BufRead,BufNewFile *.[ch] endif
+
+ ==============================================================================
+! 17. Window-local syntax *:ownsyntax*
+
+ Normally all windows on a buffer share the same syntax settings. It is
+ possible, however, to set a particular window on a file to have its own
+***************
+*** 5277,5283 ****
+ When splitting the window, the new window will use the original syntax.
+
+ ==============================================================================
+! 17. Color xterms *xterm-color* *color-xterm*
+
+ Most color xterms have only eight colors. If you don't get colors with the
+ default setup, it should work with these lines in your .vimrc: >
+--- 5350,5356 ----
+ When splitting the window, the new window will use the original syntax.
+
+ ==============================================================================
+! 18. Color xterms *xterm-color* *color-xterm*
+
+ Most color xterms have only eight colors. If you don't get colors with the
+ default setup, it should work with these lines in your .vimrc: >
+***************
+*** 5421,5427 ****
+
+
+ ==============================================================================
+! 18. When syntax is slow *:syntime*
+
+ This is aimed at authors of a syntax file.
+
+--- 5494,5500 ----
+
+
+ ==============================================================================
+! 19. When syntax is slow *:syntime*
+
+ This is aimed at authors of a syntax file.
+
+***************
+*** 5478,5481 ****
+ "<\@1<=span" Matches the same, but only tries one byte before "span".
+
+
+! vim:tw=78:sw=4:ts=8:ft=help:norl:
+--- 5551,5554 ----
+ "<\@1<=span" Matches the same, but only tries one byte before "span".
+
+
+! vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/tabpage.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/tabpage.txt 2019-05-05 17:50:51.295546075 +0200
+***************
+*** 1,4 ****
+! *tabpage.txt* For Vim version 8.1. Last change: 2018 Mar 29
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *tabpage.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 16,22 ****
+ 4. Setting 'tabline' |setting-tabline|
+ 5. Setting 'guitablabel' |setting-guitablabel|
+
+- {Vi does not have any of these commands}
+ {not able to use multiple tab pages when the |+windows| feature was disabled
+ at compile time}
+
+--- 16,21 ----
+***************
+*** 213,219 ****
+ :tabN[ext] {count}
+ {count}<C-PageUp>
+ {count}gT Go {count} tab pages back. Wraps around from the first one
+! to the last one.
+
+ :tabr[ewind] *:tabfir* *:tabfirst* *:tabr* *:tabrewind*
+ :tabfir[st] Go to the first tab page.
+--- 212,219 ----
+ :tabN[ext] {count}
+ {count}<C-PageUp>
+ {count}gT Go {count} tab pages back. Wraps around from the first one
+! to the last one. Note that the use of {count} is different
+! from |:tabnext|, where it is used as the tab page number.
+
+ :tabr[ewind] *:tabfir* *:tabfirst* *:tabr* *:tabrewind*
+ :tabfir[st] Go to the first tab page.
+***************
+*** 240,247 ****
+ :tabm[ove] [N] *:tabm* *:tabmove*
+ :[N]tabm[ove]
+ Move the current tab page to after tab page N. Use zero to
+! make the current tab page the first one. Without N the tab
+! page is made the last one. >
+ :.tabmove " do nothing
+ :-tabmove " move the tab page to the left
+ :+tabmove " move the tab page to the right
+--- 240,249 ----
+ :tabm[ove] [N] *:tabm* *:tabmove*
+ :[N]tabm[ove]
+ Move the current tab page to after tab page N. Use zero to
+! make the current tab page the first one. N is counted before
+! the move, thus if the second tab is the current one,
+! `:tabmove 1` and `:tabmove 2` have no effect.
+! Without N the tab page is made the last one. >
+ :.tabmove " do nothing
+ :-tabmove " move the tab page to the left
+ :+tabmove " move the tab page to the right
+***************
+*** 286,292 ****
+ current tab page.
+ {cmd} can contain '|' to concatenate several commands.
+ {cmd} must not open or close tab pages or reorder them.
+- {not in Vi}
+ Also see |:windo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo|
+ and |:lfdo|
+
+--- 288,293 ----
+***************
+*** 471,474 ****
+ tab page local variable. |t:var|
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 472,475 ----
+ tab page local variable. |t:var|
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/tagsrch.txt 2019-04-28 18:04:56.054492198 +0200
+--- runtime/doc/tagsrch.txt 2019-05-05 17:53:15.690761399 +0200
+***************
+*** 1,4 ****
+! *tagsrch.txt* For Vim version 8.1. Last change: 2018 May 04
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *tagsrch.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 60,66 ****
+
+ *v_CTRL-]*
+ {Visual}CTRL-] Same as ":tag {name}", where {name} is the text that
+! is highlighted. {not in Vi}
+
+ *telnet-CTRL-]*
+ CTRL-] is the default telnet escape key. When you type CTRL-] to jump to a
+--- 60,66 ----
+
+ *v_CTRL-]*
+ {Visual}CTRL-] Same as ":tag {name}", where {name} is the text that
+! is highlighted.
+
+ *telnet-CTRL-]*
+ CTRL-] is the default telnet escape key. When you type CTRL-] to jump to a
+***************
+*** 112,129 ****
+ g<RightMouse> *g<RightMouse>*
+ <C-RightMouse> *<C-RightMouse>* *CTRL-T*
+ CTRL-T Jump to [count] older entry in the tag stack
+! (default 1). {not in Vi}
+
+ *:po* *:pop* *E555* *E556*
+ :[count]po[p][!] Jump to [count] older entry in tag stack (default 1).
+! See |tag-!| for [!]. {not in Vi}
+
+ :[count]ta[g][!] Jump to [count] newer entry in tag stack (default 1).
+! See |tag-!| for [!]. {not in Vi}
+
+ *:tags*
+ :tags Show the contents of the tag stack. The active
+! entry is marked with a '>'. {not in Vi}
+
+ The output of ":tags" looks like this:
+
+--- 112,129 ----
+ g<RightMouse> *g<RightMouse>*
+ <C-RightMouse> *<C-RightMouse>* *CTRL-T*
+ CTRL-T Jump to [count] older entry in the tag stack
+! (default 1).
+
+ *:po* *:pop* *E555* *E556*
+ :[count]po[p][!] Jump to [count] older entry in tag stack (default 1).
+! See |tag-!| for [!].
+
+ :[count]ta[g][!] Jump to [count] newer entry in tag stack (default 1).
+! See |tag-!| for [!].
+
+ *:tags*
+ :tags Show the contents of the tag stack. The active
+! entry is marked with a '>'.
+
+ The output of ":tags" looks like this:
+
+***************
+*** 204,210 ****
+ the current position in the list (if there is one).
+ [name] can be a regexp pattern, see |tag-regexp|.
+ See |tag-priority| for the priorities used in the
+! listing. {not in Vi}
+ Example output:
+
+ >
+--- 204,210 ----
+ the current position in the list (if there is one).
+ [name] can be a regexp pattern, see |tag-regexp|.
+ See |tag-priority| for the priorities used in the
+! listing.
+ Example output:
+
+ >
+***************
+*** 231,284 ****
+
+ *:sts* *:stselect*
+ :sts[elect][!] [name] Does ":tselect[!] [name]" and splits the window for
+! the selected tag. {not in Vi}
+
+ *g]*
+ g] Like CTRL-], but use ":tselect" instead of ":tag".
+- {not in Vi}
+
+ *v_g]*
+ {Visual}g] Same as "g]", but use the highlighted text as the
+! identifier. {not in Vi}
+
+ *:tj* *:tjump*
+ :tj[ump][!] [name] Like ":tselect", but jump to the tag directly when
+! there is only one match. {not in Vi}
+
+ *:stj* *:stjump*
+ :stj[ump][!] [name] Does ":tjump[!] [name]" and splits the window for the
+! selected tag. {not in Vi}
+
+ *g_CTRL-]*
+ g CTRL-] Like CTRL-], but use ":tjump" instead of ":tag".
+- {not in Vi}
+
+ *v_g_CTRL-]*
+ {Visual}g CTRL-] Same as "g CTRL-]", but use the highlighted text as
+! the identifier. {not in Vi}
+
+ *:tn* *:tnext*
+ :[count]tn[ext][!] Jump to [count] next matching tag (default 1). See
+! |tag-!| for [!]. {not in Vi}
+
+ *:tp* *:tprevious*
+ :[count]tp[revious][!] Jump to [count] previous matching tag (default 1).
+! See |tag-!| for [!]. {not in Vi}
+
+ *:tN* *:tNext*
+! :[count]tN[ext][!] Same as ":tprevious". {not in Vi}
+
+ *:tr* *:trewind*
+ :[count]tr[ewind][!] Jump to first matching tag. If [count] is given, jump
+! to [count]th matching tag. See |tag-!| for [!]. {not
+! in Vi}
+
+ *:tf* *:tfirst*
+! :[count]tf[irst][!] Same as ":trewind". {not in Vi}
+
+ *:tl* *:tlast*
+! :tl[ast][!] Jump to last matching tag. See |tag-!| for [!]. {not
+! in Vi}
+
+ *:lt* *:ltag*
+ :lt[ag][!] [name] Jump to tag [name] and add the matching tags to a new
+--- 231,280 ----
+
+ *:sts* *:stselect*
+ :sts[elect][!] [name] Does ":tselect[!] [name]" and splits the window for
+! the selected tag.
+
+ *g]*
+ g] Like CTRL-], but use ":tselect" instead of ":tag".
+
+ *v_g]*
+ {Visual}g] Same as "g]", but use the highlighted text as the
+! identifier.
+
+ *:tj* *:tjump*
+ :tj[ump][!] [name] Like ":tselect", but jump to the tag directly when
+! there is only one match.
+
+ *:stj* *:stjump*
+ :stj[ump][!] [name] Does ":tjump[!] [name]" and splits the window for the
+! selected tag.
+
+ *g_CTRL-]*
+ g CTRL-] Like CTRL-], but use ":tjump" instead of ":tag".
+
+ *v_g_CTRL-]*
+ {Visual}g CTRL-] Same as "g CTRL-]", but use the highlighted text as
+! the identifier.
+
+ *:tn* *:tnext*
+ :[count]tn[ext][!] Jump to [count] next matching tag (default 1). See
+! |tag-!| for [!].
+
+ *:tp* *:tprevious*
+ :[count]tp[revious][!] Jump to [count] previous matching tag (default 1).
+! See |tag-!| for [!].
+
+ *:tN* *:tNext*
+! :[count]tN[ext][!] Same as ":tprevious".
+
+ *:tr* *:trewind*
+ :[count]tr[ewind][!] Jump to first matching tag. If [count] is given, jump
+! to [count]th matching tag. See |tag-!| for [!].
+
+ *:tf* *:tfirst*
+! :[count]tf[irst][!] Same as ":trewind".
+
+ *:tl* *:tlast*
+! :tl[ast][!] Jump to last matching tag. See |tag-!| for [!].
+
+ *:lt* *:ltag*
+ :lt[ag][!] [name] Jump to tag [name] and add the matching tags to a new
+***************
+*** 290,296 ****
+ characters (very nomagic). The location list showing
+ the matching tags is independent of the tag stack.
+ See |tag-!| for [!].
+- {not in Vi}
+
+ When there is no other message, Vim shows which matching tag has been jumped
+ to, and the number of matching tags: >
+--- 286,291 ----
+***************
+*** 317,350 ****
+ *:pts* *:ptselect*
+ :pts[elect][!] [name] Does ":tselect[!] [name]" and shows the new tag in a
+ "Preview" window. See |:ptag| for more info.
+- {not in Vi}
+
+ *:ptj* *:ptjump*
+ :ptj[ump][!] [name] Does ":tjump[!] [name]" and shows the new tag in a
+ "Preview" window. See |:ptag| for more info.
+- {not in Vi}
+
+ *:ptn* *:ptnext*
+ :[count]ptn[ext][!] ":tnext" in the preview window. See |:ptag|.
+- {not in Vi}
+
+ *:ptp* *:ptprevious*
+ :[count]ptp[revious][!] ":tprevious" in the preview window. See |:ptag|.
+- {not in Vi}
+
+ *:ptN* *:ptNext*
+! :[count]ptN[ext][!] Same as ":ptprevious". {not in Vi}
+
+ *:ptr* *:ptrewind*
+ :[count]ptr[ewind][!] ":trewind" in the preview window. See |:ptag|.
+- {not in Vi}
+
+ *:ptf* *:ptfirst*
+! :[count]ptf[irst][!] Same as ":ptrewind". {not in Vi}
+
+ *:ptl* *:ptlast*
+ :ptl[ast][!] ":tlast" in the preview window. See |:ptag|.
+- {not in Vi}
+
+ ==============================================================================
+ 4. Tags details *tag-details*
+--- 312,339 ----
+ *:pts* *:ptselect*
+ :pts[elect][!] [name] Does ":tselect[!] [name]" and shows the new tag in a
+ "Preview" window. See |:ptag| for more info.
+
+ *:ptj* *:ptjump*
+ :ptj[ump][!] [name] Does ":tjump[!] [name]" and shows the new tag in a
+ "Preview" window. See |:ptag| for more info.
+
+ *:ptn* *:ptnext*
+ :[count]ptn[ext][!] ":tnext" in the preview window. See |:ptag|.
+
+ *:ptp* *:ptprevious*
+ :[count]ptp[revious][!] ":tprevious" in the preview window. See |:ptag|.
+
+ *:ptN* *:ptNext*
+! :[count]ptN[ext][!] Same as ":ptprevious".
+
+ *:ptr* *:ptrewind*
+ :[count]ptr[ewind][!] ":trewind" in the preview window. See |:ptag|.
+
+ *:ptf* *:ptfirst*
+! :[count]ptf[irst][!] Same as ":ptrewind".
+
+ *:ptl* *:ptlast*
+ :ptl[ast][!] ":tlast" in the preview window. See |:ptag|.
+
+ ==============================================================================
+ 4. Tags details *tag-details*
+***************
+*** 630,639 ****
+ "?"), some special handling is done:
+ - Searching starts on line 1 of the file.
+ The direction of the search is forward for "/", backward for "?".
+! Note that 'wrapscan' does not matter, the whole file is always searched. (Vi
+! does use 'wrapscan', which caused tags sometimes not be found.) {Vi starts
+! searching in line 2 of another file. It does not find a tag in line 1 of
+! another file when 'wrapscan' is not set}
+ - If the search fails, another try is done ignoring case. If that fails too,
+ a search is done for:
+ "^tagname[ \t]*("
+--- 619,625 ----
+ "?"), some special handling is done:
+ - Searching starts on line 1 of the file.
+ The direction of the search is forward for "/", backward for "?".
+! Note that 'wrapscan' does not matter, the whole file is always searched.
+ - If the search fails, another try is done ignoring case. If that fails too,
+ a search is done for:
+ "^tagname[ \t]*("
+***************
+*** 644,650 ****
+ "^[#a-zA-Z_].*\<tagname[ \t]*("
+ This means: A line starting with '#' or an identifier and containing the tag
+ followed by white space and a '('. This will find macro names and function
+! names with a type prepended. {the extra searches are not in Vi}
+
+
+ *tag-old-static*
+--- 630,636 ----
+ "^[#a-zA-Z_].*\<tagname[ \t]*("
+ This means: A line starting with '#' or an identifier and containing the tag
+ followed by white space and a '('. This will find macro names and function
+! names with a type prepended.
+
+
+ *tag-old-static*
+***************
+*** 720,752 ****
+ of the file. Lines that look like a comment are
+ ignored (see 'comments' option). If a count is given,
+ the count'th matching line is displayed, and comment
+! lines are not ignored. {not in Vi}
+
+ *]i*
+ ]i like "[i", but start at the current cursor position.
+- {not in Vi}
+
+ *:is* *:isearch*
+ :[range]is[earch][!] [count] [/]pattern[/]
+ Like "[i" and "]i", but search in [range] lines
+ (default: whole file).
+! See |:search-args| for [/] and [!]. {not in Vi}
+
+ *[I*
+ [I Display all lines that contain the keyword under the
+ cursor. Filenames and line numbers are displayed
+ for the found lines. The search starts at the
+! beginning of the file. {not in Vi}
+
+ *]I*
+ ]I like "[I", but start at the current cursor position.
+- {not in Vi}
+
+ *:il* *:ilist*
+ :[range]il[ist][!] [/]pattern[/]
+ Like "[I" and "]I", but search in [range] lines
+ (default: whole file).
+! See |:search-args| for [/] and [!]. {not in Vi}
+
+ *[_CTRL-I*
+ [ CTRL-I Jump to the first line that contains the keyword
+--- 706,736 ----
+ of the file. Lines that look like a comment are
+ ignored (see 'comments' option). If a count is given,
+ the count'th matching line is displayed, and comment
+! lines are not ignored.
+
+ *]i*
+ ]i like "[i", but start at the current cursor position.
+
+ *:is* *:isearch*
+ :[range]is[earch][!] [count] [/]pattern[/]
+ Like "[i" and "]i", but search in [range] lines
+ (default: whole file).
+! See |:search-args| for [/] and [!].
+
+ *[I*
+ [I Display all lines that contain the keyword under the
+ cursor. Filenames and line numbers are displayed
+ for the found lines. The search starts at the
+! beginning of the file.
+
+ *]I*
+ ]I like "[I", but start at the current cursor position.
+
+ *:il* *:ilist*
+ :[range]il[ist][!] [/]pattern[/]
+ Like "[I" and "]I", but search in [range] lines
+ (default: whole file).
+! See |:search-args| for [/] and [!].
+
+ *[_CTRL-I*
+ [ CTRL-I Jump to the first line that contains the keyword
+***************
+*** 754,770 ****
+ of the file. Lines that look like a comment are
+ ignored (see 'comments' option). If a count is given,
+ the count'th matching line is jumped to, and comment
+! lines are not ignored. {not in Vi}
+
+ *]_CTRL-I*
+ ] CTRL-I like "[ CTRL-I", but start at the current cursor
+! position. {not in Vi}
+
+ *:ij* *:ijump*
+ :[range]ij[ump][!] [count] [/]pattern[/]
+ Like "[ CTRL-I" and "] CTRL-I", but search in
+ [range] lines (default: whole file).
+! See |:search-args| for [/] and [!]. {not in Vi}
+
+ CTRL-W CTRL-I *CTRL-W_CTRL-I* *CTRL-W_i*
+ CTRL-W i Open a new window, with the cursor on the first line
+--- 738,754 ----
+ of the file. Lines that look like a comment are
+ ignored (see 'comments' option). If a count is given,
+ the count'th matching line is jumped to, and comment
+! lines are not ignored.
+
+ *]_CTRL-I*
+ ] CTRL-I like "[ CTRL-I", but start at the current cursor
+! position.
+
+ *:ij* *:ijump*
+ :[range]ij[ump][!] [count] [/]pattern[/]
+ Like "[ CTRL-I" and "] CTRL-I", but search in
+ [range] lines (default: whole file).
+! See |:search-args| for [/] and [!].
+
+ CTRL-W CTRL-I *CTRL-W_CTRL-I* *CTRL-W_i*
+ CTRL-W i Open a new window, with the cursor on the first line
+***************
+*** 773,817 ****
+ that look like a comment line are ignored (see
+ 'comments' option). If a count is given, the count'th
+ matching line is jumped to, and comment lines are not
+! ignored. {not in Vi}
+
+ *:isp* *:isplit*
+ :[range]isp[lit][!] [count] [/]pattern[/]
+ Like "CTRL-W i" and "CTRL-W i", but search in
+ [range] lines (default: whole file).
+! See |:search-args| for [/] and [!]. {not in Vi}
+
+ *[d*
+ [d Display the first macro definition that contains the
+ macro under the cursor. The search starts from the
+ beginning of the file. If a count is given, the
+! count'th matching line is displayed. {not in Vi}
+
+ *]d*
+ ]d like "[d", but start at the current cursor position.
+- {not in Vi}
+
+ *:ds* *:dsearch*
+ :[range]ds[earch][!] [count] [/]string[/]
+ Like "[d" and "]d", but search in [range] lines
+ (default: whole file).
+! See |:search-args| for [/] and [!]. {not in Vi}
+
+ *[D*
+ [D Display all macro definitions that contain the macro
+ under the cursor. Filenames and line numbers are
+ displayed for the found lines. The search starts
+! from the beginning of the file. {not in Vi}
+
+ *]D*
+ ]D like "[D", but start at the current cursor position.
+- {not in Vi}
+
+ *:dli* *:dlist*
+ :[range]dli[st][!] [/]string[/]
+ Like `[D` and `]D`, but search in [range] lines
+ (default: whole file).
+! See |:search-args| for [/] and [!]. {not in Vi}
+ Note that `:dl` works like `:delete` with the "l"
+ flag, not `:dlist`.
+
+--- 757,799 ----
+ that look like a comment line are ignored (see
+ 'comments' option). If a count is given, the count'th
+ matching line is jumped to, and comment lines are not
+! ignored.
+
+ *:isp* *:isplit*
+ :[range]isp[lit][!] [count] [/]pattern[/]
+ Like "CTRL-W i" and "CTRL-W i", but search in
+ [range] lines (default: whole file).
+! See |:search-args| for [/] and [!].
+
+ *[d*
+ [d Display the first macro definition that contains the
+ macro under the cursor. The search starts from the
+ beginning of the file. If a count is given, the
+! count'th matching line is displayed.
+
+ *]d*
+ ]d like "[d", but start at the current cursor position.
+
+ *:ds* *:dsearch*
+ :[range]ds[earch][!] [count] [/]string[/]
+ Like "[d" and "]d", but search in [range] lines
+ (default: whole file).
+! See |:search-args| for [/] and [!].
+
+ *[D*
+ [D Display all macro definitions that contain the macro
+ under the cursor. Filenames and line numbers are
+ displayed for the found lines. The search starts
+! from the beginning of the file.
+
+ *]D*
+ ]D like "[D", but start at the current cursor position.
+
+ *:dli* *:dlist*
+ :[range]dli[st][!] [/]string[/]
+ Like `[D` and `]D`, but search in [range] lines
+ (default: whole file).
+! See |:search-args| for [/] and [!].
+ Note that `:dl` works like `:delete` with the "l"
+ flag, not `:dlist`.
+
+***************
+*** 819,854 ****
+ [ CTRL-D Jump to the first macro definition that contains the
+ keyword under the cursor. The search starts from
+ the beginning of the file. If a count is given, the
+! count'th matching line is jumped to. {not in Vi}
+
+ *]_CTRL-D*
+ ] CTRL-D like "[ CTRL-D", but start at the current cursor
+! position. {not in Vi}
+
+ *:dj* *:djump*
+ :[range]dj[ump][!] [count] [/]string[/]
+ Like "[ CTRL-D" and "] CTRL-D", but search in
+ [range] lines (default: whole file).
+! See |:search-args| for [/] and [!]. {not in Vi}
+
+ CTRL-W CTRL-D *CTRL-W_CTRL-D* *CTRL-W_d*
+ CTRL-W d Open a new window, with the cursor on the first
+ macro definition line that contains the keyword
+ under the cursor. The search starts from the
+ beginning of the file. If a count is given, the
+! count'th matching line is jumped to. {not in Vi}
+
+ *:dsp* *:dsplit*
+ :[range]dsp[lit][!] [count] [/]string[/]
+ Like "CTRL-W d", but search in [range] lines
+ (default: whole file).
+! See |:search-args| for [/] and [!]. {not in Vi}
+
+ *:che* *:checkpath*
+ :che[ckpath] List all the included files that could not be found.
+- {not in Vi}
+
+! :che[ckpath]! List all the included files. {not in Vi}
+
+ *:search-args*
+ Common arguments for the commands above:
+--- 801,835 ----
+ [ CTRL-D Jump to the first macro definition that contains the
+ keyword under the cursor. The search starts from
+ the beginning of the file. If a count is given, the
+! count'th matching line is jumped to.
+
+ *]_CTRL-D*
+ ] CTRL-D like "[ CTRL-D", but start at the current cursor
+! position.
+
+ *:dj* *:djump*
+ :[range]dj[ump][!] [count] [/]string[/]
+ Like "[ CTRL-D" and "] CTRL-D", but search in
+ [range] lines (default: whole file).
+! See |:search-args| for [/] and [!].
+
+ CTRL-W CTRL-D *CTRL-W_CTRL-D* *CTRL-W_d*
+ CTRL-W d Open a new window, with the cursor on the first
+ macro definition line that contains the keyword
+ under the cursor. The search starts from the
+ beginning of the file. If a count is given, the
+! count'th matching line is jumped to.
+
+ *:dsp* *:dsplit*
+ :[range]dsp[lit][!] [count] [/]string[/]
+ Like "CTRL-W d", but search in [range] lines
+ (default: whole file).
+! See |:search-args| for [/] and [!].
+
+ *:che* *:checkpath*
+ :che[ckpath] List all the included files that could not be found.
+
+! :che[ckpath]! List all the included files.
+
+ *:search-args*
+ Common arguments for the commands above:
+*** ../vim-8.1.1279/runtime/doc/terminal.txt 2019-02-22 17:56:02.787842436 +0100
+--- runtime/doc/terminal.txt 2019-05-05 17:53:28.734690163 +0200
+***************
+*** 1,4 ****
+! *terminal.txt* For Vim version 8.1. Last change: 2018 May 17
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *terminal.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 42,48 ****
+ Communication |termdebug-communication|
+ Customizing |termdebug-customizing|
+
+- {Vi does not have any of these commands}
+ {only available when compiled with the |+terminal| feature}
+ The terminal feature requires the |+job| and |+channel| features.
+
+--- 42,47 ----
+***************
+*** 66,87 ****
+ the job. This uses a pty when possible. You can click outside of the
+ terminal window to move keyboard focus elsewhere.
+
+ CTRL-W can be used to navigate between windows and other CTRL-W commands, e.g.:
+ CTRL-W CTRL-W move focus to the next window
+ CTRL-W : enter an Ex command
+ See |CTRL-W| for more commands.
+
+! Special in the terminal window: *CTRL-W_.* *CTRL-W_N*
+ CTRL-W . send a CTRL-W to the job in the terminal
+ CTRL-W CTRL-\ send a CTRL-\ to the job in the terminal
+ CTRL-W N go to Terminal-Normal mode, see |Terminal-mode|
+ CTRL-\ CTRL-N go to Terminal-Normal mode, see |Terminal-mode|
+! CTRL-W " {reg} paste register {reg} *CTRL-W_quote*
+ Also works with the = register to insert the result of
+ evaluating an expression.
+ CTRL-W CTRL-C ends the job, see below |t_CTRL-W_CTRL-C|
+! CTRL-W gt go to next tabpage, same as `gt`
+! CTRL-W gT go to previous tabpage, same as `gT`
+
+ See option 'termwinkey' for specifying another key instead of CTRL-W that
+ will work like CTRL-W. However, typing 'termwinkey' twice sends 'termwinkey'
+--- 65,87 ----
+ the job. This uses a pty when possible. You can click outside of the
+ terminal window to move keyboard focus elsewhere.
+
++ *t_CTRL-W_CTRL-W* *t_CTRL-W_:*
+ CTRL-W can be used to navigate between windows and other CTRL-W commands, e.g.:
+ CTRL-W CTRL-W move focus to the next window
+ CTRL-W : enter an Ex command
+ See |CTRL-W| for more commands.
+
+! Special in the terminal window: *t_CTRL-W_.* *t_CTRL-W_N*
+ CTRL-W . send a CTRL-W to the job in the terminal
+ CTRL-W CTRL-\ send a CTRL-\ to the job in the terminal
+ CTRL-W N go to Terminal-Normal mode, see |Terminal-mode|
+ CTRL-\ CTRL-N go to Terminal-Normal mode, see |Terminal-mode|
+! CTRL-W " {reg} paste register {reg} *t_CTRL-W_quote*
+ Also works with the = register to insert the result of
+ evaluating an expression.
+ CTRL-W CTRL-C ends the job, see below |t_CTRL-W_CTRL-C|
+! CTRL-W gt go to next tabpage, same as `gt` *t_CTRL-W_gt*
+! CTRL-W gT go to previous tabpage, same as `gT` *t_CTRL-W_gT*
+
+ See option 'termwinkey' for specifying another key instead of CTRL-W that
+ will work like CTRL-W. However, typing 'termwinkey' twice sends 'termwinkey'
+***************
+*** 92,99 ****
+ 'termwinkey' . send 'termwinkey' to the job in the terminal
+ 'termwinkey' CTRL-\ send a CTRL-\ to the job in the terminal
+ 'termwinkey' N go to terminal Normal mode, see below
+! 'termwinkey' CTRL-N same as CTRL-W N
+! 'termwinkey' CTRL-C same as |t_CTRL-W_CTRL-C|
+ *t_CTRL-\_CTRL-N*
+ The special key combination CTRL-\ CTRL-N can be used to switch to Normal
+ mode, just like this works in any other mode.
+--- 92,99 ----
+ 'termwinkey' . send 'termwinkey' to the job in the terminal
+ 'termwinkey' CTRL-\ send a CTRL-\ to the job in the terminal
+ 'termwinkey' N go to terminal Normal mode, see below
+! 'termwinkey' CTRL-N same as CTRL-W N |t_CTRL-W_N|
+! 'termwinkey' CTRL-C same as CTRL-W CTRL-C |t_CTRL-W_CTRL-C|
+ *t_CTRL-\_CTRL-N*
+ The special key combination CTRL-\ CTRL-N can be used to switch to Normal
+ mode, just like this works in any other mode.
+*** ../vim-8.1.1279/runtime/doc/term.txt 2018-08-07 22:30:26.662240885 +0200
+--- runtime/doc/term.txt 2019-04-11 17:11:03.153605154 +0200
+***************
+*** 1,4 ****
+! *term.txt* For Vim version 8.1. Last change: 2017 Oct 14
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *term.txt* For Vim version 8.1. Last change: 2019 Apr 11
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 111,116 ****
+--- 111,126 ----
+ If this is done while Vim is running the 't_BD' will be sent to the terminal
+ to disable bracketed paste.
+
++ If your terminal supports bracketed paste, but the options are not set
++ automatically, you can try using something like this: >
++
++ if &term =~ "screen"
++ let &t_BE = "\e[?2004h"
++ let &t_BD = "\e[?2004l"
++ exec "set t_PS=\e[200~"
++ exec "set t_PE=\e[201~"
++ endif
++ <
+ *cs7-problem*
+ Note: If the terminal settings are changed after running Vim, you might have
+ an illegal combination of settings. This has been reported on Solaris 2.5
+***************
+*** 324,334 ****
+ t_EI end insert or replace mode (block cursor shape) *t_EI* *'t_EI'*
+ |termcap-cursor-shape|
+ t_RV request terminal version string (for xterm) *t_RV* *'t_RV'*
+! |xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes|
+ t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
+ see |'ambiwidth'|
+ t_RF request terminal foreground color *t_RF* *'t_RF'*
+ t_RB request terminal background color *t_RB* *'t_RB'*
+ t_8f set foreground color (R, G, B) *t_8f* *'t_8f'*
+ |xterm-true-color|
+ t_8b set background color (R, G, B) *t_8b* *'t_8b'*
+--- 334,348 ----
+ t_EI end insert or replace mode (block cursor shape) *t_EI* *'t_EI'*
+ |termcap-cursor-shape|
+ t_RV request terminal version string (for xterm) *t_RV* *'t_RV'*
+! The response is stored in |v:termresponse|
+! |xterm-8bit| |'ttymouse'| |xterm-codes|
+ t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
+ see |'ambiwidth'|
++ The response is stored in |v:termu7resp|
+ t_RF request terminal foreground color *t_RF* *'t_RF'*
++ The response is stored in |v:termrfgresp|
+ t_RB request terminal background color *t_RB* *'t_RB'*
++ The response is stored in |v:termrbgresp|
+ t_8f set foreground color (R, G, B) *t_8f* *'t_8f'*
+ |xterm-true-color|
+ t_8b set background color (R, G, B) *t_8b* *'t_8b'*
+***************
+*** 341,347 ****
+--- 355,363 ----
+ t_EC set cursor color end *t_EC* *'t_EC'*
+ t_SH set cursor shape *t_SH* *'t_SH'*
+ t_RC request terminal cursor blinking *t_RC* *'t_RC'*
++ The response is stored in |v:termblinkresp|
+ t_RS request terminal cursor style *t_RS* *'t_RS'*
++ The response is stored in |v:termstyleresp|
+ 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'*
+***************
+*** 523,529 ****
+ Note about colors: The 't_Co' option tells Vim the number of colors available.
+ When it is non-zero, the 't_AB' and 't_AF' options are used to set the color.
+ If one of these is not available, 't_Sb' and 't_Sf' are used. 't_me' is used
+! to reset to the default colors.
+
+ *termcap-cursor-shape* *termcap-cursor-color*
+ When Vim enters Insert mode the 't_SI' escape sequence is sent. When Vim
+--- 539,545 ----
+ Note about colors: The 't_Co' option tells Vim the number of colors available.
+ When it is non-zero, the 't_AB' and 't_AF' options are used to set the color.
+ If one of these is not available, 't_Sb' and 't_Sf' are used. 't_me' is used
+! to reset to the default colors. Also see 'termguicolors'.
+
+ *termcap-cursor-shape* *termcap-cursor-color*
+ When Vim enters Insert mode the 't_SI' escape sequence is sent. When Vim
+***************
+*** 971,974 ****
+ :noremap! <RightDrag> <LeftDrag>
+ :noremap! <RightRelease> <LeftRelease>
+ <
+! vim:tw=78:ts=8:ft=help:norl:
+--- 987,990 ----
+ :noremap! <RightDrag> <LeftDrag>
+ :noremap! <RightRelease> <LeftRelease>
+ <
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/textprop.txt 2019-05-05 15:47:37.821923550 +0200
+--- runtime/doc/textprop.txt 2019-05-05 17:34:42.564911374 +0200
+***************
+*** 1,4 ****
+! *textprop.txt* For Vim version 8.1. Last change: 2018 Dec 30
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *textprop.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 20,26 ****
+ 3. When text changes |text-prop-changes|
+
+
+- {Vi does not have text properties}
+ {not able to use text properties when the |+textprop| feature was
+ disabled at compile time}
+
+--- 20,25 ----
+*** ../vim-8.1.1279/runtime/doc/tips.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/tips.txt 2018-07-29 14:23:36.371157528 +0200
+***************
+*** 408,421 ****
+ ==============================================================================
+ Executing shell commands in a window *shell-window*
+
+! There have been questions for the possibility to execute a shell in a window
+! inside Vim. The answer: you can't! Including this would add a lot of code to
+! Vim, which is a good reason not to do this. After all, Vim is an editor, it
+! is not supposed to do non-editing tasks. However, to get something like this,
+! you might try splitting your terminal screen or display window with the
+ "splitvt" program. You can probably find it on some ftp server. The person
+ that knows more about this is Sam Lantinga <slouken@cs.ucdavis.edu>.
+! An alternative is the "window" command, found on BSD Unix systems, which
+ supports multiple overlapped windows. Or the "screen" program, found at
+ www.uni-erlangen.de, which supports a stack of windows.
+
+--- 408,420 ----
+ ==============================================================================
+ Executing shell commands in a window *shell-window*
+
+! See |terminal|.
+!
+! Another solution is splitting your terminal screen or display window with the
+ "splitvt" program. You can probably find it on some ftp server. The person
+ that knows more about this is Sam Lantinga <slouken@cs.ucdavis.edu>.
+!
+! Another alternative is the "window" command, found on BSD Unix systems, which
+ supports multiple overlapped windows. Or the "screen" program, found at
+ www.uni-erlangen.de, which supports a stack of windows.
+
+***************
+*** 531,534 ****
+ autocmd InsertEnter * match none
+ <
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 530,533 ----
+ autocmd InsertEnter * match none
+ <
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/todo.txt 2018-06-03 14:42:17.836505122 +0200
+--- runtime/doc/todo.txt 2019-05-05 17:22:02.360947099 +0200
+***************
+*** 1,4 ****
+! *todo.txt* For Vim version 8.1. Last change: 2018 May 17
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *todo.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 34,66 ****
+
+ The #1234 numbers refer to an issue or pull request on github. To see it in a
+ browser use: https://github.com/vim/vim/issues/1234
+!
+ *known-bugs*
+ -------------------- Known bugs and current work -----------------------
+
+ Prompt buffer:
+ - Add a command line history.
+ - delay next prompt until plugin gives OK?
+! end?
+
+ Terminal emulator window:
+ - With a vertical split only one window is updated. (Linwei, 2018 Jun 2,
+ #2977)
+! - When typing : at the more prompt, instead of entering a new Vim command, the
+! : is inserted in the terminal window. Should skip terminal_loop here.
+! ()
+! - How to access selection in Terminal running a shell? (damnskippy, 2018 May
+! 27, #29620 When terminal doesn't use the mouse, use modeless selection.
+! - Win32: Termdebug doesn't work, because gdb does not support mi2 on a tty.
+! This plugin: https://github.com/cpiger/NeoDebug runs gdb as a job,
+! redirecting input and output.
+! Open new console for for program with: "set new-console on"
+ - Win32: Redirecting input does not work, half of Test_terminal_redir_file()
+ is disabled.
+ - Win32: Redirecting output works but includes escape sequences.
+ - Win32: Make terminal used for :!cmd in the GUI work better. Allow for
+ redirection.
+- - Terminal API: Add more functionality? (Ozaki Kiichi 2018 May 13, #2907)
+ - When the job only outputs lines, we could handle resizing the terminal
+ better: store lines separated by line breaks, instead of screen lines,
+ then when the window is resized redraw those lines.
+--- 34,100 ----
+
+ The #1234 numbers refer to an issue or pull request on github. To see it in a
+ browser use: https://github.com/vim/vim/issues/1234
+! (replace 1234 with the issue/pull number)
+ *known-bugs*
+ -------------------- Known bugs and current work -----------------------
+
++ 'incsearch' with :s: (#3321)
++ - Get E20 when using command history to get "'<,'>s/a/b" and no Visual area
++ was set. (#3837)
++ - :s/foo using CTRL-G moves to another line, should not happen, or use the
++ correct line (it uses the last but one line) (Lifepillar, Aug 18, #3345)
++ - :s@pat/tern@ doesn't include "/" in the pattern. (Takahiro Yoshihara, #3637)
++ pass delim to do_search() ?
++ - Also support range: :/foo/,/bar/delete
++ - Also support for user command, e.g. Cfilter
++ - :%s/foo should take the first match below the cursor line, unless there
++ isn't one?
++ Then :%s?foo should take the first match above the cursor line.
++
+ Prompt buffer:
+ - Add a command line history.
+ - delay next prompt until plugin gives OK?
+! - add prompt_addtext({buf}, {expr}) none add text to a prompt buffer
+!
+! Terminal debugger:
+! - Make prompt-buffer variant work better.
+! - Add option to not open the program window. It's not used when attaching to
+! an already running program. (M. Kelly)
+! - When only gdb window exists, on "quit" edit another buffer.
+! - Use a sign group
+! - Termdebug does not work when Vim was build with mzscheme: gdb hangs just
+! after "run". Everything else works, including communication channel. Not
+! initializing mzscheme avoid the problem, thus it's not some #ifdef.
+! - Add support for lldb? #3565
+! - Could we do something similar for debugging Vim scripts? At least see the
+! script while stepping through it. Simple version would use an extra window.
+! More complete solution would actually run Vim in a Terminal and control it
+! with another Vim instance.
+
+ Terminal emulator window:
++ - When the job in the terminal doesn't use mouse events, let the scroll wheel
++ scroll the scrollback, like a terminal does at the shell prompt. #2490
++ And use modeless selection. #2962
++ - When Vim runs in the terminal and changes the title, the statusline needs to
++ be redrawn.
++ - GUI: When using ":set go+=!" a system() call causes the hit-enter prompt.
++ (#3327)
++ - Terminal API: Add more functionality? (Ozaki Kiichi 2018 May 13, #2907)
++ - GUI: hang until key typed. (#3530)
++ - Allow for specifying the directory, with ++cwd={dir}.
+ - With a vertical split only one window is updated. (Linwei, 2018 Jun 2,
+ #2977)
+! - Add a way to make ":term cmd" run "cmd" in a shell, instead of executing it
+! directly. Perhaps ":term ++shell cmd". (#3340)
+! - When pasting should call vterm_keyboard_start_paste(), e.g. when using
+! K_MIDDLEMOUSE, calling insert_reg().
+! - Users expect parsing the :term argument like a shell does, also support
+! single quotes. E.g. with: :term grep 'alice says "hello"' (#1999)
+ - Win32: Redirecting input does not work, half of Test_terminal_redir_file()
+ is disabled.
+ - Win32: Redirecting output works but includes escape sequences.
+ - Win32: Make terminal used for :!cmd in the GUI work better. Allow for
+ redirection.
+ - When the job only outputs lines, we could handle resizing the terminal
+ better: store lines separated by line breaks, instead of screen lines,
+ then when the window is resized redraw those lines.
+***************
+*** 69,79 ****
+ http://bazaar.launchpad.net/~leonerd/pangoterm/trunk/view/head:/main.c#L134
+ - When 'encoding' is not utf-8, or the job is using another encoding, setup
+ conversions.
+- - Termdebug does not work when Vim was build with mzscheme: gdb hangs just
+- after "run". Everything else works, including communication channel. Not
+- initializing mzscheme avoid the problem, thus it's not some #ifdef.
+
+! Patch to fix that ++bad no longer works. (Christian Brabandt, on #2947)
+
+ Does not build with MinGW out of the box:
+ - _stat64 is not defined, need to use "struct stat" in vim.h
+--- 103,121 ----
+ http://bazaar.launchpad.net/~leonerd/pangoterm/trunk/view/head:/main.c#L134
+ - When 'encoding' is not utf-8, or the job is using another encoding, setup
+ conversions.
+
+! Support for popup widows:
+! - Use text properties to define highlighting.
+! - Proposal on issue #4063
+!
+! Notifications for text changes, could be used for LSP.
+! - New event, similar to TextChanged, but guaranteed to provide sequential
+! information of all text changes.
+! Possibly build on undo info (but undo itself is also a change).
+! How to deal with ":%s/this/that" ?
+!
+! Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
+! (#4087)
+
+ Does not build with MinGW out of the box:
+ - _stat64 is not defined, need to use "struct stat" in vim.h
+***************
+*** 82,121 ****
+ Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
+ 13, #2910) Can't reproduce?
+
+! On Win32 when not in the console and t_Co >= 256, allow using 'tgc'.
+! (Nobuhiro Takasaki, #2833) Also check t_Co.
+
+! Patch to fix arguments of :edit. (Dominique Pelle, 2018 May 28 #2966)
+
+! Ptch to update html syntax. (Jorge Maldonado Ventura, #2974)
+
+! Patch to fix that restoring window doesn't work when 'winheight' is large.
+! (Darrell Nash, 2018 May 30, #2971) Doesn't work? Issue #2970
+
+! Patch to add completion to :unlet for environment vars. (Jason Franklin, 2018
+! May 30) Last update.
+
+! Errors found with random data:
+! heap-buffer-overflow in alist_add (#2472)
+
+ More warnings from static analysis:
+ https://lgtm.com/projects/g/vim/vim/alerts/?mode=list
+
+! Patch to make "is" and "as" work bettter. (Jason Franklin, 2018 May 19)
+
+! Patch to add tests for user and language completion. (Dominique Pelle, 2018
+! Jun 2, #2978)
+
+! Using ":file" in quickfix window during an autocommand doesn't work.
+! (Jason Franklin, 2018 May 23) Allow for using it when there is no argument.
+
+! Pull request #2967: Allow white space in sign text. (Ben Jackson)
+
+! Patch for xterm and vt320 builtin termcap. (Kouichi Iwamoto, 2018 May 31,
+! #2973)
+
+! Patch to add more testing for :cd command. (Dominique Pelle, 2018 May 30,
+! #2972)
+
+ Script generated by :mksession does not work well if there are windows with
+ modified buffers
+--- 124,406 ----
+ Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
+ 13, #2910) Can't reproduce?
+
+! Errors found with random data:
+! heap-buffer-overflow in alist_add (#2472)
+
+! Improve fallback for menu translations, to avoid having to create lots of
+! files that source the actual file. E.g. menu_da_de -> menu_da
+! Include part of #3242?
+
+! When a terminal exit_cb closes the window, a following typed key is lost, if
+! it's in a mapping. (2018 Oct 6, #2302, #3522)
+
+! Completion mixes results from the current buffer with tags and other files.
+! Happens when typing CTRL-N while still search for results. E.g., type "b_" in
+! terminal.c and then CTRL-N twice.
+! Should do current file first and not split it up when more results are found.
+! (Also #1890)
+
+! Internal diff doesn't handle binary file like external diff does. (Mike
+! Williams, 2018 Oct 30)
+
+! Problem with :tlmenu: Detach item added with all modes? Issue #3563.
+!
+! The quoting of the [command] argument of :terminal is not clearly documented.
+! Give a few examples. (#4288)
+!
+! Bug: script written with "-W scriptout" contains Key codes, while the script
+! read with "-s scriptin" expects escape codes. Probably "scriptout" needs to
+! be adjusted. (Daniel Steinberg, 2019 Feb 24, #4041)
+!
+! Bug: "vipgw" does not put cursor back where it belongs. (Jason Franklin, 2019
+! Mar 5)
+!
+! When using a timer callback vgetc_busy is reset, allowing for using input().
+! But in a channel callback this does not happen. We need to do something
+! similar to check_due_timer(). Also see #3809.
+!
+! C syntax: {} inside () causes following {} to be highlighted as error.
+! (Michalis Giannakidis, 2006 Jun 1)
+!
+! Support setting the character displayed below the last line? Neovim uses
+! "eob:X" in 'fillchars'.
+!
+! Check: __attribute__((format(printf, on semsg() and siemsg(). Where was this
+! added?
+!
+! Add test for urxvt mouse codes. Also test that mouse coordinates can be
+! negative. (see #4326)
+!
+! 'cmdheight' has a tab-local value, but it cannot be obtained with
+! `:echo gettabwinvar(2, 1, '&cmdheight')` returns the value for the _current_
+! tab page. (Ingo Karkat, #4324)
+! :call settabwinvar(1, 1, '&cmdheight', 2) also doesn't work well.
+!
+! Add a chdir() function, which will set the window-local, tab-local or global
+! directory, first one that is currently used. Returns the current directory,
+! so that this works:
+! let save_dir = chdir('somewhere')
+! ...
+! call chdir(save_dir)
+!
+! This modeline throws unexpected errors: (#4165)
+! vim: syn=nosyntax
+!
+! ":doau SomeEvent" gives "No matching autocommands". This message doesn't give
+! a hint about how to fix it. (#4300)
+!
+! Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
+! #2948. (related to #1512?)
+! On Win32 it stops showing, because showState is already ShS_SHOWING.
+! balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
+! 20, #2481)
+! Also see #2352, want better control over balloon, perhaps set the position.
+! Should also be possible to add highlighting, like in the status line?
+! balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail,
+! 2018 Sep 14)
+! Another request: #3811.
+
+ More warnings from static analysis:
+ https://lgtm.com/projects/g/vim/vim/alerts/?mode=list
+
+! Still a E315 error when using terminal. (Masato Nishihata, #3959)
+!
+! Use dict_iterate_start() / dict_iterate_next() instead of relying on the
+! internals of the dict structure.
+!
+! Running test_gui and test_gui_init with Motif sometimes kills the window
+! manager. Problem with Motif? Now test_gui crashes in submenu_change().
+! Athena is OK.
+! Motif: Build on Ubuntu can't enter any text in dialog text fields.
+!
+! nvo-mode mapping works on Windows, not on Linux. (#3678)
+!
+! Missing tests for:
+! - add_termcap_entry()
+!
+! When using exclusive selection and vi" that fails, cursor moves to the left.
+! Cursor should not move. (#4024)
+!
+! Incsearch test fails when locale is "C". (Dominique Pelle, #3986)
+! Also run all tests with C locale?
+!
+! "vat" doesn't work well on XML when the closing > is on another line.
+! #3927
+!
+! Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17)
+! Related to bracketed paste. I cannot reproduce it.
+!
+! When 'confirm' is set a "silent q" doesn't show the prompt. It should in this
+! case. (Nate Peterson, 2019 Jan 31, #3892)
+! For "silent! q" it should not prompt and just fail.
+!
+! Add <aevent>, which expands to the currently triggered autocommand event name.
+! (Daniel Hahler, #4232) Or add it to v:event (easier to use but slightly more
+! expensive).
+!
+! Some xterm responses are not properly handled: (Markus Gömmel, 2019 Apr 1)
+! DCS 0 $ r Pt ST should be ignored.
+! DCS 0 + r/Pt/ ST already ignored?
+!
+! Using CTRL-L to add a character to the search string that contains \v,
+! punctuation is repeated. (Smylers, 2018 Nov 17, #3621)
+!
+! ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550).
+!
+! Using single wide base character with double wide composing character gives
+! drawing errors. Fill up the base character? (Dominique, #4328)
+!
+! Problem with two buffers with the same name a/b, if it didn't exist before and
+! is created outside of Vim. (dskloetg, 2018 Jul 16, #3219)
+!
+! When 'sidescrolloff' is set, using "zl" to go to the end of the line, suddenly
+! scrolls back. Should allow for this scrolling, like 'scrolloff' does when
+! using CTRL-E. (Yee Cheng Chin, #3721)
+!
+! Invalid memory access with old regexp engine. (Dominique Pelle, 2018 Sep 3,
+! #3405) Introduced by 8.0.1517, which was fixing another memory access error.
+! (Sep 8)
+!
+! Add function to make use of internal diff, working on two lists and returning
+! unified diff (list of lines).
+
+! When splitting a window with few text lines, the relative cursor position is
+! kept, which means part of the text isn't displayed. Better show all the text
+! when possible. (Dylan Lloyd, #3973)
+
+! Make ":interactive !cmd" stop termcap mode, also when used in an autocommand.
+! (#3692)
+
+! Patch to add environ(), gets a dict with all environment vars, and getenv(),
+! useful for environment vars that are not made of keyword chars.
+! (Yasuhiro Matsumoto, #2875)
+
+! Add buffer argument to undotree(). (#4001)
+
+! Patch to restore X11 connection. (#844)
+!
+! Patch to add optional arguments with default values.
+! (Andy Massimino, #3952) Needs to be reviewed.
+!
+! Patch to add more info to OptionSet. Should mention what triggered the change
+! ":set", ":setlocal", ":setglobal", "modeline"; and the old global value.
+! #4118. Proposed implementation: 2019 Mar 27.
+! Updated 2019 Apr 9: ASAN fails.
+!
+! Problem with Visual yank when 'linebreak' and 'showbreak' are set.
+! Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018
+! Nov 17) Asked about this, Dec 22. Christian will have a look.
+!
+! Patch for larger icons in installer. (#978) Still not good.
+!
+! Patch to add commands to jump to quickfix entry above/below the cursor.
+! (Yegappan Lakshmanan, #4316) Also do :cbefore and :cafter.
+!
+! Patch to fix that using "5gj" starting inside a closed fold does not work on
+! screen lines but on text lines. (Julius Hulsmann, #4095) Lacks a test.
+!
+! Patch to implement 'diffref' option. (#3535)
+! Easier to use a 'diffmaster' option, is the extra complexity needed?
+! Not ready to include.
+!
+! Memory leaks in test_channel? (or is it because of fork())
+! Using uninitialized value in test_crypt.
+! Memory leak in test_terminal:
+! ==23530== by 0x2640D7: alloc (misc2.c:874)
+! ==23530== by 0x2646D6: vim_strsave (misc2.c:1315)
+! ==23530== by 0x25841D: FullName_save (misc1.c:5443)
+! ==23530== by 0x17CB4F: fix_fname (buffer.c:4794)
+! ==23530== by 0x17CB9A: fname_expand (buffer.c:4838)
+! ==23530== by 0x1759AB: buflist_new (buffer.c:1889)
+! ==23530== by 0x35C923: term_start (terminal.c:421)
+! ==23530== by 0x2AFF30: mch_call_shell_terminal (os_unix.c:4377)
+! ==23530== by 0x2B16BE: mch_call_shell (os_unix.c:5383)
+! Memory leak in test_alot with pyeval() (allocating partial)
+!
+! gethostbyname() is old, use getaddrinfo() if available. (#3227)
+!
+! matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
+! 19.
+!
+! Patch to specify color for cterm=underline and cterm=undercurl, like "guisp".
+! Does #2405 do this?
+!
+! Patch to add an interrupt() function: sets got_int. Useful in an autocommand
+! such as BufWritePre that checks the file name or contents.
+!
+! More patches to check:
+! - #4098 improve Travis config
+!
+! Should make 'listchars' global-local. Local to window or to buffer?
+! Probably window.
+! Add something like 'fillchars' local to window, but allow for specifying a
+! highlight name. Esp. for the statusline.
+!
+! Sourceforge Vim pages still have content, redirect from empty page.
+! Check for PHP errors. (Wayne Davison, 2018 Oct 26)
+!
+! Patch to support ":tag <tagkind> <tagname>". (emmrk, 2018 May 7, #2871)
+! Use something like ":tag {kind}/{tagname}".
+! Not ready to include.
+!
+! :pedit resets the 'buflisted' option unexpectedly. (Wang Shidong, 2018 Oct 12,
+! #3536)
+!
+! home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9)
+!
+! When the status line uses term_gettitle(), it does not get updated when the
+! terminal title changes. (Josh Triplett, 2018 Sep 9, #3418)
+! How would we know that the status line needs to be updated?
+!
+! Adjust windows installer explanation of behavior. (scootergrisen, #3310)
+!
+! Set g:actual_curbuf when evaluating 'statusline', not just with an expression.
+! (Daniel Hahler, 2018 Aug 8, #3299)
+!
+! Update for xim-input-style help (Tony Mechelynck, 2019 Jan 10).
+! Feedback from someone who uses this?
+!
+! ml_get error. (Dominique Pelle, 2018 Sep 14, #3434)
+!
+! Patch to use forward slash for completion even when 'shellslash' is set.
+! Adds 'completepathslash'. (Yasuhiro Matsumoto, 2018 Nov 15, #3612)
+!
+! Only output t_Cs when t_Ce is also set. do not use Cs and Ce termcap entries. (Daniel Hahler, 2018 Sep 25)
+! Add t_cS and t_cR for cursor color select and reset. Use Cs and Cr terminfo
+! values.
+!
+! Further xdiff changes:
+! - More options, e.g. different kind of whitespace diff.
+! - when editing text, update the surrounding diff blocks.
+! - omit diff.exe from distribution
+! - Can we make this show differences within a line?
+! - add option to use external diff above a certain size.
+!
+! Difference between two regexp engines: #3373
+!
+! Patch to properly break CJK lines: #3875
+! Requires more tests. dbcs_ functions are not implemented.
+!
+! Patch to add ch_listen() (Yasuhiro Matsumoto, 2018 Nov 26, #3639)
+! What is the practical use for this?
+!
+! When the last line wraps, selecting with the mouse below that line only
+! includes the first screen line. (2018 Aug 23, #3368)
+!
+! Refactored HTML indent file. (Michael Lee, #1821)
+! Ask to write a test first.
+!
+! Patch to add getregpoint() and setreg() with an option to set "".
+! (Andy Massimino, 2018 Aug 24, #3370)
+! Better name?
+!
+! MS-Windows: .lnk file not resolved properly when 'encoding' is set.
+! (lkintact, 2018 Sep 22, #3473)
+!
+! Merge checking for 'cursorline' and 'concealcursor', see neovim #9492.
+!
+! Win32 key codes are messy. Mike Williams tried to fix that, but now old
+! mappings no longer work. Create a new terminal for the better solution?
+
+ Script generated by :mksession does not work well if there are windows with
+ modified buffers
+***************
+*** 124,149 ****
+ skip "badd fname" if "fname" is already in the buffer list
+ remove remark about unloading buffers from documentation
+
+- Patch to make :help work for tags with a ?. (Hirohito Higashi, 2018 May 28)
+-
+ Compiler warnings (geeknik, 2017 Oct 26):
+ - signed integer overflow in do_sub() (#2249)
+ - signed integer overflow in get_address() (#2248)
+ - signed integer overflow in getdecchrs() (#2254)
+ - undefined left shift in get_string_tv() (#2250)
+
+! Patch for more quickfix refactoring. (Yegappan Lakshmanan, #2950)
+
+ Tests failing for "make testgui" with GTK:
+ - Test_setbufvar_options()
+ - Test_exit_callback_interval()
+
+! Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
+! #2948. (related to #1512?)
+! On Win32 it stops showing, because showState is already ShS_SHOWING.
+! balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
+! 20, #2481)
+! Also see #2352, want better control over balloon, perhaps set the position.
+
+ Try out background make plugin:
+ https://github.com/AndrewVos/vim-make-background
+--- 409,449 ----
+ skip "badd fname" if "fname" is already in the buffer list
+ remove remark about unloading buffers from documentation
+
+ Compiler warnings (geeknik, 2017 Oct 26):
+ - signed integer overflow in do_sub() (#2249)
+ - signed integer overflow in get_address() (#2248)
+ - signed integer overflow in getdecchrs() (#2254)
+ - undefined left shift in get_string_tv() (#2250)
+
+! Win32 console: <F11> and <F12> typed in Insert mode don't result in normal
+! characters. (#3246)
+!
+! 'foldtext' is evaluated too often. (Daniel Hahler, #2773)
+!
+! Add Native language protocol server (LSP) support. (Yegappan Lakshmanan, 2018
+! Oct 28)
+!
+! ml_get error when using a Python script. (Yggdroot, 2017 Jun 1, #1737)
+! Lemonboy can reproduce (2017 Jun 5)
+! Also reproduced by Benjamin Doherty, 2018 Oct 4.
+! Simpler way: Ken Takata, Oct 6.
+!
+! Add more testing of the GTK GUI.
+! - gtk_test_widget_click() can be used to simulate a click in a widget.
+
+ Tests failing for "make testgui" with GTK:
+ - Test_setbufvar_options()
+ - Test_exit_callback_interval()
+
+! Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
+! Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.
+! Patch to be able to disable default digraphs (incomplete) (Eric Pruitt, 2018
+! Nov 22).
+!
+! Patch to list user digraphs. (Christian Brabandt, 2012 Apr 14)
+!
+! Patch to add digraph() function. (Christian Brabandt, 2013 Aug 22, update Aug
+! 24)
+
+ Try out background make plugin:
+ https://github.com/AndrewVos/vim-make-background
+***************
+*** 151,157 ****
+ https://github.com/yegappan/asyncmake
+
+ Add a ModeChanged autocommand that has an argument indicating the old and new
+! mode. Also used for switching Terminal mode.
+
+ Add an option with file patterns, to be used when unloading a buffer: If there
+ is a match, remove entries for the buffer from marks, jumplist, etc. To be
+--- 451,457 ----
+ https://github.com/yegappan/asyncmake
+
+ Add a ModeChanged autocommand that has an argument indicating the old and new
+! mode, as what's returned from mode(). Also used for switching Terminal mode.
+
+ Add an option with file patterns, to be used when unloading a buffer: If there
+ is a match, remove entries for the buffer from marks, jumplist, etc. To be
+***************
+*** 159,201 ****
+
+ Cursor in wrong position when line wraps. (#2540)
+
+! Patch for Lua support. (Kazunobu Kuriyama, 2018 May 26)
+
+ Add an option similar to 'lazyredraw' to skip redrawing while executing a
+ script or function.
+
+ MS-Windows: write may fail if another program is reading the file.
+ If 'readonly' is not set but the file appears to be readonly later, try again
+ (wait a little while).
+ CreateFile() returns ERROR_SHARING_VIOLATION (Linwei, 2018 May 5)
+
+ Should add a test for every command line argument. Check coverage for what is
+ missing: --nofork, -A , -b, -h, etc.
+
+! Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15)
+! Update 2018 March 12, #2711
+!
+! Improve the installer for MS-Windows. There are a few alternatives:
+! - Add silent install option. (Shane Lee, #751)
+! - Installer from Cream (Steve Hall).
+! - Modern UI 2.0 for the Nsis installer. (Guopeng Wen)
+! https://github.com/gpwen/vim-installer-mui2
+! - make it possible to do a silent install, see
+! http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
+! Version from Guopeng Wen does this.
+! - MSI installer: https://github.com/petrkle/vim-msi/
+! - The one on Issue 279.
+! Problem: they all work slightly different (e.g. don't install vimrun.exe).
+! How to test that it works well for all Vim users?
+
+ Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
+
+! Patch to use NGETTEXT() in many more places. (Sergey Alyoshin, 2018 May 25)
+! Updated ptach May 27.
+
+! Does setting 'cursorline' cause syntax highlighting to slow down? Perhaps is
+! mess up the cache? (Mike Lee Williams, 2018 Jan 27, #2539)
+! Also: 'foldtext' is evaluated too often. (Daniel Hahler, #2773)
+
+ When using :packadd files under "later" are not used, which is inconsistent
+ with packages under "start". (xtal8, #1994)
+--- 459,508 ----
+
+ Cursor in wrong position when line wraps. (#2540)
+
+! Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
+! #2546) Fixes #1057. Missing a test.
+!
+! Setting 'columns' in a BufEnter autocommand causes a second tab width to
+! behave strangely, as if there is a gap and a vertical window separator.
+! (Michael Soyka, 2018 Sep 23, #3477)
+!
+! Make {skip} argument of searchpair() consistent with other places where we
+! pass an expression to evaluate. Allow passing zero for "never skip".
+
+ Add an option similar to 'lazyredraw' to skip redrawing while executing a
+ script or function.
+
++ Universal solution to detect if t_RS is working, using cursor position.
++ Koichi Iwamoto, #2126
++
++ When using a menu item while the "more" prompt is displayed doesn't work well.
++ E.g. after using help->version. Have a key that ends the "more" prompt and
++ does nothing otherwise?
++
+ MS-Windows: write may fail if another program is reading the file.
+ If 'readonly' is not set but the file appears to be readonly later, try again
+ (wait a little while).
+ CreateFile() returns ERROR_SHARING_VIOLATION (Linwei, 2018 May 5)
+
++ Using --remote to open a file in which a # appears does not work on
++ MS-Windows. Perhaps in \# the \ is seen as a path separator. (Axel Bender,
++ 2017 Feb 9) Can we expand wildcards first and send the path literally to the
++ receiving Vim? Or make an exception for #, it's not useful remotely.
++
+ Should add a test for every command line argument. Check coverage for what is
+ missing: --nofork, -A , -b, -h, etc.
+
+! ":au * * command" should not be allowed, only use * for event when listing or
+! deleting autocmds, not when adding them.
+
+ Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
+
+! Delete all the specific stuff for the Borland compiler? (#3374)
+! Patch in #3377 (Thomas Dziedzic)
+
+! With 'foldmethod' "indent" and appending an empty line, what follows isn't
+! included in the existing fold. Deleting the empty line and undo fixes it.
+! (Oleg Koshovetc, 2018 Jul 15, #3214)
+
+ When using :packadd files under "later" are not used, which is inconsistent
+ with packages under "start". (xtal8, #1994)
+***************
+*** 222,237 ****
+
+ Add the debug command line history to viminfo.
+
+- Avoid that "sign unplace id" does a redraw right away, esp. when there is a
+- sequence of these commands. (Andy Stewart, 2018 Mar 16)
+-
+- ch_sendraw() with long string does not try to read inbetween, which may cause
+- a deadlock if the reading side is waiting for the write to finish. (Nate
+- Bosch, 2018 Jan 13, #2548)
+-
+- Patch to include a cfilter plugin to filter quickfix/location lists.
+- (Yegappan Lakshmanan, 2018 May 12)
+-
+ Add Makefiles to the runtime/spell directory tree, since nobody uses Aap.
+ Will have to explain the manual steps (downloading the .aff and .dic files,
+ applying the diff, etc.
+--- 529,534 ----
+***************
+*** 250,256 ****
+ Using 'wildignore' also applies to literally entered file name. Also with
+ :drop (remote commands).
+
+! Patch to support ":tag <tagkind> <tagname". (emmrk, 2018 May 7, #2871)
+
+ Implement option_save() and option_restore():
+ option_restore({list}) *option_restore()*
+--- 547,554 ----
+ Using 'wildignore' also applies to literally entered file name. Also with
+ :drop (remote commands).
+
+! Inserting a line in a CompleteDone autocommand may confuse undo. (micbou,
+! 2018 Jun 18, #3027)
+
+ Implement option_save() and option_restore():
+ option_restore({list}) *option_restore()*
+***************
+*** 275,322 ****
+ values are handled and the script ID is restored, so that
+ `:verbose set` will show where the option was originally set,
+ not where it was restored.
+
+ "gvim --remote" from a directory with non-word characters changes the current
+ directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266)
+ Also see #1689.
+
+- ml_get error when using a Python script. (Yggdroot, 2017 Jun 1, #1737)
+- Lemonboy can reproduce (2017 Jun 5)
+-
+ crash when removing an element while inside map(). (Nikolai Pavlov, 2018 Feb
+ 17, #2652)
+
+ When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
+ highlighted. (van-de-bugger, 2018 Jan 23, #2576)
+
+! Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
+! #2546) Fixes #1057. Missing a test.
+!
+! Patch to add winlayout() function. (Yegappan Lakshmanan, 2018 Jan 4)
+
+ No profile information for function that executes ":quit". (Daniel Hahler,
+ 2017 Dec 26, #2501)
+
+! Get a "No Name" buffer when 'hidden' is set and opening a new window from the
+! quickfix list. (bfrg, 2018 Jan 22, #2574)
+
+! CTRL-X on zero gets stuck on 0xfffffffffffffffe. (Hengyang Zhao, #2746)
+
+! A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
+
+ Invalid range error when using BufWinLeave for closing terminal.
+ (Gabriel Barta, 2017 Nov 15, #2339)
+
+- Using an external diff is inefficient. Not all systems have a good diff
+- program available (esp. MS-Windows). Would be nice to have in internal diff
+- implementation. Can then also use this for displaying changes within a line.
+- Olaf Dabrunz is working on this. (10 Jan 2016)
+- 9 Instead invoking an external diff program, use builtin code. One can be
+- found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c
+- It's complicated and badly documented.
+- Alternative: use the xdiff library. Patch from Christian Brabandt, 2018 Mar
+- 20, #2732)
+-
+ ml_get errors with buggy script. (Dominique, 2017 Apr 30)
+
+ Error in emsg with buggy script. (Dominique, 2017 Apr 30)
+--- 573,608 ----
+ values are handled and the script ID is restored, so that
+ `:verbose set` will show where the option was originally set,
+ not where it was restored.
++ Alternatively: save and restore ALL options. Implementation needs to use
++ copy-on-write. Return an ID from option_save(), when
++ option_restore(ID) is called give an error if another option_save()
++ was called in the meantime, they must be balanced.
+
+ "gvim --remote" from a directory with non-word characters changes the current
+ directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266)
+ Also see #1689.
+
+ crash when removing an element while inside map(). (Nikolai Pavlov, 2018 Feb
+ 17, #2652)
+
+ When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
+ highlighted. (van-de-bugger, 2018 Jan 23, #2576)
+
+! ":file" does not show anything when 'shortmess' contains 'F'. (#3070)
+
+ No profile information for function that executes ":quit". (Daniel Hahler,
+ 2017 Dec 26, #2501)
+
+! A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
+
+! Add script number to profile? (#3330 breaks tests).
+
+! A function defined locally and lambda's are not easily recognized.
+! Mention where they were defined somewhere.
+
+ Invalid range error when using BufWinLeave for closing terminal.
+ (Gabriel Barta, 2017 Nov 15, #2339)
+
+ ml_get errors with buggy script. (Dominique, 2017 Apr 30)
+
+ Error in emsg with buggy script. (Dominique, 2017 Apr 30)
+***************
+*** 337,351 ****
+ In an optional package the "after" directory is not scanned?
+ (Renato Fabbri, 2018 Feb 22)
+
+- Universal solution to detect if t_RS is working, using cursor position.
+- Koichi Iwamoto, #2126
+-
+ Patch for Neovim concerning restoring when closing help window. (glacambre
+ neovim #7431)
+
+- Default install on MS-Windows should source defaults.vim.
+- Ask whether to use Windows or Vim key behavior?
+-
+ Patch for improving detecting Ruby on Mac in configure. (Ilya Mikhaltsou, 2017
+ Nov 21)
+
+--- 623,631 ----
+***************
+*** 363,378 ****
+
+ matchit hasn't been maintained for a long time. #955.
+
+- Patch to add variable name after "scope add". (Eddie Lebow, 2018 Feb 7, #2620)
+- Maybe not needed?
+-
+ Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313)
+
+ MS-Windows: buffer completion doesn't work when using backslash (or slash)
+ for a path separator. (xtal8, #2201)
+
+! Patch to adjust to DPI setting for GTK. (Roel van de Kraats, 2017 Nov 20,
+! #2357)
+
+ Test runtime files.
+ Start with filetype detection: testdir/test_filetype.vim
+--- 643,655 ----
+
+ matchit hasn't been maintained for a long time. #955.
+
+ Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313)
+
+ MS-Windows: buffer completion doesn't work when using backslash (or slash)
+ for a path separator. (xtal8, #2201)
+
+! Would be nice for insert mode completion to highlight the text that was added
+! (and may change when picking another completion).
+
+ Test runtime files.
+ Start with filetype detection: testdir/test_filetype.vim
+***************
+*** 386,394 ****
+ After using :noautocmd CursorMoved may still trigger. (Andy Stewart, 2017 Sep
+ 13, #2084). Set old position after the command.
+
+- Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28)
+- Still happens (2017 Jul 9)
+-
+ When bracketed paste is used, pasting at the ":append" prompt does not get the
+ line breaks. (Ken Takata, 2017 Aug 22)
+
+--- 663,668 ----
+***************
+*** 397,406 ****
+ Patch to fix increment/decrement not working properly when 'virtualedit' is
+ set. (Hirohito Higashi, 2016 Aug 1, #923)
+
+- Memory leaks in test_channel? (or is it because of fork())
+- Using uninitialized value in test_crypt.
+- Memory leaks in test_escaped_glob
+-
+ Patch to make gM move to middle of line. (Yasuhiro Matsumoto, Sep 8, #2070)
+
+ Cannot copy modeless selection when cursor is inside it. (lkintact, #2300)
+--- 671,676 ----
+***************
+*** 410,417 ****
+ Now on github: #1856. Updated Oct 2017
+ Got permission to include this under the Vim license.
+
+- Refactored HTML indent file. (Michael Lee, #1821)
+-
+ Test_writefile_fails_conversion failure on Solaris because if different iconv
+ behavior. Skip when "uname" returns "SunOS"? (Pavel Heimlich, #1872)
+
+--- 680,685 ----
+***************
+*** 473,484 ****
+ Cindent: returning a structure has more indent for the second item.
+ (Sam Pagenkopf, 2017 Sep 14, #2090)
+
+- Completion mixes results from the current buffer with tags and other files.
+- Happens when typing CTRL-N while still search for results. E.g., type "b_" in
+- terminal.c and then CTRL-N twice.
+- Should do current file first and not split it up when more results are found.
+- (Also #1890)
+-
+ Patch from Christian Brabandt to preserve upper case marks when wiping out a
+ buffer. (2013 Dec 9)
+ Also fixes #2166?
+--- 741,746 ----
+***************
+*** 491,499 ****
+ Profile of a dict function is lost when the dict is deleted. Would it be
+ possible to collect this? (Daniel Hahler, #2350)
+
+- Add `:filter` support for various commands (Marcin Szamotulski, 2017 Nov 12
+- #2322) Now in #2327?
+-
+ When checking if a bufref is valid, also check the buffer number, to catch the
+ case of :bwipe followed by :new.
+
+--- 753,758 ----
+***************
+*** 527,535 ****
+ Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May
+ 8, #1690)
+
+- Running test_gui and test_gui_init with Motif sometimes kills the window
+- manager. Problem with Motif?
+-
+ Bogus characters inserted when triggering indent while changing text.
+ (Vitor Antunes, 2016 Nov 22, #1269)
+
+--- 786,791 ----
+***************
+*** 545,553 ****
+
+ Memory leak in test97? The string is actually freed. Weird.
+
+- Patch to add configure flags to skip rtl, farsi and arabic support.
+- (Diego Carrión, #1867)
+-
+ assert_fails() can only check for the first error. Make it possible to have
+ it catch multiple errors and check all of them.
+
+--- 801,806 ----
+***************
+*** 586,594 ****
+ buffer is not deleted when using the session file. (#1393)
+ Should add the buffer in hidden state.
+
+- When an item in the quickfix list has a file name that does not exist, behave
+- like the item was not a match for :cnext.
+-
+ Wrong diff highlighting with three files. (2016 Oct 20, #1186)
+ Also get E749 on exit.
+ Another example in #1309
+--- 839,844 ----
+***************
+*** 637,646 ****
+ call Foo(12, all = 0)
+ call Foo(12, 15, 0)
+
+- Change the Farsi code to work with UTF-8. Possibly combined with the Arabic
+- support, or similar.
+- Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2)
+-
+ Add a command to take a range of lines, filter them and put the output
+ somewhere else. :{range}copy {dest} !cmd
+
+--- 887,892 ----
+***************
+*** 668,682 ****
+ Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11,
+ #1053) With patch, does it work?
+
+- Using --remote to open a file in which a # appears does not work on
+- MS-Windows. Perhaps in \# the \ is seen as a path separator. (Axel Bender,
+- 2017 Feb 9) Can we expand wildcards first and send the path literally to the
+- receiving Vim? Or make an exception for #, it's not useful remotely.
+-
+ ":sbr" docs state it respects 'switchbuf', but "vsplit" does not cause a
+ vertical split. (Haldean Brown, 2017 Mar 1)
+
+ Use ADDR_OTHER instead of ADDR_LINES for many more commands.
+ Add tests for using number larger than number of lines in buffer.
+
+ Might be useful to have isreadonly(), like we have islocked().
+--- 914,924 ----
+ Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11,
+ #1053) With patch, does it work?
+
+ ":sbr" docs state it respects 'switchbuf', but "vsplit" does not cause a
+ vertical split. (Haldean Brown, 2017 Mar 1)
+
+ Use ADDR_OTHER instead of ADDR_LINES for many more commands.
++ E.g. all the location list commands use a count.
+ Add tests for using number larger than number of lines in buffer.
+
+ Might be useful to have isreadonly(), like we have islocked().
+***************
+*** 696,716 ****
+
+ Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
+
+- Patch to fix profiling condition lines. (Ozaki Kiichi,, 2017 Dec 26, #2499)
+-
+- Patch to be able to separately map CTRL-H and BS on Windows.
+- (Linwei, 2017 Jul 11, #1833)
+-
+ When 'completeopt' has "noselect" does not insert a newline. (Lifepillar, 2017
+ Apr 23, #1653)
+
+ Window resizing with 'winfixheight': With a vertical split the height changes
+ anyway. (Tommy allen, 2017 Feb 21, #1502)
+
+- When adding an item to a new quickfix list make ":cnext" jump to that item.
+- Make a difference being at the first item and not having used :cnext at all.
+- (Afanasiy Fet, 2017 Jan 3)
+-
+ Invalid behavior with NULL list. (Nikolai Pavlov, #768)
+ E.g. deepcopy(test_null_list())
+
+--- 938,949 ----
+***************
+*** 750,755 ****
+--- 983,990 ----
+ - When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler,
+ 2016 Dec 11, #1320)
+ - Implement |job-term| ?
++ - Calling a function when receiving a "call" on a channel, using feedkeys()
++ does not work. It does work from a timer. (Qiming Zhao, #3852)
+ - Channel test fails with Motif. Sometimes kills the X11 server.
+ - When a message in the queue but there is no callback, drop it after a while?
+ Add timestamp to queued messages and callbacks with ID, remove after a
+***************
+*** 766,771 ****
+--- 1001,1012 ----
+ Although user could use "xterm -e 'cmd arg'".
+
+ Regexp problems:
++ - NFA engine can be slow for some patterns. Dominique found out that most
++ time is spent in addstate_here() copying the threads. Instead of copying,
++ let each thread point to the next one (by offset, the list is reallocated).
++ (Dominique Pelle, 2019 Feb 18)
++ - Old engine: using 'incsearch' /\Zabc does not highlight the "c" if it has a
++ composing character. New engine is OK. (Tony Mechelynck, 2019 May 5)
+ - When search pattern has the base character both with and without combining
+ character, search fails. E.g. "รรีบ" in "การรีบรักใคร". (agguser, #2312)
+ - [:space:] only matches ASCII spaces. Add [:white:] for all space-like
+***************
+*** 827,835 ****
+ use the current behavior.
+ Include the test.
+
+- Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22.
+- New update 2017 Apr 10, #1628
+-
+ When 'keywordprg' starts with ":" the argument is still escaped as a shell
+ command argument. (Romain Lafourcade, 2016 Oct 16, #1175)
+
+--- 1068,1073 ----
+***************
+*** 898,906 ****
+ Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
+ times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
+
+- This does not work: :set cscopequickfix=a-
+- (Linewi, 2015 Jul 12, #914)
+-
+ Possibly wrong value for seq_cur. (Florent Fayolle, 2016 May 15, #806)
+
+ Filetype plugin for awk. (Doug Kearns, 2016 Sep 5)
+--- 1136,1141 ----
+***************
+*** 943,949 ****
+ Add a way to restart a timer. It's similar to timer_stop() and timer_start(),
+ but the reference remains valid.
+
+! Need to try out instructions in INSSTALLpc.txt about how to install all
+ interfaces and how to build Vim with them.
+ Appveyor build with self-installing executable, includes getting most
+ interfaces: https://github.com/k-takata/vim/tree/chrisbra-appveyor-build
+--- 1178,1184 ----
+ Add a way to restart a timer. It's similar to timer_stop() and timer_start(),
+ but the reference remains valid.
+
+! Need to try out instructions in INSTALLpc.txt about how to install all
+ interfaces and how to build Vim with them.
+ Appveyor build with self-installing executable, includes getting most
+ interfaces: https://github.com/k-takata/vim/tree/chrisbra-appveyor-build
+***************
+*** 994,1002 ****
+ Feature request: add the "al" text object, to manipulate a screen line.
+ Especially useful when using 'linebreak'
+
+- Access to uninitialized memory in match_backref() regexp_nda.c:4882
+- (Dominique Pelle, 2015 Nov 6)
+-
+ ":cd C:\Windows\System32\drivers\etc*" does not work, even though the
+ directory exists. (Sergio Gallelli, 2013 Dec 29)
+
+--- 1229,1234 ----
+***************
+*** 1012,1020 ****
+ Patch to add {skip} argument to search(). (Christian Brabandt, 2016 Feb 24)
+ Update 2016 Jun 10, #861
+
+- Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
+- Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.
+-
+ Patch to show search statistics. (Christian Brabandt, 2016 Jul 22)
+
+ When the CursorMovedI event triggers, and CTRL-X was typed, a script cannot
+--- 1244,1249 ----
+***************
+*** 1029,1037 ****
+ 6, 2nd message)
+ Alternative: ":keeppos" command modifier: ":keeppos windo {cmd}".
+
+- Patch to fix that executable() may fail on very long filename in MS-Windows.
+- (Ken Takata, 2016 Feb 1)
+-
+ Patch to fix display of listchars on the cursorline. (Nayuri Aohime, 2013)
+ Update suggested by Yasuhiro Matsumoto, 2014 Nov 25:
+ https://gist.github.com/presuku/d3d6b230b9b6dcfc0477
+--- 1258,1263 ----
+***************
+*** 1046,1052 ****
+ Patch to add Error autocommand. (Anton Lindqvist, 2016 Feb 17)
+ Only remembers one error.
+
+! Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
+
+ Unexpected delay when using CTRL-O u. It's not timeoutlen.
+ (Gary Johnson, 2015 Aug 28)
+--- 1272,1278 ----
+ Patch to add Error autocommand. (Anton Lindqvist, 2016 Feb 17)
+ Only remembers one error.
+
+! GVim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
+
+ Unexpected delay when using CTRL-O u. It's not timeoutlen.
+ (Gary Johnson, 2015 Aug 28)
+***************
+*** 1093,1102 ****
+ Build with Python on Mac does not always use the right library.
+ (Kazunobu Kuriyama, 2015 Mar 28)
+
+- Patch to add arguments to argc() and argv(). (Yegappan Lakshmanan, 2016 Jan
+- 24) Also need a way to get the global arg list? Update later on Jan 24
+- Update Mar 5. Update Apr 7. Update Jun 5.
+-
+ To support Thai (and other languages) word boundaries, include the ICU
+ library: http://userguide.icu-project.org/boundaryanalysis
+
+--- 1319,1324 ----
+***************
+*** 1201,1212 ****
+
+ Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
+
+- Should be easy to highlight all matches with 'incsearch'. Idea by Itchyny,
+- 2015 Feb 6.
+-
+- Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014 Dec 4.
+- Is this a good solution?
+-
+ Patch: Let rare word highlighting overrule good word highlighting.
+ (Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2)
+
+--- 1423,1428 ----
+***************
+*** 1224,1231 ****
+ Updated patch by Roland Eggner, Dec 16
+ Updated patch from Charles, 2016 Jul 2
+
+- Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
+-
+ Patch for building a 32bit Vim with 64bit MingW compiler.
+ (Michael Soyka, 2014 Oct 15)
+
+--- 1440,1445 ----
+***************
+*** 1371,1383 ****
+
+ Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16)
+
+- Patch to right-align signs. (James Kolb (email james), 2013 Sep 23)
+-
+ Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12)
+
+- Patch to add "ntab" item in 'listchars' to repeat first character. (Nathaniel
+- Braun, pragm, 2013 Oct 13) A better solution 2014 Mar 5.
+-
+ 7 Windows XP: When using "ClearType" for text smoothing, a column of yellow
+ pixels remains when typing spaces in front of a "D" ('guifont' set to
+ "lucida_console:h8").
+--- 1585,1592 ----
+***************
+*** 1385,1393 ****
+
+ :help gives example for z?, but it does not work. m? and t? do work.
+
+- Patch to add funcref to Lua. (Luis Carvalho, 2013 Sep 4)
+- With tests: Sep 5.
+-
+ Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
+
+ Checking runtime scripts: Thilo Six, 2012 Jun 6.
+--- 1594,1599 ----
+***************
+*** 1443,1451 ****
+ Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep
+ 28) With tests: Oct 9.
+
+- Patch from Christian Brabandt to make the "buffer" argument for ":sign place"
+- optional. (2013 Jul 12)
+-
+ Dialog is too big on Linux too. (David Fishburn, 2013 Sep 2)
+
+ Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
+--- 1649,1654 ----
+***************
+*** 1470,1479 ****
+
+ Patch to make confirm() display colors. (Christian Brabandt, 2012 Nov 9)
+
+- Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27)
+-
+- Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15)
+-
+ Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17)
+
+ b:undo_ftplugin cannot call a script-local function. (Boris Danilov, 2013 Jan
+--- 1673,1678 ----
+***************
+*** 1492,1500 ****
+ Patch to improve equivalence classes in regexp patterns.
+ (Christian Brabandt, 2013 Jan 16, update Jan 17)
+
+- Patch to add new regexp classes :ident:, :keyword:, :fname:.
+- (ichizok, 2016 Jan 12, #1373)
+-
+ Patch with suggestions for starting.txt. (Tony Mechelynck, 2012 Oct 24)
+ But use Gnome instead of GTK?
+
+--- 1691,1696 ----
+***************
+*** 1521,1529 ****
+ Suggestion for another map. (Philip Mat, 2012 Jun 18)
+ But use "gi" instead of "a". Or use CTRL-\ CTRL-O.
+
+- Patch to support user name completion on MS-Windows. (Yasuhiro Matsumoto, 2012
+- Aug 16)
+-
+ When there are no command line arguments ":next" and ":argu" give E163, which
+ is confusing. Should say "the argument list is empty".
+
+--- 1717,1722 ----
+***************
+*** 1543,1553 ****
+ for a user action without a prompt. (Maarten Billemont, 2012 Feb 3)
+ Do give the prompt? Quit with an error?
+
+- Patch to list user digraphs. (Christian Brabandt, 2012 Apr 14)
+-
+- Patch to add digraph() function. (Christian Brabandt, 2013 Aug 22, update Aug
+- 24)
+-
+ Patch for input method status. (Hirohito Higashi, 2012 Apr 18)
+
+ Update Vim app icon (for Gnome). (Jakub Steiner, 2013 Dec 6)
+--- 1736,1741 ----
+***************
+*** 1654,1659 ****
+--- 1842,1848 ----
+ Patch to make "z=" work when 'spell' is off. Does this have nasty side
+ effects? (Christian Brabandt, 2012 Aug 5, Update 2013 Aug 12)
+ Would also need to do this for spellbadword() and spellsuggest().
++ https://github.com/chrisbra/vim-mq-patches/blob/master/enable_spellchecking
+
+ On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a
+ 64 bits value. Change all number options to use nropt_T and define it to the
+***************
+*** 1802,1814 ****
+
+ setpos() does not restore cursor position after :normal. (Tyru, 2010 Aug 11)
+
+- 7 The 'directory' option supports changing path separators to "%" to make
+- file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
+- Patch by Christian Brabandt, 2010 Oct 21.
+- Is this an update: related to: #179
+- https://github.com/chrisbra/vim-mq-patches/blob/master/backupdir
+- Fixed patch 2017 Jul 1.
+-
+ With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott,
+ 2010 Oct 24)
+
+--- 1991,1996 ----
+***************
+*** 1836,1842 ****
+ Don't call check_restricted() for histadd(), setbufvar(), settabvar(),
+ setwinvar().
+
+! Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
+
+ When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
+ instead of one. (Constantin Pan, 2010 Sep 10)
+--- 2018,2024 ----
+ Don't call check_restricted() for histadd(), setbufvar(), settabvar(),
+ setwinvar().
+
+! Patch for gVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
+
+ When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
+ instead of one. (Constantin Pan, 2010 Sep 10)
+***************
+*** 1904,1912 ****
+ Patch to use 'foldnestmax' also for "marker" foldmethod. (Arnaud Lacombe, 2011
+ Jan 7)
+
+- Bug with 'incsearch' going to wrong line. (Wolfram Kresse, 2009 Aug 17)
+- Only with "vim -u NONE".
+-
+ Problem with editing file in binary mode. (Ingo Krabbe, 2009 Oct 8)
+
+ With 'wildmode' set to "longest:full,full" and pressing Tab once the first
+--- 2086,2091 ----
+***************
+*** 1952,1963 ****
+ Patch for displaying 0x200c and 0x200d. (Ali Gholami Rudi, 2009 May 6)
+ Probably needs a bit of work.
+
+- Patch to add farsi handling to arabic.c (Ali Gholami Rudi, 2009 May 2)
+- Added test, updates, June 23.
+- Updated for 7.4: http://litcave.rudi.ir/farsi_vim.diff
+- With modification for Tatweel character: https://dpaste.de/VmFw
+- Remark from Ameretat Reith (2014 Oct 13)
+-
+ List of encoding aliases. (Takao Fujiwara, 2009 Jul 18)
+ Are they all OK? Update Jul 22.
+
+--- 2131,2136 ----
+***************
+*** 1996,2003 ****
+
+ Patch for GTK buttons X1Mouse and X2Mouse. (Christian J. Robinson, 2010 Aug 9)
+
+- Motif: Build on Ubuntu can't enter any text in dialog text fields.
+-
+ ":tab split fname" doesn't set the alternate file in the original window,
+ because win_valid() always returns FALSE. Below win_new_tabpage() in
+ ex_docmd.c.
+--- 2169,2174 ----
+***************
+*** 2114,2129 ****
+ "gqip" in Insert mode has an off-by-one error, causing it to reflow text.
+ (Raul Coronado, 2009 Nov 2)
+
+- Update src/testdir/main.aap.
+-
+ Something wrong with session that has "cd" commands and "badd", in such a way
+ that Vim doesn't find the edited file in the buffer list, causing the
+ ATTENTION message? (Tony Mechelynck, 2008 Dec 1)
+ Also: swap files are in ~/tmp/ One has relative file name ".mozilla/...".
+
+- Add v:motion_force. (Kana Natsuno, 2008 Dec 6)
+- Maybe call it v:motiontype.
+-
+ MS-Windows: editing the first, empty buffer, 'ffs' set to "unix,dos", ":enew"
+ doesn't set 'ff' to "unix". (Ben Fritz, 2008 Dec 5) Reusing the old buffer
+ probably causes this.
+--- 2285,2295 ----
+***************
+*** 2313,2321 ****
+ Bug in using a transparent syntax region. (Hanlen in vim-dev maillist, 2007
+ Jul 31)
+
+- C syntax: {} inside () causes following {} to be highlighted as error.
+- (Michalis Giannakidis, 2006 Jun 1)
+-
+ When 'diffopt' has "context:0" a single deleted line causes two folds to merge
+ and mess up syncing. (Austin Jennings, 2008 Jan 31)
+
+--- 2479,2484 ----
+***************
+*** 2366,2373 ****
+ but when compiling further tests -liconv is added without the -L argument,
+ that may fail (e.g., sizeof(int)). (Blaine, 2007 Aug 21)
+
+- When opening quickfix window, disable spell checking?
+-
+ Problem with ".add" files when using two languages and restarting Vim. (Raul
+ Coronado, 2008 Oct 30)
+
+--- 2529,2534 ----
+***************
+*** 2419,2425 ****
+ moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25)
+
+ Windows installer could add a "open in new tab of existing Vim" menu entry.
+! Gvimext: patch to add "Edit with single Vim &tabbed" menu entry.
+ Just have two choices, always using one Vim and selecting between using an
+ argument list or opening each file in a separate tab.
+ (Erik Falor, 2008 May 21, 2008 Jun 26)
+--- 2580,2586 ----
+ moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25)
+
+ Windows installer could add a "open in new tab of existing Vim" menu entry.
+! GvimExt: patch to add "Edit with single Vim &tabbed" menu entry.
+ Just have two choices, always using one Vim and selecting between using an
+ argument list or opening each file in a separate tab.
+ (Erik Falor, 2008 May 21, 2008 Jun 26)
+***************
+*** 2430,2436 ****
+ Dos uninstal may delete vim.bat from the wrong directory (e.g., when someone
+ makes his own wrapper). Add a magic string with the version number to the
+ .bat file and check for it in the uninstaller. E.g.
+! # uninstall key: vim7.3*
+
+ Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov,
+ 2007 Feb 8)
+--- 2591,2597 ----
+ Dos uninstal may delete vim.bat from the wrong directory (e.g., when someone
+ makes his own wrapper). Add a magic string with the version number to the
+ .bat file and check for it in the uninstaller. E.g.
+! # uninstall key: vim8.1*
+
+ Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov,
+ 2007 Feb 8)
+***************
+*** 2495,2501 ****
+ When using --remote-silent and the file name matches 'wildignore' get an E479
+ error. without --remote-silent it works fine. (Ben Fritz, 2008 Jun 20)
+
+! Gvim: dialog for closing Vim should check if Vim is busy writing a file. Then
+ use a different dialog: "busy saving, really quit? yes / no".
+
+ Check other interfaces for changing curbuf in a wrong way. Patch like for
+--- 2656,2662 ----
+ When using --remote-silent and the file name matches 'wildignore' get an E479
+ error. without --remote-silent it works fine. (Ben Fritz, 2008 Jun 20)
+
+! GVim: dialog for closing Vim should check if Vim is busy writing a file. Then
+ use a different dialog: "busy saving, really quit? yes / no".
+
+ Check other interfaces for changing curbuf in a wrong way. Patch like for
+***************
+*** 2711,2719 ****
+ Is it allowed that 'backupext' is empty? Problems when backup is in same dir
+ as original file? If it's OK don't compare with 'patchmode'. (Thierry Closen)
+
+- Patch for supporting count before CR in quickfix window. (AOYAMA Shotaro, 2007
+- Jan 1)
+-
+ Patch for adding ":lscscope". (Navdeep Parhar, 2007 Apr 26; update 2008 Apr
+ 23)
+
+--- 2872,2877 ----
+***************
+*** 2778,2785 ****
+ - Another patch for Javascript indenting. (Hari Kumar, 2010 Jul 11)
+ Needs a few tests.
+ - Add 'cscopeignorecase' option. (Liang Wenzhi, 2006 Sept 3)
+- - Load intl.dll too, not only libintl.dll. (Mike Williams, 2006 May 9, docs
+- patch May 10)
+ - Extra argument to strtrans() to translate special keys to their name (Eric
+ Arnold, 2006 May 22)
+ - 'threglookexp' option: only match with first word in thesaurus file.
+--- 2936,2941 ----
+***************
+*** 2868,2875 ****
+ + 1", but that's ugly.
+ 7 Add patch from Benoit Cerrina to integrate Vim and Perl functions
+ better. Now also works for Ruby (2001 Nov 10)
+- - Patch from Herculano de Lima Einloft Neto for better formatting of the
+- quickfix window (2004 dec 2)
+ 7 When 'rightleft' is set, the search pattern should be displayed right
+ to left as well? See patch of Dec 26. (Nadim Shaikli)
+ 8 Option to lock all used memory so that it doesn't get swapped to disk
+--- 3024,3029 ----
+***************
+*** 2887,2892 ****
+--- 3041,3079 ----
+ and GTK by degreneir (nov 10 and nov 18).
+ - Patch for "paranoid mode" by Kevin Collins, March 7. Needs much more work.
+
++ Better 'rightleft' or BIDI support:
++ - Minimal Vi with bidi support: https://github.com/aligrudi/neatvi
++ By Ali Gholami Rudi, also worked on arabic.c
++
++ Quickfix/Location List:
++ - Window size is wrong when using quickfix window. (Lifepillar, 2018 Aug 24,
++ #2999)
++ - When using CTRL-W CR in the quickfix window, the jumplist in the opened
++ window is cleared, to avoid going back to the list of errors buffer (would
++ have two windows with it). Can we just remove the jump list entries for
++ the quickfix buffer?
++ - Quickfix window height is not kept with a vertical split. (Lifepillar,
++ 2018 Jun 10, #2998)
++ - When an item in the quickfix list has a file name that does not exist,
++ behave like the item was not a match for :cnext.
++ - When adding an item to a new quickfix list make ":cnext" jump to that
++ item. Make a difference being at the first item and not having used
++ :cnext at all. (Afanasiy Fet, 2017 Jan 3)
++ - This does not work: :set cscopequickfix=a-
++ (Linewi, 2015 Jul 12, #914)
++ - When opening quickfix window, disable spell checking?
++ - Patch for supporting count before CR in quickfix window. (AOYAMA Shotaro,
++ 2007 Jan 1)
++ - Patch from Herculano de Lima Einloft Neto for better formatting of the
++ quickfix window (2004 dec 2)
++ - Amiga: When using quickfix with the Manx compiler we only get the first 25
++ errors. How do we get the rest?
++ 8 The quickfix file is read without conversion, thus in 'encoding'. Add an
++ option to specify the encoding of the errorfile and convert it. Also for
++ ":grep" and ":helpgrep".
++ More generic solution: support a filter (e.g., by calling a function).
++ 7 Add a command that goes back to the position from before jumping to the
++ first quickfix location. ":cbefore"?
+
+ Vi incompatibility:
+ - Try new POSIX tests, made after my comments. (Geoff Clare, 2005 April 7)
+***************
+*** 2974,2981 ****
+ 8 The -P argument doesn't work very well with many MDI applications.
+ The last argument of CreateWindowEx() should be used, see MSDN docs.
+ Tutorial: http://win32assembly.online.fr/tut32.html
+- 8 In eval.c, io.h is included when MSWIN32 is defined. Shouldn't this be
+- WIN32? Or can including io.h be moved to vim.h? (Dan Sharp)
+ 6 Win32 GUI: With "-u NONE -U NONE" and doing "CTRL-W v" "CTRL-W o", the ":"
+ of ":only" is highlighted like the cursor. (Lipelis)
+ 8 When 'encoding' is "utf-8", should use 'guifont' for both normal and wide
+--- 3161,3166 ----
+***************
+*** 3382,3389 ****
+ 'magic' in history. (Margo)
+ 9 optwin.vim: Restoring a mapping for <Space> or <CR> is not correct for
+ ":noremap". Add "mapcmd({string}, {mode})? Use code from ":mkexrc".
+- 9 incsearch is incorrect for "/that/<Return>/this/;//" (last search pattern
+- isn't updated).
+ 9 term_console is used before it is set (msdos, Amiga).
+ 9 Get out-of-memory for ":g/^/,$s//@/" on 1000 lines, this is not handled
+ correctly. Get many error messages while redrawing the screen, which
+--- 3567,3572 ----
+***************
+*** 3404,3412 ****
+ 7 X11: Some people prefer to use CLIPBOARD instead of PRIMARY for the normal
+ selection. Add an "xclipboard" argument to the 'clipboard' option? (Mark
+ Waggoner)
+- 8 For xterm need to open a connection to the X server to get the window
+- title, which can be slow. Can also get the title with "<Esc>[21t", no
+- need to use X11 calls. This returns "<Esc>]l{title}<Esc>\".
+ 6 When the xterm reports the number of colors, a redraw occurs. This is
+ annoying on a slow connection. Wait for the xterm to report the number of
+ colors before drawing the screen. With a timeout.
+--- 3587,3592 ----
+***************
+*** 3536,3543 ****
+ - In zsh, "gvim&" changes the terminal settings. This is a zsh problem.
+ (Jennings)
+ - Problem with HPterm under X: old contents of window is lost (Cosentino).
+- - Amiga: When using quickfix with the Manx compiler we only get the first 25
+- errors. How do we get the rest?
+ - Amiga: The ":cq" command does not always abort the Manx compiler. Why?
+ - Linux: A file with protection r--rw-rw- is seen readonly for others. The
+ access() function in GNU libc is probably wrong.
+--- 3716,3721 ----
+***************
+*** 3608,3613 ****
+--- 3786,3792 ----
+ Alternative: Make a function for Ex commands: cmd_edit().
+ - Add COLUMN NUMBERS to ":" commands ":line1,line2[col1,col2]cmd". Block
+ can be selected with CTRL-V. Allow '$' (end of line) for col2.
++ (issue #3292)
+ - ECLIPSE plugin. Problem is: the interface is very complicated. Need to
+ implement part in Java and then connect to Vim. Some hints from Alexandru
+ Roman, 2004 Dec 15. Should then also work with Oracle Jdeveloper, see JSR
+***************
+*** 3711,3718 ****
+ 8 Add local options for each tab page? E.g., 'diffopt' could differ between
+ tab pages.
+ 7 Add local highlighting for each tab page?
+- 7 Add local directory for tab pages? How would this interfere with
+- window-local directories?
+
+
+ Spell checking:
+--- 3890,3895 ----
+***************
+*** 3816,3822 ****
+ secondary: zB zS zT zZ, z=)
+ 8 Vertical folds: looks like vertically split windows, but the cursor moves
+ through the vertical separator, separator moves when scrolling.
+! 8 Add "z/" and "z?" for searching in not folded text only.
+ 8 When a closed fold is displayed open because of 'foldminlines', the
+ behavior of commands is still like the fold is closed. How to make the
+ user aware of this?
+--- 3993,4000 ----
+ secondary: zB zS zT zZ, z=)
+ 8 Vertical folds: looks like vertically split windows, but the cursor moves
+ through the vertical separator, separator moves when scrolling.
+! 8 Add "z/" and "z?" for searching in not folded text only. Or use a regexp
+! item, so that it can be used in any pattern.
+ 8 When a closed fold is displayed open because of 'foldminlines', the
+ behavior of commands is still like the fold is closed. How to make the
+ user aware of this?
+***************
+*** 3869,3878 ****
+ 8 Add an item in 'fileencodings' to check the first line of an XML file for
+ the encoding. <?xml version="1.0" encoding="UTF-8"?> Or "charset=UTF-8"?
+ For HTML look for "charset=utf-8".
+- 8 The quickfix file is read without conversion, thus in 'encoding'. Add an
+- option to specify the encoding of the errorfile and convert it. Also for
+- ":grep" and ":helpgrep".
+- More generic solution: support a filter (e.g., by calling a function).
+ 8 When a file was converted from 'fileencoding' to 'encoding', a tag search
+ should also do this on the search pattern. (Andrzej M. Ostruszka)
+ 8 When filtering changes the encoding 'fileencoding' may not work. E.g.,
+--- 4047,4052 ----
+***************
+*** 4178,4185 ****
+ virtualmode() add argument to obtain whether "$" was used in
+ Visual block mode.
+ getacp() Win32: get codepage (Glenn Maynard)
+- deletebufline() delete line in any buffer
+- appendbufline() append line in any buffer
+ libcall() Allow more than one argument.
+ libcallext() Like libcall(), but using a callback function
+ to allow the library to execute a command or
+--- 4352,4357 ----
+***************
+*** 4652,4661 ****
+ command used dos fileformat. Same for 'fileencoding'.
+ - Add events to autocommands:
+ Error - When an error happens
+! NormalEnter - Entering Normal mode
+! ReplaceEnter - Entering Replace mode
+! VisualEnter - Entering Visual mode
+! *Leave - Leaving a mode (in pair with the above *Enter)
+ VimLeaveCheck - Before Vim decides to exit, so that it can be cancelled
+ when exiting isn't a good idea.
+ CursorHoldC - CursorHold while command-line editing
+--- 4824,4830 ----
+ command used dos fileformat. Same for 'fileencoding'.
+ - Add events to autocommands:
+ Error - When an error happens
+! ModeChange - after changing mode (before waiting for a char)
+ VimLeaveCheck - Before Vim decides to exit, so that it can be cancelled
+ when exiting isn't a good idea.
+ CursorHoldC - CursorHold while command-line editing
+***************
+*** 5167,5182 ****
+
+
+ Incsearch:
+! - Add a limit to the number of lines that are searched for 'incsearch'?
+ - When no match is found and the user types more, the screen is redrawn
+ anyway. Could skip that. Esp. if the line wraps and the text is scrolled
+ up every time.
+- - Temporarily open folds to show where the search ends up. Restore the
+- folds when going to another line.
+ - When incsearch used and hitting return, no need to search again in many
+ cases, saves a lot of time in big files. (Slootman wants to work on this?)
+ When not using special characters, can continue search from the last match
+ (or not at all, when there was no match). See oldmail/webb/in.872.
+
+
+ Searching:
+--- 5336,5357 ----
+
+
+ Incsearch:
+! - Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014
+! Dec 4. Is this a good solution?
+! - Temporarily open folds to show where the search ends up. Restore the
+! folds when going to another line.
+! Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
+! - Bug with 'incsearch' going to wrong line. (Wolfram Kresse, 2009 Aug 17)
+! Only with "vim -u NONE".
+ - When no match is found and the user types more, the screen is redrawn
+ anyway. Could skip that. Esp. if the line wraps and the text is scrolled
+ up every time.
+ - When incsearch used and hitting return, no need to search again in many
+ cases, saves a lot of time in big files. (Slootman wants to work on this?)
+ When not using special characters, can continue search from the last match
+ (or not at all, when there was no match). See oldmail/webb/in.872.
++ 9 incsearch is incorrect for "/that/<Return>/this/;//" (last search pattern
++ isn't updated).
+
+
+ Searching:
+***************
+*** 5479,5487 ****
+ that marks if the option was set. Useful to keep the effect of setting
+ 'compatible' after ":syntax on" has been used.
+ 7 There is 'titleold', why is there no 'iconold'? (Chazelas)
+- 7 Make 'scrolloff' a global-local option, so that it can be different in the
+- quickfix window, for example. (Gary Holloway)
+- Also do 'sidescrolloff'.
+
+
+ External commands:
+--- 5654,5659 ----
+***************
+*** 5662,5668 ****
+ 7 Store the history from debug mode in viminfo.
+ 7 Make the debug mode history available with histget() et al.
+
+-
+ Various improvements:
+ 7 Add plugins for formatting? Should be able to make a choice depending on
+ the language of a file (English/Korean/Japanese/etc.).
+--- 5834,5839 ----
+***************
+*** 5683,5690 ****
+ from the 'makeprg'?
+ - Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
+ Govindachar)
+- 7 Add a command that goes back to the position from before jumping to the
+- first quickfix location. ":cbefore"?
+ 7 Allow a window not to have a statusline. Makes it possible to use a
+ window as a buffer-tab selection.
+ 8 Allow non-active windows to have a different statusline. (Yakov Lerner)
+--- 5854,5859 ----
+***************
+*** 5816,5822 ****
+ used, remove the <CR> at the end of lines in [range].
+ A CTRL-Z at the end of the file is removed. If
+ [range] is omitted, or it is the whole file, and all
+! lines end in <CR> 'textmode' is set. {not in Vi}
+ - Should integrate addstar() and file_pat_to_reg_pat().
+ - When working over a serial line with 7 bit characters, remove meta
+ characters from 'isprint'.
+--- 5985,5991 ----
+ used, remove the <CR> at the end of lines in [range].
+ A CTRL-Z at the end of the file is removed. If
+ [range] is omitted, or it is the whole file, and all
+! lines end in <CR> 'textmode' is set.
+ - Should integrate addstar() and file_pat_to_reg_pat().
+ - When working over a serial line with 7 bit characters, remove meta
+ characters from 'isprint'.
+***************
+*** 6090,6094 ****
+ are reflected in each Vim immediately. Could work with local files but
+ also over the internet. See http://www.codingmonkeys.de/subethaedit/.
+
+! vim:tw=78:sw=4:sts=4:ts=8:ft=help:norl:
+ vim: set fo+=n :
+--- 6259,6263 ----
+ are reflected in each Vim immediately. Could work with local files but
+ also over the internet. See http://www.codingmonkeys.de/subethaedit/.
+
+! vim:tw=78:sw=4:sts=4:ts=8:noet:ft=help:norl:
+ vim: set fo+=n :
+*** ../vim-8.1.1279/runtime/doc/uganda.txt 2018-05-17 16:20:48.000000000 +0200
+--- runtime/doc/uganda.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 285,288 ****
+
+ This address is expected to be valid for a long time.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 285,288 ----
+
+ This address is expected to be valid for a long time.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/undo.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/undo.txt 2019-05-05 17:54:24.650384207 +0200
+***************
+*** 1,4 ****
+! *undo.txt* For Vim version 8.1. Last change: 2014 May 24
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *undo.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 25,31 ****
+ :u[ndo] Undo one change. {Vi: only one level}
+ *E830*
+ :u[ndo] {N} Jump to after change number {N}. See |undo-branches|
+! for the meaning of {N}. {not in Vi}
+
+ *CTRL-R*
+ CTRL-R Redo [count] changes which were undone. {Vi: redraw
+--- 25,31 ----
+ :u[ndo] Undo one change. {Vi: only one level}
+ *E830*
+ :u[ndo] {N} Jump to after change number {N}. See |undo-branches|
+! for the meaning of {N}.
+
+ *CTRL-R*
+ CTRL-R Redo [count] changes which were undone. {Vi: redraw
+***************
+*** 95,101 ****
+ Warning: Use with care, it may prevent the user from
+ properly undoing changes. Don't use this after undo
+ or redo.
+- {not in Vi}
+
+ This is most useful when you need to prompt the user halfway through a change.
+ For example in a function that calls |getchar()|. Do make sure that there was
+--- 95,100 ----
+***************
+*** 151,157 ****
+
+ *g-*
+ g- Go to older text state. With a count repeat that many
+! times. {not in Vi}
+ *:ea* *:earlier*
+ :earlier {count} Go to older text state {count} times.
+ :earlier {N}s Go to older text state about {N} seconds before.
+--- 150,156 ----
+
+ *g-*
+ g- Go to older text state. With a count repeat that many
+! times.
+ *:ea* *:earlier*
+ :earlier {count} Go to older text state {count} times.
+ :earlier {N}s Go to older text state about {N} seconds before.
+***************
+*** 170,176 ****
+
+ *g+*
+ g+ Go to newer text state. With a count repeat that many
+! times. {not in Vi}
+ *:lat* *:later*
+ :later {count} Go to newer text state {count} times.
+ :later {N}s Go to newer text state about {N} seconds later.
+--- 169,175 ----
+
+ *g+*
+ g+ Go to newer text state. With a count repeat that many
+! times.
+ *:lat* *:later*
+ :later {count} Go to newer text state {count} times.
+ :later {N}s Go to newer text state about {N} seconds later.
+***************
+*** 259,264 ****
+--- 258,269 ----
+ When the file is encrypted, the text in the undo file is also crypted. The
+ same key and method is used. |encryption|
+
++ Note that text properties are not stored in the undo file. You can restore
++ text properties so long as a buffer is loaded, but you cannot restore them
++ from an undo file. Rationale: It would require the associated text property
++ types to be defined in exactly the same was as before, which cannot be
++ guaranteed.
++
+ You can also save and restore undo histories by using ":wundo" and ":rundo"
+ respectively:
+ *:wundo* *:rundo*
+***************
+*** 274,283 ****
+ the existing file and then creating a new file with the same
+ name. So it is not possible to overwrite an existing undofile
+ in a write-protected directory.
+- {not in Vi}
+
+ :rundo {file} Read undo history from {file}.
+- {not in Vi}
+
+ You can use these in autocommands to explicitly specify the name of the
+ history file. E.g.: >
+--- 279,286 ----
+***************
+*** 368,377 ****
+ :unlet old_undolevels
+
+ Marks for the buffer ('a to 'z) are also saved and restored, together with the
+! text. {Vi does this a little bit different}
+
+ When all changes have been undone, the buffer is not considered to be changed.
+! It is then possible to exit Vim with ":q" instead of ":q!" {not in Vi}. Note
+ that this is relative to the last write of the file. Typing "u" after ":w"
+ actually changes the buffer, compared to what was written, so the buffer is
+ considered changed then.
+--- 371,380 ----
+ :unlet old_undolevels
+
+ Marks for the buffer ('a to 'z) are also saved and restored, together with the
+! text.
+
+ When all changes have been undone, the buffer is not considered to be changed.
+! It is then possible to exit Vim with ":q" instead of ":q!". Note
+ that this is relative to the last write of the file. Typing "u" after ":w"
+ actually changes the buffer, compared to what was written, so the buffer is
+ considered changed then.
+***************
+*** 403,406 ****
+ first put, and repeat the put command for the second register. Repeat the
+ 'u.' until you got what you want.
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 406,409 ----
+ first put, and repeat the put command for the second register. Repeat the
+ 'u.' until you got what you want.
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_01.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_01.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 189,192 ****
+
+ Next chapter: |usr_02.txt| The first steps in Vim
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 189,192 ----
+
+ Next chapter: |usr_02.txt| The first steps in Vim
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_02.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_02.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 698,701 ****
+
+ Next chapter: |usr_03.txt| Moving around
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 698,701 ----
+
+ Next chapter: |usr_03.txt| Moving around
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_03.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_03.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 654,657 ****
+
+ Next chapter: |usr_04.txt| Making small changes
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 654,657 ----
+
+ Next chapter: |usr_04.txt| Making small changes
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_04.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_04.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 511,514 ****
+
+ Next chapter: |usr_05.txt| Set your settings
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 511,514 ----
+
+ Next chapter: |usr_05.txt| Set your settings
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_05.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_05.txt 2019-02-27 14:54:28.115209213 +0100
+***************
+*** 1,4 ****
+! *usr_05.txt* For Vim version 8.1. Last change: 2018 Feb 20
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+--- 1,4 ----
+! *usr_05.txt* For Vim version 8.1. Last change: 2019 Feb 27
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+***************
+*** 11,22 ****
+
+ |05.1| The vimrc file
+ |05.2| The example vimrc file explained
+! |05.3| Simple mappings
+! |05.4| Adding a package
+! |05.5| Adding a plugin
+! |05.6| Adding a help file
+! |05.7| The option window
+! |05.8| Often used options
+
+ Next chapter: |usr_06.txt| Using syntax highlighting
+ Previous chapter: |usr_04.txt| Making small changes
+--- 11,23 ----
+
+ |05.1| The vimrc file
+ |05.2| The example vimrc file explained
+! |05.3| The defaults.vim file explained
+! |05.4| Simple mappings
+! |05.5| Adding a package
+! |05.6| Adding a plugin
+! |05.7| Adding a help file
+! |05.8| The option window
+! |05.9| Often used options
+
+ Next chapter: |usr_06.txt| Using syntax highlighting
+ Previous chapter: |usr_04.txt| Making small changes
+***************
+*** 82,131 ****
+ will be explained though. Use the ":help" command to find out more.
+
+ >
+! set nocompatible
+!
+! As mentioned in the first chapter, these manuals explain Vim working in an
+! improved way, thus not completely Vi compatible. Setting the 'compatible'
+! option off, thus 'nocompatible' takes care of this.
+!
+! >
+! set backspace=indent,eol,start
+!
+! This specifies where in Insert mode the <BS> is allowed to delete the
+! character in front of the cursor. The three items, separated by commas, tell
+! Vim to delete the white space at the start of the line, a line break and the
+! character before where Insert mode started.
+! >
+
+! set autoindent
+
+- This makes Vim use the indent of the previous line for a newly created line.
+- Thus there is the same amount of white space before the new line. For example
+- when pressing <Enter> in Insert mode, and when using the "o" command to open a
+- new line.
+ >
+-
+ if has("vms")
+ set nobackup
+ else
+ set backup
+ endif
+
+ This tells Vim to keep a backup copy of a file when overwriting it. But not
+ on the VMS system, since it keeps old versions of files already. The backup
+ file will have the same name as the original file with "~" added. See |07.4|
+ >
+
+! set history=50
+
+- Keep 50 commands and 50 search patterns in the history. Use another number if
+- you want to remember fewer or more lines.
+ >
+
+ set ruler
+
+ Always display the current cursor position in the lower right corner of the
+! Vim window.
+
+ >
+ set showcmd
+--- 83,202 ----
+ will be explained though. Use the ":help" command to find out more.
+
+ >
+! " Get the defaults that most users want.
+! source $VIMRUNTIME/defaults.vim
+
+! This loads the "defaults.vim" file in the $VIMRUNTIME directory. This sets up
+! Vim for how most users like it. If you are one of the few that don't, then
+! comment out this line. The commands are explained below:
+! |defaults.vim-explained|
+
+ >
+ if has("vms")
+ set nobackup
+ else
+ set backup
++ if has('persistent_undo')
++ set undofile
++ endif
+ endif
+
+ This tells Vim to keep a backup copy of a file when overwriting it. But not
+ on the VMS system, since it keeps old versions of files already. The backup
+ file will have the same name as the original file with "~" added. See |07.4|
++
++ This also sets the 'undofile' option, if available. This will store the
++ multi-level undo information in a file. The result is that when you change a
++ file, exit Vim, and then edit the file again, you can undo the changes made
++ previously. It's a very powerful and useful feature, at the cost of storing a
++ file. For more information see |undo-persistence|.
++
++ The "if" command is very useful to set options
++ only when some condition is met. More about that in |usr_41.txt|.
++
++ >
++ if &t_Co > 2 || has("gui_running")
++ set hlsearch
++ endif
++
++ This switches on the 'hlsearch' option, telling Vim to highlight matches with
++ the last used search pattern.
++
++ >
++ augroup vimrcEx
++ au!
++ autocmd FileType text setlocal textwidth=78
++ augroup END
++
++ This makes Vim break text to avoid lines getting longer than 78 characters.
++ But only for files that have been detected to be plain text. There are
++ actually two parts here. "autocmd FileType text" is an autocommand. This
++ defines that when the file type is set to "text" the following command is
++ automatically executed. "setlocal textwidth=78" sets the 'textwidth' option
++ to 78, but only locally in one file.
++
++ The wrapper with "augroup vimrcEx" and "augroup END" makes it possible to
++ delete the autocommand with the "au!" command. See |:augroup|.
++
++ >
++ if has('syntax') && has('eval')
++ packadd! matchit
++ endif
++
++ This loads the "matchit" plugin if the required features are available.
++ It makes the |%| command more powerful. This is explained at
++ |matchit-install|.
++
++
++ ==============================================================================
++ *05.3* The defaults.vim file explained *defaults.vim-explained*
++
++ The |defaults.vim| file is loaded when the user has no vimrc file. When you
++ create a new vimrc file, add this line near the top to keep using it: >
++
++ source $VIMRUNTIME/defaults.vim
++
++ Or use the vimrc_example.vim file, as explained above.
++
++ The following explains what defaults.vim is doing.
++
++ >
++ if exists('skip_defaults_vim')
++ finish
++ endif
++
++ Loading defaults.vim can be disabled with this command: >
++ let skip_defaults_vim = 1
++ This has to be done in the system vimrc file. See |system-vimrc|. If you
++ have a user vimrc this is not needed, since defaults.vim will not be loaded
++ automatically.
++
+ >
++ set nocompatible
+
+! As mentioned in the first chapter, these manuals explain Vim working in an
+! improved way, thus not completely Vi compatible. Setting the 'compatible'
+! option off, thus 'nocompatible' takes care of this.
+
+ >
++ set backspace=indent,eol,start
+
++ This specifies where in Insert mode the <BS> is allowed to delete the
++ character in front of the cursor. The three items, separated by commas, tell
++ Vim to delete the white space at the start of the line, a line break and the
++ character before where Insert mode started. See 'backspace'.
++
++ >
++ set history=200
++
++ Keep 200 commands and 200 search patterns in the history. Use another number
++ if you want to remember fewer or more lines. See 'history'.
++
++ >
+ set ruler
+
+ Always display the current cursor position in the lower right corner of the
+! Vim window. See 'ruler'.
+
+ >
+ set showcmd
+***************
+*** 144,153 ****
+ ^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^
+ 'showmode' 'showcmd' 'ruler'
+
+ >
+ set incsearch
+
+! Display the match for a search pattern when halfway typing it.
+
+ >
+ map Q gq
+--- 215,251 ----
+ ^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^
+ 'showmode' 'showcmd' 'ruler'
+
++
++ >
++ set wildmenu
++
++ Display completion matches in a status line. That is when you type <Tab> and
++ there is more than one match. See 'wildmenu'.
++
++ >
++ set ttimeout
++ set ttimeoutlen=100
++
++ This makes typing Esc take effect more quickly. Normally Vim waits a second
++ to see if the Esc is the start of an escape sequence. If you have a very slow
++ remote connection, increase the number. See 'ttimeout'.
++
++ >
++ set display=truncate
++
++ Show @@@ in the last line if it is truncated, instead of hiding the whole
++ like. See 'display'.
++
+ >
+ set incsearch
+
+! Display the match for a search pattern when halfway typing it. See
+! 'incsearch'.
+!
+! >
+! set nrformats-=octal
+!
+! Do not recognize numbers starting with a zero as octal. See 'nrformats'.
+
+ >
+ map Q gq
+***************
+*** 158,180 ****
+ will not need it.
+
+ >
+ vnoremap _g y:exe "grep /" . escape(@", '\\/') . "/ *.c *.h"<CR>
+
+ This mapping yanks the visually selected text and searches for it in C files.
+! This is a complicated mapping. You can see that mappings can be used to do
+! quite complicated things. Still, it is just a sequence of commands that are
+! executed like you typed them.
+
+ >
+! if &t_Co > 2 || has("gui_running")
+! syntax on
+! set hlsearch
+! endif
+
+! This switches on syntax highlighting, but only if colors are available. And
+! the 'hlsearch' option tells Vim to highlight matches with the last used search
+! pattern. The "if" command is very useful to set options only when some
+! condition is met. More about that in |usr_41.txt|.
+
+ *vimrc-filetype* >
+ filetype plugin indent on
+--- 256,285 ----
+ will not need it.
+
+ >
++ inoremap <C-U> <C-G>u<C-U>
++
++ CTRL-U in insert mode deletes all entered text in the current line. Use
++ CTRL-G u to first break undo, so that you can undo CTRL-U after inserting a
++ line break. Revert with ":iunmap <C-U>".
++
++ >
++ if has('mouse')
++ set mouse=a
++ endif
++
++ Enable using the mouse if available. See 'mouse'.
++
++ >
+ vnoremap _g y:exe "grep /" . escape(@", '\\/') . "/ *.c *.h"<CR>
+
+ This mapping yanks the visually selected text and searches for it in C files.
+! You can see that a mapping can be used to do quite complicated things. Still,
+! it is just a sequence of commands that are executed like you typed them.
+
+ >
+! syntax on
+
+! Enable highlighting files in color. See |syntax|.
+
+ *vimrc-filetype* >
+ filetype plugin indent on
+***************
+*** 201,221 ****
+ automatically. Vim comes with these indent rules for a number of
+ filetypes. See |:filetype-indent-on| and 'indentexpr'.
+
+- >
+- autocmd FileType text setlocal textwidth=78
+
+! This makes Vim break text to avoid lines getting longer than 78 characters.
+! But only for files that have been detected to be plain text. There are
+! actually two parts here. "autocmd FileType text" is an autocommand. This
+! defines that when the file type is set to "text" the following command is
+! automatically executed. "setlocal textwidth=78" sets the 'textwidth' option
+! to 78, but only locally in one file.
+!
+! *restore-cursor* >
+! autocmd BufReadPost *
+! \ if line("'\"") > 1 && line("'\"") <= line("$") |
+! \ exe "normal! g`\"" |
+! \ endif
+
+ Another autocommand. This time it is used after reading any file. The
+ complicated stuff after it checks if the '" mark is defined, and jumps to it
+--- 306,317 ----
+ automatically. Vim comes with these indent rules for a number of
+ filetypes. See |:filetype-indent-on| and 'indentexpr'.
+
+
+! *restore-cursor* *last-position-jump* >
+! autocmd BufReadPost *
+! \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
+! \ | exe "normal! g`\""
+! \ | endif
+
+ Another autocommand. This time it is used after reading any file. The
+ complicated stuff after it checks if the '" mark is defined, and jumps to it
+***************
+*** 224,231 ****
+ See |line-continuation|. This only works in a Vim script file, not when
+ typing commands at the command-line.
+
+ ==============================================================================
+! *05.3* Simple mappings
+
+ A mapping enables you to bind a set of Vim commands to a single key. Suppose,
+ for example, that you need to surround certain words with curly braces. In
+--- 320,341 ----
+ See |line-continuation|. This only works in a Vim script file, not when
+ typing commands at the command-line.
+
++ >
++ command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
++ \ | wincmd p | diffthis
++
++ This adds the ":DiffOrig" command. Use this in a modified buffer to see the
++ differences with the file it was loaded from. See |diff| and |:DiffOrig|.
++
++ >
++ set nolangremap
++
++ Prevent that the langmap option applies to characters that result from a
++ mapping. If set (default), this may break plugins (but it's backward
++ compatible). See 'langremap'.
++
+ ==============================================================================
+! *05.4* Simple mappings
+
+ A mapping enables you to bind a set of Vim commands to a single key. Suppose,
+ for example, that you need to surround certain words with curly braces. In
+***************
+*** 272,278 ****
+ least the ones for Normal mode. More about mappings in section |40.1|.
+
+ ==============================================================================
+! *05.4* Adding a package *add-package* *matchit-install*
+
+ A package is a set of files that you can add to Vim. There are two kinds of
+ packages: optional and automatically loaded on startup.
+--- 382,388 ----
+ least the ones for Normal mode. More about mappings in section |40.1|.
+
+ ==============================================================================
+! *05.5* Adding a package *add-package* *matchit-install*
+
+ A package is a set of files that you can add to Vim. There are two kinds of
+ packages: optional and automatically loaded on startup.
+***************
+*** 310,316 ****
+ More information about packages can be found here: |packages|.
+
+ ==============================================================================
+! *05.5* Adding a plugin *add-plugin* *plugin*
+
+ Vim's functionality can be extended by adding plugins. A plugin is nothing
+ more than a Vim script file that is loaded automatically when Vim starts. You
+--- 420,426 ----
+ More information about packages can be found here: |packages|.
+
+ ==============================================================================
+! *05.6* Adding a plugin *add-plugin* *plugin*
+
+ Vim's functionality can be extended by adding plugins. A plugin is nothing
+ more than a Vim script file that is loaded automatically when Vim starts. You
+***************
+*** 344,351 ****
+ GETTING A GLOBAL PLUGIN
+
+ Where can you find plugins?
+ - Some come with Vim. You can find them in the directory $VIMRUNTIME/macros
+! and its sub-directories.
+ - Download from the net. There is a large collection on http://www.vim.org.
+ - They are sometimes posted in a Vim |maillist|.
+ - You could write one yourself, see |write-plugin|.
+--- 454,462 ----
+ GETTING A GLOBAL PLUGIN
+
+ Where can you find plugins?
++ - Some are always loaded, you can see them in the directory $VIMRUNTIME/plugin.
+ - Some come with Vim. You can find them in the directory $VIMRUNTIME/macros
+! and its sub-directories and under $VIM/vimfiles/pack/dist/opt/.
+ - Download from the net. There is a large collection on http://www.vim.org.
+ - They are sometimes posted in a Vim |maillist|.
+ - You could write one yourself, see |write-plugin|.
+***************
+*** 461,467 ****
+ |new-filetype| How to detect a new file type.
+
+ ==============================================================================
+! *05.6* Adding a help file *add-local-help*
+
+ If you are lucky, the plugin you installed also comes with a help file. We
+ will explain how to install the help file, so that you can easily find help
+--- 572,578 ----
+ |new-filetype| How to detect a new file type.
+
+ ==============================================================================
+! *05.7* Adding a help file *add-local-help*
+
+ If you are lucky, the plugin you installed also comes with a help file. We
+ will explain how to install the help file, so that you can easily find help
+***************
+*** 506,512 ****
+ For writing a local help file, see |write-local-help|.
+
+ ==============================================================================
+! *05.7* The option window
+
+ If you are looking for an option that does what you want, you can search in
+ the help files here: |options|. Another way is by using this command: >
+--- 617,623 ----
+ For writing a local help file, see |write-local-help|.
+
+ ==============================================================================
+! *05.8* The option window
+
+ If you are looking for an option that does what you want, you can search in
+ the help files here: |options|. Another way is by using this command: >
+***************
+*** 545,551 ****
+ from the window border where scrolling starts.
+
+ ==============================================================================
+! *05.8* Often used options
+
+ There are an awful lot of options. Most of them you will hardly ever use.
+ Some of the more useful ones will be mentioned here. Don't forget you can
+--- 656,662 ----
+ from the window border where scrolling starts.
+
+ ==============================================================================
+! *05.9* Often used options
+
+ There are an awful lot of options. Most of them you will hardly ever use.
+ Some of the more useful ones will be mentioned here. Don't forget you can
+***************
+*** 663,666 ****
+
+ Next chapter: |usr_06.txt| Using syntax highlighting
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 774,777 ----
+
+ Next chapter: |usr_06.txt| Using syntax highlighting
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_06.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_06.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 277,280 ****
+
+ Next chapter: |usr_07.txt| Editing more than one file
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 277,280 ----
+
+ Next chapter: |usr_07.txt| Editing more than one file
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_07.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_07.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 476,479 ****
+
+ Next chapter: |usr_08.txt| Splitting windows
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 476,479 ----
+
+ Next chapter: |usr_08.txt| Splitting windows
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_08.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_08.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 598,601 ****
+
+ Next chapter: |usr_09.txt| Using the GUI
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 598,601 ----
+
+ Next chapter: |usr_09.txt| Using the GUI
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_09.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_09.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 5,13 ****
+ Using the GUI
+
+
+! Vim works in an ordinary terminal. GVim can do the same things and a few
+! more. The GUI offers menus, a toolbar, scrollbars and other items. This
+! chapter is about these extra things that the GUI offers.
+
+ |09.1| Parts of the GUI
+ |09.2| Using the mouse
+--- 5,14 ----
+ Using the GUI
+
+
+! Vim works in an ordinary terminal, while gVim has a Graphical User Interface
+! (GUI). It can do the same things and a few more. The GUI offers menus, a
+! toolbar, scrollbars and other items. This chapter is about these extra things
+! that the GUI offers.
+
+ |09.1| Parts of the GUI
+ |09.2| Using the mouse
+***************
+*** 286,289 ****
+
+ Next chapter: |usr_10.txt| Making big changes
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 287,290 ----
+
+ Next chapter: |usr_10.txt| Making big changes
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_10.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_10.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 821,824 ****
+
+ Next chapter: |usr_11.txt| Recovering from a crash
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 821,824 ----
+
+ Next chapter: |usr_11.txt| Recovering from a crash
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_11.txt 2019-04-28 22:25:03.244480028 +0200
+--- runtime/doc/usr_11.txt 2019-04-28 21:58:09.667057415 +0200
+***************
+*** 1,4 ****
+! *usr_11.txt* For Vim version 8.1. Last change: 2018 Apr 13
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+--- 1,4 ----
+! *usr_11.txt* For Vim version 8.1. Last change: 2019 Apr 28
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+***************
+*** 312,315 ****
+
+ Next chapter: |usr_12.txt| Clever tricks
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 312,315 ----
+
+ Next chapter: |usr_12.txt| Clever tricks
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_12.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_12.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 355,358 ****
+
+ Next chapter: |usr_20.txt| Typing command-line commands quickly
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 355,358 ----
+
+ Next chapter: |usr_20.txt| Typing command-line commands quickly
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_20.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_20.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 381,384 ****
+
+ Next chapter: |usr_21.txt| Go away and come back
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 381,384 ----
+
+ Next chapter: |usr_21.txt| Go away and come back
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_21.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_21.txt 2019-04-25 21:55:24.090196331 +0200
+***************
+*** 1,4 ****
+! *usr_21.txt* For Vim version 8.1. Last change: 2012 Nov 02
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+--- 1,4 ----
+! *usr_21.txt* For Vim version 8.1. Last change: 2019 Apr 25
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+***************
+*** 263,269 ****
+ The windows that were open are restored, with the same position and size as
+ before. Mappings and option values are like before.
+ What exactly is restored depends on the 'sessionoptions' option. The
+! default value is "blank,buffers,curdir,folds,help,options,winsize".
+
+ blank keep empty windows
+ buffers all buffers, not only the ones in a window
+--- 263,270 ----
+ The windows that were open are restored, with the same position and size as
+ before. Mappings and option values are like before.
+ What exactly is restored depends on the 'sessionoptions' option. The
+! default value is:
+! "blank,buffers,curdir,folds,help,options,tabpages,winsize,terminal".
+
+ blank keep empty windows
+ buffers all buffers, not only the ones in a window
+***************
+*** 271,277 ****
+--- 272,280 ----
+ folds folds, also manually created ones
+ help the help window
+ options all options and mappings
++ tabpages all tab pages
+ winsize window sizes
++ terminal include terminal windows
+
+ Change this to your liking. To also restore the size of the Vim window, for
+ example, use: >
+***************
+*** 496,499 ****
+
+ Next chapter: |usr_22.txt| Finding the file to edit
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 499,502 ----
+
+ Next chapter: |usr_22.txt| Finding the file to edit
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_22.txt 2019-04-27 20:36:52.526303597 +0200
+--- runtime/doc/usr_22.txt 2019-04-27 20:17:02.375349029 +0200
+***************
+*** 1,4 ****
+! *usr_22.txt* For Vim version 8.1. Last change: 2016 Dec 13
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+--- 1,4 ----
+! *usr_22.txt* For Vim version 8.1. Last change: 2019 Apr 27
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+***************
+*** 411,414 ****
+
+ Next chapter: |usr_23.txt| Editing other files
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 411,414 ----
+
+ Next chapter: |usr_23.txt| Editing other files
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_23.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_23.txt 2018-10-24 21:30:14.629848115 +0200
+***************
+*** 208,222 ****
+
+ LIMITS ON ENCRYPTION
+
+! The encryption algorithm used by Vim is weak. It is good enough to keep out
+! the casual prowler, but not good enough to keep out a cryptology expert with
+! lots of time on his hands. Also you should be aware that the swap file is not
+! encrypted; so while you are editing, people with superuser privileges can read
+! the unencrypted text from this file.
+! One way to avoid letting people read your swap file is to avoid using one.
+! If the -n argument is supplied on the command line, no swap file is used
+! (instead, Vim puts everything in memory). For example, to edit the encrypted
+! file "file.txt" without a swap file use the following command: >
+
+ vim -x -n file.txt
+
+--- 208,224 ----
+
+ LIMITS ON ENCRYPTION
+
+! The encryption algorithm used by Vim is not very strong. It is good enough to
+! keep out the casual prowler, but not good enough to keep out a cryptology
+! expert with lots of time on his hands. The text in the swap file and the undo
+! file is also encrypted. However, this is done block-by-block and may reduce
+! the time needed to crack a password. You can disable the swap file, but then
+! a crash will cause you to lose your work, since Vim keeps all the text in
+! memory only. The undo file can be disabled with the only disadvantage that
+! you can't undo after unloading the buffer.
+! To avoid using a swap file, supply the -n argument on the command line.
+! For example, to edit the encrypted file "file.txt" without a swap file use the
+! following command: >
+
+ vim -x -n file.txt
+
+***************
+*** 340,343 ****
+
+ Next chapter: |usr_24.txt| Inserting quickly
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 342,345 ----
+
+ Next chapter: |usr_24.txt| Inserting quickly
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_24.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_24.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 603,606 ****
+
+ Next chapter: |usr_25.txt| Editing formatted text
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 603,606 ----
+
+ Next chapter: |usr_25.txt| Editing formatted text
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_25.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_25.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 579,582 ****
+
+ Next chapter: |usr_26.txt| Repeating
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 579,582 ----
+
+ Next chapter: |usr_26.txt| Repeating
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_26.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_26.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 218,221 ****
+
+ Next chapter: |usr_27.txt| Search commands and patterns
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 218,221 ----
+
+ Next chapter: |usr_27.txt| Search commands and patterns
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_27.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_27.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 560,563 ****
+
+ Next chapter: |usr_28.txt| Folding
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 560,563 ----
+
+ Next chapter: |usr_28.txt| Folding
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_28.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_28.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 423,426 ****
+
+ Next chapter: |usr_29.txt| Moving through programs
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 423,426 ----
+
+ Next chapter: |usr_29.txt| Moving through programs
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_29.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_29.txt 2018-08-08 23:07:19.240325166 +0200
+***************
+*** 608,611 ****
+
+ Next chapter: |usr_30.txt| Editing programs
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 608,611 ----
+
+ Next chapter: |usr_30.txt| Editing programs
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_30.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_30.txt 2018-08-08 23:07:19.244325127 +0200
+***************
+*** 640,643 ****
+
+ Next chapter: |usr_31.txt| Exploiting the GUI
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 640,643 ----
+
+ Next chapter: |usr_31.txt| Exploiting the GUI
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_31.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_31.txt 2018-08-08 23:07:19.244325127 +0200
+***************
+*** 269,272 ****
+
+ Next chapter: |usr_32.txt| The undo tree
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 269,272 ----
+
+ Next chapter: |usr_32.txt| The undo tree
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_32.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_32.txt 2018-08-08 23:07:19.244325127 +0200
+***************
+*** 177,180 ****
+
+ Next chapter: |usr_40.txt| Make new commands
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 177,180 ----
+
+ Next chapter: |usr_40.txt| Make new commands
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_40.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_40.txt 2018-08-08 23:07:19.244325127 +0200
+***************
+*** 654,657 ****
+
+ Next chapter: |usr_41.txt| Write a Vim script
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 654,657 ----
+
+ Next chapter: |usr_41.txt| Write a Vim script
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_41.txt 2019-05-04 15:47:25.633423491 +0200
+--- runtime/doc/usr_41.txt 2019-05-04 15:23:11.301395183 +0200
+***************
+*** 1,4 ****
+! *usr_41.txt* For Vim version 8.1. Last change: 2018 Apr 11
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+--- 1,4 ----
+! *usr_41.txt* For Vim version 8.1. Last change: 2019 May 04
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+***************
+*** 614,619 ****
+--- 614,620 ----
+ repeat() repeat a string multiple times
+ eval() evaluate a string expression
+ execute() execute an Ex command and get the output
++ trim() trim characters from a string
+
+ List manipulation: *list-functions*
+ get() get an item without error for wrong index
+***************
+*** 774,780 ****
+ systemlist() get the result of a shell command as a list
+ hostname() name of the system
+ readfile() read a file into a List of lines
+! writefile() write a List of lines into a file
+
+ Date and Time: *date-functions* *time-functions*
+ getftime() get last modification time of a file
+--- 775,782 ----
+ systemlist() get the result of a shell command as a list
+ hostname() name of the system
+ readfile() read a file into a List of lines
+! readdir() get a List of file names in a directory
+! writefile() write a List of lines or Blob into a file
+
+ Date and Time: *date-functions* *time-functions*
+ getftime() get last modification time of a file
+***************
+*** 803,808 ****
+--- 805,813 ----
+ bufwinnr() get the window number of a specific buffer
+ winbufnr() get the buffer number of a specific window
+ getbufline() get a list of lines from the specified buffer
++ setbufline() replace a line in the specified buffer
++ appendbufline() append a list of lines in the specified buffer
++ deletebufline() delete lines from a specified buffer
+ win_findbuf() find windows containing a buffer
+ win_getid() get window ID of a window
+ win_gotoid() go to window with ID
+***************
+*** 814,819 ****
+--- 819,825 ----
+ getchangelist() get a list of change list entries
+ getjumplist() get a list of jump list entries
+ swapinfo() information about a swap file
++ swapname() get the swap file path of a buffer
+
+ Command line: *command-line-functions*
+ getcmdline() get the current command line
+***************
+*** 912,917 ****
+--- 918,924 ----
+ winheight() get height of a specific window
+ winwidth() get width of a specific window
+ win_screenpos() get screen position of a window
++ winlayout() get layout of windows in a tab page
+ winrestcmd() return command to restore window sizes
+ winsaveview() get view of current window
+ winrestview() restore saved view of current window
+***************
+*** 924,929 ****
+--- 931,937 ----
+
+ Testing: *test-functions*
+ assert_equal() assert that two expressions values are equal
++ assert_equalfile() assert that two file contents are equal
+ assert_notequal() assert that two expressions values are not equal
+ assert_inrange() assert that an expression is inside a range
+ assert_match() assert that a pattern matches the value
+***************
+*** 939,944 ****
+--- 947,953 ----
+ test_override() test with Vim internal overrides
+ test_garbagecollect_now() free memory right now
+ test_ignore_error() ignore a specific error message
++ test_null_blob() return a null Blob
+ test_null_channel() return a null Channel
+ test_null_dict() return a null Dict
+ test_null_job() return a null Job
+***************
+*** 957,962 ****
+--- 966,972 ----
+ ch_close() close a channel
+ ch_close_in() close the in part of a channel
+ ch_read() read a message from a channel
++ ch_readblob() read a Blob from a channel
+ ch_readraw() read a raw message from a channel
+ ch_sendexpr() send a JSON message over a channel
+ ch_sendraw() send a raw message over a channel
+***************
+*** 1009,1014 ****
+--- 1019,1030 ----
+ term_gettty() get the tty name of a terminal
+ term_setansicolors() set 16 ANSI colors, used for GUI
+ term_getansicolors() get 16 ANSI colors, used for GUI
++ term_dumpdiff() display difference between two screen dumps
++ term_dumpload() load a terminal screen dump in a window
++ term_dumpwrite() dump contents of a terminal screen to a file
++ term_setkill() set signal to stop job in a terminal
++ term_setrestore() set command to restore a terminal
++ term_setsize() set the size of a terminal
+
+ Timers: *timer-functions*
+ timer_start() create a timer
+***************
+*** 1017,1022 ****
+--- 1033,1049 ----
+ timer_stopall() stop all timers
+ timer_info() get information about timers
+
++ Tags: *tag-functions*
++ taglist() get list of matching tags
++ tagfiles() get a list of tags files
++ gettagstack() get the tag stack of a window
++ settagstack() modify the tag stack of a window
++
++ Prompt Buffer: *promptbuffer-functions*
++ prompt_setcallback() set prompt callback for a buffer
++ prompt_setinterrupt() set interrupt callback for a buffer
++ prompt_setprompt() set the prompt text for a buffer
++
+ Various: *various-functions*
+ mode() get current editing mode
+ visualmode() last visual mode used
+***************
+*** 1044,1060 ****
+
+ wordcount() get byte/word/char count of buffer
+
+- 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
+ perleval() evaluate Perl expression (|+perl|)
+ py3eval() evaluate Python expression (|+python3|)
+ pyeval() evaluate Python expression (|+python|)
+ pyxeval() evaluate |python_x| expression
+
+ ==============================================================================
+ *41.7* Defining a function
+--- 1071,1083 ----
+
+ wordcount() get byte/word/char count of buffer
+
+ luaeval() evaluate Lua expression
+ mzeval() evaluate |MzScheme| expression
+ perleval() evaluate Perl expression (|+perl|)
+ py3eval() evaluate Python expression (|+python3|)
+ pyeval() evaluate Python expression (|+python|)
+ pyxeval() evaluate |python_x| expression
++ debugbreak() interrupt a program being debugged
+
+ ==============================================================================
+ *41.7* Defining a function
+***************
+*** 2613,2616 ****
+
+ Next chapter: |usr_42.txt| Add new menus
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 2636,2639 ----
+
+ Next chapter: |usr_42.txt| Add new menus
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_43.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_43.txt 2018-08-08 23:07:19.244325127 +0200
+***************
+*** 176,179 ****
+
+ Next chapter: |usr_44.txt| Your own syntax highlighted
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 176,179 ----
+
+ Next chapter: |usr_44.txt| Your own syntax highlighted
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_44.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_44.txt 2018-08-08 23:07:19.244325127 +0200
+***************
+*** 716,719 ****
+
+ Next chapter: |usr_45.txt| Select your language
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 716,719 ----
+
+ Next chapter: |usr_45.txt| Select your language
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_45.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_45.txt 2019-02-17 17:50:03.378330597 +0100
+***************
+*** 153,164 ****
+ language, the default should work fine and you don't need to do anything. The
+ following is only relevant when you want to edit different languages.
+
+- Note:
+- Using different encodings only works when Vim was compiled to handle
+- it. To find out if it works, use the ":version" command and check the
+- output for "+multi_byte". If it's there, you are OK. If you see
+- "-multi_byte" you will have to find another Vim.
+-
+
+ USING UNICODE IN THE GUI
+
+--- 153,158 ----
+***************
+*** 416,419 ****
+
+ Next chapter: |usr_90.txt| Installing Vim
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 410,413 ----
+
+ Next chapter: |usr_90.txt| Installing Vim
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_90.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_90.txt 2018-08-08 23:07:19.244325127 +0200
+***************
+*** 495,498 ****
+
+ Table of contents: |usr_toc.txt|
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 495,498 ----
+
+ Table of contents: |usr_toc.txt|
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/usr_toc.txt 2018-05-17 13:42:04.000000000 +0200
+--- runtime/doc/usr_toc.txt 2018-08-08 23:07:19.244325127 +0200
+***************
+*** 352,355 ****
+
+ ==============================================================================
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 352,355 ----
+
+ ==============================================================================
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/various.txt 2019-04-27 22:40:03.927661368 +0200
+--- runtime/doc/various.txt 2019-05-05 17:30:05.650423230 +0200
+***************
+*** 1,4 ****
+! *various.txt* For Vim version 8.1. Last change: 2018 Mar 29
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *various.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 73,80 ****
+ <ö> 246, Hex 00f6, Oct 366, Digr o: ~
+ This shows you can type CTRL-K o : to insert ö.
+
+- {not in Vi}
+-
+ *g8*
+ g8 Print the hex values of the bytes used in the
+ character under the cursor, assuming it is in |UTF-8|
+--- 73,78 ----
+***************
+*** 82,89 ****
+ value of 'maxcombine' doesn't matter.
+ Example of a character with two composing characters:
+ e0 b8 81 + e0 b8 b9 + e0 b9 89 ~
+- {not in Vi} {only when compiled with the |+multi_byte|
+- feature}
+
+ *8g8*
+ 8g8 Find an illegal UTF-8 byte sequence at or after the
+--- 80,85 ----
+***************
+*** 98,105 ****
+ Note that when the cursor is on an illegal byte or the
+ cursor is halfway a multi-byte character the command
+ won't move the cursor.
+- {not in Vi} {only when compiled with the |+multi_byte|
+- feature}
+
+ *:p* *:pr* *:print* *E749*
+ :[range]p[rint] [flags]
+--- 94,99 ----
+***************
+*** 176,182 ****
+
+ :{range}z#[+-^.=]{count} *:z#*
+ Like ":z", but number the lines.
+- {not in all versions of Vi, not with these arguments}
+
+ *:=*
+ := [flags] Print the last line number.
+--- 170,175 ----
+***************
+*** 226,232 ****
+
+ Example: >
+ :exe "normal \<c-w>\<c-w>"
+- < {not in Vi, of course}
+
+ :{range}norm[al][!] {commands} *:normal-range*
+ Execute Normal mode commands {commands} for each line
+--- 219,224 ----
+***************
+*** 234,240 ****
+ cursor is positioned in the first column of the range,
+ for each line. Otherwise it's the same as the
+ ":normal" command without a range.
+- {not in Vi}
+
+ *:sh* *:shell* *E371*
+ :sh[ell] This command starts a shell. When the shell exits
+--- 226,231 ----
+***************
+*** 440,451 ****
+ N *+startuptime* |--startuptime| argument
+ N *+statusline* Options 'statusline', 'rulerformat' and special
+ formats of 'titlestring' and 'iconstring'
+! m *+sun_workshop* |workshop|
+ N *+syntax* Syntax highlighting |syntax|
+ *+system()* Unix only: opposite of |+fork|
+ T *+tag_binary* binary searching in tags file |tag-binary-search|
+ N *+tag_old_static* old method for static tags |tag-old-static|
+! m *+tag_any_white* any white space allowed in tags file |tag-any-white|
+ m *+tcl* Tcl interface |tcl|
+ m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn|
+ m *+terminal* Support for terminal window |terminal|
+--- 431,442 ----
+ N *+startuptime* |--startuptime| argument
+ N *+statusline* Options 'statusline', 'rulerformat' and special
+ formats of 'titlestring' and 'iconstring'
+! m *+sun_workshop* |workshop|; no longer supported
+ N *+syntax* Syntax highlighting |syntax|
+ *+system()* Unix only: opposite of |+fork|
+ T *+tag_binary* binary searching in tags file |tag-binary-search|
+ N *+tag_old_static* old method for static tags |tag-old-static|
+! m *+tag_any_white* Removed; was to allow any white space in tags files
+ m *+tcl* Tcl interface |tcl|
+ m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn|
+ m *+terminal* Support for terminal window |terminal|
+***************
+*** 492,498 ****
+ :ve[rsion] {nr} Is now ignored. This was previously used to check the
+ version number of a .vimrc file. It was removed,
+ because you can now use the ":if" command for
+! version-dependent behavior. {not in Vi}
+
+ *:redi* *:redir*
+ :redi[r][!] > {file} Redirect messages to file {file}. The messages which
+--- 483,489 ----
+ :ve[rsion] {nr} Is now ignored. This was previously used to check the
+ version number of a .vimrc file. It was removed,
+ because you can now use the ":if" command for
+! version-dependent behavior.
+
+ *:redi* *:redir*
+ :redi[r][!] > {file} Redirect messages to file {file}. The messages which
+***************
+*** 512,542 ****
+ with ":silent call Function()".
+ An alternative is to use the 'verbosefile' option,
+ this can be used in combination with ":redir".
+- {not in Vi}
+
+ :redi[r] >> {file} Redirect messages to file {file}. Append if {file}
+! already exists. {not in Vi}
+
+ :redi[r] @{a-zA-Z}
+ :redi[r] @{a-zA-Z}> Redirect messages to register {a-z}. Append to the
+ contents of the register if its name is given
+ uppercase {A-Z}. The ">" after the register name is
+! optional. {not in Vi}
+! :redi[r] @{a-z}>> Append messages to register {a-z}. {not in Vi}
+
+ :redi[r] @*>
+ :redi[r] @+> Redirect messages to the selection or clipboard. For
+ backward compatibility, the ">" after the register
+ name can be omitted. See |quotestar| and |quoteplus|.
+- {not in Vi}
+ :redi[r] @*>>
+ :redi[r] @+>> Append messages to the selection or clipboard.
+- {not in Vi}
+
+ :redi[r] @"> Redirect messages to the unnamed register. For
+ backward compatibility, the ">" after the register
+! name can be omitted. {not in Vi}
+! :redi[r] @">> Append messages to the unnamed register. {not in Vi}
+
+ :redi[r] => {var} Redirect messages to a variable. If the variable
+ doesn't exist, then it is created. If the variable
+--- 503,530 ----
+ with ":silent call Function()".
+ An alternative is to use the 'verbosefile' option,
+ this can be used in combination with ":redir".
+
+ :redi[r] >> {file} Redirect messages to file {file}. Append if {file}
+! already exists.
+
+ :redi[r] @{a-zA-Z}
+ :redi[r] @{a-zA-Z}> Redirect messages to register {a-z}. Append to the
+ contents of the register if its name is given
+ uppercase {A-Z}. The ">" after the register name is
+! optional.
+! :redi[r] @{a-z}>> Append messages to register {a-z}.
+
+ :redi[r] @*>
+ :redi[r] @+> Redirect messages to the selection or clipboard. For
+ backward compatibility, the ">" after the register
+ name can be omitted. See |quotestar| and |quoteplus|.
+ :redi[r] @*>>
+ :redi[r] @+>> Append messages to the selection or clipboard.
+
+ :redi[r] @"> Redirect messages to the unnamed register. For
+ backward compatibility, the ">" after the register
+! name can be omitted.
+! :redi[r] @">> Append messages to the unnamed register.
+
+ :redi[r] => {var} Redirect messages to a variable. If the variable
+ doesn't exist, then it is created. If the variable
+***************
+*** 545,558 ****
+ Only string variables can be used. After the
+ redirection starts, if the variable is removed or
+ locked or the variable type is changed, then further
+! command output messages will cause errors. {not in Vi}
+ To get the output of one command the |execute()|
+ function can be used.
+
+ :redi[r] =>> {var} Append messages to an existing variable. Only string
+! variables can be used. {not in Vi}
+
+! :redi[r] END End redirecting messages. {not in Vi}
+
+ *:filt* *:filter*
+ :filt[er][!] {pat} {command}
+--- 533,546 ----
+ Only string variables can be used. After the
+ redirection starts, if the variable is removed or
+ locked or the variable type is changed, then further
+! command output messages will cause errors.
+ To get the output of one command the |execute()|
+ function can be used.
+
+ :redi[r] =>> {var} Append messages to an existing variable. Only string
+! variables can be used.
+
+! :redi[r] END End redirecting messages.
+
+ *:filt* *:filter*
+ :filt[er][!] {pat} {command}
+***************
+*** 694,705 ****
+ < - When 'keywordprg' is equal to "man -s", a count
+ before "K" is inserted after the "-s". If there is
+ no count, the "-s" is removed.
+- {not in Vi}
+
+ *v_K*
+ {Visual}K Like "K", but use the visually highlighted text for
+ the keyword. Only works when the highlighted text is
+! not more than one line. {not in Vi}
+
+ [N]gs *gs* *:sl* *:sleep*
+ :[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included,
+--- 682,692 ----
+ < - When 'keywordprg' is equal to "man -s", a count
+ before "K" is inserted after the "-s". If there is
+ no count, the "-s" is removed.
+
+ *v_K*
+ {Visual}K Like "K", but use the visually highlighted text for
+ the keyword. Only works when the highlighted text is
+! not more than one line.
+
+ [N]gs *gs* *:sl* *:sleep*
+ :[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included,
+***************
+*** 712,718 ****
+ < Can be interrupted with CTRL-C (CTRL-Break on MS-DOS).
+ "gs" stands for "goto sleep".
+ While sleeping the cursor is positioned in the text,
+! if at a visible position. {not in Vi}
+ Also process the received netbeans messages. {only
+ available when compiled with the |+netbeans_intg|
+ feature}
+--- 699,705 ----
+ < Can be interrupted with CTRL-C (CTRL-Break on MS-DOS).
+ "gs" stands for "goto sleep".
+ While sleeping the cursor is positioned in the text,
+! if at a visible position.
+ Also process the received netbeans messages. {only
+ available when compiled with the |+netbeans_intg|
+ feature}
+***************
+*** 749,752 ****
+ endfunc
+ <
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 736,739 ----
+ endfunc
+ <
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/version4.txt 2018-05-17 13:42:04.000000000 +0200
+--- runtime/doc/version4.txt 2018-08-08 23:07:19.244325127 +0200
+***************
+*** 352,355 ****
+ it. Since hardly anybody uses this feature, it is disabled by default. If
+ you want to use it, define RIGHTLEFT in feature.h before compiling. |'revins'|
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 352,355 ----
+ it. Since hardly anybody uses this feature, it is disabled by default. If
+ you want to use it, define RIGHTLEFT in feature.h before compiling. |'revins'|
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/version5.txt 2018-05-17 13:42:04.000000000 +0200
+--- runtime/doc/version5.txt 2018-08-08 23:07:19.248325089 +0200
+***************
+*** 221,228 ****
+ file twice, the autocommands in it will be defined twice. To avoid this, do
+ one of these:
+
+! - Remove any autocommands that might potentially defined twice before
+! defining them. Example: >
+ :au! * *.ext
+ :au BufEnter *.ext ...
+
+--- 221,228 ----
+ file twice, the autocommands in it will be defined twice. To avoid this, do
+ one of these:
+
+! - Remove any autocommands that might already be defined before defining
+! them. Example: >
+ :au! * *.ext
+ :au BufEnter *.ext ...
+
+***************
+*** 2347,2353 ****
+ Support for mapping numeric keypad +,-,*,/ keys. (Negri)
+ When not mapped, they produce the normal character.
+
+! Win32 GUI: When directory dropped on Gvim, cd there and edit new buffer.
+ (Negri)
+
+ Win32 GUI: Made CTRL-Break work as interrupt, so that CTRL-C can be
+--- 2347,2353 ----
+ Support for mapping numeric keypad +,-,*,/ keys. (Negri)
+ When not mapped, they produce the normal character.
+
+! Win32 GUI: When directory dropped on gVim, cd there and edit new buffer.
+ (Negri)
+
+ Win32 GUI: Made CTRL-Break work as interrupt, so that CTRL-C can be
+***************
+*** 7615,7621 ****
+
+ Added a few corrections for the Macintosh. (Axel Kielhorn)
+
+! Win32: Gvimext could not edit more than a few files at once, the length of the
+ argument was fixed.
+
+
+--- 7615,7621 ----
+
+ Added a few corrections for the Macintosh. (Axel Kielhorn)
+
+! Win32: GvimExt could not edit more than a few files at once, the length of the
+ argument was fixed.
+
+
+***************
+*** 7810,7813 ****
+ Files: src/ex_docmd.c
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 7810,7813 ----
+ Files: src/ex_docmd.c
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/version6.txt 2018-05-17 13:42:04.000000000 +0200
+--- runtime/doc/version6.txt 2019-01-17 15:56:37.176127129 +0100
+***************
+*** 1,4 ****
+! *version6.txt* For Vim version 8.1. Last change: 2018 Mar 18
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *version6.txt* For Vim version 8.1. Last change: 2019 Jan 17
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 943,949 ****
+ with two ASCII characters or an icon. The line after it can be highlighted.
+ Useful to display breakpoints and the current PC position.
+
+! Added the |:wsverb| command to execute debugger commands.
+
+ Added balloon stuff: 'balloondelay' and 'ballooneval' options.
+
+--- 943,949 ----
+ with two ASCII characters or an icon. The line after it can be highlighted.
+ Useful to display breakpoints and the current PC position.
+
+! Added the :wsverb command to execute debugger commands.
+
+ Added balloon stuff: 'balloondelay' and 'ballooneval' options.
+
+***************
+*** 2967,2973 ****
+ Unix to avoid problems with Windows dir functions. Merged the DOS and Win32
+ functions.
+
+! Win32: Gvimext could not edit more than a few files at once, the length of the
+ argument was fixed.
+
+ "ls -1 * | xargs vim" worked, but the input was in cooked mode. Now switch to
+--- 2967,2973 ----
+ Unix to avoid problems with Windows dir functions. Merged the DOS and Win32
+ functions.
+
+! Win32: GvimExt could not edit more than a few files at once, the length of the
+ argument was fixed.
+
+ "ls -1 * | xargs vim" worked, but the input was in cooked mode. Now switch to
+***************
+*** 14527,14530 ****
+ Files: src/search.c
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 14527,14530 ----
+ Files: src/search.c
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/version7.txt 2018-05-17 13:42:04.000000000 +0200
+--- runtime/doc/version7.txt 2018-08-08 23:07:19.252325051 +0200
+***************
+*** 1980,1986 ****
+ flag to 'cpoptions' for this.
+
+ Using "I" in a line with only blanks appended to the line. This is not Vi
+! compatible. Added the 'H' flag in 'coptions' for this.
+
+ When joining multiple lines the cursor would be at the last joint, but Vi
+ leaves it at the position where "J" would put it. Added the 'q' flag in
+--- 1980,1986 ----
+ flag to 'cpoptions' for this.
+
+ Using "I" in a line with only blanks appended to the line. This is not Vi
+! compatible. Added the 'H' flag in 'cpoptions' for this.
+
+ When joining multiple lines the cursor would be at the last joint, but Vi
+ leaves it at the position where "J" would put it. Added the 'q' flag in
+***************
+*** 18309,18312 ****
+
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 18309,18312 ----
+
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/version8.txt 2018-05-17 15:25:49.000000000 +0200
+--- runtime/doc/version8.txt 2019-03-10 08:12:24.530682799 +0100
+***************
+*** 2378,2384 ****
+ Files: src/config.mk.in, src/po/Makefile
+
+ Patch 7.4.323
+! Problem: Substitute() with zero width pattern breaks multi-byte character.
+ Solution: Take multi-byte character size into account. (Yukihiro Nakadaira)
+ Files: src/eval.c src/testdir/test69.in, src/testdir/test69.ok
+
+--- 2378,2384 ----
+ Files: src/config.mk.in, src/po/Makefile
+
+ Patch 7.4.323
+! Problem: substitute() with zero width pattern breaks multi-byte character.
+ Solution: Take multi-byte character size into account. (Yukihiro Nakadaira)
+ Files: src/eval.c src/testdir/test69.in, src/testdir/test69.ok
+
+***************
+*** 14549,14560 ****
+--- 14549,14585 ----
+ Internal: A few C99 features are now allowed such as // comments and a
+ comma after the last enum entry. See |style-compiler|.
+
++ Since patch 8.0.0029 removed support for older MS-Windows systems, only
++ MS-Windows XP and later are supported.
++
+
+ Added *added-8.1*
+ -----
+
+ Various syntax, indent and other plugins were added.
+
++ Quickfix improvements (by Yegappan Lakshmanan):
++ Added support for modifying any quickfix/location list in the quickfix
++ stack.
++ Added a unique identifier for every quickfix/location list.
++ Added support for associating any Vim type as a context information to
++ a quickfix/location list.
++ Enhanced the getqflist(), getloclist(), setqflist() and setloclist()
++ functions to get and set the various quickfix/location list attributes.
++ Added the QuickFixLine highlight group to highlight the current line
++ in the quickfix window.
++ The quickfix buffer b:changedtick variable is incremented for every
++ change to the contained quickfix list.
++ Added a changedtick variable to a quickfix/location list which is
++ incremented when the list is modified.
++ Added support for parsing text using 'errorformat' without creating a
++ new quickfix list.
++ Added support for the "module" item to a quickfix entry which can be
++ used for display purposes instead of a long file name.
++ Added support for freeing all the lists in the quickfix/location stack.
++ When opening a quickfix window using the :copen/:cwindow commands, the
++ supplied split modifiers are used.
++
+ Functions:
+ All the term_ functions.
+
+***************
+*** 16088,16094 ****
+
+ Patch 8.0.0248
+ Problem: vim_strcat() cannot handle overlapping arguments.
+! Solution: Use mch_memmove() instead of strcpy(). (Justin M Keyes,
+ closes #1415)
+ Files: src/misc2.c
+
+--- 16113,16119 ----
+
+ Patch 8.0.0248
+ Problem: vim_strcat() cannot handle overlapping arguments.
+! Solution: Use mch_memmove() instead of strcpy(). (Justin M. Keyes,
+ closes #1415)
+ Files: src/misc2.c
+
+***************
+*** 16338,16344 ****
+ Patch 8.0.0287
+ Problem: Cannot access the arguments of the current function in debug mode.
+ (Luc Hermitte)
+! Solution: use get_funccal(). (Lemonboy, closes #1432, closes #1352)
+ Files: src/userfunc.c
+
+ Patch 8.0.0288 (after 8.0.0284)
+--- 16363,16369 ----
+ Patch 8.0.0287
+ Problem: Cannot access the arguments of the current function in debug mode.
+ (Luc Hermitte)
+! Solution: use get_funccal(). (LemonBoy, closes #1432, closes #1352)
+ Files: src/userfunc.c
+
+ Patch 8.0.0288 (after 8.0.0284)
+***************
+*** 16703,16709 ****
+
+ Patch 8.0.0350
+ Problem: Not enough test coverage for Perl.
+! Solution: Add more Perl tests. (Dominique Perl, closes #1500)
+ Files: src/testdir/test_perl.vim
+
+ Patch 8.0.0351
+--- 16728,16734 ----
+
+ Patch 8.0.0350
+ Problem: Not enough test coverage for Perl.
+! Solution: Add more Perl tests. (Dominique Pelle, closes #1500)
+ Files: src/testdir/test_perl.vim
+
+ Patch 8.0.0351
+***************
+*** 18204,18210 ****
+
+ Patch 8.0.0597
+ Problem: Off-by-one error in buffer size computation.
+! Solution: Use ">=" instead of ">". (Lemonboy, closes #1694)
+ Files: src/quickfix.c
+
+ Patch 8.0.0598
+--- 18229,18235 ----
+
+ Patch 8.0.0597
+ Problem: Off-by-one error in buffer size computation.
+! Solution: Use ">=" instead of ">". (LemonBoy, closes #1694)
+ Files: src/quickfix.c
+
+ Patch 8.0.0598
+***************
+*** 18321,18327 ****
+ Problem: When setting the cterm background with ":hi Normal" the value of
+ 'background' may be set wrongly.
+ Solution: Check that the color is less than 16. Don't set 'background' when
+! it was set explicitly. (Lemonboy, closes #1710)
+ Files: src/syntax.c, src/testdir/test_syntax.vim
+
+ Patch 8.0.0617 (after 8.0.0615)
+--- 18346,18352 ----
+ Problem: When setting the cterm background with ":hi Normal" the value of
+ 'background' may be set wrongly.
+ Solution: Check that the color is less than 16. Don't set 'background' when
+! it was set explicitly. (LemonBoy, closes #1710)
+ Files: src/syntax.c, src/testdir/test_syntax.vim
+
+ Patch 8.0.0617 (after 8.0.0615)
+***************
+*** 18452,18459 ****
+
+ Patch 8.0.0638
+ Problem: Cannot build with new MSVC version VS2017.
+! Solution: Change the compiler arguments. (Leonardo Manera, closes #1731,
+! closes #1747)
+ Files: src/GvimExt/Makefile, src/Make_mvc.mak
+
+ Patch 8.0.0639
+--- 18477,18484 ----
+
+ Patch 8.0.0638
+ Problem: Cannot build with new MSVC version VS2017.
+! Solution: Change the compiler arguments. (Leonardo Valeri Manera,
+! closes #1731, closes #1747)
+ Files: src/GvimExt/Makefile, src/Make_mvc.mak
+
+ Patch 8.0.0639
+***************
+*** 19045,19051 ****
+
+ Patch 8.0.0724
+ Problem: The message for yanking doesn't indicate the register.
+! Solution: Show the register name in the "N lines yanked" message. (Lemonboy,
+ closes #1803, closes #1809)
+ Files: src/ops.c, src/Makefile, src/testdir/test_registers.vim,
+ src/testdir/Make_all.mak
+--- 19070,19076 ----
+
+ Patch 8.0.0724
+ Problem: The message for yanking doesn't indicate the register.
+! Solution: Show the register name in the "N lines yanked" message. (LemonBoy,
+ closes #1803, closes #1809)
+ Files: src/ops.c, src/Makefile, src/testdir/test_registers.vim,
+ src/testdir/Make_all.mak
+***************
+*** 20286,20292 ****
+ Files: src/buffer.c
+
+ Patch 8.0.0936
+! Problem: Mode() returns wrong value for a terminal window.
+ Solution: Return 't' when typed keys go to a job.
+ Files: src/evalfunc.c, src/testdir/test_terminal.vim
+
+--- 20311,20317 ----
+ Files: src/buffer.c
+
+ Patch 8.0.0936
+! Problem: mode() returns wrong value for a terminal window.
+ Solution: Return 't' when typed keys go to a job.
+ Files: src/evalfunc.c, src/testdir/test_terminal.vim
+
+***************
+*** 20672,20678 ****
+ Files: src/channel.c
+
+ Patch 8.0.1004
+! Problem: Matchstrpos() without a match returns too many items.
+ Solution: Also remove the second item when the position is beyond the end of
+ the string. (Hirohito Higashi) Use an enum for the type.
+ Files: src/evalfunc.c, src/testdir/test_match.vim
+--- 20697,20703 ----
+ Files: src/channel.c
+
+ Patch 8.0.1004
+! Problem: matchstrpos() without a match returns too many items.
+ Solution: Also remove the second item when the position is beyond the end of
+ the string. (Hirohito Higashi) Use an enum for the type.
+ Files: src/evalfunc.c, src/testdir/test_match.vim
+***************
+*** 21586,21597 ****
+
+ Patch 8.0.1157
+ Problem: Compiler warning on MS-Windows.
+! Solution: Add type cast. (Yasuhiro Matsomoto)
+ Files: src/main.c
+
+ Patch 8.0.1158
+ Problem: Still old style tests.
+! Solution: Convert serveral tests to new style. (Yegappan Lakshmanan)
+ Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
+ src/testdir/main.aap, src/testdir/test33.in,
+ src/testdir/test33.ok, src/testdir/test41.in,
+--- 21611,21622 ----
+
+ Patch 8.0.1157
+ Problem: Compiler warning on MS-Windows.
+! Solution: Add type cast. (Yasuhiro Matsumoto)
+ Files: src/main.c
+
+ Patch 8.0.1158
+ Problem: Still old style tests.
+! Solution: Convert several tests to new style. (Yegappan Lakshmanan)
+ Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
+ src/testdir/main.aap, src/testdir/test33.in,
+ src/testdir/test33.ok, src/testdir/test41.in,
+***************
+*** 21886,21892 ****
+
+ Patch 8.0.1207
+ Problem: Profiling skips the first and last script line.
+! Solution: Check for BOM after setting script ID. (Lemonboy, closes #2103,
+ closes #2112) Add a test. List the trailing script lines.
+ Files: src/testdir/test_profile.vim, src/ex_cmds2.c
+
+--- 21911,21917 ----
+
+ Patch 8.0.1207
+ Problem: Profiling skips the first and last script line.
+! Solution: Check for BOM after setting script ID. (LemonBoy, closes #2103,
+ closes #2112) Add a test. List the trailing script lines.
+ Files: src/testdir/test_profile.vim, src/ex_cmds2.c
+
+***************
+*** 22083,22089 ****
+ Solution: Make feature names more consistent, add "osxdarwin". Rename
+ feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
+ Also includes a fix for when Ruby throws an exception inside
+! :rubyfile.(ujihisa)
+ Files: runtime/doc/eval.txt, runtime/doc/os_mac.txt, src/auto/configure,
+ src/config.h.in, src/configure.ac, src/digraph.c, src/edit.c,
+ src/evalfunc.c, src/feature.h, src/fileio.c, src/getchar.c,
+--- 22108,22114 ----
+ Solution: Make feature names more consistent, add "osxdarwin". Rename
+ feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
+ Also includes a fix for when Ruby throws an exception inside
+! :rubyfile. (ujihisa)
+ Files: runtime/doc/eval.txt, runtime/doc/os_mac.txt, src/auto/configure,
+ src/config.h.in, src/configure.ac, src/digraph.c, src/edit.c,
+ src/evalfunc.c, src/feature.h, src/fileio.c, src/getchar.c,
+***************
+*** 22104,22110 ****
+ Patch 8.0.1238
+ Problem: Incremental search only shows one match.
+ Solution: When 'incsearch' and 'hlsearch' are both set highlight all
+! matches. (haya14busa, itchyny closes #2198)
+ Files: runtime/doc/options.txt, src/ex_getln.c, src/proto/search.pro,
+ src/search.c, src/testdir/test_search.vim
+
+--- 22129,22135 ----
+ Patch 8.0.1238
+ Problem: Incremental search only shows one match.
+ Solution: When 'incsearch' and 'hlsearch' are both set highlight all
+! matches. (haya14busa, itchyny, closes #2198)
+ Files: runtime/doc/options.txt, src/ex_getln.c, src/proto/search.pro,
+ src/search.c, src/testdir/test_search.vim
+
+***************
+*** 22519,22525 ****
+ src/testdir/test_search.vim
+
+ Patch 8.0.1305
+! Problem: Writefile() never calls fsync().
+ Solution: Follow the 'fsync' option with override to enable or disable.
+ Files: src/fileio.c, src/evalfunc.c, runtime/doc/eval.txt, src/globals.h,
+ src/testdir/test_writefile.vim
+--- 22544,22550 ----
+ src/testdir/test_search.vim
+
+ Patch 8.0.1305
+! Problem: writefile() never calls fsync().
+ Solution: Follow the 'fsync' option with override to enable or disable.
+ Files: src/fileio.c, src/evalfunc.c, runtime/doc/eval.txt, src/globals.h,
+ src/testdir/test_writefile.vim
+***************
+*** 22595,22601 ****
+ Files: src/os_macosx.m
+
+ Patch 8.0.1316 (after 8.0.1312)
+! Problem: Build still fails on Mac. (chdiza)
+ Solution: Remove another bogus typedef.
+ Files: src/os_mac_conv.c
+
+--- 22620,22626 ----
+ Files: src/os_macosx.m
+
+ Patch 8.0.1316 (after 8.0.1312)
+! Problem: Build still still fails on Mac. (chdiza)
+ Solution: Remove another bogus typedef.
+ Files: src/os_mac_conv.c
+
+***************
+*** 22707,22713 ****
+ Files: src/vim.h, src/window.c
+
+ Patch 8.0.1335
+! Problem: Writefile() using fsync() may give an error for a device.
+ (Yasuhiro Matsumoto)
+ Solution: Ignore fsync() failing. (closes #2373)
+ Files: src/evalfunc.c
+--- 22732,22738 ----
+ Files: src/vim.h, src/window.c
+
+ Patch 8.0.1335
+! Problem: writefile() using fsync() may give an error for a device.
+ (Yasuhiro Matsumoto)
+ Solution: Ignore fsync() failing. (closes #2373)
+ Files: src/evalfunc.c
+***************
+*** 23231,23237 ****
+
+ Patch 8.0.1423
+ Problem: Error in return not caught by try/catch.
+! Solution: Call update_force_abort(). (Yasuhiro Matsomoto, closes #2483)
+ Files: src/testdir/test_eval.in, src/testdir/test_eval_stuff.vim,
+ src/Makefile, src/testdir/Make_all.mak, src/userfunc.c
+
+--- 23256,23262 ----
+
+ Patch 8.0.1423
+ Problem: Error in return not caught by try/catch.
+! Solution: Call update_force_abort(). (Yasuhiro Matsumoto, closes #2483)
+ Files: src/testdir/test_eval.in, src/testdir/test_eval_stuff.vim,
+ src/Makefile, src/testdir/Make_all.mak, src/userfunc.c
+
+***************
+*** 23262,23268 ****
+
+ Patch 8.0.1429
+ Problem: Crash when calling term_start() with empty argument.
+! Solution: Check for invalid argument. (Yasuhiro Matsomoto, closes #2503)
+ Fix memory leak.
+ Files: src/terminal.c, src/testdir/test_terminal.vim
+
+--- 23287,23293 ----
+
+ Patch 8.0.1429
+ Problem: Crash when calling term_start() with empty argument.
+! Solution: Check for invalid argument. (Yasuhiro Matsumoto, closes #2503)
+ Fix memory leak.
+ Files: src/terminal.c, src/testdir/test_terminal.vim
+
+***************
+*** 23593,23599 ****
+ src/testdir/test_popup.vim, src/testdir/test_edit.vim
+
+ Patch 8.0.1483
+! Problem: Searchpair() might return an invalid value on timeout.
+ Solution: When the second search times out, do not accept a match from the
+ first search. (Daniel Hahler, closes #2552)
+ Files: src/search.c
+--- 23618,23624 ----
+ src/testdir/test_popup.vim, src/testdir/test_edit.vim
+
+ Patch 8.0.1483
+! Problem: searchpair() might return an invalid value on timeout.
+ Solution: When the second search times out, do not accept a match from the
+ first search. (Daniel Hahler, closes #2552)
+ Files: src/search.c
+***************
+*** 23652,23658 ****
+ Patch 8.0.1493
+ Problem: Completion items cannot be annotated.
+ Solution: Add a "user_data" entry to the completion item. (Ben Jackson,
+! coses #2608, closes #2508)
+ Files: runtime/doc/insert.txt, src/edit.c, src/structs.h,
+ src/testdir/test_ins_complete.vim
+
+--- 23677,23683 ----
+ Patch 8.0.1493
+ Problem: Completion items cannot be annotated.
+ Solution: Add a "user_data" entry to the completion item. (Ben Jackson,
+! closes #2608, closes #2508)
+ Files: runtime/doc/insert.txt, src/edit.c, src/structs.h,
+ src/testdir/test_ins_complete.vim
+
+***************
+*** 23697,23703 ****
+ src/testdir/Make_all.mak, src/testdir/test_jumplist.vim
+
+ Patch 8.0.1498 (after 8.0.1497)
+! Problem: Getjumplist() returns duplicate entries. (lacygoill)
+ Solution: Call cleanup_jumplist(). (Yegappan Lakshmanan)
+ Files: src/evalfunc.c, src/mark.c, src/proto/mark.pro,
+ src/testdir/test_jumplist.vim
+--- 23722,23728 ----
+ src/testdir/Make_all.mak, src/testdir/test_jumplist.vim
+
+ Patch 8.0.1498 (after 8.0.1497)
+! Problem: getjumplist() returns duplicate entries. (lacygoill)
+ Solution: Call cleanup_jumplist(). (Yegappan Lakshmanan)
+ Files: src/evalfunc.c, src/mark.c, src/proto/mark.pro,
+ src/testdir/test_jumplist.vim
+***************
+*** 23817,23823 ****
+ Files: src/ex_docmd.c, src/testdir/test_eval_stuff.vim
+
+ Patch 8.0.1519
+! Problem: Getchangelist() does not use argument as bufname().
+ Solution: Use get_buf_tv(). (Yegappan Lakshmanan, closes #2641)
+ Files: src/evalfunc.c, src/testdir/test_changelist.vim
+
+--- 23842,23848 ----
+ Files: src/ex_docmd.c, src/testdir/test_eval_stuff.vim
+
+ Patch 8.0.1519
+! Problem: getchangelist() does not use argument as bufname().
+ Solution: Use get_buf_tv(). (Yegappan Lakshmanan, closes #2641)
+ Files: src/evalfunc.c, src/testdir/test_changelist.vim
+
+***************
+*** 24162,24169 ****
+
+ Patch 8.0.1573
+ Problem: getwinpos(1) may cause response to be handled as command.
+! Solution: Handle any cursor position report once one was request. (partly by
+! Hirohito Higashi)
+ Files: src/term.c
+
+ Patch 8.0.1574
+--- 24187,24194 ----
+
+ Patch 8.0.1573
+ Problem: getwinpos(1) may cause response to be handled as command.
+! Solution: Handle any cursor position report once one was requested. (partly
+! by Hirohito Higashi)
+ Files: src/term.c
+
+ Patch 8.0.1574
+***************
+*** 24644,24650 ****
+
+ Patch 8.0.1656
+ Problem: No option to have xxd produce upper case variable names.
+! Solution: Add the -C argument. (Matt Panaro closes #2772)
+ Files: src/xxd/xxd.c
+
+ Patch 8.0.1657
+--- 24669,24675 ----
+
+ Patch 8.0.1656
+ Problem: No option to have xxd produce upper case variable names.
+! Solution: Add the -C argument. (Matt Panaro, closes #2772)
+ Files: src/xxd/xxd.c
+
+ Patch 8.0.1657
+***************
+*** 25377,25383 ****
+ Patch 8.0.1782
+ Problem: No simple way to label quickfix entries.
+ Solution: Add the "module" item, to be used instead of the file name for
+! display purposes. (Martin Szamotulski, closes #1757)
+ Files: runtime/doc/eval.txt, runtime/doc/quickfix.txt, src/alloc.h,
+ src/quickfix.c, src/testdir/test_quickfix.vim
+
+--- 25402,25408 ----
+ Patch 8.0.1782
+ Problem: No simple way to label quickfix entries.
+ Solution: Add the "module" item, to be used instead of the file name for
+! display purposes. (Marcin Szamotulski, closes #1757)
+ Files: runtime/doc/eval.txt, runtime/doc/quickfix.txt, src/alloc.h,
+ src/quickfix.c, src/testdir/test_quickfix.vim
+
+***************
+*** 25767,25770 ****
+ Files: src/terminal.c
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 25792,25795 ----
+ Files: src/terminal.c
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/visual.txt 2018-05-17 13:42:04.000000000 +0200
+--- runtime/doc/visual.txt 2019-05-05 17:54:38.042310805 +0200
+***************
+*** 1,4 ****
+! *visual.txt* For Vim version 8.1. Last change: 2017 Sep 02
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *visual.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 20,27 ****
+ 7. Examples |visual-examples|
+ 8. Select mode |Select-mode|
+
+- {Vi has no Visual mode, the name "visual" is used for Normal mode, to
+- distinguish it from Ex mode}
+ {Since Vim 7.4.200 the |+visual| feature is always included}
+
+ ==============================================================================
+--- 20,25 ----
+***************
+*** 118,123 ****
+--- 116,123 ----
+ E.g., "dgn" deletes the text of the next match.
+ If Visual mode is active, extends the selection
+ until the end of the next match.
++ Note: Unlike `n` the search direction does not depend
++ on the previous search command.
+
+ *gN* *v_gN*
+ gN Like |gn| but searches backward, like with `N`.
+***************
+*** 305,312 ****
+ ==============================================================================
+ 5. Blockwise operators *blockwise-operators*
+
+- {not available when compiled without the |+visualextra| feature}
+-
+ Reminder: Use 'virtualedit' to be able to select blocks that start or end
+ after the end of a line or halfway a tab.
+
+--- 305,310 ----
+***************
+*** 538,541 ****
+ but starts Select mode instead of Visual mode.
+ Mnemonic: "get Highlighted".
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 536,539 ----
+ but starts Select mode instead of Visual mode.
+ Mnemonic: "get Highlighted".
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/windows.txt 2018-11-10 16:01:23.335381858 +0100
+--- runtime/doc/windows.txt 2019-05-05 17:35:08.452768616 +0200
+***************
+*** 1,4 ****
+! *windows.txt* For Vim version 8.1. Last change: 2018 Apr 24
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *windows.txt* For Vim version 8.1. Last change: 2019 May 05
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 26,32 ****
+ 11. Using hidden buffers |buffer-hidden|
+ 12. Special kinds of buffers |special-buffers|
+
+- {Vi does not have any of these commands}
+ {not able to use multiple windows when the |+windows| feature was disabled at
+ compile time}
+ {not able to use vertically split windows when the |+vertsplit| feature was
+--- 26,31 ----
+***************
+*** 737,743 ****
+ the current window.
+ {cmd} can contain '|' to concatenate several commands.
+ {cmd} must not open or close windows or reorder them.
+! {not in Vi}
+ Also see |:tabdo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|,
+ |:cfdo| and |:lfdo|
+
+--- 736,742 ----
+ the current window.
+ {cmd} can contain '|' to concatenate several commands.
+ {cmd} must not open or close windows or reorder them.
+!
+ Also see |:tabdo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|,
+ |:cfdo| and |:lfdo|
+
+***************
+*** 765,771 ****
+ autocommand event is disabled by adding it to
+ 'eventignore'. This considerably speeds up editing
+ each buffer.
+! {not in Vi}
+ Also see |:tabdo|, |:argdo|, |:windo|, |:cdo|, |:ldo|,
+ |:cfdo| and |:lfdo|
+
+--- 764,770 ----
+ autocommand event is disabled by adding it to
+ 'eventignore'. This considerably speeds up editing
+ each buffer.
+!
+ Also see |:tabdo|, |:argdo|, |:windo|, |:cdo|, |:ldo|,
+ |:cfdo| and |:lfdo|
+
+***************
+*** 842,847 ****
+--- 841,852 ----
+ {not available when the |+file_in_path| feature was disabled
+ at compile time}
+
++ CTRL-W gt *CTRL-W_gt*
++ Go to next tab page, same as `gt`.
++
++ CTRL-W gT *CTRL-W_gT*
++ Go to previous tab page, same as `gT`.
++
+ Also see |CTRL-W_CTRL-I|: open window for an included file that includes
+ the keyword under the cursor.
+
+***************
+*** 885,891 ****
+ *:pp* *:ppop*
+ :[count]pp[op][!]
+ Does ":[count]pop[!]" in the preview window. See |:pop| and
+! |:ptag|. {not in Vi}
+
+ CTRL-W } *CTRL-W_}*
+ Use identifier under cursor as a tag and perform a :ptag on
+--- 890,896 ----
+ *:pp* *:ppop*
+ :[count]pp[op][!]
+ Does ":[count]pop[!]" in the preview window. See |:pop| and
+! |:ptag|.
+
+ CTRL-W } *CTRL-W_}*
+ Use identifier under cursor as a tag and perform a :ptag on
+***************
+*** 1317,1320 ****
+ :setlocal nobuflisted
+ <
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1322,1325 ----
+ :setlocal nobuflisted
+ <
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1279/runtime/doc/tags 2018-06-03 14:42:17.836505122 +0200
+--- runtime/doc/tags 2019-05-05 18:01:26.608052504 +0200
+***************
+*** 991,1003 ****
+--- 991,1007 ----
+ 't_RF' term.txt /*'t_RF'*
+ 't_RI' term.txt /*'t_RI'*
+ 't_RS' term.txt /*'t_RS'*
++ 't_RT' term.txt /*'t_RT'*
+ 't_RV' term.txt /*'t_RV'*
++ 't_Ri' term.txt /*'t_Ri'*
+ 't_SC' term.txt /*'t_SC'*
+ 't_SH' term.txt /*'t_SH'*
+ 't_SI' term.txt /*'t_SI'*
+ 't_SR' term.txt /*'t_SR'*
++ 't_ST' term.txt /*'t_ST'*
+ 't_Sb' term.txt /*'t_Sb'*
+ 't_Sf' term.txt /*'t_Sf'*
++ 't_Si' term.txt /*'t_Si'*
+ 't_Te' term.txt /*'t_Te'*
+ 't_Ts' term.txt /*'t_Ts'*
+ 't_VS' term.txt /*'t_VS'*
+***************
+*** 1071,1076 ****
+--- 1075,1081 ----
+ 'tag' options.txt /*'tag'*
+ 'tagbsearch' options.txt /*'tagbsearch'*
+ 'tagcase' options.txt /*'tagcase'*
++ 'tagfunc' options.txt /*'tagfunc'*
+ 'taglength' options.txt /*'taglength'*
+ 'tagrelative' options.txt /*'tagrelative'*
+ 'tags' options.txt /*'tags'*
+***************
+*** 1091,1101 ****
+--- 1096,1108 ----
+ 'termwinkey' options.txt /*'termwinkey'*
+ 'termwinscroll' options.txt /*'termwinscroll'*
+ 'termwinsize' options.txt /*'termwinsize'*
++ 'termwintype' options.txt /*'termwintype'*
+ 'terse' options.txt /*'terse'*
+ 'textauto' options.txt /*'textauto'*
+ 'textmode' options.txt /*'textmode'*
+ 'textwidth' options.txt /*'textwidth'*
+ 'tf' options.txt /*'tf'*
++ 'tfu' options.txt /*'tfu'*
+ 'tgc' options.txt /*'tgc'*
+ 'tgst' options.txt /*'tgst'*
+ 'thesaurus' options.txt /*'thesaurus'*
+***************
+*** 1131,1136 ****
+--- 1138,1144 ----
+ 'twk' options.txt /*'twk'*
+ 'tws' options.txt /*'tws'*
+ 'twsl' options.txt /*'twsl'*
++ 'twt' options.txt /*'twt'*
+ 'tx' options.txt /*'tx'*
+ 'uc' options.txt /*'uc'*
+ 'udf' options.txt /*'udf'*
+***************
+*** 1144,1149 ****
+--- 1152,1159 ----
+ 'updatetime' options.txt /*'updatetime'*
+ 'ur' options.txt /*'ur'*
+ 'ut' options.txt /*'ut'*
++ 'varsofttabstop' options.txt /*'varsofttabstop'*
++ 'vartabstop' options.txt /*'vartabstop'*
+ 'vb' options.txt /*'vb'*
+ 'vbs' options.txt /*'vbs'*
+ 'vdir' options.txt /*'vdir'*
+***************
+*** 1160,1165 ****
+--- 1170,1177 ----
+ 'virtualedit' options.txt /*'virtualedit'*
+ 'visualbell' options.txt /*'visualbell'*
+ 'vop' options.txt /*'vop'*
++ 'vsts' options.txt /*'vsts'*
++ 'vts' options.txt /*'vts'*
+ 'w1200' vi_diff.txt /*'w1200'*
+ 'w300' vi_diff.txt /*'w300'*
+ 'w9600' vi_diff.txt /*'w9600'*
+***************
+*** 1348,1359 ****
+--- 1360,1373 ----
+ +terminfo various.txt /*+terminfo*
+ +termresponse various.txt /*+termresponse*
+ +textobjects various.txt /*+textobjects*
++ +textprop various.txt /*+textprop*
+ +tgetent various.txt /*+tgetent*
+ +timers various.txt /*+timers*
+ +title various.txt /*+title*
+ +toolbar various.txt /*+toolbar*
+ +unix eval.txt /*+unix*
+ +user_commands various.txt /*+user_commands*
++ +vartabs various.txt /*+vartabs*
+ +vertsplit various.txt /*+vertsplit*
+ +viminfo various.txt /*+viminfo*
+ +virtualedit various.txt /*+virtualedit*
+***************
+*** 1707,1712 ****
+--- 1721,1727 ----
+ 05.6 usr_05.txt /*05.6*
+ 05.7 usr_05.txt /*05.7*
+ 05.8 usr_05.txt /*05.8*
++ 05.9 usr_05.txt /*05.9*
+ 06.1 usr_06.txt /*06.1*
+ 06.2 usr_06.txt /*06.2*
+ 06.3 usr_06.txt /*06.3*
+***************
+*** 1923,1928 ****
+--- 1938,1945 ----
+ :<cfile> cmdline.txt /*:<cfile>*
+ :<cword> cmdline.txt /*:<cword>*
+ :<sfile> cmdline.txt /*:<sfile>*
++ :<sflnum> cmdline.txt /*:<sflnum>*
++ :<slnum> cmdline.txt /*:<slnum>*
+ := various.txt /*:=*
+ :> change.txt /*:>*
+ :? cmdline.txt /*:?*
+***************
+*** 1937,1942 ****
+--- 1954,1960 ----
+ :AdaTypes ft_ada.txt /*:AdaTypes*
+ :Arguments terminal.txt /*:Arguments*
+ :Break terminal.txt /*:Break*
++ :Cfilter quickfix.txt /*:Cfilter*
+ :Clear terminal.txt /*:Clear*
+ :CompilerSet usr_41.txt /*:CompilerSet*
+ :Continue terminal.txt /*:Continue*
+***************
+*** 1956,1961 ****
+--- 1974,1980 ----
+ :LPE pi_logipat.txt /*:LPE*
+ :LPF pi_logipat.txt /*:LPF*
+ :Lexplore pi_netrw.txt /*:Lexplore*
++ :Lfilter quickfix.txt /*:Lfilter*
+ :LogiPat pi_logipat.txt /*:LogiPat*
+ :Man filetype.txt /*:Man*
+ :MkVimball pi_vimball.txt /*:MkVimball*
+***************
+*** 2116,2132 ****
+--- 2135,2159 ----
+ :cabbrev map.txt /*:cabbrev*
+ :cabc map.txt /*:cabc*
+ :cabclear map.txt /*:cabclear*
++ :cabo quickfix.txt /*:cabo*
++ :cabove quickfix.txt /*:cabove*
+ :cad quickfix.txt /*:cad*
+ :caddbuffer quickfix.txt /*:caddbuffer*
+ :cadde quickfix.txt /*:cadde*
+ :caddexpr quickfix.txt /*:caddexpr*
+ :caddf quickfix.txt /*:caddf*
+ :caddfile quickfix.txt /*:caddfile*
++ :caf quickfix.txt /*:caf*
++ :cafter quickfix.txt /*:cafter*
+ :cal eval.txt /*:cal*
+ :call eval.txt /*:call*
+ :cat eval.txt /*:cat*
+ :catch eval.txt /*:catch*
+ :cb quickfix.txt /*:cb*
++ :cbe quickfix.txt /*:cbe*
++ :cbe quickfix.txt /*:cbe*
++ :cbefore quickfix.txt /*:cbefore*
++ :cbelow quickfix.txt /*:cbelow*
+ :cbo quickfix.txt /*:cbo*
+ :cbottom quickfix.txt /*:cbottom*
+ :cbuffer quickfix.txt /*:cbuffer*
+***************
+*** 2224,2229 ****
+--- 2251,2257 ----
+ :cp quickfix.txt /*:cp*
+ :cpf quickfix.txt /*:cpf*
+ :cpfile quickfix.txt /*:cpfile*
++ :cprev quickfix.txt /*:cprev*
+ :cprevious quickfix.txt /*:cprevious*
+ :cq quickfix.txt /*:cq*
+ :cquit quickfix.txt /*:cquit*
+***************
+*** 2473,2484 ****
+--- 2501,2516 ----
+ :lNf quickfix.txt /*:lNf*
+ :lNfile quickfix.txt /*:lNfile*
+ :la editing.txt /*:la*
++ :lab quickfix.txt /*:lab*
++ :labove quickfix.txt /*:labove*
+ :lad quickfix.txt /*:lad*
+ :laddb quickfix.txt /*:laddb*
+ :laddbuffer quickfix.txt /*:laddbuffer*
+ :laddexpr quickfix.txt /*:laddexpr*
+ :laddf quickfix.txt /*:laddf*
+ :laddfile quickfix.txt /*:laddfile*
++ :laf quickfix.txt /*:laf*
++ :lafter quickfix.txt /*:lafter*
+ :lan mlang.txt /*:lan*
+ :lang mlang.txt /*:lang*
+ :language mlang.txt /*:language*
+***************
+*** 2486,2491 ****
+--- 2518,2527 ----
+ :lat undo.txt /*:lat*
+ :later undo.txt /*:later*
+ :lb quickfix.txt /*:lb*
++ :lbef quickfix.txt /*:lbef*
++ :lbefore quickfix.txt /*:lbefore*
++ :lbel quickfix.txt /*:lbel*
++ :lbelow quickfix.txt /*:lbelow*
+ :lbo quickfix.txt /*:lbo*
+ :lbottom quickfix.txt /*:lbottom*
+ :lbuffer quickfix.txt /*:lbuffer*
+***************
+*** 2503,2508 ****
+--- 2539,2545 ----
+ :lefta windows.txt /*:lefta*
+ :leftabove windows.txt /*:leftabove*
+ :let eval.txt /*:let*
++ :let%= eval.txt /*:let%=*
+ :let+= eval.txt /*:let+=*
+ :let-$ eval.txt /*:let-$*
+ :let-& eval.txt /*:let-&*
+***************
+*** 2512,2518 ****
+--- 2549,2558 ----
+ :let-option eval.txt /*:let-option*
+ :let-register eval.txt /*:let-register*
+ :let-unpack eval.txt /*:let-unpack*
++ :let..= eval.txt /*:let..=*
+ :let.= eval.txt /*:let.=*
++ :let/= eval.txt /*:let\/=*
++ :letstar= eval.txt /*:letstar=*
+ :lex quickfix.txt /*:lex*
+ :lexpr quickfix.txt /*:lexpr*
+ :lf quickfix.txt /*:lf*
+***************
+*** 2570,2575 ****
+--- 2610,2616 ----
+ :lp quickfix.txt /*:lp*
+ :lpf quickfix.txt /*:lpf*
+ :lpfile quickfix.txt /*:lpfile*
++ :lprev quickfix.txt /*:lprev*
+ :lprevious quickfix.txt /*:lprevious*
+ :lr quickfix.txt /*:lr*
+ :lrewind quickfix.txt /*:lrewind*
+***************
+*** 2824,2829 ****
+--- 2865,2872 ----
+ :redraw various.txt /*:redraw*
+ :redraws various.txt /*:redraws*
+ :redrawstatus various.txt /*:redrawstatus*
++ :redrawt various.txt /*:redrawt*
++ :redrawtabline various.txt /*:redrawtabline*
+ :reg change.txt /*:reg*
+ :registers change.txt /*:registers*
+ :res windows.txt /*:res*
+***************
+*** 2863,2870 ****
+--- 2906,2922 ----
+ :sN windows.txt /*:sN*
+ :sNext windows.txt /*:sNext*
+ :s\= change.txt /*:s\\=*
++ :s_# change.txt /*:s_#*
++ :s_I change.txt /*:s_I*
+ :s_c change.txt /*:s_c*
++ :s_e change.txt /*:s_e*
+ :s_flags change.txt /*:s_flags*
++ :s_g change.txt /*:s_g*
++ :s_i change.txt /*:s_i*
++ :s_l change.txt /*:s_l*
++ :s_n change.txt /*:s_n*
++ :s_p change.txt /*:s_p*
++ :s_r change.txt /*:s_r*
+ :sa windows.txt /*:sa*
+ :sal windows.txt /*:sal*
+ :sall windows.txt /*:sall*
+***************
+*** 2899,2907 ****
+--- 2951,2962 ----
+ :scl change.txt /*:scl*
+ :scp change.txt /*:scp*
+ :scr repeat.txt /*:scr*
++ :script repeat.txt /*:script*
+ :scripte repeat.txt /*:scripte*
+ :scriptencoding repeat.txt /*:scriptencoding*
+ :scriptnames repeat.txt /*:scriptnames*
++ :scriptv repeat.txt /*:scriptv*
++ :scriptversion repeat.txt /*:scriptversion*
+ :scs if_cscop.txt /*:scs*
+ :scscope if_cscop.txt /*:scscope*
+ :se options.txt /*:se*
+***************
+*** 3148,3153 ****
+--- 3203,3211 ----
+ :tag tagsrch.txt /*:tag*
+ :tags tagsrch.txt /*:tags*
+ :tc if_tcl.txt /*:tc*
++ :tcd editing.txt /*:tcd*
++ :tch editing.txt /*:tch*
++ :tchdir editing.txt /*:tchdir*
+ :tcl if_tcl.txt /*:tcl*
+ :tcld if_tcl.txt /*:tcld*
+ :tcldo if_tcl.txt /*:tcldo*
+***************
+*** 3165,3170 ****
+--- 3223,3234 ----
+ :tjump tagsrch.txt /*:tjump*
+ :tl tagsrch.txt /*:tl*
+ :tlast tagsrch.txt /*:tlast*
++ :tlm gui.txt /*:tlm*
++ :tlmenu gui.txt /*:tlmenu*
++ :tln gui.txt /*:tln*
++ :tlnoremenu gui.txt /*:tlnoremenu*
++ :tlu gui.txt /*:tlu*
++ :tlunmenu gui.txt /*:tlunmenu*
+ :tm gui.txt /*:tm*
+ :tma map.txt /*:tma*
+ :tmap map.txt /*:tmap*
+***************
+*** 3285,3292 ****
+ :write_a editing.txt /*:write_a*
+ :write_c editing.txt /*:write_c*
+ :write_f editing.txt /*:write_f*
+- :ws workshop.txt /*:ws*
+- :wsverb workshop.txt /*:wsverb*
+ :wundo undo.txt /*:wundo*
+ :wv starting.txt /*:wv*
+ :wviminfo starting.txt /*:wviminfo*
+--- 3349,3354 ----
+***************
+*** 3453,3462 ****
+--- 3515,3526 ----
+ <bang> map.txt /*<bang>*
+ <buffer=N> autocmd.txt /*<buffer=N>*
+ <buffer=abuf> autocmd.txt /*<buffer=abuf>*
++ <cWORD> cmdline.txt /*<cWORD>*
+ <cexpr> cmdline.txt /*<cexpr>*
+ <cfile> cmdline.txt /*<cfile>*
+ <character> intro.txt /*<character>*
+ <count> map.txt /*<count>*
++ <cword> cmdline.txt /*<cword>*
+ <f-args> map.txt /*<f-args>*
+ <k0> term.txt /*<k0>*
+ <k1> term.txt /*<k1>*
+***************
+*** 3488,3493 ****
+--- 3552,3558 ----
+ <reg> map.txt /*<reg>*
+ <register> map.txt /*<register>*
+ <sfile> cmdline.txt /*<sfile>*
++ <sflnum> cmdline.txt /*<sflnum>*
+ <slnum> cmdline.txt /*<slnum>*
+ <xCSI> intro.txt /*<xCSI>*
+ <xDown> term.txt /*<xDown>*
+***************
+*** 3543,3548 ****
+--- 3608,3616 ----
+ B motion.txt /*B*
+ BeBox os_beos.txt /*BeBox*
+ BeOS os_beos.txt /*BeOS*
++ Blob eval.txt /*Blob*
++ Blobs eval.txt /*Blobs*
++ Boolean eval.txt /*Boolean*
+ Bram intro.txt /*Bram*
+ BufAdd autocmd.txt /*BufAdd*
+ BufCreate autocmd.txt /*BufCreate*
+***************
+*** 3601,3607 ****
+ CTRL-W index.txt /*CTRL-W*
+ CTRL-W_+ windows.txt /*CTRL-W_+*
+ CTRL-W_- windows.txt /*CTRL-W_-*
+- CTRL-W_. terminal.txt /*CTRL-W_.*
+ CTRL-W_: windows.txt /*CTRL-W_:*
+ CTRL-W_< windows.txt /*CTRL-W_<*
+ CTRL-W_<BS> windows.txt /*CTRL-W_<BS>*
+--- 3669,3674 ----
+***************
+*** 3641,3647 ****
+ CTRL-W_J windows.txt /*CTRL-W_J*
+ CTRL-W_K windows.txt /*CTRL-W_K*
+ CTRL-W_L windows.txt /*CTRL-W_L*
+- CTRL-W_N terminal.txt /*CTRL-W_N*
+ CTRL-W_P windows.txt /*CTRL-W_P*
+ CTRL-W_R windows.txt /*CTRL-W_R*
+ CTRL-W_S windows.txt /*CTRL-W_S*
+--- 3708,3713 ----
+***************
+*** 3656,3664 ****
+--- 3722,3732 ----
+ CTRL-W_d tagsrch.txt /*CTRL-W_d*
+ CTRL-W_f windows.txt /*CTRL-W_f*
+ CTRL-W_gF windows.txt /*CTRL-W_gF*
++ CTRL-W_gT windows.txt /*CTRL-W_gT*
+ CTRL-W_g] windows.txt /*CTRL-W_g]*
+ CTRL-W_g_CTRL-] windows.txt /*CTRL-W_g_CTRL-]*
+ CTRL-W_gf windows.txt /*CTRL-W_gf*
++ CTRL-W_gt windows.txt /*CTRL-W_gt*
+ CTRL-W_g} windows.txt /*CTRL-W_g}*
+ CTRL-W_h windows.txt /*CTRL-W_h*
+ CTRL-W_i tagsrch.txt /*CTRL-W_i*
+***************
+*** 3669,3675 ****
+ CTRL-W_o windows.txt /*CTRL-W_o*
+ CTRL-W_p windows.txt /*CTRL-W_p*
+ CTRL-W_q windows.txt /*CTRL-W_q*
+- CTRL-W_quote terminal.txt /*CTRL-W_quote*
+ CTRL-W_r windows.txt /*CTRL-W_r*
+ CTRL-W_s windows.txt /*CTRL-W_s*
+ CTRL-W_t windows.txt /*CTRL-W_t*
+--- 3737,3742 ----
+***************
+*** 3702,3708 ****
+--- 3769,3777 ----
+ ColorSchemePre autocmd.txt /*ColorSchemePre*
+ Command-line cmdline.txt /*Command-line*
+ Command-line-mode cmdline.txt /*Command-line-mode*
++ CompleteChanged autocmd.txt /*CompleteChanged*
+ CompleteDone autocmd.txt /*CompleteDone*
++ ConPTY terminal.txt /*ConPTY*
+ Contents quickref.txt /*Contents*
+ Cscope if_cscop.txt /*Cscope*
+ CursorHold autocmd.txt /*CursorHold*
+***************
+*** 3715,3723 ****
+--- 3784,3794 ----
+ DOS os_dos.txt /*DOS*
+ DOS-format editing.txt /*DOS-format*
+ DOS-format-write editing.txt /*DOS-format-write*
++ Dict eval.txt /*Dict*
+ Dictionaries eval.txt /*Dictionaries*
+ Dictionary eval.txt /*Dictionary*
+ Dictionary-function eval.txt /*Dictionary-function*
++ DiffUpdated autocmd.txt /*DiffUpdated*
+ Digraphs digraph.txt /*Digraphs*
+ DirChanged autocmd.txt /*DirChanged*
+ E motion.txt /*E*
+***************
+*** 3868,3874 ****
+ E233 gui.txt /*E233*
+ E234 options.txt /*E234*
+ E235 options.txt /*E235*
+! E236 options.txt /*E236*
+ E237 print.txt /*E237*
+ E238 print.txt /*E238*
+ E239 sign.txt /*E239*
+--- 3939,3945 ----
+ E233 gui.txt /*E233*
+ E234 options.txt /*E234*
+ E235 options.txt /*E235*
+! E236 gui.txt /*E236*
+ E237 print.txt /*E237*
+ E238 print.txt /*E238*
+ E239 sign.txt /*E239*
+***************
+*** 3876,3883 ****
+ E240 remote.txt /*E240*
+ E241 eval.txt /*E241*
+ E243 if_ole.txt /*E243*
+! E244 options.txt /*E244*
+! E245 options.txt /*E245*
+ E246 autocmd.txt /*E246*
+ E247 remote.txt /*E247*
+ E248 remote.txt /*E248*
+--- 3947,3954 ----
+ E240 remote.txt /*E240*
+ E241 eval.txt /*E241*
+ E243 if_ole.txt /*E243*
+! E244 gui.txt /*E244*
+! E245 gui.txt /*E245*
+ E246 autocmd.txt /*E246*
+ E247 remote.txt /*E247*
+ E248 remote.txt /*E248*
+***************
+*** 4094,4100 ****
+ E458 message.txt /*E458*
+ E459 message.txt /*E459*
+ E46 message.txt /*E46*
+- E460 message.txt /*E460*
+ E461 eval.txt /*E461*
+ E462 editing.txt /*E462*
+ E463 netbeans.txt /*E463*
+--- 4165,4170 ----
+***************
+*** 4553,4559 ****
+--- 4623,4632 ----
+ E893 eval.txt /*E893*
+ E894 eval.txt /*E894*
+ E895 if_mzsch.txt /*E895*
++ E896 eval.txt /*E896*
++ E897 eval.txt /*E897*
+ E898 channel.txt /*E898*
++ E899 eval.txt /*E899*
+ E90 message.txt /*E90*
+ E901 channel.txt /*E901*
+ E902 channel.txt /*E902*
+***************
+*** 4615,4624 ****
+--- 4688,4730 ----
+ E953 eval.txt /*E953*
+ E954 options.txt /*E954*
+ E955 eval.txt /*E955*
++ E956 pattern.txt /*E956*
++ E957 eval.txt /*E957*
++ E958 eval.txt /*E958*
+ E96 diff.txt /*E96*
++ E960 options.txt /*E960*
++ E961 cmdline.txt /*E961*
++ E962 eval.txt /*E962*
++ E963 eval.txt /*E963*
++ E964 eval.txt /*E964*
++ E965 eval.txt /*E965*
++ E966 eval.txt /*E966*
++ E967 textprop.txt /*E967*
++ E968 eval.txt /*E968*
++ E969 eval.txt /*E969*
+ E97 diff.txt /*E97*
++ E970 eval.txt /*E970*
++ E971 textprop.txt /*E971*
++ E972 eval.txt /*E972*
++ E973 eval.txt /*E973*
++ E974 eval.txt /*E974*
++ E975 eval.txt /*E975*
++ E976 eval.txt /*E976*
++ E977 eval.txt /*E977*
++ E978 eval.txt /*E978*
++ E979 eval.txt /*E979*
+ E98 diff.txt /*E98*
++ E980 eval.txt /*E980*
++ E981 starting.txt /*E981*
++ E982 terminal.txt /*E982*
++ E983 message.txt /*E983*
++ E984 repeat.txt /*E984*
++ E985 eval.txt /*E985*
++ E986 tagsrch.txt /*E986*
++ E987 tagsrch.txt /*E987*
++ E988 gui_w32.txt /*E988*
+ E99 diff.txt /*E99*
++ E999 repeat.txt /*E999*
+ EX intro.txt /*EX*
+ EXINIT starting.txt /*EXINIT*
+ Elvis intro.txt /*Elvis*
+***************
+*** 4721,4728 ****
+--- 4827,4837 ----
+ N<Del> various.txt /*N<Del>*
+ NFA pattern.txt /*NFA*
+ NL-used-for-Nul pattern.txt /*NL-used-for-Nul*
++ Neovim intro.txt /*Neovim*
+ NetBSD-backspace options.txt /*NetBSD-backspace*
++ NetBeans netbeans.txt /*NetBeans*
+ NetUserPass() pi_netrw.txt /*NetUserPass()*
++ None eval.txt /*None*
+ Normal intro.txt /*Normal*
+ Normal-mode intro.txt /*Normal-mode*
+ Number eval.txt /*Number*
+***************
+*** 4830,4835 ****
+--- 4939,4945 ----
+ ShellCmdPost autocmd.txt /*ShellCmdPost*
+ ShellFilterPost autocmd.txt /*ShellFilterPost*
+ SourceCmd autocmd.txt /*SourceCmd*
++ SourcePost autocmd.txt /*SourcePost*
+ SourcePre autocmd.txt /*SourcePre*
+ Special eval.txt /*Special*
+ SpellFileMissing autocmd.txt /*SpellFileMissing*
+***************
+*** 4942,4948 ****
+--- 5052,5061 ----
+ [:cntrl:] pattern.txt /*[:cntrl:]*
+ [:digit:] pattern.txt /*[:digit:]*
+ [:escape:] pattern.txt /*[:escape:]*
++ [:fname:] pattern.txt /*[:fname:]*
+ [:graph:] pattern.txt /*[:graph:]*
++ [:ident:] pattern.txt /*[:ident:]*
++ [:keyword:] pattern.txt /*[:keyword:]*
+ [:lower:] pattern.txt /*[:lower:]*
+ [:print:] pattern.txt /*[:print:]*
+ [:punct:] pattern.txt /*[:punct:]*
+***************
+*** 5107,5112 ****
+--- 5220,5226 ----
+ ap motion.txt /*ap*
+ apache.vim syntax.txt /*apache.vim*
+ append() eval.txt /*append()*
++ appendbufline() eval.txt /*appendbufline()*
+ aquote motion.txt /*aquote*
+ arabic.txt arabic.txt /*arabic.txt*
+ arabicfonts arabic.txt /*arabicfonts*
+***************
+*** 5160,5165 ****
+--- 5274,5280 ----
+ autocmd-intro autocmd.txt /*autocmd-intro*
+ autocmd-list autocmd.txt /*autocmd-list*
+ autocmd-nested autocmd.txt /*autocmd-nested*
++ autocmd-once autocmd.txt /*autocmd-once*
+ autocmd-osfiletypes filetype.txt /*autocmd-osfiletypes*
+ autocmd-patterns autocmd.txt /*autocmd-patterns*
+ autocmd-remove autocmd.txt /*autocmd-remove*
+***************
+*** 5170,5175 ****
+--- 5285,5291 ----
+ autocommand autocmd.txt /*autocommand*
+ autocommand-events autocmd.txt /*autocommand-events*
+ autocommand-pattern autocmd.txt /*autocommand-pattern*
++ autocommands autocmd.txt /*autocommands*
+ autoformat change.txt /*autoformat*
+ autoload eval.txt /*autoload*
+ autoload-functions eval.txt /*autoload-functions*
+***************
+*** 5230,5235 ****
+--- 5346,5356 ----
+ beval_winnr-variable eval.txt /*beval_winnr-variable*
+ binary-number eval.txt /*binary-number*
+ bitwise-function usr_41.txt /*bitwise-function*
++ blob eval.txt /*blob*
++ blob-identity eval.txt /*blob-identity*
++ blob-index eval.txt /*blob-index*
++ blob-literal eval.txt /*blob-literal*
++ blob-modification eval.txt /*blob-modification*
+ blockwise-examples visual.txt /*blockwise-examples*
+ blockwise-operators visual.txt /*blockwise-operators*
+ blockwise-register change.txt /*blockwise-register*
+***************
+*** 5240,5245 ****
+--- 5361,5367 ----
+ bom-bytes mbyte.txt /*bom-bytes*
+ book intro.txt /*book*
+ bookmark usr_03.txt /*bookmark*
++ books intro.txt /*books*
+ boolean options.txt /*boolean*
+ break-finally eval.txt /*break-finally*
+ browse() eval.txt /*browse()*
+***************
+*** 5395,5400 ****
+--- 5517,5523 ----
+ catch-text eval.txt /*catch-text*
+ cc change.txt /*cc*
+ ceil() eval.txt /*ceil()*
++ cfilter-plugin quickfix.txt /*cfilter-plugin*
+ ch.vim syntax.txt /*ch.vim*
+ ch_canread() eval.txt /*ch_canread()*
+ ch_close() eval.txt /*ch_close()*
+***************
+*** 5408,5413 ****
+--- 5531,5537 ----
+ ch_logfile() eval.txt /*ch_logfile()*
+ ch_open() eval.txt /*ch_open()*
+ ch_read() eval.txt /*ch_read()*
++ ch_readblob() eval.txt /*ch_readblob()*
+ ch_readraw() eval.txt /*ch_readraw()*
+ ch_sendexpr() eval.txt /*ch_sendexpr()*
+ ch_sendraw() eval.txt /*ch_sendraw()*
+***************
+*** 5449,5454 ****
+--- 5573,5579 ----
+ channel-functions usr_41.txt /*channel-functions*
+ channel-mode channel.txt /*channel-mode*
+ channel-more channel.txt /*channel-more*
++ channel-noblock channel.txt /*channel-noblock*
+ channel-open channel.txt /*channel-open*
+ channel-open-options channel.txt /*channel-open-options*
+ channel-raw channel.txt /*channel-raw*
+***************
+*** 5585,5590 ****
+--- 5710,5717 ----
+ complete_CTRL-Y insert.txt /*complete_CTRL-Y*
+ complete_add() eval.txt /*complete_add()*
+ complete_check() eval.txt /*complete_check()*
++ complete_info() eval.txt /*complete_info()*
++ complete_info_mode eval.txt /*complete_info_mode*
+ completed_item-variable eval.txt /*completed_item-variable*
+ completion-functions usr_41.txt /*completion-functions*
+ complex-change change.txt /*complex-change*
+***************
+*** 5756,5761 ****
+--- 5883,5889 ----
+ debug-win32 debug.txt /*debug-win32*
+ debug-windbg debug.txt /*debug-windbg*
+ debug.txt debug.txt /*debug.txt*
++ debugbreak() eval.txt /*debugbreak()*
+ debugger-compilation debugger.txt /*debugger-compilation*
+ debugger-features debugger.txt /*debugger-features*
+ debugger-integration debugger.txt /*debugger-integration*
+***************
+*** 5765,5775 ****
+--- 5893,5905 ----
+ decada_members ft_ada.txt /*decada_members*
+ deepcopy() eval.txt /*deepcopy()*
+ defaults.vim starting.txt /*defaults.vim*
++ defaults.vim-explained usr_05.txt /*defaults.vim-explained*
+ definition-search tagsrch.txt /*definition-search*
+ definitions intro.txt /*definitions*
+ delete() eval.txt /*delete()*
+ delete-insert change.txt /*delete-insert*
+ delete-menus gui.txt /*delete-menus*
++ deletebufline() eval.txt /*deletebufline()*
+ deleting change.txt /*deleting*
+ demoserver.py channel.txt /*demoserver.py*
+ design-assumptions develop.txt /*design-assumptions*
+***************
+*** 5974,5979 ****
+--- 6104,6110 ----
+ expr-+ eval.txt /*expr-+*
+ expr-- eval.txt /*expr--*
+ expr-. eval.txt /*expr-.*
++ expr-.. eval.txt /*expr-..*
+ expr-/ eval.txt /*expr-\/*
+ expr-< eval.txt /*expr-<*
+ expr-<# eval.txt /*expr-<#*
+***************
+*** 6037,6043 ****
+ false-variable eval.txt /*false-variable*
+ faq intro.txt /*faq*
+ farsi farsi.txt /*farsi*
+- farsi-fonts farsi.txt /*farsi-fonts*
+ farsi.txt farsi.txt /*farsi.txt*
+ fasm.vim syntax.txt /*fasm.vim*
+ fcs_choice-variable eval.txt /*fcs_choice-variable*
+--- 6168,6173 ----
+***************
+*** 6137,6142 ****
+--- 6267,6273 ----
+ foldtextresult() eval.txt /*foldtextresult()*
+ font-sizes gui_x11.txt /*font-sizes*
+ fontset mbyte.txt /*fontset*
++ forced-motion motion.txt /*forced-motion*
+ foreground() eval.txt /*foreground()*
+ fork os_unix.txt /*fork*
+ form.vim syntax.txt /*form.vim*
+***************
+*** 6255,6262 ****
+--- 6386,6399 ----
+ ft-python-syntax syntax.txt /*ft-python-syntax*
+ ft-quake-syntax syntax.txt /*ft-quake-syntax*
+ ft-r-indent indent.txt /*ft-r-indent*
++ ft-r-syntax syntax.txt /*ft-r-syntax*
+ ft-readline-syntax syntax.txt /*ft-readline-syntax*
+ ft-rexx-syntax syntax.txt /*ft-rexx-syntax*
++ ft-rmd-plugin filetype.txt /*ft-rmd-plugin*
++ ft-rmd-syntax syntax.txt /*ft-rmd-syntax*
++ ft-rrst-plugin filetype.txt /*ft-rrst-plugin*
++ ft-rrst-syntax syntax.txt /*ft-rrst-syntax*
++ ft-rst-plugin filetype.txt /*ft-rst-plugin*
+ ft-rst-syntax syntax.txt /*ft-rst-syntax*
+ ft-ruby-omni insert.txt /*ft-ruby-omni*
+ ft-ruby-syntax syntax.txt /*ft-ruby-syntax*
+***************
+*** 6644,6649 ****
+--- 6781,6787 ----
+ gettabinfo() eval.txt /*gettabinfo()*
+ gettabvar() eval.txt /*gettabvar()*
+ gettabwinvar() eval.txt /*gettabwinvar()*
++ gettagstack() eval.txt /*gettagstack()*
+ getwininfo() eval.txt /*getwininfo()*
+ getwinpos() eval.txt /*getwinpos()*
+ getwinposx() eval.txt /*getwinposx()*
+***************
+*** 6710,6715 ****
+--- 6848,6855 ----
+ gui-clipboard gui_w32.txt /*gui-clipboard*
+ gui-colors syntax.txt /*gui-colors*
+ gui-extras gui.txt /*gui-extras*
++ gui-font gui.txt /*gui-font*
++ gui-fontwide gui.txt /*gui-fontwide*
+ gui-footer debugger.txt /*gui-footer*
+ gui-fork gui_x11.txt /*gui-fork*
+ gui-functions usr_41.txt /*gui-functions*
+***************
+*** 6761,6769 ****
+ gui.txt gui.txt /*gui.txt*
+ gui_w32.txt gui_w32.txt /*gui_w32.txt*
+ gui_x11.txt gui_x11.txt /*gui_x11.txt*
+! guifontwide_gtk options.txt /*guifontwide_gtk*
+! guifontwide_win_mbyte options.txt /*guifontwide_win_mbyte*
+! guioptions_a options.txt /*guioptions_a*
+ guu change.txt /*guu*
+ gv visual.txt /*gv*
+ gview starting.txt /*gview*
+--- 6901,6908 ----
+ gui.txt gui.txt /*gui.txt*
+ gui_w32.txt gui_w32.txt /*gui_w32.txt*
+ gui_x11.txt gui_x11.txt /*gui_x11.txt*
+! guifontwide_gtk gui.txt /*guifontwide_gtk*
+! guifontwide_win_mbyte gui.txt /*guifontwide_win_mbyte*
+ guu change.txt /*guu*
+ gv visual.txt /*gv*
+ gview starting.txt /*gview*
+***************
+*** 7137,7142 ****
+--- 7276,7282 ----
+ iquote motion.txt /*iquote*
+ is motion.txt /*is*
+ isdirectory() eval.txt /*isdirectory()*
++ isinf() eval.txt /*isinf()*
+ islocked() eval.txt /*islocked()*
+ isnan() eval.txt /*isnan()*
+ it motion.txt /*it*
+***************
+*** 7162,7167 ****
+--- 7302,7308 ----
+ job-exit_cb channel.txt /*job-exit_cb*
+ job-functions usr_41.txt /*job-functions*
+ job-in_io channel.txt /*job-in_io*
++ job-noblock channel.txt /*job-noblock*
+ job-options channel.txt /*job-options*
+ job-out_cb channel.txt /*job-out_cb*
+ job-out_io channel.txt /*job-out_io*
+***************
+*** 7223,7229 ****
+ lang-variable eval.txt /*lang-variable*
+ language-mapping map.txt /*language-mapping*
+ last-pattern pattern.txt /*last-pattern*
+! last-position-jump eval.txt /*last-position-jump*
+ last_buffer_nr() eval.txt /*last_buffer_nr()*
+ latex-syntax syntax.txt /*latex-syntax*
+ lc_time-variable eval.txt /*lc_time-variable*
+--- 7364,7370 ----
+ lang-variable eval.txt /*lang-variable*
+ language-mapping map.txt /*language-mapping*
+ last-pattern pattern.txt /*last-pattern*
+! last-position-jump usr_05.txt /*last-position-jump*
+ last_buffer_nr() eval.txt /*last_buffer_nr()*
+ latex-syntax syntax.txt /*latex-syntax*
+ lc_time-variable eval.txt /*lc_time-variable*
+***************
+*** 7249,7254 ****
+--- 7390,7396 ----
+ limits vi_diff.txt /*limits*
+ line() eval.txt /*line()*
+ line-continuation repeat.txt /*line-continuation*
++ line-continuation-comment repeat.txt /*line-continuation-comment*
+ line2byte() eval.txt /*line2byte()*
+ linefeed intro.txt /*linefeed*
+ linewise motion.txt /*linewise*
+***************
+*** 7262,7267 ****
+--- 7404,7410 ----
+ list-index eval.txt /*list-index*
+ list-modification eval.txt /*list-modification*
+ list-repeat windows.txt /*list-repeat*
++ list2str() eval.txt /*list2str()*
+ lite.vim syntax.txt /*lite.vim*
+ literal-string eval.txt /*literal-string*
+ lnum-variable eval.txt /*lnum-variable*
+***************
+*** 7277,7282 ****
+--- 7420,7426 ----
+ locale-name mbyte.txt /*locale-name*
+ localtime() eval.txt /*localtime()*
+ location-list quickfix.txt /*location-list*
++ location-list-file-window quickfix.txt /*location-list-file-window*
+ location-list-window quickfix.txt /*location-list-window*
+ log() eval.txt /*log()*
+ log10() eval.txt /*log10()*
+***************
+*** 7297,7302 ****
+--- 7441,7447 ----
+ lowercase change.txt /*lowercase*
+ lpc.vim syntax.txt /*lpc.vim*
+ lua if_lua.txt /*lua*
++ lua-blob if_lua.txt /*lua-blob*
+ lua-buffer if_lua.txt /*lua-buffer*
+ lua-commands if_lua.txt /*lua-commands*
+ lua-dict if_lua.txt /*lua-dict*
+***************
+*** 7522,7527 ****
+--- 7667,7673 ----
+ netbeans-run netbeans.txt /*netbeans-run*
+ netbeans-setup netbeans.txt /*netbeans-setup*
+ netbeans-support netbeans.txt /*netbeans-support*
++ netbeans-xpm netbeans.txt /*netbeans-xpm*
+ netbeans.txt netbeans.txt /*netbeans.txt*
+ netreadfixup pi_netrw.txt /*netreadfixup*
+ netrw pi_netrw.txt /*netrw*
+***************
+*** 7888,7893 ****
+--- 8034,8040 ----
+ online-help helphelp.txt /*online-help*
+ opening-window windows.txt /*opening-window*
+ operator motion.txt /*operator*
++ operator-pending-index index.txt /*operator-pending-index*
+ operator-variable eval.txt /*operator-variable*
+ option-backslash options.txt /*option-backslash*
+ option-list quickref.txt /*option-list*
+***************
+*** 7955,7960 ****
+--- 8102,8108 ----
+ penc-option print.txt /*penc-option*
+ perl if_perl.txt /*perl*
+ perl-Append if_perl.txt /*perl-Append*
++ perl-Blob if_perl.txt /*perl-Blob*
+ perl-Buffer if_perl.txt /*perl-Buffer*
+ perl-Buffers if_perl.txt /*perl-Buffers*
+ perl-Count if_perl.txt /*perl-Count*
+***************
+*** 8061,8068 ****
+--- 8209,8228 ----
+ progress.vim syntax.txt /*progress.vim*
+ prompt-buffer channel.txt /*prompt-buffer*
+ prompt_setcallback() eval.txt /*prompt_setcallback()*
++ prompt_setinterrupt() eval.txt /*prompt_setinterrupt()*
+ prompt_setprompt() eval.txt /*prompt_setprompt()*
++ promptbuffer-functions usr_41.txt /*promptbuffer-functions*
+ pronounce intro.txt /*pronounce*
++ prop_add() eval.txt /*prop_add()*
++ prop_clear() eval.txt /*prop_clear()*
++ prop_find() eval.txt /*prop_find()*
++ prop_list() eval.txt /*prop_list()*
++ prop_remove() eval.txt /*prop_remove()*
++ prop_type_add() eval.txt /*prop_type_add()*
++ prop_type_change() eval.txt /*prop_type_change()*
++ prop_type_delete() eval.txt /*prop_type_delete()*
++ prop_type_get() eval.txt /*prop_type_get()*
++ prop_type_list() eval.txt /*prop_type_list()*
+ psql ft_sql.txt /*psql*
+ ptcap.vim syntax.txt /*ptcap.vim*
+ pterm-mouse options.txt /*pterm-mouse*
+***************
+*** 8131,8142 ****
+--- 8291,8304 ----
+ quickfix quickfix.txt /*quickfix*
+ quickfix-6 version6.txt /*quickfix-6*
+ quickfix-ID quickfix.txt /*quickfix-ID*
++ quickfix-buffer quickfix.txt /*quickfix-buffer*
+ quickfix-changedtick quickfix.txt /*quickfix-changedtick*
+ quickfix-context quickfix.txt /*quickfix-context*
+ quickfix-directory-stack quickfix.txt /*quickfix-directory-stack*
+ quickfix-error-lists quickfix.txt /*quickfix-error-lists*
+ quickfix-functions usr_41.txt /*quickfix-functions*
+ quickfix-gcc quickfix.txt /*quickfix-gcc*
++ quickfix-index quickfix.txt /*quickfix-index*
+ quickfix-manx quickfix.txt /*quickfix-manx*
+ quickfix-parse quickfix.txt /*quickfix-parse*
+ quickfix-perl quickfix.txt /*quickfix-perl*
+***************
+*** 8184,8189 ****
+--- 8346,8352 ----
+ quotestar gui.txt /*quotestar*
+ quote~ change.txt /*quote~*
+ r change.txt /*r*
++ r.vim syntax.txt /*r.vim*
+ range() eval.txt /*range()*
+ raw-terminal-mode term.txt /*raw-terminal-mode*
+ rcp pi_netrw.txt /*rcp*
+***************
+*** 8191,8196 ****
+--- 8354,8360 ----
+ read-messages insert.txt /*read-messages*
+ read-only-share editing.txt /*read-only-share*
+ read-stdin version5.txt /*read-stdin*
++ readdir() eval.txt /*readdir()*
+ readfile() eval.txt /*readfile()*
+ readline.vim syntax.txt /*readline.vim*
+ recording repeat.txt /*recording*
+***************
+*** 8248,8258 ****
+--- 8412,8425 ----
+ rileft rileft.txt /*rileft*
+ rileft.txt rileft.txt /*rileft.txt*
+ riscos os_risc.txt /*riscos*
++ rmd.vim syntax.txt /*rmd.vim*
+ rot13 change.txt /*rot13*
+ round() eval.txt /*round()*
++ rrst.vim syntax.txt /*rrst.vim*
+ rst.vim syntax.txt /*rst.vim*
+ rsync pi_netrw.txt /*rsync*
+ ruby if_ruby.txt /*ruby*
++ ruby-blob if_ruby.txt /*ruby-blob*
+ ruby-buffer if_ruby.txt /*ruby-buffer*
+ ruby-command if_ruby.txt /*ruby-command*
+ ruby-commands if_ruby.txt /*ruby-commands*
+***************
+*** 8260,8265 ****
+--- 8427,8433 ----
+ ruby-evaluate if_ruby.txt /*ruby-evaluate*
+ ruby-globals if_ruby.txt /*ruby-globals*
+ ruby-message if_ruby.txt /*ruby-message*
++ ruby-rubyeval if_ruby.txt /*ruby-rubyeval*
+ ruby-set_option if_ruby.txt /*ruby-set_option*
+ ruby-vim if_ruby.txt /*ruby-vim*
+ ruby-window if_ruby.txt /*ruby-window*
+***************
+*** 8271,8276 ****
+--- 8439,8445 ----
+ ruby_operators syntax.txt /*ruby_operators*
+ ruby_space_errors syntax.txt /*ruby_space_errors*
+ ruby_spellcheck_strings syntax.txt /*ruby_spellcheck_strings*
++ rubyeval() eval.txt /*rubyeval()*
+ russian russian.txt /*russian*
+ russian-intro russian.txt /*russian-intro*
+ russian-issues russian.txt /*russian-issues*
+***************
+*** 8319,8332 ****
+--- 8488,8504 ----
+ scp pi_netrw.txt /*scp*
+ screenattr() eval.txt /*screenattr()*
+ screenchar() eval.txt /*screenchar()*
++ screenchars() eval.txt /*screenchars()*
+ screencol() eval.txt /*screencol()*
+ screenrow() eval.txt /*screenrow()*
++ screenstring() eval.txt /*screenstring()*
+ script usr_41.txt /*script*
+ script-here if_perl.txt /*script-here*
+ script-local map.txt /*script-local*
+ script-variable eval.txt /*script-variable*
+ scriptnames-dictionary eval.txt /*scriptnames-dictionary*
+ scriptout-changed version4.txt /*scriptout-changed*
++ scriptversion eval.txt /*scriptversion*
+ scroll-binding scroll.txt /*scroll-binding*
+ scroll-cursor scroll.txt /*scroll-cursor*
+ scroll-down scroll.txt /*scroll-down*
+***************
+*** 8382,8387 ****
+--- 8554,8560 ----
+ setreg() eval.txt /*setreg()*
+ settabvar() eval.txt /*settabvar()*
+ settabwinvar() eval.txt /*settabwinvar()*
++ settagstack() eval.txt /*settagstack()*
+ setting-guifont gui.txt /*setting-guifont*
+ setting-guitablabel tabpage.txt /*setting-guitablabel*
+ setting-tabline tabpage.txt /*setting-tabline*
+***************
+*** 8402,8411 ****
+--- 8575,8596 ----
+ shiftwidth() eval.txt /*shiftwidth()*
+ short-name-changed version4.txt /*short-name-changed*
+ showing-menus gui.txt /*showing-menus*
++ sign-column sign.txt /*sign-column*
+ sign-commands sign.txt /*sign-commands*
++ sign-functions usr_41.txt /*sign-functions*
++ sign-group sign.txt /*sign-group*
++ sign-identifier sign.txt /*sign-identifier*
+ sign-intro sign.txt /*sign-intro*
++ sign-priority sign.txt /*sign-priority*
+ sign-support sign.txt /*sign-support*
+ sign.txt sign.txt /*sign.txt*
++ sign_define() eval.txt /*sign_define()*
++ sign_getdefined() eval.txt /*sign_getdefined()*
++ sign_getplaced() eval.txt /*sign_getplaced()*
++ sign_jump() eval.txt /*sign_jump()*
++ sign_place() eval.txt /*sign_place()*
++ sign_undefine() eval.txt /*sign_undefine()*
++ sign_unplace() eval.txt /*sign_unplace()*
+ signs sign.txt /*signs*
+ simple-change change.txt /*simple-change*
+ simplify() eval.txt /*simplify()*
+***************
+*** 8442,8447 ****
+--- 8627,8633 ----
+ spell-CHECKCOMPOUNDPATTERN spell.txt /*spell-CHECKCOMPOUNDPATTERN*
+ spell-CHECKCOMPOUNDREP spell.txt /*spell-CHECKCOMPOUNDREP*
+ spell-CHECKCOMPOUNDTRIPLE spell.txt /*spell-CHECKCOMPOUNDTRIPLE*
++ spell-CHECKSHARPS spell.txt /*spell-CHECKSHARPS*
+ spell-CIRCUMFIX spell.txt /*spell-CIRCUMFIX*
+ spell-COMMON spell.txt /*spell-COMMON*
+ spell-COMPLEXPREFIXES spell.txt /*spell-COMPLEXPREFIXES*
+***************
+*** 8451,8456 ****
+--- 8637,8643 ----
+ spell-COMPOUNDFIRST spell.txt /*spell-COMPOUNDFIRST*
+ spell-COMPOUNDFLAG spell.txt /*spell-COMPOUNDFLAG*
+ spell-COMPOUNDFORBIDFLAG spell.txt /*spell-COMPOUNDFORBIDFLAG*
++ spell-COMPOUNDLAST spell.txt /*spell-COMPOUNDLAST*
+ spell-COMPOUNDMIDDLE spell.txt /*spell-COMPOUNDMIDDLE*
+ spell-COMPOUNDMIN spell.txt /*spell-COMPOUNDMIN*
+ spell-COMPOUNDPERMITFLAG spell.txt /*spell-COMPOUNDPERMITFLAG*
+***************
+*** 8587,8592 ****
+--- 8774,8780 ----
+ status-line windows.txt /*status-line*
+ statusmsg-variable eval.txt /*statusmsg-variable*
+ str2float() eval.txt /*str2float()*
++ str2list() eval.txt /*str2list()*
+ str2nr() eval.txt /*str2nr()*
+ strcasestr() eval.txt /*strcasestr()*
+ strcharpart() eval.txt /*strcharpart()*
+***************
+*** 8635,8640 ****
+--- 8823,8830 ----
+ swapchoice-variable eval.txt /*swapchoice-variable*
+ swapcommand-variable eval.txt /*swapcommand-variable*
+ swapfile-changed version4.txt /*swapfile-changed*
++ swapinfo() eval.txt /*swapinfo()*
++ swapname() eval.txt /*swapname()*
+ swapname-variable eval.txt /*swapname-variable*
+ sybase ft_sql.txt /*sybase*
+ syn-sync-grouphere syntax.txt /*syn-sync-grouphere*
+***************
+*** 8684,8690 ****
+--- 8874,8887 ----
+ t_BD term.txt /*t_BD*
+ t_BE term.txt /*t_BE*
+ t_CS term.txt /*t_CS*
++ t_CTRL-W_. terminal.txt /*t_CTRL-W_.*
++ t_CTRL-W_: terminal.txt /*t_CTRL-W_:*
+ t_CTRL-W_CTRL-C terminal.txt /*t_CTRL-W_CTRL-C*
++ t_CTRL-W_CTRL-W terminal.txt /*t_CTRL-W_CTRL-W*
++ t_CTRL-W_N terminal.txt /*t_CTRL-W_N*
++ t_CTRL-W_gT terminal.txt /*t_CTRL-W_gT*
++ t_CTRL-W_gt terminal.txt /*t_CTRL-W_gt*
++ t_CTRL-W_quote terminal.txt /*t_CTRL-W_quote*
+ t_CTRL-\_CTRL-N terminal.txt /*t_CTRL-\\_CTRL-N*
+ t_CV term.txt /*t_CV*
+ t_Ce term.txt /*t_Ce*
+***************
+*** 8732,8744 ****
+--- 8929,8945 ----
+ t_RF term.txt /*t_RF*
+ t_RI term.txt /*t_RI*
+ t_RS term.txt /*t_RS*
++ t_RT term.txt /*t_RT*
+ t_RV term.txt /*t_RV*
++ t_Ri term.txt /*t_Ri*
+ t_SC term.txt /*t_SC*
+ t_SH term.txt /*t_SH*
+ t_SI term.txt /*t_SI*
+ t_SR term.txt /*t_SR*
++ t_ST term.txt /*t_ST*
+ t_Sb term.txt /*t_Sb*
+ t_Sf term.txt /*t_Sf*
++ t_Si term.txt /*t_Si*
+ t_Te term.txt /*t_Te*
+ t_Ts term.txt /*t_Ts*
+ t_VS term.txt /*t_VS*
+***************
+*** 8748,8753 ****
+--- 8949,8955 ----
+ t_ZR term.txt /*t_ZR*
+ t_al term.txt /*t_al*
+ t_bc term.txt /*t_bc*
++ t_blob-variable eval.txt /*t_blob-variable*
+ t_bool-variable eval.txt /*t_bool-variable*
+ t_cd term.txt /*t_cd*
+ t_cdl version4.txt /*t_cdl*
+***************
+*** 8869,8879 ****
+ tabpagewinnr() eval.txt /*tabpagewinnr()*
+ tag tagsrch.txt /*tag*
+ tag-! tagsrch.txt /*tag-!*
+- tag-any-white tagsrch.txt /*tag-any-white*
+ tag-binary-search tagsrch.txt /*tag-binary-search*
+ tag-blocks motion.txt /*tag-blocks*
+ tag-commands tagsrch.txt /*tag-commands*
+ tag-details tagsrch.txt /*tag-details*
+ tag-highlight syntax.txt /*tag-highlight*
+ tag-matchlist tagsrch.txt /*tag-matchlist*
+ tag-old-static tagsrch.txt /*tag-old-static*
+--- 9071,9082 ----
+ tabpagewinnr() eval.txt /*tabpagewinnr()*
+ tag tagsrch.txt /*tag*
+ tag-! tagsrch.txt /*tag-!*
+ tag-binary-search tagsrch.txt /*tag-binary-search*
+ tag-blocks motion.txt /*tag-blocks*
+ tag-commands tagsrch.txt /*tag-commands*
+ tag-details tagsrch.txt /*tag-details*
++ tag-function tagsrch.txt /*tag-function*
++ tag-functions usr_41.txt /*tag-functions*
+ tag-highlight syntax.txt /*tag-highlight*
+ tag-matchlist tagsrch.txt /*tag-matchlist*
+ tag-old-static tagsrch.txt /*tag-old-static*
+***************
+*** 8993,9002 ****
+--- 9196,9208 ----
+ termdebug-communication terminal.txt /*termdebug-communication*
+ termdebug-customizing terminal.txt /*termdebug-customizing*
+ termdebug-example terminal.txt /*termdebug-example*
++ termdebug-prompt terminal.txt /*termdebug-prompt*
+ termdebug-starting terminal.txt /*termdebug-starting*
+ termdebug-stepping terminal.txt /*termdebug-stepping*
+ termdebug-variables terminal.txt /*termdebug-variables*
+ termdebug_popup terminal.txt /*termdebug_popup*
++ termdebug_shortcuts terminal.txt /*termdebug_shortcuts*
++ termdebug_use_prompt terminal.txt /*termdebug_use_prompt*
+ termdebug_wide terminal.txt /*termdebug_wide*
+ terminal terminal.txt /*terminal*
+ terminal-api terminal.txt /*terminal-api*
+***************
+*** 9011,9016 ****
+--- 9217,9223 ----
+ terminal-dumptest terminal.txt /*terminal-dumptest*
+ terminal-functions usr_41.txt /*terminal-functions*
+ terminal-info term.txt /*terminal-info*
++ terminal-job-index index.txt /*terminal-job-index*
+ terminal-key-codes term.txt /*terminal-key-codes*
+ terminal-ms-windows terminal.txt /*terminal-ms-windows*
+ terminal-options term.txt /*terminal-options*
+***************
+*** 9035,9047 ****
+--- 9242,9259 ----
+ test_feedinput() eval.txt /*test_feedinput()*
+ test_garbagecollect_now() eval.txt /*test_garbagecollect_now()*
+ test_ignore_error() eval.txt /*test_ignore_error()*
++ test_null_blob() eval.txt /*test_null_blob()*
+ test_null_channel() eval.txt /*test_null_channel()*
+ test_null_dict() eval.txt /*test_null_dict()*
+ test_null_job() eval.txt /*test_null_job()*
+ test_null_list() eval.txt /*test_null_list()*
+ test_null_partial() eval.txt /*test_null_partial()*
+ test_null_string() eval.txt /*test_null_string()*
++ test_option_not_set() eval.txt /*test_option_not_set()*
+ test_override() eval.txt /*test_override()*
++ test_refcount() eval.txt /*test_refcount()*
++ test_scrollbar() eval.txt /*test_scrollbar()*
++ test_setmouse() eval.txt /*test_setmouse()*
+ test_settime() eval.txt /*test_settime()*
+ testing eval.txt /*testing*
+ testing-variable eval.txt /*testing-variable*
+***************
+*** 9065,9071 ****
+--- 9277,9288 ----
+ text-functions usr_41.txt /*text-functions*
+ text-objects motion.txt /*text-objects*
+ text-objects-changed version5.txt /*text-objects-changed*
++ text-prop-changes textprop.txt /*text-prop-changes*
++ text-prop-functions textprop.txt /*text-prop-functions*
++ text-prop-intro textprop.txt /*text-prop-intro*
++ text-properties textprop.txt /*text-properties*
+ textlock eval.txt /*textlock*
++ textprop.txt textprop.txt /*textprop.txt*
+ tf.vim syntax.txt /*tf.vim*
+ this_session-variable eval.txt /*this_session-variable*
+ throw-catch eval.txt /*throw-catch*
+***************
+*** 9251,9256 ****
+--- 9468,9474 ----
+ v:swapcommand eval.txt /*v:swapcommand*
+ v:swapname eval.txt /*v:swapname*
+ v:t_TYPE eval.txt /*v:t_TYPE*
++ v:t_blob eval.txt /*v:t_blob*
+ v:t_bool eval.txt /*v:t_bool*
+ v:t_channel eval.txt /*v:t_channel*
+ v:t_dict eval.txt /*v:t_dict*
+***************
+*** 9434,9439 ****
+--- 9652,9658 ----
+ version8.txt version8.txt /*version8.txt*
+ vi intro.txt /*vi*
+ vi-differences vi_diff.txt /*vi-differences*
++ vi-features vi_diff.txt /*vi-features*
+ vi: options.txt /*vi:*
+ vi_diff.txt vi_diff.txt /*vi_diff.txt*
+ vib motion.txt /*vib*
+***************
+*** 9504,9509 ****
+--- 9723,9730 ----
+ vimrc-intro usr_05.txt /*vimrc-intro*
+ vimrc-option-example starting.txt /*vimrc-option-example*
+ vimrc_example.vim usr_05.txt /*vimrc_example.vim*
++ vimscript-version eval.txt /*vimscript-version*
++ vimscript-versions eval.txt /*vimscript-versions*
+ vimtutor usr_01.txt /*vimtutor*
+ virtcol() eval.txt /*virtcol()*
+ visual-block visual.txt /*visual-block*
+***************
+*** 9549,9554 ****
+--- 9770,9776 ----
+ wildcard editing.txt /*wildcard*
+ wildcards editing.txt /*wildcards*
+ wildmenumode() eval.txt /*wildmenumode()*
++ win16 os_win32.txt /*win16*
+ win32 os_win32.txt /*win32*
+ win32-!start gui_w32.txt /*win32-!start*
+ win32-PATH os_win32.txt /*win32-PATH*
+***************
+*** 9607,9612 ****
+--- 9829,9835 ----
+ windowsme os_win32.txt /*windowsme*
+ winheight() eval.txt /*winheight()*
+ winid windows.txt /*winid*
++ winlayout() eval.txt /*winlayout()*
+ winline() eval.txt /*winline()*
+ winnr() eval.txt /*winnr()*
+ winrestcmd() eval.txt /*winrestcmd()*
+***************
+*** 9619,9630 ****
+ wordcount() eval.txt /*wordcount()*
+ workbench starting.txt /*workbench*
+ workshop workshop.txt /*workshop*
+- workshop-commands workshop.txt /*workshop-commands*
+- workshop-compiling workshop.txt /*workshop-compiling*
+- workshop-configure workshop.txt /*workshop-configure*
+- workshop-intro workshop.txt /*workshop-intro*
+ workshop-support workshop.txt /*workshop-support*
+- workshop-xpm workshop.txt /*workshop-xpm*
+ workshop.txt workshop.txt /*workshop.txt*
+ wrap-off intro.txt /*wrap-off*
+ write-compiler-plugin usr_41.txt /*write-compiler-plugin*
+--- 9842,9848 ----
+*** ../vim-8.1.1279/src/version.c 2019-05-05 16:54:59.505931038 +0200
+--- src/version.c 2019-05-05 18:02:57.091549074 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1280,
+ /**/
+
+--
+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.1281 b/data/vim/patches/8.1.1281
new file mode 100644
index 000000000..41204b841
--- /dev/null
+++ b/data/vim/patches/8.1.1281
@@ -0,0 +1,267 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1281
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1281
+Problem: Cannot specify a count with :chistory.
+Solution: Add a count to :chistory and :lhistory. (Yegappan Lakshmanan,
+ closes #4344)
+Files: runtime/doc/quickfix.txt, src/ex_cmds.h, src/quickfix.c,
+ src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.1280/runtime/doc/quickfix.txt 2019-05-05 18:11:46.320590639 +0200
+--- runtime/doc/quickfix.txt 2019-05-05 20:51:22.585954153 +0200
+***************
+*** 139,146 ****
+ :[count]lab[ove] Same as ":cabove", except the location list for the
+ current window is used instead of the quickfix list.
+
+! *:cbe* *:cbelow*
+! :[count]cbe[low] Go to the [count] error below the current line in the
+ current buffer. If [count] is omitted, then 1 is
+ used. If there are no errors, then an error message
+ is displayed. Assumes that the entries in a quickfix
+--- 139,146 ----
+ :[count]lab[ove] Same as ":cabove", except the location list for the
+ current window is used instead of the quickfix list.
+
+! *:cbel* *:cbelow*
+! :[count]cbel[ow] Go to the [count] error below the current line in the
+ current buffer. If [count] is omitted, then 1 is
+ used. If there are no errors, then an error message
+ is displayed. Assumes that the entries in a quickfix
+***************
+*** 164,171 ****
+ number of entries before the current position, then
+ the first error in the file is selected.
+
+! *:lbef* *:lbefore*
+! :[count]lbef[ore] Same as ":cbefore", except the location list for the
+ current window is used instead of the quickfix list.
+
+ *:caf* *:cafter*
+--- 164,171 ----
+ number of entries before the current position, then
+ the first error in the file is selected.
+
+! *:lbe* *:lbefore*
+! :[count]lbe[fore] Same as ":cbefore", except the location list for the
+ current window is used instead of the quickfix list.
+
+ *:caf* *:cafter*
+***************
+*** 536,541 ****
+--- 536,564 ----
+ etc.
+ < Otherwise it works the same as `:ldo`.
+
++ FILTERING A QUICKFIX OR LOCATION LIST:
++ *cfilter-plugin* *:Cfilter* *:Lfilter*
++ If you have too many entries in a quickfix list, you can use the cfilter
++ plugin to reduce the number of entries. Load the plugin with: >
++
++ packadd cfilter
++
++ Then you can use the following commands to filter a quickfix/location list: >
++
++ :Cfilter[!] /{pat}/
++ :Lfilter[!] /{pat}/
++
++ The |:Cfilter| command creates a new quickfix list from the entries matching
++ {pat} in the current quickfix list. {pat} is a Vim |regular-expression|
++ pattern. Both the file name and the text of the entries are matched against
++ {pat}. If the optional ! is supplied, then the entries not matching {pat} are
++ used. The pattern can be optionally enclosed using one of the following
++ characters: ', ", /. If the pattern is empty, then the last used search
++ pattern is used.
++
++ The |:Lfilter| command does the same as |:Cfilter| but operates on the current
++ location list.
++
+ =============================================================================
+ 2. The error window *quickfix-window*
+
+***************
+*** 822,835 ****
+ the current window instead of the quickfix list.
+
+ *:chistory* *:chi*
+! :chi[story] Show the list of error lists. The current list is
+ marked with ">". The output looks like:
+ error list 1 of 3; 43 errors ~
+ > error list 2 of 3; 0 errors ~
+ error list 3 of 3; 15 errors ~
+
+ *:lhistory* *:lhi*
+! :lhi[story] Show the list of location lists, otherwise like
+ `:chistory`.
+
+ When adding a new error list, it becomes the current list.
+--- 845,863 ----
+ the current window instead of the quickfix list.
+
+ *:chistory* *:chi*
+! :[count]chi[story] Show the list of error lists. The current list is
+ marked with ">". The output looks like:
+ error list 1 of 3; 43 errors ~
+ > error list 2 of 3; 0 errors ~
+ error list 3 of 3; 15 errors ~
+
++ When [count] is given, then the count'th quickfix
++ list is made the current list. Example: >
++ " Make the 4th quickfix list current
++ :4chistory
++ <
+ *:lhistory* *:lhi*
+! :[count]lhi[story] Show the list of location lists, otherwise like
+ `:chistory`.
+
+ When adding a new error list, it becomes the current list.
+***************
+*** 1641,1662 ****
+ recognized as a command separator. The backslash before each space is
+ required for the set command.
+
+- *cfilter-plugin* *:Cfilter* *:Lfilter*
+- 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*
+
+--- 1669,1674 ----
+*** ../vim-8.1.1280/src/ex_cmds.h 2019-05-05 15:02:26.176319819 +0200
+--- src/ex_cmds.h 2019-05-05 20:48:37.758956072 +0200
+***************
+*** 336,343 ****
+ RANGE|BUFNAME|COUNT|EXTRA|TRLBAR,
+ ADDR_OTHER),
+ EX(CMD_chistory, "chistory", qf_history,
+! TRLBAR,
+! ADDR_NONE),
+ EX(CMD_clist, "clist", qf_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+ ADDR_NONE),
+--- 336,343 ----
+ RANGE|BUFNAME|COUNT|EXTRA|TRLBAR,
+ ADDR_OTHER),
+ EX(CMD_chistory, "chistory", qf_history,
+! RANGE|COUNT|TRLBAR,
+! ADDR_UNSIGNED),
+ EX(CMD_clist, "clist", qf_list,
+ BANG|EXTRA|TRLBAR|CMDWIN,
+ ADDR_NONE),
+***************
+*** 828,835 ****
+ EXTRA|NOTRLCOM|NEEDARG,
+ ADDR_NONE),
+ EX(CMD_lhistory, "lhistory", qf_history,
+! TRLBAR,
+! ADDR_NONE),
+ EX(CMD_ll, "ll", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+ ADDR_QUICKFIX),
+--- 828,835 ----
+ EXTRA|NOTRLCOM|NEEDARG,
+ ADDR_NONE),
+ EX(CMD_lhistory, "lhistory", qf_history,
+! RANGE|COUNT|TRLBAR,
+! ADDR_UNSIGNED),
+ EX(CMD_ll, "ll", ex_cc,
+ RANGE|COUNT|TRLBAR|BANG,
+ ADDR_QUICKFIX),
+*** ../vim-8.1.1280/src/quickfix.c 2019-05-05 15:02:26.180319795 +0200
+--- src/quickfix.c 2019-05-05 20:48:37.762956047 +0200
+***************
+*** 3742,3747 ****
+--- 3742,3768 ----
+ qf_info_T *qi = qf_cmd_get_stack(eap, FALSE);
+ int i;
+
++ if (eap->addr_count > 0)
++ {
++ if (qi == NULL)
++ {
++ emsg(_(e_loclist));
++ return;
++ }
++
++ // Jump to the specified quickfix list
++ if (eap->line2 > 0 && eap->line2 <= qi->qf_listcount)
++ {
++ qi->qf_curlist = eap->line2 - 1;
++ qf_msg(qi, qi->qf_curlist, "");
++ qf_update_buffer(qi, NULL);
++ }
++ else
++ emsg(_(e_invrange));
++
++ return;
++ }
++
+ if (qf_stack_empty(qi))
+ msg(_("No entries"));
+ else
+*** ../vim-8.1.1280/src/testdir/test_quickfix.vim 2019-05-05 15:02:26.180319795 +0200
+--- src/testdir/test_quickfix.vim 2019-05-05 20:48:37.762956047 +0200
+***************
+*** 1831,1839 ****
+--- 1831,1853 ----
+ call assert_equal(' error list 2 of 3; 2 ' . common, res[1])
+ call assert_equal('> error list 3 of 3; 3 ' . common, res[2])
+
++ " Test for changing the quickfix lists
++ call assert_equal(3, g:Xgetlist({'nr' : 0}).nr)
++ exe '1' . a:cchar . 'hist'
++ call assert_equal(1, g:Xgetlist({'nr' : 0}).nr)
++ exe '3' . a:cchar . 'hist'
++ call assert_equal(3, g:Xgetlist({'nr' : 0}).nr)
++ call assert_fails('-2' . a:cchar . 'hist', 'E16:')
++ call assert_fails('4' . a:cchar . 'hist', 'E16:')
++
+ call g:Xsetlist([], 'f')
+ let l = split(execute(a:cchar . 'hist'), "\n")
+ call assert_equal('No entries', l[0])
++ if a:cchar == 'c'
++ call assert_fails('4chist', 'E16:')
++ else
++ call assert_fails('4lhist', 'E776:')
++ endif
+
+ " An empty list should still show the stack history
+ call g:Xsetlist([])
+*** ../vim-8.1.1280/src/version.c 2019-05-05 18:11:46.336590548 +0200
+--- src/version.c 2019-05-05 20:59:35.150902389 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1281,
+ /**/
+
+--
+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.1282 b/data/vim/patches/8.1.1282
new file mode 100644
index 000000000..310cc10cc
--- /dev/null
+++ b/data/vim/patches/8.1.1282
@@ -0,0 +1,49 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1282
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1282
+Problem: Running make in src/po leaves LINGUAS file behind. (Ken Takata)
+Solution: Delete LINGUAS after running msgfmt.
+Files: src/po/Makefile
+
+
+*** ../vim-8.1.1281/src/po/Makefile 2019-05-03 21:19:58.926404208 +0200
+--- src/po/Makefile 2019-05-05 16:19:09.519122454 +0200
+***************
+*** 168,177 ****
+--- 168,179 ----
+ vim.desktop: vim.desktop.in $(POFILES)
+ @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+ $(MSGFMT) --desktop -d . --template vim.desktop.in -o vim.desktop
++ rm -f LINGUAS
+
+ gvim.desktop: gvim.desktop.in $(POFILES)
+ @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+ $(MSGFMT) --desktop -d . --template gvim.desktop.in -o gvim.desktop
++ rm -f LINGUAS
+
+ update-po: $(LANGUAGES)
+
+*** ../vim-8.1.1281/src/version.c 2019-05-05 21:00:22.854603956 +0200
+--- src/version.c 2019-05-05 21:01:14.702279213 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1282,
+ /**/
+
+--
+Every person is responsible for the choices he makes.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1283 b/data/vim/patches/8.1.1283
new file mode 100644
index 000000000..799e0094d
--- /dev/null
+++ b/data/vim/patches/8.1.1283
@@ -0,0 +1,191 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1283
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1283
+Problem: Delaying half a second after the top-bot message.
+Solution: Instead of the delay add "W" to the search count.
+Files: src/search.c
+
+
+*** ../vim-8.1.1282/src/search.c 2019-05-05 13:02:05.655655369 +0200
+--- src/search.c 2019-05-06 21:35:18.297971857 +0200
+***************
+*** 26,32 ****
+ #ifdef FEAT_VIMINFO
+ static void wvsp_one(FILE *fp, int idx, char *s, int sc);
+ #endif
+! static void search_stat(int dirc, pos_T *pos, char_u *msgbuf);
+
+ /*
+ * This file contains various searching-related routines. These fall into
+--- 26,32 ----
+ #ifdef FEAT_VIMINFO
+ static void wvsp_one(FILE *fp, int idx, char *s, int sc);
+ #endif
+! static void search_stat(int dirc, pos_T *pos, int show_top_bot_msg, char_u *msgbuf);
+
+ /*
+ * This file contains various searching-related routines. These fall into
+***************
+*** 1294,1299 ****
+--- 1294,1301 ----
+ */
+ for (;;)
+ {
++ int show_top_bot_msg = FALSE;
++
+ searchstr = pat;
+ dircp = NULL;
+ /* use previous pattern */
+***************
+*** 1524,1530 ****
+ if (!shortmess(SHM_SEARCH)
+ && ((dirc == '/' && LT_POS(pos, curwin->w_cursor))
+ || (dirc == '?' && LT_POS(curwin->w_cursor, pos))))
+! ui_delay(500L, FALSE); // leave some time for top_bot_msg
+
+ if (c == FAIL)
+ {
+--- 1526,1532 ----
+ if (!shortmess(SHM_SEARCH)
+ && ((dirc == '/' && LT_POS(pos, curwin->w_cursor))
+ || (dirc == '?' && LT_POS(curwin->w_cursor, pos))))
+! show_top_bot_msg = TRUE;
+
+ if (c == FAIL)
+ {
+***************
+*** 1581,1587 ****
+ && c != FAIL
+ && !shortmess(SHM_SEARCHCOUNT)
+ && msgbuf != NULL)
+! search_stat(dirc, &pos, msgbuf);
+
+ /*
+ * The search command can be followed by a ';' to do another search.
+--- 1583,1589 ----
+ && c != FAIL
+ && !shortmess(SHM_SEARCHCOUNT)
+ && msgbuf != NULL)
+! search_stat(dirc, &pos, show_top_bot_msg, msgbuf);
+
+ /*
+ * The search command can be followed by a ';' to do another search.
+***************
+*** 4911,4916 ****
+--- 4913,4919 ----
+ search_stat(
+ int dirc,
+ pos_T *pos,
++ int show_top_bot_msg,
+ char_u *msgbuf)
+ {
+ int save_ws = p_ws;
+***************
+*** 4979,4986 ****
+ }
+ if (cur > 0)
+ {
+! #define STAT_BUF_LEN 10
+ char t[STAT_BUF_LEN] = "";
+
+ #ifdef FEAT_RIGHTLEFT
+ if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
+--- 4982,4990 ----
+ }
+ if (cur > 0)
+ {
+! #define STAT_BUF_LEN 12
+ char t[STAT_BUF_LEN] = "";
++ int len;
+
+ #ifdef FEAT_RIGHTLEFT
+ if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
+***************
+*** 5006,5012 ****
+ else
+ vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt);
+ }
+! mch_memmove(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t));
+ if (dirc == '?' && cur == 100)
+ cur = -1;
+
+--- 5010,5024 ----
+ else
+ vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt);
+ }
+!
+! len = STRLEN(t);
+! if (show_top_bot_msg && len + 3 < STAT_BUF_LEN)
+! {
+! STRCPY(t + len, " W");
+! len += 2;
+! }
+!
+! mch_memmove(msgbuf + STRLEN(msgbuf) - len, t, len);
+ if (dirc == '?' && cur == 100)
+ cur = -1;
+
+*** ../vim-8.1.1282/src/testdir/test_search_stat.vim 2019-05-04 21:08:17.119814244 +0200
+--- src/testdir/test_search_stat.vim 2019-05-06 21:27:54.140328970 +0200
+***************
+*** 3,8 ****
+--- 3,10 ----
+ " This test is fragile, it might not work interactively, but it works when run
+ " as test!
+
++ source shared.vim
++
+ func! Test_search_stat()
+ new
+ set shortmess-=S
+***************
+*** 79,85 ****
+ set norl
+ endif
+
+! " 9) normal, back at top
+ call cursor(1,1)
+ let @/ = 'foobar'
+ let pat = '?foobar\s\+'
+--- 81,87 ----
+ set norl
+ endif
+
+! " 9) normal, back at bottom
+ call cursor(1,1)
+ let @/ = 'foobar'
+ let pat = '?foobar\s\+'
+***************
+*** 87,92 ****
+--- 89,95 ----
+ let stat = '\[20/20\]'
+ call assert_match(pat .. stat, g:a)
+ call assert_match('search hit TOP, continuing at BOTTOM', g:a)
++ call assert_match('\[20/20\] W', Screenline(&lines))
+
+ " 10) normal, no match
+ call cursor(1,1)
+*** ../vim-8.1.1282/src/version.c 2019-05-05 21:01:47.654072636 +0200
+--- src/version.c 2019-05-06 21:15:05.864367740 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1283,
+ /**/
+
+--
+How do you know when you have run out of invisible ink?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1284 b/data/vim/patches/8.1.1284
new file mode 100644
index 000000000..a952810d3
--- /dev/null
+++ b/data/vim/patches/8.1.1284
@@ -0,0 +1,73 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1284
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1284
+Problem: Detecting *.tmpl as htmlcheetah is outdated.
+Solution: Use the generic name "template". (closes #4348)
+Files: runtime/filetype.vim, src/testdir/test_filetype.vim
+
+
+*** ../vim-8.1.1283/runtime/filetype.vim 2019-04-19 23:32:45.193715199 +0200
+--- runtime/filetype.vim 2019-05-06 21:20:07.330792812 +0200
+***************
+*** 711,718 ****
+ " HTML with M4
+ au BufNewFile,BufRead *.html.m4 setf htmlm4
+
+! " HTML Cheetah template
+! au BufNewFile,BufRead *.tmpl setf htmlcheetah
+
+ " Host config
+ au BufNewFile,BufRead */etc/host.conf setf hostconf
+--- 713,720 ----
+ " HTML with M4
+ au BufNewFile,BufRead *.html.m4 setf htmlm4
+
+! " Some template. Used to be HTML Cheetah.
+! au BufNewFile,BufRead *.tmpl setf template
+
+ " Host config
+ au BufNewFile,BufRead */etc/host.conf setf hostconf
+*** ../vim-8.1.1283/src/testdir/test_filetype.vim 2019-04-19 23:32:45.193715199 +0200
+--- src/testdir/test_filetype.vim 2019-05-06 21:20:55.682538684 +0200
+***************
+*** 200,206 ****
+ \ 'hog': ['file.hog', 'snort.conf', 'vision.conf'],
+ \ 'hostconf': ['/etc/host.conf'],
+ \ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny'],
+! \ 'htmlcheetah': ['file.tmpl'],
+ \ 'htmlm4': ['file.html.m4'],
+ \ 'httest': ['file.htt', 'file.htb'],
+ \ 'ibasic': ['file.iba', 'file.ibi'],
+--- 200,206 ----
+ \ 'hog': ['file.hog', 'snort.conf', 'vision.conf'],
+ \ 'hostconf': ['/etc/host.conf'],
+ \ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny'],
+! \ 'template': ['file.tmpl'],
+ \ 'htmlm4': ['file.html.m4'],
+ \ 'httest': ['file.htt', 'file.htb'],
+ \ 'ibasic': ['file.iba', 'file.ibi'],
+*** ../vim-8.1.1283/src/version.c 2019-05-06 21:37:14.965351663 +0200
+--- src/version.c 2019-05-06 21:45:17.254797104 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1284,
+ /**/
+
+--
+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.1285 b/data/vim/patches/8.1.1285
new file mode 100644
index 000000000..d9db2fd5d
--- /dev/null
+++ b/data/vim/patches/8.1.1285
@@ -0,0 +1,455 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1285
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1285
+Problem: Test17 is old style.
+Solution: Turn into new style test. (Yegappan Lakshmanan, closes #4347)
+Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
+ src/testdir/test17.in, src/testdir/test17.ok,
+ src/testdir/test17a.in, src/testdir/test_checkpath.vim,
+ src/testdir/test_gf.vim
+
+
+*** ../vim-8.1.1284/src/Makefile 2019-05-01 18:08:38.267237229 +0200
+--- src/Makefile 2019-05-06 21:56:13.787318060 +0200
+***************
+*** 2175,2181 ****
+ # These do not depend on the executable, compile it when needed.
+ test1 \
+ test_eval \
+! test3 test17 \
+ test29 test30 test37 test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+--- 2176,2182 ----
+ # These do not depend on the executable, compile it when needed.
+ test1 \
+ test_eval \
+! test3 \
+ test29 test30 test37 test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+*** ../vim-8.1.1284/src/testdir/Make_all.mak 2019-05-04 21:08:17.119814244 +0200
+--- src/testdir/Make_all.mak 2019-05-06 21:56:13.787318060 +0200
+***************
+*** 44,50 ****
+
+ # Tests that run on most systems, but not on VMS
+ SCRIPTS_MORE4 = \
+- test17.out \
+ test30.out \
+ test59.out \
+ test72.out \
+--- 44,49 ----
+***************
+*** 82,87 ****
+--- 81,87 ----
+ test_channel \
+ test_charsearch \
+ test_charsearch_utf8 \
++ test_checkpath \
+ test_cindent \
+ test_clientserver \
+ test_close_count \
+***************
+*** 302,307 ****
+--- 302,308 ----
+ test_changelist.res \
+ test_channel.res \
+ test_charsearch.res \
++ test_checkpath.res \
+ test_cindent.res \
+ test_clientserver.res \
+ test_close_count.res \
+*** ../vim-8.1.1284/src/testdir/Make_vms.mms 2019-04-27 18:00:29.851064563 +0200
+--- src/testdir/Make_vms.mms 2019-05-06 21:56:13.787318060 +0200
+***************
+*** 83,89 ****
+ test_eval.out
+
+ # Known problems:
+- # test17: ?
+ #
+ # test30: bug, most probably - a problem around mac format
+ #
+--- 83,88 ----
+***************
+*** 102,108 ****
+ .ENDIF
+
+ .IFDEF WANT_UNIX
+! SCRIPT_UNIX = test10.out test17.out test27.out test49.out
+ .ENDIF
+
+ .IFDEF WANT_WIN
+--- 101,107 ----
+ .ENDIF
+
+ .IFDEF WANT_UNIX
+! SCRIPT_UNIX = test10.out test27.out test49.out
+ .ENDIF
+
+ .IFDEF WANT_WIN
+*** ../vim-8.1.1284/src/testdir/test17.in 2016-06-08 21:39:44.000000000 +0200
+--- src/testdir/test17.in 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,135 ****
+- Tests for:
+- - "gf" on ${VAR},
+- - ":checkpath!" with various 'include' settings.
+-
+- STARTTEST
+- :so small.vim
+- :if has("ebcdic")
+- : set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,}
+- :else
+- : set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
+- :endif
+- :"
+- :if has("unix")
+- :let $CDIR = "."
+- /CDIR
+- :else
+- :if has("amiga")
+- :let $TDIR = "/testdir"
+- :else
+- :let $TDIR = "."
+- :endif
+- /TDIR
+- :endif
+- :" Dummy writing for making that sure gf doesn't fail even if the current
+- :" file is modified. It can be occurred when executing the following command
+- :" directly on Windows without fixing the 'fileformat':
+- :" > nmake -f Make_dos.mak test17.out
+- :w! test.out
+- gf
+- :set ff=unix
+- :w! test.out
+- :brewind
+- ENDTEST
+-
+- ${CDIR}/test17a.in
+- $TDIR/test17a.in
+-
+- STARTTEST
+- :" check for 'include' without \zs or \ze
+- :lang C
+- :call delete("./Xbase.a")
+- :call delete("Xdir1", "rf")
+- :!mkdir Xdir1
+- :!mkdir "Xdir1/dir2"
+- :e! Xdir1/dir2/foo.a
+- i#include "bar.a":
+- :w
+- :e Xdir1/dir2/bar.a
+- i#include "baz.a":
+- :w
+- :e Xdir1/dir2/baz.a
+- i#include "foo.a":
+- :w
+- :e Xbase.a
+- :set path=Xdir1/dir2
+- i#include <foo.a>:
+- :w
+- :redir! >>test.out
+- :checkpath!
+- :redir END
+- :brewind
+- ENDTEST
+-
+- STARTTEST
+- :" check for 'include' with \zs and \ze
+- :call delete("./Xbase.b")
+- :call delete("Xdir1", "rf")
+- :!mkdir Xdir1
+- :!mkdir "Xdir1/dir2"
+- :let &include='^\s*%inc\s*/\zs[^/]\+\ze'
+- :function! DotsToSlashes()
+- : return substitute(v:fname, '\.', '/', 'g') . '.b'
+- :endfunction
+- :let &includeexpr='DotsToSlashes()'
+- :e! Xdir1/dir2/foo.b
+- i%inc /bar/:
+- :w
+- :e Xdir1/dir2/bar.b
+- i%inc /baz/:
+- :w
+- :e Xdir1/dir2/baz.b
+- i%inc /foo/:
+- :w
+- :e Xbase.b
+- :set path=Xdir1/dir2
+- i%inc /foo/:
+- :w
+- :redir! >>test.out
+- :checkpath!
+- :redir END
+- :brewind
+- ENDTEST
+-
+- STARTTEST
+- :" check for 'include' with \zs and no \ze
+- :call delete("./Xbase.c")
+- :call delete("Xdir1", "rf")
+- :!mkdir Xdir1
+- :!mkdir "Xdir1/dir2"
+- :let &include='^\s*%inc\s*\%([[:upper:]][^[:space:]]*\s\+\)\?\zs\S\+\ze'
+- :function! StripNewlineChar()
+- : if v:fname =~ '\n$'
+- : return v:fname[:-2]
+- : endif
+- : return v:fname
+- :endfunction
+- :let &includeexpr='StripNewlineChar()'
+- :e! Xdir1/dir2/foo.c
+- i%inc bar.c:
+- :w
+- :e Xdir1/dir2/bar.c
+- i%inc baz.c:
+- :w
+- :e Xdir1/dir2/baz.c
+- i%inc foo.c:
+- :w
+- :e Xdir1/dir2/FALSE.c
+- i%inc foo.c:
+- :w
+- :e Xbase.c
+- :set path=Xdir1/dir2
+- i%inc FALSE.c foo.c:
+- :w
+- :redir! >>test.out
+- :checkpath!
+- :redir END
+- :brewind
+- :" change "\" to "/" for Windows and fix 'fileformat'
+- :e test.out
+- :%s#\\#/#g
+- :set ff&
+- :w
+- :q
+- ENDTEST
+-
+--- 0 ----
+*** ../vim-8.1.1284/src/testdir/test17.ok 2013-07-03 22:19:18.000000000 +0200
+--- src/testdir/test17.ok 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,33 ****
+- This file is just to test "gf" in test 17.
+- The contents is not important.
+- Just testing!
+-
+-
+- --- Included files in path ---
+- Xdir1/dir2/foo.a
+- Xdir1/dir2/foo.a -->
+- Xdir1/dir2/bar.a
+- Xdir1/dir2/bar.a -->
+- Xdir1/dir2/baz.a
+- Xdir1/dir2/baz.a -->
+- "foo.a" (Already listed)
+-
+-
+- --- Included files in path ---
+- Xdir1/dir2/foo.b
+- Xdir1/dir2/foo.b -->
+- Xdir1/dir2/bar.b
+- Xdir1/dir2/bar.b -->
+- Xdir1/dir2/baz.b
+- Xdir1/dir2/baz.b -->
+- foo (Already listed)
+-
+-
+- --- Included files in path ---
+- Xdir1/dir2/foo.c
+- Xdir1/dir2/foo.c -->
+- Xdir1/dir2/bar.c
+- Xdir1/dir2/bar.c -->
+- Xdir1/dir2/baz.c
+- Xdir1/dir2/baz.c -->
+- foo.c (Already listed)
+--- 0 ----
+*** ../vim-8.1.1284/src/testdir/test17a.in 2010-08-04 16:06:51.000000000 +0200
+--- src/testdir/test17a.in 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,3 ****
+- This file is just to test "gf" in test 17.
+- The contents is not important.
+- Just testing!
+--- 0 ----
+*** ../vim-8.1.1284/src/testdir/test_checkpath.vim 2019-05-06 21:59:14.610357666 +0200
+--- src/testdir/test_checkpath.vim 2019-05-06 21:56:13.787318060 +0200
+***************
+*** 0 ****
+--- 1,104 ----
++ " Tests for the :checkpath command
++
++ " Test for 'include' without \zs or \ze
++ func Test_checkpath1()
++ call mkdir("Xdir1/dir2", "p")
++ call writefile(['#include "bar.a"'], 'Xdir1/dir2/foo.a')
++ call writefile(['#include "baz.a"'], 'Xdir1/dir2/bar.a')
++ call writefile(['#include "foo.a"'], 'Xdir1/dir2/baz.a')
++ call writefile(['#include <foo.a>'], 'Xbase.a')
++
++ edit Xbase.a
++ set path=Xdir1/dir2
++ let res = split(execute("checkpath!"), "\n")
++ call assert_equal([
++ \ '--- Included files in path ---',
++ \ 'Xdir1/dir2/foo.a',
++ \ 'Xdir1/dir2/foo.a -->',
++ \ ' Xdir1/dir2/bar.a',
++ \ ' Xdir1/dir2/bar.a -->',
++ \ ' Xdir1/dir2/baz.a',
++ \ ' Xdir1/dir2/baz.a -->',
++ \ ' "foo.a" (Already listed)'], res)
++
++ enew
++ call delete("./Xbase.a")
++ call delete("Xdir1", "rf")
++ set path&
++ endfunc
++
++ func DotsToSlashes()
++ return substitute(v:fname, '\.', '/', 'g') . '.b'
++ endfunc
++
++ " Test for 'include' with \zs and \ze
++ func Test_checkpath2()
++ call mkdir("Xdir1/dir2", "p")
++ call writefile(['%inc /bar/'], 'Xdir1/dir2/foo.b')
++ call writefile(['%inc /baz/'], 'Xdir1/dir2/bar.b')
++ call writefile(['%inc /foo/'], 'Xdir1/dir2/baz.b')
++ call writefile(['%inc /foo/'], 'Xbase.b')
++
++ let &include='^\s*%inc\s*/\zs[^/]\+\ze'
++ let &includeexpr='DotsToSlashes()'
++
++ edit Xbase.b
++ set path=Xdir1/dir2
++ let res = split(execute("checkpath!"), "\n")
++ call assert_equal([
++ \ '--- Included files in path ---',
++ \ 'Xdir1/dir2/foo.b',
++ \ 'Xdir1/dir2/foo.b -->',
++ \ ' Xdir1/dir2/bar.b',
++ \ ' Xdir1/dir2/bar.b -->',
++ \ ' Xdir1/dir2/baz.b',
++ \ ' Xdir1/dir2/baz.b -->',
++ \ ' foo (Already listed)'], res)
++
++ enew
++ call delete("./Xbase.b")
++ call delete("Xdir1", "rf")
++ set path&
++ set include&
++ set includeexpr&
++ endfunc
++
++ func StripNewlineChar()
++ if v:fname =~ '\n$'
++ return v:fname[:-2]
++ endif
++ return v:fname
++ endfunc
++
++ " Test for 'include' with \zs and no \ze
++ func Test_checkpath3()
++ call mkdir("Xdir1/dir2", "p")
++ call writefile(['%inc bar.c'], 'Xdir1/dir2/foo.c')
++ call writefile(['%inc baz.c'], 'Xdir1/dir2/bar.c')
++ call writefile(['%inc foo.c'], 'Xdir1/dir2/baz.c')
++ call writefile(['%inc foo.c'], 'Xdir1/dir2/FALSE.c')
++ call writefile(['%inc FALSE.c foo.c'], 'Xbase.c')
++
++ let &include='^\s*%inc\s*\%([[:upper:]][^[:space:]]*\s\+\)\?\zs\S\+\ze'
++ let &includeexpr='StripNewlineChar()'
++
++ edit Xbase.c
++ set path=Xdir1/dir2
++ let res = split(execute("checkpath!"), "\n")
++ call assert_equal([
++ \ '--- Included files in path ---',
++ \ 'Xdir1/dir2/foo.c',
++ \ 'Xdir1/dir2/foo.c -->',
++ \ ' Xdir1/dir2/bar.c',
++ \ ' Xdir1/dir2/bar.c -->',
++ \ ' Xdir1/dir2/baz.c',
++ \ ' Xdir1/dir2/baz.c -->',
++ \ ' foo.c (Already listed)'], res)
++
++ enew
++ call delete("./Xbase.c")
++ call delete("Xdir1", "rf")
++ set path&
++ set include&
++ set includeexpr&
++ endfunc
+*** ../vim-8.1.1284/src/testdir/test_gf.vim 2019-03-09 12:32:50.673562149 +0100
+--- src/testdir/test_gf.vim 2019-05-06 21:56:13.787318060 +0200
+***************
+*** 64,66 ****
+--- 64,101 ----
+ bwipe Xfile
+ bwipe Xfile2
+ endfunc
++
++ " Test for invoking 'gf' on a ${VAR} variable
++ func Test_gf()
++ if has("ebcdic")
++ set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,}
++ else
++ set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
++ endif
++
++ call writefile(["Test for gf command"], "Xtest1")
++ if has("unix")
++ call writefile([" ${CDIR}/Xtest1"], "Xtestgf")
++ else
++ call writefile([" $TDIR/Xtest1"], "Xtestgf")
++ endif
++ new Xtestgf
++ if has("unix")
++ let $CDIR = "."
++ /CDIR
++ else
++ if has("amiga")
++ let $TDIR = "/testdir"
++ else
++ let $TDIR = "."
++ endif
++ /TDIR
++ endif
++
++ normal gf
++ call assert_equal('Xtest1', fnamemodify(bufname(''), ":t"))
++ close!
++
++ call delete('Xtest1')
++ call delete('Xtestgf')
++ endfunc
+*** ../vim-8.1.1284/src/version.c 2019-05-06 21:46:05.062544448 +0200
+--- src/version.c 2019-05-06 21:57:17.606979162 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1285,
+ /**/
+
+--
+Biting someone with your natural teeth is "simple assault," while biting
+someone with your false teeth is "aggravated assault."
+ [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.1286 b/data/vim/patches/8.1.1286
new file mode 100644
index 000000000..1a6596250
--- /dev/null
+++ b/data/vim/patches/8.1.1286
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1286
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1286
+Problem: Running tests leaves XTest_tabpage_cmdheight file behind.
+Solution: Delete the right file. (closes #4350)
+Files: src/testdir/test_tabpage.vim
+
+
+*** ../vim-8.1.1285/src/testdir/test_tabpage.vim 2019-05-01 20:30:19.598426336 +0200
+--- src/testdir/test_tabpage.vim 2019-05-06 22:01:25.389662770 +0200
+***************
+*** 573,579 ****
+ call VerifyScreenDump(buf, 'Test_tabpage_cmdheight', {})
+
+ call StopVimInTerminal(buf)
+! call delete('XTest_conceal')
+ endfunc
+
+ " vim: shiftwidth=2 sts=2 expandtab
+--- 573,579 ----
+ call VerifyScreenDump(buf, 'Test_tabpage_cmdheight', {})
+
+ call StopVimInTerminal(buf)
+! call delete('XTest_tabpage_cmdheight')
+ endfunc
+
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.1285/src/version.c 2019-05-06 21:59:42.198211098 +0200
+--- src/version.c 2019-05-06 22:03:17.889064844 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1286,
+ /**/
+
+--
+Why don't cannibals eat clowns?
+Because they taste funny.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1287 b/data/vim/patches/8.1.1287
new file mode 100644
index 000000000..5ee6d9e09
--- /dev/null
+++ b/data/vim/patches/8.1.1287
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1287
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1287
+Problem: Cannot build with +eval but without +mouse.
+Solution: Add #ifdefs around f_test_setmouse(). (John Marriott)
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.1286/src/evalfunc.c 2019-05-04 17:34:30.649353904 +0200
+--- src/evalfunc.c 2019-05-07 16:26:12.666016796 +0200
+***************
+*** 456,462 ****
+--- 456,464 ----
+ #ifdef FEAT_GUI
+ static void f_test_scrollbar(typval_T *argvars, typval_T *rettv);
+ #endif
++ #ifdef FEAT_MOUSE
+ static void f_test_setmouse(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);
+***************
+*** 994,1000 ****
+--- 996,1004 ----
+ #ifdef FEAT_GUI
+ {"test_scrollbar", 3, 3, f_test_scrollbar},
+ #endif
++ #ifdef FEAT_MOUSE
+ {"test_setmouse", 2, 2, f_test_setmouse},
++ #endif
+ {"test_settime", 1, 1, f_test_settime},
+ #ifdef FEAT_TIMERS
+ {"timer_info", 0, 1, f_timer_info},
+***************
+*** 14499,14510 ****
+--- 14503,14516 ----
+ }
+ #endif
+
++ #ifdef FEAT_MOUSE
+ static void
+ f_test_setmouse(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ mouse_row = (time_t)tv_get_number(&argvars[0]) - 1;
+ mouse_col = (time_t)tv_get_number(&argvars[1]) - 1;
+ }
++ #endif
+
+ static void
+ f_test_settime(typval_T *argvars, typval_T *rettv UNUSED)
+*** ../vim-8.1.1286/src/version.c 2019-05-06 22:03:35.980968677 +0200
+--- src/version.c 2019-05-07 16:27:41.221459201 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1287,
+ /**/
+
+--
+bashian roulette:
+$ ((RANDOM%6)) || rm -rf ~
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1288 b/data/vim/patches/8.1.1288
new file mode 100644
index 000000000..169c9ea6c
--- /dev/null
+++ b/data/vim/patches/8.1.1288
@@ -0,0 +1,99 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1288
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1288
+Problem: Search stats don't show for mapped command.
+Solution: Remove SEARCH_PEEK from searchit flags. Add a test. (Christian
+ Brabandt)
+Files: src/search.c, src/testdir/test_search_stat.vim
+
+
+*** ../vim-8.1.1287/src/search.c 2019-05-06 21:37:14.965351663 +0200
+--- src/search.c 2019-05-07 21:25:29.772511129 +0200
+***************
+*** 4958,4965 ****
+ profile_setlimit(20L, &start);
+ #endif
+ while (!got_int && searchit(curwin, curbuf, &lastpos, NULL,
+! FORWARD, NULL, 1, SEARCH_PEEK + SEARCH_KEEP,
+! RE_LAST, (linenr_T)0, NULL, NULL) != FAIL)
+ {
+ #ifdef FEAT_RELTIME
+ // Stop after passing the time limit.
+--- 4958,4965 ----
+ profile_setlimit(20L, &start);
+ #endif
+ while (!got_int && searchit(curwin, curbuf, &lastpos, NULL,
+! FORWARD, NULL, 1, SEARCH_KEEP, RE_LAST,
+! (linenr_T)0, NULL, NULL) != FAIL)
+ {
+ #ifdef FEAT_RELTIME
+ // Stop after passing the time limit.
+*** ../vim-8.1.1287/src/testdir/test_search_stat.vim 2019-05-06 21:37:14.965351663 +0200
+--- src/testdir/test_search_stat.vim 2019-05-07 21:24:57.116686237 +0200
+***************
+*** 8,13 ****
+--- 8,14 ----
+ func! Test_search_stat()
+ new
+ set shortmess-=S
++ " Append 50 lines with text to search for, "foobar" appears 20 times
+ call append(0, repeat(['foobar', 'foo', 'fooooobar', 'foba', 'foobar'], 10))
+
+ " 1) match at second line
+***************
+*** 105,110 ****
+--- 106,135 ----
+ call assert_false(1)
+ endtry
+
++ " 11) normal, n comes from a mapping
++ " Need to move over more than 64 lines to trigger char_avail(.
++ nnoremap n nzv
++ call cursor(1,1)
++ call append(50, repeat(['foobar', 'foo', 'fooooobar', 'foba', 'foobar'], 10))
++ call setline(2, 'find this')
++ call setline(70, 'find this')
++ let @/ = 'find this'
++ let pat = '/find this\s\+'
++ let g:a = execute(':unsilent :norm n')
++ " g:a will contain several lines
++ let g:b = split(g:a, "\n")[-1]
++ let stat = '\[1/2\]'
++ call assert_match(pat .. stat, g:b)
++ unmap n
++
++ " 11) normal, but silent
++ call cursor(1,1)
++ let @/ = 'find this'
++ let pat = '/find this\s\+'
++ let g:a = execute(':norm! n')
++ let stat = '\[1/2\]'
++ call assert_notmatch(pat .. stat, g:a)
++
+ " close the window
+ set shortmess+=S
+ bwipe!
+*** ../vim-8.1.1287/src/version.c 2019-05-07 16:28:08.177289442 +0200
+--- src/version.c 2019-05-07 21:26:45.164105804 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1288,
+ /**/
+
+--
+Zen Microsystems: we're the om in .commmmmmmmm
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1289 b/data/vim/patches/8.1.1289
new file mode 100644
index 000000000..ed8de5229
--- /dev/null
+++ b/data/vim/patches/8.1.1289
@@ -0,0 +1,140 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1289
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1289
+Problem: May not have enough space to add "W" to search stats.
+Solution: Reserve a bit more space. (Christian Brabandt)
+Files: src/search.c
+
+
+*** ../vim-8.1.1288/src/search.c 2019-05-07 21:29:08.427331900 +0200
+--- src/search.c 2019-05-07 21:32:31.546229160 +0200
+***************
+*** 1219,1224 ****
+--- 1219,1225 ----
+ char_u *ps;
+ char_u *msgbuf = NULL;
+ size_t len;
++ #define SEARCH_STAT_BUF_LEN 12
+
+ /*
+ * A line offset is not remembered, this is vi compatible.
+***************
+*** 1399,1406 ****
+ else
+ // Use up to 'showcmd' column.
+ len = (int)(Rows - msg_row - 1) * Columns + sc_col - 1;
+! if (len < STRLEN(p) + 40 + 11)
+! len = STRLEN(p) + 40 + 11;
+ }
+ else
+ // Reserve enough space for the search pattern + offset.
+--- 1400,1407 ----
+ else
+ // Use up to 'showcmd' column.
+ len = (int)(Rows - msg_row - 1) * Columns + sc_col - 1;
+! if (len < STRLEN(p) + 40 + SEARCH_STAT_BUF_LEN + 1)
+! len = STRLEN(p) + 40 + SEARCH_STAT_BUF_LEN + 1;
+ }
+ else
+ // Reserve enough space for the search pattern + offset.
+***************
+*** 4982,5018 ****
+ }
+ if (cur > 0)
+ {
+! #define STAT_BUF_LEN 12
+! char t[STAT_BUF_LEN] = "";
+ int len;
+
+ #ifdef FEAT_RIGHTLEFT
+ if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
+ {
+ if (cur == OUT_OF_TIME)
+! vim_snprintf(t, STAT_BUF_LEN, "[?/??]");
+ else if (cnt > 99 && cur > 99)
+! vim_snprintf(t, STAT_BUF_LEN, "[>99/>99]");
+ else if (cnt > 99)
+! vim_snprintf(t, STAT_BUF_LEN, "[>99/%d]", cur);
+ else
+! vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cnt, cur);
+ }
+ else
+ #endif
+ {
+ if (cur == OUT_OF_TIME)
+! vim_snprintf(t, STAT_BUF_LEN, "[?/??]");
+ else if (cnt > 99 && cur > 99)
+! vim_snprintf(t, STAT_BUF_LEN, "[>99/>99]");
+ else if (cnt > 99)
+! vim_snprintf(t, STAT_BUF_LEN, "[%d/>99]", cur);
+ else
+! vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt);
+ }
+
+ len = STRLEN(t);
+! if (show_top_bot_msg && len + 3 < STAT_BUF_LEN)
+ {
+ STRCPY(t + len, " W");
+ len += 2;
+--- 4983,5018 ----
+ }
+ if (cur > 0)
+ {
+! char t[SEARCH_STAT_BUF_LEN] = "";
+ int len;
+
+ #ifdef FEAT_RIGHTLEFT
+ if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
+ {
+ if (cur == OUT_OF_TIME)
+! vim_snprintf(t, SEARCH_STAT_BUF_LEN, "[?/??]");
+ else if (cnt > 99 && cur > 99)
+! vim_snprintf(t, SEARCH_STAT_BUF_LEN, "[>99/>99]");
+ else if (cnt > 99)
+! vim_snprintf(t, SEARCH_STAT_BUF_LEN, "[>99/%d]", cur);
+ else
+! vim_snprintf(t, SEARCH_STAT_BUF_LEN, "[%d/%d]", cnt, cur);
+ }
+ else
+ #endif
+ {
+ if (cur == OUT_OF_TIME)
+! vim_snprintf(t, SEARCH_STAT_BUF_LEN, "[?/??]");
+ else if (cnt > 99 && cur > 99)
+! vim_snprintf(t, SEARCH_STAT_BUF_LEN, "[>99/>99]");
+ else if (cnt > 99)
+! vim_snprintf(t, SEARCH_STAT_BUF_LEN, "[%d/>99]", cur);
+ else
+! vim_snprintf(t, SEARCH_STAT_BUF_LEN, "[%d/%d]", cur, cnt);
+ }
+
+ len = STRLEN(t);
+! if (show_top_bot_msg && len + 3 < SEARCH_STAT_BUF_LEN)
+ {
+ STRCPY(t + len, " W");
+ len += 2;
+*** ../vim-8.1.1288/src/version.c 2019-05-07 21:29:08.427331900 +0200
+--- src/version.c 2019-05-07 21:33:53.253784068 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1289,
+ /**/
+
+--
+Beer & pretzels can't be served at the same time in any bar or restaurant.
+ [real standing law in North Dakota, 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.1290 b/data/vim/patches/8.1.1290
new file mode 100644
index 000000000..48daa1bb7
--- /dev/null
+++ b/data/vim/patches/8.1.1290
@@ -0,0 +1,273 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1290
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1290
+Problem: .hgignore and .gitignore are either distributed or in git, not
+ both.
+Solution: Add .gitignore to the distribution and .hgignore to git. Update
+ the entries. (Christian Brabandt, Ken Takata)
+Files: .gitignore, .hgignore, Filelist
+
+
+*** ../vim-8.1.1289/.gitignore 2019-05-07 21:48:01.893364309 +0200
+--- .gitignore 2019-05-07 21:47:04.041670928 +0200
+***************
+*** 0 ****
+--- 1,102 ----
++ # Unixen: object and executable files.
++ *.o
++ src/vim
++ src/xxd/xxd
++ src/auto/if_perl.c
++ src/auto/gui_gtk_gresources.c
++ src/auto/gui_gtk_gresources.h
++ src/objects/.dirstamp
++ src/objects
++ src/tags
++
++ # We do need src/auto/configure.
++ src/auto/config.cache
++ src/auto/config.h
++ src/auto/config.log
++ src/auto/config.mk
++ src/auto/config.status
++ src/auto/osdef.h
++ src/auto/link.log
++ src/auto/link.sed
++ src/auto/pathdef.c
++
++ # Windows
++ *.exe
++ *.idb
++ *.manifest
++ *.exp
++ *.map
++ *.obj
++ *.pdb
++ *.ilk
++ *.sln
++ *.suo
++ *.res
++ *.RES
++ vim*.dll
++ vim*.lib
++ src/pathdef.c
++ src/Obj*/pathdef.c
++ gvimext.dll
++ gvimext.lib
++ gvim.lib
++ runtime/doc/uganda.nsis.txt
++ nsis/icons/*
++
++ # Borland C++
++ bcc.cfg
++ *.ilc
++ *.ild
++ *.ilf
++ *.ils
++ *.tds
++
++ # NetBeans
++ nbproject/*
++
++ # Mac OSX
++ src/xxd/xxd.dSYM
++
++ # All platforms
++ *.rej
++ *.orig
++ *.mo
++ *.swp
++ *~
++ *.pyc
++ *.log
++ src/po/vim.pot
++
++ # Generated by "make test"
++ src/po/*.ck
++ src/po/*.desktop
++ src/testdir/mbyte.vim
++ src/testdir/mzscheme.vim
++ src/testdir/lua.vim
++ src/testdir/small.vim
++ src/testdir/tiny.vim
++ src/testdir/test*.out
++ src/testdir/test*.failed
++ src/testdir/test.log
++ src/testdir/dostmp/*
++ src/testdir/messages
++ src/testdir/viminfo
++ src/testdir/opt_test.vim
++ runtime/indent/testdir/*.out
++ src/memfile_test
++ src/json_test
++ src/message_test
++ src/kword_test
++
++ # Generated by "make install"
++ runtime/doc/tags
++
++ # Generated by "make shadow". The directory names could be anything but we
++ # restrict them to shadow (the default) or shadow-*
++ src/shadow
++ src/shadow-*
++ src/runtime
++ src/pixmaps
++
++ # other possible files build by tools
++ src/cscope.out
+*** ../vim-8.1.1289/.hgignore 2017-03-07 21:30:41.000000000 +0100
+--- .hgignore 2019-05-07 21:47:02.573678699 +0200
+***************
+*** 8,23 ****
+ src/auto/gui_gtk_gresources.c
+ src/auto/gui_gtk_gresources.h
+ src/objects/.dirstamp
+ src/tags
+
+ # We do need src/auto/configure.
+- src/auto/config.aap
+ src/auto/config.cache
+ src/auto/config.h
+ src/auto/config.log
+ src/auto/config.mk
+ src/auto/config.status
+- src/auto/configure.aap
+ src/auto/osdef.h
+ src/auto/link.log
+ src/auto/link.sed
+--- 8,22 ----
+ src/auto/gui_gtk_gresources.c
+ src/auto/gui_gtk_gresources.h
+ src/objects/.dirstamp
++ src/objects
+ src/tags
+
+ # We do need src/auto/configure.
+ src/auto/config.cache
+ src/auto/config.h
+ src/auto/config.log
+ src/auto/config.mk
+ src/auto/config.status
+ src/auto/osdef.h
+ src/auto/link.log
+ src/auto/link.sed
+***************
+*** 28,33 ****
+--- 27,33 ----
+ *.idb
+ *.manifest
+ *.exp
++ *.map
+ *.obj
+ *.pdb
+ *.ilk
+***************
+*** 35,46 ****
+ *.suo
+ *.res
+ *.RES
+! src/if_perl.c
+ src/pathdef.c
+ src/Obj*/pathdef.c
+ gvimext.dll
+ gvimext.lib
+ runtime/doc/uganda.nsis.txt
+
+ # Borland C++
+ bcc.cfg
+--- 35,49 ----
+ *.suo
+ *.res
+ *.RES
+! vim*.dll
+! vim*.lib
+ src/pathdef.c
+ src/Obj*/pathdef.c
+ gvimext.dll
+ gvimext.lib
++ gvim.lib
+ runtime/doc/uganda.nsis.txt
++ nsis/icons/*
+
+ # Borland C++
+ bcc.cfg
+***************
+*** 48,54 ****
+ *.ild
+ *.ilf
+ *.ils
+- *.map
+ *.tds
+
+ # NetBeans
+--- 51,56 ----
+***************
+*** 69,74 ****
+--- 71,77 ----
+
+ # Generated by "make test"
+ src/po/*.ck
++ src/po/*.desktop
+ src/testdir/mbyte.vim
+ src/testdir/mzscheme.vim
+ src/testdir/lua.vim
+***************
+*** 81,87 ****
+--- 84,104 ----
+ src/testdir/messages
+ src/testdir/viminfo
+ src/testdir/opt_test.vim
++ runtime/indent/testdir/*.out
+ src/memfile_test
+ src/json_test
+ src/message_test
+ src/kword_test
++
++ # Generated by "make install"
++ runtime/doc/tags
++
++ # Generated by "make shadow". The directory names could be anything but we
++ # restrict them to shadow (the default) or shadow-*
++ src/shadow
++ src/shadow-*
++ src/runtime
++ src/pixmaps
++
++ # other possible files build by tools
++ src/cscope.out
+*** ../vim-8.1.1289/Filelist 2019-04-28 19:46:17.018060159 +0200
+--- Filelist 2019-05-07 21:37:05.920771010 +0200
+***************
+*** 3,8 ****
+--- 3,9 ----
+
+ # source files for all source archives
+ SRC_ALL = \
++ .gitignore \
+ .hgignore \
+ .lgtm.yml \
+ .travis.yml \
+*** ../vim-8.1.1289/src/version.c 2019-05-07 21:34:34.129561140 +0200
+--- src/version.c 2019-05-07 21:38:33.208329787 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1290,
+ /**/
+
+--
+My Go, this amn keyboar oesn't have a .
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1291 b/data/vim/patches/8.1.1291
new file mode 100644
index 000000000..2cb567dfc
--- /dev/null
+++ b/data/vim/patches/8.1.1291
@@ -0,0 +1,561 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1291
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1291
+Problem: Not easy to change directory and restore.
+Solution: Add the chdir() function. (Yegappan Lakshmanan, closes #4358)
+Files: runtime/doc/eval.txt, runtime/doc/todo.txt,
+ runtime/doc/usr_41.txt, src/evalfunc.c, src/ex_docmd.c,
+ src/if_py_both.h, src/proto/ex_docmd.pro, src/structs.h,
+ src/testdir/test_cd.vim
+
+
+*** ../vim-8.1.1290/runtime/doc/eval.txt 2019-05-05 18:11:46.312590682 +0200
+--- runtime/doc/eval.txt 2019-05-07 22:00:01.205510545 +0200
+***************
+*** 2273,2278 ****
+--- 2273,2279 ----
+ String status of channel {handle}
+ changenr() Number current change number
+ char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
++ chdir({dir}) String change current working directory
+ cindent({lnum}) Number C indent for line {lnum}
+ clearmatches([{win}]) none clear all matches
+ col({expr}) Number column nr of cursor or mark
+***************
+*** 3469,3474 ****
+--- 3470,3496 ----
+ let list = map(split(str, '\zs'), {_, val -> char2nr(val)})
+ < Result: [65, 66, 67]
+
++ chdir({dir}) *chdir()*
++ Change the current working directory to {dir}. The scope of
++ the directory change depends on the directory of the current
++ window:
++ - If the current window has a window-local directory
++ (|:lcd|), then changes the window local directory.
++ - Otherwise, if the current tabpage has a local
++ directory (|:tcd|) then changes the tabpage local
++ directory.
++ - Otherwise, changes the global directory.
++ If successful, returns the previous working directory. Pass
++ this to another chdir() to restore the directory.
++ On failure, returns an empty string.
++
++ Example: >
++ let save_dir = chdir(newdir)
++ if save_dir
++ " ... do some work
++ call chdir(save_dir)
++ endif
++ <
+ cindent({lnum}) *cindent()*
+ Get the amount of indent for line {lnum} according the C
+ indenting rules, as with 'cindent'.
+*** ../vim-8.1.1290/runtime/doc/usr_41.txt 2019-05-05 18:11:46.328590595 +0200
+--- runtime/doc/usr_41.txt 2019-05-07 21:56:20.282699661 +0200
+***************
+*** 769,774 ****
+--- 769,775 ----
+ haslocaldir() check if current window used |:lcd| or |:tcd|
+ tempname() get the name of a temporary file
+ mkdir() create a new directory
++ chdir() change current working directory
+ delete() delete a file
+ rename() rename a file
+ system() get the result of a shell command as a string
+*** ../vim-8.1.1290/src/evalfunc.c 2019-05-07 16:28:08.177289442 +0200
+--- src/evalfunc.c 2019-05-07 21:56:20.286699640 +0200
+***************
+*** 107,112 ****
+--- 107,113 ----
+ #endif
+ static void f_changenr(typval_T *argvars, typval_T *rettv);
+ static void f_char2nr(typval_T *argvars, typval_T *rettv);
++ static void f_chdir(typval_T *argvars, typval_T *rettv);
+ static void f_cindent(typval_T *argvars, typval_T *rettv);
+ static void f_clearmatches(typval_T *argvars, typval_T *rettv);
+ static void f_col(typval_T *argvars, typval_T *rettv);
+***************
+*** 597,602 ****
+--- 598,604 ----
+ #endif
+ {"changenr", 0, 0, f_changenr},
+ {"char2nr", 1, 2, f_char2nr},
++ {"chdir", 1, 1, f_chdir},
+ {"cindent", 1, 1, f_cindent},
+ {"clearmatches", 0, 1, f_clearmatches},
+ {"col", 1, 1, f_col},
+***************
+*** 2491,2496 ****
+--- 2493,2537 ----
+ }
+
+ /*
++ * "chdir(dir)" function
++ */
++ static void
++ f_chdir(typval_T *argvars, typval_T *rettv)
++ {
++ char_u *cwd;
++ cdscope_T scope = CDSCOPE_GLOBAL;
++
++ rettv->v_type = VAR_STRING;
++ rettv->vval.v_string = NULL;
++
++ if (argvars[0].v_type != VAR_STRING)
++ return;
++
++ // Return the current directory
++ cwd = alloc(MAXPATHL);
++ if (cwd != NULL)
++ {
++ if (mch_dirname(cwd, MAXPATHL) != FAIL)
++ {
++ #ifdef BACKSLASH_IN_FILENAME
++ slash_adjust(cwd);
++ #endif
++ rettv->vval.v_string = vim_strsave(cwd);
++ }
++ vim_free(cwd);
++ }
++
++ if (curwin->w_localdir != NULL)
++ scope = CDSCOPE_WINDOW;
++ else if (curtab->tp_localdir != NULL)
++ scope = CDSCOPE_TABPAGE;
++
++ if (!changedir_func(argvars[0].vval.v_string, TRUE, scope))
++ // Directory change failed
++ VIM_CLEAR(rettv->vval.v_string);
++ }
++
++ /*
+ * "cindent(lnum)" function
+ */
+ static void
+*** ../vim-8.1.1290/src/ex_docmd.c 2019-05-04 15:05:24.927269310 +0200
+--- src/ex_docmd.c 2019-05-07 21:56:20.286699640 +0200
+***************
+*** 7513,7529 ****
+
+ /*
+ * Deal with the side effects of changing the current directory.
+! * When "tablocal" is TRUE then this was after an ":tcd" command.
+! * When "winlocal" is TRUE then this was after an ":lcd" command.
+ */
+ void
+! post_chdir(int tablocal, int winlocal)
+ {
+! if (!winlocal)
+ // Clear tab local directory for both :cd and :tcd
+ VIM_CLEAR(curtab->tp_localdir);
+ VIM_CLEAR(curwin->w_localdir);
+! if (winlocal || tablocal)
+ {
+ /* If still in global directory, need to remember current
+ * directory as global directory. */
+--- 7513,7529 ----
+
+ /*
+ * Deal with the side effects of changing the current directory.
+! * When 'scope' is CDSCOPE_TABPAGE then this was after an ":tcd" command.
+! * When 'scope' is CDSCOPE_WINDOW then this was after an ":lcd" command.
+ */
+ void
+! post_chdir(cdscope_T scope)
+ {
+! if (scope != CDSCOPE_WINDOW)
+ // Clear tab local directory for both :cd and :tcd
+ VIM_CLEAR(curtab->tp_localdir);
+ VIM_CLEAR(curwin->w_localdir);
+! if (scope != CDSCOPE_GLOBAL)
+ {
+ /* If still in global directory, need to remember current
+ * directory as global directory. */
+***************
+*** 7532,7538 ****
+ /* Remember this local directory for the window. */
+ if (mch_dirname(NameBuff, MAXPATHL) == OK)
+ {
+! if (tablocal)
+ curtab->tp_localdir = vim_strsave(NameBuff);
+ else
+ curwin->w_localdir = vim_strsave(NameBuff);
+--- 7532,7538 ----
+ /* Remember this local directory for the window. */
+ if (mch_dirname(NameBuff, MAXPATHL) == OK)
+ {
+! if (scope == CDSCOPE_TABPAGE)
+ curtab->tp_localdir = vim_strsave(NameBuff);
+ else
+ curwin->w_localdir = vim_strsave(NameBuff);
+***************
+*** 7548,7649 ****
+ shorten_fnames(TRUE);
+ }
+
+-
+ /*
+! * ":cd", ":tcd", ":lcd", ":chdir" ":tchdir" and ":lchdir".
+ */
+! void
+! ex_cd(exarg_T *eap)
+ {
+- char_u *new_dir;
+ char_u *tofree;
+ int dir_differs;
+
+! new_dir = eap->arg;
+! #if !defined(UNIX) && !defined(VMS)
+! /* for non-UNIX ":cd" means: print current directory */
+! if (*new_dir == NUL)
+! ex_pwd(NULL);
+! else
+! #endif
+ {
+! if (allbuf_locked())
+! return;
+! if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged()
+! && !eap->forceit)
+! {
+! emsg(_("E747: Cannot change directory, buffer is modified (add ! to override)"));
+! return;
+! }
+
+! /* ":cd -": Change to previous directory */
+! if (STRCMP(new_dir, "-") == 0)
+ {
+! if (prev_dir == NULL)
+! {
+! emsg(_("E186: No previous directory"));
+! return;
+! }
+! new_dir = prev_dir;
+ }
+
+! /* Save current directory for next ":cd -" */
+! tofree = prev_dir;
+! if (mch_dirname(NameBuff, MAXPATHL) == OK)
+! prev_dir = vim_strsave(NameBuff);
+! else
+! prev_dir = NULL;
+
+ #if defined(UNIX) || defined(VMS)
+! /* for UNIX ":cd" means: go to home directory */
+! if (*new_dir == NUL)
+! {
+! /* use NameBuff for home directory name */
+ # ifdef VMS
+! char_u *p;
+
+! p = mch_getenv((char_u *)"SYS$LOGIN");
+! if (p == NULL || *p == NUL) /* empty is the same as not set */
+! NameBuff[0] = NUL;
+! else
+! vim_strncpy(NameBuff, p, MAXPATHL - 1);
+ # else
+! expand_env((char_u *)"$HOME", NameBuff, MAXPATHL);
+ # endif
+! new_dir = NameBuff;
+! }
+ #endif
+! dir_differs = new_dir == NULL || prev_dir == NULL
+! || pathcmp((char *)prev_dir, (char *)new_dir, -1) != 0;
+! if (new_dir == NULL || (dir_differs && vim_chdir(new_dir)))
+! emsg(_(e_failed));
+! else
+ {
+! char_u *acmd_fname;
+! int is_winlocal_chdir = eap->cmdidx == CMD_lcd
+! || eap->cmdidx == CMD_lchdir;
+! int is_tablocal_chdir = eap->cmdidx == CMD_tcd
+! || eap->cmdidx == CMD_tchdir;
+
+! post_chdir(is_tablocal_chdir, is_winlocal_chdir);
+
+! /* Echo the new current directory if the command was typed. */
+ if (KeyTyped || p_verbose >= 5)
+ ex_pwd(eap);
+-
+- if (dir_differs)
+- {
+- if (is_winlocal_chdir)
+- acmd_fname = (char_u *)"window";
+- else if (is_tablocal_chdir)
+- acmd_fname = (char_u *)"tabpage";
+- else
+- acmd_fname = (char_u *)"global";
+- apply_autocmds(EVENT_DIRCHANGED, acmd_fname,
+- new_dir, FALSE, curbuf);
+- }
+ }
+- vim_free(tofree);
+ }
+ }
+
+--- 7548,7673 ----
+ shorten_fnames(TRUE);
+ }
+
+ /*
+! * Change directory function used by :cd/:tcd/:lcd Ex commands and the
+! * chdir() function. If 'winlocaldir' is TRUE, then changes the window-local
+! * directory. If 'tablocaldir' is TRUE, then changes the tab-local directory.
+! * Otherwise changes the global directory.
+! * Returns TRUE if the directory is successfully changed.
+ */
+! int
+! changedir_func(
+! char_u *new_dir,
+! int forceit,
+! cdscope_T scope)
+ {
+ char_u *tofree;
+ int dir_differs;
++ int retval = FALSE;
+
+! if (allbuf_locked())
+! return FALSE;
+!
+! if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged() && !forceit)
+ {
+! emsg(_("E747: Cannot change directory, buffer is modified (add ! to override)"));
+! return FALSE;
+! }
+
+! // ":cd -": Change to previous directory
+! if (STRCMP(new_dir, "-") == 0)
+! {
+! if (prev_dir == NULL)
+ {
+! emsg(_("E186: No previous directory"));
+! return FALSE;
+ }
++ new_dir = prev_dir;
++ }
+
+! // Save current directory for next ":cd -"
+! tofree = prev_dir;
+! if (mch_dirname(NameBuff, MAXPATHL) == OK)
+! prev_dir = vim_strsave(NameBuff);
+! else
+! prev_dir = NULL;
+
+ #if defined(UNIX) || defined(VMS)
+! // for UNIX ":cd" means: go to home directory
+! if (*new_dir == NUL)
+! {
+! // use NameBuff for home directory name
+ # ifdef VMS
+! char_u *p;
+
+! p = mch_getenv((char_u *)"SYS$LOGIN");
+! if (p == NULL || *p == NUL) // empty is the same as not set
+! NameBuff[0] = NUL;
+! else
+! vim_strncpy(NameBuff, p, MAXPATHL - 1);
+ # else
+! expand_env((char_u *)"$HOME", NameBuff, MAXPATHL);
+ # endif
+! new_dir = NameBuff;
+! }
+ #endif
+! dir_differs = new_dir == NULL || prev_dir == NULL
+! || pathcmp((char *)prev_dir, (char *)new_dir, -1) != 0;
+! if (new_dir == NULL || (dir_differs && vim_chdir(new_dir)))
+! emsg(_(e_failed));
+! else
+! {
+! char_u *acmd_fname;
+!
+! post_chdir(scope);
+!
+! if (dir_differs)
+ {
+! if (scope == CDSCOPE_WINDOW)
+! acmd_fname = (char_u *)"window";
+! else if (scope == CDSCOPE_TABPAGE)
+! acmd_fname = (char_u *)"tabpage";
+! else
+! acmd_fname = (char_u *)"global";
+! apply_autocmds(EVENT_DIRCHANGED, acmd_fname, new_dir, FALSE,
+! curbuf);
+! }
+! retval = TRUE;
+! }
+! vim_free(tofree);
+
+! return retval;
+! }
+
+! /*
+! * ":cd", ":tcd", ":lcd", ":chdir" ":tchdir" and ":lchdir".
+! */
+! void
+! ex_cd(exarg_T *eap)
+! {
+! char_u *new_dir;
+!
+! new_dir = eap->arg;
+! #if !defined(UNIX) && !defined(VMS)
+! // for non-UNIX ":cd" means: print current directory
+! if (*new_dir == NUL)
+! ex_pwd(NULL);
+! else
+! #endif
+! {
+! cdscope_T scope = CDSCOPE_GLOBAL;
+!
+! if (eap->cmdidx == CMD_lcd || eap->cmdidx == CMD_lchdir)
+! scope = CDSCOPE_WINDOW;
+! else if (eap->cmdidx == CMD_tcd || eap->cmdidx == CMD_tchdir)
+! scope = CDSCOPE_TABPAGE;
+!
+! if (changedir_func(new_dir, eap->forceit, scope))
+! {
+! // Echo the new current directory if the command was typed.
+ if (KeyTyped || p_verbose >= 5)
+ ex_pwd(eap);
+ }
+ }
+ }
+
+*** ../vim-8.1.1290/src/if_py_both.h 2019-04-27 20:36:52.530303581 +0200
+--- src/if_py_both.h 2019-05-07 21:56:20.286699640 +0200
+***************
+*** 1032,1038 ****
+ Py_DECREF(newwd);
+ Py_XDECREF(todecref);
+
+! post_chdir(FALSE, FALSE);
+
+ if (VimTryEnd())
+ {
+--- 1032,1038 ----
+ Py_DECREF(newwd);
+ Py_XDECREF(todecref);
+
+! post_chdir(CDSCOPE_GLOBAL);
+
+ if (VimTryEnd())
+ {
+*** ../vim-8.1.1290/src/proto/ex_docmd.pro 2019-04-27 20:36:52.534303564 +0200
+--- src/proto/ex_docmd.pro 2019-05-07 21:56:20.286699640 +0200
+***************
+*** 37,43 ****
+ void tabpage_new(void);
+ void do_exedit(exarg_T *eap, win_T *old_curwin);
+ void free_cd_dir(void);
+! void post_chdir(int tablocal, int winlocal);
+ void ex_cd(exarg_T *eap);
+ void do_sleep(long msec);
+ void ex_may_print(exarg_T *eap);
+--- 37,44 ----
+ void tabpage_new(void);
+ void do_exedit(exarg_T *eap, win_T *old_curwin);
+ void free_cd_dir(void);
+! void post_chdir(cdscope_T cdscope);
+! int changedir_func(char_u *new_dir, int forceit, cdscope_T cdscope);
+ void ex_cd(exarg_T *eap);
+ void do_sleep(long msec);
+ void ex_may_print(exarg_T *eap);
+*** ../vim-8.1.1290/src/structs.h 2019-05-05 15:47:37.825923529 +0200
+--- src/structs.h 2019-05-07 22:01:54.424899979 +0200
+***************
+*** 3555,3557 ****
+--- 3555,3564 ----
+ varnumber_T vv_count;
+ varnumber_T vv_count1;
+ } vimvars_save_T;
++
++ // Scope for changing directory
++ typedef enum {
++ CDSCOPE_GLOBAL, // :cd
++ CDSCOPE_TABPAGE, // :tcd
++ CDSCOPE_WINDOW // :lcd
++ } cdscope_T;
+*** ../vim-8.1.1290/src/testdir/test_cd.vim 2018-07-03 18:36:23.037340552 +0200
+--- src/testdir/test_cd.vim 2019-05-07 21:56:20.286699640 +0200
+***************
+*** 1,4 ****
+! " Test for :cd
+
+ func Test_cd_large_path()
+ " This used to crash with a heap write overflow.
+--- 1,4 ----
+! " Test for :cd and chdir()
+
+ func Test_cd_large_path()
+ " This used to crash with a heap write overflow.
+***************
+*** 65,67 ****
+--- 65,108 ----
+ set cpo&
+ bw!
+ endfunc
++
++ " Test for chdir()
++ func Test_chdir_func()
++ let topdir = getcwd()
++ call mkdir('Xdir/y/z', 'p')
++
++ " Create a few tabpages and windows with different directories
++ new
++ cd Xdir
++ tabnew
++ tcd y
++ below new
++ below new
++ lcd z
++
++ tabfirst
++ call chdir('..')
++ call assert_equal('y', fnamemodify(getcwd(1, 2), ':t'))
++ call assert_equal('z', fnamemodify(getcwd(3, 2), ':t'))
++ tabnext | wincmd t
++ call chdir('..')
++ call assert_equal('Xdir', fnamemodify(getcwd(1, 2), ':t'))
++ call assert_equal('Xdir', fnamemodify(getcwd(2, 2), ':t'))
++ call assert_equal('z', fnamemodify(getcwd(3, 2), ':t'))
++ call assert_equal('testdir', fnamemodify(getcwd(1, 1), ':t'))
++ 3wincmd w
++ call chdir('..')
++ call assert_equal('Xdir', fnamemodify(getcwd(1, 2), ':t'))
++ call assert_equal('Xdir', fnamemodify(getcwd(2, 2), ':t'))
++ call assert_equal('y', fnamemodify(getcwd(3, 2), ':t'))
++ call assert_equal('testdir', fnamemodify(getcwd(1, 1), ':t'))
++
++ " Error case
++ call assert_fails("call chdir('dir-abcd')", 'E472:')
++ silent! let d = chdir("dir_abcd")
++ call assert_equal("", d)
++
++ only | tabonly
++ exe 'cd ' . topdir
++ call delete('Xdir', 'rf')
++ endfunc
+*** ../vim-8.1.1290/src/version.c 2019-05-07 21:48:15.629291397 +0200
+--- src/version.c 2019-05-07 22:06:10.403517496 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1291,
+ /**/
+
+--
+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.1292 b/data/vim/patches/8.1.1292
new file mode 100644
index 000000000..96bc50473
--- /dev/null
+++ b/data/vim/patches/8.1.1292
@@ -0,0 +1,135 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1292
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1292
+Problem: Invalid command line arguments not tested.
+Solution: Add a test. (Dominique Pelle, closes #4346)
+Files: src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.1291/src/testdir/test_startup.vim 2019-04-21 15:54:29.606587753 +0200
+--- src/testdir/test_startup.vim 2019-05-07 22:08:46.442674152 +0200
+***************
+*** 385,390 ****
+--- 385,480 ----
+ call delete('Xtestout')
+ endfunc
+
++ func Test_invalid_args()
++ if !has('unix') || has('gui_running')
++ " can't get output of Vim.
++ return
++ endif
++
++ for opt in ['-Y', '--does-not-exist']
++ let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
++ call assert_equal(1, v:shell_error)
++ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
++ call assert_equal('Unknown option argument: "' .. opt .. '"', out[1])
++ call assert_equal('More info with: "vim -h"', out[2])
++ endfor
++
++ for opt in ['-c', '-i', '-s', '-t', '-T', '-u', '-U', '-w', '-W', '--cmd', '--startuptime']
++ let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
++ call assert_equal(1, v:shell_error)
++ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
++ call assert_equal('Argument missing after: "' .. opt .. '"', out[1])
++ call assert_equal('More info with: "vim -h"', out[2])
++ endfor
++
++ if has('clientserver')
++ " FIXME: need to add --servername to this list
++ " but it causes vim-8.1.1282 to crash!
++ for opt in ['--remote', '--remote-send', '--remote-silent', '--remote-expr',
++ \ '--remote-tab', '--remote-tab-wait',
++ \ '--remote-tab-wait-silent', '--remote-tab-silent',
++ \ '--remote-wait', '--remote-wait-silent',
++ \ ]
++ let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
++ call assert_equal(1, v:shell_error)
++ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
++ call assert_equal('Argument missing after: "' .. opt .. '"', out[1])
++ call assert_equal('More info with: "vim -h"', out[2])
++ endfor
++ endif
++
++ " FIXME: commented out as this causes vim-8.1.1282 to crash!
++ "if has('clipboard')
++ " let out = split(system(GetVimCommand() .. ' --display'), "\n")
++ " call assert_equal(1, v:shell_error)
++ " call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
++ " call assert_equal('Argument missing after: "--display"', out[1])
++ " call assert_equal('More info with: "vim -h"', out[2])
++ "endif
++
++ let out = split(system(GetVimCommand() .. ' -ix'), "\n")
++ call assert_equal(1, v:shell_error)
++ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
++ call assert_equal('Garbage after option argument: "-ix"', out[1])
++ call assert_equal('More info with: "vim -h"', out[2])
++
++ let out = split(system(GetVimCommand() .. ' - xxx'), "\n")
++ call assert_equal(1, v:shell_error)
++ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
++ call assert_equal('Too many edit arguments: "xxx"', out[1])
++ call assert_equal('More info with: "vim -h"', out[2])
++
++ " Detect invalid repeated arguments '-t foo -t foo", '-q foo -q foo'.
++ for opt in ['-t', '-q']
++ let out = split(system(GetVimCommand() .. repeat(' ' .. opt .. ' foo', 2)), "\n")
++ call assert_equal(1, v:shell_error)
++ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
++ call assert_equal('Too many edit arguments: "' .. opt .. '"', out[1])
++ call assert_equal('More info with: "vim -h"', out[2])
++ endfor
++
++ for opt in [' -cq', ' --cmd q', ' +', ' -S foo']
++ let out = split(system(GetVimCommand() .. repeat(opt, 11)), "\n")
++ call assert_equal(1, v:shell_error)
++ " FIXME: The error message given by Vim is not ideal in case of repeated
++ " -S foo since it does not mention -S.
++ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
++ call assert_equal('Too many "+command", "-c command" or "--cmd command" arguments', out[1])
++ call assert_equal('More info with: "vim -h"', out[2])
++ endfor
++
++ " FIXME: commented out as this causes vim-8.1.1282 to crash!
++ "if has('gui_gtk')
++ " for opt in ['--socketid x', '--socketid 0xg']
++ " let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
++ " call assert_equal(1, v:shell_error)
++ " call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
++ " call assert_equal('Invalid argument for: "--socketid"', out[1])
++ " call assert_equal('More info with: "vim -h"', out[2])
++ " endfor
++ "endif
++ endfunc
++
+ func Test_file_args()
+ let after = [
+ \ 'call writefile(argv(), "Xtestout")',
+*** ../vim-8.1.1291/src/version.c 2019-05-07 22:06:48.679310672 +0200
+--- src/version.c 2019-05-07 22:10:23.630205185 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1292,
+ /**/
+
+--
+Dogs must have a permit signed by the mayor in order to congregate in groups
+of three or more on private property.
+ [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.1293 b/data/vim/patches/8.1.1293
new file mode 100644
index 000000000..d37e6e3f4
--- /dev/null
+++ b/data/vim/patches/8.1.1293
@@ -0,0 +1,1036 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1293
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1293
+Problem: MSVC files are no longer useful for debugging. Newer Visual
+ Studio versions cannot read them.
+Solution: Delete the files. (Ken Takata, closes #4357)
+Files: Filelist, src/Make_dvc.mak, src/Make_ivc.mak,
+ runtime/doc/debug.txt, src/INSTALLpc.txt, src/Make_mvc.mak
+
+
+*** ../vim-8.1.1292/Filelist 2019-05-07 21:48:15.625291418 +0200
+--- Filelist 2019-05-07 22:19:21.527914030 +0200
+***************
+*** 424,431 ****
+ src/Make_bc5.mak \
+ src/Make_cyg.mak \
+ src/Make_cyg_ming.mak \
+- src/Make_ivc.mak \
+- src/Make_dvc.mak \
+ src/Make_ming.mak \
+ src/Make_mvc.mak \
+ tools/rename.bat \
+--- 424,429 ----
+*** ../vim-8.1.1292/src/Make_dvc.mak 2010-05-15 13:04:10.000000000 +0200
+--- src/Make_dvc.mak 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,105 ****
+- # Microsoft Developer Studio Generated NMAKE File, Format Version 4.00
+- # ** DO NOT EDIT **
+-
+- # TARGTYPE "Win32 (x86) Console Application" 0x0103
+-
+- !IF "$(CFG)" == ""
+- CFG=Vim - Win32 IDE for Make_mvc.mak
+- !MESSAGE No configuration specified. Defaulting to Vim - Win32 IDE for\
+- Make_mvc.mak.
+- !ENDIF
+-
+- !IF "$(CFG)" != "Vim - Win32 IDE for Make_mvc.mak"
+- !MESSAGE Invalid configuration "$(CFG)" specified.
+- !MESSAGE You can specify a configuration when running NMAKE on this makefile
+- !MESSAGE by defining the macro CFG on the command line. For example:
+- !MESSAGE
+- !MESSAGE NMAKE /f "Make_dvc.mak" CFG="Vim - Win32 IDE for Make_mvc.mak"
+- !MESSAGE
+- !MESSAGE Possible choices for configuration are:
+- !MESSAGE
+- !MESSAGE "Vim - Win32 IDE for Make_mvc.mak" (based on\
+- "Win32 (x86) Console Application")
+- !MESSAGE
+- !ERROR An invalid configuration is specified.
+- !ENDIF
+-
+- !IF "$(OS)" == "Windows_NT"
+- NULL=
+- !ELSE
+- NULL=nul
+- !ENDIF
+- ################################################################################
+- # Begin Project
+- # PROP Target_Last_Scanned "Vim - Win32 IDE for Make_mvc.mak"
+- CPP=cl.exe
+- RSC=rc.exe
+- # PROP Use_MFC 0
+- # PROP Use_Debug_Libraries 0
+- # PROP Output_Dir ""
+- # PROP Intermediate_Dir ""
+- # PROP Target_Dir ""
+- OUTDIR=.
+- INTDIR=.
+-
+- ALL : "$(OUTDIR)\vimrun.exe"
+-
+- CLEAN :
+- -@erase ".\vimrun.exe"
+- -@erase ".\vimrun.obj"
+-
+- # ADD CPP /nologo /c
+- # ADD BASE RSC /l 0x809
+- # ADD RSC /l 0x809 /d "NDEBUG"
+- BSC32=bscmake.exe
+- # ADD BSC32 /nologo
+- BSC32_FLAGS=/nologo /o"$(OUTDIR)/Make_dvc.bsc"
+- BSC32_SBRS=
+- LINK32=link.exe
+- # ADD BASE LINK32 /machine:IX86
+- # ADD LINK32 /nologo /pdb:none /machine:IX86 /out:"vimrun.exe"
+- LINK32_FLAGS=/nologo /pdb:none /machine:IX86 /out:"$(OUTDIR)/vimrun.exe"
+- LINK32_OBJS= \
+- "$(INTDIR)/vimrun.obj"
+-
+- "$(OUTDIR)\vimrun.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+- $(LINK32) @<<
+- $(LINK32_FLAGS) $(LINK32_OBJS)
+- <<
+-
+- CPP_PROJ=/nologo /ML /c
+-
+- .c.obj:
+- $(CPP) $(CPP_PROJ) $<
+-
+- .cpp.obj:
+- $(CPP) $(CPP_PROJ) $<
+-
+- .cxx.obj:
+- $(CPP) $(CPP_PROJ) $<
+-
+- .c.sbr:
+- $(CPP) $(CPP_PROJ) $<
+-
+- .cpp.sbr:
+- $(CPP) $(CPP_PROJ) $<
+-
+- .cxx.sbr:
+- $(CPP) $(CPP_PROJ) $<
+-
+- ################################################################################
+- # Begin Target
+-
+- # Name "Vim - Win32 IDE for Make_mvc.mak"
+- ################################################################################
+- # Begin Source File
+-
+- SOURCE=.\vimrun.c
+-
+- "$(INTDIR)\vimrun.obj" : $(SOURCE) "$(INTDIR)"
+-
+-
+- # End Source File
+- # End Target
+- # End Project
+- ################################################################################
+--- 0 ----
+*** ../vim-8.1.1292/src/Make_ivc.mak 2019-04-27 13:03:20.000715982 +0200
+--- src/Make_ivc.mak 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,778 ****
+- # Microsoft Developer Studio Generated NMAKE File, Format Version 4.00
+- # ** DO NOT EDIT **
+- #
+- # Make_ivc.mak Makefile to build vim in both IDE and nmake.
+- # This file can be imported as a workspace into Visual Studio. It must be in
+- # DOS fileformat then!
+- #
+- # It is worth making the file read-only as the VC4 IDE will try to overwrite
+- # it with a HUGELY expanded clone of itself.
+- #
+- # The following points are worth noting:
+- # 1) Comments here are ignored by VC[456].0 IDEs
+- # 2) # ADD LINK32 /pdb:.\Dbg/vimd.pdb is written so rather than
+- # # ADD LINK32 /pdb:".\Dbg/vimd.pdb" to avoid VC4 -> VC5 conversion failure
+- # 3) It is good to delete .pdb file before linking to cope with switch among
+- # VC[456] as IDE clean action does not remove that file and link clashes
+- # with it. The following works in VC5 but not in VC4 which does not support
+- # pre-link actions. The nmake action does such deletions.
+- # Begin Special Build Tool
+- PreLink_Cmds=@if exist .\oleDbg\gvimd.pdb del .\oleDbg\gvimd.pdb
+- # End Special Build Tool
+- # 4) I was unable to make !IFDEF OLE, etc. work in the VC4 IDE.
+- # I was aiming for 4 configurations with sub-configurations selected by
+- # environment variables.
+- # 5) Optimisation is not supported by disabled versions of VC. This results in
+- # messages for Release builds like:
+- # Command line warning D4025 : overriding '/O2' with '/Od'
+- # 6) nmake 1.62 and later support batch compilation. I was unable to use this
+- # in a manner acceptable to earlier IDEs.
+- #
+- # History
+- #
+- # When Who What
+- # 2001-07-06 W.Briscoe Original derived from Make_[go]vc.mak with less noise
+- # 2001-07-08 W.Briscoe Further noise reduction; consistent .map and .pdb logic
+- # Added install.exe rule, etc.; Removed unused libraries.
+- # 2001-08-09 W.Briscoe Restored VC4.0-required trailing space in !MESSAGE afore
+- # Enhanced if_ole.idl rule to use /out argument.
+- # Default rules now relative to . to reduce IDE/nmake difs
+-
+- # TARGTYPE "Win32 (x86) Console Application" 0x0103
+-
+- !IF "$(CFG)" == ""
+- CFG=Vim - Win32 Release gvim OLE
+- !MESSAGE No configuration specified. Defaulting to Vim - Win32 Release gvim OLE.
+- !ENDIF
+-
+- !IF "$(CFG)" != "Vim - Win32 Release gvim OLE"\
+- && "$(CFG)" != "Vim - Win32 Debug gvim OLE"\
+- && "$(CFG)" != "Vim - Win32 Release gvim"\
+- && "$(CFG)" != "Vim - Win32 Debug gvim"\
+- && "$(CFG)" != "Vim - Win32 Release vim"\
+- && "$(CFG)" != "Vim - Win32 Debug vim"
+- !MESSAGE Invalid configuration "$(CFG)" specified.
+- !MESSAGE You can specify a configuration when running NMAKE on this makefile
+- !MESSAGE by defining the macro CFG on the command line. For example:
+- !MESSAGE
+- !MESSAGE NMAKE /f "Make_ivc.mak" CFG="Vim - Win32 Debug vim"
+- !MESSAGE
+- !MESSAGE Possible choices for configuration are:
+- !MESSAGE
+- !MESSAGE "Vim - Win32 Release gvim OLE" (based on "Win32 (x86) Console Application")
+- !MESSAGE "Vim - Win32 Debug gvim OLE" (based on "Win32 (x86) Console Application")
+- !MESSAGE "Vim - Win32 Release gvim" (based on "Win32 (x86) Console Application")
+- !MESSAGE "Vim - Win32 Debug gvim" (based on "Win32 (x86) Console Application")
+- !MESSAGE "Vim - Win32 Release vim" (based on "Win32 (x86) Console Application")
+- !MESSAGE "Vim - Win32 Debug vim" (based on "Win32 (x86) Console Application")
+- !MESSAGE
+- !ERROR An invalid configuration is specified.
+- !ENDIF
+-
+- !IF "$(OS)" == "Windows_NT"
+- NULL=
+- DEL_TREE = rmdir /s /q
+- !ELSE
+- NULL=nul
+- DEL_TREE = deltree /y
+- !ENDIF
+-
+- # Begin Project
+- # PROP Target_Last_Scanned "Vim - Win32 Debug vim"
+- # PROP Use_MFC 0
+-
+- RSC=rc.exe
+- CPP=cl.exe
+- LINK32=link.exe
+-
+- CPP_PROJ= /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c
+- # ADD CPP /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c
+-
+- LINK32_FLAGS= oldnames.lib kernel32.lib user32.lib gdi32.lib version.lib comdlg32.lib comctl32.lib advapi32.lib shell32.lib ole32.lib netapi32.lib uuid.lib /nologo /machine:I386 /nodefaultlib
+- # ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib version.lib comdlg32.lib comctl32.lib advapi32.lib shell32.lib ole32.lib uuid.lib /nologo /machine:I386 /nodefaultlib
+- # SUBTRACT LINK32 /incremental:yes
+-
+- RSC_PROJ= /l 0x409 /d "FEAT_GUI_MSWIN"
+- # ADD RSC /l 0x409 /d "FEAT_GUI_MSWIN"
+-
+- !IF "$(CFG)" == "Vim - Win32 Release gvim OLE"
+-
+- # PROP Use_Debug_Libraries 0
+- # PROP Output_Dir .\oleRel
+- # PROP Intermediate_Dir .\oleRel
+-
+- INTDIR=.\oleRel
+- VIM=gvim
+- EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+-
+- CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_MSWIN" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+- # ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_MSWIN" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+-
+- RSC_PROJ=$(RSC_PROJ) /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
+- # ADD RSC /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
+-
+- LINK32_FLAGS=$(LINK32_FLAGS) /pdb:.\oleRel/gvim.pdb -debug:full -debugtype:cv,fixup /map:.\oleDbg\gvim.map libc.lib oleaut32.lib /subsystem:windows /out:.\gvim.exe
+- # ADD LINK32 /pdb:.\oleRel/gvim.pdb -debug:full -debugtype:cv,fixup /map:.\oleDbg\gvim.map libc.lib oleaut32.lib /subsystem:windows /out:.\gvim.exe
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim OLE"
+-
+- # PROP Use_Debug_Libraries 1
+- # PROP Output_Dir .\oleDbg
+- # PROP Intermediate_Dir .\oleDbg
+-
+- INTDIR=.\oleDbg
+- VIM=gvimd
+- EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+-
+- CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI_MSWIN" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+- # ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI_MSWIN" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+-
+- RSC_PROJ=$(RSC_PROJ) /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
+- # ADD RSC /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
+-
+- LINK32_FLAGS=$(LINK32_FLAGS) libcd.lib oleaut32.lib /subsystem:windows /debug /profile /pdb:.\oleDbg/gvimd.pdb -debug:full -debugtype:cv,fixup /map:.\oleDbg\gvimd.map /out:.\gvimd.exe
+- # ADD LINK32 libcd.lib oleaut32.lib /subsystem:windows /debug /profile /pdb:.\oleDbg/gvimd.pdb -debug:full -debugtype:cv,fixup /map:.\oleDbg\gvimd.map /out:.\gvimd.exe
+-
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Release gvim"
+-
+- # PROP Use_Debug_Libraries 0
+- # PROP Output_Dir .\gRel
+- # PROP Intermediate_Dir .\gRel
+-
+- INTDIR=.\gRel
+- VIM=gvim
+- EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+-
+- CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_MSWIN" /Fd.\gRel/ /Fo.\gRel/
+- # ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_MSWIN" /Fd.\gRel/ /Fo.\gRel/
+-
+- RSC_PROJ=$(RSC_PROJ) /d "NDEBUG" /fo.\gRel\vim.res
+- # ADD RSC /d "NDEBUG" /fo.\gRel\vim.res
+-
+- LINK32_FLAGS=$(LINK32_FLAGS) /pdb:.\gRel/gvim.pdb -debug:full -debugtype:cv,fixup /map:.\oleDbg\gvim.map libc.lib /subsystem:windows /out:.\gvim.exe
+- # ADD LINK32 /pdb:.\gRel/gvim.pdb -debug:full -debugtype:cv,fixup /map:.\oleDbg\gvim.map libc.lib /subsystem:windows /out:.\gvim.exe
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim"
+-
+- # PROP Use_Debug_Libraries 1
+- # PROP Output_Dir .\gDbg
+- # PROP Intermediate_Dir .\gDbg
+-
+- INTDIR=.\gDbg
+- VIM=gvimd
+- EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
+-
+- CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI_MSWIN" /Fd.\gDbg/ /Fo.\gDbg/
+- # ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI_MSWIN" /Fd.\gDbg/ /Fo.\gDbg/
+-
+- RSC_PROJ=$(RSC_PROJ) /d "_DEBUG" /fo.\gDbg\vim.res
+- # ADD RSC /d "_DEBUG" /fo.\gDbg\vim.res
+-
+- LINK32_FLAGS=$(LINK32_FLAGS) libcd.lib /subsystem:windows /debug /profile /pdb:.\gDbg/gvimd.pdb -debug:full -debugtype:cv,fixup /map:.\gDbg\gvimd.map /out:.\gvimd.exe
+- # ADD LINK32 libcd.lib /subsystem:windows /debug /profile /pdb:.\gDbg/gvimd.pdb -debug:full -debugtype:cv,fixup /map:.\gDbg\gvimd.map /out:.\gvimd.exe
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Release vim"
+-
+- # PROP Use_Debug_Libraries 0
+- # PROP Output_Dir .\Rel
+- # PROP Intermediate_Dir .\Rel
+-
+- INTDIR=.\Rel
+- VIM=vim
+- EXTRAS=
+-
+- CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /Fd.\Rel/ /Fo.\Rel/
+- # ADD CPP /Zi /O2 /D "NDEBUG" /Fd.\Rel/ /Fo.\Rel/
+-
+- LINK32_FLAGS=$(LINK32_FLAGS) /pdb:.\Rel/vim.pdb -debug:full -debugtype:cv,fixup /map:.\oleDbg\vim.map libc.lib /subsystem:console /out:.\vim.exe
+- # ADD LINK32 /pdb:.\Rel/vim.pdb -debug:full -debugtype:cv,fixup /map:.\oleDbg\vim.map libc.lib /subsystem:console /out:.\vim.exe
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug vim"
+-
+- # PROP Use_Debug_Libraries 1
+- # PROP Output_Dir .\Dbg
+- # PROP Intermediate_Dir .\Dbg
+-
+- INTDIR=.\Dbg
+- VIM=vimd
+- EXTRAS=
+-
+- CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /Fd.\Dbg/ /Fo.\Dbg/
+- # ADD CPP /Zi /Od /D "_DEBUG" /Fd.\Dbg/ /Fo.\Dbg/
+-
+- LINK32_FLAGS=$(LINK32_FLAGS) libcd.lib /subsystem:console /debug /profile /pdb:.\Dbg/vimd.pdb -debug:full -debugtype:cv,fixup /map:.\Dbg/vimd.map /out:.\vimd.exe
+- # ADD LINK32 libcd.lib /subsystem:console /debug /profile /pdb:.\Dbg/vimd.pdb -debug:full -debugtype:cv,fixup /map:.\Dbg/vimd.map /out:.\vimd.exe
+-
+- !ENDIF
+-
+- ALL : .\$(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe GvimExt/gvimext.dll
+-
+- LINK32_OBJS= \
+- $(EXTRAS) \
+- "$(INTDIR)/arabic.obj" \
+- "$(INTDIR)/autocmd.obj" \
+- "$(INTDIR)/blowfish.obj" \
+- "$(INTDIR)/buffer.obj" \
+- "$(INTDIR)/charset.obj" \
+- "$(INTDIR)/crypt.obj" \
+- "$(INTDIR)/crypt_zip.obj" \
+- "$(INTDIR)/debugger.obj" \
+- "$(INTDIR)/dict.obj" \
+- "$(INTDIR)/diff.obj" \
+- "$(INTDIR)/digraph.obj" \
+- "$(INTDIR)/edit.obj" \
+- "$(INTDIR)/eval.obj" \
+- "$(INTDIR)/evalfunc.obj" \
+- "$(INTDIR)/ex_cmds.obj" \
+- "$(INTDIR)/ex_cmds2.obj" \
+- "$(INTDIR)/ex_docmd.obj" \
+- "$(INTDIR)/ex_eval.obj" \
+- "$(INTDIR)/ex_getln.obj" \
+- "$(INTDIR)/fileio.obj" \
+- "$(INTDIR)/findfile.obj" \
+- "$(INTDIR)/fold.obj" \
+- "$(INTDIR)/getchar.obj" \
+- "$(INTDIR)/hardcopy.obj" \
+- "$(INTDIR)/hashtab.obj" \
+- "$(INTDIR)/indent.obj" \
+- "$(INTDIR)/insexpand.obj" \
+- "$(INTDIR)/json.obj" \
+- "$(INTDIR)/list.obj" \
+- "$(INTDIR)/main.obj" \
+- "$(INTDIR)/mark.obj" \
+- "$(INTDIR)/mbyte.obj" \
+- "$(INTDIR)/memfile.obj" \
+- "$(INTDIR)/memline.obj" \
+- "$(INTDIR)/menu.obj" \
+- "$(INTDIR)/message.obj" \
+- "$(INTDIR)/misc1.obj" \
+- "$(INTDIR)/misc2.obj" \
+- "$(INTDIR)/move.obj" \
+- "$(INTDIR)/normal.obj" \
+- "$(INTDIR)/ops.obj" \
+- "$(INTDIR)/option.obj" \
+- "$(INTDIR)/os_mswin.obj" \
+- "$(INTDIR)/winclip.obj" \
+- "$(INTDIR)/os_win32.obj" \
+- "$(INTDIR)/popupmnu.obj" \
+- "$(INTDIR)/quickfix.obj" \
+- "$(INTDIR)/regexp.obj" \
+- "$(INTDIR)/screen.obj" \
+- "$(INTDIR)/search.obj" \
+- "$(INTDIR)/sha256.obj" \
+- "$(INTDIR)/sign.obj" \
+- "$(INTDIR)/spell.obj" \
+- "$(INTDIR)/spellfile.obj" \
+- "$(INTDIR)/syntax.obj" \
+- "$(INTDIR)/tag.obj" \
+- "$(INTDIR)/term.obj" \
+- "$(INTDIR)/ui.obj" \
+- "$(INTDIR)/undo.obj" \
+- "$(INTDIR)/usercmd.obj" \
+- "$(INTDIR)/userfunc.obj" \
+- "$(INTDIR)/version.obj" \
+- "$(INTDIR)/window.obj"
+-
+- ".\$(VIM).exe" : "$(INTDIR)" $(EXTRAS) $(LINK32_OBJS)
+- @if exist $(INTDIR)\$(VIM).pdb del $(INTDIR)\$(VIM).pdb
+- $(LINK32) $(LINK32_FLAGS) $(LINK32_OBJS)
+-
+- "$(INTDIR)" :
+- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
+-
+- CLEAN :
+- -@if exist "$(INTDIR)/$(NULL)" $(DEL_TREE) "$(INTDIR)"
+- -@if exist $(VIM).exe erase $(VIM).exe
+- -@if exist $(VIM).ilk erase $(VIM).ilk
+- -@if exist $(VIM).map erase $(VIM).map
+- -@if exist $(VIM).pdb erase $(VIM).pdb
+- -@if exist DLLDATA.C erase DLLDATA.C
+- -@if exist Make_ivc.bak attrib -r Make_ivc.bak
+- -@if exist Make_ivc.bak erase Make_ivc.bak
+- -@if exist Make_ivc.dsp erase Make_ivc.dsp
+- -@if exist Make_ivc.dsw erase Make_ivc.dsw
+- -@if exist Make_ivc.mdp erase Make_ivc.mdp
+- -@if exist Make_ivc.ncb erase Make_ivc.ncb
+- -@if exist Make_ivc.opt erase Make_ivc.opt
+- -@if exist Make_ivc.plg erase Make_ivc.plg
+- -@if exist dosinst.obj erase dosinst.obj
+- -@if exist install.exe erase install.exe
+- -@if exist uninstal.exe erase uninstal.exe
+- -@if exist uninstal.obj erase uninstal.obj
+- -@if exist vimrun.exe erase vimrun.exe
+- -@if exist vimrun.obj erase vimrun.obj
+-
+-
+- install.exe: dosinst.c
+- $(CPP) /Fe$@ /nologo /W3 -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib user32.lib ole32.lib advapi32.lib uuid.lib
+-
+- uninstal.exe: uninstal.c
+- $(CPP) /nologo /W3 -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib
+-
+- vimrun.exe: vimrun.c
+- $(CPP) /nologo /W3 -DNDEBUG vimrun.c
+-
+- xxd/xxd.exe: xxd/xxd.c
+- cd xxd
+- $(MAKE) /NOLOGO -f Make_mvc.mak
+- cd ..
+-
+- GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
+- cd GvimExt
+- $(MAKE) /NOLOGO -f Makefile
+- cd ..
+-
+- {.}.c{$(INTDIR)/}.obj:
+- $(CPP) $(CPP_PROJ) $<
+-
+- {.}.cpp{$(INTDIR)/}.obj:
+- $(CPP) $(CPP_PROJ) /I $(INTDIR) $<
+-
+- {.}.rc{$(INTDIR)/}.res:
+- $(RSC) $(RSC_PROJ) $<
+-
+- # Begin Target
+-
+- # Name "Vim - Win32 Release gvim OLE"
+- # Name "Vim - Win32 Debug gvim OLE"
+- # Name "Vim - Win32 Release gvim"
+- # Name "Vim - Win32 Debug gvim"
+- # Name "Vim - Win32 Release vim"
+- # Name "Vim - Win32 Debug vim"
+-
+- # Begin Source File
+-
+- SOURCE=.\arabic.c
+- # End Source File
+- # Begin Source File
+- #
+- SOURCE=.\autocmd.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\blowfish.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\buffer.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\charset.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\crypt.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\crypt_zip.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\debugger.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\dict.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\diff.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\digraph.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\edit.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\eval.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\evalfunc.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\ex_cmds.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\ex_cmds2.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\ex_docmd.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\ex_eval.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\ex_getln.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\fileio.c
+- # End Source File
+- # Begin Source File
+- #
+- SOURCE=.\findfile.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\fold.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\getchar.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\hardcopy.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\hashtab.c
+- # End Source File
+- # Begin Source File
+- #
+- SOURCE=.\indent.c
+- # End Source File
+- # Begin Source File
+- #
+- SOURCE=.\insexpand.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\gui.c
+-
+- !IF "$(CFG)" == "Vim - Win32 Release vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ENDIF
+-
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\gui_w32.c
+-
+- !IF "$(CFG)" == "Vim - Win32 Release vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ENDIF
+-
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\gui_beval.c
+-
+- !IF "$(CFG)" == "Vim - Win32 Release vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ENDIF
+-
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\os_w32exe.c
+-
+- !IF "$(CFG)" == "Vim - Win32 Release vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ENDIF
+-
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\if_ole.cpp
+-
+- !IF "$(CFG)" == "Vim - Win32 Release gvim OLE"
+-
+- # PROP Ignore_Default_Tool 1
+- # Begin Custom Build
+-
+- "$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+- cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_MSWIN" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/ /I ".\oleRel" .\if_ole.cpp
+- @rem This is the default rule with /I "$(IntDir)" added
+-
+- # End Custom Build
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim OLE"
+-
+- # PROP Ignore_Default_Tool 1
+- # Begin Custom Build
+-
+- "$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+- cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /Od /D "_DEBUG" /D "FEAT_GUI_MSWIN" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/ /I ".\oleDbg" .\if_ole.cpp
+- @rem This is the default rule with /I "$(IntDir)" added
+-
+- # End Custom Build
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Release gvim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Release vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ENDIF
+-
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\if_ole.idl
+-
+- !IF "$(CFG)" == "Vim - Win32 Release gvim OLE"
+-
+- # PROP Ignore_Default_Tool 1
+- # Begin Custom Build
+-
+- "$(INTDIR)\if_ole.h" : $(SOURCE) "$(INTDIR)"
+- if exist .\if_ole.h del .\if_ole.h
+- midl /out .\oleRel /iid iid_ole.c /tlb vim.tlb /proxy nul /header if_ole.h .\if_ole.idl
+-
+- # End Custom Build
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim OLE"
+-
+- # PROP Ignore_Default_Tool 1
+- # Begin Custom Build
+-
+- "$(INTDIR)\if_ole.h" : $(SOURCE) "$(INTDIR)"
+- if exist .\if_ole.h del .\if_ole.h
+- midl /out .\oleDbg /iid iid_ole.c /tlb vim.tlb /proxy nul /header if_ole.h .\if_ole.idl
+-
+- # End Custom Build
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Release gvim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Release vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ENDIF
+-
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\json.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\list.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\main.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\mark.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\mbyte.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\memfile.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\memline.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\menu.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\message.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\misc1.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\misc2.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\move.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\normal.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\ops.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\option.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\os_mswin.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\winclip.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\os_win32.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\popupmnu.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\quickfix.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\regexp.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\screen.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\search.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\sha256.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\sign.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\spell.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\spellfile.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\syntax.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\tag.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\term.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\ui.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\undo.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\usercmd.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\userfunc.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\version.c
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\vim.rc
+-
+- !IF "$(CFG)" == "Vim - Win32 Release gvim OLE"
+-
+- "$(INTDIR)\vim.res" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim OLE"
+-
+- "$(INTDIR)\vim.res" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Release gvim"
+-
+- "$(INTDIR)\vim.res" : $(SOURCE) "$(INTDIR)"
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim"
+-
+- "$(INTDIR)\vim.res" : $(SOURCE) "$(INTDIR)"
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Release vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ELSEIF "$(CFG)" == "Vim - Win32 Debug vim"
+-
+- # PROP Exclude_From_Build 1
+-
+- !ENDIF
+-
+- # End Source File
+- # Begin Source File
+-
+- SOURCE=.\window.c
+- # End Source File
+- # End Target
+- # End Project
+--- 0 ----
+*** ../vim-8.1.1292/runtime/doc/debug.txt 2019-05-05 18:11:46.308590707 +0200
+--- runtime/doc/debug.txt 2019-05-07 22:22:23.675047276 +0200
+***************
+*** 78,87 ****
+ If you built the executable yourself with the Microsoft Visual C++ compiler,
+ then the PDB was built with the EXE.
+
+- Alternatively, if you have the source files, you can import Make_ivc.mak into
+- Visual Studio as a workspace. Then select a debug configuration, build and
+- you can do all kinds of debugging (set breakpoints, watch variables, etc.).
+-
+ If you have Visual Studio, use that instead of the VC Toolkit and WinDbg.
+
+ For other compilers, you should always use the corresponding debugger: TD for
+--- 78,83 ----
+*** ../vim-8.1.1292/src/INSTALLpc.txt 2019-04-04 20:31:59.094873282 +0200
+--- src/INSTALLpc.txt 2019-05-07 22:23:32.266713984 +0200
+***************
+*** 81,101 ****
+ Perl, Python, etc.
+
+ Make_mvc.mak allows a Vim to be built with various different features and
+! debug support. Debugging with MS Devstudio is provided by Make_dvc.mak.
+! For a description of the use of Make_dvc.mak, look in Make_mvc.mak.
+
+ For compiling Gvim with IME support on far-east Windows, add IME=yes
+ to the parameters you pass to Make_mvc.mak.
+
+- To build Vim from within the Visual Studio IDE, open the Make_ivc.mak project.
+- (Note: Make_ivc.mak is not as rich as Make_mvc.mak, which allows for
+- far more configuration.) Make_ivc.mak can also be built with nmake.
+-
+- nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim"
+- GUI Microsoft Visual C++ 4.x or later
+- nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim OLE"
+- OLE Microsoft Visual C++ 4.x or later
+-
+ See the specific files for comments and options.
+
+ These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
+--- 81,91 ----
+ Perl, Python, etc.
+
+ Make_mvc.mak allows a Vim to be built with various different features and
+! debug support.
+
+ For compiling Gvim with IME support on far-east Windows, add IME=yes
+ to the parameters you pass to Make_mvc.mak.
+
+ See the specific files for comments and options.
+
+ These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
+*** ../vim-8.1.1292/src/Make_mvc.mak 2019-05-03 22:14:59.452363625 +0200
+--- src/Make_mvc.mak 2019-05-07 22:24:28.786437049 +0200
+***************
+*** 143,179 ****
+ #
+ # Example: To build the non-debug, GUI version with Perl interface:
+ # nmake -f Make_mvc.mak GUI=yes PERL=C:\Perl
+- #
+- # DEBUG with Make_mvc.mak and Make_dvc.mak:
+- # This makefile gives a fineness of control which is not supported in
+- # Visual C++ configuration files. Therefore, debugging requires a bit of
+- # extra work.
+- # Make_dvc.mak is a Visual C++ project to access that support. It may be
+- # badly out of date for the Visual C++ you are using...
+- # To use Make_dvc.mak:
+- # 1) Build Vim with Make_mvc.mak.
+- # Use a "DEBUG=yes" argument to build Vim with debug support.
+- # E.g. the following builds gvimd.exe:
+- # nmake -f Make_mvc.mak debug=yes gui=yes
+- # 2) Use MS Devstudio and set it up to allow that file to be debugged:
+- # i) Pass Make_dvc.mak to the IDE.
+- # Use the "open workspace" menu entry to load Make_dvc.mak.
+- # Alternatively, from the command line:
+- # msdev /nologo Make_dvc.mak
+- # Note: Make_dvc.mak is in VC4.0 format. Later VC versions see
+- # this and offer to convert it to their own format. Accept that.
+- # It creates a file called Make_dvc.dsw which can then be used
+- # for further operations. E.g.
+- # msdev /nologo Make_dvc.dsw
+- # ii) Set the built executable for debugging:
+- # a) Alt+F7/Debug takes you to the Debug dialog.
+- # b) Fill "Executable for debug session". e.g. gvimd.exe
+- # c) Fill "Program arguments". e.g. -R dosinst.c
+- # d) Complete the dialog
+- # 3) You can now debug the executable you built with Make_mvc.mak
+- #
+- # Note: Make_dvc.mak builds vimrun.exe, because it must build something
+- # to be a valid makefile..
+
+ ### See feature.h for a list of optionals.
+ # If you want to build some optional features without modifying the source,
+--- 143,148 ----
+*** ../vim-8.1.1292/src/version.c 2019-05-07 22:10:47.082118240 +0200
+--- src/version.c 2019-05-07 22:24:34.878407086 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1293,
+ /**/
+
+--
+A special cleaning ordinance bans housewives from hiding dirt and dust under a
+rug in a dwelling.
+ [real standing law in Pennsylvania, 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.1294 b/data/vim/patches/8.1.1294
new file mode 100644
index 000000000..94df00fe2
--- /dev/null
+++ b/data/vim/patches/8.1.1294
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1294
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1294
+Problem: MS-Windows: Some fonts return wrong average char width.
+Solution: Compute the average ourselves. (Ken Takata, closes #4356)
+Files: src/gui_w32.c
+
+
+*** ../vim-8.1.1293/src/gui_w32.c 2019-04-29 21:46:22.849288641 +0200
+--- src/gui_w32.c 2019-05-07 22:50:35.029418835 +0200
+***************
+*** 1455,1464 ****
+ HWND hwnd = GetDesktopWindow();
+ HDC hdc = GetWindowDC(hwnd);
+ HFONT hfntOld = SelectFont(hdc, (HFONT)font);
+ TEXTMETRIC tm;
+
+ GetTextMetrics(hdc, &tm);
+! gui.char_width = tm.tmAveCharWidth + tm.tmOverhang;
+
+ gui.char_height = tm.tmHeight + p_linespace;
+
+--- 1455,1470 ----
+ HWND hwnd = GetDesktopWindow();
+ HDC hdc = GetWindowDC(hwnd);
+ HFONT hfntOld = SelectFont(hdc, (HFONT)font);
++ SIZE size;
+ TEXTMETRIC tm;
+
+ GetTextMetrics(hdc, &tm);
+! // GetTextMetrics() may not return the right value in tmAveCharWidth
+! // for some fonts. Do our own average computation.
+! GetTextExtentPoint(hdc,
+! "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
+! 52, &size);
+! gui.char_width = (size.cx / 26 + 1) / 2 + tm.tmOverhang;
+
+ gui.char_height = tm.tmHeight + p_linespace;
+
+*** ../vim-8.1.1293/src/version.c 2019-05-07 22:25:23.486167275 +0200
+--- src/version.c 2019-05-07 22:52:16.076724322 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1294,
+ /**/
+
+--
+No man may purchase alcohol without written consent from his wife.
+ [real standing law in Pennsylvania, 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.1295 b/data/vim/patches/8.1.1295
new file mode 100644
index 000000000..6bcc0d82d
--- /dev/null
+++ b/data/vim/patches/8.1.1295
@@ -0,0 +1,86 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1295
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1295
+Problem: When vimrun.exe does not exist external command may fail.
+Solution: Use "cmd /c" twice to get the same behavior. (Ken Takata,
+ closes #4355)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.1294/src/os_win32.c 2019-04-28 22:50:36.157248454 +0200
+--- src/os_win32.c 2019-05-07 22:56:33.355051443 +0200
+***************
+*** 4827,4837 ****
+ }
+ else
+ {
+! cmdlen = (
+ #ifdef FEAT_GUI_MSWIN
+! (gui.in_use ? (!p_stmp ? 0 : STRLEN(vimrun_path)) : 0) +
+ #endif
+! STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10);
+
+ newcmd = lalloc(cmdlen, TRUE);
+ if (newcmd != NULL)
+--- 4827,4840 ----
+ }
+ else
+ {
+! cmdlen =
+ #ifdef FEAT_GUI_MSWIN
+! (gui.in_use ?
+! (!s_dont_use_vimrun && p_stmp ?
+! STRLEN(vimrun_path) : STRLEN(p_sh) + STRLEN(p_shcf))
+! : 0) +
+ #endif
+! STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10;
+
+ newcmd = lalloc(cmdlen, TRUE);
+ if (newcmd != NULL)
+***************
+*** 4869,4877 ****
+--- 4872,4890 ----
+ ? "-s " : "",
+ p_sh, p_shcf, cmd);
+ else
++ # ifdef VIMDLL
++ if (gui.in_use)
++ # endif
++ vim_snprintf((char *)newcmd, cmdlen, "%s %s %s %s %s",
++ p_sh, p_shcf, p_sh, p_shcf, cmd);
++ # ifdef VIMDLL
++ else
++ # endif
+ #endif
++ #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ vim_snprintf((char *)newcmd, cmdlen, "%s %s %s",
+ p_sh, p_shcf, cmd);
++ #endif
+ x = mch_system((char *)newcmd, options);
+ vim_free(newcmd);
+ }
+*** ../vim-8.1.1294/src/version.c 2019-05-07 22:52:46.688518695 +0200
+--- src/version.c 2019-05-07 23:01:00.361412464 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1295,
+ /**/
+
+--
+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.1296 b/data/vim/patches/8.1.1296
new file mode 100644
index 000000000..f516b47a9
--- /dev/null
+++ b/data/vim/patches/8.1.1296
@@ -0,0 +1,186 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1296
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1296
+Problem: Crash when using invalid command line argument.
+Solution: Check for options not being initialized.
+Files: src/term.c, src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.1295/src/term.c 2019-05-04 16:58:41.613537362 +0200
+--- src/term.c 2019-05-08 16:36:20.371184451 +0200
+***************
+*** 3014,3026 ****
+ 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();
+--- 3014,3026 ----
+ void
+ term_push_title(int which)
+ {
+! if ((which & SAVE_RESTORE_TITLE) && T_CST != NULL && *T_CST != NUL)
+ {
+ OUT_STR(T_CST);
+ out_flush();
+ }
+
+! if ((which & SAVE_RESTORE_ICON) && T_SSI != NULL && *T_SSI != NUL)
+ {
+ OUT_STR(T_SSI);
+ out_flush();
+***************
+*** 3033,3045 ****
+ 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();
+--- 3033,3045 ----
+ void
+ term_pop_title(int which)
+ {
+! if ((which & SAVE_RESTORE_TITLE) && T_CRT != NULL && *T_CRT != NUL)
+ {
+ OUT_STR(T_CRT);
+ out_flush();
+ }
+
+! if ((which & SAVE_RESTORE_ICON) && T_SRI != NULL && *T_SRI != NUL)
+ {
+ OUT_STR(T_SRI);
+ out_flush();
+*** ../vim-8.1.1295/src/testdir/test_startup.vim 2019-05-07 22:10:47.082118240 +0200
+--- src/testdir/test_startup.vim 2019-05-08 16:39:13.558191165 +0200
+***************
+*** 408,419 ****
+ endfor
+
+ if has('clientserver')
+- " FIXME: need to add --servername to this list
+- " but it causes vim-8.1.1282 to crash!
+ for opt in ['--remote', '--remote-send', '--remote-silent', '--remote-expr',
+ \ '--remote-tab', '--remote-tab-wait',
+ \ '--remote-tab-wait-silent', '--remote-tab-silent',
+ \ '--remote-wait', '--remote-wait-silent',
+ \ ]
+ let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
+ call assert_equal(1, v:shell_error)
+--- 408,418 ----
+ endfor
+
+ if has('clientserver')
+ for opt in ['--remote', '--remote-send', '--remote-silent', '--remote-expr',
+ \ '--remote-tab', '--remote-tab-wait',
+ \ '--remote-tab-wait-silent', '--remote-tab-silent',
+ \ '--remote-wait', '--remote-wait-silent',
++ \ '--servername',
+ \ ]
+ let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
+ call assert_equal(1, v:shell_error)
+***************
+*** 423,436 ****
+ endfor
+ endif
+
+! " FIXME: commented out as this causes vim-8.1.1282 to crash!
+! "if has('clipboard')
+! " let out = split(system(GetVimCommand() .. ' --display'), "\n")
+! " call assert_equal(1, v:shell_error)
+! " call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+! " call assert_equal('Argument missing after: "--display"', out[1])
+! " call assert_equal('More info with: "vim -h"', out[2])
+! "endif
+
+ let out = split(system(GetVimCommand() .. ' -ix'), "\n")
+ call assert_equal(1, v:shell_error)
+--- 422,434 ----
+ endfor
+ endif
+
+! if has('clipboard')
+! let out = split(system(GetVimCommand() .. ' --display'), "\n")
+! call assert_equal(1, v:shell_error)
+! call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+! call assert_equal('Argument missing after: "--display"', out[1])
+! call assert_equal('More info with: "vim -h"', out[2])
+! endif
+
+ let out = split(system(GetVimCommand() .. ' -ix'), "\n")
+ call assert_equal(1, v:shell_error)
+***************
+*** 463,478 ****
+ call assert_equal('More info with: "vim -h"', out[2])
+ endfor
+
+! " FIXME: commented out as this causes vim-8.1.1282 to crash!
+! "if has('gui_gtk')
+! " for opt in ['--socketid x', '--socketid 0xg']
+! " let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
+! " call assert_equal(1, v:shell_error)
+! " call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+! " call assert_equal('Invalid argument for: "--socketid"', out[1])
+! " call assert_equal('More info with: "vim -h"', out[2])
+! " endfor
+! "endif
+ endfunc
+
+ func Test_file_args()
+--- 461,475 ----
+ call assert_equal('More info with: "vim -h"', out[2])
+ endfor
+
+! if has('gui_gtk')
+! for opt in ['--socketid x', '--socketid 0xg']
+! let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
+! call assert_equal(1, v:shell_error)
+! call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+! call assert_equal('Invalid argument for: "--socketid"', out[1])
+! call assert_equal('More info with: "vim -h"', out[2])
+! endfor
+! endif
+ endfunc
+
+ func Test_file_args()
+*** ../vim-8.1.1295/src/version.c 2019-05-07 23:01:34.241209371 +0200
+--- src/version.c 2019-05-08 16:37:45.622695748 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1296,
+ /**/
+
+--
+"Software is like sex... it's better when it's free."
+ -- Linus Torvalds, initiator of the free Linux OS
+Makes me wonder what FSF stands for...?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1297 b/data/vim/patches/8.1.1297
new file mode 100644
index 000000000..98214a431
--- /dev/null
+++ b/data/vim/patches/8.1.1297
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1297
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1297
+Problem: Invalid argument test fails without GTK.
+Solution: Test -display and --display separately.
+Files: src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.1296/src/testdir/test_startup.vim 2019-05-08 16:40:57.753592725 +0200
+--- src/testdir/test_startup.vim 2019-05-08 17:56:39.782112531 +0200
+***************
+*** 422,428 ****
+ endfor
+ endif
+
+! if has('clipboard')
+ let out = split(system(GetVimCommand() .. ' --display'), "\n")
+ call assert_equal(1, v:shell_error)
+ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+--- 422,428 ----
+ endfor
+ endif
+
+! if has('gui_gtk')
+ let out = split(system(GetVimCommand() .. ' --display'), "\n")
+ call assert_equal(1, v:shell_error)
+ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+***************
+*** 430,435 ****
+--- 430,443 ----
+ call assert_equal('More info with: "vim -h"', out[2])
+ endif
+
++ if has('clipboard')
++ let out = split(system(GetVimCommand() .. ' -display'), "\n")
++ call assert_equal(1, v:shell_error)
++ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
++ call assert_equal('Argument missing after: "-display"', out[1])
++ call assert_equal('More info with: "vim -h"', out[2])
++ endif
++
+ let out = split(system(GetVimCommand() .. ' -ix'), "\n")
+ call assert_equal(1, v:shell_error)
+ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+*** ../vim-8.1.1296/src/version.c 2019-05-08 16:40:57.753592725 +0200
+--- src/version.c 2019-05-08 17:57:52.553686381 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1297,
+ /**/
+
+--
+<Beeth> Girls are like internet domain names,
+ the ones I like are already taken.
+<honx> Well, you can stil get one from a strange country :-P
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1298 b/data/vim/patches/8.1.1298
new file mode 100644
index 000000000..0a3ba7456
--- /dev/null
+++ b/data/vim/patches/8.1.1298
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1298
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1298
+Problem: Invalid argument test fails without X clipboard.
+Solution: Test -display only with the +xterm_clipboard feature.
+Files: src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.1297/src/testdir/test_startup.vim 2019-05-08 17:58:11.921572919 +0200
+--- src/testdir/test_startup.vim 2019-05-08 18:35:41.288901560 +0200
+***************
+*** 430,436 ****
+ call assert_equal('More info with: "vim -h"', out[2])
+ endif
+
+! if has('clipboard')
+ let out = split(system(GetVimCommand() .. ' -display'), "\n")
+ call assert_equal(1, v:shell_error)
+ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+--- 430,436 ----
+ call assert_equal('More info with: "vim -h"', out[2])
+ endif
+
+! if has('xterm_clipboard')
+ let out = split(system(GetVimCommand() .. ' -display'), "\n")
+ call assert_equal(1, v:shell_error)
+ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+*** ../vim-8.1.1297/src/version.c 2019-05-08 17:58:11.921572919 +0200
+--- src/version.c 2019-05-08 18:36:20.824673524 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1298,
+ /**/
+
+--
+"I know that there are people who don't love their fellow man,
+and I hate those people!" - Tom Lehrer
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1299 b/data/vim/patches/8.1.1299
new file mode 100644
index 000000000..706e7d38a
--- /dev/null
+++ b/data/vim/patches/8.1.1299
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1299
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1299
+Problem: "extends" from 'listchars' is used when 'list' is off. (Hiroyuki
+ Yoshinaga)
+Solution: Only use the "extends" character when 'list' is on. (Hirohito
+ Higashi, closes #4360)
+Files: src/screen.c, src/testdir/test_listchars.vim
+
+
+*** ../vim-8.1.1298/src/screen.c 2019-05-05 15:47:37.825923529 +0200
+--- src/screen.c 2019-05-08 20:20:27.436236341 +0200
+***************
+*** 5594,5601 ****
+ break;
+ }
+
+! /* line continues beyond line end */
+! if (lcs_ext
+ && !wp->w_p_wrap
+ #ifdef FEAT_DIFF
+ && filler_todo <= 0
+--- 5594,5603 ----
+ break;
+ }
+
+! // Show "extends" character from 'listchars' if beyond the line end and
+! // 'list' is set.
+! if (lcs_ext != NUL
+! && wp->w_p_list
+ && !wp->w_p_wrap
+ #ifdef FEAT_DIFF
+ && filler_todo <= 0
+*** ../vim-8.1.1298/src/testdir/test_listchars.vim 2019-04-04 13:28:41.201589932 +0200
+--- src/testdir/test_listchars.vim 2019-05-08 20:14:19.686543989 +0200
+***************
+*** 110,115 ****
+--- 110,134 ----
+ call cursor(1, 1)
+ call assert_equal([expected], ScreenLines(1, virtcol('$')))
+
++ " test extends
++ normal ggdG
++ set listchars=extends:Z
++ set nowrap
++ set nolist
++ call append(0, [ repeat('A', &columns + 1) ])
++
++ let expected = repeat('A', &columns)
++
++ redraw!
++ call cursor(1, 1)
++ call assert_equal([expected], ScreenLines(1, &columns))
++
++ set list
++ let expected = expected[:-2] . 'Z'
++ redraw!
++ call cursor(1, 1)
++ call assert_equal([expected], ScreenLines(1, &columns))
++
+ enew!
+ set listchars& ff&
+ endfunc
+*** ../vim-8.1.1298/src/version.c 2019-05-08 18:36:40.060562551 +0200
+--- src/version.c 2019-05-08 20:18:13.965070043 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1299,
+ /**/
+
+--
+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.1300 b/data/vim/patches/8.1.1300
new file mode 100644
index 000000000..149d8128f
--- /dev/null
+++ b/data/vim/patches/8.1.1300
@@ -0,0 +1,149 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1300
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1300
+Problem: In a terminal 'ballooneval' does not work right away.
+Solution: Flush output after drawing the balloon. Add the <Ignore> key
+ code. Add a test.
+Files: src/ex_cmds2.c, src/testdir/test_balloon.vim, src/misc2.c,
+ src/testdir/Make_all.mak,
+ src/testdir/dumps/Test_balloon_eval_term_01.dump
+
+
+*** ../vim-8.1.1299/src/ex_cmds2.c 2019-05-04 15:05:24.927269310 +0200
+--- src/ex_cmds2.c 2019-05-08 21:53:14.976434811 +0200
+***************
+*** 229,234 ****
+--- 229,237 ----
+ static timer_T *first_timer = NULL;
+ static long last_timer_id = 0;
+
++ /*
++ * Return time left until "due". Negative if past "due".
++ */
+ long
+ proftime_time_left(proftime_T *due, proftime_T *now)
+ {
+***************
+*** 445,451 ****
+--- 448,458 ----
+ balloonEvalForTerm = TRUE;
+ }
+ if (balloonEval != NULL)
++ {
+ general_beval_cb(balloonEval, 0);
++ setcursor();
++ out_flush();
++ }
+ }
+ else if (next_due == -1 || next_due > this_due)
+ next_due = this_due;
+*** ../vim-8.1.1299/src/testdir/test_balloon.vim 2019-05-08 21:58:18.422791080 +0200
+--- src/testdir/test_balloon.vim 2019-05-08 21:56:15.599454145 +0200
+***************
+*** 0 ****
+--- 1,32 ----
++ " Tests for 'balloonevalterm'.
++
++ if !has('balloon_eval_term') || has('gui_running')
++ finish
++ endif
++
++ source screendump.vim
++ if !CanRunVimInTerminal()
++ finish
++ endif
++
++ func Test_balloon_eval_term()
++ call writefile([
++ \ 'call setline(1, ["one one one", "two tXo two", "three three three"])',
++ \ 'set balloonevalterm balloonexpr=MyBalloonExpr() balloondelay=100',
++ \ 'func MyBalloonExpr()',
++ \ ' return "line " . v:beval_lnum . " column " . v:beval_col',
++ \ 'endfun',
++ \ 'redraw',
++ \ 'call test_setmouse(2, 6)',
++ \ 'call feedkeys("\<MouseMove>\<Ignore>", "xt")',
++ \ ], 'XTest_beval')
++
++ " Check that the balloon shows up
++ let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50})
++ call term_wait(buf, 100)
++ call VerifyScreenDump(buf, 'Test_balloon_eval_term_01', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XTest_beval')
++ endfunc
+*** ../vim-8.1.1299/src/misc2.c 2019-05-03 23:15:34.048180407 +0200
+--- src/misc2.c 2019-05-08 21:39:12.545192758 +0200
+***************
+*** 2496,2501 ****
+--- 2496,2502 ----
+ #endif
+ {K_PLUG, (char_u *)"Plug"},
+ {K_CURSORHOLD, (char_u *)"CursorHold"},
++ {K_IGNORE, (char_u *)"Ignore"},
+ {0, NULL}
+ /* NOTE: When adding a long name update MAX_KEY_NAME_LEN. */
+ };
+*** ../vim-8.1.1299/src/testdir/Make_all.mak 2019-05-06 21:59:42.194211119 +0200
+--- src/testdir/Make_all.mak 2019-05-08 21:24:00.426433475 +0200
+***************
+*** 68,73 ****
+--- 68,74 ----
+ test_autoload \
+ test_backspace_opt \
+ test_backup \
++ test_balloon \
+ test_behave \
+ test_blob \
+ test_blockedit \
+***************
+*** 294,299 ****
+--- 295,301 ----
+ test_autocmd.res \
+ test_autoload.res \
+ test_backspace_opt.res \
++ test_balloon.res \
+ test_blob.res \
+ test_blockedit.res \
+ test_breakindent.res \
+*** ../vim-8.1.1299/src/testdir/dumps/Test_balloon_eval_term_01.dump 2019-05-08 21:58:18.434791015 +0200
+--- src/testdir/dumps/Test_balloon_eval_term_01.dump 2019-05-08 21:56:22.407417328 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ >o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @38
++ @2|o| |t|X|o| |t|w|o| @38
++ |t|h|r|e| +0#0000001#ffd7ff255@16| +0#0000000#ffffff0@28
++ |~+0#4040ff13&| @2| +0#0000001#ffd7ff255|l|i|n|e| |2| |c|o|l|u|m|n| |6| | +0#4040ff13#ffffff0@28
++ |~| @2| +0#0000001#ffd7ff255@16| +0#4040ff13#ffffff0@28
++ |~| @48
++ |~| @48
++ |~| @48
++ |~| @48
++ | +0#0000000&@31|1|,|1| @10|A|l@1|
+*** ../vim-8.1.1299/src/version.c 2019-05-08 20:20:42.596141850 +0200
+--- src/version.c 2019-05-08 21:07:47.886462766 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1300,
+ /**/
+
+--
+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.1301 b/data/vim/patches/8.1.1301
new file mode 100644
index 000000000..de81c53f0
--- /dev/null
+++ b/data/vim/patches/8.1.1301
@@ -0,0 +1,116 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1301
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1301
+Problem: When compiled with VIMDLL some messages are not shown.
+Solution: Set/reset gui.in_use and gui.starting as needed. (Ken Takata,
+ closes #4361)
+Files: src/gui_w32.c, src/main.c, src/message.c
+
+
+*** ../vim-8.1.1300/src/gui_w32.c 2019-05-07 22:52:46.688518695 +0200
+--- src/gui_w32.c 2019-05-08 22:21:43.235895833 +0200
+***************
+*** 4827,4832 ****
+--- 4827,4836 ----
+ {
+ char buf[IOSIZE];
+
++ # ifdef VIMDLL
++ gui.in_use = mch_is_gui_executable();
++ # endif
++
+ /* Can't use emsg() here, we have not finished initialisation yet. */
+ vim_snprintf(buf, IOSIZE,
+ _("E243: Argument not supported: \"-%s\"; Use the OLE version."),
+*** ../vim-8.1.1300/src/main.c 2019-05-03 22:25:36.292643839 +0200
+--- src/main.c 2019-05-08 22:21:43.235895833 +0200
+***************
+*** 178,183 ****
+--- 178,185 ----
+ #ifdef VIMDLL
+ // Check if the current executable file is for the GUI subsystem.
+ gui.starting = mch_is_gui_executable();
++ #elif defined(FEAT_GUI_MSWIN)
++ gui.starting = TRUE;
+ #endif
+
+ #ifdef FEAT_CLIENTSERVER
+***************
+*** 3242,3247 ****
+--- 3244,3257 ----
+ reset_signals(); /* kill us with CTRL-C here, if you like */
+ #endif
+
++ // If this is a Windows GUI executable, show an error dialog box.
++ #ifdef VIMDLL
++ gui.in_use = mch_is_gui_executable();
++ #endif
++ #ifdef FEAT_GUI_MSWIN
++ gui.starting = FALSE; // Needed to show as error.
++ #endif
++
+ init_longVersion();
+ mch_errmsg(longVersion);
+ mch_errmsg("\n");
+*** ../vim-8.1.1300/src/message.c 2019-04-28 22:53:37.440370169 +0200
+--- src/message.c 2019-05-08 22:21:43.235895833 +0200
+***************
+*** 2977,2983 ****
+ int len;
+ #endif
+
+! #if (defined(UNIX) || defined(FEAT_GUI)) && (!defined(ALWAYS_USE_GUI) || !defined(VIMDLL))
+ /* On Unix use stderr if it's a tty.
+ * When not going to start the GUI also use stderr.
+ * On Mac, when started from Finder, stderr is the console. */
+--- 2977,2983 ----
+ int len;
+ #endif
+
+! #if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI) && !defined(VIMDLL)
+ /* On Unix use stderr if it's a tty.
+ * When not going to start the GUI also use stderr.
+ * On Mac, when started from Finder, stderr is the console. */
+***************
+*** 3080,3086 ****
+ void
+ mch_msg(char *str)
+ {
+! #if (defined(UNIX) || defined(FEAT_GUI)) && (!defined(ALWAYS_USE_GUI) || !defined(VIMDLL))
+ /* On Unix use stdout if we have a tty. This allows "vim -h | more" and
+ * uses mch_errmsg() when started from the desktop.
+ * When not going to start the GUI also use stdout.
+--- 3080,3086 ----
+ void
+ mch_msg(char *str)
+ {
+! #if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI) && !defined(VIMDLL)
+ /* On Unix use stdout if we have a tty. This allows "vim -h | more" and
+ * uses mch_errmsg() when started from the desktop.
+ * When not going to start the GUI also use stdout.
+*** ../vim-8.1.1300/src/version.c 2019-05-08 21:58:54.446597033 +0200
+--- src/version.c 2019-05-08 22:28:23.609858407 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1301,
+ /**/
+
+--
+ 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.1302 b/data/vim/patches/8.1.1302
new file mode 100644
index 000000000..916d8cfa0
--- /dev/null
+++ b/data/vim/patches/8.1.1302
@@ -0,0 +1,180 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1302
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1302
+Problem: v:beval_text is not tested in Visual mode.
+Solution: Add a screenshot of the balloon in Visual mode.
+Files: src/testdir/test_balloon.vim, src/normal.c,
+ src/testdir/dumps/Test_balloon_eval_term_01.dump,
+ src/testdir/dumps/Test_balloon_eval_term_02.dump
+
+
+*** ../vim-8.1.1301/src/testdir/test_balloon.vim 2019-05-08 21:58:54.446597033 +0200
+--- src/testdir/test_balloon.vim 2019-05-08 22:52:59.396066320 +0200
+***************
+*** 9,27 ****
+ finish
+ endif
+
+! func Test_balloon_eval_term()
+! call writefile([
+ \ 'call setline(1, ["one one one", "two tXo two", "three three three"])',
+ \ 'set balloonevalterm balloonexpr=MyBalloonExpr() balloondelay=100',
+ \ 'func MyBalloonExpr()',
+! \ ' return "line " . v:beval_lnum . " column " . v:beval_col',
+ \ 'endfun',
+ \ 'redraw',
+ \ 'call test_setmouse(2, 6)',
+ \ 'call feedkeys("\<MouseMove>\<Ignore>", "xt")',
+ \ ], 'XTest_beval')
+
+! " Check that the balloon shows up
+ let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50})
+ call term_wait(buf, 100)
+ call VerifyScreenDump(buf, 'Test_balloon_eval_term_01', {})
+--- 9,32 ----
+ finish
+ endif
+
+! let s:common_script = [
+ \ 'call setline(1, ["one one one", "two tXo two", "three three three"])',
+ \ 'set balloonevalterm balloonexpr=MyBalloonExpr() balloondelay=100',
+ \ 'func MyBalloonExpr()',
+! \ ' return "line " .. v:beval_lnum .. " column " .. v:beval_col .. ": " .. v:beval_text',
+ \ 'endfun',
+ \ 'redraw',
++ \ ]
++
++ func Test_balloon_eval_term()
++ " Use <Ignore> after <MouseMove> to return from vgetc() without removing
++ " the balloon.
++ call writefile(s:common_script + [
+ \ 'call test_setmouse(2, 6)',
+ \ 'call feedkeys("\<MouseMove>\<Ignore>", "xt")',
+ \ ], 'XTest_beval')
+
+! " Check that the balloon shows up after a mouse move
+ let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50})
+ call term_wait(buf, 100)
+ call VerifyScreenDump(buf, 'Test_balloon_eval_term_01', {})
+***************
+*** 30,32 ****
+--- 35,55 ----
+ call StopVimInTerminal(buf)
+ call delete('XTest_beval')
+ endfunc
++
++ func Test_balloon_eval_term_visual()
++ " Use <Ignore> after <MouseMove> to return from vgetc() without removing
++ " the balloon.
++ call writefile(s:common_script + [
++ \ 'call test_setmouse(3, 6)',
++ \ 'call feedkeys("3Gevfr\<MouseMove>\<Ignore>", "xt")',
++ \ ], 'XTest_beval_visual')
++
++ " Check that the balloon shows up after a mouse move
++ let buf = RunVimInTerminal('-S XTest_beval_visual', {'rows': 10, 'cols': 50})
++ call term_wait(buf, 100)
++ call VerifyScreenDump(buf, 'Test_balloon_eval_term_02', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XTest_beval_visual')
++ endfunc
+*** ../vim-8.1.1301/src/normal.c 2019-04-28 19:46:17.030060105 +0200
+--- src/normal.c 2019-05-08 22:50:18.029137066 +0200
+***************
+*** 2326,2335 ****
+
+ if (c == K_MOUSEMOVE)
+ {
+! /* Mouse moved without a button pressed. */
+ #ifdef FEAT_BEVAL_TERM
+ ui_may_remove_balloon();
+! if (p_bevalterm && !VIsual_active)
+ {
+ profile_setlimit(p_bdlay, &bevalexpr_due);
+ bevalexpr_due_set = TRUE;
+--- 2326,2335 ----
+
+ if (c == K_MOUSEMOVE)
+ {
+! // Mouse moved without a button pressed.
+ #ifdef FEAT_BEVAL_TERM
+ ui_may_remove_balloon();
+! if (p_bevalterm)
+ {
+ profile_setlimit(p_bdlay, &bevalexpr_due);
+ bevalexpr_due_set = TRUE;
+*** ../vim-8.1.1301/src/testdir/dumps/Test_balloon_eval_term_01.dump 2019-05-08 21:58:54.446597033 +0200
+--- src/testdir/dumps/Test_balloon_eval_term_01.dump 2019-05-08 22:24:52.938934260 +0200
+***************
+*** 1,8 ****
+ >o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @38
+ @2|o| |t|X|o| |t|w|o| @38
+! |t|h|r|e| +0#0000001#ffd7ff255@16| +0#0000000#ffffff0@28
+! |~+0#4040ff13&| @2| +0#0000001#ffd7ff255|l|i|n|e| |2| |c|o|l|u|m|n| |6| | +0#4040ff13#ffffff0@28
+! |~| @2| +0#0000001#ffd7ff255@16| +0#4040ff13#ffffff0@28
+ |~| @48
+ |~| @48
+ |~| @48
+--- 1,8 ----
+ >o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @38
+ @2|o| |t|X|o| |t|w|o| @38
+! |t|h|r|e| +0#0000001#ffd7ff255@21| +0#0000000#ffffff0@23
+! |~+0#4040ff13&| @2| +0#0000001#ffd7ff255|l|i|n|e| |2| |c|o|l|u|m|n| |6|:| |t|X|o| | +0#4040ff13#ffffff0@23
+! |~| @2| +0#0000001#ffd7ff255@21| +0#4040ff13#ffffff0@23
+ |~| @48
+ |~| @48
+ |~| @48
+*** ../vim-8.1.1301/src/testdir/dumps/Test_balloon_eval_term_02.dump 2019-05-08 22:54:06.855631534 +0200
+--- src/testdir/dumps/Test_balloon_eval_term_02.dump 2019-05-08 22:49:48.525338352 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @38
++ @2|o| |t|X|o| |t|w|o| @38
++ |t|h|r|e|e+0&#e0e0e08| |t|h>r+0&#ffffff0|e@1| |t|h|r|e@1| @32
++ |~+0#4040ff13&| @2| +0#0000001#ffd7ff255@23| +0#4040ff13#ffffff0@21
++ |~| @2| +0#0000001#ffd7ff255|l|i|n|e| |3| |c|o|l|u|m|n| |5|:| |e| |t|h|r| | +0#4040ff13#ffffff0@21
++ |~| @2| +0#0000001#ffd7ff255@23| +0#4040ff13#ffffff0@21
++ |~| @48
++ |~| @48
++ |~| @48
++ |-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@9|5| @8|3|,|9| @10|A|l@1|
+*** ../vim-8.1.1301/src/version.c 2019-05-08 22:28:41.681765816 +0200
+--- src/version.c 2019-05-08 22:53:36.947823518 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1302,
+ /**/
+
+--
+LETTERS TO THE EDITOR (The Times of London)
+
+Dear Sir,
+
+I am firmly opposed to the spread of microchips either to the home or
+to the office.  We have more than enough of them foisted upon us in
+public places.  They are a disgusting Americanism, and can only result
+in the farmers being forced to grow smaller potatoes, which in turn
+will cause massive unemployment in the already severely depressed
+agricultural industry.
+
+Yours faithfully,
+        Capt. Quinton D'Arcy, J. P.
+        Sevenoaks
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1303 b/data/vim/patches/8.1.1303
new file mode 100644
index 000000000..1e02df5d9
--- /dev/null
+++ b/data/vim/patches/8.1.1303
@@ -0,0 +1,335 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1303
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1303
+Problem: Not possible to hide a balloon.
+Solution: Hide the balloon when balloon_show() is called with an empty
+ string or list. Add balloon_gettext().
+Files: src/evalfunc.c, src/popupmnu.c, src/gui_beval.c, src/gui_w32.c,
+ src/beval.h, src/testdir/test_balloon.vim, runtime/doc/eval.txt
+
+
+*** ../vim-8.1.1302/src/evalfunc.c 2019-05-07 22:06:48.675310695 +0200
+--- src/evalfunc.c 2019-05-09 13:37:08.630549700 +0200
+***************
+*** 63,68 ****
+--- 63,69 ----
+ static void f_atan2(typval_T *argvars, typval_T *rettv);
+ #endif
+ #ifdef FEAT_BEVAL
++ static void f_balloon_gettext(typval_T *argvars, typval_T *rettv);
+ static void f_balloon_show(typval_T *argvars, typval_T *rettv);
+ # if defined(FEAT_BEVAL_TERM)
+ static void f_balloon_split(typval_T *argvars, typval_T *rettv);
+***************
+*** 552,557 ****
+--- 553,559 ----
+ {"atan2", 2, 2, f_atan2},
+ #endif
+ #ifdef FEAT_BEVAL
++ {"balloon_gettext", 0, 0, f_balloon_gettext},
+ {"balloon_show", 1, 1, f_balloon_show},
+ # if defined(FEAT_BEVAL_TERM)
+ {"balloon_split", 1, 1, f_balloon_split},
+***************
+*** 1764,1769 ****
+--- 1766,1784 ----
+ */
+ #ifdef FEAT_BEVAL
+ static void
++ f_balloon_gettext(typval_T *argvars UNUSED, typval_T *rettv)
++ {
++ rettv->v_type = VAR_STRING;
++ if (balloonEval != NULL)
++ {
++ if (balloonEval->msg == NULL)
++ rettv->vval.v_string = NULL;
++ else
++ rettv->vval.v_string = vim_strsave(balloonEval->msg);
++ }
++ }
++
++ static void
+ f_balloon_show(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ if (balloonEval != NULL)
+***************
+*** 1773,1781 ****
+ && !gui.in_use
+ # endif
+ )
+! post_balloon(balloonEval, NULL, argvars[0].vval.v_list);
+ else
+! post_balloon(balloonEval, tv_get_string_chk(&argvars[0]), NULL);
+ }
+ }
+
+--- 1788,1808 ----
+ && !gui.in_use
+ # endif
+ )
+! {
+! list_T *l = argvars[0].vval.v_list;
+!
+! // empty list removes the balloon
+! post_balloon(balloonEval, NULL,
+! l == NULL || l->lv_len == 0 ? NULL : l);
+! }
+ else
+! {
+! char_u *mesg = tv_get_string_chk(&argvars[0]);
+!
+! if (mesg != NULL)
+! // empty string removes the balloon
+! post_balloon(balloonEval, *mesg == NUL ? NULL : mesg, NULL);
+! }
+ }
+ }
+
+*** ../vim-8.1.1302/src/popupmnu.c 2019-04-27 22:06:33.348200718 +0200
+--- src/popupmnu.c 2019-05-09 13:00:32.746821137 +0200
+***************
+*** 1154,1160 ****
+--- 1154,1163 ----
+ ui_remove_balloon();
+
+ if (mesg == NULL && list == NULL)
++ {
++ pum_undisplay();
+ return;
++ }
+ if (list != NULL)
+ {
+ listitem_T *li;
+*** ../vim-8.1.1302/src/gui_beval.c 2019-02-17 17:44:36.207875527 +0100
+--- src/gui_beval.c 2019-05-09 13:22:36.063032440 +0200
+***************
+*** 117,123 ****
+ beval->appContext = XtWidgetToApplicationContext((Widget)target);
+ #endif
+ beval->showState = ShS_NEUTRAL;
+! beval->msg = mesg;
+ beval->msgCB = mesgCB;
+ beval->clientData = clientData;
+
+--- 117,124 ----
+ beval->appContext = XtWidgetToApplicationContext((Widget)target);
+ #endif
+ beval->showState = ShS_NEUTRAL;
+! vim_free(beval->msg);
+! beval->msg = mesg == NULL ? NULL : vim_strsave(mesg);
+ beval->msgCB = mesgCB;
+ beval->clientData = clientData;
+
+***************
+*** 208,215 ****
+ void
+ gui_mch_post_balloon(BalloonEval *beval, char_u *mesg)
+ {
+! beval->msg = mesg;
+! if (mesg != NULL)
+ drawBalloon(beval);
+ else
+ undrawBalloon(beval);
+--- 209,217 ----
+ void
+ gui_mch_post_balloon(BalloonEval *beval, char_u *mesg)
+ {
+! vim_free(beval->msg);
+! beval->msg = mesg == NULL ? NULL : vim_strsave(mesg);
+! if (beval->msg != NULL)
+ drawBalloon(beval);
+ else
+ undrawBalloon(beval);
+***************
+*** 225,230 ****
+--- 227,233 ----
+ void
+ gui_mch_unpost_balloon(BalloonEval *beval)
+ {
++ VIM_CLEAR(beval->msg);
+ undrawBalloon(beval);
+ }
+ #endif
+***************
+*** 975,980 ****
+--- 978,984 ----
+ gtk_widget_show(beval->balloonShell);
+
+ beval->showState = ShS_SHOWING;
++ gui_mch_update();
+ }
+ }
+
+*** ../vim-8.1.1302/src/gui_w32.c 2019-05-08 22:28:41.677765838 +0200
+--- src/gui_w32.c 2019-05-09 13:25:57.537884363 +0200
+***************
+*** 8506,8511 ****
+--- 8506,8520 ----
+ {
+ POINT pt;
+
++ vim_free(beval->msg);
++ beval->msg = mesg == NULL ? NULL : vim_strsave(mesg);
++ if (beval->msg == NULL)
++ {
++ delete_tooltip(beval);
++ beval->showState = ShS_NEUTRAL;
++ return;
++ }
++
+ // TRACE0("gui_mch_post_balloon {{{");
+ if (beval->showState == ShS_SHOWING)
+ return;
+*** ../vim-8.1.1302/src/beval.h 2019-02-17 17:44:36.199875566 +0100
+--- src/beval.h 2019-05-09 13:23:08.630846624 +0200
+***************
+*** 75,81 ****
+ #ifdef FEAT_VARTABS
+ int *vts; // vartabstop setting for this buffer
+ #endif
+! char_u *msg;
+ #ifdef FEAT_GUI_MSWIN
+ void *tofree;
+ #endif
+--- 75,81 ----
+ #ifdef FEAT_VARTABS
+ int *vts; // vartabstop setting for this buffer
+ #endif
+! char_u *msg; // allocated: current text
+ #ifdef FEAT_GUI_MSWIN
+ void *tofree;
+ #endif
+*** ../vim-8.1.1302/src/testdir/test_balloon.vim 2019-05-08 22:54:26.023509040 +0200
+--- src/testdir/test_balloon.vim 2019-05-09 13:44:47.320155388 +0200
+***************
+*** 1,8 ****
+ " Tests for 'balloonevalterm'.
+
+! if !has('balloon_eval_term') || has('gui_running')
+! finish
+! endif
+
+ source screendump.vim
+ if !CanRunVimInTerminal()
+--- 1,7 ----
+ " Tests for 'balloonevalterm'.
+
+! " Tests that only work in the terminal.
+! if has('balloon_eval_term') && !has('gui_running')
+
+ source screendump.vim
+ if !CanRunVimInTerminal()
+***************
+*** 53,55 ****
+--- 52,75 ----
+ call StopVimInTerminal(buf)
+ call delete('XTest_beval_visual')
+ endfunc
++
++ endif
++
++ " Tests that only work in the GUI
++ if has('gui_running')
++
++ func Test_balloon_show_gui()
++ let msg = 'this this this this'
++ call balloon_show(msg)
++ call assert_equal(msg, balloon_gettext())
++ sleep 10m
++ call balloon_show('')
++
++ let msg = 'that that'
++ call balloon_show(msg)
++ call assert_equal(msg, balloon_gettext())
++ sleep 10m
++ call balloon_show('')
++ endfunc
++
++ endif
+*** ../vim-8.1.1302/runtime/doc/eval.txt 2019-05-07 22:06:48.675310695 +0200
+--- runtime/doc/eval.txt 2019-05-09 13:38:34.266112489 +0200
+***************
+*** 2226,2231 ****
+--- 2226,2232 ----
+ asin({expr}) Float arc sine of {expr}
+ atan({expr}) Float arc tangent of {expr}
+ atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2}
++ balloon_gettext() String current text in the balloon
+ balloon_show({expr}) none show {expr} inside the balloon
+ balloon_split({msg}) List split {msg} as used for a balloon
+ browse({save}, {title}, {initdir}, {default})
+***************
+*** 3007,3021 ****
+ < 2.356194
+ {only available when compiled with the |+float| feature}
+
+ balloon_show({expr}) *balloon_show()*
+ Show {expr} inside the balloon. For the GUI {expr} is used as
+ a string. For a terminal {expr} can be a list, which contains
+ the lines of the balloon. If {expr} is not a list it will be
+ split with |balloon_split()|.
+
+ Example: >
+ func GetBalloonContent()
+! " initiate getting the content
+ return ''
+ endfunc
+ set balloonexpr=GetBalloonContent()
+--- 3008,3027 ----
+ < 2.356194
+ {only available when compiled with the |+float| feature}
+
++ balloon_gettext() *balloon_gettext()*
++ Return the current text in the balloon. Only for the string,
++ not used for the List.
++
+ balloon_show({expr}) *balloon_show()*
+ Show {expr} inside the balloon. For the GUI {expr} is used as
+ a string. For a terminal {expr} can be a list, which contains
+ the lines of the balloon. If {expr} is not a list it will be
+ split with |balloon_split()|.
++ If {expr} is an empty string any existing balloon is removed.
+
+ Example: >
+ func GetBalloonContent()
+! " ... initiate getting the content
+ return ''
+ endfunc
+ set balloonexpr=GetBalloonContent()
+***************
+*** 4229,4234 ****
+--- 4235,4242 ----
+ and "\..." notation |expr-quote|. For example,
+ feedkeys("\<CR>") simulates pressing of the <Enter> key. But
+ feedkeys('\<CR>') pushes 5 characters.
++ A special code that might be useful is <Ignore>, it exits the
++ wait for a character without doing anything. *<Ignore>*
+
+ {mode} is a String, which can contain these character flags:
+ 'm' Remap keys. This is default. If {mode} is absent,
+*** ../vim-8.1.1302/src/version.c 2019-05-08 22:54:26.023509040 +0200
+--- src/version.c 2019-05-09 13:47:18.087347922 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1303,
+ /**/
+
+--
+ [The rest of the ARMY stand around looking at a loss.]
+INSPECTOR END OF FILM: (picks up megaphone) All right! Clear off! Go on!
+ "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.1304 b/data/vim/patches/8.1.1304
new file mode 100644
index 000000000..47666626b
--- /dev/null
+++ b/data/vim/patches/8.1.1304
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1304
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1304
+Problem: MS-Windows: compiler warning for unused value.
+Solution: Adjust #ifdefs. (Ken Takata, closes #4363)
+Files: src/gui.c
+
+
+*** ../vim-8.1.1303/src/gui.c 2019-04-28 19:46:17.026060122 +0200
+--- src/gui.c 2019-05-09 14:14:23.790938916 +0200
+***************
+*** 69,75 ****
+ {
+ char_u *old_term;
+ static int recursive = 0;
+! #ifdef GUI_MAY_SPAWN
+ char *msg = NULL;
+ #endif
+
+--- 69,75 ----
+ {
+ char_u *old_term;
+ static int recursive = 0;
+! #if defined(GUI_MAY_SPAWN) && defined(EXPERIMENTAL_GUI_CMD)
+ char *msg = NULL;
+ #endif
+
+***************
+*** 113,119 ****
+ # endif
+ )
+ {
+! msg = gui_mch_do_spawn(arg);
+ }
+ else
+ #endif
+--- 113,122 ----
+ # endif
+ )
+ {
+! # ifdef EXPERIMENTAL_GUI_CMD
+! msg =
+! # endif
+! gui_mch_do_spawn(arg);
+ }
+ else
+ #endif
+*** ../vim-8.1.1303/src/version.c 2019-05-09 13:50:13.366401975 +0200
+--- src/version.c 2019-05-09 14:14:19.762959513 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1304,
+ /**/
+
+--
+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.1305 b/data/vim/patches/8.1.1305
new file mode 100644
index 000000000..ec771d953
--- /dev/null
+++ b/data/vim/patches/8.1.1305
@@ -0,0 +1,437 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1305
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1305
+Problem: There is no easy way to manipulate environment variables.
+Solution: Add environ(), getenv() and setenv(). (Yasuhiro Matsumoto,
+ closes #2875)
+Files: runtime/doc/eval.txt, runtime/doc/usr_41.txt, src/evalfunc.c,
+ src/testdir/Make_all.mak, src/testdir/test_environ.vim
+
+
+*** ../vim-8.1.1304/runtime/doc/eval.txt 2019-05-09 13:50:13.366401975 +0200
+--- runtime/doc/eval.txt 2019-05-09 14:44:18.849767366 +0200
+***************
+*** 1369,1374 ****
+--- 1369,1381 ----
+
+ The String value of any environment variable. When it is not defined, the
+ result is an empty string.
++
++ The functions `getenv()` and `setenv()` can also be used and work for
++ environment variables with non-alphanumeric names.
++ The function `environ()` can be used to get a Dict with all environment
++ variables.
++
++
+ *expr-env-expand*
+ Note that there is a difference between using $VAR directly and using
+ expand("$VAR"). Using it directly will only expand environment variables that
+***************
+*** 2303,2308 ****
+--- 2310,2316 ----
+ diff_filler({lnum}) Number diff filler lines about {lnum}
+ diff_hlID({lnum}, {col}) Number diff highlighting at {lnum}/{col}
+ empty({expr}) Number |TRUE| if {expr} is empty
++ environ() Dict return environment variables
+ escape({string}, {chars}) String escape {chars} in {string} with '\'
+ eval({string}) any evaluate {string} into its value
+ eventhandler() Number |TRUE| if inside an event handler
+***************
+*** 2360,2365 ****
+--- 2368,2374 ----
+ List list of cmdline completion matches
+ getcurpos() List position of the cursor
+ getcwd([{winnr} [, {tabnr}]]) String get the current working directory
++ getenv({name}) String return environment variable
+ getfontname([{name}]) String name of font being used
+ getfperm({fname}) String file permissions of file {fname}
+ getfsize({fname}) Number size in bytes of file {fname}
+***************
+*** 2568,2573 ****
+--- 2577,2583 ----
+ none set {varname} in buffer {expr} to {val}
+ setcharsearch({dict}) Dict set character search from {dict}
+ setcmdpos({pos}) Number set cursor position in command-line
++ setenv({name}, {val}) none set environment variable
+ setfperm({fname}, {mode}) Number set {fname} file permissions to {mode}
+ setline({lnum}, {line}) Number set line {lnum} to {line}
+ setloclist({nr}, {list} [, {action} [, {what}]])
+***************
+*** 3905,3910 ****
+--- 3915,3928 ----
+ The highlight ID can be used with |synIDattr()| to obtain
+ syntax information about the highlighting.
+
++ environ() *environ()*
++ Return all of environment variables as dictionary. You can
++ check if an environment variable exists like this: >
++ :echo has_key(environ(), 'HOME')
++ < Note that the variable name may be CamelCase; to ignore case
++ use this: >
++ :echo index(keys(environ()), 'HOME', 0, 1) != -1
++
+ empty({expr}) *empty()*
+ Return the Number 1 if {expr} is empty, zero otherwise.
+ - A |List| or |Dictionary| is empty when it does not have any
+***************
+*** 4970,4982 ****
+ " Get the working directory of current tabpage
+ :echo getcwd(-1, 0)
+ <
+! getfsize({fname}) *getfsize()*
+! The result is a Number, which is the size in bytes of the
+! given file {fname}.
+! If {fname} is a directory, 0 is returned.
+! If the file {fname} can't be found, -1 is returned.
+! If the size of {fname} is too big to fit in a Number then -2
+! is returned.
+
+ getfontname([{name}]) *getfontname()*
+ Without an argument returns the name of the normal font being
+--- 4988,4998 ----
+ " Get the working directory of current tabpage
+ :echo getcwd(-1, 0)
+ <
+! getenv({name}) *getenv()*
+! Return the value of environment variable {name}.
+! When the variable does not exist |v:null| is returned. That
+! is different from a variable set to an empty string.
+! See also |expr-env|.
+
+ getfontname([{name}]) *getfontname()*
+ Without an argument returns the name of the normal font being
+***************
+*** 5009,5014 ****
+--- 5025,5038 ----
+
+ For setting permissions use |setfperm()|.
+
++ getfsize({fname}) *getfsize()*
++ The result is a Number, which is the size in bytes of the
++ given file {fname}.
++ If {fname} is a directory, 0 is returned.
++ If the file {fname} can't be found, -1 is returned.
++ If the size of {fname} is too big to fit in a Number then -2
++ is returned.
++
+ getftime({fname}) *getftime()*
+ The result is a Number, which is the last modification time of
+ the given file {fname}. The value is measured as seconds
+***************
+*** 8012,8017 ****
+--- 8036,8046 ----
+ Returns 0 when successful, 1 when not editing the command
+ line.
+
++ setenv({name}, {val}) *setenv()*
++ Set environment variable {name} to {val}.
++ When {val} is |v:null| the environment variable is deleted.
++ See also |expr-env|.
++
+ setfperm({fname}, {mode}) *setfperm()* *chmod*
+ Set the file permissions for {fname} to {mode}.
+ {mode} must be a string with 9 characters. It is of the form
+*** ../vim-8.1.1304/runtime/doc/usr_41.txt 2019-05-07 22:06:48.675310695 +0200
+--- runtime/doc/usr_41.txt 2019-05-09 14:28:20.978545651 +0200
+***************
+*** 774,779 ****
+--- 774,782 ----
+ rename() rename a file
+ system() get the result of a shell command as a string
+ systemlist() get the result of a shell command as a list
++ environ() get all environment variables
++ getenv() get one environment variable
++ setenv() set an environment variable
+ hostname() name of the system
+ readfile() read a file into a List of lines
+ readdir() get a List of file names in a directory
+***************
+*** 903,908 ****
+--- 906,912 ----
+ getwinposy() Y position of the Vim window
+ balloon_show() set the balloon content
+ balloon_split() split a message for a balloon
++ balloon_gettext() get the text in the balloon
+
+ Vim server: *server-functions*
+ serverlist() return the list of server names
+*** ../vim-8.1.1304/src/evalfunc.c 2019-05-09 13:50:13.362401997 +0200
+--- src/evalfunc.c 2019-05-09 14:45:25.653442537 +0200
+***************
+*** 137,142 ****
+--- 137,143 ----
+ static void f_diff_filler(typval_T *argvars, typval_T *rettv);
+ static void f_diff_hlID(typval_T *argvars, typval_T *rettv);
+ static void f_empty(typval_T *argvars, typval_T *rettv);
++ static void f_environ(typval_T *argvars, typval_T *rettv);
+ static void f_escape(typval_T *argvars, typval_T *rettv);
+ static void f_eval(typval_T *argvars, typval_T *rettv);
+ static void f_eventhandler(typval_T *argvars, typval_T *rettv);
+***************
+*** 187,192 ****
+--- 188,194 ----
+ static void f_getcmdtype(typval_T *argvars, typval_T *rettv);
+ static void f_getcmdwintype(typval_T *argvars, typval_T *rettv);
+ static void f_getcwd(typval_T *argvars, typval_T *rettv);
++ static void f_getenv(typval_T *argvars, typval_T *rettv);
+ static void f_getfontname(typval_T *argvars, typval_T *rettv);
+ static void f_getfperm(typval_T *argvars, typval_T *rettv);
+ static void f_getfsize(typval_T *argvars, typval_T *rettv);
+***************
+*** 365,370 ****
+--- 367,373 ----
+ static void f_setbufvar(typval_T *argvars, typval_T *rettv);
+ static void f_setcharsearch(typval_T *argvars, typval_T *rettv);
+ static void f_setcmdpos(typval_T *argvars, typval_T *rettv);
++ static void f_setenv(typval_T *argvars, typval_T *rettv);
+ static void f_setfperm(typval_T *argvars, typval_T *rettv);
+ static void f_setline(typval_T *argvars, typval_T *rettv);
+ static void f_setloclist(typval_T *argvars, typval_T *rettv);
+***************
+*** 629,634 ****
+--- 632,638 ----
+ {"diff_filler", 1, 1, f_diff_filler},
+ {"diff_hlID", 2, 2, f_diff_hlID},
+ {"empty", 1, 1, f_empty},
++ {"environ", 0, 0, f_environ},
+ {"escape", 2, 2, f_escape},
+ {"eval", 1, 1, f_eval},
+ {"eventhandler", 0, 0, f_eventhandler},
+***************
+*** 681,686 ****
+--- 685,691 ----
+ #endif
+ {"getcurpos", 0, 0, f_getcurpos},
+ {"getcwd", 0, 2, f_getcwd},
++ {"getenv", 1, 1, f_getenv},
+ {"getfontname", 0, 1, f_getfontname},
+ {"getfperm", 1, 1, f_getfperm},
+ {"getfsize", 1, 1, f_getfsize},
+***************
+*** 873,878 ****
+--- 878,884 ----
+ {"setbufvar", 3, 3, f_setbufvar},
+ {"setcharsearch", 1, 1, f_setcharsearch},
+ {"setcmdpos", 1, 1, f_setcmdpos},
++ {"setenv", 2, 2, f_setenv},
+ {"setfperm", 2, 2, f_setfperm},
+ {"setline", 2, 2, f_setline},
+ {"setloclist", 2, 4, f_setloclist},
+***************
+*** 3340,3345 ****
+--- 3346,3404 ----
+ }
+
+ /*
++ * "environ()" function
++ */
++ static void
++ f_environ(typval_T *argvars UNUSED, typval_T *rettv)
++ {
++ #if !defined(AMIGA)
++ int i = 0;
++ char_u *entry, *value;
++ # ifdef MSWIN
++ extern wchar_t **_wenviron;
++ # else
++ extern char **environ;
++ # endif
++
++ if (rettv_dict_alloc(rettv) != OK)
++ return;
++
++ # ifdef MSWIN
++ if (*_wenviron == NULL)
++ return;
++ # else
++ if (*environ == NULL)
++ return;
++ # endif
++
++ for (i = 0; ; ++i)
++ {
++ # ifdef MSWIN
++ short_u *p;
++
++ if ((p = (short_u *)_wenviron[i]) == NULL)
++ return;
++ entry = utf16_to_enc(p, NULL);
++ # else
++ if ((entry = (char_u *)environ[i]) == NULL)
++ return;
++ entry = vim_strsave(entry);
++ # endif
++ if (entry == NULL) // out of memory
++ return;
++ if ((value = vim_strchr(entry, '=')) == NULL)
++ {
++ vim_free(entry);
++ continue;
++ }
++ *value++ = NUL;
++ dict_add_string(rettv->vval.v_dict, (char *)entry, value);
++ vim_free(entry);
++ }
++ #endif
++ }
++
++ /*
+ * "escape({string}, {chars})" function
+ */
+ static void
+***************
+*** 5261,5266 ****
+--- 5320,5346 ----
+ }
+
+ /*
++ * "getenv()" function
++ */
++ static void
++ f_getenv(typval_T *argvars, typval_T *rettv)
++ {
++ int mustfree = FALSE;
++ char_u *p = vim_getenv(tv_get_string(&argvars[0]), &mustfree);
++
++ if (p == NULL)
++ {
++ rettv->v_type = VAR_SPECIAL;
++ rettv->vval.v_number = VVAL_NULL;
++ return;
++ }
++ if (!mustfree)
++ p = vim_strsave(p);
++ rettv->vval.v_string = p;
++ rettv->v_type = VAR_STRING;
++ }
++
++ /*
+ * "getfontname()" function
+ */
+ static void
+***************
+*** 11425,11430 ****
+--- 11505,11527 ----
+ }
+
+ /*
++ * "setenv()" function
++ */
++ static void
++ f_setenv(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ char_u namebuf[NUMBUFLEN];
++ char_u valbuf[NUMBUFLEN];
++ char_u *name = tv_get_string_buf(&argvars[0], namebuf);
++
++ if (argvars[1].v_type == VAR_SPECIAL
++ && argvars[1].vval.v_number == VVAL_NULL)
++ vim_unsetenv(name);
++ else
++ vim_setenv(name, tv_get_string_buf(&argvars[1], valbuf));
++ }
++
++ /*
+ * "setfperm({fname}, {mode})" function
+ */
+ static void
+*** ../vim-8.1.1304/src/testdir/Make_all.mak 2019-05-08 21:58:54.446597033 +0200
+--- src/testdir/Make_all.mak 2019-05-09 14:24:07.663891160 +0200
+***************
+*** 104,109 ****
+--- 104,110 ----
+ test_erasebackword \
+ test_escaped_glob \
+ test_eval_stuff \
++ test_environ \
+ test_ex_equal \
+ test_ex_undo \
+ test_ex_z \
+***************
+*** 320,325 ****
+--- 321,327 ----
+ test_digraph.res \
+ test_display.res \
+ test_edit.res \
++ test_environ.res \
+ test_erasebackword.res \
+ test_escaped_glob.res \
+ test_eval_stuff.res \
+*** ../vim-8.1.1304/src/testdir/test_environ.vim 2019-05-09 14:51:39.467575511 +0200
+--- src/testdir/test_environ.vim 2019-05-09 14:24:07.663891160 +0200
+***************
+*** 0 ****
+--- 1,44 ----
++ scriptencoding utf-8
++
++ func Test_environ()
++ unlet! $TESTENV
++ call assert_equal(0, has_key(environ(), 'TESTENV'))
++ let $TESTENV = 'foo'
++ call assert_equal(1, has_key(environ(), 'TESTENV'))
++ let $TESTENV = 'こんにちわ'
++ call assert_equal('こんにちわ', environ()['TESTENV'])
++ endfunc
++
++ func Test_getenv()
++ unlet! $TESTENV
++ call assert_equal(v:null, getenv('TESTENV'))
++ let $TESTENV = 'foo'
++ call assert_equal('foo', getenv('TESTENV'))
++ endfunc
++
++ func Test_setenv()
++ unlet! $TESTENV
++ call setenv('TEST ENV', 'foo')
++ call assert_equal('foo', getenv('TEST ENV'))
++ call setenv('TEST ENV', v:null)
++ call assert_equal(v:null, getenv('TEST ENV'))
++ endfunc
++
++ func Test_external_env()
++ call setenv('FOO', 'HelloWorld')
++ if has('win32')
++ let result = system('echo %FOO%')
++ else
++ let result = system('echo $FOO')
++ endif
++ let result = substitute(result, '[ \r\n]', '', 'g')
++ call assert_equal('HelloWorld', result)
++
++ call setenv('FOO', v:null)
++ if has('win32')
++ let result = system('set | grep ^FOO=')
++ else
++ let result = system('env | grep ^FOO=')
++ endif
++ call assert_equal('', result)
++ endfunc
+*** ../vim-8.1.1304/src/version.c 2019-05-09 14:14:37.094870868 +0200
+--- src/version.c 2019-05-09 14:51:47.387535281 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1305,
+ /**/
+
+--
+JOHN CLEESE PLAYED: SECOND SOLDIER WITH A KEEN INTEREST IN BIRDS, LARGE MAN
+ WITH DEAD BODY, BLACK KNIGHT, MR NEWT (A VILLAGE
+ BLACKSMITH INTERESTED IN BURNING WITCHES), A QUITE
+ EXTRAORDINARILY RUDE FRENCHMAN, TIM THE WIZARD, SIR
+ LAUNCELOT
+ "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.1306 b/data/vim/patches/8.1.1306
new file mode 100644
index 000000000..60f52f630
--- /dev/null
+++ b/data/vim/patches/8.1.1306
@@ -0,0 +1,2891 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1306
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1306
+Problem: Borland support is outdated and doesn't work.
+Solution: Remove Borland support, there are other (free) compilers
+ available. (Thomas Dziedzic, Ken Takata, closes #4364)
+Files: .gitignore, .hgignore, Filelist, runtime/doc/debug.txt,
+ runtime/doc/develop.txt, runtime/doc/usr_90.txt,
+ src/GvimExt/Make_bc5.mak, src/GvimExt/gvimext.cpp,
+ src/GvimExt/gvimext.rc, src/INSTALLpc.txt, src/Make_bc5.mak,
+ src/dosinst.c, src/dosinst.h, src/evalfunc.c, src/ex_cmds.c,
+ src/ex_getln.c, src/gui_w32.c, src/if_ole.cpp, src/if_py_both.h,
+ src/main.c, src/mark.c, src/message.c, src/misc1.c, src/misc2.c,
+ src/normal.c, src/option.c, src/os_mswin.c, src/os_w32exe.c,
+ src/os_win32.c, src/os_win32.h, src/proto.h, src/screen.c,
+ src/spell.c, src/spellfile.c, src/syntax.c, src/userfunc.c,
+ src/vim.h, src/vim.rc, src/vimrun.c, src/xxd/Make_bc5.mak,
+ src/xxd/xxd.c
+
+
+*** ../vim-8.1.1305/.gitignore 2019-05-07 21:48:15.625291418 +0200
+--- .gitignore 2019-05-09 15:08:50.086239830 +0200
+***************
+*** 43,56 ****
+ runtime/doc/uganda.nsis.txt
+ nsis/icons/*
+
+- # Borland C++
+- bcc.cfg
+- *.ilc
+- *.ild
+- *.ilf
+- *.ils
+- *.tds
+-
+ # NetBeans
+ nbproject/*
+
+--- 43,48 ----
+*** ../vim-8.1.1305/.hgignore 2019-05-07 21:48:15.625291418 +0200
+--- .hgignore 2019-05-09 15:08:50.086239830 +0200
+***************
+*** 45,58 ****
+ runtime/doc/uganda.nsis.txt
+ nsis/icons/*
+
+- # Borland C++
+- bcc.cfg
+- *.ilc
+- *.ild
+- *.ilf
+- *.ils
+- *.tds
+-
+ # NetBeans
+ nbproject/*
+
+--- 45,50 ----
+*** ../vim-8.1.1305/Filelist 2019-05-07 22:25:23.486167275 +0200
+--- Filelist 2019-05-09 15:08:50.086239830 +0200
+***************
+*** 421,427 ****
+ src/GvimExt/uninst.bat \
+ README_srcdos.txt \
+ src/INSTALLpc.txt \
+- src/Make_bc5.mak \
+ src/Make_cyg.mak \
+ src/Make_cyg_ming.mak \
+ src/Make_ming.mak \
+--- 421,426 ----
+***************
+*** 474,480 ****
+ src/xpm_w32.c \
+ src/xpm_w32.h \
+ src/tee/Make_mvc.mak \
+- src/xxd/Make_bc5.mak \
+ src/xxd/Make_ming.mak \
+ src/xxd/Make_mvc.mak \
+ nsis/gvim.nsi \
+--- 473,478 ----
+*** ../vim-8.1.1305/runtime/doc/debug.txt 2019-05-07 22:25:23.486167275 +0200
+--- runtime/doc/debug.txt 2019-05-09 15:08:50.086239830 +0200
+***************
+*** 80,88 ****
+
+ If you have Visual Studio, use that instead of the VC Toolkit and WinDbg.
+
+! For other compilers, you should always use the corresponding debugger: TD for
+! a Vim executable compiled with the Borland compiler; gdb (see above
+! |debug-gcc|) for the Cygwin and MinGW compilers.
+
+
+ *debug-vs2005*
+--- 80,87 ----
+
+ If you have Visual Studio, use that instead of the VC Toolkit and WinDbg.
+
+! For other compilers, you should always use the corresponding debugger: gdb
+! (see above |debug-gcc|) for the Cygwin and MinGW compilers.
+
+
+ *debug-vs2005*
+*** ../vim-8.1.1305/runtime/doc/develop.txt 2019-05-05 18:11:46.308590707 +0200
+--- runtime/doc/develop.txt 2019-05-09 15:08:50.086239830 +0200
+***************
+*** 278,284 ****
+ index shadows global declaration
+ time shadows global declaration
+ new C++ reserved keyword
+- try Borland C++ doesn't like it to be used as a variable.
+
+ clear Mac curses.h
+ echo Mac curses.h
+--- 278,283 ----
+*** ../vim-8.1.1305/runtime/doc/usr_90.txt 2019-05-05 18:11:46.328590595 +0200
+--- runtime/doc/usr_90.txt 2019-05-09 15:08:50.086239830 +0200
+***************
+*** 281,289 ****
+ In case you are not satisfied with the features included in the supplied
+ binaries, you could try compiling Vim yourself. Get the source archive from
+ the same location as where the binaries are. You need a compiler for which a
+! makefile exists. Microsoft Visual C works, but is expensive. The Free
+! Borland command-line compiler 5.5 can be used, as well as the free MingW and
+! Cygwin compilers. Check the file src/INSTALLpc.txt for hints.
+
+ ==============================================================================
+ *90.3* Upgrading
+--- 281,288 ----
+ In case you are not satisfied with the features included in the supplied
+ binaries, you could try compiling Vim yourself. Get the source archive from
+ the same location as where the binaries are. You need a compiler for which a
+! makefile exists. Microsoft Visual C works, but is expensive. The free MinGW
+! and Cygwin compilers can be used. Check the file src/INSTALLpc.txt for hints.
+
+ ==============================================================================
+ *90.3* Upgrading
+*** ../vim-8.1.1305/src/GvimExt/Make_bc5.mak 2010-05-15 13:04:10.000000000 +0200
+--- src/GvimExt/Make_bc5.mak 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,43 ****
+- ### USEDLL no for statically linked version of run-time, yes for DLL runtime
+- ### BOR path to root of Borland C install (c:\bc5)
+-
+- ### (requires cc3250.dll be available in %PATH%)
+- !if ("$(USEDLL)"=="")
+- USEDLL = no
+- !endif
+-
+- ### BOR: root of the BC installation
+- !if ("$(BOR)"=="")
+- BOR = c:\bc5
+- !endif
+-
+- CC = $(BOR)\bin\Bcc32
+- BRC = $(BOR)\bin\brc32
+- LINK = $(BOR)\BIN\ILink32
+- INCLUDE = $(BOR)\include;.
+- LIB = $(BOR)\lib
+-
+- !if ("$(USEDLL)"=="yes")
+- RT_DEF = -D_RTLDLL
+- RT_LIB = cw32i.lib
+- !else
+- RT_DEF =
+- RT_LIB = cw32.lib
+- !endif
+-
+-
+- all : gvimext.dll
+-
+- gvimext.obj : gvimext.cpp gvimext.h
+- $(CC) -tWD -I$(INCLUDE) -c -DFEAT_GETTEXT $(RT_DEF) -w- gvimext.cpp
+-
+- gvimext.res : gvimext.rc
+- $(BRC) -r gvimext.rc
+-
+- gvimext.dll : gvimext.obj gvimext.res
+- $(LINK) -L$(LIB) -aa gvimext.obj, gvimext.dll, , c0d32.obj $(RT_LIB) import32.lib, gvimext.def, gvimext.res
+-
+- clean :
+- -@del gvimext.obj
+- -@del gvimext.res
+- -@del gvimext.dll
+--- 0 ----
+*** ../vim-8.1.1305/src/GvimExt/gvimext.cpp 2018-12-16 14:37:35.845271247 +0100
+--- src/GvimExt/gvimext.cpp 2019-05-09 15:08:50.090239809 +0200
+***************
+*** 16,29 ****
+
+ #include "gvimext.h"
+
+- #ifdef __BORLANDC__
+- # include <dir.h>
+- # ifndef _strnicmp
+- # define _strnicmp(a, b, c) strnicmp((a), (b), (c))
+- # endif
+- #else
+ static char *searchpath(char *name);
+- #endif
+
+ // Always get an error while putting the following stuff to the
+ // gvimext.h file as class protected variables, give up and
+--- 16,22 ----
+***************
+*** 917,923 ****
+ return TRUE;
+ }
+
+- #ifndef __BORLANDC__
+ static char *
+ searchpath(char *name)
+ {
+--- 910,915 ----
+***************
+*** 937,943 ****
+ }
+ return (char *)"";
+ }
+- #endif
+
+ STDMETHODIMP CShellExt::InvokeGvim(HWND hParent,
+ LPCSTR /* pszWorkingDir */,
+--- 929,934 ----
+*** ../vim-8.1.1305/src/GvimExt/gvimext.rc 2010-05-15 13:04:10.000000000 +0200
+--- src/GvimExt/gvimext.rc 2019-05-09 15:08:50.090239809 +0200
+***************
+*** 7,15 ****
+ //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+! #ifndef __BORLANDC__
+! # include "winresrc.h"
+! #endif
+
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+--- 7,13 ----
+ //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+! #include "winresrc.h"
+
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+*** ../vim-8.1.1305/src/INSTALLpc.txt 2019-05-07 22:25:23.486167275 +0200
+--- src/INSTALLpc.txt 2019-05-09 15:08:50.090239809 +0200
+***************
+*** 25,45 ****
+ 2. Using MSYS2 with MinGW
+ 3. Using MinGW
+ 4. Cygwin
+! 5. Borland
+! 6. Cross compiling for Win32 from a Linux machine
+! 7. Building with Python support
+! 8. Building with Python3 support
+! 9. Building with Racket or MzScheme support
+! 10. Building with Lua support
+! 11. Building with Perl support
+! 12. Building with Ruby support
+! 13. Building with Tcl support
+! 14. Building with Terminal support
+! 15. Building with DirectX (DirectWrite) support
+! 16. Windows 3.1
+! 17. MS-DOS
+
+! 18. Installing after building from sources
+
+
+ The currently recommended way (that means it has been verified to work) is
+--- 25,44 ----
+ 2. Using MSYS2 with MinGW
+ 3. Using MinGW
+ 4. Cygwin
+! 5. Cross compiling for Win32 from a Linux machine
+! 6. Building with Python support
+! 7. Building with Python3 support
+! 8. Building with Racket or MzScheme support
+! 9. Building with Lua support
+! 10. Building with Perl support
+! 11. Building with Ruby support
+! 12. Building with Tcl support
+! 13. Building with Terminal support
+! 14. Building with DirectX (DirectWrite) support
+! 15. Windows 3.1
+! 16. MS-DOS
+
+! 17. Installing after building from sources
+
+
+ The currently recommended way (that means it has been verified to work) is
+***************
+*** 451,464 ****
+ with the other makefiles).
+
+
+! 5. Borland
+! ===========
+!
+! Use Make_bc5.mak with Borland C++ 5.x. See
+! http://users.skynet.be/antoine.mechelynck/vim/compile.htm
+!
+!
+! 6. Cross compiling for Win32 from a Linux machine
+ =================================================
+
+ [Update of 1) needs to be verified]
+--- 450,456 ----
+ with the other makefiles).
+
+
+! 5. Cross compiling for Win32 from a Linux machine
+ =================================================
+
+ [Update of 1) needs to be verified]
+***************
+*** 478,484 ****
+ Now you have created the Windows binary from your Linux box! Have fun...
+
+
+! 7. Building with Python support
+ ===============================
+
+ For building with MSVC 2008 the "Windows Installer" from www.python.org
+--- 470,476 ----
+ Now you have created the Windows binary from your Linux box! Have fun...
+
+
+! 6. Building with Python support
+ ===============================
+
+ For building with MSVC 2008 the "Windows Installer" from www.python.org
+***************
+*** 539,545 ****
+ You will end up with a Python-enabled, Win32 version. Enjoy!
+
+
+! 8. Building with Python3 support
+ ================================
+
+ For building with MSVC 2008 the "Windows Installer" from www.python.org
+--- 531,537 ----
+ You will end up with a Python-enabled, Win32 version. Enjoy!
+
+
+! 7. Building with Python3 support
+ ================================
+
+ For building with MSVC 2008 the "Windows Installer" from www.python.org
+***************
+*** 576,582 ****
+ libstdc++-6.dll.)
+
+
+! 9. Building with Racket or MzScheme support
+ ========================================
+
+ 1) Building with Racket support (newest)
+--- 568,574 ----
+ libstdc++-6.dll.)
+
+
+! 8. Building with Racket or MzScheme support
+ ========================================
+
+ 1) Building with Racket support (newest)
+***************
+*** 666,672 ****
+
+
+
+! 10. Building with Lua support
+ ============================
+
+ Vim with Lua support can be built with either MSVC or MinGW (or maybe Cygwin).
+--- 658,664 ----
+
+
+
+! 9. Building with Lua support
+ ============================
+
+ Vim with Lua support can be built with either MSVC or MinGW (or maybe Cygwin).
+***************
+*** 721,727 ****
+ LUA=/cygdrive/c/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53
+
+
+! 11. Building with Perl support
+ ==============================
+
+ Vim with Perl support can be built with either MSVC or MinGW (or Cygwin).
+--- 713,719 ----
+ LUA=/cygdrive/c/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53
+
+
+! 10. Building with Perl support
+ ==============================
+
+ Vim with Perl support can be built with either MSVC or MinGW (or Cygwin).
+***************
+*** 747,753 ****
+ PERL=C:/Perl DYNAMIC_PERL=yes PERL_VER=522
+
+
+! 12. Building with Ruby support
+ ==============================
+
+ Vim with Ruby support can be built with either MSVC or MinGW (or Cygwin).
+--- 739,745 ----
+ PERL=C:/Perl DYNAMIC_PERL=yes PERL_VER=522
+
+
+! 11. Building with Ruby support
+ ==============================
+
+ Vim with Ruby support can be built with either MSVC or MinGW (or Cygwin).
+***************
+*** 855,861 ****
+
+
+
+! 13. Building with Tcl support
+ =============================
+
+ Vim with Tcl support can be built with either MSVC or MinGW (or Cygwin).
+--- 847,853 ----
+
+
+
+! 12. Building with Tcl support
+ =============================
+
+ Vim with Tcl support can be built with either MSVC or MinGW (or Cygwin).
+***************
+*** 894,900 ****
+ TCL=C:/Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
+
+
+! 14. Building with Terminal support
+ ==================================
+
+ Vim with Terminal support can be built with either MSVC, MinGW or Cygwin.
+--- 886,892 ----
+ TCL=C:/Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
+
+
+! 13. Building with Terminal support
+ ==================================
+
+ Vim with Terminal support can be built with either MSVC, MinGW or Cygwin.
+***************
+*** 910,916 ****
+ mingw32-make -f Make_ming.mak TERMINAL=yes
+
+
+! 15. Building with DirectX (DirectWrite) support
+ ===============================================
+
+ Vim with DirectX (DirectWrite) support can be built with either MSVC or MinGW.
+--- 902,908 ----
+ mingw32-make -f Make_ming.mak TERMINAL=yes
+
+
+! 14. Building with DirectX (DirectWrite) support
+ ===============================================
+
+ Vim with DirectX (DirectWrite) support can be built with either MSVC or MinGW.
+***************
+*** 944,963 ****
+ mingw32-make -f Make_ming.mak DIRECTX=yes
+
+
+! 16. Windows 3.1x
+ ================
+
+ The Windows 3.1x support was removed in patch 7.4.1364.
+
+
+! 17. MS-DOS
+ ==========
+
+ The MS-DOS support was removed in patch 7.4.1399. Only very old Vim versions
+ work on MS-DOS because of the limited amount of memory available.
+
+
+! 18. Installing after building from sources
+ ==========================================
+
+ [provided by Michael Soyka, updated by Ken Takata]
+--- 936,955 ----
+ mingw32-make -f Make_ming.mak DIRECTX=yes
+
+
+! 15. Windows 3.1x
+ ================
+
+ The Windows 3.1x support was removed in patch 7.4.1364.
+
+
+! 16. MS-DOS
+ ==========
+
+ The MS-DOS support was removed in patch 7.4.1399. Only very old Vim versions
+ work on MS-DOS because of the limited amount of memory available.
+
+
+! 17. Installing after building from sources
+ ==========================================
+
+ [provided by Michael Soyka, updated by Ken Takata]
+*** ../vim-8.1.1305/src/Make_bc5.mak 2019-04-27 13:03:20.000715982 +0200
+--- src/Make_bc5.mak 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,983 ****
+- #
+- # Makefile for Vim.
+- # Compiler: Borland C++ 5.0 and later 32-bit compiler
+- # Targets: Win32 (Windows NT and Windows 95) (with/without GUI)
+- #
+- # NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
+- #
+- # Contributed by Ben Singer.
+- # Updated 4/1997 by Ron Aaron
+- # 2016: removed support for 16 bit DOS
+- # 6/1997 - added support for 16 bit DOS
+- # Note: this has been tested, and works, for BC5. Your mileage may vary.
+- # Has been reported NOT to work with BC 4.52. Maybe it can be fixed?
+- # 10/1997 - ron - fixed bugs w/ BC 5.02
+- # 8/1998 - ron - updated with new targets, fixed some stuff
+- # 3/2000 - Bram: Made it work with BC 5.5 free command line compiler,
+- # cleaned up variables.
+- # 6/2001 - Dan - Added support for compiling Python and TCL
+- # 7/2001 - Dan - Added support for compiling Ruby
+- #
+- # It builds on Windows 95 and NT-Intel, producing the same binary in either
+- # case. To build using Microsoft Visual C++, use Make_mvc.mak.
+- #
+- # This should work with the free Borland command line compiler, version 5.5.
+- # You need at least sp1 (service pack 1). With sp2 it compiles faster.
+- # Use a command like this:
+- # <path>\bin\make /f Make_bc5.mak BOR=<path>
+- #
+-
+- # let the make utility do the hard work:
+- .AUTODEPEND
+- .CACHEAUTODEPEND
+-
+- # VARIABLES:
+- # name value (default)
+- #
+- # BOR path to root of Borland C install (c:\bc5)
+- # LINK name of the linker ($(BOR)\bin\ilink32)
+- # GUI no or yes: set to yes if you want the GUI version (yes)
+- # LUA define to path to Lua dir to get Lua support (not defined)
+- # LUA_VER define to version of Lua being used (51)
+- # DYNAMIC_LUA no or yes: set to yes to load the Lua DLL dynamically (no)
+- # PERL define to path to Perl dir to get Perl support (not defined)
+- # PERL_VER define to version of Perl being used (56)
+- # DYNAMIC_PERL no or yes: set to yes to load the Perl DLL dynamically (no)
+- # PYTHON define to path to Python dir to get PYTHON support (not defined)
+- # PYTHON_VER define to version of Python being used (22)
+- # DYNAMIC_PYTHON no or yes: use yes to load the Python DLL dynamically (no)
+- # PYTHON3 define to path to Python3 dir to get PYTHON3 support (not defined)
+- # PYTHON3_VER define to version of Python3 being used (31)
+- # DYNAMIC_PYTHON3 no or yes: use yes to load the Python3 DLL dynamically (no)
+- # TCL define to path to TCL dir to get TCL support (not defined)
+- # TCL_VER define to version of TCL being used (83)
+- # DYNAMIC_TCL no or yes: use yes to load the TCL DLL dynamically (no)
+- # RUBY define to path to Ruby dir to get Ruby support (not defined)
+- # NOTE: You may have to remove the defines for uid_t and gid_t
+- # from the Ruby config.h header file.
+- # RUBY_VER define to version of Ruby being used (16)
+- # NOTE: compilation on WinNT/2K/XP requires
+- # at least version 1.6.5 of Ruby. Earlier versions
+- # of Ruby will cause a compile error on these systems.
+- # RUBY_VER_LONG same, but in format with dot. (1.6)
+- # DYNAMIC_RUBY no or yes: use yes to load the Ruby DLL dynamically (no)
+- # IME no or yes: set to yes for multi-byte IME support (yes)
+- # DYNAMIC_IME no or yes: set to yes to load imm32.dll dynamically (yes)
+- # GETTEXT no or yes: set to yes for multi-language support (yes)
+- # ICONV no or yes: set to yes for dynamic iconv support (yes)
+- # OLE no or yes: set to yes to make OLE gvim (no)
+- # DEBUG no or yes: set to yes if you wish a DEBUGging build (no)
+- # CODEGUARD no or yes: set to yes if you want to use CODEGUARD (no)
+- # CPUNR 1 through 6: select -CPU argument to compile with (3)
+- # 3 for 386, 4 for 486, 5 for pentium, 6 for pentium pro.
+- # USEDLL no or yes: set to yes to use the Runtime library DLL (no)
+- # For USEDLL=yes the cc3250.dll is required to run Vim.
+- # ALIGN 1, 2 or 4: Alignment to use (4 for Win32)
+- # FASTCALL no or yes: set to yes to use register-based function protocol (yes)
+- # OPTIMIZE SPACE, SPEED, or MAXSPEED: type of optimization (MAXSPEED)
+- # POSTSCRIPT no or yes: set to yes for PostScript printing
+- # FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32)
+- # WINVER 0x0400 or 0x0500: minimum Win32 version to support (0x0400)
+- # CSCOPE no or yes: include support for Cscope interface (yes)
+- # NETBEANS no or yes: include support for Netbeans interface; also
+- # requires CHANNEL (yes if GUI
+- # is yes)
+- # NBDEBUG no or yes: include support for debugging Netbeans interface (no)
+- # CHANNEL no or yes: include support for inter process communication (yes
+- # if GUI is yes)
+- # XPM define to path to XPM dir to get support for loading XPM images.
+-
+- ### BOR: root of the BC installation
+- !if ("$(BOR)"=="")
+- BOR = c:\bc5
+- !endif
+-
+- ### LINK: Name of the linker: ilink32 (this is below)
+-
+- ### GUI: yes for GUI version, no for console version
+- !if ("$(GUI)"=="")
+- GUI = yes
+- !endif
+-
+- ### IME: yes for multibyte support, no to disable it.
+- !if ("$(IME)"=="")
+- IME = yes
+- !endif
+- !if ("$(DYNAMIC_IME)"=="")
+- DYNAMIC_IME = yes
+- !endif
+-
+- ### GETTEXT: yes for multilanguage support, no to disable it.
+- !if ("$(GETTEXT)"=="")
+- GETTEXT = yes
+- !endif
+-
+- ### ICONV: yes to enable dynamic-iconv support, no to disable it
+- !if ("$(ICONV)"=="")
+- ICONV = yes
+- !endif
+-
+- ### CSCOPE: yes to enable Cscope support, no to disable it
+- !if ("$(CSCOPE)"=="")
+- CSCOPE = yes
+- !endif
+-
+- ### NETBEANS: yes to enable NetBeans interface support, no to disable it
+- !if ("$(NETBEANS)"=="") && ("$(GUI)"=="yes")
+- NETBEANS = yes
+- !endif
+-
+- ### CHANNEL: yes to enable inter process communication, no to disable it
+- !if ("$(CHANNEL)"=="") && ("$(GUI)"=="yes")
+- CHANNEL = yes
+- !endif
+-
+- ### LUA: uncomment this line if you want lua support in vim
+- # LUA=c:\lua
+-
+- ### PERL: uncomment this line if you want perl support in vim
+- # PERL=c:\perl
+-
+- ### PYTHON: uncomment this line if you want python support in vim
+- # PYTHON=c:\python22
+-
+- ### PYTHON3: uncomment this line if you want python3 support in vim
+- # PYTHON3=c:\python31
+-
+- ### RUBY: uncomment this line if you want ruby support in vim
+- # RUBY=c:\ruby
+-
+- ### TCL: uncomment this line if you want tcl support in vim
+- # TCL=c:\tcl
+-
+- ### OLE: no for normal gvim, yes for OLE-capable gvim (only works with GUI)
+- #OLE = yes
+-
+- ### DEBUG: Uncomment to make an executable for debugging
+- # DEBUG = yes
+- !if ("$(DEBUG)"=="yes")
+- DEBUG_FLAG = -v
+- !endif
+-
+- ### CODEGUARD: Uncomment to use the CODEGUARD stuff (BC 5.0 or later):
+- # CODEGUARD = yes
+- !if ("$(CODEGUARD)"=="yes")
+- CODEGUARD_FLAG = -vG
+- !endif
+-
+- ### CPUNR: set your target processor (3 to 6)
+- !if ("$(CPUNR)" == "i386") || ("$(CPUNR)" == "3")
+- CPUNR = 3
+- !elif ("$(CPUNR)" == "i486") || ("$(CPUNR)" == "4")
+- CPUNR = 4
+- !elif ("$(CPUNR)" == "i586") || ("$(CPUNR)" == "5")
+- CPUNR = 5
+- !elif ("$(CPUNR)" == "i686") || ("$(CPUNR)" == "6")
+- CPUNR = 6
+- !else
+- CPUNR = 3
+- !endif
+-
+- ### Comment out to use precompiled headers (faster, but uses lots of disk!)
+- HEADERS = -H -H=vim.csm -Hc
+-
+- ### USEDLL: no for statically linked version of run-time, yes for DLL runtime
+- !if ("$(USEDLL)"=="")
+- USEDLL = no
+- !endif
+-
+- ### ALIGN: alignment you desire: (1,2 or 4: s/b 4 for Win32)
+- !if ("$(ALIGN)"=="")
+- ALIGN = 4
+- !endif
+-
+- ### FASTCALL: yes to use FASTCALL calling convention (RECOMMENDED!), no otherwise
+- # Incompatible when calling external functions (like MSVC-compiled DLLs), so
+- # don't use FASTCALL when linking with external libs.
+- !if ("$(FASTCALL)"=="") && \
+- ("$(LUA)"=="") && \
+- ("$(PYTHON)"=="") && \
+- ("$(PYTHON3)"=="") && \
+- ("$(PERL)"=="") && \
+- ("$(TCL)"=="") && \
+- ("$(RUBY)"=="") && \
+- ("$(ICONV)"!="yes") && \
+- ("$(IME)"!="yes") && \
+- ("$(XPM)"=="")
+- FASTCALL = yes
+- !endif
+-
+- ### OPTIMIZE: SPEED to optimize for speed, SPACE otherwise (SPEED RECOMMENDED)
+- !if ("$(OPTIMIZE)"=="")
+- OPTIMIZE = MAXSPEED
+- !endif
+-
+- ### FEATURES: TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32)
+- !if ("$(FEATURES)"=="")
+- FEATURES = BIG
+- !endif
+-
+- ### POSTSCRIPT: uncomment this line if you want PostScript printing
+- #POSTSCRIPT = yes
+-
+- ###
+- # If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal
+- # default, use these lines.
+- #VIMRCLOC = somewhere
+- #VIMRUNTIMEDIR = somewhere
+-
+- ### Set the default $(WINVER) to make it work with Bcc 5.5.
+- !ifndef WINVER
+- WINVER = 0x0400
+- !endif
+-
+- #
+- # Sanity checks for the above options:
+- #
+-
+- OSTYPE = WIN32
+-
+- #
+- # Optimizations: change as desired (RECOMMENDATION: Don't change!):
+- #
+- !if ("$(DEBUG)"=="yes")
+- OPT = -Od -N
+- !else
+- !if ("$(OPTIMIZE)"=="SPACE")
+- OPT = -O1 -f- -d
+- !elif ("$(OPTIMIZE)"=="MAXSPEED")
+- OPT = -O2 -f- -d -Ocavi -O
+- !else
+- OPT = -O2 -f- -d -Oc -O
+- !endif
+- !if ("$(FASTCALL)"=="yes")
+- OPT = $(OPT) -pr
+- !endif
+- !if ("$(CODEGUARD)"!="yes")
+- OPT = $(OPT) -vi-
+- !endif
+- !endif
+- # shouldn't have to change:
+- LIB = $(BOR)\lib
+- INCLUDE = $(BOR)\include;.;proto
+- DEFINES = -DFEAT_$(FEATURES) -DWIN32 -DHAVE_PATHDEF \
+- -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
+-
+- !ifdef LUA
+- INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_LUA
+- INCLUDE = $(LUA)\include;$(INCLUDE)
+- ! ifndef LUA_VER
+- LUA_VER = 51
+- ! endif
+- ! if ("$(DYNAMIC_LUA)" == "yes")
+- INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
+- LUA_LIB_FLAG = /nodefaultlib:
+- ! endif
+- !endif
+-
+- !ifdef PERL
+- INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PERL
+- INCLUDE = $(PERL)\lib\core;$(INCLUDE)
+- ! ifndef PERL_VER
+- PERL_VER = 56
+- ! endif
+- ! if ("$(DYNAMIC_PERL)" == "yes")
+- ! if ($(PERL_VER) > 55)
+- INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
+- PERL_LIB_FLAG = /nodefaultlib:
+- ! else
+- ! message "Cannot dynamically load Perl versions less than 5.6. Loading statically..."
+- ! endif
+- ! endif
+- !endif
+-
+- !ifdef PYTHON
+- !ifdef PYTHON3
+- DYNAMIC_PYTHON=yes
+- DYNAMIC_PYTHON3=yes
+- !endif
+- !endif
+-
+- !ifdef PYTHON
+- INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PYTHON
+- !ifndef PYTHON_VER
+- PYTHON_VER = 22
+- !endif
+- !if "$(DYNAMIC_PYTHON)" == "yes"
+- INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
+- PYTHON_LIB_FLAG = /nodefaultlib:
+- !endif
+- !endif
+-
+- !ifdef PYTHON3
+- INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PYTHON3
+- !ifndef PYTHON3_VER
+- PYTHON3_VER = 31
+- !endif
+- !if "$(DYNAMIC_PYTHON3)" == "yes"
+- INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
+- PYTHON3_LIB_FLAG = /nodefaultlib:
+- !endif
+- !endif
+-
+-
+- !ifdef RUBY
+- !ifndef RUBY_VER
+- RUBY_VER = 16
+- !endif
+- !ifndef RUBY_VER_LONG
+- RUBY_VER_LONG = 1.6
+- !endif
+-
+- !if "$(RUBY_VER)" == "16"
+- !ifndef RUBY_PLATFORM
+- RUBY_PLATFORM = i586-mswin32
+- !endif
+- !ifndef RUBY_INSTALL_NAME
+- RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
+- !endif
+- !else
+- !ifndef RUBY_PLATFORM
+- RUBY_PLATFORM = i386-mswin32
+- !endif
+- !ifndef RUBY_INSTALL_NAME
+- RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
+- !endif
+- !endif
+-
+- INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_RUBY
+- INCLUDE = $(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM);$(INCLUDE)
+-
+- !if "$(DYNAMIC_RUBY)" == "yes"
+- INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
+- INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_RUBY_VER=$(RUBY_VER)
+- RUBY_LIB_FLAG = /nodefaultlib:
+- !endif
+- !endif
+-
+- !ifdef TCL
+- INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_TCL
+- INCLUDE = $(TCL)\include;$(INCLUDE)
+- !ifndef TCL_VER
+- TCL_VER = 83
+- !endif
+- TCL_LIB = $(TCL)\lib\tcl$(TCL_VER).lib
+- TCL_LIB_FLAG =
+- !if "$(DYNAMIC_TCL)" == "yes"
+- INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
+- TCL_LIB = tclstub$(TCL_VER)-bor.lib
+- TCL_LIB_FLAG =
+- !endif
+- !endif
+- #
+- # DO NOT change below:
+- #
+- CPUARG = -$(CPUNR)
+- ALIGNARG = -a$(ALIGN)
+- #
+- !if ("$(DEBUG)"=="yes")
+- DEFINES=$(DEFINES) -DDEBUG -D_DEBUG
+- !endif
+- #
+- !if ("$(OLE)"=="yes")
+- DEFINES = $(DEFINES) -DFEAT_OLE
+- !endif
+- #
+- !if ("$(IME)"=="yes")
+- MBDEFINES = $(MBDEFINES) -DFEAT_MBYTE_IME
+- !if ("$(DYNAMIC_IME)" == "yes")
+- MBDEFINES = $(MBDEFINES) -DDYNAMIC_IME
+- !endif
+- !endif
+- !if ("$(ICONV)"=="yes")
+- MBDEFINES = $(MBDEFINES) -DDYNAMIC_ICONV
+- !endif
+- !if ("$(GETTEXT)"=="yes")
+- MBDEFINES = $(MBDEFINES) -DDYNAMIC_GETTEXT
+- !endif
+-
+- !if ("$(CSCOPE)"=="yes")
+- DEFINES = $(DEFINES) -DFEAT_CSCOPE
+- !endif
+-
+- !if ("$(GUI)"=="yes")
+- DEFINES = $(DEFINES) -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD
+- !if ("$(DEBUG)"=="yes")
+- TARGET = gvimd.exe
+- !else
+- TARGET = gvim.exe
+- !endif
+- EXETYPE=-W
+- STARTUPOBJ = c0w32.obj
+- LINK2 = -aa
+- RESFILE = vim.res
+- !else
+- !undef NETBEANS
+- !undef CHANNEL
+- !undef XPM
+- !if ("$(DEBUG)"=="yes")
+- TARGET = vimd.exe
+- !else
+- # for now, anyway: VIMDLL is only for the GUI version
+- TARGET = vim.exe
+- !endif
+- EXETYPE=-WC
+- STARTUPOBJ = c0x32.obj
+- LINK2 = -ap -OS -o -P
+- RESFILE = vim.res
+- !endif
+-
+- !if ("$(NETBEANS)"=="yes")
+- !if ("$(CHANNEL)"!="yes")
+- # cannot use Netbeans without CHANNEL
+- NETBEANS = no
+- !else
+- DEFINES = $(DEFINES) -DFEAT_NETBEANS_INTG
+- !if ("$(NBDEBUG)"=="yes")
+- DEFINES = $(DEFINES) -DNBDEBUG
+- NBDEBUG_DEP = nbdebug.h nbdebug.c
+- !endif
+- !endif
+- !endif
+-
+- !if ("$(CHANNEL)"=="yes")
+- DEFINES = $(DEFINES) -DFEAT_JOB_CHANNEL
+- !endif
+-
+- !ifdef XPM
+- !if ("$(GUI)"=="yes")
+- DEFINES = $(DEFINES) -DFEAT_XPM_W32
+- INCLUDE = $(XPM)\include;$(INCLUDE)
+- !endif
+- !endif
+-
+- !if ("$(USEDLL)"=="yes")
+- DEFINES = $(DEFINES) -D_RTLDLL
+- !endif
+-
+- !if ("$(DEBUG)"=="yes")
+- OBJDIR = $(OSTYPE)\objdbg
+- !else
+- !if ("$(GUI)"=="yes")
+- !if ("$(OLE)"=="yes")
+- OBJDIR = $(OSTYPE)\oleobj
+- !else
+- OBJDIR = $(OSTYPE)\gobj
+- !endif
+- !else
+- OBJDIR = $(OSTYPE)\obj
+- !endif
+- !endif
+-
+- !if ("$(POSTSCRIPT)"=="yes")
+- DEFINES = $(DEFINES) -DMSWINPS
+- !endif
+-
+- ##### BASE COMPILER/TOOLS RULES #####
+- MAKE = $(BOR)\bin\make
+- CFLAGS = -w-aus -w-par -w-pch -w-ngu -w-csu -I$(INCLUDE)
+- BRC = $(BOR)\BIN\brc32
+- !if ("$(LINK)"=="")
+- LINK = $(BOR)\BIN\ILink32
+- !endif
+- CC = $(BOR)\BIN\Bcc32
+- LFLAGS = -OS -Tpe -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
+- LFLAGSDLL = -Tpd -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
+- CFLAGS = $(CFLAGS) -d -RT- -k- -Oi $(HEADERS) -f-
+-
+- CC1 = -c
+- CC2 = -o
+- CCARG = +$(OBJDIR)\bcc.cfg
+-
+- # implicit rules:
+-
+- # Without the following, the implicit rule in BUILTINS.MAK is picked up
+- # for a rule for .c.obj rather than the local implicit rule
+- .SUFFIXES
+- .SUFFIXES .c .obj
+- .path.c = .
+-
+- {.}.c{$(OBJDIR)}.obj:
+- $(CC) $(CCARG) $(CC1) -n$(OBJDIR)\ {$< }
+-
+- .cpp.obj:
+- $(CC) $(CCARG) $(CC1) $(CC2)$@ $*.cpp
+-
+- vimmain = \
+- $(OBJDIR)\os_w32exe.obj
+- vimwinmain = \
+- $(OBJDIR)\os_w32exe.obj
+-
+- vimobj = \
+- $(OBJDIR)\arabic.obj \
+- $(OBJDIR)\autocmd.obj \
+- $(OBJDIR)\blowfish.obj \
+- $(OBJDIR)\buffer.obj \
+- $(OBJDIR)\charset.obj \
+- $(OBJDIR)\crypt.obj \
+- $(OBJDIR)\crypt_zip.obj \
+- $(OBJDIR)\debugger.obj \
+- $(OBJDIR)\dict.obj \
+- $(OBJDIR)\diff.obj \
+- $(OBJDIR)\digraph.obj \
+- $(OBJDIR)\edit.obj \
+- $(OBJDIR)\eval.obj \
+- $(OBJDIR)\evalfunc.obj \
+- $(OBJDIR)\ex_cmds.obj \
+- $(OBJDIR)\ex_cmds2.obj \
+- $(OBJDIR)\ex_docmd.obj \
+- $(OBJDIR)\ex_eval.obj \
+- $(OBJDIR)\ex_getln.obj \
+- $(OBJDIR)\fileio.obj \
+- $(OBJDIR)\findfile.obj \
+- $(OBJDIR)\fold.obj \
+- $(OBJDIR)\getchar.obj \
+- $(OBJDIR)\hardcopy.obj \
+- $(OBJDIR)\hashtab.obj \
+- $(OBJDIR)\indent.obj \
+- $(OBJDIR)\insexpand.obj \
+- $(OBJDIR)\json.obj \
+- $(OBJDIR)\list.obj \
+- $(OBJDIR)\main.obj \
+- $(OBJDIR)\mark.obj \
+- $(OBJDIR)\memfile.obj \
+- $(OBJDIR)\memline.obj \
+- $(OBJDIR)\menu.obj \
+- $(OBJDIR)\message.obj \
+- $(OBJDIR)\misc1.obj \
+- $(OBJDIR)\misc2.obj \
+- $(OBJDIR)\move.obj \
+- $(OBJDIR)\mbyte.obj \
+- $(OBJDIR)\normal.obj \
+- $(OBJDIR)\ops.obj \
+- $(OBJDIR)\option.obj \
+- $(OBJDIR)\popupmnu.obj \
+- $(OBJDIR)\quickfix.obj \
+- $(OBJDIR)\regexp.obj \
+- $(OBJDIR)\screen.obj \
+- $(OBJDIR)\search.obj \
+- $(OBJDIR)\sha256.obj \
+- $(OBJDIR)\sign.obj \
+- $(OBJDIR)\spell.obj \
+- $(OBJDIR)\spellfile.obj \
+- $(OBJDIR)\syntax.obj \
+- $(OBJDIR)\tag.obj \
+- $(OBJDIR)\term.obj \
+- $(OBJDIR)\ui.obj \
+- $(OBJDIR)\undo.obj \
+- $(OBJDIR)\usercmd.obj \
+- $(OBJDIR)\userfunc.obj \
+- $(OBJDIR)\version.obj \
+- $(OBJDIR)\window.obj \
+- $(OBJDIR)\pathdef.obj
+-
+- !if ("$(OLE)"=="yes")
+- vimobj = $(vimobj) \
+- $(OBJDIR)\if_ole.obj
+- !endif
+-
+- !ifdef LUA
+- vimobj = $(vimobj) \
+- $(OBJDIR)\if_lua.obj
+- !endif
+-
+- !ifdef PERL
+- vimobj = $(vimobj) \
+- $(OBJDIR)\if_perl.obj
+- !endif
+-
+- !ifdef PYTHON
+- vimobj = $(vimobj) \
+- $(OBJDIR)\if_python.obj
+- !endif
+-
+- !ifdef PYTHON3
+- vimobj = $(vimobj) \
+- $(OBJDIR)\if_python3.obj
+- !endif
+-
+- !ifdef RUBY
+- vimobj = $(vimobj) \
+- $(OBJDIR)\if_ruby.obj
+- !endif
+-
+- !ifdef TCL
+- vimobj = $(vimobj) \
+- $(OBJDIR)\if_tcl.obj
+- !endif
+-
+- !if ("$(CSCOPE)"=="yes")
+- vimobj = $(vimobj) \
+- $(OBJDIR)\if_cscope.obj
+- !endif
+-
+- !if ("$(NETBEANS)"=="yes")
+- vimobj = $(vimobj) \
+- $(OBJDIR)\netbeans.obj
+- !endif
+-
+- !if ("$(CHANNEL)"=="yes")
+- vimobj = $(vimobj) \
+- $(OBJDIR)\channel.obj
+- !endif
+-
+- !ifdef XPM
+- vimobj = $(vimobj) \
+- $(OBJDIR)\xpm_w32.obj
+- !endif
+-
+- !if ("$(GUI)"=="yes")
+- vimobj = $(vimobj) \
+- $(vimwinmain) \
+- $(OBJDIR)\gui.obj \
+- $(OBJDIR)\gui_beval.obj \
+- $(OBJDIR)\gui_w32.obj
+- !endif
+-
+- vimobj = $(vimobj) \
+- $(OBJDIR)\os_win32.obj $(OBJDIR)\os_mswin.obj $(OBJDIR)\winclip.obj
+- # Blab what we are going to do:
+- MSG = Compiling $(OSTYPE) $(TARGET) $(OLETARGET), with:
+- !if ("$(GUI)"=="yes")
+- MSG = $(MSG) GUI
+- !endif
+- !if ("$(OLE)"=="yes")
+- MSG = $(MSG) OLE
+- !endif
+- !if ("$(USEDLL)"=="yes")
+- MSG = $(MSG) USEDLL
+- !endif
+- !if ("$(FASTCALL)"=="yes")
+- MSG = $(MSG) FASTCALL
+- !endif
+- !if ("$(IME)"=="yes")
+- MSG = $(MSG) IME
+- ! if "$(DYNAMIC_IME)" == "yes"
+- MSG = $(MSG)(dynamic)
+- ! endif
+- !endif
+- !if ("$(GETTEXT)"=="yes")
+- MSG = $(MSG) GETTEXT
+- !endif
+- !if ("$(ICONV)"=="yes")
+- MSG = $(MSG) ICONV
+- !endif
+- !if ("$(DEBUG)"=="yes")
+- MSG = $(MSG) DEBUG
+- !endif
+- !if ("$(CODEGUARD)"=="yes")
+- MSG = $(MSG) CODEGUARD
+- !endif
+- !if ("$(CSCOPE)"=="yes")
+- MSG = $(MSG) CSCOPE
+- !endif
+- !if ("$(NETBEANS)"=="yes")
+- MSG = $(MSG) NETBEANS
+- !endif
+- !if ("$(CHANNEL)"=="yes")
+- MSG = $(MSG) CHANNEL
+- !endif
+- !ifdef XPM
+- MSG = $(MSG) XPM
+- !endif
+- !ifdef LUA
+- MSG = $(MSG) LUA
+- ! if "$(DYNAMIC_LUA)" == "yes"
+- MSG = $(MSG)(dynamic)
+- ! endif
+- !endif
+- !ifdef PERL
+- MSG = $(MSG) PERL
+- ! if "$(DYNAMIC_PERL)" == "yes"
+- MSG = $(MSG)(dynamic)
+- ! endif
+- !endif
+- !ifdef PYTHON
+- MSG = $(MSG) PYTHON
+- ! if "$(DYNAMIC_PYTHON)" == "yes"
+- MSG = $(MSG)(dynamic)
+- ! endif
+- !endif
+- !ifdef PYTHON3
+- MSG = $(MSG) PYTHON3
+- ! if "$(DYNAMIC_PYTHON3)" == "yes"
+- MSG = $(MSG)(dynamic)
+- ! endif
+- !endif
+- !ifdef RUBY
+- MSG = $(MSG) RUBY
+- ! if "$(DYNAMIC_RUBY)" == "yes"
+- MSG = $(MSG)(dynamic)
+- ! endif
+- !endif
+- !ifdef TCL
+- MSG = $(MSG) TCL
+- ! if "$(DYNAMIC_TCL)" == "yes"
+- MSG = $(MSG)(dynamic)
+- ! endif
+- !endif
+- MSG = $(MSG) cpu=$(CPUARG)
+- MSG = $(MSG) Align=$(ALIGNARG)
+-
+- !message $(MSG)
+-
+- TARGETS = $(TARGETS) $(TARGET)
+-
+- # Targets:
+- all: vim vimrun.exe install.exe xxd uninstal.exe GvimExt/gvimext.dll
+-
+- vim: $(OSTYPE) $(OBJDIR) $(OBJDIR)\bcc.cfg $(TARGETS)
+- @if exist $(OBJDIR)\version.obj del $(OBJDIR)\version.obj
+- @if exist auto\pathdef.c del auto\pathdef.c
+-
+- $(OSTYPE):
+- -@md $(OSTYPE)
+-
+- $(OBJDIR):
+- -@md $(OBJDIR)
+-
+- xxd:
+- @cd xxd
+- $(MAKE) /f Make_bc5.mak BOR="$(BOR)" BCC="$(CC)"
+- @cd ..
+-
+- GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
+- cd GvimExt
+- $(MAKE) /f Make_bc5.mak USEDLL=$(USEDLL) BOR=$(BOR)
+- cd ..
+-
+- install.exe: dosinst.c $(OBJDIR)\bcc.cfg
+- $(CC) $(CCARG) -WC -DWIN32 -einstall dosinst.c
+-
+- uninstal.exe: uninstal.c $(OBJDIR)\bcc.cfg
+- $(CC) $(CCARG) -WC -DWIN32 -O2 -euninstal uninstal.c
+-
+- clean:
+- !if "$(OS)" == "Windows_NT"
+- # For Windows NT/2000, doesn't work on Windows 95/98...
+- # $(COMSPEC) needed to ensure rmdir.exe is not run
+- -@$(COMSPEC) /C rmdir /Q /S $(OBJDIR)
+- !else
+- # For Windows 95/98, doesn't work on Windows NT/2000...
+- -@deltree /y $(OBJDIR)
+- !endif
+- -@del *.res
+- -@del vim32*.dll
+- -@del vim32*.lib
+- -@del *vim*.exe
+- -@del *install*.exe
+- -@del *.csm
+- -@del *.map
+- -@del *.ilc
+- -@del *.ild
+- -@del *.ilf
+- -@del *.ils
+- -@del *.tds
+- !ifdef LUA
+- -@del lua.lib
+- !endif
+- !ifdef PERL
+- -@del perl.lib
+- -@del if_perl.c
+- -@del auto\if_perl.c
+- !endif
+- !ifdef PYTHON
+- -@del python.lib
+- !endif
+- !ifdef PYTHON3
+- -@del python3.lib
+- !endif
+- !ifdef RUBY
+- -@del ruby.lib
+- !endif
+- !ifdef TCL
+- -@del tcl.lib
+- !endif
+- !ifdef XPM
+- -@del xpm.lib
+- !endif
+- cd xxd
+- $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
+- cd ..
+- cd GvimExt
+- $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
+- cd ..
+-
+-
+- $(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
+- $(LINK) @&&|
+- $(LFLAGS) +
+- $(STARTUPOBJ) +
+- $(vimobj)
+- $<,$*
+- !if ("$(CODEGUARD)"=="yes")
+- cg32.lib+
+- !endif
+- # $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
+- ole2w32.lib +
+- import32.lib+
+- !ifdef LUA
+- $(LUA_LIB_FLAG)lua.lib+
+- !endif
+- !ifdef PERL
+- $(PERL_LIB_FLAG)perl.lib+
+- !endif
+- !ifdef PYTHON
+- $(PYTHON_LIB_FLAG)python.lib+
+- !endif
+- !ifdef PYTHON3
+- $(PYTHON3_LIB_FLAG)python3.lib+
+- !endif
+- !ifdef RUBY
+- $(RUBY_LIB_FLAG)ruby.lib+
+- !endif
+- !ifdef TCL
+- $(TCL_LIB_FLAG)tcl.lib+
+- !endif
+- !ifdef XPM
+- xpm.lib+
+- !endif
+- !if ("$(USEDLL)"=="yes")
+- cw32i.lib
+- !else
+- cw32.lib
+- !endif
+-
+- $(OBJDIR)\$(RESFILE)
+- |
+-
+- test:
+- cd testdir
+- $(MAKE) /NOLOGO -f Make_dos.mak win32
+- cd ..
+-
+- $(OBJDIR)\ex_docmd.obj: ex_docmd.c ex_cmds.h
+-
+- $(OBJDIR)\ex_eval.obj: ex_eval.c ex_cmds.h
+-
+- $(OBJDIR)\if_ole.obj: if_ole.cpp
+-
+- $(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
+-
+- $(OBJDIR)\if_python3.obj: if_python3.c if_py_both.h python3.lib
+- $(CC) -I$(PYTHON3)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python3.c
+-
+- $(OBJDIR)\if_ruby.obj: if_ruby.c ruby.lib
+- $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_ruby.c
+-
+- $(OBJDIR)\if_tcl.obj: if_tcl.c tcl.lib
+- $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_tcl.c
+-
+- $(OBJDIR)\xpm_w32.obj: xpm_w32.c xpm.lib
+- $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc xpm_w32.c
+-
+- $(OBJDIR)\netbeans.obj: netbeans.c $(NBDEBUG_DEP)
+- $(CC) $(CCARG) $(CC1) $(CC2)$@ netbeans.c
+-
+- $(OBJDIR)\channel.obj: channel.c
+- $(CC) $(CCARG) $(CC1) $(CC2)$@ channel.c
+-
+- $(OBJDIR)\vim.res: vim.rc version.h tools.bmp tearoff.bmp \
+- vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
+- $(BRC) -fo$(OBJDIR)\vim.res -i $(BOR)\include -w32 -r vim.rc @&&|
+- $(DEFINES)
+- |
+-
+- $(OBJDIR)\pathdef.obj: auto\pathdef.c
+- $(CC) $(CCARG) $(CC1) $(CC2)$@ auto\pathdef.c
+-
+-
+- # Need to escape both quotes and backslashes in $INTERP_DEFINES
+- INTERP_DEFINES_ESC_BKS=$(INTERP_DEFINES:\=\\)
+- INTERP_DEFINES_ESC=$(INTERP_DEFINES_ESC_BKS:"=\")
+-
+- # Note: the silly /*"*/ below are there to trick make into accepting
+- # the # character as something other than a comment without messing up
+- # the preprocessor directive.
+- auto\pathdef.c::
+- -@md auto
+- @echo creating auto/pathdef.c
+- @copy /y &&|
+- /* pathdef.c */
+- /*"*/#include "vim.h"/*"*/
+-
+- char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)";
+- char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)";
+- char_u *all_cflags = (char_u *)"$(CC:\=\\) $(CFLAGS:\=\\) $(DEFINES) $(MBDEFINES) $(INTERP_DEFINES_ESC) $(OPT) $(EXETYPE) $(CPUARG) $(ALIGNARG) $(DEBUG_FLAG) $(CODEGUARD_FLAG)";
+- char_u *all_lflags = (char_u *)"$(LINK:\=\\) $(LFLAGS:\=\\)";
+- char_u *compiled_user = (char_u *)"$(USERNAME)";
+- char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";
+- | auto\pathdef.c
+-
+- lua.lib: $(LUA)\lib\lua$(LUA_VER).lib
+- coff2omf $(LUA)\lib\lua$(LUA_VER).lib $@
+-
+- perl.lib: $(PERL)\lib\CORE\perl$(PERL_VER).lib
+- coff2omf $(PERL)\lib\CORE\perl$(PERL_VER).lib $@
+-
+- python.lib: $(PYTHON)\libs\python$(PYTHON_VER).lib
+- coff2omf $(PYTHON)\libs\python$(PYTHON_VER).lib $@
+-
+- python3.lib: $(PYTHON3)\libs\python$(PYTHON3_VER).lib
+- coff2omf $(PYTHON3)\libs\python$(PYTHON3_VER).lib $@
+-
+- ruby.lib: $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
+- coff2omf $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib $@
+-
+- # For some reason, the coff2omf method doesn't work on libXpm.lib, so
+- # we have to manually generate an import library straight from the DLL.
+- xpm.lib: $(XPM)\lib\libXpm.lib
+- implib -a $@ $(XPM)\bin\libXpm.dll
+-
+- tcl.lib: $(TCL_LIB)
+- !if ("$(DYNAMIC_TCL)" == "yes")
+- copy $(TCL_LIB) $@
+- !else
+- coff2omf $(TCL_LIB) $@
+- !endif
+-
+- !if ("$(DYNAMIC_TCL)" == "yes")
+- tclstub$(TCL_VER)-bor.lib:
+- -@IF NOT EXIST $@ ECHO You must download tclstub$(TCL_VER)-bor.lib separately and\
+- place it in the src directory in order to compile a dynamic TCL-enabled\
+- (g)vim with the Borland compiler. You can get the tclstub$(TCL_VER)-bor.lib file\
+- at http://mywebpage.netscape.com/sharppeople/vim/tclstub$(TCL_VER)-bor.lib
+- !endif
+-
+- # vimrun.exe:
+- vimrun.exe: vimrun.c
+- !if ("$(USEDLL)"=="yes")
+- $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) -D_RTLDLL vimrun.c cw32mti.lib
+- !else
+- $(CC) -WC -O1 -I$(INCLUDE) -L$(LIB) vimrun.c
+- !endif
+-
+- # The dependency on $(OBJDIR) is to have bcc.cfg generated each time.
+- $(OBJDIR)\bcc.cfg: Make_bc5.mak $(OBJDIR)
+- copy /y &&|
+- $(CFLAGS)
+- -L$(LIB)
+- $(DEFINES)
+- $(MBDEFINES)
+- $(INTERP_DEFINES)
+- $(EXETYPE)
+- $(DEBUG_FLAG)
+- $(OPT)
+- $(CODEGUARD_FLAG)
+- $(CPUARG)
+- $(ALIGNARG)
+- | $@
+-
+- # vi:set sts=4 sw=4:
+-
+--- 0 ----
+*** ../vim-8.1.1305/src/dosinst.c 2019-04-04 20:31:59.094873282 +0200
+--- src/dosinst.c 2019-05-09 15:08:50.090239809 +0200
+***************
+*** 10,16 ****
+ /*
+ * dosinst.c: Install program for Vim on MS-DOS and MS-Windows
+ *
+! * Compile with Make_mvc.mak, Make_bc3.mak, Make_bc5.mak or Make_djg.mak.
+ */
+
+ /*
+--- 10,16 ----
+ /*
+ * dosinst.c: Install program for Vim on MS-DOS and MS-Windows
+ *
+! * Compile with Make_mvc.mak, Make_cyg.mak or Make_ming.mak.
+ */
+
+ /*
+*** ../vim-8.1.1305/src/dosinst.h 2019-02-22 19:40:57.693250456 +0100
+--- src/dosinst.h 2019-05-09 15:08:50.090239809 +0200
+***************
+*** 47,57 ****
+ #if defined(UNIX_LINT)
+ # define vim_mkdir(x, y) mkdir((char *)(x), y)
+ #else
+! # ifndef __BORLANDC__
+! # define vim_mkdir(x, y) _mkdir((char *)(x))
+! # else
+! # define vim_mkdir(x, y) mkdir((char *)(x))
+! # endif
+ #endif
+
+ #define sleep(n) Sleep((n) * 1000)
+--- 47,53 ----
+ #if defined(UNIX_LINT)
+ # define vim_mkdir(x, y) mkdir((char *)(x), y)
+ #else
+! # define vim_mkdir(x, y) _mkdir((char *)(x))
+ #endif
+
+ #define sleep(n) Sleep((n) * 1000)
+***************
+*** 150,159 ****
+ #endif
+ }
+
+- #ifdef __BORLANDC__
+- /* Borland defines its own searchpath() in dir.h */
+- # include <dir.h>
+- #else
+ static char *
+ searchpath(char *name)
+ {
+--- 146,151 ----
+***************
+*** 173,179 ****
+ }
+ return NULL;
+ }
+- #endif
+
+ /*
+ * Call searchpath() and save the result in allocated memory, or return NULL.
+--- 165,170 ----
+***************
+*** 463,474 ****
+ /*
+ * Expand the executable name into a full path name.
+ */
+- #if defined(__BORLANDC__)
+-
+- /* Only Borland C++ has this. */
+- # define my_fullpath(b, n, l) _fullpath(b, n, l)
+-
+- #else
+ static char *
+ my_fullpath(char *buf, char *fname, int len)
+ {
+--- 454,459 ----
+***************
+*** 478,484 ****
+
+ return (len_read > 0 && len_read < (DWORD)len) ? buf : NULL;
+ }
+- #endif
+
+ /*
+ * Remove the tail from a file or directory name.
+--- 463,468 ----
+*** ../vim-8.1.1305/src/evalfunc.c 2019-05-09 14:52:22.079358841 +0200
+--- src/evalfunc.c 2019-05-09 15:08:50.090239809 +0200
+***************
+*** 12500,12515 ****
+ }
+ #endif
+
+! static int
+! #ifdef __BORLANDC__
+! _RTLENTRYF
+! #endif
+! item_compare(const void *s1, const void *s2);
+! static int
+! #ifdef __BORLANDC__
+! _RTLENTRYF
+! #endif
+! item_compare2(const void *s1, const void *s2);
+
+ /* struct used in the array that's given to qsort() */
+ typedef struct
+--- 12500,12507 ----
+ }
+ #endif
+
+! static int item_compare(const void *s1, const void *s2);
+! static int item_compare2(const void *s1, const void *s2);
+
+ /* struct used in the array that's given to qsort() */
+ typedef struct
+***************
+*** 12540,12548 ****
+ * Compare functions for f_sort() and f_uniq() below.
+ */
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ item_compare(const void *s1, const void *s2)
+ {
+ sortItem_T *si1, *si2;
+--- 12532,12537 ----
+***************
+*** 12627,12635 ****
+ }
+
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ item_compare2(const void *s1, const void *s2)
+ {
+ sortItem_T *si1, *si2;
+--- 12616,12621 ----
+*** ../vim-8.1.1305/src/ex_cmds.c 2019-05-01 18:08:38.267237229 +0200
+--- src/ex_cmds.c 2019-05-09 15:08:50.094239787 +0200
+***************
+*** 29,39 ****
+
+ static int check_readonly(int *forceit, buf_T *buf);
+ static void delbuf_msg(char_u *name);
+! static int
+! #ifdef __BORLANDC__
+! _RTLENTRYF
+! #endif
+! help_compare(const void *s1, const void *s2);
+ static void prepare_help_buffer(void);
+
+ /*
+--- 29,35 ----
+
+ static int check_readonly(int *forceit, buf_T *buf);
+ static void delbuf_msg(char_u *name);
+! static int help_compare(const void *s1, const void *s2);
+ static void prepare_help_buffer(void);
+
+ /*
+***************
+*** 314,329 ****
+ } st_u;
+ } sorti_T;
+
+! static int
+! #ifdef __BORLANDC__
+! _RTLENTRYF
+! #endif
+! sort_compare(const void *s1, const void *s2);
+
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ sort_compare(const void *s1, const void *s2)
+ {
+ sorti_T l1 = *(sorti_T *)s1;
+--- 310,318 ----
+ } st_u;
+ } sorti_T;
+
+! static int sort_compare(const void *s1, const void *s2);
+
+ static int
+ sort_compare(const void *s1, const void *s2)
+ {
+ sorti_T l1 = *(sorti_T *)s1;
+***************
+*** 6580,6588 ****
+ * that has been put after the tagname by find_tags().
+ */
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ help_compare(const void *s1, const void *s2)
+ {
+ char *p1;
+--- 6569,6574 ----
+*** ../vim-8.1.1305/src/ex_getln.c 2019-04-27 13:03:20.008715938 +0200
+--- src/ex_getln.c 2019-05-09 15:08:50.094239787 +0200
+***************
+*** 125,135 ****
+ #endif
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+! static int
+! #ifdef __BORLANDC__
+! _RTLENTRYF
+! #endif
+! sort_func_compare(const void *s1, const void *s2);
+ #endif
+
+
+--- 125,131 ----
+ #endif
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+! static int sort_func_compare(const void *s1, const void *s2);
+ #endif
+
+
+***************
+*** 3803,3811 ****
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ sort_func_compare(const void *s1, const void *s2)
+ {
+ char_u *p1 = *(char_u **)s1;
+--- 3799,3804 ----
+***************
+*** 6855,6863 ****
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ sort_hist(const void *s1, const void *s2)
+ {
+ histentry_T *p1 = *(histentry_T **)s1;
+--- 6848,6853 ----
+*** ../vim-8.1.1305/src/gui_w32.c 2019-05-09 13:50:13.362401997 +0200
+--- src/gui_w32.c 2019-05-09 15:08:50.094239787 +0200
+***************
+*** 1303,1311 ****
+ int
+ gui_mch_open(void)
+ {
+- #ifndef SW_SHOWDEFAULT
+- # define SW_SHOWDEFAULT 10 /* Borland 5.0 doesn't have it */
+- #endif
+ /* Actually open the window, if not already visible
+ * (may be done already in gui_mch_set_shellsize) */
+ if (!IsWindowVisible(s_hwnd))
+--- 1303,1308 ----
+***************
+*** 3799,3807 ****
+ * Add a lot of missing defines.
+ * They are not always missing, we need the #ifndef's.
+ */
+- # ifndef _cdecl
+- # define _cdecl
+- # endif
+ # ifndef IsMinimized
+ # define IsMinimized(hwnd) IsIconic(hwnd)
+ # endif
+--- 3796,3801 ----
+***************
+*** 5521,5527 ****
+ * First static functions (no prototypes generated).
+ */
+ # ifdef _MSC_VER
+! # include <ime.h> /* Apparently not needed for Cygwin, MingW or Borland. */
+ # endif
+ # include <imm.h>
+
+--- 5515,5521 ----
+ * First static functions (no prototypes generated).
+ */
+ # ifdef _MSC_VER
+! # include <ime.h> /* Apparently not needed for Cygwin or MinGW. */
+ # endif
+ # include <imm.h>
+
+***************
+*** 6272,6286 ****
+ void
+ gui_mch_flush(void)
+ {
+- # if defined(__BORLANDC__)
+- /*
+- * The GdiFlush declaration (in Borland C 5.01 <wingdi.h>) is not a
+- * prototype declaration.
+- * The compiler complains if __stdcall is not used in both declarations.
+- */
+- BOOL __stdcall GdiFlush(void);
+- # endif
+-
+ #if defined(FEAT_DIRECTX)
+ if (IS_ENABLE_DIRECTX())
+ DWriteContext_Flush(s_dwc);
+--- 6266,6271 ----
+*** ../vim-8.1.1305/src/if_ole.cpp 2019-02-18 21:41:34.477750367 +0100
+--- src/if_ole.cpp 2019-05-09 15:08:50.094239787 +0200
+***************
+*** 12,35 ****
+ *
+ * See os_mswin.c for the client side.
+ */
+-
+- /*
+- * We have some trouble with order of includes here. For Borland it needs to
+- * be different from MSVC...
+- */
+- #ifndef __BORLANDC__
+ extern "C" {
+ # include "vim.h"
+ }
+- #endif
+
+ #include <windows.h>
+ #include <oleauto.h>
+
+ extern "C" {
+- #ifdef __BORLANDC__
+- # include "vim.h"
+- #endif
+ extern HWND s_hwnd;
+ extern HWND vim_parent_hwnd;
+ }
+--- 12,25 ----
+*** ../vim-8.1.1305/src/if_py_both.h 2019-05-07 22:06:48.679310672 +0200
+--- src/if_py_both.h 2019-05-09 15:08:50.094239787 +0200
+***************
+*** 13,23 ****
+ * Common code for if_python.c and if_python3.c.
+ */
+
+- #ifdef __BORLANDC__
+- /* Disable Warning W8060: Possibly incorrect assignment in function ... */
+- # pragma warn -8060
+- #endif
+-
+ static char_u e_py_systemexit[] = "E880: Can't handle SystemExit of %s exception in vim";
+
+ #if PY_VERSION_HEX < 0x02050000
+--- 13,18 ----
+*** ../vim-8.1.1305/src/main.c 2019-05-08 22:28:41.677765838 +0200
+--- src/main.c 2019-05-09 15:08:50.094239787 +0200
+***************
+*** 98,106 ****
+ # endif
+ int
+ # ifdef MSWIN
+- # ifdef __BORLANDC__
+- _cdecl
+- # endif
+ VimMain
+ # else
+ main
+--- 98,103 ----
+*** ../vim-8.1.1305/src/mark.c 2019-04-27 22:40:03.927661368 +0200
+--- src/mark.c 2019-05-09 15:08:50.094239787 +0200
+***************
+*** 1950,1958 ****
+ * Compare functions for qsort() below, that compares b_last_used.
+ */
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ buf_compare(const void *s1, const void *s2)
+ {
+ buf_T *buf1 = *(buf_T **)s1;
+--- 1950,1955 ----
+*** ../vim-8.1.1305/src/message.c 2019-05-08 22:28:41.681765816 +0200
+--- src/message.c 2019-05-09 15:08:50.094239787 +0200
+***************
+*** 357,365 ****
+ int vim_snprintf(char *str, size_t str_m, const char *fmt, ...);
+
+ int
+- # ifdef __BORLANDC__
+- _RTLENTRYF
+- # endif
+ smsg(const char *s, ...)
+ {
+ va_list arglist;
+--- 357,362 ----
+***************
+*** 371,379 ****
+ }
+
+ int
+- # ifdef __BORLANDC__
+- _RTLENTRYF
+- # endif
+ smsg_attr(int attr, const char *s, ...)
+ {
+ va_list arglist;
+--- 368,373 ----
+***************
+*** 385,393 ****
+ }
+
+ int
+- # ifdef __BORLANDC__
+- _RTLENTRYF
+- # endif
+ smsg_attr_keep(int attr, const char *s, ...)
+ {
+ va_list arglist;
+--- 379,384 ----
+***************
+*** 3091,3097 ****
+ (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
+ # else
+ isatty(2)
+! # endif
+ # ifdef FEAT_GUI
+ ||
+ # endif
+--- 3082,3088 ----
+ (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
+ # else
+ isatty(2)
+! # endif
+ # ifdef FEAT_GUI
+ ||
+ # endif
+*** ../vim-8.1.1305/src/misc1.c 2019-04-10 22:15:15.809016828 +0200
+--- src/misc1.c 2019-05-09 15:08:50.098239766 +0200
+***************
+*** 5626,5643 ****
+ * File name expansion code for MS-DOS, Win16 and Win32. It's here because
+ * it's shared between these systems.
+ */
+- # if defined(PROTO)
+- # define _cdecl
+- # else
+- # ifdef __BORLANDC__
+- # define _cdecl _RTLENTRYF
+- # endif
+- # endif
+
+ /*
+ * comparison function for qsort in dos_expandpath()
+ */
+! static int _cdecl
+ pstrcmp(const void *a, const void *b)
+ {
+ return (pathcmp(*(char **)a, *(char **)b, -1));
+--- 5626,5636 ----
+ * File name expansion code for MS-DOS, Win16 and Win32. It's here because
+ * it's shared between these systems.
+ */
+
+ /*
+ * comparison function for qsort in dos_expandpath()
+ */
+! static int
+ pstrcmp(const void *a, const void *b)
+ {
+ return (pathcmp(*(char **)a, *(char **)b, -1));
+*** ../vim-8.1.1305/src/misc2.c 2019-05-08 21:58:54.446597033 +0200
+--- src/misc2.c 2019-05-09 15:08:50.098239766 +0200
+***************
+*** 3912,3927 ****
+ /*
+ * Sort an array of strings.
+ */
+! static int
+! #ifdef __BORLANDC__
+! _RTLENTRYF
+! #endif
+! sort_compare(const void *s1, const void *s2);
+
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ sort_compare(const void *s1, const void *s2)
+ {
+ return STRCMP(*(char **)s1, *(char **)s2);
+--- 3912,3920 ----
+ /*
+ * Sort an array of strings.
+ */
+! static int sort_compare(const void *s1, const void *s2);
+
+ static int
+ sort_compare(const void *s1, const void *s2)
+ {
+ return STRCMP(*(char **)s1, *(char **)s2);
+*** ../vim-8.1.1305/src/normal.c 2019-05-08 22:54:26.023509040 +0200
+--- src/normal.c 2019-05-09 15:08:50.098239766 +0200
+***************
+*** 27,37 ****
+ #ifdef FEAT_EVAL
+ static void set_vcount_ca(cmdarg_T *cap, int *set_prevcount);
+ #endif
+! static int
+! #ifdef __BORLANDC__
+! _RTLENTRYF
+! #endif
+! nv_compare(const void *s1, const void *s2);
+ static void op_colon(oparg_T *oap);
+ static void op_function(oparg_T *oap);
+ #if defined(FEAT_MOUSE)
+--- 27,33 ----
+ #ifdef FEAT_EVAL
+ static void set_vcount_ca(cmdarg_T *cap, int *set_prevcount);
+ #endif
+! static int nv_compare(const void *s1, const void *s2);
+ static void op_colon(oparg_T *oap);
+ static void op_function(oparg_T *oap);
+ #if defined(FEAT_MOUSE)
+***************
+*** 422,430 ****
+ * through the index in nv_cmd_idx[].
+ */
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ nv_compare(const void *s1, const void *s2)
+ {
+ int c1, c2;
+--- 418,423 ----
+*** ../vim-8.1.1305/src/option.c 2019-05-05 16:54:59.505931038 +0200
+--- src/option.c 2019-05-09 15:08:50.098239766 +0200
+***************
+*** 12561,12571 ****
+
+ #ifdef FEAT_LINEBREAK
+
+- # if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
+- /* Borland C++ screws up loop optimisation here (negri) */
+- #pragma option -O-l
+- # endif
+-
+ /*
+ * fill_breakat_flags() -- called when 'breakat' changes value.
+ */
+--- 12561,12566 ----
+***************
+*** 12582,12592 ****
+ for (p = p_breakat; *p; p++)
+ breakat_flags[*p] = TRUE;
+ }
+-
+- # if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
+- #pragma option -O.l
+- # endif
+-
+ #endif
+
+ /*
+--- 12577,12582 ----
+*** ../vim-8.1.1305/src/os_mswin.c 2019-04-28 19:46:17.034060084 +0200
+--- src/os_mswin.c 2019-05-09 15:08:50.098239766 +0200
+***************
+*** 172,197 ****
+ return !SetCurrentDirectory(temp);
+ }
+ # endif
+- #else
+- # ifdef __BORLANDC__
+- /* being a more ANSI compliant compiler, BorlandC doesn't define _stricoll:
+- * but it does in BC 5.02! */
+- # if __BORLANDC__ < 0x502
+- int _stricoll(char *a, char *b)
+- {
+- # if 1
+- // this is fast but not correct:
+- return stricmp(a, b);
+- # else
+- // the ANSI-ish correct way is to use strxfrm():
+- char a_buff[512], b_buff[512]; // file names, so this is enough on Win32
+- strxfrm(a_buff, a, 512);
+- strxfrm(b_buff, b, 512);
+- return strcoll(a_buff, b_buff);
+- # endif
+- }
+- # endif
+- # endif
+ #endif
+
+
+--- 172,177 ----
+***************
+*** 374,403 ****
+ int force UNUSED)
+ {
+ int nResult = FAIL;
+
+! #ifdef __BORLANDC__
+! if (*fname == NUL) /* Borland behaves badly here - make it consistent */
+! nResult = mch_dirname(buf, len);
+! else
+! #endif
+ {
+! WCHAR *wname;
+! WCHAR wbuf[MAX_PATH];
+! char_u *cname = NULL;
+!
+! wname = enc_to_utf16(fname, NULL);
+! if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH) != NULL)
+ {
+! cname = utf16_to_enc((short_u *)wbuf, NULL);
+! if (cname != NULL)
+! {
+! vim_strncpy(buf, cname, len - 1);
+! nResult = OK;
+! }
+ }
+- vim_free(wname);
+- vim_free(cname);
+ }
+
+ #ifdef USE_FNAME_CASE
+ fname_case(buf, len);
+--- 354,375 ----
+ int force UNUSED)
+ {
+ int nResult = FAIL;
++ WCHAR *wname;
++ WCHAR wbuf[MAX_PATH];
++ char_u *cname = NULL;
+
+! wname = enc_to_utf16(fname, NULL);
+! if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH) != NULL)
+ {
+! cname = utf16_to_enc((short_u *)wbuf, NULL);
+! if (cname != NULL)
+ {
+! vim_strncpy(buf, cname, len - 1);
+! nResult = OK;
+ }
+ }
++ vim_free(wname);
++ vim_free(cname);
+
+ #ifdef USE_FNAME_CASE
+ fname_case(buf, len);
+***************
+*** 2044,2052 ****
+ * Clean up on exit. This destroys the hidden message window.
+ */
+ static void
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ CleanUpMessaging(void)
+ {
+ if (message_window != 0)
+--- 2016,2021 ----
+*** ../vim-8.1.1305/src/os_w32exe.c 2019-04-28 19:46:17.034060084 +0200
+--- src/os_w32exe.c 2019-05-09 15:08:50.098239766 +0200
+***************
+*** 15,33 ****
+ */
+ #include "vim.h"
+
+- #ifdef __MINGW32__
+- # ifndef _cdecl
+- # define _cdecl
+- # endif
+- #endif
+-
+ // cproto doesn't create a prototype for VimMain()
+ #ifdef VIMDLL
+ __declspec(dllimport)
+ #endif
+! int _cdecl VimMain(int argc, char **argv);
+ #ifndef VIMDLL
+! void _cdecl SaveInst(HINSTANCE hInst);
+ #endif
+
+ #ifndef PROTO
+--- 15,27 ----
+ */
+ #include "vim.h"
+
+ // cproto doesn't create a prototype for VimMain()
+ #ifdef VIMDLL
+ __declspec(dllimport)
+ #endif
+! int VimMain(int argc, char **argv);
+ #ifndef VIMDLL
+! void SaveInst(HINSTANCE hInst);
+ #endif
+
+ #ifndef PROTO
+*** ../vim-8.1.1305/src/os_win32.c 2019-05-07 23:01:34.241209371 +0200
+--- src/os_win32.c 2019-05-09 15:08:50.098239766 +0200
+***************
+*** 146,156 ****
+ # define __stdcall /* empty */
+ #endif
+
+- #if defined(__BORLANDC__)
+- /* Strangely Borland uses a non-standard name. */
+- # define wcsicmp(a, b) wcscmpi((a), (b))
+- #endif
+-
+ #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ /* Win32 Console handles for input and output */
+ static HANDLE g_hConIn = INVALID_HANDLE_VALUE;
+--- 146,151 ----
+***************
+*** 941,949 ****
+
+ /* The return code indicates key code size. */
+ static int
+- #ifdef __BORLANDC__
+- __stdcall
+- #endif
+ win32_kbd_patch_key(
+ KEY_EVENT_RECORD *pker)
+ {
+--- 936,941 ----
+***************
+*** 6695,6702 ****
+ int
+ mch_open(const char *name, int flags, int mode)
+ {
+- /* _wopen() does not work with Borland C 5.5: creates a read-only file. */
+- #ifndef __BORLANDC__
+ WCHAR *wn;
+ int f;
+
+--- 6687,6692 ----
+***************
+*** 6707,6722 ****
+ f = _wopen(wn, flags, mode);
+ vim_free(wn);
+ return f;
+- #else
+- /* open() can open a file which name is longer than _MAX_PATH bytes
+- * and shorter than _MAX_PATH characters successfully, but sometimes it
+- * causes unexpected error in another part. We make it an error explicitly
+- * here. */
+- if (strlen(name) >= _MAX_PATH)
+- return -1;
+-
+- return open(name, flags, mode);
+- #endif
+ }
+
+ /*
+--- 6697,6702 ----
+*** ../vim-8.1.1305/src/os_win32.h 2019-04-28 19:46:17.034060084 +0200
+--- src/os_win32.h 2019-05-09 15:08:50.098239766 +0200
+***************
+*** 53,64 ****
+
+ #define FEAT_SHORTCUT /* resolve shortcuts */
+
+! #if (!defined(__BORLANDC__) || __BORLANDC__ >= 0x550) \
+! && (!defined(_MSC_VER) || _MSC_VER > 1020)
+ /*
+ * Access Control List (actually security info).
+! * Borland has the acl stuff only in version 5.5 and later.
+! * MSVC in 5.0, not in 4.2, don't know about 4.3.
+ */
+ # define HAVE_ACL
+ #endif
+--- 53,62 ----
+
+ #define FEAT_SHORTCUT /* resolve shortcuts */
+
+! #if (!defined(_MSC_VER) || _MSC_VER > 1020)
+ /*
+ * Access Control List (actually security info).
+! * MSVC has acl stuff only in 5.0, not in 4.2, don't know about 4.3.
+ */
+ # define HAVE_ACL
+ #endif
+***************
+*** 142,149 ****
+ # define IO_REPARSE_TAG_SYMLINK 0xA000000C
+ #endif
+
+! #if defined(_MSC_VER) || defined(__BORLANDC__)
+! /* Support for __try / __except. All versions of MSVC and Borland C are
+ * expected to have this. Any other compilers that support it? */
+ # define HAVE_TRY_EXCEPT 1
+ # include <malloc.h> /* for _resetstkoflw() */
+--- 140,147 ----
+ # define IO_REPARSE_TAG_SYMLINK 0xA000000C
+ #endif
+
+! #if defined(_MSC_VER)
+! /* Support for __try / __except. All versions of MSVC are
+ * expected to have this. Any other compilers that support it? */
+ # define HAVE_TRY_EXCEPT 1
+ # include <malloc.h> /* for _resetstkoflw() */
+***************
+*** 206,216 ****
+ # define HAVE_SETENV
+ #endif
+ #define mch_getenv(x) (char_u *)getenv((char *)(x))
+! #ifdef __BORLANDC__
+! # define vim_mkdir(x, y) mkdir(x)
+! #else
+! # define vim_mkdir(x, y) mch_mkdir(x)
+! #endif
+
+ /* Enable common dialogs input unicode from IME if possible. */
+ #define pDispatchMessage DispatchMessageW
+--- 204,210 ----
+ # define HAVE_SETENV
+ #endif
+ #define mch_getenv(x) (char_u *)getenv((char *)(x))
+! #define vim_mkdir(x, y) mch_mkdir(x)
+
+ /* Enable common dialogs input unicode from IME if possible. */
+ #define pDispatchMessage DispatchMessageW
+*** ../vim-8.1.1305/src/proto.h 2019-04-27 13:03:20.008715938 +0200
+--- src/proto.h 2019-05-09 15:08:50.098239766 +0200
+***************
+*** 42,49 ****
+ # include "os_win32.pro"
+ # include "os_mswin.pro"
+ # include "winclip.pro"
+! # if (defined(__GNUC__) && !defined(__MINGW32__)) \
+! || (defined(__BORLANDC__) && __BORLANDC__ < 0x502)
+ extern int _stricoll(char *a, char *b);
+ # endif
+ # endif
+--- 42,48 ----
+ # include "os_win32.pro"
+ # include "os_mswin.pro"
+ # include "winclip.pro"
+! # if (defined(__GNUC__) && !defined(__MINGW32__))
+ extern int _stricoll(char *a, char *b);
+ # endif
+ # endif
+***************
+*** 108,180 ****
+ # endif
+
+ /* These prototypes cannot be produced automatically. */
+! int
+! # ifdef __BORLANDC__
+! _RTLENTRYF
+! # endif
+! smsg(const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 1, 0)))
+ #endif
+ ;
+
+! int
+! # ifdef __BORLANDC__
+! _RTLENTRYF
+! # endif
+! smsg_attr(int, const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 2, 3)))
+ #endif
+ ;
+
+! int
+! # ifdef __BORLANDC__
+! _RTLENTRYF
+! # endif
+! smsg_attr_keep(int, const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 2, 3)))
+ #endif
+ ;
+
+ /* These prototypes cannot be produced automatically. */
+! int
+! # ifdef __BORLANDC__
+! _RTLENTRYF
+! # endif
+! semsg(const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 1, 0)))
+ #endif
+ ;
+
+ /* These prototypes cannot be produced automatically. */
+! void
+! # ifdef __BORLANDC__
+! _RTLENTRYF
+! # endif
+! siemsg(const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 1, 0)))
+ #endif
+ ;
+
+! int
+! # ifdef __BORLANDC__
+! _RTLENTRYF
+! # endif
+! vim_snprintf_add(char *, size_t, const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 3, 4)))
+ #endif
+ ;
+
+! int
+! # ifdef __BORLANDC__
+! _RTLENTRYF
+! # endif
+! vim_snprintf(char *, size_t, const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 3, 4)))
+ #endif
+--- 107,151 ----
+ # endif
+
+ /* These prototypes cannot be produced automatically. */
+! int smsg(const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 1, 0)))
+ #endif
+ ;
+
+! int smsg_attr(int, const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 2, 3)))
+ #endif
+ ;
+
+! int smsg_attr_keep(int, const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 2, 3)))
+ #endif
+ ;
+
+ /* These prototypes cannot be produced automatically. */
+! int semsg(const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 1, 0)))
+ #endif
+ ;
+
+ /* These prototypes cannot be produced automatically. */
+! void siemsg(const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 1, 0)))
+ #endif
+ ;
+
+! int vim_snprintf_add(char *, size_t, const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 3, 4)))
+ #endif
+ ;
+
+! int vim_snprintf(char *, size_t, const char *, ...)
+ #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 3, 4)))
+ #endif
+***************
+*** 209,215 ****
+ # endif
+ # include "search.pro"
+ # ifdef FEAT_SIGNS
+! # include "sign.pro"
+ # endif
+ # include "spell.pro"
+ # include "spellfile.pro"
+--- 180,186 ----
+ # endif
+ # include "search.pro"
+ # ifdef FEAT_SIGNS
+! # include "sign.pro"
+ # endif
+ # include "spell.pro"
+ # include "spellfile.pro"
+***************
+*** 337,349 ****
+ */
+ #if defined(FEAT_PERL) && !defined(IN_PERL_FILE)
+ # define CV void
+- # ifdef __BORLANDC__
+- #pragma option -pc
+- # endif
+ # include "if_perl.pro"
+- # ifdef __BORLANDC__
+- #pragma option -p.
+- # endif
+ # include "if_perlsfio.pro"
+ #endif
+
+--- 308,314 ----
+***************
+*** 357,364 ****
+ void clip_mch_request_selection(VimClipboard *cbd);
+ void clip_mch_set_selection(VimClipboard *cbd);
+ #endif
+-
+- #ifdef __BORLANDC__
+- # define _PROTO_H
+- #endif
+ #endif /* !PROTO && !NOPROTO */
+--- 322,325 ----
+*** ../vim-8.1.1305/src/screen.c 2019-05-08 20:20:42.596141850 +0200
+--- src/screen.c 2019-05-09 15:08:50.102239745 +0200
+***************
+*** 2945,2953 ****
+ static buf_T *current_buf = NULL;
+
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ text_prop_compare(const void *s1, const void *s2)
+ {
+ int idx1, idx2;
+--- 2945,2950 ----
+*** ../vim-8.1.1305/src/spell.c 2019-04-10 22:15:15.817016767 +0200
+--- src/spell.c 2019-05-09 15:08:50.102239745 +0200
+***************
+*** 6760,6779 ****
+ }
+ }
+
+! static int
+! #ifdef __BORLANDC__
+! _RTLENTRYF
+! #endif
+! sug_compare(const void *s1, const void *s2);
+
+ /*
+ * Function given to qsort() to sort the suggestions on st_score.
+ * First on "st_score", then "st_altscore" then alphabetically.
+ */
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ sug_compare(const void *s1, const void *s2)
+ {
+ suggest_T *p1 = (suggest_T *)s1;
+--- 6760,6772 ----
+ }
+ }
+
+! static int sug_compare(const void *s1, const void *s2);
+
+ /*
+ * Function given to qsort() to sort the suggestions on st_score.
+ * First on "st_score", then "st_altscore" then alphabetically.
+ */
+ static int
+ sug_compare(const void *s1, const void *s2)
+ {
+ suggest_T *p1 = (suggest_T *)s1;
+*** ../vim-8.1.1305/src/spellfile.c 2019-01-24 17:18:37.595462334 +0100
+--- src/spellfile.c 2019-05-09 15:08:50.102239745 +0200
+***************
+*** 4802,4820 ****
+ return p1 == NULL && p2 == NULL;
+ }
+
+! static int
+! #ifdef __BORLANDC__
+! _RTLENTRYF
+! #endif
+! rep_compare(const void *s1, const void *s2);
+
+ /*
+ * Function given to qsort() to sort the REP items on "from" string.
+ */
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ rep_compare(const void *s1, const void *s2)
+ {
+ fromto_T *p1 = (fromto_T *)s1;
+--- 4802,4813 ----
+ return p1 == NULL && p2 == NULL;
+ }
+
+! static int rep_compare(const void *s1, const void *s2);
+
+ /*
+ * Function given to qsort() to sort the REP items on "from" string.
+ */
+ static int
+ rep_compare(const void *s1, const void *s2)
+ {
+ fromto_T *p1 = (fromto_T *)s1;
+*** ../vim-8.1.1305/src/syntax.c 2019-04-28 19:46:17.034060084 +0200
+--- src/syntax.c 2019-05-09 15:08:50.102239745 +0200
+***************
+*** 5348,5356 ****
+ * A simple syntax group ID comparison function suitable for use in qsort()
+ */
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ syn_compare_stub(const void *v1, const void *v2)
+ {
+ const short *s1 = v1;
+--- 5348,5353 ----
+***************
+*** 6703,6711 ****
+ } time_entry_T;
+
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ syn_compare_syntime(const void *v1, const void *v2)
+ {
+ const time_entry_T *s1 = v1;
+--- 6700,6705 ----
+*** ../vim-8.1.1305/src/userfunc.c 2019-04-21 00:00:07.946354820 +0200
+--- src/userfunc.c 2019-05-09 15:08:50.102239745 +0200
+***************
+*** 55,70 ****
+ static void func_do_profile(ufunc_T *fp);
+ static void prof_sort_list(FILE *fd, ufunc_T **sorttab, int st_len, char *title, int prefer_self);
+ static void prof_func_line(FILE *fd, int count, proftime_T *total, proftime_T *self, int prefer_self);
+! static int
+! # ifdef __BORLANDC__
+! _RTLENTRYF
+! # endif
+! prof_total_cmp(const void *s1, const void *s2);
+! static int
+! # ifdef __BORLANDC__
+! _RTLENTRYF
+! # endif
+! prof_self_cmp(const void *s1, const void *s2);
+ #endif
+ static void funccal_unref(funccall_T *fc, ufunc_T *fp, int force);
+
+--- 55,62 ----
+ static void func_do_profile(ufunc_T *fp);
+ static void prof_sort_list(FILE *fd, ufunc_T **sorttab, int st_len, char *title, int prefer_self);
+ static void prof_func_line(FILE *fd, int count, proftime_T *total, proftime_T *self, int prefer_self);
+! static int prof_total_cmp(const void *s1, const void *s2);
+! static int prof_self_cmp(const void *s1, const void *s2);
+ #endif
+ static void funccal_unref(funccall_T *fc, ufunc_T *fp, int force);
+
+***************
+*** 2794,2802 ****
+ * Compare function for total time sorting.
+ */
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ prof_total_cmp(const void *s1, const void *s2)
+ {
+ ufunc_T *p1, *p2;
+--- 2786,2791 ----
+***************
+*** 2810,2818 ****
+ * Compare function for self time sorting.
+ */
+ static int
+- #ifdef __BORLANDC__
+- _RTLENTRYF
+- #endif
+ prof_self_cmp(const void *s1, const void *s2)
+ {
+ ufunc_T *p1, *p2;
+--- 2799,2804 ----
+*** ../vim-8.1.1305/src/vim.h 2019-04-28 18:04:56.062492159 +0200
+--- src/vim.h 2019-05-09 15:08:50.102239745 +0200
+***************
+*** 17,40 ****
+ # define MSWIN
+ #endif
+
+- // use fastcall for Borland, when compiling for MS-Windows
+- #if defined(__BORLANDC__) && defined(MSWIN) && !defined(DEBUG)
+- #if defined(FEAT_PERL) || \
+- defined(FEAT_PYTHON) || \
+- defined(FEAT_PYTHON3) || \
+- defined(FEAT_RUBY) || \
+- defined(FEAT_TCL) || \
+- defined(FEAT_MZSCHEME) || \
+- defined(DYNAMIC_GETTEXT) || \
+- defined(DYNAMIC_ICONV) || \
+- defined(DYNAMIC_IME) || \
+- defined(XPM)
+- #pragma option -pc
+- # else
+- #pragma option -pr
+- # endif
+- #endif
+-
+ #ifdef MSWIN
+ # include "vimio.h"
+ #endif
+--- 17,22 ----
+***************
+*** 2163,2173 ****
+ # define BROWSE_DIR 2 /* flag for do_browse() */
+ #endif
+
+- /* stop using fastcall for Borland */
+- #if defined(__BORLANDC__) && defined(MSWIN) && !defined(DEBUG)
+- #pragma option -p.
+- #endif
+-
+ #ifdef _MSC_VER
+ /* Avoid useless warning "conversion from X to Y of greater size". */
+ #pragma warning(disable : 4312)
+--- 2145,2150 ----
+***************
+*** 2344,2352 ****
+ # undef FF
+ # undef OP_DELETE
+ # undef OP_JOIN
+- # ifdef __BORLANDC__
+- # define NOPROTO 1
+- # endif
+ /* remove MAX and MIN, included by glib.h, redefined by sys/param.h */
+ # ifdef MAX
+ # undef MAX
+--- 2321,2326 ----
+***************
+*** 2374,2383 ****
+ # undef bool
+ # endif
+
+- # ifdef __BORLANDC__
+- /* Borland has the structure stati64 but not _stati64 */
+- # define _stati64 stati64
+- # endif
+ #endif
+
+ /* values for vim_handle_signal() that are not a signal */
+--- 2348,2353 ----
+*** ../vim-8.1.1305/src/vim.rc 2019-04-28 19:46:17.034060084 +0200
+--- src/vim.rc 2019-05-09 15:08:50.102239745 +0200
+***************
+*** 12,22 ****
+ #include <winver.h>
+ #include "version.h"
+ #include "gui_w32_rc.h"
+! // #if defined(__BORLANDC__) || defined(__CYGWIN32__) || defined(__MINGW32__)
+! # include <winresrc.h>
+! // #else
+! // # include <winres.h>
+! // #endif
+
+ //
+ // Icons
+--- 12,18 ----
+ #include <winver.h>
+ #include "version.h"
+ #include "gui_w32_rc.h"
+! #include <winresrc.h>
+
+ //
+ // Icons
+*** ../vim-8.1.1305/src/vimrun.c 2018-02-04 14:41:37.000000000 +0100
+--- src/vimrun.c 2019-05-09 15:08:50.102239745 +0200
+***************
+*** 23,33 ****
+ #endif
+ #include <windows.h>
+
+- #ifdef __BORLANDC__
+- # define _kbhit kbhit
+- # define _getch getch
+- #endif
+-
+ int
+ main(void)
+ {
+--- 23,28 ----
+*** ../vim-8.1.1305/src/xxd/Make_bc5.mak 2010-05-15 13:04:06.000000000 +0200
+--- src/xxd/Make_bc5.mak 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,18 ****
+- # The most simplistic Makefile for Win32 (NT and Windows 95).
+- # Used for Borland C++.
+-
+- !if ("$(BOR)"=="")
+- BOR = c:\bc5
+- !endif
+- !if ("$(BCC)"=="")
+- BCC = bcc32
+- !endif
+-
+- xxd: xxd.exe
+-
+- xxd.exe: xxd.c
+- $(BCC) -I$(BOR)\include -L$(BOR)\lib -DWIN32 xxd.c $(BOR)\lib\wildargs.obj
+-
+- clean:
+- - del xxd.obj
+- - del xxd.exe
+--- 0 ----
+*** ../vim-8.1.1305/src/xxd/xxd.c 2019-03-02 07:15:20.217458790 +0100
+--- src/xxd/xxd.c 2019-05-09 15:08:50.102239745 +0200
+***************
+*** 81,87 ****
+ #else
+ # include <fcntl.h>
+ #endif
+! #if defined(WIN32) || defined(__BORLANDC__) || defined(CYGWIN)
+ # include <io.h> /* for setmode() */
+ #else
+ # ifdef UNIX
+--- 81,87 ----
+ #else
+ # include <fcntl.h>
+ #endif
+! #if defined(WIN32) || defined(CYGWIN)
+ # include <io.h> /* for setmode() */
+ #else
+ # ifdef UNIX
+***************
+*** 96,107 ****
+ # include <unix.h> /* for fdopen() on MAC */
+ #endif
+
+- #if defined(__BORLANDC__) && __BORLANDC__ <= 0x0410 && !defined(fileno)
+- /* Missing define and prototype grabbed from the BC 4.0 <stdio.h> */
+- # define fileno(f) ((f)->fd)
+- FILE _FAR *_Cdecl _FARFUNC fdopen(int __handle, char _FAR *__type);
+- #endif
+-
+
+ /* This corrects the problem of missing prototypes for certain functions
+ * in some GNU installations (e.g. SunOS 4.1.x).
+--- 96,101 ----
+***************
+*** 190,196 ****
+ #endif
+
+ #ifndef __P
+! # if defined(__STDC__) || defined(WIN32) || defined(__BORLANDC__)
+ # define __P(a) a
+ # else
+ # define __P(a) ()
+--- 184,190 ----
+ #endif
+
+ #ifndef __P
+! # if defined(__STDC__) || defined(WIN32)
+ # define __P(a) a
+ # else
+ # define __P(a) ()
+*** ../vim-8.1.1305/src/version.c 2019-05-09 14:52:22.083358820 +0200
+--- src/version.c 2019-05-09 15:08:22.442384375 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1306,
+ /**/
+
+--
+ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
+ KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
+ HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
+ LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER),
+ BROTHER MAYNARD
+ "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.1307 b/data/vim/patches/8.1.1307
new file mode 100644
index 000000000..e38d2b327
--- /dev/null
+++ b/data/vim/patches/8.1.1307
@@ -0,0 +1,278 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1307
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1307
+Problem: Cannot reconnect to the X server after it restarted.
+Solution: Add the :xrestore command. (Adrian Kocis, closes #844)
+Files: runtime/doc/index.txt, runtime/doc/various.txt, src/os_unix.c,
+ src/proto/os_unix.pro, src/globals.h, src/ex_cmds.h,
+ src/ex_cmdidxs.h, src/ex_docmd.c, src/testdir/test_paste.vim
+
+
+*** ../vim-8.1.1306/runtime/doc/index.txt 2019-05-05 18:11:46.316590662 +0200
+--- runtime/doc/index.txt 2019-05-09 16:55:09.231912512 +0200
+***************
+*** 1714,1719 ****
+--- 1714,1720 ----
+ |:xmapclear| :xmapc[lear] remove all mappings for Visual mode
+ |:xmap| :xm[ap] like ":map" but for Visual mode
+ |:xmenu| :xme[nu] add menu for Visual mode
++ |:xrestore| :xr[estore] restores the X server connection
+ |:xnoremap| :xn[oremap] like ":noremap" but for Visual mode
+ |:xnoremenu| :xnoreme[nu] like ":noremenu" but for Visual mode
+ |:xunmap| :xu[nmap] like ":unmap" but for Visual mode
+*** ../vim-8.1.1306/runtime/doc/various.txt 2019-05-05 18:11:46.328590595 +0200
+--- runtime/doc/various.txt 2019-05-09 16:57:27.375214537 +0200
+***************
+*** 704,709 ****
+--- 704,724 ----
+ available when compiled with the |+netbeans_intg|
+ feature}
+
++ *:xrestore* *:xr*
++ :xr[estore] [display] Reinitializes the connection to the X11 server. Useful
++ after the X server restarts, e.g. when running Vim for
++ long time inside screen/tmux and connecting from
++ different machines).
++ [display] should be in the format of the $DISPLAY
++ environment variable (e.g. "localhost:10.0")
++ If [display] is omitted, then it reinitializes the
++ connection to the X11 server using the same value as
++ was used for the previous execution of this command.
++ If the value was never specified, then it uses the
++ value of $DISPLAY environment variable as it was when
++ Vim was started.
++ {only available when compiled with the |+clipboard|
++ feature}
+
+ *g_CTRL-A*
+ g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
+*** ../vim-8.1.1306/src/os_unix.c 2019-05-04 17:34:30.653353882 +0200
+--- src/os_unix.c 2019-05-09 18:51:32.467132185 +0200
+***************
+*** 1659,1664 ****
+--- 1659,1683 ----
+ get_x11_title(FALSE);
+ }
+ }
++
++ void
++ ex_xrestore(exarg_T *eap)
++ {
++ if (eap->arg != NULL && STRLEN(eap->arg) > 0)
++ {
++ if (xterm_display_allocated)
++ vim_free(xterm_display);
++ xterm_display = (char *)vim_strsave(eap->arg);
++ xterm_display_allocated = TRUE;
++ }
++ smsg(_("restoring display %s"), xterm_display == NULL
++ ? (char *)mch_getenv("DISPLAY") : xterm_display);
++
++ clear_xterm_clip();
++ x11_window = 0;
++ xterm_dpy_retry_count = 5; // Try reconnecting five times
++ may_restore_clipboard();
++ }
+ #endif
+
+ /*
+***************
+*** 1761,1766 ****
+--- 1780,1789 ----
+ x11_window = (Window)atol(winid);
+
+ #ifdef FEAT_XCLIPBOARD
++ if (xterm_dpy == x11_display)
++ // x11_display may have been set to xterm_dpy elsewhere
++ x11_display_from = XD_XTERM;
++
+ if (xterm_dpy != NULL && x11_window != 0)
+ {
+ /* We may have checked it already, but Gnome terminal can move us to
+***************
+*** 7661,7667 ****
+ return TRUE;
+ }
+
+! # if defined(FEAT_GUI) || defined(PROTO)
+ /*
+ * Destroy the display, window and app_context. Required for GTK.
+ */
+--- 7684,7690 ----
+ return TRUE;
+ }
+
+! # if defined(FEAT_GUI) || defined(FEAT_XCLIPBOARD) || defined(PROTO)
+ /*
+ * Destroy the display, window and app_context. Required for GTK.
+ */
+*** ../vim-8.1.1306/src/proto/os_unix.pro 2019-05-04 17:34:30.653353882 +0200
+--- src/proto/os_unix.pro 2019-05-09 17:11:39.922883130 +0200
+***************
+*** 13,18 ****
+--- 13,19 ----
+ int vim_handle_signal(int sig);
+ int mch_check_win(int argc, char **argv);
+ int mch_input_isatty(void);
++ void ex_xrestore(exarg_T *eap);
+ int mch_can_restore_title(void);
+ int mch_can_restore_icon(void);
+ void mch_settitle(char_u *title, char_u *icon);
+*** ../vim-8.1.1306/src/globals.h 2019-05-02 23:00:19.227658452 +0200
+--- src/globals.h 2019-05-09 17:02:10.449779876 +0200
+***************
+*** 1279,1287 ****
+ #endif
+
+ #ifdef FEAT_XCLIPBOARD
+! EXTERN char *xterm_display INIT(= NULL); /* xterm display name; points
+! into argv[] */
+! EXTERN Display *xterm_dpy INIT(= NULL); /* xterm display pointer */
+ #endif
+ #if defined(FEAT_XCLIPBOARD) || defined(FEAT_GUI_X11)
+ EXTERN XtAppContext app_context INIT(= (XtAppContext)NULL);
+--- 1279,1292 ----
+ #endif
+
+ #ifdef FEAT_XCLIPBOARD
+! // xterm display name
+! EXTERN char *xterm_display INIT(= NULL);
+!
+! // whether xterm_display was allocated, when FALSE it points into argv[]
+! EXTERN int xterm_display_allocated INIT(= FALSE);
+!
+! // xterm display pointer
+! EXTERN Display *xterm_dpy INIT(= NULL);
+ #endif
+ #if defined(FEAT_XCLIPBOARD) || defined(FEAT_GUI_X11)
+ EXTERN XtAppContext app_context INIT(= (XtAppContext)NULL);
+*** ../vim-8.1.1306/src/ex_cmds.h 2019-05-05 21:00:22.850603981 +0200
+--- src/ex_cmds.h 2019-05-09 17:12:48.258535032 +0200
+***************
+*** 1739,1744 ****
+--- 1739,1747 ----
+ EX(CMD_xnoremenu, "xnoremenu", ex_menu,
+ RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+ ADDR_OTHER),
++ EX(CMD_xrestore, "xrestore", ex_xrestore,
++ EXTRA|TRLBAR|CMDWIN,
++ ADDR_NONE),
+ EX(CMD_xunmap, "xunmap", ex_unmap,
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+ ADDR_NONE),
+*** ../vim-8.1.1306/src/ex_cmdidxs.h 2019-05-05 15:02:26.176319819 +0200
+--- src/ex_cmdidxs.h 2019-05-09 17:12:57.942485705 +0200
+***************
+*** 29,36 ****
+ /* v */ 503,
+ /* w */ 521,
+ /* x */ 535,
+! /* y */ 544,
+! /* z */ 545
+ };
+
+ /*
+--- 29,36 ----
+ /* v */ 503,
+ /* w */ 521,
+ /* x */ 535,
+! /* y */ 545,
+! /* z */ 546
+ };
+
+ /*
+***************
+*** 64,72 ****
+ /* 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, 0, 0, 12, 13, 0, 0, 0, 0 },
+! /* x */ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0 },
+ /* y */ { 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 },
+ /* 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 = 558;
+--- 64,72 ----
+ /* 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, 0, 0, 12, 13, 0, 0, 0, 0 },
+! /* x */ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 0, 7, 0, 0, 8, 0, 0, 0, 0, 0 },
+ /* y */ { 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 },
+ /* 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 = 559;
+*** ../vim-8.1.1306/src/ex_docmd.c 2019-05-07 22:06:48.679310672 +0200
+--- src/ex_docmd.c 2019-05-09 17:18:30.268791994 +0200
+***************
+*** 394,399 ****
+--- 394,402 ----
+ #ifndef FEAT_TERMINAL
+ # define ex_terminal ex_ni
+ #endif
++ #if !defined(FEAT_X11) || !defined(FEAT_XCLIPBOARD)
++ # define ex_xrestore ex_ni
++ #endif
+
+ /*
+ * Declare cmdnames[].
+*** ../vim-8.1.1306/src/testdir/test_paste.vim 2019-03-23 13:30:19.247356528 +0100
+--- src/testdir/test_paste.vim 2019-05-09 18:42:01.986284433 +0200
+***************
+*** 110,112 ****
+--- 110,138 ----
+
+ bwipe!
+ endfunc
++
++ func CheckCopyPaste()
++ call setline(1, ['copy this', ''])
++ normal 1G0"*y$
++ normal j"*p
++ call assert_equal('copy this', getline(2))
++ endfunc
++
++ func Test_xrestore()
++ if !has('xterm_clipboard')
++ return
++ endif
++ call ch_logfile('logfile', 'w')
++ let display = $DISPLAY
++ new
++ call CheckCopyPaste()
++
++ xrestore
++ call CheckCopyPaste()
++
++ exe "xrestore " .. display
++ call CheckCopyPaste()
++
++ call ch_logfile('', '')
++ bwipe!
++ endfunc
+*** ../vim-8.1.1306/src/version.c 2019-05-09 15:12:45.180723879 +0200
+--- src/version.c 2019-05-09 18:57:26.853142128 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1307,
+ /**/
+
+--
+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.1308 b/data/vim/patches/8.1.1308
new file mode 100644
index 000000000..3552cf607
--- /dev/null
+++ b/data/vim/patches/8.1.1308
@@ -0,0 +1,98 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1308
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1308
+Problem: The Normal highlight is not defined when compiled with GUI.
+Solution: Always define Normal. (Christian Brabandt, closes #4072)
+Files: runtime/doc/syntax.txt, src/syntax.c,
+ src/testdir/test_highlight.vim
+
+
+*** ../vim-8.1.1307/runtime/doc/syntax.txt 2019-05-05 18:11:46.324590615 +0200
+--- runtime/doc/syntax.txt 2019-05-09 19:22:31.109616534 +0200
+***************
+*** 5002,5007 ****
+--- 5002,5009 ----
+ text (see 'conceallevel')
+ *hl-Cursor*
+ Cursor the character under the cursor
++ lCursor the character under the cursor when |language-mapping|
++ is used (see 'guicursor')
+ *hl-CursorIM*
+ CursorIM like Cursor, but used when in IME mode |CursorIM|
+ *hl-CursorColumn*
+*** ../vim-8.1.1307/src/syntax.c 2019-05-09 15:12:45.180723879 +0200
+--- src/syntax.c 2019-05-09 19:22:31.109616534 +0200
+***************
+*** 6865,6870 ****
+--- 6865,6871 ----
+ "lCursor guibg=fg guifg=bg", /* should be different, but what? */
+ #endif
+ "default link QuickFixLine Search",
++ CENT("Normal cterm=NONE", "Normal gui=NONE"),
+ NULL
+ };
+
+***************
+*** 6946,6954 ****
+ #endif
+ CENT("MatchParen term=reverse ctermbg=Cyan",
+ "MatchParen term=reverse ctermbg=Cyan guibg=Cyan"),
+- #ifdef FEAT_GUI
+- "Normal gui=NONE",
+- #endif
+ #ifdef FEAT_TERMINAL
+ CENT("StatusLineTerm term=reverse,bold cterm=bold ctermfg=White ctermbg=DarkGreen",
+ "StatusLineTerm term=reverse,bold cterm=bold ctermfg=White ctermbg=DarkGreen gui=bold guifg=bg guibg=DarkGreen"),
+--- 6947,6952 ----
+***************
+*** 7042,7050 ****
+ CENT("Conceal ctermbg=DarkGrey ctermfg=LightGrey",
+ "Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey"),
+ #endif
+- #ifdef FEAT_GUI
+- "Normal gui=NONE",
+- #endif
+ #ifdef FEAT_TERMINAL
+ CENT("StatusLineTerm term=reverse,bold cterm=bold ctermfg=Black ctermbg=LightGreen",
+ "StatusLineTerm term=reverse,bold cterm=bold ctermfg=Black ctermbg=LightGreen gui=bold guifg=bg guibg=LightGreen"),
+--- 7040,7045 ----
+*** ../vim-8.1.1307/src/testdir/test_highlight.vim 2019-03-09 11:45:45.650134366 +0100
+--- src/testdir/test_highlight.vim 2019-05-09 19:25:06.884834302 +0200
+***************
+*** 572,574 ****
+--- 572,581 ----
+ call StopVimInTerminal(buf)
+ call delete('Xtest_cursorline_with_visualmode')
+ endfunc
++
++ func Test_1_highlight_Normalgroup_exists()
++ " This test must come before the Test_cursorline test, as it appears this
++ " defines the Normal highlighting group anyway.
++ let hlNormal = HighlightArgs('Normal')
++ call assert_match('hi Normal\s*clear', hlNormal)
++ endfunc
+*** ../vim-8.1.1307/src/version.c 2019-05-09 18:59:27.228463605 +0200
+--- src/version.c 2019-05-09 19:25:15.532790358 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1308,
+ /**/
+
+--
+Communication is one of the most compli..., eh, well, it's hard.
+You know what I mean. Not?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1309 b/data/vim/patches/8.1.1309
new file mode 100644
index 000000000..ca57d8670
--- /dev/null
+++ b/data/vim/patches/8.1.1309
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1309
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1309 (after 8.1.1308)
+Problem: Test for Normal highlight fails on MS-Windows GUI.
+Solution: Skip the test for MS-Windows GUI.
+Files: src/testdir/test_highlight.vim
+
+
+*** ../vim-8.1.1308/src/testdir/test_highlight.vim 2019-05-09 19:26:34.132388790 +0200
+--- src/testdir/test_highlight.vim 2019-05-09 20:05:28.147496727 +0200
+***************
+*** 573,581 ****
+ call delete('Xtest_cursorline_with_visualmode')
+ endfunc
+
+ func Test_1_highlight_Normalgroup_exists()
+! " This test must come before the Test_cursorline test, as it appears this
+! " defines the Normal highlighting group anyway.
+! let hlNormal = HighlightArgs('Normal')
+! call assert_match('hi Normal\s*clear', hlNormal)
+ endfunc
+--- 573,584 ----
+ call delete('Xtest_cursorline_with_visualmode')
+ endfunc
+
++ " This test must come before the Test_cursorline test, as it appears this
++ " defines the Normal highlighting group anyway.
+ func Test_1_highlight_Normalgroup_exists()
+! " MS-Windows GUI sets the font
+! if !has('win32') || !has('gui_running')
+! let hlNormal = HighlightArgs('Normal')
+! call assert_match('hi Normal\s*clear', hlNormal)
+! endif
+ endfunc
+*** ../vim-8.1.1308/src/version.c 2019-05-09 19:26:34.132388790 +0200
+--- src/version.c 2019-05-09 20:06:34.207129302 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1309,
+ /**/
+
+--
+Every time I lose weight, it finds 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.1310 b/data/vim/patches/8.1.1310
new file mode 100644
index 000000000..e0e89708d
--- /dev/null
+++ b/data/vim/patches/8.1.1310
@@ -0,0 +1,619 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1310
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1310
+Problem: Named function arguments are never optional.
+Solution: Support optional function arguments with a default value. (Andy
+ Massimino, closes #3952)
+Files: runtime/doc/eval.txt, src/structs.h,
+ src/testdir/test_user_func.vim, src/userfunc.c
+
+
+
+*** ../vim-8.1.1309/runtime/doc/eval.txt 2019-05-09 14:52:22.079358841 +0200
+--- runtime/doc/eval.txt 2019-05-09 21:01:03.326681151 +0200
+***************
+*** 10920,10934 ****
+ function add an item to it. If you want to make sure the function cannot
+ change a |List| or |Dictionary| use |:lockvar|.
+
+- When not using "...", the number of arguments in a function call must be equal
+- to the number of named arguments. When using "...", the number of arguments
+- may be larger.
+-
+ It is also possible to define a function without any arguments. You must
+ still supply the () then.
+
+ It is allowed to define another function inside a function body.
+
+ *local-variables*
+ Inside a function local variables can be used. These will disappear when the
+ function returns. Global variables need to be accessed with "g:".
+--- 10920,10977 ----
+ function add an item to it. If you want to make sure the function cannot
+ change a |List| or |Dictionary| use |:lockvar|.
+
+ It is also possible to define a function without any arguments. You must
+ still supply the () then.
+
+ It is allowed to define another function inside a function body.
+
++ *optional-function-argument*
++ You can provide default values for positional named arguments. This makes
++ them optional for function calls. When a positional argument is not
++ specified at a call, the default expression is used to initialize it.
++ This only works for functions declared with |function|, not for lambda
++ expressions |expr-lambda|.
++
++ Example: >
++ function Something(key, value = 10)
++ echo a:key .. ": " .. value
++ endfunction
++ call Something('empty') "empty: 10"
++ call Something('key, 20) "key: 20"
++
++ The argument default expressions are evaluated at the time of the function
++ call, not definition. Thus it is possible to use an expression which is
++ invalid the moment the function is defined. The expressions are are also only
++ evaluated when arguments are not specified during a call.
++
++ You can pass |v:none| to use the default expression. Note that this means you
++ cannot pass v:none as an ordinary value when an argument has a default
++ expression.
++
++ Example: >
++ function Something(a = 10, b = 20, c = 30)
++ endfunction
++ call Something(1, v:none, 3) " b = 20
++ <
++ *E989*
++ Optional arguments with default expressions must occur after any mandatory
++ arguments. You can use "..." after all optional named arguments.
++
++ It is possible for later argument defaults to refer to prior arguments,
++ but not the other way around. They must be prefixed with "a:", as with all
++ arguments.
++
++ Example that works: >
++ :function Okay(mandatory, optional = a:mandatory)
++ :endfunction
++ Example that does NOT work: >
++ :function NoGood(first = a:second, second = 10)
++ :endfunction
++ <
++ When not using "...", the number of arguments in a function call must be equal
++ to the number of mandatory named arguments. When using "...", the number of
++ arguments may be larger.
++
+ *local-variables*
+ Inside a function local variables can be used. These will disappear when the
+ function returns. Global variables need to be accessed with "g:".
+*** ../vim-8.1.1309/src/structs.h 2019-05-07 22:06:48.679310672 +0200
+--- src/structs.h 2019-05-09 20:38:28.386453855 +0200
+***************
+*** 1402,1443 ****
+ */
+ typedef struct
+ {
+! int uf_varargs; /* variable nr of arguments */
+ int uf_flags;
+! int uf_calls; /* nr of active calls */
+! 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 */
+! int uf_tm_count; /* nr of calls */
+! proftime_T uf_tm_total; /* time spent in function + children */
+! proftime_T uf_tm_self; /* time spent in function itself */
+! proftime_T uf_tm_children; /* time spent in children this call */
+! /* profiling the function per line */
+! int *uf_tml_count; /* nr of times line was executed */
+! proftime_T *uf_tml_total; /* time spent in a line + children */
+! proftime_T *uf_tml_self; /* time spent in a line itself */
+! proftime_T uf_tml_start; /* start time for current line */
+! proftime_T uf_tml_children; /* time spent in children for this line */
+! 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() */
+! funccall_T *uf_scoped; /* l: local variables for closure */
+! char_u uf_name[1]; /* name of function (actually longer); can
+! start with <SNR>123_ (<SNR> is K_SPECIAL
+! KS_EXTRA KE_SNR) */
+ } ufunc_T;
+
+! #define MAX_FUNC_ARGS 20 /* maximum number of function arguments */
+! #define VAR_SHORT_LEN 20 /* short variable name length */
+! #define FIXVAR_CNT 12 /* number of fixed variables */
+
+ /* structure to hold info for a function that is currently being executed. */
+ struct funccall_S
+--- 1402,1444 ----
+ */
+ typedef struct
+ {
+! int uf_varargs; // variable nr of arguments
+ int uf_flags;
+! int uf_calls; // nr of active calls
+! int uf_cleared; // func_clear() was already called
+! garray_T uf_args; // arguments
+! garray_T uf_def_args; // default argument expressions
+! 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
+! int uf_tm_count; // nr of calls
+! proftime_T uf_tm_total; // time spent in function + children
+! proftime_T uf_tm_self; // time spent in function itself
+! proftime_T uf_tm_children; // time spent in children this call
+! // profiling the function per line
+! int *uf_tml_count; // nr of times line was executed
+! proftime_T *uf_tml_total; // time spent in a line + children
+! proftime_T *uf_tml_self; // time spent in a line itself
+! proftime_T uf_tml_start; // start time for current line
+! proftime_T uf_tml_children; // time spent in children for this line
+! 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()
+! funccall_T *uf_scoped; // l: local variables for closure
+! char_u uf_name[1]; // name of function (actually longer); can
+! // start with <SNR>123_ (<SNR> is K_SPECIAL
+! // KS_EXTRA KE_SNR)
+ } ufunc_T;
+
+! #define MAX_FUNC_ARGS 20 // maximum number of function arguments
+! #define VAR_SHORT_LEN 20 // short variable name length
+! #define FIXVAR_CNT 12 // number of fixed variables
+
+ /* structure to hold info for a function that is currently being executed. */
+ struct funccall_S
+*** ../vim-8.1.1309/src/testdir/test_user_func.vim 2017-10-22 14:08:57.000000000 +0200
+--- src/testdir/test_user_func.vim 2019-05-09 21:01:29.390540850 +0200
+***************
+*** 94,96 ****
+--- 94,146 ----
+ unlet g:retval g:counter
+ enew!
+ endfunc
++
++ func Log(val, base = 10)
++ return log(a:val) / log(a:base)
++ endfunc
++
++ func Args(mandatory, optional = v:null, ...)
++ return deepcopy(a:)
++ endfunc
++
++ func Args2(a = 1, b = 2, c = 3)
++ return deepcopy(a:)
++ endfunc
++
++ func MakeBadFunc()
++ func s:fcn(a, b=1, c)
++ endfunc
++ endfunc
++
++ func Test_default_arg()
++ call assert_equal(1.0, Log(10))
++ call assert_equal(log(10), Log(10, exp(1)))
++ call assert_fails("call Log(1,2,3)", 'E118')
++
++ let res = Args(1)
++ call assert_equal(res.mandatory, 1)
++ call assert_equal(res.optional, v:null)
++ call assert_equal(res['0'], 0)
++
++ let res = Args(1,2)
++ call assert_equal(res.mandatory, 1)
++ call assert_equal(res.optional, 2)
++ call assert_equal(res['0'], 0)
++
++ let res = Args(1,2,3)
++ call assert_equal(res.mandatory, 1)
++ call assert_equal(res.optional, 2)
++ call assert_equal(res['0'], 1)
++
++ call assert_fails("call MakeBadFunc()", 'E989')
++ call assert_fails("fu F(a=1 ,) | endf", 'E475')
++
++ let d = Args2(7, v:none, 9)
++ call assert_equal([7, 2, 9], [d.a, d.b, d.c])
++
++ call assert_equal("\n"
++ \ .. " function Args2(a = 1, b = 2, c = 3)\n"
++ \ .. "1 return deepcopy(a:)\n"
++ \ .. " endfunction",
++ \ execute('func Args2'))
++ endfunc
+*** ../vim-8.1.1309/src/userfunc.c 2019-05-09 15:12:45.180723879 +0200
+--- src/userfunc.c 2019-05-09 21:03:36.645848343 +0200
+***************
+*** 75,80 ****
+--- 75,81 ----
+ char_u endchar,
+ garray_T *newargs,
+ int *varargs,
++ garray_T *default_args,
+ int skip)
+ {
+ int mustend = FALSE;
+***************
+*** 82,90 ****
+--- 83,95 ----
+ char_u *p = arg;
+ int c;
+ int i;
++ int any_default = FALSE;
++ char_u *expr;
+
+ if (newargs != NULL)
+ ga_init2(newargs, (int)sizeof(char_u *), 3);
++ if (default_args != NULL)
++ ga_init2(default_args, (int)sizeof(char_u *), 3);
+
+ if (varargs != NULL)
+ *varargs = FALSE;
+***************
+*** 140,145 ****
+--- 145,187 ----
+
+ *p = c;
+ }
++ if (*skipwhite(p) == '=' && default_args != NULL)
++ {
++ typval_T rettv;
++
++ any_default = TRUE;
++ p = skipwhite(p) + 1;
++ p = skipwhite(p);
++ expr = p;
++ if (eval1(&p, &rettv, FALSE) != FAIL)
++ {
++ if (ga_grow(default_args, 1) == FAIL)
++ goto err_ret;
++
++ // trim trailing whitespace
++ while (p > expr && VIM_ISWHITE(p[-1]))
++ p--;
++ c = *p;
++ *p = NUL;
++ expr = vim_strsave(expr);
++ if (expr == NULL)
++ {
++ *p = c;
++ goto err_ret;
++ }
++ ((char_u **)(default_args->ga_data))
++ [default_args->ga_len] = expr;
++ default_args->ga_len++;
++ *p = c;
++ }
++ else
++ mustend = TRUE;
++ }
++ else if (any_default)
++ {
++ emsg(_("E989: Non-default argument follows default argument"));
++ mustend = TRUE;
++ }
+ if (*p == ',')
+ ++p;
+ else
+***************
+*** 163,168 ****
+--- 205,212 ----
+ err_ret:
+ if (newargs != NULL)
+ ga_clear_strings(newargs);
++ if (default_args != NULL)
++ ga_clear_strings(default_args);
+ return FAIL;
+ }
+
+***************
+*** 210,216 ****
+ ga_init(&newlines);
+
+ /* First, check if this is a lambda expression. "->" must exist. */
+! ret = get_function_args(&start, '-', NULL, NULL, TRUE);
+ if (ret == FAIL || *start != '>')
+ return NOTDONE;
+
+--- 254,260 ----
+ ga_init(&newlines);
+
+ /* First, check if this is a lambda expression. "->" must exist. */
+! ret = get_function_args(&start, '-', NULL, NULL, NULL, TRUE);
+ if (ret == FAIL || *start != '>')
+ return NOTDONE;
+
+***************
+*** 220,226 ****
+ else
+ pnewargs = NULL;
+ *arg = skipwhite(*arg + 1);
+! ret = get_function_args(arg, '-', pnewargs, &varargs, FALSE);
+ if (ret == FAIL || **arg != '>')
+ goto errret;
+
+--- 264,270 ----
+ else
+ pnewargs = NULL;
+ *arg = skipwhite(*arg + 1);
+! ret = get_function_args(arg, '-', pnewargs, &varargs, NULL, FALSE);
+ if (ret == FAIL || **arg != '>')
+ goto errret;
+
+***************
+*** 272,277 ****
+--- 316,322 ----
+ STRCPY(fp->uf_name, name);
+ hash_add(&func_hashtab, UF2HIKEY(fp));
+ fp->uf_args = newargs;
++ ga_init(&fp->uf_def_args);
+ fp->uf_lines = newlines;
+ if (current_funccal != NULL && eval_lavars)
+ {
+***************
+*** 729,734 ****
+--- 774,780 ----
+ int using_sandbox = FALSE;
+ funccall_T *fc;
+ int save_did_emsg;
++ int default_arg_err = FALSE;
+ static int depth = 0;
+ dictitem_T *v;
+ int fixvar_idx = 0; /* index in fixvar[] */
+***************
+*** 805,816 ****
+
+ /*
+ * Init a: variables.
+! * Set a:0 to "argcount".
+ * Set a:000 to a list with room for the "..." arguments.
+ */
+ init_var_dict(&fc->l_avars, &fc->l_avars_var, VAR_SCOPE);
+ add_nr_var(&fc->l_avars, &fc->fixvar[fixvar_idx++].var, "0",
+! (varnumber_T)(argcount - fp->uf_args.ga_len));
+ fc->l_avars.dv_lock = VAR_FIXED;
+ /* Use "name" to avoid a warning from some compiler that checks the
+ * destination size. */
+--- 851,863 ----
+
+ /*
+ * Init a: variables.
+! * Set a:0 to "argcount" less number of named arguments, if >= 0.
+ * Set a:000 to a list with room for the "..." arguments.
+ */
+ init_var_dict(&fc->l_avars, &fc->l_avars_var, VAR_SCOPE);
+ add_nr_var(&fc->l_avars, &fc->fixvar[fixvar_idx++].var, "0",
+! (varnumber_T)(argcount >= fp->uf_args.ga_len
+! ? argcount - fp->uf_args.ga_len : 0));
+ fc->l_avars.dv_lock = VAR_FIXED;
+ /* Use "name" to avoid a warning from some compiler that checks the
+ * destination size. */
+***************
+*** 835,843 ****
+ (varnumber_T)firstline);
+ add_nr_var(&fc->l_avars, &fc->fixvar[fixvar_idx++].var, "lastline",
+ (varnumber_T)lastline);
+! for (i = 0; i < argcount; ++i)
+ {
+ int addlocal = FALSE;
+
+ ai = i - fp->uf_args.ga_len;
+ if (ai < 0)
+--- 882,892 ----
+ (varnumber_T)firstline);
+ add_nr_var(&fc->l_avars, &fc->fixvar[fixvar_idx++].var, "lastline",
+ (varnumber_T)lastline);
+! for (i = 0; i < argcount || i < fp->uf_args.ga_len; ++i)
+ {
+ int addlocal = FALSE;
++ typval_T def_rettv;
++ int isdefault = FALSE;
+
+ ai = i - fp->uf_args.ga_len;
+ if (ai < 0)
+***************
+*** 846,851 ****
+--- 895,919 ----
+ name = FUNCARG(fp, i);
+ if (islambda)
+ addlocal = TRUE;
++
++ // evaluate named argument default expression
++ isdefault = ai + fp->uf_def_args.ga_len >= 0
++ && (i >= argcount || (argvars[i].v_type == VAR_SPECIAL
++ && argvars[i].vval.v_number == VVAL_NONE));
++ if (isdefault)
++ {
++ char_u *default_expr = NULL;
++ def_rettv.v_type = VAR_NUMBER;
++ def_rettv.vval.v_number = -1;
++
++ default_expr = ((char_u **)(fp->uf_def_args.ga_data))
++ [ai + fp->uf_def_args.ga_len];
++ if (eval1(&default_expr, &def_rettv, TRUE) == FAIL)
++ {
++ default_arg_err = 1;
++ break;
++ }
++ }
+ }
+ else
+ {
+***************
+*** 867,875 ****
+ v->di_flags |= DI_FLAGS_RO | DI_FLAGS_FIX;
+ }
+
+! /* Note: the values are copied directly to avoid alloc/free.
+! * "argvars" must have VAR_FIXED for v_lock. */
+! v->di_tv = argvars[i];
+ v->di_tv.v_lock = VAR_FIXED;
+
+ if (addlocal)
+--- 935,946 ----
+ v->di_flags |= DI_FLAGS_RO | DI_FLAGS_FIX;
+ }
+
+! if (isdefault)
+! v->di_tv = def_rettv;
+! else
+! // Note: the values are copied directly to avoid alloc/free.
+! // "argvars" must have VAR_FIXED for v_lock.
+! v->di_tv = argvars[i];
+ v->di_tv.v_lock = VAR_FIXED;
+
+ if (addlocal)
+***************
+*** 988,995 ****
+ save_did_emsg = did_emsg;
+ did_emsg = FALSE;
+
+! /* call do_cmdline() to execute the lines */
+! do_cmdline(NULL, get_func_line, (void *)fc,
+ DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
+
+ --RedrawingDisabled;
+--- 1059,1069 ----
+ save_did_emsg = did_emsg;
+ did_emsg = FALSE;
+
+! if (default_arg_err && (fp->uf_flags & FC_ABORT))
+! did_emsg = TRUE;
+! else
+! // call do_cmdline() to execute the lines
+! do_cmdline(NULL, get_func_line, (void *)fc,
+ DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
+
+ --RedrawingDisabled;
+***************
+*** 1145,1150 ****
+--- 1219,1225 ----
+ func_clear_items(ufunc_T *fp)
+ {
+ ga_clear_strings(&(fp->uf_args));
++ ga_clear_strings(&(fp->uf_def_args));
+ ga_clear_strings(&(fp->uf_lines));
+ #ifdef FEAT_PROFILE
+ vim_free(fp->uf_tml_count);
+***************
+*** 1498,1504 ****
+
+ if (fp->uf_flags & FC_RANGE)
+ *doesrange = TRUE;
+! if (argcount < fp->uf_args.ga_len)
+ error = ERROR_TOOFEW;
+ else if (!fp->uf_varargs && argcount > fp->uf_args.ga_len)
+ error = ERROR_TOOMANY;
+--- 1573,1579 ----
+
+ if (fp->uf_flags & FC_RANGE)
+ *doesrange = TRUE;
+! if (argcount < fp->uf_args.ga_len - fp->uf_def_args.ga_len)
+ error = ERROR_TOOFEW;
+ else if (!fp->uf_varargs && argcount > fp->uf_args.ga_len)
+ error = ERROR_TOOMANY;
+***************
+*** 1624,1629 ****
+--- 1699,1710 ----
+ if (j)
+ msg_puts(", ");
+ msg_puts((char *)FUNCARG(fp, j));
++ if (j >= fp->uf_args.ga_len - fp->uf_def_args.ga_len)
++ {
++ msg_puts(" = ");
++ msg_puts(((char **)(fp->uf_def_args.ga_data))
++ [j - fp->uf_args.ga_len + fp->uf_def_args.ga_len]);
++ }
+ }
+ if (fp->uf_varargs)
+ {
+***************
+*** 1889,1894 ****
+--- 1970,1976 ----
+ char_u *arg;
+ char_u *line_arg = NULL;
+ garray_T newargs;
++ garray_T default_args;
+ garray_T newlines;
+ int varargs = FALSE;
+ int flags = 0;
+***************
+*** 2103,2109 ****
+ emsg(_("E862: Cannot use g: here"));
+ }
+
+! if (get_function_args(&p, ')', &newargs, &varargs, eap->skip) == FAIL)
+ goto errret_2;
+
+ /* find extra arguments "range", "dict", "abort" and "closure" */
+--- 2185,2192 ----
+ emsg(_("E862: Cannot use g: here"));
+ }
+
+! if (get_function_args(&p, ')', &newargs, &varargs,
+! &default_args, eap->skip) == FAIL)
+ goto errret_2;
+
+ /* find extra arguments "range", "dict", "abort" and "closure" */
+***************
+*** 2511,2516 ****
+--- 2594,2600 ----
+ fp->uf_refcount = 1;
+ }
+ fp->uf_args = newargs;
++ fp->uf_def_args = default_args;
+ fp->uf_lines = newlines;
+ if ((flags & FC_CLOSURE) != 0)
+ {
+***************
+*** 2535,2540 ****
+--- 2619,2625 ----
+
+ erret:
+ ga_clear_strings(&newargs);
++ ga_clear_strings(&default_args);
+ errret_2:
+ ga_clear_strings(&newlines);
+ ret_free:
+*** ../vim-8.1.1309/src/version.c 2019-05-09 20:07:30.310817540 +0200
+--- src/version.c 2019-05-09 20:30:13.721679453 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1310,
+ /**/
+
+--
+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.1311 b/data/vim/patches/8.1.1311
new file mode 100644
index 000000000..e2ce0e02c
--- /dev/null
+++ b/data/vim/patches/8.1.1311
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1311
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1311
+Problem: Aborting an autocmd with an exception is not tested.
+Solution: Add a test. Also shows how to abort a command by throwing an
+ exception.
+Files: src/testdir/test_autocmd.vim
+
+
+*** ../vim-8.1.1310/src/testdir/test_autocmd.vim 2019-04-25 22:21:56.931749183 +0200
+--- src/testdir/test_autocmd.vim 2019-05-09 21:33:57.024924448 +0200
+***************
+*** 1733,1735 ****
+--- 1733,1754 ----
+ call delete('Xtest.c')
+ call delete('test.out')
+ endfunc
++
++ func Test_throw_in_BufWritePre()
++ new
++ call setline(1, ['one', 'two', 'three'])
++ call assert_false(filereadable('Xthefile'))
++ augroup throwing
++ au BufWritePre X* throw 'do not write'
++ augroup END
++ try
++ w Xthefile
++ catch
++ let caught = 1
++ endtry
++ call assert_equal(1, caught)
++ call assert_false(filereadable('Xthefile'))
++
++ bwipe!
++ au! throwing
++ endfunc
+*** ../vim-8.1.1310/src/version.c 2019-05-09 21:08:53.764083394 +0200
+--- src/version.c 2019-05-09 21:37:32.256160734 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1311,
+ /**/
+
+--
+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.1312 b/data/vim/patches/8.1.1312
new file mode 100644
index 000000000..9f072e78c
--- /dev/null
+++ b/data/vim/patches/8.1.1312
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1312
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1312
+Problem: Coverity warning for using uninitialized variable.
+Solution: Clear exarg_T.
+Files: src/quickfix.c, src/channel.c, src/ex_cmds2.c
+
+
+*** ../vim-8.1.1311/src/quickfix.c 2019-05-05 21:00:22.854603956 +0200
+--- src/quickfix.c 2019-05-09 21:45:56.322005593 +0200
+***************
+*** 5809,5814 ****
+--- 5809,5815 ----
+ {
+ exarg_T ea;
+
++ vim_memset(&ea, 0, sizeof(ea));
+ ea.arg = target_dir;
+ ea.cmdidx = CMD_lcd;
+ ex_cd(&ea);
+***************
+*** 6109,6114 ****
+--- 6110,6116 ----
+ // appropriate ex command and executing it.
+ exarg_T ea;
+
++ vim_memset(&ea, 0, sizeof(ea));
+ ea.arg = dirname_start;
+ ea.cmdidx = (curwin->w_localdir == NULL) ? CMD_cd : CMD_lcd;
+ ex_cd(&ea);
+*** ../vim-8.1.1311/src/channel.c 2019-04-28 19:46:17.022060143 +0200
+--- src/channel.c 2019-05-09 21:45:45.678054404 +0200
+***************
+*** 2308,2313 ****
+--- 2308,2314 ----
+ exarg_T ea;
+
+ ch_log(channel, "Executing normal command '%s'", (char *)arg);
++ vim_memset(&ea, 0, sizeof(ea));
+ ea.arg = arg;
+ ea.addr_count = 0;
+ ea.forceit = TRUE; /* no mapping */
+***************
+*** 2318,2323 ****
+--- 2319,2325 ----
+ exarg_T ea;
+
+ ch_log(channel, "redraw");
++ vim_memset(&ea, 0, sizeof(ea));
+ ea.forceit = *arg != NUL;
+ ex_redraw(&ea);
+ showruler(FALSE);
+*** ../vim-8.1.1311/src/ex_cmds2.c 2019-05-08 21:58:54.446597033 +0200
+--- src/ex_cmds2.c 2019-05-09 21:46:52.193747823 +0200
+***************
+*** 1190,1198 ****
+ else
+ ret = vim_dialog_yesnocancel(VIM_QUESTION, NULL, buff, 1);
+
+! /* Init ea pseudo-structure, this is needed for the check_overwrite()
+! * function. */
+! ea.append = ea.forceit = FALSE;
+
+ if (ret == VIM_YES)
+ {
+--- 1190,1198 ----
+ else
+ ret = vim_dialog_yesnocancel(VIM_QUESTION, NULL, buff, 1);
+
+! // Init ea pseudo-structure, this is needed for the check_overwrite()
+! // function.
+! vim_memset(&ea, 0, sizeof(ea));
+
+ if (ret == VIM_YES)
+ {
+*** ../vim-8.1.1311/src/version.c 2019-05-09 21:38:39.775896532 +0200
+--- src/version.c 2019-05-09 21:48:10.369383122 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1312,
+ /**/
+
+--
+(letter from Mark to Mike, about the film's probable certificate)
+ For an 'A' we would have to: Lose as many shits as possible; Take Jesus
+ Christ out, if possible; Loose "I fart in your general direction"; Lose
+ "the oral sex"; Lose "oh, fuck off"; Lose "We make castanets out of your
+ testicles"
+ "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.1313 b/data/vim/patches/8.1.1313
new file mode 100644
index 000000000..70216992d
--- /dev/null
+++ b/data/vim/patches/8.1.1313
@@ -0,0 +1,434 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1313
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1313
+Problem: Warnings for using localtime() and ctime().
+Solution: Use localtime_r() if available. Avoid using ctime().
+Files: src/configure.ac, src/auto/configure, src/config.h.in,
+ src/evalfunc.c, src/nbdebug.c, src/undo.c, src/memline.c,
+ src/proto/memline.pro, src/hardcopy.c
+
+
+*** ../vim-8.1.1312/src/configure.ac 2019-04-28 14:59:55.841503809 +0200
+--- src/configure.ac 2019-05-10 19:57:23.200187535 +0200
+***************
+*** 3736,3747 ****
+
+ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
+ AC_DEFINE(BAD_GETCWD)
+ fi
+
+ dnl Check for functions in one big call, to reduce the size of configure.
+ dnl Can only be used for functions that do not require any include.
+ AC_CHECK_FUNCS(fchdir fchown fchmod fsync getcwd getpseudotty \
+! getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
+ memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
+ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
+ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
+--- 3736,3748 ----
+
+ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
+ AC_DEFINE(BAD_GETCWD)
++ AC_CHECK_FUNCS(getwd)
+ fi
+
+ dnl Check for functions in one big call, to reduce the size of configure.
+ dnl Can only be used for functions that do not require any include.
+ AC_CHECK_FUNCS(fchdir fchown fchmod fsync getcwd getpseudotty \
+! getpwent getpwnam getpwuid getrlimit gettimeofday localtime_r lstat \
+ memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
+ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
+ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
+*** ../vim-8.1.1312/src/auto/configure 2019-04-28 14:59:55.845503790 +0200
+--- src/auto/configure 2019-05-10 21:21:24.826833832 +0200
+***************
+*** 12650,12659 ****
+ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
+ $as_echo "#define BAD_GETCWD 1" >>confdefs.h
+
+ fi
+
+ for ac_func in fchdir fchown fchmod fsync getcwd getpseudotty \
+! getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
+ memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
+ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
+ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
+--- 12650,12670 ----
+ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
+ $as_echo "#define BAD_GETCWD 1" >>confdefs.h
+
++ for ac_func in getwd
++ do :
++ ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
++ if test "x$ac_cv_func_getwd" = xyes; then :
++ cat >>confdefs.h <<_ACEOF
++ #define HAVE_GETWD 1
++ _ACEOF
++
++ fi
++ done
++
+ fi
+
+ for ac_func in fchdir fchown fchmod fsync getcwd getpseudotty \
+! getpwent getpwnam getpwuid getrlimit gettimeofday localtime_r lstat \
+ memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
+ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
+ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
+*** ../vim-8.1.1312/src/config.h.in 2019-04-28 14:59:55.841503809 +0200
+--- src/config.h.in 2019-05-10 19:41:37.960749699 +0200
+***************
+*** 174,179 ****
+--- 174,180 ----
+ #undef HAVE_GETTIMEOFDAY
+ #undef HAVE_GETWD
+ #undef HAVE_ICONV
++ #undef HAVE_LOCALTIME_R
+ #undef HAVE_LSTAT
+ #undef HAVE_MEMSET
+ #undef HAVE_MKDTEMP
+*** ../vim-8.1.1312/src/evalfunc.c 2019-05-09 15:12:45.168723969 +0200
+--- src/evalfunc.c 2019-05-10 19:59:58.095377837 +0200
+***************
+*** 13213,13218 ****
+--- 13213,13221 ----
+ f_strftime(typval_T *argvars, typval_T *rettv)
+ {
+ char_u result_buf[256];
++ # ifdef HAVE_LOCALTIME_R
++ struct tm tmval;
++ # endif
+ struct tm *curtime;
+ time_t seconds;
+ char_u *p;
+***************
+*** 13224,13230 ****
+--- 13227,13237 ----
+ seconds = time(NULL);
+ else
+ seconds = (time_t)tv_get_number(&argvars[1]);
++ # ifdef HAVE_LOCALTIME_R
++ curtime = localtime_r(&seconds, &tmval);
++ # else
+ curtime = localtime(&seconds);
++ # endif
+ /* MSVC returns NULL for an invalid value of seconds. */
+ if (curtime == NULL)
+ rettv->vval.v_string = vim_strsave((char_u *)_("(Invalid)"));
+*** ../vim-8.1.1312/src/nbdebug.c 2019-02-17 17:44:36.215875493 +0100
+--- src/nbdebug.c 2019-05-10 21:25:10.709668268 +0200
+***************
+*** 80,91 ****
+ char *file; /* possible nb_debug output file */
+ char *cp; /* nb_dlevel pointer */
+
+! if (log_var && (file = getenv(log_var)) != NULL) {
+ time_t now;
+
+ nb_debug = fopen(file, "a");
+ time(&now);
+! fprintf(nb_debug, "%s", asctime(localtime(&now)));
+ if (level_var && (cp = getenv(level_var)) != NULL) {
+ nb_dlevel = strtoul(cp, NULL, 0);
+ } else {
+--- 80,92 ----
+ char *file; /* possible nb_debug output file */
+ char *cp; /* nb_dlevel pointer */
+
+! if (log_var && (file = getenv(log_var)) != NULL)
+! {
+ time_t now;
+
+ nb_debug = fopen(file, "a");
+ time(&now);
+! fprintf(nb_debug, "%s", get_ctime(now, TRUE));
+ if (level_var && (cp = getenv(level_var)) != NULL) {
+ nb_dlevel = strtoul(cp, NULL, 0);
+ } else {
+*** ../vim-8.1.1312/src/undo.c 2019-04-26 20:32:57.086296530 +0200
+--- src/undo.c 2019-05-10 20:02:25.778599180 +0200
+***************
+*** 3110,3120 ****
+--- 3110,3128 ----
+ u_add_time(char_u *buf, size_t buflen, time_t tt)
+ {
+ #ifdef HAVE_STRFTIME
++ # ifdef HAVE_LOCALTIME_R
++ struct tm tmval;
++ # endif
+ struct tm *curtime;
+
+ if (vim_time() - tt >= 100)
+ {
+ curtime = localtime(&tt);
++ # ifdef HAVE_LOCALTIME_R
++ curtime = localtime_r(&tt, &tmval);
++ # else
++ curtime = localtime(&tt);
++ # endif
+ if (vim_time() - tt < (60L * 60L * 12L))
+ /* within 12 hours */
+ (void)strftime((char *)buf, buflen, "%H:%M:%S", curtime);
+*** ../vim-8.1.1312/src/memline.c 2019-04-28 22:50:36.153248474 +0200
+--- src/memline.c 2019-05-10 21:27:32.216937933 +0200
+***************
+*** 2078,2083 ****
+--- 2078,2118 ----
+ #endif
+
+ /*
++ * Replacement for ctime(), which is not safe to use.
++ * Requires strftime(), otherwise returns "(unknown)".
++ * If "thetime" is invalid returns "(invalid)". Never returns NULL.
++ * When "add_newline" is TRUE add a newline like ctime() does.
++ * Uses a static buffer.
++ */
++ char *
++ get_ctime(time_t thetime, int add_newline)
++ {
++ static char buf[50];
++ #ifdef HAVE_STRFTIME
++ # ifdef HAVE_LOCALTIME_R
++ struct tm tmval;
++ # endif
++ struct tm *curtime;
++
++ # ifdef HAVE_LOCALTIME_R
++ curtime = localtime_r(&thetime, &tmval);
++ # else
++ curtime = localtime(&thetime);
++ # endif
++ /* MSVC returns NULL for an invalid value of seconds. */
++ if (curtime == NULL)
++ STRCPY(buf, _("(Invalid)"));
++ else
++ (void)strftime(buf, sizeof(buf) - 1, "%a %b %d %H:%M:%S %Y", curtime);
++ #else
++ STRCPY(buf, "(unknown)");
++ #endif
++ if (add_newline)
++ STRCAT(buf, "\n");
++ return buf;
++ }
++
++ /*
+ * Give information about an existing swap file.
+ * Returns timestamp (0 when unknown).
+ */
+***************
+*** 2087,2103 ****
+ stat_T st;
+ int fd;
+ struct block0 b0;
+- time_t x = (time_t)0;
+- char *p;
+ #ifdef UNIX
+ char_u uname[B0_UNAME_SIZE];
+ #endif
+
+! /* print the swap file date */
+ if (mch_stat((char *)fname, &st) != -1)
+ {
+ #ifdef UNIX
+! /* print name of owner of the file */
+ if (mch_get_uname(st.st_uid, uname, B0_UNAME_SIZE) == OK)
+ {
+ msg_puts(_(" owned by: "));
+--- 2122,2136 ----
+ stat_T st;
+ int fd;
+ struct block0 b0;
+ #ifdef UNIX
+ char_u uname[B0_UNAME_SIZE];
+ #endif
+
+! // print the swap file date
+ if (mch_stat((char *)fname, &st) != -1)
+ {
+ #ifdef UNIX
+! // print name of owner of the file
+ if (mch_get_uname(st.st_uid, uname, B0_UNAME_SIZE) == OK)
+ {
+ msg_puts(_(" owned by: "));
+***************
+*** 2107,2119 ****
+ else
+ #endif
+ msg_puts(_(" dated: "));
+! x = st.st_mtime; /* Manx C can't do &st.st_mtime */
+! p = ctime(&x); /* includes '\n' */
+! if (p == NULL)
+! msg_puts("(invalid)\n");
+! else
+! msg_puts(p);
+ }
+
+ /*
+ * print the original file name
+--- 2140,2149 ----
+ else
+ #endif
+ msg_puts(_(" dated: "));
+! msg_puts(get_ctime(st.st_mtime, TRUE));
+ }
++ else
++ st.st_mtime = 0;
+
+ /*
+ * print the original file name
+***************
+*** 2191,2197 ****
+ msg_puts(_(" [cannot be opened]"));
+ msg_putchar('\n');
+
+! return x;
+ }
+
+ /*
+--- 2221,2227 ----
+ msg_puts(_(" [cannot be opened]"));
+ msg_putchar('\n');
+
+! return st.st_mtime;
+ }
+
+ /*
+***************
+*** 4412,4426 ****
+ char_u *fname) /* swap file name */
+ {
+ stat_T st;
+! time_t x, sx;
+! char *p;
+
+ ++no_wait_return;
+ (void)emsg(_("E325: ATTENTION"));
+ msg_puts(_("\nFound a swap file by the name \""));
+ msg_home_replace(fname);
+ msg_puts("\"\n");
+! sx = swapfile_info(fname);
+ msg_puts(_("While opening file \""));
+ msg_outtrans(buf->b_fname);
+ msg_puts("\"\n");
+--- 4442,4455 ----
+ char_u *fname) /* swap file name */
+ {
+ stat_T st;
+! time_t swap_mtime;
+
+ ++no_wait_return;
+ (void)emsg(_("E325: ATTENTION"));
+ msg_puts(_("\nFound a swap file by the name \""));
+ msg_home_replace(fname);
+ msg_puts("\"\n");
+! swap_mtime = swapfile_info(fname);
+ msg_puts(_("While opening file \""));
+ msg_outtrans(buf->b_fname);
+ msg_puts("\"\n");
+***************
+*** 4431,4443 ****
+ else
+ {
+ msg_puts(_(" dated: "));
+! x = st.st_mtime; /* Manx C can't do &st.st_mtime */
+! p = ctime(&x); /* includes '\n' */
+! if (p == NULL)
+! msg_puts("(invalid)\n");
+! else
+! msg_puts(p);
+! if (sx != 0 && x > sx)
+ msg_puts(_(" NEWER than swap file!\n"));
+ }
+ /* Some of these messages are long to allow translation to
+--- 4460,4467 ----
+ else
+ {
+ msg_puts(_(" dated: "));
+! msg_puts(get_ctime(st.st_mtime, TRUE));
+! if (swap_mtime != 0 && st.st_mtime > swap_mtime)
+ msg_puts(_(" NEWER than swap file!\n"));
+ }
+ /* Some of these messages are long to allow translation to
+*** ../vim-8.1.1312/src/proto/memline.pro 2019-01-04 15:09:52.918373097 +0100
+--- src/proto/memline.pro 2019-05-10 20:26:38.351513643 +0200
+***************
+*** 13,18 ****
+--- 13,19 ----
+ 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);
++ char *get_ctime(time_t thetime, int add_newline);
+ 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);
+*** ../vim-8.1.1312/src/hardcopy.c 2019-01-24 15:54:17.786847003 +0100
+--- src/hardcopy.c 2019-05-10 21:13:20.477328432 +0200
+***************
+*** 2723,2731 ****
+ int
+ mch_print_begin(prt_settings_T *psettings)
+ {
+- time_t now;
+ int bbox[4];
+- char *p_time;
+ double left;
+ double right;
+ double top;
+--- 2723,2729 ----
+***************
+*** 2734,2740 ****
+ struct prt_ps_resource_S *res_encoding;
+ char buffer[256];
+ char_u *p_encoding;
+- char_u *p;
+ struct prt_ps_resource_S *res_cidfont;
+ struct prt_ps_resource_S *res_cmap;
+ int retval = FALSE;
+--- 2732,2737 ----
+***************
+*** 2761,2773 ****
+ prt_dsc_textline("For", buffer);
+ prt_dsc_textline("Creator", VIM_VERSION_LONG);
+ /* Note: to ensure Clean8bit I don't think we can use LC_TIME */
+! now = time(NULL);
+! p_time = ctime(&now);
+! /* Note: ctime() adds a \n so we have to remove it :-( */
+! p = vim_strchr((char_u *)p_time, '\n');
+! if (p != NULL)
+! *p = NUL;
+! prt_dsc_textline("CreationDate", p_time);
+ prt_dsc_textline("DocumentData", "Clean8Bit");
+ prt_dsc_textline("Orientation", "Portrait");
+ prt_dsc_atend("Pages");
+--- 2758,2765 ----
+ prt_dsc_textline("For", buffer);
+ prt_dsc_textline("Creator", VIM_VERSION_LONG);
+ /* Note: to ensure Clean8bit I don't think we can use LC_TIME */
+!
+! prt_dsc_textline("CreationDate", get_ctime(time(NULL), FALSE));
+ prt_dsc_textline("DocumentData", "Clean8Bit");
+ prt_dsc_textline("Orientation", "Portrait");
+ prt_dsc_atend("Pages");
+*** ../vim-8.1.1312/src/version.c 2019-05-09 21:48:29.033295465 +0200
+--- src/version.c 2019-05-10 21:22:15.602571857 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1313,
+ /**/
+
+--
+Did Adam and Eve have navels?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1314 b/data/vim/patches/8.1.1314
new file mode 100644
index 000000000..00c90ea94
--- /dev/null
+++ b/data/vim/patches/8.1.1314
@@ -0,0 +1,1021 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1314
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1314
+Problem: MSVC makefile is not nicely indented.
+Solution: Addjust spaces in preprocessor directives. (Ken Takata)
+Files: src/Make_mvc.mak
+
+
+*** ../vim-8.1.1313/src/Make_mvc.mak 2019-05-07 22:25:23.486167275 +0200
+--- src/Make_mvc.mak 2019-05-10 21:36:50.126057947 +0200
+***************
+*** 242,248 ****
+ !if "$(DEBUG)" != "yes"
+ NODEBUG = 1
+ !else
+! !undef NODEBUG
+ MAKEFLAGS_GVIMEXT = DEBUG=yes
+ !endif
+
+--- 242,248 ----
+ !if "$(DEBUG)" != "yes"
+ NODEBUG = 1
+ !else
+! ! undef NODEBUG
+ MAKEFLAGS_GVIMEXT = DEBUG=yes
+ !endif
+
+***************
+*** 251,259 ****
+ # if SDK_INCLUDE_DIR is set or USE_WIN32MAK is set to "yes".
+
+ !ifdef SDK_INCLUDE_DIR
+! !include $(SDK_INCLUDE_DIR)\Win32.mak
+ !elseif "$(USE_WIN32MAK)"=="yes"
+! !include <Win32.mak>
+ !else
+ link = link
+ !endif
+--- 251,259 ----
+ # if SDK_INCLUDE_DIR is set or USE_WIN32MAK is set to "yes".
+
+ !ifdef SDK_INCLUDE_DIR
+! ! include $(SDK_INCLUDE_DIR)\Win32.mak
+ !elseif "$(USE_WIN32MAK)"=="yes"
+! ! include <Win32.mak>
+ !else
+ link = link
+ !endif
+***************
+*** 261,274 ****
+
+ # Check VC version.
+ !if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul]
+! !message *** ERROR
+! !message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH.
+! !message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed.
+! !error Make aborted.
+ !else
+! !include msvcver.~
+! !if [del msvcver.c msvcver.~]
+! !endif
+ !endif
+
+ !if $(MSVCVER) < 1900
+--- 261,274 ----
+
+ # Check VC version.
+ !if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul]
+! ! message *** ERROR
+! ! message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH.
+! ! message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed.
+! ! error Make aborted.
+ !else
+! ! include msvcver.~
+! ! if [del msvcver.c msvcver.~]
+! ! endif
+ !endif
+
+ !if $(MSVCVER) < 1900
+***************
+*** 302,310 ****
+
+ # Calculate MSVCRT_VER
+ !if [(set /a MSVCRT_VER="$(MSVCRT_VER)" > nul) && set MSVCRT_VER > msvcrtver.~] == 0
+! !include msvcrtver.~
+! !if [del msvcrtver.~]
+! !endif
+ !endif
+
+ # Base name of the msvcrXX.dll
+--- 302,310 ----
+
+ # Calculate MSVCRT_VER
+ !if [(set /a MSVCRT_VER="$(MSVCRT_VER)" > nul) && set MSVCRT_VER > msvcrtver.~] == 0
+! ! include msvcrtver.~
+! ! if [del msvcrtver.~]
+! ! endif
+ !endif
+
+ # Base name of the msvcrXX.dll
+***************
+*** 353,363 ****
+ !endif
+
+ !ifndef TERMINAL
+! !if "$(FEATURES)"=="HUGE"
+ TERMINAL = yes
+! !else
+ TERMINAL = no
+! !endif
+ !endif
+
+ !if "$(TERMINAL)" == "yes"
+--- 353,363 ----
+ !endif
+
+ !ifndef TERMINAL
+! ! if "$(FEATURES)"=="HUGE"
+ TERMINAL = yes
+! ! else
+ TERMINAL = no
+! ! endif
+ !endif
+
+ !if "$(TERMINAL)" == "yes"
+***************
+*** 386,458 ****
+ !endif
+
+ !ifndef CHANNEL
+! !if "$(FEATURES)"=="HUGE"
+ CHANNEL = yes
+! !else
+ CHANNEL = $(GUI)
+! !endif
+ !endif
+
+ # GUI specific features.
+ !if "$(GUI)" == "yes"
+ # Only allow NETBEANS for a GUI build and CHANNEL.
+! !if "$(NETBEANS)" == "yes" && "$(CHANNEL)" == "yes"
+ # NETBEANS - Include support for Netbeans integration
+ NETBEANS_PRO = proto/netbeans.pro
+ NETBEANS_OBJ = $(OBJDIR)/netbeans.obj
+ NETBEANS_DEFS = -DFEAT_NETBEANS_INTG
+
+! !if "$(NBDEBUG)" == "yes"
+ NBDEBUG_DEFS = -DNBDEBUG
+ NBDEBUG_INCL = nbdebug.h
+ NBDEBUG_SRC = nbdebug.c
+! !endif
+ NETBEANS_LIB = WSock32.lib
+! !endif
+
+ # DirectWrite (DirectX)
+! !if "$(DIRECTX)" == "yes"
+ DIRECTX_DEFS = -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
+! !if "$(COLOR_EMOJI)" != "no"
+ DIRECTX_DEFS = $(DIRECTX_DEFS) -DFEAT_DIRECTX_COLOR_EMOJI
+! !endif
+ DIRECTX_INCL = gui_dwrite.h
+ DIRECTX_OBJ = $(OUTDIR)\gui_dwrite.obj
+! !endif
+
+ # Only allow XPM for a GUI build.
+! !ifndef XPM
+! !ifndef USE_MSVCRT
+ # Both XPM and USE_MSVCRT are not set, use the included xpm files, depending
+ # on the architecture.
+! !if "$(CPU)" == "AMD64"
+ XPM = xpm\x64
+! !elseif "$(CPU)" == "ARM64"
+ XPM = xpm\arm64
+! !elseif "$(CPU)" == "i386"
+ XPM = xpm\x86
+! !else
+ XPM = no
+! !endif
+! !else # USE_MSVCRT
+ XPM = no
+! !endif # USE_MSVCRT
+! !endif # XPM
+! !if "$(XPM)" != "no"
+ # XPM - Include support for XPM signs
+ # See the xpm directory for more information.
+ XPM_OBJ = $(OBJDIR)/xpm_w32.obj
+ XPM_DEFS = -DFEAT_XPM_W32
+! !if $(MSVC_MAJOR) >= 14
+ # VC14 cannot use a library built by VC12 or earlier, because VC14 uses
+ # Universal CRT.
+ XPM_LIB = $(XPM)\lib-vc14\libXpm.lib
+! !else
+ XPM_LIB = $(XPM)\lib\libXpm.lib
+! !endif
+ XPM_INC = -I $(XPM)\include -I $(XPM)\..\include
+! !endif
+! !endif
+
+ !if "$(CHANNEL)" == "yes"
+ CHANNEL_PRO = proto/channel.pro
+--- 386,458 ----
+ !endif
+
+ !ifndef CHANNEL
+! ! if "$(FEATURES)"=="HUGE"
+ CHANNEL = yes
+! ! else
+ CHANNEL = $(GUI)
+! ! endif
+ !endif
+
+ # GUI specific features.
+ !if "$(GUI)" == "yes"
+ # Only allow NETBEANS for a GUI build and CHANNEL.
+! ! if "$(NETBEANS)" == "yes" && "$(CHANNEL)" == "yes"
+ # NETBEANS - Include support for Netbeans integration
+ NETBEANS_PRO = proto/netbeans.pro
+ NETBEANS_OBJ = $(OBJDIR)/netbeans.obj
+ NETBEANS_DEFS = -DFEAT_NETBEANS_INTG
+
+! ! if "$(NBDEBUG)" == "yes"
+ NBDEBUG_DEFS = -DNBDEBUG
+ NBDEBUG_INCL = nbdebug.h
+ NBDEBUG_SRC = nbdebug.c
+! ! endif
+ NETBEANS_LIB = WSock32.lib
+! ! endif
+
+ # DirectWrite (DirectX)
+! ! if "$(DIRECTX)" == "yes"
+ DIRECTX_DEFS = -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
+! ! if "$(COLOR_EMOJI)" != "no"
+ DIRECTX_DEFS = $(DIRECTX_DEFS) -DFEAT_DIRECTX_COLOR_EMOJI
+! ! endif
+ DIRECTX_INCL = gui_dwrite.h
+ DIRECTX_OBJ = $(OUTDIR)\gui_dwrite.obj
+! ! endif
+
+ # Only allow XPM for a GUI build.
+! ! ifndef XPM
+! ! ifndef USE_MSVCRT
+ # Both XPM and USE_MSVCRT are not set, use the included xpm files, depending
+ # on the architecture.
+! ! if "$(CPU)" == "AMD64"
+ XPM = xpm\x64
+! ! elseif "$(CPU)" == "ARM64"
+ XPM = xpm\arm64
+! ! elseif "$(CPU)" == "i386"
+ XPM = xpm\x86
+! ! else
+ XPM = no
+! ! endif
+! ! else # USE_MSVCRT
+ XPM = no
+! ! endif # USE_MSVCRT
+! ! endif # XPM
+! ! if "$(XPM)" != "no"
+ # XPM - Include support for XPM signs
+ # See the xpm directory for more information.
+ XPM_OBJ = $(OBJDIR)/xpm_w32.obj
+ XPM_DEFS = -DFEAT_XPM_W32
+! ! if $(MSVC_MAJOR) >= 14
+ # VC14 cannot use a library built by VC12 or earlier, because VC14 uses
+ # Universal CRT.
+ XPM_LIB = $(XPM)\lib-vc14\libXpm.lib
+! ! else
+ XPM_LIB = $(XPM)\lib\libXpm.lib
+! ! endif
+ XPM_INC = -I $(XPM)\include -I $(XPM)\..\include
+! ! endif
+! !endif # GUI
+
+ !if "$(CHANNEL)" == "yes"
+ CHANNEL_PRO = proto/channel.pro
+***************
+*** 618,628 ****
+ !endif
+
+ # Use multiprocess build on MSVC 10
+! !if "$(USE_MP)"=="yes"
+! !if $(MSVC_MAJOR) >= 10
+ CFLAGS = $(CFLAGS) /MP
+ !endif
+- !endif
+
+ # VC10 or later has stdint.h.
+ !if $(MSVC_MAJOR) >= 10
+--- 618,626 ----
+ !endif
+
+ # Use multiprocess build on MSVC 10
+! !if ("$(USE_MP)" == "yes") && ($(MSVC_MAJOR) >= 10)
+ CFLAGS = $(CFLAGS) /MP
+ !endif
+
+ # VC10 or later has stdint.h.
+ !if $(MSVC_MAJOR) >= 10
+***************
+*** 632,661 ****
+ # Static code analysis generally available starting with VS2012 (VC11) or
+ # Windows SDK 7.1 (VC10)
+ !if ("$(ANALYZE)" == "yes") && ($(MSVC_MAJOR) >= 10)
+! CFLAGS=$(CFLAGS) /analyze
+ !endif
+
+ !ifdef NODEBUG
+ VIM = vim
+! !if "$(OPTIMIZE)" == "SPACE"
+ OPTFLAG = /O1
+! !elseif "$(OPTIMIZE)" == "SPEED"
+ OPTFLAG = /O2
+! !else # MAXSPEED
+ OPTFLAG = /Ox
+! !endif
+
+! !if $(MSVC_MAJOR) >= 8
+ # Use link time code generation if not worried about size
+! !if "$(OPTIMIZE)" != "SPACE"
+ OPTFLAG = $(OPTFLAG) /GL
+! !endif
+! !endif
+
+ # (/Wp64 is deprecated in VC9 and generates an obnoxious warning.)
+! !if ($(MSVC_MAJOR) == 7) || ($(MSVC_MAJOR) == 8)
+! CFLAGS=$(CFLAGS) $(WP64CHECK)
+! !endif
+
+ CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
+ RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
+--- 630,659 ----
+ # Static code analysis generally available starting with VS2012 (VC11) or
+ # Windows SDK 7.1 (VC10)
+ !if ("$(ANALYZE)" == "yes") && ($(MSVC_MAJOR) >= 10)
+! CFLAGS = $(CFLAGS) /analyze
+ !endif
+
+ !ifdef NODEBUG
+ VIM = vim
+! ! if "$(OPTIMIZE)" == "SPACE"
+ OPTFLAG = /O1
+! ! elseif "$(OPTIMIZE)" == "SPEED"
+ OPTFLAG = /O2
+! ! else # MAXSPEED
+ OPTFLAG = /Ox
+! ! endif
+
+! ! if $(MSVC_MAJOR) >= 8
+ # Use link time code generation if not worried about size
+! ! if "$(OPTIMIZE)" != "SPACE"
+ OPTFLAG = $(OPTFLAG) /GL
+! ! endif
+! ! endif
+
+ # (/Wp64 is deprecated in VC9 and generates an obnoxious warning.)
+! ! if ($(MSVC_MAJOR) == 7) || ($(MSVC_MAJOR) == 8)
+! CFLAGS = $(CFLAGS) $(WP64CHECK)
+! ! endif
+
+ CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
+ RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
+***************
+*** 782,795 ****
+
+ !if "$(IME)" == "yes"
+ CFLAGS = $(CFLAGS) -DFEAT_MBYTE_IME
+! !ifndef DYNAMIC_IME
+ DYNAMIC_IME = yes
+! !endif
+! !if "$(DYNAMIC_IME)" == "yes"
+ CFLAGS = $(CFLAGS) -DDYNAMIC_IME
+! !else
+ IME_LIB = imm32.lib
+! !endif
+ !endif
+
+ !if "$(GIME)" == "yes"
+--- 780,793 ----
+
+ !if "$(IME)" == "yes"
+ CFLAGS = $(CFLAGS) -DFEAT_MBYTE_IME
+! ! ifndef DYNAMIC_IME
+ DYNAMIC_IME = yes
+! ! endif
+! ! if "$(DYNAMIC_IME)" == "yes"
+ CFLAGS = $(CFLAGS) -DDYNAMIC_IME
+! ! else
+ IME_LIB = imm32.lib
+! ! endif
+ !endif
+
+ !if "$(GIME)" == "yes"
+***************
+*** 880,1032 ****
+
+ # TCL interface
+ !ifdef TCL
+! !ifndef TCL_VER
+ TCL_VER = 86
+ TCL_VER_LONG = 8.6
+! !endif
+! !message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)"
+! !if "$(DYNAMIC_TCL)" == "yes"
+! !message Tcl DLL will be loaded dynamically
+! !ifndef TCL_DLL
+ TCL_DLL = tcl$(TCL_VER).dll
+! !endif
+ CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \
+ -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
+ TCL_OBJ = $(OUTDIR)\if_tcl.obj
+ TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
+ TCL_LIB = "$(TCL)\lib\tclstub$(TCL_VER).lib"
+! !else
+ CFLAGS = $(CFLAGS) -DFEAT_TCL
+ TCL_OBJ = $(OUTDIR)\if_tcl.obj
+ TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
+ TCL_LIB = $(TCL)\lib\tcl$(TCL_VER)vc.lib
+! !endif
+ !endif
+
+ # Lua interface
+ !ifdef LUA
+! !ifndef LUA_VER
+ LUA_VER = 53
+! !endif
+! !message Lua requested (version $(LUA_VER)) - root dir is "$(LUA)"
+! !if "$(DYNAMIC_LUA)" == "yes"
+! !message Lua DLL will be loaded dynamically
+! !endif
+ CFLAGS = $(CFLAGS) -DFEAT_LUA
+ LUA_OBJ = $(OUTDIR)\if_lua.obj
+ LUA_INC = /I "$(LUA)\include" /I "$(LUA)"
+! !if "$(DYNAMIC_LUA)" == "yes"
+ CFLAGS = $(CFLAGS) -DDYNAMIC_LUA \
+ -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
+ LUA_LIB = /nodefaultlib:lua$(LUA_VER).lib
+! !else
+ LUA_LIB = "$(LUA)\lib\lua$(LUA_VER).lib"
+! !endif
+ !endif
+
+ !ifdef PYTHON
+! !ifdef PYTHON3
+ DYNAMIC_PYTHON=yes
+ DYNAMIC_PYTHON3=yes
+! !endif
+ !endif
+
+ # PYTHON interface
+ !ifdef PYTHON
+! !ifndef PYTHON_VER
+ PYTHON_VER = 27
+! !endif
+! !message Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)"
+! !if "$(DYNAMIC_PYTHON)" == "yes"
+! !message Python DLL will be loaded dynamically
+! !endif
+ CFLAGS = $(CFLAGS) -DFEAT_PYTHON
+ PYTHON_OBJ = $(OUTDIR)\if_python.obj
+ PYTHON_INC = /I "$(PYTHON)\Include" /I "$(PYTHON)\PC"
+! !if "$(DYNAMIC_PYTHON)" == "yes"
+ CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON \
+ -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
+ PYTHON_LIB = /nodefaultlib:python$(PYTHON_VER).lib
+! !else
+ PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
+! !endif
+ !endif
+
+ # PYTHON3 interface
+ !ifdef PYTHON3
+! !ifndef PYTHON3_VER
+ PYTHON3_VER = 36
+! !endif
+! !message Python3 requested (version $(PYTHON3_VER)) - root dir is "$(PYTHON3)"
+! !if "$(DYNAMIC_PYTHON3)" == "yes"
+! !message Python3 DLL will be loaded dynamically
+! !endif
+ CFLAGS = $(CFLAGS) -DFEAT_PYTHON3
+ PYTHON3_OBJ = $(OUTDIR)\if_python3.obj
+ PYTHON3_INC = /I "$(PYTHON3)\Include" /I "$(PYTHON3)\PC"
+! !if "$(DYNAMIC_PYTHON3)" == "yes"
+ CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON3 \
+ -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
+ PYTHON3_LIB = /nodefaultlib:python$(PYTHON3_VER).lib
+! !else
+ PYTHON3_LIB = $(PYTHON3)\libs\python$(PYTHON3_VER).lib
+! !endif
+ !endif
+
+ # MzScheme interface
+ !ifdef MZSCHEME
+! !message MzScheme requested - root dir is "$(MZSCHEME)"
+! !ifndef MZSCHEME_VER
+ MZSCHEME_VER = 3m_a0solc
+! !endif
+! !ifndef MZSCHEME_COLLECTS
+ MZSCHEME_COLLECTS=$(MZSCHEME)\collects
+! !endif
+ CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I "$(MZSCHEME)\include"
+! !if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib")
+ MZSCHEME_MAIN_LIB=mzsch
+! !else
+ MZSCHEME_MAIN_LIB=racket
+! !endif
+! !if (EXIST("$(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll") \
+ && !EXIST("$(MZSCHEME)\lib\libmzgc$(MZSCHEME_VER).dll")) \
+ || (EXIST("$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib") \
+ && !EXIST("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib"))
+! !message Building with Precise GC
+ MZSCHEME_PRECISE_GC = yes
+ CFLAGS = $(CFLAGS) -DMZ_PRECISE_GC
+! !endif
+! !if "$(DYNAMIC_MZSCHEME)" == "yes"
+! !message MzScheme DLLs will be loaded dynamically
+ CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME
+! !if "$(MZSCHEME_PRECISE_GC)" == "yes"
+ # Precise GC does not use separate dll
+ CFLAGS = $(CFLAGS) \
+ -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \
+ -DDYNAMIC_MZGC_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\"
+! !else
+ CFLAGS = $(CFLAGS) \
+ -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \
+ -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
+! !endif
+! !else
+! !if "$(MZSCHEME_DEBUG)" == "yes"
+ CFLAGS = $(CFLAGS) -DMZSCHEME_FORCE_GC
+! !endif
+! !if "$(MZSCHEME_PRECISE_GC)" == "yes"
+ # Precise GC does not use separate dll
+! !if EXIST("$(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).def")
+ # create .lib from .def
+ MZSCHEME_LIB = lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
+ MZSCHEME_EXTRA_DEP = lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
+! !else
+ MZSCHEME_LIB = "$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib"
+! !endif
+! !else
+ MZSCHEME_LIB = "$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib" \
+ "$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib"
+! !endif
+! !endif
+ MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
+ # increase stack size
+ MZSCHEME_LIB = $(MZSCHEME_LIB) /STACK:8388608
+--- 878,1030 ----
+
+ # TCL interface
+ !ifdef TCL
+! ! ifndef TCL_VER
+ TCL_VER = 86
+ TCL_VER_LONG = 8.6
+! ! endif
+! ! message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)"
+! ! if "$(DYNAMIC_TCL)" == "yes"
+! ! message Tcl DLL will be loaded dynamically
+! ! ifndef TCL_DLL
+ TCL_DLL = tcl$(TCL_VER).dll
+! ! endif
+ CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \
+ -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
+ TCL_OBJ = $(OUTDIR)\if_tcl.obj
+ TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
+ TCL_LIB = "$(TCL)\lib\tclstub$(TCL_VER).lib"
+! ! else
+ CFLAGS = $(CFLAGS) -DFEAT_TCL
+ TCL_OBJ = $(OUTDIR)\if_tcl.obj
+ TCL_INC = /I "$(TCL)\Include" /I "$(TCL)"
+ TCL_LIB = $(TCL)\lib\tcl$(TCL_VER)vc.lib
+! ! endif
+ !endif
+
+ # Lua interface
+ !ifdef LUA
+! ! ifndef LUA_VER
+ LUA_VER = 53
+! ! endif
+! ! message Lua requested (version $(LUA_VER)) - root dir is "$(LUA)"
+! ! if "$(DYNAMIC_LUA)" == "yes"
+! ! message Lua DLL will be loaded dynamically
+! ! endif
+ CFLAGS = $(CFLAGS) -DFEAT_LUA
+ LUA_OBJ = $(OUTDIR)\if_lua.obj
+ LUA_INC = /I "$(LUA)\include" /I "$(LUA)"
+! ! if "$(DYNAMIC_LUA)" == "yes"
+ CFLAGS = $(CFLAGS) -DDYNAMIC_LUA \
+ -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
+ LUA_LIB = /nodefaultlib:lua$(LUA_VER).lib
+! ! else
+ LUA_LIB = "$(LUA)\lib\lua$(LUA_VER).lib"
+! ! endif
+ !endif
+
+ !ifdef PYTHON
+! ! ifdef PYTHON3
+ DYNAMIC_PYTHON=yes
+ DYNAMIC_PYTHON3=yes
+! ! endif
+ !endif
+
+ # PYTHON interface
+ !ifdef PYTHON
+! ! ifndef PYTHON_VER
+ PYTHON_VER = 27
+! ! endif
+! ! message Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)"
+! ! if "$(DYNAMIC_PYTHON)" == "yes"
+! ! message Python DLL will be loaded dynamically
+! ! endif
+ CFLAGS = $(CFLAGS) -DFEAT_PYTHON
+ PYTHON_OBJ = $(OUTDIR)\if_python.obj
+ PYTHON_INC = /I "$(PYTHON)\Include" /I "$(PYTHON)\PC"
+! ! if "$(DYNAMIC_PYTHON)" == "yes"
+ CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON \
+ -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
+ PYTHON_LIB = /nodefaultlib:python$(PYTHON_VER).lib
+! ! else
+ PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
+! ! endif
+ !endif
+
+ # PYTHON3 interface
+ !ifdef PYTHON3
+! ! ifndef PYTHON3_VER
+ PYTHON3_VER = 36
+! ! endif
+! ! message Python3 requested (version $(PYTHON3_VER)) - root dir is "$(PYTHON3)"
+! ! if "$(DYNAMIC_PYTHON3)" == "yes"
+! ! message Python3 DLL will be loaded dynamically
+! ! endif
+ CFLAGS = $(CFLAGS) -DFEAT_PYTHON3
+ PYTHON3_OBJ = $(OUTDIR)\if_python3.obj
+ PYTHON3_INC = /I "$(PYTHON3)\Include" /I "$(PYTHON3)\PC"
+! ! if "$(DYNAMIC_PYTHON3)" == "yes"
+ CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON3 \
+ -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
+ PYTHON3_LIB = /nodefaultlib:python$(PYTHON3_VER).lib
+! ! else
+ PYTHON3_LIB = $(PYTHON3)\libs\python$(PYTHON3_VER).lib
+! ! endif
+ !endif
+
+ # MzScheme interface
+ !ifdef MZSCHEME
+! ! message MzScheme requested - root dir is "$(MZSCHEME)"
+! ! ifndef MZSCHEME_VER
+ MZSCHEME_VER = 3m_a0solc
+! ! endif
+! ! ifndef MZSCHEME_COLLECTS
+ MZSCHEME_COLLECTS=$(MZSCHEME)\collects
+! ! endif
+ CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I "$(MZSCHEME)\include"
+! ! if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib")
+ MZSCHEME_MAIN_LIB=mzsch
+! ! else
+ MZSCHEME_MAIN_LIB=racket
+! ! endif
+! ! if (EXIST("$(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll") \
+ && !EXIST("$(MZSCHEME)\lib\libmzgc$(MZSCHEME_VER).dll")) \
+ || (EXIST("$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib") \
+ && !EXIST("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib"))
+! ! message Building with Precise GC
+ MZSCHEME_PRECISE_GC = yes
+ CFLAGS = $(CFLAGS) -DMZ_PRECISE_GC
+! ! endif
+! ! if "$(DYNAMIC_MZSCHEME)" == "yes"
+! ! message MzScheme DLLs will be loaded dynamically
+ CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME
+! ! if "$(MZSCHEME_PRECISE_GC)" == "yes"
+ # Precise GC does not use separate dll
+ CFLAGS = $(CFLAGS) \
+ -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \
+ -DDYNAMIC_MZGC_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\"
+! ! else
+ CFLAGS = $(CFLAGS) \
+ -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \
+ -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
+! ! endif
+! ! else
+! ! if "$(MZSCHEME_DEBUG)" == "yes"
+ CFLAGS = $(CFLAGS) -DMZSCHEME_FORCE_GC
+! ! endif
+! ! if "$(MZSCHEME_PRECISE_GC)" == "yes"
+ # Precise GC does not use separate dll
+! ! if EXIST("$(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).def")
+ # create .lib from .def
+ MZSCHEME_LIB = lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
+ MZSCHEME_EXTRA_DEP = lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
+! ! else
+ MZSCHEME_LIB = "$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib"
+! ! endif
+! ! else
+ MZSCHEME_LIB = "$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib" \
+ "$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib"
+! ! endif
+! ! endif
+ MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
+ # increase stack size
+ MZSCHEME_LIB = $(MZSCHEME_LIB) /STACK:8388608
+***************
+*** 1035,1096 ****
+
+ # Perl interface
+ !ifdef PERL
+! !ifndef PERL_VER
+ PERL_VER = 524
+! !endif
+! !message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)"
+! !if "$(DYNAMIC_PERL)" == "yes"
+! !if $(PERL_VER) >= 56
+! !message Perl DLL will be loaded dynamically
+! !else
+! !message Dynamic loading is not supported for Perl versions earlier than 5.6.0
+! !message Reverting to static loading...
+! !undef DYNAMIC_PERL
+! !endif
+! !endif
+
+ # Is Perl installed in architecture-specific directories?
+! !if exist($(PERL)\Bin\MSWin32-x86)
+ PERL_ARCH = \MSWin32-x86
+! !endif
+
+ PERL_INCDIR = $(PERL)\Lib$(PERL_ARCH)\Core
+
+ # Version-dependent stuff
+! !if $(PERL_VER) == 55
+ PERL_LIB = $(PERL_INCDIR)\perl.lib
+! !else
+ PERL_DLL = perl$(PERL_VER).dll
+! !if exist($(PERL_INCDIR)\perl$(PERL_VER).lib)
+ PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib
+! !else
+ # For ActivePerl 5.18 and later
+ PERL_LIB = $(PERL_INCDIR)\libperl$(PERL_VER).a
+! !endif
+! !endif
+
+ CFLAGS = $(CFLAGS) -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
+
+ # Do we want to load Perl dynamically?
+! !if "$(DYNAMIC_PERL)" == "yes"
+ CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\"
+! !undef PERL_LIB
+! !endif
+
+ PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl
+ PERL_INC = /I $(PERL_INCDIR)
+! !if $(MSVC_MAJOR) <= 11
+ # ActivePerl 5.20+ requires stdbool.h but VC2012 or earlier doesn't have it.
+ # Use a stub stdbool.h.
+ PERL_INC = $(PERL_INC) /I if_perl_msvc
+! !endif
+ PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj
+ XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
+! !if exist($(XSUBPP))
+ XSUBPP = $(PERL_EXE) $(XSUBPP)
+! !else
+ XSUBPP = xsubpp
+! !endif
+ XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap
+
+ !endif
+--- 1033,1094 ----
+
+ # Perl interface
+ !ifdef PERL
+! ! ifndef PERL_VER
+ PERL_VER = 524
+! ! endif
+! ! message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)"
+! ! if "$(DYNAMIC_PERL)" == "yes"
+! ! if $(PERL_VER) >= 56
+! ! message Perl DLL will be loaded dynamically
+! ! else
+! ! message Dynamic loading is not supported for Perl versions earlier than 5.6.0
+! ! message Reverting to static loading...
+! ! undef DYNAMIC_PERL
+! ! endif
+! ! endif
+
+ # Is Perl installed in architecture-specific directories?
+! ! if exist($(PERL)\Bin\MSWin32-x86)
+ PERL_ARCH = \MSWin32-x86
+! ! endif
+
+ PERL_INCDIR = $(PERL)\Lib$(PERL_ARCH)\Core
+
+ # Version-dependent stuff
+! ! if $(PERL_VER) == 55
+ PERL_LIB = $(PERL_INCDIR)\perl.lib
+! ! else
+ PERL_DLL = perl$(PERL_VER).dll
+! ! if exist($(PERL_INCDIR)\perl$(PERL_VER).lib)
+ PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib
+! ! else
+ # For ActivePerl 5.18 and later
+ PERL_LIB = $(PERL_INCDIR)\libperl$(PERL_VER).a
+! ! endif
+! ! endif
+
+ CFLAGS = $(CFLAGS) -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
+
+ # Do we want to load Perl dynamically?
+! ! if "$(DYNAMIC_PERL)" == "yes"
+ CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\"
+! ! undef PERL_LIB
+! ! endif
+
+ PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl
+ PERL_INC = /I $(PERL_INCDIR)
+! ! if $(MSVC_MAJOR) <= 11
+ # ActivePerl 5.20+ requires stdbool.h but VC2012 or earlier doesn't have it.
+ # Use a stub stdbool.h.
+ PERL_INC = $(PERL_INC) /I if_perl_msvc
+! ! endif
+ PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj
+ XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
+! ! if exist($(XSUBPP))
+ XSUBPP = $(PERL_EXE) $(XSUBPP)
+! ! else
+ XSUBPP = xsubpp
+! ! endif
+ XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap
+
+ !endif
+***************
+*** 1100,1170 ****
+ #
+ !ifdef RUBY
+ # Set default value
+! !ifndef RUBY_VER
+ RUBY_VER = 22
+! !endif
+! !ifndef RUBY_VER_LONG
+ RUBY_VER_LONG = 2.2.0
+! !endif
+! !ifndef RUBY_API_VER_LONG
+ RUBY_API_VER_LONG = $(RUBY_VER_LONG)
+! !endif
+! !ifndef RUBY_API_VER
+ RUBY_API_VER = $(RUBY_API_VER_LONG:.=)
+! !endif
+
+! !if $(RUBY_VER) >= 18
+
+! !ifndef RUBY_PLATFORM
+! !if "$(CPU)" == "i386"
+ RUBY_PLATFORM = i386-mswin32
+! !else # CPU
+ RUBY_PLATFORM = x64-mswin64
+! !endif # CPU
+! !if $(MSVCRT_VER) >= 70 && $(RUBY_VER) > 19
+ RUBY_PLATFORM = $(RUBY_PLATFORM)_$(MSVCRT_VER)
+! !endif # MSVCRT_VER
+! !endif # RUBY_PLATFORM
+
+! !ifndef RUBY_INSTALL_NAME
+! !ifndef RUBY_MSVCRT_NAME
+ # Base name of msvcrXX.dll which is used by ruby's dll.
+ RUBY_MSVCRT_NAME = $(MSVCRT_NAME)
+! !endif # RUBY_MSVCRT_NAME
+! !if "$(CPU)" == "i386"
+ RUBY_INSTALL_NAME = $(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
+! !else # CPU
+ RUBY_INSTALL_NAME = x64-$(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
+! !endif # CPU
+! !endif # RUBY_INSTALL_NAME
+
+! !else # $(RUBY_VER) >= 18
+
+! !ifndef RUBY_PLATFORM
+ RUBY_PLATFORM = i586-mswin32
+! !endif
+! !ifndef RUBY_INSTALL_NAME
+ RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
+! !endif
+
+! !endif # $(RUBY_VER) >= 18
+
+! !message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
+ 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
+ RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
+ # Do we want to load Ruby dynamically?
+! !if "$(DYNAMIC_RUBY)" == "yes"
+! !message Ruby DLL will be loaded dynamically
+ CFLAGS = $(CFLAGS) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=$(RUBY_VER) \
+ -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
+! !undef RUBY_LIB
+! !endif
+ !endif # RUBY
+
+ #
+--- 1098,1168 ----
+ #
+ !ifdef RUBY
+ # Set default value
+! ! ifndef RUBY_VER
+ RUBY_VER = 22
+! ! endif
+! ! ifndef RUBY_VER_LONG
+ RUBY_VER_LONG = 2.2.0
+! ! endif
+! ! ifndef RUBY_API_VER_LONG
+ RUBY_API_VER_LONG = $(RUBY_VER_LONG)
+! ! endif
+! ! ifndef RUBY_API_VER
+ RUBY_API_VER = $(RUBY_API_VER_LONG:.=)
+! ! endif
+
+! ! if $(RUBY_VER) >= 18
+
+! ! ifndef RUBY_PLATFORM
+! ! if "$(CPU)" == "i386"
+ RUBY_PLATFORM = i386-mswin32
+! ! else # CPU
+ RUBY_PLATFORM = x64-mswin64
+! ! endif # CPU
+! ! if $(MSVCRT_VER) >= 70 && $(RUBY_VER) > 19
+ RUBY_PLATFORM = $(RUBY_PLATFORM)_$(MSVCRT_VER)
+! ! endif # MSVCRT_VER
+! ! endif # RUBY_PLATFORM
+
+! ! ifndef RUBY_INSTALL_NAME
+! ! ifndef RUBY_MSVCRT_NAME
+ # Base name of msvcrXX.dll which is used by ruby's dll.
+ RUBY_MSVCRT_NAME = $(MSVCRT_NAME)
+! ! endif # RUBY_MSVCRT_NAME
+! ! if "$(CPU)" == "i386"
+ RUBY_INSTALL_NAME = $(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
+! ! else # CPU
+ RUBY_INSTALL_NAME = x64-$(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
+! ! endif # CPU
+! ! endif # RUBY_INSTALL_NAME
+
+! ! else # $(RUBY_VER) >= 18
+
+! ! ifndef RUBY_PLATFORM
+ RUBY_PLATFORM = i586-mswin32
+! ! endif
+! ! ifndef RUBY_INSTALL_NAME
+ RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
+! ! endif
+
+! ! endif # $(RUBY_VER) >= 18
+
+! ! message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
+ 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
+ RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
+ # Do we want to load Ruby dynamically?
+! ! if "$(DYNAMIC_RUBY)" == "yes"
+! ! message Ruby DLL will be loaded dynamically
+ CFLAGS = $(CFLAGS) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=$(RUBY_VER) \
+ -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
+! ! undef RUBY_LIB
+! ! endif
+ !endif # RUBY
+
+ #
+***************
+*** 1221,1231 ****
+
+ # Report link time code generation progress if used.
+ !ifdef NODEBUG
+! !if $(MSVC_MAJOR) >= 8
+! !if "$(OPTIMIZE)" != "SPACE"
+ LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
+! !endif
+! !endif
+ !endif
+
+ !if $(MSVC_MAJOR) >= 11 && "$(CPU)" == "AMD64" && "$(GUI)" == "yes"
+--- 1219,1229 ----
+
+ # Report link time code generation progress if used.
+ !ifdef NODEBUG
+! ! if $(MSVC_MAJOR) >= 8
+! ! if "$(OPTIMIZE)" != "SPACE"
+ LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
+! ! endif
+! ! endif
+ !endif
+
+ !if $(MSVC_MAJOR) >= 11 && "$(CPU)" == "AMD64" && "$(GUI)" == "yes"
+*** ../vim-8.1.1313/src/version.c 2019-05-10 21:28:35.184612974 +0200
+--- src/version.c 2019-05-10 21:37:37.141815175 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1314,
+ /**/
+
+--
+God made machine language; all the rest is the work of man.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1315 b/data/vim/patches/8.1.1315
new file mode 100644
index 000000000..c0f637c7f
--- /dev/null
+++ b/data/vim/patches/8.1.1315
@@ -0,0 +1,737 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1315
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1315
+Problem: There is always a delay if a termrequest is never answered.
+Solution: When the response is not received within two seconds consider the
+ request to have failed.
+Files: src/term.c
+
+
+*** ../vim-8.1.1314/src/term.c 2019-05-08 16:40:57.753592725 +0200
+--- src/term.c 2019-05-10 23:05:59.609307792 +0200
+***************
+*** 110,128 ****
+ # define LOG_TR(msg) do { /**/ } while (0)
+ # endif
+
+! # define STATUS_GET 1 /* send request when switching to RAW mode */
+! # define STATUS_SENT 2 /* did send request, waiting for response */
+! # define STATUS_GOT 3 /* received response */
+
+! /* Request Terminal Version status: */
+! static int crv_status = STATUS_GET;
+
+! /* Request Cursor position report: */
+! static int u7_status = STATUS_GET;
+
+ # ifdef FEAT_TERMINAL
+! /* Request foreground color report: */
+! static int rfg_status = STATUS_GET;
+ static int fg_r = 0;
+ static int fg_g = 0;
+ static int fg_b = 0;
+--- 110,138 ----
+ # define LOG_TR(msg) do { /**/ } while (0)
+ # endif
+
+! typedef enum {
+! STATUS_GET, // send request when switching to RAW mode
+! STATUS_SENT, // did send request, checking for response
+! STATUS_GOT, // received response
+! STATUS_FAIL // timed out
+! } request_progress_T;
+!
+! typedef struct {
+! request_progress_T tr_progress;
+! time_t tr_start; // when request was sent, -1 for never
+! } termrequest_T;
+
+! # define TERMREQUEST_INIT {STATUS_GET, -1}
+
+! // Request Terminal Version status:
+! static termrequest_T crv_status = TERMREQUEST_INIT;
+!
+! // Request Cursor position report:
+! static termrequest_T u7_status = TERMREQUEST_INIT;
+
+ # ifdef FEAT_TERMINAL
+! // Request foreground color report:
+! static termrequest_T rfg_status = TERMREQUEST_INIT;
+ static int fg_r = 0;
+ static int fg_g = 0;
+ static int fg_b = 0;
+***************
+*** 132,147 ****
+ # endif
+
+ /* Request background color report: */
+! static int rbg_status = STATUS_GET;
+
+ /* Request cursor blinking mode report: */
+! static int rbm_status = STATUS_GET;
+
+ /* Request cursor style report: */
+! static int rcs_status = STATUS_GET;
+
+ /* Request windos position report: */
+! static int winpos_status = STATUS_GET;
+ # endif
+
+ /*
+--- 142,170 ----
+ # endif
+
+ /* Request background color report: */
+! static termrequest_T rbg_status = TERMREQUEST_INIT;
+
+ /* Request cursor blinking mode report: */
+! static termrequest_T rbm_status = TERMREQUEST_INIT;
+
+ /* Request cursor style report: */
+! static termrequest_T rcs_status = TERMREQUEST_INIT;
+
+ /* Request windos position report: */
+! static termrequest_T winpos_status = TERMREQUEST_INIT;
+!
+! static termrequest_T *all_termrequests[] = {
+! &crv_status,
+! &u7_status,
+! # ifdef FEAT_TERMINAL
+! &rfg_status,
+! # endif
+! &rbg_status,
+! &rbm_status,
+! &rcs_status,
+! &winpos_status,
+! NULL
+! };
+ # endif
+
+ /*
+***************
+*** 2011,2017 ****
+ set_term_defaults(); /* use current values as defaults */
+ #ifdef FEAT_TERMRESPONSE
+ LOG_TR(("setting crv_status to STATUS_GET"));
+! crv_status = STATUS_GET; /* Get terminal version later */
+ #endif
+
+ /*
+--- 2034,2040 ----
+ set_term_defaults(); /* use current values as defaults */
+ #ifdef FEAT_TERMRESPONSE
+ LOG_TR(("setting crv_status to STATUS_GET"));
+! crv_status.tr_progress = STATUS_GET; // Get terminal version later
+ #endif
+
+ /*
+***************
+*** 2833,2844 ****
+ {
+ return cur_tmode == TMODE_RAW
+ && termcap_active
+! # ifdef UNIX
+ && (is_not_a_term() || (isatty(1) && isatty(read_cmd_fd)))
+! # endif
+ && p_ek;
+ }
+
+ static int winpos_x = -1;
+ static int winpos_y = -1;
+ static int did_request_winpos = 0;
+--- 2856,2902 ----
+ {
+ return cur_tmode == TMODE_RAW
+ && termcap_active
+! # ifdef UNIX
+ && (is_not_a_term() || (isatty(1) && isatty(read_cmd_fd)))
+! # endif
+ && p_ek;
+ }
+
++ /*
++ * Set "status" to STATUS_SENT.
++ */
++ static void
++ termrequest_sent(termrequest_T *status)
++ {
++ status->tr_progress = STATUS_SENT;
++ status->tr_start = time(NULL);
++ }
++
++ /*
++ * Return TRUE if any of the requests are in STATUS_SENT.
++ */
++ static int
++ termrequest_any_pending()
++ {
++ int i;
++ time_t now = time(NULL);
++
++ for (i = 0; all_termrequests[i] != NULL; ++i)
++ {
++ if (all_termrequests[i]->tr_progress == STATUS_SENT)
++ {
++ if (all_termrequests[i]->tr_start > 0 && now > 0
++ && all_termrequests[i]->tr_start + 2 < now)
++ // Sent the request more than 2 seconds ago and didn't get a
++ // response, assume it failed.
++ all_termrequests[i]->tr_progress = STATUS_FAIL;
++ else
++ return TRUE;
++ }
++ }
++ return FALSE;
++ }
++
+ static int winpos_x = -1;
+ static int winpos_y = -1;
+ static int did_request_winpos = 0;
+***************
+*** 2860,2866 ****
+ winpos_x = -1;
+ winpos_y = -1;
+ ++did_request_winpos;
+! winpos_status = STATUS_SENT;
+ OUT_STR(T_CGP);
+ out_flush();
+
+--- 2918,2924 ----
+ winpos_x = -1;
+ winpos_y = -1;
+ ++did_request_winpos;
+! termrequest_sent(&winpos_status);
+ OUT_STR(T_CGP);
+ out_flush();
+
+***************
+*** 3478,3495 ****
+ if (!gui.in_use && !gui.starting)
+ # endif
+ {
+! /* May need to check for T_CRV response and termcodes, it
+! * doesn't work in Cooked mode, an external program may get
+! * them. */
+! if (tmode != TMODE_RAW && (crv_status == STATUS_SENT
+! || u7_status == STATUS_SENT
+! #ifdef FEAT_TERMINAL
+! || rfg_status == STATUS_SENT
+! #endif
+! || rbg_status == STATUS_SENT
+! || rbm_status == STATUS_SENT
+! || rcs_status == STATUS_SENT
+! || winpos_status == STATUS_SENT))
+ (void)vpeekc_nomap();
+ check_for_codes_from_term();
+ }
+--- 3536,3545 ----
+ if (!gui.in_use && !gui.starting)
+ # endif
+ {
+! // May need to check for T_CRV response and termcodes, it
+! // doesn't work in Cooked mode, an external program may get
+! // them.
+! if (tmode != TMODE_RAW && termrequest_any_pending())
+ (void)vpeekc_nomap();
+ check_for_codes_from_term();
+ }
+***************
+*** 3540,3546 ****
+ may_req_termresponse();
+ /* Immediately check for a response. If t_Co changes, we don't
+ * want to redraw with wrong colors first. */
+! if (crv_status == STATUS_SENT)
+ check_for_codes_from_term();
+ }
+ #endif
+--- 3590,3596 ----
+ may_req_termresponse();
+ /* Immediately check for a response. If t_Co changes, we don't
+ * want to redraw with wrong colors first. */
+! if (crv_status.tr_progress == STATUS_SENT)
+ check_for_codes_from_term();
+ }
+ #endif
+***************
+*** 3559,3581 ****
+ if (!gui.in_use && !gui.starting)
+ # endif
+ {
+! /* May need to discard T_CRV, T_U7 or T_RBG response. */
+! if (crv_status == STATUS_SENT
+! || u7_status == STATUS_SENT
+! # ifdef FEAT_TERMINAL
+! || rfg_status == STATUS_SENT
+! # endif
+! || rbg_status == STATUS_SENT
+! || rbm_status == STATUS_SENT
+! || rcs_status == STATUS_SENT
+! || winpos_status == STATUS_SENT)
+ {
+ # ifdef UNIX
+! /* Give the terminal a chance to respond. */
+ mch_delay(100L, FALSE);
+ # endif
+ # ifdef TCIFLUSH
+! /* Discard data received but not read. */
+ if (exiting)
+ tcflush(fileno(stdin), TCIFLUSH);
+ # endif
+--- 3609,3623 ----
+ if (!gui.in_use && !gui.starting)
+ # endif
+ {
+! // May need to discard T_CRV, T_U7 or T_RBG response.
+! if (termrequest_any_pending())
+ {
+ # ifdef UNIX
+! // Give the terminal a chance to respond.
+ mch_delay(100L, FALSE);
+ # endif
+ # ifdef TCIFLUSH
+! // Discard data received but not read.
+ if (exiting)
+ tcflush(fileno(stdin), TCIFLUSH);
+ # endif
+***************
+*** 3614,3627 ****
+ void
+ may_req_termresponse(void)
+ {
+! if (crv_status == STATUS_GET
+ && can_get_termresponse()
+ && starting == 0
+ && *T_CRV != NUL)
+ {
+ LOG_TR(("Sending CRV request"));
+ out_str(T_CRV);
+! crv_status = STATUS_SENT;
+ /* check for the characters now, otherwise they might be eaten by
+ * get_keystroke() */
+ out_flush();
+--- 3656,3669 ----
+ void
+ may_req_termresponse(void)
+ {
+! if (crv_status.tr_progress == STATUS_GET
+ && can_get_termresponse()
+ && starting == 0
+ && *T_CRV != NUL)
+ {
+ LOG_TR(("Sending CRV request"));
+ out_str(T_CRV);
+! termrequest_sent(&crv_status);
+ /* check for the characters now, otherwise they might be eaten by
+ * get_keystroke() */
+ out_flush();
+***************
+*** 3641,3677 ****
+ void
+ may_req_ambiguous_char_width(void)
+ {
+! if (u7_status == STATUS_GET
+ && can_get_termresponse()
+ && starting == 0
+ && *T_U7 != NUL
+ && !option_was_set((char_u *)"ambiwidth"))
+ {
+! char_u buf[16];
+
+! LOG_TR(("Sending U7 request"));
+! /* Do this in the second row. In the first row the returned sequence
+! * may be CSI 1;2R, which is the same as <S-F3>. */
+! term_windgoto(1, 0);
+! buf[mb_char2bytes(0x25bd, buf)] = 0;
+! out_str(buf);
+! out_str(T_U7);
+! u7_status = STATUS_SENT;
+! out_flush();
+!
+! /* This overwrites a few characters on the screen, a redraw is needed
+! * after this. Clear them out for now. */
+! term_windgoto(1, 0);
+! out_str((char_u *)" ");
+! term_windgoto(0, 0);
+!
+! /* Need to reset the known cursor position. */
+! screen_start();
+!
+! /* check for the characters now, otherwise they might be eaten by
+! * get_keystroke() */
+! out_flush();
+! (void)vpeekc_nomap();
+ }
+ }
+
+--- 3683,3719 ----
+ void
+ may_req_ambiguous_char_width(void)
+ {
+! if (u7_status.tr_progress == STATUS_GET
+ && can_get_termresponse()
+ && starting == 0
+ && *T_U7 != NUL
+ && !option_was_set((char_u *)"ambiwidth"))
+ {
+! char_u buf[16];
+!
+! LOG_TR(("Sending U7 request"));
+! /* Do this in the second row. In the first row the returned sequence
+! * may be CSI 1;2R, which is the same as <S-F3>. */
+! term_windgoto(1, 0);
+! buf[mb_char2bytes(0x25bd, buf)] = 0;
+! out_str(buf);
+! out_str(T_U7);
+! termrequest_sent(&u7_status);
+! out_flush();
+!
+! /* This overwrites a few characters on the screen, a redraw is needed
+! * after this. Clear them out for now. */
+! term_windgoto(1, 0);
+! out_str((char_u *)" ");
+! term_windgoto(0, 0);
+!
+! /* Need to reset the known cursor position. */
+! screen_start();
+
+! /* check for the characters now, otherwise they might be eaten by
+! * get_keystroke() */
+! out_flush();
+! (void)vpeekc_nomap();
+ }
+ }
+
+***************
+*** 3688,3708 ****
+
+ # ifdef FEAT_TERMINAL
+ /* Only request foreground if t_RF is set. */
+! if (rfg_status == STATUS_GET && *T_RFG != NUL)
+ {
+ LOG_TR(("Sending FG request"));
+ out_str(T_RFG);
+! rfg_status = STATUS_SENT;
+ didit = TRUE;
+ }
+ # endif
+
+ /* Only request background if t_RB is set. */
+! if (rbg_status == STATUS_GET && *T_RBG != NUL)
+ {
+ LOG_TR(("Sending BG request"));
+ out_str(T_RBG);
+! rbg_status = STATUS_SENT;
+ didit = TRUE;
+ }
+
+--- 3730,3750 ----
+
+ # ifdef FEAT_TERMINAL
+ /* Only request foreground if t_RF is set. */
+! if (rfg_status.tr_progress == STATUS_GET && *T_RFG != NUL)
+ {
+ LOG_TR(("Sending FG request"));
+ out_str(T_RFG);
+! termrequest_sent(&rfg_status);
+ didit = TRUE;
+ }
+ # endif
+
+ /* Only request background if t_RB is set. */
+! if (rbg_status.tr_progress == STATUS_GET && *T_RBG != NUL)
+ {
+ LOG_TR(("Sending BG request"));
+ out_str(T_RBG);
+! termrequest_sent(&rbg_status);
+ didit = TRUE;
+ }
+
+***************
+*** 3962,3968 ****
+ blink_state_is_inverted()
+ {
+ #ifdef FEAT_TERMRESPONSE
+! return rbm_status == STATUS_GOT && rcs_status == STATUS_GOT
+ && initial_cursor_blink != initial_cursor_shape_blink;
+ #else
+ return FALSE;
+--- 4004,4010 ----
+ blink_state_is_inverted()
+ {
+ #ifdef FEAT_TERMRESPONSE
+! return rbm_status.tr_progress == STATUS_GOT && rcs_status.tr_progress == STATUS_GOT
+ && initial_cursor_blink != initial_cursor_shape_blink;
+ #else
+ return FALSE;
+***************
+*** 4651,4657 ****
+ char *aw = NULL;
+
+ LOG_TR(("Received U7 status: %s", tp));
+! u7_status = STATUS_GOT;
+ did_cursorhold = TRUE;
+ if (col == 2)
+ aw = "single";
+--- 4693,4699 ----
+ char *aw = NULL;
+
+ LOG_TR(("Received U7 status: %s", tp));
+! u7_status.tr_progress = STATUS_GOT;
+ did_cursorhold = TRUE;
+ if (col == 2)
+ aw = "single";
+***************
+*** 4689,4695 ****
+ int version = col;
+
+ LOG_TR(("Received CRV response: %s", tp));
+! crv_status = STATUS_GOT;
+ did_cursorhold = TRUE;
+
+ /* If this code starts with CSI, you can bet that the
+--- 4731,4737 ----
+ int version = col;
+
+ LOG_TR(("Received CRV response: %s", tp));
+! crv_status.tr_progress = STATUS_GOT;
+ did_cursorhold = TRUE;
+
+ /* If this code starts with CSI, you can bet that the
+***************
+*** 4804,4810 ****
+ * 279 (otherwise it returns 0x18).
+ * Not for Terminal.app, it can't handle t_RS, it
+ * echoes the characters to the screen. */
+! if (rcs_status == STATUS_GET
+ && version >= 279
+ && !is_not_xterm
+ && *T_CSH != NUL
+--- 4846,4852 ----
+ * 279 (otherwise it returns 0x18).
+ * Not for Terminal.app, it can't handle t_RS, it
+ * echoes the characters to the screen. */
+! if (rcs_status.tr_progress == STATUS_GET
+ && version >= 279
+ && !is_not_xterm
+ && *T_CSH != NUL
+***************
+*** 4812,4831 ****
+ {
+ LOG_TR(("Sending cursor style request"));
+ out_str(T_CRS);
+! rcs_status = STATUS_SENT;
+ need_flush = TRUE;
+ }
+
+ /* Only request the cursor blink mode if t_RC set. Not
+ * for Gnome terminal, it can't handle t_RC, it
+ * echoes the characters to the screen. */
+! if (rbm_status == STATUS_GET
+ && !is_not_xterm
+ && *T_CRC != NUL)
+ {
+ LOG_TR(("Sending cursor blink mode request"));
+ out_str(T_CRC);
+! rbm_status = STATUS_SENT;
+ need_flush = TRUE;
+ }
+
+--- 4854,4873 ----
+ {
+ LOG_TR(("Sending cursor style request"));
+ out_str(T_CRS);
+! termrequest_sent(&rcs_status);
+ need_flush = TRUE;
+ }
+
+ /* Only request the cursor blink mode if t_RC set. Not
+ * for Gnome terminal, it can't handle t_RC, it
+ * echoes the characters to the screen. */
+! if (rbm_status.tr_progress == STATUS_GET
+ && !is_not_xterm
+ && *T_CRC != NUL)
+ {
+ LOG_TR(("Sending cursor blink mode request"));
+ out_str(T_CRC);
+! termrequest_sent(&rbm_status);
+ need_flush = TRUE;
+ }
+
+***************
+*** 4848,4854 ****
+ *
+ * {lead} can be <Esc>[ or CSI
+ */
+! else if (rbm_status == STATUS_SENT
+ && tp[(j = 1 + (tp[0] == ESC))] == '?'
+ && i == j + 6
+ && tp[j + 1] == '1'
+--- 4890,4896 ----
+ *
+ * {lead} can be <Esc>[ or CSI
+ */
+! else if (rbm_status.tr_progress == STATUS_SENT
+ && tp[(j = 1 + (tp[0] == ESC))] == '?'
+ && i == j + 6
+ && tp[j + 1] == '1'
+***************
+*** 4858,4864 ****
+ && tp[i] == 'y')
+ {
+ initial_cursor_blink = (tp[j + 4] == '1');
+! rbm_status = STATUS_GOT;
+ LOG_TR(("Received cursor blinking mode response: %s", tp));
+ key_name[0] = (int)KS_EXTRA;
+ key_name[1] = (int)KE_IGNORE;
+--- 4900,4906 ----
+ && tp[i] == 'y')
+ {
+ initial_cursor_blink = (tp[j + 4] == '1');
+! rbm_status.tr_progress = STATUS_GOT;
+ LOG_TR(("Received cursor blinking mode response: %s", tp));
+ key_name[0] = (int)KS_EXTRA;
+ key_name[1] = (int)KE_IGNORE;
+***************
+*** 4896,4902 ****
+ slen = i + 1;
+
+ if (--did_request_winpos <= 0)
+! winpos_status = STATUS_GOT;
+ }
+ }
+ if (i == len)
+--- 4938,4944 ----
+ slen = i + 1;
+
+ if (--did_request_winpos <= 0)
+! winpos_status.tr_progress = STATUS_GOT;
+ }
+ }
+ if (i == len)
+***************
+*** 4948,4954 ****
+ + tp[j+17]) ? "light" : "dark";
+
+ LOG_TR(("Received RBG response: %s", tp));
+! rbg_status = STATUS_GOT;
+ # ifdef FEAT_TERMINAL
+ bg_r = rval;
+ bg_g = gval;
+--- 4990,4996 ----
+ + tp[j+17]) ? "light" : "dark";
+
+ LOG_TR(("Received RBG response: %s", tp));
+! rbg_status.tr_progress = STATUS_GOT;
+ # ifdef FEAT_TERMINAL
+ bg_r = rval;
+ bg_g = gval;
+***************
+*** 4968,4974 ****
+ else
+ {
+ LOG_TR(("Received RFG response: %s", tp));
+! rfg_status = STATUS_GOT;
+ fg_r = rval;
+ fg_g = gval;
+ fg_b = bval;
+--- 5010,5016 ----
+ else
+ {
+ LOG_TR(("Received RFG response: %s", tp));
+! rfg_status.tr_progress = STATUS_GOT;
+ fg_r = rval;
+ fg_g = gval;
+ fg_b = bval;
+***************
+*** 5008,5014 ****
+ *
+ * Consume any code that starts with "{lead}.+r" or "{lead}.$r".
+ */
+! else if ((check_for_codes || rcs_status == STATUS_SENT)
+ && ((tp[0] == ESC && len >= 2 && tp[1] == 'P')
+ || tp[0] == DCS))
+ {
+--- 5050,5056 ----
+ *
+ * Consume any code that starts with "{lead}.+r" or "{lead}.$r".
+ */
+! else if ((check_for_codes || rcs_status.tr_progress == STATUS_SENT)
+ && ((tp[0] == ESC && len >= 2 && tp[1] == 'P')
+ || tp[0] == DCS))
+ {
+***************
+*** 5061,5067 ****
+ * the value set with T_SH. */
+ initial_cursor_shape_blink =
+ (number & 1) ? FALSE : TRUE;
+! rcs_status = STATUS_GOT;
+ LOG_TR(("Received cursor shape response: %s", tp));
+
+ key_name[0] = (int)KS_EXTRA;
+--- 5103,5109 ----
+ * the value set with T_SH. */
+ initial_cursor_shape_blink =
+ (number & 1) ? FALSE : TRUE;
+! rcs_status.tr_progress = STATUS_GOT;
+ LOG_TR(("Received cursor shape response: %s", tp));
+
+ key_name[0] = (int)KS_EXTRA;
+***************
+*** 6045,6051 ****
+ void
+ term_get_fg_color(char_u *r, char_u *g, char_u *b)
+ {
+! if (rfg_status == STATUS_GOT)
+ {
+ *r = fg_r;
+ *g = fg_g;
+--- 6087,6093 ----
+ void
+ term_get_fg_color(char_u *r, char_u *g, char_u *b)
+ {
+! if (rfg_status.tr_progress == STATUS_GOT)
+ {
+ *r = fg_r;
+ *g = fg_g;
+***************
+*** 6059,6065 ****
+ void
+ term_get_bg_color(char_u *r, char_u *g, char_u *b)
+ {
+! if (rbg_status == STATUS_GOT)
+ {
+ *r = bg_r;
+ *g = bg_g;
+--- 6101,6107 ----
+ void
+ term_get_bg_color(char_u *r, char_u *g, char_u *b)
+ {
+! if (rbg_status.tr_progress == STATUS_GOT)
+ {
+ *r = bg_r;
+ *g = bg_g;
+*** ../vim-8.1.1314/src/version.c 2019-05-10 21:38:50.037438773 +0200
+--- src/version.c 2019-05-10 23:03:34.393608039 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1315,
+ /**/
+
+--
+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.1316 b/data/vim/patches/8.1.1316
new file mode 100644
index 000000000..dcd913252
--- /dev/null
+++ b/data/vim/patches/8.1.1316
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1316
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1316
+Problem: Duplicated localtime() call.
+Solution: Delete one.
+Files: src/undo.c
+
+
+*** ../vim-8.1.1315/src/undo.c 2019-05-10 21:28:35.184612974 +0200
+--- src/undo.c 2019-05-11 13:08:17.411847703 +0200
+***************
+*** 3117,3123 ****
+
+ if (vim_time() - tt >= 100)
+ {
+- curtime = localtime(&tt);
+ # ifdef HAVE_LOCALTIME_R
+ curtime = localtime_r(&tt, &tmval);
+ # else
+--- 3117,3122 ----
+*** ../vim-8.1.1315/src/version.c 2019-05-10 23:10:25.712517739 +0200
+--- src/version.c 2019-05-11 13:08:57.847621678 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1316,
+ /**/
+
+--
+I am always surprised in the Linux world how quickly solutions can be
+obtained. (Imagine sending an email to Bill Gates, asking why Windows
+crashed, and how to fix it... and then getting an answer that fixed the
+problem... <0>_<0> !) -- Mark Langdon
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1317 b/data/vim/patches/8.1.1317
new file mode 100644
index 000000000..fe436e148
--- /dev/null
+++ b/data/vim/patches/8.1.1317
@@ -0,0 +1,120 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1317
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1317
+Problem: Output from Travis can be improved.
+Solution: Add section headers. Handle errors better. (closes #4098)
+Files: .travis.yml, configure
+
+
+*** ../vim-8.1.1316/.travis.yml 2019-04-13 22:44:48.325154165 +0200
+--- .travis.yml 2019-05-11 14:31:35.947081575 +0200
+***************
+*** 130,135 ****
+--- 130,137 ----
+
+ script:
+ - NPROC=$(getconf _NPROCESSORS_ONLN)
++ - set -o errexit
++ - echo -e "\\033[33;1mConfiguring Vim\\033[0m" && echo -en "travis_fold:start:configure\\r\\033[0K"
+ - |
+ if [[ "${CHECK_AUTOCONF}" = "yes" ]] && [[ "${CC}" = "gcc" ]]; then
+ make -C src autoconf
+***************
+*** 138,150 ****
+ if [[ -n "${SHADOWOPT}" ]]; then
+ make -C src shadow
+ fi
+ - |
+! (
+! cd "${SRCDIR}" \
+! && ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
+! ) && if [[ "${BUILD}" = "yes" ]]; then
+ make ${SHADOWOPT} -j${NPROC}
+ fi
+ # Show Vim version and also if_xx versions.
+ - |
+ if [[ "${BUILD}" = "yes" ]]; then
+--- 140,156 ----
+ if [[ -n "${SHADOWOPT}" ]]; then
+ make -C src shadow
+ fi
++ # "./configure" changes its working directory into "$SRCDIR".
++ - ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
++ - echo -en "travis_fold:end:configure\\r\\033[0K"
++ - echo -e "\\033[33;1mBuilding Vim\\033[0m" && echo -en "travis_fold:start:build\\r\\033[0K"
+ - |
+! if [[ "${BUILD}" = "yes" ]]; then
+ make ${SHADOWOPT} -j${NPROC}
+ fi
++ - echo -en "travis_fold:end:build\\r\\033[0K"
++ - set +o errexit
++ - echo -e "\\033[33;1mTesting Vim\\033[0m" && echo -en "travis_fold:start:test\\r\\033[0K"
+ # Show Vim version and also if_xx versions.
+ - |
+ if [[ "${BUILD}" = "yes" ]]; then
+***************
+*** 154,165 ****
+ cat if_ver.txt
+ fi
+ - make ${SHADOWOPT} ${TEST}
+ - |
+ if [[ -n "${ASAN_OPTIONS}" ]]; then
+ while read log; do
+ asan_symbolize < "${log}"
+ done < <(find . -type f -name 'asan.*' -size +0)
+- [[ -z "${log}" ]] # exit 1 if there are ASAN logs
+ fi
+
+ after_success:
+--- 160,172 ----
+ cat if_ver.txt
+ fi
+ - make ${SHADOWOPT} ${TEST}
++ - echo -en "travis_fold:end:test\\r\\033[0K"
+ - |
+ if [[ -n "${ASAN_OPTIONS}" ]]; then
+ while read log; do
+ asan_symbolize < "${log}"
++ false # exit 1 if there are ASAN logs
+ done < <(find . -type f -name 'asan.*' -size +0)
+ fi
+
+ after_success:
+*** ../vim-8.1.1316/configure 2010-05-15 13:03:08.000000000 +0200
+--- configure 2019-05-11 14:31:35.947081575 +0200
+***************
+*** 3,6 ****
+ # This is just a stub for the Unix configure script, to provide support for
+ # doing "./configure" in the top Vim directory.
+
+! cd src && exec ./configure "$@"
+--- 3,6 ----
+ # This is just a stub for the Unix configure script, to provide support for
+ # doing "./configure" in the top Vim directory.
+
+! cd "${SRCDIR:-src}" && exec ./configure "$@"
+*** ../vim-8.1.1316/src/version.c 2019-05-11 13:09:39.131391135 +0200
+--- src/version.c 2019-05-11 14:33:55.150281541 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1317,
+ /**/
+
+--
+A M00se once bit my sister ...
+ "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.1318 b/data/vim/patches/8.1.1318
new file mode 100644
index 000000000..6a788947b
--- /dev/null
+++ b/data/vim/patches/8.1.1318
@@ -0,0 +1,4962 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1318
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1318
+Problem: Code for text changes is in a "misc" file.
+Solution: Move the code to change.c.
+Files: src/misc1.c, src/proto/misc1.pro, src/change.c,
+ src/proto/change.pro, src/proto.h, src/memline.c, Filelist,
+ src/Make_cyg_ming.mak, src/Make_dice.mak, src/Make_manx.mak,
+ src/Make_morph.mak, src/Make_mvc.mak, src/Make_sas.mak,
+ src/Make_vms.mms, src/Makefile, src/README.md
+
+
+*** ../vim-8.1.1317/src/misc1.c 2019-05-09 15:12:45.172723940 +0200
+--- src/misc1.c 2019-05-11 16:57:09.876376738 +0200
+***************
+*** 447,597 ****
+ }
+
+ /*
+- * Copy the indent from ptr to the current line (and fill to size)
+- * Leaves the cursor on the first non-blank in the line.
+- * Returns TRUE if the line was changed.
+- */
+- static int
+- copy_indent(int size, char_u *src)
+- {
+- char_u *p = NULL;
+- char_u *line = NULL;
+- char_u *s;
+- int todo;
+- int ind_len;
+- int line_len = 0;
+- int tab_pad;
+- int ind_done;
+- int round;
+- #ifdef FEAT_VARTABS
+- int ind_col;
+- #endif
+-
+- /* Round 1: compute the number of characters needed for the indent
+- * Round 2: copy the characters. */
+- for (round = 1; round <= 2; ++round)
+- {
+- todo = size;
+- ind_len = 0;
+- ind_done = 0;
+- #ifdef FEAT_VARTABS
+- ind_col = 0;
+- #endif
+- s = src;
+-
+- /* Count/copy the usable portion of the source line */
+- while (todo > 0 && VIM_ISWHITE(*s))
+- {
+- if (*s == TAB)
+- {
+- #ifdef FEAT_VARTABS
+- tab_pad = tabstop_padding(ind_done, curbuf->b_p_ts,
+- curbuf->b_p_vts_array);
+- #else
+- tab_pad = (int)curbuf->b_p_ts
+- - (ind_done % (int)curbuf->b_p_ts);
+- #endif
+- /* Stop if this tab will overshoot the target */
+- if (todo < tab_pad)
+- break;
+- todo -= tab_pad;
+- ind_done += tab_pad;
+- #ifdef FEAT_VARTABS
+- ind_col += tab_pad;
+- #endif
+- }
+- else
+- {
+- --todo;
+- ++ind_done;
+- #ifdef FEAT_VARTABS
+- ++ind_col;
+- #endif
+- }
+- ++ind_len;
+- if (p != NULL)
+- *p++ = *s;
+- ++s;
+- }
+-
+- /* Fill to next tabstop with a tab, if possible */
+- #ifdef FEAT_VARTABS
+- tab_pad = tabstop_padding(ind_done, curbuf->b_p_ts,
+- curbuf->b_p_vts_array);
+- #else
+- tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts);
+- #endif
+- if (todo >= tab_pad && !curbuf->b_p_et)
+- {
+- todo -= tab_pad;
+- ++ind_len;
+- #ifdef FEAT_VARTABS
+- ind_col += tab_pad;
+- #endif
+- if (p != NULL)
+- *p++ = TAB;
+- }
+-
+- /* Add tabs required for indent */
+- if (!curbuf->b_p_et)
+- {
+- #ifdef FEAT_VARTABS
+- for (;;)
+- {
+- tab_pad = tabstop_padding(ind_col, curbuf->b_p_ts,
+- curbuf->b_p_vts_array);
+- if (todo < tab_pad)
+- break;
+- todo -= tab_pad;
+- ++ind_len;
+- ind_col += tab_pad;
+- if (p != NULL)
+- *p++ = TAB;
+- }
+- #else
+- while (todo >= (int)curbuf->b_p_ts)
+- {
+- todo -= (int)curbuf->b_p_ts;
+- ++ind_len;
+- if (p != NULL)
+- *p++ = TAB;
+- }
+- #endif
+- }
+-
+- /* Count/add spaces required for indent */
+- while (todo > 0)
+- {
+- --todo;
+- ++ind_len;
+- if (p != NULL)
+- *p++ = ' ';
+- }
+-
+- if (p == NULL)
+- {
+- /* Allocate memory for the result: the copied indent, new indent
+- * and the rest of the line. */
+- line_len = (int)STRLEN(ml_get_curline()) + 1;
+- line = alloc(ind_len + line_len);
+- if (line == NULL)
+- return FALSE;
+- p = line;
+- }
+- }
+-
+- /* Append the original line */
+- mch_memmove(p, ml_get_curline(), (size_t)line_len);
+-
+- /* Replace the line */
+- ml_replace(curwin->w_cursor.lnum, line, FALSE);
+-
+- /* Put the cursor after the indent. */
+- curwin->w_cursor.col = ind_len;
+- return TRUE;
+- }
+-
+- /*
+ * Return the indent of the current line after a number. Return -1 if no
+ * number was found. Used for 'n' in 'formatoptions': numbered list.
+ * Since a pattern is used it can actually handle more than numbers.
+--- 447,452 ----
+***************
+*** 704,1763 ****
+ }
+ #endif
+
+-
+- /*
+- * open_line: Add a new line below or above the current line.
+- *
+- * For VREPLACE mode, we only add a new line when we get to the end of the
+- * file, otherwise we just start replacing the next line.
+- *
+- * Caller must take care of undo. Since VREPLACE may affect any number of
+- * lines however, it may call u_save_cursor() again when starting to change a
+- * new line.
+- * "flags": OPENLINE_DELSPACES delete spaces after cursor
+- * OPENLINE_DO_COM format comments
+- * OPENLINE_KEEPTRAIL keep trailing spaces
+- * OPENLINE_MARKFIX adjust mark positions after the line break
+- * OPENLINE_COM_LIST format comments with list or 2nd line indent
+- *
+- * "second_line_indent": indent for after ^^D in Insert mode or if flag
+- * OPENLINE_COM_LIST
+- *
+- * Return OK for success, FAIL for failure
+- */
+- int
+- open_line(
+- int dir, /* FORWARD or BACKWARD */
+- int flags,
+- int second_line_indent)
+- {
+- char_u *saved_line; /* copy of the original line */
+- char_u *next_line = NULL; /* copy of the next line */
+- char_u *p_extra = NULL; /* what goes to next line */
+- int less_cols = 0; /* less columns for mark in new line */
+- int less_cols_off = 0; /* columns to skip for mark adjust */
+- pos_T old_cursor; /* old cursor position */
+- int newcol = 0; /* new cursor column */
+- int newindent = 0; /* auto-indent of the new line */
+- int n;
+- int trunc_line = FALSE; /* truncate current line afterwards */
+- int retval = FAIL; /* return value */
+- #ifdef FEAT_COMMENTS
+- int extra_len = 0; /* length of p_extra string */
+- int lead_len; /* length of comment leader */
+- char_u *lead_flags; /* position in 'comments' for comment leader */
+- char_u *leader = NULL; /* copy of comment leader */
+- #endif
+- char_u *allocated = NULL; /* allocated memory */
+- char_u *p;
+- int saved_char = NUL; /* init for GCC */
+- #if defined(FEAT_SMARTINDENT) || defined(FEAT_COMMENTS)
+- pos_T *pos;
+- #endif
+- #ifdef FEAT_SMARTINDENT
+- int do_si = (!p_paste && curbuf->b_p_si
+- # ifdef FEAT_CINDENT
+- && !curbuf->b_p_cin
+- # endif
+- # ifdef FEAT_EVAL
+- && *curbuf->b_p_inde == NUL
+- # endif
+- );
+- 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 */
+- int saved_pi = curbuf->b_p_pi; /* copy of preserveindent setting */
+-
+- /*
+- * make a copy of the current line so we can mess with it
+- */
+- saved_line = vim_strsave(ml_get_curline());
+- if (saved_line == NULL) /* out of memory! */
+- return FALSE;
+-
+- if (State & VREPLACE_FLAG)
+- {
+- /*
+- * With VREPLACE we make a copy of the next line, which we will be
+- * starting to replace. First make the new line empty and let vim play
+- * with the indenting and comment leader to its heart's content. Then
+- * we grab what it ended up putting on the new line, put back the
+- * original line, and call ins_char() to put each new character onto
+- * the line, replacing what was there before and pushing the right
+- * stuff onto the replace stack. -- webb.
+- */
+- if (curwin->w_cursor.lnum < orig_line_count)
+- next_line = vim_strsave(ml_get(curwin->w_cursor.lnum + 1));
+- else
+- next_line = vim_strsave((char_u *)"");
+- if (next_line == NULL) /* out of memory! */
+- goto theend;
+-
+- /*
+- * In VREPLACE mode, a NL replaces the rest of the line, and starts
+- * replacing the next line, so push all of the characters left on the
+- * line onto the replace stack. We'll push any other characters that
+- * might be replaced at the start of the next line (due to autoindent
+- * etc) a bit later.
+- */
+- replace_push(NUL); /* Call twice because BS over NL expects it */
+- replace_push(NUL);
+- p = saved_line + curwin->w_cursor.col;
+- while (*p != NUL)
+- {
+- if (has_mbyte)
+- p += replace_push_mb(p);
+- else
+- replace_push(*p++);
+- }
+- saved_line[curwin->w_cursor.col] = NUL;
+- }
+-
+- if ((State & INSERT) && !(State & VREPLACE_FLAG))
+- {
+- p_extra = saved_line + curwin->w_cursor.col;
+- #ifdef FEAT_SMARTINDENT
+- if (do_si) /* need first char after new line break */
+- {
+- p = skipwhite(p_extra);
+- first_char = *p;
+- }
+- #endif
+- #ifdef FEAT_COMMENTS
+- extra_len = (int)STRLEN(p_extra);
+- #endif
+- saved_char = *p_extra;
+- *p_extra = NUL;
+- }
+-
+- u_clearline(); /* cannot do "U" command when adding lines */
+- #ifdef FEAT_SMARTINDENT
+- did_si = FALSE;
+- #endif
+- ai_col = 0;
+-
+- /*
+- * If we just did an auto-indent, then we didn't type anything on
+- * the prior line, and it should be truncated. Do this even if 'ai' is not
+- * set because automatically inserting a comment leader also sets did_ai.
+- */
+- if (dir == FORWARD && did_ai)
+- trunc_line = TRUE;
+-
+- /*
+- * If 'autoindent' and/or 'smartindent' is set, try to figure out what
+- * indent to use for the new line.
+- */
+- if (curbuf->b_p_ai
+- #ifdef FEAT_SMARTINDENT
+- || do_si
+- #endif
+- )
+- {
+- /*
+- * count white space on current line
+- */
+- #ifdef FEAT_VARTABS
+- newindent = get_indent_str_vtab(saved_line, curbuf->b_p_ts,
+- curbuf->b_p_vts_array, FALSE);
+- #else
+- newindent = get_indent_str(saved_line, (int)curbuf->b_p_ts, FALSE);
+- #endif
+- if (newindent == 0 && !(flags & OPENLINE_COM_LIST))
+- newindent = second_line_indent; /* for ^^D command in insert mode */
+-
+- #ifdef FEAT_SMARTINDENT
+- /*
+- * Do smart indenting.
+- * In insert/replace mode (only when dir == FORWARD)
+- * we may move some text to the next line. If it starts with '{'
+- * don't add an indent. Fixes inserting a NL before '{' in line
+- * "if (condition) {"
+- */
+- if (!trunc_line && do_si && *saved_line != NUL
+- && (p_extra == NULL || first_char != '{'))
+- {
+- char_u *ptr;
+- char_u last_char;
+-
+- old_cursor = curwin->w_cursor;
+- ptr = saved_line;
+- # ifdef FEAT_COMMENTS
+- if (flags & OPENLINE_DO_COM)
+- lead_len = get_leader_len(ptr, NULL, FALSE, TRUE);
+- else
+- lead_len = 0;
+- # endif
+- if (dir == FORWARD)
+- {
+- /*
+- * Skip preprocessor directives, unless they are
+- * recognised as comments.
+- */
+- if (
+- # ifdef FEAT_COMMENTS
+- lead_len == 0 &&
+- # endif
+- ptr[0] == '#')
+- {
+- while (ptr[0] == '#' && curwin->w_cursor.lnum > 1)
+- ptr = ml_get(--curwin->w_cursor.lnum);
+- newindent = get_indent();
+- }
+- # ifdef FEAT_COMMENTS
+- if (flags & OPENLINE_DO_COM)
+- lead_len = get_leader_len(ptr, NULL, FALSE, TRUE);
+- else
+- lead_len = 0;
+- if (lead_len > 0)
+- {
+- /*
+- * This case gets the following right:
+- * \*
+- * * A comment (read '\' as '/').
+- * *\
+- * #define IN_THE_WAY
+- * This should line up here;
+- */
+- p = skipwhite(ptr);
+- if (p[0] == '/' && p[1] == '*')
+- p++;
+- if (p[0] == '*')
+- {
+- for (p++; *p; p++)
+- {
+- if (p[0] == '/' && p[-1] == '*')
+- {
+- /*
+- * End of C comment, indent should line up
+- * with the line containing the start of
+- * the comment
+- */
+- curwin->w_cursor.col = (colnr_T)(p - ptr);
+- if ((pos = findmatch(NULL, NUL)) != NULL)
+- {
+- curwin->w_cursor.lnum = pos->lnum;
+- newindent = get_indent();
+- }
+- }
+- }
+- }
+- }
+- else /* Not a comment line */
+- # endif
+- {
+- /* Find last non-blank in line */
+- p = ptr + STRLEN(ptr) - 1;
+- while (p > ptr && VIM_ISWHITE(*p))
+- --p;
+- last_char = *p;
+-
+- /*
+- * find the character just before the '{' or ';'
+- */
+- if (last_char == '{' || last_char == ';')
+- {
+- if (p > ptr)
+- --p;
+- while (p > ptr && VIM_ISWHITE(*p))
+- --p;
+- }
+- /*
+- * Try to catch lines that are split over multiple
+- * lines. eg:
+- * if (condition &&
+- * condition) {
+- * Should line up here!
+- * }
+- */
+- if (*p == ')')
+- {
+- curwin->w_cursor.col = (colnr_T)(p - ptr);
+- if ((pos = findmatch(NULL, '(')) != NULL)
+- {
+- curwin->w_cursor.lnum = pos->lnum;
+- newindent = get_indent();
+- ptr = ml_get_curline();
+- }
+- }
+- /*
+- * If last character is '{' do indent, without
+- * checking for "if" and the like.
+- */
+- if (last_char == '{')
+- {
+- did_si = TRUE; /* do indent */
+- no_si = TRUE; /* don't delete it when '{' typed */
+- }
+- /*
+- * Look for "if" and the like, use 'cinwords'.
+- * Don't do this if the previous line ended in ';' or
+- * '}'.
+- */
+- else if (last_char != ';' && last_char != '}'
+- && cin_is_cinword(ptr))
+- did_si = TRUE;
+- }
+- }
+- else /* dir == BACKWARD */
+- {
+- /*
+- * Skip preprocessor directives, unless they are
+- * recognised as comments.
+- */
+- if (
+- # ifdef FEAT_COMMENTS
+- lead_len == 0 &&
+- # endif
+- ptr[0] == '#')
+- {
+- int was_backslashed = FALSE;
+-
+- while ((ptr[0] == '#' || was_backslashed) &&
+- curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
+- {
+- if (*ptr && ptr[STRLEN(ptr) - 1] == '\\')
+- was_backslashed = TRUE;
+- else
+- was_backslashed = FALSE;
+- ptr = ml_get(++curwin->w_cursor.lnum);
+- }
+- if (was_backslashed)
+- newindent = 0; /* Got to end of file */
+- else
+- newindent = get_indent();
+- }
+- p = skipwhite(ptr);
+- if (*p == '}') /* if line starts with '}': do indent */
+- did_si = TRUE;
+- else /* can delete indent when '{' typed */
+- can_si_back = TRUE;
+- }
+- curwin->w_cursor = old_cursor;
+- }
+- if (do_si)
+- can_si = TRUE;
+- #endif /* FEAT_SMARTINDENT */
+-
+- did_ai = TRUE;
+- }
+-
+- #ifdef FEAT_COMMENTS
+- /*
+- * Find out if the current line starts with a comment leader.
+- * This may then be inserted in front of the new line.
+- */
+- end_comment_pending = NUL;
+- if (flags & OPENLINE_DO_COM)
+- lead_len = get_leader_len(saved_line, &lead_flags, dir == BACKWARD, TRUE);
+- else
+- lead_len = 0;
+- if (lead_len > 0)
+- {
+- char_u *lead_repl = NULL; /* replaces comment leader */
+- int lead_repl_len = 0; /* length of *lead_repl */
+- char_u lead_middle[COM_MAX_LEN]; /* middle-comment string */
+- char_u lead_end[COM_MAX_LEN]; /* end-comment string */
+- char_u *comment_end = NULL; /* where lead_end has been found */
+- int extra_space = FALSE; /* append extra space */
+- int current_flag;
+- int require_blank = FALSE; /* requires blank after middle */
+- char_u *p2;
+-
+- /*
+- * If the comment leader has the start, middle or end flag, it may not
+- * be used or may be replaced with the middle leader.
+- */
+- for (p = lead_flags; *p && *p != ':'; ++p)
+- {
+- if (*p == COM_BLANK)
+- {
+- require_blank = TRUE;
+- continue;
+- }
+- if (*p == COM_START || *p == COM_MIDDLE)
+- {
+- current_flag = *p;
+- if (*p == COM_START)
+- {
+- /*
+- * Doing "O" on a start of comment does not insert leader.
+- */
+- if (dir == BACKWARD)
+- {
+- lead_len = 0;
+- break;
+- }
+-
+- /* find start of middle part */
+- (void)copy_option_part(&p, lead_middle, COM_MAX_LEN, ",");
+- require_blank = FALSE;
+- }
+-
+- /*
+- * Isolate the strings of the middle and end leader.
+- */
+- while (*p && p[-1] != ':') /* find end of middle flags */
+- {
+- if (*p == COM_BLANK)
+- require_blank = TRUE;
+- ++p;
+- }
+- (void)copy_option_part(&p, lead_middle, COM_MAX_LEN, ",");
+-
+- while (*p && p[-1] != ':') /* find end of end flags */
+- {
+- /* Check whether we allow automatic ending of comments */
+- if (*p == COM_AUTO_END)
+- end_comment_pending = -1; /* means we want to set it */
+- ++p;
+- }
+- n = copy_option_part(&p, lead_end, COM_MAX_LEN, ",");
+-
+- if (end_comment_pending == -1) /* we can set it now */
+- end_comment_pending = lead_end[n - 1];
+-
+- /*
+- * If the end of the comment is in the same line, don't use
+- * the comment leader.
+- */
+- if (dir == FORWARD)
+- {
+- for (p = saved_line + lead_len; *p; ++p)
+- if (STRNCMP(p, lead_end, n) == 0)
+- {
+- comment_end = p;
+- lead_len = 0;
+- break;
+- }
+- }
+-
+- /*
+- * Doing "o" on a start of comment inserts the middle leader.
+- */
+- if (lead_len > 0)
+- {
+- if (current_flag == COM_START)
+- {
+- lead_repl = lead_middle;
+- lead_repl_len = (int)STRLEN(lead_middle);
+- }
+-
+- /*
+- * If we have hit RETURN immediately after the start
+- * comment leader, then put a space after the middle
+- * comment leader on the next line.
+- */
+- if (!VIM_ISWHITE(saved_line[lead_len - 1])
+- && ((p_extra != NULL
+- && (int)curwin->w_cursor.col == lead_len)
+- || (p_extra == NULL
+- && saved_line[lead_len] == NUL)
+- || require_blank))
+- extra_space = TRUE;
+- }
+- break;
+- }
+- if (*p == COM_END)
+- {
+- /*
+- * Doing "o" on the end of a comment does not insert leader.
+- * Remember where the end is, might want to use it to find the
+- * start (for C-comments).
+- */
+- if (dir == FORWARD)
+- {
+- comment_end = skipwhite(saved_line);
+- lead_len = 0;
+- break;
+- }
+-
+- /*
+- * Doing "O" on the end of a comment inserts the middle leader.
+- * Find the string for the middle leader, searching backwards.
+- */
+- while (p > curbuf->b_p_com && *p != ',')
+- --p;
+- for (lead_repl = p; lead_repl > curbuf->b_p_com
+- && lead_repl[-1] != ':'; --lead_repl)
+- ;
+- lead_repl_len = (int)(p - lead_repl);
+-
+- /* We can probably always add an extra space when doing "O" on
+- * the comment-end */
+- extra_space = TRUE;
+-
+- /* Check whether we allow automatic ending of comments */
+- for (p2 = p; *p2 && *p2 != ':'; p2++)
+- {
+- if (*p2 == COM_AUTO_END)
+- end_comment_pending = -1; /* means we want to set it */
+- }
+- if (end_comment_pending == -1)
+- {
+- /* Find last character in end-comment string */
+- while (*p2 && *p2 != ',')
+- p2++;
+- end_comment_pending = p2[-1];
+- }
+- break;
+- }
+- if (*p == COM_FIRST)
+- {
+- /*
+- * Comment leader for first line only: Don't repeat leader
+- * when using "O", blank out leader when using "o".
+- */
+- if (dir == BACKWARD)
+- lead_len = 0;
+- else
+- {
+- lead_repl = (char_u *)"";
+- lead_repl_len = 0;
+- }
+- break;
+- }
+- }
+- if (lead_len)
+- {
+- /* allocate buffer (may concatenate p_extra later) */
+- leader = alloc(lead_len + lead_repl_len + extra_space + extra_len
+- + (second_line_indent > 0 ? second_line_indent : 0) + 1);
+- allocated = leader; /* remember to free it later */
+-
+- if (leader == NULL)
+- lead_len = 0;
+- else
+- {
+- vim_strncpy(leader, saved_line, lead_len);
+-
+- /*
+- * Replace leader with lead_repl, right or left adjusted
+- */
+- if (lead_repl != NULL)
+- {
+- int c = 0;
+- int off = 0;
+-
+- for (p = lead_flags; *p != NUL && *p != ':'; )
+- {
+- if (*p == COM_RIGHT || *p == COM_LEFT)
+- c = *p++;
+- else if (VIM_ISDIGIT(*p) || *p == '-')
+- off = getdigits(&p);
+- else
+- ++p;
+- }
+- if (c == COM_RIGHT) /* right adjusted leader */
+- {
+- /* find last non-white in the leader to line up with */
+- for (p = leader + lead_len - 1; p > leader
+- && VIM_ISWHITE(*p); --p)
+- ;
+- ++p;
+-
+- /* Compute the length of the replaced characters in
+- * screen characters, not bytes. */
+- {
+- int repl_size = vim_strnsize(lead_repl,
+- lead_repl_len);
+- int old_size = 0;
+- char_u *endp = p;
+- int l;
+-
+- while (old_size < repl_size && p > leader)
+- {
+- MB_PTR_BACK(leader, p);
+- old_size += ptr2cells(p);
+- }
+- l = lead_repl_len - (int)(endp - p);
+- if (l != 0)
+- mch_memmove(endp + l, endp,
+- (size_t)((leader + lead_len) - endp));
+- lead_len += l;
+- }
+- mch_memmove(p, lead_repl, (size_t)lead_repl_len);
+- if (p + lead_repl_len > leader + lead_len)
+- p[lead_repl_len] = NUL;
+-
+- /* blank-out any other chars from the old leader. */
+- while (--p >= leader)
+- {
+- int l = mb_head_off(leader, p);
+-
+- if (l > 1)
+- {
+- p -= l;
+- if (ptr2cells(p) > 1)
+- {
+- p[1] = ' ';
+- --l;
+- }
+- mch_memmove(p + 1, p + l + 1,
+- (size_t)((leader + lead_len) - (p + l + 1)));
+- lead_len -= l;
+- *p = ' ';
+- }
+- else if (!VIM_ISWHITE(*p))
+- *p = ' ';
+- }
+- }
+- else /* left adjusted leader */
+- {
+- p = skipwhite(leader);
+-
+- /* Compute the length of the replaced characters in
+- * screen characters, not bytes. Move the part that is
+- * not to be overwritten. */
+- {
+- int repl_size = vim_strnsize(lead_repl,
+- lead_repl_len);
+- int i;
+- int l;
+-
+- for (i = 0; i < lead_len && p[i] != NUL; i += l)
+- {
+- l = (*mb_ptr2len)(p + i);
+- if (vim_strnsize(p, i + l) > repl_size)
+- break;
+- }
+- if (i != lead_repl_len)
+- {
+- mch_memmove(p + lead_repl_len, p + i,
+- (size_t)(lead_len - i - (p - leader)));
+- lead_len += lead_repl_len - i;
+- }
+- }
+- mch_memmove(p, lead_repl, (size_t)lead_repl_len);
+-
+- /* Replace any remaining non-white chars in the old
+- * leader by spaces. Keep Tabs, the indent must
+- * remain the same. */
+- for (p += lead_repl_len; p < leader + lead_len; ++p)
+- if (!VIM_ISWHITE(*p))
+- {
+- /* Don't put a space before a TAB. */
+- if (p + 1 < leader + lead_len && p[1] == TAB)
+- {
+- --lead_len;
+- mch_memmove(p, p + 1,
+- (leader + lead_len) - p);
+- }
+- else
+- {
+- int l = (*mb_ptr2len)(p);
+-
+- if (l > 1)
+- {
+- if (ptr2cells(p) > 1)
+- {
+- /* Replace a double-wide char with
+- * two spaces */
+- --l;
+- *p++ = ' ';
+- }
+- mch_memmove(p + 1, p + l,
+- (leader + lead_len) - p);
+- lead_len -= l - 1;
+- }
+- *p = ' ';
+- }
+- }
+- *p = NUL;
+- }
+-
+- /* Recompute the indent, it may have changed. */
+- if (curbuf->b_p_ai
+- #ifdef FEAT_SMARTINDENT
+- || do_si
+- #endif
+- )
+- #ifdef FEAT_VARTABS
+- newindent = get_indent_str_vtab(leader, curbuf->b_p_ts,
+- curbuf->b_p_vts_array, FALSE);
+- #else
+- newindent = get_indent_str(leader,
+- (int)curbuf->b_p_ts, FALSE);
+- #endif
+-
+- /* Add the indent offset */
+- if (newindent + off < 0)
+- {
+- off = -newindent;
+- newindent = 0;
+- }
+- else
+- newindent += off;
+-
+- /* Correct trailing spaces for the shift, so that
+- * alignment remains equal. */
+- while (off > 0 && lead_len > 0
+- && leader[lead_len - 1] == ' ')
+- {
+- /* Don't do it when there is a tab before the space */
+- if (vim_strchr(skipwhite(leader), '\t') != NULL)
+- break;
+- --lead_len;
+- --off;
+- }
+-
+- /* If the leader ends in white space, don't add an
+- * extra space */
+- if (lead_len > 0 && VIM_ISWHITE(leader[lead_len - 1]))
+- extra_space = FALSE;
+- leader[lead_len] = NUL;
+- }
+-
+- if (extra_space)
+- {
+- leader[lead_len++] = ' ';
+- leader[lead_len] = NUL;
+- }
+-
+- newcol = lead_len;
+-
+- /*
+- * if a new indent will be set below, remove the indent that
+- * is in the comment leader
+- */
+- if (newindent
+- #ifdef FEAT_SMARTINDENT
+- || did_si
+- #endif
+- )
+- {
+- while (lead_len && VIM_ISWHITE(*leader))
+- {
+- --lead_len;
+- --newcol;
+- ++leader;
+- }
+- }
+-
+- }
+- #ifdef FEAT_SMARTINDENT
+- did_si = can_si = FALSE;
+- #endif
+- }
+- else if (comment_end != NULL)
+- {
+- /*
+- * We have finished a comment, so we don't use the leader.
+- * If this was a C-comment and 'ai' or 'si' is set do a normal
+- * indent to align with the line containing the start of the
+- * comment.
+- */
+- if (comment_end[0] == '*' && comment_end[1] == '/' &&
+- (curbuf->b_p_ai
+- #ifdef FEAT_SMARTINDENT
+- || do_si
+- #endif
+- ))
+- {
+- old_cursor = curwin->w_cursor;
+- curwin->w_cursor.col = (colnr_T)(comment_end - saved_line);
+- if ((pos = findmatch(NULL, NUL)) != NULL)
+- {
+- curwin->w_cursor.lnum = pos->lnum;
+- newindent = get_indent();
+- }
+- curwin->w_cursor = old_cursor;
+- }
+- }
+- }
+- #endif
+-
+- /* (State == INSERT || State == REPLACE), only when dir == FORWARD */
+- if (p_extra != NULL)
+- {
+- *p_extra = saved_char; /* restore char that NUL replaced */
+-
+- /*
+- * When 'ai' set or "flags" has OPENLINE_DELSPACES, skip to the first
+- * non-blank.
+- *
+- * When in REPLACE mode, put the deleted blanks on the replace stack,
+- * preceded by a NUL, so they can be put back when a BS is entered.
+- */
+- if (REPLACE_NORMAL(State))
+- replace_push(NUL); /* end of extra blanks */
+- if (curbuf->b_p_ai || (flags & OPENLINE_DELSPACES))
+- {
+- while ((*p_extra == ' ' || *p_extra == '\t')
+- && (!enc_utf8
+- || !utf_iscomposing(utf_ptr2char(p_extra + 1))))
+- {
+- if (REPLACE_NORMAL(State))
+- replace_push(*p_extra);
+- ++p_extra;
+- ++less_cols_off;
+- }
+- }
+-
+- /* columns for marks adjusted for removed columns */
+- less_cols = (int)(p_extra - saved_line);
+- }
+-
+- if (p_extra == NULL)
+- p_extra = (char_u *)""; /* append empty line */
+-
+- #ifdef FEAT_COMMENTS
+- /* concatenate leader and p_extra, if there is a leader */
+- if (lead_len)
+- {
+- if (flags & OPENLINE_COM_LIST && second_line_indent > 0)
+- {
+- int i;
+- int padding = second_line_indent
+- - (newindent + (int)STRLEN(leader));
+-
+- /* Here whitespace is inserted after the comment char.
+- * Below, set_indent(newindent, SIN_INSERT) will insert the
+- * whitespace needed before the comment char. */
+- for (i = 0; i < padding; i++)
+- {
+- STRCAT(leader, " ");
+- less_cols--;
+- newcol++;
+- }
+- }
+- STRCAT(leader, p_extra);
+- p_extra = leader;
+- did_ai = TRUE; /* So truncating blanks works with comments */
+- less_cols -= lead_len;
+- }
+- else
+- end_comment_pending = NUL; /* turns out there was no leader */
+- #endif
+-
+- old_cursor = curwin->w_cursor;
+- if (dir == BACKWARD)
+- --curwin->w_cursor.lnum;
+- if (!(State & VREPLACE_FLAG) || old_cursor.lnum >= orig_line_count)
+- {
+- if (ml_append(curwin->w_cursor.lnum, p_extra, (colnr_T)0, FALSE)
+- == FAIL)
+- goto theend;
+- /* Postpone calling changed_lines(), because it would mess up folding
+- * with markers.
+- * Skip mark_adjust when adding a line after the last one, there can't
+- * be marks there. But still needed in diff mode. */
+- if (curwin->w_cursor.lnum + 1 < curbuf->b_ml.ml_line_count
+- #ifdef FEAT_DIFF
+- || curwin->w_p_diff
+- #endif
+- )
+- mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
+- did_append = TRUE;
+- }
+- else
+- {
+- /*
+- * In VREPLACE mode we are starting to replace the next line.
+- */
+- curwin->w_cursor.lnum++;
+- if (curwin->w_cursor.lnum >= Insstart.lnum + vr_lines_changed)
+- {
+- /* In case we NL to a new line, BS to the previous one, and NL
+- * again, we don't want to save the new line for undo twice.
+- */
+- (void)u_save_cursor(); /* errors are ignored! */
+- vr_lines_changed++;
+- }
+- ml_replace(curwin->w_cursor.lnum, p_extra, TRUE);
+- changed_bytes(curwin->w_cursor.lnum, 0);
+- curwin->w_cursor.lnum--;
+- did_append = FALSE;
+- }
+-
+- if (newindent
+- #ifdef FEAT_SMARTINDENT
+- || did_si
+- #endif
+- )
+- {
+- ++curwin->w_cursor.lnum;
+- #ifdef FEAT_SMARTINDENT
+- if (did_si)
+- {
+- int sw = (int)get_sw_value(curbuf);
+-
+- if (p_sr)
+- newindent -= newindent % sw;
+- newindent += sw;
+- }
+- #endif
+- /* Copy the indent */
+- if (curbuf->b_p_ci)
+- {
+- (void)copy_indent(newindent, saved_line);
+-
+- /*
+- * Set the 'preserveindent' option so that any further screwing
+- * with the line doesn't entirely destroy our efforts to preserve
+- * it. It gets restored at the function end.
+- */
+- curbuf->b_p_pi = TRUE;
+- }
+- else
+- (void)set_indent(newindent, SIN_INSERT);
+- less_cols -= curwin->w_cursor.col;
+-
+- ai_col = curwin->w_cursor.col;
+-
+- /*
+- * In REPLACE mode, for each character in the new indent, there must
+- * be a NUL on the replace stack, for when it is deleted with BS
+- */
+- if (REPLACE_NORMAL(State))
+- for (n = 0; n < (int)curwin->w_cursor.col; ++n)
+- replace_push(NUL);
+- newcol += curwin->w_cursor.col;
+- #ifdef FEAT_SMARTINDENT
+- if (no_si)
+- did_si = FALSE;
+- #endif
+- }
+-
+- #ifdef FEAT_COMMENTS
+- /*
+- * In REPLACE mode, for each character in the extra leader, there must be
+- * a NUL on the replace stack, for when it is deleted with BS.
+- */
+- if (REPLACE_NORMAL(State))
+- while (lead_len-- > 0)
+- replace_push(NUL);
+- #endif
+-
+- curwin->w_cursor = old_cursor;
+-
+- if (dir == FORWARD)
+- {
+- if (trunc_line || (State & INSERT))
+- {
+- /* truncate current line at cursor */
+- saved_line[curwin->w_cursor.col] = NUL;
+- /* Remove trailing white space, unless OPENLINE_KEEPTRAIL used. */
+- if (trunc_line && !(flags & OPENLINE_KEEPTRAIL))
+- truncate_spaces(saved_line);
+- ml_replace(curwin->w_cursor.lnum, saved_line, FALSE);
+- saved_line = NULL;
+- if (did_append)
+- {
+- changed_lines(curwin->w_cursor.lnum, curwin->w_cursor.col,
+- curwin->w_cursor.lnum + 1, 1L);
+- did_append = FALSE;
+-
+- /* Move marks after the line break to the new line. */
+- if (flags & OPENLINE_MARKFIX)
+- mark_col_adjust(curwin->w_cursor.lnum,
+- curwin->w_cursor.col + less_cols_off,
+- 1L, (long)-less_cols, 0);
+- }
+- else
+- changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
+- }
+-
+- /*
+- * Put the cursor on the new line. Careful: the scrollup() above may
+- * have moved w_cursor, we must use old_cursor.
+- */
+- curwin->w_cursor.lnum = old_cursor.lnum + 1;
+- }
+- if (did_append)
+- changed_lines(curwin->w_cursor.lnum, 0, curwin->w_cursor.lnum, 1L);
+-
+- curwin->w_cursor.col = newcol;
+- curwin->w_cursor.coladd = 0;
+-
+- #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
+- * normal INSERT mode.
+- */
+- if (State & VREPLACE_FLAG)
+- {
+- vreplace_mode = State; /* So we know to put things right later */
+- State = INSERT;
+- }
+- else
+- vreplace_mode = 0;
+- #endif
+- #ifdef FEAT_LISP
+- /*
+- * May do lisp indenting.
+- */
+- if (!p_paste
+- # ifdef FEAT_COMMENTS
+- && leader == NULL
+- # endif
+- && curbuf->b_p_lisp
+- && curbuf->b_p_ai)
+- {
+- fixthisline(get_lisp_indent);
+- ai_col = (colnr_T)getwhitecols_curline();
+- }
+- #endif
+- #ifdef FEAT_CINDENT
+- /*
+- * May do indenting after opening a new line.
+- */
+- if (!p_paste
+- && (curbuf->b_p_cin
+- # ifdef FEAT_EVAL
+- || *curbuf->b_p_inde != NUL
+- # endif
+- )
+- && in_cinkeys(dir == FORWARD
+- ? KEY_OPEN_FORW
+- : KEY_OPEN_BACK, ' ', linewhite(curwin->w_cursor.lnum)))
+- {
+- do_c_expr_indent();
+- 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
+- * onto the replace stack (via ins_char()).
+- */
+- if (State & VREPLACE_FLAG)
+- {
+- /* Put new line in p_extra */
+- p_extra = vim_strsave(ml_get_curline());
+- if (p_extra == NULL)
+- goto theend;
+-
+- /* Put back original line */
+- ml_replace(curwin->w_cursor.lnum, next_line, FALSE);
+-
+- /* Insert new stuff into line again */
+- curwin->w_cursor.col = 0;
+- curwin->w_cursor.coladd = 0;
+- ins_bytes(p_extra); /* will call changed_bytes() */
+- vim_free(p_extra);
+- next_line = NULL;
+- }
+-
+- retval = OK; /* success! */
+- theend:
+- curbuf->b_p_pi = saved_pi;
+- vim_free(saved_line);
+- vim_free(next_line);
+- vim_free(allocated);
+- return retval;
+- }
+-
+ #if defined(FEAT_COMMENTS) || defined(PROTO)
+ /*
+ * get_leader_len() returns the length in bytes of the prefix of the given
+--- 559,564 ----
+***************
+*** 2242,2728 ****
+ return (count);
+ }
+
+- /*
+- * Insert string "p" at the cursor position. Stops at a NUL byte.
+- * Handles Replace mode and multi-byte characters.
+- */
+- void
+- ins_bytes(char_u *p)
+- {
+- ins_bytes_len(p, (int)STRLEN(p));
+- }
+-
+- /*
+- * Insert string "p" with length "len" at the cursor position.
+- * Handles Replace mode and multi-byte characters.
+- */
+- void
+- ins_bytes_len(char_u *p, int len)
+- {
+- int i;
+- int n;
+-
+- if (has_mbyte)
+- for (i = 0; i < len; i += n)
+- {
+- if (enc_utf8)
+- // avoid reading past p[len]
+- n = utfc_ptr2len_len(p + i, len - i);
+- else
+- n = (*mb_ptr2len)(p + i);
+- ins_char_bytes(p + i, n);
+- }
+- else
+- for (i = 0; i < len; ++i)
+- ins_char(p[i]);
+- }
+-
+- /*
+- * Insert or replace a single character at the cursor position.
+- * When in REPLACE or VREPLACE mode, replace any existing character.
+- * Caller must have prepared for undo.
+- * For multi-byte characters we get the whole character, the caller must
+- * convert bytes to a character.
+- */
+- void
+- ins_char(int c)
+- {
+- char_u buf[MB_MAXBYTES + 1];
+- int n = (*mb_char2bytes)(c, buf);
+-
+- /* When "c" is 0x100, 0x200, etc. we don't want to insert a NUL byte.
+- * Happens for CTRL-Vu9900. */
+- if (buf[0] == 0)
+- buf[0] = '\n';
+-
+- ins_char_bytes(buf, n);
+- }
+-
+- void
+- ins_char_bytes(char_u *buf, int charlen)
+- {
+- int c = buf[0];
+- int newlen; // nr of bytes inserted
+- int oldlen; // nr of bytes deleted (0 when not replacing)
+- char_u *p;
+- char_u *newp;
+- char_u *oldp;
+- int linelen; // length of old line including NUL
+- colnr_T col;
+- linenr_T lnum = curwin->w_cursor.lnum;
+- int i;
+-
+- /* Break tabs if needed. */
+- if (virtual_active() && curwin->w_cursor.coladd > 0)
+- coladvance_force(getviscol());
+-
+- col = curwin->w_cursor.col;
+- oldp = ml_get(lnum);
+- linelen = (int)STRLEN(oldp) + 1;
+-
+- /* The lengths default to the values for when not replacing. */
+- oldlen = 0;
+- newlen = charlen;
+-
+- if (State & REPLACE_FLAG)
+- {
+- if (State & VREPLACE_FLAG)
+- {
+- colnr_T new_vcol = 0; /* init for GCC */
+- colnr_T vcol;
+- int old_list;
+-
+- /*
+- * Disable 'list' temporarily, unless 'cpo' contains the 'L' flag.
+- * Returns the old value of list, so when finished,
+- * curwin->w_p_list should be set back to this.
+- */
+- old_list = curwin->w_p_list;
+- if (old_list && vim_strchr(p_cpo, CPO_LISTWM) == NULL)
+- curwin->w_p_list = FALSE;
+-
+- /*
+- * In virtual replace mode each character may replace one or more
+- * characters (zero if it's a TAB). Count the number of bytes to
+- * be deleted to make room for the new character, counting screen
+- * cells. May result in adding spaces to fill a gap.
+- */
+- getvcol(curwin, &curwin->w_cursor, NULL, &vcol, NULL);
+- new_vcol = vcol + chartabsize(buf, vcol);
+- while (oldp[col + oldlen] != NUL && vcol < new_vcol)
+- {
+- vcol += chartabsize(oldp + col + oldlen, vcol);
+- /* Don't need to remove a TAB that takes us to the right
+- * position. */
+- if (vcol > new_vcol && oldp[col + oldlen] == TAB)
+- break;
+- oldlen += (*mb_ptr2len)(oldp + col + oldlen);
+- /* Deleted a bit too much, insert spaces. */
+- if (vcol > new_vcol)
+- newlen += vcol - new_vcol;
+- }
+- curwin->w_p_list = old_list;
+- }
+- else if (oldp[col] != NUL)
+- {
+- /* normal replace */
+- oldlen = (*mb_ptr2len)(oldp + col);
+- }
+-
+-
+- /* Push the replaced bytes onto the replace stack, so that they can be
+- * put back when BS is used. The bytes of a multi-byte character are
+- * done the other way around, so that the first byte is popped off
+- * first (it tells the byte length of the character). */
+- replace_push(NUL);
+- for (i = 0; i < oldlen; ++i)
+- {
+- if (has_mbyte)
+- i += replace_push_mb(oldp + col + i) - 1;
+- else
+- replace_push(oldp[col + i]);
+- }
+- }
+-
+- newp = alloc_check((unsigned)(linelen + newlen - oldlen));
+- if (newp == NULL)
+- return;
+-
+- /* Copy bytes before the cursor. */
+- if (col > 0)
+- mch_memmove(newp, oldp, (size_t)col);
+-
+- /* Copy bytes after the changed character(s). */
+- p = newp + col;
+- if (linelen > col + oldlen)
+- mch_memmove(p + newlen, oldp + col + oldlen,
+- (size_t)(linelen - col - oldlen));
+-
+- /* Insert or overwrite the new character. */
+- mch_memmove(p, buf, charlen);
+- i = charlen;
+-
+- /* Fill with spaces when necessary. */
+- while (i < newlen)
+- p[i++] = ' ';
+-
+- // Replace the line in the buffer.
+- ml_replace(lnum, newp, FALSE);
+-
+- // mark the buffer as changed and prepare for displaying
+- inserted_bytes(lnum, col, newlen - oldlen);
+-
+- /*
+- * If we're in Insert or Replace mode and 'showmatch' is set, then briefly
+- * show the match for right parens and braces.
+- */
+- if (p_sm && (State & INSERT)
+- && msg_silent == 0
+- #ifdef FEAT_INS_EXPAND
+- && !ins_compl_active()
+- #endif
+- )
+- {
+- if (has_mbyte)
+- showmatch(mb_ptr2char(buf));
+- else
+- showmatch(c);
+- }
+-
+- #ifdef FEAT_RIGHTLEFT
+- if (!p_ri || (State & REPLACE_FLAG))
+- #endif
+- {
+- /* Normal insert: move cursor right */
+- curwin->w_cursor.col += charlen;
+- }
+- /*
+- * TODO: should try to update w_row here, to avoid recomputing it later.
+- */
+- }
+-
+- /*
+- * Insert a string at the cursor position.
+- * Note: Does NOT handle Replace mode.
+- * Caller must have prepared for undo.
+- */
+- void
+- ins_str(char_u *s)
+- {
+- char_u *oldp, *newp;
+- int newlen = (int)STRLEN(s);
+- int oldlen;
+- colnr_T col;
+- linenr_T lnum = curwin->w_cursor.lnum;
+-
+- if (virtual_active() && curwin->w_cursor.coladd > 0)
+- coladvance_force(getviscol());
+-
+- col = curwin->w_cursor.col;
+- oldp = ml_get(lnum);
+- oldlen = (int)STRLEN(oldp);
+-
+- newp = alloc_check((unsigned)(oldlen + newlen + 1));
+- if (newp == NULL)
+- return;
+- if (col > 0)
+- mch_memmove(newp, oldp, (size_t)col);
+- mch_memmove(newp + col, s, (size_t)newlen);
+- mch_memmove(newp + col + newlen, oldp + col, (size_t)(oldlen - col + 1));
+- ml_replace(lnum, newp, FALSE);
+- inserted_bytes(lnum, col, newlen);
+- curwin->w_cursor.col += newlen;
+- }
+-
+- /*
+- * Delete one character under the cursor.
+- * If "fixpos" is TRUE, don't leave the cursor on the NUL after the line.
+- * Caller must have prepared for undo.
+- *
+- * return FAIL for failure, OK otherwise
+- */
+- int
+- del_char(int fixpos)
+- {
+- if (has_mbyte)
+- {
+- /* Make sure the cursor is at the start of a character. */
+- mb_adjust_cursor();
+- if (*ml_get_cursor() == NUL)
+- return FAIL;
+- return del_chars(1L, fixpos);
+- }
+- return del_bytes(1L, fixpos, TRUE);
+- }
+-
+- /*
+- * Like del_bytes(), but delete characters instead of bytes.
+- */
+- int
+- del_chars(long count, int fixpos)
+- {
+- long bytes = 0;
+- long i;
+- char_u *p;
+- int l;
+-
+- p = ml_get_cursor();
+- for (i = 0; i < count && *p != NUL; ++i)
+- {
+- l = (*mb_ptr2len)(p);
+- bytes += l;
+- p += l;
+- }
+- return del_bytes(bytes, fixpos, TRUE);
+- }
+-
+- /*
+- * Delete "count" bytes under the cursor.
+- * If "fixpos" is TRUE, don't leave the cursor on the NUL after the line.
+- * Caller must have prepared for undo.
+- *
+- * Return FAIL for failure, OK otherwise.
+- */
+- int
+- del_bytes(
+- long count,
+- int fixpos_arg,
+- int use_delcombine UNUSED) /* 'delcombine' option applies */
+- {
+- 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;
+-
+- oldp = ml_get(lnum);
+- oldlen = (int)STRLEN(oldp);
+-
+- /* Can't do anything when the cursor is on the NUL after the line. */
+- if (col >= oldlen)
+- return FAIL;
+-
+- /* If "count" is zero there is nothing to do. */
+- if (count == 0)
+- return OK;
+-
+- /* If "count" is negative the caller must be doing something wrong. */
+- if (count < 1)
+- {
+- siemsg("E950: Invalid count for del_bytes(): %ld", count);
+- return FAIL;
+- }
+-
+- /* If 'delcombine' is set and deleting (less than) one character, only
+- * delete the last combining character. */
+- if (p_deco && use_delcombine && enc_utf8
+- && utfc_ptr2len(oldp + col) >= count)
+- {
+- int cc[MAX_MCO];
+- int n;
+-
+- (void)utfc_ptr2char(oldp + col, cc);
+- if (cc[0] != NUL)
+- {
+- /* Find the last composing char, there can be several. */
+- n = col;
+- do
+- {
+- col = n;
+- count = utf_ptr2len(oldp + n);
+- n += count;
+- } while (UTF_COMPOSINGLIKE(oldp + col, oldp + n));
+- fixpos = 0;
+- }
+- }
+-
+- /*
+- * When count is too big, reduce it.
+- */
+- movelen = (long)oldlen - (long)col - count + 1; /* includes trailing NUL */
+- if (movelen <= 1)
+- {
+- /*
+- * If we just took off the last character of a non-blank line, and
+- * fixpos is TRUE, we don't want to end up positioned at the NUL,
+- * unless "restart_edit" is set or 'virtualedit' contains "onemore".
+- */
+- if (col > 0 && fixpos && restart_edit == 0
+- && (ve_flags & VE_ONEMORE) == 0)
+- {
+- --curwin->w_cursor.col;
+- curwin->w_cursor.coladd = 0;
+- if (has_mbyte)
+- curwin->w_cursor.col -=
+- (*mb_head_off)(oldp, oldp + curwin->w_cursor.col);
+- }
+- count = oldlen - col;
+- movelen = 1;
+- }
+- newlen = oldlen - count;
+-
+- /*
+- * If the old line has been allocated the deletion can be done in the
+- * existing line. Otherwise a new line has to be allocated
+- * Can't do this when using Netbeans, because we would need to invoke
+- * netbeans_removed(), which deallocates the line. Let ml_replace() take
+- * care of notifying Netbeans.
+- */
+- #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
+- inserted_bytes(lnum, curwin->w_cursor.col, -count);
+-
+- return OK;
+- }
+-
+- /*
+- * Delete from cursor to end of line.
+- * Caller must have prepared for undo.
+- *
+- * return FAIL for failure, OK otherwise
+- */
+- int
+- truncate_line(
+- int fixpos) /* if TRUE fix the cursor position when done */
+- {
+- char_u *newp;
+- linenr_T lnum = curwin->w_cursor.lnum;
+- colnr_T col = curwin->w_cursor.col;
+-
+- if (col == 0)
+- newp = vim_strsave((char_u *)"");
+- else
+- newp = vim_strnsave(ml_get(lnum), col);
+-
+- if (newp == NULL)
+- return FAIL;
+-
+- ml_replace(lnum, newp, FALSE);
+-
+- /* mark the buffer as changed and prepare for displaying */
+- changed_bytes(lnum, curwin->w_cursor.col);
+-
+- /*
+- * If "fixpos" is TRUE we don't want to end up positioned at the NUL.
+- */
+- if (fixpos && curwin->w_cursor.col > 0)
+- --curwin->w_cursor.col;
+-
+- return OK;
+- }
+-
+- /*
+- * Delete "nlines" lines at the cursor.
+- * Saves the lines for undo first if "undo" is TRUE.
+- */
+- void
+- del_lines(
+- long nlines, /* number of lines to delete */
+- int undo) /* if TRUE, prepare for undo */
+- {
+- long n;
+- linenr_T first = curwin->w_cursor.lnum;
+-
+- if (nlines <= 0)
+- return;
+-
+- /* save the deleted lines for undo */
+- if (undo && u_savedel(first, nlines) == FAIL)
+- return;
+-
+- for (n = 0; n < nlines; )
+- {
+- if (curbuf->b_ml.ml_flags & ML_EMPTY) /* nothing to delete */
+- break;
+-
+- ml_delete(first, TRUE);
+- ++n;
+-
+- /* If we delete the last line in the file, stop */
+- if (first > curbuf->b_ml.ml_line_count)
+- break;
+- }
+-
+- /* Correct the cursor position before calling deleted_lines_mark(), it may
+- * trigger a callback to display the cursor. */
+- curwin->w_cursor.col = 0;
+- check_cursor_lnum();
+-
+- /* adjust marks, mark the buffer as changed and prepare for displaying */
+- deleted_lines_mark(first, n);
+- }
+-
+ int
+ gchar_pos(pos_T *pos)
+ {
+--- 1043,1048 ----
+***************
+*** 2790,3309 ****
+ }
+
+ /*
+- * Call this function when something in the current buffer is changed.
+- *
+- * Most often called through changed_bytes() and changed_lines(), which also
+- * mark the area of the display to be redrawn.
+- *
+- * Careful: may trigger autocommands that reload the buffer.
+- */
+- void
+- changed(void)
+- {
+- #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
+- if (p_imst == IM_ON_THE_SPOT)
+- {
+- /* The text of the preediting area is inserted, but this doesn't
+- * mean a change of the buffer yet. That is delayed until the
+- * text is committed. (this means preedit becomes empty) */
+- if (im_is_preediting() && !xim_changed_while_preediting)
+- return;
+- xim_changed_while_preediting = FALSE;
+- }
+- #endif
+-
+- if (!curbuf->b_changed)
+- {
+- int save_msg_scroll = msg_scroll;
+-
+- /* Give a warning about changing a read-only file. This may also
+- * check-out the file, thus change "curbuf"! */
+- change_warning(0);
+-
+- /* Create a swap file if that is wanted.
+- * Don't do this for "nofile" and "nowrite" buffer types. */
+- if (curbuf->b_may_swap
+- #ifdef FEAT_QUICKFIX
+- && !bt_dontwrite(curbuf)
+- #endif
+- )
+- {
+- int save_need_wait_return = need_wait_return;
+-
+- need_wait_return = FALSE;
+- ml_open_file(curbuf);
+-
+- /* The ml_open_file() can cause an ATTENTION message.
+- * Wait two seconds, to make sure the user reads this unexpected
+- * message. Since we could be anywhere, call wait_return() now,
+- * and don't let the emsg() set msg_scroll. */
+- if (need_wait_return && emsg_silent == 0)
+- {
+- out_flush();
+- ui_delay(2000L, TRUE);
+- wait_return(TRUE);
+- msg_scroll = save_msg_scroll;
+- }
+- else
+- need_wait_return = save_need_wait_return;
+- }
+- changed_int();
+- }
+- ++CHANGEDTICK(curbuf);
+-
+- #ifdef FEAT_SEARCH_EXTRA
+- // If a pattern is highlighted, the position may now be invalid.
+- highlight_match = FALSE;
+- #endif
+- }
+-
+- /*
+- * Internal part of changed(), no user interaction.
+- */
+- void
+- changed_int(void)
+- {
+- curbuf->b_changed = TRUE;
+- ml_setflags(curbuf);
+- check_status(curbuf);
+- redraw_tabline = TRUE;
+- #ifdef FEAT_TITLE
+- need_maketitle = TRUE; /* set window title later */
+- #endif
+- }
+-
+- static void changedOneline(buf_T *buf, linenr_T lnum);
+- static void changed_lines_buf(buf_T *buf, linenr_T lnum, linenr_T lnume, long xtra);
+- static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra);
+-
+- /*
+- * Changed bytes within a single line for the current buffer.
+- * - marks the windows on this buffer to be redisplayed
+- * - marks the buffer changed by calling changed()
+- * - invalidates cached values
+- * Careful: may trigger autocommands that reload the buffer.
+- */
+- void
+- changed_bytes(linenr_T lnum, colnr_T col)
+- {
+- changedOneline(curbuf, lnum);
+- changed_common(lnum, col, lnum + 1, 0L);
+-
+- #ifdef FEAT_DIFF
+- /* Diff highlighting in other diff windows may need to be updated too. */
+- if (curwin->w_p_diff)
+- {
+- win_T *wp;
+- linenr_T wlnum;
+-
+- FOR_ALL_WINDOWS(wp)
+- if (wp->w_p_diff && wp != curwin)
+- {
+- redraw_win_later(wp, VALID);
+- wlnum = diff_lnum_win(lnum, wp);
+- if (wlnum > 0)
+- changedOneline(wp->w_buffer, wlnum);
+- }
+- }
+- #endif
+- }
+-
+- /*
+- * Like changed_bytes() but also adjust text properties for "added" bytes.
+- * When "added" is negative text was deleted.
+- */
+- void
+- inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED)
+- {
+- changed_bytes(lnum, col);
+-
+- #ifdef FEAT_TEXT_PROP
+- if (curbuf->b_has_textprop && added != 0)
+- adjust_prop_columns(lnum, col, added);
+- #endif
+- }
+-
+- static void
+- changedOneline(buf_T *buf, linenr_T lnum)
+- {
+- if (buf->b_mod_set)
+- {
+- /* find the maximum area that must be redisplayed */
+- if (lnum < buf->b_mod_top)
+- buf->b_mod_top = lnum;
+- else if (lnum >= buf->b_mod_bot)
+- buf->b_mod_bot = lnum + 1;
+- }
+- else
+- {
+- /* set the area that must be redisplayed to one line */
+- buf->b_mod_set = TRUE;
+- buf->b_mod_top = lnum;
+- buf->b_mod_bot = lnum + 1;
+- buf->b_mod_xlines = 0;
+- }
+- }
+-
+- /*
+- * Appended "count" lines below line "lnum" in the current buffer.
+- * Must be called AFTER the change and after mark_adjust().
+- * Takes care of marking the buffer to be redrawn and sets the changed flag.
+- */
+- void
+- appended_lines(linenr_T lnum, long count)
+- {
+- changed_lines(lnum + 1, 0, lnum + 1, count);
+- }
+-
+- /*
+- * Like appended_lines(), but adjust marks first.
+- */
+- void
+- appended_lines_mark(linenr_T lnum, long count)
+- {
+- /* Skip mark_adjust when adding a line after the last one, there can't
+- * be marks there. But it's still needed in diff mode. */
+- if (lnum + count < curbuf->b_ml.ml_line_count
+- #ifdef FEAT_DIFF
+- || curwin->w_p_diff
+- #endif
+- )
+- mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L);
+- changed_lines(lnum + 1, 0, lnum + 1, count);
+- }
+-
+- /*
+- * Deleted "count" lines at line "lnum" in the current buffer.
+- * Must be called AFTER the change and after mark_adjust().
+- * Takes care of marking the buffer to be redrawn and sets the changed flag.
+- */
+- void
+- deleted_lines(linenr_T lnum, long count)
+- {
+- changed_lines(lnum, 0, lnum + count, -count);
+- }
+-
+- /*
+- * Like deleted_lines(), but adjust marks first.
+- * Make sure the cursor is on a valid line before calling, a GUI callback may
+- * be triggered to display the cursor.
+- */
+- void
+- deleted_lines_mark(linenr_T lnum, long count)
+- {
+- mark_adjust(lnum, (linenr_T)(lnum + count - 1), (long)MAXLNUM, -count);
+- changed_lines(lnum, 0, lnum + count, -count);
+- }
+-
+- /*
+- * Changed lines for the current buffer.
+- * Must be called AFTER the change and after mark_adjust().
+- * - mark the buffer changed by calling changed()
+- * - mark the windows on this buffer to be redisplayed
+- * - invalidate cached values
+- * "lnum" is the first line that needs displaying, "lnume" the first line
+- * below the changed lines (BEFORE the change).
+- * When only inserting lines, "lnum" and "lnume" are equal.
+- * Takes care of calling changed() and updating b_mod_*.
+- * Careful: may trigger autocommands that reload the buffer.
+- */
+- void
+- changed_lines(
+- linenr_T lnum, /* first line with change */
+- colnr_T col, /* column in first line with change */
+- linenr_T lnume, /* line below last changed line */
+- long xtra) /* number of extra lines (negative when deleting) */
+- {
+- 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
+- * displaying. */
+- win_T *wp;
+- linenr_T wlnum;
+-
+- FOR_ALL_WINDOWS(wp)
+- if (wp->w_p_diff && wp != curwin)
+- {
+- redraw_win_later(wp, VALID);
+- wlnum = diff_lnum_win(lnum, wp);
+- if (wlnum > 0)
+- changed_lines_buf(wp->w_buffer, wlnum,
+- lnume - lnum + wlnum, 0L);
+- }
+- }
+- #endif
+-
+- changed_common(lnum, col, lnume, xtra);
+- }
+-
+- static void
+- changed_lines_buf(
+- buf_T *buf,
+- linenr_T lnum, /* first line with change */
+- linenr_T lnume, /* line below last changed line */
+- long xtra) /* number of extra lines (negative when deleting) */
+- {
+- if (buf->b_mod_set)
+- {
+- /* find the maximum area that must be redisplayed */
+- if (lnum < buf->b_mod_top)
+- buf->b_mod_top = lnum;
+- if (lnum < buf->b_mod_bot)
+- {
+- /* adjust old bot position for xtra lines */
+- buf->b_mod_bot += xtra;
+- if (buf->b_mod_bot < lnum)
+- buf->b_mod_bot = lnum;
+- }
+- if (lnume + xtra > buf->b_mod_bot)
+- buf->b_mod_bot = lnume + xtra;
+- buf->b_mod_xlines += xtra;
+- }
+- else
+- {
+- /* set the area that must be redisplayed */
+- buf->b_mod_set = TRUE;
+- buf->b_mod_top = lnum;
+- buf->b_mod_bot = lnume + xtra;
+- buf->b_mod_xlines = xtra;
+- }
+- }
+-
+- /*
+- * Common code for when a change is was made.
+- * See changed_lines() for the arguments.
+- * Careful: may trigger autocommands that reload the buffer.
+- */
+- static void
+- changed_common(
+- linenr_T lnum,
+- colnr_T col,
+- linenr_T lnume,
+- long xtra)
+- {
+- win_T *wp;
+- tabpage_T *tp;
+- int i;
+- #ifdef FEAT_JUMPLIST
+- int cols;
+- pos_T *p;
+- int add;
+- #endif
+-
+- /* 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)
+- {
+- curbuf->b_last_change.lnum = lnum;
+- curbuf->b_last_change.col = col;
+-
+- #ifdef FEAT_JUMPLIST
+- /* Create a new entry if a new undo-able change was started or we
+- * don't have an entry yet. */
+- if (curbuf->b_new_change || curbuf->b_changelistlen == 0)
+- {
+- if (curbuf->b_changelistlen == 0)
+- add = TRUE;
+- else
+- {
+- /* Don't create a new entry when the line number is the same
+- * as the last one and the column is not too far away. Avoids
+- * creating many entries for typing "xxxxx". */
+- p = &curbuf->b_changelist[curbuf->b_changelistlen - 1];
+- if (p->lnum != lnum)
+- add = TRUE;
+- else
+- {
+- cols = comp_textwidth(FALSE);
+- if (cols == 0)
+- cols = 79;
+- add = (p->col + cols < col || col + cols < p->col);
+- }
+- }
+- if (add)
+- {
+- /* This is the first of a new sequence of undo-able changes
+- * and it's at some distance of the last change. Use a new
+- * position in the changelist. */
+- curbuf->b_new_change = FALSE;
+-
+- if (curbuf->b_changelistlen == JUMPLISTSIZE)
+- {
+- /* changelist is full: remove oldest entry */
+- curbuf->b_changelistlen = JUMPLISTSIZE - 1;
+- mch_memmove(curbuf->b_changelist, curbuf->b_changelist + 1,
+- sizeof(pos_T) * (JUMPLISTSIZE - 1));
+- FOR_ALL_TAB_WINDOWS(tp, wp)
+- {
+- /* Correct position in changelist for other windows on
+- * this buffer. */
+- if (wp->w_buffer == curbuf && wp->w_changelistidx > 0)
+- --wp->w_changelistidx;
+- }
+- }
+- FOR_ALL_TAB_WINDOWS(tp, wp)
+- {
+- /* For other windows, if the position in the changelist is
+- * at the end it stays at the end. */
+- if (wp->w_buffer == curbuf
+- && wp->w_changelistidx == curbuf->b_changelistlen)
+- ++wp->w_changelistidx;
+- }
+- ++curbuf->b_changelistlen;
+- }
+- }
+- curbuf->b_changelist[curbuf->b_changelistlen - 1] =
+- curbuf->b_last_change;
+- /* The current window is always after the last change, so that "g,"
+- * takes you back to it. */
+- curwin->w_changelistidx = curbuf->b_changelistlen;
+- #endif
+- }
+-
+- FOR_ALL_TAB_WINDOWS(tp, wp)
+- {
+- if (wp->w_buffer == curbuf)
+- {
+- /* Mark this window to be redrawn later. */
+- if (wp->w_redr_type < VALID)
+- wp->w_redr_type = VALID;
+-
+- /* Check if a change in the buffer has invalidated the cached
+- * values for the cursor. */
+- #ifdef FEAT_FOLDING
+- /*
+- * Update the folds for this window. Can't postpone this, because
+- * a following operator might work on the whole fold: ">>dd".
+- */
+- foldUpdate(wp, lnum, lnume + xtra - 1);
+-
+- /* The change may cause lines above or below the change to become
+- * included in a fold. Set lnum/lnume to the first/last line that
+- * might be displayed differently.
+- * Set w_cline_folded here as an efficient way to update it when
+- * inserting lines just above a closed fold. */
+- i = hasFoldingWin(wp, lnum, &lnum, NULL, FALSE, NULL);
+- if (wp->w_cursor.lnum == lnum)
+- wp->w_cline_folded = i;
+- i = hasFoldingWin(wp, lnume, NULL, &lnume, FALSE, NULL);
+- if (wp->w_cursor.lnum == lnume)
+- wp->w_cline_folded = i;
+-
+- /* If the changed line is in a range of previously folded lines,
+- * compare with the first line in that range. */
+- if (wp->w_cursor.lnum <= lnum)
+- {
+- i = find_wl_entry(wp, lnum);
+- if (i >= 0 && wp->w_cursor.lnum > wp->w_lines[i].wl_lnum)
+- changed_line_abv_curs_win(wp);
+- }
+- #endif
+-
+- if (wp->w_cursor.lnum > lnum)
+- changed_line_abv_curs_win(wp);
+- else if (wp->w_cursor.lnum == lnum && wp->w_cursor.col >= col)
+- changed_cline_bef_curs_win(wp);
+- if (wp->w_botline >= lnum)
+- {
+- /* Assume that botline doesn't change (inserted lines make
+- * other lines scroll down below botline). */
+- approximate_botline_win(wp);
+- }
+-
+- /* Check if any w_lines[] entries have become invalid.
+- * For entries below the change: Correct the lnums for
+- * inserted/deleted lines. Makes it possible to stop displaying
+- * after the change. */
+- for (i = 0; i < wp->w_lines_valid; ++i)
+- if (wp->w_lines[i].wl_valid)
+- {
+- if (wp->w_lines[i].wl_lnum >= lnum)
+- {
+- if (wp->w_lines[i].wl_lnum < lnume)
+- {
+- /* line included in change */
+- wp->w_lines[i].wl_valid = FALSE;
+- }
+- else if (xtra != 0)
+- {
+- /* line below change */
+- wp->w_lines[i].wl_lnum += xtra;
+- #ifdef FEAT_FOLDING
+- wp->w_lines[i].wl_lastlnum += xtra;
+- #endif
+- }
+- }
+- #ifdef FEAT_FOLDING
+- else if (wp->w_lines[i].wl_lastlnum >= lnum)
+- {
+- /* change somewhere inside this range of folded lines,
+- * may need to be redrawn */
+- wp->w_lines[i].wl_valid = FALSE;
+- }
+- #endif
+- }
+-
+- #ifdef FEAT_FOLDING
+- /* Take care of side effects for setting w_topline when folds have
+- * changed. Esp. when the buffer was changed in another window. */
+- if (hasAnyFolding(wp))
+- set_topline(wp, wp->w_topline);
+- #endif
+- /* relative numbering may require updating more */
+- if (wp->w_p_rnu)
+- redraw_win_later(wp, SOME_VALID);
+- }
+- }
+-
+- /* Call update_screen() later, which checks out what needs to be redrawn,
+- * since it notices b_mod_set and then uses b_mod_*. */
+- if (must_redraw < VALID)
+- must_redraw = VALID;
+-
+- /* when the cursor line is changed always trigger CursorMoved */
+- if (lnum <= curwin->w_cursor.lnum
+- && lnume + (xtra < 0 ? -xtra : xtra) > curwin->w_cursor.lnum)
+- last_cursormoved.lnum = 0;
+- }
+-
+- /*
+- * unchanged() is called when the changed flag must be reset for buffer 'buf'
+- */
+- void
+- unchanged(
+- buf_T *buf,
+- int ff) /* also reset 'fileformat' */
+- {
+- if (buf->b_changed || (ff && file_ff_differs(buf, FALSE)))
+- {
+- buf->b_changed = 0;
+- ml_setflags(buf);
+- if (ff)
+- save_file_ff(buf);
+- check_status(buf);
+- redraw_tabline = TRUE;
+- #ifdef FEAT_TITLE
+- need_maketitle = TRUE; /* set window title later */
+- #endif
+- }
+- ++CHANGEDTICK(buf);
+- #ifdef FEAT_NETBEANS_INTG
+- netbeans_unmodified(buf);
+- #endif
+- }
+-
+- /*
+ * check_status: called when the status bars for the buffer 'buf'
+ * need to be updated
+ */
+--- 1110,1115 ----
+***************
+*** 3322,3382 ****
+ }
+
+ /*
+- * If the file is readonly, give a warning message with the first change.
+- * Don't do this for autocommands.
+- * Don't use emsg(), because it flushes the macro buffer.
+- * If we have undone all changes b_changed will be FALSE, but "b_did_warn"
+- * will be TRUE.
+- * Careful: may trigger autocommands that reload the buffer.
+- */
+- void
+- change_warning(
+- int col) /* column for message; non-zero when in insert
+- mode and 'showmode' is on */
+- {
+- static char *w_readonly = N_("W10: Warning: Changing a readonly file");
+-
+- if (curbuf->b_did_warn == FALSE
+- && curbufIsChanged() == 0
+- && !autocmd_busy
+- && curbuf->b_p_ro)
+- {
+- ++curbuf_lock;
+- apply_autocmds(EVENT_FILECHANGEDRO, NULL, NULL, FALSE, curbuf);
+- --curbuf_lock;
+- if (!curbuf->b_p_ro)
+- return;
+- /*
+- * Do what msg() does, but with a column offset if the warning should
+- * be after the mode message.
+- */
+- msg_start();
+- if (msg_row == Rows - 1)
+- msg_col = col;
+- msg_source(HL_ATTR(HLF_W));
+- msg_puts_attr(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST);
+- #ifdef FEAT_EVAL
+- set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1);
+- #endif
+- msg_clr_eos();
+- (void)msg_end();
+- if (msg_silent == 0 && !silent_mode
+- #ifdef FEAT_EVAL
+- && time_for_testing != 1
+- #endif
+- )
+- {
+- out_flush();
+- ui_delay(1000L, TRUE); /* give the user time to think about it */
+- }
+- curbuf->b_did_warn = TRUE;
+- redraw_cmdline = FALSE; /* don't redraw and erase the message */
+- if (msg_row < Rows - 1)
+- showmode();
+- }
+- }
+-
+- /*
+ * Ask for a reply from the user, a 'y' or a 'n'.
+ * No other characters are accepted, the message is repeated until a valid
+ * reply is entered or CTRL-C is hit.
+--- 1128,1133 ----
+*** ../vim-8.1.1317/src/proto/misc1.pro 2019-02-13 22:45:21.512636158 +0100
+--- src/proto/misc1.pro 2019-05-11 16:56:15.916698940 +0200
+***************
+*** 7,13 ****
+ int set_indent(int size, int flags);
+ int get_number_indent(linenr_T lnum);
+ int get_breakindent_win(win_T *wp, char_u *line);
+- int open_line(int dir, int flags, int second_line_indent);
+ int get_leader_len(char_u *line, char_u **flags, int backward, int include_space);
+ int get_last_leader_offset(char_u *line, char_u **flags);
+ int plines(linenr_T lnum);
+--- 7,12 ----
+***************
+*** 17,49 ****
+ int plines_win_nofold(win_T *wp, linenr_T lnum);
+ int plines_win_col(win_T *wp, linenr_T lnum, long column);
+ int plines_m_win(win_T *wp, linenr_T first, linenr_T last);
+- void ins_bytes(char_u *p);
+- void ins_bytes_len(char_u *p, int len);
+- void ins_char(int c);
+- void ins_char_bytes(char_u *buf, int charlen);
+- void ins_str(char_u *s);
+- int del_char(int fixpos);
+- int del_chars(long count, int fixpos);
+- int del_bytes(long count, int fixpos_arg, int use_delcombine);
+- int truncate_line(int fixpos);
+- void del_lines(long nlines, int undo);
+ int gchar_pos(pos_T *pos);
+ int gchar_cursor(void);
+ void pchar_cursor(int c);
+ int inindent(int extra);
+ char_u *skip_to_option_part(char_u *p);
+- void changed(void);
+- void changed_int(void);
+- void changed_bytes(linenr_T lnum, colnr_T col);
+- void inserted_bytes(linenr_T lnum, colnr_T col, int added);
+- void appended_lines(linenr_T lnum, long count);
+- void appended_lines_mark(linenr_T lnum, long count);
+- void deleted_lines(linenr_T lnum, long count);
+- void deleted_lines_mark(linenr_T lnum, long count);
+- void changed_lines(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra);
+- void unchanged(buf_T *buf, int ff);
+ void check_status(buf_T *buf);
+- void change_warning(int col);
+ int ask_yesno(char_u *str, int direct);
+ int is_mouse_key(int c);
+ int get_keystroke(void);
+--- 16,27 ----
+*** ../vim-8.1.1317/src/change.c 2019-05-11 17:02:59.034341075 +0200
+--- src/change.c 2019-05-11 16:57:38.064209409 +0200
+***************
+*** 0 ****
+--- 1,2165 ----
++ /* 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.
++ */
++
++ /*
++ * change.c: functions related to changing text
++ */
++
++ #include "vim.h"
++
++ /*
++ * If the file is readonly, give a warning message with the first change.
++ * Don't do this for autocommands.
++ * Doesn't use emsg(), because it flushes the macro buffer.
++ * If we have undone all changes b_changed will be FALSE, but "b_did_warn"
++ * will be TRUE.
++ * "col" is the column for the message; non-zero when in insert mode and
++ * 'showmode' is on.
++ * Careful: may trigger autocommands that reload the buffer.
++ */
++ void
++ change_warning(int col)
++ {
++ static char *w_readonly = N_("W10: Warning: Changing a readonly file");
++
++ if (curbuf->b_did_warn == FALSE
++ && curbufIsChanged() == 0
++ && !autocmd_busy
++ && curbuf->b_p_ro)
++ {
++ ++curbuf_lock;
++ apply_autocmds(EVENT_FILECHANGEDRO, NULL, NULL, FALSE, curbuf);
++ --curbuf_lock;
++ if (!curbuf->b_p_ro)
++ return;
++
++ // Do what msg() does, but with a column offset if the warning should
++ // be after the mode message.
++ msg_start();
++ if (msg_row == Rows - 1)
++ msg_col = col;
++ msg_source(HL_ATTR(HLF_W));
++ msg_puts_attr(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST);
++ #ifdef FEAT_EVAL
++ set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1);
++ #endif
++ msg_clr_eos();
++ (void)msg_end();
++ if (msg_silent == 0 && !silent_mode
++ #ifdef FEAT_EVAL
++ && time_for_testing != 1
++ #endif
++ )
++ {
++ out_flush();
++ ui_delay(1000L, TRUE); // give the user time to think about it
++ }
++ curbuf->b_did_warn = TRUE;
++ redraw_cmdline = FALSE; // don't redraw and erase the message
++ if (msg_row < Rows - 1)
++ showmode();
++ }
++ }
++
++ /*
++ * Call this function when something in the current buffer is changed.
++ *
++ * Most often called through changed_bytes() and changed_lines(), which also
++ * mark the area of the display to be redrawn.
++ *
++ * Careful: may trigger autocommands that reload the buffer.
++ */
++ void
++ changed(void)
++ {
++ #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
++ if (p_imst == IM_ON_THE_SPOT)
++ {
++ // The text of the preediting area is inserted, but this doesn't
++ // mean a change of the buffer yet. That is delayed until the
++ // text is committed. (this means preedit becomes empty)
++ if (im_is_preediting() && !xim_changed_while_preediting)
++ return;
++ xim_changed_while_preediting = FALSE;
++ }
++ #endif
++
++ if (!curbuf->b_changed)
++ {
++ int save_msg_scroll = msg_scroll;
++
++ // Give a warning about changing a read-only file. This may also
++ // check-out the file, thus change "curbuf"!
++ change_warning(0);
++
++ // Create a swap file if that is wanted.
++ // Don't do this for "nofile" and "nowrite" buffer types.
++ if (curbuf->b_may_swap
++ #ifdef FEAT_QUICKFIX
++ && !bt_dontwrite(curbuf)
++ #endif
++ )
++ {
++ int save_need_wait_return = need_wait_return;
++
++ need_wait_return = FALSE;
++ ml_open_file(curbuf);
++
++ // The ml_open_file() can cause an ATTENTION message.
++ // Wait two seconds, to make sure the user reads this unexpected
++ // message. Since we could be anywhere, call wait_return() now,
++ // and don't let the emsg() set msg_scroll.
++ if (need_wait_return && emsg_silent == 0)
++ {
++ out_flush();
++ ui_delay(2000L, TRUE);
++ wait_return(TRUE);
++ msg_scroll = save_msg_scroll;
++ }
++ else
++ need_wait_return = save_need_wait_return;
++ }
++ changed_internal();
++ }
++ ++CHANGEDTICK(curbuf);
++
++ #ifdef FEAT_SEARCH_EXTRA
++ // If a pattern is highlighted, the position may now be invalid.
++ highlight_match = FALSE;
++ #endif
++ }
++
++ /*
++ * Internal part of changed(), no user interaction.
++ * Also used for recovery.
++ */
++ void
++ changed_internal(void)
++ {
++ curbuf->b_changed = TRUE;
++ ml_setflags(curbuf);
++ check_status(curbuf);
++ redraw_tabline = TRUE;
++ #ifdef FEAT_TITLE
++ need_maketitle = TRUE; // set window title later
++ #endif
++ }
++
++ /*
++ * Common code for when a change was made.
++ * See changed_lines() for the arguments.
++ * Careful: may trigger autocommands that reload the buffer.
++ */
++ static void
++ changed_common(
++ linenr_T lnum,
++ colnr_T col,
++ linenr_T lnume,
++ long xtra)
++ {
++ win_T *wp;
++ tabpage_T *tp;
++ int i;
++ #ifdef FEAT_JUMPLIST
++ int cols;
++ pos_T *p;
++ int add;
++ #endif
++
++ // 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)
++ {
++ curbuf->b_last_change.lnum = lnum;
++ curbuf->b_last_change.col = col;
++
++ #ifdef FEAT_JUMPLIST
++ // Create a new entry if a new undo-able change was started or we
++ // don't have an entry yet.
++ if (curbuf->b_new_change || curbuf->b_changelistlen == 0)
++ {
++ if (curbuf->b_changelistlen == 0)
++ add = TRUE;
++ else
++ {
++ // Don't create a new entry when the line number is the same
++ // as the last one and the column is not too far away. Avoids
++ // creating many entries for typing "xxxxx".
++ p = &curbuf->b_changelist[curbuf->b_changelistlen - 1];
++ if (p->lnum != lnum)
++ add = TRUE;
++ else
++ {
++ cols = comp_textwidth(FALSE);
++ if (cols == 0)
++ cols = 79;
++ add = (p->col + cols < col || col + cols < p->col);
++ }
++ }
++ if (add)
++ {
++ // This is the first of a new sequence of undo-able changes
++ // and it's at some distance of the last change. Use a new
++ // position in the changelist.
++ curbuf->b_new_change = FALSE;
++
++ if (curbuf->b_changelistlen == JUMPLISTSIZE)
++ {
++ // changelist is full: remove oldest entry
++ curbuf->b_changelistlen = JUMPLISTSIZE - 1;
++ mch_memmove(curbuf->b_changelist, curbuf->b_changelist + 1,
++ sizeof(pos_T) * (JUMPLISTSIZE - 1));
++ FOR_ALL_TAB_WINDOWS(tp, wp)
++ {
++ // Correct position in changelist for other windows on
++ // this buffer.
++ if (wp->w_buffer == curbuf && wp->w_changelistidx > 0)
++ --wp->w_changelistidx;
++ }
++ }
++ FOR_ALL_TAB_WINDOWS(tp, wp)
++ {
++ // For other windows, if the position in the changelist is
++ // at the end it stays at the end.
++ if (wp->w_buffer == curbuf
++ && wp->w_changelistidx == curbuf->b_changelistlen)
++ ++wp->w_changelistidx;
++ }
++ ++curbuf->b_changelistlen;
++ }
++ }
++ curbuf->b_changelist[curbuf->b_changelistlen - 1] =
++ curbuf->b_last_change;
++ // The current window is always after the last change, so that "g,"
++ // takes you back to it.
++ curwin->w_changelistidx = curbuf->b_changelistlen;
++ #endif
++ }
++
++ FOR_ALL_TAB_WINDOWS(tp, wp)
++ {
++ if (wp->w_buffer == curbuf)
++ {
++ // Mark this window to be redrawn later.
++ if (wp->w_redr_type < VALID)
++ wp->w_redr_type = VALID;
++
++ // Check if a change in the buffer has invalidated the cached
++ // values for the cursor.
++ #ifdef FEAT_FOLDING
++ // Update the folds for this window. Can't postpone this, because
++ // a following operator might work on the whole fold: ">>dd".
++ foldUpdate(wp, lnum, lnume + xtra - 1);
++
++ // The change may cause lines above or below the change to become
++ // included in a fold. Set lnum/lnume to the first/last line that
++ // might be displayed differently.
++ // Set w_cline_folded here as an efficient way to update it when
++ // inserting lines just above a closed fold.
++ i = hasFoldingWin(wp, lnum, &lnum, NULL, FALSE, NULL);
++ if (wp->w_cursor.lnum == lnum)
++ wp->w_cline_folded = i;
++ i = hasFoldingWin(wp, lnume, NULL, &lnume, FALSE, NULL);
++ if (wp->w_cursor.lnum == lnume)
++ wp->w_cline_folded = i;
++
++ // If the changed line is in a range of previously folded lines,
++ // compare with the first line in that range.
++ if (wp->w_cursor.lnum <= lnum)
++ {
++ i = find_wl_entry(wp, lnum);
++ if (i >= 0 && wp->w_cursor.lnum > wp->w_lines[i].wl_lnum)
++ changed_line_abv_curs_win(wp);
++ }
++ #endif
++
++ if (wp->w_cursor.lnum > lnum)
++ changed_line_abv_curs_win(wp);
++ else if (wp->w_cursor.lnum == lnum && wp->w_cursor.col >= col)
++ changed_cline_bef_curs_win(wp);
++ if (wp->w_botline >= lnum)
++ {
++ // Assume that botline doesn't change (inserted lines make
++ // other lines scroll down below botline).
++ approximate_botline_win(wp);
++ }
++
++ // Check if any w_lines[] entries have become invalid.
++ // For entries below the change: Correct the lnums for
++ // inserted/deleted lines. Makes it possible to stop displaying
++ // after the change.
++ for (i = 0; i < wp->w_lines_valid; ++i)
++ if (wp->w_lines[i].wl_valid)
++ {
++ if (wp->w_lines[i].wl_lnum >= lnum)
++ {
++ if (wp->w_lines[i].wl_lnum < lnume)
++ {
++ // line included in change
++ wp->w_lines[i].wl_valid = FALSE;
++ }
++ else if (xtra != 0)
++ {
++ // line below change
++ wp->w_lines[i].wl_lnum += xtra;
++ #ifdef FEAT_FOLDING
++ wp->w_lines[i].wl_lastlnum += xtra;
++ #endif
++ }
++ }
++ #ifdef FEAT_FOLDING
++ else if (wp->w_lines[i].wl_lastlnum >= lnum)
++ {
++ // change somewhere inside this range of folded lines,
++ // may need to be redrawn
++ wp->w_lines[i].wl_valid = FALSE;
++ }
++ #endif
++ }
++
++ #ifdef FEAT_FOLDING
++ // Take care of side effects for setting w_topline when folds have
++ // changed. Esp. when the buffer was changed in another window.
++ if (hasAnyFolding(wp))
++ set_topline(wp, wp->w_topline);
++ #endif
++ // relative numbering may require updating more
++ if (wp->w_p_rnu)
++ redraw_win_later(wp, SOME_VALID);
++ }
++ }
++
++ // Call update_screen() later, which checks out what needs to be redrawn,
++ // since it notices b_mod_set and then uses b_mod_*.
++ if (must_redraw < VALID)
++ must_redraw = VALID;
++
++ // when the cursor line is changed always trigger CursorMoved
++ if (lnum <= curwin->w_cursor.lnum
++ && lnume + (xtra < 0 ? -xtra : xtra) > curwin->w_cursor.lnum)
++ last_cursormoved.lnum = 0;
++ }
++
++ static void
++ changedOneline(buf_T *buf, linenr_T lnum)
++ {
++ if (buf->b_mod_set)
++ {
++ // find the maximum area that must be redisplayed
++ if (lnum < buf->b_mod_top)
++ buf->b_mod_top = lnum;
++ else if (lnum >= buf->b_mod_bot)
++ buf->b_mod_bot = lnum + 1;
++ }
++ else
++ {
++ // set the area that must be redisplayed to one line
++ buf->b_mod_set = TRUE;
++ buf->b_mod_top = lnum;
++ buf->b_mod_bot = lnum + 1;
++ buf->b_mod_xlines = 0;
++ }
++ }
++
++ /*
++ * Changed bytes within a single line for the current buffer.
++ * - marks the windows on this buffer to be redisplayed
++ * - marks the buffer changed by calling changed()
++ * - invalidates cached values
++ * Careful: may trigger autocommands that reload the buffer.
++ */
++ void
++ changed_bytes(linenr_T lnum, colnr_T col)
++ {
++ changedOneline(curbuf, lnum);
++ changed_common(lnum, col, lnum + 1, 0L);
++
++ #ifdef FEAT_DIFF
++ // Diff highlighting in other diff windows may need to be updated too.
++ if (curwin->w_p_diff)
++ {
++ win_T *wp;
++ linenr_T wlnum;
++
++ FOR_ALL_WINDOWS(wp)
++ if (wp->w_p_diff && wp != curwin)
++ {
++ redraw_win_later(wp, VALID);
++ wlnum = diff_lnum_win(lnum, wp);
++ if (wlnum > 0)
++ changedOneline(wp->w_buffer, wlnum);
++ }
++ }
++ #endif
++ }
++
++ /*
++ * Like changed_bytes() but also adjust text properties for "added" bytes.
++ * When "added" is negative text was deleted.
++ */
++ void
++ inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED)
++ {
++ changed_bytes(lnum, col);
++
++ #ifdef FEAT_TEXT_PROP
++ if (curbuf->b_has_textprop && added != 0)
++ adjust_prop_columns(lnum, col, added);
++ #endif
++ }
++
++ /*
++ * Appended "count" lines below line "lnum" in the current buffer.
++ * Must be called AFTER the change and after mark_adjust().
++ * Takes care of marking the buffer to be redrawn and sets the changed flag.
++ */
++ void
++ appended_lines(linenr_T lnum, long count)
++ {
++ changed_lines(lnum + 1, 0, lnum + 1, count);
++ }
++
++ /*
++ * Like appended_lines(), but adjust marks first.
++ */
++ void
++ appended_lines_mark(linenr_T lnum, long count)
++ {
++ // Skip mark_adjust when adding a line after the last one, there can't
++ // be marks there. But it's still needed in diff mode.
++ if (lnum + count < curbuf->b_ml.ml_line_count
++ #ifdef FEAT_DIFF
++ || curwin->w_p_diff
++ #endif
++ )
++ mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L);
++ changed_lines(lnum + 1, 0, lnum + 1, count);
++ }
++
++ /*
++ * Deleted "count" lines at line "lnum" in the current buffer.
++ * Must be called AFTER the change and after mark_adjust().
++ * Takes care of marking the buffer to be redrawn and sets the changed flag.
++ */
++ void
++ deleted_lines(linenr_T lnum, long count)
++ {
++ changed_lines(lnum, 0, lnum + count, -count);
++ }
++
++ /*
++ * Like deleted_lines(), but adjust marks first.
++ * Make sure the cursor is on a valid line before calling, a GUI callback may
++ * be triggered to display the cursor.
++ */
++ void
++ deleted_lines_mark(linenr_T lnum, long count)
++ {
++ mark_adjust(lnum, (linenr_T)(lnum + count - 1), (long)MAXLNUM, -count);
++ changed_lines(lnum, 0, lnum + count, -count);
++ }
++
++ /*
++ * Marks the area to be redrawn after a change.
++ */
++ static void
++ changed_lines_buf(
++ buf_T *buf,
++ linenr_T lnum, // first line with change
++ linenr_T lnume, // line below last changed line
++ long xtra) // number of extra lines (negative when deleting)
++ {
++ if (buf->b_mod_set)
++ {
++ // find the maximum area that must be redisplayed
++ if (lnum < buf->b_mod_top)
++ buf->b_mod_top = lnum;
++ if (lnum < buf->b_mod_bot)
++ {
++ // adjust old bot position for xtra lines
++ buf->b_mod_bot += xtra;
++ if (buf->b_mod_bot < lnum)
++ buf->b_mod_bot = lnum;
++ }
++ if (lnume + xtra > buf->b_mod_bot)
++ buf->b_mod_bot = lnume + xtra;
++ buf->b_mod_xlines += xtra;
++ }
++ else
++ {
++ // set the area that must be redisplayed
++ buf->b_mod_set = TRUE;
++ buf->b_mod_top = lnum;
++ buf->b_mod_bot = lnume + xtra;
++ buf->b_mod_xlines = xtra;
++ }
++ }
++
++ /*
++ * Changed lines for the current buffer.
++ * Must be called AFTER the change and after mark_adjust().
++ * - mark the buffer changed by calling changed()
++ * - mark the windows on this buffer to be redisplayed
++ * - invalidate cached values
++ * "lnum" is the first line that needs displaying, "lnume" the first line
++ * below the changed lines (BEFORE the change).
++ * When only inserting lines, "lnum" and "lnume" are equal.
++ * Takes care of calling changed() and updating b_mod_*.
++ * Careful: may trigger autocommands that reload the buffer.
++ */
++ void
++ changed_lines(
++ linenr_T lnum, // first line with change
++ colnr_T col, // column in first line with change
++ linenr_T lnume, // line below last changed line
++ long xtra) // number of extra lines (negative when deleting)
++ {
++ 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
++ // displaying.
++ win_T *wp;
++ linenr_T wlnum;
++
++ FOR_ALL_WINDOWS(wp)
++ if (wp->w_p_diff && wp != curwin)
++ {
++ redraw_win_later(wp, VALID);
++ wlnum = diff_lnum_win(lnum, wp);
++ if (wlnum > 0)
++ changed_lines_buf(wp->w_buffer, wlnum,
++ lnume - lnum + wlnum, 0L);
++ }
++ }
++ #endif
++
++ changed_common(lnum, col, lnume, xtra);
++ }
++
++ /*
++ * Called when the changed flag must be reset for buffer "buf".
++ * When "ff" is TRUE also reset 'fileformat'.
++ */
++ void
++ unchanged(buf_T *buf, int ff)
++ {
++ if (buf->b_changed || (ff && file_ff_differs(buf, FALSE)))
++ {
++ buf->b_changed = 0;
++ ml_setflags(buf);
++ if (ff)
++ save_file_ff(buf);
++ check_status(buf);
++ redraw_tabline = TRUE;
++ #ifdef FEAT_TITLE
++ need_maketitle = TRUE; // set window title later
++ #endif
++ }
++ ++CHANGEDTICK(buf);
++ #ifdef FEAT_NETBEANS_INTG
++ netbeans_unmodified(buf);
++ #endif
++ }
++
++ /*
++ * Insert string "p" at the cursor position. Stops at a NUL byte.
++ * Handles Replace mode and multi-byte characters.
++ */
++ void
++ ins_bytes(char_u *p)
++ {
++ ins_bytes_len(p, (int)STRLEN(p));
++ }
++
++ /*
++ * Insert string "p" with length "len" at the cursor position.
++ * Handles Replace mode and multi-byte characters.
++ */
++ void
++ ins_bytes_len(char_u *p, int len)
++ {
++ int i;
++ int n;
++
++ if (has_mbyte)
++ for (i = 0; i < len; i += n)
++ {
++ if (enc_utf8)
++ // avoid reading past p[len]
++ n = utfc_ptr2len_len(p + i, len - i);
++ else
++ n = (*mb_ptr2len)(p + i);
++ ins_char_bytes(p + i, n);
++ }
++ else
++ for (i = 0; i < len; ++i)
++ ins_char(p[i]);
++ }
++
++ /*
++ * Insert or replace a single character at the cursor position.
++ * When in REPLACE or VREPLACE mode, replace any existing character.
++ * Caller must have prepared for undo.
++ * For multi-byte characters we get the whole character, the caller must
++ * convert bytes to a character.
++ */
++ void
++ ins_char(int c)
++ {
++ char_u buf[MB_MAXBYTES + 1];
++ int n = (*mb_char2bytes)(c, buf);
++
++ // When "c" is 0x100, 0x200, etc. we don't want to insert a NUL byte.
++ // Happens for CTRL-Vu9900.
++ if (buf[0] == 0)
++ buf[0] = '\n';
++
++ ins_char_bytes(buf, n);
++ }
++
++ void
++ ins_char_bytes(char_u *buf, int charlen)
++ {
++ int c = buf[0];
++ int newlen; // nr of bytes inserted
++ int oldlen; // nr of bytes deleted (0 when not replacing)
++ char_u *p;
++ char_u *newp;
++ char_u *oldp;
++ int linelen; // length of old line including NUL
++ colnr_T col;
++ linenr_T lnum = curwin->w_cursor.lnum;
++ int i;
++
++ // Break tabs if needed.
++ if (virtual_active() && curwin->w_cursor.coladd > 0)
++ coladvance_force(getviscol());
++
++ col = curwin->w_cursor.col;
++ oldp = ml_get(lnum);
++ linelen = (int)STRLEN(oldp) + 1;
++
++ // The lengths default to the values for when not replacing.
++ oldlen = 0;
++ newlen = charlen;
++
++ if (State & REPLACE_FLAG)
++ {
++ if (State & VREPLACE_FLAG)
++ {
++ colnr_T new_vcol = 0; // init for GCC
++ colnr_T vcol;
++ int old_list;
++
++ // Disable 'list' temporarily, unless 'cpo' contains the 'L' flag.
++ // Returns the old value of list, so when finished,
++ // curwin->w_p_list should be set back to this.
++ old_list = curwin->w_p_list;
++ if (old_list && vim_strchr(p_cpo, CPO_LISTWM) == NULL)
++ curwin->w_p_list = FALSE;
++
++ // In virtual replace mode each character may replace one or more
++ // characters (zero if it's a TAB). Count the number of bytes to
++ // be deleted to make room for the new character, counting screen
++ // cells. May result in adding spaces to fill a gap.
++ getvcol(curwin, &curwin->w_cursor, NULL, &vcol, NULL);
++ new_vcol = vcol + chartabsize(buf, vcol);
++ while (oldp[col + oldlen] != NUL && vcol < new_vcol)
++ {
++ vcol += chartabsize(oldp + col + oldlen, vcol);
++ // Don't need to remove a TAB that takes us to the right
++ // position.
++ if (vcol > new_vcol && oldp[col + oldlen] == TAB)
++ break;
++ oldlen += (*mb_ptr2len)(oldp + col + oldlen);
++ // Deleted a bit too much, insert spaces.
++ if (vcol > new_vcol)
++ newlen += vcol - new_vcol;
++ }
++ curwin->w_p_list = old_list;
++ }
++ else if (oldp[col] != NUL)
++ {
++ // normal replace
++ oldlen = (*mb_ptr2len)(oldp + col);
++ }
++
++
++ // Push the replaced bytes onto the replace stack, so that they can be
++ // put back when BS is used. The bytes of a multi-byte character are
++ // done the other way around, so that the first byte is popped off
++ // first (it tells the byte length of the character).
++ replace_push(NUL);
++ for (i = 0; i < oldlen; ++i)
++ {
++ if (has_mbyte)
++ i += replace_push_mb(oldp + col + i) - 1;
++ else
++ replace_push(oldp[col + i]);
++ }
++ }
++
++ newp = alloc_check((unsigned)(linelen + newlen - oldlen));
++ if (newp == NULL)
++ return;
++
++ // Copy bytes before the cursor.
++ if (col > 0)
++ mch_memmove(newp, oldp, (size_t)col);
++
++ // Copy bytes after the changed character(s).
++ p = newp + col;
++ if (linelen > col + oldlen)
++ mch_memmove(p + newlen, oldp + col + oldlen,
++ (size_t)(linelen - col - oldlen));
++
++ // Insert or overwrite the new character.
++ mch_memmove(p, buf, charlen);
++ i = charlen;
++
++ // Fill with spaces when necessary.
++ while (i < newlen)
++ p[i++] = ' ';
++
++ // Replace the line in the buffer.
++ ml_replace(lnum, newp, FALSE);
++
++ // mark the buffer as changed and prepare for displaying
++ inserted_bytes(lnum, col, newlen - oldlen);
++
++ // If we're in Insert or Replace mode and 'showmatch' is set, then briefly
++ // show the match for right parens and braces.
++ if (p_sm && (State & INSERT)
++ && msg_silent == 0
++ #ifdef FEAT_INS_EXPAND
++ && !ins_compl_active()
++ #endif
++ )
++ {
++ if (has_mbyte)
++ showmatch(mb_ptr2char(buf));
++ else
++ showmatch(c);
++ }
++
++ #ifdef FEAT_RIGHTLEFT
++ if (!p_ri || (State & REPLACE_FLAG))
++ #endif
++ {
++ // Normal insert: move cursor right
++ curwin->w_cursor.col += charlen;
++ }
++
++ // TODO: should try to update w_row here, to avoid recomputing it later.
++ }
++
++ /*
++ * Insert a string at the cursor position.
++ * Note: Does NOT handle Replace mode.
++ * Caller must have prepared for undo.
++ */
++ void
++ ins_str(char_u *s)
++ {
++ char_u *oldp, *newp;
++ int newlen = (int)STRLEN(s);
++ int oldlen;
++ colnr_T col;
++ linenr_T lnum = curwin->w_cursor.lnum;
++
++ if (virtual_active() && curwin->w_cursor.coladd > 0)
++ coladvance_force(getviscol());
++
++ col = curwin->w_cursor.col;
++ oldp = ml_get(lnum);
++ oldlen = (int)STRLEN(oldp);
++
++ newp = alloc_check((unsigned)(oldlen + newlen + 1));
++ if (newp == NULL)
++ return;
++ if (col > 0)
++ mch_memmove(newp, oldp, (size_t)col);
++ mch_memmove(newp + col, s, (size_t)newlen);
++ mch_memmove(newp + col + newlen, oldp + col, (size_t)(oldlen - col + 1));
++ ml_replace(lnum, newp, FALSE);
++ inserted_bytes(lnum, col, newlen);
++ curwin->w_cursor.col += newlen;
++ }
++
++ /*
++ * Delete one character under the cursor.
++ * If "fixpos" is TRUE, don't leave the cursor on the NUL after the line.
++ * Caller must have prepared for undo.
++ *
++ * return FAIL for failure, OK otherwise
++ */
++ int
++ del_char(int fixpos)
++ {
++ if (has_mbyte)
++ {
++ // Make sure the cursor is at the start of a character.
++ mb_adjust_cursor();
++ if (*ml_get_cursor() == NUL)
++ return FAIL;
++ return del_chars(1L, fixpos);
++ }
++ return del_bytes(1L, fixpos, TRUE);
++ }
++
++ /*
++ * Like del_bytes(), but delete characters instead of bytes.
++ */
++ int
++ del_chars(long count, int fixpos)
++ {
++ long bytes = 0;
++ long i;
++ char_u *p;
++ int l;
++
++ p = ml_get_cursor();
++ for (i = 0; i < count && *p != NUL; ++i)
++ {
++ l = (*mb_ptr2len)(p);
++ bytes += l;
++ p += l;
++ }
++ return del_bytes(bytes, fixpos, TRUE);
++ }
++
++ /*
++ * Delete "count" bytes under the cursor.
++ * If "fixpos" is TRUE, don't leave the cursor on the NUL after the line.
++ * Caller must have prepared for undo.
++ *
++ * Return FAIL for failure, OK otherwise.
++ */
++ int
++ del_bytes(
++ long count,
++ int fixpos_arg,
++ int use_delcombine UNUSED) // 'delcombine' option applies
++ {
++ 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;
++
++ oldp = ml_get(lnum);
++ oldlen = (int)STRLEN(oldp);
++
++ // Can't do anything when the cursor is on the NUL after the line.
++ if (col >= oldlen)
++ return FAIL;
++
++ // If "count" is zero there is nothing to do.
++ if (count == 0)
++ return OK;
++
++ // If "count" is negative the caller must be doing something wrong.
++ if (count < 1)
++ {
++ siemsg("E950: Invalid count for del_bytes(): %ld", count);
++ return FAIL;
++ }
++
++ // If 'delcombine' is set and deleting (less than) one character, only
++ // delete the last combining character.
++ if (p_deco && use_delcombine && enc_utf8
++ && utfc_ptr2len(oldp + col) >= count)
++ {
++ int cc[MAX_MCO];
++ int n;
++
++ (void)utfc_ptr2char(oldp + col, cc);
++ if (cc[0] != NUL)
++ {
++ // Find the last composing char, there can be several.
++ n = col;
++ do
++ {
++ col = n;
++ count = utf_ptr2len(oldp + n);
++ n += count;
++ } while (UTF_COMPOSINGLIKE(oldp + col, oldp + n));
++ fixpos = 0;
++ }
++ }
++
++ // When count is too big, reduce it.
++ movelen = (long)oldlen - (long)col - count + 1; // includes trailing NUL
++ if (movelen <= 1)
++ {
++ // If we just took off the last character of a non-blank line, and
++ // fixpos is TRUE, we don't want to end up positioned at the NUL,
++ // unless "restart_edit" is set or 'virtualedit' contains "onemore".
++ if (col > 0 && fixpos && restart_edit == 0
++ && (ve_flags & VE_ONEMORE) == 0)
++ {
++ --curwin->w_cursor.col;
++ curwin->w_cursor.coladd = 0;
++ if (has_mbyte)
++ curwin->w_cursor.col -=
++ (*mb_head_off)(oldp, oldp + curwin->w_cursor.col);
++ }
++ count = oldlen - col;
++ movelen = 1;
++ }
++ newlen = oldlen - count;
++
++ // If the old line has been allocated the deletion can be done in the
++ // existing line. Otherwise a new line has to be allocated
++ // Can't do this when using Netbeans, because we would need to invoke
++ // netbeans_removed(), which deallocates the line. Let ml_replace() take
++ // care of notifying Netbeans.
++ #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
++ inserted_bytes(lnum, curwin->w_cursor.col, -count);
++
++ return OK;
++ }
++
++ /*
++ * Copy the indent from ptr to the current line (and fill to size)
++ * Leaves the cursor on the first non-blank in the line.
++ * Returns TRUE if the line was changed.
++ */
++ static int
++ copy_indent(int size, char_u *src)
++ {
++ char_u *p = NULL;
++ char_u *line = NULL;
++ char_u *s;
++ int todo;
++ int ind_len;
++ int line_len = 0;
++ int tab_pad;
++ int ind_done;
++ int round;
++ #ifdef FEAT_VARTABS
++ int ind_col;
++ #endif
++
++ // Round 1: compute the number of characters needed for the indent
++ // Round 2: copy the characters.
++ for (round = 1; round <= 2; ++round)
++ {
++ todo = size;
++ ind_len = 0;
++ ind_done = 0;
++ #ifdef FEAT_VARTABS
++ ind_col = 0;
++ #endif
++ s = src;
++
++ // Count/copy the usable portion of the source line
++ while (todo > 0 && VIM_ISWHITE(*s))
++ {
++ if (*s == TAB)
++ {
++ #ifdef FEAT_VARTABS
++ tab_pad = tabstop_padding(ind_done, curbuf->b_p_ts,
++ curbuf->b_p_vts_array);
++ #else
++ tab_pad = (int)curbuf->b_p_ts
++ - (ind_done % (int)curbuf->b_p_ts);
++ #endif
++ // Stop if this tab will overshoot the target
++ if (todo < tab_pad)
++ break;
++ todo -= tab_pad;
++ ind_done += tab_pad;
++ #ifdef FEAT_VARTABS
++ ind_col += tab_pad;
++ #endif
++ }
++ else
++ {
++ --todo;
++ ++ind_done;
++ #ifdef FEAT_VARTABS
++ ++ind_col;
++ #endif
++ }
++ ++ind_len;
++ if (p != NULL)
++ *p++ = *s;
++ ++s;
++ }
++
++ // Fill to next tabstop with a tab, if possible
++ #ifdef FEAT_VARTABS
++ tab_pad = tabstop_padding(ind_done, curbuf->b_p_ts,
++ curbuf->b_p_vts_array);
++ #else
++ tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts);
++ #endif
++ if (todo >= tab_pad && !curbuf->b_p_et)
++ {
++ todo -= tab_pad;
++ ++ind_len;
++ #ifdef FEAT_VARTABS
++ ind_col += tab_pad;
++ #endif
++ if (p != NULL)
++ *p++ = TAB;
++ }
++
++ // Add tabs required for indent
++ if (!curbuf->b_p_et)
++ {
++ #ifdef FEAT_VARTABS
++ for (;;)
++ {
++ tab_pad = tabstop_padding(ind_col, curbuf->b_p_ts,
++ curbuf->b_p_vts_array);
++ if (todo < tab_pad)
++ break;
++ todo -= tab_pad;
++ ++ind_len;
++ ind_col += tab_pad;
++ if (p != NULL)
++ *p++ = TAB;
++ }
++ #else
++ while (todo >= (int)curbuf->b_p_ts)
++ {
++ todo -= (int)curbuf->b_p_ts;
++ ++ind_len;
++ if (p != NULL)
++ *p++ = TAB;
++ }
++ #endif
++ }
++
++ // Count/add spaces required for indent
++ while (todo > 0)
++ {
++ --todo;
++ ++ind_len;
++ if (p != NULL)
++ *p++ = ' ';
++ }
++
++ if (p == NULL)
++ {
++ // Allocate memory for the result: the copied indent, new indent
++ // and the rest of the line.
++ line_len = (int)STRLEN(ml_get_curline()) + 1;
++ line = alloc(ind_len + line_len);
++ if (line == NULL)
++ return FALSE;
++ p = line;
++ }
++ }
++
++ // Append the original line
++ mch_memmove(p, ml_get_curline(), (size_t)line_len);
++
++ // Replace the line
++ ml_replace(curwin->w_cursor.lnum, line, FALSE);
++
++ // Put the cursor after the indent.
++ curwin->w_cursor.col = ind_len;
++ return TRUE;
++ }
++
++ /*
++ * open_line: Add a new line below or above the current line.
++ *
++ * For VREPLACE mode, we only add a new line when we get to the end of the
++ * file, otherwise we just start replacing the next line.
++ *
++ * Caller must take care of undo. Since VREPLACE may affect any number of
++ * lines however, it may call u_save_cursor() again when starting to change a
++ * new line.
++ * "flags": OPENLINE_DELSPACES delete spaces after cursor
++ * OPENLINE_DO_COM format comments
++ * OPENLINE_KEEPTRAIL keep trailing spaces
++ * OPENLINE_MARKFIX adjust mark positions after the line break
++ * OPENLINE_COM_LIST format comments with list or 2nd line indent
++ *
++ * "second_line_indent": indent for after ^^D in Insert mode or if flag
++ * OPENLINE_COM_LIST
++ *
++ * Return OK for success, FAIL for failure
++ */
++ int
++ open_line(
++ int dir, // FORWARD or BACKWARD
++ int flags,
++ int second_line_indent)
++ {
++ char_u *saved_line; // copy of the original line
++ char_u *next_line = NULL; // copy of the next line
++ char_u *p_extra = NULL; // what goes to next line
++ int less_cols = 0; // less columns for mark in new line
++ int less_cols_off = 0; // columns to skip for mark adjust
++ pos_T old_cursor; // old cursor position
++ int newcol = 0; // new cursor column
++ int newindent = 0; // auto-indent of the new line
++ int n;
++ int trunc_line = FALSE; // truncate current line afterwards
++ int retval = FAIL; // return value
++ #ifdef FEAT_COMMENTS
++ int extra_len = 0; // length of p_extra string
++ int lead_len; // length of comment leader
++ char_u *lead_flags; // position in 'comments' for comment leader
++ char_u *leader = NULL; // copy of comment leader
++ #endif
++ char_u *allocated = NULL; // allocated memory
++ char_u *p;
++ int saved_char = NUL; // init for GCC
++ #if defined(FEAT_SMARTINDENT) || defined(FEAT_COMMENTS)
++ pos_T *pos;
++ #endif
++ #ifdef FEAT_SMARTINDENT
++ int do_si = (!p_paste && curbuf->b_p_si
++ # ifdef FEAT_CINDENT
++ && !curbuf->b_p_cin
++ # endif
++ # ifdef FEAT_EVAL
++ && *curbuf->b_p_inde == NUL
++ # endif
++ );
++ 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
++ int saved_pi = curbuf->b_p_pi; // copy of preserveindent setting
++
++ // make a copy of the current line so we can mess with it
++ saved_line = vim_strsave(ml_get_curline());
++ if (saved_line == NULL) /* out of memory! */
++ return FALSE;
++
++ if (State & VREPLACE_FLAG)
++ {
++ // With VREPLACE we make a copy of the next line, which we will be
++ // starting to replace. First make the new line empty and let vim play
++ // with the indenting and comment leader to its heart's content. Then
++ // we grab what it ended up putting on the new line, put back the
++ // original line, and call ins_char() to put each new character onto
++ // the line, replacing what was there before and pushing the right
++ // stuff onto the replace stack. -- webb.
++ if (curwin->w_cursor.lnum < orig_line_count)
++ next_line = vim_strsave(ml_get(curwin->w_cursor.lnum + 1));
++ else
++ next_line = vim_strsave((char_u *)"");
++ if (next_line == NULL) // out of memory!
++ goto theend;
++
++ // In VREPLACE mode, a NL replaces the rest of the line, and starts
++ // replacing the next line, so push all of the characters left on the
++ // line onto the replace stack. We'll push any other characters that
++ // might be replaced at the start of the next line (due to autoindent
++ // etc) a bit later.
++ replace_push(NUL); // Call twice because BS over NL expects it
++ replace_push(NUL);
++ p = saved_line + curwin->w_cursor.col;
++ while (*p != NUL)
++ {
++ if (has_mbyte)
++ p += replace_push_mb(p);
++ else
++ replace_push(*p++);
++ }
++ saved_line[curwin->w_cursor.col] = NUL;
++ }
++
++ if ((State & INSERT) && !(State & VREPLACE_FLAG))
++ {
++ p_extra = saved_line + curwin->w_cursor.col;
++ #ifdef FEAT_SMARTINDENT
++ if (do_si) // need first char after new line break
++ {
++ p = skipwhite(p_extra);
++ first_char = *p;
++ }
++ #endif
++ #ifdef FEAT_COMMENTS
++ extra_len = (int)STRLEN(p_extra);
++ #endif
++ saved_char = *p_extra;
++ *p_extra = NUL;
++ }
++
++ u_clearline(); // cannot do "U" command when adding lines
++ #ifdef FEAT_SMARTINDENT
++ did_si = FALSE;
++ #endif
++ ai_col = 0;
++
++ // If we just did an auto-indent, then we didn't type anything on
++ // the prior line, and it should be truncated. Do this even if 'ai' is not
++ // set because automatically inserting a comment leader also sets did_ai.
++ if (dir == FORWARD && did_ai)
++ trunc_line = TRUE;
++
++ // If 'autoindent' and/or 'smartindent' is set, try to figure out what
++ // indent to use for the new line.
++ if (curbuf->b_p_ai
++ #ifdef FEAT_SMARTINDENT
++ || do_si
++ #endif
++ )
++ {
++ // count white space on current line
++ #ifdef FEAT_VARTABS
++ newindent = get_indent_str_vtab(saved_line, curbuf->b_p_ts,
++ curbuf->b_p_vts_array, FALSE);
++ #else
++ newindent = get_indent_str(saved_line, (int)curbuf->b_p_ts, FALSE);
++ #endif
++ if (newindent == 0 && !(flags & OPENLINE_COM_LIST))
++ newindent = second_line_indent; // for ^^D command in insert mode
++
++ #ifdef FEAT_SMARTINDENT
++ // Do smart indenting.
++ // In insert/replace mode (only when dir == FORWARD)
++ // we may move some text to the next line. If it starts with '{'
++ // don't add an indent. Fixes inserting a NL before '{' in line
++ // "if (condition) {"
++ if (!trunc_line && do_si && *saved_line != NUL
++ && (p_extra == NULL || first_char != '{'))
++ {
++ char_u *ptr;
++ char_u last_char;
++
++ old_cursor = curwin->w_cursor;
++ ptr = saved_line;
++ # ifdef FEAT_COMMENTS
++ if (flags & OPENLINE_DO_COM)
++ lead_len = get_leader_len(ptr, NULL, FALSE, TRUE);
++ else
++ lead_len = 0;
++ # endif
++ if (dir == FORWARD)
++ {
++ // Skip preprocessor directives, unless they are
++ // recognised as comments.
++ if (
++ # ifdef FEAT_COMMENTS
++ lead_len == 0 &&
++ # endif
++ ptr[0] == '#')
++ {
++ while (ptr[0] == '#' && curwin->w_cursor.lnum > 1)
++ ptr = ml_get(--curwin->w_cursor.lnum);
++ newindent = get_indent();
++ }
++ # ifdef FEAT_COMMENTS
++ if (flags & OPENLINE_DO_COM)
++ lead_len = get_leader_len(ptr, NULL, FALSE, TRUE);
++ else
++ lead_len = 0;
++ if (lead_len > 0)
++ {
++ // This case gets the following right:
++ // /*
++ // * A comment (read '\' as '/').
++ // */
++ // #define IN_THE_WAY
++ // This should line up here;
++ p = skipwhite(ptr);
++ if (p[0] == '/' && p[1] == '*')
++ p++;
++ if (p[0] == '*')
++ {
++ for (p++; *p; p++)
++ {
++ if (p[0] == '/' && p[-1] == '*')
++ {
++ // End of C comment, indent should line up
++ // with the line containing the start of
++ // the comment
++ curwin->w_cursor.col = (colnr_T)(p - ptr);
++ if ((pos = findmatch(NULL, NUL)) != NULL)
++ {
++ curwin->w_cursor.lnum = pos->lnum;
++ newindent = get_indent();
++ }
++ }
++ }
++ }
++ }
++ else // Not a comment line
++ # endif
++ {
++ // Find last non-blank in line
++ p = ptr + STRLEN(ptr) - 1;
++ while (p > ptr && VIM_ISWHITE(*p))
++ --p;
++ last_char = *p;
++
++ // find the character just before the '{' or ';'
++ if (last_char == '{' || last_char == ';')
++ {
++ if (p > ptr)
++ --p;
++ while (p > ptr && VIM_ISWHITE(*p))
++ --p;
++ }
++ // Try to catch lines that are split over multiple
++ // lines. eg:
++ // if (condition &&
++ // condition) {
++ // Should line up here!
++ // }
++ if (*p == ')')
++ {
++ curwin->w_cursor.col = (colnr_T)(p - ptr);
++ if ((pos = findmatch(NULL, '(')) != NULL)
++ {
++ curwin->w_cursor.lnum = pos->lnum;
++ newindent = get_indent();
++ ptr = ml_get_curline();
++ }
++ }
++ // If last character is '{' do indent, without
++ // checking for "if" and the like.
++ if (last_char == '{')
++ {
++ did_si = TRUE; // do indent
++ no_si = TRUE; // don't delete it when '{' typed
++ }
++ // Look for "if" and the like, use 'cinwords'.
++ // Don't do this if the previous line ended in ';' or
++ // '}'.
++ else if (last_char != ';' && last_char != '}'
++ && cin_is_cinword(ptr))
++ did_si = TRUE;
++ }
++ }
++ else // dir == BACKWARD
++ {
++ // Skip preprocessor directives, unless they are
++ // recognised as comments.
++ if (
++ # ifdef FEAT_COMMENTS
++ lead_len == 0 &&
++ # endif
++ ptr[0] == '#')
++ {
++ int was_backslashed = FALSE;
++
++ while ((ptr[0] == '#' || was_backslashed) &&
++ curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
++ {
++ if (*ptr && ptr[STRLEN(ptr) - 1] == '\\')
++ was_backslashed = TRUE;
++ else
++ was_backslashed = FALSE;
++ ptr = ml_get(++curwin->w_cursor.lnum);
++ }
++ if (was_backslashed)
++ newindent = 0; // Got to end of file
++ else
++ newindent = get_indent();
++ }
++ p = skipwhite(ptr);
++ if (*p == '}') // if line starts with '}': do indent
++ did_si = TRUE;
++ else // can delete indent when '{' typed
++ can_si_back = TRUE;
++ }
++ curwin->w_cursor = old_cursor;
++ }
++ if (do_si)
++ can_si = TRUE;
++ #endif // FEAT_SMARTINDENT
++
++ did_ai = TRUE;
++ }
++
++ #ifdef FEAT_COMMENTS
++ // Find out if the current line starts with a comment leader.
++ // This may then be inserted in front of the new line.
++ end_comment_pending = NUL;
++ if (flags & OPENLINE_DO_COM)
++ lead_len = get_leader_len(saved_line, &lead_flags,
++ dir == BACKWARD, TRUE);
++ else
++ lead_len = 0;
++ if (lead_len > 0)
++ {
++ char_u *lead_repl = NULL; // replaces comment leader
++ int lead_repl_len = 0; // length of *lead_repl
++ char_u lead_middle[COM_MAX_LEN]; // middle-comment string
++ char_u lead_end[COM_MAX_LEN]; // end-comment string
++ char_u *comment_end = NULL; // where lead_end has been found
++ int extra_space = FALSE; // append extra space
++ int current_flag;
++ int require_blank = FALSE; // requires blank after middle
++ char_u *p2;
++
++ // If the comment leader has the start, middle or end flag, it may not
++ // be used or may be replaced with the middle leader.
++ for (p = lead_flags; *p && *p != ':'; ++p)
++ {
++ if (*p == COM_BLANK)
++ {
++ require_blank = TRUE;
++ continue;
++ }
++ if (*p == COM_START || *p == COM_MIDDLE)
++ {
++ current_flag = *p;
++ if (*p == COM_START)
++ {
++ // Doing "O" on a start of comment does not insert leader.
++ if (dir == BACKWARD)
++ {
++ lead_len = 0;
++ break;
++ }
++
++ // find start of middle part
++ (void)copy_option_part(&p, lead_middle, COM_MAX_LEN, ",");
++ require_blank = FALSE;
++ }
++
++ // Isolate the strings of the middle and end leader.
++ while (*p && p[-1] != ':') /* find end of middle flags */
++ {
++ if (*p == COM_BLANK)
++ require_blank = TRUE;
++ ++p;
++ }
++ (void)copy_option_part(&p, lead_middle, COM_MAX_LEN, ",");
++
++ while (*p && p[-1] != ':') // find end of end flags
++ {
++ // Check whether we allow automatic ending of comments
++ if (*p == COM_AUTO_END)
++ end_comment_pending = -1; // means we want to set it
++ ++p;
++ }
++ n = copy_option_part(&p, lead_end, COM_MAX_LEN, ",");
++
++ if (end_comment_pending == -1) // we can set it now
++ end_comment_pending = lead_end[n - 1];
++
++ // If the end of the comment is in the same line, don't use
++ // the comment leader.
++ if (dir == FORWARD)
++ {
++ for (p = saved_line + lead_len; *p; ++p)
++ if (STRNCMP(p, lead_end, n) == 0)
++ {
++ comment_end = p;
++ lead_len = 0;
++ break;
++ }
++ }
++
++ // Doing "o" on a start of comment inserts the middle leader.
++ if (lead_len > 0)
++ {
++ if (current_flag == COM_START)
++ {
++ lead_repl = lead_middle;
++ lead_repl_len = (int)STRLEN(lead_middle);
++ }
++
++ // If we have hit RETURN immediately after the start
++ // comment leader, then put a space after the middle
++ // comment leader on the next line.
++ if (!VIM_ISWHITE(saved_line[lead_len - 1])
++ && ((p_extra != NULL
++ && (int)curwin->w_cursor.col == lead_len)
++ || (p_extra == NULL
++ && saved_line[lead_len] == NUL)
++ || require_blank))
++ extra_space = TRUE;
++ }
++ break;
++ }
++ if (*p == COM_END)
++ {
++ // Doing "o" on the end of a comment does not insert leader.
++ // Remember where the end is, might want to use it to find the
++ // start (for C-comments).
++ if (dir == FORWARD)
++ {
++ comment_end = skipwhite(saved_line);
++ lead_len = 0;
++ break;
++ }
++
++ // Doing "O" on the end of a comment inserts the middle leader.
++ // Find the string for the middle leader, searching backwards.
++ while (p > curbuf->b_p_com && *p != ',')
++ --p;
++ for (lead_repl = p; lead_repl > curbuf->b_p_com
++ && lead_repl[-1] != ':'; --lead_repl)
++ ;
++ lead_repl_len = (int)(p - lead_repl);
++
++ // We can probably always add an extra space when doing "O" on
++ // the comment-end
++ extra_space = TRUE;
++
++ // Check whether we allow automatic ending of comments
++ for (p2 = p; *p2 && *p2 != ':'; p2++)
++ {
++ if (*p2 == COM_AUTO_END)
++ end_comment_pending = -1; // means we want to set it
++ }
++ if (end_comment_pending == -1)
++ {
++ // Find last character in end-comment string
++ while (*p2 && *p2 != ',')
++ p2++;
++ end_comment_pending = p2[-1];
++ }
++ break;
++ }
++ if (*p == COM_FIRST)
++ {
++ // Comment leader for first line only: Don't repeat leader
++ // when using "O", blank out leader when using "o".
++ if (dir == BACKWARD)
++ lead_len = 0;
++ else
++ {
++ lead_repl = (char_u *)"";
++ lead_repl_len = 0;
++ }
++ break;
++ }
++ }
++ if (lead_len)
++ {
++ // allocate buffer (may concatenate p_extra later)
++ leader = alloc(lead_len + lead_repl_len + extra_space + extra_len
++ + (second_line_indent > 0 ? second_line_indent : 0) + 1);
++ allocated = leader; // remember to free it later
++
++ if (leader == NULL)
++ lead_len = 0;
++ else
++ {
++ vim_strncpy(leader, saved_line, lead_len);
++
++ // Replace leader with lead_repl, right or left adjusted
++ if (lead_repl != NULL)
++ {
++ int c = 0;
++ int off = 0;
++
++ for (p = lead_flags; *p != NUL && *p != ':'; )
++ {
++ if (*p == COM_RIGHT || *p == COM_LEFT)
++ c = *p++;
++ else if (VIM_ISDIGIT(*p) || *p == '-')
++ off = getdigits(&p);
++ else
++ ++p;
++ }
++ if (c == COM_RIGHT) // right adjusted leader
++ {
++ // find last non-white in the leader to line up with
++ for (p = leader + lead_len - 1; p > leader
++ && VIM_ISWHITE(*p); --p)
++ ;
++ ++p;
++
++ // Compute the length of the replaced characters in
++ // screen characters, not bytes.
++ {
++ int repl_size = vim_strnsize(lead_repl,
++ lead_repl_len);
++ int old_size = 0;
++ char_u *endp = p;
++ int l;
++
++ while (old_size < repl_size && p > leader)
++ {
++ MB_PTR_BACK(leader, p);
++ old_size += ptr2cells(p);
++ }
++ l = lead_repl_len - (int)(endp - p);
++ if (l != 0)
++ mch_memmove(endp + l, endp,
++ (size_t)((leader + lead_len) - endp));
++ lead_len += l;
++ }
++ mch_memmove(p, lead_repl, (size_t)lead_repl_len);
++ if (p + lead_repl_len > leader + lead_len)
++ p[lead_repl_len] = NUL;
++
++ // blank-out any other chars from the old leader.
++ while (--p >= leader)
++ {
++ int l = mb_head_off(leader, p);
++
++ if (l > 1)
++ {
++ p -= l;
++ if (ptr2cells(p) > 1)
++ {
++ p[1] = ' ';
++ --l;
++ }
++ mch_memmove(p + 1, p + l + 1,
++ (size_t)((leader + lead_len) - (p + l + 1)));
++ lead_len -= l;
++ *p = ' ';
++ }
++ else if (!VIM_ISWHITE(*p))
++ *p = ' ';
++ }
++ }
++ else // left adjusted leader
++ {
++ p = skipwhite(leader);
++
++ // Compute the length of the replaced characters in
++ // screen characters, not bytes. Move the part that is
++ // not to be overwritten.
++ {
++ int repl_size = vim_strnsize(lead_repl,
++ lead_repl_len);
++ int i;
++ int l;
++
++ for (i = 0; i < lead_len && p[i] != NUL; i += l)
++ {
++ l = (*mb_ptr2len)(p + i);
++ if (vim_strnsize(p, i + l) > repl_size)
++ break;
++ }
++ if (i != lead_repl_len)
++ {
++ mch_memmove(p + lead_repl_len, p + i,
++ (size_t)(lead_len - i - (p - leader)));
++ lead_len += lead_repl_len - i;
++ }
++ }
++ mch_memmove(p, lead_repl, (size_t)lead_repl_len);
++
++ // Replace any remaining non-white chars in the old
++ // leader by spaces. Keep Tabs, the indent must
++ // remain the same.
++ for (p += lead_repl_len; p < leader + lead_len; ++p)
++ if (!VIM_ISWHITE(*p))
++ {
++ // Don't put a space before a TAB.
++ if (p + 1 < leader + lead_len && p[1] == TAB)
++ {
++ --lead_len;
++ mch_memmove(p, p + 1,
++ (leader + lead_len) - p);
++ }
++ else
++ {
++ int l = (*mb_ptr2len)(p);
++
++ if (l > 1)
++ {
++ if (ptr2cells(p) > 1)
++ {
++ // Replace a double-wide char with
++ // two spaces
++ --l;
++ *p++ = ' ';
++ }
++ mch_memmove(p + 1, p + l,
++ (leader + lead_len) - p);
++ lead_len -= l - 1;
++ }
++ *p = ' ';
++ }
++ }
++ *p = NUL;
++ }
++
++ // Recompute the indent, it may have changed.
++ if (curbuf->b_p_ai
++ #ifdef FEAT_SMARTINDENT
++ || do_si
++ #endif
++ )
++ #ifdef FEAT_VARTABS
++ newindent = get_indent_str_vtab(leader, curbuf->b_p_ts,
++ curbuf->b_p_vts_array, FALSE);
++ #else
++ newindent = get_indent_str(leader,
++ (int)curbuf->b_p_ts, FALSE);
++ #endif
++
++ // Add the indent offset
++ if (newindent + off < 0)
++ {
++ off = -newindent;
++ newindent = 0;
++ }
++ else
++ newindent += off;
++
++ // Correct trailing spaces for the shift, so that
++ // alignment remains equal.
++ while (off > 0 && lead_len > 0
++ && leader[lead_len - 1] == ' ')
++ {
++ // Don't do it when there is a tab before the space
++ if (vim_strchr(skipwhite(leader), '\t') != NULL)
++ break;
++ --lead_len;
++ --off;
++ }
++
++ // If the leader ends in white space, don't add an
++ // extra space
++ if (lead_len > 0 && VIM_ISWHITE(leader[lead_len - 1]))
++ extra_space = FALSE;
++ leader[lead_len] = NUL;
++ }
++
++ if (extra_space)
++ {
++ leader[lead_len++] = ' ';
++ leader[lead_len] = NUL;
++ }
++
++ newcol = lead_len;
++
++ // if a new indent will be set below, remove the indent that
++ // is in the comment leader
++ if (newindent
++ #ifdef FEAT_SMARTINDENT
++ || did_si
++ #endif
++ )
++ {
++ while (lead_len && VIM_ISWHITE(*leader))
++ {
++ --lead_len;
++ --newcol;
++ ++leader;
++ }
++ }
++
++ }
++ #ifdef FEAT_SMARTINDENT
++ did_si = can_si = FALSE;
++ #endif
++ }
++ else if (comment_end != NULL)
++ {
++ // We have finished a comment, so we don't use the leader.
++ // If this was a C-comment and 'ai' or 'si' is set do a normal
++ // indent to align with the line containing the start of the
++ // comment.
++ if (comment_end[0] == '*' && comment_end[1] == '/' &&
++ (curbuf->b_p_ai
++ #ifdef FEAT_SMARTINDENT
++ || do_si
++ #endif
++ ))
++ {
++ old_cursor = curwin->w_cursor;
++ curwin->w_cursor.col = (colnr_T)(comment_end - saved_line);
++ if ((pos = findmatch(NULL, NUL)) != NULL)
++ {
++ curwin->w_cursor.lnum = pos->lnum;
++ newindent = get_indent();
++ }
++ curwin->w_cursor = old_cursor;
++ }
++ }
++ }
++ #endif
++
++ // (State == INSERT || State == REPLACE), only when dir == FORWARD
++ if (p_extra != NULL)
++ {
++ *p_extra = saved_char; // restore char that NUL replaced
++
++ // When 'ai' set or "flags" has OPENLINE_DELSPACES, skip to the first
++ // non-blank.
++ //
++ // When in REPLACE mode, put the deleted blanks on the replace stack,
++ // preceded by a NUL, so they can be put back when a BS is entered.
++ if (REPLACE_NORMAL(State))
++ replace_push(NUL); /* end of extra blanks */
++ if (curbuf->b_p_ai || (flags & OPENLINE_DELSPACES))
++ {
++ while ((*p_extra == ' ' || *p_extra == '\t')
++ && (!enc_utf8
++ || !utf_iscomposing(utf_ptr2char(p_extra + 1))))
++ {
++ if (REPLACE_NORMAL(State))
++ replace_push(*p_extra);
++ ++p_extra;
++ ++less_cols_off;
++ }
++ }
++
++ // columns for marks adjusted for removed columns
++ less_cols = (int)(p_extra - saved_line);
++ }
++
++ if (p_extra == NULL)
++ p_extra = (char_u *)""; // append empty line
++
++ #ifdef FEAT_COMMENTS
++ // concatenate leader and p_extra, if there is a leader
++ if (lead_len)
++ {
++ if (flags & OPENLINE_COM_LIST && second_line_indent > 0)
++ {
++ int i;
++ int padding = second_line_indent
++ - (newindent + (int)STRLEN(leader));
++
++ // Here whitespace is inserted after the comment char.
++ // Below, set_indent(newindent, SIN_INSERT) will insert the
++ // whitespace needed before the comment char.
++ for (i = 0; i < padding; i++)
++ {
++ STRCAT(leader, " ");
++ less_cols--;
++ newcol++;
++ }
++ }
++ STRCAT(leader, p_extra);
++ p_extra = leader;
++ did_ai = TRUE; // So truncating blanks works with comments
++ less_cols -= lead_len;
++ }
++ else
++ end_comment_pending = NUL; // turns out there was no leader
++ #endif
++
++ old_cursor = curwin->w_cursor;
++ if (dir == BACKWARD)
++ --curwin->w_cursor.lnum;
++ if (!(State & VREPLACE_FLAG) || old_cursor.lnum >= orig_line_count)
++ {
++ if (ml_append(curwin->w_cursor.lnum, p_extra, (colnr_T)0, FALSE)
++ == FAIL)
++ goto theend;
++ // Postpone calling changed_lines(), because it would mess up folding
++ // with markers.
++ // Skip mark_adjust when adding a line after the last one, there can't
++ // be marks there. But still needed in diff mode.
++ if (curwin->w_cursor.lnum + 1 < curbuf->b_ml.ml_line_count
++ #ifdef FEAT_DIFF
++ || curwin->w_p_diff
++ #endif
++ )
++ mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
++ did_append = TRUE;
++ }
++ else
++ {
++ // In VREPLACE mode we are starting to replace the next line.
++ curwin->w_cursor.lnum++;
++ if (curwin->w_cursor.lnum >= Insstart.lnum + vr_lines_changed)
++ {
++ // In case we NL to a new line, BS to the previous one, and NL
++ // again, we don't want to save the new line for undo twice.
++ (void)u_save_cursor(); /* errors are ignored! */
++ vr_lines_changed++;
++ }
++ ml_replace(curwin->w_cursor.lnum, p_extra, TRUE);
++ changed_bytes(curwin->w_cursor.lnum, 0);
++ curwin->w_cursor.lnum--;
++ did_append = FALSE;
++ }
++
++ if (newindent
++ #ifdef FEAT_SMARTINDENT
++ || did_si
++ #endif
++ )
++ {
++ ++curwin->w_cursor.lnum;
++ #ifdef FEAT_SMARTINDENT
++ if (did_si)
++ {
++ int sw = (int)get_sw_value(curbuf);
++
++ if (p_sr)
++ newindent -= newindent % sw;
++ newindent += sw;
++ }
++ #endif
++ // Copy the indent
++ if (curbuf->b_p_ci)
++ {
++ (void)copy_indent(newindent, saved_line);
++
++ // Set the 'preserveindent' option so that any further screwing
++ // with the line doesn't entirely destroy our efforts to preserve
++ // it. It gets restored at the function end.
++ curbuf->b_p_pi = TRUE;
++ }
++ else
++ (void)set_indent(newindent, SIN_INSERT);
++ less_cols -= curwin->w_cursor.col;
++
++ ai_col = curwin->w_cursor.col;
++
++ // In REPLACE mode, for each character in the new indent, there must
++ // be a NUL on the replace stack, for when it is deleted with BS
++ if (REPLACE_NORMAL(State))
++ for (n = 0; n < (int)curwin->w_cursor.col; ++n)
++ replace_push(NUL);
++ newcol += curwin->w_cursor.col;
++ #ifdef FEAT_SMARTINDENT
++ if (no_si)
++ did_si = FALSE;
++ #endif
++ }
++
++ #ifdef FEAT_COMMENTS
++ // In REPLACE mode, for each character in the extra leader, there must be
++ // a NUL on the replace stack, for when it is deleted with BS.
++ if (REPLACE_NORMAL(State))
++ while (lead_len-- > 0)
++ replace_push(NUL);
++ #endif
++
++ curwin->w_cursor = old_cursor;
++
++ if (dir == FORWARD)
++ {
++ if (trunc_line || (State & INSERT))
++ {
++ // truncate current line at cursor
++ saved_line[curwin->w_cursor.col] = NUL;
++ // Remove trailing white space, unless OPENLINE_KEEPTRAIL used.
++ if (trunc_line && !(flags & OPENLINE_KEEPTRAIL))
++ truncate_spaces(saved_line);
++ ml_replace(curwin->w_cursor.lnum, saved_line, FALSE);
++ saved_line = NULL;
++ if (did_append)
++ {
++ changed_lines(curwin->w_cursor.lnum, curwin->w_cursor.col,
++ curwin->w_cursor.lnum + 1, 1L);
++ did_append = FALSE;
++
++ // Move marks after the line break to the new line.
++ if (flags & OPENLINE_MARKFIX)
++ mark_col_adjust(curwin->w_cursor.lnum,
++ curwin->w_cursor.col + less_cols_off,
++ 1L, (long)-less_cols, 0);
++ }
++ else
++ changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
++ }
++
++ // Put the cursor on the new line. Careful: the scrollup() above may
++ // have moved w_cursor, we must use old_cursor.
++ curwin->w_cursor.lnum = old_cursor.lnum + 1;
++ }
++ if (did_append)
++ changed_lines(curwin->w_cursor.lnum, 0, curwin->w_cursor.lnum, 1L);
++
++ curwin->w_cursor.col = newcol;
++ curwin->w_cursor.coladd = 0;
++
++ #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
++ // normal INSERT mode.
++ if (State & VREPLACE_FLAG)
++ {
++ vreplace_mode = State; // So we know to put things right later
++ State = INSERT;
++ }
++ else
++ vreplace_mode = 0;
++ #endif
++ #ifdef FEAT_LISP
++ // May do lisp indenting.
++ if (!p_paste
++ # ifdef FEAT_COMMENTS
++ && leader == NULL
++ # endif
++ && curbuf->b_p_lisp
++ && curbuf->b_p_ai)
++ {
++ fixthisline(get_lisp_indent);
++ ai_col = (colnr_T)getwhitecols_curline();
++ }
++ #endif
++ #ifdef FEAT_CINDENT
++ // May do indenting after opening a new line.
++ if (!p_paste
++ && (curbuf->b_p_cin
++ # ifdef FEAT_EVAL
++ || *curbuf->b_p_inde != NUL
++ # endif
++ )
++ && in_cinkeys(dir == FORWARD
++ ? KEY_OPEN_FORW
++ : KEY_OPEN_BACK, ' ', linewhite(curwin->w_cursor.lnum)))
++ {
++ do_c_expr_indent();
++ 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
++ // onto the replace stack (via ins_char()).
++ if (State & VREPLACE_FLAG)
++ {
++ // Put new line in p_extra
++ p_extra = vim_strsave(ml_get_curline());
++ if (p_extra == NULL)
++ goto theend;
++
++ // Put back original line
++ ml_replace(curwin->w_cursor.lnum, next_line, FALSE);
++
++ // Insert new stuff into line again
++ curwin->w_cursor.col = 0;
++ curwin->w_cursor.coladd = 0;
++ ins_bytes(p_extra); // will call changed_bytes()
++ vim_free(p_extra);
++ next_line = NULL;
++ }
++
++ retval = OK; // success!
++ theend:
++ curbuf->b_p_pi = saved_pi;
++ vim_free(saved_line);
++ vim_free(next_line);
++ vim_free(allocated);
++ return retval;
++ }
++
++ /*
++ * Delete from cursor to end of line.
++ * Caller must have prepared for undo.
++ * If "fixpos" is TRUE fix the cursor position when done.
++ *
++ * Return FAIL for failure, OK otherwise.
++ */
++ int
++ truncate_line(int fixpos)
++ {
++ char_u *newp;
++ linenr_T lnum = curwin->w_cursor.lnum;
++ colnr_T col = curwin->w_cursor.col;
++
++ if (col == 0)
++ newp = vim_strsave((char_u *)"");
++ else
++ newp = vim_strnsave(ml_get(lnum), col);
++
++ if (newp == NULL)
++ return FAIL;
++
++ ml_replace(lnum, newp, FALSE);
++
++ // mark the buffer as changed and prepare for displaying
++ changed_bytes(lnum, curwin->w_cursor.col);
++
++ // If "fixpos" is TRUE we don't want to end up positioned at the NUL.
++ if (fixpos && curwin->w_cursor.col > 0)
++ --curwin->w_cursor.col;
++
++ return OK;
++ }
++
++ /*
++ * Delete "nlines" lines at the cursor.
++ * Saves the lines for undo first if "undo" is TRUE.
++ */
++ void
++ del_lines(long nlines, int undo)
++ {
++ long n;
++ linenr_T first = curwin->w_cursor.lnum;
++
++ if (nlines <= 0)
++ return;
++
++ // save the deleted lines for undo
++ if (undo && u_savedel(first, nlines) == FAIL)
++ return;
++
++ for (n = 0; n < nlines; )
++ {
++ if (curbuf->b_ml.ml_flags & ML_EMPTY) // nothing to delete
++ break;
++
++ ml_delete(first, TRUE);
++ ++n;
++
++ // If we delete the last line in the file, stop
++ if (first > curbuf->b_ml.ml_line_count)
++ break;
++ }
++
++ // Correct the cursor position before calling deleted_lines_mark(), it may
++ // trigger a callback to display the cursor.
++ curwin->w_cursor.col = 0;
++ check_cursor_lnum();
++
++ // adjust marks, mark the buffer as changed and prepare for displaying
++ deleted_lines_mark(first, n);
++ }
+*** ../vim-8.1.1317/src/proto/change.pro 2019-05-11 17:02:59.038341052 +0200
+--- src/proto/change.pro 2019-05-11 16:56:18.508683414 +0200
+***************
+*** 0 ****
+--- 1,24 ----
++ /* change.c */
++ void change_warning(int col);
++ void changed(void);
++ void changed_internal(void);
++ void changed_bytes(linenr_T lnum, colnr_T col);
++ void inserted_bytes(linenr_T lnum, colnr_T col, int added);
++ void appended_lines(linenr_T lnum, long count);
++ void appended_lines_mark(linenr_T lnum, long count);
++ void deleted_lines(linenr_T lnum, long count);
++ void deleted_lines_mark(linenr_T lnum, long count);
++ void changed_lines(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra);
++ void unchanged(buf_T *buf, int ff);
++ void ins_bytes(char_u *p);
++ void ins_bytes_len(char_u *p, int len);
++ void ins_char(int c);
++ void ins_char_bytes(char_u *buf, int charlen);
++ void ins_str(char_u *s);
++ int del_char(int fixpos);
++ int del_chars(long count, int fixpos);
++ int del_bytes(long count, int fixpos_arg, int use_delcombine);
++ int open_line(int dir, int flags, int second_line_indent);
++ int truncate_line(int fixpos);
++ void del_lines(long nlines, int undo);
++ /* vim: set ft=c : */
+*** ../vim-8.1.1317/src/proto.h 2019-05-09 15:12:45.176723907 +0200
+--- src/proto.h 2019-05-11 16:18:07.765350280 +0200
+***************
+*** 63,68 ****
+--- 63,69 ----
+ # endif
+ # include "autocmd.pro"
+ # include "buffer.pro"
++ # include "change.pro"
+ # include "charset.pro"
+ # ifdef FEAT_CSCOPE
+ # include "if_cscope.pro"
+*** ../vim-8.1.1317/src/memline.c 2019-05-10 21:28:35.184612974 +0200
+--- src/memline.c 2019-05-11 16:33:00.205143420 +0200
+***************
+*** 1637,1643 ****
+ * empty. Don't set the modified flag then. */
+ if (!(curbuf->b_ml.ml_line_count == 2 && *ml_get(1) == NUL))
+ {
+! changed_int();
+ ++CHANGEDTICK(curbuf);
+ }
+ }
+--- 1637,1643 ----
+ * empty. Don't set the modified flag then. */
+ if (!(curbuf->b_ml.ml_line_count == 2 && *ml_get(1) == NUL))
+ {
+! changed_internal();
+ ++CHANGEDTICK(curbuf);
+ }
+ }
+***************
+*** 1651,1657 ****
+ vim_free(p);
+ if (i != 0)
+ {
+! changed_int();
+ ++CHANGEDTICK(curbuf);
+ break;
+ }
+--- 1651,1657 ----
+ vim_free(p);
+ if (i != 0)
+ {
+! changed_internal();
+ ++CHANGEDTICK(curbuf);
+ break;
+ }
+*** ../vim-8.1.1317/Filelist 2019-05-09 15:12:45.164723999 +0200
+--- Filelist 2019-05-11 16:20:22.108775557 +0200
+***************
+*** 20,25 ****
+--- 20,26 ----
+ src/blob.c \
+ src/blowfish.c \
+ src/buffer.c \
++ src/change.c \
+ src/channel.c \
+ src/charset.c \
+ src/crypt.c \
+***************
+*** 155,160 ****
+--- 156,162 ----
+ src/proto/blob.pro \
+ src/proto/blowfish.pro \
+ src/proto/buffer.pro \
++ src/proto/change.pro \
+ src/proto/channel.pro \
+ src/proto/charset.pro \
+ src/proto/crypt.pro \
+*** ../vim-8.1.1317/src/Make_cyg_ming.mak 2019-04-28 19:46:17.018060159 +0200
+--- src/Make_cyg_ming.mak 2019-05-11 16:20:54.548632100 +0200
+***************
+*** 705,710 ****
+--- 705,711 ----
+ $(OUTDIR)/blob.o \
+ $(OUTDIR)/blowfish.o \
+ $(OUTDIR)/buffer.o \
++ $(OUTDIR)/change.o \
+ $(OUTDIR)/charset.o \
+ $(OUTDIR)/crypt.o \
+ $(OUTDIR)/crypt_zip.o \
+*** ../vim-8.1.1317/src/Make_dice.mak 2019-04-27 13:03:20.000715982 +0200
+--- src/Make_dice.mak 2019-05-11 16:21:17.396530064 +0200
+***************
+*** 30,35 ****
+--- 30,36 ----
+ autocmd.c \
+ blowfish.c \
+ buffer.c \
++ change.c \
+ charset.c \
+ crypt.c \
+ crypt_zip.c \
+***************
+*** 92,97 ****
+--- 93,99 ----
+ o/autocmd.o \
+ o/blowfish.o \
+ o/buffer.o \
++ o/change.o \
+ o/charset.o \
+ o/crypt.o \
+ o/crypt_zip.o \
+***************
+*** 177,182 ****
+--- 179,186 ----
+
+ o/buffer.o: buffer.c $(SYMS)
+
++ o/change.o: change.c $(SYMS)
++
+ o/charset.o: charset.c $(SYMS)
+
+ o/crypt.o: crypt.c $(SYMS)
+*** ../vim-8.1.1317/src/Make_manx.mak 2019-04-27 13:03:20.000715982 +0200
+--- src/Make_manx.mak 2019-05-11 16:21:56.032355815 +0200
+***************
+*** 40,45 ****
+--- 40,46 ----
+ autocmd.c \
+ blowfish.c \
+ buffer.c \
++ change.c \
+ charset.c \
+ crypt.c \
+ crypt_zip.c \
+***************
+*** 104,109 ****
+--- 105,111 ----
+ obj/autocmd.o \
+ obj/blowfish.o \
+ obj/buffer.o \
++ obj/change.o \
+ obj/charset.o \
+ obj/crypt.o \
+ obj/crypt_zip.o \
+***************
+*** 166,171 ****
+--- 168,174 ----
+ proto/autocmd.pro \
+ proto/blowfish.pro \
+ proto/buffer.pro \
++ proto/change.pro \
+ proto/charset.pro \
+ proto/crypt.pro \
+ proto/crypt_zip.pro \
+***************
+*** 280,285 ****
+--- 283,291 ----
+ obj/buffer.o: buffer.c
+ $(CCSYM) $@ buffer.c
+
++ obj/change.o: change.c
++ $(CCSYM) $@ change.c
++
+ obj/charset.o: charset.c
+ $(CCSYM) $@ charset.c
+
+*** ../vim-8.1.1317/src/Make_morph.mak 2019-04-27 13:03:20.000715982 +0200
+--- src/Make_morph.mak 2019-05-11 16:22:06.672307471 +0200
+***************
+*** 28,33 ****
+--- 28,34 ----
+ autocmd.c \
+ blowfish.c \
+ buffer.c \
++ change.c \
+ charset.c \
+ crypt.c \
+ crypt_zip.c \
+*** ../vim-8.1.1317/src/Make_mvc.mak 2019-05-10 21:38:50.037438773 +0200
+--- src/Make_mvc.mak 2019-05-11 16:22:27.648211682 +0200
+***************
+*** 700,705 ****
+--- 700,706 ----
+ $(OUTDIR)\blob.obj \
+ $(OUTDIR)\blowfish.obj \
+ $(OUTDIR)\buffer.obj \
++ $(OUTDIR)\change.obj \
+ $(OUTDIR)\charset.obj \
+ $(OUTDIR)\crypt.obj \
+ $(OUTDIR)\crypt_zip.obj \
+***************
+*** 1410,1415 ****
+--- 1411,1418 ----
+
+ $(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)
+
++ $(OUTDIR)/change.obj: $(OUTDIR) change.c $(INCL)
++
+ $(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL)
+
+ $(OUTDIR)/crypt.obj: $(OUTDIR) crypt.c $(INCL)
+***************
+*** 1700,1705 ****
+--- 1703,1709 ----
+ proto/blob.pro \
+ proto/blowfish.pro \
+ proto/buffer.pro \
++ proto/change.pro \
+ proto/charset.pro \
+ proto/crypt.pro \
+ proto/crypt_zip.pro \
+*** ../vim-8.1.1317/src/Make_sas.mak 2019-04-27 13:03:20.000715982 +0200
+--- src/Make_sas.mak 2019-05-11 16:22:52.732096436 +0200
+***************
+*** 93,98 ****
+--- 93,99 ----
+ autocmd.c \
+ blowfish.c \
+ buffer.c \
++ change.c \
+ charset.c \
+ crypt.c \
+ crypt_zip.c \
+***************
+*** 156,161 ****
+--- 157,163 ----
+ autocmd.o \
+ blowfish.o \
+ buffer.o \
++ change.o \
+ charset.o \
+ crypt.o \
+ crypt_zip.o \
+***************
+*** 219,224 ****
+--- 221,227 ----
+ proto/autocmd.pro \
+ proto/blowfish.pro \
+ proto/buffer.pro \
++ proto/change.pro \
+ proto/charset.pro \
+ proto/crypt.pro \
+ proto/crypt_zip.pro \
+***************
+*** 340,345 ****
+--- 343,350 ----
+ proto/blowfish.pro: blowfish.c
+ buffer.o: buffer.c
+ proto/buffer.pro: buffer.c
++ change.o: change.c
++ proto/change.pro: change.c
+ charset.o: charset.c
+ proto/charset.pro: charset.c
+ crypt.o: crypt.c
+*** ../vim-8.1.1317/src/Make_vms.mms 2019-04-27 13:03:20.000715982 +0200
+--- src/Make_vms.mms 2019-05-11 16:23:19.943970612 +0200
+***************
+*** 2,8 ****
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 Apr 26
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+--- 2,8 ----
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 May 11
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+***************
+*** 307,313 ****
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+! SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c \
+ crypt.c crypt_zip.c debugger.c dict.c diff.c digraph.c edit.c eval.c \
+ evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c \
+ if_cscope.c if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c \
+--- 307,313 ----
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+! SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c change.c, charset.c \
+ crypt.c crypt_zip.c debugger.c dict.c diff.c digraph.c edit.c eval.c \
+ evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c \
+ if_cscope.c if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c \
+***************
+*** 320,326 ****
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+! OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj \
+ charset.obj crypt.obj crypt_zip.obj debugger.obj dict.obj diff.obj \
+ digraph.obj edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj \
+ ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj \
+--- 320,326 ----
+ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
+
+! OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj change.obj \
+ charset.obj crypt.obj crypt_zip.obj debugger.obj dict.obj diff.obj \
+ digraph.obj edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj \
+ ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj \
+***************
+*** 510,515 ****
+--- 510,519 ----
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+ globals.h version.h
++ change.obj : change.c vim.h [.auto]config.h feature.h os_unix.h \
++ ascii.h keymap.h term.h macros.h structs.h regexp.h \
++ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
++ globals.h version.h
+ charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+*** ../vim-8.1.1317/src/Makefile 2019-05-06 21:59:42.194211119 +0200
+--- src/Makefile 2019-05-11 16:23:53.759813145 +0200
+***************
+*** 1576,1581 ****
+--- 1577,1583 ----
+ blob.c \
+ blowfish.c \
+ buffer.c \
++ change.c \
+ charset.c \
+ crypt.c \
+ crypt_zip.c \
+***************
+*** 1691,1696 ****
+--- 1693,1699 ----
+ objects/autocmd.o \
+ objects/beval.o \
+ objects/buffer.o \
++ objects/change.o \
+ objects/blob.o \
+ objects/blowfish.o \
+ objects/crypt.o \
+***************
+*** 1821,1826 ****
+--- 1824,1830 ----
+ autocmd.pro \
+ blowfish.pro \
+ buffer.pro \
++ change.pro \
+ charset.pro \
+ crypt.pro \
+ crypt_zip.pro \
+***************
+*** 2965,2970 ****
+--- 2969,2977 ----
+ objects/buffer.o: buffer.c
+ $(CCC) -o $@ buffer.c
+
++ objects/change.o: change.c
++ $(CCC) -o $@ change.c
++
+ objects/charset.o: charset.c
+ $(CCC) -o $@ charset.c
+
+***************
+*** 3430,3435 ****
+--- 3437,3446 ----
+ 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 version.h
++ objects/change.o: change.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 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 \
+*** ../vim-8.1.1317/src/README.md 2019-04-27 13:03:20.000715982 +0200
+--- src/README.md 2019-05-11 16:19:40.208958309 +0200
+***************
+*** 25,30 ****
+--- 25,31 ----
+ --------- | -----------
+ autocmd.c | autocommands
+ buffer.c | manipulating buffers (loaded files)
++ change.c | handling changes to text
+ debugger.c | vim script debugger
+ diff.c | diff mode (vimdiff)
+ eval.c | expression evaluation
+*** ../vim-8.1.1317/src/version.c 2019-05-11 14:34:09.326200119 +0200
+--- src/version.c 2019-05-11 16:58:51.491776191 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1318,
+ /**/
+
+--
+Mynd you, m00se bites Kan be pretty nasti ...
+ "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.1319 b/data/vim/patches/8.1.1319
new file mode 100644
index 000000000..349a31e87
--- /dev/null
+++ b/data/vim/patches/8.1.1319
@@ -0,0 +1,455 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1319
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1319
+Problem: Computing function length name in many places.
+Solution: compute name length in call_func().
+Files: src/eval.c, src/userfunc.c, src/channel.c, src/evalfunc.c,
+ src/ex_cmds2.c, src/regexp.c, src/terminal.c
+
+
+*** ../vim-8.1.1318/src/eval.c 2019-05-04 15:05:24.927269310 +0200
+--- src/eval.c 2019-05-11 18:20:17.766390123 +0200
+***************
+*** 765,771 ****
+ s = expr->vval.v_string;
+ if (s == NULL || *s == NUL)
+ return FAIL;
+! if (call_func(s, (int)STRLEN(s), rettv, argc, argv, NULL,
+ 0L, 0L, &dummy, TRUE, NULL, NULL) == FAIL)
+ return FAIL;
+ }
+--- 765,771 ----
+ s = expr->vval.v_string;
+ if (s == NULL || *s == NUL)
+ return FAIL;
+! if (call_func(s, -1, rettv, argc, argv, NULL,
+ 0L, 0L, &dummy, TRUE, NULL, NULL) == FAIL)
+ return FAIL;
+ }
+***************
+*** 776,782 ****
+ s = partial_name(partial);
+ if (s == NULL || *s == NUL)
+ return FAIL;
+! if (call_func(s, (int)STRLEN(s), rettv, argc, argv, NULL,
+ 0L, 0L, &dummy, TRUE, partial, NULL) == FAIL)
+ return FAIL;
+ }
+--- 776,782 ----
+ s = partial_name(partial);
+ if (s == NULL || *s == NUL)
+ return FAIL;
+! if (call_func(s, -1, rettv, argc, argv, NULL,
+ 0L, 0L, &dummy, TRUE, partial, NULL) == FAIL)
+ return FAIL;
+ }
+***************
+*** 1088,1094 ****
+ 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)
+--- 1088,1094 ----
+ int ret;
+
+ rettv->v_type = VAR_UNKNOWN; /* clear_tv() uses this */
+! ret = call_func(func, -1, rettv, argc, argv, NULL,
+ curwin->w_cursor.lnum, curwin->w_cursor.lnum,
+ &doesrange, TRUE, NULL, NULL);
+ if (ret == FAIL)
+***************
+*** 7109,7115 ****
+ }
+ else
+ s = (char_u *)"";
+! ret = get_func_tv(s, (int)STRLEN(s), rettv, arg,
+ curwin->w_cursor.lnum, curwin->w_cursor.lnum,
+ &len, evaluate, pt, selfdict);
+
+--- 7109,7115 ----
+ }
+ else
+ s = (char_u *)"";
+! ret = get_func_tv(s, -1, rettv, arg,
+ curwin->w_cursor.lnum, curwin->w_cursor.lnum,
+ &len, evaluate, pt, selfdict);
+
+*** ../vim-8.1.1318/src/userfunc.c 2019-05-09 21:08:53.764083394 +0200
+--- src/userfunc.c 2019-05-11 18:24:10.045205033 +0200
+***************
+*** 432,447 ****
+ */
+ int
+ get_func_tv(
+! char_u *name, /* name of the function */
+! int len, /* length of "name" */
+ typval_T *rettv,
+! char_u **arg, /* argument, pointing to the '(' */
+! linenr_T firstline, /* first line of range */
+! linenr_T lastline, /* last line of range */
+! int *doesrange, /* return: function handled range */
+ int evaluate,
+! partial_T *partial, /* for extra arguments */
+! dict_T *selfdict) /* Dictionary for "self" */
+ {
+ char_u *argp;
+ int ret = OK;
+--- 432,447 ----
+ */
+ int
+ get_func_tv(
+! char_u *name, // name of the function
+! int len, // length of "name" or -1 to use strlen()
+ typval_T *rettv,
+! char_u **arg, // argument, pointing to the '('
+! linenr_T firstline, // first line of range
+! linenr_T lastline, // last line of range
+! int *doesrange, // return: function handled range
+ int evaluate,
+! partial_T *partial, // for extra arguments
+! dict_T *selfdict) // Dictionary for "self"
+ {
+ char_u *argp;
+ int ret = OK;
+***************
+*** 1435,1441 ****
+ }
+
+ if (item == NULL)
+! r = call_func(name, (int)STRLEN(name), rettv, argc, argv, NULL,
+ curwin->w_cursor.lnum, curwin->w_cursor.lnum,
+ &dummy, TRUE, partial, selfdict);
+
+--- 1435,1441 ----
+ }
+
+ if (item == NULL)
+! r = call_func(name, -1, rettv, argc, argv, NULL,
+ curwin->w_cursor.lnum, curwin->w_cursor.lnum,
+ &dummy, TRUE, partial, selfdict);
+
+***************
+*** 1458,1477 ****
+ */
+ int
+ call_func(
+! char_u *funcname, /* name of the function */
+! int len, /* length of "name" */
+! typval_T *rettv, /* return value goes here */
+! int argcount_in, /* number of "argvars" */
+! typval_T *argvars_in, /* vars for arguments, must have "argcount"
+! PLUS ONE elements! */
+ int (* argv_func)(int, typval_T *, int),
+! /* function to fill in argvars */
+! linenr_T firstline, /* first line of range */
+! linenr_T lastline, /* last line of range */
+! int *doesrange, /* return: function handled range */
+ int evaluate,
+! partial_T *partial, /* optional, can be NULL */
+! dict_T *selfdict_in) /* Dictionary for "self" */
+ {
+ int ret = FAIL;
+ int error = ERROR_NONE;
+--- 1458,1477 ----
+ */
+ int
+ call_func(
+! char_u *funcname, // name of the function
+! int len, // length of "name" or -1 to use strlen()
+! typval_T *rettv, // return value goes here
+! int argcount_in, // number of "argvars"
+! typval_T *argvars_in, // vars for arguments, must have "argcount"
+! // PLUS ONE elements!
+ int (* argv_func)(int, typval_T *, int),
+! // function to fill in argvars
+! linenr_T firstline, // first line of range
+! linenr_T lastline, // last line of range
+! int *doesrange, // return: function handled range
+ int evaluate,
+! partial_T *partial, // optional, can be NULL
+! dict_T *selfdict_in) // Dictionary for "self"
+ {
+ int ret = FAIL;
+ int error = ERROR_NONE;
+***************
+*** 1487,1495 ****
+ typval_T argv[MAX_FUNC_ARGS + 1]; /* used when "partial" is not NULL */
+ int argv_clear = 0;
+
+! /* Make a copy of the name, if it comes from a funcref variable it could
+! * be changed or deleted in the called function. */
+! name = vim_strnsave(funcname, len);
+ if (name == NULL)
+ return ret;
+
+--- 1487,1495 ----
+ typval_T argv[MAX_FUNC_ARGS + 1]; /* used when "partial" is not NULL */
+ int argv_clear = 0;
+
+! // Make a copy of the name, if it comes from a funcref variable it could
+! // be changed or deleted in the called function.
+! name = len > 0 ? vim_strnsave(funcname, len) : vim_strsave(funcname);
+ if (name == NULL)
+ return ret;
+
+***************
+*** 3285,3291 ****
+ curwin->w_cursor.coladd = 0;
+ }
+ arg = startarg;
+! if (get_func_tv(name, (int)STRLEN(name), &rettv, &arg,
+ eap->line1, eap->line2, &doesrange,
+ !eap->skip, partial, fudi.fd_dict) == FAIL)
+ {
+--- 3285,3291 ----
+ curwin->w_cursor.coladd = 0;
+ }
+ arg = startarg;
+! if (get_func_tv(name, -1, &rettv, &arg,
+ eap->line1, eap->line2, &doesrange,
+ !eap->skip, partial, fudi.fd_dict) == FAIL)
+ {
+*** ../vim-8.1.1318/src/channel.c 2019-05-09 21:48:29.033295465 +0200
+--- src/channel.c 2019-05-11 18:19:50.954526577 +0200
+***************
+*** 1650,1656 ****
+ argv[0].v_type = VAR_CHANNEL;
+ argv[0].vval.v_channel = channel;
+
+! call_func(callback, (int)STRLEN(callback), &rettv, 2, argv, NULL,
+ 0L, 0L, &dummy, TRUE, partial, NULL);
+ clear_tv(&rettv);
+ channel_need_redraw = TRUE;
+--- 1650,1656 ----
+ argv[0].v_type = VAR_CHANNEL;
+ argv[0].vval.v_channel = channel;
+
+! call_func(callback, -1, &rettv, 2, argv, NULL,
+ 0L, 0L, &dummy, TRUE, partial, NULL);
+ clear_tv(&rettv);
+ channel_need_redraw = TRUE;
+***************
+*** 2989,2995 ****
+ (char *)channel->ch_close_cb);
+ argv[0].v_type = VAR_CHANNEL;
+ argv[0].vval.v_channel = channel;
+! call_func(channel->ch_close_cb, (int)STRLEN(channel->ch_close_cb),
+ &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
+ channel->ch_close_partial, NULL);
+ clear_tv(&rettv);
+--- 2989,2995 ----
+ (char *)channel->ch_close_cb);
+ argv[0].v_type = VAR_CHANNEL;
+ argv[0].vval.v_channel = channel;
+! call_func(channel->ch_close_cb, -1,
+ &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
+ channel->ch_close_partial, NULL);
+ clear_tv(&rettv);
+***************
+*** 5478,5484 ****
+ argv[0].vval.v_job = job;
+ argv[1].v_type = VAR_NUMBER;
+ argv[1].vval.v_number = job->jv_exitval;
+! call_func(job->jv_exit_cb, (int)STRLEN(job->jv_exit_cb),
+ &rettv, 2, argv, NULL, 0L, 0L, &dummy, TRUE,
+ job->jv_exit_partial, NULL);
+ clear_tv(&rettv);
+--- 5478,5484 ----
+ argv[0].vval.v_job = job;
+ argv[1].v_type = VAR_NUMBER;
+ argv[1].vval.v_number = job->jv_exitval;
+! call_func(job->jv_exit_cb, -1,
+ &rettv, 2, argv, NULL, 0L, 0L, &dummy, TRUE,
+ job->jv_exit_partial, NULL);
+ clear_tv(&rettv);
+***************
+*** 6069,6076 ****
+ argv[0].vval.v_string = vim_strsave(text);
+ argv[1].v_type = VAR_UNKNOWN;
+
+! call_func(curbuf->b_prompt_callback,
+! (int)STRLEN(curbuf->b_prompt_callback),
+ &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
+ curbuf->b_prompt_partial, NULL);
+ clear_tv(&argv[0]);
+--- 6069,6075 ----
+ argv[0].vval.v_string = vim_strsave(text);
+ argv[1].v_type = VAR_UNKNOWN;
+
+! call_func(curbuf->b_prompt_callback, -1,
+ &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
+ curbuf->b_prompt_partial, NULL);
+ clear_tv(&argv[0]);
+***************
+*** 6093,6100 ****
+ argv[0].v_type = VAR_UNKNOWN;
+
+ got_int = FALSE; // don't skip executing commands
+! call_func(curbuf->b_prompt_interrupt,
+! (int)STRLEN(curbuf->b_prompt_interrupt),
+ &rettv, 0, argv, NULL, 0L, 0L, &dummy, TRUE,
+ curbuf->b_prompt_int_partial, NULL);
+ clear_tv(&rettv);
+--- 6092,6098 ----
+ argv[0].v_type = VAR_UNKNOWN;
+
+ got_int = FALSE; // don't skip executing commands
+! call_func(curbuf->b_prompt_interrupt, -1,
+ &rettv, 0, argv, NULL, 0L, 0L, &dummy, TRUE,
+ curbuf->b_prompt_int_partial, NULL);
+ clear_tv(&rettv);
+*** ../vim-8.1.1318/src/evalfunc.c 2019-05-10 21:28:35.184612974 +0200
+--- src/evalfunc.c 2019-05-11 18:20:28.850333682 +0200
+***************
+*** 767,772 ****
+--- 767,774 ----
+ {"line2byte", 1, 1, f_line2byte},
+ {"lispindent", 1, 1, f_lispindent},
+ {"list2str", 1, 2, f_list2str},
++ {"listener_add", 1, 2, f_listener_add},
++ {"listener_remove", 1, 1, f_listener_remove},
+ {"localtime", 0, 0, f_localtime},
+ #ifdef FEAT_FLOAT
+ {"log", 1, 1, f_log},
+***************
+*** 9746,9754 ****
+
+ if (failed)
+ {
+ list_free(rettv->vval.v_list);
+! /* readfile doc says an empty list is returned on error */
+! rettv->vval.v_list = list_alloc();
+ }
+
+ vim_free(prev);
+--- 9748,9756 ----
+
+ if (failed)
+ {
++ // an empty list is returned on error
+ list_free(rettv->vval.v_list);
+! rettv_list_alloc(rettv);
+ }
+
+ vim_free(prev);
+***************
+*** 12644,12651 ****
+ copy_tv(&si2->item->li_tv, &argv[1]);
+
+ rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */
+! res = call_func(func_name, (int)STRLEN(func_name),
+! &rettv, 2, argv, NULL, 0L, 0L, &dummy, TRUE,
+ partial, sortinfo->item_compare_selfdict);
+ clear_tv(&argv[0]);
+ clear_tv(&argv[1]);
+--- 12646,12652 ----
+ copy_tv(&si2->item->li_tv, &argv[1]);
+
+ rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */
+! res = call_func(func_name, -1, &rettv, 2, argv, NULL, 0L, 0L, &dummy, TRUE,
+ partial, sortinfo->item_compare_selfdict);
+ clear_tv(&argv[0]);
+ clear_tv(&argv[1]);
+*** ../vim-8.1.1318/src/ex_cmds2.c 2019-05-09 21:48:29.033295465 +0200
+--- src/ex_cmds2.c 2019-05-11 18:20:52.590212764 +0200
+***************
+*** 325,331 ****
+ argv[0].vval.v_number = (varnumber_T)timer->tr_id;
+ argv[1].v_type = VAR_UNKNOWN;
+
+! call_func(timer->tr_callback, (int)STRLEN(timer->tr_callback),
+ &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
+ timer->tr_partial, NULL);
+ clear_tv(&rettv);
+--- 325,331 ----
+ argv[0].vval.v_number = (varnumber_T)timer->tr_id;
+ argv[1].v_type = VAR_UNKNOWN;
+
+! call_func(timer->tr_callback, -1,
+ &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
+ timer->tr_partial, NULL);
+ clear_tv(&rettv);
+*** ../vim-8.1.1318/src/regexp.c 2019-04-25 20:07:44.167327851 +0200
+--- src/regexp.c 2019-05-11 18:21:14.426101507 +0200
+***************
+*** 7423,7429 ****
+ if (expr->v_type == VAR_FUNC)
+ {
+ s = expr->vval.v_string;
+! call_func(s, (int)STRLEN(s), &rettv,
+ 1, argv, fill_submatch_list,
+ 0L, 0L, &dummy, TRUE, NULL, NULL);
+ }
+--- 7423,7429 ----
+ if (expr->v_type == VAR_FUNC)
+ {
+ s = expr->vval.v_string;
+! call_func(s, -1, &rettv,
+ 1, argv, fill_submatch_list,
+ 0L, 0L, &dummy, TRUE, NULL, NULL);
+ }
+***************
+*** 7432,7438 ****
+ partial_T *partial = expr->vval.v_partial;
+
+ s = partial_name(partial);
+! call_func(s, (int)STRLEN(s), &rettv,
+ 1, argv, fill_submatch_list,
+ 0L, 0L, &dummy, TRUE, partial, NULL);
+ }
+--- 7432,7438 ----
+ partial_T *partial = expr->vval.v_partial;
+
+ s = partial_name(partial);
+! call_func(s, -1, &rettv,
+ 1, argv, fill_submatch_list,
+ 0L, 0L, &dummy, TRUE, partial, NULL);
+ }
+*** ../vim-8.1.1318/src/terminal.c 2019-04-28 19:46:17.034060084 +0200
+--- src/terminal.c 2019-05-11 18:21:27.618034258 +0200
+***************
+*** 3779,3785 ****
+ argvars[0].v_type = VAR_NUMBER;
+ argvars[0].vval.v_number = term->tl_buffer->b_fnum;
+ argvars[1] = item->li_next->li_tv;
+! if (call_func(func, (int)STRLEN(func), &rettv,
+ 2, argvars, /* argv_func */ NULL,
+ /* firstline */ 1, /* lastline */ 1,
+ &doesrange, /* evaluate */ TRUE,
+--- 3779,3785 ----
+ argvars[0].v_type = VAR_NUMBER;
+ argvars[0].vval.v_number = term->tl_buffer->b_fnum;
+ argvars[1] = item->li_next->li_tv;
+! if (call_func(func, -1, &rettv,
+ 2, argvars, /* argv_func */ NULL,
+ /* firstline */ 1, /* lastline */ 1,
+ &doesrange, /* evaluate */ TRUE,
+*** ../vim-8.1.1318/src/version.c 2019-05-11 17:03:55.170019762 +0200
+--- src/version.c 2019-05-11 18:27:05.296182093 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1319,
+ /**/
+
+--
+We apologise again for the fault in the subtitles. Those responsible for
+sacking the people who have just been sacked have been sacked.
+ "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.1320 b/data/vim/patches/8.1.1320
new file mode 100644
index 000000000..d6d50ac8b
--- /dev/null
+++ b/data/vim/patches/8.1.1320
@@ -0,0 +1,233 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1320
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1320
+Problem: It is not possible to track changes to a buffer.
+Solution: Add listener_add() and listener_remove(). No docs or tests yet.
+Files: src/structs.h, src/change.c, src/proto/change.pro
+
+
+*** ../vim-8.1.1319/src/structs.h 2019-05-09 21:08:53.764083394 +0200
+--- src/structs.h 2019-05-11 18:25:06.736904482 +0200
+***************
+*** 1873,1878 ****
+--- 1873,1891 ----
+ #endif
+ } jobopt_T;
+
++ #ifdef FEAT_EVAL
++ /*
++ * Structure used for listeners added with listener_add().
++ */
++ typedef struct listener_S listener_T;
++ struct listener_S
++ {
++ listener_T *lr_next;
++ int lr_id;
++ char_u *lr_callback;
++ partial_T *lr_partial;
++ };
++ #endif
+
+ /* structure used for explicit stack while garbage collecting hash tables */
+ typedef struct ht_stack_S
+***************
+*** 2424,2429 ****
+--- 2437,2444 ----
+ #ifdef FEAT_EVAL
+ dictitem_T b_bufvar; /* variable for "b:" Dictionary */
+ dict_T *b_vars; /* internal variables, local to buffer */
++
++ listener_T *b_listener;
+ #endif
+ #ifdef FEAT_TEXT_PROP
+ int b_has_textprop; // TRUE when text props were added
+*** ../vim-8.1.1319/src/change.c 2019-05-11 17:03:55.170019762 +0200
+--- src/change.c 2019-05-11 19:11:46.862043029 +0200
+***************
+*** 151,156 ****
+--- 151,284 ----
+ #endif
+ }
+
++ #ifdef FEAT_EVAL
++ static list_T *recorded_changes = NULL;
++ static long next_listener_id = 0;
++
++ /*
++ * Record a change for listeners added with listener_add().
++ */
++ static void
++ may_record_change(
++ linenr_T lnum,
++ colnr_T col,
++ linenr_T lnume,
++ long xtra)
++ {
++ dict_T *dict;
++
++ if (curbuf->b_listener == NULL)
++ return;
++ if (recorded_changes == NULL)
++ {
++ recorded_changes = list_alloc();
++ if (recorded_changes == NULL) // out of memory
++ return;
++ ++recorded_changes->lv_refcount;
++ recorded_changes->lv_lock = VAR_FIXED;
++ }
++
++ dict = dict_alloc();
++ if (dict == NULL)
++ return;
++ dict_add_number(dict, "lnum", (varnumber_T)lnum);
++ dict_add_number(dict, "end", (varnumber_T)lnume);
++ dict_add_number(dict, "added", (varnumber_T)xtra);
++ dict_add_number(dict, "col", (varnumber_T)col);
++
++ list_append_dict(recorded_changes, dict);
++ }
++
++ /*
++ * listener_add() function
++ */
++ void
++ f_listener_add(typval_T *argvars, typval_T *rettv)
++ {
++ char_u *callback;
++ partial_T *partial;
++ listener_T *lnr;
++
++ callback = get_callback(&argvars[0], &partial);
++ if (callback == NULL)
++ return;
++
++ lnr = (listener_T *)alloc_clear((sizeof(listener_T)));
++ if (lnr == NULL)
++ {
++ free_callback(callback, partial);
++ return;
++ }
++ lnr->lr_next = curbuf->b_listener;
++ curbuf->b_listener = lnr;
++
++ if (partial == NULL)
++ lnr->lr_callback = vim_strsave(callback);
++ else
++ lnr->lr_callback = callback; // pointer into the partial
++ lnr->lr_partial = partial;
++
++ lnr->lr_id = ++next_listener_id;
++ rettv->vval.v_number = lnr->lr_id;
++ }
++
++ /*
++ * listener_remove() function
++ */
++ void
++ f_listener_remove(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ listener_T *lnr;
++ listener_T *next;
++ listener_T *prev = NULL;
++ int id = tv_get_number(argvars);
++ buf_T *buf = curbuf;
++
++ for (lnr = buf->b_listener; lnr != NULL; lnr = next)
++ {
++ next = lnr->lr_next;
++ if (lnr->lr_id == id)
++ {
++ if (prev != NULL)
++ prev->lr_next = lnr->lr_next;
++ else
++ buf->b_listener = lnr->lr_next;
++ free_callback(lnr->lr_callback, lnr->lr_partial);
++ vim_free(lnr);
++ }
++ prev = lnr;
++ }
++ }
++
++ /*
++ * Called when a sequence of changes is done: invoke listeners added with
++ * listener_add().
++ */
++ void
++ invoke_listeners(void)
++ {
++ listener_T *lnr;
++ typval_T rettv;
++ int dummy;
++ typval_T argv[2];
++
++ if (recorded_changes == NULL) // nothing changed
++ return;
++ argv[0].v_type = VAR_LIST;
++ argv[0].vval.v_list = recorded_changes;
++
++ for (lnr = curbuf->b_listener; lnr != NULL; lnr = lnr->lr_next)
++ {
++ call_func(lnr->lr_callback, -1, &rettv,
++ 1, argv, NULL, 0L, 0L, &dummy, TRUE, lnr->lr_partial, NULL);
++ clear_tv(&rettv);
++ }
++
++ list_unref(recorded_changes);
++ recorded_changes = NULL;
++ }
++ #endif
++
+ /*
+ * Common code for when a change was made.
+ * See changed_lines() for the arguments.
+***************
+*** 175,180 ****
+--- 303,311 ----
+ // mark the buffer as modified
+ changed();
+
++ #ifdef FEAT_EVAL
++ may_record_change(lnum, col, lnume, xtra);
++ #endif
+ #ifdef FEAT_DIFF
+ if (curwin->w_p_diff && diff_internal())
+ curtab->tp_diff_update = TRUE;
+*** ../vim-8.1.1319/src/proto/change.pro 2019-05-11 17:03:55.170019762 +0200
+--- src/proto/change.pro 2019-05-11 18:24:29.733104385 +0200
+***************
+*** 2,7 ****
+--- 2,10 ----
+ void change_warning(int col);
+ void changed(void);
+ void changed_internal(void);
++ void f_listener_add(typval_T *argvars, typval_T *rettv);
++ void f_listener_remove(typval_T *argvars, typval_T *rettv);
++ void invoke_listeners(void);
+ void changed_bytes(linenr_T lnum, colnr_T col);
+ void inserted_bytes(linenr_T lnum, colnr_T col, int added);
+ void appended_lines(linenr_T lnum, long count);
+*** ../vim-8.1.1319/src/version.c 2019-05-11 18:28:41.351611622 +0200
+--- src/version.c 2019-05-11 19:12:16.001896710 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1320,
+ /**/
+
+--
+It might look like I'm doing nothing, but at the cellular level
+I'm really quite busy.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1321 b/data/vim/patches/8.1.1321
new file mode 100644
index 000000000..feb3fe874
--- /dev/null
+++ b/data/vim/patches/8.1.1321
@@ -0,0 +1,405 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1321
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1321
+Problem: No docs or tests for listener functions.
+Solution: Add help and tests for listener_add() and listener_remove().
+ Invoke the callbacks before redrawing.
+Files: runtime/doc/eval.txt, runtime/doc/usr_41.txt,
+ src/testdir/test_listener.vim, src/testdir/Make_all.mak,
+ src/change.c, src/screen.c, src/evalfunc.c, src/proto/evalfunc.pro
+
+
+*** ../vim-8.1.1320/runtime/doc/eval.txt 2019-05-09 21:08:53.764083394 +0200
+--- runtime/doc/eval.txt 2019-05-11 20:54:59.593866827 +0200
+***************
+*** 2457,2462 ****
+--- 2457,2465 ----
+ line2byte({lnum}) Number byte count of line {lnum}
+ lispindent({lnum}) Number Lisp indent for line {lnum}
+ list2str({list} [, {utf8}]) String turn numbers in {list} into a String
++ listener_add({callback} [, {buf}])
++ Number add a callback to listen to changes
++ listener_remove({id}) none remove a listener callback
+ localtime() Number current time
+ log({expr}) Float natural logarithm (base e) of {expr}
+ log10({expr}) Float logarithm of Float {expr} to base 10
+***************
+*** 6311,6316 ****
+--- 6314,6366 ----
+ With utf-8 composing characters work as expected: >
+ list2str([97, 769]) returns "á"
+ <
++ listener_add({callback} [, {buf}]) *listener_add()*
++ Add a callback function that will be invoked when changes have
++ been made to buffer {buf}.
++ {buf} refers to a buffer name or number. For the accepted
++ values, see |bufname()|. When {buf} is omitted the current
++ buffer is used.
++ Returns a unique ID that can be passed to |listener_remove()|.
++
++ The {callback} is invoked with a list of items that indicate a
++ change. Each list item is a dictionary with these entries:
++ lnum the first line number of the change
++ end the first line below the change
++ added number of lines added; negative if lines were
++ deleted
++ col first column in "lnum" that was affected by
++ the change; one if unknown or the whole line
++ was affected; this is a byte index, first
++ character has a value of one.
++ When lines are inserted the values are:
++ lnum line below which the new line is added
++ end equal to "lnum"
++ added number of lines inserted
++ col one
++ When lines are deleted the values are:
++ lnum the first deleted line
++ end the line below the first deleted line, before
++ the deletion was done
++ added negative, number of lines deleted
++ col one
++ When lines are changed:
++ lnum the first changed line
++ end the line below the last changed line
++ added zero
++ col first column with a change or one
++
++ The {callback} is invoked just before the screen is updated.
++ To trigger this in a script use the `:redraw` command.
++
++ The {callback} is not invoked when the buffer is first loaded.
++ Use the |BufReadPost| autocmd event to handle the initial text
++ of a buffer.
++ The {callback} is also not invoked when the buffer is
++ unloaded, use the |BufUnload| autocmd event for that.
++
++ listener_remove({id}) *listener_remove()*
++ Remove a listener previously added with listener_add().
++
+ localtime() *localtime()*
+ Return the current time, measured as seconds since 1st Jan
+ 1970. See also |strftime()| and |getftime()|.
+*** ../vim-8.1.1320/runtime/doc/usr_41.txt 2019-05-09 14:52:22.079358841 +0200
+--- runtime/doc/usr_41.txt 2019-05-11 19:31:29.403995607 +0200
+***************
+*** 812,817 ****
+--- 812,819 ----
+ setbufline() replace a line in the specified buffer
+ appendbufline() append a list of lines in the specified buffer
+ deletebufline() delete lines from a specified buffer
++ listener_add() add a callback to listen to changes
++ listener_remove() remove a listener callback
+ win_findbuf() find windows containing a buffer
+ win_getid() get window ID of a window
+ win_gotoid() go to window with ID
+*** ../vim-8.1.1320/src/testdir/test_listener.vim 2019-05-11 21:10:55.957195196 +0200
+--- src/testdir/test_listener.vim 2019-05-11 20:52:44.750502230 +0200
+***************
+*** 0 ****
+--- 1,77 ----
++ " tests for listener_add() and listener_remove()
++
++ func StoreList(l)
++ let g:list = a:l
++ endfunc
++
++ func AnotherStoreList(l)
++ let g:list2 = a:l
++ endfunc
++
++ func EvilStoreList(l)
++ let g:list3 = a:l
++ call assert_fails("call add(a:l, 'myitem')", "E742:")
++ endfunc
++
++ func Test_listening()
++ new
++ call setline(1, ['one', 'two'])
++ let id = listener_add({l -> StoreList(l)})
++ call setline(1, 'one one')
++ redraw
++ call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], g:list)
++
++ " Two listeners, both get called.
++ let id2 = listener_add({l -> AnotherStoreList(l)})
++ let g:list = []
++ let g:list2 = []
++ exe "normal $asome\<Esc>"
++ redraw
++ call assert_equal([{'lnum': 1, 'end': 2, 'col': 8, 'added': 0}], g:list)
++ call assert_equal([{'lnum': 1, 'end': 2, 'col': 8, 'added': 0}], g:list2)
++
++ call listener_remove(id2)
++ let g:list = []
++ let g:list2 = []
++ call setline(3, 'three')
++ redraw
++ call assert_equal([{'lnum': 3, 'end': 3, 'col': 1, 'added': 1}], g:list)
++ call assert_equal([], g:list2)
++
++ " the "o" command first adds an empty line and then changes it
++ let g:list = []
++ exe "normal Gofour\<Esc>"
++ redraw
++ call assert_equal([{'lnum': 4, 'end': 4, 'col': 1, 'added': 1},
++ \ {'lnum': 4, 'end': 5, 'col': 1, 'added': 0}], g:list)
++
++ let g:list = []
++ call listener_remove(id)
++ call setline(1, 'asdfasdf')
++ redraw
++ call assert_equal([], g:list)
++
++ " Trying to change the list fails
++ let id = listener_add({l -> EvilStoreList(l)})
++ let g:list3 = []
++ call setline(1, 'asdfasdf')
++ redraw
++ call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], g:list3)
++
++ bwipe!
++ endfunc
++
++ func Test_listening_other_buf()
++ new
++ call setline(1, ['one', 'two'])
++ let bufnr = bufnr('')
++ normal ww
++ let id = listener_add({l -> StoreList(l)}, bufnr)
++ let g:list = []
++ call setbufline(bufnr, 1, 'hello')
++ redraw
++ call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], g:list)
++
++ exe "buf " .. bufnr
++ bwipe!
++ endfunc
+*** ../vim-8.1.1320/src/testdir/Make_all.mak 2019-05-09 14:52:22.083358820 +0200
+--- src/testdir/Make_all.mak 2019-05-11 19:33:38.615264428 +0200
+***************
+*** 168,173 ****
+--- 168,174 ----
+ test_lispwords \
+ test_listchars \
+ test_listdict \
++ test_listener \
+ test_listlbr \
+ test_listlbr_utf8 \
+ test_lua \
+***************
+*** 359,364 ****
+--- 360,366 ----
+ test_lineending.res \
+ test_listchars.res \
+ test_listdict.res \
++ test_listener.res \
+ test_listlbr.res \
+ test_lua.res \
+ test_makeencoding.res \
+*** ../vim-8.1.1320/src/change.c 2019-05-11 19:14:11.585314006 +0200
+--- src/change.c 2019-05-11 21:13:09.368532894 +0200
+***************
+*** 184,190 ****
+ dict_add_number(dict, "lnum", (varnumber_T)lnum);
+ dict_add_number(dict, "end", (varnumber_T)lnume);
+ dict_add_number(dict, "added", (varnumber_T)xtra);
+! dict_add_number(dict, "col", (varnumber_T)col);
+
+ list_append_dict(recorded_changes, dict);
+ }
+--- 184,190 ----
+ dict_add_number(dict, "lnum", (varnumber_T)lnum);
+ dict_add_number(dict, "end", (varnumber_T)lnume);
+ dict_add_number(dict, "added", (varnumber_T)xtra);
+! dict_add_number(dict, "col", (varnumber_T)col + 1);
+
+ list_append_dict(recorded_changes, dict);
+ }
+***************
+*** 198,216 ****
+ char_u *callback;
+ partial_T *partial;
+ listener_T *lnr;
+
+ callback = get_callback(&argvars[0], &partial);
+ if (callback == NULL)
+ return;
+
+ lnr = (listener_T *)alloc_clear((sizeof(listener_T)));
+ if (lnr == NULL)
+ {
+ free_callback(callback, partial);
+ return;
+ }
+! lnr->lr_next = curbuf->b_listener;
+! curbuf->b_listener = lnr;
+
+ if (partial == NULL)
+ lnr->lr_callback = vim_strsave(callback);
+--- 198,224 ----
+ char_u *callback;
+ partial_T *partial;
+ listener_T *lnr;
++ buf_T *buf = curbuf;
+
+ callback = get_callback(&argvars[0], &partial);
+ if (callback == NULL)
+ return;
+
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ {
++ buf = get_buf_arg(&argvars[1]);
++ if (buf == NULL)
++ return;
++ }
++
+ lnr = (listener_T *)alloc_clear((sizeof(listener_T)));
+ if (lnr == NULL)
+ {
+ free_callback(callback, partial);
+ return;
+ }
+! lnr->lr_next = buf->b_listener;
+! buf->b_listener = lnr;
+
+ if (partial == NULL)
+ lnr->lr_callback = vim_strsave(callback);
+***************
+*** 232,253 ****
+ listener_T *next;
+ listener_T *prev = NULL;
+ int id = tv_get_number(argvars);
+! buf_T *buf = curbuf;
+
+! for (lnr = buf->b_listener; lnr != NULL; lnr = next)
+! {
+! next = lnr->lr_next;
+! if (lnr->lr_id == id)
+ {
+! if (prev != NULL)
+! prev->lr_next = lnr->lr_next;
+! else
+! buf->b_listener = lnr->lr_next;
+! free_callback(lnr->lr_callback, lnr->lr_partial);
+! vim_free(lnr);
+ }
+- prev = lnr;
+- }
+ }
+
+ /*
+--- 240,262 ----
+ listener_T *next;
+ listener_T *prev = NULL;
+ int id = tv_get_number(argvars);
+! buf_T *buf;
+
+! for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+! for (lnr = buf->b_listener; lnr != NULL; lnr = next)
+ {
+! next = lnr->lr_next;
+! if (lnr->lr_id == id)
+! {
+! if (prev != NULL)
+! prev->lr_next = lnr->lr_next;
+! else
+! buf->b_listener = lnr->lr_next;
+! free_callback(lnr->lr_callback, lnr->lr_partial);
+! vim_free(lnr);
+! }
+! prev = lnr;
+ }
+ }
+
+ /*
+*** ../vim-8.1.1320/src/screen.c 2019-05-09 15:12:45.176723907 +0200
+--- src/screen.c 2019-05-11 19:53:53.403623537 +0200
+***************
+*** 564,569 ****
+--- 564,574 ----
+ type = 0;
+ }
+
++ #ifdef FEAT_EVAL
++ // Before updating the screen, notify any listeners of changed text.
++ invoke_listeners();
++ #endif
++
+ if (must_redraw)
+ {
+ if (type < must_redraw) /* use maximal type */
+*** ../vim-8.1.1320/src/evalfunc.c 2019-05-11 18:28:41.351611622 +0200
+--- src/evalfunc.c 2019-05-11 20:44:57.028591441 +0200
+***************
+*** 2009,2020 ****
+ return buf;
+ }
+
+- #ifdef FEAT_SIGNS
+ /*
+ * Get the buffer from "arg" and give an error and return NULL if it is not
+ * valid.
+ */
+! static buf_T *
+ get_buf_arg(typval_T *arg)
+ {
+ buf_T *buf;
+--- 2009,2019 ----
+ return buf;
+ }
+
+ /*
+ * Get the buffer from "arg" and give an error and return NULL if it is not
+ * valid.
+ */
+! buf_T *
+ get_buf_arg(typval_T *arg)
+ {
+ buf_T *buf;
+***************
+*** 2026,2032 ****
+ semsg(_("E158: Invalid buffer name: %s"), tv_get_string(arg));
+ return buf;
+ }
+- #endif
+
+ /*
+ * "bufname(expr)" function
+--- 2025,2030 ----
+*** ../vim-8.1.1320/src/proto/evalfunc.pro 2019-01-03 22:19:22.227686199 +0100
+--- src/proto/evalfunc.pro 2019-05-11 20:45:17.040507331 +0200
+***************
+*** 5,10 ****
+--- 5,11 ----
+ int call_internal_func(char_u *name, int argcount, typval_T *argvars, typval_T *rettv);
+ buf_T *buflist_find_by_name(char_u *name, int curtab_only);
+ buf_T *tv_get_buf(typval_T *tv, int curtab_only);
++ buf_T *get_buf_arg(typval_T *arg);
+ void execute_redir_str(char_u *value, int value_len);
+ void mzscheme_call_vim(char_u *name, typval_T *args, typval_T *rettv);
+ float_T vim_round(float_T f);
+*** ../vim-8.1.1320/src/version.c 2019-05-11 19:14:11.589313987 +0200
+--- src/version.c 2019-05-11 19:37:27.213616239 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1321,
+ /**/
+
+--
+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.1322 b/data/vim/patches/8.1.1322
new file mode 100644
index 000000000..6309aa994
--- /dev/null
+++ b/data/vim/patches/8.1.1322
@@ -0,0 +1,1196 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1322
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1322
+Problem: Cygwin makefile is not nicely indented.
+Solution: Addjust spaces in preprocessor directives. (Ken Takata)
+Files: src/Make_cyg_ming.mak
+
+
+*** ../vim-8.1.1321/src/Make_cyg_ming.mak 2019-05-11 17:03:55.170019762 +0200
+--- src/Make_cyg_ming.mak 2019-05-11 21:20:40.814284981 +0200
+***************
+*** 163,179 ****
+ # Command definitions (depends on cross-compiling and shell)
+ ifeq ($(CROSS),yes)
+ # cross-compiler prefix:
+! ifndef CROSS_COMPILE
+ CROSS_COMPILE = i586-pc-mingw32msvc-
+! endif
+ DEL = rm
+ MKDIR = mkdir -p
+ DIRSLASH = /
+ else
+ # normal (Windows) compilation:
+! ifndef CROSS_COMPILE
+ CROSS_COMPILE =
+! endif
+
+ # About the "sh.exe" condition, as explained by Ken Takata:
+ #
+--- 163,179 ----
+ # Command definitions (depends on cross-compiling and shell)
+ ifeq ($(CROSS),yes)
+ # cross-compiler prefix:
+! ifndef CROSS_COMPILE
+ CROSS_COMPILE = i586-pc-mingw32msvc-
+! endif
+ DEL = rm
+ MKDIR = mkdir -p
+ DIRSLASH = /
+ else
+ # normal (Windows) compilation:
+! ifndef CROSS_COMPILE
+ CROSS_COMPILE =
+! endif
+
+ # About the "sh.exe" condition, as explained by Ken Takata:
+ #
+***************
+*** 193,207 ****
+ # $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
+ DIRSLASH = /
+! else
+ DEL = del
+ MKDIR = mkdir
+ DIRSLASH = \\
+! endif
+ endif
+ CC := $(CROSS_COMPILE)gcc
+ CXX := $(CROSS_COMPILE)g++
+--- 193,207 ----
+ # $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
+ DIRSLASH = /
+! else
+ DEL = del
+ MKDIR = mkdir
+ DIRSLASH = \\
+! endif
+ endif
+ CC := $(CROSS_COMPILE)gcc
+ CXX := $(CROSS_COMPILE)g++
+***************
+*** 223,253 ****
+ # DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
+ # PERL_VER=[Perl version, eg 56, 58, 510] (default is 524)
+ ifdef PERL
+! ifndef PERL_VER
+ PERL_VER=524
+! endif
+! ifndef DYNAMIC_PERL
+ DYNAMIC_PERL=yes
+! endif
+ # on Linux, for cross-compile, it's here:
+ #PERLLIB=/home/ron/ActivePerl/lib
+ # on NT, it's here:
+ PERLEXE=$(PERL)/bin/perl
+ PERLLIB=$(PERL)/lib
+ PERLLIBS=$(PERLLIB)/Core
+! ifeq ($(UNDER_CYGWIN),yes)
+ PERLTYPEMAP:=$(shell cygpath -m $(PERLLIB)/ExtUtils/typemap)
+ XSUBPPTRY:=$(shell cygpath -m $(PERLLIB)/ExtUtils/xsubpp)
+! else
+ PERLTYPEMAP=$(PERLLIB)/ExtUtils/typemap
+ XSUBPPTRY=$(PERLLIB)/ExtUtils/xsubpp
+! endif
+ XSUBPP_EXISTS=$(shell $(PERLEXE) -e "print 1 unless -e '$(XSUBPPTRY)'")
+! ifeq "$(XSUBPP_EXISTS)" ""
+ XSUBPP=$(PERLEXE) $(XSUBPPTRY)
+! else
+ XSUBPP=xsubpp
+! endif
+ endif
+
+ # Lua interface:
+--- 223,253 ----
+ # DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
+ # PERL_VER=[Perl version, eg 56, 58, 510] (default is 524)
+ ifdef PERL
+! ifndef PERL_VER
+ PERL_VER=524
+! endif
+! ifndef DYNAMIC_PERL
+ DYNAMIC_PERL=yes
+! endif
+ # on Linux, for cross-compile, it's here:
+ #PERLLIB=/home/ron/ActivePerl/lib
+ # on NT, it's here:
+ PERLEXE=$(PERL)/bin/perl
+ PERLLIB=$(PERL)/lib
+ PERLLIBS=$(PERLLIB)/Core
+! ifeq ($(UNDER_CYGWIN),yes)
+ PERLTYPEMAP:=$(shell cygpath -m $(PERLLIB)/ExtUtils/typemap)
+ XSUBPPTRY:=$(shell cygpath -m $(PERLLIB)/ExtUtils/xsubpp)
+! else
+ PERLTYPEMAP=$(PERLLIB)/ExtUtils/typemap
+ XSUBPPTRY=$(PERLLIB)/ExtUtils/xsubpp
+! endif
+ XSUBPP_EXISTS=$(shell $(PERLEXE) -e "print 1 unless -e '$(XSUBPPTRY)'")
+! ifeq "$(XSUBPP_EXISTS)" ""
+ XSUBPP=$(PERLEXE) $(XSUBPPTRY)
+! else
+ XSUBPP=xsubpp
+! endif
+ endif
+
+ # Lua interface:
+***************
+*** 257,274 ****
+ # DYNAMIC_LUA=yes (to load the Lua DLL dynamically)
+ # LUA_VER=[Lua version, eg 51, 52] (default is 53)
+ ifdef LUA
+! ifndef DYNAMIC_LUA
+ DYNAMIC_LUA=yes
+! endif
+
+! ifndef LUA_VER
+ LUA_VER=53
+! endif
+
+! ifeq (no,$(DYNAMIC_LUA))
+ LUA_LIBDIR = $(LUA)/lib
+ LUA_LIB = -L$(LUA_LIBDIR) -llua
+! endif
+
+ endif
+
+--- 257,274 ----
+ # DYNAMIC_LUA=yes (to load the Lua DLL dynamically)
+ # LUA_VER=[Lua version, eg 51, 52] (default is 53)
+ ifdef LUA
+! ifndef DYNAMIC_LUA
+ DYNAMIC_LUA=yes
+! endif
+
+! ifndef LUA_VER
+ LUA_VER=53
+! endif
+
+! ifeq (no,$(DYNAMIC_LUA))
+ LUA_LIBDIR = $(LUA)/lib
+ LUA_LIB = -L$(LUA_LIBDIR) -llua
+! endif
+
+ endif
+
+***************
+*** 280,332 ****
+ # C:\Program Files (x86)\Racket\lib\libracket3m_XXXXXX.dll
+ # MZSCHEME_DEBUG=no
+ ifdef MZSCHEME
+! ifndef DYNAMIC_MZSCHEME
+ DYNAMIC_MZSCHEME=yes
+! endif
+
+! ifndef MZSCHEME_VER
+ MZSCHEME_VER=3m_a0solc
+! endif
+
+ # for version 4.x we need to generate byte-code for Scheme base
+! ifndef MZSCHEME_GENERATE_BASE
+ MZSCHEME_GENERATE_BASE=no
+! endif
+
+! ifneq ($(wildcard $(MZSCHEME)/lib/msvc/libmzsch$(MZSCHEME_VER).lib),)
+ MZSCHEME_MAIN_LIB=mzsch
+! else
+ MZSCHEME_MAIN_LIB=racket
+! endif
+
+! ifndef MZSCHEME_PRECISE_GC
+ MZSCHEME_PRECISE_GC=no
+! ifneq ($(wildcard $(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll),)
+! ifeq ($(wildcard $(MZSCHEME)\lib\libmzgc$(MZSCHEME_VER).dll),)
+ MZSCHEME_PRECISE_GC=yes
+! endif
+! else
+! ifneq ($(wildcard $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib),)
+! ifeq ($(wildcard $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib),)
+ MZSCHEME_PRECISE_GC=yes
+! endif
+! endif
+! endif
+! endif
+
+! ifeq (no,$(DYNAMIC_MZSCHEME))
+! ifeq (yes,$(MZSCHEME_PRECISE_GC))
+ MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
+! else
+ MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
+! endif
+ # the modern MinGW can dynamically link to dlls directly.
+ # point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
+! ifndef MZSCHEME_DLLS
+ MZSCHEME_DLLS=$(MZSCHEME)
+! endif
+ MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)\lib
+! endif
+
+ endif
+
+--- 280,332 ----
+ # C:\Program Files (x86)\Racket\lib\libracket3m_XXXXXX.dll
+ # MZSCHEME_DEBUG=no
+ ifdef MZSCHEME
+! ifndef DYNAMIC_MZSCHEME
+ DYNAMIC_MZSCHEME=yes
+! endif
+
+! ifndef MZSCHEME_VER
+ MZSCHEME_VER=3m_a0solc
+! endif
+
+ # for version 4.x we need to generate byte-code for Scheme base
+! ifndef MZSCHEME_GENERATE_BASE
+ MZSCHEME_GENERATE_BASE=no
+! endif
+
+! ifneq ($(wildcard $(MZSCHEME)/lib/msvc/libmzsch$(MZSCHEME_VER).lib),)
+ MZSCHEME_MAIN_LIB=mzsch
+! else
+ MZSCHEME_MAIN_LIB=racket
+! endif
+
+! ifndef MZSCHEME_PRECISE_GC
+ MZSCHEME_PRECISE_GC=no
+! ifneq ($(wildcard $(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll),)
+! ifeq ($(wildcard $(MZSCHEME)\lib\libmzgc$(MZSCHEME_VER).dll),)
+ MZSCHEME_PRECISE_GC=yes
+! endif
+! else
+! ifneq ($(wildcard $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib),)
+! ifeq ($(wildcard $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib),)
+ MZSCHEME_PRECISE_GC=yes
+! endif
+! endif
+! endif
+! endif
+
+! ifeq (no,$(DYNAMIC_MZSCHEME))
+! ifeq (yes,$(MZSCHEME_PRECISE_GC))
+ MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
+! else
+ MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
+! endif
+ # the modern MinGW can dynamically link to dlls directly.
+ # point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
+! ifndef MZSCHEME_DLLS
+ MZSCHEME_DLLS=$(MZSCHEME)
+! endif
+ MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)\lib
+! endif
+
+ endif
+
+***************
+*** 335,366 ****
+ # DYNAMIC_PYTHON=yes (to load the Python DLL dynamically)
+ # PYTHON_VER=[Python version, eg 22, 23, ..., 27] (default is 27)
+ ifdef PYTHON
+! ifndef DYNAMIC_PYTHON
+ DYNAMIC_PYTHON=yes
+! endif
+
+! ifndef PYTHON_VER
+ PYTHON_VER=27
+! endif
+! ifndef DYNAMIC_PYTHON_DLL
+ DYNAMIC_PYTHON_DLL=python$(PYTHON_VER).dll
+! endif
+! ifdef PYTHON_HOME
+ PYTHON_HOME_DEF=-DPYTHON_HOME=\"$(PYTHON_HOME)\"
+! endif
+
+! ifeq (no,$(DYNAMIC_PYTHON))
+ PYTHONLIB=-L$(PYTHON)/libs -lpython$(PYTHON_VER)
+! endif
+ # my include files are in 'win32inc' on Linux, and 'include' in the standard
+ # NT distro (ActiveState)
+! ifndef PYTHONINC
+! ifeq ($(CROSS),no)
+ PYTHONINC=-I $(PYTHON)/include
+! else
+ PYTHONINC=-I $(PYTHON)/win32inc
+! endif
+! endif
+ endif
+
+ # Python3 interface:
+--- 335,366 ----
+ # DYNAMIC_PYTHON=yes (to load the Python DLL dynamically)
+ # PYTHON_VER=[Python version, eg 22, 23, ..., 27] (default is 27)
+ ifdef PYTHON
+! ifndef DYNAMIC_PYTHON
+ DYNAMIC_PYTHON=yes
+! endif
+
+! ifndef PYTHON_VER
+ PYTHON_VER=27
+! endif
+! ifndef DYNAMIC_PYTHON_DLL
+ DYNAMIC_PYTHON_DLL=python$(PYTHON_VER).dll
+! endif
+! ifdef PYTHON_HOME
+ PYTHON_HOME_DEF=-DPYTHON_HOME=\"$(PYTHON_HOME)\"
+! endif
+
+! ifeq (no,$(DYNAMIC_PYTHON))
+ PYTHONLIB=-L$(PYTHON)/libs -lpython$(PYTHON_VER)
+! endif
+ # my include files are in 'win32inc' on Linux, and 'include' in the standard
+ # NT distro (ActiveState)
+! ifndef PYTHONINC
+! ifeq ($(CROSS),no)
+ PYTHONINC=-I $(PYTHON)/include
+! else
+ PYTHONINC=-I $(PYTHON)/win32inc
+! endif
+! endif
+ endif
+
+ # Python3 interface:
+***************
+*** 368,398 ****
+ # DYNAMIC_PYTHON3=yes (to load the Python3 DLL dynamically)
+ # PYTHON3_VER=[Python3 version, eg 31, 32] (default is 36)
+ ifdef PYTHON3
+! ifndef DYNAMIC_PYTHON3
+ DYNAMIC_PYTHON3=yes
+! endif
+
+! ifndef PYTHON3_VER
+ PYTHON3_VER=36
+! endif
+! ifndef DYNAMIC_PYTHON3_DLL
+ DYNAMIC_PYTHON3_DLL=python$(PYTHON3_VER).dll
+! endif
+! ifdef PYTHON3_HOME
+ PYTHON3_HOME_DEF=-DPYTHON3_HOME=L\"$(PYTHON3_HOME)\"
+! endif
+
+! ifeq (no,$(DYNAMIC_PYTHON3))
+ PYTHON3LIB=-L$(PYTHON3)/libs -lpython$(PYTHON3_VER)
+! endif
+
+! ifndef PYTHON3INC
+! ifeq ($(CROSS),no)
+ PYTHON3INC=-I $(PYTHON3)/include
+! else
+ PYTHON3INC=-I $(PYTHON3)/win32inc
+! endif
+! endif
+ endif
+
+ # TCL interface:
+--- 368,398 ----
+ # DYNAMIC_PYTHON3=yes (to load the Python3 DLL dynamically)
+ # PYTHON3_VER=[Python3 version, eg 31, 32] (default is 36)
+ ifdef PYTHON3
+! ifndef DYNAMIC_PYTHON3
+ DYNAMIC_PYTHON3=yes
+! endif
+
+! ifndef PYTHON3_VER
+ PYTHON3_VER=36
+! endif
+! ifndef DYNAMIC_PYTHON3_DLL
+ DYNAMIC_PYTHON3_DLL=python$(PYTHON3_VER).dll
+! endif
+! ifdef PYTHON3_HOME
+ PYTHON3_HOME_DEF=-DPYTHON3_HOME=L\"$(PYTHON3_HOME)\"
+! endif
+
+! ifeq (no,$(DYNAMIC_PYTHON3))
+ PYTHON3LIB=-L$(PYTHON3)/libs -lpython$(PYTHON3_VER)
+! endif
+
+! ifndef PYTHON3INC
+! ifeq ($(CROSS),no)
+ PYTHON3INC=-I $(PYTHON3)/include
+! else
+ PYTHON3INC=-I $(PYTHON3)/win32inc
+! endif
+! endif
+ endif
+
+ # TCL interface:
+***************
+*** 403,420 ****
+ # You must set TCL_VER_LONG when you set TCL_VER.
+ # TCL_DLL=[TCL dll name, eg tcl86.dll] (default is tcl86.dll)
+ ifdef TCL
+! ifndef DYNAMIC_TCL
+ DYNAMIC_TCL=yes
+! endif
+! ifndef TCL_VER
+ TCL_VER = 86
+! endif
+! ifndef TCL_VER_LONG
+ TCL_VER_LONG = 8.6
+! endif
+! ifndef TCL_DLL
+ TCL_DLL = tcl$(TCL_VER).dll
+! endif
+ TCLINC += -I$(TCL)/include
+ endif
+
+--- 403,420 ----
+ # You must set TCL_VER_LONG when you set TCL_VER.
+ # TCL_DLL=[TCL dll name, eg tcl86.dll] (default is tcl86.dll)
+ ifdef TCL
+! ifndef DYNAMIC_TCL
+ DYNAMIC_TCL=yes
+! endif
+! ifndef TCL_VER
+ TCL_VER = 86
+! endif
+! ifndef TCL_VER_LONG
+ TCL_VER_LONG = 8.6
+! endif
+! ifndef TCL_DLL
+ TCL_DLL = tcl$(TCL_VER).dll
+! endif
+ TCLINC += -I$(TCL)/include
+ endif
+
+***************
+*** 430,496 ****
+ # RUBY_VER=19
+ # RUBY_API_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.)
+ ifdef RUBY
+! ifndef DYNAMIC_RUBY
+ DYNAMIC_RUBY=yes
+! endif
+ # Set default value
+! ifndef RUBY_VER
+ RUBY_VER = 22
+! endif
+! ifndef RUBY_VER_LONG
+ RUBY_VER_LONG = 2.2.0
+! endif
+! ifndef RUBY_API_VER_LONG
+ RUBY_API_VER_LONG = $(RUBY_VER_LONG)
+! endif
+! ifndef RUBY_API_VER
+ RUBY_API_VER = $(subst .,,$(RUBY_API_VER_LONG))
+! endif
+
+! ifndef RUBY_PLATFORM
+! ifeq ($(RUBY_VER), 16)
+ RUBY_PLATFORM = i586-mswin32
+! else
+! ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/i386-mingw32),)
+ RUBY_PLATFORM = i386-mingw32
+! else
+! ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/x64-mingw32),)
+ RUBY_PLATFORM = x64-mingw32
+! else
+ RUBY_PLATFORM = i386-mswin32
+! endif
+! endif
+! endif
+! endif
+
+! ifndef RUBY_INSTALL_NAME
+! ifeq ($(RUBY_VER), 16)
+ RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
+! else
+! ifndef RUBY_MSVCRT_NAME
+ # Base name of msvcrXX.dll which is used by ruby's dll.
+ RUBY_MSVCRT_NAME = msvcrt
+! endif
+! ifeq ($(ARCH),x86-64)
+ RUBY_INSTALL_NAME = x64-$(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
+! else
+ RUBY_INSTALL_NAME = $(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
+! endif
+! endif
+! endif
+
+! ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
+ 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)
+! endif
+
+ endif # RUBY
+
+--- 430,492 ----
+ # RUBY_VER=19
+ # RUBY_API_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.)
+ ifdef RUBY
+! ifndef DYNAMIC_RUBY
+ DYNAMIC_RUBY=yes
+! endif
+ # Set default value
+! ifndef RUBY_VER
+ RUBY_VER = 22
+! endif
+! ifndef RUBY_VER_LONG
+ RUBY_VER_LONG = 2.2.0
+! endif
+! ifndef RUBY_API_VER_LONG
+ RUBY_API_VER_LONG = $(RUBY_VER_LONG)
+! endif
+! ifndef RUBY_API_VER
+ RUBY_API_VER = $(subst .,,$(RUBY_API_VER_LONG))
+! endif
+
+! ifndef RUBY_PLATFORM
+! ifeq ($(RUBY_VER), 16)
+ RUBY_PLATFORM = i586-mswin32
+! else ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/i386-mingw32),)
+ RUBY_PLATFORM = i386-mingw32
+! else ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/x64-mingw32),)
+ RUBY_PLATFORM = x64-mingw32
+! else
+ RUBY_PLATFORM = i386-mswin32
+! endif
+! endif
+
+! ifndef RUBY_INSTALL_NAME
+! ifeq ($(RUBY_VER), 16)
+ RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
+! else
+! ifndef RUBY_MSVCRT_NAME
+ # Base name of msvcrXX.dll which is used by ruby's dll.
+ RUBY_MSVCRT_NAME = msvcrt
+! endif
+! ifeq ($(ARCH),x86-64)
+ RUBY_INSTALL_NAME = x64-$(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
+! else
+ RUBY_INSTALL_NAME = $(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
+! endif
+! endif
+! endif
+
+! ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
+ 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)
+! endif
+
+ endif # RUBY
+
+***************
+*** 515,603 ****
+ DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
+ GETTEXTINCLUDE = $(GETTEXT)/include
+ GETTEXTLIB = $(INTLPATH)
+! ifeq (yes, $(GETTEXT))
+ DEFINES += -DDYNAMIC_GETTEXT
+! else
+! ifdef DYNAMIC_GETTEXT
+ DEFINES += -D$(DYNAMIC_GETTEXT)
+! ifdef GETTEXT_DYNAMIC
+ DEFINES += -DGETTEXT_DYNAMIC -DGETTEXT_DLL=\"$(GETTEXT_DYNAMIC)\"
+! endif
+! endif
+! endif
+ endif
+
+ ifdef PERL
+ CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
+! ifeq (yes, $(DYNAMIC_PERL))
+ CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
+ EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER)
+! endif
+ 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
+ endif
+
+ ifdef MZSCHEME
+! ifndef MZSCHEME_COLLECTS
+ MZSCHEME_COLLECTS=$(MZSCHEME)/collects
+! ifeq (yes, $(UNDER_CYGWIN))
+ MZSCHEME_COLLECTS:=$(shell cygpath -m $(MZSCHEME_COLLECTS) | sed -e 's/ /\\ /g')
+! endif
+! endif
+ CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME_COLLECTS)\"
+! ifeq (yes, $(DYNAMIC_MZSCHEME))
+! ifeq (yes, $(MZSCHEME_PRECISE_GC))
+ # Precise GC does not use separate dll
+ CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\"
+! else
+ CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
+! endif
+! endif
+! ifeq (yes, "$(MZSCHEME_DEBUG)")
+ CFLAGS += -DMZSCHEME_FORCE_GC
+! endif
+ endif
+
+ ifdef RUBY
+ CFLAGS += -DFEAT_RUBY $(RUBYINC)
+! ifeq (yes, $(DYNAMIC_RUBY))
+ CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
+ CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
+! endif
+! ifeq (no, $(DYNAMIC_RUBY))
+ CFLAGS += -DRUBY_VERSION=$(RUBY_VER)
+! endif
+! ifneq ($(findstring w64-mingw32,$(CC)),)
+ # A workaround for MinGW-w64
+ CFLAGS += -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE
+! endif
+ endif
+
+ ifdef PYTHON
+ CFLAGS += -DFEAT_PYTHON
+! ifeq (yes, $(DYNAMIC_PYTHON))
+ CFLAGS += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"$(DYNAMIC_PYTHON_DLL)\"
+! endif
+ endif
+
+ ifdef PYTHON3
+ CFLAGS += -DFEAT_PYTHON3
+! ifeq (yes, $(DYNAMIC_PYTHON3))
+ CFLAGS += -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"$(DYNAMIC_PYTHON3_DLL)\"
+! endif
+ endif
+
+ ifdef TCL
+ CFLAGS += -DFEAT_TCL $(TCLINC)
+! ifeq (yes, $(DYNAMIC_TCL))
+ CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
+! endif
+ endif
+
+ ifeq ($(POSTSCRIPT),yes)
+--- 511,597 ----
+ DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
+ GETTEXTINCLUDE = $(GETTEXT)/include
+ GETTEXTLIB = $(INTLPATH)
+! ifeq (yes, $(GETTEXT))
+ DEFINES += -DDYNAMIC_GETTEXT
+! else ifdef DYNAMIC_GETTEXT
+ DEFINES += -D$(DYNAMIC_GETTEXT)
+! ifdef GETTEXT_DYNAMIC
+ DEFINES += -DGETTEXT_DYNAMIC -DGETTEXT_DLL=\"$(GETTEXT_DYNAMIC)\"
+! endif
+! endif
+ endif
+
+ ifdef PERL
+ CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
+! ifeq (yes, $(DYNAMIC_PERL))
+ CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
+ EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER)
+! endif
+ 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
+ endif
+
+ ifdef MZSCHEME
+! ifndef MZSCHEME_COLLECTS
+ MZSCHEME_COLLECTS=$(MZSCHEME)/collects
+! ifeq (yes, $(UNDER_CYGWIN))
+ MZSCHEME_COLLECTS:=$(shell cygpath -m $(MZSCHEME_COLLECTS) | sed -e 's/ /\\ /g')
+! endif
+! endif
+ CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME_COLLECTS)\"
+! ifeq (yes, $(DYNAMIC_MZSCHEME))
+! ifeq (yes, $(MZSCHEME_PRECISE_GC))
+ # Precise GC does not use separate dll
+ CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\"
+! else
+ CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
+! endif
+! endif
+! ifeq (yes, "$(MZSCHEME_DEBUG)")
+ CFLAGS += -DMZSCHEME_FORCE_GC
+! endif
+ endif
+
+ ifdef RUBY
+ CFLAGS += -DFEAT_RUBY $(RUBYINC)
+! ifeq (yes, $(DYNAMIC_RUBY))
+ CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
+ CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
+! endif
+! ifeq (no, $(DYNAMIC_RUBY))
+ CFLAGS += -DRUBY_VERSION=$(RUBY_VER)
+! endif
+! ifneq ($(findstring w64-mingw32,$(CC)),)
+ # A workaround for MinGW-w64
+ CFLAGS += -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE
+! endif
+ endif
+
+ ifdef PYTHON
+ CFLAGS += -DFEAT_PYTHON
+! ifeq (yes, $(DYNAMIC_PYTHON))
+ CFLAGS += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"$(DYNAMIC_PYTHON_DLL)\"
+! endif
+ endif
+
+ ifdef PYTHON3
+ CFLAGS += -DFEAT_PYTHON3
+! ifeq (yes, $(DYNAMIC_PYTHON3))
+ CFLAGS += -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"$(DYNAMIC_PYTHON3_DLL)\"
+! endif
+ endif
+
+ ifdef TCL
+ CFLAGS += -DFEAT_TCL $(TCLINC)
+! ifeq (yes, $(DYNAMIC_TCL))
+ CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
+! endif
+ endif
+
+ ifeq ($(POSTSCRIPT),yes)
+***************
+*** 614,628 ****
+
+ ifeq ($(NETBEANS),yes)
+ # Only allow NETBEANS for a GUI build.
+! ifeq (yes, $(GUI))
+ DEFINES += -DFEAT_NETBEANS_INTG
+
+! ifeq ($(NBDEBUG), yes)
+ DEFINES += -DNBDEBUG
+ NBDEBUG_INCL = nbdebug.h
+ NBDEBUG_SRC = nbdebug.c
+! endif
+! endif
+ endif
+
+ ifeq ($(CHANNEL),yes)
+--- 608,622 ----
+
+ ifeq ($(NETBEANS),yes)
+ # Only allow NETBEANS for a GUI build.
+! ifeq (yes, $(GUI))
+ DEFINES += -DFEAT_NETBEANS_INTG
+
+! ifeq ($(NBDEBUG), yes)
+ DEFINES += -DNBDEBUG
+ NBDEBUG_INCL = nbdebug.h
+ NBDEBUG_SRC = nbdebug.c
+! endif
+! endif
+ endif
+
+ ifeq ($(CHANNEL),yes)
+***************
+*** 642,680 ****
+ # DirectWrite (DirectX)
+ ifeq ($(DIRECTX),yes)
+ # Only allow DirectWrite for a GUI build.
+! ifeq (yes, $(GUI))
+ DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
+! ifneq ($(COLOR_EMOJI),no)
+ DEFINES += -DFEAT_DIRECTX_COLOR_EMOJI
+! endif
+! endif
+ endif
+
+ # Only allow XPM for a GUI build.
+ ifeq (yes, $(GUI))
+
+! ifndef XPM
+! ifeq ($(ARCH),i386)
+ XPM = xpm/x86
+! endif
+! ifeq ($(ARCH),i486)
+ XPM = xpm/x86
+! endif
+! ifeq ($(ARCH),i586)
+ XPM = xpm/x86
+! endif
+! ifeq ($(ARCH),i686)
+ XPM = xpm/x86
+! endif
+! ifeq ($(ARCH),x86-64)
+ XPM = xpm/x64
+! endif
+! endif
+! ifdef XPM
+! ifneq ($(XPM),no)
+ CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include -I $(XPM)/../include
+! endif
+! endif
+
+ endif
+
+--- 636,674 ----
+ # DirectWrite (DirectX)
+ ifeq ($(DIRECTX),yes)
+ # Only allow DirectWrite for a GUI build.
+! ifeq (yes, $(GUI))
+ DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
+! ifneq ($(COLOR_EMOJI),no)
+ DEFINES += -DFEAT_DIRECTX_COLOR_EMOJI
+! endif
+! endif
+ endif
+
+ # Only allow XPM for a GUI build.
+ ifeq (yes, $(GUI))
+
+! ifndef XPM
+! ifeq ($(ARCH),i386)
+ XPM = xpm/x86
+! endif
+! ifeq ($(ARCH),i486)
+ XPM = xpm/x86
+! endif
+! ifeq ($(ARCH),i586)
+ XPM = xpm/x86
+! endif
+! ifeq ($(ARCH),i686)
+ XPM = xpm/x86
+! endif
+! ifeq ($(ARCH),x86-64)
+ XPM = xpm/x64
+! endif
+! endif
+! ifdef XPM
+! ifneq ($(XPM),no)
+ CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include -I $(XPM)/../include
+! endif
+! endif
+
+ endif
+
+***************
+*** 682,697 ****
+ CFLAGS += -g -fstack-check
+ DEBUG_SUFFIX=d
+ else
+! ifeq ($(OPTIMIZE), SIZE)
+ CFLAGS += -Os
+! else
+! ifeq ($(OPTIMIZE), MAXSPEED)
+ CFLAGS += -O3
+ CFLAGS += -fomit-frame-pointer -freg-struct-return
+! else # SPEED
+ CFLAGS += -O2
+! endif
+! endif
+ LFLAGS += -s
+ endif
+
+--- 676,689 ----
+ CFLAGS += -g -fstack-check
+ DEBUG_SUFFIX=d
+ else
+! ifeq ($(OPTIMIZE), SIZE)
+ CFLAGS += -Os
+! else ifeq ($(OPTIMIZE), MAXSPEED)
+ CFLAGS += -O3
+ CFLAGS += -fomit-frame-pointer -freg-struct-return
+! else # SPEED
+ CFLAGS += -O2
+! endif
+ LFLAGS += -s
+ endif
+
+***************
+*** 785,797 ****
+ ifdef MZSCHEME
+ OBJ += $(OUTDIR)/if_mzsch.o
+ MZSCHEME_INCL = if_mzsch.h
+! ifeq (yes,$(MZSCHEME_GENERATE_BASE))
+ CFLAGS += -DINCLUDE_MZSCHEME_BASE
+ MZ_EXTRA_DEP += mzscheme_base.c
+! endif
+! ifeq (yes,$(MZSCHEME_PRECISE_GC))
+ CFLAGS += -DMZ_PRECISE_GC
+! endif
+ endif
+ ifdef PYTHON
+ OBJ += $(OUTDIR)/if_python.o
+--- 777,789 ----
+ ifdef MZSCHEME
+ OBJ += $(OUTDIR)/if_mzsch.o
+ MZSCHEME_INCL = if_mzsch.h
+! ifeq (yes,$(MZSCHEME_GENERATE_BASE))
+ CFLAGS += -DINCLUDE_MZSCHEME_BASE
+ MZ_EXTRA_DEP += mzscheme_base.c
+! endif
+! ifeq (yes,$(MZSCHEME_PRECISE_GC))
+ CFLAGS += -DMZ_PRECISE_GC
+! endif
+ endif
+ ifdef PYTHON
+ OBJ += $(OUTDIR)/if_python.o
+***************
+*** 810,826 ****
+ endif
+
+ ifeq ($(NETBEANS),yes)
+! ifneq ($(CHANNEL),yes)
+ # Cannot use Netbeans without CHANNEL
+ NETBEANS=no
+! else
+! ifneq (yes, $(GUI))
+ # Cannot use Netbeans without GUI.
+ NETBEANS=no
+! else
+ OBJ += $(OUTDIR)/netbeans.o
+! endif
+! endif
+ endif
+
+ ifeq ($(CHANNEL),yes)
+--- 802,816 ----
+ endif
+
+ ifeq ($(NETBEANS),yes)
+! ifneq ($(CHANNEL),yes)
+ # Cannot use Netbeans without CHANNEL
+ NETBEANS=no
+! else ifneq (yes, $(GUI))
+ # Cannot use Netbeans without GUI.
+ NETBEANS=no
+! else
+ OBJ += $(OUTDIR)/netbeans.o
+! endif
+ endif
+
+ ifeq ($(CHANNEL),yes)
+***************
+*** 830,848 ****
+
+ ifeq ($(DIRECTX),yes)
+ # Only allow DIRECTX for a GUI build.
+! ifeq (yes, $(GUI))
+ OBJ += $(OUTDIR)/gui_dwrite.o
+ LIB += -ld2d1 -ldwrite
+ USE_STDCPLUS = yes
+! endif
+ endif
+ ifneq ($(XPM),no)
+ # Only allow XPM for a GUI build.
+! ifeq (yes, $(GUI))
+ OBJ += $(OUTDIR)/xpm_w32.o
+ # You'll need libXpm.a from http://gnuwin32.sf.net
+ LIB += -L$(XPM)/lib -lXpm
+! endif
+ endif
+
+ ifeq ($(TERMINAL),yes)
+--- 820,838 ----
+
+ ifeq ($(DIRECTX),yes)
+ # Only allow DIRECTX for a GUI build.
+! ifeq (yes, $(GUI))
+ OBJ += $(OUTDIR)/gui_dwrite.o
+ LIB += -ld2d1 -ldwrite
+ USE_STDCPLUS = yes
+! endif
+ endif
+ ifneq ($(XPM),no)
+ # Only allow XPM for a GUI build.
+! ifeq (yes, $(GUI))
+ OBJ += $(OUTDIR)/xpm_w32.o
+ # You'll need libXpm.a from http://gnuwin32.sf.net
+ LIB += -L$(XPM)/lib -lXpm
+! endif
+ endif
+
+ ifeq ($(TERMINAL),yes)
+***************
+*** 915,946 ****
+ endif
+
+ ifdef GETTEXT
+! ifneq (yes, $(GETTEXT))
+ CFLAGS += -I$(GETTEXTINCLUDE)
+! ifndef STATIC_GETTEXT
+ LIB += -L$(GETTEXTLIB) -l$(INTLLIB)
+! ifeq (USE_SAFE_GETTEXT_DLL, $(DYNAMIC_GETTEXT))
+ OBJ+=$(SAFE_GETTEXT_DLL_OBJ)
+! endif
+! else
+ LIB += -L$(GETTEXTLIB) -lintl
+! endif
+! endif
+ endif
+
+ ifdef PERL
+! ifeq (no, $(DYNAMIC_PERL))
+ LIB += -L$(PERLLIBS) -lperl$(PERL_VER)
+! endif
+ endif
+
+ ifdef TCL
+ LIB += -L$(TCL)/lib
+! ifeq (yes, $(DYNAMIC_TCL))
+ LIB += -ltclstub$(TCL_VER)
+! else
+ LIB += -ltcl$(TCL_VER)
+! endif
+ endif
+
+ ifeq (yes, $(OLE))
+--- 905,936 ----
+ endif
+
+ ifdef GETTEXT
+! ifneq (yes, $(GETTEXT))
+ CFLAGS += -I$(GETTEXTINCLUDE)
+! ifndef STATIC_GETTEXT
+ LIB += -L$(GETTEXTLIB) -l$(INTLLIB)
+! ifeq (USE_SAFE_GETTEXT_DLL, $(DYNAMIC_GETTEXT))
+ OBJ+=$(SAFE_GETTEXT_DLL_OBJ)
+! endif
+! else
+ LIB += -L$(GETTEXTLIB) -lintl
+! endif
+! endif
+ endif
+
+ ifdef PERL
+! ifeq (no, $(DYNAMIC_PERL))
+ LIB += -L$(PERLLIBS) -lperl$(PERL_VER)
+! endif
+ endif
+
+ ifdef TCL
+ LIB += -L$(TCL)/lib
+! ifeq (yes, $(DYNAMIC_TCL))
+ LIB += -ltclstub$(TCL_VER)
+! else
+ LIB += -ltcl$(TCL_VER)
+! endif
+ endif
+
+ ifeq (yes, $(OLE))
+***************
+*** 951,985 ****
+
+ ifeq (yes, $(IME))
+ DEFINES += -DFEAT_MBYTE_IME
+! ifeq (yes, $(DYNAMIC_IME))
+ DEFINES += -DDYNAMIC_IME
+! else
+ LIB += -limm32
+! endif
+ endif
+
+ ifdef ICONV
+! ifneq (yes, $(ICONV))
+ LIB += -L$(ICONV)
+ CFLAGS += -I$(ICONV)
+! endif
+ DEFINES+=-DDYNAMIC_ICONV
+ endif
+
+ ifeq (yes, $(USE_STDCPLUS))
+ LINK = $(CXX)
+! ifeq (yes, $(STATIC_STDCPLUS))
+ #LIB += -static-libstdc++ -static-libgcc
+ LIB += -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
+! 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
+
+--- 941,975 ----
+
+ ifeq (yes, $(IME))
+ DEFINES += -DFEAT_MBYTE_IME
+! ifeq (yes, $(DYNAMIC_IME))
+ DEFINES += -DDYNAMIC_IME
+! else
+ LIB += -limm32
+! endif
+ endif
+
+ ifdef ICONV
+! ifneq (yes, $(ICONV))
+ LIB += -L$(ICONV)
+ CFLAGS += -I$(ICONV)
+! endif
+ DEFINES+=-DDYNAMIC_ICONV
+ endif
+
+ ifeq (yes, $(USE_STDCPLUS))
+ LINK = $(CXX)
+! ifeq (yes, $(STATIC_STDCPLUS))
+ #LIB += -static-libstdc++ -static-libgcc
+ LIB += -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
+! 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
+
+*** ../vim-8.1.1321/src/version.c 2019-05-11 21:14:02.336269566 +0200
+--- src/version.c 2019-05-11 21:21:43.865970597 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1322,
+ /**/
+
+--
+ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of Camelot.
+ King of all Britons, defeator of the Saxons, sovereign of all England!
+ [Pause]
+SOLDIER: Get 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.1323 b/data/vim/patches/8.1.1323
new file mode 100644
index 000000000..5708e848c
--- /dev/null
+++ b/data/vim/patches/8.1.1323
@@ -0,0 +1,82 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1323
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1323
+Problem: 'mouse' option is reset when using GPM mouse.
+Solution: Add flag for GPM mouse.
+Files: src/term.c
+
+
+*** ../vim-8.1.1322/src/term.c 2019-05-10 23:10:25.708517754 +0200
+--- src/term.c 2019-05-11 21:34:36.494112500 +0200
+***************
+*** 2108,2115 ****
+ # define HMT_JSBTERM 8
+ # define HMT_PTERM 16
+ # define HMT_URXVT 32
+! # define HMT_SGR 64
+! # define HMT_SGR_REL 128
+ static int has_mouse_termcode = 0;
+ # endif
+
+--- 2108,2116 ----
+ # define HMT_JSBTERM 8
+ # define HMT_PTERM 16
+ # define HMT_URXVT 32
+! # define HMT_GPM 64
+! # define HMT_SGR 128
+! # define HMT_SGR_REL 256
+ static int has_mouse_termcode = 0;
+ # endif
+
+***************
+*** 2150,2155 ****
+--- 2151,2161 ----
+ has_mouse_termcode |= HMT_URXVT;
+ else
+ # endif
++ # ifdef FEAT_MOUSE_GPM
++ if (n == KS_GPM_MOUSE)
++ has_mouse_termcode |= HMT_GPM;
++ else
++ # endif
+ if (n == KS_SGR_MOUSE)
+ has_mouse_termcode |= HMT_SGR;
+ else if (n == KS_SGR_MOUSE_RELEASE)
+***************
+*** 2197,2202 ****
+--- 2203,2213 ----
+ has_mouse_termcode &= ~HMT_URXVT;
+ else
+ # endif
++ # ifdef FEAT_MOUSE_GPM
++ if (n == KS_GPM_MOUSE)
++ has_mouse_termcode &= ~HMT_GPM;
++ else
++ # endif
+ if (n == KS_SGR_MOUSE)
+ has_mouse_termcode &= ~HMT_SGR;
+ else if (n == KS_SGR_MOUSE_RELEASE)
+*** ../vim-8.1.1322/src/version.c 2019-05-11 21:24:22.249180389 +0200
+--- src/version.c 2019-05-11 21:33:04.642571297 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1323,
+ /**/
+
+--
+Computers make very fast, very accurate, mistakes.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1324 b/data/vim/patches/8.1.1324
new file mode 100644
index 000000000..5d5233bca
--- /dev/null
+++ b/data/vim/patches/8.1.1324
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1324
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1324
+Problem: Stray comma in VMS makefile.
+Solution: Remove the comma. (Naruhiko Nishino, closes #4368)
+Files: src/Make_vms.mms
+
+
+*** ../vim-8.1.1323/src/Make_vms.mms 2019-05-11 17:03:55.170019762 +0200
+--- src/Make_vms.mms 2019-05-11 21:49:23.189681411 +0200
+***************
+*** 307,313 ****
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+! SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c change.c, charset.c \
+ crypt.c crypt_zip.c debugger.c dict.c diff.c digraph.c edit.c eval.c \
+ evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c \
+ if_cscope.c if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c \
+--- 307,313 ----
+ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
+
+! SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c change.c charset.c \
+ crypt.c crypt_zip.c debugger.c dict.c diff.c digraph.c edit.c eval.c \
+ evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c \
+ if_cscope.c if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c \
+*** ../vim-8.1.1323/src/version.c 2019-05-11 21:38:54.076825521 +0200
+--- src/version.c 2019-05-11 21:49:05.357770516 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1324,
+ /**/
+
+--
+SOLDIER: Where did you get the coconuts?
+ARTHUR: Through ... We found them.
+SOLDIER: Found them? In Mercea. The coconut's tropical!
+ "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.1325 b/data/vim/patches/8.1.1325
new file mode 100644
index 000000000..4e0b0cfd7
--- /dev/null
+++ b/data/vim/patches/8.1.1325
@@ -0,0 +1,140 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1325
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1325
+Problem: Cannot build with +eval but without +channel and +timers. (John
+ Marriott)
+Solution: Adjust #ifdef for get_callback().
+Files: src/evalfunc.c, src/testdir/test_autocmd.vim
+
+
+*** ../vim-8.1.1324/src/evalfunc.c 2019-05-11 21:14:02.336269566 +0200
+--- src/evalfunc.c 2019-05-12 12:55:16.923057519 +0200
+***************
+*** 14675,14681 ****
+ time_for_testing = (time_t)tv_get_number(&argvars[0]);
+ }
+
+- #if defined(FEAT_JOB_CHANNEL) || defined(FEAT_TIMERS) || defined(PROTO)
+ /*
+ * Get a callback from "arg". It can be a Funcref or a function name.
+ * When "arg" is zero return an empty string.
+--- 14675,14680 ----
+***************
+*** 14716,14722 ****
+ vim_free(callback);
+ }
+ }
+- #endif
+
+ #ifdef FEAT_TIMERS
+ /*
+--- 14715,14720 ----
+*** ../vim-8.1.1324/src/testdir/test_autocmd.vim 2019-05-09 21:38:39.775896532 +0200
+--- src/testdir/test_autocmd.vim 2019-05-12 13:01:53.936901390 +0200
+***************
+*** 18,23 ****
+--- 18,24 ----
+ endfunc
+
+ if has('timers')
++
+ func ExitInsertMode(id)
+ call feedkeys("\<Esc>")
+ endfunc
+***************
+*** 70,76 ****
+ au! CursorHoldI
+ set updatetime&
+ endfunc
+! endif
+
+ func Test_bufunload()
+ augroup test_bufunload_group
+--- 71,100 ----
+ au! CursorHoldI
+ set updatetime&
+ endfunc
+!
+! func Test_OptionSet_modeline()
+! call test_override('starting', 1)
+! au! OptionSet
+! augroup set_tabstop
+! au OptionSet tabstop call timer_start(1, {-> execute("echo 'Handler called'", "")})
+! augroup END
+! call writefile(['vim: set ts=7 sw=5 :', 'something'], 'XoptionsetModeline')
+! set modeline
+! let v:errmsg = ''
+! call assert_fails('split XoptionsetModeline', 'E12:')
+! call assert_equal(7, &ts)
+! call assert_equal('', v:errmsg)
+!
+! augroup set_tabstop
+! au!
+! augroup END
+! bwipe!
+! set ts&
+! call delete('XoptionsetModeline')
+! call test_override('starting', 0)
+! endfunc
+!
+! endif "has('timers')
+
+ func Test_bufunload()
+ augroup test_bufunload_group
+***************
+*** 673,700 ****
+ "delfunc! AutoCommandOptionSet
+ endfunc
+
+- func Test_OptionSet_modeline()
+- call test_override('starting', 1)
+- au! OptionSet
+- augroup set_tabstop
+- au OptionSet tabstop call timer_start(1, {-> execute("echo 'Handler called'", "")})
+- augroup END
+- call writefile(['vim: set ts=7 sw=5 :', 'something'], 'XoptionsetModeline')
+- set modeline
+- let v:errmsg = ''
+- call assert_fails('split XoptionsetModeline', 'E12:')
+- call assert_equal(7, &ts)
+- call assert_equal('', v:errmsg)
+-
+- augroup set_tabstop
+- au!
+- augroup END
+- bwipe!
+- set ts&
+- call delete('XoptionsetModeline')
+- call test_override('starting', 0)
+- endfunc
+-
+ " Test for Bufleave autocommand that deletes the buffer we are about to edit.
+ func Test_BufleaveWithDelete()
+ new | edit Xfile1
+--- 697,702 ----
+*** ../vim-8.1.1324/src/version.c 2019-05-11 21:50:03.945292930 +0200
+--- src/version.c 2019-05-12 12:56:10.478765509 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1325,
+ /**/
+
+--
+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.1326 b/data/vim/patches/8.1.1326
new file mode 100644
index 000000000..ffe8df099
--- /dev/null
+++ b/data/vim/patches/8.1.1326
@@ -0,0 +1,276 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1326
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1326
+Problem: No test for listener with partial.
+Solution: Add a test. Add example to help.
+Files: src/testdir/test_listener.vim, runtime/doc/eval.txt
+
+
+*** ../vim-8.1.1325/src/testdir/test_listener.vim 2019-05-11 21:14:02.332269584 +0200
+--- src/testdir/test_listener.vim 2019-05-12 13:43:04.834079948 +0200
+***************
+*** 1,77 ****
+ " tests for listener_add() and listener_remove()
+
+! func StoreList(l)
+! let g:list = a:l
+ endfunc
+
+! func AnotherStoreList(l)
+! let g:list2 = a:l
+ endfunc
+
+! func EvilStoreList(l)
+! let g:list3 = a:l
+ call assert_fails("call add(a:l, 'myitem')", "E742:")
+ endfunc
+
+ func Test_listening()
+ new
+ call setline(1, ['one', 'two'])
+! let id = listener_add({l -> StoreList(l)})
+ call setline(1, 'one one')
+ redraw
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], g:list)
+
+ " Two listeners, both get called.
+! let id2 = listener_add({l -> AnotherStoreList(l)})
+! let g:list = []
+! let g:list2 = []
+ exe "normal $asome\<Esc>"
+ redraw
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 8, 'added': 0}], g:list)
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 8, 'added': 0}], g:list2)
+
+ call listener_remove(id2)
+! let g:list = []
+! let g:list2 = []
+ call setline(3, 'three')
+ redraw
+! call assert_equal([{'lnum': 3, 'end': 3, 'col': 1, 'added': 1}], g:list)
+! call assert_equal([], g:list2)
+
+ " the "o" command first adds an empty line and then changes it
+! let g:list = []
+ exe "normal Gofour\<Esc>"
+ redraw
+ call assert_equal([{'lnum': 4, 'end': 4, 'col': 1, 'added': 1},
+! \ {'lnum': 4, 'end': 5, 'col': 1, 'added': 0}], g:list)
+
+! let g:list = []
+ call listener_remove(id)
+ call setline(1, 'asdfasdf')
+ redraw
+! call assert_equal([], g:list)
+
+ " Trying to change the list fails
+! let id = listener_add({l -> EvilStoreList(l)})
+! let g:list3 = []
+ call setline(1, 'asdfasdf')
+ redraw
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], g:list3)
+
+ bwipe!
+ endfunc
+
+ func Test_listening_other_buf()
+ new
+ call setline(1, ['one', 'two'])
+ let bufnr = bufnr('')
+ normal ww
+! let id = listener_add({l -> StoreList(l)}, bufnr)
+! let g:list = []
+ call setbufline(bufnr, 1, 'hello')
+ redraw
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], g:list)
+
+ exe "buf " .. bufnr
+ bwipe!
+ endfunc
+--- 1,86 ----
+ " tests for listener_add() and listener_remove()
+
+! func s:StoreList(l)
+! let s:list = a:l
+ endfunc
+
+! func s:AnotherStoreList(l)
+! let s:list2 = a:l
+ endfunc
+
+! func s:EvilStoreList(l)
+! let s:list3 = a:l
+ call assert_fails("call add(a:l, 'myitem')", "E742:")
+ endfunc
+
+ func Test_listening()
+ new
+ call setline(1, ['one', 'two'])
+! let id = listener_add({l -> s:StoreList(l)})
+ call setline(1, 'one one')
+ redraw
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], s:list)
+
+ " Two listeners, both get called.
+! let id2 = listener_add({l -> s:AnotherStoreList(l)})
+! let s:list = []
+! let s:list2 = []
+ exe "normal $asome\<Esc>"
+ redraw
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 8, 'added': 0}], s:list)
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 8, 'added': 0}], s:list2)
+
+ call listener_remove(id2)
+! let s:list = []
+! let s:list2 = []
+ call setline(3, 'three')
+ redraw
+! call assert_equal([{'lnum': 3, 'end': 3, 'col': 1, 'added': 1}], s:list)
+! call assert_equal([], s:list2)
+
+ " the "o" command first adds an empty line and then changes it
+! let s:list = []
+ exe "normal Gofour\<Esc>"
+ redraw
+ call assert_equal([{'lnum': 4, 'end': 4, 'col': 1, 'added': 1},
+! \ {'lnum': 4, 'end': 5, 'col': 1, 'added': 0}], s:list)
+
+! " Remove last listener
+! let s:list = []
+ call listener_remove(id)
+ call setline(1, 'asdfasdf')
+ redraw
+! call assert_equal([], s:list)
+
+ " Trying to change the list fails
+! let id = listener_add({l -> s:EvilStoreList(l)})
+! let s:list3 = []
+ call setline(1, 'asdfasdf')
+ redraw
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], s:list3)
+
++ call listener_remove(id)
+ bwipe!
+ endfunc
+
++ func s:StoreBufList(buf, l)
++ let s:bufnr = a:buf
++ let s:list = a:l
++ endfunc
++
+ func Test_listening_other_buf()
+ new
+ call setline(1, ['one', 'two'])
+ let bufnr = bufnr('')
+ normal ww
+! let id = listener_add(function('s:StoreBufList', [bufnr]), bufnr)
+! let s:list = []
+ call setbufline(bufnr, 1, 'hello')
+ redraw
+! call assert_equal(bufnr, s:bufnr)
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], s:list)
+
++ call listener_remove(id)
+ exe "buf " .. bufnr
+ bwipe!
+ endfunc
+*** ../vim-8.1.1325/runtime/doc/eval.txt 2019-05-11 21:14:02.332269584 +0200
+--- runtime/doc/eval.txt 2019-05-12 13:48:56.268207900 +0200
+***************
+*** 6323,6329 ****
+ Returns a unique ID that can be passed to |listener_remove()|.
+
+ The {callback} is invoked with a list of items that indicate a
+! change. Each list item is a dictionary with these entries:
+ lnum the first line number of the change
+ end the first line below the change
+ added number of lines added; negative if lines were
+--- 6323,6330 ----
+ Returns a unique ID that can be passed to |listener_remove()|.
+
+ The {callback} is invoked with a list of items that indicate a
+! change. The list cannot be changed. Each list item is a
+! dictionary with these entries:
+ lnum the first line number of the change
+ end the first line below the change
+ added number of lines added; negative if lines were
+***************
+*** 6349,6355 ****
+ added zero
+ col first column with a change or one
+
+! The {callback} is invoked just before the screen is updated.
+ To trigger this in a script use the `:redraw` command.
+
+ The {callback} is not invoked when the buffer is first loaded.
+--- 6350,6370 ----
+ added zero
+ col first column with a change or one
+
+! The entries are in the order the changes was made, thus the
+! most recent change is at the end. One has to go through the
+! list from end to start to compute the line numbers in the
+! current state of the text.
+!
+! When using the same function for multiple buffers, you can
+! pass the buffer to that function using a |Partial|.
+! Example: >
+! func Listener(bufnr, changes)
+! " ...
+! endfunc
+! let bufnr = ...
+! call listener_add(function('Listener', [bufnr]), bufnr)
+!
+! < The {callback} is invoked just before the screen is updated.
+ To trigger this in a script use the `:redraw` command.
+
+ The {callback} is not invoked when the buffer is first loaded.
+***************
+*** 10984,10993 ****
+
+ Example: >
+ function Something(key, value = 10)
+! echo a:key .. ": " .. value
+ endfunction
+ call Something('empty') "empty: 10"
+! call Something('key, 20) "key: 20"
+
+ The argument default expressions are evaluated at the time of the function
+ call, not definition. Thus it is possible to use an expression which is
+--- 10999,11008 ----
+
+ Example: >
+ function Something(key, value = 10)
+! echo a:key .. ": " .. a:value
+ endfunction
+ call Something('empty') "empty: 10"
+! call Something('key', 20) "key: 20"
+
+ The argument default expressions are evaluated at the time of the function
+ call, not definition. Thus it is possible to use an expression which is
+*** ../vim-8.1.1325/src/version.c 2019-05-12 13:07:10.563191431 +0200
+--- src/version.c 2019-05-12 13:37:42.943944496 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1326,
+ /**/
+
+--
+"I've been teaching myself to play the piano for about 5 years and now write
+most of my songs on it, mainly because I can never find any paper."
+ Jeff Lynne, ELO's greatest hits
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1327 b/data/vim/patches/8.1.1327
new file mode 100644
index 000000000..2e8597f3f
--- /dev/null
+++ b/data/vim/patches/8.1.1327
@@ -0,0 +1,111 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1327
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1327
+Problem: Unnecessary scroll after horizontal split.
+Solution: Don't adjust to fraction if all the text fits in the window.
+ (Martin Kunev, closes #4367)
+Files: src/testdir/test_window_cmd.vim, src/window.c
+
+
+*** ../vim-8.1.1326/src/testdir/test_window_cmd.vim 2019-04-08 20:01:42.877179442 +0200
+--- src/testdir/test_window_cmd.vim 2019-05-12 14:19:25.610639150 +0200
+***************
+*** 743,748 ****
+--- 743,784 ----
+ let &so = so_save
+ endfunc
+
++ func Test_split_noscroll()
++ let so_save = &so
++ new
++ only
++
++ " Make sure windows can hold all content after split.
++ for i in range(1, 20)
++ wincmd +
++ redraw!
++ endfor
++
++ call setline (1, range(1, 8))
++ normal 100%
++ split
++
++ 1wincmd w
++ let winid1 = win_getid()
++ let info1 = getwininfo(winid1)[0]
++
++ 2wincmd w
++ let winid2 = win_getid()
++ let info2 = getwininfo(winid2)[0]
++
++ call assert_equal(1, info1.topline)
++ call assert_equal(1, info2.topline)
++
++ " Restore original state.
++ for i in range(1, 20)
++ wincmd -
++ redraw!
++ endfor
++ only!
++ bwipe!
++ let &so = so_save
++ endfunc
++
+ " Tests for the winnr() function
+ func Test_winnr()
+ only | tabonly
+*** ../vim-8.1.1326/src/window.c 2019-05-01 20:30:19.598426336 +0200
+--- src/window.c 2019-05-12 14:19:25.610639150 +0200
+***************
+*** 5827,5835 ****
+ int sline, line_size;
+ int height = wp->w_height;
+
+! // Don't change w_topline when height is zero. Don't set w_topline when
+! // 'scrollbind' is set and this isn't the current window.
+! if (height > 0 && (!wp->w_p_scb || wp == curwin))
+ {
+ /*
+ * Find a value for w_topline that shows the cursor at the same
+--- 5827,5839 ----
+ int sline, line_size;
+ int height = wp->w_height;
+
+! // Don't change w_topline in any of these cases:
+! // - window height is 0
+! // - 'scrollbind' is set and this isn't the current window
+! // - window height is sufficient to display the whole buffer
+! if (height > 0
+! && (!wp->w_p_scb || wp == curwin)
+! && (height < wp->w_buffer->b_ml.ml_line_count))
+ {
+ /*
+ * Find a value for w_topline that shows the cursor at the same
+*** ../vim-8.1.1326/src/version.c 2019-05-12 13:53:46.906851000 +0200
+--- src/version.c 2019-05-12 14:20:56.698137045 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1327,
+ /**/
+
+--
+THEOREM: VI is perfect.
+PROOF: VI in roman numerals is 6. The natural numbers < 6 which divide 6 are
+1, 2, and 3. 1+2+3 = 6. So 6 is a perfect number. Therefore, VI is perfect.
+QED
+ -- Arthur Tateishi
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1328 b/data/vim/patches/8.1.1328
new file mode 100644
index 000000000..5b19af99d
--- /dev/null
+++ b/data/vim/patches/8.1.1328
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1328
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1328
+Problem: No test for listener with undo operation.
+Solution: Add a test.
+Files: src/testdir/test_listener.vim
+
+
+*** ../vim-8.1.1327/src/testdir/test_listener.vim 2019-05-12 13:53:46.906851000 +0200
+--- src/testdir/test_listener.vim 2019-05-12 14:33:45.063175084 +0200
+***************
+*** 21,26 ****
+--- 21,35 ----
+ redraw
+ call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], s:list)
+
++ " Undo is also a change
++ set undolevels& " start new undo block
++ call append(2, 'two two')
++ undo
++ redraw
++ call assert_equal([{'lnum': 3, 'end': 3, 'col': 1, 'added': 1},
++ \ {'lnum': 3, 'end': 4, 'col': 1, 'added': -1}, ], s:list)
++ 1
++
+ " Two listeners, both get called.
+ let id2 = listener_add({l -> s:AnotherStoreList(l)})
+ let s:list = []
+*** ../vim-8.1.1327/src/version.c 2019-05-12 14:25:26.321244305 +0200
+--- src/version.c 2019-05-12 14:34:32.734955276 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1328,
+ /**/
+
+--
+Kiss me twice. I'm schizophrenic.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1329 b/data/vim/patches/8.1.1329
new file mode 100644
index 000000000..0777fa711
--- /dev/null
+++ b/data/vim/patches/8.1.1329
@@ -0,0 +1,346 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1329
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1329
+Problem: Plans for popup window support are spread out.
+Solution: Add a first version of the popup window help.
+Files: runtime/doc/popup.txt, runtime/doc/Makefile, runtime/doc/help.txt
+
+
+*** ../vim-8.1.1328/runtime/doc/popup.txt 2019-05-12 21:43:02.490679879 +0200
+--- runtime/doc/popup.txt 2019-05-12 21:36:26.116844754 +0200
+***************
+*** 0 ****
+--- 1,274 ----
++ *popup.txt* For Vim version 8.1. Last change: 2019 May 12
++
++
++ VIM REFERENCE MANUAL by Bram Moolenaar
++
++
++ Displaying text with properties attached. *popup* *popup-window*
++
++ THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
++
++ 1. Introduction |popup-intro|
++ 2. Functions |popup-functions|
++ 3. Examples |popup-examples|
++
++
++ {not able to use text properties when the |+textprop| feature was
++ disabled at compile time}
++
++ ==============================================================================
++ 1. Introduction *popup-intro*
++
++ We are talking about popup windows here, text that goes on top of the buffer
++ text and is under control of a plugin. Other popup functionality:
++ - popup menu, see |popup-menu|
++ - balloon, see |balloon-eval|
++
++ TODO
++
++ ==============================================================================
++ 2. Functions *popup-functions*
++
++ THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
++
++ Proposal and discussion on issue #4063: https://github.com/vim/vim/issues/4063
++
++ [to be moved to eval.txt later]
++
++ popup_show({lines}, {options}) *popup_show()*
++ Open a popup window showing {lines}, which is a list of lines,
++ where each line has text and text properties.
++
++ {options} is a dictionary with many possible entries.
++
++ Returns a unique ID to be used with |popup_close()|.
++
++ See |popup_show-usage| for details.
++
++
++ popup_dialog({lines}, {options}) *popup_dialog()*
++ Just like |popup_show()| but with different default options:
++ pos "center"
++ zindex 200
++ border []
++
++
++ popup_notification({text}, {options}) *popup_notification()*
++ Show the string {text} for 3 seconds at the top of the Vim
++ window. This works like: >
++ call popup_show([{'text': {text}}], {
++ \ 'line': 1,
++ \ 'col': 10,
++ \ 'time': 3000,
++ \ 'zindex': 200,
++ \ 'highlight': 'WarningMsg',
++ \ 'border: [],
++ \ })
++ < Use {options} to change the properties.
++
++ popup_atcursor({text}, {options}) *popup_atcursor()*
++ Show the string {text} above the cursor, and close it when the
++ cursor moves. This works like: >
++ call popup_show([{'text': {text}}], {
++ \ 'line': 'cursor-1',
++ \ 'col': 'cursor',
++ \ 'zindex': 50,
++ \ 'moved': 'WORD',
++ \ })
++ < Use {options} to change the properties.
++
++
++ popup_menu({lines}, {options}) *popup_atcursor()*
++ Show the {lines} near the cursor, handle selecting one of the
++ items with cursorkeys, and close it an item is selected with
++ Space or Enter. This works like: >
++ call popup_show({lines}, {
++ \ 'pos': 'center',
++ \ 'zindex': 200,
++ \ 'wrap': 0,
++ \ 'border': [],
++ \ 'filter': 'popup_filter_menu',
++ \ })
++ < Use {options} to change the properties. Should at least set
++ "callback" to a function that handles the selected item.
++
++
++ popup_move({id}, {options}) *popup_move()*
++ Move popup {id} to the position speficied with {options}.
++ {options} may contain the items from |popup_show()| that
++ specify the popup position: "line", "col", "pos", "maxheight",
++ "minheight", "maxwidth" and "minwidth".
++
++
++ popup_filter_menu({id}, {key}) *popup_filter_menu()*
++ Filter that can be used for a popup. It handles the cursor
++ keys to move the selected index in the popup. Space and Enter
++ can be used to select an item. Invokes the "callback" of the
++ popup menu with the index of the selected line as the second
++ argument.
++
++
++ popup_filter_yesno({id}, {key}) *popup_filter_yesno()*
++ Filter that can be used for a popup. It handles only the keys
++ 'y', 'Y' and 'n' or 'N'. Invokes the "callback" of the
++ popup menu with the 1 for 'y' or 'Y' and zero for 'n' or 'N'
++ as the second argument. Pressing Esc and CTRL-C works like
++ pressing 'n'.
++
++
++ popup_setlines({id}, {lnum}, {lines}) *popup_setlines()*
++ In popup {id} set line {lnum} and following to {lines}.
++
++ {lnum} is one-based and must be either an existing line or
++ just one below the last line, in which case the line gets
++ appended.
++
++ {lines} has the same format as one item in {lines} of
++ |popup_show()|. Existing lines are replaced. When {lines}
++ extends below the last line of the popup lines are appended.
++
++ popup_getlines({id}) *popup_getlines()*
++ Return the {lines} for popup {id}.
++
++
++ popup_setoptions({id}, {options}) *popup_setoptions()*
++ Override options in popup {id} with entries in {options}.
++
++
++ popup_getoptions({id}) *popup_getoptions()*
++ Return the {options} for popup {id}.
++
++
++ popup_close({id}) *popup_close()*
++ Close popup {id}.
++
++
++ POPUP_SHOW() ARGUMENTS *popup_show-usage*
++
++ The first argument of |popup_show()| is a list of text lines. Each item in
++ the list is a dictionary with these entries:
++ text The text to display.
++ props A list of text properties. Optional.
++ Each entry is a dictionary, like the third argument of
++ |prop_add()|, but specifying the column in the
++ dictionary with a "col" entry, see below:
++ |popup-props|.
++
++ The second argument of |popup_show()| is a dictionary with options:
++ line screen line where to position the popup; can use
++ "cursor", "cursor+1" or "cursor-1" to use the line of
++ the cursor and add or subtract a number of lines;
++ default is "cursor-1".
++ col screen column where to position the popup; can use
++ "cursor" to use the column of the cursor, "cursor+99"
++ and "cursor-99" to add or subtract a number of
++ columns; default is "cursor"
++ pos "topleft", "topright", "botleft" or "botright":
++ defines what corner of the popup "line" and "col" are
++ used for. Default is "botleft". Alternatively
++ "center" can be used to position the popup somewhere
++ near the cursor.
++ maxheight maximum height
++ minheight minimum height
++ maxwidth maximum width
++ minwidth minimum width
++ title text to be displayed above the first item in the
++ popup, on top of any border
++ wrap TRUE to make the lines wrap (default TRUE)
++ highlight highlight group name to use for the text, defines the
++ background and foreground color
++ border list with numbers, defining the border thickness
++ above/right/below/left of the popup; an empty list
++ uses a border of 1 all around
++ borderhighlight highlight group name to use for the border
++ borderchars list with characters, defining the character to use
++ for the top/right/bottom/left border; optionally
++ followed by the character to use for the
++ topright/botright/botleft/topleft corner; an empty
++ list can be used to show a double line all around
++ zindex priority for the popup, default 50
++ time time in milliseconds after which the popup will close;
++ when omitted |popup_close()| must be used.
++ moved "cell": close the popup if the cursor moved at least
++ one screen cell; "word" allows for moving within
++ |<cword>|, "WORD" allows for moving within |<cWORD>|,
++ a list with two numbers specifies the start and end
++ column
++ filter a callback that can filter typed characters, see
++ |popup-filter|
++ callback a callback to be used when the popup closes, e.g. when
++ using |popup_filter_menu()|, see |popup-callback|.
++
++ Depending on the "zindex" the popup goes under or above other popups. The
++ completion menu (|popup-menu|) has zindex 100. For messages that occur for a
++ short time the suggestion is to use zindex 1000.
++
++ By default text wraps, which causes a line in {lines} to occupy more than one
++ screen line. When "wrap" is FALSE then the text outside of the popup or
++ outside of the Vim window will not be displayed, thus truncated.
++
++
++ POPUP TEXT PROPERTIES *popup-props*
++
++ These are similar to the third argument of |prop_add()|, but not exactly the
++ same, since they only apply to one line.
++ col starting column, counted in bytes, use one for the
++ first column.
++ length length of text in bytes; can be zero
++ end_col column just after the text; not used when "length" is
++ present; when {col} and "end_col" are equal, this is a
++ zero-width text property
++ id user defined ID for the property; when omitted zero is
++ used
++ type name of the text property type, as added with
++ |prop_type_add()|
++ transparent do not show these characters, show the text under it;
++ if there is an border character to the right or below
++ it will be made transparent as well
++
++
++ POPUP FILTER *popup-filter*
++
++ A callback that gets any typed keys while a popup is displayed. It can return
++ TRUE to indicate the key has been handled and is to be discarded, or FALSE to
++ let Vim handle the key as usual in the current state.
++
++ The filter function is called with two arguments: the ID of the popup and the
++ key.
++
++ Some common key actions:
++ Esc close the popup
++ cursor keys select another entry
++ Tab accept current suggestion
++
++ Vim provides standard filters |popup_filter_menu()| and
++ |popup_filter_yesno()|.
++
++
++ POPUP CALLBACK *popup-callback*
++
++ A callback that is invoked when the popup closes. Used by
++ |popup_filter_menu()|. Invoked with two arguments: the ID of the popup and
++ the result, which would usually be an index in the popup lines, or whatever
++ the filter wants to pass.
++
++ ==============================================================================
++ 3. Examples *popup-examples*
++
++ TODO
++
++ Prompt the user to press y/Y or n/N: >
++
++ func MyDialogHandler(id, result)
++ if a:result
++ " ... 'y' or 'Y' was pressed
++ endif
++ endfunc
++
++ call popup_show([{'text': 'Continue? y/n'}], {
++ \ 'filter': 'popup_filter_yesno',
++ \ 'callback': 'MyDialogHandler',
++ \ })
++ <
++
++ vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.1328/runtime/doc/Makefile 2018-12-13 22:17:52.865941558 +0100
+--- runtime/doc/Makefile 2019-05-12 17:14:48.011704406 +0200
+***************
+*** 83,88 ****
+--- 83,89 ----
+ pi_tar.txt \
+ pi_vimball.txt \
+ pi_zip.txt \
++ popup.txt \
+ print.txt \
+ quickfix.txt \
+ quickref.txt \
+***************
+*** 220,225 ****
+--- 221,227 ----
+ pi_tar.html \
+ pi_vimball.html \
+ pi_zip.html \
++ popup.html \
+ print.html \
+ quickfix.html \
+ quickref.html \
+*** ../vim-8.1.1328/runtime/doc/help.txt 2019-05-05 18:11:46.312590682 +0200
+--- runtime/doc/help.txt 2019-05-12 16:52:31.295380271 +0200
+***************
+*** 143,148 ****
+--- 143,149 ----
+ |remote.txt| using Vim as a server or client
+ |term.txt| using different terminals and mice
+ |terminal.txt| Terminal window support
++ |popup.txt| popop window support
+
+ Programming language support ~
+ |indent.txt| automatic indenting for C and other languages
+*** ../vim-8.1.1328/src/version.c 2019-05-12 14:36:22.938437845 +0200
+--- src/version.c 2019-05-12 21:42:27.510870927 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1329,
+ /**/
+
+--
+If you don't get everything you want, think of
+everything you didn't get and don't want.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1330 b/data/vim/patches/8.1.1330
new file mode 100644
index 000000000..5afde63cc
--- /dev/null
+++ b/data/vim/patches/8.1.1330
@@ -0,0 +1,113 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1330
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1330
+Problem: Using bold attribute in terminal changes the color. (Jason
+ Franklin)
+Solution: Don't set the "bold-highbright" flag in vterm unless the terminal
+ supports less than 16 colors.
+Files: src/terminal.c, src/testdir/test_terminal.vim,
+ src/testdir/dumps/Test_terminal_all_ansi_colors.dump
+
+
+*** ../vim-8.1.1329/src/terminal.c 2019-05-11 18:28:41.351611622 +0200
+--- src/terminal.c 2019-05-13 20:24:37.697271834 +0200
+***************
+*** 3976,3982 ****
+ &term->tl_default_color.fg,
+ &term->tl_default_color.bg);
+
+! if (t_colors >= 16)
+ vterm_state_set_bold_highbright(vterm_obtain_state(vterm), 1);
+
+ /* Required to initialize most things. */
+--- 3976,3984 ----
+ &term->tl_default_color.fg,
+ &term->tl_default_color.bg);
+
+! if (t_colors < 16)
+! // Less than 16 colors: assume that bold means using a bright color for
+! // the foreground color.
+ vterm_state_set_bold_highbright(vterm_obtain_state(vterm), 1);
+
+ /* Required to initialize most things. */
+*** ../vim-8.1.1329/src/testdir/test_terminal.vim 2019-04-14 14:16:43.253228943 +0200
+--- src/testdir/test_terminal.vim 2019-05-13 20:22:10.322144770 +0200
+***************
+*** 1491,1497 ****
+
+ " Use all the ANSI colors.
+ call writefile([
+! \ 'call setline(1, "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPP")',
+ \ 'hi Tblack ctermfg=0 ctermbg=8',
+ \ 'hi Tdarkred ctermfg=1 ctermbg=9',
+ \ 'hi Tdarkgreen ctermfg=2 ctermbg=10',
+--- 1491,1497 ----
+
+ " Use all the ANSI colors.
+ call writefile([
+! \ 'call setline(1, "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPP XXYYZZ")',
+ \ 'hi Tblack ctermfg=0 ctermbg=8',
+ \ 'hi Tdarkred ctermfg=1 ctermbg=9',
+ \ 'hi Tdarkgreen ctermfg=2 ctermbg=10',
+***************
+*** 1508,1513 ****
+--- 1508,1516 ----
+ \ 'hi Tmagenta ctermfg=13 ctermbg=5',
+ \ 'hi Tcyan ctermfg=14 ctermbg=6',
+ \ 'hi Twhite ctermfg=15 ctermbg=7',
++ \ 'hi TdarkredBold ctermfg=1 cterm=bold',
++ \ 'hi TgreenBold ctermfg=10 cterm=bold',
++ \ 'hi TmagentaBold ctermfg=13 cterm=bold ctermbg=5',
+ \ '',
+ \ 'call matchadd("Tblack", "A")',
+ \ 'call matchadd("Tdarkred", "B")',
+***************
+*** 1525,1530 ****
+--- 1528,1536 ----
+ \ 'call matchadd("Tmagenta", "N")',
+ \ 'call matchadd("Tcyan", "O")',
+ \ 'call matchadd("Twhite", "P")',
++ \ 'call matchadd("TdarkredBold", "X")',
++ \ 'call matchadd("TgreenBold", "Y")',
++ \ 'call matchadd("TmagentaBold", "Z")',
+ \ 'redraw',
+ \ ], 'Xcolorscript')
+ let buf = RunVimInTerminal('-S Xcolorscript', {'rows': 10})
+*** ../vim-8.1.1329/src/testdir/dumps/Test_terminal_all_ansi_colors.dump 2019-04-13 23:18:18.204706885 +0200
+--- src/testdir/dumps/Test_terminal_all_ansi_colors.dump 2019-05-13 20:22:27.098045613 +0200
+***************
+*** 1,4 ****
+! >A+0#0000001#8080809@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#e0e0004#ffff4012@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#ffffff16@1|I+0#8080809#0000001@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#e0e0004@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#e0e0e08@1| +0#0000000#ffffff0@42
+ @2| +0#4040ff13&@72
+ |~| @73
+ |~| @73
+--- 1,4 ----
+! >A+0#0000001#8080809@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#e0e0004#ffff4012@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#ffffff16@1|I+0#8080809#0000001@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#e0e0004@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#e0e0e08@1| +0#0000000#ffffff0|X+2#e000002&@1|Y+2#40ff4011&@1|Z+2#ff40ff14#e000e06@1| +0#0000000#ffffff0@35
+ @2| +0#4040ff13&@72
+ |~| @73
+ |~| @73
+*** ../vim-8.1.1329/src/version.c 2019-05-12 21:43:24.626559005 +0200
+--- src/version.c 2019-05-13 20:26:29.836605244 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1330,
+ /**/
+
+--
+"Lisp has all the visual appeal of oatmeal with nail clippings thrown in."
+ -- Larry Wall
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1331 b/data/vim/patches/8.1.1331
new file mode 100644
index 000000000..d3a7006cd
--- /dev/null
+++ b/data/vim/patches/8.1.1331
@@ -0,0 +1,875 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1331
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1331
+Problem: Test 29 is old style.
+Solution: Turn it into a new style test. (Yegappan Lakshmanan, closes #4370)
+Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
+ src/testdir/test29.in, src/testdir/test29.ok,
+ src/testdir/test_backspace_opt.vim, src/testdir/test_join.vim
+
+
+*** ../vim-8.1.1330/src/Makefile 2019-05-11 17:03:55.170019762 +0200
+--- src/Makefile 2019-05-14 17:34:49.744798083 +0200
+***************
+*** 2179,2185 ****
+ test1 \
+ test_eval \
+ test3 \
+! test29 test30 test37 test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+ test64 test69 \
+--- 2180,2186 ----
+ test1 \
+ test_eval \
+ test3 \
+! test30 test37 test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+ test64 test69 \
+*** ../vim-8.1.1330/src/testdir/Make_all.mak 2019-05-11 21:14:02.332269584 +0200
+--- src/testdir/Make_all.mak 2019-05-14 17:34:49.744798083 +0200
+***************
+*** 14,20 ****
+ # Tests that run on all systems.
+ SCRIPTS_ALL = \
+ test3.out \
+- test29.out \
+ test37.out \
+ test39.out \
+ test42.out \
+--- 14,19 ----
+*** ../vim-8.1.1330/src/testdir/Make_vms.mms 2019-05-06 21:59:42.194211119 +0200
+--- src/testdir/Make_vms.mms 2019-05-14 17:34:49.744798083 +0200
+***************
+*** 74,80 ****
+ .SUFFIXES : .out .in
+
+ SCRIPT = test1.out test3.out \
+- test29.out \
+ test30.out test37.out test39.out \
+ test42.out test44.out test48.out test49.out \
+ test64.out test69.out \
+--- 74,79 ----
+*** ../vim-8.1.1330/src/testdir/test29.in 2017-03-08 22:48:59.000000000 +0100
+--- src/testdir/test29.in 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,231 ****
+- Test for joining lines and marks in them
+- in compatible and nocompatible modes
+- and with 'joinspaces' set or not
+- and with 'cpoptions' flag 'j' set or not
+-
+- STARTTEST
+- :so small.vim
+- :set nocompatible viminfo+=nviminfo
+- :set nojoinspaces
+- :set cpoptions-=j
+- /firstline/
+- j"td/^STARTTEST/-1
+- PJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j
+- j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j joinspaces
+- j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j
+- j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j nojoinspaces compatible
+- j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj4Jy3l$pjd/STARTTEST/-2
+- ENDTEST
+-
+- firstline
+- asdfasdf.
+- asdf
+- asdfasdf.
+- asdf
+- asdfasdf.
+- asdf
+- asdfasdf.
+- asdf
+- asdfasdf.
+- asdf
+- asdfasdf.
+- asdf
+- asdfasdf.
+- asdf
+- asdfasdf
+- asdf
+- asdfasdf
+- asdf
+- asdfasdf
+- asdf
+- asdfasdf
+- asdf
+- asdfasdf
+- asdf
+- asdfasdf
+- asdf
+- asdfasdf
+- asdf
+- zx cvn.
+- as dfg?
+- hjkl iop!
+- ert
+- zx cvn.
+- as dfg?
+- hjkl iop!
+- ert
+-
+- STARTTEST
+- /^{/+1
+- :set comments=s1:/*,mb:*,ex:*/,://
+- :set nojoinspaces fo=j
+- :set backspace=eol,start
+- :.,+3join
+- j4J
+- :.,+2join
+- j3J
+- :.,+2join
+- j3J
+- :.,+2join
+- jj3J
+- ENDTEST
+-
+- {
+-
+- /*
+- * Make sure the previous comment leader is not removed.
+- */
+-
+- /*
+- * Make sure the previous comment leader is not removed.
+- */
+-
+- // Should the next comment leader be left alone?
+- // Yes.
+-
+- // Should the next comment leader be left alone?
+- // Yes.
+-
+- /* Here the comment leader should be left intact. */
+- // And so should this one.
+-
+- /* Here the comment leader should be left intact. */
+- // And so should this one.
+-
+- if (condition) // Remove the next comment leader!
+- // OK, I will.
+- action();
+-
+- if (condition) // Remove the next comment leader!
+- // OK, I will.
+- action();
+- }
+-
+- STARTTEST
+- :" Test with backspace set to the non-compatible setting
+- :set belloff=all
+- /^\d\+ this
+- :set cp bs=2
+- Avim1
+- Avim2u
+- :set cpo-=<
+- :inoremap <c-u> <left><c-u>
+- Avim3
+- :iunmap <c-u>
+- Avim4
+- :" Test with backspace set to the compatible setting
+- :set backspace= visualbell
+- A vim5A
+- A vim6Azweiu
+- :inoremap <c-u> <left><c-u>
+- A vim7
+- :set compatible novisualbell
+- ENDTEST
+- 1 this shouldn't be deleted
+- 2 this shouldn't be deleted
+- 3 this shouldn't be deleted
+- 4 this should be deleted
+- 5 this shouldn't be deleted
+- 6 this shouldn't be deleted
+- 7 this shouldn't be deleted
+- 8 this shouldn't be deleted (not touched yet)
+-
+- STARTTEST
+- /^{/+1
+- :set comments=sO:*\ -,mO:*\ \ ,exO:*/
+- :set comments+=s1:/*,mb:*,ex:*/,://
+- :set comments+=s1:>#,mb:#,ex:#<,:<
+- :set cpoptions-=j joinspaces fo=j
+- :set backspace=eol,start
+- :.,+3join
+- j4J
+- :.,+8join
+- j9J
+- :.,+2join
+- j3J
+- :.,+2join
+- j3J
+- :.,+2join
+- jj3J
+- j:.,+2join
+- jj3J
+- j:.,+5join
+- j6J
+- oSome code! // Make sure backspacing does not remove this comment leader.0i
+- ENDTEST
+-
+- {
+-
+- /*
+- * Make sure the previous comment leader is not removed.
+- */
+-
+- /*
+- * Make sure the previous comment leader is not removed.
+- */
+-
+- /* List:
+- * - item1
+- * foo bar baz
+- * foo bar baz
+- * - item2
+- * foo bar baz
+- * foo bar baz
+- */
+-
+- /* List:
+- * - item1
+- * foo bar baz
+- * foo bar baz
+- * - item2
+- * foo bar baz
+- * foo bar baz
+- */
+-
+- // Should the next comment leader be left alone?
+- // Yes.
+-
+- // Should the next comment leader be left alone?
+- // Yes.
+-
+- /* Here the comment leader should be left intact. */
+- // And so should this one.
+-
+- /* Here the comment leader should be left intact. */
+- // And so should this one.
+-
+- if (condition) // Remove the next comment leader!
+- // OK, I will.
+- action();
+-
+- if (condition) // Remove the next comment leader!
+- // OK, I will.
+- action();
+-
+- int i = 7 /* foo *// 3
+- // comment
+- ;
+-
+- int i = 7 /* foo *// 3
+- // comment
+- ;
+-
+- ># Note that the last character of the ending comment leader (left angle
+- # bracket) is a comment leader itself. Make sure that this comment leader is
+- # not removed from the next line #<
+- < On this line a new comment is opened which spans 2 lines. This comment should
+- < retain its comment leader.
+-
+- ># Note that the last character of the ending comment leader (left angle
+- # bracket) is a comment leader itself. Make sure that this comment leader is
+- # not removed from the next line #<
+- < On this line a new comment is opened which spans 2 lines. This comment should
+- < retain its comment leader.
+-
+- }
+-
+- STARTTEST
+- :g/^STARTTEST/.,/^ENDTEST/d
+- :?firstline?+1,$w! test.out
+- :qa!
+- ENDTEST
+--- 0 ----
+*** ../vim-8.1.1330/src/testdir/test29.ok 2014-04-29 14:31:23.000000000 +0200
+--- src/testdir/test29.ok 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,97 ****
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- zx cvn. as dfg? hjkl iop! ert ernop
+- zx cvn. as dfg? hjkl iop! ert ernop
+-
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- zx cvn. as dfg? hjkl iop! ert enop
+- zx cvn. as dfg? hjkl iop! ert ernop
+-
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf. asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- asdfasdf asdf
+- zx cvn. as dfg? hjkl iop! ert a
+-
+-
+- {
+- /* Make sure the previous comment leader is not removed. */
+- /* Make sure the previous comment leader is not removed. */
+- // Should the next comment leader be left alone? Yes.
+- // Should the next comment leader be left alone? Yes.
+- /* Here the comment leader should be left intact. */ // And so should this one.
+- /* Here the comment leader should be left intact. */ // And so should this one.
+- if (condition) // Remove the next comment leader! OK, I will.
+- action();
+- if (condition) // Remove the next comment leader! OK, I will.
+- action();
+- }
+-
+- 1 this shouldn't be deleted
+- 2 this shouldn't be deleted
+- 3 this shouldn't be deleted
+- 4 this should be deleted3
+-
+- 6 this shouldn't be deleted vim5
+- 7 this shouldn't be deleted vim6
+- 8 this shouldn't be deleted (not touched yet) vim7
+-
+-
+- {
+- /* Make sure the previous comment leader is not removed. */
+- /* Make sure the previous comment leader is not removed. */
+- /* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */
+- /* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */
+- // Should the next comment leader be left alone? Yes.
+- // Should the next comment leader be left alone? Yes.
+- /* Here the comment leader should be left intact. */ // And so should this one.
+- /* Here the comment leader should be left intact. */ // And so should this one.
+- if (condition) // Remove the next comment leader! OK, I will.
+- action();
+- if (condition) // Remove the next comment leader! OK, I will.
+- action();
+- int i = 7 /* foo *// 3 // comment
+- ;
+- int i = 7 /* foo *// 3 // comment
+- ;
+- ># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new comment is opened which spans 2 lines. This comment should retain its comment leader.
+- ># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new comment is opened which spans 2 lines. This comment should retain its comment leader.
+-
+- Some code!// Make sure backspacing does not remove this comment leader.
+- }
+-
+--- 0 ----
+*** ../vim-8.1.1330/src/testdir/test_backspace_opt.vim 2016-08-18 22:57:45.000000000 +0200
+--- src/testdir/test_backspace_opt.vim 2019-05-14 17:34:49.744798083 +0200
+***************
+*** 56,59 ****
+--- 56,110 ----
+ set nocompatible viminfo+=nviminfo
+ endfunc
+
++ " Test with backspace set to the non-compatible setting
++ func Test_backspace_ctrl_u()
++ new
++ call append(0, [
++ \ "1 this shouldn't be deleted",
++ \ "2 this shouldn't be deleted",
++ \ "3 this shouldn't be deleted",
++ \ "4 this should be deleted",
++ \ "5 this shouldn't be deleted",
++ \ "6 this shouldn't be deleted",
++ \ "7 this shouldn't be deleted",
++ \ "8 this shouldn't be deleted (not touched yet)"])
++ call cursor(2, 1)
++
++ set compatible
++ set backspace=2
++
++ exe "normal Avim1\<C-U>\<Esc>\<CR>"
++ exe "normal Avim2\<C-G>u\<C-U>\<Esc>\<CR>"
++
++ set cpo-=<
++ inoremap <c-u> <left><c-u>
++ exe "normal Avim3\<C-U>\<Esc>\<CR>"
++ iunmap <c-u>
++ exe "normal Avim4\<C-U>\<C-U>\<Esc>\<CR>"
++
++ " Test with backspace set to the compatible setting
++ set backspace= visualbell
++ exe "normal A vim5\<Esc>A\<C-U>\<C-U>\<Esc>\<CR>"
++ exe "normal A vim6\<Esc>Azwei\<C-G>u\<C-U>\<Esc>\<CR>"
++
++ inoremap <c-u> <left><c-u>
++ exe "normal A vim7\<C-U>\<C-U>\<Esc>\<CR>"
++
++ call assert_equal([
++ \ "1 this shouldn't be deleted",
++ \ "2 this shouldn't be deleted",
++ \ "3 this shouldn't be deleted",
++ \ "4 this should be deleted3",
++ \ "",
++ \ "6 this shouldn't be deleted vim5",
++ \ "7 this shouldn't be deleted vim6",
++ \ "8 this shouldn't be deleted (not touched yet) vim7",
++ \ ""], getline(1, '$'))
++
++ set compatible&vim
++ set visualbell&vim
++ set backspace&vim
++ close!
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.1330/src/testdir/test_join.vim 2017-10-22 14:08:57.000000000 +0200
+--- src/testdir/test_join.vim 2019-05-14 17:34:49.744798083 +0200
+***************
+*** 33,35 ****
+--- 33,423 ----
+ call assert_equal([0, 4, 67, 0], getpos("']"))
+ enew!
+ endfunc
++
++ " Test for joining lines and marks in them
++ " in compatible and nocompatible modes
++ " and with 'joinspaces' set or not
++ " and with 'cpoptions' flag 'j' set or not
++ func Test_join_spaces_marks()
++ new
++ " Text used for the test
++ insert
++ asdfasdf.
++ asdf
++ asdfasdf.
++ asdf
++ asdfasdf.
++ asdf
++ asdfasdf.
++ asdf
++ asdfasdf.
++ asdf
++ asdfasdf.
++ asdf
++ asdfasdf.
++ asdf
++ asdfasdf
++ asdf
++ asdfasdf
++ asdf
++ asdfasdf
++ asdf
++ asdfasdf
++ asdf
++ asdfasdf
++ asdf
++ asdfasdf
++ asdf
++ asdfasdf
++ asdf
++ zx cvn.
++ as dfg?
++ hjkl iop!
++ ert
++ zx cvn.
++ as dfg?
++ hjkl iop!
++ ert
++ .
++ let text = getline(1, '$')
++ normal gg
++
++ set nojoinspaces
++ set cpoptions-=j
++ normal JjJjJjJjJjJjJjJjJjJjJjJjJjJ
++ normal j05lmx
++ normal 2j06lmy
++ normal 2k4Jy3l$p
++ normal `xyl$p
++ normal `yy2l$p
++
++ set cpoptions+=j
++ normal j05lmx
++ normal 2j06lmy
++ normal 2k4Jy3l$p
++ normal `xyl$p
++ normal `yy2l$p
++
++ normal G
++ let last_line = line('$')
++
++ " Expected output
++ append
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ zx cvn. as dfg? hjkl iop! ert ernop
++ zx cvn. as dfg? hjkl iop! ert ernop
++ .
++
++ call assert_equal(getline(last_line + 1, '$'), getline(1, last_line))
++
++ enew!
++ call append(0, text)
++ normal gg
++
++ set cpoptions-=j
++ set joinspaces
++ normal JjJjJjJjJjJjJjJjJjJjJjJjJjJ
++ normal j05lmx
++ normal 2j06lmy
++ normal 2k4Jy3l$p
++ normal `xyl$p
++ normal `yy2l$p
++
++ set cpoptions+=j
++ normal j05lmx
++ normal 2j06lmy
++ normal 2k4Jy3l$p
++ normal `xyl$p
++ normal `yy2l$p
++
++ normal G
++ let last_line = line('$')
++
++ " Expected output
++ append
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ zx cvn. as dfg? hjkl iop! ert enop
++ zx cvn. as dfg? hjkl iop! ert ernop
++
++ .
++
++ call assert_equal(getline(last_line + 1, '$'), getline(1, last_line))
++
++ enew!
++ call append(0, text)
++ normal gg
++
++ set cpoptions-=j
++ set nojoinspaces
++ set compatible
++
++ normal JjJjJjJjJjJjJjJjJjJjJjJjJjJ
++ normal j4Jy3l$pjdG
++
++ normal G
++ let last_line = line('$')
++
++ " Expected output
++ append
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf. asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ asdfasdf asdf
++ zx cvn. as dfg? hjkl iop! ert a
++ .
++
++ call assert_equal(getline(last_line + 1, '$'), getline(1, last_line))
++
++ set nocompatible
++ set cpoptions&vim
++ set joinspaces&vim
++ close!
++ endfunc
++
++ " Test for joining lines with comments
++ func Test_join_lines_with_comments()
++ new
++
++ " Text used by the test
++ insert
++ {
++
++ /*
++ * Make sure the previous comment leader is not removed.
++ */
++
++ /*
++ * Make sure the previous comment leader is not removed.
++ */
++
++ // Should the next comment leader be left alone?
++ // Yes.
++
++ // Should the next comment leader be left alone?
++ // Yes.
++
++ /* Here the comment leader should be left intact. */
++ // And so should this one.
++
++ /* Here the comment leader should be left intact. */
++ // And so should this one.
++
++ if (condition) // Remove the next comment leader!
++ // OK, I will.
++ action();
++
++ if (condition) // Remove the next comment leader!
++ // OK, I will.
++ action();
++ }
++ .
++
++ call cursor(2, 1)
++ set comments=s1:/*,mb:*,ex:*/,://
++ set nojoinspaces fo=j
++ set backspace=eol,start
++
++ .,+3join
++ exe "normal j4J\<CR>"
++ .,+2join
++ exe "normal j3J\<CR>"
++ .,+2join
++ exe "normal j3J\<CR>"
++ .,+2join
++ exe "normal jj3J\<CR>"
++
++ normal G
++ let last_line = line('$')
++
++ " Expected output
++ append
++ {
++ /* Make sure the previous comment leader is not removed. */
++ /* Make sure the previous comment leader is not removed. */
++ // Should the next comment leader be left alone? Yes.
++ // Should the next comment leader be left alone? Yes.
++ /* Here the comment leader should be left intact. */ // And so should this one.
++ /* Here the comment leader should be left intact. */ // And so should this one.
++ if (condition) // Remove the next comment leader! OK, I will.
++ action();
++ if (condition) // Remove the next comment leader! OK, I will.
++ action();
++ }
++ .
++
++ call assert_equal(getline(last_line + 1, '$'), getline(1, last_line))
++
++ set comments&vim
++ set joinspaces&vim
++ set fo&vim
++ set backspace&vim
++ close!
++ endfunc
++
++ " Test for joining lines with different comment leaders
++ func Test_join_comments_2()
++ new
++
++ insert
++ {
++
++ /*
++ * Make sure the previous comment leader is not removed.
++ */
++
++ /*
++ * Make sure the previous comment leader is not removed.
++ */
++
++ /* List:
++ * - item1
++ * foo bar baz
++ * foo bar baz
++ * - item2
++ * foo bar baz
++ * foo bar baz
++ */
++
++ /* List:
++ * - item1
++ * foo bar baz
++ * foo bar baz
++ * - item2
++ * foo bar baz
++ * foo bar baz
++ */
++
++ // Should the next comment leader be left alone?
++ // Yes.
++
++ // Should the next comment leader be left alone?
++ // Yes.
++
++ /* Here the comment leader should be left intact. */
++ // And so should this one.
++
++ /* Here the comment leader should be left intact. */
++ // And so should this one.
++
++ if (condition) // Remove the next comment leader!
++ // OK, I will.
++ action();
++
++ if (condition) // Remove the next comment leader!
++ // OK, I will.
++ action();
++
++ int i = 7 /* foo *// 3
++ // comment
++ ;
++
++ int i = 7 /* foo *// 3
++ // comment
++ ;
++
++ ># Note that the last character of the ending comment leader (left angle
++ # bracket) is a comment leader itself. Make sure that this comment leader is
++ # not removed from the next line #<
++ < On this line a new comment is opened which spans 2 lines. This comment should
++ < retain its comment leader.
++
++ ># Note that the last character of the ending comment leader (left angle
++ # bracket) is a comment leader itself. Make sure that this comment leader is
++ # not removed from the next line #<
++ < On this line a new comment is opened which spans 2 lines. This comment should
++ < retain its comment leader.
++
++ }
++ .
++
++ call cursor(2, 1)
++ set comments=sO:*\ -,mO:*\ \ ,exO:*/
++ set comments+=s1:/*,mb:*,ex:*/,://
++ set comments+=s1:>#,mb:#,ex:#<,:<
++ set cpoptions-=j joinspaces fo=j
++ set backspace=eol,start
++
++ .,+3join
++ exe "normal j4J\<CR>"
++ .,+8join
++ exe "normal j9J\<CR>"
++ .,+2join
++ exe "normal j3J\<CR>"
++ .,+2join
++ exe "normal j3J\<CR>"
++ .,+2join
++ exe "normal jj3J\<CR>j"
++ .,+2join
++ exe "normal jj3J\<CR>j"
++ .,+5join
++ exe "normal j6J\<CR>"
++ exe "normal oSome code!\<CR>// Make sure backspacing does not remove this comment leader.\<Esc>0i\<C-H>\<Esc>"
++
++ normal G
++ let last_line = line('$')
++
++ " Expected output
++ append
++ {
++ /* Make sure the previous comment leader is not removed. */
++ /* Make sure the previous comment leader is not removed. */
++ /* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */
++ /* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */
++ // Should the next comment leader be left alone? Yes.
++ // Should the next comment leader be left alone? Yes.
++ /* Here the comment leader should be left intact. */ // And so should this one.
++ /* Here the comment leader should be left intact. */ // And so should this one.
++ if (condition) // Remove the next comment leader! OK, I will.
++ action();
++ if (condition) // Remove the next comment leader! OK, I will.
++ action();
++ int i = 7 /* foo *// 3 // comment
++ ;
++ int i = 7 /* foo *// 3 // comment
++ ;
++ ># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new comment is opened which spans 2 lines. This comment should retain its comment leader.
++ ># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new comment is opened which spans 2 lines. This comment should retain its comment leader.
++
++ Some code!// Make sure backspacing does not remove this comment leader.
++ }
++ .
++
++ call assert_equal(getline(last_line + 1, '$'), getline(1, last_line))
++ close!
++ endfunc
+*** ../vim-8.1.1330/src/version.c 2019-05-13 20:27:19.216311194 +0200
+--- src/version.c 2019-05-14 17:39:18.067407608 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1331,
+ /**/
+
+--
+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.1332 b/data/vim/patches/8.1.1332
new file mode 100644
index 000000000..7771e86c3
--- /dev/null
+++ b/data/vim/patches/8.1.1332
@@ -0,0 +1,622 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1332
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1332
+Problem: Cannot flush change listeners without also redrawing. The line
+ numbers in the list of changes may become invalid.
+Solution: Add listener_flush(). Invoke listeners before adding a change
+ that makes line numbers invalid.
+Files: src/evalfunc.c, src/change.c, src/proto/change.pro,
+ src/screen.c, runtime/doc/eval.txt, src/testdir/test_listener.vim
+
+
+*** ../vim-8.1.1331/src/evalfunc.c 2019-05-12 13:07:10.563191431 +0200
+--- src/evalfunc.c 2019-05-14 18:48:29.245329088 +0200
+***************
+*** 768,773 ****
+--- 768,774 ----
+ {"lispindent", 1, 1, f_lispindent},
+ {"list2str", 1, 2, f_list2str},
+ {"listener_add", 1, 2, f_listener_add},
++ {"listener_flush", 0, 1, f_listener_flush},
+ {"listener_remove", 1, 1, f_listener_remove},
+ {"localtime", 0, 0, f_localtime},
+ #ifdef FEAT_FLOAT
+*** ../vim-8.1.1331/src/change.c 2019-05-11 21:14:02.332269584 +0200
+--- src/change.c 2019-05-14 20:20:30.221554995 +0200
+***************
+*** 169,174 ****
+--- 169,214 ----
+
+ if (curbuf->b_listener == NULL)
+ return;
++
++ // If the new change is going to change the line numbers in already listed
++ // changes, then flush.
++ if (recorded_changes != NULL && xtra != 0)
++ {
++ listitem_T *li;
++ linenr_T nr;
++
++ for (li = recorded_changes->lv_first; li != NULL; li = li->li_next)
++ {
++ nr = (linenr_T)dict_get_number(
++ li->li_tv.vval.v_dict, (char_u *)"lnum");
++ if (nr >= lnum || nr > lnume)
++ {
++ if (li->li_next == NULL && lnum == nr
++ && col + 1 == (colnr_T)dict_get_number(
++ li->li_tv.vval.v_dict, (char_u *)"col"))
++ {
++ dictitem_T *di;
++
++ // Same start point and nothing is following, entries can
++ // be merged.
++ di = dict_find(li->li_tv.vval.v_dict, (char_u *)"end", -1);
++ nr = tv_get_number(&di->di_tv);
++ if (lnume > nr)
++ di->di_tv.vval.v_number = lnume;
++ di = dict_find(li->li_tv.vval.v_dict,
++ (char_u *)"added", -1);
++ di->di_tv.vval.v_number += xtra;
++ return;
++ }
++
++ // the current change is going to make the line number in the
++ // older change invalid, flush now
++ invoke_listeners(curbuf);
++ break;
++ }
++ }
++ }
++
+ if (recorded_changes == NULL)
+ {
+ recorded_changes = list_alloc();
+***************
+*** 231,236 ****
+--- 271,293 ----
+ }
+
+ /*
++ * listener_flush() function
++ */
++ void
++ f_listener_flush(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ buf_T *buf = curbuf;
++
++ if (argvars[0].v_type != VAR_UNKNOWN)
++ {
++ buf = get_buf_arg(&argvars[0]);
++ if (buf == NULL)
++ return;
++ }
++ invoke_listeners(buf);
++ }
++
++ /*
+ * listener_remove() function
+ */
+ void
+***************
+*** 264,288 ****
+ * listener_add().
+ */
+ void
+! invoke_listeners(void)
+ {
+ listener_T *lnr;
+ typval_T rettv;
+ int dummy;
+! typval_T argv[2];
+
+! if (recorded_changes == NULL) // nothing changed
+ return;
+- argv[0].v_type = VAR_LIST;
+- argv[0].vval.v_list = recorded_changes;
+
+! for (lnr = curbuf->b_listener; lnr != NULL; lnr = lnr->lr_next)
+ {
+ call_func(lnr->lr_callback, -1, &rettv,
+! 1, argv, NULL, 0L, 0L, &dummy, TRUE, lnr->lr_partial, NULL);
+ clear_tv(&rettv);
+ }
+
+ list_unref(recorded_changes);
+ recorded_changes = NULL;
+ }
+--- 321,376 ----
+ * listener_add().
+ */
+ void
+! invoke_listeners(buf_T *buf)
+ {
+ listener_T *lnr;
+ typval_T rettv;
+ int dummy;
+! typval_T argv[6];
+! listitem_T *li;
+! linenr_T start = MAXLNUM;
+! linenr_T end = 0;
+! linenr_T added = 0;
+
+! if (recorded_changes == NULL // nothing changed
+! || buf->b_listener == NULL) // no listeners
+ return;
+
+! argv[0].v_type = VAR_NUMBER;
+! argv[0].vval.v_number = buf->b_fnum; // a:bufnr
+!
+!
+! for (li = recorded_changes->lv_first; li != NULL; li = li->li_next)
+! {
+! varnumber_T lnum;
+!
+! lnum = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"lnum");
+! if (start > lnum)
+! start = lnum;
+! lnum = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"end");
+! if (lnum > end)
+! end = lnum;
+! added = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"added");
+! }
+! argv[1].v_type = VAR_NUMBER;
+! argv[1].vval.v_number = start;
+! argv[2].v_type = VAR_NUMBER;
+! argv[2].vval.v_number = end;
+! argv[3].v_type = VAR_NUMBER;
+! argv[3].vval.v_number = added;
+!
+! argv[4].v_type = VAR_LIST;
+! argv[4].vval.v_list = recorded_changes;
+! ++textlock;
+!
+! for (lnr = buf->b_listener; lnr != NULL; lnr = lnr->lr_next)
+ {
+ call_func(lnr->lr_callback, -1, &rettv,
+! 5, argv, NULL, 0L, 0L, &dummy, TRUE, lnr->lr_partial, NULL);
+ clear_tv(&rettv);
+ }
+
++ --textlock;
+ list_unref(recorded_changes);
+ recorded_changes = NULL;
+ }
+*** ../vim-8.1.1331/src/proto/change.pro 2019-05-11 19:14:11.589313987 +0200
+--- src/proto/change.pro 2019-05-14 19:02:12.920839840 +0200
+***************
+*** 3,10 ****
+ void changed(void);
+ void changed_internal(void);
+ void f_listener_add(typval_T *argvars, typval_T *rettv);
+ void f_listener_remove(typval_T *argvars, typval_T *rettv);
+! void invoke_listeners(void);
+ void changed_bytes(linenr_T lnum, colnr_T col);
+ void inserted_bytes(linenr_T lnum, colnr_T col, int added);
+ void appended_lines(linenr_T lnum, long count);
+--- 3,11 ----
+ void changed(void);
+ void changed_internal(void);
+ void f_listener_add(typval_T *argvars, typval_T *rettv);
++ void f_listener_flush(typval_T *argvars, typval_T *rettv);
+ void f_listener_remove(typval_T *argvars, typval_T *rettv);
+! void invoke_listeners(buf_T *buf);
+ void changed_bytes(linenr_T lnum, colnr_T col);
+ void inserted_bytes(linenr_T lnum, colnr_T col, int added);
+ void appended_lines(linenr_T lnum, long count);
+*** ../vim-8.1.1331/src/screen.c 2019-05-11 21:14:02.336269566 +0200
+--- src/screen.c 2019-05-14 18:52:55.103887107 +0200
+***************
+*** 565,572 ****
+ }
+
+ #ifdef FEAT_EVAL
+! // Before updating the screen, notify any listeners of changed text.
+! invoke_listeners();
+ #endif
+
+ if (must_redraw)
+--- 565,577 ----
+ }
+
+ #ifdef FEAT_EVAL
+! {
+! buf_T *buf;
+!
+! // Before updating the screen, notify any listeners of changed text.
+! FOR_ALL_BUFFERS(buf)
+! invoke_listeners(buf);
+! }
+ #endif
+
+ if (must_redraw)
+*** ../vim-8.1.1331/runtime/doc/eval.txt 2019-05-12 13:53:46.906851000 +0200
+--- runtime/doc/eval.txt 2019-05-14 21:17:56.054323991 +0200
+***************
+*** 2459,2464 ****
+--- 2459,2465 ----
+ list2str({list} [, {utf8}]) String turn numbers in {list} into a String
+ listener_add({callback} [, {buf}])
+ Number add a callback to listen to changes
++ listener_flush([{buf}]) none invoke listener callbacks
+ listener_remove({id}) none remove a listener callback
+ localtime() Number current time
+ log({expr}) Float natural logarithm (base e) of {expr}
+***************
+*** 6322,6329 ****
+ buffer is used.
+ Returns a unique ID that can be passed to |listener_remove()|.
+
+! The {callback} is invoked with a list of items that indicate a
+! change. The list cannot be changed. Each list item is a
+ dictionary with these entries:
+ lnum the first line number of the change
+ end the first line below the change
+--- 6323,6343 ----
+ buffer is used.
+ Returns a unique ID that can be passed to |listener_remove()|.
+
+! The {callback} is invoked with four arguments:
+! a:bufnr the buffer that was changed
+! a:start first changed line number
+! a:end first line number below the change
+! a:added total number of lines added, negative if lines
+! were deleted
+! a:changes a List of items with details about the changes
+!
+! Example: >
+! func Listener(bufnr, start, end, added, changes)
+! echo 'lines ' .. a:start .. ' until ' .. a:end .. ' changed'
+! endfunc
+! call listener_add('Listener', bufnr)
+!
+! < The List cannot be changed. Each item in a:changes is a
+ dictionary with these entries:
+ lnum the first line number of the change
+ end the first line below the change
+***************
+*** 6337,6371 ****
+ lnum line below which the new line is added
+ end equal to "lnum"
+ added number of lines inserted
+! col one
+ When lines are deleted the values are:
+ lnum the first deleted line
+ end the line below the first deleted line, before
+ the deletion was done
+ added negative, number of lines deleted
+! col one
+ When lines are changed:
+ lnum the first changed line
+ end the line below the last changed line
+! added zero
+! col first column with a change or one
+
+! The entries are in the order the changes was made, thus the
+! most recent change is at the end. One has to go through the
+! list from end to start to compute the line numbers in the
+! current state of the text.
+!
+! When using the same function for multiple buffers, you can
+! pass the buffer to that function using a |Partial|.
+! Example: >
+! func Listener(bufnr, changes)
+! " ...
+! endfunc
+! let bufnr = ...
+! call listener_add(function('Listener', [bufnr]), bufnr)
+!
+! < The {callback} is invoked just before the screen is updated.
+! To trigger this in a script use the `:redraw` command.
+
+ The {callback} is not invoked when the buffer is first loaded.
+ Use the |BufReadPost| autocmd event to handle the initial text
+--- 6351,6382 ----
+ lnum line below which the new line is added
+ end equal to "lnum"
+ added number of lines inserted
+! col 1
+ When lines are deleted the values are:
+ lnum the first deleted line
+ end the line below the first deleted line, before
+ the deletion was done
+ added negative, number of lines deleted
+! col 1
+ When lines are changed:
+ lnum the first changed line
+ end the line below the last changed line
+! added 0
+! col first column with a change or 1
+
+! The entries are in the order the changes were made, thus the
+! most recent change is at the end. The line numbers are valid
+! when the callback is invoked, but later changes may make them
+! invalid, thus keeping a copy for later might not work.
+!
+! The {callback} is invoked just before the screen is updated,
+! when |listener_flush()| is called or when a change is being
+! made that changes the line count in a way it causes a line
+! number in the list of changes to become invalid.
+!
+! The {callback} is invoked with the text locked, see
+! |textlock|. If you do need to make changes to the buffer, use
+! a timer to do this later |timer_start()|.
+
+ The {callback} is not invoked when the buffer is first loaded.
+ Use the |BufReadPost| autocmd event to handle the initial text
+***************
+*** 6373,6378 ****
+--- 6384,6397 ----
+ The {callback} is also not invoked when the buffer is
+ unloaded, use the |BufUnload| autocmd event for that.
+
++ listener_flush([{buf}]) *listener_flush()*
++ Invoke listener callbacks for buffer {buf}. If there are no
++ pending changes then no callbacks are invoked.
++
++ {buf} refers to a buffer name or number. For the accepted
++ values, see |bufname()|. When {buf} is omitted the current
++ buffer is used.
++
+ listener_remove({id}) *listener_remove()*
+ Remove a listener previously added with listener_add().
+
+*** ../vim-8.1.1331/src/testdir/test_listener.vim 2019-05-12 14:36:22.938437845 +0200
+--- src/testdir/test_listener.vim 2019-05-14 20:56:05.034204412 +0200
+***************
+*** 16,24 ****
+ func Test_listening()
+ new
+ call setline(1, ['one', 'two'])
+! let id = listener_add({l -> s:StoreList(l)})
+ call setline(1, 'one one')
+! redraw
+ call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], s:list)
+
+ " Undo is also a change
+--- 16,25 ----
+ func Test_listening()
+ new
+ call setline(1, ['one', 'two'])
+! let s:list = []
+! let id = listener_add({b, s, e, a, l -> s:StoreList(l)})
+ call setline(1, 'one one')
+! call listener_flush()
+ call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], s:list)
+
+ " Undo is also a change
+***************
+*** 26,37 ****
+ call append(2, 'two two')
+ undo
+ redraw
+! call assert_equal([{'lnum': 3, 'end': 3, 'col': 1, 'added': 1},
+! \ {'lnum': 3, 'end': 4, 'col': 1, 'added': -1}, ], s:list)
+ 1
+
+! " Two listeners, both get called.
+! let id2 = listener_add({l -> s:AnotherStoreList(l)})
+ let s:list = []
+ let s:list2 = []
+ exe "normal $asome\<Esc>"
+--- 27,40 ----
+ call append(2, 'two two')
+ undo
+ redraw
+! " the two changes get merged
+! call assert_equal([{'lnum': 3, 'end': 4, 'col': 1, 'added': 0}], s:list)
+ 1
+
+! " Two listeners, both get called. Also check column.
+! call setline(1, ['one one', 'two'])
+! call listener_flush()
+! let id2 = listener_add({b, s, e, a, l -> s:AnotherStoreList(l)})
+ let s:list = []
+ let s:list2 = []
+ exe "normal $asome\<Esc>"
+***************
+*** 39,45 ****
+--- 42,51 ----
+ call assert_equal([{'lnum': 1, 'end': 2, 'col': 8, 'added': 0}], s:list)
+ call assert_equal([{'lnum': 1, 'end': 2, 'col': 8, 'added': 0}], s:list2)
+
++ " removing listener works
+ call listener_remove(id2)
++ call setline(1, ['one one', 'two'])
++ call listener_flush()
+ let s:list = []
+ let s:list2 = []
+ call setline(3, 'three')
+***************
+*** 47,58 ****
+ call assert_equal([{'lnum': 3, 'end': 3, 'col': 1, 'added': 1}], s:list)
+ call assert_equal([], s:list2)
+
+ " the "o" command first adds an empty line and then changes it
+ let s:list = []
+ exe "normal Gofour\<Esc>"
+ redraw
+! call assert_equal([{'lnum': 4, 'end': 4, 'col': 1, 'added': 1},
+! \ {'lnum': 4, 'end': 5, 'col': 1, 'added': 0}], s:list)
+
+ " Remove last listener
+ let s:list = []
+--- 53,94 ----
+ call assert_equal([{'lnum': 3, 'end': 3, 'col': 1, 'added': 1}], s:list)
+ call assert_equal([], s:list2)
+
++ " a change above a previous change without a line number change is reported
++ " together
++ call setline(1, ['one one', 'two'])
++ call listener_flush()
++ call append(2, 'two two')
++ call setline(1, 'something')
++ call listener_flush()
++ call assert_equal([{'lnum': 3, 'end': 3, 'col': 1, 'added': 1},
++ \ {'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], s:list)
++
++ " an insert just above a previous change that was the last one gets merged
++ call setline(1, ['one one', 'two'])
++ call listener_flush()
++ call setline(2, 'something')
++ call append(1, 'two two')
++ call listener_flush()
++ call assert_equal([{'lnum': 2, 'end': 3, 'col': 1, 'added': 1}], s:list)
++
++ " an insert above a previous change causes a flush
++ call setline(1, ['one one', 'two'])
++ call listener_flush()
++ call setline(2, 'something')
++ call append(0, 'two two')
++ call assert_equal([{'lnum': 2, 'end': 3, 'col': 1, 'added': 0}], s:list)
++ call listener_flush()
++ call assert_equal([{'lnum': 1, 'end': 1, 'col': 1, 'added': 1}], s:list)
++
+ " the "o" command first adds an empty line and then changes it
++ %del
++ call setline(1, ['one one', 'two'])
++ call listener_flush()
+ let s:list = []
+ exe "normal Gofour\<Esc>"
+ redraw
+! call assert_equal([{'lnum': 3, 'end': 3, 'col': 1, 'added': 1},
+! \ {'lnum': 3, 'end': 4, 'col': 1, 'added': 0}], s:list)
+
+ " Remove last listener
+ let s:list = []
+***************
+*** 62,68 ****
+ call assert_equal([], s:list)
+
+ " Trying to change the list fails
+! let id = listener_add({l -> s:EvilStoreList(l)})
+ let s:list3 = []
+ call setline(1, 'asdfasdf')
+ redraw
+--- 98,104 ----
+ call assert_equal([], s:list)
+
+ " Trying to change the list fails
+! let id = listener_add({b, s, e, a, l -> s:EvilStoreList(l)})
+ let s:list3 = []
+ call setline(1, 'asdfasdf')
+ redraw
+***************
+*** 72,80 ****
+ bwipe!
+ endfunc
+
+! func s:StoreBufList(buf, l)
+ let s:bufnr = a:buf
+! let s:list = a:l
+ endfunc
+
+ func Test_listening_other_buf()
+--- 108,171 ----
+ bwipe!
+ endfunc
+
+! func s:StoreListArgs(buf, start, end, added, list)
+! let s:buf = a:buf
+! let s:start = a:start
+! let s:end = a:end
+! let s:added = a:added
+! let s:list = a:list
+! endfunc
+!
+! func Test_listener_args()
+! new
+! call setline(1, ['one', 'two'])
+! let s:list = []
+! let id = listener_add('s:StoreListArgs')
+!
+! " just one change
+! call setline(1, 'one one')
+! call listener_flush()
+! call assert_equal(bufnr(''), s:buf)
+! call assert_equal(1, s:start)
+! call assert_equal(2, s:end)
+! call assert_equal(0, s:added)
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], s:list)
+!
+! " two disconnected changes
+! call setline(1, ['one', 'two', 'three', 'four'])
+! call listener_flush()
+! call setline(1, 'one one')
+! call setline(3, 'three three')
+! call listener_flush()
+! call assert_equal(bufnr(''), s:buf)
+! call assert_equal(1, s:start)
+! call assert_equal(4, s:end)
+! call assert_equal(0, s:added)
+! call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0},
+! \ {'lnum': 3, 'end': 4, 'col': 1, 'added': 0}], s:list)
+!
+! " add and remove lines
+! call setline(1, ['one', 'two', 'three', 'four', 'five', 'six'])
+! call listener_flush()
+! call append(2, 'two two')
+! 4del
+! call append(5, 'five five')
+! call listener_flush()
+! call assert_equal(bufnr(''), s:buf)
+! call assert_equal(3, s:start)
+! call assert_equal(6, s:end)
+! call assert_equal(1, s:added)
+! call assert_equal([{'lnum': 3, 'end': 3, 'col': 1, 'added': 1},
+! \ {'lnum': 4, 'end': 5, 'col': 1, 'added': -1},
+! \ {'lnum': 6, 'end': 6, 'col': 1, 'added': 1}], s:list)
+!
+! call listener_remove(id)
+! bwipe!
+! endfunc
+!
+! func s:StoreBufList(buf, start, end, added, list)
+ let s:bufnr = a:buf
+! let s:list = a:list
+ endfunc
+
+ func Test_listening_other_buf()
+***************
+*** 82,88 ****
+ call setline(1, ['one', 'two'])
+ let bufnr = bufnr('')
+ normal ww
+! let id = listener_add(function('s:StoreBufList', [bufnr]), bufnr)
+ let s:list = []
+ call setbufline(bufnr, 1, 'hello')
+ redraw
+--- 173,179 ----
+ call setline(1, ['one', 'two'])
+ let bufnr = bufnr('')
+ normal ww
+! let id = listener_add(function('s:StoreBufList'), bufnr)
+ let s:list = []
+ call setbufline(bufnr, 1, 'hello')
+ redraw
+*** ../vim-8.1.1331/src/version.c 2019-05-14 17:57:14.861402461 +0200
+--- src/version.c 2019-05-14 21:18:19.926188697 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1332,
+ /**/
+
+--
+Hanson's Treatment of Time:
+ There are never enough hours in a day, but always too
+ many days before Saturday.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1333 b/data/vim/patches/8.1.1333
new file mode 100644
index 000000000..c279b72c5
--- /dev/null
+++ b/data/vim/patches/8.1.1333
@@ -0,0 +1,326 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1333
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1333
+Problem: Text properties don't always move after changes.
+Solution: Update properties before reporting changes to listeners. Move text
+ property when splitting a line.
+Files: src/change.c, src/ex_cmds.c, src/textprop.c,
+ src/proto/textprop.pro, src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.1332/src/change.c 2019-05-14 21:20:32.597441034 +0200
+--- src/change.c 2019-05-15 22:14:42.293974215 +0200
+***************
+*** 641,652 ****
+ void
+ inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED)
+ {
+- changed_bytes(lnum, col);
+-
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop && added != 0)
+ adjust_prop_columns(lnum, col, added);
+ #endif
+ }
+
+ /*
+--- 641,652 ----
+ void
+ inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED)
+ {
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop && added != 0)
+ adjust_prop_columns(lnum, col, added);
+ #endif
++
++ changed_bytes(lnum, col);
+ }
+
+ /*
+***************
+*** 2133,2138 ****
+--- 2133,2144 ----
+ )
+ mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
+ did_append = TRUE;
++ #ifdef FEAT_TEXT_PROP
++ if ((State & INSERT) && !(State & VREPLACE_FLAG))
++ // properties after the split move to the next line
++ adjust_props_for_split(curwin->w_cursor.lnum, curwin->w_cursor.lnum,
++ curwin->w_cursor.col + 1, 0);
++ #endif
+ }
+ else
+ {
+*** ../vim-8.1.1332/src/ex_cmds.c 2019-05-09 15:12:45.168723969 +0200
+--- src/ex_cmds.c 2019-05-15 22:02:51.794417449 +0200
+***************
+*** 5728,5734 ****
+ last_line = lnum + 1;
+ }
+ #ifdef FEAT_TEXT_PROP
+! adjust_props_for_split(lnum, plen, 1);
+ #endif
+ // all line numbers increase
+ ++sub_firstlnum;
+--- 5728,5734 ----
+ last_line = lnum + 1;
+ }
+ #ifdef FEAT_TEXT_PROP
+! adjust_props_for_split(lnum + 1, lnum, plen, 1);
+ #endif
+ // all line numbers increase
+ ++sub_firstlnum;
+*** ../vim-8.1.1332/src/textprop.c 2019-05-05 16:33:44.490168111 +0200
+--- src/textprop.c 2019-05-15 22:42:36.048949732 +0200
+***************
+*** 8,25 ****
+ */
+
+ /*
+! * 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:
+ * - When using 'cursorline' attributes should be merged. (#3912)
+ * - Adjust text property column and length when text is inserted/deleted.
+ * -> a :substitute with a multi-line match
+ * -> search for changed_bytes() from misc1.c
+ * - Perhaps we only need TP_FLAG_CONT_NEXT and can drop TP_FLAG_CONT_PREV?
+ * - Add an arrray for global_proptypes, to quickly lookup a prop type by ID
+--- 8,22 ----
+ */
+
+ /*
+! * Text properties implementation. See ":help text-properties".
+ *
+ * TODO:
+ * - When using 'cursorline' attributes should be merged. (#3912)
+ * - Adjust text property column and length when text is inserted/deleted.
++ * -> splitting a line can create a zero-length property. Don't highlight it
++ * and extend it when inserting text.
+ * -> a :substitute with a multi-line match
++ * -> join two lines, also with BS in Insert mode
+ * -> search for changed_bytes() from misc1.c
+ * - Perhaps we only need TP_FLAG_CONT_NEXT and can drop TP_FLAG_CONT_PREV?
+ * - Add an arrray for global_proptypes, to quickly lookup a prop type by ID
+***************
+*** 28,35 ****
+ * the index, like DB_MARKED?
+ * - Also test line2byte() with many lines, so that ml_updatechunk() is taken
+ * into account.
+- * - Add mechanism to keep track of changed lines, so that plugin can update
+- * text properties in these.
+ * - Perhaps have a window-local option to disable highlighting from text
+ * properties?
+ */
+--- 25,30 ----
+***************
+*** 1033,1044 ****
+
+ /*
+ * Adjust text properties for a line that was split in two.
+! * "lnum" is the newly inserted line. The text properties are now on the line
+! * below it. "kept" is the number of bytes kept in the first line, while
+ * "deleted" is the number of bytes deleted.
+ */
+ void
+! adjust_props_for_split(linenr_T lnum, int kept, int deleted)
+ {
+ char_u *props;
+ int count;
+--- 1028,1044 ----
+
+ /*
+ * Adjust text properties for a line that was split in two.
+! * "lnum_props" is the line that has the properties from before the split.
+! * "lnum_top" is the top line.
+! * "kept" is the number of bytes kept in the first line, while
+ * "deleted" is the number of bytes deleted.
+ */
+ void
+! adjust_props_for_split(
+! linenr_T lnum_props,
+! linenr_T lnum_top,
+! int kept,
+! int deleted)
+ {
+ char_u *props;
+ int count;
+***************
+*** 1049,1059 ****
+
+ if (!curbuf->b_has_textprop)
+ return;
+! count = get_text_props(curbuf, lnum + 1, &props, FALSE);
+ ga_init2(&prevprop, sizeof(textprop_T), 10);
+ ga_init2(&nextprop, sizeof(textprop_T), 10);
+
+- // Get the text properties, which are at "lnum + 1".
+ // Keep the relevant ones in the first line, reducing the length if needed.
+ // Copy the ones that include the split to the second line.
+ // Move the ones after the split to the second line.
+--- 1049,1060 ----
+
+ if (!curbuf->b_has_textprop)
+ return;
+!
+! // Get the text properties from "lnum_props".
+! count = get_text_props(curbuf, lnum_props, &props, FALSE);
+ ga_init2(&prevprop, sizeof(textprop_T), 10);
+ ga_init2(&nextprop, sizeof(textprop_T), 10);
+
+ // Keep the relevant ones in the first line, reducing the length if needed.
+ // Copy the ones that include the split to the second line.
+ // Move the ones after the split to the second line.
+***************
+*** 1089,1098 ****
+ }
+ }
+
+! set_text_props(lnum, prevprop.ga_data, prevprop.ga_len * sizeof(textprop_T));
+ ga_clear(&prevprop);
+!
+! set_text_props(lnum + 1, nextprop.ga_data, nextprop.ga_len * sizeof(textprop_T));
+ ga_clear(&nextprop);
+ }
+
+--- 1090,1100 ----
+ }
+ }
+
+! set_text_props(lnum_top, prevprop.ga_data,
+! prevprop.ga_len * sizeof(textprop_T));
+ ga_clear(&prevprop);
+! set_text_props(lnum_top + 1, nextprop.ga_data,
+! nextprop.ga_len * sizeof(textprop_T));
+ ga_clear(&nextprop);
+ }
+
+*** ../vim-8.1.1332/src/proto/textprop.pro 2019-01-04 23:09:45.249360567 +0100
+--- src/proto/textprop.pro 2019-05-15 22:05:41.925276920 +0200
+***************
+*** 14,18 ****
+ void clear_global_prop_types(void);
+ void clear_buf_prop_types(buf_T *buf);
+ void adjust_prop_columns(linenr_T lnum, colnr_T col, int bytes_added);
+! void adjust_props_for_split(linenr_T lnum, int kept, int deleted);
+ /* vim: set ft=c : */
+--- 14,18 ----
+ void clear_global_prop_types(void);
+ void clear_buf_prop_types(buf_T *buf);
+ void adjust_prop_columns(linenr_T lnum, colnr_T col, int bytes_added);
+! void adjust_props_for_split(linenr_T lnum_props, linenr_T lnum_top, int kept, int deleted);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1332/src/testdir/test_textprop.vim 2019-05-05 15:47:37.825923529 +0200
+--- src/testdir/test_textprop.vim 2019-05-15 22:41:42.505209936 +0200
+***************
+*** 151,156 ****
+--- 151,157 ----
+
+ func SetupOneLine()
+ call setline(1, 'xonex xtwoxx')
++ normal gg0
+ call AddPropTypes()
+ call prop_add(1, 2, {'length': 3, 'id': 11, 'type': 'one'})
+ call prop_add(1, 8, {'length': 3, 'id': 12, 'type': 'two'})
+***************
+*** 271,276 ****
+--- 272,337 ----
+ bwipe!
+ set bs&
+ endfunc
++
++ func Test_prop_open_line()
++ new
++
++ " open new line, props stay in top line
++ let expected = SetupOneLine() " 'xonex xtwoxx'
++ exe "normal o\<Esc>"
++ call assert_equal('xonex xtwoxx', getline(1))
++ call assert_equal('', getline(2))
++ call assert_equal(expected, prop_list(1))
++ call DeletePropTypes()
++
++ " move all props to next line
++ let expected = SetupOneLine() " 'xonex xtwoxx'
++ exe "normal 0i\<CR>\<Esc>"
++ call assert_equal('', getline(1))
++ call assert_equal('xonex xtwoxx', getline(2))
++ call assert_equal(expected, prop_list(2))
++ call DeletePropTypes()
++
++ " split just before prop, move all props to next line
++ let expected = SetupOneLine() " 'xonex xtwoxx'
++ exe "normal 0li\<CR>\<Esc>"
++ call assert_equal('x', getline(1))
++ call assert_equal('onex xtwoxx', getline(2))
++ let expected[0].col -= 1
++ let expected[1].col -= 1
++ call assert_equal(expected, prop_list(2))
++ call DeletePropTypes()
++
++ " split inside prop, split first prop
++ let expected = SetupOneLine() " 'xonex xtwoxx'
++ exe "normal 0lli\<CR>\<Esc>"
++ call assert_equal('xo', getline(1))
++ call assert_equal('nex xtwoxx', getline(2))
++ let exp_first = [deepcopy(expected[0])]
++ let exp_first[0].length = 1
++ call assert_equal(exp_first, prop_list(1))
++ let expected[0].col = 1
++ let expected[0].length = 2
++ let expected[1].col -= 2
++ call assert_equal(expected, prop_list(2))
++ call DeletePropTypes()
++
++ " split just after first prop, empty prop and second prop move to next line
++ let expected = SetupOneLine() " 'xonex xtwoxx'
++ exe "normal 0fea\<CR>\<Esc>"
++ call assert_equal('xone', getline(1))
++ call assert_equal('x xtwoxx', getline(2))
++ let exp_first = expected[0:0]
++ call assert_equal(exp_first, prop_list(1))
++ let expected[0].col = 1
++ let expected[0].length = 0
++ let expected[1].col -= 4
++ call assert_equal(expected, prop_list(2))
++ call DeletePropTypes()
++
++ bwipe!
++ set bs&
++ endfunc
+
+ func Test_prop_clear()
+ new
+*** ../vim-8.1.1332/src/version.c 2019-05-14 21:20:32.597441034 +0200
+--- src/version.c 2019-05-15 22:44:49.468290481 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1333,
+ /**/
+
+--
+BLACK KNIGHT: I'm invincible!
+ARTHUR: You're a looney.
+ "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.1334 b/data/vim/patches/8.1.1334
new file mode 100644
index 000000000..4d925e23f
--- /dev/null
+++ b/data/vim/patches/8.1.1334
@@ -0,0 +1,164 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1334
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1334
+Problem: When buffer is hidden "F" in 'shortmess' is not used.
+Solution: Check the "F" flag in 'shortmess' when the buffer is already
+ loaded. (Jason Franklin) Add test_getvalue() to be able to test
+ this.
+Files: src/buffer.c, src/evalfunc.c, src/testdir/test_options.vim,
+ runtime/doc/eval.txt
+
+
+*** ../vim-8.1.1333/src/buffer.c 2019-04-28 22:25:03.244480028 +0200
+--- src/buffer.c 2019-05-16 20:10:50.813287936 +0200
+***************
+*** 1742,1750 ****
+ }
+ else
+ {
+! if (!msg_silent)
+! need_fileinfo = TRUE; /* display file info after redraw */
+! (void)buf_check_timestamp(curbuf, FALSE); /* check if file changed */
+ curwin->w_topline = 1;
+ #ifdef FEAT_DIFF
+ curwin->w_topfill = 0;
+--- 1742,1753 ----
+ }
+ else
+ {
+! if (!msg_silent && !shortmess(SHM_FILEINFO))
+! need_fileinfo = TRUE; // display file info after redraw
+!
+! // check if file changed
+! (void)buf_check_timestamp(curbuf, FALSE);
+!
+ curwin->w_topline = 1;
+ #ifdef FEAT_DIFF
+ curwin->w_topfill = 0;
+*** ../vim-8.1.1333/src/evalfunc.c 2019-05-14 21:20:32.593441058 +0200
+--- src/evalfunc.c 2019-05-16 20:09:47.749554193 +0200
+***************
+*** 442,447 ****
+--- 442,448 ----
+ 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_getvalue(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_refcount(typval_T *argvars, typval_T *rettv);
+***************
+*** 991,996 ****
+--- 992,998 ----
+ {"test_autochdir", 0, 0, f_test_autochdir},
+ {"test_feedinput", 1, 1, f_test_feedinput},
+ {"test_garbagecollect_now", 0, 0, f_test_garbagecollect_now},
++ {"test_getvalue", 1, 1, f_test_getvalue},
+ {"test_ignore_error", 1, 1, f_test_ignore_error},
+ {"test_null_blob", 0, 0, f_test_null_blob},
+ #ifdef FEAT_JOB_CHANNEL
+***************
+*** 14413,14418 ****
+--- 14415,14439 ----
+ }
+
+ /*
++ * "test_getvalue({name})" function
++ */
++ static void
++ f_test_getvalue(typval_T *argvars, typval_T *rettv)
++ {
++ if (argvars[0].v_type != VAR_STRING)
++ emsg(_(e_invarg));
++ else
++ {
++ char_u *name = tv_get_string(&argvars[0]);
++
++ if (STRCMP(name, (char_u *)"need_fileinfo") == 0)
++ rettv->vval.v_number = need_fileinfo;
++ else
++ semsg(_(e_invarg2), name);
++ }
++ }
++
++ /*
+ * "test_option_not_set({name})" function
+ */
+ static void
+*** ../vim-8.1.1333/src/testdir/test_options.vim 2019-04-03 22:52:30.112905530 +0200
+--- src/testdir/test_options.vim 2019-05-16 20:09:36.533601448 +0200
+***************
+*** 470,482 ****
+--- 470,488 ----
+ call assert_match('file2', execute('bn', ''))
+ set shortmess+=F
+ call assert_true(empty(execute('bn', '')))
++ call assert_false(test_getvalue('need_fileinfo'))
+ call assert_true(empty(execute('bn', '')))
++ call assert_false(test_getvalue('need_fileinfo'))
+ set hidden
+ call assert_true(empty(execute('bn', '')))
++ call assert_false(test_getvalue('need_fileinfo'))
+ call assert_true(empty(execute('bn', '')))
++ call assert_false(test_getvalue('need_fileinfo'))
+ set nohidden
+ call assert_true(empty(execute('bn', '')))
++ call assert_false(test_getvalue('need_fileinfo'))
+ call assert_true(empty(execute('bn', '')))
++ call assert_false(test_getvalue('need_fileinfo'))
+ set shortmess&
+ call assert_match('file1', execute('bn', ''))
+ call assert_match('file2', execute('bn', ''))
+*** ../vim-8.1.1333/runtime/doc/eval.txt 2019-05-14 21:20:32.597441034 +0200
+--- runtime/doc/eval.txt 2019-05-16 20:07:50.766045098 +0200
+***************
+*** 2701,2706 ****
+--- 2701,2707 ----
+ test_autochdir() none enable 'autochdir' during startup
+ test_feedinput({string}) none add key sequence to input buffer
+ test_garbagecollect_now() none free memory right now for testing
++ test_getvalue({string}) any get value of an internal variable
+ test_ignore_error({expr}) none ignore a specific error
+ test_null_blob() Blob null value for testing
+ test_null_channel() Channel null value for testing
+***************
+*** 9894,9899 ****
+--- 9895,9905 ----
+ internally, and |v:testing| must have been set before calling
+ any function.
+
++ test_getvalue({name}) *test_getvalue()*
++ Get the value of an internal variable. These values for
++ {name} are supported:
++ need_fileinfo
++
+ test_ignore_error({expr}) *test_ignore_error()*
+ Ignore any error containing {expr}. A normal message is given
+ instead.
+*** ../vim-8.1.1333/src/version.c 2019-05-15 22:45:33.956067651 +0200
+--- src/version.c 2019-05-16 20:28:12.980254008 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1334,
+ /**/
+
+--
+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.1335 b/data/vim/patches/8.1.1335
new file mode 100644
index 000000000..4ff489812
--- /dev/null
+++ b/data/vim/patches/8.1.1335
@@ -0,0 +1,449 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1335
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1335
+Problem: Listener callback is called after inserting text.
+Solution: Flush the changes before inserting or deleting a line. Store
+ changes per buffer.
+Files: src/change.c, src/proto/change.pro, src/memline.c,
+ src/structs.h, src/testdir/test_listener.vim
+
+
+*** ../vim-8.1.1334/src/change.c 2019-05-15 22:45:33.956067651 +0200
+--- src/change.c 2019-05-16 21:44:23.932078618 +0200
+***************
+*** 152,183 ****
+ }
+
+ #ifdef FEAT_EVAL
+- static list_T *recorded_changes = NULL;
+ static long next_listener_id = 0;
+
+ /*
+! * Record a change for listeners added with listener_add().
+ */
+! static void
+! may_record_change(
+! linenr_T lnum,
+! colnr_T col,
+! linenr_T lnume,
+! long xtra)
+ {
+! dict_T *dict;
+!
+! if (curbuf->b_listener == NULL)
+! return;
+!
+! // If the new change is going to change the line numbers in already listed
+! // changes, then flush.
+! if (recorded_changes != NULL && xtra != 0)
+ {
+ listitem_T *li;
+ linenr_T nr;
+
+! for (li = recorded_changes->lv_first; li != NULL; li = li->li_next)
+ {
+ nr = (linenr_T)dict_get_number(
+ li->li_tv.vval.v_dict, (char_u *)"lnum");
+--- 152,181 ----
+ }
+
+ #ifdef FEAT_EVAL
+ static long next_listener_id = 0;
+
+ /*
+! * Check if the change at "lnum" / "col" is above or overlaps with an existing
+! * changed. If above then flush changes and invoke listeners.
+! * If "merge" is TRUE do the merge.
+! * Returns TRUE if the change was merged.
+ */
+! static int
+! check_recorded_changes(
+! buf_T *buf,
+! linenr_T lnum,
+! colnr_T col,
+! linenr_T lnume,
+! long xtra,
+! int merge)
+ {
+! if (buf->b_recorded_changes != NULL && xtra != 0)
+ {
+ listitem_T *li;
+ linenr_T nr;
+
+! for (li = buf->b_recorded_changes->lv_first; li != NULL;
+! li = li->li_next)
+ {
+ nr = (linenr_T)dict_get_number(
+ li->li_tv.vval.v_dict, (char_u *)"lnum");
+***************
+*** 187,221 ****
+ && col + 1 == (colnr_T)dict_get_number(
+ li->li_tv.vval.v_dict, (char_u *)"col"))
+ {
+! dictitem_T *di;
+!
+! // Same start point and nothing is following, entries can
+! // be merged.
+! di = dict_find(li->li_tv.vval.v_dict, (char_u *)"end", -1);
+! nr = tv_get_number(&di->di_tv);
+! if (lnume > nr)
+! di->di_tv.vval.v_number = lnume;
+! di = dict_find(li->li_tv.vval.v_dict,
+ (char_u *)"added", -1);
+! di->di_tv.vval.v_number += xtra;
+! return;
+ }
+-
+- // the current change is going to make the line number in the
+- // older change invalid, flush now
+- invoke_listeners(curbuf);
+- break;
+ }
+ }
+ }
+
+! if (recorded_changes == NULL)
+ {
+! recorded_changes = list_alloc();
+! if (recorded_changes == NULL) // out of memory
+ return;
+! ++recorded_changes->lv_refcount;
+! recorded_changes->lv_lock = VAR_FIXED;
+ }
+
+ dict = dict_alloc();
+--- 185,248 ----
+ && col + 1 == (colnr_T)dict_get_number(
+ li->li_tv.vval.v_dict, (char_u *)"col"))
+ {
+! if (merge)
+! {
+! dictitem_T *di;
+!
+! // Same start point and nothing is following, entries
+! // can be merged.
+! di = dict_find(li->li_tv.vval.v_dict,
+! (char_u *)"end", -1);
+! nr = tv_get_number(&di->di_tv);
+! if (lnume > nr)
+! di->di_tv.vval.v_number = lnume;
+! di = dict_find(li->li_tv.vval.v_dict,
+ (char_u *)"added", -1);
+! di->di_tv.vval.v_number += xtra;
+! return TRUE;
+! }
+! }
+! else
+! {
+! // the current change is going to make the line number in
+! // the older change invalid, flush now
+! invoke_listeners(curbuf);
+! break;
+ }
+ }
+ }
+ }
++ return FALSE;
++ }
+
+! /*
+! * Record a change for listeners added with listener_add().
+! * Always for the current buffer.
+! */
+! static void
+! may_record_change(
+! linenr_T lnum,
+! colnr_T col,
+! linenr_T lnume,
+! long xtra)
+! {
+! dict_T *dict;
+!
+! if (curbuf->b_listener == NULL)
+! return;
+!
+! // If the new change is going to change the line numbers in already listed
+! // changes, then flush.
+! if (check_recorded_changes(curbuf, lnum, col, lnume, xtra, TRUE))
+! return;
+!
+! if (curbuf->b_recorded_changes == NULL)
+ {
+! curbuf->b_recorded_changes = list_alloc();
+! if (curbuf->b_recorded_changes == NULL) // out of memory
+ return;
+! ++curbuf->b_recorded_changes->lv_refcount;
+! curbuf->b_recorded_changes->lv_lock = VAR_FIXED;
+ }
+
+ dict = dict_alloc();
+***************
+*** 226,232 ****
+ dict_add_number(dict, "added", (varnumber_T)xtra);
+ dict_add_number(dict, "col", (varnumber_T)col + 1);
+
+! list_append_dict(recorded_changes, dict);
+ }
+
+ /*
+--- 253,259 ----
+ dict_add_number(dict, "added", (varnumber_T)xtra);
+ dict_add_number(dict, "col", (varnumber_T)col + 1);
+
+! list_append_dict(curbuf->b_recorded_changes, dict);
+ }
+
+ /*
+***************
+*** 317,322 ****
+--- 344,359 ----
+ }
+
+ /*
++ * Called before inserting a line above "lnum"/"lnum3" or deleting line "lnum"
++ * to "lnume".
++ */
++ void
++ may_invoke_listeners(buf_T *buf, linenr_T lnum, linenr_T lnume, int added)
++ {
++ check_recorded_changes(buf, lnum, 0, lnume, added, FALSE);
++ }
++
++ /*
+ * Called when a sequence of changes is done: invoke listeners added with
+ * listener_add().
+ */
+***************
+*** 332,338 ****
+ linenr_T end = 0;
+ linenr_T added = 0;
+
+! if (recorded_changes == NULL // nothing changed
+ || buf->b_listener == NULL) // no listeners
+ return;
+
+--- 369,375 ----
+ linenr_T end = 0;
+ linenr_T added = 0;
+
+! if (buf->b_recorded_changes == NULL // nothing changed
+ || buf->b_listener == NULL) // no listeners
+ return;
+
+***************
+*** 340,346 ****
+ argv[0].vval.v_number = buf->b_fnum; // a:bufnr
+
+
+! for (li = recorded_changes->lv_first; li != NULL; li = li->li_next)
+ {
+ varnumber_T lnum;
+
+--- 377,383 ----
+ argv[0].vval.v_number = buf->b_fnum; // a:bufnr
+
+
+! for (li = buf->b_recorded_changes->lv_first; li != NULL; li = li->li_next)
+ {
+ varnumber_T lnum;
+
+***************
+*** 360,366 ****
+ argv[3].vval.v_number = added;
+
+ argv[4].v_type = VAR_LIST;
+! argv[4].vval.v_list = recorded_changes;
+ ++textlock;
+
+ for (lnr = buf->b_listener; lnr != NULL; lnr = lnr->lr_next)
+--- 397,403 ----
+ argv[3].vval.v_number = added;
+
+ argv[4].v_type = VAR_LIST;
+! argv[4].vval.v_list = buf->b_recorded_changes;
+ ++textlock;
+
+ for (lnr = buf->b_listener; lnr != NULL; lnr = lnr->lr_next)
+***************
+*** 371,378 ****
+ }
+
+ --textlock;
+! list_unref(recorded_changes);
+! recorded_changes = NULL;
+ }
+ #endif
+
+--- 408,415 ----
+ }
+
+ --textlock;
+! list_unref(buf->b_recorded_changes);
+! buf->b_recorded_changes = NULL;
+ }
+ #endif
+
+*** ../vim-8.1.1334/src/proto/change.pro 2019-05-14 21:20:32.597441034 +0200
+--- src/proto/change.pro 2019-05-16 21:43:11.104455404 +0200
+***************
+*** 5,10 ****
+--- 5,11 ----
+ void f_listener_add(typval_T *argvars, typval_T *rettv);
+ void f_listener_flush(typval_T *argvars, typval_T *rettv);
+ void f_listener_remove(typval_T *argvars, typval_T *rettv);
++ void may_invoke_listeners(buf_T *buf, linenr_T lnum, linenr_T lnume, int added);
+ void invoke_listeners(buf_T *buf);
+ void changed_bytes(linenr_T lnum, colnr_T col);
+ void inserted_bytes(linenr_T lnum, colnr_T col, int added);
+*** ../vim-8.1.1334/src/memline.c 2019-05-11 17:03:55.170019762 +0200
+--- src/memline.c 2019-05-16 22:10:02.903781871 +0200
+***************
+*** 2790,2795 ****
+--- 2790,2801 ----
+ if (len == 0)
+ len = (colnr_T)STRLEN(line) + 1; // space needed for the text
+
++ #ifdef FEAT_EVAL
++ // When inserting above recorded changes: flush the changes before changing
++ // the text.
++ may_invoke_listeners(buf, lnum + 1, lnum + 1, 1);
++ #endif
++
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop && lnum > 0)
+ // Add text properties that continue from the previous line.
+***************
+*** 3526,3531 ****
+--- 3532,3542 ----
+ if (lnum < 1 || lnum > buf->b_ml.ml_line_count)
+ return FAIL;
+
++ #ifdef FEAT_EVAL
++ // When inserting above recorded changes: flush the changes before changing
++ // the text.
++ may_invoke_listeners(buf, lnum, lnum + 1, -1);
++ #endif
+ if (lowest_marked && lowest_marked > lnum)
+ lowest_marked--;
+
+*** ../vim-8.1.1334/src/structs.h 2019-05-11 19:14:11.585314006 +0200
+--- src/structs.h 2019-05-16 21:35:50.642762505 +0200
+***************
+*** 2439,2444 ****
+--- 2439,2445 ----
+ dict_T *b_vars; /* internal variables, local to buffer */
+
+ listener_T *b_listener;
++ list_T *b_recorded_changes;
+ #endif
+ #ifdef FEAT_TEXT_PROP
+ int b_has_textprop; // TRUE when text props were added
+*** ../vim-8.1.1334/src/testdir/test_listener.vim 2019-05-14 21:20:32.597441034 +0200
+--- src/testdir/test_listener.vim 2019-05-16 22:09:20.164017981 +0200
+***************
+*** 1,6 ****
+ " tests for listener_add() and listener_remove()
+
+! func s:StoreList(l)
+ let s:list = a:l
+ endfunc
+
+--- 1,8 ----
+ " tests for listener_add() and listener_remove()
+
+! func s:StoreList(s, l)
+! let s:start = a:s
+! let s:text = getline(a:s)
+ let s:list = a:l
+ endfunc
+
+***************
+*** 17,23 ****
+ new
+ call setline(1, ['one', 'two'])
+ let s:list = []
+! let id = listener_add({b, s, e, a, l -> s:StoreList(l)})
+ call setline(1, 'one one')
+ call listener_flush()
+ call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], s:list)
+--- 19,25 ----
+ new
+ call setline(1, ['one', 'two'])
+ let s:list = []
+! let id = listener_add({b, s, e, a, l -> s:StoreList(s, l)})
+ call setline(1, 'one one')
+ call listener_flush()
+ call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': 0}], s:list)
+***************
+*** 66,73 ****
+--- 68,77 ----
+ " an insert just above a previous change that was the last one gets merged
+ call setline(1, ['one one', 'two'])
+ call listener_flush()
++ let s:list = []
+ call setline(2, 'something')
+ call append(1, 'two two')
++ call assert_equal([], s:list)
+ call listener_flush()
+ call assert_equal([{'lnum': 2, 'end': 3, 'col': 1, 'added': 1}], s:list)
+
+***************
+*** 77,84 ****
+--- 81,112 ----
+ call setline(2, 'something')
+ call append(0, 'two two')
+ call assert_equal([{'lnum': 2, 'end': 3, 'col': 1, 'added': 0}], s:list)
++ call assert_equal('something', s:text)
+ call listener_flush()
+ call assert_equal([{'lnum': 1, 'end': 1, 'col': 1, 'added': 1}], s:list)
++ call assert_equal('two two', s:text)
++
++ " a delete at a previous change that was the last one gets merged
++ call setline(1, ['one one', 'two'])
++ call listener_flush()
++ let s:list = []
++ call setline(2, 'something')
++ 2del
++ call assert_equal([], s:list)
++ call listener_flush()
++ call assert_equal([{'lnum': 2, 'end': 3, 'col': 1, 'added': -1}], s:list)
++
++ " a delete above a previous change causes a flush
++ call setline(1, ['one one', 'two'])
++ call listener_flush()
++ call setline(2, 'another')
++ 1del
++ call assert_equal([{'lnum': 2, 'end': 3, 'col': 1, 'added': 0}], s:list)
++ call assert_equal(2, s:start)
++ call assert_equal('another', s:text)
++ call listener_flush()
++ call assert_equal([{'lnum': 1, 'end': 2, 'col': 1, 'added': -1}], s:list)
++ call assert_equal('another', s:text)
+
+ " the "o" command first adds an empty line and then changes it
+ %del
+*** ../vim-8.1.1334/src/version.c 2019-05-16 20:29:40.799834279 +0200
+--- src/version.c 2019-05-16 22:10:40.187576723 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1335,
+ /**/
+
+--
+Hacker: Someone skilled in computer programming (good guy).
+Cracker: A hacker that uses his skills to crack software (bad guy).
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1336 b/data/vim/patches/8.1.1336
new file mode 100644
index 000000000..6a375253f
--- /dev/null
+++ b/data/vim/patches/8.1.1336
@@ -0,0 +1,232 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1336
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1336
+Problem: Some eval functionality is not covered by tests.
+Solution: Add a few more test cases. (Masato Nishihata, closes #4374)
+Files: src/testdir/test_bufline.vim, src/testdir/test_cindent.vim,
+ src/testdir/test_cursor_func.vim, src/testdir/test_delete.vim,
+ src/testdir/test_expand_func.vim, src/testdir/test_float_func.vim,
+ src/testdir/test_fnamemodify.vim, src/testdir/test_functions.vim
+
+*** ../vim-8.1.1335/src/testdir/test_bufline.vim 2019-04-20 15:10:06.382607095 +0200
+--- src/testdir/test_bufline.vim 2019-05-16 22:19:22.844760343 +0200
+***************
+*** 8,14 ****
+ hide
+ call assert_equal(0, setbufline(b, 1, ['foo', 'bar']))
+ call assert_equal(['foo'], getbufline(b, 1))
+! call assert_equal(['bar'], getbufline(b, 2))
+ call assert_equal(['foo', 'bar'], getbufline(b, 1, 2))
+ exe "bd!" b
+ call assert_equal([], getbufline(b, 1, 2))
+--- 8,14 ----
+ hide
+ call assert_equal(0, setbufline(b, 1, ['foo', 'bar']))
+ call assert_equal(['foo'], getbufline(b, 1))
+! call assert_equal(['bar'], getbufline(b, '$'))
+ call assert_equal(['foo', 'bar'], getbufline(b, 1, 2))
+ exe "bd!" b
+ call assert_equal([], getbufline(b, 1, 2))
+***************
+*** 81,86 ****
+--- 81,87 ----
+ call setline(1, ['a', 'b', 'c'])
+ let b = bufnr('%')
+ wincmd w
++ call assert_equal(1, appendbufline(b, -1, ['x']))
+ call assert_equal(1, appendbufline(b, 4, ['x']))
+ call assert_equal(1, appendbufline(1234, 1, ['x']))
+ call assert_equal(0, appendbufline(b, 3, ['d', 'e']))
+***************
+*** 130,137 ****
+--- 131,141 ----
+ exe "bd!" b
+ call assert_equal(1, deletebufline(b, 1))
+
++ call assert_equal(1, deletebufline(-1, 1))
++
+ split Xtest
+ call setline(1, ['a', 'b', 'c'])
++ call cursor(line('$'), 1)
+ let b = bufnr('%')
+ wincmd w
+ call assert_equal(1, deletebufline(b, 4))
+*** ../vim-8.1.1335/src/testdir/test_cindent.vim 2017-09-02 20:09:52.000000000 +0200
+--- src/testdir/test_cindent.vim 2019-05-16 22:23:43.643380089 +0200
+***************
+*** 102,105 ****
+--- 102,115 ----
+ bw!
+ endfunc
+
++ func Test_cindent_func()
++ new
++ setlocal cindent
++ call setline(1, ['int main(void)', '{', 'return 0;', '}'])
++ call assert_equal(cindent(0), -1)
++ call assert_equal(cindent(3), &sw)
++ call assert_equal(cindent(line('$')+1), -1)
++ bwipe!
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.1335/src/testdir/test_cursor_func.vim 2019-01-15 21:12:53.602254042 +0100
+--- src/testdir/test_cursor_func.vim 2019-05-16 22:19:22.844760343 +0200
+***************
+*** 25,30 ****
+--- 25,36 ----
+ call cursor(9, 1)
+ call assert_equal([4, 1, 0, 1], getcurpos()[1:])
+
++ call setline(1, ["\<TAB>"])
++ call cursor(1, 1, 1)
++ call assert_equal([1, 1, 1], getcurpos()[1:3])
++
++ call assert_equal(-1, cursor(-1, -1))
++
+ quit!
+ endfunc
+
+*** ../vim-8.1.1335/src/testdir/test_delete.vim 2017-03-19 15:57:08.000000000 +0100
+--- src/testdir/test_delete.vim 2019-05-16 22:19:22.844760343 +0200
+***************
+*** 105,107 ****
+--- 105,112 ----
+ bwipe Xdir3/subdir/Xfile
+ bwipe Xdir4/Xfile
+ endfunc
++
++ func Test_delete_errors()
++ call assert_fails('call delete('''')', 'E474:')
++ call assert_fails('call delete(''foo'', 0)', 'E15:')
++ endfunc
+*** ../vim-8.1.1335/src/testdir/test_expand_func.vim 2018-09-10 21:04:09.872392623 +0200
+--- src/testdir/test_expand_func.vim 2019-05-16 22:19:22.844760343 +0200
+***************
+*** 64,66 ****
+--- 64,75 ----
+ call assert_equal(64, str2nr(trim(execute('Flnum'))))
+ delcommand Flnum
+ endfunc
++
++ func Test_expand()
++ new
++ call assert_equal("", expand('%:S'))
++ call assert_equal('3', expand('<slnum>'))
++ call assert_equal(['4'], expand('<slnum>', v:false, v:true))
++ " Don't add any line above this, otherwise <slnum> will change.
++ quit
++ endfunc
+*** ../vim-8.1.1335/src/testdir/test_float_func.vim 2019-04-04 13:44:31.035594516 +0200
+--- src/testdir/test_float_func.vim 2019-05-16 22:19:22.844760343 +0200
+***************
+*** 13,18 ****
+--- 13,19 ----
+ call assert_equal('inf', string(abs(1.0/0.0)))
+ call assert_equal('inf', string(abs(-1.0/0.0)))
+ call assert_equal('nan', string(abs(0.0/0.0)))
++ call assert_equal('12', string(abs('12abc')))
+ call assert_equal('12', string(abs('-12abc')))
+ call assert_fails("call abs([])", 'E745:')
+ call assert_fails("call abs({})", 'E728:')
+*** ../vim-8.1.1335/src/testdir/test_fnamemodify.vim 2017-03-19 15:48:35.000000000 +0100
+--- src/testdir/test_fnamemodify.vim 2019-05-16 22:19:22.844760343 +0200
+***************
+*** 45,53 ****
+ let $HOME = save_home
+ let &shell = save_shell
+ endfunc
+-
+- func Test_expand()
+- new
+- call assert_equal("", expand('%:S'))
+- quit
+- endfunc
+--- 45,47 ----
+*** ../vim-8.1.1335/src/testdir/test_functions.vim 2019-04-05 22:50:35.025737353 +0200
+--- src/testdir/test_functions.vim 2019-05-16 22:19:22.844760343 +0200
+***************
+*** 52,57 ****
+--- 52,58 ----
+ endif
+
+ call assert_equal(0, empty(function('Test_empty')))
++ call assert_equal(0, empty(function('Test_empty', [0])))
+ endfunc
+
+ func Test_len()
+***************
+*** 869,874 ****
+--- 870,876 ----
+ call assert_equal(1, count(l, 'a', 0, 1))
+ call assert_equal(2, count(l, 'a', 1, 1))
+ call assert_fails('call count(l, "a", 0, 10)', 'E684:')
++ call assert_fails('call count(l, "a", [])', 'E745:')
+
+ let d = {1: 'a', 2: 'a', 3: 'A', 4: 'b'}
+ call assert_equal(2, count(d, 'a'))
+***************
+*** 896,901 ****
+--- 898,905 ----
+ call assert_equal(2, count("foo", "O", 1))
+ call assert_equal(2, count("fooooo", "oo"))
+ call assert_equal(0, count("foo", ""))
++
++ call assert_fails('call count(0, 0)', 'E712:')
+ endfunc
+
+ func Test_changenr()
+***************
+*** 1431,1433 ****
+--- 1435,1457 ----
+
+ call delete('Xdir', 'rf')
+ endfunc
++
++ func Test_call()
++ call assert_equal(3, call('len', [123]))
++ call assert_fails("call call('len', 123)", 'E714:')
++ call assert_equal(0, call('', []))
++
++ function Mylen() dict
++ return len(self.data)
++ endfunction
++ let mydict = {'data': [0, 1, 2, 3], 'len': function("Mylen")}
++ call assert_fails("call call('Mylen', [], 0)", 'E715:')
++ endfunc
++
++ func Test_char2nr()
++ call assert_equal(12354, char2nr('あ', 1))
++ endfunc
++
++ func Test_eventhandler()
++ call assert_equal(0, eventhandler())
++ endfunc
+*** ../vim-8.1.1335/src/version.c 2019-05-16 22:11:43.715228803 +0200
+--- src/version.c 2019-05-16 22:19:55.584586456 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1336,
+ /**/
+
+--
+ 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.1337 b/data/vim/patches/8.1.1337
new file mode 100644
index 000000000..fb7429d86
--- /dev/null
+++ b/data/vim/patches/8.1.1337
@@ -0,0 +1,89 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1337
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1337
+Problem: Get empty text prop when splitting line just after text prop.
+Solution: Do not create an empty text prop at the start of the line.
+Files: src/textprop.c, src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.1336/src/textprop.c 2019-05-15 22:45:33.956067651 +0200
+--- src/textprop.c 2019-05-17 11:04:54.930395439 +0200
+***************
+*** 1075,1081 ****
+ ++prevprop.ga_len;
+ }
+
+! if (prop.tp_col + prop.tp_len >= skipped && ga_grow(&nextprop, 1) == OK)
+ {
+ p = ((textprop_T *)nextprop.ga_data) + nextprop.ga_len;
+ *p = prop;
+--- 1075,1083 ----
+ ++prevprop.ga_len;
+ }
+
+! // Only add the property to the next line if the length is bigger than
+! // zero.
+! if (prop.tp_col + prop.tp_len > skipped && ga_grow(&nextprop, 1) == OK)
+ {
+ p = ((textprop_T *)nextprop.ga_data) + nextprop.ga_len;
+ *p = prop;
+*** ../vim-8.1.1336/src/testdir/test_textprop.vim 2019-05-15 22:45:33.956067651 +0200
+--- src/testdir/test_textprop.vim 2019-05-17 11:06:53.442102403 +0200
+***************
+*** 316,331 ****
+ call assert_equal(expected, prop_list(2))
+ call DeletePropTypes()
+
+! " split just after first prop, empty prop and second prop move to next line
+ let expected = SetupOneLine() " 'xonex xtwoxx'
+ exe "normal 0fea\<CR>\<Esc>"
+ call assert_equal('xone', getline(1))
+ call assert_equal('x xtwoxx', getline(2))
+ let exp_first = expected[0:0]
+ call assert_equal(exp_first, prop_list(1))
+! let expected[0].col = 1
+! let expected[0].length = 0
+! let expected[1].col -= 4
+ call assert_equal(expected, prop_list(2))
+ call DeletePropTypes()
+
+--- 316,330 ----
+ call assert_equal(expected, prop_list(2))
+ call DeletePropTypes()
+
+! " split just after first prop, second prop move to next line
+ let expected = SetupOneLine() " 'xonex xtwoxx'
+ exe "normal 0fea\<CR>\<Esc>"
+ call assert_equal('xone', getline(1))
+ call assert_equal('x xtwoxx', getline(2))
+ let exp_first = expected[0:0]
+ call assert_equal(exp_first, prop_list(1))
+! let expected = expected[1:1]
+! let expected[0].col -= 4
+ call assert_equal(expected, prop_list(2))
+ call DeletePropTypes()
+
+*** ../vim-8.1.1336/src/version.c 2019-05-16 22:24:52.407017760 +0200
+--- src/version.c 2019-05-17 11:08:05.421997669 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1337,
+ /**/
+
+--
+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.1338 b/data/vim/patches/8.1.1338
new file mode 100644
index 000000000..fd8309038
--- /dev/null
+++ b/data/vim/patches/8.1.1338
@@ -0,0 +1,111 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1338
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1338
+Problem: Hang when concealing the '>' shown for a wide char that doesn't
+ fit in the last cell.
+Solution: Put back the pointer when the '>' is not going to be displayed.
+ (closes #4377)
+Files: src/screen.c
+
+
+*** ../vim-8.1.1337/src/screen.c 2019-05-14 21:20:32.597441034 +0200
+--- src/screen.c 2019-05-17 12:24:36.009066604 +0200
+***************
+*** 3176,3182 ****
+ int vcol_off = 0; /* offset for concealed characters */
+ int did_wcol = FALSE;
+ int match_conc = 0; /* cchar for match functions */
+- int has_match_conc = 0; /* match wants to conceal */
+ int old_boguscols = 0;
+ # define VCOL_HLC (vcol - vcol_off)
+ # define FIX_FOR_BOGUSCOLS \
+--- 3176,3181 ----
+***************
+*** 3747,3753 ****
+ for (;;)
+ {
+ #ifdef FEAT_CONCEAL
+! has_match_conc = 0;
+ #endif
+ /* Skip this quickly when working on the text. */
+ if (draw_state != WL_LINE)
+--- 3746,3753 ----
+ for (;;)
+ {
+ #ifdef FEAT_CONCEAL
+! int has_match_conc = 0; // match wants to conceal
+! int did_decrement_ptr = FALSE;
+ #endif
+ /* Skip this quickly when working on the text. */
+ if (draw_state != WL_LINE)
+***************
+*** 4596,4604 ****
+ mb_utf8 = FALSE;
+ mb_l = 1;
+ multi_attr = HL_ATTR(HLF_AT);
+! /* Put pointer back so that the character will be
+! * displayed at the start of the next line. */
+ --ptr;
+ }
+ else if (*ptr != NUL)
+ ptr += mb_l - 1;
+--- 4596,4607 ----
+ mb_utf8 = FALSE;
+ mb_l = 1;
+ multi_attr = HL_ATTR(HLF_AT);
+! // Put pointer back so that the character will be
+! // displayed at the start of the next line.
+ --ptr;
++ #ifdef FEAT_CONCEAL
++ did_decrement_ptr = TRUE;
++ #endif
+ }
+ else if (*ptr != NUL)
+ ptr += mb_l - 1;
+***************
+*** 5261,5267 ****
+ prev_syntax_id = 0;
+ is_concealing = FALSE;
+ }
+! #endif /* FEAT_CONCEAL */
+ }
+
+ #ifdef FEAT_CONCEAL
+--- 5264,5275 ----
+ prev_syntax_id = 0;
+ is_concealing = FALSE;
+ }
+!
+! if (n_skip > 0 && did_decrement_ptr)
+! // not showing the '>', put pointer back to avoid getting stuck
+! ++ptr;
+!
+! #endif // FEAT_CONCEAL
+ }
+
+ #ifdef FEAT_CONCEAL
+*** ../vim-8.1.1337/src/version.c 2019-05-17 11:08:52.877906342 +0200
+--- src/version.c 2019-05-17 12:30:42.227009618 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1338,
+ /**/
+
+--
+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.1339 b/data/vim/patches/8.1.1339
new file mode 100644
index 000000000..900eeea6f
--- /dev/null
+++ b/data/vim/patches/8.1.1339
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1339
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1339
+Problem: Installer needs to product name et al.
+Solution: Add a few lines to the NSIS installer script. (Christian Brabandt)
+Files: nsis/gvim.nsi
+
+
+*** ../vim-8.1.1338/nsis/gvim.nsi 2019-04-28 19:46:17.018060159 +0200
+--- nsis/gvim.nsi 2019-05-17 12:35:12.901465863 +0200
+***************
+*** 173,178 ****
+--- 173,188 ----
+ !include "lang\tradchinese.nsi"
+ !endif
+
++ ##########################################################
++ # Version resources
++
++ VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Vim"
++ VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Vim Developers"
++ VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim"
++ VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (C) 1996"
++ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor"
++ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VER_MAJOR}.${VER_MINOR}.0.0"
++ VIProductVersion "${VER_MAJOR}.${VER_MINOR}.0.0"
+
+ # Global variables
+ Var vim_dialog
+*** ../vim-8.1.1338/src/version.c 2019-05-17 12:31:40.266679824 +0200
+--- src/version.c 2019-05-17 12:36:38.104977418 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1339,
+ /**/
+
+--
+BEDEVERE: And that, my lord, is how we know the Earth to be banana-shaped.
+ "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.1340 b/data/vim/patches/8.1.1340
new file mode 100644
index 000000000..2f97743b5
--- /dev/null
+++ b/data/vim/patches/8.1.1340
@@ -0,0 +1,121 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1340
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1340
+Problem: Attributes from 'cursorline' overwrite textprop.
+Solution: Combine the attributes. (closes #3912)
+Files: src/screen.c, src/textprop.c, src/testdir/test_textprop.vim,
+ src/testdir/dumps/Test_textprop_01.dump
+
+
+*** ../vim-8.1.1339/src/screen.c 2019-05-17 12:31:40.266679824 +0200
+--- src/screen.c 2019-05-17 13:04:04.624094164 +0200
+***************
+*** 4306,4316 ****
+ char_attr = hl_combine_attr(line_attr, area_attr);
+ else if (search_attr != 0)
+ char_attr = hl_combine_attr(line_attr, search_attr);
+! /* Use line_attr when not in the Visual or 'incsearch' area
+! * (area_attr may be 0 when "noinvcur" is set). */
+ else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
+ || vcol < fromcol || vcol_prev < fromcol_prev
+ || vcol >= tocol))
+ char_attr = line_attr;
+ #else
+ if (area_attr != 0)
+--- 4306,4320 ----
+ char_attr = hl_combine_attr(line_attr, area_attr);
+ else if (search_attr != 0)
+ char_attr = hl_combine_attr(line_attr, search_attr);
+! # ifdef FEAT_TEXT_PROP
+! else if (text_prop_type != NULL)
+! char_attr = hl_combine_attr(line_attr, text_prop_attr);
+! # endif
+ else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
+ || vcol < fromcol || vcol_prev < fromcol_prev
+ || vcol >= tocol))
++ // Use line_attr when not in the Visual or 'incsearch' area
++ // (area_attr may be 0 when "noinvcur" is set).
+ char_attr = line_attr;
+ #else
+ if (area_attr != 0)
+*** ../vim-8.1.1339/src/textprop.c 2019-05-17 11:08:52.877906342 +0200
+--- src/textprop.c 2019-05-17 12:59:24.725606396 +0200
+***************
+*** 11,20 ****
+ * Text properties implementation. See ":help text-properties".
+ *
+ * TODO:
+- * - When using 'cursorline' attributes should be merged. (#3912)
+ * - Adjust text property column and length when text is inserted/deleted.
+- * -> splitting a line can create a zero-length property. Don't highlight it
+- * and extend it when inserting text.
+ * -> a :substitute with a multi-line match
+ * -> join two lines, also with BS in Insert mode
+ * -> search for changed_bytes() from misc1.c
+--- 11,17 ----
+*** ../vim-8.1.1339/src/testdir/test_textprop.vim 2019-05-17 11:08:52.877906342 +0200
+--- src/testdir/test_textprop.vim 2019-05-17 13:01:44.488856078 +0200
+***************
+*** 645,651 ****
+ \ "call prop_add(3, 15, {'length': 2, 'type': 'both'})",
+ \ "call prop_add(4, 12, {'length': 10, 'type': 'background'})",
+ \ "call prop_add(4, 17, {'length': 5, 'type': 'error'})",
+! \ "set number",
+ \ "hi clear SpellBad",
+ \ "set spell",
+ \ "syn match Comment '//.*'",
+--- 645,651 ----
+ \ "call prop_add(3, 15, {'length': 2, 'type': 'both'})",
+ \ "call prop_add(4, 12, {'length': 10, 'type': 'background'})",
+ \ "call prop_add(4, 17, {'length': 5, 'type': 'error'})",
+! \ "set number cursorline",
+ \ "hi clear SpellBad",
+ \ "set spell",
+ \ "syn match Comment '//.*'",
+*** ../vim-8.1.1339/src/testdir/dumps/Test_textprop_01.dump 2019-05-05 16:10:28.730247307 +0200
+--- src/testdir/dumps/Test_textprop_01.dump 2019-05-17 13:01:53.440807682 +0200
+***************
+*** 1,6 ****
+ | +0#af5f00255#ffffff0@1|1| |O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
+ | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| +0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
+! | +0#af5f00255&@1|3| >-+0#0000000#ffff4012|x+0&#ffffff0|a+0#4040ff13&@1|x+0#0000000&|-@1|x+0#4040ff13&|b@1|x+0#0000000&|-@1|x|c+0#4040ff13&@1|x|-+0#0000000&@1|x+0#4040ff13&|d@1|x|-+0#0000000&@1| @45
+ | +0#af5f00255&@1|4| |/+0#40ff4011&@1| |c|o|m@1|e|n|t| |w+0&#e0e0e08|i|t|h| |e+8&&|r@1|o|r| +0&#ffffff0|i|n| |i|t| +0#0000000&@43
+ |~+0#4040ff13&| @73
+ |~| @73
+--- 1,6 ----
+ | +0#af5f00255#ffffff0@1|1| |O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
+ | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| +0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
+! | +0#af5f00255&@1|3| >-+8#0000000#ffff4012|x+8&#ffffff0|a+8#4040ff13&@1|x+8#0000000&|-@1|x+8#4040ff13&|b@1|x+8#0000000&|-@1|x|c+8#4040ff13&@1|x|-+8#0000000&@1|x+8#4040ff13&|d@1|x|-+8#0000000&@1| @45
+ | +0#af5f00255&@1|4| |/+0#40ff4011&@1| |c|o|m@1|e|n|t| |w+0&#e0e0e08|i|t|h| |e+8&&|r@1|o|r| +0&#ffffff0|i|n| |i|t| +0#0000000&@43
+ |~+0#4040ff13&| @73
+ |~| @73
+*** ../vim-8.1.1339/src/version.c 2019-05-17 12:36:52.776893221 +0200
+--- src/version.c 2019-05-17 13:03:35.072255505 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1340,
+ /**/
+
+--
+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.1341 b/data/vim/patches/8.1.1341
new file mode 100644
index 000000000..23323bcde
--- /dev/null
+++ b/data/vim/patches/8.1.1341
@@ -0,0 +1,431 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1341
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1341
+Problem: Text properties are lost when joining lines.
+Solution: Move the text properties to the joined line.
+Files: src/ops.c, src/textprop.c, src/proto/textprop.pro,
+ src/testdir/test_textprop.vim,
+ src/testdir/dumps/Test_textprop_01.dump
+
+
+*** ../vim-8.1.1340/src/ops.c 2019-04-27 22:06:33.348200718 +0200
+--- src/ops.c 2019-05-17 16:42:27.190882289 +0200
+***************
+*** 1211,1217 ****
+ int retval = OK;
+ int remap;
+
+! if (regname == '@') /* repeat previous one */
+ {
+ if (execreg_lastc == NUL)
+ {
+--- 1211,1218 ----
+ int retval = OK;
+ int remap;
+
+! // repeat previous one
+! if (regname == '@')
+ {
+ if (execreg_lastc == NUL)
+ {
+***************
+*** 1220,1226 ****
+ }
+ regname = execreg_lastc;
+ }
+! /* check for valid regname */
+ if (regname == '%' || regname == '#' || !valid_yank_reg(regname, FALSE))
+ {
+ emsg_invreg(regname);
+--- 1221,1227 ----
+ }
+ regname = execreg_lastc;
+ }
+! // check for valid regname
+ if (regname == '%' || regname == '#' || !valid_yank_reg(regname, FALSE))
+ {
+ emsg_invreg(regname);
+***************
+*** 1232,1242 ****
+ regname = may_get_selection(regname);
+ #endif
+
+! if (regname == '_') /* black hole: don't stuff anything */
+ return OK;
+
+ #ifdef FEAT_CMDHIST
+! if (regname == ':') /* use last command line */
+ {
+ if (last_cmdline == NULL)
+ {
+--- 1233,1245 ----
+ regname = may_get_selection(regname);
+ #endif
+
+! // black hole: don't stuff anything
+! if (regname == '_')
+ return OK;
+
+ #ifdef FEAT_CMDHIST
+! // use last command line
+! if (regname == ':')
+ {
+ if (last_cmdline == NULL)
+ {
+***************
+*** 4438,4444 ****
+ && has_format_option(FO_REMOVE_COMS);
+ int prev_was_comment;
+ #endif
+!
+
+ if (save_undo && u_save((linenr_T)(curwin->w_cursor.lnum - 1),
+ (linenr_T)(curwin->w_cursor.lnum + count)) == FAIL)
+--- 4441,4450 ----
+ && has_format_option(FO_REMOVE_COMS);
+ int prev_was_comment;
+ #endif
+! #ifdef FEAT_TEXT_PROP
+! textprop_T **prop_lines = NULL;
+! int *prop_lengths = NULL;
+! #endif
+
+ if (save_undo && u_save((linenr_T)(curwin->w_cursor.lnum - 1),
+ (linenr_T)(curwin->w_cursor.lnum + count)) == FAIL)
+***************
+*** 4463,4470 ****
+ #endif
+
+ /*
+! * Don't move anything, just compute the final line length
+ * and setup the array of space strings lengths
+ */
+ for (t = 0; t < count; ++t)
+ {
+--- 4469,4477 ----
+ #endif
+
+ /*
+! * Don't move anything yet, just compute the final line length
+ * and setup the array of space strings lengths
++ * This loops forward over the joined lines.
+ */
+ for (t = 0; t < count; ++t)
+ {
+***************
+*** 4556,4563 ****
+--- 4563,4586 ----
+ cend = newp + sumsize;
+ *cend = 0;
+
++ #ifdef FEAT_TEXT_PROP
++ // We need to move properties of the lines that are going to be deleted to
++ // the new long one.
++ if (curbuf->b_has_textprop && !text_prop_frozen)
++ {
++ // Allocate an array to copy the text properties of joined lines into.
++ // And another array to store the number of properties in each line.
++ prop_lines = (textprop_T **)alloc_clear(
++ (int)(count - 1) * sizeof(textprop_T *));
++ prop_lengths = (int *)alloc_clear((int)(count - 1) * sizeof(int));
++ if (prop_lengths == NULL)
++ VIM_CLEAR(prop_lines);
++ }
++ #endif
++
+ /*
+ * Move affected lines to the new long one.
++ * This loops backwards over the joined lines, including the original line.
+ *
+ * Move marks from each deleted line to the joined line, adjusting the
+ * column. This is not Vi compatible, but Vi deletes the marks, thus that
+***************
+*** 4583,4590 ****
+ (long)(cend - newp - spaces_removed), spaces_removed);
+ if (t == 0)
+ break;
+ curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1));
+! #if defined(FEAT_COMMENTS) || defined(PROTO)
+ if (remove_comments)
+ curr += comments[t - 1];
+ #endif
+--- 4606,4620 ----
+ (long)(cend - newp - spaces_removed), spaces_removed);
+ if (t == 0)
+ break;
++ #ifdef FEAT_TEXT_PROP
++ if (prop_lines != NULL)
++ adjust_props_for_join(curwin->w_cursor.lnum + t,
++ prop_lines + t - 1, prop_lengths + t - 1,
++ (long)(cend - newp - spaces_removed), spaces_removed);
++ #endif
++
+ curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1));
+! #if defined(FEAT_COMMENTS)
+ if (remove_comments)
+ curr += comments[t - 1];
+ #endif
+***************
+*** 4592,4598 ****
+ curr = skipwhite(curr);
+ currsize = (int)STRLEN(curr);
+ }
+! ml_replace(curwin->w_cursor.lnum, newp, FALSE);
+
+ if (setmark)
+ {
+--- 4622,4635 ----
+ curr = skipwhite(curr);
+ currsize = (int)STRLEN(curr);
+ }
+!
+! #ifdef FEAT_TEXT_PROP
+! if (prop_lines != NULL)
+! join_prop_lines(curwin->w_cursor.lnum, newp,
+! prop_lines, prop_lengths, count);
+! else
+! #endif
+! ml_replace(curwin->w_cursor.lnum, newp, FALSE);
+
+ if (setmark)
+ {
+***************
+*** 4605,4611 ****
+ * the deleted line. */
+ changed_lines(curwin->w_cursor.lnum, currsize,
+ curwin->w_cursor.lnum + 1, 0L);
+-
+ /*
+ * Delete following lines. To do this we move the cursor there
+ * briefly, and then move it back. After del_lines() the cursor may
+--- 4642,4647 ----
+*** ../vim-8.1.1340/src/textprop.c 2019-05-17 13:05:03.795770160 +0200
+--- src/textprop.c 2019-05-17 19:31:14.135899352 +0200
+***************
+*** 13,20 ****
+ * TODO:
+ * - Adjust text property column and length when text is inserted/deleted.
+ * -> a :substitute with a multi-line match
+- * -> join two lines, also with BS in Insert mode
+ * -> search for changed_bytes() from misc1.c
+ * - Perhaps we only need TP_FLAG_CONT_NEXT and can drop TP_FLAG_CONT_PREV?
+ * - Add an arrray for global_proptypes, to quickly lookup a prop type by ID
+ * - Add an arrray for b_proptypes, to quickly lookup a prop type by ID
+--- 13,20 ----
+ * TODO:
+ * - Adjust text property column and length when text is inserted/deleted.
+ * -> a :substitute with a multi-line match
+ * -> search for changed_bytes() from misc1.c
++ * -> search for mark_col_adjust()
+ * - Perhaps we only need TP_FLAG_CONT_NEXT and can drop TP_FLAG_CONT_PREV?
+ * - Add an arrray for global_proptypes, to quickly lookup a prop type by ID
+ * - Add an arrray for b_proptypes, to quickly lookup a prop type by ID
+***************
+*** 1097,1100 ****
+--- 1097,1205 ----
+ ga_clear(&nextprop);
+ }
+
++ /*
++ * Line "lnum" has been joined and will end up at column "col" in the new line.
++ * "removed" bytes have been removed from the start of the line, properties
++ * there are to be discarded.
++ * Move the adjusted text properties to an allocated string, store it in
++ * "prop_line" and adjust the columns.
++ */
++ void
++ adjust_props_for_join(
++ linenr_T lnum,
++ textprop_T **prop_line,
++ int *prop_length,
++ long col,
++ int removed)
++ {
++ int proplen;
++ char_u *props;
++ int ri;
++ int wi = 0;
++
++ proplen = get_text_props(curbuf, lnum, &props, FALSE);
++ if (proplen > 0)
++ {
++ *prop_line = (textprop_T *)alloc(proplen * (int)sizeof(textprop_T));
++ if (*prop_line != NULL)
++ {
++ for (ri = 0; ri < proplen; ++ri)
++ {
++ textprop_T *cp = *prop_line + wi;
++
++ mch_memmove(cp, props + ri * sizeof(textprop_T),
++ sizeof(textprop_T));
++ if (cp->tp_col + cp->tp_len > removed)
++ {
++ if (cp->tp_col > removed)
++ cp->tp_col += col;
++ else
++ {
++ // property was partly deleted, make it shorter
++ cp->tp_len -= removed - cp->tp_col;
++ cp->tp_col = col;
++ }
++ ++wi;
++ }
++ }
++ }
++ *prop_length = wi;
++ }
++ }
++
++ /*
++ * After joining lines: concatenate the text and the properties of all joined
++ * lines into one line and replace the line.
++ */
++ void
++ join_prop_lines(
++ linenr_T lnum,
++ char_u *newp,
++ textprop_T **prop_lines,
++ int *prop_lengths,
++ int count)
++ {
++ size_t proplen = 0;
++ size_t oldproplen;
++ char_u *props;
++ int i;
++ int len;
++ char_u *line;
++ size_t l;
++
++ for (i = 0; i < count - 1; ++i)
++ proplen += prop_lengths[i];
++ if (proplen == 0)
++ {
++ ml_replace(lnum, newp, FALSE);
++ return;
++ }
++
++ // get existing properties of the joined line
++ oldproplen = get_text_props(curbuf, lnum, &props, FALSE);
++
++ len = (int)STRLEN(newp) + 1;
++ line = alloc(len + (oldproplen + proplen) * (int)sizeof(textprop_T));
++ if (line == NULL)
++ return;
++ mch_memmove(line, newp, len);
++ l = oldproplen * sizeof(textprop_T);
++ mch_memmove(line + len, props, l);
++ len += l;
++
++ for (i = 0; i < count - 1; ++i)
++ if (prop_lines[i] != NULL)
++ {
++ l = prop_lengths[i] * sizeof(textprop_T);
++ mch_memmove(line + len, prop_lines[i], l);
++ len += l;
++ vim_free(prop_lines[i]);
++ }
++
++ ml_replace_len(lnum, line, len, TRUE, FALSE);
++ vim_free(newp);
++ vim_free(prop_lines);
++ vim_free(prop_lengths);
++ }
++
+ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.1340/src/proto/textprop.pro 2019-05-15 22:45:33.956067651 +0200
+--- src/proto/textprop.pro 2019-05-17 16:55:50.965270535 +0200
+***************
+*** 15,18 ****
+--- 15,20 ----
+ void clear_buf_prop_types(buf_T *buf);
+ void adjust_prop_columns(linenr_T lnum, colnr_T col, int bytes_added);
+ void adjust_props_for_split(linenr_T lnum_props, linenr_T lnum_top, int kept, int deleted);
++ void adjust_props_for_join(linenr_T lnum, textprop_T **prop_line, int *prop_length, long col, int removed);
++ void join_prop_lines(linenr_T lnum, char_u *newp, textprop_T **prop_lines, int *prop_lengths, int count);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1340/src/testdir/test_textprop.vim 2019-05-17 13:05:03.795770160 +0200
+--- src/testdir/test_textprop.vim 2019-05-17 19:34:08.751016230 +0200
+***************
+*** 624,629 ****
+--- 624,633 ----
+ \ .. "'Numbér 123 änd thœn 4¾7.',"
+ \ .. "'--aa--bb--cc--dd--',"
+ \ .. "'// comment with error in it',"
++ \ .. "'first line',"
++ \ .. "' second line ',"
++ \ .. "'third line',"
++ \ .. "' fourth line',"
+ \ .. "])",
+ \ "hi NumberProp ctermfg=blue",
+ \ "hi LongProp ctermbg=yellow",
+***************
+*** 645,650 ****
+--- 649,658 ----
+ \ "call prop_add(3, 15, {'length': 2, 'type': 'both'})",
+ \ "call prop_add(4, 12, {'length': 10, 'type': 'background'})",
+ \ "call prop_add(4, 17, {'length': 5, 'type': 'error'})",
++ \ "call prop_add(5, 7, {'length': 4, 'type': 'long'})",
++ \ "call prop_add(6, 1, {'length': 8, 'type': 'long'})",
++ \ "call prop_add(8, 1, {'length': 1, 'type': 'long'})",
++ \ "call prop_add(8, 11, {'length': 4, 'type': 'long'})",
+ \ "set number cursorline",
+ \ "hi clear SpellBad",
+ \ "set spell",
+***************
+*** 652,659 ****
+ \ "hi Comment ctermfg=green",
+ \ "normal 3G0llix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>",
+ \ "normal 3G0lli\<BS>\<Esc>",
+ \], 'XtestProp')
+! let buf = RunVimInTerminal('-S XtestProp', {'rows': 7})
+ call VerifyScreenDump(buf, 'Test_textprop_01', {})
+
+ " clean up
+--- 660,670 ----
+ \ "hi Comment ctermfg=green",
+ \ "normal 3G0llix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>",
+ \ "normal 3G0lli\<BS>\<Esc>",
++ \ "normal 6G0i\<BS>\<Esc>",
++ \ "normal 3J",
++ \ "normal 3G",
+ \], 'XtestProp')
+! let buf = RunVimInTerminal('-S XtestProp', {'rows': 8})
+ call VerifyScreenDump(buf, 'Test_textprop_01', {})
+
+ " clean up
+*** ../vim-8.1.1340/src/testdir/dumps/Test_textprop_01.dump 2019-05-17 13:05:03.795770160 +0200
+--- src/testdir/dumps/Test_textprop_01.dump 2019-05-17 19:34:56.874772440 +0200
+***************
+*** 2,7 ****
+--- 2,8 ----
+ | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| +0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
+ | +0#af5f00255&@1|3| >-+8#0000000#ffff4012|x+8&#ffffff0|a+8#4040ff13&@1|x+8#0000000&|-@1|x+8#4040ff13&|b@1|x+8#0000000&|-@1|x|c+8#4040ff13&@1|x|-+8#0000000&@1|x+8#4040ff13&|d@1|x|-+8#0000000&@1| @45
+ | +0#af5f00255&@1|4| |/+0#40ff4011&@1| |c|o|m@1|e|n|t| |w+0&#e0e0e08|i|t|h| |e+8&&|r@1|o|r| +0&#ffffff0|i|n| |i|t| +0#0000000&@43
++ | +0#af5f00255&@1|5| |f+0#0000000&|i|r|s|t| |l+0&#ffff4012|i|n|e| @1|s|e|c|o|n|d| +0&#ffffff0|l|i|n|e| @1|t|h|i|r|d| |l|i|n|e| |f|o|u|r|t|h| |l+0&#ffff4012|i|n|e| +0&#ffffff0@23
+ |~+0#4040ff13&| @73
+ |~| @73
+ | +0#0000000&@56|3|,|1| @10|A|l@1|
+*** ../vim-8.1.1340/src/version.c 2019-05-17 13:05:03.795770160 +0200
+--- src/version.c 2019-05-17 19:35:36.942569315 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1341,
+ /**/
+
+--
+Lower life forms have more fun!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1342 b/data/vim/patches/8.1.1342
new file mode 100644
index 000000000..b221e9bca
--- /dev/null
+++ b/data/vim/patches/8.1.1342
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1342
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1342
+Problem: Using freed memory when joining line with text property.
+Solution: Use already computed length.
+Files: src/ops.c
+
+
+*** ../vim-8.1.1341/src/ops.c 2019-05-17 19:56:29.860129184 +0200
+--- src/ops.c 2019-05-17 20:15:24.378020917 +0200
+***************
+*** 4635,4641 ****
+ {
+ /* Set the '] mark. */
+ curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
+! curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp);
+ }
+
+ /* Only report the change in the first line here, del_lines() will report
+--- 4635,4641 ----
+ {
+ /* Set the '] mark. */
+ curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
+! curwin->w_buffer->b_op_end.col = (colnr_T)sumsize;
+ }
+
+ /* Only report the change in the first line here, del_lines() will report
+*** ../vim-8.1.1341/src/version.c 2019-05-17 19:56:29.860129184 +0200
+--- src/version.c 2019-05-17 20:16:56.669433301 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1342,
+ /**/
+
+--
+I once paid $12 to peer at the box that held King Tutankhamen's little
+bandage-covered midget corpse at the De Young Museum in San Francisco. I
+remember thinking how pleased he'd be about the way things turned out in his
+afterlife.
+ (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.1343 b/data/vim/patches/8.1.1343
new file mode 100644
index 000000000..9a414caf3
--- /dev/null
+++ b/data/vim/patches/8.1.1343
@@ -0,0 +1,274 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1343
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1343
+Problem: Text properties not adjusted for Visual block mode delete.
+Solution: Call adjust_prop_columns(). (closes #4384)
+Files: src/ops.c, src/textprop.c, src/testdir/test_textprop.vim,
+ src/misc1.c, src/testdir/dumps/Test_textprop_vis_01.dump,
+ src/testdir/dumps/Test_textprop_vis_02.dump
+
+
+*** ../vim-8.1.1342/src/ops.c 2019-05-17 20:17:36.277186167 +0200
+--- src/ops.c 2019-05-17 21:09:38.183335755 +0200
+***************
+*** 1916,1925 ****
+ curwin->w_cursor.coladd = 0;
+ }
+
+! /* n == number of chars deleted
+! * If we delete a TAB, it may be replaced by several characters.
+! * Thus the number of characters may increase!
+! */
+ n = bd.textlen - bd.startspaces - bd.endspaces;
+ oldp = ml_get(lnum);
+ newp = alloc_check((unsigned)STRLEN(oldp) + 1 - n);
+--- 1916,1924 ----
+ curwin->w_cursor.coladd = 0;
+ }
+
+! // "n" == number of chars deleted
+! // If we delete a TAB, it may be replaced by several characters.
+! // Thus the number of characters may increase!
+ n = bd.textlen - bd.startspaces - bd.endspaces;
+ oldp = ml_get(lnum);
+ newp = alloc_check((unsigned)STRLEN(oldp) + 1 - n);
+***************
+*** 1935,1940 ****
+--- 1934,1944 ----
+ STRMOVE(newp + bd.textcol + bd.startspaces + bd.endspaces, oldp);
+ /* replace the line */
+ ml_replace(lnum, newp, FALSE);
++
++ #ifdef FEAT_TEXT_PROP
++ if (curbuf->b_has_textprop && n != 0)
++ adjust_prop_columns(lnum, bd.textcol, -n);
++ #endif
+ }
+
+ check_cursor_col();
+*** ../vim-8.1.1342/src/textprop.c 2019-05-17 19:56:29.860129184 +0200
+--- src/textprop.c 2019-05-17 21:54:59.788551130 +0200
+***************
+*** 957,963 ****
+ * shift by "bytes_added" (can be negative).
+ * Note that "col" is zero-based, while tp_col is one-based.
+ * Only for the current buffer.
+! * Called is expected to check b_has_textprop and "bytes_added" being non-zero.
+ */
+ void
+ adjust_prop_columns(
+--- 957,963 ----
+ * shift by "bytes_added" (can be negative).
+ * Note that "col" is zero-based, while tp_col is one-based.
+ * Only for the current buffer.
+! * Caller is expected to check b_has_textprop and "bytes_added" being non-zero.
+ */
+ void
+ adjust_prop_columns(
+***************
+*** 994,1008 ****
+ ? 2 : 1))
+ : (tmp_prop.tp_col > col + 1))
+ {
+! tmp_prop.tp_col += bytes_added;
+ dirty = TRUE;
+ }
+ else if (tmp_prop.tp_len > 0
+ && tmp_prop.tp_col + tmp_prop.tp_len > col
+ + ((pt != NULL && (pt->pt_flags & PT_FLAG_INS_END_INCL))
+ ? 0 : 1))
+ {
+! tmp_prop.tp_len += bytes_added;
+ dirty = TRUE;
+ if (tmp_prop.tp_len <= 0)
+ continue; // drop this text property
+--- 994,1021 ----
+ ? 2 : 1))
+ : (tmp_prop.tp_col > col + 1))
+ {
+! if (tmp_prop.tp_col + bytes_added < col + 1)
+! {
+! tmp_prop.tp_len += (tmp_prop.tp_col - 1 - col) + bytes_added;
+! tmp_prop.tp_col = col + 1;
+! }
+! else
+! tmp_prop.tp_col += bytes_added;
+ dirty = TRUE;
++ if (tmp_prop.tp_len <= 0)
++ continue; // drop this text property
+ }
+ else if (tmp_prop.tp_len > 0
+ && tmp_prop.tp_col + tmp_prop.tp_len > col
+ + ((pt != NULL && (pt->pt_flags & PT_FLAG_INS_END_INCL))
+ ? 0 : 1))
+ {
+! int after = col - bytes_added
+! - (tmp_prop.tp_col - 1 + tmp_prop.tp_len);
+! if (after > 0)
+! tmp_prop.tp_len += bytes_added + after;
+! else
+! tmp_prop.tp_len += bytes_added;
+ dirty = TRUE;
+ if (tmp_prop.tp_len <= 0)
+ continue; // drop this text property
+*** ../vim-8.1.1342/src/testdir/test_textprop.vim 2019-05-17 19:56:29.860129184 +0200
+--- src/testdir/test_textprop.vim 2019-05-17 22:18:01.264176320 +0200
+***************
+*** 613,619 ****
+ endfunc
+
+ " screenshot test with textprop highlighting
+! funct Test_textprop_screenshots()
+ " The Vim running in the terminal needs to use utf-8.
+ if !CanRunVimInTerminal() || g:orig_encoding != 'utf-8'
+ return
+--- 613,619 ----
+ endfunc
+
+ " screenshot test with textprop highlighting
+! func Test_textprop_screenshot_various()
+ " The Vim running in the terminal needs to use utf-8.
+ if !CanRunVimInTerminal() || g:orig_encoding != 'utf-8'
+ return
+***************
+*** 671,673 ****
+--- 671,722 ----
+ call StopVimInTerminal(buf)
+ call delete('XtestProp')
+ endfunc
++
++ func RunTestVisualBlock(width, dump)
++ call writefile([
++ \ "call setline(1, ["
++ \ .. "'xxxxxxxxx 123 x',"
++ \ .. "'xxxxxxxx 123 x',"
++ \ .. "'xxxxxxx 123 x',"
++ \ .. "'xxxxxx 123 x',"
++ \ .. "'xxxxx 123 x',"
++ \ .. "'xxxx 123 xx',"
++ \ .. "'xxx 123 xxx',"
++ \ .. "'xx 123 xxxx',"
++ \ .. "'x 123 xxxxx',"
++ \ .. "' 123 xxxxxx',"
++ \ .. "])",
++ \ "hi SearchProp ctermbg=yellow",
++ \ "call prop_type_add('search', {'highlight': 'SearchProp'})",
++ \ "call prop_add(1, 11, {'length': 3, 'type': 'search'})",
++ \ "call prop_add(2, 10, {'length': 3, 'type': 'search'})",
++ \ "call prop_add(3, 9, {'length': 3, 'type': 'search'})",
++ \ "call prop_add(4, 8, {'length': 3, 'type': 'search'})",
++ \ "call prop_add(5, 7, {'length': 3, 'type': 'search'})",
++ \ "call prop_add(6, 6, {'length': 3, 'type': 'search'})",
++ \ "call prop_add(7, 5, {'length': 3, 'type': 'search'})",
++ \ "call prop_add(8, 4, {'length': 3, 'type': 'search'})",
++ \ "call prop_add(9, 3, {'length': 3, 'type': 'search'})",
++ \ "call prop_add(10, 2, {'length': 3, 'type': 'search'})",
++ \ "normal 1G6|\<C-V>" .. repeat('l', a:width - 1) .. "10jx",
++ \], 'XtestPropVis')
++ let buf = RunVimInTerminal('-S XtestPropVis', {'rows': 12})
++ call VerifyScreenDump(buf, 'Test_textprop_vis_' .. a:dump, {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XtestPropVis')
++ endfunc
++
++ " screenshot test with Visual block mode operations
++ func Test_textprop_screenshot_visual()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
++ " Delete two columns while text props are three chars wide.
++ call RunTestVisualBlock(2, '01')
++
++ " Same, but delete four columns
++ call RunTestVisualBlock(4, '02')
++ endfunc
+*** ../vim-8.1.1342/src/misc1.c 2019-05-11 17:03:55.166019785 +0200
+--- src/misc1.c 2019-05-17 22:55:55.840537922 +0200
+***************
+*** 434,441 ****
+ saved_cursor.col = (colnr_T)(s - newline);
+ }
+ #ifdef FEAT_TEXT_PROP
+! adjust_prop_columns(curwin->w_cursor.lnum, (colnr_T)(p - oldline),
+! ind_len - (colnr_T)(p - oldline));
+ #endif
+ retval = TRUE;
+ }
+--- 434,448 ----
+ saved_cursor.col = (colnr_T)(s - newline);
+ }
+ #ifdef FEAT_TEXT_PROP
+! {
+! int added = ind_len - (colnr_T)(p - oldline);
+!
+! // When increasing indent this behaves like spaces were inserted at
+! // the old indent, when decreasing indent it behaves like spaces
+! // were deleted at the new indent.
+! adjust_prop_columns(curwin->w_cursor.lnum,
+! (colnr_T)(added > 0 ? (p - oldline) : ind_len), added);
+! }
+ #endif
+ retval = TRUE;
+ }
+*** ../vim-8.1.1342/src/testdir/dumps/Test_textprop_vis_01.dump 2019-05-17 22:56:37.016317697 +0200
+--- src/testdir/dumps/Test_textprop_vis_01.dump 2019-05-17 22:18:08.928132508 +0200
+***************
+*** 0 ****
+--- 1,12 ----
++ |x+0&#ffffff0@4>x@1| |1+0&#ffff4012|2|3| +0&#ffffff0|x| @61
++ |x@5| |1+0&#ffff4012|2|3| +0&#ffffff0|x| @62
++ |x@4| |1+0&#ffff4012|2|3| +0&#ffffff0|x| @63
++ |x@4|1+0&#ffff4012|2|3| +0&#ffffff0|x| @64
++ |x@4|2+0&#ffff4012|3| +0&#ffffff0|x| @65
++ |x@3| |3+0&#ffff4012| +0&#ffffff0|x@1| @65
++ |x@2| |1+0&#ffff4012| +0&#ffffff0|x@2| @65
++ |x@1| |1+0&#ffff4012|2|x+0&#ffffff0@3| @65
++ |x| |1+0&#ffff4012|2|3|x+0&#ffffff0@3| @65
++ @1|1+0&#ffff4012|2|3| +0&#ffffff0|x@3| @65
++ |~+0#4040ff13&| @73
++ | +0#0000000&@56|1|,|6| @10|A|l@1|
+*** ../vim-8.1.1342/src/testdir/dumps/Test_textprop_vis_02.dump 2019-05-17 22:56:37.020317676 +0200
+--- src/testdir/dumps/Test_textprop_vis_02.dump 2019-05-17 22:18:10.028126220 +0200
+***************
+*** 0 ****
+--- 1,12 ----
++ |x+0&#ffffff0@4> |1+0&#ffff4012|2|3| +0&#ffffff0|x| @63
++ |x@4|1+0&#ffff4012|2|3| +0&#ffffff0|x| @64
++ |x@4|2+0&#ffff4012|3| +0&#ffffff0|x| @65
++ |x@4|3+0&#ffff4012| +0&#ffffff0|x| @66
++ |x@4| |x| @67
++ |x@3| |x@1| @67
++ |x@2| |1+0&#ffff4012|x+0&#ffffff0@1| @67
++ |x@1| |1+0&#ffff4012|2|x+0&#ffffff0@1| @67
++ |x| |1+0&#ffff4012|2|3|x+0&#ffffff0@1| @67
++ @1|1+0&#ffff4012|2|3| +0&#ffffff0|x@1| @67
++ |~+0#4040ff13&| @73
++ | +0#0000000&@56|1|,|6| @10|A|l@1|
+*** ../vim-8.1.1342/src/version.c 2019-05-17 20:17:36.277186167 +0200
+--- src/version.c 2019-05-17 22:56:44.572277252 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1343,
+ /**/
+
+--
+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.1344 b/data/vim/patches/8.1.1344
new file mode 100644
index 000000000..0f0e34b95
--- /dev/null
+++ b/data/vim/patches/8.1.1344
@@ -0,0 +1,124 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1344
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1344
+Problem: Coverity complains about possibly using a NULL pointer and copying
+ a string into a fixed size buffer.
+Solution: Check for NULL, even though it should not happen. Use
+ vim_strncpy() instead of strcpy().
+Files: src/change.c, src/memline.c
+
+
+*** ../vim-8.1.1343/src/change.c 2019-05-16 22:11:43.715228803 +0200
+--- src/change.c 2019-05-18 12:57:47.900688848 +0200
+***************
+*** 193,204 ****
+ // can be merged.
+ di = dict_find(li->li_tv.vval.v_dict,
+ (char_u *)"end", -1);
+! nr = tv_get_number(&di->di_tv);
+! if (lnume > nr)
+! di->di_tv.vval.v_number = lnume;
+ di = dict_find(li->li_tv.vval.v_dict,
+ (char_u *)"added", -1);
+! di->di_tv.vval.v_number += xtra;
+ return TRUE;
+ }
+ }
+--- 193,208 ----
+ // can be merged.
+ di = dict_find(li->li_tv.vval.v_dict,
+ (char_u *)"end", -1);
+! if (di != NULL)
+! {
+! nr = tv_get_number(&di->di_tv);
+! if (lnume > nr)
+! di->di_tv.vval.v_number = lnume;
+! }
+ di = dict_find(li->li_tv.vval.v_dict,
+ (char_u *)"added", -1);
+! if (di != NULL)
+! di->di_tv.vval.v_number += xtra;
+ return TRUE;
+ }
+ }
+*** ../vim-8.1.1343/src/memline.c 2019-05-16 22:11:43.715228803 +0200
+--- src/memline.c 2019-05-18 13:00:57.263700482 +0200
+***************
+*** 1874,1880 ****
+ }
+ }
+
+! /* check for out-of-memory */
+ for (i = 0; i < num_names; ++i)
+ {
+ if (names[i] == NULL)
+--- 1874,1880 ----
+ }
+ }
+
+! // check for out-of-memory
+ for (i = 0; i < num_names; ++i)
+ {
+ if (names[i] == NULL)
+***************
+*** 2101,2107 ****
+ # endif
+ /* MSVC returns NULL for an invalid value of seconds. */
+ if (curtime == NULL)
+! STRCPY(buf, _("(Invalid)"));
+ else
+ (void)strftime(buf, sizeof(buf) - 1, "%a %b %d %H:%M:%S %Y", curtime);
+ #else
+--- 2101,2107 ----
+ # endif
+ /* MSVC returns NULL for an invalid value of seconds. */
+ if (curtime == NULL)
+! vim_strncpy((char_u *)buf, (char_u *)_("(Invalid)"), sizeof(buf) - 1);
+ else
+ (void)strftime(buf, sizeof(buf) - 1, "%a %b %d %H:%M:%S %Y", curtime);
+ #else
+***************
+*** 3374,3380 ****
+ if (newline != NULL)
+ {
+ mch_memmove(newline, line, len);
+! mch_memmove(newline + len, curbuf->b_ml.ml_line_ptr + oldtextlen, textproplen);
+ vim_free(line);
+ line = newline;
+ len += (colnr_T)textproplen;
+--- 3374,3381 ----
+ if (newline != NULL)
+ {
+ mch_memmove(newline, line, len);
+! mch_memmove(newline + len, curbuf->b_ml.ml_line_ptr
+! + oldtextlen, textproplen);
+ vim_free(line);
+ line = newline;
+ len += (colnr_T)textproplen;
+*** ../vim-8.1.1343/src/version.c 2019-05-17 22:57:06.940157515 +0200
+--- src/version.c 2019-05-18 13:04:34.158541027 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1344,
+ /**/
+
+--
+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.1345 b/data/vim/patches/8.1.1345
new file mode 100644
index 000000000..23746d0f1
--- /dev/null
+++ b/data/vim/patches/8.1.1345
@@ -0,0 +1,116 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1345
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1345
+Problem: Stuck in sandbox with ":s/../\=Function/gn".
+Solution: Don't skip over code to restore sandbox. (Christian Brabandt)
+Files: src/ex_cmds.c, src/testdir/test_substitute.vim
+
+
+*** ../vim-8.1.1344/src/ex_cmds.c 2019-05-15 22:45:33.956067651 +0200
+--- src/ex_cmds.c 2019-05-18 13:39:18.862210027 +0200
+***************
+*** 5555,5582 ****
+ #ifdef FEAT_EVAL
+ if (subflags.do_count)
+ {
+! /* prevent accidentally changing the buffer by a function */
+! save_ma = curbuf->b_p_ma;
+ curbuf->b_p_ma = FALSE;
+ sandbox++;
+ }
+! /* Save flags for recursion. They can change for e.g.
+! * :s/^/\=execute("s#^##gn") */
+ subflags_save = subflags;
+ #endif
+! /* get length of substitution part */
+ sublen = vim_regsub_multi(&regmatch,
+ sub_firstlnum - regmatch.startpos[0].lnum,
+ sub, sub_firstline, FALSE, p_magic, TRUE);
+ #ifdef FEAT_EVAL
+ // If getting the substitute string caused an error, don't do
+ // the replacement.
+- if (aborting())
+- goto skip;
+-
+ // Don't keep flags set by a recursive call.
+ subflags = subflags_save;
+! if (subflags.do_count)
+ {
+ curbuf->b_p_ma = save_ma;
+ if (sandbox > 0)
+--- 5555,5579 ----
+ #ifdef FEAT_EVAL
+ if (subflags.do_count)
+ {
+! // prevent accidentally changing the buffer by a function
+ curbuf->b_p_ma = FALSE;
+ sandbox++;
+ }
+! // Save flags for recursion. They can change for e.g.
+! // :s/^/\=execute("s#^##gn")
+ subflags_save = subflags;
++ save_ma = curbuf->b_p_ma;
+ #endif
+! // get length of substitution part
+ sublen = vim_regsub_multi(&regmatch,
+ sub_firstlnum - regmatch.startpos[0].lnum,
+ sub, sub_firstline, FALSE, p_magic, TRUE);
+ #ifdef FEAT_EVAL
+ // If getting the substitute string caused an error, don't do
+ // the replacement.
+ // Don't keep flags set by a recursive call.
+ subflags = subflags_save;
+! if (aborting() || subflags.do_count)
+ {
+ curbuf->b_p_ma = save_ma;
+ if (sandbox > 0)
+*** ../vim-8.1.1344/src/testdir/test_substitute.vim 2019-04-27 18:00:29.851064563 +0200
+--- src/testdir/test_substitute.vim 2019-05-18 13:35:12.383650094 +0200
+***************
+*** 638,643 ****
+--- 638,654 ----
+ call assert_equal(1, error_caught)
+ call assert_equal(['1 aaa', '2 aaa', '3 aaa'], getline(1, 3))
+
++ " Same, but using "n" flag so that "sandbox" gets set
++ call setline(1, ['1 aaa', '2 aaa', '3 aaa'])
++ let error_caught = 0
++ try
++ %s/aaa/\=Foo()/gn
++ catch
++ let error_caught = 1
++ endtry
++ call assert_equal(1, error_caught)
++ call assert_equal(['1 aaa', '2 aaa', '3 aaa'], getline(1, 3))
++
+ bwipe!
+ endfunc
+
+*** ../vim-8.1.1344/src/version.c 2019-05-18 13:05:12.470334000 +0200
+--- src/version.c 2019-05-18 13:40:32.629781025 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1345,
+ /**/
+
+--
+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.1346 b/data/vim/patches/8.1.1346
new file mode 100644
index 000000000..4e01e27c6
--- /dev/null
+++ b/data/vim/patches/8.1.1346
@@ -0,0 +1,152 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1346
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1346
+Problem: Error for Python exception does not show useful info.
+Solution: Show the last line instead of the first one. (Ben Jackson,
+ closes #4381)
+Files: src/if_py_both.h, src/testdir/test86.ok, src/testdir/test87.ok,
+ src/testdir/test_python2.vim, src/testdir/test_python3.vim,
+ src/testdir/test_pyx2.vim, src/testdir/test_pyx3.vim
+
+*** ../vim-8.1.1345/src/if_py_both.h 2019-05-09 15:12:45.172723940 +0200
+--- src/if_py_both.h 2019-05-18 14:53:57.777848902 +0200
+***************
+*** 412,417 ****
+--- 412,419 ----
+
+ Py_BEGIN_ALLOW_THREADS
+ Python_Lock_Vim();
++ if (error)
++ emsg_severe = TRUE;
+ writer((writefn)(error ? emsg : msg), (char_u *)str, len);
+ Python_Release_Vim();
+ Py_END_ALLOW_THREADS
+*** ../vim-8.1.1345/src/testdir/test86.ok 2018-08-07 19:45:22.619218432 +0200
+--- src/testdir/test86.ok 2019-05-18 14:42:55.261468186 +0200
+***************
+*** 91,97 ****
+ 0.0
+ "\0": Vim(let):E859:
+ {"\0": 1}: Vim(let):E859:
+! undefined_name: Vim(let):Trace
+ vim: Vim(let):E859:
+ [1]
+ [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
+--- 91,97 ----
+ 0.0
+ "\0": Vim(let):E859:
+ {"\0": 1}: Vim(let):E859:
+! undefined_name: Vim(let):NameE
+ vim: Vim(let):E859:
+ [1]
+ [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
+*** ../vim-8.1.1345/src/testdir/test87.ok 2018-08-07 19:45:22.623218411 +0200
+--- src/testdir/test87.ok 2019-05-18 14:42:55.261468186 +0200
+***************
+*** 91,97 ****
+ 0.0
+ "\0": Vim(let):E859:
+ {"\0": 1}: Vim(let):E859:
+! undefined_name: Vim(let):Trace
+ vim: Vim(let):E859:
+ [1]
+ [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
+--- 91,97 ----
+ 0.0
+ "\0": Vim(let):E859:
+ {"\0": 1}: Vim(let):E859:
+! undefined_name: Vim(let):NameE
+ vim: Vim(let):E859:
+ [1]
+ [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
+*** ../vim-8.1.1345/src/testdir/test_python2.vim 2019-03-30 12:33:07.845473937 +0100
+--- src/testdir/test_python2.vim 2019-05-18 14:42:55.261468186 +0200
+***************
+*** 160,162 ****
+--- 160,170 ----
+
+ bwipe!
+ endfunction
++
++ func Test_Catch_Exception_Message()
++ try
++ py raise RuntimeError( 'TEST' )
++ catch /.*/
++ call assert_match( '^Vim(.*):RuntimeError: TEST$', v:exception )
++ endtry
++ endfunc
+*** ../vim-8.1.1345/src/testdir/test_python3.vim 2019-03-30 12:33:07.845473937 +0100
+--- src/testdir/test_python3.vim 2019-05-18 14:42:55.261468186 +0200
+***************
+*** 160,162 ****
+--- 160,170 ----
+
+ bwipe!
+ endfunction
++
++ func Test_Catch_Exception_Message()
++ try
++ py3 raise RuntimeError( 'TEST' )
++ catch /.*/
++ call assert_match( '^Vim(.*):RuntimeError: TEST$', v:exception )
++ endtry
++ endfunc
+*** ../vim-8.1.1345/src/testdir/test_pyx2.vim 2017-01-28 15:36:57.000000000 +0100
+--- src/testdir/test_pyx2.vim 2019-05-18 14:42:55.261468186 +0200
+***************
+*** 72,74 ****
+--- 72,82 ----
+ call assert_match(s:py3pattern, split(var)[0])
+ endif
+ endfunc
++
++ func Test_Catch_Exception_Message()
++ try
++ pyx raise RuntimeError( 'TEST' )
++ catch /.*/
++ call assert_match( '^Vim(.*):RuntimeError: TEST$', v:exception )
++ endtry
++ endfunc
+*** ../vim-8.1.1345/src/testdir/test_pyx3.vim 2017-01-28 15:36:41.000000000 +0100
+--- src/testdir/test_pyx3.vim 2019-05-18 14:42:55.261468186 +0200
+***************
+*** 72,74 ****
+--- 72,82 ----
+ call assert_match(s:py2pattern, split(var)[0])
+ endif
+ endfunc
++
++ func Test_Catch_Exception_Message()
++ try
++ pyx raise RuntimeError( 'TEST' )
++ catch /.*/
++ call assert_match( '^Vim(.*):RuntimeError: TEST$', v:exception )
++ endtry
++ endfunc
+*** ../vim-8.1.1345/src/version.c 2019-05-18 13:41:19.061511348 +0200
+--- src/version.c 2019-05-18 14:44:49.988846112 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1346,
+ /**/
+
+--
+You can test a person's importance in the organization by asking how much RAM
+his computer has. Anybody who knows the answer to that question is not a
+decision-maker.
+ (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.1347 b/data/vim/patches/8.1.1347
new file mode 100644
index 000000000..8653c526a
--- /dev/null
+++ b/data/vim/patches/8.1.1347
@@ -0,0 +1,122 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1347
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1347 (after 8.1.1327)
+Problem: Fractional scroll position not restored after closing window.
+Solution: Do restore fraction if topline is not one.
+Files: src/window.c, src/testdir/test_window_cmd.vim
+
+
+*** ../vim-8.1.1346/src/window.c 2019-05-12 14:25:26.321244305 +0200
+--- src/window.c 2019-05-18 15:24:40.685277091 +0200
+***************
+*** 5830,5839 ****
+ // Don't change w_topline in any of these cases:
+ // - window height is 0
+ // - 'scrollbind' is set and this isn't the current window
+! // - window height is sufficient to display the whole buffer
+ if (height > 0
+ && (!wp->w_p_scb || wp == curwin)
+! && (height < wp->w_buffer->b_ml.ml_line_count))
+ {
+ /*
+ * Find a value for w_topline that shows the cursor at the same
+--- 5830,5840 ----
+ // Don't change w_topline in any of these cases:
+ // - window height is 0
+ // - 'scrollbind' is set and this isn't the current window
+! // - window height is sufficient to display the whole buffer and first line
+! // is visible.
+ if (height > 0
+ && (!wp->w_p_scb || wp == curwin)
+! && (height < wp->w_buffer->b_ml.ml_line_count || wp->w_topline > 1))
+ {
+ /*
+ * Find a value for w_topline that shows the cursor at the same
+*** ../vim-8.1.1346/src/testdir/test_window_cmd.vim 2019-05-12 14:25:26.321244305 +0200
+--- src/testdir/test_window_cmd.vim 2019-05-18 15:26:19.588659971 +0200
+***************
+*** 745,760 ****
+
+ func Test_split_noscroll()
+ let so_save = &so
+! new
+! only
+!
+! " Make sure windows can hold all content after split.
+! for i in range(1, 20)
+! wincmd +
+! redraw!
+! endfor
+!
+! call setline (1, range(1, 8))
+ normal 100%
+ split
+
+--- 745,752 ----
+
+ func Test_split_noscroll()
+ let so_save = &so
+! enew
+! call setline(1, range(1, 8))
+ normal 100%
+ split
+
+***************
+*** 769,780 ****
+ call assert_equal(1, info1.topline)
+ call assert_equal(1, info2.topline)
+
+! " Restore original state.
+! for i in range(1, 20)
+! wincmd -
+! redraw!
+! endfor
+ only!
+ bwipe!
+ let &so = so_save
+ endfunc
+--- 761,780 ----
+ call assert_equal(1, info1.topline)
+ call assert_equal(1, info2.topline)
+
+! " window that fits all lines by itself, but not when split: closing other
+! " window should restore fraction.
+ only!
++ call setline(1, range(1, &lines - 10))
++ exe &lines / 4
++ let winid1 = win_getid()
++ let info1 = getwininfo(winid1)[0]
++ call assert_equal(1, info1.topline)
++ new
++ redraw
++ close
++ let info1 = getwininfo(winid1)[0]
++ call assert_equal(1, info1.topline)
++
+ bwipe!
+ let &so = so_save
+ endfunc
+*** ../vim-8.1.1346/src/version.c 2019-05-18 15:02:20.970415904 +0200
+--- src/version.c 2019-05-18 15:25:55.980807043 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1347,
+ /**/
+
+--
+If the Universe is constantly expanding, why can't I ever find a parking space?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1348 b/data/vim/patches/8.1.1348
new file mode 100644
index 000000000..38ef52b47
--- /dev/null
+++ b/data/vim/patches/8.1.1348
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1348
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1348
+Problem: Running tests may cause the window to move.
+Solution: Correct the reported window position for the offset with the
+ position after ":winpos". Works around an xterm bug.
+Files: src/testdir/test_edit.vim
+
+
+*** ../vim-8.1.1347/src/testdir/test_edit.vim 2019-04-27 18:00:29.851064563 +0200
+--- src/testdir/test_edit.vim 2019-05-18 16:51:30.495698892 +0200
+***************
+*** 1359,1367 ****
+ return
+ endtry
+
+! " Try to get the Vim window position before setting 'columns'.
+ let winposx = getwinposx()
+ let winposy = getwinposy()
+ let save_columns = &columns
+ " Need at least about 1100 columns to reproduce the problem.
+ set columns=2000
+--- 1359,1384 ----
+ return
+ endtry
+
+! " Try to get the Vim window position before setting 'columns', so that we can
+! " move the window back to where it was.
+ let winposx = getwinposx()
+ let winposy = getwinposy()
++
++ if winposx >= 0 && winposy >= 0 && !has('gui_running')
++ " We did get the window position, but xterm may report the wrong numbers.
++ " Move the window to the reported position and compute any offset.
++ exe 'winpos ' . winposx . ' ' . winposy
++ sleep 100m
++ let x = getwinposx()
++ if x >= 0
++ let winposx += winposx - x
++ endif
++ let y = getwinposy()
++ if y >= 0
++ let winposy += winposy - y
++ endif
++ endif
++
+ let save_columns = &columns
+ " Need at least about 1100 columns to reproduce the problem.
+ set columns=2000
+*** ../vim-8.1.1347/src/version.c 2019-05-18 15:36:06.493897710 +0200
+--- src/version.c 2019-05-18 16:53:03.739139925 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1348,
+ /**/
+
+--
+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.1349 b/data/vim/patches/8.1.1349
new file mode 100644
index 000000000..a0334ce6d
--- /dev/null
+++ b/data/vim/patches/8.1.1349
@@ -0,0 +1,127 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1349
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1349
+Problem: If writing runs into a conversion error the backup file is
+ deleted. (Arseny Nasokin)
+Solution: Don't delete the backup file is the file was overwritten and a
+ conversion error occurred. (Christian Brabandt, closes #4387)
+Files: src/fileio.c, src/testdir/test_writefile.vim
+
+
+*** ../vim-8.1.1348/src/fileio.c 2019-04-28 22:25:03.244480028 +0200
+--- src/fileio.c 2019-05-18 18:39:15.668980172 +0200
+***************
+*** 4985,4994 ****
+ }
+ }
+
+! /*
+! * Remove the backup unless 'backup' option is set
+! */
+! if (!p_bk && backup != NULL && mch_remove(backup) != 0)
+ emsg(_("E207: Can't delete backup file"));
+
+ goto nofail;
+--- 4985,4994 ----
+ }
+ }
+
+! // Remove the backup unless 'backup' option is set or there was a
+! // conversion error.
+! if (!p_bk && backup != NULL && !write_info.bw_conv_error
+! && mch_remove(backup) != 0)
+ emsg(_("E207: Can't delete backup file"));
+
+ goto nofail;
+*** ../vim-8.1.1348/src/testdir/test_writefile.vim 2019-01-29 22:58:02.401136295 +0100
+--- src/testdir/test_writefile.vim 2019-05-18 18:46:39.610661802 +0200
+***************
+*** 36,48 ****
+ if !has('iconv') || has('sun')
+ return
+ endif
+ set nobackup nowritebackup
+ new
+ let contents = ["line one", "line two"]
+ call writefile(contents, 'Xfile')
+ edit Xfile
+ call setline(1, ["first line", "cannot convert \u010b", "third line"])
+! call assert_fails('write ++enc=cp932')
+ call assert_equal(contents, readfile('Xfile'))
+
+ call delete('Xfile')
+--- 36,50 ----
+ if !has('iconv') || has('sun')
+ return
+ endif
++ " Without a backup file the write won't happen if there is a conversion
++ " error.
+ set nobackup nowritebackup
+ new
+ let contents = ["line one", "line two"]
+ call writefile(contents, 'Xfile')
+ edit Xfile
+ call setline(1, ["first line", "cannot convert \u010b", "third line"])
+! call assert_fails('write ++enc=cp932', 'E513:')
+ call assert_equal(contents, readfile('Xfile'))
+
+ call delete('Xfile')
+***************
+*** 50,55 ****
+--- 52,78 ----
+ set backup& writebackup&
+ endfunc
+
++ func Test_writefile_fails_conversion2()
++ if !has('iconv') || has('sun')
++ return
++ endif
++ " With a backup file the write happens even if there is a conversion error,
++ " but then the backup file must remain
++ set nobackup writebackup
++ let contents = ["line one", "line two"]
++ call writefile(contents, 'Xfile_conversion_err')
++ edit Xfile_conversion_err
++ call setline(1, ["first line", "cannot convert \u010b", "third line"])
++ set fileencoding=latin1
++ let output = execute('write')
++ call assert_match('CONVERSION ERROR', output)
++ call assert_equal(contents, readfile('Xfile_conversion_err~'))
++
++ call delete('Xfile_conversion_err')
++ call delete('Xfile_conversion_err~')
++ bwipe!
++ endfunc
++
+ func SetFlag(timer)
+ let g:flag = 1
+ endfunc
+*** ../vim-8.1.1348/src/version.c 2019-05-18 17:22:51.016673960 +0200
+--- src/version.c 2019-05-18 18:48:34.190060199 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1349,
+ /**/
+
+--
+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.1350 b/data/vim/patches/8.1.1350
new file mode 100644
index 000000000..073895a70
--- /dev/null
+++ b/data/vim/patches/8.1.1350
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1350
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1350
+Problem: "W" for wrapping not shown when more than 99 matches.
+Solution: Adjust check for length. (Masato Nishihata, closes #4388)
+Files: src/search.c, src/testdir/test_search_stat.vim
+
+
+*** ../vim-8.1.1349/src/search.c 2019-05-07 21:34:34.129561140 +0200
+--- src/search.c 2019-05-18 19:22:44.982367336 +0200
+***************
+*** 5012,5018 ****
+ }
+
+ len = STRLEN(t);
+! if (show_top_bot_msg && len + 3 < SEARCH_STAT_BUF_LEN)
+ {
+ STRCPY(t + len, " W");
+ len += 2;
+--- 5012,5018 ----
+ }
+
+ len = STRLEN(t);
+! if (show_top_bot_msg && len + 2 < SEARCH_STAT_BUF_LEN)
+ {
+ STRCPY(t + len, " W");
+ len += 2;
+*** ../vim-8.1.1349/src/testdir/test_search_stat.vim 2019-05-07 21:29:08.427331900 +0200
+--- src/testdir/test_search_stat.vim 2019-05-18 19:22:44.982367336 +0200
+***************
+*** 40,51 ****
+--- 40,59 ----
+ let g:a = execute(':unsilent :norm! n')
+ let stat = '\[>99/>99\]'
+ call assert_match(pat .. stat, g:a)
++ call cursor(line('$'), 1)
++ let g:a = execute(':unsilent :norm! n')
++ let stat = '\[1/>99\] W'
++ call assert_match(pat .. stat, g:a)
+
+ " 5) Many matches
+ call cursor(1, 1)
+ let g:a = execute(':unsilent :norm! n')
+ let stat = '\[2/>99\]'
+ call assert_match(pat .. stat, g:a)
++ call cursor(1, 1)
++ let g:a = execute(':unsilent :norm! N')
++ let stat = '\[>99/>99\] W'
++ call assert_match(pat .. stat, g:a)
+
+ " 6) right-left
+ if exists("+rightleft")
+*** ../vim-8.1.1349/src/version.c 2019-05-18 18:52:01.040972255 +0200
+--- src/version.c 2019-05-18 19:24:44.485709184 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1350,
+ /**/
+
+--
+For humans, honesty is a matter of degree. Engineers are always honest in
+matters of technology and human relationships. That's why it's a good idea
+to keep engineers away from customers, romantic interests, and other people
+who can't handle the truth.
+ (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.1351 b/data/vim/patches/8.1.1351
new file mode 100644
index 000000000..54d013f62
--- /dev/null
+++ b/data/vim/patches/8.1.1351
@@ -0,0 +1,290 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1351
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1351
+Problem: Text property wrong after :substitute.
+Solution: Save for undo before changing any text properties.
+Files: src/testdir/test_textprop.vim, src/ex_cmds.c, src/textprop.c,
+ src/proto/textprop.pro, src/change.c, src/edit.c, src/misc1.c,
+ src/ops.c
+
+
+*** ../vim-8.1.1350/src/testdir/test_textprop.vim 2019-05-17 22:57:06.940157515 +0200
+--- src/testdir/test_textprop.vim 2019-05-19 15:19:17.664637351 +0200
+***************
+*** 608,613 ****
+--- 608,626 ----
+ let expected[0].length = 2
+ call assert_equal(expected, prop_list(1))
+
++ " substitute a word, then undo
++ call setline(1, 'the number 123 is highlighted.')
++ call prop_add(1, 12, {'length': 3, 'type': 'comment'})
++ let expected = [{'col': 12, 'length': 3, 'id': 0, 'type': 'comment', 'start': 1, 'end': 1} ]
++ call assert_equal(expected, prop_list(1))
++ set ul&
++ 1s/number/foo
++ let expected[0].col = 9
++ call assert_equal(expected, prop_list(1))
++ undo
++ let expected[0].col = 12
++ call assert_equal(expected, prop_list(1))
++
+ bwipe!
+ call prop_type_delete('comment')
+ endfunc
+*** ../vim-8.1.1350/src/ex_cmds.c 2019-05-18 13:41:19.061511348 +0200
+--- src/ex_cmds.c 2019-05-19 15:17:33.473187669 +0200
+***************
+*** 5187,5192 ****
+--- 5187,5195 ----
+ int do_again; /* do it again after joining lines */
+ int skip_match = FALSE;
+ linenr_T sub_firstlnum; /* nr of first sub line */
++ #ifdef FEAT_TEXT_PROP
++ int save_for_undo = TRUE;
++ #endif
+
+ /*
+ * The new text is build up step by step, to avoid too much
+***************
+*** 5603,5611 ****
+ p1 = sub_firstline;
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop)
+! adjust_prop_columns(lnum, regmatch.startpos[0].col,
+ sublen - 1 - (regmatch.endpos[0].col
+! - regmatch.startpos[0].col));
+ #endif
+ }
+ else
+--- 5606,5619 ----
+ p1 = sub_firstline;
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop)
+! {
+! // When text properties are changed, need to save for
+! // undo first, unless done already.
+! if (adjust_prop_columns(lnum, regmatch.startpos[0].col,
+ sublen - 1 - (regmatch.endpos[0].col
+! - regmatch.startpos[0].col), save_for_undo))
+! save_for_undo = FALSE;
+! }
+ #endif
+ }
+ else
+*** ../vim-8.1.1350/src/textprop.c 2019-05-17 22:57:06.940157515 +0200
+--- src/textprop.c 2019-05-19 15:17:47.801112248 +0200
+***************
+*** 957,969 ****
+ * shift by "bytes_added" (can be negative).
+ * Note that "col" is zero-based, while tp_col is one-based.
+ * Only for the current buffer.
+ * Caller is expected to check b_has_textprop and "bytes_added" being non-zero.
+ */
+! void
+ adjust_prop_columns(
+ linenr_T lnum,
+ colnr_T col,
+! int bytes_added)
+ {
+ int proplen;
+ char_u *props;
+--- 957,973 ----
+ * shift by "bytes_added" (can be negative).
+ * Note that "col" is zero-based, while tp_col is one-based.
+ * Only for the current buffer.
++ * When "save_for_undo" is TRUE then call u_savesub() before making changes to
++ * the line.
+ * Caller is expected to check b_has_textprop and "bytes_added" being non-zero.
++ * Returns TRUE when props were changed.
+ */
+! int
+ adjust_prop_columns(
+ linenr_T lnum,
+ colnr_T col,
+! int bytes_added,
+! int save_for_undo)
+ {
+ int proplen;
+ char_u *props;
+***************
+*** 974,984 ****
+ size_t textlen;
+
+ if (text_prop_frozen > 0)
+! return;
+
+ proplen = get_text_props(curbuf, lnum, &props, TRUE);
+ if (proplen == 0)
+! return;
+ textlen = curbuf->b_ml.ml_line_len - proplen * sizeof(textprop_T);
+
+ wi = 0; // write index
+--- 978,988 ----
+ size_t textlen;
+
+ if (text_prop_frozen > 0)
+! return FALSE;
+
+ proplen = get_text_props(curbuf, lnum, &props, TRUE);
+ if (proplen == 0)
+! return FALSE;
+ textlen = curbuf->b_ml.ml_line_len - proplen * sizeof(textprop_T);
+
+ wi = 0; // write index
+***************
+*** 1001,1006 ****
+--- 1005,1013 ----
+ }
+ else
+ tmp_prop.tp_col += bytes_added;
++ // Save for undo if requested and not done yet.
++ if (save_for_undo && !dirty)
++ u_savesub(lnum);
+ dirty = TRUE;
+ if (tmp_prop.tp_len <= 0)
+ continue; // drop this text property
+***************
+*** 1016,1021 ****
+--- 1023,1031 ----
+ tmp_prop.tp_len += bytes_added + after;
+ else
+ tmp_prop.tp_len += bytes_added;
++ // Save for undo if requested and not done yet.
++ if (save_for_undo && !dirty)
++ u_savesub(lnum);
+ dirty = TRUE;
+ if (tmp_prop.tp_len <= 0)
+ continue; // drop this text property
+***************
+*** 1034,1039 ****
+--- 1044,1050 ----
+ curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
+ curbuf->b_ml.ml_line_len = newlen;
+ }
++ return dirty;
+ }
+
+ /*
+*** ../vim-8.1.1350/src/proto/textprop.pro 2019-05-17 19:56:29.860129184 +0200
+--- src/proto/textprop.pro 2019-05-19 15:17:07.805322576 +0200
+***************
+*** 13,19 ****
+ 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);
+! void adjust_prop_columns(linenr_T lnum, colnr_T col, int bytes_added);
+ void adjust_props_for_split(linenr_T lnum_props, linenr_T lnum_top, int kept, int deleted);
+ void adjust_props_for_join(linenr_T lnum, textprop_T **prop_line, int *prop_length, long col, int removed);
+ void join_prop_lines(linenr_T lnum, char_u *newp, textprop_T **prop_lines, int *prop_lengths, int count);
+--- 13,19 ----
+ 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);
+! int adjust_prop_columns(linenr_T lnum, colnr_T col, int bytes_added, int save_for_undo);
+ void adjust_props_for_split(linenr_T lnum_props, linenr_T lnum_top, int kept, int deleted);
+ void adjust_props_for_join(linenr_T lnum, textprop_T **prop_line, int *prop_length, long col, int removed);
+ void join_prop_lines(linenr_T lnum, char_u *newp, textprop_T **prop_lines, int *prop_lengths, int count);
+*** ../vim-8.1.1350/src/change.c 2019-05-18 13:05:12.466334021 +0200
+--- src/change.c 2019-05-19 14:50:37.532114947 +0200
+***************
+*** 684,690 ****
+ {
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop && added != 0)
+! adjust_prop_columns(lnum, col, added);
+ #endif
+
+ changed_bytes(lnum, col);
+--- 684,690 ----
+ {
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop && added != 0)
+! adjust_prop_columns(lnum, col, added, FALSE);
+ #endif
+
+ changed_bytes(lnum, col);
+*** ../vim-8.1.1350/src/edit.c 2019-04-21 00:00:07.942354840 +0200
+--- src/edit.c 2019-05-19 14:51:07.307932485 +0200
+***************
+*** 4104,4110 ****
+
+ --text_prop_frozen;
+ adjust_prop_columns(curwin->w_cursor.lnum, curwin->w_cursor.col,
+! (int)(len_now - len_before));
+ }
+ #endif
+ }
+--- 4104,4110 ----
+
+ --text_prop_frozen;
+ adjust_prop_columns(curwin->w_cursor.lnum, curwin->w_cursor.col,
+! (int)(len_now - len_before), FALSE);
+ }
+ #endif
+ }
+*** ../vim-8.1.1350/src/misc1.c 2019-05-17 22:57:06.940157515 +0200
+--- src/misc1.c 2019-05-19 14:51:29.623795732 +0200
+***************
+*** 441,447 ****
+ // the old indent, when decreasing indent it behaves like spaces
+ // were deleted at the new indent.
+ adjust_prop_columns(curwin->w_cursor.lnum,
+! (colnr_T)(added > 0 ? (p - oldline) : ind_len), added);
+ }
+ #endif
+ retval = TRUE;
+--- 441,447 ----
+ // the old indent, when decreasing indent it behaves like spaces
+ // were deleted at the new indent.
+ adjust_prop_columns(curwin->w_cursor.lnum,
+! (colnr_T)(added > 0 ? (p - oldline) : ind_len), added, FALSE);
+ }
+ #endif
+ retval = TRUE;
+*** ../vim-8.1.1350/src/ops.c 2019-05-17 22:57:06.940157515 +0200
+--- src/ops.c 2019-05-19 14:51:44.647703653 +0200
+***************
+*** 1937,1943 ****
+
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop && n != 0)
+! adjust_prop_columns(lnum, bd.textcol, -n);
+ #endif
+ }
+
+--- 1937,1943 ----
+
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop && n != 0)
+! adjust_prop_columns(lnum, bd.textcol, -n, FALSE);
+ #endif
+ }
+
+*** ../vim-8.1.1350/src/version.c 2019-05-18 19:26:25.977151440 +0200
+--- src/version.c 2019-05-19 15:18:28.072899820 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1351,
+ /**/
+
+--
+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.1352 b/data/vim/patches/8.1.1352
new file mode 100644
index 000000000..530459951
--- /dev/null
+++ b/data/vim/patches/8.1.1352
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1352
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1352
+Problem: Undofile() reports wrong name. (Francisco Giordano)
+Solution: Clean up the name before changing path separators. (closes #4392,
+ closes #4394)
+Files: src/evalfunc.c, src/testdir/test_undo.vim
+
+
+*** ../vim-8.1.1351/src/evalfunc.c 2019-05-16 20:29:40.799834279 +0200
+--- src/evalfunc.c 2019-05-19 15:25:48.998541324 +0200
+***************
+*** 15128,15134 ****
+ }
+ else
+ {
+! char_u *ffname = FullName_save(fname, FALSE);
+
+ if (ffname != NULL)
+ rettv->vval.v_string = u_get_undo_file_name(ffname, FALSE);
+--- 15128,15134 ----
+ }
+ else
+ {
+! char_u *ffname = FullName_save(fname, TRUE);
+
+ if (ffname != NULL)
+ rettv->vval.v_string = u_get_undo_file_name(ffname, FALSE);
+*** ../vim-8.1.1351/src/testdir/test_undo.vim 2018-12-14 15:48:44.259178570 +0100
+--- src/testdir/test_undo.vim 2019-05-19 15:24:54.666834346 +0200
+***************
+*** 440,444 ****
+--- 440,449 ----
+ " Test undofile() with 'undodir' set to a non-existing directory.
+ call assert_equal('', undofile('Xundofoo'))
+
++ if isdirectory('/tmp')
++ set undodir=/tmp
++ call assert_equal('/tmp/%tmp%file', undofile('///tmp/file'))
++ endif
++
+ set undodir&
+ endfunc
+*** ../vim-8.1.1351/src/version.c 2019-05-19 15:19:53.824445415 +0200
+--- src/version.c 2019-05-19 15:26:56.666177156 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1352,
+ /**/
+
+--
+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 ///
diff --git a/data/vim/patches/8.1.1353 b/data/vim/patches/8.1.1353
new file mode 100644
index 000000000..32f5afcd2
--- /dev/null
+++ b/data/vim/patches/8.1.1353
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1353
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1353 (after 8.1.1352)
+Problem: Undo test fails on Mac.
+Solution: Expect "private" on the Mac.
+Files: src/testdir/test_undo.vim
+
+
+*** ../vim-8.1.1352/src/testdir/test_undo.vim 2019-05-19 15:27:09.394109547 +0200
+--- src/testdir/test_undo.vim 2019-05-19 16:37:11.807012538 +0200
+***************
+*** 442,448 ****
+
+ if isdirectory('/tmp')
+ set undodir=/tmp
+! call assert_equal('/tmp/%tmp%file', undofile('///tmp/file'))
+ endif
+
+ set undodir&
+--- 442,452 ----
+
+ if isdirectory('/tmp')
+ set undodir=/tmp
+! if has('osx')
+! call assert_equal('/tmp/%private%tmp%file', undofile('///tmp/file'))
+! else
+! call assert_equal('/tmp/%tmp%file', undofile('///tmp/file'))
+! endif
+ endif
+
+ set undodir&
+*** ../vim-8.1.1352/src/version.c 2019-05-19 15:27:09.394109547 +0200
+--- src/version.c 2019-05-19 16:37:53.982724490 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1353,
+ /**/
+
+--
+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.1354 b/data/vim/patches/8.1.1354
new file mode 100644
index 000000000..4ee3682ba
--- /dev/null
+++ b/data/vim/patches/8.1.1354
@@ -0,0 +1,275 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1354
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1354
+Problem: Getting a list of text lines is clumsy.
+Solution: Add the =<< assignment. (Yegappan Lakshmanan, closes #4386)
+Files: runtime/doc/eval.txt, src/eval.c, src/testdir/test_let.vim
+
+
+*** ../vim-8.1.1353/runtime/doc/eval.txt 2019-05-16 20:29:40.799834279 +0200
+--- runtime/doc/eval.txt 2019-05-19 18:32:00.400895195 +0200
+***************
+*** 11416,11421 ****
+--- 11416,11459 ----
+ Like above, but append/add/subtract the value for each
+ |List| item.
+
++ *:let=<<* *:let-heredoc* *E990* *E991*
++ :let {var-name} =<< [trim] {marker}
++ text...
++ text...
++ {marker}
++ Set internal variable {var-name} to a List containing
++ the lines of text bounded by the string {marker}.
++ {marker} must not contain white space.
++ The last line should end only with the {marker} string
++ without any other character. Watch out for white
++ space after {marker}!
++ If {marker} is not supplied, then "." is used as the
++ default marker.
++
++ Any white space characters in the lines of text are
++ preserved. If "trim" is specified before {marker},
++ then all the leading indentation exactly matching the
++ leading indentation before `let` is stripped from the
++ input lines and the line containing {marker}. Note
++ that the difference between space and tab matters
++ here.
++
++ If {var-name} didn't exist yet, it is created.
++ Cannot be followed by another command, but can be
++ followed by a comment.
++
++ Examples: >
++ let var1 =<< END
++ Sample text 1
++ Sample text 2
++ Sample text 3
++ END
++
++ let data =<< trim DATA
++ 1 2 3 4
++ 5 6 7 8
++ DATA
++ <
+ *E121*
+ :let {var-name} .. List the value of variable {var-name}. Multiple
+ variable names may be given. Special names recognized
+*** ../vim-8.1.1353/src/eval.c 2019-05-11 18:28:41.351611622 +0200
+--- src/eval.c 2019-05-19 18:31:49.948943991 +0200
+***************
+*** 1225,1230 ****
+--- 1225,1326 ----
+ #endif
+
+ /*
++ * Get a list of lines from a HERE document. The here document is a list of
++ * lines surrounded by a marker.
++ * cmd << {marker}
++ * {line1}
++ * {line2}
++ * ....
++ * {marker}
++ *
++ * The {marker} is a string. If the optional 'trim' word is supplied before the
++ * marker, then the leading indentation before the lines (matching the
++ * indentation in the 'cmd' line) is stripped.
++ * Returns a List with {lines} or NULL.
++ */
++ static list_T *
++ heredoc_get(exarg_T *eap, char_u *cmd)
++ {
++ char_u *theline;
++ char_u *marker;
++ list_T *l;
++ char_u *p;
++ int indent_len = 0;
++
++ if (eap->getline == NULL)
++ {
++ emsg(_("E991: cannot use =<< here"));
++ return NULL;
++ }
++
++ // Check for the optional 'trim' word before the marker
++ cmd = skipwhite(cmd);
++ if (STRNCMP(cmd, "trim", 4) == 0 && (cmd[4] == NUL || VIM_ISWHITE(cmd[4])))
++ {
++ cmd = skipwhite(cmd + 4);
++
++ // Trim the indentation from all the lines in the here document
++ // The amount of indentation trimmed is the same as the indentation of
++ // the :let command line.
++ p = *eap->cmdlinep;
++ while (VIM_ISWHITE(*p))
++ {
++ p++;
++ indent_len++;
++ }
++ }
++
++ // The marker is the next word. Default marker is "."
++ if (*cmd != NUL && *cmd != '"')
++ {
++ marker = skipwhite(cmd);
++ p = skiptowhite(marker);
++ if (*skipwhite(p) != NUL && *skipwhite(p) != '"')
++ {
++ emsg(_(e_trailing));
++ return NULL;
++ }
++ *p = NUL;
++ }
++ else
++ marker = (char_u *)".";
++
++ l = list_alloc();
++ if (l == NULL)
++ return NULL;
++
++ for (;;)
++ {
++ int i = 0;
++
++ theline = eap->getline(NUL, eap->cookie, 0);
++ if (theline != NULL && indent_len > 0)
++ {
++ // trim the indent matching the first line
++ if (STRNCMP(theline, *eap->cmdlinep, indent_len) == 0)
++ i = indent_len;
++ }
++
++ if (theline == NULL)
++ {
++ semsg(_("E990: Missing end marker '%s'"), marker);
++ break;
++ }
++ if (STRCMP(marker, theline + i) == 0)
++ {
++ vim_free(theline);
++ break;
++ }
++
++ if (list_append_string(l, theline + i, -1) == FAIL)
++ break;
++ vim_free(theline);
++ }
++
++ return l;
++ }
++
++ /*
+ * ":let" list all variable values
+ * ":let var1 var2" list variable values
+ * ":let var = expr" assignment command.
+***************
+*** 1286,1291 ****
+--- 1382,1403 ----
+ }
+ eap->nextcmd = check_nextcmd(arg);
+ }
++ else if (expr[0] == '=' && expr[1] == '<' && expr[2] == '<')
++ {
++ list_T *l;
++
++ // HERE document
++ l = heredoc_get(eap, expr + 3);
++ if (l != NULL)
++ {
++ rettv_list_set(&rettv, l);
++ op[0] = '=';
++ op[1] = NUL;
++ (void)ex_let_vars(eap->arg, &rettv, FALSE, semicolon, var_count,
++ op);
++ clear_tv(&rettv);
++ }
++ }
+ else
+ {
+ op[0] = '=';
+*** ../vim-8.1.1353/src/testdir/test_let.vim 2019-03-30 20:11:45.749471761 +0100
+--- src/testdir/test_let.vim 2019-05-19 18:34:28.132194698 +0200
+***************
+*** 151,153 ****
+--- 151,207 ----
+ let $a = 'ĀĒĪŌŪあいうえお'
+ call assert_equal('ĀĒĪŌŪあいうえお', $a)
+ endfunc
++
++ " Test for the setting a variable using the heredoc syntax
++ func Test_let_heredoc()
++ let var1 =<< END
++ Some sample text
++ Text with indent
++ !@#$%^&*()-+_={}|[]\~`:";'<>?,./
++ END
++
++ call assert_equal(["Some sample text", "\tText with indent", " !@#$%^&*()-+_={}|[]\\~`:\";'<>?,./"], var1)
++
++ let var2 =<<
++ Editor
++ .
++ call assert_equal(['Editor'], var2)
++
++ let var3 =<<END
++ END
++ call assert_equal([], var3)
++
++ let var3 =<<END
++ vim
++
++ end
++ END
++ END
++ END
++ call assert_equal(['vim', '', 'end', ' END', 'END '], var3)
++
++ let var1 =<< trim END
++ Line1
++ Line2
++ Line3
++ END
++ END
++ call assert_equal(['Line1', ' Line2', "\tLine3", ' END'], var1)
++
++ let var1 =<< trim
++ Line1
++ .
++ call assert_equal([' Line1'], var1)
++
++ call assert_fails('let v =<< marker', 'E991:')
++ call assert_fails('call WrongSyntax()', 'E488:')
++ call assert_fails('call MissingEnd()', 'E990:')
++ endfunc
++
++ func WrongSyntax()
++ let fail =<< that there
++ endfunc
++
++ func MissingEnd()
++ let fail =<< END
++ endfunc
+*** ../vim-8.1.1353/src/version.c 2019-05-19 16:38:53.034327682 +0200
+--- src/version.c 2019-05-19 17:34:18.127908356 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1354,
+ /**/
+
+--
+Imagine a world without hypothetical situations.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1355 b/data/vim/patches/8.1.1355
new file mode 100644
index 000000000..282277597
--- /dev/null
+++ b/data/vim/patches/8.1.1355
@@ -0,0 +1,460 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1355
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1355
+Problem: Obvious mistakes are accepted as valid expressions.
+Solution: Be more strict about parsing numbers. (Yasuhiro Matsumoto,
+ closes #3981)
+Files: src/charset.c, src/eval.c, src/evalfunc.c, src/ex_cmds.c,
+ src/ex_getln.c, src/json.c, src/misc2.c, src/ops.c, src/option.c,
+ src/proto/charset.pro, src/testdir/test_expr.vim,
+ src/testdir/test_json.vim
+
+
+*** ../vim-8.1.1354/src/charset.c 2019-03-21 21:45:30.883282076 +0100
+--- src/charset.c 2019-05-19 19:02:56.822368539 +0200
+***************
+*** 1776,1800 ****
+ * If "what" contains STR2NR_HEX recognize hex numbers
+ * If "what" contains STR2NR_FORCE always assume bin/oct/hex.
+ * If maxlen > 0, check at a maximum maxlen chars.
+ */
+ void
+ vim_str2nr(
+ char_u *start,
+! int *prep, /* return: type of number 0 = decimal, 'x'
+! or 'X' is hex, '0' = octal, 'b' or 'B'
+! is bin */
+! int *len, /* return: detected length of number */
+! int what, /* what numbers to recognize */
+! varnumber_T *nptr, /* return: signed result */
+! uvarnumber_T *unptr, /* return: unsigned result */
+! int maxlen) /* max length of string to check */
+ {
+ char_u *ptr = start;
+! int pre = 0; /* default is decimal */
+ int negative = FALSE;
+ uvarnumber_T un = 0;
+ int n;
+
+ if (ptr[0] == '-')
+ {
+ negative = TRUE;
+--- 1776,1805 ----
+ * If "what" contains STR2NR_HEX recognize hex numbers
+ * If "what" contains STR2NR_FORCE always assume bin/oct/hex.
+ * If maxlen > 0, check at a maximum maxlen chars.
++ * If strict is TRUE, check the number strictly. return *len = 0 if fail.
+ */
+ void
+ vim_str2nr(
+ char_u *start,
+! int *prep, // return: type of number 0 = decimal, 'x'
+! // or 'X' is hex, '0' = octal, 'b' or 'B'
+! // is bin
+! int *len, // return: detected length of number
+! int what, // what numbers to recognize
+! varnumber_T *nptr, // return: signed result
+! uvarnumber_T *unptr, // return: unsigned result
+! int maxlen, // max length of string to check
+! int strict) // check strictly
+ {
+ char_u *ptr = start;
+! int pre = 0; // default is decimal
+ int negative = FALSE;
+ uvarnumber_T un = 0;
+ int n;
+
++ if (len != NULL)
++ *len = 0;
++
+ if (ptr[0] == '-')
+ {
+ negative = TRUE;
+***************
+*** 1836,1844 ****
+ }
+ }
+
+! /*
+! * Do the string-to-numeric conversion "manually" to avoid sscanf quirks.
+! */
+ n = 1;
+ if (pre == 'B' || pre == 'b' || what == STR2NR_BIN + STR2NR_FORCE)
+ {
+--- 1841,1847 ----
+ }
+ }
+
+! // Do the conversion manually to avoid sscanf() quirks.
+ n = 1;
+ if (pre == 'B' || pre == 'b' || what == STR2NR_BIN + STR2NR_FORCE)
+ {
+***************
+*** 1907,1912 ****
+--- 1910,1919 ----
+ break;
+ }
+ }
++ // Check for an alpha-numeric character immediately following, that is
++ // most likely a typo.
++ if (strict && n - 1 != maxlen && ASCII_ISALNUM(*ptr))
++ return;
+
+ if (prep != NULL)
+ *prep = pre;
+*** ../vim-8.1.1354/src/eval.c 2019-05-19 18:41:23.262148495 +0200
+--- src/eval.c 2019-05-19 18:53:32.114127645 +0200
+***************
+*** 4453,4459 ****
+ else
+ {
+ // decimal, hex or octal number
+! vim_str2nr(*arg, NULL, &len, STR2NR_ALL, &n, NULL, 0);
+ *arg += len;
+ if (evaluate)
+ {
+--- 4453,4465 ----
+ else
+ {
+ // decimal, hex or octal number
+! vim_str2nr(*arg, NULL, &len, STR2NR_ALL, &n, NULL, 0, TRUE);
+! if (len == 0)
+! {
+! semsg(_(e_invexpr2), *arg);
+! ret = FAIL;
+! break;
+! }
+ *arg += len;
+ if (evaluate)
+ {
+***************
+*** 7460,7466 ****
+ case VAR_STRING:
+ if (varp->vval.v_string != NULL)
+ vim_str2nr(varp->vval.v_string, NULL, NULL,
+! STR2NR_ALL, &n, NULL, 0);
+ return n;
+ case VAR_LIST:
+ emsg(_("E745: Using a List as a Number"));
+--- 7466,7472 ----
+ case VAR_STRING:
+ if (varp->vval.v_string != NULL)
+ vim_str2nr(varp->vval.v_string, NULL, NULL,
+! STR2NR_ALL, &n, NULL, 0, FALSE);
+ return n;
+ case VAR_LIST:
+ emsg(_("E745: Using a List as a Number"));
+*** ../vim-8.1.1354/src/evalfunc.c 2019-05-19 15:27:09.394109547 +0200
+--- src/evalfunc.c 2019-05-19 18:53:32.118127617 +0200
+***************
+*** 13199,13205 ****
+ case 16: what = STR2NR_HEX + STR2NR_FORCE; break;
+ default: what = 0;
+ }
+! vim_str2nr(p, NULL, NULL, what, &n, NULL, 0);
+ if (isneg)
+ rettv->vval.v_number = -n;
+ else
+--- 13199,13206 ----
+ case 16: what = STR2NR_HEX + STR2NR_FORCE; break;
+ default: what = 0;
+ }
+! vim_str2nr(p, NULL, NULL, what, &n, NULL, 0, FALSE);
+! // Text after the number is silently ignored.
+ if (isneg)
+ rettv->vval.v_number = -n;
+ else
+*** ../vim-8.1.1354/src/ex_cmds.c 2019-05-19 15:19:53.820445439 +0200
+--- src/ex_cmds.c 2019-05-19 18:53:32.118127617 +0200
+***************
+*** 558,564 ****
+ {
+ nrs[lnum - eap->line1].st_u.num.is_number = TRUE;
+ vim_str2nr(s, NULL, NULL, sort_what,
+! &nrs[lnum - eap->line1].st_u.num.value, NULL, 0);
+ }
+ }
+ #ifdef FEAT_FLOAT
+--- 558,565 ----
+ {
+ nrs[lnum - eap->line1].st_u.num.is_number = TRUE;
+ vim_str2nr(s, NULL, NULL, sort_what,
+! &nrs[lnum - eap->line1].st_u.num.value,
+! NULL, 0, FALSE);
+ }
+ }
+ #ifdef FEAT_FLOAT
+*** ../vim-8.1.1354/src/ex_getln.c 2019-05-09 15:12:45.168723969 +0200
+--- src/ex_getln.c 2019-05-19 18:53:32.118127617 +0200
+***************
+*** 6470,6476 ****
+ *str = skipwhite(*str);
+ if (**str == '-' || vim_isdigit(**str)) /* parse "from" part of range */
+ {
+! vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0);
+ *str += len;
+ *num1 = (int)num;
+ first = TRUE;
+--- 6470,6476 ----
+ *str = skipwhite(*str);
+ if (**str == '-' || vim_isdigit(**str)) /* parse "from" part of range */
+ {
+! vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0, FALSE);
+ *str += len;
+ *num1 = (int)num;
+ first = TRUE;
+***************
+*** 6479,6485 ****
+ if (**str == ',') /* parse "to" part of range */
+ {
+ *str = skipwhite(*str + 1);
+! vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0);
+ if (len > 0)
+ {
+ *num2 = (int)num;
+--- 6479,6485 ----
+ if (**str == ',') /* parse "to" part of range */
+ {
+ *str = skipwhite(*str + 1);
+! vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0, FALSE);
+ if (len > 0)
+ {
+ *num2 = (int)num;
+*** ../vim-8.1.1354/src/json.c 2019-04-12 21:19:01.265386241 +0200
+--- src/json.c 2019-05-19 18:53:32.118127617 +0200
+***************
+*** 452,458 ****
+ nr = 0;
+ len = 0;
+ vim_str2nr(p + 2, NULL, &len,
+! STR2NR_HEX + STR2NR_FORCE, &nr, NULL, 4);
+ p += len + 2;
+ if (0xd800 <= nr && nr <= 0xdfff
+ && (int)(reader->js_end - p) >= 6
+--- 452,463 ----
+ nr = 0;
+ len = 0;
+ vim_str2nr(p + 2, NULL, &len,
+! STR2NR_HEX + STR2NR_FORCE, &nr, NULL, 4, TRUE);
+! if (len == 0)
+! {
+! ga_clear(&ga);
+! return FAIL;
+! }
+ p += len + 2;
+ if (0xd800 <= nr && nr <= 0xdfff
+ && (int)(reader->js_end - p) >= 6
+***************
+*** 463,469 ****
+ /* decode surrogate pair: \ud812\u3456 */
+ len = 0;
+ vim_str2nr(p + 2, NULL, &len,
+! STR2NR_HEX + STR2NR_FORCE, &nr2, NULL, 4);
+ if (0xdc00 <= nr2 && nr2 <= 0xdfff)
+ {
+ p += len + 2;
+--- 468,479 ----
+ /* decode surrogate pair: \ud812\u3456 */
+ len = 0;
+ vim_str2nr(p + 2, NULL, &len,
+! STR2NR_HEX + STR2NR_FORCE, &nr2, NULL, 4, TRUE);
+! if (len == 0)
+! {
+! ga_clear(&ga);
+! return FAIL;
+! }
+ if (0xdc00 <= nr2 && nr2 <= 0xdfff)
+ {
+ p += len + 2;
+***************
+*** 783,789 ****
+
+ vim_str2nr(reader->js_buf + reader->js_used,
+ NULL, &len, 0, /* what */
+! &nr, NULL, 0);
+ if (cur_item != NULL)
+ {
+ cur_item->v_type = VAR_NUMBER;
+--- 793,805 ----
+
+ vim_str2nr(reader->js_buf + reader->js_used,
+ NULL, &len, 0, /* what */
+! &nr, NULL, 0, TRUE);
+! if (len == 0)
+! {
+! emsg(_(e_invarg));
+! retval = FAIL;
+! goto theend;
+! }
+ if (cur_item != NULL)
+ {
+ cur_item->v_type = VAR_NUMBER;
+*** ../vim-8.1.1354/src/misc2.c 2019-05-09 15:12:45.172723940 +0200
+--- src/misc2.c 2019-05-19 18:53:32.118127617 +0200
+***************
+*** 2832,2838 ****
+ bp += 3; /* skip t_xx, xx may be '-' or '>' */
+ else if (STRNICMP(bp, "char-", 5) == 0)
+ {
+! vim_str2nr(bp + 5, NULL, &l, STR2NR_ALL, NULL, NULL, 0);
+ bp += l + 5;
+ break;
+ }
+--- 2832,2843 ----
+ bp += 3; /* skip t_xx, xx may be '-' or '>' */
+ else if (STRNICMP(bp, "char-", 5) == 0)
+ {
+! vim_str2nr(bp + 5, NULL, &l, STR2NR_ALL, NULL, NULL, 0, TRUE);
+! if (l == 0)
+! {
+! emsg(_(e_invarg));
+! return 0;
+! }
+ bp += l + 5;
+ break;
+ }
+***************
+*** 2864,2870 ****
+ && VIM_ISDIGIT(last_dash[6]))
+ {
+ /* <Char-123> or <Char-033> or <Char-0x33> */
+! vim_str2nr(last_dash + 6, NULL, NULL, STR2NR_ALL, NULL, &n, 0);
+ key = (int)n;
+ }
+ else
+--- 2869,2880 ----
+ && VIM_ISDIGIT(last_dash[6]))
+ {
+ /* <Char-123> or <Char-033> or <Char-0x33> */
+! vim_str2nr(last_dash + 6, NULL, &l, STR2NR_ALL, NULL, &n, 0, TRUE);
+! if (l == 0)
+! {
+! emsg(_(e_invarg));
+! return 0;
+! }
+ key = (int)n;
+ }
+ else
+*** ../vim-8.1.1354/src/ops.c 2019-05-19 15:19:53.824445415 +0200
+--- src/ops.c 2019-05-19 18:53:32.122127587 +0200
+***************
+*** 5794,5800 ****
+ 0 + (dobin ? STR2NR_BIN : 0)
+ + (dooct ? STR2NR_OCT : 0)
+ + (dohex ? STR2NR_HEX : 0),
+! NULL, &n, maxlen);
+
+ /* ignore leading '-' for hex and octal and bin numbers */
+ if (pre && negative)
+--- 5794,5800 ----
+ 0 + (dobin ? STR2NR_BIN : 0)
+ + (dooct ? STR2NR_OCT : 0)
+ + (dohex ? STR2NR_HEX : 0),
+! NULL, &n, maxlen, FALSE);
+
+ /* ignore leading '-' for hex and octal and bin numbers */
+ if (pre && negative)
+*** ../vim-8.1.1354/src/option.c 2019-05-09 15:12:45.176723907 +0200
+--- src/option.c 2019-05-19 18:53:32.122127587 +0200
+***************
+*** 4762,4771 ****
+ /* Allow negative (for 'undolevels'), octal and
+ * hex numbers. */
+ vim_str2nr(arg, NULL, &i, STR2NR_ALL,
+! &value, NULL, 0);
+! if (arg[i] != NUL && !VIM_ISWHITE(arg[i]))
+ {
+! errmsg = e_invarg;
+ goto skip;
+ }
+ }
+--- 4762,4771 ----
+ /* Allow negative (for 'undolevels'), octal and
+ * hex numbers. */
+ vim_str2nr(arg, NULL, &i, STR2NR_ALL,
+! &value, NULL, 0, TRUE);
+! if (i == 0 || (arg[i] != NUL && !VIM_ISWHITE(arg[i])))
+ {
+! errmsg = N_("E521: Number required after =");
+ goto skip;
+ }
+ }
+*** ../vim-8.1.1354/src/proto/charset.pro 2018-05-17 13:52:29.000000000 +0200
+--- src/proto/charset.pro 2019-05-19 18:53:32.122127587 +0200
+***************
+*** 54,60 ****
+ char_u *skiptowhite_esc(char_u *p);
+ long getdigits(char_u **pp);
+ int vim_isblankline(char_u *lbuf);
+! void vim_str2nr(char_u *start, int *prep, int *len, int what, varnumber_T *nptr, uvarnumber_T *unptr, int maxlen);
+ int hex2nr(int c);
+ int hexhex2nr(char_u *p);
+ int rem_backslash(char_u *str);
+--- 54,60 ----
+ char_u *skiptowhite_esc(char_u *p);
+ long getdigits(char_u **pp);
+ int vim_isblankline(char_u *lbuf);
+! void vim_str2nr(char_u *start, int *prep, int *len, int what, varnumber_T *nptr, uvarnumber_T *unptr, int maxlen, int strict);
+ int hex2nr(int c);
+ int hexhex2nr(char_u *p);
+ int rem_backslash(char_u *str);
+*** ../vim-8.1.1354/src/testdir/test_expr.vim 2018-12-15 16:08:52.998468517 +0100
+--- src/testdir/test_expr.vim 2019-05-19 18:57:21.312514000 +0200
+***************
+*** 512,514 ****
+--- 512,525 ----
+ call assert_equal('b', 'a'[4:0] . 'b')
+ call assert_equal('b', 'b' . 'a'[4:0])
+ endfunc
++
++ func Test_broken_number()
++ let X = 'bad'
++ call assert_fails('echo 1X', 'E15:')
++ call assert_fails('echo 0b1X', 'E15:')
++ call assert_fails('echo 0b12', 'E15:')
++ call assert_fails('echo 0x1X', 'E15:')
++ call assert_fails('echo 011X', 'E15:')
++ call assert_equal(2, str2nr('2a'))
++ call assert_fails('inoremap <Char-0b1z> b', 'E474:')
++ endfunc
+*** ../vim-8.1.1354/src/testdir/test_json.vim 2019-04-12 21:19:01.265386241 +0200
+--- src/testdir/test_json.vim 2019-05-19 18:53:32.122127587 +0200
+***************
+*** 176,181 ****
+--- 176,185 ----
+
+ call assert_fails('call json_decode("{{}:42}")', "E474:")
+ call assert_fails('call json_decode("{[]:42}")', "E474:")
++
++ call assert_fails('call json_decode("\"\\u111Z\"")', 'E474:')
++ call assert_equal('[😂]', json_decode('"[\uD83D\uDE02]"'))
++ call assert_equal('a😂b', json_decode('"a\uD83D\uDE02b"'))
+ endfunc
+
+ let s:jsl5 = '[7,,,]'
+*** ../vim-8.1.1354/src/version.c 2019-05-19 18:41:23.262148495 +0200
+--- src/version.c 2019-05-19 18:56:01.189060580 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1355,
+ /**/
+
+--
+Bad fashion can discourage normal people from interacting with the engineer
+and talking about the cute things their children do.
+ (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.1356 b/data/vim/patches/8.1.1356
new file mode 100644
index 000000000..6ca866caa
--- /dev/null
+++ b/data/vim/patches/8.1.1356
@@ -0,0 +1,206 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1356
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1356
+Problem: Some text in heredoc assignment ends the text. (Ozaki Kiichi)
+Solution: Recognize "let v =<<" and skip until the end.
+Files: src/userfunc.c, src/testdir/test_let.vim
+
+
+*** ../vim-8.1.1355/src/userfunc.c 2019-05-11 18:28:41.351611622 +0200
+--- src/userfunc.c 2019-05-19 21:19:18.418630239 +0200
+***************
+*** 1979,1984 ****
+--- 1979,1985 ----
+ int indent;
+ int nesting;
+ char_u *skip_until = NULL;
++ char_u *trimmed = NULL;
+ dictitem_T *v;
+ funcdict_T fudi;
+ static int func_nr = 0; /* number for nameless function */
+***************
+*** 2303,2312 ****
+
+ if (skip_until != NULL)
+ {
+! /* between ":append" and "." and between ":python <<EOF" and "EOF"
+! * don't check for ":endfunc". */
+! if (STRCMP(theline, skip_until) == 0)
+! VIM_CLEAR(skip_until);
+ }
+ else
+ {
+--- 2304,2321 ----
+
+ if (skip_until != NULL)
+ {
+! // Between ":append" and "." and between ":python <<EOF" and "EOF"
+! // don't check for ":endfunc".
+! if (trimmed == NULL
+! || STRNCMP(theline, trimmed, STRLEN(trimmed)) == 0)
+! {
+! p = trimmed == NULL ? theline : theline + STRLEN(trimmed);
+! if (STRCMP(p, skip_until) == 0)
+! {
+! VIM_CLEAR(skip_until);
+! VIM_CLEAR(trimmed);
+! }
+! }
+ }
+ else
+ {
+***************
+*** 2406,2411 ****
+--- 2415,2444 ----
+ else
+ skip_until = vim_strsave(p);
+ }
++
++ // Check for ":let v =<< [trim] EOF"
++ arg = skipwhite(skiptowhite(p));
++ arg = skipwhite(skiptowhite(arg));
++ if (arg[0] == '=' && arg[1] == '<' && arg[2] =='<'
++ && ((p[0] == 'l'
++ && p[1] == 'e'
++ && (!ASCII_ISALNUM(p[2])
++ || (p[2] == 't' && !ASCII_ISALNUM(p[3]))))))
++ {
++ // ":let v =<<" continues until a dot
++ p = skipwhite(arg + 3);
++ if (STRNCMP(p, "trim", 4) == 0)
++ {
++ // Ignore leading white space.
++ p = skipwhite(p + 4);
++ trimmed = vim_strnsave(theline,
++ (int)(skipwhite(theline) - theline));
++ }
++ if (*p == NUL)
++ skip_until = vim_strsave((char_u *)".");
++ else
++ skip_until = vim_strnsave(p, (int)(skiptowhite(p) - p));
++ }
+ }
+
+ /* Add the line to the function. */
+*** ../vim-8.1.1355/src/testdir/test_let.vim 2019-05-19 18:41:23.262148495 +0200
+--- src/testdir/test_let.vim 2019-05-19 21:33:54.346116430 +0200
+***************
+*** 152,157 ****
+--- 152,179 ----
+ call assert_equal('ĀĒĪŌŪあいうえお', $a)
+ endfunc
+
++ func Test_let_heredoc_fails()
++ call assert_fails('let v =<< marker', 'E991:')
++
++ let text =<< trim END
++ func WrongSyntax()
++ let v =<< that there
++ endfunc
++ END
++ call writefile(text, 'XheredocFail')
++ call assert_fails('source XheredocFail', 'E126:')
++ call delete('XheredocFail')
++
++ let text =<< trim END
++ func MissingEnd()
++ let v =<< END
++ endfunc
++ END
++ call writefile(text, 'XheredocWrong')
++ call assert_fails('source XheredocWrong', 'E126:')
++ call delete('XheredocWrong')
++ endfunc
++
+ " Test for the setting a variable using the heredoc syntax
+ func Test_let_heredoc()
+ let var1 =<< END
+***************
+*** 193,207 ****
+ .
+ call assert_equal([' Line1'], var1)
+
+! call assert_fails('let v =<< marker', 'E991:')
+! call assert_fails('call WrongSyntax()', 'E488:')
+! call assert_fails('call MissingEnd()', 'E990:')
+ endfunc
+
+! func WrongSyntax()
+! let fail =<< that there
+! endfunc
+
+! func MissingEnd()
+! let fail =<< END
+ endfunc
+--- 215,259 ----
+ .
+ call assert_equal([' Line1'], var1)
+
+! " ignore "endfunc"
+! let var1 =<< END
+! something
+ endfunc
++ END
++ call assert_equal(['something', 'endfunc'], var1)
+
+! " ignore "endfunc" with trim
+! let var1 =<< trim END
+! something
+! endfunc
+! END
+! call assert_equal(['something', 'endfunc'], var1)
+!
+! " ignore "python << xx"
+! let var1 =<<END
+! something
+! python << xx
+! END
+! call assert_equal(['something', 'python << xx'], var1)
+!
+! " ignore "python << xx" with trim
+! let var1 =<< trim END
+! something
+! python << xx
+! END
+! call assert_equal(['something', 'python << xx'], var1)
+
+! " ignore "append"
+! let var1 =<<
+! something
+! app
+! .
+! call assert_equal(['something', 'app'], var1)
+!
+! " ignore "append" with trim
+! let var1 =<< trim
+! something
+! app
+! .
+! call assert_equal(['something', 'app'], var1)
+ endfunc
+*** ../vim-8.1.1355/src/version.c 2019-05-19 19:59:30.164255569 +0200
+--- src/version.c 2019-05-19 21:30:25.855209515 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1356,
+ /**/
+
+--
+No engineer can take a shower without wondering if some sort of Teflon coating
+would make showering unnecessary.
+ (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.1357 b/data/vim/patches/8.1.1357
new file mode 100644
index 000000000..b6e34242c
--- /dev/null
+++ b/data/vim/patches/8.1.1357
@@ -0,0 +1,493 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1357
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1357
+Problem: Test 37 is old style.
+Solution: Turn it into a new style test. (Yegappan Lakshmanan, closes #4398)
+Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
+ src/testdir/test37.in, src/testdir/test37.ok,
+ src/testdir/test_scrollbind.vim
+
+
+*** ../vim-8.1.1356/src/Makefile 2019-05-14 17:57:14.861402461 +0200
+--- src/Makefile 2019-05-19 21:40:34.148006562 +0200
+***************
+*** 2179,2185 ****
+ test1 \
+ test_eval \
+ test3 \
+! test30 test37 test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+ test64 test69 \
+--- 2180,2186 ----
+ test1 \
+ test_eval \
+ test3 \
+! test30 test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+ test64 test69 \
+*** ../vim-8.1.1356/src/testdir/Make_all.mak 2019-05-14 17:57:14.861402461 +0200
+--- src/testdir/Make_all.mak 2019-05-19 21:40:34.148006562 +0200
+***************
+*** 14,20 ****
+ # Tests that run on all systems.
+ SCRIPTS_ALL = \
+ test3.out \
+- test37.out \
+ test39.out \
+ test42.out \
+ test44.out \
+--- 14,19 ----
+*** ../vim-8.1.1356/src/testdir/Make_vms.mms 2019-05-14 17:57:14.861402461 +0200
+--- src/testdir/Make_vms.mms 2019-05-19 21:40:34.148006562 +0200
+***************
+*** 74,80 ****
+ .SUFFIXES : .out .in
+
+ SCRIPT = test1.out test3.out \
+! test30.out test37.out test39.out \
+ test42.out test44.out test48.out test49.out \
+ test64.out test69.out \
+ test72.out test77a.out test88.out \
+--- 74,80 ----
+ .SUFFIXES : .out .in
+
+ SCRIPT = test1.out test3.out \
+! test30.out test39.out \
+ test42.out test44.out test48.out test49.out \
+ test64.out test69.out \
+ test72.out test77a.out test88.out \
+*** ../vim-8.1.1356/src/testdir/test37.in 2010-05-15 13:04:10.000000000 +0200
+--- src/testdir/test37.in 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,116 ****
+- Test for 'scrollbind'. <eralston@computer.org> Do not add a line below!
+- STARTTEST
+- :so small.vim
+- :set noscrollbind
+- :set scrollopt=ver,jump
+- :set scrolloff=2
+- :set nowrap
+- :set noequalalways
+- :set splitbelow
+- :" TEST using two windows open to one buffer, one extra empty window
+- :split
+- :new
+- t:
+- :resize 8
+- /^start of window 1$/
+- zt:
+- :set scrollbind
+- j:
+- :resize 7
+- /^start of window 2$/
+- zt:
+- :set scrollbind
+- :" -- start of tests --
+- :" TEST scrolling down
+- L5jHyybpr0tHyybpr1tL6jHyybpr2kHyybpr3:
+- :" TEST scrolling up
+- tH4kjHtHyybpr4kHyybpr5k3ktHjHyybpr6tHyybpr7:
+- :" TEST horizontal scrolling
+- :set scrollopt+=hor
+- gg"zyyG"zpGt015zly$bp"zpGky$bp"zpG:
+- k10jH7zhg0y$bp"zpGtHg0y$bp"zpG:
+- :set scrollopt-=hor
+- :" ****** tests using two different buffers *****
+- tj:
+- :close
+- t:
+- :set noscrollbind
+- :/^start of window 2$/,/^end of window 2$/y
+- :new
+- tj4"zpGp:
+- t/^start of window 1$/
+- zt:
+- :set scrollbind
+- j:
+- /^start of window 2$/
+- zt:
+- :set scrollbind
+- :" -- start of tests --
+- :" TEST scrolling down
+- L5jHyybpr0tHyybpr1tL6jHyybpr2kHyybpr3:
+- :" TEST scrolling up
+- tH4kjHtHyybpr4kHyybpr5k3ktHjHyybpr6tHyybpr7:
+- :" TEST horizontal scrolling
+- :set scrollopt+=hor
+- gg"zyyG"zpGt015zly$bp"zpGky$bp"zpG:
+- k10jH7zhg0y$bp"zpGtHg0y$bp"zpG:
+- :set scrollopt-=hor
+- :" TEST syncbind
+- t:set noscb
+- ggLj:set noscb
+- ggL:set scb
+- t:set scb
+- GjG:syncbind
+- HktHjHyybptyybp:
+- t:set noscb
+- ggLj:set noscb
+- ggL:set scb
+- t:set scb
+- tGjGt:syncbind
+- HkjHtHyybptjyybp:
+- tH3kjHtHyybptjyybp:
+- :" ***** done with tests *****
+- :w! test.out " Write contents of this file
+- :qa!
+- ENDTEST
+-
+-
+- start of window 1
+- . line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01
+- . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
+- . line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03
+- . line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04
+- . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05
+- . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06
+- . line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07
+- . line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08
+- . line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09
+- . line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10
+- . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11
+- . line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12
+- . line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13
+- . line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14
+- . line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15
+- end of window 1
+-
+-
+- start of window 2
+- . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01
+- . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02
+- . line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03
+- . line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04
+- . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05
+- . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
+- . line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07
+- . line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08
+- . line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09
+- . line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10
+- . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
+- . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12
+- . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13
+- . line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14
+- . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
+- . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
+- end of window 2
+-
+- end of test37.in (please don't delete this line)
+--- 0 ----
+*** ../vim-8.1.1356/src/testdir/test37.ok 2013-12-14 12:54:57.000000000 +0100
+--- src/testdir/test37.ok 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,33 ****
+-
+- 0 line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05
+- 1 line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05
+- 2 line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11
+- 3 line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
+- 4 line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06
+- 5 line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
+- 6 line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02
+- 7 line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
+- 56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
+- UTSRQPONMLKJIHGREDCBA9876543210 02
+- . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
+- . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11
+-
+- 0 line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05
+- 1 line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05
+- 2 line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11
+- 3 line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
+- 4 line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06
+- 5 line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
+- 6 line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02
+- 7 line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
+- 56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
+- UTSRQPONMLKJIHGREDCBA9876543210 02
+- . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
+- . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11
+-
+- . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
+- :set scrollbind
+- :set scrollbind
+- . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
+- j:
+- . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12
+--- 0 ----
+*** ../vim-8.1.1356/src/testdir/test_scrollbind.vim 2017-08-04 22:13:08.000000000 +0200
+--- src/testdir/test_scrollbind.vim 2019-05-19 21:40:34.148006562 +0200
+***************
+*** 30,32 ****
+--- 30,272 ----
+ setl noscrollbind
+ call assert_equal(0, topLineLeft - topLineRight)
+ endfunc
++
++ " Test for 'scrollbind'
++ func Test_scrollbind_opt()
++ new | only
++ set noscrollbind
++ set scrollopt=ver,jump scrolloff=2 nowrap noequalalways splitbelow
++
++ " Insert the text used for the test
++ append
++
++
++ start of window 1
++ . line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01
++ . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
++ . line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03
++ . line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04
++ . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05
++ . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06
++ . line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07
++ . line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08
++ . line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09
++ . line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10
++ . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11
++ . line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12
++ . line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13
++ . line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14
++ . line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15
++ end of window 1
++
++
++ start of window 2
++ . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01
++ . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02
++ . line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03
++ . line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04
++ . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05
++ . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
++ . line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07
++ . line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08
++ . line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09
++ . line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10
++ . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
++ . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12
++ . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13
++ . line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14
++ . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
++ . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
++ end of window 2
++
++ .
++
++ " Test using two windows open to one buffer, one extra empty window
++ split
++ new
++ wincmd t
++ resize 8
++ call search('^start of window 1$')
++ normal zt
++ set scrollbind
++ wincmd j
++ resize 7
++ call search('^start of window 2$')
++ normal zt
++ set scrollbind
++
++ " -- start of tests --
++ " Test scrolling down
++ normal L5jHyy
++ wincmd b | normal pr0
++ wincmd t | normal Hyy
++ wincmd b | normal pr1
++ wincmd t | normal L6jHyy
++ wincmd b | normal pr2
++ wincmd k | normal Hyy
++ wincmd b | normal pr3
++
++ " Test scrolling up
++ wincmd t | normal H4k
++ wincmd j | normal H
++ wincmd t | normal Hyy
++ wincmd b | normal pr4
++ wincmd k | normal Hyy
++ wincmd b | normal pr5
++ wincmd k | normal 3k
++ wincmd t | normal H
++ wincmd j | normal Hyy
++ wincmd b | normal pr6
++ wincmd t | normal Hyy
++ wincmd b | normal pr7
++
++ " Test horizontal scrolling
++ set scrollopt+=hor
++ normal gg"zyyG"zpG
++ wincmd t | normal 015zly$
++ wincmd b | normal p"zpG
++ wincmd k | normal y$
++ wincmd b | normal p"zpG
++ wincmd k | normal 10jH7zhg0y$
++ wincmd b | normal p"zpG
++ wincmd t | normal Hg0y$
++ wincmd b | normal p"zpG
++ set scrollopt-=hor
++
++ wincmd b
++ call assert_equal([
++ \ '',
++ \ '0 line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05',
++ \ '1 line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05',
++ \ '2 line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11',
++ \ '3 line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11',
++ \ '4 line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06',
++ \ '5 line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06',
++ \ '6 line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02',
++ \ '7 line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02',
++ \ '56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02',
++ \ 'UTSRQPONMLKJIHGREDCBA9876543210 02',
++ \ '. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11',
++ \ '. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11',
++ \ ''], getline(1, '$'))
++ enew!
++
++ " ****** tests using two different buffers *****
++ wincmd t | wincmd j | close
++ wincmd t | set noscrollbind
++ /start of window 2$/,/^end of window 2$/y
++ new
++ wincmd t | wincmd j | normal 4"zpGp
++ wincmd t
++ call search('^start of window 1$')
++ normal zt
++ set scrollbind
++ wincmd j
++ call search('^start of window 2$')
++ normal zt
++ set scrollbind
++
++ " -- start of tests --
++ " Test scrolling down
++ normal L5jHyy
++ wincmd b | normal pr0
++ wincmd t | normal Hyy
++ wincmd b | normal pr1
++ wincmd t | normal L6jHyy
++ wincmd b | normal pr2
++ wincmd k | normal Hyy
++ wincmd b | normal pr3
++
++ " Test scrolling up
++ wincmd t | normal H4k
++ wincmd j | normal H
++ wincmd t | normal Hyy
++ wincmd b | normal pr4
++ wincmd k | normal Hyy
++ wincmd b | normal pr5
++ wincmd k | normal 3k
++ wincmd t | normal H
++ wincmd j | normal Hyy
++ wincmd b | normal pr6
++ wincmd t | normal Hyy
++ wincmd b | normal pr7
++
++ " Test horizontal scrolling
++ set scrollopt+=hor
++ normal gg"zyyG"zpG
++ wincmd t | normal 015zly$
++ wincmd b | normal p"zpG
++ wincmd k | normal y$
++ wincmd b | normal p"zpG
++ wincmd k | normal 10jH7zhg0y$
++ wincmd b | normal p"zpG
++ wincmd t | normal Hg0y$
++ wincmd b | normal p"zpG
++ set scrollopt-=hor
++
++ wincmd b
++ call assert_equal([
++ \ '',
++ \ '0 line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05',
++ \ '1 line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05',
++ \ '2 line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11',
++ \ '3 line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11',
++ \ '4 line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06',
++ \ '5 line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06',
++ \ '6 line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02',
++ \ '7 line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02',
++ \ '56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02',
++ \ 'UTSRQPONMLKJIHGREDCBA9876543210 02',
++ \ '. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11',
++ \ '. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11',
++ \ ''], getline(1, '$'))
++ enew!
++
++ " Test 'syncbind'
++ wincmd t | set noscrollbind | normal ggL
++ wincmd j | set noscrollbind | normal ggL
++ set scrollbind
++ wincmd t | set scrollbind | normal G
++ wincmd j | normal G
++ syncbind
++ normal Hk
++ wincmd t | normal H
++ wincmd j | normal Hyy
++ wincmd b | normal p
++ wincmd t | normal yy
++ wincmd b | normal p
++ wincmd t | set noscrollbind | normal ggL
++ wincmd j | set noscrollbind
++ normal ggL
++ set scrollbind
++ wincmd t | set scrollbind
++ wincmd t | normal G
++ wincmd j | normal G
++ wincmd t | syncbind | normal Hk
++ wincmd j | normal H
++ wincmd t | normal Hyy
++ wincmd b | normal p
++ wincmd t | wincmd j | normal yy
++ wincmd b | normal p
++ wincmd t | normal H3k
++ wincmd j | normal H
++ wincmd t | normal Hyy
++ wincmd b | normal p
++ wincmd t | wincmd j | normal yy
++ wincmd b | normal p
++
++ wincmd b
++ call assert_equal([
++ \ '',
++ \ '. line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16',
++ \ 'start of window 2',
++ \ 'start of window 2',
++ \ '. line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16',
++ \ '. line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15',
++ \ '. line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12',
++ \ ], getline(1, '$'))
++ enew!
++
++ new | only!
++ set scrollbind& scrollopt& scrolloff& wrap& equalalways& splitbelow&
++ endfunc
+*** ../vim-8.1.1356/src/version.c 2019-05-19 21:37:14.189063500 +0200
+--- src/version.c 2019-05-19 21:41:49.311608616 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1357,
+ /**/
+
+--
+Normal people believe that if it ain't broke, don't fix it. Engineers believe
+that if it ain't broke, it doesn't have enough features yet.
+ (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.1358 b/data/vim/patches/8.1.1358
new file mode 100644
index 000000000..818e7ae93
--- /dev/null
+++ b/data/vim/patches/8.1.1358
@@ -0,0 +1,78 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1358
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1358
+Problem: Cannot enter character with a CSI byte.
+Solution: Only check "gui.in_use" when VIMDLL is defined. (Ken Takata,
+ closes #4396)
+Files: src/getchar.c
+
+
+*** ../vim-8.1.1357/src/getchar.c 2019-05-04 19:59:56.544589575 +0200
+--- src/getchar.c 2019-05-19 21:56:04.998657784 +0200
+***************
+*** 1453,1461 ****
+ oldcurscript = curscript;
+ do
+ {
+! update_topline_cursor(); /* update cursor position and topline */
+! normal_cmd(&oa, FALSE); /* execute one command */
+! vpeekc(); /* check for end of file */
+ }
+ while (scriptin[oldcurscript] != NULL);
+
+--- 1453,1461 ----
+ oldcurscript = curscript;
+ do
+ {
+! update_topline_cursor(); // update cursor position and topline
+! normal_cmd(&oa, FALSE); // execute one command
+! vpeekc(); // check for end of file
+ }
+ while (scriptin[oldcurscript] != NULL);
+
+***************
+*** 1753,1759 ****
+ buf[i] = vgetorpeek(TRUE);
+ if (buf[i] == K_SPECIAL
+ #ifdef FEAT_GUI
+! || (gui.in_use && buf[i] == CSI)
+ #endif
+ )
+ {
+--- 1753,1763 ----
+ buf[i] = vgetorpeek(TRUE);
+ if (buf[i] == K_SPECIAL
+ #ifdef FEAT_GUI
+! || (
+! # ifdef VIMDLL
+! gui.in_use &&
+! # endif
+! buf[i] == CSI)
+ #endif
+ )
+ {
+*** ../vim-8.1.1357/src/version.c 2019-05-19 21:44:03.982804746 +0200
+--- src/version.c 2019-05-19 21:56:51.186400834 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1358,
+ /**/
+
+--
+Q: What's a light-year?
+A: One-third less calories than a regular year.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1359 b/data/vim/patches/8.1.1359
new file mode 100644
index 000000000..2062e36f0
--- /dev/null
+++ b/data/vim/patches/8.1.1359
@@ -0,0 +1,356 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1359
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1359
+Problem: Text property wrong after :substitute with backslash.
+Solution: Adjust text property columns when removing backslashes.
+ (closes #4397)
+Files: src/ex_cmds.c, src/testdir/test_textprop.vim, src/vim.h,
+ src/textprop.c, src/proto/textprop.pro, src/change.c, src/edit.c,
+ src/misc1.c, src/ops.c
+
+
+*** ../vim-8.1.1358/src/ex_cmds.c 2019-05-19 19:59:30.160255591 +0200
+--- src/ex_cmds.c 2019-05-19 22:48:46.318349388 +0200
+***************
+*** 5189,5195 ****
+ int skip_match = FALSE;
+ linenr_T sub_firstlnum; /* nr of first sub line */
+ #ifdef FEAT_TEXT_PROP
+! int save_for_undo = TRUE;
+ #endif
+
+ /*
+--- 5189,5195 ----
+ int skip_match = FALSE;
+ linenr_T sub_firstlnum; /* nr of first sub line */
+ #ifdef FEAT_TEXT_PROP
+! int apc_flags = APC_SAVE_FOR_UNDO | APC_SUBSTITUTE;
+ #endif
+
+ /*
+***************
+*** 5612,5619 ****
+ // undo first, unless done already.
+ if (adjust_prop_columns(lnum, regmatch.startpos[0].col,
+ sublen - 1 - (regmatch.endpos[0].col
+! - regmatch.startpos[0].col), save_for_undo))
+! save_for_undo = FALSE;
+ }
+ #endif
+ }
+--- 5612,5620 ----
+ // undo first, unless done already.
+ if (adjust_prop_columns(lnum, regmatch.startpos[0].col,
+ sublen - 1 - (regmatch.endpos[0].col
+! - regmatch.startpos[0].col),
+! apc_flags))
+! apc_flags &= ~APC_SAVE_FOR_UNDO;
+ }
+ #endif
+ }
+***************
+*** 5715,5721 ****
+--- 5716,5735 ----
+ for (p1 = new_end; *p1; ++p1)
+ {
+ if (p1[0] == '\\' && p1[1] != NUL) /* remove backslash */
++ {
+ STRMOVE(p1, p1 + 1);
++ #ifdef FEAT_TEXT_PROP
++ if (curbuf->b_has_textprop)
++ {
++ // When text properties are changed, need to save
++ // for undo first, unless done already.
++ if (adjust_prop_columns(lnum,
++ (colnr_T)(p1 - new_start), -1,
++ apc_flags))
++ apc_flags &= ~APC_SAVE_FOR_UNDO;
++ }
++ #endif
++ }
+ else if (*p1 == CAR)
+ {
+ if (u_inssub(lnum) == OK) // prepare for undo
+*** ../vim-8.1.1358/src/testdir/test_textprop.vim 2019-05-19 15:19:53.820445439 +0200
+--- src/testdir/test_textprop.vim 2019-05-19 22:21:11.306734761 +0200
+***************
+*** 620,625 ****
+--- 620,644 ----
+ undo
+ let expected[0].col = 12
+ call assert_equal(expected, prop_list(1))
++ call prop_clear(1)
++
++ " substitute with backslash
++ call setline(1, 'the number 123 is highlighted.')
++ call prop_add(1, 12, {'length': 3, 'type': 'comment'})
++ let expected = [{'col': 12, 'length': 3, 'id': 0, 'type': 'comment', 'start': 1, 'end': 1} ]
++ call assert_equal(expected, prop_list(1))
++ 1s/the/\The
++ call assert_equal(expected, prop_list(1))
++ 1s/^/\\
++ let expected[0].col += 1
++ call assert_equal(expected, prop_list(1))
++ 1s/^/\~
++ let expected[0].col += 1
++ call assert_equal(expected, prop_list(1))
++ 1s/123/12\\3
++ let expected[0].length += 1
++ call assert_equal(expected, prop_list(1))
++ call prop_clear(1)
+
+ bwipe!
+ call prop_type_delete('comment')
+*** ../vim-8.1.1358/src/vim.h 2019-05-09 15:12:45.180723879 +0200
+--- src/vim.h 2019-05-19 22:42:35.548288020 +0200
+***************
+*** 2571,2574 ****
+--- 2571,2578 ----
+ #define SAVE_RESTORE_ICON 2
+ #define SAVE_RESTORE_BOTH (SAVE_RESTORE_TITLE | SAVE_RESTORE_ICON)
+
++ // Flags for adjust_prop_columns()
++ #define APC_SAVE_FOR_UNDO 1 // call u_savesub() before making changes
++ #define APC_SUBSTITUTE 2 // text is replaced, not inserted
++
+ #endif /* VIM__H */
+*** ../vim-8.1.1358/src/textprop.c 2019-05-19 15:19:53.820445439 +0200
+--- src/textprop.c 2019-05-19 22:46:38.843017116 +0200
+***************
+*** 957,964 ****
+ * shift by "bytes_added" (can be negative).
+ * Note that "col" is zero-based, while tp_col is one-based.
+ * Only for the current buffer.
+! * When "save_for_undo" is TRUE then call u_savesub() before making changes to
+! * the line.
+ * Caller is expected to check b_has_textprop and "bytes_added" being non-zero.
+ * Returns TRUE when props were changed.
+ */
+--- 957,965 ----
+ * shift by "bytes_added" (can be negative).
+ * Note that "col" is zero-based, while tp_col is one-based.
+ * Only for the current buffer.
+! * "flags" can have:
+! * APC_SAVE_FOR_UNDO: Call u_savesub() before making changes to the line.
+! * APC_SUBSTITUTE: Text is replaced, not inserted.
+ * Caller is expected to check b_has_textprop and "bytes_added" being non-zero.
+ * Returns TRUE when props were changed.
+ */
+***************
+*** 967,973 ****
+ linenr_T lnum,
+ colnr_T col,
+ int bytes_added,
+! int save_for_undo)
+ {
+ int proplen;
+ char_u *props;
+--- 968,974 ----
+ linenr_T lnum,
+ colnr_T col,
+ int bytes_added,
+! int flags)
+ {
+ int proplen;
+ char_u *props;
+***************
+*** 988,1002 ****
+ wi = 0; // write index
+ for (ri = 0; ri < proplen; ++ri)
+ {
+ mch_memmove(&tmp_prop, props + ri * sizeof(textprop_T),
+ sizeof(textprop_T));
+ pt = text_prop_type_by_id(curbuf, tmp_prop.tp_type);
+
+ if (bytes_added > 0
+! ? (tmp_prop.tp_col >= col
+! + (pt != NULL && (pt->pt_flags & PT_FLAG_INS_START_INCL)
+! ? 2 : 1))
+! : (tmp_prop.tp_col > col + 1))
+ {
+ if (tmp_prop.tp_col + bytes_added < col + 1)
+ {
+--- 989,1018 ----
+ wi = 0; // write index
+ for (ri = 0; ri < proplen; ++ri)
+ {
++ int start_incl;
++
+ mch_memmove(&tmp_prop, props + ri * sizeof(textprop_T),
+ sizeof(textprop_T));
+ pt = text_prop_type_by_id(curbuf, tmp_prop.tp_type);
++ start_incl = (flags & APC_SUBSTITUTE) ||
++ (pt != NULL && (pt->pt_flags & PT_FLAG_INS_START_INCL));
+
+ if (bytes_added > 0
+! && (tmp_prop.tp_col >= col + (start_incl ? 2 : 1)))
+! {
+! if (tmp_prop.tp_col < col + (start_incl ? 2 : 1))
+! {
+! tmp_prop.tp_len += (tmp_prop.tp_col - 1 - col) + bytes_added;
+! tmp_prop.tp_col = col + 1;
+! }
+! else
+! tmp_prop.tp_col += bytes_added;
+! // Save for undo if requested and not done yet.
+! if ((flags & APC_SAVE_FOR_UNDO) && !dirty)
+! u_savesub(lnum);
+! dirty = TRUE;
+! }
+! else if (bytes_added <= 0 && (tmp_prop.tp_col > col + 1))
+ {
+ if (tmp_prop.tp_col + bytes_added < col + 1)
+ {
+***************
+*** 1006,1012 ****
+ else
+ tmp_prop.tp_col += bytes_added;
+ // Save for undo if requested and not done yet.
+! if (save_for_undo && !dirty)
+ u_savesub(lnum);
+ dirty = TRUE;
+ if (tmp_prop.tp_len <= 0)
+--- 1022,1028 ----
+ else
+ tmp_prop.tp_col += bytes_added;
+ // Save for undo if requested and not done yet.
+! if ((flags & APC_SAVE_FOR_UNDO) && !dirty)
+ u_savesub(lnum);
+ dirty = TRUE;
+ if (tmp_prop.tp_len <= 0)
+***************
+*** 1024,1030 ****
+ else
+ tmp_prop.tp_len += bytes_added;
+ // Save for undo if requested and not done yet.
+! if (save_for_undo && !dirty)
+ u_savesub(lnum);
+ dirty = TRUE;
+ if (tmp_prop.tp_len <= 0)
+--- 1040,1046 ----
+ else
+ tmp_prop.tp_len += bytes_added;
+ // Save for undo if requested and not done yet.
+! if ((flags & APC_SAVE_FOR_UNDO) && !dirty)
+ u_savesub(lnum);
+ dirty = TRUE;
+ if (tmp_prop.tp_len <= 0)
+*** ../vim-8.1.1358/src/proto/textprop.pro 2019-05-19 15:19:53.820445439 +0200
+--- src/proto/textprop.pro 2019-05-19 22:46:51.950948502 +0200
+***************
+*** 13,19 ****
+ 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);
+! int adjust_prop_columns(linenr_T lnum, colnr_T col, int bytes_added, int save_for_undo);
+ void adjust_props_for_split(linenr_T lnum_props, linenr_T lnum_top, int kept, int deleted);
+ void adjust_props_for_join(linenr_T lnum, textprop_T **prop_line, int *prop_length, long col, int removed);
+ void join_prop_lines(linenr_T lnum, char_u *newp, textprop_T **prop_lines, int *prop_lengths, int count);
+--- 13,19 ----
+ 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);
+! int adjust_prop_columns(linenr_T lnum, colnr_T col, int bytes_added, int flags);
+ void adjust_props_for_split(linenr_T lnum_props, linenr_T lnum_top, int kept, int deleted);
+ void adjust_props_for_join(linenr_T lnum, textprop_T **prop_line, int *prop_length, long col, int removed);
+ void join_prop_lines(linenr_T lnum, char_u *newp, textprop_T **prop_lines, int *prop_lengths, int count);
+*** ../vim-8.1.1358/src/change.c 2019-05-19 15:19:53.820445439 +0200
+--- src/change.c 2019-05-19 22:44:47.379600018 +0200
+***************
+*** 684,690 ****
+ {
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop && added != 0)
+! adjust_prop_columns(lnum, col, added, FALSE);
+ #endif
+
+ changed_bytes(lnum, col);
+--- 684,690 ----
+ {
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop && added != 0)
+! adjust_prop_columns(lnum, col, added, 0);
+ #endif
+
+ changed_bytes(lnum, col);
+*** ../vim-8.1.1358/src/edit.c 2019-05-19 15:19:53.824445415 +0200
+--- src/edit.c 2019-05-19 22:44:58.571541520 +0200
+***************
+*** 4104,4110 ****
+
+ --text_prop_frozen;
+ adjust_prop_columns(curwin->w_cursor.lnum, curwin->w_cursor.col,
+! (int)(len_now - len_before), FALSE);
+ }
+ #endif
+ }
+--- 4104,4110 ----
+
+ --text_prop_frozen;
+ adjust_prop_columns(curwin->w_cursor.lnum, curwin->w_cursor.col,
+! (int)(len_now - len_before), 0);
+ }
+ #endif
+ }
+*** ../vim-8.1.1358/src/misc1.c 2019-05-19 15:19:53.824445415 +0200
+--- src/misc1.c 2019-05-19 22:46:00.163219479 +0200
+***************
+*** 441,447 ****
+ // the old indent, when decreasing indent it behaves like spaces
+ // were deleted at the new indent.
+ adjust_prop_columns(curwin->w_cursor.lnum,
+! (colnr_T)(added > 0 ? (p - oldline) : ind_len), added, FALSE);
+ }
+ #endif
+ retval = TRUE;
+--- 441,447 ----
+ // the old indent, when decreasing indent it behaves like spaces
+ // were deleted at the new indent.
+ adjust_prop_columns(curwin->w_cursor.lnum,
+! (colnr_T)(added > 0 ? (p - oldline) : ind_len), added, 0);
+ }
+ #endif
+ retval = TRUE;
+*** ../vim-8.1.1358/src/ops.c 2019-05-19 19:59:30.164255569 +0200
+--- src/ops.c 2019-05-19 22:46:05.079193770 +0200
+***************
+*** 1937,1943 ****
+
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop && n != 0)
+! adjust_prop_columns(lnum, bd.textcol, -n, FALSE);
+ #endif
+ }
+
+--- 1937,1943 ----
+
+ #ifdef FEAT_TEXT_PROP
+ if (curbuf->b_has_textprop && n != 0)
+! adjust_prop_columns(lnum, bd.textcol, -n, 0);
+ #endif
+ }
+
+*** ../vim-8.1.1358/src/version.c 2019-05-19 21:57:05.670320399 +0200
+--- src/version.c 2019-05-19 22:17:50.879624047 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1359,
+ /**/
+
+--
+I used to be indecisive, now I'm not sure.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1360 b/data/vim/patches/8.1.1360
new file mode 100644
index 000000000..4d27d29f7
--- /dev/null
+++ b/data/vim/patches/8.1.1360
@@ -0,0 +1,105 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1360
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1360 (after Patch 8.1.1345)
+Problem: Buffer left 'nomodifiable' after :substitute. (Ingo Karkat)
+Solution: Save the value of 'modifiable' earlier' (Christian Brabandt,
+ closes #4403)
+Files: src/ex_cmds.c, src/testdir/test_substitute.vim
+
+
+*** ../vim-8.1.1359/src/ex_cmds.c 2019-05-19 22:53:36.504914607 +0200
+--- src/ex_cmds.c 2019-05-20 20:32:22.828513580 +0200
+***************
+*** 5557,5562 ****
+--- 5557,5563 ----
+ * 3. substitute the string.
+ */
+ #ifdef FEAT_EVAL
++ save_ma = curbuf->b_p_ma;
+ if (subflags.do_count)
+ {
+ // prevent accidentally changing the buffer by a function
+***************
+*** 5566,5572 ****
+ // Save flags for recursion. They can change for e.g.
+ // :s/^/\=execute("s#^##gn")
+ subflags_save = subflags;
+- save_ma = curbuf->b_p_ma;
+ #endif
+ // get length of substitution part
+ sublen = vim_regsub_multi(&regmatch,
+--- 5567,5572 ----
+*** ../vim-8.1.1359/src/testdir/test_substitute.vim 2019-05-18 13:41:19.061511348 +0200
+--- src/testdir/test_substitute.vim 2019-05-20 20:31:52.408660842 +0200
+***************
+*** 611,619 ****
+ set titlestring&
+ endfunc
+
+ func Test_nocatch_sub_failure_handling()
+ " normal error results in all replacements
+! func! Foo()
+ foobar
+ endfunc
+ new
+--- 611,634 ----
+ set titlestring&
+ endfunc
+
++ func Test_sub_cmd_9()
++ new
++ let input = ['1 aaa', '2 aaa', '3 aaa']
++ call setline(1, input)
++ func Foo()
++ return submatch(0)
++ endfunc
++ %s/aaa/\=Foo()/gn
++ call assert_equal(input, getline(1, '$'))
++ call assert_equal(1, &modifiable)
++
++ delfunc Foo
++ bw!
++ endfunc
++
+ func Test_nocatch_sub_failure_handling()
+ " normal error results in all replacements
+! func Foo()
+ foobar
+ endfunc
+ new
+***************
+*** 649,654 ****
+--- 664,670 ----
+ call assert_equal(1, error_caught)
+ call assert_equal(['1 aaa', '2 aaa', '3 aaa'], getline(1, 3))
+
++ delfunc Foo
+ bwipe!
+ endfunc
+
+*** ../vim-8.1.1359/src/version.c 2019-05-19 22:53:36.508914587 +0200
+--- src/version.c 2019-05-20 20:34:12.939969595 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1360,
+ /**/
+
+--
+Contrary to popular belief, it's often your clothing that gets promoted, not
+you.
+ (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.1361 b/data/vim/patches/8.1.1361
new file mode 100644
index 000000000..8da317feb
--- /dev/null
+++ b/data/vim/patches/8.1.1361
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1361
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1361
+Problem: Python setuptools don't work with Python 3.
+Solution: Add dummy implementation for find_module. (Joel Frederico,
+ closes #4402, closes #3984
+Files: src/if_py_both.h
+
+
+*** ../vim-8.1.1360/src/if_py_both.h 2019-05-18 15:02:20.966415938 +0200
+--- src/if_py_both.h 2019-05-20 21:49:15.800074593 +0200
+***************
+*** 1222,1227 ****
+--- 1222,1235 ----
+
+ return spec;
+ }
++
++ static PyObject *
++ FinderFindModule(PyObject* self UNUSED, PyObject* args UNUSED)
++ {
++ // Apparently returning None works.
++ Py_INCREF(Py_None);
++ return Py_None;
++ }
+ #else
+ static PyObject *
+ call_load_module(char *name, int len, PyObject *find_module_result)
+***************
+*** 1400,1408 ****
+ {"foreach_rtp", VimForeachRTP, METH_O, "Call given callable for each path in &rtp"},
+ #if PY_VERSION_HEX >= 0x030700f0
+ {"find_spec", FinderFindSpec, METH_VARARGS, "Internal use only, returns spec object for any input it receives"},
+- #else
+- {"find_module", FinderFindModule, METH_VARARGS, "Internal use only, returns loader object for any input it receives"},
+ #endif
+ {"path_hook", VimPathHook, METH_VARARGS, "Hook function to install in sys.path_hooks"},
+ {"_get_paths", (PyCFunction)Vim_GetPaths, METH_NOARGS, "Get &rtp-based additions to sys.path"},
+ { NULL, NULL, 0, NULL}
+--- 1408,1415 ----
+ {"foreach_rtp", VimForeachRTP, METH_O, "Call given callable for each path in &rtp"},
+ #if PY_VERSION_HEX >= 0x030700f0
+ {"find_spec", FinderFindSpec, METH_VARARGS, "Internal use only, returns spec object for any input it receives"},
+ #endif
++ {"find_module", FinderFindModule, METH_VARARGS, "Internal use only, returns loader object for any input it receives"},
+ {"path_hook", VimPathHook, METH_VARARGS, "Hook function to install in sys.path_hooks"},
+ {"_get_paths", (PyCFunction)Vim_GetPaths, METH_NOARGS, "Get &rtp-based additions to sys.path"},
+ { NULL, NULL, 0, NULL}
+*** ../vim-8.1.1360/src/version.c 2019-05-20 20:34:48.347791448 +0200
+--- src/version.c 2019-05-20 21:50:57.403502707 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1361,
+ /**/
+
+--
+A)bort, R)etry, B)ang it with a large hammer
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1362 b/data/vim/patches/8.1.1362
new file mode 100644
index 000000000..9d158f2a6
--- /dev/null
+++ b/data/vim/patches/8.1.1362
@@ -0,0 +1,2891 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1362
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1362
+Problem: Code and data in tests can be hard to read.
+Solution: Use the new heredoc style. (Yegappan Lakshmanan, closes #4400)
+Files: src/testdir/test_autocmd.vim, src/testdir/test_balloon.vim,
+ src/testdir/test_bufline.vim, src/testdir/test_cindent.vim,
+ src/testdir/test_conceal.vim, src/testdir/test_exit.vim,
+ src/testdir/test_fold.vim, src/testdir/test_goto.vim,
+ src/testdir/test_join.vim, src/testdir/test_mksession_utf8.vim,
+ src/testdir/test_normal.vim, src/testdir/test_profile.vim,
+ src/testdir/test_quickfix.vim, src/testdir/test_startup.vim,
+ src/testdir/test_terminal.vim, src/testdir/test_xxd.vim
+
+
+*** ../vim-8.1.1361/src/testdir/test_autocmd.vim 2019-05-12 13:07:10.563191431 +0200
+--- src/testdir/test_autocmd.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 423,440 ****
+ set noswapfile
+ mksession!
+
+! let content = ['set nocp noswapfile',
+! \ 'let v:swapchoice="e"',
+! \ 'augroup test_autocmd_sessionload',
+! \ 'autocmd!',
+! \ 'autocmd SessionLoadPost * exe bufnr("Xsomething") . "bw!"',
+! \ 'augroup END',
+! \ '',
+! \ 'func WriteErrors()',
+! \ ' call writefile([execute("messages")], "Xerrors")',
+! \ 'endfunc',
+! \ 'au VimLeave * call WriteErrors()',
+! \ ]
+ call writefile(content, 'Xvimrc')
+ call system(v:progpath. ' -u Xvimrc --not-a-term --noplugins -S Session.vim -c cq')
+ let errors = join(readfile('Xerrors'))
+--- 423,442 ----
+ set noswapfile
+ mksession!
+
+! let content =<< trim [CODE]
+! set nocp noswapfile
+! let v:swapchoice="e"
+! augroup test_autocmd_sessionload
+! autocmd!
+! autocmd SessionLoadPost * exe bufnr("Xsomething") . "bw!"
+! augroup END
+!
+! func WriteErrors()
+! call writefile([execute("messages")], "Xerrors")
+! endfunc
+! au VimLeave * call WriteErrors()
+! [CODE]
+!
+ call writefile(content, 'Xvimrc')
+ call system(v:progpath. ' -u Xvimrc --not-a-term --noplugins -S Session.vim -c cq')
+ let errors = join(readfile('Xerrors'))
+***************
+*** 452,478 ****
+ set noswapfile
+ mksession!
+
+! let content = ['set nocp noswapfile',
+! \ 'function! DeleteInactiveBufs()',
+! \ ' tabfirst',
+! \ ' let tabblist = []',
+! \ ' for i in range(1, tabpagenr(''$''))',
+! \ ' call extend(tabblist, tabpagebuflist(i))',
+! \ ' endfor',
+! \ ' for b in range(1, bufnr(''$''))',
+! \ ' if bufexists(b) && buflisted(b) && (index(tabblist, b) == -1 || bufname(b) =~# ''^$'')',
+! \ ' exec ''bwipeout '' . b',
+! \ ' endif',
+! \ ' endfor',
+! \ ' echomsg "SessionLoadPost DONE"',
+! \ 'endfunction',
+! \ 'au SessionLoadPost * call DeleteInactiveBufs()',
+! \ '',
+! \ 'func WriteErrors()',
+! \ ' call writefile([execute("messages")], "Xerrors")',
+! \ 'endfunc',
+! \ 'au VimLeave * call WriteErrors()',
+! \ ]
+ call writefile(content, 'Xvimrc')
+ call system(v:progpath. ' -u Xvimrc --not-a-term --noplugins -S Session.vim -c cq')
+ let errors = join(readfile('Xerrors'))
+--- 454,482 ----
+ set noswapfile
+ mksession!
+
+! let content =<< trim [CODE]
+! set nocp noswapfile
+! function! DeleteInactiveBufs()
+! tabfirst
+! let tabblist = []
+! for i in range(1, tabpagenr(''$''))
+! call extend(tabblist, tabpagebuflist(i))
+! endfor
+! for b in range(1, bufnr(''$''))
+! if bufexists(b) && buflisted(b) && (index(tabblist, b) == -1 || bufname(b) =~# ''^$'')
+! exec ''bwipeout '' . b
+! endif
+! endfor
+! echomsg "SessionLoadPost DONE"
+! endfunction
+! au SessionLoadPost * call DeleteInactiveBufs()
+!
+! func WriteErrors()
+! call writefile([execute("messages")], "Xerrors")
+! endfunc
+! au VimLeave * call WriteErrors()
+! [CODE]
+!
+ call writefile(content, 'Xvimrc')
+ call system(v:progpath. ' -u Xvimrc --not-a-term --noplugins -S Session.vim -c cq')
+ let errors = join(readfile('Xerrors'))
+***************
+*** 933,953 ****
+ call writefile(['Test file Xxx1'], 'Xxx1')"
+ call writefile(['Test file Xxx2'], 'Xxx2')"
+
+! let content = [
+! \ "func UnloadAllBufs()",
+! \ " let i = 1",
+! \ " while i <= bufnr('$')",
+! \ " if i != bufnr('%') && bufloaded(i)",
+! \ " exe i . 'bunload'",
+! \ " endif",
+! \ " let i += 1",
+! \ " endwhile",
+! \ "endfunc",
+! \ "au BufUnload * call UnloadAllBufs()",
+! \ "au VimLeave * call writefile(['Test Finished'], 'Xout')",
+! \ "edit Xxx1",
+! \ "split Xxx2",
+! \ "q"]
+ call writefile(content, 'Xtest')
+
+ call delete('Xout')
+--- 937,959 ----
+ call writefile(['Test file Xxx1'], 'Xxx1')"
+ call writefile(['Test file Xxx2'], 'Xxx2')"
+
+! let content =<< trim [CODE]
+! func UnloadAllBufs()
+! let i = 1
+! while i <= bufnr('$')
+! if i != bufnr('%') && bufloaded(i)
+! exe i . 'bunload'
+! endif
+! let i += 1
+! endwhile
+! endfunc
+! au BufUnload * call UnloadAllBufs()
+! au VimLeave * call writefile(['Test Finished'], 'Xout')
+! edit Xxx1
+! split Xxx2
+! q
+! [CODE]
+!
+ call writefile(content, 'Xtest')
+
+ call delete('Xout')
+*** ../vim-8.1.1361/src/testdir/test_balloon.vim 2019-05-09 13:50:13.362401997 +0200
+--- src/testdir/test_balloon.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 8,21 ****
+ finish
+ endif
+
+! let s:common_script = [
+! \ 'call setline(1, ["one one one", "two tXo two", "three three three"])',
+! \ 'set balloonevalterm balloonexpr=MyBalloonExpr() balloondelay=100',
+! \ 'func MyBalloonExpr()',
+! \ ' return "line " .. v:beval_lnum .. " column " .. v:beval_col .. ": " .. v:beval_text',
+! \ 'endfun',
+! \ 'redraw',
+! \ ]
+
+ func Test_balloon_eval_term()
+ " Use <Ignore> after <MouseMove> to return from vgetc() without removing
+--- 8,21 ----
+ finish
+ endif
+
+! let s:common_script =<< [CODE]
+! call setline(1, ["one one one", "two tXo two", "three three three"])
+! set balloonevalterm balloonexpr=MyBalloonExpr() balloondelay=100
+! func MyBalloonExpr()
+! return "line " .. v:beval_lnum .. " column " .. v:beval_col .. ": " .. v:beval_text
+! endfun
+! redraw
+! [CODE]
+
+ func Test_balloon_eval_term()
+ " Use <Ignore> after <MouseMove> to return from vgetc() without removing
+*** ../vim-8.1.1361/src/testdir/test_bufline.vim 2019-05-16 22:24:52.403017783 +0200
+--- src/testdir/test_bufline.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 93,115 ****
+ 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
+--- 93,116 ----
+ endfunc
+
+ func Test_appendbufline_no_E315()
+! let after =<< trim [CODE]
+! 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!
+! [CODE]
+!
+ if !RunVim([], after, '--clean')
+ return
+ endif
+*** ../vim-8.1.1361/src/testdir/test_cindent.vim 2019-05-16 22:24:52.403017783 +0200
+--- src/testdir/test_cindent.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 18,42 ****
+ func Test_cino_extern_c()
+ " Test for cino-E
+
+! let without_ind = [
+! \ '#ifdef __cplusplus',
+! \ 'extern "C" {',
+! \ '#endif',
+! \ 'int func_a(void);',
+! \ '#ifdef __cplusplus',
+! \ '}',
+! \ '#endif'
+! \ ]
+!
+! let with_ind = [
+! \ '#ifdef __cplusplus',
+! \ 'extern "C" {',
+! \ '#endif',
+! \ "\tint func_a(void);",
+! \ '#ifdef __cplusplus',
+! \ '}',
+! \ '#endif'
+! \ ]
+ new
+ setlocal cindent cinoptions=E0
+ call setline(1, without_ind)
+--- 18,42 ----
+ func Test_cino_extern_c()
+ " Test for cino-E
+
+! let without_ind =<< trim [CODE]
+! #ifdef __cplusplus
+! extern "C" {
+! #endif
+! int func_a(void);
+! #ifdef __cplusplus
+! }
+! #endif
+! [CODE]
+!
+! let with_ind =<< trim [CODE]
+! #ifdef __cplusplus
+! extern "C" {
+! #endif
+! int func_a(void);
+! #ifdef __cplusplus
+! }
+! #endif
+! [CODE]
+ new
+ setlocal cindent cinoptions=E0
+ call setline(1, without_ind)
+***************
+*** 89,104 ****
+ return v:lnum == 1 ? shiftwidth() : 0
+ endfunc
+ setl expandtab sw=8 indentkeys+=; indentexpr=MyIndentFunction()
+! call setline(1, ['var_a = something()', 'b = something()'])
+ call cursor(1, 1)
+ call feedkeys("^\<c-v>j$A;\<esc>", 'tnix')
+! call assert_equal([' var_a = something();', 'b = something();'], getline(1, '$'))
+
+ %d
+! call setline(1, [' var_a = something()', ' b = something()'])
+ call cursor(1, 1)
+ call feedkeys("^\<c-v>j$A;\<esc>", 'tnix')
+! call assert_equal([' var_a = something();', ' b = something()'], getline(1, '$'))
+ bw!
+ endfunc
+
+--- 89,120 ----
+ return v:lnum == 1 ? shiftwidth() : 0
+ endfunc
+ setl expandtab sw=8 indentkeys+=; indentexpr=MyIndentFunction()
+! let testinput =<< trim [CODE]
+! var_a = something()
+! b = something()
+! [CODE]
+! call setline(1, testinput)
+ call cursor(1, 1)
+ call feedkeys("^\<c-v>j$A;\<esc>", 'tnix')
+! let expected =<< trim [CODE]
+! var_a = something();
+! b = something();
+! [CODE]
+! call assert_equal(expected, getline(1, '$'))
+
+ %d
+! let testinput =<< trim [CODE]
+! var_a = something()
+! b = something()
+! [CODE]
+! call setline(1, testinput)
+ call cursor(1, 1)
+ call feedkeys("^\<c-v>j$A;\<esc>", 'tnix')
+! let expected =<< trim [CODE]
+! var_a = something();
+! b = something()
+! [CODE]
+! call assert_equal(expected, getline(1, '$'))
+ bw!
+ endfunc
+
+*** ../vim-8.1.1361/src/testdir/test_conceal.vim 2019-01-14 21:51:17.987461933 +0100
+--- src/testdir/test_conceal.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 11,31 ****
+ endif
+
+ func Test_conceal_two_windows()
+! call writefile([
+! \ 'let lines = ["one one one one one", "two |hidden| here", "three |hidden| three"]',
+! \ 'call setline(1, lines)',
+! \ 'syntax match test /|hidden|/ conceal',
+! \ 'set conceallevel=2',
+! \ 'set concealcursor=',
+! \ 'exe "normal /here\r"',
+! \ 'new',
+! \ 'call setline(1, lines)',
+! \ 'call setline(4, "Second window")',
+! \ 'syntax match test /|hidden|/ conceal',
+! \ 'set conceallevel=2',
+! \ 'set concealcursor=nc',
+! \ 'exe "normal /here\r"',
+! \ ], 'XTest_conceal')
+ " Check that cursor line is concealed
+ let buf = RunVimInTerminal('-S XTest_conceal', {})
+ call VerifyScreenDump(buf, 'Test_conceal_two_windows_01', {})
+--- 11,33 ----
+ endif
+
+ func Test_conceal_two_windows()
+! let code =<< trim [CODE]
+! let lines = ["one one one one one", "two |hidden| here", "three |hidden| three"]
+! call setline(1, lines)
+! syntax match test /|hidden|/ conceal
+! set conceallevel=2
+! set concealcursor=
+! exe "normal /here\r"
+! new
+! call setline(1, lines)
+! call setline(4, "Second window")
+! syntax match test /|hidden|/ conceal
+! set conceallevel=2
+! set concealcursor=nc
+! exe "normal /here\r"
+! [CODE]
+!
+! call writefile(code, 'XTest_conceal')
+ " Check that cursor line is concealed
+ let buf = RunVimInTerminal('-S XTest_conceal', {})
+ call VerifyScreenDump(buf, 'Test_conceal_two_windows_01', {})
+***************
+*** 113,126 ****
+ func Test_conceal_with_cursorline()
+ " Opens a help window, where 'conceal' is set, switches to the other window
+ " where 'cursorline' needs to be updated when the cursor moves.
+! call writefile([
+! \ 'set cursorline',
+! \ 'normal othis is a test',
+! \ 'new',
+! \ 'call setline(1, ["one", "two", "three", "four", "five"])',
+! \ 'set ft=help',
+! \ 'normal M',
+! \ ], 'XTest_conceal_cul')
+ let buf = RunVimInTerminal('-S XTest_conceal_cul', {})
+ call VerifyScreenDump(buf, 'Test_conceal_cul_01', {})
+
+--- 115,130 ----
+ func Test_conceal_with_cursorline()
+ " Opens a help window, where 'conceal' is set, switches to the other window
+ " where 'cursorline' needs to be updated when the cursor moves.
+! let code =<< trim [CODE]
+! set cursorline
+! normal othis is a test
+! new
+! call setline(1, ["one", "two", "three", "four", "five"])
+! set ft=help
+! normal M
+! [CODE]
+!
+! call writefile(code, 'XTest_conceal_cul')
+ let buf = RunVimInTerminal('-S XTest_conceal_cul', {})
+ call VerifyScreenDump(buf, 'Test_conceal_cul_01', {})
+
+*** ../vim-8.1.1361/src/testdir/test_exit.vim 2018-03-11 14:36:34.000000000 +0100
+--- src/testdir/test_exit.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 3,54 ****
+ source shared.vim
+
+ func Test_exiting()
+! let after = [
+! \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout")',
+! \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")',
+! \ 'quit',
+! \ ]
+ if RunVim([], after, '')
+ call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout'))
+ endif
+ call delete('Xtestout')
+
+! let after = [
+! \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout")',
+! \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")',
+! \ 'help',
+! \ 'wincmd w',
+! \ 'quit',
+! \ ]
+ if RunVim([], after, '')
+ call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout'))
+ endif
+ call delete('Xtestout')
+
+! let after = [
+! \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout")',
+! \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")',
+! \ 'split',
+! \ 'new',
+! \ 'qall',
+! \ ]
+ if RunVim([], after, '')
+ call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout'))
+ endif
+ call delete('Xtestout')
+
+! let after = [
+! \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout", "a")',
+! \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")',
+! \ 'augroup nasty',
+! \ ' au ExitPre * split',
+! \ 'augroup END',
+! \ 'quit',
+! \ 'augroup nasty',
+! \ ' au! ExitPre',
+! \ 'augroup END',
+! \ 'quit',
+! \ ]
+ if RunVim([], after, '')
+ call assert_equal(['QuitPre', 'ExitPre', 'QuitPre', 'ExitPre'],
+ \ readfile('Xtestout'))
+--- 3,58 ----
+ source shared.vim
+
+ func Test_exiting()
+! let after =<< trim [CODE]
+! au QuitPre * call writefile(["QuitPre"], "Xtestout")
+! au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")
+! quit
+! [CODE]
+!
+ if RunVim([], after, '')
+ call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout'))
+ endif
+ call delete('Xtestout')
+
+! let after =<< trim [CODE]
+! au QuitPre * call writefile(["QuitPre"], "Xtestout")
+! au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")
+! help
+! wincmd w
+! quit
+! [CODE]
+!
+ if RunVim([], after, '')
+ call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout'))
+ endif
+ call delete('Xtestout')
+
+! let after =<< trim [CODE]
+! au QuitPre * call writefile(["QuitPre"], "Xtestout")
+! au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")
+! split
+! new
+! qall
+! [CODE]
+!
+ if RunVim([], after, '')
+ call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout'))
+ endif
+ call delete('Xtestout')
+
+! let after =<< trim [CODE]
+! au QuitPre * call writefile(["QuitPre"], "Xtestout", "a")
+! au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")
+! augroup nasty
+! au ExitPre * split
+! augroup END
+! quit
+! augroup nasty
+! au! ExitPre
+! augroup END
+! quit
+! [CODE]
+!
+ if RunVim([], after, '')
+ call assert_equal(['QuitPre', 'ExitPre', 'QuitPre', 'ExitPre'],
+ \ readfile('Xtestout'))
+*** ../vim-8.1.1361/src/testdir/test_fold.vim 2018-12-09 15:00:47.985798600 +0100
+--- src/testdir/test_fold.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 513,529 ****
+ 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)
+--- 513,530 ----
+ set fdm=marker fdl=9
+ set filetype=c
+
+! let content =<< trim [CODE]
+! /*
+! * comment
+! *
+! *
+! */
+! int f(int* p) {
+! *p = 3;
+! return 0;
+! }
+! [CODE]
+!
+ for c in range(len(content) - 1)
+ bw!
+ call append(0, content)
+*** ../vim-8.1.1361/src/testdir/test_goto.vim 2018-05-26 18:39:29.608575858 +0200
+--- src/testdir/test_goto.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 15,276 ****
+ endfunc
+
+ func Test_gD()
+! let lines = [
+! \ 'int x;',
+! \ '',
+! \ 'int func(void)',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gD', lines, 1, 5)
+ endfunc
+
+ func Test_gD_too()
+! let lines = [
+! \ 'Filename x;',
+! \ '',
+! \ 'int Filename',
+! \ 'int func() {',
+! \ ' Filename x;',
+! \ ' return x;',
+! \ ]
+ call XTest_goto_decl('gD', lines, 1, 10)
+ endfunc
+
+ func Test_gD_comment()
+! let lines = [
+! \ '/* int x; */',
+! \ 'int x;',
+! \ '',
+! \ 'int func(void)',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gD', lines, 2, 5)
+ endfunc
+
+ func Test_gD_inline_comment()
+! let lines = [
+! \ 'int y /* , x */;',
+! \ 'int x;',
+! \ '',
+! \ 'int func(void)',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gD', lines, 2, 5)
+ endfunc
+
+ func Test_gD_string()
+! let lines = [
+! \ 'char *s[] = "x";',
+! \ 'int x = 1;',
+! \ '',
+! \ 'int func(void)',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gD', lines, 2, 5)
+ endfunc
+
+ func Test_gD_string_same_line()
+! let lines = [
+! \ 'char *s[] = "x", int x = 1;',
+! \ '',
+! \ 'int func(void)',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gD', lines, 1, 22)
+ endfunc
+
+ func Test_gD_char()
+! let lines = [
+! \ "char c = 'x';",
+! \ 'int x = 1;',
+! \ '',
+! \ 'int func(void)',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gD', lines, 2, 5)
+ endfunc
+
+ func Test_gd()
+! let lines = [
+! \ 'int x;',
+! \ '',
+! \ 'int func(int x)',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gd', lines, 3, 14)
+ endfunc
+
+ func Test_gd_not_local()
+! let lines = [
+! \ 'int func1(void)',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ '',
+! \ 'int func2(int x)',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gd', lines, 3, 10)
+ endfunc
+
+ func Test_gd_kr_style()
+! let lines = [
+! \ 'int func(x)',
+! \ ' int x;',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gd', lines, 2, 7)
+ endfunc
+
+ func Test_gd_missing_braces()
+! let lines = [
+! \ 'def func1(a)',
+! \ ' a + 1',
+! \ 'end',
+! \ '',
+! \ 'a = 1',
+! \ '',
+! \ 'def func2()',
+! \ ' return a',
+! \ 'end',
+! \ ]
+ call XTest_goto_decl('gd', lines, 1, 11)
+ endfunc
+
+ func Test_gd_comment()
+! let lines = [
+! \ 'int func(void)',
+! \ '{',
+! \ ' /* int x; */',
+! \ ' int x;',
+! \ ' return x;',
+! \ '}',
+! \]
+ call XTest_goto_decl('gd', lines, 4, 7)
+ endfunc
+
+ func Test_gd_comment_in_string()
+! let lines = [
+! \ 'int func(void)',
+! \ '{',
+! \ ' char *s ="//"; int x;',
+! \ ' int x;',
+! \ ' return x;',
+! \ '}',
+! \]
+ call XTest_goto_decl('gd', lines, 3, 22)
+ endfunc
+
+ func Test_gd_string_in_comment()
+ set comments=
+! let lines = [
+! \ 'int func(void)',
+! \ '{',
+! \ ' /* " */ int x;',
+! \ ' int x;',
+! \ ' return x;',
+! \ '}',
+! \]
+ call XTest_goto_decl('gd', lines, 3, 15)
+ set comments&
+ endfunc
+
+ func Test_gd_inline_comment()
+! let lines = [
+! \ 'int func(/* x is an int */ int x)',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gd', lines, 1, 32)
+ endfunc
+
+ func Test_gd_inline_comment_only()
+! let lines = [
+! \ 'int func(void) /* one lonely x */',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gd', lines, 3, 10)
+ endfunc
+
+ func Test_gd_inline_comment_body()
+! let lines = [
+! \ 'int func(void)',
+! \ '{',
+! \ ' int y /* , x */;',
+! \ '',
+! \ ' for (/* int x = 0 */; y < 2; y++);',
+! \ '',
+! \ ' int x = 0;',
+! \ '',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gd', lines, 7, 7)
+ endfunc
+
+ func Test_gd_trailing_multiline_comment()
+! let lines = [
+! \ 'int func(int x) /* x is an int */',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gd', lines, 1, 14)
+ endfunc
+
+ func Test_gd_trailing_comment()
+! let lines = [
+! \ 'int func(int x) // x is an int',
+! \ '{',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gd', lines, 1, 14)
+ endfunc
+
+ func Test_gd_string()
+! let lines = [
+! \ 'int func(void)',
+! \ '{',
+! \ ' char *s = "x";',
+! \ ' int x = 1;',
+! \ '',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gd', lines, 4, 7)
+ endfunc
+
+ func Test_gd_string_only()
+! let lines = [
+! \ 'int func(void)',
+! \ '{',
+! \ ' char *s = "x";',
+! \ '',
+! \ ' return x;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('gd', lines, 5, 10)
+ endfunc
+
+--- 15,296 ----
+ endfunc
+
+ func Test_gD()
+! let lines =<< trim [CODE]
+! int x;
+!
+! int func(void)
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gD', lines, 1, 5)
+ endfunc
+
+ func Test_gD_too()
+! let lines =<< trim [CODE]
+! Filename x;
+!
+! int Filename
+! int func() {
+! Filename x;
+! return x;
+! [CODE]
+!
+ call XTest_goto_decl('gD', lines, 1, 10)
+ endfunc
+
+ func Test_gD_comment()
+! let lines =<< trim [CODE]
+! /* int x; */
+! int x;
+!
+! int func(void)
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gD', lines, 2, 5)
+ endfunc
+
+ func Test_gD_inline_comment()
+! let lines =<< trim [CODE]
+! int y /* , x */;
+! int x;
+!
+! int func(void)
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gD', lines, 2, 5)
+ endfunc
+
+ func Test_gD_string()
+! let lines =<< trim [CODE]
+! char *s[] = "x";
+! int x = 1;
+!
+! int func(void)
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gD', lines, 2, 5)
+ endfunc
+
+ func Test_gD_string_same_line()
+! let lines =<< trim [CODE]
+! char *s[] = "x", int x = 1;
+!
+! int func(void)
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gD', lines, 1, 22)
+ endfunc
+
+ func Test_gD_char()
+! let lines =<< trim [CODE]
+! char c = 'x';
+! int x = 1;
+!
+! int func(void)
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gD', lines, 2, 5)
+ endfunc
+
+ func Test_gd()
+! let lines =<< trim [CODE]
+! int x;
+!
+! int func(int x)
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 3, 14)
+ endfunc
+
+ func Test_gd_not_local()
+! let lines =<< trim [CODE]
+! int func1(void)
+! {
+! return x;
+! }
+!
+! int func2(int x)
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 3, 10)
+ endfunc
+
+ func Test_gd_kr_style()
+! let lines =<< trim [CODE]
+! int func(x)
+! int x;
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 2, 7)
+ endfunc
+
+ func Test_gd_missing_braces()
+! let lines =<< trim [CODE]
+! def func1(a)
+! a + 1
+! end
+!
+! a = 1
+!
+! def func2()
+! return a
+! end
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 1, 11)
+ endfunc
+
+ func Test_gd_comment()
+! let lines =<< trim [CODE]
+! int func(void)
+! {
+! /* int x; */
+! int x;
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 4, 7)
+ endfunc
+
+ func Test_gd_comment_in_string()
+! let lines =<< trim [CODE]
+! int func(void)
+! {
+! char *s ="//"; int x;
+! int x;
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 3, 22)
+ endfunc
+
+ func Test_gd_string_in_comment()
+ set comments=
+! let lines =<< trim [CODE]
+! int func(void)
+! {
+! /* " */ int x;
+! int x;
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 3, 15)
+ set comments&
+ endfunc
+
+ func Test_gd_inline_comment()
+! let lines =<< trim [CODE]
+! int func(/* x is an int */ int x)
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 1, 32)
+ endfunc
+
+ func Test_gd_inline_comment_only()
+! let lines =<< trim [CODE]
+! int func(void) /* one lonely x */
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 3, 10)
+ endfunc
+
+ func Test_gd_inline_comment_body()
+! let lines =<< trim [CODE]
+! int func(void)
+! {
+! int y /* , x */;
+!
+! for (/* int x = 0 */; y < 2; y++);
+!
+! int x = 0;
+!
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 7, 7)
+ endfunc
+
+ func Test_gd_trailing_multiline_comment()
+! let lines =<< trim [CODE]
+! int func(int x) /* x is an int */
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 1, 14)
+ endfunc
+
+ func Test_gd_trailing_comment()
+! let lines =<< trim [CODE]
+! int func(int x) // x is an int
+! {
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 1, 14)
+ endfunc
+
+ func Test_gd_string()
+! let lines =<< trim [CODE]
+! int func(void)
+! {
+! char *s = "x";
+! int x = 1;
+!
+! return x;
+! }
+! [CODE]
+ call XTest_goto_decl('gd', lines, 4, 7)
+ endfunc
+
+ func Test_gd_string_only()
+! let lines =<< trim [CODE]
+! int func(void)
+! {
+! char *s = "x";
+!
+! return x;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('gd', lines, 5, 10)
+ endfunc
+
+***************
+*** 289,312 ****
+ endfunc
+
+ func Test_gd_local_block()
+! let lines = [
+! \ ' int main()',
+! \ '{',
+! \ ' char *a = "NOT NULL";',
+! \ ' if(a)',
+! \ ' {',
+! \ ' char *b = a;',
+! \ ' printf("%s\n", b);',
+! \ ' }',
+! \ ' else',
+! \ ' {',
+! \ ' char *b = "NULL";',
+! \ ' return b;',
+! \ ' }',
+! \ '',
+! \ ' return 0;',
+! \ '}',
+! \ ]
+ call XTest_goto_decl('1gd', lines, 11, 11)
+ endfunc
+
+--- 309,333 ----
+ endfunc
+
+ func Test_gd_local_block()
+! let lines =<< trim [CODE]
+! int main()
+! {
+! char *a = "NOT NULL";
+! if(a)
+! {
+! char *b = a;
+! printf("%s\n", b);
+! }
+! else
+! {
+! char *b = "NULL";
+! return b;
+! }
+!
+! return 0;
+! }
+! [CODE]
+!
+ call XTest_goto_decl('1gd', lines, 11, 11)
+ endfunc
+
+*** ../vim-8.1.1361/src/testdir/test_join.vim 2019-05-14 17:57:14.861402461 +0200
+--- src/testdir/test_join.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 98,127 ****
+ normal `xyl$p
+ normal `yy2l$p
+
+- normal G
+- let last_line = line('$')
+-
+ " Expected output
+! append
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! zx cvn. as dfg? hjkl iop! ert ernop
+! zx cvn. as dfg? hjkl iop! ert ernop
+! .
+
+! call assert_equal(getline(last_line + 1, '$'), getline(1, last_line))
+
+ enew!
+ call append(0, text)
+--- 98,124 ----
+ normal `xyl$p
+ normal `yy2l$p
+
+ " Expected output
+! let expected =<< trim [DATA]
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! zx cvn. as dfg? hjkl iop! ert ernop
+! zx cvn. as dfg? hjkl iop! ert ernop
+! [DATA]
+
+! call assert_equal(expected, getline(1, '$'))
+
+ enew!
+ call append(0, text)
+***************
+*** 143,173 ****
+ normal `xyl$p
+ normal `yy2l$p
+
+- normal G
+- let last_line = line('$')
+-
+ " Expected output
+! append
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! zx cvn. as dfg? hjkl iop! ert enop
+! zx cvn. as dfg? hjkl iop! ert ernop
+
+! .
+
+! call assert_equal(getline(last_line + 1, '$'), getline(1, last_line))
+
+ enew!
+ call append(0, text)
+--- 140,167 ----
+ normal `xyl$p
+ normal `yy2l$p
+
+ " Expected output
+! let expected =<< trim [DATA]
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! zx cvn. as dfg? hjkl iop! ert enop
+! zx cvn. as dfg? hjkl iop! ert ernop
+
+! [DATA]
+
+! call assert_equal(expected, getline(1, '$'))
+
+ enew!
+ call append(0, text)
+***************
+*** 180,208 ****
+ normal JjJjJjJjJjJjJjJjJjJjJjJjJjJ
+ normal j4Jy3l$pjdG
+
+- normal G
+- let last_line = line('$')
+-
+ " Expected output
+! append
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! zx cvn. as dfg? hjkl iop! ert a
+! .
+
+! call assert_equal(getline(last_line + 1, '$'), getline(1, last_line))
+
+ set nocompatible
+ set cpoptions&vim
+--- 174,199 ----
+ normal JjJjJjJjJjJjJjJjJjJjJjJjJjJ
+ normal j4Jy3l$pjdG
+
+ " Expected output
+! let expected =<< trim [DATA]
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf. asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! asdfasdf asdf
+! zx cvn. as dfg? hjkl iop! ert a
+! [DATA]
+
+! call assert_equal(expected, getline(1, '$'))
+
+ set nocompatible
+ set cpoptions&vim
+***************
+*** 262,272 ****
+ .,+2join
+ exe "normal jj3J\<CR>"
+
+- normal G
+- let last_line = line('$')
+-
+ " Expected output
+! append
+ {
+ /* Make sure the previous comment leader is not removed. */
+ /* Make sure the previous comment leader is not removed. */
+--- 253,260 ----
+ .,+2join
+ exe "normal jj3J\<CR>"
+
+ " Expected output
+! let expected =<< trim [CODE]
+ {
+ /* Make sure the previous comment leader is not removed. */
+ /* Make sure the previous comment leader is not removed. */
+***************
+*** 279,287 ****
+ if (condition) // Remove the next comment leader! OK, I will.
+ action();
+ }
+! .
+
+! call assert_equal(getline(last_line + 1, '$'), getline(1, last_line))
+
+ set comments&vim
+ set joinspaces&vim
+--- 267,275 ----
+ if (condition) // Remove the next comment leader! OK, I will.
+ action();
+ }
+! [CODE]
+
+! call assert_equal(expected, getline(1, '$'))
+
+ set comments&vim
+ set joinspaces&vim
+***************
+*** 389,399 ****
+ exe "normal j6J\<CR>"
+ exe "normal oSome code!\<CR>// Make sure backspacing does not remove this comment leader.\<Esc>0i\<C-H>\<Esc>"
+
+- normal G
+- let last_line = line('$')
+-
+ " Expected output
+! append
+ {
+ /* Make sure the previous comment leader is not removed. */
+ /* Make sure the previous comment leader is not removed. */
+--- 377,384 ----
+ exe "normal j6J\<CR>"
+ exe "normal oSome code!\<CR>// Make sure backspacing does not remove this comment leader.\<Esc>0i\<C-H>\<Esc>"
+
+ " Expected output
+! let expected =<< [CODE]
+ {
+ /* Make sure the previous comment leader is not removed. */
+ /* Make sure the previous comment leader is not removed. */
+***************
+*** 416,423 ****
+
+ Some code!// Make sure backspacing does not remove this comment leader.
+ }
+! .
+
+! call assert_equal(getline(last_line + 1, '$'), getline(1, last_line))
+ close!
+ endfunc
+--- 401,408 ----
+
+ Some code!// Make sure backspacing does not remove this comment leader.
+ }
+! [CODE]
+
+! call assert_equal(expected, getline(1, '$'))
+ close!
+ endfunc
+*** ../vim-8.1.1361/src/testdir/test_mksession_utf8.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_mksession_utf8.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 65,98 ****
+ call wincol()
+ mksession! test_mks.out
+ let li = filter(readfile('test_mks.out'), 'v:val =~# "\\(^ *normal! 0\\|^ *exe ''normal!\\)"')
+! let expected = [
+! \ 'normal! 016|',
+! \ 'normal! 016|',
+! \ 'normal! 016|',
+! \ 'normal! 08|',
+! \ 'normal! 08|',
+! \ 'normal! 016|',
+! \ 'normal! 016|',
+! \ 'normal! 016|',
+! \ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
+! \ " normal! 016|",
+! \ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
+! \ " normal! 016|",
+! \ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
+! \ " normal! 016|",
+! \ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
+! \ " normal! 08|",
+! \ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
+! \ " normal! 08|",
+! \ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
+! \ " normal! 016|",
+! \ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
+! \ " normal! 016|",
+! \ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
+! \ " normal! 016|",
+! \ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
+! \ " normal! 016|"
+! \ ]
+ call assert_equal(expected, li)
+ tabclose!
+
+--- 65,99 ----
+ call wincol()
+ mksession! test_mks.out
+ let li = filter(readfile('test_mks.out'), 'v:val =~# "\\(^ *normal! 0\\|^ *exe ''normal!\\)"')
+! let expected =<< trim [DATA]
+! normal! 016|
+! normal! 016|
+! normal! 016|
+! normal! 08|
+! normal! 08|
+! normal! 016|
+! normal! 016|
+! normal! 016|
+! exe 'normal! ' . s:c . '|zs' . 16 . '|'
+! normal! 016|
+! exe 'normal! ' . s:c . '|zs' . 16 . '|'
+! normal! 016|
+! exe 'normal! ' . s:c . '|zs' . 16 . '|'
+! normal! 016|
+! exe 'normal! ' . s:c . '|zs' . 8 . '|'
+! normal! 08|
+! exe 'normal! ' . s:c . '|zs' . 8 . '|'
+! normal! 08|
+! exe 'normal! ' . s:c . '|zs' . 16 . '|'
+! normal! 016|
+! exe 'normal! ' . s:c . '|zs' . 16 . '|'
+! normal! 016|
+! exe 'normal! ' . s:c . '|zs' . 16 . '|'
+! normal! 016|
+! exe 'normal! ' . s:c . '|zs' . 16 . '|'
+! normal! 016|
+! [DATA]
+!
+ call assert_equal(expected, li)
+ tabclose!
+
+*** ../vim-8.1.1361/src/testdir/test_normal.vim 2019-04-27 18:00:29.851064563 +0200
+--- src/testdir/test_normal.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 1555,1627 ****
+
+ fun! Test_normal29_brace()
+ " basic test for { and } movements
+! let text= ['A paragraph begins after each empty line, and also at each of a set of',
+! \ 'paragraph macros, specified by the pairs of characters in the ''paragraphs''',
+! \ 'option. The default is "IPLPPPQPP TPHPLIPpLpItpplpipbp", which corresponds to',
+! \ 'the macros ".IP", ".LP", etc. (These are nroff macros, so the dot must be in',
+! \ 'the first column). A section boundary is also a paragraph boundary.',
+! \ 'Note that a blank line (only containing white space) is NOT a paragraph',
+! \ 'boundary.',
+! \ '',
+! \ '',
+! \ 'Also note that this does not include a ''{'' or ''}'' in the first column. When',
+! \ 'the ''{'' flag is in ''cpoptions'' then ''{'' in the first column is used as a',
+! \ 'paragraph boundary |posix|.',
+! \ '{',
+! \ 'This is no paragraph',
+! \ 'unless the ''{'' is set',
+! \ 'in ''cpoptions''',
+! \ '}',
+! \ '.IP',
+! \ 'The nroff macros IP separates a paragraph',
+! \ 'That means, it must be a ''.''',
+! \ 'followed by IP',
+! \ '.LPIt does not matter, if afterwards some',
+! \ 'more characters follow.',
+! \ '.SHAlso section boundaries from the nroff',
+! \ 'macros terminate a paragraph. That means',
+! \ 'a character like this:',
+! \ '.NH',
+! \ 'End of text here']
+ new
+ call append(0, text)
+ 1
+ norm! 0d2}
+! call assert_equal(['.IP',
+! \ 'The nroff macros IP separates a paragraph', 'That means, it must be a ''.''', 'followed by IP',
+! \ '.LPIt does not matter, if afterwards some', 'more characters follow.', '.SHAlso section boundaries from the nroff',
+! \ 'macros terminate a paragraph. That means', 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$'))
+ norm! 0d}
+! call assert_equal(['.LPIt does not matter, if afterwards some', 'more characters follow.',
+! \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means',
+! \ 'a character like this:', '.NH', 'End of text here', ''], getline(1, '$'))
+ $
+ norm! d{
+! call assert_equal(['.LPIt does not matter, if afterwards some', 'more characters follow.',
+! \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means', 'a character like this:', ''], getline(1, '$'))
+ norm! d{
+! call assert_equal(['.LPIt does not matter, if afterwards some', 'more characters follow.', ''], getline(1,'$'))
+ " Test with { in cpooptions
+ %d
+ call append(0, text)
+ set cpo+={
+ 1
+ norm! 0d2}
+! call assert_equal(['{', 'This is no paragraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}',
+! \ '.IP', 'The nroff macros IP separates a paragraph', 'That means, it must be a ''.''',
+! \ 'followed by IP', '.LPIt does not matter, if afterwards some', 'more characters follow.',
+! \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means',
+! \ 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$'))
+ $
+ norm! d}
+! call assert_equal(['{', 'This is no paragraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}',
+! \ '.IP', 'The nroff macros IP separates a paragraph', 'That means, it must be a ''.''',
+! \ 'followed by IP', '.LPIt does not matter, if afterwards some', 'more characters follow.',
+! \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means',
+! \ 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$'))
+ norm! gg}
+ norm! d5}
+! call assert_equal(['{', 'This is no paragraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', ''], getline(1,'$'))
+
+ " clean up
+ set cpo-={
+--- 1555,1712 ----
+
+ fun! Test_normal29_brace()
+ " basic test for { and } movements
+! let text =<< trim [DATA]
+! A paragraph begins after each empty line, and also at each of a set of
+! paragraph macros, specified by the pairs of characters in the 'paragraphs'
+! option. The default is "IPLPPPQPP TPHPLIPpLpItpplpipbp", which corresponds to
+! the macros ".IP", ".LP", etc. (These are nroff macros, so the dot must be in
+! the first column). A section boundary is also a paragraph boundary.
+! Note that a blank line (only containing white space) is NOT a paragraph
+! boundary.
+!
+!
+! Also note that this does not include a '{' or '}' in the first column. When
+! the '{' flag is in 'cpoptions' then '{' in the first column is used as a
+! paragraph boundary |posix|.
+! {
+! This is no paragraph
+! unless the '{' is set
+! in 'cpoptions'
+! }
+! .IP
+! The nroff macros IP separates a paragraph
+! That means, it must be a '.'
+! followed by IP
+! .LPIt does not matter, if afterwards some
+! more characters follow.
+! .SHAlso section boundaries from the nroff
+! macros terminate a paragraph. That means
+! a character like this:
+! .NH
+! End of text here
+! [DATA]
+!
+ new
+ call append(0, text)
+ 1
+ norm! 0d2}
+!
+! let expected =<< trim [DATA]
+! .IP
+! The nroff macros IP separates a paragraph
+! That means, it must be a '.'
+! followed by IP
+! .LPIt does not matter, if afterwards some
+! more characters follow.
+! .SHAlso section boundaries from the nroff
+! macros terminate a paragraph. That means
+! a character like this:
+! .NH
+! End of text here
+!
+! [DATA]
+! call assert_equal(expected, getline(1, '$'))
+!
+ norm! 0d}
+!
+! let expected =<< trim [DATA]
+! .LPIt does not matter, if afterwards some
+! more characters follow.
+! .SHAlso section boundaries from the nroff
+! macros terminate a paragraph. That means
+! a character like this:
+! .NH
+! End of text here
+!
+! [DATA]
+! call assert_equal(expected, getline(1, '$'))
+!
+ $
+ norm! d{
+!
+! let expected =<< trim [DATA]
+! .LPIt does not matter, if afterwards some
+! more characters follow.
+! .SHAlso section boundaries from the nroff
+! macros terminate a paragraph. That means
+! a character like this:
+!
+! [DATA]
+! call assert_equal(expected, getline(1, '$'))
+!
+ norm! d{
+!
+! let expected =<< trim [DATA]
+! .LPIt does not matter, if afterwards some
+! more characters follow.
+!
+! [DATA]
+! call assert_equal(expected, getline(1, '$'))
+!
+ " Test with { in cpooptions
+ %d
+ call append(0, text)
+ set cpo+={
+ 1
+ norm! 0d2}
+!
+! let expected =<< trim [DATA]
+! {
+! This is no paragraph
+! unless the '{' is set
+! in 'cpoptions'
+! }
+! .IP
+! The nroff macros IP separates a paragraph
+! That means, it must be a '.'
+! followed by IP
+! .LPIt does not matter, if afterwards some
+! more characters follow.
+! .SHAlso section boundaries from the nroff
+! macros terminate a paragraph. That means
+! a character like this:
+! .NH
+! End of text here
+!
+! [DATA]
+! call assert_equal(expected, getline(1, '$'))
+!
+ $
+ norm! d}
+!
+! let expected =<< trim [DATA]
+! {
+! This is no paragraph
+! unless the '{' is set
+! in 'cpoptions'
+! }
+! .IP
+! The nroff macros IP separates a paragraph
+! That means, it must be a '.'
+! followed by IP
+! .LPIt does not matter, if afterwards some
+! more characters follow.
+! .SHAlso section boundaries from the nroff
+! macros terminate a paragraph. That means
+! a character like this:
+! .NH
+! End of text here
+!
+! [DATA]
+! call assert_equal(expected, getline(1, '$'))
+!
+ norm! gg}
+ norm! d5}
+!
+! let expected =<< trim [DATA]
+! {
+! This is no paragraph
+! unless the '{' is set
+! in 'cpoptions'
+! }
+!
+! [DATA]
+! call assert_equal(expected, getline(1, '$'))
+
+ " clean up
+ set cpo-={
+*** ../vim-8.1.1361/src/testdir/test_profile.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_profile.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 4,37 ****
+ endif
+
+ func Test_profile_func()
+! let lines = [
+! \ 'profile start Xprofile_func.log',
+! \ 'profile func Foo*"',
+! \ "func! Foo1()",
+! \ "endfunc",
+! \ "func! Foo2()",
+! \ " let l:count = 100",
+! \ " while l:count > 0",
+! \ " let l:count = l:count - 1",
+! \ " endwhile",
+! \ "endfunc",
+! \ "func! Foo3()",
+! \ "endfunc",
+! \ "func! Bar()",
+! \ "endfunc",
+! \ "call Foo1()",
+! \ "call Foo1()",
+! \ "profile pause",
+! \ "call Foo1()",
+! \ "profile continue",
+! \ "call Foo2()",
+! \ "call Foo3()",
+! \ "call Bar()",
+! \ "if !v:profiling",
+! \ " delfunc Foo2",
+! \ "endif",
+! \ "delfunc Foo3",
+! \ ]
+
+ call writefile(lines, 'Xprofile_func.vim')
+ call system(v:progpath
+--- 4,37 ----
+ endif
+
+ func Test_profile_func()
+! let lines =<< trim [CODE]
+! profile start Xprofile_func.log
+! profile func Foo*
+! func! Foo1()
+! endfunc
+! func! Foo2()
+! let l:count = 100
+! while l:count > 0
+! let l:count = l:count - 1
+! endwhile
+! endfunc
+! func! Foo3()
+! endfunc
+! func! Bar()
+! endfunc
+! call Foo1()
+! call Foo1()
+! profile pause
+! call Foo1()
+! profile continue
+! call Foo2()
+! call Foo3()
+! call Bar()
+! if !v:profiling
+! delfunc Foo2
+! endif
+! delfunc Foo3
+! [CODE]
+
+ call writefile(lines, 'Xprofile_func.vim')
+ call system(v:progpath
+***************
+*** 86,123 ****
+ 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
+--- 86,123 ----
+ endfunc
+
+ func Test_profile_func_with_ifelse()
+! let lines =<< trim [CODE]
+! 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()
+! [CODE]
+
+ call writefile(lines, 'Xprofile_func.vim')
+ call system(v:progpath
+***************
+*** 196,236 ****
+ 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
+--- 196,236 ----
+ endfunc
+
+ func Test_profile_func_with_trycatch()
+! let lines =<< trim [CODE]
+! 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
+! [CODE]
+
+ call writefile(lines, 'Xprofile_func.vim')
+ call system(v:progpath
+***************
+*** 309,323 ****
+ endfunc
+
+ func Test_profile_file()
+! let lines = [
+! \ 'func! Foo()',
+! \ 'endfunc',
+! \ 'for i in range(10)',
+! \ ' " a comment',
+! \ ' call Foo()',
+! \ 'endfor',
+! \ 'call Foo()',
+! \ ]
+
+ call writefile(lines, 'Xprofile_file.vim')
+ call system(v:progpath
+--- 309,323 ----
+ endfunc
+
+ func Test_profile_file()
+! let lines =<< trim [CODE]
+! func! Foo()
+! endfunc
+! for i in range(10)
+! " a comment
+! call Foo()
+! endfor
+! call Foo()
+! [CODE]
+
+ call writefile(lines, 'Xprofile_file.vim')
+ call system(v:progpath
+***************
+*** 448,473 ****
+ endfunc
+
+ func Test_profdel_func()
+! let lines = [
+! \ 'profile start Xprofile_file.log',
+! \ 'func! Foo1()',
+! \ 'endfunc',
+! \ 'func! Foo2()',
+! \ 'endfunc',
+! \ 'func! Foo3()',
+! \ 'endfunc',
+! \ '',
+! \ 'profile func Foo1',
+! \ 'profile func Foo2',
+! \ 'call Foo1()',
+! \ 'call Foo2()',
+! \ '',
+! \ 'profile func Foo3',
+! \ 'profdel func Foo2',
+! \ 'profdel func Foo3',
+! \ 'call Foo1()',
+! \ 'call Foo2()',
+! \ 'call Foo3()' ]
+ call writefile(lines, 'Xprofile_file.vim')
+ call system(v:progpath . ' -es --clean -c "so Xprofile_file.vim" -c q')
+ call assert_equal(0, v:shell_error)
+--- 448,474 ----
+ endfunc
+
+ func Test_profdel_func()
+! let lines =<< trim [CODE]
+! profile start Xprofile_file.log
+! func! Foo1()
+! endfunc
+! func! Foo2()
+! endfunc
+! func! Foo3()
+! endfunc
+!
+! profile func Foo1
+! profile func Foo2
+! call Foo1()
+! call Foo2()
+!
+! profile func Foo3
+! profdel func Foo2
+! profdel func Foo3
+! call Foo1()
+! call Foo2()
+! call Foo3()
+! [CODE]
+ call writefile(lines, 'Xprofile_file.vim')
+ call system(v:progpath . ' -es --clean -c "so Xprofile_file.vim" -c q')
+ call assert_equal(0, v:shell_error)
+***************
+*** 494,507 ****
+ func Test_profdel_star()
+ " Foo() is invoked once before and once after 'profdel *'.
+ " So profiling should report it only once.
+! let lines = [
+! \ 'profile start Xprofile_file.log',
+! \ 'func! Foo()',
+! \ 'endfunc',
+! \ 'profile func Foo',
+! \ 'call Foo()',
+! \ 'profdel *',
+! \ 'call Foo()' ]
+ call writefile(lines, 'Xprofile_file.vim')
+ call system(v:progpath . ' -es --clean -c "so Xprofile_file.vim" -c q')
+ call assert_equal(0, v:shell_error)
+--- 495,509 ----
+ func Test_profdel_star()
+ " Foo() is invoked once before and once after 'profdel *'.
+ " So profiling should report it only once.
+! let lines =<< trim [CODE]
+! profile start Xprofile_file.log
+! func! Foo()
+! endfunc
+! profile func Foo
+! call Foo()
+! profdel *
+! call Foo()
+! [CODE]
+ call writefile(lines, 'Xprofile_file.vim')
+ call system(v:progpath . ' -es --clean -c "so Xprofile_file.vim" -c q')
+ call assert_equal(0, v:shell_error)
+*** ../vim-8.1.1361/src/testdir/test_quickfix.vim 2019-05-05 21:00:22.854603956 +0200
+--- src/testdir/test_quickfix.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 818,885 ****
+ return
+ endif
+
+! let l = [
+! \ '"Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set.',
+! \ '"Xtestfile", line 6 col 19; this is an error',
+! \ 'gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include version.c',
+! \ 'Xtestfile:9: parse error before `asd''',
+! \ 'make: *** [vim] Error 1',
+! \ 'in file "Xtestfile" linenr 10: there is an error',
+! \ '',
+! \ '2 returned',
+! \ '"Xtestfile", line 11 col 1; this is an error',
+! \ '"Xtestfile", line 12 col 2; this is another error',
+! \ '"Xtestfile", line 14:10; this is an error in column 10',
+! \ '=Xtestfile=, line 15:10; this is another error, but in vcol 10 this time',
+! \ '"Xtestfile", linenr 16: yet another problem',
+! \ 'Error in "Xtestfile" at line 17:',
+! \ 'x should be a dot',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17',
+! \ ' ^',
+! \ 'Error in "Xtestfile" at line 18:',
+! \ 'x should be a dot',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18',
+! \ '.............^',
+! \ 'Error in "Xtestfile" at line 19:',
+! \ 'x should be a dot',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19',
+! \ '--------------^',
+! \ 'Error in "Xtestfile" at line 20:',
+! \ 'x should be a dot',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20',
+! \ ' ^',
+! \ '',
+! \ 'Does anyone know what is the problem and how to correction it?',
+! \ '"Xtestfile", line 21 col 9: What is the title of the quickfix window?',
+! \ '"Xtestfile", line 22 col 9: What is the title of the quickfix window?'
+! \ ]
+
+ call writefile(l, 'Xerrorfile1')
+ call writefile(l[:-2], 'Xerrorfile2')
+
+! let m = [
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 2',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 3',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 4',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 5',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 6',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 7',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 8',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 9',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 10',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 11',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 12',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 13',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 14',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 15',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 16',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 21',
+! \ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 22'
+! \ ]
+ call writefile(m, 'Xtestfile')
+
+ let save_efm = &efm
+--- 818,885 ----
+ return
+ endif
+
+! let l =<< trim [DATA]
+! "Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set.
+! "Xtestfile", line 6 col 19; this is an error
+! gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include version.c
+! Xtestfile:9: parse error before `asd'
+! make: *** [vim] Error 1
+! in file "Xtestfile" linenr 10: there is an error
+!
+! 2 returned
+! "Xtestfile", line 11 col 1; this is an error
+! "Xtestfile", line 12 col 2; this is another error
+! "Xtestfile", line 14:10; this is an error in column 10
+! =Xtestfile=, line 15:10; this is another error, but in vcol 10 this time
+! "Xtestfile", linenr 16: yet another problem
+! Error in "Xtestfile" at line 17:
+! x should be a dot
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17
+! ^
+! Error in "Xtestfile" at line 18:
+! x should be a dot
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18
+! .............^
+! Error in "Xtestfile" at line 19:
+! x should be a dot
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19
+! --------------^
+! Error in "Xtestfile" at line 20:
+! x should be a dot
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20
+! ^
+!
+! Does anyone know what is the problem and how to correction it?
+! "Xtestfile", line 21 col 9: What is the title of the quickfix window?
+! "Xtestfile", line 22 col 9: What is the title of the quickfix window?
+! [DATA]
+
+ call writefile(l, 'Xerrorfile1')
+ call writefile(l[:-2], 'Xerrorfile2')
+
+! let m =<< trim [DATA]
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 2
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 3
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 4
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 5
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 6
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 7
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 8
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 9
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 10
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 11
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 12
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 13
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 14
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 15
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 16
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 21
+! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 22
+! [DATA]
+ call writefile(m, 'Xtestfile')
+
+ let save_efm = &efm
+***************
+*** 1092,1112 ****
+ call assert_equal([' 1 Xtestfile:^\VLine search text\$: '], l)
+
+ " Test for %P, %Q and %t format specifiers
+! let lines=["[Xtestfile1]",
+! \ "(1,17) error: ';' missing",
+! \ "(21,2) warning: variable 'z' not defined",
+! \ "(67,3) error: end of file found before string ended",
+! \ "--",
+! \ "",
+! \ "[Xtestfile2]",
+! \ "--",
+! \ "",
+! \ "[Xtestfile3]",
+! \ "NEW compiler v1.1",
+! \ "(2,2) warning: variable 'x' not defined",
+! \ "(67,3) warning: 's' already defined",
+! \ "--"
+! \]
+ set efm=%+P[%f]%r,(%l\\,%c)%*[\ ]%t%*[^:]:\ %m,%+Q--%r
+ " To exercise the push/pop file functionality in quickfix, the test files
+ " need to be created.
+--- 1092,1114 ----
+ call assert_equal([' 1 Xtestfile:^\VLine search text\$: '], l)
+
+ " Test for %P, %Q and %t format specifiers
+! let lines =<< trim [DATA]
+! [Xtestfile1]
+! (1,17) error: ';' missing
+! (21,2) warning: variable 'z' not defined
+! (67,3) error: end of file found before string ended
+! --
+!
+! [Xtestfile2]
+! --
+!
+! [Xtestfile3]
+! NEW compiler v1.1
+! (2,2) warning: variable 'x' not defined
+! (67,3) warning: 's' already defined
+! --
+! [DATA]
+!
+ set efm=%+P[%f]%r,(%l\\,%c)%*[\ ]%t%*[^:]:\ %m,%+Q--%r
+ " To exercise the push/pop file functionality in quickfix, the test files
+ " need to be created.
+***************
+*** 1128,1138 ****
+ call delete('Xtestfile3')
+
+ " Tests for %E, %C and %Z format specifiers
+! let lines = ["Error 275",
+! \ "line 42",
+! \ "column 3",
+! \ "' ' expected after '--'"
+! \]
+ set efm=%EError\ %n,%Cline\ %l,%Ccolumn\ %c,%Z%m
+ cgetexpr lines
+ let l = getqflist()
+--- 1130,1142 ----
+ call delete('Xtestfile3')
+
+ " Tests for %E, %C and %Z format specifiers
+! let lines =<< trim [DATA]
+! Error 275
+! line 42
+! column 3
+! ' ' expected after '--'
+! [DATA]
+!
+ set efm=%EError\ %n,%Cline\ %l,%Ccolumn\ %c,%Z%m
+ cgetexpr lines
+ let l = getqflist()
+***************
+*** 1143,1151 ****
+ call assert_equal("\n' ' expected after '--'", l[0].text)
+
+ " Test for %>
+! let lines = ["Error in line 147 of foo.c:",
+! \"unknown variable 'i'"
+! \]
+ set efm=unknown\ variable\ %m,%E%>Error\ in\ line\ %l\ of\ %f:,%Z%m
+ cgetexpr lines
+ let l = getqflist()
+--- 1147,1157 ----
+ call assert_equal("\n' ' expected after '--'", l[0].text)
+
+ " Test for %>
+! let lines =<< trim [DATA]
+! Error in line 147 of foo.c:
+! unknown variable 'i'
+! [DATA]
+!
+ set efm=unknown\ variable\ %m,%E%>Error\ in\ line\ %l\ of\ %f:,%Z%m
+ cgetexpr lines
+ let l = getqflist()
+***************
+*** 1154,1174 ****
+ call assert_equal("\nunknown variable 'i'", l[0].text)
+
+ " Test for %A, %C and other formats
+! let lines = [
+! \"==============================================================",
+! \"FAIL: testGetTypeIdCachesResult (dbfacadeTest.DjsDBFacadeTest)",
+! \"--------------------------------------------------------------",
+! \"Traceback (most recent call last):",
+! \' File "unittests/dbfacadeTest.py", line 89, in testFoo',
+! \" self.assertEquals(34, dtid)",
+! \' File "/usr/lib/python2.2/unittest.py", line 286, in',
+! \" failUnlessEqual",
+! \" raise self.failureException, \\",
+! \"AssertionError: 34 != 33",
+! \"",
+! \"--------------------------------------------------------------",
+! \"Ran 27 tests in 0.063s"
+! \]
+ set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m
+ cgetexpr lines
+ let l = getqflist()
+--- 1160,1181 ----
+ call assert_equal("\nunknown variable 'i'", l[0].text)
+
+ " Test for %A, %C and other formats
+! let lines =<< trim [DATA]
+! ==============================================================
+! FAIL: testGetTypeIdCachesResult (dbfacadeTest.DjsDBFacadeTest)
+! --------------------------------------------------------------
+! Traceback (most recent call last):
+! File "unittests/dbfacadeTest.py", line 89, in testFoo
+! self.assertEquals(34, dtid)
+! File "/usr/lib/python2.2/unittest.py", line 286, in
+! failUnlessEqual
+! raise self.failureException, \\
+! AssertionError: 34 != 33
+!
+! --------------------------------------------------------------
+! Ran 27 tests in 0.063s
+! [DATA]
+!
+ set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m
+ cgetexpr lines
+ let l = getqflist()
+*** ../vim-8.1.1361/src/testdir/test_startup.vim 2019-05-08 18:36:40.060562551 +0200
+--- src/testdir/test_startup.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 19,43 ****
+ if !has('packages')
+ return
+ endif
+! let before = [
+! \ 'set nocp viminfo+=nviminfo',
+! \ 'set guioptions+=M',
+! \ 'let $HOME = "/does/not/exist"',
+! \ 'set loadplugins',
+! \ 'set rtp=Xhere,Xafter,Xanother',
+! \ 'set packpath=Xhere,Xafter',
+! \ 'set nomore',
+! \ 'let g:sequence = ""',
+! \ ]
+! let after = [
+! \ 'redir! > Xtestout',
+! \ 'scriptnames',
+! \ 'redir END',
+! \ 'redir! > Xsequence',
+! \ 'echo g:sequence',
+! \ 'redir END',
+! \ 'quit',
+! \ ]
+ call mkdir('Xhere/plugin', 'p')
+ call writefile(['let g:sequence .= "here "'], 'Xhere/plugin/here.vim')
+ call mkdir('Xanother/plugin', 'p')
+--- 19,45 ----
+ if !has('packages')
+ return
+ endif
+! let before =<< trim [CODE]
+! set nocp viminfo+=nviminfo
+! set guioptions+=M
+! let $HOME = "/does/not/exist"
+! set loadplugins
+! set rtp=Xhere,Xafter,Xanother
+! set packpath=Xhere,Xafter
+! set nomore
+! let g:sequence = ""
+! [CODE]
+!
+! let after =<< trim [CODE]
+! redir! > Xtestout
+! scriptnames
+! redir END
+! redir! > Xsequence
+! echo g:sequence
+! redir END
+! quit
+! [CODE]
+!
+ call mkdir('Xhere/plugin', 'p')
+ call writefile(['let g:sequence .= "here "'], 'Xhere/plugin/here.vim')
+ call mkdir('Xanother/plugin', 'p')
+***************
+*** 76,90 ****
+ if !has('packages')
+ return
+ endif
+! let before = [
+! \ 'set nocp viminfo+=nviminfo',
+! \ 'set guioptions+=M',
+! \ 'let $HOME = "/does/not/exist"',
+! \ 'set loadplugins',
+! \ 'set rtp=Xhere',
+! \ 'set packpath=Xhere',
+! \ 'set nomore',
+! \ ]
+ let after = [
+ \ 'quit',
+ \ ]
+--- 78,93 ----
+ if !has('packages')
+ return
+ endif
+! let before =<< trim [CODE]
+! set nocp viminfo+=nviminfo
+! set guioptions+=M
+! let $HOME = "/does/not/exist"
+! set loadplugins
+! set rtp=Xhere
+! set packpath=Xhere
+! set nomore
+! [CODE]
+!
+ let after = [
+ \ 'quit',
+ \ ]
+***************
+*** 131,141 ****
+ endfunc
+
+ func Test_compatible_args()
+! let after = [
+! \ 'call writefile([string(&compatible)], "Xtestout")',
+! \ 'set viminfo+=nviminfo',
+! \ 'quit',
+! \ ]
+ if RunVim([], after, '-C')
+ let lines = readfile('Xtestout')
+ call assert_equal('1', lines[0])
+--- 134,145 ----
+ endfunc
+
+ func Test_compatible_args()
+! let after =<< trim [CODE]
+! call writefile([string(&compatible)], "Xtestout")
+! set viminfo+=nviminfo
+! quit
+! [CODE]
+!
+ if RunVim([], after, '-C')
+ let lines = readfile('Xtestout')
+ call assert_equal('1', lines[0])
+***************
+*** 152,165 ****
+ " 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
+--- 156,170 ----
+ " Test the -o[N] and -O[N] arguments to open N windows split
+ " horizontally or vertically.
+ func Test_o_arg()
+! let after =<< trim [CODE]
+! call writefile([winnr("$"),
+! \ winheight(1), winheight(2), &lines,
+! \ winwidth(1), winwidth(2), &columns,
+! \ bufname(winbufnr(1)), bufname(winbufnr(2))],
+! \ "Xtestout")
+! qall
+! [CODE]
+!
+ if RunVim([], after, '-o2')
+ " Open 2 windows split horizontally. Expect:
+ " - 2 windows
+***************
+*** 228,237 ****
+
+ " 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))
+--- 233,243 ----
+
+ " Test the -p[N] argument to open N tabpages.
+ func Test_p_arg()
+! let after =<< trim [CODE]
+! call writefile(split(execute("tabs"), "\n"), "Xtestout")
+! qall
+! [CODE]
+!
+ if RunVim([], after, '-p2')
+ let lines = readfile('Xtestout')
+ call assert_equal(4, len(lines))
+***************
+*** 273,284 ****
+ " Test the '-q [errorfile]' argument.
+ func Test_q_arg()
+ let source_file = has('win32') ? '..\memfile.c' : '../memfile.c'
+! let after = [
+! \ 'call writefile([&errorfile, string(getpos("."))], "Xtestout")',
+! \ 'copen',
+! \ 'w >> Xtestout',
+! \ 'qall'
+! \ ]
+
+ " Test with default argument '-q'.
+ call assert_equal('errors.err', &errorfile)
+--- 279,290 ----
+ " Test the '-q [errorfile]' argument.
+ func Test_q_arg()
+ let source_file = has('win32') ? '..\memfile.c' : '../memfile.c'
+! let after =<< trim [CODE]
+! call writefile([&errorfile, string(getpos("."))], "Xtestout")
+! copen
+! w >> Xtestout
+! qall
+! [CODE]
+
+ " Test with default argument '-q'.
+ call assert_equal('errors.err', &errorfile)
+***************
+*** 335,344 ****
+ " -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)
+--- 341,351 ----
+ " -M resets 'modifiable' and 'write'
+ " -R sets 'readonly'
+ func Test_m_M_R()
+! let after =<< trim [CODE]
+! call writefile([&write, &modifiable, &readonly, &updatecount], "Xtestout")
+! qall
+! [CODE]
+!
+ if RunVim([], after, '')
+ let lines = readfile('Xtestout')
+ call assert_equal(['1', '1', '0', '200'], lines)
+***************
+*** 361,370 ****
+
+ " 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',
+! \ ]
+ " 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')
+--- 368,378 ----
+
+ " Test the -A, -F and -H arguments (Arabic, Farsi and Hebrew modes).
+ func Test_A_F_H_arg()
+! let after =<< trim [CODE]
+! call writefile([&rightleft, &arabic, &fkmap, &hkmap], "Xtestout")
+! qall
+! [CODE]
+!
+ " 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')
+***************
+*** 481,490 ****
+ endfunc
+
+ func Test_file_args()
+! let after = [
+! \ 'call writefile(argv(), "Xtestout")',
+! \ 'qall',
+! \ ]
+ if RunVim([], after, '')
+ let lines = readfile('Xtestout')
+ call assert_equal(0, len(lines))
+--- 489,499 ----
+ endfunc
+
+ func Test_file_args()
+! let after =<< trim [CODE]
+! call writefile(argv(), "Xtestout")
+! qall
+! [CODE]
+!
+ if RunVim([], after, '')
+ let lines = readfile('Xtestout')
+ call assert_equal(0, len(lines))
+***************
+*** 546,555 ****
+ endfunc
+
+ func Test_read_stdin()
+! let after = [
+! \ 'write Xtestout',
+! \ 'quit!',
+! \ ]
+ if RunVimPiped([], after, '-', 'echo something | ')
+ let lines = readfile('Xtestout')
+ " MS-Windows adds a space after the word
+--- 555,565 ----
+ endfunc
+
+ func Test_read_stdin()
+! let after =<< trim [CODE]
+! write Xtestout
+! quit!
+! [CODE]
+!
+ if RunVimPiped([], after, '-', 'echo something | ')
+ let lines = readfile('Xtestout')
+ " MS-Windows adds a space after the word
+***************
+*** 559,568 ****
+ endfunc
+
+ func Test_set_shell()
+! let after = [
+! \ 'call writefile([&shell], "Xtestout")',
+! \ 'quit!',
+! \ ]
+ let $SHELL = '/bin/with space/sh'
+ if RunVimPiped([], after, '', '')
+ let lines = readfile('Xtestout')
+--- 569,579 ----
+ endfunc
+
+ func Test_set_shell()
+! let after =<< trim [CODE]
+! call writefile([&shell], "Xtestout")
+! quit!
+! [CODE]
+!
+ let $SHELL = '/bin/with space/sh'
+ if RunVimPiped([], after, '', '')
+ let lines = readfile('Xtestout')
+***************
+*** 613,632 ****
+ func Test_zzz_startinsert()
+ " Test :startinsert
+ call writefile(['123456'], 'Xtestout')
+! let after = [
+! \ ':startinsert',
+! \ 'call feedkeys("foobar\<c-o>:wq\<cr>","t")'
+! \ ]
+ if RunVim([], after, 'Xtestout')
+ let lines = readfile('Xtestout')
+ call assert_equal(['foobar123456'], lines)
+ endif
+ " Test :startinsert!
+ call writefile(['123456'], 'Xtestout')
+! let after = [
+! \ ':startinsert!',
+! \ 'call feedkeys("foobar\<c-o>:wq\<cr>","t")'
+! \ ]
+ if RunVim([], after, 'Xtestout')
+ let lines = readfile('Xtestout')
+ call assert_equal(['123456foobar'], lines)
+--- 624,645 ----
+ func Test_zzz_startinsert()
+ " Test :startinsert
+ call writefile(['123456'], 'Xtestout')
+! let after =<< trim [CODE]
+! :startinsert
+! call feedkeys("foobar\<c-o>:wq\<cr>","t")
+! [CODE]
+!
+ if RunVim([], after, 'Xtestout')
+ let lines = readfile('Xtestout')
+ call assert_equal(['foobar123456'], lines)
+ endif
+ " Test :startinsert!
+ call writefile(['123456'], 'Xtestout')
+! let after =<< trim [CODE]
+! :startinsert!
+! call feedkeys("foobar\<c-o>:wq\<cr>","t")
+! [CODE]
+!
+ if RunVim([], after, 'Xtestout')
+ let lines = readfile('Xtestout')
+ call assert_equal(['123456foobar'], lines)
+*** ../vim-8.1.1361/src/testdir/test_terminal.vim 2019-05-13 20:27:19.216311194 +0200
+--- src/testdir/test_terminal.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 1012,1029 ****
+ " Run Vim, start a terminal in that Vim without the kill argument,
+ " check that :qall does not exit, :qall! does.
+ func Test_terminal_qall_exit()
+! let after = [
+! \ 'term',
+! \ 'let buf = bufnr("%")',
+! \ 'while term_getline(buf, 1) =~ "^\\s*$"',
+! \ ' sleep 10m',
+! \ 'endwhile',
+! \ 'set nomore',
+! \ 'au VimLeavePre * call writefile(["too early"], "Xdone")',
+! \ 'qall',
+! \ 'au! VimLeavePre * exe buf . "bwipe!" | call writefile(["done"], "Xdone")',
+! \ 'cquit',
+! \ ]
+ if !RunVim([], after, '')
+ return
+ endif
+--- 1012,1030 ----
+ " Run Vim, start a terminal in that Vim without the kill argument,
+ " check that :qall does not exit, :qall! does.
+ func Test_terminal_qall_exit()
+! let after =<< trim [CODE]
+! term
+! let buf = bufnr("%")
+! while term_getline(buf, 1) =~ "^\\s*$"
+! sleep 10m
+! endwhile
+! set nomore
+! au VimLeavePre * call writefile(["too early"], "Xdone")
+! qall
+! au! VimLeavePre * exe buf . "bwipe!" | call writefile(["done"], "Xdone")
+! cquit
+! [CODE]
+!
+ if !RunVim([], after, '')
+ return
+ endif
+*** ../vim-8.1.1361/src/testdir/test_xxd.vim 2019-01-27 14:41:40.411163229 +0100
+--- src/testdir/test_xxd.vim 2019-05-20 22:05:14.858728332 +0200
+***************
+*** 95,103 ****
+ %d
+ exe '0r! ' . s:xxd_cmd . ' -i XXDfile'
+ $d
+! let expected = ['unsigned char XXDfile[] = {',
+! \ ' 0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 0x0a', '};',
+! \ 'unsigned int XXDfile_len = 11;']
+ call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
+
+ " Test 8: Print C include capitalized
+--- 95,107 ----
+ %d
+ exe '0r! ' . s:xxd_cmd . ' -i XXDfile'
+ $d
+! let expected =<< trim [CODE]
+! unsigned char XXDfile[] = {
+! 0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 0x0a
+! };
+! unsigned int XXDfile_len = 11;
+! [CODE]
+!
+ call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
+
+ " Test 8: Print C include capitalized
+***************
+*** 107,115 ****
+ %d
+ exe '0r! ' . s:xxd_cmd . ' -i ' . arg . ' XXDfile'
+ $d
+! let expected = ['unsigned char XXDFILE[] = {',
+! \ ' 0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 0x0a', '};',
+! \ 'unsigned int XXDFILE_LEN = 11;']
+ call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
+ endfor
+
+--- 111,122 ----
+ %d
+ exe '0r! ' . s:xxd_cmd . ' -i ' . arg . ' XXDfile'
+ $d
+! let expected =<< trim [CODE]
+! unsigned char XXDFILE[] = {
+! 0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 0x0a
+! };
+! unsigned int XXDFILE_LEN = 11;
+! [CODE]
+ call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
+ endfor
+
+*** ../vim-8.1.1361/src/version.c 2019-05-20 21:52:42.794911591 +0200
+--- src/version.c 2019-05-20 22:06:29.850313068 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1362,
+ /**/
+
+--
+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.1363 b/data/vim/patches/8.1.1363
new file mode 100644
index 000000000..74c317bf7
--- /dev/null
+++ b/data/vim/patches/8.1.1363
@@ -0,0 +1,92 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1363
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1363
+Problem: ":vert options" does not make a vertical split.
+Solution: Pass the right modifiers in $OPTWIN_CMD. (Ken Takata,
+ closes #4401)
+Files: src/ex_cmds2.c, src/testdir/test_options.vim
+
+
+*** ../vim-8.1.1362/src/ex_cmds2.c 2019-05-11 18:28:41.351611622 +0200
+--- src/ex_cmds2.c 2019-05-21 20:52:04.835372852 +0200
+***************
+*** 3016,3022 ****
+ ex_options(
+ exarg_T *eap UNUSED)
+ {
+! vim_setenv((char_u *)"OPTWIN_CMD", (char_u *)(cmdmod.tab ? "tab" : ""));
+ cmd_source((char_u *)SYS_OPTWIN_FILE, NULL);
+ }
+ #endif
+--- 3016,3024 ----
+ ex_options(
+ exarg_T *eap UNUSED)
+ {
+! vim_setenv((char_u *)"OPTWIN_CMD",
+! (char_u *)(cmdmod.tab ? "tab"
+! : (cmdmod.split & WSP_VERT) ? "vert" : ""));
+ cmd_source((char_u *)SYS_OPTWIN_FILE, NULL);
+ }
+ #endif
+*** ../vim-8.1.1362/src/testdir/test_options.vim 2019-05-16 20:29:40.799834279 +0200
+--- src/testdir/test_options.vim 2019-05-21 20:50:05.208098768 +0200
+***************
+*** 51,56 ****
+--- 51,82 ----
+ endtry
+ call assert_equal('ok', caught)
+
++ " Check if the option-window is opened horizontally.
++ wincmd j
++ call assert_notequal('option-window', bufname(''))
++ wincmd k
++ call assert_equal('option-window', bufname(''))
++ " close option-window
++ close
++
++ " Open the option-window vertically.
++ vert options
++ " Check if the option-window is opened vertically.
++ wincmd l
++ call assert_notequal('option-window', bufname(''))
++ wincmd h
++ call assert_equal('option-window', bufname(''))
++ " close option-window
++ close
++
++ " Open the option-window in a new tab.
++ tab options
++ " Check if the option-window is opened in a tab.
++ normal gT
++ call assert_notequal('option-window', bufname(''))
++ normal gt
++ call assert_equal('option-window', bufname(''))
++
+ " close option-window
+ close
+ endfunc
+*** ../vim-8.1.1362/src/version.c 2019-05-20 22:12:30.724442773 +0200
+--- src/version.c 2019-05-21 20:53:26.614875283 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1363,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+4. Your eyeglasses have a web site burned in on 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.1364 b/data/vim/patches/8.1.1364
new file mode 100644
index 000000000..f7a19d8e8
--- /dev/null
+++ b/data/vim/patches/8.1.1364
@@ -0,0 +1,469 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1364
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1364
+Problem: Design for popup window support needs more details.
+Solution: Add details about using a window and buffer. Rename popup_show()
+ to popup_create() and add popup_show() and popup_hide().
+Files: runtime/doc/popup.txt
+
+
+*** ../vim-8.1.1363/runtime/doc/popup.txt 2019-05-12 21:43:24.626559005 +0200
+--- runtime/doc/popup.txt 2019-05-21 23:06:22.550406101 +0200
+***************
+*** 1,10 ****
+! *popup.txt* For Vim version 8.1. Last change: 2019 May 12
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+
+
+! Displaying text with properties attached. *popup* *popup-window*
+
+ THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
+
+--- 1,10 ----
+! *popup.txt* For Vim version 8.1. Last change: 2019 May 21
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+
+
+! Displaying text in floating window. *popup* *popup-window*
+
+ THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
+
+***************
+*** 13,30 ****
+ 3. Examples |popup-examples|
+
+
+! {not able to use text properties when the |+textprop| feature was
+! disabled at compile time}
+
+ ==============================================================================
+ 1. Introduction *popup-intro*
+
+! We are talking about popup windows here, text that goes on top of the buffer
+! text and is under control of a plugin. Other popup functionality:
+ - popup menu, see |popup-menu|
+ - balloon, see |balloon-eval|
+
+! TODO
+
+ ==============================================================================
+ 2. Functions *popup-functions*
+--- 13,79 ----
+ 3. Examples |popup-examples|
+
+
+! {not available if the |+eval| feature was disabled at compile time}
+! {not able to use text properties if the |+textprop| feature was disabled at
+! compile time}
+
+ ==============================================================================
+ 1. Introduction *popup-intro*
+
+! We are talking about popup windows here, text that goes on top of the regular
+! windows and is under control of a plugin. You cannot edit the text in the
+! popup window like with regular windows.
+!
+! A popup window can be used for such things as:
+! - briefly show a message without changing the command line
+! - prompt the user with a dialog
+! - display information while typing
+! - give extra information for auto-completion
+!
+! The text in the popup window can be colored with |text-properties|. It is
+! also possible to use syntax highlighting.
+!
+! A popup window has a window-ID like other windows, but behaves differently.
+! The size can be up to the whole Vim window and it overlaps other windows.
+! It contains a buffer, and that buffer is always associated with the popup
+! window. The window cannot be used in Normal, Visual or Insert mode, it does
+! not get keyboard focus. You can use functions like `setbufline()` to change
+! the text in the buffer. There are more differences from how this window and
+! buffer behave compared to regular windows and buffers, see |popup-buffer|.
+!
+! If this is not what you are looking for, check out other popup functionality:
+ - popup menu, see |popup-menu|
+ - balloon, see |balloon-eval|
+
+!
+! TODO:
+!
+! Example how to use syntax highlighting of a code snippet.
+!
+! Scrolling: When the screen scrolls up for output of an Ex command, what
+! happens with popups?
+! 1. Stay where they are. Problem: listed text may go behind and can't be read.
+! 2. Scroll with the page. What if they get updated? Either postpone, or take
+! the scroll offset into account.
+! Probably 2. is the best choice.
+!
+! Positioning relative to the popup-menu to avoid overlapping with it; add a
+! function to get the position and size of the popup-menu.
+!
+!
+! IMPLEMENTATION:
+! - Put code in popupwin.c
+! - Use win_update() for displaying
+! - At first redraw all windows NOT_VALID when the popup moves or hides.
+! - At first always display the popup windows at the end of update_screen(),
+! lowest zindex first.
+! - Later make it more efficient and avoid flicker
+! - Use a separate list of windows, one for each tab and one global. Also put
+! "aucmd_win" in there.
+! - add optional {buf} command to execute(). Only works for a buffer that is
+! visible in a window in the current tab or in a popup window.
+! E.g. for execute('syntax enable', 'silent', bufnr)
+!
+
+ ==============================================================================
+ 2. Functions *popup-functions*
+***************
+*** 33,88 ****
+
+ Proposal and discussion on issue #4063: https://github.com/vim/vim/issues/4063
+
+! [to be moved to eval.txt later]
+!
+! popup_show({lines}, {options}) *popup_show()*
+! Open a popup window showing {lines}, which is a list of lines,
+! where each line has text and text properties.
+
+ {options} is a dictionary with many possible entries.
+
+! Returns a unique ID to be used with |popup_close()|.
+!
+! See |popup_show-usage| for details.
+
+
+! popup_dialog({lines}, {options}) *popup_dialog()*
+! Just like |popup_show()| but with different default options:
+! pos "center"
+! zindex 200
+! border []
+
+
+ popup_notification({text}, {options}) *popup_notification()*
+! Show the string {text} for 3 seconds at the top of the Vim
+! window. This works like: >
+! call popup_show([{'text': {text}}], {
+ \ 'line': 1,
+ \ 'col': 10,
+ \ 'time': 3000,
+ \ 'zindex': 200,
+ \ 'highlight': 'WarningMsg',
+ \ 'border: [],
+ \ })
+ < Use {options} to change the properties.
+
+ popup_atcursor({text}, {options}) *popup_atcursor()*
+! Show the string {text} above the cursor, and close it when the
+! cursor moves. This works like: >
+! call popup_show([{'text': {text}}], {
+ \ 'line': 'cursor-1',
+ \ 'col': 'cursor',
+- \ 'zindex': 50,
+ \ 'moved': 'WORD',
+ \ })
+ < Use {options} to change the properties.
+
+
+! popup_menu({lines}, {options}) *popup_atcursor()*
+! Show the {lines} near the cursor, handle selecting one of the
+ items with cursorkeys, and close it an item is selected with
+! Space or Enter. This works like: >
+! call popup_show({lines}, {
+ \ 'pos': 'center',
+ \ 'zindex': 200,
+ \ 'wrap': 0,
+--- 82,147 ----
+
+ Proposal and discussion on issue #4063: https://github.com/vim/vim/issues/4063
+
+! [functions to be moved to eval.txt later, keep list of functions here]
+
++ popup_create({text}, {options}) *popup_create()*
++ Open a popup window showing {text}, which is either:
++ - a string
++ - a list of strings
++ - a list of text lines with text properties
+ {options} is a dictionary with many possible entries.
++ See |popup_create-usage| for details.
+
+! Returns a window-ID, which can be used with other popup
+! functions. Use `winbufnr()` to get the number of the buffer
+! in the window: >
+! let winid = popup_create('hello', {})
+! let bufnr = winbufnr(winid)
+! call setbufline(bufnr, 2, 'second line')
+
+
+! popup_dialog({text}, {options}) *popup_dialog()*
+! Just like |popup_create()| but with these default options: >
+! call popup_create({text}, {
+! \ 'pos': 'center',
+! \ 'zindex': 200,
+! \ 'border': [],
+! \})
+! < Use {options} to change the properties.
+
+
+ popup_notification({text}, {options}) *popup_notification()*
+! Show the {text} for 3 seconds at the top of the Vim window.
+! This works like: >
+! call popup_create({text}, {
+ \ 'line': 1,
+ \ 'col': 10,
+ \ 'time': 3000,
++ \ 'tab': -1,
+ \ 'zindex': 200,
+ \ 'highlight': 'WarningMsg',
+ \ 'border: [],
+ \ })
+ < Use {options} to change the properties.
+
++
+ popup_atcursor({text}, {options}) *popup_atcursor()*
+! Show the {text} above the cursor, and close it when the cursor
+! moves. This works like: >
+! call popup_create({text}, {
+ \ 'line': 'cursor-1',
+ \ 'col': 'cursor',
+ \ 'moved': 'WORD',
+ \ })
+ < Use {options} to change the properties.
+
+
+! popup_menu({text}, {options}) *popup_menu()*
+! Show the {text} near the cursor, handle selecting one of the
+ items with cursorkeys, and close it an item is selected with
+! Space or Enter. {text} should have multiple lines to make this
+! useful. This works like: >
+! call popup_create({text}, {
+ \ 'pos': 'center',
+ \ 'zindex': 200,
+ \ 'wrap': 0,
+***************
+*** 93,101 ****
+ "callback" to a function that handles the selected item.
+
+
+ popup_move({id}, {options}) *popup_move()*
+ Move popup {id} to the position speficied with {options}.
+! {options} may contain the items from |popup_show()| that
+ specify the popup position: "line", "col", "pos", "maxheight",
+ "minheight", "maxwidth" and "minwidth".
+
+--- 152,168 ----
+ "callback" to a function that handles the selected item.
+
+
++ popup_show({id}) *popup_show()*
++ If {id} is a hidden popup, show it now.
++
++ popup_hide({id}) *popup_hide()*
++ If {id} is a displayed popup, hide it now. If the popup has a
++ filter it will not be invoked for so long as the popup is
++ hidden.
++
+ popup_move({id}, {options}) *popup_move()*
+ Move popup {id} to the position speficied with {options}.
+! {options} may contain the items from |popup_create()| that
+ specify the popup position: "line", "col", "pos", "maxheight",
+ "minheight", "maxwidth" and "minwidth".
+
+***************
+*** 116,136 ****
+ pressing 'n'.
+
+
+- popup_setlines({id}, {lnum}, {lines}) *popup_setlines()*
+- In popup {id} set line {lnum} and following to {lines}.
+-
+- {lnum} is one-based and must be either an existing line or
+- just one below the last line, in which case the line gets
+- appended.
+-
+- {lines} has the same format as one item in {lines} of
+- |popup_show()|. Existing lines are replaced. When {lines}
+- extends below the last line of the popup lines are appended.
+-
+- popup_getlines({id}) *popup_getlines()*
+- Return the {lines} for popup {id}.
+-
+-
+ popup_setoptions({id}, {options}) *popup_setoptions()*
+ Override options in popup {id} with entries in {options}.
+
+--- 183,188 ----
+***************
+*** 142,160 ****
+ popup_close({id}) *popup_close()*
+ Close popup {id}.
+
+!
+! POPUP_SHOW() ARGUMENTS *popup_show-usage*
+!
+! The first argument of |popup_show()| is a list of text lines. Each item in
+! the list is a dictionary with these entries:
+! text The text to display.
+ props A list of text properties. Optional.
+ Each entry is a dictionary, like the third argument of
+ |prop_add()|, but specifying the column in the
+ dictionary with a "col" entry, see below:
+ |popup-props|.
+
+! The second argument of |popup_show()| is a dictionary with options:
+ line screen line where to position the popup; can use
+ "cursor", "cursor+1" or "cursor-1" to use the line of
+ the cursor and add or subtract a number of lines;
+--- 194,239 ----
+ popup_close({id}) *popup_close()*
+ Close popup {id}.
+
+! *:popupclear* *:popupc*
+! :popupc[lear] Emergency solution to a misbehaving plugin: close all popup
+! windows.
+!
+!
+! POPUP BUFFER AND WINDOW *popup-buffer*
+!
+! A new buffer is created to hold the text and text properties of the popup
+! window. The buffer is always associated with the popup window and
+! manipulation is restricted:
+! - the buffer has no name
+! - 'buftype' is "popup"
+! - 'swapfile' is off
+! - 'bufhidden' is "hide"
+! - 'buflisted' is off
+! TODO: more
+!
+! The window does have a cursor position, but the cursor is not displayed.
+!
+! Options can be set on the window with `setwinvar()`, e.g.: >
+! call setwinvar(winid, '&wrap', 0)
+! And options can be set on the buffer with `setbufvar()`, e.g.: >
+! call setbufvar(winbufnr(winid), '&filetype', 'java')
+!
+!
+! POPUP_CREATE() ARGUMENTS *popup_create-usage*
+!
+! The first argument of |popup_create()| specifies the text to be displayed, and
+! optionally text properties. It is in one of three forms:
+! - a string
+! - a list of strings
+! - a list of dictionaries, where each dictionary has these entries:
+! text String with the text to display.
+ props A list of text properties. Optional.
+ Each entry is a dictionary, like the third argument of
+ |prop_add()|, but specifying the column in the
+ dictionary with a "col" entry, see below:
+ |popup-props|.
+
+! The second argument of |popup_create()| is a dictionary with options:
+ line screen line where to position the popup; can use
+ "cursor", "cursor+1" or "cursor-1" to use the line of
+ the cursor and add or subtract a number of lines;
+***************
+*** 168,177 ****
+--- 247,266 ----
+ used for. Default is "botleft". Alternatively
+ "center" can be used to position the popup somewhere
+ near the cursor.
++ flip when TRUE (the default) and the position is relative
++ to the cursor, flip to below or above the cursor to
++ avoid overlap with the |popupmenu-completion| or
++ another popup with a higher "zindex"
+ maxheight maximum height
+ minheight minimum height
+ maxwidth maximum width
+ minwidth minimum width
++ hidden when TRUE the popup exists but is not displayed; use
++ `popup_show()` to unhide it.
++ tab when -1: display the popup on all tabs; when 0 (the
++ default): display the popup on the current tab;
++ otherwise the number of the tab page the popup is
++ displayed on; when invalid the current tab is used
+ title text to be displayed above the first item in the
+ popup, on top of any border
+ wrap TRUE to make the lines wrap (default TRUE)
+***************
+*** 229,237 ****
+
+ POPUP FILTER *popup-filter*
+
+! A callback that gets any typed keys while a popup is displayed. It can return
+! TRUE to indicate the key has been handled and is to be discarded, or FALSE to
+! let Vim handle the key as usual in the current state.
+
+ The filter function is called with two arguments: the ID of the popup and the
+ key.
+--- 318,328 ----
+
+ POPUP FILTER *popup-filter*
+
+! A callback that gets any typed keys while a popup is displayed. The filter is
+! not invoked for as long as the popup is hidden.
+!
+! The filter can return TRUE to indicate the key has been handled and is to be
+! discarded, or FALSE to let Vim handle the key as usual in the current state.
+
+ The filter function is called with two arguments: the ID of the popup and the
+ key.
+***************
+*** 241,246 ****
+--- 332,341 ----
+ cursor keys select another entry
+ Tab accept current suggestion
+
++ A mouse click arrives as <LeftMouse>. The coordinates are in
++ v:mouse_popup_col and v:mouse_popup_row. The top-left screen cell of the
++ popup is col 1, row 1 (not counting the border).
++
+ Vim provides standard filters |popup_filter_menu()| and
+ |popup_filter_yesno()|.
+
+***************
+*** 265,271 ****
+ endif
+ endfunc
+
+! call popup_show([{'text': 'Continue? y/n'}], {
+ \ 'filter': 'popup_filter_yesno',
+ \ 'callback': 'MyDialogHandler',
+ \ })
+--- 360,366 ----
+ endif
+ endfunc
+
+! call popup_create(['Continue? y/n'], {
+ \ 'filter': 'popup_filter_yesno',
+ \ 'callback': 'MyDialogHandler',
+ \ })
+*** ../vim-8.1.1363/src/version.c 2019-05-21 20:54:42.078415244 +0200
+--- src/version.c 2019-05-21 23:08:15.613816651 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1364,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+6. You refuse to go to a vacation spot with no electricity and no phone lines.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1365 b/data/vim/patches/8.1.1365
new file mode 100644
index 000000000..b5acbfd30
--- /dev/null
+++ b/data/vim/patches/8.1.1365
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1365
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1365
+Problem: Source command doesn't check for the sandbox. (Armin Razmjou)
+Solution: Check for the sandbox when sourcing a file.
+Files: src/getchar.c, src/testdir/test_source.vim
+
+
+*** ../vim-8.1.1364/src/getchar.c 2019-05-19 21:57:05.670320399 +0200
+--- src/getchar.c 2019-05-22 20:33:44.175220749 +0200
+***************
+*** 1407,1412 ****
+--- 1407,1418 ----
+ emsg(_(e_nesting));
+ return;
+ }
++
++ // Disallow sourcing a file in the sandbox, the commands would be executed
++ // later, possibly outside of the sandbox.
++ if (check_secure())
++ return;
++
+ #ifdef FEAT_EVAL
+ if (ignore_script)
+ /* Not reading from script, also don't open one. Warning message? */
+*** ../vim-8.1.1364/src/testdir/test_source.vim 2019-01-12 13:25:42.633479785 +0100
+--- src/testdir/test_source.vim 2019-05-22 20:44:58.887015783 +0200
+***************
+*** 36,38 ****
+--- 36,47 ----
+ au! SourcePre
+ au! SourcePost
+ endfunc
++
++ func Test_source_sandbox()
++ new
++ call writefile(["Ohello\<Esc>"], 'Xsourcehello')
++ source! Xsourcehello | echo
++ call assert_equal('hello', getline(1))
++ call assert_fails('sandbox source! Xsourcehello', 'E48:')
++ bwipe!
++ endfunc
+*** ../vim-8.1.1364/src/version.c 2019-05-21 23:08:56.969600854 +0200
+--- src/version.c 2019-05-22 22:37:10.196825450 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1365,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+13. You refer to going to the bathroom as downloading.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1366 b/data/vim/patches/8.1.1366
new file mode 100644
index 000000000..1fac2704f
--- /dev/null
+++ b/data/vim/patches/8.1.1366
@@ -0,0 +1,929 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1366
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1366
+Problem: Using expressions in a modeline is unsafe.
+Solution: Disallow using expressions in a modeline, unless the
+ 'modelineexpr' option is set. Update help, add more tests.
+Files: runtime/doc/options.txt, src/option.c, src/option.h,
+ src/testdir/test_modeline.vim, src/testdir/test49.in
+
+
+*** ../vim-8.1.1365/runtime/doc/options.txt 2019-05-05 18:11:46.320590639 +0200
+--- runtime/doc/options.txt 2019-05-23 15:14:40.692739911 +0200
+***************
+*** 578,591 ****
+ /* vi:set dir=c\:\tmp: */ ~
+ This sets the 'dir' option to "c:\tmp". Only a single backslash before the
+ ':' is removed. Thus to include "\:" you have to specify "\\:".
+!
+ No other commands than "set" are supported, for security reasons (somebody
+ might create a Trojan horse text file with modelines). And not all options
+! can be set. For some options a flag is set, so that when it's used the
+! |sandbox| is effective. Still, there is always a small risk that a modeline
+! causes trouble. E.g., when some joker sets 'textwidth' to 5 all your lines
+! are wrapped unexpectedly. So disable modelines before editing untrusted text.
+! The mail ftplugin does this, for example.
+
+ Hint: If you would like to do something else than setting an option, you could
+ define an autocommand that checks the file for a specific string. For
+--- 578,594 ----
+ /* vi:set dir=c\:\tmp: */ ~
+ This sets the 'dir' option to "c:\tmp". Only a single backslash before the
+ ':' is removed. Thus to include "\:" you have to specify "\\:".
+! *E992*
+ No other commands than "set" are supported, for security reasons (somebody
+ might create a Trojan horse text file with modelines). And not all options
+! can be set. For some options a flag is set, so that when the value is used
+! the |sandbox| is effective. Some options can only be set from the modeline
+! when 'modelineexpr' is set (the default is off).
+!
+! Still, there is always a small risk that a modeline causes trouble. E.g.,
+! when some joker sets 'textwidth' to 5 all your lines are wrapped unexpectedly.
+! So disable modelines before editing untrusted text. The mail ftplugin does
+! this, for example.
+
+ Hint: If you would like to do something else than setting an option, you could
+ define an autocommand that checks the file for a specific string. For
+***************
+*** 795,803 ****
+ a different way.
+ The 'autoindent' option is reset when the 'paste' option is set and
+ restored when 'paste' is reset.
+- {small difference from Vi: After the indent is deleted when typing
+- <Esc> or <CR>, the cursor position when moving up or down is after the
+- deleted indent; Vi puts the cursor somewhere in the deleted indent}.
+
+ *'autoread'* *'ar'* *'noautoread'* *'noar'*
+ 'autoread' 'ar' boolean (default off)
+--- 798,803 ----
+***************
+*** 1121,1127 ****
+ {only available when compiled with the |+balloon_eval|
+ feature}
+ Expression for text to show in evaluation balloon. It is only used
+! when 'ballooneval' is on. These variables can be used:
+
+ v:beval_bufnr number of the buffer in which balloon is going to show
+ v:beval_winnr number of the window
+--- 1121,1128 ----
+ {only available when compiled with the |+balloon_eval|
+ feature}
+ Expression for text to show in evaluation balloon. It is only used
+! when 'ballooneval' or 'balloonevalterm' is on. These variables can be
+! used:
+
+ v:beval_bufnr number of the buffer in which balloon is going to show
+ v:beval_winnr number of the window
+***************
+*** 1132,1138 ****
+
+ The evaluation of the expression must not have side effects!
+ Example: >
+! function! MyBalloonExpr()
+ return 'Cursor is at line ' . v:beval_lnum .
+ \', column ' . v:beval_col .
+ \ ' of file ' . bufname(v:beval_bufnr) .
+--- 1133,1139 ----
+
+ The evaluation of the expression must not have side effects!
+ Example: >
+! function MyBalloonExpr()
+ return 'Cursor is at line ' . v:beval_lnum .
+ \', column ' . v:beval_col .
+ \ ' of file ' . bufname(v:beval_bufnr) .
+***************
+*** 1151,1156 ****
+--- 1152,1158 ----
+
+ The expression will be evaluated in the |sandbox| when set from a
+ modeline, see |sandbox-option|.
++ This option cannot be set in a modeline when 'modelineexpr' is off.
+
+ It is not allowed to change text or jump to another window while
+ evaluating 'balloonexpr' |textlock|.
+***************
+*** 2677,2683 ****
+ uses another default.
+ This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
+- {Vi: directory to put temp file in, defaults to "/tmp"}
+
+ *'display'* *'dy'*
+ 'display' 'dy' string (default "", set to "truncate" in
+--- 2679,2684 ----
+***************
+*** 3229,3235 ****
+ The expression will be evaluated in the |sandbox| if set from a
+ modeline, see |sandbox-option|.
+ This option can't be set from a |modeline| when the 'diff' option is
+! on.
+
+ It is not allowed to change text or jump to another window while
+ evaluating 'foldexpr' |textlock|.
+--- 3230,3236 ----
+ The expression will be evaluated in the |sandbox| if set from a
+ modeline, see |sandbox-option|.
+ This option can't be set from a |modeline| when the 'diff' option is
+! on or the 'modelineexpr' option is off.
+
+ It is not allowed to change text or jump to another window while
+ evaluating 'foldexpr' |textlock|.
+***************
+*** 3362,3367 ****
+--- 3363,3369 ----
+
+ The expression will be evaluated in the |sandbox| if set from a
+ modeline, see |sandbox-option|.
++ This option cannot be set in a modeline when 'modelineexpr' is off.
+
+ It is not allowed to change text or jump to another window while
+ evaluating 'foldtext' |textlock|.
+***************
+*** 3399,3404 ****
+--- 3401,3407 ----
+ The expression will be evaluated in the |sandbox| when set from a
+ modeline, see |sandbox-option|. That stops the option from working,
+ since changing the buffer text is not allowed.
++ This option cannot be set in a modeline when 'modelineexpr' is off.
+ NOTE: This option is set to "" when 'compatible' is set.
+
+ *'formatlistpat'* *'flp'*
+***************
+*** 3455,3460 ****
+--- 3458,3465 ----
+ Also see 'swapsync' for controlling fsync() on swap files.
+ 'fsync' also applies to |writefile()|, unless a flag is used to
+ overrule it.
++ This option cannot be set from a |modeline| or in the |sandbox|, for
++ security reasons.
+
+ *'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
+ 'gdefault' 'gd' boolean (default off)
+***************
+*** 3622,3628 ****
+ *'guiheadroom'* *'ghr'*
+ 'guiheadroom' 'ghr' number (default 50)
+ global
+! - {only for GTK and X11 GUI}
+ The number of pixels subtracted from the screen height when fitting
+ the GUI window on the screen. Set this before the GUI is started,
+ e.g., in your |gvimrc| file. When zero, the whole screen height will
+--- 3627,3633 ----
+ *'guiheadroom'* *'ghr'*
+ 'guiheadroom' 'ghr' number (default 50)
+ global
+! {only for GTK and X11 GUI}
+ The number of pixels subtracted from the screen height when fitting
+ the GUI window on the screen. Set this before the GUI is started,
+ e.g., in your |gvimrc| file. When zero, the whole screen height will
+***************
+*** 3780,3785 ****
+--- 3785,3791 ----
+ 'guitabtooltip' is used for the tooltip, see below.
+ The expression will be evaluated in the |sandbox| when set from a
+ modeline, see |sandbox-option|.
++ This option cannot be set in a modeline when 'modelineexpr' is off.
+
+ Only used when the GUI tab pages line is displayed. 'e' must be
+ present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
+***************
+*** 4030,4035 ****
+--- 4036,4042 ----
+ When this option contains printf-style '%' items, they will be
+ expanded according to the rules used for 'statusline'. See
+ 'titlestring' for example settings.
++ This option cannot be set in a modeline when 'modelineexpr' is off.
+ {not available when compiled without the |+statusline| feature}
+
+ *'ignorecase'* *'ic'* *'noignorecase'* *'noic'*
+***************
+*** 4047,4052 ****
+--- 4054,4061 ----
+ This option specifies a function that will be called to
+ activate or deactivate the Input Method.
+ It is not used in the GUI.
++ The expression will be evaluated in the |sandbox| when set from a
++ modeline, see |sandbox-option|.
+
+ Example: >
+ function ImActivateFunc(active)
+***************
+*** 4163,4168 ****
+--- 4172,4179 ----
+ set imstatusfunc=ImStatusFunc
+ <
+ NOTE: This function is invoked very often. Keep it fast.
++ The expression will be evaluated in the |sandbox| when set from a
++ modeline, see |sandbox-option|.
+
+ *'imstyle'* *'imst'*
+ 'imstyle' 'imst' number (default 1)
+***************
+*** 4179,4184 ****
+--- 4190,4197 ----
+ |single-repeat|, etc. Therefore over-the-spot style becomes the
+ default now. This should work fine for most people, however if you
+ have any problem with it, try using on-the-spot style.
++ The expression will be evaluated in the |sandbox| when set from a
++ modeline, see |sandbox-option|.
+
+ *'include'* *'inc'*
+ 'include' 'inc' string (default "^\s*#\s*include")
+***************
+*** 4213,4218 ****
+--- 4226,4232 ----
+
+ The expression will be evaluated in the |sandbox| when set from a
+ modeline, see |sandbox-option|.
++ This option cannot be set in a modeline when 'modelineexpr' is off.
+
+ It is not allowed to change text or jump to another window while
+ evaluating 'includeexpr' |textlock|.
+***************
+*** 4300,4305 ****
+--- 4314,4320 ----
+
+ The expression will be evaluated in the |sandbox| when set from a
+ modeline, see |sandbox-option|.
++ This option cannot be set in a modeline when 'modelineexpr' is off.
+
+ It is not allowed to change text or jump to another window while
+ evaluating 'indentexpr' |textlock|.
+***************
+*** 4707,4713 ****
+ "=" operator to use this same indentation algorithm rather than
+ calling an external program if 'equalprg' is empty.
+ This option is not used when 'paste' is set.
+- {Vi: Does it a little bit differently}
+
+ *'lispwords'* *'lw'*
+ 'lispwords' 'lw' string (default is very long)
+--- 4722,4727 ----
+***************
+*** 4897,4902 ****
+--- 4911,4922 ----
+ < This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
+
++ *'makespellmem'* *'msm'*
++ 'makespellmem' 'msm' string (default "460000,2000,500")
++ global
++ Values relevant only when compressing a spell file, see |spell|.
++ This option cannot be set from a |modeline| or in the |sandbox|.
++
+ *'matchpairs'* *'mps'*
+ 'matchpairs' 'mps' string (default "(:),{:},[:]")
+ local to buffer
+***************
+*** 4919,4925 ****
+ *'matchtime'* *'mat'*
+ 'matchtime' 'mat' number (default 5)
+ global
+- {in Nvi}
+ Tenths of a second to show the matching paren, when 'showmatch' is
+ set. Note that this is not in milliseconds, like other options that
+ set a time. This is to be compatible with Nvi.
+--- 4939,4944 ----
+***************
+*** 5053,5058 ****
+--- 5072,5088 ----
+ 'modeline' 'ml' boolean (Vim default: on (off for root),
+ Vi default: off)
+ local to buffer
++ If 'modeline' is on 'modelines' gives the number of lines that is
++ checked for set commands. If 'modeline' is off or 'modelines' is zero
++ no lines are checked. See |modeline|.
++
++ *'modelineexpr'* *'mle'* *'nomodelineexpr'* *'nomle'*
++ 'modelineexpr' 'mle' boolean (default: off)
++ global
++ When on allow some options that are an expression to be set in the
++ modeline. Check the option for whether it is affected by
++ 'modelineexpr'. Also see |modeline|.
++
+ *'modelines'* *'mls'*
+ 'modelines' 'mls' number (default 5)
+ global
+***************
+*** 5063,5071 ****
+ set and to the Vim default value when 'compatible' is reset.
+
+ *'modifiable'* *'ma'* *'nomodifiable'* *'noma'*
+ 'modifiable' 'ma' boolean (default on)
+ local to buffer
+- *E21*
+ When off the buffer contents cannot be changed. The 'fileformat' and
+ 'fileencoding' options also can't be changed.
+ Can be reset on startup with the |-M| command line argument.
+--- 5093,5101 ----
+ set and to the Vim default value when 'compatible' is reset.
+
+ *'modifiable'* *'ma'* *'nomodifiable'* *'noma'*
++ *E21*
+ 'modifiable' 'ma' boolean (default on)
+ local to buffer
+ When off the buffer contents cannot be changed. The 'fileformat' and
+ 'fileencoding' options also can't be changed.
+ Can be reset on startup with the |-M| command line argument.
+***************
+*** 6062,6067 ****
+--- 6092,6099 ----
+ When this option is not empty, it determines the content of the ruler
+ string, as displayed for the 'ruler' option.
+ The format of this option is like that of 'statusline'.
++ This option cannot be set in a modeline when 'modelineexpr' is off.
++
+ The default ruler width is 17 characters. To make the ruler 15
+ characters wide, put "%15(" at the start and "%)" at the end.
+ Example: >
+***************
+*** 6585,6591 ****
+ O message for reading a file overwrites any previous message.
+ Also for quickfix message (e.g., ":cn").
+ s don't give "search hit BOTTOM, continuing at TOP" or "search
+! hit TOP, continuing at BOTTOM" messages
+ t truncate file message at the start if it is too long to fit
+ on the command-line, "<" will appear in the left most column.
+ Ignored in Ex mode.
+--- 6617,6624 ----
+ O message for reading a file overwrites any previous message.
+ Also for quickfix message (e.g., ":cn").
+ s don't give "search hit BOTTOM, continuing at TOP" or "search
+! hit TOP, continuing at BOTTOM" messages; when using the search
+! count do not show "W" after the count message (see S below)
+ t truncate file message at the start if it is too long to fit
+ on the command-line, "<" will appear in the left most column.
+ Ignored in Ex mode.
+***************
+*** 6601,6607 ****
+ "Pattern not found", "Back at original", etc.
+ q use "recording" instead of "recording @a"
+ F don't give the file info when editing a file, like `:silent`
+! was used for the command
+ S do not show search count message when searching, e.g.
+ "[1/5]"
+
+--- 6634,6641 ----
+ "Pattern not found", "Back at original", etc.
+ q use "recording" instead of "recording @a"
+ F don't give the file info when editing a file, like `:silent`
+! was used for the command; note that this also affects messages
+! from autocommands
+ S do not show search count message when searching, e.g.
+ "[1/5]"
+
+***************
+*** 7168,7173 ****
+--- 7202,7208 ----
+
+ The 'statusline' option will be evaluated in the |sandbox| if set from
+ a modeline, see |sandbox-option|.
++ This option cannot be set in a modeline when 'modelineexpr' is off.
+
+ It is not allowed to change text or jump to another window while
+ evaluating 'statusline' |textlock|.
+***************
+*** 7348,7353 ****
+--- 7383,7389 ----
+
+ When changing something that is used in 'tabline' that does not
+ trigger it to be updated, use |:redrawtabline|.
++ This option cannot be set in a modeline when 'modelineexpr' is off.
+
+ Keep in mind that only one of the tab pages is the current one, others
+ are invisible and you can't jump to their windows.
+***************
+*** 7443,7449 ****
+ must be included in the tags file.
+ This option doesn't affect commands that find all matching tags (e.g.,
+ command-line completion and ":help").
+- {Vi: always uses binary search in some versions}
+
+ *'tagcase'* *'tc'*
+ 'tagcase' 'tc' string (default "followic")
+--- 7479,7484 ----
+***************
+*** 7507,7513 ****
+ The use of |:set+=| and |:set-=| is preferred when adding or removing
+ file names from the list. This avoids problems when a future version
+ uses another default.
+- {Vi: default is "tags /usr/lib/tags"}
+
+ *'tagstack'* *'tgst'* *'notagstack'* *'notgst'*
+ 'tagstack' 'tgst' boolean (default on)
+--- 7542,7547 ----
+***************
+*** 7878,7885 ****
+--- 7912,7922 ----
+ non-empty 't_ts' option).
+ When Vim was compiled with HAVE_X11 defined, the original title will
+ be restored if possible, see |X11|.
++
+ When this option contains printf-style '%' items, they will be
+ expanded according to the rules used for 'statusline'.
++ This option cannot be set in a modeline when 'modelineexpr' is off.
++
+ Example: >
+ :auto BufEnter * let &titlestring = hostname() . "/" . expand("%:p")
+ :set title titlestring=%<%F%=%l/%L-%P titlelen=70
+***************
+*** 8065,8070 ****
+--- 8102,8109 ----
+ undo file that exists is used. When it cannot be read an error is
+ given, no further entry is used.
+ See |undo-persistence|.
++ This option cannot be set from a |modeline| or in the |sandbox|, for
++ security reasons.
+
+ *'undofile'* *'noundofile'* *'udf'* *'noudf'*
+ 'undofile' 'udf' boolean (default off)
+***************
+*** 8374,8379 ****
+--- 8413,8420 ----
+ When equal to "NONE" no viminfo file will be read or written.
+ This option can be set with the |-i| command line flag. The |--clean|
+ command line flag sets it to "NONE".
++ This option cannot be set from a |modeline| or in the |sandbox|, for
++ security reasons.
+
+ *'virtualedit'* *'ve'*
+ 'virtualedit' 've' string (default "")
+***************
+*** 8783,8790 ****
+ When 'textwidth' is non-zero, this option is not used.
+ This option is set to 0 when 'paste' is set and restored when 'paste'
+ is reset.
+! See also 'formatoptions' and |ins-textwidth|. {Vi: works differently
+! and less usefully}
+
+ *'wrapscan'* *'ws'* *'nowrapscan'* *'nows'*
+ 'wrapscan' 'ws' boolean (default on) *E384* *E385*
+--- 8824,8830 ----
+ When 'textwidth' is non-zero, this option is not used.
+ This option is set to 0 when 'paste' is set and restored when 'paste'
+ is reset.
+! See also 'formatoptions' and |ins-textwidth|.
+
+ *'wrapscan'* *'ws'* *'nowrapscan'* *'nows'*
+ 'wrapscan' 'ws' boolean (default on) *E384* *E385*
+*** ../vim-8.1.1365/src/option.c 2019-05-19 19:59:30.164255569 +0200
+--- src/option.c 2019-05-23 14:35:57.497475468 +0200
+***************
+*** 467,472 ****
+--- 467,473 ----
+ * there is a redraw flag */
+ #define P_NDNAME 0x8000000L /* only normal dir name chars allowed */
+ #define P_RWINONLY 0x10000000L /* only redraw current window */
++ #define P_MLE 0x20000000L /* under control of 'modelineexpr' */
+
+ #define ISK_LATIN1 (char_u *)"@,48-57,_,192-255"
+
+***************
+*** 650,656 ****
+ {(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,
+ {(char_u *)"", (char_u *)0L}
+--- 651,657 ----
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+ SCTX_INIT},
+! {"balloonexpr", "bexpr", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM|P_MLE,
+ #if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
+ (char_u *)&p_bexpr, PV_BEXPR,
+ {(char_u *)"", (char_u *)0L}
+***************
+*** 727,733 ****
+ (char_u *)&p_cmp, PV_NONE,
+ {(char_u *)"internal,keepascii", (char_u *)0L}
+ SCTX_INIT},
+! {"cdpath", "cd", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
+ #ifdef FEAT_SEARCHPATH
+ (char_u *)&p_cdpath, PV_NONE,
+ {(char_u *)",,", (char_u *)0L}
+--- 728,734 ----
+ (char_u *)&p_cmp, PV_NONE,
+ {(char_u *)"internal,keepascii", (char_u *)0L}
+ SCTX_INIT},
+! {"cdpath", "cd", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE|P_COMMA|P_NODUP,
+ #ifdef FEAT_SEARCHPATH
+ (char_u *)&p_cdpath, PV_NONE,
+ {(char_u *)",,", (char_u *)0L}
+***************
+*** 1175,1181 ****
+ {(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,
+ {(char_u *)"0", (char_u *)NULL}
+--- 1176,1182 ----
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+ SCTX_INIT},
+! {"foldexpr", "fde", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN|P_MLE,
+ #if defined(FEAT_FOLDING) && defined(FEAT_EVAL)
+ (char_u *)VAR_WIN, PV_FDE,
+ {(char_u *)"0", (char_u *)NULL}
+***************
+*** 1258,1264 ****
+ {(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,
+ {(char_u *)"foldtext()", (char_u *)NULL}
+--- 1259,1265 ----
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+ SCTX_INIT},
+! {"foldtext", "fdt", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN|P_MLE,
+ #if defined(FEAT_FOLDING) && defined(FEAT_EVAL)
+ (char_u *)VAR_WIN, PV_FDT,
+ {(char_u *)"foldtext()", (char_u *)NULL}
+***************
+*** 1267,1273 ****
+ {(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,
+ {(char_u *)"", (char_u *)0L}
+--- 1268,1274 ----
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+ SCTX_INIT},
+! {"formatexpr", "fex", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM|P_MLE,
+ #ifdef FEAT_EVAL
+ (char_u *)&p_fex, PV_FEX,
+ {(char_u *)"", (char_u *)0L}
+***************
+*** 1406,1412 ****
+ (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,
+ {(char_u *)"", (char_u *)0L}
+--- 1407,1413 ----
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+! {"guitablabel", "gtl", P_STRING|P_VI_DEF|P_RWIN|P_MLE,
+ #if defined(FEAT_GUI_TABLINE)
+ (char_u *)&p_gtl, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+***************
+*** 1477,1483 ****
+ (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
+--- 1478,1484 ----
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+! {"iconstring", NULL, P_STRING|P_VI_DEF|P_MLE,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_iconstring, PV_NONE,
+ #else
+***************
+*** 1549,1555 ****
+ {(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,
+ {(char_u *)"", (char_u *)0L}
+--- 1550,1556 ----
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+ SCTX_INIT},
+! {"includeexpr", "inex", P_STRING|P_ALLOCED|P_VI_DEF|P_MLE,
+ #if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
+ (char_u *)&p_inex, PV_INEX,
+ {(char_u *)"", (char_u *)0L}
+***************
+*** 1561,1567 ****
+ {"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,
+ {(char_u *)"", (char_u *)0L}
+--- 1562,1568 ----
+ {"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|P_MLE,
+ #if defined(FEAT_CINDENT) && defined(FEAT_EVAL)
+ (char_u *)&p_inde, PV_INDE,
+ {(char_u *)"", (char_u *)0L}
+***************
+*** 1888,1893 ****
+--- 1889,1897 ----
+ {"modeline", "ml", P_BOOL|P_VIM,
+ (char_u *)&p_ml, PV_ML,
+ {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
++ {"modelineexpr", "mle", P_BOOL|P_VI_DEF,
++ (char_u *)&p_mle, PV_NONE,
++ {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"modelines", "mls", P_NUM|P_VI_DEF,
+ (char_u *)&p_mls, PV_NONE,
+ {(char_u *)5L, (char_u *)0L} SCTX_INIT},
+***************
+*** 2311,2317 ****
+ (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
+--- 2315,2321 ----
+ (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|P_MLE,
+ #ifdef FEAT_STL_OPT
+ (char_u *)&p_ruf, PV_NONE,
+ #else
+***************
+*** 2577,2583 ****
+ {"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
+--- 2581,2587 ----
+ {"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|P_MLE,
+ #ifdef FEAT_STL_OPT
+ (char_u *)&p_stl, PV_STL,
+ #else
+***************
+*** 2624,2630 ****
+ {(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
+--- 2628,2634 ----
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+ SCTX_INIT},
+! {"tabline", "tal", P_STRING|P_VI_DEF|P_RALL|P_MLE,
+ #ifdef FEAT_STL_OPT
+ (char_u *)&p_tal, PV_NONE,
+ #else
+***************
+*** 2802,2808 ****
+ {(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
+--- 2806,2812 ----
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+ SCTX_INIT},
+! {"titlestring", NULL, P_STRING|P_VI_DEF|P_MLE,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_titlestring, PV_NONE,
+ #else
+***************
+*** 4549,4554 ****
+--- 4553,4563 ----
+ errmsg = _("E520: Not allowed in a modeline");
+ goto skip;
+ }
++ if ((flags & P_MLE) && !p_mle)
++ {
++ errmsg = _("E992: Not allowed in a modeline when 'modelineexpr' is off");
++ goto skip;
++ }
+ #ifdef FEAT_DIFF
+ /* In diff mode some options are overruled. This avoids that
+ * 'foldmethod' becomes "marker" instead of "diff" and that
+*** ../vim-8.1.1365/src/option.h 2019-05-04 21:08:17.119814244 +0200
+--- src/option.h 2019-05-23 13:24:39.458971246 +0200
+***************
+*** 631,636 ****
+--- 631,637 ----
+ #ifdef FEAT_SPELL
+ EXTERN char_u *p_msm; /* 'mkspellmem' */
+ #endif
++ EXTERN long p_mle; /* 'modelineexpr' */
+ EXTERN long p_mls; /* 'modelines' */
+ EXTERN char_u *p_mouse; /* 'mouse' */
+ #ifdef FEAT_GUI
+*** ../vim-8.1.1365/src/testdir/test_modeline.vim 2018-11-25 05:06:34.943951024 +0100
+--- src/testdir/test_modeline.vim 2019-05-23 15:19:35.239334528 +0200
+***************
+*** 60,73 ****
+ 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)
+
+--- 60,76 ----
+ set keymap= iminsert=0 imsearch=-1
+ endfunc
+
+! func s:modeline_fails(what, text, error)
+! if !exists('+' .. a:what)
+! return
+! endif
+ 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, a:error)
+ call assert_equal("", &filetype)
+ call assert_equal("", &syntax)
+
+***************
+*** 79,94 ****
+ 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()
+! if !has('keymap')
+! return
+! endif
+! call s:modeline_fails('keymap', 'keymap=evil$CMD')
+ endfunc
+--- 82,171 ----
+ endfunc
+
+ func Test_modeline_filetype_fails()
+! call s:modeline_fails('filetype', 'ft=evil$CMD', 'E474:')
+ endfunc
+
+ func Test_modeline_syntax_fails()
+! call s:modeline_fails('syntax', 'syn=evil$CMD', 'E474:')
+ endfunc
+
+ func Test_modeline_keymap_fails()
+! call s:modeline_fails('keymap', 'keymap=evil$CMD', 'E474:')
+! endfunc
+!
+! func Test_modeline_fails_always()
+! call s:modeline_fails('backupdir', 'backupdir=Something()', 'E520:')
+! call s:modeline_fails('cdpath', 'cdpath=Something()', 'E520:')
+! call s:modeline_fails('charconvert', 'charconvert=Something()', 'E520:')
+! call s:modeline_fails('completefunc', 'completefunc=Something()', 'E520:')
+! call s:modeline_fails('cscopeprg', 'cscopeprg=Something()', 'E520:')
+! call s:modeline_fails('diffexpr', 'diffexpr=Something()', 'E520:')
+! call s:modeline_fails('directory', 'directory=Something()', 'E520:')
+! call s:modeline_fails('equalprg', 'equalprg=Something()', 'E520:')
+! call s:modeline_fails('errorfile', 'errorfile=Something()', 'E520:')
+! call s:modeline_fails('exrc', 'exrc=Something()', 'E520:')
+! call s:modeline_fails('formatprg', 'formatprg=Something()', 'E520:')
+! call s:modeline_fails('fsync', 'fsync=Something()', 'E520:')
+! call s:modeline_fails('grepprg', 'grepprg=Something()', 'E520:')
+! call s:modeline_fails('helpfile', 'helpfile=Something()', 'E520:')
+! call s:modeline_fails('imactivatefunc', 'imactivatefunc=Something()', 'E520:')
+! call s:modeline_fails('imstatusfunc', 'imstatusfunc=Something()', 'E520:')
+! call s:modeline_fails('imstyle', 'imstyle=Something()', 'E520:')
+! call s:modeline_fails('keywordprg', 'keywordprg=Something()', 'E520:')
+! call s:modeline_fails('langmap', 'langmap=Something()', 'E520:')
+! call s:modeline_fails('luadll', 'luadll=Something()', 'E520:')
+! call s:modeline_fails('makeef', 'makeef=Something()', 'E520:')
+! call s:modeline_fails('makeprg', 'makeprg=Something()', 'E520:')
+! call s:modeline_fails('makespellmem', 'makespellmem=Something()', 'E520:')
+! call s:modeline_fails('mzschemedll', 'mzschemedll=Something()', 'E520:')
+! call s:modeline_fails('mzschemegcdll', 'mzschemegcdll=Something()', 'E520:')
+! call s:modeline_fails('omnifunc', 'omnifunc=Something()', 'E520:')
+! call s:modeline_fails('operatorfunc', 'operatorfunc=Something()', 'E520:')
+! call s:modeline_fails('perldll', 'perldll=Something()', 'E520:')
+! call s:modeline_fails('printdevice', 'printdevice=Something()', 'E520:')
+! call s:modeline_fails('patchexpr', 'patchexpr=Something()', 'E520:')
+! call s:modeline_fails('printexpr', 'printexpr=Something()', 'E520:')
+! call s:modeline_fails('pythondll', 'pythondll=Something()', 'E520:')
+! call s:modeline_fails('pythonhome', 'pythondll=Something()', 'E520:')
+! call s:modeline_fails('pythonthreedll', 'pythonthreedll=Something()', 'E520:')
+! call s:modeline_fails('pythonthreehome', 'pythonthreehome=Something()', 'E520:')
+! call s:modeline_fails('pyxversion', 'pyxversion=Something()', 'E520:')
+! call s:modeline_fails('rubydll', 'rubydll=Something()', 'E520:')
+! call s:modeline_fails('runtimepath', 'runtimepath=Something()', 'E520:')
+! call s:modeline_fails('secure', 'secure=Something()', 'E520:')
+! call s:modeline_fails('shell', 'shell=Something()', 'E520:')
+! call s:modeline_fails('shellcmdflag', 'shellcmdflag=Something()', 'E520:')
+! call s:modeline_fails('shellpipe', 'shellpipe=Something()', 'E520:')
+! call s:modeline_fails('shellquote', 'shellquote=Something()', 'E520:')
+! call s:modeline_fails('shellredir', 'shellredir=Something()', 'E520:')
+! call s:modeline_fails('shellxquote', 'shellxquote=Something()', 'E520:')
+! call s:modeline_fails('spellfile', 'spellfile=Something()', 'E520:')
+! call s:modeline_fails('spellsuggest', 'spellsuggest=Something()', 'E520:')
+! call s:modeline_fails('tcldll', 'tcldll=Something()', 'E520:')
+! call s:modeline_fails('titleold', 'titleold=Something()', 'E520:')
+! call s:modeline_fails('viewdir', 'viewdir=Something()', 'E520:')
+! call s:modeline_fails('viminfo', 'viminfo=Something()', 'E520:')
+! call s:modeline_fails('viminfofile', 'viminfofile=Something()', 'E520:')
+! call s:modeline_fails('winptydll', 'winptydll=Something()', 'E520:')
+! call s:modeline_fails('undodir', 'undodir=Something()', 'E520:')
+! " only check a few terminal options
+! call s:modeline_fails('t_AB', 't_AB=Something()', 'E520:')
+! call s:modeline_fails('t_ce', 't_ce=Something()', 'E520:')
+! call s:modeline_fails('t_sr', 't_sr=Something()', 'E520:')
+! call s:modeline_fails('t_8b', 't_8b=Something()', 'E520:')
+! endfunc
+!
+! func Test_modeline_fails_modelineexpr()
+! call s:modeline_fails('balloonexpr', 'balloonexpr=Something()', 'E992:')
+! call s:modeline_fails('foldexpr', 'foldexpr=Something()', 'E992:')
+! call s:modeline_fails('foldtext', 'foldtext=Something()', 'E992:')
+! call s:modeline_fails('formatexpr', 'formatexpr=Something()', 'E992:')
+! call s:modeline_fails('guitablabel', 'guitablabel=Something()', 'E992:')
+! call s:modeline_fails('iconstring', 'iconstring=Something()', 'E992:')
+! call s:modeline_fails('includeexpr', 'includeexpr=Something()', 'E992:')
+! call s:modeline_fails('indentexpr', 'indentexpr=Something()', 'E992:')
+! call s:modeline_fails('rulerformat', 'rulerformat=Something()', 'E992:')
+! call s:modeline_fails('statusline', 'statusline=Something()', 'E992:')
+! call s:modeline_fails('tabline', 'tabline=Something()', 'E992:')
+! call s:modeline_fails('titlestring', 'titlestring=Something()', 'E992:')
+ endfunc
+*** ../vim-8.1.1365/src/testdir/test49.in 2016-10-12 16:31:16.000000000 +0200
+--- src/testdir/test49.in 2019-05-23 15:22:31.330449346 +0200
+***************
+*** 5,11 ****
+
+ STARTTEST
+ :so small.vim
+! :se nocp nomore viminfo+=nviminfo
+ :lang mess C
+ :so test49.vim
+ :" Go back to this file and append the results from register r.
+--- 5,11 ----
+
+ STARTTEST
+ :so small.vim
+! :se nocp nomore viminfo+=nviminfo modelineexpr
+ :lang mess C
+ :so test49.vim
+ :" Go back to this file and append the results from register r.
+*** ../vim-8.1.1365/src/version.c 2019-05-22 22:38:21.660405578 +0200
+--- src/version.c 2019-05-23 15:20:33.079046674 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1366,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+18. Your wife drapes a blond wig over your monitor to remind you of what she
+ looks like.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1367 b/data/vim/patches/8.1.1367
new file mode 100644
index 000000000..12eb914e0
--- /dev/null
+++ b/data/vim/patches/8.1.1367
@@ -0,0 +1,65 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1367
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1367 (after 8.1.1366)
+Problem: can set 'modelineexpr' in modeline.
+Solution: Add P_SECURE flag.
+Files: src/option.c, src/testdir/test_modeline.vim
+
+
+*** ../vim-8.1.1366/src/option.c 2019-05-23 15:37:41.965634969 +0200
+--- src/option.c 2019-05-23 17:03:12.006442820 +0200
+***************
+*** 1889,1895 ****
+ {"modeline", "ml", P_BOOL|P_VIM,
+ (char_u *)&p_ml, PV_ML,
+ {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
+! {"modelineexpr", "mle", P_BOOL|P_VI_DEF,
+ (char_u *)&p_mle, PV_NONE,
+ {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"modelines", "mls", P_NUM|P_VI_DEF,
+--- 1889,1895 ----
+ {"modeline", "ml", P_BOOL|P_VIM,
+ (char_u *)&p_ml, PV_ML,
+ {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
+! {"modelineexpr", "mle", P_BOOL|P_VI_DEF|P_SECURE,
+ (char_u *)&p_mle, PV_NONE,
+ {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"modelines", "mls", P_NUM|P_VI_DEF,
+*** ../vim-8.1.1366/src/testdir/test_modeline.vim 2019-05-23 15:37:41.965634969 +0200
+--- src/testdir/test_modeline.vim 2019-05-23 17:03:54.262203562 +0200
+***************
+*** 119,124 ****
+--- 119,125 ----
+ call s:modeline_fails('makespellmem', 'makespellmem=Something()', 'E520:')
+ call s:modeline_fails('mzschemedll', 'mzschemedll=Something()', 'E520:')
+ call s:modeline_fails('mzschemegcdll', 'mzschemegcdll=Something()', 'E520:')
++ call s:modeline_fails('modelineexpr', 'modelineexpr', 'E520:')
+ call s:modeline_fails('omnifunc', 'omnifunc=Something()', 'E520:')
+ call s:modeline_fails('operatorfunc', 'operatorfunc=Something()', 'E520:')
+ call s:modeline_fails('perldll', 'perldll=Something()', 'E520:')
+*** ../vim-8.1.1366/src/version.c 2019-05-23 15:37:41.965634969 +0200
+--- src/version.c 2019-05-23 17:08:31.812617656 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1367,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+20. When looking at a pageful of someone else's links, you notice all of them
+ are already highlighted in 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.1368 b/data/vim/patches/8.1.1368
new file mode 100644
index 000000000..fc5b78c71
--- /dev/null
+++ b/data/vim/patches/8.1.1368
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1368
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1368 (after 8.1.1366)
+Problem: Modeline test fails with python but without pythonhome.
+Solution: Correct test argument.
+Files: src/testdir/test_modeline.vim
+
+
+*** ../vim-8.1.1367/src/testdir/test_modeline.vim 2019-05-23 17:08:40.824565813 +0200
+--- src/testdir/test_modeline.vim 2019-05-23 17:34:32.487469143 +0200
+***************
+*** 127,133 ****
+ call s:modeline_fails('patchexpr', 'patchexpr=Something()', 'E520:')
+ call s:modeline_fails('printexpr', 'printexpr=Something()', 'E520:')
+ call s:modeline_fails('pythondll', 'pythondll=Something()', 'E520:')
+! call s:modeline_fails('pythonhome', 'pythondll=Something()', 'E520:')
+ call s:modeline_fails('pythonthreedll', 'pythonthreedll=Something()', 'E520:')
+ call s:modeline_fails('pythonthreehome', 'pythonthreehome=Something()', 'E520:')
+ call s:modeline_fails('pyxversion', 'pyxversion=Something()', 'E520:')
+--- 127,133 ----
+ call s:modeline_fails('patchexpr', 'patchexpr=Something()', 'E520:')
+ call s:modeline_fails('printexpr', 'printexpr=Something()', 'E520:')
+ call s:modeline_fails('pythondll', 'pythondll=Something()', 'E520:')
+! call s:modeline_fails('pythonhome', 'pythonhome=Something()', 'E520:')
+ call s:modeline_fails('pythonthreedll', 'pythonthreedll=Something()', 'E520:')
+ call s:modeline_fails('pythonthreehome', 'pythonthreehome=Something()', 'E520:')
+ call s:modeline_fails('pyxversion', 'pyxversion=Something()', 'E520:')
+*** ../vim-8.1.1367/src/version.c 2019-05-23 17:08:40.824565813 +0200
+--- src/version.c 2019-05-23 17:35:29.255134709 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1368,
+ /**/
+
+--
+Shift happens.
+ -- Doppler
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1369 b/data/vim/patches/8.1.1369
new file mode 100644
index 000000000..402aa91cb
--- /dev/null
+++ b/data/vim/patches/8.1.1369
@@ -0,0 +1,154 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1369
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1369
+Problem: Get E484 when using system() during GUI startup.
+Solution: Check "gui.starting". (Ken Takata)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.1368/src/os_win32.c 2019-05-09 15:12:45.176723907 +0200
+--- src/os_win32.c 2019-05-23 20:09:39.117943983 +0200
+***************
+*** 2762,2768 ****
+ mch_exit(int r)
+ {
+ #ifdef VIMDLL
+! if (gui.starting || gui.in_use)
+ mch_exit_g(r);
+ else
+ mch_exit_c(r);
+--- 2762,2768 ----
+ mch_exit(int r)
+ {
+ #ifdef VIMDLL
+! if (gui.in_use || gui.starting)
+ mch_exit_g(r);
+ else
+ mch_exit_c(r);
+***************
+*** 4500,4506 ****
+ mch_system(char *cmd, int options)
+ {
+ #ifdef VIMDLL
+! if (gui.in_use)
+ return mch_system_g(cmd, options);
+ else
+ return mch_system_c(cmd, options);
+--- 4500,4506 ----
+ mch_system(char *cmd, int options)
+ {
+ #ifdef VIMDLL
+! if (gui.in_use || gui.starting)
+ return mch_system_g(cmd, options);
+ else
+ return mch_system_c(cmd, options);
+***************
+*** 4821,4827 ****
+ {
+ cmdlen =
+ #ifdef FEAT_GUI_MSWIN
+! (gui.in_use ?
+ (!s_dont_use_vimrun && p_stmp ?
+ STRLEN(vimrun_path) : STRLEN(p_sh) + STRLEN(p_shcf))
+ : 0) +
+--- 4821,4827 ----
+ {
+ cmdlen =
+ #ifdef FEAT_GUI_MSWIN
+! ((gui.in_use || gui.starting) ?
+ (!s_dont_use_vimrun && p_stmp ?
+ STRLEN(vimrun_path) : STRLEN(p_sh) + STRLEN(p_shcf))
+ : 0) +
+***************
+*** 4834,4840 ****
+ #if defined(FEAT_GUI_MSWIN)
+ if (
+ # ifdef VIMDLL
+! gui.in_use &&
+ # endif
+ need_vimrun_warning)
+ {
+--- 4834,4840 ----
+ #if defined(FEAT_GUI_MSWIN)
+ if (
+ # ifdef VIMDLL
+! (gui.in_use || gui.starting) &&
+ # endif
+ need_vimrun_warning)
+ {
+***************
+*** 4853,4859 ****
+ }
+ if (
+ # ifdef VIMDLL
+! gui.in_use &&
+ # endif
+ !s_dont_use_vimrun && p_stmp)
+ /* Use vimrun to execute the command. It opens a console
+--- 4853,4859 ----
+ }
+ if (
+ # ifdef VIMDLL
+! (gui.in_use || gui.starting) &&
+ # endif
+ !s_dont_use_vimrun && p_stmp)
+ /* Use vimrun to execute the command. It opens a console
+***************
+*** 4865,4871 ****
+ p_sh, p_shcf, cmd);
+ else
+ # ifdef VIMDLL
+! if (gui.in_use)
+ # endif
+ vim_snprintf((char *)newcmd, cmdlen, "%s %s %s %s %s",
+ p_sh, p_shcf, p_sh, p_shcf, cmd);
+--- 4865,4871 ----
+ p_sh, p_shcf, cmd);
+ else
+ # ifdef VIMDLL
+! if (gui.in_use || gui.starting)
+ # endif
+ vim_snprintf((char *)newcmd, cmdlen, "%s %s %s %s %s",
+ p_sh, p_shcf, p_sh, p_shcf, cmd);
+***************
+*** 4889,4895 ****
+ /* Print the return value, unless "vimrun" was used. */
+ if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent
+ #if defined(FEAT_GUI_MSWIN)
+! && (gui.in_use ?
+ ((options & SHELL_DOOUT) || s_dont_use_vimrun || !p_stmp) : 1)
+ #endif
+ )
+--- 4889,4895 ----
+ /* Print the return value, unless "vimrun" was used. */
+ if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent
+ #if defined(FEAT_GUI_MSWIN)
+! && ((gui.in_use || gui.starting) ?
+ ((options & SHELL_DOOUT) || s_dont_use_vimrun || !p_stmp) : 1)
+ #endif
+ )
+*** ../vim-8.1.1368/src/version.c 2019-05-23 17:35:52.154999830 +0200
+--- src/version.c 2019-05-23 20:10:51.329512659 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1369,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+23. You can't call your mother... she doesn't have VOIP
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1370 b/data/vim/patches/8.1.1370
new file mode 100644
index 000000000..c39be13cb
--- /dev/null
+++ b/data/vim/patches/8.1.1370
@@ -0,0 +1,40 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1370
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1370
+Problem: Not using the new github feature for donations.
+Solution: Add a Sponsor button. (closes #4417)
+Files: .github/FUNDING.yml
+
+
+*** ../vim-8.1.1369/.github/FUNDING.yml 2019-05-23 20:41:48.264449013 +0200
+--- .github/FUNDING.yml 2019-05-23 20:18:03.375646995 +0200
+***************
+*** 0 ****
+--- 1 ----
++ custom: https://www.vim.org/sponsor/index.php
+*** ../vim-8.1.1369/src/version.c 2019-05-23 20:12:43.788841875 +0200
+--- src/version.c 2019-05-23 20:40:45.256789274 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1370,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+25. You believe nothing looks sexier than a man in boxer shorts illuminated
+ only by a 17" inch svga monitor.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1371 b/data/vim/patches/8.1.1371
new file mode 100644
index 000000000..3cc175f85
--- /dev/null
+++ b/data/vim/patches/8.1.1371
@@ -0,0 +1,834 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1371
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1371
+Problem: Cannot recover from a swap file.
+Solution: Do not expand environment variables in the swap file name.
+ Do not check the extension when we already know a file is a swap
+ file. (Ken Takata, closes 4415, closes #4369)
+Files: src/buffer.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c,
+ src/gui.c, src/if_cscope.c, src/main.c, src/memline.c,
+ src/misc1.c, src/proto/memline.pro, src/proto/misc1.pro,
+ src/search.c, src/spell.c, src/spellfile.c, src/tag.c,
+ src/testdir/test_swap.vim, src/vim.h
+
+
+*** ../vim-8.1.1370/src/buffer.c 2019-05-16 20:29:40.795834299 +0200
+--- src/buffer.c 2019-05-23 21:26:50.251337934 +0200
+***************
+*** 1071,1077 ****
+
+ /* User selected Recover at ATTENTION prompt. */
+ msg_scroll = TRUE;
+! ml_recover();
+ msg_puts("\n"); /* don't overwrite the last message */
+ cmdline_row = msg_row;
+ do_modelines(0);
+--- 1071,1077 ----
+
+ /* User selected Recover at ATTENTION prompt. */
+ msg_scroll = TRUE;
+! ml_recover(FALSE);
+ msg_puts("\n"); /* don't overwrite the last message */
+ cmdline_row = msg_row;
+ do_modelines(0);
+***************
+*** 4943,4949 ****
+ if (i < alist->al_ga.ga_len
+ && (AARGLIST(alist)[i].ae_fnum == buf->b_fnum
+ || fullpathcmp(alist_name(&AARGLIST(alist)[i]),
+! buf->b_ffname, TRUE) & FPC_SAME))
+ {
+ int weight = 1;
+
+--- 4943,4949 ----
+ if (i < alist->al_ga.ga_len
+ && (AARGLIST(alist)[i].ae_fnum == buf->b_fnum
+ || fullpathcmp(alist_name(&AARGLIST(alist)[i]),
+! buf->b_ffname, TRUE, TRUE) & FPC_SAME))
+ {
+ int weight = 1;
+
+*** ../vim-8.1.1370/src/ex_cmds.c 2019-05-20 20:34:48.347791448 +0200
+--- src/ex_cmds.c 2019-05-23 21:26:50.251337934 +0200
+***************
+*** 7002,7008 ****
+ copy_option_part(&p, NameBuff, MAXPATHL, ",");
+ mustfree = FALSE;
+ rt = vim_getenv((char_u *)"VIMRUNTIME", &mustfree);
+! if (rt != NULL && fullpathcmp(rt, NameBuff, FALSE) != FPC_SAME)
+ {
+ int fcount;
+ char_u **fnames;
+--- 7002,7009 ----
+ copy_option_part(&p, NameBuff, MAXPATHL, ",");
+ mustfree = FALSE;
+ rt = vim_getenv((char_u *)"VIMRUNTIME", &mustfree);
+! if (rt != NULL &&
+! fullpathcmp(rt, NameBuff, FALSE, TRUE) != FPC_SAME)
+ {
+ int fcount;
+ char_u **fnames;
+***************
+*** 7224,7230 ****
+ */
+ ga_init2(&ga, (int)sizeof(char_u *), 100);
+ if (add_help_tags || fullpathcmp((char_u *)"$VIMRUNTIME/doc",
+! dir, FALSE) == FPC_SAME)
+ {
+ if (ga_grow(&ga, 1) == FAIL)
+ got_int = TRUE;
+--- 7225,7231 ----
+ */
+ ga_init2(&ga, (int)sizeof(char_u *), 100);
+ if (add_help_tags || fullpathcmp((char_u *)"$VIMRUNTIME/doc",
+! dir, FALSE, TRUE) == FPC_SAME)
+ {
+ if (ga_grow(&ga, 1) == FAIL)
+ got_int = TRUE;
+*** ../vim-8.1.1370/src/ex_cmds2.c 2019-05-21 20:54:42.078415244 +0200
+--- src/ex_cmds2.c 2019-05-23 21:26:50.255337904 +0200
+***************
+*** 1715,1721 ****
+ && (win->w_buffer->b_ffname == NULL
+ || !(fullpathcmp(
+ alist_name(&WARGLIST(win)[win->w_arg_idx]),
+! win->w_buffer->b_ffname, TRUE) & FPC_SAME))));
+ }
+
+ /*
+--- 1715,1721 ----
+ && (win->w_buffer->b_ffname == NULL
+ || !(fullpathcmp(
+ alist_name(&WARGLIST(win)[win->w_arg_idx]),
+! win->w_buffer->b_ffname, TRUE, TRUE) & FPC_SAME))));
+ }
+
+ /*
+***************
+*** 1737,1743 ****
+ && (win->w_buffer->b_fnum == GARGLIST[GARGCOUNT - 1].ae_fnum
+ || (win->w_buffer->b_ffname != NULL
+ && (fullpathcmp(alist_name(&GARGLIST[GARGCOUNT - 1]),
+! win->w_buffer->b_ffname, TRUE) & FPC_SAME))))
+ arg_had_last = TRUE;
+ }
+ else
+--- 1737,1743 ----
+ && (win->w_buffer->b_fnum == GARGLIST[GARGCOUNT - 1].ae_fnum
+ || (win->w_buffer->b_ffname != NULL
+ && (fullpathcmp(alist_name(&GARGLIST[GARGCOUNT - 1]),
+! win->w_buffer->b_ffname, TRUE, TRUE) & FPC_SAME))))
+ arg_had_last = TRUE;
+ }
+ else
+*** ../vim-8.1.1370/src/ex_docmd.c 2019-05-09 18:59:27.228463605 +0200
+--- src/ex_docmd.c 2019-05-23 21:26:50.255337904 +0200
+***************
+*** 6725,6731 ****
+
+ && (*eap->arg == NUL
+ || setfname(curbuf, eap->arg, NULL, TRUE) == OK))
+! ml_recover();
+ recoverymode = FALSE;
+ }
+
+--- 6725,6731 ----
+
+ && (*eap->arg == NUL
+ || setfname(curbuf, eap->arg, NULL, TRUE) == OK))
+! ml_recover(TRUE);
+ recoverymode = FALSE;
+ }
+
+*** ../vim-8.1.1370/src/gui.c 2019-05-09 14:14:37.090870887 +0200
+--- src/gui.c 2019-05-23 21:26:50.255337904 +0200
+***************
+*** 603,624 ****
+ #endif
+
+ if ( fullpathcmp((char_u *)USR_GVIMRC_FILE,
+! (char_u *)GVIMRC_FILE, FALSE) != FPC_SAME
+ #ifdef SYS_GVIMRC_FILE
+ && fullpathcmp((char_u *)SYS_GVIMRC_FILE,
+! (char_u *)GVIMRC_FILE, FALSE) != FPC_SAME
+ #endif
+ #ifdef USR_GVIMRC_FILE2
+ && fullpathcmp((char_u *)USR_GVIMRC_FILE2,
+! (char_u *)GVIMRC_FILE, FALSE) != FPC_SAME
+ #endif
+ #ifdef USR_GVIMRC_FILE3
+ && fullpathcmp((char_u *)USR_GVIMRC_FILE3,
+! (char_u *)GVIMRC_FILE, FALSE) != FPC_SAME
+ #endif
+ #ifdef USR_GVIMRC_FILE4
+ && fullpathcmp((char_u *)USR_GVIMRC_FILE4,
+! (char_u *)GVIMRC_FILE, FALSE) != FPC_SAME
+ #endif
+ )
+ do_source((char_u *)GVIMRC_FILE, TRUE, DOSO_GVIMRC);
+--- 603,624 ----
+ #endif
+
+ if ( fullpathcmp((char_u *)USR_GVIMRC_FILE,
+! (char_u *)GVIMRC_FILE, FALSE, TRUE) != FPC_SAME
+ #ifdef SYS_GVIMRC_FILE
+ && fullpathcmp((char_u *)SYS_GVIMRC_FILE,
+! (char_u *)GVIMRC_FILE, FALSE, TRUE) != FPC_SAME
+ #endif
+ #ifdef USR_GVIMRC_FILE2
+ && fullpathcmp((char_u *)USR_GVIMRC_FILE2,
+! (char_u *)GVIMRC_FILE, FALSE, TRUE) != FPC_SAME
+ #endif
+ #ifdef USR_GVIMRC_FILE3
+ && fullpathcmp((char_u *)USR_GVIMRC_FILE3,
+! (char_u *)GVIMRC_FILE, FALSE, TRUE) != FPC_SAME
+ #endif
+ #ifdef USR_GVIMRC_FILE4
+ && fullpathcmp((char_u *)USR_GVIMRC_FILE4,
+! (char_u *)GVIMRC_FILE, FALSE, TRUE) != FPC_SAME
+ #endif
+ )
+ do_source((char_u *)GVIMRC_FILE, TRUE, DOSO_GVIMRC);
+*** ../vim-8.1.1370/src/if_cscope.c 2019-02-17 17:44:36.211875510 +0100
+--- src/if_cscope.c 2019-05-23 21:31:56.497321617 +0200
+***************
+*** 1401,1410 ****
+ #if defined(UNIX)
+ && csinfo[j].st_dev == sb->st_dev && csinfo[j].st_ino == sb->st_ino
+ #else
+! /* compare pathnames first */
+ && ((fullpathcmp((char_u *)csinfo[j].fname,
+! (char_u *)fname, FALSE) & FPC_SAME)
+! /* test index file attributes too */
+ || (csinfo[j].nVolume == bhfi.dwVolumeSerialNumber
+ && csinfo[j].nIndexHigh == bhfi.nFileIndexHigh
+ && csinfo[j].nIndexLow == bhfi.nFileIndexLow))
+--- 1401,1410 ----
+ #if defined(UNIX)
+ && csinfo[j].st_dev == sb->st_dev && csinfo[j].st_ino == sb->st_ino
+ #else
+! // compare pathnames first
+ && ((fullpathcmp((char_u *)csinfo[j].fname,
+! (char_u *)fname, FALSE, TRUE) & FPC_SAME)
+! // test index file attributes too
+ || (csinfo[j].nVolume == bhfi.dwVolumeSerialNumber
+ && csinfo[j].nIndexHigh == bhfi.nFileIndexHigh
+ && csinfo[j].nIndexLow == bhfi.nFileIndexLow))
+*** ../vim-8.1.1370/src/main.c 2019-05-09 15:12:45.172723940 +0200
+--- src/main.c 2019-05-23 21:26:50.255337904 +0200
+***************
+*** 2684,2690 ****
+ if (recoverymode) /* do recover */
+ {
+ msg_scroll = TRUE; /* scroll message up */
+! ml_recover();
+ if (curbuf->b_ml.ml_mfp == NULL) /* failed */
+ getout(1);
+ do_modelines(0); /* do modelines */
+--- 2684,2690 ----
+ if (recoverymode) /* do recover */
+ {
+ msg_scroll = TRUE; /* scroll message up */
+! ml_recover(TRUE);
+ if (curbuf->b_ml.ml_mfp == NULL) /* failed */
+ getout(1);
+ do_modelines(0); /* do modelines */
+***************
+*** 3101,3118 ****
+
+ i = FAIL;
+ if (fullpathcmp((char_u *)USR_VIMRC_FILE,
+! (char_u *)VIMRC_FILE, FALSE) != FPC_SAME
+ #ifdef USR_VIMRC_FILE2
+ && fullpathcmp((char_u *)USR_VIMRC_FILE2,
+! (char_u *)VIMRC_FILE, FALSE) != FPC_SAME
+ #endif
+ #ifdef USR_VIMRC_FILE3
+ && fullpathcmp((char_u *)USR_VIMRC_FILE3,
+! (char_u *)VIMRC_FILE, FALSE) != FPC_SAME
+ #endif
+ #ifdef SYS_VIMRC_FILE
+ && fullpathcmp((char_u *)SYS_VIMRC_FILE,
+! (char_u *)VIMRC_FILE, FALSE) != FPC_SAME
+ #endif
+ )
+ i = do_source((char_u *)VIMRC_FILE, TRUE, DOSO_VIMRC);
+--- 3101,3118 ----
+
+ i = FAIL;
+ if (fullpathcmp((char_u *)USR_VIMRC_FILE,
+! (char_u *)VIMRC_FILE, FALSE, TRUE) != FPC_SAME
+ #ifdef USR_VIMRC_FILE2
+ && fullpathcmp((char_u *)USR_VIMRC_FILE2,
+! (char_u *)VIMRC_FILE, FALSE, TRUE) != FPC_SAME
+ #endif
+ #ifdef USR_VIMRC_FILE3
+ && fullpathcmp((char_u *)USR_VIMRC_FILE3,
+! (char_u *)VIMRC_FILE, FALSE, TRUE) != FPC_SAME
+ #endif
+ #ifdef SYS_VIMRC_FILE
+ && fullpathcmp((char_u *)SYS_VIMRC_FILE,
+! (char_u *)VIMRC_FILE, FALSE, TRUE) != FPC_SAME
+ #endif
+ )
+ i = do_source((char_u *)VIMRC_FILE, TRUE, DOSO_VIMRC);
+***************
+*** 3127,3136 ****
+ secure = 0;
+ #endif
+ if ( fullpathcmp((char_u *)USR_EXRC_FILE,
+! (char_u *)EXRC_FILE, FALSE) != FPC_SAME
+ #ifdef USR_EXRC_FILE2
+ && fullpathcmp((char_u *)USR_EXRC_FILE2,
+! (char_u *)EXRC_FILE, FALSE) != FPC_SAME
+ #endif
+ )
+ (void)do_source((char_u *)EXRC_FILE, FALSE, DOSO_NONE);
+--- 3127,3136 ----
+ secure = 0;
+ #endif
+ if ( fullpathcmp((char_u *)USR_EXRC_FILE,
+! (char_u *)EXRC_FILE, FALSE, TRUE) != FPC_SAME
+ #ifdef USR_EXRC_FILE2
+ && fullpathcmp((char_u *)USR_EXRC_FILE2,
+! (char_u *)EXRC_FILE, FALSE, TRUE) != FPC_SAME
+ #endif
+ )
+ (void)do_source((char_u *)EXRC_FILE, FALSE, DOSO_NONE);
+*** ../vim-8.1.1370/src/memline.c 2019-05-18 13:05:12.470334000 +0200
+--- src/memline.c 2019-05-23 21:31:48.537371741 +0200
+***************
+*** 1084,1092 ****
+
+ /*
+ * Try to recover curbuf from the .swp file.
+ */
+ void
+! ml_recover(void)
+ {
+ buf_T *buf = NULL;
+ memfile_T *mfp = NULL;
+--- 1084,1094 ----
+
+ /*
+ * Try to recover curbuf from the .swp file.
++ * If "checkext" is TRUE, check the extension and detect whether it is
++ * a swap file.
+ */
+ void
+! ml_recover(int checkext)
+ {
+ buf_T *buf = NULL;
+ memfile_T *mfp = NULL;
+***************
+*** 1136,1142 ****
+ if (fname == NULL) /* When there is no file name */
+ fname = (char_u *)"";
+ len = (int)STRLEN(fname);
+! if (len >= 4 &&
+ #if defined(VMS)
+ STRNICMP(fname + len - 4, "_s", 2)
+ #else
+--- 1138,1144 ----
+ if (fname == NULL) /* When there is no file name */
+ fname = (char_u *)"";
+ len = (int)STRLEN(fname);
+! if (checkext && len >= 4 &&
+ #if defined(VMS)
+ STRNICMP(fname + len - 4, "_s", 2)
+ #else
+***************
+*** 1887,1893 ****
+ if (num_names == 0)
+ num_files = 0;
+ else if (expand_wildcards(num_names, names, &num_files, &files,
+! EW_KEEPALL|EW_FILE|EW_SILENT) == FAIL)
+ num_files = 0;
+
+ /*
+--- 1889,1895 ----
+ if (num_names == 0)
+ num_files = 0;
+ else if (expand_wildcards(num_names, names, &num_files, &files,
+! EW_NOTENV|EW_KEEPALL|EW_FILE|EW_SILENT) == FAIL)
+ num_files = 0;
+
+ /*
+***************
+*** 1930,1940 ****
+ && (p = curbuf->b_ml.ml_mfp->mf_fname) != NULL)
+ {
+ for (i = 0; i < num_files; ++i)
+! if (fullpathcmp(p, files[i], TRUE) & FPC_SAME)
+ {
+! /* Remove the name from files[i]. Move further entries
+! * down. When the array becomes empty free it here, since
+! * FreeWild() won't be called below. */
+ vim_free(files[i]);
+ if (--num_files == 0)
+ vim_free(files);
+--- 1932,1944 ----
+ && (p = curbuf->b_ml.ml_mfp->mf_fname) != NULL)
+ {
+ for (i = 0; i < num_files; ++i)
+! // Do not expand wildcards, on windows would try to expand
+! // "%tmp%" in "%tmp%file".
+! if (fullpathcmp(p, files[i], TRUE, FALSE) & FPC_SAME)
+ {
+! // Remove the name from files[i]. Move further entries
+! // down. When the array becomes empty free it here, since
+! // FreeWild() won't be called below.
+ vim_free(files[i]);
+ if (--num_files == 0)
+ vim_free(files);
+*** ../vim-8.1.1370/src/misc1.c 2019-05-19 22:53:36.508914587 +0200
+--- src/misc1.c 2019-05-23 21:26:50.255337904 +0200
+***************
+*** 2691,2703 ****
+ * FPC_DIFF if they both exist and are different files.
+ * FPC_NOTX if they both don't exist.
+ * FPC_DIFFX if one of them doesn't exist.
+! * For the first name environment variables are expanded
+ */
+ int
+ fullpathcmp(
+ char_u *s1,
+ char_u *s2,
+! int checkname) /* when both don't exist, check file names */
+ {
+ #ifdef UNIX
+ char_u exp1[MAXPATHL];
+--- 2691,2705 ----
+ * FPC_DIFF if they both exist and are different files.
+ * FPC_NOTX if they both don't exist.
+ * FPC_DIFFX if one of them doesn't exist.
+! * For the first name environment variables are expanded if "expandenv" is
+! * TRUE.
+ */
+ int
+ fullpathcmp(
+ char_u *s1,
+ char_u *s2,
+! int checkname, // when both don't exist, check file names
+! int expandenv)
+ {
+ #ifdef UNIX
+ char_u exp1[MAXPATHL];
+***************
+*** 2706,2712 ****
+ stat_T st1, st2;
+ int r1, r2;
+
+! expand_env(s1, exp1, MAXPATHL);
+ r1 = mch_stat((char *)exp1, &st1);
+ r2 = mch_stat((char *)s2, &st2);
+ if (r1 != 0 && r2 != 0)
+--- 2708,2717 ----
+ stat_T st1, st2;
+ int r1, r2;
+
+! if (expandenv)
+! expand_env(s1, exp1, MAXPATHL);
+! else
+! vim_strncpy(exp1, s1, MAXPATHL - 1);
+ r1 = mch_stat((char *)exp1, &st1);
+ r2 = mch_stat((char *)s2, &st2);
+ if (r1 != 0 && r2 != 0)
+***************
+*** 2741,2747 ****
+ full1 = exp1 + MAXPATHL;
+ full2 = full1 + MAXPATHL;
+
+! expand_env(s1, exp1, MAXPATHL);
+ r1 = vim_FullName(exp1, full1, MAXPATHL, FALSE);
+ r2 = vim_FullName(s2, full2, MAXPATHL, FALSE);
+
+--- 2746,2755 ----
+ full1 = exp1 + MAXPATHL;
+ full2 = full1 + MAXPATHL;
+
+! if (expandenv)
+! expand_env(s1, exp1, MAXPATHL);
+! else
+! vim_strncpy(exp1, s1, MAXPATHL - 1);
+ r1 = vim_FullName(exp1, full1, MAXPATHL, FALSE);
+ r2 = vim_FullName(s2, full2, MAXPATHL, FALSE);
+
+***************
+*** 4027,4033 ****
+ /*
+ * First expand environment variables, "~/" and "~user/".
+ */
+! if (has_env_var(p) || *p == '~')
+ {
+ p = expand_env_save_opt(p, TRUE);
+ if (p == NULL)
+--- 4035,4041 ----
+ /*
+ * First expand environment variables, "~/" and "~user/".
+ */
+! if ((has_env_var(p) && !(flags & EW_NOTENV)) || *p == '~')
+ {
+ p = expand_env_save_opt(p, TRUE);
+ if (p == NULL)
+*** ../vim-8.1.1370/src/proto/memline.pro 2019-05-10 21:28:35.184612974 +0200
+--- src/proto/memline.pro 2019-05-23 21:26:50.255337904 +0200
+***************
+*** 9,15 ****
+ void ml_close_all(int del_file);
+ void ml_close_notmod(void);
+ 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);
+--- 9,15 ----
+ void ml_close_all(int del_file);
+ void ml_close_notmod(void);
+ void ml_timestamp(buf_T *buf);
+! void ml_recover(int checkext);
+ 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);
+*** ../vim-8.1.1370/src/proto/misc1.pro 2019-05-11 17:03:55.170019762 +0200
+--- src/proto/misc1.pro 2019-05-23 21:26:50.255337904 +0200
+***************
+*** 45,51 ****
+ int match_user(char_u *name);
+ void home_replace(buf_T *buf, char_u *src, char_u *dst, int dstlen, int one);
+ char_u *home_replace_save(buf_T *buf, char_u *src);
+! int fullpathcmp(char_u *s1, char_u *s2, int checkname);
+ char_u *gettail(char_u *fname);
+ char_u *gettail_sep(char_u *fname);
+ char_u *getnextcomp(char_u *fname);
+--- 45,51 ----
+ int match_user(char_u *name);
+ void home_replace(buf_T *buf, char_u *src, char_u *dst, int dstlen, int one);
+ char_u *home_replace_save(buf_T *buf, char_u *src);
+! int fullpathcmp(char_u *s1, char_u *s2, int checkname, int expandenv);
+ char_u *gettail(char_u *fname);
+ char_u *gettail_sep(char_u *fname);
+ char_u *getnextcomp(char_u *fname);
+*** ../vim-8.1.1370/src/search.c 2019-05-18 19:26:25.973151461 +0200
+--- src/search.c 2019-05-23 21:26:50.259337879 +0200
+***************
+*** 5170,5176 ****
+ i = old_files;
+ if (i == max_path_depth)
+ break;
+! if (fullpathcmp(new_fname, files[i].name, TRUE) & FPC_SAME)
+ {
+ if (type != CHECK_PATH &&
+ action == ACTION_SHOW_ALL && files[i].matched)
+--- 5170,5177 ----
+ i = old_files;
+ if (i == max_path_depth)
+ break;
+! if (fullpathcmp(new_fname, files[i].name, TRUE, TRUE)
+! & FPC_SAME)
+ {
+ if (type != CHECK_PATH &&
+ action == ACTION_SHOW_ALL && files[i].matched)
+*** ../vim-8.1.1370/src/spell.c 2019-05-09 15:12:45.176723907 +0200
+--- src/spell.c 2019-05-23 21:26:50.259337879 +0200
+***************
+*** 2343,2349 ****
+
+ /* Check if we loaded this language before. */
+ for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+! if (fullpathcmp(lang, slang->sl_fname, FALSE) == FPC_SAME)
+ break;
+ }
+ else
+--- 2343,2349 ----
+
+ /* Check if we loaded this language before. */
+ for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+! if (fullpathcmp(lang, slang->sl_fname, FALSE, TRUE) == FPC_SAME)
+ break;
+ }
+ else
+***************
+*** 2395,2401 ****
+ * Loop over the languages, there can be several files for "lang".
+ */
+ for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+! if (filename ? fullpathcmp(lang, slang->sl_fname, FALSE) == FPC_SAME
+ : STRICMP(lang, slang->sl_name) == 0)
+ {
+ region_mask = REGION_ALL;
+--- 2395,2402 ----
+ * Loop over the languages, there can be several files for "lang".
+ */
+ for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+! if (filename ? fullpathcmp(lang, slang->sl_fname, FALSE, TRUE)
+! == FPC_SAME
+ : STRICMP(lang, slang->sl_name) == 0)
+ {
+ region_mask = REGION_ALL;
+***************
+*** 2463,2469 ****
+ for (c = 0; c < ga.ga_len; ++c)
+ {
+ p = LANGP_ENTRY(ga, c)->lp_slang->sl_fname;
+! if (p != NULL && fullpathcmp(spf_name, p, FALSE) == FPC_SAME)
+ break;
+ }
+ if (c < ga.ga_len)
+--- 2464,2471 ----
+ for (c = 0; c < ga.ga_len; ++c)
+ {
+ p = LANGP_ENTRY(ga, c)->lp_slang->sl_fname;
+! if (p != NULL && fullpathcmp(spf_name, p, FALSE, TRUE)
+! == FPC_SAME)
+ break;
+ }
+ if (c < ga.ga_len)
+***************
+*** 2472,2478 ****
+
+ /* Check if it was loaded already. */
+ for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+! if (fullpathcmp(spf_name, slang->sl_fname, FALSE) == FPC_SAME)
+ break;
+ if (slang == NULL)
+ {
+--- 2474,2481 ----
+
+ /* Check if it was loaded already. */
+ for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+! if (fullpathcmp(spf_name, slang->sl_fname, FALSE, TRUE)
+! == FPC_SAME)
+ break;
+ if (slang == NULL)
+ {
+*** ../vim-8.1.1370/src/spellfile.c 2019-05-09 15:12:45.176723907 +0200
+--- src/spellfile.c 2019-05-23 21:26:50.259337879 +0200
+***************
+*** 1734,1740 ****
+
+ for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+ {
+! if (fullpathcmp(fname, slang->sl_fname, FALSE) == FPC_SAME)
+ {
+ slang_clear(slang);
+ if (spell_load_file(fname, NULL, slang, FALSE) == NULL)
+--- 1734,1740 ----
+
+ for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+ {
+! if (fullpathcmp(fname, slang->sl_fname, FALSE, TRUE) == FPC_SAME)
+ {
+ slang_clear(slang);
+ if (spell_load_file(fname, NULL, slang, FALSE) == NULL)
+***************
+*** 5440,5446 ****
+ * It might have been done already by spell_reload_one().
+ */
+ for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+! if (fullpathcmp(wfname, slang->sl_fname, FALSE) == FPC_SAME)
+ break;
+ if (slang == NULL)
+ {
+--- 5440,5446 ----
+ * It might have been done already by spell_reload_one().
+ */
+ for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+! if (fullpathcmp(wfname, slang->sl_fname, FALSE, TRUE) == FPC_SAME)
+ break;
+ if (slang == NULL)
+ {
+*** ../vim-8.1.1370/src/tag.c 2019-05-03 23:15:34.048180407 +0200
+--- src/tag.c 2019-05-23 21:26:50.259337879 +0200
+***************
+*** 3781,3787 ****
+ fullname = expand_tag_fname(fname, tag_fname, TRUE);
+ if (fullname != NULL)
+ {
+! retval = (fullpathcmp(fullname, buf_ffname, TRUE) & FPC_SAME);
+ vim_free(fullname);
+ }
+ #ifdef FEAT_EMACS_TAGS
+--- 3781,3787 ----
+ fullname = expand_tag_fname(fname, tag_fname, TRUE);
+ if (fullname != NULL)
+ {
+! retval = (fullpathcmp(fullname, buf_ffname, TRUE, TRUE) & FPC_SAME);
+ vim_free(fullname);
+ }
+ #ifdef FEAT_EMACS_TAGS
+*** ../vim-8.1.1370/src/testdir/test_swap.vim 2019-04-28 23:07:13.572480525 +0200
+--- src/testdir/test_swap.vim 2019-05-23 21:26:50.259337879 +0200
+***************
+*** 220,222 ****
+--- 220,306 ----
+ augroup END
+ augroup! test_swapfile_delete
+ endfunc
++
++ func Test_swap_recover()
++ autocmd! SwapExists
++ augroup test_swap_recover
++ autocmd!
++ autocmd SwapExists * let v:swapchoice = 'r'
++ augroup END
++
++
++ call mkdir('Xswap')
++ let $Xswap = 'foo' " Check for issue #4369.
++ set dir=Xswap//
++ " Create a valid swapfile by editing a file.
++ split Xswap/text
++ call setline(1, ['one', 'two', 'three'])
++ write " file is written, not modified
++ " read the swapfile as a Blob
++ let swapfile_name = swapname('%')
++ let swapfile_bytes = readfile(swapfile_name, 'B')
++
++ " Close the file and recreate the swap file.
++ quit
++ call writefile(swapfile_bytes, swapfile_name)
++ " Edit the file again. This triggers recovery.
++ try
++ split Xswap/text
++ catch
++ " E308 should be caught, not E305.
++ call assert_exception('E308:') " Original file may have been changed
++ endtry
++ " The file should be recovered.
++ call assert_equal(['one', 'two', 'three'], getline(1, 3))
++ quit!
++
++ call delete('Xswap/text')
++ call delete(swapfile_name)
++ call delete('Xswap', 'd')
++ unlet $Xswap
++ set dir&
++ augroup test_swap_recover
++ autocmd!
++ augroup END
++ augroup! test_swap_recover
++ endfunc
++
++ func Test_swap_recover_ext()
++ autocmd! SwapExists
++ augroup test_swap_recover_ext
++ autocmd!
++ autocmd SwapExists * let v:swapchoice = 'r'
++ augroup END
++
++
++ " Create a valid swapfile by editing a file with a special extension.
++ split Xtest.scr
++ call setline(1, ['one', 'two', 'three'])
++ write " file is written, not modified
++ write " write again to make sure the swapfile is created
++ " read the swapfile as a Blob
++ let swapfile_name = swapname('%')
++ let swapfile_bytes = readfile(swapfile_name, 'B')
++
++ " Close and delete the file and recreate the swap file.
++ quit
++ call delete('Xtest.scr')
++ call writefile(swapfile_bytes, swapfile_name)
++ " Edit the file again. This triggers recovery.
++ try
++ split Xtest.scr
++ catch
++ " E308 should be caught, not E306.
++ call assert_exception('E308:') " Original file may have been changed
++ endtry
++ " The file should be recovered.
++ call assert_equal(['one', 'two', 'three'], getline(1, 3))
++ quit!
++
++ call delete('Xtest.scr')
++ call delete(swapfile_name)
++ augroup test_swap_recover_ext
++ autocmd!
++ augroup END
++ augroup! test_swap_recover_ext
++ endfunc
+*** ../vim-8.1.1370/src/vim.h 2019-05-19 22:53:36.504914607 +0200
+--- src/vim.h 2019-05-23 21:34:16.148457017 +0200
+***************
+*** 781,806 ****
+ #define WILD_ICASE 0x100
+ #define WILD_ALLLINKS 0x200
+
+! /* Flags for expand_wildcards() */
+! #define EW_DIR 0x01 /* include directory names */
+! #define EW_FILE 0x02 /* include file names */
+! #define EW_NOTFOUND 0x04 /* include not found names */
+! #define EW_ADDSLASH 0x08 /* append slash to directory name */
+! #define EW_KEEPALL 0x10 /* keep all matches */
+! #define EW_SILENT 0x20 /* don't print "1 returned" from shell */
+! #define EW_EXEC 0x40 /* executable files */
+! #define EW_PATH 0x80 /* search in 'path' too */
+! #define EW_ICASE 0x100 /* ignore case */
+! #define EW_NOERROR 0x200 /* no error for bad regexp */
+! #define EW_NOTWILD 0x400 /* add match with literal name if exists */
+! #define EW_KEEPDOLLAR 0x800 /* do not escape $, $var is expanded */
+! /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND
+! * is used when executing commands and EW_SILENT for interactive expanding. */
+! #define EW_ALLLINKS 0x1000 /* also links not pointing to existing file */
+! #define EW_SHELLCMD 0x2000 /* called from expand_shellcmd(), don't check
+! * if executable is in $PATH */
+! #define EW_DODOT 0x4000 /* also files starting with a dot */
+! #define EW_EMPTYOK 0x8000 /* no matches is not an error */
+
+ /* Flags for find_file_*() functions. */
+ #define FINDFILE_FILE 0 /* only files */
+--- 781,807 ----
+ #define WILD_ICASE 0x100
+ #define WILD_ALLLINKS 0x200
+
+! // Flags for expand_wildcards()
+! #define EW_DIR 0x01 // include directory names
+! #define EW_FILE 0x02 // include file names
+! #define EW_NOTFOUND 0x04 // include not found names
+! #define EW_ADDSLASH 0x08 // append slash to directory name
+! #define EW_KEEPALL 0x10 // keep all matches
+! #define EW_SILENT 0x20 // don't print "1 returned" from shell
+! #define EW_EXEC 0x40 // executable files
+! #define EW_PATH 0x80 // search in 'path' too
+! #define EW_ICASE 0x100 // ignore case
+! #define EW_NOERROR 0x200 // no error for bad regexp
+! #define EW_NOTWILD 0x400 // add match with literal name if exists
+! #define EW_KEEPDOLLAR 0x800 // do not escape $, $var is expanded
+! // Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND
+! // is used when executing commands and EW_SILENT for interactive expanding.
+! #define EW_ALLLINKS 0x1000 // also links not pointing to existing file
+! #define EW_SHELLCMD 0x2000 // called from expand_shellcmd(), don't check
+! // if executable is in $PATH
+! #define EW_DODOT 0x4000 // also files starting with a dot
+! #define EW_EMPTYOK 0x8000 // no matches is not an error
+! #define EW_NOTENV 0x10000 // do not expand environment variables
+
+ /* Flags for find_file_*() functions. */
+ #define FINDFILE_FILE 0 /* only files */
+*** ../vim-8.1.1370/src/version.c 2019-05-23 20:41:54.040417792 +0200
+--- src/version.c 2019-05-23 21:29:17.694342363 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1371,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+26. You check your mail. It says "no new messages." So you check 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 ///
diff --git a/data/vim/patches/8.1.1372 b/data/vim/patches/8.1.1372
new file mode 100644
index 000000000..ec0892e8c
--- /dev/null
+++ b/data/vim/patches/8.1.1372
@@ -0,0 +1,320 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1372
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1372
+Problem: When evaluating 'statusline' the current window is unknown.
+ (Daniel Hahler)
+Solution: Set "g:actual_curwin" for %{} items. Set "g:statusline_winid"
+ when evaluationg %!. (closes #4406, closes #3299)
+Files: src/buffer.c, runtime/doc/options.txt,
+ src/testdir/test_statusline.vim
+
+
+*** ../vim-8.1.1371/src/buffer.c 2019-05-23 21:35:44.451922663 +0200
+--- src/buffer.c 2019-05-23 22:05:41.446687352 +0200
+***************
+*** 3893,3899 ****
+ char_u base;
+ char_u opt;
+ #define TMPLEN 70
+! char_u tmp[TMPLEN];
+ char_u *usefmt = fmt;
+ struct stl_hlrec *sp;
+ int save_must_redraw = must_redraw;
+--- 3893,3900 ----
+ char_u base;
+ char_u opt;
+ #define TMPLEN 70
+! char_u buf_tmp[TMPLEN];
+! char_u win_tmp[TMPLEN];
+ char_u *usefmt = fmt;
+ struct stl_hlrec *sp;
+ int save_must_redraw = must_redraw;
+***************
+*** 3906,3914 ****
+--- 3907,3923 ----
+ */
+ if (fmt[0] == '%' && fmt[1] == '!')
+ {
++ typval_T tv;
++
++ tv.v_type = VAR_NUMBER;
++ tv.vval.v_number = wp->w_id;
++ set_var((char_u *)"g:statusline_winid", &tv, FALSE);
++
+ usefmt = eval_to_string_safe(fmt + 2, NULL, use_sandbox);
+ if (usefmt == NULL)
+ usefmt = fmt;
++
++ do_unlet((char_u *)"g:statusline_winid", TRUE);
+ }
+ #endif
+
+***************
+*** 4225,4232 ****
+ p = t;
+
+ #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;
+--- 4234,4244 ----
+ p = t;
+
+ #ifdef FEAT_EVAL
+! vim_snprintf((char *)buf_tmp, sizeof(buf_tmp),
+! "%d", curbuf->b_fnum);
+! set_internal_string_var((char_u *)"g:actual_curbuf", buf_tmp);
+! vim_snprintf((char *)win_tmp, sizeof(win_tmp), "%d", curwin->w_id);
+! set_internal_string_var((char_u *)"g:actual_curwin", win_tmp);
+
+ save_curbuf = curbuf;
+ save_curwin = curwin;
+***************
+*** 4238,4243 ****
+--- 4250,4256 ----
+ curwin = save_curwin;
+ curbuf = save_curbuf;
+ do_unlet((char_u *)"g:actual_curbuf", TRUE);
++ do_unlet((char_u *)"g:actual_curwin", TRUE);
+
+ if (str != NULL && *str != 0)
+ {
+***************
+*** 4290,4310 ****
+ break;
+
+ case STL_ALTPERCENT:
+! str = tmp;
+ get_rel_pos(wp, str, TMPLEN);
+ break;
+
+ case STL_ARGLISTSTAT:
+ fillable = FALSE;
+! tmp[0] = 0;
+! if (append_arg_number(wp, tmp, (int)sizeof(tmp), FALSE))
+! str = tmp;
+ break;
+
+ case STL_KEYMAP:
+ fillable = FALSE;
+! if (get_keymap_str(wp, (char_u *)"<%s>", tmp, TMPLEN))
+! str = tmp;
+ break;
+ case STL_PAGENUM:
+ #if defined(FEAT_PRINTER) || defined(FEAT_GUI_TABLINE)
+--- 4303,4323 ----
+ break;
+
+ case STL_ALTPERCENT:
+! str = buf_tmp;
+ get_rel_pos(wp, str, TMPLEN);
+ break;
+
+ case STL_ARGLISTSTAT:
+ fillable = FALSE;
+! buf_tmp[0] = 0;
+! if (append_arg_number(wp, buf_tmp, (int)sizeof(buf_tmp), FALSE))
+! str = buf_tmp;
+ break;
+
+ case STL_KEYMAP:
+ fillable = FALSE;
+! if (get_keymap_str(wp, (char_u *)"<%s>", buf_tmp, TMPLEN))
+! str = buf_tmp;
+ break;
+ case STL_PAGENUM:
+ #if defined(FEAT_PRINTER) || defined(FEAT_GUI_TABLINE)
+***************
+*** 4360,4368 ****
+ if (*wp->w_buffer->b_p_ft != NUL
+ && STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 3)
+ {
+! vim_snprintf((char *)tmp, sizeof(tmp), "[%s]",
+ wp->w_buffer->b_p_ft);
+! str = tmp;
+ }
+ break;
+
+--- 4373,4381 ----
+ if (*wp->w_buffer->b_p_ft != NUL
+ && STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 3)
+ {
+! vim_snprintf((char *)buf_tmp, sizeof(buf_tmp), "[%s]",
+ wp->w_buffer->b_p_ft);
+! str = buf_tmp;
+ }
+ break;
+
+***************
+*** 4371,4381 ****
+ if (*wp->w_buffer->b_p_ft != NUL
+ && STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 2)
+ {
+! vim_snprintf((char *)tmp, sizeof(tmp), ",%s",
+ wp->w_buffer->b_p_ft);
+! for (t = tmp; *t != 0; t++)
+ *t = TOUPPER_LOC(*t);
+! str = tmp;
+ }
+ break;
+
+--- 4384,4394 ----
+ if (*wp->w_buffer->b_p_ft != NUL
+ && STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 2)
+ {
+! vim_snprintf((char *)buf_tmp, sizeof(buf_tmp), ",%s",
+ wp->w_buffer->b_p_ft);
+! for (t = buf_tmp; *t != 0; t++)
+ *t = TOUPPER_LOC(*t);
+! str = buf_tmp;
+ }
+ break;
+
+*** ../vim-8.1.1371/runtime/doc/options.txt 2019-05-23 15:37:41.961634991 +0200
+--- runtime/doc/options.txt 2019-05-23 22:10:41.405260815 +0200
+***************
+*** 5082,5087 ****
+--- 5082,5089 ----
+ When on allow some options that are an expression to be set in the
+ modeline. Check the option for whether it is affected by
+ 'modelineexpr'. Also see |modeline|.
++ This option cannot be set from a |modeline| or in the |sandbox|, for
++ security reasons.
+
+ *'modelines'* *'mls'*
+ 'modelines' 'mls' number (default 5)
+***************
+*** 7089,7095 ****
+ When the option starts with "%!" then it is used as an expression,
+ evaluated and the result is used as the option value. Example: >
+ :set statusline=%!MyStatusLine()
+! < The result can contain %{} items that will be evaluated too.
+ Note that the "%!" expression is evaluated in the context of the
+ current window and buffer, while %{} items are evaluated in the
+ context of the window that the statusline belongs to.
+--- 7091,7099 ----
+ When the option starts with "%!" then it is used as an expression,
+ evaluated and the result is used as the option value. Example: >
+ :set statusline=%!MyStatusLine()
+! < The *g:statusline_winid* variable will be set to the |window-ID| of the
+! window that the status line belongs to.
+! The result can contain %{} items that will be evaluated too.
+ Note that the "%!" expression is evaluated in the context of the
+ current window and buffer, while %{} items are evaluated in the
+ context of the window that the statusline belongs to.
+***************
+*** 7192,7204 ****
+ become empty. This will make a group like the following disappear
+ completely from the statusline when none of the flags are set. >
+ :set statusline=...%(\ [%M%R%H]%)...
+! < *g:actual_curbuf*
+! Beware that an expression is evaluated each and every time the status
+! line is displayed. The current buffer and current window will be set
+! temporarily to that of the window (and buffer) whose statusline is
+! currently being drawn. The expression will evaluate in this context.
+! The variable "g:actual_curbuf" is set to the `bufnr()` number of the
+! real current buffer.
+
+ The 'statusline' option will be evaluated in the |sandbox| if set from
+ a modeline, see |sandbox-option|.
+--- 7196,7210 ----
+ become empty. This will make a group like the following disappear
+ completely from the statusline when none of the flags are set. >
+ :set statusline=...%(\ [%M%R%H]%)...
+! < Beware that an expression is evaluated each and every time the status
+! line is displayed.
+! *g:actual_curbuf* *g:actual_curwin*
+! The current buffer and current window will be set temporarily to that
+! of the window (and buffer) whose statusline is currently being drawn.
+! The expression will evaluate in this context. The variable
+! "g:actual_curbuf" is set to the `bufnr()` number of the real current
+! buffer and "g:actual_curwin" to the |window-ID| of the real current
+! window. These values are strings.
+
+ The 'statusline' option will be evaluated in the |sandbox| if set from
+ a modeline, see |sandbox-option|.
+*** ../vim-8.1.1371/src/testdir/test_statusline.vim 2019-04-14 13:23:36.911963919 +0200
+--- src/testdir/test_statusline.vim 2019-05-23 22:08:43.121833219 +0200
+***************
+*** 29,35 ****
+
+ " Function used to display syntax group.
+ func SyntaxItem()
+! return synIDattr(synID(line("."),col("."),1),"name")
+ endfunc
+
+ func Test_caught_error_in_statusline()
+--- 29,37 ----
+
+ " Function used to display syntax group.
+ func SyntaxItem()
+! call assert_equal(s:expected_curbuf, g:actual_curbuf)
+! call assert_equal(s:expected_curwin, g:actual_curwin)
+! return synIDattr(synID(line("."), col("."),1), "name")
+ endfunc
+
+ func Test_caught_error_in_statusline()
+***************
+*** 218,223 ****
+--- 220,227 ----
+
+ "%{: Evaluate expression between '%{' and '}' and substitute result.
+ syntax on
++ let s:expected_curbuf = string(bufnr(''))
++ let s:expected_curwin = string(win_getid())
+ set statusline=%{SyntaxItem()}
+ call assert_match('^vimNumber\s*$', s:get_statusline())
+ s/^/"/
+***************
+*** 332,337 ****
+--- 336,358 ----
+ set statusline=%!2*3+1
+ call assert_match('7\s*$', s:get_statusline())
+
++ func GetNested()
++ call assert_equal(string(win_getid()), g:actual_curwin)
++ call assert_equal(string(bufnr('')), g:actual_curbuf)
++ return 'nested'
++ endfunc
++ func GetStatusLine()
++ call assert_equal(win_getid(), g:statusline_winid)
++ return 'the %{GetNested()} line'
++ endfunc
++ set statusline=%!GetStatusLine()
++ call assert_match('the nested line', s:get_statusline())
++ call assert_false(exists('g:actual_curwin'))
++ call assert_false(exists('g:actual_curbuf'))
++ call assert_false(exists('g:statusline_winid'))
++ delfunc GetNested
++ delfunc GetStatusLine
++
+ " Check statusline in current and non-current window
+ " with the 'fillchars' option.
+ set fillchars=stl:^,stlnc:=,vert:\|,fold:-,diff:-
+*** ../vim-8.1.1371/src/version.c 2019-05-23 21:35:44.459922615 +0200
+--- src/version.c 2019-05-23 21:45:13.452621087 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1372,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+27. You refer to your age as 3.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.1373 b/data/vim/patches/8.1.1373
new file mode 100644
index 000000000..6ca014cc8
--- /dev/null
+++ b/data/vim/patches/8.1.1373
@@ -0,0 +1,178 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1373
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1373
+Problem: "[p" in Visual mode puts in wrong line.
+Solution: Call nv_put() instead of duplicating the functionality.
+ (closes #4408)
+Files: src/normal.c, src/testdir/test_put.vim
+
+
+*** ../vim-8.1.1372/src/normal.c 2019-05-09 15:12:45.172723940 +0200
+--- src/normal.c 2019-05-23 23:24:02.498494630 +0200
+***************
+*** 143,148 ****
+--- 143,149 ----
+ static void nv_halfpage(cmdarg_T *cap);
+ static void nv_join(cmdarg_T *cap);
+ static void nv_put(cmdarg_T *cap);
++ static void nv_put_opt(cmdarg_T *cap, int fix_indent);
+ static void nv_open(cmdarg_T *cap);
+ #ifdef FEAT_NETBEANS_INTG
+ static void nv_nbcmd(cmdarg_T *cap);
+***************
+*** 6583,6639 ****
+ */
+ else if (cap->nchar == 'p' || cap->nchar == 'P')
+ {
+! if (!checkclearop(cap->oap))
+! {
+! int dir = (cap->cmdchar == ']' && cap->nchar == 'p')
+! ? FORWARD : BACKWARD;
+! int regname = cap->oap->regname;
+! int was_visual = VIsual_active;
+! int line_count = curbuf->b_ml.ml_line_count;
+! pos_T start, end;
+!
+! if (VIsual_active)
+! {
+! start = LTOREQ_POS(VIsual, curwin->w_cursor)
+! ? VIsual : curwin->w_cursor;
+! end = EQUAL_POS(start,VIsual) ? curwin->w_cursor : VIsual;
+! curwin->w_cursor = (dir == BACKWARD ? start : end);
+! }
+! # ifdef FEAT_CLIPBOARD
+! adjust_clip_reg(&regname);
+! # endif
+! prep_redo_cmd(cap);
+!
+! do_put(regname, dir, cap->count1, PUT_FIXINDENT);
+! if (was_visual)
+! {
+! VIsual = start;
+! curwin->w_cursor = end;
+! if (dir == BACKWARD)
+! {
+! /* adjust lines */
+! VIsual.lnum += curbuf->b_ml.ml_line_count - line_count;
+! curwin->w_cursor.lnum +=
+! curbuf->b_ml.ml_line_count - line_count;
+! }
+!
+! VIsual_active = TRUE;
+! if (VIsual_mode == 'V')
+! {
+! /* delete visually selected lines */
+! cap->cmdchar = 'd';
+! cap->nchar = NUL;
+! cap->oap->regname = regname;
+! nv_operator(cap);
+! do_pending_operator(cap, 0, FALSE);
+! }
+! if (VIsual_active)
+! {
+! end_visual_mode();
+! redraw_later(SOME_VALID);
+! }
+! }
+! }
+ }
+
+ /*
+--- 6584,6590 ----
+ */
+ else if (cap->nchar == 'p' || cap->nchar == 'P')
+ {
+! nv_put_opt(cap, TRUE);
+ }
+
+ /*
+***************
+*** 9290,9295 ****
+--- 9241,9256 ----
+ static void
+ nv_put(cmdarg_T *cap)
+ {
++ nv_put_opt(cap, FALSE);
++ }
++
++ /*
++ * "P", "gP", "p" and "gp" commands.
++ * "fix_indent" is TRUE for "[p", "[P", "]p" and "]P".
++ */
++ static void
++ nv_put_opt(cmdarg_T *cap, int fix_indent)
++ {
+ int regname = 0;
+ void *reg1 = NULL, *reg2 = NULL;
+ int empty = FALSE;
+***************
+*** 9318,9325 ****
+ #endif
+ else
+ {
+! dir = (cap->cmdchar == 'P'
+! || (cap->cmdchar == 'g' && cap->nchar == 'P'))
+ ? BACKWARD : FORWARD;
+ prep_redo_cmd(cap);
+ if (cap->cmdchar == 'g')
+--- 9279,9293 ----
+ #endif
+ else
+ {
+! if (fix_indent)
+! {
+! dir = (cap->cmdchar == ']' && cap->nchar == 'p')
+! ? FORWARD : BACKWARD;
+! flags |= PUT_FIXINDENT;
+! }
+! else
+! dir = (cap->cmdchar == 'P'
+! || (cap->cmdchar == 'g' && cap->nchar == 'P'))
+ ? BACKWARD : FORWARD;
+ prep_redo_cmd(cap);
+ if (cap->cmdchar == 'g')
+*** ../vim-8.1.1372/src/testdir/test_put.vim 2019-01-24 17:59:35.139217458 +0100
+--- src/testdir/test_put.vim 2019-05-23 23:18:57.776076524 +0200
+***************
+*** 101,103 ****
+--- 101,115 ----
+ delfunction Capture_p_error
+ bwipeout!
+ endfunc
++
++ func Test_put_p_indent_visual()
++ new
++ call setline(1, ['select this text', 'select that text'])
++ " yank "that" from the second line
++ normal 2Gwvey
++ " select "this" in the first line and put
++ normal k0wve[p
++ call assert_equal('select that text', getline(1))
++ call assert_equal('select that text', getline(2))
++ bwipe!
++ endfunc
+*** ../vim-8.1.1372/src/version.c 2019-05-23 22:11:56.288893239 +0200
+--- src/version.c 2019-05-23 23:27:09.009524667 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1373,
+ /**/
+
+--
+Don't Panic!
+ -- 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.1374 b/data/vim/patches/8.1.1374
new file mode 100644
index 000000000..ab4a13209
--- /dev/null
+++ b/data/vim/patches/8.1.1374
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1374
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1374
+Problem: Check for file changed triggers too often.
+Solution: Don't use "b_p_ar" when it is negative.
+Files: src/fileio.c
+
+
+*** ../vim-8.1.1373/src/fileio.c 2019-05-18 18:52:01.040972255 +0200
+--- src/fileio.c 2019-05-24 11:40:14.036978598 +0200
+***************
+*** 6776,6782 ****
+ {
+ // When 'autoread' is set we'll check the file again to see if it
+ // re-appears.
+! buf->b_mtime = buf->b_p_ar;
+ buf->b_orig_size = 0;
+ buf->b_orig_mode = 0;
+ }
+--- 6776,6782 ----
+ {
+ // When 'autoread' is set we'll check the file again to see if it
+ // re-appears.
+! buf->b_mtime = (buf->b_p_ar >= 0 ? buf->b_p_ar : p_ar);
+ buf->b_orig_size = 0;
+ buf->b_orig_mode = 0;
+ }
+*** ../vim-8.1.1373/src/version.c 2019-05-23 23:27:29.781416583 +0200
+--- src/version.c 2019-05-24 11:45:07.175648661 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1374,
+ /**/
+
+--
+If they don't keep on exercising their lips, he thought, their brains
+start working.
+ -- 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.1375 b/data/vim/patches/8.1.1375
new file mode 100644
index 000000000..e2456dbad
--- /dev/null
+++ b/data/vim/patches/8.1.1375
@@ -0,0 +1,401 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1375
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1375
+Problem: Without "TS" in 'shortmess' get a hit-enter prompt often.
+Solution: Always truncate the search message. Also avoid putting it in the
+ message history. (closes #4413)
+Files: src/search.c, src/main.c, src/testdir/test_search_stat.vim
+
+
+*** ../vim-8.1.1374/src/search.c 2019-05-23 21:35:44.455922641 +0200
+--- src/search.c 2019-05-24 13:05:13.405227544 +0200
+***************
+*** 1381,1390 ****
+--- 1381,1409 ----
+ && !cmd_silent && msg_silent == 0)
+ {
+ char_u *trunc;
++ char_u off_buf[40];
++ int off_len = 0;
+
+ // Compute msg_row early.
+ msg_start();
+
++ // Get the offset, so we know how long it is.
++ if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
++ {
++ p = off_buf;
++ *p++ = dirc;
++ if (spats[0].off.end)
++ *p++ = 'e';
++ else if (!spats[0].off.line)
++ *p++ = 's';
++ if (spats[0].off.off > 0 || spats[0].off.line)
++ *p++ = '+';
++ *p = NUL;
++ if (spats[0].off.off != 0 || spats[0].off.line)
++ sprintf((char *)p, "%ld", spats[0].off.off);
++ off_len = STRLEN(off_buf);
++ }
++
+ if (*searchstr == NUL)
+ p = spats[0].pat;
+ else
+***************
+*** 1393,1411 ****
+ if (!shortmess(SHM_SEARCHCOUNT))
+ {
+ // Reserve enough space for the search pattern + offset +
+! // search stat.
+ if (msg_scrolled != 0)
+ // Use all the columns.
+ len = (int)(Rows - msg_row) * Columns - 1;
+ else
+ // Use up to 'showcmd' column.
+ len = (int)(Rows - msg_row - 1) * Columns + sc_col - 1;
+! if (len < STRLEN(p) + 40 + SEARCH_STAT_BUF_LEN + 1)
+! len = STRLEN(p) + 40 + SEARCH_STAT_BUF_LEN + 1;
+ }
+ else
+ // Reserve enough space for the search pattern + offset.
+! len = STRLEN(p) + 40;
+
+ msgbuf = alloc((int)len);
+ if (msgbuf != NULL)
+--- 1412,1432 ----
+ if (!shortmess(SHM_SEARCHCOUNT))
+ {
+ // Reserve enough space for the search pattern + offset +
+! // search stat. Use all the space available, so that the
+! // search state is right aligned. If there is not enough space
+! // msg_strtrunc() will shorten in the middle.
+ if (msg_scrolled != 0)
+ // Use all the columns.
+ len = (int)(Rows - msg_row) * Columns - 1;
+ else
+ // Use up to 'showcmd' column.
+ len = (int)(Rows - msg_row - 1) * Columns + sc_col - 1;
+! if (len < STRLEN(p) + off_len + SEARCH_STAT_BUF_LEN + 3)
+! len = STRLEN(p) + off_len + SEARCH_STAT_BUF_LEN + 3;
+ }
+ else
+ // Reserve enough space for the search pattern + offset.
+! len = STRLEN(p) + off_len + 3;
+
+ msgbuf = alloc((int)len);
+ if (msgbuf != NULL)
+***************
+*** 1422,1446 ****
+ }
+ else
+ mch_memmove(msgbuf + 1, p, STRLEN(p));
+! if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
+! {
+! p = msgbuf + STRLEN(p) + 1;
+! *p++ = dirc;
+! if (spats[0].off.end)
+! *p++ = 'e';
+! else if (!spats[0].off.line)
+! *p++ = 's';
+! if (spats[0].off.off > 0 || spats[0].off.line)
+! *p++ = '+';
+! if (spats[0].off.off != 0 || spats[0].off.line)
+! {
+! int l = 0;
+! l = sprintf((char *)p, "%ld", spats[0].off.off);
+! p[l] = ' '; // remove NUL from sprintf
+! }
+! }
+
+! trunc = msg_strtrunc(msgbuf, FALSE);
+ if (trunc != NULL)
+ {
+ vim_free(msgbuf);
+--- 1443,1452 ----
+ }
+ else
+ mch_memmove(msgbuf + 1, p, STRLEN(p));
+! if (off_len > 0)
+! mch_memmove(msgbuf + STRLEN(p) + 1, off_buf, off_len);
+
+! trunc = msg_strtrunc(msgbuf, TRUE);
+ if (trunc != NULL)
+ {
+ vim_free(msgbuf);
+***************
+*** 5028,5035 ****
+ lbuf = curbuf;
+ lastpos = p;
+
+! // keep the message even after redraw
+ give_warning(msgbuf, FALSE);
+ }
+ p_ws = save_ws;
+ }
+--- 5034,5043 ----
+ lbuf = curbuf;
+ lastpos = p;
+
+! // keep the message even after redraw, but don't put in history
+! msg_hist_off = TRUE;
+ give_warning(msgbuf, FALSE);
++ msg_hist_off = FALSE;
+ }
+ p_ws = save_ws;
+ }
+*** ../vim-8.1.1374/src/main.c 2019-05-23 21:35:44.455922641 +0200
+--- src/main.c 2019-05-24 12:38:14.310483062 +0200
+***************
+*** 1271,1281 ****
+ {
+ char_u *p;
+
+! /* msg_attr_keep() will set keep_msg to NULL, must free the
+! * string here. Don't reset keep_msg, msg_attr_keep() uses it
+! * to check for duplicates. */
+ p = keep_msg;
+ msg_attr((char *)p, keep_msg_attr);
+ vim_free(p);
+ }
+ if (need_fileinfo) /* show file info after redraw */
+--- 1271,1283 ----
+ {
+ char_u *p;
+
+! // msg_attr_keep() will set keep_msg to NULL, must free the
+! // string here. Don't reset keep_msg, msg_attr_keep() uses it
+! // to check for duplicates. Never put this message in history.
+ p = keep_msg;
++ msg_hist_off = TRUE;
+ msg_attr((char *)p, keep_msg_attr);
++ msg_hist_off = FALSE;
+ vim_free(p);
+ }
+ if (need_fileinfo) /* show file info after redraw */
+*** ../vim-8.1.1374/src/testdir/test_search_stat.vim 2019-05-18 19:26:25.973151461 +0200
+--- src/testdir/test_search_stat.vim 2019-05-24 12:47:41.903233016 +0200
+***************
+*** 11,31 ****
+ " Append 50 lines with text to search for, "foobar" appears 20 times
+ call append(0, repeat(['foobar', 'foo', 'fooooobar', 'foba', 'foobar'], 10))
+
+! " 1) match at second line
+ call cursor(1, 1)
+ let @/ = 'fo*\(bar\?\)\?'
+ let g:a = execute(':unsilent :norm! n')
+ let stat = '\[2/50\]'
+ let pat = escape(@/, '()*?'). '\s\+'
+ call assert_match(pat .. stat, g:a)
+
+! " 2) Match at last line
+ call cursor(line('$')-2, 1)
+ let g:a = execute(':unsilent :norm! n')
+ let stat = '\[50/50\]'
+ call assert_match(pat .. stat, g:a)
+
+! " 3) No search stat
+ set shortmess+=S
+ call cursor(1, 1)
+ let stat = '\[2/50\]'
+--- 11,34 ----
+ " Append 50 lines with text to search for, "foobar" appears 20 times
+ call append(0, repeat(['foobar', 'foo', 'fooooobar', 'foba', 'foobar'], 10))
+
+! " match at second line
+ call cursor(1, 1)
++ let messages_before = execute('messages')
+ let @/ = 'fo*\(bar\?\)\?'
+ let g:a = execute(':unsilent :norm! n')
+ let stat = '\[2/50\]'
+ let pat = escape(@/, '()*?'). '\s\+'
+ call assert_match(pat .. stat, g:a)
++ " didn't get added to message history
++ call assert_equal(messages_before, execute('messages'))
+
+! " Match at last line
+ call cursor(line('$')-2, 1)
+ let g:a = execute(':unsilent :norm! n')
+ let stat = '\[50/50\]'
+ call assert_match(pat .. stat, g:a)
+
+! " No search stat
+ set shortmess+=S
+ call cursor(1, 1)
+ let stat = '\[2/50\]'
+***************
+*** 33,39 ****
+ call assert_notmatch(pat .. stat, g:a)
+ set shortmess-=S
+
+! " 4) Many matches
+ call cursor(line('$')-2, 1)
+ let @/ = '.'
+ let pat = escape(@/, '()*?'). '\s\+'
+--- 36,42 ----
+ call assert_notmatch(pat .. stat, g:a)
+ set shortmess-=S
+
+! " Many matches
+ call cursor(line('$')-2, 1)
+ let @/ = '.'
+ let pat = escape(@/, '()*?'). '\s\+'
+***************
+*** 45,51 ****
+ let stat = '\[1/>99\] W'
+ call assert_match(pat .. stat, g:a)
+
+! " 5) Many matches
+ call cursor(1, 1)
+ let g:a = execute(':unsilent :norm! n')
+ let stat = '\[2/>99\]'
+--- 48,54 ----
+ let stat = '\[1/>99\] W'
+ call assert_match(pat .. stat, g:a)
+
+! " Many matches
+ call cursor(1, 1)
+ let g:a = execute(':unsilent :norm! n')
+ let stat = '\[2/>99\]'
+***************
+*** 55,61 ****
+ let stat = '\[>99/>99\] W'
+ call assert_match(pat .. stat, g:a)
+
+! " 6) right-left
+ if exists("+rightleft")
+ set rl
+ call cursor(1,1)
+--- 58,64 ----
+ let stat = '\[>99/>99\] W'
+ call assert_match(pat .. stat, g:a)
+
+! " right-left
+ if exists("+rightleft")
+ set rl
+ call cursor(1,1)
+***************
+*** 67,73 ****
+ set norl
+ endif
+
+! " 7) right-left bottom
+ if exists("+rightleft")
+ set rl
+ call cursor('$',1)
+--- 70,76 ----
+ set norl
+ endif
+
+! " right-left bottom
+ if exists("+rightleft")
+ set rl
+ call cursor('$',1)
+***************
+*** 78,84 ****
+ set norl
+ endif
+
+! " 8) right-left back at top
+ if exists("+rightleft")
+ set rl
+ call cursor('$',1)
+--- 81,87 ----
+ set norl
+ endif
+
+! " right-left back at top
+ if exists("+rightleft")
+ set rl
+ call cursor('$',1)
+***************
+*** 90,96 ****
+ set norl
+ endif
+
+! " 9) normal, back at bottom
+ call cursor(1,1)
+ let @/ = 'foobar'
+ let pat = '?foobar\s\+'
+--- 93,99 ----
+ set norl
+ endif
+
+! " normal, back at bottom
+ call cursor(1,1)
+ let @/ = 'foobar'
+ let pat = '?foobar\s\+'
+***************
+*** 100,106 ****
+ call assert_match('search hit TOP, continuing at BOTTOM', g:a)
+ call assert_match('\[20/20\] W', Screenline(&lines))
+
+! " 10) normal, no match
+ call cursor(1,1)
+ let @/ = 'zzzzzz'
+ let g:a = ''
+--- 103,109 ----
+ call assert_match('search hit TOP, continuing at BOTTOM', g:a)
+ call assert_match('\[20/20\] W', Screenline(&lines))
+
+! " normal, no match
+ call cursor(1,1)
+ let @/ = 'zzzzzz'
+ let g:a = ''
+***************
+*** 114,120 ****
+ call assert_false(1)
+ endtry
+
+! " 11) normal, n comes from a mapping
+ " Need to move over more than 64 lines to trigger char_avail(.
+ nnoremap n nzv
+ call cursor(1,1)
+--- 117,123 ----
+ call assert_false(1)
+ endtry
+
+! " normal, n comes from a mapping
+ " Need to move over more than 64 lines to trigger char_avail(.
+ nnoremap n nzv
+ call cursor(1,1)
+***************
+*** 130,136 ****
+ call assert_match(pat .. stat, g:b)
+ unmap n
+
+! " 11) normal, but silent
+ call cursor(1,1)
+ let @/ = 'find this'
+ let pat = '/find this\s\+'
+--- 133,139 ----
+ call assert_match(pat .. stat, g:b)
+ unmap n
+
+! " normal, but silent
+ call cursor(1,1)
+ let @/ = 'find this'
+ let pat = '/find this\s\+'
+*** ../vim-8.1.1374/src/version.c 2019-05-24 11:45:18.987591736 +0200
+--- src/version.c 2019-05-24 12:34:50.371607742 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1375,
+ /**/
+
+--
+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.1376 b/data/vim/patches/8.1.1376
new file mode 100644
index 000000000..b7d410343
--- /dev/null
+++ b/data/vim/patches/8.1.1376
@@ -0,0 +1,107 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1376
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1376
+Problem: Warnings for size_t/int mixups.
+Solution: Change types, add type casts. (Mike Williams)
+Files: src/search.c, src/textprop.c
+
+
+*** ../vim-8.1.1375/src/search.c 2019-05-24 13:11:44.307032864 +0200
+--- src/search.c 2019-05-24 13:17:33.453080969 +0200
+***************
+*** 4990,4996 ****
+ if (cur > 0)
+ {
+ char t[SEARCH_STAT_BUF_LEN] = "";
+! int len;
+
+ #ifdef FEAT_RIGHTLEFT
+ if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
+--- 4990,4996 ----
+ if (cur > 0)
+ {
+ char t[SEARCH_STAT_BUF_LEN] = "";
+! size_t len;
+
+ #ifdef FEAT_RIGHTLEFT
+ if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
+*** ../vim-8.1.1375/src/textprop.c 2019-05-19 22:53:36.504914607 +0200
+--- src/textprop.c 2019-05-24 13:17:33.453080969 +0200
+***************
+*** 1203,1209 ****
+ size_t oldproplen;
+ char_u *props;
+ int i;
+! int len;
+ char_u *line;
+ size_t l;
+
+--- 1203,1209 ----
+ size_t oldproplen;
+ char_u *props;
+ int i;
+! size_t len;
+ char_u *line;
+ size_t l;
+
+***************
+*** 1218,1225 ****
+ // get existing properties of the joined line
+ oldproplen = get_text_props(curbuf, lnum, &props, FALSE);
+
+! len = (int)STRLEN(newp) + 1;
+! line = alloc(len + (oldproplen + proplen) * (int)sizeof(textprop_T));
+ if (line == NULL)
+ return;
+ mch_memmove(line, newp, len);
+--- 1218,1225 ----
+ // get existing properties of the joined line
+ oldproplen = get_text_props(curbuf, lnum, &props, FALSE);
+
+! len = STRLEN(newp) + 1;
+! line = alloc((int)(len + (oldproplen + proplen) * sizeof(textprop_T)));
+ if (line == NULL)
+ return;
+ mch_memmove(line, newp, len);
+***************
+*** 1236,1242 ****
+ vim_free(prop_lines[i]);
+ }
+
+! ml_replace_len(lnum, line, len, TRUE, FALSE);
+ vim_free(newp);
+ vim_free(prop_lines);
+ vim_free(prop_lengths);
+--- 1236,1242 ----
+ vim_free(prop_lines[i]);
+ }
+
+! ml_replace_len(lnum, line, (colnr_T)len, TRUE, FALSE);
+ vim_free(newp);
+ vim_free(prop_lines);
+ vim_free(prop_lengths);
+*** ../vim-8.1.1375/src/version.c 2019-05-24 13:11:44.311032841 +0200
+--- src/version.c 2019-05-24 13:20:44.412124324 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1376,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+2. Page yourself over the intercom. Don't disguise your voice.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1377 b/data/vim/patches/8.1.1377
new file mode 100644
index 000000000..8a80f76eb
--- /dev/null
+++ b/data/vim/patches/8.1.1377
@@ -0,0 +1,90 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1377
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1377
+Problem: MS-Windows GUI uses wrong shell command for bash. (Robert Bogomip)
+Solution: Check that 'shellcmdflag' is "/c". (Ken Takata, closes #4418)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.1376/src/os_win32.c 2019-05-23 20:12:43.788841875 +0200
+--- src/os_win32.c 2019-05-24 13:30:07.109163891 +0200
+***************
+*** 4856,4882 ****
+ (gui.in_use || gui.starting) &&
+ # endif
+ !s_dont_use_vimrun && p_stmp)
+! /* Use vimrun to execute the command. It opens a console
+! * window, which can be closed without killing Vim. */
+ vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s",
+ vimrun_path,
+ (msg_silent != 0 || (options & SHELL_DOOUT))
+ ? "-s " : "",
+ p_sh, p_shcf, cmd);
+! else
+ # ifdef VIMDLL
+! if (gui.in_use || gui.starting)
+ # endif
+ vim_snprintf((char *)newcmd, cmdlen, "%s %s %s %s %s",
+ p_sh, p_shcf, p_sh, p_shcf, cmd);
+- # ifdef VIMDLL
+ else
+- # endif
+ #endif
+- #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
+ vim_snprintf((char *)newcmd, cmdlen, "%s %s %s",
+ p_sh, p_shcf, cmd);
+- #endif
+ x = mch_system((char *)newcmd, options);
+ vim_free(newcmd);
+ }
+--- 4856,4880 ----
+ (gui.in_use || gui.starting) &&
+ # endif
+ !s_dont_use_vimrun && p_stmp)
+! // Use vimrun to execute the command. It opens a console
+! // window, which can be closed without killing Vim.
+ vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s",
+ vimrun_path,
+ (msg_silent != 0 || (options & SHELL_DOOUT))
+ ? "-s " : "",
+ p_sh, p_shcf, cmd);
+! else if (
+ # ifdef VIMDLL
+! (gui.in_use || gui.starting) &&
+ # endif
++ STRCMP(p_shcf, "/c") == 0)
++ // workaround for the case that "vimrun" does not exist
+ vim_snprintf((char *)newcmd, cmdlen, "%s %s %s %s %s",
+ p_sh, p_shcf, p_sh, p_shcf, cmd);
+ else
+ #endif
+ vim_snprintf((char *)newcmd, cmdlen, "%s %s %s",
+ p_sh, p_shcf, cmd);
+ x = mch_system((char *)newcmd, options);
+ vim_free(newcmd);
+ }
+*** ../vim-8.1.1376/src/version.c 2019-05-24 13:22:17.863644567 +0200
+--- src/version.c 2019-05-24 13:31:28.188727258 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1377,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+4. Put your garbage can on your desk and label it "in".
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1378 b/data/vim/patches/8.1.1378
new file mode 100644
index 000000000..bdeb0a8e3
--- /dev/null
+++ b/data/vim/patches/8.1.1378
@@ -0,0 +1,514 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1378
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1378
+Problem: Delete() can not handle a file name that looks like a pattern.
+Solution: Use readdir() instead of appending "/*" and expanding wildcards.
+ (Ken Takata, closes #4424, closes #696)
+Files: src/testdir/test_functions.vim, src/evalfunc.c, src/fileio.c,
+ src/proto/fileio.pro
+
+
+*** ../vim-8.1.1377/src/testdir/test_functions.vim 2019-05-16 22:24:52.407017760 +0200
+--- src/testdir/test_functions.vim 2019-05-24 14:01:13.044012690 +0200
+***************
+*** 1436,1441 ****
+--- 1436,1456 ----
+ call delete('Xdir', 'rf')
+ endfunc
+
++ func Test_delete_rf()
++ call mkdir('Xdir')
++ call writefile([], 'Xdir/foo.txt')
++ call writefile([], 'Xdir/bar.txt')
++ call mkdir('Xdir/[a-1]') " issue #696
++ call writefile([], 'Xdir/[a-1]/foo.txt')
++ call writefile([], 'Xdir/[a-1]/bar.txt')
++ call assert_true(filereadable('Xdir/foo.txt'))
++ call assert_true(filereadable('Xdir/[a-1]/foo.txt'))
++
++ call assert_equal(0, delete('Xdir', 'rf'))
++ call assert_false(filereadable('Xdir/foo.txt'))
++ call assert_false(filereadable('Xdir/[a-1]/foo.txt'))
++ endfunc
++
+ func Test_call()
+ call assert_equal(3, call('len', [123]))
+ call assert_fails("call call('len', 123)", 'E714:')
+*** ../vim-8.1.1377/src/evalfunc.c 2019-05-19 19:59:30.160255591 +0200
+--- src/evalfunc.c 2019-05-24 14:10:12.777486166 +0200
+***************
+*** 9349,9365 ****
+ }
+
+ /*
+! * Evaluate "expr" for readdir().
+ */
+ static int
+! readdir_checkitem(typval_T *expr, char_u *name)
+ {
+ typval_T save_val;
+ typval_T rettv;
+ typval_T argv[2];
+ int retval = 0;
+ int error = FALSE;
+
+ prepare_vimvar(VV_VAL, &save_val);
+ set_vim_var_string(VV_VAL, name, -1);
+ argv[0].v_type = VAR_STRING;
+--- 9349,9369 ----
+ }
+
+ /*
+! * Evaluate "expr" (= "context") for readdir().
+ */
+ static int
+! readdir_checkitem(void *context, char_u *name)
+ {
++ typval_T *expr = (typval_T *)context;
+ typval_T save_val;
+ typval_T rettv;
+ typval_T argv[2];
+ int retval = 0;
+ int error = FALSE;
+
++ if (expr->v_type == VAR_UNKNOWN)
++ return 1;
++
+ prepare_vimvar(VV_VAL, &save_val);
+ set_vim_var_string(VV_VAL, name, -1);
+ argv[0].v_type = VAR_STRING;
+***************
+*** 9386,9521 ****
+ f_readdir(typval_T *argvars, typval_T *rettv)
+ {
+ typval_T *expr;
+! int failed = FALSE;
+ char_u *path;
+ garray_T ga;
+ int i;
+- #ifdef MSWIN
+- char_u *buf, *p;
+- int ok;
+- HANDLE hFind = INVALID_HANDLE_VALUE;
+- WIN32_FIND_DATAW wfb;
+- WCHAR *wn = NULL; // UCS-2 name, NULL when not used.
+- #endif
+
+ if (rettv_list_alloc(rettv) == FAIL)
+ return;
+ path = tv_get_string(&argvars[0]);
+ expr = &argvars[1];
+- ga_init2(&ga, (int)sizeof(char *), 20);
+-
+- #ifdef MSWIN
+- buf = alloc((int)MAXPATHL);
+- if (buf == NULL)
+- return;
+- STRNCPY(buf, path, MAXPATHL-5);
+- p = vim_strpbrk(path, (char_u *)"\\/");
+- if (p != NULL)
+- *p = NUL;
+- STRCAT(buf, "\\*");
+-
+- wn = enc_to_utf16(buf, NULL);
+- if (wn != NULL)
+- hFind = FindFirstFileW(wn, &wfb);
+- ok = (hFind != INVALID_HANDLE_VALUE);
+- if (!ok)
+- smsg(_(e_notopen), path);
+- else
+- {
+- while (ok)
+- {
+- int ignore;
+-
+- p = utf16_to_enc(wfb.cFileName, NULL); // p is allocated here
+- if (p == NULL)
+- break; // out of memory
+-
+- ignore = p[0] == '.' && (p[1] == NUL
+- || (p[1] == '.' && p[2] == NUL));
+- if (!ignore && expr->v_type != VAR_UNKNOWN)
+- {
+- int r = readdir_checkitem(expr, p);
+-
+- if (r < 0)
+- {
+- vim_free(p);
+- break;
+- }
+- if (r == 0)
+- ignore = TRUE;
+- }
+-
+- if (!ignore)
+- {
+- if (ga_grow(&ga, 1) == OK)
+- ((char_u**)ga.ga_data)[ga.ga_len++] = vim_strsave(p);
+- else
+- {
+- failed = TRUE;
+- vim_free(p);
+- break;
+- }
+- }
+-
+- vim_free(p);
+- ok = FindNextFileW(hFind, &wfb);
+- }
+- FindClose(hFind);
+- }
+-
+- vim_free(buf);
+- vim_free(wn);
+- #else
+- DIR *dirp;
+- struct dirent *dp;
+- char_u *p;
+-
+- dirp = opendir((char *)path);
+- if (dirp == NULL)
+- smsg(_(e_notopen), path);
+- else
+- {
+- for (;;)
+- {
+- int ignore;
+-
+- dp = readdir(dirp);
+- if (dp == NULL)
+- break;
+- p = (char_u *)dp->d_name;
+-
+- ignore = p[0] == '.' &&
+- (p[1] == NUL ||
+- (p[1] == '.' && p[2] == NUL));
+- if (!ignore && expr->v_type != VAR_UNKNOWN)
+- {
+- int r = readdir_checkitem(expr, p);
+-
+- if (r < 0)
+- break;
+- if (r == 0)
+- ignore = TRUE;
+- }
+-
+- if (!ignore)
+- {
+- if (ga_grow(&ga, 1) == OK)
+- ((char_u**)ga.ga_data)[ga.ga_len++] = vim_strsave(p);
+- else
+- {
+- failed = TRUE;
+- break;
+- }
+- }
+- }
+-
+- closedir(dirp);
+- }
+- #endif
+
+! if (!failed && rettv->vval.v_list != NULL && ga.ga_len > 0)
+ {
+- sort_strings((char_u **)ga.ga_data, ga.ga_len);
+ for (i = 0; i < ga.ga_len; i++)
+ {
+ p = ((char_u **)ga.ga_data)[i];
+--- 9390,9409 ----
+ f_readdir(typval_T *argvars, typval_T *rettv)
+ {
+ typval_T *expr;
+! int ret;
+ char_u *path;
++ char_u *p;
+ garray_T ga;
+ int i;
+
+ if (rettv_list_alloc(rettv) == FAIL)
+ return;
+ path = tv_get_string(&argvars[0]);
+ expr = &argvars[1];
+
+! ret = readdir_core(&ga, path, (void *)expr, readdir_checkitem);
+! if (ret == OK && rettv->vval.v_list != NULL && ga.ga_len > 0)
+ {
+ for (i = 0; i < ga.ga_len; i++)
+ {
+ p = ((char_u **)ga.ga_data)[i];
+*** ../vim-8.1.1377/src/fileio.c 2019-05-24 11:45:18.987591736 +0200
+--- src/fileio.c 2019-05-24 14:10:26.221420180 +0200
+***************
+*** 7172,7191 ****
+
+ #if defined(TEMPDIRNAMES) || defined(FEAT_EVAL) || defined(PROTO)
+ /*
+ * Delete "name" and everything in it, recursively.
+! * return 0 for succes, -1 if some file was not deleted.
+ */
+ int
+ delete_recursive(char_u *name)
+ {
+ int result = 0;
+- char_u **files;
+- int file_count;
+ int i;
+ char_u *exp;
+
+! /* A symbolic link to a directory itself is deleted, not the directory it
+! * points to. */
+ if (
+ # if defined(UNIX) || defined(MSWIN)
+ mch_isrealdir(name)
+--- 7172,7335 ----
+
+ #if defined(TEMPDIRNAMES) || defined(FEAT_EVAL) || defined(PROTO)
+ /*
++ * Core part of "readdir()" function.
++ * Retrieve the list of files/directories of "path" into "gap".
++ * Return OK for success, FAIL for failure.
++ */
++ int
++ readdir_core(
++ garray_T *gap,
++ char_u *path,
++ void *context,
++ int (*checkitem)(void *context, char_u *name))
++ {
++ int failed = FALSE;
++ #ifdef MSWIN
++ char_u *buf, *p;
++ int ok;
++ HANDLE hFind = INVALID_HANDLE_VALUE;
++ WIN32_FIND_DATAW wfb;
++ WCHAR *wn = NULL; // UTF-16 name, NULL when not used.
++ #endif
++
++ ga_init2(gap, (int)sizeof(char *), 20);
++
++ #ifdef MSWIN
++ buf = alloc((int)MAXPATHL);
++ if (buf == NULL)
++ return FAIL;
++ STRNCPY(buf, path, MAXPATHL-5);
++ p = buf + strlen(buf);
++ MB_PTR_BACK(buf, p);
++ if (*p == '\\' || *p == '/')
++ *p = NUL;
++ STRCAT(buf, "\\*");
++
++ wn = enc_to_utf16(buf, NULL);
++ if (wn != NULL)
++ hFind = FindFirstFileW(wn, &wfb);
++ ok = (hFind != INVALID_HANDLE_VALUE);
++ if (!ok)
++ {
++ failed = TRUE;
++ smsg(_(e_notopen), path);
++ }
++ else
++ {
++ while (ok)
++ {
++ int ignore;
++
++ p = utf16_to_enc(wfb.cFileName, NULL); // p is allocated here
++ if (p == NULL)
++ break; // out of memory
++
++ ignore = p[0] == '.' && (p[1] == NUL
++ || (p[1] == '.' && p[2] == NUL));
++ if (!ignore && checkitem != NULL)
++ {
++ int r = checkitem(context, p);
++
++ if (r < 0)
++ {
++ vim_free(p);
++ break;
++ }
++ if (r == 0)
++ ignore = TRUE;
++ }
++
++ if (!ignore)
++ {
++ if (ga_grow(gap, 1) == OK)
++ ((char_u**)gap->ga_data)[gap->ga_len++] = vim_strsave(p);
++ else
++ {
++ failed = TRUE;
++ vim_free(p);
++ break;
++ }
++ }
++
++ vim_free(p);
++ ok = FindNextFileW(hFind, &wfb);
++ }
++ FindClose(hFind);
++ }
++
++ vim_free(buf);
++ vim_free(wn);
++ #else
++ DIR *dirp;
++ struct dirent *dp;
++ char_u *p;
++
++ dirp = opendir((char *)path);
++ if (dirp == NULL)
++ {
++ failed = TRUE;
++ smsg(_(e_notopen), path);
++ }
++ else
++ {
++ for (;;)
++ {
++ int ignore;
++
++ dp = readdir(dirp);
++ if (dp == NULL)
++ break;
++ p = (char_u *)dp->d_name;
++
++ ignore = p[0] == '.' &&
++ (p[1] == NUL ||
++ (p[1] == '.' && p[2] == NUL));
++ if (!ignore && checkitem != NULL)
++ {
++ int r = checkitem(context, p);
++
++ if (r < 0)
++ break;
++ if (r == 0)
++ ignore = TRUE;
++ }
++
++ if (!ignore)
++ {
++ if (ga_grow(gap, 1) == OK)
++ ((char_u**)gap->ga_data)[gap->ga_len++] = vim_strsave(p);
++ else
++ {
++ failed = TRUE;
++ break;
++ }
++ }
++ }
++
++ closedir(dirp);
++ }
++ #endif
++
++ if (!failed && gap->ga_len > 0)
++ sort_strings((char_u **)gap->ga_data, gap->ga_len);
++
++ return failed ? FAIL : OK;
++ }
++
++ /*
+ * Delete "name" and everything in it, recursively.
+! * return 0 for success, -1 if some file was not deleted.
+ */
+ int
+ delete_recursive(char_u *name)
+ {
+ int result = 0;
+ int i;
+ char_u *exp;
++ garray_T ga;
+
+! // A symbolic link to a directory itself is deleted, not the directory it
+! // points to.
+ if (
+ # if defined(UNIX) || defined(MSWIN)
+ mch_isrealdir(name)
+***************
+*** 7194,7215 ****
+ # endif
+ )
+ {
+! vim_snprintf((char *)NameBuff, MAXPATHL, "%s/*", name);
+! exp = vim_strsave(NameBuff);
+ if (exp == NULL)
+ return -1;
+! if (gen_expand_wildcards(1, &exp, &file_count, &files,
+! EW_DIR|EW_FILE|EW_SILENT|EW_ALLLINKS|EW_DODOT|EW_EMPTYOK) == OK)
+ {
+! for (i = 0; i < file_count; ++i)
+! if (delete_recursive(files[i]) != 0)
+ result = -1;
+! FreeWild(file_count, files);
+ }
+ else
+ result = -1;
+ vim_free(exp);
+- (void)mch_rmdir(name);
+ }
+ else
+ result = mch_remove(name) == 0 ? 0 : -1;
+--- 7338,7361 ----
+ # endif
+ )
+ {
+! exp = vim_strsave(name);
+ if (exp == NULL)
+ return -1;
+! if (readdir_core(&ga, exp, NULL, NULL) == OK)
+ {
+! for (i = 0; i < ga.ga_len; ++i)
+! {
+! vim_snprintf((char *)NameBuff, MAXPATHL, "%s/%s", exp,
+! ((char_u **)ga.ga_data)[i]);
+! if (delete_recursive(NameBuff) != 0)
+ result = -1;
+! }
+! ga_clear_strings(&ga);
+ }
+ else
+ result = -1;
++ (void)mch_rmdir(exp);
+ vim_free(exp);
+ }
+ else
+ result = mch_remove(name) == 0 ? 0 : -1;
+*** ../vim-8.1.1377/src/proto/fileio.pro 2019-02-15 21:06:05.342289715 +0100
+--- src/proto/fileio.pro 2019-05-24 14:04:05.371239020 +0200
+***************
+*** 24,29 ****
+--- 24,30 ----
+ void buf_reload(buf_T *buf, int orig_mode);
+ void buf_store_time(buf_T *buf, stat_T *st, char_u *fname);
+ void write_lnum_adjust(linenr_T offset);
++ int readdir_core(garray_T *gap, char_u *path, void *context, int (*checkitem)(void *context, char_u *name));
+ int delete_recursive(char_u *name);
+ void vim_deltempdir(void);
+ char_u *vim_tempname(int extra_char, int keep);
+*** ../vim-8.1.1377/src/version.c 2019-05-24 13:32:33.148376324 +0200
+--- src/version.c 2019-05-24 14:05:17.550903987 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1378,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+5. Put decaf in the coffee maker for 3 weeks. Once everyone has gotten
+ over their caffeine addictions, switch to espresso.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1379 b/data/vim/patches/8.1.1379
new file mode 100644
index 000000000..d57b30e07
--- /dev/null
+++ b/data/vim/patches/8.1.1379
@@ -0,0 +1,77 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1379
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1379 (after 8.1.1374)
+Problem: Filechanged test hangs.
+Solution: Do not check 'autoread'.
+Files: src/fileio.c, src/testdir/test_filechanged.vim
+
+
+*** ../vim-8.1.1378/src/fileio.c 2019-05-24 14:14:10.260307596 +0200
+--- src/fileio.c 2019-05-24 16:42:49.723311317 +0200
+***************
+*** 6774,6782 ****
+ // FileChangedShell autocmd)
+ if (stat_res < 0)
+ {
+! // When 'autoread' is set we'll check the file again to see if it
+! // re-appears.
+! buf->b_mtime = (buf->b_p_ar >= 0 ? buf->b_p_ar : p_ar);
+ buf->b_orig_size = 0;
+ buf->b_orig_mode = 0;
+ }
+--- 6774,6781 ----
+ // FileChangedShell autocmd)
+ if (stat_res < 0)
+ {
+! // Check the file again later to see if it re-appears.
+! buf->b_mtime = -1;
+ buf->b_orig_size = 0;
+ buf->b_orig_mode = 0;
+ }
+*** ../vim-8.1.1378/src/testdir/test_filechanged.vim 2019-04-18 20:30:50.948453504 +0200
+--- src/testdir/test_filechanged.vim 2019-05-24 16:43:23.579155805 +0200
+***************
+*** 115,122 ****
+ call assert_match('E211:', v:warningmsg)
+ call assert_equal(2, line('$'))
+ call assert_equal('extra line', getline(2))
+
+! " Recreate buffer and reload
+ call setline(1, 'buffer is changed')
+ silent !echo 'new line' >Xchanged_d
+ call feedkeys('L', 'L')
+--- 115,123 ----
+ call assert_match('E211:', v:warningmsg)
+ call assert_equal(2, line('$'))
+ call assert_equal('extra line', getline(2))
++ let v:warningmsg = 'empty'
+
+! " change buffer, recreate the file and reload
+ call setline(1, 'buffer is changed')
+ silent !echo 'new line' >Xchanged_d
+ call feedkeys('L', 'L')
+*** ../vim-8.1.1378/src/version.c 2019-05-24 14:14:10.260307596 +0200
+--- src/version.c 2019-05-24 16:44:50.238750574 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1379,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+7. Finish all your sentences with "in accordance with the prophecy".
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1380 b/data/vim/patches/8.1.1380
new file mode 100644
index 000000000..c0edb7f53
--- /dev/null
+++ b/data/vim/patches/8.1.1380
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1380
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1380
+Problem: MS-Windows building VIMDLL with MSVC: SUBSYSTEM is not set.
+Solution: Invert condition. (closes #4422)
+Files: src/Make_mvc.mak
+
+
+*** ../vim-8.1.1379/src/Make_mvc.mak 2019-05-11 17:03:55.170019762 +0200
+--- src/Make_mvc.mak 2019-05-24 17:03:06.409158712 +0200
+***************
+*** 847,853 ****
+ !if "$(SUBSYSTEM_VER)" != ""
+ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
+ SUBSYSTEM_TOOLS = $(SUBSYSTEM_TOOLS),$(SUBSYSTEM_VER)
+! ! if "$(VIMDLL)" != "yes"
+ SUBSYSTEM_CON = $(SUBSYSTEM_CON),$(SUBSYSTEM_VER)
+ ! endif
+ # Pass SUBSYSTEM_VER to GvimExt and other tools
+--- 847,853 ----
+ !if "$(SUBSYSTEM_VER)" != ""
+ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
+ SUBSYSTEM_TOOLS = $(SUBSYSTEM_TOOLS),$(SUBSYSTEM_VER)
+! ! if "$(VIMDLL)" == "yes"
+ SUBSYSTEM_CON = $(SUBSYSTEM_CON),$(SUBSYSTEM_VER)
+ ! endif
+ # Pass SUBSYSTEM_VER to GvimExt and other tools
+*** ../vim-8.1.1379/src/version.c 2019-05-24 16:45:57.690428744 +0200
+--- src/version.c 2019-05-24 17:04:11.208815848 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1380,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+9. As often as possible, skip rather than walk.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1381 b/data/vim/patches/8.1.1381
new file mode 100644
index 000000000..5e4e6869b
--- /dev/null
+++ b/data/vim/patches/8.1.1381
@@ -0,0 +1,84 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1381
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1381
+Problem: MS-Windows: missing build dependency.
+Solution: Make gui_dwrite.cpp depend on gui_dwrite.h. (Ken Takata,
+ closes #4423
+Files: src/Make_cyg_ming.mak, src/Make_mvc.mak
+
+
+*** ../vim-8.1.1380/src/Make_cyg_ming.mak 2019-05-11 21:24:22.249180389 +0200
+--- src/Make_cyg_ming.mak 2019-05-24 17:15:44.345124971 +0200
+***************
+*** 1047,1052 ****
+--- 1047,1055 ----
+ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
+ spell.h structs.h term.h beval.h $(NBDEBUG_INCL)
+ GUI_INCL = gui.h
++ ifeq ($(DIRECTX),yes)
++ GUI_INCL += gui_dwrite.h
++ endif
+ CUI_INCL = iscygpty.h
+
+ $(OUTDIR)/if_python.o: if_python.c if_py_both.h $(INCL)
+***************
+*** 1083,1089 ****
+ $(OUTDIR):
+ $(MKDIR) $(OUTDIR)
+
+! $(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h
+ $(CC) -c $(CFLAGS) $(CXXFLAGS) gui_dwrite.cpp -o $@
+
+ $(OUTDIR)/gui.o: gui.c $(INCL) $(GUI_INCL)
+--- 1086,1092 ----
+ $(OUTDIR):
+ $(MKDIR) $(OUTDIR)
+
+! $(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp gui_dwrite.h
+ $(CC) -c $(CFLAGS) $(CXXFLAGS) gui_dwrite.cpp -o $@
+
+ $(OUTDIR)/gui.o: gui.c $(INCL) $(GUI_INCL)
+*** ../vim-8.1.1380/src/Make_mvc.mak 2019-05-24 17:05:40.724341350 +0200
+--- src/Make_mvc.mak 2019-05-24 17:15:44.345124971 +0200
+***************
+*** 1477,1483 ****
+
+ $(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c $(INCL) $(GUI_INCL)
+
+! $(OUTDIR)/gui_dwrite.obj: $(OUTDIR) gui_dwrite.cpp $(INCL) $(GUI_INCL)
+
+ $(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL) if_cscope.h
+
+--- 1477,1483 ----
+
+ $(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c $(INCL) $(GUI_INCL)
+
+! $(OUTDIR)/gui_dwrite.obj: $(OUTDIR) gui_dwrite.cpp gui_dwrite.h
+
+ $(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL) if_cscope.h
+
+*** ../vim-8.1.1380/src/version.c 2019-05-24 17:05:40.724341350 +0200
+--- src/version.c 2019-05-24 17:17:18.896632014 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1381,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+10. Ask people what sex they are. Laugh hysterically after they 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.1382 b/data/vim/patches/8.1.1382
new file mode 100644
index 000000000..7cc2730b6
--- /dev/null
+++ b/data/vim/patches/8.1.1382
@@ -0,0 +1,88 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1382
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1382
+Problem: Error when editing test file.
+Solution: Remove part of modeline.
+Files: src/testdir/test_vimscript.vim, src/testdir/test49.vim,
+ src/testdir/test49.in
+
+
+*** ../vim-8.1.1381/src/testdir/test_vimscript.vim 2019-03-23 14:23:02.138361658 +0100
+--- src/testdir/test_vimscript.vim 2019-05-24 17:28:18.889191400 +0200
+***************
+*** 1668,1672 ****
+ "-------------------------------------------------------------------------------
+ " Modelines {{{1
+ " vim: ts=8 sw=4 tw=80 fdm=marker
+- " vim: fdt=substitute(substitute(foldtext(),\ '\\%(^+--\\)\\@<=\\(\\s*\\)\\(.\\{-}\\)\:\ \\%(\"\ \\)\\=\\(Test\ \\d*\\)\:\\s*',\ '\\3\ (\\2)\:\ \\1',\ \"\"),\ '\\(Test\\s*\\)\\(\\d\\)\\D\\@=',\ '\\1\ \\2',\ "")
+ "-------------------------------------------------------------------------------
+--- 1668,1671 ----
+*** ../vim-8.1.1381/src/testdir/test49.vim 2019-01-13 15:15:54.392762879 +0100
+--- src/testdir/test49.vim 2019-05-24 17:29:37.408776988 +0200
+***************
+*** 1,6 ****
+ " Vim script language tests
+ " Author: Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com>
+! " Last Change: 2019 Jan 13
+
+ "-------------------------------------------------------------------------------
+ " Test environment {{{1
+--- 1,6 ----
+ " Vim script language tests
+ " Author: Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com>
+! " Last Change: 2019 May 24
+
+ "-------------------------------------------------------------------------------
+ " Test environment {{{1
+***************
+*** 9005,9009 ****
+ "-------------------------------------------------------------------------------
+ " Modelines {{{1
+ " vim: ts=8 sw=4 tw=80 fdm=marker
+- " vim: fdt=substitute(substitute(foldtext(),\ '\\%(^+--\\)\\@<=\\(\\s*\\)\\(.\\{-}\\)\:\ \\%(\"\ \\)\\=\\(Test\ \\d*\\)\:\\s*',\ '\\3\ (\\2)\:\ \\1',\ \"\"),\ '\\(Test\\s*\\)\\(\\d\\)\\D\\@=',\ '\\1\ \\2',\ "")
+ "-------------------------------------------------------------------------------
+--- 9005,9008 ----
+*** ../vim-8.1.1381/src/testdir/test49.in 2019-05-23 15:37:41.965634969 +0200
+--- src/testdir/test49.in 2019-05-24 17:30:54.976367024 +0200
+***************
+*** 5,11 ****
+
+ STARTTEST
+ :so small.vim
+! :se nocp nomore viminfo+=nviminfo modelineexpr
+ :lang mess C
+ :so test49.vim
+ :" Go back to this file and append the results from register r.
+--- 5,11 ----
+
+ STARTTEST
+ :so small.vim
+! :se nocp nomore viminfo+=nviminfo
+ :lang mess C
+ :so test49.vim
+ :" Go back to this file and append the results from register r.
+*** ../vim-8.1.1381/src/version.c 2019-05-24 17:17:51.056467137 +0200
+--- src/version.c 2019-05-24 17:31:20.340232856 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1382,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+11. Specify that your drive-through order is "to go".
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1383 b/data/vim/patches/8.1.1383
new file mode 100644
index 000000000..746a017f3
--- /dev/null
+++ b/data/vim/patches/8.1.1383
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1383
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1383
+Problem: Warning for size_t/int mixup.
+Solution: Change type. (Mike Williams)
+Files: src/search.c
+
+
+*** ../vim-8.1.1382/src/search.c 2019-05-24 13:22:17.863644567 +0200
+--- src/search.c 2019-05-24 17:54:27.864058079 +0200
+***************
+*** 1382,1388 ****
+ {
+ char_u *trunc;
+ char_u off_buf[40];
+! int off_len = 0;
+
+ // Compute msg_row early.
+ msg_start();
+--- 1382,1388 ----
+ {
+ char_u *trunc;
+ char_u off_buf[40];
+! size_t off_len = 0;
+
+ // Compute msg_row early.
+ msg_start();
+*** ../vim-8.1.1382/src/version.c 2019-05-24 17:32:57.351719237 +0200
+--- src/version.c 2019-05-24 17:55:41.619471579 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1383,
+ /**/
+
+--
+Giving a commit hash to refer to a patch is like giving longitude and
+lattitude to refer to a city.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1384 b/data/vim/patches/8.1.1384
new file mode 100644
index 000000000..85f0e37ae
--- /dev/null
+++ b/data/vim/patches/8.1.1384
@@ -0,0 +1,4519 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1384
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1384
+Problem: Using "int" for alloc() often results in compiler warnings.
+Solution: Use "size_t" and remove type casts. Remove alloc_check(), Vim
+ only works with 32 bit ints anyway.
+Files: src/misc2.c, src/proto/misc2.pro, src/autocmd.c, src/buffer.c,
+ src/change.c, src/channel.c, src/charset.c, src/debugger.c,
+ src/dict.c, src/diff.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/findfile.c,
+ src/fold.c, src/getchar.c, src/gui.c, src/gui_at_fs.c,
+ src/gui_gtk.c, src/gui_gtk_x11.c, src/gui_motif.c, src/gui_w32.c,
+ src/hashtab.c, src/if_cscope.c, src/if_perlsfio.c,
+ src/if_python3.c, src/if_xcmdsrv.c, src/indent.c, src/insexpand.c,
+ src/main.c, src/mbyte.c, src/memfile.c, src/memline.c, src/menu.c,
+ src/message.c, src/misc1.c, src/netbeans.c, src/ops.c,
+ src/option.c, src/os_amiga.c, src/os_mswin.c, src/os_unix.c,
+ src/os_vms.c, src/os_win32.c, src/quickfix.c, src/regexp.c,
+ src/screen.c, src/spell.c, src/spellfile.c, src/syntax.c,
+ src/term.c, src/undo.c, src/usercmd.c, src/userfunc.c,
+ src/version.c, src/winclip.c
+
+
+*** ../vim-8.1.1383/src/misc2.c 2019-05-19 19:59:30.164255569 +0200
+--- src/misc2.c 2019-05-24 18:27:24.407952680 +0200
+***************
+*** 711,717 ****
+ }
+
+ static void
+! mem_pre_alloc_l(long_u *sizep)
+ {
+ *sizep += sizeof(size_t);
+ }
+--- 711,717 ----
+ }
+
+ static void
+! mem_pre_alloc_l(size_t *sizep)
+ {
+ *sizep += sizeof(size_t);
+ }
+***************
+*** 796,802 ****
+
+ #ifdef FEAT_EVAL
+ int
+! alloc_does_fail(long_u size)
+ {
+ if (alloc_fail_countdown == 0)
+ {
+--- 796,802 ----
+
+ #ifdef FEAT_EVAL
+ int
+! alloc_does_fail(size_t size)
+ {
+ if (alloc_fail_countdown == 0)
+ {
+***************
+*** 818,856 ****
+ #define KEEP_ROOM_KB (KEEP_ROOM / 1024L)
+
+ /*
+! * Note: if unsigned is 16 bits we can only allocate up to 64K with alloc().
+! * Use lalloc for larger blocks.
+ */
+ char_u *
+! alloc(unsigned size)
+ {
+! return (lalloc((long_u)size, TRUE));
+ }
+
+ /*
+ * alloc() with an ID for alloc_fail().
+ */
+ char_u *
+! alloc_id(unsigned size, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+! if (alloc_fail_id == id && alloc_does_fail((long_u)size))
+ return NULL;
+ #endif
+! return (lalloc((long_u)size, TRUE));
+ }
+
+ /*
+ * Allocate memory and set all bytes to zero.
+ */
+ char_u *
+! alloc_clear(unsigned size)
+ {
+ char_u *p;
+
+! p = lalloc((long_u)size, TRUE);
+ if (p != NULL)
+! (void)vim_memset(p, 0, (size_t)size);
+ return p;
+ }
+
+--- 818,856 ----
+ #define KEEP_ROOM_KB (KEEP_ROOM / 1024L)
+
+ /*
+! * The normal way to allocate memory. This handles an out-of-memory situation
+! * as well as possible, still returns NULL when we're completely out.
+ */
+ char_u *
+! alloc(size_t size)
+ {
+! return lalloc(size, TRUE);
+ }
+
+ /*
+ * alloc() with an ID for alloc_fail().
+ */
+ char_u *
+! alloc_id(size_t size, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+! if (alloc_fail_id == id && alloc_does_fail(size))
+ return NULL;
+ #endif
+! return lalloc(size, TRUE);
+ }
+
+ /*
+ * Allocate memory and set all bytes to zero.
+ */
+ char_u *
+! alloc_clear(size_t size)
+ {
+ char_u *p;
+
+! p = lalloc(size, TRUE);
+ if (p != NULL)
+! (void)vim_memset(p, 0, size);
+ return p;
+ }
+
+***************
+*** 858,901 ****
+ * Same as alloc_clear() but with allocation id for testing
+ */
+ char_u *
+! alloc_clear_id(unsigned size, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+! if (alloc_fail_id == id && alloc_does_fail((long_u)size))
+ return NULL;
+ #endif
+ return alloc_clear(size);
+ }
+
+ /*
+- * alloc() with check for maximum line length
+- */
+- char_u *
+- alloc_check(unsigned size)
+- {
+- #if !defined(UNIX)
+- if (sizeof(int) == 2 && size > 0x7fff)
+- {
+- /* Don't hide this message */
+- emsg_silent = 0;
+- emsg(_("E340: Line is becoming too long"));
+- return NULL;
+- }
+- #endif
+- return (lalloc((long_u)size, TRUE));
+- }
+-
+- /*
+ * Allocate memory like lalloc() and set all bytes to zero.
+ */
+ char_u *
+! lalloc_clear(long_u size, int message)
+ {
+ char_u *p;
+
+ p = (lalloc(size, message));
+ if (p != NULL)
+! (void)vim_memset(p, 0, (size_t)size);
+ return p;
+ }
+
+--- 858,883 ----
+ * Same as alloc_clear() but with allocation id for testing
+ */
+ char_u *
+! alloc_clear_id(size_t size, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+! if (alloc_fail_id == id && alloc_does_fail(size))
+ return NULL;
+ #endif
+ return alloc_clear(size);
+ }
+
+ /*
+ * Allocate memory like lalloc() and set all bytes to zero.
+ */
+ char_u *
+! lalloc_clear(size_t size, int message)
+ {
+ char_u *p;
+
+ p = (lalloc(size, message));
+ if (p != NULL)
+! (void)vim_memset(p, 0, size);
+ return p;
+ }
+
+***************
+*** 904,924 ****
+ * This is used often, KEEP IT FAST!
+ */
+ char_u *
+! lalloc(long_u size, int message)
+ {
+ char_u *p; /* pointer to new storage space */
+ static int releasing = FALSE; /* don't do mf_release_all() recursive */
+ int try_again;
+ #if defined(HAVE_AVAIL_MEM)
+! static long_u allocated = 0; /* allocated since last avail check */
+ #endif
+
+! /* Safety check for allocating zero bytes */
+ if (size == 0)
+ {
+! /* Don't hide this message */
+ emsg_silent = 0;
+! siemsg(_("E341: Internal error: lalloc(%ld, )"), size);
+ return NULL;
+ }
+
+--- 886,906 ----
+ * This is used often, KEEP IT FAST!
+ */
+ char_u *
+! lalloc(size_t size, int message)
+ {
+ char_u *p; /* pointer to new storage space */
+ static int releasing = FALSE; /* don't do mf_release_all() recursive */
+ int try_again;
+ #if defined(HAVE_AVAIL_MEM)
+! static size_t allocated = 0; /* allocated since last avail check */
+ #endif
+
+! // Safety check for allocating zero bytes
+ if (size == 0)
+ {
+! // Don't hide this message
+ emsg_silent = 0;
+! iemsg(_("E341: Internal error: lalloc(0, )"));
+ return NULL;
+ }
+
+***************
+*** 939,945 ****
+ * allocating KEEP_ROOM amount of memory.
+ * 3. Strict check for available memory: call mch_avail_mem()
+ */
+! if ((p = (char_u *)malloc((size_t)size)) != NULL)
+ {
+ #ifndef HAVE_AVAIL_MEM
+ /* 1. No check for available memory: Just return. */
+--- 921,927 ----
+ * allocating KEEP_ROOM amount of memory.
+ * 3. Strict check for available memory: call mch_avail_mem()
+ */
+! if ((p = (char_u *)malloc(size)) != NULL)
+ {
+ #ifndef HAVE_AVAIL_MEM
+ /* 1. No check for available memory: Just return. */
+***************
+*** 983,989 ****
+
+ theend:
+ #ifdef MEM_PROFILE
+! mem_post_alloc((void **)&p, (size_t)size);
+ #endif
+ return p;
+ }
+--- 965,971 ----
+
+ theend:
+ #ifdef MEM_PROFILE
+! mem_post_alloc((void **)&p, size);
+ #endif
+ return p;
+ }
+***************
+*** 993,1005 ****
+ */
+ #if defined(FEAT_SIGNS) || defined(PROTO)
+ char_u *
+! lalloc_id(long_u size, int message, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+ if (alloc_fail_id == id && alloc_does_fail(size))
+ return NULL;
+ #endif
+! return (lalloc((long_u)size, message));
+ }
+ #endif
+
+--- 975,987 ----
+ */
+ #if defined(FEAT_SIGNS) || defined(PROTO)
+ char_u *
+! lalloc_id(size_t size, int message, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+ if (alloc_fail_id == id && alloc_does_fail(size))
+ return NULL;
+ #endif
+! return (lalloc(size, message));
+ }
+ #endif
+
+***************
+*** 1028,1034 ****
+ * Did_outofmem_msg is reset when a character is read.
+ */
+ void
+! do_outofmem_msg(long_u size)
+ {
+ if (!did_outofmem_msg)
+ {
+--- 1010,1016 ----
+ * Did_outofmem_msg is reset when a character is read.
+ */
+ void
+! do_outofmem_msg(size_t size)
+ {
+ if (!did_outofmem_msg)
+ {
+***************
+*** 1039,1045 ****
+ * message fails, e.g. when setting v:errmsg. */
+ did_outofmem_msg = TRUE;
+
+! semsg(_("E342: Out of memory! (allocating %lu bytes)"), size);
+ }
+ }
+
+--- 1021,1027 ----
+ * message fails, e.g. when setting v:errmsg. */
+ did_outofmem_msg = TRUE;
+
+! semsg(_("E342: Out of memory! (allocating %lu bytes)"), (long_u)size);
+ }
+ }
+
+***************
+*** 1288,1299 ****
+ vim_strsave(char_u *string)
+ {
+ char_u *p;
+! unsigned len;
+
+! len = (unsigned)STRLEN(string) + 1;
+ p = alloc(len);
+ if (p != NULL)
+! mch_memmove(p, string, (size_t)len);
+ return p;
+ }
+
+--- 1270,1281 ----
+ vim_strsave(char_u *string)
+ {
+ char_u *p;
+! size_t len;
+
+! len = STRLEN(string) + 1;
+ p = alloc(len);
+ if (p != NULL)
+! mch_memmove(p, string, len);
+ return p;
+ }
+
+***************
+*** 1308,1314 ****
+ {
+ char_u *p;
+
+! p = alloc((unsigned)(len + 1));
+ if (p != NULL)
+ {
+ STRNCPY(p, string, len);
+--- 1290,1296 ----
+ {
+ char_u *p;
+
+! p = alloc((size_t)(len + 1));
+ if (p != NULL)
+ {
+ STRNCPY(p, string, len);
+***************
+*** 1322,1333 ****
+ * Returns NULL when out of memory.
+ */
+ char_u *
+! vim_memsave(char_u *p, int len)
+ {
+! char_u *ret = alloc((unsigned)len);
+
+ if (ret != NULL)
+! mch_memmove(ret, p, (size_t)len);
+ return ret;
+ }
+
+--- 1304,1315 ----
+ * Returns NULL when out of memory.
+ */
+ char_u *
+! vim_memsave(char_u *p, size_t len)
+ {
+! char_u *ret = alloc(len);
+
+ if (ret != NULL)
+! mch_memmove(ret, p, len);
+ return ret;
+ }
+
+***************
+*** 1622,1628 ****
+ newl = utf_char2len(uc);
+ if (newl != l)
+ {
+! s = alloc((unsigned)STRLEN(res) + 1 + newl - l);
+ if (s == NULL)
+ {
+ vim_free(res);
+--- 1604,1610 ----
+ newl = utf_char2len(uc);
+ if (newl != l)
+ {
+! s = alloc(STRLEN(res) + 1 + newl - l);
+ if (s == NULL)
+ {
+ vim_free(res);
+***************
+*** 1689,1695 ****
+ newl = utf_char2len(lc);
+ if (newl != l)
+ {
+! s = alloc((unsigned)STRLEN(res) + 1 + newl - l);
+ if (s == NULL)
+ {
+ vim_free(res);
+--- 1671,1677 ----
+ newl = utf_char2len(lc);
+ if (newl != l)
+ {
+! s = alloc(STRLEN(res) + 1 + newl - l);
+ if (s == NULL)
+ {
+ vim_free(res);
+***************
+*** 2077,2083 ****
+ n = gap->ga_growsize;
+ new_len = gap->ga_itemsize * (gap->ga_len + n);
+ pp = (gap->ga_data == NULL)
+! ? alloc((unsigned)new_len) : vim_realloc(gap->ga_data, new_len);
+ if (pp == NULL)
+ return FAIL;
+ old_len = gap->ga_itemsize * gap->ga_maxlen;
+--- 2059,2065 ----
+ n = gap->ga_growsize;
+ new_len = gap->ga_itemsize * (gap->ga_len + n);
+ pp = (gap->ga_data == NULL)
+! ? alloc(new_len) : vim_realloc(gap->ga_data, new_len);
+ if (pp == NULL)
+ return FAIL;
+ old_len = gap->ga_itemsize * gap->ga_maxlen;
+***************
+*** 3261,3267 ****
+ if (ecmd == NULL)
+ ecmd = cmd;
+ }
+! ncmd = alloc((unsigned)(STRLEN(ecmd) + STRLEN(p_sxq) * 2 + 1));
+ if (ncmd != NULL)
+ {
+ STRCPY(ncmd, p_sxq);
+--- 3243,3249 ----
+ if (ecmd == NULL)
+ ecmd = cmd;
+ }
+! ncmd = alloc(STRLEN(ecmd) + STRLEN(p_sxq) * 2 + 1);
+ if (ncmd != NULL)
+ {
+ STRCPY(ncmd, p_sxq);
+***************
+*** 3896,3902 ****
+ int i, j;
+ int gap;
+
+! buf = alloc((unsigned)elm_size);
+ if (buf == NULL)
+ return;
+
+--- 3878,3884 ----
+ int i, j;
+ int gap;
+
+! buf = alloc(elm_size);
+ if (buf == NULL)
+ return;
+
+***************
+*** 4073,4079 ****
+ if (moreenv() < 0)
+ return -1;
+ }
+! p = (char *)alloc((unsigned)(strlen(string) + 1));
+ if (p == NULL) /* not enough core */
+ return -1;
+ environ[i + 1] = 0; /* new end of env. */
+--- 4055,4061 ----
+ if (moreenv() < 0)
+ return -1;
+ }
+! p = (char *)alloc(strlen(string) + 1);
+ if (p == NULL) /* not enough core */
+ return -1;
+ environ[i + 1] = 0; /* new end of env. */
+***************
+*** 4121,4133 ****
+ ;
+
+ esize = i + EXTRASIZE + 1;
+! env = (char **)alloc((unsigned)(esize * sizeof (elem)));
+ if (env == NULL)
+ return -1;
+
+ for (i = 0; environ[i]; i++)
+ {
+! elem = (char *)alloc((unsigned)(strlen(environ[i]) + 1));
+ if (elem == NULL)
+ return -1;
+ env[i] = elem;
+--- 4103,4115 ----
+ ;
+
+ esize = i + EXTRASIZE + 1;
+! env = (char **)alloc(esize * sizeof (elem));
+ if (env == NULL)
+ return -1;
+
+ for (i = 0; environ[i]; i++)
+ {
+! elem = (char *)alloc(strlen(environ[i]) + 1);
+ if (elem == NULL)
+ return -1;
+ env[i] = elem;
+***************
+*** 4310,4316 ****
+ int c;
+
+ /* allocate memory */
+! str = alloc((unsigned)cnt + 1);
+ if (str != NULL)
+ {
+ /* Read the string. Quit when running into the EOF. */
+--- 4292,4298 ----
+ int c;
+
+ /* allocate memory */
+! str = alloc(cnt + 1);
+ if (str != NULL)
+ {
+ /* Read the string. Quit when running into the EOF. */
+***************
+*** 4593,4599 ****
+ }
+ }
+
+! *argv = (char **)alloc((unsigned)((*argc + 4) * sizeof(char *)));
+ if (*argv == NULL) /* out of memory */
+ return FAIL;
+ }
+--- 4575,4581 ----
+ }
+ }
+
+! *argv = (char **)alloc((*argc + 4) * sizeof(char *));
+ if (*argv == NULL) /* out of memory */
+ return FAIL;
+ }
+*** ../vim-8.1.1383/src/proto/misc2.pro 2019-04-28 19:46:17.034060084 +0200
+--- src/proto/misc2.pro 2019-05-24 18:04:26.055775822 +0200
+***************
+*** 20,40 ****
+ void adjust_cursor_col(void);
+ int leftcol_changed(void);
+ void vim_mem_profile_dump(void);
+! int alloc_does_fail(long_u size);
+! char_u *alloc(unsigned size);
+! char_u *alloc_id(unsigned size, alloc_id_T id);
+! char_u *alloc_clear(unsigned size);
+! char_u *alloc_clear_id(unsigned size, alloc_id_T id);
+! char_u *alloc_check(unsigned size);
+! char_u *lalloc_clear(long_u size, int message);
+! char_u *lalloc(long_u size, int message);
+! char_u *lalloc_id(long_u size, int message, alloc_id_T id);
+ void *mem_realloc(void *ptr, size_t size);
+! void do_outofmem_msg(long_u size);
+ void free_all_mem(void);
+ char_u *vim_strsave(char_u *string);
+ char_u *vim_strnsave(char_u *string, int len);
+! char_u *vim_memsave(char_u *p, int len);
+ char_u *vim_strsave_escaped(char_u *string, char_u *esc_chars);
+ char_u *vim_strsave_escaped_ext(char_u *string, char_u *esc_chars, int cc, int bsl);
+ int csh_like_shell(void);
+--- 20,39 ----
+ void adjust_cursor_col(void);
+ int leftcol_changed(void);
+ void vim_mem_profile_dump(void);
+! int alloc_does_fail(size_t size);
+! char_u *alloc(size_t size);
+! char_u *alloc_id(size_t size, alloc_id_T id);
+! char_u *alloc_clear(size_t size);
+! char_u *alloc_clear_id(size_t size, alloc_id_T id);
+! char_u *lalloc_clear(size_t size, int message);
+! char_u *lalloc(size_t size, int message);
+! char_u *lalloc_id(size_t size, int message, alloc_id_T id);
+ void *mem_realloc(void *ptr, size_t size);
+! void do_outofmem_msg(size_t size);
+ void free_all_mem(void);
+ char_u *vim_strsave(char_u *string);
+ char_u *vim_strnsave(char_u *string, int len);
+! char_u *vim_memsave(char_u *p, size_t len);
+ char_u *vim_strsave_escaped(char_u *string, char_u *esc_chars);
+ char_u *vim_strsave_escaped_ext(char_u *string, char_u *esc_chars, int cc, int bsl);
+ int csh_like_shell(void);
+*** ../vim-8.1.1383/src/autocmd.c 2019-04-25 22:21:56.931749183 +0200
+--- src/autocmd.c 2019-05-24 18:09:55.101695900 +0200
+***************
+*** 1193,1199 ****
+ return FAIL;
+ }
+
+! ap = (AutoPat *)alloc((unsigned)sizeof(AutoPat));
+ if (ap == NULL)
+ return FAIL;
+ ap->pat = vim_strnsave(pat, patlen);
+--- 1193,1199 ----
+ return FAIL;
+ }
+
+! ap = (AutoPat *)alloc(sizeof(AutoPat));
+ if (ap == NULL)
+ return FAIL;
+ ap->pat = vim_strnsave(pat, patlen);
+***************
+*** 1242,1248 ****
+ prev_ac = &(ap->cmds);
+ while ((ac = *prev_ac) != NULL)
+ prev_ac = &ac->next;
+! ac = (AutoCmd *)alloc((unsigned)sizeof(AutoCmd));
+ if (ac == NULL)
+ return FAIL;
+ ac->cmd = vim_strsave(cmd);
+--- 1242,1248 ----
+ prev_ac = &(ap->cmds);
+ while ((ac = *prev_ac) != NULL)
+ prev_ac = &ac->next;
+! ac = (AutoCmd *)alloc(sizeof(AutoCmd));
+ if (ac == NULL)
+ return FAIL;
+ ac->cmd = vim_strsave(cmd);
+***************
+*** 2303,2310 ****
+ {
+ name = event_nr2name(apc->event);
+ s = _("%s Autocommands for \"%s\"");
+! sourcing_name = alloc((unsigned)(STRLEN(s)
+! + STRLEN(name) + ap->patlen + 1));
+ if (sourcing_name != NULL)
+ {
+ sprintf((char *)sourcing_name, s,
+--- 2303,2310 ----
+ {
+ name = event_nr2name(apc->event);
+ s = _("%s Autocommands for \"%s\"");
+! sourcing_name = alloc(STRLEN(s)
+! + STRLEN(name) + ap->patlen + 1);
+ if (sourcing_name != NULL)
+ {
+ sprintf((char *)sourcing_name, s,
+*** ../vim-8.1.1383/src/buffer.c 2019-05-23 22:11:56.284893258 +0200
+--- src/buffer.c 2019-05-24 18:10:23.957518220 +0200
+***************
+*** 2577,2583 ****
+ /* Make a copy of "pat" and change "^" to "\(^\|[\/]\)". */
+ if (*pat == '^')
+ {
+! patc = alloc((unsigned)STRLEN(pat) + 11);
+ if (patc == NULL)
+ return FAIL;
+ STRCPY(patc, "\\(^\\|[\\/]\\)");
+--- 2577,2583 ----
+ /* Make a copy of "pat" and change "^" to "\(^\|[\/]\)". */
+ if (*pat == '^')
+ {
+! patc = alloc(STRLEN(pat) + 11);
+ if (patc == NULL)
+ return FAIL;
+ STRCPY(patc, "\\(^\\|[\\/]\\)");
+***************
+*** 2634,2640 ****
+ break;
+ if (round == 1)
+ {
+! *file = (char_u **)alloc((unsigned)(count * sizeof(char_u *)));
+ if (*file == NULL)
+ {
+ vim_regfree(regmatch.regprog);
+--- 2634,2640 ----
+ break;
+ if (round == 1)
+ {
+! *file = (char_u **)alloc(count * sizeof(char_u *));
+ if (*file == NULL)
+ {
+ vim_regfree(regmatch.regprog);
+*** ../vim-8.1.1383/src/change.c 2019-05-19 22:53:36.504914607 +0200
+--- src/change.c 2019-05-24 18:10:37.033437887 +0200
+***************
+*** 985,991 ****
+ }
+ }
+
+! newp = alloc_check((unsigned)(linelen + newlen - oldlen));
+ if (newp == NULL)
+ return;
+
+--- 985,991 ----
+ }
+ }
+
+! newp = alloc(linelen + newlen - oldlen);
+ if (newp == NULL)
+ return;
+
+***************
+*** 1060,1066 ****
+ oldp = ml_get(lnum);
+ oldlen = (int)STRLEN(oldp);
+
+! newp = alloc_check((unsigned)(oldlen + newlen + 1));
+ if (newp == NULL)
+ return;
+ if (col > 0)
+--- 1060,1066 ----
+ oldp = ml_get(lnum);
+ oldlen = (int)STRLEN(oldp);
+
+! newp = alloc(oldlen + newlen + 1);
+ if (newp == NULL)
+ return;
+ if (col > 0)
+***************
+*** 1213,1219 ****
+ 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);
+--- 1213,1219 ----
+ newp = oldp; // use same allocated memory
+ else
+ { // need to allocate a new line
+! newp = alloc(newlen + 1);
+ if (newp == NULL)
+ return FAIL;
+ mch_memmove(newp, oldp, (size_t)col);
+*** ../vim-8.1.1383/src/channel.c 2019-05-11 18:28:41.351611622 +0200
+--- src/channel.c 2019-05-24 18:10:54.849328634 +0200
+***************
+*** 2024,2030 ****
+ }
+ else
+ {
+! item = (jsonq_T *)alloc((unsigned)sizeof(jsonq_T));
+ if (item == NULL)
+ clear_tv(&listtv);
+ else
+--- 2024,2030 ----
+ }
+ else
+ {
+! item = (jsonq_T *)alloc(sizeof(jsonq_T));
+ if (item == NULL)
+ clear_tv(&listtv);
+ else
+***************
+*** 2223,2229 ****
+ /* append after the last item that was pushed back */
+ item = item->jq_next;
+
+! newitem = (jsonq_T *)alloc((unsigned)sizeof(jsonq_T));
+ if (newitem == NULL)
+ clear_tv(rettv);
+ else
+--- 2223,2229 ----
+ /* append after the last item that was pushed back */
+ item = item->jq_next;
+
+! newitem = (jsonq_T *)alloc(sizeof(jsonq_T));
+ if (newitem == NULL)
+ clear_tv(rettv);
+ else
+*** ../vim-8.1.1383/src/charset.c 2019-05-19 19:59:30.160255591 +0200
+--- src/charset.c 2019-05-24 18:11:12.589220044 +0200
+***************
+*** 355,364 ****
+ len += 4; /* illegal byte sequence */
+ }
+ }
+! res = alloc((unsigned)(len + 1));
+ }
+ else
+! res = alloc((unsigned)(vim_strsize(s) + 1));
+ if (res != NULL)
+ {
+ *res = NUL;
+--- 355,364 ----
+ len += 4; /* illegal byte sequence */
+ }
+ }
+! res = alloc(len + 1);
+ }
+ else
+! res = alloc(vim_strsize(s) + 1);
+ if (res != NULL)
+ {
+ *res = NUL;
+*** ../vim-8.1.1383/src/debugger.c 2019-04-23 18:39:43.694863660 +0200
+--- src/debugger.c 2019-05-24 18:11:26.453135323 +0200
+***************
+*** 873,879 ****
+ // Replace K_SNR in function name with "<SNR>".
+ if (!file && fname[0] == K_SPECIAL)
+ {
+! name = alloc((unsigned)STRLEN(fname) + 3);
+ if (name == NULL)
+ name = fname;
+ else
+--- 873,879 ----
+ // Replace K_SNR in function name with "<SNR>".
+ if (!file && fname[0] == K_SPECIAL)
+ {
+! name = alloc(STRLEN(fname) + 3);
+ if (name == NULL)
+ name = fname;
+ else
+*** ../vim-8.1.1383/src/dict.c 2019-04-28 18:04:56.058492178 +0200
+--- src/dict.c 2019-05-24 18:11:44.409025803 +0200
+***************
+*** 210,216 ****
+ {
+ dictitem_T *di;
+
+! di = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T) + STRLEN(key)));
+ if (di != NULL)
+ {
+ STRCPY(di->di_key, key);
+--- 210,216 ----
+ {
+ dictitem_T *di;
+
+! di = (dictitem_T *)alloc(sizeof(dictitem_T) + STRLEN(key));
+ if (di != NULL)
+ {
+ STRCPY(di->di_key, key);
+***************
+*** 228,235 ****
+ {
+ dictitem_T *di;
+
+! di = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T)
+! + STRLEN(org->di_key)));
+ if (di != NULL)
+ {
+ STRCPY(di->di_key, org->di_key);
+--- 228,234 ----
+ {
+ dictitem_T *di;
+
+! di = (dictitem_T *)alloc(sizeof(dictitem_T) + STRLEN(org->di_key));
+ if (di != NULL)
+ {
+ STRCPY(di->di_key, org->di_key);
+*** ../vim-8.1.1383/src/diff.c 2019-03-03 14:42:04.782109771 +0100
+--- src/diff.c 2019-05-24 18:12:01.012924672 +0200
+***************
+*** 537,543 ****
+ {
+ diff_T *dnew;
+
+! dnew = (diff_T *)alloc((unsigned)sizeof(diff_T));
+ if (dnew != NULL)
+ {
+ dnew->df_next = dp;
+--- 537,543 ----
+ {
+ diff_T *dnew;
+
+! dnew = (diff_T *)alloc(sizeof(diff_T));
+ if (dnew != NULL)
+ {
+ dnew->df_next = dp;
+***************
+*** 1123,1129 ****
+ {
+ len = STRLEN(tmp_orig) + STRLEN(tmp_new)
+ + STRLEN(tmp_diff) + STRLEN(p_srr) + 27;
+! cmd = alloc((unsigned)len);
+ if (cmd == NULL)
+ return FAIL;
+
+--- 1123,1129 ----
+ {
+ len = STRLEN(tmp_orig) + STRLEN(tmp_new)
+ + STRLEN(tmp_diff) + STRLEN(p_srr) + 27;
+! cmd = alloc(len);
+ if (cmd == NULL)
+ return FAIL;
+
+***************
+*** 1218,1224 ****
+ if (esc_name == NULL)
+ goto theend;
+ buflen = STRLEN(tmp_orig) + STRLEN(esc_name) + STRLEN(tmp_new) + 16;
+! buf = alloc((unsigned)buflen);
+ if (buf == NULL)
+ goto theend;
+
+--- 1218,1224 ----
+ if (esc_name == NULL)
+ goto theend;
+ buflen = STRLEN(tmp_orig) + STRLEN(esc_name) + STRLEN(tmp_new) + 16;
+! buf = alloc(buflen);
+ if (buf == NULL)
+ goto theend;
+
+*** ../vim-8.1.1383/src/digraph.c 2019-01-24 15:04:44.662887892 +0100
+--- src/digraph.c 2019-05-24 18:12:12.464855041 +0200
+***************
+*** 2317,2323 ****
+ /* Source the keymap file. It will contain a ":loadkeymap" command
+ * which will call ex_loadkeymap() below. */
+ buflen = STRLEN(curbuf->b_p_keymap) + STRLEN(p_enc) + 14;
+! buf = alloc((unsigned)buflen);
+ if (buf == NULL)
+ return e_outofmem;
+
+--- 2317,2323 ----
+ /* Source the keymap file. It will contain a ":loadkeymap" command
+ * which will call ex_loadkeymap() below. */
+ buflen = STRLEN(curbuf->b_p_keymap) + STRLEN(p_enc) + 14;
+! buf = alloc(buflen);
+ if (buf == NULL)
+ return e_outofmem;
+
+*** ../vim-8.1.1383/src/edit.c 2019-05-19 22:53:36.504914607 +0200
+--- src/edit.c 2019-05-24 18:12:48.592635815 +0200
+***************
+*** 1943,1949 ****
+ {
+ curwin->w_cursor.col = (colnr_T)new_cursor_col;
+ i = (int)curwin->w_virtcol - vcol;
+! ptr = alloc((unsigned)(i + 1));
+ if (ptr != NULL)
+ {
+ new_cursor_col += i;
+--- 1943,1949 ----
+ {
+ curwin->w_cursor.col = (colnr_T)new_cursor_col;
+ i = (int)curwin->w_virtcol - vcol;
+! ptr = alloc(i + 1);
+ if (ptr != NULL)
+ {
+ new_cursor_col += i;
+*** ../vim-8.1.1383/src/eval.c 2019-05-19 19:59:30.160255591 +0200
+--- src/eval.c 2019-05-24 18:13:34.400358802 +0200
+***************
+*** 5151,5157 ****
+ * Copy the string into allocated memory, handling backslashed
+ * characters.
+ */
+! name = alloc((unsigned)(p - *arg + extra));
+ if (name == NULL)
+ return FAIL;
+ rettv->v_type = VAR_STRING;
+--- 5151,5157 ----
+ * Copy the string into allocated memory, handling backslashed
+ * characters.
+ */
+! name = alloc(p - *arg + extra);
+ if (name == NULL)
+ return FAIL;
+ rettv->v_type = VAR_STRING;
+***************
+*** 5285,5291 ****
+ /*
+ * Copy the string into allocated memory, handling '' to ' reduction.
+ */
+! str = alloc((unsigned)((p - *arg) - reduce));
+ if (str == NULL)
+ return FAIL;
+ rettv->v_type = VAR_STRING;
+--- 5285,5291 ----
+ /*
+ * Copy the string into allocated memory, handling '' to ' reduction.
+ */
+! str = alloc((p - *arg) - reduce);
+ if (str == NULL)
+ return FAIL;
+ rettv->v_type = VAR_STRING;
+***************
+*** 6782,6789 ****
+ temp_result = eval_to_string(expr_start + 1, &nextcmd, FALSE);
+ if (temp_result != NULL && nextcmd == NULL)
+ {
+! retval = alloc((unsigned)(STRLEN(temp_result) + (expr_start - in_start)
+! + (in_end - expr_end) + 1));
+ if (retval != NULL)
+ {
+ STRCPY(retval, in_start);
+--- 6782,6789 ----
+ temp_result = eval_to_string(expr_start + 1, &nextcmd, FALSE);
+ if (temp_result != NULL && nextcmd == NULL)
+ {
+! retval = alloc(STRLEN(temp_result) + (expr_start - in_start)
+! + (in_end - expr_end) + 1);
+ if (retval != NULL)
+ {
+ STRCPY(retval, in_start);
+***************
+*** 8130,8137 ****
+ if (!valid_varname(varname))
+ return;
+
+! v = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T)
+! + STRLEN(varname)));
+ if (v == NULL)
+ return;
+ STRCPY(v->di_key, varname);
+--- 8130,8136 ----
+ if (!valid_varname(varname))
+ return;
+
+! v = (dictitem_T *)alloc(sizeof(dictitem_T) + STRLEN(varname));
+ if (v == NULL)
+ return;
+ STRCPY(v->di_key, varname);
+***************
+*** 8993,8999 ****
+ }
+ else
+ {
+! winvarname = alloc((unsigned)STRLEN(varname) + 3);
+ if (winvarname != NULL)
+ {
+ STRCPY(winvarname, "w:");
+--- 8992,8998 ----
+ }
+ else
+ {
+! winvarname = alloc(STRLEN(varname) + 3);
+ if (winvarname != NULL)
+ {
+ STRCPY(winvarname, "w:");
+***************
+*** 9056,9062 ****
+ char_u *scriptname;
+
+ /* Get the script file name: replace '#' with '/', append ".vim". */
+! scriptname = alloc((unsigned)(STRLEN(name) + 14));
+ if (scriptname == NULL)
+ return FALSE;
+ STRCPY(scriptname, "autoload/");
+--- 9055,9061 ----
+ char_u *scriptname;
+
+ /* Get the script file name: replace '#' with '/', append ".vim". */
+! scriptname = alloc(STRLEN(name) + 14);
+ if (scriptname == NULL)
+ return FALSE;
+ STRCPY(scriptname, "autoload/");
+*** ../vim-8.1.1383/src/evalfunc.c 2019-05-24 14:14:10.260307596 +0200
+--- src/evalfunc.c 2019-05-24 18:14:16.804103312 +0200
+***************
+*** 4272,4281 ****
+ }
+ count = (long)(foldend - foldstart + 1);
+ txt = NGETTEXT("+-%s%3ld line: ", "+-%s%3ld lines: ", count);
+! r = alloc((unsigned)(STRLEN(txt)
+! + STRLEN(dashes) /* for %s */
+! + 20 /* for %3ld */
+! + STRLEN(s))); /* concatenated */
+ if (r != NULL)
+ {
+ sprintf((char *)r, txt, dashes, count);
+--- 4272,4281 ----
+ }
+ count = (long)(foldend - foldstart + 1);
+ txt = NGETTEXT("+-%s%3ld line: ", "+-%s%3ld lines: ", count);
+! r = alloc(STRLEN(txt)
+! + STRLEN(dashes) // for %s
+! + 20 // for %3ld
+! + STRLEN(s)); // concatenated
+ if (r != NULL)
+ {
+ sprintf((char *)r, txt, dashes, count);
+***************
+*** 10386,10392 ****
+ if (q > p && !mch_isFullName(buf))
+ {
+ /* symlink is relative to directory of argument */
+! cpy = alloc((unsigned)(STRLEN(p) + STRLEN(buf) + 1));
+ if (cpy != NULL)
+ {
+ STRCPY(cpy, p);
+--- 10386,10392 ----
+ if (q > p && !mch_isFullName(buf))
+ {
+ /* symlink is relative to directory of argument */
+! cpy = alloc(STRLEN(p) + STRLEN(buf) + 1);
+ if (cpy != NULL)
+ {
+ STRCPY(cpy, p);
+***************
+*** 11067,11074 ****
+
+ /* Make two search patterns: start/end (pat2, for in nested pairs) and
+ * start/middle/end (pat3, for the top pair). */
+! pat2 = alloc((unsigned)(STRLEN(spat) + STRLEN(epat) + 17));
+! pat3 = alloc((unsigned)(STRLEN(spat) + STRLEN(mpat) + STRLEN(epat) + 25));
+ if (pat2 == NULL || pat3 == NULL)
+ goto theend;
+ sprintf((char *)pat2, "\\m\\(%s\\m\\)\\|\\(%s\\m\\)", spat, epat);
+--- 11067,11074 ----
+
+ /* Make two search patterns: start/end (pat2, for in nested pairs) and
+ * start/middle/end (pat3, for the top pair). */
+! pat2 = alloc(STRLEN(spat) + STRLEN(epat) + 17);
+! pat3 = alloc(STRLEN(spat) + STRLEN(mpat) + STRLEN(epat) + 25);
+ if (pat2 == NULL || pat3 == NULL)
+ goto theend;
+ sprintf((char *)pat2, "\\m\\(%s\\m\\)\\|\\(%s\\m\\)", spat, epat);
+***************
+*** 11328,11334 ****
+ {
+ buf_T *save_curbuf = curbuf;
+
+! bufvarname = alloc((unsigned)STRLEN(varname) + 3);
+ if (bufvarname != NULL)
+ {
+ curbuf = buf;
+--- 11328,11334 ----
+ {
+ buf_T *save_curbuf = curbuf;
+
+! bufvarname = alloc(STRLEN(varname) + 3);
+ if (bufvarname != NULL)
+ {
+ curbuf = buf;
+***************
+*** 11850,11856 ****
+ save_curtab = curtab;
+ goto_tabpage_tp(tp, FALSE, FALSE);
+
+! tabvarname = alloc((unsigned)STRLEN(varname) + 3);
+ if (tabvarname != NULL)
+ {
+ STRCPY(tabvarname, "t:");
+--- 11850,11856 ----
+ save_curtab = curtab;
+ goto_tabpage_tp(tp, FALSE, FALSE);
+
+! tabvarname = alloc(STRLEN(varname) + 3);
+ if (tabvarname != NULL)
+ {
+ STRCPY(tabvarname, "t:");
+***************
+*** 13921,13927 ****
+ ++i;
+ end = res + i;
+
+! s = alloc((unsigned)(end - start + 1));
+ if (s == NULL)
+ goto errret;
+
+--- 13921,13927 ----
+ ++i;
+ end = res + i;
+
+! s = alloc(end - start + 1);
+ if (s == NULL)
+ goto errret;
+
+*** ../vim-8.1.1383/src/ex_cmds.c 2019-05-23 21:35:44.451922663 +0200
+--- src/ex_cmds.c 2019-05-24 18:14:53.383883545 +0200
+***************
+*** 595,604 ****
+ }
+
+ /* Allocate a buffer that can hold the longest line. */
+! sortbuf1 = alloc((unsigned)maxlen + 1);
+ if (sortbuf1 == NULL)
+ goto sortend;
+! sortbuf2 = alloc((unsigned)maxlen + 1);
+ if (sortbuf2 == NULL)
+ goto sortend;
+
+--- 595,604 ----
+ }
+
+ /* Allocate a buffer that can hold the longest line. */
+! sortbuf1 = alloc(maxlen + 1);
+ if (sortbuf1 == NULL)
+ goto sortend;
+! sortbuf2 = alloc(maxlen + 1);
+ if (sortbuf2 == NULL)
+ goto sortend;
+
+***************
+*** 1146,1152 ****
+ }
+ len += (int)STRLEN(prevcmd);
+ }
+! if ((t = alloc((unsigned)len)) == NULL)
+ {
+ vim_free(newcmd);
+ return;
+--- 1146,1152 ----
+ }
+ len += (int)STRLEN(prevcmd);
+ }
+! if ((t = alloc(len)) == NULL)
+ {
+ vim_free(newcmd);
+ return;
+***************
+*** 1209,1215 ****
+ */
+ if (*p_shq != NUL)
+ {
+! newcmd = alloc((unsigned)(STRLEN(prevcmd) + 2 * STRLEN(p_shq) + 1));
+ if (newcmd == NULL)
+ return;
+ STRCPY(newcmd, p_shq);
+--- 1209,1215 ----
+ */
+ if (*p_shq != NUL)
+ {
+! newcmd = alloc(STRLEN(prevcmd) + 2 * STRLEN(p_shq) + 1);
+ if (newcmd == NULL)
+ return;
+ STRCPY(newcmd, p_shq);
+***************
+*** 3908,3914 ****
+ len = (int)STRLEN(command) + 3;
+ else
+ len = 30;
+! p = alloc((unsigned)len);
+ if (p != NULL)
+ {
+ if (command != NULL)
+--- 3908,3914 ----
+ len = (int)STRLEN(command) + 3;
+ else
+ len = 30;
+! p = alloc(len);
+ if (p != NULL)
+ {
+ if (command != NULL)
+***************
+*** 5634,5640 ****
+ * too many calls to alloc()/free()).
+ */
+ new_start_len = needed_len + 50;
+! if ((new_start = alloc_check(new_start_len)) == NULL)
+ goto outofmem;
+ *new_start = NUL;
+ new_end = new_start;
+--- 5634,5640 ----
+ * too many calls to alloc()/free()).
+ */
+ new_start_len = needed_len + 50;
+! if ((new_start = alloc(new_start_len)) == NULL)
+ goto outofmem;
+ *new_start = NUL;
+ new_end = new_start;
+***************
+*** 5651,5657 ****
+ if (needed_len > (int)new_start_len)
+ {
+ new_start_len = needed_len + 50;
+! if ((p1 = alloc_check(new_start_len)) == NULL)
+ {
+ vim_free(new_start);
+ goto outofmem;
+--- 5651,5657 ----
+ if (needed_len > (int)new_start_len)
+ {
+ new_start_len = needed_len + 50;
+! if ((p1 = alloc(new_start_len)) == NULL)
+ {
+ vim_free(new_start);
+ goto outofmem;
+***************
+*** 7320,7326 ****
+ got_int = TRUE;
+ break;
+ }
+! s = alloc((unsigned)(p2 - p1 + STRLEN(fname) + 2));
+ if (s == NULL)
+ {
+ got_int = TRUE;
+--- 7320,7326 ----
+ got_int = TRUE;
+ break;
+ }
+! s = alloc(p2 - p1 + STRLEN(fname) + 2);
+ if (s == NULL)
+ {
+ got_int = TRUE;
+*** ../vim-8.1.1383/src/ex_cmds2.c 2019-05-23 21:35:44.451922663 +0200
+--- src/ex_cmds2.c 2019-05-24 18:15:16.167746968 +0200
+***************
+*** 2366,2372 ****
+ }
+ else
+ {
+! buf = alloc((unsigned)(STRLEN(eap->arg) + 14));
+ if (buf != NULL)
+ {
+ if (eap->forceit)
+--- 2366,2372 ----
+ }
+ else
+ {
+! buf = alloc(STRLEN(eap->arg) + 14);
+ if (buf != NULL)
+ {
+ if (eap->forceit)
+*** ../vim-8.1.1383/src/ex_docmd.c 2019-05-23 21:35:44.451922663 +0200
+--- src/ex_docmd.c 2019-05-24 18:15:52.379530286 +0200
+***************
+*** 5094,5100 ****
+ i = (int)(src - *cmdlinep) + (int)STRLEN(src + srclen) + len + 3;
+ if (eap->nextcmd != NULL)
+ i += (int)STRLEN(eap->nextcmd);/* add space for next command */
+! if ((new_cmdline = alloc((unsigned)i)) == NULL)
+ return NULL; /* out of memory! */
+
+ /*
+--- 5094,5100 ----
+ i = (int)(src - *cmdlinep) + (int)STRLEN(src + srclen) + len + 3;
+ if (eap->nextcmd != NULL)
+ i += (int)STRLEN(eap->nextcmd);/* add space for next command */
+! if ((new_cmdline = alloc(i)) == NULL)
+ return NULL; /* out of memory! */
+
+ /*
+***************
+*** 6547,6553 ****
+ void
+ alist_new(void)
+ {
+! curwin->w_alist = (alist_T *)alloc((unsigned)sizeof(alist_T));
+ if (curwin->w_alist == NULL)
+ {
+ curwin->w_alist = &global_alist;
+--- 6547,6553 ----
+ void
+ alist_new(void)
+ {
+! curwin->w_alist = (alist_T *)alloc(sizeof(alist_T));
+ if (curwin->w_alist == NULL)
+ {
+ curwin->w_alist = &global_alist;
+***************
+*** 6581,6587 ****
+ * expansion. Also, the vimrc file isn't read yet, thus the user
+ * can't set the options. */
+ p_su = empty_option;
+! old_arg_files = (char_u **)alloc((unsigned)(sizeof(char_u *) * GARGCOUNT));
+ if (old_arg_files != NULL)
+ {
+ for (i = 0; i < GARGCOUNT; ++i)
+--- 6581,6587 ----
+ * expansion. Also, the vimrc file isn't read yet, thus the user
+ * can't set the options. */
+ p_su = empty_option;
+! old_arg_files = (char_u **)alloc(sizeof(char_u *) * GARGCOUNT);
+ if (old_arg_files != NULL)
+ {
+ for (i = 0; i < GARGCOUNT; ++i)
+***************
+*** 8839,8845 ****
+ }
+ if (len > 0)
+ {
+! arg = alloc((unsigned)(STRLEN(eap->arg) + len + 1));
+ if (arg != NULL)
+ {
+ len = 0;
+--- 8839,8845 ----
+ }
+ if (len > 0)
+ {
+! arg = alloc(STRLEN(eap->arg) + len + 1);
+ if (arg != NULL)
+ {
+ len = 0;
+***************
+*** 9628,9634 ****
+ }
+
+ /* allocate memory */
+! retval = alloc((unsigned)len + 1);
+ if (retval == NULL)
+ break;
+ }
+--- 9628,9634 ----
+ }
+
+ /* allocate memory */
+! retval = alloc(len + 1);
+ if (retval == NULL)
+ break;
+ }
+***************
+*** 10622,10628 ****
+ for (p = sname; *p; ++p)
+ if (*p == '=' || vim_ispathsep(*p))
+ ++len;
+! retval = alloc((unsigned)(STRLEN(sname) + len + STRLEN(p_vdir) + 9));
+ if (retval != NULL)
+ {
+ STRCPY(retval, p_vdir);
+--- 10622,10628 ----
+ for (p = sname; *p; ++p)
+ if (*p == '=' || vim_ispathsep(*p))
+ ++len;
+! retval = alloc(STRLEN(sname) + len + STRLEN(p_vdir) + 9);
+ if (retval != NULL)
+ {
+ STRCPY(retval, p_vdir);
+*** ../vim-8.1.1383/src/ex_eval.c 2019-01-19 17:43:03.433449041 +0100
+--- src/ex_eval.c 2019-05-24 18:16:08.883431670 +0200
+***************
+*** 251,257 ****
+ while (*plist != NULL)
+ plist = &(*plist)->next;
+
+! elem = (struct msglist *)alloc((unsigned)sizeof(struct msglist));
+ if (elem == NULL)
+ {
+ suppress_errthrow = TRUE;
+--- 251,257 ----
+ while (*plist != NULL)
+ plist = &(*plist)->next;
+
+! elem = (struct msglist *)alloc(sizeof(struct msglist));
+ if (elem == NULL)
+ {
+ suppress_errthrow = TRUE;
+***************
+*** 519,525 ****
+ }
+ }
+
+! excp = (except_T *)alloc((unsigned)sizeof(except_T));
+ if (excp == NULL)
+ goto nomem;
+
+--- 519,525 ----
+ }
+ }
+
+! excp = (except_T *)alloc(sizeof(except_T));
+ if (excp == NULL)
+ goto nomem;
+
+***************
+*** 1441,1447 ****
+ {
+ eslist_T *elem;
+
+! elem = (eslist_T *)alloc((unsigned)sizeof(struct eslist_elem));
+ if (elem == NULL)
+ emsg(_(e_outofmem));
+ else
+--- 1441,1447 ----
+ {
+ eslist_T *elem;
+
+! elem = (eslist_T *)alloc(sizeof(struct eslist_elem));
+ if (elem == NULL)
+ emsg(_(e_outofmem));
+ else
+*** ../vim-8.1.1383/src/ex_getln.c 2019-05-19 19:59:30.164255569 +0200
+--- src/ex_getln.c 2019-05-24 18:16:43.123227368 +0200
+***************
+*** 4154,4160 ****
+ }
+ }
+
+! ss = alloc((unsigned)len + 1);
+ if (ss)
+ vim_strncpy(ss, xp->xp_files[0], (size_t)len);
+ findex = -1; /* next p_wc gets first one */
+--- 4154,4160 ----
+ }
+ }
+
+! ss = alloc(len + 1);
+ if (ss)
+ vim_strncpy(ss, xp->xp_files[0], (size_t)len);
+ findex = -1; /* next p_wc gets first one */
+***************
+*** 4362,4368 ****
+ {
+ char_u *p;
+
+! p = alloc((unsigned)(STRLEN(*pp) + 2));
+ if (p != NULL)
+ {
+ p[0] = '\\';
+--- 4362,4368 ----
+ {
+ char_u *p;
+
+! p = alloc(STRLEN(*pp) + 2);
+ if (p != NULL)
+ {
+ p[0] = '\\';
+***************
+*** 5294,5300 ****
+ if (count == 0)
+ return OK;
+ *num_file = count;
+! *file = (char_u **)alloc((unsigned)(count * sizeof(char_u *)));
+ if (*file == NULL)
+ {
+ *file = (char_u **)"";
+--- 5294,5300 ----
+ if (count == 0)
+ return OK;
+ *num_file = count;
+! *file = (char_u **)alloc(count * sizeof(char_u *));
+ if (*file == NULL)
+ {
+ *file = (char_u **)"";
+***************
+*** 5636,5642 ****
+
+ for (i = 0; dirnames[i] != NULL; ++i)
+ {
+! s = alloc((unsigned)(STRLEN(dirnames[i]) + pat_len + 7));
+ if (s == NULL)
+ {
+ ga_clear_strings(&ga);
+--- 5636,5642 ----
+
+ for (i = 0; dirnames[i] != NULL; ++i)
+ {
+! s = alloc(STRLEN(dirnames[i]) + pat_len + 7);
+ if (s == NULL)
+ {
+ ga_clear_strings(&ga);
+***************
+*** 5650,5656 ****
+ if (flags & DIP_START) {
+ for (i = 0; dirnames[i] != NULL; ++i)
+ {
+! s = alloc((unsigned)(STRLEN(dirnames[i]) + pat_len + 22));
+ if (s == NULL)
+ {
+ ga_clear_strings(&ga);
+--- 5650,5656 ----
+ if (flags & DIP_START) {
+ for (i = 0; dirnames[i] != NULL; ++i)
+ {
+! s = alloc(STRLEN(dirnames[i]) + pat_len + 22);
+ if (s == NULL)
+ {
+ ga_clear_strings(&ga);
+***************
+*** 5665,5671 ****
+ if (flags & DIP_OPT) {
+ for (i = 0; dirnames[i] != NULL; ++i)
+ {
+! s = alloc((unsigned)(STRLEN(dirnames[i]) + pat_len + 20));
+ if (s == NULL)
+ {
+ ga_clear_strings(&ga);
+--- 5665,5671 ----
+ if (flags & DIP_OPT) {
+ for (i = 0; dirnames[i] != NULL; ++i)
+ {
+! s = alloc(STRLEN(dirnames[i]) + pat_len + 20);
+ if (s == NULL)
+ {
+ ga_clear_strings(&ga);
+***************
+*** 5728,5734 ****
+ pat_len = (int)STRLEN(pat);
+ ga_init2(&ga, (int)sizeof(char *), 10);
+
+! s = alloc((unsigned)(pat_len + 26));
+ if (s == NULL)
+ {
+ ga_clear_strings(&ga);
+--- 5728,5734 ----
+ pat_len = (int)STRLEN(pat);
+ ga_init2(&ga, (int)sizeof(char *), 10);
+
+! s = alloc(pat_len + 26);
+ if (s == NULL)
+ {
+ ga_clear_strings(&ga);
+*** ../vim-8.1.1383/src/fileio.c 2019-05-24 16:45:57.690428744 +0200
+--- src/fileio.c 2019-05-24 18:17:11.455058638 +0200
+***************
+*** 6203,6209 ****
+ */
+ if (fname == NULL || *fname == NUL)
+ {
+! retval = alloc((unsigned)(MAXPATHL + extlen + 3));
+ if (retval == NULL)
+ return NULL;
+ if (mch_dirname(retval, MAXPATHL) == FAIL ||
+--- 6203,6209 ----
+ */
+ if (fname == NULL || *fname == NUL)
+ {
+! retval = alloc(MAXPATHL + extlen + 3);
+ if (retval == NULL)
+ return NULL;
+ if (mch_dirname(retval, MAXPATHL) == FAIL ||
+***************
+*** 6222,6228 ****
+ else
+ {
+ fnamelen = (int)STRLEN(fname);
+! retval = alloc((unsigned)(fnamelen + extlen + 3));
+ if (retval == NULL)
+ return NULL;
+ STRCPY(retval, fname);
+--- 6222,6228 ----
+ else
+ {
+ fnamelen = (int)STRLEN(fname);
+! retval = alloc(fnamelen + extlen + 3);
+ if (retval == NULL)
+ return NULL;
+ STRCPY(retval, fname);
+***************
+*** 6894,6901 ****
+ {
+ if (!helpmesg)
+ mesg2 = "";
+! tbuf = (char *)alloc((unsigned)(STRLEN(path) + STRLEN(mesg)
+! + STRLEN(mesg2) + 2));
+ sprintf(tbuf, mesg, path);
+ #ifdef FEAT_EVAL
+ /* Set warningmsg here, before the unimportant and output-specific
+--- 6894,6901 ----
+ {
+ if (!helpmesg)
+ mesg2 = "";
+! tbuf = (char *)alloc(STRLEN(path) + STRLEN(mesg)
+! + STRLEN(mesg2) + 2);
+ sprintf(tbuf, mesg, path);
+ #ifdef FEAT_EVAL
+ /* Set warningmsg here, before the unimportant and output-specific
+***************
+*** 7391,7397 ****
+ {
+ char_u *buf;
+
+! buf = alloc((unsigned)MAXPATHL + 2);
+ if (buf != NULL)
+ {
+ if (vim_FullName(tempdir, buf, MAXPATHL, FALSE) == FAIL)
+--- 7391,7397 ----
+ {
+ char_u *buf;
+
+! buf = alloc(MAXPATHL + 2);
+ if (buf != NULL)
+ {
+ if (vim_FullName(tempdir, buf, MAXPATHL, FALSE) == FAIL)
+*** ../vim-8.1.1383/src/findfile.c 2019-03-31 19:40:03.818129110 +0200
+--- src/findfile.c 2019-05-24 18:17:53.290809924 +0200
+***************
+*** 319,325 ****
+ search_ctx = search_ctx_arg;
+ else
+ {
+! search_ctx = (ff_search_ctx_T*)alloc((unsigned)sizeof(ff_search_ctx_T));
+ if (search_ctx == NULL)
+ goto error_return;
+ vim_memset(search_ctx, 0, sizeof(ff_search_ctx_T));
+--- 319,325 ----
+ search_ctx = search_ctx_arg;
+ else
+ {
+! search_ctx = (ff_search_ctx_T*)alloc(sizeof(ff_search_ctx_T));
+ if (search_ctx == NULL)
+ goto error_return;
+ vim_memset(search_ctx, 0, sizeof(ff_search_ctx_T));
+***************
+*** 430,437 ****
+ walker++;
+
+ dircount = 1;
+! search_ctx->ffsc_stopdirs_v =
+! (char_u **)alloc((unsigned)sizeof(char_u *));
+
+ if (search_ctx->ffsc_stopdirs_v != NULL)
+ {
+--- 430,436 ----
+ walker++;
+
+ dircount = 1;
+! search_ctx->ffsc_stopdirs_v = (char_u **)alloc(sizeof(char_u *));
+
+ if (search_ctx->ffsc_stopdirs_v != NULL)
+ {
+***************
+*** 926,933 ****
+ */
+ if (path_with_url(dirptrs[0]))
+ {
+! stackp->ffs_filearray = (char_u **)
+! alloc((unsigned)sizeof(char *));
+ if (stackp->ffs_filearray != NULL
+ && (stackp->ffs_filearray[0]
+ = vim_strsave(dirptrs[0])) != NULL)
+--- 925,931 ----
+ */
+ if (path_with_url(dirptrs[0]))
+ {
+! stackp->ffs_filearray = (char_u **)alloc(sizeof(char *));
+ if (stackp->ffs_filearray != NULL
+ && (stackp->ffs_filearray[0]
+ = vim_strsave(dirptrs[0])) != NULL)
+***************
+*** 1285,1291 ****
+ /*
+ * if we reach this we didn't find a list and we have to allocate new list
+ */
+! retptr = (ff_visited_list_hdr_T*)alloc((unsigned)sizeof(*retptr));
+ if (retptr == NULL)
+ return NULL;
+
+--- 1283,1289 ----
+ /*
+ * if we reach this we didn't find a list and we have to allocate new list
+ */
+! retptr = (ff_visited_list_hdr_T*)alloc(sizeof(*retptr));
+ if (retptr == NULL)
+ return NULL;
+
+***************
+*** 1413,1420 ****
+ /*
+ * New file/dir. Add it to the list of visited files/dirs.
+ */
+! vp = (ff_visited_T *)alloc((unsigned)(sizeof(ff_visited_T)
+! + STRLEN(ff_expand_buffer)));
+
+ if (vp != NULL)
+ {
+--- 1411,1417 ----
+ /*
+ * New file/dir. Add it to the list of visited files/dirs.
+ */
+! vp = (ff_visited_T *)alloc(sizeof(ff_visited_T) + STRLEN(ff_expand_buffer));
+
+ if (vp != NULL)
+ {
+***************
+*** 1462,1468 ****
+ {
+ ff_stack_T *new;
+
+! new = (ff_stack_T *)alloc((unsigned)sizeof(ff_stack_T));
+ if (new == NULL)
+ return NULL;
+
+--- 1459,1465 ----
+ {
+ ff_stack_T *new;
+
+! new = (ff_stack_T *)alloc(sizeof(ff_stack_T));
+ if (new == NULL)
+ return NULL;
+
+***************
+*** 2579,2585 ****
+ char_u *paths = NULL;
+ int glob_flags = 0;
+
+! if ((curdir = alloc((unsigned)MAXPATHL)) == NULL)
+ return 0;
+ mch_dirname(curdir, MAXPATHL);
+
+--- 2576,2582 ----
+ char_u *paths = NULL;
+ int glob_flags = 0;
+
+! if ((curdir = alloc(MAXPATHL)) == NULL)
+ return 0;
+ mch_dirname(curdir, MAXPATHL);
+
+*** ../vim-8.1.1383/src/fold.c 2019-01-24 15:04:44.670887836 +0100
+--- src/fold.c 2019-05-24 18:18:11.314702942 +0200
+***************
+*** 1770,1776 ****
+ /* Check if the line ends with an unclosed comment */
+ (void)skip_comment(line, FALSE, FALSE, &line_is_comment);
+ #endif
+! newline = alloc((unsigned)(line_len + markerlen + STRLEN(cms) + 1));
+ if (newline == NULL)
+ return;
+ STRCPY(newline, line);
+--- 1770,1776 ----
+ /* Check if the line ends with an unclosed comment */
+ (void)skip_comment(line, FALSE, FALSE, &line_is_comment);
+ #endif
+! newline = alloc(line_len + markerlen + STRLEN(cms) + 1);
+ if (newline == NULL)
+ return;
+ STRCPY(newline, line);
+***************
+*** 1849,1855 ****
+ if (u_save(lnum - 1, lnum + 1) == OK)
+ {
+ /* Make new line: text-before-marker + text-after-marker */
+! newline = alloc((unsigned)(STRLEN(line) - len + 1));
+ if (newline != NULL)
+ {
+ STRNCPY(newline, line, p - line);
+--- 1849,1855 ----
+ if (u_save(lnum - 1, lnum + 1) == OK)
+ {
+ /* Make new line: text-before-marker + text-after-marker */
+! newline = alloc(STRLEN(line) - len + 1);
+ if (newline != NULL)
+ {
+ STRNCPY(newline, line, p - line);
+*** ../vim-8.1.1383/src/getchar.c 2019-05-22 22:38:21.660405578 +0200
+--- src/getchar.c 2019-05-24 18:18:37.122549890 +0200
+***************
+*** 3731,3737 ****
+ /*
+ * Get here when adding a new entry to the maphash[] list or abbrlist.
+ */
+! mp = (mapblock_T *)alloc((unsigned)sizeof(mapblock_T));
+ if (mp == NULL)
+ {
+ retval = 4; /* no mem */
+--- 3731,3737 ----
+ /*
+ * Get here when adding a new entry to the maphash[] list or abbrlist.
+ */
+! mp = (mapblock_T *)alloc(sizeof(mapblock_T));
+ if (mp == NULL)
+ {
+ retval = 4; /* no mem */
+***************
+*** 4375,4381 ****
+
+ if (round == 1)
+ {
+! *file = (char_u **)alloc((unsigned)(count * sizeof(char_u *)));
+ if (*file == NULL)
+ return FAIL;
+ }
+--- 4375,4381 ----
+
+ if (round == 1)
+ {
+! *file = (char_u **)alloc(count * sizeof(char_u *));
+ if (*file == NULL)
+ return FAIL;
+ }
+***************
+*** 4695,4701 ****
+ /* Need a buffer to hold up to three times as much. Four in case of an
+ * illegal utf-8 byte:
+ * 0xc0 -> 0xc3 0x80 -> 0xc3 K_SPECIAL KS_SPECIAL KE_FILLER */
+! res = alloc((unsigned)(STRLEN(p) * 4) + 1);
+ if (res != NULL)
+ {
+ d = res;
+--- 4695,4701 ----
+ /* Need a buffer to hold up to three times as much. Four in case of an
+ * illegal utf-8 byte:
+ * 0xc0 -> 0xc3 0x80 -> 0xc3 K_SPECIAL KS_SPECIAL KE_FILLER */
+! res = alloc(STRLEN(p) * 4 + 1);
+ if (res != NULL)
+ {
+ d = res;
+*** ../vim-8.1.1383/src/gui.c 2019-05-23 21:35:44.451922663 +0200
+--- src/gui.c 2019-05-24 18:18:55.070443551 +0200
+***************
+*** 2162,2168 ****
+
+ if (enc_utf8)
+ {
+! buf = alloc((unsigned)(len * MB_MAXBYTES + 1));
+ if (buf == NULL)
+ return OK; /* not much we could do here... */
+
+--- 2162,2168 ----
+
+ if (enc_utf8)
+ {
+! buf = alloc(len * MB_MAXBYTES + 1);
+ if (buf == NULL)
+ return OK; /* not much we could do here... */
+
+***************
+*** 2185,2191 ****
+ }
+ else if (enc_dbcs == DBCS_JPNU)
+ {
+! buf = alloc((unsigned)(len * 2 + 1));
+ if (buf == NULL)
+ return OK; /* not much we could do here... */
+
+--- 2185,2191 ----
+ }
+ else if (enc_dbcs == DBCS_JPNU)
+ {
+! buf = alloc(len * 2 + 1);
+ if (buf == NULL)
+ return OK; /* not much we could do here... */
+
+*** ../vim-8.1.1383/src/gui_at_fs.c 2019-01-13 23:38:33.391773303 +0100
+--- src/gui_at_fs.c 2019-05-24 18:19:22.602280613 +0200
+***************
+*** 499,505 ****
+ (unsigned)(Alloc * sizeof(SFLogin)));
+ }
+ len = strlen(pw->pw_name);
+! entries[i].real = XtMalloc((unsigned) (len + 3));
+ (void) strcat(strcpy(entries[i].real, "~"), pw->pw_name);
+ entries[i].shown = entries[i].real;
+ entries[i].statDone = 1;
+--- 499,505 ----
+ (unsigned)(Alloc * sizeof(SFLogin)));
+ }
+ len = strlen(pw->pw_name);
+! entries[i].real = XtMalloc((unsigned)(len + 3));
+ (void) strcat(strcpy(entries[i].real, "~"), pw->pw_name);
+ entries[i].shown = entries[i].real;
+ entries[i].statDone = 1;
+***************
+*** 1307,1313 ****
+ int len;
+
+ len = strlen(shown);
+! entry->shown = XtMalloc((unsigned) (len + 2));
+ (void) strcpy(entry->shown, shown);
+ SFwriteStatChar(entry->shown, len, &statBuf);
+ entry->shown[len + 1] = 0;
+--- 1307,1313 ----
+ int len;
+
+ len = strlen(shown);
+! entry->shown = XtMalloc((unsigned)(len + 2));
+ (void) strcpy(entry->shown, shown);
+ SFwriteStatChar(entry->shown, len, &statBuf);
+ entry->shown[len + 1] = 0;
+***************
+*** 2032,2038 ****
+ result[i].statDone = 0;
+ str = dp->d_name;
+ len = strlen(str);
+! result[i].real = XtMalloc((unsigned) (len + 2));
+ (void) strcat(strcpy(result[i].real, str), " ");
+ if (len > maxChars)
+ maxChars = len;
+--- 2032,2038 ----
+ result[i].statDone = 0;
+ str = dp->d_name;
+ len = strlen(str);
+! result[i].real = XtMalloc((unsigned)(len + 2));
+ (void) strcat(strcpy(result[i].real, str), " ");
+ if (len > maxChars)
+ maxChars = len;
+*** ../vim-8.1.1383/src/gui_gtk.c 2019-03-30 18:46:57.352077376 +0100
+--- src/gui_gtk.c 2019-05-24 18:19:34.550209963 +0200
+***************
+*** 559,565 ****
+ if (*psrc == '_')
+ ++n_underscores;
+
+! buf = alloc((unsigned)(psrc - name + n_underscores + 1));
+ if (buf != NULL)
+ {
+ pdest = buf;
+--- 559,565 ----
+ if (*psrc == '_')
+ ++n_underscores;
+
+! buf = alloc(psrc - name + n_underscores + 1);
+ if (buf != NULL)
+ {
+ pdest = buf;
+*** ../vim-8.1.1383/src/gui_gtk_x11.c 2019-04-28 19:46:17.026060122 +0200
+--- src/gui_gtk_x11.c 2019-05-24 18:20:02.498044846 +0200
+***************
+*** 429,435 ****
+ * into gui_argv. Freed later in gui_mch_init().
+ */
+ gui_argc = 0;
+! gui_argv = (char **)alloc((unsigned)((*argc + 1) * sizeof(char *)));
+
+ g_return_if_fail(gui_argv != NULL);
+
+--- 429,435 ----
+ * into gui_argv. Freed later in gui_mch_init().
+ */
+ gui_argc = 0;
+! gui_argv = (char **)alloc((*argc + 1) * sizeof(char *));
+
+ g_return_if_fail(gui_argv != NULL);
+
+***************
+*** 1544,1550 ****
+
+ if (info == (guint)TARGET_VIM)
+ {
+! tmpbuf = alloc((unsigned)length + 1);
+ if (tmpbuf != NULL)
+ {
+ tmpbuf[0] = motion_type;
+--- 1544,1550 ----
+
+ if (info == (guint)TARGET_VIM)
+ {
+! tmpbuf = alloc(length + 1);
+ if (tmpbuf != NULL)
+ {
+ tmpbuf[0] = motion_type;
+***************
+*** 1603,1609 ****
+ int l = STRLEN(p_enc);
+
+ /* contents: motion_type 'encoding' NUL text */
+! tmpbuf = alloc((unsigned)length + l + 2);
+ if (tmpbuf != NULL)
+ {
+ tmpbuf[0] = motion_type;
+--- 1603,1609 ----
+ int l = STRLEN(p_enc);
+
+ /* contents: motion_type 'encoding' NUL text */
+! tmpbuf = alloc(length + l + 2);
+ if (tmpbuf != NULL)
+ {
+ tmpbuf[0] = motion_type;
+***************
+*** 2512,2519 ****
+ if (i == count)
+ {
+ /* allocate an Atoms array which is one item longer */
+! new_atoms = (Atom *)alloc((unsigned)((count + 1)
+! * sizeof(Atom)));
+ if (new_atoms != NULL)
+ {
+ memcpy(new_atoms, existing_atoms, count * sizeof(Atom));
+--- 2512,2518 ----
+ if (i == count)
+ {
+ /* allocate an Atoms array which is one item longer */
+! new_atoms = (Atom *)alloc((count + 1) * sizeof(Atom));
+ if (new_atoms != NULL)
+ {
+ memcpy(new_atoms, existing_atoms, count * sizeof(Atom));
+*** ../vim-8.1.1383/src/gui_motif.c 2019-03-30 18:46:57.352077376 +0100
+--- src/gui_motif.c 2019-05-24 18:20:16.981959328 +0200
+***************
+*** 2538,2544 ****
+ for (p = buts; *p; ++p)
+ if (*p == DLG_BUTTON_SEP)
+ ++butcount;
+! buttons = (Widget *)alloc((unsigned)(butcount * sizeof(Widget)));
+ if (buttons == NULL)
+ {
+ vim_free(buts);
+--- 2538,2544 ----
+ for (p = buts; *p; ++p)
+ if (*p == DLG_BUTTON_SEP)
+ ++butcount;
+! buttons = (Widget *)alloc(butcount * sizeof(Widget));
+ if (buttons == NULL)
+ {
+ vim_free(buts);
+*** ../vim-8.1.1383/src/gui_w32.c 2019-05-09 15:12:45.168723969 +0200
+--- src/gui_w32.c 2019-05-24 18:20:49.505767490 +0200
+***************
+*** 3120,3128 ****
+ charset_name = charset_id2name((int)lf.lfCharSet);
+ quality_name = quality_id2name((int)lf.lfQuality);
+
+! res = (char *)alloc((unsigned)(strlen(font_name) + 30
+ + (charset_name == NULL ? 0 : strlen(charset_name) + 2)
+! + (quality_name == NULL ? 0 : strlen(quality_name) + 2)));
+ if (res != NULL)
+ {
+ p = res;
+--- 3120,3128 ----
+ charset_name = charset_id2name((int)lf.lfCharSet);
+ quality_name = quality_id2name((int)lf.lfQuality);
+
+! res = (char *)alloc(strlen(font_name) + 30
+ + (charset_name == NULL ? 0 : strlen(charset_name) + 2)
+! + (quality_name == NULL ? 0 : strlen(quality_name) + 2));
+ if (res != NULL)
+ {
+ p = res;
+***************
+*** 7718,7724 ****
+ }
+
+ /* Allocate menu label and fill it in */
+! text = label = alloc((unsigned)len + 1);
+ if (label == NULL)
+ break;
+
+--- 7718,7724 ----
+ }
+
+ /* Allocate menu label and fill it in */
+! text = label = alloc(len + 1);
+ if (label == NULL)
+ break;
+
+*** ../vim-8.1.1383/src/hashtab.c 2019-01-20 15:30:36.885328746 +0100
+--- src/hashtab.c 2019-05-24 18:21:05.553672909 +0200
+***************
+*** 400,407 ****
+ else
+ {
+ /* Allocate an array. */
+! newarray = (hashitem_T *)alloc((unsigned)
+! (sizeof(hashitem_T) * newsize));
+ if (newarray == NULL)
+ {
+ /* Out of memory. When there are NULL items still return OK.
+--- 400,406 ----
+ else
+ {
+ /* Allocate an array. */
+! newarray = (hashitem_T *)alloc(sizeof(hashitem_T) * newsize);
+ if (newarray == NULL)
+ {
+ /* Out of memory. When there are NULL items still return OK.
+*** ../vim-8.1.1383/src/if_cscope.c 2019-05-23 21:35:44.455922641 +0200
+--- src/if_cscope.c 2019-05-24 18:22:00.389350117 +0200
+***************
+*** 466,472 ****
+ cs_stat_emsg(char *fname)
+ {
+ char *stat_emsg = _("E563: stat(%s) error: %d");
+! char *buf = (char *)alloc((unsigned)strlen(stat_emsg) + MAXPATHL + 10);
+
+ if (buf != NULL)
+ {
+--- 466,472 ----
+ cs_stat_emsg(char *fname)
+ {
+ char *stat_emsg = _("E563: stat(%s) error: %d");
+! char *buf = (char *)alloc(strlen(stat_emsg) + MAXPATHL + 10);
+
+ if (buf != NULL)
+ {
+***************
+*** 543,549 ****
+ /* 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)
+ goto add_err;
+
+--- 543,549 ----
+ /* if filename is a directory, append the cscope database name to it */
+ if (S_ISDIR(statbuf.st_mode))
+ {
+! fname2 = (char *)alloc(strlen(CSCOPE_DBFILE) + strlen(fname) + 2);
+ if (fname2 == NULL)
+ goto add_err;
+
+***************
+*** 769,775 ****
+ while VIM_ISWHITE(*pat)
+ ++pat;
+
+! if ((cmd = (char *)alloc((unsigned)(strlen(pat) + 2))) == NULL)
+ return NULL;
+
+ (void)sprintf(cmd, "%d%s", search, pat);
+--- 769,775 ----
+ while VIM_ISWHITE(*pat)
+ ++pat;
+
+! if ((cmd = (char *)alloc(strlen(pat) + 2)) == NULL)
+ return NULL;
+
+ (void)sprintf(cmd, "%d%s", search, pat);
+***************
+*** 1121,1127 ****
+ if (strchr(CSQF_FLAGS, *qfpos) == NULL)
+ {
+ char *nf = _("E469: invalid cscopequickfix flag %c for %c");
+! char *buf = (char *)alloc((unsigned)strlen(nf));
+
+ /* strlen will be enough because we use chars */
+ if (buf != NULL)
+--- 1121,1127 ----
+ if (strchr(CSQF_FLAGS, *qfpos) == NULL)
+ {
+ char *nf = _("E469: invalid cscopequickfix flag %c for %c");
+! char *buf = (char *)alloc(strlen(nf));
+
+ /* strlen will be enough because we use chars */
+ if (buf != NULL)
+***************
+*** 1192,1198 ****
+ return FALSE;
+ }
+
+! buf = (char *)alloc((unsigned)(strlen(opt) + strlen(pat) + strlen(nf)));
+ if (buf == NULL)
+ (void)emsg(nf);
+ else
+--- 1192,1198 ----
+ return FALSE;
+ }
+
+! buf = (char *)alloc(strlen(opt) + strlen(pat) + strlen(nf));
+ if (buf == NULL)
+ (void)emsg(nf);
+ else
+***************
+*** 1450,1463 ****
+ clear_csinfo(j);
+ }
+
+! if ((csinfo[i].fname = (char *)alloc((unsigned)strlen(fname)+1)) == NULL)
+ return -1;
+
+ (void)strcpy(csinfo[i].fname, (const char *)fname);
+
+ if (ppath != NULL)
+ {
+! if ((csinfo[i].ppath = (char *)alloc((unsigned)strlen(ppath) + 1)) == NULL)
+ {
+ VIM_CLEAR(csinfo[i].fname);
+ return -1;
+--- 1450,1463 ----
+ clear_csinfo(j);
+ }
+
+! if ((csinfo[i].fname = (char *)alloc(strlen(fname)+1)) == NULL)
+ return -1;
+
+ (void)strcpy(csinfo[i].fname, (const char *)fname);
+
+ if (ppath != NULL)
+ {
+! if ((csinfo[i].ppath = (char *)alloc(strlen(ppath) + 1)) == NULL)
+ {
+ VIM_CLEAR(csinfo[i].fname);
+ return -1;
+***************
+*** 1468,1474 ****
+
+ if (flags != NULL)
+ {
+! if ((csinfo[i].flags = (char *)alloc((unsigned)strlen(flags) + 1)) == NULL)
+ {
+ VIM_CLEAR(csinfo[i].fname);
+ VIM_CLEAR(csinfo[i].ppath);
+--- 1468,1474 ----
+
+ if (flags != NULL)
+ {
+! if ((csinfo[i].flags = (char *)alloc(strlen(flags) + 1)) == NULL)
+ {
+ VIM_CLEAR(csinfo[i].fname);
+ VIM_CLEAR(csinfo[i].ppath);
+***************
+*** 1820,1826 ****
+ &slno, &search)) == NULL)
+ continue;
+
+! context = (char *)alloc((unsigned)strlen(cntx)+5);
+ if (context == NULL)
+ continue;
+
+--- 1820,1826 ----
+ &slno, &search)) == NULL)
+ continue;
+
+! context = (char *)alloc(strlen(cntx)+5);
+ if (context == NULL)
+ continue;
+
+***************
+*** 1975,1981 ****
+
+ assert(num_matches > 0);
+
+! if ((tbuf = (char *)alloc((unsigned)strlen(matches[0]) + 1)) == NULL)
+ return;
+
+ strcpy(tbuf, matches[0]);
+--- 1975,1981 ----
+
+ assert(num_matches > 0);
+
+! if ((tbuf = (char *)alloc(strlen(matches[0]) + 1)) == NULL)
+ return;
+
+ strcpy(tbuf, matches[0]);
+***************
+*** 2010,2016 ****
+ * by parsing matches[i] on the fly and placing stuff into buf
+ * directly, but that's too much of a hassle
+ */
+! if ((tbuf = (char *)alloc((unsigned)strlen(matches[idx]) + 1)) == NULL)
+ continue;
+ (void)strcpy(tbuf, matches[idx]);
+
+--- 2010,2016 ----
+ * by parsing matches[i] on the fly and placing stuff into buf
+ * directly, but that's too much of a hassle
+ */
+! if ((tbuf = (char *)alloc(strlen(matches[idx]) + 1)) == NULL)
+ continue;
+ (void)strcpy(tbuf, matches[idx]);
+
+*** ../vim-8.1.1383/src/if_perlsfio.c 2016-08-29 22:42:20.000000000 +0200
+--- src/if_perlsfio.c 2019-05-24 18:22:17.913247076 +0200
+***************
+*** 51,57 ****
+ {
+ Sfdisc_t *disc;
+
+! disc = (Sfdisc_t *)alloc((unsigned)sizeof(Sfdisc_t));
+ if (disc == NULL)
+ return NULL;
+
+--- 51,57 ----
+ {
+ Sfdisc_t *disc;
+
+! disc = (Sfdisc_t *)alloc(sizeof(Sfdisc_t));
+ if (disc == NULL)
+ return NULL;
+
+*** ../vim-8.1.1383/src/if_python3.c 2019-03-30 18:46:57.352077376 +0100
+--- src/if_python3.c 2019-05-24 18:22:32.969158589 +0200
+***************
+*** 1629,1635 ****
+ Py_ssize_t len = strlen(str);
+ char *tmp,*p;
+
+! tmp = (char *)alloc((unsigned)(len+1));
+ p = tmp;
+ if (p == NULL)
+ {
+--- 1629,1635 ----
+ Py_ssize_t len = strlen(str);
+ char *tmp,*p;
+
+! tmp = (char *)alloc(len + 1);
+ p = tmp;
+ if (p == NULL)
+ {
+*** ../vim-8.1.1383/src/if_xcmdsrv.c 2019-01-24 15:54:17.786847003 +0100
+--- src/if_xcmdsrv.c 2019-05-24 18:22:52.685042739 +0200
+***************
+*** 441,447 ****
+ * Length must be computed exactly!
+ */
+ length = STRLEN(name) + STRLEN(p_enc) + STRLEN(cmd) + 14;
+! property = (char_u *)alloc((unsigned)length + 30);
+
+ sprintf((char *)property, "%c%c%c-n %s%c-E %s%c-s %s",
+ 0, asExpr ? 'c' : 'k', 0, name, 0, p_enc, 0, cmd);
+--- 441,447 ----
+ * Length must be computed exactly!
+ */
+ length = STRLEN(name) + STRLEN(p_enc) + STRLEN(cmd) + 14;
+! property = (char_u *)alloc(length + 30);
+
+ sprintf((char *)property, "%c%c%c-n %s%c-E %s%c-s %s",
+ 0, asExpr ? 'c' : 'k', 0, name, 0, p_enc, 0, cmd);
+***************
+*** 750,756 ****
+ return -1;
+
+ length = STRLEN(p_enc) + STRLEN(str) + 14;
+! if ((property = (char_u *)alloc((unsigned)length + 30)) != NULL)
+ {
+ sprintf((char *)property, "%cn%c-E %s%c-n %s%c-w %x",
+ 0, 0, p_enc, 0, str, 0, (unsigned int)commWindow);
+--- 750,756 ----
+ return -1;
+
+ length = STRLEN(p_enc) + STRLEN(str) + 14;
+! if ((property = (char_u *)alloc(length + 30)) != NULL)
+ {
+ sprintf((char *)property, "%cn%c-E %s%c-n %s%c-w %x",
+ 0, 0, p_enc, 0, str, 0, (unsigned int)commWindow);
+*** ../vim-8.1.1383/src/indent.c 2019-03-30 18:46:57.356077354 +0100
+--- src/indent.c 2019-05-24 18:23:04.764971811 +0200
+***************
+*** 28,34 ****
+ int len;
+
+ cinw_len = (int)STRLEN(curbuf->b_p_cinw) + 1;
+! cinw_buf = alloc((unsigned)cinw_len);
+ if (cinw_buf != NULL)
+ {
+ line = skipwhite(line);
+--- 28,34 ----
+ int len;
+
+ cinw_len = (int)STRLEN(curbuf->b_p_cinw) + 1;
+! cinw_buf = alloc(cinw_len);
+ if (cinw_buf != NULL)
+ {
+ line = skipwhite(line);
+*** ../vim-8.1.1383/src/insexpand.c 2019-04-28 18:04:56.058492178 +0200
+--- src/insexpand.c 2019-05-24 18:23:29.828824711 +0200
+***************
+*** 473,479 ****
+ ? actual_len : actual_compl_length;
+
+ // Allocate wide character array for the completion and fill it.
+! wca = (int *)alloc((unsigned)(actual_len * sizeof(int)));
+ if (wca != NULL)
+ {
+ p = str;
+--- 473,479 ----
+ ? actual_len : actual_compl_length;
+
+ // Allocate wide character array for the completion and fill it.
+! wca = (int *)alloc(actual_len * sizeof(int));
+ if (wca != NULL)
+ {
+ p = str;
+***************
+*** 1230,1236 ****
+ if (pat_esc == NULL)
+ goto theend;
+ len = STRLEN(pat_esc) + 10;
+! ptr = alloc((unsigned)len);
+ if (ptr == NULL)
+ {
+ vim_free(pat_esc);
+--- 1230,1236 ----
+ if (pat_esc == NULL)
+ goto theend;
+ len = STRLEN(pat_esc) + 10;
+! ptr = alloc(len);
+ if (ptr == NULL)
+ {
+ vim_free(pat_esc);
+*** ../vim-8.1.1383/src/main.c 2019-05-24 13:11:44.311032841 +0200
+--- src/main.c 2019-05-24 18:23:48.016718008 +0200
+***************
+*** 2300,2306 ****
+ }
+ else
+ a = argv[0];
+! p = alloc((unsigned)(STRLEN(a) + 4));
+ if (p == NULL)
+ mch_exit(2);
+ sprintf((char *)p, "so %s", a);
+--- 2300,2306 ----
+ }
+ else
+ a = argv[0];
+! p = alloc(STRLEN(a) + 4);
+ if (p == NULL)
+ mch_exit(2);
+ sprintf((char *)p, "so %s", a);
+***************
+*** 2526,2532 ****
+ * one. */
+ if (parmp->n_commands > 0)
+ {
+! p = alloc((unsigned)STRLEN(parmp->commands[0]) + 3);
+ if (p != NULL)
+ {
+ sprintf((char *)p, ":%s\r", parmp->commands[0]);
+--- 2526,2532 ----
+ * one. */
+ if (parmp->n_commands > 0)
+ {
+! p = alloc(STRLEN(parmp->commands[0]) + 3);
+ if (p != NULL)
+ {
+ sprintf((char *)p, ":%s\r", parmp->commands[0]);
+***************
+*** 4263,4269 ****
+ size_t len = STRLEN(cmd) + STRLEN(err) + 5;
+ char_u *msg;
+
+! msg = alloc((unsigned)len);
+ if (msg != NULL)
+ vim_snprintf((char *)msg, len, "%s: \"%s\"", err, cmd);
+ *result = msg;
+--- 4263,4269 ----
+ size_t len = STRLEN(cmd) + STRLEN(err) + 5;
+ char_u *msg;
+
+! msg = alloc(len);
+ if (msg != NULL)
+ vim_snprintf((char *)msg, len, "%s: \"%s\"", err, cmd);
+ *result = msg;
+*** ../vim-8.1.1383/src/mbyte.c 2019-04-28 19:46:17.030060105 +0200
+--- src/mbyte.c 2019-05-24 18:24:05.176617375 +0200
+***************
+*** 4317,4323 ****
+ }
+
+ /* copy "enc" to allocated memory, with room for two '-' */
+! r = alloc((unsigned)(STRLEN(enc) + 3));
+ if (r != NULL)
+ {
+ /* Make it all lower case and replace '_' with '-'. */
+--- 4317,4323 ----
+ }
+
+ /* copy "enc" to allocated memory, with room for two '-' */
+! r = alloc(STRLEN(enc) + 3);
+ if (r != NULL)
+ {
+ /* Make it all lower case and replace '_' with '-'. */
+***************
+*** 4603,4609 ****
+ /* Allocate enough room for most conversions. When re-allocating
+ * increase the buffer size. */
+ len = len + fromlen * 2 + 40;
+! p = alloc((unsigned)len);
+ if (p != NULL && done > 0)
+ mch_memmove(p, result, done);
+ vim_free(result);
+--- 4603,4609 ----
+ /* Allocate enough room for most conversions. When re-allocating
+ * increase the buffer size. */
+ len = len + fromlen * 2 + 40;
+! p = alloc(len);
+ if (p != NULL && done > 0)
+ mch_memmove(p, result, done);
+ vim_free(result);
+*** ../vim-8.1.1383/src/memfile.c 2019-02-17 17:44:36.211875510 +0100
+--- src/memfile.c 2019-05-24 18:24:20.648526679 +0200
+***************
+*** 130,136 ****
+ struct STATFS stf;
+ #endif
+
+! if ((mfp = (memfile_T *)alloc((unsigned)sizeof(memfile_T))) == NULL)
+ return NULL;
+
+ if (fname == NULL) /* no file for this memfile, use memory only */
+--- 130,136 ----
+ struct STATFS stf;
+ #endif
+
+! if ((mfp = (memfile_T *)alloc(sizeof(memfile_T))) == NULL)
+ return NULL;
+
+ if (fname == NULL) /* no file for this memfile, use memory only */
+***************
+*** 893,899 ****
+ {
+ bhdr_T *hp;
+
+! if ((hp = (bhdr_T *)alloc((unsigned)sizeof(bhdr_T))) != NULL)
+ {
+ if ((hp->bh_data = (char_u *)alloc(mfp->mf_page_size * page_count))
+ == NULL)
+--- 893,899 ----
+ {
+ bhdr_T *hp;
+
+! if ((hp = (bhdr_T *)alloc(sizeof(bhdr_T))) != NULL)
+ {
+ if ((hp->bh_data = (char_u *)alloc(mfp->mf_page_size * page_count))
+ == NULL)
+***************
+*** 1108,1114 ****
+ if (hp->bh_bnum >= 0) /* it's already positive */
+ return OK;
+
+! if ((np = (NR_TRANS *)alloc((unsigned)sizeof(NR_TRANS))) == NULL)
+ return FAIL;
+
+ /*
+--- 1108,1114 ----
+ if (hp->bh_bnum >= 0) /* it's already positive */
+ return OK;
+
+! if ((np = (NR_TRANS *)alloc(sizeof(NR_TRANS))) == NULL)
+ return FAIL;
+
+ /*
+*** ../vim-8.1.1383/src/memline.c 2019-05-23 21:35:44.455922641 +0200
+--- src/memline.c 2019-05-24 18:25:09.856334524 +0200
+***************
+*** 1189,1195 ****
+ * Allocate a buffer structure for the swap file that is used for recovery.
+ * Only the memline and crypt information in it are really used.
+ */
+! buf = (buf_T *)alloc((unsigned)sizeof(buf_T));
+ if (buf == NULL)
+ goto theend;
+
+--- 1189,1195 ----
+ * Allocate a buffer structure for the swap file that is used for recovery.
+ * Only the memline and crypt information in it are really used.
+ */
+! buf = (buf_T *)alloc(sizeof(buf_T));
+ if (buf == NULL)
+ goto theend;
+
+***************
+*** 1787,1793 ****
+ * Do the loop for every directory in 'directory'.
+ * First allocate some memory to put the directory name in.
+ */
+! dir_name = alloc((unsigned)STRLEN(p_dir) + 1);
+ dirp = p_dir;
+ while (dir_name != NULL && *dirp)
+ {
+--- 1787,1793 ----
+ * Do the loop for every directory in 'directory'.
+ * First allocate some memory to put the directory name in.
+ */
+! dir_name = alloc(STRLEN(p_dir) + 1);
+ dirp = p_dir;
+ while (dir_name != NULL && *dirp)
+ {
+***************
+*** 1913,1919 ****
+ {
+ if (mch_stat((char *)swapname, &st) != -1) /* It exists! */
+ {
+! files = (char_u **)alloc((unsigned)sizeof(char_u *));
+ if (files != NULL)
+ {
+ files[0] = swapname;
+--- 1913,1919 ----
+ {
+ if (mch_stat((char *)swapname, &st) != -1) /* It exists! */
+ {
+! files = (char_u **)alloc(sizeof(char_u *));
+ if (files != NULL)
+ {
+ files[0] = swapname;
+***************
+*** 2015,2021 ****
+ f = fix_fname(name != NULL ? name : (char_u *)"");
+ if (f != NULL)
+ {
+! s = alloc((unsigned)(STRLEN(f) + 1));
+ if (s != NULL)
+ {
+ STRCPY(s, f);
+--- 2015,2021 ----
+ f = fix_fname(name != NULL ? name : (char_u *)"");
+ if (f != NULL)
+ {
+! s = alloc(STRLEN(f) + 1);
+ if (s != NULL)
+ {
+ STRCPY(s, f);
+***************
+*** 2674,2680 ****
+ if (new_prop_count == 0)
+ return; // nothing to do
+ new_len = *len + new_prop_count * sizeof(textprop_T);
+! new_line = alloc((unsigned)new_len);
+ if (new_line == NULL)
+ return;
+ mch_memmove(new_line, *line, *len);
+--- 2674,2680 ----
+ if (new_prop_count == 0)
+ return; // nothing to do
+ new_len = *len + new_prop_count * sizeof(textprop_T);
+! new_line = alloc(new_len);
+ if (new_line == NULL)
+ return;
+ mch_memmove(new_line, *line, *len);
+***************
+*** 4201,4207 ****
+ {
+ CHECK(top > 0, _("Stack size increases")); /* more than 5 levels??? */
+
+! newstack = (infoptr_T *)alloc((unsigned)sizeof(infoptr_T) *
+ (buf->b_ml.ml_stack_size + STACK_INCR));
+ if (newstack == NULL)
+ return -1;
+--- 4201,4207 ----
+ {
+ CHECK(top > 0, _("Stack size increases")); /* more than 5 levels??? */
+
+! newstack = (infoptr_T *)alloc(sizeof(infoptr_T) *
+ (buf->b_ml.ml_stack_size + STACK_INCR));
+ if (newstack == NULL)
+ return -1;
+***************
+*** 4596,4602 ****
+ * Isolate a directory name from *dirp and put it in dir_name.
+ * First allocate some memory to put the directory name in.
+ */
+! dir_name = alloc((unsigned)STRLEN(*dirp) + 1);
+ if (dir_name == NULL)
+ *dirp = NULL;
+ else
+--- 4596,4602 ----
+ * Isolate a directory name from *dirp and put it in dir_name.
+ * First allocate some memory to put the directory name in.
+ */
+! dir_name = alloc(STRLEN(*dirp) + 1);
+ if (dir_name == NULL)
+ *dirp = NULL;
+ else
+***************
+*** 4920,4928 ****
+ {
+ char_u *name;
+
+! name = alloc((unsigned)(STRLEN(fname)
+ + STRLEN(_("Swap file \""))
+! + STRLEN(_("\" already exists!")) + 5));
+ if (name != NULL)
+ {
+ STRCPY(name, _("Swap file \""));
+--- 4920,4928 ----
+ {
+ char_u *name;
+
+! name = alloc(STRLEN(fname)
+ + STRLEN(_("Swap file \""))
+! + STRLEN(_("\" already exists!")) + 5);
+ if (name != NULL)
+ {
+ STRCPY(name, _("Swap file \""));
+***************
+*** 5371,5378 ****
+ return;
+ if (buf->b_ml.ml_chunksize == NULL)
+ {
+! buf->b_ml.ml_chunksize = (chunksize_T *)
+! alloc((unsigned)sizeof(chunksize_T) * 100);
+ if (buf->b_ml.ml_chunksize == NULL)
+ {
+ buf->b_ml.ml_usedchunks = -1;
+--- 5371,5378 ----
+ return;
+ if (buf->b_ml.ml_chunksize == NULL)
+ {
+! buf->b_ml.ml_chunksize =
+! (chunksize_T *)alloc(sizeof(chunksize_T) * 100);
+ if (buf->b_ml.ml_chunksize == NULL)
+ {
+ buf->b_ml.ml_usedchunks = -1;
+*** ../vim-8.1.1383/src/menu.c 2019-05-05 14:19:17.594303166 +0200
+--- src/menu.c 2019-05-24 18:25:34.852270671 +0200
+***************
+*** 694,700 ****
+ * \'s and ^V's stripped out. But menu_path is a "raw"
+ * string, so we must correct for special characters.
+ */
+! tearpath = alloc((unsigned int)STRLEN(menu_path) + TEAR_LEN + 2);
+ if (tearpath != NULL)
+ {
+ char_u *s;
+--- 694,700 ----
+ * \'s and ^V's stripped out. But menu_path is a "raw"
+ * string, so we must correct for special characters.
+ */
+! tearpath = alloc(STRLEN(menu_path) + TEAR_LEN + 2);
+ if (tearpath != NULL)
+ {
+ char_u *s;
+***************
+*** 780,786 ****
+
+ if (c != 0)
+ {
+! menu->strings[i] = alloc((unsigned)(STRLEN(call_data) + 5 ));
+ if (menu->strings[i] != NULL)
+ {
+ menu->strings[i][0] = c;
+--- 780,786 ----
+
+ if (c != 0)
+ {
+! menu->strings[i] = alloc(STRLEN(call_data) + 5);
+ if (menu->strings[i] != NULL)
+ {
+ menu->strings[i][0] = c;
+***************
+*** 1316,1322 ****
+ menu = root_menu;
+ if (after_dot != arg)
+ {
+! path_name = alloc((unsigned)(after_dot - arg));
+ if (path_name == NULL)
+ return NULL;
+ vim_strncpy(path_name, arg, after_dot - arg - 1);
+--- 1316,1322 ----
+ menu = root_menu;
+ if (after_dot != arg)
+ {
+! path_name = alloc(after_dot - arg);
+ if (path_name == NULL)
+ return NULL;
+ vim_strncpy(path_name, arg, after_dot - arg - 1);
+*** ../vim-8.1.1383/src/message.c 2019-05-09 15:12:45.172723940 +0200
+--- src/message.c 2019-05-24 18:25:53.980219465 +0200
+***************
+*** 437,443 ****
+ if (sourcing_name != NULL && other_sourcing_name())
+ {
+ p = (char_u *)_("Error detected while processing %s:");
+! Buf = alloc((unsigned)(STRLEN(sourcing_name) + STRLEN(p)));
+ if (Buf != NULL)
+ sprintf((char *)Buf, (char *)p, sourcing_name);
+ return Buf;
+--- 437,443 ----
+ if (sourcing_name != NULL && other_sourcing_name())
+ {
+ p = (char_u *)_("Error detected while processing %s:");
+! Buf = alloc(STRLEN(sourcing_name) + STRLEN(p));
+ if (Buf != NULL)
+ sprintf((char *)Buf, (char *)p, sourcing_name);
+ return Buf;
+***************
+*** 462,468 ****
+ && sourcing_lnum != 0)
+ {
+ p = (char_u *)_("line %4ld:");
+! Buf = alloc((unsigned)(STRLEN(p) + 20));
+ if (Buf != NULL)
+ sprintf((char *)Buf, (char *)p, (long)sourcing_lnum);
+ return Buf;
+--- 462,468 ----
+ && sourcing_lnum != 0)
+ {
+ p = (char_u *)_("line %4ld:");
+! Buf = alloc(STRLEN(p) + 20);
+ if (Buf != NULL)
+ sprintf((char *)Buf, (char *)p, (long)sourcing_lnum);
+ return Buf;
+*** ../vim-8.1.1383/src/misc1.c 2019-05-23 21:35:44.455922641 +0200
+--- src/misc1.c 2019-05-24 18:26:40.432087320 +0200
+***************
+*** 2180,2186 ****
+ pend1 = remove_tail(p, pend, (char_u *)"MacOS");
+ if (pend1 != pend)
+ {
+! pnew = alloc((unsigned)(pend1 - p) + 15);
+ if (pnew != NULL)
+ {
+ STRNCPY(pnew, p, (pend1 - p));
+--- 2180,2186 ----
+ pend1 = remove_tail(p, pend, (char_u *)"MacOS");
+ if (pend1 != pend)
+ {
+! pnew = alloc(pend1 - p + 15);
+ if (pnew != NULL)
+ {
+ STRNCPY(pnew, p, (pend1 - p));
+***************
+*** 2341,2347 ****
+ * Putenv does not copy the string, it has to remain
+ * valid. The allocated memory will never be freed.
+ */
+! envbuf = alloc((unsigned)(STRLEN(name) + STRLEN(val) + 2));
+ if (envbuf != NULL)
+ {
+ sprintf((char *)envbuf, "%s=%s", name, val);
+--- 2341,2347 ----
+ * Putenv does not copy the string, it has to remain
+ * valid. The allocated memory will never be freed.
+ */
+! envbuf = alloc(STRLEN(name) + STRLEN(val) + 2);
+ if (envbuf != NULL)
+ {
+ sprintf((char *)envbuf, "%s=%s", name, val);
+***************
+*** 3019,3025 ****
+ {
+ char_u *dest;
+
+! dest = alloc((unsigned)(STRLEN(fname1) + STRLEN(fname2) + 3));
+ if (dest != NULL)
+ {
+ STRCPY(dest, fname1);
+--- 3019,3025 ----
+ {
+ char_u *dest;
+
+! dest = alloc(STRLEN(fname1) + STRLEN(fname2) + 3);
+ if (dest != NULL)
+ {
+ STRCPY(dest, fname1);
+***************
+*** 3040,3046 ****
+ char_u *dest;
+ size_t l = STRLEN(str1);
+
+! dest = alloc((unsigned)(l + STRLEN(str2) + 1L));
+ if (dest != NULL)
+ {
+ STRCPY(dest, str1);
+--- 3040,3046 ----
+ char_u *dest;
+ size_t l = STRLEN(str1);
+
+! dest = alloc(l + STRLEN(str2) + 1L);
+ if (dest != NULL)
+ {
+ STRCPY(dest, str1);
+***************
+*** 3076,3082 ****
+ if (fname == NULL)
+ return NULL;
+
+! buf = alloc((unsigned)MAXPATHL);
+ if (buf != NULL)
+ {
+ if (vim_FullName(fname, buf, MAXPATHL, force) != FAIL)
+--- 3076,3082 ----
+ if (fname == NULL)
+ return NULL;
+
+! buf = alloc(MAXPATHL);
+ if (buf != NULL)
+ {
+ if (vim_FullName(fname, buf, MAXPATHL, force) != FAIL)
+***************
+*** 4231,4237 ****
+ if (ga_grow(gap, 1) == FAIL)
+ return;
+
+! p = alloc((unsigned)(STRLEN(f) + 1 + isdir));
+ if (p == NULL)
+ return;
+
+--- 4231,4237 ----
+ if (ga_grow(gap, 1) == FAIL)
+ return;
+
+! p = alloc(STRLEN(f) + 1 + isdir);
+ if (p == NULL)
+ return;
+
+*** ../vim-8.1.1383/src/netbeans.c 2019-03-30 18:46:57.356077354 +0100
+--- src/netbeans.c 2019-05-24 18:27:53.783857939 +0200
+***************
+*** 790,796 ****
+
+ nbdebug(("REP %d: %s\n", cmdno, (char *)result));
+
+! reply = alloc((unsigned)STRLEN(result) + 32);
+ sprintf((char *)reply, "%d %s\n", cmdno, (char *)result);
+ nb_send((char *)reply, "nb_reply_text");
+
+--- 790,796 ----
+
+ nbdebug(("REP %d: %s\n", cmdno, (char *)result));
+
+! reply = alloc(STRLEN(result) + 32);
+ sprintf((char *)reply, "%d %s\n", cmdno, (char *)result);
+ nb_send((char *)reply, "nb_reply_text");
+
+***************
+*** 819,825 ****
+ static char_u *
+ nb_quote(char_u *txt)
+ {
+! char_u *buf = alloc((unsigned)(2 * STRLEN(txt) + 1));
+ char_u *p = txt;
+ char_u *q = buf;
+
+--- 819,825 ----
+ static char_u *
+ nb_quote(char_u *txt)
+ {
+! char_u *buf = alloc(2 * STRLEN(txt) + 1);
+ char_u *p = txt;
+ char_u *q = buf;
+
+***************
+*** 951,957 ****
+
+ len_first = (int)STRLEN(ml_get(first));
+ len_other = (int)STRLEN(ml_get(other));
+! p = alloc((unsigned)(len_first + len_other + 1));
+ if (p != NULL)
+ {
+ mch_memmove(p, ml_get(first), len_first);
+--- 951,957 ----
+
+ len_first = (int)STRLEN(ml_get(first));
+ len_other = (int)STRLEN(ml_get(other));
+! p = alloc(len_first + len_other + 1);
+ if (p != NULL)
+ {
+ mch_memmove(p, ml_get(first), len_first);
+***************
+*** 1084,1091 ****
+ {
+ len = get_buf_size(buf->bufp);
+ nlines = buf->bufp->b_ml.ml_line_count;
+! text = alloc((unsigned)((len > 0)
+! ? ((len + nlines) * 2) : 4));
+ if (text == NULL)
+ {
+ nbdebug((" nb_do_cmd: getText has null text field\n"));
+--- 1084,1090 ----
+ {
+ len = get_buf_size(buf->bufp);
+ nlines = buf->bufp->b_ml.ml_line_count;
+! text = alloc((len > 0) ? ((len + nlines) * 2) : 4);
+ if (text == NULL)
+ {
+ nbdebug((" nb_do_cmd: getText has null text field\n"));
+***************
+*** 1395,1402 ****
+ char_u *newline;
+
+ /* Insert halfway a line. */
+! newline = alloc_check(
+! (unsigned)(STRLEN(oldline) + len + 1));
+ if (newline != NULL)
+ {
+ mch_memmove(newline, oldline, (size_t)pos->col);
+--- 1394,1400 ----
+ char_u *newline;
+
+ /* Insert halfway a line. */
+! newline = alloc(STRLEN(oldline) + len + 1);
+ if (newline != NULL)
+ {
+ mch_memmove(newline, oldline, (size_t)pos->col);
+*** ../vim-8.1.1383/src/ops.c 2019-05-19 22:53:36.508914587 +0200
+--- src/ops.c 2019-05-24 18:29:06.455608724 +0200
+***************
+*** 456,462 ****
+ /* if we're splitting a TAB, allow for it */
+ bd.textcol -= bd.pre_whitesp_c - (bd.startspaces != 0);
+ len = (int)STRLEN(bd.textstart) + 1;
+! newp = alloc_check((unsigned)(bd.textcol + i + j + len));
+ if (newp == NULL)
+ return;
+ vim_memset(newp, NUL, (size_t)(bd.textcol + i + j + len));
+--- 456,462 ----
+ /* if we're splitting a TAB, allow for it */
+ bd.textcol -= bd.pre_whitesp_c - (bd.startspaces != 0);
+ len = (int)STRLEN(bd.textstart) + 1;
+! newp = alloc(bd.textcol + i + j + len);
+ if (newp == NULL)
+ return;
+ vim_memset(newp, NUL, (size_t)(bd.textcol + i + j + len));
+***************
+*** 550,556 ****
+ + fill
+ + (unsigned)STRLEN(non_white) + 1;
+
+! newp = alloc_check(new_line_len);
+ if (newp == NULL)
+ return;
+ mch_memmove(newp, oldp, (size_t)(verbatim_copy_end - oldp));
+--- 550,556 ----
+ + fill
+ + (unsigned)STRLEN(non_white) + 1;
+
+! newp = alloc(new_line_len);
+ if (newp == NULL)
+ return;
+ mch_memmove(newp, oldp, (size_t)(verbatim_copy_end - oldp));
+***************
+*** 644,650 ****
+ count -= off;
+ }
+
+! newp = alloc_check((unsigned)(STRLEN(oldp)) + s_len + count + 1);
+ if (newp == NULL)
+ continue;
+
+--- 644,650 ----
+ count -= off;
+ }
+
+! newp = alloc(STRLEN(oldp) + s_len + count + 1);
+ if (newp == NULL)
+ continue;
+
+***************
+*** 1003,1009 ****
+ #endif
+
+ get_yank_register(name, 0);
+! reg = (yankreg_T *)alloc((unsigned)sizeof(yankreg_T));
+ if (reg != NULL)
+ {
+ *reg = *y_current;
+--- 1003,1009 ----
+ #endif
+
+ get_yank_register(name, 0);
+! reg = (yankreg_T *)alloc(sizeof(yankreg_T));
+ if (reg != NULL)
+ {
+ *reg = *y_current;
+***************
+*** 1013,1020 ****
+ if (reg->y_size == 0)
+ reg->y_array = NULL;
+ else
+! reg->y_array = (char_u **)alloc((unsigned)(sizeof(char_u *)
+! * reg->y_size));
+ if (reg->y_array != NULL)
+ {
+ for (i = 0; i < reg->y_size; ++i)
+--- 1013,1019 ----
+ if (reg->y_size == 0)
+ reg->y_array = NULL;
+ else
+! reg->y_array = (char_u **)alloc(sizeof(char_u *) * reg->y_size);
+ if (reg->y_array != NULL)
+ {
+ for (i = 0; i < reg->y_size; ++i)
+***************
+*** 1177,1183 ****
+ {
+ free_yank_all();
+ if ((y_current->y_array =
+! (char_u **)alloc((unsigned)sizeof(char_u *))) == NULL)
+ {
+ vim_free(p);
+ return FAIL;
+--- 1176,1182 ----
+ {
+ free_yank_all();
+ if ((y_current->y_array =
+! (char_u **)alloc(sizeof(char_u *))) == NULL)
+ {
+ vim_free(p);
+ return FAIL;
+***************
+*** 1921,1927 ****
+ // Thus the number of characters may increase!
+ n = bd.textlen - bd.startspaces - bd.endspaces;
+ oldp = ml_get(lnum);
+! newp = alloc_check((unsigned)STRLEN(oldp) + 1 - n);
+ if (newp == NULL)
+ continue;
+ /* copy up to deleted part */
+--- 1920,1926 ----
+ // Thus the number of characters may increase!
+ n = bd.textlen - bd.startspaces - bd.endspaces;
+ oldp = ml_get(lnum);
+! newp = alloc(STRLEN(oldp) + 1 - n);
+ if (newp == NULL)
+ continue;
+ /* copy up to deleted part */
+***************
+*** 2227,2233 ****
+
+ oldp = ml_get_curline();
+ oldlen = STRLEN(oldp);
+! newp = alloc_check((unsigned)oldlen + 1 + n);
+ if (newp == NULL)
+ continue;
+ vim_memset(newp, NUL, (size_t)(oldlen + 1 + n));
+--- 2226,2232 ----
+
+ oldp = ml_get_curline();
+ oldlen = STRLEN(oldp);
+! newp = alloc(oldlen + 1 + n);
+ if (newp == NULL)
+ continue;
+ vim_memset(newp, NUL, (size_t)(oldlen + 1 + n));
+***************
+*** 2260,2267 ****
+ else
+ {
+ /* Replacing with \r or \n means splitting the line. */
+! after_p = alloc_check(
+! (unsigned)(oldlen + 1 + n - STRLEN(newp)));
+ if (after_p != NULL)
+ STRMOVE(after_p, oldp);
+ }
+--- 2259,2265 ----
+ else
+ {
+ /* Replacing with \r or \n means splitting the line. */
+! after_p = alloc(oldlen + 1 + n - STRLEN(newp));
+ if (after_p != NULL)
+ STRMOVE(after_p, oldp);
+ }
+***************
+*** 2869,2875 ****
+ {
+ /* Subsequent calls to ml_get() flush the firstline data - take a
+ * copy of the inserted text. */
+! if ((ins_text = alloc_check((unsigned)(ins_len + 1))) != NULL)
+ {
+ vim_strncpy(ins_text, firstline + bd.textcol, (size_t)ins_len);
+ for (linenr = oap->start.lnum + 1; linenr <= oap->end.lnum;
+--- 2867,2873 ----
+ {
+ /* Subsequent calls to ml_get() flush the firstline data - take a
+ * copy of the inserted text. */
+! if ((ins_text = alloc(ins_len + 1)) != NULL)
+ {
+ vim_strncpy(ins_text, firstline + bd.textcol, (size_t)ins_len);
+ for (linenr = oap->start.lnum + 1; linenr <= oap->end.lnum;
+***************
+*** 2890,2897 ****
+ else
+ vpos.coladd = 0;
+ oldp = ml_get(linenr);
+! newp = alloc_check((unsigned)(STRLEN(oldp)
+! + vpos.coladd + ins_len + 1));
+ if (newp == NULL)
+ continue;
+ /* copy up to block start */
+--- 2888,2894 ----
+ else
+ vpos.coladd = 0;
+ oldp = ml_get(linenr);
+! newp = alloc(STRLEN(oldp) + vpos.coladd + ins_len + 1);
+ if (newp == NULL)
+ continue;
+ /* copy up to block start */
+***************
+*** 3494,3501 ****
+ }
+ if (y_array != NULL)
+ break;
+! y_array = (char_u **)alloc((unsigned)
+! (y_size * sizeof(char_u *)));
+ if (y_array == NULL)
+ goto end;
+ }
+--- 3491,3497 ----
+ }
+ if (y_array != NULL)
+ break;
+! y_array = (char_u **)alloc((y_size * sizeof(char_u *)));
+ if (y_array == NULL)
+ goto end;
+ }
+***************
+*** 3741,3747 ****
+
+ /* insert the new text */
+ totlen = count * (yanklen + spaces) + bd.startspaces + bd.endspaces;
+! newp = alloc_check((unsigned)totlen + oldlen + 1);
+ if (newp == NULL)
+ break;
+ /* copy part up to cursor to new line */
+--- 3737,3743 ----
+
+ /* insert the new text */
+ totlen = count * (yanklen + spaces) + bd.startspaces + bd.endspaces;
+! newp = alloc(totlen + oldlen + 1);
+ if (newp == NULL)
+ break;
+ /* copy part up to cursor to new line */
+***************
+*** 3868,3874 ****
+ lnum++;
+ continue;
+ }
+! newp = alloc_check((unsigned)(STRLEN(oldp) + totlen + 1));
+ if (newp == NULL)
+ goto end; /* alloc() gave an error message */
+ mch_memmove(newp, oldp, (size_t)col);
+--- 3864,3870 ----
+ lnum++;
+ continue;
+ }
+! newp = alloc(STRLEN(oldp) + totlen + 1);
+ if (newp == NULL)
+ goto end; /* alloc() gave an error message */
+ mch_memmove(newp, oldp, (size_t)col);
+***************
+*** 3920,3926 ****
+ lnum = new_cursor.lnum;
+ ptr = ml_get(lnum) + col;
+ totlen = (int)STRLEN(y_array[y_size - 1]);
+! newp = alloc_check((unsigned)(STRLEN(ptr) + totlen + 1));
+ if (newp == NULL)
+ goto error;
+ STRCPY(newp, y_array[y_size - 1]);
+--- 3916,3922 ----
+ lnum = new_cursor.lnum;
+ ptr = ml_get(lnum) + col;
+ totlen = (int)STRLEN(y_array[y_size - 1]);
+! newp = alloc(STRLEN(ptr) + totlen + 1);
+ if (newp == NULL)
+ goto error;
+ STRCPY(newp, y_array[y_size - 1]);
+***************
+*** 3930,3936 ****
+ vim_free(newp);
+
+ oldp = ml_get(lnum);
+! newp = alloc_check((unsigned)(col + yanklen + 1));
+ if (newp == NULL)
+ goto error;
+ /* copy first part of line */
+--- 3926,3932 ----
+ vim_free(newp);
+
+ oldp = ml_get(lnum);
+! newp = alloc(col + yanklen + 1);
+ if (newp == NULL)
+ goto error;
+ /* copy first part of line */
+***************
+*** 4563,4569 ****
+ col = sumsize - currsize - spaces[count - 1];
+
+ /* allocate the space for the new line */
+! newp = alloc_check((unsigned)(sumsize + 1));
+ cend = newp + sumsize;
+ *cend = 0;
+
+--- 4559,4565 ----
+ col = sumsize - currsize - spaces[count - 1];
+
+ /* allocate the space for the new line */
+! newp = alloc(sumsize + 1);
+ cend = newp + sumsize;
+ *cend = 0;
+
+***************
+*** 5880,5886 ****
+ * When there are many leading zeros it could be very long.
+ * Allocate a bit too much.
+ */
+! buf1 = alloc((unsigned)length + NUMBUFLEN);
+ if (buf1 == NULL)
+ goto theend;
+ ptr = buf1;
+--- 5876,5882 ----
+ * When there are many leading zeros it could be very long.
+ * Allocate a bit too much.
+ */
+! buf1 = alloc(length + NUMBUFLEN);
+ if (buf1 == NULL)
+ goto theend;
+ ptr = buf1;
+***************
+*** 6055,6061 ****
+ */
+ if (set_prev)
+ y_previous = y_current;
+! array = (char_u **)alloc((unsigned)(limit * sizeof(char_u *)));
+ str = skipwhite(skiptowhite(str));
+ if (STRNCMP(str, "CHAR", 4) == 0)
+ new_type = MCHAR;
+--- 6051,6057 ----
+ */
+ if (set_prev)
+ y_previous = y_current;
+! array = (char_u **)alloc(limit * sizeof(char_u *));
+ str = skipwhite(skiptowhite(str));
+ if (STRNCMP(str, "CHAR", 4) == 0)
+ new_type = MCHAR;
+***************
+*** 6076,6082 ****
+ if (size == limit)
+ {
+ char_u **new_array = (char_u **)
+! alloc((unsigned)(limit * 2 * sizeof(char_u *)));
+
+ if (new_array == NULL)
+ {
+--- 6072,6078 ----
+ if (size == limit)
+ {
+ char_u **new_array = (char_u **)
+! alloc(limit * 2 * sizeof(char_u *));
+
+ if (new_array == NULL)
+ {
+***************
+*** 6116,6123 ****
+ else
+ {
+ /* Move the lines from array[] to y_array[]. */
+! y_current->y_array =
+! (char_u **)alloc((unsigned)(size * sizeof(char_u *)));
+ for (i = 0; i < size; i++)
+ {
+ if (y_current->y_array == NULL)
+--- 6112,6118 ----
+ else
+ {
+ /* Move the lines from array[] to y_array[]. */
+! y_current->y_array = (char_u **)alloc(size * sizeof(char_u *));
+ for (i = 0; i < size; i++)
+ {
+ if (y_current->y_array == NULL)
+***************
+*** 6214,6220 ****
+ y_ptr->y_array = NULL;
+ return;
+ }
+! y_ptr->y_array = (char_u **)alloc((unsigned)(linecount * sizeof(char_u *)));
+ if (y_ptr->y_array == NULL)
+ {
+ y_ptr->y_size = 0; // ensure object state is consistent
+--- 6209,6215 ----
+ y_ptr->y_array = NULL;
+ return;
+ }
+! y_ptr->y_array = (char_u **)alloc(linecount * sizeof(char_u *));
+ if (y_ptr->y_array == NULL)
+ {
+ y_ptr->y_size = 0; // ensure object state is consistent
+***************
+*** 7145,7151 ****
+ }
+ else
+ extra = 0;
+! s = alloc((unsigned)(i + extra + 1));
+ if (s == NULL)
+ break;
+ if (extra)
+--- 7140,7146 ----
+ }
+ else
+ extra = 0;
+! s = alloc(i + extra + 1);
+ if (s == NULL)
+ break;
+ if (extra)
+*** ../vim-8.1.1383/src/option.c 2019-05-23 17:08:40.824565813 +0200
+--- src/option.c 2019-05-24 18:29:56.039427541 +0200
+***************
+*** 3430,3436 ****
+ cdpath = vim_getenv((char_u *)"CDPATH", &mustfree);
+ if (cdpath != NULL)
+ {
+! buf = alloc((unsigned)((STRLEN(cdpath) << 1) + 2));
+ if (buf != NULL)
+ {
+ buf[0] = ','; /* start with ",", current dir first */
+--- 3430,3436 ----
+ cdpath = vim_getenv((char_u *)"CDPATH", &mustfree);
+ if (cdpath != NULL)
+ {
+! buf = alloc((STRLEN(cdpath) << 1) + 2);
+ if (buf != NULL)
+ {
+ buf[0] = ','; /* start with ",", current dir first */
+***************
+*** 7913,7919 ****
+ wp->w_p_cc_cols = NULL;
+ else
+ {
+! wp->w_p_cc_cols = (int *)alloc((unsigned)sizeof(int) * (count + 1));
+ if (wp->w_p_cc_cols != NULL)
+ {
+ /* sort the columns for faster usage on screen redraw inside
+--- 7913,7919 ----
+ wp->w_p_cc_cols = NULL;
+ else
+ {
+! wp->w_p_cc_cols = (int *)alloc(sizeof(int) * (count + 1));
+ if (wp->w_p_cc_cols != NULL)
+ {
+ /* sort the columns for faster usage on screen redraw inside
+***************
+*** 10053,10060 ****
+ #define INC 20
+ #define GAP 3
+
+! items = (struct vimoption **)alloc((unsigned)(sizeof(struct vimoption *) *
+! PARAM_COUNT));
+ if (items == NULL)
+ return;
+
+--- 10053,10060 ----
+ #define INC 20
+ #define GAP 3
+
+! items = (struct vimoption **)alloc(sizeof(struct vimoption *)
+! * PARAM_COUNT);
+ if (items == NULL)
+ return;
+
+***************
+*** 11941,11947 ****
+ *num_file = num_term;
+ else
+ return OK;
+! *file = (char_u **)alloc((unsigned)(*num_file * sizeof(char_u *)));
+ if (*file == NULL)
+ {
+ *file = (char_u **)"";
+--- 11941,11947 ----
+ *num_file = num_term;
+ else
+ return OK;
+! *file = (char_u **)alloc(*num_file * sizeof(char_u *));
+ if (*file == NULL)
+ {
+ *file = (char_u **)"";
+***************
+*** 11959,11965 ****
+ char_u *buf;
+
+ *num_file = 0;
+! *file = (char_u **)alloc((unsigned)sizeof(char_u *));
+ if (*file == NULL)
+ return FAIL;
+
+--- 11959,11965 ----
+ char_u *buf;
+
+ *num_file = 0;
+! *file = (char_u **)alloc(sizeof(char_u *));
+ if (*file == NULL)
+ return FAIL;
+
+***************
+*** 12822,12828 ****
+ return FALSE;
+ }
+
+! *array = (int *)alloc((unsigned) ((valcount + 1) * sizeof(int)));
+ if (*array == NULL)
+ return FALSE;
+ (*array)[0] = valcount;
+--- 12822,12828 ----
+ return FALSE;
+ }
+
+! *array = (int *)alloc((valcount + 1) * sizeof(int));
+ if (*array == NULL)
+ return FALSE;
+ (*array)[0] = valcount;
+***************
+*** 13045,13051 ****
+
+ if (oldts == NULL)
+ return NULL;
+! newts = (int *)alloc((unsigned)((oldts[0] + 1) * sizeof(int)));
+ if (newts != NULL)
+ for (t = 0; t <= oldts[0]; ++t)
+ newts[t] = oldts[t];
+--- 13045,13051 ----
+
+ if (oldts == NULL)
+ return NULL;
+! newts = (int *)alloc((oldts[0] + 1) * sizeof(int));
+ if (newts != NULL)
+ for (t = 0; t <= oldts[0]; ++t)
+ newts[t] = oldts[t];
+*** ../vim-8.1.1383/src/os_amiga.c 2019-01-24 16:38:58.272712472 +0100
+--- src/os_amiga.c 2019-05-24 18:30:12.755364635 +0200
+***************
+*** 1467,1473 ****
+ {
+ #endif
+ /* hack to replace '*' by '#?' */
+! starbuf = alloc((unsigned)(2 * STRLEN(pat) + 1));
+ if (starbuf == NULL)
+ goto Return;
+ for (sp = pat, dp = starbuf; *sp; ++sp)
+--- 1467,1473 ----
+ {
+ #endif
+ /* hack to replace '*' by '#?' */
+! starbuf = alloc(2 * STRLEN(pat) + 1);
+ if (starbuf == NULL)
+ goto Return;
+ for (sp = pat, dp = starbuf; *sp; ++sp)
+*** ../vim-8.1.1383/src/os_mswin.c 2019-05-09 15:12:45.176723907 +0200
+--- src/os_mswin.c 2019-05-24 18:30:31.887291592 +0200
+***************
+*** 1466,1473 ****
+ char_u *port_name = utf16_to_enc(wport_name, NULL);
+
+ if (printer_name != NULL && port_name != NULL)
+! prt_name = alloc((unsigned)(STRLEN(printer_name)
+! + STRLEN(port_name) + STRLEN(text)));
+ if (prt_name != NULL)
+ wsprintf((char *)prt_name, (const char *)text,
+ printer_name, port_name);
+--- 1466,1473 ----
+ char_u *port_name = utf16_to_enc(wport_name, NULL);
+
+ if (printer_name != NULL && port_name != NULL)
+! prt_name = alloc(STRLEN(printer_name)
+! + STRLEN(port_name) + STRLEN(text));
+ if (prt_name != NULL)
+ wsprintf((char *)prt_name, (const char *)text,
+ printer_name, port_name);
+***************
+*** 2111,2117 ****
+ char *err = _(e_invexprmsg);
+ size_t len = STRLEN(str) + STRLEN(err) + 5;
+
+! res = alloc((unsigned)len);
+ if (res != NULL)
+ vim_snprintf((char *)res, len, "%s: \"%s\"", err, str);
+ reply.dwData = COPYDATA_ERROR_RESULT;
+--- 2111,2117 ----
+ char *err = _(e_invexprmsg);
+ size_t len = STRLEN(str) + STRLEN(err) + 5;
+
+! res = alloc(len);
+ if (res != NULL)
+ vim_snprintf((char *)res, len, "%s: \"%s\"", err, str);
+ reply.dwData = COPYDATA_ERROR_RESULT;
+***************
+*** 2340,2346 ****
+ char_u *p;
+
+ /* Leave enough space for a 9-digit suffix to ensure uniqueness! */
+! ok_name = alloc((unsigned)STRLEN(name) + 10);
+
+ STRCPY(ok_name, name);
+ p = ok_name + STRLEN(name);
+--- 2340,2346 ----
+ char_u *p;
+
+ /* Leave enough space for a 9-digit suffix to ensure uniqueness! */
+! ok_name = alloc(STRLEN(name) + 10);
+
+ STRCPY(ok_name, name);
+ p = ok_name + STRLEN(name);
+*** ../vim-8.1.1383/src/os_unix.c 2019-05-09 18:59:27.228463605 +0200
+--- src/os_unix.c 2019-05-24 18:30:50.731218535 +0200
+***************
+*** 2447,2453 ****
+ #endif
+
+ /*
+! * Get name of current directory into buffer 'buf' of length 'len' bytes.
+ * Return OK for success, FAIL for failure.
+ */
+ int
+--- 2447,2454 ----
+ #endif
+
+ /*
+! * Get name of current directory into buffer "buf" of length "len" bytes.
+! * "len" must be at least PATH_MAX.
+ * Return OK for success, FAIL for failure.
+ */
+ int
+***************
+*** 2516,2522 ****
+ {
+ /*
+ * If the file name has a path, change to that directory for a moment,
+! * and then do the getwd() (and get back to where we were).
+ * This will get the correct path name with "../" things.
+ */
+ if (p != NULL)
+--- 2517,2523 ----
+ {
+ /*
+ * If the file name has a path, change to that directory for a moment,
+! * and then get the directory (and get back to where we were).
+ * This will get the correct path name with "../" things.
+ */
+ if (p != NULL)
+***************
+*** 3124,3130 ****
+ p = (char_u *)getenv("PATH");
+ if (p == NULL || *p == NUL)
+ return -1;
+! buf = alloc((unsigned)(STRLEN(name) + STRLEN(p) + 2));
+ if (buf == NULL)
+ return -1;
+
+--- 3125,3131 ----
+ p = (char_u *)getenv("PATH");
+ if (p == NULL || *p == NUL)
+ return -1;
+! buf = alloc(STRLEN(name) + STRLEN(p) + 2);
+ if (buf == NULL)
+ return -1;
+
+***************
+*** 4323,4329 ****
+
+ /* Break 'shellcmdflag' into white separated parts. This doesn't
+ * handle quoted strings, they are very unlikely to appear. */
+! *shcf_tofree = alloc((unsigned)STRLEN(p_shcf) + 1);
+ if (*shcf_tofree == NULL) /* out of memory */
+ return FAIL;
+ s = *shcf_tofree;
+--- 4324,4330 ----
+
+ /* Break 'shellcmdflag' into white separated parts. This doesn't
+ * handle quoted strings, they are very unlikely to appear. */
+! *shcf_tofree = alloc(STRLEN(p_shcf) + 1);
+ if (*shcf_tofree == NULL) /* out of memory */
+ return FAIL;
+ s = *shcf_tofree;
+***************
+*** 6899,6905 ****
+ && !mch_can_exe((*file)[i], NULL, !(flags & EW_SHELLCMD)))
+ continue;
+
+! p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir));
+ if (p)
+ {
+ STRCPY(p, (*file)[i]);
+--- 6900,6906 ----
+ && !mch_can_exe((*file)[i], NULL, !(flags & EW_SHELLCMD)))
+ continue;
+
+! p = alloc(STRLEN((*file)[i]) + 1 + dir);
+ if (p)
+ {
+ STRCPY(p, (*file)[i]);
+*** ../vim-8.1.1383/src/os_vms.c 2018-04-23 20:39:51.000000000 +0200
+--- src/os_vms.c 2019-05-24 18:31:05.687159822 +0200
+***************
+*** 238,244 ****
+ if (sys$trnlnm(&attrib, &d_file_dev, &d_lognam, NULL,&itmlst) == SS$_NORMAL)
+ {
+ buffer[lengte] = '\0';
+! if (cp = (char_u *)alloc((unsigned)(lengte+1)))
+ strcpy((char *)cp, buffer);
+ return(cp);
+ }
+--- 238,244 ----
+ if (sys$trnlnm(&attrib, &d_file_dev, &d_lognam, NULL,&itmlst) == SS$_NORMAL)
+ {
+ buffer[lengte] = '\0';
+! if (cp = (char_u *)alloc(lengte + 1))
+ strcpy((char *)cp, buffer);
+ return(cp);
+ }
+*** ../vim-8.1.1383/src/os_win32.c 2019-05-24 13:32:33.148376324 +0200
+--- src/os_win32.c 2019-05-24 18:31:46.874994828 +0200
+***************
+*** 2075,2082 ****
+ return FALSE;
+
+ wcurpath = _wgetenv(L"PATH");
+! wnewpath = (WCHAR*)alloc((unsigned)(wcslen(wcurpath) + 3)
+! * sizeof(WCHAR));
+ if (wnewpath == NULL)
+ return FALSE;
+ wcscpy(wnewpath, L".;");
+--- 2075,2081 ----
+ return FALSE;
+
+ wcurpath = _wgetenv(L"PATH");
+! wnewpath = (WCHAR *)alloc((wcslen(wcurpath) + 3) * sizeof(WCHAR));
+ if (wnewpath == NULL)
+ return FALSE;
+ wcscpy(wnewpath, L".;");
+***************
+*** 7205,7211 ****
+ char_u *envbuf;
+ WCHAR *p;
+
+! envbuf = alloc((unsigned)(STRLEN(var) + STRLEN(value) + 2));
+ if (envbuf == NULL)
+ return -1;
+
+--- 7204,7210 ----
+ char_u *envbuf;
+ WCHAR *p;
+
+! envbuf = alloc(STRLEN(var) + STRLEN(value) + 2);
+ if (envbuf == NULL)
+ return -1;
+
+*** ../vim-8.1.1383/src/quickfix.c 2019-05-09 21:48:29.033295465 +0200
+--- src/quickfix.c 2019-05-24 18:32:11.446894295 +0200
+***************
+*** 1346,1352 ****
+ if (*fields->errmsg && !qfl->qf_multiignore)
+ {
+ len = (int)STRLEN(qfprev->qf_text);
+! if ((ptr = alloc((unsigned)(len + STRLEN(fields->errmsg) + 2)))
+ == NULL)
+ return QF_FAIL;
+ STRCPY(ptr, qfprev->qf_text);
+--- 1346,1352 ----
+ if (*fields->errmsg && !qfl->qf_multiignore)
+ {
+ len = (int)STRLEN(qfprev->qf_text);
+! if ((ptr = alloc(len + STRLEN(fields->errmsg) + 2))
+ == NULL)
+ return QF_FAIL;
+ STRCPY(ptr, qfprev->qf_text);
+***************
+*** 1890,1896 ****
+ {
+ qf_delq_T *q;
+
+! q = (qf_delq_T *)alloc((unsigned)sizeof(qf_delq_T));
+ if (q != NULL)
+ {
+ q->qi = qi;
+--- 1890,1896 ----
+ {
+ qf_delq_T *q;
+
+! q = (qf_delq_T *)alloc(sizeof(qf_delq_T));
+ if (q != NULL)
+ {
+ q->qi = qi;
+***************
+*** 2063,2069 ****
+ qfline_T *qfp;
+ qfline_T **lastp; // pointer to qf_last or NULL
+
+! if ((qfp = (qfline_T *)alloc((unsigned)sizeof(qfline_T))) == NULL)
+ return QF_FAIL;
+ if (bufnum != 0)
+ {
+--- 2063,2069 ----
+ qfline_T *qfp;
+ qfline_T **lastp; // pointer to qf_last or NULL
+
+! if ((qfp = (qfline_T *)alloc(sizeof(qfline_T))) == NULL)
+ return QF_FAIL;
+ if (bufnum != 0)
+ {
+***************
+*** 2429,2435 ****
+ 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;
+
+--- 2429,2435 ----
+ struct dir_stack_T *ds_ptr;
+
+ // allocate new stack element and hook it in
+! ds_new = (struct dir_stack_T *)alloc(sizeof(struct dir_stack_T));
+ if (ds_new == NULL)
+ return NULL;
+
+***************
+*** 4707,4713 ****
+ else
+ off += 19;
+
+! name = alloc((unsigned)STRLEN(p_mef) + 30);
+ if (name == NULL)
+ break;
+ STRCPY(name, p_mef);
+--- 4707,4713 ----
+ else
+ off += 19;
+
+! name = alloc(STRLEN(p_mef) + 30);
+ if (name == NULL)
+ break;
+ STRCPY(name, p_mef);
+*** ../vim-8.1.1383/src/regexp.c 2019-05-11 18:28:41.351611622 +0200
+--- src/regexp.c 2019-05-24 18:32:23.502844410 +0200
+***************
+*** 7145,7151 ****
+ {
+ /* length = len(newsub) - 1 + len(prev_sub) + 1 */
+ prevlen = (int)STRLEN(reg_prev_sub);
+! tmpsub = alloc((unsigned)(STRLEN(newsub) + prevlen));
+ if (tmpsub != NULL)
+ {
+ /* copy prefix */
+--- 7145,7151 ----
+ {
+ /* length = len(newsub) - 1 + len(prev_sub) + 1 */
+ prevlen = (int)STRLEN(reg_prev_sub);
+! tmpsub = alloc(STRLEN(newsub) + prevlen);
+ if (tmpsub != NULL)
+ {
+ /* copy prefix */
+*** ../vim-8.1.1383/src/screen.c 2019-05-17 13:05:03.795770160 +0200
+--- src/screen.c 2019-05-24 18:32:45.106754126 +0200
+***************
+*** 4948,4954 ****
+ if (n_extra > 0)
+ len += n_extra - tab_len;
+ c = lcs_tab1;
+! p = alloc((unsigned)(len + 1));
+ vim_memset(p, ' ', len);
+ p[len] = NUL;
+ vim_free(p_extra_free);
+--- 4948,4954 ----
+ if (n_extra > 0)
+ len += n_extra - tab_len;
+ c = lcs_tab1;
+! p = alloc(len + 1);
+ vim_memset(p, ' ', len);
+ p[len] = NUL;
+ vim_free(p_extra_free);
+***************
+*** 5107,5113 ****
+ char_u *p;
+
+ c = *p_extra;
+! p = alloc((unsigned)n_extra + 1);
+ vim_memset(p, ' ', n_extra);
+ STRNCPY(p, p_extra + 1, STRLEN(p_extra) - 1);
+ p[n_extra] = NUL;
+--- 5107,5113 ----
+ char_u *p;
+
+ c = *p_extra;
+! p = alloc(n_extra + 1);
+ vim_memset(p, ' ', n_extra);
+ STRNCPY(p, p_extra + 1, STRLEN(p_extra) - 1);
+ p[n_extra] = NUL;
+***************
+*** 6680,6688 ****
+ return;
+
+ if (has_mbyte)
+! buf = alloc((unsigned)Columns * MB_MAXBYTES + 1);
+ else
+! buf = alloc((unsigned)Columns + 1);
+ if (buf == NULL)
+ return;
+
+--- 6680,6688 ----
+ return;
+
+ if (has_mbyte)
+! buf = alloc(Columns * MB_MAXBYTES + 1);
+ else
+! buf = alloc(Columns + 1);
+ if (buf == NULL)
+ return;
+
+*** ../vim-8.1.1383/src/spell.c 2019-05-23 21:35:44.459922615 +0200
+--- src/spell.c 2019-05-24 18:33:22.506595221 +0200
+***************
+*** 2083,2089 ****
+ hi = hash_lookup(&lp->sl_wordcount, p, hash);
+ if (HASHITEM_EMPTY(hi))
+ {
+! wc = (wordcount_T *)alloc((unsigned)(sizeof(wordcount_T) + STRLEN(p)));
+ if (wc == NULL)
+ return;
+ STRCPY(wc->wc_word, p);
+--- 2083,2089 ----
+ hi = hash_lookup(&lp->sl_wordcount, p, hash);
+ if (HASHITEM_EMPTY(hi))
+ {
+! wc = (wordcount_T *)alloc(sizeof(wordcount_T) + STRLEN(p));
+ if (wc == NULL)
+ return;
+ STRCPY(wc->wc_word, p);
+***************
+*** 3432,3439 ****
+ }
+
+ /* Replace the word. */
+! p = alloc((unsigned)STRLEN(line) - stp->st_orglen
+! + stp->st_wordlen + 1);
+ if (p != NULL)
+ {
+ c = (int)(sug.su_badptr - line);
+--- 3432,3438 ----
+ }
+
+ /* Replace the word. */
+! p = alloc(STRLEN(line) - stp->st_orglen + stp->st_wordlen + 1);
+ if (p != NULL)
+ {
+ c = (int)(sug.su_badptr - line);
+***************
+*** 3552,3558 ****
+ }
+ addlen = (int)(STRLEN(repl_to) - STRLEN(repl_from));
+
+! frompat = alloc((unsigned)STRLEN(repl_from) + 7);
+ if (frompat == NULL)
+ return;
+ sprintf((char *)frompat, "\\V\\<%s\\>", repl_from);
+--- 3551,3557 ----
+ }
+ addlen = (int)(STRLEN(repl_to) - STRLEN(repl_from));
+
+! frompat = alloc(STRLEN(repl_from) + 7);
+ if (frompat == NULL)
+ return;
+ sprintf((char *)frompat, "\\V\\<%s\\>", repl_from);
+***************
+*** 3573,3579 ****
+ if (addlen <= 0 || STRNCMP(line + curwin->w_cursor.col,
+ repl_to, STRLEN(repl_to)) != 0)
+ {
+! p = alloc((unsigned)STRLEN(line) + addlen + 1);
+ if (p == NULL)
+ break;
+ mch_memmove(p, line, curwin->w_cursor.col);
+--- 3572,3578 ----
+ if (addlen <= 0 || STRNCMP(line + curwin->w_cursor.col,
+ repl_to, STRLEN(repl_to)) != 0)
+ {
+! p = alloc(STRLEN(line) + addlen + 1);
+ if (p == NULL)
+ break;
+ mch_memmove(p, line, curwin->w_cursor.col);
+***************
+*** 6224,6231 ****
+ hi = hash_lookup(&slang->sl_sounddone, goodword, hash);
+ if (HASHITEM_EMPTY(hi))
+ {
+! sft = (sftword_T *)alloc((unsigned)(sizeof(sftword_T)
+! + STRLEN(goodword)));
+ if (sft != NULL)
+ {
+ sft->sft_score = score;
+--- 6223,6229 ----
+ hi = hash_lookup(&slang->sl_sounddone, goodword, hash);
+ if (HASHITEM_EMPTY(hi))
+ {
+! sft = (sftword_T *)alloc(sizeof(sftword_T) + STRLEN(goodword));
+ if (sft != NULL)
+ {
+ sft->sft_score = score;
+*** ../vim-8.1.1383/src/spellfile.c 2019-05-23 21:35:44.459922615 +0200
+--- src/spellfile.c 2019-05-24 18:34:23.734328606 +0200
+***************
+*** 1264,1270 ****
+ c = todo * 2 + 7;
+ if (enc_utf8)
+ c += todo * 2;
+! pat = alloc((unsigned)c);
+ if (pat == NULL)
+ return SP_OTHERERROR;
+
+--- 1264,1270 ----
+ c = todo * 2 + 7;
+ if (enc_utf8)
+ c += todo * 2;
+! pat = alloc(c);
+ if (pat == NULL)
+ return SP_OTHERERROR;
+
+***************
+*** 6615,6621 ****
+ hash_T hash;
+ hashitem_T *hi;
+
+! b = alloc((unsigned)(cl + headcl + 2));
+ if (b == NULL)
+ return;
+ mb_char2bytes(c, b);
+--- 6615,6621 ----
+ hash_T hash;
+ hashitem_T *hi;
+
+! b = alloc(cl + headcl + 2);
+ if (b == NULL)
+ return;
+ mb_char2bytes(c, b);
+*** ../vim-8.1.1383/src/syntax.c 2019-05-09 19:26:34.132388790 +0200
+--- src/syntax.c 2019-05-24 18:35:02.090157843 +0200
+***************
+*** 4757,4763 ****
+ if (curwin->w_s->b_syn_topgrp >= SYNID_CLUSTER)
+ {
+ /* We have to alloc this, because syn_combine_list() will free it. */
+! short *grp_list = (short *)alloc((unsigned)(2 * sizeof(short)));
+ int tlg_id = curwin->w_s->b_syn_topgrp - SYNID_CLUSTER;
+
+ if (grp_list != NULL)
+--- 4757,4763 ----
+ if (curwin->w_s->b_syn_topgrp >= SYNID_CLUSTER)
+ {
+ /* We have to alloc this, because syn_combine_list() will free it. */
+! short *grp_list = (short *)alloc(2 * sizeof(short));
+ int tlg_id = curwin->w_s->b_syn_topgrp - SYNID_CLUSTER;
+
+ if (grp_list != NULL)
+***************
+*** 4872,4878 ****
+ syn_id = syn_check_group(arg, (int)(group_name_end - arg));
+ if (syn_id != 0)
+ /* allocate a buffer, for removing backslashes in the keyword */
+! keyword_copy = alloc((unsigned)STRLEN(rest) + 1);
+ if (keyword_copy != NULL)
+ {
+ syn_opt_arg.flags = 0;
+--- 4872,4878 ----
+ syn_id = syn_check_group(arg, (int)(group_name_end - arg));
+ if (syn_id != 0)
+ /* allocate a buffer, for removing backslashes in the keyword */
+! keyword_copy = alloc(STRLEN(rest) + 1);
+ if (keyword_copy != NULL)
+ {
+ syn_opt_arg.flags = 0;
+***************
+*** 5208,5214 ****
+ * syn_patterns for this item, at the start (because the list is
+ * used from end to start).
+ */
+! ppp = (struct pat_ptr *)alloc((unsigned)sizeof(struct pat_ptr));
+ if (ppp == NULL)
+ {
+ rest = NULL;
+--- 5208,5214 ----
+ * syn_patterns for this item, at the start (because the list is
+ * used from end to start).
+ */
+! ppp = (struct pat_ptr *)alloc(sizeof(struct pat_ptr));
+ if (ppp == NULL)
+ {
+ rest = NULL;
+***************
+*** 5465,5471 ****
+ clstr = NULL;
+ break;
+ }
+! clstr = (short *)alloc((unsigned)((count + 1) * sizeof(short)));
+ if (clstr == NULL)
+ break;
+ clstr[count] = 0;
+--- 5465,5471 ----
+ clstr = NULL;
+ break;
+ }
+! clstr = (short *)alloc((count + 1) * sizeof(short));
+ if (clstr == NULL)
+ break;
+ clstr[count] = 0;
+***************
+*** 6124,6130 ****
+ break;
+ if (round == 1)
+ {
+! retval = (short *)alloc((unsigned)((count + 1) * sizeof(short)));
+ if (retval == NULL)
+ break;
+ retval[count] = 0; /* zero means end of the list */
+--- 6124,6130 ----
+ break;
+ if (round == 1)
+ {
+! retval = (short *)alloc((count + 1) * sizeof(short));
+ if (retval == NULL)
+ break;
+ retval[count] = 0; /* zero means end of the list */
+***************
+*** 6163,6169 ****
+ for (count = 0; list[count]; ++count)
+ ;
+ len = (count + 1) * sizeof(short);
+! retval = (short *)alloc((unsigned)len);
+ if (retval != NULL)
+ mch_memmove(retval, list, (size_t)len);
+
+--- 6163,6169 ----
+ for (count = 0; list[count]; ++count)
+ ;
+ len = (count + 1) * sizeof(short);
+! retval = (short *)alloc(len);
+ if (retval != NULL)
+ mch_memmove(retval, list, (size_t)len);
+
+***************
+*** 7167,7173 ****
+ return OK;
+
+ recursive = TRUE;
+! buf = alloc((unsigned)(STRLEN(name) + 12));
+ if (buf != NULL)
+ {
+ apply_autocmds(EVENT_COLORSCHEMEPRE, name,
+--- 7167,7173 ----
+ return OK;
+
+ recursive = TRUE;
+! buf = alloc(STRLEN(name) + 12);
+ if (buf != NULL)
+ {
+ apply_autocmds(EVENT_COLORSCHEMEPRE, name,
+*** ../vim-8.1.1383/src/term.c 2019-05-11 21:38:54.076825521 +0200
+--- src/term.c 2019-05-24 18:35:17.846086915 +0200
+***************
+*** 6165,6171 ****
+ * Allocate space for the translation. Worst case a single character is
+ * replaced by 6 bytes (shifted special key), plus a NUL at the end.
+ */
+! result = alloc((unsigned)STRLEN(from) * 6 + 1);
+ if (result == NULL) /* out of memory */
+ {
+ *bufp = NULL;
+--- 6165,6171 ----
+ * Allocate space for the translation. Worst case a single character is
+ * replaced by 6 bytes (shifted special key), plus a NUL at the end.
+ */
+! result = alloc(STRLEN(from) * 6 + 1);
+ if (result == NULL) /* out of memory */
+ {
+ *bufp = NULL;
+***************
+*** 6420,6426 ****
+
+ if (tc_len == 0) /* no terminal codes (must be GUI) */
+ return;
+! items = (int *)alloc((unsigned)(sizeof(int) * tc_len));
+ if (items == NULL)
+ return;
+
+--- 6420,6426 ----
+
+ if (tc_len == 0) /* no terminal codes (must be GUI) */
+ return;
+! items = (int *)alloc(sizeof(int) * tc_len);
+ if (items == NULL)
+ return;
+
+*** ../vim-8.1.1383/src/undo.c 2019-05-11 13:09:39.131391135 +0200
+--- src/undo.c 2019-05-24 18:35:35.814005483 +0200
+***************
+*** 367,372 ****
+--- 367,374 ----
+ }
+ else
+ {
++ // This uses the length in the memline, thus text properties are
++ // included.
+ ul->ul_len = curbuf->b_ml.ml_line_len;
+ ul->ul_line = vim_memsave(line, ul->ul_len);
+ }
+***************
+*** 1121,1127 ****
+ static char_u *
+ read_string_decrypt(bufinfo_T *bi, int len)
+ {
+! char_u *ptr = alloc((unsigned)len + 1);
+
+ if (ptr != NULL)
+ {
+--- 1123,1129 ----
+ static char_u *
+ read_string_decrypt(bufinfo_T *bi, int len)
+ {
+! char_u *ptr = alloc(len + 1);
+
+ if (ptr != NULL)
+ {
+***************
+*** 2689,2695 ****
+ char_u *p = ml_get(top + 1 + i);
+
+ if (curbuf->b_ml.ml_line_len != uep->ue_array[i].ul_len
+! || memcmp(uep->ue_array[i].ul_line, p, curbuf->b_ml.ml_line_len) != 0)
+ break;
+ }
+ if (i == newsize && newlnum == MAXLNUM && uep->ue_next == NULL)
+--- 2691,2698 ----
+ char_u *p = ml_get(top + 1 + i);
+
+ if (curbuf->b_ml.ml_line_len != uep->ue_array[i].ul_len
+! || memcmp(uep->ue_array[i].ul_line, p,
+! curbuf->b_ml.ml_line_len) != 0)
+ break;
+ }
+ if (i == newsize && newlnum == MAXLNUM && uep->ue_next == NULL)
+***************
+*** 2750,2758 ****
+ // If the file is empty, there is an empty line 1 that we
+ // should get rid of, by replacing it with the new line.
+ if (empty_buffer && lnum == 0)
+! ml_replace_len((linenr_T)1, uep->ue_array[i].ul_line, uep->ue_array[i].ul_len, TRUE, TRUE);
+ else
+! ml_append(lnum, uep->ue_array[i].ul_line, (colnr_T)uep->ue_array[i].ul_len, FALSE);
+ vim_free(uep->ue_array[i].ul_line);
+ }
+ vim_free((char_u *)uep->ue_array);
+--- 2753,2763 ----
+ // If the file is empty, there is an empty line 1 that we
+ // should get rid of, by replacing it with the new line.
+ if (empty_buffer && lnum == 0)
+! ml_replace_len((linenr_T)1, uep->ue_array[i].ul_line,
+! uep->ue_array[i].ul_len, TRUE, TRUE);
+ else
+! ml_append(lnum, uep->ue_array[i].ul_line,
+! (colnr_T)uep->ue_array[i].ul_len, FALSE);
+ vim_free(uep->ue_array[i].ul_line);
+ }
+ vim_free((char_u *)uep->ue_array);
+*** ../vim-8.1.1383/src/usercmd.c 2019-05-04 14:05:05.210240329 +0200
+--- src/usercmd.c 2019-05-24 18:35:50.509938477 +0200
+***************
+*** 1637,1643 ****
+ }
+
+ totlen += STRLEN(p); // Add on the trailing characters
+! buf = alloc((unsigned)(totlen + 1));
+ if (buf == NULL)
+ {
+ vim_free(split_buf);
+--- 1637,1643 ----
+ }
+
+ totlen += STRLEN(p); // Add on the trailing characters
+! buf = alloc(totlen + 1);
+ if (buf == NULL)
+ {
+ vim_free(split_buf);
+*** ../vim-8.1.1383/src/userfunc.c 2019-05-19 21:37:14.189063500 +0200
+--- src/userfunc.c 2019-05-24 18:36:15.301824670 +0200
+***************
+*** 557,563 ****
+ }
+ else
+ {
+! fname = alloc((unsigned)(i + STRLEN(name + llen) + 1));
+ if (fname == NULL)
+ *error = ERROR_OTHER;
+ else
+--- 557,563 ----
+ }
+ else
+ {
+! fname = alloc(i + STRLEN(name + llen) + 1);
+ if (fname == NULL)
+ *error = ERROR_OTHER;
+ else
+***************
+*** 978,984 ****
+ /* need space for function name + ("function " + 3) or "[number]" */
+ len = (save_sourcing_name == NULL ? 0 : STRLEN(save_sourcing_name))
+ + STRLEN(fp->uf_name) + 20;
+! sourcing_name = alloc((unsigned)len);
+ if (sourcing_name != NULL)
+ {
+ if (save_sourcing_name != NULL
+--- 978,984 ----
+ /* need space for function name + ("function " + 3) or "[number]" */
+ len = (save_sourcing_name == NULL ? 0 : STRLEN(save_sourcing_name))
+ + STRLEN(fp->uf_name) + 20;
+! sourcing_name = alloc(len);
+ if (sourcing_name != NULL)
+ {
+ if (save_sourcing_name != NULL
+***************
+*** 1932,1938 ****
+ }
+ }
+
+! name = alloc((unsigned)(len + lead + 1));
+ if (name != NULL)
+ {
+ if (lead > 0)
+--- 1932,1938 ----
+ }
+ }
+
+! name = alloc(len + lead + 1);
+ if (name != NULL)
+ {
+ if (lead > 0)
+***************
+*** 2787,2793 ****
+ if (todo == 0)
+ return; /* nothing to dump */
+
+! sorttab = (ufunc_T **)alloc((unsigned)(sizeof(ufunc_T *) * todo));
+
+ for (hi = func_hashtab.ht_array; todo > 0; ++hi)
+ {
+--- 2787,2793 ----
+ if (todo == 0)
+ return; /* nothing to dump */
+
+! sorttab = (ufunc_T **)alloc(sizeof(ufunc_T *) * todo);
+
+ for (hi = func_hashtab.ht_array; todo > 0; ++hi)
+ {
+*** ../vim-8.1.1383/src/version.c 2019-05-24 17:55:47.511425702 +0200
+--- src/version.c 2019-05-24 18:39:19.684951278 +0200
+***************
+*** 61,67 ****
+ + strlen(VIM_VERSION_DATE_ONLY)
+ + strlen(date_time);
+
+! longVersion = (char *)alloc((unsigned)len);
+ if (longVersion == NULL)
+ longVersion = VIM_VERSION_LONG;
+ else
+--- 61,67 ----
+ + strlen(VIM_VERSION_DATE_ONLY)
+ + strlen(date_time);
+
+! longVersion = (char *)alloc(len);
+ if (longVersion == NULL)
+ longVersion = VIM_VERSION_LONG;
+ else
+*** ../vim-8.1.1383/src/winclip.c 2019-02-27 14:11:56.977675599 +0100
+--- src/winclip.c 2019-05-24 18:37:01.665609331 +0200
+***************
+*** 169,175 ****
+ {
+ *outlen = WideCharToMultiByte(cp, flags, in, inlen, NULL, 0, def, useddef);
+ /* Add one one byte to avoid a zero-length alloc(). */
+! *out = (LPSTR)alloc((unsigned)*outlen + 1);
+ if (*out != NULL)
+ {
+ WideCharToMultiByte(cp, flags, in, inlen, *out, *outlen, def, useddef);
+--- 169,175 ----
+ {
+ *outlen = WideCharToMultiByte(cp, flags, in, inlen, NULL, 0, def, useddef);
+ /* Add one one byte to avoid a zero-length alloc(). */
+! *out = (LPSTR)alloc(*outlen + 1);
+ if (*out != NULL)
+ {
+ WideCharToMultiByte(cp, flags, in, inlen, *out, *outlen, def, useddef);
+***************
+*** 512,519 ****
+ metadata.txtlen = WideCharToMultiByte(GetACP(), 0, out, len,
+ NULL, 0, 0, 0);
+ vim_free(str);
+! str = (char_u *)alloc((unsigned)(metadata.txtlen == 0 ? 1
+! : metadata.txtlen));
+ if (str == NULL)
+ {
+ vim_free(out);
+--- 512,518 ----
+ metadata.txtlen = WideCharToMultiByte(GetACP(), 0, out, len,
+ NULL, 0, 0, 0);
+ vim_free(str);
+! str = (char_u *)alloc(metadata.txtlen == 0 ? 1 : metadata.txtlen);
+ if (str == NULL)
+ {
+ vim_free(out);
+***************
+*** 655,661 ****
+ convert_setup(&conv, NULL, NULL);
+
+ length = utf8_to_utf16(str, *lenp, NULL, NULL);
+! ret = (WCHAR *)alloc((unsigned)((length + 1) * sizeof(WCHAR)));
+ if (ret != NULL)
+ {
+ utf8_to_utf16(str, *lenp, (short_u *)ret, NULL);
+--- 654,660 ----
+ convert_setup(&conv, NULL, NULL);
+
+ length = utf8_to_utf16(str, *lenp, NULL, NULL);
+! ret = (WCHAR *)alloc((length + 1) * sizeof(WCHAR));
+ if (ret != NULL)
+ {
+ utf8_to_utf16(str, *lenp, (short_u *)ret, NULL);
+*** ../vim-8.1.1383/src/version.c 2019-05-24 17:55:47.511425702 +0200
+--- src/version.c 2019-05-24 18:39:19.684951278 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1384,
+ /**/
+
+--
+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.1385 b/data/vim/patches/8.1.1385
new file mode 100644
index 000000000..9b75c43fc
--- /dev/null
+++ b/data/vim/patches/8.1.1385
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1385
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1385
+Problem: Signed/unsigned compiler warning.
+Solution: Use STRLEN() instead of strlen().
+Files: src/fileio.c
+
+
+*** ../vim-8.1.1384/src/fileio.c 2019-05-24 18:48:36.758128504 +0200
+--- src/fileio.c 2019-05-24 18:56:31.215621969 +0200
+***************
+*** 7198,7204 ****
+ if (buf == NULL)
+ return FAIL;
+ STRNCPY(buf, path, MAXPATHL-5);
+! p = buf + strlen(buf);
+ MB_PTR_BACK(buf, p);
+ if (*p == '\\' || *p == '/')
+ *p = NUL;
+--- 7198,7204 ----
+ if (buf == NULL)
+ return FAIL;
+ STRNCPY(buf, path, MAXPATHL-5);
+! p = buf + STRLEN(buf);
+ MB_PTR_BACK(buf, p);
+ if (*p == '\\' || *p == '/')
+ *p = NUL;
+*** ../vim-8.1.1384/src/version.c 2019-05-24 18:48:36.774128421 +0200
+--- src/version.c 2019-05-24 19:03:08.545381572 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1385,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+15. Five days in advance, tell your friends you can't attend their
+ party because you're not in the mood.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1386 b/data/vim/patches/8.1.1386
new file mode 100644
index 000000000..e62ec8028
--- /dev/null
+++ b/data/vim/patches/8.1.1386
@@ -0,0 +1,1872 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1386
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1386
+Problem: Unessesary type casts for lalloc().
+Solution: Remove type casts. Change lalloc(size, TRUE) to alloc(size).
+Files: src/buffer.c, src/change.c, src/channel.c, src/diff.c, src/edit.c,
+ src/eval.c, src/ex_cmds.c, src/ex_getln.c, src/fileio.c,
+ src/getchar.c, src/gui_mac.c, src/insexpand.c, src/gui_w32.c,
+ src/gui_x11.c, src/menu.c, src/netbeans.c, src/ops.c,
+ src/os_mswin.c, src/os_amiga.c, src/os_qnx.c, src/os_unix.c,
+ src/os_win32.c, src/popupmnu.c, src/quickfix.c, src/regexp.c,
+ src/regexp_nfa.c, src/screen.c, src/search.c, src/sign.c,
+ src/spell.c, src/spellfile.c, src/syntax.c, src/tag.c,
+ src/terminal.c, src/textprop.c, src/ui.c, src/undo.c,
+ src/userfunc.c, src/winclip.c, src/window.c
+
+
+*** ../vim-8.1.1385/src/buffer.c 2019-05-24 18:48:36.750128544 +0200
+--- src/buffer.c 2019-05-24 19:28:49.952814515 +0200
+***************
+*** 1958,1964 ****
+ }
+ if (buf != curbuf || curbuf == NULL)
+ {
+! buf = (buf_T *)alloc_clear((unsigned)sizeof(buf_T));
+ if (buf == NULL)
+ {
+ vim_free(ffname);
+--- 1958,1964 ----
+ }
+ if (buf != curbuf || curbuf == NULL)
+ {
+! buf = (buf_T *)alloc_clear(sizeof(buf_T));
+ if (buf == NULL)
+ {
+ vim_free(ffname);
+***************
+*** 1985,1991 ****
+ }
+
+ clear_wininfo(buf);
+! buf->b_wininfo = (wininfo_T *)alloc_clear((unsigned)sizeof(wininfo_T));
+
+ if ((ffname != NULL && (buf->b_ffname == NULL || buf->b_sfname == NULL))
+ || buf->b_wininfo == NULL)
+--- 1985,1991 ----
+ }
+
+ clear_wininfo(buf);
+! buf->b_wininfo = (wininfo_T *)alloc_clear(sizeof(wininfo_T));
+
+ if ((ffname != NULL && (buf->b_ffname == NULL || buf->b_sfname == NULL))
+ || buf->b_wininfo == NULL)
+***************
+*** 2771,2777 ****
+ if (wip == NULL)
+ {
+ /* allocate a new entry */
+! wip = (wininfo_T *)alloc_clear((unsigned)sizeof(wininfo_T));
+ if (wip == NULL)
+ return;
+ wip->wi_win = win;
+--- 2771,2777 ----
+ if (wip == NULL)
+ {
+ /* allocate a new entry */
+! wip = (wininfo_T *)alloc_clear(sizeof(wininfo_T));
+ if (wip == NULL)
+ return;
+ wip->wi_win = win;
+***************
+*** 4911,4917 ****
+ setpcmark();
+
+ opened_len = ARGCOUNT;
+! opened = alloc_clear((unsigned)opened_len);
+ if (opened == NULL)
+ return;
+
+--- 4911,4917 ----
+ setpcmark();
+
+ opened_len = ARGCOUNT;
+! opened = alloc_clear(opened_len);
+ if (opened == NULL)
+ return;
+
+*** ../vim-8.1.1385/src/change.c 2019-05-24 18:48:36.746128566 +0200
+--- src/change.c 2019-05-24 19:29:13.808683462 +0200
+***************
+*** 282,288 ****
+ return;
+ }
+
+! lnr = (listener_T *)alloc_clear((sizeof(listener_T)));
+ if (lnr == NULL)
+ {
+ free_callback(callback, partial);
+--- 282,288 ----
+ return;
+ }
+
+! lnr = (listener_T *)alloc_clear(sizeof(listener_T));
+ if (lnr == NULL)
+ {
+ free_callback(callback, partial);
+*** ../vim-8.1.1385/src/channel.c 2019-05-24 18:48:36.750128544 +0200
+--- src/channel.c 2019-05-24 19:29:27.016610892 +0200
+***************
+*** 294,300 ****
+ add_channel(void)
+ {
+ ch_part_T part;
+! channel_T *channel = (channel_T *)alloc_clear((int)sizeof(channel_T));
+
+ if (channel == NULL)
+ return NULL;
+--- 294,300 ----
+ add_channel(void)
+ {
+ ch_part_T part;
+! channel_T *channel = (channel_T *)alloc_clear(sizeof(channel_T));
+
+ if (channel == NULL)
+ return NULL;
+***************
+*** 1728,1734 ****
+ // Concatenate everything into one buffer.
+ for (node = head->rq_next; node != NULL; node = node->rq_next)
+ len += node->rq_buflen;
+! res = lalloc(len + 1, TRUE);
+ if (res == NULL)
+ return NULL;
+ p = res;
+--- 1728,1734 ----
+ // Concatenate everything into one buffer.
+ for (node = head->rq_next; node != NULL; node = node->rq_next)
+ len += node->rq_buflen;
+! res = alloc(len + 1);
+ if (res == NULL)
+ return NULL;
+ p = res;
+*** ../vim-8.1.1385/src/diff.c 2019-05-24 18:48:36.750128544 +0200
+--- src/diff.c 2019-05-24 19:17:31.868547867 +0200
+***************
+*** 710,716 ****
+ // 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)
+ {
+ // Allocating memory failed. This can happen, because we try to read
+--- 710,716 ----
+ // 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 = alloc(len);
+ if (ptr == NULL)
+ {
+ // Allocating memory failed. This can happen, because we try to read
+*** ../vim-8.1.1385/src/edit.c 2019-05-24 18:48:36.750128544 +0200
+--- src/edit.c 2019-05-24 19:17:47.568461117 +0200
+***************
+*** 3859,3865 ****
+ if (replace_stack_len <= replace_stack_nr)
+ {
+ replace_stack_len += 50;
+! p = lalloc(sizeof(char_u) * replace_stack_len, TRUE);
+ if (p == NULL) /* out of memory */
+ {
+ replace_stack_len -= 50;
+--- 3859,3865 ----
+ if (replace_stack_len <= replace_stack_nr)
+ {
+ replace_stack_len += 50;
+! p = alloc(sizeof(char_u) * replace_stack_len);
+ if (p == NULL) /* out of memory */
+ {
+ replace_stack_len -= 50;
+*** ../vim-8.1.1385/src/eval.c 2019-05-24 18:48:36.754128525 +0200
+--- src/eval.c 2019-05-24 19:29:53.452465676 +0200
+***************
+*** 491,497 ****
+ if (redir_varname == NULL)
+ return FAIL;
+
+! redir_lval = (lval_T *)alloc_clear((unsigned)sizeof(lval_T));
+ if (redir_lval == NULL)
+ {
+ var_redir_stop();
+--- 491,497 ----
+ if (redir_varname == NULL)
+ return FAIL;
+
+! redir_lval = (lval_T *)alloc_clear(sizeof(lval_T));
+ if (redir_lval == NULL)
+ {
+ var_redir_stop();
+***************
+*** 7288,7294 ****
+ typval_T *
+ alloc_tv(void)
+ {
+! return (typval_T *)alloc_clear((unsigned)sizeof(typval_T));
+ }
+
+ /*
+--- 7288,7294 ----
+ typval_T *
+ alloc_tv(void)
+ {
+! return (typval_T *)alloc_clear(sizeof(typval_T));
+ }
+
+ /*
+*** ../vim-8.1.1385/src/ex_cmds.c 2019-05-24 18:48:36.750128544 +0200
+--- src/ex_cmds.c 2019-05-24 19:24:40.866183581 +0200
+***************
+*** 397,403 ****
+ sortbuf1 = NULL;
+ sortbuf2 = NULL;
+ regmatch.regprog = NULL;
+! nrs = (sorti_T *)lalloc((long_u)(count * sizeof(sorti_T)), TRUE);
+ if (nrs == NULL)
+ goto sortend;
+
+--- 397,403 ----
+ sortbuf1 = NULL;
+ sortbuf2 = NULL;
+ regmatch.regprog = NULL;
+! nrs = (sorti_T *)alloc(count * sizeof(sorti_T));
+ if (nrs == NULL)
+ goto sortend;
+
+***************
+*** 793,800 ****
+ /* len is actual number of white characters used */
+ len = num_spaces + num_tabs;
+ old_len = (long)STRLEN(ptr);
+! new_line = lalloc(old_len - col + start_col + len + 1,
+! TRUE);
+ if (new_line == NULL)
+ break;
+ if (start_col > 0)
+--- 793,799 ----
+ /* len is actual number of white characters used */
+ len = num_spaces + num_tabs;
+ old_len = (long)STRLEN(ptr);
+! new_line = alloc(old_len - col + start_col + len + 1);
+ if (new_line == NULL)
+ break;
+ if (start_col > 0)
+***************
+*** 1745,1751 ****
+ len += (long_u)STRLEN(itmp) + 9; /* " { < " + " } " */
+ if (otmp != NULL)
+ len += (long_u)STRLEN(otmp) + (long_u)STRLEN(p_srr) + 2; /* " " */
+! buf = lalloc(len, TRUE);
+ if (buf == NULL)
+ return NULL;
+
+--- 1744,1750 ----
+ len += (long_u)STRLEN(itmp) + 9; /* " { < " + " } " */
+ if (otmp != NULL)
+ len += (long_u)STRLEN(otmp) + (long_u)STRLEN(p_srr) + 2; /* " " */
+! buf = alloc(len);
+ if (buf == NULL)
+ return NULL;
+
+***************
+*** 2536,2542 ****
+ if (virp->vir_line[off] == Ctrl_V && vim_isdigit(virp->vir_line[off + 1]))
+ {
+ len = atol((char *)virp->vir_line + off + 1);
+! retval = lalloc(len, TRUE);
+ if (retval == NULL)
+ {
+ /* Line too long? File messed up? Skip next line. */
+--- 2535,2541 ----
+ if (virp->vir_line[off] == Ctrl_V && vim_isdigit(virp->vir_line[off + 1]))
+ {
+ len = atol((char *)virp->vir_line + off + 1);
+! retval = alloc(len);
+ if (retval == NULL)
+ {
+ /* Line too long? File messed up? Skip next line. */
+*** ../vim-8.1.1385/src/ex_getln.c 2019-05-24 18:48:36.758128504 +0200
+--- src/ex_getln.c 2019-05-24 19:24:57.374092786 +0200
+***************
+*** 4166,4172 ****
+ len = 0;
+ for (i = 0; i < xp->xp_numfiles; ++i)
+ len += (long_u)STRLEN(xp->xp_files[i]) + 1;
+! ss = lalloc(len, TRUE);
+ if (ss != NULL)
+ {
+ *ss = NUL;
+--- 4166,4172 ----
+ len = 0;
+ for (i = 0; i < xp->xp_numfiles; ++i)
+ len += (long_u)STRLEN(xp->xp_files[i]) + 1;
+! ss = alloc(len);
+ if (ss != NULL)
+ {
+ *ss = NUL;
+***************
+*** 5914,5921 ****
+ {
+ if (newlen)
+ {
+! temp = (histentry_T *)lalloc(
+! (long_u)(newlen * sizeof(histentry_T)), TRUE);
+ if (temp == NULL) /* out of memory! */
+ {
+ if (type == 0) /* first one: just keep the old length */
+--- 5914,5921 ----
+ {
+ if (newlen)
+ {
+! temp = (histentry_T *)alloc(
+! (long_u)(newlen * sizeof(histentry_T)));
+ if (temp == NULL) /* out of memory! */
+ {
+ if (type == 0) /* first one: just keep the old length */
+***************
+*** 6688,6694 ****
+ {
+ /* Need to re-allocate to append the separator byte. */
+ len = STRLEN(val);
+! p = lalloc(len + 2, TRUE);
+ if (p != NULL)
+ {
+ if (type == HIST_SEARCH)
+--- 6688,6694 ----
+ {
+ /* Need to re-allocate to append the separator byte. */
+ len = STRLEN(val);
+! p = alloc(len + 2);
+ if (p != NULL)
+ {
+ if (type == HIST_SEARCH)
+***************
+*** 6774,6780 ****
+ {
+ /* Need to re-allocate to append the separator byte. */
+ len = vp[3].bv_len;
+! p = lalloc(len + 2, TRUE);
+ }
+ else
+ len = 0; /* for picky compilers */
+--- 6774,6780 ----
+ {
+ /* Need to re-allocate to append the separator byte. */
+ len = vp[3].bv_len;
+! p = alloc(len + 2);
+ }
+ else
+ len = 0; /* for picky compilers */
+*** ../vim-8.1.1385/src/fileio.c 2019-05-24 19:04:25.644941435 +0200
+--- src/fileio.c 2019-05-24 19:19:28.315904932 +0200
+***************
+*** 89,95 ****
+ int bw_restlen; /* nr of bytes in bw_rest[] */
+ int bw_first; /* first write call */
+ char_u *bw_conv_buf; /* buffer for writing converted chars */
+! int bw_conv_buflen; /* size of bw_conv_buf */
+ int bw_conv_error; /* set for conversion error */
+ linenr_T bw_conv_error_lnum; /* first line with error or zero */
+ linenr_T bw_start_lnum; /* line number at start of buffer */
+--- 89,95 ----
+ int bw_restlen; /* nr of bytes in bw_rest[] */
+ int bw_first; /* first write call */
+ char_u *bw_conv_buf; /* buffer for writing converted chars */
+! size_t bw_conv_buflen; /* size of bw_conv_buf */
+ int bw_conv_error; /* set for conversion error */
+ linenr_T bw_conv_error_lnum; /* first line with error or zero */
+ linenr_T bw_start_lnum; /* line number at start of buffer */
+***************
+*** 1189,1195 ****
+ {
+ for ( ; size >= 10; size = (long)((long_u)size >> 1))
+ {
+! if ((new_buffer = lalloc((long_u)(size + linerest + 1),
+ FALSE)) != NULL)
+ break;
+ }
+--- 1189,1195 ----
+ {
+ for ( ; size >= 10; size = (long)((long_u)size >> 1))
+ {
+! if ((new_buffer = lalloc(size + linerest + 1,
+ FALSE)) != NULL)
+ break;
+ }
+***************
+*** 4168,4175 ****
+ write_info.bw_conv_buflen = bufsize * 2;
+ else /* FIO_UCS4 */
+ write_info.bw_conv_buflen = bufsize * 4;
+! write_info.bw_conv_buf
+! = lalloc((long_u)write_info.bw_conv_buflen, TRUE);
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ }
+--- 4168,4174 ----
+ write_info.bw_conv_buflen = bufsize * 2;
+ else /* FIO_UCS4 */
+ write_info.bw_conv_buflen = bufsize * 4;
+! write_info.bw_conv_buf = alloc(write_info.bw_conv_buflen);
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ }
+***************
+*** 4180,4187 ****
+ {
+ /* Convert UTF-8 -> UCS-2 and UCS-2 -> DBCS. Worst-case * 4: */
+ write_info.bw_conv_buflen = bufsize * 4;
+! write_info.bw_conv_buf
+! = lalloc((long_u)write_info.bw_conv_buflen, TRUE);
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ }
+--- 4179,4185 ----
+ {
+ /* Convert UTF-8 -> UCS-2 and UCS-2 -> DBCS. Worst-case * 4: */
+ write_info.bw_conv_buflen = bufsize * 4;
+! write_info.bw_conv_buf = alloc(write_info.bw_conv_buflen);
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ }
+***************
+*** 4191,4198 ****
+ if (converted && wb_flags == 0 && (wb_flags = get_mac_fio_flags(fenc)) != 0)
+ {
+ write_info.bw_conv_buflen = bufsize * 3;
+! write_info.bw_conv_buf
+! = lalloc((long_u)write_info.bw_conv_buflen, TRUE);
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ }
+--- 4189,4195 ----
+ if (converted && wb_flags == 0 && (wb_flags = get_mac_fio_flags(fenc)) != 0)
+ {
+ write_info.bw_conv_buflen = bufsize * 3;
+! write_info.bw_conv_buf = alloc(write_info.bw_conv_buflen);
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ }
+***************
+*** 4212,4219 ****
+ {
+ /* We're going to use iconv(), allocate a buffer to convert in. */
+ write_info.bw_conv_buflen = bufsize * ICONV_MULT;
+! write_info.bw_conv_buf
+! = lalloc((long_u)write_info.bw_conv_buflen, TRUE);
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ write_info.bw_first = TRUE;
+--- 4209,4215 ----
+ {
+ /* We're going to use iconv(), allocate a buffer to convert in. */
+ write_info.bw_conv_buflen = bufsize * ICONV_MULT;
+! write_info.bw_conv_buf = alloc(write_info.bw_conv_buflen);
+ if (write_info.bw_conv_buf == NULL)
+ end = 0;
+ write_info.bw_first = TRUE;
+*** ../vim-8.1.1385/src/getchar.c 2019-05-24 18:48:36.758128504 +0200
+--- src/getchar.c 2019-05-24 19:19:44.215817204 +0200
+***************
+*** 156,162 ****
+ for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next)
+ count += (long_u)STRLEN(bp->b_str);
+
+! if ((count || dozero) && (p = lalloc(count + 1, TRUE)) != NULL)
+ {
+ p2 = p;
+ for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next)
+--- 156,162 ----
+ for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next)
+ count += (long_u)STRLEN(bp->b_str);
+
+! if ((count || dozero) && (p = alloc(count + 1)) != NULL)
+ {
+ p2 = p;
+ for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next)
+***************
+*** 258,265 ****
+ len = MINIMAL_SIZE;
+ else
+ len = slen;
+! p = (buffblock_T *)lalloc((long_u)(sizeof(buffblock_T) + len),
+! TRUE);
+ if (p == NULL)
+ return; /* no space, just forget it */
+ buf->bh_space = (int)(len - slen);
+--- 258,264 ----
+ len = MINIMAL_SIZE;
+ else
+ len = slen;
+! p = (buffblock_T *)alloc(sizeof(buffblock_T) + len);
+ if (p == NULL)
+ return; /* no space, just forget it */
+ buf->bh_space = (int)(len - slen);
+*** ../vim-8.1.1385/src/gui_mac.c 2019-03-30 18:46:57.352077376 +0100
+--- src/gui_mac.c 2019-05-24 19:20:01.515721782 +0200
+***************
+*** 4476,4482 ****
+ /* In CARBON we don't need a Handle, a pointer is good */
+ textOfClip = NewHandle(scrapSize);
+
+! /* tempclip = lalloc(scrapSize+1, TRUE); */
+ HLock(textOfClip);
+ error = GetScrapFlavorData(scrap,
+ flavor ? VIMSCRAPFLAVOR : SCRAPTEXTFLAVOR,
+--- 4476,4482 ----
+ /* In CARBON we don't need a Handle, a pointer is good */
+ textOfClip = NewHandle(scrapSize);
+
+! /* tempclip = alloc(scrapSize+1); */
+ HLock(textOfClip);
+ error = GetScrapFlavorData(scrap,
+ flavor ? VIMSCRAPFLAVOR : SCRAPTEXTFLAVOR,
+***************
+*** 4488,4494 ****
+ else
+ type = MAUTO;
+
+! tempclip = lalloc(scrapSize + 1, TRUE);
+ mch_memmove(tempclip, *textOfClip + flavor, scrapSize);
+ tempclip[scrapSize] = 0;
+
+--- 4488,4494 ----
+ else
+ type = MAUTO;
+
+! tempclip = alloc(scrapSize + 1);
+ mch_memmove(tempclip, *textOfClip + flavor, scrapSize);
+ tempclip[scrapSize] = 0;
+
+*** ../vim-8.1.1385/src/insexpand.c 2019-05-24 18:48:36.762128482 +0200
+--- src/insexpand.c 2019-05-24 19:30:38.272219536 +0200
+***************
+*** 611,617 ****
+
+ // Allocate a new match structure.
+ // Copy the values to the new match structure.
+! match = (compl_T *)alloc_clear((unsigned)sizeof(compl_T));
+ if (match == NULL)
+ return FAIL;
+ match->cp_number = -1;
+--- 611,617 ----
+
+ // Allocate a new match structure.
+ // Copy the values to the new match structure.
+! match = (compl_T *)alloc_clear(sizeof(compl_T));
+ if (match == NULL)
+ return FAIL;
+ match->cp_number = -1;
+***************
+*** 1071,1078 ****
+ if (compl_match_arraysize == 0)
+ return;
+ compl_match_array = (pumitem_T *)alloc_clear(
+! (unsigned)(sizeof(pumitem_T)
+! * compl_match_arraysize));
+ if (compl_match_array != NULL)
+ {
+ // If the current match is the original text don't find the first
+--- 1071,1077 ----
+ if (compl_match_arraysize == 0)
+ return;
+ compl_match_array = (pumitem_T *)alloc_clear(
+! sizeof(pumitem_T) * compl_match_arraysize);
+ if (compl_match_array != NULL)
+ {
+ // If the current match is the original text don't find the first
+*** ../vim-8.1.1385/src/gui_w32.c 2019-05-24 18:48:36.762128482 +0200
+--- src/gui_w32.c 2019-05-24 19:20:34.115542034 +0200
+***************
+*** 6803,6814 ****
+ dfltbutton = -1;
+
+ /* Allocate array to hold the width of each button */
+! buttonWidths = (int *)lalloc(numButtons * sizeof(int), TRUE);
+ if (buttonWidths == NULL)
+ return -1;
+
+ /* Allocate array to hold the X position of each button */
+! buttonPositions = (int *)lalloc(numButtons * sizeof(int), TRUE);
+ if (buttonPositions == NULL)
+ return -1;
+
+--- 6803,6814 ----
+ dfltbutton = -1;
+
+ /* Allocate array to hold the width of each button */
+! buttonWidths = (int *)alloc(numButtons * sizeof(int));
+ if (buttonWidths == NULL)
+ return -1;
+
+ /* Allocate array to hold the X position of each button */
+! buttonPositions = (int *)alloc(numButtons * sizeof(int));
+ if (buttonPositions == NULL)
+ return -1;
+
+*** ../vim-8.1.1385/src/gui_x11.c 2019-03-30 18:46:57.352077376 +0100
+--- src/gui_x11.c 2019-05-24 19:09:16.775299442 +0200
+***************
+*** 1167,1173 ****
+ * Move all the entries in argv which are relevant to X into gui_argv.
+ */
+ gui_argc = 0;
+! gui_argv = (char **)lalloc((long_u)(*argc * sizeof(char *)), FALSE);
+ if (gui_argv == NULL)
+ return;
+ gui_argv[gui_argc++] = argv[0];
+--- 1167,1173 ----
+ * Move all the entries in argv which are relevant to X into gui_argv.
+ */
+ gui_argc = 0;
+! gui_argv = (char **)lalloc(*argc * sizeof(char *), FALSE);
+ if (gui_argv == NULL)
+ return;
+ gui_argv[gui_argc++] = argv[0];
+*** ../vim-8.1.1385/src/menu.c 2019-05-24 18:48:36.766128461 +0200
+--- src/menu.c 2019-05-24 19:30:49.932155506 +0200
+***************
+*** 583,589 ****
+ }
+
+ /* Not already there, so lets add it */
+! menu = (vimmenu_T *)alloc_clear((unsigned)sizeof(vimmenu_T));
+ if (menu == NULL)
+ goto erret;
+
+--- 583,589 ----
+ }
+
+ /* Not already there, so lets add it */
+! menu = (vimmenu_T *)alloc_clear(sizeof(vimmenu_T));
+ if (menu == NULL)
+ goto erret;
+
+*** ../vim-8.1.1385/src/netbeans.c 2019-05-24 18:48:36.750128544 +0200
+--- src/netbeans.c 2019-05-24 19:31:40.839875984 +0200
+***************
+*** 863,869 ****
+ int done = 0;
+
+ /* result is never longer than input */
+! result = (char *)alloc_clear((unsigned)STRLEN(p) + 1);
+ if (result == NULL)
+ return NULL;
+
+--- 863,869 ----
+ int done = 0;
+
+ /* result is never longer than input */
+! result = (char *)alloc_clear(STRLEN(p) + 1);
+ if (result == NULL)
+ return NULL;
+
+***************
+*** 3210,3216 ****
+ if (globalsignmaplen == 0) /* first allocation */
+ {
+ globalsignmaplen = 20;
+! globalsignmap = (char **)alloc_clear(globalsignmaplen*sizeof(char *));
+ }
+ else /* grow it */
+ {
+--- 3210,3217 ----
+ if (globalsignmaplen == 0) /* first allocation */
+ {
+ globalsignmaplen = 20;
+! globalsignmap = (char **)alloc_clear(
+! globalsignmaplen * sizeof(char *));
+ }
+ else /* grow it */
+ {
+*** ../vim-8.1.1385/src/ops.c 2019-05-24 18:48:36.766128461 +0200
+--- src/ops.c 2019-05-24 19:31:58.387779642 +0200
+***************
+*** 1160,1166 ****
+ if (y_append && y_current->y_array != NULL)
+ {
+ pp = &(y_current->y_array[y_current->y_size - 1]);
+! lp = lalloc((long_u)(STRLEN(*pp) + STRLEN(p) + 1), TRUE);
+ if (lp == NULL)
+ {
+ vim_free(p);
+--- 1160,1166 ----
+ if (y_append && y_current->y_array != NULL)
+ {
+ pp = &(y_current->y_array[y_current->y_size - 1]);
+! lp = alloc(STRLEN(*pp) + STRLEN(p) + 1);
+ if (lp == NULL)
+ {
+ vim_free(p);
+***************
+*** 3057,3064 ****
+ y_current->y_size = yanklines;
+ y_current->y_type = yanktype; /* set the yank register type */
+ y_current->y_width = 0;
+! y_current->y_array = (char_u **)lalloc_clear((long_u)(sizeof(char_u *) *
+! yanklines), TRUE);
+ if (y_current->y_array == NULL)
+ {
+ y_current = curr;
+--- 3057,3064 ----
+ y_current->y_size = yanklines;
+ y_current->y_type = yanktype; /* set the yank register type */
+ y_current->y_width = 0;
+! y_current->y_array = (char_u **)lalloc_clear(sizeof(char_u *) * yanklines,
+! TRUE);
+ if (y_current->y_array == NULL)
+ {
+ y_current = curr;
+***************
+*** 3171,3178 ****
+
+ if (curr != y_current) /* append the new block to the old block */
+ {
+! new_ptr = (char_u **)lalloc((long_u)(sizeof(char_u *) *
+! (curr->y_size + y_current->y_size)), TRUE);
+ if (new_ptr == NULL)
+ goto fail;
+ for (j = 0; j < curr->y_size; ++j)
+--- 3171,3178 ----
+
+ if (curr != y_current) /* append the new block to the old block */
+ {
+! new_ptr = (char_u **)alloc(sizeof(char_u *) *
+! (curr->y_size + y_current->y_size));
+ if (new_ptr == NULL)
+ goto fail;
+ for (j = 0; j < curr->y_size; ++j)
+***************
+*** 3190,3197 ****
+ * the new block, unless being Vi compatible. */
+ if (curr->y_type == MCHAR && vim_strchr(p_cpo, CPO_REGAPPEND) == NULL)
+ {
+! pnew = lalloc((long_u)(STRLEN(curr->y_array[curr->y_size - 1])
+! + STRLEN(y_current->y_array[0]) + 1), TRUE);
+ if (pnew == NULL)
+ {
+ y_idx = y_current->y_size - 1;
+--- 3190,3197 ----
+ * the new block, unless being Vi compatible. */
+ if (curr->y_type == MCHAR && vim_strchr(p_cpo, CPO_REGAPPEND) == NULL)
+ {
+! pnew = alloc(STRLEN(curr->y_array[curr->y_size - 1])
+! + STRLEN(y_current->y_array[0]) + 1);
+ if (pnew == NULL)
+ {
+ y_idx = y_current->y_size - 1;
+***************
+*** 4453,4465 ****
+ /* Allocate an array to store the number of spaces inserted before each
+ * line. We will use it to pre-compute the length of the new line and the
+ * proper placement of each original line in the new one. */
+! spaces = lalloc_clear((long_u)count, TRUE);
+ if (spaces == NULL)
+ return FAIL;
+ #if defined(FEAT_COMMENTS) || defined(PROTO)
+ if (remove_comments)
+ {
+! comments = (int *)lalloc_clear((long_u)count * sizeof(int), TRUE);
+ if (comments == NULL)
+ {
+ vim_free(spaces);
+--- 4453,4465 ----
+ /* Allocate an array to store the number of spaces inserted before each
+ * line. We will use it to pre-compute the length of the new line and the
+ * proper placement of each original line in the new one. */
+! spaces = lalloc_clear(count, TRUE);
+ if (spaces == NULL)
+ return FAIL;
+ #if defined(FEAT_COMMENTS) || defined(PROTO)
+ if (remove_comments)
+ {
+! comments = (int *)lalloc_clear(count * sizeof(int), TRUE);
+ if (comments == NULL)
+ {
+ vim_free(spaces);
+***************
+*** 4571,4578 ****
+ // Allocate an array to copy the text properties of joined lines into.
+ // And another array to store the number of properties in each line.
+ prop_lines = (textprop_T **)alloc_clear(
+! (int)(count - 1) * sizeof(textprop_T *));
+! prop_lengths = (int *)alloc_clear((int)(count - 1) * sizeof(int));
+ if (prop_lengths == NULL)
+ VIM_CLEAR(prop_lines);
+ }
+--- 4571,4578 ----
+ // Allocate an array to copy the text properties of joined lines into.
+ // And another array to store the number of properties in each line.
+ prop_lines = (textprop_T **)alloc_clear(
+! (count - 1) * sizeof(textprop_T *));
+! prop_lengths = (int *)alloc_clear((count - 1) * sizeof(int));
+ if (prop_lengths == NULL)
+ VIM_CLEAR(prop_lines);
+ }
+***************
+*** 6600,6606 ****
+ if (y_ptr->y_type == MCHAR && *len >= eolsize)
+ *len -= eolsize;
+
+! p = *str = lalloc(*len + 1, TRUE); /* add one to avoid zero */
+ if (p == NULL)
+ return -1;
+ lnum = 0;
+--- 6600,6606 ----
+ if (y_ptr->y_type == MCHAR && *len >= eolsize)
+ *len -= eolsize;
+
+! p = *str = alloc(*len + 1); // add one to avoid zero
+ if (p == NULL)
+ return -1;
+ lnum = 0;
+***************
+*** 6818,6824 ****
+ ++len;
+ }
+
+! retval = lalloc(len + 1, TRUE);
+
+ /*
+ * Copy the lines of the yank register into the string.
+--- 6818,6824 ----
+ ++len;
+ }
+
+! retval = alloc(len + 1);
+
+ /*
+ * Copy the lines of the yank register into the string.
+*** ../vim-8.1.1385/src/os_mswin.c 2019-05-24 18:48:36.766128461 +0200
+--- src/os_mswin.c 2019-05-24 19:21:29.175238574 +0200
+***************
+*** 890,896 ****
+ else if (retval_str != NULL
+ && (len = check_str_len(retval_str)) > 0)
+ {
+! *string_result = lalloc((long_u)len, TRUE);
+ if (*string_result != NULL)
+ mch_memmove(*string_result, retval_str, len);
+ }
+--- 890,896 ----
+ else if (retval_str != NULL
+ && (len = check_str_len(retval_str)) > 0)
+ {
+! *string_result = alloc(len);
+ if (*string_result != NULL)
+ mch_memmove(*string_result, retval_str, len);
+ }
+*** ../vim-8.1.1385/src/os_amiga.c 2019-05-24 18:48:36.766128461 +0200
+--- src/os_amiga.c 2019-05-24 19:32:31.267599120 +0200
+***************
+*** 1448,1454 ****
+ #ifdef __amigaos4__
+ Anchor = AllocDosObject(DOS_ANCHORPATH, AnchorTags);
+ #else
+! Anchor = (struct AnchorPath *)alloc_clear((unsigned)ANCHOR_SIZE);
+ #endif
+ if (Anchor == NULL)
+ return 0;
+--- 1448,1454 ----
+ #ifdef __amigaos4__
+ Anchor = AllocDosObject(DOS_ANCHORPATH, AnchorTags);
+ #else
+! Anchor = (struct AnchorPath *)alloc_clear(ANCHOR_SIZE);
+ #endif
+ if (Anchor == NULL)
+ return 0;
+*** ../vim-8.1.1385/src/os_qnx.c 2019-03-30 18:46:57.360077328 +0100
+--- src/os_qnx.c 2019-05-24 19:21:47.639136844 +0200
+***************
+*** 120,126 ****
+ type = clip_convert_selection(&str, &len, cbd);
+ if (type >= 0)
+ {
+! text_clip = lalloc(len + 1, TRUE); /* Normal text */
+
+ if (text_clip && vim_clip)
+ {
+--- 120,126 ----
+ type = clip_convert_selection(&str, &len, cbd);
+ if (type >= 0)
+ {
+! text_clip = alloc(len + 1); // Normal text
+
+ if (text_clip && vim_clip)
+ {
+*** ../vim-8.1.1385/src/os_unix.c 2019-05-24 18:48:36.770128440 +0200
+--- src/os_unix.c 2019-05-24 19:26:47.437487719 +0200
+***************
+*** 4459,4467 ****
+ else
+ x = system((char *)cmd);
+ # else
+! newcmd = lalloc(STRLEN(p_sh)
+ + (extra_shell_arg == NULL ? 0 : STRLEN(extra_shell_arg))
+! + STRLEN(p_shcf) + STRLEN(cmd) + 4, TRUE);
+ if (newcmd == NULL)
+ x = 0;
+ else
+--- 4459,4467 ----
+ else
+ x = system((char *)cmd);
+ # else
+! newcmd = alloc(STRLEN(p_sh)
+ + (extra_shell_arg == NULL ? 0 : STRLEN(extra_shell_arg))
+! + STRLEN(p_shcf) + STRLEN(cmd) + 4);
+ if (newcmd == NULL)
+ x = 0;
+ else
+*** ../vim-8.1.1385/src/os_win32.c 2019-05-24 18:48:36.770128440 +0200
+--- src/os_win32.c 2019-05-24 19:32:43.335532850 +0200
+***************
+*** 3394,3400 ****
+ struct my_acl *p = NULL;
+ DWORD err;
+
+! p = (struct my_acl *)alloc_clear((unsigned)sizeof(struct my_acl));
+ if (p != NULL)
+ {
+ WCHAR *wn;
+--- 3394,3400 ----
+ struct my_acl *p = NULL;
+ DWORD err;
+
+! p = (struct my_acl *)alloc_clear(sizeof(struct my_acl));
+ if (p != NULL)
+ {
+ WCHAR *wn;
+***************
+*** 4533,4539 ****
+ cmdlen = STRLEN(p_sh) + 1;
+ else
+ cmdlen = STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10;
+! newcmd = lalloc(cmdlen, TRUE);
+ if (newcmd == NULL)
+ return 255;
+ if (cmd == NULL)
+--- 4533,4539 ----
+ cmdlen = STRLEN(p_sh) + 1;
+ else
+ cmdlen = STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10;
+! newcmd = alloc(cmdlen);
+ if (newcmd == NULL)
+ return 255;
+ if (cmd == NULL)
+***************
+*** 4772,4778 ****
+ {
+ /* make "cmd.exe /c arguments" */
+ cmdlen = STRLEN(cmd_shell) + STRLEN(subcmd) + 5;
+! newcmd = lalloc(cmdlen, TRUE);
+ if (newcmd != NULL)
+ vim_snprintf((char *)newcmd, cmdlen, "%s /c %s",
+ cmd_shell, subcmd);
+--- 4772,4778 ----
+ {
+ /* make "cmd.exe /c arguments" */
+ cmdlen = STRLEN(cmd_shell) + STRLEN(subcmd) + 5;
+! newcmd = alloc(cmdlen);
+ if (newcmd != NULL)
+ vim_snprintf((char *)newcmd, cmdlen, "%s /c %s",
+ cmd_shell, subcmd);
+***************
+*** 4827,4833 ****
+ #endif
+ STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10;
+
+! newcmd = lalloc(cmdlen, TRUE);
+ if (newcmd != NULL)
+ {
+ #if defined(FEAT_GUI_MSWIN)
+--- 4827,4833 ----
+ #endif
+ STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10;
+
+! newcmd = alloc(cmdlen);
+ if (newcmd != NULL)
+ {
+ #if defined(FEAT_GUI_MSWIN)
+*** ../vim-8.1.1385/src/popupmnu.c 2019-05-09 13:50:13.362401997 +0200
+--- src/popupmnu.c 2019-05-24 19:33:15.451300742 +0200
+***************
+*** 1071,1077 ****
+ * position. */
+ if (height > max_height)
+ height = max_height;
+! *array = (pumitem_T *)alloc_clear((unsigned)sizeof(pumitem_T) * height);
+ if (*array == NULL)
+ goto failed;
+
+--- 1071,1077 ----
+ * position. */
+ if (height > max_height)
+ height = max_height;
+! *array = (pumitem_T *)alloc_clear(sizeof(pumitem_T) * height);
+ if (*array == NULL)
+ goto failed;
+
+***************
+*** 1165,1171 ****
+
+ balloon_arraysize = list->lv_len;
+ balloon_array = (pumitem_T *)alloc_clear(
+! (unsigned)sizeof(pumitem_T) * list->lv_len);
+ if (balloon_array == NULL)
+ return;
+ for (idx = 0, li = list->lv_first; li != NULL; li = li->li_next, ++idx)
+--- 1165,1171 ----
+
+ balloon_arraysize = list->lv_len;
+ balloon_array = (pumitem_T *)alloc_clear(
+! sizeof(pumitem_T) * list->lv_len);
+ if (balloon_array == NULL)
+ return;
+ for (idx = 0, li = list->lv_first; li != NULL; li = li->li_next, ++idx)
+***************
+*** 1271,1277 ****
+ return;
+ }
+
+! array = (pumitem_T *)alloc_clear((unsigned)sizeof(pumitem_T) * pum_size);
+ if (array == NULL)
+ return;
+
+--- 1271,1277 ----
+ return;
+ }
+
+! array = (pumitem_T *)alloc_clear(sizeof(pumitem_T) * pum_size);
+ if (array == NULL)
+ return;
+
+*** ../vim-8.1.1385/src/quickfix.c 2019-05-24 18:48:36.770128440 +0200
+--- src/quickfix.c 2019-05-24 19:33:34.435134342 +0200
+***************
+*** 540,546 ****
+ 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
+--- 540,546 ----
+ while (efm[0] != NUL)
+ {
+ // Allocate a new eformat structure and put it at the end of the list
+! fmt_ptr = (efm_T *)alloc_clear(sizeof(efm_T));
+ if (fmt_ptr == NULL)
+ goto parse_efm_error;
+ if (fmt_first == NULL) // first one
+***************
+*** 2141,2147 ****
+ {
+ qf_info_T *qi;
+
+! qi = (qf_info_T *)alloc_clear((unsigned)sizeof(qf_info_T));
+ if (qi != NULL)
+ {
+ qi->qf_refcount++;
+--- 2141,2147 ----
+ {
+ qf_info_T *qi;
+
+! qi = (qf_info_T *)alloc_clear(sizeof(qf_info_T));
+ if (qi != NULL)
+ {
+ qi->qf_refcount++;
+*** ../vim-8.1.1385/src/regexp.c 2019-05-24 18:48:36.770128440 +0200
+--- src/regexp.c 2019-05-24 19:33:42.583063544 +0200
+***************
+*** 1319,1325 ****
+ return NULL;
+
+ /* Allocate space. */
+! r = (bt_regprog_T *)lalloc(sizeof(bt_regprog_T) + regsize, TRUE);
+ if (r == NULL)
+ return NULL;
+ r->re_in_use = FALSE;
+--- 1319,1325 ----
+ return NULL;
+
+ /* Allocate space. */
+! r = (bt_regprog_T *)alloc(sizeof(bt_regprog_T) + regsize);
+ if (r == NULL)
+ return NULL;
+ r->re_in_use = FALSE;
+***************
+*** 3932,3938 ****
+ {
+ reg_extmatch_T *em;
+
+! em = (reg_extmatch_T *)alloc_clear((unsigned)sizeof(reg_extmatch_T));
+ if (em != NULL)
+ em->refcnt = 1;
+ return em;
+--- 3932,3938 ----
+ {
+ reg_extmatch_T *em;
+
+! em = (reg_extmatch_T *)alloc_clear(sizeof(reg_extmatch_T));
+ if (em != NULL)
+ em->refcnt = 1;
+ return em;
+***************
+*** 7830,7836 ****
+
+ if (retval == NULL)
+ {
+! retval = lalloc((long_u)len, TRUE);
+ if (retval == NULL)
+ return NULL;
+ }
+--- 7830,7836 ----
+
+ if (retval == NULL)
+ {
+! retval = alloc(len);
+ if (retval == NULL)
+ return NULL;
+ }
+*** ../vim-8.1.1385/src/regexp_nfa.c 2019-05-03 11:21:01.645784762 +0200
+--- src/regexp_nfa.c 2019-05-24 19:23:30.982568018 +0200
+***************
+*** 300,306 ****
+ /* Size for postfix representation of expr. */
+ postfix_size = sizeof(int) * nstate_max;
+
+! post_start = (int *)lalloc(postfix_size, TRUE);
+ if (post_start == NULL)
+ return FAIL;
+ post_ptr = post_start;
+--- 300,306 ----
+ /* Size for postfix representation of expr. */
+ postfix_size = sizeof(int) * nstate_max;
+
+! post_start = (int *)alloc(postfix_size);
+ if (post_start == NULL)
+ return FAIL;
+ post_ptr = post_start;
+***************
+*** 516,522 ****
+ // For weird patterns the number of states can be very high. Increasing by
+ // 50% seems a reasonable compromise between memory use and speed.
+ new_max = nstate_max * 3 / 2;
+! new_start = (int *)lalloc(new_max * sizeof(int), TRUE);
+ if (new_start == NULL)
+ return FAIL;
+ mch_memmove(new_start, post_start, nstate_max * sizeof(int));
+--- 516,522 ----
+ // For weird patterns the number of states can be very high. Increasing by
+ // 50% seems a reasonable compromise between memory use and speed.
+ new_max = nstate_max * 3 / 2;
+! new_start = (int *)alloc(new_max * sizeof(int));
+ if (new_start == NULL)
+ return FAIL;
+ mch_memmove(new_start, post_start, nstate_max * sizeof(int));
+***************
+*** 3214,3220 ****
+ if (nfa_calc_size == FALSE)
+ {
+ // Allocate space for the stack. Max states on the stack: "nstate'.
+! stack = (Frag_T *)lalloc((nstate + 1) * sizeof(Frag_T), TRUE);
+ if (stack == NULL)
+ return NULL;
+ stackp = stack;
+--- 3214,3220 ----
+ if (nfa_calc_size == FALSE)
+ {
+ // Allocate space for the stack. Max states on the stack: "nstate'.
+! stack = (Frag_T *)alloc((nstate + 1) * sizeof(Frag_T));
+ if (stack == NULL)
+ return NULL;
+ stackp = stack;
+***************
+*** 5184,5190 ****
+ if (*listids == NULL || *listids_len < prog->nstate)
+ {
+ vim_free(*listids);
+! *listids = (int *)lalloc(sizeof(int) * prog->nstate, TRUE);
+ if (*listids == NULL)
+ {
+ emsg(_("E878: (NFA) Could not allocate memory for branch traversal!"));
+--- 5184,5190 ----
+ if (*listids == NULL || *listids_len < prog->nstate)
+ {
+ vim_free(*listids);
+! *listids = (int *)alloc(sizeof(int) * prog->nstate);
+ if (*listids == NULL)
+ {
+ emsg(_("E878: (NFA) Could not allocate memory for branch traversal!"));
+***************
+*** 5567,5575 ****
+ /* Allocate memory for the lists of nodes. */
+ size = (prog->nstate + 1) * sizeof(nfa_thread_T);
+
+! list[0].t = (nfa_thread_T *)lalloc(size, TRUE);
+ list[0].len = prog->nstate + 1;
+! list[1].t = (nfa_thread_T *)lalloc(size, TRUE);
+ list[1].len = prog->nstate + 1;
+ if (list[0].t == NULL || list[1].t == NULL)
+ goto theend;
+--- 5567,5575 ----
+ /* Allocate memory for the lists of nodes. */
+ size = (prog->nstate + 1) * sizeof(nfa_thread_T);
+
+! list[0].t = (nfa_thread_T *)alloc(size);
+ list[0].len = prog->nstate + 1;
+! list[1].t = (nfa_thread_T *)alloc(size);
+ list[1].len = prog->nstate + 1;
+ if (list[0].t == NULL || list[1].t == NULL)
+ goto theend;
+***************
+*** 7276,7282 ****
+
+ /* allocate the regprog with space for the compiled regexp */
+ prog_size = sizeof(nfa_regprog_T) + sizeof(nfa_state_T) * (nstate - 1);
+! prog = (nfa_regprog_T *)lalloc(prog_size, TRUE);
+ if (prog == NULL)
+ goto fail;
+ state_ptr = prog->state;
+--- 7276,7282 ----
+
+ /* allocate the regprog with space for the compiled regexp */
+ prog_size = sizeof(nfa_regprog_T) + sizeof(nfa_state_T) * (nstate - 1);
+! prog = (nfa_regprog_T *)alloc(prog_size);
+ if (prog == NULL)
+ goto fail;
+ state_ptr = prog->state;
+*** ../vim-8.1.1385/src/screen.c 2019-05-24 18:48:36.770128440 +0200
+--- src/screen.c 2019-05-24 19:33:55.618950986 +0200
+***************
+*** 8782,8807 ****
+ if (aucmd_win != NULL)
+ win_free_lsize(aucmd_win);
+
+! new_ScreenLines = (schar_T *)lalloc((long_u)(
+! (Rows + 1) * Columns * sizeof(schar_T)), FALSE);
+ vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T *) * MAX_MCO);
+ if (enc_utf8)
+ {
+! new_ScreenLinesUC = (u8char_T *)lalloc((long_u)(
+! (Rows + 1) * Columns * sizeof(u8char_T)), FALSE);
+ for (i = 0; i < p_mco; ++i)
+! new_ScreenLinesC[i] = (u8char_T *)lalloc_clear((long_u)(
+! (Rows + 1) * Columns * sizeof(u8char_T)), FALSE);
+ }
+ if (enc_dbcs == DBCS_JPNU)
+! new_ScreenLines2 = (schar_T *)lalloc((long_u)(
+! (Rows + 1) * Columns * sizeof(schar_T)), FALSE);
+! new_ScreenAttrs = (sattr_T *)lalloc((long_u)(
+! (Rows + 1) * Columns * sizeof(sattr_T)), FALSE);
+! new_LineOffset = (unsigned *)lalloc((long_u)(
+! Rows * sizeof(unsigned)), FALSE);
+! new_LineWraps = (char_u *)lalloc((long_u)(Rows * sizeof(char_u)), FALSE);
+! new_TabPageIdxs = (short *)lalloc((long_u)(Columns * sizeof(short)), FALSE);
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ {
+--- 8782,8806 ----
+ if (aucmd_win != NULL)
+ win_free_lsize(aucmd_win);
+
+! new_ScreenLines = (schar_T *)lalloc(
+! (Rows + 1) * Columns * sizeof(schar_T), FALSE);
+ vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T *) * MAX_MCO);
+ if (enc_utf8)
+ {
+! new_ScreenLinesUC = (u8char_T *)lalloc(
+! (Rows + 1) * Columns * sizeof(u8char_T), FALSE);
+ for (i = 0; i < p_mco; ++i)
+! new_ScreenLinesC[i] = (u8char_T *)lalloc_clear(
+! (Rows + 1) * Columns * sizeof(u8char_T), FALSE);
+ }
+ if (enc_dbcs == DBCS_JPNU)
+! new_ScreenLines2 = (schar_T *)lalloc(
+! (Rows + 1) * Columns * sizeof(schar_T), FALSE);
+! new_ScreenAttrs = (sattr_T *)lalloc(
+! (Rows + 1) * Columns * sizeof(sattr_T), FALSE);
+! new_LineOffset = (unsigned *)lalloc(Rows * sizeof(unsigned), FALSE);
+! new_LineWraps = (char_u *)lalloc(Rows * sizeof(char_u), FALSE);
+! new_TabPageIdxs = (short *)lalloc(Columns * sizeof(short), FALSE);
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ {
+***************
+*** 10741,10747 ****
+ for (menu = wp->w_winbar->children; menu != NULL; menu = menu->next)
+ ++item_count;
+ wp->w_winbar_items = (winbar_item_T *)alloc_clear(
+! (unsigned)sizeof(winbar_item_T) * (item_count + 1));
+
+ /* TODO: use fewer spaces if there is not enough room */
+ for (menu = wp->w_winbar->children;
+--- 10740,10746 ----
+ for (menu = wp->w_winbar->children; menu != NULL; menu = menu->next)
+ ++item_count;
+ wp->w_winbar_items = (winbar_item_T *)alloc_clear(
+! sizeof(winbar_item_T) * (item_count + 1));
+
+ /* TODO: use fewer spaces if there is not enough room */
+ for (menu = wp->w_winbar->children;
+*** ../vim-8.1.1385/src/search.c 2019-05-24 17:55:47.511425702 +0200
+--- src/search.c 2019-05-24 19:27:24.273285286 +0200
+***************
+*** 5137,5144 ****
+ goto fpip_end;
+ def_regmatch.rm_ic = FALSE; /* don't ignore case in define pat. */
+ }
+! files = (SearchedFile *)lalloc_clear((long_u)
+! (max_path_depth * sizeof(SearchedFile)), TRUE);
+ if (files == NULL)
+ goto fpip_end;
+ old_files = max_path_depth;
+--- 5137,5144 ----
+ goto fpip_end;
+ def_regmatch.rm_ic = FALSE; /* don't ignore case in define pat. */
+ }
+! files = (SearchedFile *)lalloc_clear(
+! max_path_depth * sizeof(SearchedFile), TRUE);
+ if (files == NULL)
+ goto fpip_end;
+ old_files = max_path_depth;
+***************
+*** 5298,5305 ****
+ /* Push the new file onto the file stack */
+ if (depth + 1 == old_files)
+ {
+! bigger = (SearchedFile *)lalloc((long_u)(
+! max_path_depth * 2 * sizeof(SearchedFile)), TRUE);
+ if (bigger != NULL)
+ {
+ for (i = 0; i <= depth; i++)
+--- 5298,5305 ----
+ /* Push the new file onto the file stack */
+ if (depth + 1 == old_files)
+ {
+! bigger = (SearchedFile *)alloc(
+! max_path_depth * 2 * sizeof(SearchedFile));
+ if (bigger != NULL)
+ {
+ for (i = 0; i <= depth; i++)
+*** ../vim-8.1.1385/src/sign.c 2019-02-17 14:50:22.434125846 +0100
+--- src/sign.c 2019-05-24 19:12:17.974288051 +0200
+***************
+*** 202,209 ****
+ {
+ signlist_T *newsign;
+
+! newsign = (signlist_T *)lalloc_id((long_u)sizeof(signlist_T), FALSE,
+! aid_insert_sign);
+ if (newsign != NULL)
+ {
+ newsign->id = id;
+--- 202,209 ----
+ {
+ signlist_T *newsign;
+
+! newsign = (signlist_T *)lalloc_id(sizeof(signlist_T), FALSE,
+! aid_insert_sign);
+ if (newsign != NULL)
+ {
+ newsign->id = id;
+***************
+*** 1057,1063 ****
+ emsg(_("E934: Cannot jump to a buffer that does not have a name"));
+ return -1;
+ }
+! cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
+ if (cmd == NULL)
+ return -1;
+ sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname);
+--- 1057,1063 ----
+ emsg(_("E934: Cannot jump to a buffer that does not have a name"));
+ return -1;
+ }
+! cmd = alloc(STRLEN(buf->b_fname) + 25);
+ if (cmd == NULL)
+ return -1;
+ sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname);
+*** ../vim-8.1.1385/src/spell.c 2019-05-24 18:48:36.770128440 +0200
+--- src/spell.c 2019-05-24 19:23:44.546493376 +0200
+***************
+*** 7820,7827 ****
+
+ /* We use "cnt" as an array: CNT(badword_idx, goodword_idx). */
+ #define CNT(a, b) cnt[(a) + (b) * (badlen + 1)]
+! cnt = (int *)lalloc((long_u)(sizeof(int) * (badlen + 1) * (goodlen + 1)),
+! TRUE);
+ if (cnt == NULL)
+ return 0; /* out of memory */
+
+--- 7820,7826 ----
+
+ /* We use "cnt" as an array: CNT(badword_idx, goodword_idx). */
+ #define CNT(a, b) cnt[(a) + (b) * (badlen + 1)]
+! cnt = (int *)alloc(sizeof(int) * (badlen + 1) * (goodlen + 1));
+ if (cnt == NULL)
+ return 0; /* out of memory */
+
+*** ../vim-8.1.1385/src/spellfile.c 2019-05-24 18:48:36.770128440 +0200
+--- src/spellfile.c 2019-05-24 19:34:19.294748935 +0200
+***************
+*** 892,899 ****
+ if (cnt <= 0)
+ return SP_FORMERROR;
+
+! lp->sl_prefprog = (regprog_T **)alloc_clear(
+! (unsigned)sizeof(regprog_T *) * cnt);
+ if (lp->sl_prefprog == NULL)
+ return SP_OTHERERROR;
+ lp->sl_prefixcnt = cnt;
+--- 892,898 ----
+ if (cnt <= 0)
+ return SP_FORMERROR;
+
+! lp->sl_prefprog = (regprog_T **)alloc_clear(sizeof(regprog_T *) * cnt);
+ if (lp->sl_prefprog == NULL)
+ return SP_OTHERERROR;
+ lp->sl_prefixcnt = cnt;
+***************
+*** 1580,1592 ****
+ if (len > 0)
+ {
+ /* Allocate the byte array. */
+! bp = lalloc((long_u)len, TRUE);
+ if (bp == NULL)
+ return SP_OTHERERROR;
+ *bytsp = bp;
+
+ /* Allocate the index array. */
+! ip = (idx_T *)lalloc_clear((long_u)(len * sizeof(int)), TRUE);
+ if (ip == NULL)
+ return SP_OTHERERROR;
+ *idxsp = ip;
+--- 1579,1591 ----
+ if (len > 0)
+ {
+ /* Allocate the byte array. */
+! bp = alloc(len);
+ if (bp == NULL)
+ return SP_OTHERERROR;
+ *bytsp = bp;
+
+ /* Allocate the index array. */
+! ip = (idx_T *)lalloc_clear(len * sizeof(int), TRUE);
+ if (ip == NULL)
+ return SP_OTHERERROR;
+ *idxsp = ip;
+***************
+*** 4272,4279 ****
+ bl = NULL;
+ else
+ /* Allocate a block of memory. It is not freed until much later. */
+! bl = (sblock_T *)alloc_clear(
+! (unsigned)(sizeof(sblock_T) + SBLOCKSIZE));
+ if (bl == NULL)
+ {
+ if (!spin->si_did_emsg)
+--- 4271,4277 ----
+ bl = NULL;
+ else
+ /* Allocate a block of memory. It is not freed until much later. */
+! bl = (sblock_T *)alloc_clear(sizeof(sblock_T) + SBLOCKSIZE);
+ if (bl == NULL)
+ {
+ if (!spin->si_did_emsg)
+*** ../vim-8.1.1385/src/syntax.c 2019-05-24 18:48:36.770128440 +0200
+--- src/syntax.c 2019-05-24 19:34:47.590511163 +0200
+***************
+*** 1215,1221 ****
+ len = syn_block->b_sst_len - syn_block->b_sst_freecount + 2;
+ }
+
+! sstp = (synstate_T *)alloc_clear((unsigned)(len * sizeof(synstate_T)));
+ if (sstp == NULL) /* out of memory! */
+ return;
+
+--- 1215,1221 ----
+ len = syn_block->b_sst_len - syn_block->b_sst_freecount + 2;
+ }
+
+! sstp = (synstate_T *)alloc_clear(len * sizeof(synstate_T));
+ if (sstp == NULL) /* out of memory! */
+ return;
+
+***************
+*** 5216,5222 ****
+ }
+ ppp->pp_next = pat_ptrs[item];
+ pat_ptrs[item] = ppp;
+! ppp->pp_synp = (synpat_T *)alloc_clear((unsigned)sizeof(synpat_T));
+ if (ppp->pp_synp == NULL)
+ {
+ rest = NULL;
+--- 5216,5222 ----
+ }
+ ppp->pp_next = pat_ptrs[item];
+ pat_ptrs[item] = ppp;
+! ppp->pp_synp = (synpat_T *)alloc_clear(sizeof(synpat_T));
+ if (ppp->pp_synp == NULL)
+ {
+ rest = NULL;
+*** ../vim-8.1.1385/src/tag.c 2019-05-23 21:35:44.459922615 +0200
+--- src/tag.c 2019-05-24 19:24:03.026391715 +0200
+***************
+*** 2789,2796 ****
+ match_count = 0;
+
+ if (match_count > 0)
+! matches = (char_u **)lalloc((long_u)(match_count * sizeof(char_u *)),
+! TRUE);
+ else
+ matches = NULL;
+ match_count = 0;
+--- 2789,2795 ----
+ match_count = 0;
+
+ if (match_count > 0)
+! matches = (char_u **)alloc(match_count * sizeof(char_u *));
+ else
+ matches = NULL;
+ match_count = 0;
+*** ../vim-8.1.1385/src/terminal.c 2019-05-13 20:27:19.216311194 +0200
+--- src/terminal.c 2019-05-24 19:35:10.778319166 +0200
+***************
+*** 3925,3931 ****
+ static void *
+ vterm_malloc(size_t size, void *data UNUSED)
+ {
+! return alloc_clear((unsigned) size);
+ }
+
+ static void
+--- 3925,3931 ----
+ static void *
+ vterm_malloc(size_t size, void *data UNUSED)
+ {
+! return alloc_clear(size);
+ }
+
+ static void
+*** ../vim-8.1.1385/src/textprop.c 2019-05-24 13:22:17.863644567 +0200
+--- src/textprop.c 2019-05-24 19:35:25.382199528 +0200
+***************
+*** 678,684 ****
+ semsg(_("E969: Property type %s already defined"), name);
+ return;
+ }
+! prop = (proptype_T *)alloc_clear((int)(sizeof(proptype_T) + STRLEN(name)));
+ if (prop == NULL)
+ return;
+ STRCPY(prop->pt_name, name);
+--- 678,684 ----
+ semsg(_("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);
+*** ../vim-8.1.1385/src/ui.c 2019-04-28 19:46:17.034060084 +0200
+--- src/ui.c 2019-05-24 19:24:10.754349196 +0200
+***************
+*** 1514,1520 ****
+ len *= 2; /* max. 2 bytes per display cell */
+ else if (enc_utf8)
+ len *= MB_MAXBYTES;
+! buffer = lalloc((long_u)len, TRUE);
+ if (buffer == NULL) /* out of memory */
+ return;
+
+--- 1514,1520 ----
+ len *= 2; /* max. 2 bytes per display cell */
+ else if (enc_utf8)
+ len *= MB_MAXBYTES;
+! buffer = alloc(len);
+ if (buffer == NULL) /* out of memory */
+ return;
+
+***************
+*** 1897,1907 ****
+ garray_T *gap;
+
+ /* We use a growarray to store the data pointer and the length. */
+! gap = (garray_T *)alloc((unsigned)sizeof(garray_T));
+ if (gap != NULL)
+ {
+ /* Add one to avoid a zero size. */
+! gap->ga_data = alloc((unsigned)inbufcount + 1);
+ if (gap->ga_data != NULL)
+ mch_memmove(gap->ga_data, inbuf, (size_t)inbufcount);
+ gap->ga_len = inbufcount;
+--- 1897,1907 ----
+ garray_T *gap;
+
+ /* We use a growarray to store the data pointer and the length. */
+! gap = (garray_T *)alloc(sizeof(garray_T));
+ if (gap != NULL)
+ {
+ /* Add one to avoid a zero size. */
+! gap->ga_data = alloc(inbufcount + 1);
+ if (gap->ga_data != NULL)
+ mch_memmove(gap->ga_data, inbuf, (size_t)inbufcount);
+ gap->ga_len = inbufcount;
+*** ../vim-8.1.1385/src/undo.c 2019-05-24 18:48:36.774128421 +0200
+--- src/undo.c 2019-05-24 19:35:38.430093446 +0200
+***************
+*** 124,130 ****
+ static void unserialize_visualinfo(bufinfo_T *bi, visualinfo_T *info);
+ #endif
+
+! #define U_ALLOC_LINE(size) lalloc((long_u)(size), FALSE)
+
+ /* used in undo_end() to report number of added and deleted lines */
+ static long u_newcount, u_oldcount;
+--- 124,130 ----
+ static void unserialize_visualinfo(bufinfo_T *bi, visualinfo_T *info);
+ #endif
+
+! #define U_ALLOC_LINE(size) lalloc(size, FALSE)
+
+ /* used in undo_end() to report number of added and deleted lines */
+ static long u_newcount, u_oldcount;
+***************
+*** 2013,2020 ****
+ }
+
+ #ifdef U_DEBUG
+! uhp_table_used = (int *)alloc_clear(
+! (unsigned)(sizeof(int) * num_head + 1));
+ # define SET_FLAG(j) ++uhp_table_used[j]
+ #else
+ # define SET_FLAG(j)
+--- 2013,2019 ----
+ }
+
+ #ifdef U_DEBUG
+! uhp_table_used = (int *)alloc_clear(sizeof(int) * num_head + 1);
+ # define SET_FLAG(j) ++uhp_table_used[j]
+ #else
+ # define SET_FLAG(j)
+*** ../vim-8.1.1385/src/userfunc.c 2019-05-24 18:48:36.774128421 +0200
+--- src/userfunc.c 2019-05-24 19:36:30.305678918 +0200
+***************
+*** 292,301 ****
+
+ sprintf((char*)name, "<lambda>%d", ++lambda_no);
+
+! fp = (ufunc_T *)alloc_clear((unsigned)(sizeof(ufunc_T) + STRLEN(name)));
+ if (fp == NULL)
+ goto errret;
+! pt = (partial_T *)alloc_clear((unsigned)sizeof(partial_T));
+ if (pt == NULL)
+ goto errret;
+
+--- 292,301 ----
+
+ sprintf((char*)name, "<lambda>%d", ++lambda_no);
+
+! fp = (ufunc_T *)alloc_clear(sizeof(ufunc_T) + STRLEN(name));
+ if (fp == NULL)
+ goto errret;
+! pt = (partial_T *)alloc_clear(sizeof(partial_T));
+ if (pt == NULL)
+ goto errret;
+
+***************
+*** 2580,2586 ****
+ }
+ }
+
+! fp = (ufunc_T *)alloc_clear((unsigned)(sizeof(ufunc_T) + STRLEN(name)));
+ if (fp == NULL)
+ goto erret;
+
+--- 2580,2586 ----
+ }
+ }
+
+! fp = (ufunc_T *)alloc_clear(sizeof(ufunc_T) + STRLEN(name));
+ if (fp == NULL)
+ goto erret;
+
+***************
+*** 2751,2764 ****
+ profile_zero(&fp->uf_tm_self);
+ profile_zero(&fp->uf_tm_total);
+ if (fp->uf_tml_count == NULL)
+! fp->uf_tml_count = (int *)alloc_clear(
+! (unsigned)(sizeof(int) * len));
+ if (fp->uf_tml_total == NULL)
+ fp->uf_tml_total = (proftime_T *)alloc_clear(
+! (unsigned)(sizeof(proftime_T) * len));
+ if (fp->uf_tml_self == NULL)
+ fp->uf_tml_self = (proftime_T *)alloc_clear(
+! (unsigned)(sizeof(proftime_T) * len));
+ fp->uf_tml_idx = -1;
+ if (fp->uf_tml_count == NULL || fp->uf_tml_total == NULL
+ || fp->uf_tml_self == NULL)
+--- 2751,2763 ----
+ profile_zero(&fp->uf_tm_self);
+ profile_zero(&fp->uf_tm_total);
+ if (fp->uf_tml_count == NULL)
+! fp->uf_tml_count = (int *)alloc_clear(sizeof(int) * len);
+ if (fp->uf_tml_total == NULL)
+ fp->uf_tml_total = (proftime_T *)alloc_clear(
+! sizeof(proftime_T) * len);
+ if (fp->uf_tml_self == NULL)
+ fp->uf_tml_self = (proftime_T *)alloc_clear(
+! sizeof(proftime_T) * len);
+ fp->uf_tml_idx = -1;
+ if (fp->uf_tml_count == NULL || fp->uf_tml_total == NULL
+ || fp->uf_tml_self == NULL)
+*** ../vim-8.1.1385/src/winclip.c 2019-05-24 18:48:36.774128421 +0200
+--- src/winclip.c 2019-05-24 19:24:19.274302321 +0200
+***************
+*** 244,250 ****
+ char_u *retp;
+
+ /* Avoid allocating zero bytes, it generates an error message. */
+! ret = lalloc((long_u)(str_len == 0 ? 1 : str_len), TRUE);
+ if (ret != NULL)
+ {
+ retp = ret;
+--- 244,250 ----
+ char_u *retp;
+
+ /* Avoid allocating zero bytes, it generates an error message. */
+! ret = alloc(str_len == 0 ? 1 : str_len);
+ if (ret != NULL)
+ {
+ retp = ret;
+*** ../vim-8.1.1385/src/window.c 2019-05-18 15:36:06.493897710 +0200
+--- src/window.c 2019-05-24 19:37:03.001423202 +0200
+***************
+*** 1065,1071 ****
+ if (curfrp->fr_parent == NULL || curfrp->fr_parent->fr_layout != layout)
+ {
+ /* Need to create a new frame in the tree to make a branch. */
+! frp = (frame_T *)alloc_clear((unsigned)sizeof(frame_T));
+ *frp = *curfrp;
+ curfrp->fr_layout = layout;
+ frp->fr_parent = curfrp;
+--- 1065,1071 ----
+ if (curfrp->fr_parent == NULL || curfrp->fr_parent->fr_layout != layout)
+ {
+ /* Need to create a new frame in the tree to make a branch. */
+! frp = (frame_T *)alloc_clear(sizeof(frame_T));
+ *frp = *curfrp;
+ curfrp->fr_layout = layout;
+ frp->fr_parent = curfrp;
+***************
+*** 3549,3555 ****
+ static void
+ new_frame(win_T *wp)
+ {
+! frame_T *frp = (frame_T *)alloc_clear((unsigned)sizeof(frame_T));
+
+ wp->w_frame = frp;
+ if (frp != NULL)
+--- 3549,3555 ----
+ static void
+ new_frame(win_T *wp)
+ {
+! frame_T *frp = (frame_T *)alloc_clear(sizeof(frame_T));
+
+ wp->w_frame = frp;
+ if (frp != NULL)
+***************
+*** 3584,3590 ****
+ # endif
+
+
+! tp = (tabpage_T *)alloc_clear((unsigned)sizeof(tabpage_T));
+ if (tp == NULL)
+ return NULL;
+
+--- 3584,3590 ----
+ # endif
+
+
+! tp = (tabpage_T *)alloc_clear(sizeof(tabpage_T));
+ if (tp == NULL)
+ return NULL;
+
+***************
+*** 4597,4603 ****
+ /*
+ * allocate window structure and linesizes arrays
+ */
+! new_wp = (win_T *)alloc_clear((unsigned)sizeof(win_T));
+ if (new_wp == NULL)
+ return NULL;
+
+--- 4597,4603 ----
+ /*
+ * allocate window structure and linesizes arrays
+ */
+! new_wp = (win_T *)alloc_clear(sizeof(win_T));
+ if (new_wp == NULL)
+ return NULL;
+
+***************
+*** 4898,4904 ****
+ win_alloc_lines(win_T *wp)
+ {
+ wp->w_lines_valid = 0;
+! wp->w_lines = (wline_T *)alloc_clear((unsigned)(Rows * sizeof(wline_T)));
+ if (wp->w_lines == NULL)
+ return FAIL;
+ return OK;
+--- 4898,4904 ----
+ win_alloc_lines(win_T *wp)
+ {
+ wp->w_lines_valid = 0;
+! wp->w_lines = (wline_T *)alloc_clear(Rows * sizeof(wline_T));
+ if (wp->w_lines == NULL)
+ return FAIL;
+ return OK;
+***************
+*** 6280,6286 ****
+ static void
+ make_snapshot_rec(frame_T *fr, frame_T **frp)
+ {
+! *frp = (frame_T *)alloc_clear((unsigned)sizeof(frame_T));
+ if (*frp == NULL)
+ return;
+ (*frp)->fr_layout = fr->fr_layout;
+--- 6280,6286 ----
+ static void
+ make_snapshot_rec(frame_T *fr, frame_T **frp)
+ {
+! *frp = (frame_T *)alloc_clear(sizeof(frame_T));
+ if (*frp == NULL)
+ return;
+ (*frp)->fr_layout = fr->fr_layout;
+*** ../vim-8.1.1385/src/version.c 2019-05-24 19:04:25.644941435 +0200
+--- src/version.c 2019-05-24 19:28:07.861045768 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1386,
+ /**/
+
+--
+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.1387 b/data/vim/patches/8.1.1387
new file mode 100644
index 000000000..c424cc7ae
--- /dev/null
+++ b/data/vim/patches/8.1.1387
@@ -0,0 +1,92 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1387
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1387
+Problem: Calling prop_add() in an empty buffer doesn't work. (Dominique
+ Pelle)
+Solution: Open the memline before adding a text property. (closes #4412)
+Files: src/textprop.c, src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.1386/src/textprop.c 2019-05-24 19:38:59.112545434 +0200
+--- src/textprop.c 2019-05-24 20:35:24.489130483 +0200
+***************
+*** 12,17 ****
+--- 12,18 ----
+ *
+ * TODO:
+ * - Adjust text property column and length when text is inserted/deleted.
++ * -> :substitute with multiple matches, issue #4427
+ * -> a :substitute with a multi-line match
+ * -> search for changed_bytes() from misc1.c
+ * -> search for mark_col_adjust()
+***************
+*** 238,243 ****
+--- 239,247 ----
+ return;
+ }
+
++ if (buf->b_ml.ml_mfp == NULL)
++ ml_open(buf);
++
+ for (lnum = start_lnum; lnum <= end_lnum; ++lnum)
+ {
+ colnr_T col; // start column
+***************
+*** 327,333 ****
+
+ // Be quick when no text property types have been defined or the buffer,
+ // unless we are adding one.
+! if (!buf->b_has_textprop && !will_change)
+ return 0;
+
+ // Fetch the line to get the ml_line_len field updated.
+--- 331,337 ----
+
+ // Be quick when no text property types have been defined or the buffer,
+ // unless we are adding one.
+! if ((!buf->b_has_textprop && !will_change) || buf->b_ml.ml_mfp == NULL)
+ return 0;
+
+ // Fetch the line to get the ml_line_len field updated.
+*** ../vim-8.1.1386/src/testdir/test_textprop.vim 2019-05-19 22:53:36.504914607 +0200
+--- src/testdir/test_textprop.vim 2019-05-24 20:38:45.796002471 +0200
+***************
+*** 752,754 ****
+--- 752,762 ----
+ " Same, but delete four columns
+ call RunTestVisualBlock(4, '02')
+ endfunc
++
++ " Adding a text property to a new buffer should not fail
++ func Test_textprop_empty_buffer()
++ call prop_type_add('comment', {'highlight': 'Search'})
++ new
++ call prop_add(1, 1, {'type': 'comment'})
++ close
++ endfunc
+*** ../vim-8.1.1386/src/version.c 2019-05-24 19:38:59.116545403 +0200
+--- src/version.c 2019-05-24 20:40:37.251376451 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1387,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+18. When leaving the zoo, start running towards the parking lot,
+ yelling "run for your lives, they're loose!!"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1388 b/data/vim/patches/8.1.1388
new file mode 100644
index 000000000..3b6c09a28
--- /dev/null
+++ b/data/vim/patches/8.1.1388
@@ -0,0 +1,182 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1388
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1388
+Problem: Errors when calling prop_remove() for an unloaded buffer.
+Solution: Bail out when the buffer is not loaded. Add a few more tests for
+ failing when the buffer number is invalid.
+Files: src/textprop.c, src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.1387/src/textprop.c 2019-05-24 20:41:51.990993995 +0200
+--- src/textprop.c 2019-05-24 21:15:44.236123472 +0200
+***************
+*** 129,135 ****
+ di = dict_find(arg->vval.v_dict, (char_u *)"bufnr", -1);
+ if (di != NULL)
+ {
+! *buf = tv_get_buf(&di->di_tv, FALSE);
+ if (*buf == NULL)
+ return FAIL;
+ }
+--- 129,135 ----
+ di = dict_find(arg->vval.v_dict, (char_u *)"bufnr", -1);
+ if (di != NULL)
+ {
+! *buf = get_buf_arg(&di->di_tv);
+ if (*buf == NULL)
+ return FAIL;
+ }
+***************
+*** 560,572 ****
+ }
+
+ dict = argvars[0].vval.v_dict;
+! di = dict_find(dict, (char_u *)"bufnr", -1);
+! if (di != NULL)
+! {
+! buf = tv_get_buf(&di->di_tv, FALSE);
+! if (buf == NULL)
+! return;
+! }
+
+ di = dict_find(dict, (char_u*)"all", -1);
+ if (di != NULL)
+--- 560,569 ----
+ }
+
+ dict = argvars[0].vval.v_dict;
+! if (get_bufnr_from_arg(&argvars[0], &buf) == FAIL)
+! return;
+! if (buf->b_ml.ml_mfp == NULL)
+! return;
+
+ di = dict_find(dict, (char_u*)"all", -1);
+ if (di != NULL)
+***************
+*** 628,634 ****
+ buf->b_ml.ml_flags |= ML_LINE_DIRTY;
+
+ cur_prop = buf->b_ml.ml_line_ptr + len
+! + idx * sizeof(textprop_T);
+ }
+
+ taillen = buf->b_ml.ml_line_len - len
+--- 625,631 ----
+ buf->b_ml.ml_flags |= ML_LINE_DIRTY;
+
+ cur_prop = buf->b_ml.ml_line_ptr + len
+! + idx * sizeof(textprop_T);
+ }
+
+ taillen = buf->b_ml.ml_line_len - len
+*** ../vim-8.1.1387/src/testdir/test_textprop.vim 2019-05-24 20:41:51.990993995 +0200
+--- src/testdir/test_textprop.vim 2019-05-24 21:20:48.757553109 +0200
+***************
+*** 69,74 ****
+--- 69,76 ----
+ 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})))
++
++ call assert_fails("call prop_type_add('one', {'bufnr': 98764})", "E158:")
+ endfunc
+
+ func AddPropTypes()
+***************
+*** 124,129 ****
+--- 126,133 ----
+ let expected = [{'col': 5, 'length': 0, 'type': 'two', 'id': 0, 'start': 1, 'end': 1}]
+ call assert_equal(expected, prop_list(1))
+
++ call assert_fails("call prop_add(1, 5, {'type': 'two', 'bufnr': 234343})", 'E158:')
++
+ call DeletePropTypes()
+ bwipe!
+ endfunc
+***************
+*** 136,150 ****
+ 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
+--- 140,157 ----
+ call assert_equal(props, prop_list(1))
+
+ " remove by id
+! call assert_equal(1, prop_remove({'id': 12}, 1))
+ unlet props[2]
+ call assert_equal(props, prop_list(1))
+
+ " remove by type
+! call assert_equal(1, prop_remove({'type': 'one'}, 1))
+ unlet props[1]
+ call assert_equal(props, prop_list(1))
+
++ " remove from unknown buffer
++ call assert_fails("call prop_remove({'type': 'one', 'bufnr': 123456}, 1)", 'E158:')
++
+ call DeletePropTypes()
+ bwipe!
+ endfunc
+***************
+*** 760,762 ****
+--- 767,782 ----
+ call prop_add(1, 1, {'type': 'comment'})
+ close
+ endfunc
++
++ func Test_textprop_remove_from_buf()
++ new
++ let buf = bufnr('')
++ call prop_type_add('one', {'bufnr': buf})
++ call prop_add(1, 1, {'type': 'one', 'id': 234})
++ file x
++ edit y
++ call prop_remove({'id': 234, 'bufnr': buf}, 1)
++ call prop_type_delete('one', {'bufnr': buf})
++ bwipe! x
++ close
++ endfunc
+*** ../vim-8.1.1387/src/version.c 2019-05-24 20:41:51.990993995 +0200
+--- src/version.c 2019-05-24 21:05:40.879518821 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1388,
+ /**/
+
+--
+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.1389 b/data/vim/patches/8.1.1389
new file mode 100644
index 000000000..d4a0a612a
--- /dev/null
+++ b/data/vim/patches/8.1.1389
@@ -0,0 +1,128 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1389
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1389
+Problem: Changes are not flushed when end and start overlap. (Paul Jolly)
+Solution: When end of a previous changes overlaps with start of a new
+ change, first flush listeners.
+Files: src/change.c, src/testdir/test_listener.vim
+
+
+*** ../vim-8.1.1388/src/change.c 2019-05-24 19:38:59.096545552 +0200
+--- src/change.c 2019-05-24 21:34:33.627803910 +0200
+***************
+*** 172,187 ****
+ if (buf->b_recorded_changes != NULL && xtra != 0)
+ {
+ listitem_T *li;
+! linenr_T nr;
+
+ for (li = buf->b_recorded_changes->lv_first; li != NULL;
+ li = li->li_next)
+ {
+! nr = (linenr_T)dict_get_number(
+ li->li_tv.vval.v_dict, (char_u *)"lnum");
+! if (nr >= lnum || nr > lnume)
+ {
+! if (li->li_next == NULL && lnum == nr
+ && col + 1 == (colnr_T)dict_get_number(
+ li->li_tv.vval.v_dict, (char_u *)"col"))
+ {
+--- 172,191 ----
+ if (buf->b_recorded_changes != NULL && xtra != 0)
+ {
+ listitem_T *li;
+! linenr_T prev_lnum;
+! linenr_T prev_lnume;
+
+ for (li = buf->b_recorded_changes->lv_first; li != NULL;
+ li = li->li_next)
+ {
+! prev_lnum = (linenr_T)dict_get_number(
+ li->li_tv.vval.v_dict, (char_u *)"lnum");
+! prev_lnume = (linenr_T)dict_get_number(
+! li->li_tv.vval.v_dict, (char_u *)"end");
+! if (prev_lnum >= lnum || prev_lnum > lnume
+! || (prev_lnume >= lnum && xtra != 0))
+ {
+! if (li->li_next == NULL && lnum == prev_lnum
+ && col + 1 == (colnr_T)dict_get_number(
+ li->li_tv.vval.v_dict, (char_u *)"col"))
+ {
+***************
+*** 195,202 ****
+ (char_u *)"end", -1);
+ if (di != NULL)
+ {
+! nr = tv_get_number(&di->di_tv);
+! if (lnume > nr)
+ di->di_tv.vval.v_number = lnume;
+ }
+ di = dict_find(li->li_tv.vval.v_dict,
+--- 199,206 ----
+ (char_u *)"end", -1);
+ if (di != NULL)
+ {
+! prev_lnum = tv_get_number(&di->di_tv);
+! if (lnume > prev_lnum)
+ di->di_tv.vval.v_number = lnume;
+ }
+ di = dict_find(li->li_tv.vval.v_dict,
+*** ../vim-8.1.1388/src/testdir/test_listener.vim 2019-05-16 22:11:43.715228803 +0200
+--- src/testdir/test_listener.vim 2019-05-24 21:37:12.034786897 +0200
+***************
+*** 187,192 ****
+--- 187,203 ----
+ \ {'lnum': 4, 'end': 5, 'col': 1, 'added': -1},
+ \ {'lnum': 6, 'end': 6, 'col': 1, 'added': 1}], s:list)
+
++ " split a line then insert one, should get two disconnected change lists
++ call setline(1, 'split here')
++ call listener_flush()
++ let s:list = []
++ exe "normal 1ggwi\<CR>\<Esc>"
++ 1
++ normal o
++ call assert_equal([{'lnum': 1, 'end': 2, 'col': 7, 'added': 1}], s:list)
++ call listener_flush()
++ call assert_equal([{'lnum': 2, 'end': 2, 'col': 1, 'added': 1}], s:list)
++
+ call listener_remove(id)
+ bwipe!
+ endfunc
+*** ../vim-8.1.1388/src/version.c 2019-05-24 21:22:25.672809688 +0200
+--- src/version.c 2019-05-24 21:30:04.381573735 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1389,
+ /**/
+
+--
+Now it is such a bizarrely improbable coincidence that anything as
+mind-bogglingly useful as the Babel fish could have evolved purely by chance
+that some thinkers have chosen to see it as a final and clinching proof of the
+NON-existence of God.
+The argument goes something like this: 'I refuse to prove that I exist,' says
+God, 'for proof denies faith, and without faith I am nothing.'
+'But,' says Man, 'the Babel fish is a dead giveaway, isn't it? It could not
+have evolved by chance. It proves you exist, and so therefore, by your own
+arguments, you don't. QED.'
+'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a
+puff of logic.
+'Oh, that was easy,' says Man, and for an encore goes on to prove that black
+is white and gets himself killed on the next pedestrian crossing.
+ -- 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.1390 b/data/vim/patches/8.1.1390
new file mode 100644
index 000000000..fbdb5a21e
--- /dev/null
+++ b/data/vim/patches/8.1.1390
@@ -0,0 +1,181 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1390
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1390
+Problem: Search stats are off when using count or offset.
+Solution: Recompute the stats when needed. (Masato Nishihata, closes #4410)
+Files: src/test_search_stat.vim, src/search.c
+
+
+*** ../vim-8.1.1389/src/testdir/test_search_stat.vim 2019-05-24 13:11:44.311032841 +0200
+--- src/testdir/test_search_stat.vim 2019-05-24 21:59:54.092537447 +0200
+***************
+*** 117,122 ****
+--- 117,141 ----
+ call assert_false(1)
+ endtry
+
++ " with count
++ call cursor(1, 1)
++ let @/ = 'fo*\(bar\?\)\?'
++ let g:a = execute(':unsilent :norm! 2n')
++ let stat = '\[3/50\]'
++ let pat = escape(@/, '()*?'). '\s\+'
++ call assert_match(pat .. stat, g:a)
++ let g:a = execute(':unsilent :norm! 2n')
++ let stat = '\[5/50\]'
++ call assert_match(pat .. stat, g:a)
++
++ " with offset
++ call cursor(1, 1)
++ call feedkeys("/fo*\\(bar\\?\\)\\?/+1\<cr>", 'tx')
++ let g:a = execute(':unsilent :norm! n')
++ let stat = '\[5/50\]'
++ let pat = escape(@/ .. '/+1', '()*?'). '\s\+'
++ call assert_match(pat .. stat, g:a)
++
+ " normal, n comes from a mapping
+ " Need to move over more than 64 lines to trigger char_avail(.
+ nnoremap n nzv
+*** ../vim-8.1.1389/src/search.c 2019-05-24 19:38:59.112545434 +0200
+--- src/search.c 2019-05-24 22:05:28.443062516 +0200
+***************
+*** 26,32 ****
+ #ifdef FEAT_VIMINFO
+ static void wvsp_one(FILE *fp, int idx, char *s, int sc);
+ #endif
+! static void search_stat(int dirc, pos_T *pos, int show_top_bot_msg, char_u *msgbuf);
+
+ /*
+ * This file contains various searching-related routines. These fall into
+--- 26,32 ----
+ #ifdef FEAT_VIMINFO
+ static void wvsp_one(FILE *fp, int idx, char *s, int sc);
+ #endif
+! static void search_stat(int dirc, pos_T *pos, int show_top_bot_msg, char_u *msgbuf, int recompute);
+
+ /*
+ * This file contains various searching-related routines. These fall into
+***************
+*** 1219,1224 ****
+--- 1219,1225 ----
+ char_u *ps;
+ char_u *msgbuf = NULL;
+ size_t len;
++ int has_offset = FALSE;
+ #define SEARCH_STAT_BUF_LEN 12
+
+ /*
+***************
+*** 1550,1555 ****
+--- 1551,1558 ----
+ */
+ if (!(options & SEARCH_NOOF) || (pat != NULL && *pat == ';'))
+ {
++ pos_T org_pos = pos;
++
+ if (spats[0].off.line) /* Add the offset to the line number. */
+ {
+ c = pos.lnum + spats[0].off.off;
+***************
+*** 1581,1586 ****
+--- 1584,1591 ----
+ break;
+ }
+ }
++ if (!EQUAL_POS(pos, org_pos))
++ has_offset = TRUE;
+ }
+
+ // Show [1/15] if 'S' is not in 'shortmess'.
+***************
+*** 1590,1596 ****
+ && c != FAIL
+ && !shortmess(SHM_SEARCHCOUNT)
+ && msgbuf != NULL)
+! search_stat(dirc, &pos, show_top_bot_msg, msgbuf);
+
+ /*
+ * The search command can be followed by a ';' to do another search.
+--- 1595,1602 ----
+ && c != FAIL
+ && !shortmess(SHM_SEARCHCOUNT)
+ && msgbuf != NULL)
+! search_stat(dirc, &pos, show_top_bot_msg, msgbuf,
+! (count != 1 || has_offset));
+
+ /*
+ * The search command can be followed by a ';' to do another search.
+***************
+*** 4915,4927 ****
+
+ /*
+ * Add the search count "[3/19]" to "msgbuf".
+ */
+ static void
+ search_stat(
+ int dirc,
+ pos_T *pos,
+ int show_top_bot_msg,
+! char_u *msgbuf)
+ {
+ int save_ws = p_ws;
+ int wraparound = FALSE;
+--- 4921,4935 ----
+
+ /*
+ * Add the search count "[3/19]" to "msgbuf".
++ * When "recompute" is TRUE always recompute the numbers.
+ */
+ static void
+ search_stat(
+ int dirc,
+ pos_T *pos,
+ int show_top_bot_msg,
+! char_u *msgbuf,
+! int recompute)
+ {
+ int save_ws = p_ws;
+ int wraparound = FALSE;
+***************
+*** 4947,4953 ****
+ && MB_STRNICMP(lastpat, spats[last_idx].pat, STRLEN(lastpat)) == 0
+ && STRLEN(lastpat) == STRLEN(spats[last_idx].pat)
+ && EQUAL_POS(lastpos, curwin->w_cursor)
+! && lbuf == curbuf) || wraparound || cur < 0 || cur > 99)
+ {
+ cur = 0;
+ cnt = 0;
+--- 4955,4961 ----
+ && MB_STRNICMP(lastpat, spats[last_idx].pat, STRLEN(lastpat)) == 0
+ && STRLEN(lastpat) == STRLEN(spats[last_idx].pat)
+ && EQUAL_POS(lastpos, curwin->w_cursor)
+! && lbuf == curbuf) || wraparound || cur < 0 || cur > 99 || recompute)
+ {
+ cur = 0;
+ cnt = 0;
+*** ../vim-8.1.1389/src/version.c 2019-05-24 21:39:23.893950022 +0200
+--- src/version.c 2019-05-24 22:06:27.574780326 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1390,
+ /**/
+
+--
+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.1391 b/data/vim/patches/8.1.1391
new file mode 100644
index 000000000..4891d9b4f
--- /dev/null
+++ b/data/vim/patches/8.1.1391
@@ -0,0 +1,2800 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1391
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1391
+Problem: No popup window support.
+Solution: Add initial code for popup windows. Add the 'wincolor' option.
+Files: Filelist, runtime/doc/popup.txt, runtime/doc/options.txt,
+ src/Make_cyg_ming.mak, src/Make_mvc.mak, src/Make_vms.mms,
+ src/Makefile, src/autocmd.c, src/buffer.c, src/ex_cmds.h,
+ src/ex_cmdidxs.h, src/proto/buffer.pro, src/eval.c
+ src/evalfunc.c src/feature.h, src/globals.h, src/option.c,
+ src/option.h, src/popupwin.c, src/proto.h, src/proto/popupwin.pro,
+ src/proto/window.pro, src/screen.c, src/structs.h, src/terminal.c,
+ src/testdir/Make_all.mak, src/testdir/dumps/Test_popupwin_01.dump,
+ src/testdir/test_popupwin.vim, src/vim.h, src/window.c
+
+
+*** ../vim-8.1.1390/Filelist 2019-05-11 17:03:55.170019762 +0200
+--- Filelist 2019-05-24 22:33:32.615127282 +0200
+***************
+*** 79,84 ****
+--- 79,85 ----
+ src/option.c \
+ src/option.h \
+ src/popupmnu.c \
++ src/popupwin.c \
+ src/quickfix.c \
+ src/regexp.c \
+ src/regexp_nfa.c \
+***************
+*** 200,205 ****
+--- 201,207 ----
+ src/proto/ops.pro \
+ src/proto/option.pro \
+ src/proto/popupmnu.pro \
++ src/proto/popupwin.pro \
+ src/proto/quickfix.pro \
+ src/proto/regexp.pro \
+ src/proto/screen.pro \
+*** ../vim-8.1.1390/runtime/doc/popup.txt 2019-05-21 23:08:56.969600854 +0200
+--- runtime/doc/popup.txt 2019-05-25 19:20:08.717613939 +0200
+***************
+*** 27,38 ****
+ A popup window can be used for such things as:
+ - briefly show a message without changing the command line
+ - prompt the user with a dialog
+! - display information while typing
+ - give extra information for auto-completion
+
+ The text in the popup window can be colored with |text-properties|. It is
+ also possible to use syntax highlighting.
+
+ A popup window has a window-ID like other windows, but behaves differently.
+ The size can be up to the whole Vim window and it overlaps other windows.
+ It contains a buffer, and that buffer is always associated with the popup
+--- 27,45 ----
+ A popup window can be used for such things as:
+ - briefly show a message without changing the command line
+ - prompt the user with a dialog
+! - display contextual information while typing
+ - give extra information for auto-completion
+
+ The text in the popup window can be colored with |text-properties|. It is
+ also possible to use syntax highlighting.
+
++ The default color used is "Pmenu". If you prefer something else use the
++ "highlight" argument or the 'wincolor' option, e.g.: >
++ hi MyPopupColor ctermbg=lightblue guibg=lightblue
++ call setwinvar(winid, '&wincolor', 'MyPopupColor')
++
++ 'hlsearch' and match highlighting are not displayed in a popup window.
++
+ A popup window has a window-ID like other windows, but behaves differently.
+ The size can be up to the whole Vim window and it overlaps other windows.
+ It contains a buffer, and that buffer is always associated with the popup
+***************
+*** 46,51 ****
+--- 53,72 ----
+ - balloon, see |balloon-eval|
+
+
++ WINDOW POSITION AND SIZE *popup-position*
++
++ The height of the window is normally equal to the number of lines in the
++ buffer. It can be limited with the "maxheight" property. You can use empty
++ lines to increase the height.
++
++ The width of the window is normally equal to the longest line in the buffer.
++ It can be limited with the "maxwidth" property. You can use spaces to
++ increase the width.
++
++ By default the 'wrap' option is set, so that no text disappears. However, if
++ there is not enough space, some text may be invisible.
++
++
+ TODO:
+
+ Example how to use syntax highlighting of a code snippet.
+***************
+*** 57,78 ****
+ the scroll offset into account.
+ Probably 2. is the best choice.
+
+- Positioning relative to the popup-menu to avoid overlapping with it; add a
+- function to get the position and size of the popup-menu.
+-
+
+ IMPLEMENTATION:
+! - Put code in popupwin.c
+! - Use win_update() for displaying
+! - At first redraw all windows NOT_VALID when the popup moves or hides.
+! - At first always display the popup windows at the end of update_screen(),
+! lowest zindex first.
+! - Later make it more efficient and avoid flicker
+! - Use a separate list of windows, one for each tab and one global. Also put
+! "aucmd_win" in there.
+! - add optional {buf} command to execute(). Only works for a buffer that is
+! visible in a window in the current tab or in a popup window.
+! E.g. for execute('syntax enable', 'silent', bufnr)
+
+
+ ==============================================================================
+--- 78,91 ----
+ the scroll offset into account.
+ Probably 2. is the best choice.
+
+
+ IMPLEMENTATION:
+! - Code is in popupwin.c
+! - handle screen resize in screenalloc().
+! - Support tab-local popup windows, use tp_first_popupwin and
+! first_tab_popupwin. Swap like with firstwin/curwin.
+! - Make redrawing more efficient and avoid flicker.
+! - implement all the unimplemented features.
+
+
+ ==============================================================================
+***************
+*** 89,94 ****
+--- 102,108 ----
+ - a string
+ - a list of strings
+ - a list of text lines with text properties
++ {not implemented yet}
+ {options} is a dictionary with many possible entries.
+ See |popup_create-usage| for details.
+
+***************
+*** 98,106 ****
+--- 112,127 ----
+ let winid = popup_create('hello', {})
+ let bufnr = winbufnr(winid)
+ call setbufline(bufnr, 2, 'second line')
++ < In case of failure zero is returned.
++
++
++ popup_close({id}) *popup_close()*
++ Close popup {id}. The window and the associated buffer will
++ be deleted.
+
+
+ popup_dialog({text}, {options}) *popup_dialog()*
++ {not implemented yet}
+ Just like |popup_create()| but with these default options: >
+ call popup_create({text}, {
+ \ 'pos': 'center',
+***************
+*** 111,116 ****
+--- 132,138 ----
+
+
+ popup_notification({text}, {options}) *popup_notification()*
++ {not implemented yet}
+ Show the {text} for 3 seconds at the top of the Vim window.
+ This works like: >
+ call popup_create({text}, {
+***************
+*** 126,131 ****
+--- 148,154 ----
+
+
+ popup_atcursor({text}, {options}) *popup_atcursor()*
++ {not implemented yet}
+ Show the {text} above the cursor, and close it when the cursor
+ moves. This works like: >
+ call popup_create({text}, {
+***************
+*** 137,142 ****
+--- 160,166 ----
+
+
+ popup_menu({text}, {options}) *popup_menu()*
++ {not implemented yet}
+ Show the {text} near the cursor, handle selecting one of the
+ items with cursorkeys, and close it an item is selected with
+ Space or Enter. {text} should have multiple lines to make this
+***************
+*** 153,166 ****
+--- 177,193 ----
+
+
+ popup_show({id}) *popup_show()*
++ {not implemented yet}
+ If {id} is a hidden popup, show it now.
+
+ popup_hide({id}) *popup_hide()*
++ {not implemented yet}
+ If {id} is a displayed popup, hide it now. If the popup has a
+ filter it will not be invoked for so long as the popup is
+ hidden.
+
+ popup_move({id}, {options}) *popup_move()*
++ {not implemented yet}
+ Move popup {id} to the position speficied with {options}.
+ {options} may contain the items from |popup_create()| that
+ specify the popup position: "line", "col", "pos", "maxheight",
+***************
+*** 168,173 ****
+--- 195,201 ----
+
+
+ popup_filter_menu({id}, {key}) *popup_filter_menu()*
++ {not implemented yet}
+ Filter that can be used for a popup. It handles the cursor
+ keys to move the selected index in the popup. Space and Enter
+ can be used to select an item. Invokes the "callback" of the
+***************
+*** 176,181 ****
+--- 204,210 ----
+
+
+ popup_filter_yesno({id}, {key}) *popup_filter_yesno()*
++ {not implemented yet}
+ Filter that can be used for a popup. It handles only the keys
+ 'y', 'Y' and 'n' or 'N'. Invokes the "callback" of the
+ popup menu with the 1 for 'y' or 'Y' and zero for 'n' or 'N'
+***************
+*** 184,198 ****
+
+
+ popup_setoptions({id}, {options}) *popup_setoptions()*
+ Override options in popup {id} with entries in {options}.
+
+
+ popup_getoptions({id}) *popup_getoptions()*
+ Return the {options} for popup {id}.
+
+!
+! popup_close({id}) *popup_close()*
+! Close popup {id}.
+
+ *:popupclear* *:popupc*
+ :popupc[lear] Emergency solution to a misbehaving plugin: close all popup
+--- 213,243 ----
+
+
+ popup_setoptions({id}, {options}) *popup_setoptions()*
++ {not implemented yet}
+ Override options in popup {id} with entries in {options}.
+
+
+ popup_getoptions({id}) *popup_getoptions()*
++ {not implemented yet}
+ Return the {options} for popup {id}.
+
+! popup_getposition({id}) *popup_getposition()*
+! {not implemented yet}
+! Return the position and size of popup {id}. Returns a Dict
+! with these entries:
+! col screen column of the popup, one-based
+! line screen line of the popup, one-based
+! width width of the popup in screen cells
+! height height of the popup in screen cells
+!
+! win_execute({id}, {command})
+! {not implemented yet}
+! Like `execute()` but in the context of window {id}.
+! The window will temporarily be made the current window,
+! without triggering autocommands.
+! Example: >
+! call win_execute(winid, 'syntax enable')
+! <
+
+ *:popupclear* *:popupc*
+ :popupc[lear] Emergency solution to a misbehaving plugin: close all popup
+***************
+*** 209,214 ****
+--- 254,260 ----
+ - 'swapfile' is off
+ - 'bufhidden' is "hide"
+ - 'buflisted' is off
++ - 'undolevels' is -1: no undo at all
+ TODO: more
+
+ The window does have a cursor position, but the cursor is not displayed.
+***************
+*** 226,231 ****
+--- 272,278 ----
+ - a string
+ - a list of strings
+ - a list of dictionaries, where each dictionary has these entries:
++ {not implemented yet}
+ text String with the text to display.
+ props A list of text properties. Optional.
+ Each entry is a dictionary, like the third argument of
+***************
+*** 238,292 ****
+ "cursor", "cursor+1" or "cursor-1" to use the line of
+ the cursor and add or subtract a number of lines;
+ default is "cursor-1".
+ col screen column where to position the popup; can use
+ "cursor" to use the column of the cursor, "cursor+99"
+ and "cursor-99" to add or subtract a number of
+ columns; default is "cursor"
+ pos "topleft", "topright", "botleft" or "botright":
+ defines what corner of the popup "line" and "col" are
+ used for. Default is "botleft". Alternatively
+! "center" can be used to position the popup somewhere
+! near the cursor.
+ flip when TRUE (the default) and the position is relative
+ to the cursor, flip to below or above the cursor to
+ avoid overlap with the |popupmenu-completion| or
+ another popup with a higher "zindex"
+ maxheight maximum height
+ minheight minimum height
+ maxwidth maximum width
+ minwidth minimum width
+ hidden when TRUE the popup exists but is not displayed; use
+ `popup_show()` to unhide it.
+ tab when -1: display the popup on all tabs; when 0 (the
+ default): display the popup on the current tab;
+ otherwise the number of the tab page the popup is
+ displayed on; when invalid the current tab is used
+ title text to be displayed above the first item in the
+ popup, on top of any border
+ wrap TRUE to make the lines wrap (default TRUE)
+! highlight highlight group name to use for the text, defines the
+! background and foreground color
+ border list with numbers, defining the border thickness
+ above/right/below/left of the popup; an empty list
+ uses a border of 1 all around
+ borderhighlight highlight group name to use for the border
+ borderchars list with characters, defining the character to use
+ for the top/right/bottom/left border; optionally
+ followed by the character to use for the
+ topright/botright/botleft/topleft corner; an empty
+ list can be used to show a double line all around
+ zindex priority for the popup, default 50
+ time time in milliseconds after which the popup will close;
+ when omitted |popup_close()| must be used.
+ moved "cell": close the popup if the cursor moved at least
+ one screen cell; "word" allows for moving within
+ |<cword>|, "WORD" allows for moving within |<cWORD>|,
+ a list with two numbers specifies the start and end
+ column
+ filter a callback that can filter typed characters, see
+ |popup-filter|
+ callback a callback to be used when the popup closes, e.g. when
+ using |popup_filter_menu()|, see |popup-callback|.
+
+ Depending on the "zindex" the popup goes under or above other popups. The
+ completion menu (|popup-menu|) has zindex 100. For messages that occur for a
+--- 285,357 ----
+ "cursor", "cursor+1" or "cursor-1" to use the line of
+ the cursor and add or subtract a number of lines;
+ default is "cursor-1".
++ {only number is implemented}
+ col screen column where to position the popup; can use
+ "cursor" to use the column of the cursor, "cursor+99"
+ and "cursor-99" to add or subtract a number of
+ columns; default is "cursor"
++ {only number is implemented}
+ pos "topleft", "topright", "botleft" or "botright":
+ defines what corner of the popup "line" and "col" are
+ used for. Default is "botleft". Alternatively
+! "center" can be used to position the popup in the
+! center of the Vim window.
+! {not implemented yet}
+ flip when TRUE (the default) and the position is relative
+ to the cursor, flip to below or above the cursor to
+ avoid overlap with the |popupmenu-completion| or
+ another popup with a higher "zindex"
++ {not implemented yet}
+ maxheight maximum height
+ minheight minimum height
++ {not implemented yet}
+ maxwidth maximum width
+ minwidth minimum width
++ {not implemented yet}
+ hidden when TRUE the popup exists but is not displayed; use
+ `popup_show()` to unhide it.
++ {not implemented yet}
+ tab when -1: display the popup on all tabs; when 0 (the
+ default): display the popup on the current tab;
+ otherwise the number of the tab page the popup is
+ displayed on; when invalid the current tab is used
++ {only -1 and 0 are implemented}
+ title text to be displayed above the first item in the
+ popup, on top of any border
++ {not implemented yet}
+ wrap TRUE to make the lines wrap (default TRUE)
+! {not implemented yet}
+! highlight highlight group name to use for the text, stored in
+! 'wincolor'
+! {not implemented yet}
+ border list with numbers, defining the border thickness
+ above/right/below/left of the popup; an empty list
+ uses a border of 1 all around
++ {not implemented yet}
+ borderhighlight highlight group name to use for the border
++ {not implemented yet}
+ borderchars list with characters, defining the character to use
+ for the top/right/bottom/left border; optionally
+ followed by the character to use for the
+ topright/botright/botleft/topleft corner; an empty
+ list can be used to show a double line all around
++ {not implemented yet}
+ zindex priority for the popup, default 50
+ time time in milliseconds after which the popup will close;
+ when omitted |popup_close()| must be used.
++ {not implemented yet}
+ moved "cell": close the popup if the cursor moved at least
+ one screen cell; "word" allows for moving within
+ |<cword>|, "WORD" allows for moving within |<cWORD>|,
+ a list with two numbers specifies the start and end
+ column
++ {not implemented yet}
+ filter a callback that can filter typed characters, see
+ |popup-filter|
++ {not implemented yet}
+ callback a callback to be used when the popup closes, e.g. when
+ using |popup_filter_menu()|, see |popup-callback|.
++ {not implemented yet}
+
+ Depending on the "zindex" the popup goes under or above other popups. The
+ completion menu (|popup-menu|) has zindex 100. For messages that occur for a
+***************
+*** 299,304 ****
+--- 364,370 ----
+
+ POPUP TEXT PROPERTIES *popup-props*
+
++ {not implemented yet}
+ These are similar to the third argument of |prop_add()|, but not exactly the
+ same, since they only apply to one line.
+ col starting column, counted in bytes, use one for the
+***************
+*** 318,328 ****
+
+ POPUP FILTER *popup-filter*
+
+ A callback that gets any typed keys while a popup is displayed. The filter is
+! not invoked for as long as the popup is hidden.
+
+ The filter can return TRUE to indicate the key has been handled and is to be
+ discarded, or FALSE to let Vim handle the key as usual in the current state.
+
+ The filter function is called with two arguments: the ID of the popup and the
+ key.
+--- 384,398 ----
+
+ POPUP FILTER *popup-filter*
+
++ {not implemented yet}
+ A callback that gets any typed keys while a popup is displayed. The filter is
+! not invoked when the popup is hidden.
+
+ The filter can return TRUE to indicate the key has been handled and is to be
+ discarded, or FALSE to let Vim handle the key as usual in the current state.
++ In case it returns FALSE and there is another popup window visible, that
++ filter is also called. The filter of the popup window with the highest zindex
++ is called first.
+
+ The filter function is called with two arguments: the ID of the popup and the
+ key.
+***************
+*** 342,347 ****
+--- 412,418 ----
+
+ POPUP CALLBACK *popup-callback*
+
++ {not implemented yet}
+ A callback that is invoked when the popup closes. Used by
+ |popup_filter_menu()|. Invoked with two arguments: the ID of the popup and
+ the result, which would usually be an index in the popup lines, or whatever
+*** ../vim-8.1.1390/runtime/doc/options.txt 2019-05-23 22:11:56.288893239 +0200
+--- runtime/doc/options.txt 2019-05-25 15:00:16.330625497 +0200
+***************
+*** 1361,1366 ****
+--- 1361,1368 ----
+ prompt buffer where only the last line can be edited, meant
+ to be used by a plugin, see |prompt-buffer|
+ {only when compiled with the |+channel| feature}
++ popup buffer used in a popup window, see |popup|.
++ {only when compiled with the |+textprop| feature}
+
+ This option is used together with 'bufhidden' and 'swapfile' to
+ specify special kinds of buffers. See |special-buffers|.
+***************
+*** 8687,8692 ****
+--- 8689,8700 ----
+ This option is not used for <F10>; on Win32 and with GTK <F10> will
+ select the menu, unless it has been mapped.
+
++ *'wincolor'* *'wcr'*
++ 'wincolor' 'wcr' string (default empty)
++ local to window
++ Highlight group name to use for this window instead of the Normal
++ color |hl-Normal|.
++
+ *'window'* *'wi'*
+ 'window' 'wi' number (default screen height - 1)
+ global
+*** ../vim-8.1.1390/src/Make_cyg_ming.mak 2019-05-24 17:17:51.056467137 +0200
+--- src/Make_cyg_ming.mak 2019-05-24 22:30:18.367968169 +0200
+***************
+*** 740,745 ****
+--- 740,746 ----
+ $(OUTDIR)/os_win32.o \
+ $(OUTDIR)/pathdef.o \
+ $(OUTDIR)/popupmnu.o \
++ $(OUTDIR)/popupwin.o \
+ $(OUTDIR)/quickfix.o \
+ $(OUTDIR)/regexp.o \
+ $(OUTDIR)/screen.o \
+*** ../vim-8.1.1390/src/Make_mvc.mak 2019-05-24 17:17:51.056467137 +0200
+--- src/Make_mvc.mak 2019-05-24 22:31:07.527761674 +0200
+***************
+*** 743,748 ****
+--- 743,750 ----
+ $(OUTDIR)\os_win32.obj \
+ $(OUTDIR)\pathdef.obj \
+ $(OUTDIR)\popupmnu.obj \
++ $(OUTDIR)\popupwin.obj \
++ $(OUTDIR)\popupwin.obj \
+ $(OUTDIR)\quickfix.obj \
+ $(OUTDIR)\regexp.obj \
+ $(OUTDIR)\screen.obj \
+***************
+*** 1575,1580 ****
+--- 1577,1584 ----
+
+ $(OUTDIR)/popupmnu.obj: $(OUTDIR) popupmnu.c $(INCL)
+
++ $(OUTDIR)/popupwin.obj: $(OUTDIR) popupwin.c $(INCL)
++
+ $(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL)
+
+ $(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c regexp_nfa.c $(INCL)
+***************
+*** 1745,1750 ****
+--- 1749,1755 ----
+ proto/winclip.pro \
+ proto/os_win32.pro \
+ proto/popupmnu.pro \
++ proto/popupwin.pro \
+ proto/quickfix.pro \
+ proto/regexp.pro \
+ proto/screen.pro \
+*** ../vim-8.1.1390/src/Make_vms.mms 2019-05-11 21:50:03.941292990 +0200
+--- src/Make_vms.mms 2019-05-24 22:31:47.011592541 +0200
+***************
+*** 2,8 ****
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 May 11
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+--- 2,8 ----
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2019 May 24
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+***************
+*** 313,319 ****
+ if_cscope.c if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c \
+ hardcopy.c hashtab.c indent.c insexpand.c json.c list.c main.c mark.c \
+ menu.c mbyte.c memfile.c memline.c message.c misc1.c misc2.c move.c \
+! normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c \
+ sha256.c sign.c spell.c spellfile.c syntax.c tag.c term.c termlib.c \
+ textprop.c ui.c undo.c usercmd.c userfunc.c version.c screen.c \
+ window.c os_unix.c os_vms.c pathdef.c \
+--- 313,319 ----
+ if_cscope.c if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c \
+ hardcopy.c hashtab.c indent.c insexpand.c json.c list.c main.c mark.c \
+ menu.c mbyte.c memfile.c memline.c message.c misc1.c misc2.c move.c \
+! normal.c ops.c option.c popupmnu.c popupwin.c, quickfix.c regexp.c search.c \
+ sha256.c sign.c spell.c spellfile.c syntax.c tag.c term.c termlib.c \
+ textprop.c ui.c undo.c usercmd.c userfunc.c version.c screen.c \
+ window.c os_unix.c os_vms.c pathdef.c \
+***************
+*** 327,333 ****
+ fileio.obj findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
+ indent.obj insexpand.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+! move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj \
+ quickfix.obj regexp.obj search.obj sha256.obj sign.obj spell.obj \
+ spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \
+ ui.obj undo.obj usercmd.obj userfunc.obj screen.obj version.obj \
+--- 327,333 ----
+ fileio.obj findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
+ indent.obj insexpand.obj json.obj list.obj main.obj mark.obj \
+ menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
+! move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj popupwin.obj\
+ quickfix.obj regexp.obj search.obj sha256.obj sign.obj spell.obj \
+ spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \
+ ui.obj undo.obj usercmd.obj userfunc.obj screen.obj version.obj \
+***************
+*** 688,693 ****
+--- 688,697 ----
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+ globals.h
++ popupwin.obj : popupwin.c vim.h [.auto]config.h feature.h os_unix.h \
++ ascii.h keymap.h term.h macros.h structs.h regexp.h \
++ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
++ globals.h
+ quickfix.obj : quickfix.c vim.h [.auto]config.h feature.h os_unix.h \
+ ascii.h keymap.h term.h macros.h structs.h regexp.h \
+ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+*** ../vim-8.1.1390/src/Makefile 2019-05-19 21:44:03.978804771 +0200
+--- src/Makefile 2019-05-24 22:32:52.027308164 +0200
+***************
+*** 1620,1625 ****
+--- 1621,1627 ----
+ os_unix.c \
+ auto/pathdef.c \
+ popupmnu.c \
++ popupwin.c \
+ pty.c \
+ quickfix.c \
+ regexp.c \
+***************
+*** 1734,1739 ****
+--- 1736,1742 ----
+ objects/os_unix.o \
+ objects/pathdef.o \
+ objects/popupmnu.o \
++ objects/popupwin.o \
+ objects/pty.o \
+ objects/quickfix.o \
+ objects/regexp.o \
+***************
+*** 1873,1878 ****
+--- 1876,1882 ----
+ os_mac_conv.pro \
+ os_unix.pro \
+ popupmnu.pro \
++ popupwin.pro \
+ pty.pro \
+ quickfix.pro \
+ regexp.pro \
+***************
+*** 3208,3213 ****
+--- 3212,3220 ----
+ objects/popupmnu.o: popupmnu.c
+ $(CCC) -o $@ popupmnu.c
+
++ objects/popupwin.o: popupwin.c
++ $(CCC) -o $@ popupwin.c
++
+ objects/pty.o: pty.c
+ $(CCC) -o $@ pty.c
+
+***************
+*** 3612,3617 ****
+--- 3619,3628 ----
+ 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
++ objects/popupwin.o: popupwin.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
+ 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 \
+*** ../vim-8.1.1390/src/autocmd.c 2019-05-24 18:48:36.750128544 +0200
+--- src/autocmd.c 2019-05-25 17:04:32.422149360 +0200
+***************
+*** 1349,1355 ****
+ */
+ FOR_ALL_BUFFERS(buf)
+ {
+! if (buf->b_ml.ml_mfp != NULL)
+ {
+ // find a window for this buffer and save some values
+ aucmd_prepbuf(&aco, buf);
+--- 1349,1355 ----
+ */
+ FOR_ALL_BUFFERS(buf)
+ {
+! if (buf->b_ml.ml_mfp != NULL && !bt_popup(buf))
+ {
+ // find a window for this buffer and save some values
+ aucmd_prepbuf(&aco, buf);
+***************
+*** 1423,1429 ****
+ // back to using the current window.
+ if (win == NULL && aucmd_win == NULL)
+ {
+! win_alloc_aucmd_win();
+ if (aucmd_win == NULL)
+ win = curwin;
+ }
+--- 1423,1429 ----
+ // back to using the current window.
+ if (win == NULL && aucmd_win == NULL)
+ {
+! aucmd_win = win_alloc_popup_win();
+ if (aucmd_win == NULL)
+ win = curwin;
+ }
+***************
+*** 1451,1470 ****
+ // unexpected results.
+ aco->use_aucmd_win = TRUE;
+ aucmd_win_used = TRUE;
+- aucmd_win->w_buffer = buf;
+- #if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
+- aucmd_win->w_s = &buf->b_s;
+- #endif
+- ++buf->b_nwindows;
+- win_init_empty(aucmd_win); // set cursor and topline to safe values
+
+! // Make sure w_localdir and globaldir are NULL to avoid a chdir() in
+! // win_enter_ext().
+! VIM_CLEAR(aucmd_win->w_localdir);
+ aco->globaldir = globaldir;
+ globaldir = NULL;
+
+-
+ // Split the current window, put the aucmd_win in the upper half.
+ // We don't want the BufEnter or WinEnter autocommands.
+ block_autocmds();
+--- 1451,1462 ----
+ // unexpected results.
+ aco->use_aucmd_win = TRUE;
+ aucmd_win_used = TRUE;
+
+! win_init_popup_win(aucmd_win, buf);
+!
+ aco->globaldir = globaldir;
+ globaldir = NULL;
+
+ // Split the current window, put the aucmd_win in the upper half.
+ // We don't want the BufEnter or WinEnter autocommands.
+ block_autocmds();
+***************
+*** 1620,1625 ****
+--- 1612,1619 ----
+ int force, // when TRUE, ignore autocmd_busy
+ buf_T *buf) // buffer for <abuf>
+ {
++ if (bt_popup(buf))
++ return FALSE;
+ return apply_autocmds_group(event, fname, fname_io, force,
+ AUGROUP_ALL, buf, NULL);
+ }
+*** ../vim-8.1.1390/src/buffer.c 2019-05-24 19:38:59.096545552 +0200
+--- src/buffer.c 2019-05-25 19:44:01.510535075 +0200
+***************
+*** 456,462 ****
+ win_T *win, /* if not NULL, set b_last_cursor */
+ buf_T *buf,
+ int action,
+! int abort_if_last UNUSED)
+ {
+ int is_curbuf;
+ int nwindows;
+--- 456,462 ----
+ win_T *win, /* if not NULL, set b_last_cursor */
+ buf_T *buf,
+ int action,
+! int abort_if_last)
+ {
+ int is_curbuf;
+ int nwindows;
+***************
+*** 5678,5684 ****
+ int
+ bt_prompt(buf_T *buf)
+ {
+! return buf != NULL && buf->b_p_bt[0] == 'p';
+ }
+
+ /*
+--- 5678,5694 ----
+ int
+ bt_prompt(buf_T *buf)
+ {
+! return buf != NULL && buf->b_p_bt[0] == 'p' && buf->b_p_bt[1] == 'r';
+! }
+!
+! /*
+! * Return TRUE if "buf" is a buffer for a popup window.
+! */
+! int
+! bt_popup(buf_T *buf)
+! {
+! return buf != NULL && buf->b_p_bt != NULL
+! && buf->b_p_bt[0] == 'p' && buf->b_p_bt[1] == 'o';
+ }
+
+ /*
+*** ../vim-8.1.1390/src/ex_cmds.h 2019-05-09 18:59:27.228463605 +0200
+--- src/ex_cmds.h 2019-05-25 17:30:22.174244851 +0200
+***************
+*** 1091,1096 ****
+--- 1091,1099 ----
+ EX(CMD_popup, "popup", ex_popup,
+ NEEDARG|EXTRA|BANG|TRLBAR|NOTRLCOM|CMDWIN,
+ ADDR_NONE),
++ EX(CMD_popupclear, "popupclear", ex_popupclear,
++ TRLBAR,
++ ADDR_NONE),
+ EX(CMD_ppop, "ppop", ex_ptag,
+ RANGE|BANG|COUNT|TRLBAR|ZEROR,
+ ADDR_OTHER),
+*** ../vim-8.1.1390/src/ex_cmdidxs.h 2019-05-09 18:59:27.228463605 +0200
+--- src/ex_cmdidxs.h 2019-05-25 17:29:11.210621047 +0200
+***************
+*** 21,36 ****
+ /* n */ 285,
+ /* o */ 305,
+ /* p */ 317,
+! /* q */ 356,
+! /* r */ 359,
+! /* s */ 379,
+! /* t */ 447,
+! /* u */ 492,
+! /* v */ 503,
+! /* w */ 521,
+! /* x */ 535,
+! /* y */ 545,
+! /* z */ 546
+ };
+
+ /*
+--- 21,36 ----
+ /* n */ 285,
+ /* o */ 305,
+ /* p */ 317,
+! /* q */ 357,
+! /* r */ 360,
+! /* s */ 380,
+! /* t */ 448,
+! /* u */ 493,
+! /* v */ 504,
+! /* w */ 522,
+! /* x */ 536,
+! /* y */ 546,
+! /* z */ 547
+ };
+
+ /*
+***************
+*** 56,62 ****
+ /* m */ { 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 },
+ /* n */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 10, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0 },
+ /* o */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 0, 0, 0, 0, 0, 0, 9, 0, 11, 0, 0, 0 },
+! /* p */ { 1, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 0, 0, 16, 17, 26, 0, 27, 0, 28, 0 },
+ /* 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, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 19, 0, 0, 0, 0 },
+ /* s */ { 2, 6, 15, 0, 19, 23, 0, 25, 26, 0, 0, 29, 31, 35, 39, 41, 0, 49, 0, 50, 0, 62, 63, 0, 64, 0 },
+--- 56,62 ----
+ /* m */ { 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 },
+ /* n */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 10, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0 },
+ /* o */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 0, 0, 0, 0, 0, 0, 9, 0, 11, 0, 0, 0 },
+! /* p */ { 1, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 10, 0, 0, 17, 18, 27, 0, 28, 0, 29, 0 },
+ /* 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, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 19, 0, 0, 0, 0 },
+ /* s */ { 2, 6, 15, 0, 19, 23, 0, 25, 26, 0, 0, 29, 31, 35, 39, 41, 0, 49, 0, 50, 0, 62, 63, 0, 64, 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 = 559;
+--- 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 = 560;
+*** ../vim-8.1.1390/src/proto/buffer.pro 2019-01-13 23:38:33.407773189 +0100
+--- src/proto/buffer.pro 2019-05-25 14:03:03.028491435 +0200
+***************
+*** 61,66 ****
+--- 61,67 ----
+ int bt_terminal(buf_T *buf);
+ int bt_help(buf_T *buf);
+ int bt_prompt(buf_T *buf);
++ int bt_popup(buf_T *buf);
+ int bt_nofile(buf_T *buf);
+ int bt_dontwrite(buf_T *buf);
+ int bt_dontwrite_msg(buf_T *buf);
+*** ../vim-8.1.1390/src/eval.c 2019-05-24 19:38:59.096545552 +0200
+--- src/eval.c 2019-05-25 16:57:22.652587804 +0200
+***************
+*** 5585,5590 ****
+--- 5585,5603 ----
+ if (aucmd_win != NULL)
+ abort = abort || set_ref_in_item(&aucmd_win->w_winvar.di_tv, copyID,
+ NULL, NULL);
++ #ifdef FEAT_TEXT_PROP
++ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
++ abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
++ NULL, NULL);
++ for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next)
++ abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
++ NULL, NULL);
++ FOR_ALL_TABPAGES(tp)
++ if (tp != curtab)
++ for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
++ abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
++ NULL, NULL);
++ #endif
+
+ /* tabpage-local variables */
+ FOR_ALL_TABPAGES(tp)
+***************
+*** 8801,8807 ****
+--- 8814,8833 ----
+ break;
+ }
+ if (nr >= LOWEST_WIN_ID)
++ {
++ #ifdef FEAT_TEXT_PROP
++ // popup windows are in a separate list
++ for (wp = (tp == NULL || tp == curtab)
++ ? first_tab_popupwin : tp->tp_first_popupwin;
++ wp != NULL; wp = wp->w_next)
++ if (wp->w_id == nr)
++ return wp;
++ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
++ if (wp->w_id == nr)
++ return wp;
++ #endif
+ return NULL;
++ }
+ return wp;
+ }
+
+*** ../vim-8.1.1390/src/evalfunc.c 2019-05-24 18:48:36.754128525 +0200
+--- src/evalfunc.c 2019-05-25 16:26:56.415485375 +0200
+***************
+*** 807,812 ****
+--- 807,816 ----
+ #ifdef FEAT_PERL
+ {"perleval", 1, 1, f_perleval},
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ {"popup_close", 1, 1, f_popup_close},
++ {"popup_create", 2, 2, f_popup_create},
++ #endif
+ #ifdef FEAT_FLOAT
+ {"pow", 2, 2, f_pow},
+ #endif
+*** ../vim-8.1.1390/src/feature.h 2019-04-28 19:46:17.026060122 +0200
+--- src/feature.h 2019-05-24 22:14:50.440233462 +0200
+***************
+*** 477,483 ****
+ #endif
+
+ /*
+! * +textprop Text properties
+ */
+ #if defined(FEAT_EVAL) && defined(FEAT_SYN_HL)
+ # define FEAT_TEXT_PROP
+--- 477,483 ----
+ #endif
+
+ /*
+! * +textprop Text properties and popup windows
+ */
+ #if defined(FEAT_EVAL) && defined(FEAT_SYN_HL)
+ # define FEAT_TEXT_PROP
+*** ../vim-8.1.1390/src/globals.h 2019-05-09 18:59:27.228463605 +0200
+--- src/globals.h 2019-05-24 22:20:53.310303408 +0200
+***************
+*** 550,558 ****
+ #endif
+
+ /*
+! * All windows are linked in a list. firstwin points to the first entry,
+! * lastwin to the last entry (can be the same as firstwin) and curwin to the
+! * currently active window.
+ */
+ EXTERN win_T *firstwin; /* first window */
+ EXTERN win_T *lastwin; /* last window */
+--- 550,559 ----
+ #endif
+
+ /*
+! * All regular windows are linked in a list. "firstwin" points to the first
+! * entry, "lastwin" to the last entry (can be the same as firstwin) and
+! * "curwin" to the currently active window.
+! * When switching tabs these swapped with the pointers in "tabpage_T".
+ */
+ EXTERN win_T *firstwin; /* first window */
+ EXTERN win_T *lastwin; /* last window */
+***************
+*** 580,585 ****
+--- 581,591 ----
+ EXTERN win_T *aucmd_win; /* window used in aucmd_prepbuf() */
+ EXTERN int aucmd_win_used INIT(= FALSE); /* aucmd_win is being used */
+
++ #ifdef FEAT_TEXT_PROP
++ EXTERN win_T *first_tab_popupwin; // first popup window local to tab page
++ EXTERN win_T *first_popupwin; // first global popup window
++ #endif
++
+ /*
+ * The window layout is kept in a tree of frames. topframe points to the top
+ * of the tree.
+*** ../vim-8.1.1390/src/option.c 2019-05-24 18:48:36.766128461 +0200
+--- src/option.c 2019-05-25 15:05:25.377343756 +0200
+***************
+*** 196,201 ****
+--- 196,202 ----
+ # define PV_BRI OPT_WIN(WV_BRI)
+ # define PV_BRIOPT OPT_WIN(WV_BRIOPT)
+ #endif
++ # define PV_WCR OPT_WIN(WV_WCR)
+ #ifdef FEAT_DIFF
+ # define PV_DIFF OPT_WIN(WV_DIFF)
+ #endif
+***************
+*** 3033,3038 ****
+--- 3034,3043 ----
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+ SCTX_INIT},
++ {"wincolor", "wcr", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN,
++ (char_u *)VAR_WIN, PV_WCR,
++ {(char_u *)"", (char_u *)NULL}
++ SCTX_INIT},
+ {"window", "wi", P_NUM|P_VI_DEF,
+ (char_u *)&p_window, PV_NONE,
+ {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+***************
+*** 3211,3217 ****
+ static char *(p_scbopt_values[]) = {"ver", "hor", "jump", NULL};
+ static char *(p_debug_values[]) = {"msg", "throw", "beep", NULL};
+ static char *(p_ead_values[]) = {"both", "ver", "hor", NULL};
+! static char *(p_buftype_values[]) = {"nofile", "nowrite", "quickfix", "help", "terminal", "acwrite", "prompt", NULL};
+ static char *(p_bufhidden_values[]) = {"hide", "unload", "delete", "wipe", NULL};
+ static char *(p_bs_values[]) = {"indent", "eol", "start", NULL};
+ #ifdef FEAT_FOLDING
+--- 3216,3222 ----
+ static char *(p_scbopt_values[]) = {"ver", "hor", "jump", NULL};
+ static char *(p_debug_values[]) = {"msg", "throw", "beep", NULL};
+ static char *(p_ead_values[]) = {"both", "ver", "hor", NULL};
+! static char *(p_buftype_values[]) = {"nofile", "nowrite", "quickfix", "help", "terminal", "acwrite", "prompt", "popup", NULL};
+ static char *(p_bufhidden_values[]) = {"hide", "unload", "delete", "wipe", NULL};
+ static char *(p_bs_values[]) = {"indent", "eol", "start", NULL};
+ #ifdef FEAT_FOLDING
+***************
+*** 10940,10945 ****
+--- 10945,10951 ----
+ case PV_BRI: return (char_u *)&(curwin->w_p_bri);
+ case PV_BRIOPT: return (char_u *)&(curwin->w_p_briopt);
+ #endif
++ case PV_WCR: return (char_u *)&(curwin->w_p_wcr);
+ case PV_SCBIND: return (char_u *)&(curwin->w_p_scb);
+ case PV_CRBIND: return (char_u *)&(curwin->w_p_crb);
+ #ifdef FEAT_CONCEAL
+***************
+*** 11124,11129 ****
+--- 11130,11136 ----
+ to->wo_bri = from->wo_bri;
+ to->wo_briopt = vim_strsave(from->wo_briopt);
+ #endif
++ to->wo_wcr = vim_strsave(from->wo_wcr);
+ to->wo_scb = from->wo_scb;
+ to->wo_scb_save = from->wo_scb_save;
+ to->wo_crb = from->wo_crb;
+***************
+*** 11221,11226 ****
+--- 11228,11234 ----
+ #ifdef FEAT_LINEBREAK
+ check_string_option(&wop->wo_briopt);
+ #endif
++ check_string_option(&wop->wo_wcr);
+ }
+
+ /*
+***************
+*** 11245,11250 ****
+--- 11253,11259 ----
+ #ifdef FEAT_LINEBREAK
+ clear_string_option(&wop->wo_briopt);
+ #endif
++ clear_string_option(&wop->wo_wcr);
+ #ifdef FEAT_RIGHTLEFT
+ clear_string_option(&wop->wo_rlc);
+ #endif
+*** ../vim-8.1.1390/src/option.h 2019-05-23 15:37:41.965634969 +0200
+--- src/option.h 2019-05-25 15:02:04.434201608 +0200
+***************
+*** 1116,1121 ****
+--- 1116,1122 ----
+ , WV_BRI
+ , WV_BRIOPT
+ #endif
++ , WV_WCR
+ #ifdef FEAT_DIFF
+ , WV_DIFF
+ #endif
+*** ../vim-8.1.1390/src/popupwin.c 2019-05-25 19:47:19.985538034 +0200
+--- src/popupwin.c 2019-05-25 19:08:46.369293173 +0200
+***************
+*** 0 ****
+--- 1,231 ----
++ /* vi:set ts=8 sts=4 sw=4 noet:
++ *
++ * VIM - Vi IMproved by Bram Moolenaar
++ *
++ * Do ":help uganda" in Vim to read a list of people who contributed.
++ * Do ":help credits" in Vim to see a list of people who contributed.
++ * See README.txt for an overview of the Vim source code.
++ */
++
++ /*
++ * Implementation of popup windows. See ":help popup".
++ */
++
++ #include "vim.h"
++
++ #ifdef FEAT_TEXT_PROP
++
++ /*
++ * Go through the options in "dict" and apply them to buffer "buf" displayed in
++ * popup window "wp".
++ */
++ static void
++ apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict)
++ {
++ wp->w_maxwidth = dict_get_number(dict, (char_u *)"maxwidth");
++ wp->w_maxheight = dict_get_number(dict, (char_u *)"maxheight");
++ wp->w_winrow = dict_get_number(dict, (char_u *)"line");
++ wp->w_wincol = dict_get_number(dict, (char_u *)"col");
++ wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
++ }
++
++ /*
++ * popup_create({text}, {options})
++ */
++ void
++ f_popup_create(typval_T *argvars, typval_T *rettv)
++ {
++ win_T *wp;
++ buf_T *buf;
++ dict_T *d;
++ int nr;
++
++ // Check arguments look OK.
++ if (!(argvars[0].v_type == VAR_STRING
++ && argvars[0].vval.v_string != NULL
++ && STRLEN(argvars[0].vval.v_string) > 0)
++ && !(argvars[0].v_type == VAR_LIST
++ && argvars[0].vval.v_list != NULL
++ && argvars[0].vval.v_list->lv_len > 0))
++ {
++ emsg(_(e_listreq));
++ return;
++ }
++ if (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL)
++ {
++ emsg(_(e_dictreq));
++ return;
++ }
++ d = argvars[1].vval.v_dict;
++
++ // Create the window and buffer.
++ wp = win_alloc_popup_win();
++ if (wp == NULL)
++ return;
++ rettv->vval.v_number = wp->w_id;
++ wp->w_p_wrap = TRUE; // 'wrap' is default on
++
++ buf = buflist_new(NULL, NULL, (linenr_T)0, BLN_NEW|BLN_LISTED|BLN_DUMMY);
++ if (buf == NULL)
++ return;
++ ml_open(buf);
++ curbuf = buf;
++ set_string_option_direct((char_u *)"buftype", -1,
++ (char_u *)"popup", OPT_FREE|OPT_LOCAL, 0);
++ set_string_option_direct((char_u *)"bufhidden", -1,
++ (char_u *)"hide", OPT_FREE|OPT_LOCAL, 0);
++ curbuf = curwin->w_buffer;
++ buf->b_p_ul = -1; // no undo
++ buf->b_p_swf = FALSE; // no swap file
++ buf->b_p_bl = FALSE; // unlisted buffer
++
++ win_init_popup_win(wp, buf);
++
++ nr = (int)dict_get_number(d, (char_u *)"tab");
++ if (nr == 0)
++ {
++ // popup on current tab
++ wp->w_next = first_tab_popupwin;
++ first_tab_popupwin = wp;
++ }
++ else if (nr < 0)
++ {
++ // global popup
++ wp->w_next = first_popupwin;
++ first_popupwin = wp;
++ }
++ else
++ // TODO: find tab page "nr"
++ emsg("Not implemented yet");
++
++ // Add text to the buffer.
++ if (argvars[0].v_type == VAR_STRING)
++ // just a string
++ ml_append_buf(buf, 0, argvars[0].vval.v_string, (colnr_T)0, TRUE);
++ else if (argvars[0].vval.v_list->lv_first->li_tv.v_type == VAR_STRING)
++ {
++ listitem_T *li;
++ linenr_T lnum = 0;
++ char_u *p;
++
++ // list of strings
++ for (li = argvars[0].vval.v_list->lv_first; li != NULL;
++ li = li->li_next)
++ if (li->li_tv.v_type == VAR_STRING)
++ {
++ p = li->li_tv.vval.v_string;
++ ml_append_buf(buf, lnum++,
++ p == NULL ? (char_u *)"" : p, (colnr_T)0, TRUE);
++ }
++ }
++ else
++ // TODO: handle a list of dictionaries
++ emsg("Not implemented yet");
++
++ // Delete the line of the empty buffer.
++ curbuf = buf;
++ ml_delete(buf->b_ml.ml_line_count, FALSE);
++ curbuf = curwin->w_buffer;
++
++ // Deal with options.
++ apply_options(wp, buf, argvars[1].vval.v_dict);
++
++ // set default values
++ if (wp->w_zindex == 0)
++ wp->w_zindex = 50;
++
++ // TODO: Compute the size and position properly.
++
++ // Default position is in middle of the screen, assuming a small popup
++ if (wp->w_winrow == 0)
++ wp->w_winrow = Rows > 5 ? Rows / 2 - 2 : 0;
++ else
++ --wp->w_winrow; // option value is one-based
++ if (wp->w_wincol == 0)
++ wp->w_wincol = Columns > 20 ? Columns / 2 - 10 : 0;
++ else
++ --wp->w_wincol; // option value is one-based
++
++
++ // TODO: set width based on longest text line and the 'wrap' option
++ wp->w_width = wp->w_maxwidth == 0 ? 20 : wp->w_maxwidth;
++ if (wp->w_maxwidth > 0 && wp->w_width > wp->w_maxwidth)
++ wp->w_width = wp->w_maxwidth;
++ if (wp->w_width > Columns - wp->w_wincol)
++ wp->w_width = Columns - wp->w_wincol;
++
++ // TODO: adjust height for wrapped lines
++ wp->w_height = buf->b_ml.ml_line_count;
++ if (wp->w_maxheight > 0 && wp->w_height > wp->w_maxheight)
++ wp->w_height = wp->w_maxheight;
++ if (wp->w_height > Rows - wp->w_winrow)
++ wp->w_height = Rows - wp->w_winrow;
++
++ wp->w_vsep_width = 0;
++
++ redraw_all_later(NOT_VALID);
++ }
++
++ /*
++ * popup_close({id})
++ */
++ void
++ f_popup_close(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ int nr = (int)tv_get_number(argvars);
++
++ popup_close(nr);
++ }
++
++ void
++ popup_close(int nr)
++ {
++ win_T *wp;
++ win_T *prev = NULL;
++
++ for (wp = first_popupwin; wp != NULL; prev = wp, wp = wp->w_next)
++ if (wp->w_id == nr)
++ {
++ if (prev == NULL)
++ first_popupwin = wp->w_next;
++ else
++ prev->w_next = wp->w_next;
++ break;
++ }
++
++ if (wp == NULL)
++ {
++ prev = NULL;
++ for (wp = first_tab_popupwin; wp != NULL; prev = wp, wp = wp->w_next)
++ if (wp->w_id == nr)
++ {
++ if (prev == NULL)
++ first_tab_popupwin = wp->w_next;
++ else
++ prev->w_next = wp->w_next;
++ break;
++ }
++ }
++ if (wp != NULL)
++ {
++ win_free_popup(wp);
++ redraw_all_later(NOT_VALID);
++ }
++ }
++
++ void
++ close_all_popups(void)
++ {
++ while (first_popupwin != NULL)
++ popup_close(first_popupwin->w_id);
++ while (first_tab_popupwin != NULL)
++ popup_close(first_tab_popupwin->w_id);
++ }
++
++ void
++ ex_popupclear(exarg_T *eap UNUSED)
++ {
++ close_all_popups();
++ }
++
++ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.1390/src/proto.h 2019-05-11 17:03:55.170019762 +0200
+--- src/proto.h 2019-05-24 22:27:53.816544293 +0200
+***************
+*** 195,200 ****
+--- 195,201 ----
+ # include "termlib.pro"
+ # endif
+ # ifdef FEAT_TEXT_PROP
++ # include "popupwin.pro"
+ # include "textprop.pro"
+ # endif
+ # include "ui.pro"
+*** ../vim-8.1.1390/src/proto/popupwin.pro 2019-05-25 19:47:19.993537992 +0200
+--- src/proto/popupwin.pro 2019-05-25 17:26:36.855434511 +0200
+***************
+*** 0 ****
+--- 1,7 ----
++ /* popupwin.c */
++ void f_popup_create(typval_T *argvars, typval_T *rettv);
++ void f_popup_close(typval_T *argvars, typval_T *rettv);
++ void popup_close(int nr);
++ void close_all_popups(void);
++ void ex_popupclear(exarg_T *eap);
++ /* vim: set ft=c : */
+*** ../vim-8.1.1390/src/proto/window.pro 2019-04-25 22:21:56.931749183 +0200
+--- src/proto/window.pro 2019-05-25 16:50:12.447083290 +0200
+***************
+*** 19,25 ****
+ void curwin_init(void);
+ void win_init_empty(win_T *wp);
+ int win_alloc_first(void);
+! void win_alloc_aucmd_win(void);
+ void win_init_size(void);
+ void free_tabpage(tabpage_T *tp);
+ int win_new_tabpage(int after);
+--- 19,26 ----
+ void curwin_init(void);
+ void win_init_empty(win_T *wp);
+ int win_alloc_first(void);
+! win_T *win_alloc_popup_win(void);
+! void win_init_popup_win(win_T *wp, buf_T *buf);
+ void win_init_size(void);
+ void free_tabpage(tabpage_T *tp);
+ int win_new_tabpage(int after);
+***************
+*** 42,47 ****
+--- 43,50 ----
+ void win_enter(win_T *wp, int undo_sync);
+ win_T *buf_jump_open_win(buf_T *buf);
+ win_T *buf_jump_open_tab(buf_T *buf);
++ int win_unlisted(win_T *wp);
++ void win_free_popup(win_T *win);
+ void win_append(win_T *after, win_T *wp);
+ void win_remove(win_T *wp, tabpage_T *tp);
+ int win_alloc_lines(win_T *wp);
+*** ../vim-8.1.1390/src/screen.c 2019-05-24 19:38:59.108545464 +0200
+--- src/screen.c 2019-05-25 18:19:31.972693309 +0200
+***************
+*** 121,126 ****
+--- 121,129 ----
+ */
+ static schar_T *current_ScreenLine;
+
++ #ifdef FEAT_TEXT_PROP
++ static void update_popups(void);
++ #endif
+ static void win_update(win_T *wp);
+ static void win_redr_status(win_T *wp, int ignore_pum);
+ static void win_draw_end(win_T *wp, int c1, int c2, int draw_margin, int row, int endrow, hlf_T hl);
+***************
+*** 178,183 ****
+--- 181,190 ----
+ # define HAS_RIGHTLEFT(x) FALSE
+ #endif
+
++ // flags for screen_line()
++ #define SLF_RIGHTLEFT 1
++ #define SLF_POPUP 2
++
+ /*
+ * Redraw the current window later, with update_screen(type).
+ * Set must_redraw only if not already set to a higher value.
+***************
+*** 406,412 ****
+ mch_memmove(ScreenLines2 + off,
+ screenline2 + r * cols,
+ (size_t)cols * sizeof(schar_T));
+! screen_line(cmdline_row + r, 0, cols, cols, FALSE);
+ }
+ ret = 4;
+ }
+--- 413,419 ----
+ mch_memmove(ScreenLines2 + off,
+ screenline2 + r * cols,
+ (size_t)cols * sizeof(schar_T));
+! screen_line(cmdline_row + r, 0, cols, cols, 0);
+ }
+ ret = 4;
+ }
+***************
+*** 604,609 ****
+--- 611,621 ----
+ curwin->w_lines_valid = 0; /* don't use w_lines[].wl_size now */
+ return FAIL;
+ }
++ #ifdef FEAT_TEXT_PROP
++ // TODO: avoid redrawing everything when there is a popup window.
++ if (first_popupwin != NULL || first_tab_popupwin != NULL)
++ type = NOT_VALID;
++ #endif
+
+ updating_screen = TRUE;
+ #ifdef FEAT_SYN_HL
+***************
+*** 811,816 ****
+--- 823,833 ----
+ maybe_intro_message();
+ did_intro = TRUE;
+
++ #ifdef FEAT_TEXT_PROP
++ // Display popup windows on top of the others.
++ update_popups();
++ #endif
++
+ #ifdef FEAT_GUI
+ /* Redraw the cursor and update the scrollbars when all screen updating is
+ * done. */
+***************
+*** 975,980 ****
+--- 992,1041 ----
+ }
+ #endif
+
++ #ifdef FEAT_TEXT_PROP
++ static void
++ update_popups(void)
++ {
++ win_T *wp;
++ win_T *lowest_wp;
++ int lowest_zindex;
++
++ // Reset all the VALID_POPUP flags.
++ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
++ wp->w_valid &= ~VALID_POPUP;
++ for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next)
++ wp->w_valid &= ~VALID_POPUP;
++
++ // TODO: don't redraw every popup every time.
++ for (;;)
++ {
++ // Find the window with the lowest zindex that hasn't been updated yet,
++ // so that the window with a higher zindex is drawn later, thus goes on
++ // top.
++ lowest_zindex = INT_MAX;
++ lowest_wp = NULL;
++ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
++ if ((wp->w_valid & VALID_POPUP) == 0
++ && wp->w_zindex < lowest_zindex)
++ {
++ lowest_zindex = wp->w_zindex;
++ lowest_wp = wp;
++ }
++ for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next)
++ if ((wp->w_valid & VALID_POPUP) == 0
++ && wp->w_zindex < lowest_zindex)
++ {
++ lowest_zindex = wp->w_zindex;
++ lowest_wp = wp;
++ }
++
++ if (lowest_wp == NULL)
++ break;
++ win_update(lowest_wp);
++ lowest_wp->w_valid |= VALID_POPUP;
++ }
++ }
++ #endif
+
+ #if defined(FEAT_GUI) || defined(PROTO)
+ /*
+***************
+*** 2862,2868 ****
+ #endif
+
+ screen_line(row + W_WINROW(wp), wp->w_wincol, (int)wp->w_width,
+! (int)wp->w_width, FALSE);
+
+ /*
+ * Update w_cline_height and w_cline_folded if the cursor line was
+--- 2923,2929 ----
+ #endif
+
+ screen_line(row + W_WINROW(wp), wp->w_wincol, (int)wp->w_width,
+! (int)wp->w_width, 0);
+
+ /*
+ * Update w_cline_height and w_cline_folded if the cursor line was
+***************
+*** 3046,3052 ****
+ int attr_pri = FALSE; /* char_attr has priority */
+ int area_highlighting = FALSE; /* Visual or incsearch highlighting
+ in this line */
+! int attr = 0; /* attributes for area highlighting */
+ int area_attr = 0; /* attributes desired by highlighting */
+ int search_attr = 0; /* attributes desired by 'hlsearch' */
+ #ifdef FEAT_SYN_HL
+--- 3107,3114 ----
+ int attr_pri = FALSE; /* char_attr has priority */
+ int area_highlighting = FALSE; /* Visual or incsearch highlighting
+ in this line */
+! int vi_attr = 0; /* attributes for Visual and incsearch
+! highlighting */
+ int area_attr = 0; /* attributes desired by highlighting */
+ int search_attr = 0; /* attributes desired by 'hlsearch' */
+ #ifdef FEAT_SYN_HL
+***************
+*** 3127,3134 ****
+ #endif
+ #ifdef FEAT_TERMINAL
+ int get_term_attr = FALSE;
+- int term_attr = 0; /* background for terminal window */
+ #endif
+
+ /* draw_state: items that are drawn in sequence: */
+ #define WL_START 0 /* nothing done yet */
+--- 3189,3196 ----
+ #endif
+ #ifdef FEAT_TERMINAL
+ int get_term_attr = FALSE;
+ #endif
++ int win_attr = 0; // background for whole window
+
+ /* draw_state: items that are drawn in sequence: */
+ #define WL_START 0 /* nothing done yet */
+***************
+*** 3164,3169 ****
+--- 3226,3232 ----
+ int feedback_col = 0;
+ int feedback_old_attr = -1;
+ #endif
++ int screen_line_flags = 0;
+
+ #ifdef FEAT_CONCEAL
+ int syntax_flags = 0;
+***************
+*** 3244,3250 ****
+ {
+ extra_check = TRUE;
+ get_term_attr = TRUE;
+! term_attr = term_get_attr(wp->w_buffer, lnum, -1);
+ }
+ #endif
+
+--- 3307,3313 ----
+ {
+ extra_check = TRUE;
+ get_term_attr = TRUE;
+! win_attr = term_get_attr(wp->w_buffer, lnum, -1);
+ }
+ #endif
+
+***************
+*** 3362,3374 ****
+ 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
+ }
+ }
+--- 3425,3437 ----
+ if (fromcol >= 0)
+ {
+ area_highlighting = TRUE;
+! vi_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()))
+! vi_attr = HL_ATTR(HLF_VNC);
+ #endif
+ }
+ }
+***************
+*** 3398,3404 ****
+ if (fromcol == tocol)
+ tocol = fromcol + 1;
+ area_highlighting = TRUE;
+! attr = HL_ATTR(HLF_I);
+ }
+ }
+
+--- 3461,3467 ----
+ if (fromcol == tocol)
+ tocol = fromcol + 1;
+ area_highlighting = TRUE;
+! vi_attr = HL_ATTR(HLF_I);
+ }
+ }
+
+***************
+*** 3497,3502 ****
+--- 3560,3589 ----
+ }
+ }
+
++ if (*wp->w_p_wcr != NUL)
++ {
++ int attr = syn_name2attr(wp->w_p_wcr);
++
++ // 'wincolor' highlighting for the whole window
++ if (attr != 0)
++ {
++ win_attr = attr;
++ area_highlighting = TRUE;
++ }
++ }
++ #ifdef FEAT_TEXT_PROP
++ if (bt_popup(wp->w_buffer))
++ {
++ screen_line_flags |= SLF_POPUP;
++
++ if (win_attr == 0)
++ {
++ win_attr = HL_ATTR(HLF_PNI);
++ area_highlighting = TRUE;
++ }
++ }
++ #endif
++
+ /*
+ * 'nowrap' or 'wrap' and a single line that doesn't fit: Advance to the
+ * first character to be displayed.
+***************
+*** 3630,3639 ****
+ /*
+ * Handle highlighting the last used search pattern and matches.
+ * Do this for both search_hl and the match list.
+ */
+ cur = wp->w_match_head;
+ shl_flag = FALSE;
+! while ((cur != NULL || shl_flag == FALSE) && !number_only)
+ {
+ if (shl_flag == FALSE)
+ {
+--- 3717,3728 ----
+ /*
+ * Handle highlighting the last used search pattern and matches.
+ * Do this for both search_hl and the match list.
++ * Not in a popup window.
+ */
+ cur = wp->w_match_head;
+ shl_flag = FALSE;
+! while ((cur != NULL || shl_flag == FALSE) && !number_only
+! && !(screen_line_flags & SLF_POPUP))
+ {
+ if (shl_flag == FALSE)
+ {
+***************
+*** 3729,3734 ****
+--- 3818,3824 ----
+
+ off = (unsigned)(current_ScreenLine - ScreenLines);
+ col = 0;
++
+ #ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+ {
+***************
+*** 3737,3742 ****
+--- 3827,3833 ----
+ * rightmost column of the window. */
+ col = wp->w_width - 1;
+ off += col;
++ screen_line_flags |= SLF_RIGHTLEFT;
+ }
+ #endif
+
+***************
+*** 4048,4054 ****
+ char_attr = saved_char_attr;
+ }
+ else
+! char_attr = 0;
+ }
+ }
+
+--- 4139,4145 ----
+ char_attr = saved_char_attr;
+ }
+ else
+! char_attr = win_attr;
+ }
+ }
+
+***************
+*** 4064,4070 ****
+ || (number_only && draw_state > WL_NR))
+ {
+ screen_line(screen_row, wp->w_wincol, col, -(int)wp->w_width,
+! HAS_RIGHTLEFT(wp->w_p_rl));
+ /* Pretend we have finished updating the window. Except when
+ * 'cursorcolumn' is set. */
+ #ifdef FEAT_SYN_HL
+--- 4155,4161 ----
+ || (number_only && draw_state > WL_NR))
+ {
+ screen_line(screen_row, wp->w_wincol, col, -(int)wp->w_width,
+! screen_line_flags);
+ /* Pretend we have finished updating the window. Except when
+ * 'cursorcolumn' is set. */
+ #ifdef FEAT_SYN_HL
+***************
+*** 4089,4095 ****
+ || ((int)vcol_prev == fromcol_prev
+ && vcol_prev < vcol /* not at margin */
+ && vcol < tocol))
+! area_attr = attr; /* start highlighting */
+ else if (area_attr != 0
+ && (vcol == tocol
+ || (noinvcur && (colnr_T)vcol == wp->w_virtcol)))
+--- 4180,4186 ----
+ || ((int)vcol_prev == fromcol_prev
+ && vcol_prev < vcol /* not at margin */
+ && vcol < tocol))
+! area_attr = vi_attr; /* start highlighting */
+ else if (area_attr != 0
+ && (vcol == tocol
+ || (noinvcur && (colnr_T)vcol == wp->w_virtcol)))
+***************
+*** 4344,4349 ****
+--- 4435,4442 ----
+ char_attr = 0;
+ }
+ }
++ if (char_attr == 0)
++ char_attr = win_attr;
+
+ /*
+ * Get the next character to put on the screen.
+***************
+*** 4672,4680 ****
+--- 4765,4779 ----
+ {
+ wp->w_s->b_syn_error = TRUE;
+ has_syntax = FALSE;
++ syntax_attr = 0;
+ }
+ else
+ did_emsg = save_did_emsg;
++
++ // combine syntax attribute with 'wincolor'
++ if (win_attr != 0)
++ syntax_attr = hl_combine_attr(win_attr, syntax_attr);
++
+ #ifdef SYN_TIME_LIMIT
+ if (wp->w_s->b_syn_slow)
+ has_syntax = FALSE;
+***************
+*** 5149,5155 ****
+ diff_hlf != (hlf_T)0 ||
+ # endif
+ # ifdef FEAT_TERMINAL
+! term_attr != 0 ||
+ # endif
+ line_attr != 0
+ ) && (
+--- 5248,5254 ----
+ diff_hlf != (hlf_T)0 ||
+ # endif
+ # ifdef FEAT_TERMINAL
+! win_attr != 0 ||
+ # endif
+ line_attr != 0
+ ) && (
+***************
+*** 5178,5184 ****
+ if (diff_hlf == HLF_TXD)
+ {
+ diff_hlf = HLF_CHD;
+! if (attr == 0 || char_attr != attr)
+ {
+ char_attr = HL_ATTR(diff_hlf);
+ if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
+--- 5277,5283 ----
+ if (diff_hlf == HLF_TXD)
+ {
+ diff_hlf = HLF_CHD;
+! if (vi_attr == 0 || char_attr != vi_attr)
+ {
+ char_attr = HL_ATTR(diff_hlf);
+ if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
+***************
+*** 5188,5196 ****
+ }
+ # endif
+ # ifdef FEAT_TERMINAL
+! if (term_attr != 0)
+ {
+! char_attr = term_attr;
+ if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
+ char_attr = hl_combine_attr(char_attr,
+ HL_ATTR(HLF_CUL));
+--- 5287,5295 ----
+ }
+ # endif
+ # ifdef FEAT_TERMINAL
+! if (win_attr != 0)
+ {
+! char_attr = win_attr;
+ if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
+ char_attr = hl_combine_attr(char_attr,
+ HL_ATTR(HLF_CUL));
+***************
+*** 5550,5556 ****
+ && (int)wp->w_virtcol <
+ wp->w_width * (row - startrow + 1) + v
+ && lnum != wp->w_cursor.lnum)
+! || draw_color_col)
+ # ifdef FEAT_RIGHTLEFT
+ && !wp->w_p_rl
+ # endif
+--- 5649,5656 ----
+ && (int)wp->w_virtcol <
+ wp->w_width * (row - startrow + 1) + v
+ && lnum != wp->w_cursor.lnum)
+! || draw_color_col
+! || win_attr != 0)
+ # ifdef FEAT_RIGHTLEFT
+ && !wp->w_p_rl
+ # endif
+***************
+*** 5582,5590 ****
+ else if (draw_color_col && VCOL_HLC == *color_cols)
+ ScreenAttrs[off++] = HL_ATTR(HLF_MC);
+ else
+! ScreenAttrs[off++] = 0;
+
+! if (VCOL_HLC >= rightmost_vcol)
+ break;
+
+ ++vcol;
+--- 5682,5690 ----
+ else if (draw_color_col && VCOL_HLC == *color_cols)
+ ScreenAttrs[off++] = HL_ATTR(HLF_MC);
+ else
+! ScreenAttrs[off++] = win_attr;
+
+! if (VCOL_HLC >= rightmost_vcol && win_attr == 0)
+ break;
+
+ ++vcol;
+***************
+*** 5593,5599 ****
+ #endif
+
+ screen_line(screen_row, wp->w_wincol, col,
+! (int)wp->w_width, HAS_RIGHTLEFT(wp->w_p_rl));
+ row++;
+
+ /*
+--- 5693,5699 ----
+ #endif
+
+ screen_line(screen_row, wp->w_wincol, col,
+! (int)wp->w_width, screen_line_flags);
+ row++;
+
+ /*
+***************
+*** 5893,5903 ****
+ {
+ #ifdef FEAT_CONCEAL
+ screen_line(screen_row, wp->w_wincol, col - boguscols,
+! (int)wp->w_width, HAS_RIGHTLEFT(wp->w_p_rl));
+ boguscols = 0;
+ #else
+ screen_line(screen_row, wp->w_wincol, col,
+! (int)wp->w_width, HAS_RIGHTLEFT(wp->w_p_rl));
+ #endif
+ ++row;
+ ++screen_row;
+--- 5993,6003 ----
+ {
+ #ifdef FEAT_CONCEAL
+ screen_line(screen_row, wp->w_wincol, col - boguscols,
+! (int)wp->w_width, screen_line_flags);
+ boguscols = 0;
+ #else
+ screen_line(screen_row, wp->w_wincol, col,
+! (int)wp->w_width, screen_line_flags);
+ #endif
+ ++row;
+ ++screen_row;
+***************
+*** 6107,6113 ****
+ * "endcol" gives the columns where valid characters are.
+ * "clear_width" is the width of the window. It's > 0 if the rest of the line
+ * needs to be cleared, negative otherwise.
+! * "rlflag" is TRUE in a rightleft window:
+ * When TRUE and "clear_width" > 0, clear columns 0 to "endcol"
+ * When FALSE and "clear_width" > 0, clear columns "endcol" to "clear_width"
+ */
+--- 6207,6215 ----
+ * "endcol" gives the columns where valid characters are.
+ * "clear_width" is the width of the window. It's > 0 if the rest of the line
+ * needs to be cleared, negative otherwise.
+! * "flags" can have bits:
+! * SLF_POPUP popup window
+! * SLF_RIGHTLEFT rightleft window:
+ * When TRUE and "clear_width" > 0, clear columns 0 to "endcol"
+ * When FALSE and "clear_width" > 0, clear columns "endcol" to "clear_width"
+ */
+***************
+*** 6117,6123 ****
+ int coloff,
+ int endcol,
+ int clear_width,
+! int rlflag UNUSED)
+ {
+ unsigned off_from;
+ unsigned off_to;
+--- 6219,6225 ----
+ int coloff,
+ int endcol,
+ int clear_width,
+! int flags UNUSED)
+ {
+ unsigned off_from;
+ unsigned off_to;
+***************
+*** 6153,6159 ****
+ max_off_to = LineOffset[row] + screen_Columns;
+
+ #ifdef FEAT_RIGHTLEFT
+! if (rlflag)
+ {
+ /* Clear rest first, because it's left of the text. */
+ if (clear_width > 0)
+--- 6255,6261 ----
+ max_off_to = LineOffset[row] + screen_Columns;
+
+ #ifdef FEAT_RIGHTLEFT
+! if (flags & SLF_RIGHTLEFT)
+ {
+ /* Clear rest first, because it's left of the text. */
+ if (clear_width > 0)
+***************
+*** 6377,6383 ****
+
+ if (clear_width > 0
+ #ifdef FEAT_RIGHTLEFT
+! && !rlflag
+ #endif
+ )
+ {
+--- 6479,6485 ----
+
+ if (clear_width > 0
+ #ifdef FEAT_RIGHTLEFT
+! && !(flags & SLF_RIGHTLEFT)
+ #endif
+ )
+ {
+***************
+*** 6444,6453 ****
+ }
+ }
+
+! if (clear_width > 0)
+ {
+! /* For a window that's left of another, draw the separator char. */
+! if (col + coloff < Columns)
+ {
+ int c;
+
+--- 6546,6560 ----
+ }
+ }
+
+! if (clear_width > 0
+! #ifdef FEAT_TEXT_PROP
+! && !(flags & SLF_POPUP) // no separator for popup window
+! #endif
+! )
+ {
+! // For a window that has a right neighbor, draw the separator char
+! // right of the window contents.
+! if (coloff + col < Columns)
+ {
+ int c;
+
+***************
+*** 10784,10790 ****
+ wp->w_winbar_items[item_idx].wb_menu = NULL; /* end marker */
+
+ screen_line(wp->w_winrow, wp->w_wincol, (int)wp->w_width,
+! (int)wp->w_width, FALSE);
+ }
+ #endif
+
+--- 10891,10897 ----
+ wp->w_winbar_items[item_idx].wb_menu = NULL; /* end marker */
+
+ screen_line(wp->w_winrow, wp->w_wincol, (int)wp->w_width,
+! (int)wp->w_width, 0);
+ }
+ #endif
+
+*** ../vim-8.1.1390/src/structs.h 2019-05-16 22:11:43.715228803 +0200
+--- src/structs.h 2019-05-25 18:07:31.536128809 +0200
+***************
+*** 163,179 ****
+ {
+ #ifdef FEAT_ARABIC
+ int wo_arab;
+! # define w_p_arab w_onebuf_opt.wo_arab /* 'arabic' */
+ #endif
+ #ifdef FEAT_LINEBREAK
+ int wo_bri;
+! # define w_p_bri w_onebuf_opt.wo_bri /* 'breakindent' */
+ char_u *wo_briopt;
+! # define w_p_briopt w_onebuf_opt.wo_briopt /* 'breakindentopt' */
+ #endif
+ #ifdef FEAT_DIFF
+ int wo_diff;
+! # define w_p_diff w_onebuf_opt.wo_diff /* 'diff' */
+ #endif
+ #ifdef FEAT_FOLDING
+ long wo_fdc;
+--- 163,181 ----
+ {
+ #ifdef FEAT_ARABIC
+ int wo_arab;
+! # define w_p_arab w_onebuf_opt.wo_arab // 'arabic'
+ #endif
+ #ifdef FEAT_LINEBREAK
+ int wo_bri;
+! # define w_p_bri w_onebuf_opt.wo_bri // 'breakindent'
+ char_u *wo_briopt;
+! # define w_p_briopt w_onebuf_opt.wo_briopt // 'breakindentopt'
+ #endif
++ char_u *wo_wcr;
++ # define w_p_wcr w_onebuf_opt.wo_wcr // 'wincolor'
+ #ifdef FEAT_DIFF
+ int wo_diff;
+! # define w_p_diff w_onebuf_opt.wo_diff // 'diff'
+ #endif
+ #ifdef FEAT_FOLDING
+ long wo_fdc;
+***************
+*** 2592,2610 ****
+ typedef struct tabpage_S tabpage_T;
+ struct tabpage_S
+ {
+! tabpage_T *tp_next; /* next tabpage or NULL */
+! frame_T *tp_topframe; /* topframe for the windows */
+! win_T *tp_curwin; /* current window in this Tab page */
+! win_T *tp_prevwin; /* previous window in this Tab page */
+! win_T *tp_firstwin; /* first window in this Tab page */
+! win_T *tp_lastwin; /* last window in this Tab page */
+! long tp_old_Rows; /* Rows when Tab page was left */
+! long tp_old_Columns; /* Columns when Tab page was left */
+! long tp_ch_used; /* value of 'cmdheight' when frame size
+! was set */
+ #ifdef FEAT_GUI
+ int tp_prev_which_scrollbars[3];
+! /* previous value of which_scrollbars */
+ #endif
+
+ char_u *tp_localdir; // absolute path of local directory or
+--- 2594,2615 ----
+ typedef struct tabpage_S tabpage_T;
+ struct tabpage_S
+ {
+! tabpage_T *tp_next; // next tabpage or NULL
+! frame_T *tp_topframe; // topframe for the windows
+! win_T *tp_curwin; // current window in this Tab page
+! win_T *tp_prevwin; // previous window in this Tab page
+! win_T *tp_firstwin; // first window in this Tab page
+! win_T *tp_lastwin; // last window in this Tab page
+! #ifdef FEAT_TEXT_PROP
+! win_T *tp_first_popupwin; // first popup window in this Tab page
+! #endif
+! long tp_old_Rows; // Rows when Tab page was left
+! long tp_old_Columns; // Columns when Tab page was left
+! long tp_ch_used; // value of 'cmdheight' when frame size
+! // was set
+ #ifdef FEAT_GUI
+ int tp_prev_which_scrollbars[3];
+! // previous value of which_scrollbars
+ #endif
+
+ char_u *tp_localdir; // absolute path of local directory or
+***************
+*** 2615,2632 ****
+ 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
+! dictitem_T tp_winvar; /* variable for "t:" Dictionary */
+! dict_T *tp_vars; /* internal variables, local to tab page */
+ #endif
+
+ #ifdef FEAT_PYTHON
+! void *tp_python_ref; /* The Python value for this tab page */
+ #endif
+
+ #ifdef FEAT_PYTHON3
+! void *tp_python3_ref; /* The Python value for this tab page */
+ #endif
+ };
+
+--- 2620,2637 ----
+ 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
+! dictitem_T tp_winvar; // variable for "t:" Dictionary
+! dict_T *tp_vars; // internal variables, local to tab page
+ #endif
+
+ #ifdef FEAT_PYTHON
+! void *tp_python_ref; // The Python value for this tab page
+ #endif
+
+ #ifdef FEAT_PYTHON3
+! void *tp_python3_ref; // The Python value for this tab page
+ #endif
+ };
+
+***************
+*** 2775,2789 ****
+ {
+ int w_id; /* unique window ID */
+
+! buf_T *w_buffer; /* buffer we are a window into (used
+! often, keep it the first item!) */
+
+ #if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
+ synblock_T *w_s; /* for :ownsyntax */
+ #endif
+
+- win_T *w_prev; /* link to previous window */
+- win_T *w_next; /* link to next window */
+ int w_closing; /* window is being closed, don't let
+ autocommands close it too. */
+
+--- 2780,2794 ----
+ {
+ int w_id; /* unique window ID */
+
+! buf_T *w_buffer; /* buffer we are a window into */
+!
+! win_T *w_prev; /* link to previous window */
+! win_T *w_next; /* link to next window */
+
+ #if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
+ synblock_T *w_s; /* for :ownsyntax */
+ #endif
+
+ int w_closing; /* window is being closed, don't let
+ autocommands close it too. */
+
+***************
+*** 2847,2852 ****
+--- 2852,2862 ----
+ int w_width; /* Width of window, excluding separation. */
+ int w_vsep_width; /* Number of separator columns (0 or 1). */
+ pos_save_T w_save_cursor; /* backup of cursor pos and topline */
++ #ifdef FEAT_TEXT_PROP
++ int w_zindex;
++ int w_maxheight; // "maxheight" for popup window
++ int w_maxwidth; // "maxwidth" for popup window
++ #endif
+
+
+ /*
+*** ../vim-8.1.1390/src/terminal.c 2019-05-24 19:38:59.112545434 +0200
+--- src/terminal.c 2019-05-25 14:07:30.810843861 +0200
+***************
+*** 3257,3263 ****
+ else
+ pos.col = 0;
+
+! screen_line(term->tl_toprow + pos.row, 0, pos.col, Columns, FALSE);
+ }
+
+ term->tl_dirty_row_start = MAX_ROW;
+--- 3257,3263 ----
+ else
+ pos.col = 0;
+
+! screen_line(term->tl_toprow + pos.row, 0, pos.col, Columns, 0);
+ }
+
+ term->tl_dirty_row_start = MAX_ROW;
+***************
+*** 3368,3374 ****
+ #ifdef FEAT_MENU
+ + winbar_height(wp)
+ #endif
+! , wp->w_wincol, pos.col, wp->w_width, FALSE);
+ }
+ term->tl_dirty_row_start = MAX_ROW;
+ term->tl_dirty_row_end = 0;
+--- 3368,3374 ----
+ #ifdef FEAT_MENU
+ + winbar_height(wp)
+ #endif
+! , wp->w_wincol, pos.col, wp->w_width, 0);
+ }
+ term->tl_dirty_row_start = MAX_ROW;
+ term->tl_dirty_row_end = 0;
+*** ../vim-8.1.1390/src/testdir/Make_all.mak 2019-05-19 21:44:03.978804771 +0200
+--- src/testdir/Make_all.mak 2019-05-24 22:34:17.218925753 +0200
+***************
+*** 196,201 ****
+--- 196,202 ----
+ test_perl \
+ test_plus_arg_edit \
+ test_popup \
++ test_popupwin \
+ test_preview \
+ test_profile \
+ test_prompt_buffer \
+***************
+*** 250,257 ****
+ test_tagjump \
+ test_taglist \
+ test_tcl \
+- test_termencoding \
+ test_termcodes \
+ test_terminal \
+ test_terminal_fail \
+ test_textformat \
+--- 251,258 ----
+ test_tagjump \
+ test_taglist \
+ test_tcl \
+ test_termcodes \
++ test_termencoding \
+ test_terminal \
+ test_terminal_fail \
+ test_textformat \
+***************
+*** 377,382 ****
+--- 378,384 ----
+ test_paste.res \
+ test_perl.res \
+ test_plus_arg_edit.res \
++ test_popupwin.res \
+ test_preview.res \
+ test_profile.res \
+ test_prompt_buffer.res \
+***************
+*** 409,416 ****
+ test_system.res \
+ test_tab.res \
+ test_tcl.res \
+- test_termencoding.res \
+ test_termcodes.res \
+ test_terminal.res \
+ test_terminal_fail.res \
+ test_textformat.res \
+--- 411,418 ----
+ test_system.res \
+ test_tab.res \
+ test_tcl.res \
+ test_termcodes.res \
++ test_termencoding.res \
+ test_terminal.res \
+ test_terminal_fail.res \
+ test_textformat.res \
+*** ../vim-8.1.1390/src/testdir/dumps/Test_popupwin_01.dump 2019-05-25 19:47:20.021537851 +0200
+--- src/testdir/dumps/Test_popupwin_01.dump 2019-05-25 18:53:31.899050354 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ >1+0&#ffffff0| @73
++ |2| @73
++ |3| @8|h+0&#5fd7ff255|e|l@1|o| |t|h|e|r|e| @8|r+0#0000001#ffd7ff255| |o|n|e| @8| +0#0000000#ffffff0@30
++ |4| @22|a+0#0000001#ffd7ff255|n|o|t|h|e|r| |t|w|o| @8| +0#0000000#ffffff0@30
++ |5| @22|a+0#0000001#ffd7ff255|n|o|t|h|e|r| |t|h|r|e@1| @6| +0#0000000#ffffff0@30
++ |6| @73
++ |7| @73
++ |8| @73
++ |9| @73
++ @57|1|,|1| @10|T|o|p|
+*** ../vim-8.1.1390/src/testdir/test_popupwin.vim 2019-05-25 19:47:20.025537831 +0200
+--- src/testdir/test_popupwin.vim 2019-05-25 18:53:25.743097207 +0200
+***************
+*** 0 ****
+--- 1,26 ----
++ " Tests for popup windows
++
++ if !has('textprop')
++ finish
++ endif
++
++ source screendump.vim
++
++ func Test_simple_popup()
++ if !CanRunVimInTerminal()
++ return
++ endif
++ call writefile([
++ \ "call setline(1, range(1, 100))",
++ \ "let winid = popup_create('hello there', {'line': 3, 'col': 11})",
++ \ "hi PopupColor ctermbg=lightblue",
++ \ "call setwinvar(winid, '&wincolor', 'PopupColor')",
++ \ "let winid2 = popup_create(['another one', 'another two', 'another three'], {'line': 3, 'col': 25})",
++ \], 'XtestPopup')
++ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
++ call VerifyScreenDump(buf, 'Test_popupwin_01', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XtestPopup')
++ endfunc
+*** ../vim-8.1.1390/src/vim.h 2019-05-23 21:35:44.459922615 +0200
+--- src/vim.h 2019-05-25 18:05:47.916620123 +0200
+***************
+*** 604,617 ****
+ * off off w_botline not valid
+ * on off not possible
+ */
+! #define VALID_WROW 0x01 /* w_wrow (window row) is valid */
+! #define VALID_WCOL 0x02 /* w_wcol (window col) is valid */
+! #define VALID_VIRTCOL 0x04 /* w_virtcol (file col) is valid */
+! #define VALID_CHEIGHT 0x08 /* w_cline_height and w_cline_folded valid */
+! #define VALID_CROW 0x10 /* w_cline_row is valid */
+! #define VALID_BOTLINE 0x20 /* w_botine and w_empty_rows are valid */
+! #define VALID_BOTLINE_AP 0x40 /* w_botine is approximated */
+! #define VALID_TOPLINE 0x80 /* w_topline is valid (for cursor position) */
+
+ /*
+ * Terminal highlighting attribute bits.
+--- 604,618 ----
+ * off off w_botline not valid
+ * on off not possible
+ */
+! #define VALID_WROW 0x01 // w_wrow (window row) is valid
+! #define VALID_WCOL 0x02 // w_wcol (window col) is valid
+! #define VALID_VIRTCOL 0x04 // w_virtcol (file col) is valid
+! #define VALID_CHEIGHT 0x08 // w_cline_height and w_cline_folded valid
+! #define VALID_CROW 0x10 // w_cline_row is valid
+! #define VALID_BOTLINE 0x20 // w_botine and w_empty_rows are valid
+! #define VALID_BOTLINE_AP 0x40 // w_botine is approximated
+! #define VALID_TOPLINE 0x80 // w_topline is valid (for cursor position)
+! #define VALID_POPUP 0x100 // popup has been redrawn
+
+ /*
+ * Terminal highlighting attribute bits.
+*** ../vim-8.1.1390/src/window.c 2019-05-24 19:38:59.116545403 +0200
+--- src/window.c 2019-05-25 17:22:02.300858667 +0200
+***************
+*** 1362,1367 ****
+--- 1362,1382 ----
+ win_copy_options(oldp, newp);
+ }
+
++ static int
++ win_valid_popup(win_T *win)
++ {
++ #ifdef FEAT_TEXT_PROP
++ win_T *wp;
++
++ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
++ if (wp == win)
++ return TRUE;
++ for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next)
++ if (wp == win)
++ return TRUE;
++ #endif
++ return FALSE;
++ }
+
+ /*
+ * Check if "win" is a pointer to an existing window in the current tab page.
+***************
+*** 1376,1382 ****
+ FOR_ALL_WINDOWS(wp)
+ if (wp == win)
+ return TRUE;
+! return FALSE;
+ }
+
+ /*
+--- 1391,1397 ----
+ FOR_ALL_WINDOWS(wp)
+ if (wp == win)
+ return TRUE;
+! return win_valid_popup(win);
+ }
+
+ /*
+***************
+*** 1398,1404 ****
+ return TRUE;
+ }
+ }
+! return FALSE;
+ }
+
+ /*
+--- 1413,1419 ----
+ return TRUE;
+ }
+ }
+! return win_valid_popup(win);
+ }
+
+ /*
+***************
+*** 2293,2298 ****
+--- 2308,2351 ----
+ }
+
+ /*
++ * Close the buffer of "win" and unload it if "free_buf" is TRUE.
++ * "abort_if_last" is passed to close_buffer(): abort closing if all other
++ * windows are closed.
++ */
++ static void
++ win_close_buffer(win_T *win, int free_buf, int abort_if_last)
++ {
++ #ifdef FEAT_SYN_HL
++ // Free independent synblock before the buffer is freed.
++ if (win->w_buffer != NULL)
++ reset_synblock(win);
++ #endif
++
++ #ifdef FEAT_QUICKFIX
++ // When the quickfix/location list window is closed, unlist the buffer.
++ if (win->w_buffer != NULL && bt_quickfix(win->w_buffer))
++ win->w_buffer->b_p_bl = FALSE;
++ #endif
++
++ // Close the link to the buffer.
++ if (win->w_buffer != NULL)
++ {
++ bufref_T bufref;
++
++ set_bufref(&bufref, curbuf);
++ win->w_closing = TRUE;
++ close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0,
++ abort_if_last);
++ if (win_valid_any_tab(win))
++ win->w_closing = FALSE;
++ // Make sure curbuf is valid. It can become invalid if 'bufhidden' is
++ // "wipe".
++ if (!bufref_valid(&bufref))
++ curbuf = firstbuf;
++ }
++ }
++
++ /*
+ * Close window "win". Only works for the current tab page.
+ * If "free_buf" is TRUE related buffer may be unloaded.
+ *
+***************
+*** 2319,2327 ****
+ if (win->w_closing || (win->w_buffer != NULL
+ && win->w_buffer->b_locked > 0))
+ return FAIL; /* window is already being closed */
+! if (win == aucmd_win)
+ {
+! emsg(_("E813: Cannot close autocmd window"));
+ return FAIL;
+ }
+ if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())
+--- 2372,2380 ----
+ if (win->w_closing || (win->w_buffer != NULL
+ && win->w_buffer->b_locked > 0))
+ return FAIL; /* window is already being closed */
+! if (win_unlisted(win))
+ {
+! emsg(_("E813: Cannot close autocmd or popup window"));
+ return FAIL;
+ }
+ if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())
+***************
+*** 2390,2424 ****
+ out_flush();
+ #endif
+
+! #ifdef FEAT_SYN_HL
+! // Free independent synblock before the buffer is freed.
+! if (win->w_buffer != NULL)
+! reset_synblock(win);
+! #endif
+!
+! #ifdef FEAT_QUICKFIX
+! // When the quickfix/location list window is closed, unlist the buffer.
+! if (win->w_buffer != NULL && bt_quickfix(win->w_buffer))
+! win->w_buffer->b_p_bl = FALSE;
+! #endif
+!
+! /*
+! * Close the link to the buffer.
+! */
+! if (win->w_buffer != NULL)
+! {
+! bufref_T bufref;
+!
+! set_bufref(&bufref, curbuf);
+! win->w_closing = TRUE;
+! close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, TRUE);
+! if (win_valid_any_tab(win))
+! win->w_closing = FALSE;
+! /* Make sure curbuf is valid. It can become invalid if 'bufhidden' is
+! * "wipe". */
+! if (!bufref_valid(&bufref))
+! curbuf = firstbuf;
+! }
+
+ if (only_one_window() && win_valid(win) && win->w_buffer == NULL
+ && (last_window() || curtab != prev_curtab
+--- 2443,2449 ----
+ out_flush();
+ #endif
+
+! win_close_buffer(win, free_buf, TRUE);
+
+ if (only_one_window() && win_valid(win) && win->w_buffer == NULL
+ && (last_window() || curtab != prev_curtab
+***************
+*** 2627,2632 ****
+--- 2652,2660 ----
+ (void)win_free_mem(aucmd_win, &dummy, NULL);
+ aucmd_win = NULL;
+ }
++ # ifdef FEAT_TEXT_PROP
++ close_all_popups();
++ # endif
+
+ while (firstwin != NULL)
+ (void)win_free_mem(firstwin, &dummy, NULL);
+***************
+*** 3458,3464 ****
+ wp->w_topfill = 0;
+ #endif
+ wp->w_botline = 2;
+! #ifdef FEAT_SYN_HL
+ wp->w_s = &wp->w_buffer->b_s;
+ #endif
+ }
+--- 3486,3492 ----
+ wp->w_topfill = 0;
+ #endif
+ wp->w_botline = 2;
+! #if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
+ wp->w_s = &wp->w_buffer->b_s;
+ #endif
+ }
+***************
+*** 3484,3502 ****
+ }
+
+ /*
+! * Init "aucmd_win". This can only be done after the first
+! * window is fully initialized, thus it can't be in win_alloc_first().
+ */
+! void
+! win_alloc_aucmd_win(void)
+ {
+! aucmd_win = win_alloc(NULL, TRUE);
+! if (aucmd_win != NULL)
+ {
+! win_init_some(aucmd_win, curwin);
+! RESET_BINDING(aucmd_win);
+! new_frame(aucmd_win);
+ }
+ }
+
+ /*
+--- 3512,3552 ----
+ }
+
+ /*
+! * Allocate and init a window that is not a regular window.
+! * This can only be done after the first window is fully initialized, thus it
+! * can't be in win_alloc_first().
+ */
+! win_T *
+! win_alloc_popup_win(void)
+ {
+! win_T *wp;
+!
+! wp = win_alloc(NULL, TRUE);
+! if (wp != NULL)
+ {
+! // We need to initialize options with something, using the current
+! // window makes most sense.
+! win_init_some(wp, curwin);
+!
+! RESET_BINDING(wp);
+! new_frame(wp);
+ }
++ return wp;
++ }
++
++ /*
++ * Initialize window "wp" to display buffer "buf".
++ */
++ void
++ win_init_popup_win(win_T *wp, buf_T *buf)
++ {
++ wp->w_buffer = buf;
++ ++buf->b_nwindows;
++ win_init_empty(wp); // set cursor and topline to safe values
++
++ // Make sure w_localdir and globaldir are NULL to avoid a chdir() in
++ // win_enter_ext().
++ VIM_CLEAR(wp->w_localdir);
+ }
+
+ /*
+***************
+*** 3619,3624 ****
+--- 3669,3678 ----
+ # ifdef FEAT_DIFF
+ diff_clear(tp);
+ # endif
++ # ifdef FEAT_TEXT_PROP
++ while (tp->tp_first_popupwin != NULL)
++ popup_close(tp->tp_first_popupwin->w_id);
++ #endif
+ for (idx = 0; idx < SNAP_COUNT; ++idx)
+ clear_snapshot(tp, idx);
+ #ifdef FEAT_EVAL
+***************
+*** 4782,4788 ****
+ vim_free(wp->w_p_cc_cols);
+ #endif
+
+! if (wp != aucmd_win)
+ win_remove(wp, tp);
+ if (autocmd_busy)
+ {
+--- 4836,4842 ----
+ vim_free(wp->w_p_cc_cols);
+ #endif
+
+! if (win_valid_any_tab(wp))
+ win_remove(wp, tp);
+ if (autocmd_busy)
+ {
+***************
+*** 4796,4801 ****
+--- 4850,4877 ----
+ }
+
+ /*
++ * Return TRUE if "wp" is not in the list of windows: the autocmd window or a
++ * popup window.
++ */
++ int
++ win_unlisted(win_T *wp)
++ {
++ return wp == aucmd_win || bt_popup(wp->w_buffer);
++ }
++
++ /*
++ * Free a popup window. This does not take the window out of the window list
++ * and assumes there is only one toplevel frame, no split.
++ */
++ void
++ win_free_popup(win_T *win)
++ {
++ win_close_buffer(win, TRUE, FALSE);
++ vim_free(win->w_frame);
++ win_free(win, NULL);
++ }
++
++ /*
+ * Append window "wp" in the window list after window "after".
+ */
+ void
+***************
+*** 6182,6188 ****
+ /*
+ * Return TRUE if there is only one window (in the current tab page), not
+ * counting a help or preview window, unless it is the current window.
+! * Does not count "aucmd_win".
+ */
+ int
+ only_one_window(void)
+--- 6258,6264 ----
+ /*
+ * Return TRUE if there is only one window (in the current tab page), not
+ * counting a help or preview window, unless it is the current window.
+! * Does not count unlisted windows.
+ */
+ int
+ only_one_window(void)
+***************
+*** 6974,6979 ****
+--- 7050,7065 ----
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ if (wp->w_id == id)
+ return wp;
++ #ifdef FEAT_TEXT_PROP
++ // popup windows are in a separate list
++ FOR_ALL_TABPAGES(tp)
++ for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
++ if (wp->w_id == id)
++ return wp;
++ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
++ if (wp->w_id == id)
++ return wp;
++ #endif
+
+ return NULL;
+ }
+*** ../vim-8.1.1390/src/version.c 2019-05-24 22:08:11.366273819 +0200
+--- src/version.c 2019-05-25 19:47:26.877503334 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1391,
+ /**/
+
+--
+I'm not familiar with this proof, but I'm aware of a significant
+following of toddlers who believe that peanut butter is the solution
+to all of life's problems... -- Tim Hammerquist
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1392 b/data/vim/patches/8.1.1392
new file mode 100644
index 000000000..074b9f8b5
--- /dev/null
+++ b/data/vim/patches/8.1.1392
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1392
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1392 (after 8.1.1391)
+Problem: Build failure in tiny version.
+Solution: Define ex_popupclear to ex_ni if not implemented. Add UNUSED.
+Files: src/ex_docmd.c, src/window.c
+
+
+*** ../vim-8.1.1391/src/ex_docmd.c 2019-05-24 18:48:36.754128525 +0200
+--- src/ex_docmd.c 2019-05-25 20:08:37.058383759 +0200
+***************
+*** 397,402 ****
+--- 397,405 ----
+ #if !defined(FEAT_X11) || !defined(FEAT_XCLIPBOARD)
+ # define ex_xrestore ex_ni
+ #endif
++ #if !defined(FEAT_TEXT_PROP)
++ # define ex_popupclear ex_ni
++ #endif
+
+ /*
+ * Declare cmdnames[].
+*** ../vim-8.1.1391/src/window.c 2019-05-25 19:51:03.780408437 +0200
+--- src/window.c 2019-05-25 20:09:24.290096601 +0200
+***************
+*** 1363,1369 ****
+ }
+
+ static int
+! win_valid_popup(win_T *win)
+ {
+ #ifdef FEAT_TEXT_PROP
+ win_T *wp;
+--- 1363,1369 ----
+ }
+
+ static int
+! win_valid_popup(win_T *win UNUSED)
+ {
+ #ifdef FEAT_TEXT_PROP
+ win_T *wp;
+*** ../vim-8.1.1391/src/version.c 2019-05-25 19:51:03.780408437 +0200
+--- src/version.c 2019-05-25 20:03:47.604222275 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1392,
+ /**/
+
+--
+`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.1393 b/data/vim/patches/8.1.1393
new file mode 100644
index 000000000..e57224799
--- /dev/null
+++ b/data/vim/patches/8.1.1393
@@ -0,0 +1,1226 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1393
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1393
+Problem: Unnecessary type casts.
+Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)
+Files: src/channel.c, src/crypt.c, src/dict.c, src/dosinst.c,
+ src/evalfunc.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c,
+ src/ex_getln.c, src/fileio.c, src/findfile.c, src/if_ole.cpp,
+ src/if_py_both.h, src/list.c, src/message.c, src/misc1.c,
+ src/misc2.c, src/ops.c, src/os_vms.c, src/os_win32.c,
+ src/quickfix.c, src/regexp_nfa.c, src/screen.c, src/search.c,
+ src/sign.c, src/syntax.c, src/tag.c, src/term.c, src/terminal.c,
+ src/textprop.c
+
+
+*** ../vim-8.1.1392/src/channel.c 2019-05-24 19:38:59.096545552 +0200
+--- src/channel.c 2019-05-25 20:02:29.156751167 +0200
+***************
+*** 1354,1360 ****
+ int id)
+ {
+ cbq_T *head = &channel->ch_part[part].ch_cb_head;
+! cbq_T *item = (cbq_T *)alloc((int)sizeof(cbq_T));
+
+ if (item != NULL)
+ {
+--- 1354,1360 ----
+ int id)
+ {
+ cbq_T *head = &channel->ch_part[part].ch_cb_head;
+! cbq_T *item = (cbq_T *)alloc(sizeof(cbq_T));
+
+ if (item != NULL)
+ {
+***************
+*** 3921,3927 ****
+ }
+ else
+ {
+! writeq_T *last = (writeq_T *)alloc((int)sizeof(writeq_T));
+
+ if (last != NULL)
+ {
+--- 3921,3927 ----
+ }
+ else
+ {
+! writeq_T *last = (writeq_T *)alloc(sizeof(writeq_T));
+
+ if (last != NULL)
+ {
+*** ../vim-8.1.1392/src/crypt.c 2019-04-27 22:06:33.348200718 +0200
+--- src/crypt.c 2019-05-25 20:02:29.156751167 +0200
+***************
+*** 254,260 ****
+ char_u *seed,
+ int seed_len)
+ {
+! cryptstate_T *state = (cryptstate_T *)alloc((int)sizeof(cryptstate_T));
+
+ if (state == NULL)
+ return state;
+--- 254,260 ----
+ char_u *seed,
+ int seed_len)
+ {
+! cryptstate_T *state = (cryptstate_T *)alloc(sizeof(cryptstate_T));
+
+ if (state == NULL)
+ return state;
+***************
+*** 407,413 ****
+ /* Not buffering, just return EOF. */
+ return (long)len;
+
+! *newptr = alloc((long)len);
+ if (*newptr == NULL)
+ return -1;
+ method->encode_fn(state, from, len, *newptr);
+--- 407,413 ----
+ /* Not buffering, just return EOF. */
+ return (long)len;
+
+! *newptr = alloc(len);
+ if (*newptr == NULL)
+ return -1;
+ method->encode_fn(state, from, len, *newptr);
+*** ../vim-8.1.1392/src/dict.c 2019-05-24 18:48:36.750128544 +0200
+--- src/dict.c 2019-05-25 20:02:29.160751138 +0200
+***************
+*** 54,60 ****
+ 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());
+--- 54,60 ----
+ dict_alloc_id(alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+! if (alloc_fail_id == id && alloc_does_fail(sizeof(list_T)))
+ return NULL;
+ #endif
+ return (dict_alloc());
+*** ../vim-8.1.1392/src/dosinst.c 2019-05-09 15:12:45.168723969 +0200
+--- src/dosinst.c 2019-05-25 20:02:29.160751138 +0200
+***************
+*** 306,312 ****
+ || strchr(cp, '/') != NULL)
+ return;
+
+! tmpname = alloc((int)strlen(cp) + 1);
+ strcpy(tmpname, cp);
+ tmpname[strlen(tmpname) - 1] = 'x'; /* .exe -> .exx */
+
+--- 306,312 ----
+ || strchr(cp, '/') != NULL)
+ return;
+
+! tmpname = alloc(strlen(cp) + 1);
+ strcpy(tmpname, cp);
+ tmpname[strlen(tmpname) - 1] = 'x'; /* .exe -> .exx */
+
+***************
+*** 962,968 ****
+ if (choices[idx].text != NULL)
+ free(choices[idx].text);
+
+! choices[idx].text = alloc((int)(strlen(fmt) + strlen(arg)) - 1);
+ sprintf(choices[idx].text, fmt, arg);
+ }
+
+--- 962,968 ----
+ if (choices[idx].text != NULL)
+ free(choices[idx].text);
+
+! choices[idx].text = alloc(strlen(fmt) + strlen(arg) - 1);
+ sprintf(choices[idx].text, fmt, arg);
+ }
+
+***************
+*** 1040,1046 ****
+ s = p + strlen(p);
+ if (names != NULL)
+ {
+! names[count] = alloc((int)(s - p) + 1);
+ strncpy(names[count], p, s - p);
+ names[count][s - p] = NUL;
+ }
+--- 1040,1046 ----
+ s = p + strlen(p);
+ if (names != NULL)
+ {
+! names[count] = alloc(s - p + 1);
+ strncpy(names[count], p, s - p);
+ names[count][s - p] = NUL;
+ }
+***************
+*** 1051,1057 ****
+ }
+ if (names != NULL)
+ break;
+! names = alloc((int)(count + 1) * sizeof(char *));
+ }
+ names[0] = alloc(50);
+ sprintf(names[0], "Select directory to create %s in:", name);
+--- 1051,1057 ----
+ }
+ if (names != NULL)
+ break;
+! names = alloc((count + 1) * sizeof(char *));
+ }
+ names[0] = alloc(50);
+ sprintf(names[0], "Select directory to create %s in:", name);
+*** ../vim-8.1.1392/src/evalfunc.c 2019-05-25 19:51:03.776408456 +0200
+--- src/evalfunc.c 2019-05-25 20:02:29.160751138 +0200
+***************
+*** 4412,4418 ****
+ * 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)
+ {
+ STRCPY(name, sid_buf);
+--- 4412,4418 ----
+ * 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(STRLEN(sid_buf) + STRLEN(s + off) + 1);
+ if (name != NULL)
+ {
+ STRCPY(name, sid_buf);
+***************
+*** 12671,12677 ****
+ }
+
+ /* Make an array with each entry pointing to an item in the List. */
+! ptrs = (sortItem_T *)alloc((int)(len * sizeof(sortItem_T)));
+ if (ptrs == NULL)
+ goto theend;
+
+--- 12671,12677 ----
+ }
+
+ /* Make an array with each entry pointing to an item in the List. */
+! ptrs = (sortItem_T *)alloc(len * sizeof(sortItem_T));
+ if (ptrs == NULL)
+ goto theend;
+
+*** ../vim-8.1.1392/src/ex_cmds.c 2019-05-24 19:38:59.100545522 +0200
+--- src/ex_cmds.c 2019-05-25 20:02:29.160751138 +0200
+***************
+*** 2746,2752 ****
+ */
+ ++p;
+ len = getdigits(&p);
+! buf = alloc((int)(len + 1));
+ if (buf == NULL)
+ return TRUE;
+ p = buf;
+--- 2746,2752 ----
+ */
+ ++p;
+ len = getdigits(&p);
+! buf = alloc(len + 1);
+ if (buf == NULL)
+ return TRUE;
+ p = buf;
+*** ../vim-8.1.1392/src/ex_cmds2.c 2019-05-24 18:48:36.754128525 +0200
+--- src/ex_cmds2.c 2019-05-25 20:02:29.164751112 +0200
+***************
+*** 2800,2806 ****
+
+ 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;
+
+--- 2800,2806 ----
+
+ oldlen = STRLEN(p_rtp);
+ addlen = STRLEN(fname) + 1; // add one for comma
+! new_rtp = alloc(oldlen + addlen + afterlen + 1); // add one for NUL
+ if (new_rtp == NULL)
+ goto theend;
+
+*** ../vim-8.1.1392/src/ex_docmd.c 2019-05-25 20:10:32.837684661 +0200
+--- src/ex_docmd.c 2019-05-25 20:08:37.058383759 +0200
+***************
+*** 4816,4822 ****
+ while ((pos = (char_u *)strstr((char *)pos + 2, "$*")) != NULL)
+ ++i;
+ len = (int)STRLEN(p);
+! new_cmdline = alloc((int)(STRLEN(program) + i * (len - 2) + 1));
+ if (new_cmdline == NULL)
+ return NULL; /* out of memory */
+ ptr = new_cmdline;
+--- 4816,4822 ----
+ while ((pos = (char_u *)strstr((char *)pos + 2, "$*")) != NULL)
+ ++i;
+ len = (int)STRLEN(p);
+! new_cmdline = alloc(STRLEN(program) + i * (len - 2) + 1);
+ if (new_cmdline == NULL)
+ return NULL; /* out of memory */
+ ptr = new_cmdline;
+***************
+*** 4832,4838 ****
+ }
+ else
+ {
+! new_cmdline = alloc((int)(STRLEN(program) + STRLEN(p) + 2));
+ if (new_cmdline == NULL)
+ return NULL; /* out of memory */
+ STRCPY(new_cmdline, program);
+--- 4832,4838 ----
+ }
+ else
+ {
+! new_cmdline = alloc(STRLEN(program) + STRLEN(p) + 2);
+ if (new_cmdline == NULL)
+ return NULL; /* out of memory */
+ STRCPY(new_cmdline, program);
+*** ../vim-8.1.1392/src/ex_getln.c 2019-05-24 19:38:59.100545522 +0200
+--- src/ex_getln.c 2019-05-25 20:02:29.164751112 +0200
+***************
+*** 5914,5921 ****
+ {
+ if (newlen)
+ {
+! temp = (histentry_T *)alloc(
+! (long_u)(newlen * sizeof(histentry_T)));
+ if (temp == NULL) /* out of memory! */
+ {
+ if (type == 0) /* first one: just keep the old length */
+--- 5914,5920 ----
+ {
+ if (newlen)
+ {
+! temp = (histentry_T *)alloc(newlen * sizeof(histentry_T));
+ if (temp == NULL) /* out of memory! */
+ {
+ if (type == 0) /* first one: just keep the old length */
+***************
+*** 6655,6661 ****
+ viminfo_history[type] = NULL;
+ else
+ viminfo_history[type] = (histentry_T *)lalloc(
+! (long_u)(len * sizeof(histentry_T)), FALSE);
+ if (viminfo_history[type] == NULL)
+ len = 0;
+ viminfo_hislen[type] = len;
+--- 6654,6660 ----
+ viminfo_history[type] = NULL;
+ else
+ viminfo_history[type] = (histentry_T *)lalloc(
+! len * sizeof(histentry_T), FALSE);
+ if (viminfo_history[type] == NULL)
+ len = 0;
+ viminfo_hislen[type] = len;
+*** ../vim-8.1.1392/src/fileio.c 2019-05-24 19:38:59.100545522 +0200
+--- src/fileio.c 2019-05-25 20:02:29.164751112 +0200
+***************
+*** 7190,7196 ****
+ ga_init2(gap, (int)sizeof(char *), 20);
+
+ #ifdef MSWIN
+! buf = alloc((int)MAXPATHL);
+ if (buf == NULL)
+ return FAIL;
+ STRNCPY(buf, path, MAXPATHL-5);
+--- 7190,7196 ----
+ ga_init2(gap, (int)sizeof(char *), 20);
+
+ #ifdef MSWIN
+! buf = alloc(MAXPATHL);
+ if (buf == NULL)
+ return FAIL;
+ STRNCPY(buf, path, MAXPATHL-5);
+*** ../vim-8.1.1392/src/findfile.c 2019-05-24 18:48:36.758128504 +0200
+--- src/findfile.c 2019-05-25 20:02:29.164751112 +0200
+***************
+*** 588,596 ****
+ if (search_ctx->ffsc_wc_path != NULL)
+ {
+ wc_path = vim_strsave(search_ctx->ffsc_wc_path);
+! temp = alloc((int)(STRLEN(search_ctx->ffsc_wc_path)
+ + STRLEN(search_ctx->ffsc_fix_path + len)
+! + 1));
+ if (temp == NULL || wc_path == NULL)
+ {
+ vim_free(buf);
+--- 588,596 ----
+ if (search_ctx->ffsc_wc_path != NULL)
+ {
+ wc_path = vim_strsave(search_ctx->ffsc_wc_path);
+! temp = alloc(STRLEN(search_ctx->ffsc_wc_path)
+ + STRLEN(search_ctx->ffsc_fix_path + len)
+! + 1);
+ if (temp == NULL || wc_path == NULL)
+ {
+ vim_free(buf);
+***************
+*** 722,728 ****
+ * filepath is used as buffer for various actions and as the storage to
+ * return a found filename.
+ */
+! if ((file_path = alloc((int)MAXPATHL)) == NULL)
+ return NULL;
+
+ #ifdef FEAT_PATH_EXTRA
+--- 722,728 ----
+ * filepath is used as buffer for various actions and as the storage to
+ * return a found filename.
+ */
+! if ((file_path = alloc(MAXPATHL)) == NULL)
+ return NULL;
+
+ #ifdef FEAT_PATH_EXTRA
+***************
+*** 1866,1872 ****
+ break;
+ }
+
+! if ((buf = alloc((int)(MAXPATHL))) == NULL)
+ break;
+
+ // copy next path
+--- 1866,1872 ----
+ break;
+ }
+
+! if ((buf = alloc(MAXPATHL)) == NULL)
+ break;
+
+ // copy next path
+***************
+*** 2274,2280 ****
+ char_u *p;
+ int len;
+
+! if ((buf = alloc((int)MAXPATHL)) == NULL)
+ return;
+
+ while (*path_option != NUL)
+--- 2274,2280 ----
+ char_u *p;
+ int len;
+
+! if ((buf = alloc(MAXPATHL)) == NULL)
+ return;
+
+ while (*path_option != NUL)
+***************
+*** 2424,2430 ****
+ if (regmatch.regprog == NULL)
+ return;
+
+! if ((curdir = alloc((int)(MAXPATHL))) == NULL)
+ goto theend;
+ mch_dirname(curdir, MAXPATHL);
+ expand_path_option(curdir, &path_ga);
+--- 2424,2430 ----
+ if (regmatch.regprog == NULL)
+ return;
+
+! if ((curdir = alloc(MAXPATHL)) == NULL)
+ goto theend;
+ mch_dirname(curdir, MAXPATHL);
+ expand_path_option(curdir, &path_ga);
+***************
+*** 2532,2538 ****
+ continue;
+ }
+
+! rel_path = alloc((int)(STRLEN(short_name) + STRLEN(PATHSEPSTR) + 2));
+ if (rel_path == NULL)
+ goto theend;
+ STRCPY(rel_path, ".");
+--- 2532,2538 ----
+ continue;
+ }
+
+! rel_path = alloc(STRLEN(short_name) + STRLEN(PATHSEPSTR) + 2);
+ if (rel_path == NULL)
+ goto theend;
+ STRCPY(rel_path, ".");
+*** ../vim-8.1.1392/src/if_ole.cpp 2019-05-09 15:12:45.168723969 +0200
+--- src/if_ole.cpp 2019-05-25 20:02:29.164751112 +0200
+***************
+*** 376,382 ****
+ if (len == 0)
+ return E_INVALIDARG;
+
+! buffer = (char *)alloc((unsigned)len);
+
+ if (buffer == NULL)
+ return E_OUTOFMEMORY;
+--- 376,382 ----
+ if (len == 0)
+ return E_INVALIDARG;
+
+! buffer = (char *)alloc(len);
+
+ if (buffer == NULL)
+ return E_OUTOFMEMORY;
+*** ../vim-8.1.1392/src/if_py_both.h 2019-05-20 21:52:42.794911591 +0200
+--- src/if_py_both.h 2019-05-25 20:02:29.164751112 +0200
+***************
+*** 2953,2959 ****
+ char_u *np;
+ size_t len = STRLEN(p) + 1;
+
+! if ((np = alloc((int)len + 2)) == NULL)
+ {
+ vim_free(p);
+ return NULL;
+--- 2953,2959 ----
+ char_u *np;
+ size_t len = STRLEN(p) + 1;
+
+! if ((np = alloc(len + 2)) == NULL)
+ {
+ vim_free(p);
+ return NULL;
+***************
+*** 3139,3145 ****
+ if (exported)
+ {
+ pt->pt_argv = (typval_T *)alloc_clear(
+! sizeof(typval_T) * self->argc);
+ for (i = 0; i < pt->pt_argc; ++i)
+ copy_tv(&self->argv[i], &pt->pt_argv[i]);
+ }
+--- 3139,3145 ----
+ if (exported)
+ {
+ pt->pt_argv = (typval_T *)alloc_clear(
+! sizeof(typval_T) * self->argc);
+ for (i = 0; i < pt->pt_argc; ++i)
+ copy_tv(&self->argv[i], &pt->pt_argv[i]);
+ }
+***************
+*** 4262,4268 ****
+ /* Create a copy of the string, with internal nulls replaced by
+ * newline characters, as is the vim convention.
+ */
+! save = (char *)alloc((unsigned)(len+1));
+ if (save == NULL)
+ {
+ PyErr_NoMemory();
+--- 4262,4268 ----
+ /* Create a copy of the string, with internal nulls replaced by
+ * newline characters, as is the vim convention.
+ */
+! save = (char *)alloc(len+1);
+ if (save == NULL)
+ {
+ PyErr_NoMemory();
+*** ../vim-8.1.1392/src/list.c 2019-01-13 23:38:33.399773248 +0100
+--- src/list.c 2019-05-25 20:02:29.164751112 +0200
+***************
+*** 92,98 ****
+ 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());
+--- 92,98 ----
+ list_alloc_id(alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+! if (alloc_fail_id == id && alloc_does_fail(sizeof(list_T)))
+ return NULL;
+ #endif
+ return (list_alloc());
+***************
+*** 122,128 ****
+ rettv_list_alloc_id(typval_T *rettv, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+! if (alloc_fail_id == id && alloc_does_fail((long_u)sizeof(list_T)))
+ return FAIL;
+ #endif
+ return rettv_list_alloc(rettv);
+--- 122,128 ----
+ rettv_list_alloc_id(typval_T *rettv, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+! if (alloc_fail_id == id && alloc_does_fail(sizeof(list_T)))
+ return FAIL;
+ #endif
+ return rettv_list_alloc(rettv);
+*** ../vim-8.1.1392/src/message.c 2019-05-24 18:48:36.766128461 +0200
+--- src/message.c 2019-05-25 20:02:29.168751083 +0200
+***************
+*** 875,881 ****
+ (void)delete_first_msg();
+
+ /* allocate an entry and add the message at the end of the history */
+! p = (struct msg_hist *)alloc((int)sizeof(struct msg_hist));
+ if (p != NULL)
+ {
+ if (len < 0)
+--- 875,881 ----
+ (void)delete_first_msg();
+
+ /* allocate an entry and add the message at the end of the history */
+! p = (struct msg_hist *)alloc(sizeof(struct msg_hist));
+ if (p != NULL)
+ {
+ if (len < 0)
+***************
+*** 2360,2366 ****
+
+ if (s > *sb_str)
+ {
+! mp = (msgchunk_T *)alloc((int)(sizeof(msgchunk_T) + (s - *sb_str)));
+ if (mp != NULL)
+ {
+ mp->sb_eol = finish;
+--- 2360,2366 ----
+
+ if (s > *sb_str)
+ {
+! mp = (msgchunk_T *)alloc(sizeof(msgchunk_T) + (s - *sb_str));
+ if (mp != NULL)
+ {
+ mp->sb_eol = finish;
+*** ../vim-8.1.1392/src/misc1.c 2019-05-24 18:48:36.766128461 +0200
+--- src/misc1.c 2019-05-25 20:02:29.168751083 +0200
+***************
+*** 3446,3452 ****
+
+ // Make room for file name. When doing encoding conversion the actual
+ // length may be quite a bit longer, thus use the maximum possible length.
+! buf = alloc((int)MAXPATHL);
+ if (buf == NULL)
+ return 0;
+
+--- 3446,3452 ----
+
+ // Make room for file name. When doing encoding conversion the actual
+ // length may be quite a bit longer, thus use the maximum possible length.
+! buf = alloc(MAXPATHL);
+ if (buf == NULL)
+ return 0;
+
+***************
+*** 3690,3696 ****
+ }
+
+ /* make room for file name */
+! buf = alloc((int)STRLEN(path) + BASENAMELEN + 5);
+ if (buf == NULL)
+ return 0;
+
+--- 3690,3696 ----
+ }
+
+ /* make room for file name */
+! buf = alloc(STRLEN(path) + BASENAMELEN + 5);
+ if (buf == NULL)
+ return 0;
+
+*** ../vim-8.1.1392/src/misc2.c 2019-05-24 18:48:36.746128566 +0200
+--- src/misc2.c 2019-05-25 20:02:29.168751083 +0200
+***************
+*** 1290,1296 ****
+ {
+ char_u *p;
+
+! p = alloc((size_t)(len + 1));
+ if (p != NULL)
+ {
+ STRNCPY(p, string, len);
+--- 1290,1296 ----
+ {
+ char_u *p;
+
+! p = alloc(len + 1);
+ if (p != NULL)
+ {
+ STRNCPY(p, string, len);
+*** ../vim-8.1.1392/src/ops.c 2019-05-24 19:38:59.104545491 +0200
+--- src/ops.c 2019-05-25 20:02:29.168751083 +0200
+***************
+*** 3355,3361 ****
+ free_yank_all();
+ *y_current = *curr;
+ y_current->y_array = (char_u **)lalloc_clear(
+! (long_u)(sizeof(char_u *) * y_current->y_size), TRUE);
+ if (y_current->y_array == NULL)
+ y_current->y_size = 0;
+ else
+--- 3355,3361 ----
+ free_yank_all();
+ *y_current = *curr;
+ y_current->y_array = (char_u **)lalloc_clear(
+! sizeof(char_u *) * y_current->y_size, TRUE);
+ if (y_current->y_array == NULL)
+ y_current->y_size = 0;
+ else
+*** ../vim-8.1.1392/src/os_vms.c 2019-05-24 18:48:36.770128440 +0200
+--- src/os_vms.c 2019-05-25 20:02:29.168751083 +0200
+***************
+*** 245,251 ****
+ else if ((sbuf = getenv((char *)lognam)))
+ {
+ lengte = strlen(sbuf) + 1;
+! cp = (char_u *)alloc((size_t)lengte);
+ if (cp)
+ strcpy((char *)cp, sbuf);
+ return cp;
+--- 245,251 ----
+ else if ((sbuf = getenv((char *)lognam)))
+ {
+ lengte = strlen(sbuf) + 1;
+! cp = (char_u *)alloc(lengte);
+ if (cp)
+ strcpy((char *)cp, sbuf);
+ return cp;
+*** ../vim-8.1.1392/src/os_win32.c 2019-05-24 19:38:59.108545464 +0200
+--- src/os_win32.c 2019-05-25 20:02:29.168751083 +0200
+***************
+*** 7117,7123 ****
+ return;
+
+ /* Remember the buffer numbers for the arguments. */
+! fnum_list = (int *)alloc((int)sizeof(int) * GARGCOUNT);
+ if (fnum_list == NULL)
+ return; /* out of memory */
+ for (i = 0; i < GARGCOUNT; ++i)
+--- 7117,7123 ----
+ return;
+
+ /* Remember the buffer numbers for the arguments. */
+! fnum_list = (int *)alloc(sizeof(int) * GARGCOUNT);
+ if (fnum_list == NULL)
+ return; /* out of memory */
+ for (i = 0; i < GARGCOUNT; ++i)
+*** ../vim-8.1.1392/src/quickfix.c 2019-05-24 19:38:59.108545464 +0200
+--- src/quickfix.c 2019-05-25 20:02:29.168751083 +0200
+***************
+*** 1815,1821 ****
+
+ if (title != NULL)
+ {
+! char_u *p = alloc((int)STRLEN(title) + 2);
+
+ qfl->qf_title = p;
+ if (p != NULL)
+--- 1815,1821 ----
+
+ if (title != NULL)
+ {
+! char_u *p = alloc(STRLEN(title) + 2);
+
+ qfl->qf_title = p;
+ if (p != NULL)
+*** ../vim-8.1.1392/src/regexp_nfa.c 2019-05-24 19:38:59.108545464 +0200
+--- src/regexp_nfa.c 2019-05-25 20:02:29.168751083 +0200
+***************
+*** 4799,4805 ****
+ emsg(_(e_maxmempat));
+ return NULL;
+ }
+! newl = (nfa_thread_T *)alloc((int)newsize);
+ if (newl == NULL)
+ return NULL;
+ l->len = newlen;
+--- 4799,4805 ----
+ emsg(_(e_maxmempat));
+ return NULL;
+ }
+! newl = (nfa_thread_T *)alloc(newsize);
+ if (newl == NULL)
+ return NULL;
+ l->len = newlen;
+*** ../vim-8.1.1392/src/screen.c 2019-05-25 19:51:03.780408437 +0200
+--- src/screen.c 2019-05-25 20:02:29.172751058 +0200
+***************
+*** 328,357 ****
+
+ /* Allocate space to save the text displayed in the command line area. */
+ rows = screen_Rows - cmdline_row;
+! screenline = (schar_T *)lalloc(
+! (long_u)(rows * cols * sizeof(schar_T)), FALSE);
+! screenattr = (sattr_T *)lalloc(
+! (long_u)(rows * cols * sizeof(sattr_T)), FALSE);
+ if (screenline == NULL || screenattr == NULL)
+ ret = 2;
+ if (enc_utf8)
+ {
+ screenlineUC = (u8char_T *)lalloc(
+! (long_u)(rows * cols * sizeof(u8char_T)), FALSE);
+ if (screenlineUC == NULL)
+ ret = 2;
+ for (i = 0; i < p_mco; ++i)
+ {
+ screenlineC[i] = (u8char_T *)lalloc(
+! (long_u)(rows * cols * sizeof(u8char_T)), FALSE);
+ if (screenlineC[i] == NULL)
+ ret = 2;
+ }
+ }
+ if (enc_dbcs == DBCS_JPNU)
+ {
+! screenline2 = (schar_T *)lalloc(
+! (long_u)(rows * cols * sizeof(schar_T)), FALSE);
+ if (screenline2 == NULL)
+ ret = 2;
+ }
+--- 328,354 ----
+
+ /* Allocate space to save the text displayed in the command line area. */
+ rows = screen_Rows - cmdline_row;
+! screenline = (schar_T *)lalloc(rows * cols * sizeof(schar_T), FALSE);
+! screenattr = (sattr_T *)lalloc(rows * cols * sizeof(sattr_T), FALSE);
+ if (screenline == NULL || screenattr == NULL)
+ ret = 2;
+ if (enc_utf8)
+ {
+ screenlineUC = (u8char_T *)lalloc(
+! rows * cols * sizeof(u8char_T), FALSE);
+ if (screenlineUC == NULL)
+ ret = 2;
+ for (i = 0; i < p_mco; ++i)
+ {
+ screenlineC[i] = (u8char_T *)lalloc(
+! rows * cols * sizeof(u8char_T), FALSE);
+ if (screenlineC[i] == NULL)
+ ret = 2;
+ }
+ }
+ if (enc_dbcs == DBCS_JPNU)
+ {
+! screenline2 = (schar_T *)lalloc(rows * cols * sizeof(schar_T), FALSE);
+ if (screenline2 == NULL)
+ ret = 2;
+ }
+*** ../vim-8.1.1392/src/search.c 2019-05-24 22:08:11.366273819 +0200
+--- src/search.c 2019-05-25 20:02:29.172751058 +0200
+***************
+*** 1429,1435 ****
+ // Reserve enough space for the search pattern + offset.
+ len = STRLEN(p) + off_len + 3;
+
+! msgbuf = alloc((int)len);
+ if (msgbuf != NULL)
+ {
+ vim_memset(msgbuf, ' ', len);
+--- 1429,1435 ----
+ // Reserve enough space for the search pattern + offset.
+ len = STRLEN(p) + off_len + 3;
+
+! msgbuf = alloc(len);
+ if (msgbuf != NULL)
+ {
+ vim_memset(msgbuf, ' ', len);
+*** ../vim-8.1.1392/src/sign.c 2019-05-24 19:38:59.112545434 +0200
+--- src/sign.c 2019-05-25 20:02:29.172751058 +0200
+***************
+*** 85,92 ****
+ if (HASHITEM_EMPTY(hi))
+ {
+ // new group
+! group = (signgroup_T *)alloc(
+! (unsigned)(sizeof(signgroup_T) + STRLEN(groupname)));
+ if (group == NULL)
+ return NULL;
+ STRCPY(group->sg_name, groupname);
+--- 85,91 ----
+ if (HASHITEM_EMPTY(hi))
+ {
+ // new group
+! group = (signgroup_T *)alloc(sizeof(signgroup_T) + STRLEN(groupname));
+ if (group == NULL)
+ return NULL;
+ STRCPY(group->sg_name, groupname);
+***************
+*** 737,744 ****
+ int start = next_sign_typenr;
+
+ // Allocate a new sign.
+! sp = (sign_T *)alloc_clear_id((unsigned)sizeof(sign_T),
+! aid_sign_define_by_name);
+ if (sp == NULL)
+ return NULL;
+
+--- 736,742 ----
+ int start = next_sign_typenr;
+
+ // Allocate a new sign.
+! sp = (sign_T *)alloc_clear_id(sizeof(sign_T), aid_sign_define_by_name);
+ if (sp == NULL)
+ return NULL;
+
+*** ../vim-8.1.1392/src/syntax.c 2019-05-24 19:38:59.112545434 +0200
+--- src/syntax.c 2019-05-25 20:02:29.172751058 +0200
+***************
+*** 4494,4500 ****
+ name_folded, MAXKEYWLEN + 1);
+ else
+ name_ic = name;
+! kp = (keyentry_T *)alloc((int)(sizeof(keyentry_T) + STRLEN(name_ic)));
+ if (kp == NULL)
+ return;
+ STRCPY(kp->keyword, name_ic);
+--- 4494,4500 ----
+ name_folded, MAXKEYWLEN + 1);
+ else
+ name_ic = name;
+! kp = (keyentry_T *)alloc(sizeof(keyentry_T) + STRLEN(name_ic));
+ if (kp == NULL)
+ return;
+ STRCPY(kp->keyword, name_ic);
+***************
+*** 6001,6007 ****
+ {
+ for (end = p; *end && !VIM_ISWHITE(*end) && *end != ','; ++end)
+ ;
+! name = alloc((int)(end - p + 3)); /* leave room for "^$" */
+ if (name == NULL)
+ {
+ failed = TRUE;
+--- 6001,6007 ----
+ {
+ for (end = p; *end && !VIM_ISWHITE(*end) && *end != ','; ++end)
+ ;
+! name = alloc(end - p + 3); /* leave room for "^$" */
+ if (name == NULL)
+ {
+ failed = TRUE;
+*** ../vim-8.1.1392/src/tag.c 2019-05-24 19:38:59.112545434 +0200
+--- src/tag.c 2019-05-25 20:02:29.172751058 +0200
+***************
+*** 1430,1436 ****
+ if (name_only)
+ mfp = vim_strsave(res_name);
+ else
+! mfp = (char_u *)alloc((int)sizeof(char_u) + len + 1);
+
+ if (mfp == NULL)
+ continue;
+--- 1430,1436 ----
+ if (name_only)
+ mfp = vim_strsave(res_name);
+ else
+! mfp = (char_u *)alloc(sizeof(char_u) + len + 1);
+
+ if (mfp == NULL)
+ continue;
+***************
+*** 2536,2542 ****
+ */
+ *tagp.tagname_end = NUL;
+ len = (int)(tagp.tagname_end - tagp.tagname);
+! mfp = (char_u *)alloc((int)sizeof(char_u)
+ + len + 10 + ML_EXTRA + 1);
+ if (mfp != NULL)
+ {
+--- 2536,2542 ----
+ */
+ *tagp.tagname_end = NUL;
+ len = (int)(tagp.tagname_end - tagp.tagname);
+! mfp = (char_u *)alloc(sizeof(char_u)
+ + len + 10 + ML_EXTRA + 1);
+ if (mfp != NULL)
+ {
+***************
+*** 2585,2591 ****
+ else
+ {
+ len = (int)(tagp.tagname_end - tagp.tagname);
+! mfp = (char_u *)alloc((int)sizeof(char_u) + len + 1);
+ if (mfp != NULL)
+ vim_strncpy(mfp, tagp.tagname, len);
+
+--- 2585,2591 ----
+ else
+ {
+ len = (int)(tagp.tagname_end - tagp.tagname);
+! mfp = (char_u *)alloc(sizeof(char_u) + len + 1);
+ if (mfp != NULL)
+ vim_strncpy(mfp, tagp.tagname, len);
+
+***************
+*** 2620,2626 ****
+ else
+ ++len;
+ #endif
+! mfp = (char_u *)alloc((int)sizeof(char_u) + len + 1);
+ if (mfp != NULL)
+ {
+ p = mfp;
+--- 2620,2626 ----
+ else
+ ++len;
+ #endif
+! mfp = (char_u *)alloc(sizeof(char_u) + len + 1);
+ if (mfp != NULL)
+ {
+ p = mfp;
+***************
+*** 3346,3352 ****
+ /* Make a copy of the line, it can become invalid when an autocommand calls
+ * back here recursively. */
+ len = matching_line_len(lbuf_arg) + 1;
+! lbuf = alloc((int)len);
+ if (lbuf != NULL)
+ mch_memmove(lbuf, lbuf_arg, len);
+
+--- 3346,3352 ----
+ /* Make a copy of the line, it can become invalid when an autocommand calls
+ * back here recursively. */
+ len = matching_line_len(lbuf_arg) + 1;
+! lbuf = alloc(len);
+ if (lbuf != NULL)
+ mch_memmove(lbuf, lbuf_arg, len);
+
+*** ../vim-8.1.1392/src/term.c 2019-05-24 18:48:36.774128421 +0200
+--- src/term.c 2019-05-25 20:02:29.172751058 +0200
+***************
+*** 4188,4194 ****
+ {
+ tc_max_len += 20;
+ new_tc = (struct termcode *)alloc(
+! (unsigned)(tc_max_len * sizeof(struct termcode)));
+ if (new_tc == NULL)
+ {
+ tc_max_len -= 20;
+--- 4188,4194 ----
+ {
+ tc_max_len += 20;
+ new_tc = (struct termcode *)alloc(
+! tc_max_len * sizeof(struct termcode));
+ if (new_tc == NULL)
+ {
+ tc_max_len -= 20;
+***************
+*** 7072,7078 ****
+ if (!counting)
+ {
+ colornames_table = (struct rgbcolor_table_S *)alloc(
+! (unsigned)(sizeof(struct rgbcolor_table_S) * size));
+ if (colornames_table == NULL)
+ {
+ fclose(fd);
+--- 7072,7078 ----
+ if (!counting)
+ {
+ colornames_table = (struct rgbcolor_table_S *)alloc(
+! sizeof(struct rgbcolor_table_S) * size);
+ if (colornames_table == NULL)
+ {
+ fclose(fd);
+*** ../vim-8.1.1392/src/terminal.c 2019-05-25 19:51:03.780408437 +0200
+--- src/terminal.c 2019-05-25 20:02:29.172751058 +0200
+***************
+*** 534,540 ****
+ cmd = (char_u*)"";
+
+ len = STRLEN(cmd) + 10;
+! p = alloc((int)len);
+
+ for (i = 0; p != NULL; ++i)
+ {
+--- 534,540 ----
+ cmd = (char_u*)"";
+
+ len = STRLEN(cmd) + 10;
+! p = alloc(len);
+
+ for (i = 0; p != NULL; ++i)
+ {
+***************
+*** 1630,1636 ****
+ if (len == 0)
+ p = NULL;
+ else
+! p = (cellattr_T *)alloc((int)sizeof(cellattr_T) * len);
+ if ((p != NULL || len == 0)
+ && ga_grow(&term->tl_scrollback, 1) == OK)
+ {
+--- 1630,1636 ----
+ if (len == 0)
+ p = NULL;
+ else
+! p = (cellattr_T *)alloc(sizeof(cellattr_T) * len);
+ if ((p != NULL || len == 0)
+ && ga_grow(&term->tl_scrollback, 1) == OK)
+ {
+***************
+*** 2884,2890 ****
+
+ ga_init2(&ga, 1, 100);
+ if (len > 0)
+! p = (cellattr_T *)alloc((int)sizeof(cellattr_T) * len);
+ if (p != NULL)
+ {
+ for (col = 0; col < len; col += cells[col].width)
+--- 2884,2890 ----
+
+ ga_init2(&ga, 1, 100);
+ if (len > 0)
+! p = (cellattr_T *)alloc(sizeof(cellattr_T) * len);
+ if (p != NULL)
+ {
+ for (col = 0; col < len; col += cells[col].width)
+***************
+*** 3718,3724 ****
+ p = dict_get_string(dict, (char_u *)"encoding", FALSE);
+ if (p != NULL)
+ {
+! ea.cmd = alloc((int)STRLEN(p) + 12);
+ if (ea.cmd != NULL)
+ {
+ sprintf((char *)ea.cmd, "sbuf ++enc=%s", p);
+--- 3718,3724 ----
+ p = dict_get_string(dict, (char_u *)"encoding", FALSE);
+ if (p != NULL)
+ {
+! ea.cmd = alloc(STRLEN(p) + 12);
+ if (ea.cmd != NULL)
+ {
+ sprintf((char *)ea.cmd, "sbuf ++enc=%s", p);
+***************
+*** 4031,4037 ****
+ else
+ txt = (char_u *)_("finished");
+ len = 9 + STRLEN(term->tl_buffer->b_fname) + STRLEN(txt);
+! term->tl_status_text = alloc((int)len);
+ if (term->tl_status_text != NULL)
+ vim_snprintf((char *)term->tl_status_text, len, "%s [%s]",
+ term->tl_buffer->b_fname, txt);
+--- 4031,4037 ----
+ else
+ txt = (char_u *)_("finished");
+ len = 9 + STRLEN(term->tl_buffer->b_fname) + STRLEN(txt);
+! term->tl_status_text = alloc(len);
+ if (term->tl_status_text != NULL)
+ vim_snprintf((char *)term->tl_status_text, len, "%s [%s]",
+ term->tl_buffer->b_fname, txt);
+***************
+*** 4663,4669 ****
+ {
+ size_t len = STRLEN(fname1) + 12;
+
+! fname_tofree = alloc((int)len);
+ if (fname_tofree != NULL)
+ {
+ vim_snprintf((char *)fname_tofree, len, "dump diff %s", fname1);
+--- 4663,4669 ----
+ {
+ size_t len = STRLEN(fname1) + 12;
+
+! fname_tofree = alloc(len);
+ if (fname_tofree != NULL)
+ {
+ vim_snprintf((char *)fname_tofree, len, "dump diff %s", fname1);
+***************
+*** 4935,4941 ****
+ else
+ {
+ size_t size = sizeof(sb_line_T) * term->tl_scrollback.ga_len;
+! sb_line_T *temp = (sb_line_T *)alloc((int)size);
+
+ /* need to copy cell properties into temp memory */
+ if (temp != NULL)
+--- 4935,4941 ----
+ else
+ {
+ size_t size = sizeof(sb_line_T) * term->tl_scrollback.ga_len;
+! sb_line_T *temp = (sb_line_T *)alloc(size);
+
+ /* need to copy cell properties into temp memory */
+ if (temp != NULL)
+***************
+*** 5800,5806 ****
+ {
+ /* Request by CreateProcessW */
+ breq = wcslen(cmd_wchar) + 1 + 1; /* Addition of NUL by API */
+! cmd_wchar_copy = (PWSTR)alloc((int)(breq * sizeof(WCHAR)));
+ wcsncpy(cmd_wchar_copy, cmd_wchar, breq - 1);
+ }
+
+--- 5800,5806 ----
+ {
+ /* Request by CreateProcessW */
+ breq = wcslen(cmd_wchar) + 1 + 1; /* Addition of NUL by API */
+! cmd_wchar_copy = (PWSTR)alloc(breq * sizeof(WCHAR));
+ wcsncpy(cmd_wchar_copy, cmd_wchar, breq - 1);
+ }
+
+***************
+*** 5830,5836 ****
+ /* Set up pipe inheritance safely: Vista or later. */
+ pInitializeProcThreadAttributeList(NULL, 1, 0, &breq);
+ term->tl_siex.lpAttributeList =
+! (PPROC_THREAD_ATTRIBUTE_LIST)alloc((int)breq);
+ if (!term->tl_siex.lpAttributeList)
+ goto failed;
+ if (!pInitializeProcThreadAttributeList(term->tl_siex.lpAttributeList, 1,
+--- 5830,5836 ----
+ /* Set up pipe inheritance safely: Vista or later. */
+ pInitializeProcThreadAttributeList(NULL, 1, 0, &breq);
+ term->tl_siex.lpAttributeList =
+! (PPROC_THREAD_ATTRIBUTE_LIST)alloc(breq);
+ if (!term->tl_siex.lpAttributeList)
+ goto failed;
+ if (!pInitializeProcThreadAttributeList(term->tl_siex.lpAttributeList, 1,
+*** ../vim-8.1.1392/src/textprop.c 2019-05-24 21:22:25.672809688 +0200
+--- src/textprop.c 2019-05-25 20:02:29.176751028 +0200
+***************
+*** 1220,1226 ****
+ oldproplen = get_text_props(curbuf, lnum, &props, FALSE);
+
+ len = STRLEN(newp) + 1;
+! line = alloc((int)(len + (oldproplen + proplen) * sizeof(textprop_T)));
+ if (line == NULL)
+ return;
+ mch_memmove(line, newp, len);
+--- 1220,1226 ----
+ oldproplen = get_text_props(curbuf, lnum, &props, FALSE);
+
+ len = STRLEN(newp) + 1;
+! line = alloc(len + (oldproplen + proplen) * sizeof(textprop_T));
+ if (line == NULL)
+ return;
+ mch_memmove(line, newp, len);
+*** ../vim-8.1.1392/src/version.c 2019-05-25 20:10:32.841684636 +0200
+--- src/version.c 2019-05-25 20:20:40.270198657 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1393,
+ /**/
+
+--
+The History of every major Galactic Civilization tends to pass through
+three distinct and recognizable phases, those of Survival, Inquiry and
+Sophistication, otherwise known as the How, Why and Where phases.
+For instance, the first phase is characterized by the question 'How can
+we eat?' the second by the question 'Why do we eat?' and the third by
+the question 'Where shall we have lunch?'
+ -- 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.1394 b/data/vim/patches/8.1.1394
new file mode 100644
index 000000000..36ba67240
--- /dev/null
+++ b/data/vim/patches/8.1.1394
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1394
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1394
+Problem: Not restoring t_F2 in registers test.
+Solution: Assign to &t_F2 instead of t_F2. (Andy Massimino, closes #4434)
+Files: src/testdir/test_registers.vim
+
+
+*** ../vim-8.1.1393/src/testdir/test_registers.vim 2019-04-20 23:47:42.518391308 +0200
+--- src/testdir/test_registers.vim 2019-05-25 21:46:32.257655942 +0200
+***************
+*** 162,168 ****
+ call assert_equal(['Quirk', 'Test', 'Quirk', 'Test'], getline(1, 4))
+ bwipe!
+ if exists('save_F2')
+! let t_F2 = save_F2
+ else
+ set t_F2=
+ endif
+--- 162,168 ----
+ call assert_equal(['Quirk', 'Test', 'Quirk', 'Test'], getline(1, 4))
+ bwipe!
+ if exists('save_F2')
+! let &t_F2 = save_F2
+ else
+ set t_F2=
+ endif
+*** ../vim-8.1.1393/src/version.c 2019-05-25 20:21:24.685950973 +0200
+--- src/version.c 2019-05-25 21:47:25.529484305 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1394,
+ /**/
+
+--
+This planet has -- or rather had -- a problem, which was this: most
+of the people living on it were unhappy for pretty much of the time.
+Many solutions were suggested for this problem, but most of these
+were largely concerned with the movements of small green pieces of
+paper, which is odd because on the whole it wasn't the small green
+pieces of paper that were unhappy.
+ -- 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.1395 b/data/vim/patches/8.1.1395
new file mode 100644
index 000000000..9b429ed76
--- /dev/null
+++ b/data/vim/patches/8.1.1395
@@ -0,0 +1,89 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1395
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1395
+Problem: Saving for undo may access invalid memory. (Dominique Pelle)
+Solution: Set ml_line_len also when returning a constant string.
+Files: src/memline.c, src/testdir/test_textprop.vim
+
+
+*** ../vim-8.1.1394/src/memline.c 2019-05-24 18:48:36.766128461 +0200
+--- src/memline.c 2019-05-25 22:08:30.059817878 +0200
+***************
+*** 2573,2585 ****
+ }
+ errorret:
+ STRCPY(IObuff, "???");
+ return IObuff;
+ }
+! if (lnum <= 0) /* pretend line 0 is line 1 */
+ lnum = 1;
+
+! if (buf->b_ml.ml_mfp == NULL) /* there are no lines */
+ return (char_u *)"";
+
+ /*
+ * See if it is the same line as requested last time.
+--- 2573,2589 ----
+ }
+ errorret:
+ STRCPY(IObuff, "???");
++ buf->b_ml.ml_line_len = 4;
+ return IObuff;
+ }
+! if (lnum <= 0) // pretend line 0 is line 1
+ lnum = 1;
+
+! if (buf->b_ml.ml_mfp == NULL) // there are no lines
+! {
+! buf->b_ml.ml_line_len = 1;
+ return (char_u *)"";
++ }
+
+ /*
+ * See if it is the same line as requested last time.
+*** ../vim-8.1.1394/src/testdir/test_textprop.vim 2019-05-24 21:22:25.672809688 +0200
+--- src/testdir/test_textprop.vim 2019-05-25 22:00:13.638251158 +0200
+***************
+*** 766,771 ****
+--- 766,780 ----
+ new
+ call prop_add(1, 1, {'type': 'comment'})
+ close
++ call prop_type_delete('comment')
++ endfunc
++
++ " Adding a text property to an empty buffer and then editing another
++ func Test_textprop_empty_buffer_next()
++ call prop_type_add("xxx", {})
++ call prop_add(1, 1, {"type": "xxx"})
++ next X
++ call prop_type_delete('xxx')
+ endfunc
+
+ func Test_textprop_remove_from_buf()
+*** ../vim-8.1.1394/src/version.c 2019-05-25 21:52:25.096355509 +0200
+--- src/version.c 2019-05-25 22:09:37.191480883 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1395,
+ /**/
+
+--
+'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.1396 b/data/vim/patches/8.1.1396
new file mode 100644
index 000000000..a0bcd1781
--- /dev/null
+++ b/data/vim/patches/8.1.1396
@@ -0,0 +1,323 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1396
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1396
+Problem: 'wincolor' does not apply to lines below the buffer.
+Solution: Also apply 'wincolor' to the "~" lines and the number column.
+Files: src/screen.c, src/testdir/test_highlight.vim,
+ src/testdir/dumps/Test_wincolor_01.dump
+
+
+*** ../vim-8.1.1395/src/screen.c 2019-05-25 20:21:24.681950994 +0200
+--- src/screen.c 2019-05-25 22:55:07.412061896 +0200
+***************
+*** 2418,2423 ****
+--- 2418,2431 ----
+ hlf_T hl)
+ {
+ int n = 0;
++ int attr = HL_ATTR(hl);
++ int wcr_attr = 0;
++
++ if (*wp->w_p_wcr != NUL)
++ {
++ wcr_attr = syn_name2attr(wp->w_p_wcr);
++ attr = hl_combine_attr(wcr_attr, attr);
++ }
+
+ if (draw_margin)
+ {
+***************
+*** 2427,2445 ****
+ if (fdc > 0)
+ // draw the fold column
+ n = screen_fill_end(wp, ' ', ' ', n, fdc,
+! row, endrow, HL_ATTR(HLF_FC));
+ #endif
+ #ifdef FEAT_SIGNS
+ if (signcolumn_on(wp))
+ // draw the sign column
+ n = screen_fill_end(wp, ' ', ' ', n, 2,
+! row, endrow, HL_ATTR(HLF_SC));
+ #endif
+ if ((wp->w_p_nu || wp->w_p_rnu)
+ && vim_strchr(p_cpo, CPO_NUMCOL) == NULL)
+ // draw the number column
+ n = screen_fill_end(wp, ' ', ' ', n, number_width(wp) + 1,
+! row, endrow, HL_ATTR(HLF_N));
+ }
+
+ #ifdef FEAT_RIGHTLEFT
+--- 2435,2453 ----
+ if (fdc > 0)
+ // draw the fold column
+ n = screen_fill_end(wp, ' ', ' ', n, fdc,
+! row, endrow, hl_combine_attr(wcr_attr, HL_ATTR(HLF_FC)));
+ #endif
+ #ifdef FEAT_SIGNS
+ if (signcolumn_on(wp))
+ // draw the sign column
+ n = screen_fill_end(wp, ' ', ' ', n, 2,
+! row, endrow, hl_combine_attr(wcr_attr, HL_ATTR(HLF_SC)));
+ #endif
+ if ((wp->w_p_nu || wp->w_p_rnu)
+ && vim_strchr(p_cpo, CPO_NUMCOL) == NULL)
+ // draw the number column
+ n = screen_fill_end(wp, ' ', ' ', n, number_width(wp) + 1,
+! row, endrow, hl_combine_attr(wcr_attr, HL_ATTR(HLF_N)));
+ }
+
+ #ifdef FEAT_RIGHTLEFT
+***************
+*** 2447,2463 ****
+ {
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+ wp->w_wincol, W_ENDCOL(wp) - 1 - n,
+! c2, c2, HL_ATTR(hl));
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+ W_ENDCOL(wp) - 1 - n, W_ENDCOL(wp) - n,
+! c1, c2, HL_ATTR(hl));
+ }
+ else
+ #endif
+ {
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+ wp->w_wincol + n, (int)W_ENDCOL(wp),
+! c1, c2, HL_ATTR(hl));
+ }
+
+ set_empty_rows(wp, row);
+--- 2455,2471 ----
+ {
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+ wp->w_wincol, W_ENDCOL(wp) - 1 - n,
+! c2, c2, attr);
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+ W_ENDCOL(wp) - 1 - n, W_ENDCOL(wp) - n,
+! c1, c2, attr);
+ }
+ else
+ #endif
+ {
+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
+ wp->w_wincol + n, (int)W_ENDCOL(wp),
+! c1, c2, attr);
+ }
+
+ set_empty_rows(wp, row);
+***************
+*** 3100,3113 ****
+ pos_T pos;
+ long v;
+
+! int char_attr = 0; /* attributes for next character */
+! int attr_pri = FALSE; /* char_attr has priority */
+! int area_highlighting = FALSE; /* Visual or incsearch highlighting
+! in this line */
+! int vi_attr = 0; /* attributes for Visual and incsearch
+! highlighting */
+! int area_attr = 0; /* attributes desired by highlighting */
+! int search_attr = 0; /* attributes desired by 'hlsearch' */
+ #ifdef FEAT_SYN_HL
+ int vcol_save_attr = 0; /* saved attr for 'cursorcolumn' */
+ int syntax_attr = 0; /* attributes desired by syntax */
+--- 3108,3122 ----
+ pos_T pos;
+ long v;
+
+! int char_attr = 0; // attributes for next character
+! int attr_pri = FALSE; // char_attr has priority
+! int area_highlighting = FALSE; // Visual or incsearch highlighting
+! // in this line
+! int vi_attr = 0; // attributes for Visual and incsearch
+! // highlighting
+! int wcr_attr = 0; // attributes from 'wincolor'
+! int area_attr = 0; // attributes desired by highlighting
+! int search_attr = 0; // attributes desired by 'hlsearch'
+ #ifdef FEAT_SYN_HL
+ int vcol_save_attr = 0; /* saved attr for 'cursorcolumn' */
+ int syntax_attr = 0; /* attributes desired by syntax */
+***************
+*** 3559,3570 ****
+
+ if (*wp->w_p_wcr != NUL)
+ {
+! int attr = syn_name2attr(wp->w_p_wcr);
+
+ // 'wincolor' highlighting for the whole window
+! if (attr != 0)
+ {
+! win_attr = attr;
+ area_highlighting = TRUE;
+ }
+ }
+--- 3568,3579 ----
+
+ if (*wp->w_p_wcr != NUL)
+ {
+! wcr_attr = syn_name2attr(wp->w_p_wcr);
+
+ // 'wincolor' highlighting for the whole window
+! if (wcr_attr != 0)
+ {
+! win_attr = wcr_attr;
+ area_highlighting = TRUE;
+ }
+ }
+***************
+*** 3850,3856 ****
+ n_extra = 1;
+ c_extra = cmdwin_type;
+ c_final = NUL;
+! char_attr = HL_ATTR(HLF_AT);
+ }
+ }
+ #endif
+--- 3859,3865 ----
+ n_extra = 1;
+ c_extra = cmdwin_type;
+ c_final = NUL;
+! char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_AT));
+ }
+ }
+ #endif
+***************
+*** 3876,3882 ****
+ p_extra = p_extra_free;
+ c_extra = NUL;
+ c_final = NUL;
+! char_attr = HL_ATTR(HLF_FC);
+ }
+ }
+ }
+--- 3885,3891 ----
+ p_extra = p_extra_free;
+ c_extra = NUL;
+ c_final = NUL;
+! char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_FC));
+ }
+ }
+ }
+***************
+*** 3898,3904 ****
+ /* Draw two cells with the sign value or blank. */
+ c_extra = ' ';
+ c_final = NUL;
+! char_attr = HL_ATTR(HLF_SC);
+ n_extra = 2;
+
+ if (row == startrow
+--- 3907,3913 ----
+ /* Draw two cells with the sign value or blank. */
+ c_extra = ' ';
+ c_final = NUL;
+! char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_SC));
+ n_extra = 2;
+
+ if (row == startrow
+***************
+*** 4012,4018 ****
+ c_final = NUL;
+ }
+ n_extra = number_width(wp) + 1;
+! char_attr = HL_ATTR(HLF_N);
+ #ifdef FEAT_SYN_HL
+ /* When 'cursorline' is set highlight the line number of
+ * the current line differently.
+--- 4021,4027 ----
+ c_final = NUL;
+ }
+ n_extra = number_width(wp) + 1;
+! char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_N));
+ #ifdef FEAT_SYN_HL
+ /* When 'cursorline' is set highlight the line number of
+ * the current line differently.
+***************
+*** 4020,4026 ****
+ * when CursorLineNr isn't set? */
+ if ((wp->w_p_cul || wp->w_p_rnu)
+ && lnum == wp->w_cursor.lnum)
+! char_attr = HL_ATTR(HLF_CLN);
+ #endif
+ }
+ }
+--- 4029,4035 ----
+ * when CursorLineNr isn't set? */
+ if ((wp->w_p_cul || wp->w_p_rnu)
+ && lnum == wp->w_cursor.lnum)
+! char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_CLN));
+ #endif
+ }
+ }
+*** ../vim-8.1.1395/src/testdir/test_highlight.vim 2019-05-09 20:07:30.310817540 +0200
+--- src/testdir/test_highlight.vim 2019-05-25 22:46:50.942385413 +0200
+***************
+*** 573,578 ****
+--- 573,602 ----
+ call delete('Xtest_cursorline_with_visualmode')
+ endfunc
+
++ func Test_wincolor()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
++ call writefile([
++ \ 'set cursorline cursorcolumn rnu',
++ \ 'call setline(1, ["","1111111111","22222222222","3 here 3",""])',
++ \ 'set wincolor=Pmenu',
++ \ '/here',
++ \ ], 'Xtest_wincolor')
++ let buf = RunVimInTerminal('-S Xtest_wincolor', {'rows': 8})
++ call term_wait(buf)
++ call term_sendkeys(buf, "2G5lvj")
++ call term_wait(buf)
++
++ call VerifyScreenDump(buf, 'Test_wincolor_01', {})
++
++ " clean up
++ call term_sendkeys(buf, "\<Esc>")
++ call StopVimInTerminal(buf)
++ call delete('Xtest_wincolor')
++ endfunc
++
+ " This test must come before the Test_cursorline test, as it appears this
+ " defines the Normal highlighting group anyway.
+ func Test_1_highlight_Normalgroup_exists()
+*** ../vim-8.1.1395/src/testdir/dumps/Test_wincolor_01.dump 2019-05-25 22:56:14.639798568 +0200
+--- src/testdir/dumps/Test_wincolor_01.dump 2019-05-25 22:55:16.532026895 +0200
+***************
+*** 0 ****
+--- 1,8 ----
++ | +0#af5f00255#ffd7ff255@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64
++ | +0#af5f00255&@1|1| |1+0#0000001&@4|1+0#0000000#e0e0e08@4| | +0#0000001#ffd7ff255@59
++ | +0#af5f00255&@1|0| |2+0#0000000#e0e0e08@4>2+0#0000001#ffd7ff255@5| +8&&@59
++ | +0#af5f00255&@1|1| |3+0#0000001&| |h|e|r|e+0&#e0e0e08| +0&#ffd7ff255|3| @62
++ | +0#af5f00255&@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64
++ |~+0#4040ff13&| @73
++ |~| @73
++ |-+2#0000000#ffffff0@1| |V|I|S|U|A|L| |-@1| +0&&@34|2| @8|3|,|6| @10|A|l@1|
+*** ../vim-8.1.1395/src/version.c 2019-05-25 22:11:42.474849134 +0200
+--- src/version.c 2019-05-25 22:42:49.275740047 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1396,
+ /**/
+
+--
+What a wonderfully exciting cough! Do you mind if I join you?
+ -- 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.1397 b/data/vim/patches/8.1.1397
new file mode 100644
index 000000000..33379e1ff
--- /dev/null
+++ b/data/vim/patches/8.1.1397
@@ -0,0 +1,60 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1397
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1397
+Problem: Build fails in tiny version.
+Solution: Always define hl_combine_attr().
+Files: src/syntax.c
+
+
+*** ../vim-8.1.1396/src/syntax.c 2019-05-25 20:21:24.685950973 +0200
+--- src/syntax.c 2019-05-25 23:11:18.647578048 +0200
+***************
+*** 8964,8970 ****
+ ga_clear(&cterm_attr_table);
+ }
+
+- #if defined(FEAT_SYN_HL) || defined(FEAT_SPELL) || defined(PROTO)
+ /*
+ * Combine special attributes (e.g., for spelling) with other attributes
+ * (e.g., for syntax highlighting).
+--- 8964,8969 ----
+***************
+*** 9111,9117 ****
+ }
+ return get_attr_entry(&term_attr_table, &new_en);
+ }
+- #endif
+
+ #ifdef FEAT_GUI
+
+--- 9110,9115 ----
+*** ../vim-8.1.1396/src/version.c 2019-05-25 22:56:46.679669071 +0200
+--- src/version.c 2019-05-25 23:11:10.163620825 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1397,
+ /**/
+
+--
+"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.1398 b/data/vim/patches/8.1.1398
new file mode 100644
index 000000000..8327e9cf3
--- /dev/null
+++ b/data/vim/patches/8.1.1398
@@ -0,0 +1,44 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1398
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1398
+Problem: Duplicate line in MSVC build file.
+Solution: Remove the line. (Ken Takata, closes #4436)
+Files: src/Make_mvc.mak
+
+
+*** ../vim-8.1.1397/src/Make_mvc.mak 2019-05-25 19:51:03.772408479 +0200
+--- src/Make_mvc.mak 2019-05-26 13:12:52.295554159 +0200
+***************
+*** 744,750 ****
+ $(OUTDIR)\pathdef.obj \
+ $(OUTDIR)\popupmnu.obj \
+ $(OUTDIR)\popupwin.obj \
+- $(OUTDIR)\popupwin.obj \
+ $(OUTDIR)\quickfix.obj \
+ $(OUTDIR)\regexp.obj \
+ $(OUTDIR)\screen.obj \
+--- 744,749 ----
+*** ../vim-8.1.1397/src/version.c 2019-05-25 23:42:10.230781069 +0200
+--- src/version.c 2019-05-26 13:13:25.951384640 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1398,
+ /**/
+
+--
+Due knot trussed yore spell chequer two fined awl miss steaks.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1399 b/data/vim/patches/8.1.1399
new file mode 100644
index 000000000..a4980b698
--- /dev/null
+++ b/data/vim/patches/8.1.1399
@@ -0,0 +1,323 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1399
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1399
+Problem: Popup windows not adjusted when switching tabs.
+Solution: Save and restore first_tab_popupwin. Fix closing a tabpage.
+Files: src/window.c, src/popupwin.c, src/proto/popupwin.pro,
+ src/testdir/test_popupwin.vim,
+ src/testdir/dumps/Test_popupwin_02.dump,
+ src/testdir/dumps/Test_popupwin_03.dump,
+ src/testdir/dumps/Test_popupwin_04.dump
+
+
+*** ../vim-8.1.1398/src/window.c 2019-05-25 20:10:32.837684661 +0200
+--- src/window.c 2019-05-26 14:02:01.612768844 +0200
+***************
+*** 3670,3677 ****
+ diff_clear(tp);
+ # endif
+ # ifdef FEAT_TEXT_PROP
+! while (tp->tp_first_popupwin != NULL)
+! popup_close(tp->tp_first_popupwin->w_id);
+ #endif
+ for (idx = 0; idx < SNAP_COUNT; ++idx)
+ clear_snapshot(tp, idx);
+--- 3670,3686 ----
+ diff_clear(tp);
+ # endif
+ # ifdef FEAT_TEXT_PROP
+! {
+! win_T *wp;
+!
+! for (;;)
+! {
+! wp = tp == curtab ? first_tab_popupwin : tp->tp_first_popupwin;
+! if (wp == NULL)
+! break;
+! popup_close_tabpage(tp, wp->w_id);
+! }
+! }
+ #endif
+ for (idx = 0; idx < SNAP_COUNT; ++idx)
+ clear_snapshot(tp, idx);
+***************
+*** 3964,3969 ****
+--- 3973,3982 ----
+ tp->tp_prevwin = prevwin;
+ tp->tp_firstwin = firstwin;
+ tp->tp_lastwin = lastwin;
++ #ifdef FEAT_TEXT_PROP
++ tp->tp_first_popupwin = first_tab_popupwin;
++ first_tab_popupwin = NULL;
++ #endif
+ tp->tp_old_Rows = Rows;
+ tp->tp_old_Columns = Columns;
+ firstwin = NULL;
+***************
+*** 3991,3996 ****
+--- 4004,4012 ----
+ firstwin = tp->tp_firstwin;
+ lastwin = tp->tp_lastwin;
+ topframe = tp->tp_topframe;
++ #ifdef FEAT_TEXT_PROP
++ first_tab_popupwin = tp->tp_first_popupwin;
++ #endif
+
+ /* We would like doing the TabEnter event first, but we don't have a
+ * valid current window yet, which may break some commands.
+***************
+*** 6497,6505 ****
+--- 6513,6527 ----
+ {
+ curtab->tp_firstwin = firstwin;
+ curtab->tp_lastwin = lastwin;
++ #ifdef FEAT_TEXT_PROP
++ curtab->tp_first_popupwin = first_tab_popupwin ;
++ #endif
+ curtab = tp;
+ firstwin = curtab->tp_firstwin;
+ lastwin = curtab->tp_lastwin;
++ #ifdef FEAT_TEXT_PROP
++ first_tab_popupwin = curtab->tp_first_popupwin;
++ #endif
+ }
+ else
+ goto_tabpage_tp(tp, FALSE, FALSE);
+***************
+*** 6528,6536 ****
+--- 6550,6564 ----
+ {
+ curtab->tp_firstwin = firstwin;
+ curtab->tp_lastwin = lastwin;
++ #ifdef FEAT_TEXT_PROP
++ curtab->tp_first_popupwin = first_tab_popupwin ;
++ #endif
+ curtab = save_curtab;
+ firstwin = curtab->tp_firstwin;
+ lastwin = curtab->tp_lastwin;
++ #ifdef FEAT_TEXT_PROP
++ first_tab_popupwin = curtab->tp_first_popupwin;
++ #endif
+ }
+ else
+ goto_tabpage_tp(save_curtab, FALSE, FALSE);
+*** ../vim-8.1.1398/src/popupwin.c 2019-05-25 19:51:03.776408456 +0200
+--- src/popupwin.c 2019-05-26 13:56:33.486438052 +0200
+***************
+*** 177,216 ****
+ popup_close(nr);
+ }
+
+ void
+! popup_close(int nr)
+ {
+ win_T *wp;
+ win_T *prev = NULL;
+
+ for (wp = first_popupwin; wp != NULL; prev = wp, wp = wp->w_next)
+! if (wp->w_id == nr)
+ {
+ if (prev == NULL)
+ first_popupwin = wp->w_next;
+ else
+ prev->w_next = wp->w_next;
+! break;
+ }
+
+! if (wp == NULL)
+! {
+! prev = NULL;
+! for (wp = first_tab_popupwin; wp != NULL; prev = wp, wp = wp->w_next)
+! if (wp->w_id == nr)
+! {
+! if (prev == NULL)
+! first_tab_popupwin = wp->w_next;
+! else
+! prev->w_next = wp->w_next;
+! break;
+! }
+! }
+! if (wp != NULL)
+! {
+! win_free_popup(wp);
+! redraw_all_later(NOT_VALID);
+! }
+ }
+
+ void
+--- 177,235 ----
+ popup_close(nr);
+ }
+
++ /*
++ * Close a popup window by Window-id.
++ */
+ void
+! popup_close(int id)
+ {
+ win_T *wp;
++ tabpage_T *tp;
+ win_T *prev = NULL;
+
++ // go through global popups
+ for (wp = first_popupwin; wp != NULL; prev = wp, wp = wp->w_next)
+! if (wp->w_id == id)
+ {
+ if (prev == NULL)
+ first_popupwin = wp->w_next;
+ else
+ prev->w_next = wp->w_next;
+! win_free_popup(wp);
+! redraw_all_later(NOT_VALID);
+! return;
+ }
+
+! // go through tab-local popups
+! FOR_ALL_TABPAGES(tp)
+! popup_close_tabpage(tp, id);
+! }
+!
+! /*
+! * Close a popup window with Window-id "id" in tabpage "tp".
+! */
+! void
+! popup_close_tabpage(tabpage_T *tp, int id)
+! {
+! win_T *wp;
+! win_T **root;
+! win_T *prev = NULL;
+!
+! if (tp == curtab)
+! root = &first_tab_popupwin;
+! else
+! root = &tp->tp_first_popupwin;
+! for (wp = *root; wp != NULL; prev = wp, wp = wp->w_next)
+! if (wp->w_id == id)
+! {
+! if (prev == NULL)
+! *root = wp->w_next;
+! else
+! prev->w_next = wp->w_next;
+! win_free_popup(wp);
+! redraw_all_later(NOT_VALID);
+! return;
+! }
+ }
+
+ void
+*** ../vim-8.1.1398/src/proto/popupwin.pro 2019-05-25 19:51:03.776408456 +0200
+--- src/proto/popupwin.pro 2019-05-26 13:56:23.998485715 +0200
+***************
+*** 1,7 ****
+ /* popupwin.c */
+ void f_popup_create(typval_T *argvars, typval_T *rettv);
+ void f_popup_close(typval_T *argvars, typval_T *rettv);
+! void popup_close(int nr);
+ void close_all_popups(void);
+ void ex_popupclear(exarg_T *eap);
+ /* vim: set ft=c : */
+--- 1,8 ----
+ /* popupwin.c */
+ void f_popup_create(typval_T *argvars, typval_T *rettv);
+ void f_popup_close(typval_T *argvars, typval_T *rettv);
+! void popup_close(int id);
+! void popup_close_tabpage(tabpage_T *tp, int id);
+ void close_all_popups(void);
+ void ex_popupclear(exarg_T *eap);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1398/src/testdir/test_popupwin.vim 2019-05-25 19:51:03.780408437 +0200
+--- src/testdir/test_popupwin.vim 2019-05-26 14:07:44.274997632 +0200
+***************
+*** 20,25 ****
+--- 20,38 ----
+ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
+ call VerifyScreenDump(buf, 'Test_popupwin_01', {})
+
++ " Add a tabpage
++ call term_sendkeys(buf, ":tabnew\<CR>")
++ call term_sendkeys(buf, ":call popup_create('other tab', {'line': 4, 'col': 9})\<CR>")
++ call VerifyScreenDump(buf, 'Test_popupwin_02', {})
++
++ " switch back to first tabpage
++ call term_sendkeys(buf, "gt")
++ call VerifyScreenDump(buf, 'Test_popupwin_03', {})
++
++ " close that tabpage
++ call term_sendkeys(buf, ":quit!\<CR>")
++ call VerifyScreenDump(buf, 'Test_popupwin_04', {})
++
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XtestPopup')
+*** ../vim-8.1.1398/src/testdir/dumps/Test_popupwin_02.dump 2019-05-26 14:10:49.566032964 +0200
+--- src/testdir/dumps/Test_popupwin_02.dump 2019-05-26 14:07:52.562954582 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ | +8#0000001#e0e0e08|+| |[|N|o| |N|a|m|e|]| | +2#0000000#ffffff0|[|N|o| |N|a|m|e|]| | +1&&@49|X+8#0000001#e0e0e08
++ > +0#0000000#ffffff0@74
++ |~+0#4040ff13&| @73
++ |~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @10| +0#4040ff13#ffffff0@46
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |:+0#0000000&|c|a|l@1| |p|o|p|u|p|_|c|r|e|a|t|e|(|'|o|t|h|e|r| |t|a|b|'|,| |{|'|l|i|n|e|'|:| |4|,| |'|c|o|l|'|:| |9|}|)| @2|0|,|0|-|1| @8|A|l@1|
+*** ../vim-8.1.1398/src/testdir/dumps/Test_popupwin_03.dump 2019-05-26 14:10:49.570032943 +0200
+--- src/testdir/dumps/Test_popupwin_03.dump 2019-05-26 14:07:53.614949115 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ | +2&#ffffff0|+| |[|N|o| |N|a|m|e|]| | +8#0000001#e0e0e08|[|N|o| |N|a|m|e|]| | +1#0000000#ffffff0@49|X+8#0000001#e0e0e08
++ >1+0#0000000#ffffff0| @73
++ |2| @8|h+0&#5fd7ff255|e|l@1|o| |t|h|e|r|e| @8|r+0#0000001#ffd7ff255| |o|n|e| @8| +0#0000000#ffffff0@30
++ |3| @22|a+0#0000001#ffd7ff255|n|o|t|h|e|r| |t|w|o| @8| +0#0000000#ffffff0@30
++ |4| @22|a+0#0000001#ffd7ff255|n|o|t|h|e|r| |t|h|r|e@1| @6| +0#0000000#ffffff0@30
++ |5| @73
++ |6| @73
++ |7| @73
++ |8| @73
++ |:|c|a|l@1| |p|o|p|u|p|_|c|r|e|a|t|e|(|'|o|t|h|e|r| |t|a|b|'|,| |{|'|l|i|n|e|'|:| |4|,| |'|c|o| @9|1|,|1| @10|T|o|p|
+*** ../vim-8.1.1398/src/testdir/dumps/Test_popupwin_04.dump 2019-05-26 14:10:49.574032921 +0200
+--- src/testdir/dumps/Test_popupwin_04.dump 2019-05-26 14:07:54.666943646 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ > +0&#ffffff0@74
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @10| +0#4040ff13#ffffff0@46
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |~| @73
++ |:+0#0000000&|q|u|i|t|!| @50|0|,|0|-|1| @8|A|l@1|
+*** ../vim-8.1.1398/src/version.c 2019-05-26 13:13:59.243216016 +0200
+--- src/version.c 2019-05-26 13:22:38.660500164 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1399,
+ /**/
+
+--
+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.1400 b/data/vim/patches/8.1.1400
new file mode 100644
index 000000000..030f03a2a
--- /dev/null
+++ b/data/vim/patches/8.1.1400
@@ -0,0 +1,320 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1400
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1400
+Problem: Using global pointer for tab-local popups is clumsy.
+Solution: Use the pointer in tabpage_T.
+Files: src/popupwin.c, src/globals.h, src/eval.c, src/screen.c,
+ src/window.c
+
+
+*** ../vim-8.1.1399/src/popupwin.c 2019-05-26 14:10:59.909979018 +0200
+--- src/popupwin.c 2019-05-26 18:35:27.278514988 +0200
+***************
+*** 85,92 ****
+ if (nr == 0)
+ {
+ // popup on current tab
+! wp->w_next = first_tab_popupwin;
+! first_tab_popupwin = wp;
+ }
+ else if (nr < 0)
+ {
+--- 85,92 ----
+ if (nr == 0)
+ {
+ // popup on current tab
+! wp->w_next = curtab->tp_first_popupwin;
+! curtab->tp_first_popupwin = wp;
+ }
+ else if (nr < 0)
+ {
+***************
+*** 212,224 ****
+ popup_close_tabpage(tabpage_T *tp, int id)
+ {
+ win_T *wp;
+! win_T **root;
+ win_T *prev = NULL;
+
+- if (tp == curtab)
+- root = &first_tab_popupwin;
+- else
+- root = &tp->tp_first_popupwin;
+ for (wp = *root; wp != NULL; prev = wp, wp = wp->w_next)
+ if (wp->w_id == id)
+ {
+--- 212,220 ----
+ popup_close_tabpage(tabpage_T *tp, int id)
+ {
+ win_T *wp;
+! win_T **root = &tp->tp_first_popupwin;
+ win_T *prev = NULL;
+
+ for (wp = *root; wp != NULL; prev = wp, wp = wp->w_next)
+ if (wp->w_id == id)
+ {
+***************
+*** 237,244 ****
+ {
+ while (first_popupwin != NULL)
+ popup_close(first_popupwin->w_id);
+! while (first_tab_popupwin != NULL)
+! popup_close(first_tab_popupwin->w_id);
+ }
+
+ void
+--- 233,240 ----
+ {
+ while (first_popupwin != NULL)
+ popup_close(first_popupwin->w_id);
+! while (curtab->tp_first_popupwin != NULL)
+! popup_close(curtab->tp_first_popupwin->w_id);
+ }
+
+ void
+*** ../vim-8.1.1399/src/globals.h 2019-05-25 19:51:03.776408456 +0200
+--- src/globals.h 2019-05-26 18:40:51.312802393 +0200
+***************
+*** 582,588 ****
+ EXTERN int aucmd_win_used INIT(= FALSE); /* aucmd_win is being used */
+
+ #ifdef FEAT_TEXT_PROP
+- EXTERN win_T *first_tab_popupwin; // first popup window local to tab page
+ EXTERN win_T *first_popupwin; // first global popup window
+ #endif
+
+--- 582,587 ----
+*** ../vim-8.1.1399/src/eval.c 2019-05-25 19:51:03.776408456 +0200
+--- src/eval.c 2019-05-26 18:37:25.693888227 +0200
+***************
+*** 5589,5600 ****
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+ abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
+ NULL, NULL);
+- for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next)
+- abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
+- NULL, NULL);
+ FOR_ALL_TABPAGES(tp)
+! if (tp != curtab)
+! for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+ abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
+ NULL, NULL);
+ #endif
+--- 5589,5596 ----
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+ abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
+ NULL, NULL);
+ FOR_ALL_TABPAGES(tp)
+! for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+ abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
+ NULL, NULL);
+ #endif
+***************
+*** 8816,8827 ****
+ if (nr >= LOWEST_WIN_ID)
+ {
+ #ifdef FEAT_TEXT_PROP
+! // popup windows are in a separate list
+! for (wp = (tp == NULL || tp == curtab)
+! ? first_tab_popupwin : tp->tp_first_popupwin;
+! wp != NULL; wp = wp->w_next)
+ if (wp->w_id == nr)
+ return wp;
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+ if (wp->w_id == nr)
+ return wp;
+--- 8812,8822 ----
+ if (nr >= LOWEST_WIN_ID)
+ {
+ #ifdef FEAT_TEXT_PROP
+! // check tab-local popup windows
+! for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+ if (wp->w_id == nr)
+ return wp;
++ // check global popup windows
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+ if (wp->w_id == nr)
+ return wp;
+*** ../vim-8.1.1399/src/screen.c 2019-05-25 22:56:46.679669071 +0200
+--- src/screen.c 2019-05-26 18:38:53.905422054 +0200
+***************
+*** 610,616 ****
+ }
+ #ifdef FEAT_TEXT_PROP
+ // TODO: avoid redrawing everything when there is a popup window.
+! if (first_popupwin != NULL || first_tab_popupwin != NULL)
+ type = NOT_VALID;
+ #endif
+
+--- 610,616 ----
+ }
+ #ifdef FEAT_TEXT_PROP
+ // TODO: avoid redrawing everything when there is a popup window.
+! if (first_popupwin != NULL || curtab->tp_first_popupwin != NULL)
+ type = NOT_VALID;
+ #endif
+
+***************
+*** 1000,1006 ****
+ // Reset all the VALID_POPUP flags.
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+ wp->w_valid &= ~VALID_POPUP;
+! for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next)
+ wp->w_valid &= ~VALID_POPUP;
+
+ // TODO: don't redraw every popup every time.
+--- 1000,1006 ----
+ // Reset all the VALID_POPUP flags.
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+ wp->w_valid &= ~VALID_POPUP;
+! for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+ wp->w_valid &= ~VALID_POPUP;
+
+ // TODO: don't redraw every popup every time.
+***************
+*** 1018,1024 ****
+ lowest_zindex = wp->w_zindex;
+ lowest_wp = wp;
+ }
+! for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next)
+ if ((wp->w_valid & VALID_POPUP) == 0
+ && wp->w_zindex < lowest_zindex)
+ {
+--- 1018,1024 ----
+ lowest_zindex = wp->w_zindex;
+ lowest_wp = wp;
+ }
+! for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+ if ((wp->w_valid & VALID_POPUP) == 0
+ && wp->w_zindex < lowest_zindex)
+ {
+*** ../vim-8.1.1399/src/window.c 2019-05-26 14:10:59.909979018 +0200
+--- src/window.c 2019-05-26 18:40:46.224829227 +0200
+***************
+*** 1371,1377 ****
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+ if (wp == win)
+ return TRUE;
+! for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next)
+ if (wp == win)
+ return TRUE;
+ #endif
+--- 1371,1377 ----
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+ if (wp == win)
+ return TRUE;
+! for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+ if (wp == win)
+ return TRUE;
+ #endif
+***************
+*** 3673,3685 ****
+ {
+ win_T *wp;
+
+! for (;;)
+! {
+! wp = tp == curtab ? first_tab_popupwin : tp->tp_first_popupwin;
+! if (wp == NULL)
+! break;
+! popup_close_tabpage(tp, wp->w_id);
+! }
+ }
+ #endif
+ for (idx = 0; idx < SNAP_COUNT; ++idx)
+--- 3673,3680 ----
+ {
+ win_T *wp;
+
+! while (tp->tp_first_popupwin != NULL)
+! popup_close_tabpage(tp, tp->tp_first_popupwin->w_id);
+ }
+ #endif
+ for (idx = 0; idx < SNAP_COUNT; ++idx)
+***************
+*** 3973,3982 ****
+ tp->tp_prevwin = prevwin;
+ tp->tp_firstwin = firstwin;
+ tp->tp_lastwin = lastwin;
+- #ifdef FEAT_TEXT_PROP
+- tp->tp_first_popupwin = first_tab_popupwin;
+- first_tab_popupwin = NULL;
+- #endif
+ tp->tp_old_Rows = Rows;
+ tp->tp_old_Columns = Columns;
+ firstwin = NULL;
+--- 3968,3973 ----
+***************
+*** 4004,4012 ****
+ firstwin = tp->tp_firstwin;
+ lastwin = tp->tp_lastwin;
+ topframe = tp->tp_topframe;
+- #ifdef FEAT_TEXT_PROP
+- first_tab_popupwin = tp->tp_first_popupwin;
+- #endif
+
+ /* We would like doing the TabEnter event first, but we don't have a
+ * valid current window yet, which may break some commands.
+--- 3995,4000 ----
+***************
+*** 6513,6527 ****
+ {
+ curtab->tp_firstwin = firstwin;
+ curtab->tp_lastwin = lastwin;
+- #ifdef FEAT_TEXT_PROP
+- curtab->tp_first_popupwin = first_tab_popupwin ;
+- #endif
+ curtab = tp;
+ firstwin = curtab->tp_firstwin;
+ lastwin = curtab->tp_lastwin;
+- #ifdef FEAT_TEXT_PROP
+- first_tab_popupwin = curtab->tp_first_popupwin;
+- #endif
+ }
+ else
+ goto_tabpage_tp(tp, FALSE, FALSE);
+--- 6501,6509 ----
+***************
+*** 6550,6564 ****
+ {
+ curtab->tp_firstwin = firstwin;
+ curtab->tp_lastwin = lastwin;
+- #ifdef FEAT_TEXT_PROP
+- curtab->tp_first_popupwin = first_tab_popupwin ;
+- #endif
+ curtab = save_curtab;
+ firstwin = curtab->tp_firstwin;
+ lastwin = curtab->tp_lastwin;
+- #ifdef FEAT_TEXT_PROP
+- first_tab_popupwin = curtab->tp_first_popupwin;
+- #endif
+ }
+ else
+ goto_tabpage_tp(save_curtab, FALSE, FALSE);
+--- 6532,6540 ----
+*** ../vim-8.1.1399/src/version.c 2019-05-26 14:10:59.909979018 +0200
+--- src/version.c 2019-05-26 18:47:58.438593632 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1400,
+ /**/
+
+--
+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.1401 b/data/vim/patches/8.1.1401
new file mode 100644
index 000000000..23c9d59ff
--- /dev/null
+++ b/data/vim/patches/8.1.1401
@@ -0,0 +1,81 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1401
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1401
+Problem: Misspelled mkspellmem as makespellmem.
+Solution: Drop duplicate help entry, fix test. (Naruhiko Nishino, Ken
+ Takata, closes #4437)
+Files: runtime/doc/options.txt, src/testdir/test_modeline.vim
+
+
+*** ../vim-8.1.1400/runtime/doc/options.txt 2019-05-25 19:51:03.772408479 +0200
+--- runtime/doc/options.txt 2019-05-25 22:15:53.049576750 +0200
+***************
+*** 4913,4924 ****
+ < This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
+
+- *'makespellmem'* *'msm'*
+- 'makespellmem' 'msm' string (default "460000,2000,500")
+- global
+- Values relevant only when compressing a spell file, see |spell|.
+- This option cannot be set from a |modeline| or in the |sandbox|.
+-
+ *'matchpairs'* *'mps'*
+ 'matchpairs' 'mps' string (default "(:),{:},[:]")
+ local to buffer
+--- 4913,4918 ----
+***************
+*** 5070,5075 ****
+--- 5064,5071 ----
+ < If you have less than 512 Mbyte |:mkspell| may fail for some
+ languages, no matter what you set 'mkspellmem' to.
+
++ This option cannot be set from a |modeline| or in the |sandbox|.
++
+ *'modeline'* *'ml'* *'nomodeline'* *'noml'*
+ 'modeline' 'ml' boolean (Vim default: on (off for root),
+ Vi default: off)
+*** ../vim-8.1.1400/src/testdir/test_modeline.vim 2019-05-23 17:35:52.154999830 +0200
+--- src/testdir/test_modeline.vim 2019-05-26 19:02:47.750214557 +0200
+***************
+*** 116,122 ****
+ call s:modeline_fails('luadll', 'luadll=Something()', 'E520:')
+ call s:modeline_fails('makeef', 'makeef=Something()', 'E520:')
+ call s:modeline_fails('makeprg', 'makeprg=Something()', 'E520:')
+! call s:modeline_fails('makespellmem', 'makespellmem=Something()', 'E520:')
+ call s:modeline_fails('mzschemedll', 'mzschemedll=Something()', 'E520:')
+ call s:modeline_fails('mzschemegcdll', 'mzschemegcdll=Something()', 'E520:')
+ call s:modeline_fails('modelineexpr', 'modelineexpr', 'E520:')
+--- 116,122 ----
+ call s:modeline_fails('luadll', 'luadll=Something()', 'E520:')
+ call s:modeline_fails('makeef', 'makeef=Something()', 'E520:')
+ call s:modeline_fails('makeprg', 'makeprg=Something()', 'E520:')
+! call s:modeline_fails('mkspellmem', 'mkspellmem=Something()', 'E520:')
+ call s:modeline_fails('mzschemedll', 'mzschemedll=Something()', 'E520:')
+ call s:modeline_fails('mzschemegcdll', 'mzschemegcdll=Something()', 'E520:')
+ call s:modeline_fails('modelineexpr', 'modelineexpr', 'E520:')
+*** ../vim-8.1.1400/src/version.c 2019-05-26 18:48:09.406542616 +0200
+--- src/version.c 2019-05-26 19:18:18.701437614 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1401,
+ /**/
+
+--
+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.1402 b/data/vim/patches/8.1.1402
new file mode 100644
index 000000000..1c30e5c65
--- /dev/null
+++ b/data/vim/patches/8.1.1402
@@ -0,0 +1,304 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1402
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1402
+Problem: "timer" option of popup windows not supported.
+Solution: Implement the "timer" option. (Yasuhiro Matsumoto, closes #4439)
+Files: src/structs.h, src/testdir/test_popupwin.vim, src/popupwin.c,
+ src/window.c, runtime/doc/popup.txt
+
+
+*** ../vim-8.1.1401/src/structs.h 2019-05-25 19:51:03.780408437 +0200
+--- src/structs.h 2019-05-26 19:36:12.090670162 +0200
+***************
+*** 1941,1946 ****
+--- 1941,1964 ----
+ } syn_time_T;
+ #endif
+
++ typedef struct timer_S timer_T;
++ struct timer_S
++ {
++ long tr_id;
++ #ifdef FEAT_TIMERS
++ timer_T *tr_next;
++ timer_T *tr_prev;
++ proftime_T tr_due; /* when the callback is to be invoked */
++ char tr_firing; /* when TRUE callback is being called */
++ char tr_paused; /* when TRUE callback is not invoked */
++ int tr_repeat; /* number of times to repeat, -1 forever */
++ long tr_interval; /* msec */
++ char_u *tr_callback; /* allocated */
++ partial_T *tr_partial;
++ int tr_emsg_count;
++ #endif
++ };
++
+ #ifdef FEAT_CRYPT
+ /*
+ * Structure to hold the type of encryption and the state of encryption or
+***************
+*** 2856,2861 ****
+--- 2874,2880 ----
+ int w_zindex;
+ int w_maxheight; // "maxheight" for popup window
+ int w_maxwidth; // "maxwidth" for popup window
++ timer_T *w_popup_timer; // timer for closing popup window
+ #endif
+
+
+***************
+*** 3434,3457 ****
+ };
+ typedef struct js_reader js_read_T;
+
+- typedef struct timer_S timer_T;
+- struct timer_S
+- {
+- long tr_id;
+- #ifdef FEAT_TIMERS
+- timer_T *tr_next;
+- timer_T *tr_prev;
+- proftime_T tr_due; /* when the callback is to be invoked */
+- char tr_firing; /* when TRUE callback is being called */
+- char tr_paused; /* when TRUE callback is not invoked */
+- int tr_repeat; /* number of times to repeat, -1 forever */
+- long tr_interval; /* msec */
+- char_u *tr_callback; /* allocated */
+- partial_T *tr_partial;
+- int tr_emsg_count;
+- #endif
+- };
+-
+ /* Maximum number of commands from + or -c arguments. */
+ #define MAX_ARG_CMDS 10
+
+--- 3453,3458 ----
+*** ../vim-8.1.1401/src/testdir/test_popupwin.vim 2019-05-26 14:10:59.909979018 +0200
+--- src/testdir/test_popupwin.vim 2019-05-26 20:07:58.804887372 +0200
+***************
+*** 37,39 ****
+--- 37,73 ----
+ call StopVimInTerminal(buf)
+ call delete('XtestPopup')
+ endfunc
++
++ func Test_popup_time()
++ topleft vnew
++ call setline(1, 'hello')
++
++ call popup_create('world', {
++ \ 'line': 1,
++ \ 'col': 1,
++ \ 'time': 500,
++ \})
++ redraw
++ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
++ call assert_equal('world', line)
++
++ sleep 700m
++ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
++ call assert_equal('hello', line)
++
++ call popup_create('on the command line', {
++ \ 'line': &lines,
++ \ 'col': 10,
++ \ 'time': 500,
++ \})
++ redraw
++ let line = join(map(range(1, 30), 'screenstring(&lines, v:val)'), '')
++ call assert_match('.*on the command line.*', line)
++
++ sleep 700m
++ redraw
++ let line = join(map(range(1, 30), 'screenstring(&lines, v:val)'), '')
++ call assert_notmatch('.*on the command line.*', line)
++
++ bwipe!
++ endfunc
+*** ../vim-8.1.1401/src/popupwin.c 2019-05-26 18:48:09.402542633 +0200
+--- src/popupwin.c 2019-05-26 20:05:06.193720441 +0200
+***************
+*** 22,32 ****
+--- 22,55 ----
+ static void
+ apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict)
+ {
++ int nr;
++
+ wp->w_maxwidth = dict_get_number(dict, (char_u *)"maxwidth");
+ wp->w_maxheight = dict_get_number(dict, (char_u *)"maxheight");
+ wp->w_winrow = dict_get_number(dict, (char_u *)"line");
+ wp->w_wincol = dict_get_number(dict, (char_u *)"col");
+ wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
++
++ // Add timer to close the popup after some time.
++ nr = dict_get_number(dict, (char_u *)"time");
++ if (nr > 0)
++ {
++ char_u cbbuf[50];
++ char_u *ptr = cbbuf;
++ typval_T tv;
++
++ vim_snprintf((char *)cbbuf, sizeof(cbbuf),
++ "{_ -> popup_close(%d)}", wp->w_id);
++ if (get_lambda_tv(&ptr, &tv, TRUE) == OK)
++ {
++ wp->w_popup_timer = create_timer(nr, 0);
++ wp->w_popup_timer->tr_callback =
++ vim_strsave(partial_name(tv.vval.v_partial));
++ func_ref(wp->w_popup_timer->tr_callback);
++ wp->w_popup_timer->tr_partial = tv.vval.v_partial;
++ }
++ }
++
+ }
+
+ /*
+***************
+*** 177,182 ****
+--- 200,214 ----
+ popup_close(nr);
+ }
+
++ static void
++ popup_undisplay(win_T *wp)
++ {
++ if (wp->w_winrow + wp->w_height >= cmdline_row)
++ clear_cmdline = TRUE;
++ win_free_popup(wp);
++ redraw_all_later(NOT_VALID);
++ }
++
+ /*
+ * Close a popup window by Window-id.
+ */
+***************
+*** 195,202 ****
+ first_popupwin = wp->w_next;
+ else
+ prev->w_next = wp->w_next;
+! win_free_popup(wp);
+! redraw_all_later(NOT_VALID);
+ return;
+ }
+
+--- 227,233 ----
+ first_popupwin = wp->w_next;
+ else
+ prev->w_next = wp->w_next;
+! popup_undisplay(wp);
+ return;
+ }
+
+***************
+*** 222,229 ****
+ *root = wp->w_next;
+ else
+ prev->w_next = wp->w_next;
+! win_free_popup(wp);
+! redraw_all_later(NOT_VALID);
+ return;
+ }
+ }
+--- 253,259 ----
+ *root = wp->w_next;
+ else
+ prev->w_next = wp->w_next;
+! popup_undisplay(wp);
+ return;
+ }
+ }
+*** ../vim-8.1.1401/src/window.c 2019-05-26 18:48:09.406542616 +0200
+--- src/window.c 2019-05-26 19:49:35.494131709 +0200
+***************
+*** 3670,3681 ****
+ diff_clear(tp);
+ # endif
+ # ifdef FEAT_TEXT_PROP
+! {
+! win_T *wp;
+!
+! while (tp->tp_first_popupwin != NULL)
+! popup_close_tabpage(tp, tp->tp_first_popupwin->w_id);
+! }
+ #endif
+ for (idx = 0; idx < SNAP_COUNT; ++idx)
+ clear_snapshot(tp, idx);
+--- 3670,3677 ----
+ diff_clear(tp);
+ # endif
+ # ifdef FEAT_TEXT_PROP
+! while (tp->tp_first_popupwin != NULL)
+! popup_close_tabpage(tp, tp->tp_first_popupwin->w_id);
+ #endif
+ for (idx = 0; idx < SNAP_COUNT; ++idx)
+ clear_snapshot(tp, idx);
+***************
+*** 4871,4876 ****
+--- 4867,4874 ----
+ win_free_popup(win_T *win)
+ {
+ win_close_buffer(win, TRUE, FALSE);
++ if (win->w_popup_timer != NULL)
++ stop_timer(win->w_popup_timer);
+ vim_free(win->w_frame);
+ win_free(win, NULL);
+ }
+*** ../vim-8.1.1401/runtime/doc/popup.txt 2019-05-25 19:51:03.768408497 +0200
+--- runtime/doc/popup.txt 2019-05-26 19:37:51.574092763 +0200
+***************
+*** 142,148 ****
+ \ 'tab': -1,
+ \ 'zindex': 200,
+ \ 'highlight': 'WarningMsg',
+! \ 'border: [],
+ \ })
+ < Use {options} to change the properties.
+
+--- 142,148 ----
+ \ 'tab': -1,
+ \ 'zindex': 200,
+ \ 'highlight': 'WarningMsg',
+! \ 'border': [],
+ \ })
+ < Use {options} to change the properties.
+
+***************
+*** 339,345 ****
+ zindex priority for the popup, default 50
+ time time in milliseconds after which the popup will close;
+ when omitted |popup_close()| must be used.
+- {not implemented yet}
+ moved "cell": close the popup if the cursor moved at least
+ one screen cell; "word" allows for moving within
+ |<cword>|, "WORD" allows for moving within |<cWORD>|,
+--- 339,344 ----
+*** ../vim-8.1.1401/src/version.c 2019-05-26 19:20:33.024744457 +0200
+--- src/version.c 2019-05-26 20:09:05.008561819 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1402,
+ /**/
+
+--
+Q. What happens to programmers when they die?
+A: MS-Windows programmers are reinstalled. C++ programmers become undefined,
+ anyone who refers to them will die as well. Java programmers reincarnate
+ after being garbage collected, unless they are in permgen, in which case
+ they become zombies. Zimbu programmers leave a stack trace that tells us
+ exactly where they died and how they got there.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1403 b/data/vim/patches/8.1.1403
new file mode 100644
index 000000000..cd8018dd2
--- /dev/null
+++ b/data/vim/patches/8.1.1403
@@ -0,0 +1,122 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1403
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1403
+Problem: Cannot build without the timer feature.
+Solution: Add #ifdef.
+Files: src/structs.h, src/window.c, src/popupwin.c,
+ src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1402/src/structs.h 2019-05-26 20:10:02.604276366 +0200
+--- src/structs.h 2019-05-26 20:37:16.352032625 +0200
+***************
+*** 2874,2880 ****
+--- 2874,2882 ----
+ int w_zindex;
+ int w_maxheight; // "maxheight" for popup window
+ int w_maxwidth; // "maxwidth" for popup window
++ # if defined(FEAT_TIMERS)
+ timer_T *w_popup_timer; // timer for closing popup window
++ # endif
+ #endif
+
+
+*** ../vim-8.1.1402/src/window.c 2019-05-26 20:10:02.604276366 +0200
+--- src/window.c 2019-05-26 20:38:09.435769462 +0200
+***************
+*** 4859,4864 ****
+--- 4859,4865 ----
+ return wp == aucmd_win || bt_popup(wp->w_buffer);
+ }
+
++ #if defined(FEAT_TEXT_PROP) || defined(PROTO)
+ /*
+ * Free a popup window. This does not take the window out of the window list
+ * and assumes there is only one toplevel frame, no split.
+***************
+*** 4867,4877 ****
+--- 4868,4881 ----
+ win_free_popup(win_T *win)
+ {
+ win_close_buffer(win, TRUE, FALSE);
++ # if defined(FEAT_TIMERS)
+ if (win->w_popup_timer != NULL)
+ stop_timer(win->w_popup_timer);
++ # endif
+ vim_free(win->w_frame);
+ win_free(win, NULL);
+ }
++ #endif
+
+ /*
+ * Append window "wp" in the window list after window "after".
+*** ../vim-8.1.1402/src/popupwin.c 2019-05-26 20:10:02.604276366 +0200
+--- src/popupwin.c 2019-05-26 20:43:32.806147513 +0200
+***************
+*** 30,35 ****
+--- 30,36 ----
+ wp->w_wincol = dict_get_number(dict, (char_u *)"col");
+ wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
+
++ #if defined(FEAT_TIMERS)
+ // Add timer to close the popup after some time.
+ nr = dict_get_number(dict, (char_u *)"time");
+ if (nr > 0)
+***************
+*** 49,54 ****
+--- 50,56 ----
+ wp->w_popup_timer->tr_partial = tv.vval.v_partial;
+ }
+ }
++ #endif
+
+ }
+
+*** ../vim-8.1.1402/src/testdir/test_popupwin.vim 2019-05-26 20:10:02.604276366 +0200
+--- src/testdir/test_popupwin.vim 2019-05-26 20:42:03.266599309 +0200
+***************
+*** 39,44 ****
+--- 39,47 ----
+ endfunc
+
+ func Test_popup_time()
++ if !has('timers')
++ return
++ endif
+ topleft vnew
+ call setline(1, 'hello')
+
+***************
+*** 52,57 ****
+--- 55,61 ----
+ call assert_equal('world', line)
+
+ sleep 700m
++ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('hello', line)
+
+*** ../vim-8.1.1402/src/version.c 2019-05-26 20:10:02.604276366 +0200
+--- src/version.c 2019-05-26 20:34:08.880951767 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1403,
+ /**/
+
+--
+To define recursion, we must first define recursion.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1404 b/data/vim/patches/8.1.1404
new file mode 100644
index 000000000..0ed9ae938
--- /dev/null
+++ b/data/vim/patches/8.1.1404
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1404
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1404
+Problem: Cannot change the patch level when building with NSIS.
+Solution: Use $PATCHLEVEL if defined. (Christian Brabandt)
+Files: nsis/gvim.nsi
+
+
+*** ../vim-8.1.1403/nsis/gvim.nsi 2019-05-17 12:36:52.776893221 +0200
+--- nsis/gvim.nsi 2019-05-26 20:49:16.692399720 +0200
+***************
+*** 47,52 ****
+--- 47,57 ----
+
+ !include gvim_version.nsh # for version number
+
++ # Definition of Patch for Vim
++ !ifndef PATCHLEVEL
++ !define PATCHLEVEL 0
++ !endif
++
+ # ----------- No configurable settings below this line -----------
+
+ !include "Library.nsh" # For DLL install
+***************
+*** 181,188 ****
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (C) 1996"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor"
+! VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VER_MAJOR}.${VER_MINOR}.0.0"
+! VIProductVersion "${VER_MAJOR}.${VER_MINOR}.0.0"
+
+ # Global variables
+ Var vim_dialog
+--- 186,193 ----
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (C) 1996"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor"
+! VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VER_MAJOR}.${VER_MINOR}.${PATCHLEVEL}.0"
+! VIProductVersion "${VER_MAJOR}.${VER_MINOR}.${PATCHLEVEL}.0"
+
+ # Global variables
+ Var vim_dialog
+*** ../vim-8.1.1403/src/version.c 2019-05-26 20:44:07.105974009 +0200
+--- src/version.c 2019-05-26 20:48:28.716644481 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1404,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+34. You laugh at people with a 10 Mbit connection.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1405 b/data/vim/patches/8.1.1405
new file mode 100644
index 000000000..8a5aadccc
--- /dev/null
+++ b/data/vim/patches/8.1.1405
@@ -0,0 +1,283 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1405
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1405
+Problem: "highlight" option of popup windows not supported.
+Solution: Implement the "highlight" option.
+Files: src/option.c, src/proto/option.pro, src/diff.c src/popupwin.c,
+ runtime/doc/popup.txt, src/testdir/test_popupwin.vim,
+ src/testdir/dumps/Test_popupwin_01.dump,
+ src/testdir/dumps/Test_popupwin_03.dump
+
+
+*** ../vim-8.1.1404/src/option.c 2019-05-25 19:51:03.776408456 +0200
+--- src/option.c 2019-05-26 21:01:53.068520737 +0200
+***************
+*** 5954,5959 ****
+--- 5954,6007 ----
+ }
+
+ /*
++ * Like set_string_option_direct(), but for a window-local option in "wp".
++ * Blocks autocommands to avoid the old curwin becoming invalid.
++ */
++ void
++ set_string_option_direct_in_win(
++ win_T *wp,
++ char_u *name,
++ int opt_idx,
++ char_u *val,
++ int opt_flags,
++ int set_sid)
++ {
++ win_T *save_curwin = curwin;
++
++ block_autocmds();
++ curwin = wp;
++ curbuf = curwin->w_buffer;
++ set_string_option_direct(name, opt_idx, val, opt_flags, set_sid);
++ curwin = save_curwin;
++ curbuf = curwin->w_buffer;
++ unblock_autocmds();
++ }
++
++ /*
++ * Like set_string_option_direct(), but for a buffer-local option in "buf".
++ * Blocks autocommands to avoid the old curbuf becoming invalid.
++ */
++ void
++ set_string_option_direct_in_buf(
++ buf_T *buf,
++ char_u *name,
++ int opt_idx,
++ char_u *val,
++ int opt_flags,
++ int set_sid)
++ {
++ buf_T *save_curbuf = curbuf;
++
++ block_autocmds();
++ curbuf = buf;
++ curwin->w_buffer = curbuf;
++ set_string_option_direct(name, opt_idx, val, opt_flags, set_sid);
++ curbuf = save_curbuf;
++ curwin->w_buffer = curbuf;
++ unblock_autocmds();
++ }
++
++ /*
+ * Set global value for string option when it's a local option.
+ */
+ static void
+*** ../vim-8.1.1404/src/proto/option.pro 2019-04-10 22:15:15.813016799 +0200
+--- src/proto/option.pro 2019-05-26 20:24:40.435782299 +0200
+***************
+*** 21,26 ****
+--- 21,28 ----
+ 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);
++ void set_string_option_direct_in_win(win_T *wp, char_u *name, int opt_idx, char_u *val, int opt_flags, int set_sid);
++ void set_string_option_direct_in_buf(buf_T *buf, char_u *name, int opt_idx, char_u *val, int opt_flags, int set_sid);
+ int valid_spellang(char_u *val);
+ char *check_colorcolumn(win_T *wp);
+ char *check_stl_option(char_u *s);
+*** ../vim-8.1.1404/src/diff.c 2019-05-24 19:38:59.096545552 +0200
+--- src/diff.c 2019-05-26 20:19:45.869309781 +0200
+***************
+*** 1447,1464 ****
+ wp->w_p_wrap_save = wp->w_p_wrap;
+ wp->w_p_wrap = FALSE;
+ # ifdef FEAT_FOLDING
+- curwin = wp;
+- curbuf = curwin->w_buffer;
+ if (!wp->w_p_diff)
+ {
+ if (wp->w_p_diff_saved)
+ free_string_option(wp->w_p_fdm_save);
+ wp->w_p_fdm_save = vim_strsave(wp->w_p_fdm);
+ }
+! set_string_option_direct((char_u *)"fdm", -1, (char_u *)"diff",
+ OPT_LOCAL|OPT_FREE, 0);
+- curwin = old_curwin;
+- curbuf = curwin->w_buffer;
+ if (!wp->w_p_diff)
+ {
+ wp->w_p_fdc_save = wp->w_p_fdc;
+--- 1447,1460 ----
+ wp->w_p_wrap_save = wp->w_p_wrap;
+ wp->w_p_wrap = FALSE;
+ # ifdef FEAT_FOLDING
+ if (!wp->w_p_diff)
+ {
+ if (wp->w_p_diff_saved)
+ free_string_option(wp->w_p_fdm_save);
+ wp->w_p_fdm_save = vim_strsave(wp->w_p_fdm);
+ }
+! set_string_option_direct_in_win(wp, (char_u *)"fdm", -1, (char_u *)"diff",
+ OPT_LOCAL|OPT_FREE, 0);
+ if (!wp->w_p_diff)
+ {
+ wp->w_p_fdc_save = wp->w_p_fdc;
+*** ../vim-8.1.1404/src/popupwin.c 2019-05-26 20:44:07.105974009 +0200
+--- src/popupwin.c 2019-05-26 20:44:54.193735465 +0200
+***************
+*** 23,28 ****
+--- 23,29 ----
+ apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict)
+ {
+ int nr;
++ char_u *str;
+
+ wp->w_maxwidth = dict_get_number(dict, (char_u *)"maxwidth");
+ wp->w_maxheight = dict_get_number(dict, (char_u *)"maxheight");
+***************
+*** 52,57 ****
+--- 53,62 ----
+ }
+ #endif
+
++ str = dict_get_string(dict, (char_u *)"highlight", TRUE);
++ if (str != NULL)
++ set_string_option_direct_in_win(wp, (char_u *)"wincolor", -1,
++ str, OPT_FREE|OPT_LOCAL, 0);
+ }
+
+ /*
+***************
+*** 94,105 ****
+ if (buf == NULL)
+ return;
+ ml_open(buf);
+! curbuf = buf;
+! set_string_option_direct((char_u *)"buftype", -1,
+ (char_u *)"popup", OPT_FREE|OPT_LOCAL, 0);
+! set_string_option_direct((char_u *)"bufhidden", -1,
+ (char_u *)"hide", OPT_FREE|OPT_LOCAL, 0);
+- curbuf = curwin->w_buffer;
+ buf->b_p_ul = -1; // no undo
+ buf->b_p_swf = FALSE; // no swap file
+ buf->b_p_bl = FALSE; // unlisted buffer
+--- 99,108 ----
+ if (buf == NULL)
+ return;
+ ml_open(buf);
+! set_string_option_direct_in_buf(buf, (char_u *)"buftype", -1,
+ (char_u *)"popup", OPT_FREE|OPT_LOCAL, 0);
+! set_string_option_direct_in_buf(buf, (char_u *)"bufhidden", -1,
+ (char_u *)"hide", OPT_FREE|OPT_LOCAL, 0);
+ buf->b_p_ul = -1; // no undo
+ buf->b_p_swf = FALSE; // no swap file
+ buf->b_p_bl = FALSE; // unlisted buffer
+*** ../vim-8.1.1404/runtime/doc/popup.txt 2019-05-26 20:10:02.604276366 +0200
+--- runtime/doc/popup.txt 2019-05-26 20:33:53.125028162 +0200
+***************
+*** 322,329 ****
+ wrap TRUE to make the lines wrap (default TRUE)
+ {not implemented yet}
+ highlight highlight group name to use for the text, stored in
+! 'wincolor'
+! {not implemented yet}
+ border list with numbers, defining the border thickness
+ above/right/below/left of the popup; an empty list
+ uses a border of 1 all around
+--- 322,328 ----
+ wrap TRUE to make the lines wrap (default TRUE)
+ {not implemented yet}
+ highlight highlight group name to use for the text, stored in
+! the 'wincolor' option
+ border list with numbers, defining the border thickness
+ above/right/below/left of the popup; an empty list
+ uses a border of 1 all around
+*** ../vim-8.1.1404/src/testdir/test_popupwin.vim 2019-05-26 20:44:07.105974009 +0200
+--- src/testdir/test_popupwin.vim 2019-05-26 20:45:14.293633517 +0200
+***************
+*** 12,21 ****
+ endif
+ call writefile([
+ \ "call setline(1, range(1, 100))",
+! \ "let winid = popup_create('hello there', {'line': 3, 'col': 11})",
+! \ "hi PopupColor ctermbg=lightblue",
+! \ "call setwinvar(winid, '&wincolor', 'PopupColor')",
+ \ "let winid2 = popup_create(['another one', 'another two', 'another three'], {'line': 3, 'col': 25})",
+ \], 'XtestPopup')
+ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
+ call VerifyScreenDump(buf, 'Test_popupwin_01', {})
+--- 12,22 ----
+ endif
+ call writefile([
+ \ "call setline(1, range(1, 100))",
+! \ "hi PopupColor1 ctermbg=lightblue",
+! \ "hi PopupColor2 ctermbg=lightcyan",
+! \ "let winid = popup_create('hello there', {'line': 3, 'col': 11, 'highlight': 'PopupColor1'})",
+ \ "let winid2 = popup_create(['another one', 'another two', 'another three'], {'line': 3, 'col': 25})",
++ \ "call setwinvar(winid2, '&wincolor', 'PopupColor2')",
+ \], 'XtestPopup')
+ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
+ call VerifyScreenDump(buf, 'Test_popupwin_01', {})
+*** ../vim-8.1.1404/src/testdir/dumps/Test_popupwin_01.dump 2019-05-25 19:51:03.780408437 +0200
+--- src/testdir/dumps/Test_popupwin_01.dump 2019-05-26 20:29:20.802320194 +0200
+***************
+*** 1,8 ****
+ >1+0&#ffffff0| @73
+ |2| @73
+! |3| @8|h+0&#5fd7ff255|e|l@1|o| |t|h|e|r|e| @8|r+0#0000001#ffd7ff255| |o|n|e| @8| +0#0000000#ffffff0@30
+! |4| @22|a+0#0000001#ffd7ff255|n|o|t|h|e|r| |t|w|o| @8| +0#0000000#ffffff0@30
+! |5| @22|a+0#0000001#ffd7ff255|n|o|t|h|e|r| |t|h|r|e@1| @6| +0#0000000#ffffff0@30
+ |6| @73
+ |7| @73
+ |8| @73
+--- 1,8 ----
+ >1+0&#ffffff0| @73
+ |2| @73
+! |3| @8|h+0&#5fd7ff255|e|l@1|o| |t|h|e|r|e| @8|r+0&#afffff255| |o|n|e| @8| +0&#ffffff0@30
+! |4| @22|a+0&#afffff255|n|o|t|h|e|r| |t|w|o| @8| +0&#ffffff0@30
+! |5| @22|a+0&#afffff255|n|o|t|h|e|r| |t|h|r|e@1| @6| +0&#ffffff0@30
+ |6| @73
+ |7| @73
+ |8| @73
+*** ../vim-8.1.1404/src/testdir/dumps/Test_popupwin_03.dump 2019-05-26 14:10:59.909979018 +0200
+--- src/testdir/dumps/Test_popupwin_03.dump 2019-05-26 20:31:41.629659341 +0200
+***************
+*** 1,8 ****
+ | +2&#ffffff0|+| |[|N|o| |N|a|m|e|]| | +8#0000001#e0e0e08|[|N|o| |N|a|m|e|]| | +1#0000000#ffffff0@49|X+8#0000001#e0e0e08
+ >1+0#0000000#ffffff0| @73
+! |2| @8|h+0&#5fd7ff255|e|l@1|o| |t|h|e|r|e| @8|r+0#0000001#ffd7ff255| |o|n|e| @8| +0#0000000#ffffff0@30
+! |3| @22|a+0#0000001#ffd7ff255|n|o|t|h|e|r| |t|w|o| @8| +0#0000000#ffffff0@30
+! |4| @22|a+0#0000001#ffd7ff255|n|o|t|h|e|r| |t|h|r|e@1| @6| +0#0000000#ffffff0@30
+ |5| @73
+ |6| @73
+ |7| @73
+--- 1,8 ----
+ | +2&#ffffff0|+| |[|N|o| |N|a|m|e|]| | +8#0000001#e0e0e08|[|N|o| |N|a|m|e|]| | +1#0000000#ffffff0@49|X+8#0000001#e0e0e08
+ >1+0#0000000#ffffff0| @73
+! |2| @8|h+0&#5fd7ff255|e|l@1|o| |t|h|e|r|e| @8|r+0&#afffff255| |o|n|e| @8| +0&#ffffff0@30
+! |3| @22|a+0&#afffff255|n|o|t|h|e|r| |t|w|o| @8| +0&#ffffff0@30
+! |4| @22|a+0&#afffff255|n|o|t|h|e|r| |t|h|r|e@1| @6| +0&#ffffff0@30
+ |5| @73
+ |6| @73
+ |7| @73
+*** ../vim-8.1.1404/src/version.c 2019-05-26 20:49:39.472283431 +0200
+--- src/version.c 2019-05-26 20:58:38.049523348 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1405,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+35. Your husband tells you he's had that beard for 2 months.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1406 b/data/vim/patches/8.1.1406
new file mode 100644
index 000000000..a115ee6c0
--- /dev/null
+++ b/data/vim/patches/8.1.1406
@@ -0,0 +1,542 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1406
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1406
+Problem: popup_hide() and popup_show() not implemented yet.
+Solution: Implement the functions.
+Files: src/popupwin.c, src/proto/popupwin.pro, src/evalfunc.c,
+ src/structs.h, runtime/doc/popup.txt, src/screen.c, src/vim.h,
+ src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1405/src/popupwin.c 2019-05-26 21:03:19.940073927 +0200
+--- src/popupwin.c 2019-05-26 22:04:53.509693725 +0200
+***************
+*** 195,212 ****
+ }
+
+ /*
+ * popup_close({id})
+ */
+ void
+ f_popup_close(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+! int nr = (int)tv_get_number(argvars);
+
+! popup_close(nr);
+ }
+
+ static void
+! popup_undisplay(win_T *wp)
+ {
+ if (wp->w_winrow + wp->w_height >= cmdline_row)
+ clear_cmdline = TRUE;
+--- 195,279 ----
+ }
+
+ /*
++ * Find the popup window with window-ID "id".
++ * If the popup window does not exist NULL is returned.
++ * If the window is not a popup window, and error message is given.
++ */
++ static win_T *
++ find_popup_win(int id)
++ {
++ win_T *wp = win_id2wp(id);
++
++ if (wp != NULL && !bt_popup(wp->w_buffer))
++ {
++ semsg(_("E993: window %d is not a popup window"), id);
++ return NULL;
++ }
++ return wp;
++ }
++
++ /*
++ * Return TRUE if there any popups that are not hidden.
++ */
++ int
++ popup_any_visible(void)
++ {
++ win_T *wp;
++
++ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
++ if ((wp->w_popup_flags & PFL_HIDDEN) == 0)
++ return TRUE;
++ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
++ if ((wp->w_popup_flags & PFL_HIDDEN) == 0)
++ return TRUE;
++ return FALSE;
++ }
++
++ /*
+ * popup_close({id})
+ */
+ void
+ f_popup_close(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+! int id = (int)tv_get_number(argvars);
+!
+! popup_close(id);
+! }
+!
+! /*
+! * popup_hide({id})
+! */
+! void
+! f_popup_hide(typval_T *argvars, typval_T *rettv UNUSED)
+! {
+! int id = (int)tv_get_number(argvars);
+! win_T *wp = find_popup_win(id);
+!
+! if (wp != NULL && (wp->w_popup_flags & PFL_HIDDEN) == 0)
+! {
+! wp->w_popup_flags |= PFL_HIDDEN;
+! redraw_all_later(NOT_VALID);
+! }
+! }
+!
+! /*
+! * popup_show({id})
+! */
+! void
+! f_popup_show(typval_T *argvars, typval_T *rettv UNUSED)
+! {
+! int id = (int)tv_get_number(argvars);
+! win_T *wp = find_popup_win(id);
+
+! if (wp != NULL && (wp->w_popup_flags & PFL_HIDDEN) != 0)
+! {
+! wp->w_popup_flags &= ~PFL_HIDDEN;
+! redraw_all_later(NOT_VALID);
+! }
+ }
+
+ static void
+! popup_free(win_T *wp)
+ {
+ if (wp->w_winrow + wp->w_height >= cmdline_row)
+ clear_cmdline = TRUE;
+***************
+*** 232,238 ****
+ first_popupwin = wp->w_next;
+ else
+ prev->w_next = wp->w_next;
+! popup_undisplay(wp);
+ return;
+ }
+
+--- 299,305 ----
+ first_popupwin = wp->w_next;
+ else
+ prev->w_next = wp->w_next;
+! popup_free(wp);
+ return;
+ }
+
+***************
+*** 258,264 ****
+ *root = wp->w_next;
+ else
+ prev->w_next = wp->w_next;
+! popup_undisplay(wp);
+ return;
+ }
+ }
+--- 325,331 ----
+ *root = wp->w_next;
+ else
+ prev->w_next = wp->w_next;
+! popup_free(wp);
+ return;
+ }
+ }
+*** ../vim-8.1.1405/src/proto/popupwin.pro 2019-05-26 14:10:59.909979018 +0200
+--- src/proto/popupwin.pro 2019-05-26 21:58:55.451508950 +0200
+***************
+*** 1,6 ****
+--- 1,9 ----
+ /* popupwin.c */
+ void f_popup_create(typval_T *argvars, typval_T *rettv);
++ int popup_any_visible(void);
+ void f_popup_close(typval_T *argvars, typval_T *rettv);
++ void f_popup_hide(typval_T *argvars, typval_T *rettv);
++ void f_popup_show(typval_T *argvars, typval_T *rettv);
+ void popup_close(int id);
+ void popup_close_tabpage(tabpage_T *tp, int id);
+ void close_all_popups(void);
+*** ../vim-8.1.1405/src/evalfunc.c 2019-05-25 20:21:24.669951062 +0200
+--- src/evalfunc.c 2019-05-26 21:49:46.478291418 +0200
+***************
+*** 810,815 ****
+--- 810,817 ----
+ #ifdef FEAT_TEXT_PROP
+ {"popup_close", 1, 1, f_popup_close},
+ {"popup_create", 2, 2, f_popup_create},
++ {"popup_hide", 1, 1, f_popup_hide},
++ {"popup_show", 1, 1, f_popup_show},
+ #endif
+ #ifdef FEAT_FLOAT
+ {"pow", 2, 2, f_pow},
+*** ../vim-8.1.1405/src/structs.h 2019-05-26 20:44:07.105974009 +0200
+--- src/structs.h 2019-05-26 21:54:20.348903421 +0200
+***************
+*** 2871,2876 ****
+--- 2871,2877 ----
+ int w_vsep_width; /* Number of separator columns (0 or 1). */
+ pos_save_T w_save_cursor; /* backup of cursor pos and topline */
+ #ifdef FEAT_TEXT_PROP
++ int w_popup_flags; // PFL_ values
+ int w_zindex;
+ int w_maxheight; // "maxheight" for popup window
+ int w_maxwidth; // "maxwidth" for popup window
+*** ../vim-8.1.1405/runtime/doc/popup.txt 2019-05-26 21:03:19.940073927 +0200
+--- runtime/doc/popup.txt 2019-05-26 22:12:05.835383172 +0200
+***************
+*** 25,31 ****
+ popup window like with regular windows.
+
+ A popup window can be used for such things as:
+! - briefly show a message without changing the command line
+ - prompt the user with a dialog
+ - display contextual information while typing
+ - give extra information for auto-completion
+--- 25,31 ----
+ popup window like with regular windows.
+
+ A popup window can be used for such things as:
+! - briefly show a message without overwriting the command line
+ - prompt the user with a dialog
+ - display contextual information while typing
+ - give extra information for auto-completion
+***************
+*** 42,52 ****
+
+ A popup window has a window-ID like other windows, but behaves differently.
+ The size can be up to the whole Vim window and it overlaps other windows.
+! It contains a buffer, and that buffer is always associated with the popup
+! window. The window cannot be used in Normal, Visual or Insert mode, it does
+! not get keyboard focus. You can use functions like `setbufline()` to change
+! the text in the buffer. There are more differences from how this window and
+! buffer behave compared to regular windows and buffers, see |popup-buffer|.
+
+ If this is not what you are looking for, check out other popup functionality:
+ - popup menu, see |popup-menu|
+--- 42,55 ----
+
+ A popup window has a window-ID like other windows, but behaves differently.
+ The size can be up to the whole Vim window and it overlaps other windows.
+! Popup windows can also overlap each other.
+!
+! The popup window contains a buffer, and that buffer is always associated with
+! the popup window. The window cannot be used in Normal, Visual or Insert mode,
+! it does not get keyboard focus. You can use functions like `setbufline()` to
+! change the text in the buffer. There are more differences from how this
+! window and buffer behave compared to regular windows and buffers, see
+! |popup-buffer|.
+
+ If this is not what you are looking for, check out other popup functionality:
+ - popup menu, see |popup-menu|
+***************
+*** 55,63 ****
+
+ WINDOW POSITION AND SIZE *popup-position*
+
+! The height of the window is normally equal to the number of lines in the
+! buffer. It can be limited with the "maxheight" property. You can use empty
+! lines to increase the height.
+
+ The width of the window is normally equal to the longest line in the buffer.
+ It can be limited with the "maxwidth" property. You can use spaces to
+--- 58,66 ----
+
+ WINDOW POSITION AND SIZE *popup-position*
+
+! The height of the window is normally equal to the number of, possibly
+! wrapping, lines in the buffer. It can be limited with the "maxheight"
+! property. You can use empty lines to increase the height.
+
+ The width of the window is normally equal to the longest line in the buffer.
+ It can be limited with the "maxwidth" property. You can use spaces to
+***************
+*** 81,91 ****
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+! - handle screen resize in screenalloc().
+! - Support tab-local popup windows, use tp_first_popupwin and
+! first_tab_popupwin. Swap like with firstwin/curwin.
+ - Make redrawing more efficient and avoid flicker.
+! - implement all the unimplemented features.
+
+
+ ==============================================================================
+--- 84,95 ----
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+! - Implement list of lines with text properties
+! - Implement filter.
+! - Handle screen resize in screenalloc().
+ - Make redrawing more efficient and avoid flicker.
+! - Properly figure out the size and position.
+! - Implement all the unimplemented options and features.
+
+
+ ==============================================================================
+***************
+*** 93,101 ****
+
+ THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
+
+! Proposal and discussion on issue #4063: https://github.com/vim/vim/issues/4063
+!
+! [functions to be moved to eval.txt later, keep list of functions here]
+
+ popup_create({text}, {options}) *popup_create()*
+ Open a popup window showing {text}, which is either:
+--- 97,103 ----
+
+ THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
+
+! [functions to be moved to eval.txt later, keep overview of functions here]
+
+ popup_create({text}, {options}) *popup_create()*
+ Open a popup window showing {text}, which is either:
+***************
+*** 176,190 ****
+ "callback" to a function that handles the selected item.
+
+
+- popup_show({id}) *popup_show()*
+- {not implemented yet}
+- If {id} is a hidden popup, show it now.
+-
+ popup_hide({id}) *popup_hide()*
+- {not implemented yet}
+ If {id} is a displayed popup, hide it now. If the popup has a
+ filter it will not be invoked for so long as the popup is
+ hidden.
+
+ popup_move({id}, {options}) *popup_move()*
+ {not implemented yet}
+--- 178,193 ----
+ "callback" to a function that handles the selected item.
+
+
+ popup_hide({id}) *popup_hide()*
+ If {id} is a displayed popup, hide it now. If the popup has a
+ filter it will not be invoked for so long as the popup is
+ hidden.
++ If window {id} does not exist nothing happens. If window {id}
++ exists but is not a popup window an error is given. *E993*
++
++ popup_show({id}) *popup_show()*
++ If {id} is a hidden popup, show it now.
++ For {id} see `popup_hide()`.
+
+ popup_move({id}, {options}) *popup_move()*
+ {not implemented yet}
+***************
+*** 192,197 ****
+--- 195,201 ----
+ {options} may contain the items from |popup_create()| that
+ specify the popup position: "line", "col", "pos", "maxheight",
+ "minheight", "maxwidth" and "minwidth".
++ For {id} see `popup_hide()`.
+
+
+ popup_filter_menu({id}, {key}) *popup_filter_menu()*
+***************
+*** 257,262 ****
+--- 261,269 ----
+ - 'undolevels' is -1: no undo at all
+ TODO: more
+
++ It is possible to change these options, but anything might break then, so
++ better leave them alone.
++
+ The window does have a cursor position, but the cursor is not displayed.
+
+ Options can be set on the window with `setwinvar()`, e.g.: >
+*** ../vim-8.1.1405/src/screen.c 2019-05-26 18:48:09.406542616 +0200
+--- src/screen.c 2019-05-26 21:57:18.544000198 +0200
+***************
+*** 610,616 ****
+ }
+ #ifdef FEAT_TEXT_PROP
+ // TODO: avoid redrawing everything when there is a popup window.
+! if (first_popupwin != NULL || curtab->tp_first_popupwin != NULL)
+ type = NOT_VALID;
+ #endif
+
+--- 610,616 ----
+ }
+ #ifdef FEAT_TEXT_PROP
+ // TODO: avoid redrawing everything when there is a popup window.
+! if (popup_any_visible())
+ type = NOT_VALID;
+ #endif
+
+***************
+*** 999,1007 ****
+
+ // Reset all the VALID_POPUP flags.
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+! wp->w_valid &= ~VALID_POPUP;
+ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+! wp->w_valid &= ~VALID_POPUP;
+
+ // TODO: don't redraw every popup every time.
+ for (;;)
+--- 999,1007 ----
+
+ // Reset all the VALID_POPUP flags.
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+! wp->w_popup_flags &= ~PFL_REDRAWN;
+ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+! wp->w_popup_flags &= ~PFL_REDRAWN;
+
+ // TODO: don't redraw every popup every time.
+ for (;;)
+***************
+*** 1012,1025 ****
+ lowest_zindex = INT_MAX;
+ lowest_wp = NULL;
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_valid & VALID_POPUP) == 0
+ && wp->w_zindex < lowest_zindex)
+ {
+ lowest_zindex = wp->w_zindex;
+ lowest_wp = wp;
+ }
+ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_valid & VALID_POPUP) == 0
+ && wp->w_zindex < lowest_zindex)
+ {
+ lowest_zindex = wp->w_zindex;
+--- 1012,1025 ----
+ lowest_zindex = INT_MAX;
+ lowest_wp = NULL;
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_popup_flags & (PFL_REDRAWN|PFL_HIDDEN)) == 0
+ && wp->w_zindex < lowest_zindex)
+ {
+ lowest_zindex = wp->w_zindex;
+ lowest_wp = wp;
+ }
+ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_popup_flags & (PFL_REDRAWN|PFL_HIDDEN)) == 0
+ && wp->w_zindex < lowest_zindex)
+ {
+ lowest_zindex = wp->w_zindex;
+***************
+*** 1029,1035 ****
+ if (lowest_wp == NULL)
+ break;
+ win_update(lowest_wp);
+! lowest_wp->w_valid |= VALID_POPUP;
+ }
+ }
+ #endif
+--- 1029,1035 ----
+ if (lowest_wp == NULL)
+ break;
+ win_update(lowest_wp);
+! lowest_wp->w_popup_flags |= PFL_REDRAWN;
+ }
+ }
+ #endif
+*** ../vim-8.1.1405/src/vim.h 2019-05-25 19:51:03.780408437 +0200
+--- src/vim.h 2019-05-26 21:54:44.096783074 +0200
+***************
+*** 612,618 ****
+ #define VALID_BOTLINE 0x20 // w_botine and w_empty_rows are valid
+ #define VALID_BOTLINE_AP 0x40 // w_botine is approximated
+ #define VALID_TOPLINE 0x80 // w_topline is valid (for cursor position)
+! #define VALID_POPUP 0x100 // popup has been redrawn
+
+ /*
+ * Terminal highlighting attribute bits.
+--- 612,621 ----
+ #define VALID_BOTLINE 0x20 // w_botine and w_empty_rows are valid
+ #define VALID_BOTLINE_AP 0x40 // w_botine is approximated
+ #define VALID_TOPLINE 0x80 // w_topline is valid (for cursor position)
+!
+! // Values for w_popup_flags.
+! #define PFL_HIDDEN 1 // popup is not displayed
+! #define PFL_REDRAWN 2 // popup was just redrawn
+
+ /*
+ * Terminal highlighting attribute bits.
+*** ../vim-8.1.1405/src/testdir/test_popupwin.vim 2019-05-26 21:03:19.940073927 +0200
+--- src/testdir/test_popupwin.vim 2019-05-26 22:13:41.802400120 +0200
+***************
+*** 76,78 ****
+--- 76,116 ----
+
+ bwipe!
+ endfunc
++
++ func Test_popup_hide()
++ topleft vnew
++ call setline(1, 'hello')
++
++ let winid = popup_create('world', {
++ \ 'line': 1,
++ \ 'col': 1,
++ \})
++ redraw
++ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
++ call assert_equal('world', line)
++
++ call popup_hide(winid)
++ redraw
++ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
++ call assert_equal('hello', line)
++
++ call popup_show(winid)
++ redraw
++ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
++ call assert_equal('world', line)
++
++
++ call popup_close(winid)
++ redraw
++ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
++ call assert_equal('hello', line)
++
++ " error is given for existing non-popup window
++ call assert_fails('call popup_hide(win_getid())', 'E993:')
++
++ " no error non-existing window
++ call popup_hide(1234234)
++ call popup_show(41234234)
++
++ bwipe!
++ endfunc
+*** ../vim-8.1.1405/src/version.c 2019-05-26 21:03:19.940073927 +0200
+--- src/version.c 2019-05-26 22:13:59.338228662 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1406,
+ /**/
+
+--
+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.1407 b/data/vim/patches/8.1.1407
new file mode 100644
index 000000000..41a106eba
--- /dev/null
+++ b/data/vim/patches/8.1.1407
@@ -0,0 +1,516 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1407
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1407
+Problem: Popup_create() does not support text properties.
+Solution: Support the third form of the text argument.
+Files: src/textprop.c, src/proto/textprop.pro, src/popupwin.c,
+ src/testdir/test_popupwin.vim, src/screen.c,
+ src/testdir/dumps/Test_popupwin_02.dump,
+ src/testdir/dumps/Test_popupwin_03.dump,
+ src/testdir/dumps/Test_popupwin_04.dump,
+ runtime/doc/popup.txt
+
+
+*** ../vim-8.1.1406/src/textprop.c 2019-05-25 20:21:24.685950973 +0200
+--- src/textprop.c 2019-05-26 23:30:46.064098867 +0200
+***************
+*** 142,164 ****
+ void
+ f_prop_add(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+- linenr_T lnum;
+ linenr_T start_lnum;
+- linenr_T end_lnum;
+ colnr_T start_col;
+- colnr_T end_col;
+- dict_T *dict;
+- 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 = NULL;
+- char_u *newprops;
+- textprop_T tmp_prop;
+- int i;
+
+ start_lnum = tv_get_number(&argvars[0]);
+ start_col = tv_get_number(&argvars[1]);
+--- 142,149 ----
+***************
+*** 172,178 ****
+ emsg(_(e_dictreq));
+ return;
+ }
+! dict = argvars[2].vval.v_dict;
+
+ if (dict == NULL || dict_find(dict, (char_u *)"type", -1) == NULL)
+ {
+--- 157,194 ----
+ emsg(_(e_dictreq));
+ return;
+ }
+!
+! prop_add_common(start_lnum, start_col, argvars[2].vval.v_dict,
+! curbuf, &argvars[2]);
+! }
+!
+! /*
+! * Shared between prop_add() and popup_create().
+! * "dict_arg" is the function argument of a dict containing "bufnr".
+! * it is NULL for popup_create().
+! */
+! void
+! prop_add_common(
+! linenr_T start_lnum,
+! colnr_T start_col,
+! dict_T *dict,
+! buf_T *default_buf,
+! typval_T *dict_arg)
+! {
+! linenr_T lnum;
+! linenr_T end_lnum;
+! colnr_T end_col;
+! char_u *type_name;
+! proptype_T *type;
+! buf_T *buf = default_buf;
+! int id = 0;
+! char_u *newtext;
+! int proplen;
+! size_t textlen;
+! char_u *props = NULL;
+! char_u *newprops;
+! textprop_T tmp_prop;
+! int i;
+
+ if (dict == NULL || dict_find(dict, (char_u *)"type", -1) == NULL)
+ {
+***************
+*** 221,227 ****
+ if (dict_find(dict, (char_u *)"id", -1) != NULL)
+ id = dict_get_number(dict, (char_u *)"id");
+
+! if (get_bufnr_from_arg(&argvars[2], &buf) == FAIL)
+ return;
+
+ type = lookup_prop_type(type_name, buf);
+--- 237,243 ----
+ if (dict_find(dict, (char_u *)"id", -1) != NULL)
+ id = dict_get_number(dict, (char_u *)"id");
+
+! if (dict_arg != NULL && get_bufnr_from_arg(dict_arg, &buf) == FAIL)
+ return;
+
+ type = lookup_prop_type(type_name, buf);
+***************
+*** 278,289 ****
+ 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(textprop_T),
+! sizeof(textprop_T));
+ if (tmp_prop.tp_col >= col)
+ break;
+ }
+--- 294,305 ----
+ 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(textprop_T),
+! sizeof(textprop_T));
+ if (tmp_prop.tp_col >= col)
+ break;
+ }
+***************
+*** 298,304 ****
+ tmp_prop.tp_flags = (lnum > start_lnum ? TP_FLAG_CONT_PREV : 0)
+ | (lnum < end_lnum ? TP_FLAG_CONT_NEXT : 0);
+ mch_memmove(newprops + i * sizeof(textprop_T), &tmp_prop,
+! sizeof(textprop_T));
+
+ if (i < proplen)
+ mch_memmove(newprops + (i + 1) * sizeof(textprop_T),
+--- 314,320 ----
+ tmp_prop.tp_flags = (lnum > start_lnum ? TP_FLAG_CONT_PREV : 0)
+ | (lnum < end_lnum ? TP_FLAG_CONT_NEXT : 0);
+ mch_memmove(newprops + i * sizeof(textprop_T), &tmp_prop,
+! sizeof(textprop_T));
+
+ if (i < proplen)
+ mch_memmove(newprops + (i + 1) * sizeof(textprop_T),
+*** ../vim-8.1.1406/src/proto/textprop.pro 2019-05-19 22:53:36.504914607 +0200
+--- src/proto/textprop.pro 2019-05-26 23:30:50.644073843 +0200
+***************
+*** 1,5 ****
+--- 1,6 ----
+ /* textprop.c */
+ void f_prop_add(typval_T *argvars, typval_T *rettv);
++ void prop_add_common(linenr_T start_lnum, colnr_T start_col, dict_T *dict, buf_T *default_buf, typval_T *dict_arg);
+ 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);
+*** ../vim-8.1.1406/src/popupwin.c 2019-05-26 22:17:31.736315033 +0200
+--- src/popupwin.c 2019-05-26 23:06:35.631863187 +0200
+***************
+*** 60,65 ****
+--- 60,150 ----
+ }
+
+ /*
++ * Add lines to the popup from a list of strings.
++ */
++ static void
++ add_popup_strings(buf_T *buf, list_T *l)
++ {
++ listitem_T *li;
++ linenr_T lnum = 0;
++ char_u *p;
++
++ for (li = l->lv_first; li != NULL; li = li->li_next)
++ if (li->li_tv.v_type == VAR_STRING)
++ {
++ p = li->li_tv.vval.v_string;
++ ml_append_buf(buf, lnum++,
++ p == NULL ? (char_u *)"" : p, (colnr_T)0, TRUE);
++ }
++ }
++
++ /*
++ * Add lines to the popup from a list of dictionaries.
++ */
++ static void
++ add_popup_dicts(buf_T *buf, list_T *l)
++ {
++ listitem_T *li;
++ listitem_T *pli;
++ linenr_T lnum = 0;
++ char_u *p;
++ dict_T *dict;
++
++ // first add the text lines
++ for (li = l->lv_first; li != NULL; li = li->li_next)
++ {
++ if (li->li_tv.v_type != VAR_DICT)
++ {
++ emsg(_(e_dictreq));
++ return;
++ }
++ dict = li->li_tv.vval.v_dict;
++ p = dict == NULL ? NULL
++ : dict_get_string(dict, (char_u *)"text", FALSE);
++ ml_append_buf(buf, lnum++,
++ p == NULL ? (char_u *)"" : p, (colnr_T)0, TRUE);
++ }
++
++ // add the text properties
++ lnum = 1;
++ for (li = l->lv_first; li != NULL; li = li->li_next, ++lnum)
++ {
++ dictitem_T *di;
++ list_T *plist;
++
++ dict = li->li_tv.vval.v_dict;
++ di = dict_find(dict, (char_u *)"props", -1);
++ if (di != NULL)
++ {
++ if (di->di_tv.v_type != VAR_LIST)
++ {
++ emsg(_(e_listreq));
++ return;
++ }
++ plist = di->di_tv.vval.v_list;
++ if (plist != NULL)
++ {
++ for (pli = plist->lv_first; pli != NULL; pli = pli->li_next)
++ {
++ if (pli->li_tv.v_type != VAR_DICT)
++ {
++ emsg(_(e_dictreq));
++ return;
++ }
++ dict = pli->li_tv.vval.v_dict;
++ if (dict != NULL)
++ {
++ int col = dict_get_number(dict, (char_u *)"col");
++
++ prop_add_common( lnum, col, dict, buf, NULL);
++ }
++ }
++ }
++ }
++ }
++ }
++
++ /*
+ * popup_create({text}, {options})
+ */
+ void
+***************
+*** 128,154 ****
+
+ // Add text to the buffer.
+ if (argvars[0].v_type == VAR_STRING)
+ // just a string
+ ml_append_buf(buf, 0, argvars[0].vval.v_string, (colnr_T)0, TRUE);
+- else if (argvars[0].vval.v_list->lv_first->li_tv.v_type == VAR_STRING)
+- {
+- listitem_T *li;
+- linenr_T lnum = 0;
+- char_u *p;
+-
+- // list of strings
+- for (li = argvars[0].vval.v_list->lv_first; li != NULL;
+- li = li->li_next)
+- if (li->li_tv.v_type == VAR_STRING)
+- {
+- p = li->li_tv.vval.v_string;
+- ml_append_buf(buf, lnum++,
+- p == NULL ? (char_u *)"" : p, (colnr_T)0, TRUE);
+- }
+ }
+ else
+! // TODO: handle a list of dictionaries
+! emsg("Not implemented yet");
+
+ // Delete the line of the empty buffer.
+ curbuf = buf;
+--- 213,233 ----
+
+ // Add text to the buffer.
+ if (argvars[0].v_type == VAR_STRING)
++ {
+ // just a string
+ ml_append_buf(buf, 0, argvars[0].vval.v_string, (colnr_T)0, TRUE);
+ }
+ else
+! {
+! list_T *l = argvars[0].vval.v_list;
+!
+! if (l->lv_first->li_tv.v_type == VAR_STRING)
+! // list of strings
+! add_popup_strings(buf, l);
+! else
+! // list of dictionaries
+! add_popup_dicts(buf, l);
+! }
+
+ // Delete the line of the empty buffer.
+ curbuf = buf;
+*** ../vim-8.1.1406/src/testdir/test_popupwin.vim 2019-05-26 22:17:31.740314999 +0200
+--- src/testdir/test_popupwin.vim 2019-05-26 23:17:26.152504812 +0200
+***************
+*** 14,19 ****
+--- 14,21 ----
+ \ "call setline(1, range(1, 100))",
+ \ "hi PopupColor1 ctermbg=lightblue",
+ \ "hi PopupColor2 ctermbg=lightcyan",
++ \ "hi Comment ctermfg=red",
++ \ "call prop_type_add('comment', {'highlight': 'Comment'})",
+ \ "let winid = popup_create('hello there', {'line': 3, 'col': 11, 'highlight': 'PopupColor1'})",
+ \ "let winid2 = popup_create(['another one', 'another two', 'another three'], {'line': 3, 'col': 25})",
+ \ "call setwinvar(winid2, '&wincolor', 'PopupColor2')",
+***************
+*** 23,29 ****
+
+ " Add a tabpage
+ call term_sendkeys(buf, ":tabnew\<CR>")
+! call term_sendkeys(buf, ":call popup_create('other tab', {'line': 4, 'col': 9})\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_02', {})
+
+ " switch back to first tabpage
+--- 25,36 ----
+
+ " Add a tabpage
+ call term_sendkeys(buf, ":tabnew\<CR>")
+! call term_sendkeys(buf, ":call popup_create(["
+! \ .. "{'text': 'other tab'},"
+! \ .. "{'text': 'a comment line', 'props': [{"
+! \ .. "'col': 3, 'length': 7, 'type': 'comment'"
+! \ .. "}]},"
+! \ .. "], {'line': 4, 'col': 9})\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_02', {})
+
+ " switch back to first tabpage
+*** ../vim-8.1.1406/src/screen.c 2019-05-26 22:17:31.740314999 +0200
+--- src/screen.c 2019-05-26 23:20:55.635380744 +0200
+***************
+*** 4405,4411 ****
+ char_attr = hl_combine_attr(line_attr, search_attr);
+ # ifdef FEAT_TEXT_PROP
+ else if (text_prop_type != NULL)
+! char_attr = hl_combine_attr(line_attr, text_prop_attr);
+ # endif
+ else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
+ || vcol < fromcol || vcol_prev < fromcol_prev
+--- 4405,4414 ----
+ char_attr = hl_combine_attr(line_attr, search_attr);
+ # ifdef FEAT_TEXT_PROP
+ else if (text_prop_type != NULL)
+! {
+! char_attr = hl_combine_attr(
+! line_attr != 0 ? line_attr : win_attr, text_prop_attr);
+! }
+ # endif
+ else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
+ || vcol < fromcol || vcol_prev < fromcol_prev
+***************
+*** 4429,4435 ****
+ char_attr = hl_combine_attr(
+ syntax_attr, text_prop_attr);
+ else
+! char_attr = text_prop_attr;
+ }
+ else
+ #endif
+--- 4432,4439 ----
+ char_attr = hl_combine_attr(
+ syntax_attr, text_prop_attr);
+ else
+! char_attr = hl_combine_attr(
+! win_attr, text_prop_attr);
+ }
+ else
+ #endif
+*** ../vim-8.1.1406/src/testdir/dumps/Test_popupwin_02.dump 2019-05-26 14:10:59.909979018 +0200
+--- src/testdir/dumps/Test_popupwin_02.dump 2019-05-26 23:21:17.503256302 +0200
+***************
+*** 2,10 ****
+ > +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @10| +0#4040ff13#ffffff0@46
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+! |~| @73
+! |:+0#0000000&|c|a|l@1| |p|o|p|u|p|_|c|r|e|a|t|e|(|'|o|t|h|e|r| |t|a|b|'|,| |{|'|l|i|n|e|'|:| |4|,| |'|c|o|l|'|:| |9|}|)| @2|0|,|0|-|1| @8|A|l@1|
+--- 2,10 ----
+ > +0#0000000#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @10| +0#4040ff13#ffffff0@46
++ |~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @5| +0#4040ff13#ffffff0@46
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+! | +0#0000000&@56|0|,|0|-|1| @8|A|l@1|
+*** ../vim-8.1.1406/src/testdir/dumps/Test_popupwin_03.dump 2019-05-26 21:03:19.940073927 +0200
+--- src/testdir/dumps/Test_popupwin_03.dump 2019-05-26 23:21:59.287019422 +0200
+***************
+*** 7,10 ****
+ |6| @73
+ |7| @73
+ |8| @73
+! |:|c|a|l@1| |p|o|p|u|p|_|c|r|e|a|t|e|(|'|o|t|h|e|r| |t|a|b|'|,| |{|'|l|i|n|e|'|:| |4|,| |'|c|o| @9|1|,|1| @10|T|o|p|
+--- 7,10 ----
+ |6| @73
+ |7| @73
+ |8| @73
+! @57|1|,|1| @10|T|o|p|
+*** ../vim-8.1.1406/src/testdir/dumps/Test_popupwin_04.dump 2019-05-26 14:10:59.909979018 +0200
+--- src/testdir/dumps/Test_popupwin_04.dump 2019-05-26 23:23:09.142625542 +0200
+***************
+*** 2,8 ****
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @10| +0#4040ff13#ffffff0@46
+! |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+--- 2,8 ----
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @10| +0#4040ff13#ffffff0@46
+! |~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @5| +0#4040ff13#ffffff0@46
+ |~| @73
+ |~| @73
+ |~| @73
+*** ../vim-8.1.1406/runtime/doc/popup.txt 2019-05-26 22:17:31.740314999 +0200
+--- runtime/doc/popup.txt 2019-05-26 23:14:09.857529430 +0200
+***************
+*** 279,285 ****
+ - a string
+ - a list of strings
+ - a list of dictionaries, where each dictionary has these entries:
+- {not implemented yet}
+ text String with the text to display.
+ props A list of text properties. Optional.
+ Each entry is a dictionary, like the third argument of
+--- 279,284 ----
+***************
+*** 369,380 ****
+
+ POPUP TEXT PROPERTIES *popup-props*
+
+! {not implemented yet}
+! These are similar to the third argument of |prop_add()|, but not exactly the
+! same, since they only apply to one line.
+ col starting column, counted in bytes, use one for the
+ first column.
+ length length of text in bytes; can be zero
+ end_col column just after the text; not used when "length" is
+ present; when {col} and "end_col" are equal, this is a
+ zero-width text property
+--- 368,383 ----
+
+ POPUP TEXT PROPERTIES *popup-props*
+
+! These are similar to the third argument of |prop_add()| except:
+! - "lnum" is always the current line in the list
+! - "bufnr" is always the buffer of the popup
+! - "col" is in the Dict instead of a separate argument
+! - "transparent" is extra
+! So we get:
+ col starting column, counted in bytes, use one for the
+ first column.
+ length length of text in bytes; can be zero
++ end_lnum line number for the end of the text
+ end_col column just after the text; not used when "length" is
+ present; when {col} and "end_col" are equal, this is a
+ zero-width text property
+***************
+*** 385,390 ****
+--- 388,394 ----
+ transparent do not show these characters, show the text under it;
+ if there is an border character to the right or below
+ it will be made transparent as well
++ {not implemented yet}
+
+
+ POPUP FILTER *popup-filter*
+*** ../vim-8.1.1406/src/version.c 2019-05-26 22:17:31.740314999 +0200
+--- src/version.c 2019-05-26 22:35:57.872688332 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1407,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+37. You start looking for hot HTML addresses in public restrooms.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1408 b/data/vim/patches/8.1.1408
new file mode 100644
index 000000000..e7366a9ce
--- /dev/null
+++ b/data/vim/patches/8.1.1408
@@ -0,0 +1,193 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1408
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1408
+Problem: PFL_HIDDEN conflicts with system header file.
+Solution: Rename to POPF_HIDDEN.
+Files: src/popupwin.c, src/screen.c, src/vim.h
+
+
+*** ../vim-8.1.1407/src/popupwin.c 2019-05-26 23:32:03.175678045 +0200
+--- src/popupwin.c 2019-05-27 10:02:28.387158316 +0200
+***************
+*** 300,309 ****
+ win_T *wp;
+
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_popup_flags & PFL_HIDDEN) == 0)
+ return TRUE;
+ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_popup_flags & PFL_HIDDEN) == 0)
+ return TRUE;
+ return FALSE;
+ }
+--- 300,309 ----
+ win_T *wp;
+
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_popup_flags & POPF_HIDDEN) == 0)
+ return TRUE;
+ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_popup_flags & POPF_HIDDEN) == 0)
+ return TRUE;
+ return FALSE;
+ }
+***************
+*** 328,336 ****
+ int id = (int)tv_get_number(argvars);
+ win_T *wp = find_popup_win(id);
+
+! if (wp != NULL && (wp->w_popup_flags & PFL_HIDDEN) == 0)
+ {
+! wp->w_popup_flags |= PFL_HIDDEN;
+ redraw_all_later(NOT_VALID);
+ }
+ }
+--- 328,336 ----
+ int id = (int)tv_get_number(argvars);
+ win_T *wp = find_popup_win(id);
+
+! if (wp != NULL && (wp->w_popup_flags & POPF_HIDDEN) == 0)
+ {
+! wp->w_popup_flags |= POPF_HIDDEN;
+ redraw_all_later(NOT_VALID);
+ }
+ }
+***************
+*** 344,352 ****
+ int id = (int)tv_get_number(argvars);
+ win_T *wp = find_popup_win(id);
+
+! if (wp != NULL && (wp->w_popup_flags & PFL_HIDDEN) != 0)
+ {
+! wp->w_popup_flags &= ~PFL_HIDDEN;
+ redraw_all_later(NOT_VALID);
+ }
+ }
+--- 344,352 ----
+ int id = (int)tv_get_number(argvars);
+ win_T *wp = find_popup_win(id);
+
+! if (wp != NULL && (wp->w_popup_flags & POPF_HIDDEN) != 0)
+ {
+! wp->w_popup_flags &= ~POPF_HIDDEN;
+ redraw_all_later(NOT_VALID);
+ }
+ }
+*** ../vim-8.1.1407/src/screen.c 2019-05-26 23:32:03.175678045 +0200
+--- src/screen.c 2019-05-27 10:03:06.838940720 +0200
+***************
+*** 999,1007 ****
+
+ // Reset all the VALID_POPUP flags.
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+! wp->w_popup_flags &= ~PFL_REDRAWN;
+ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+! wp->w_popup_flags &= ~PFL_REDRAWN;
+
+ // TODO: don't redraw every popup every time.
+ for (;;)
+--- 999,1007 ----
+
+ // Reset all the VALID_POPUP flags.
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+! wp->w_popup_flags &= ~POPF_REDRAWN;
+ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+! wp->w_popup_flags &= ~POPF_REDRAWN;
+
+ // TODO: don't redraw every popup every time.
+ for (;;)
+***************
+*** 1012,1025 ****
+ lowest_zindex = INT_MAX;
+ lowest_wp = NULL;
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_popup_flags & (PFL_REDRAWN|PFL_HIDDEN)) == 0
+ && wp->w_zindex < lowest_zindex)
+ {
+ lowest_zindex = wp->w_zindex;
+ lowest_wp = wp;
+ }
+ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_popup_flags & (PFL_REDRAWN|PFL_HIDDEN)) == 0
+ && wp->w_zindex < lowest_zindex)
+ {
+ lowest_zindex = wp->w_zindex;
+--- 1012,1025 ----
+ lowest_zindex = INT_MAX;
+ lowest_wp = NULL;
+ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_popup_flags & (POPF_REDRAWN|POPF_HIDDEN)) == 0
+ && wp->w_zindex < lowest_zindex)
+ {
+ lowest_zindex = wp->w_zindex;
+ lowest_wp = wp;
+ }
+ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+! if ((wp->w_popup_flags & (POPF_REDRAWN|POPF_HIDDEN)) == 0
+ && wp->w_zindex < lowest_zindex)
+ {
+ lowest_zindex = wp->w_zindex;
+***************
+*** 1029,1035 ****
+ if (lowest_wp == NULL)
+ break;
+ win_update(lowest_wp);
+! lowest_wp->w_popup_flags |= PFL_REDRAWN;
+ }
+ }
+ #endif
+--- 1029,1035 ----
+ if (lowest_wp == NULL)
+ break;
+ win_update(lowest_wp);
+! lowest_wp->w_popup_flags |= POPF_REDRAWN;
+ }
+ }
+ #endif
+*** ../vim-8.1.1407/src/vim.h 2019-05-26 22:17:31.740314999 +0200
+--- src/vim.h 2019-05-27 10:03:13.758901545 +0200
+***************
+*** 614,621 ****
+ #define VALID_TOPLINE 0x80 // w_topline is valid (for cursor position)
+
+ // Values for w_popup_flags.
+! #define PFL_HIDDEN 1 // popup is not displayed
+! #define PFL_REDRAWN 2 // popup was just redrawn
+
+ /*
+ * Terminal highlighting attribute bits.
+--- 614,621 ----
+ #define VALID_TOPLINE 0x80 // w_topline is valid (for cursor position)
+
+ // Values for w_popup_flags.
+! #define POPF_HIDDEN 1 // popup is not displayed
+! #define POPF_REDRAWN 2 // popup was just redrawn
+
+ /*
+ * Terminal highlighting attribute bits.
+*** ../vim-8.1.1407/src/version.c 2019-05-26 23:32:03.179678024 +0200
+--- src/version.c 2019-05-27 10:04:19.022531903 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1408,
+ /**/
+
+--
+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.1409 b/data/vim/patches/8.1.1409
new file mode 100644
index 000000000..200b1c378
--- /dev/null
+++ b/data/vim/patches/8.1.1409
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1409
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1409
+Problem: Coverity warns for using uninitialized memory.
+Solution: Add a condition to clearing the growarray.
+Files: src/json.c
+
+
+*** ../vim-8.1.1408/src/json.c 2019-05-19 19:59:30.164255569 +0200
+--- src/json.c 2019-05-27 20:00:06.682014049 +0200
+***************
+*** 455,461 ****
+ STR2NR_HEX + STR2NR_FORCE, &nr, NULL, 4, TRUE);
+ if (len == 0)
+ {
+! ga_clear(&ga);
+ return FAIL;
+ }
+ p += len + 2;
+--- 455,462 ----
+ STR2NR_HEX + STR2NR_FORCE, &nr, NULL, 4, TRUE);
+ if (len == 0)
+ {
+! if (res != NULL)
+! ga_clear(&ga);
+ return FAIL;
+ }
+ p += len + 2;
+***************
+*** 471,477 ****
+ STR2NR_HEX + STR2NR_FORCE, &nr2, NULL, 4, TRUE);
+ if (len == 0)
+ {
+! ga_clear(&ga);
+ return FAIL;
+ }
+ if (0xdc00 <= nr2 && nr2 <= 0xdfff)
+--- 472,479 ----
+ STR2NR_HEX + STR2NR_FORCE, &nr2, NULL, 4, TRUE);
+ if (len == 0)
+ {
+! if (res != NULL)
+! ga_clear(&ga);
+ return FAIL;
+ }
+ if (0xdc00 <= nr2 && nr2 <= 0xdfff)
+***************
+*** 484,489 ****
+--- 486,492 ----
+ if (res != NULL)
+ {
+ char_u buf[NUMBUFLEN];
++
+ buf[utf_char2bytes((int)nr, buf)] = NUL;
+ ga_concat(&ga, buf);
+ }
+*** ../vim-8.1.1408/src/version.c 2019-05-27 10:04:37.530426996 +0200
+--- src/version.c 2019-05-27 20:01:01.001703887 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1409,
+ /**/
+
+--
+A day without sunshine is like, well, 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.1410 b/data/vim/patches/8.1.1410
new file mode 100644
index 000000000..264a99955
--- /dev/null
+++ b/data/vim/patches/8.1.1410
@@ -0,0 +1,553 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1410
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1410
+Problem: Popup_move() is not implemented yet.
+Solution: Implement it. (Yasuhiro Matsumoto, closes #4441) Improve the
+ positioning and resizing.
+Files: runtime/doc/popup.txt, src/evalfunc.c, src/popupwin.c,
+ src/screen.c, src/structs.h, src/proto/popupwin.pro,
+ src/testdir/test_popupwin.vim,
+ src/testdir/dumps/Test_popupwin_05.dump
+
+
+*** ../vim-8.1.1409/runtime/doc/popup.txt 2019-05-26 23:32:03.179678024 +0200
+--- runtime/doc/popup.txt 2019-05-27 20:15:57.224591812 +0200
+***************
+*** 84,90 ****
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+! - Implement list of lines with text properties
+ - Implement filter.
+ - Handle screen resize in screenalloc().
+ - Make redrawing more efficient and avoid flicker.
+--- 84,90 ----
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+! - implement popup_getposition({id}), use in tests
+ - Implement filter.
+ - Handle screen resize in screenalloc().
+ - Make redrawing more efficient and avoid flicker.
+***************
+*** 190,196 ****
+ For {id} see `popup_hide()`.
+
+ popup_move({id}, {options}) *popup_move()*
+- {not implemented yet}
+ Move popup {id} to the position speficied with {options}.
+ {options} may contain the items from |popup_create()| that
+ specify the popup position: "line", "col", "pos", "maxheight",
+--- 190,195 ----
+***************
+*** 310,319 ****
+ {not implemented yet}
+ maxheight maximum height
+ minheight minimum height
+- {not implemented yet}
+ maxwidth maximum width
+ minwidth minimum width
+- {not implemented yet}
+ hidden when TRUE the popup exists but is not displayed; use
+ `popup_show()` to unhide it.
+ {not implemented yet}
+--- 309,316 ----
+*** ../vim-8.1.1409/src/evalfunc.c 2019-05-26 22:17:31.736315033 +0200
+--- src/evalfunc.c 2019-05-27 20:06:05.751964764 +0200
+***************
+*** 811,816 ****
+--- 811,817 ----
+ {"popup_close", 1, 1, f_popup_close},
+ {"popup_create", 2, 2, f_popup_create},
+ {"popup_hide", 1, 1, f_popup_hide},
++ {"popup_move", 2, 2, f_popup_move},
+ {"popup_show", 1, 1, f_popup_show},
+ #endif
+ #ifdef FEAT_FLOAT
+*** ../vim-8.1.1409/src/popupwin.c 2019-05-27 10:04:37.530426996 +0200
+--- src/popupwin.c 2019-05-27 20:44:15.611540280 +0200
+***************
+*** 25,34 ****
+ int nr;
+ char_u *str;
+
+ wp->w_maxwidth = dict_get_number(dict, (char_u *)"maxwidth");
+ wp->w_maxheight = dict_get_number(dict, (char_u *)"maxheight");
+! wp->w_winrow = dict_get_number(dict, (char_u *)"line");
+! wp->w_wincol = dict_get_number(dict, (char_u *)"col");
+ wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
+
+ #if defined(FEAT_TIMERS)
+--- 25,38 ----
+ int nr;
+ char_u *str;
+
++ wp->w_minwidth = dict_get_number(dict, (char_u *)"minwidth");
++ wp->w_minheight = dict_get_number(dict, (char_u *)"minheight");
+ wp->w_maxwidth = dict_get_number(dict, (char_u *)"maxwidth");
+ wp->w_maxheight = dict_get_number(dict, (char_u *)"maxheight");
+!
+! wp->w_wantline = dict_get_number(dict, (char_u *)"line");
+! wp->w_wantcol = dict_get_number(dict, (char_u *)"col");
+!
+ wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
+
+ #if defined(FEAT_TIMERS)
+***************
+*** 145,150 ****
+--- 149,197 ----
+ }
+
+ /*
++ * Adjust the position and size of the popup to fit on the screen.
++ */
++ static void
++ popup_adjust_position(win_T *wp)
++ {
++ // TODO: Compute the size and position properly.
++ if (wp->w_wantline > 0)
++ wp->w_winrow = wp->w_wantline - 1;
++ else
++ // TODO: better default
++ wp->w_winrow = Rows > 5 ? Rows / 2 - 2 : 0;
++ if (wp->w_winrow >= Rows)
++ wp->w_winrow = Rows - 1;
++
++ if (wp->w_wantcol > 0)
++ wp->w_wincol = wp->w_wantcol - 1;
++ else
++ // TODO: better default
++ wp->w_wincol = Columns > 20 ? Columns / 2 - 10 : 0;
++ if (wp->w_wincol >= Columns - 3)
++ wp->w_wincol = Columns - 3;
++
++ // TODO: set width based on longest text line and the 'wrap' option
++ wp->w_width = vim_strsize(ml_get_buf(wp->w_buffer, 1, FALSE));
++ if (wp->w_minwidth > 0 && wp->w_width < wp->w_minwidth)
++ wp->w_width = wp->w_minwidth;
++ if (wp->w_maxwidth > 0 && wp->w_width > wp->w_maxwidth)
++ wp->w_width = wp->w_maxwidth;
++ if (wp->w_width > Columns - wp->w_wincol)
++ wp->w_width = Columns - wp->w_wincol;
++
++ if (wp->w_height <= 1)
++ // TODO: adjust height for wrapped lines
++ wp->w_height = wp->w_buffer->b_ml.ml_line_count;
++ if (wp->w_minheight > 0 && wp->w_height < wp->w_minheight)
++ wp->w_height = wp->w_minheight;
++ if (wp->w_maxheight > 0 && wp->w_height > wp->w_maxheight)
++ wp->w_height = wp->w_maxheight;
++ if (wp->w_height > Rows - wp->w_winrow)
++ wp->w_height = Rows - wp->w_winrow;
++ }
++
++ /*
+ * popup_create({text}, {options})
+ */
+ void
+***************
+*** 241,272 ****
+ if (wp->w_zindex == 0)
+ wp->w_zindex = 50;
+
+! // TODO: Compute the size and position properly.
+!
+! // Default position is in middle of the screen, assuming a small popup
+! if (wp->w_winrow == 0)
+! wp->w_winrow = Rows > 5 ? Rows / 2 - 2 : 0;
+! else
+! --wp->w_winrow; // option value is one-based
+! if (wp->w_wincol == 0)
+! wp->w_wincol = Columns > 20 ? Columns / 2 - 10 : 0;
+! else
+! --wp->w_wincol; // option value is one-based
+!
+!
+! // TODO: set width based on longest text line and the 'wrap' option
+! wp->w_width = wp->w_maxwidth == 0 ? 20 : wp->w_maxwidth;
+! if (wp->w_maxwidth > 0 && wp->w_width > wp->w_maxwidth)
+! wp->w_width = wp->w_maxwidth;
+! if (wp->w_width > Columns - wp->w_wincol)
+! wp->w_width = Columns - wp->w_wincol;
+!
+! // TODO: adjust height for wrapped lines
+! wp->w_height = buf->b_ml.ml_line_count;
+! if (wp->w_maxheight > 0 && wp->w_height > wp->w_maxheight)
+! wp->w_height = wp->w_maxheight;
+! if (wp->w_height > Rows - wp->w_winrow)
+! wp->w_height = Rows - wp->w_winrow;
+
+ wp->w_vsep_width = 0;
+
+--- 288,294 ----
+ if (wp->w_zindex == 0)
+ wp->w_zindex = 50;
+
+! popup_adjust_position(wp);
+
+ wp->w_vsep_width = 0;
+
+***************
+*** 424,427 ****
+--- 446,490 ----
+ close_all_popups();
+ }
+
++ /*
++ * popup_move({id}, {options})
++ */
++ void
++ f_popup_move(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ dict_T *d;
++ int nr;
++ int id = (int)tv_get_number(argvars);
++ win_T *wp = find_popup_win(id);
++
++ if (wp == NULL)
++ return; // invalid {id}
++
++ if (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL)
++ {
++ emsg(_(e_dictreq));
++ return;
++ }
++ d = argvars[1].vval.v_dict;
++
++ if ((nr = dict_get_number(d, (char_u *)"minwidth")) > 0)
++ wp->w_minwidth = nr;
++ if ((nr = dict_get_number(d, (char_u *)"minheight")) > 0)
++ wp->w_minheight = nr;
++ if ((nr = dict_get_number(d, (char_u *)"maxwidth")) > 0)
++ wp->w_maxwidth = nr;
++ if ((nr = dict_get_number(d, (char_u *)"maxheight")) > 0)
++ wp->w_maxheight = nr;
++ if ((nr = dict_get_number(d, (char_u *)"line")) > 0)
++ wp->w_wantline = nr;
++ if ((nr = dict_get_number(d, (char_u *)"col")) > 0)
++ wp->w_wantcol = nr;
++ // TODO: "pos"
++
++ if (wp->w_winrow + wp->w_height >= cmdline_row)
++ clear_cmdline = TRUE;
++ popup_adjust_position(wp);
++ redraw_all_later(NOT_VALID);
++ }
++
+ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.1409/src/screen.c 2019-05-27 10:04:37.530426996 +0200
+--- src/screen.c 2019-05-27 21:48:09.115958231 +0200
+***************
+*** 1034,1039 ****
+--- 1034,1057 ----
+ }
+ #endif
+
++ /*
++ * Get 'wincolor' attribute for window "wp". If not set and "wp" is a popup
++ * window then get the "Pmenu" highlight attribute.
++ */
++ static int
++ get_wcr_attr(win_T *wp)
++ {
++ int wcr_attr = 0;
++
++ if (*wp->w_p_wcr != NUL)
++ wcr_attr = syn_name2attr(wp->w_p_wcr);
++ #ifdef FEAT_TEXT_PROP
++ if (bt_popup(wp->w_buffer) && wcr_attr == 0)
++ wcr_attr = HL_ATTR(HLF_PNI);
++ #endif
++ return wcr_attr;
++ }
++
+ #if defined(FEAT_GUI) || defined(PROTO)
+ /*
+ * Update a single window, its status line and maybe the command line msg.
+***************
+*** 2419,2431 ****
+ {
+ int n = 0;
+ int attr = HL_ATTR(hl);
+! int wcr_attr = 0;
+
+! if (*wp->w_p_wcr != NUL)
+! {
+! wcr_attr = syn_name2attr(wp->w_p_wcr);
+! attr = hl_combine_attr(wcr_attr, attr);
+! }
+
+ if (draw_margin)
+ {
+--- 2437,2445 ----
+ {
+ int n = 0;
+ int attr = HL_ATTR(hl);
+! int wcr_attr = get_wcr_attr(wp);
+
+! attr = hl_combine_attr(wcr_attr, attr);
+
+ if (draw_margin)
+ {
+***************
+*** 3115,3120 ****
+--- 3129,3136 ----
+ int vi_attr = 0; // attributes for Visual and incsearch
+ // highlighting
+ int wcr_attr = 0; // attributes from 'wincolor'
++ int win_attr = 0; // background for whole window, except
++ // margins and "~" lines.
+ int area_attr = 0; // attributes desired by highlighting
+ int search_attr = 0; // attributes desired by 'hlsearch'
+ #ifdef FEAT_SYN_HL
+***************
+*** 3196,3202 ****
+ #ifdef FEAT_TERMINAL
+ int get_term_attr = FALSE;
+ #endif
+- int win_attr = 0; // background for whole window
+
+ /* draw_state: items that are drawn in sequence: */
+ #define WL_START 0 /* nothing done yet */
+--- 3212,3217 ----
+***************
+*** 3566,3593 ****
+ }
+ }
+
+! if (*wp->w_p_wcr != NUL)
+ {
+! wcr_attr = syn_name2attr(wp->w_p_wcr);
+!
+! // 'wincolor' highlighting for the whole window
+! if (wcr_attr != 0)
+! {
+! win_attr = wcr_attr;
+! area_highlighting = TRUE;
+! }
+ }
+ #ifdef FEAT_TEXT_PROP
+ if (bt_popup(wp->w_buffer))
+- {
+ screen_line_flags |= SLF_POPUP;
+-
+- if (win_attr == 0)
+- {
+- win_attr = HL_ATTR(HLF_PNI);
+- area_highlighting = TRUE;
+- }
+- }
+ #endif
+
+ /*
+--- 3581,3595 ----
+ }
+ }
+
+! wcr_attr = get_wcr_attr(wp);
+! if (wcr_attr != 0)
+ {
+! win_attr = wcr_attr;
+! area_highlighting = TRUE;
+ }
+ #ifdef FEAT_TEXT_PROP
+ if (bt_popup(wp->w_buffer))
+ screen_line_flags |= SLF_POPUP;
+ #endif
+
+ /*
+*** ../vim-8.1.1409/src/structs.h 2019-05-26 22:17:31.736315033 +0200
+--- src/structs.h 2019-05-27 20:30:23.054166540 +0200
+***************
+*** 2873,2880 ****
+--- 2873,2884 ----
+ #ifdef FEAT_TEXT_PROP
+ int w_popup_flags; // PFL_ values
+ int w_zindex;
++ int w_minheight; // "minheight" for popup window
++ int w_minwidth; // "minwidth" for popup window
+ int w_maxheight; // "maxheight" for popup window
+ int w_maxwidth; // "maxwidth" for popup window
++ int w_wantline; // "line" for popup window
++ int w_wantcol; // "col" for popup window
+ # if defined(FEAT_TIMERS)
+ timer_T *w_popup_timer; // timer for closing popup window
+ # endif
+*** ../vim-8.1.1409/src/proto/popupwin.pro 2019-05-26 22:17:31.736315033 +0200
+--- src/proto/popupwin.pro 2019-05-27 20:24:05.974256691 +0200
+***************
+*** 8,11 ****
+--- 8,12 ----
+ void popup_close_tabpage(tabpage_T *tp, int id);
+ void close_all_popups(void);
+ void ex_popupclear(exarg_T *eap);
++ void f_popup_move(typval_T *argvars, typval_T *rettv);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1409/src/testdir/test_popupwin.vim 2019-05-26 23:32:03.175678045 +0200
+--- src/testdir/test_popupwin.vim 2019-05-27 21:50:29.651252234 +0200
+***************
+*** 16,23 ****
+ \ "hi PopupColor2 ctermbg=lightcyan",
+ \ "hi Comment ctermfg=red",
+ \ "call prop_type_add('comment', {'highlight': 'Comment'})",
+! \ "let winid = popup_create('hello there', {'line': 3, 'col': 11, 'highlight': 'PopupColor1'})",
+! \ "let winid2 = popup_create(['another one', 'another two', 'another three'], {'line': 3, 'col': 25})",
+ \ "call setwinvar(winid2, '&wincolor', 'PopupColor2')",
+ \], 'XtestPopup')
+ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
+--- 16,23 ----
+ \ "hi PopupColor2 ctermbg=lightcyan",
+ \ "hi Comment ctermfg=red",
+ \ "call prop_type_add('comment', {'highlight': 'Comment'})",
+! \ "let winid = popup_create('hello there', {'line': 3, 'col': 11, 'minwidth': 20, 'highlight': 'PopupColor1'})",
+! \ "let winid2 = popup_create(['another one', 'another two', 'another three'], {'line': 3, 'col': 25, 'minwidth': 20})",
+ \ "call setwinvar(winid2, '&wincolor', 'PopupColor2')",
+ \], 'XtestPopup')
+ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
+***************
+*** 25,36 ****
+
+ " Add a tabpage
+ call term_sendkeys(buf, ":tabnew\<CR>")
+! call term_sendkeys(buf, ":call popup_create(["
+ \ .. "{'text': 'other tab'},"
+ \ .. "{'text': 'a comment line', 'props': [{"
+! \ .. "'col': 3, 'length': 7, 'type': 'comment'"
+ \ .. "}]},"
+! \ .. "], {'line': 4, 'col': 9})\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_02', {})
+
+ " switch back to first tabpage
+--- 25,36 ----
+
+ " Add a tabpage
+ call term_sendkeys(buf, ":tabnew\<CR>")
+! call term_sendkeys(buf, ":let popupwin = popup_create(["
+ \ .. "{'text': 'other tab'},"
+ \ .. "{'text': 'a comment line', 'props': [{"
+! \ .. "'col': 3, 'length': 7, 'minwidth': 20, 'type': 'comment'"
+ \ .. "}]},"
+! \ .. "], {'line': 4, 'col': 9, 'minwidth': 20})\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_02', {})
+
+ " switch back to first tabpage
+***************
+*** 41,46 ****
+--- 41,51 ----
+ call term_sendkeys(buf, ":quit!\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_04', {})
+
++ " resize popup
++ call term_sendkeys(buf, ":call popup_move(popupwin, {'minwidth': 15, 'maxwidth': 25, 'minheight': 3, 'maxheight': 5})\<CR>")
++ call term_sendkeys(buf, ":redraw\<CR>")
++ call VerifyScreenDump(buf, 'Test_popupwin_05', {})
++
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XtestPopup')
+***************
+*** 56,61 ****
+--- 61,67 ----
+ call popup_create('world', {
+ \ 'line': 1,
+ \ 'col': 1,
++ \ 'minwidth': 20,
+ \ 'time': 500,
+ \})
+ redraw
+***************
+*** 70,75 ****
+--- 76,82 ----
+ call popup_create('on the command line', {
+ \ 'line': &lines,
+ \ 'col': 10,
++ \ 'minwidth': 20,
+ \ 'time': 500,
+ \})
+ redraw
+***************
+*** 91,96 ****
+--- 98,104 ----
+ let winid = popup_create('world', {
+ \ 'line': 1,
+ \ 'col': 1,
++ \ 'minwidth': 20,
+ \})
+ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+***************
+*** 121,123 ****
+--- 129,161 ----
+
+ bwipe!
+ endfunc
++
++ func Test_popup_move()
++ topleft vnew
++ call setline(1, 'hello')
++
++ let winid = popup_create('world', {
++ \ 'line': 1,
++ \ 'col': 1,
++ \ 'minwidth': 20,
++ \})
++ redraw
++ let line = join(map(range(1, 6), 'screenstring(1, v:val)'), '')
++ call assert_equal('world ', line)
++
++ call popup_move(winid, {'line': 2, 'col': 2})
++ redraw
++ let line = join(map(range(1, 6), 'screenstring(1, v:val)'), '')
++ call assert_equal('hello ', line)
++ let line = join(map(range(1, 6), 'screenstring(2, v:val)'), '')
++ call assert_equal('~world', line)
++
++ call popup_move(winid, {'line': 1})
++ redraw
++ let line = join(map(range(1, 6), 'screenstring(1, v:val)'), '')
++ call assert_equal('hworld', line)
++
++ call popup_close(winid)
++
++ bwipe!
++ endfunc
+*** ../vim-8.1.1409/src/testdir/dumps/Test_popupwin_05.dump 2019-05-27 21:51:37.350912887 +0200
+--- src/testdir/dumps/Test_popupwin_05.dump 2019-05-27 21:48:42.687789379 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ > +0&#ffffff0@74
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @5| +0#4040ff13#ffffff0@51
++ |~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| | +0#4040ff13#ffffff0@51
++ |~| @6|~+0&#ffd7ff255| @13| +0&#ffffff0@51
++ |~| @73
++ |~| @73
++ |~| @73
++ |:+0#0000000&|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1|
+*** ../vim-8.1.1409/src/version.c 2019-05-27 20:01:38.121491973 +0200
+--- src/version.c 2019-05-27 21:51:48.102859037 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1410,
+ /**/
+
+--
+The users that I support would double-click on a landmine to find out
+what happens. -- A system administrator
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1411 b/data/vim/patches/8.1.1411
new file mode 100644
index 000000000..61078ab87
--- /dev/null
+++ b/data/vim/patches/8.1.1411
@@ -0,0 +1,69 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1411
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1411
+Problem: Coverity warns for divide by zero.
+Solution: Make sure width is larger than zero.
+Files: src/charset.c
+
+
+*** ../vim-8.1.1410/src/charset.c 2019-05-24 18:48:36.750128544 +0200
+--- src/charset.c 2019-05-27 21:59:46.180472213 +0200
+***************
+*** 1105,1119 ****
+ {
+ if (size + sbrlen + numberwidth > (colnr_T)wp->w_width)
+ {
+! /* calculate effective window width */
+ int width = (colnr_T)wp->w_width - sbrlen - numberwidth;
+ int prev_width = col
+ ? ((colnr_T)wp->w_width - (sbrlen + col)) : 0;
+! if (width == 0)
+! width = (colnr_T)wp->w_width;
+ added += ((size - prev_width) / width) * vim_strsize(p_sbr);
+ if ((size - prev_width) % width)
+! /* wrapped, add another length of 'sbr' */
+ added += vim_strsize(p_sbr);
+ }
+ else
+--- 1105,1120 ----
+ {
+ if (size + sbrlen + numberwidth > (colnr_T)wp->w_width)
+ {
+! // calculate effective window width
+ int width = (colnr_T)wp->w_width - sbrlen - numberwidth;
+ int prev_width = col
+ ? ((colnr_T)wp->w_width - (sbrlen + col)) : 0;
+!
+! if (width <= 0)
+! width = (colnr_T)1;
+ added += ((size - prev_width) / width) * vim_strsize(p_sbr);
+ if ((size - prev_width) % width)
+! // wrapped, add another length of 'sbr'
+ added += vim_strsize(p_sbr);
+ }
+ else
+*** ../vim-8.1.1410/src/version.c 2019-05-27 21:53:53.990229301 +0200
+--- src/version.c 2019-05-27 22:00:33.300237524 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1411,
+ /**/
+
+--
+On the other hand, you have different fingers.
+ -- 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.1412 b/data/vim/patches/8.1.1412
new file mode 100644
index 000000000..e1d996744
--- /dev/null
+++ b/data/vim/patches/8.1.1412
@@ -0,0 +1,740 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1412
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1412
+Problem: Test 30 is old style.
+Solution: Turn it into a new style test. (Yegappan Lakshmanan, closes #4440)
+Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
+ src/testdir/test30.in, src/testdir/test30.ok,
+ src/testdir/test_fileformat.vim
+
+
+*** ../vim-8.1.1411/src/Makefile 2019-05-25 19:51:03.772408479 +0200
+--- src/Makefile 2019-05-27 22:18:04.383027066 +0200
+***************
+*** 2182,2188 ****
+ test1 \
+ test_eval \
+ test3 \
+! test30 test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+ test64 test69 \
+--- 2183,2189 ----
+ test1 \
+ test_eval \
+ test3 \
+! test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+ test64 test69 \
+*** ../vim-8.1.1411/src/testdir/Make_all.mak 2019-05-25 19:51:03.780408437 +0200
+--- src/testdir/Make_all.mak 2019-05-27 22:18:04.383027066 +0200
+***************
+*** 42,48 ****
+
+ # Tests that run on most systems, but not on VMS
+ SCRIPTS_MORE4 = \
+- test30.out \
+ test59.out \
+ test72.out \
+
+--- 42,47 ----
+*** ../vim-8.1.1411/src/testdir/Make_vms.mms 2019-05-19 21:44:03.978804771 +0200
+--- src/testdir/Make_vms.mms 2019-05-27 22:18:04.387027046 +0200
+***************
+*** 74,80 ****
+ .SUFFIXES : .out .in
+
+ SCRIPT = test1.out test3.out \
+! test30.out test39.out \
+ test42.out test44.out test48.out test49.out \
+ test64.out test69.out \
+ test72.out test77a.out test88.out \
+--- 74,80 ----
+ .SUFFIXES : .out .in
+
+ SCRIPT = test1.out test3.out \
+! test39.out \
+ test42.out test44.out test48.out test49.out \
+ test64.out test69.out \
+ test72.out test77a.out test88.out \
+***************
+*** 83,90 ****
+
+ # Known problems:
+ #
+- # test30: bug, most probably - a problem around mac format
+- #
+ # test59: Failed/Hangs - VMS does not support spell files (file names
+ # with too many dots).
+ #
+--- 83,88 ----
+*** ../vim-8.1.1411/src/testdir/test30.in 2017-03-08 22:48:59.000000000 +0100
+--- src/testdir/test30.in 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,238 ****
+- Test for a lot of variations of the 'fileformats' option
+-
+- Note: This test will fail if "cat" is not available.
+-
+- STARTTEST
+- :so small.vim
+- :set belloff=all
+- :" first write three test files, one in each format
+- :set fileformat=unix
+- :set fileformats=
+- :/^unix/;/eof/-1w! XXUnix
+- :/^dos/;/eof/-1w! XXDos
+- :set bin noeol
+- :$w! XXMac
+- Gonoeol
+- :$w! XXEol
+- :set nobin eol
+- :enew!
+- :bwipe XXUnix XXDos XXMac
+- :" create mixed format files
+- :if has("vms")
+- : !copy XXUnix,XXDos XXUxDs.
+- : !copy XXUnix,XXMac XXUxMac.
+- : !copy XXDos,XXMac XXDosMac.
+- : !copy XXMac,XXEol XXMacEol.
+- : !copy XXUnix,XXDos,XXMac XXUxDsMc.
+- :elseif has("win32")
+- : !copy /b XXUnix+XXDos XXUxDs
+- : !copy /b XXUnix+XXMac XXUxMac
+- : !copy /b XXDos+XXMac XXDosMac
+- : !copy /b XXMac+XXEol XXMacEol
+- : !copy /b XXUnix+XXDos+XXMac XXUxDsMc
+- :else
+- : !cat XXUnix XXDos >XXUxDs
+- : !cat XXUnix XXMac >XXUxMac
+- : !cat XXDos XXMac >XXDosMac
+- : !cat XXMac XXEol >XXMacEol
+- : !cat XXUnix XXDos XXMac >XXUxDsMc
+- :endif
+- :"
+- :" try reading and writing with 'fileformats' empty
+- :set fileformat=unix
+- :e! XXUnix
+- :w! test.out
+- :e! XXDos
+- :w! XXtt01
+- :e! XXMac
+- :w! XXtt02
+- :bwipe XXUnix XXDos XXMac
+- :set fileformat=dos
+- :e! XXUnix
+- :w! XXtt11
+- :e! XXDos
+- :w! XXtt12
+- :e! XXMac
+- :w! XXtt13
+- :bwipe XXUnix XXDos XXMac
+- :set fileformat=mac
+- :e! XXUnix
+- :w! XXtt21
+- :e! XXDos
+- :w! XXtt22
+- :e! XXMac
+- :w! XXtt23
+- :bwipe XXUnix XXDos XXMac
+- :"
+- :" try reading and writing with 'fileformats' set to one format
+- :set fileformats=unix
+- :e! XXUxDsMc
+- :w! XXtt31
+- :bwipe XXUxDsMc
+- :set fileformats=dos
+- :e! XXUxDsMc
+- :w! XXtt32
+- :bwipe XXUxDsMc
+- :set fileformats=mac
+- :e! XXUxDsMc
+- :w! XXtt33
+- :bwipe XXUxDsMc
+- :"
+- :" try reading and writing with 'fileformats' set to two formats
+- :set fileformats=unix,dos
+- :e! XXUxDsMc
+- :w! XXtt41
+- :bwipe XXUxDsMc
+- :e! XXUxMac
+- :w! XXtt42
+- :bwipe XXUxMac
+- :e! XXDosMac
+- :w! XXtt43
+- :bwipe XXDosMac
+- :set fileformats=unix,mac
+- :e! XXUxDs
+- :w! XXtt51
+- :bwipe XXUxDs
+- :e! XXUxDsMc
+- :w! XXtt52
+- :bwipe XXUxDsMc
+- :e! XXDosMac
+- :w! XXtt53
+- :bwipe XXDosMac
+- :e! XXEol
+- ggO=&ffs
+- :=&ff
+- :w! XXtt54
+- :bwipe XXEol
+- :set fileformats=dos,mac
+- :e! XXUxDs
+- :w! XXtt61
+- :bwipe XXUxDs
+- :e! XXUxMac
+- ggO=&ffs
+- :=&ff
+- :w! XXtt62
+- :bwipe XXUxMac
+- :e! XXUxDsMc
+- :w! XXtt63
+- :bwipe XXUxDsMc
+- :e! XXMacEol
+- ggO=&ffs
+- :=&ff
+- :w! XXtt64
+- :bwipe XXMacEol
+- :"
+- :" try reading and writing with 'fileformats' set to three formats
+- :set fileformats=unix,dos,mac
+- :e! XXUxDsMc
+- :w! XXtt71
+- :bwipe XXUxDsMc
+- :e! XXEol
+- ggO=&ffs
+- :=&ff
+- :w! XXtt72
+- :bwipe XXEol
+- :set fileformats=mac,dos,unix
+- :e! XXUxDsMc
+- :w! XXtt81
+- :bwipe XXUxDsMc
+- :e! XXEol
+- ggO=&ffs
+- :=&ff
+- :w! XXtt82
+- :bwipe XXEol
+- :" try with 'binary' set
+- :set fileformats=mac,unix,dos
+- :set binary
+- :e! XXUxDsMc
+- :w! XXtt91
+- :bwipe XXUxDsMc
+- :set fileformats=mac
+- :e! XXUxDsMc
+- :w! XXtt92
+- :bwipe XXUxDsMc
+- :set fileformats=dos
+- :e! XXUxDsMc
+- :w! XXtt93
+- :"
+- :" Append "END" to each file so that we can see what the last written char was.
+- :set fileformat=unix nobin
+- ggdGaEND:w >>XXtt01
+- :w >>XXtt02
+- :w >>XXtt11
+- :w >>XXtt12
+- :w >>XXtt13
+- :w >>XXtt21
+- :w >>XXtt22
+- :w >>XXtt23
+- :w >>XXtt31
+- :w >>XXtt32
+- :w >>XXtt33
+- :w >>XXtt41
+- :w >>XXtt42
+- :w >>XXtt43
+- :w >>XXtt51
+- :w >>XXtt52
+- :w >>XXtt53
+- :w >>XXtt54
+- :w >>XXtt61
+- :w >>XXtt62
+- :w >>XXtt63
+- :w >>XXtt64
+- :w >>XXtt71
+- :w >>XXtt72
+- :w >>XXtt81
+- :w >>XXtt82
+- :w >>XXtt91
+- :w >>XXtt92
+- :w >>XXtt93
+- :"
+- :" Concatenate the results.
+- :" Make fileformat of test.out the native fileformat.
+- :" Add a newline at the end.
+- :set binary
+- :e! test.out
+- :$r XXtt01
+- :$r XXtt02
+- Go1:$r XXtt11
+- :$r XXtt12
+- :$r XXtt13
+- Go2:$r XXtt21
+- :$r XXtt22
+- :$r XXtt23
+- Go3:$r XXtt31
+- :$r XXtt32
+- :$r XXtt33
+- Go4:$r XXtt41
+- :$r XXtt42
+- :$r XXtt43
+- Go5:$r XXtt51
+- :$r XXtt52
+- :$r XXtt53
+- :$r XXtt54
+- Go6:$r XXtt61
+- :$r XXtt62
+- :$r XXtt63
+- :$r XXtt64
+- Go7:$r XXtt71
+- :$r XXtt72
+- Go8:$r XXtt81
+- :$r XXtt82
+- Go9:$r XXtt91
+- :$r XXtt92
+- :$r XXtt93
+- Go10:$r XXUnix
+- :set nobinary ff&
+- :w
+- :qa!
+- ENDTEST
+-
+- unix
+- unix
+- eof
+-
+- dos
+- dos
+- eof
+-
+- mac mac
+--- 0 ----
+*** ../vim-8.1.1411/src/testdir/test30.ok 2016-10-12 17:37:44.000000000 +0200
+--- src/testdir/test30.ok 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,130 ****
+- unix
+- unix
+- dos
+- dos
+- END
+- mac mac
+- END
+- 1
+- unix
+- unix
+- END
+- dos
+- dos
+- END
+- mac mac
+- END
+- 2
+- unix
+- unix
+- END
+- dos
+- dos
+- END
+- mac mac END
+- 3
+- unix
+- unix
+- dos
+- dos
+- mac mac
+- END
+- unix
+- unix
+- dos
+- dos
+- mac mac
+- END
+- unix
+- unix
+- dos
+- dos
+- mac mac END
+- 4
+- unix
+- unix
+- dos
+- dos
+- mac mac
+- END
+- unix
+- unix
+- mac mac
+- END
+- dos
+- dos
+- mac mac
+- END
+- 5
+- unix
+- unix
+- dos
+- dos
+- END
+- unix
+- unix
+- dos
+- dos
+- mac mac
+- END
+- dos
+- dos
+- mac mac END
+- unix,mac:unix
+- noeol
+- END
+- 6
+- unix
+- unix
+- dos
+- dos
+- END
+- dos,mac:dos
+- unix
+- unix
+- mac mac
+- END
+- unix
+- unix
+- dos
+- dos
+- mac mac
+- END
+- dos,mac:mac mac mac noeol END
+- 7
+- unix
+- unix
+- dos
+- dos
+- mac mac
+- END
+- unix,dos,mac:unix
+- noeol
+- END
+- 8
+- unix
+- unix
+- dos
+- dos
+- mac mac
+- END
+- mac,dos,unix:mac noeol END
+- 9
+- unix
+- unix
+- dos
+- dos
+- mac mac END
+- unix
+- unix
+- dos
+- dos
+- mac mac END
+- unix
+- unix
+- dos
+- dos
+- mac mac END
+- 10
+- unix
+- unix
+--- 0 ----
+*** ../vim-8.1.1411/src/testdir/test_fileformat.vim 2017-01-24 15:36:35.000000000 +0100
+--- src/testdir/test_fileformat.vim 2019-05-27 22:18:04.387027046 +0200
+***************
+*** 1,5 ****
+- " Test behavior of fileformat after bwipeout of last buffer
+
+ func Test_fileformat_after_bw()
+ bwipeout
+ set fileformat&
+--- 1,5 ----
+
++ " Test behavior of fileformat after bwipeout of last buffer
+ func Test_fileformat_after_bw()
+ bwipeout
+ set fileformat&
+***************
+*** 31,33 ****
+--- 31,278 ----
+ au! BufReadPre Xfile
+ bw!
+ endfunc
++
++ " Convert the contents of a file into a literal string
++ func s:file2str(fname)
++ let b = readfile(a:fname, 'B')
++ let s = ''
++ for c in b
++ let s .= nr2char(c)
++ endfor
++ return s
++ endfunc
++
++ " Concatenate the contents of files 'f1' and 'f2' and create 'destfile'
++ func s:concat_files(f1, f2, destfile)
++ let b1 = readfile(a:f1, 'B')
++ let b2 = readfile(a:f2, 'B')
++ let b3 = b1 + b2
++ call writefile(b3, a:destfile, 'B')
++ endfun
++
++ " Test for a lot of variations of the 'fileformats' option
++ func Test_fileformats()
++ " create three test files, one in each format
++ call writefile(['unix', 'unix'], 'XXUnix')
++ call writefile(["dos\r", "dos\r"], 'XXDos')
++ call writefile(["mac\rmac\r"], 'XXMac', 'b')
++ " create a file with no End Of Line
++ call writefile(["noeol"], 'XXEol', 'b')
++ " create mixed format files
++ call s:concat_files('XXUnix', 'XXDos', 'XXUxDs')
++ call s:concat_files('XXUnix', 'XXMac', 'XXUxMac')
++ call s:concat_files('XXDos', 'XXMac', 'XXDosMac')
++ call s:concat_files('XXMac', 'XXEol', 'XXMacEol')
++ call s:concat_files('XXUxDs', 'XXMac', 'XXUxDsMc')
++
++ new
++
++ " Test 1: try reading and writing with 'fileformats' empty
++ set fileformats=
++
++ " try with 'fileformat' set to 'unix'
++ set fileformat=unix
++ e! XXUnix
++ w! Xtest
++ call assert_equal("unix\nunix\n", s:file2str('Xtest'))
++ e! XXDos
++ w! Xtest
++ call assert_equal("dos\r\ndos\r\n", s:file2str('Xtest'))
++ e! XXMac
++ w! Xtest
++ call assert_equal("mac\rmac\r\n", s:file2str('Xtest'))
++ bwipe XXUnix XXDos XXMac
++
++ " try with 'fileformat' set to 'dos'
++ set fileformat=dos
++ e! XXUnix
++ w! Xtest
++ call assert_equal("unix\r\nunix\r\n", s:file2str('Xtest'))
++ e! XXDos
++ w! Xtest
++ call assert_equal("dos\r\ndos\r\n", s:file2str('Xtest'))
++ e! XXMac
++ w! Xtest
++ call assert_equal("mac\rmac\r\r\n", s:file2str('Xtest'))
++ bwipe XXUnix XXDos XXMac
++
++ " try with 'fileformat' set to 'mac'
++ set fileformat=mac
++ e! XXUnix
++ w! Xtest
++ call assert_equal("unix\nunix\n\r", s:file2str('Xtest'))
++ e! XXDos
++ w! Xtest
++ call assert_equal("dos\r\ndos\r\n\r", s:file2str('Xtest'))
++ e! XXMac
++ w! Xtest
++ call assert_equal("mac\rmac\r", s:file2str('Xtest'))
++ bwipe XXUnix XXDos XXMac
++
++ " Test 2: try reading and writing with 'fileformats' set to one format
++
++ " try with 'fileformats' set to 'unix'
++ set fileformats=unix
++ e! XXUxDsMc
++ w! Xtest
++ call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r\n",
++ \ s:file2str('Xtest'))
++ bwipe XXUxDsMc
++
++ " try with 'fileformats' set to 'dos'
++ set fileformats=dos
++ e! XXUxDsMc
++ w! Xtest
++ call assert_equal("unix\r\nunix\r\ndos\r\ndos\r\nmac\rmac\r\r\n",
++ \ s:file2str('Xtest'))
++ bwipe XXUxDsMc
++
++ " try with 'fileformats' set to 'mac'
++ set fileformats=mac
++ e! XXUxDsMc
++ w! Xtest
++ call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r",
++ \ s:file2str('Xtest'))
++ bwipe XXUxDsMc
++
++ " Test 3: try reading and writing with 'fileformats' set to two formats
++
++ " try with 'fileformats' set to 'unix,dos'
++ set fileformats=unix,dos
++ e! XXUxDsMc
++ w! Xtest
++ call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r\n",
++ \ s:file2str('Xtest'))
++ bwipe XXUxDsMc
++
++ e! XXUxMac
++ w! Xtest
++ call assert_equal("unix\nunix\nmac\rmac\r\n", s:file2str('Xtest'))
++ bwipe XXUxMac
++
++ e! XXDosMac
++ w! Xtest
++ call assert_equal("dos\r\ndos\r\nmac\rmac\r\r\n", s:file2str('Xtest'))
++ bwipe XXDosMac
++
++ " try with 'fileformats' set to 'unix,mac'
++ set fileformats=unix,mac
++ e! XXUxDs
++ w! Xtest
++ call assert_equal("unix\nunix\ndos\r\ndos\r\n", s:file2str('Xtest'))
++ bwipe XXUxDs
++
++ e! XXUxDsMc
++ w! Xtest
++ call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r\n",
++ \ s:file2str('Xtest'))
++ bwipe XXUxDsMc
++
++ e! XXDosMac
++ w! Xtest
++ call assert_equal("dos\r\ndos\r\nmac\rmac\r", s:file2str('Xtest'))
++ bwipe XXDosMac
++
++ e! XXEol
++ exe "normal ggO\<C-R>=&ffs\<CR>:\<C-R>=&ff\<CR>"
++ w! Xtest
++ call assert_equal("unix,mac:unix\nnoeol\n", s:file2str('Xtest'))
++ bwipe! XXEol
++
++ " try with 'fileformats' set to 'dos,mac'
++ set fileformats=dos,mac
++ e! XXUxDs
++ w! Xtest
++ call assert_equal("unix\r\nunix\r\ndos\r\ndos\r\n", s:file2str('Xtest'))
++ bwipe XXUxDs
++
++ e! XXUxMac
++ exe "normal ggO\<C-R>=&ffs\<CR>:\<C-R>=&ff\<CR>"
++ w! Xtest
++ call assert_equal("dos,mac:dos\r\nunix\r\nunix\r\nmac\rmac\r\r\n",
++ \ s:file2str('Xtest'))
++ bwipe! XXUxMac
++
++ e! XXUxDsMc
++ w! Xtest
++ call assert_equal("unix\r\nunix\r\ndos\r\ndos\r\nmac\rmac\r\r\n",
++ \ s:file2str('Xtest'))
++ bwipe XXUxDsMc
++
++ e! XXMacEol
++ exe "normal ggO\<C-R>=&ffs\<CR>:\<C-R>=&ff\<CR>"
++ w! Xtest
++ call assert_equal("dos,mac:mac\rmac\rmac\rnoeol\r", s:file2str('Xtest'))
++ bwipe! XXMacEol
++
++ " Test 4: try reading and writing with 'fileformats' set to three formats
++ set fileformats=unix,dos,mac
++ e! XXUxDsMc
++ w! Xtest
++ call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r\n",
++ \ s:file2str('Xtest'))
++ bwipe XXUxDsMc
++
++ e! XXEol
++ exe "normal ggO\<C-R>=&ffs\<CR>:\<C-R>=&ff\<CR>"
++ w! Xtest
++ call assert_equal("unix,dos,mac:unix\nnoeol\n", s:file2str('Xtest'))
++ bwipe! XXEol
++
++ set fileformats=mac,dos,unix
++ e! XXUxDsMc
++ w! Xtest
++ call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r\n",
++ \ s:file2str('Xtest'))
++ bwipe XXUxDsMc
++
++ e! XXEol
++ exe "normal ggO\<C-R>=&ffs\<CR>:\<C-R>=&ff\<CR>"
++ w! Xtest
++ call assert_equal("mac,dos,unix:mac\rnoeol\r", s:file2str('Xtest'))
++ bwipe! XXEol
++
++ " Test 5: try with 'binary' set
++ set fileformats=mac,unix,dos
++ set binary
++ e! XXUxDsMc
++ w! Xtest
++ call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r",
++ \ s:file2str('Xtest'))
++ bwipe XXUxDsMc
++
++ set fileformats=mac
++ e! XXUxDsMc
++ w! Xtest
++ call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r",
++ \ s:file2str('Xtest'))
++ bwipe XXUxDsMc
++
++ set fileformats=dos
++ e! XXUxDsMc
++ w! Xtest
++ call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r",
++ \ s:file2str('Xtest'))
++ bwipe XXUxDsMc
++
++ e! XXUnix
++ w! Xtest
++ call assert_equal("unix\nunix\n", s:file2str('Xtest'))
++ bwipe! XXUnix
++
++ set nobinary ff& ffs&
++
++ " cleanup
++ only
++ %bwipe!
++ call delete('XXUnix')
++ call delete('XXDos')
++ call delete('XXMac')
++ call delete('XXEol')
++ call delete('XXUxDs')
++ call delete('XXUxMac')
++ call delete('XXDosMac')
++ call delete('XXMacEol')
++ call delete('XXUxDsMc')
++ call delete('Xtest')
++ endfunc
+*** ../vim-8.1.1411/src/version.c 2019-05-27 22:01:36.871920997 +0200
+--- src/version.c 2019-05-27 22:19:45.142527742 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1412,
+ /**/
+
+--
+You have the right to remain silent. Anything you say will be
+misquoted, then used against 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.1413 b/data/vim/patches/8.1.1413
new file mode 100644
index 000000000..6b3de1b7d
--- /dev/null
+++ b/data/vim/patches/8.1.1413
@@ -0,0 +1,290 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1413
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1413
+Problem: Error when the drive of the swap file was disconnected.
+Solution: Try closing and re-opening the swap file. (closes #4378)
+Files: src/memfile.c, src/structs.h, src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.1412/src/memfile.c 2019-05-24 18:48:36.766128461 +0200
+--- src/memfile.c 2019-05-27 23:27:40.760156972 +0200
+***************
+*** 994,1000 ****
+ unsigned page_count; /* number of pages written */
+ unsigned size; /* number of bytes written */
+
+! if (mfp->mf_fd < 0) /* there is no file, can't write */
+ return FAIL;
+
+ if (hp->bh_bnum < 0) /* must assign file block number */
+--- 994,1001 ----
+ unsigned page_count; /* number of pages written */
+ unsigned size; /* number of bytes written */
+
+! if (mfp->mf_fd < 0 && !mfp->mf_reopen)
+! // there is no file and there was no file, can't write
+ return FAIL;
+
+ if (hp->bh_bnum < 0) /* must assign file block number */
+***************
+*** 1011,1016 ****
+--- 1012,1019 ----
+ */
+ for (;;)
+ {
++ int attempt;
++
+ nr = hp->bh_bnum;
+ if (nr > mfp->mf_infile_count) /* beyond end of file */
+ {
+***************
+*** 1021,1049 ****
+ hp2 = hp;
+
+ offset = (off_T)page_size * nr;
+- if (vim_lseek(mfp->mf_fd, offset, SEEK_SET) != offset)
+- {
+- PERROR(_("E296: Seek error in swap file write"));
+- return FAIL;
+- }
+ if (hp2 == NULL) /* freed block, fill with dummy data */
+ page_count = 1;
+ else
+ page_count = hp2->bh_page_count;
+ size = page_size * page_count;
+! if (mf_write_block(mfp, hp2 == NULL ? hp : hp2, offset, size) == FAIL)
+ {
+! /*
+! * Avoid repeating the error message, this mostly happens when the
+! * disk is full. We give the message again only after a successful
+! * write or when hitting a key. We keep on trying, in case some
+! * space becomes available.
+! */
+! if (!did_swapwrite_msg)
+! emsg(_("E297: Write error in swap file"));
+! did_swapwrite_msg = TRUE;
+! return FAIL;
+ }
+ did_swapwrite_msg = FALSE;
+ if (hp2 != NULL) /* written a non-dummy block */
+ hp2->bh_flags &= ~BH_DIRTY;
+--- 1024,1072 ----
+ hp2 = hp;
+
+ offset = (off_T)page_size * nr;
+ if (hp2 == NULL) /* freed block, fill with dummy data */
+ page_count = 1;
+ else
+ page_count = hp2->bh_page_count;
+ size = page_size * page_count;
+!
+! for (attempt = 1; attempt <= 2; ++attempt)
+ {
+! if (mfp->mf_fd >= 0)
+! {
+! if (vim_lseek(mfp->mf_fd, offset, SEEK_SET) != offset)
+! {
+! PERROR(_("E296: Seek error in swap file write"));
+! return FAIL;
+! }
+! if (mf_write_block(mfp,
+! hp2 == NULL ? hp : hp2, offset, size) == OK)
+! break;
+! }
+!
+! if (attempt == 1)
+! {
+! // If the swap file is on a network drive, and the network
+! // gets disconnected and then re-connected, we can maybe fix it
+! // by closing and then re-opening the file.
+! if (mfp->mf_fd >= 0)
+! close(mfp->mf_fd);
+! mfp->mf_fd = mch_open_rw((char *)mfp->mf_fname, mfp->mf_flags);
+! mfp->mf_reopen = (mfp->mf_fd < 0);
+! }
+! if (attempt == 2 || mfp->mf_fd < 0)
+! {
+! // Avoid repeating the error message, this mostly happens when
+! // the disk is full. We give the message again only after a
+! // successful write or when hitting a key. We keep on trying,
+! // in case some space becomes available.
+! if (!did_swapwrite_msg)
+! emsg(_("E297: Write error in swap file"));
+! did_swapwrite_msg = TRUE;
+! return FAIL;
+! }
+ }
++
+ did_swapwrite_msg = FALSE;
+ if (hp2 != NULL) /* written a non-dummy block */
+ hp2->bh_flags &= ~BH_DIRTY;
+***************
+*** 1271,1276 ****
+--- 1294,1300 ----
+ * the file) */
+ flags |= O_NOINHERIT;
+ #endif
++ mfp->mf_flags = flags;
+ mfp->mf_fd = mch_open_rw((char *)mfp->mf_fname, flags);
+ }
+
+*** ../vim-8.1.1412/src/structs.h 2019-05-27 21:53:53.990229301 +0200
+--- src/structs.h 2019-05-27 23:22:20.062819685 +0200
+***************
+*** 604,631 ****
+
+ struct memfile
+ {
+! char_u *mf_fname; /* name of the file */
+! char_u *mf_ffname; /* idem, full path */
+! int mf_fd; /* file descriptor */
+! bhdr_T *mf_free_first; /* first block_hdr in free list */
+! bhdr_T *mf_used_first; /* mru block_hdr in used list */
+! bhdr_T *mf_used_last; /* lru block_hdr in used list */
+! unsigned mf_used_count; /* number of pages in used list */
+! unsigned mf_used_count_max; /* maximum number of pages in memory */
+! mf_hashtab_T mf_hash; /* hash lists */
+! mf_hashtab_T mf_trans; /* trans lists */
+! blocknr_T mf_blocknr_max; /* highest positive block number + 1*/
+! blocknr_T mf_blocknr_min; /* lowest negative block number - 1 */
+! blocknr_T mf_neg_count; /* number of negative blocks numbers */
+! blocknr_T mf_infile_count; /* number of pages in the file */
+! unsigned mf_page_size; /* number of bytes in a page */
+! int mf_dirty; /* TRUE if there are dirty blocks */
+ #ifdef FEAT_CRYPT
+! buf_T *mf_buffer; /* buffer this memfile is for */
+! char_u mf_seed[MF_SEED_LEN]; /* seed for encryption */
+
+! /* Values for key, method and seed used for reading data blocks when
+! * updating for a newly set key or method. Only when mf_old_key != NULL. */
+ char_u *mf_old_key;
+ int mf_old_cm;
+ char_u mf_old_seed[MF_SEED_LEN];
+--- 604,633 ----
+
+ struct memfile
+ {
+! char_u *mf_fname; // name of the file
+! char_u *mf_ffname; // idem, full path
+! int mf_fd; // file descriptor
+! int mf_flags; // flags used when opening this memfile
+! int mf_reopen; // mf_fd was closed, retry opening
+! bhdr_T *mf_free_first; // first block_hdr in free list
+! bhdr_T *mf_used_first; // mru block_hdr in used list
+! bhdr_T *mf_used_last; // lru block_hdr in used list
+! unsigned mf_used_count; // number of pages in used list
+! unsigned mf_used_count_max; // maximum number of pages in memory
+! mf_hashtab_T mf_hash; // hash lists
+! mf_hashtab_T mf_trans; // trans lists
+! blocknr_T mf_blocknr_max; // highest positive block number + 1
+! blocknr_T mf_blocknr_min; // lowest negative block number - 1
+! blocknr_T mf_neg_count; // number of negative blocks numbers
+! blocknr_T mf_infile_count; // number of pages in the file
+! unsigned mf_page_size; // number of bytes in a page
+! int mf_dirty; // TRUE if there are dirty blocks
+ #ifdef FEAT_CRYPT
+! buf_T *mf_buffer; // buffer this memfile is for
+! char_u mf_seed[MF_SEED_LEN]; // seed for encryption
+
+! // Values for key, method and seed used for reading data blocks when
+! // updating for a newly set key or method. Only when mf_old_key != NULL.
+ char_u *mf_old_key;
+ int mf_old_cm;
+ char_u mf_old_seed[MF_SEED_LEN];
+*** ../vim-8.1.1412/src/testdir/test_startup.vim 2019-05-20 22:12:30.724442773 +0200
+--- src/testdir/test_startup.vim 2019-05-27 23:34:05.857353849 +0200
+***************
+*** 288,311 ****
+
+ " Test with default argument '-q'.
+ call assert_equal('errors.err', &errorfile)
+! call writefile(["../memfile.c:1482:5: error: expected ';' before '}' token"], 'errors.err')
+ if RunVim([], after, '-q')
+ let lines = readfile('Xtestout')
+ call assert_equal(['errors.err',
+! \ '[0, 1482, 5, 0]',
+! \ source_file . "|1482 col 5| error: expected ';' before '}' token"],
+ \ lines)
+ endif
+ call delete('Xtestout')
+ call delete('errors.err')
+
+ " Test with explicit argument '-q Xerrors' (with space).
+! call writefile(["../memfile.c:1482:5: error: expected ';' before '}' token"], 'Xerrors')
+ if RunVim([], after, '-q Xerrors')
+ let lines = readfile('Xtestout')
+ call assert_equal(['Xerrors',
+! \ '[0, 1482, 5, 0]',
+! \ source_file . "|1482 col 5| error: expected ';' before '}' token"],
+ \ lines)
+ endif
+ call delete('Xtestout')
+--- 288,311 ----
+
+ " Test with default argument '-q'.
+ call assert_equal('errors.err', &errorfile)
+! call writefile(["../memfile.c:208:5: error: expected ';' before '}' token"], 'errors.err')
+ if RunVim([], after, '-q')
+ let lines = readfile('Xtestout')
+ call assert_equal(['errors.err',
+! \ '[0, 208, 5, 0]',
+! \ source_file . "|208 col 5| error: expected ';' before '}' token"],
+ \ lines)
+ endif
+ call delete('Xtestout')
+ call delete('errors.err')
+
+ " Test with explicit argument '-q Xerrors' (with space).
+! call writefile(["../memfile.c:208:5: error: expected ';' before '}' token"], 'Xerrors')
+ if RunVim([], after, '-q Xerrors')
+ let lines = readfile('Xtestout')
+ call assert_equal(['Xerrors',
+! \ '[0, 208, 5, 0]',
+! \ source_file . "|208 col 5| error: expected ';' before '}' token"],
+ \ lines)
+ endif
+ call delete('Xtestout')
+***************
+*** 314,321 ****
+ if RunVim([], after, '-qXerrors')
+ let lines = readfile('Xtestout')
+ call assert_equal(['Xerrors',
+! \ '[0, 1482, 5, 0]',
+! \ source_file . "|1482 col 5| error: expected ';' before '}' token"],
+ \ lines)
+ endif
+
+--- 314,321 ----
+ if RunVim([], after, '-qXerrors')
+ let lines = readfile('Xtestout')
+ call assert_equal(['Xerrors',
+! \ '[0, 208, 5, 0]',
+! \ source_file . "|208 col 5| error: expected ';' before '}' token"],
+ \ lines)
+ endif
+
+*** ../vim-8.1.1412/src/version.c 2019-05-27 22:21:41.309951907 +0200
+--- src/version.c 2019-05-27 23:15:38.563021697 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1413,
+ /**/
+
+--
+Portable Computer: A device invented to force businessmen
+to work at home, on vacation, and on business trips.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1414 b/data/vim/patches/8.1.1414
new file mode 100644
index 000000000..b1bc42493
--- /dev/null
+++ b/data/vim/patches/8.1.1414
@@ -0,0 +1,5984 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1414
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1414
+Problem: Alloc() returning "char_u *" causes a lot of type casts.
+Solution: Have it return "void *". (Mike Williams) Define ALLOC_ONE() to
+ check the simple allocations.
+Files: src/autocmd.c, src/blob.c, src/blowfish.c, src/buffer.c,
+ src/change.c, src/channel.c, src/crypt.c, src/crypt_zip.c,
+ src/dict.c, src/diff.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/findfile.c, src/getchar.c, src/gui_gtk.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/hardcopy.c,
+ src/hashtab.c, src/if_cscope.c, src/if_mzsch.c, src/if_perlsfio.c,
+ src/if_py_both.h, src/if_python3.c, src/if_xcmdsrv.c,
+ src/insexpand.c, src/list.c, src/mark.c, src/mbyte.c,
+ src/memfile.c, src/memfile_test.c, src/memline.c, src/message.c,
+ src/misc2.c, src/netbeans.c, src/normal.c, src/ops.c,
+ src/option.c, src/os_amiga.c, src/os_mac_conv.c, src/os_mswin.c,
+ src/os_unix.c, src/os_vms.c, src/os_win32.c, src/popupmnu.c,
+ src/proto/misc2.pro, src/quickfix.c, src/regexp.c,
+ src/regexp_nfa.c, src/screen.c, src/search.c, src/sign.c,
+ src/spell.c, src/spellfile.c, src/syntax.c, src/tag.c, src/term.c,
+ src/terminal.c, src/textprop.c, src/ui.c, src/undo.c,
+ src/userfunc.c, src/version.c, src/winclip.c, src/window.c,
+ src/vim.h, src/testdir/test_cscope.vim
+
+
+*** ../vim-8.1.1413/src/autocmd.c 2019-05-25 19:51:03.772408479 +0200
+--- src/autocmd.c 2019-05-28 20:21:48.986994247 +0200
+***************
+*** 1193,1199 ****
+ return FAIL;
+ }
+
+! ap = (AutoPat *)alloc(sizeof(AutoPat));
+ if (ap == NULL)
+ return FAIL;
+ ap->pat = vim_strnsave(pat, patlen);
+--- 1193,1199 ----
+ return FAIL;
+ }
+
+! ap = ALLOC_ONE(AutoPat);
+ if (ap == NULL)
+ return FAIL;
+ ap->pat = vim_strnsave(pat, patlen);
+***************
+*** 1242,1248 ****
+ prev_ac = &(ap->cmds);
+ while ((ac = *prev_ac) != NULL)
+ prev_ac = &ac->next;
+! ac = (AutoCmd *)alloc(sizeof(AutoCmd));
+ if (ac == NULL)
+ return FAIL;
+ ac->cmd = vim_strsave(cmd);
+--- 1242,1248 ----
+ prev_ac = &(ap->cmds);
+ while ((ac = *prev_ac) != NULL)
+ prev_ac = &ac->next;
+! ac = ALLOC_ONE(AutoCmd);
+ if (ac == NULL)
+ return FAIL;
+ ac->cmd = vim_strsave(cmd);
+*** ../vim-8.1.1413/src/blob.c 2019-03-19 23:03:24.199294996 +0100
+--- src/blob.c 2019-05-28 20:25:38.305454964 +0200
+***************
+*** 22,28 ****
+ blob_T *
+ blob_alloc(void)
+ {
+! blob_T *blob = (blob_T *)alloc_clear(sizeof(blob_T));
+
+ if (blob != NULL)
+ ga_init2(&blob->bv_ga, 1, 100);
+--- 22,28 ----
+ blob_T *
+ blob_alloc(void)
+ {
+! blob_T *blob = ALLOC_CLEAR_ONE(blob_T);
+
+ if (blob != NULL)
+ ga_init2(&blob->bv_ga, 1, 100);
+*** ../vim-8.1.1413/src/blowfish.c 2019-04-27 22:06:33.348200718 +0200
+--- src/blowfish.c 2019-05-28 20:25:42.853425601 +0200
+***************
+*** 645,651 ****
+ char_u* seed,
+ int seed_len)
+ {
+! bf_state_T *bfs = (bf_state_T *)alloc_clear(sizeof(bf_state_T));
+
+ if (bfs == NULL)
+ return FAIL;
+--- 645,651 ----
+ char_u* seed,
+ int seed_len)
+ {
+! bf_state_T *bfs = ALLOC_CLEAR_ONE(bf_state_T);
+
+ if (bfs == NULL)
+ return FAIL;
+*** ../vim-8.1.1413/src/buffer.c 2019-05-25 19:51:03.772408479 +0200
+--- src/buffer.c 2019-05-28 20:57:42.675360224 +0200
+***************
+*** 1958,1964 ****
+ }
+ if (buf != curbuf || curbuf == NULL)
+ {
+! buf = (buf_T *)alloc_clear(sizeof(buf_T));
+ if (buf == NULL)
+ {
+ vim_free(ffname);
+--- 1958,1964 ----
+ }
+ if (buf != curbuf || curbuf == NULL)
+ {
+! buf = ALLOC_CLEAR_ONE(buf_T);
+ if (buf == NULL)
+ {
+ vim_free(ffname);
+***************
+*** 1985,1991 ****
+ }
+
+ clear_wininfo(buf);
+! buf->b_wininfo = (wininfo_T *)alloc_clear(sizeof(wininfo_T));
+
+ if ((ffname != NULL && (buf->b_ffname == NULL || buf->b_sfname == NULL))
+ || buf->b_wininfo == NULL)
+--- 1985,1991 ----
+ }
+
+ clear_wininfo(buf);
+! buf->b_wininfo = ALLOC_CLEAR_ONE(wininfo_T);
+
+ if ((ffname != NULL && (buf->b_ffname == NULL || buf->b_sfname == NULL))
+ || buf->b_wininfo == NULL)
+***************
+*** 2634,2640 ****
+ break;
+ if (round == 1)
+ {
+! *file = (char_u **)alloc(count * sizeof(char_u *));
+ if (*file == NULL)
+ {
+ vim_regfree(regmatch.regprog);
+--- 2634,2640 ----
+ break;
+ if (round == 1)
+ {
+! *file = ALLOC_MULT(char_u *, count);
+ if (*file == NULL)
+ {
+ vim_regfree(regmatch.regprog);
+***************
+*** 2771,2777 ****
+ if (wip == NULL)
+ {
+ /* allocate a new entry */
+! wip = (wininfo_T *)alloc_clear(sizeof(wininfo_T));
+ if (wip == NULL)
+ return;
+ wip->wi_win = win;
+--- 2771,2777 ----
+ if (wip == NULL)
+ {
+ /* allocate a new entry */
+! wip = ALLOC_CLEAR_ONE(wininfo_T);
+ if (wip == NULL)
+ return;
+ wip->wi_win = win;
+***************
+*** 3430,3436 ****
+ char *buffer;
+ size_t len;
+
+! buffer = (char *)alloc(IOSIZE);
+ if (buffer == NULL)
+ return;
+
+--- 3430,3436 ----
+ char *buffer;
+ size_t len;
+
+! buffer = alloc(IOSIZE);
+ if (buffer == NULL)
+ return;
+
+*** ../vim-8.1.1413/src/change.c 2019-05-24 21:39:23.893950022 +0200
+--- src/change.c 2019-05-28 20:25:58.745323280 +0200
+***************
+*** 286,292 ****
+ return;
+ }
+
+! lnr = (listener_T *)alloc_clear(sizeof(listener_T));
+ if (lnr == NULL)
+ {
+ free_callback(callback, partial);
+--- 286,292 ----
+ return;
+ }
+
+! lnr = ALLOC_CLEAR_ONE(listener_T);
+ if (lnr == NULL)
+ {
+ free_callback(callback, partial);
+*** ../vim-8.1.1413/src/channel.c 2019-05-25 20:21:24.669951062 +0200
+--- src/channel.c 2019-05-28 20:59:49.218995026 +0200
+***************
+*** 294,300 ****
+ add_channel(void)
+ {
+ ch_part_T part;
+! channel_T *channel = (channel_T *)alloc_clear(sizeof(channel_T));
+
+ if (channel == NULL)
+ return NULL;
+--- 294,300 ----
+ add_channel(void)
+ {
+ ch_part_T part;
+! channel_T *channel = ALLOC_CLEAR_ONE(channel_T);
+
+ if (channel == NULL)
+ return NULL;
+***************
+*** 1354,1360 ****
+ int id)
+ {
+ cbq_T *head = &channel->ch_part[part].ch_cb_head;
+! cbq_T *item = (cbq_T *)alloc(sizeof(cbq_T));
+
+ if (item != NULL)
+ {
+--- 1354,1360 ----
+ int id)
+ {
+ cbq_T *head = &channel->ch_part[part].ch_cb_head;
+! cbq_T *item = ALLOC_ONE(cbq_T);
+
+ if (item != NULL)
+ {
+***************
+*** 1875,1881 ****
+ char_u *p;
+ int i;
+
+! node = (readq_T *)alloc(sizeof(readq_T));
+ if (node == NULL)
+ return FAIL; /* out of memory */
+ /* A NUL is added at the end, because netbeans code expects that.
+--- 1875,1881 ----
+ char_u *p;
+ int i;
+
+! node = ALLOC_ONE(readq_T);
+ if (node == NULL)
+ return FAIL; /* out of memory */
+ /* A NUL is added at the end, because netbeans code expects that.
+***************
+*** 2024,2030 ****
+ }
+ else
+ {
+! item = (jsonq_T *)alloc(sizeof(jsonq_T));
+ if (item == NULL)
+ clear_tv(&listtv);
+ else
+--- 2024,2030 ----
+ }
+ else
+ {
+! item = ALLOC_ONE(jsonq_T);
+ if (item == NULL)
+ clear_tv(&listtv);
+ else
+***************
+*** 2223,2229 ****
+ /* append after the last item that was pushed back */
+ item = item->jq_next;
+
+! newitem = (jsonq_T *)alloc(sizeof(jsonq_T));
+ if (newitem == NULL)
+ clear_tv(rettv);
+ else
+--- 2223,2229 ----
+ /* append after the last item that was pushed back */
+ item = item->jq_next;
+
+! newitem = ALLOC_ONE(jsonq_T);
+ if (newitem == NULL)
+ clear_tv(rettv);
+ else
+***************
+*** 3921,3927 ****
+ }
+ else
+ {
+! writeq_T *last = (writeq_T *)alloc(sizeof(writeq_T));
+
+ if (last != NULL)
+ {
+--- 3921,3927 ----
+ }
+ else
+ {
+! writeq_T *last = ALLOC_ONE(writeq_T);
+
+ if (last != NULL)
+ {
+***************
+*** 5593,5599 ****
+ {
+ job_T *job;
+
+! job = (job_T *)alloc_clear(sizeof(job_T));
+ if (job != NULL)
+ {
+ job->jv_refcount = 1;
+--- 5593,5599 ----
+ {
+ job_T *job;
+
+! job = ALLOC_CLEAR_ONE(job_T);
+ if (job != NULL)
+ {
+ job->jv_refcount = 1;
+***************
+*** 5822,5828 ****
+ /* Make a copy of argv_arg for job->jv_argv. */
+ for (i = 0; argv_arg[i] != NULL; i++)
+ argc++;
+! argv = (char **)alloc(sizeof(char *) * (argc + 1));
+ if (argv == NULL)
+ goto theend;
+ for (i = 0; i < argc; i++)
+--- 5822,5828 ----
+ /* Make a copy of argv_arg for job->jv_argv. */
+ for (i = 0; argv_arg[i] != NULL; i++)
+ argc++;
+! argv = ALLOC_MULT(char *, argc + 1);
+ if (argv == NULL)
+ goto theend;
+ for (i = 0; i < argc; i++)
+*** ../vim-8.1.1413/src/crypt.c 2019-05-25 20:21:24.669951062 +0200
+--- src/crypt.c 2019-05-28 20:22:10.606843504 +0200
+***************
+*** 254,260 ****
+ char_u *seed,
+ int seed_len)
+ {
+! cryptstate_T *state = (cryptstate_T *)alloc(sizeof(cryptstate_T));
+
+ if (state == NULL)
+ return state;
+--- 254,260 ----
+ char_u *seed,
+ int seed_len)
+ {
+! cryptstate_T *state = ALLOC_ONE(cryptstate_T);
+
+ if (state == NULL)
+ return state;
+*** ../vim-8.1.1413/src/crypt_zip.c 2019-04-27 22:06:33.348200718 +0200
+--- src/crypt_zip.c 2019-05-28 20:22:16.514802540 +0200
+***************
+*** 90,96 ****
+ char_u *p;
+ zip_state_T *zs;
+
+! zs = (zip_state_T *)alloc(sizeof(zip_state_T));
+ if (zs == NULL)
+ return FAIL;
+ state->method_state = zs;
+--- 90,96 ----
+ char_u *p;
+ zip_state_T *zs;
+
+! zs = ALLOC_ONE(zip_state_T);
+ if (zs == NULL)
+ return FAIL;
+ state->method_state = zs;
+*** ../vim-8.1.1413/src/dict.c 2019-05-25 20:21:24.669951062 +0200
+--- src/dict.c 2019-05-28 20:22:27.666725503 +0200
+***************
+*** 28,34 ****
+ {
+ dict_T *d;
+
+! d = (dict_T *)alloc(sizeof(dict_T));
+ if (d != NULL)
+ {
+ /* Add the dict to the list of dicts for garbage collection. */
+--- 28,34 ----
+ {
+ dict_T *d;
+
+! d = ALLOC_ONE(dict_T);
+ if (d != NULL)
+ {
+ /* Add the dict to the list of dicts for garbage collection. */
+***************
+*** 210,216 ****
+ {
+ dictitem_T *di;
+
+! di = (dictitem_T *)alloc(sizeof(dictitem_T) + STRLEN(key));
+ if (di != NULL)
+ {
+ STRCPY(di->di_key, key);
+--- 210,216 ----
+ {
+ dictitem_T *di;
+
+! di = alloc(sizeof(dictitem_T) + STRLEN(key));
+ if (di != NULL)
+ {
+ STRCPY(di->di_key, key);
+***************
+*** 228,234 ****
+ {
+ dictitem_T *di;
+
+! di = (dictitem_T *)alloc(sizeof(dictitem_T) + STRLEN(org->di_key));
+ if (di != NULL)
+ {
+ STRCPY(di->di_key, org->di_key);
+--- 228,234 ----
+ {
+ dictitem_T *di;
+
+! di = alloc(sizeof(dictitem_T) + STRLEN(org->di_key));
+ if (di != NULL)
+ {
+ STRCPY(di->di_key, org->di_key);
+*** ../vim-8.1.1413/src/diff.c 2019-05-26 21:03:19.940073927 +0200
+--- src/diff.c 2019-05-28 20:22:34.462678728 +0200
+***************
+*** 537,543 ****
+ {
+ diff_T *dnew;
+
+! dnew = (diff_T *)alloc(sizeof(diff_T));
+ if (dnew != NULL)
+ {
+ dnew->df_next = dp;
+--- 537,543 ----
+ {
+ diff_T *dnew;
+
+! dnew = ALLOC_ONE(diff_T);
+ if (dnew != NULL)
+ {
+ dnew->df_next = dp;
+*** ../vim-8.1.1413/src/eval.c 2019-05-26 18:48:09.402542633 +0200
+--- src/eval.c 2019-05-28 20:26:19.661189306 +0200
+***************
+*** 491,497 ****
+ if (redir_varname == NULL)
+ return FAIL;
+
+! redir_lval = (lval_T *)alloc_clear(sizeof(lval_T));
+ if (redir_lval == NULL)
+ {
+ var_redir_stop();
+--- 491,497 ----
+ if (redir_varname == NULL)
+ return FAIL;
+
+! redir_lval = ALLOC_CLEAR_ONE(lval_T);
+ if (redir_lval == NULL)
+ {
+ var_redir_stop();
+***************
+*** 1063,1069 ****
+ {
+ typval_T *tv;
+
+! tv = (typval_T *)alloc(sizeof(typval_T));
+ if (tv != NULL && eval0(arg, tv, nextcmd, TRUE) == FAIL)
+ VIM_CLEAR(tv);
+
+--- 1063,1069 ----
+ {
+ typval_T *tv;
+
+! tv = ALLOC_ONE(typval_T);
+ if (tv != NULL && eval0(arg, tv, nextcmd, TRUE) == FAIL)
+ VIM_CLEAR(tv);
+
+***************
+*** 2769,2775 ****
+
+ *errp = TRUE; /* default: there is an error */
+
+! fi = (forinfo_T *)alloc_clear(sizeof(forinfo_T));
+ if (fi == NULL)
+ return NULL;
+
+--- 2769,2775 ----
+
+ *errp = TRUE; /* default: there is an error */
+
+! fi = ALLOC_CLEAR_ONE(forinfo_T);
+ if (fi == NULL)
+ return NULL;
+
+***************
+*** 7297,7303 ****
+ typval_T *
+ alloc_tv(void)
+ {
+! return (typval_T *)alloc_clear(sizeof(typval_T));
+ }
+
+ /*
+--- 7297,7303 ----
+ typval_T *
+ alloc_tv(void)
+ {
+! return ALLOC_CLEAR_ONE(typval_T);
+ }
+
+ /*
+***************
+*** 7883,7889 ****
+ while (ga_scripts.ga_len < id)
+ {
+ sv = SCRIPT_SV(ga_scripts.ga_len + 1) =
+! (scriptvar_T *)alloc_clear(sizeof(scriptvar_T));
+ init_var_dict(&sv->sv_dict, &sv->sv_var, VAR_SCOPE);
+ ++ga_scripts.ga_len;
+ }
+--- 7883,7889 ----
+ while (ga_scripts.ga_len < id)
+ {
+ sv = SCRIPT_SV(ga_scripts.ga_len + 1) =
+! ALLOC_CLEAR_ONE(scriptvar_T);
+ init_var_dict(&sv->sv_dict, &sv->sv_var, VAR_SCOPE);
+ ++ga_scripts.ga_len;
+ }
+***************
+*** 8139,8145 ****
+ if (!valid_varname(varname))
+ return;
+
+! v = (dictitem_T *)alloc(sizeof(dictitem_T) + STRLEN(varname));
+ if (v == NULL)
+ return;
+ STRCPY(v->di_key, varname);
+--- 8139,8145 ----
+ if (!valid_varname(varname))
+ return;
+
+! v = alloc(sizeof(dictitem_T) + STRLEN(varname));
+ if (v == NULL)
+ return;
+ STRCPY(v->di_key, varname);
+*** ../vim-8.1.1413/src/evalfunc.c 2019-05-27 21:53:53.986229323 +0200
+--- src/evalfunc.c 2019-05-28 22:07:06.292349825 +0200
+***************
+*** 4465,4471 ****
+ }
+ if (dict_idx > 0 || arg_idx > 0 || arg_pt != NULL || is_funcref)
+ {
+! partial_T *pt = (partial_T *)alloc_clear(sizeof(partial_T));
+
+ /* result is a VAR_PARTIAL */
+ if (pt == NULL)
+--- 4465,4471 ----
+ }
+ if (dict_idx > 0 || arg_idx > 0 || arg_pt != NULL || is_funcref)
+ {
+! partial_T *pt = ALLOC_CLEAR_ONE(partial_T);
+
+ /* result is a VAR_PARTIAL */
+ if (pt == NULL)
+***************
+*** 4484,4491 ****
+ if (list != NULL)
+ lv_len = list->lv_len;
+ pt->pt_argc = arg_len + lv_len;
+! pt->pt_argv = (typval_T *)alloc(
+! sizeof(typval_T) * pt->pt_argc);
+ if (pt->pt_argv == NULL)
+ {
+ vim_free(pt);
+--- 4484,4490 ----
+ if (list != NULL)
+ lv_len = list->lv_len;
+ pt->pt_argc = arg_len + lv_len;
+! pt->pt_argv = ALLOC_MULT(typval_T, pt->pt_argc);
+ if (pt->pt_argv == NULL)
+ {
+ vim_free(pt);
+***************
+*** 9615,9622 ****
+ long growmin = (long)((p - start) * 2 + prevlen);
+ prevsize = grow50pc > growmin ? grow50pc : growmin;
+ }
+! newprev = prev == NULL ? alloc(prevsize)
+! : vim_realloc(prev, prevsize);
+ if (newprev == NULL)
+ {
+ do_outofmem_msg((long_u)prevsize);
+--- 9614,9620 ----
+ long growmin = (long)((p - start) * 2 + prevlen);
+ prevsize = grow50pc > growmin ? grow50pc : growmin;
+ }
+! newprev = vim_realloc(prev, prevsize);
+ if (newprev == NULL)
+ {
+ do_outofmem_msg((long_u)prevsize);
+***************
+*** 11788,11794 ****
+
+ /* First half: use for pointers to result lines; second half: use for
+ * pointers to allocated copies. */
+! lstval = (char_u **)alloc(sizeof(char_u *) * ((len + 1) * 2));
+ if (lstval == NULL)
+ return;
+ curval = lstval;
+--- 11786,11792 ----
+
+ /* First half: use for pointers to result lines; second half: use for
+ * pointers to allocated copies. */
+! lstval = ALLOC_MULT(char_u *, (len + 1) * 2);
+ if (lstval == NULL)
+ return;
+ curval = lstval;
+***************
+*** 12674,12680 ****
+ }
+
+ /* Make an array with each entry pointing to an item in the List. */
+! ptrs = (sortItem_T *)alloc(len * sizeof(sortItem_T));
+ if (ptrs == NULL)
+ goto theend;
+
+--- 12672,12678 ----
+ }
+
+ /* Make an array with each entry pointing to an item in the List. */
+! ptrs = ALLOC_MULT(sortItem_T, len);
+ if (ptrs == NULL)
+ goto theend;
+
+*** ../vim-8.1.1413/src/ex_cmds.c 2019-05-25 20:21:24.673951038 +0200
+--- src/ex_cmds.c 2019-05-28 21:03:41.510193976 +0200
+***************
+*** 397,403 ****
+ sortbuf1 = NULL;
+ sortbuf2 = NULL;
+ regmatch.regprog = NULL;
+! nrs = (sorti_T *)alloc(count * sizeof(sorti_T));
+ if (nrs == NULL)
+ goto sortend;
+
+--- 397,403 ----
+ sortbuf1 = NULL;
+ sortbuf2 = NULL;
+ regmatch.regprog = NULL;
+! nrs = ALLOC_MULT(sorti_T, count);
+ if (nrs == NULL)
+ goto sortend;
+
+*** ../vim-8.1.1413/src/ex_cmds2.c 2019-05-25 20:21:24.673951038 +0200
+--- src/ex_cmds2.c 2019-05-28 21:04:40.233971110 +0200
+***************
+*** 293,299 ****
+ timer_T *
+ create_timer(long msec, int repeat)
+ {
+! timer_T *timer = (timer_T *)alloc_clear(sizeof(timer_T));
+ long prev_id = last_timer_id;
+
+ if (timer == NULL)
+--- 293,299 ----
+ timer_T *
+ create_timer(long msec, int repeat)
+ {
+! timer_T *timer = ALLOC_CLEAR_ONE(timer_T);
+ long prev_id = last_timer_id;
+
+ if (timer == NULL)
+***************
+*** 444,450 ****
+ bevalexpr_due_set = FALSE;
+ if (balloonEval == NULL)
+ {
+! balloonEval = (BalloonEval *)alloc_clear(sizeof(BalloonEval));
+ balloonEvalForTerm = TRUE;
+ }
+ if (balloonEval != NULL)
+--- 444,450 ----
+ bevalexpr_due_set = FALSE;
+ if (balloonEval == NULL)
+ {
+! balloonEval = ALLOC_CLEAR_ONE(BalloonEval);
+ balloonEvalForTerm = TRUE;
+ }
+ if (balloonEval != NULL)
+***************
+*** 1312,1318 ****
+ if (bufcount == 0)
+ return FALSE;
+
+! bufnrs = (int *)alloc(sizeof(int) * bufcount);
+ if (bufnrs == NULL)
+ return FALSE;
+
+--- 1312,1318 ----
+ if (bufcount == 0)
+ return FALSE;
+
+! bufnrs = ALLOC_MULT(int, bufcount);
+ if (bufnrs == NULL)
+ return FALSE;
+
+***************
+*** 1783,1789 ****
+ */
+ if (ARGCOUNT > 0)
+ {
+! char_u **items = (char_u **)alloc(sizeof(char_u *) * ARGCOUNT);
+
+ if (items != NULL)
+ {
+--- 1783,1789 ----
+ */
+ if (ARGCOUNT > 0)
+ {
+! char_u **items = ALLOC_MULT(char_u *, ARGCOUNT);
+
+ if (items != NULL)
+ {
+***************
+*** 2994,3000 ****
+ continue;
+
+ len = (int)STRLEN(plugpat) + (int)STRLEN(eap->arg) + 5;
+! pat = (char *)alloc(len);
+ if (pat == NULL)
+ return;
+ vim_snprintf(pat, len, plugpat, round == 1 ? "start" : "opt", eap->arg);
+--- 2994,3000 ----
+ continue;
+
+ len = (int)STRLEN(plugpat) + (int)STRLEN(eap->arg) + 5;
+! pat = alloc(len);
+ if (pat == NULL)
+ return;
+ vim_snprintf(pat, len, plugpat, round == 1 ? "start" : "opt", eap->arg);
+*** ../vim-8.1.1413/src/ex_docmd.c 2019-05-25 20:21:24.673951038 +0200
+--- src/ex_docmd.c 2019-05-28 21:05:33.701762543 +0200
+***************
+*** 6550,6556 ****
+ void
+ alist_new(void)
+ {
+! curwin->w_alist = (alist_T *)alloc(sizeof(alist_T));
+ if (curwin->w_alist == NULL)
+ {
+ curwin->w_alist = &global_alist;
+--- 6550,6556 ----
+ void
+ alist_new(void)
+ {
+! curwin->w_alist = ALLOC_ONE(alist_T);
+ if (curwin->w_alist == NULL)
+ {
+ curwin->w_alist = &global_alist;
+***************
+*** 6584,6590 ****
+ * expansion. Also, the vimrc file isn't read yet, thus the user
+ * can't set the options. */
+ p_su = empty_option;
+! old_arg_files = (char_u **)alloc(sizeof(char_u *) * GARGCOUNT);
+ if (old_arg_files != NULL)
+ {
+ for (i = 0; i < GARGCOUNT; ++i)
+--- 6584,6590 ----
+ * expansion. Also, the vimrc file isn't read yet, thus the user
+ * can't set the options. */
+ p_su = empty_option;
+! old_arg_files = ALLOC_MULT(char_u *, GARGCOUNT);
+ if (old_arg_files != NULL)
+ {
+ for (i = 0; i < GARGCOUNT; ++i)
+*** ../vim-8.1.1413/src/ex_eval.c 2019-05-24 18:48:36.758128504 +0200
+--- src/ex_eval.c 2019-05-28 21:06:39.401499652 +0200
+***************
+*** 251,257 ****
+ while (*plist != NULL)
+ plist = &(*plist)->next;
+
+! elem = (struct msglist *)alloc(sizeof(struct msglist));
+ if (elem == NULL)
+ {
+ suppress_errthrow = TRUE;
+--- 251,257 ----
+ while (*plist != NULL)
+ plist = &(*plist)->next;
+
+! elem = ALLOC_ONE(struct msglist);
+ if (elem == NULL)
+ {
+ suppress_errthrow = TRUE;
+***************
+*** 519,525 ****
+ }
+ }
+
+! excp = (except_T *)alloc(sizeof(except_T));
+ if (excp == NULL)
+ goto nomem;
+
+--- 519,525 ----
+ }
+ }
+
+! excp = ALLOC_ONE(except_T);
+ if (excp == NULL)
+ goto nomem;
+
+***************
+*** 1441,1447 ****
+ {
+ eslist_T *elem;
+
+! elem = (eslist_T *)alloc(sizeof(struct eslist_elem));
+ if (elem == NULL)
+ emsg(_(e_outofmem));
+ else
+--- 1441,1447 ----
+ {
+ eslist_T *elem;
+
+! elem = ALLOC_ONE(struct eslist_elem);
+ if (elem == NULL)
+ emsg(_(e_outofmem));
+ else
+*** ../vim-8.1.1413/src/ex_getln.c 2019-05-25 20:21:24.673951038 +0200
+--- src/ex_getln.c 2019-05-28 21:09:26.244804696 +0200
+***************
+*** 5294,5300 ****
+ if (count == 0)
+ return OK;
+ *num_file = count;
+! *file = (char_u **)alloc(count * sizeof(char_u *));
+ if (*file == NULL)
+ {
+ *file = (char_u **)"";
+--- 5294,5300 ----
+ if (count == 0)
+ return OK;
+ *num_file = count;
+! *file = ALLOC_MULT(char_u *, count);
+ if (*file == NULL)
+ {
+ *file = (char_u **)"";
+***************
+*** 5914,5920 ****
+ {
+ if (newlen)
+ {
+! temp = (histentry_T *)alloc(newlen * sizeof(histentry_T));
+ if (temp == NULL) /* out of memory! */
+ {
+ if (type == 0) /* first one: just keep the old length */
+--- 5914,5920 ----
+ {
+ if (newlen)
+ {
+! temp = ALLOC_MULT(histentry_T, newlen);
+ if (temp == NULL) /* out of memory! */
+ {
+ if (type == 0) /* first one: just keep the old length */
+***************
+*** 6653,6660 ****
+ if (len <= 0)
+ viminfo_history[type] = NULL;
+ else
+! viminfo_history[type] = (histentry_T *)lalloc(
+! len * sizeof(histentry_T), FALSE);
+ if (viminfo_history[type] == NULL)
+ len = 0;
+ viminfo_hislen[type] = len;
+--- 6653,6659 ----
+ if (len <= 0)
+ viminfo_history[type] = NULL;
+ else
+! viminfo_history[type] = LALLOC_MULT(histentry_T, len);
+ if (viminfo_history[type] == NULL)
+ len = 0;
+ viminfo_hislen[type] = len;
+***************
+*** 6873,6880 ****
+
+ /* Make one long list with all entries. */
+ max_len = hislen + viminfo_hisidx[type];
+! tot_hist = (histentry_T **)alloc(max_len * (int)sizeof(histentry_T *));
+! new_hist = (histentry_T *)alloc(hislen * (int)sizeof(histentry_T));
+ if (tot_hist == NULL || new_hist == NULL)
+ {
+ vim_free(tot_hist);
+--- 6872,6879 ----
+
+ /* Make one long list with all entries. */
+ max_len = hislen + viminfo_hisidx[type];
+! tot_hist = ALLOC_MULT(histentry_T *, max_len);
+! new_hist = ALLOC_MULT(histentry_T, hislen );
+ if (tot_hist == NULL || new_hist == NULL)
+ {
+ vim_free(tot_hist);
+*** ../vim-8.1.1413/src/fileio.c 2019-05-25 20:21:24.673951038 +0200
+--- src/fileio.c 2019-05-28 20:12:03.766451351 +0200
+***************
+*** 6533,6539 ****
+ return -1;
+ }
+
+! buffer = (char *)alloc(BUFSIZE);
+ if (buffer == NULL)
+ {
+ close(fd_out);
+--- 6533,6539 ----
+ return -1;
+ }
+
+! buffer = alloc(BUFSIZE);
+ if (buffer == NULL)
+ {
+ close(fd_out);
+***************
+*** 6890,6897 ****
+ {
+ if (!helpmesg)
+ mesg2 = "";
+! tbuf = (char *)alloc(STRLEN(path) + STRLEN(mesg)
+! + STRLEN(mesg2) + 2);
+ sprintf(tbuf, mesg, path);
+ #ifdef FEAT_EVAL
+ /* Set warningmsg here, before the unimportant and output-specific
+--- 6890,6896 ----
+ {
+ if (!helpmesg)
+ mesg2 = "";
+! tbuf = alloc(STRLEN(path) + STRLEN(mesg) + STRLEN(mesg2) + 2);
+ sprintf(tbuf, mesg, path);
+ #ifdef FEAT_EVAL
+ /* Set warningmsg here, before the unimportant and output-specific
+*** ../vim-8.1.1413/src/findfile.c 2019-05-25 20:21:24.677951017 +0200
+--- src/findfile.c 2019-05-28 21:15:38.291158787 +0200
+***************
+*** 319,325 ****
+ search_ctx = search_ctx_arg;
+ else
+ {
+! search_ctx = (ff_search_ctx_T*)alloc(sizeof(ff_search_ctx_T));
+ if (search_ctx == NULL)
+ goto error_return;
+ vim_memset(search_ctx, 0, sizeof(ff_search_ctx_T));
+--- 319,325 ----
+ search_ctx = search_ctx_arg;
+ else
+ {
+! search_ctx = ALLOC_ONE(ff_search_ctx_T);
+ if (search_ctx == NULL)
+ goto error_return;
+ vim_memset(search_ctx, 0, sizeof(ff_search_ctx_T));
+***************
+*** 350,356 ****
+
+ if (ff_expand_buffer == NULL)
+ {
+! ff_expand_buffer = (char_u*)alloc(MAXPATHL);
+ if (ff_expand_buffer == NULL)
+ goto error_return;
+ }
+--- 350,356 ----
+
+ if (ff_expand_buffer == NULL)
+ {
+! ff_expand_buffer = alloc(MAXPATHL);
+ if (ff_expand_buffer == NULL)
+ goto error_return;
+ }
+***************
+*** 430,436 ****
+ walker++;
+
+ dircount = 1;
+! search_ctx->ffsc_stopdirs_v = (char_u **)alloc(sizeof(char_u *));
+
+ if (search_ctx->ffsc_stopdirs_v != NULL)
+ {
+--- 430,436 ----
+ walker++;
+
+ dircount = 1;
+! search_ctx->ffsc_stopdirs_v = ALLOC_ONE(char_u *);
+
+ if (search_ctx->ffsc_stopdirs_v != NULL)
+ {
+***************
+*** 925,931 ****
+ */
+ if (path_with_url(dirptrs[0]))
+ {
+! stackp->ffs_filearray = (char_u **)alloc(sizeof(char *));
+ if (stackp->ffs_filearray != NULL
+ && (stackp->ffs_filearray[0]
+ = vim_strsave(dirptrs[0])) != NULL)
+--- 925,931 ----
+ */
+ if (path_with_url(dirptrs[0]))
+ {
+! stackp->ffs_filearray = ALLOC_ONE(char_u *);
+ if (stackp->ffs_filearray != NULL
+ && (stackp->ffs_filearray[0]
+ = vim_strsave(dirptrs[0])) != NULL)
+***************
+*** 1283,1289 ****
+ /*
+ * if we reach this we didn't find a list and we have to allocate new list
+ */
+! retptr = (ff_visited_list_hdr_T*)alloc(sizeof(*retptr));
+ if (retptr == NULL)
+ return NULL;
+
+--- 1283,1289 ----
+ /*
+ * if we reach this we didn't find a list and we have to allocate new list
+ */
+! retptr = ALLOC_ONE(ff_visited_list_hdr_T);
+ if (retptr == NULL)
+ return NULL;
+
+***************
+*** 1411,1417 ****
+ /*
+ * New file/dir. Add it to the list of visited files/dirs.
+ */
+! vp = (ff_visited_T *)alloc(sizeof(ff_visited_T) + STRLEN(ff_expand_buffer));
+
+ if (vp != NULL)
+ {
+--- 1411,1417 ----
+ /*
+ * New file/dir. Add it to the list of visited files/dirs.
+ */
+! vp = alloc(sizeof(ff_visited_T) + STRLEN(ff_expand_buffer));
+
+ if (vp != NULL)
+ {
+***************
+*** 1459,1465 ****
+ {
+ ff_stack_T *new;
+
+! new = (ff_stack_T *)alloc(sizeof(ff_stack_T));
+ if (new == NULL)
+ return NULL;
+
+--- 1459,1465 ----
+ {
+ ff_stack_T *new;
+
+! new = ALLOC_ONE(ff_stack_T);
+ if (new == NULL)
+ return NULL;
+
+***************
+*** 2429,2435 ****
+ mch_dirname(curdir, MAXPATHL);
+ expand_path_option(curdir, &path_ga);
+
+! in_curdir = (char_u **)alloc_clear(gap->ga_len * sizeof(char_u *));
+ if (in_curdir == NULL)
+ goto theend;
+
+--- 2429,2435 ----
+ mch_dirname(curdir, MAXPATHL);
+ expand_path_option(curdir, &path_ga);
+
+! in_curdir = ALLOC_CLEAR_MULT(char_u *, gap->ga_len);
+ if (in_curdir == NULL)
+ goto theend;
+
+*** ../vim-8.1.1413/src/getchar.c 2019-05-24 19:38:59.100545522 +0200
+--- src/getchar.c 2019-05-28 21:14:06.095575993 +0200
+***************
+*** 258,264 ****
+ len = MINIMAL_SIZE;
+ else
+ len = slen;
+! p = (buffblock_T *)alloc(sizeof(buffblock_T) + len);
+ if (p == NULL)
+ return; /* no space, just forget it */
+ buf->bh_space = (int)(len - slen);
+--- 258,264 ----
+ len = MINIMAL_SIZE;
+ else
+ len = slen;
+! p = alloc(sizeof(buffblock_T) + len);
+ if (p == NULL)
+ return; /* no space, just forget it */
+ buf->bh_space = (int)(len - slen);
+***************
+*** 3730,3736 ****
+ /*
+ * Get here when adding a new entry to the maphash[] list or abbrlist.
+ */
+! mp = (mapblock_T *)alloc(sizeof(mapblock_T));
+ if (mp == NULL)
+ {
+ retval = 4; /* no mem */
+--- 3730,3736 ----
+ /*
+ * Get here when adding a new entry to the maphash[] list or abbrlist.
+ */
+! mp = ALLOC_ONE(mapblock_T);
+ if (mp == NULL)
+ {
+ retval = 4; /* no mem */
+***************
+*** 4374,4380 ****
+
+ if (round == 1)
+ {
+! *file = (char_u **)alloc(count * sizeof(char_u *));
+ if (*file == NULL)
+ return FAIL;
+ }
+--- 4374,4380 ----
+
+ if (round == 1)
+ {
+! *file = ALLOC_MULT(char_u *, count);
+ if (*file == NULL)
+ return FAIL;
+ }
+*** ../vim-8.1.1413/src/gui_gtk.c 2019-05-24 18:48:36.758128504 +0200
+--- src/gui_gtk.c 2019-05-28 21:14:46.895391980 +0200
+***************
+*** 1452,1458 ****
+ if (*p == DLG_BUTTON_SEP)
+ ++count;
+
+! array = (char **)alloc((count + 1) * sizeof(char *));
+ count = 0;
+
+ if (array != NULL)
+--- 1452,1458 ----
+ if (*p == DLG_BUTTON_SEP)
+ ++count;
+
+! array = ALLOC_MULT(char *, count + 1);
+ count = 0;
+
+ if (array != NULL)
+*** ../vim-8.1.1413/src/gui_gtk_x11.c 2019-05-24 18:48:36.762128482 +0200
+--- src/gui_gtk_x11.c 2019-05-28 21:39:21.064527997 +0200
+***************
+*** 429,435 ****
+ * into gui_argv. Freed later in gui_mch_init().
+ */
+ gui_argc = 0;
+! gui_argv = (char **)alloc((*argc + 1) * sizeof(char *));
+
+ g_return_if_fail(gui_argv != NULL);
+
+--- 429,435 ----
+ * into gui_argv. Freed later in gui_mch_init().
+ */
+ gui_argc = 0;
+! gui_argv = ALLOC_MULT(char *, *argc + 1);
+
+ g_return_if_fail(gui_argv != NULL);
+
+***************
+*** 2157,2166 ****
+ char_u *tmp = NULL;
+ char_u **array = NULL;
+
+! if (data != NULL && len > 0 && (tmp = (char_u *)alloc(len + 1)) != NULL)
+ {
+ n = count_and_decode_uri_list(tmp, data, len);
+! if (n > 0 && (array = (char_u **)alloc(n * sizeof(char_u *))) != NULL)
+ n = filter_uri_list(array, n, tmp);
+ }
+ vim_free(tmp);
+--- 2157,2166 ----
+ char_u *tmp = NULL;
+ char_u **array = NULL;
+
+! if (data != NULL && len > 0 && (tmp = alloc(len + 1)) != NULL)
+ {
+ n = count_and_decode_uri_list(tmp, data, len);
+! if (n > 0 && (array = ALLOC_MULT(char_u *, n)) != NULL)
+ n = filter_uri_list(array, n, tmp);
+ }
+ vim_free(tmp);
+***************
+*** 2512,2518 ****
+ if (i == count)
+ {
+ /* allocate an Atoms array which is one item longer */
+! new_atoms = (Atom *)alloc((count + 1) * sizeof(Atom));
+ if (new_atoms != NULL)
+ {
+ memcpy(new_atoms, existing_atoms, count * sizeof(Atom));
+--- 2512,2518 ----
+ if (i == count)
+ {
+ /* allocate an Atoms array which is one item longer */
+! new_atoms = ALLOC_MULT(Atom, count + 1);
+ if (new_atoms != NULL)
+ {
+ memcpy(new_atoms, existing_atoms, count * sizeof(Atom));
+*** ../vim-8.1.1413/src/gui_mac.c 2019-05-24 19:38:59.104545491 +0200
+--- src/gui_mac.c 2019-05-28 21:40:26.760217482 +0200
+***************
+*** 536,542 ****
+ return fnames;
+
+ /* Allocate the pointer list */
+! fnames = (char_u **) alloc(*numFiles * sizeof(char_u *));
+
+ /* Empty out the list */
+ for (fileCount = 0; fileCount < *numFiles; fileCount++)
+--- 536,542 ----
+ return fnames;
+
+ /* Allocate the pointer list */
+! fnames = ALLOC_MULT(char_u *, *numFiles);
+
+ /* Empty out the list */
+ for (fileCount = 0; fileCount < *numFiles; fileCount++)
+***************
+*** 2105,2111 ****
+ typeUnicodeText, NULL, 0, &actualSize, NULL))
+ return eventNotHandledErr;
+
+! text = (UniChar *)alloc(actualSize);
+ if (!text)
+ return eventNotHandledErr;
+
+--- 2105,2111 ----
+ typeUnicodeText, NULL, 0, &actualSize, NULL))
+ return eventNotHandledErr;
+
+! text = alloc(actualSize);
+ if (!text)
+ return eventNotHandledErr;
+
+***************
+*** 2975,2981 ****
+ count = countItem;
+ }
+
+! fnames = (char_u **)alloc(count * sizeof(char_u *));
+ if (fnames == NULL)
+ return dragNotAcceptedErr;
+
+--- 2975,2981 ----
+ count = countItem;
+ }
+
+! fnames = ALLOC_MULT(char_u *, count);
+ if (fnames == NULL)
+ return dragNotAcceptedErr;
+
+*** ../vim-8.1.1413/src/gui_motif.c 2019-05-24 18:48:36.762128482 +0200
+--- src/gui_motif.c 2019-05-28 21:40:53.168092569 +0200
+***************
+*** 2538,2544 ****
+ for (p = buts; *p; ++p)
+ if (*p == DLG_BUTTON_SEP)
+ ++butcount;
+! buttons = (Widget *)alloc(butcount * sizeof(Widget));
+ if (buttons == NULL)
+ {
+ vim_free(buts);
+--- 2538,2544 ----
+ for (p = buts; *p; ++p)
+ if (*p == DLG_BUTTON_SEP)
+ ++butcount;
+! buttons = ALLOC_MULT(Widget, butcount);
+ if (buttons == NULL)
+ {
+ vim_free(buts);
+*** ../vim-8.1.1413/src/gui_photon.c 2019-03-30 18:46:57.352077376 +0100
+--- src/gui_photon.c 2019-05-28 21:42:54.203519137 +0200
+***************
+*** 976,982 ****
+ {
+ char **new_titles = NULL;
+
+! new_titles = (char **) alloc((num_panels + 1) * sizeof(char **));
+ if (new_titles != NULL)
+ {
+ if (num_panels > 0)
+--- 976,982 ----
+ {
+ char **new_titles = NULL;
+
+! new_titles = ALLOC_MULT(char *, (num_panels + 1));
+ if (new_titles != NULL)
+ {
+ if (num_panels > 0)
+***************
+*** 1001,1007 ****
+ /* If there is only 1 panel, we just use the temporary place holder */
+ if (num_panels > 1)
+ {
+! new_titles = (char **) alloc((num_panels - 1) * sizeof(char **));
+ if (new_titles != NULL)
+ {
+ char **s = new_titles;
+--- 1001,1007 ----
+ /* If there is only 1 panel, we just use the temporary place holder */
+ if (num_panels > 1)
+ {
+! new_titles = ALLOC_MULT(char *, num_panels - 1);
+ if (new_titles != NULL)
+ {
+ char **s = new_titles;
+***************
+*** 1108,1114 ****
+ PhDim_t window_size = {100, 100}; /* Arbitrary values */
+ PhPoint_t pos = {0, 0};
+
+! gui.event_buffer = (PhEvent_t *) alloc(EVENT_BUFFER_SIZE);
+ if (gui.event_buffer == NULL)
+ return FAIL;
+
+--- 1108,1114 ----
+ PhDim_t window_size = {100, 100}; /* Arbitrary values */
+ PhPoint_t pos = {0, 0};
+
+! gui.event_buffer = alloc(EVENT_BUFFER_SIZE);
+ if (gui.event_buffer == NULL)
+ return FAIL;
+
+***************
+*** 1519,1525 ****
+ title = "Vim";
+
+ buttons_copy = alloc(len + 1);
+! button_array = (char_u **) alloc(button_count * sizeof(char_u *));
+ if (buttons_copy != NULL && button_array != NULL)
+ {
+ STRCPY(buttons_copy, buttons);
+--- 1519,1525 ----
+ title = "Vim";
+
+ buttons_copy = alloc(len + 1);
+! button_array = ALLOC_MULT(char_u *, button_count);
+ if (buttons_copy != NULL && button_array != NULL)
+ {
+ STRCPY(buttons_copy, buttons);
+*** ../vim-8.1.1413/src/gui_w32.c 2019-05-24 19:38:59.104545491 +0200
+--- src/gui_w32.c 2019-05-28 21:51:15.093135702 +0200
+***************
+*** 3120,3126 ****
+ charset_name = charset_id2name((int)lf.lfCharSet);
+ quality_name = quality_id2name((int)lf.lfQuality);
+
+! res = (char *)alloc(strlen(font_name) + 30
+ + (charset_name == NULL ? 0 : strlen(charset_name) + 2)
+ + (quality_name == NULL ? 0 : strlen(quality_name) + 2));
+ if (res != NULL)
+--- 3120,3126 ----
+ charset_name = charset_id2name((int)lf.lfCharSet);
+ quality_name = quality_id2name((int)lf.lfQuality);
+
+! res = alloc(strlen(font_name) + 30
+ + (charset_name == NULL ? 0 : strlen(charset_name) + 2)
+ + (quality_name == NULL ? 0 : strlen(quality_name) + 2));
+ if (res != NULL)
+***************
+*** 3639,3645 ****
+
+ reset_VIsual();
+
+! fnames = (char_u **)alloc(cFiles * sizeof(char_u *));
+
+ if (fnames != NULL)
+ for (i = 0; i < cFiles; ++i)
+--- 3639,3645 ----
+
+ reset_VIsual();
+
+! fnames = ALLOC_MULT(char_u *, cFiles);
+
+ if (fnames != NULL)
+ for (i = 0; i < cFiles; ++i)
+***************
+*** 4916,4922 ****
+ if (wsession == NULL)
+ goto error;
+ len = (int)wcslen(wsession) * 2 + 27 + 1;
+! cmd = (LPWSTR)alloc(len * (int)sizeof(WCHAR));
+ if (cmd == NULL)
+ {
+ vim_free(wsession);
+--- 4916,4922 ----
+ if (wsession == NULL)
+ goto error;
+ len = (int)wcslen(wsession) * 2 + 27 + 1;
+! cmd = ALLOC_MULT(WCHAR, len);
+ if (cmd == NULL)
+ {
+ vim_free(wsession);
+***************
+*** 4942,4948 ****
+
+ // Set up the new command line.
+ len = (int)wcslen(name) + (int)wcslen(cmd) + (int)wcslen(warg) + 4;
+! newcmd = (LPWSTR)alloc(len * (int)sizeof(WCHAR));
+ if (newcmd == NULL)
+ goto error;
+ _snwprintf(newcmd, len, L"\"%s\"%s %s", name, cmd, warg);
+--- 4942,4948 ----
+
+ // Set up the new command line.
+ len = (int)wcslen(name) + (int)wcslen(cmd) + (int)wcslen(warg) + 4;
+! newcmd = ALLOC_MULT(WCHAR, len);
+ if (newcmd == NULL)
+ goto error;
+ _snwprintf(newcmd, len, L"\"%s\"%s %s", name, cmd, warg);
+***************
+*** 5293,5303 ****
+
+ /* Initialise the struct */
+ s_findrep_struct.lStructSize = sizeof(s_findrep_struct);
+! s_findrep_struct.lpstrFindWhat =
+! (LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR));
+ s_findrep_struct.lpstrFindWhat[0] = NUL;
+! s_findrep_struct.lpstrReplaceWith =
+! (LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR));
+ s_findrep_struct.lpstrReplaceWith[0] = NUL;
+ s_findrep_struct.wFindWhatLen = MSWIN_FR_BUFSIZE;
+ s_findrep_struct.wReplaceWithLen = MSWIN_FR_BUFSIZE;
+--- 5293,5301 ----
+
+ /* Initialise the struct */
+ s_findrep_struct.lStructSize = sizeof(s_findrep_struct);
+! s_findrep_struct.lpstrFindWhat = ALLOC_MULT(WCHAR, MSWIN_FR_BUFSIZE);
+ s_findrep_struct.lpstrFindWhat[0] = NUL;
+! s_findrep_struct.lpstrReplaceWith = ALLOC_MULT(WCHAR, MSWIN_FR_BUFSIZE);
+ s_findrep_struct.lpstrReplaceWith[0] = NUL;
+ s_findrep_struct.wFindWhatLen = MSWIN_FR_BUFSIZE;
+ s_findrep_struct.wReplaceWithLen = MSWIN_FR_BUFSIZE;
+***************
+*** 5613,5619 ****
+ if (ret > 0)
+ {
+ /* Allocate the requested buffer plus space for the NUL character. */
+! wbuf = (LPWSTR)alloc(ret + sizeof(WCHAR));
+ if (wbuf != NULL)
+ {
+ pImmGetCompositionStringW(hIMC, GCS, wbuf, ret);
+--- 5611,5617 ----
+ if (ret > 0)
+ {
+ /* Allocate the requested buffer plus space for the NUL character. */
+! wbuf = alloc(ret + sizeof(WCHAR));
+ if (wbuf != NULL)
+ {
+ pImmGetCompositionStringW(hIMC, GCS, wbuf, ret);
+***************
+*** 6058,6064 ****
+
+ /* Don't give an out-of-memory message here, it would call us
+ * recursively. */
+! padding = (int *)lalloc(pad_size * sizeof(int), FALSE);
+ if (padding != NULL)
+ for (i = 0; i < pad_size; i++)
+ padding[i] = gui.char_width;
+--- 6056,6062 ----
+
+ /* Don't give an out-of-memory message here, it would call us
+ * recursively. */
+! padding = LALLOC_MULT(sizeof(int), pad_size);
+ if (padding != NULL)
+ for (i = 0; i < pad_size; i++)
+ padding[i] = gui.char_width;
+***************
+*** 6095,6104 ****
+ && (unicodebuf == NULL || len > unibuflen))
+ {
+ vim_free(unicodebuf);
+! unicodebuf = (WCHAR *)lalloc(len * sizeof(WCHAR), FALSE);
+
+ vim_free(unicodepdy);
+! unicodepdy = (int *)lalloc(len * sizeof(int), FALSE);
+
+ unibuflen = len;
+ }
+--- 6093,6102 ----
+ && (unicodebuf == NULL || len > unibuflen))
+ {
+ vim_free(unicodebuf);
+! unicodebuf = LALLOC_MULT(WCHAR, len);
+
+ vim_free(unicodepdy);
+! unicodepdy = LALLOC_MULT(int, len);
+
+ unibuflen = len;
+ }
+***************
+*** 6654,6660 ****
+ /* If the edit box exists, copy the string. */
+ if (s_textfield != NULL)
+ {
+! WCHAR *wp = (WCHAR *)alloc(IOSIZE * sizeof(WCHAR));
+ char_u *p;
+
+ GetDlgItemTextW(hwnd, DLG_NONBUTTON_CONTROL + 2, wp, IOSIZE);
+--- 6652,6658 ----
+ /* If the edit box exists, copy the string. */
+ if (s_textfield != NULL)
+ {
+! WCHAR *wp = ALLOC_MULT(WCHAR, IOSIZE);
+ char_u *p;
+
+ GetDlgItemTextW(hwnd, DLG_NONBUTTON_CONTROL + 2, wp, IOSIZE);
+***************
+*** 6803,6814 ****
+ dfltbutton = -1;
+
+ /* Allocate array to hold the width of each button */
+! buttonWidths = (int *)alloc(numButtons * sizeof(int));
+ if (buttonWidths == NULL)
+ return -1;
+
+ /* Allocate array to hold the X position of each button */
+! buttonPositions = (int *)alloc(numButtons * sizeof(int));
+ if (buttonPositions == NULL)
+ return -1;
+
+--- 6801,6812 ----
+ dfltbutton = -1;
+
+ /* Allocate array to hold the width of each button */
+! buttonWidths = ALLOC_MULT(int, numButtons);
+ if (buttonWidths == NULL)
+ return -1;
+
+ /* Allocate array to hold the X position of each button */
+! buttonPositions = ALLOC_MULT(int, numButtons);
+ if (buttonPositions == NULL)
+ return -1;
+
+***************
+*** 8232,8239 ****
+ }
+
+ psign = NULL;
+! if (sign.hImage && (psign = (signicon_t *)alloc(sizeof(signicon_t)))
+! != NULL)
+ *psign = sign;
+
+ if (!psign)
+--- 8230,8236 ----
+ }
+
+ psign = NULL;
+! if (sign.hImage && (psign = ALLOC_ONE(signicon_t)) != NULL)
+ *psign = sign;
+
+ if (!psign)
+***************
+*** 8361,8367 ****
+ else
+ ToolInfoSize = sizeof(TOOLINFOW);
+
+! pti = (TOOLINFOW *)alloc(ToolInfoSize);
+ if (pti == NULL)
+ return;
+
+--- 8358,8364 ----
+ else
+ ToolInfoSize = sizeof(TOOLINFOW);
+
+! pti = alloc(ToolInfoSize);
+ if (pti == NULL)
+ return;
+
+***************
+*** 8532,8538 ****
+ return NULL;
+ }
+
+! beval = (BalloonEval *)alloc_clear(sizeof(BalloonEval));
+ if (beval != NULL)
+ {
+ beval->target = s_textArea;
+--- 8529,8535 ----
+ return NULL;
+ }
+
+! beval = ALLOC_CLEAR_ONE(BalloonEval);
+ if (beval != NULL)
+ {
+ beval->target = s_textArea;
+*** ../vim-8.1.1413/src/gui_x11.c 2019-05-24 19:38:59.104545491 +0200
+--- src/gui_x11.c 2019-05-28 20:44:20.478842787 +0200
+***************
+*** 1167,1173 ****
+ * Move all the entries in argv which are relevant to X into gui_argv.
+ */
+ gui_argc = 0;
+! gui_argv = (char **)lalloc(*argc * sizeof(char *), FALSE);
+ if (gui_argv == NULL)
+ return;
+ gui_argv[gui_argc++] = argv[0];
+--- 1167,1173 ----
+ * Move all the entries in argv which are relevant to X into gui_argv.
+ */
+ gui_argc = 0;
+! gui_argv = LALLOC_MULT(char *, *argc);
+ if (gui_argv == NULL)
+ return;
+ gui_argv[gui_argc++] = argv[0];
+*** ../vim-8.1.1413/src/hardcopy.c 2019-05-10 21:28:35.184612974 +0200
+--- src/hardcopy.c 2019-05-28 20:31:59.967096670 +0200
+***************
+*** 186,192 ****
+ int len;
+
+ /* Save the old values, so that they can be restored in case of an error. */
+! old_opts = (option_table_T *)alloc(sizeof(option_table_T) * table_size);
+ if (old_opts == NULL)
+ return NULL;
+
+--- 186,192 ----
+ int len;
+
+ /* Save the old values, so that they can be restored in case of an error. */
+! old_opts = ALLOC_MULT(option_table_T, table_size);
+ if (old_opts == NULL)
+ return NULL;
+
+***************
+*** 2236,2242 ****
+ {
+ char *fontname;
+
+! fontname = (char *)alloc(name_len + 1);
+ if (fontname == NULL)
+ return FALSE;
+ vim_strncpy((char_u *)fontname, name, name_len);
+--- 2236,2242 ----
+ {
+ char *fontname;
+
+! fontname = alloc(name_len + 1);
+ if (fontname == NULL)
+ return FALSE;
+ vim_strncpy((char_u *)fontname, name, name_len);
+*** ../vim-8.1.1413/src/hashtab.c 2019-05-24 18:48:36.762128482 +0200
+--- src/hashtab.c 2019-05-28 20:32:03.563075261 +0200
+***************
+*** 51,57 ****
+ {
+ hashtab_T *ht;
+
+! ht = (hashtab_T *)alloc(sizeof(hashtab_T));
+ if (ht != NULL)
+ hash_init(ht);
+ return ht;
+--- 51,57 ----
+ {
+ hashtab_T *ht;
+
+! ht = ALLOC_ONE(hashtab_T);
+ if (ht != NULL)
+ hash_init(ht);
+ return ht;
+***************
+*** 400,406 ****
+ else
+ {
+ /* Allocate an array. */
+! newarray = (hashitem_T *)alloc(sizeof(hashitem_T) * newsize);
+ if (newarray == NULL)
+ {
+ /* Out of memory. When there are NULL items still return OK.
+--- 400,406 ----
+ else
+ {
+ /* Allocate an array. */
+! newarray = ALLOC_MULT(hashitem_T, newsize);
+ if (newarray == NULL)
+ {
+ /* Out of memory. When there are NULL items still return OK.
+*** ../vim-8.1.1413/src/if_cscope.c 2019-05-24 18:48:36.762128482 +0200
+--- src/if_cscope.c 2019-05-28 21:53:34.360471443 +0200
+***************
+*** 466,472 ****
+ cs_stat_emsg(char *fname)
+ {
+ char *stat_emsg = _("E563: stat(%s) error: %d");
+! char *buf = (char *)alloc(strlen(stat_emsg) + MAXPATHL + 10);
+
+ if (buf != NULL)
+ {
+--- 466,472 ----
+ cs_stat_emsg(char *fname)
+ {
+ char *stat_emsg = _("E563: stat(%s) error: %d");
+! char *buf = alloc(strlen(stat_emsg) + MAXPATHL + 10);
+
+ if (buf != NULL)
+ {
+***************
+*** 503,509 ****
+ #endif
+
+ /* get the filename (arg1), expand it, and try to stat it */
+! if ((fname = (char *)alloc(MAXPATHL + 1)) == NULL)
+ goto add_err;
+
+ expand_env((char_u *)arg1, (char_u *)fname, MAXPATHL);
+--- 503,509 ----
+ #endif
+
+ /* get the filename (arg1), expand it, and try to stat it */
+! if ((fname = alloc(MAXPATHL + 1)) == NULL)
+ goto add_err;
+
+ expand_env((char_u *)arg1, (char_u *)fname, MAXPATHL);
+***************
+*** 531,537 ****
+ {
+ stat_T statbuf2;
+
+! if ((ppath = (char *)alloc(MAXPATHL + 1)) == NULL)
+ goto add_err;
+
+ expand_env((char_u *)arg2, (char_u *)ppath, MAXPATHL);
+--- 531,537 ----
+ {
+ stat_T statbuf2;
+
+! if ((ppath = alloc(MAXPATHL + 1)) == NULL)
+ goto add_err;
+
+ expand_env((char_u *)arg2, (char_u *)ppath, MAXPATHL);
+***************
+*** 543,549 ****
+ /* if filename is a directory, append the cscope database name to it */
+ if (S_ISDIR(statbuf.st_mode))
+ {
+! fname2 = (char *)alloc(strlen(CSCOPE_DBFILE) + strlen(fname) + 2);
+ if (fname2 == NULL)
+ goto add_err;
+
+--- 543,549 ----
+ /* if filename is a directory, append the cscope database name to it */
+ if (S_ISDIR(statbuf.st_mode))
+ {
+! fname2 = alloc(strlen(CSCOPE_DBFILE) + strlen(fname) + 2);
+ if (fname2 == NULL)
+ goto add_err;
+
+***************
+*** 665,671 ****
+ char *buf;
+ int nlines = 0;
+
+! buf = (char *)alloc(CSREAD_BUFSIZE);
+ if (buf == NULL)
+ return 0;
+ for (;;)
+--- 665,671 ----
+ char *buf;
+ int nlines = 0;
+
+! buf = alloc(CSREAD_BUFSIZE);
+ if (buf == NULL)
+ return 0;
+ for (;;)
+***************
+*** 769,775 ****
+ while VIM_ISWHITE(*pat)
+ ++pat;
+
+! if ((cmd = (char *)alloc(strlen(pat) + 2)) == NULL)
+ return NULL;
+
+ (void)sprintf(cmd, "%d%s", search, pat);
+--- 769,775 ----
+ while VIM_ISWHITE(*pat)
+ ++pat;
+
+! if ((cmd = alloc(strlen(pat) + 2)) == NULL)
+ return NULL;
+
+ (void)sprintf(cmd, "%d%s", search, pat);
+***************
+*** 869,875 ****
+ }
+ #endif
+ /* expand the cscope exec for env var's */
+! if ((prog = (char *)alloc(MAXPATHL + 1)) == NULL)
+ {
+ #ifdef UNIX
+ return CSCOPE_FAILURE;
+--- 869,875 ----
+ }
+ #endif
+ /* expand the cscope exec for env var's */
+! if ((prog = alloc(MAXPATHL + 1)) == NULL)
+ {
+ #ifdef UNIX
+ return CSCOPE_FAILURE;
+***************
+*** 885,891 ****
+ if (csinfo[i].ppath)
+ {
+ /* expand the prepend path for env var's */
+! if ((ppath = (char *)alloc(MAXPATHL + 1)) == NULL)
+ {
+ vim_free(prog);
+ #ifdef UNIX
+--- 885,891 ----
+ if (csinfo[i].ppath)
+ {
+ /* expand the prepend path for env var's */
+! if ((ppath = alloc(MAXPATHL + 1)) == NULL)
+ {
+ vim_free(prog);
+ #ifdef UNIX
+***************
+*** 903,909 ****
+ if (csinfo[i].flags)
+ len += (int)strlen(csinfo[i].flags);
+
+! if ((cmd = (char *)alloc(len)) == NULL)
+ {
+ vim_free(prog);
+ vim_free(ppath);
+--- 903,909 ----
+ if (csinfo[i].flags)
+ len += (int)strlen(csinfo[i].flags);
+
+! if ((cmd = alloc(len)) == NULL)
+ {
+ vim_free(prog);
+ vim_free(ppath);
+***************
+*** 1121,1127 ****
+ if (strchr(CSQF_FLAGS, *qfpos) == NULL)
+ {
+ char *nf = _("E469: invalid cscopequickfix flag %c for %c");
+! char *buf = (char *)alloc(strlen(nf));
+
+ /* strlen will be enough because we use chars */
+ if (buf != NULL)
+--- 1121,1127 ----
+ if (strchr(CSQF_FLAGS, *qfpos) == NULL)
+ {
+ char *nf = _("E469: invalid cscopequickfix flag %c for %c");
+! char *buf = alloc(strlen(nf));
+
+ /* strlen will be enough because we use chars */
+ if (buf != NULL)
+***************
+*** 1150,1156 ****
+ if (cmd == NULL)
+ return FALSE;
+
+! nummatches = (int *)alloc(sizeof(int)*csinfo_size);
+ if (nummatches == NULL)
+ {
+ vim_free(cmd);
+--- 1150,1156 ----
+ if (cmd == NULL)
+ return FALSE;
+
+! nummatches = ALLOC_MULT(int, csinfo_size);
+ if (nummatches == NULL)
+ {
+ vim_free(cmd);
+***************
+*** 1192,1198 ****
+ return FALSE;
+ }
+
+! buf = (char *)alloc(strlen(opt) + strlen(pat) + strlen(nf));
+ if (buf == NULL)
+ (void)emsg(nf);
+ else
+--- 1192,1198 ----
+ return FALSE;
+ }
+
+! buf = alloc(strlen(opt) + strlen(pat) + strlen(nf));
+ if (buf == NULL)
+ (void)emsg(nf);
+ else
+***************
+*** 1429,1435 ****
+ * be enough for most users. If more is needed, csinfo will be
+ * reallocated. */
+ csinfo_size = 1;
+! csinfo = (csinfo_T *)alloc_clear(sizeof(csinfo_T));
+ }
+ else
+ {
+--- 1429,1435 ----
+ * be enough for most users. If more is needed, csinfo will be
+ * reallocated. */
+ csinfo_size = 1;
+! csinfo = ALLOC_CLEAR_ONE(csinfo_T);
+ }
+ else
+ {
+***************
+*** 1450,1463 ****
+ clear_csinfo(j);
+ }
+
+! if ((csinfo[i].fname = (char *)alloc(strlen(fname)+1)) == NULL)
+ return -1;
+
+ (void)strcpy(csinfo[i].fname, (const char *)fname);
+
+ if (ppath != NULL)
+ {
+! if ((csinfo[i].ppath = (char *)alloc(strlen(ppath) + 1)) == NULL)
+ {
+ VIM_CLEAR(csinfo[i].fname);
+ return -1;
+--- 1450,1463 ----
+ clear_csinfo(j);
+ }
+
+! if ((csinfo[i].fname = alloc(strlen(fname)+1)) == NULL)
+ return -1;
+
+ (void)strcpy(csinfo[i].fname, (const char *)fname);
+
+ if (ppath != NULL)
+ {
+! if ((csinfo[i].ppath = alloc(strlen(ppath) + 1)) == NULL)
+ {
+ VIM_CLEAR(csinfo[i].fname);
+ return -1;
+***************
+*** 1468,1474 ****
+
+ if (flags != NULL)
+ {
+! if ((csinfo[i].flags = (char *)alloc(strlen(flags) + 1)) == NULL)
+ {
+ VIM_CLEAR(csinfo[i].fname);
+ VIM_CLEAR(csinfo[i].ppath);
+--- 1468,1474 ----
+
+ if (flags != NULL)
+ {
+! if ((csinfo[i].flags = alloc(strlen(flags) + 1)) == NULL)
+ {
+ VIM_CLEAR(csinfo[i].fname);
+ VIM_CLEAR(csinfo[i].ppath);
+***************
+*** 1635,1641 ****
+ if (search != NULL)
+ {
+ amt = (int)(strlen(fname) + strlen(slno) + strlen(tagstr) + strlen(search)+6);
+! if ((buf = (char *)alloc(amt)) == NULL)
+ return NULL;
+
+ (void)sprintf(buf, "%s\t%s\t%s;\"\t%s", tagstr, fname, slno, search);
+--- 1635,1641 ----
+ if (search != NULL)
+ {
+ amt = (int)(strlen(fname) + strlen(slno) + strlen(tagstr) + strlen(search)+6);
+! if ((buf = alloc(amt)) == NULL)
+ return NULL;
+
+ (void)sprintf(buf, "%s\t%s\t%s;\"\t%s", tagstr, fname, slno, search);
+***************
+*** 1643,1649 ****
+ else
+ {
+ amt = (int)(strlen(fname) + strlen(slno) + strlen(tagstr) + 5);
+! if ((buf = (char *)alloc(amt)) == NULL)
+ return NULL;
+
+ (void)sprintf(buf, "%s\t%s\t%s;\"", tagstr, fname, slno);
+--- 1643,1649 ----
+ else
+ {
+ amt = (int)(strlen(fname) + strlen(slno) + strlen(tagstr) + 5);
+! if ((buf = alloc(amt)) == NULL)
+ return NULL;
+
+ (void)sprintf(buf, "%s\t%s\t%s;\"", tagstr, fname, slno);
+***************
+*** 1805,1811 ****
+ char *cntx;
+ char *context;
+
+! buf = (char *)alloc(CSREAD_BUFSIZE);
+ if (buf == NULL)
+ return;
+
+--- 1805,1811 ----
+ char *cntx;
+ char *context;
+
+! buf = alloc(CSREAD_BUFSIZE);
+ if (buf == NULL)
+ return;
+
+***************
+*** 1820,1826 ****
+ &slno, &search)) == NULL)
+ continue;
+
+! context = (char *)alloc(strlen(cntx)+5);
+ if (context == NULL)
+ continue;
+
+--- 1820,1826 ----
+ &slno, &search)) == NULL)
+ continue;
+
+! context = alloc(strlen(cntx)+5);
+ if (context == NULL)
+ continue;
+
+***************
+*** 1870,1882 ****
+
+ assert(totmatches > 0);
+
+! buf = (char *)alloc(CSREAD_BUFSIZE);
+ if (buf == NULL)
+ return;
+
+! if ((matches = (char **)alloc(sizeof(char *) * totmatches)) == NULL)
+ goto parse_out;
+! if ((cntxts = (char **)alloc(sizeof(char *) * totmatches)) == NULL)
+ goto parse_out;
+
+ for (i = 0; i < csinfo_size; i++)
+--- 1870,1882 ----
+
+ assert(totmatches > 0);
+
+! buf = alloc(CSREAD_BUFSIZE);
+ if (buf == NULL)
+ return;
+
+! if ((matches = ALLOC_MULT(char *, totmatches)) == NULL)
+ goto parse_out;
+! if ((cntxts = ALLOC_MULT(char *, totmatches)) == NULL)
+ goto parse_out;
+
+ for (i = 0; i < csinfo_size; i++)
+***************
+*** 1975,1981 ****
+
+ assert(num_matches > 0);
+
+! if ((tbuf = (char *)alloc(strlen(matches[0]) + 1)) == NULL)
+ return;
+
+ strcpy(tbuf, matches[0]);
+--- 1975,1981 ----
+
+ assert(num_matches > 0);
+
+! if ((tbuf = alloc(strlen(matches[0]) + 1)) == NULL)
+ return;
+
+ strcpy(tbuf, matches[0]);
+***************
+*** 1987,1993 ****
+ }
+
+ newsize = (int)(strlen(cstag_msg) + strlen(ptag));
+! buf = (char *)alloc(newsize);
+ if (buf != NULL)
+ {
+ bufsize = newsize;
+--- 1987,1993 ----
+ }
+
+ newsize = (int)(strlen(cstag_msg) + strlen(ptag));
+! buf = alloc(newsize);
+ if (buf != NULL)
+ {
+ bufsize = newsize;
+***************
+*** 2010,2016 ****
+ * by parsing matches[i] on the fly and placing stuff into buf
+ * directly, but that's too much of a hassle
+ */
+! if ((tbuf = (char *)alloc(strlen(matches[idx]) + 1)) == NULL)
+ continue;
+ (void)strcpy(tbuf, matches[idx]);
+
+--- 2010,2016 ----
+ * by parsing matches[i] on the fly and placing stuff into buf
+ * directly, but that's too much of a hassle
+ */
+! if ((tbuf = alloc(strlen(matches[idx]) + 1)) == NULL)
+ continue;
+ (void)strcpy(tbuf, matches[idx]);
+
+***************
+*** 2030,2036 ****
+ if (bufsize < newsize)
+ {
+ t_buf = buf;
+! buf = (char *)vim_realloc(buf, newsize);
+ if (buf == NULL)
+ {
+ bufsize = 0;
+--- 2030,2036 ----
+ if (bufsize < newsize)
+ {
+ t_buf = buf;
+! buf = vim_realloc(buf, newsize);
+ if (buf == NULL)
+ {
+ bufsize = 0;
+***************
+*** 2058,2064 ****
+ if (bufsize < newsize)
+ {
+ t_buf = buf;
+! buf = (char *)vim_realloc(buf, newsize);
+ if (buf == NULL)
+ {
+ bufsize = 0;
+--- 2058,2064 ----
+ if (bufsize < newsize)
+ {
+ t_buf = buf;
+! buf = vim_realloc(buf, newsize);
+ if (buf == NULL)
+ {
+ bufsize = 0;
+***************
+*** 2129,2135 ****
+ if (bufpos < maxlen - 1 && vim_isprintc(ch))
+ {
+ if (buf == NULL) /* lazy buffer allocation */
+! buf = (char *)alloc(maxlen);
+ if (buf != NULL)
+ {
+ /* append character to the message */
+--- 2129,2135 ----
+ if (bufpos < maxlen - 1 && vim_isprintc(ch))
+ {
+ if (buf == NULL) /* lazy buffer allocation */
+! buf = alloc(maxlen);
+ if (buf != NULL)
+ {
+ /* append character to the message */
+***************
+*** 2339,2347 ****
+ return CSCOPE_SUCCESS;
+
+ /* malloc our db and ppath list */
+! dblist = (char **)alloc(csinfo_size * sizeof(char *));
+! pplist = (char **)alloc(csinfo_size * sizeof(char *));
+! fllist = (char **)alloc(csinfo_size * sizeof(char *));
+ if (dblist == NULL || pplist == NULL || fllist == NULL)
+ {
+ vim_free(dblist);
+--- 2339,2347 ----
+ return CSCOPE_SUCCESS;
+
+ /* malloc our db and ppath list */
+! dblist = ALLOC_MULT(char *, csinfo_size);
+! pplist = ALLOC_MULT(char *, csinfo_size);
+! fllist = ALLOC_MULT(char *, csinfo_size);
+ if (dblist == NULL || pplist == NULL || fllist == NULL)
+ {
+ vim_free(dblist);
+***************
+*** 2438,2444 ****
+ #endif
+ )
+ {
+! if ((fullname = (char *)alloc(len)) != NULL)
+ (void)sprintf(fullname, "%s/%s", csinfo[i].ppath, name);
+ }
+ else if (csdir != NULL && csinfo[i].fname != NULL && *csdir != NUL)
+--- 2438,2444 ----
+ #endif
+ )
+ {
+! if ((fullname = alloc(len)) != NULL)
+ (void)sprintf(fullname, "%s/%s", csinfo[i].ppath, name);
+ }
+ else if (csdir != NULL && csinfo[i].fname != NULL && *csdir != NUL)
+*** ../vim-8.1.1413/src/if_mzsch.c 2019-04-28 19:46:17.030060105 +0200
+--- src/if_mzsch.c 2019-05-28 21:54:52.416098974 +0200
+***************
+*** 2582,2588 ****
+ MZ_GC_VAR_IN_REG(1, rest);
+ MZ_GC_REG();
+
+! array = (char **)alloc((new_len+1)* sizeof(char *));
+ vim_memset(array, 0, (new_len+1) * sizeof(char *));
+
+ rest = line_list;
+--- 2582,2588 ----
+ MZ_GC_VAR_IN_REG(1, rest);
+ MZ_GC_REG();
+
+! array = ALLOC_MULT(char *, new_len + 1);
+ vim_memset(array, 0, (new_len+1) * sizeof(char *));
+
+ rest = line_list;
+***************
+*** 2766,2772 ****
+ MZ_GC_VAR_IN_REG(1, rest);
+ MZ_GC_REG();
+
+! array = (char **)alloc((size+1) * sizeof(char *));
+ vim_memset(array, 0, (size+1) * sizeof(char *));
+
+ rest = list;
+--- 2766,2772 ----
+ MZ_GC_VAR_IN_REG(1, rest);
+ MZ_GC_REG();
+
+! array = ALLOC_MULT(char *, size + 1);
+ vim_memset(array, 0, (size+1) * sizeof(char *));
+
+ rest = list;
+***************
+*** 2886,2892 ****
+ if (memchr(scheme_str, '\n', len))
+ scheme_signal_error(_("string cannot contain newlines"));
+
+! vim_str = (char *)alloc(len + 1);
+
+ /* Create a copy of the string, with internal nulls replaced by
+ * newline characters, as is the vim convention.
+--- 2886,2892 ----
+ if (memchr(scheme_str, '\n', len))
+ scheme_signal_error(_("string cannot contain newlines"));
+
+! vim_str = alloc(len + 1);
+
+ /* Create a copy of the string, with internal nulls replaced by
+ * newline characters, as is the vim convention.
+***************
+*** 3213,3226 ****
+ tv->vval.v_list = list;
+ ++list->lv_refcount;
+
+! v = (typval_T *)alloc(sizeof(typval_T));
+ if (v == NULL)
+ status = FAIL;
+ else
+ {
+ /* add the value in advance to allow handling of self-referential
+ * data structures */
+! typval_T *visited_tv = (typval_T *)alloc(sizeof(typval_T));
+ copy_tv(tv, visited_tv);
+ scheme_hash_set(visited, obj, (Scheme_Object *)visited_tv);
+
+--- 3213,3226 ----
+ tv->vval.v_list = list;
+ ++list->lv_refcount;
+
+! v = ALLOC_ONE(typval_T);
+ if (v == NULL)
+ status = FAIL;
+ else
+ {
+ /* add the value in advance to allow handling of self-referential
+ * data structures */
+! typval_T *visited_tv = ALLOC_ONE(typval_T);
+ copy_tv(tv, visited_tv);
+ scheme_hash_set(visited, obj, (Scheme_Object *)visited_tv);
+
+***************
+*** 3288,3294 ****
+ status = FAIL;
+ else
+ {
+! typval_T *visited_tv = (typval_T *)alloc(sizeof(typval_T));
+
+ tv->v_type = VAR_DICT;
+ tv->vval.v_dict = dict;
+--- 3288,3294 ----
+ status = FAIL;
+ else
+ {
+! typval_T *visited_tv = ALLOC_ONE(typval_T);
+
+ tv->v_type = VAR_DICT;
+ tv->vval.v_dict = dict;
+***************
+*** 3353,3359 ****
+ ++list->lv_refcount;
+ for (i = 0; status == OK && i < argc; ++i)
+ {
+! typval_T *v = (typval_T *)alloc(sizeof(typval_T));
+ if (v == NULL)
+ status = FAIL;
+ else
+--- 3353,3359 ----
+ ++list->lv_refcount;
+ for (i = 0; status == OK && i < argc; ++i)
+ {
+! typval_T *v = ALLOC_ONE(typval_T);
+ if (v == NULL)
+ status = FAIL;
+ else
+*** ../vim-8.1.1413/src/if_perlsfio.c 2019-05-24 18:48:36.762128482 +0200
+--- src/if_perlsfio.c 2019-05-28 20:23:27.686316402 +0200
+***************
+*** 51,57 ****
+ {
+ Sfdisc_t *disc;
+
+! disc = (Sfdisc_t *)alloc(sizeof(Sfdisc_t));
+ if (disc == NULL)
+ return NULL;
+
+--- 51,57 ----
+ {
+ Sfdisc_t *disc;
+
+! disc = ALLOC_ONE(Sfdisc_t);
+ if (disc == NULL)
+ return NULL;
+
+*** ../vim-8.1.1413/src/if_py_both.h 2019-05-25 20:21:24.677951017 +0200
+--- src/if_py_both.h 2019-05-28 21:56:32.959618882 +0200
+***************
+*** 3138,3145 ****
+ pt->pt_argc = self->argc;
+ if (exported)
+ {
+! pt->pt_argv = (typval_T *)alloc_clear(
+! sizeof(typval_T) * self->argc);
+ for (i = 0; i < pt->pt_argc; ++i)
+ copy_tv(&self->argv[i], &pt->pt_argv[i]);
+ }
+--- 3138,3144 ----
+ pt->pt_argc = self->argc;
+ if (exported)
+ {
+! pt->pt_argv = ALLOC_CLEAR_MULT(typval_T, self->argc);
+ for (i = 0; i < pt->pt_argc; ++i)
+ copy_tv(&self->argv[i], &pt->pt_argv[i]);
+ }
+***************
+*** 4262,4268 ****
+ /* Create a copy of the string, with internal nulls replaced by
+ * newline characters, as is the vim convention.
+ */
+! save = (char *)alloc(len+1);
+ if (save == NULL)
+ {
+ PyErr_NoMemory();
+--- 4261,4267 ----
+ /* Create a copy of the string, with internal nulls replaced by
+ * newline characters, as is the vim convention.
+ */
+! save = alloc(len+1);
+ if (save == NULL)
+ {
+ PyErr_NoMemory();
+***************
+*** 6243,6249 ****
+ FunctionObject *func = (FunctionObject *) obj;
+ if (func->self != NULL || func->argv != NULL)
+ {
+! partial_T *pt = (partial_T *)alloc_clear(sizeof(partial_T));
+ set_partial(func, pt, TRUE);
+ tv->vval.v_partial = pt;
+ tv->v_type = VAR_PARTIAL;
+--- 6242,6249 ----
+ FunctionObject *func = (FunctionObject *) obj;
+ if (func->self != NULL || func->argv != NULL)
+ {
+! partial_T *pt = ALLOC_CLEAR_ONE(partial_T);
+!
+ set_partial(func, pt, TRUE);
+ tv->vval.v_partial = pt;
+ tv->v_type = VAR_PARTIAL;
+*** ../vim-8.1.1413/src/if_python3.c 2019-05-24 18:48:36.762128482 +0200
+--- src/if_python3.c 2019-05-28 21:56:58.571496547 +0200
+***************
+*** 877,883 ****
+ size_t len = mbstowcs(NULL, (char *)p_py3home, 0) + 1;
+
+ /* The string must not change later, make a copy in static memory. */
+! py_home_buf = (wchar_t *)alloc(len * sizeof(wchar_t));
+ if (py_home_buf != NULL && mbstowcs(
+ py_home_buf, (char *)p_py3home, len) != (size_t)-1)
+ Py_SetPythonHome(py_home_buf);
+--- 877,883 ----
+ size_t len = mbstowcs(NULL, (char *)p_py3home, 0) + 1;
+
+ /* The string must not change later, make a copy in static memory. */
+! py_home_buf = ALLOC_MULT(wchar_t, len);
+ if (py_home_buf != NULL && mbstowcs(
+ py_home_buf, (char *)p_py3home, len) != (size_t)-1)
+ Py_SetPythonHome(py_home_buf);
+***************
+*** 1629,1635 ****
+ Py_ssize_t len = strlen(str);
+ char *tmp,*p;
+
+! tmp = (char *)alloc(len + 1);
+ p = tmp;
+ if (p == NULL)
+ {
+--- 1629,1635 ----
+ Py_ssize_t len = strlen(str);
+ char *tmp,*p;
+
+! tmp = alloc(len + 1);
+ p = tmp;
+ if (p == NULL)
+ {
+*** ../vim-8.1.1413/src/if_xcmdsrv.c 2019-05-24 18:48:36.762128482 +0200
+--- src/if_xcmdsrv.c 2019-05-28 20:23:31.818288567 +0200
+***************
+*** 441,447 ****
+ * Length must be computed exactly!
+ */
+ length = STRLEN(name) + STRLEN(p_enc) + STRLEN(cmd) + 14;
+! property = (char_u *)alloc(length + 30);
+
+ sprintf((char *)property, "%c%c%c-n %s%c-E %s%c-s %s",
+ 0, asExpr ? 'c' : 'k', 0, name, 0, p_enc, 0, cmd);
+--- 441,447 ----
+ * Length must be computed exactly!
+ */
+ length = STRLEN(name) + STRLEN(p_enc) + STRLEN(cmd) + 14;
+! property = alloc(length + 30);
+
+ sprintf((char *)property, "%c%c%c-n %s%c-E %s%c-s %s",
+ 0, asExpr ? 'c' : 'k', 0, name, 0, p_enc, 0, cmd);
+***************
+*** 750,756 ****
+ return -1;
+
+ length = STRLEN(p_enc) + STRLEN(str) + 14;
+! if ((property = (char_u *)alloc(length + 30)) != NULL)
+ {
+ sprintf((char *)property, "%cn%c-E %s%c-n %s%c-w %x",
+ 0, 0, p_enc, 0, str, 0, (unsigned int)commWindow);
+--- 750,756 ----
+ return -1;
+
+ length = STRLEN(p_enc) + STRLEN(str) + 14;
+! if ((property = alloc(length + 30)) != NULL)
+ {
+ sprintf((char *)property, "%cn%c-E %s%c-n %s%c-w %x",
+ 0, 0, p_enc, 0, str, 0, (unsigned int)commWindow);
+***************
+*** 1157,1163 ****
+ {
+ x_queue_T *node;
+
+! node = (x_queue_T *)alloc(sizeof(x_queue_T));
+ if (node == NULL)
+ return; /* out of memory */
+ node->propInfo = propInfo;
+--- 1157,1163 ----
+ {
+ x_queue_T *node;
+
+! node = ALLOC_ONE(x_queue_T);
+ if (node == NULL)
+ return; /* out of memory */
+ node->propInfo = propInfo;
+*** ../vim-8.1.1413/src/insexpand.c 2019-05-24 19:38:59.104545491 +0200
+--- src/insexpand.c 2019-05-28 21:58:06.267173187 +0200
+***************
+*** 473,479 ****
+ ? actual_len : actual_compl_length;
+
+ // Allocate wide character array for the completion and fill it.
+! wca = (int *)alloc(actual_len * sizeof(int));
+ if (wca != NULL)
+ {
+ p = str;
+--- 473,479 ----
+ ? actual_len : actual_compl_length;
+
+ // Allocate wide character array for the completion and fill it.
+! wca = ALLOC_MULT(int, actual_len);
+ if (wca != NULL)
+ {
+ p = str;
+***************
+*** 611,617 ****
+
+ // Allocate a new match structure.
+ // Copy the values to the new match structure.
+! match = (compl_T *)alloc_clear(sizeof(compl_T));
+ if (match == NULL)
+ return FAIL;
+ match->cp_number = -1;
+--- 611,617 ----
+
+ // Allocate a new match structure.
+ // Copy the values to the new match structure.
+! match = ALLOC_CLEAR_ONE(compl_T);
+ if (match == NULL)
+ return FAIL;
+ match->cp_number = -1;
+***************
+*** 1070,1077 ****
+ } while (compl != NULL && compl != compl_first_match);
+ if (compl_match_arraysize == 0)
+ return;
+! compl_match_array = (pumitem_T *)alloc_clear(
+! sizeof(pumitem_T) * compl_match_arraysize);
+ if (compl_match_array != NULL)
+ {
+ // If the current match is the original text don't find the first
+--- 1070,1076 ----
+ } while (compl != NULL && compl != compl_first_match);
+ if (compl_match_arraysize == 0)
+ return;
+! compl_match_array = ALLOC_CLEAR_MULT(pumitem_T, compl_match_arraysize);
+ if (compl_match_array != NULL)
+ {
+ // If the current match is the original text don't find the first
+*** ../vim-8.1.1413/src/list.c 2019-05-25 20:21:24.677951017 +0200
+--- src/list.c 2019-05-28 20:26:57.692947550 +0200
+***************
+*** 72,78 ****
+ {
+ list_T *l;
+
+! l = (list_T *)alloc_clear(sizeof(list_T));
+ if (l != NULL)
+ {
+ /* Prepend the list to the list of lists for garbage collection. */
+--- 72,78 ----
+ {
+ list_T *l;
+
+! l = ALLOC_CLEAR_ONE(list_T);
+ if (l != NULL)
+ {
+ /* Prepend the list to the list of lists for garbage collection. */
+***************
+*** 244,250 ****
+ listitem_T *
+ listitem_alloc(void)
+ {
+! return (listitem_T *)alloc(sizeof(listitem_T));
+ }
+
+ /*
+--- 244,250 ----
+ listitem_T *
+ listitem_alloc(void)
+ {
+! return ALLOC_ONE(listitem_T);
+ }
+
+ /*
+*** ../vim-8.1.1413/src/mark.c 2019-05-09 15:12:45.172723940 +0200
+--- src/mark.c 2019-05-28 21:59:00.450914373 +0200
+***************
+*** 1478,1488 ****
+ void
+ prepare_viminfo_marks(void)
+ {
+! vi_namedfm = (xfmark_T *)alloc_clear((NMARKS + EXTRA_MARKS)
+! * (int)sizeof(xfmark_T));
+ #ifdef FEAT_JUMPLIST
+! vi_jumplist = (xfmark_T *)alloc_clear(JUMPLISTSIZE
+! * (int)sizeof(xfmark_T));
+ vi_jumplist_len = 0;
+ #endif
+ }
+--- 1478,1486 ----
+ void
+ prepare_viminfo_marks(void)
+ {
+! vi_namedfm = ALLOC_CLEAR_MULT(xfmark_T, NMARKS + EXTRA_MARKS);
+ #ifdef FEAT_JUMPLIST
+! vi_jumplist = ALLOC_CLEAR_MULT(xfmark_T, JUMPLISTSIZE);
+ vi_jumplist_len = 0;
+ #endif
+ }
+*** ../vim-8.1.1413/src/mbyte.c 2019-05-24 18:48:36.766128461 +0200
+--- src/mbyte.c 2019-05-28 20:32:06.715056498 +0200
+***************
+*** 6897,6903 ****
+ return retval;
+ }
+ }
+! tmp = (short_u *)alloc(sizeof(short_u) * tmp_len);
+ if (tmp == NULL)
+ break;
+ if (vcp->vc_cpfrom == 0)
+--- 6897,6903 ----
+ return retval;
+ }
+ }
+! tmp = ALLOC_MULT(short_u, tmp_len);
+ if (tmp == NULL)
+ break;
+ if (vcp->vc_cpfrom == 0)
+*** ../vim-8.1.1413/src/memfile.c 2019-05-27 23:36:17.456452208 +0200
+--- src/memfile.c 2019-05-28 20:23:42.830214601 +0200
+***************
+*** 130,136 ****
+ struct STATFS stf;
+ #endif
+
+! if ((mfp = (memfile_T *)alloc(sizeof(memfile_T))) == NULL)
+ return NULL;
+
+ if (fname == NULL) /* no file for this memfile, use memory only */
+--- 130,136 ----
+ struct STATFS stf;
+ #endif
+
+! if ((mfp = ALLOC_ONE(memfile_T)) == NULL)
+ return NULL;
+
+ if (fname == NULL) /* no file for this memfile, use memory only */
+***************
+*** 362,368 ****
+ }
+ else if (hp == NULL) /* need to allocate memory for this block */
+ {
+! if ((p = (char_u *)alloc(mfp->mf_page_size * page_count)) == NULL)
+ return NULL;
+ hp = mf_rem_free(mfp);
+ hp->bh_data = p;
+--- 362,368 ----
+ }
+ else if (hp == NULL) /* need to allocate memory for this block */
+ {
+! if ((p = alloc(mfp->mf_page_size * page_count)) == NULL)
+ return NULL;
+ hp = mf_rem_free(mfp);
+ hp->bh_data = p;
+***************
+*** 893,902 ****
+ {
+ bhdr_T *hp;
+
+! if ((hp = (bhdr_T *)alloc(sizeof(bhdr_T))) != NULL)
+ {
+! if ((hp->bh_data = (char_u *)alloc(mfp->mf_page_size * page_count))
+! == NULL)
+ {
+ vim_free(hp); /* not enough memory */
+ return NULL;
+--- 893,901 ----
+ {
+ bhdr_T *hp;
+
+! if ((hp = ALLOC_ONE(bhdr_T)) != NULL)
+ {
+! if ((hp->bh_data = alloc(mfp->mf_page_size * page_count)) == NULL)
+ {
+ vim_free(hp); /* not enough memory */
+ return NULL;
+***************
+*** 1131,1137 ****
+ if (hp->bh_bnum >= 0) /* it's already positive */
+ return OK;
+
+! if ((np = (NR_TRANS *)alloc(sizeof(NR_TRANS))) == NULL)
+ return FAIL;
+
+ /*
+--- 1130,1136 ----
+ if (hp->bh_bnum >= 0) /* it's already positive */
+ return OK;
+
+! if ((np = ALLOC_ONE(NR_TRANS)) == NULL)
+ return FAIL;
+
+ /*
+***************
+*** 1460,1466 ****
+ size_t size;
+
+ size = (mht->mht_mask + 1) * MHT_GROWTH_FACTOR * sizeof(void *);
+! buckets = (mf_hashitem_T **)lalloc_clear(size, FALSE);
+ if (buckets == NULL)
+ return FAIL;
+
+--- 1459,1465 ----
+ size_t size;
+
+ size = (mht->mht_mask + 1) * MHT_GROWTH_FACTOR * sizeof(void *);
+! buckets = lalloc_clear(size, FALSE);
+ if (buckets == NULL)
+ return FAIL;
+
+*** ../vim-8.1.1413/src/memfile_test.c 2016-08-29 22:42:20.000000000 +0200
+--- src/memfile_test.c 2019-05-28 22:00:20.166533407 +0200
+***************
+*** 67,73 ****
+ assert(mf_hash_find(&ht, key) == NULL);
+
+ /* allocate and add new item */
+! item = (mf_hashitem_T *)lalloc_clear(sizeof(mf_hashtab_T), FALSE);
+ assert(item != NULL);
+ item->mhi_key = key;
+ mf_hash_add_item(&ht, item);
+--- 67,73 ----
+ assert(mf_hash_find(&ht, key) == NULL);
+
+ /* allocate and add new item */
+! item = LALLOC_CLEAR_ONE(mf_hashtab_T);
+ assert(item != NULL);
+ item->mhi_key = key;
+ mf_hash_add_item(&ht, item);
+*** ../vim-8.1.1413/src/memline.c 2019-05-25 22:11:42.474849134 +0200
+--- src/memline.c 2019-05-28 22:02:15.693937617 +0200
+***************
+*** 1189,1195 ****
+ * Allocate a buffer structure for the swap file that is used for recovery.
+ * Only the memline and crypt information in it are really used.
+ */
+! buf = (buf_T *)alloc(sizeof(buf_T));
+ if (buf == NULL)
+ goto theend;
+
+--- 1189,1195 ----
+ * Allocate a buffer structure for the swap file that is used for recovery.
+ * Only the memline and crypt information in it are really used.
+ */
+! buf = ALLOC_ONE(buf_T);
+ if (buf == NULL)
+ goto theend;
+
+***************
+*** 1911,1919 ****
+ );
+ if (swapname != NULL)
+ {
+! if (mch_stat((char *)swapname, &st) != -1) /* It exists! */
+ {
+! files = (char_u **)alloc(sizeof(char_u *));
+ if (files != NULL)
+ {
+ files[0] = swapname;
+--- 1911,1919 ----
+ );
+ if (swapname != NULL)
+ {
+! if (mch_stat((char *)swapname, &st) != -1) // It exists!
+ {
+! files = ALLOC_ONE(char_u *);
+ if (files != NULL)
+ {
+ files[0] = swapname;
+***************
+*** 4205,4212 ****
+ {
+ CHECK(top > 0, _("Stack size increases")); /* more than 5 levels??? */
+
+! newstack = (infoptr_T *)alloc(sizeof(infoptr_T) *
+! (buf->b_ml.ml_stack_size + STACK_INCR));
+ if (newstack == NULL)
+ return -1;
+ if (top > 0)
+--- 4205,4211 ----
+ {
+ CHECK(top > 0, _("Stack size increases")); /* more than 5 levels??? */
+
+! newstack = ALLOC_MULT(infoptr_T, buf->b_ml.ml_stack_size + STACK_INCR);
+ if (newstack == NULL)
+ return -1;
+ if (top > 0)
+***************
+*** 5235,5241 ****
+ if (state == NULL)
+ return data;
+
+! new_data = (char_u *)alloc(size);
+ if (new_data == NULL)
+ return NULL;
+ head_end = (char_u *)(&dp->db_index[dp->db_line_count]);
+--- 5234,5240 ----
+ if (state == NULL)
+ return data;
+
+! new_data = alloc(size);
+ if (new_data == NULL)
+ return NULL;
+ head_end = (char_u *)(&dp->db_index[dp->db_line_count]);
+***************
+*** 5375,5382 ****
+ return;
+ if (buf->b_ml.ml_chunksize == NULL)
+ {
+! buf->b_ml.ml_chunksize =
+! (chunksize_T *)alloc(sizeof(chunksize_T) * 100);
+ if (buf->b_ml.ml_chunksize == NULL)
+ {
+ buf->b_ml.ml_usedchunks = -1;
+--- 5374,5380 ----
+ return;
+ if (buf->b_ml.ml_chunksize == NULL)
+ {
+! buf->b_ml.ml_chunksize = ALLOC_MULT(chunksize_T, 100);
+ if (buf->b_ml.ml_chunksize == NULL)
+ {
+ buf->b_ml.ml_usedchunks = -1;
+*** ../vim-8.1.1413/src/message.c 2019-05-25 20:21:24.677951017 +0200
+--- src/message.c 2019-05-28 22:12:22.190705459 +0200
+***************
+*** 875,881 ****
+ (void)delete_first_msg();
+
+ /* allocate an entry and add the message at the end of the history */
+! p = (struct msg_hist *)alloc(sizeof(struct msg_hist));
+ if (p != NULL)
+ {
+ if (len < 0)
+--- 875,881 ----
+ (void)delete_first_msg();
+
+ /* allocate an entry and add the message at the end of the history */
+! p = ALLOC_ONE(struct msg_hist);
+ if (p != NULL)
+ {
+ if (len < 0)
+***************
+*** 2360,2366 ****
+
+ if (s > *sb_str)
+ {
+! mp = (msgchunk_T *)alloc(sizeof(msgchunk_T) + (s - *sb_str));
+ if (mp != NULL)
+ {
+ mp->sb_eol = finish;
+--- 2360,2366 ----
+
+ if (s > *sb_str)
+ {
+! mp = alloc(sizeof(msgchunk_T) + (s - *sb_str));
+ if (mp != NULL)
+ {
+ mp->sb_eol = finish;
+*** ../vim-8.1.1413/src/misc2.c 2019-05-25 20:21:24.677951017 +0200
+--- src/misc2.c 2019-05-28 22:16:25.429471791 +0200
+***************
+*** 821,827 ****
+ * The normal way to allocate memory. This handles an out-of-memory situation
+ * as well as possible, still returns NULL when we're completely out.
+ */
+! char_u *
+ alloc(size_t size)
+ {
+ return lalloc(size, TRUE);
+--- 821,827 ----
+ * The normal way to allocate memory. This handles an out-of-memory situation
+ * as well as possible, still returns NULL when we're completely out.
+ */
+! void *
+ alloc(size_t size)
+ {
+ return lalloc(size, TRUE);
+***************
+*** 830,836 ****
+ /*
+ * alloc() with an ID for alloc_fail().
+ */
+! char_u *
+ alloc_id(size_t size, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+--- 830,836 ----
+ /*
+ * alloc() with an ID for alloc_fail().
+ */
+! void *
+ alloc_id(size_t size, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+***************
+*** 843,852 ****
+ /*
+ * Allocate memory and set all bytes to zero.
+ */
+! char_u *
+ alloc_clear(size_t size)
+ {
+! char_u *p;
+
+ p = lalloc(size, TRUE);
+ if (p != NULL)
+--- 843,852 ----
+ /*
+ * Allocate memory and set all bytes to zero.
+ */
+! void *
+ alloc_clear(size_t size)
+ {
+! void *p;
+
+ p = lalloc(size, TRUE);
+ if (p != NULL)
+***************
+*** 857,863 ****
+ /*
+ * Same as alloc_clear() but with allocation id for testing
+ */
+! char_u *
+ alloc_clear_id(size_t size, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+--- 857,863 ----
+ /*
+ * Same as alloc_clear() but with allocation id for testing
+ */
+! void *
+ alloc_clear_id(size_t size, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+***************
+*** 870,881 ****
+ /*
+ * Allocate memory like lalloc() and set all bytes to zero.
+ */
+! char_u *
+ lalloc_clear(size_t size, int message)
+ {
+! char_u *p;
+
+! p = (lalloc(size, message));
+ if (p != NULL)
+ (void)vim_memset(p, 0, size);
+ return p;
+--- 870,881 ----
+ /*
+ * Allocate memory like lalloc() and set all bytes to zero.
+ */
+! void *
+ lalloc_clear(size_t size, int message)
+ {
+! void *p;
+
+! p = lalloc(size, message);
+ if (p != NULL)
+ (void)vim_memset(p, 0, size);
+ return p;
+***************
+*** 885,894 ****
+ * Low level memory allocation function.
+ * This is used often, KEEP IT FAST!
+ */
+! char_u *
+ lalloc(size_t size, int message)
+ {
+! char_u *p; /* pointer to new storage space */
+ static int releasing = FALSE; /* don't do mf_release_all() recursive */
+ int try_again;
+ #if defined(HAVE_AVAIL_MEM)
+--- 885,894 ----
+ * Low level memory allocation function.
+ * This is used often, KEEP IT FAST!
+ */
+! void *
+ lalloc(size_t size, int message)
+ {
+! void *p; /* pointer to new storage space */
+ static int releasing = FALSE; /* don't do mf_release_all() recursive */
+ int try_again;
+ #if defined(HAVE_AVAIL_MEM)
+***************
+*** 921,927 ****
+ * allocating KEEP_ROOM amount of memory.
+ * 3. Strict check for available memory: call mch_avail_mem()
+ */
+! if ((p = (char_u *)malloc(size)) != NULL)
+ {
+ #ifndef HAVE_AVAIL_MEM
+ /* 1. No check for available memory: Just return. */
+--- 921,927 ----
+ * allocating KEEP_ROOM amount of memory.
+ * 3. Strict check for available memory: call mch_avail_mem()
+ */
+! if ((p = malloc(size)) != NULL)
+ {
+ #ifndef HAVE_AVAIL_MEM
+ /* 1. No check for available memory: Just return. */
+***************
+*** 937,943 ****
+ /* 3. check for available memory: call mch_avail_mem() */
+ if (mch_avail_mem(TRUE) < KEEP_ROOM_KB && !releasing)
+ {
+! free((char *)p); /* System is low... no go! */
+ p = NULL;
+ }
+ else
+--- 937,943 ----
+ /* 3. check for available memory: call mch_avail_mem() */
+ if (mch_avail_mem(TRUE) < KEEP_ROOM_KB && !releasing)
+ {
+! free(p); /* System is low... no go! */
+ p = NULL;
+ }
+ else
+***************
+*** 965,971 ****
+
+ theend:
+ #ifdef MEM_PROFILE
+! mem_post_alloc((void **)&p, size);
+ #endif
+ return p;
+ }
+--- 965,971 ----
+
+ theend:
+ #ifdef MEM_PROFILE
+! mem_post_alloc(&p, size);
+ #endif
+ return p;
+ }
+***************
+*** 974,980 ****
+ * lalloc() with an ID for alloc_fail().
+ */
+ #if defined(FEAT_SIGNS) || defined(PROTO)
+! char_u *
+ lalloc_id(size_t size, int message, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+--- 974,980 ----
+ * lalloc() with an ID for alloc_fail().
+ */
+ #if defined(FEAT_SIGNS) || defined(PROTO)
+! void *
+ lalloc_id(size_t size, int message, alloc_id_T id UNUSED)
+ {
+ #ifdef FEAT_EVAL
+***************
+*** 2058,2065 ****
+ if (n < gap->ga_growsize)
+ n = gap->ga_growsize;
+ new_len = gap->ga_itemsize * (gap->ga_len + n);
+! pp = (gap->ga_data == NULL)
+! ? alloc(new_len) : vim_realloc(gap->ga_data, new_len);
+ if (pp == NULL)
+ return FAIL;
+ old_len = gap->ga_itemsize * gap->ga_maxlen;
+--- 2058,2064 ----
+ if (n < gap->ga_growsize)
+ n = gap->ga_growsize;
+ new_len = gap->ga_itemsize * (gap->ga_len + n);
+! pp = vim_realloc(gap->ga_data, new_len);
+ if (pp == NULL)
+ return FAIL;
+ old_len = gap->ga_itemsize * gap->ga_maxlen;
+***************
+*** 4055,4061 ****
+ if (moreenv() < 0)
+ return -1;
+ }
+! p = (char *)alloc(strlen(string) + 1);
+ if (p == NULL) /* not enough core */
+ return -1;
+ environ[i + 1] = 0; /* new end of env. */
+--- 4054,4060 ----
+ if (moreenv() < 0)
+ return -1;
+ }
+! p = alloc(strlen(string) + 1);
+ if (p == NULL) /* not enough core */
+ return -1;
+ environ[i + 1] = 0; /* new end of env. */
+***************
+*** 4103,4115 ****
+ ;
+
+ esize = i + EXTRASIZE + 1;
+! env = (char **)alloc(esize * sizeof (elem));
+ if (env == NULL)
+ return -1;
+
+ for (i = 0; environ[i]; i++)
+ {
+! elem = (char *)alloc(strlen(environ[i]) + 1);
+ if (elem == NULL)
+ return -1;
+ env[i] = elem;
+--- 4102,4114 ----
+ ;
+
+ esize = i + EXTRASIZE + 1;
+! env = ALLOC_MULT(char *, esize);
+ if (env == NULL)
+ return -1;
+
+ for (i = 0; environ[i]; i++)
+ {
+! elem = alloc(strlen(environ[i]) + 1);
+ if (elem == NULL)
+ return -1;
+ env[i] = elem;
+***************
+*** 4129,4135 ****
+ char **env;
+
+ esize = envsize + EXTRASIZE;
+! env = (char **)vim_realloc((char *)environ, esize * sizeof (*env));
+ if (env == 0)
+ return -1;
+ environ = env;
+--- 4128,4134 ----
+ char **env;
+
+ esize = envsize + EXTRASIZE;
+! env = vim_realloc((char *)environ, esize * sizeof (*env));
+ if (env == 0)
+ return -1;
+ environ = env;
+***************
+*** 4575,4581 ****
+ }
+ }
+
+! *argv = (char **)alloc((*argc + 4) * sizeof(char *));
+ if (*argv == NULL) /* out of memory */
+ return FAIL;
+ }
+--- 4574,4580 ----
+ }
+ }
+
+! *argv = ALLOC_MULT(char *, *argc + 4);
+ if (*argv == NULL) /* out of memory */
+ return FAIL;
+ }
+***************
+*** 4622,4628 ****
+ char_u *s;
+
+ /* Pass argv[] to mch_call_shell(). */
+! *argv = (char **)alloc(sizeof(char *) * (l->lv_len + 1));
+ if (*argv == NULL)
+ return FAIL;
+ *argc = 0;
+--- 4621,4627 ----
+ char_u *s;
+
+ /* Pass argv[] to mch_call_shell(). */
+! *argv = ALLOC_MULT(char *, l->lv_len + 1);
+ if (*argv == NULL)
+ return FAIL;
+ *argc = 0;
+***************
+*** 4667,4673 ****
+ escaped_filename = vim_strsave_escaped(filename, escape_chars);
+ if (escaped_filename == NULL)
+ return FALSE;
+! mksession_cmdline = (char *)alloc(10 + (int)STRLEN(escaped_filename) + 1);
+ if (mksession_cmdline == NULL)
+ {
+ vim_free(escaped_filename);
+--- 4666,4672 ----
+ escaped_filename = vim_strsave_escaped(filename, escape_chars);
+ if (escaped_filename == NULL)
+ return FALSE;
+! mksession_cmdline = alloc(10 + (int)STRLEN(escaped_filename) + 1);
+ if (mksession_cmdline == NULL)
+ {
+ vim_free(escaped_filename);
+*** ../vim-8.1.1413/src/netbeans.c 2019-05-24 19:38:59.104545491 +0200
+--- src/netbeans.c 2019-05-28 22:18:03.568979260 +0200
+***************
+*** 321,327 ****
+ {
+ keyQ_T *node;
+
+! node = (keyQ_T *)alloc(sizeof(keyQ_T));
+ if (node == NULL)
+ return; /* out of memory, drop the key */
+
+--- 321,327 ----
+ {
+ keyQ_T *node;
+
+! node = ALLOC_ONE(keyQ_T);
+ if (node == NULL)
+ return; /* out of memory, drop the key */
+
+***************
+*** 667,673 ****
+ if (!buf_list)
+ {
+ /* initialize */
+! buf_list = (nbbuf_T *)alloc_clear(100 * sizeof(nbbuf_T));
+ buf_list_size = 100;
+ }
+ if (bufno >= buf_list_used) /* new */
+--- 667,673 ----
+ if (!buf_list)
+ {
+ /* initialize */
+! buf_list = alloc_clear(100 * sizeof(nbbuf_T));
+ buf_list_size = 100;
+ }
+ if (bufno >= buf_list_used) /* new */
+***************
+*** 678,685 ****
+
+ incr = bufno - buf_list_size + 90;
+ buf_list_size += incr;
+! buf_list = (nbbuf_T *)vim_realloc(
+! buf_list, buf_list_size * sizeof(nbbuf_T));
+ if (buf_list == NULL)
+ {
+ vim_free(t_buf_list);
+--- 678,684 ----
+
+ incr = bufno - buf_list_size + 90;
+ buf_list_size += incr;
+! buf_list = vim_realloc(buf_list, buf_list_size * sizeof(nbbuf_T));
+ if (buf_list == NULL)
+ {
+ vim_free(t_buf_list);
+***************
+*** 863,869 ****
+ int done = 0;
+
+ /* result is never longer than input */
+! result = (char *)alloc_clear(STRLEN(p) + 1);
+ if (result == NULL)
+ return NULL;
+
+--- 862,868 ----
+ int done = 0;
+
+ /* result is never longer than input */
+! result = alloc_clear(STRLEN(p) + 1);
+ if (result == NULL)
+ return NULL;
+
+***************
+*** 2470,2476 ****
+ * length. */
+ if (text != NULL && text[0] != NUL && STRLEN(text) < MAXPATHL)
+ {
+! buf = (char *)alloc(MAXPATHL * 2 + 25);
+ if (buf != NULL)
+ {
+ p = nb_quote(text);
+--- 2469,2475 ----
+ * length. */
+ if (text != NULL && text[0] != NUL && STRLEN(text) < MAXPATHL)
+ {
+! buf = alloc(MAXPATHL * 2 + 25);
+ if (buf != NULL)
+ {
+ p = nb_quote(text);
+***************
+*** 3210,3217 ****
+ if (globalsignmaplen == 0) /* first allocation */
+ {
+ globalsignmaplen = 20;
+! globalsignmap = (char **)alloc_clear(
+! globalsignmaplen * sizeof(char *));
+ }
+ else /* grow it */
+ {
+--- 3209,3215 ----
+ if (globalsignmaplen == 0) /* first allocation */
+ {
+ globalsignmaplen = 20;
+! globalsignmap = ALLOC_CLEAR_MULT(char *, globalsignmaplen);
+ }
+ else /* grow it */
+ {
+***************
+*** 3221,3227 ****
+
+ globalsignmaplen *= 2;
+ incr = globalsignmaplen - oldlen;
+! globalsignmap = (char **)vim_realloc(globalsignmap,
+ globalsignmaplen * sizeof(char *));
+ if (globalsignmap == NULL)
+ {
+--- 3219,3225 ----
+
+ globalsignmaplen *= 2;
+ incr = globalsignmaplen - oldlen;
+! globalsignmap = vim_realloc(globalsignmap,
+ globalsignmaplen * sizeof(char *));
+ if (globalsignmap == NULL)
+ {
+***************
+*** 3248,3254 ****
+ if (buf->signmaplen == 0) /* first allocation */
+ {
+ buf->signmaplen = 5;
+! buf->signmap = (int *)alloc_clear(buf->signmaplen * sizeof(int));
+ }
+ else /* grow it */
+ {
+--- 3246,3252 ----
+ if (buf->signmaplen == 0) /* first allocation */
+ {
+ buf->signmaplen = 5;
+! buf->signmap = ALLOC_CLEAR_MULT(int, buf->signmaplen);
+ }
+ else /* grow it */
+ {
+***************
+*** 3258,3264 ****
+
+ buf->signmaplen *= 2;
+ incr = buf->signmaplen - oldlen;
+! buf->signmap = (int *)vim_realloc(buf->signmap,
+ buf->signmaplen * sizeof(int));
+ if (buf->signmap == NULL)
+ {
+--- 3256,3262 ----
+
+ buf->signmaplen *= 2;
+ incr = buf->signmaplen - oldlen;
+! buf->signmap = vim_realloc(buf->signmap,
+ buf->signmaplen * sizeof(int));
+ if (buf->signmap == NULL)
+ {
+*** ../vim-8.1.1413/src/normal.c 2019-05-23 23:27:29.781416583 +0200
+--- src/normal.c 2019-05-28 20:12:03.770451332 +0200
+***************
+*** 5655,5661 ****
+ vim_free(buf);
+ return;
+ }
+! newbuf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1);
+ if (newbuf == NULL)
+ {
+ vim_free(buf);
+--- 5655,5661 ----
+ vim_free(buf);
+ return;
+ }
+! newbuf = vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1);
+ if (newbuf == NULL)
+ {
+ vim_free(buf);
+*** ../vim-8.1.1413/src/ops.c 2019-05-25 20:21:24.677951017 +0200
+--- src/ops.c 2019-05-28 22:23:15.311427600 +0200
+***************
+*** 1003,1009 ****
+ #endif
+
+ get_yank_register(name, 0);
+! reg = (yankreg_T *)alloc(sizeof(yankreg_T));
+ if (reg != NULL)
+ {
+ *reg = *y_current;
+--- 1003,1009 ----
+ #endif
+
+ get_yank_register(name, 0);
+! reg = ALLOC_ONE(yankreg_T);
+ if (reg != NULL)
+ {
+ *reg = *y_current;
+***************
+*** 1013,1019 ****
+ if (reg->y_size == 0)
+ reg->y_array = NULL;
+ else
+! reg->y_array = (char_u **)alloc(sizeof(char_u *) * reg->y_size);
+ if (reg->y_array != NULL)
+ {
+ for (i = 0; i < reg->y_size; ++i)
+--- 1013,1019 ----
+ if (reg->y_size == 0)
+ reg->y_array = NULL;
+ else
+! reg->y_array = ALLOC_MULT(char_u *, reg->y_size);
+ if (reg->y_array != NULL)
+ {
+ for (i = 0; i < reg->y_size; ++i)
+***************
+*** 1175,1182 ****
+ else
+ {
+ free_yank_all();
+! if ((y_current->y_array =
+! (char_u **)alloc(sizeof(char_u *))) == NULL)
+ {
+ vim_free(p);
+ return FAIL;
+--- 1175,1181 ----
+ else
+ {
+ free_yank_all();
+! if ((y_current->y_array = ALLOC_ONE(char_u *)) == NULL)
+ {
+ vim_free(p);
+ return FAIL;
+***************
+*** 3057,3064 ****
+ y_current->y_size = yanklines;
+ y_current->y_type = yanktype; /* set the yank register type */
+ y_current->y_width = 0;
+! y_current->y_array = (char_u **)lalloc_clear(sizeof(char_u *) * yanklines,
+! TRUE);
+ if (y_current->y_array == NULL)
+ {
+ y_current = curr;
+--- 3056,3062 ----
+ y_current->y_size = yanklines;
+ y_current->y_type = yanktype; /* set the yank register type */
+ y_current->y_width = 0;
+! y_current->y_array = lalloc_clear(sizeof(char_u *) * yanklines, TRUE);
+ if (y_current->y_array == NULL)
+ {
+ y_current = curr;
+***************
+*** 3171,3178 ****
+
+ if (curr != y_current) /* append the new block to the old block */
+ {
+! new_ptr = (char_u **)alloc(sizeof(char_u *) *
+! (curr->y_size + y_current->y_size));
+ if (new_ptr == NULL)
+ goto fail;
+ for (j = 0; j < curr->y_size; ++j)
+--- 3169,3175 ----
+
+ if (curr != y_current) /* append the new block to the old block */
+ {
+! new_ptr = ALLOC_MULT(char_u *, curr->y_size + y_current->y_size);
+ if (new_ptr == NULL)
+ goto fail;
+ for (j = 0; j < curr->y_size; ++j)
+***************
+*** 3354,3360 ****
+ y_current = reg;
+ free_yank_all();
+ *y_current = *curr;
+! y_current->y_array = (char_u **)lalloc_clear(
+ sizeof(char_u *) * y_current->y_size, TRUE);
+ if (y_current->y_array == NULL)
+ y_current->y_size = 0;
+--- 3351,3357 ----
+ y_current = reg;
+ free_yank_all();
+ *y_current = *curr;
+! y_current->y_array = lalloc_clear(
+ sizeof(char_u *) * y_current->y_size, TRUE);
+ if (y_current->y_array == NULL)
+ y_current->y_size = 0;
+***************
+*** 3491,3497 ****
+ }
+ if (y_array != NULL)
+ break;
+! y_array = (char_u **)alloc((y_size * sizeof(char_u *)));
+ if (y_array == NULL)
+ goto end;
+ }
+--- 3488,3494 ----
+ }
+ if (y_array != NULL)
+ break;
+! y_array = ALLOC_MULT(char_u *, y_size);
+ if (y_array == NULL)
+ goto end;
+ }
+***************
+*** 4459,4465 ****
+ #if defined(FEAT_COMMENTS) || defined(PROTO)
+ if (remove_comments)
+ {
+! comments = (int *)lalloc_clear(count * sizeof(int), TRUE);
+ if (comments == NULL)
+ {
+ vim_free(spaces);
+--- 4456,4462 ----
+ #if defined(FEAT_COMMENTS) || defined(PROTO)
+ if (remove_comments)
+ {
+! comments = lalloc_clear(count * sizeof(int), TRUE);
+ if (comments == NULL)
+ {
+ vim_free(spaces);
+***************
+*** 4570,4578 ****
+ {
+ // Allocate an array to copy the text properties of joined lines into.
+ // And another array to store the number of properties in each line.
+! prop_lines = (textprop_T **)alloc_clear(
+! (count - 1) * sizeof(textprop_T *));
+! prop_lengths = (int *)alloc_clear((count - 1) * sizeof(int));
+ if (prop_lengths == NULL)
+ VIM_CLEAR(prop_lines);
+ }
+--- 4567,4574 ----
+ {
+ // Allocate an array to copy the text properties of joined lines into.
+ // And another array to store the number of properties in each line.
+! prop_lines = ALLOC_CLEAR_MULT(textprop_T *, count - 1);
+! prop_lengths = ALLOC_CLEAR_MULT(int, count - 1);
+ if (prop_lengths == NULL)
+ VIM_CLEAR(prop_lines);
+ }
+***************
+*** 5975,5982 ****
+ void
+ prepare_viminfo_registers(void)
+ {
+! y_read_regs = (yankreg_T *)alloc_clear(NUM_REGISTERS
+! * (int)sizeof(yankreg_T));
+ }
+
+ void
+--- 5971,5977 ----
+ void
+ prepare_viminfo_registers(void)
+ {
+! y_read_regs = ALLOC_CLEAR_MULT(yankreg_T, NUM_REGISTERS);
+ }
+
+ void
+***************
+*** 6051,6057 ****
+ */
+ if (set_prev)
+ y_previous = y_current;
+! array = (char_u **)alloc(limit * sizeof(char_u *));
+ str = skipwhite(skiptowhite(str));
+ if (STRNCMP(str, "CHAR", 4) == 0)
+ new_type = MCHAR;
+--- 6046,6052 ----
+ */
+ if (set_prev)
+ y_previous = y_current;
+! array = ALLOC_MULT(char_u *, limit);
+ str = skipwhite(skiptowhite(str));
+ if (STRNCMP(str, "CHAR", 4) == 0)
+ new_type = MCHAR;
+***************
+*** 6112,6118 ****
+ else
+ {
+ /* Move the lines from array[] to y_array[]. */
+! y_current->y_array = (char_u **)alloc(size * sizeof(char_u *));
+ for (i = 0; i < size; i++)
+ {
+ if (y_current->y_array == NULL)
+--- 6107,6113 ----
+ else
+ {
+ /* Move the lines from array[] to y_array[]. */
+! y_current->y_array = ALLOC_MULT(char_u *, size);
+ for (i = 0; i < size; i++)
+ {
+ if (y_current->y_array == NULL)
+***************
+*** 6209,6215 ****
+ y_ptr->y_array = NULL;
+ return;
+ }
+! y_ptr->y_array = (char_u **)alloc(linecount * sizeof(char_u *));
+ if (y_ptr->y_array == NULL)
+ {
+ y_ptr->y_size = 0; // ensure object state is consistent
+--- 6204,6210 ----
+ y_ptr->y_array = NULL;
+ return;
+ }
+! y_ptr->y_array = ALLOC_MULT(char_u *, linecount);
+ if (y_ptr->y_array == NULL)
+ {
+ y_ptr->y_size = 0; // ensure object state is consistent
+***************
+*** 7100,7107 ****
+ * Allocate an array to hold the pointers to the new register lines.
+ * If the register was not empty, move the existing lines to the new array.
+ */
+! pp = (char_u **)lalloc_clear((y_ptr->y_size + newlines)
+! * sizeof(char_u *), TRUE);
+ if (pp == NULL) /* out of memory */
+ return;
+ for (lnum = 0; lnum < y_ptr->y_size; ++lnum)
+--- 7095,7101 ----
+ * Allocate an array to hold the pointers to the new register lines.
+ * If the register was not empty, move the existing lines to the new array.
+ */
+! pp = lalloc_clear((y_ptr->y_size + newlines) * sizeof(char_u *), TRUE);
+ if (pp == NULL) /* out of memory */
+ return;
+ for (lnum = 0; lnum < y_ptr->y_size; ++lnum)
+*** ../vim-8.1.1413/src/option.c 2019-05-26 21:03:19.936073948 +0200
+--- src/option.c 2019-05-28 22:26:04.090593262 +0200
+***************
+*** 7966,7972 ****
+ wp->w_p_cc_cols = NULL;
+ else
+ {
+! wp->w_p_cc_cols = (int *)alloc(sizeof(int) * (count + 1));
+ if (wp->w_p_cc_cols != NULL)
+ {
+ /* sort the columns for faster usage on screen redraw inside
+--- 7966,7972 ----
+ wp->w_p_cc_cols = NULL;
+ else
+ {
+! wp->w_p_cc_cols = ALLOC_MULT(int, count + 1);
+ if (wp->w_p_cc_cols != NULL)
+ {
+ /* sort the columns for faster usage on screen redraw inside
+***************
+*** 10106,10113 ****
+ #define INC 20
+ #define GAP 3
+
+! items = (struct vimoption **)alloc(sizeof(struct vimoption *)
+! * PARAM_COUNT);
+ if (items == NULL)
+ return;
+
+--- 10106,10112 ----
+ #define INC 20
+ #define GAP 3
+
+! items = ALLOC_MULT(struct vimoption *, PARAM_COUNT);
+ if (items == NULL)
+ return;
+
+***************
+*** 11998,12004 ****
+ *num_file = num_term;
+ else
+ return OK;
+! *file = (char_u **)alloc(*num_file * sizeof(char_u *));
+ if (*file == NULL)
+ {
+ *file = (char_u **)"";
+--- 11997,12003 ----
+ *num_file = num_term;
+ else
+ return OK;
+! *file = ALLOC_MULT(char_u *, *num_file);
+ if (*file == NULL)
+ {
+ *file = (char_u **)"";
+***************
+*** 12016,12022 ****
+ char_u *buf;
+
+ *num_file = 0;
+! *file = (char_u **)alloc(sizeof(char_u *));
+ if (*file == NULL)
+ return FAIL;
+
+--- 12015,12021 ----
+ char_u *buf;
+
+ *num_file = 0;
+! *file = ALLOC_ONE(char_u *);
+ if (*file == NULL)
+ return FAIL;
+
+***************
+*** 12879,12885 ****
+ return FALSE;
+ }
+
+! *array = (int *)alloc((valcount + 1) * sizeof(int));
+ if (*array == NULL)
+ return FALSE;
+ (*array)[0] = valcount;
+--- 12878,12884 ----
+ return FALSE;
+ }
+
+! *array = ALLOC_MULT(int, valcount + 1);
+ if (*array == NULL)
+ return FALSE;
+ (*array)[0] = valcount;
+***************
+*** 13102,13108 ****
+
+ if (oldts == NULL)
+ return NULL;
+! newts = (int *)alloc((oldts[0] + 1) * sizeof(int));
+ if (newts != NULL)
+ for (t = 0; t <= oldts[0]; ++t)
+ newts[t] = oldts[t];
+--- 13101,13107 ----
+
+ if (oldts == NULL)
+ return NULL;
+! newts = ALLOC_MULT(int, oldts[0] + 1);
+ if (newts != NULL)
+ for (t = 0; t <= oldts[0]; ++t)
+ newts[t] = oldts[t];
+*** ../vim-8.1.1413/src/os_amiga.c 2019-05-24 19:38:59.104545491 +0200
+--- src/os_amiga.c 2019-05-28 22:26:26.486482784 +0200
+***************
+*** 580,586 ****
+ #ifdef __amigaos4__
+ fib = AllocDosObject(DOS_FIB,0);
+ #else
+! fib = (struct FileInfoBlock *)alloc(sizeof(struct FileInfoBlock));
+ #endif
+ if (fib != NULL)
+ {
+--- 580,586 ----
+ #ifdef __amigaos4__
+ fib = AllocDosObject(DOS_FIB,0);
+ #else
+! fib = ALLOC_ONE(struct FileInfoBlock);
+ #endif
+ if (fib != NULL)
+ {
+***************
+*** 1448,1454 ****
+ #ifdef __amigaos4__
+ Anchor = AllocDosObject(DOS_ANCHORPATH, AnchorTags);
+ #else
+! Anchor = (struct AnchorPath *)alloc_clear(ANCHOR_SIZE);
+ #endif
+ if (Anchor == NULL)
+ return 0;
+--- 1448,1454 ----
+ #ifdef __amigaos4__
+ Anchor = AllocDosObject(DOS_ANCHORPATH, AnchorTags);
+ #else
+! Anchor = alloc_clear(ANCHOR_SIZE);
+ #endif
+ if (Anchor == NULL)
+ return 0;
+*** ../vim-8.1.1413/src/os_mac_conv.c 2018-02-10 18:34:22.000000000 +0100
+--- src/os_mac_conv.c 2019-05-28 22:27:05.854288701 +0200
+***************
+*** 550,556 ****
+ }
+
+ convertRange = CFRangeMake(0, CFStringGetLength(utf8_str));
+! result = (UniChar *)alloc(convertRange.length * sizeof(UniChar));
+
+ CFStringGetCharacters(utf8_str, convertRange, result);
+
+--- 550,556 ----
+ }
+
+ convertRange = CFRangeMake(0, CFStringGetLength(utf8_str));
+! result = ALLOC_MULT(UniChar, convertRange.length);
+
+ CFStringGetCharacters(utf8_str, convertRange, result);
+
+*** ../vim-8.1.1413/src/os_mswin.c 2019-05-24 19:38:59.104545491 +0200
+--- src/os_mswin.c 2019-05-28 22:27:50.390069279 +0200
+***************
+*** 1801,1807 ****
+ goto fail;
+
+ size = sizeof(FILE_NAME_INFO_) + sizeof(WCHAR) * (MAX_PATH - 1);
+! nameinfo = (FILE_NAME_INFO_*)alloc(size + sizeof(WCHAR));
+ if (nameinfo == NULL)
+ goto fail;
+
+--- 1801,1807 ----
+ goto fail;
+
+ size = sizeof(FILE_NAME_INFO_) + sizeof(WCHAR) * (MAX_PATH - 1);
+! nameinfo = alloc(size + sizeof(WCHAR));
+ if (nameinfo == NULL)
+ goto fail;
+
+***************
+*** 1835,1841 ****
+ GetLastError() != ERROR_MORE_DATA)
+ goto fail;
+
+! volnames = (WCHAR*)alloc(size * sizeof(WCHAR));
+ if (!GetVolumePathNamesForVolumeNameW(buff, volnames, size,
+ &size))
+ goto fail;
+--- 1835,1841 ----
+ GetLastError() != ERROR_MORE_DATA)
+ goto fail;
+
+! volnames = ALLOC_MULT(WCHAR, size);
+ if (!GetVolumePathNamesForVolumeNameW(buff, volnames, size,
+ &size))
+ goto fail;
+***************
+*** 3078,3084 ****
+ if (ret == OK && printer_dc == NULL)
+ {
+ vim_free(lastlf);
+! lastlf = (LOGFONTW *)alloc(sizeof(LOGFONTW));
+ if (lastlf != NULL)
+ mch_memmove(lastlf, lf, sizeof(LOGFONTW));
+ }
+--- 3078,3084 ----
+ if (ret == OK && printer_dc == NULL)
+ {
+ vim_free(lastlf);
+! lastlf = ALLOC_ONE(LOGFONTW);
+ if (lastlf != NULL)
+ mch_memmove(lastlf, lf, sizeof(LOGFONTW));
+ }
+*** ../vim-8.1.1413/src/os_unix.c 2019-05-24 19:38:59.108545464 +0200
+--- src/os_unix.c 2019-05-28 22:28:51.501768391 +0200
+***************
+*** 3210,3216 ****
+ * Ignore any errors.
+ */
+ #if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
+! signal_stack = (char *)alloc(SIGSTKSZ);
+ init_signal_stack();
+ #endif
+ }
+--- 3210,3216 ----
+ * Ignore any errors.
+ */
+ #if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
+! signal_stack = alloc(SIGSTKSZ);
+ init_signal_stack();
+ #endif
+ }
+***************
+*** 6843,6849 ****
+ goto notfound;
+ }
+ *num_file = i;
+! *file = (char_u **)alloc(sizeof(char_u *) * i);
+ if (*file == NULL)
+ {
+ /* out of memory */
+--- 6843,6849 ----
+ goto notfound;
+ }
+ *num_file = i;
+! *file = ALLOC_MULT(char_u *, i);
+ if (*file == NULL)
+ {
+ /* out of memory */
+***************
+*** 6938,6944 ****
+ int i;
+ char_u *s;
+
+! *file = (char_u **)alloc(num_pat * sizeof(char_u *));
+ if (*file == NULL)
+ return FAIL;
+ for (i = 0; i < num_pat; i++)
+--- 6938,6944 ----
+ int i;
+ char_u *s;
+
+! *file = ALLOC_MULT(char_u *, num_pat);
+ if (*file == NULL)
+ return FAIL;
+ for (i = 0; i < num_pat; i++)
+*** ../vim-8.1.1413/src/os_vms.c 2019-05-25 20:21:24.677951017 +0200
+--- src/os_vms.c 2019-05-28 22:30:43.309218541 +0200
+***************
+*** 238,251 ****
+ if (sys$trnlnm(&attrib, &d_file_dev, &d_lognam, NULL,&itmlst) == SS$_NORMAL)
+ {
+ buffer[lengte] = '\0';
+! if (cp = (char_u *)alloc(lengte + 1))
+ strcpy((char *)cp, buffer);
+ return(cp);
+ }
+ else if ((sbuf = getenv((char *)lognam)))
+ {
+ lengte = strlen(sbuf) + 1;
+! cp = (char_u *)alloc(lengte);
+ if (cp)
+ strcpy((char *)cp, sbuf);
+ return cp;
+--- 238,251 ----
+ if (sys$trnlnm(&attrib, &d_file_dev, &d_lognam, NULL,&itmlst) == SS$_NORMAL)
+ {
+ buffer[lengte] = '\0';
+! if (cp = alloc(lengte + 1))
+ strcpy((char *)cp, buffer);
+ return(cp);
+ }
+ else if ((sbuf = getenv((char *)lognam)))
+ {
+ lengte = strlen(sbuf) + 1;
+! cp = alloc(lengte);
+ if (cp)
+ strcpy((char *)cp, sbuf);
+ return cp;
+***************
+*** 382,388 ****
+ if (vms_match_num == 0) {
+ /* first time through, setup some things */
+ if (NULL == vms_fmatch) {
+! vms_fmatch = (char_u **)alloc(EXPL_ALLOC_INC * sizeof(char *));
+ if (!vms_fmatch)
+ return 0;
+ vms_match_alloced = EXPL_ALLOC_INC;
+--- 382,388 ----
+ if (vms_match_num == 0) {
+ /* first time through, setup some things */
+ if (NULL == vms_fmatch) {
+! vms_fmatch = ALLOC_MULT(char *, EXPL_ALLOC_INC);
+ if (!vms_fmatch)
+ return 0;
+ vms_match_alloced = EXPL_ALLOC_INC;
+***************
+*** 406,412 ****
+ if (--vms_match_free == 0) {
+ /* add more space to store matches */
+ vms_match_alloced += EXPL_ALLOC_INC;
+! vms_fmatch = (char_u **)vim_realloc(vms_fmatch,
+ sizeof(char **) * vms_match_alloced);
+ if (!vms_fmatch)
+ return 0;
+--- 406,412 ----
+ if (--vms_match_free == 0) {
+ /* add more space to store matches */
+ vms_match_alloced += EXPL_ALLOC_INC;
+! vms_fmatch = vim_realloc(vms_fmatch,
+ sizeof(char **) * vms_match_alloced);
+ if (!vms_fmatch)
+ return 0;
+***************
+*** 443,449 ****
+ *num_file = 0; /* default: no files found */
+ files_alloced = EXPL_ALLOC_INC;
+ files_free = EXPL_ALLOC_INC;
+! *file = (char_u **) alloc(sizeof(char_u **) * files_alloced);
+ if (*file == NULL)
+ {
+ *num_file = 0;
+--- 443,449 ----
+ *num_file = 0; /* default: no files found */
+ files_alloced = EXPL_ALLOC_INC;
+ files_free = EXPL_ALLOC_INC;
+! *file = ALLOC_MULT(char_u **, files_alloced);
+ if (*file == NULL)
+ {
+ *num_file = 0;
+***************
+*** 490,497 ****
+ if (--files_free < 1)
+ {
+ files_alloced += EXPL_ALLOC_INC;
+! *file = (char_u **)vim_realloc(*file,
+! sizeof(char_u **) * files_alloced);
+ if (*file == NULL)
+ {
+ *file = (char_u **)"";
+--- 490,496 ----
+ if (--files_free < 1)
+ {
+ files_alloced += EXPL_ALLOC_INC;
+! *file = vim_realloc(*file, sizeof(char_u **) * files_alloced);
+ if (*file == NULL)
+ {
+ *file = (char_u **)"";
+***************
+*** 649,663 ****
+ if (len > buflen)
+ {
+ buflen = len + 128;
+! if (buf)
+! buf = (char *)vim_realloc(buf, buflen);
+! else
+! buf = (char *)alloc(buflen * sizeof(char));
+ }
+
+ #ifdef DEBUG
+ char *tmpbuf = NULL;
+! tmpbuf = (char *)alloc(buflen * sizeof(char));
+ strcpy(tmpbuf, instring);
+ #endif
+
+--- 648,659 ----
+ if (len > buflen)
+ {
+ buflen = len + 128;
+! buf = vim_realloc(buf, buflen * sizeof(char));
+ }
+
+ #ifdef DEBUG
+ char *tmpbuf = NULL;
+! tmpbuf = ALLOC_MULT(char, buflen);
+ strcpy(tmpbuf, instring);
+ #endif
+
+*** ../vim-8.1.1413/src/os_win32.c 2019-05-25 20:21:24.681950994 +0200
+--- src/os_win32.c 2019-05-28 22:33:23.000434245 +0200
+***************
+*** 2075,2081 ****
+ return FALSE;
+
+ wcurpath = _wgetenv(L"PATH");
+! wnewpath = (WCHAR *)alloc((wcslen(wcurpath) + 3) * sizeof(WCHAR));
+ if (wnewpath == NULL)
+ return FALSE;
+ wcscpy(wnewpath, L".;");
+--- 2075,2081 ----
+ return FALSE;
+
+ wcurpath = _wgetenv(L"PATH");
+! wnewpath = ALLOC_MULT(WCHAR, wcslen(wcurpath) + 3);
+ if (wnewpath == NULL)
+ return FALSE;
+ wcscpy(wnewpath, L".;");
+***************
+*** 2338,2344 ****
+ cb->BufferSize.Y = cb->Info.dwSize.Y;
+ NumCells = cb->BufferSize.X * cb->BufferSize.Y;
+ vim_free(cb->Buffer);
+! cb->Buffer = (PCHAR_INFO)alloc(NumCells * sizeof(CHAR_INFO));
+ if (cb->Buffer == NULL)
+ return FALSE;
+ }
+--- 2338,2344 ----
+ cb->BufferSize.Y = cb->Info.dwSize.Y;
+ NumCells = cb->BufferSize.X * cb->BufferSize.Y;
+ vim_free(cb->Buffer);
+! cb->Buffer = ALLOC_MULT(CHAR_INFO, NumCells);
+ if (cb->Buffer == NULL)
+ return FALSE;
+ }
+***************
+*** 2362,2368 ****
+ {
+ cb->NumRegions = numregions;
+ vim_free(cb->Regions);
+! cb->Regions = (PSMALL_RECT)alloc(cb->NumRegions * sizeof(SMALL_RECT));
+ if (cb->Regions == NULL)
+ {
+ VIM_CLEAR(cb->Buffer);
+--- 2362,2368 ----
+ {
+ cb->NumRegions = numregions;
+ vim_free(cb->Regions);
+! cb->Regions = ALLOC_MULT(SMALL_RECT, cb->NumRegions);
+ if (cb->Regions == NULL)
+ {
+ VIM_CLEAR(cb->Buffer);
+***************
+*** 3394,3400 ****
+ struct my_acl *p = NULL;
+ DWORD err;
+
+! p = (struct my_acl *)alloc_clear(sizeof(struct my_acl));
+ if (p != NULL)
+ {
+ WCHAR *wn;
+--- 3394,3400 ----
+ struct my_acl *p = NULL;
+ DWORD err;
+
+! p = ALLOC_CLEAR_ONE(struct my_acl);
+ if (p != NULL)
+ {
+ WCHAR *wn;
+***************
+*** 5952,5958 ****
+ WORD attrFlash = ~g_attrCurrent & 0xff;
+
+ DWORD dwDummy;
+! LPWORD oldattrs = (LPWORD)alloc(Rows * Columns * sizeof(WORD));
+
+ if (oldattrs == NULL)
+ return;
+--- 5952,5958 ----
+ WORD attrFlash = ~g_attrCurrent & 0xff;
+
+ DWORD dwDummy;
+! LPWORD oldattrs = ALLOC_MULT(WORD, Rows * Columns);
+
+ if (oldattrs == NULL)
+ return;
+***************
+*** 6003,6009 ****
+ if (unicodebuf == NULL || length > unibuflen)
+ {
+ vim_free(unicodebuf);
+! unicodebuf = (WCHAR *)lalloc(length * sizeof(WCHAR), FALSE);
+ unibuflen = length;
+ }
+ MultiByteToWideChar(cp, 0, (LPCSTR)pchBuf, cbToWrite,
+--- 6003,6009 ----
+ if (unicodebuf == NULL || length > unibuflen)
+ {
+ vim_free(unicodebuf);
+! unicodebuf = LALLOC_MULT(WCHAR, length);
+ unibuflen = length;
+ }
+ MultiByteToWideChar(cp, 0, (LPCSTR)pchBuf, cbToWrite,
+***************
+*** 7117,7123 ****
+ return;
+
+ /* Remember the buffer numbers for the arguments. */
+! fnum_list = (int *)alloc(sizeof(int) * GARGCOUNT);
+ if (fnum_list == NULL)
+ return; /* out of memory */
+ for (i = 0; i < GARGCOUNT; ++i)
+--- 7117,7123 ----
+ return;
+
+ /* Remember the buffer numbers for the arguments. */
+! fnum_list = ALLOC_MULT(int, GARGCOUNT);
+ if (fnum_list == NULL)
+ return; /* out of memory */
+ for (i = 0; i < GARGCOUNT; ++i)
+*** ../vim-8.1.1413/src/popupmnu.c 2019-05-24 19:38:59.108545464 +0200
+--- src/popupmnu.c 2019-05-28 20:34:46.830113475 +0200
+***************
+*** 1071,1077 ****
+ * position. */
+ if (height > max_height)
+ height = max_height;
+! *array = (pumitem_T *)alloc_clear(sizeof(pumitem_T) * height);
+ if (*array == NULL)
+ goto failed;
+
+--- 1071,1077 ----
+ * position. */
+ if (height > max_height)
+ height = max_height;
+! *array = ALLOC_CLEAR_MULT(pumitem_T, height);
+ if (*array == NULL)
+ goto failed;
+
+***************
+*** 1164,1171 ****
+ int idx;
+
+ balloon_arraysize = list->lv_len;
+! balloon_array = (pumitem_T *)alloc_clear(
+! sizeof(pumitem_T) * list->lv_len);
+ if (balloon_array == NULL)
+ return;
+ for (idx = 0, li = list->lv_first; li != NULL; li = li->li_next, ++idx)
+--- 1164,1170 ----
+ int idx;
+
+ balloon_arraysize = list->lv_len;
+! balloon_array = ALLOC_CLEAR_MULT(pumitem_T, list->lv_len);
+ if (balloon_array == NULL)
+ return;
+ for (idx = 0, li = list->lv_first; li != NULL; li = li->li_next, ++idx)
+***************
+*** 1271,1277 ****
+ return;
+ }
+
+! array = (pumitem_T *)alloc_clear(sizeof(pumitem_T) * pum_size);
+ if (array == NULL)
+ return;
+
+--- 1270,1276 ----
+ return;
+ }
+
+! array = ALLOC_CLEAR_MULT(pumitem_T, pum_size);
+ if (array == NULL)
+ return;
+
+*** ../vim-8.1.1413/src/proto/misc2.pro 2019-05-24 18:48:36.746128566 +0200
+--- src/proto/misc2.pro 2019-05-28 20:12:11.506411492 +0200
+***************
+*** 21,33 ****
+ int leftcol_changed(void);
+ void vim_mem_profile_dump(void);
+ int alloc_does_fail(size_t size);
+! char_u *alloc(size_t size);
+! char_u *alloc_id(size_t size, alloc_id_T id);
+! char_u *alloc_clear(size_t size);
+! char_u *alloc_clear_id(size_t size, alloc_id_T id);
+! char_u *lalloc_clear(size_t size, int message);
+! char_u *lalloc(size_t size, int message);
+! char_u *lalloc_id(size_t size, int message, alloc_id_T id);
+ void *mem_realloc(void *ptr, size_t size);
+ void do_outofmem_msg(size_t size);
+ void free_all_mem(void);
+--- 21,33 ----
+ int leftcol_changed(void);
+ void vim_mem_profile_dump(void);
+ int alloc_does_fail(size_t size);
+! void *alloc(size_t size);
+! void *alloc_id(size_t size, alloc_id_T id);
+! void *alloc_clear(size_t size);
+! void *alloc_clear_id(size_t size, alloc_id_T id);
+! void *lalloc_clear(size_t size, int message);
+! void *lalloc(size_t size, int message);
+! void *lalloc_id(size_t size, int message, alloc_id_T id);
+ void *mem_realloc(void *ptr, size_t size);
+ void do_outofmem_msg(size_t size);
+ void free_all_mem(void);
+*** ../vim-8.1.1413/src/quickfix.c 2019-05-25 20:21:24.681950994 +0200
+--- src/quickfix.c 2019-05-28 22:35:16.887875520 +0200
+***************
+*** 540,546 ****
+ while (efm[0] != NUL)
+ {
+ // Allocate a new eformat structure and put it at the end of the list
+! fmt_ptr = (efm_T *)alloc_clear(sizeof(efm_T));
+ if (fmt_ptr == NULL)
+ goto parse_efm_error;
+ if (fmt_first == NULL) // first one
+--- 540,546 ----
+ while (efm[0] != NUL)
+ {
+ // Allocate a new eformat structure and put it at the end of the list
+! fmt_ptr = ALLOC_CLEAR_ONE(efm_T);
+ if (fmt_ptr == NULL)
+ goto parse_efm_error;
+ if (fmt_first == NULL) // first one
+***************
+*** 1890,1896 ****
+ {
+ qf_delq_T *q;
+
+! q = (qf_delq_T *)alloc(sizeof(qf_delq_T));
+ if (q != NULL)
+ {
+ q->qi = qi;
+--- 1890,1896 ----
+ {
+ qf_delq_T *q;
+
+! q = ALLOC_ONE(qf_delq_T);
+ if (q != NULL)
+ {
+ q->qi = qi;
+***************
+*** 2063,2069 ****
+ qfline_T *qfp;
+ qfline_T **lastp; // pointer to qf_last or NULL
+
+! if ((qfp = (qfline_T *)alloc(sizeof(qfline_T))) == NULL)
+ return QF_FAIL;
+ if (bufnum != 0)
+ {
+--- 2063,2069 ----
+ qfline_T *qfp;
+ qfline_T **lastp; // pointer to qf_last or NULL
+
+! if ((qfp = ALLOC_ONE(qfline_T)) == NULL)
+ return QF_FAIL;
+ if (bufnum != 0)
+ {
+***************
+*** 2141,2147 ****
+ {
+ qf_info_T *qi;
+
+! qi = (qf_info_T *)alloc_clear(sizeof(qf_info_T));
+ if (qi != NULL)
+ {
+ qi->qf_refcount++;
+--- 2141,2147 ----
+ {
+ qf_info_T *qi;
+
+! qi = ALLOC_CLEAR_ONE(qf_info_T);
+ if (qi != NULL)
+ {
+ qi->qf_refcount++;
+***************
+*** 2429,2435 ****
+ struct dir_stack_T *ds_ptr;
+
+ // allocate new stack element and hook it in
+! ds_new = (struct dir_stack_T *)alloc(sizeof(struct dir_stack_T));
+ if (ds_new == NULL)
+ return NULL;
+
+--- 2429,2435 ----
+ struct dir_stack_T *ds_ptr;
+
+ // allocate new stack element and hook it in
+! ds_new = ALLOC_ONE(struct dir_stack_T);
+ if (ds_new == NULL)
+ return NULL;
+
+*** ../vim-8.1.1413/src/regexp.c 2019-05-24 19:38:59.108545464 +0200
+--- src/regexp.c 2019-05-28 20:27:16.592828285 +0200
+***************
+*** 1319,1325 ****
+ return NULL;
+
+ /* Allocate space. */
+! r = (bt_regprog_T *)alloc(sizeof(bt_regprog_T) + regsize);
+ if (r == NULL)
+ return NULL;
+ r->re_in_use = FALSE;
+--- 1319,1325 ----
+ return NULL;
+
+ /* Allocate space. */
+! r = alloc(sizeof(bt_regprog_T) + regsize);
+ if (r == NULL)
+ return NULL;
+ r->re_in_use = FALSE;
+***************
+*** 3932,3938 ****
+ {
+ reg_extmatch_T *em;
+
+! em = (reg_extmatch_T *)alloc_clear(sizeof(reg_extmatch_T));
+ if (em != NULL)
+ em->refcnt = 1;
+ return em;
+--- 3932,3938 ----
+ {
+ reg_extmatch_T *em;
+
+! em = ALLOC_CLEAR_ONE(reg_extmatch_T);
+ if (em != NULL)
+ em->refcnt = 1;
+ return em;
+*** ../vim-8.1.1413/src/regexp_nfa.c 2019-05-25 20:21:24.681950994 +0200
+--- src/regexp_nfa.c 2019-05-28 22:36:31.083398968 +0200
+***************
+*** 300,306 ****
+ /* Size for postfix representation of expr. */
+ postfix_size = sizeof(int) * nstate_max;
+
+! post_start = (int *)alloc(postfix_size);
+ if (post_start == NULL)
+ return FAIL;
+ post_ptr = post_start;
+--- 300,306 ----
+ /* Size for postfix representation of expr. */
+ postfix_size = sizeof(int) * nstate_max;
+
+! post_start = alloc(postfix_size);
+ if (post_start == NULL)
+ return FAIL;
+ post_ptr = post_start;
+***************
+*** 516,522 ****
+ // For weird patterns the number of states can be very high. Increasing by
+ // 50% seems a reasonable compromise between memory use and speed.
+ new_max = nstate_max * 3 / 2;
+! new_start = (int *)alloc(new_max * sizeof(int));
+ if (new_start == NULL)
+ return FAIL;
+ mch_memmove(new_start, post_start, nstate_max * sizeof(int));
+--- 516,522 ----
+ // For weird patterns the number of states can be very high. Increasing by
+ // 50% seems a reasonable compromise between memory use and speed.
+ new_max = nstate_max * 3 / 2;
+! new_start = ALLOC_MULT(int, new_max);
+ if (new_start == NULL)
+ return FAIL;
+ mch_memmove(new_start, post_start, nstate_max * sizeof(int));
+***************
+*** 3214,3220 ****
+ if (nfa_calc_size == FALSE)
+ {
+ // Allocate space for the stack. Max states on the stack: "nstate'.
+! stack = (Frag_T *)alloc((nstate + 1) * sizeof(Frag_T));
+ if (stack == NULL)
+ return NULL;
+ stackp = stack;
+--- 3214,3220 ----
+ if (nfa_calc_size == FALSE)
+ {
+ // Allocate space for the stack. Max states on the stack: "nstate'.
+! stack = ALLOC_MULT(Frag_T, nstate + 1);
+ if (stack == NULL)
+ return NULL;
+ stackp = stack;
+***************
+*** 4799,4805 ****
+ emsg(_(e_maxmempat));
+ return NULL;
+ }
+! newl = (nfa_thread_T *)alloc(newsize);
+ if (newl == NULL)
+ return NULL;
+ l->len = newlen;
+--- 4799,4805 ----
+ emsg(_(e_maxmempat));
+ return NULL;
+ }
+! newl = alloc(newsize);
+ if (newl == NULL)
+ return NULL;
+ l->len = newlen;
+***************
+*** 5184,5190 ****
+ if (*listids == NULL || *listids_len < prog->nstate)
+ {
+ vim_free(*listids);
+! *listids = (int *)alloc(sizeof(int) * prog->nstate);
+ if (*listids == NULL)
+ {
+ emsg(_("E878: (NFA) Could not allocate memory for branch traversal!"));
+--- 5184,5190 ----
+ if (*listids == NULL || *listids_len < prog->nstate)
+ {
+ vim_free(*listids);
+! *listids = ALLOC_MULT(int, prog->nstate);
+ if (*listids == NULL)
+ {
+ emsg(_("E878: (NFA) Could not allocate memory for branch traversal!"));
+***************
+*** 5567,5575 ****
+ /* Allocate memory for the lists of nodes. */
+ size = (prog->nstate + 1) * sizeof(nfa_thread_T);
+
+! list[0].t = (nfa_thread_T *)alloc(size);
+ list[0].len = prog->nstate + 1;
+! list[1].t = (nfa_thread_T *)alloc(size);
+ list[1].len = prog->nstate + 1;
+ if (list[0].t == NULL || list[1].t == NULL)
+ goto theend;
+--- 5567,5575 ----
+ /* Allocate memory for the lists of nodes. */
+ size = (prog->nstate + 1) * sizeof(nfa_thread_T);
+
+! list[0].t = alloc(size);
+ list[0].len = prog->nstate + 1;
+! list[1].t = alloc(size);
+ list[1].len = prog->nstate + 1;
+ if (list[0].t == NULL || list[1].t == NULL)
+ goto theend;
+***************
+*** 7276,7282 ****
+
+ /* allocate the regprog with space for the compiled regexp */
+ prog_size = sizeof(nfa_regprog_T) + sizeof(nfa_state_T) * (nstate - 1);
+! prog = (nfa_regprog_T *)alloc(prog_size);
+ if (prog == NULL)
+ goto fail;
+ state_ptr = prog->state;
+--- 7276,7282 ----
+
+ /* allocate the regprog with space for the compiled regexp */
+ prog_size = sizeof(nfa_regprog_T) + sizeof(nfa_state_T) * (nstate - 1);
+! prog = alloc(prog_size);
+ if (prog == NULL)
+ goto fail;
+ state_ptr = prog->state;
+*** ../vim-8.1.1413/src/screen.c 2019-05-27 21:53:53.990229301 +0200
+--- src/screen.c 2019-05-28 22:38:45.078506457 +0200
+***************
+*** 328,354 ****
+
+ /* Allocate space to save the text displayed in the command line area. */
+ rows = screen_Rows - cmdline_row;
+! screenline = (schar_T *)lalloc(rows * cols * sizeof(schar_T), FALSE);
+! screenattr = (sattr_T *)lalloc(rows * cols * sizeof(sattr_T), FALSE);
+ if (screenline == NULL || screenattr == NULL)
+ ret = 2;
+ if (enc_utf8)
+ {
+! screenlineUC = (u8char_T *)lalloc(
+! rows * cols * sizeof(u8char_T), FALSE);
+ if (screenlineUC == NULL)
+ ret = 2;
+ for (i = 0; i < p_mco; ++i)
+ {
+! screenlineC[i] = (u8char_T *)lalloc(
+! rows * cols * sizeof(u8char_T), FALSE);
+ if (screenlineC[i] == NULL)
+ ret = 2;
+ }
+ }
+ if (enc_dbcs == DBCS_JPNU)
+ {
+! screenline2 = (schar_T *)lalloc(rows * cols * sizeof(schar_T), FALSE);
+ if (screenline2 == NULL)
+ ret = 2;
+ }
+--- 328,352 ----
+
+ /* Allocate space to save the text displayed in the command line area. */
+ rows = screen_Rows - cmdline_row;
+! screenline = LALLOC_MULT(schar_T, rows * cols);
+! screenattr = LALLOC_MULT(sattr_T, rows * cols);
+ if (screenline == NULL || screenattr == NULL)
+ ret = 2;
+ if (enc_utf8)
+ {
+! screenlineUC = LALLOC_MULT(u8char_T, rows * cols);
+ if (screenlineUC == NULL)
+ ret = 2;
+ for (i = 0; i < p_mco; ++i)
+ {
+! screenlineC[i] = LALLOC_MULT(u8char_T, rows * cols);
+ if (screenlineC[i] == NULL)
+ ret = 2;
+ }
+ }
+ if (enc_dbcs == DBCS_JPNU)
+ {
+! screenline2 = LALLOC_MULT(schar_T, rows * cols);
+ if (screenline2 == NULL)
+ ret = 2;
+ }
+***************
+*** 3810,3823 ****
+ {
+ // 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;
+ }
+--- 3808,3820 ----
+ {
+ // Make a copy of the properties, so that they are properly
+ // aligned.
+! text_props = ALLOC_MULT(textprop_T, text_prop_count);
+ 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 = ALLOC_MULT(int, text_prop_count);
+ area_highlighting = TRUE;
+ extra_check = TRUE;
+ }
+***************
+*** 8901,8925 ****
+ if (aucmd_win != NULL)
+ win_free_lsize(aucmd_win);
+
+! new_ScreenLines = (schar_T *)lalloc(
+! (Rows + 1) * Columns * sizeof(schar_T), FALSE);
+ vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T *) * MAX_MCO);
+ if (enc_utf8)
+ {
+! new_ScreenLinesUC = (u8char_T *)lalloc(
+! (Rows + 1) * Columns * sizeof(u8char_T), FALSE);
+ for (i = 0; i < p_mco; ++i)
+! new_ScreenLinesC[i] = (u8char_T *)lalloc_clear(
+! (Rows + 1) * Columns * sizeof(u8char_T), FALSE);
+ }
+ if (enc_dbcs == DBCS_JPNU)
+! new_ScreenLines2 = (schar_T *)lalloc(
+! (Rows + 1) * Columns * sizeof(schar_T), FALSE);
+! new_ScreenAttrs = (sattr_T *)lalloc(
+! (Rows + 1) * Columns * sizeof(sattr_T), FALSE);
+! new_LineOffset = (unsigned *)lalloc(Rows * sizeof(unsigned), FALSE);
+! new_LineWraps = (char_u *)lalloc(Rows * sizeof(char_u), FALSE);
+! new_TabPageIdxs = (short *)lalloc(Columns * sizeof(short), FALSE);
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ {
+--- 8898,8918 ----
+ if (aucmd_win != NULL)
+ win_free_lsize(aucmd_win);
+
+! new_ScreenLines = LALLOC_MULT(schar_T, (Rows + 1) * Columns);
+ vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T *) * MAX_MCO);
+ if (enc_utf8)
+ {
+! new_ScreenLinesUC = LALLOC_MULT(u8char_T, (Rows + 1) * Columns);
+ for (i = 0; i < p_mco; ++i)
+! new_ScreenLinesC[i] = LALLOC_CLEAR_MULT(u8char_T,
+! (Rows + 1) * Columns);
+ }
+ if (enc_dbcs == DBCS_JPNU)
+! new_ScreenLines2 = LALLOC_MULT(schar_T, (Rows + 1) * Columns);
+! new_ScreenAttrs = LALLOC_MULT(sattr_T, (Rows + 1) * Columns);
+! new_LineOffset = LALLOC_MULT(unsigned, Rows);
+! new_LineWraps = LALLOC_MULT(char_u, Rows);
+! new_TabPageIdxs = LALLOC_MULT(short, Columns);
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ {
+***************
+*** 10858,10865 ****
+ vim_free(wp->w_winbar_items);
+ for (menu = wp->w_winbar->children; menu != NULL; menu = menu->next)
+ ++item_count;
+! wp->w_winbar_items = (winbar_item_T *)alloc_clear(
+! sizeof(winbar_item_T) * (item_count + 1));
+
+ /* TODO: use fewer spaces if there is not enough room */
+ for (menu = wp->w_winbar->children;
+--- 10851,10857 ----
+ vim_free(wp->w_winbar_items);
+ for (menu = wp->w_winbar->children; menu != NULL; menu = menu->next)
+ ++item_count;
+! wp->w_winbar_items = ALLOC_CLEAR_MULT(winbar_item_T, item_count + 1);
+
+ /* TODO: use fewer spaces if there is not enough room */
+ for (menu = wp->w_winbar->children;
+*** ../vim-8.1.1413/src/search.c 2019-05-25 20:21:24.681950994 +0200
+--- src/search.c 2019-05-28 22:44:02.532550679 +0200
+***************
+*** 5145,5152 ****
+ goto fpip_end;
+ def_regmatch.rm_ic = FALSE; /* don't ignore case in define pat. */
+ }
+! files = (SearchedFile *)lalloc_clear(
+! max_path_depth * sizeof(SearchedFile), TRUE);
+ if (files == NULL)
+ goto fpip_end;
+ old_files = max_path_depth;
+--- 5145,5151 ----
+ goto fpip_end;
+ def_regmatch.rm_ic = FALSE; /* don't ignore case in define pat. */
+ }
+! files = lalloc_clear(max_path_depth * sizeof(SearchedFile), TRUE);
+ if (files == NULL)
+ goto fpip_end;
+ old_files = max_path_depth;
+***************
+*** 5306,5313 ****
+ /* Push the new file onto the file stack */
+ if (depth + 1 == old_files)
+ {
+! bigger = (SearchedFile *)alloc(
+! max_path_depth * 2 * sizeof(SearchedFile));
+ if (bigger != NULL)
+ {
+ for (i = 0; i <= depth; i++)
+--- 5305,5311 ----
+ /* Push the new file onto the file stack */
+ if (depth + 1 == old_files)
+ {
+! bigger = ALLOC_MULT(SearchedFile, max_path_depth * 2);
+ if (bigger != NULL)
+ {
+ for (i = 0; i <= depth; i++)
+*** ../vim-8.1.1413/src/sign.c 2019-05-25 20:21:24.681950994 +0200
+--- src/sign.c 2019-05-28 22:41:10.249589206 +0200
+***************
+*** 85,91 ****
+ if (HASHITEM_EMPTY(hi))
+ {
+ // new group
+! group = (signgroup_T *)alloc(sizeof(signgroup_T) + STRLEN(groupname));
+ if (group == NULL)
+ return NULL;
+ STRCPY(group->sg_name, groupname);
+--- 85,91 ----
+ if (HASHITEM_EMPTY(hi))
+ {
+ // new group
+! group = alloc(sizeof(signgroup_T) + STRLEN(groupname));
+ if (group == NULL)
+ return NULL;
+ STRCPY(group->sg_name, groupname);
+***************
+*** 201,208 ****
+ {
+ signlist_T *newsign;
+
+! newsign = (signlist_T *)lalloc_id(sizeof(signlist_T), FALSE,
+! aid_insert_sign);
+ if (newsign != NULL)
+ {
+ newsign->id = id;
+--- 201,207 ----
+ {
+ signlist_T *newsign;
+
+! newsign = lalloc_id(sizeof(signlist_T), FALSE, aid_insert_sign);
+ if (newsign != NULL)
+ {
+ newsign->id = id;
+***************
+*** 736,742 ****
+ int start = next_sign_typenr;
+
+ // Allocate a new sign.
+! sp = (sign_T *)alloc_clear_id(sizeof(sign_T), aid_sign_define_by_name);
+ if (sp == NULL)
+ return NULL;
+
+--- 735,741 ----
+ int start = next_sign_typenr;
+
+ // Allocate a new sign.
+! sp = alloc_clear_id(sizeof(sign_T), aid_sign_define_by_name);
+ if (sp == NULL)
+ return NULL;
+
+*** ../vim-8.1.1413/src/spell.c 2019-05-24 19:38:59.112545434 +0200
+--- src/spell.c 2019-05-28 20:32:44.870829922 +0200
+***************
+*** 1899,1905 ****
+ {
+ slang_T *lp;
+
+! lp = (slang_T *)alloc_clear(sizeof(slang_T));
+ if (lp != NULL)
+ {
+ if (lang != NULL)
+--- 1899,1905 ----
+ {
+ slang_T *lp;
+
+! lp = ALLOC_CLEAR_ONE(slang_T);
+ if (lp != NULL)
+ {
+ if (lang != NULL)
+***************
+*** 2083,2089 ****
+ hi = hash_lookup(&lp->sl_wordcount, p, hash);
+ if (HASHITEM_EMPTY(hi))
+ {
+! wc = (wordcount_T *)alloc(sizeof(wordcount_T) + STRLEN(p));
+ if (wc == NULL)
+ return;
+ STRCPY(wc->wc_word, p);
+--- 2083,2089 ----
+ hi = hash_lookup(&lp->sl_wordcount, p, hash);
+ if (HASHITEM_EMPTY(hi))
+ {
+! wc = alloc(sizeof(wordcount_T) + STRLEN(p));
+ if (wc == NULL)
+ return;
+ STRCPY(wc->wc_word, p);
+***************
+*** 2883,2889 ****
+ {
+ buf_T *buf;
+
+! buf = (buf_T *)alloc_clear(sizeof(buf_T));
+ if (buf != NULL)
+ {
+ buf->b_spell = TRUE;
+--- 2883,2889 ----
+ {
+ buf_T *buf;
+
+! buf = ALLOC_CLEAR_ONE(buf_T);
+ if (buf != NULL)
+ {
+ buf->b_spell = TRUE;
+***************
+*** 6223,6229 ****
+ hi = hash_lookup(&slang->sl_sounddone, goodword, hash);
+ if (HASHITEM_EMPTY(hi))
+ {
+! sft = (sftword_T *)alloc(sizeof(sftword_T) + STRLEN(goodword));
+ if (sft != NULL)
+ {
+ sft->sft_score = score;
+--- 6223,6229 ----
+ hi = hash_lookup(&slang->sl_sounddone, goodword, hash);
+ if (HASHITEM_EMPTY(hi))
+ {
+! sft = alloc(sizeof(sftword_T) + STRLEN(goodword));
+ if (sft != NULL)
+ {
+ sft->sft_score = score;
+***************
+*** 7820,7826 ****
+
+ /* We use "cnt" as an array: CNT(badword_idx, goodword_idx). */
+ #define CNT(a, b) cnt[(a) + (b) * (badlen + 1)]
+! cnt = (int *)alloc(sizeof(int) * (badlen + 1) * (goodlen + 1));
+ if (cnt == NULL)
+ return 0; /* out of memory */
+
+--- 7820,7826 ----
+
+ /* We use "cnt" as an array: CNT(badword_idx, goodword_idx). */
+ #define CNT(a, b) cnt[(a) + (b) * (badlen + 1)]
+! cnt = ALLOC_MULT(int, (badlen + 1) * (goodlen + 1));
+ if (cnt == NULL)
+ return 0; /* out of memory */
+
+*** ../vim-8.1.1413/src/spellfile.c 2019-05-24 19:38:59.112545434 +0200
+--- src/spellfile.c 2019-05-28 22:41:30.177466603 +0200
+***************
+*** 892,898 ****
+ if (cnt <= 0)
+ return SP_FORMERROR;
+
+! lp->sl_prefprog = (regprog_T **)alloc_clear(sizeof(regprog_T *) * cnt);
+ if (lp->sl_prefprog == NULL)
+ return SP_OTHERERROR;
+ lp->sl_prefixcnt = cnt;
+--- 892,898 ----
+ if (cnt <= 0)
+ return SP_FORMERROR;
+
+! lp->sl_prefprog = ALLOC_CLEAR_MULT(regprog_T *, cnt);
+ if (lp->sl_prefprog == NULL)
+ return SP_OTHERERROR;
+ lp->sl_prefixcnt = cnt;
+***************
+*** 1539,1545 ****
+ char_u *p;
+ int i = 0;
+
+! res = (int *)alloc(sizeof(int) * (mb_charlen(s) + 1));
+ if (res != NULL)
+ {
+ for (p = s; *p != NUL; )
+--- 1539,1545 ----
+ char_u *p;
+ int i = 0;
+
+! res = ALLOC_MULT(int, mb_charlen(s) + 1);
+ if (res != NULL)
+ {
+ for (p = s; *p != NUL; )
+***************
+*** 1585,1591 ****
+ *bytsp = bp;
+
+ /* Allocate the index array. */
+! ip = (idx_T *)lalloc_clear(len * sizeof(int), TRUE);
+ if (ip == NULL)
+ return SP_OTHERERROR;
+ *idxsp = ip;
+--- 1585,1591 ----
+ *bytsp = bp;
+
+ /* Allocate the index array. */
+! ip = lalloc_clear(len * sizeof(int), TRUE);
+ if (ip == NULL)
+ return SP_OTHERERROR;
+ *idxsp = ip;
+***************
+*** 4271,4277 ****
+ bl = NULL;
+ else
+ /* Allocate a block of memory. It is not freed until much later. */
+! bl = (sblock_T *)alloc_clear(sizeof(sblock_T) + SBLOCKSIZE);
+ if (bl == NULL)
+ {
+ if (!spin->si_did_emsg)
+--- 4271,4277 ----
+ bl = NULL;
+ else
+ /* Allocate a block of memory. It is not freed until much later. */
+! bl = alloc_clear(sizeof(sblock_T) + SBLOCKSIZE);
+ if (bl == NULL)
+ {
+ if (!spin->si_did_emsg)
+*** ../vim-8.1.1413/src/syntax.c 2019-05-25 23:42:10.226781089 +0200
+--- src/syntax.c 2019-05-28 22:53:42.517285113 +0200
+***************
+*** 1215,1221 ****
+ len = syn_block->b_sst_len - syn_block->b_sst_freecount + 2;
+ }
+
+! sstp = (synstate_T *)alloc_clear(len * sizeof(synstate_T));
+ if (sstp == NULL) /* out of memory! */
+ return;
+
+--- 1215,1221 ----
+ len = syn_block->b_sst_len - syn_block->b_sst_freecount + 2;
+ }
+
+! sstp = ALLOC_CLEAR_MULT(synstate_T, len);
+ if (sstp == NULL) /* out of memory! */
+ return;
+
+***************
+*** 4494,4500 ****
+ name_folded, MAXKEYWLEN + 1);
+ else
+ name_ic = name;
+! kp = (keyentry_T *)alloc(sizeof(keyentry_T) + STRLEN(name_ic));
+ if (kp == NULL)
+ return;
+ STRCPY(kp->keyword, name_ic);
+--- 4494,4500 ----
+ name_folded, MAXKEYWLEN + 1);
+ else
+ name_ic = name;
+! kp = alloc(sizeof(keyentry_T) + STRLEN(name_ic));
+ if (kp == NULL)
+ return;
+ STRCPY(kp->keyword, name_ic);
+***************
+*** 4757,4771 ****
+ if (curwin->w_s->b_syn_topgrp >= SYNID_CLUSTER)
+ {
+ /* We have to alloc this, because syn_combine_list() will free it. */
+! short *grp_list = (short *)alloc(2 * sizeof(short));
+ int tlg_id = curwin->w_s->b_syn_topgrp - SYNID_CLUSTER;
+
+ if (grp_list != NULL)
+ {
+ grp_list[0] = id;
+ grp_list[1] = 0;
+! syn_combine_list(&SYN_CLSTR(curwin->w_s)[tlg_id].scl_list, &grp_list,
+! CLUSTER_ADD);
+ }
+ }
+ }
+--- 4757,4771 ----
+ if (curwin->w_s->b_syn_topgrp >= SYNID_CLUSTER)
+ {
+ /* We have to alloc this, because syn_combine_list() will free it. */
+! short *grp_list = ALLOC_MULT(short, 2);
+ int tlg_id = curwin->w_s->b_syn_topgrp - SYNID_CLUSTER;
+
+ if (grp_list != NULL)
+ {
+ grp_list[0] = id;
+ grp_list[1] = 0;
+! syn_combine_list(&SYN_CLSTR(curwin->w_s)[tlg_id].scl_list,
+! &grp_list, CLUSTER_ADD);
+ }
+ }
+ }
+***************
+*** 5208,5214 ****
+ * syn_patterns for this item, at the start (because the list is
+ * used from end to start).
+ */
+! ppp = (struct pat_ptr *)alloc(sizeof(struct pat_ptr));
+ if (ppp == NULL)
+ {
+ rest = NULL;
+--- 5208,5214 ----
+ * syn_patterns for this item, at the start (because the list is
+ * used from end to start).
+ */
+! ppp = ALLOC_ONE(struct pat_ptr);
+ if (ppp == NULL)
+ {
+ rest = NULL;
+***************
+*** 5216,5222 ****
+ }
+ ppp->pp_next = pat_ptrs[item];
+ pat_ptrs[item] = ppp;
+! ppp->pp_synp = (synpat_T *)alloc_clear(sizeof(synpat_T));
+ if (ppp->pp_synp == NULL)
+ {
+ rest = NULL;
+--- 5216,5222 ----
+ }
+ ppp->pp_next = pat_ptrs[item];
+ pat_ptrs[item] = ppp;
+! ppp->pp_synp = ALLOC_CLEAR_ONE(synpat_T);
+ if (ppp->pp_synp == NULL)
+ {
+ rest = NULL;
+***************
+*** 5465,5471 ****
+ clstr = NULL;
+ break;
+ }
+! clstr = (short *)alloc((count + 1) * sizeof(short));
+ if (clstr == NULL)
+ break;
+ clstr[count] = 0;
+--- 5465,5471 ----
+ clstr = NULL;
+ break;
+ }
+! clstr = ALLOC_MULT(short, count + 1);
+ if (clstr == NULL)
+ break;
+ clstr[count] = 0;
+***************
+*** 6124,6130 ****
+ break;
+ if (round == 1)
+ {
+! retval = (short *)alloc((count + 1) * sizeof(short));
+ if (retval == NULL)
+ break;
+ retval[count] = 0; /* zero means end of the list */
+--- 6124,6130 ----
+ break;
+ if (round == 1)
+ {
+! retval = ALLOC_MULT(short, count + 1);
+ if (retval == NULL)
+ break;
+ retval[count] = 0; /* zero means end of the list */
+***************
+*** 6163,6169 ****
+ for (count = 0; list[count]; ++count)
+ ;
+ len = (count + 1) * sizeof(short);
+! retval = (short *)alloc(len);
+ if (retval != NULL)
+ mch_memmove(retval, list, (size_t)len);
+
+--- 6163,6169 ----
+ for (count = 0; list[count]; ++count)
+ ;
+ len = (count + 1) * sizeof(short);
+! retval = alloc(len);
+ if (retval != NULL)
+ mch_memmove(retval, list, (size_t)len);
+
+***************
+*** 6355,6361 ****
+
+ if (curwin->w_s == &curwin->w_buffer->b_s)
+ {
+! curwin->w_s = (synblock_T *)alloc(sizeof(synblock_T));
+ memset(curwin->w_s, 0, sizeof(synblock_T));
+ hash_init(&curwin->w_s->b_keywtab);
+ hash_init(&curwin->w_s->b_keywtab_ic);
+--- 6355,6361 ----
+
+ if (curwin->w_s == &curwin->w_buffer->b_s)
+ {
+! curwin->w_s = ALLOC_ONE(synblock_T);
+ memset(curwin->w_s, 0, sizeof(synblock_T));
+ hash_init(&curwin->w_s->b_keywtab);
+ hash_init(&curwin->w_s->b_keywtab_ic);
+*** ../vim-8.1.1413/src/tag.c 2019-05-25 20:21:24.685950973 +0200
+--- src/tag.c 2019-05-28 22:54:43.500953784 +0200
+***************
+*** 1430,1436 ****
+ if (name_only)
+ mfp = vim_strsave(res_name);
+ else
+! mfp = (char_u *)alloc(sizeof(char_u) + len + 1);
+
+ if (mfp == NULL)
+ continue;
+--- 1430,1436 ----
+ if (name_only)
+ mfp = vim_strsave(res_name);
+ else
+! mfp = alloc(sizeof(char_u) + len + 1);
+
+ if (mfp == NULL)
+ continue;
+***************
+*** 2536,2543 ****
+ */
+ *tagp.tagname_end = NUL;
+ len = (int)(tagp.tagname_end - tagp.tagname);
+! mfp = (char_u *)alloc(sizeof(char_u)
+! + len + 10 + ML_EXTRA + 1);
+ if (mfp != NULL)
+ {
+ int heuristic;
+--- 2536,2542 ----
+ */
+ *tagp.tagname_end = NUL;
+ len = (int)(tagp.tagname_end - tagp.tagname);
+! mfp = alloc(sizeof(char_u) + len + 10 + ML_EXTRA + 1);
+ if (mfp != NULL)
+ {
+ int heuristic;
+***************
+*** 2574,2580 ****
+ if (tagp.command + 2 < temp_end)
+ {
+ len = (int)(temp_end - tagp.command - 2);
+! mfp = (char_u *)alloc(len + 2);
+ if (mfp != NULL)
+ vim_strncpy(mfp, tagp.command + 2, len);
+ }
+--- 2573,2579 ----
+ if (tagp.command + 2 < temp_end)
+ {
+ len = (int)(temp_end - tagp.command - 2);
+! mfp = alloc(len + 2);
+ if (mfp != NULL)
+ vim_strncpy(mfp, tagp.command + 2, len);
+ }
+***************
+*** 2585,2591 ****
+ else
+ {
+ len = (int)(tagp.tagname_end - tagp.tagname);
+! mfp = (char_u *)alloc(sizeof(char_u) + len + 1);
+ if (mfp != NULL)
+ vim_strncpy(mfp, tagp.tagname, len);
+
+--- 2584,2590 ----
+ else
+ {
+ len = (int)(tagp.tagname_end - tagp.tagname);
+! mfp = alloc(sizeof(char_u) + len + 1);
+ if (mfp != NULL)
+ vim_strncpy(mfp, tagp.tagname, len);
+
+***************
+*** 2620,2626 ****
+ else
+ ++len;
+ #endif
+! mfp = (char_u *)alloc(sizeof(char_u) + len + 1);
+ if (mfp != NULL)
+ {
+ p = mfp;
+--- 2619,2625 ----
+ else
+ ++len;
+ #endif
+! mfp = alloc(sizeof(char_u) + len + 1);
+ if (mfp != NULL)
+ {
+ p = mfp;
+***************
+*** 2789,2795 ****
+ match_count = 0;
+
+ if (match_count > 0)
+! matches = (char_u **)alloc(match_count * sizeof(char_u *));
+ else
+ matches = NULL;
+ match_count = 0;
+--- 2788,2794 ----
+ match_count = 0;
+
+ if (match_count > 0)
+! matches = ALLOC_MULT(char_u *, match_count);
+ else
+ matches = NULL;
+ match_count = 0;
+*** ../vim-8.1.1413/src/term.c 2019-05-25 20:21:24.685950973 +0200
+--- src/term.c 2019-05-28 22:55:38.412656638 +0200
+***************
+*** 4187,4194 ****
+ if (tc_len == tc_max_len)
+ {
+ tc_max_len += 20;
+! new_tc = (struct termcode *)alloc(
+! tc_max_len * sizeof(struct termcode));
+ if (new_tc == NULL)
+ {
+ tc_max_len -= 20;
+--- 4187,4193 ----
+ if (tc_len == tc_max_len)
+ {
+ tc_max_len += 20;
+! new_tc = ALLOC_MULT(struct termcode, tc_max_len);
+ if (new_tc == NULL)
+ {
+ tc_max_len -= 20;
+***************
+*** 6420,6426 ****
+
+ if (tc_len == 0) /* no terminal codes (must be GUI) */
+ return;
+! items = (int *)alloc(sizeof(int) * tc_len);
+ if (items == NULL)
+ return;
+
+--- 6419,6425 ----
+
+ if (tc_len == 0) /* no terminal codes (must be GUI) */
+ return;
+! items = ALLOC_MULT(int, tc_len);
+ if (items == NULL)
+ return;
+
+***************
+*** 7071,7078 ****
+ {
+ if (!counting)
+ {
+! colornames_table = (struct rgbcolor_table_S *)alloc(
+! sizeof(struct rgbcolor_table_S) * size);
+ if (colornames_table == NULL)
+ {
+ fclose(fd);
+--- 7070,7076 ----
+ {
+ if (!counting)
+ {
+! colornames_table = ALLOC_MULT(struct rgbcolor_table_S, size);
+ if (colornames_table == NULL)
+ {
+ fclose(fd);
+*** ../vim-8.1.1413/src/terminal.c 2019-05-25 20:21:24.685950973 +0200
+--- src/terminal.c 2019-05-28 22:56:28.252387863 +0200
+***************
+*** 413,419 ****
+ return NULL;
+ }
+
+! term = (term_T *)alloc_clear(sizeof(term_T));
+ if (term == NULL)
+ return NULL;
+ term->tl_dirty_row_end = MAX_ROW;
+--- 413,419 ----
+ return NULL;
+ }
+
+! term = ALLOC_CLEAR_ONE(term_T);
+ if (term == NULL)
+ return NULL;
+ term->tl_dirty_row_end = MAX_ROW;
+***************
+*** 1630,1636 ****
+ if (len == 0)
+ p = NULL;
+ else
+! p = (cellattr_T *)alloc(sizeof(cellattr_T) * len);
+ if ((p != NULL || len == 0)
+ && ga_grow(&term->tl_scrollback, 1) == OK)
+ {
+--- 1630,1636 ----
+ if (len == 0)
+ p = NULL;
+ else
+! p = ALLOC_MULT(cellattr_T, len);
+ if ((p != NULL || len == 0)
+ && ga_grow(&term->tl_scrollback, 1) == OK)
+ {
+***************
+*** 2884,2890 ****
+
+ ga_init2(&ga, 1, 100);
+ if (len > 0)
+! p = (cellattr_T *)alloc(sizeof(cellattr_T) * len);
+ if (p != NULL)
+ {
+ for (col = 0; col < len; col += cells[col].width)
+--- 2884,2890 ----
+
+ ga_init2(&ga, 1, 100);
+ if (len > 0)
+! p = ALLOC_MULT(cellattr_T, len);
+ if (p != NULL)
+ {
+ for (col = 0; col < len; col += cells[col].width)
+***************
+*** 4935,4941 ****
+ else
+ {
+ size_t size = sizeof(sb_line_T) * term->tl_scrollback.ga_len;
+! sb_line_T *temp = (sb_line_T *)alloc(size);
+
+ /* need to copy cell properties into temp memory */
+ if (temp != NULL)
+--- 4935,4941 ----
+ else
+ {
+ size_t size = sizeof(sb_line_T) * term->tl_scrollback.ga_len;
+! sb_line_T *temp = alloc(size);
+
+ /* need to copy cell properties into temp memory */
+ if (temp != NULL)
+***************
+*** 5800,5806 ****
+ {
+ /* Request by CreateProcessW */
+ breq = wcslen(cmd_wchar) + 1 + 1; /* Addition of NUL by API */
+! cmd_wchar_copy = (PWSTR)alloc(breq * sizeof(WCHAR));
+ wcsncpy(cmd_wchar_copy, cmd_wchar, breq - 1);
+ }
+
+--- 5800,5806 ----
+ {
+ /* Request by CreateProcessW */
+ breq = wcslen(cmd_wchar) + 1 + 1; /* Addition of NUL by API */
+! cmd_wchar_copy = ALLOC_MULT(WCHAR, breq);
+ wcsncpy(cmd_wchar_copy, cmd_wchar, breq - 1);
+ }
+
+***************
+*** 5829,5836 ****
+
+ /* Set up pipe inheritance safely: Vista or later. */
+ pInitializeProcThreadAttributeList(NULL, 1, 0, &breq);
+! term->tl_siex.lpAttributeList =
+! (PPROC_THREAD_ATTRIBUTE_LIST)alloc(breq);
+ if (!term->tl_siex.lpAttributeList)
+ goto failed;
+ if (!pInitializeProcThreadAttributeList(term->tl_siex.lpAttributeList, 1,
+--- 5829,5835 ----
+
+ /* Set up pipe inheritance safely: Vista or later. */
+ pInitializeProcThreadAttributeList(NULL, 1, 0, &breq);
+! term->tl_siex.lpAttributeList = alloc(breq);
+ if (!term->tl_siex.lpAttributeList)
+ goto failed;
+ if (!pInitializeProcThreadAttributeList(term->tl_siex.lpAttributeList, 1,
+*** ../vim-8.1.1413/src/textprop.c 2019-05-26 23:32:03.175678045 +0200
+--- src/textprop.c 2019-05-28 22:57:18.140119595 +0200
+***************
+*** 695,701 ****
+ semsg(_("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);
+--- 695,701 ----
+ semsg(_("E969: Property type %s already defined"), name);
+ return;
+ }
+! prop = alloc_clear(sizeof(proptype_T) + STRLEN(name));
+ if (prop == NULL)
+ return;
+ STRCPY(prop->pt_name, name);
+***************
+*** 703,709 ****
+ htp = buf == NULL ? &global_proptypes : &buf->b_proptypes;
+ if (*htp == NULL)
+ {
+! *htp = (hashtab_T *)alloc(sizeof(hashtab_T));
+ if (*htp == NULL)
+ {
+ vim_free(prop);
+--- 703,709 ----
+ htp = buf == NULL ? &global_proptypes : &buf->b_proptypes;
+ if (*htp == NULL)
+ {
+! *htp = ALLOC_ONE(hashtab_T);
+ if (*htp == NULL)
+ {
+ vim_free(prop);
+***************
+*** 1177,1183 ****
+ proplen = get_text_props(curbuf, lnum, &props, FALSE);
+ if (proplen > 0)
+ {
+! *prop_line = (textprop_T *)alloc(proplen * (int)sizeof(textprop_T));
+ if (*prop_line != NULL)
+ {
+ for (ri = 0; ri < proplen; ++ri)
+--- 1177,1183 ----
+ proplen = get_text_props(curbuf, lnum, &props, FALSE);
+ if (proplen > 0)
+ {
+! *prop_line = ALLOC_MULT(textprop_T, proplen);
+ if (*prop_line != NULL)
+ {
+ for (ri = 0; ri < proplen; ++ri)
+*** ../vim-8.1.1413/src/ui.c 2019-05-24 19:38:59.112545434 +0200
+--- src/ui.c 2019-05-28 20:24:13.254011690 +0200
+***************
+*** 1897,1903 ****
+ garray_T *gap;
+
+ /* We use a growarray to store the data pointer and the length. */
+! gap = (garray_T *)alloc(sizeof(garray_T));
+ if (gap != NULL)
+ {
+ /* Add one to avoid a zero size. */
+--- 1897,1903 ----
+ garray_T *gap;
+
+ /* We use a growarray to store the data pointer and the length. */
+! gap = ALLOC_ONE(garray_T);
+ if (gap != NULL)
+ {
+ /* Add one to avoid a zero size. */
+*** ../vim-8.1.1413/src/undo.c 2019-05-24 19:38:59.116545403 +0200
+--- src/undo.c 2019-05-28 20:12:11.518411430 +0200
+***************
+*** 468,474 ****
+ * Make a new header entry. Do this first so that we don't mess
+ * up the undo info when out of memory.
+ */
+! uhp = (u_header_T *)U_ALLOC_LINE(sizeof(u_header_T));
+ if (uhp == NULL)
+ goto nomem;
+ #ifdef U_DEBUG
+--- 468,474 ----
+ * Make a new header entry. Do this first so that we don't mess
+ * up the undo info when out of memory.
+ */
+! uhp = U_ALLOC_LINE(sizeof(u_header_T));
+ if (uhp == NULL)
+ goto nomem;
+ #ifdef U_DEBUG
+***************
+*** 659,665 ****
+ /*
+ * add lines in front of entry list
+ */
+! uep = (u_entry_T *)U_ALLOC_LINE(sizeof(u_entry_T));
+ if (uep == NULL)
+ goto nomem;
+ vim_memset(uep, 0, sizeof(u_entry_T));
+--- 659,665 ----
+ /*
+ * add lines in front of entry list
+ */
+! uep = U_ALLOC_LINE(sizeof(u_entry_T));
+ if (uep == NULL)
+ goto nomem;
+ vim_memset(uep, 0, sizeof(u_entry_T));
+***************
+*** 685,692 ****
+
+ if (size > 0)
+ {
+! if ((uep->ue_array = (undoline_T *)U_ALLOC_LINE(
+! sizeof(undoline_T) * size)) == NULL)
+ {
+ u_freeentry(uep, 0L);
+ goto nomem;
+--- 685,691 ----
+
+ if (size > 0)
+ {
+! if ((uep->ue_array = U_ALLOC_LINE(sizeof(undoline_T) * size)) == NULL)
+ {
+ u_freeentry(uep, 0L);
+ goto nomem;
+***************
+*** 1286,1292 ****
+ int c;
+ int error;
+
+! uhp = (u_header_T *)U_ALLOC_LINE(sizeof(u_header_T));
+ if (uhp == NULL)
+ return NULL;
+ vim_memset(uhp, 0, sizeof(u_header_T));
+--- 1285,1291 ----
+ int c;
+ int error;
+
+! uhp = U_ALLOC_LINE(sizeof(u_header_T));
+ if (uhp == NULL)
+ return NULL;
+ vim_memset(uhp, 0, sizeof(u_header_T));
+***************
+*** 1397,1403 ****
+ char_u *line;
+ int line_len;
+
+! uep = (u_entry_T *)U_ALLOC_LINE(sizeof(u_entry_T));
+ if (uep == NULL)
+ return NULL;
+ vim_memset(uep, 0, sizeof(u_entry_T));
+--- 1396,1402 ----
+ char_u *line;
+ int line_len;
+
+! uep = U_ALLOC_LINE(sizeof(u_entry_T));
+ if (uep == NULL)
+ return NULL;
+ vim_memset(uep, 0, sizeof(u_entry_T));
+***************
+*** 1411,1417 ****
+ if (uep->ue_size > 0)
+ {
+ if (uep->ue_size < LONG_MAX / (int)sizeof(char_u *))
+! array = (undoline_T *)U_ALLOC_LINE(sizeof(undoline_T) * uep->ue_size);
+ if (array == NULL)
+ {
+ *error = TRUE;
+--- 1410,1416 ----
+ if (uep->ue_size > 0)
+ {
+ if (uep->ue_size < LONG_MAX / (int)sizeof(char_u *))
+! array = U_ALLOC_LINE(sizeof(undoline_T) * uep->ue_size);
+ if (array == NULL)
+ {
+ *error = TRUE;
+***************
+*** 1981,1988 ****
+ if (num_head > 0)
+ {
+ if (num_head < LONG_MAX / (long)sizeof(u_header_T *))
+! uhp_table = (u_header_T **)U_ALLOC_LINE(
+! num_head * sizeof(u_header_T *));
+ if (uhp_table == NULL)
+ goto error;
+ }
+--- 1980,1986 ----
+ if (num_head > 0)
+ {
+ if (num_head < LONG_MAX / (long)sizeof(u_header_T *))
+! uhp_table = U_ALLOC_LINE(num_head * sizeof(u_header_T *));
+ if (uhp_table == NULL)
+ goto error;
+ }
+***************
+*** 2013,2019 ****
+ }
+
+ #ifdef U_DEBUG
+! uhp_table_used = (int *)alloc_clear(sizeof(int) * num_head + 1);
+ # define SET_FLAG(j) ++uhp_table_used[j]
+ #else
+ # define SET_FLAG(j)
+--- 2011,2017 ----
+ }
+
+ #ifdef U_DEBUG
+! uhp_table_used = alloc_clear(sizeof(int) * num_head + 1);
+ # define SET_FLAG(j) ++uhp_table_used[j]
+ #else
+ # define SET_FLAG(j)
+***************
+*** 2712,2719 ****
+ /* delete the lines between top and bot and save them in newarray */
+ if (oldsize > 0)
+ {
+! if ((newarray = (undoline_T *)U_ALLOC_LINE(
+! sizeof(undoline_T) * oldsize)) == NULL)
+ {
+ do_outofmem_msg((long_u)(sizeof(undoline_T) * oldsize));
+ /*
+--- 2710,2716 ----
+ /* delete the lines between top and bot and save them in newarray */
+ if (oldsize > 0)
+ {
+! if ((newarray = U_ALLOC_LINE(sizeof(undoline_T) * oldsize)) == NULL)
+ {
+ do_outofmem_msg((long_u)(sizeof(undoline_T) * oldsize));
+ /*
+*** ../vim-8.1.1413/src/userfunc.c 2019-05-24 19:38:59.116545403 +0200
+--- src/userfunc.c 2019-05-28 22:58:41.511672799 +0200
+***************
+*** 292,301 ****
+
+ sprintf((char*)name, "<lambda>%d", ++lambda_no);
+
+! fp = (ufunc_T *)alloc_clear(sizeof(ufunc_T) + STRLEN(name));
+ if (fp == NULL)
+ goto errret;
+! pt = (partial_T *)alloc_clear(sizeof(partial_T));
+ if (pt == NULL)
+ goto errret;
+
+--- 292,301 ----
+
+ sprintf((char*)name, "<lambda>%d", ++lambda_no);
+
+! fp = alloc_clear(sizeof(ufunc_T) + STRLEN(name));
+ if (fp == NULL)
+ goto errret;
+! pt = ALLOC_CLEAR_ONE(partial_T);
+ if (pt == NULL)
+ goto errret;
+
+***************
+*** 305,311 ****
+
+ /* Add "return " before the expression. */
+ len = 7 + e - s + 1;
+! p = (char_u *)alloc(len);
+ if (p == NULL)
+ goto errret;
+ ((char_u **)(newlines.ga_data))[newlines.ga_len++] = p;
+--- 305,311 ----
+
+ /* Add "return " before the expression. */
+ len = 7 + e - s + 1;
+! p = alloc(len);
+ if (p == NULL)
+ goto errret;
+ ((char_u **)(newlines.ga_data))[newlines.ga_len++] = p;
+***************
+*** 802,808 ****
+
+ line_breakcheck(); /* check for CTRL-C hit */
+
+! fc = (funccall_T *)alloc_clear(sizeof(funccall_T));
+ if (fc == NULL)
+ return;
+ fc->caller = current_funccal;
+--- 802,808 ----
+
+ line_breakcheck(); /* check for CTRL-C hit */
+
+! fc = ALLOC_CLEAR_ONE(funccall_T);
+ if (fc == NULL)
+ return;
+ fc->caller = current_funccal;
+***************
+*** 2580,2586 ****
+ }
+ }
+
+! fp = (ufunc_T *)alloc_clear(sizeof(ufunc_T) + STRLEN(name));
+ if (fp == NULL)
+ goto erret;
+
+--- 2580,2586 ----
+ }
+ }
+
+! fp = alloc_clear(sizeof(ufunc_T) + STRLEN(name));
+ if (fp == NULL)
+ goto erret;
+
+***************
+*** 2751,2763 ****
+ profile_zero(&fp->uf_tm_self);
+ profile_zero(&fp->uf_tm_total);
+ if (fp->uf_tml_count == NULL)
+! fp->uf_tml_count = (int *)alloc_clear(sizeof(int) * len);
+ if (fp->uf_tml_total == NULL)
+! fp->uf_tml_total = (proftime_T *)alloc_clear(
+! sizeof(proftime_T) * len);
+ if (fp->uf_tml_self == NULL)
+! fp->uf_tml_self = (proftime_T *)alloc_clear(
+! sizeof(proftime_T) * len);
+ fp->uf_tml_idx = -1;
+ if (fp->uf_tml_count == NULL || fp->uf_tml_total == NULL
+ || fp->uf_tml_self == NULL)
+--- 2751,2761 ----
+ profile_zero(&fp->uf_tm_self);
+ profile_zero(&fp->uf_tm_total);
+ if (fp->uf_tml_count == NULL)
+! fp->uf_tml_count = ALLOC_CLEAR_MULT(int, len);
+ if (fp->uf_tml_total == NULL)
+! fp->uf_tml_total = ALLOC_CLEAR_MULT(proftime_T, len);
+ if (fp->uf_tml_self == NULL)
+! fp->uf_tml_self = ALLOC_CLEAR_MULT(proftime_T, len);
+ fp->uf_tml_idx = -1;
+ if (fp->uf_tml_count == NULL || fp->uf_tml_total == NULL
+ || fp->uf_tml_self == NULL)
+***************
+*** 2786,2792 ****
+ if (todo == 0)
+ return; /* nothing to dump */
+
+! sorttab = (ufunc_T **)alloc(sizeof(ufunc_T *) * todo);
+
+ for (hi = func_hashtab.ht_array; todo > 0; ++hi)
+ {
+--- 2784,2790 ----
+ if (todo == 0)
+ return; /* nothing to dump */
+
+! sorttab = ALLOC_MULT(ufunc_T *, todo);
+
+ for (hi = func_hashtab.ht_array; todo > 0; ++hi)
+ {
+***************
+*** 3670,3676 ****
+
+ if (fp != NULL && (fp->uf_flags & FC_DICT))
+ {
+! partial_T *pt = (partial_T *)alloc_clear(sizeof(partial_T));
+
+ if (pt != NULL)
+ {
+--- 3668,3674 ----
+
+ if (fp != NULL && (fp->uf_flags & FC_DICT))
+ {
+! partial_T *pt = ALLOC_CLEAR_ONE(partial_T);
+
+ if (pt != NULL)
+ {
+***************
+*** 3704,3711 ****
+ }
+ if (ret_pt->pt_argc > 0)
+ {
+! pt->pt_argv = (typval_T *)alloc(
+! sizeof(typval_T) * ret_pt->pt_argc);
+ if (pt->pt_argv == NULL)
+ /* out of memory: drop the arguments */
+ pt->pt_argc = 0;
+--- 3702,3708 ----
+ }
+ if (ret_pt->pt_argc > 0)
+ {
+! pt->pt_argv = ALLOC_MULT(typval_T, ret_pt->pt_argc);
+ if (pt->pt_argv == NULL)
+ /* out of memory: drop the arguments */
+ pt->pt_argc = 0;
+*** ../vim-8.1.1413/src/version.c 2019-05-27 23:36:17.456452208 +0200
+--- src/version.c 2019-05-28 20:55:50.867626458 +0200
+***************
+*** 61,67 ****
+ + strlen(VIM_VERSION_DATE_ONLY)
+ + strlen(date_time);
+
+! longVersion = (char *)alloc(len);
+ if (longVersion == NULL)
+ longVersion = VIM_VERSION_LONG;
+ else
+--- 61,67 ----
+ + strlen(VIM_VERSION_DATE_ONLY)
+ + strlen(date_time);
+
+! longVersion = alloc(len);
+ if (longVersion == NULL)
+ longVersion = VIM_VERSION_LONG;
+ else
+*** ../vim-8.1.1413/src/winclip.c 2019-05-24 19:38:59.116545403 +0200
+--- src/winclip.c 2019-05-28 22:59:38.571367967 +0200
+***************
+*** 149,155 ****
+ {
+ *outlen = MultiByteToWideChar(cp, flags, in, inlen, 0, 0);
+ /* Add one one word to avoid a zero-length alloc(). */
+! *out = (LPWSTR)alloc(sizeof(WCHAR) * (*outlen + 1));
+ if (*out != NULL)
+ {
+ MultiByteToWideChar(cp, flags, in, inlen, *out, *outlen);
+--- 149,155 ----
+ {
+ *outlen = MultiByteToWideChar(cp, flags, in, inlen, 0, 0);
+ /* Add one one word to avoid a zero-length alloc(). */
+! *out = ALLOC_MULT(WCHAR, *outlen + 1);
+ if (*out != NULL)
+ {
+ MultiByteToWideChar(cp, flags, in, inlen, *out, *outlen);
+***************
+*** 169,175 ****
+ {
+ *outlen = WideCharToMultiByte(cp, flags, in, inlen, NULL, 0, def, useddef);
+ /* Add one one byte to avoid a zero-length alloc(). */
+! *out = (LPSTR)alloc(*outlen + 1);
+ if (*out != NULL)
+ {
+ WideCharToMultiByte(cp, flags, in, inlen, *out, *outlen, def, useddef);
+--- 169,175 ----
+ {
+ *outlen = WideCharToMultiByte(cp, flags, in, inlen, NULL, 0, def, useddef);
+ /* Add one one byte to avoid a zero-length alloc(). */
+! *out = alloc(*outlen + 1);
+ if (*out != NULL)
+ {
+ WideCharToMultiByte(cp, flags, in, inlen, *out, *outlen, def, useddef);
+***************
+*** 512,518 ****
+ metadata.txtlen = WideCharToMultiByte(GetACP(), 0, out, len,
+ NULL, 0, 0, 0);
+ vim_free(str);
+! str = (char_u *)alloc(metadata.txtlen == 0 ? 1 : metadata.txtlen);
+ if (str == NULL)
+ {
+ vim_free(out);
+--- 512,518 ----
+ metadata.txtlen = WideCharToMultiByte(GetACP(), 0, out, len,
+ NULL, 0, 0, 0);
+ vim_free(str);
+! str = alloc(metadata.txtlen == 0 ? 1 : metadata.txtlen);
+ if (str == NULL)
+ {
+ vim_free(out);
+***************
+*** 654,660 ****
+ convert_setup(&conv, NULL, NULL);
+
+ length = utf8_to_utf16(str, *lenp, NULL, NULL);
+! ret = (WCHAR *)alloc((length + 1) * sizeof(WCHAR));
+ if (ret != NULL)
+ {
+ utf8_to_utf16(str, *lenp, (short_u *)ret, NULL);
+--- 654,660 ----
+ convert_setup(&conv, NULL, NULL);
+
+ length = utf8_to_utf16(str, *lenp, NULL, NULL);
+! ret = ALLOC_MULT(WCHAR, length + 1);
+ if (ret != NULL)
+ {
+ utf8_to_utf16(str, *lenp, (short_u *)ret, NULL);
+*** ../vim-8.1.1413/src/window.c 2019-05-26 20:44:07.105974009 +0200
+--- src/window.c 2019-05-28 23:00:28.123103824 +0200
+***************
+*** 1065,1071 ****
+ if (curfrp->fr_parent == NULL || curfrp->fr_parent->fr_layout != layout)
+ {
+ /* Need to create a new frame in the tree to make a branch. */
+! frp = (frame_T *)alloc_clear(sizeof(frame_T));
+ *frp = *curfrp;
+ curfrp->fr_layout = layout;
+ frp->fr_parent = curfrp;
+--- 1065,1071 ----
+ if (curfrp->fr_parent == NULL || curfrp->fr_parent->fr_layout != layout)
+ {
+ /* Need to create a new frame in the tree to make a branch. */
+! frp = ALLOC_CLEAR_ONE(frame_T);
+ *frp = *curfrp;
+ curfrp->fr_layout = layout;
+ frp->fr_parent = curfrp;
+***************
+*** 3599,3605 ****
+ static void
+ new_frame(win_T *wp)
+ {
+! frame_T *frp = (frame_T *)alloc_clear(sizeof(frame_T));
+
+ wp->w_frame = frp;
+ if (frp != NULL)
+--- 3599,3605 ----
+ static void
+ new_frame(win_T *wp)
+ {
+! frame_T *frp = ALLOC_CLEAR_ONE(frame_T);
+
+ wp->w_frame = frp;
+ if (frp != NULL)
+***************
+*** 3634,3640 ****
+ # endif
+
+
+! tp = (tabpage_T *)alloc_clear(sizeof(tabpage_T));
+ if (tp == NULL)
+ return NULL;
+
+--- 3634,3640 ----
+ # endif
+
+
+! tp = ALLOC_CLEAR_ONE(tabpage_T);
+ if (tp == NULL)
+ return NULL;
+
+***************
+*** 4651,4657 ****
+ /*
+ * allocate window structure and linesizes arrays
+ */
+! new_wp = (win_T *)alloc_clear(sizeof(win_T));
+ if (new_wp == NULL)
+ return NULL;
+
+--- 4651,4657 ----
+ /*
+ * allocate window structure and linesizes arrays
+ */
+! new_wp = ALLOC_CLEAR_ONE(win_T);
+ if (new_wp == NULL)
+ return NULL;
+
+***************
+*** 4980,4986 ****
+ win_alloc_lines(win_T *wp)
+ {
+ wp->w_lines_valid = 0;
+! wp->w_lines = (wline_T *)alloc_clear(Rows * sizeof(wline_T));
+ if (wp->w_lines == NULL)
+ return FAIL;
+ return OK;
+--- 4980,4986 ----
+ win_alloc_lines(win_T *wp)
+ {
+ wp->w_lines_valid = 0;
+! wp->w_lines = ALLOC_CLEAR_MULT(wline_T, Rows );
+ if (wp->w_lines == NULL)
+ return FAIL;
+ return OK;
+***************
+*** 6362,6368 ****
+ static void
+ make_snapshot_rec(frame_T *fr, frame_T **frp)
+ {
+! *frp = (frame_T *)alloc_clear(sizeof(frame_T));
+ if (*frp == NULL)
+ return;
+ (*frp)->fr_layout = fr->fr_layout;
+--- 6362,6368 ----
+ static void
+ make_snapshot_rec(frame_T *fr, frame_T **frp)
+ {
+! *frp = ALLOC_CLEAR_ONE(frame_T);
+ if (*frp == NULL)
+ return;
+ (*frp)->fr_layout = fr->fr_layout;
+***************
+*** 6671,6677 ****
+ }
+
+ /* Build new match. */
+! m = (matchitem_T *)alloc_clear(sizeof(matchitem_T));
+ m->id = id;
+ m->priority = prio;
+ m->pattern = pat == NULL ? NULL : vim_strsave(pat);
+--- 6671,6677 ----
+ }
+
+ /* Build new match. */
+! m = ALLOC_CLEAR_ONE(matchitem_T);
+ m->id = id;
+ m->priority = prio;
+ m->pattern = pat == NULL ? NULL : vim_strsave(pat);
+***************
+*** 7057,7063 ****
+ if (wp->w_id == id)
+ return wp;
+ #ifdef FEAT_TEXT_PROP
+! // popup windows are in a separate list
+ FOR_ALL_TABPAGES(tp)
+ for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+ if (wp->w_id == id)
+--- 7057,7063 ----
+ if (wp->w_id == id)
+ return wp;
+ #ifdef FEAT_TEXT_PROP
+! // popup windows are in separate lists
+ FOR_ALL_TABPAGES(tp)
+ for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+ if (wp->w_id == id)
+*** ../vim-8.1.1413/src/vim.h 2019-05-27 10:04:37.530426996 +0200
+--- src/vim.h 2019-05-28 22:43:30.320741483 +0200
+***************
+*** 1546,1551 ****
+--- 1546,1561 ----
+ # define R_OK 4 /* for systems that don't have R_OK in unistd.h */
+ #endif
+
++ // Allocate memory for one type and cast the returned pointer to have the
++ // compiler check the types.
++ #define ALLOC_ONE(type) (type *)alloc(sizeof(type))
++ #define ALLOC_MULT(type, count) (type *)alloc(sizeof(type) * (count))
++ #define ALLOC_CLEAR_ONE(type) (type *)alloc_clear(sizeof(type))
++ #define ALLOC_CLEAR_MULT(type, count) (type *)alloc_clear(sizeof(type) * (count))
++ #define LALLOC_CLEAR_ONE(type) (type *)lalloc_clear(sizeof(type), FALSE)
++ #define LALLOC_CLEAR_MULT(type, count) (type *)lalloc_clear(sizeof(type) * (count), FALSE)
++ #define LALLOC_MULT(type, count) (type *)lalloc(sizeof(type) * (count), FALSE)
++
+ /*
+ * defines to avoid typecasts from (char_u *) to (char *) and back
+ * (vim_strchr() and vim_strrchr() are now in alloc.c)
+*** ../vim-8.1.1413/src/testdir/test_cscope.vim 2018-08-22 20:06:22.829022787 +0200
+--- src/testdir/test_cscope.vim 2019-05-28 23:07:04.269005974 +0200
+***************
+*** 123,130 ****
+ if cs_version >= 15.8
+ for cmd in ['cs find a item', 'cs find 9 item']
+ let a = execute(cmd)
+! call assert_equal(['', '(1 of 4): <<test_mf_hash>> item = (mf_hashitem_T *)lalloc_clear(sizeof(mf_hashtab_T), FALSE);'], split(a, '\n', 1))
+! call assert_equal(' item = (mf_hashitem_T *)lalloc_clear(sizeof(mf_hashtab_T), FALSE);', getline('.'))
+ cnext
+ call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
+ cnext
+--- 123,130 ----
+ if cs_version >= 15.8
+ for cmd in ['cs find a item', 'cs find 9 item']
+ let a = execute(cmd)
+! call assert_equal(['', '(1 of 4): <<test_mf_hash>> item = LALLOC_CLEAR_ONE(mf_hashtab_T);'], split(a, '\n', 1))
+! call assert_equal(' item = LALLOC_CLEAR_ONE(mf_hashtab_T);', getline('.'))
+ cnext
+ call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
+ cnext
+*** ../vim-8.1.1413/src/version.c 2019-05-27 23:36:17.456452208 +0200
+--- src/version.c 2019-05-28 20:55:50.867626458 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1414,
+ /**/
+
+--
+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.1415 b/data/vim/patches/8.1.1415
new file mode 100644
index 000000000..ab3a365bc
--- /dev/null
+++ b/data/vim/patches/8.1.1415
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1415
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1415 (after 8.1.1414)
+Problem: Build error in MS-Windows GUI.
+Solution: Fix the LALLOC_MULT() argument.
+Files: src/gui_w32.c
+
+
+*** ../vim-8.1.1414/src/gui_w32.c 2019-05-28 23:08:12.064648717 +0200
+--- src/gui_w32.c 2019-05-28 23:30:54.014783238 +0200
+***************
+*** 6056,6062 ****
+
+ /* Don't give an out-of-memory message here, it would call us
+ * recursively. */
+! padding = LALLOC_MULT(sizeof(int), pad_size);
+ if (padding != NULL)
+ for (i = 0; i < pad_size; i++)
+ padding[i] = gui.char_width;
+--- 6056,6062 ----
+
+ /* Don't give an out-of-memory message here, it would call us
+ * recursively. */
+! padding = LALLOC_MULT(int, pad_size);
+ if (padding != NULL)
+ for (i = 0; i < pad_size; i++)
+ padding[i] = gui.char_width;
+*** ../vim-8.1.1414/src/version.c 2019-05-28 23:08:12.080648632 +0200
+--- src/version.c 2019-05-28 23:32:00.050464916 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1415,
+ /**/
+
+--
+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.1416 b/data/vim/patches/8.1.1416
new file mode 100644
index 000000000..80bb7da81
--- /dev/null
+++ b/data/vim/patches/8.1.1416
@@ -0,0 +1,178 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1416
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1416
+Problem: Popup_getposition() not implemented yet.
+Solution: Implement it. (Yasuhiro Matsumoto, closes #4449)
+Files: runtime/doc/popup.txt, src/evalfunc.c, src/popupwin.c,
+ src/proto/popupwin.pro, src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1415/runtime/doc/popup.txt 2019-05-27 21:53:53.986229323 +0200
+--- runtime/doc/popup.txt 2019-05-29 20:18:24.751509209 +0200
+***************
+*** 84,94 ****
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+! - implement popup_getposition({id}), use in tests
+ - Implement filter.
+ - Handle screen resize in screenalloc().
+ - Make redrawing more efficient and avoid flicker.
+ - Properly figure out the size and position.
+ - Implement all the unimplemented options and features.
+
+
+--- 84,100 ----
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+! - when creating the window set options to Vim default? (verify with 'number')
+! - Do not show tilde below last line.
+ - Implement filter.
++ Check that popup_close() works in the filter.
+ - Handle screen resize in screenalloc().
+ - Make redrawing more efficient and avoid flicker.
++ Fix redrawing problem with completion.
++ Fix redrawing problem when scrolling non-current window
++ Fix redrawing the statusline on top of a popup
+ - Properly figure out the size and position.
++ - Can the buffer be re-used, to avoid using up lots of buffer numbers?
+ - Implement all the unimplemented options and features.
+
+
+***************
+*** 225,237 ****
+ Return the {options} for popup {id}.
+
+ popup_getposition({id}) *popup_getposition()*
+- {not implemented yet}
+ Return the position and size of popup {id}. Returns a Dict
+ with these entries:
+ col screen column of the popup, one-based
+ line screen line of the popup, one-based
+ width width of the popup in screen cells
+ height height of the popup in screen cells
+
+ win_execute({id}, {command})
+ {not implemented yet}
+--- 231,246 ----
+ Return the {options} for popup {id}.
+
+ popup_getposition({id}) *popup_getposition()*
+ Return the position and size of popup {id}. Returns a Dict
+ with these entries:
+ col screen column of the popup, one-based
+ line screen line of the popup, one-based
+ width width of the popup in screen cells
+ height height of the popup in screen cells
++ Note that these are the actual screen positions. They differ
++ from the values in `popup_getoptions()` for the sizing and
++ positioning mechanism applied.
++ If popup window {id} is not found an empty Dict is returned.
+
+ win_execute({id}, {command})
+ {not implemented yet}
+*** ../vim-8.1.1415/src/evalfunc.c 2019-05-28 23:08:12.056648758 +0200
+--- src/evalfunc.c 2019-05-29 20:24:24.582101066 +0200
+***************
+*** 810,815 ****
+--- 810,816 ----
+ #ifdef FEAT_TEXT_PROP
+ {"popup_close", 1, 1, f_popup_close},
+ {"popup_create", 2, 2, f_popup_create},
++ {"popup_getposition", 1, 1, f_popup_getposition},
+ {"popup_hide", 1, 1, f_popup_hide},
+ {"popup_move", 2, 2, f_popup_move},
+ {"popup_show", 1, 1, f_popup_show},
+*** ../vim-8.1.1415/src/popupwin.c 2019-05-27 21:53:53.986229323 +0200
+--- src/popupwin.c 2019-05-29 20:22:24.442608839 +0200
+***************
+*** 487,490 ****
+--- 487,511 ----
+ redraw_all_later(NOT_VALID);
+ }
+
++ /*
++ * popup_getposition({id})
++ */
++ void
++ f_popup_getposition(typval_T *argvars, typval_T *rettv)
++ {
++ dict_T *dict;
++ int id = (int)tv_get_number(argvars);
++ win_T *wp = find_popup_win(id);
++
++ if (rettv_dict_alloc(rettv) == OK)
++ {
++ if (wp == NULL)
++ return; // invalid {id}
++ dict = rettv->vval.v_dict;
++ dict_add_number(dict, "line", wp->w_winrow + 1);
++ dict_add_number(dict, "col", wp->w_wincol + 1);
++ dict_add_number(dict, "width", wp->w_width);
++ dict_add_number(dict, "height", wp->w_height);
++ }
++ }
+ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.1415/src/proto/popupwin.pro 2019-05-27 21:53:53.990229301 +0200
+--- src/proto/popupwin.pro 2019-05-29 20:14:19.844197298 +0200
+***************
+*** 3,8 ****
+--- 3,9 ----
+ int popup_any_visible(void);
+ void f_popup_close(typval_T *argvars, typval_T *rettv);
+ void f_popup_hide(typval_T *argvars, typval_T *rettv);
++ void f_popup_getposition(typval_T *argvars, typval_T *rettv);
+ void f_popup_show(typval_T *argvars, typval_T *rettv);
+ void popup_close(int id);
+ void popup_close_tabpage(tabpage_T *tp, int id);
+*** ../vim-8.1.1415/src/testdir/test_popupwin.vim 2019-05-27 21:53:53.990229301 +0200
+--- src/testdir/test_popupwin.vim 2019-05-29 20:24:44.730013045 +0200
+***************
+*** 159,161 ****
+--- 159,178 ----
+
+ bwipe!
+ endfunc
++
++ func Test_popup_getposition()
++ let winid = popup_create('hello', {
++ \ 'line': 2,
++ \ 'col': 3,
++ \ 'minwidth': 10,
++ \ 'minheight': 11,
++ \})
++ redraw
++ let res = popup_getposition(winid)
++ call assert_equal(2, res.line)
++ call assert_equal(3, res.col)
++ call assert_equal(10, res.width)
++ call assert_equal(11, res.height)
++
++ call popup_close(winid)
++ endfunc
+*** ../vim-8.1.1415/src/version.c 2019-05-28 23:32:42.942257480 +0200
+--- src/version.c 2019-05-29 20:15:28.556034833 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1416,
+ /**/
+
+--
+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.1417 b/data/vim/patches/8.1.1417
new file mode 100644
index 000000000..2e8707005
--- /dev/null
+++ b/data/vim/patches/8.1.1417
@@ -0,0 +1,94 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1417
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1417
+Problem: MS-Windows: resolve() does not resolve all components of the path.
+ (David Briscoe)
+Solution: Do not bail out for a reparse point. (Yasuhiro Matsumoto,
+ closes #4211, closes #4447)
+Files: src/os_mswin.c, src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.1416/src/os_mswin.c 2019-05-28 23:08:12.072648675 +0200
+--- src/os_mswin.c 2019-05-29 20:28:45.536911268 +0200
+***************
+*** 1787,1798 ****
+ if (p == NULL)
+ goto fail;
+
+- if ((GetFileAttributesW(p) & FILE_ATTRIBUTE_REPARSE_POINT) == 0)
+- {
+- vim_free(p);
+- goto fail;
+- }
+-
+ h = CreateFileW(p, 0, 0, NULL, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS, NULL);
+ vim_free(p);
+--- 1787,1792 ----
+*** ../vim-8.1.1416/src/testdir/test_functions.vim 2019-05-24 14:14:10.260307596 +0200
+--- src/testdir/test_functions.vim 2019-05-29 20:28:45.536911268 +0200
+***************
+*** 238,244 ****
+ func s:normalize_fname(fname)
+ let ret = substitute(a:fname, '\', '/', 'g')
+ let ret = substitute(ret, '//', '/', 'g')
+! let ret = tolower(ret)
+ endfunc
+
+ func Test_resolve_win32()
+--- 238,244 ----
+ func s:normalize_fname(fname)
+ let ret = substitute(a:fname, '\', '/', 'g')
+ let ret = substitute(ret, '//', '/', 'g')
+! return tolower(ret)
+ endfunc
+
+ func Test_resolve_win32()
+***************
+*** 330,335 ****
+--- 330,348 ----
+ echomsg 'skipped test for buffer name'
+ endif
+ call delete('Xfile')
++
++ " test for reparse point
++ call mkdir('Xdir')
++ silent !mklink /D Xdirlink Xdir
++ if !v:shell_error
++ w Xdir/text.txt
++ call assert_equal(s:normalize_fname(getcwd() . '\Xdir\text.txt'), s:normalize_fname(resolve('Xdirlink\text.txt')))
++ call assert_equal(s:normalize_fname(getcwd() . '\Xdir'), s:normalize_fname(resolve('Xdirlink')))
++ else
++ echomsg 'skipped test for reparse point'
++ endif
++
++ call delete('Xdir', 'rf')
+ endfunc
+
+ func Test_simplify()
+*** ../vim-8.1.1416/src/version.c 2019-05-29 20:26:32.525530253 +0200
+--- src/version.c 2019-05-29 20:31:23.212151747 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1417,
+ /**/
+
+--
+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.1418 b/data/vim/patches/8.1.1418
new file mode 100644
index 000000000..7e1b588e7
--- /dev/null
+++ b/data/vim/patches/8.1.1418
@@ -0,0 +1,323 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1418
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1418
+Problem: Win_execute() is not implemented yet.
+Solution: Implement it.
+Files: src/evalfunc.c, src/popupwin.c, src/testdir/test_execute_func.vim,
+ runtime/doc/popup.txt, runtime/doc/eval.txt
+
+
+*** ../vim-8.1.1417/src/evalfunc.c 2019-05-29 20:26:32.525530253 +0200
+--- src/evalfunc.c 2019-05-29 21:22:16.884099074 +0200
+***************
+*** 492,497 ****
+--- 492,498 ----
+ static void f_virtcol(typval_T *argvars, typval_T *rettv);
+ static void f_visualmode(typval_T *argvars, typval_T *rettv);
+ static void f_wildmenumode(typval_T *argvars, typval_T *rettv);
++ static void f_win_execute(typval_T *argvars, typval_T *rettv);
+ static void f_win_findbuf(typval_T *argvars, typval_T *rettv);
+ static void f_win_getid(typval_T *argvars, typval_T *rettv);
+ static void f_win_gotoid(typval_T *argvars, typval_T *rettv);
+***************
+*** 1045,1050 ****
+--- 1046,1052 ----
+ {"virtcol", 1, 1, f_virtcol},
+ {"visualmode", 0, 1, f_visualmode},
+ {"wildmenumode", 0, 0, f_wildmenumode},
++ {"win_execute", 2, 3, f_win_execute},
+ {"win_findbuf", 1, 1, f_win_findbuf},
+ {"win_getid", 0, 2, f_win_getid},
+ {"win_gotoid", 1, 1, f_win_gotoid},
+***************
+*** 3519,3525 ****
+ * "execute()" function
+ */
+ static void
+! f_execute(typval_T *argvars, typval_T *rettv)
+ {
+ char_u *cmd = NULL;
+ list_T *list = NULL;
+--- 3521,3527 ----
+ * "execute()" function
+ */
+ static void
+! execute_common(typval_T *argvars, typval_T *rettv, int arg_off)
+ {
+ char_u *cmd = NULL;
+ list_T *list = NULL;
+***************
+*** 3535,3543 ****
+ rettv->vval.v_string = NULL;
+ rettv->v_type = VAR_STRING;
+
+! if (argvars[0].v_type == VAR_LIST)
+ {
+! list = argvars[0].vval.v_list;
+ if (list == NULL || list->lv_first == NULL)
+ /* empty list, no commands, empty output */
+ return;
+--- 3537,3545 ----
+ rettv->vval.v_string = NULL;
+ rettv->v_type = VAR_STRING;
+
+! if (argvars[arg_off].v_type == VAR_LIST)
+ {
+! list = argvars[arg_off].vval.v_list;
+ if (list == NULL || list->lv_first == NULL)
+ /* empty list, no commands, empty output */
+ return;
+***************
+*** 3545,3559 ****
+ }
+ else
+ {
+! cmd = tv_get_string_chk(&argvars[0]);
+ if (cmd == NULL)
+ return;
+ }
+
+! if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+ char_u buf[NUMBUFLEN];
+! char_u *s = tv_get_string_buf_chk(&argvars[1], buf);
+
+ if (s == NULL)
+ return;
+--- 3547,3561 ----
+ }
+ else
+ {
+! cmd = tv_get_string_chk(&argvars[arg_off]);
+ if (cmd == NULL)
+ return;
+ }
+
+! if (argvars[arg_off + 1].v_type != VAR_UNKNOWN)
+ {
+ char_u buf[NUMBUFLEN];
+! char_u *s = tv_get_string_buf_chk(&argvars[arg_off + 1], buf);
+
+ if (s == NULL)
+ return;
+***************
+*** 3621,3626 ****
+--- 3623,3637 ----
+ }
+
+ /*
++ * "execute()" function
++ */
++ static void
++ f_execute(typval_T *argvars, typval_T *rettv)
++ {
++ execute_common(argvars, rettv, 0);
++ }
++
++ /*
+ * "exepath()" function
+ */
+ static void
+***************
+*** 6095,6100 ****
+--- 6106,6135 ----
+ }
+ }
+ }
++
++ /*
++ * "win_execute()" function
++ */
++ static void
++ f_win_execute(typval_T *argvars, typval_T *rettv)
++ {
++ int id = (int)tv_get_number(argvars);
++ win_T *wp = win_id2wp(id);
++ win_T *save_curwin = curwin;
++
++ if (wp != NULL)
++ {
++ curwin = wp;
++ curbuf = curwin->w_buffer;
++ check_cursor();
++ execute_common(argvars, rettv, 1);
++ if (win_valid(save_curwin))
++ {
++ curwin = save_curwin;
++ curbuf = curwin->w_buffer;
++ }
++ }
++ }
+
+ /*
+ * "win_findbuf()" function
+*** ../vim-8.1.1417/src/popupwin.c 2019-05-29 20:26:32.525530253 +0200
+--- src/popupwin.c 2019-05-29 21:24:53.287215209 +0200
+***************
+*** 238,243 ****
+--- 238,244 ----
+ buf->b_p_ul = -1; // no undo
+ buf->b_p_swf = FALSE; // no swap file
+ buf->b_p_bl = FALSE; // unlisted buffer
++ buf->b_locked = TRUE;
+
+ win_init_popup_win(wp, buf);
+
+***************
+*** 376,381 ****
+--- 377,383 ----
+ static void
+ popup_free(win_T *wp)
+ {
++ wp->w_buffer->b_locked = FALSE;
+ if (wp->w_winrow + wp->w_height >= cmdline_row)
+ clear_cmdline = TRUE;
+ win_free_popup(wp);
+*** ../vim-8.1.1417/src/testdir/test_execute_func.vim 2018-12-08 13:57:38.553692769 +0100
+--- src/testdir/test_execute_func.vim 2019-05-29 21:41:04.481900749 +0200
+***************
+*** 78,80 ****
+--- 78,104 ----
+ endfor
+ call assert_equal('xyz ', text2)
+ endfunc
++
++ func Test_win_execute()
++ let thiswin = win_getid()
++ new
++ let otherwin = win_getid()
++ call setline(1, 'the new window')
++ call win_gotoid(thiswin)
++ let line = win_execute(otherwin, 'echo getline(1)')
++ call assert_match('the new window', line)
++
++ if has('textprop')
++ let popupwin = popup_create('the popup win', {'line': 2, 'col': 3})
++ redraw
++ let line = win_execute(popupwin, 'echo getline(1)')
++ call assert_match('the popup win', line)
++
++ call assert_fails('call win_execute(popupwin, "bwipe!")', 'E937:')
++
++ call popup_close(popupwin)
++ endif
++
++ call win_gotoid(otherwin)
++ bwipe!
++ endfunc
+*** ../vim-8.1.1417/runtime/doc/popup.txt 2019-05-29 20:26:32.525530253 +0200
+--- runtime/doc/popup.txt 2019-05-29 20:49:40.058507387 +0200
+***************
+*** 70,75 ****
+--- 70,76 ----
+ there is not enough space, some text may be invisible.
+
+
++
+ TODO:
+
+ Example how to use syntax highlighting of a code snippet.
+***************
+*** 242,255 ****
+ positioning mechanism applied.
+ If popup window {id} is not found an empty Dict is returned.
+
+- win_execute({id}, {command})
+- {not implemented yet}
+- Like `execute()` but in the context of window {id}.
+- The window will temporarily be made the current window,
+- without triggering autocommands.
+- Example: >
+- call win_execute(winid, 'syntax enable')
+- <
+
+ *:popupclear* *:popupc*
+ :popupc[lear] Emergency solution to a misbehaving plugin: close all popup
+--- 243,248 ----
+***************
+*** 274,279 ****
+--- 267,276 ----
+
+ The window does have a cursor position, but the cursor is not displayed.
+
++ To execute a command in the context of the popup window and buffer use
++ `win_execute()`. Example: >
++ call win_execute(winid, 'syntax enable')
++
+ Options can be set on the window with `setwinvar()`, e.g.: >
+ call setwinvar(winid, '&wrap', 0)
+ And options can be set on the buffer with `setbufvar()`, e.g.: >
+*** ../vim-8.1.1417/runtime/doc/eval.txt 2019-05-19 18:41:23.262148495 +0200
+--- runtime/doc/eval.txt 2019-05-29 20:52:47.933510908 +0200
+***************
+*** 2738,2743 ****
+--- 2739,2746 ----
+ virtcol({expr}) Number screen column of cursor or mark
+ visualmode([expr]) String last visual mode used
+ wildmenumode() Number whether 'wildmenu' mode is active
++ win_execute({id}, {command} [, {silent}])
++ String execute {command} in window {id}
+ win_findbuf({bufnr}) List find windows containing {bufnr}
+ win_getid([{win} [, {tab}]]) Number get window ID for {win} in {tab}
+ win_gotoid({expr}) Number go to window with ID {expr}
+***************
+*** 4011,4017 ****
+ To get a list of lines use |split()| on the result: >
+ split(execute('args'), "\n")
+
+! < When used recursively the output of the recursive call is not
+ included in the output of the higher level call.
+
+ exepath({expr}) *exepath()*
+--- 4014,4023 ----
+ To get a list of lines use |split()| on the result: >
+ split(execute('args'), "\n")
+
+! < To execute a command in another window than the current one
+! use `win_execute()`.
+!
+! When used recursively the output of the recursive call is not
+ included in the output of the higher level call.
+
+ exepath({expr}) *exepath()*
+***************
+*** 10306,10311 ****
+--- 10315,10326 ----
+ <
+ (Note, this needs the 'wildcharm' option set appropriately).
+
++ win_execute({id}, {command} [, {silent}]) *win_execute()*
++ Like `execute()` but in the context of window {id}.
++ The window will temporarily be made the current window,
++ without triggering autocommands.
++ Example: >
++ call win_execute(winid, 'syntax enable')
+
+ win_findbuf({bufnr}) *win_findbuf()*
+ Returns a list with |window-ID|s for windows that contain
+*** ../vim-8.1.1417/src/version.c 2019-05-29 20:36:51.502509469 +0200
+--- src/version.c 2019-05-29 20:49:08.242676060 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1418,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+44. Your friends no longer send you e-mail...they just log on to your 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.1419 b/data/vim/patches/8.1.1419
new file mode 100644
index 000000000..bd0b97b78
--- /dev/null
+++ b/data/vim/patches/8.1.1419
@@ -0,0 +1,195 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1419
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1419
+Problem: Listener callbacks may be called recursively.
+Solution: Set "updating_screen" while listener callbacks are invoked.
+Files: src/change.c, src/screen.c, src/proto/screen.pro, src/ui.c
+
+
+*** ../vim-8.1.1418/src/change.c 2019-05-28 23:08:12.052648779 +0200
+--- src/change.c 2019-05-29 22:28:20.083214648 +0200
+***************
+*** 376,385 ****
+ linenr_T start = MAXLNUM;
+ linenr_T end = 0;
+ linenr_T added = 0;
+
+ if (buf->b_recorded_changes == NULL // nothing changed
+! || buf->b_listener == NULL) // no listeners
+ return;
+
+ argv[0].v_type = VAR_NUMBER;
+ argv[0].vval.v_number = buf->b_fnum; // a:bufnr
+--- 376,393 ----
+ linenr_T start = MAXLNUM;
+ linenr_T end = 0;
+ linenr_T added = 0;
++ int save_updating_screen = updating_screen;
++ static int recursive = FALSE;
+
+ if (buf->b_recorded_changes == NULL // nothing changed
+! || buf->b_listener == NULL // no listeners
+! || recursive) // already busy
+ return;
++ recursive = TRUE;
++
++ // Block messages on channels from being handled, so that they don't make
++ // text changes here.
++ ++updating_screen;
+
+ argv[0].v_type = VAR_NUMBER;
+ argv[0].vval.v_number = buf->b_fnum; // a:bufnr
+***************
+*** 418,423 ****
+--- 426,437 ----
+ --textlock;
+ list_unref(buf->b_recorded_changes);
+ buf->b_recorded_changes = NULL;
++
++ if (save_updating_screen)
++ updating_screen = TRUE;
++ else
++ after_updating_screen(TRUE);
++ recursive = FALSE;
+ }
+ #endif
+
+*** ../vim-8.1.1418/src/screen.c 2019-05-28 23:08:12.076648654 +0200
+--- src/screen.c 2019-05-29 22:19:41.157935812 +0200
+***************
+*** 506,513 ****
+ redraw_win_later(wp, VALID);
+ }
+
+ void
+! reset_updating_screen(int may_resize_shell UNUSED)
+ {
+ updating_screen = FALSE;
+ #ifdef FEAT_GUI
+--- 506,517 ----
+ redraw_win_later(wp, VALID);
+ }
+
++ /*
++ * To be called when "updating_screen" was set before and now the postponed
++ * side effects may take place.
++ */
+ void
+! after_updating_screen(int may_resize_shell UNUSED)
+ {
+ updating_screen = FALSE;
+ #ifdef FEAT_GUI
+***************
+*** 803,809 ****
+ FOR_ALL_WINDOWS(wp)
+ wp->w_buffer->b_mod_set = FALSE;
+
+! reset_updating_screen(TRUE);
+
+ /* Clear or redraw the command line. Done last, because scrolling may
+ * mess up the command line. */
+--- 807,813 ----
+ FOR_ALL_WINDOWS(wp)
+ wp->w_buffer->b_mod_set = FALSE;
+
+! after_updating_screen(TRUE);
+
+ /* Clear or redraw the command line. Done last, because scrolling may
+ * mess up the command line. */
+***************
+*** 886,892 ****
+ end_search_hl();
+ # endif
+
+! reset_updating_screen(TRUE);
+
+ # ifdef FEAT_GUI
+ /* Redraw the cursor and update the scrollbars when all screen updating is
+--- 890,896 ----
+ end_search_hl();
+ # endif
+
+! after_updating_screen(TRUE);
+
+ # ifdef FEAT_GUI
+ /* Redraw the cursor and update the scrollbars when all screen updating is
+*** ../vim-8.1.1418/src/proto/screen.pro 2019-01-25 22:29:54.139821894 +0100
+--- src/proto/screen.pro 2019-05-29 22:19:19.390049606 +0200
+***************
+*** 10,16 ****
+ int redraw_asap(int type);
+ void redraw_after_callback(int call_update_screen);
+ void redrawWinline(win_T *wp, linenr_T lnum);
+! void reset_updating_screen(int may_resize_shell);
+ void update_curbuf(int type);
+ int update_screen(int type_arg);
+ int conceal_cursor_line(win_T *wp);
+--- 10,16 ----
+ int redraw_asap(int type);
+ void redraw_after_callback(int call_update_screen);
+ void redrawWinline(win_T *wp, linenr_T lnum);
+! void after_updating_screen(int may_resize_shell);
+ void update_curbuf(int type);
+ int update_screen(int type_arg);
+ int conceal_cursor_line(win_T *wp);
+***************
+*** 18,24 ****
+ void update_debug_sign(buf_T *buf, linenr_T lnum);
+ void updateWindow(win_T *wp);
+ int screen_get_current_line_off(void);
+! void screen_line(int row, int coloff, int endcol, int clear_width, int rlflag);
+ void rl_mirror(char_u *str);
+ void status_redraw_all(void);
+ void status_redraw_curbuf(void);
+--- 18,24 ----
+ void update_debug_sign(buf_T *buf, linenr_T lnum);
+ void updateWindow(win_T *wp);
+ int screen_get_current_line_off(void);
+! void screen_line(int row, int coloff, int endcol, int clear_width, int flags);
+ void rl_mirror(char_u *str);
+ void status_redraw_all(void);
+ void status_redraw_curbuf(void);
+*** ../vim-8.1.1418/src/ui.c 2019-05-28 23:08:12.080648632 +0200
+--- src/ui.c 2019-05-29 22:17:59.906464725 +0200
+***************
+*** 691,697 ****
+ if (save_updating_screen)
+ updating_screen = TRUE;
+ else
+! reset_updating_screen(FALSE);
+
+ recursive = FALSE;
+ }
+--- 691,697 ----
+ if (save_updating_screen)
+ updating_screen = TRUE;
+ else
+! after_updating_screen(FALSE);
+
+ recursive = FALSE;
+ }
+*** ../vim-8.1.1418/src/version.c 2019-05-29 21:44:30.764788713 +0200
+--- src/version.c 2019-05-29 22:23:54.116611053 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1419,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+47. You are so familiar with the WWW that you find the search engines useless.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1420 b/data/vim/patches/8.1.1420
new file mode 100644
index 000000000..1f0dd8109
--- /dev/null
+++ b/data/vim/patches/8.1.1420
@@ -0,0 +1,149 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1420
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1420
+Problem: Popup window size only uses first line length.
+Solution: Use the longest line. (Ben Jackson, closes #4451) Also deal with
+ wrapping lines.
+Files: src/popupwin.c, src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1419/src/popupwin.c 2019-05-29 21:44:30.764788713 +0200
+--- src/popupwin.c 2019-05-29 23:02:05.528300268 +0200
+***************
+*** 154,159 ****
+--- 154,163 ----
+ static void
+ popup_adjust_position(win_T *wp)
+ {
++ linenr_T lnum;
++ int wrapped = 0;
++ int maxwidth;
++
+ // TODO: Compute the size and position properly.
+ if (wp->w_wantline > 0)
+ wp->w_winrow = wp->w_wantline - 1;
+***************
+*** 171,188 ****
+ if (wp->w_wincol >= Columns - 3)
+ wp->w_wincol = Columns - 3;
+
+! // TODO: set width based on longest text line and the 'wrap' option
+! wp->w_width = vim_strsize(ml_get_buf(wp->w_buffer, 1, FALSE));
+ if (wp->w_minwidth > 0 && wp->w_width < wp->w_minwidth)
+ wp->w_width = wp->w_minwidth;
+! if (wp->w_maxwidth > 0 && wp->w_width > wp->w_maxwidth)
+! wp->w_width = wp->w_maxwidth;
+! if (wp->w_width > Columns - wp->w_wincol)
+! wp->w_width = Columns - wp->w_wincol;
+
+ if (wp->w_height <= 1)
+! // TODO: adjust height for wrapped lines
+! wp->w_height = wp->w_buffer->b_ml.ml_line_count;
+ if (wp->w_minheight > 0 && wp->w_height < wp->w_minheight)
+ wp->w_height = wp->w_minheight;
+ if (wp->w_maxheight > 0 && wp->w_height > wp->w_maxheight)
+--- 175,208 ----
+ if (wp->w_wincol >= Columns - 3)
+ wp->w_wincol = Columns - 3;
+
+! maxwidth = Columns - wp->w_wincol;
+! if (wp->w_maxwidth > 0 && maxwidth > wp->w_maxwidth)
+! maxwidth = wp->w_maxwidth;
+!
+! // Compute width based on longest text line and the 'wrap' option.
+! // TODO: more accurate wrapping
+! wp->w_width = 0;
+! for (lnum = 1; lnum <= wp->w_buffer->b_ml.ml_line_count; ++lnum)
+! {
+! int len = vim_strsize(ml_get_buf(wp->w_buffer, lnum, FALSE));
+!
+! while (wp->w_p_wrap && len > maxwidth)
+! {
+! ++wrapped;
+! len -= maxwidth;
+! wp->w_width = maxwidth;
+! }
+! if (wp->w_width < len)
+! wp->w_width = len;
+! }
+!
+ if (wp->w_minwidth > 0 && wp->w_width < wp->w_minwidth)
+ wp->w_width = wp->w_minwidth;
+! if (wp->w_width > maxwidth)
+! wp->w_width = maxwidth;
+
+ if (wp->w_height <= 1)
+! wp->w_height = wp->w_buffer->b_ml.ml_line_count + wrapped;
+ if (wp->w_minheight > 0 && wp->w_height < wp->w_minheight)
+ wp->w_height = wp->w_minheight;
+ if (wp->w_maxheight > 0 && wp->w_height > wp->w_maxheight)
+*** ../vim-8.1.1419/src/testdir/test_popupwin.vim 2019-05-29 20:26:32.525530253 +0200
+--- src/testdir/test_popupwin.vim 2019-05-29 23:08:49.922611877 +0200
+***************
+*** 176,178 ****
+--- 176,214 ----
+
+ call popup_close(winid)
+ endfunc
++
++ func Test_popup_width_longest()
++ let tests = [
++ \ [['hello', 'this', 'window', 'displays', 'all of its text'], 15],
++ \ [['hello', 'this', 'window', 'all of its text', 'displays'], 15],
++ \ [['hello', 'this', 'all of its text', 'window', 'displays'], 15],
++ \ [['hello', 'all of its text', 'this', 'window', 'displays'], 15],
++ \ [['all of its text', 'hello', 'this', 'window', 'displays'], 15],
++ \ ]
++
++ for test in tests
++ let winid = popup_create(test[0], {'line': 2, 'col': 3})
++ redraw
++ let position = popup_getposition(winid)
++ call assert_equal(test[1], position.width)
++ call popup_close(winid)
++ endfor
++ endfunc
++
++ func Test_popup_wraps()
++ let tests = [
++ \ ['nowrap', 6, 1],
++ \ ['a line that wraps once', 12, 2],
++ \ ['a line that wraps two times', 12, 3],
++ \ ]
++ for test in tests
++ let winid = popup_create(test[0],
++ \ {'line': 2, 'col': 3, 'maxwidth': 12})
++ redraw
++ let position = popup_getposition(winid)
++ call assert_equal(test[1], position.width)
++ call assert_equal(test[2], position.height)
++
++ call popup_close(winid)
++ endfor
++ endfunc
+*** ../vim-8.1.1419/src/version.c 2019-05-29 22:28:25.763184805 +0200
+--- src/version.c 2019-05-29 22:53:50.798934188 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1420,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+48. You get a tatoo that says "This body best viewed with Netscape 3.1 or
+ higher."
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1421 b/data/vim/patches/8.1.1421
new file mode 100644
index 000000000..82bcb1284
--- /dev/null
+++ b/data/vim/patches/8.1.1421
@@ -0,0 +1,244 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1421
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1421
+Problem: Drawing "~" line in popup window.
+Solution: Just draw text in the last line of the popup window.
+Files: src/screen.c, src/structs.h, src/popupwin.c,
+ src/proto/popupwin.pro, src/testdir/test_popupwin.vim,
+ src/testdir/dumps/Test_popupwin_05.dump,
+ src/testdir/dumps/Test_popupwin_06.dump
+
+*** ../vim-8.1.1420/src/screen.c 2019-05-29 22:28:25.763184805 +0200
+--- src/screen.c 2019-05-30 00:07:36.461352821 +0200
+***************
+*** 1030,1035 ****
+--- 1030,1041 ----
+
+ if (lowest_wp == NULL)
+ break;
++
++ // Recompute the position if the text changed.
++ if (lowest_wp->w_popup_last_changedtick
++ != CHANGEDTICK(lowest_wp->w_buffer))
++ popup_adjust_position(lowest_wp);
++
+ win_update(lowest_wp);
+ lowest_wp->w_popup_flags |= POPF_REDRAWN;
+ }
+***************
+*** 2119,2124 ****
+--- 2125,2133 ----
+ && wp->w_lines[idx].wl_lnum == lnum
+ && lnum > wp->w_topline
+ && !(dy_flags & (DY_LASTLINE | DY_TRUNCATE))
++ #ifdef FEAT_TEXT_PROP
++ && !bt_popup(wp->w_buffer)
++ #endif
+ && srow + wp->w_lines[idx].wl_size > wp->w_height
+ #ifdef FEAT_DIFF
+ && diff_check_fill(wp, lnum) == 0
+***************
+*** 2274,2279 ****
+--- 2283,2295 ----
+ wp->w_filler_rows = wp->w_height - srow;
+ }
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ else if (bt_popup(wp->w_buffer))
++ {
++ // popup line that doesn't fit is left as-is
++ wp->w_botline = lnum;
++ }
++ #endif
+ else if (dy_flags & DY_TRUNCATE) /* 'display' has "truncate" */
+ {
+ int scr_row = W_WINROW(wp) + wp->w_height - 1;
+***************
+*** 2334,2340 ****
+
+ // Make sure the rest of the screen is blank
+ // put '~'s on rows that aren't part of the file.
+! win_draw_end(wp, '~', ' ', FALSE, row, wp->w_height, HLF_EOB);
+ }
+
+ #ifdef SYN_TIME_LIMIT
+--- 2350,2360 ----
+
+ // Make sure the rest of the screen is blank
+ // put '~'s on rows that aren't part of the file.
+! win_draw_end(wp,
+! #ifdef FEAT_TEXT_PROP
+! bt_popup(wp->w_buffer) ? ' ' :
+! #endif
+! '~', ' ', FALSE, row, wp->w_height, HLF_EOB);
+ }
+
+ #ifdef SYN_TIME_LIMIT
+*** ../vim-8.1.1420/src/structs.h 2019-05-27 23:36:17.456452208 +0200
+--- src/structs.h 2019-05-29 23:55:07.389119328 +0200
+***************
+*** 2881,2886 ****
+--- 2881,2888 ----
+ int w_maxwidth; // "maxwidth" for popup window
+ int w_wantline; // "line" for popup window
+ int w_wantcol; // "col" for popup window
++ varnumber_T w_popup_last_changedtick; // b:changedtick when position was
++ // computed
+ # if defined(FEAT_TIMERS)
+ timer_T *w_popup_timer; // timer for closing popup window
+ # endif
+*** ../vim-8.1.1420/src/popupwin.c 2019-05-29 23:14:25.401172162 +0200
+--- src/popupwin.c 2019-05-30 00:07:32.617372125 +0200
+***************
+*** 151,157 ****
+ /*
+ * Adjust the position and size of the popup to fit on the screen.
+ */
+! static void
+ popup_adjust_position(win_T *wp)
+ {
+ linenr_T lnum;
+--- 151,157 ----
+ /*
+ * Adjust the position and size of the popup to fit on the screen.
+ */
+! void
+ popup_adjust_position(win_T *wp)
+ {
+ linenr_T lnum;
+***************
+*** 209,214 ****
+--- 209,216 ----
+ wp->w_height = wp->w_maxheight;
+ if (wp->w_height > Rows - wp->w_winrow)
+ wp->w_height = Rows - wp->w_winrow;
++
++ wp->w_popup_last_changedtick = CHANGEDTICK(wp->w_buffer);
+ }
+
+ /*
+*** ../vim-8.1.1420/src/proto/popupwin.pro 2019-05-29 20:26:32.525530253 +0200
+--- src/proto/popupwin.pro 2019-05-29 23:58:15.652171411 +0200
+***************
+*** 1,13 ****
+ /* popupwin.c */
+ void f_popup_create(typval_T *argvars, typval_T *rettv);
+ int popup_any_visible(void);
+ void f_popup_close(typval_T *argvars, typval_T *rettv);
+ void f_popup_hide(typval_T *argvars, typval_T *rettv);
+- void f_popup_getposition(typval_T *argvars, typval_T *rettv);
+ void f_popup_show(typval_T *argvars, typval_T *rettv);
+ void popup_close(int id);
+ void popup_close_tabpage(tabpage_T *tp, int id);
+ void close_all_popups(void);
+ void ex_popupclear(exarg_T *eap);
+ void f_popup_move(typval_T *argvars, typval_T *rettv);
+ /* vim: set ft=c : */
+--- 1,14 ----
+ /* popupwin.c */
++ void popup_adjust_position(win_T *wp);
+ void f_popup_create(typval_T *argvars, typval_T *rettv);
+ int popup_any_visible(void);
+ void f_popup_close(typval_T *argvars, typval_T *rettv);
+ void f_popup_hide(typval_T *argvars, typval_T *rettv);
+ void f_popup_show(typval_T *argvars, typval_T *rettv);
+ void popup_close(int id);
+ void popup_close_tabpage(tabpage_T *tp, int id);
+ void close_all_popups(void);
+ void ex_popupclear(exarg_T *eap);
+ void f_popup_move(typval_T *argvars, typval_T *rettv);
++ void f_popup_getposition(typval_T *argvars, typval_T *rettv);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1420/src/testdir/test_popupwin.vim 2019-05-29 23:14:25.401172162 +0200
+--- src/testdir/test_popupwin.vim 2019-05-30 00:09:27.736794071 +0200
+***************
+*** 41,51 ****
+ call term_sendkeys(buf, ":quit!\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_04', {})
+
+! " resize popup
+ call term_sendkeys(buf, ":call popup_move(popupwin, {'minwidth': 15, 'maxwidth': 25, 'minheight': 3, 'maxheight': 5})\<CR>")
+ call term_sendkeys(buf, ":redraw\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_05', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XtestPopup')
+--- 41,56 ----
+ call term_sendkeys(buf, ":quit!\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_04', {})
+
+! " resize popup, show empty line at bottom
+ call term_sendkeys(buf, ":call popup_move(popupwin, {'minwidth': 15, 'maxwidth': 25, 'minheight': 3, 'maxheight': 5})\<CR>")
+ call term_sendkeys(buf, ":redraw\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_05', {})
+
++ " show not fitting line at bottom
++ call term_sendkeys(buf, ":call setbufline(winbufnr(popupwin), 3, 'this line will not fit here')\<CR>")
++ call term_sendkeys(buf, ":redraw\<CR>")
++ call VerifyScreenDump(buf, 'Test_popupwin_06', {})
++
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XtestPopup')
+*** ../vim-8.1.1420/src/testdir/dumps/Test_popupwin_05.dump 2019-05-27 21:53:53.990229301 +0200
+--- src/testdir/dumps/Test_popupwin_05.dump 2019-05-29 23:36:51.574682812 +0200
+***************
+*** 3,9 ****
+ |~| @73
+ |~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @5| +0#4040ff13#ffffff0@51
+ |~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| | +0#4040ff13#ffffff0@51
+! |~| @6|~+0&#ffd7ff255| @13| +0&#ffffff0@51
+ |~| @73
+ |~| @73
+ |~| @73
+--- 3,9 ----
+ |~| @73
+ |~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @5| +0#4040ff13#ffffff0@51
+ |~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| | +0#4040ff13#ffffff0@51
+! |~| @6| +0&#ffd7ff255@14| +0&#ffffff0@51
+ |~| @73
+ |~| @73
+ |~| @73
+*** ../vim-8.1.1420/src/testdir/dumps/Test_popupwin_06.dump 2019-05-30 00:10:59.660332551 +0200
+--- src/testdir/dumps/Test_popupwin_06.dump 2019-05-30 00:09:35.280756197 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ > +0&#ffffff0@74
++ |~+0#4040ff13&| @73
++ |~| @73
++ |~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @15| +0#4040ff13#ffffff0@41
++ |~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @10| +0#4040ff13#ffffff0@41
++ |~| @6|t+0#0000001#ffd7ff255|h|i|s| |l|i|n|e| |w|i|l@1| |n|o|t| |f|i|t| |h|e| +0#4040ff13#ffffff0@41
++ |~| @73
++ |~| @73
++ |~| @73
++ |:+0#0000000&|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1|
+*** ../vim-8.1.1420/src/version.c 2019-05-29 23:14:25.401172162 +0200
+--- src/version.c 2019-05-29 23:35:38.523045031 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1421,
+ /**/
+
+
+--
+hundred-and-one symptoms of being an internet addict:
+49. You never have to deal with busy signals when calling your ISP...because
+ you never log 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.1422 b/data/vim/patches/8.1.1422
new file mode 100644
index 000000000..fd0a00455
--- /dev/null
+++ b/data/vim/patches/8.1.1422
@@ -0,0 +1,286 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1422
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1422
+Problem: Popup_getoptions() not implemented yet.
+Solution: Implement it. (closes #4452)
+Files: runtime/doc/popup.txt, src/evalfunc.c, src/popupwin.c,
+ src/proto/popupwin.pro, src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1421/runtime/doc/popup.txt 2019-05-29 21:44:30.764788713 +0200
+--- runtime/doc/popup.txt 2019-05-30 14:24:42.327163943 +0200
+***************
+*** 86,100 ****
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+ - when creating the window set options to Vim default? (verify with 'number')
+- - Do not show tilde below last line.
+ - Implement filter.
+ Check that popup_close() works in the filter.
+ - Handle screen resize in screenalloc().
+ - Make redrawing more efficient and avoid flicker.
+ Fix redrawing problem with completion.
+ Fix redrawing problem when scrolling non-current window
+ Fix redrawing the statusline on top of a popup
+! - Properly figure out the size and position.
+ - Can the buffer be re-used, to avoid using up lots of buffer numbers?
+ - Implement all the unimplemented options and features.
+
+--- 86,103 ----
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+ - when creating the window set options to Vim default? (verify with 'number')
+ - Implement filter.
+ Check that popup_close() works in the filter.
++ - Implement the "pos" option.
+ - Handle screen resize in screenalloc().
+ - Make redrawing more efficient and avoid flicker.
++ Store popup info in a mask, use the mask in screen_line()
+ Fix redrawing problem with completion.
+ Fix redrawing problem when scrolling non-current window
+ Fix redrawing the statusline on top of a popup
+! - Figure out the size and position better.
+! if wrapping splits a double-wide character
+! if wrapping has an indent
+ - Can the buffer be re-used, to avoid using up lots of buffer numbers?
+ - Implement all the unimplemented options and features.
+
+***************
+*** 228,243 ****
+
+
+ popup_getoptions({id}) *popup_getoptions()*
+! {not implemented yet}
+! Return the {options} for popup {id}.
+
+ popup_getposition({id}) *popup_getposition()*
+ Return the position and size of popup {id}. Returns a Dict
+ with these entries:
+! col screen column of the popup, one-based
+! line screen line of the popup, one-based
+! width width of the popup in screen cells
+! height height of the popup in screen cells
+ Note that these are the actual screen positions. They differ
+ from the values in `popup_getoptions()` for the sizing and
+ positioning mechanism applied.
+--- 231,253 ----
+
+
+ popup_getoptions({id}) *popup_getoptions()*
+! Return the {options} for popup {id} in a Dict.
+! A zero value means the option was not set.
+!
+! The "highlight" entry is omitted, use the 'wincolor' option
+! for that: >
+! let hl = getwinvar(winid, '&wincolor')
+!
+! < If popup window {id} is not found an empty Dict is returned.
+
+ popup_getposition({id}) *popup_getposition()*
+ Return the position and size of popup {id}. Returns a Dict
+ with these entries:
+! col screen column of the popup, one-based
+! line screen line of the popup, one-based
+! width width of the popup in screen cells
+! height height of the popup in screen cells
+! visible one if the popup is displayed, zero if hidden
+ Note that these are the actual screen positions. They differ
+ from the values in `popup_getoptions()` for the sizing and
+ positioning mechanism applied.
+***************
+*** 304,312 ****
+ {only number is implemented}
+ pos "topleft", "topright", "botleft" or "botright":
+ defines what corner of the popup "line" and "col" are
+! used for. Default is "botleft". Alternatively
+! "center" can be used to position the popup in the
+! center of the Vim window.
+ {not implemented yet}
+ flip when TRUE (the default) and the position is relative
+ to the cursor, flip to below or above the cursor to
+--- 314,322 ----
+ {only number is implemented}
+ pos "topleft", "topright", "botleft" or "botright":
+ defines what corner of the popup "line" and "col" are
+! used for. When not set "topleft" is used.
+! Alternatively "center" can be used to position the
+! popup in the center of the Vim window.
+ {not implemented yet}
+ flip when TRUE (the default) and the position is relative
+ to the cursor, flip to below or above the cursor to
+*** ../vim-8.1.1421/src/evalfunc.c 2019-05-29 21:44:30.764788713 +0200
+--- src/evalfunc.c 2019-05-30 14:12:04.363485719 +0200
+***************
+*** 811,816 ****
+--- 811,817 ----
+ #ifdef FEAT_TEXT_PROP
+ {"popup_close", 1, 1, f_popup_close},
+ {"popup_create", 2, 2, f_popup_create},
++ {"popup_getoptions", 1, 1, f_popup_getoptions},
+ {"popup_getposition", 1, 1, f_popup_getposition},
+ {"popup_hide", 1, 1, f_popup_hide},
+ {"popup_move", 2, 2, f_popup_move},
+*** ../vim-8.1.1421/src/popupwin.c 2019-05-30 00:11:48.704086357 +0200
+--- src/popupwin.c 2019-05-30 14:23:50.803455533 +0200
+***************
+*** 530,535 ****
+--- 530,567 ----
+ dict_add_number(dict, "col", wp->w_wincol + 1);
+ dict_add_number(dict, "width", wp->w_width);
+ dict_add_number(dict, "height", wp->w_height);
++ dict_add_number(dict, "visible",
++ (wp->w_popup_flags & POPF_HIDDEN) == 0);
++ }
++ }
++
++ /*
++ * f_popup_getoptions({id})
++ */
++ void
++ f_popup_getoptions(typval_T *argvars, typval_T *rettv)
++ {
++ dict_T *dict;
++ int id = (int)tv_get_number(argvars);
++ win_T *wp = find_popup_win(id);
++
++ if (rettv_dict_alloc(rettv) == OK)
++ {
++ if (wp == NULL)
++ return;
++
++ dict = rettv->vval.v_dict;
++ dict_add_number(dict, "line", wp->w_wantline);
++ dict_add_number(dict, "col", wp->w_wantcol);
++ dict_add_number(dict, "minwidth", wp->w_minwidth);
++ dict_add_number(dict, "minheight", wp->w_minheight);
++ dict_add_number(dict, "maxheight", wp->w_maxheight);
++ dict_add_number(dict, "maxwidth", wp->w_maxwidth);
++ dict_add_number(dict, "zindex", wp->w_zindex);
++ # if defined(FEAT_TIMERS)
++ dict_add_number(dict, "time", wp->w_popup_timer != NULL
++ ? (long)wp->w_popup_timer->tr_interval : 0L);
++ # endif
+ }
+ }
+ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.1421/src/proto/popupwin.pro 2019-05-30 00:11:48.704086357 +0200
+--- src/proto/popupwin.pro 2019-05-30 14:11:15.287769511 +0200
+***************
+*** 10,14 ****
+--- 10,15 ----
+ void close_all_popups(void);
+ void ex_popupclear(exarg_T *eap);
+ void f_popup_move(typval_T *argvars, typval_T *rettv);
++ void f_popup_getoptions(typval_T *argvars, typval_T *rettv);
+ void f_popup_getposition(typval_T *argvars, typval_T *rettv);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1421/src/testdir/test_popupwin.vim 2019-05-30 00:11:48.704086357 +0200
+--- src/testdir/test_popupwin.vim 2019-05-30 14:28:02.174052682 +0200
+***************
+*** 108,123 ****
+--- 108,126 ----
+ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('world', line)
++ call assert_equal(1, popup_getposition(winid).visible)
+
+ call popup_hide(winid)
+ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('hello', line)
++ call assert_equal(0, popup_getposition(winid).visible)
+
+ call popup_show(winid)
+ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('world', line)
++ call assert_equal(1, popup_getposition(winid).visible)
+
+
+ call popup_close(winid)
+***************
+*** 178,183 ****
+--- 181,187 ----
+ call assert_equal(3, res.col)
+ call assert_equal(10, res.width)
+ call assert_equal(11, res.height)
++ call assert_equal(1, res.visible)
+
+ call popup_close(winid)
+ endfunc
+***************
+*** 215,219 ****
+--- 219,266 ----
+ call assert_equal(test[2], position.height)
+
+ call popup_close(winid)
++ call assert_equal({}, popup_getposition(winid))
+ endfor
+ endfunc
++
++ func Test_popup_getoptions()
++ let winid = popup_create('hello', {
++ \ 'line': 2,
++ \ 'col': 3,
++ \ 'minwidth': 10,
++ \ 'minheight': 11,
++ \ 'maxwidth': 20,
++ \ 'maxheight': 21,
++ \ 'zindex': 100,
++ \ 'time': 5000,
++ \})
++ redraw
++ let res = popup_getoptions(winid)
++ call assert_equal(2, res.line)
++ call assert_equal(3, res.col)
++ call assert_equal(10, res.minwidth)
++ call assert_equal(11, res.minheight)
++ call assert_equal(20, res.maxwidth)
++ call assert_equal(21, res.maxheight)
++ call assert_equal(100, res.zindex)
++ if has('timers')
++ call assert_equal(5000, res.time)
++ endif
++ call popup_close(winid)
++
++ let winid = popup_create('hello', {})
++ redraw
++ let res = popup_getoptions(winid)
++ call assert_equal(0, res.line)
++ call assert_equal(0, res.col)
++ call assert_equal(0, res.minwidth)
++ call assert_equal(0, res.minheight)
++ call assert_equal(0, res.maxwidth)
++ call assert_equal(0, res.maxheight)
++ call assert_equal(50, res.zindex)
++ if has('timers')
++ call assert_equal(0, res.time)
++ endif
++ call popup_close(winid)
++ call assert_equal({}, popup_getoptions(winid))
++ endfunc
+*** ../vim-8.1.1421/src/version.c 2019-05-30 00:11:48.704086357 +0200
+--- src/version.c 2019-05-30 14:28:17.621969065 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1422,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+50. The last girl you picked up was only a jpeg.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1423 b/data/vim/patches/8.1.1423
new file mode 100644
index 000000000..db04c4d5f
--- /dev/null
+++ b/data/vim/patches/8.1.1423
@@ -0,0 +1,242 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1423
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1423
+Problem: Popup windows use options from current window and buffer.
+Solution: Clear all local options when creating a popup window.
+Files: src/popupwin.c, src/option.c, src/proto/option.pro,
+ src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1422/src/popupwin.c 2019-05-30 14:29:42.597507636 +0200
+--- src/popupwin.c 2019-05-30 15:00:03.807391833 +0200
+***************
+*** 253,258 ****
+--- 253,262 ----
+ if (buf == NULL)
+ return;
+ ml_open(buf);
++
++ win_init_popup_win(wp, buf);
++
++ set_local_options_default(wp);
+ set_string_option_direct_in_buf(buf, (char_u *)"buftype", -1,
+ (char_u *)"popup", OPT_FREE|OPT_LOCAL, 0);
+ set_string_option_direct_in_buf(buf, (char_u *)"bufhidden", -1,
+***************
+*** 262,269 ****
+ buf->b_p_bl = FALSE; // unlisted buffer
+ buf->b_locked = TRUE;
+
+- win_init_popup_win(wp, buf);
+-
+ nr = (int)dict_get_number(d, (char_u *)"tab");
+ if (nr == 0)
+ {
+--- 266,271 ----
+*** ../vim-8.1.1422/src/option.c 2019-05-28 23:08:12.072648675 +0200
+--- src/option.c 2019-05-30 15:17:11.233968834 +0200
+***************
+*** 3269,3275 ****
+ static int findoption(char_u *);
+ static int find_key_option(char_u *arg_arg, int has_lt);
+ static void showoptions(int all, int opt_flags);
+! static int optval_default(struct vimoption *, char_u *varp);
+ static void showoneopt(struct vimoption *, int opt_flags);
+ static int put_setstring(FILE *fd, char *cmd, char *name, char_u **valuep, long_u flags);
+ static int put_setnum(FILE *fd, char *cmd, char *name, long *valuep);
+--- 3269,3275 ----
+ static int findoption(char_u *);
+ static int find_key_option(char_u *arg_arg, int has_lt);
+ static void showoptions(int all, int opt_flags);
+! static int optval_default(struct vimoption *, char_u *varp, int compatible);
+ static void showoneopt(struct vimoption *, int opt_flags);
+ static int put_setstring(FILE *fd, char *cmd, char *name, char_u **valuep, long_u flags);
+ static int put_setnum(FILE *fd, char *cmd, char *name, long *valuep);
+***************
+*** 3893,3898 ****
+--- 3893,3928 ----
+ options[opt_idx].def_val[VI_DEFAULT] = (char_u *)(long_i)val;
+ }
+
++ /*
++ * Set all window-local and buffer-local options to the Vim default.
++ * local-global options will use the global value.
++ */
++ void
++ set_local_options_default(win_T *wp)
++ {
++ win_T *save_curwin = curwin;
++ int i;
++
++ curwin = wp;
++ curbuf = curwin->w_buffer;
++ block_autocmds();
++
++ for (i = 0; !istermoption(&options[i]); i++)
++ {
++ struct vimoption *p = &(options[i]);
++ char_u *varp = get_varp_scope(p, OPT_LOCAL);
++
++ if (p->indir != PV_NONE
++ && !(options[i].flags & P_NODEFAULT)
++ && !optval_default(p, varp, FALSE))
++ set_option_default(i, OPT_LOCAL, FALSE);
++ }
++
++ unblock_autocmds();
++ curwin = save_curwin;
++ curbuf = curwin->w_buffer;
++ }
++
+ #if defined(EXITFREE) || defined(PROTO)
+ /*
+ * Free all options.
+***************
+*** 10149,10155 ****
+ if (varp != NULL
+ && ((all == 2 && isterm)
+ || (all == 1 && !isterm)
+! || (all == 0 && !optval_default(p, varp))))
+ {
+ if (p->flags & P_BOOL)
+ len = 1; /* a toggle option fits always */
+--- 10179,10185 ----
+ if (varp != NULL
+ && ((all == 2 && isterm)
+ || (all == 1 && !isterm)
+! || (all == 0 && !optval_default(p, varp, p_cp))))
+ {
+ if (p->flags & P_BOOL)
+ len = 1; /* a toggle option fits always */
+***************
+*** 10199,10211 ****
+ * Return TRUE if option "p" has its default value.
+ */
+ static int
+! optval_default(struct vimoption *p, char_u *varp)
+ {
+ int dvi;
+
+ if (varp == NULL)
+ return TRUE; /* hidden option is always at default */
+! dvi = ((p->flags & P_VI_DEF) || p_cp) ? VI_DEFAULT : VIM_DEFAULT;
+ if (p->flags & P_NUM)
+ return (*(long *)varp == (long)(long_i)p->def_val[dvi]);
+ if (p->flags & P_BOOL)
+--- 10229,10241 ----
+ * Return TRUE if option "p" has its default value.
+ */
+ static int
+! optval_default(struct vimoption *p, char_u *varp, int compatible)
+ {
+ int dvi;
+
+ if (varp == NULL)
+ return TRUE; /* hidden option is always at default */
+! dvi = ((p->flags & P_VI_DEF) || compatible) ? VI_DEFAULT : VIM_DEFAULT;
+ if (p->flags & P_NUM)
+ return (*(long *)varp == (long)(long_i)p->def_val[dvi]);
+ if (p->flags & P_BOOL)
+***************
+*** 10311,10317 ****
+
+ /* Global values are only written when not at the default value. */
+ varp = get_varp_scope(p, opt_flags);
+! if ((opt_flags & OPT_GLOBAL) && optval_default(p, varp))
+ continue;
+
+ round = 2;
+--- 10341,10347 ----
+
+ /* Global values are only written when not at the default value. */
+ varp = get_varp_scope(p, opt_flags);
+! if ((opt_flags & OPT_GLOBAL) && optval_default(p, varp, p_cp))
+ continue;
+
+ round = 2;
+***************
+*** 10327,10333 ****
+ if (!(opt_flags & OPT_GLOBAL) && !local_only)
+ {
+ varp_fresh = get_varp_scope(p, OPT_GLOBAL);
+! if (!optval_default(p, varp_fresh))
+ {
+ round = 1;
+ varp_local = varp;
+--- 10357,10363 ----
+ if (!(opt_flags & OPT_GLOBAL) && !local_only)
+ {
+ varp_fresh = get_varp_scope(p, OPT_GLOBAL);
+! if (!optval_default(p, varp_fresh, p_cp))
+ {
+ round = 1;
+ varp_local = varp;
+*** ../vim-8.1.1422/src/proto/option.pro 2019-05-26 21:03:19.940073927 +0200
+--- src/proto/option.pro 2019-05-30 14:42:45.737186164 +0200
+***************
+*** 2,7 ****
+--- 2,8 ----
+ void set_init_1(int clean_arg);
+ void set_string_default(char *name, char_u *val);
+ void set_number_default(char *name, long val);
++ void set_local_options_default(win_T *wp);
+ void free_all_options(void);
+ void set_init_2(void);
+ void set_init_3(void);
+*** ../vim-8.1.1422/src/testdir/test_popupwin.vim 2019-05-30 14:29:42.597507636 +0200
+--- src/testdir/test_popupwin.vim 2019-05-30 15:18:36.037507243 +0200
+***************
+*** 264,266 ****
+--- 264,289 ----
+ call popup_close(winid)
+ call assert_equal({}, popup_getoptions(winid))
+ endfunc
++
++ func Test_popup_option_values()
++ new
++ " window-local
++ setlocal number
++ setlocal nowrap
++ " buffer-local
++ setlocal omnifunc=Something
++ " global/buffer-local
++ setlocal path=/there
++ " global/window-local
++ setlocal scrolloff=9
++
++ let winid = popup_create('hello', {})
++ call assert_equal(0, getwinvar(winid, '&number'))
++ call assert_equal(1, getwinvar(winid, '&wrap'))
++ call assert_equal('', getwinvar(winid, '&omnifunc'))
++ call assert_equal(&g:path, getwinvar(winid, '&path'))
++ call assert_equal(&g:scrolloff, getwinvar(winid, '&scrolloff'))
++
++ call popup_close(winid)
++ bwipe
++ endfunc
+*** ../vim-8.1.1422/src/version.c 2019-05-30 14:29:42.597507636 +0200
+--- src/version.c 2019-05-30 14:42:37.873229921 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1423,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+51. You put a pillow case over your laptop so your lover doesn't see it while
+ you are pretending to catch your breath.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1424 b/data/vim/patches/8.1.1424
new file mode 100644
index 000000000..050a7e6da
--- /dev/null
+++ b/data/vim/patches/8.1.1424
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1424
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1424
+Problem: Crash when popup menu is deleted while waiting for char.
+Solution: Bail out when pum_array was cleared.
+Files: src/popupmnu.c
+
+
+*** ../vim-8.1.1423/src/popupmnu.c 2019-05-28 23:08:12.072648675 +0200
+--- src/popupmnu.c 2019-05-30 15:51:54.799280366 +0200
+***************
+*** 1302,1308 ****
+ out_flush();
+
+ c = vgetc();
+! if (c == ESC || c == Ctrl_C)
+ break;
+ else if (c == CAR || c == NL)
+ {
+--- 1302,1311 ----
+ out_flush();
+
+ c = vgetc();
+!
+! // Bail out when typing Esc, CTRL-C or some callback closed the popup
+! // menu.
+! if (c == ESC || c == Ctrl_C || pum_array == NULL)
+ break;
+ else if (c == CAR || c == NL)
+ {
+*** ../vim-8.1.1423/src/version.c 2019-05-30 15:22:39.840174945 +0200
+--- src/version.c 2019-05-30 15:52:45.075020524 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1424,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+53. To find out what time it is, you send yourself an e-mail and check the
+ "Date:" field.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1425 b/data/vim/patches/8.1.1425
new file mode 100644
index 000000000..720d3acaf
--- /dev/null
+++ b/data/vim/patches/8.1.1425
@@ -0,0 +1,189 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1425
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1425
+Problem: Win_execute() does not set window pointers properly.
+Solution: Use switch_win_noblock(). Also execute autocommands in a popup
+ window.
+Files: src/window.c, src/proto/window.pro, src/evalfunc.c, src/autocmd.c
+
+
+*** ../vim-8.1.1424/src/window.c 2019-05-28 23:08:12.080648632 +0200
+--- src/window.c 2019-05-30 17:28:15.916167785 +0200
+***************
+*** 6495,6500 ****
+--- 6495,6514 ----
+ int no_display)
+ {
+ block_autocmds();
++ return switch_win_noblock(save_curwin, save_curtab, win, tp, no_display);
++ }
++
++ /*
++ * As switch_win() but without blocking autocommands.
++ */
++ int
++ switch_win_noblock(
++ win_T **save_curwin,
++ tabpage_T **save_curtab,
++ win_T *win,
++ tabpage_T *tp,
++ int no_display)
++ {
+ *save_curwin = curwin;
+ if (tp != NULL)
+ {
+***************
+*** 6524,6532 ****
+ */
+ void
+ restore_win(
+! win_T *save_curwin UNUSED,
+! tabpage_T *save_curtab UNUSED,
+! int no_display UNUSED)
+ {
+ if (save_curtab != NULL && valid_tabpage(save_curtab))
+ {
+--- 6538,6559 ----
+ */
+ void
+ restore_win(
+! win_T *save_curwin,
+! tabpage_T *save_curtab,
+! int no_display)
+! {
+! restore_win_noblock(save_curwin, save_curtab, no_display);
+! unblock_autocmds();
+! }
+!
+! /*
+! * As restore_win() but without unblocking autocommands.
+! */
+! void
+! restore_win_noblock(
+! win_T *save_curwin,
+! tabpage_T *save_curtab,
+! int no_display)
+ {
+ if (save_curtab != NULL && valid_tabpage(save_curtab))
+ {
+***************
+*** 6546,6552 ****
+ curwin = save_curwin;
+ curbuf = curwin->w_buffer;
+ }
+- unblock_autocmds();
+ }
+
+ /*
+--- 6573,6578 ----
+*** ../vim-8.1.1424/src/proto/window.pro 2019-05-25 19:51:03.776408456 +0200
+--- src/proto/window.pro 2019-05-30 16:29:54.863661874 +0200
+***************
+*** 77,83 ****
+--- 77,85 ----
+ void make_snapshot(int idx);
+ void restore_snapshot(int idx, int close_curwin);
+ int switch_win(win_T **save_curwin, tabpage_T **save_curtab, win_T *win, tabpage_T *tp, int no_display);
++ int switch_win_noblock(win_T **save_curwin, tabpage_T **save_curtab, win_T *win, tabpage_T *tp, int no_display);
+ void restore_win(win_T *save_curwin, tabpage_T *save_curtab, int no_display);
++ void restore_win_noblock(win_T *save_curwin, tabpage_T *save_curtab, int no_display);
+ void switch_buffer(bufref_T *save_curbuf, buf_T *buf);
+ void restore_buffer(bufref_T *save_curbuf);
+ int win_hasvertsplit(void);
+*** ../vim-8.1.1424/src/evalfunc.c 2019-05-30 14:29:42.597507636 +0200
+--- src/evalfunc.c 2019-05-30 16:35:07.094047567 +0200
+***************
+*** 6116,6134 ****
+ {
+ int id = (int)tv_get_number(argvars);
+ win_T *wp = win_id2wp(id);
+! win_T *save_curwin = curwin;
+
+ if (wp != NULL)
+ {
+! curwin = wp;
+! curbuf = curwin->w_buffer;
+! check_cursor();
+! execute_common(argvars, rettv, 1);
+! if (win_valid(save_curwin))
+ {
+! curwin = save_curwin;
+! curbuf = curwin->w_buffer;
+ }
+ }
+ }
+
+--- 6116,6133 ----
+ {
+ int id = (int)tv_get_number(argvars);
+ win_T *wp = win_id2wp(id);
+! win_T *save_curwin;
+! tabpage_T *save_curtab;
+
+ if (wp != NULL)
+ {
+! if (switch_win_noblock(&save_curwin, &save_curtab, wp, curtab, TRUE)
+! == OK)
+ {
+! check_cursor();
+! execute_common(argvars, rettv, 1);
+ }
++ restore_win_noblock(save_curwin, save_curtab, TRUE);
+ }
+ }
+
+*** ../vim-8.1.1424/src/autocmd.c 2019-05-28 23:08:12.052648779 +0200
+--- src/autocmd.c 2019-05-30 16:56:53.315286006 +0200
+***************
+*** 1349,1355 ****
+ */
+ FOR_ALL_BUFFERS(buf)
+ {
+! if (buf->b_ml.ml_mfp != NULL && !bt_popup(buf))
+ {
+ // find a window for this buffer and save some values
+ aucmd_prepbuf(&aco, buf);
+--- 1349,1355 ----
+ */
+ FOR_ALL_BUFFERS(buf)
+ {
+! if (buf->b_ml.ml_mfp != NULL)
+ {
+ // find a window for this buffer and save some values
+ aucmd_prepbuf(&aco, buf);
+***************
+*** 1612,1619 ****
+ int force, // when TRUE, ignore autocmd_busy
+ buf_T *buf) // buffer for <abuf>
+ {
+- if (bt_popup(buf))
+- return FALSE;
+ return apply_autocmds_group(event, fname, fname_io, force,
+ AUGROUP_ALL, buf, NULL);
+ }
+--- 1612,1617 ----
+*** ../vim-8.1.1424/src/version.c 2019-05-30 15:53:26.210807270 +0200
+--- src/version.c 2019-05-30 17:00:28.426169104 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1425,
+ /**/
+
+--
+Q: What is a patch 22?
+A: A patch you need to include to make it possible to include patches.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1426 b/data/vim/patches/8.1.1426
new file mode 100644
index 000000000..526698e28
--- /dev/null
+++ b/data/vim/patches/8.1.1426
@@ -0,0 +1,184 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1426
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1426
+Problem: No test for syntax highlight in popup window.
+Solution: Add a screenshot test. Update associated documentation. Avoid
+ 'buftype' being reset by setbufvar().
+Files: runtime/doc/eval.txt, src/testdir/test_popupwin.vim,
+ src/testdir/dumps/Test_popupwin_10.dump,
+ src/testdir/dumps/Test_popupwin_11.dump
+
+
+*** ../vim-8.1.1425/runtime/doc/eval.txt 2019-05-29 21:44:30.764788713 +0200
+--- runtime/doc/eval.txt 2019-05-30 17:43:35.578679898 +0200
+***************
+*** 7341,7346 ****
+--- 7342,7349 ----
+ all when TRUE remove all matching text properties,
+ not just the first one
+ A property matches when either "id" or "type" matches.
++ If buffer "bufnr" does not exist you get an error message.
++ If buffer 'bufnr" is not loaded then nothing happens.
+
+ Returns the number of properties that were removed.
+
+***************
+*** 8397,8402 ****
+--- 8400,8407 ----
+ settabvar({tabnr}, {varname}, {val}) *settabvar()*
+ Set tab-local variable {varname} to {val} in tab page {tabnr}.
+ |t:var|
++ Note that autocommands are blocked, side effects may not be
++ triggered, e.g. when setting 'filetype'.
+ Note that the variable name without "t:" must be used.
+ Tabs are numbered starting with one.
+ This function is not available in the |sandbox|.
+***************
+*** 8408,8413 ****
+--- 8413,8420 ----
+ use |setwinvar()|.
+ {winnr} can be the window number or the |window-ID|.
+ When {winnr} is zero the current window is used.
++ Note that autocommands are blocked, side effects may not be
++ triggered, e.g. when setting 'filetype' or 'syntax'.
+ This also works for a global or local buffer option, but it
+ doesn't work for a global or local buffer variable.
+ For a local buffer option the global value is unchanged.
+***************
+*** 10314,10322 ****
+ win_execute({id}, {command} [, {silent}]) *win_execute()*
+ Like `execute()` but in the context of window {id}.
+ The window will temporarily be made the current window,
+! without triggering autocommands.
+! Example: >
+! call win_execute(winid, 'syntax enable')
+
+ win_findbuf({bufnr}) *win_findbuf()*
+ Returns a list with |window-ID|s for windows that contain
+--- 10322,10334 ----
+ win_execute({id}, {command} [, {silent}]) *win_execute()*
+ Like `execute()` but in the context of window {id}.
+ The window will temporarily be made the current window,
+! without triggering autocommands. When executing {command}
+! autocommands will be triggered, this may have unexpected side
+! effects. Use |:noautocmd| if needed.
+! Example: >
+! call win_execute(winid, 'set syntax=python')
+! < Doing the same with `setwinvar()` would not trigger
+! autocommands and not actually show syntax highlighting.
+
+ win_findbuf({bufnr}) *win_findbuf()*
+ Returns a list with |window-ID|s for windows that contain
+*** ../vim-8.1.1425/src/testdir/test_popupwin.vim 2019-05-30 15:22:39.836174965 +0200
+--- src/testdir/test_popupwin.vim 2019-05-30 18:04:53.131951342 +0200
+***************
+*** 56,61 ****
+--- 56,109 ----
+ call delete('XtestPopup')
+ endfunc
+
++ func Test_popup_with_syntax_win_execute()
++ if !CanRunVimInTerminal()
++ return
++ endif
++ call writefile([
++ \ "call setline(1, range(1, 100))",
++ \ "hi PopupColor ctermbg=lightblue",
++ \ "let winid = popup_create([",
++ \ "\\ '#include <stdio.h>',",
++ \ "\\ 'int main(void)',",
++ \ "\\ '{',",
++ \ "\\ ' printf(123);',",
++ \ "\\ '}',",
++ \ "\\], {'line': 3, 'col': 25, 'highlight': 'PopupColor'})",
++ \ "call win_execute(winid, 'set syntax=cpp')",
++ \], 'XtestPopup')
++ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
++ call VerifyScreenDump(buf, 'Test_popupwin_10', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XtestPopup')
++ endfunc
++
++ func Test_popup_with_syntax_setbufvar()
++ if !CanRunVimInTerminal()
++ return
++ endif
++ call writefile([
++ \ "call setline(1, range(1, 100))",
++ \ "hi PopupColor ctermbg=lightgrey",
++ \ "let winid = popup_create([",
++ \ "\\ '#include <stdio.h>',",
++ \ "\\ 'int main(void)',",
++ \ "\\ '{',",
++ \ "\\ ' printf(567);',",
++ \ "\\ '}',",
++ \ "\\], {'line': 3, 'col': 21, 'highlight': 'PopupColor'})",
++ \ "call setbufvar(winbufnr(winid), '&syntax', 'cpp')",
++ \], 'XtestPopup')
++ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
++ call VerifyScreenDump(buf, 'Test_popupwin_11', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XtestPopup')
++ endfunc
++
+ func Test_popup_time()
+ if !has('timers')
+ return
+*** ../vim-8.1.1425/src/testdir/dumps/Test_popupwin_10.dump 2019-05-30 18:39:17.748746347 +0200
+--- src/testdir/dumps/Test_popupwin_10.dump 2019-05-30 17:34:56.409700896 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ >1+0&#ffffff0| @73
++ |2| @73
++ |3| @22|#+0#e000e06#5fd7ff255|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000#ffffff0@32
++ |4| @22|i+0#00e0003#5fd7ff255|n|t| +0#0000000&|m|a|i|n|(|v+0#00e0003&|o|i|d|)+0#0000000&| @3| +0&#ffffff0@32
++ |5| @22|{+0&#5fd7ff255| @16| +0&#ffffff0@32
++ |6| @22| +0&#5fd7ff255@3|p|r|i|n|t|f|(|1+0#e000002&|2|3|)+0#0000000&|;| @1| +0&#ffffff0@32
++ |7| @22|}+0&#5fd7ff255| @16| +0&#ffffff0@32
++ |8| @73
++ |9| @73
++ @57|1|,|1| @10|T|o|p|
+*** ../vim-8.1.1425/src/testdir/dumps/Test_popupwin_11.dump 2019-05-30 18:39:17.748746347 +0200
+--- src/testdir/dumps/Test_popupwin_11.dump 2019-05-30 18:38:16.577080941 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ >1+0&#ffffff0| @73
++ |2| @73
++ |3| @18|#+0#e000e06#e0e0e08|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000#ffffff0@36
++ |4| @18|i+0#00e0003#e0e0e08|n|t| +0#0000000&|m|a|i|n|(|v+0#00e0003&|o|i|d|)+0#0000000&| @3| +0&#ffffff0@36
++ |5| @18|{+0&#e0e0e08| @16| +0&#ffffff0@36
++ |6| @18| +0&#e0e0e08@3|p|r|i|n|t|f|(|5+0#e000002&|6|7|)+0#0000000&|;| @1| +0&#ffffff0@36
++ |7| @18|}+0&#e0e0e08| @16| +0&#ffffff0@36
++ |8| @73
++ |9| @73
++ @57|1|,|1| @10|T|o|p|
+*** ../vim-8.1.1425/src/version.c 2019-05-30 17:29:34.771666630 +0200
+--- src/version.c 2019-05-30 17:38:27.492457079 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1426,
+ /**/
+
+--
+"I can't complain, but sometimes I still do." (Joe Walsh)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1427 b/data/vim/patches/8.1.1427
new file mode 100644
index 000000000..e879eec39
--- /dev/null
+++ b/data/vim/patches/8.1.1427
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1427
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1427 (after 8.1.1426)
+Problem: Popup window screenshot test fails.
+Solution: Add missing change to popup window code.
+Files: src/popupwin.c
+
+
+*** ../vim-8.1.1426/src/popupwin.c 2019-05-30 15:22:39.836174965 +0200
+--- src/popupwin.c 2019-05-30 18:37:05.505469701 +0200
+***************
+*** 265,270 ****
+--- 265,272 ----
+ buf->b_p_swf = FALSE; // no swap file
+ buf->b_p_bl = FALSE; // unlisted buffer
+ buf->b_locked = TRUE;
++ // Avoid that 'buftype' is reset when this buffer is entered.
++ buf->b_p_initialized = TRUE;
+
+ nr = (int)dict_get_number(d, (char_u *)"tab");
+ if (nr == 0)
+*** ../vim-8.1.1426/src/version.c 2019-05-30 18:40:20.120405138 +0200
+--- src/version.c 2019-05-30 19:02:48.357408297 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1427,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+55. You ask your doctor to implant a gig in your brain.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1428 b/data/vim/patches/8.1.1428
new file mode 100644
index 000000000..9de3b1d8b
--- /dev/null
+++ b/data/vim/patches/8.1.1428
@@ -0,0 +1,442 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1428
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1428
+Problem: Popup_atcursor() not implemented yet.
+Solution: Implement it. (Yasuhiro Matsumoto, closes #4456)
+Files: runtime/doc/popup.txt, src/evalfunc.c, src/popupwin.c,
+ src/proto/popupwin.pro, src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1427/runtime/doc/popup.txt 2019-05-30 14:29:42.597507636 +0200
+--- runtime/doc/popup.txt 2019-05-30 19:22:30.828010454 +0200
+***************
+*** 85,95 ****
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+! - when creating the window set options to Vim default? (verify with 'number')
+ - Implement filter.
+ Check that popup_close() works in the filter.
+- - Implement the "pos" option.
+ - Handle screen resize in screenalloc().
+ - Make redrawing more efficient and avoid flicker.
+ Store popup info in a mask, use the mask in screen_line()
+ Fix redrawing problem with completion.
+--- 85,95 ----
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+! - Implement the "pos" option.
+ - Implement filter.
+ Check that popup_close() works in the filter.
+ - Handle screen resize in screenalloc().
++ - show [Popup] instead of [Scratch] in ":ls!"
+ - Make redrawing more efficient and avoid flicker.
+ Store popup info in a mask, use the mask in screen_line()
+ Fix redrawing problem with completion.
+***************
+*** 97,103 ****
+ Fix redrawing the statusline on top of a popup
+ - Figure out the size and position better.
+ if wrapping splits a double-wide character
+! if wrapping has an indent
+ - Can the buffer be re-used, to avoid using up lots of buffer numbers?
+ - Implement all the unimplemented options and features.
+
+--- 97,103 ----
+ Fix redrawing the statusline on top of a popup
+ - Figure out the size and position better.
+ if wrapping splits a double-wide character
+! if wrapping inserts indent
+ - Can the buffer be re-used, to avoid using up lots of buffer numbers?
+ - Implement all the unimplemented options and features.
+
+***************
+*** 160,169 ****
+
+
+ popup_atcursor({text}, {options}) *popup_atcursor()*
+- {not implemented yet}
+ Show the {text} above the cursor, and close it when the cursor
+ moves. This works like: >
+ call popup_create({text}, {
+ \ 'line': 'cursor-1',
+ \ 'col': 'cursor',
+ \ 'moved': 'WORD',
+--- 160,169 ----
+
+
+ popup_atcursor({text}, {options}) *popup_atcursor()*
+ Show the {text} above the cursor, and close it when the cursor
+ moves. This works like: >
+ call popup_create({text}, {
++ \ 'pos': 'botleft',
+ \ 'line': 'cursor-1',
+ \ 'col': 'cursor',
+ \ 'moved': 'WORD',
+***************
+*** 270,279 ****
+ - 'bufhidden' is "hide"
+ - 'buflisted' is off
+ - 'undolevels' is -1: no undo at all
+! TODO: more
+
+! It is possible to change these options, but anything might break then, so
+! better leave them alone.
+
+ The window does have a cursor position, but the cursor is not displayed.
+
+--- 270,280 ----
+ - 'bufhidden' is "hide"
+ - 'buflisted' is off
+ - 'undolevels' is -1: no undo at all
+! - all other buffer-local and window_local options are set to their Vim default
+! value.
+
+! It is possible to change the specifically mentioned options, but anything
+! might break then, so better leave them alone.
+
+ The window does have a cursor position, but the cursor is not displayed.
+
+***************
+*** 306,317 ****
+ "cursor", "cursor+1" or "cursor-1" to use the line of
+ the cursor and add or subtract a number of lines;
+ default is "cursor-1".
+- {only number is implemented}
+ col screen column where to position the popup; can use
+ "cursor" to use the column of the cursor, "cursor+99"
+ and "cursor-99" to add or subtract a number of
+ columns; default is "cursor"
+- {only number is implemented}
+ pos "topleft", "topright", "botleft" or "botright":
+ defines what corner of the popup "line" and "col" are
+ used for. When not set "topleft" is used.
+--- 307,316 ----
+***************
+*** 342,350 ****
+ {not implemented yet}
+ highlight highlight group name to use for the text, stored in
+ the 'wincolor' option
+ border list with numbers, defining the border thickness
+! above/right/below/left of the popup; an empty list
+! uses a border of 1 all around
+ {not implemented yet}
+ borderhighlight highlight group name to use for the border
+ {not implemented yet}
+--- 341,357 ----
+ {not implemented yet}
+ highlight highlight group name to use for the text, stored in
+ the 'wincolor' option
++ padding list with numbers, defining the padding
++ above/right/below/left of the popup (similar to CSS);
++ an empty list uses a padding of 1 all around; the
++ padding goes around the text, inside any border;
++ padding uses the 'wincolor' highlight; Example: [1, 2,
++ 1, 3] has 1 line of padding above, 2 columns on the
++ right, 1 line below and 3 columns on the left
++ {not implemented yet}
+ border list with numbers, defining the border thickness
+! above/right/below/left of the popup (similar to CSS);
+! an empty list uses a border of 1 all around
+ {not implemented yet}
+ borderhighlight highlight group name to use for the border
+ {not implemented yet}
+*** ../vim-8.1.1427/src/evalfunc.c 2019-05-30 17:29:34.767666654 +0200
+--- src/evalfunc.c 2019-05-30 19:05:00.148910615 +0200
+***************
+*** 809,814 ****
+--- 809,815 ----
+ {"perleval", 1, 1, f_perleval},
+ #endif
+ #ifdef FEAT_TEXT_PROP
++ {"popup_atcursor", 2, 2, f_popup_atcursor},
+ {"popup_close", 1, 1, f_popup_close},
+ {"popup_create", 2, 2, f_popup_create},
+ {"popup_getoptions", 1, 1, f_popup_getoptions},
+*** ../vim-8.1.1427/src/popupwin.c 2019-05-30 19:03:19.653294536 +0200
+--- src/popupwin.c 2019-05-30 19:20:36.144585240 +0200
+***************
+*** 16,26 ****
+ #ifdef FEAT_TEXT_PROP
+
+ /*
+ * Go through the options in "dict" and apply them to buffer "buf" displayed in
+ * popup window "wp".
+ */
+ static void
+! apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict)
+ {
+ int nr;
+ char_u *str;
+--- 16,70 ----
+ #ifdef FEAT_TEXT_PROP
+
+ /*
++ * Get option value for"key", which is "line" or "col".
++ * Handles "cursor+N" and "cursor-N".
++ */
++ static int
++ popup_options_pos(dict_T *dict, char_u *key)
++ {
++ dictitem_T *di;
++ char_u *val;
++ char_u *s;
++ char_u *endp;
++ int n = 0;
++
++ di = dict_find(dict, key, -1);
++ if (di == NULL)
++ return 0;
++
++ val = tv_get_string(&di->di_tv);
++ if (STRNCMP(val, "cursor", 6) != 0)
++ return dict_get_number(dict, key);
++
++ setcursor_mayforce(TRUE);
++ s = val + 6;
++ if (*s != NUL)
++ {
++ n = strtol((char *)s, (char **)&endp, 10);
++ if (endp != NULL && *skipwhite(endp) != NUL)
++ {
++ semsg(_(e_invexpr2), val);
++ return 0;
++ }
++ }
++
++ if (STRCMP(key, "line") == 0)
++ n = screen_screenrow() + 1 + n;
++ else // "col"
++ n = screen_screencol() + 1 + n;
++
++ if (n < 1)
++ n = 1;
++ return n;
++ }
++
++ /*
+ * Go through the options in "dict" and apply them to buffer "buf" displayed in
+ * popup window "wp".
++ * When called from f_popup_atcursor() "atcursor" is TRUE.
+ */
+ static void
+! apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict, int atcursor)
+ {
+ int nr;
+ char_u *str;
+***************
+*** 30,37 ****
+ wp->w_maxwidth = dict_get_number(dict, (char_u *)"maxwidth");
+ wp->w_maxheight = dict_get_number(dict, (char_u *)"maxheight");
+
+! wp->w_wantline = dict_get_number(dict, (char_u *)"line");
+! wp->w_wantcol = dict_get_number(dict, (char_u *)"col");
+
+ wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
+
+--- 74,92 ----
+ wp->w_maxwidth = dict_get_number(dict, (char_u *)"maxwidth");
+ wp->w_maxheight = dict_get_number(dict, (char_u *)"maxheight");
+
+! if (atcursor)
+! {
+! setcursor_mayforce(TRUE);
+! wp->w_wantline = screen_screenrow();
+! wp->w_wantcol = screen_screencol() + 1;
+! }
+!
+! nr = popup_options_pos(dict, (char_u *)"line");
+! if (nr > 0)
+! wp->w_wantline = nr;
+! nr = popup_options_pos(dict, (char_u *)"col");
+! if (nr > 0)
+! wp->w_wantcol = nr;
+
+ wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
+
+***************
+*** 215,223 ****
+
+ /*
+ * popup_create({text}, {options})
+ */
+! void
+! f_popup_create(typval_T *argvars, typval_T *rettv)
+ {
+ win_T *wp;
+ buf_T *buf;
+--- 270,280 ----
+
+ /*
+ * popup_create({text}, {options})
++ * popup_atcursor({text}, {options})
++ * When called from f_popup_atcursor() "atcursor" is TRUE.
+ */
+! static void
+! popup_create(typval_T *argvars, typval_T *rettv, int atcursor)
+ {
+ win_T *wp;
+ buf_T *buf;
+***************
+*** 309,315 ****
+ curbuf = curwin->w_buffer;
+
+ // Deal with options.
+! apply_options(wp, buf, argvars[1].vval.v_dict);
+
+ // set default values
+ if (wp->w_zindex == 0)
+--- 366,372 ----
+ curbuf = curwin->w_buffer;
+
+ // Deal with options.
+! apply_options(wp, buf, argvars[1].vval.v_dict, atcursor);
+
+ // set default values
+ if (wp->w_zindex == 0)
+***************
+*** 323,328 ****
+--- 380,403 ----
+ }
+
+ /*
++ * popup_create({text}, {options})
++ */
++ void
++ f_popup_create(typval_T *argvars, typval_T *rettv)
++ {
++ popup_create(argvars, rettv, FALSE);
++ }
++
++ /*
++ * popup_atcursor({text}, {options})
++ */
++ void
++ f_popup_atcursor(typval_T *argvars, typval_T *rettv)
++ {
++ popup_create(argvars, rettv, TRUE);
++ }
++
++ /*
+ * Find the popup window with window-ID "id".
+ * If the popup window does not exist NULL is returned.
+ * If the window is not a popup window, and error message is given.
+*** ../vim-8.1.1427/src/proto/popupwin.pro 2019-05-30 14:29:42.597507636 +0200
+--- src/proto/popupwin.pro 2019-05-30 19:05:00.148910615 +0200
+***************
+*** 1,15 ****
+ /* popupwin.c */
+- void popup_adjust_position(win_T *wp);
+- void f_popup_create(typval_T *argvars, typval_T *rettv);
+ int popup_any_visible(void);
+ void f_popup_close(typval_T *argvars, typval_T *rettv);
+ void f_popup_hide(typval_T *argvars, typval_T *rettv);
+ void f_popup_show(typval_T *argvars, typval_T *rettv);
+ void popup_close(int id);
+ void popup_close_tabpage(tabpage_T *tp, int id);
+- void close_all_popups(void);
+- void ex_popupclear(exarg_T *eap);
+- void f_popup_move(typval_T *argvars, typval_T *rettv);
+- void f_popup_getoptions(typval_T *argvars, typval_T *rettv);
+- void f_popup_getposition(typval_T *argvars, typval_T *rettv);
+ /* vim: set ft=c : */
+--- 1,16 ----
+ /* popupwin.c */
+ int popup_any_visible(void);
++ void close_all_popups(void);
++ void ex_popupclear(exarg_T *eap);
++ void f_popup_atcursor(typval_T *argvars, typval_T *rettv);
+ void f_popup_close(typval_T *argvars, typval_T *rettv);
++ void f_popup_create(typval_T *argvars, typval_T *rettv);
++ void f_popup_getoptions(typval_T *argvars, typval_T *rettv);
++ void f_popup_getposition(typval_T *argvars, typval_T *rettv);
+ void f_popup_hide(typval_T *argvars, typval_T *rettv);
++ void f_popup_move(typval_T *argvars, typval_T *rettv);
+ void f_popup_show(typval_T *argvars, typval_T *rettv);
++ void popup_adjust_position(win_T *wp);
+ void popup_close(int id);
+ void popup_close_tabpage(tabpage_T *tp, int id);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1427/src/testdir/test_popupwin.vim 2019-05-30 18:40:20.120405138 +0200
+--- src/testdir/test_popupwin.vim 2019-05-30 19:21:59.304168903 +0200
+***************
+*** 335,337 ****
+--- 335,386 ----
+ call popup_close(winid)
+ bwipe
+ endfunc
++
++ func Test_popup_atcursor()
++ topleft vnew
++ call setline(1, [
++ \ 'xxxxxxxxxxxxxxxxx',
++ \ 'xxxxxxxxxxxxxxxxx',
++ \ 'xxxxxxxxxxxxxxxxx',
++ \])
++
++ call cursor(2, 2)
++ redraw
++ let winid = popup_atcursor('vim', {})
++ redraw
++ let line = join(map(range(1, 17), 'screenstring(1, v:val)'), '')
++ call assert_equal('xvimxxxxxxxxxxxxx', line)
++ call popup_close(winid)
++
++ call cursor(3, 4)
++ redraw
++ let winid = popup_atcursor('vim', {})
++ redraw
++ let line = join(map(range(1, 17), 'screenstring(2, v:val)'), '')
++ call assert_equal('xxxvimxxxxxxxxxxx', line)
++ call popup_close(winid)
++
++ call cursor(1, 1)
++ redraw
++ let winid = popup_create('vim', {
++ \ 'line': 'cursor+2',
++ \ 'col': 'cursor+1',
++ \})
++ redraw
++ let line = join(map(range(1, 17), 'screenstring(3, v:val)'), '')
++ call assert_equal('xvimxxxxxxxxxxxxx', line)
++ call popup_close(winid)
++
++ call cursor(3, 3)
++ redraw
++ let winid = popup_create('vim', {
++ \ 'line': 'cursor-2',
++ \ 'col': 'cursor-1',
++ \})
++ redraw
++ let line = join(map(range(1, 17), 'screenstring(1, v:val)'), '')
++ call assert_equal('xvimxxxxxxxxxxxxx', line)
++ call popup_close(winid)
++
++ bwipe!
++ endfunc
+*** ../vim-8.1.1427/src/version.c 2019-05-30 19:03:19.653294536 +0200
+--- src/version.c 2019-05-30 19:23:28.679718885 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1428,
+ /**/
+
+--
+"I simultaneously try to keep my head in the clouds and my feet on the
+ground. Sometimes it's a stretch, though." -- Larry Wall
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1429 b/data/vim/patches/8.1.1429
new file mode 100644
index 000000000..74d327851
--- /dev/null
+++ b/data/vim/patches/8.1.1429
@@ -0,0 +1,532 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1429
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1429
+Problem: "pos" option of popup window not supported yet.
+Solution: Implement the option. Rename popup_getposition() to
+ popup_getpos().
+Files: src/structs.h, src/popupwin.c, src/proto/popupwin.pro,
+ runtime/doc/popup.txt
+
+
+*** ../vim-8.1.1428/src/structs.h 2019-05-30 00:11:48.704086357 +0200
+--- src/structs.h 2019-05-30 19:48:48.436658475 +0200
+***************
+*** 1982,1987 ****
+--- 1982,1996 ----
+ // # define CRYPT_NOT_INPLACE 1
+ #endif
+
++ #ifdef FEAT_TEXT_PROP
++ typedef enum {
++ POPPOS_BOTLEFT,
++ POPPOS_TOPLEFT,
++ POPPOS_BOTRIGHT,
++ POPPOS_TOPRIGHT,
++ POPPOS_CENTER
++ } poppos_T;
++ #endif
+
+ /*
+ * These are items normally related to a buffer. But when using ":ownsyntax"
+***************
+*** 2873,2879 ****
+ int w_vsep_width; /* Number of separator columns (0 or 1). */
+ pos_save_T w_save_cursor; /* backup of cursor pos and topline */
+ #ifdef FEAT_TEXT_PROP
+! int w_popup_flags; // PFL_ values
+ int w_zindex;
+ int w_minheight; // "minheight" for popup window
+ int w_minwidth; // "minwidth" for popup window
+--- 2882,2889 ----
+ int w_vsep_width; /* Number of separator columns (0 or 1). */
+ pos_save_T w_save_cursor; /* backup of cursor pos and topline */
+ #ifdef FEAT_TEXT_PROP
+! int w_popup_flags; // POPF_ values
+! poppos_T w_popup_pos;
+ int w_zindex;
+ int w_minheight; // "minheight" for popup window
+ int w_minwidth; // "minwidth" for popup window
+*** ../vim-8.1.1428/src/popupwin.c 2019-05-30 19:24:57.615269014 +0200
+--- src/popupwin.c 2019-05-30 21:18:23.603081264 +0200
+***************
+*** 15,26 ****
+
+ #ifdef FEAT_TEXT_PROP
+
+ /*
+ * Get option value for"key", which is "line" or "col".
+ * Handles "cursor+N" and "cursor-N".
+ */
+ static int
+! popup_options_pos(dict_T *dict, char_u *key)
+ {
+ dictitem_T *di;
+ char_u *val;
+--- 15,39 ----
+
+ #ifdef FEAT_TEXT_PROP
+
++ typedef struct {
++ char *pp_name;
++ poppos_T pp_val;
++ } poppos_entry_T;
++
++ static poppos_entry_T poppos_entries[] = {
++ {"botleft", POPPOS_BOTLEFT},
++ {"topleft", POPPOS_TOPLEFT},
++ {"botright", POPPOS_BOTRIGHT},
++ {"topright", POPPOS_TOPRIGHT},
++ {"center", POPPOS_CENTER}
++ };
++
+ /*
+ * Get option value for"key", which is "line" or "col".
+ * Handles "cursor+N" and "cursor-N".
+ */
+ static int
+! popup_options_one(dict_T *dict, char_u *key)
+ {
+ dictitem_T *di;
+ char_u *val;
+***************
+*** 58,63 ****
+--- 71,106 ----
+ return n;
+ }
+
++ static void
++ get_pos_options(win_T *wp, dict_T *dict)
++ {
++ char_u *str;
++ int nr;
++
++ nr = popup_options_one(dict, (char_u *)"line");
++ if (nr > 0)
++ wp->w_wantline = nr;
++ nr = popup_options_one(dict, (char_u *)"col");
++ if (nr > 0)
++ wp->w_wantcol = nr;
++
++ str = dict_get_string(dict, (char_u *)"pos", FALSE);
++ if (str != NULL)
++ {
++ for (nr = 0;
++ nr < (int)(sizeof(poppos_entries) / sizeof(poppos_entry_T));
++ ++nr)
++ if (STRCMP(str, poppos_entries[nr].pp_name) == 0)
++ {
++ wp->w_popup_pos = poppos_entries[nr].pp_val;
++ nr = -1;
++ break;
++ }
++ if (nr != -1)
++ semsg(_(e_invarg2), str);
++ }
++ }
++
+ /*
+ * Go through the options in "dict" and apply them to buffer "buf" displayed in
+ * popup window "wp".
+***************
+*** 66,72 ****
+--- 109,117 ----
+ static void
+ apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict, int atcursor)
+ {
++ #if defined(FEAT_TIMERS)
+ int nr;
++ #endif
+ char_u *str;
+
+ wp->w_minwidth = dict_get_number(dict, (char_u *)"minwidth");
+***************
+*** 76,92 ****
+
+ if (atcursor)
+ {
+ setcursor_mayforce(TRUE);
+ wp->w_wantline = screen_screenrow();
+ wp->w_wantcol = screen_screencol() + 1;
+ }
+
+! nr = popup_options_pos(dict, (char_u *)"line");
+! if (nr > 0)
+! wp->w_wantline = nr;
+! nr = popup_options_pos(dict, (char_u *)"col");
+! if (nr > 0)
+! wp->w_wantcol = nr;
+
+ wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
+
+--- 121,138 ----
+
+ if (atcursor)
+ {
++ wp->w_popup_pos = POPPOS_BOTLEFT;
+ setcursor_mayforce(TRUE);
+ wp->w_wantline = screen_screenrow();
++ if (wp->w_wantline == 0) // cursor in first line
++ {
++ wp->w_wantline = 2;
++ wp->w_popup_pos = POPPOS_TOPLEFT;
++ }
+ wp->w_wantcol = screen_screencol() + 1;
+ }
+
+! get_pos_options(wp, dict);
+
+ wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
+
+***************
+*** 212,235 ****
+ linenr_T lnum;
+ int wrapped = 0;
+ int maxwidth;
+
+! // TODO: Compute the size and position properly.
+! if (wp->w_wantline > 0)
+! wp->w_winrow = wp->w_wantline - 1;
+ else
+! // TODO: better default
+! wp->w_winrow = Rows > 5 ? Rows / 2 - 2 : 0;
+! if (wp->w_winrow >= Rows)
+! wp->w_winrow = Rows - 1;
+
+! if (wp->w_wantcol > 0)
+! wp->w_wincol = wp->w_wantcol - 1;
+! else
+! // TODO: better default
+! wp->w_wincol = Columns > 20 ? Columns / 2 - 10 : 0;
+! if (wp->w_wincol >= Columns - 3)
+! wp->w_wincol = Columns - 3;
+
+ maxwidth = Columns - wp->w_wincol;
+ if (wp->w_maxwidth > 0 && maxwidth > wp->w_maxwidth)
+ maxwidth = wp->w_maxwidth;
+--- 258,299 ----
+ linenr_T lnum;
+ int wrapped = 0;
+ int maxwidth;
++ int center_vert = FALSE;
++ int center_hor = FALSE;
+
+! wp->w_winrow = 0;
+! wp->w_wincol = 0;
+! if (wp->w_popup_pos == POPPOS_CENTER)
+! {
+! // center after computing the size
+! center_vert = TRUE;
+! center_hor = TRUE;
+! }
+ else
+! {
+! if (wp->w_wantline == 0)
+! center_vert = TRUE;
+! else if (wp->w_popup_pos == POPPOS_TOPLEFT
+! || wp->w_popup_pos == POPPOS_TOPRIGHT)
+! {
+! wp->w_winrow = wp->w_wantline - 1;
+! if (wp->w_winrow >= Rows)
+! wp->w_winrow = Rows - 1;
+! }
+
+! if (wp->w_wantcol == 0)
+! center_hor = TRUE;
+! else if (wp->w_popup_pos == POPPOS_TOPLEFT
+! || wp->w_popup_pos == POPPOS_BOTLEFT)
+! {
+! wp->w_wincol = wp->w_wantcol - 1;
+! if (wp->w_wincol >= Columns - 3)
+! wp->w_wincol = Columns - 3;
+! }
+! }
+
++ // When centering or right aligned, use maximum width.
++ // When left aligned use the space available.
+ maxwidth = Columns - wp->w_wincol;
+ if (wp->w_maxwidth > 0 && maxwidth > wp->w_maxwidth)
+ maxwidth = wp->w_maxwidth;
+***************
+*** 255,260 ****
+--- 319,334 ----
+ wp->w_width = wp->w_minwidth;
+ if (wp->w_width > maxwidth)
+ wp->w_width = maxwidth;
++ if (center_hor)
++ wp->w_wincol = (Columns - wp->w_width) / 2;
++ else if (wp->w_popup_pos == POPPOS_BOTRIGHT
++ || wp->w_popup_pos == POPPOS_TOPRIGHT)
++ {
++ // Right aligned: move to the right if needed.
++ // No truncation, because that would change the height.
++ if (wp->w_width < wp->w_wantcol)
++ wp->w_wincol = wp->w_wantcol - wp->w_width;
++ }
+
+ if (wp->w_height <= 1)
+ wp->w_height = wp->w_buffer->b_ml.ml_line_count + wrapped;
+***************
+*** 265,270 ****
+--- 339,357 ----
+ if (wp->w_height > Rows - wp->w_winrow)
+ wp->w_height = Rows - wp->w_winrow;
+
++ if (center_vert)
++ wp->w_winrow = (Rows - wp->w_height) / 2;
++ else if (wp->w_popup_pos == POPPOS_BOTRIGHT
++ || wp->w_popup_pos == POPPOS_BOTLEFT)
++ {
++ if (wp->w_height <= wp->w_wantline)
++ // bottom aligned: may move down
++ wp->w_winrow = wp->w_wantline - wp->w_height;
++ else
++ // not enough space, make top aligned
++ wp->w_winrow = wp->w_wantline + 1;
++ }
++
+ wp->w_popup_last_changedtick = CHANGEDTICK(wp->w_buffer);
+ }
+
+***************
+*** 304,310 ****
+ if (wp == NULL)
+ return;
+ rettv->vval.v_number = wp->w_id;
+! wp->w_p_wrap = TRUE; // 'wrap' is default on
+
+ buf = buflist_new(NULL, NULL, (linenr_T)0, BLN_NEW|BLN_LISTED|BLN_DUMMY);
+ if (buf == NULL)
+--- 391,397 ----
+ if (wp == NULL)
+ return;
+ rettv->vval.v_number = wp->w_id;
+! wp->w_popup_pos = POPPOS_TOPLEFT;
+
+ buf = buflist_new(NULL, NULL, (linenr_T)0, BLN_NEW|BLN_LISTED|BLN_DUMMY);
+ if (buf == NULL)
+***************
+*** 322,327 ****
+--- 409,416 ----
+ buf->b_p_swf = FALSE; // no swap file
+ buf->b_p_bl = FALSE; // unlisted buffer
+ buf->b_locked = TRUE;
++ wp->w_p_wrap = TRUE; // 'wrap' is default on
++
+ // Avoid that 'buftype' is reset when this buffer is entered.
+ buf->b_p_initialized = TRUE;
+
+***************
+*** 578,588 ****
+ wp->w_maxwidth = nr;
+ if ((nr = dict_get_number(d, (char_u *)"maxheight")) > 0)
+ wp->w_maxheight = nr;
+! if ((nr = dict_get_number(d, (char_u *)"line")) > 0)
+! wp->w_wantline = nr;
+! if ((nr = dict_get_number(d, (char_u *)"col")) > 0)
+! wp->w_wantcol = nr;
+! // TODO: "pos"
+
+ if (wp->w_winrow + wp->w_height >= cmdline_row)
+ clear_cmdline = TRUE;
+--- 667,673 ----
+ wp->w_maxwidth = nr;
+ if ((nr = dict_get_number(d, (char_u *)"maxheight")) > 0)
+ wp->w_maxheight = nr;
+! get_pos_options(wp, d);
+
+ if (wp->w_winrow + wp->w_height >= cmdline_row)
+ clear_cmdline = TRUE;
+***************
+*** 591,600 ****
+ }
+
+ /*
+! * popup_getposition({id})
+ */
+ void
+! f_popup_getposition(typval_T *argvars, typval_T *rettv)
+ {
+ dict_T *dict;
+ int id = (int)tv_get_number(argvars);
+--- 676,685 ----
+ }
+
+ /*
+! * popup_getpos({id})
+ */
+ void
+! f_popup_getpos(typval_T *argvars, typval_T *rettv)
+ {
+ dict_T *dict;
+ int id = (int)tv_get_number(argvars);
+***************
+*** 623,628 ****
+--- 708,714 ----
+ dict_T *dict;
+ int id = (int)tv_get_number(argvars);
+ win_T *wp = find_popup_win(id);
++ int i;
+
+ if (rettv_dict_alloc(rettv) == OK)
+ {
+***************
+*** 637,642 ****
+--- 723,738 ----
+ dict_add_number(dict, "maxheight", wp->w_maxheight);
+ dict_add_number(dict, "maxwidth", wp->w_maxwidth);
+ dict_add_number(dict, "zindex", wp->w_zindex);
++
++ for (i = 0; i < (int)(sizeof(poppos_entries) / sizeof(poppos_entry_T));
++ ++i)
++ if (wp->w_popup_pos == poppos_entries[i].pp_val)
++ {
++ dict_add_string(dict, "pos",
++ (char_u *)poppos_entries[i].pp_name);
++ break;
++ }
++
+ # if defined(FEAT_TIMERS)
+ dict_add_number(dict, "time", wp->w_popup_timer != NULL
+ ? (long)wp->w_popup_timer->tr_interval : 0L);
+*** ../vim-8.1.1428/src/proto/popupwin.pro 2019-05-30 19:24:57.615269014 +0200
+--- src/proto/popupwin.pro 2019-05-30 21:19:20.050800869 +0200
+***************
+*** 1,16 ****
+ /* popupwin.c */
+! int popup_any_visible(void);
+! void close_all_popups(void);
+! void ex_popupclear(exarg_T *eap);
+ void f_popup_atcursor(typval_T *argvars, typval_T *rettv);
+ void f_popup_close(typval_T *argvars, typval_T *rettv);
+- void f_popup_create(typval_T *argvars, typval_T *rettv);
+- void f_popup_getoptions(typval_T *argvars, typval_T *rettv);
+- void f_popup_getposition(typval_T *argvars, typval_T *rettv);
+ void f_popup_hide(typval_T *argvars, typval_T *rettv);
+- void f_popup_move(typval_T *argvars, typval_T *rettv);
+ void f_popup_show(typval_T *argvars, typval_T *rettv);
+- void popup_adjust_position(win_T *wp);
+ void popup_close(int id);
+ void popup_close_tabpage(tabpage_T *tp, int id);
+ /* vim: set ft=c : */
+--- 1,16 ----
+ /* popupwin.c */
+! void popup_adjust_position(win_T *wp);
+! void f_popup_create(typval_T *argvars, typval_T *rettv);
+ void f_popup_atcursor(typval_T *argvars, typval_T *rettv);
++ int popup_any_visible(void);
+ void f_popup_close(typval_T *argvars, typval_T *rettv);
+ void f_popup_hide(typval_T *argvars, typval_T *rettv);
+ void f_popup_show(typval_T *argvars, typval_T *rettv);
+ void popup_close(int id);
+ void popup_close_tabpage(tabpage_T *tp, int id);
++ void close_all_popups(void);
++ void ex_popupclear(exarg_T *eap);
++ void f_popup_move(typval_T *argvars, typval_T *rettv);
++ void f_popup_getpos(typval_T *argvars, typval_T *rettv);
++ void f_popup_getoptions(typval_T *argvars, typval_T *rettv);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1428/runtime/doc/popup.txt 2019-05-30 19:24:57.615269014 +0200
+--- runtime/doc/popup.txt 2019-05-30 21:17:46.191262945 +0200
+***************
+*** 232,238 ****
+
+ popup_getoptions({id}) *popup_getoptions()*
+ Return the {options} for popup {id} in a Dict.
+! A zero value means the option was not set.
+
+ The "highlight" entry is omitted, use the 'wincolor' option
+ for that: >
+--- 232,239 ----
+
+ popup_getoptions({id}) *popup_getoptions()*
+ Return the {options} for popup {id} in a Dict.
+! A zero value means the option was not set. For "zindex" the
+! default value is returned, not zero.
+
+ The "highlight" entry is omitted, use the 'wincolor' option
+ for that: >
+***************
+*** 240,246 ****
+
+ < If popup window {id} is not found an empty Dict is returned.
+
+! popup_getposition({id}) *popup_getposition()*
+ Return the position and size of popup {id}. Returns a Dict
+ with these entries:
+ col screen column of the popup, one-based
+--- 241,247 ----
+
+ < If popup window {id} is not found an empty Dict is returned.
+
+! popup_getpos({id}) *popup_getpos()*
+ Return the position and size of popup {id}. Returns a Dict
+ with these entries:
+ col screen column of the popup, one-based
+***************
+*** 303,321 ****
+ |popup-props|.
+
+ The second argument of |popup_create()| is a dictionary with options:
+! line screen line where to position the popup; can use
+! "cursor", "cursor+1" or "cursor-1" to use the line of
+! the cursor and add or subtract a number of lines;
+! default is "cursor-1".
+! col screen column where to position the popup; can use
+! "cursor" to use the column of the cursor, "cursor+99"
+! and "cursor-99" to add or subtract a number of
+! columns; default is "cursor"
+ pos "topleft", "topright", "botleft" or "botright":
+ defines what corner of the popup "line" and "col" are
+ used for. When not set "topleft" is used.
+ Alternatively "center" can be used to position the
+! popup in the center of the Vim window.
+ {not implemented yet}
+ flip when TRUE (the default) and the position is relative
+ to the cursor, flip to below or above the cursor to
+--- 304,325 ----
+ |popup-props|.
+
+ The second argument of |popup_create()| is a dictionary with options:
+! line screen line where to position the popup; can use a
+! number or "cursor", "cursor+1" or "cursor-1" to use
+! the line of the cursor and add or subtract a number of
+! lines; if omitted the popup is vertically centered,
+! otherwise "pos" is used.
+! col screen column where to position the popup; can use a
+! number or "cursor" to use the column of the cursor,
+! "cursor+99" and "cursor-99" to add or subtract a
+! number of columns; if omitted the popup is
+! horizontally centered, otherwise "pos" is used
+ pos "topleft", "topright", "botleft" or "botright":
+ defines what corner of the popup "line" and "col" are
+ used for. When not set "topleft" is used.
+ Alternatively "center" can be used to position the
+! popup in the center of the Vim window, in which case
+! "line" and "col" are ignored.
+ {not implemented yet}
+ flip when TRUE (the default) and the position is relative
+ to the cursor, flip to below or above the cursor to
+*** ../vim-8.1.1428/src/version.c 2019-05-30 19:24:57.615269014 +0200
+--- src/version.c 2019-05-30 21:22:31.477803848 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1429,
+ /**/
+
+--
+ERROR 047: Keyboard not found. Press RETURN to continue.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1430 b/data/vim/patches/8.1.1430
new file mode 100644
index 000000000..f56aa740a
--- /dev/null
+++ b/data/vim/patches/8.1.1430
@@ -0,0 +1,343 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1430
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1430
+Problem: Popup window option "wrap" not supported.
+Solution: Implement it.
+Files: src/popupwin.c, src/testdir/test_popupwin.vim,
+ src/testdir/dumps/Test_popupwin_wrap.dump,
+ src/testdir/dumps/Test_popupwin_nowrap.dump
+
+
+*** ../vim-8.1.1429/src/popupwin.c 2019-05-30 21:24:22.177201251 +0200
+--- src/popupwin.c 2019-05-30 22:05:24.376650848 +0200
+***************
+*** 109,118 ****
+ static void
+ apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict, int atcursor)
+ {
+! #if defined(FEAT_TIMERS)
+! int nr;
+! #endif
+! char_u *str;
+
+ wp->w_minwidth = dict_get_number(dict, (char_u *)"minwidth");
+ wp->w_minheight = dict_get_number(dict, (char_u *)"minheight");
+--- 109,117 ----
+ static void
+ apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict, int atcursor)
+ {
+! int nr;
+! char_u *str;
+! dictitem_T *di;
+
+ wp->w_minwidth = dict_get_number(dict, (char_u *)"minwidth");
+ wp->w_minheight = dict_get_number(dict, (char_u *)"minheight");
+***************
+*** 158,167 ****
+--- 157,173 ----
+ }
+ #endif
+
++ // Option values resulting in setting an option.
+ str = dict_get_string(dict, (char_u *)"highlight", TRUE);
+ if (str != NULL)
+ set_string_option_direct_in_win(wp, (char_u *)"wincolor", -1,
+ str, OPT_FREE|OPT_LOCAL, 0);
++ di = dict_find(dict, (char_u *)"wrap", -1);
++ if (di != NULL)
++ {
++ nr = dict_get_number(dict, (char_u *)"wrap");
++ wp->w_p_wrap = nr != 0;
++ }
+ }
+
+ /*
+*** ../vim-8.1.1429/src/testdir/test_popupwin.vim 2019-05-30 19:24:57.615269014 +0200
+--- src/testdir/test_popupwin.vim 2019-05-30 22:06:07.392440360 +0200
+***************
+*** 84,101 ****
+ if !CanRunVimInTerminal()
+ return
+ endif
+! call writefile([
+! \ "call setline(1, range(1, 100))",
+! \ "hi PopupColor ctermbg=lightgrey",
+! \ "let winid = popup_create([",
+! \ "\\ '#include <stdio.h>',",
+! \ "\\ 'int main(void)',",
+! \ "\\ '{',",
+! \ "\\ ' printf(567);',",
+! \ "\\ '}',",
+! \ "\\], {'line': 3, 'col': 21, 'highlight': 'PopupColor'})",
+! \ "call setbufvar(winbufnr(winid), '&syntax', 'cpp')",
+! \], 'XtestPopup')
+ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
+ call VerifyScreenDump(buf, 'Test_popupwin_11', {})
+
+--- 84,102 ----
+ if !CanRunVimInTerminal()
+ return
+ endif
+! let lines =<< trim END
+! call setline(1, range(1, 100))
+! hi PopupColor ctermbg=lightgrey
+! let winid = popup_create([
+! \ '#include <stdio.h>',
+! \ 'int main(void)',
+! \ '{',
+! \ ' printf(567);',
+! \ '}',
+! \], {'line': 3, 'col': 21, 'highlight': 'PopupColor'})
+! call setbufvar(winbufnr(winid), '&syntax', 'cpp')
+! END
+! call writefile(lines, 'XtestPopup')
+ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
+ call VerifyScreenDump(buf, 'Test_popupwin_11', {})
+
+***************
+*** 104,109 ****
+--- 105,148 ----
+ call delete('XtestPopup')
+ endfunc
+
++ func Test_popup_with_wrap()
++ if !CanRunVimInTerminal()
++ return
++ endif
++ let lines =<< trim END
++ call setline(1, range(1, 100))
++ let winid = popup_create(
++ \ 'a long line that wont fit',
++ \ {'line': 3, 'col': 20, 'maxwidth': 10, 'wrap': 1})
++ END
++ call writefile(lines, 'XtestPopup')
++ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
++ call VerifyScreenDump(buf, 'Test_popupwin_wrap', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XtestPopup')
++ endfunc
++
++ func Test_popup_without_wrap()
++ if !CanRunVimInTerminal()
++ return
++ endif
++ let lines =<< trim END
++ call setline(1, range(1, 100))
++ let winid = popup_create(
++ \ 'a long line that wont fit',
++ \ {'line': 3, 'col': 20, 'maxwidth': 10, 'wrap': 0})
++ END
++ call writefile(lines, 'XtestPopup')
++ let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
++ call VerifyScreenDump(buf, 'Test_popupwin_nowrap', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XtestPopup')
++ endfunc
++
+ func Test_popup_time()
+ if !has('timers')
+ return
+***************
+*** 156,174 ****
+ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('world', line)
+! call assert_equal(1, popup_getposition(winid).visible)
+
+ call popup_hide(winid)
+ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('hello', line)
+! call assert_equal(0, popup_getposition(winid).visible)
+
+ call popup_show(winid)
+ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('world', line)
+! call assert_equal(1, popup_getposition(winid).visible)
+
+
+ call popup_close(winid)
+--- 195,213 ----
+ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('world', line)
+! call assert_equal(1, popup_getpos(winid).visible)
+
+ call popup_hide(winid)
+ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('hello', line)
+! call assert_equal(0, popup_getpos(winid).visible)
+
+ call popup_show(winid)
+ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('world', line)
+! call assert_equal(1, popup_getpos(winid).visible)
+
+
+ call popup_close(winid)
+***************
+*** 216,222 ****
+ bwipe!
+ endfunc
+
+! func Test_popup_getposition()
+ let winid = popup_create('hello', {
+ \ 'line': 2,
+ \ 'col': 3,
+--- 255,261 ----
+ bwipe!
+ endfunc
+
+! func Test_popup_getpos()
+ let winid = popup_create('hello', {
+ \ 'line': 2,
+ \ 'col': 3,
+***************
+*** 224,230 ****
+ \ 'minheight': 11,
+ \})
+ redraw
+! let res = popup_getposition(winid)
+ call assert_equal(2, res.line)
+ call assert_equal(3, res.col)
+ call assert_equal(10, res.width)
+--- 263,269 ----
+ \ 'minheight': 11,
+ \})
+ redraw
+! let res = popup_getpos(winid)
+ call assert_equal(2, res.line)
+ call assert_equal(3, res.col)
+ call assert_equal(10, res.width)
+***************
+*** 246,252 ****
+ for test in tests
+ let winid = popup_create(test[0], {'line': 2, 'col': 3})
+ redraw
+! let position = popup_getposition(winid)
+ call assert_equal(test[1], position.width)
+ call popup_close(winid)
+ endfor
+--- 285,291 ----
+ for test in tests
+ let winid = popup_create(test[0], {'line': 2, 'col': 3})
+ redraw
+! let position = popup_getpos(winid)
+ call assert_equal(test[1], position.width)
+ call popup_close(winid)
+ endfor
+***************
+*** 262,273 ****
+ let winid = popup_create(test[0],
+ \ {'line': 2, 'col': 3, 'maxwidth': 12})
+ redraw
+! let position = popup_getposition(winid)
+ call assert_equal(test[1], position.width)
+ call assert_equal(test[2], position.height)
+
+ call popup_close(winid)
+! call assert_equal({}, popup_getposition(winid))
+ endfor
+ endfunc
+
+--- 301,312 ----
+ let winid = popup_create(test[0],
+ \ {'line': 2, 'col': 3, 'maxwidth': 12})
+ redraw
+! let position = popup_getpos(winid)
+ call assert_equal(test[1], position.width)
+ call assert_equal(test[2], position.height)
+
+ call popup_close(winid)
+! call assert_equal({}, popup_getpos(winid))
+ endfor
+ endfunc
+
+***************
+*** 382,386 ****
+--- 421,443 ----
+ call assert_equal('xvimxxxxxxxxxxxxx', line)
+ call popup_close(winid)
+
++ " just enough room above
++ call cursor(3, 3)
++ redraw
++ let winid = popup_atcursor(['vim', 'is great'], {})
++ redraw
++ let pos = popup_getpos(winid)
++ call assert_equal(1, pos.line)
++ call popup_close(winid)
++
++ " not enough room above, popup goes below the cursor
++ call cursor(3, 3)
++ redraw
++ let winid = popup_atcursor(['vim', 'is', 'great'], {})
++ redraw
++ let pos = popup_getpos(winid)
++ call assert_equal(4, pos.line)
++ call popup_close(winid)
++
+ bwipe!
+ endfunc
+*** ../vim-8.1.1429/src/testdir/dumps/Test_popupwin_wrap.dump 2019-05-30 22:04:48.980822048 +0200
+--- src/testdir/dumps/Test_popupwin_wrap.dump 2019-05-30 22:00:52.589908871 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ >1+0&#ffffff0| @73
++ |2| @73
++ |3| @17|a+0#0000001#ffd7ff255| |l|o|n|g| |l|i|n| +0#0000000#ffffff0@45
++ |4| @17|e+0#0000001#ffd7ff255| |t|h|a|t| |w|o|n| +0#0000000#ffffff0@45
++ |5| @17|t+0#0000001#ffd7ff255| |f|i|t| @4| +0#0000000#ffffff0@45
++ |6| @73
++ |7| @73
++ |8| @73
++ |9| @73
++ @57|1|,|1| @10|T|o|p|
+*** ../vim-8.1.1429/src/testdir/dumps/Test_popupwin_nowrap.dump 2019-05-30 22:04:48.984822029 +0200
+--- src/testdir/dumps/Test_popupwin_nowrap.dump 2019-05-30 22:02:32.921460959 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ >1+0&#ffffff0| @73
++ |2| @73
++ |3| @17|a+0#0000001#ffd7ff255| |l|o|n|g| |l|i|n| +0#0000000#ffffff0@45
++ |4| @73
++ |5| @73
++ |6| @73
++ |7| @73
++ |8| @73
++ |9| @73
++ @57|1|,|1| @10|T|o|p|
+*** ../vim-8.1.1429/src/version.c 2019-05-30 21:24:22.177201251 +0200
+--- src/version.c 2019-05-30 22:03:42.601137773 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1430,
+ /**/
+
+--
+Over the years, I've developed my sense of deja vu so acutely that now
+I can remember things that *have* happened before ...
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1431 b/data/vim/patches/8.1.1431
new file mode 100644
index 000000000..11263aee7
--- /dev/null
+++ b/data/vim/patches/8.1.1431
@@ -0,0 +1,178 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1431
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1431
+Problem: Popup window listed as "Scratch".
+Solution: List them as "Popup".
+Files: src/buffer.c, src/popupwin.c, src/testdir/test_popupwin.vim,
+ runtime/doc/popup.txt, runtime/doc/windows.txt
+
+*** ../vim-8.1.1430/src/buffer.c 2019-05-28 23:08:12.052648779 +0200
+--- src/buffer.c 2019-05-30 22:27:37.621612222 +0200
+***************
+*** 5782,5787 ****
+--- 5782,5791 ----
+ if (bt_prompt(buf))
+ return (char_u *)_("[Prompt]");
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ if (bt_popup(buf))
++ return (char_u *)_("[Popup]");
++ #endif
+ return (char_u *)_("[Scratch]");
+ }
+
+*** ../vim-8.1.1430/src/popupwin.c 2019-05-30 22:07:13.548111883 +0200
+--- src/popupwin.c 2019-05-30 22:28:16.449411122 +0200
+***************
+*** 550,555 ****
+--- 550,556 ----
+ if (wp != NULL && (wp->w_popup_flags & POPF_HIDDEN) == 0)
+ {
+ wp->w_popup_flags |= POPF_HIDDEN;
++ --wp->w_buffer->b_nwindows;
+ redraw_all_later(NOT_VALID);
+ }
+ }
+***************
+*** 566,571 ****
+--- 567,573 ----
+ if (wp != NULL && (wp->w_popup_flags & POPF_HIDDEN) != 0)
+ {
+ wp->w_popup_flags &= ~POPF_HIDDEN;
++ ++wp->w_buffer->b_nwindows;
+ redraw_all_later(NOT_VALID);
+ }
+ }
+*** ../vim-8.1.1430/src/testdir/test_popupwin.vim 2019-05-30 22:07:13.548111883 +0200
+--- src/testdir/test_popupwin.vim 2019-05-30 22:28:52.253224789 +0200
+***************
+*** 196,207 ****
+--- 196,211 ----
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('world', line)
+ call assert_equal(1, popup_getpos(winid).visible)
++ " buffer is still listed and active
++ call assert_match(winbufnr(winid) .. 'u a.*\[Popup\]', execute('ls u'))
+
+ call popup_hide(winid)
+ redraw
+ let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
+ call assert_equal('hello', line)
+ call assert_equal(0, popup_getpos(winid).visible)
++ " buffer is still listed but hidden
++ call assert_match(winbufnr(winid) .. 'u h.*\[Popup\]', execute('ls u'))
+
+ call popup_show(winid)
+ redraw
+*** ../vim-8.1.1430/runtime/doc/popup.txt 2019-05-30 21:24:22.177201251 +0200
+--- runtime/doc/popup.txt 2019-05-30 22:12:58.106332448 +0200
+***************
+*** 85,95 ****
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+- - Implement the "pos" option.
+ - Implement filter.
+ Check that popup_close() works in the filter.
+ - Handle screen resize in screenalloc().
+- - show [Popup] instead of [Scratch] in ":ls!"
+ - Make redrawing more efficient and avoid flicker.
+ Store popup info in a mask, use the mask in screen_line()
+ Fix redrawing problem with completion.
+--- 85,95 ----
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+ - Implement filter.
+ Check that popup_close() works in the filter.
++ - Implement padding
++ - Implement border
+ - Handle screen resize in screenalloc().
+ - Make redrawing more efficient and avoid flicker.
+ Store popup info in a mask, use the mask in screen_line()
+ Fix redrawing problem with completion.
+***************
+*** 287,292 ****
+--- 287,294 ----
+ call setwinvar(winid, '&wrap', 0)
+ And options can be set on the buffer with `setbufvar()`, e.g.: >
+ call setbufvar(winbufnr(winid), '&filetype', 'java')
++ Note that this does not trigger autocommands. Use `win_execute()` if you do
++ need them.
+
+
+ POPUP_CREATE() ARGUMENTS *popup_create-usage*
+***************
+*** 320,326 ****
+ Alternatively "center" can be used to position the
+ popup in the center of the Vim window, in which case
+ "line" and "col" are ignored.
+- {not implemented yet}
+ flip when TRUE (the default) and the position is relative
+ to the cursor, flip to below or above the cursor to
+ avoid overlap with the |popupmenu-completion| or
+--- 322,327 ----
+***************
+*** 342,348 ****
+ popup, on top of any border
+ {not implemented yet}
+ wrap TRUE to make the lines wrap (default TRUE)
+- {not implemented yet}
+ highlight highlight group name to use for the text, stored in
+ the 'wincolor' option
+ padding list with numbers, defining the padding
+--- 343,348 ----
+*** ../vim-8.1.1430/runtime/doc/windows.txt 2019-05-05 18:11:46.332590572 +0200
+--- runtime/doc/windows.txt 2019-05-30 22:17:52.648751769 +0200
+***************
+*** 1030,1035 ****
+--- 1030,1042 ----
+ thus you can always go to a specific buffer with ":buffer N"
+ or "N CTRL-^", where N is the buffer number.
+
++ For the file name these special values are used:
++ [Prompt] |prompt-buffer|
++ [Popup] buffer of a |popup-window|
++ [Scratch] 'buftype' is "nofile"
++ [No Name] no file name specified
++ For a |terminal-window| buffer the status is used.
++
+ Indicators (chars in the same column are mutually exclusive):
+ u an unlisted buffer (only displayed when [!] is used)
+ |unlisted-buffer|
+***************
+*** 1192,1198 ****
+ the way when you're browsing code/text buffers. The next three
+ commands also work like this.
+
+-
+ *:sbn* *:sbnext*
+ :[N]sbn[ext] [+cmd] [N]
+ Split window and go to [N]th next buffer in buffer list.
+--- 1199,1204 ----
+*** ../vim-8.1.1430/src/version.c 2019-05-30 22:07:13.548111883 +0200
+--- src/version.c 2019-05-30 22:29:58.956875641 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1431,
+ /**/
+
+--
+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.1432 b/data/vim/patches/8.1.1432
new file mode 100644
index 000000000..f5102d103
--- /dev/null
+++ b/data/vim/patches/8.1.1432
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1432
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1432 (after 8.1.1429)
+Problem: Can't build with eval feature.
+Solution: Add missing rename.
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.1431/src/evalfunc.c 2019-05-30 19:24:57.615269014 +0200
+--- src/evalfunc.c 2019-05-30 21:18:00.775192562 +0200
+***************
+*** 813,819 ****
+ {"popup_close", 1, 1, f_popup_close},
+ {"popup_create", 2, 2, f_popup_create},
+ {"popup_getoptions", 1, 1, f_popup_getoptions},
+! {"popup_getposition", 1, 1, f_popup_getposition},
+ {"popup_hide", 1, 1, f_popup_hide},
+ {"popup_move", 2, 2, f_popup_move},
+ {"popup_show", 1, 1, f_popup_show},
+--- 813,819 ----
+ {"popup_close", 1, 1, f_popup_close},
+ {"popup_create", 2, 2, f_popup_create},
+ {"popup_getoptions", 1, 1, f_popup_getoptions},
+! {"popup_getpos", 1, 1, f_popup_getpos},
+ {"popup_hide", 1, 1, f_popup_hide},
+ {"popup_move", 2, 2, f_popup_move},
+ {"popup_show", 1, 1, f_popup_show},
+*** ../vim-8.1.1431/src/version.c 2019-05-30 22:32:10.804178558 +0200
+--- src/version.c 2019-05-30 22:34:45.971348842 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1432,
+ /**/
+
+--
+Creating the world with Emacs: M-x let-there-be-light
+Creating the world with Vim: :make world
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1433 b/data/vim/patches/8.1.1433
new file mode 100644
index 000000000..0d86ef1d4
--- /dev/null
+++ b/data/vim/patches/8.1.1433
@@ -0,0 +1,69 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1433
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1433
+Problem: Win_execute() may leave popup window focused, eventually leading
+ to a crash. (Bjorn Linse)
+Solution: When previous window was closed, go to the first window.
+Files: src/window.c, src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1432/src/window.c 2019-05-30 17:29:34.767666654 +0200
+--- src/window.c 2019-05-31 17:34:12.407650227 +0200
+***************
+*** 6573,6578 ****
+--- 6573,6584 ----
+ curwin = save_curwin;
+ curbuf = curwin->w_buffer;
+ }
++ #ifdef FEAT_TEXT_PROP
++ else if (bt_popup(curwin->w_buffer))
++ // original window was closed and now we're in a popup window: Go
++ // to the first valid window.
++ win_goto(firstwin);
++ #endif
+ }
+
+ /*
+*** ../vim-8.1.1432/src/testdir/test_popupwin.vim 2019-05-30 22:32:10.804178558 +0200
+--- src/testdir/test_popupwin.vim 2019-05-31 17:33:42.747822549 +0200
+***************
+*** 105,110 ****
+--- 105,118 ----
+ call delete('XtestPopup')
+ endfunc
+
++ func Test_win_execute_closing_curwin()
++ split
++ let winid = popup_create('some text', {})
++ call win_execute(winid, winnr() .. "close")
++ call assert_equal(1, winnr())
++ popupclear
++ endfunc
++
+ func Test_popup_with_wrap()
+ if !CanRunVimInTerminal()
+ return
+*** ../vim-8.1.1432/src/version.c 2019-05-30 22:35:15.151191862 +0200
+--- src/version.c 2019-05-31 17:23:30.627380604 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1433,
+ /**/
+
+--
+Time is money. Especially if you make clocks.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1434 b/data/vim/patches/8.1.1434
new file mode 100644
index 000000000..12f9f9c92
--- /dev/null
+++ b/data/vim/patches/8.1.1434
@@ -0,0 +1,9687 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1434
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1434
+Problem: Test 3 is old style.
+Solution: Turn into a new style test. (Yegappan Lakshmanan, closes #4460)
+Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
+ src/testdir/test3.in, src/testdir/test3.ok,
+ src/testdir/test_cindent.vim
+
+
+*** ../vim-8.1.1433/src/Makefile 2019-05-27 22:21:41.309951907 +0200
+--- src/Makefile 2019-05-31 19:57:21.037036126 +0200
+***************
+*** 2181,2187 ****
+ # These do not depend on the executable, compile it when needed.
+ test1 \
+ test_eval \
+- test3 \
+ test39 \
+ test42 test44 test48 test49 \
+ test52 test59 \
+--- 2182,2187 ----
+*** ../vim-8.1.1433/src/testdir/Make_all.mak 2019-05-27 22:21:41.309951907 +0200
+--- src/testdir/Make_all.mak 2019-05-31 19:57:21.037036126 +0200
+***************
+*** 13,19 ****
+
+ # Tests that run on all systems.
+ SCRIPTS_ALL = \
+- test3.out \
+ test39.out \
+ test42.out \
+ test44.out \
+--- 13,18 ----
+*** ../vim-8.1.1433/src/testdir/Make_vms.mms 2019-05-27 22:21:41.309951907 +0200
+--- src/testdir/Make_vms.mms 2019-05-31 20:01:11.583773931 +0200
+***************
+*** 73,79 ****
+
+ .SUFFIXES : .out .in
+
+! SCRIPT = test1.out test3.out \
+ test39.out \
+ test42.out test44.out test48.out test49.out \
+ test64.out test69.out \
+--- 73,79 ----
+
+ .SUFFIXES : .out .in
+
+! SCRIPT = test1.out \
+ test39.out \
+ test42.out test44.out test48.out test49.out \
+ test64.out test69.out \
+*** ../vim-8.1.1433/src/testdir/test3.in 2017-11-12 15:15:37.000000000 +0100
+--- src/testdir/test3.in 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,2354 ****
+- /* vim: set cin ts=4 sw=4 : */
+-
+- Test for 'cindent'.
+- For new tests, consider putting them in test_cindent.vim.
+-
+- STARTTEST
+- :so small.vim
+- :set nocompatible viminfo+=nviminfo modeline
+- :edit " read modeline
+- /start of AUTO
+- =/end of AUTO
+- ENDTEST
+-
+- /* start of AUTO matically checked vim: set ts=4 : */
+- {
+- if (test)
+- cmd1;
+- cmd2;
+- }
+-
+- {
+- if (test)
+- cmd1;
+- else
+- cmd2;
+- }
+-
+- {
+- if (test)
+- {
+- cmd1;
+- cmd2;
+- }
+- }
+-
+- {
+- if (test)
+- {
+- cmd1;
+- else
+- }
+- }
+-
+- {
+- while (this)
+- if (test)
+- cmd1;
+- cmd2;
+- }
+-
+- {
+- while (this)
+- if (test)
+- cmd1;
+- else
+- cmd2;
+- }
+-
+- {
+- if (test)
+- {
+- cmd;
+- }
+-
+- if (test)
+- cmd;
+- }
+-
+- {
+- if (test) {
+- cmd;
+- }
+-
+- if (test) cmd;
+- }
+-
+- {
+- cmd1;
+- for (blah)
+- while (this)
+- if (test)
+- cmd2;
+- cmd3;
+- }
+-
+- {
+- cmd1;
+- for (blah)
+- while (this)
+- if (test)
+- cmd2;
+- cmd3;
+-
+- if (test)
+- {
+- cmd1;
+- cmd2;
+- cmd3;
+- }
+- }
+-
+-
+- /* Test for 'cindent' do/while mixed with if/else: */
+-
+- {
+- do
+- if (asdf)
+- asdfasd;
+- while (cond);
+-
+- do
+- if (asdf)
+- while (asdf)
+- asdf;
+- while (asdf);
+- }
+-
+- /* Test for 'cindent' with two ) on a continuation line */
+- {
+- if (asdfasdf;asldkfj asdlkfj as;ldkfj sal;d
+- aal;sdkjf ( ;asldfkja;sldfk
+- al;sdjfka ;slkdf ) sa;ldkjfsa dlk;)
+- line up here;
+- }
+-
+-
+- /* C++ tests: */
+-
+- // foo() these three lines should remain in column 0
+- // {
+- // }
+-
+- /* Test for continuation and unterminated lines: */
+- {
+- i = 99 + 14325 +
+- 21345 +
+- 21345 +
+- 21345 + ( 21345 +
+- 21345) +
+- 2345 +
+- 1234;
+- c = 1;
+- }
+-
+- /*
+- testje for indent with empty line
+-
+- here */
+-
+- {
+- if (testing &&
+- not a joke ||
+- line up here)
+- hay;
+- if (testing &&
+- (not a joke || testing
+- )line up here)
+- hay;
+- if (testing &&
+- (not a joke || testing
+- line up here))
+- hay;
+- }
+-
+-
+- {
+- switch (c)
+- {
+- case xx:
+- do
+- if (asdf)
+- do
+- asdfasdf;
+- while (asdf);
+- else
+- asdfasdf;
+- while (cond);
+- case yy:
+- case xx:
+- case zz:
+- testing;
+- }
+- }
+-
+- {
+- if (cond) {
+- foo;
+- }
+- else
+- {
+- bar;
+- }
+- }
+-
+- {
+- if (alskdfj ;alsdkfjal;skdjf (;sadlkfsa ;dlkf j;alksdfj ;alskdjf
+- alsdkfj (asldk;fj
+- awith cino=(0 ;lf this one goes to below the paren with ==
+- ;laksjfd ;lsakdjf ;alskdf asd)
+- asdfasdf;)))
+- asdfasdf;
+- }
+-
+- int
+- func(a, b)
+- int a;
+- int c;
+- {
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3)
+- )
+- }
+-
+- {
+- while (asd)
+- {
+- if (asdf)
+- if (test)
+- if (that)
+- {
+- if (asdf)
+- do
+- cdasd;
+- while (as
+- df);
+- }
+- else
+- if (asdf)
+- asdf;
+- else
+- asdf;
+- asdf;
+- }
+- }
+-
+- {
+- s = "/*"; b = ';'
+- s = "/*"; b = ';';
+- a = b;
+- }
+-
+- {
+- switch (a)
+- {
+- case a:
+- switch (t)
+- {
+- case 1:
+- cmd;
+- break;
+- case 2:
+- cmd;
+- break;
+- }
+- cmd;
+- break;
+- case b:
+- {
+- int i;
+- cmd;
+- }
+- break;
+- case c: {
+- int i;
+- cmd;
+- }
+- case d: if (cond &&
+- test) { /* this line doesn't work right */
+- int i;
+- cmd;
+- }
+- break;
+- }
+- }
+-
+- {
+- if (!(vim_strchr(p_cpo, CPO_BUFOPTGLOB) != NULL && entering) &&
+- (bp_to->b_p_initialized ||
+- (!entering && vim_strchr(p_cpo, CPO_BUFOPT) != NULL)))
+- return;
+- label :
+- asdf = asdf ?
+- asdf : asdf;
+- asdf = asdf ?
+- asdf: asdf;
+- }
+-
+- /* Special Comments : This function has the added complexity (compared */
+- /* : to addtolist) of having to check for a detail */
+- /* : texture and add that to the list first. */
+-
+- char *(array[100]) = {
+- "testje",
+- "foo",
+- "bar",
+- }
+-
+- enum soppie
+- {
+- yes = 0,
+- no,
+- maybe
+- };
+-
+- typedef enum soppie
+- {
+- yes = 0,
+- no,
+- maybe
+- };
+-
+- static enum
+- {
+- yes = 0,
+- no,
+- maybe
+- } soppie;
+-
+- public static enum
+- {
+- yes = 0,
+- no,
+- maybe
+- } soppie;
+-
+- static private enum
+- {
+- yes = 0,
+- no,
+- maybe
+- } soppie;
+-
+- {
+- int a,
+- b;
+- }
+-
+- {
+- struct Type
+- {
+- int i;
+- char *str;
+- } var[] =
+- {
+- 0, "zero",
+- 1, "one",
+- 2, "two",
+- 3, "three"
+- };
+-
+- float matrix[3][3] =
+- {
+- {
+- 0,
+- 1,
+- 2
+- },
+- {
+- 3,
+- 4,
+- 5
+- },
+- {
+- 6,
+- 7,
+- 8
+- }
+- };
+- }
+-
+- {
+- /* blah ( blah */
+- /* where does this go? */
+-
+- /* blah ( blah */
+- cmd;
+-
+- func(arg1,
+- /* comment */
+- arg2);
+- a;
+- {
+- b;
+- {
+- c; /* Hey, NOW it indents?! */
+- }
+- }
+-
+- {
+- func(arg1,
+- arg2,
+- arg3);
+- /* Hey, what am I doing here? Is this coz of the ","? */
+- }
+- }
+-
+- main ()
+- {
+- if (cond)
+- {
+- a = b;
+- }
+- if (cond) {
+- a = c;
+- }
+- if (cond)
+- a = d;
+- return;
+- }
+-
+- {
+- case 2: if (asdf &&
+- asdfasdf)
+- aasdf;
+- a = 9;
+- case 3: if (asdf)
+- aasdf;
+- a = 9;
+- case 4: x = 1;
+- y = 2;
+-
+- label: if (asdf)
+- here;
+-
+- label: if (asdf &&
+- asdfasdf)
+- {
+- }
+-
+- label: if (asdf &&
+- asdfasdf) {
+- there;
+- }
+-
+- label: if (asdf &&
+- asdfasdf)
+- there;
+- }
+-
+- {
+- /*
+- hello with ":set comments= cino=c5"
+- */
+-
+- /*
+- hello with ":set comments= cino="
+- */
+- }
+-
+-
+- {
+- if (a < b) {
+- a = a + 1;
+- } else
+- a = a + 2;
+-
+- if (a)
+- do {
+- testing;
+- } while (asdfasdf);
+- a = b + 1;
+- asdfasdf
+- }
+-
+- {
+- for ( int i = 0;
+- i < 10; i++ )
+- {
+- }
+- i = 0;
+- }
+-
+- class bob
+- {
+- int foo() {return 1;}
+- int bar;
+- }
+-
+- main()
+- {
+- while(1)
+- if (foo)
+- {
+- bar;
+- }
+- else {
+- asdf;
+- }
+- misplacedline;
+- }
+-
+- {
+- if (clipboard.state == SELECT_DONE
+- && ((row == clipboard.start.lnum
+- && col >= clipboard.start.col)
+- || row > clipboard.start.lnum))
+- }
+-
+- {
+- if (1) {i += 4;}
+- where_am_i;
+- return 0;
+- }
+-
+- {
+- {
+- } // sdf(asdf
+- if (asdf)
+- asd;
+- }
+-
+- {
+- label1:
+- label2:
+- }
+-
+- {
+- int fooRet = foo(pBar1, false /*fKB*/,
+- true /*fPTB*/, 3 /*nT*/, false /*fDF*/);
+- f() {
+- for ( i = 0;
+- i < m;
+- /* c */ i++ ) {
+- a = b;
+- }
+- }
+- }
+-
+- {
+- f1(/*comment*/);
+- f2();
+- }
+-
+- {
+- do {
+- if (foo) {
+- } else
+- ;
+- } while (foo);
+- foo(); // was wrong
+- }
+-
+- int x; // no extra indent because of the ;
+- void func()
+- {
+- }
+-
+- char *tab[] = {"aaa",
+- "};", /* }; */ NULL}
+- int indented;
+- {}
+-
+- char *a[] = {"aaa", "bbb",
+- "ccc", NULL};
+- // here
+-
+- char *tab[] = {"aaa",
+- "xx", /* xx */}; /* asdf */
+- int not_indented;
+-
+- {
+- do {
+- switch (bla)
+- {
+- case 1: if (foo)
+- bar;
+- }
+- } while (boo);
+- wrong;
+- }
+-
+- int foo,
+- bar;
+- int foo;
+-
+- #if defined(foo) \
+- && defined(bar)
+- char * xx = "asdf\
+- foo\
+- bor";
+- int x;
+-
+- char *foo = "asdf\
+- asdf\
+- asdf",
+- *bar;
+-
+- void f()
+- {
+- #if defined(foo) \
+- && defined(bar)
+- char *foo = "asdf\
+- asdf\
+- asdf",
+- *bar;
+- {
+- int i;
+- char *foo = "asdf\
+- asdf\
+- asdf",
+- *bar;
+- }
+- #endif
+- }
+- #endif
+-
+- int y; // comment
+- // comment
+-
+- // comment
+-
+- {
+- Constructor(int a,
+- int b ) : BaseClass(a)
+- {
+- }
+- }
+-
+- void foo()
+- {
+- char one,
+- two;
+- struct bla piet,
+- jan;
+- enum foo kees,
+- jannie;
+- static unsigned sdf,
+- krap;
+- unsigned int piet,
+- jan;
+- int
+- kees,
+- jan;
+- }
+-
+- {
+- t(int f,
+- int d); // )
+- d();
+- }
+-
+- Constructor::Constructor(int a,
+- int b
+- ) :
+- BaseClass(a,
+- b,
+- c),
+- mMember(b),
+- {
+- }
+-
+- Constructor::Constructor(int a,
+- int b ) :
+- BaseClass(a)
+- {
+- }
+-
+- Constructor::Constructor(int a,
+- int b ) /*x*/ : /*x*/ BaseClass(a),
+- member(b)
+- {
+- }
+-
+- A::A(int a, int b)
+- : aa(a),
+- bb(b),
+- cc(c)
+- {
+- }
+-
+- class CAbc :
+- public BaseClass1,
+- protected BaseClass2
+- {
+- int Test() { return FALSE; }
+- int Test1() { return TRUE; }
+-
+- CAbc(int a, int b ) :
+- BaseClass(a)
+- {
+- switch(xxx)
+- {
+- case abc:
+- asdf();
+- break;
+-
+- case 999:
+- baer();
+- break;
+- }
+- }
+-
+- public: // <-- this was incoreectly indented before!!
+- void testfall();
+- protected:
+- void testfall();
+- };
+-
+- class CAbc : public BaseClass1,
+- protected BaseClass2
+- {
+- };
+-
+- static struct
+- {
+- int a;
+- int b;
+- } variable[COUNT] =
+- {
+- {
+- 123,
+- 456
+- },
+- {
+- 123,
+- 456
+- }
+- };
+-
+- static struct
+- {
+- int a;
+- int b;
+- } variable[COUNT] =
+- {
+- { 123, 456 },
+- { 123, 456 }
+- };
+-
+- void asdf() /* ind_maxparen may cause trouble here */
+- {
+- if ((0
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1)) break;
+- }
+-
+- foo()
+- {
+- a = cond ? foo() : asdf
+- + asdf;
+-
+- a = cond ?
+- foo() : asdf
+- + asdf;
+- }
+-
+- int main(void)
+- {
+- if (a)
+- if (b)
+- 2;
+- else 3;
+- next_line_of_code();
+- }
+-
+- barry()
+- {
+- Foo::Foo (int one,
+- int two)
+- : something(4)
+- {}
+- }
+-
+- barry()
+- {
+- Foo::Foo (int one, int two)
+- : something(4)
+- {}
+- }
+-
+- Constructor::Constructor(int a,
+- int b
+- ) :
+- BaseClass(a,
+- b,
+- c),
+- mMember(b)
+- {
+- }
+- int main ()
+- {
+- if (lala)
+- do
+- ++(*lolo);
+- while (lili
+- && lele);
+- lulu;
+- }
+-
+- int main ()
+- {
+- switch (c)
+- {
+- case 'c': if (cond)
+- {
+- }
+- }
+- }
+-
+- main()
+- {
+- (void) MyFancyFuasdfadsfnction(
+- argument);
+- }
+-
+- main()
+- {
+- char foo[] = "/*";
+- /* as
+- df */
+- hello
+- }
+-
+- /* valid namespaces with normal indent */
+- namespace
+- {
+- {
+- 111111111111;
+- }
+- }
+- namespace /* test */
+- {
+- 11111111111111111;
+- }
+- namespace // test
+- {
+- 111111111111111111;
+- }
+- namespace
+- {
+- 111111111111111111;
+- }
+- namespace test
+- {
+- 111111111111111111;
+- }
+- namespace{
+- 111111111111111111;
+- }
+- namespace test{
+- 111111111111111111;
+- }
+- namespace {
+- 111111111111111111;
+- }
+- namespace test {
+- 111111111111111111;
+- namespace test2 {
+- 22222222222222222;
+- }
+- }
+-
+- /* invalid namespaces use block indent */
+- namespace test test2 {
+- 111111111111111111111;
+- }
+- namespace11111111111 {
+- 111111111111;
+- }
+- namespace() {
+- 1111111111111;
+- }
+- namespace()
+- {
+- 111111111111111111;
+- }
+- namespace test test2
+- {
+- 1111111111111111111;
+- }
+- namespace111111111
+- {
+- 111111111111111111;
+- }
+-
+- void getstring() {
+- /* Raw strings */
+- const char* s = R"(
+- test {
+- # comment
+- field: 123
+- }
+- )";
+- }
+-
+- void getstring() {
+- const char* s = R"foo(
+- test {
+- # comment
+- field: 123
+- }
+- )foo";
+- }
+-
+- {
+- int a[4] = {
+- [0] = 0,
+- [1] = 1,
+- [2] = 2,
+- [3] = 3,
+- };
+- }
+-
+- {
+- a = b[2]
+- + 3;
+- }
+-
+- {
+- if (1)
+- /* aaaaa
+- * bbbbb
+- */
+- a = 1;
+- }
+-
+- void func()
+- {
+- switch (foo)
+- {
+- case (bar):
+- if (baz())
+- quux();
+- break;
+- case (shmoo):
+- if (!bar)
+- {
+- }
+- case (foo1):
+- switch (bar)
+- {
+- case baz:
+- baz_f();
+- break;
+- }
+- break;
+- default:
+- baz();
+- baz();
+- break;
+- }
+- }
+-
+- /* end of AUTO */
+-
+- STARTTEST
+- :set tw=0 noai fo=croq
+- :let &wm = &columns - 20
+- /serious/e
+- a about life, the universe, and the rest
+- ENDTEST
+-
+- {
+-
+- /* this is
+- * a real serious important big
+- * comment
+- */
+- /* insert " about life, the universe, and the rest" after "serious" */
+- }
+-
+- STARTTEST
+- :set nocin
+- /comments
+- joabout life/happens
+- jothere/below
+- oline/this
+- Ohello
+- ENDTEST
+-
+- {
+- /*
+- * Testing for comments, without 'cin' set
+- */
+-
+- /*
+- * what happens here?
+- */
+-
+- /*
+- the end of the comment, try inserting a line below */
+-
+- /* how about
+- this one */
+- }
+-
+- STARTTEST
+- :set cin
+- /vec2
+- ==
+- ENDTEST
+-
+- {
+- var = this + that + vec[0] * vec[0]
+- + vec[1] * vec[1]
+- + vec2[2] * vec[2];
+- }
+-
+- STARTTEST
+- :set cin
+- :set cino=}4
+- /testing1
+- k2==/testing2
+- k2==
+- ENDTEST
+-
+- {
+- asdf asdflkajds f;
+- if (tes & ting) {
+- asdf asdf asdf ;
+- asdfa sdf asdf;
+- }
+- testing1;
+- if (tes & ting)
+- {
+- asdf asdf asdf ;
+- asdfa sdf asdf;
+- }
+- testing2;
+- }
+-
+- STARTTEST
+- :set cin
+- :set cino=(0,)20
+- /main
+- =][
+- ENDTEST
+-
+- main ( int first_par, /*
+- * Comment for
+- * first par
+- */
+- int second_par /*
+- * Comment for
+- * second par
+- */
+- )
+- {
+- func( first_par, /*
+- * Comment for
+- * first par
+- */
+- second_par /*
+- * Comment for
+- * second par
+- */
+- );
+-
+- }
+-
+- STARTTEST
+- :set cin
+- :set cino=es,n0s
+- /main
+- =][
+- ENDTEST
+-
+- main(void)
+- {
+- /* Make sure that cino=X0s is not parsed like cino=Xs. */
+- if (cond)
+- foo();
+- else
+- {
+- bar();
+- }
+- }
+-
+- STARTTEST
+- :set cin
+- :set cino=
+- ]]=][
+- ENDTEST
+-
+- {
+- do
+- {
+- if ()
+- {
+- if ()
+- asdf;
+- else
+- asdf;
+- }
+- } while ();
+- cmd; /* this should go under the } */
+- }
+-
+- STARTTEST
+- ]]=][
+- ENDTEST
+-
+- void f()
+- {
+- if ( k() ) {
+- l();
+-
+- } else { /* Start (two words) end */
+- m();
+- }
+-
+- n();
+- }
+-
+- STARTTEST
+- :set cino={s,e-s
+- ]]=][
+- ENDTEST
+-
+- void f()
+- {
+- if ( k() )
+- {
+- l();
+- } else { /* Start (two words) end */
+- m();
+- }
+- n(); /* should be under the if () */
+- }
+-
+- STARTTEST
+- :set cino={s,fs
+- ]]=/ foo
+- ENDTEST
+-
+- void bar(void)
+- {
+- static array[2][2] =
+- {
+- { 1, 2 },
+- { 3, 4 },
+- }
+-
+- while (a)
+- {
+- foo(&a);
+- }
+-
+- {
+- int a;
+- {
+- a = a + 1;
+- }
+- }
+- b = a;
+- }
+-
+- void func(void)
+- {
+- a = 1;
+- {
+- b = 2;
+- }
+- c = 3;
+- d = 4;
+- }
+- /* foo */
+-
+- STARTTEST
+- :set cino=
+- /while
+- ohere
+- ENDTEST
+-
+- a()
+- {
+- do {
+- a = a +
+- a;
+- } while ( a ); /* add text under this line */
+- if ( a )
+- a;
+- }
+-
+- STARTTEST
+- :set cino= com=
+- /comment
+- olabel2: b(); label3 /* post */: /* pre */ label4: f(/*com*/); if (/*com*/) cmd();
+- ENDTEST
+-
+- a()
+- {
+- label1:
+- /* hmm */
+- // comment
+- }
+-
+- STARTTEST
+- :set comments& comments^=s:/*,m:**,ex:*/
+- /simple
+- =5j
+- ENDTEST
+-
+- /*
+- * A simple comment
+- */
+-
+- /*
+- ** A different comment
+- */
+-
+- STARTTEST
+- :set cino=c0
+- :set comments& comments-=s1:/* comments^=s0:/*
+- 2kdd]]=][
+- ENDTEST
+-
+- void f()
+- {
+-
+- /*********
+- A comment.
+- *********/
+- }
+-
+- STARTTEST
+- :set cino=c0,C1
+- :set comments& comments-=s1:/* comments^=s0:/*
+- 2kdd]]=][
+- ENDTEST
+-
+- void f()
+- {
+-
+- /*********
+- A comment.
+- *********/
+- }
+-
+- STARTTEST
+- :set cino=
+- ]]=][
+- ENDTEST
+-
+- void f()
+- {
+- c = c1 &&
+- (
+- c2 ||
+- c3
+- ) && c4;
+- }
+-
+- STARTTEST
+- :set cino=(s
+- 2kdd]]=][
+- ENDTEST
+-
+- void f()
+- {
+- c = c1 &&
+- (
+- c2 ||
+- c3
+- ) && c4;
+- }
+-
+- STARTTEST
+- :set cino=(s,U1
+- 2kdd]]=][
+- ENDTEST
+-
+- void f()
+- {
+- c = c1 &&
+- (
+- c2 ||
+- c3
+- ) && c4;
+- }
+-
+- STARTTEST
+- :set cino=(0
+- 2kdd]]=][
+- ENDTEST
+-
+- void f()
+- {
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+- }
+-
+- STARTTEST
+- :set cino=(0,w1
+- 2kdd]]=][
+- ENDTEST
+-
+- void f()
+- {
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+- }
+-
+- STARTTEST
+- :set cino=(s
+- 2kdd]]=][
+- ENDTEST
+-
+- void f()
+- {
+- c = c1 && (
+- c2 ||
+- c3
+- ) && c4;
+- if (
+- c1 && c2
+- )
+- foo;
+- }
+-
+- STARTTEST
+- :set cino=(s,m1
+- 2kdd]]=][
+- ENDTEST
+-
+- void f()
+- {
+- c = c1 && (
+- c2 ||
+- c3
+- ) && c4;
+- if (
+- c1 && c2
+- )
+- foo;
+- }
+-
+- STARTTEST
+- :set cino=b1
+- 2kdd]]=][
+- ENDTEST
+-
+- void f()
+- {
+- switch (x)
+- {
+- case 1:
+- a = b;
+- break;
+- default:
+- a = 0;
+- break;
+- }
+- }
+-
+- STARTTEST
+- :set cino=(0,W5
+- 2kdd]]=][
+- ENDTEST
+-
+- void f()
+- {
+- invokeme(
+- argu,
+- ment);
+- invokeme(
+- argu,
+- ment
+- );
+- invokeme(argu,
+- ment
+- );
+- }
+-
+- STARTTEST
+- :set cino=/6
+- 2kdd]]=][
+- ENDTEST
+-
+- void f()
+- {
+- statement;
+- // comment 1
+- // comment 2
+- }
+-
+- STARTTEST
+- :set cino=
+- 2kdd]]/comment 1/+1
+- ==
+- ENDTEST
+-
+- void f()
+- {
+- statement;
+- // comment 1
+- // comment 2
+- }
+-
+- STARTTEST
+- :set cino=g0
+- 2kdd]]=][
+- ENDTEST
+-
+- class CAbc
+- {
+- int Test() { return FALSE; }
+-
+- public: // comment
+- void testfall();
+- protected:
+- void testfall();
+- };
+-
+- STARTTEST
+- :set cino=(0,gs,hs
+- 2kdd]]=][
+- ENDTEST
+-
+- class Foo : public Bar
+- {
+- public:
+- virtual void method1(void) = 0;
+- virtual void method2(int arg1,
+- int arg2,
+- int arg3) = 0;
+- };
+-
+- STARTTEST
+- :set cino=+20
+- 2kdd]]=][
+- ENDTEST
+-
+- void
+- foo()
+- {
+- if (a)
+- {
+- } else
+- asdf;
+- }
+-
+- STARTTEST
+- :set cino=(0,W2s
+- 2kdd]]=][
+- ENDTEST
+-
+- {
+- averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd(
+- asdasdf,
+- func(asdf,
+- asdfadsf),
+- asdfasdf
+- );
+-
+- /* those are ugly, but consequent */
+-
+- func()->asd(asdasdf,
+- averylongfunctionname(
+- abc,
+- dec)->averylongfunctionname(
+- asdfadsf,
+- asdfasdf,
+- asdfasdf,
+- ),
+- func(asdfadf,
+- asdfasdf
+- ),
+- asdasdf
+- );
+-
+- averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf(
+- abc,
+- dec)->asdfasdfasdf(
+- asdfadsf,
+- asdfasdf,
+- asdfasdf,
+- ),
+- func(asdfadf,
+- asdfasdf),
+- asdasdf
+- );
+- }
+-
+- STARTTEST
+- :set cino=M1
+- 2kdd]]=][
+- ENDTEST
+-
+- int main ()
+- {
+- if (cond1 &&
+- cond2
+- )
+- foo;
+- }
+-
+- STARTTEST
+- :set cino=(0,ts
+- 2kdd2j=][
+- ENDTEST
+-
+- void func(int a
+- #if defined(FOO)
+- , int b
+- , int c
+- #endif
+- )
+- {
+- }
+-
+- STARTTEST
+- :set cino=(0
+- 2kdd2j=][
+- ENDTEST
+-
+- void
+- func(int a
+- #if defined(FOO)
+- , int b
+- , int c
+- #endif
+- )
+- {
+- }
+-
+- STARTTEST
+- :set cino&
+- 2kdd2j=7][
+- ENDTEST
+-
+- void func(void)
+- {
+- if(x==y)
+- if(y==z)
+- foo=1;
+- else { bar=1;
+- baz=2;
+- }
+- printf("Foo!\n");
+- }
+-
+- void func1(void)
+- {
+- char* tab[] = {"foo", "bar",
+- "baz", "quux",
+- "this line used", "to be indented incorrectly"};
+- foo();
+- }
+-
+- void func2(void)
+- {
+- int tab[] =
+- {1, 2,
+- 3, 4,
+- 5, 6};
+-
+- printf("This line used to be indented incorrectly.\n");
+- }
+-
+- int foo[]
+- #ifdef BAR
+-
+- = { 1, 2, 3,
+- 4, 5, 6 }
+-
+- #endif
+- ;
+- int baz;
+-
+- void func3(void)
+- {
+- int tab[] = {
+- 1, 2,
+- 3, 4,
+- 5, 6};
+-
+- printf("Don't you dare indent this line incorrectly!\n");
+- }
+-
+- void
+- func4(a, b,
+- c)
+- int a;
+- int b;
+- int c;
+- {
+- }
+-
+- void
+- func5(
+- int a,
+- int b)
+- {
+- }
+-
+- void
+- func6(
+- int a)
+- {
+- }
+-
+- STARTTEST
+- :set cino&
+- :set cino+=l1
+- 2kdd2j=][
+- ENDTEST
+-
+- void func(void)
+- {
+- int tab[] =
+- {
+- 1, 2, 3,
+- 4, 5, 6};
+-
+- printf("Indent this line correctly!\n");
+-
+- switch (foo)
+- {
+- case bar:
+- printf("bar");
+- break;
+- case baz: {
+- printf("baz");
+- break;
+- }
+- case quux:
+- printf("But don't break the indentation of this instruction\n");
+- break;
+- }
+- }
+-
+- STARTTEST
+- :set cino&
+- 2kdd2j=][
+- ENDTEST
+-
+- void func(void)
+- {
+- cout << "a"
+- << "b"
+- << ") :"
+- << "c";
+- }
+-
+- STARTTEST
+- :set com=s1:/*,m:*,ex:*/
+- ]]3jofoo();
+- ENDTEST
+-
+- void func(void)
+- {
+- /*
+- * This is a comment.
+- */
+- }
+-
+- STARTTEST
+- :set cino&
+- 2kdd2j=][
+- ENDTEST
+-
+- void func(void)
+- {
+- for (int i = 0; i < 10; ++i)
+- if (i & 1) {
+- foo(1);
+- } else
+- foo(0);
+- baz();
+- }
+-
+- STARTTEST
+- :set cino=k2s,(0
+- 2kdd3j=][
+- ENDTEST
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+-
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+- func( c1
+- && ( c2
+- || c3))
+- foo;
+- }
+-
+- STARTTEST
+- :set cino=k2s,(s
+- 2kdd3j=][
+- ENDTEST
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+-
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+- func( c1
+- && ( c2
+- || c3))
+- foo;
+- }
+-
+- STARTTEST
+- :set cino=k2s,(s,U1
+- 2kdd3j=][
+- ENDTEST
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+- if (c123456789
+- && (c22345
+- || c3))
+- printf("foo\n");
+-
+- c = c1 &&
+- (
+- c2 ||
+- c3
+- ) && c4;
+- }
+-
+- STARTTEST
+- :set cino=k2s,(0,W4
+- 2kdd3j=][
+- ENDTEST
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+- if (c123456789
+- && (c22345
+- || c3))
+- printf("foo\n");
+-
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+-
+- a_long_line(
+- argument,
+- argument);
+- a_short_line(argument,
+- argument);
+- }
+-
+- STARTTEST
+- :set cino=k2s,u2
+- 2kdd3j=][
+- ENDTEST
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+- if (c123456789
+- && (c22345
+- || c3))
+- printf("foo\n");
+- }
+-
+- STARTTEST
+- :set cino=k2s,(0,w1
+- 2kdd3j=][
+- ENDTEST
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+- if (c123456789
+- && (c22345
+- || c3))
+- printf("foo\n");
+-
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+- func( c1
+- && ( c2
+- || c3))
+- foo;
+- }
+-
+- STARTTEST
+- :set cino=k2,(s
+- 2kdd3j=][
+- ENDTEST
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+- }
+-
+- STARTTEST
+- :set cino=N-s
+- /^NAMESPACESTART
+- =/^NAMESPACEEND
+- ENDTEST
+-
+- NAMESPACESTART
+- /* valid namespaces with normal indent */
+- namespace
+- {
+- {
+- 111111111111;
+- }
+- }
+- namespace /* test */
+- {
+- 11111111111111111;
+- }
+- namespace // test
+- {
+- 111111111111111111;
+- }
+- namespace
+- {
+- 111111111111111111;
+- }
+- namespace test
+- {
+- 111111111111111111;
+- }
+- namespace test::cpp17
+- {
+- 111111111111111111;
+- }
+- namespace ::incorrectcpp17
+- {
+- 111111111111111111;
+- }
+- namespace test::incorrectcpp17::
+- {
+- 111111111111111111;
+- }
+- namespace test:incorrectcpp17
+- {
+- 111111111111111111;
+- }
+- namespace test:::incorrectcpp17
+- {
+- 111111111111111111;
+- }
+- namespace{
+- 111111111111111111;
+- }
+- namespace test{
+- 111111111111111111;
+- }
+- namespace {
+- 111111111111111111;
+- }
+- namespace test {
+- 111111111111111111;
+- namespace test2 {
+- 22222222222222222;
+- }
+- }
+-
+- /* invalid namespaces use block indent */
+- namespace test test2 {
+- 111111111111111111111;
+- }
+- namespace11111111111 {
+- 111111111111;
+- }
+- namespace() {
+- 1111111111111;
+- }
+- namespace()
+- {
+- 111111111111111111;
+- }
+- namespace test test2
+- {
+- 1111111111111111111;
+- }
+- namespace111111111
+- {
+- 111111111111111111;
+- }
+- NAMESPACEEND
+-
+-
+- STARTTEST
+- :set cino=j1,J1
+- /^JSSTART
+- =/^JSEND
+- ENDTEST
+-
+- JSSTART
+- var bar = {
+- foo: {
+- that: this,
+- some: ok,
+- },
+- "bar":{
+- a : 2,
+- b: "123abc",
+- x: 4,
+- "y": 5
+- }
+- }
+- JSEND
+-
+- STARTTEST
+- :set cino=j1,J1
+- /^JSSTART
+- =/^JSEND
+- ENDTEST
+-
+- JSSTART
+- var foo = [
+- 1,
+- 2,
+- 3
+- ];
+- JSEND
+-
+- STARTTEST
+- :set cino=j1,J1
+- /^JSSTART
+- =/^JSEND
+- ENDTEST
+-
+- JSSTART
+- function bar() {
+- var foo = [
+- 1,
+- 2,
+- 3
+- ];
+- }
+- JSEND
+-
+- STARTTEST
+- :set cino=j1,J1
+- /^JSSTART
+- =/^JSEND
+- ENDTEST
+-
+- JSSTART
+- (function($){
+-
+- if (cond &&
+- cond) {
+- stmt;
+- }
+- window.something.left =
+- (width - 50 + offset) + "px";
+- var class_name='myclass';
+-
+- function private_method() {
+- }
+-
+- var public_method={
+- method: function(options,args){
+- private_method();
+- }
+- }
+-
+- function init(options) {
+-
+- $(this).data(class_name+'_public',$.extend({},{
+- foo: 'bar',
+- bar: 2,
+- foobar: [
+- 1,
+- 2,
+- 3
+- ],
+- callback: function(){
+- return true;
+- }
+- }, options||{}));
+- }
+-
+- $.fn[class_name]=function() {
+-
+- var _arguments=arguments;
+- return this.each(function(){
+-
+- var options=$(this).data(class_name+'_public');
+- if (!options) {
+- init.apply(this,_arguments);
+-
+- } else {
+- var method=public_method[_arguments[0]];
+-
+- if (typeof(method)!='function') {
+- console.log(class_name+' has no method "'+_arguments[0]+'"');
+- return false;
+- }
+- _arguments[0]=options;
+- method.apply(this,_arguments);
+- }
+- });
+- }
+-
+- })(jQuery);
+- JSEND
+-
+- STARTTEST
+- :set cino=j1,J1
+- /^JSSTART
+- =/^JSEND
+- ENDTEST
+-
+- JSSTART
+- function init(options) {
+- $(this).data(class_name+'_public',$.extend({},{
+- foo: 'bar',
+- bar: 2,
+- foobar: [
+- 1,
+- 2,
+- 3
+- ],
+- callback: function(){
+- return true;
+- }
+- }, options||{}));
+- }
+- JSEND
+-
+- STARTTEST
+- :set cino=j1,J1
+- /^JSSTART
+- =/^JSEND
+- ENDTEST
+-
+- JSSTART
+- (function($){
+- function init(options) {
+- $(this).data(class_name+'_public',$.extend({},{
+- foo: 'bar',
+- bar: 2,
+- foobar: [
+- 1,
+- 2,
+- 3
+- ],
+- callback: function(){
+- return true;
+- }
+- }, options||{}));
+- }
+- })(jQuery);
+- JSEND
+-
+- STARTTEST
+- :set cino=j1,J1,+2
+- /^JSSTART
+- =/^JSEND
+- ENDTEST
+-
+- JSSTART
+- // Results of JavaScript indent
+- // 1
+- (function(){
+- var a = [
+- 'a',
+- 'b',
+- 'c',
+- 'd',
+- 'e',
+- 'f',
+- 'g',
+- 'h',
+- 'i'
+- ];
+- }())
+-
+- // 2
+- (function(){
+- var a = [
+- 0 +
+- 5 *
+- 9 *
+- 'a',
+- 'b',
+- 0 +
+- 5 *
+- 9 *
+- 'c',
+- 'd',
+- 'e',
+- 'f',
+- 'g',
+- 'h',
+- 'i'
+- ];
+- }())
+-
+- // 3
+- (function(){
+- var a = [
+- 0 +
+- // comment 1
+- 5 *
+- /* comment 2 */
+- 9 *
+- 'a',
+- 'b',
+- 0 +
+- 5 *
+- 9 *
+- 'c',
+- 'd',
+- 'e',
+- 'f',
+- 'g',
+- 'h',
+- 'i'
+- ];
+- }())
+-
+- // 4
+- {
+- var a = [
+- 0,
+- 1
+- ];
+- var b;
+- var c;
+- }
+-
+- // 5
+- {
+- var a = [
+- [
+- 0
+- ],
+- 2,
+- 3
+- ];
+- }
+-
+- // 6
+- {
+- var a = [
+- [
+- 0,
+- 1
+- ],
+- 2,
+- 3
+- ];
+- }
+-
+- // 7
+- {
+- var a = [
+- // [
+- 0,
+- // 1
+- // ],
+- 2,
+- 3
+- ];
+- }
+-
+- // 8
+- var x = [
+- (function(){
+- var a,
+- b,
+- c,
+- d,
+- e,
+- f,
+- g,
+- h,
+- i;
+- })
+- ];
+-
+- // 9
+- var a = [
+- 0 +
+- 5 *
+- 9 *
+- 'a',
+- 'b',
+- 0 +
+- 5 *
+- 9 *
+- 'c',
+- 'd',
+- 'e',
+- 'f',
+- 'g',
+- 'h',
+- 'i'
+- ];
+-
+- // 10
+- var a,
+- b,
+- c,
+- d,
+- e,
+- f,
+- g,
+- h,
+- i;
+- JSEND
+-
+- STARTTEST
+- :set cin cino&
+- /start of define
+- =/end of define
+- ENDTEST
+-
+- /* start of define */
+- {
+- }
+- #define AAA \
+- BBB\
+- CCC
+-
+- #define CNT \
+- 1 + \
+- 2 + \
+- 4
+- /* end of define */
+-
+- STARTTEST
+- :set cin cino&
+- /a = second
+- ox
+- ENDTEST
+-
+- {
+- a = second/*bug*/*line;
+- }
+-
+- STARTTEST
+- :g/^STARTTEST/.,/^ENDTEST/d
+- :1;/start of AUTO/,$wq! test.out
+- ENDTEST
+--- 0 ----
+*** ../vim-8.1.1433/src/testdir/test3.ok 2017-11-12 15:32:20.000000000 +0100
+--- src/testdir/test3.ok 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,2102 ****
+- /* start of AUTO matically checked vim: set ts=4 : */
+- {
+- if (test)
+- cmd1;
+- cmd2;
+- }
+-
+- {
+- if (test)
+- cmd1;
+- else
+- cmd2;
+- }
+-
+- {
+- if (test)
+- {
+- cmd1;
+- cmd2;
+- }
+- }
+-
+- {
+- if (test)
+- {
+- cmd1;
+- else
+- }
+- }
+-
+- {
+- while (this)
+- if (test)
+- cmd1;
+- cmd2;
+- }
+-
+- {
+- while (this)
+- if (test)
+- cmd1;
+- else
+- cmd2;
+- }
+-
+- {
+- if (test)
+- {
+- cmd;
+- }
+-
+- if (test)
+- cmd;
+- }
+-
+- {
+- if (test) {
+- cmd;
+- }
+-
+- if (test) cmd;
+- }
+-
+- {
+- cmd1;
+- for (blah)
+- while (this)
+- if (test)
+- cmd2;
+- cmd3;
+- }
+-
+- {
+- cmd1;
+- for (blah)
+- while (this)
+- if (test)
+- cmd2;
+- cmd3;
+-
+- if (test)
+- {
+- cmd1;
+- cmd2;
+- cmd3;
+- }
+- }
+-
+-
+- /* Test for 'cindent' do/while mixed with if/else: */
+-
+- {
+- do
+- if (asdf)
+- asdfasd;
+- while (cond);
+-
+- do
+- if (asdf)
+- while (asdf)
+- asdf;
+- while (asdf);
+- }
+-
+- /* Test for 'cindent' with two ) on a continuation line */
+- {
+- if (asdfasdf;asldkfj asdlkfj as;ldkfj sal;d
+- aal;sdkjf ( ;asldfkja;sldfk
+- al;sdjfka ;slkdf ) sa;ldkjfsa dlk;)
+- line up here;
+- }
+-
+-
+- /* C++ tests: */
+-
+- // foo() these three lines should remain in column 0
+- // {
+- // }
+-
+- /* Test for continuation and unterminated lines: */
+- {
+- i = 99 + 14325 +
+- 21345 +
+- 21345 +
+- 21345 + ( 21345 +
+- 21345) +
+- 2345 +
+- 1234;
+- c = 1;
+- }
+-
+- /*
+- testje for indent with empty line
+-
+- here */
+-
+- {
+- if (testing &&
+- not a joke ||
+- line up here)
+- hay;
+- if (testing &&
+- (not a joke || testing
+- )line up here)
+- hay;
+- if (testing &&
+- (not a joke || testing
+- line up here))
+- hay;
+- }
+-
+-
+- {
+- switch (c)
+- {
+- case xx:
+- do
+- if (asdf)
+- do
+- asdfasdf;
+- while (asdf);
+- else
+- asdfasdf;
+- while (cond);
+- case yy:
+- case xx:
+- case zz:
+- testing;
+- }
+- }
+-
+- {
+- if (cond) {
+- foo;
+- }
+- else
+- {
+- bar;
+- }
+- }
+-
+- {
+- if (alskdfj ;alsdkfjal;skdjf (;sadlkfsa ;dlkf j;alksdfj ;alskdjf
+- alsdkfj (asldk;fj
+- awith cino=(0 ;lf this one goes to below the paren with ==
+- ;laksjfd ;lsakdjf ;alskdf asd)
+- asdfasdf;)))
+- asdfasdf;
+- }
+-
+- int
+- func(a, b)
+- int a;
+- int c;
+- {
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3)
+- )
+- }
+-
+- {
+- while (asd)
+- {
+- if (asdf)
+- if (test)
+- if (that)
+- {
+- if (asdf)
+- do
+- cdasd;
+- while (as
+- df);
+- }
+- else
+- if (asdf)
+- asdf;
+- else
+- asdf;
+- asdf;
+- }
+- }
+-
+- {
+- s = "/*"; b = ';'
+- s = "/*"; b = ';';
+- a = b;
+- }
+-
+- {
+- switch (a)
+- {
+- case a:
+- switch (t)
+- {
+- case 1:
+- cmd;
+- break;
+- case 2:
+- cmd;
+- break;
+- }
+- cmd;
+- break;
+- case b:
+- {
+- int i;
+- cmd;
+- }
+- break;
+- case c: {
+- int i;
+- cmd;
+- }
+- case d: if (cond &&
+- test) { /* this line doesn't work right */
+- int i;
+- cmd;
+- }
+- break;
+- }
+- }
+-
+- {
+- if (!(vim_strchr(p_cpo, CPO_BUFOPTGLOB) != NULL && entering) &&
+- (bp_to->b_p_initialized ||
+- (!entering && vim_strchr(p_cpo, CPO_BUFOPT) != NULL)))
+- return;
+- label :
+- asdf = asdf ?
+- asdf : asdf;
+- asdf = asdf ?
+- asdf: asdf;
+- }
+-
+- /* Special Comments : This function has the added complexity (compared */
+- /* : to addtolist) of having to check for a detail */
+- /* : texture and add that to the list first. */
+-
+- char *(array[100]) = {
+- "testje",
+- "foo",
+- "bar",
+- }
+-
+- enum soppie
+- {
+- yes = 0,
+- no,
+- maybe
+- };
+-
+- typedef enum soppie
+- {
+- yes = 0,
+- no,
+- maybe
+- };
+-
+- static enum
+- {
+- yes = 0,
+- no,
+- maybe
+- } soppie;
+-
+- public static enum
+- {
+- yes = 0,
+- no,
+- maybe
+- } soppie;
+-
+- static private enum
+- {
+- yes = 0,
+- no,
+- maybe
+- } soppie;
+-
+- {
+- int a,
+- b;
+- }
+-
+- {
+- struct Type
+- {
+- int i;
+- char *str;
+- } var[] =
+- {
+- 0, "zero",
+- 1, "one",
+- 2, "two",
+- 3, "three"
+- };
+-
+- float matrix[3][3] =
+- {
+- {
+- 0,
+- 1,
+- 2
+- },
+- {
+- 3,
+- 4,
+- 5
+- },
+- {
+- 6,
+- 7,
+- 8
+- }
+- };
+- }
+-
+- {
+- /* blah ( blah */
+- /* where does this go? */
+-
+- /* blah ( blah */
+- cmd;
+-
+- func(arg1,
+- /* comment */
+- arg2);
+- a;
+- {
+- b;
+- {
+- c; /* Hey, NOW it indents?! */
+- }
+- }
+-
+- {
+- func(arg1,
+- arg2,
+- arg3);
+- /* Hey, what am I doing here? Is this coz of the ","? */
+- }
+- }
+-
+- main ()
+- {
+- if (cond)
+- {
+- a = b;
+- }
+- if (cond) {
+- a = c;
+- }
+- if (cond)
+- a = d;
+- return;
+- }
+-
+- {
+- case 2: if (asdf &&
+- asdfasdf)
+- aasdf;
+- a = 9;
+- case 3: if (asdf)
+- aasdf;
+- a = 9;
+- case 4: x = 1;
+- y = 2;
+-
+- label: if (asdf)
+- here;
+-
+- label: if (asdf &&
+- asdfasdf)
+- {
+- }
+-
+- label: if (asdf &&
+- asdfasdf) {
+- there;
+- }
+-
+- label: if (asdf &&
+- asdfasdf)
+- there;
+- }
+-
+- {
+- /*
+- hello with ":set comments= cino=c5"
+- */
+-
+- /*
+- hello with ":set comments= cino="
+- */
+- }
+-
+-
+- {
+- if (a < b) {
+- a = a + 1;
+- } else
+- a = a + 2;
+-
+- if (a)
+- do {
+- testing;
+- } while (asdfasdf);
+- a = b + 1;
+- asdfasdf
+- }
+-
+- {
+- for ( int i = 0;
+- i < 10; i++ )
+- {
+- }
+- i = 0;
+- }
+-
+- class bob
+- {
+- int foo() {return 1;}
+- int bar;
+- }
+-
+- main()
+- {
+- while(1)
+- if (foo)
+- {
+- bar;
+- }
+- else {
+- asdf;
+- }
+- misplacedline;
+- }
+-
+- {
+- if (clipboard.state == SELECT_DONE
+- && ((row == clipboard.start.lnum
+- && col >= clipboard.start.col)
+- || row > clipboard.start.lnum))
+- }
+-
+- {
+- if (1) {i += 4;}
+- where_am_i;
+- return 0;
+- }
+-
+- {
+- {
+- } // sdf(asdf
+- if (asdf)
+- asd;
+- }
+-
+- {
+- label1:
+- label2:
+- }
+-
+- {
+- int fooRet = foo(pBar1, false /*fKB*/,
+- true /*fPTB*/, 3 /*nT*/, false /*fDF*/);
+- f() {
+- for ( i = 0;
+- i < m;
+- /* c */ i++ ) {
+- a = b;
+- }
+- }
+- }
+-
+- {
+- f1(/*comment*/);
+- f2();
+- }
+-
+- {
+- do {
+- if (foo) {
+- } else
+- ;
+- } while (foo);
+- foo(); // was wrong
+- }
+-
+- int x; // no extra indent because of the ;
+- void func()
+- {
+- }
+-
+- char *tab[] = {"aaa",
+- "};", /* }; */ NULL}
+- int indented;
+- {}
+-
+- char *a[] = {"aaa", "bbb",
+- "ccc", NULL};
+- // here
+-
+- char *tab[] = {"aaa",
+- "xx", /* xx */}; /* asdf */
+- int not_indented;
+-
+- {
+- do {
+- switch (bla)
+- {
+- case 1: if (foo)
+- bar;
+- }
+- } while (boo);
+- wrong;
+- }
+-
+- int foo,
+- bar;
+- int foo;
+-
+- #if defined(foo) \
+- && defined(bar)
+- char * xx = "asdf\
+- foo\
+- bor";
+- int x;
+-
+- char *foo = "asdf\
+- asdf\
+- asdf",
+- *bar;
+-
+- void f()
+- {
+- #if defined(foo) \
+- && defined(bar)
+- char *foo = "asdf\
+- asdf\
+- asdf",
+- *bar;
+- {
+- int i;
+- char *foo = "asdf\
+- asdf\
+- asdf",
+- *bar;
+- }
+- #endif
+- }
+- #endif
+-
+- int y; // comment
+- // comment
+-
+- // comment
+-
+- {
+- Constructor(int a,
+- int b ) : BaseClass(a)
+- {
+- }
+- }
+-
+- void foo()
+- {
+- char one,
+- two;
+- struct bla piet,
+- jan;
+- enum foo kees,
+- jannie;
+- static unsigned sdf,
+- krap;
+- unsigned int piet,
+- jan;
+- int
+- kees,
+- jan;
+- }
+-
+- {
+- t(int f,
+- int d); // )
+- d();
+- }
+-
+- Constructor::Constructor(int a,
+- int b
+- ) :
+- BaseClass(a,
+- b,
+- c),
+- mMember(b),
+- {
+- }
+-
+- Constructor::Constructor(int a,
+- int b ) :
+- BaseClass(a)
+- {
+- }
+-
+- Constructor::Constructor(int a,
+- int b ) /*x*/ : /*x*/ BaseClass(a),
+- member(b)
+- {
+- }
+-
+- A::A(int a, int b)
+- : aa(a),
+- bb(b),
+- cc(c)
+- {
+- }
+-
+- class CAbc :
+- public BaseClass1,
+- protected BaseClass2
+- {
+- int Test() { return FALSE; }
+- int Test1() { return TRUE; }
+-
+- CAbc(int a, int b ) :
+- BaseClass(a)
+- {
+- switch(xxx)
+- {
+- case abc:
+- asdf();
+- break;
+-
+- case 999:
+- baer();
+- break;
+- }
+- }
+-
+- public: // <-- this was incoreectly indented before!!
+- void testfall();
+- protected:
+- void testfall();
+- };
+-
+- class CAbc : public BaseClass1,
+- protected BaseClass2
+- {
+- };
+-
+- static struct
+- {
+- int a;
+- int b;
+- } variable[COUNT] =
+- {
+- {
+- 123,
+- 456
+- },
+- {
+- 123,
+- 456
+- }
+- };
+-
+- static struct
+- {
+- int a;
+- int b;
+- } variable[COUNT] =
+- {
+- { 123, 456 },
+- { 123, 456 }
+- };
+-
+- void asdf() /* ind_maxparen may cause trouble here */
+- {
+- if ((0
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1
+- && 1)) break;
+- }
+-
+- foo()
+- {
+- a = cond ? foo() : asdf
+- + asdf;
+-
+- a = cond ?
+- foo() : asdf
+- + asdf;
+- }
+-
+- int main(void)
+- {
+- if (a)
+- if (b)
+- 2;
+- else 3;
+- next_line_of_code();
+- }
+-
+- barry()
+- {
+- Foo::Foo (int one,
+- int two)
+- : something(4)
+- {}
+- }
+-
+- barry()
+- {
+- Foo::Foo (int one, int two)
+- : something(4)
+- {}
+- }
+-
+- Constructor::Constructor(int a,
+- int b
+- ) :
+- BaseClass(a,
+- b,
+- c),
+- mMember(b)
+- {
+- }
+- int main ()
+- {
+- if (lala)
+- do
+- ++(*lolo);
+- while (lili
+- && lele);
+- lulu;
+- }
+-
+- int main ()
+- {
+- switch (c)
+- {
+- case 'c': if (cond)
+- {
+- }
+- }
+- }
+-
+- main()
+- {
+- (void) MyFancyFuasdfadsfnction(
+- argument);
+- }
+-
+- main()
+- {
+- char foo[] = "/*";
+- /* as
+- df */
+- hello
+- }
+-
+- /* valid namespaces with normal indent */
+- namespace
+- {
+- {
+- 111111111111;
+- }
+- }
+- namespace /* test */
+- {
+- 11111111111111111;
+- }
+- namespace // test
+- {
+- 111111111111111111;
+- }
+- namespace
+- {
+- 111111111111111111;
+- }
+- namespace test
+- {
+- 111111111111111111;
+- }
+- namespace{
+- 111111111111111111;
+- }
+- namespace test{
+- 111111111111111111;
+- }
+- namespace {
+- 111111111111111111;
+- }
+- namespace test {
+- 111111111111111111;
+- namespace test2 {
+- 22222222222222222;
+- }
+- }
+-
+- /* invalid namespaces use block indent */
+- namespace test test2 {
+- 111111111111111111111;
+- }
+- namespace11111111111 {
+- 111111111111;
+- }
+- namespace() {
+- 1111111111111;
+- }
+- namespace()
+- {
+- 111111111111111111;
+- }
+- namespace test test2
+- {
+- 1111111111111111111;
+- }
+- namespace111111111
+- {
+- 111111111111111111;
+- }
+-
+- void getstring() {
+- /* Raw strings */
+- const char* s = R"(
+- test {
+- # comment
+- field: 123
+- }
+- )";
+- }
+-
+- void getstring() {
+- const char* s = R"foo(
+- test {
+- # comment
+- field: 123
+- }
+- )foo";
+- }
+-
+- {
+- int a[4] = {
+- [0] = 0,
+- [1] = 1,
+- [2] = 2,
+- [3] = 3,
+- };
+- }
+-
+- {
+- a = b[2]
+- + 3;
+- }
+-
+- {
+- if (1)
+- /* aaaaa
+- * bbbbb
+- */
+- a = 1;
+- }
+-
+- void func()
+- {
+- switch (foo)
+- {
+- case (bar):
+- if (baz())
+- quux();
+- break;
+- case (shmoo):
+- if (!bar)
+- {
+- }
+- case (foo1):
+- switch (bar)
+- {
+- case baz:
+- baz_f();
+- break;
+- }
+- break;
+- default:
+- baz();
+- baz();
+- break;
+- }
+- }
+-
+- /* end of AUTO */
+-
+-
+- {
+-
+- /* this is
+- * a real serious
+- * about life, the
+- * universe, and the
+- * rest important big
+- * comment
+- */
+- /* insert " about life, the universe, and the rest" after "serious" */
+- }
+-
+-
+- {
+- /*
+- * Testing for comments, without 'cin' set
+- */
+- about life
+-
+- /*
+- * what happens here?
+- */
+- there
+-
+- /*
+- the end of the comment, try inserting a line below */
+- line
+-
+- /* how about
+- hello
+- this one */
+- }
+-
+-
+- {
+- var = this + that + vec[0] * vec[0]
+- + vec[1] * vec[1]
+- + vec2[2] * vec[2];
+- }
+-
+-
+- {
+- asdf asdflkajds f;
+- if (tes & ting) {
+- asdf asdf asdf ;
+- asdfa sdf asdf;
+- }
+- testing1;
+- if (tes & ting)
+- {
+- asdf asdf asdf ;
+- asdfa sdf asdf;
+- }
+- testing2;
+- }
+-
+-
+- main ( int first_par, /*
+- * Comment for
+- * first par
+- */
+- int second_par /*
+- * Comment for
+- * second par
+- */
+- )
+- {
+- func( first_par, /*
+- * Comment for
+- * first par
+- */
+- second_par /*
+- * Comment for
+- * second par
+- */
+- );
+-
+- }
+-
+-
+- main(void)
+- {
+- /* Make sure that cino=X0s is not parsed like cino=Xs. */
+- if (cond)
+- foo();
+- else
+- {
+- bar();
+- }
+- }
+-
+-
+- {
+- do
+- {
+- if ()
+- {
+- if ()
+- asdf;
+- else
+- asdf;
+- }
+- } while ();
+- cmd; /* this should go under the } */
+- }
+-
+-
+- void f()
+- {
+- if ( k() ) {
+- l();
+-
+- } else { /* Start (two words) end */
+- m();
+- }
+-
+- n();
+- }
+-
+-
+- void f()
+- {
+- if ( k() )
+- {
+- l();
+- } else { /* Start (two words) end */
+- m();
+- }
+- n(); /* should be under the if () */
+- }
+-
+-
+- void bar(void)
+- {
+- static array[2][2] =
+- {
+- { 1, 2 },
+- { 3, 4 },
+- }
+-
+- while (a)
+- {
+- foo(&a);
+- }
+-
+- {
+- int a;
+- {
+- a = a + 1;
+- }
+- }
+- b = a;
+- }
+-
+- void func(void)
+- {
+- a = 1;
+- {
+- b = 2;
+- }
+- c = 3;
+- d = 4;
+- }
+- /* foo */
+-
+-
+- a()
+- {
+- do {
+- a = a +
+- a;
+- } while ( a ); /* add text under this line */
+- here
+- if ( a )
+- a;
+- }
+-
+-
+- a()
+- {
+- label1:
+- /* hmm */
+- // comment
+- label2: b();
+- label3 /* post */:
+- /* pre */ label4:
+- f(/*com*/);
+- if (/*com*/)
+- cmd();
+- }
+-
+-
+- /*
+- * A simple comment
+- */
+-
+- /*
+- ** A different comment
+- */
+-
+-
+- void f()
+- {
+-
+- /*********
+- A comment.
+- *********/
+- }
+-
+-
+- void f()
+- {
+-
+- /*********
+- A comment.
+- *********/
+- }
+-
+-
+- void f()
+- {
+- c = c1 &&
+- (
+- c2 ||
+- c3
+- ) && c4;
+- }
+-
+-
+- void f()
+- {
+- c = c1 &&
+- (
+- c2 ||
+- c3
+- ) && c4;
+- }
+-
+-
+- void f()
+- {
+- c = c1 &&
+- (
+- c2 ||
+- c3
+- ) && c4;
+- }
+-
+-
+- void f()
+- {
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+- }
+-
+-
+- void f()
+- {
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+- }
+-
+-
+- void f()
+- {
+- c = c1 && (
+- c2 ||
+- c3
+- ) && c4;
+- if (
+- c1 && c2
+- )
+- foo;
+- }
+-
+-
+- void f()
+- {
+- c = c1 && (
+- c2 ||
+- c3
+- ) && c4;
+- if (
+- c1 && c2
+- )
+- foo;
+- }
+-
+-
+- void f()
+- {
+- switch (x)
+- {
+- case 1:
+- a = b;
+- break;
+- default:
+- a = 0;
+- break;
+- }
+- }
+-
+-
+- void f()
+- {
+- invokeme(
+- argu,
+- ment);
+- invokeme(
+- argu,
+- ment
+- );
+- invokeme(argu,
+- ment
+- );
+- }
+-
+-
+- void f()
+- {
+- statement;
+- // comment 1
+- // comment 2
+- }
+-
+-
+- void f()
+- {
+- statement;
+- // comment 1
+- // comment 2
+- }
+-
+-
+- class CAbc
+- {
+- int Test() { return FALSE; }
+-
+- public: // comment
+- void testfall();
+- protected:
+- void testfall();
+- };
+-
+-
+- class Foo : public Bar
+- {
+- public:
+- virtual void method1(void) = 0;
+- virtual void method2(int arg1,
+- int arg2,
+- int arg3) = 0;
+- };
+-
+-
+- void
+- foo()
+- {
+- if (a)
+- {
+- } else
+- asdf;
+- }
+-
+-
+- {
+- averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd(
+- asdasdf,
+- func(asdf,
+- asdfadsf),
+- asdfasdf
+- );
+-
+- /* those are ugly, but consequent */
+-
+- func()->asd(asdasdf,
+- averylongfunctionname(
+- abc,
+- dec)->averylongfunctionname(
+- asdfadsf,
+- asdfasdf,
+- asdfasdf,
+- ),
+- func(asdfadf,
+- asdfasdf
+- ),
+- asdasdf
+- );
+-
+- averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf(
+- abc,
+- dec)->asdfasdfasdf(
+- asdfadsf,
+- asdfasdf,
+- asdfasdf,
+- ),
+- func(asdfadf,
+- asdfasdf),
+- asdasdf
+- );
+- }
+-
+-
+- int main ()
+- {
+- if (cond1 &&
+- cond2
+- )
+- foo;
+- }
+-
+-
+- void func(int a
+- #if defined(FOO)
+- , int b
+- , int c
+- #endif
+- )
+- {
+- }
+-
+-
+- void
+- func(int a
+- #if defined(FOO)
+- , int b
+- , int c
+- #endif
+- )
+- {
+- }
+-
+-
+- void func(void)
+- {
+- if(x==y)
+- if(y==z)
+- foo=1;
+- else { bar=1;
+- baz=2;
+- }
+- printf("Foo!\n");
+- }
+-
+- void func1(void)
+- {
+- char* tab[] = {"foo", "bar",
+- "baz", "quux",
+- "this line used", "to be indented incorrectly"};
+- foo();
+- }
+-
+- void func2(void)
+- {
+- int tab[] =
+- {1, 2,
+- 3, 4,
+- 5, 6};
+-
+- printf("This line used to be indented incorrectly.\n");
+- }
+-
+- int foo[]
+- #ifdef BAR
+-
+- = { 1, 2, 3,
+- 4, 5, 6 }
+-
+- #endif
+- ;
+- int baz;
+-
+- void func3(void)
+- {
+- int tab[] = {
+- 1, 2,
+- 3, 4,
+- 5, 6};
+-
+- printf("Don't you dare indent this line incorrectly!\n");
+- }
+-
+- void
+- func4(a, b,
+- c)
+- int a;
+- int b;
+- int c;
+- {
+- }
+-
+- void
+- func5(
+- int a,
+- int b)
+- {
+- }
+-
+- void
+- func6(
+- int a)
+- {
+- }
+-
+-
+- void func(void)
+- {
+- int tab[] =
+- {
+- 1, 2, 3,
+- 4, 5, 6};
+-
+- printf("Indent this line correctly!\n");
+-
+- switch (foo)
+- {
+- case bar:
+- printf("bar");
+- break;
+- case baz: {
+- printf("baz");
+- break;
+- }
+- case quux:
+- printf("But don't break the indentation of this instruction\n");
+- break;
+- }
+- }
+-
+-
+- void func(void)
+- {
+- cout << "a"
+- << "b"
+- << ") :"
+- << "c";
+- }
+-
+-
+- void func(void)
+- {
+- /*
+- * This is a comment.
+- */
+- foo();
+- }
+-
+-
+- void func(void)
+- {
+- for (int i = 0; i < 10; ++i)
+- if (i & 1) {
+- foo(1);
+- } else
+- foo(0);
+- baz();
+- }
+-
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+-
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+- func( c1
+- && ( c2
+- || c3))
+- foo;
+- }
+-
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+-
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+- func( c1
+- && ( c2
+- || c3))
+- foo;
+- }
+-
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+- if (c123456789
+- && (c22345
+- || c3))
+- printf("foo\n");
+-
+- c = c1 &&
+- (
+- c2 ||
+- c3
+- ) && c4;
+- }
+-
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+- if (c123456789
+- && (c22345
+- || c3))
+- printf("foo\n");
+-
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+-
+- a_long_line(
+- argument,
+- argument);
+- a_short_line(argument,
+- argument);
+- }
+-
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+- if (c123456789
+- && (c22345
+- || c3))
+- printf("foo\n");
+- }
+-
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+- if (c123456789
+- && (c22345
+- || c3))
+- printf("foo\n");
+-
+- if ( c1
+- && ( c2
+- || c3))
+- foo;
+- func( c1
+- && ( c2
+- || c3))
+- foo;
+- }
+-
+-
+- void func(void)
+- {
+- if (condition1
+- && condition2)
+- action();
+- function(argument1
+- && argument2);
+-
+- if (c1 && (c2 ||
+- c3))
+- foo;
+- if (c1 &&
+- (c2 || c3))
+- {
+- }
+- }
+-
+-
+- NAMESPACESTART
+- /* valid namespaces with normal indent */
+- namespace
+- {
+- {
+- 111111111111;
+- }
+- }
+- namespace /* test */
+- {
+- 11111111111111111;
+- }
+- namespace // test
+- {
+- 111111111111111111;
+- }
+- namespace
+- {
+- 111111111111111111;
+- }
+- namespace test
+- {
+- 111111111111111111;
+- }
+- namespace test::cpp17
+- {
+- 111111111111111111;
+- }
+- namespace ::incorrectcpp17
+- {
+- 111111111111111111;
+- }
+- namespace test::incorrectcpp17::
+- {
+- 111111111111111111;
+- }
+- namespace test:incorrectcpp17
+- {
+- 111111111111111111;
+- }
+- namespace test:::incorrectcpp17
+- {
+- 111111111111111111;
+- }
+- namespace{
+- 111111111111111111;
+- }
+- namespace test{
+- 111111111111111111;
+- }
+- namespace {
+- 111111111111111111;
+- }
+- namespace test {
+- 111111111111111111;
+- namespace test2 {
+- 22222222222222222;
+- }
+- }
+-
+- /* invalid namespaces use block indent */
+- namespace test test2 {
+- 111111111111111111111;
+- }
+- namespace11111111111 {
+- 111111111111;
+- }
+- namespace() {
+- 1111111111111;
+- }
+- namespace()
+- {
+- 111111111111111111;
+- }
+- namespace test test2
+- {
+- 1111111111111111111;
+- }
+- namespace111111111
+- {
+- 111111111111111111;
+- }
+- NAMESPACEEND
+-
+-
+-
+- JSSTART
+- var bar = {
+- foo: {
+- that: this,
+- some: ok,
+- },
+- "bar":{
+- a : 2,
+- b: "123abc",
+- x: 4,
+- "y": 5
+- }
+- }
+- JSEND
+-
+-
+- JSSTART
+- var foo = [
+- 1,
+- 2,
+- 3
+- ];
+- JSEND
+-
+-
+- JSSTART
+- function bar() {
+- var foo = [
+- 1,
+- 2,
+- 3
+- ];
+- }
+- JSEND
+-
+-
+- JSSTART
+- (function($){
+-
+- if (cond &&
+- cond) {
+- stmt;
+- }
+- window.something.left =
+- (width - 50 + offset) + "px";
+- var class_name='myclass';
+-
+- function private_method() {
+- }
+-
+- var public_method={
+- method: function(options,args){
+- private_method();
+- }
+- }
+-
+- function init(options) {
+-
+- $(this).data(class_name+'_public',$.extend({},{
+- foo: 'bar',
+- bar: 2,
+- foobar: [
+- 1,
+- 2,
+- 3
+- ],
+- callback: function(){
+- return true;
+- }
+- }, options||{}));
+- }
+-
+- $.fn[class_name]=function() {
+-
+- var _arguments=arguments;
+- return this.each(function(){
+-
+- var options=$(this).data(class_name+'_public');
+- if (!options) {
+- init.apply(this,_arguments);
+-
+- } else {
+- var method=public_method[_arguments[0]];
+-
+- if (typeof(method)!='function') {
+- console.log(class_name+' has no method "'+_arguments[0]+'"');
+- return false;
+- }
+- _arguments[0]=options;
+- method.apply(this,_arguments);
+- }
+- });
+- }
+-
+- })(jQuery);
+- JSEND
+-
+-
+- JSSTART
+- function init(options) {
+- $(this).data(class_name+'_public',$.extend({},{
+- foo: 'bar',
+- bar: 2,
+- foobar: [
+- 1,
+- 2,
+- 3
+- ],
+- callback: function(){
+- return true;
+- }
+- }, options||{}));
+- }
+- JSEND
+-
+-
+- JSSTART
+- (function($){
+- function init(options) {
+- $(this).data(class_name+'_public',$.extend({},{
+- foo: 'bar',
+- bar: 2,
+- foobar: [
+- 1,
+- 2,
+- 3
+- ],
+- callback: function(){
+- return true;
+- }
+- }, options||{}));
+- }
+- })(jQuery);
+- JSEND
+-
+-
+- JSSTART
+- // Results of JavaScript indent
+- // 1
+- (function(){
+- var a = [
+- 'a',
+- 'b',
+- 'c',
+- 'd',
+- 'e',
+- 'f',
+- 'g',
+- 'h',
+- 'i'
+- ];
+- }())
+-
+- // 2
+- (function(){
+- var a = [
+- 0 +
+- 5 *
+- 9 *
+- 'a',
+- 'b',
+- 0 +
+- 5 *
+- 9 *
+- 'c',
+- 'd',
+- 'e',
+- 'f',
+- 'g',
+- 'h',
+- 'i'
+- ];
+- }())
+-
+- // 3
+- (function(){
+- var a = [
+- 0 +
+- // comment 1
+- 5 *
+- /* comment 2 */
+- 9 *
+- 'a',
+- 'b',
+- 0 +
+- 5 *
+- 9 *
+- 'c',
+- 'd',
+- 'e',
+- 'f',
+- 'g',
+- 'h',
+- 'i'
+- ];
+- }())
+-
+- // 4
+- {
+- var a = [
+- 0,
+- 1
+- ];
+- var b;
+- var c;
+- }
+-
+- // 5
+- {
+- var a = [
+- [
+- 0
+- ],
+- 2,
+- 3
+- ];
+- }
+-
+- // 6
+- {
+- var a = [
+- [
+- 0,
+- 1
+- ],
+- 2,
+- 3
+- ];
+- }
+-
+- // 7
+- {
+- var a = [
+- // [
+- 0,
+- // 1
+- // ],
+- 2,
+- 3
+- ];
+- }
+-
+- // 8
+- var x = [
+- (function(){
+- var a,
+- b,
+- c,
+- d,
+- e,
+- f,
+- g,
+- h,
+- i;
+- })
+- ];
+-
+- // 9
+- var a = [
+- 0 +
+- 5 *
+- 9 *
+- 'a',
+- 'b',
+- 0 +
+- 5 *
+- 9 *
+- 'c',
+- 'd',
+- 'e',
+- 'f',
+- 'g',
+- 'h',
+- 'i'
+- ];
+-
+- // 10
+- var a,
+- b,
+- c,
+- d,
+- e,
+- f,
+- g,
+- h,
+- i;
+- JSEND
+-
+-
+- /* start of define */
+- {
+- }
+- #define AAA \
+- BBB\
+- CCC
+-
+- #define CNT \
+- 1 + \
+- 2 + \
+- 4
+- /* end of define */
+-
+-
+- {
+- a = second/*bug*/*line;
+- x
+- }
+-
+--- 0 ----
+*** ../vim-8.1.1433/src/testdir/test_cindent.vim 2019-05-20 22:12:30.720442793 +0200
+--- src/testdir/test_cindent.vim 2019-05-31 19:57:21.037036126 +0200
+***************
+*** 1,6 ****
+ " Test for cinoptions and cindent
+ "
+- " TODO: rewrite test3.in into this new style test
+
+ func Test_cino_hash()
+ " Test that curbuf->b_ind_hash_comment is correctly reset
+--- 1,5 ----
+***************
+*** 128,131 ****
+--- 127,5254 ----
+ bwipe!
+ endfunc
+
++ func Test_cindent_1()
++ new
++ setl cindent ts=4 sw=4
++ setl cino& sts&
++
++ let code =<< trim [CODE]
++ /* start of AUTO matically checked vim: set ts=4 : */
++ {
++ if (test)
++ cmd1;
++ cmd2;
++ }
++
++ {
++ if (test)
++ cmd1;
++ else
++ cmd2;
++ }
++
++ {
++ if (test)
++ {
++ cmd1;
++ cmd2;
++ }
++ }
++
++ {
++ if (test)
++ {
++ cmd1;
++ else
++ }
++ }
++
++ {
++ while (this)
++ if (test)
++ cmd1;
++ cmd2;
++ }
++
++ {
++ while (this)
++ if (test)
++ cmd1;
++ else
++ cmd2;
++ }
++
++ {
++ if (test)
++ {
++ cmd;
++ }
++
++ if (test)
++ cmd;
++ }
++
++ {
++ if (test) {
++ cmd;
++ }
++
++ if (test) cmd;
++ }
++
++ {
++ cmd1;
++ for (blah)
++ while (this)
++ if (test)
++ cmd2;
++ cmd3;
++ }
++
++ {
++ cmd1;
++ for (blah)
++ while (this)
++ if (test)
++ cmd2;
++ cmd3;
++
++ if (test)
++ {
++ cmd1;
++ cmd2;
++ cmd3;
++ }
++ }
++
++
++ /* Test for 'cindent' do/while mixed with if/else: */
++
++ {
++ do
++ if (asdf)
++ asdfasd;
++ while (cond);
++
++ do
++ if (asdf)
++ while (asdf)
++ asdf;
++ while (asdf);
++ }
++
++ /* Test for 'cindent' with two ) on a continuation line */
++ {
++ if (asdfasdf;asldkfj asdlkfj as;ldkfj sal;d
++ aal;sdkjf ( ;asldfkja;sldfk
++ al;sdjfka ;slkdf ) sa;ldkjfsa dlk;)
++ line up here;
++ }
++
++
++ /* C++ tests: */
++
++ // foo() these three lines should remain in column 0
++ // {
++ // }
++
++ /* Test for continuation and unterminated lines: */
++ {
++ i = 99 + 14325 +
++ 21345 +
++ 21345 +
++ 21345 + ( 21345 +
++ 21345) +
++ 2345 +
++ 1234;
++ c = 1;
++ }
++
++ /*
++ testje for indent with empty line
++
++ here */
++
++ {
++ if (testing &&
++ not a joke ||
++ line up here)
++ hay;
++ if (testing &&
++ (not a joke || testing
++ )line up here)
++ hay;
++ if (testing &&
++ (not a joke || testing
++ line up here))
++ hay;
++ }
++
++
++ {
++ switch (c)
++ {
++ case xx:
++ do
++ if (asdf)
++ do
++ asdfasdf;
++ while (asdf);
++ else
++ asdfasdf;
++ while (cond);
++ case yy:
++ case xx:
++ case zz:
++ testing;
++ }
++ }
++
++ {
++ if (cond) {
++ foo;
++ }
++ else
++ {
++ bar;
++ }
++ }
++
++ {
++ if (alskdfj ;alsdkfjal;skdjf (;sadlkfsa ;dlkf j;alksdfj ;alskdjf
++ alsdkfj (asldk;fj
++ awith cino=(0 ;lf this one goes to below the paren with ==
++ ;laksjfd ;lsakdjf ;alskdf asd)
++ asdfasdf;)))
++ asdfasdf;
++ }
++
++ int
++ func(a, b)
++ int a;
++ int c;
++ {
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3)
++ )
++ }
++
++ {
++ while (asd)
++ {
++ if (asdf)
++ if (test)
++ if (that)
++ {
++ if (asdf)
++ do
++ cdasd;
++ while (as
++ df);
++ }
++ else
++ if (asdf)
++ asdf;
++ else
++ asdf;
++ asdf;
++ }
++ }
++
++ {
++ s = "/*"; b = ';'
++ s = "/*"; b = ';';
++ a = b;
++ }
++
++ {
++ switch (a)
++ {
++ case a:
++ switch (t)
++ {
++ case 1:
++ cmd;
++ break;
++ case 2:
++ cmd;
++ break;
++ }
++ cmd;
++ break;
++ case b:
++ {
++ int i;
++ cmd;
++ }
++ break;
++ case c: {
++ int i;
++ cmd;
++ }
++ case d: if (cond &&
++ test) { /* this line doesn't work right */
++ int i;
++ cmd;
++ }
++ break;
++ }
++ }
++
++ {
++ if (!(vim_strchr(p_cpo, CPO_BUFOPTGLOB) != NULL && entering) &&
++ (bp_to->b_p_initialized ||
++ (!entering && vim_strchr(p_cpo, CPO_BUFOPT) != NULL)))
++ return;
++ label :
++ asdf = asdf ?
++ asdf : asdf;
++ asdf = asdf ?
++ asdf: asdf;
++ }
++
++ /* Special Comments : This function has the added complexity (compared */
++ /* : to addtolist) of having to check for a detail */
++ /* : texture and add that to the list first. */
++
++ char *(array[100]) = {
++ "testje",
++ "foo",
++ "bar",
++ }
++
++ enum soppie
++ {
++ yes = 0,
++ no,
++ maybe
++ };
++
++ typedef enum soppie
++ {
++ yes = 0,
++ no,
++ maybe
++ };
++
++ static enum
++ {
++ yes = 0,
++ no,
++ maybe
++ } soppie;
++
++ public static enum
++ {
++ yes = 0,
++ no,
++ maybe
++ } soppie;
++
++ static private enum
++ {
++ yes = 0,
++ no,
++ maybe
++ } soppie;
++
++ {
++ int a,
++ b;
++ }
++
++ {
++ struct Type
++ {
++ int i;
++ char *str;
++ } var[] =
++ {
++ 0, "zero",
++ 1, "one",
++ 2, "two",
++ 3, "three"
++ };
++
++ float matrix[3][3] =
++ {
++ {
++ 0,
++ 1,
++ 2
++ },
++ {
++ 3,
++ 4,
++ 5
++ },
++ {
++ 6,
++ 7,
++ 8
++ }
++ };
++ }
++
++ {
++ /* blah ( blah */
++ /* where does this go? */
++
++ /* blah ( blah */
++ cmd;
++
++ func(arg1,
++ /* comment */
++ arg2);
++ a;
++ {
++ b;
++ {
++ c; /* Hey, NOW it indents?! */
++ }
++ }
++
++ {
++ func(arg1,
++ arg2,
++ arg3);
++ /* Hey, what am I doing here? Is this coz of the ","? */
++ }
++ }
++
++ main ()
++ {
++ if (cond)
++ {
++ a = b;
++ }
++ if (cond) {
++ a = c;
++ }
++ if (cond)
++ a = d;
++ return;
++ }
++
++ {
++ case 2: if (asdf &&
++ asdfasdf)
++ aasdf;
++ a = 9;
++ case 3: if (asdf)
++ aasdf;
++ a = 9;
++ case 4: x = 1;
++ y = 2;
++
++ label: if (asdf)
++ here;
++
++ label: if (asdf &&
++ asdfasdf)
++ {
++ }
++
++ label: if (asdf &&
++ asdfasdf) {
++ there;
++ }
++
++ label: if (asdf &&
++ asdfasdf)
++ there;
++ }
++
++ {
++ /*
++ hello with ":set comments= cino=c5"
++ */
++
++ /*
++ hello with ":set comments= cino="
++ */
++ }
++
++
++ {
++ if (a < b) {
++ a = a + 1;
++ } else
++ a = a + 2;
++
++ if (a)
++ do {
++ testing;
++ } while (asdfasdf);
++ a = b + 1;
++ asdfasdf
++ }
++
++ {
++ for ( int i = 0;
++ i < 10; i++ )
++ {
++ }
++ i = 0;
++ }
++
++ class bob
++ {
++ int foo() {return 1;}
++ int bar;
++ }
++
++ main()
++ {
++ while(1)
++ if (foo)
++ {
++ bar;
++ }
++ else {
++ asdf;
++ }
++ misplacedline;
++ }
++
++ {
++ if (clipboard.state == SELECT_DONE
++ && ((row == clipboard.start.lnum
++ && col >= clipboard.start.col)
++ || row > clipboard.start.lnum))
++ }
++
++ {
++ if (1) {i += 4;}
++ where_am_i;
++ return 0;
++ }
++
++ {
++ {
++ } // sdf(asdf
++ if (asdf)
++ asd;
++ }
++
++ {
++ label1:
++ label2:
++ }
++
++ {
++ int fooRet = foo(pBar1, false /*fKB*/,
++ true /*fPTB*/, 3 /*nT*/, false /*fDF*/);
++ f() {
++ for ( i = 0;
++ i < m;
++ /* c */ i++ ) {
++ a = b;
++ }
++ }
++ }
++
++ {
++ f1(/*comment*/);
++ f2();
++ }
++
++ {
++ do {
++ if (foo) {
++ } else
++ ;
++ } while (foo);
++ foo(); // was wrong
++ }
++
++ int x; // no extra indent because of the ;
++ void func()
++ {
++ }
++
++ char *tab[] = {"aaa",
++ "};", /* }; */ NULL}
++ int indented;
++ {}
++
++ char *a[] = {"aaa", "bbb",
++ "ccc", NULL};
++ // here
++
++ char *tab[] = {"aaa",
++ "xx", /* xx */}; /* asdf */
++ int not_indented;
++
++ {
++ do {
++ switch (bla)
++ {
++ case 1: if (foo)
++ bar;
++ }
++ } while (boo);
++ wrong;
++ }
++
++ int foo,
++ bar;
++ int foo;
++
++ #if defined(foo) \
++ && defined(bar)
++ char * xx = "asdf\
++ foo\
++ bor";
++ int x;
++
++ char *foo = "asdf\
++ asdf\
++ asdf",
++ *bar;
++
++ void f()
++ {
++ #if defined(foo) \
++ && defined(bar)
++ char *foo = "asdf\
++ asdf\
++ asdf",
++ *bar;
++ {
++ int i;
++ char *foo = "asdf\
++ asdf\
++ asdf",
++ *bar;
++ }
++ #endif
++ }
++ #endif
++
++ int y; // comment
++ // comment
++
++ // comment
++
++ {
++ Constructor(int a,
++ int b ) : BaseClass(a)
++ {
++ }
++ }
++
++ void foo()
++ {
++ char one,
++ two;
++ struct bla piet,
++ jan;
++ enum foo kees,
++ jannie;
++ static unsigned sdf,
++ krap;
++ unsigned int piet,
++ jan;
++ int
++ kees,
++ jan;
++ }
++
++ {
++ t(int f,
++ int d); // )
++ d();
++ }
++
++ Constructor::Constructor(int a,
++ int b
++ ) :
++ BaseClass(a,
++ b,
++ c),
++ mMember(b),
++ {
++ }
++
++ Constructor::Constructor(int a,
++ int b ) :
++ BaseClass(a)
++ {
++ }
++
++ Constructor::Constructor(int a,
++ int b ) /*x*/ : /*x*/ BaseClass(a),
++ member(b)
++ {
++ }
++
++ A::A(int a, int b)
++ : aa(a),
++ bb(b),
++ cc(c)
++ {
++ }
++
++ class CAbc :
++ public BaseClass1,
++ protected BaseClass2
++ {
++ int Test() { return FALSE; }
++ int Test1() { return TRUE; }
++
++ CAbc(int a, int b ) :
++ BaseClass(a)
++ {
++ switch(xxx)
++ {
++ case abc:
++ asdf();
++ break;
++
++ case 999:
++ baer();
++ break;
++ }
++ }
++
++ public: // <-- this was incoreectly indented before!!
++ void testfall();
++ protected:
++ void testfall();
++ };
++
++ class CAbc : public BaseClass1,
++ protected BaseClass2
++ {
++ };
++
++ static struct
++ {
++ int a;
++ int b;
++ } variable[COUNT] =
++ {
++ {
++ 123,
++ 456
++ },
++ {
++ 123,
++ 456
++ }
++ };
++
++ static struct
++ {
++ int a;
++ int b;
++ } variable[COUNT] =
++ {
++ { 123, 456 },
++ { 123, 456 }
++ };
++
++ void asdf() /* ind_maxparen may cause trouble here */
++ {
++ if ((0
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1)) break;
++ }
++
++ foo()
++ {
++ a = cond ? foo() : asdf
++ + asdf;
++
++ a = cond ?
++ foo() : asdf
++ + asdf;
++ }
++
++ int main(void)
++ {
++ if (a)
++ if (b)
++ 2;
++ else 3;
++ next_line_of_code();
++ }
++
++ barry()
++ {
++ Foo::Foo (int one,
++ int two)
++ : something(4)
++ {}
++ }
++
++ barry()
++ {
++ Foo::Foo (int one, int two)
++ : something(4)
++ {}
++ }
++
++ Constructor::Constructor(int a,
++ int b
++ ) :
++ BaseClass(a,
++ b,
++ c),
++ mMember(b)
++ {
++ }
++ int main ()
++ {
++ if (lala)
++ do
++ ++(*lolo);
++ while (lili
++ && lele);
++ lulu;
++ }
++
++ int main ()
++ {
++ switch (c)
++ {
++ case 'c': if (cond)
++ {
++ }
++ }
++ }
++
++ main()
++ {
++ (void) MyFancyFuasdfadsfnction(
++ argument);
++ }
++
++ main()
++ {
++ char foo[] = "/*";
++ /* as
++ df */
++ hello
++ }
++
++ /* valid namespaces with normal indent */
++ namespace
++ {
++ {
++ 111111111111;
++ }
++ }
++ namespace /* test */
++ {
++ 11111111111111111;
++ }
++ namespace // test
++ {
++ 111111111111111111;
++ }
++ namespace
++ {
++ 111111111111111111;
++ }
++ namespace test
++ {
++ 111111111111111111;
++ }
++ namespace{
++ 111111111111111111;
++ }
++ namespace test{
++ 111111111111111111;
++ }
++ namespace {
++ 111111111111111111;
++ }
++ namespace test {
++ 111111111111111111;
++ namespace test2 {
++ 22222222222222222;
++ }
++ }
++
++ /* invalid namespaces use block indent */
++ namespace test test2 {
++ 111111111111111111111;
++ }
++ namespace11111111111 {
++ 111111111111;
++ }
++ namespace() {
++ 1111111111111;
++ }
++ namespace()
++ {
++ 111111111111111111;
++ }
++ namespace test test2
++ {
++ 1111111111111111111;
++ }
++ namespace111111111
++ {
++ 111111111111111111;
++ }
++
++ void getstring() {
++ /* Raw strings */
++ const char* s = R"(
++ test {
++ # comment
++ field: 123
++ }
++ )";
++ }
++
++ void getstring() {
++ const char* s = R"foo(
++ test {
++ # comment
++ field: 123
++ }
++ )foo";
++ }
++
++ {
++ int a[4] = {
++ [0] = 0,
++ [1] = 1,
++ [2] = 2,
++ [3] = 3,
++ };
++ }
++
++ {
++ a = b[2]
++ + 3;
++ }
++
++ {
++ if (1)
++ /* aaaaa
++ * bbbbb
++ */
++ a = 1;
++ }
++
++ void func()
++ {
++ switch (foo)
++ {
++ case (bar):
++ if (baz())
++ quux();
++ break;
++ case (shmoo):
++ if (!bar)
++ {
++ }
++ case (foo1):
++ switch (bar)
++ {
++ case baz:
++ baz_f();
++ break;
++ }
++ break;
++ default:
++ baz();
++ baz();
++ break;
++ }
++ }
++
++ /* end of AUTO */
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('start of AUTO')
++ exe "normal =/end of AUTO\<CR>"
++
++ let expected =<< trim [CODE]
++ /* start of AUTO matically checked vim: set ts=4 : */
++ {
++ if (test)
++ cmd1;
++ cmd2;
++ }
++
++ {
++ if (test)
++ cmd1;
++ else
++ cmd2;
++ }
++
++ {
++ if (test)
++ {
++ cmd1;
++ cmd2;
++ }
++ }
++
++ {
++ if (test)
++ {
++ cmd1;
++ else
++ }
++ }
++
++ {
++ while (this)
++ if (test)
++ cmd1;
++ cmd2;
++ }
++
++ {
++ while (this)
++ if (test)
++ cmd1;
++ else
++ cmd2;
++ }
++
++ {
++ if (test)
++ {
++ cmd;
++ }
++
++ if (test)
++ cmd;
++ }
++
++ {
++ if (test) {
++ cmd;
++ }
++
++ if (test) cmd;
++ }
++
++ {
++ cmd1;
++ for (blah)
++ while (this)
++ if (test)
++ cmd2;
++ cmd3;
++ }
++
++ {
++ cmd1;
++ for (blah)
++ while (this)
++ if (test)
++ cmd2;
++ cmd3;
++
++ if (test)
++ {
++ cmd1;
++ cmd2;
++ cmd3;
++ }
++ }
++
++
++ /* Test for 'cindent' do/while mixed with if/else: */
++
++ {
++ do
++ if (asdf)
++ asdfasd;
++ while (cond);
++
++ do
++ if (asdf)
++ while (asdf)
++ asdf;
++ while (asdf);
++ }
++
++ /* Test for 'cindent' with two ) on a continuation line */
++ {
++ if (asdfasdf;asldkfj asdlkfj as;ldkfj sal;d
++ aal;sdkjf ( ;asldfkja;sldfk
++ al;sdjfka ;slkdf ) sa;ldkjfsa dlk;)
++ line up here;
++ }
++
++
++ /* C++ tests: */
++
++ // foo() these three lines should remain in column 0
++ // {
++ // }
++
++ /* Test for continuation and unterminated lines: */
++ {
++ i = 99 + 14325 +
++ 21345 +
++ 21345 +
++ 21345 + ( 21345 +
++ 21345) +
++ 2345 +
++ 1234;
++ c = 1;
++ }
++
++ /*
++ testje for indent with empty line
++
++ here */
++
++ {
++ if (testing &&
++ not a joke ||
++ line up here)
++ hay;
++ if (testing &&
++ (not a joke || testing
++ )line up here)
++ hay;
++ if (testing &&
++ (not a joke || testing
++ line up here))
++ hay;
++ }
++
++
++ {
++ switch (c)
++ {
++ case xx:
++ do
++ if (asdf)
++ do
++ asdfasdf;
++ while (asdf);
++ else
++ asdfasdf;
++ while (cond);
++ case yy:
++ case xx:
++ case zz:
++ testing;
++ }
++ }
++
++ {
++ if (cond) {
++ foo;
++ }
++ else
++ {
++ bar;
++ }
++ }
++
++ {
++ if (alskdfj ;alsdkfjal;skdjf (;sadlkfsa ;dlkf j;alksdfj ;alskdjf
++ alsdkfj (asldk;fj
++ awith cino=(0 ;lf this one goes to below the paren with ==
++ ;laksjfd ;lsakdjf ;alskdf asd)
++ asdfasdf;)))
++ asdfasdf;
++ }
++
++ int
++ func(a, b)
++ int a;
++ int c;
++ {
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3)
++ )
++ }
++
++ {
++ while (asd)
++ {
++ if (asdf)
++ if (test)
++ if (that)
++ {
++ if (asdf)
++ do
++ cdasd;
++ while (as
++ df);
++ }
++ else
++ if (asdf)
++ asdf;
++ else
++ asdf;
++ asdf;
++ }
++ }
++
++ {
++ s = "/*"; b = ';'
++ s = "/*"; b = ';';
++ a = b;
++ }
++
++ {
++ switch (a)
++ {
++ case a:
++ switch (t)
++ {
++ case 1:
++ cmd;
++ break;
++ case 2:
++ cmd;
++ break;
++ }
++ cmd;
++ break;
++ case b:
++ {
++ int i;
++ cmd;
++ }
++ break;
++ case c: {
++ int i;
++ cmd;
++ }
++ case d: if (cond &&
++ test) { /* this line doesn't work right */
++ int i;
++ cmd;
++ }
++ break;
++ }
++ }
++
++ {
++ if (!(vim_strchr(p_cpo, CPO_BUFOPTGLOB) != NULL && entering) &&
++ (bp_to->b_p_initialized ||
++ (!entering && vim_strchr(p_cpo, CPO_BUFOPT) != NULL)))
++ return;
++ label :
++ asdf = asdf ?
++ asdf : asdf;
++ asdf = asdf ?
++ asdf: asdf;
++ }
++
++ /* Special Comments : This function has the added complexity (compared */
++ /* : to addtolist) of having to check for a detail */
++ /* : texture and add that to the list first. */
++
++ char *(array[100]) = {
++ "testje",
++ "foo",
++ "bar",
++ }
++
++ enum soppie
++ {
++ yes = 0,
++ no,
++ maybe
++ };
++
++ typedef enum soppie
++ {
++ yes = 0,
++ no,
++ maybe
++ };
++
++ static enum
++ {
++ yes = 0,
++ no,
++ maybe
++ } soppie;
++
++ public static enum
++ {
++ yes = 0,
++ no,
++ maybe
++ } soppie;
++
++ static private enum
++ {
++ yes = 0,
++ no,
++ maybe
++ } soppie;
++
++ {
++ int a,
++ b;
++ }
++
++ {
++ struct Type
++ {
++ int i;
++ char *str;
++ } var[] =
++ {
++ 0, "zero",
++ 1, "one",
++ 2, "two",
++ 3, "three"
++ };
++
++ float matrix[3][3] =
++ {
++ {
++ 0,
++ 1,
++ 2
++ },
++ {
++ 3,
++ 4,
++ 5
++ },
++ {
++ 6,
++ 7,
++ 8
++ }
++ };
++ }
++
++ {
++ /* blah ( blah */
++ /* where does this go? */
++
++ /* blah ( blah */
++ cmd;
++
++ func(arg1,
++ /* comment */
++ arg2);
++ a;
++ {
++ b;
++ {
++ c; /* Hey, NOW it indents?! */
++ }
++ }
++
++ {
++ func(arg1,
++ arg2,
++ arg3);
++ /* Hey, what am I doing here? Is this coz of the ","? */
++ }
++ }
++
++ main ()
++ {
++ if (cond)
++ {
++ a = b;
++ }
++ if (cond) {
++ a = c;
++ }
++ if (cond)
++ a = d;
++ return;
++ }
++
++ {
++ case 2: if (asdf &&
++ asdfasdf)
++ aasdf;
++ a = 9;
++ case 3: if (asdf)
++ aasdf;
++ a = 9;
++ case 4: x = 1;
++ y = 2;
++
++ label: if (asdf)
++ here;
++
++ label: if (asdf &&
++ asdfasdf)
++ {
++ }
++
++ label: if (asdf &&
++ asdfasdf) {
++ there;
++ }
++
++ label: if (asdf &&
++ asdfasdf)
++ there;
++ }
++
++ {
++ /*
++ hello with ":set comments= cino=c5"
++ */
++
++ /*
++ hello with ":set comments= cino="
++ */
++ }
++
++
++ {
++ if (a < b) {
++ a = a + 1;
++ } else
++ a = a + 2;
++
++ if (a)
++ do {
++ testing;
++ } while (asdfasdf);
++ a = b + 1;
++ asdfasdf
++ }
++
++ {
++ for ( int i = 0;
++ i < 10; i++ )
++ {
++ }
++ i = 0;
++ }
++
++ class bob
++ {
++ int foo() {return 1;}
++ int bar;
++ }
++
++ main()
++ {
++ while(1)
++ if (foo)
++ {
++ bar;
++ }
++ else {
++ asdf;
++ }
++ misplacedline;
++ }
++
++ {
++ if (clipboard.state == SELECT_DONE
++ && ((row == clipboard.start.lnum
++ && col >= clipboard.start.col)
++ || row > clipboard.start.lnum))
++ }
++
++ {
++ if (1) {i += 4;}
++ where_am_i;
++ return 0;
++ }
++
++ {
++ {
++ } // sdf(asdf
++ if (asdf)
++ asd;
++ }
++
++ {
++ label1:
++ label2:
++ }
++
++ {
++ int fooRet = foo(pBar1, false /*fKB*/,
++ true /*fPTB*/, 3 /*nT*/, false /*fDF*/);
++ f() {
++ for ( i = 0;
++ i < m;
++ /* c */ i++ ) {
++ a = b;
++ }
++ }
++ }
++
++ {
++ f1(/*comment*/);
++ f2();
++ }
++
++ {
++ do {
++ if (foo) {
++ } else
++ ;
++ } while (foo);
++ foo(); // was wrong
++ }
++
++ int x; // no extra indent because of the ;
++ void func()
++ {
++ }
++
++ char *tab[] = {"aaa",
++ "};", /* }; */ NULL}
++ int indented;
++ {}
++
++ char *a[] = {"aaa", "bbb",
++ "ccc", NULL};
++ // here
++
++ char *tab[] = {"aaa",
++ "xx", /* xx */}; /* asdf */
++ int not_indented;
++
++ {
++ do {
++ switch (bla)
++ {
++ case 1: if (foo)
++ bar;
++ }
++ } while (boo);
++ wrong;
++ }
++
++ int foo,
++ bar;
++ int foo;
++
++ #if defined(foo) \
++ && defined(bar)
++ char * xx = "asdf\
++ foo\
++ bor";
++ int x;
++
++ char *foo = "asdf\
++ asdf\
++ asdf",
++ *bar;
++
++ void f()
++ {
++ #if defined(foo) \
++ && defined(bar)
++ char *foo = "asdf\
++ asdf\
++ asdf",
++ *bar;
++ {
++ int i;
++ char *foo = "asdf\
++ asdf\
++ asdf",
++ *bar;
++ }
++ #endif
++ }
++ #endif
++
++ int y; // comment
++ // comment
++
++ // comment
++
++ {
++ Constructor(int a,
++ int b ) : BaseClass(a)
++ {
++ }
++ }
++
++ void foo()
++ {
++ char one,
++ two;
++ struct bla piet,
++ jan;
++ enum foo kees,
++ jannie;
++ static unsigned sdf,
++ krap;
++ unsigned int piet,
++ jan;
++ int
++ kees,
++ jan;
++ }
++
++ {
++ t(int f,
++ int d); // )
++ d();
++ }
++
++ Constructor::Constructor(int a,
++ int b
++ ) :
++ BaseClass(a,
++ b,
++ c),
++ mMember(b),
++ {
++ }
++
++ Constructor::Constructor(int a,
++ int b ) :
++ BaseClass(a)
++ {
++ }
++
++ Constructor::Constructor(int a,
++ int b ) /*x*/ : /*x*/ BaseClass(a),
++ member(b)
++ {
++ }
++
++ A::A(int a, int b)
++ : aa(a),
++ bb(b),
++ cc(c)
++ {
++ }
++
++ class CAbc :
++ public BaseClass1,
++ protected BaseClass2
++ {
++ int Test() { return FALSE; }
++ int Test1() { return TRUE; }
++
++ CAbc(int a, int b ) :
++ BaseClass(a)
++ {
++ switch(xxx)
++ {
++ case abc:
++ asdf();
++ break;
++
++ case 999:
++ baer();
++ break;
++ }
++ }
++
++ public: // <-- this was incoreectly indented before!!
++ void testfall();
++ protected:
++ void testfall();
++ };
++
++ class CAbc : public BaseClass1,
++ protected BaseClass2
++ {
++ };
++
++ static struct
++ {
++ int a;
++ int b;
++ } variable[COUNT] =
++ {
++ {
++ 123,
++ 456
++ },
++ {
++ 123,
++ 456
++ }
++ };
++
++ static struct
++ {
++ int a;
++ int b;
++ } variable[COUNT] =
++ {
++ { 123, 456 },
++ { 123, 456 }
++ };
++
++ void asdf() /* ind_maxparen may cause trouble here */
++ {
++ if ((0
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1
++ && 1)) break;
++ }
++
++ foo()
++ {
++ a = cond ? foo() : asdf
++ + asdf;
++
++ a = cond ?
++ foo() : asdf
++ + asdf;
++ }
++
++ int main(void)
++ {
++ if (a)
++ if (b)
++ 2;
++ else 3;
++ next_line_of_code();
++ }
++
++ barry()
++ {
++ Foo::Foo (int one,
++ int two)
++ : something(4)
++ {}
++ }
++
++ barry()
++ {
++ Foo::Foo (int one, int two)
++ : something(4)
++ {}
++ }
++
++ Constructor::Constructor(int a,
++ int b
++ ) :
++ BaseClass(a,
++ b,
++ c),
++ mMember(b)
++ {
++ }
++ int main ()
++ {
++ if (lala)
++ do
++ ++(*lolo);
++ while (lili
++ && lele);
++ lulu;
++ }
++
++ int main ()
++ {
++ switch (c)
++ {
++ case 'c': if (cond)
++ {
++ }
++ }
++ }
++
++ main()
++ {
++ (void) MyFancyFuasdfadsfnction(
++ argument);
++ }
++
++ main()
++ {
++ char foo[] = "/*";
++ /* as
++ df */
++ hello
++ }
++
++ /* valid namespaces with normal indent */
++ namespace
++ {
++ {
++ 111111111111;
++ }
++ }
++ namespace /* test */
++ {
++ 11111111111111111;
++ }
++ namespace // test
++ {
++ 111111111111111111;
++ }
++ namespace
++ {
++ 111111111111111111;
++ }
++ namespace test
++ {
++ 111111111111111111;
++ }
++ namespace{
++ 111111111111111111;
++ }
++ namespace test{
++ 111111111111111111;
++ }
++ namespace {
++ 111111111111111111;
++ }
++ namespace test {
++ 111111111111111111;
++ namespace test2 {
++ 22222222222222222;
++ }
++ }
++
++ /* invalid namespaces use block indent */
++ namespace test test2 {
++ 111111111111111111111;
++ }
++ namespace11111111111 {
++ 111111111111;
++ }
++ namespace() {
++ 1111111111111;
++ }
++ namespace()
++ {
++ 111111111111111111;
++ }
++ namespace test test2
++ {
++ 1111111111111111111;
++ }
++ namespace111111111
++ {
++ 111111111111111111;
++ }
++
++ void getstring() {
++ /* Raw strings */
++ const char* s = R"(
++ test {
++ # comment
++ field: 123
++ }
++ )";
++ }
++
++ void getstring() {
++ const char* s = R"foo(
++ test {
++ # comment
++ field: 123
++ }
++ )foo";
++ }
++
++ {
++ int a[4] = {
++ [0] = 0,
++ [1] = 1,
++ [2] = 2,
++ [3] = 3,
++ };
++ }
++
++ {
++ a = b[2]
++ + 3;
++ }
++
++ {
++ if (1)
++ /* aaaaa
++ * bbbbb
++ */
++ a = 1;
++ }
++
++ void func()
++ {
++ switch (foo)
++ {
++ case (bar):
++ if (baz())
++ quux();
++ break;
++ case (shmoo):
++ if (!bar)
++ {
++ }
++ case (foo1):
++ switch (bar)
++ {
++ case baz:
++ baz_f();
++ break;
++ }
++ break;
++ default:
++ baz();
++ baz();
++ break;
++ }
++ }
++
++ /* end of AUTO */
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_2()
++ new
++ setl cindent ts=4 sw=4
++ setl tw=0 noai fo=croq
++ let &wm = &columns - 20
++
++ let code =<< trim [CODE]
++ {
++
++ /* this is
++ * a real serious important big
++ * comment
++ */
++ /* insert " about life, the universe, and the rest" after "serious" */
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('serious', 'e')
++ normal a about life, the universe, and the rest
++
++ let expected =<< trim [CODE]
++ {
++
++ /* this is
++ * a real serious
++ * about life, the
++ * universe, and the
++ * rest important big
++ * comment
++ */
++ /* insert " about life, the universe, and the rest" after "serious" */
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ set wm&
++ enew! | close
++ endfunc
++
++ func Test_cindent_3()
++ new
++ setl nocindent ts=4 sw=4
++
++ let code =<< trim [CODE]
++ {
++ /*
++ * Testing for comments, without 'cin' set
++ */
++
++ /*
++ * what happens here?
++ */
++
++ /*
++ the end of the comment, try inserting a line below */
++
++ /* how about
++ this one */
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('comments')
++ normal joabout life
++ call search('happens')
++ normal jothere
++ call search('below')
++ normal oline
++ call search('this')
++ normal Ohello
++
++ let expected =<< trim [CODE]
++ {
++ /*
++ * Testing for comments, without 'cin' set
++ */
++ about life
++
++ /*
++ * what happens here?
++ */
++ there
++
++ /*
++ the end of the comment, try inserting a line below */
++ line
++
++ /* how about
++ hello
++ this one */
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_4()
++ new
++ setl cindent ts=4 sw=4
++
++ let code =<< trim [CODE]
++ {
++ var = this + that + vec[0] * vec[0]
++ + vec[1] * vec[1]
++ + vec2[2] * vec[2];
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('vec2')
++ normal ==
++
++ let expected =<< trim [CODE]
++ {
++ var = this + that + vec[0] * vec[0]
++ + vec[1] * vec[1]
++ + vec2[2] * vec[2];
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_5()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=}4
++
++ let code =<< trim [CODE]
++ {
++ asdf asdflkajds f;
++ if (tes & ting) {
++ asdf asdf asdf ;
++ asdfa sdf asdf;
++ }
++ testing1;
++ if (tes & ting)
++ {
++ asdf asdf asdf ;
++ asdfa sdf asdf;
++ }
++ testing2;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('testing1')
++ exe "normal k2==/testing2\<CR>"
++ normal k2==
++
++ let expected =<< trim [CODE]
++ {
++ asdf asdflkajds f;
++ if (tes & ting) {
++ asdf asdf asdf ;
++ asdfa sdf asdf;
++ }
++ testing1;
++ if (tes & ting)
++ {
++ asdf asdf asdf ;
++ asdfa sdf asdf;
++ }
++ testing2;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_6()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=(0,)20
++
++ let code =<< trim [CODE]
++ main ( int first_par, /*
++ * Comment for
++ * first par
++ */
++ int second_par /*
++ * Comment for
++ * second par
++ */
++ )
++ {
++ func( first_par, /*
++ * Comment for
++ * first par
++ */
++ second_par /*
++ * Comment for
++ * second par
++ */
++ );
++
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('main')
++ normal =][
++
++ let expected =<< trim [CODE]
++ main ( int first_par, /*
++ * Comment for
++ * first par
++ */
++ int second_par /*
++ * Comment for
++ * second par
++ */
++ )
++ {
++ func( first_par, /*
++ * Comment for
++ * first par
++ */
++ second_par /*
++ * Comment for
++ * second par
++ */
++ );
++
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_7()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=es,n0s
++
++ let code =<< trim [CODE]
++ main(void)
++ {
++ /* Make sure that cino=X0s is not parsed like cino=Xs. */
++ if (cond)
++ foo();
++ else
++ {
++ bar();
++ }
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('main')
++ normal =][
++
++ let expected =<< trim [CODE]
++ main(void)
++ {
++ /* Make sure that cino=X0s is not parsed like cino=Xs. */
++ if (cond)
++ foo();
++ else
++ {
++ bar();
++ }
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_8()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=
++
++ let code =<< trim [CODE]
++
++ {
++ do
++ {
++ if ()
++ {
++ if ()
++ asdf;
++ else
++ asdf;
++ }
++ } while ();
++ cmd; /* this should go under the } */
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++
++ {
++ do
++ {
++ if ()
++ {
++ if ()
++ asdf;
++ else
++ asdf;
++ }
++ } while ();
++ cmd; /* this should go under the } */
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_9()
++ new
++ setl cindent ts=4 sw=4
++
++ let code =<< trim [CODE]
++
++ void f()
++ {
++ if ( k() ) {
++ l();
++
++ } else { /* Start (two words) end */
++ m();
++ }
++
++ n();
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++
++ void f()
++ {
++ if ( k() ) {
++ l();
++
++ } else { /* Start (two words) end */
++ m();
++ }
++
++ n();
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_10()
++ new
++ setl cindent ts=4 sw=4
++ setl cino={s,e-s
++
++ let code =<< trim [CODE]
++
++ void f()
++ {
++ if ( k() )
++ {
++ l();
++ } else { /* Start (two words) end */
++ m();
++ }
++ n(); /* should be under the if () */
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++
++ void f()
++ {
++ if ( k() )
++ {
++ l();
++ } else { /* Start (two words) end */
++ m();
++ }
++ n(); /* should be under the if () */
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_11()
++ new
++ setl cindent ts=4 sw=4
++ setl cino={s,fs
++
++ let code =<< trim [CODE]
++ void bar(void)
++ {
++ static array[2][2] =
++ {
++ { 1, 2 },
++ { 3, 4 },
++ }
++
++ while (a)
++ {
++ foo(&a);
++ }
++
++ {
++ int a;
++ {
++ a = a + 1;
++ }
++ }
++ b = a;
++ }
++
++ void func(void)
++ {
++ a = 1;
++ {
++ b = 2;
++ }
++ c = 3;
++ d = 4;
++ }
++ /* foo */
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ exe "normal ]]=/ foo\<CR>"
++
++ let expected =<< trim [CODE]
++ void bar(void)
++ {
++ static array[2][2] =
++ {
++ { 1, 2 },
++ { 3, 4 },
++ }
++
++ while (a)
++ {
++ foo(&a);
++ }
++
++ {
++ int a;
++ {
++ a = a + 1;
++ }
++ }
++ b = a;
++ }
++
++ void func(void)
++ {
++ a = 1;
++ {
++ b = 2;
++ }
++ c = 3;
++ d = 4;
++ }
++ /* foo */
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_12()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=
++
++ let code =<< trim [CODE]
++ a()
++ {
++ do {
++ a = a +
++ a;
++ } while ( a ); /* add text under this line */
++ if ( a )
++ a;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('while')
++ normal ohere
++
++ let expected =<< trim [CODE]
++ a()
++ {
++ do {
++ a = a +
++ a;
++ } while ( a ); /* add text under this line */
++ here
++ if ( a )
++ a;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_13()
++ new
++ setl cindent ts=4 sw=4
++ setl cino= com=
++
++ let code =<< trim [CODE]
++ a()
++ {
++ label1:
++ /* hmm */
++ // comment
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('comment')
++ exe "normal olabel2: b();\rlabel3 /* post */:\r/* pre */ label4:\r" .
++ \ "f(/*com*/);\rif (/*com*/)\rcmd();"
++
++ let expected =<< trim [CODE]
++ a()
++ {
++ label1:
++ /* hmm */
++ // comment
++ label2: b();
++ label3 /* post */:
++ /* pre */ label4:
++ f(/*com*/);
++ if (/*com*/)
++ cmd();
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_14()
++ new
++ setl cindent ts=4 sw=4
++ setl comments& comments^=s:/*,m:**,ex:*/
++
++ let code =<< trim [CODE]
++ /*
++ * A simple comment
++ */
++
++ /*
++ ** A different comment
++ */
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('simple')
++ normal =5j
++
++ let expected =<< trim [CODE]
++ /*
++ * A simple comment
++ */
++
++ /*
++ ** A different comment
++ */
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_15()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=c0
++ setl comments& comments-=s1:/* comments^=s0:/*
++
++ let code =<< trim [CODE]
++ void f()
++ {
++
++ /*********
++ A comment.
++ *********/
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++
++ /*********
++ A comment.
++ *********/
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_16()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=c0,C1
++ setl comments& comments-=s1:/* comments^=s0:/*
++
++ let code =<< trim [CODE]
++ void f()
++ {
++
++ /*********
++ A comment.
++ *********/
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++
++ /*********
++ A comment.
++ *********/
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_17()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=
++
++ let code =<< trim [CODE]
++ void f()
++ {
++ c = c1 &&
++ (
++ c2 ||
++ c3
++ ) && c4;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++ c = c1 &&
++ (
++ c2 ||
++ c3
++ ) && c4;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_18()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=(s
++
++ let code =<< trim [CODE]
++ void f()
++ {
++ c = c1 &&
++ (
++ c2 ||
++ c3
++ ) && c4;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++ c = c1 &&
++ (
++ c2 ||
++ c3
++ ) && c4;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_19()
++ new
++ setl cindent ts=4 sw=4
++ set cino=(s,U1
++
++ let code =<< trim [CODE]
++ void f()
++ {
++ c = c1 &&
++ (
++ c2 ||
++ c3
++ ) && c4;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++ c = c1 &&
++ (
++ c2 ||
++ c3
++ ) && c4;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_20()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=(0
++
++ let code =<< trim [CODE]
++ void f()
++ {
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_21()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=(0,w1
++
++ let code =<< trim [CODE]
++ void f()
++ {
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_22()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=(s
++
++ let code =<< trim [CODE]
++ void f()
++ {
++ c = c1 && (
++ c2 ||
++ c3
++ ) && c4;
++ if (
++ c1 && c2
++ )
++ foo;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++ c = c1 && (
++ c2 ||
++ c3
++ ) && c4;
++ if (
++ c1 && c2
++ )
++ foo;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_23()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=(s,m1
++
++ let code =<< trim [CODE]
++ void f()
++ {
++ c = c1 && (
++ c2 ||
++ c3
++ ) && c4;
++ if (
++ c1 && c2
++ )
++ foo;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++ c = c1 && (
++ c2 ||
++ c3
++ ) && c4;
++ if (
++ c1 && c2
++ )
++ foo;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_24()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=b1
++
++ let code =<< trim [CODE]
++ void f()
++ {
++ switch (x)
++ {
++ case 1:
++ a = b;
++ break;
++ default:
++ a = 0;
++ break;
++ }
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++ switch (x)
++ {
++ case 1:
++ a = b;
++ break;
++ default:
++ a = 0;
++ break;
++ }
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_25()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=(0,W5
++
++ let code =<< trim [CODE]
++ void f()
++ {
++ invokeme(
++ argu,
++ ment);
++ invokeme(
++ argu,
++ ment
++ );
++ invokeme(argu,
++ ment
++ );
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++ invokeme(
++ argu,
++ ment);
++ invokeme(
++ argu,
++ ment
++ );
++ invokeme(argu,
++ ment
++ );
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_26()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=/6
++
++ let code =<< trim [CODE]
++ void f()
++ {
++ statement;
++ // comment 1
++ // comment 2
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++ statement;
++ // comment 1
++ // comment 2
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_27()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=
++
++ let code =<< trim [CODE]
++ void f()
++ {
++ statement;
++ // comment 1
++ // comment 2
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ exe "normal ]]/comment 1/+1\<CR>=="
++
++ let expected =<< trim [CODE]
++ void f()
++ {
++ statement;
++ // comment 1
++ // comment 2
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_28()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=g0
++
++ let code =<< trim [CODE]
++ class CAbc
++ {
++ int Test() { return FALSE; }
++
++ public: // comment
++ void testfall();
++ protected:
++ void testfall();
++ };
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ class CAbc
++ {
++ int Test() { return FALSE; }
++
++ public: // comment
++ void testfall();
++ protected:
++ void testfall();
++ };
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_29()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=(0,gs,hs
++
++ let code =<< trim [CODE]
++ class Foo : public Bar
++ {
++ public:
++ virtual void method1(void) = 0;
++ virtual void method2(int arg1,
++ int arg2,
++ int arg3) = 0;
++ };
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ class Foo : public Bar
++ {
++ public:
++ virtual void method1(void) = 0;
++ virtual void method2(int arg1,
++ int arg2,
++ int arg3) = 0;
++ };
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_30()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=+20
++
++ let code =<< trim [CODE]
++ void
++ foo()
++ {
++ if (a)
++ {
++ } else
++ asdf;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void
++ foo()
++ {
++ if (a)
++ {
++ } else
++ asdf;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_31()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=(0,W2s
++
++ let code =<< trim [CODE]
++
++ {
++ averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd(
++ asdasdf,
++ func(asdf,
++ asdfadsf),
++ asdfasdf
++ );
++
++ /* those are ugly, but consequent */
++
++ func()->asd(asdasdf,
++ averylongfunctionname(
++ abc,
++ dec)->averylongfunctionname(
++ asdfadsf,
++ asdfasdf,
++ asdfasdf,
++ ),
++ func(asdfadf,
++ asdfasdf
++ ),
++ asdasdf
++ );
++
++ averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf(
++ abc,
++ dec)->asdfasdfasdf(
++ asdfadsf,
++ asdfasdf,
++ asdfasdf,
++ ),
++ func(asdfadf,
++ asdfasdf),
++ asdasdf
++ );
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++
++ {
++ averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd(
++ asdasdf,
++ func(asdf,
++ asdfadsf),
++ asdfasdf
++ );
++
++ /* those are ugly, but consequent */
++
++ func()->asd(asdasdf,
++ averylongfunctionname(
++ abc,
++ dec)->averylongfunctionname(
++ asdfadsf,
++ asdfasdf,
++ asdfasdf,
++ ),
++ func(asdfadf,
++ asdfasdf
++ ),
++ asdasdf
++ );
++
++ averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf(
++ abc,
++ dec)->asdfasdfasdf(
++ asdfadsf,
++ asdfasdf,
++ asdfasdf,
++ ),
++ func(asdfadf,
++ asdfasdf),
++ asdasdf
++ );
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_32()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=M1
++
++ let code =<< trim [CODE]
++ int main ()
++ {
++ if (cond1 &&
++ cond2
++ )
++ foo;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ int main ()
++ {
++ if (cond1 &&
++ cond2
++ )
++ foo;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_33()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=(0,ts
++
++ let code =<< trim [CODE]
++ void func(int a
++ #if defined(FOO)
++ , int b
++ , int c
++ #endif
++ )
++ {
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal 2j=][
++
++ let expected =<< trim [CODE]
++ void func(int a
++ #if defined(FOO)
++ , int b
++ , int c
++ #endif
++ )
++ {
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_34()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=(0
++
++ let code =<< trim [CODE]
++
++ void
++ func(int a
++ #if defined(FOO)
++ , int b
++ , int c
++ #endif
++ )
++ {
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal =][
++
++ let expected =<< trim [CODE]
++
++ void
++ func(int a
++ #if defined(FOO)
++ , int b
++ , int c
++ #endif
++ )
++ {
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_35()
++ new
++ setl cindent ts=4 sw=4
++ setl cino&
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ if(x==y)
++ if(y==z)
++ foo=1;
++ else { bar=1;
++ baz=2;
++ }
++ printf("Foo!\n");
++ }
++
++ void func1(void)
++ {
++ char* tab[] = {"foo", "bar",
++ "baz", "quux",
++ "this line used", "to be indented incorrectly"};
++ foo();
++ }
++
++ void func2(void)
++ {
++ int tab[] =
++ {1, 2,
++ 3, 4,
++ 5, 6};
++
++ printf("This line used to be indented incorrectly.\n");
++ }
++
++ int foo[]
++ #ifdef BAR
++
++ = { 1, 2, 3,
++ 4, 5, 6 }
++
++ #endif
++ ;
++ int baz;
++
++ void func3(void)
++ {
++ int tab[] = {
++ 1, 2,
++ 3, 4,
++ 5, 6};
++
++ printf("Don't you dare indent this line incorrectly!\n");
++ }
++
++ void
++ func4(a, b,
++ c)
++ int a;
++ int b;
++ int c;
++ {
++ }
++
++ void
++ func5(
++ int a,
++ int b)
++ {
++ }
++
++ void
++ func6(
++ int a)
++ {
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=7][
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ if(x==y)
++ if(y==z)
++ foo=1;
++ else { bar=1;
++ baz=2;
++ }
++ printf("Foo!\n");
++ }
++
++ void func1(void)
++ {
++ char* tab[] = {"foo", "bar",
++ "baz", "quux",
++ "this line used", "to be indented incorrectly"};
++ foo();
++ }
++
++ void func2(void)
++ {
++ int tab[] =
++ {1, 2,
++ 3, 4,
++ 5, 6};
++
++ printf("This line used to be indented incorrectly.\n");
++ }
++
++ int foo[]
++ #ifdef BAR
++
++ = { 1, 2, 3,
++ 4, 5, 6 }
++
++ #endif
++ ;
++ int baz;
++
++ void func3(void)
++ {
++ int tab[] = {
++ 1, 2,
++ 3, 4,
++ 5, 6};
++
++ printf("Don't you dare indent this line incorrectly!\n");
++ }
++
++ void
++ func4(a, b,
++ c)
++ int a;
++ int b;
++ int c;
++ {
++ }
++
++ void
++ func5(
++ int a,
++ int b)
++ {
++ }
++
++ void
++ func6(
++ int a)
++ {
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_36()
++ new
++ setl cindent ts=4 sw=4
++ setl cino&
++ setl cino+=l1
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ int tab[] =
++ {
++ 1, 2, 3,
++ 4, 5, 6};
++
++ printf("Indent this line correctly!\n");
++
++ switch (foo)
++ {
++ case bar:
++ printf("bar");
++ break;
++ case baz: {
++ printf("baz");
++ break;
++ }
++ case quux:
++ printf("But don't break the indentation of this instruction\n");
++ break;
++ }
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ int tab[] =
++ {
++ 1, 2, 3,
++ 4, 5, 6};
++
++ printf("Indent this line correctly!\n");
++
++ switch (foo)
++ {
++ case bar:
++ printf("bar");
++ break;
++ case baz: {
++ printf("baz");
++ break;
++ }
++ case quux:
++ printf("But don't break the indentation of this instruction\n");
++ break;
++ }
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_37()
++ new
++ setl cindent ts=4 sw=4
++ setl cino&
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ cout << "a"
++ << "b"
++ << ") :"
++ << "c";
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ cout << "a"
++ << "b"
++ << ") :"
++ << "c";
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_38()
++ new
++ setl cindent ts=4 sw=4
++ setl com=s1:/*,m:*,ex:*/
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ /*
++ * This is a comment.
++ */
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]3jofoo();
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ /*
++ * This is a comment.
++ */
++ foo();
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_39()
++ new
++ setl cindent ts=4 sw=4
++ setl cino&
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ for (int i = 0; i < 10; ++i)
++ if (i & 1) {
++ foo(1);
++ } else
++ foo(0);
++ baz();
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ for (int i = 0; i < 10; ++i)
++ if (i & 1) {
++ foo(1);
++ } else
++ foo(0);
++ baz();
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_40()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=k2s,(0
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++ func( c1
++ && ( c2
++ || c3))
++ foo;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++ func( c1
++ && ( c2
++ || c3))
++ foo;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_41()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=k2s,(s
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++ func( c1
++ && ( c2
++ || c3))
++ foo;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++ func( c1
++ && ( c2
++ || c3))
++ foo;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_42()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=k2s,(s,U1
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++ if (c123456789
++ && (c22345
++ || c3))
++ printf("foo\n");
++
++ c = c1 &&
++ (
++ c2 ||
++ c3
++ ) && c4;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++ if (c123456789
++ && (c22345
++ || c3))
++ printf("foo\n");
++
++ c = c1 &&
++ (
++ c2 ||
++ c3
++ ) && c4;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_43()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=k2s,(0,W4
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++ if (c123456789
++ && (c22345
++ || c3))
++ printf("foo\n");
++
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++
++ a_long_line(
++ argument,
++ argument);
++ a_short_line(argument,
++ argument);
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++ if (c123456789
++ && (c22345
++ || c3))
++ printf("foo\n");
++
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++
++ a_long_line(
++ argument,
++ argument);
++ a_short_line(argument,
++ argument);
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_44()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=k2s,u2
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++ if (c123456789
++ && (c22345
++ || c3))
++ printf("foo\n");
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++ if (c123456789
++ && (c22345
++ || c3))
++ printf("foo\n");
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_45()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=k2s,(0,w1
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++ if (c123456789
++ && (c22345
++ || c3))
++ printf("foo\n");
++
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++ func( c1
++ && ( c2
++ || c3))
++ foo;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++ if (c123456789
++ && (c22345
++ || c3))
++ printf("foo\n");
++
++ if ( c1
++ && ( c2
++ || c3))
++ foo;
++ func( c1
++ && ( c2
++ || c3))
++ foo;
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_46()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=k2,(s
++
++ let code =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ normal ]]=][
++
++ let expected =<< trim [CODE]
++ void func(void)
++ {
++ if (condition1
++ && condition2)
++ action();
++ function(argument1
++ && argument2);
++
++ if (c1 && (c2 ||
++ c3))
++ foo;
++ if (c1 &&
++ (c2 || c3))
++ {
++ }
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_47()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=N-s
++
++ let code =<< trim [CODE]
++ NAMESPACESTART
++ /* valid namespaces with normal indent */
++ namespace
++ {
++ {
++ 111111111111;
++ }
++ }
++ namespace /* test */
++ {
++ 11111111111111111;
++ }
++ namespace // test
++ {
++ 111111111111111111;
++ }
++ namespace
++ {
++ 111111111111111111;
++ }
++ namespace test
++ {
++ 111111111111111111;
++ }
++ namespace test::cpp17
++ {
++ 111111111111111111;
++ }
++ namespace ::incorrectcpp17
++ {
++ 111111111111111111;
++ }
++ namespace test::incorrectcpp17::
++ {
++ 111111111111111111;
++ }
++ namespace test:incorrectcpp17
++ {
++ 111111111111111111;
++ }
++ namespace test:::incorrectcpp17
++ {
++ 111111111111111111;
++ }
++ namespace{
++ 111111111111111111;
++ }
++ namespace test{
++ 111111111111111111;
++ }
++ namespace {
++ 111111111111111111;
++ }
++ namespace test {
++ 111111111111111111;
++ namespace test2 {
++ 22222222222222222;
++ }
++ }
++
++ /* invalid namespaces use block indent */
++ namespace test test2 {
++ 111111111111111111111;
++ }
++ namespace11111111111 {
++ 111111111111;
++ }
++ namespace() {
++ 1111111111111;
++ }
++ namespace()
++ {
++ 111111111111111111;
++ }
++ namespace test test2
++ {
++ 1111111111111111111;
++ }
++ namespace111111111
++ {
++ 111111111111111111;
++ }
++ NAMESPACEEND
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('^NAMESPACESTART')
++ exe "normal =/^NAMESPACEEND\n"
++
++ let expected =<< trim [CODE]
++ NAMESPACESTART
++ /* valid namespaces with normal indent */
++ namespace
++ {
++ {
++ 111111111111;
++ }
++ }
++ namespace /* test */
++ {
++ 11111111111111111;
++ }
++ namespace // test
++ {
++ 111111111111111111;
++ }
++ namespace
++ {
++ 111111111111111111;
++ }
++ namespace test
++ {
++ 111111111111111111;
++ }
++ namespace test::cpp17
++ {
++ 111111111111111111;
++ }
++ namespace ::incorrectcpp17
++ {
++ 111111111111111111;
++ }
++ namespace test::incorrectcpp17::
++ {
++ 111111111111111111;
++ }
++ namespace test:incorrectcpp17
++ {
++ 111111111111111111;
++ }
++ namespace test:::incorrectcpp17
++ {
++ 111111111111111111;
++ }
++ namespace{
++ 111111111111111111;
++ }
++ namespace test{
++ 111111111111111111;
++ }
++ namespace {
++ 111111111111111111;
++ }
++ namespace test {
++ 111111111111111111;
++ namespace test2 {
++ 22222222222222222;
++ }
++ }
++
++ /* invalid namespaces use block indent */
++ namespace test test2 {
++ 111111111111111111111;
++ }
++ namespace11111111111 {
++ 111111111111;
++ }
++ namespace() {
++ 1111111111111;
++ }
++ namespace()
++ {
++ 111111111111111111;
++ }
++ namespace test test2
++ {
++ 1111111111111111111;
++ }
++ namespace111111111
++ {
++ 111111111111111111;
++ }
++ NAMESPACEEND
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_48()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=j1,J1
++
++ let code =<< trim [CODE]
++ JSSTART
++ var bar = {
++ foo: {
++ that: this,
++ some: ok,
++ },
++ "bar":{
++ a : 2,
++ b: "123abc",
++ x: 4,
++ "y": 5
++ }
++ }
++ JSEND
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('^JSSTART')
++ exe "normal =/^JSEND\n"
++
++ let expected =<< trim [CODE]
++ JSSTART
++ var bar = {
++ foo: {
++ that: this,
++ some: ok,
++ },
++ "bar":{
++ a : 2,
++ b: "123abc",
++ x: 4,
++ "y": 5
++ }
++ }
++ JSEND
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_49()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=j1,J1
++
++ let code =<< trim [CODE]
++ JSSTART
++ var foo = [
++ 1,
++ 2,
++ 3
++ ];
++ JSEND
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('^JSSTART')
++ exe "normal =/^JSEND\n"
++
++ let expected =<< trim [CODE]
++ JSSTART
++ var foo = [
++ 1,
++ 2,
++ 3
++ ];
++ JSEND
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_50()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=j1,J1
++
++ let code =<< trim [CODE]
++ JSSTART
++ function bar() {
++ var foo = [
++ 1,
++ 2,
++ 3
++ ];
++ }
++ JSEND
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('^JSSTART')
++ exe "normal =/^JSEND\n"
++
++ let expected =<< trim [CODE]
++ JSSTART
++ function bar() {
++ var foo = [
++ 1,
++ 2,
++ 3
++ ];
++ }
++ JSEND
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_51()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=j1,J1
++
++ let code =<< trim [CODE]
++ JSSTART
++ (function($){
++
++ if (cond &&
++ cond) {
++ stmt;
++ }
++ window.something.left =
++ (width - 50 + offset) + "px";
++ var class_name='myclass';
++
++ function private_method() {
++ }
++
++ var public_method={
++ method: function(options,args){
++ private_method();
++ }
++ }
++
++ function init(options) {
++
++ $(this).data(class_name+'_public',$.extend({},{
++ foo: 'bar',
++ bar: 2,
++ foobar: [
++ 1,
++ 2,
++ 3
++ ],
++ callback: function(){
++ return true;
++ }
++ }, options||{}));
++ }
++
++ $.fn[class_name]=function() {
++
++ var _arguments=arguments;
++ return this.each(function(){
++
++ var options=$(this).data(class_name+'_public');
++ if (!options) {
++ init.apply(this,_arguments);
++
++ } else {
++ var method=public_method[_arguments[0]];
++
++ if (typeof(method)!='function') {
++ console.log(class_name+' has no method "'+_arguments[0]+'"');
++ return false;
++ }
++ _arguments[0]=options;
++ method.apply(this,_arguments);
++ }
++ });
++ }
++
++ })(jQuery);
++ JSEND
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('^JSSTART')
++ exe "normal =/^JSEND\n"
++
++ let expected =<< trim [CODE]
++ JSSTART
++ (function($){
++
++ if (cond &&
++ cond) {
++ stmt;
++ }
++ window.something.left =
++ (width - 50 + offset) + "px";
++ var class_name='myclass';
++
++ function private_method() {
++ }
++
++ var public_method={
++ method: function(options,args){
++ private_method();
++ }
++ }
++
++ function init(options) {
++
++ $(this).data(class_name+'_public',$.extend({},{
++ foo: 'bar',
++ bar: 2,
++ foobar: [
++ 1,
++ 2,
++ 3
++ ],
++ callback: function(){
++ return true;
++ }
++ }, options||{}));
++ }
++
++ $.fn[class_name]=function() {
++
++ var _arguments=arguments;
++ return this.each(function(){
++
++ var options=$(this).data(class_name+'_public');
++ if (!options) {
++ init.apply(this,_arguments);
++
++ } else {
++ var method=public_method[_arguments[0]];
++
++ if (typeof(method)!='function') {
++ console.log(class_name+' has no method "'+_arguments[0]+'"');
++ return false;
++ }
++ _arguments[0]=options;
++ method.apply(this,_arguments);
++ }
++ });
++ }
++
++ })(jQuery);
++ JSEND
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_52()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=j1,J1
++
++ let code =<< trim [CODE]
++ JSSTART
++ function init(options) {
++ $(this).data(class_name+'_public',$.extend({},{
++ foo: 'bar',
++ bar: 2,
++ foobar: [
++ 1,
++ 2,
++ 3
++ ],
++ callback: function(){
++ return true;
++ }
++ }, options||{}));
++ }
++ JSEND
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('^JSSTART')
++ exe "normal =/^JSEND\n"
++
++ let expected =<< trim [CODE]
++ JSSTART
++ function init(options) {
++ $(this).data(class_name+'_public',$.extend({},{
++ foo: 'bar',
++ bar: 2,
++ foobar: [
++ 1,
++ 2,
++ 3
++ ],
++ callback: function(){
++ return true;
++ }
++ }, options||{}));
++ }
++ JSEND
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_53()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=j1,J1
++
++ let code =<< trim [CODE]
++ JSSTART
++ (function($){
++ function init(options) {
++ $(this).data(class_name+'_public',$.extend({},{
++ foo: 'bar',
++ bar: 2,
++ foobar: [
++ 1,
++ 2,
++ 3
++ ],
++ callback: function(){
++ return true;
++ }
++ }, options||{}));
++ }
++ })(jQuery);
++ JSEND
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('^JSSTART')
++ exe "normal =/^JSEND\n"
++
++ let expected =<< trim [CODE]
++ JSSTART
++ (function($){
++ function init(options) {
++ $(this).data(class_name+'_public',$.extend({},{
++ foo: 'bar',
++ bar: 2,
++ foobar: [
++ 1,
++ 2,
++ 3
++ ],
++ callback: function(){
++ return true;
++ }
++ }, options||{}));
++ }
++ })(jQuery);
++ JSEND
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_54()
++ new
++ setl cindent ts=4 sw=4
++ setl cino=j1,J1,+2
++
++ let code =<< trim [CODE]
++ JSSTART
++ // Results of JavaScript indent
++ // 1
++ (function(){
++ var a = [
++ 'a',
++ 'b',
++ 'c',
++ 'd',
++ 'e',
++ 'f',
++ 'g',
++ 'h',
++ 'i'
++ ];
++ }())
++
++ // 2
++ (function(){
++ var a = [
++ 0 +
++ 5 *
++ 9 *
++ 'a',
++ 'b',
++ 0 +
++ 5 *
++ 9 *
++ 'c',
++ 'd',
++ 'e',
++ 'f',
++ 'g',
++ 'h',
++ 'i'
++ ];
++ }())
++
++ // 3
++ (function(){
++ var a = [
++ 0 +
++ // comment 1
++ 5 *
++ /* comment 2 */
++ 9 *
++ 'a',
++ 'b',
++ 0 +
++ 5 *
++ 9 *
++ 'c',
++ 'd',
++ 'e',
++ 'f',
++ 'g',
++ 'h',
++ 'i'
++ ];
++ }())
++
++ // 4
++ {
++ var a = [
++ 0,
++ 1
++ ];
++ var b;
++ var c;
++ }
++
++ // 5
++ {
++ var a = [
++ [
++ 0
++ ],
++ 2,
++ 3
++ ];
++ }
++
++ // 6
++ {
++ var a = [
++ [
++ 0,
++ 1
++ ],
++ 2,
++ 3
++ ];
++ }
++
++ // 7
++ {
++ var a = [
++ // [
++ 0,
++ // 1
++ // ],
++ 2,
++ 3
++ ];
++ }
++
++ // 8
++ var x = [
++ (function(){
++ var a,
++ b,
++ c,
++ d,
++ e,
++ f,
++ g,
++ h,
++ i;
++ })
++ ];
++
++ // 9
++ var a = [
++ 0 +
++ 5 *
++ 9 *
++ 'a',
++ 'b',
++ 0 +
++ 5 *
++ 9 *
++ 'c',
++ 'd',
++ 'e',
++ 'f',
++ 'g',
++ 'h',
++ 'i'
++ ];
++
++ // 10
++ var a,
++ b,
++ c,
++ d,
++ e,
++ f,
++ g,
++ h,
++ i;
++ JSEND
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('^JSSTART')
++ exe "normal =/^JSEND\n"
++
++ let expected =<< trim [CODE]
++ JSSTART
++ // Results of JavaScript indent
++ // 1
++ (function(){
++ var a = [
++ 'a',
++ 'b',
++ 'c',
++ 'd',
++ 'e',
++ 'f',
++ 'g',
++ 'h',
++ 'i'
++ ];
++ }())
++
++ // 2
++ (function(){
++ var a = [
++ 0 +
++ 5 *
++ 9 *
++ 'a',
++ 'b',
++ 0 +
++ 5 *
++ 9 *
++ 'c',
++ 'd',
++ 'e',
++ 'f',
++ 'g',
++ 'h',
++ 'i'
++ ];
++ }())
++
++ // 3
++ (function(){
++ var a = [
++ 0 +
++ // comment 1
++ 5 *
++ /* comment 2 */
++ 9 *
++ 'a',
++ 'b',
++ 0 +
++ 5 *
++ 9 *
++ 'c',
++ 'd',
++ 'e',
++ 'f',
++ 'g',
++ 'h',
++ 'i'
++ ];
++ }())
++
++ // 4
++ {
++ var a = [
++ 0,
++ 1
++ ];
++ var b;
++ var c;
++ }
++
++ // 5
++ {
++ var a = [
++ [
++ 0
++ ],
++ 2,
++ 3
++ ];
++ }
++
++ // 6
++ {
++ var a = [
++ [
++ 0,
++ 1
++ ],
++ 2,
++ 3
++ ];
++ }
++
++ // 7
++ {
++ var a = [
++ // [
++ 0,
++ // 1
++ // ],
++ 2,
++ 3
++ ];
++ }
++
++ // 8
++ var x = [
++ (function(){
++ var a,
++ b,
++ c,
++ d,
++ e,
++ f,
++ g,
++ h,
++ i;
++ })
++ ];
++
++ // 9
++ var a = [
++ 0 +
++ 5 *
++ 9 *
++ 'a',
++ 'b',
++ 0 +
++ 5 *
++ 9 *
++ 'c',
++ 'd',
++ 'e',
++ 'f',
++ 'g',
++ 'h',
++ 'i'
++ ];
++
++ // 10
++ var a,
++ b,
++ c,
++ d,
++ e,
++ f,
++ g,
++ h,
++ i;
++ JSEND
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_55()
++ new
++ setl cindent ts=4 sw=4
++ setl cino&
++
++ let code =<< trim [CODE]
++ /* start of define */
++ {
++ }
++ #define AAA \
++ BBB\
++ CCC
++
++ #define CNT \
++ 1 + \
++ 2 + \
++ 4
++ /* end of define */
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('start of define')
++ exe "normal =/end of define\n"
++
++ let expected =<< trim [CODE]
++ /* start of define */
++ {
++ }
++ #define AAA \
++ BBB\
++ CCC
++
++ #define CNT \
++ 1 + \
++ 2 + \
++ 4
++ /* end of define */
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
++ func Test_cindent_56()
++ new
++ setl cindent ts=4 sw=4
++ setl cino&
++
++ let code =<< trim [CODE]
++ {
++ a = second/*bug*/*line;
++ }
++ [CODE]
++
++ call append(0, code)
++ normal gg
++ call search('a = second')
++ normal ox
++
++ let expected =<< trim [CODE]
++ {
++ a = second/*bug*/*line;
++ x
++ }
++
++ [CODE]
++
++ call assert_equal(expected, getline(1, '$'))
++ enew! | close
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.1433/src/version.c 2019-05-31 17:34:44.195465656 +0200
+--- src/version.c 2019-05-31 19:58:35.792627365 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1434,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+62. If your doorbell rings, you think that new mail has arrived. And then
+ you're disappointed that it's only someone at the door.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1435 b/data/vim/patches/8.1.1435
new file mode 100644
index 000000000..88d4de5b2
--- /dev/null
+++ b/data/vim/patches/8.1.1435
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1435
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1435
+Problem: Memory usage test is a bit too flaky.
+Solution: Adjust the tolerances a bit. (Christian Brabandt)
+Files: src/testdir/test_memory_usage.vim
+
+
+*** ../vim-8.1.1434/src/testdir/test_memory_usage.vim 2019-03-27 21:41:32.965793744 +0100
+--- src/testdir/test_memory_usage.vim 2019-05-31 20:08:22.137311056 +0200
+***************
+*** 97,109 ****
+ let after = s:monitor_memory_usage(vim.pid)
+
+ " Estimate the limit of max usage as 2x initial usage.
+! " The lower limit can fluctuate a bit, use 98%.
+! call assert_inrange(before * 98 / 100, 2 * before, after.max)
+
+ " In this case, garbage collecting is not needed.
+! " The value might fluctuate a bit, allow for 3% tolerance.
+ let lower = after.last * 97 / 100
+! let upper = after.last * 103 / 100
+ call assert_inrange(lower, upper, after.max)
+
+ call vim.stop()
+--- 97,110 ----
+ let after = s:monitor_memory_usage(vim.pid)
+
+ " Estimate the limit of max usage as 2x initial usage.
+! " The lower limit can fluctuate a bit, use 97%.
+! call assert_inrange(before * 97 / 100, 2 * before, after.max)
+
+ " In this case, garbage collecting is not needed.
+! " The value might fluctuate a bit, allow for 3% tolerance below and 5% above.
+! " Based on various test runs.
+ let lower = after.last * 97 / 100
+! let upper = after.last * 105 / 100
+ call assert_inrange(lower, upper, after.max)
+
+ call vim.stop()
+*** ../vim-8.1.1434/src/version.c 2019-05-31 20:02:47.571231157 +0200
+--- src/version.c 2019-05-31 20:09:48.340822017 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1435,
+ /**/
+
+--
+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.1436 b/data/vim/patches/8.1.1436
new file mode 100644
index 000000000..e306c5931
--- /dev/null
+++ b/data/vim/patches/8.1.1436
@@ -0,0 +1,95 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1436
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1436
+Problem: Writefile test fails when run under /tmp.
+Solution: Adjust 'backupskip. (Kenta Sato, closes #4462)
+Files: src/testdir/test_writefile.vim
+
+
+*** ../vim-8.1.1435/src/testdir/test_writefile.vim 2019-05-18 18:52:01.040972255 +0200
+--- src/testdir/test_writefile.vim 2019-05-31 20:38:54.931217876 +0200
+***************
+*** 38,44 ****
+ endif
+ " Without a backup file the write won't happen if there is a conversion
+ " error.
+! set nobackup nowritebackup
+ new
+ let contents = ["line one", "line two"]
+ call writefile(contents, 'Xfile')
+--- 38,44 ----
+ endif
+ " Without a backup file the write won't happen if there is a conversion
+ " error.
+! set nobackup nowritebackup backupdir=. backupskip=
+ new
+ let contents = ["line one", "line two"]
+ call writefile(contents, 'Xfile')
+***************
+*** 49,55 ****
+
+ call delete('Xfile')
+ bwipe!
+! set backup& writebackup&
+ endfunc
+
+ func Test_writefile_fails_conversion2()
+--- 49,55 ----
+
+ call delete('Xfile')
+ bwipe!
+! set backup& writebackup& backupdir&vim backupskip&vim
+ endfunc
+
+ func Test_writefile_fails_conversion2()
+***************
+*** 58,64 ****
+ endif
+ " With a backup file the write happens even if there is a conversion error,
+ " but then the backup file must remain
+! set nobackup writebackup
+ let contents = ["line one", "line two"]
+ call writefile(contents, 'Xfile_conversion_err')
+ edit Xfile_conversion_err
+--- 58,64 ----
+ endif
+ " With a backup file the write happens even if there is a conversion error,
+ " but then the backup file must remain
+! set nobackup writebackup backupdir=. backupskip=
+ let contents = ["line one", "line two"]
+ call writefile(contents, 'Xfile_conversion_err')
+ edit Xfile_conversion_err
+***************
+*** 71,76 ****
+--- 71,77 ----
+ call delete('Xfile_conversion_err')
+ call delete('Xfile_conversion_err~')
+ bwipe!
++ set backup& writebackup& backupdir&vim backupskip&vim
+ endfunc
+
+ func SetFlag(timer)
+*** ../vim-8.1.1435/src/version.c 2019-05-31 20:23:22.552256671 +0200
+--- src/version.c 2019-05-31 20:40:07.786865049 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1436,
+ /**/
+
+--
+I got a new desk stapler. It broke on the first desk I tried.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1437 b/data/vim/patches/8.1.1437
new file mode 100644
index 000000000..364f4efc2
--- /dev/null
+++ b/data/vim/patches/8.1.1437
@@ -0,0 +1,1880 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1437
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1437
+Problem: Code to handle callbacks is duplicated.
+Solution: Add callback_T and functions to deal with it.
+Files: src/structs.h, src/evalfunc.c, src/proto/evalfunc.pro,
+ src/change.c, src/channel.c, src/proto/channel.pro, src/buffer.c,
+ src/userfunc.c, src/proto/userfunc.pro, src/eval.c,
+ src/ex_cmds2.c, src/popupwin.c
+
+
+*** ../vim-8.1.1436/src/structs.h 2019-05-30 21:24:22.177201251 +0200
+--- src/structs.h 2019-06-01 13:00:39.892747290 +0200
+***************
+*** 1237,1242 ****
+--- 1237,1253 ----
+ typedef struct partial_S partial_T;
+ typedef struct blobvar_S blob_T;
+
++ // Struct that holds both a normal function name and a partial_T, as used for a
++ // callback argument.
++ // When used temporarily "cb_name" is not allocated. The refcounts to either
++ // the function or the partial are incremented and need to be decremented
++ // later with free_callback().
++ typedef struct {
++ char_u *cb_name;
++ partial_T *cb_partial;
++ int cb_free_name; // cb_name was allocated
++ } callback_T;
++
+ typedef struct jobvar_S job_T;
+ typedef struct readq_S readq_T;
+ typedef struct writeq_S writeq_T;
+***************
+*** 1566,1573 ****
+ char_u *jv_tty_type; // allocated
+ #endif
+ int jv_exitval;
+! char_u *jv_exit_cb; /* allocated */
+! partial_T *jv_exit_partial;
+
+ buf_T *jv_in_buf; /* buffer from "in-name" */
+
+--- 1577,1583 ----
+ char_u *jv_tty_type; // allocated
+ #endif
+ int jv_exitval;
+! callback_T jv_exit_cb;
+
+ buf_T *jv_in_buf; /* buffer from "in-name" */
+
+***************
+*** 1606,1613 ****
+
+ struct cbq_S
+ {
+! char_u *cq_callback;
+! partial_T *cq_partial;
+ int cq_seq_nr;
+ cbq_T *cq_next;
+ cbq_T *cq_prev;
+--- 1616,1622 ----
+
+ struct cbq_S
+ {
+! callback_T cq_callback;
+ int cq_seq_nr;
+ cbq_T *cq_next;
+ cbq_T *cq_prev;
+***************
+*** 1689,1696 ****
+ writeq_T ch_writeque; /* header for write queue */
+
+ cbq_T ch_cb_head; /* dummy node for per-request callbacks */
+! char_u *ch_callback; /* call when a msg is not handled */
+! partial_T *ch_partial;
+
+ bufref_T ch_bufref; /* buffer to read from or write to */
+ int ch_nomodifiable; /* TRUE when buffer can be 'nomodifiable' */
+--- 1698,1704 ----
+ writeq_T ch_writeque; /* header for write queue */
+
+ cbq_T ch_cb_head; /* dummy node for per-request callbacks */
+! callback_T ch_callback; /* call when a msg is not handled */
+
+ bufref_T ch_bufref; /* buffer to read from or write to */
+ int ch_nomodifiable; /* TRUE when buffer can be 'nomodifiable' */
+***************
+*** 1731,1740 ****
+ #ifdef MSWIN
+ int ch_named_pipe; /* using named pipe instead of pty */
+ #endif
+! char_u *ch_callback; /* call when any msg is not handled */
+! partial_T *ch_partial;
+! char_u *ch_close_cb; /* call when channel is closed */
+! partial_T *ch_close_partial;
+ int ch_drop_never;
+ int ch_keep_open; /* do not close on read error */
+ int ch_nonblock;
+--- 1739,1746 ----
+ #ifdef MSWIN
+ int ch_named_pipe; /* using named pipe instead of pty */
+ #endif
+! callback_T ch_callback; /* call when any msg is not handled */
+! callback_T ch_close_cb; /* call when channel is closed */
+ int ch_drop_never;
+ int ch_keep_open; /* do not close on read error */
+ int ch_nonblock;
+***************
+*** 1833,1848 ****
+ linenr_T jo_in_top;
+ linenr_T jo_in_bot;
+
+! char_u *jo_callback; /* not allocated! */
+! partial_T *jo_partial; /* not referenced! */
+! char_u *jo_out_cb; /* not allocated! */
+! partial_T *jo_out_partial; /* not referenced! */
+! char_u *jo_err_cb; /* not allocated! */
+! partial_T *jo_err_partial; /* not referenced! */
+! char_u *jo_close_cb; /* not allocated! */
+! partial_T *jo_close_partial; /* not referenced! */
+! char_u *jo_exit_cb; /* not allocated! */
+! partial_T *jo_exit_partial; /* not referenced! */
+ int jo_drop_never;
+ int jo_waittime;
+ int jo_timeout;
+--- 1839,1849 ----
+ linenr_T jo_in_top;
+ linenr_T jo_in_bot;
+
+! callback_T jo_callback;
+! callback_T jo_out_cb;
+! callback_T jo_err_cb;
+! callback_T jo_close_cb;
+! callback_T jo_exit_cb;
+ int jo_drop_never;
+ int jo_waittime;
+ int jo_timeout;
+***************
+*** 1886,1893 ****
+ {
+ listener_T *lr_next;
+ int lr_id;
+! char_u *lr_callback;
+! partial_T *lr_partial;
+ };
+ #endif
+
+--- 1887,1893 ----
+ {
+ listener_T *lr_next;
+ int lr_id;
+! callback_T lr_callback;
+ };
+ #endif
+
+***************
+*** 1950,1962 ****
+ #ifdef FEAT_TIMERS
+ timer_T *tr_next;
+ timer_T *tr_prev;
+! proftime_T tr_due; /* when the callback is to be invoked */
+! char tr_firing; /* when TRUE callback is being called */
+! char tr_paused; /* when TRUE callback is not invoked */
+! int tr_repeat; /* number of times to repeat, -1 forever */
+! long tr_interval; /* msec */
+! char_u *tr_callback; /* allocated */
+! partial_T *tr_partial;
+ int tr_emsg_count;
+ #endif
+ };
+--- 1950,1961 ----
+ #ifdef FEAT_TIMERS
+ timer_T *tr_next;
+ timer_T *tr_prev;
+! proftime_T tr_due; // when the callback is to be invoked
+! char tr_firing; // when TRUE callback is being called
+! char tr_paused; // when TRUE callback is not invoked
+! int tr_repeat; // number of times to repeat, -1 forever
+! long tr_interval; // msec
+! callback_T tr_callback;
+ int tr_emsg_count;
+ #endif
+ };
+***************
+*** 2509,2521 ****
+ int b_shortname; /* this file has an 8.3 file name */
+
+ #ifdef FEAT_JOB_CHANNEL
+! char_u *b_prompt_text; // set by prompt_setprompt()
+! char_u *b_prompt_callback; // set by prompt_setcallback()
+! partial_T *b_prompt_partial; // set by prompt_setcallback()
+! char_u *b_prompt_interrupt; // set by prompt_setinterrupt()
+! partial_T *b_prompt_int_partial; // set by prompt_setinterrupt()
+! int b_prompt_insert; // value for restart_edit when entering
+! // a prompt buffer window.
+ #endif
+ #ifdef FEAT_MZSCHEME
+ void *b_mzscheme_ref; /* The MzScheme reference to this buffer */
+--- 2508,2518 ----
+ int b_shortname; /* this file has an 8.3 file name */
+
+ #ifdef FEAT_JOB_CHANNEL
+! char_u *b_prompt_text; // set by prompt_setprompt()
+! callback_T b_prompt_callback; // set by prompt_setcallback()
+! callback_T b_prompt_interrupt; // set by prompt_setinterrupt()
+! int b_prompt_insert; // value for restart_edit when entering
+! // a prompt buffer window.
+ #endif
+ #ifdef FEAT_MZSCHEME
+ void *b_mzscheme_ref; /* The MzScheme reference to this buffer */
+*** ../vim-8.1.1436/src/evalfunc.c 2019-05-30 22:35:15.151191862 +0200
+--- src/evalfunc.c 2019-06-01 13:13:24.669729965 +0200
+***************
+*** 9200,9207 ****
+ f_prompt_setcallback(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ buf_T *buf;
+! char_u *callback;
+! partial_T *partial;
+
+ if (check_secure())
+ return;
+--- 9200,9206 ----
+ f_prompt_setcallback(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ buf_T *buf;
+! callback_T callback;
+
+ if (check_secure())
+ return;
+***************
+*** 9209,9225 ****
+ if (buf == NULL)
+ return;
+
+! callback = get_callback(&argvars[1], &partial);
+! if (callback == NULL)
+ return;
+
+! free_callback(buf->b_prompt_callback, buf->b_prompt_partial);
+! if (partial == NULL)
+! buf->b_prompt_callback = vim_strsave(callback);
+! else
+! /* pointer into the partial */
+! buf->b_prompt_callback = callback;
+! buf->b_prompt_partial = partial;
+ }
+
+ /*
+--- 9208,9219 ----
+ if (buf == NULL)
+ return;
+
+! callback = get_callback(&argvars[1]);
+! if (callback.cb_name == NULL)
+ return;
+
+! free_callback(&buf->b_prompt_callback);
+! set_callback(&buf->b_prompt_callback, &callback);
+ }
+
+ /*
+***************
+*** 9229,9236 ****
+ f_prompt_setinterrupt(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ buf_T *buf;
+! char_u *callback;
+! partial_T *partial;
+
+ if (check_secure())
+ return;
+--- 9223,9229 ----
+ f_prompt_setinterrupt(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ buf_T *buf;
+! callback_T callback;
+
+ if (check_secure())
+ return;
+***************
+*** 9238,9254 ****
+ if (buf == NULL)
+ return;
+
+! callback = get_callback(&argvars[1], &partial);
+! if (callback == NULL)
+ return;
+
+! free_callback(buf->b_prompt_interrupt, buf->b_prompt_int_partial);
+! if (partial == NULL)
+! buf->b_prompt_interrupt = vim_strsave(callback);
+! else
+! /* pointer into the partial */
+! buf->b_prompt_interrupt = callback;
+! buf->b_prompt_int_partial = partial;
+ }
+
+ /*
+--- 9231,9242 ----
+ if (buf == NULL)
+ return;
+
+! callback = get_callback(&argvars[1]);
+! if (callback.cb_name == NULL)
+ return;
+
+! free_callback(&buf->b_prompt_interrupt);
+! set_callback(&buf->b_prompt_interrupt, &callback);
+ }
+
+ /*
+***************
+*** 14631,14674 ****
+ /*
+ * Get a callback from "arg". It can be a Funcref or a function name.
+ * When "arg" is zero return an empty string.
+! * Return NULL for an invalid argument.
+ */
+! char_u *
+! get_callback(typval_T *arg, partial_T **pp)
+ {
+ if (arg->v_type == VAR_PARTIAL && arg->vval.v_partial != NULL)
+ {
+! *pp = arg->vval.v_partial;
+! ++(*pp)->pt_refcount;
+! return partial_name(*pp);
+ }
+! *pp = NULL;
+! if (arg->v_type == VAR_FUNC || arg->v_type == VAR_STRING)
+ {
+! func_ref(arg->vval.v_string);
+! return arg->vval.v_string;
+ }
+! if (arg->v_type == VAR_NUMBER && arg->vval.v_number == 0)
+! return (char_u *)"";
+! emsg(_("E921: Invalid callback argument"));
+! return NULL;
+ }
+
+ /*
+! * Unref/free "callback" and "partial" returned by get_callback().
+ */
+ void
+! free_callback(char_u *callback, partial_T *partial)
+ {
+! if (partial != NULL)
+! partial_unref(partial);
+! else if (callback != NULL)
+ {
+! func_unref(callback);
+! vim_free(callback);
+ }
+ }
+
+ #ifdef FEAT_TIMERS
+ /*
+ * "timer_info([timer])" function
+--- 14619,14724 ----
+ /*
+ * Get a callback from "arg". It can be a Funcref or a function name.
+ * When "arg" is zero return an empty string.
+! * "cb_name" is not allocated.
+! * "cb_name" is set to NULL for an invalid argument.
+ */
+! callback_T
+! get_callback(typval_T *arg)
+ {
++ callback_T res;
++
++ res.cb_free_name = FALSE;
+ if (arg->v_type == VAR_PARTIAL && arg->vval.v_partial != NULL)
+ {
+! res.cb_partial = arg->vval.v_partial;
+! ++res.cb_partial->pt_refcount;
+! res.cb_name = partial_name(res.cb_partial);
+ }
+! else
+ {
+! res.cb_partial = NULL;
+! if (arg->v_type == VAR_FUNC || arg->v_type == VAR_STRING)
+! {
+! // Note that we don't make a copy of the string.
+! res.cb_name = arg->vval.v_string;
+! func_ref(res.cb_name);
+! }
+! else if (arg->v_type == VAR_NUMBER && arg->vval.v_number == 0)
+! {
+! res.cb_name = (char_u *)"";
+! }
+! else
+! {
+! emsg(_("E921: Invalid callback argument"));
+! res.cb_name = NULL;
+! }
+ }
+! return res;
+ }
+
+ /*
+! * Copy a callback into a typval_T.
+ */
+ void
+! put_callback(callback_T *cb, typval_T *tv)
+ {
+! if (cb->cb_partial != NULL)
+! {
+! tv->v_type = VAR_PARTIAL;
+! tv->vval.v_partial = cb->cb_partial;
+! ++tv->vval.v_partial->pt_refcount;
+! }
+! else
+ {
+! tv->v_type = VAR_FUNC;
+! tv->vval.v_string = vim_strsave(cb->cb_name);
+! func_ref(cb->cb_name);
+ }
+ }
+
++ /*
++ * Make a copy of "src" into "dest", allocating the function name if needed,
++ * without incrementing the refcount.
++ */
++ void
++ set_callback(callback_T *dest, callback_T *src)
++ {
++ if (src->cb_partial == NULL)
++ {
++ // just a function name, make a copy
++ dest->cb_name = vim_strsave(src->cb_name);
++ dest->cb_free_name = TRUE;
++ }
++ else
++ {
++ // cb_name is a pointer into cb_partial
++ dest->cb_name = src->cb_name;
++ dest->cb_free_name = FALSE;
++ }
++ dest->cb_partial = src->cb_partial;
++ }
++
++ /*
++ * Unref/free "callback" returned by get_callback() or set_callback().
++ */
++ void
++ free_callback(callback_T *callback)
++ {
++ if (callback->cb_partial != NULL)
++ {
++ partial_unref(callback->cb_partial);
++ callback->cb_partial = NULL;
++ }
++ else if (callback->cb_name != NULL)
++ func_unref(callback->cb_name);
++ if (callback->cb_free_name)
++ {
++ vim_free(callback->cb_name);
++ callback->cb_free_name = FALSE;
++ }
++ callback->cb_name = NULL;
++ }
++
+ #ifdef FEAT_TIMERS
+ /*
+ * "timer_info([timer])" function
+***************
+*** 14723,14731 ****
+ long msec = (long)tv_get_number(&argvars[0]);
+ timer_T *timer;
+ int repeat = 0;
+! char_u *callback;
+ dict_T *dict;
+- partial_T *partial;
+
+ rettv->vval.v_number = -1;
+ if (check_secure())
+--- 14773,14780 ----
+ long msec = (long)tv_get_number(&argvars[0]);
+ timer_T *timer;
+ int repeat = 0;
+! callback_T callback;
+ dict_T *dict;
+
+ rettv->vval.v_number = -1;
+ if (check_secure())
+***************
+*** 14742,14762 ****
+ repeat = dict_get_number(dict, (char_u *)"repeat");
+ }
+
+! callback = get_callback(&argvars[1], &partial);
+! if (callback == NULL)
+ return;
+
+ timer = create_timer(msec, repeat);
+ if (timer == NULL)
+! free_callback(callback, partial);
+ else
+ {
+! if (partial == NULL)
+! timer->tr_callback = vim_strsave(callback);
+! else
+! /* pointer into the partial */
+! timer->tr_callback = callback;
+! timer->tr_partial = partial;
+ rettv->vval.v_number = (varnumber_T)timer->tr_id;
+ }
+ }
+--- 14791,14806 ----
+ repeat = dict_get_number(dict, (char_u *)"repeat");
+ }
+
+! callback = get_callback(&argvars[1]);
+! if (callback.cb_name == NULL)
+ return;
+
+ timer = create_timer(msec, repeat);
+ if (timer == NULL)
+! free_callback(&callback);
+ else
+ {
+! set_callback(&timer->tr_callback, &callback);
+ rettv->vval.v_number = (varnumber_T)timer->tr_id;
+ }
+ }
+*** ../vim-8.1.1436/src/proto/evalfunc.pro 2019-05-11 21:14:02.336269566 +0200
+--- src/proto/evalfunc.pro 2019-05-31 23:04:21.602577328 +0200
+***************
+*** 11,16 ****
+ float_T vim_round(float_T f);
+ long do_searchpair(char_u *spat, char_u *mpat, char_u *epat, int dir, typval_T *skip, int flags, pos_T *match_pos, linenr_T lnum_stop, long time_limit);
+ void f_string(typval_T *argvars, typval_T *rettv);
+! char_u *get_callback(typval_T *arg, partial_T **pp);
+! void free_callback(char_u *callback, partial_T *partial);
+ /* vim: set ft=c : */
+--- 11,18 ----
+ float_T vim_round(float_T f);
+ long do_searchpair(char_u *spat, char_u *mpat, char_u *epat, int dir, typval_T *skip, int flags, pos_T *match_pos, linenr_T lnum_stop, long time_limit);
+ void f_string(typval_T *argvars, typval_T *rettv);
+! callback_T get_callback(typval_T *arg);
+! void put_callback(callback_T *cb, typval_T *tv);
+! void set_callback(callback_T *dest, callback_T *src);
+! void free_callback(callback_T *callback);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1436/src/change.c 2019-05-29 22:28:25.759184826 +0200
+--- src/change.c 2019-05-31 22:55:13.929346887 +0200
+***************
+*** 270,305 ****
+ void
+ f_listener_add(typval_T *argvars, typval_T *rettv)
+ {
+! char_u *callback;
+! partial_T *partial;
+ listener_T *lnr;
+ buf_T *buf = curbuf;
+
+! callback = get_callback(&argvars[0], &partial);
+! if (callback == NULL)
+ return;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+ buf = get_buf_arg(&argvars[1]);
+ if (buf == NULL)
+ return;
+ }
+
+ lnr = ALLOC_CLEAR_ONE(listener_T);
+ if (lnr == NULL)
+ {
+! free_callback(callback, partial);
+ return;
+ }
+ lnr->lr_next = buf->b_listener;
+ buf->b_listener = lnr;
+
+! if (partial == NULL)
+! lnr->lr_callback = vim_strsave(callback);
+! else
+! lnr->lr_callback = callback; // pointer into the partial
+! lnr->lr_partial = partial;
+
+ lnr->lr_id = ++next_listener_id;
+ rettv->vval.v_number = lnr->lr_id;
+--- 270,303 ----
+ void
+ f_listener_add(typval_T *argvars, typval_T *rettv)
+ {
+! callback_T callback;
+ listener_T *lnr;
+ buf_T *buf = curbuf;
+
+! callback = get_callback(&argvars[0]);
+! if (callback.cb_name == NULL)
+ return;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+ buf = get_buf_arg(&argvars[1]);
+ if (buf == NULL)
++ {
++ free_callback(&callback);
+ return;
++ }
+ }
+
+ lnr = ALLOC_CLEAR_ONE(listener_T);
+ if (lnr == NULL)
+ {
+! free_callback(&callback);
+ return;
+ }
+ lnr->lr_next = buf->b_listener;
+ buf->b_listener = lnr;
+
+! set_callback(&lnr->lr_callback, &callback);
+
+ lnr->lr_id = ++next_listener_id;
+ rettv->vval.v_number = lnr->lr_id;
+***************
+*** 344,350 ****
+ prev->lr_next = lnr->lr_next;
+ else
+ buf->b_listener = lnr->lr_next;
+! free_callback(lnr->lr_callback, lnr->lr_partial);
+ vim_free(lnr);
+ }
+ prev = lnr;
+--- 342,348 ----
+ prev->lr_next = lnr->lr_next;
+ else
+ buf->b_listener = lnr->lr_next;
+! free_callback(&lnr->lr_callback);
+ vim_free(lnr);
+ }
+ prev = lnr;
+***************
+*** 418,425 ****
+
+ for (lnr = buf->b_listener; lnr != NULL; lnr = lnr->lr_next)
+ {
+! call_func(lnr->lr_callback, -1, &rettv,
+! 5, argv, NULL, 0L, 0L, &dummy, TRUE, lnr->lr_partial, NULL);
+ clear_tv(&rettv);
+ }
+
+--- 416,423 ----
+
+ for (lnr = buf->b_listener; lnr != NULL; lnr = lnr->lr_next)
+ {
+! call_callback(&lnr->lr_callback, -1, &rettv,
+! 5, argv, NULL, 0L, 0L, &dummy, TRUE, NULL);
+ clear_tv(&rettv);
+ }
+
+*** ../vim-8.1.1436/src/channel.c 2019-05-28 23:08:12.052648779 +0200
+--- src/channel.c 2019-06-01 12:58:20.873575186 +0200
+***************
+*** 348,354 ****
+ return FALSE;
+
+ /* If there is a close callback it may still need to be invoked. */
+! if (channel->ch_close_cb != NULL)
+ return TRUE;
+
+ /* If reading from or a buffer it's still useful. */
+--- 348,354 ----
+ return FALSE;
+
+ /* If there is a close callback it may still need to be invoked. */
+! if (channel->ch_close_cb.cb_name != NULL)
+ return TRUE;
+
+ /* If reading from or a buffer it's still useful. */
+***************
+*** 366,377 ****
+ has_err_msg = channel->ch_part[PART_ERR].ch_fd != INVALID_FD
+ || channel->ch_part[PART_ERR].ch_head.rq_next != NULL
+ || channel->ch_part[PART_ERR].ch_json_head.jq_next != NULL;
+! return (channel->ch_callback != NULL && (has_sock_msg
+ || has_out_msg || has_err_msg))
+! || ((channel->ch_part[PART_OUT].ch_callback != NULL
+ || channel->ch_part[PART_OUT].ch_bufref.br_buf != NULL)
+ && has_out_msg)
+! || ((channel->ch_part[PART_ERR].ch_callback != NULL
+ || channel->ch_part[PART_ERR].ch_bufref.br_buf != NULL)
+ && has_err_msg);
+ }
+--- 366,377 ----
+ has_err_msg = channel->ch_part[PART_ERR].ch_fd != INVALID_FD
+ || channel->ch_part[PART_ERR].ch_head.rq_next != NULL
+ || channel->ch_part[PART_ERR].ch_json_head.jq_next != NULL;
+! return (channel->ch_callback.cb_name != NULL && (has_sock_msg
+ || has_out_msg || has_err_msg))
+! || ((channel->ch_part[PART_OUT].ch_callback.cb_name != NULL
+ || channel->ch_part[PART_OUT].ch_bufref.br_buf != NULL)
+ && has_out_msg)
+! || ((channel->ch_part[PART_ERR].ch_callback.cb_name != NULL
+ || channel->ch_part[PART_ERR].ch_bufref.br_buf != NULL)
+ && has_err_msg);
+ }
+***************
+*** 1178,1206 ****
+ return buf;
+ }
+
+ static void
+! set_callback(
+! char_u **cbp,
+! partial_T **pp,
+! char_u *callback,
+! partial_T *partial)
+ {
+! free_callback(*cbp, *pp);
+! if (callback != NULL && *callback != NUL)
+ {
+! if (partial != NULL)
+! *cbp = partial_name(partial);
+! else
+! {
+! *cbp = vim_strsave(callback);
+! func_ref(*cbp);
+! }
+ }
+ else
+! *cbp = NULL;
+! *pp = partial;
+! if (partial != NULL)
+! ++partial->pt_refcount;
+ }
+
+ /*
+--- 1178,1213 ----
+ return buf;
+ }
+
++ /*
++ * Copy callback from "src" to "dest", incrementing the refcounts.
++ */
+ static void
+! copy_callback(callback_T *dest, callback_T *src)
+ {
+! dest->cb_partial = src->cb_partial;
+! if (dest->cb_partial != NULL)
+ {
+! dest->cb_name = src->cb_name;
+! dest->cb_free_name = FALSE;
+! ++dest->cb_partial->pt_refcount;
+! }
+! else
+! {
+! dest->cb_name = vim_strsave(src->cb_name);
+! dest->cb_free_name = TRUE;
+! func_ref(src->cb_name);
+ }
++ }
++
++ static void
++ free_set_callback(callback_T *cbp, callback_T *callback)
++ {
++ free_callback(cbp);
++
++ if (callback->cb_name != NULL && *callback->cb_name != NUL)
++ copy_callback(cbp, callback);
+ else
+! cbp->cb_name = NULL;
+ }
+
+ /*
+***************
+*** 1233,1251 ****
+ channel->ch_part[PART_IN].ch_block_write = 1;
+
+ if (opt->jo_set & JO_CALLBACK)
+! set_callback(&channel->ch_callback, &channel->ch_partial,
+! opt->jo_callback, opt->jo_partial);
+ if (opt->jo_set & JO_OUT_CALLBACK)
+! set_callback(&channel->ch_part[PART_OUT].ch_callback,
+! &channel->ch_part[PART_OUT].ch_partial,
+! opt->jo_out_cb, opt->jo_out_partial);
+ if (opt->jo_set & JO_ERR_CALLBACK)
+! set_callback(&channel->ch_part[PART_ERR].ch_callback,
+! &channel->ch_part[PART_ERR].ch_partial,
+! opt->jo_err_cb, opt->jo_err_partial);
+ if (opt->jo_set & JO_CLOSE_CALLBACK)
+! set_callback(&channel->ch_close_cb, &channel->ch_close_partial,
+! opt->jo_close_cb, opt->jo_close_partial);
+ channel->ch_drop_never = opt->jo_drop_never;
+
+ if ((opt->jo_set & JO_OUT_IO) && opt->jo_io[PART_OUT] == JIO_BUFFER)
+--- 1240,1254 ----
+ channel->ch_part[PART_IN].ch_block_write = 1;
+
+ if (opt->jo_set & JO_CALLBACK)
+! free_set_callback(&channel->ch_callback, &opt->jo_callback);
+ if (opt->jo_set & JO_OUT_CALLBACK)
+! free_set_callback(&channel->ch_part[PART_OUT].ch_callback,
+! &opt->jo_out_cb);
+ if (opt->jo_set & JO_ERR_CALLBACK)
+! free_set_callback(&channel->ch_part[PART_ERR].ch_callback,
+! &opt->jo_err_cb);
+ if (opt->jo_set & JO_CLOSE_CALLBACK)
+! free_set_callback(&channel->ch_close_cb, &opt->jo_close_cb);
+ channel->ch_drop_never = opt->jo_drop_never;
+
+ if ((opt->jo_set & JO_OUT_IO) && opt->jo_io[PART_OUT] == JIO_BUFFER)
+***************
+*** 1349,1356 ****
+ channel_set_req_callback(
+ channel_T *channel,
+ ch_part_T part,
+! char_u *callback,
+! partial_T *partial,
+ int id)
+ {
+ cbq_T *head = &channel->ch_part[part].ch_cb_head;
+--- 1352,1358 ----
+ channel_set_req_callback(
+ channel_T *channel,
+ ch_part_T part,
+! callback_T *callback,
+ int id)
+ {
+ cbq_T *head = &channel->ch_part[part].ch_cb_head;
+***************
+*** 1358,1374 ****
+
+ if (item != NULL)
+ {
+! item->cq_partial = partial;
+! if (partial != NULL)
+! {
+! ++partial->pt_refcount;
+! item->cq_callback = callback;
+! }
+! else
+! {
+! item->cq_callback = vim_strsave(callback);
+! func_ref(item->cq_callback);
+! }
+ item->cq_seq_nr = id;
+ item->cq_prev = head->cq_prev;
+ head->cq_prev = item;
+--- 1360,1366 ----
+
+ if (item != NULL)
+ {
+! copy_callback(&item->cq_callback, callback);
+ item->cq_seq_nr = id;
+ item->cq_prev = head->cq_prev;
+ head->cq_prev = item;
+***************
+*** 1638,1645 ****
+ * This does not redraw but sets channel_need_redraw;
+ */
+ static void
+! invoke_callback(channel_T *channel, char_u *callback, partial_T *partial,
+! typval_T *argv)
+ {
+ typval_T rettv;
+ int dummy;
+--- 1630,1636 ----
+ * This does not redraw but sets channel_need_redraw;
+ */
+ static void
+! invoke_callback(channel_T *channel, callback_T *callback, typval_T *argv)
+ {
+ typval_T rettv;
+ int dummy;
+***************
+*** 1650,1657 ****
+ argv[0].v_type = VAR_CHANNEL;
+ argv[0].vval.v_channel = channel;
+
+! call_func(callback, -1, &rettv, 2, argv, NULL,
+! 0L, 0L, &dummy, TRUE, partial, NULL);
+ clear_tv(&rettv);
+ channel_need_redraw = TRUE;
+ }
+--- 1641,1648 ----
+ argv[0].v_type = VAR_CHANNEL;
+ argv[0].vval.v_channel = channel;
+
+! call_callback(callback, -1, &rettv, 2, argv, NULL,
+! 0L, 0L, &dummy, TRUE, NULL);
+ clear_tv(&rettv);
+ channel_need_redraw = TRUE;
+ }
+***************
+*** 2414,2425 ****
+ typval_T *argv)
+ {
+ ch_log(channel, "Invoking one-time callback %s",
+! (char *)item->cq_callback);
+ /* Remove the item from the list first, if the callback
+ * invokes ch_close() the list will be cleared. */
+ remove_cb_node(cbhead, item);
+! invoke_callback(channel, item->cq_callback, item->cq_partial, argv);
+! free_callback(item->cq_callback, item->cq_partial);
+ vim_free(item);
+ }
+
+--- 2405,2416 ----
+ typval_T *argv)
+ {
+ ch_log(channel, "Invoking one-time callback %s",
+! (char *)item->cq_callback.cb_name);
+ /* Remove the item from the list first, if the callback
+ * invokes ch_close() the list will be cleared. */
+ remove_cb_node(cbhead, item);
+! invoke_callback(channel, &item->cq_callback, argv);
+! free_callback(&item->cq_callback);
+ vim_free(item);
+ }
+
+***************
+*** 2553,2560 ****
+ ch_mode_T ch_mode = ch_part->ch_mode;
+ cbq_T *cbhead = &ch_part->ch_cb_head;
+ cbq_T *cbitem;
+! char_u *callback = NULL;
+! partial_T *partial = NULL;
+ buf_T *buffer = NULL;
+ char_u *p;
+
+--- 2544,2550 ----
+ ch_mode_T ch_mode = ch_part->ch_mode;
+ cbq_T *cbhead = &ch_part->ch_cb_head;
+ cbq_T *cbitem;
+! callback_T *callback = NULL;
+ buf_T *buffer = NULL;
+ char_u *p;
+
+***************
+*** 2567,2586 ****
+ if (cbitem->cq_seq_nr == 0)
+ break;
+ if (cbitem != NULL)
+! {
+! callback = cbitem->cq_callback;
+! partial = cbitem->cq_partial;
+! }
+! else if (ch_part->ch_callback != NULL)
+! {
+! callback = ch_part->ch_callback;
+! partial = ch_part->ch_partial;
+! }
+! else
+! {
+! callback = channel->ch_callback;
+! partial = channel->ch_partial;
+! }
+
+ buffer = ch_part->ch_bufref.br_buf;
+ if (buffer != NULL && (!bufref_valid(&ch_part->ch_bufref)
+--- 2557,2567 ----
+ if (cbitem->cq_seq_nr == 0)
+ break;
+ if (cbitem != NULL)
+! callback = &cbitem->cq_callback;
+! else if (ch_part->ch_callback.cb_name != NULL)
+! callback = &ch_part->ch_callback;
+! else if (channel->ch_callback.cb_name != NULL)
+! callback = &channel->ch_callback;
+
+ buffer = ch_part->ch_bufref.br_buf;
+ if (buffer != NULL && (!bufref_valid(&ch_part->ch_bufref)
+***************
+*** 2642,2648 ****
+ {
+ /* If there is a close callback it may use ch_read() to get the
+ * messages. */
+! if (channel->ch_close_cb == NULL && !channel->ch_drop_never)
+ drop_messages(channel, part);
+ return FALSE;
+ }
+--- 2623,2629 ----
+ {
+ /* If there is a close callback it may use ch_read() to get the
+ * messages. */
+! if (channel->ch_close_cb.cb_name == NULL && !channel->ch_drop_never)
+ drop_messages(channel, part);
+ return FALSE;
+ }
+***************
+*** 2761,2768 ****
+ {
+ /* invoke the channel callback */
+ ch_log(channel, "Invoking channel callback %s",
+! (char *)callback);
+! invoke_callback(channel, callback, partial, argv);
+ }
+ }
+ }
+--- 2742,2749 ----
+ {
+ /* invoke the channel callback */
+ ch_log(channel, "Invoking channel callback %s",
+! (char *)callback->cb_name);
+! invoke_callback(channel, callback, argv);
+ }
+ }
+ }
+***************
+*** 2956,2973 ****
+ ch_part_T part;
+
+ /* Invoke callbacks and flush buffers before the close callback. */
+! if (channel->ch_close_cb != NULL)
+ ch_log(channel,
+ "Invoking callbacks and flushing buffers before closing");
+ for (part = PART_SOCK; part < PART_IN; ++part)
+ {
+! if (channel->ch_close_cb != NULL
+ || channel->ch_part[part].ch_bufref.br_buf != NULL)
+ {
+ /* Increment the refcount to avoid the channel being freed
+ * halfway. */
+ ++channel->ch_refcount;
+! if (channel->ch_close_cb == NULL)
+ ch_log(channel, "flushing %s buffers before closing",
+ part_names[part]);
+ while (may_invoke_callback(channel, part))
+--- 2937,2954 ----
+ ch_part_T part;
+
+ /* Invoke callbacks and flush buffers before the close callback. */
+! if (channel->ch_close_cb.cb_name != NULL)
+ ch_log(channel,
+ "Invoking callbacks and flushing buffers before closing");
+ for (part = PART_SOCK; part < PART_IN; ++part)
+ {
+! if (channel->ch_close_cb.cb_name != NULL
+ || channel->ch_part[part].ch_bufref.br_buf != NULL)
+ {
+ /* Increment the refcount to avoid the channel being freed
+ * halfway. */
+ ++channel->ch_refcount;
+! if (channel->ch_close_cb.cb_name == NULL)
+ ch_log(channel, "flushing %s buffers before closing",
+ part_names[part]);
+ while (may_invoke_callback(channel, part))
+***************
+*** 2976,2982 ****
+ }
+ }
+
+! if (channel->ch_close_cb != NULL)
+ {
+ typval_T argv[1];
+ typval_T rettv;
+--- 2957,2963 ----
+ }
+ }
+
+! if (channel->ch_close_cb.cb_name != NULL)
+ {
+ typval_T argv[1];
+ typval_T rettv;
+***************
+*** 2986,3004 ****
+ * halfway. */
+ ++channel->ch_refcount;
+ ch_log(channel, "Invoking close callback %s",
+! (char *)channel->ch_close_cb);
+ argv[0].v_type = VAR_CHANNEL;
+ argv[0].vval.v_channel = channel;
+! call_func(channel->ch_close_cb, -1,
+! &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
+! channel->ch_close_partial, NULL);
+ clear_tv(&rettv);
+ channel_need_redraw = TRUE;
+
+ /* the callback is only called once */
+! free_callback(channel->ch_close_cb, channel->ch_close_partial);
+! channel->ch_close_cb = NULL;
+! channel->ch_close_partial = NULL;
+
+ if (channel_need_redraw)
+ {
+--- 2967,2982 ----
+ * halfway. */
+ ++channel->ch_refcount;
+ ch_log(channel, "Invoking close callback %s",
+! (char *)channel->ch_close_cb.cb_name);
+ argv[0].v_type = VAR_CHANNEL;
+ argv[0].vval.v_channel = channel;
+! call_callback(&channel->ch_close_cb, -1,
+! &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE, NULL);
+ clear_tv(&rettv);
+ channel_need_redraw = TRUE;
+
+ /* the callback is only called once */
+! free_callback(&channel->ch_close_cb);
+
+ if (channel_need_redraw)
+ {
+***************
+*** 3061,3067 ****
+ cbq_T *node = cb_head->cq_next;
+
+ remove_cb_node(cb_head, node);
+! free_callback(node->cq_callback, node->cq_partial);
+ vim_free(node);
+ }
+
+--- 3039,3045 ----
+ cbq_T *node = cb_head->cq_next;
+
+ remove_cb_node(cb_head, node);
+! free_callback(&node->cq_callback);
+ vim_free(node);
+ }
+
+***************
+*** 3071,3079 ****
+ remove_json_node(json_head, json_head->jq_next);
+ }
+
+! free_callback(ch_part->ch_callback, ch_part->ch_partial);
+! ch_part->ch_callback = NULL;
+! ch_part->ch_partial = NULL;
+
+ while (ch_part->ch_writeque.wq_next != NULL)
+ remove_from_writeque(&ch_part->ch_writeque,
+--- 3049,3055 ----
+ remove_json_node(json_head, json_head->jq_next);
+ }
+
+! free_callback(&ch_part->ch_callback);
+
+ while (ch_part->ch_writeque.wq_next != NULL)
+ remove_from_writeque(&ch_part->ch_writeque,
+***************
+*** 3092,3103 ****
+ channel_clear_one(channel, PART_OUT);
+ channel_clear_one(channel, PART_ERR);
+ channel_clear_one(channel, PART_IN);
+! free_callback(channel->ch_callback, channel->ch_partial);
+! channel->ch_callback = NULL;
+! channel->ch_partial = NULL;
+! free_callback(channel->ch_close_cb, channel->ch_close_partial);
+! channel->ch_close_cb = NULL;
+! channel->ch_close_partial = NULL;
+ }
+
+ #if defined(EXITFREE) || defined(PROTO)
+--- 3068,3075 ----
+ channel_clear_one(channel, PART_OUT);
+ channel_clear_one(channel, PART_ERR);
+ channel_clear_one(channel, PART_IN);
+! free_callback(&channel->ch_callback);
+! free_callback(&channel->ch_close_cb);
+ }
+
+ #if defined(EXITFREE) || defined(PROTO)
+***************
+*** 3991,4009 ****
+ /* Set the callback. An empty callback means no callback and not reading
+ * the response. With "ch_evalexpr()" and "ch_evalraw()" a callback is not
+ * allowed. */
+! if (opt->jo_callback != NULL && *opt->jo_callback != NUL)
+ {
+ if (eval)
+ {
+ semsg(_("E917: Cannot use a callback with %s()"), fun);
+ return NULL;
+ }
+! channel_set_req_callback(channel, *part_read,
+! opt->jo_callback, opt->jo_partial, id);
+ }
+
+ if (channel_send(channel, part_send, text, len, fun) == OK
+! && opt->jo_callback == NULL)
+ return channel;
+ return NULL;
+ }
+--- 3963,3980 ----
+ /* Set the callback. An empty callback means no callback and not reading
+ * the response. With "ch_evalexpr()" and "ch_evalraw()" a callback is not
+ * allowed. */
+! if (opt->jo_callback.cb_name != NULL && *opt->jo_callback.cb_name != NUL)
+ {
+ if (eval)
+ {
+ semsg(_("E917: Cannot use a callback with %s()"), fun);
+ return NULL;
+ }
+! channel_set_req_callback(channel, *part_read, &opt->jo_callback, id);
+ }
+
+ if (channel_send(channel, part_send, text, len, fun) == OK
+! && opt->jo_callback.cb_name == NULL)
+ return channel;
+ return NULL;
+ }
+***************
+*** 4559,4584 ****
+ void
+ free_job_options(jobopt_T *opt)
+ {
+! if (opt->jo_partial != NULL)
+! partial_unref(opt->jo_partial);
+! else if (opt->jo_callback != NULL)
+! func_unref(opt->jo_callback);
+! if (opt->jo_out_partial != NULL)
+! partial_unref(opt->jo_out_partial);
+! else if (opt->jo_out_cb != NULL)
+! func_unref(opt->jo_out_cb);
+! if (opt->jo_err_partial != NULL)
+! partial_unref(opt->jo_err_partial);
+! else if (opt->jo_err_cb != NULL)
+! func_unref(opt->jo_err_cb);
+! if (opt->jo_close_partial != NULL)
+! partial_unref(opt->jo_close_partial);
+! else if (opt->jo_close_cb != NULL)
+! func_unref(opt->jo_close_cb);
+! if (opt->jo_exit_partial != NULL)
+! partial_unref(opt->jo_exit_partial);
+! else if (opt->jo_exit_cb != NULL)
+! func_unref(opt->jo_exit_cb);
+ if (opt->jo_env != NULL)
+ dict_unref(opt->jo_env);
+ }
+--- 4530,4555 ----
+ void
+ free_job_options(jobopt_T *opt)
+ {
+! if (opt->jo_callback.cb_partial != NULL)
+! partial_unref(opt->jo_callback.cb_partial);
+! else if (opt->jo_callback.cb_name != NULL)
+! func_unref(opt->jo_callback.cb_name);
+! if (opt->jo_out_cb.cb_partial != NULL)
+! partial_unref(opt->jo_out_cb.cb_partial);
+! else if (opt->jo_out_cb.cb_name != NULL)
+! func_unref(opt->jo_out_cb.cb_name);
+! if (opt->jo_err_cb.cb_partial != NULL)
+! partial_unref(opt->jo_err_cb.cb_partial);
+! else if (opt->jo_err_cb.cb_name != NULL)
+! func_unref(opt->jo_err_cb.cb_name);
+! if (opt->jo_close_cb.cb_partial != NULL)
+! partial_unref(opt->jo_close_cb.cb_partial);
+! else if (opt->jo_close_cb.cb_name != NULL)
+! func_unref(opt->jo_close_cb.cb_name);
+! if (opt->jo_exit_cb.cb_partial != NULL)
+! partial_unref(opt->jo_exit_cb.cb_partial);
+! else if (opt->jo_exit_cb.cb_name != NULL)
+! func_unref(opt->jo_exit_cb.cb_name);
+ if (opt->jo_env != NULL)
+ dict_unref(opt->jo_env);
+ }
+***************
+*** 4771,4778 ****
+ if (!(supported & JO_CALLBACK))
+ break;
+ opt->jo_set |= JO_CALLBACK;
+! opt->jo_callback = get_callback(item, &opt->jo_partial);
+! if (opt->jo_callback == NULL)
+ {
+ semsg(_(e_invargval), "callback");
+ return FAIL;
+--- 4742,4749 ----
+ if (!(supported & JO_CALLBACK))
+ break;
+ opt->jo_set |= JO_CALLBACK;
+! opt->jo_callback = get_callback(item);
+! if (opt->jo_callback.cb_name == NULL)
+ {
+ semsg(_(e_invargval), "callback");
+ return FAIL;
+***************
+*** 4783,4790 ****
+ if (!(supported & JO_OUT_CALLBACK))
+ break;
+ opt->jo_set |= JO_OUT_CALLBACK;
+! opt->jo_out_cb = get_callback(item, &opt->jo_out_partial);
+! if (opt->jo_out_cb == NULL)
+ {
+ semsg(_(e_invargval), "out_cb");
+ return FAIL;
+--- 4754,4761 ----
+ if (!(supported & JO_OUT_CALLBACK))
+ break;
+ opt->jo_set |= JO_OUT_CALLBACK;
+! opt->jo_out_cb = get_callback(item);
+! if (opt->jo_out_cb.cb_name == NULL)
+ {
+ semsg(_(e_invargval), "out_cb");
+ return FAIL;
+***************
+*** 4795,4802 ****
+ if (!(supported & JO_ERR_CALLBACK))
+ break;
+ opt->jo_set |= JO_ERR_CALLBACK;
+! opt->jo_err_cb = get_callback(item, &opt->jo_err_partial);
+! if (opt->jo_err_cb == NULL)
+ {
+ semsg(_(e_invargval), "err_cb");
+ return FAIL;
+--- 4766,4773 ----
+ if (!(supported & JO_ERR_CALLBACK))
+ break;
+ opt->jo_set |= JO_ERR_CALLBACK;
+! opt->jo_err_cb = get_callback(item);
+! if (opt->jo_err_cb.cb_name == NULL)
+ {
+ semsg(_(e_invargval), "err_cb");
+ return FAIL;
+***************
+*** 4807,4814 ****
+ if (!(supported & JO_CLOSE_CALLBACK))
+ break;
+ opt->jo_set |= JO_CLOSE_CALLBACK;
+! opt->jo_close_cb = get_callback(item, &opt->jo_close_partial);
+! if (opt->jo_close_cb == NULL)
+ {
+ semsg(_(e_invargval), "close_cb");
+ return FAIL;
+--- 4778,4785 ----
+ if (!(supported & JO_CLOSE_CALLBACK))
+ break;
+ opt->jo_set |= JO_CLOSE_CALLBACK;
+! opt->jo_close_cb = get_callback(item);
+! if (opt->jo_close_cb.cb_name == NULL)
+ {
+ semsg(_(e_invargval), "close_cb");
+ return FAIL;
+***************
+*** 4833,4840 ****
+ if (!(supported & JO_EXIT_CB))
+ break;
+ opt->jo_set |= JO_EXIT_CB;
+! opt->jo_exit_cb = get_callback(item, &opt->jo_exit_partial);
+! if (opt->jo_exit_cb == NULL)
+ {
+ semsg(_(e_invargval), "exit_cb");
+ return FAIL;
+--- 4804,4811 ----
+ if (!(supported & JO_EXIT_CB))
+ break;
+ opt->jo_set |= JO_EXIT_CB;
+! opt->jo_exit_cb = get_callback(item);
+! if (opt->jo_exit_cb.cb_name == NULL)
+ {
+ semsg(_(e_invargval), "exit_cb");
+ return FAIL;
+***************
+*** 5201,5207 ****
+ #ifdef MSWIN
+ vim_free(job->jv_tty_type);
+ #endif
+! free_callback(job->jv_exit_cb, job->jv_exit_partial);
+ if (job->jv_argv != NULL)
+ {
+ for (i = 0; job->jv_argv[i] != NULL; i++)
+--- 5172,5178 ----
+ #ifdef MSWIN
+ vim_free(job->jv_tty_type);
+ #endif
+! free_callback(&job->jv_exit_cb);
+ if (job->jv_argv != NULL)
+ {
+ for (i = 0; job->jv_argv[i] != NULL; i++)
+***************
+*** 5289,5295 ****
+ job_need_end_check(job_T *job)
+ {
+ return job->jv_status == JOB_STARTED
+! && (job->jv_stoponexit != NULL || job->jv_exit_cb != NULL);
+ }
+
+ /*
+--- 5260,5266 ----
+ job_need_end_check(job_T *job)
+ {
+ return job->jv_status == JOB_STARTED
+! && (job->jv_stoponexit != NULL || job->jv_exit_cb.cb_name != NULL);
+ }
+
+ /*
+***************
+*** 5465,5486 ****
+ if (job->jv_channel != NULL)
+ ch_close_part(job->jv_channel, PART_IN);
+
+! if (job->jv_exit_cb != NULL)
+ {
+ typval_T argv[3];
+ typval_T rettv;
+ int dummy;
+
+ /* Invoke the exit callback. Make sure the refcount is > 0. */
+! ch_log(job->jv_channel, "Invoking exit callback %s", job->jv_exit_cb);
+ ++job->jv_refcount;
+ argv[0].v_type = VAR_JOB;
+ argv[0].vval.v_job = job;
+ argv[1].v_type = VAR_NUMBER;
+ argv[1].vval.v_number = job->jv_exitval;
+! call_func(job->jv_exit_cb, -1,
+! &rettv, 2, argv, NULL, 0L, 0L, &dummy, TRUE,
+! job->jv_exit_partial, NULL);
+ clear_tv(&rettv);
+ --job->jv_refcount;
+ channel_need_redraw = TRUE;
+--- 5436,5457 ----
+ if (job->jv_channel != NULL)
+ ch_close_part(job->jv_channel, PART_IN);
+
+! if (job->jv_exit_cb.cb_name != NULL)
+ {
+ typval_T argv[3];
+ typval_T rettv;
+ int dummy;
+
+ /* Invoke the exit callback. Make sure the refcount is > 0. */
+! ch_log(job->jv_channel, "Invoking exit callback %s",
+! job->jv_exit_cb.cb_name);
+ ++job->jv_refcount;
+ argv[0].v_type = VAR_JOB;
+ argv[0].vval.v_job = job;
+ argv[1].v_type = VAR_NUMBER;
+ argv[1].vval.v_number = job->jv_exitval;
+! call_callback(&job->jv_exit_cb, -1,
+! &rettv, 2, argv, NULL, 0L, 0L, &dummy, TRUE, NULL);
+ clear_tv(&rettv);
+ --job->jv_refcount;
+ channel_need_redraw = TRUE;
+***************
+*** 5622,5647 ****
+ }
+ if (opt->jo_set & JO_EXIT_CB)
+ {
+! free_callback(job->jv_exit_cb, job->jv_exit_partial);
+! if (opt->jo_exit_cb == NULL || *opt->jo_exit_cb == NUL)
+ {
+! job->jv_exit_cb = NULL;
+! job->jv_exit_partial = NULL;
+ }
+ else
+! {
+! job->jv_exit_partial = opt->jo_exit_partial;
+! if (job->jv_exit_partial != NULL)
+! {
+! job->jv_exit_cb = opt->jo_exit_cb;
+! ++job->jv_exit_partial->pt_refcount;
+! }
+! else
+! {
+! job->jv_exit_cb = vim_strsave(opt->jo_exit_cb);
+! func_ref(job->jv_exit_cb);
+! }
+! }
+ }
+ }
+
+--- 5593,5606 ----
+ }
+ if (opt->jo_set & JO_EXIT_CB)
+ {
+! free_callback(&job->jv_exit_cb);
+! if (opt->jo_exit_cb.cb_name == NULL || *opt->jo_exit_cb.cb_name == NUL)
+ {
+! job->jv_exit_cb.cb_name = NULL;
+! job->jv_exit_cb.cb_partial = NULL;
+ }
+ else
+! copy_callback(&job->jv_exit_cb, &opt->jo_exit_cb);
+ }
+ }
+
+***************
+*** 5959,5965 ****
+ dict_add_string(dict, "tty_out", job->jv_tty_out);
+
+ dict_add_number(dict, "exitval", job->jv_exitval);
+! dict_add_string(dict, "exit_cb", job->jv_exit_cb);
+ dict_add_string(dict, "stoponexit", job->jv_stoponexit);
+ #ifdef UNIX
+ dict_add_string(dict, "termsig", job->jv_termsig);
+--- 5918,5924 ----
+ dict_add_string(dict, "tty_out", job->jv_tty_out);
+
+ dict_add_number(dict, "exitval", job->jv_exitval);
+! dict_add_string(dict, "exit_cb", job->jv_exit_cb.cb_name);
+ dict_add_string(dict, "stoponexit", job->jv_stoponexit);
+ #ifdef UNIX
+ dict_add_string(dict, "termsig", job->jv_termsig);
+***************
+*** 6059,6065 ****
+ curwin->w_cursor.lnum = lnum + 1;
+ curwin->w_cursor.col = 0;
+
+! if (curbuf->b_prompt_callback == NULL || *curbuf->b_prompt_callback == NUL)
+ return;
+ text = ml_get(lnum);
+ prompt = prompt_text();
+--- 6018,6025 ----
+ curwin->w_cursor.lnum = lnum + 1;
+ curwin->w_cursor.col = 0;
+
+! if (curbuf->b_prompt_callback.cb_name == NULL
+! || *curbuf->b_prompt_callback.cb_name == NUL)
+ return;
+ text = ml_get(lnum);
+ prompt = prompt_text();
+***************
+*** 6069,6077 ****
+ argv[0].vval.v_string = vim_strsave(text);
+ argv[1].v_type = VAR_UNKNOWN;
+
+! call_func(curbuf->b_prompt_callback, -1,
+! &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
+! curbuf->b_prompt_partial, NULL);
+ clear_tv(&argv[0]);
+ clear_tv(&rettv);
+ }
+--- 6029,6036 ----
+ argv[0].vval.v_string = vim_strsave(text);
+ argv[1].v_type = VAR_UNKNOWN;
+
+! call_callback(&curbuf->b_prompt_callback, -1,
+! &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE, NULL);
+ clear_tv(&argv[0]);
+ clear_tv(&rettv);
+ }
+***************
+*** 6086,6100 ****
+ int dummy;
+ typval_T argv[1];
+
+! if (curbuf->b_prompt_interrupt == NULL
+! || *curbuf->b_prompt_interrupt == NUL)
+ return FALSE;
+ argv[0].v_type = VAR_UNKNOWN;
+
+ got_int = FALSE; // don't skip executing commands
+! call_func(curbuf->b_prompt_interrupt, -1,
+! &rettv, 0, argv, NULL, 0L, 0L, &dummy, TRUE,
+! curbuf->b_prompt_int_partial, NULL);
+ clear_tv(&rettv);
+ return TRUE;
+ }
+--- 6045,6058 ----
+ int dummy;
+ typval_T argv[1];
+
+! if (curbuf->b_prompt_interrupt.cb_name == NULL
+! || *curbuf->b_prompt_interrupt.cb_name == NUL)
+ return FALSE;
+ argv[0].v_type = VAR_UNKNOWN;
+
+ got_int = FALSE; // don't skip executing commands
+! call_callback(&curbuf->b_prompt_interrupt, -1,
+! &rettv, 0, argv, NULL, 0L, 0L, &dummy, TRUE, NULL);
+ clear_tv(&rettv);
+ return TRUE;
+ }
+*** ../vim-8.1.1436/src/proto/channel.pro 2019-01-12 22:47:01.264088074 +0100
+--- src/proto/channel.pro 2019-05-31 23:09:12.017119094 +0200
+***************
+*** 12,18 ****
+ void channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err);
+ void channel_set_job(channel_T *channel, job_T *job, jobopt_T *options);
+ void channel_set_options(channel_T *channel, jobopt_T *opt);
+! void channel_set_req_callback(channel_T *channel, ch_part_T part, char_u *callback, partial_T *partial, int id);
+ void channel_buffer_free(buf_T *buf);
+ void channel_write_any_lines(void);
+ void channel_write_new_lines(buf_T *buf);
+--- 12,18 ----
+ void channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err);
+ void channel_set_job(channel_T *channel, job_T *job, jobopt_T *options);
+ void channel_set_options(channel_T *channel, jobopt_T *opt);
+! void channel_set_req_callback(channel_T *channel, ch_part_T part, callback_T *callback, int id);
+ void channel_buffer_free(buf_T *buf);
+ void channel_write_any_lines(void);
+ void channel_write_new_lines(buf_T *buf);
+*** ../vim-8.1.1436/src/buffer.c 2019-05-30 22:32:10.804178558 +0200
+--- src/buffer.c 2019-05-31 22:28:27.560903172 +0200
+***************
+*** 862,868 ****
+ #endif
+ #ifdef FEAT_JOB_CHANNEL
+ vim_free(buf->b_prompt_text);
+! free_callback(buf->b_prompt_callback, buf->b_prompt_partial);
+ #endif
+
+ buf_hashtab_remove(buf);
+--- 862,868 ----
+ #endif
+ #ifdef FEAT_JOB_CHANNEL
+ vim_free(buf->b_prompt_text);
+! free_callback(&buf->b_prompt_callback);
+ #endif
+
+ buf_hashtab_remove(buf);
+*** ../vim-8.1.1436/src/userfunc.c 2019-05-28 23:08:12.080648632 +0200
+--- src/userfunc.c 2019-05-31 22:55:38.981219323 +0200
+***************
+*** 1447,1452 ****
+--- 1447,1476 ----
+ }
+
+ /*
++ * Invoke call_func() with a callback.
++ */
++ int
++ call_callback(
++ callback_T *callback,
++ int len, // length of "name" or -1 to use strlen()
++ typval_T *rettv, // return value goes here
++ int argcount, // number of "argvars"
++ typval_T *argvars, // vars for arguments, must have "argcount"
++ // PLUS ONE elements!
++ int (* argv_func)(int, typval_T *, int),
++ // function to fill in argvars
++ linenr_T firstline, // first line of range
++ linenr_T lastline, // last line of range
++ int *doesrange, // return: function handled range
++ int evaluate,
++ dict_T *selfdict) // Dictionary for "self"
++ {
++ return call_func(callback->cb_name, len, rettv, argcount, argvars,
++ argv_func, firstline, lastline, doesrange, evaluate,
++ callback->cb_partial, selfdict);
++ }
++
++ /*
+ * Call a function with its resolved parameters
+ *
+ * "argv_func", when not NULL, can be used to fill in arguments only when the
+*** ../vim-8.1.1436/src/proto/userfunc.pro 2018-12-18 21:56:25.084495836 +0100
+--- src/proto/userfunc.pro 2019-05-31 22:55:34.269243311 +0200
+***************
+*** 8,13 ****
+--- 8,14 ----
+ void restore_funccal(void);
+ void free_all_functions(void);
+ int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv);
++ int call_callback(callback_T *callback, int len, typval_T *rettv, int argcount, typval_T *argvars, int (*argv_func)(int, typval_T *, int), linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict);
+ int call_func(char_u *funcname, int len, typval_T *rettv, int argcount_in, typval_T *argvars_in, int (*argv_func)(int, typval_T *, int), linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, partial_T *partial, dict_T *selfdict_in);
+ char_u *trans_function_name(char_u **pp, int skip, int flags, funcdict_T *fdp, partial_T **partial);
+ void ex_function(exarg_T *eap);
+*** ../vim-8.1.1436/src/eval.c 2019-05-28 23:08:12.056648758 +0200
+--- src/eval.c 2019-05-31 23:15:01.475368819 +0200
+***************
+*** 5920,5929 ****
+ dtv.vval.v_channel = job->jv_channel;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+! if (job->jv_exit_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+! dtv.vval.v_partial = job->jv_exit_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ }
+--- 5920,5929 ----
+ dtv.vval.v_channel = job->jv_channel;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+! if (job->jv_exit_cb.cb_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+! dtv.vval.v_partial = job->jv_exit_cb.cb_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ }
+***************
+*** 5946,5974 ****
+ set_ref_in_item(jq->jq_value, copyID, ht_stack, list_stack);
+ for (cq = ch->ch_part[part].ch_cb_head.cq_next; cq != NULL;
+ cq = cq->cq_next)
+! if (cq->cq_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+! dtv.vval.v_partial = cq->cq_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+! if (ch->ch_part[part].ch_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+! dtv.vval.v_partial = ch->ch_part[part].ch_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ }
+! if (ch->ch_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+! dtv.vval.v_partial = ch->ch_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+! if (ch->ch_close_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+! dtv.vval.v_partial = ch->ch_close_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ }
+--- 5946,5975 ----
+ set_ref_in_item(jq->jq_value, copyID, ht_stack, list_stack);
+ for (cq = ch->ch_part[part].ch_cb_head.cq_next; cq != NULL;
+ cq = cq->cq_next)
+! if (cq->cq_callback.cb_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+! dtv.vval.v_partial = cq->cq_callback.cb_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+! if (ch->ch_part[part].ch_callback.cb_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+! dtv.vval.v_partial =
+! ch->ch_part[part].ch_callback.cb_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ }
+! if (ch->ch_callback.cb_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+! dtv.vval.v_partial = ch->ch_callback.cb_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+! if (ch->ch_close_cb.cb_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+! dtv.vval.v_partial = ch->ch_close_cb.cb_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ }
+*** ../vim-8.1.1436/src/ex_cmds2.c 2019-05-28 23:08:12.060648736 +0200
+--- src/ex_cmds2.c 2019-05-31 23:06:01.714074164 +0200
+***************
+*** 282,288 ****
+ static void
+ free_timer(timer_T *timer)
+ {
+! free_callback(timer->tr_callback, timer->tr_partial);
+ vim_free(timer);
+ }
+
+--- 282,288 ----
+ static void
+ free_timer(timer_T *timer)
+ {
+! free_callback(&timer->tr_callback);
+ vim_free(timer);
+ }
+
+***************
+*** 325,333 ****
+ argv[0].vval.v_number = (varnumber_T)timer->tr_id;
+ argv[1].v_type = VAR_UNKNOWN;
+
+! call_func(timer->tr_callback, -1,
+! &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
+! timer->tr_partial, NULL);
+ clear_tv(&rettv);
+ }
+
+--- 325,332 ----
+ argv[0].vval.v_number = (varnumber_T)timer->tr_id;
+ argv[1].v_type = VAR_UNKNOWN;
+
+! call_callback(&timer->tr_callback, -1,
+! &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE, NULL);
+ clear_tv(&rettv);
+ }
+
+***************
+*** 542,558 ****
+ {
+ if (dict_add(dict, di) == FAIL)
+ vim_free(di);
+- else if (timer->tr_partial != NULL)
+- {
+- di->di_tv.v_type = VAR_PARTIAL;
+- di->di_tv.vval.v_partial = timer->tr_partial;
+- ++timer->tr_partial->pt_refcount;
+- }
+ else
+! {
+! di->di_tv.v_type = VAR_FUNC;
+! di->di_tv.vval.v_string = vim_strsave(timer->tr_callback);
+! }
+ }
+ }
+
+--- 541,548 ----
+ {
+ if (dict_add(dict, di) == FAIL)
+ vim_free(di);
+ else
+! put_callback(&timer->tr_callback, &di->di_tv);
+ }
+ }
+
+***************
+*** 578,592 ****
+
+ for (timer = first_timer; timer != NULL; timer = timer->tr_next)
+ {
+! if (timer->tr_partial != NULL)
+ {
+ tv.v_type = VAR_PARTIAL;
+! tv.vval.v_partial = timer->tr_partial;
+ }
+ else
+ {
+ tv.v_type = VAR_FUNC;
+! tv.vval.v_string = timer->tr_callback;
+ }
+ abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL);
+ }
+--- 568,582 ----
+
+ for (timer = first_timer; timer != NULL; timer = timer->tr_next)
+ {
+! if (timer->tr_callback.cb_partial != NULL)
+ {
+ tv.v_type = VAR_PARTIAL;
+! tv.vval.v_partial = timer->tr_callback.cb_partial;
+ }
+ else
+ {
+ tv.v_type = VAR_FUNC;
+! tv.vval.v_string = timer->tr_callback.cb_name;
+ }
+ abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL);
+ }
+*** ../vim-8.1.1436/src/popupwin.c 2019-05-30 22:32:10.804178558 +0200
+--- src/popupwin.c 2019-05-31 23:07:27.541643206 +0200
+***************
+*** 149,158 ****
+ if (get_lambda_tv(&ptr, &tv, TRUE) == OK)
+ {
+ wp->w_popup_timer = create_timer(nr, 0);
+! wp->w_popup_timer->tr_callback =
+ vim_strsave(partial_name(tv.vval.v_partial));
+! func_ref(wp->w_popup_timer->tr_callback);
+! wp->w_popup_timer->tr_partial = tv.vval.v_partial;
+ }
+ }
+ #endif
+--- 149,158 ----
+ if (get_lambda_tv(&ptr, &tv, TRUE) == OK)
+ {
+ wp->w_popup_timer = create_timer(nr, 0);
+! wp->w_popup_timer->tr_callback.cb_name =
+ vim_strsave(partial_name(tv.vval.v_partial));
+! func_ref(wp->w_popup_timer->tr_callback.cb_name);
+! wp->w_popup_timer->tr_callback.cb_partial = tv.vval.v_partial;
+ }
+ }
+ #endif
+*** ../vim-8.1.1436/src/version.c 2019-05-31 20:42:04.694287075 +0200
+--- src/version.c 2019-06-01 13:19:22.800368900 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1437,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+70. ISDN lines are added to your house on a hourly basis
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1438 b/data/vim/patches/8.1.1438
new file mode 100644
index 000000000..8a586bd6a
--- /dev/null
+++ b/data/vim/patches/8.1.1438
@@ -0,0 +1,276 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1438
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1438
+Problem: Some commands cause trouble in a popup window.
+Solution: Add NOT_IN_POPUP_WINDOW.
+Files: src/macros.h, src/popupwin.c, src/proto/popupwin.pro,
+ src/ex_docmd.c, src/ex_cmds2.c, src/window.c,
+ src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1437/src/macros.h 2019-04-27 13:03:20.008715938 +0200
+--- src/macros.h 2019-06-01 13:53:42.718288890 +0200
+***************
+*** 339,341 ****
+--- 339,347 ----
+
+ /* Wether a command index indicates a user command. */
+ #define IS_USER_CMDIDX(idx) ((int)(idx) < 0)
++
++ #ifdef FEAT_TEXT_PROP
++ # define NOT_IN_POPUP_WINDOW not_in_popup_window()
++ #else
++ # define NOT_IN_POPUP_WINDOW 0
++ #endif
+*** ../vim-8.1.1437/src/popupwin.c 2019-06-01 13:28:30.273829492 +0200
+--- src/popupwin.c 2019-06-01 13:50:58.931115084 +0200
+***************
+*** 747,750 ****
+--- 747,762 ----
+ # endif
+ }
+ }
++
++ int
++ not_in_popup_window()
++ {
++ if (bt_popup(curwin->w_buffer))
++ {
++ emsg(_("E994: Not allowed in a popup window"));
++ return TRUE;
++ }
++ return FALSE;
++ }
++
+ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.1437/src/proto/popupwin.pro 2019-05-30 21:24:22.177201251 +0200
+--- src/proto/popupwin.pro 2019-06-01 13:52:58.006515140 +0200
+***************
+*** 13,16 ****
+--- 13,17 ----
+ void f_popup_move(typval_T *argvars, typval_T *rettv);
+ void f_popup_getpos(typval_T *argvars, typval_T *rettv);
+ void f_popup_getoptions(typval_T *argvars, typval_T *rettv);
++ int not_in_popup_window(void);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1437/src/ex_docmd.c 2019-05-28 23:08:12.060648736 +0200
+--- src/ex_docmd.c 2019-06-01 14:11:47.076719587 +0200
+***************
+*** 5452,5457 ****
+--- 5452,5459 ----
+ static void
+ ex_bunload(exarg_T *eap)
+ {
++ if (NOT_IN_POPUP_WINDOW)
++ return;
+ eap->errmsg = do_bufdel(
+ eap->cmdidx == CMD_bdelete ? DOBUF_DEL
+ : eap->cmdidx == CMD_bwipeout ? DOBUF_WIPE
+***************
+*** 5466,5471 ****
+--- 5468,5475 ----
+ static void
+ ex_buffer(exarg_T *eap)
+ {
++ if (NOT_IN_POPUP_WINDOW)
++ return;
+ if (*eap->arg)
+ eap->errmsg = e_trailing;
+ else
+***************
+*** 6768,6773 ****
+--- 6772,6780 ----
+ || eap->cmdidx == CMD_tabfind
+ || eap->cmdidx == CMD_tabnew;
+
++ if (NOT_IN_POPUP_WINDOW)
++ return;
++
+ #ifdef FEAT_GUI
+ need_mouse_correct = TRUE;
+ #endif
+***************
+*** 6895,6900 ****
+--- 6902,6909 ----
+ {
+ int tab_number;
+
++ if (NOT_IN_POPUP_WINDOW)
++ return;
+ switch (eap->cmdidx)
+ {
+ case CMD_tabfirst:
+***************
+*** 7146,7151 ****
+--- 7155,7162 ----
+ int need_hide;
+ int exmode_was = exmode_active;
+
++ if (NOT_IN_POPUP_WINDOW)
++ return;
+ /*
+ * ":vi" command ends Ex mode.
+ */
+*** ../vim-8.1.1437/src/ex_cmds2.c 2019-06-01 13:28:30.273829492 +0200
+--- src/ex_cmds2.c 2019-06-01 14:12:18.060559339 +0200
+***************
+*** 1864,1869 ****
+--- 1864,1871 ----
+ char_u *p;
+ int old_arg_idx = curwin->w_arg_idx;
+
++ if (NOT_IN_POPUP_WINDOW)
++ return;
+ if (argn < 0 || argn >= ARGCOUNT)
+ {
+ if (ARGCOUNT <= 1)
+*** ../vim-8.1.1437/src/window.c 2019-05-31 17:34:44.195465656 +0200
+--- src/window.c 2019-06-01 14:06:57.822214087 +0200
+***************
+*** 87,93 ****
+ #endif
+ char_u cbuf[40];
+
+! Prenum1 = Prenum == 0 ? 1 : Prenum;
+
+ #ifdef FEAT_CMDWIN
+ # define CHECK_CMDWIN \
+--- 87,94 ----
+ #endif
+ char_u cbuf[40];
+
+! if (NOT_IN_POPUP_WINDOW)
+! return;
+
+ #ifdef FEAT_CMDWIN
+ # define CHECK_CMDWIN \
+***************
+*** 102,107 ****
+--- 103,110 ----
+ # define CHECK_CMDWIN do { /**/ } while (0)
+ #endif
+
++ Prenum1 = Prenum == 0 ? 1 : Prenum;
++
+ switch (nchar)
+ {
+ /* split current window in two parts, horizontally */
+***************
+*** 732,737 ****
+--- 735,743 ----
+ int
+ win_split(int size, int flags)
+ {
++ if (NOT_IN_POPUP_WINDOW)
++ return FAIL;
++
+ /* When the ":tab" modifier was used open a new tab page instead. */
+ if (may_open_tabpage() == OK)
+ return OK;
+***************
+*** 1509,1515 ****
+ win_T *wp2;
+ int temp;
+
+! if (ONE_WINDOW) /* just one window */
+ {
+ beep_flush();
+ return;
+--- 1515,1523 ----
+ win_T *wp2;
+ int temp;
+
+! if (NOT_IN_POPUP_WINDOW)
+! return;
+! if (ONE_WINDOW) // just one window
+ {
+ beep_flush();
+ return;
+***************
+*** 2363,2368 ****
+--- 2371,2379 ----
+ tabpage_T *prev_curtab = curtab;
+ frame_T *win_frame = win->w_frame->fr_parent;
+
++ if (NOT_IN_POPUP_WINDOW)
++ return FAIL;
++
+ if (last_window())
+ {
+ emsg(_("E444: Cannot close last window"));
+***************
+*** 4221,4226 ****
+--- 4232,4239 ----
+ win_T *owp = curwin;
+ #endif
+
++ if (NOT_IN_POPUP_WINDOW)
++ return;
+ if (text_locked())
+ {
+ beep_flush();
+*** ../vim-8.1.1437/src/testdir/test_popupwin.vim 2019-05-31 17:34:44.195465656 +0200
+--- src/testdir/test_popupwin.vim 2019-06-01 14:12:32.116486630 +0200
+***************
+*** 108,115 ****
+ func Test_win_execute_closing_curwin()
+ split
+ let winid = popup_create('some text', {})
+! call win_execute(winid, winnr() .. "close")
+! call assert_equal(1, winnr())
+ popupclear
+ endfunc
+
+--- 108,134 ----
+ func Test_win_execute_closing_curwin()
+ split
+ let winid = popup_create('some text', {})
+! call assert_fails('call win_execute(winid, winnr() .. "close")', 'E994')
+! popupclear
+! endfunc
+!
+! func Test_win_execute_not_allowed()
+! let winid = popup_create('some text', {})
+! call assert_fails('call win_execute(winid, "split")', 'E994:')
+! call assert_fails('call win_execute(winid, "vsplit")', 'E994:')
+! call assert_fails('call win_execute(winid, "close")', 'E994:')
+! call assert_fails('call win_execute(winid, "bdelete")', 'E994:')
+! call assert_fails('call win_execute(winid, "tabnew")', 'E994:')
+! call assert_fails('call win_execute(winid, "tabnext")', 'E994:')
+! call assert_fails('call win_execute(winid, "next")', 'E994:')
+! call assert_fails('call win_execute(winid, "rewind")', 'E994:')
+! call assert_fails('call win_execute(winid, "buf")', 'E994:')
+! call assert_fails('call win_execute(winid, "edit")', 'E994:')
+! call assert_fails('call win_execute(winid, "enew")', 'E994:')
+! call assert_fails('call win_execute(winid, "wincmd x")', 'E994:')
+! call assert_fails('call win_execute(winid, "wincmd w")', 'E994:')
+! call assert_fails('call win_execute(winid, "wincmd t")', 'E994:')
+! call assert_fails('call win_execute(winid, "wincmd b")', 'E994:')
+ popupclear
+ endfunc
+
+*** ../vim-8.1.1437/src/version.c 2019-06-01 13:28:30.273829492 +0200
+--- src/version.c 2019-06-01 13:54:09.342153943 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1438,
+ /**/
+
+--
+"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.1439 b/data/vim/patches/8.1.1439
new file mode 100644
index 000000000..27c3d9a86
--- /dev/null
+++ b/data/vim/patches/8.1.1439
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1439
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1439
+Problem: Json_encode() is very slow for large results.
+Solution: In the growarray use a growth of at least 50%. (Ken Takata,
+ closes #4461)
+Files: src/misc2.c
+
+
+*** ../vim-8.1.1438/src/misc2.c 2019-05-28 23:08:12.068648696 +0200
+--- src/misc2.c 2019-06-01 14:31:53.506164187 +0200
+***************
+*** 2057,2062 ****
+--- 2057,2069 ----
+ {
+ if (n < gap->ga_growsize)
+ n = gap->ga_growsize;
++
++ // A linear growth is very inefficient when the array grows big. This
++ // is a compromise between allocating memory that won't be used and too
++ // many copy operations. A factor of 1.5 seems reasonable.
++ if (n < gap->ga_len / 2)
++ n = gap->ga_len / 2;
++
+ new_len = gap->ga_itemsize * (gap->ga_len + n);
+ pp = vim_realloc(gap->ga_data, new_len);
+ if (pp == NULL)
+*** ../vim-8.1.1438/src/version.c 2019-06-01 14:15:49.535433551 +0200
+--- src/version.c 2019-06-01 14:33:04.925784267 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1439,
+ /**/
+
+--
+Proof techniques #2: Proof by Oddity.
+ SAMPLE: To prove that horses have an infinite number of legs.
+(1) Horses have an even number of legs.
+(2) They have two legs in back and fore legs in front.
+(3) This makes a total of six legs, which certainly is an odd number of
+ legs for a horse.
+(4) But the only number that is both odd and even is infinity.
+(5) Therefore, horses must have an infinite number of legs.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1440 b/data/vim/patches/8.1.1440
new file mode 100644
index 000000000..ca08cdaa0
--- /dev/null
+++ b/data/vim/patches/8.1.1440
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1440
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1440
+Problem: Win_execute() test fails.
+Solution: Adjust the expected error number. Move to popup test.
+Files: src/testdir/test_execute_func.vim, src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1439/src/testdir/test_execute_func.vim 2019-05-29 21:44:30.764788713 +0200
+--- src/testdir/test_execute_func.vim 2019-06-01 17:04:19.924870042 +0200
+***************
+*** 94,101 ****
+ let line = win_execute(popupwin, 'echo getline(1)')
+ call assert_match('the popup win', line)
+
+- call assert_fails('call win_execute(popupwin, "bwipe!")', 'E937:')
+-
+ call popup_close(popupwin)
+ endif
+
+--- 94,99 ----
+*** ../vim-8.1.1439/src/testdir/test_popupwin.vim 2019-06-01 14:15:49.535433551 +0200
+--- src/testdir/test_popupwin.vim 2019-06-01 17:04:10.768916509 +0200
+***************
+*** 118,123 ****
+--- 118,124 ----
+ call assert_fails('call win_execute(winid, "vsplit")', 'E994:')
+ call assert_fails('call win_execute(winid, "close")', 'E994:')
+ call assert_fails('call win_execute(winid, "bdelete")', 'E994:')
++ call assert_fails('call win_execute(winid, "bwipe!")', 'E994:')
+ call assert_fails('call win_execute(winid, "tabnew")', 'E994:')
+ call assert_fails('call win_execute(winid, "tabnext")', 'E994:')
+ call assert_fails('call win_execute(winid, "next")', 'E994:')
+*** ../vim-8.1.1439/src/version.c 2019-06-01 14:36:22.020738812 +0200
+--- src/version.c 2019-06-01 17:05:31.472506995 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1440,
+ /**/
+
+--
+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.1441 b/data/vim/patches/8.1.1441
new file mode 100644
index 000000000..14cfee80c
--- /dev/null
+++ b/data/vim/patches/8.1.1441
@@ -0,0 +1,679 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1441
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1441
+Problem: Popup window filter not yet implemented.
+Solution: Implement the popup filter.
+Files: src/structs.h, runtime/doc/popup.txt, src/popupwin.c,
+ src/proto/popupwin.pro, src/window.c, src/getchar.c, src/screen.c,
+ src/misc2.c, src/proto/misc2.pro, src/vim.h,
+ src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1440/src/structs.h 2019-06-01 13:28:30.265829531 +0200
+--- src/structs.h 2019-06-01 14:41:32.923095976 +0200
+***************
+*** 2890,2895 ****
+--- 2890,2896 ----
+ int w_wantcol; // "col" for popup window
+ varnumber_T w_popup_last_changedtick; // b:changedtick when position was
+ // computed
++ callback_T w_filter_cb; // popup filter callback
+ # if defined(FEAT_TIMERS)
+ timer_T *w_popup_timer; // timer for closing popup window
+ # endif
+*** ../vim-8.1.1440/runtime/doc/popup.txt 2019-05-30 22:32:10.804178558 +0200
+--- runtime/doc/popup.txt 2019-06-01 17:08:46.906685908 +0200
+***************
+*** 13,21 ****
+ 3. Examples |popup-examples|
+
+
+! {not available if the |+eval| feature was disabled at compile time}
+! {not able to use text properties if the |+textprop| feature was disabled at
+! compile time}
+
+ ==============================================================================
+ 1. Introduction *popup-intro*
+--- 13,19 ----
+ 3. Examples |popup-examples|
+
+
+! {not available if the |+textprop| feature was disabled at compile time}
+
+ ==============================================================================
+ 1. Introduction *popup-intro*
+***************
+*** 60,74 ****
+
+ The height of the window is normally equal to the number of, possibly
+ wrapping, lines in the buffer. It can be limited with the "maxheight"
+! property. You can use empty lines to increase the height.
+
+ The width of the window is normally equal to the longest line in the buffer.
+ It can be limited with the "maxwidth" property. You can use spaces to
+! increase the width.
+
+ By default the 'wrap' option is set, so that no text disappears. However, if
+ there is not enough space, some text may be invisible.
+
+
+
+ TODO:
+--- 58,79 ----
+
+ The height of the window is normally equal to the number of, possibly
+ wrapping, lines in the buffer. It can be limited with the "maxheight"
+! property. You can use empty lines to increase the height or the "minheight"
+! property.
+
+ The width of the window is normally equal to the longest line in the buffer.
+ It can be limited with the "maxwidth" property. You can use spaces to
+! increase the width or the "minwidth" property.
+
+ By default the 'wrap' option is set, so that no text disappears. However, if
+ there is not enough space, some text may be invisible.
+
++ Vim tries to show the popup in the location you specify. In some cases, e.g.
++ when the popup would go outside of the Vim window, it will show it somewhere
++ else. E.g. if you use `popup_atcursor()` the popup normally shows just above
++ the current cursor position, but if the cursor is close to the top of the Vim
++ window it will be placed below the cursor position.
++
+
+
+ TODO:
+***************
+*** 85,100 ****
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+! - Implement filter.
+! Check that popup_close() works in the filter.
+ - Implement padding
+ - Implement border
+- - Handle screen resize in screenalloc().
+ - Make redrawing more efficient and avoid flicker.
+ Store popup info in a mask, use the mask in screen_line()
+ Fix redrawing problem with completion.
+ Fix redrawing problem when scrolling non-current window
+ Fix redrawing the statusline on top of a popup
+ - Figure out the size and position better.
+ if wrapping splits a double-wide character
+ if wrapping inserts indent
+--- 90,109 ----
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+! - Invoke filter with character before mapping?
+! - Handle screen resize in screenalloc(). (Ben Jackson, #4467)
+! - Why does 'nrformats' leak from the popup window buffer???
+ - Implement padding
+ - Implement border
+ - Make redrawing more efficient and avoid flicker.
+ Store popup info in a mask, use the mask in screen_line()
++ Keep mask until next update_screen(), find differences and redraw affected
++ windows/lines
+ Fix redrawing problem with completion.
+ Fix redrawing problem when scrolling non-current window
+ Fix redrawing the statusline on top of a popup
++ - Disable commands, feedkeys(), CTRL-W, etc. in a popup window.
++ Use NOT_IN_POPUP_WINDOW.
+ - Figure out the size and position better.
+ if wrapping splits a double-wide character
+ if wrapping inserts indent
+***************
+*** 114,120 ****
+ - a string
+ - a list of strings
+ - a list of text lines with text properties
+! {not implemented yet}
+ {options} is a dictionary with many possible entries.
+ See |popup_create-usage| for details.
+
+--- 123,129 ----
+ - a string
+ - a list of strings
+ - a list of text lines with text properties
+!
+ {options} is a dictionary with many possible entries.
+ See |popup_create-usage| for details.
+
+***************
+*** 376,382 ****
+ {not implemented yet}
+ filter a callback that can filter typed characters, see
+ |popup-filter|
+- {not implemented yet}
+ callback a callback to be used when the popup closes, e.g. when
+ using |popup_filter_menu()|, see |popup-callback|.
+ {not implemented yet}
+--- 385,390 ----
+***************
+*** 410,423 ****
+ type name of the text property type, as added with
+ |prop_type_add()|
+ transparent do not show these characters, show the text under it;
+! if there is an border character to the right or below
+ it will be made transparent as well
+ {not implemented yet}
+
+
+ POPUP FILTER *popup-filter*
+
+- {not implemented yet}
+ A callback that gets any typed keys while a popup is displayed. The filter is
+ not invoked when the popup is hidden.
+
+--- 418,430 ----
+ type name of the text property type, as added with
+ |prop_type_add()|
+ transparent do not show these characters, show the text under it;
+! if there is a border character to the right or below
+ it will be made transparent as well
+ {not implemented yet}
+
+
+ POPUP FILTER *popup-filter*
+
+ A callback that gets any typed keys while a popup is displayed. The filter is
+ not invoked when the popup is hidden.
+
+***************
+*** 428,437 ****
+ is called first.
+
+ The filter function is called with two arguments: the ID of the popup and the
+! key.
+
+ Some common key actions:
+! Esc close the popup
+ cursor keys select another entry
+ Tab accept current suggestion
+
+--- 435,457 ----
+ is called first.
+
+ The filter function is called with two arguments: the ID of the popup and the
+! key, e.g.: >
+! func MyFilter(winid, key)
+! if a:key == "\<F2>"
+! " do something
+! return 1
+! endif
+! if a:key == 'x'
+! call popup_close(a:winid)
+! return 1
+! endif
+! return 0
+! endfunc
+!
+! Currently the key is what results after any mapping. This may change...
+
+ Some common key actions:
+! x close the popup (see note below)
+ cursor keys select another entry
+ Tab accept current suggestion
+
+***************
+*** 442,447 ****
+--- 462,472 ----
+ Vim provides standard filters |popup_filter_menu()| and
+ |popup_filter_yesno()|.
+
++ Note that "x" is the normal way to close a popup. You may want to use Esc,
++ but since many keys start with an Esc character, there may be a delay before
++ Vim recognizes the Esc key. If you do use Esc, it is reecommended to set the
++ 'ttimeoutlen' option to 100 and set 'timeout' and/or 'ttimeout'.
++
+
+ POPUP CALLBACK *popup-callback*
+
+*** ../vim-8.1.1440/src/popupwin.c 2019-06-01 14:15:49.535433551 +0200
+--- src/popupwin.c 2019-06-01 16:50:12.413188030 +0200
+***************
+*** 149,173 ****
+ if (get_lambda_tv(&ptr, &tv, TRUE) == OK)
+ {
+ wp->w_popup_timer = create_timer(nr, 0);
+! wp->w_popup_timer->tr_callback.cb_name =
+! vim_strsave(partial_name(tv.vval.v_partial));
+! func_ref(wp->w_popup_timer->tr_callback.cb_name);
+! wp->w_popup_timer->tr_callback.cb_partial = tv.vval.v_partial;
+ }
+ }
+ #endif
+
+ // Option values resulting in setting an option.
+! str = dict_get_string(dict, (char_u *)"highlight", TRUE);
+ if (str != NULL)
+ set_string_option_direct_in_win(wp, (char_u *)"wincolor", -1,
+ str, OPT_FREE|OPT_LOCAL, 0);
+ di = dict_find(dict, (char_u *)"wrap", -1);
+ if (di != NULL)
+ {
+ nr = dict_get_number(dict, (char_u *)"wrap");
+ wp->w_p_wrap = nr != 0;
+ }
+ }
+
+ /*
+--- 149,181 ----
+ if (get_lambda_tv(&ptr, &tv, TRUE) == OK)
+ {
+ wp->w_popup_timer = create_timer(nr, 0);
+! wp->w_popup_timer->tr_callback = get_callback(&tv);
+! clear_tv(&tv);
+ }
+ }
+ #endif
+
+ // Option values resulting in setting an option.
+! str = dict_get_string(dict, (char_u *)"highlight", FALSE);
+ if (str != NULL)
+ set_string_option_direct_in_win(wp, (char_u *)"wincolor", -1,
+ str, OPT_FREE|OPT_LOCAL, 0);
++
+ di = dict_find(dict, (char_u *)"wrap", -1);
+ if (di != NULL)
+ {
+ nr = dict_get_number(dict, (char_u *)"wrap");
+ wp->w_p_wrap = nr != 0;
+ }
++
++ di = dict_find(dict, (char_u *)"filter", -1);
++ if (di != NULL)
++ {
++ callback_T callback = get_callback(&di->di_tv);
++
++ if (callback.cb_name != NULL)
++ set_callback(&wp->w_filter_cb, &callback);
++ }
+ }
+
+ /*
+***************
+*** 759,762 ****
+--- 767,875 ----
+ return FALSE;
+ }
+
++ /*
++ * Reset all the POPF_HANDLED flags in global popup windows and popup windows
++ * in the current tab.
++ */
++ void
++ popup_reset_handled()
++ {
++ win_T *wp;
++
++ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
++ wp->w_popup_flags &= ~POPF_HANDLED;
++ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
++ wp->w_popup_flags &= ~POPF_HANDLED;
++ }
++
++ /*
++ * Find the next visible popup where POPF_HANDLED is not set.
++ * Must have called popup_reset_handled() first.
++ * When "lowest" is TRUE find the popup with the lowest zindex, otherwise the
++ * popup with the highest zindex.
++ */
++ win_T *
++ find_next_popup(int lowest)
++ {
++ win_T *wp;
++ win_T *found_wp;
++ int found_zindex;
++
++ found_zindex = lowest ? INT_MAX : 0;
++ found_wp = NULL;
++ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
++ if ((wp->w_popup_flags & (POPF_HANDLED|POPF_HIDDEN)) == 0
++ && (lowest ? wp->w_zindex < found_zindex
++ : wp->w_zindex > found_zindex))
++ {
++ found_zindex = wp->w_zindex;
++ found_wp = wp;
++ }
++ for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
++ if ((wp->w_popup_flags & (POPF_HANDLED|POPF_HIDDEN)) == 0
++ && (lowest ? wp->w_zindex < found_zindex
++ : wp->w_zindex > found_zindex))
++ {
++ found_zindex = wp->w_zindex;
++ found_wp = wp;
++ }
++
++ if (found_wp != NULL)
++ found_wp->w_popup_flags |= POPF_HANDLED;
++ return found_wp;
++ }
++
++ /*
++ * Invoke the filter callback for window "wp" with typed character "c".
++ * Uses the global "mod_mask" for modifiers.
++ * Returns the return value of the filter.
++ * Careful: The filter may make "wp" invalid!
++ */
++ static int
++ invoke_popup_filter(win_T *wp, int c)
++ {
++ int res;
++ typval_T rettv;
++ int dummy;
++ typval_T argv[3];
++ char_u buf[NUMBUFLEN];
++
++ argv[0].v_type = VAR_NUMBER;
++ argv[0].vval.v_number = (varnumber_T)wp->w_id;
++
++ // Convert the number to a string, so that the function can use:
++ // if a:c == "\<F2>"
++ buf[special_to_buf(c, mod_mask, TRUE, buf)] = NUL;
++ argv[1].v_type = VAR_STRING;
++ argv[1].vval.v_string = vim_strsave(buf);
++
++ argv[2].v_type = VAR_UNKNOWN;
++
++ call_callback(&wp->w_filter_cb, -1,
++ &rettv, 2, argv, NULL, 0L, 0L, &dummy, TRUE, NULL);
++ res = tv_get_number(&rettv);
++ vim_free(argv[1].vval.v_string);
++ clear_tv(&rettv);
++ return res;
++ }
++
++ /*
++ * Called when "c" was typed: invoke popup filter callbacks.
++ * Returns TRUE when the character was consumed,
++ */
++ int
++ popup_do_filter(int c)
++ {
++ int res = FALSE;
++ win_T *wp;
++
++ popup_reset_handled();
++
++ while (!res && (wp = find_next_popup(FALSE)) != NULL)
++ if (wp->w_filter_cb.cb_name != NULL)
++ res = invoke_popup_filter(wp, c);
++
++ return res;
++ }
++
+ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.1440/src/proto/popupwin.pro 2019-06-01 14:15:49.535433551 +0200
+--- src/proto/popupwin.pro 2019-06-01 15:27:43.874215916 +0200
+***************
+*** 14,17 ****
+--- 14,20 ----
+ void f_popup_getpos(typval_T *argvars, typval_T *rettv);
+ void f_popup_getoptions(typval_T *argvars, typval_T *rettv);
+ int not_in_popup_window(void);
++ void popup_reset_handled(void);
++ win_T *find_next_popup(int lowest);
++ int popup_do_filter(int c);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1440/src/window.c 2019-06-01 14:15:49.535433551 +0200
+--- src/window.c 2019-06-01 14:45:04.693979677 +0200
+***************
+*** 4844,4849 ****
+--- 4844,4852 ----
+ #ifdef FEAT_MENU
+ remove_winbar(wp);
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ free_callback(&wp->w_filter_cb);
++ #endif
+
+ #ifdef FEAT_SYN_HL
+ vim_free(wp->w_p_cc_cols);
+*** ../vim-8.1.1440/src/getchar.c 2019-05-28 23:08:12.064648717 +0200
+--- src/getchar.c 2019-06-01 15:27:15.194364518 +0200
+***************
+*** 1801,1806 ****
+--- 1801,1810 ----
+ ui_remove_balloon();
+ }
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ if (popup_do_filter(c))
++ c = K_IGNORE;
++ #endif
+
+ return c;
+ }
+*** ../vim-8.1.1440/src/screen.c 2019-05-30 00:11:48.704086357 +0200
+--- src/screen.c 2019-06-01 15:27:52.722170128 +0200
+***************
+*** 996,1043 ****
+ update_popups(void)
+ {
+ win_T *wp;
+- win_T *lowest_wp;
+- int lowest_zindex;
+-
+- // Reset all the VALID_POPUP flags.
+- for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+- wp->w_popup_flags &= ~POPF_REDRAWN;
+- for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+- wp->w_popup_flags &= ~POPF_REDRAWN;
+
+ // TODO: don't redraw every popup every time.
+! for (;;)
+ {
+- // Find the window with the lowest zindex that hasn't been updated yet,
+- // so that the window with a higher zindex is drawn later, thus goes on
+- // top.
+- lowest_zindex = INT_MAX;
+- lowest_wp = NULL;
+- for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
+- if ((wp->w_popup_flags & (POPF_REDRAWN|POPF_HIDDEN)) == 0
+- && wp->w_zindex < lowest_zindex)
+- {
+- lowest_zindex = wp->w_zindex;
+- lowest_wp = wp;
+- }
+- for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
+- if ((wp->w_popup_flags & (POPF_REDRAWN|POPF_HIDDEN)) == 0
+- && wp->w_zindex < lowest_zindex)
+- {
+- lowest_zindex = wp->w_zindex;
+- lowest_wp = wp;
+- }
+-
+- if (lowest_wp == NULL)
+- break;
+-
+ // Recompute the position if the text changed.
+! if (lowest_wp->w_popup_last_changedtick
+! != CHANGEDTICK(lowest_wp->w_buffer))
+! popup_adjust_position(lowest_wp);
+
+! win_update(lowest_wp);
+! lowest_wp->w_popup_flags |= POPF_REDRAWN;
+ }
+ }
+ #endif
+--- 996,1014 ----
+ update_popups(void)
+ {
+ win_T *wp;
+
++ // Find the window with the lowest zindex that hasn't been updated yet,
++ // so that the window with a higher zindex is drawn later, thus goes on
++ // top.
+ // TODO: don't redraw every popup every time.
+! popup_reset_handled();
+! while ((wp = find_next_popup(TRUE)) != NULL)
+ {
+ // Recompute the position if the text changed.
+! if (wp->w_popup_last_changedtick != CHANGEDTICK(wp->w_buffer))
+! popup_adjust_position(wp);
+
+! win_update(wp);
+ }
+ }
+ #endif
+*** ../vim-8.1.1440/src/misc2.c 2019-06-01 14:36:22.020738812 +0200
+--- src/misc2.c 2019-06-01 16:19:53.258610026 +0200
+***************
+*** 2731,2747 ****
+ trans_special(
+ char_u **srcp,
+ char_u *dst,
+! int keycode, /* prefer key code, e.g. K_DEL instead of DEL */
+! int in_string) /* TRUE when inside a double quoted string */
+ {
+ int modifiers = 0;
+ int key;
+- int dlen = 0;
+
+ key = find_special_key(srcp, &modifiers, keycode, FALSE, in_string);
+ if (key == 0)
+ return 0;
+
+ /* Put the appropriate modifier in a string */
+ if (modifiers != 0)
+ {
+--- 2731,2761 ----
+ trans_special(
+ char_u **srcp,
+ char_u *dst,
+! int keycode, // prefer key code, e.g. K_DEL instead of DEL
+! int in_string) // TRUE when inside a double quoted string
+ {
+ int modifiers = 0;
+ int key;
+
+ key = find_special_key(srcp, &modifiers, keycode, FALSE, in_string);
+ if (key == 0)
+ return 0;
+
++ return special_to_buf(key, modifiers, keycode, dst);
++ }
++
++ /*
++ * Put the character sequence for "key" with "modifiers" into "dst" and return
++ * the resulting length.
++ * When "keycode" is TRUE prefer key code, e.g. K_DEL instead of DEL.
++ * The sequence is not NUL terminated.
++ * This is how characters in a string are encoded.
++ */
++ int
++ special_to_buf(int key, int modifiers, int keycode, char_u *dst)
++ {
++ int dlen = 0;
++
+ /* Put the appropriate modifier in a string */
+ if (modifiers != 0)
+ {
+*** ../vim-8.1.1440/src/proto/misc2.pro 2019-05-28 23:08:12.072648675 +0200
+--- src/proto/misc2.pro 2019-06-01 16:19:36.870691383 +0200
+***************
+*** 69,74 ****
+--- 69,75 ----
+ int handle_x_keys(int key);
+ char_u *get_special_key_name(int c, int modifiers);
+ int trans_special(char_u **srcp, char_u *dst, int keycode, int in_string);
++ int special_to_buf(int key, int modifiers, int keycode, char_u *dst);
+ int find_special_key(char_u **srcp, int *modp, int keycode, int keep_x_key, int in_string);
+ int extract_modifiers(int key, int *modp);
+ int find_special_key_in_table(int c);
+*** ../vim-8.1.1440/src/vim.h 2019-05-28 23:08:12.080648632 +0200
+--- src/vim.h 2019-06-01 15:15:00.158051300 +0200
+***************
+*** 615,621 ****
+
+ // Values for w_popup_flags.
+ #define POPF_HIDDEN 1 // popup is not displayed
+! #define POPF_REDRAWN 2 // popup was just redrawn
+
+ /*
+ * Terminal highlighting attribute bits.
+--- 615,621 ----
+
+ // Values for w_popup_flags.
+ #define POPF_HIDDEN 1 // popup is not displayed
+! #define POPF_HANDLED 2 // popup was just redrawn or filtered
+
+ /*
+ * Terminal highlighting attribute bits.
+*** ../vim-8.1.1440/src/testdir/test_popupwin.vim 2019-06-01 17:06:22.688018611 +0200
+--- src/testdir/test_popupwin.vim 2019-06-01 17:04:10.768916509 +0200
+***************
+*** 473,475 ****
+--- 473,518 ----
+
+ bwipe!
+ endfunc
++
++ func Test_popup_filter()
++ new
++ call setline(1, 'some text')
++
++ func MyPopupFilter(winid, c)
++ if a:c == 'e'
++ let g:eaten = 'e'
++ return 1
++ endif
++ if a:c == '0'
++ let g:ignored = '0'
++ return 0
++ endif
++ if a:c == 'x'
++ call popup_close(a:winid)
++ return 1
++ endif
++ return 0
++ endfunc
++
++ let winid = popup_create('something', {'filter': 'MyPopupFilter'})
++ redraw
++
++ " e is consumed by the filter
++ call feedkeys('e', 'xt')
++ call assert_equal('e', g:eaten)
++
++ " 0 is ignored by the filter
++ normal $
++ call assert_equal(9, getcurpos()[2])
++ call feedkeys('0', 'xt')
++ call assert_equal('0', g:ignored)
++ call assert_equal(1, getcurpos()[2])
++
++ " x closes the popup
++ call feedkeys('x', 'xt')
++ call assert_equal('e', g:eaten)
++ call assert_equal(-1, winbufnr(winid))
++
++ delfunc MyPopupFilter
++ popupclear
++ endfunc
+*** ../vim-8.1.1440/src/version.c 2019-06-01 17:06:22.688018611 +0200
+--- src/version.c 2019-06-01 17:07:13.767529586 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1441,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+75. You start wondering whether you could actually upgrade your brain
+ with a Pentium Pro microprocessor 80. The upgrade works just fine.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1442 b/data/vim/patches/8.1.1442
new file mode 100644
index 000000000..5095c7ba8
--- /dev/null
+++ b/data/vim/patches/8.1.1442
@@ -0,0 +1,81 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1442
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1442
+Problem: Popup windows not considered when the Vim window is resized.
+ (Ben Jackson)
+Solution: Reallocate the w_lines structure. (closes #4467)
+Files: src/screen.c
+
+
+*** ../vim-8.1.1441/src/screen.c 2019-06-01 17:13:15.884517713 +0200
+--- src/screen.c 2019-06-01 18:06:21.022869626 +0200
+***************
+*** 8892,8897 ****
+--- 8892,8906 ----
+ win_free_lsize(wp);
+ if (aucmd_win != NULL)
+ win_free_lsize(aucmd_win);
++ #ifdef FEAT_TEXT_PROP
++ // global popup windows
++ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
++ win_free_lsize(wp);
++ // tab-local popup windows
++ FOR_ALL_TABPAGES(tp)
++ for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
++ win_free_lsize(wp);
++ #endif
+
+ new_ScreenLines = LALLOC_MULT(schar_T, (Rows + 1) * Columns);
+ vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T *) * MAX_MCO);
+***************
+*** 8920,8925 ****
+--- 8929,8952 ----
+ if (aucmd_win != NULL && aucmd_win->w_lines == NULL
+ && win_alloc_lines(aucmd_win) == FAIL)
+ outofmem = TRUE;
++ #ifdef FEAT_TEXT_PROP
++ // global popup windows
++ for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
++ if (win_alloc_lines(wp) == FAIL)
++ {
++ outofmem = TRUE;
++ goto give_up;
++ }
++ // tab-local popup windows
++ FOR_ALL_TABPAGES(tp)
++ for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
++ if (win_alloc_lines(wp) == FAIL)
++ {
++ outofmem = TRUE;
++ goto give_up;
++ }
++ #endif
++
+ give_up:
+
+ for (i = 0; i < p_mco; ++i)
+*** ../vim-8.1.1441/src/version.c 2019-06-01 17:13:15.884517713 +0200
+--- src/version.c 2019-06-01 18:01:48.076645123 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1442,
+ /**/
+
+--
+If bankers can count, how come they have eight windows and
+only four tellers?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1443 b/data/vim/patches/8.1.1443
new file mode 100644
index 000000000..3f3199aa0
--- /dev/null
+++ b/data/vim/patches/8.1.1443
@@ -0,0 +1,501 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1443
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1443
+Problem: Popup window padding and border not implemented yet.
+Solution: Implement padding and border. Add core position and size to
+ popup_getpos().
+Files: src/structs.h, src/popupwin.c, src/screen.c,
+ src/testdir/test_popupwin.vim,
+ src/testdir/dumps/Test_popupwin_20.dump, runtime/doc/popup.txt
+
+
+*** ../vim-8.1.1442/src/structs.h 2019-06-01 17:13:15.880517743 +0200
+--- src/structs.h 2019-06-01 18:13:59.147913309 +0200
+***************
+*** 2888,2893 ****
+--- 2888,2895 ----
+ int w_maxwidth; // "maxwidth" for popup window
+ int w_wantline; // "line" for popup window
+ int w_wantcol; // "col" for popup window
++ int w_popup_padding[4]; // popup padding top/right/bot/left
++ int w_popup_border[4]; // popup border top/right/bot/left
+ varnumber_T w_popup_last_changedtick; // b:changedtick when position was
+ // computed
+ callback_T w_filter_cb; // popup filter callback
+*** ../vim-8.1.1442/src/popupwin.c 2019-06-01 17:13:15.880517743 +0200
+--- src/popupwin.c 2019-06-01 20:08:02.521743824 +0200
+***************
+*** 101,106 ****
+--- 101,138 ----
+ }
+ }
+
++ static void
++ get_padding_border(dict_T *dict, int *array, char *name, int max_val)
++ {
++ dictitem_T *di;
++
++ vim_memset(array, 0, sizeof(int) * 4);
++ di = dict_find(dict, (char_u *)name, -1);
++ if (di != NULL)
++ {
++ if (di->di_tv.v_type != VAR_LIST)
++ emsg(_(e_listreq));
++ else
++ {
++ list_T *list = di->di_tv.vval.v_list;
++ listitem_T *li;
++ int i;
++ int nr;
++
++ for (i = 0; i < 4; ++i)
++ array[i] = 1;
++ if (list != NULL)
++ for (i = 0, li = list->lv_first; i < 4 && i < list->lv_len;
++ ++i, li = li->li_next)
++ {
++ nr = (int)tv_get_number(&li->li_tv);
++ if (nr >= 0)
++ array[i] = nr > max_val ? max_val : nr;
++ }
++ }
++ }
++ }
++
+ /*
+ * Go through the options in "dict" and apply them to buffer "buf" displayed in
+ * popup window "wp".
+***************
+*** 176,181 ****
+--- 208,216 ----
+ if (callback.cb_name != NULL)
+ set_callback(&wp->w_filter_cb, &callback);
+ }
++
++ get_padding_border(dict, wp->w_popup_padding, "padding", 999);
++ get_padding_border(dict, wp->w_popup_border, "border", 1);
+ }
+
+ /*
+***************
+*** 700,715 ****
+ dict_T *dict;
+ int id = (int)tv_get_number(argvars);
+ win_T *wp = find_popup_win(id);
+
+ if (rettv_dict_alloc(rettv) == OK)
+ {
+ if (wp == NULL)
+ return; // invalid {id}
+ dict = rettv->vval.v_dict;
+ dict_add_number(dict, "line", wp->w_winrow + 1);
+ dict_add_number(dict, "col", wp->w_wincol + 1);
+! dict_add_number(dict, "width", wp->w_width);
+! dict_add_number(dict, "height", wp->w_height);
+ dict_add_number(dict, "visible",
+ (wp->w_popup_flags & POPF_HIDDEN) == 0);
+ }
+--- 735,762 ----
+ dict_T *dict;
+ int id = (int)tv_get_number(argvars);
+ win_T *wp = find_popup_win(id);
++ int top_extra;
++ int left_extra;
+
+ if (rettv_dict_alloc(rettv) == OK)
+ {
+ if (wp == NULL)
+ return; // invalid {id}
++ top_extra = wp->w_popup_border[0] + wp->w_popup_padding[0];
++ left_extra = wp->w_popup_border[3] + wp->w_popup_padding[3];
++
+ dict = rettv->vval.v_dict;
++
+ dict_add_number(dict, "line", wp->w_winrow + 1);
+ dict_add_number(dict, "col", wp->w_wincol + 1);
+! dict_add_number(dict, "width", wp->w_width + left_extra + wp->w_popup_border[1] + wp->w_popup_padding[1]);
+! dict_add_number(dict, "height", wp->w_height + top_extra + wp->w_popup_border[2] + wp->w_popup_padding[2]);
+!
+! dict_add_number(dict, "core_line", wp->w_winrow + 1 + top_extra);
+! dict_add_number(dict, "core_col", wp->w_wincol + 1 + left_extra);
+! dict_add_number(dict, "core_width", wp->w_width);
+! dict_add_number(dict, "core_height", wp->w_height);
+!
+ dict_add_number(dict, "visible",
+ (wp->w_popup_flags & POPF_HIDDEN) == 0);
+ }
+*** ../vim-8.1.1442/src/screen.c 2019-06-01 18:11:18.084962963 +0200
+--- src/screen.c 2019-06-01 19:51:24.793577381 +0200
+***************
+*** 991,1001 ****
+--- 991,1036 ----
+ }
+ #endif
+
++ /*
++ * Get 'wincolor' attribute for window "wp". If not set and "wp" is a popup
++ * window then get the "Pmenu" highlight attribute.
++ */
++ static int
++ get_wcr_attr(win_T *wp)
++ {
++ int wcr_attr = 0;
++
++ if (*wp->w_p_wcr != NUL)
++ wcr_attr = syn_name2attr(wp->w_p_wcr);
+ #ifdef FEAT_TEXT_PROP
++ if (bt_popup(wp->w_buffer) && wcr_attr == 0)
++ wcr_attr = HL_ATTR(HLF_PNI);
++ #endif
++ return wcr_attr;
++ }
++
++ #ifdef FEAT_TEXT_PROP
++ /*
++ * Return a string of "len" spaces in IObuff.
++ */
++ static char_u *
++ get_spaces(int len)
++ {
++ vim_memset(IObuff, ' ', (size_t)len);
++ IObuff[len] = NUL;
++ return IObuff;
++ }
++
+ static void
+ update_popups(void)
+ {
+ win_T *wp;
++ int top_off;
++ int left_off;
++ int total_width;
++ int total_height;
++ int popup_attr;
++ int row;
+
+ // Find the window with the lowest zindex that hasn't been updated yet,
+ // so that the window with a higher zindex is drawn later, thus goes on
+***************
+*** 1008,1035 ****
+ if (wp->w_popup_last_changedtick != CHANGEDTICK(wp->w_buffer))
+ popup_adjust_position(wp);
+
+ win_update(wp);
+- }
+- }
+- #endif
+
+! /*
+! * Get 'wincolor' attribute for window "wp". If not set and "wp" is a popup
+! * window then get the "Pmenu" highlight attribute.
+! */
+! static int
+! get_wcr_attr(win_T *wp)
+! {
+! int wcr_attr = 0;
+
+! if (*wp->w_p_wcr != NUL)
+! wcr_attr = syn_name2attr(wp->w_p_wcr);
+! #ifdef FEAT_TEXT_PROP
+! if (bt_popup(wp->w_buffer) && wcr_attr == 0)
+! wcr_attr = HL_ATTR(HLF_PNI);
+! #endif
+! return wcr_attr;
+ }
+
+ #if defined(FEAT_GUI) || defined(PROTO)
+ /*
+--- 1043,1139 ----
+ if (wp->w_popup_last_changedtick != CHANGEDTICK(wp->w_buffer))
+ popup_adjust_position(wp);
+
++ // adjust w_winrow and w_wincol for border and padding, since
++ // win_update() doesn't handle them.
++ top_off = wp->w_popup_padding[0] + wp->w_popup_border[0];
++ left_off = wp->w_popup_padding[3] + wp->w_popup_border[3];
++ wp->w_winrow += top_off;
++ wp->w_wincol += left_off;
++
++ // Draw the popup text.
+ win_update(wp);
+
+! wp->w_winrow -= top_off;
+! wp->w_wincol -= left_off;
+
+! total_width = wp->w_popup_border[3] + wp->w_popup_padding[3]
+! + wp->w_width + wp->w_popup_padding[1] + wp->w_popup_border[1];
+! total_height = wp->w_popup_border[0] + wp->w_popup_padding[0]
+! + wp->w_height + wp->w_popup_padding[2] + wp->w_popup_border[2];
+! popup_attr = get_wcr_attr(wp);
+!
+! if (wp->w_popup_border[0] > 0)
+! {
+! // top border
+! screen_fill(wp->w_winrow, wp->w_winrow + 1,
+! wp->w_wincol,
+! wp->w_wincol + total_width,
+! wp->w_popup_border[3] != 0 ? '+' : '-',
+! '-', popup_attr);
+! if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)"+", wp->w_winrow,
+! wp->w_wincol + total_width - 1, popup_attr);
+! }
+!
+! if (wp->w_popup_padding[0] > 0)
+! {
+! // top padding
+! row = wp->w_winrow + wp->w_popup_border[0];
+! screen_fill(row, row + wp->w_popup_padding[0],
+! wp->w_wincol + wp->w_popup_border[3],
+! wp->w_wincol + total_width - wp->w_popup_border[1],
+! ' ', ' ', popup_attr);
+! }
+!
+! for (row = wp->w_winrow + wp->w_popup_border[0];
+! row < wp->w_winrow + total_height - wp->w_popup_border[2];
+! ++row)
+! {
+! // left border
+! if (wp->w_popup_border[3] > 0)
+! screen_puts((char_u *)"|", row, wp->w_wincol, popup_attr);
+! // left padding
+! if (wp->w_popup_padding[3] > 0)
+! screen_puts(get_spaces(wp->w_popup_padding[3]), row,
+! wp->w_wincol + wp->w_popup_border[3], popup_attr);
+! // right border
+! if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)"|", row,
+! wp->w_wincol + total_width - 1, popup_attr);
+! // right padding
+! if (wp->w_popup_padding[1] > 0)
+! screen_puts(get_spaces(wp->w_popup_padding[1]), row,
+! wp->w_wincol + wp->w_popup_border[3]
+! + wp->w_popup_padding[3] + wp->w_width, popup_attr);
+! }
+!
+! if (wp->w_popup_padding[2] > 0)
+! {
+! // bottom padding
+! row = wp->w_winrow + wp->w_popup_border[0]
+! + wp->w_popup_padding[0] + wp->w_height;
+! screen_fill(row, row + wp->w_popup_padding[2],
+! wp->w_wincol + wp->w_popup_border[3],
+! wp->w_wincol + total_width - wp->w_popup_border[1],
+! ' ', ' ', popup_attr);
+! }
+!
+! if (wp->w_popup_border[2] > 0)
+! {
+! // bottom border
+! row = wp->w_winrow + total_height - 1;
+! screen_fill(row , row + 1,
+! wp->w_wincol,
+! wp->w_wincol + total_width,
+! wp->w_popup_border[3] != 0 ? '+' : '-',
+! '-', popup_attr);
+! if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)"+", row,
+! wp->w_wincol + total_width - 1, popup_attr);
+! }
+! }
+ }
++ #endif
+
+ #if defined(FEAT_GUI) || defined(PROTO)
+ /*
+*** ../vim-8.1.1442/src/testdir/test_popupwin.vim 2019-06-01 17:13:15.884517713 +0200
+--- src/testdir/test_popupwin.vim 2019-06-01 20:14:48.550674542 +0200
+***************
+*** 56,61 ****
+--- 56,109 ----
+ call delete('XtestPopup')
+ endfunc
+
++ func Test_popup_with_border_and_padding()
++ if !CanRunVimInTerminal()
++ return
++ endif
++ call writefile([
++ \ "call setline(1, range(1, 100))",
++ \ "call popup_create('hello border', {'line': 2, 'col': 3, 'border': []})",
++ \ "call popup_create('hello padding', {'line': 2, 'col': 23, 'padding': []})",
++ \ "call popup_create('hello both', {'line': 2, 'col': 43, 'border': [], 'padding': []})",
++ \ "call popup_create('border TL', {'line': 6, 'col': 3, 'border': [1, 0, 0, 4]})",
++ \ "call popup_create('paddings', {'line': 6, 'col': 23, 'padding': [1, 3, 2, 4]})",
++ \], 'XtestPopupBorder')
++ let buf = RunVimInTerminal('-S XtestPopupBorder', {'rows': 15})
++ call VerifyScreenDump(buf, 'Test_popupwin_20', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XtestPopupBorder')
++
++ let with_border_or_padding = {
++ \ 'line': 2,
++ \ 'core_line': 3,
++ \ 'col': 3,
++ \ 'core_col': 4,
++ \ 'width': 14,
++ \ 'core_width': 12,
++ \ 'height': 3,
++ \ 'core_height': 1,
++ \ 'visible': 1}
++ let winid = popup_create('hello border', {'line': 2, 'col': 3, 'border': []})",
++ call assert_equal(with_border_or_padding, popup_getpos(winid))
++
++ let winid = popup_create('hello paddng', {'line': 2, 'col': 3, 'padding': []})
++ call assert_equal(with_border_or_padding, popup_getpos(winid))
++
++ let winid = popup_create('hello both', {'line': 3, 'col': 8, 'border': [], 'padding': []})
++ call assert_equal({
++ \ 'line': 3,
++ \ 'core_line': 5,
++ \ 'col': 8,
++ \ 'core_col': 10,
++ \ 'width': 14,
++ \ 'core_width': 10,
++ \ 'height': 5,
++ \ 'core_height': 1,
++ \ 'visible': 1}, popup_getpos(winid))
++ endfunc
++
+ func Test_popup_with_syntax_win_execute()
+ if !CanRunVimInTerminal()
+ return
+*** ../vim-8.1.1442/src/testdir/dumps/Test_popupwin_20.dump 2019-06-01 20:15:43.158268775 +0200
+--- src/testdir/dumps/Test_popupwin_20.dump 2019-06-01 20:05:11.907075294 +0200
+***************
+*** 0 ****
+--- 1,15 ----
++ >1+0&#ffffff0| @73
++ |2| |++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@18
++ |3| ||+0#0000001#ffd7ff255|h|e|l@1|o| |b|o|r|d|e|r||| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255|h|e|l@1|o| |p|a|d@1|i|n|g| | +0#0000000#ffffff0@4||+0#0000001#ffd7ff255| @11||| +0#0000000#ffffff0@18
++ |4| |++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4||+0#0000001#ffd7ff255| |h|e|l@1|o| |b|o|t|h| ||| +0#0000000#ffffff0@18
++ |5| @40||+0#0000001#ffd7ff255| @11||| +0#0000000#ffffff0@18
++ |6| |++0#0000001#ffd7ff255|-@8| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@18
++ |7| ||+0#0000001#ffd7ff255|b|o|r|d|e|r| |T|L| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@3|p|a|d@1|i|n|g|s| @2| +0#0000000#ffffff0@37
++ |8| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@37
++ |9| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@37
++ |1|0| @72
++ |1@1| @72
++ |1|2| @72
++ |1|3| @72
++ |1|4| @72
++ @57|1|,|1| @10|T|o|p|
+*** ../vim-8.1.1442/runtime/doc/popup.txt 2019-06-01 17:13:15.880517743 +0200
+--- runtime/doc/popup.txt 2019-06-01 19:56:04.131671695 +0200
+***************
+*** 90,100 ****
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+- - Invoke filter with character before mapping?
+- - Handle screen resize in screenalloc(). (Ben Jackson, #4467)
+ - Why does 'nrformats' leak from the popup window buffer???
+- - Implement padding
+- - Implement border
+ - Make redrawing more efficient and avoid flicker.
+ Store popup info in a mask, use the mask in screen_line()
+ Keep mask until next update_screen(), find differences and redraw affected
+--- 90,96 ----
+***************
+*** 103,109 ****
+ Fix redrawing problem when scrolling non-current window
+ Fix redrawing the statusline on top of a popup
+ - Disable commands, feedkeys(), CTRL-W, etc. in a popup window.
+! Use NOT_IN_POPUP_WINDOW.
+ - Figure out the size and position better.
+ if wrapping splits a double-wide character
+ if wrapping inserts indent
+--- 99,106 ----
+ Fix redrawing problem when scrolling non-current window
+ Fix redrawing the statusline on top of a popup
+ - Disable commands, feedkeys(), CTRL-W, etc. in a popup window.
+! Use NOT_IN_POPUP_WINDOW for more commands.
+! - Invoke filter with character before mapping?
+ - Figure out the size and position better.
+ if wrapping splits a double-wide character
+ if wrapping inserts indent
+***************
+*** 255,266 ****
+ with these entries:
+ col screen column of the popup, one-based
+ line screen line of the popup, one-based
+! width width of the popup in screen cells
+! height height of the popup in screen cells
+ visible one if the popup is displayed, zero if hidden
+ Note that these are the actual screen positions. They differ
+ from the values in `popup_getoptions()` for the sizing and
+ positioning mechanism applied.
+ If popup window {id} is not found an empty Dict is returned.
+
+
+--- 252,270 ----
+ with these entries:
+ col screen column of the popup, one-based
+ line screen line of the popup, one-based
+! width width of the whole popup in screen cells
+! height height of the whole popup in screen cells
+! core_col screen column of the text box
+! core_line screen line of the text box
+! core_width width of the text box in screen cells
+! core_height height of the text box in screen cells
+ visible one if the popup is displayed, zero if hidden
+ Note that these are the actual screen positions. They differ
+ from the values in `popup_getoptions()` for the sizing and
+ positioning mechanism applied.
++
++ The "core_" values exclude the padding and border.
++
+ If popup window {id} is not found an empty Dict is returned.
+
+
+***************
+*** 361,371 ****
+ padding uses the 'wincolor' highlight; Example: [1, 2,
+ 1, 3] has 1 line of padding above, 2 columns on the
+ right, 1 line below and 3 columns on the left
+- {not implemented yet}
+ border list with numbers, defining the border thickness
+ above/right/below/left of the popup (similar to CSS);
+ an empty list uses a border of 1 all around
+- {not implemented yet}
+ borderhighlight highlight group name to use for the border
+ {not implemented yet}
+ borderchars list with characters, defining the character to use
+--- 365,374 ----
+ padding uses the 'wincolor' highlight; Example: [1, 2,
+ 1, 3] has 1 line of padding above, 2 columns on the
+ right, 1 line below and 3 columns on the left
+ border list with numbers, defining the border thickness
+ above/right/below/left of the popup (similar to CSS);
++ only values of zero and non-zero are recognized;
+ an empty list uses a border of 1 all around
+ borderhighlight highlight group name to use for the border
+ {not implemented yet}
+ borderchars list with characters, defining the character to use
+*** ../vim-8.1.1442/src/version.c 2019-06-01 18:11:18.084962963 +0200
+--- src/version.c 2019-06-01 19:53:24.984758045 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1443,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+79. All of your most erotic dreams have a scrollbar at the right side.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1444 b/data/vim/patches/8.1.1444
new file mode 100644
index 000000000..8679f4421
--- /dev/null
+++ b/data/vim/patches/8.1.1444
@@ -0,0 +1,218 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1444
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1444
+Problem: Not using double line characters for popup border.
+Solution: Use double line characters if using utf-8.
+Files: src/screen.c, src/testdir/test_popupwin.vim,
+ src/testdir/dumps/Test_popupwin_21.dump,
+
+
+*** ../vim-8.1.1443/src/screen.c 2019-06-01 20:16:33.717894147 +0200
+--- src/screen.c 2019-06-01 20:32:41.547148400 +0200
+***************
+*** 1031,1036 ****
+--- 1031,1042 ----
+ int total_height;
+ int popup_attr;
+ int row;
++ int tl_corner_char = '+';
++ char *tr_corner_str = "+";
++ int bl_corner_char = '+';
++ char *br_corner_str = "+";
++ int hor_line_char = '-';
++ char *ver_line_str = "|";
+
+ // Find the window with the lowest zindex that hasn't been updated yet,
+ // so that the window with a higher zindex is drawn later, thus goes on
+***************
+*** 1062,1077 ****
+ + wp->w_height + wp->w_popup_padding[2] + wp->w_popup_border[2];
+ popup_attr = get_wcr_attr(wp);
+
+ if (wp->w_popup_border[0] > 0)
+ {
+ // top border
+ screen_fill(wp->w_winrow, wp->w_winrow + 1,
+ wp->w_wincol,
+ wp->w_wincol + total_width,
+! wp->w_popup_border[3] != 0 ? '+' : '-',
+! '-', popup_attr);
+ if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)"+", wp->w_winrow,
+ wp->w_wincol + total_width - 1, popup_attr);
+ }
+
+--- 1068,1094 ----
+ + wp->w_height + wp->w_popup_padding[2] + wp->w_popup_border[2];
+ popup_attr = get_wcr_attr(wp);
+
++ if (enc_utf8)
++ {
++ tl_corner_char = 0x2554;
++ tr_corner_str = "\xe2\x95\x97";
++ bl_corner_char = 0x255a;
++ br_corner_str = "\xe2\x95\x9d";
++ hor_line_char = 0x2550;
++ ver_line_str = "\xe2\x95\x91";
++ }
++
+ if (wp->w_popup_border[0] > 0)
+ {
+ // top border
+ screen_fill(wp->w_winrow, wp->w_winrow + 1,
+ wp->w_wincol,
+ wp->w_wincol + total_width,
+! wp->w_popup_border[3] != 0
+! ? tl_corner_char : hor_line_char,
+! hor_line_char, popup_attr);
+ if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)tr_corner_str, wp->w_winrow,
+ wp->w_wincol + total_width - 1, popup_attr);
+ }
+
+***************
+*** 1091,1104 ****
+ {
+ // left border
+ if (wp->w_popup_border[3] > 0)
+! screen_puts((char_u *)"|", row, wp->w_wincol, popup_attr);
+ // left padding
+ if (wp->w_popup_padding[3] > 0)
+ screen_puts(get_spaces(wp->w_popup_padding[3]), row,
+ wp->w_wincol + wp->w_popup_border[3], popup_attr);
+ // right border
+ if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)"|", row,
+ wp->w_wincol + total_width - 1, popup_attr);
+ // right padding
+ if (wp->w_popup_padding[1] > 0)
+--- 1108,1121 ----
+ {
+ // left border
+ if (wp->w_popup_border[3] > 0)
+! screen_puts((char_u *)ver_line_str, row, wp->w_wincol, popup_attr);
+ // left padding
+ if (wp->w_popup_padding[3] > 0)
+ screen_puts(get_spaces(wp->w_popup_padding[3]), row,
+ wp->w_wincol + wp->w_popup_border[3], popup_attr);
+ // right border
+ if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)ver_line_str, row,
+ wp->w_wincol + total_width - 1, popup_attr);
+ // right padding
+ if (wp->w_popup_padding[1] > 0)
+***************
+*** 1125,1134 ****
+ screen_fill(row , row + 1,
+ wp->w_wincol,
+ wp->w_wincol + total_width,
+! wp->w_popup_border[3] != 0 ? '+' : '-',
+! '-', popup_attr);
+ if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)"+", row,
+ wp->w_wincol + total_width - 1, popup_attr);
+ }
+ }
+--- 1142,1151 ----
+ screen_fill(row , row + 1,
+ wp->w_wincol,
+ wp->w_wincol + total_width,
+! wp->w_popup_border[3] != 0 ? bl_corner_char : hor_line_char,
+! hor_line_char, popup_attr);
+ if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)br_corner_str, row,
+ wp->w_wincol + total_width - 1, popup_attr);
+ }
+ }
+*** ../vim-8.1.1443/src/testdir/test_popupwin.vim 2019-06-01 20:16:33.717894147 +0200
+--- src/testdir/test_popupwin.vim 2019-06-01 20:38:07.241320699 +0200
+***************
+*** 60,79 ****
+ if !CanRunVimInTerminal()
+ return
+ endif
+- call writefile([
+- \ "call setline(1, range(1, 100))",
+- \ "call popup_create('hello border', {'line': 2, 'col': 3, 'border': []})",
+- \ "call popup_create('hello padding', {'line': 2, 'col': 23, 'padding': []})",
+- \ "call popup_create('hello both', {'line': 2, 'col': 43, 'border': [], 'padding': []})",
+- \ "call popup_create('border TL', {'line': 6, 'col': 3, 'border': [1, 0, 0, 4]})",
+- \ "call popup_create('paddings', {'line': 6, 'col': 23, 'padding': [1, 3, 2, 4]})",
+- \], 'XtestPopupBorder')
+- let buf = RunVimInTerminal('-S XtestPopupBorder', {'rows': 15})
+- call VerifyScreenDump(buf, 'Test_popupwin_20', {})
+
+! " clean up
+! call StopVimInTerminal(buf)
+! call delete('XtestPopupBorder')
+
+ let with_border_or_padding = {
+ \ 'line': 2,
+--- 60,81 ----
+ if !CanRunVimInTerminal()
+ return
+ endif
+
+! for iter in range(0, 1)
+! call writefile([iter == 1 ? '' : 'set enc=latin1',
+! \ "call setline(1, range(1, 100))",
+! \ "call popup_create('hello border', {'line': 2, 'col': 3, 'border': []})",
+! \ "call popup_create('hello padding', {'line': 2, 'col': 23, 'padding': []})",
+! \ "call popup_create('hello both', {'line': 2, 'col': 43, 'border': [], 'padding': []})",
+! \ "call popup_create('border TL', {'line': 6, 'col': 3, 'border': [1, 0, 0, 4]})",
+! \ "call popup_create('paddings', {'line': 6, 'col': 23, 'padding': [1, 3, 2, 4]})",
+! \], 'XtestPopupBorder')
+! let buf = RunVimInTerminal('-S XtestPopupBorder', {'rows': 15})
+! call VerifyScreenDump(buf, 'Test_popupwin_2' .. iter, {})
+!
+! call StopVimInTerminal(buf)
+! call delete('XtestPopupBorder')
+! endfor
+
+ let with_border_or_padding = {
+ \ 'line': 2,
+*** ../vim-8.1.1443/src/testdir/dumps/Test_popupwin_21.dump 2019-06-01 20:44:42.182843427 +0200
+--- src/testdir/dumps/Test_popupwin_21.dump 2019-06-01 20:38:17.157261244 +0200
+***************
+*** 0 ****
+--- 1,15 ----
++ >1+0&#ffffff0| @73
++ |2| |╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0@18
++ |3| |║+0#0000001#ffd7ff255|h|e|l@1|o| |b|o|r|d|e|r|║| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255|h|e|l@1|o| |p|a|d@1|i|n|g| | +0#0000000#ffffff0@4|║+0#0000001#ffd7ff255| @11|║| +0#0000000#ffffff0@18
++ |4| |╚+0#0000001#ffd7ff255|═@11|╝| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|║+0#0000001#ffd7ff255| |h|e|l@1|o| |b|o|t|h| |║| +0#0000000#ffffff0@18
++ |5| @40|║+0#0000001#ffd7ff255| @11|║| +0#0000000#ffffff0@18
++ |6| |╔+0#0000001#ffd7ff255|═@8| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|╚+0#0000001#ffd7ff255|═@11|╝| +0#0000000#ffffff0@18
++ |7| |║+0#0000001#ffd7ff255|b|o|r|d|e|r| |T|L| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@3|p|a|d@1|i|n|g|s| @2| +0#0000000#ffffff0@37
++ |8| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@37
++ |9| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@37
++ |1|0| @72
++ |1@1| @72
++ |1|2| @72
++ |1|3| @72
++ |1|4| @72
++ @57|1|,|1| @10|T|o|p|
+*** ../vim-8.1.1443/src/version.c 2019-06-01 20:16:33.717894147 +0200
+--- src/version.c 2019-06-01 20:44:49.266797382 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1444,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+80. At parties, you introduce your spouse as your "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.1445 b/data/vim/patches/8.1.1445
new file mode 100644
index 000000000..be6d849a8
--- /dev/null
+++ b/data/vim/patches/8.1.1445
@@ -0,0 +1,391 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1445
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1445
+Problem: Popup window border highlight not implemented yet.
+Solution: Implement the "borderhighlight" option.
+Files: src/structs.h, src/popupwin.c, src/window.c, src/screen.c,
+ src/testdir/test_popupwin.vim, runtime/doc/popup.txt,
+ src/testdir/dumps/Test_popupwin_22.dump
+
+
+*** ../vim-8.1.1444/src/structs.h 2019-06-01 20:16:33.717894147 +0200
+--- src/structs.h 2019-06-01 21:33:51.494857177 +0200
+***************
+*** 2890,2895 ****
+--- 2890,2897 ----
+ int w_wantcol; // "col" for popup window
+ int w_popup_padding[4]; // popup padding top/right/bot/left
+ int w_popup_border[4]; // popup border top/right/bot/left
++ char_u *w_border_highlight[4]; // popup border highlight
++ int w_border_char[8]; // popup border characters
+ varnumber_T w_popup_last_changedtick; // b:changedtick when position was
+ // computed
+ callback_T w_filter_cb; // popup filter callback
+*** ../vim-8.1.1444/src/popupwin.c 2019-06-01 20:16:33.717894147 +0200
+--- src/popupwin.c 2019-06-01 22:12:25.083676559 +0200
+***************
+*** 144,149 ****
+--- 144,150 ----
+ int nr;
+ char_u *str;
+ dictitem_T *di;
++ int i;
+
+ wp->w_minwidth = dict_get_number(dict, (char_u *)"minwidth");
+ wp->w_minheight = dict_get_number(dict, (char_u *)"minheight");
+***************
+*** 211,216 ****
+--- 212,277 ----
+
+ get_padding_border(dict, wp->w_popup_padding, "padding", 999);
+ get_padding_border(dict, wp->w_popup_border, "border", 1);
++
++ for (i = 0; i < 4; ++i)
++ VIM_CLEAR(wp->w_border_highlight[i]);
++ di = dict_find(dict, (char_u *)"borderhighlight", -1);
++ if (di != NULL)
++ {
++ if (di->di_tv.v_type != VAR_LIST)
++ emsg(_(e_listreq));
++ else
++ {
++ list_T *list = di->di_tv.vval.v_list;
++ listitem_T *li;
++
++ if (list != NULL)
++ for (i = 0, li = list->lv_first; i < 4 && i < list->lv_len;
++ ++i, li = li->li_next)
++ {
++ str = tv_get_string(&li->li_tv);
++ if (*str != NUL)
++ wp->w_border_highlight[i] = vim_strsave(str);
++ }
++ if (list->lv_len == 1 && wp->w_border_highlight[0] != NULL)
++ for (i = 1; i < 4; ++i)
++ wp->w_border_highlight[i] =
++ vim_strsave(wp->w_border_highlight[0]);
++ }
++ }
++
++ for (i = 0; i < 8; ++i)
++ wp->w_border_char[i] = 0;
++ di = dict_find(dict, (char_u *)"borderchars", -1);
++ if (di != NULL)
++ {
++ if (di->di_tv.v_type != VAR_LIST)
++ emsg(_(e_listreq));
++ else
++ {
++ list_T *list = di->di_tv.vval.v_list;
++ listitem_T *li;
++
++ if (list != NULL)
++ for (i = 0, li = list->lv_first; i < 8 && i < list->lv_len;
++ ++i, li = li->li_next)
++ {
++ str = tv_get_string(&li->li_tv);
++ if (*str != NUL)
++ wp->w_border_char[i] = mb_ptr2char(str);
++ }
++ if (list->lv_len == 1)
++ for (i = 1; i < 8; ++i)
++ wp->w_border_char[i] = wp->w_border_char[0];
++ if (list->lv_len == 2)
++ {
++ for (i = 4; i < 8; ++i)
++ wp->w_border_char[i] = wp->w_border_char[1];
++ for (i = 1; i < 4; ++i)
++ wp->w_border_char[i] = wp->w_border_char[0];
++ }
++ }
++ }
+ }
+
+ /*
+*** ../vim-8.1.1444/src/window.c 2019-06-01 17:13:15.880517743 +0200
+--- src/window.c 2019-06-01 21:12:56.813579060 +0200
+***************
+*** 4846,4851 ****
+--- 4846,4853 ----
+ #endif
+ #ifdef FEAT_TEXT_PROP
+ free_callback(&wp->w_filter_cb);
++ for (i = 0; i < 4; ++i)
++ VIM_CLEAR(wp->w_border_highlight[i]);
+ #endif
+
+ #ifdef FEAT_SYN_HL
+*** ../vim-8.1.1444/src/screen.c 2019-06-01 20:45:05.090694398 +0200
+--- src/screen.c 2019-06-01 21:58:56.800108832 +0200
+***************
+*** 1030,1042 ****
+ int total_width;
+ int total_height;
+ int popup_attr;
+ int row;
+! int tl_corner_char = '+';
+! char *tr_corner_str = "+";
+! int bl_corner_char = '+';
+! char *br_corner_str = "+";
+! int hor_line_char = '-';
+! char *ver_line_str = "|";
+
+ // Find the window with the lowest zindex that hasn't been updated yet,
+ // so that the window with a higher zindex is drawn later, thus goes on
+--- 1030,1040 ----
+ int total_width;
+ int total_height;
+ int popup_attr;
++ int border_attr[4];
++ int border_char[8] = {'-', '|', '-', '|', '+', '+', '+', '+', };
++ char_u buf[MB_MAXBYTES];
+ int row;
+! int i;
+
+ // Find the window with the lowest zindex that hasn't been updated yet,
+ // so that the window with a higher zindex is drawn later, thus goes on
+***************
+*** 1070,1081 ****
+
+ if (enc_utf8)
+ {
+! tl_corner_char = 0x2554;
+! tr_corner_str = "\xe2\x95\x97";
+! bl_corner_char = 0x255a;
+! br_corner_str = "\xe2\x95\x9d";
+! hor_line_char = 0x2550;
+! ver_line_str = "\xe2\x95\x91";
+ }
+
+ if (wp->w_popup_border[0] > 0)
+--- 1068,1089 ----
+
+ if (enc_utf8)
+ {
+! border_char[0] = border_char[2] = 0x2550;
+! border_char[1] = border_char[3] = 0x2551;
+! border_char[4] = 0x2554;
+! border_char[5] = 0x2557;
+! border_char[6] = 0x255d;
+! border_char[7] = 0x255a;
+! }
+! for (i = 0; i < 8; ++i)
+! if (wp->w_border_char[i] != 0)
+! border_char[i] = wp->w_border_char[i];
+!
+! for (i = 0; i < 4; ++i)
+! {
+! border_attr[i] = popup_attr;
+! if (wp->w_border_highlight[i] != NULL)
+! border_attr[i] = syn_name2attr(wp->w_border_highlight[i]);
+ }
+
+ if (wp->w_popup_border[0] > 0)
+***************
+*** 1085,1095 ****
+ wp->w_wincol,
+ wp->w_wincol + total_width,
+ wp->w_popup_border[3] != 0
+! ? tl_corner_char : hor_line_char,
+! hor_line_char, popup_attr);
+ if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)tr_corner_str, wp->w_winrow,
+! wp->w_wincol + total_width - 1, popup_attr);
+ }
+
+ if (wp->w_popup_padding[0] > 0)
+--- 1093,1106 ----
+ wp->w_wincol,
+ wp->w_wincol + total_width,
+ wp->w_popup_border[3] != 0
+! ? border_char[4] : border_char[0],
+! border_char[0], border_attr[0]);
+ if (wp->w_popup_border[1] > 0)
+! {
+! buf[mb_char2bytes(border_char[5], buf)] = NUL;
+! screen_puts(buf, wp->w_winrow,
+! wp->w_wincol + total_width - 1, border_attr[1]);
+! }
+ }
+
+ if (wp->w_popup_padding[0] > 0)
+***************
+*** 1108,1122 ****
+ {
+ // left border
+ if (wp->w_popup_border[3] > 0)
+! screen_puts((char_u *)ver_line_str, row, wp->w_wincol, popup_attr);
+ // left padding
+ if (wp->w_popup_padding[3] > 0)
+ screen_puts(get_spaces(wp->w_popup_padding[3]), row,
+ wp->w_wincol + wp->w_popup_border[3], popup_attr);
+ // right border
+ if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)ver_line_str, row,
+! wp->w_wincol + total_width - 1, popup_attr);
+ // right padding
+ if (wp->w_popup_padding[1] > 0)
+ screen_puts(get_spaces(wp->w_popup_padding[1]), row,
+--- 1119,1139 ----
+ {
+ // left border
+ if (wp->w_popup_border[3] > 0)
+! {
+! buf[mb_char2bytes(border_char[3], buf)] = NUL;
+! screen_puts(buf, row, wp->w_wincol, border_attr[3]);
+! }
+ // left padding
+ if (wp->w_popup_padding[3] > 0)
+ screen_puts(get_spaces(wp->w_popup_padding[3]), row,
+ wp->w_wincol + wp->w_popup_border[3], popup_attr);
+ // right border
+ if (wp->w_popup_border[1] > 0)
+! {
+! buf[mb_char2bytes(border_char[1], buf)] = NUL;
+! screen_puts(buf, row,
+! wp->w_wincol + total_width - 1, border_attr[1]);
+! }
+ // right padding
+ if (wp->w_popup_padding[1] > 0)
+ screen_puts(get_spaces(wp->w_popup_padding[1]), row,
+***************
+*** 1142,1152 ****
+ screen_fill(row , row + 1,
+ wp->w_wincol,
+ wp->w_wincol + total_width,
+! wp->w_popup_border[3] != 0 ? bl_corner_char : hor_line_char,
+! hor_line_char, popup_attr);
+ if (wp->w_popup_border[1] > 0)
+! screen_puts((char_u *)br_corner_str, row,
+! wp->w_wincol + total_width - 1, popup_attr);
+ }
+ }
+ }
+--- 1159,1173 ----
+ screen_fill(row , row + 1,
+ wp->w_wincol,
+ wp->w_wincol + total_width,
+! wp->w_popup_border[3] != 0
+! ? border_char[7] : border_char[2],
+! border_char[2], border_attr[2]);
+ if (wp->w_popup_border[1] > 0)
+! {
+! buf[mb_char2bytes(border_char[6], buf)] = NUL;
+! screen_puts(buf, row,
+! wp->w_wincol + total_width - 1, border_attr[2]);
+! }
+ }
+ }
+ }
+*** ../vim-8.1.1444/src/testdir/test_popupwin.vim 2019-06-01 20:45:05.090694398 +0200
+--- src/testdir/test_popupwin.vim 2019-06-01 22:09:35.428623493 +0200
+***************
+*** 77,82 ****
+--- 77,102 ----
+ call delete('XtestPopupBorder')
+ endfor
+
++ call writefile([
++ \ "call setline(1, range(1, 100))",
++ \ "hi BlueColor ctermbg=lightblue",
++ \ "hi TopColor ctermbg=253",
++ \ "hi RightColor ctermbg=245",
++ \ "hi BottomColor ctermbg=240",
++ \ "hi LeftColor ctermbg=248",
++ \ "call popup_create('hello border', {'line': 2, 'col': 3, 'border': [], 'borderhighlight': ['BlueColor']})",
++ \ "call popup_create(['hello border', 'and more'], {'line': 2, 'col': 23, 'border': [], 'borderhighlight': ['TopColor', 'RightColor', 'BottomColor', 'LeftColor']})",
++ \ "call popup_create(['hello border', 'lines only'], {'line': 2, 'col': 43, 'border': [], 'borderhighlight': ['BlueColor'], 'borderchars': ['x']})",
++ \ "call popup_create(['hello border', 'with corners'], {'line': 2, 'col': 60, 'border': [], 'borderhighlight': ['BlueColor'], 'borderchars': ['x', '#']})",
++ \ "call popup_create(['hello border', 'with numbers'], {'line': 6, 'col': 3, 'border': [], 'borderhighlight': ['BlueColor'], 'borderchars': ['0', '1', '2', '3', '4', '5', '6', '7']})",
++ \ "call popup_create(['hello border', 'just blanks'], {'line': 7, 'col': 23, 'border': [], 'borderhighlight': ['BlueColor'], 'borderchars': [' ']})",
++ \], 'XtestPopupBorder')
++ let buf = RunVimInTerminal('-S XtestPopupBorder', {'rows': 12})
++ call VerifyScreenDump(buf, 'Test_popupwin_22', {})
++
++ call StopVimInTerminal(buf)
++ call delete('XtestPopupBorder')
++
+ let with_border_or_padding = {
+ \ 'line': 2,
+ \ 'core_line': 3,
+*** ../vim-8.1.1444/runtime/doc/popup.txt 2019-06-01 20:16:33.717894147 +0200
+--- runtime/doc/popup.txt 2019-06-01 22:11:09.276100324 +0200
+***************
+*** 368,382 ****
+ border list with numbers, defining the border thickness
+ above/right/below/left of the popup (similar to CSS);
+ only values of zero and non-zero are recognized;
+! an empty list uses a border of 1 all around
+! borderhighlight highlight group name to use for the border
+! {not implemented yet}
+ borderchars list with characters, defining the character to use
+ for the top/right/bottom/left border; optionally
+ followed by the character to use for the
+! topright/botright/botleft/topleft corner; an empty
+! list can be used to show a double line all around
+! {not implemented yet}
+ zindex priority for the popup, default 50
+ time time in milliseconds after which the popup will close;
+ when omitted |popup_close()| must be used.
+--- 368,386 ----
+ border list with numbers, defining the border thickness
+ above/right/below/left of the popup (similar to CSS);
+ only values of zero and non-zero are recognized;
+! an empty list uses a border all around
+! borderhighlight list of highlight group names to use for the border;
+! when one entry it is used for all borders, otherwise
+! the highlight for the top/right/bottom/left border
+ borderchars list with characters, defining the character to use
+ for the top/right/bottom/left border; optionally
+ followed by the character to use for the
+! topleft/topright/botright/botleft corner; when the
+! list has one character it is used for all; when
+! the list has two characters the first is used for the
+! border lines, the second for the corners; by default
+! a double line is used all around when 'encoding' is
+! "utf-8", otherwise ASCII characters are used.
+ zindex priority for the popup, default 50
+ time time in milliseconds after which the popup will close;
+ when omitted |popup_close()| must be used.
+*** ../vim-8.1.1444/src/testdir/dumps/Test_popupwin_22.dump 2019-06-01 22:14:12.651335535 +0200
+--- src/testdir/dumps/Test_popupwin_22.dump 2019-06-01 22:12:36.427613059 +0200
+***************
+*** 0 ****
+--- 1,12 ----
++ >1+0&#ffffff0| @73
++ |2| |╔+0&#5fd7ff255|═@11|╗| +0&#ffffff0@5|╔+0&#dadada255|═@11|╗+0&#8a8a8a255| +0&#ffffff0@5|x+0&#5fd7ff255@13| +0&#ffffff0@2|#+0&#5fd7ff255|x@11|#| +0&#ffffff0@1
++ |3| |║+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|║+0#0000000#5fd7ff255| +0&#ffffff0@5|║+0&#a8a8a8255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|║+0#0000000#8a8a8a255| +0&#ffffff0@5|x+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|x+0#0000000#5fd7ff255| +0&#ffffff0@2|x+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|x+0#0000000#5fd7ff255| +0&#ffffff0@1
++ |4| |╚+0&#5fd7ff255|═@11|╝| +0&#ffffff0@5|║+0&#a8a8a8255|a+0#0000001#ffd7ff255|n|d| |m|o|r|e| @3|║+0#0000000#8a8a8a255| +0&#ffffff0@5|x+0&#5fd7ff255|l+0#0000001#ffd7ff255|i|n|e|s| |o|n|l|y| @1|x+0#0000000#5fd7ff255| +0&#ffffff0@2|x+0&#5fd7ff255|w+0#0000001#ffd7ff255|i|t|h| |c|o|r|n|e|r|s|x+0#0000000#5fd7ff255| +0&#ffffff0@1
++ |5| @20|╚+0&#585858255|═@11|╝| +0&#ffffff0@5|x+0&#5fd7ff255@13| +0&#ffffff0@2|#+0&#5fd7ff255|x@11|#| +0&#ffffff0@1
++ |6| |4+0&#5fd7ff255|0@11|5| +0&#ffffff0@58
++ |7| |3+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|1+0#0000000#5fd7ff255| +0&#ffffff0@5| +0&#5fd7ff255@13| +0&#ffffff0@38
++ |8| |3+0&#5fd7ff255|w+0#0000001#ffd7ff255|i|t|h| |n|u|m|b|e|r|s|1+0#0000000#5fd7ff255| +0&#ffffff0@5| +0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r| +0#0000000#5fd7ff255| +0&#ffffff0@38
++ |9| |7+0&#5fd7ff255|2@11|6| +0&#ffffff0@5| +0&#5fd7ff255|j+0#0000001#ffd7ff255|u|s|t| |b|l|a|n|k|s| | +0#0000000#5fd7ff255| +0&#ffffff0@38
++ |1|0| @19| +0&#5fd7ff255@13| +0&#ffffff0@38
++ |1@1| @72
++ @57|1|,|1| @10|T|o|p|
+*** ../vim-8.1.1444/src/version.c 2019-06-01 20:45:05.090694398 +0200
+--- src/version.c 2019-06-01 22:13:43.895408630 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1445,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+81. At social functions you introduce your husband as "my domain server."
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1446 b/data/vim/patches/8.1.1446
new file mode 100644
index 000000000..e59f072a4
--- /dev/null
+++ b/data/vim/patches/8.1.1446
@@ -0,0 +1,291 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1446
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1446
+Problem: Popup window callback not implemented yet.
+Solution: Implement the callback.
+Files: runtime/doc/popup.txt, src/popupwin.c, src/structs.h,
+ src/evalfunc.c, src/window.c, src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1445/runtime/doc/popup.txt 2019-06-01 22:15:10.215177111 +0200
+--- runtime/doc/popup.txt 2019-06-01 22:45:17.811027656 +0200
+***************
+*** 90,95 ****
+--- 90,96 ----
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
++ - Fix positioning with border and padding.
+ - Why does 'nrformats' leak from the popup window buffer???
+ - Make redrawing more efficient and avoid flicker.
+ Store popup info in a mask, use the mask in screen_line()
+***************
+*** 133,142 ****
+ < In case of failure zero is returned.
+
+
+! popup_close({id}) *popup_close()*
+ Close popup {id}. The window and the associated buffer will
+ be deleted.
+
+
+ popup_dialog({text}, {options}) *popup_dialog()*
+ {not implemented yet}
+--- 134,148 ----
+ < In case of failure zero is returned.
+
+
+! popup_close({id} [, {result}]) *popup_close()*
+ Close popup {id}. The window and the associated buffer will
+ be deleted.
+
++ If the popup has a callback it will be called just before the
++ popup window is deleted. If the optional {result} is present
++ it will be passed as the second argument of the callback.
++ Otherwise zero is passed to the callback.
++
+
+ popup_dialog({text}, {options}) *popup_dialog()*
+ {not implemented yet}
+***************
+*** 145,150 ****
+--- 151,157 ----
+ \ 'pos': 'center',
+ \ 'zindex': 200,
+ \ 'border': [],
++ \ 'padding': [],
+ \})
+ < Use {options} to change the properties.
+
+***************
+*** 166,171 ****
+--- 173,179 ----
+
+
+ popup_atcursor({text}, {options}) *popup_atcursor()*
++ {not implemented yet: close when cursor moves}
+ Show the {text} above the cursor, and close it when the cursor
+ moves. This works like: >
+ call popup_create({text}, {
+***************
+*** 394,400 ****
+ |popup-filter|
+ callback a callback to be used when the popup closes, e.g. when
+ using |popup_filter_menu()|, see |popup-callback|.
+- {not implemented yet}
+
+ Depending on the "zindex" the popup goes under or above other popups. The
+ completion menu (|popup-menu|) has zindex 100. For messages that occur for a
+--- 402,407 ----
+***************
+*** 477,487 ****
+
+ POPUP CALLBACK *popup-callback*
+
+- {not implemented yet}
+ A callback that is invoked when the popup closes. Used by
+! |popup_filter_menu()|. Invoked with two arguments: the ID of the popup and
+! the result, which would usually be an index in the popup lines, or whatever
+! the filter wants to pass.
+
+ ==============================================================================
+ 3. Examples *popup-examples*
+--- 484,495 ----
+
+ POPUP CALLBACK *popup-callback*
+
+ A callback that is invoked when the popup closes. Used by
+! |popup_filter_menu()|.
+!
+! The callback is invoked with two arguments: the ID of the popup window and the
+! result, which could be an index in the popup lines, or whatever was passed as
+! the second argument of `popup_close()`.
+
+ ==============================================================================
+ 3. Examples *popup-examples*
+*** ../vim-8.1.1445/src/popupwin.c 2019-06-01 22:15:10.211177120 +0200
+--- src/popupwin.c 2019-06-01 22:38:42.421014923 +0200
+***************
+*** 201,206 ****
+--- 201,215 ----
+ wp->w_p_wrap = nr != 0;
+ }
+
++ di = dict_find(dict, (char_u *)"callback", -1);
++ if (di != NULL)
++ {
++ callback_T callback = get_callback(&di->di_tv);
++
++ if (callback.cb_name != NULL)
++ set_callback(&wp->w_close_cb, &callback);
++ }
++
+ di = dict_find(dict, (char_u *)"filter", -1);
+ if (di != NULL)
+ {
+***************
+*** 632,645 ****
+ }
+
+ /*
+ * popup_close({id})
+ */
+ void
+ f_popup_close(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ int id = (int)tv_get_number(argvars);
+
+! popup_close(id);
+ }
+
+ /*
+--- 641,693 ----
+ }
+
+ /*
++ * Invoke the close callback for window "wp" with value "result".
++ * Careful: The callback may make "wp" invalid!
++ */
++ static void
++ invoke_popup_callback(win_T *wp, typval_T *result)
++ {
++ typval_T rettv;
++ int dummy;
++ typval_T argv[3];
++
++ argv[0].v_type = VAR_NUMBER;
++ argv[0].vval.v_number = (varnumber_T)wp->w_id;
++
++ if (result != NULL && result->v_type != VAR_UNKNOWN)
++ copy_tv(result, &argv[1]);
++ else
++ {
++ argv[1].v_type = VAR_NUMBER;
++ argv[1].vval.v_number = 0;
++ }
++
++ argv[2].v_type = VAR_UNKNOWN;
++
++ call_callback(&wp->w_close_cb, -1,
++ &rettv, 2, argv, NULL, 0L, 0L, &dummy, TRUE, NULL);
++ if (result != NULL)
++ clear_tv(&argv[1]);
++ clear_tv(&rettv);
++ }
++
++ /*
+ * popup_close({id})
+ */
+ void
+ f_popup_close(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ int id = (int)tv_get_number(argvars);
++ win_T *wp = find_popup_win(id);
+
+! if (wp != NULL)
+! {
+! if (wp->w_close_cb.cb_name != NULL)
+! // Careful: This may make "wp" invalid.
+! invoke_popup_callback(wp, &argvars[1]);
+!
+! popup_close(id);
+! }
+ }
+
+ /*
+***************
+*** 688,693 ****
+--- 736,742 ----
+
+ /*
+ * Close a popup window by Window-id.
++ * Does not invoke the callback.
+ */
+ void
+ popup_close(int id)
+*** ../vim-8.1.1445/src/structs.h 2019-06-01 22:15:10.211177120 +0200
+--- src/structs.h 2019-06-01 22:36:44.253601570 +0200
+***************
+*** 2894,2899 ****
+--- 2894,2900 ----
+ int w_border_char[8]; // popup border characters
+ varnumber_T w_popup_last_changedtick; // b:changedtick when position was
+ // computed
++ callback_T w_close_cb; // popup close callback
+ callback_T w_filter_cb; // popup filter callback
+ # if defined(FEAT_TIMERS)
+ timer_T *w_popup_timer; // timer for closing popup window
+*** ../vim-8.1.1445/src/evalfunc.c 2019-06-01 13:28:30.265829531 +0200
+--- src/evalfunc.c 2019-06-01 22:23:58.965206463 +0200
+***************
+*** 810,816 ****
+ #endif
+ #ifdef FEAT_TEXT_PROP
+ {"popup_atcursor", 2, 2, f_popup_atcursor},
+! {"popup_close", 1, 1, f_popup_close},
+ {"popup_create", 2, 2, f_popup_create},
+ {"popup_getoptions", 1, 1, f_popup_getoptions},
+ {"popup_getpos", 1, 1, f_popup_getpos},
+--- 810,816 ----
+ #endif
+ #ifdef FEAT_TEXT_PROP
+ {"popup_atcursor", 2, 2, f_popup_atcursor},
+! {"popup_close", 1, 2, f_popup_close},
+ {"popup_create", 2, 2, f_popup_create},
+ {"popup_getoptions", 1, 1, f_popup_getoptions},
+ {"popup_getpos", 1, 1, f_popup_getpos},
+*** ../vim-8.1.1445/src/window.c 2019-06-01 22:15:10.215177111 +0200
+--- src/window.c 2019-06-01 22:36:56.873539136 +0200
+***************
+*** 4845,4850 ****
+--- 4845,4851 ----
+ remove_winbar(wp);
+ #endif
+ #ifdef FEAT_TEXT_PROP
++ free_callback(&wp->w_close_cb);
+ free_callback(&wp->w_filter_cb);
+ for (i = 0; i < 4; ++i)
+ VIM_CLEAR(wp->w_border_highlight[i]);
+*** ../vim-8.1.1445/src/testdir/test_popupwin.vim 2019-06-01 22:15:10.215177111 +0200
+--- src/testdir/test_popupwin.vim 2019-06-01 22:41:48.592082968 +0200
+***************
+*** 586,588 ****
+--- 586,598 ----
+ delfunc MyPopupFilter
+ popupclear
+ endfunc
++
++ func Test_popup_close_callback()
++ func PopupDone(id, result)
++ let g:result = a:result
++ endfunc
++ let winid = popup_create('something', {'callback': 'PopupDone'})
++ redraw
++ call popup_close(winid, 'done')
++ call assert_equal('done', g:result)
++ endfunc
+*** ../vim-8.1.1445/src/version.c 2019-06-01 22:15:10.215177111 +0200
+--- src/version.c 2019-06-01 22:48:33.361971805 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1446,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+82. AT&T names you Customer of the Month for the third consecutive 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.1447 b/data/vim/patches/8.1.1447
new file mode 100644
index 000000000..a36fa99ec
--- /dev/null
+++ b/data/vim/patches/8.1.1447
@@ -0,0 +1,110 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1447
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1447
+Problem: Not allowed to create an empty popup.
+Solution: Remove restriction that there is some text. (closes #4470)
+Files: src/popupwin.c, src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1446/src/popupwin.c 2019-06-01 22:49:23.697685695 +0200
+--- src/popupwin.c 2019-06-02 13:09:37.696928315 +0200
+***************
+*** 488,499 ****
+ int nr;
+
+ // Check arguments look OK.
+! if (!(argvars[0].v_type == VAR_STRING
+! && argvars[0].vval.v_string != NULL
+! && STRLEN(argvars[0].vval.v_string) > 0)
+! && !(argvars[0].v_type == VAR_LIST
+! && argvars[0].vval.v_list != NULL
+! && argvars[0].vval.v_list->lv_len > 0))
+ {
+ emsg(_(e_listreq));
+ return;
+--- 488,495 ----
+ int nr;
+
+ // Check arguments look OK.
+! if (!(argvars[0].v_type == VAR_STRING && argvars[0].vval.v_string != NULL)
+! && !(argvars[0].v_type == VAR_LIST && argvars[0].vval.v_list != NULL))
+ {
+ emsg(_(e_listreq));
+ return;
+***************
+*** 560,571 ****
+ {
+ list_T *l = argvars[0].vval.v_list;
+
+! if (l->lv_first->li_tv.v_type == VAR_STRING)
+! // list of strings
+! add_popup_strings(buf, l);
+! else
+! // list of dictionaries
+! add_popup_dicts(buf, l);
+ }
+
+ // Delete the line of the empty buffer.
+--- 556,570 ----
+ {
+ list_T *l = argvars[0].vval.v_list;
+
+! if (l->lv_len > 0)
+! {
+! if (l->lv_first->li_tv.v_type == VAR_STRING)
+! // list of strings
+! add_popup_strings(buf, l);
+! else
+! // list of dictionaries
+! add_popup_dicts(buf, l);
+! }
+ }
+
+ // Delete the line of the empty buffer.
+*** ../vim-8.1.1446/src/testdir/test_popupwin.vim 2019-06-01 22:49:23.701685671 +0200
+--- src/testdir/test_popupwin.vim 2019-06-02 13:19:58.857248458 +0200
+***************
+*** 596,598 ****
+--- 596,612 ----
+ call popup_close(winid, 'done')
+ call assert_equal('done', g:result)
+ endfunc
++
++ func Test_popup_empty()
++ let winid = popup_create('', {'padding': [2,2,2,2]})
++ redraw
++ let pos = popup_getpos(winid)
++ call assert_equal(4, pos.width)
++ call assert_equal(5, pos.height)
++
++ let winid = popup_create([], {'border': []})
++ redraw
++ let pos = popup_getpos(winid)
++ call assert_equal(2, pos.width)
++ call assert_equal(3, pos.height)
++ endfunc
+*** ../vim-8.1.1446/src/version.c 2019-06-01 22:49:23.701685671 +0200
+--- src/version.c 2019-06-02 13:21:01.044891751 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1447,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+86. E-mail Deficiency Depression (EDD) forces you to e-mail yourself.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1448 b/data/vim/patches/8.1.1448
new file mode 100644
index 000000000..35c3381f5
--- /dev/null
+++ b/data/vim/patches/8.1.1448
@@ -0,0 +1,170 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1448
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1448
+Problem: Statusline is sometimes drawn on top of popup.
+Solution: Redraw popups after the statusline. (Naruhiko Nishino,
+ closes #4468)
+Files: src/screen.c, src/testdir/test_popupwin.vim,
+ src/testdir/dumps/Test_popupwin_behind.dump
+
+
+*** ../vim-8.1.1447/src/screen.c 2019-06-01 22:15:10.215177111 +0200
+--- src/screen.c 2019-06-02 14:09:46.617667197 +0200
+***************
+*** 823,829 ****
+ did_intro = TRUE;
+
+ #ifdef FEAT_TEXT_PROP
+! // Display popup windows on top of the others.
+ update_popups();
+ #endif
+
+--- 823,829 ----
+ did_intro = TRUE;
+
+ #ifdef FEAT_TEXT_PROP
+! // Display popup windows on top of the windows.
+ update_popups();
+ #endif
+
+***************
+*** 987,992 ****
+--- 987,997 ----
+ win_redr_status(wp, FALSE);
+ }
+
++ #ifdef FEAT_TEXT_PROP
++ // Display popup windows on top of the others.
++ update_popups();
++ #endif
++
+ update_finish();
+ }
+ #endif
+***************
+*** 1211,1216 ****
+--- 1216,1226 ----
+ )
+ win_redr_status(wp, FALSE);
+
++ #ifdef FEAT_TEXT_PROP
++ // Display popup windows on top of everything.
++ update_popups();
++ #endif
++
+ update_finish();
+ }
+ #endif
+***************
+*** 6795,6800 ****
+--- 6805,6815 ----
+ win_redr_status(wp, FALSE);
+ if (redraw_tabline)
+ draw_tabline();
++
++ #ifdef FEAT_TEXT_PROP
++ // Display popup windows on top of the status lines.
++ update_popups();
++ #endif
+ }
+
+ #if defined(FEAT_WILDMENU) || defined(PROTO)
+***************
+*** 11101,11106 ****
+--- 11116,11126 ----
+ /* Redraw the tab pages line if needed. */
+ if (redraw_tabline)
+ draw_tabline();
++
++ #ifdef FEAT_TEXT_PROP
++ // Display popup windows on top of everything.
++ update_popups();
++ #endif
+ }
+
+ #ifdef FEAT_CMDL_INFO
+*** ../vim-8.1.1447/src/testdir/test_popupwin.vim 2019-06-02 13:22:08.372506989 +0200
+--- src/testdir/test_popupwin.vim 2019-06-02 14:06:45.810620422 +0200
+***************
+*** 610,612 ****
+--- 610,649 ----
+ call assert_equal(2, pos.width)
+ call assert_equal(3, pos.height)
+ endfunc
++
++ func Test_popup_never_behind()
++ if !CanRunVimInTerminal()
++ return
++ endif
++ " +-----------------------------+
++ " | | |
++ " | | |
++ " | | |
++ " | line1 |
++ " |------------line2------------|
++ " | line3 |
++ " | line4 |
++ " | |
++ " | |
++ " +-----------------------------+
++ let lines =<< trim END
++ only
++ split
++ vsplit
++ let info_window1 = getwininfo()[0]
++ let line = info_window1['height']
++ let col = info_window1['width']
++ call popup_create(['line1', 'line2', 'line3', 'line4'], {
++ \ 'line' : line,
++ \ 'col' : col,
++ \ })
++ END
++ call writefile(lines, 'XtestPopupBehind')
++ let buf = RunVimInTerminal('-S XtestPopupBehind', {'rows': 10})
++ call term_sendkeys(buf, "\<C-W>w")
++ call VerifyScreenDump(buf, 'Test_popupwin_behind', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XtestPopupBehind')
++ endfunc
+*** ../vim-8.1.1447/src/testdir/dumps/Test_popupwin_behind.dump 2019-06-02 14:11:40.761078512 +0200
+--- src/testdir/dumps/Test_popupwin_behind.dump 2019-06-02 14:09:56.249617679 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ | +0&#ffffff0@36||+1&&> +0&&@36
++ |~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
++ |~| @35||+1#0000000&|~+0#4040ff13&| @35
++ |~| @34|l+0#0000001#ffd7ff255|i|n|e|1| +0#4040ff13#ffffff0@33
++ |[+1#0000000&|N|o| |N|a|m|e|]| @9|0|,|0|-|1| @9|A|l|l+0#0000001#ffd7ff255|i|n|e|2| +3#0000000#ffffff0|N|a|m|e|]| @9|0|,|0|-|1| @9|A|l@1
++ | +0&&@35|l+0#0000001#ffd7ff255|i|n|e|3| +0#0000000#ffffff0@33
++ |~+0#4040ff13&| @34|l+0#0000001#ffd7ff255|i|n|e|4| +0#4040ff13#ffffff0@33
++ |~| @73
++ |[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
++ |A+0&&|l|r|e|a|d|y| |o|n|l|y| |o|n|e| |w|i|n|d|o|w| @51
+*** ../vim-8.1.1447/src/version.c 2019-06-02 13:22:08.372506989 +0200
+--- src/version.c 2019-06-02 13:51:03.867557478 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1448,
+ /**/
+
+--
+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.1449 b/data/vim/patches/8.1.1449
new file mode 100644
index 000000000..f25f6f880
--- /dev/null
+++ b/data/vim/patches/8.1.1449
@@ -0,0 +1,669 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1449
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1449
+Problem: Popup text truncated at end of screen.
+Solution: Move popup left if needed. Add the "fixed" property to disable
+ that. (Ben Jackson , closes #4466)
+Files: runtime/doc/popup.txt, src/popupwin.c, src/structs.h,
+ src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1448/runtime/doc/popup.txt 2019-06-01 22:49:23.697685695 +0200
+--- runtime/doc/popup.txt 2019-06-02 14:40:53.019846834 +0200
+***************
+*** 65,72 ****
+ It can be limited with the "maxwidth" property. You can use spaces to
+ increase the width or the "minwidth" property.
+
+! By default the 'wrap' option is set, so that no text disappears. However, if
+! there is not enough space, some text may be invisible.
+
+ Vim tries to show the popup in the location you specify. In some cases, e.g.
+ when the popup would go outside of the Vim window, it will show it somewhere
+--- 65,74 ----
+ It can be limited with the "maxwidth" property. You can use spaces to
+ increase the width or the "minwidth" property.
+
+! By default the 'wrap' option is set, so that no text disappears. Otherwise,
+! if there is not enough space then the window is shifted left in order to
+! display more text. This can be disabled with the "fixed" property. Also
+! disabled when right-aligned.
+
+ Vim tries to show the popup in the location you specify. In some cases, e.g.
+ when the popup would go outside of the Vim window, it will show it somewhere
+***************
+*** 78,85 ****
+
+ TODO:
+
+- Example how to use syntax highlighting of a code snippet.
+-
+ Scrolling: When the screen scrolls up for output of an Ex command, what
+ happens with popups?
+ 1. Stay where they are. Problem: listed text may go behind and can't be read.
+--- 80,85 ----
+***************
+*** 93,104 ****
+ - Fix positioning with border and padding.
+ - Why does 'nrformats' leak from the popup window buffer???
+ - Make redrawing more efficient and avoid flicker.
+! Store popup info in a mask, use the mask in screen_line()
+! Keep mask until next update_screen(), find differences and redraw affected
+! windows/lines
+ Fix redrawing problem with completion.
+ Fix redrawing problem when scrolling non-current window
+- Fix redrawing the statusline on top of a popup
+ - Disable commands, feedkeys(), CTRL-W, etc. in a popup window.
+ Use NOT_IN_POPUP_WINDOW for more commands.
+ - Invoke filter with character before mapping?
+--- 93,104 ----
+ - Fix positioning with border and padding.
+ - Why does 'nrformats' leak from the popup window buffer???
+ - Make redrawing more efficient and avoid flicker.
+! First draw popups, creating a mask, use the mask in screen_line() when
+! drawing other windows and stuff. Mask contains zindex of popups.
+! Keep mask until next update_screen(), use when drawing status lines.
+! Remove update_popup() calls after draw_tabline()/updating statusline
+ Fix redrawing problem with completion.
+ Fix redrawing problem when scrolling non-current window
+ - Disable commands, feedkeys(), CTRL-W, etc. in a popup window.
+ Use NOT_IN_POPUP_WINDOW for more commands.
+ - Invoke filter with character before mapping?
+***************
+*** 327,407 ****
+ |popup-props|.
+
+ The second argument of |popup_create()| is a dictionary with options:
+! line screen line where to position the popup; can use a
+ number or "cursor", "cursor+1" or "cursor-1" to use
+ the line of the cursor and add or subtract a number of
+! lines; if omitted the popup is vertically centered,
+! otherwise "pos" is used.
+! col screen column where to position the popup; can use a
+ number or "cursor" to use the column of the cursor,
+! "cursor+99" and "cursor-99" to add or subtract a
+! number of columns; if omitted the popup is
+! horizontally centered, otherwise "pos" is used
+ pos "topleft", "topright", "botleft" or "botright":
+ defines what corner of the popup "line" and "col" are
+ used for. When not set "topleft" is used.
+ Alternatively "center" can be used to position the
+ popup in the center of the Vim window, in which case
+ "line" and "col" are ignored.
+! flip when TRUE (the default) and the position is relative
+ to the cursor, flip to below or above the cursor to
+ avoid overlap with the |popupmenu-completion| or
+! another popup with a higher "zindex"
+ {not implemented yet}
+! maxheight maximum height
+! minheight minimum height
+! maxwidth maximum width
+! minwidth minimum width
+! hidden when TRUE the popup exists but is not displayed; use
+ `popup_show()` to unhide it.
+ {not implemented yet}
+! tab when -1: display the popup on all tabs; when 0 (the
+! default): display the popup on the current tab;
+! otherwise the number of the tab page the popup is
+! displayed on; when invalid the current tab is used
+ {only -1 and 0 are implemented}
+! title text to be displayed above the first item in the
+! popup, on top of any border
+ {not implemented yet}
+! wrap TRUE to make the lines wrap (default TRUE)
+! highlight highlight group name to use for the text, stored in
+! the 'wincolor' option
+! padding list with numbers, defining the padding
+! above/right/below/left of the popup (similar to CSS);
+! an empty list uses a padding of 1 all around; the
+! padding goes around the text, inside any border;
+! padding uses the 'wincolor' highlight; Example: [1, 2,
+! 1, 3] has 1 line of padding above, 2 columns on the
+! right, 1 line below and 3 columns on the left
+! border list with numbers, defining the border thickness
+! above/right/below/left of the popup (similar to CSS);
+! only values of zero and non-zero are recognized;
+! an empty list uses a border all around
+! borderhighlight list of highlight group names to use for the border;
+! when one entry it is used for all borders, otherwise
+! the highlight for the top/right/bottom/left border
+! borderchars list with characters, defining the character to use
+! for the top/right/bottom/left border; optionally
+ followed by the character to use for the
+! topleft/topright/botright/botleft corner; when the
+! list has one character it is used for all; when
+! the list has two characters the first is used for the
+! border lines, the second for the corners; by default
+! a double line is used all around when 'encoding' is
+! "utf-8", otherwise ASCII characters are used.
+! zindex priority for the popup, default 50
+! time time in milliseconds after which the popup will close;
+! when omitted |popup_close()| must be used.
+ moved "cell": close the popup if the cursor moved at least
+! one screen cell; "word" allows for moving within
+! |<cword>|, "WORD" allows for moving within |<cWORD>|,
+ a list with two numbers specifies the start and end
+! column
+ {not implemented yet}
+! filter a callback that can filter typed characters, see
+! |popup-filter|
+! callback a callback to be used when the popup closes, e.g. when
+! using |popup_filter_menu()|, see |popup-callback|.
+
+ Depending on the "zindex" the popup goes under or above other popups. The
+ completion menu (|popup-menu|) has zindex 100. For messages that occur for a
+--- 327,426 ----
+ |popup-props|.
+
+ The second argument of |popup_create()| is a dictionary with options:
+! line Screen line where to position the popup. Can use a
+ number or "cursor", "cursor+1" or "cursor-1" to use
+ the line of the cursor and add or subtract a number of
+! lines. If omitted the popup is vertically centered.
+! The first line is 1.
+! col Screen column where to position the popup. Can use a
+ number or "cursor" to use the column of the cursor,
+! "cursor+9" or "cursor-9" to add or subtract a number
+! of columns. If omitted the popup is horizontally
+! centered. The first column is 1.
+ pos "topleft", "topright", "botleft" or "botright":
+ defines what corner of the popup "line" and "col" are
+ used for. When not set "topleft" is used.
+ Alternatively "center" can be used to position the
+ popup in the center of the Vim window, in which case
+ "line" and "col" are ignored.
+! fixed When FALSE (the default), and:
+! - "pos" is "botleft" or "topleft", and
+! - "wrap" is off, and
+! - the popup would be truncated at the right edge of
+! the screen, then
+! the popup is moved to the left so as to fit the
+! contents on the screen. Set to TRUE to disable this.
+! flip When TRUE (the default) and the position is relative
+ to the cursor, flip to below or above the cursor to
+ avoid overlap with the |popupmenu-completion| or
+! another popup with a higher "zindex".
+ {not implemented yet}
+! maxheight Maximum height of the contents, excluding border and
+! padding.
+! minheight Minimum height of the contents, excluding border and
+! padding.
+! maxwidth Maximum width of the contents, excluding border and
+! padding.
+! minwidth Minimum width of the contents, excluding border and
+! padding.
+! hidden When TRUE the popup exists but is not displayed; use
+ `popup_show()` to unhide it.
+ {not implemented yet}
+! tab When -1: display the popup on all tabs.
+! When 0 (the default): display the popup on the current
+! tab.
+! Otherwise the number of the tab page the popup is
+! displayed on; when invalid the current tab is used.
+ {only -1 and 0 are implemented}
+! title Text to be displayed above the first item in the
+! popup, on top of any border. If there is no top
+! border on line of padding is added to put the title on.
+ {not implemented yet}
+! wrap TRUE to make the lines wrap (default TRUE).
+! highlight Highlight group name to use for the text, stored in
+! the 'wincolor' option.
+! padding List with numbers, defining the padding
+! above/right/below/left of the popup (similar to CSS).
+! An empty list uses a padding of 1 all around. The
+! padding goes around the text, inside any border.
+! Padding uses the 'wincolor' highlight.
+! Example: [1, 2, 1, 3] has 1 line of padding above, 2
+! columns on the right, 1 line below and 3 columns on
+! the left.
+! border List with numbers, defining the border thickness
+! above/right/below/left of the popup (similar to CSS).
+! Only values of zero and non-zero are recognized.
+! An empty list uses a border all around.
+! borderhighlight List of highlight group names to use for the border.
+! When one entry it is used for all borders, otherwise
+! the highlight for the top/right/bottom/left border.
+! Example: ['TopColor', 'RightColor', 'BottomColor,
+! 'LeftColor']
+! borderchars List with characters, defining the character to use
+! for the top/right/bottom/left border. Optionally
+ followed by the character to use for the
+! topleft/topright/botright/botleft corner.
+! Example: ['-', '|', '-', '|', '┌', '┐', '┘', '└']
+! When the list has one character it is used for all.
+! When the list has two characters the first is used for
+! the border lines, the second for the corners.
+! By default a double line is used all around when
+! 'encoding' is "utf-8", otherwise ASCII characters are
+! used.
+! zindex Priority for the popup, default 50.
+! time Time in milliseconds after which the popup will close.
+! When omitted |popup_close()| must be used.
+ moved "cell": close the popup if the cursor moved at least
+! one screen cell.
+! "word" allows for moving the cursor within |<cword>|
+! "WORD" allows for moving the cursor within |<cWORD>|
+ a list with two numbers specifies the start and end
+! column outside of which the popup will close
+ {not implemented yet}
+! filter A callback that can filter typed characters, see
+! |popup-filter|.
+! callback A callback that is called when the popup closes, e.g.
+! when using |popup_filter_menu()|, see |popup-callback|.
+
+ Depending on the "zindex" the popup goes under or above other popups. The
+ completion menu (|popup-menu|) has zindex 100. For messages that occur for a
+*** ../vim-8.1.1448/src/popupwin.c 2019-06-02 13:22:08.368507012 +0200
+--- src/popupwin.c 2019-06-02 14:43:16.359086768 +0200
+***************
+*** 84,89 ****
+--- 84,91 ----
+ if (nr > 0)
+ wp->w_wantcol = nr;
+
++ wp->w_popup_fixed = dict_get_number(dict, (char_u *)"fixed") != 0;
++
+ str = dict_get_string(dict, (char_u *)"pos", FALSE);
+ if (str != NULL)
+ {
+***************
+*** 379,384 ****
+--- 381,387 ----
+ int maxwidth;
+ int center_vert = FALSE;
+ int center_hor = FALSE;
++ int allow_adjust_left = !wp->w_popup_fixed;
+
+ wp->w_winrow = 0;
+ wp->w_wincol = 0;
+***************
+*** 412,421 ****
+ }
+
+ // When centering or right aligned, use maximum width.
+! // When left aligned use the space available.
+ maxwidth = Columns - wp->w_wincol;
+ if (wp->w_maxwidth > 0 && maxwidth > wp->w_maxwidth)
+ maxwidth = wp->w_maxwidth;
+
+ // Compute width based on longest text line and the 'wrap' option.
+ // TODO: more accurate wrapping
+--- 415,428 ----
+ }
+
+ // When centering or right aligned, use maximum width.
+! // When left aligned use the space available, but shift to the left when we
+! // hit the right of the screen.
+ maxwidth = Columns - wp->w_wincol;
+ if (wp->w_maxwidth > 0 && maxwidth > wp->w_maxwidth)
++ {
++ allow_adjust_left = FALSE;
+ maxwidth = wp->w_maxwidth;
++ }
+
+ // Compute width based on longest text line and the 'wrap' option.
+ // TODO: more accurate wrapping
+***************
+*** 424,433 ****
+ {
+ int len = vim_strsize(ml_get_buf(wp->w_buffer, lnum, FALSE));
+
+! while (wp->w_p_wrap && len > maxwidth)
+ {
+! ++wrapped;
+! len -= maxwidth;
+ wp->w_width = maxwidth;
+ }
+ if (wp->w_width < len)
+--- 431,462 ----
+ {
+ int len = vim_strsize(ml_get_buf(wp->w_buffer, lnum, FALSE));
+
+! if (wp->w_p_wrap)
+ {
+! while (len > maxwidth)
+! {
+! ++wrapped;
+! len -= maxwidth;
+! wp->w_width = maxwidth;
+! }
+! }
+! else if (len > maxwidth
+! && allow_adjust_left
+! && (wp->w_popup_pos == POPPOS_TOPLEFT
+! || wp->w_popup_pos == POPPOS_BOTLEFT))
+! {
+! // adjust leftwise to fit text on screen
+! int shift_by = ( len - maxwidth );
+!
+! if ( shift_by > wp->w_wincol )
+! {
+! int truncate_shift = shift_by - wp->w_wincol;
+! len -= truncate_shift;
+! shift_by -= truncate_shift;
+! }
+!
+! wp->w_wincol -= shift_by;
+! maxwidth += shift_by;
+ wp->w_width = maxwidth;
+ }
+ if (wp->w_width < len)
+***************
+*** 895,900 ****
+--- 924,930 ----
+ dict_add_number(dict, "maxheight", wp->w_maxheight);
+ dict_add_number(dict, "maxwidth", wp->w_maxwidth);
+ dict_add_number(dict, "zindex", wp->w_zindex);
++ dict_add_number(dict, "fixed", wp->w_popup_fixed);
+
+ for (i = 0; i < (int)(sizeof(poppos_entries) / sizeof(poppos_entry_T));
+ ++i)
+*** ../vim-8.1.1448/src/structs.h 2019-06-01 22:49:23.697685695 +0200
+--- src/structs.h 2019-06-02 14:44:16.118752659 +0200
+***************
+*** 2308,2314 ****
+ int b_p_fixeol; /* 'fixendofline' */
+ int b_p_et; /* 'expandtab' */
+ int b_p_et_nobin; /* b_p_et saved for binary mode */
+! int b_p_et_nopaste; /* b_p_et saved for paste mode */
+ char_u *b_p_fenc; /* 'fileencoding' */
+ char_u *b_p_ff; /* 'fileformat' */
+ char_u *b_p_ft; /* 'filetype' */
+--- 2308,2314 ----
+ int b_p_fixeol; /* 'fixendofline' */
+ int b_p_et; /* 'expandtab' */
+ int b_p_et_nobin; /* b_p_et saved for binary mode */
+! int b_p_et_nopaste; /* b_p_et saved for paste mode */
+ char_u *b_p_fenc; /* 'fileencoding' */
+ char_u *b_p_ff; /* 'fileformat' */
+ char_u *b_p_ft; /* 'filetype' */
+***************
+*** 2881,2886 ****
+--- 2881,2887 ----
+ #ifdef FEAT_TEXT_PROP
+ int w_popup_flags; // POPF_ values
+ poppos_T w_popup_pos;
++ int w_popup_fixed; // do not shift popup to fit on screen
+ int w_zindex;
+ int w_minheight; // "minheight" for popup window
+ int w_minwidth; // "minwidth" for popup window
+***************
+*** 3038,3045 ****
+ int w_p_brishift; /* additional shift for breakindent */
+ int w_p_brisbr; /* sbr in 'briopt' */
+ #endif
+! long w_p_siso; /* 'sidescrolloff' local value */
+! long w_p_so; /* 'scrolloff' local value */
+
+ /* transform a pointer to a "onebuf" option into a "allbuf" option */
+ #define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T))
+--- 3039,3046 ----
+ int w_p_brishift; /* additional shift for breakindent */
+ int w_p_brisbr; /* sbr in 'briopt' */
+ #endif
+! long w_p_siso; /* 'sidescrolloff' local value */
+! long w_p_so; /* 'scrolloff' local value */
+
+ /* transform a pointer to a "onebuf" option into a "allbuf" option */
+ #define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T))
+***************
+*** 3471,3477 ****
+ int js_used; /* bytes used from js_buf */
+ int (*js_fill)(struct js_reader *);
+ /* function to fill the buffer or NULL;
+! * return TRUE when the buffer was filled */
+ void *js_cookie; /* can be used by js_fill */
+ int js_cookie_arg; /* can be used by js_fill */
+ };
+--- 3472,3478 ----
+ int js_used; /* bytes used from js_buf */
+ int (*js_fill)(struct js_reader *);
+ /* function to fill the buffer or NULL;
+! * return TRUE when the buffer was filled */
+ void *js_cookie; /* can be used by js_fill */
+ int js_cookie_arg; /* can be used by js_fill */
+ };
+*** ../vim-8.1.1448/src/testdir/test_popupwin.vim 2019-06-02 14:11:51.865021060 +0200
+--- src/testdir/test_popupwin.vim 2019-06-02 14:23:15.857441117 +0200
+***************
+*** 422,427 ****
+--- 422,428 ----
+ \ 'maxheight': 21,
+ \ 'zindex': 100,
+ \ 'time': 5000,
++ \ 'fixed': 1
+ \})
+ redraw
+ let res = popup_getoptions(winid)
+***************
+*** 432,437 ****
+--- 433,439 ----
+ call assert_equal(20, res.maxwidth)
+ call assert_equal(21, res.maxheight)
+ call assert_equal(100, res.zindex)
++ call assert_equal(1, res.fixed)
+ if has('timers')
+ call assert_equal(5000, res.time)
+ endif
+***************
+*** 447,452 ****
+--- 449,455 ----
+ call assert_equal(0, res.maxwidth)
+ call assert_equal(0, res.maxheight)
+ call assert_equal(50, res.zindex)
++ call assert_equal(0, res.fixed)
+ if has('timers')
+ call assert_equal(0, res.time)
+ endif
+***************
+*** 647,649 ****
+--- 650,832 ----
+ call StopVimInTerminal(buf)
+ call delete('XtestPopupBehind')
+ endfunc
++
++ func s:VerifyPosition( p, msg, line, col, width, height )
++ call assert_equal( a:line, popup_getpos( a:p ).line, a:msg . ' (l)' )
++ call assert_equal( a:col, popup_getpos( a:p ).col, a:msg . ' (c)' )
++ call assert_equal( a:width, popup_getpos( a:p ).width, a:msg . ' (w)' )
++ call assert_equal( a:height, popup_getpos( a:p ).height, a:msg . ' (h)' )
++ endfunc
++
++ func Test_popup_position_adjust()
++ " Anything placed past 2 cells from of the right of the screen is moved to the
++ " left.
++ "
++ " When wrapping is disabled, we also shift to the left to display on the
++ " screen, unless fixed is set.
++
++ " Entries for cases which don't vary based on wrapping.
++ " Format is per tests described below
++ let both_wrap_tests = [
++ \ [ 'a', 5, &columns, 5, &columns - 2, 1, 1 ],
++ \ [ 'b', 5, &columns + 1, 5, &columns - 2, 1, 1 ],
++ \ [ 'c', 5, &columns - 1, 5, &columns - 2, 1, 1 ],
++ \ [ 'd', 5, &columns - 2, 5, &columns - 2, 1, 1 ],
++ \ [ 'e', 5, &columns - 3, 5, &columns - 3, 1, 1 ],
++ \
++ \ [ 'aa', 5, &columns, 5, &columns - 2, 2, 1 ],
++ \ [ 'bb', 5, &columns + 1, 5, &columns - 2, 2, 1 ],
++ \ [ 'cc', 5, &columns - 1, 5, &columns - 2, 2, 1 ],
++ \ [ 'dd', 5, &columns - 2, 5, &columns - 2, 2, 1 ],
++ \ [ 'ee', 5, &columns - 3, 5, &columns - 3, 2, 1 ],
++ \
++ \ [ 'aaa', 5, &columns, 5, &columns - 2, 3, 1 ],
++ \ [ 'bbb', 5, &columns + 1, 5, &columns - 2, 3, 1 ],
++ \ [ 'ccc', 5, &columns - 1, 5, &columns - 2, 3, 1 ],
++ \ [ 'ddd', 5, &columns - 2, 5, &columns - 2, 3, 1 ],
++ \ [ 'eee', 5, &columns - 3, 5, &columns - 3, 3, 1 ],
++ \ ]
++
++ " these test groups are dicts with:
++ " - comment: something to identify the group of tests by
++ " - options: dict of options to merge with the row/col in tests
++ " - tests: list of cases. Each one is a list with elements:
++ " - text
++ " - row
++ " - col
++ " - expected row
++ " - expected col
++ " - expected width
++ " - expected height
++ let tests = [
++ \ {
++ \ 'comment': 'left-aligned with wrapping',
++ \ 'options': {
++ \ 'wrap': 1,
++ \ 'pos': 'botleft',
++ \ },
++ \ 'tests': both_wrap_tests + [
++ \ [ 'aaaa', 5, &columns, 4, &columns - 2, 3, 2 ],
++ \ [ 'bbbb', 5, &columns + 1, 4, &columns - 2, 3, 2 ],
++ \ [ 'cccc', 5, &columns - 1, 4, &columns - 2, 3, 2 ],
++ \ [ 'dddd', 5, &columns - 2, 4, &columns - 2, 3, 2 ],
++ \ [ 'eeee', 5, &columns - 3, 5, &columns - 3, 4, 1 ],
++ \ ],
++ \ },
++ \ {
++ \ 'comment': 'left aligned without wrapping',
++ \ 'options': {
++ \ 'wrap': 0,
++ \ 'pos': 'botleft',
++ \ },
++ \ 'tests': both_wrap_tests + [
++ \ [ 'aaaa', 5, &columns, 5, &columns - 3, 4, 1 ],
++ \ [ 'bbbb', 5, &columns + 1, 5, &columns - 3, 4, 1 ],
++ \ [ 'cccc', 5, &columns - 1, 5, &columns - 3, 4, 1 ],
++ \ [ 'dddd', 5, &columns - 2, 5, &columns - 3, 4, 1 ],
++ \ [ 'eeee', 5, &columns - 3, 5, &columns - 3, 4, 1 ],
++ \ ],
++ \ },
++ \ {
++ \ 'comment': 'left aligned with fixed position',
++ \ 'options': {
++ \ 'wrap': 0,
++ \ 'fixed': 1,
++ \ 'pos': 'botleft',
++ \ },
++ \ 'tests': both_wrap_tests + [
++ \ [ 'aaaa', 5, &columns, 5, &columns - 2, 3, 1 ],
++ \ [ 'bbbb', 5, &columns + 1, 5, &columns - 2, 3, 1 ],
++ \ [ 'cccc', 5, &columns - 1, 5, &columns - 2, 3, 1 ],
++ \ [ 'dddd', 5, &columns - 2, 5, &columns - 2, 3, 1 ],
++ \ [ 'eeee', 5, &columns - 3, 5, &columns - 3, 4, 1 ],
++ \ ],
++ \ },
++ \ ]
++
++ for test_group in tests
++ for test in test_group.tests
++ let [ text, line, col, e_line, e_col, e_width, e_height ] = test
++ let options = {
++ \ 'line': line,
++ \ 'col': col,
++ \ }
++ call extend( options, test_group.options )
++
++ let p = popup_create( text, options )
++
++ let msg = string( extend( options, { 'text': text } ) )
++ call s:VerifyPosition( p, msg, e_line, e_col, e_width, e_height )
++ call popup_close( p )
++ endfor
++ endfor
++
++ popupclear
++ %bwipe!
++ endfunc
++
++ function Test_adjust_left_past_screen_width()
++ " width of screen
++ let X = join(map(range(&columns), {->'X'}), '')
++
++ let p = popup_create( X, { 'line': 1, 'col': 1, 'wrap': 0 } )
++ call s:VerifyPosition( p, 'full width topleft', 1, 1, &columns, 1 )
++
++ redraw
++ let line = join(map(range(1, &columns + 1), 'screenstring(1, v:val)'), '')
++ call assert_equal(X, line)
++
++ call popup_close( p )
++ redraw
++
++ " Same if placed on the right hand side
++ let p = popup_create( X, { 'line': 1, 'col': &columns, 'wrap': 0 } )
++ call s:VerifyPosition( p, 'full width topright', 1, 1, &columns, 1 )
++
++ redraw
++ let line = join(map(range(1, &columns + 1), 'screenstring(1, v:val)'), '')
++ call assert_equal(X, line)
++
++ call popup_close( p )
++ redraw
++
++ " Extend so > window width
++ let X .= 'x'
++
++ let p = popup_create( X, { 'line': 1, 'col': 1, 'wrap': 0 } )
++ call s:VerifyPosition( p, 'full width + 1 topleft', 1, 1, &columns, 1 )
++
++ redraw
++ let line = join(map(range(1, &columns + 1), 'screenstring(1, v:val)'), '')
++ call assert_equal(X[ : -2 ], line)
++
++ call popup_close( p )
++ redraw
++
++ " Shifted then truncated (the x is not visible)
++ let p = popup_create( X, { 'line': 1, 'col': &columns - 3, 'wrap': 0 } )
++ call s:VerifyPosition( p, 'full width + 1 topright', 1, 1, &columns, 1 )
++
++ redraw
++ let line = join(map(range(1, &columns + 1), 'screenstring(1, v:val)'), '')
++ call assert_equal(X[ : -2 ], line)
++
++ call popup_close( p )
++ redraw
++
++ " Not shifted, just truncated
++ let p = popup_create( X,
++ \ { 'line': 1, 'col': 2, 'wrap': 0, 'fixed': 1 } )
++ call s:VerifyPosition( p, 'full width + 1 fixed', 1, 2, &columns - 1, 1)
++
++ redraw
++ let line = join(map(range(1, &columns + 1), 'screenstring(1, v:val)'), '')
++ let e_line = ' ' . X[ 1 : -2 ]
++ call assert_equal(e_line, line)
++
++ call popup_close( p )
++ redraw
++
++ popupclear
++ %bwipe!
++ endfunction
+*** ../vim-8.1.1448/src/version.c 2019-06-02 14:11:51.865021060 +0200
+--- src/version.c 2019-06-02 14:25:11.832829281 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1449,
+ /**/
+
+--
+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.1450 b/data/vim/patches/8.1.1450
new file mode 100644
index 000000000..d3480a934
--- /dev/null
+++ b/data/vim/patches/8.1.1450
@@ -0,0 +1,168 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1450
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1450
+Problem: Popup window positioning wrong when using padding or borders.
+Solution: Fix computing the position.
+Files: src/popupwin.c, src/testdir/test_popupwin.vim,
+ src/testdir/dumps/Test_popupwin_corners.dump
+
+
+*** ../vim-8.1.1449/src/popupwin.c 2019-06-02 14:49:52.368891150 +0200
+--- src/popupwin.c 2019-06-02 15:27:07.476956587 +0200
+***************
+*** 382,387 ****
+--- 382,393 ----
+ int center_vert = FALSE;
+ int center_hor = FALSE;
+ int allow_adjust_left = !wp->w_popup_fixed;
++ int top_extra = wp->w_popup_border[0] + wp->w_popup_padding[0];
++ int right_extra = wp->w_popup_border[1] + wp->w_popup_padding[1];
++ int bot_extra = wp->w_popup_border[2] + wp->w_popup_padding[2];
++ int left_extra = wp->w_popup_border[3] + wp->w_popup_padding[3];
++ int extra_height = top_extra + bot_extra;
++ int extra_width = left_extra + right_extra;
+
+ wp->w_winrow = 0;
+ wp->w_wincol = 0;
+***************
+*** 474,481 ****
+ {
+ // Right aligned: move to the right if needed.
+ // No truncation, because that would change the height.
+! if (wp->w_width < wp->w_wantcol)
+! wp->w_wincol = wp->w_wantcol - wp->w_width;
+ }
+
+ if (wp->w_height <= 1)
+--- 480,487 ----
+ {
+ // Right aligned: move to the right if needed.
+ // No truncation, because that would change the height.
+! if (wp->w_width + extra_width < wp->w_wantcol)
+! wp->w_wincol = wp->w_wantcol - (wp->w_width + extra_width);
+ }
+
+ if (wp->w_height <= 1)
+***************
+*** 492,500 ****
+ else if (wp->w_popup_pos == POPPOS_BOTRIGHT
+ || wp->w_popup_pos == POPPOS_BOTLEFT)
+ {
+! if (wp->w_height <= wp->w_wantline)
+ // bottom aligned: may move down
+! wp->w_winrow = wp->w_wantline - wp->w_height;
+ else
+ // not enough space, make top aligned
+ wp->w_winrow = wp->w_wantline + 1;
+--- 498,506 ----
+ else if (wp->w_popup_pos == POPPOS_BOTRIGHT
+ || wp->w_popup_pos == POPPOS_BOTLEFT)
+ {
+! if ((wp->w_height + extra_height) <= wp->w_wantline)
+ // bottom aligned: may move down
+! wp->w_winrow = wp->w_wantline - (wp->w_height + extra_height);
+ else
+ // not enough space, make top aligned
+ wp->w_winrow = wp->w_wantline + 1;
+*** ../vim-8.1.1449/src/testdir/test_popupwin.vim 2019-06-02 14:49:52.372891128 +0200
+--- src/testdir/test_popupwin.vim 2019-06-02 15:27:28.196847514 +0200
+***************
+*** 175,180 ****
+--- 175,229 ----
+ call delete('XtestPopup')
+ endfunc
+
++ func Test_popup_all_corners()
++ if !CanRunVimInTerminal()
++ return
++ endif
++ let lines =<< trim END
++ call setline(1, repeat([repeat('-', 60)], 15))
++ set so=0
++ normal 2G3|r#
++ let winid1 = popup_create(['first', 'second'], {
++ \ 'line': 'cursor+1',
++ \ 'col': 'cursor',
++ \ 'pos': 'topleft',
++ \ 'border': [],
++ \ 'padding': [],
++ \ })
++ normal 25|r@
++ let winid1 = popup_create(['First', 'SeconD'], {
++ \ 'line': 'cursor+1',
++ \ 'col': 'cursor',
++ \ 'pos': 'topright',
++ \ 'border': [],
++ \ 'padding': [],
++ \ })
++ normal 9G29|r%
++ let winid1 = popup_create(['fiRSt', 'seCOnd'], {
++ \ 'line': 'cursor-1',
++ \ 'col': 'cursor',
++ \ 'pos': 'botleft',
++ \ 'border': [],
++ \ 'padding': [],
++ \ })
++ normal 51|r&
++ let winid1 = popup_create(['FIrsT', 'SEcoND'], {
++ \ 'line': 'cursor-1',
++ \ 'col': 'cursor',
++ \ 'pos': 'botright',
++ \ 'border': [],
++ \ 'padding': [],
++ \ })
++ END
++ call writefile(lines, 'XtestPopupCorners')
++ let buf = RunVimInTerminal('-S XtestPopupCorners', {'rows': 12})
++ call VerifyScreenDump(buf, 'Test_popupwin_corners', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('XtestPopupCorners')
++ endfunc
++
+ func Test_win_execute_closing_curwin()
+ split
+ let winid = popup_create('some text', {})
+*** ../vim-8.1.1449/src/testdir/dumps/Test_popupwin_corners.dump 2019-06-02 15:33:19.878990668 +0200
+--- src/testdir/dumps/Test_popupwin_corners.dump 2019-06-02 15:24:00.245939605 +0200
+***************
+*** 0 ****
+--- 1,12 ----
++ |-+0&#ffffff0@59| @14
++ |-@1|#|-@20|@|-@34| @14
++ |-@1|╔+0#0000001#ffd7ff255|═@7|╗|-+0#0000000#ffffff0@2|╔+0#0000001#ffd7ff255|═@7|╗|-+0#0000000#ffffff0@2|╔+0#0000001#ffd7ff255|═@7|╗|-+0#0000000#ffffff0@2|╔+0#0000001#ffd7ff255|═@7|╗|-+0#0000000#ffffff0@8| @14
++ |-@1|║+0#0000001#ffd7ff255| @7|║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| @7|║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| @7|║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| @7|║|-+0#0000000#ffffff0@8| @14
++ |-@1|║+0#0000001#ffd7ff255| |f|i|r|s|t| @1|║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| |F|i|r|s|t| @1|║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| |f|i|R|S|t| @1|║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| |F|I|r|s|T| @1|║|-+0#0000000#ffffff0@8| @14
++ |-@1|║+0#0000001#ffd7ff255| |s|e|c|o|n|d| |║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| |S|e|c|o|n|D| |║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| |s|e|C|O|n|d| |║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| |S|E|c|o|N|D| |║|-+0#0000000#ffffff0@8| @14
++ |-@1|║+0#0000001#ffd7ff255| @7|║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| @7|║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| @7|║|-+0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| @7|║|-+0#0000000#ffffff0@8| @14
++ |-@1|╚+0#0000001#ffd7ff255|═@7|╝|-+0#0000000#ffffff0@2|╚+0#0000001#ffd7ff255|═@7|╝|-+0#0000000#ffffff0@2|╚+0#0000001#ffd7ff255|═@7|╝|-+0#0000000#ffffff0@2|╚+0#0000001#ffd7ff255|═@7|╝|-+0#0000000#ffffff0@8| @14
++ |-@27|%|-@20>&|-@8| @14
++ |-@59| @14
++ |-@59| @14
++ @57|9|,|5|1| @9|T|o|p|
+*** ../vim-8.1.1449/src/version.c 2019-06-02 14:49:52.372891128 +0200
+--- src/version.c 2019-06-02 15:33:07.663055316 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1450,
+ /**/
+
+--
+From "know your smileys":
+ :^[/ mean-smiley-with-cigarette
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1451 b/data/vim/patches/8.1.1451
new file mode 100644
index 000000000..7d8c9b593
--- /dev/null
+++ b/data/vim/patches/8.1.1451
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1451
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1451
+Problem: CTRL-L does not clear screen with a popup window.
+Solution: Do not change the type to NOT_VALID. Redraw all windows.
+ (closes #4471)
+Files: src/screen.c
+
+
+*** ../vim-8.1.1450/src/screen.c 2019-06-02 14:11:51.865021060 +0200
+--- src/screen.c 2019-06-02 15:54:25.124288847 +0200
+***************
+*** 613,619 ****
+ #ifdef FEAT_TEXT_PROP
+ // TODO: avoid redrawing everything when there is a popup window.
+ if (popup_any_visible())
+! type = NOT_VALID;
+ #endif
+
+ updating_screen = TRUE;
+--- 613,624 ----
+ #ifdef FEAT_TEXT_PROP
+ // TODO: avoid redrawing everything when there is a popup window.
+ if (popup_any_visible())
+! {
+! if (type < NOT_VALID)
+! type = NOT_VALID;
+! FOR_ALL_WINDOWS(wp)
+! wp->w_redr_type = NOT_VALID;
+! }
+ #endif
+
+ updating_screen = TRUE;
+*** ../vim-8.1.1450/src/version.c 2019-06-02 15:34:15.462696405 +0200
+--- src/version.c 2019-06-02 15:55:31.295942575 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1451,
+ /**/
+
+--
+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.1452 b/data/vim/patches/8.1.1452
new file mode 100644
index 000000000..5caad9370
--- /dev/null
+++ b/data/vim/patches/8.1.1452
@@ -0,0 +1,288 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1452
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1452
+Problem: Line and col property of popup windows not properly checked.
+Solution: Check for "+" or "-" sign.
+Files: src/popupwin.c, src/dict.c, src/proto/dict.pro,
+ src/window.c, src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1451/src/popupwin.c 2019-06-02 15:34:15.458696427 +0200
+--- src/popupwin.c 2019-06-02 16:47:24.668428506 +0200
+***************
+*** 29,35 ****
+ };
+
+ /*
+! * Get option value for"key", which is "line" or "col".
+ * Handles "cursor+N" and "cursor-N".
+ */
+ static int
+--- 29,35 ----
+ };
+
+ /*
+! * Get option value for "key", which is "line" or "col".
+ * Handles "cursor+N" and "cursor-N".
+ */
+ static int
+***************
+*** 47,59 ****
+
+ val = tv_get_string(&di->di_tv);
+ if (STRNCMP(val, "cursor", 6) != 0)
+! return dict_get_number(dict, key);
+
+ setcursor_mayforce(TRUE);
+ s = val + 6;
+ if (*s != NUL)
+ {
+! n = strtol((char *)s, (char **)&endp, 10);
+ if (endp != NULL && *skipwhite(endp) != NUL)
+ {
+ semsg(_(e_invexpr2), val);
+--- 47,61 ----
+
+ val = tv_get_string(&di->di_tv);
+ if (STRNCMP(val, "cursor", 6) != 0)
+! return dict_get_number_check(dict, key);
+
+ setcursor_mayforce(TRUE);
+ s = val + 6;
+ if (*s != NUL)
+ {
+! endp = s;
+! if (*skipwhite(s) == '+' || *skipwhite(s) == '-')
+! n = strtol((char *)s, (char **)&endp, 10);
+ if (endp != NULL && *skipwhite(endp) != NUL)
+ {
+ semsg(_(e_invexpr2), val);
+***************
+*** 902,908 ****
+ dict_add_number(dict, "core_height", wp->w_height);
+
+ dict_add_number(dict, "visible",
+! (wp->w_popup_flags & POPF_HIDDEN) == 0);
+ }
+ }
+
+--- 904,910 ----
+ dict_add_number(dict, "core_height", wp->w_height);
+
+ dict_add_number(dict, "visible",
+! win_valid(wp) && (wp->w_popup_flags & POPF_HIDDEN) == 0);
+ }
+ }
+
+*** ../vim-8.1.1451/src/dict.c 2019-05-28 23:08:12.056648758 +0200
+--- src/dict.c 2019-06-02 16:15:26.717634023 +0200
+***************
+*** 605,610 ****
+--- 605,631 ----
+ }
+
+ /*
++ * Get a number item from a dictionary.
++ * Returns 0 if the entry doesn't exist.
++ * Give an error if the entry is not a number.
++ */
++ varnumber_T
++ dict_get_number_check(dict_T *d, char_u *key)
++ {
++ dictitem_T *di;
++
++ di = dict_find(d, key, -1);
++ if (di == NULL)
++ return 0;
++ if (di->di_tv.v_type != VAR_NUMBER)
++ {
++ semsg(_(e_invarg2), tv_get_string(&di->di_tv));
++ return 0;
++ }
++ return tv_get_number(&di->di_tv);
++ }
++
++ /*
+ * Return an allocated string with the string representation of a Dictionary.
+ * May return NULL.
+ */
+*** ../vim-8.1.1451/src/proto/dict.pro 2019-04-28 18:04:56.058492178 +0200
+--- src/proto/dict.pro 2019-06-02 16:15:30.649613201 +0200
+***************
+*** 25,30 ****
+--- 25,31 ----
+ dictitem_T *dict_find(dict_T *d, char_u *key, int len);
+ char_u *dict_get_string(dict_T *d, char_u *key, int save);
+ varnumber_T dict_get_number(dict_T *d, char_u *key);
++ varnumber_T dict_get_number_check(dict_T *d, char_u *key);
+ char_u *dict2string(typval_T *tv, int copyID, int restore_copyID);
+ int dict_get_tv(char_u **arg, typval_T *rettv, int evaluate);
+ void dict_extend(dict_T *d1, dict_T *d2, char_u *action);
+*** ../vim-8.1.1451/src/window.c 2019-06-01 22:49:23.701685671 +0200
+--- src/window.c 2019-06-02 16:46:22.068740562 +0200
+***************
+*** 1368,1373 ****
+--- 1368,1376 ----
+ win_copy_options(oldp, newp);
+ }
+
++ /*
++ * Return TRUE if "win" is a global popup or a popup in the current tab page.
++ */
+ static int
+ win_valid_popup(win_T *win UNUSED)
+ {
+***************
+*** 1418,1423 ****
+--- 1421,1431 ----
+ if (wp == win)
+ return TRUE;
+ }
++ #ifdef FEAT_TEXT_PROP
++ for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
++ if (wp == win)
++ return TRUE;
++ #endif
+ }
+ return win_valid_popup(win);
+ }
+*** ../vim-8.1.1451/src/testdir/test_popupwin.vim 2019-06-02 15:34:15.458696427 +0200
+--- src/testdir/test_popupwin.vim 2019-06-02 16:50:01.087644950 +0200
+***************
+*** 224,229 ****
+--- 224,315 ----
+ call delete('XtestPopupCorners')
+ endfunc
+
++ func Test_popup_in_tab()
++ " default popup is local to tab, not visible when in other tab
++ let winid = popup_create("text", {})
++ call assert_equal(1, popup_getpos(winid).visible)
++ tabnew
++ call assert_equal(0, popup_getpos(winid).visible)
++ quit
++ call assert_equal(1, popup_getpos(winid).visible)
++ popupclear
++
++ " global popup is visible in any tab
++ let winid = popup_create("text", {'tab': -1})
++ call assert_equal(1, popup_getpos(winid).visible)
++ tabnew
++ call assert_equal(1, popup_getpos(winid).visible)
++ quit
++ call assert_equal(1, popup_getpos(winid).visible)
++ popupclear
++ endfunc
++
++ func Test_popup_valid_arguments()
++ " Zero value is like the property wasn't there
++ let winid = popup_create("text", {"col": 0})
++ let pos = popup_getpos(winid)
++ call assert_inrange(&columns / 2 - 1, &columns / 2 + 1, pos.col)
++ popupclear
++
++ " using cursor column has minimum value of 1
++ let winid = popup_create("text", {"col": 'cursor-100'})
++ let pos = popup_getpos(winid)
++ call assert_equal(1, pos.col)
++ popupclear
++
++ " center
++ let winid = popup_create("text", {"pos": 'center'})
++ let pos = popup_getpos(winid)
++ let around = (&columns - pos.width) / 2
++ call assert_inrange(around - 1, around + 1, pos.col)
++ let around = (&lines - pos.height) / 2
++ call assert_inrange(around - 1, around + 1, pos.line)
++ popupclear
++ endfunc
++
++ func Test_popup_invalid_arguments()
++ call assert_fails('call popup_create(666, {})', 'E714:')
++ popupclear
++ call assert_fails('call popup_create("text", "none")', 'E715:')
++ popupclear
++
++ call assert_fails('call popup_create("text", {"col": "xxx"})', 'E475:')
++ popupclear
++ call assert_fails('call popup_create("text", {"col": "cursor8"})', 'E15:')
++ popupclear
++ call assert_fails('call popup_create("text", {"col": "cursor+x"})', 'E15:')
++ popupclear
++ call assert_fails('call popup_create("text", {"col": "cursor+8x"})', 'E15:')
++ popupclear
++
++ call assert_fails('call popup_create("text", {"line": "xxx"})', 'E475:')
++ popupclear
++ call assert_fails('call popup_create("text", {"line": "cursor8"})', 'E15:')
++ popupclear
++ call assert_fails('call popup_create("text", {"line": "cursor+x"})', 'E15:')
++ popupclear
++ call assert_fails('call popup_create("text", {"line": "cursor+8x"})', 'E15:')
++ popupclear
++
++ call assert_fails('call popup_create("text", {"pos": "there"})', 'E475:')
++ popupclear
++ call assert_fails('call popup_create("text", {"padding": "none"})', 'E714:')
++ popupclear
++ call assert_fails('call popup_create("text", {"border": "none"})', 'E714:')
++ popupclear
++ call assert_fails('call popup_create("text", {"borderhighlight": "none"})', 'E714:')
++ popupclear
++ call assert_fails('call popup_create("text", {"borderchars": "none"})', 'E714:')
++ popupclear
++
++ call assert_fails('call popup_create([{"text": "text"}, 666], {})', 'E715:')
++ popupclear
++ call assert_fails('call popup_create([{"text": "text", "props": "none"}], {})', 'E714:')
++ popupclear
++ call assert_fails('call popup_create([{"text": "text", "props": ["none"]}], {})', 'E715:')
++ popupclear
++ endfunc
++
+ func Test_win_execute_closing_curwin()
+ split
+ let winid = popup_create('some text', {})
+***************
+*** 593,598 ****
+--- 679,693 ----
+ call assert_equal(4, pos.line)
+ call popup_close(winid)
+
++ " cursor in first line, popup in line 2
++ call cursor(1, 1)
++ redraw
++ let winid = popup_atcursor(['vim', 'is', 'great'], {})
++ redraw
++ let pos = popup_getpos(winid)
++ call assert_equal(2, pos.line)
++ call popup_close(winid)
++
+ bwipe!
+ endfunc
+
+*** ../vim-8.1.1451/src/version.c 2019-06-02 15:56:11.839730143 +0200
+--- src/version.c 2019-06-02 16:51:00.935343965 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1452,
+ /**/
+
+--
+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.1453 b/data/vim/patches/8.1.1453
new file mode 100644
index 000000000..6bddda72b
--- /dev/null
+++ b/data/vim/patches/8.1.1453
@@ -0,0 +1,584 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1453
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1453
+Problem: Popup window "moved" property not implemented yet.
+Solution: Implement it.
+Files: src/main.c, src/edit.c, src/gui.c, src/globals.h, src/structs.h,
+ src/screen.c, src/popupwin.c, src/proto/popupwin.pro,
+ src/testdir/test_popupwin.vim, runtime/doc/popup.txt
+
+
+*** ../vim-8.1.1452/src/main.c 2019-05-24 18:48:36.762128482 +0200
+--- src/main.c 2019-06-02 17:03:56.230707184 +0200
+***************
+*** 1159,1164 ****
+--- 1159,1167 ----
+ /* Trigger CursorMoved if the cursor moved. */
+ if (!finish_op && (
+ has_cursormoved()
++ #ifdef FEAT_TEXT_PROP
++ || popup_visible
++ #endif
+ #ifdef FEAT_CONCEAL
+ || curwin->w_p_cole > 0
+ #endif
+***************
+*** 1168,1181 ****
+ if (has_cursormoved())
+ apply_autocmds(EVENT_CURSORMOVED, NULL, NULL,
+ FALSE, curbuf);
+! # ifdef FEAT_CONCEAL
+ if (curwin->w_p_cole > 0)
+ {
+ conceal_old_cursor_line = last_cursormoved.lnum;
+ conceal_new_cursor_line = curwin->w_cursor.lnum;
+ conceal_update_lines = TRUE;
+ }
+! # endif
+ last_cursormoved = curwin->w_cursor;
+ }
+
+--- 1171,1188 ----
+ if (has_cursormoved())
+ apply_autocmds(EVENT_CURSORMOVED, NULL, NULL,
+ FALSE, curbuf);
+! #ifdef FEAT_TEXT_PROP
+! if (popup_visible)
+! popup_check_cursor_pos();
+! #endif
+! #ifdef FEAT_CONCEAL
+ if (curwin->w_p_cole > 0)
+ {
+ conceal_old_cursor_line = last_cursormoved.lnum;
+ conceal_new_cursor_line = curwin->w_cursor.lnum;
+ conceal_update_lines = TRUE;
+ }
+! #endif
+ last_cursormoved = curwin->w_cursor;
+ }
+
+*** ../vim-8.1.1452/src/edit.c 2019-05-24 19:38:59.096545552 +0200
+--- src/edit.c 2019-06-02 18:12:32.244392562 +0200
+***************
+*** 1456,1463 ****
+ * inserting sequences of characters (e.g., for CTRL-R).
+ */
+ void
+! ins_redraw(
+! int ready UNUSED) /* not busy with something */
+ {
+ #ifdef FEAT_CONCEAL
+ linenr_T conceal_old_cursor_line = 0;
+--- 1456,1462 ----
+ * inserting sequences of characters (e.g., for CTRL-R).
+ */
+ void
+! ins_redraw(int ready) // not busy with something
+ {
+ #ifdef FEAT_CONCEAL
+ linenr_T conceal_old_cursor_line = 0;
+***************
+*** 1468,1477 ****
+ if (char_avail())
+ return;
+
+- #if defined(FEAT_CONCEAL)
+ /* Trigger CursorMoved if the cursor moved. Not when the popup menu is
+ * visible, the command might delete it. */
+ if (ready && (has_cursormovedI()
+ # if defined(FEAT_CONCEAL)
+ || curwin->w_p_cole > 0
+ # endif
+--- 1467,1478 ----
+ if (char_avail())
+ return;
+
+ /* Trigger CursorMoved if the cursor moved. Not when the popup menu is
+ * visible, the command might delete it. */
+ if (ready && (has_cursormovedI()
++ # ifdef FEAT_TEXT_PROP
++ || popup_visible
++ # endif
+ # if defined(FEAT_CONCEAL)
+ || curwin->w_p_cole > 0
+ # endif
+***************
+*** 1497,1502 ****
+--- 1498,1507 ----
+ update_curswant();
+ ins_apply_autocmds(EVENT_CURSORMOVEDI);
+ }
++ #ifdef FEAT_TEXT_PROP
++ if (popup_visible)
++ popup_check_cursor_pos();
++ #endif
+ # ifdef FEAT_CONCEAL
+ if (curwin->w_p_cole > 0)
+ {
+***************
+*** 1507,1513 ****
+ # endif
+ last_cursormoved = curwin->w_cursor;
+ }
+- #endif
+
+ /* Trigger TextChangedI if b_changedtick differs. */
+ if (ready && has_textchangedI()
+--- 1512,1517 ----
+***************
+*** 3859,3865 ****
+ if (replace_stack_len <= replace_stack_nr)
+ {
+ replace_stack_len += 50;
+! p = alloc(sizeof(char_u) * replace_stack_len);
+ if (p == NULL) /* out of memory */
+ {
+ replace_stack_len -= 50;
+--- 3863,3869 ----
+ if (replace_stack_len <= replace_stack_nr)
+ {
+ replace_stack_len += 50;
+! p = ALLOC_MULT(char_u, replace_stack_len);
+ if (p == NULL) /* out of memory */
+ {
+ replace_stack_len -= 50;
+*** ../vim-8.1.1452/src/gui.c 2019-05-24 18:48:36.758128504 +0200
+--- src/gui.c 2019-06-02 17:03:51.394743342 +0200
+***************
+*** 5117,5122 ****
+--- 5117,5125 ----
+
+ /* Trigger CursorMoved if the cursor moved. */
+ if (!finish_op && (has_cursormoved()
++ # ifdef FEAT_TEXT_PROP
++ || popup_visible
++ # endif
+ # ifdef FEAT_CONCEAL
+ || curwin->w_p_cole > 0
+ # endif
+***************
+*** 5124,5129 ****
+--- 5127,5136 ----
+ {
+ if (has_cursormoved())
+ apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
++ #ifdef FEAT_TEXT_PROP
++ if (popup_visible)
++ popup_check_cursor_pos();
++ #endif
+ # ifdef FEAT_CONCEAL
+ if (curwin->w_p_cole > 0)
+ {
+*** ../vim-8.1.1452/src/globals.h 2019-05-26 18:48:09.402542633 +0200
+--- src/globals.h 2019-06-02 17:04:22.518512240 +0200
+***************
+*** 558,581 ****
+ EXTERN win_T *firstwin; /* first window */
+ EXTERN win_T *lastwin; /* last window */
+ EXTERN win_T *prevwin INIT(= NULL); /* previous window */
+! # define ONE_WINDOW (firstwin == lastwin)
+! # define W_NEXT(wp) ((wp)->w_next)
+! # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
+! # define FOR_ALL_FRAMES(frp, first_frame) \
+ for (frp = first_frame; frp != NULL; frp = frp->fr_next)
+! # define FOR_ALL_TABPAGES(tp) for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
+! # define FOR_ALL_WINDOWS_IN_TAB(tp, wp) \
+ for ((wp) = ((tp) == NULL || (tp) == curtab) \
+ ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
+ /*
+ * When using this macro "break" only breaks out of the inner loop. Use "goto"
+ * to break out of the tabpage loop.
+ */
+! # define FOR_ALL_TAB_WINDOWS(tp, wp) \
+ for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
+ for ((wp) = ((tp) == curtab) \
+ ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
+
+ EXTERN win_T *curwin; /* currently active window */
+
+ EXTERN win_T *aucmd_win; /* window used in aucmd_prepbuf() */
+--- 558,582 ----
+ EXTERN win_T *firstwin; /* first window */
+ EXTERN win_T *lastwin; /* last window */
+ EXTERN win_T *prevwin INIT(= NULL); /* previous window */
+! #define ONE_WINDOW (firstwin == lastwin)
+! #define W_NEXT(wp) ((wp)->w_next)
+! #define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
+! #define FOR_ALL_FRAMES(frp, first_frame) \
+ for (frp = first_frame; frp != NULL; frp = frp->fr_next)
+! #define FOR_ALL_TABPAGES(tp) for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
+! #define FOR_ALL_WINDOWS_IN_TAB(tp, wp) \
+ for ((wp) = ((tp) == NULL || (tp) == curtab) \
+ ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
+ /*
+ * When using this macro "break" only breaks out of the inner loop. Use "goto"
+ * to break out of the tabpage loop.
+ */
+! #define FOR_ALL_TAB_WINDOWS(tp, wp) \
+ for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
+ for ((wp) = ((tp) == curtab) \
+ ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
+
++
+ EXTERN win_T *curwin; /* currently active window */
+
+ EXTERN win_T *aucmd_win; /* window used in aucmd_prepbuf() */
+***************
+*** 1663,1666 ****
+--- 1664,1668 ----
+
+ #ifdef FEAT_TEXT_PROP
+ EXTERN int text_prop_frozen INIT(= 0);
++ EXTERN int popup_visible INIT(= FALSE);
+ #endif
+*** ../vim-8.1.1452/src/structs.h 2019-06-02 14:49:52.372891128 +0200
+--- src/structs.h 2019-06-02 17:09:32.012375995 +0200
+***************
+*** 2897,2902 ****
+--- 2897,2908 ----
+ // computed
+ callback_T w_close_cb; // popup close callback
+ callback_T w_filter_cb; // popup filter callback
++
++ win_T *w_popup_curwin; // close popup if curwin differs
++ linenr_T w_popup_lnum; // close popup if cursor not on this line
++ colnr_T w_popup_mincol; // close popup if cursor before this col
++ colnr_T w_popup_maxcol; // close popup if cursor after this col
++
+ # if defined(FEAT_TIMERS)
+ timer_T *w_popup_timer; // timer for closing popup window
+ # endif
+*** ../vim-8.1.1452/src/screen.c 2019-06-02 15:56:11.839730143 +0200
+--- src/screen.c 2019-06-02 17:05:40.501948236 +0200
+***************
+*** 1050,1055 ****
+--- 1050,1056 ----
+ // so that the window with a higher zindex is drawn later, thus goes on
+ // top.
+ // TODO: don't redraw every popup every time.
++ popup_visible = FALSE;
+ popup_reset_handled();
+ while ((wp = find_next_popup(TRUE)) != NULL)
+ {
+***************
+*** 1066,1071 ****
+--- 1067,1073 ----
+
+ // Draw the popup text.
+ win_update(wp);
++ popup_visible = TRUE;
+
+ wp->w_winrow -= top_off;
+ wp->w_wincol -= left_off;
+*** ../vim-8.1.1452/src/popupwin.c 2019-06-02 16:51:18.011257964 +0200
+--- src/popupwin.c 2019-06-02 17:58:17.393963233 +0200
+***************
+*** 285,290 ****
+--- 285,333 ----
+ }
+ }
+ }
++
++ di = dict_find(dict, (char_u *)"moved", -1);
++ if (di != NULL)
++ {
++ wp->w_popup_curwin = curwin;
++ wp->w_popup_lnum = curwin->w_cursor.lnum;
++ wp->w_popup_mincol = curwin->w_cursor.col;
++ wp->w_popup_maxcol = curwin->w_cursor.col;
++ if (di->di_tv.v_type == VAR_STRING && di->di_tv.vval.v_string != NULL)
++ {
++ char_u *s = di->di_tv.vval.v_string;
++ int flags = 0;
++
++ if (STRCMP(s, "word") == 0)
++ flags = FIND_IDENT | FIND_STRING;
++ else if (STRCMP(s, "WORD") == 0)
++ flags = FIND_STRING;
++ else if (STRCMP(s, "any") != 0)
++ semsg(_(e_invarg2), s);
++ if (flags != 0)
++ {
++ char_u *ptr;
++ int len = find_ident_under_cursor(&ptr, flags);
++
++ if (len > 0)
++ {
++ wp->w_popup_mincol = (int)(ptr - ml_get_curline());
++ wp->w_popup_maxcol = wp->w_popup_mincol + len - 1;
++ }
++ }
++ }
++ else if (di->di_tv.v_type == VAR_LIST
++ && di->di_tv.vval.v_list != NULL
++ && di->di_tv.vval.v_list->lv_len == 2)
++ {
++ list_T *l = di->di_tv.vval.v_list;
++
++ wp->w_popup_mincol = tv_get_number(&l->lv_first->li_tv);
++ wp->w_popup_maxcol = tv_get_number(&l->lv_first->li_next->li_tv);
++ }
++ else
++ semsg(_(e_invarg2), tv_get_string(&di->di_tv));
++ }
+ }
+
+ /*
+***************
+*** 708,713 ****
+--- 751,771 ----
+ }
+
+ /*
++ * Close popup "wp" and invoke any close callback for it.
++ */
++ static void
++ popup_close_and_callback(win_T *wp, typval_T *arg)
++ {
++ int id = wp->w_id;
++
++ if (wp->w_close_cb.cb_name != NULL)
++ // Careful: This may make "wp" invalid.
++ invoke_popup_callback(wp, arg);
++
++ popup_close(id);
++ }
++
++ /*
+ * popup_close({id})
+ */
+ void
+***************
+*** 717,729 ****
+ win_T *wp = find_popup_win(id);
+
+ if (wp != NULL)
+! {
+! if (wp->w_close_cb.cb_name != NULL)
+! // Careful: This may make "wp" invalid.
+! invoke_popup_callback(wp, &argvars[1]);
+!
+! popup_close(id);
+! }
+ }
+
+ /*
+--- 775,781 ----
+ win_T *wp = find_popup_win(id);
+
+ if (wp != NULL)
+! popup_close_and_callback(wp, &argvars[1]);
+ }
+
+ /*
+***************
+*** 1066,1069 ****
+--- 1118,1145 ----
+ return res;
+ }
+
++ /*
++ * Called when the cursor moved: check if any popup needs to be closed if the
++ * cursor moved far enough.
++ */
++ void
++ popup_check_cursor_pos()
++ {
++ win_T *wp;
++ typval_T tv;
++
++ popup_reset_handled();
++ while ((wp = find_next_popup(TRUE)) != NULL)
++ if (wp->w_popup_curwin != NULL
++ && (curwin != wp->w_popup_curwin
++ || curwin->w_cursor.lnum != wp->w_popup_lnum
++ || curwin->w_cursor.col < wp->w_popup_mincol
++ || curwin->w_cursor.col > wp->w_popup_maxcol))
++ {
++ tv.v_type = VAR_NUMBER;
++ tv.vval.v_number = -1;
++ popup_close_and_callback(wp, &tv);
++ }
++ }
++
+ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.1452/src/proto/popupwin.pro 2019-06-01 17:13:15.880517743 +0200
+--- src/proto/popupwin.pro 2019-06-02 17:15:02.082311611 +0200
+***************
+*** 17,20 ****
+--- 17,21 ----
+ void popup_reset_handled(void);
+ win_T *find_next_popup(int lowest);
+ int popup_do_filter(int c);
++ void popup_check_cursor_pos(void);
+ /* vim: set ft=c : */
+*** ../vim-8.1.1452/src/testdir/test_popupwin.vim 2019-06-02 16:51:18.011257964 +0200
+--- src/testdir/test_popupwin.vim 2019-06-02 18:37:10.534590921 +0200
+***************
+*** 909,915 ****
+ %bwipe!
+ endfunc
+
+! function Test_adjust_left_past_screen_width()
+ " width of screen
+ let X = join(map(range(&columns), {->'X'}), '')
+
+--- 909,915 ----
+ %bwipe!
+ endfunc
+
+! func Test_adjust_left_past_screen_width()
+ " width of screen
+ let X = join(map(range(&columns), {->'X'}), '')
+
+***************
+*** 973,976 ****
+
+ popupclear
+ %bwipe!
+! endfunction
+--- 973,1037 ----
+
+ popupclear
+ %bwipe!
+! endfunc
+!
+! func Test_popup_moved()
+! new
+! call test_override('char_avail', 1)
+! call setline(1, ['one word to move around', 'a WORD.and->some thing'])
+!
+! exe "normal gg0/word\<CR>"
+! let winid = popup_atcursor('text', {'moved': 'any'})
+! redraw
+! call assert_equal(1, popup_getpos(winid).visible)
+! " trigger the check for last_cursormoved by going into insert mode
+! call feedkeys("li\<Esc>", 'xt')
+! call assert_equal({}, popup_getpos(winid))
+! popupclear
+!
+! exe "normal gg0/word\<CR>"
+! let winid = popup_atcursor('text', {'moved': 'word'})
+! redraw
+! call assert_equal(1, popup_getpos(winid).visible)
+! call feedkeys("hi\<Esc>", 'xt')
+! call assert_equal({}, popup_getpos(winid))
+! popupclear
+!
+! exe "normal gg0/word\<CR>"
+! let winid = popup_atcursor('text', {'moved': 'word'})
+! redraw
+! call assert_equal(1, popup_getpos(winid).visible)
+! call feedkeys("li\<Esc>", 'xt')
+! call assert_equal(1, popup_getpos(winid).visible)
+! call feedkeys("ei\<Esc>", 'xt')
+! call assert_equal(1, popup_getpos(winid).visible)
+! call feedkeys("eli\<Esc>", 'xt')
+! call assert_equal({}, popup_getpos(winid))
+! popupclear
+!
+! exe "normal gg0/WORD\<CR>"
+! let winid = popup_atcursor('text', {'moved': 'WORD'})
+! redraw
+! call assert_equal(1, popup_getpos(winid).visible)
+! call feedkeys("eli\<Esc>", 'xt')
+! call assert_equal(1, popup_getpos(winid).visible)
+! call feedkeys("wi\<Esc>", 'xt')
+! call assert_equal(1, popup_getpos(winid).visible)
+! call feedkeys("Eli\<Esc>", 'xt')
+! call assert_equal({}, popup_getpos(winid))
+! popupclear
+!
+! exe "normal gg0/word\<CR>"
+! let winid = popup_atcursor('text', {'moved': [5, 10]})
+! redraw
+! call assert_equal(1, popup_getpos(winid).visible)
+! call feedkeys("eli\<Esc>", 'xt')
+! call feedkeys("ei\<Esc>", 'xt')
+! call assert_equal(1, popup_getpos(winid).visible)
+! call feedkeys("eli\<Esc>", 'xt')
+! call assert_equal({}, popup_getpos(winid))
+! popupclear
+!
+! bwipe!
+! call test_override('ALL', 0)
+! endfunc
+*** ../vim-8.1.1452/runtime/doc/popup.txt 2019-06-02 14:49:52.368891150 +0200
+--- runtime/doc/popup.txt 2019-06-02 17:30:33.520955494 +0200
+***************
+*** 90,96 ****
+
+ IMPLEMENTATION:
+ - Code is in popupwin.c
+- - Fix positioning with border and padding.
+ - Why does 'nrformats' leak from the popup window buffer???
+ - Make redrawing more efficient and avoid flicker.
+ First draw popups, creating a mask, use the mask in screen_line() when
+--- 90,95 ----
+***************
+*** 410,422 ****
+ zindex Priority for the popup, default 50.
+ time Time in milliseconds after which the popup will close.
+ When omitted |popup_close()| must be used.
+! moved "cell": close the popup if the cursor moved at least
+! one screen cell.
+! "word" allows for moving the cursor within |<cword>|
+! "WORD" allows for moving the cursor within |<cWORD>|
+! a list with two numbers specifies the start and end
+! column outside of which the popup will close
+! {not implemented yet}
+ filter A callback that can filter typed characters, see
+ |popup-filter|.
+ callback A callback that is called when the popup closes, e.g.
+--- 409,422 ----
+ zindex Priority for the popup, default 50.
+ time Time in milliseconds after which the popup will close.
+ When omitted |popup_close()| must be used.
+! moved Specifies to close the popup if the cursor moved:
+! - "any": if the cursor moved at all
+! - "word": if the cursor moved outside |<cword>|
+! - "WORD": if the cursor moved outside |<cWORD>|
+! - [{start}, {end}]: if the cursor moved before column
+! {start} or after {end}
+! The popup also closes if the cursor moves to another
+! line or to another window.
+ filter A callback that can filter typed characters, see
+ |popup-filter|.
+ callback A callback that is called when the popup closes, e.g.
+***************
+*** 510,515 ****
+--- 510,518 ----
+ result, which could be an index in the popup lines, or whatever was passed as
+ the second argument of `popup_close()`.
+
++ If the popup is closed because the cursor moved, the number -1 is passed to
++ the callback.
++
+ ==============================================================================
+ 3. Examples *popup-examples*
+
+*** ../vim-8.1.1452/src/version.c 2019-06-02 16:51:18.011257964 +0200
+--- src/version.c 2019-06-02 18:37:36.630426619 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1453,
+ /**/
+
+--
+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.1454 b/data/vim/patches/8.1.1454
new file mode 100644
index 000000000..e87cfa778
--- /dev/null
+++ b/data/vim/patches/8.1.1454
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1454
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1454
+Problem: Build failure without the conceal feature.
+Solution: Remove #ifdef.
+Files: src/autocmd.c
+
+
+*** ../vim-8.1.1453/src/autocmd.c 2019-05-30 17:29:34.771666630 +0200
+--- src/autocmd.c 2019-06-02 19:01:51.458618012 +0200
+***************
+*** 1709,1715 ****
+ return (first_autopat[(int)EVENT_CURSORMOVED] != NULL);
+ }
+
+- #if defined(FEAT_CONCEAL) || defined(PROTO)
+ /*
+ * Return TRUE when there is a CursorMovedI autocommand defined.
+ */
+--- 1709,1714 ----
+***************
+*** 1718,1724 ****
+ {
+ return (first_autopat[(int)EVENT_CURSORMOVEDI] != NULL);
+ }
+- #endif
+
+ /*
+ * Return TRUE when there is a TextChanged autocommand defined.
+--- 1717,1722 ----
+*** ../vim-8.1.1453/src/version.c 2019-06-02 18:40:02.641508815 +0200
+--- src/version.c 2019-06-02 19:02:15.126481660 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1454,
+ /**/
+
+--
+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.1455 b/data/vim/patches/8.1.1455
new file mode 100644
index 000000000..06db6a060
--- /dev/null
+++ b/data/vim/patches/8.1.1455
@@ -0,0 +1,341 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1455
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1455
+Problem: Popup_atcursor() not completely implemented.
+Solution: Add the default for the "moved" property.
+Files: src/popupwin.c, src/normal.c, src/vim.h,
+ src/testdir/test_popupwin.vim
+
+
+*** ../vim-8.1.1454/src/popupwin.c 2019-06-02 18:40:02.637508840 +0200
+--- src/popupwin.c 2019-06-02 19:49:53.304066084 +0200
+***************
+*** 138,149 ****
+ }
+
+ /*
+ * Go through the options in "dict" and apply them to buffer "buf" displayed in
+ * popup window "wp".
+- * When called from f_popup_atcursor() "atcursor" is TRUE.
+ */
+ static void
+! apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict, int atcursor)
+ {
+ int nr;
+ char_u *str;
+--- 138,176 ----
+ }
+
+ /*
++ * Used when popup options contain "moved": set default moved values.
++ */
++ static void
++ set_moved_values(win_T *wp)
++ {
++ wp->w_popup_curwin = curwin;
++ wp->w_popup_lnum = curwin->w_cursor.lnum;
++ wp->w_popup_mincol = curwin->w_cursor.col;
++ wp->w_popup_maxcol = curwin->w_cursor.col;
++ }
++
++ /*
++ * Used when popup options contain "moved" with "word" or "WORD".
++ */
++ static void
++ set_moved_columns(win_T *wp, int flags)
++ {
++ char_u *ptr;
++ int len = find_ident_under_cursor(&ptr, flags | FIND_NOERROR);
++
++ if (len > 0)
++ {
++ wp->w_popup_mincol = (int)(ptr - ml_get_curline());
++ wp->w_popup_maxcol = wp->w_popup_mincol + len - 1;
++ }
++ }
++
++ /*
+ * Go through the options in "dict" and apply them to buffer "buf" displayed in
+ * popup window "wp".
+ */
+ static void
+! apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict)
+ {
+ int nr;
+ char_u *str;
+***************
+*** 155,173 ****
+ wp->w_maxwidth = dict_get_number(dict, (char_u *)"maxwidth");
+ wp->w_maxheight = dict_get_number(dict, (char_u *)"maxheight");
+
+- if (atcursor)
+- {
+- wp->w_popup_pos = POPPOS_BOTLEFT;
+- setcursor_mayforce(TRUE);
+- wp->w_wantline = screen_screenrow();
+- if (wp->w_wantline == 0) // cursor in first line
+- {
+- wp->w_wantline = 2;
+- wp->w_popup_pos = POPPOS_TOPLEFT;
+- }
+- wp->w_wantcol = screen_screencol() + 1;
+- }
+-
+ get_pos_options(wp, dict);
+
+ wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
+--- 182,187 ----
+***************
+*** 289,298 ****
+ di = dict_find(dict, (char_u *)"moved", -1);
+ if (di != NULL)
+ {
+! wp->w_popup_curwin = curwin;
+! wp->w_popup_lnum = curwin->w_cursor.lnum;
+! wp->w_popup_mincol = curwin->w_cursor.col;
+! wp->w_popup_maxcol = curwin->w_cursor.col;
+ if (di->di_tv.v_type == VAR_STRING && di->di_tv.vval.v_string != NULL)
+ {
+ char_u *s = di->di_tv.vval.v_string;
+--- 303,309 ----
+ di = dict_find(dict, (char_u *)"moved", -1);
+ if (di != NULL)
+ {
+! set_moved_values(wp);
+ if (di->di_tv.v_type == VAR_STRING && di->di_tv.vval.v_string != NULL)
+ {
+ char_u *s = di->di_tv.vval.v_string;
+***************
+*** 305,320 ****
+ else if (STRCMP(s, "any") != 0)
+ semsg(_(e_invarg2), s);
+ if (flags != 0)
+! {
+! char_u *ptr;
+! int len = find_ident_under_cursor(&ptr, flags);
+!
+! if (len > 0)
+! {
+! wp->w_popup_mincol = (int)(ptr - ml_get_curline());
+! wp->w_popup_maxcol = wp->w_popup_mincol + len - 1;
+! }
+! }
+ }
+ else if (di->di_tv.v_type == VAR_LIST
+ && di->di_tv.vval.v_list != NULL
+--- 316,322 ----
+ else if (STRCMP(s, "any") != 0)
+ semsg(_(e_invarg2), s);
+ if (flags != 0)
+! set_moved_columns(wp, flags);
+ }
+ else if (di->di_tv.v_type == VAR_LIST
+ && di->di_tv.vval.v_list != NULL
+***************
+*** 554,566 ****
+ wp->w_popup_last_changedtick = CHANGEDTICK(wp->w_buffer);
+ }
+
+ /*
+ * popup_create({text}, {options})
+ * popup_atcursor({text}, {options})
+ * When called from f_popup_atcursor() "atcursor" is TRUE.
+ */
+ static void
+! popup_create(typval_T *argvars, typval_T *rettv, int atcursor)
+ {
+ win_T *wp;
+ buf_T *buf;
+--- 556,574 ----
+ wp->w_popup_last_changedtick = CHANGEDTICK(wp->w_buffer);
+ }
+
++ typedef enum
++ {
++ TYPE_NORMAL,
++ TYPE_ATCURSOR
++ } create_type_T;
++
+ /*
+ * popup_create({text}, {options})
+ * popup_atcursor({text}, {options})
+ * When called from f_popup_atcursor() "atcursor" is TRUE.
+ */
+ static void
+! popup_create(typval_T *argvars, typval_T *rettv, create_type_T type)
+ {
+ win_T *wp;
+ buf_T *buf;
+***************
+*** 652,659 ****
+ ml_delete(buf->b_ml.ml_line_count, FALSE);
+ curbuf = curwin->w_buffer;
+
+ // Deal with options.
+! apply_options(wp, buf, argvars[1].vval.v_dict, atcursor);
+
+ // set default values
+ if (wp->w_zindex == 0)
+--- 660,682 ----
+ ml_delete(buf->b_ml.ml_line_count, FALSE);
+ curbuf = curwin->w_buffer;
+
++ if (type == TYPE_ATCURSOR)
++ {
++ wp->w_popup_pos = POPPOS_BOTLEFT;
++ setcursor_mayforce(TRUE);
++ wp->w_wantline = screen_screenrow();
++ if (wp->w_wantline == 0) // cursor in first line
++ {
++ wp->w_wantline = 2;
++ wp->w_popup_pos = POPPOS_TOPLEFT;
++ }
++ wp->w_wantcol = screen_screencol() + 1;
++ set_moved_values(wp);
++ set_moved_columns(wp, FIND_STRING);
++ }
++
+ // Deal with options.
+! apply_options(wp, buf, argvars[1].vval.v_dict);
+
+ // set default values
+ if (wp->w_zindex == 0)
+***************
+*** 672,678 ****
+ void
+ f_popup_create(typval_T *argvars, typval_T *rettv)
+ {
+! popup_create(argvars, rettv, FALSE);
+ }
+
+ /*
+--- 695,701 ----
+ void
+ f_popup_create(typval_T *argvars, typval_T *rettv)
+ {
+! popup_create(argvars, rettv, TYPE_NORMAL);
+ }
+
+ /*
+***************
+*** 681,687 ****
+ void
+ f_popup_atcursor(typval_T *argvars, typval_T *rettv)
+ {
+! popup_create(argvars, rettv, TRUE);
+ }
+
+ /*
+--- 704,710 ----
+ void
+ f_popup_atcursor(typval_T *argvars, typval_T *rettv)
+ {
+! popup_create(argvars, rettv, TYPE_ATCURSOR);
+ }
+
+ /*
+*** ../vim-8.1.1454/src/normal.c 2019-05-28 23:08:12.068648696 +0200
+--- src/normal.c 2019-06-02 19:42:59.866656946 +0200
+***************
+*** 3461,3473 ****
+ if (ptr[col] == NUL || (i == 0
+ && (has_mbyte ? this_class != 2 : !vim_iswordc(ptr[col]))))
+ {
+! /*
+! * didn't find an identifier or string
+! */
+! if (find_type & FIND_STRING)
+! emsg(_("E348: No string under cursor"));
+! else
+! emsg(_(e_noident));
+ return 0;
+ }
+ ptr += col;
+--- 3461,3474 ----
+ if (ptr[col] == NUL || (i == 0
+ && (has_mbyte ? this_class != 2 : !vim_iswordc(ptr[col]))))
+ {
+! // didn't find an identifier or string
+! if ((find_type & FIND_NOERROR) == 0)
+! {
+! if (find_type & FIND_STRING)
+! emsg(_("E348: No string under cursor"));
+! else
+! emsg(_(e_noident));
+! }
+ return 0;
+ }
+ ptr += col;
+*** ../vim-8.1.1454/src/vim.h 2019-06-01 17:13:15.884517713 +0200
+--- src/vim.h 2019-06-02 19:43:48.170353186 +0200
+***************
+*** 879,888 ****
+ #define SEARCH_PEEK 0x800 /* peek for typed char, cancel search */
+ #define SEARCH_COL 0x1000 /* start at specified column instead of zero */
+
+! /* Values for find_ident_under_cursor() */
+! #define FIND_IDENT 1 /* find identifier (word) */
+! #define FIND_STRING 2 /* find any string (WORD) */
+! #define FIND_EVAL 4 /* include "->", "[]" and "." */
+
+ /* Values for file_name_in_line() */
+ #define FNAME_MESS 1 /* give error message */
+--- 879,889 ----
+ #define SEARCH_PEEK 0x800 /* peek for typed char, cancel search */
+ #define SEARCH_COL 0x1000 /* start at specified column instead of zero */
+
+! // Values for find_ident_under_cursor()
+! #define FIND_IDENT 1 // find identifier (word)
+! #define FIND_STRING 2 // find any string (WORD)
+! #define FIND_EVAL 4 // include "->", "[]" and "."
+! #define FIND_NOERROR 8 // no error when no word found
+
+ /* Values for file_name_in_line() */
+ #define FNAME_MESS 1 /* give error message */
+*** ../vim-8.1.1454/src/testdir/test_popupwin.vim 2019-06-02 18:40:02.641508815 +0200
+--- src/testdir/test_popupwin.vim 2019-06-02 19:51:53.963344600 +0200
+***************
+*** 1009,1016 ****
+ call assert_equal({}, popup_getpos(winid))
+ popupclear
+
+ exe "normal gg0/WORD\<CR>"
+! let winid = popup_atcursor('text', {'moved': 'WORD'})
+ redraw
+ call assert_equal(1, popup_getpos(winid).visible)
+ call feedkeys("eli\<Esc>", 'xt')
+--- 1009,1017 ----
+ call assert_equal({}, popup_getpos(winid))
+ popupclear
+
++ " WORD is the default
+ exe "normal gg0/WORD\<CR>"
+! let winid = popup_atcursor('text', {})
+ redraw
+ call assert_equal(1, popup_getpos(winid).visible)
+ call feedkeys("eli\<Esc>", 'xt')
+*** ../vim-8.1.1454/src/version.c 2019-06-02 19:02:24.478427721 +0200
+--- src/version.c 2019-06-02 19:28:23.096298172 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1455,
+ /**/
+
+--
+From "know your smileys":
+ :~) A man with a tape recorder up his nose
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1456 b/data/vim/patches/8.1.1456
new file mode 100644
index 000000000..b0e18fe07
--- /dev/null
+++ b/data/vim/patches/8.1.1456
@@ -0,0 +1,73 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1456
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1456
+Problem: WinBar not redrawn after scrolling one line.
+Solution: Exclude the winbar height when deciding what to redraw.
+ (closes #4473)
+Files: src/screen.c, src/testdir/test_winbar.vim
+
+
+*** ../vim-8.1.1455/src/screen.c 2019-06-02 18:40:02.637508840 +0200
+--- src/screen.c 2019-06-02 20:32:45.787110205 +0200
+***************
+*** 645,651 ****
+ type = CLEAR;
+ FOR_ALL_WINDOWS(wp)
+ {
+! if (W_WINROW(wp) < msg_scrolled)
+ {
+ if (W_WINROW(wp) + wp->w_height > msg_scrolled
+ && wp->w_redr_type < REDRAW_TOP
+--- 645,651 ----
+ type = CLEAR;
+ FOR_ALL_WINDOWS(wp)
+ {
+! if (wp->w_winrow < msg_scrolled)
+ {
+ if (W_WINROW(wp) + wp->w_height > msg_scrolled
+ && wp->w_redr_type < REDRAW_TOP
+*** ../vim-8.1.1455/src/testdir/test_winbar.vim 2019-05-05 13:14:24.815627694 +0200
+--- src/testdir/test_winbar.vim 2019-06-02 20:32:22.419297877 +0200
+***************
+*** 110,112 ****
+--- 110,124 ----
+
+ bwipe!
+ endfunc
++
++ func Test_redraw_after_scroll()
++ new
++ amenu 1.10 WinBar.Next :let g:did_next = 11<CR>
++ redraw
++ call assert_equal(" Next", Screenline(1))
++ echo "some\nmore"
++ redraw
++ call assert_equal(" Next", Screenline(1))
++ bwipe!
++ endfunc
++
+*** ../vim-8.1.1455/src/version.c 2019-06-02 19:53:40.998714309 +0200
+--- src/version.c 2019-06-02 20:29:53.884526016 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1456,
+ /**/
+
+--
+From "know your smileys":
+ :-H Is missing teeth
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1457 b/data/vim/patches/8.1.1457
new file mode 100644
index 000000000..e877992d5
--- /dev/null
+++ b/data/vim/patches/8.1.1457
@@ -0,0 +1,211 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1457
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1457
+Problem: Cannot reuse a buffer when loading a screen dump.
+Solution: Add the "bufnr" option.
+Files: runtime/doc/eval.txt, src/structs.h, src/channel.c,
+ src/terminal.c, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1456/runtime/doc/eval.txt 2019-05-30 18:40:20.120405138 +0200
+--- runtime/doc/eval.txt 2019-06-03 20:02:23.894159435 +0200
+***************
+*** 9557,9562 ****
+--- 9558,9568 ----
+ "curwin" use the current window, do not split the
+ window; fails if the current buffer
+ cannot be |abandon|ed
++ "bufnr" do not create a new buffer, use the
++ existing buffer "bufnr". This buffer
++ must have been previously created with
++ term_dumpdiff() or term_dumpload() and
++ visible in a window.
+ "norestore" do not add the terminal window to a
+ session file
+
+*** ../vim-8.1.1456/src/structs.h 2019-06-02 18:40:02.637508840 +0200
+--- src/structs.h 2019-06-03 20:17:25.897778944 +0200
+***************
+*** 1807,1812 ****
+--- 1807,1813 ----
+ #define JO2_TERM_KILL 0x4000 /* "term_kill" */
+ #define JO2_ANSI_COLORS 0x8000 /* "ansi_colors" */
+ #define JO2_TTY_TYPE 0x10000 /* "tty_type" */
++ #define JO2_BUFNR 0x20000 /* "bufnr" */
+
+ #define JO_MODE_ALL (JO_MODE + JO_IN_MODE + JO_OUT_MODE + JO_ERR_MODE)
+ #define JO_CB_ALL \
+***************
+*** 1864,1869 ****
+--- 1865,1871 ----
+ int jo_term_cols;
+ int jo_vertical;
+ int jo_curwin;
++ buf_T *jo_bufnr_buf;
+ int jo_hidden;
+ int jo_term_norestore;
+ char_u *jo_term_name;
+*** ../vim-8.1.1456/src/channel.c 2019-06-01 13:28:30.269829512 +0200
+--- src/channel.c 2019-06-03 20:26:34.991095446 +0200
+***************
+*** 4901,4906 ****
+--- 4901,4932 ----
+ opt->jo_set2 |= JO2_CURWIN;
+ opt->jo_curwin = tv_get_number(item);
+ }
++ else if (STRCMP(hi->hi_key, "bufnr") == 0)
++ {
++ int nr;
++
++ if (!(supported2 & JO2_CURWIN))
++ break;
++ opt->jo_set2 |= JO2_BUFNR;
++ nr = tv_get_number(item);
++ if (nr <= 0)
++ {
++ semsg(_(e_invargNval), hi->hi_key, tv_get_string(item));
++ return FAIL;
++ }
++ opt->jo_bufnr_buf = buflist_findnr(nr);
++ if (opt->jo_bufnr_buf == NULL)
++ {
++ semsg(_(e_nobufnr), (long)nr);
++ return FAIL;
++ }
++ if (opt->jo_bufnr_buf->b_nwindows == 0
++ || opt->jo_bufnr_buf->b_term == NULL)
++ {
++ semsg(_(e_invarg2), "bufnr");
++ return FAIL;
++ }
++ }
+ else if (STRCMP(hi->hi_key, "hidden") == 0)
+ {
+ if (!(supported2 & JO2_HIDDEN))
+*** ../vim-8.1.1456/src/terminal.c 2019-05-28 23:08:12.080648632 +0200
+--- src/terminal.c 2019-06-03 20:37:45.571814232 +0200
+***************
+*** 4616,4622 ****
+ term_load_dump(typval_T *argvars, typval_T *rettv, int do_diff)
+ {
+ jobopt_T opt;
+! buf_T *buf;
+ char_u buf1[NUMBUFLEN];
+ char_u buf2[NUMBUFLEN];
+ char_u *fname1;
+--- 4616,4622 ----
+ term_load_dump(typval_T *argvars, typval_T *rettv, int do_diff)
+ {
+ jobopt_T opt;
+! buf_T *buf = NULL;
+ char_u buf1[NUMBUFLEN];
+ char_u buf2[NUMBUFLEN];
+ char_u *fname1;
+***************
+*** 4671,4677 ****
+ }
+ }
+
+! buf = term_start(&argvars[0], NULL, &opt, TERM_START_NOJOB);
+ if (buf != NULL && buf->b_term != NULL)
+ {
+ int i;
+--- 4671,4697 ----
+ }
+ }
+
+! if (opt.jo_bufnr_buf != NULL)
+! {
+! win_T *wp = buf_jump_open_win(opt.jo_bufnr_buf);
+!
+! // With "bufnr" argument: enter the window with this buffer and make it
+! // empty.
+! if (wp == NULL)
+! semsg(_(e_invarg2), "bufnr");
+! else
+! {
+! buf = curbuf;
+! while (!(curbuf->b_ml.ml_flags & ML_EMPTY))
+! ml_delete((linenr_T)1, FALSE);
+! ga_clear(&curbuf->b_term->tl_scrollback);
+! redraw_later(NOT_VALID);
+! }
+! }
+! else
+! // Create a new terminal window.
+! buf = term_start(&argvars[0], NULL, &opt, TERM_START_NOJOB);
+!
+ if (buf != NULL && buf->b_term != NULL)
+ {
+ int i;
+*** ../vim-8.1.1456/src/testdir/test_terminal.vim 2019-05-20 22:12:30.724442773 +0200
+--- src/testdir/test_terminal.vim 2019-06-03 21:12:05.602119720 +0200
+***************
+*** 1119,1129 ****
+
+ " just testing basic functionality.
+ func Test_terminal_dumpload()
+ call assert_equal(1, winnr('$'))
+! call term_dumpload('dumps/Test_popup_command_01.dump')
+ call assert_equal(2, winnr('$'))
+ call assert_equal(20, line('$'))
+ call Check_dump01(0)
+ quit
+ endfunc
+
+--- 1119,1148 ----
+
+ " just testing basic functionality.
+ func Test_terminal_dumpload()
++ let curbuf = winbufnr('')
+ call assert_equal(1, winnr('$'))
+! let buf = term_dumpload('dumps/Test_popup_command_01.dump')
+ call assert_equal(2, winnr('$'))
+ call assert_equal(20, line('$'))
+ call Check_dump01(0)
++
++ " Load another dump in the same window
++ let buf2 = term_dumpload('dumps/Test_diff_01.dump', {'bufnr': buf})
++ call assert_equal(buf, buf2)
++ call assert_notequal('one two three four five', trim(getline(1)))
++
++ " Load the first dump again in the same window
++ let buf2 = term_dumpload('dumps/Test_popup_command_01.dump', {'bufnr': buf})
++ call assert_equal(buf, buf2)
++ call Check_dump01(0)
++
++ call assert_fails("call term_dumpload('dumps/Test_popup_command_01.dump', {'bufnr': curbuf})", 'E475:')
++ call assert_fails("call term_dumpload('dumps/Test_popup_command_01.dump', {'bufnr': 9999})", 'E86:')
++ new
++ let closedbuf = winbufnr('')
++ quit
++ call assert_fails("call term_dumpload('dumps/Test_popup_command_01.dump', {'bufnr': closedbuf})", 'E475:')
++
+ quit
+ endfunc
+
+*** ../vim-8.1.1456/src/version.c 2019-06-02 20:33:27.018782294 +0200
+--- src/version.c 2019-06-03 21:12:57.825786687 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1457,
+ /**/
+
+--
+From "know your smileys":
+ O:-) Saint
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1458 b/data/vim/patches/8.1.1458
new file mode 100644
index 000000000..090d7e7ac
--- /dev/null
+++ b/data/vim/patches/8.1.1458
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1458
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1458
+Problem: Crash when using gtags. (issue #4102)
+Solution: Check for negative row or col in screen_puts_len(). (Christian
+ Brabandt)
+Files: src/screen.c
+
+
+*** ../vim-8.1.1457/src/screen.c 2019-06-02 20:33:27.018782294 +0200
+--- src/screen.c 2019-06-03 22:01:02.461393381 +0200
+***************
+*** 7707,7713 ****
+ int force_redraw_next = FALSE;
+ int need_redraw;
+
+! if (ScreenLines == NULL || row >= screen_Rows) /* safety check */
+ return;
+ off = LineOffset[row] + col;
+
+--- 7707,7717 ----
+ int force_redraw_next = FALSE;
+ int need_redraw;
+
+! // Safety check. The check for negative row and column is to fix issue
+! // #4102. TODO: find out why row/col could be negative.
+! if (ScreenLines == NULL
+! || row >= screen_Rows || row < 0
+! || col >= screen_Columns || col < 0)
+ return;
+ off = LineOffset[row] + col;
+
+*** ../vim-8.1.1457/src/version.c 2019-06-03 21:14:55.129048884 +0200
+--- src/version.c 2019-06-03 22:03:37.712481097 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1458,
+ /**/
+
+--
+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.1459 b/data/vim/patches/8.1.1459
new file mode 100644
index 000000000..0ef2abbf5
--- /dev/null
+++ b/data/vim/patches/8.1.1459
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1459
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1459
+Problem: Popup window border looks bad when 'ambiwidth' is "double".
+ (Yasuhiro Matsumoto)
+Solution: Only use line drawing characters when 'ambiwidth' is "single".
+ (Ken Takata, closes #4477)
+Files: src/screen.c
+
+
+*** ../vim-8.1.1458/src/screen.c 2019-06-03 22:04:17.840244968 +0200
+--- src/screen.c 2019-06-03 22:11:26.973743554 +0200
+***************
+*** 1078,1084 ****
+ + wp->w_height + wp->w_popup_padding[2] + wp->w_popup_border[2];
+ popup_attr = get_wcr_attr(wp);
+
+! if (enc_utf8)
+ {
+ border_char[0] = border_char[2] = 0x2550;
+ border_char[1] = border_char[3] = 0x2551;
+--- 1078,1086 ----
+ + wp->w_height + wp->w_popup_padding[2] + wp->w_popup_border[2];
+ popup_attr = get_wcr_attr(wp);
+
+! // We can only use these line drawing characters when 'encoding' is
+! // "utf-8" and 'ambiwidth' is "single".
+! if (enc_utf8 && p_ambw == 's')
+ {
+ border_char[0] = border_char[2] = 0x2550;
+ border_char[1] = border_char[3] = 0x2551;
+*** ../vim-8.1.1458/src/version.c 2019-06-03 22:04:17.840244968 +0200
+--- src/version.c 2019-06-03 22:13:41.852963537 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1459,
+ /**/
+
+--
+From "know your smileys":
+ |-P Reaction to unusually ugly C code
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1460 b/data/vim/patches/8.1.1460
new file mode 100644
index 000000000..f7d99c4ad
--- /dev/null
+++ b/data/vim/patches/8.1.1460
@@ -0,0 +1,85 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1460
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1460
+Problem: Popup window border characters may be wrong.
+Solution: Reset the border characters for each popup. Correct use of
+ 'ambiwidth'.
+Files: src/screen.c
+
+
+*** ../vim-8.1.1459/src/screen.c 2019-06-03 22:21:23.630304492 +0200
+--- src/screen.c 2019-06-03 22:50:48.970711776 +0200
+***************
+*** 1041,1047 ****
+ int total_height;
+ int popup_attr;
+ int border_attr[4];
+! int border_char[8] = {'-', '|', '-', '|', '+', '+', '+', '+', };
+ char_u buf[MB_MAXBYTES];
+ int row;
+ int i;
+--- 1041,1047 ----
+ int total_height;
+ int popup_attr;
+ int border_attr[4];
+! int border_char[8];
+ char_u buf[MB_MAXBYTES];
+ int row;
+ int i;
+***************
+*** 1080,1086 ****
+
+ // We can only use these line drawing characters when 'encoding' is
+ // "utf-8" and 'ambiwidth' is "single".
+! if (enc_utf8 && p_ambw == 's')
+ {
+ border_char[0] = border_char[2] = 0x2550;
+ border_char[1] = border_char[3] = 0x2551;
+--- 1080,1086 ----
+
+ // We can only use these line drawing characters when 'encoding' is
+ // "utf-8" and 'ambiwidth' is "single".
+! if (enc_utf8 && *p_ambw == 's')
+ {
+ border_char[0] = border_char[2] = 0x2550;
+ border_char[1] = border_char[3] = 0x2551;
+***************
+*** 1089,1094 ****
+--- 1089,1101 ----
+ border_char[6] = 0x255d;
+ border_char[7] = 0x255a;
+ }
++ else
++ {
++ border_char[0] = border_char[2] = '-';
++ border_char[1] = border_char[3] = '|';
++ for (i = 4; i < 8; ++i)
++ border_char[i] = '+';
++ }
+ for (i = 0; i < 8; ++i)
+ if (wp->w_border_char[i] != 0)
+ border_char[i] = wp->w_border_char[i];
+*** ../vim-8.1.1459/src/version.c 2019-06-03 22:21:23.630304492 +0200
+--- src/version.c 2019-06-03 22:53:10.653795386 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1460,
+ /**/
+
+--
+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.1461 b/data/vim/patches/8.1.1461
new file mode 100644
index 000000000..34cbe310c
--- /dev/null
+++ b/data/vim/patches/8.1.1461
@@ -0,0 +1,139 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1461
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1461
+Problem: Tests do not run or are not reliable on some systems.
+Solution: Use "findstr" instead of "grep" on MS-Windows. Clear
+ PROMPT_COMMAND in the terminal test. Delete temp file. Wait for
+ output after executing a debug command. (Yegappan Lakshmanan,
+ closes #4479)
+Files: src/testdir/test_debugger.vim, src/testdir/test_environ.vim,
+ src/testdir/test_filetype.vim, src/testdir/test_source.vim,
+ src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.1460/src/testdir/test_debugger.vim 2019-04-20 22:28:38.961420148 +0200
+--- src/testdir/test_debugger.vim 2019-06-03 22:39:43.551377080 +0200
+***************
+*** 52,67 ****
+ let buf = RunVimInTerminal('-S Xtest.vim', {})
+
+ " Start the Vim debugger
+! call RunDbgCmd(buf, ':debug echo Foo()')
+
+ " Create a few stack frames by stepping through functions
+! call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'step')
+! call RunDbgCmd(buf, 'step')
+
+ " check backtrace
+ call RunDbgCmd(buf, 'backtrace', [
+--- 52,67 ----
+ let buf = RunVimInTerminal('-S Xtest.vim', {})
+
+ " Start the Vim debugger
+! call RunDbgCmd(buf, ':debug echo Foo()', ['cmd: echo Foo()'])
+
+ " Create a few stack frames by stepping through functions
+! call RunDbgCmd(buf, 'step', ['line 1: let var1 = 1'])
+! call RunDbgCmd(buf, 'step', ['line 2: let var2 = Bar(var1) + 9'])
+! call RunDbgCmd(buf, 'step', ['line 1: let var1 = 2 + a:var'])
+! call RunDbgCmd(buf, 'step', ['line 2: let var2 = Bazz(var1) + 4'])
+! call RunDbgCmd(buf, 'step', ['line 1: try'])
+! call RunDbgCmd(buf, 'step', ['line 2: let var1 = 3 + a:var'])
+! call RunDbgCmd(buf, 'step', ['line 3: let var3 = "another var"'])
+
+ " check backtrace
+ call RunDbgCmd(buf, 'backtrace', [
+*** ../vim-8.1.1460/src/testdir/test_environ.vim 2019-05-09 14:52:22.083358820 +0200
+--- src/testdir/test_environ.vim 2019-06-03 22:39:43.551377080 +0200
+***************
+*** 36,42 ****
+
+ call setenv('FOO', v:null)
+ if has('win32')
+! let result = system('set | grep ^FOO=')
+ else
+ let result = system('env | grep ^FOO=')
+ endif
+--- 36,42 ----
+
+ call setenv('FOO', v:null)
+ if has('win32')
+! let result = system('set | findstr ^FOO=')
+ else
+ let result = system('env | grep ^FOO=')
+ endif
+*** ../vim-8.1.1460/src/testdir/test_filetype.vim 2019-05-06 21:46:05.062544448 +0200
+--- src/testdir/test_filetype.vim 2019-06-03 22:39:43.551377080 +0200
+***************
+*** 520,526 ****
+ catch
+ call assert_report('cannot edit "' . names[i] . '": ' . v:errmsg)
+ endtry
+! call assert_equal(ft, &filetype, 'with file name: ' . names[i])
+ bwipe!
+ endfor
+ endfor
+--- 520,530 ----
+ catch
+ call assert_report('cannot edit "' . names[i] . '": ' . v:errmsg)
+ endtry
+! if &filetype == '' && &readonly
+! " File exists but not able to edit it (permission denied)
+! else
+! call assert_equal(ft, &filetype, 'with file name: ' . names[i])
+! endif
+ bwipe!
+ endfor
+ endfor
+*** ../vim-8.1.1460/src/testdir/test_source.vim 2019-05-22 22:38:21.660405578 +0200
+--- src/testdir/test_source.vim 2019-06-03 22:39:43.551377080 +0200
+***************
+*** 44,47 ****
+--- 44,48 ----
+ call assert_equal('hello', getline(1))
+ call assert_fails('sandbox source! Xsourcehello', 'E48:')
+ bwipe!
++ call delete('Xsourcehello')
+ endfunc
+*** ../vim-8.1.1460/src/testdir/test_terminal.vim 2019-06-03 21:14:55.129048884 +0200
+--- src/testdir/test_terminal.vim 2019-06-03 22:39:43.551377080 +0200
+***************
+*** 8,13 ****
+--- 8,14 ----
+ source screendump.vim
+
+ let s:python = PythonProg()
++ let $PROMPT_COMMAND=''
+
+ " Open a terminal with a shell, assign the job to g:job and return the buffer
+ " number.
+*** ../vim-8.1.1460/src/version.c 2019-06-03 22:53:27.457687696 +0200
+--- src/version.c 2019-06-03 22:54:33.433266568 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1461,
+ /**/
+
+--
+From "know your smileys":
+ :q vi user saying, "How do I get out of this damn emacs editor?"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1462 b/data/vim/patches/8.1.1462
new file mode 100644
index 000000000..0033874b1
--- /dev/null
+++ b/data/vim/patches/8.1.1462
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1462
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1462
+Problem: MS-Windows: using special character requires quoting.
+Solution: Add quotes. (Ken Takata)
+Files: src/testdir/test_environ.vim
+
+
+*** ../vim-8.1.1461/src/testdir/test_environ.vim 2019-06-03 23:07:21.828486877 +0200
+--- src/testdir/test_environ.vim 2019-06-04 08:20:14.610520844 +0200
+***************
+*** 36,42 ****
+
+ call setenv('FOO', v:null)
+ if has('win32')
+! let result = system('set | findstr ^FOO=')
+ else
+ let result = system('env | grep ^FOO=')
+ endif
+--- 36,42 ----
+
+ call setenv('FOO', v:null)
+ if has('win32')
+! let result = system('set | findstr "^FOO="')
+ else
+ let result = system('env | grep ^FOO=')
+ endif
+*** ../vim-8.1.1461/src/version.c 2019-06-03 23:07:21.828486877 +0200
+--- src/version.c 2019-06-04 08:21:30.106141257 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1462,
+ /**/
+
+--
+You can't have everything. Where would you put it?
+ -- 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.1463 b/data/vim/patches/8.1.1463
new file mode 100644
index 000000000..c28cc32b8
--- /dev/null
+++ b/data/vim/patches/8.1.1463
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1463
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1463
+Problem: Gcc warns for uninitialized variable.
+Solution: Put usage inside "if". (Ken Takata)
+Files: src/textprop.c
+
+
+*** ../vim-8.1.1462/src/textprop.c 2019-05-28 23:08:12.080648632 +0200
+--- src/textprop.c 2019-06-04 19:14:23.975238456 +0200
+***************
+*** 1240,1248 ****
+ if (line == NULL)
+ return;
+ mch_memmove(line, newp, len);
+! l = oldproplen * sizeof(textprop_T);
+! mch_memmove(line + len, props, l);
+! len += l;
+
+ for (i = 0; i < count - 1; ++i)
+ if (prop_lines[i] != NULL)
+--- 1240,1251 ----
+ if (line == NULL)
+ return;
+ mch_memmove(line, newp, len);
+! if (oldproplen > 0)
+! {
+! l = oldproplen * sizeof(textprop_T);
+! mch_memmove(line + len, props, l);
+! len += l;
+! }
+
+ for (i = 0; i < count - 1; ++i)
+ if (prop_lines[i] != NULL)
+*** ../vim-8.1.1462/src/version.c 2019-06-04 08:22:49.889739641 +0200
+--- src/version.c 2019-06-04 19:15:36.994561276 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1463,
+ /**/
+
+--
+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.1464 b/data/vim/patches/8.1.1464
new file mode 100644
index 000000000..deaed15fa
--- /dev/null
+++ b/data/vim/patches/8.1.1464
@@ -0,0 +1,81 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1464
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1464
+Problem: Only 4-digit rgb termresponse is recognized.
+Solution: Also recognize 2-digit rgb response. (closes #4486)
+Files: src/term.c, src/test_termcodes.vim
+
+
+*** ../vim-8.1.1463/src/term.c 2019-05-28 23:08:12.080648632 +0200
+--- src/term.c 2019-06-04 21:23:11.508570961 +0200
+***************
+*** 4962,4967 ****
+--- 4962,4968 ----
+ /* Check for fore/background color response from the terminal:
+ *
+ * {lead}{code};rgb:{rrrr}/{gggg}/{bbbb}{tail}
++ * or {lead}{code};rgb:{rr}/{gg}/{bb}{tail}
+ *
+ * {code} is 10 for foreground, 11 for background
+ * {lead} can be <Esc>] or OSC
+***************
+*** 4985,4998 ****
+ : (tp[i] == ESC && i + 1 < len && tp[i + 1] == '\\')))
+ {
+ int is_bg = argp[1] == '1';
+
+! if (i - j >= 21 && STRNCMP(tp + j + 3, "rgb:", 4) == 0
+! && tp[j + 11] == '/' && tp[j + 16] == '/')
+ {
+ # ifdef FEAT_TERMINAL
+! int rval = hexhex2nr(tp + j + 7);
+! int gval = hexhex2nr(tp + j + 12);
+! int bval = hexhex2nr(tp + j + 17);
+ # endif
+ if (is_bg)
+ {
+--- 4986,5004 ----
+ : (tp[i] == ESC && i + 1 < len && tp[i + 1] == '\\')))
+ {
+ int is_bg = argp[1] == '1';
++ int is_4digit = i - j >= 21 && tp[j + 11] == '/'
++ && tp[j + 16] == '/';
+
+! if (i - j >= 14 && STRNCMP(tp + j + 3, "rgb:", 4) == 0
+! && (is_4digit
+! || (tp[j + 9] == '/' && tp[i + 12 == '/'])))
+ {
+ # ifdef FEAT_TERMINAL
+! int rval, gval, bval;
+!
+! rval = hexhex2nr(tp + j + 7);
+! gval = hexhex2nr(tp + j + (is_4digit ? 12 : 10));
+! bval = hexhex2nr(tp + j + (is_4digit ? 17 : 13));
+ # endif
+ if (is_bg)
+ {
+*** ../vim-8.1.1463/src/version.c 2019-06-04 19:16:25.518124894 +0200
+--- src/version.c 2019-06-04 21:39:56.729716125 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1464,
+ /**/
+
+--
+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.1465 b/data/vim/patches/8.1.1465
new file mode 100644
index 000000000..69f25dc03
--- /dev/null
+++ b/data/vim/patches/8.1.1465
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1465
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1465
+Problem: Allocating wrong amount of memory. (Yegappan Lakshmanan)
+Solution: Use sizeof() for right type of struct.
+Files: src/memfile_test.c
+
+
+*** ../vim-8.1.1464/src/memfile_test.c 2019-05-28 23:08:12.068648696 +0200
+--- src/memfile_test.c 2019-06-04 22:25:02.116924696 +0200
+***************
+*** 67,73 ****
+ assert(mf_hash_find(&ht, key) == NULL);
+
+ /* allocate and add new item */
+! item = LALLOC_CLEAR_ONE(mf_hashtab_T);
+ assert(item != NULL);
+ item->mhi_key = key;
+ mf_hash_add_item(&ht, item);
+--- 67,73 ----
+ assert(mf_hash_find(&ht, key) == NULL);
+
+ /* allocate and add new item */
+! item = LALLOC_CLEAR_ONE(mf_hashitem_T);
+ assert(item != NULL);
+ item->mhi_key = key;
+ mf_hash_add_item(&ht, item);
+*** ../vim-8.1.1464/src/version.c 2019-06-04 21:41:24.465087519 +0200
+--- src/version.c 2019-06-04 22:25:58.068551965 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1465,
+ /**/
+
+--
+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.1466 b/data/vim/patches/8.1.1466
new file mode 100644
index 000000000..e16db2178
--- /dev/null
+++ b/data/vim/patches/8.1.1466
@@ -0,0 +1,136 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1466
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1466
+Problem: Not updating priority on existing sign.
+Solution: Set the sign priority. Add a test. (Yegappan Lakshmanan)
+Files: src/sign.c, src/testdir/test_signs.vim, runtime/doc/eval.txt,
+ runtime/doc/sign.txt
+
+
+*** ../vim-8.1.1465/src/sign.c 2019-05-28 23:08:12.076648654 +0200
+--- src/sign.c 2019-06-04 22:37:30.812905921 +0200
+***************
+*** 330,335 ****
+--- 330,336 ----
+ {
+ // Update an existing sign
+ sign->typenr = typenr;
++ sign->priority = prio;
+ return;
+ }
+ else if (lnum < sign->lnum)
+*** ../vim-8.1.1465/src/testdir/test_signs.vim 2019-02-17 14:50:22.434125846 +0100
+--- src/testdir/test_signs.vim 2019-06-04 22:36:56.981068388 +0200
+***************
+*** 1183,1188 ****
+--- 1183,1206 ----
+ \ 'priority' : 10}],
+ \ s[0].signs)
+
++ " Place multiple signs with same id on a line with different priority
++ call sign_place(1, '', 'sign1', 'Xsign',
++ \ {'lnum' : 5, 'priority' : 20})
++ call sign_place(1, '', 'sign2', 'Xsign',
++ \ {'lnum' : 5, 'priority' : 10})
++ let s = sign_getplaced('Xsign', {'lnum' : 5})
++ call assert_equal([
++ \ {'id' : 1, 'name' : 'sign2', 'lnum' : 5, 'group' : '',
++ \ 'priority' : 10}],
++ \ s[0].signs)
++ call sign_place(1, '', 'sign2', 'Xsign',
++ \ {'lnum' : 5, 'priority' : 5})
++ let s = sign_getplaced('Xsign', {'lnum' : 5})
++ call assert_equal([
++ \ {'id' : 1, 'name' : 'sign2', 'lnum' : 5, 'group' : '',
++ \ 'priority' : 5}],
++ \ s[0].signs)
++
+ " Error case
+ call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign',
+ \ [])", 'E715:')
+*** ../vim-8.1.1465/runtime/doc/eval.txt 2019-06-03 21:14:55.125048909 +0200
+--- runtime/doc/eval.txt 2019-06-04 22:39:13.100396410 +0200
+***************
+*** 8596,8602 ****
+ priority sign priority
+
+ The returned signs in a buffer are ordered by their line
+! number.
+
+ Returns an empty list on failure or if there are no placed
+ signs.
+--- 8597,8603 ----
+ priority sign priority
+
+ The returned signs in a buffer are ordered by their line
+! number and priority.
+
+ Returns an empty list on failure or if there are no placed
+ signs.
+*** ../vim-8.1.1465/runtime/doc/sign.txt 2019-05-05 18:11:46.324590615 +0200
+--- runtime/doc/sign.txt 2019-06-04 22:40:03.264137888 +0200
+***************
+*** 182,190 ****
+
+ By default, the sign is assigned a default priority of 10. To
+ assign a different priority value, use "priority={prio}" to
+! specify a value. The priority is used to determine the
+! highlight group used when multiple signs are placed on the
+! same line.
+
+ Examples: >
+ :sign place 5 line=3 name=sign1 file=a.py
+--- 182,190 ----
+
+ By default, the sign is assigned a default priority of 10. To
+ assign a different priority value, use "priority={prio}" to
+! specify a value. The priority is used to determine the sign
+! that is displayed when multiple signs are placed on the same
+! line.
+
+ Examples: >
+ :sign place 5 line=3 name=sign1 file=a.py
+***************
+*** 204,210 ****
+ it (e.g., when the debugger has stopped at a breakpoint).
+
+ The optional "group={group}" attribute can be used before
+! "file=" to select a sign in a particular group.
+
+ :sign place {id} name={name} [buffer={nr}]
+ Same, but use buffer {nr}. If the buffer argument is not
+--- 204,212 ----
+ it (e.g., when the debugger has stopped at a breakpoint).
+
+ The optional "group={group}" attribute can be used before
+! "file=" to select a sign in a particular group. The optional
+! "priority={prio}" attribute can be used to change the priority
+! of an existing sign.
+
+ :sign place {id} name={name} [buffer={nr}]
+ Same, but use buffer {nr}. If the buffer argument is not
+*** ../vim-8.1.1465/src/version.c 2019-06-04 22:29:06.931288432 +0200
+--- src/version.c 2019-06-04 22:38:49.112518143 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1466,
+ /**/
+
+--
+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.1467 b/data/vim/patches/8.1.1467
new file mode 100644
index 000000000..1dab6c35a
--- /dev/null
+++ b/data/vim/patches/8.1.1467
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1467
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1467 (after 8.1.1465)
+Problem: Cscope test fails.
+Solution: Update expected text.
+Files: src/testdir/test_cscope.vim
+
+
+*** ../vim-8.1.1466/src/testdir/test_cscope.vim 2019-05-28 23:08:12.080648632 +0200
+--- src/testdir/test_cscope.vim 2019-06-04 23:17:11.635163146 +0200
+***************
+*** 123,130 ****
+ if cs_version >= 15.8
+ for cmd in ['cs find a item', 'cs find 9 item']
+ let a = execute(cmd)
+! call assert_equal(['', '(1 of 4): <<test_mf_hash>> item = LALLOC_CLEAR_ONE(mf_hashtab_T);'], split(a, '\n', 1))
+! call assert_equal(' item = LALLOC_CLEAR_ONE(mf_hashtab_T);', getline('.'))
+ cnext
+ call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
+ cnext
+--- 123,130 ----
+ if cs_version >= 15.8
+ for cmd in ['cs find a item', 'cs find 9 item']
+ let a = execute(cmd)
+! call assert_equal(['', '(1 of 4): <<test_mf_hash>> item = LALLOC_CLEAR_ONE(mf_hashitem_T);'], split(a, '\n', 1))
+! call assert_equal(' item = LALLOC_CLEAR_ONE(mf_hashitem_T);', getline('.'))
+ cnext
+ call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
+ cnext
+*** ../vim-8.1.1466/src/version.c 2019-06-04 22:48:11.441416200 +0200
+--- src/version.c 2019-06-04 23:18:49.998580032 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1467,
+ /**/
+
+--
+There's no place like $(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.1468 b/data/vim/patches/8.1.1468
new file mode 100644
index 000000000..b3afffbac
--- /dev/null
+++ b/data/vim/patches/8.1.1468
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1468
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1468
+Problem: The generated desktop files may be invalid.
+Solution: Check validity with desktop-file-validate. (Christian Brabandt,
+ Will Thompson, closes #4480)
+Files: src/po/Makefile
+
+
+*** ../vim-8.1.1467/src/po/Makefile 2019-05-05 21:01:47.654072636 +0200
+--- src/po/Makefile 2019-06-04 23:10:49.853378460 +0200
+***************
+*** 151,157 ****
+
+ clean: checkclean
+ rm -f core core.* *.old.po *.mo *.pot sjiscorr
+! rm -f LINGUAS vim.desktop gvim.desktop
+
+ distclean: clean
+
+--- 151,157 ----
+
+ clean: checkclean
+ rm -f core core.* *.old.po *.mo *.pot sjiscorr
+! rm -f LINGUAS vim.desktop gvim.desktop tmp_*desktop
+
+ distclean: clean
+
+***************
+*** 167,179 ****
+
+ vim.desktop: vim.desktop.in $(POFILES)
+ @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+! $(MSGFMT) --desktop -d . --template vim.desktop.in -o vim.desktop
+ rm -f LINGUAS
+
+ gvim.desktop: gvim.desktop.in $(POFILES)
+ @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+! $(MSGFMT) --desktop -d . --template gvim.desktop.in -o gvim.desktop
+ rm -f LINGUAS
+
+ update-po: $(LANGUAGES)
+
+--- 167,183 ----
+
+ vim.desktop: vim.desktop.in $(POFILES)
+ @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+! $(MSGFMT) --desktop -d . --template vim.desktop.in -o tmp_vim.desktop
+ rm -f LINGUAS
++ if command -v desktop-file-validate; then desktop-file-validate tmp_vim.desktop; fi
++ mv tmp_vim.desktop vim.desktop
+
+ gvim.desktop: gvim.desktop.in $(POFILES)
+ @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+! $(MSGFMT) --desktop -d . --template gvim.desktop.in -o tmp_gvim.desktop
+ rm -f LINGUAS
++ if command -v desktop-file-validate; then desktop-file-validate tmp_gvim.desktop; fi
++ mv tmp_gvim.desktop gvim.desktop
+
+ update-po: $(LANGUAGES)
+
+*** ../vim-8.1.1467/src/version.c 2019-06-04 23:20:19.974043597 +0200
+--- src/version.c 2019-06-05 21:25:12.494834304 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1468,
+ /**/
+
+--
+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.1469 b/data/vim/patches/8.1.1469
new file mode 100644
index 000000000..e82dd7e9b
--- /dev/null
+++ b/data/vim/patches/8.1.1469
@@ -0,0 +1,229 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1469
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1469
+Problem: No test for checking the cursor style response.
+Solution: Add a simple test.
+Files: src/term.c, src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1468/src/term.c 2019-06-04 21:41:24.465087519 +0200
+--- src/term.c 2019-06-05 22:01:10.635280005 +0200
+***************
+*** 4015,4021 ****
+ blink_state_is_inverted()
+ {
+ #ifdef FEAT_TERMRESPONSE
+! return rbm_status.tr_progress == STATUS_GOT && rcs_status.tr_progress == STATUS_GOT
+ && initial_cursor_blink != initial_cursor_shape_blink;
+ #else
+ return FALSE;
+--- 4015,4022 ----
+ blink_state_is_inverted()
+ {
+ #ifdef FEAT_TERMRESPONSE
+! return rbm_status.tr_progress == STATUS_GOT
+! && rcs_status.tr_progress == STATUS_GOT
+ && initial_cursor_blink != initial_cursor_shape_blink;
+ #else
+ return FALSE;
+***************
+*** 5062,5068 ****
+ * {lead}1$r<digit> q{tail}
+ *
+ * {lead} can be <Esc>P or DCS
+! * {tail} can be Esc>\ or STERM
+ *
+ * Consume any code that starts with "{lead}.+r" or "{lead}.$r".
+ */
+--- 5063,5069 ----
+ * {lead}1$r<digit> q{tail}
+ *
+ * {lead} can be <Esc>P or DCS
+! * {tail} can be <Esc>\ or STERM
+ *
+ * Consume any code that starts with "{lead}.+r" or "{lead}.$r".
+ */
+***************
+*** 5072,5100 ****
+ {
+ j = 1 + (tp[0] == ESC);
+ if (len < j + 3)
+! i = len; /* need more chars */
+ else if ((argp[1] != '+' && argp[1] != '$') || argp[2] != 'r')
+! i = 0; /* no match */
+ else if (argp[1] == '+')
+! /* key code response */
+! for (i = j; i < len; ++i)
+! {
+! if ((tp[i] == ESC && i + 1 < len && tp[i + 1] == '\\')
+! || tp[i] == STERM)
+ {
+! if (i - j >= 3)
+! got_code_from_term(tp + j, i);
+! key_name[0] = (int)KS_EXTRA;
+! key_name[1] = (int)KE_IGNORE;
+! slen = i + 1 + (tp[i] == ESC);
+! break;
+ }
+- }
+ else
+ {
+! /* Probably the cursor shape response. Make sure that "i"
+! * is equal to "len" when there are not sufficient
+! * characters. */
+ for (i = j + 3; i < len; ++i)
+ {
+ if (i - j == 3 && !isdigit(tp[i]))
+--- 5073,5101 ----
+ {
+ j = 1 + (tp[0] == ESC);
+ if (len < j + 3)
+! i = len; // need more chars
+ else if ((argp[1] != '+' && argp[1] != '$') || argp[2] != 'r')
+! i = 0; // no match
+ else if (argp[1] == '+')
+! // key code response
+! for (i = j; i < len; ++i)
+ {
+! if ((tp[i] == ESC && i + 1 < len && tp[i + 1] == '\\')
+! || tp[i] == STERM)
+! {
+! if (i - j >= 3)
+! got_code_from_term(tp + j, i);
+! key_name[0] = (int)KS_EXTRA;
+! key_name[1] = (int)KE_IGNORE;
+! slen = i + 1 + (tp[i] == ESC);
+! break;
+! }
+ }
+ else
+ {
+! // Probably the cursor shape response. Make sure that "i"
+! // is equal to "len" when there are not sufficient
+! // characters.
+ for (i = j + 3; i < len; ++i)
+ {
+ if (i - j == 3 && !isdigit(tp[i]))
+***************
+*** 5110,5122 ****
+ {
+ int number = argp[3] - '0';
+
+! /* 0, 1 = block blink, 2 = block
+! * 3 = underline blink, 4 = underline
+! * 5 = vertical bar blink, 6 = vertical bar */
+ number = number == 0 ? 1 : number;
+ initial_cursor_shape = (number + 1) / 2;
+! /* The blink flag is actually inverted, compared to
+! * the value set with T_SH. */
+ initial_cursor_shape_blink =
+ (number & 1) ? FALSE : TRUE;
+ rcs_status.tr_progress = STATUS_GOT;
+--- 5111,5123 ----
+ {
+ int number = argp[3] - '0';
+
+! // 0, 1 = block blink, 2 = block
+! // 3 = underline blink, 4 = underline
+! // 5 = vertical bar blink, 6 = vertical bar
+ number = number == 0 ? 1 : number;
+ initial_cursor_shape = (number + 1) / 2;
+! // The blink flag is actually inverted, compared to
+! // the value set with T_SH.
+ initial_cursor_shape_blink =
+ (number & 1) ? FALSE : TRUE;
+ rcs_status.tr_progress = STATUS_GOT;
+*** ../vim-8.1.1468/src/testdir/test_termcodes.vim 2019-05-03 13:44:06.560890132 +0200
+--- src/testdir/test_termcodes.vim 2019-06-05 22:06:18.865258613 +0200
+***************
+*** 624,626 ****
+--- 624,686 ----
+ let &mouse = save_mouse
+ bwipe!
+ endfunc
++
++ " This only checks if the sequence is recognized.
++ " TODO: check that the values were parsed properly
++ func Test_term_rgb_response()
++ set t_RF=x
++ set t_RB=y
++
++ " response to t_RF, 4 digits
++ let red = 0x12
++ let green = 0x34
++ let blue = 0x56
++ let seq = printf("\<Esc>]10;rgb:%02x00/%02x00/%02x00\x07", red, green, blue)
++ call feedkeys(seq, 'Lx!')
++ call assert_equal(seq, v:termrfgresp)
++
++ " response to t_RF, 2 digits
++ let red = 0x78
++ let green = 0x9a
++ let blue = 0xbc
++ let seq = printf("\<Esc>]10;rgb:%02x/%02x/%02x\x07", red, green, blue)
++ call feedkeys(seq, 'Lx!')
++ call assert_equal(seq, v:termrfgresp)
++
++ " response to t_RB, 4 digits
++ let red = 0x21
++ let green = 0x43
++ let blue = 0x65
++ let seq = printf("\<Esc>]11;rgb:%02x00/%02x00/%02x00\x07", red, green, blue)
++ call feedkeys(seq, 'Lx!')
++ call assert_equal(seq, v:termrbgresp)
++
++ " response to t_RB, 2 digits
++ let red = 0x87
++ let green = 0xa9
++ let blue = 0xcb
++ let seq = printf("\<Esc>]11;rgb:%02x/%02x/%02x\x07", red, green, blue)
++ call feedkeys(seq, 'Lx!')
++ call assert_equal(seq, v:termrbgresp)
++
++ set t_RF= t_RB=
++ endfunc
++
++ " This only checks if the sequence is recognized.
++ " This must be last, because it has side effects to xterm properties.
++ " TODO: check that the values were parsed properly
++ func Test_xx_term_style_response()
++ " Termresponse is only parsed when t_RV is not empty.
++ set t_RV=x
++
++ " send the termresponse to trigger requesting the XT codes
++ let seq = "\<Esc>[>41;337;0c"
++ call feedkeys(seq, 'Lx!')
++ call assert_equal(seq, v:termresponse)
++
++ let seq = "\<Esc>P1$r2 q\<Esc>\\"
++ call feedkeys(seq, 'Lx!')
++ call assert_equal(seq, v:termstyleresp)
++
++ set t_RV=
++ endfunc
+*** ../vim-8.1.1468/src/version.c 2019-06-05 21:25:30.770629173 +0200
+--- src/version.c 2019-06-05 22:02:14.018853267 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1469,
+ /**/
+
+--
+I AM THANKFUL...
+...for the clothes that fit a little too snug because it
+means I have more than enough to eat.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/8.1.1470 b/data/vim/patches/8.1.1470
new file mode 100644
index 000000000..3242ccf0b
--- /dev/null
+++ b/data/vim/patches/8.1.1470
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1470
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1470
+Problem: New Unicode character U32FF missing from double-width table.
+Solution: Add the character.
+Files: src/mbyte.c
+
+
+*** ../vim-8.1.1469/src/mbyte.c 2019-05-28 23:08:12.068648696 +0200
+--- src/mbyte.c 2019-06-05 22:39:05.944073305 +0200
+***************
+*** 1461,1468 ****
+ {0x31c0, 0x31e3},
+ {0x31f0, 0x321e},
+ {0x3220, 0x3247},
+! {0x3250, 0x32fe},
+! {0x3300, 0x4dbf},
+ {0x4e00, 0xa48c},
+ {0xa490, 0xa4c6},
+ {0xa960, 0xa97c},
+--- 1461,1467 ----
+ {0x31c0, 0x31e3},
+ {0x31f0, 0x321e},
+ {0x3220, 0x3247},
+! {0x3250, 0x4dbf},
+ {0x4e00, 0xa48c},
+ {0xa490, 0xa4c6},
+ {0xa960, 0xa97c},
+*** ../vim-8.1.1469/src/version.c 2019-06-05 22:07:47.784695712 +0200
+--- src/version.c 2019-06-05 22:43:08.734345161 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1470,
+ /**/
+
+--
+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.1471 b/data/vim/patches/8.1.1471
new file mode 100644
index 000000000..730851ac3
--- /dev/null
+++ b/data/vim/patches/8.1.1471
@@ -0,0 +1,176 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1471
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.1471
+Problem: 'background' not correctly set for 2-digit rgb termresponse.
+Solution: Adjust what digit to use. (closes #4495)
+Files: src/term.c, src/testdir/test_termcodes.vim
+
+
+*** ../vim-8.1.1470/src/term.c 2019-06-05 22:07:47.780695739 +0200
+--- src/term.c 2019-06-05 22:50:12.231496426 +0200
+***************
+*** 4994,5010 ****
+ && (is_4digit
+ || (tp[j + 9] == '/' && tp[i + 12 == '/'])))
+ {
+ # ifdef FEAT_TERMINAL
+ int rval, gval, bval;
+
+! rval = hexhex2nr(tp + j + 7);
+! gval = hexhex2nr(tp + j + (is_4digit ? 12 : 10));
+! bval = hexhex2nr(tp + j + (is_4digit ? 17 : 13));
+ # endif
+ if (is_bg)
+ {
+! char *newval = (3 * '6' < tp[j+7] + tp[j+12]
+! + tp[j+17]) ? "light" : "dark";
+
+ LOG_TR(("Received RBG response: %s", tp));
+ rbg_status.tr_progress = STATUS_GOT;
+--- 4994,5013 ----
+ && (is_4digit
+ || (tp[j + 9] == '/' && tp[i + 12 == '/'])))
+ {
++ char_u *tp_r = tp + j + 7;
++ char_u *tp_g = tp + j + (is_4digit ? 12 : 10);
++ char_u *tp_b = tp + j + (is_4digit ? 17 : 13);
+ # ifdef FEAT_TERMINAL
+ int rval, gval, bval;
+
+! rval = hexhex2nr(tp_r);
+! gval = hexhex2nr(tp_b);
+! bval = hexhex2nr(tp_g);
+ # endif
+ if (is_bg)
+ {
+! char *new_bg_val = (3 * '6' < *tp_r + *tp_g +
+! *tp_b) ? "light" : "dark";
+
+ LOG_TR(("Received RBG response: %s", tp));
+ rbg_status.tr_progress = STATUS_GOT;
+***************
+*** 5014,5024 ****
+ bg_b = bval;
+ # endif
+ if (!option_was_set((char_u *)"bg")
+! && STRCMP(p_bg, newval) != 0)
+ {
+ /* value differs, apply it */
+ set_option_value((char_u *)"bg", 0L,
+! (char_u *)newval, 0);
+ reset_option_was_set((char_u *)"bg");
+ redraw_asap(CLEAR);
+ }
+--- 5017,5027 ----
+ bg_b = bval;
+ # endif
+ if (!option_was_set((char_u *)"bg")
+! && STRCMP(p_bg, new_bg_val) != 0)
+ {
+ /* value differs, apply it */
+ set_option_value((char_u *)"bg", 0L,
+! (char_u *)new_bg_val, 0);
+ reset_option_was_set((char_u *)"bg");
+ redraw_asap(CLEAR);
+ }
+*** ../vim-8.1.1470/src/testdir/test_termcodes.vim 2019-06-05 22:07:47.784695712 +0200
+--- src/testdir/test_termcodes.vim 2019-06-05 22:55:00.277623892 +0200
+***************
+*** 647,667 ****
+ call feedkeys(seq, 'Lx!')
+ call assert_equal(seq, v:termrfgresp)
+
+! " response to t_RB, 4 digits
+! let red = 0x21
+! let green = 0x43
+ let blue = 0x65
+ let seq = printf("\<Esc>]11;rgb:%02x00/%02x00/%02x00\x07", red, green, blue)
+ call feedkeys(seq, 'Lx!')
+ call assert_equal(seq, v:termrbgresp)
+
+! " response to t_RB, 2 digits
+! let red = 0x87
+! let green = 0xa9
+! let blue = 0xcb
+ let seq = printf("\<Esc>]11;rgb:%02x/%02x/%02x\x07", red, green, blue)
+ call feedkeys(seq, 'Lx!')
+ call assert_equal(seq, v:termrbgresp)
+
+ set t_RF= t_RB=
+ endfunc
+--- 647,695 ----
+ call feedkeys(seq, 'Lx!')
+ call assert_equal(seq, v:termrfgresp)
+
+! " response to t_RB, 4 digits, dark
+! set background=light
+! call test_option_not_set('background')
+! let red = 0x29
+! let green = 0x4a
+! let blue = 0x6b
+! let seq = printf("\<Esc>]11;rgb:%02x00/%02x00/%02x00\x07", red, green, blue)
+! call feedkeys(seq, 'Lx!')
+! call assert_equal(seq, v:termrbgresp)
+! call assert_equal('dark', &background)
+!
+! " response to t_RB, 4 digits, light
+! set background=dark
+! call test_option_not_set('background')
+! let red = 0x81
+! let green = 0x63
+ let blue = 0x65
+ let seq = printf("\<Esc>]11;rgb:%02x00/%02x00/%02x00\x07", red, green, blue)
+ call feedkeys(seq, 'Lx!')
+ call assert_equal(seq, v:termrbgresp)
++ call assert_equal('light', &background)
+
+! " response to t_RB, 2 digits, dark
+! set background=light
+! call test_option_not_set('background')
+! let red = 0x47
+! let green = 0x59
+! let blue = 0x5b
+! let seq = printf("\<Esc>]11;rgb:%02x/%02x/%02x\x07", red, green, blue)
+! call feedkeys(seq, 'Lx!')
+! call assert_equal(seq, v:termrbgresp)
+! call assert_equal('dark', &background)
+!
+! " response to t_RB, 2 digits, light
+! set background=dark
+! call test_option_not_set('background')
+! let red = 0x83
+! let green = 0xa4
+! let blue = 0xc2
+ let seq = printf("\<Esc>]11;rgb:%02x/%02x/%02x\x07", red, green, blue)
+ call feedkeys(seq, 'Lx!')
+ call assert_equal(seq, v:termrbgresp)
++ call assert_equal('light', &background)
+
+ set t_RF= t_RB=
+ endfunc
+*** ../vim-8.1.1470/src/version.c 2019-06-05 22:46:09.837107776 +0200
+--- src/version.c 2019-06-05 22:56:16.273134924 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1471,
+ /**/
+
+--
+I AM THANKFUL...
+...for all the complaining I hear about the government
+because it means we have freedom of speech.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/data/vim/patches/MD5SUMS b/data/vim/patches/MD5SUMS
new file mode 100644
index 000000000..aa49faf6d
--- /dev/null
+++ b/data/vim/patches/MD5SUMS
@@ -0,0 +1,1471 @@
+3651f58db32bded57d2d02a2875e1931 8.1.0001
+8d2022c004e2c03d5261ac2c6b754db9 8.1.0002
+760b1f9de6e987055d4ca9e792989a3f 8.1.0003
+6de78a2da96ff4bf9d0edbe97afb0ca0 8.1.0004
+04af6f67907479fe20444869606fda79 8.1.0005
+85f6f18ae31d94938fd840ef6fd78946 8.1.0006
+7684502a9075609fb170eacd215cba45 8.1.0007
+e1d70648a98487414f6b3a231f9d205f 8.1.0008
+50000824e2a40fc5c47d2689cbc21014 8.1.0009
+912dfa23ff2a58080dd408eea756113a 8.1.0010
+76dca9fdc356a166ee9ff12735b51281 8.1.0011
+ac478df801026f6eff00b6367156c3bf 8.1.0012
+e30a9a49cf5008f1de585f495cb22e58 8.1.0013
+07e304f04d05c2102f9d7c2ddfa56a8f 8.1.0014
+ebfc726763f2af9f36e1597a9283a9a1 8.1.0015
+5913b2f7130ba2e1a4420044fbffe88d 8.1.0016
+e7be3d00cacd28ab847c96ad867d69d4 8.1.0017
+249b733e10a6983a56195fd2409d475a 8.1.0018
+8c6bce06aa396476829569bdafe1a72b 8.1.0019
+9d212b197a9ab29e1cb9e5dfa2c06069 8.1.0020
+93859bec630d5f13ec18fae455619456 8.1.0021
+5967b74e143987ac0e3daaa486f005b8 8.1.0022
+af916857664c018210b717c817dbf8cd 8.1.0023
+42e0875ea7abb8a739ea3efa2fc9193c 8.1.0024
+fe05da3fb81b2fe3965377168d898ac8 8.1.0025
+47096e936aa223be1554cef74ac4883e 8.1.0026
+b88e5812f94d808f5428ddbaff7de214 8.1.0027
+9f0853dfabb8b0a3da0636bed9149283 8.1.0028
+e89fea57362ea80ef44717d528d8d8d7 8.1.0029
+dee22eaa7ebfe8af7030d9ed624bfee4 8.1.0030
+cc3563b70011c3ca316f2cdb54edbef0 8.1.0031
+8cefa5509b099ca7c1cfcb1382ab0966 8.1.0032
+76f41f02af11e823fa616153f92f69e0 8.1.0033
+45ae373f43e3d814f8ee92a38daa1a7a 8.1.0034
+c54070507e6c456a8e7bd96caf6349e6 8.1.0035
+6e7968c30436266f9787b0fbd68c9dcb 8.1.0036
+fca58aea8649b9cfeeb1d4642f655549 8.1.0037
+4b22643c7b55ebe83e02dc5cb24bd291 8.1.0038
+cc496562d777b0c5aef0fea0a5e10e5a 8.1.0039
+72d7660b100676a4824ba3e9e2f6908e 8.1.0040
+bdf00cc1ae3519a8b83a2a9a0b1f78e2 8.1.0041
+6e6482aea8ba9b9ab0b70e0255632725 8.1.0042
+6fa0cb62b89a91a9be2fe63e56bb8dcd 8.1.0043
+969c4f10c983933d5127def81d77baf1 8.1.0044
+dc1fc28260bd11dccaffef075d747761 8.1.0045
+cc59dee30db52bcf67f470b4cebd1edb 8.1.0046
+c10877c461072f1ca5d3324871624406 8.1.0047
+da45c7d472cbec298f2872726362d7c0 8.1.0048
+17f70cf7bafa2761b25488fc51a174df 8.1.0049
+81d0500dae67aa3eddbbea448750e8ec 8.1.0050
+6cfa24bece0022e146f472a462475d2f 8.1.0051
+6df258c68f689f9d274ee4620b35794a 8.1.0052
+37d3cd4484c2e6374fc7f3ba1cea847f 8.1.0053
+0f87331b14464edb12956200d9fb7245 8.1.0054
+a53f3156c696327e82ccd666d09f30fe 8.1.0055
+bbc9eaadc275ae2568383ed2d3bc05ca 8.1.0056
+0de0e3ae006e730c8163f00bd79048a7 8.1.0057
+80b3bcfd1a90055c03c05898dbb802b1 8.1.0058
+79f90c446a80e0cb2118ef8dee73f45d 8.1.0059
+06fb849e11368198c0e569acbdc4d89c 8.1.0060
+9c2d8d8f4c2857e42b4785fcc1d0cf4f 8.1.0061
+4f2f73f9b82b88bbf8c2120624c6426a 8.1.0062
+e800b3a10a15ac0abad56d8299068e83 8.1.0063
+3d59b3858cd98c8a0d84e28536383a70 8.1.0064
+5bb6dde6d95c7ac8aa335e3665877540 8.1.0065
+261345500f0145568dfa49cf1163a984 8.1.0066
+6a4af9c60c8b4b93bc7ab0aea1700387 8.1.0067
+872e15eb7cdb9b6038494c87f83524b2 8.1.0068
+4b22366427d7a18b5d2beddb791c85ca 8.1.0069
+142b915160d2ae153910004ee39eba24 8.1.0070
+01c2f823e3e7a619eaf17b52067e4249 8.1.0071
+a2515690ba13c79956ae24f19e524593 8.1.0072
+2dcf3322efe5b8fd7ea8f00ac0e12f77 8.1.0073
+1430a15e119736a5da91dd2f1e311e27 8.1.0074
+517e29872cdc6347ce1e5f0bf170ff1f 8.1.0075
+d8712fceedfd056adc663b1b85ac0b34 8.1.0076
+62b5d7bb74bf75ed6b42870de95f6ad3 8.1.0077
+31ce62a466b67d260af498a8bafd01e6 8.1.0078
+372e01ecbd0ee5e53de85e4c3e1f671d 8.1.0079
+9cb853aa56fb2613acf04bc8922b074b 8.1.0080
+c0d507f1ce227eeeb4d2e75ea826a5da 8.1.0081
+c3b1817b2de6d170085b6b994391c1f1 8.1.0082
+22ec350a5fe6f4bddbffbc6086eaa502 8.1.0083
+e96e4653b8735c224f9c5f1e34d80e5e 8.1.0084
+de4d26b3aaa01a041774c68f0de3a250 8.1.0085
+cf18f40b18f64d3d2e13f4ceef9d529c 8.1.0086
+407cc130ce0b276106dec6564744eb9f 8.1.0087
+56c8d98b4dd34743977833ca8391a480 8.1.0088
+693b2bb6745dc952a9320449576480ce 8.1.0089
+d64a4fd36c75377809256d8c5ffd16f0 8.1.0090
+5c231e1e07ea9919ca0b0edca030e253 8.1.0091
+fc69457f93ee8a2b6d127745b33cdb35 8.1.0092
+b16d9e2b6d69ab8a73712a104855ba77 8.1.0093
+71ce8b1bf4e85d1d69fbafcdfa1ad4aa 8.1.0094
+0e43f461fe4e91224d4780bd42009c67 8.1.0095
+2d96d2ac51c78a7e6904a3e4963fa4d1 8.1.0096
+557a2b9c82713679d2dc0a478fc2f701 8.1.0097
+c80418f7a5902ce581890535ff0a2e28 8.1.0098
+b4f7f75508dfdbfb5919e73bc2107248 8.1.0099
+cc9b00fcc49f906c99ff92f9d45adf51 8.1.0100
+61a55ec43de2580523ccdf78d0723ebf 8.1.0101
+feca22cabc0b2e8e12935b5ad16fae82 8.1.0102
+07eb49e617ae99eeef1bddbcbdce5088 8.1.0103
+3ae5d1ff1a3865509ea03dffc9672204 8.1.0104
+49328f0ef341f8ccb0f81de01d85b6de 8.1.0105
+73c43d1bbf0eeeb1502fbfe466134921 8.1.0106
+54d14c157d17c4a62f93f999bab9d370 8.1.0107
+437aa568184566066149383f9dcc8400 8.1.0108
+009ab891da21bcae791b1957283b3dbc 8.1.0109
+56cf6c78fd383bac6ea651ce228593a0 8.1.0110
+19a8849dc0a6427afaa2a1f7d8abb4e3 8.1.0111
+9ed87753a57188cfa227c79a273d034d 8.1.0112
+8eb41bdd09131341004e6b7d7071a1cd 8.1.0113
+7e7d7d3461087c8e4f4c5a391ac87af7 8.1.0114
+cb8d59f3ad34cbbc3a595db970d15de8 8.1.0115
+0c0182b09c47eb453998f671e5d7f889 8.1.0116
+981a4c173794d6e7a937c162eb3a9777 8.1.0117
+e3af0e707d552769239332ad02044e25 8.1.0118
+e50165fd682bdb0c8dcd5c5161ec2589 8.1.0119
+a17f408e3f84372bc0d42f4f3eb46136 8.1.0120
+5d6234efb13b565b4759f6293f8a04db 8.1.0121
+5e183660f1e17629b01bca3391fad6c6 8.1.0122
+ffd5ba0189f14b91359690640a0f156e 8.1.0123
+b10f622c126ace99db7cce0cb7d4c03c 8.1.0124
+68ed642773cd369a49ea5ba6ad4aea3b 8.1.0125
+d09af8141b80322b0691482a7c1b7a91 8.1.0126
+0134f4fece3941d6c7560eedf5bd14cf 8.1.0127
+b65dc5f8e7937cdb7b3ac01804284769 8.1.0128
+da4a51f58cb4b379aed126d358d2f50a 8.1.0129
+dbcf67bad270958412fcc1b44743adef 8.1.0130
+cc96ae781d5b107ce6b94a7b0d3f47d0 8.1.0131
+41aa2802b9b37b9d9c55d81a37a7851a 8.1.0132
+7fe2774240037ceb9d152093d9cc895d 8.1.0133
+ca1fc739b5307bad4ecb288b7e20d14d 8.1.0134
+fe1b62392c39c0ffa33200efd8849ae1 8.1.0135
+ba34d1a9ea47d49f88309a0c5ba2f6a5 8.1.0136
+406185e7d17069bb197f895a53388895 8.1.0137
+cfbf312fa49f1bf4a5d2da6dfa53d8a5 8.1.0138
+9ec2bbea6563511c4500dc1f1a9419f3 8.1.0139
+86046d241fd68462b915035b569dc62b 8.1.0140
+c3ae0728304097b067450089a8c77ac0 8.1.0141
+ce53219fd6d7138ee3003045e51466fc 8.1.0142
+d2234994b42a2ee3a40c5cf0b5f8d685 8.1.0143
+b4f0002d475fde71dbe47304dfb1ebb1 8.1.0144
+b118cab65fa69b904c827c6aef5496b0 8.1.0145
+e778ac2653d2c3ed0306f210e9cb1854 8.1.0146
+c2fbc3c17430deaf2b1be0376962499c 8.1.0147
+af7b23ad1e7a17d1e95fe52ddc6bc223 8.1.0148
+9a4dc8a23eb4a26c75b26cacca5168b3 8.1.0149
+ca5f9e360bfb55f59d2a04332ae6a648 8.1.0150
+ba624c909dfe4ed5cd086c4f208e2c33 8.1.0151
+b1df084e5f563a9140093aab30fc1f6f 8.1.0152
+4a4de60b9ea0bd1055f99c0c7ba63b9b 8.1.0153
+29768fa35013c97d95077142924e2c33 8.1.0154
+c4f83671f4bbfc162fb549e595ff3815 8.1.0155
+23af6d4cb9cc6e1041f30b86c10c25d2 8.1.0156
+854a84081c541544dac0982f97a5f370 8.1.0157
+cbf0ed0083bd2df488e23b1820ea3cca 8.1.0158
+1b7993eb99744d7ef1c459f3f1627fb5 8.1.0159
+2b5de09b797b9341d6798134c8ee2925 8.1.0160
+c73f7be1984ef04445a97b8f7e2f06c8 8.1.0161
+c8a84808faf1ed5cd9f928b8e1e0ae2b 8.1.0162
+f530f747ec2e18a5663622da59a5deb1 8.1.0163
+98a764fdff3191cef16aee24599f1adf 8.1.0164
+65333df598f6686f3f5bf388f893b77c 8.1.0165
+6b4bc87772a3026c56fef90ddb8bc366 8.1.0166
+22ec82695bef10611eb966b42efe8c14 8.1.0167
+7dc6f64b3cda3d105e2b43b8d1ef6c81 8.1.0168
+4be115d1ea6f14b418f1425472042b40 8.1.0169
+8db4663c40ab96be0697c338c311c6cf 8.1.0170
+17beafeff923ee65c3fe37fb2a5e4c78 8.1.0171
+5ca56f40adda2bd4ae9ea93f6a0eec67 8.1.0172
+b96ab59b03ac08c7f2bae1eab5f87c4d 8.1.0173
+8b646b59446b0e570c67b699add6503d 8.1.0174
+1ff79187faeff03911684b1f33e2651c 8.1.0175
+2e7fe62d4439b4469e0270c804e204b6 8.1.0176
+500b279085ad8ce336154c2d385767db 8.1.0177
+d89279ee11105dadfa5cf7b5d1734666 8.1.0178
+d3b80c2f2b51effdcb8c892d112d97c5 8.1.0179
+54ccdb898480d9138edc9e3e4fec6eab 8.1.0180
+390acf1786c3d84bd2f20061263663f6 8.1.0181
+3620c9524f74794bf829c0b877859225 8.1.0182
+236adfce3eb1d402447859fd90a091e0 8.1.0183
+e5537e37d053b544b1d724b96a0d90a4 8.1.0184
+440b67495a8f18a72fa2f50028ecb603 8.1.0185
+98cc107d3d6d1df50811136e03e12661 8.1.0186
+50708929877f72745a55edadb945d855 8.1.0187
+92b50faae1f6d15e0d22b5b87592f7b4 8.1.0188
+d23862c0938b240b174e2f4eb714bd88 8.1.0189
+162450e9ae156317a17a9b0833c5c6ff 8.1.0190
+dbd4395ec3a82979a6ce358eb99cca6f 8.1.0191
+5d2b094e6b3c6fdbf06da244f8f080bb 8.1.0192
+a1f163741326223bd718365f10670718 8.1.0193
+e666dcd7021d5c78d82608a4af311a09 8.1.0194
+5541a8a2416650f2ce97e979261ded2e 8.1.0195
+5b8a5525dc8a6200f3517e425315c844 8.1.0196
+3e949339c4ea7e4238ab426f17b5b14c 8.1.0197
+66fdd26563af5d30d3822e984721c215 8.1.0198
+939d0f906ca47ef5327b0d522469aaef 8.1.0199
+b0233f83c2e750c1a028863d1c48201c 8.1.0200
+642ac22e455e68d065b393f7b1e3447f 8.1.0201
+2d4dd10670b1b78b3675bdda115b4d13 8.1.0202
+7712ae66386e0b705c627b4984ed667b 8.1.0203
+8012c659261a5f1962272206ef1ab9cc 8.1.0204
+54131e5b24b32c361d658fcfd6847ae9 8.1.0205
+199990997a864e34fbb3b901f9fe0927 8.1.0206
+463555191e24d9943eb2124825ba84ae 8.1.0207
+50a5e73f06419a269e5f5517b1d58339 8.1.0208
+f95f10345e46d59c5f2f04fcce9f4540 8.1.0209
+b5e3518459841a5f66f32fc37037bfab 8.1.0210
+e966092d598746b86cffd4a3b40c12ae 8.1.0211
+bd561e5985f7fb33069eb2dd7a983313 8.1.0212
+10f89c1c787adc8ef67b7758bd69390e 8.1.0213
+db1ab0315e45b7e536ab202152433642 8.1.0214
+ebc1157d2aa7d592824c12866058e0fa 8.1.0215
+60d2850b6143dfabc181eeb46fceb8f4 8.1.0216
+77e557912deab16bcf3c8e670b51d44d 8.1.0217
+49096c06585149d032c22384ee10d988 8.1.0218
+aa90ff33f9a651508b9ce72b03923098 8.1.0219
+052366d349efbe6ba97d67ea1bb0e545 8.1.0220
+b8ad78b30db46718270f657c019cdc9d 8.1.0221
+067519b9dcd0d2a6c0d082732d51b462 8.1.0222
+8381e7bc467461e4bbfdac342a85bcd7 8.1.0223
+8e4e653b480c7e95d23b9b3adfbcede4 8.1.0224
+53ce7c4ce4cb9c8c33f466dce064d9cb 8.1.0225
+72945af7742a33bef4f9448443297a10 8.1.0226
+e8bbc3ac4891f48ab6ac9a250ade9423 8.1.0227
+c1a8d4ac439245a6cbd709e9f5fa05f1 8.1.0228
+afb5de1ee6005bf1313532a9d970c768 8.1.0229
+653bce986e1f28fcdb3d5f195c9f6663 8.1.0230
+d1f06857084dc4deecba99be3d14c9ea 8.1.0231
+718f837c46d00f209cca201c8ed25343 8.1.0232
+0045364b653b37390da09ff273e863c6 8.1.0233
+729eaf0e4f550e0fa4be1e216b564fab 8.1.0234
+bed4e5b13d7eb2005bae00be690aa80c 8.1.0235
+6e4275e29e808e7fc9907fcf4f8e8964 8.1.0236
+7a46d54c7e74860ca7067a6147c9d44b 8.1.0237
+f4be4f33fcc4f4672fea009b5f716a22 8.1.0238
+1ff655f42fec9e64996ff9887ae25d43 8.1.0239
+d2767e2ce8aac20f87a9030c92fb2d95 8.1.0240
+fb08f4e786e66716ca48528a7091ec75 8.1.0241
+3b4155cc89086023add79c7469d31254 8.1.0242
+8bb884ba99d5abc5f67d212bba7ee839 8.1.0243
+d0b25499b43ab1f3a2fbb9a6a59b70e9 8.1.0244
+d505fc1d992e83734b027c33c600b137 8.1.0245
+7010e47cfd802fae7e747dd1831ee4b2 8.1.0246
+b682cf72708337acb2cb550e237e4246 8.1.0247
+271cc87cec15d732480825bb9db2e647 8.1.0248
+e8f711fc812d473923c9db88be056a69 8.1.0249
+e38d47ddf41ceb3412829890f0132ea9 8.1.0250
+3092c7f2306204207a093c2cc5016483 8.1.0251
+580557363a948dc782609aad4c91d514 8.1.0252
+e430940166ad4ea0a838639d326690e8 8.1.0253
+e769a03aaceb7481abd6025b7e376d7d 8.1.0254
+a7cd23bbe512b38614c9caed70d071de 8.1.0255
+a3b665d3e1452270981331e7bbc9996a 8.1.0256
+bba58a9f254264231a5411d58b66d704 8.1.0257
+f2d26b3a36435dc7494227f936d42cef 8.1.0258
+7f9eab10ebc9790bff7282e444804308 8.1.0259
+5a551a0912495775ffcbedadd6293f25 8.1.0260
+6e53a0d319d55b61ef0b199282c98582 8.1.0261
+ae54f1dfe9d8034d908348b198ef1b01 8.1.0262
+adf15b8fe9e6f5bfbcb2f58a33a283c8 8.1.0263
+5597c99a786eb4c3aa4d90239d8c1366 8.1.0264
+fc8bd4b13a2ee970f5797d308374d640 8.1.0265
+95d473b849e397159dd7babeaed5af25 8.1.0266
+52b5fa9c848ebe6cf0eec70d98b41f67 8.1.0267
+9adf9a865d569e5964f1f2dc552d963f 8.1.0268
+cfdec9b40d2e3002a8d5b7fcb58ef1f9 8.1.0269
+f9d8bce7a2d8c66f1bf1374105ff38ff 8.1.0270
+bf4a488c950639dff2e12b8277150b74 8.1.0271
+aa7394088b7fc3c4bdbb8655472dcebc 8.1.0272
+48a552cd71e69ee00159afcc0c1edb08 8.1.0273
+73b25c01c9e34747417ffb86b631a380 8.1.0274
+efcbc0a27a81f3d24c7516e7ef66e05c 8.1.0275
+ade2ca1335a944ed882aecc57e36d16d 8.1.0276
+0fd5be111dde5465ef81915e8b6b9b23 8.1.0277
+d78f225ccffc6e31c3141cb546e44de4 8.1.0278
+e00f407fa97b52e187dabe3d2d22e016 8.1.0279
+03dce721f52f579a9324e1b72857a812 8.1.0280
+ea6f5850b903046233f537a928ac53ac 8.1.0281
+5f9fd66f5c2a9bcb699e368a14fbb8bf 8.1.0282
+95f5fbef759af26b6680717e3dcc97cf 8.1.0283
+bcd15e23fcaf4799bff385aa4b25ddb5 8.1.0284
+9d39e6a16bd4ef4a0e7c51eedb6deeee 8.1.0285
+76dd322a03924e4268eef149f90d59ca 8.1.0286
+c8250747a521342f73a342f01229fe08 8.1.0287
+948d52bbe265a3a50f880e1c1177d182 8.1.0288
+9abf8bc4eb7823a20bbd555958baeb22 8.1.0289
+6aa32087dec6708a8ff99b9f1481684f 8.1.0290
+8dd6b0607639afc52784054686530dac 8.1.0291
+bc780fd7aaebdc9d265b36dbf0c55ff9 8.1.0292
+f38e8c80dc50afdb973e2310163272f6 8.1.0293
+37874d38a62c7e4957da40455f8921ce 8.1.0294
+e36a1b0a5d8a86d1b29abb0e284585a5 8.1.0295
+47d6179c625e56d65c3e087523500f20 8.1.0296
+c9664fcf7f2cda646c290585dae24434 8.1.0297
+d967aae388cc2cb01f399489ab0f281e 8.1.0298
+f40b8bc622c99806ee3ba3e461a9749c 8.1.0299
+1983d5ca8fc674db5d443baf0a0c23e0 8.1.0300
+7e1a11bc4847430fdbfd4740eecbf52c 8.1.0301
+8a48f93f8f2ad61fc0f42868a32d285e 8.1.0302
+88f962549374042b5284636c7926f40b 8.1.0303
+6ab421dc64191c97d4260b0ee1a62f8a 8.1.0304
+24cca08526463aa7015aa4b9af86d50a 8.1.0305
+eec080226549633a56bbabdd38dcb829 8.1.0306
+f2d6a23ac70d0158792720cfc3d68efe 8.1.0307
+67ead7b201f8ac698a42b71ae82c35b8 8.1.0308
+ec76d39de2d4965648f47eab2e2c0fef 8.1.0309
+8be434462ef361e81825d6b8f0461ac2 8.1.0310
+626e3f7f7ce10fb5746cd5c08bbcafd2 8.1.0311
+f707879a1869560d67a77ca0ef20602a 8.1.0312
+8b0d694da628521ffb40a436f22d46cc 8.1.0313
+8b7e56e98452d47a6a7809973693de36 8.1.0314
+6f293a3d0c5f59e840ecb75fa5e9227b 8.1.0315
+310653d0ca8c709542a10700885163a1 8.1.0316
+c32efbc87bddaa7083782f3ef6361624 8.1.0317
+33b1f0e1ba711d8a9d963602f28c1bbc 8.1.0318
+5a0d3fbfbd22b6d28b9d15be423190f7 8.1.0319
+091a18bd537c602120bf1dd20d8a3d69 8.1.0320
+3fb8a79a8b9cc0f9398b6ccc9b0943b1 8.1.0321
+619fe194c186b72cf68645d7ed2fc6f8 8.1.0322
+d7724cb613797c7164c55b9a7812e5b4 8.1.0323
+453bd826df7f9202dfdd806e95c1011c 8.1.0324
+94a1dedcd56e8ffebb1af6338ee6a822 8.1.0325
+62df6411b6dc7f621e84846acc2a92db 8.1.0326
+d2292b78a12a03904ed7da63a1f66d54 8.1.0327
+5fcc0940d002b95cfa8c73517b08be86 8.1.0328
+07cb7afba9d8ddcb99148eab6ca35502 8.1.0329
+b4b18cb83e17cd61880c883a9c6f5e2e 8.1.0330
+efcc277be09338cec1a60ba81073c9ce 8.1.0331
+7b91119a1613dfa8768c51371eeb224d 8.1.0332
+fb3e27488f03dddfd2b846a1991ed1ef 8.1.0333
+b8e93c6df9d584fbaac94ca3267cfcc9 8.1.0334
+ebc52c95999ee1c324a9956a9c6fdbe2 8.1.0335
+32cd751a122149274b10ed96153a54b8 8.1.0336
+4842322546028cf69c52b4b79b1d7970 8.1.0337
+6f7ca6d7b05f73622dc42ff57871d83a 8.1.0338
+ba7d9c52a740198d2f6a01e6533f636f 8.1.0339
+5efbae40de0e8e87ffc47975c50dd2b1 8.1.0340
+1d54c74e92c818af44069907ac65c5ef 8.1.0341
+6a25e4cd61c15c7731f19e0481cd1240 8.1.0342
+14a210af531e38ef90fc44a45e042142 8.1.0343
+1badd02b7e78e84bd082f9ca2d8eb844 8.1.0344
+03bc79024e8236598c7b8499ecda741b 8.1.0345
+7ce202db64801f6009c4685e35d39093 8.1.0346
+beb58bfec0c615c62ee1b2f8c15ec414 8.1.0347
+ca73a1e02743e1a0d30d382964d4abb6 8.1.0348
+7d96cd0f627f3a9dc0fca969933f0726 8.1.0349
+31beb280623d7f22417c69aa7db9106c 8.1.0350
+68e839ef7306db5c6d6908bd5554b4f6 8.1.0351
+bce69644095378b76421e6f3fa1966d3 8.1.0352
+fb9a4afd0f8b17a9a17764d0f65f758d 8.1.0353
+17af72a17c2164b8110619e35c9b269f 8.1.0354
+d22ef567c86d7c7b7179b0e012826df3 8.1.0355
+839e1f1de96ed375ed1d679b70c80222 8.1.0356
+eda26094f593f3b073e4024338269942 8.1.0357
+a05264876f138674e0ed88bc284920a7 8.1.0358
+3fdfc3c63f1f3323da38d024bc10127f 8.1.0359
+d30f9b5e17c6c437cd92ecbe67aa60a5 8.1.0360
+da147530425c4382f1d7fb5d4047a04b 8.1.0361
+34dc02860b6145ad85eb015de05b021f 8.1.0362
+02871e619db17ee796ba27920772b276 8.1.0363
+c9ae7785f592218a61ded17d95a26ef3 8.1.0364
+0c631fd4c53b9b12e94793e94463f656 8.1.0365
+b4c08baa1d70b0386a9d3a4d9e74b1f9 8.1.0366
+616f8f16e2901f875cce29209da1df0b 8.1.0367
+a27cb160624bf8ca77b516d303a741fd 8.1.0368
+c270fe5bc70ad38ad387a93ba4b83b65 8.1.0369
+fde55270623df0ff8a1726783b8d44da 8.1.0370
+d8c842eb750bbde4f5916ce0a7409e5f 8.1.0371
+523b1aae71cede56c77f00ebb3998d6a 8.1.0372
+3abbcc64044a56926005649ddcf2848f 8.1.0373
+d0669d944739d2a0b523008ff9c0adb1 8.1.0374
+71c5b94dda445bc50c69ddc818d87675 8.1.0375
+643bb8018a2962bb17fb09721ac771c6 8.1.0376
+a6d42ceffbf898f35e5a880e0d414213 8.1.0377
+5d5d4655df57cb5ee657aa48aeca79a8 8.1.0378
+70b128a6b82a9ede18352fa2e17cc44b 8.1.0379
+2dc4fabdd97b881588c4864ec37830f7 8.1.0380
+9505f0c7493e69af1223432e736f7dc6 8.1.0381
+6e8bdacbb0809fdd681890b7f7850292 8.1.0382
+06ad2eb5a5d6255246f7d3d0566262c7 8.1.0383
+7e7260ea47cfe29aeb268b481fa07b07 8.1.0384
+9d1a17dea15268067e641e6ca12f5bbb 8.1.0385
+78966b2ef6070935a100977e45cd097e 8.1.0386
+dcd9370fcf1bea93d798c56ec5940b8b 8.1.0387
+91b24d0440c889158adb2ba638a0b4a3 8.1.0388
+cc9cbc712c6e571d87b56eea93f114c0 8.1.0389
+d94bf2a2e490972061122ace48011d39 8.1.0390
+f3ace33d7614e70ecd19ddce13d20bdc 8.1.0391
+0fe0cd0b29fc53891b8956989951a83f 8.1.0392
+191dcf17b2d82119b2e06d97c3af7fee 8.1.0393
+40132374be55ee7c811465d89848b276 8.1.0394
+e1fb71ccbc27eb3aa073cf63c2049884 8.1.0395
+0c09784aba027c9895ab3d271c221e6f 8.1.0396
+02032549476c531e7be0c41b317e0a27 8.1.0397
+92af2faeae18ffe59d4c5648e42f05dc 8.1.0398
+7b7c0516544c08950c39ef2be90df516 8.1.0399
+7b5158e713b9c01c5d96eeae80e9fc19 8.1.0400
+3caf744c30f7fe576a33d506ab1de678 8.1.0401
+e0bd476fb96793f8751b8891d12bbcbe 8.1.0402
+65c5472dbfe1c40254f2bf17ba1607c1 8.1.0403
+b419881a8ff37b0bfba86ff84fcf7d64 8.1.0404
+158e2f5973875b15005b7f9f38e01468 8.1.0405
+2af48edca33d50db393f31a2b6c35666 8.1.0406
+0790d3f7a60ba57ddfed8799fcd15487 8.1.0407
+4375d0c7084de728163d3925f33f88ad 8.1.0408
+86297528593184deedcee68ed0d3a07f 8.1.0409
+cdcf4b2b6014c54047fad27f03e5da8f 8.1.0410
+19155299756a12422e5684f25ef9e595 8.1.0411
+c1cf336d7f14c5c00809561cf4132e57 8.1.0412
+3bcd9f555cbfd123d1a66312b8795b85 8.1.0413
+5ec11625440c396ec0388a210909d5c2 8.1.0414
+68f95fad4810139044c82b2df6f76a8c 8.1.0415
+76ec67053e3b895ffffec35bca5c670c 8.1.0416
+121292c3b0e435346f971cc6723489a6 8.1.0417
+04e515f8004e56e041b1b52d6687109c 8.1.0418
+4600d021853d92cf5b1f6870d1e72b0b 8.1.0419
+b418969848b58d32016541a475bcb059 8.1.0420
+2191d0e50d86b715ba712a10c454d656 8.1.0421
+069a46844d30c0820e2416018508082b 8.1.0422
+2127e043b46e0c4d9a8be88c26fa9866 8.1.0423
+0e4ecac57e89bf59b1a6765e4b74446e 8.1.0424
+bbaee33c7b603cccd572dca385ba3aa5 8.1.0425
+aafb919a15437de03559017a4ff152ae 8.1.0426
+340dd8637a6fc008e00f57f0343b233e 8.1.0427
+eee75815bd347cb8ea800817a0354694 8.1.0428
+d9dc3092623015ab617217cebc4d28f9 8.1.0429
+97fe11ef8a101262ae29b069967e4b8a 8.1.0430
+f5199fb6ff1824c8a4ac5fce57d84bd7 8.1.0431
+b8d1ba59254471d110b3cd7a2d1f7dad 8.1.0432
+1cf770d308d966ab3f7ab94a9d343f1a 8.1.0433
+469c39905772c2ca6c4e13eb22a65f79 8.1.0434
+b8f191b8a442b3458b03397001603199 8.1.0435
+762d6e7746a1f3f6919060d486fee75d 8.1.0436
+4709fbc00f7499ff48c8ee31803078cd 8.1.0437
+d1fc1c8e82aa22b1b8be180b785d8754 8.1.0438
+915ded5f0aeebbe333c7d542169bf061 8.1.0439
+f79940e26f7712912b629e218e432690 8.1.0440
+dd814a7ca8634034aca216abc9c6a84d 8.1.0441
+2ea13b0519cf663b013f10954979a949 8.1.0442
+ca77327d6cca3c7d415480537fd7f315 8.1.0443
+51f21201cfcbd1faebf9f57600c1d5c6 8.1.0444
+a9d1e2b2052823499280cab2c6acc562 8.1.0445
+21eda68e5eedf9f167dd681e74467c3e 8.1.0446
+e98e4b3b5638319173b9b2dc6e4dd3fa 8.1.0447
+d4c8af882d3f19d19b7fad85817d7f85 8.1.0448
+d0a1bc12e07a0821396c4c9e50dbcee4 8.1.0449
+3f48db9060725ca23710736173415384 8.1.0450
+0a879c6da9c3e7a0db6565c18d8ccf42 8.1.0451
+8c5072c86d8ff89b1cc9e19937975e17 8.1.0452
+e04442ae3e1eecf82fb81ffa9f848bbb 8.1.0453
+f93e5396f9fe6aee690e8eec66826fc3 8.1.0454
+e99a56f240cf82cb26283325174faefa 8.1.0455
+e6eef75ffa11ad9f113b0834d8908fea 8.1.0456
+c98bb2fcee2907287a3fd6ea21370372 8.1.0457
+d40fe817c26b1a0af8273fca721f53d6 8.1.0458
+66268c6e169c2b836e655a03a76556a3 8.1.0459
+b44f8863277929b86473f51a36df4223 8.1.0460
+34fcd147c7699e84dd59345cde498ae5 8.1.0461
+716d5d3badb88d3c706991b4922ee9cf 8.1.0462
+b344fd6917eafe3bb43b4811c2fdcb28 8.1.0463
+a23fb21d52edb312f65fa3bc9c5e4acc 8.1.0464
+1ab415873bb2bc919669042f40da403d 8.1.0465
+6bc62cd7a4c5a4e7419c9ebb80e09060 8.1.0466
+6229b4d9ff12273c78a8eae169c02505 8.1.0467
+c19ddba5bd48cebe195c79c4652e740e 8.1.0468
+dc51e548921bbb8476882f3b833d77d1 8.1.0469
+072c26273a1453a67d26c16f7be560d0 8.1.0470
+a69e0e20f3c6e398eca07e9a5598f887 8.1.0471
+22f59b01abeae73b788367d435b2b724 8.1.0472
+cefc850e306d91ced3deafecc8f9672e 8.1.0473
+bd86e2cc0eee6ff7a966d59009a64a03 8.1.0474
+5ab21acf844e0f0f7dbc309ba693c003 8.1.0475
+656038246433c912303d53b0c7bab505 8.1.0476
+9afcdb505911ef8c670308860d1abf46 8.1.0477
+51d25e931cede201f07c6c00bf0d50f7 8.1.0478
+601c730e4559d517e357df9957dd8d45 8.1.0479
+7d132fc9dc35602ab919e321a9fb43a9 8.1.0480
+2aac6ac1237565417087cf0cba493a8f 8.1.0481
+6a2b602c56cbaabaa3b9cf2e690d68df 8.1.0482
+059d059d105073adfcdc6ab255a03268 8.1.0483
+b9ff4faabe774fd2025e1cec8006d7e2 8.1.0484
+863d9625d46f3af9768eec991216e222 8.1.0485
+25850994202ad37d2ce759f1a1deffd0 8.1.0486
+d115bbaf1d869cc8674274593f43e3d6 8.1.0487
+b837e9a1f18b0d66b7a0b0ce755a93cb 8.1.0488
+53725476856a9132d8f29eee08f4fd9a 8.1.0489
+3008123482f671ae0eaea890271bb5a9 8.1.0490
+41e89e6ccfa61ef1b13e71015cd5a641 8.1.0491
+daee3a52dd5593ce7082e1c48bddba7e 8.1.0492
+695348620c29f28cd4087bdec4068017 8.1.0493
+1d75f1ed474641793b4cecaac5f37cb2 8.1.0494
+ef719631399d60f799ae2b46fac8c503 8.1.0495
+4e14558886f8a073eeeb97126a65d56e 8.1.0496
+b110433df67d04ca37b96c04272ca3cc 8.1.0497
+def125b707c853bdd321d625e2731060 8.1.0498
+e5f06a733b4c70acde39497db6d0e3bc 8.1.0499
+e2faa5f16ed554b17e90019b20c11ad1 8.1.0500
+bdad7a090c489e99deb71fb2621c3253 8.1.0501
+e7a0d217dbab1f62f060d42c09606d27 8.1.0502
+24adb9f6acc480f8a6fd0e56efd34afd 8.1.0503
+0def120eeb5170bfd355e3307b1ba908 8.1.0504
+6937e9139868c4ddad4904f6a29cbdc3 8.1.0505
+5e8351a66818c74b0172267684a765a9 8.1.0506
+4e05dee4f7f5dc8c68bcfb2a6c61811a 8.1.0507
+e61d4d33b16540a617998a42874d0c4c 8.1.0508
+bd8773e45819fea0282924d3d1150fc4 8.1.0509
+cca2c6aa8d8f83c579c1fde3da228c06 8.1.0510
+127e16058d14166cee7b06c5bd7a89cb 8.1.0511
+6e6cbbae27b131d26d1d84e20d462c03 8.1.0512
+bacdb71914f7ebb97f0048bfd890bf34 8.1.0513
+a1713f2d122f76fb9e94fa3471c8e0dc 8.1.0514
+6351a3a7ef85b7a5c136538c9d8999a4 8.1.0515
+ea3628a8bcc1556e868d8897ccd54c55 8.1.0516
+bb4c69b9370c81b554d7cecca253887f 8.1.0517
+c5ae530012013d14a254f0ccde936315 8.1.0518
+d24a96109454dcfbd045df20f01e9466 8.1.0519
+0ddb288ca819a51569df0a749a89206b 8.1.0520
+d46f947cea31d2a1296d683f5752170c 8.1.0521
+db5eb403c4c75ddf410ae19e1d48d334 8.1.0522
+d3e30ab925cb4d0e8749b70fea251864 8.1.0523
+cd7001cda4a729c04743b947c10d67d8 8.1.0524
+d9e3925191b1875768b4993df59c0d3e 8.1.0525
+b6949847924545602c11d5ce04182839 8.1.0526
+198439da428d3f30fcfc73b4405758b2 8.1.0527
+49b7ba2f7ea2f61494f77d3055f22e06 8.1.0528
+20cbc283544401d7dcde64215e532875 8.1.0529
+df15dab87329370a88769e07f1d55509 8.1.0530
+e89fd39975279c4581124abcb5d7618d 8.1.0531
+1e24d8d21fd9af684a721c7389b9c6dc 8.1.0532
+298d4bbfb3806bd44f4d4bc0ed618540 8.1.0533
+0b6f94514b167d7932ef7846f7ba31e3 8.1.0534
+8be1bce2cfffefde64022447d01f1996 8.1.0535
+068639fdf457a04c1536f78e3bb90252 8.1.0536
+980298f00d369febea3784564bb74886 8.1.0537
+16337ba0b3e447f370f8a8a3fbdbd52f 8.1.0538
+66dea73eec4c3efafadbbe0b75c55a05 8.1.0539
+52c0cc369031ea810dbad40903da72e3 8.1.0540
+cc0230bab4229ecc7318e06583920d85 8.1.0541
+8a7d379f8128253bf6016a1d235d1e76 8.1.0542
+7c1a634c327c7a6cd2e1d22388954d5d 8.1.0543
+fa2edea6e29ec677b2ff406e47916776 8.1.0544
+d5691c539206b45b8374e027a7ca4bc3 8.1.0545
+cf2a337c997b81bd54618c695d26d94d 8.1.0546
+d62088d742d17a42528300d747608b45 8.1.0547
+a242cbe51e944182471c6399ceec154c 8.1.0548
+d759ed921c1b6182acfa413b2fbd6d0b 8.1.0549
+fc03022fbd9696c61fc72ea60d92a206 8.1.0550
+692875880d2a460b16a6b1df43d1c218 8.1.0551
+2972edcea58d3443293959c325df25a9 8.1.0552
+9e2433db5330166281eca65da1557659 8.1.0553
+325c0df659f4a76a202b36e8a4a50613 8.1.0554
+d8aff29cc74ee3d5a7ed6a5dae433c11 8.1.0555
+028c2bd47e531f1a025747b980bbc22c 8.1.0556
+867f74c35b0f3feada409259378a4a18 8.1.0557
+c1c18ccfd6ba28f49b597714a092239c 8.1.0558
+b2169a4d6e147664a41820d90182c950 8.1.0559
+ecf93e5b29d956643a630ff65a40e7ac 8.1.0560
+3bbd981f1c14fc3e78acf04f8a25e013 8.1.0561
+3688e5c16d8ebcdbe4e85b6e303d8122 8.1.0562
+65b36f4db71180a0349cc314f4e735c0 8.1.0563
+6b7a99e122a00c57775280b02988890a 8.1.0564
+7db49dc0f36d5198d1b869793fbdcacc 8.1.0565
+0354b2e45a411164cd6f7d9a7f7f1fd2 8.1.0566
+190ecc92e29fe42f6d2ba2adfad52bdc 8.1.0567
+edfa723c364f3a5aa452fb0a5676be81 8.1.0568
+29365b8ff4417fc38d29ed8a5575c244 8.1.0569
+34e8904ca6892670db1bf2a6f960928e 8.1.0570
+42c4777d45d11cd9855581d3fdd1822a 8.1.0571
+c8acd3a2327f0a45d14ad3ede464f0e1 8.1.0572
+5cdbab35b78bb826a3832abb69692f89 8.1.0573
+5dfd5cfeca72b7f02f99a018db49199f 8.1.0574
+54d32aa7113a746e42dc5325a4fb0ae5 8.1.0575
+4fc173e744a1f8d456f6b2f8a6568158 8.1.0576
+abee30f00bade6e4bb000d22328df78e 8.1.0577
+900bbbf45a07d6729cc0f070468b0927 8.1.0578
+d6936ada0085f5656f4a9127e1de2c05 8.1.0579
+5dcd4d4fa2652b479777ed31e1d4895f 8.1.0580
+72fcbebadb661e22834f6651a97251fe 8.1.0581
+cd8c4fd73a9a64fd1de6d468a9558470 8.1.0582
+0998d4f48524179c3f619ff10d978487 8.1.0583
+f103e82ccfbba74f6b8c658ed770e356 8.1.0584
+ae3eefd01b40d1ebcb1c7cc36051c678 8.1.0585
+b52493dc33ba64242d9de650cf233ed6 8.1.0586
+35e88e0ac1bd711f2293b75637d09dc3 8.1.0587
+794526f59858a7973356f34e8b136fd2 8.1.0588
+03c52af142a1ce095d46620811685c15 8.1.0589
+aa3e45e85c148d95ea1afdc947ac6484 8.1.0590
+608ecc6c67c191ecf364f9e9829c5e49 8.1.0591
+3a382b6299f0da5c703f9a24be6689e0 8.1.0592
+06f39a81a7e25ef3583aa258e02a09f5 8.1.0593
+1f52529039e0b4ead16e7e9feaf54c46 8.1.0594
+49cd8b11e81b09fa6366be61a58e64d9 8.1.0595
+24bd4be158c0d4f8af219e67b3f58bc5 8.1.0596
+b94fbfb68792ab8c35f219b2a564d049 8.1.0597
+3be1d22796a858e966b2428846b0826e 8.1.0598
+4dc20596031efe15d994a9290e2da2ff 8.1.0599
+c3955528435c24066fada2fe6eac50bf 8.1.0600
+751ad081b9880ec37feee149a2833adf 8.1.0601
+6643bc6696e32021aac92f48b309a2f9 8.1.0602
+50895d316f9b6a20eb31cee123b2d3cf 8.1.0603
+d39b0d170bf65de2bdbf407bc5dc2b32 8.1.0604
+4948e70b19eb9a61cae515b2e831b451 8.1.0605
+bdfa8500ec957fa43273056d2b26b155 8.1.0606
+aca29dbdb3e7ead9b15f6aa0d4911362 8.1.0607
+3b08f55d5dfd32d71ce1c8df8a04f449 8.1.0608
+e214214c5be9dfd71e277ea49f53e93e 8.1.0609
+df33b76348bf02cca576473123d6cc36 8.1.0610
+42f3f3c16f53c400c5d5801d92ec38a1 8.1.0611
+700731aa1ab47750b0cc75c65ff100c4 8.1.0612
+d30e35273234b75419a6c89cb45a1fee 8.1.0613
+31dbf1be135444f38f81beebd92caa4f 8.1.0614
+59cf740b6db2f3772b8f1ef520653bbe 8.1.0615
+ee2cd37b6544416b00a731a640a27e06 8.1.0616
+719048b8215ade251159d8eb3c89daa3 8.1.0617
+2ea67108cbaea515ffb1e96a560735b3 8.1.0618
+8c218b3244bc218fd3519f50258042c1 8.1.0619
+dbc363feb39e516e5c1264b5eea0033f 8.1.0620
+3c453c10ac9c1827a1ec127d30e1fefd 8.1.0621
+ec7a1d8b84a442181fad984c990028c5 8.1.0622
+f86ac1bc6cf2acaecd1166330050ea11 8.1.0623
+0982ff835eab06c027adf772b714aa21 8.1.0624
+19d5de68b20132aeb2b837e1f483801b 8.1.0625
+1c3234a48776ae9e415af4fb50b16093 8.1.0626
+7b96b4b6ca14e20670b32d47539a5470 8.1.0627
+9a1af3ab85f28bad8e53bccdf6ea41ed 8.1.0628
+4fe22b4f7629eab3b8b5c7f915486f3f 8.1.0629
+0b4a360d2b457c8fceb5900b3a471f3d 8.1.0630
+2c796700c15286ff1a656b41140f7664 8.1.0631
+8b04bc18423bbad3ae6f46efa32f1f0b 8.1.0632
+273a2dcaa61400856d0c2f5c7d2676fc 8.1.0633
+2d1322289d1890f54f0aa7edd74d86c6 8.1.0634
+4b70a26e910ca346c238b4002f98e108 8.1.0635
+8e77ea9bec64cd3be68a47c9afd71985 8.1.0636
+a4ffb0ec0935854084d40b39573f28ec 8.1.0637
+ffbc447db1f80519caf4ed1ff6ecea0c 8.1.0638
+694768fd245b0251e15880f56c6f3d6e 8.1.0639
+a7d7c38a72b87f972f89122262b9fa63 8.1.0640
+72b9331beb7dca3a073ce59d046e5f90 8.1.0641
+617182307548109362edabb7934ea942 8.1.0642
+a8e7fa6e10fccfde85af406f9b4069e2 8.1.0643
+a66a54d3837ce50f6027eae42675250f 8.1.0644
+378f2f8a9562dcad6d8b0cb892881b94 8.1.0645
+1e87c58604312710c5bfc7e1d1684ef1 8.1.0646
+3528019cad968ca65e6ad8225a8e8046 8.1.0647
+218408684571c59bacdc15c2862baf3d 8.1.0648
+d9914538076683f1385a9f54b983381f 8.1.0649
+76cb212b8d386fd586a0670dc5eb0cfd 8.1.0650
+5c6aa2f2917c4577f78c749d6efa2414 8.1.0651
+1e75d3dc96342bcaaac940f605200184 8.1.0652
+df938fbd99e4d86b50844edf051d48e0 8.1.0653
+dfe03b35e9a9aa9e4e6a7044c5e4d04e 8.1.0654
+b1347b8fc879c2be670c1f31fb7aa570 8.1.0655
+b2bae83e4c2f816c916935ee79ed10cc 8.1.0656
+1c06cd49ea2922a2de1932538fd7b555 8.1.0657
+35724c34428b99717cf7ffeff1cc2db7 8.1.0658
+bd820376d88fea761079b44d8005f57e 8.1.0659
+c89c4a0f88b8c7e2f698f3807bd9ac66 8.1.0660
+94b7f8dbc55c847c440b03739089040a 8.1.0661
+2e51f9c22d22b0cadcbe9bff47b43921 8.1.0662
+b19772e2ebbaac7a7159837c49a32fe6 8.1.0663
+ff1a78fb5a3d143eaddabd1d3e5cb7ff 8.1.0664
+25d8edc0c707e7664860fc0abb4d3959 8.1.0665
+7cf3d789f8328e813a8b5c6c3980cf3b 8.1.0666
+72203a014047743c8cc9205977e0c943 8.1.0667
+2b4cfb5b80374b0d4944c12f6888d18b 8.1.0668
+103f9bd81dfb43da3d30a10473b84e67 8.1.0669
+520b83efac4791a7b93d1f428c9e0e1f 8.1.0670
+bc7135e0320b42501d7ba0651ac9b0cf 8.1.0671
+165d974c491a3aab82c618898cd045cc 8.1.0672
+b95b03644d2ecf8e5ecb47e4ed2005d8 8.1.0673
+47928c6cfdf6a469df4d77bb7289faaf 8.1.0674
+5176b43bda2e248a3ec3d15dbf989d88 8.1.0675
+0236f0a201bb95ca50e452f9bf93246a 8.1.0676
+344604ae2b85698137a168b7cf59d8bc 8.1.0677
+eb662fc02e0b5cc3740236090107a772 8.1.0678
+2775a592a0c68d8e31dbc9ab50e850e4 8.1.0679
+0cd7c5beb3280333682ebd783bcb7017 8.1.0680
+c1bd538694aef8ab286995fcc440b8c5 8.1.0681
+67dd37a94c5ad5a7f68d5295503e2eff 8.1.0682
+173f7260a6b02fb9af1e74e9959c486a 8.1.0683
+71a85b7cf890a9f93d8b171ae134b0ef 8.1.0684
+49a1067c59d62477b5c62fc83e00b50e 8.1.0685
+dda74c9b8294c209a87e70b616623d44 8.1.0686
+63da6d46769009d0f1af3511c681d55e 8.1.0687
+7a5edb6fc9608aee74cc480d1c15f153 8.1.0688
+3fe4dcec48bd6add98fb717b43393edd 8.1.0689
+2cb6252570f756cc1046492dc127d408 8.1.0690
+341bc59d5b708b4335457ec0853e7690 8.1.0691
+1cb9169d79fbfe382c61fd9d929e3c7b 8.1.0692
+358e9ac186b2cbc05b20c8cc31606972 8.1.0693
+433c3209407b139d0ab19554c16cb059 8.1.0694
+78716669e3823ff96801c8fa13164491 8.1.0695
+96a4f47d154790db5a4f3c5b4bee746b 8.1.0696
+665f1c11add158d69861a9aa2fb1d3e3 8.1.0697
+d02ed3a80dddda47ed1199a31d6c1e75 8.1.0698
+e951241dc733a3a8bca41b16e46ab665 8.1.0699
+e8914ff0a5b44246b80165e878913a49 8.1.0700
+fb43a94e9cb7b505da27f84d2d0c9242 8.1.0701
+a6f1702179d6d6f8a6695aa17b2f7ee0 8.1.0702
+2ef961779e6891de8b4d8adc89469cd6 8.1.0703
+8aaae8e0f0794d376529291bb12a2b36 8.1.0704
+9514e227a61296a1739759d508d43c38 8.1.0705
+565b10f74e0ce47ff9b5aef79e804221 8.1.0706
+9ae66276619a3912ec4e6266ea7d895a 8.1.0707
+b0824e51551c59be197fa9d52a289c27 8.1.0708
+06185a586914c9723d68781eacf6abae 8.1.0709
+afee6e31bd44b12cd25f1c9ff5cd629b 8.1.0710
+f9fd9c02cb1135bd15b096e9e2fb9a51 8.1.0711
+8f160a66dd8465ae0c52b5e343dd8a0e 8.1.0712
+8ede5936524be13eadb1c6da8f01a101 8.1.0713
+355e35e6d2b95fbc1d3559d45c64ce8d 8.1.0714
+151107e63e6bc1ef627a6b826fbe9a0b 8.1.0715
+ce922f700d34215f886107ba3cec7cde 8.1.0716
+6461858e4b104dd183d6246cf091292a 8.1.0717
+586a2d4e514efea93a731a0402bd4b63 8.1.0718
+6a562a72dd600ca719b47faf2b0c0986 8.1.0719
+e61e19fe0c4e0450f55c8d06ea39c1e8 8.1.0720
+8fdc0c1a7e35207477795e525f395989 8.1.0721
+25141928926451d46209bac830d43998 8.1.0722
+a8b77e1ef94e5203d73fea852ffb0cf2 8.1.0723
+7164ea0327dcd10e58e61a272e0f3b9c 8.1.0724
+899592e905099a3eb633a6eb62e74e6d 8.1.0725
+f0198afc36233db8bfda0577b6fff243 8.1.0726
+b23e57df526aa33128c84a2e7b7a769a 8.1.0727
+6476123b9821736a842d6a6550745c7a 8.1.0728
+15acd0cf553a0923eeae01607325461f 8.1.0729
+818d6f26bb98dfc59f3f2294f5546a68 8.1.0730
+958d8c3601810e2bbec33750670805a1 8.1.0731
+4dd8fb1415aa9a8c319402a694f10039 8.1.0732
+f332f4a6b48d58b14c8e32c3f31c9bd8 8.1.0733
+5082cacda370d578c581e3798fbcd7a7 8.1.0734
+f6ca543cb230ebb94b4605f0f12c22d2 8.1.0735
+1a893ea6ff2962e93a1b79c62a4531ee 8.1.0736
+10626d89372661d7b6321bfbcb7c5267 8.1.0737
+f1f0d7866cef418fefaaa98e41467bae 8.1.0738
+7d7409257b3703524d555fa8ae57abb4 8.1.0739
+8ee281b15875bd119a6c958f05d2f44b 8.1.0740
+c1c8e31944c777554d1ea19ad6f86e2c 8.1.0741
+78a322c15ef0d61b0e00c2f12e3d8dcf 8.1.0742
+b1f47e8668d9cbf547ff0926267dd349 8.1.0743
+891d3ed6fa79d32d5da05e2dbdaf6a48 8.1.0744
+519da687d7211c3b9528427624cde353 8.1.0745
+8a8064b0cc451c71218abe0a3ed18ac5 8.1.0746
+a62a489337f951145fe1725d7ef213b2 8.1.0747
+daeda84010fef2d2ab073a71d8a9f4ea 8.1.0748
+4b9ef88b3a89638bf6d961e1613771d1 8.1.0749
+29a55c0550b6029f5058ff74f6223bf5 8.1.0750
+b432df2faa2a024f8e12b8eddf1cc97d 8.1.0751
+40271ee39b2ad5f4908aad3fbf26ec8c 8.1.0752
+69da60a98e5e76b7e817cdb2df88e4e3 8.1.0753
+64c4332756be4bfe45d0ee6686f8c0a8 8.1.0754
+8f832fbefe0f2665a264d7403158ef8c 8.1.0755
+734c96bd8e35970144782b00615109da 8.1.0756
+91b9d81fb6311fb317ff30d5405a6b61 8.1.0757
+4f5f845d9db74b17d44385f4aacef3cd 8.1.0758
+69d25b007a0c46d5a842e8fad4a3f3ce 8.1.0759
+6715123d828468c94b501bceb7d9a42c 8.1.0760
+1194839956d561ba5be1e221fbeead4f 8.1.0761
+5847c01282ec67a80ca2ca8a07e758a2 8.1.0762
+e937409b4cee2a758feff57493f105cf 8.1.0763
+aee53bd6c81b6c5fbaf306a4b34c0a0d 8.1.0764
+36e843c2bd30a4bcb5918528f5823397 8.1.0765
+eb175e7755815331114eb8a47d5ef2d9 8.1.0766
+3c6c75c7187d2b5f816c86961a75d015 8.1.0767
+4264d7f0488472ddc861f252f6575e78 8.1.0768
+c2e38cf8b2f4bea591271f6b9c25a90d 8.1.0769
+5cd7ad4143192022f9f390c8f32a11df 8.1.0770
+5a69841be68f38cf8f81684d710c113d 8.1.0771
+f5e324d517008b1731285b2925a08212 8.1.0772
+21429c64bdd3a3cfc8cc5c1ea8b2ae8a 8.1.0773
+8cedf8ac3a07e0b45925e9dcc8cce87c 8.1.0774
+1bc7c7f4ea2baf43c73af30441a4cc63 8.1.0775
+7c69a37c96a52503b260175185ed36e0 8.1.0776
+4b1da4a1ed1b1e95af15f9faf38cb7df 8.1.0777
+c154fbb79ceb2f6276460aee612d4aa5 8.1.0778
+51370dbc4e7bbd5fcd2043f973f4735d 8.1.0779
+acd77155a4df8ece8eafca1fde83adaa 8.1.0780
+69be1742901694eff12ecb34ca6aec39 8.1.0781
+2119d47c7fd7b9a06f8b146514b99fce 8.1.0782
+44fc97a4612acb379923260d7a8afac7 8.1.0783
+ea9426ca6dd9aab0d4972d748c129b2d 8.1.0784
+3547d3a341ad20f373229c6ef0a4109b 8.1.0785
+e6002e112a9368c81e13f73db1940158 8.1.0786
+a8b573670f8c27d3fb4b1bf1e8b01be6 8.1.0787
+d0c989b00dbee5e8c2c6c54483b3e78e 8.1.0788
+71999b98314bf1e65ea7a4ffab3c6a58 8.1.0789
+1c0014e10188a0051508f1aa7859a406 8.1.0790
+4f528703c16bf3d89642209885e8d1ad 8.1.0791
+29fef91a5a4f504f43897d72658a819b 8.1.0792
+5c970092e97be21686617c46e4a546c5 8.1.0793
+bc24972d506b82953e5adac41f56dc8f 8.1.0794
+76a37879e4d689fb1ba37ae34b451202 8.1.0795
+c92ffebece8586fc05b2cd245412b17b 8.1.0796
+40f17307f863d5072fcdeae4dcf2be49 8.1.0797
+5221e952780c42d20e8eb96007617f35 8.1.0798
+28a54a476ffb537bd0e5fb1e6dd13348 8.1.0799
+3b6ff08013f7885bf5c0344184f0fdef 8.1.0800
+24573a50252bc932ac8d22fc884e61dd 8.1.0801
+3afd50e63c73206dfbdefb024e5b7965 8.1.0802
+f73305113cf2be9b1b9f2abd4ef1bb66 8.1.0803
+3fb11499f051c2975fe38dbe5b80fc91 8.1.0804
+e4f4c57c72e10338e28b2dd99c17f8c7 8.1.0805
+60c26d324d6037b409a691f15e1a3b2a 8.1.0806
+ad886a714965c7f0dd9b765959fd7643 8.1.0807
+2c1aa2ec52ee506fd4161e31b889d116 8.1.0808
+afb2894b53a18eeb843fed26f44c765e 8.1.0809
+f2ab5b71c0c7ad04d4da2d6e6f02a235 8.1.0810
+ea3bb07c3d7f1d2e00711e8e1f04e33d 8.1.0811
+8503c3768c89f63f2f31ec8522686329 8.1.0812
+6647d100793090a99785455f00ecee18 8.1.0813
+6da57906ddc9ddbf80b079523ba6bbde 8.1.0814
+9d72df39326ad57c44ee6d43387947d9 8.1.0815
+613eb0bf06a1b799626e28c2b6ae758c 8.1.0816
+535d2d7399f4111f5a047159840e08a7 8.1.0817
+fe209010e36c033710449e25076236b6 8.1.0818
+568a24fd9287893931d06f9918f07023 8.1.0819
+06f35a8e6e3256b555bb374fbc79d531 8.1.0820
+db09603594d0563bb43568d06d1d6ec9 8.1.0821
+03b42c6125454250bf0adebc81973618 8.1.0822
+1e373d7421d5a9a063e018a8d3c31024 8.1.0823
+04b4b9a55afb3dfb2c2eb00864f1b771 8.1.0824
+917dc6dfe811ca9a3654348e1fcf9562 8.1.0825
+28188554c11e06a0c8038a1c5f9b7fe4 8.1.0826
+b9b763c0da7ebc075f53cb8bd31b8769 8.1.0827
+a582c23c2df88111cb1be98bbaa57dc9 8.1.0828
+d76b2dae6ffafa06cd76ed8285120c2b 8.1.0829
+e82b9802fa84aa149274d7e8aa6b1b95 8.1.0830
+0137413e111c722640bae2e50f327d8d 8.1.0831
+6ffdfd954e580e309e33199dffc9306a 8.1.0832
+e24ee91b1c9555d988bd96d3aec653ef 8.1.0833
+0a58e8ce7457cc897e14110fadef699e 8.1.0834
+e5149bf14583776ce01adc0aac0bb47d 8.1.0835
+5373251b3f144c177ec1fd841ba64721 8.1.0836
+549003aaeea0a6451fb4b150be2836fb 8.1.0837
+1df9d9b2191f21a7f7c3c051c21185e6 8.1.0838
+ba811dc31503ab60d0b13d671767c640 8.1.0839
+93a998252f11a812c75fe1821573f0f4 8.1.0840
+b3db0e274e205eb4dee50b1eed56b4b7 8.1.0841
+5f26a9bee5daab85a13bd7bb79dd30ee 8.1.0842
+529fc8f7e55d7156a59c5d28d14bc91a 8.1.0843
+5775407b2776b8f61cde42eb1cf9fef9 8.1.0844
+12e5df61ffd615ce88cf6fdc8cf537b9 8.1.0845
+e07a8e0cea1d8a8476b4705fd005733c 8.1.0846
+7f41c9b0ae5bc2ff2e82ebb632292780 8.1.0847
+b9cdfa4647ddcbb1f7f4a0c3e3f325e9 8.1.0848
+44637d05c9ca1195555defbf7a930b33 8.1.0849
+ff6456ec07d5d9341e12cb9d5f3ababe 8.1.0850
+e15020178b1439ac3be071252283aa39 8.1.0851
+e038a70ee4f8f138c64b6875207f6f18 8.1.0852
+75504a93171c055b8b930936646096a2 8.1.0853
+be05784a2d8262d29a45c54af83f2789 8.1.0854
+ae90800586b05249367aca0b827ea4fc 8.1.0855
+c27c1a3d5bc9196d7fa399e1a521bddf 8.1.0856
+91cbaf6db1a2a017f7ff6fdefea148d2 8.1.0857
+87bffb04e86b7c58758aee697ca63122 8.1.0858
+b4c1e906d9ce500687a08a0fc3e0f607 8.1.0859
+bf8c2ebe938a63c93af835cec371df54 8.1.0860
+a43512030e82082123d71ba92862ec65 8.1.0861
+d5bfc920372cd88d04288cdfd3c8f89b 8.1.0862
+3804c33edc647c29815a2ae3c3640e5a 8.1.0863
+f468569d41b973832ab4e7c3e394f9c6 8.1.0864
+a9d9c56c0a5f1971e8f097385ca00e3c 8.1.0865
+9880ea5b80a6e1c3f913b43acf72cd6f 8.1.0866
+98da5a813b8c38aa78263e12de4abbfb 8.1.0867
+51da6803c3e7d4573b2645feac64ed52 8.1.0868
+c3badf48efaab8154879c25630893581 8.1.0869
+474ff85667a2616e23142dd20dac442f 8.1.0870
+4f89b3b5e3c2ecb304657251f68f6f91 8.1.0871
+361c1c71ed804dd57cb7c43ba9c283dc 8.1.0872
+87b45581b97c4e7c3e6fc57f43a3c33b 8.1.0873
+be9296915c9ce93c36697fc178f1ebe1 8.1.0874
+d24dd80de8c85b55008a6e189f7ae6c6 8.1.0875
+8cdd8873112ced4005c76d3751e26a0e 8.1.0876
+5e77259a4f0a5d2fd6458faffdc9f1cd 8.1.0877
+ea9ba2b60d07707dc3b9b997cc6c5585 8.1.0878
+094a89fd1fdf44cad0e964fb6c42dd60 8.1.0879
+73b9dc348199a4ff871676a39ffa81f9 8.1.0880
+b5b093ce0db286eec8cc4714961d5152 8.1.0881
+3cf0a83b02f01ffdac83cfdaa7461d25 8.1.0882
+625971e0889dac19448ec2dab01e2909 8.1.0883
+8b0661c89f9c83854f30848299ffe930 8.1.0884
+d06f9b0cfad79d4f645ffe14103e7de8 8.1.0885
+eafe2b63ce4e9022013a991f179b7ad0 8.1.0886
+d217dcb0dc8ad51710b05f400c46f912 8.1.0887
+becb8e0964093245362f7c5d4f180e88 8.1.0888
+5d2b7500f7d5370a1cc792f62dfba2ea 8.1.0889
+85e96c34ad788b07ef04159d812e3bea 8.1.0890
+82677a3d5f4d8ad4f132533843ed66f4 8.1.0891
+774cdc97d33946a6945ffc3e6df4280d 8.1.0892
+2b33ae3c4ac93ebc7e179e09386b57aa 8.1.0893
+29a15d449ba62252f120f96682c3a22e 8.1.0894
+dea6ae90eec614b06ae6456f2edde038 8.1.0895
+6e996a6590b2b613ae4be09989549be6 8.1.0896
+17f00dc1839a3e1fbac3f616a26bc7ad 8.1.0897
+4cd84ea6b506d3961b10c69a5f2fd6bf 8.1.0898
+1ec63ff42422eca37f59e4d32d394ef5 8.1.0899
+1d6c85bdeb28864b0ef707e8fc5ab554 8.1.0900
+49b07b8ed5277b5ac7e17b065a630785 8.1.0901
+0202542a23de8979f02d2c5692e36fb5 8.1.0902
+41ebe8d1fbb909303aa9a01293c30806 8.1.0903
+aac99325b9933f7a3a637c5ba59a5cea 8.1.0904
+22c92dc1a6aeffc8974ff9fa282a8b5e 8.1.0905
+43c56034ffcccb34642fdd874fa20525 8.1.0906
+14292872bbfd5a4b9c38928f14d82564 8.1.0907
+bc89f14eed17849edef4e1d718577bf8 8.1.0908
+7e19db5035351b9de156a0d8b6a7ed31 8.1.0909
+f31c1a5d664b84b7d1ab8fb32d1a27e8 8.1.0910
+6a4de60dea7de43c6c21dfe8aca2f19b 8.1.0911
+cdb63b60243f2593b1b63123b47c1247 8.1.0912
+c015795d1599e82c1c5f3ce2009fe2a9 8.1.0913
+fbeeae05bbf097c2d9d7a3f365cde7b9 8.1.0914
+4438bb3ef760357477eb4c1c886ab0a3 8.1.0915
+4681d533aa7468a68173b80ffd3ba855 8.1.0916
+35e246c8d99792270e55211b94986225 8.1.0917
+8cdf89caed1706aa5520daeec32ab0dc 8.1.0918
+974f13bc9992b41bdd825c908d88761a 8.1.0919
+f9030c1064c2d647fdc39e0fd4d98173 8.1.0920
+b9cc9fe417bfd5878fb2fd7655fa7748 8.1.0921
+847d4905642730b15a22b1364c05f2a6 8.1.0922
+4bbeff83af2b91159c00aae92ec4e85c 8.1.0923
+309f25addcc8174d98cf6c0be10939f0 8.1.0924
+ef5ca8bb221fcd786f48c1a5acfb8575 8.1.0925
+72d98950fbd254c9a163033d313bf6a2 8.1.0926
+7fb4cc8f26ab307d8c87d9bdc8c53715 8.1.0927
+b41fd88f8d1dceff90dc9fdbf037dd21 8.1.0928
+053b741e4c60a1c65be6cf9dcaddb93a 8.1.0929
+975becf6fe79f3200039046c3ad7b1bd 8.1.0930
+76639afd9b83f382e62b30d0af73e288 8.1.0931
+4aa44bb0b204a80541f27cef61d879ee 8.1.0932
+72a47729c377398dfffd33fc19d5a8d1 8.1.0933
+06b0c3c5da68adda4102a8797a61ca9f 8.1.0934
+afc629e46fa95744bae678384e67fc25 8.1.0935
+90bbe217c183fd549f28722d9c120a18 8.1.0936
+8d308ccca904aa612a2659cac1ffecb0 8.1.0937
+656d64a05e2d1ae03a059be26b5a4a11 8.1.0938
+d66273f2f4c44ab8e2b5cff726c47a05 8.1.0939
+25af2fa8153712e3a23348102c080312 8.1.0940
+409f5941833a8a34084022328687bad4 8.1.0941
+a1c57130e40df230878345030cbed500 8.1.0942
+75623c6e63f19d3c27fb3156c74a66fc 8.1.0943
+a92b7feec180c168da6b2e202402dda8 8.1.0944
+01c7f22856729cd34ec9da6c64a62ec5 8.1.0945
+972e12f4ac77a056d5a75f2c8173bb26 8.1.0946
+2b11b6245418e0dc4611e71ff08019d5 8.1.0947
+e1661977d903e76fef8b560e8a61d8f0 8.1.0948
+290bb88574572bcc814dc77e173b356b 8.1.0949
+ae36a9c29649cb95972612f7caa038ea 8.1.0950
+a0b3174616a8f1d0ef0ae20ba73d0290 8.1.0951
+f7a11f09f46c7b8a3833adb30e244db3 8.1.0952
+6b3ce9d8ef17c01167def33f1fe24136 8.1.0953
+55f4ad527bedcbec31130c59ba269141 8.1.0954
+419bc77a3f6e0c4091b9e1d0413206f9 8.1.0955
+085d5d4ac2dc6d1643d32eaa229c5594 8.1.0956
+3bf62c731f489ffd87885fe690e09283 8.1.0957
+80eb78c5bb1dd3825c13c0eb9ecc23d1 8.1.0958
+0703d39cc11f2b64c5a8284bd410a6cc 8.1.0959
+3542254c6420694a6803ac1b553281ec 8.1.0960
+454200f2761e5f8af452802ac25b6e3a 8.1.0961
+54a608b364cc8a7a0cf94d80b3229c2e 8.1.0962
+93e0e56f5ec920421d47e08f29ad8bb5 8.1.0963
+6b4e136281eacba4545e96b3ec0d7ccb 8.1.0964
+59aacb24c2c53d5daba1617a9613a38c 8.1.0965
+17a181a05f5848fcc943f7cb2c6151ef 8.1.0966
+87b79776279a51278151c0ebc7dc3cbb 8.1.0967
+996b93f4f2fc419ab8575cadf33728d6 8.1.0968
+2a45e5a57cc9624f33ccdac8c74d8db2 8.1.0969
+b7762bd3ed8f155aaa17cecaf4305b26 8.1.0970
+6f6fdde297ca401d8521a721b6295a83 8.1.0971
+d8cd315a23c1b775f0ba5aaa5d4998a3 8.1.0972
+d91707c884d2fedc958bfae099a57781 8.1.0973
+dd1c16374bc031d459f7d8e643caecb5 8.1.0974
+491cd7df81115ea3abca76dd97443883 8.1.0975
+afcb05e1082370607a45b349f25f4b85 8.1.0976
+7b13b5dfd8ecd5182d644e7ef09b5916 8.1.0977
+a8363d826b6d7719df20bb8d3f00430b 8.1.0978
+7abb0b066f9f53ff3cbce9242b10040a 8.1.0979
+5a9711923ebb9d09a5abd3c8c1e01ccd 8.1.0980
+a9a8aa728f11fa872055704389e6d115 8.1.0981
+cbca940364bf64e65d291159c6d1bd22 8.1.0982
+2528d72bdfbf8ab95b74db64121462dd 8.1.0983
+c140af3ba5d353452b24f9c520b5487f 8.1.0984
+6e86b611952ca4b21e741ac0e7db3c80 8.1.0985
+f74f911215ea3a4bd65ce36a35f8244a 8.1.0986
+26740983f340127f25e63186b4238c8f 8.1.0987
+625abadc6e352248439d6813ddcb0eb1 8.1.0988
+22be0dfbb312c19c80fc625bcc78c8f9 8.1.0989
+cf8900170be84bdc1e00b949fe7040d2 8.1.0990
+2c8d110c0131e29b0a8ca3d1ac8259a8 8.1.0991
+d5b338fd4148869bb313b84ea24d5a58 8.1.0992
+5e12926a3c7262ec917ece83ec423bca 8.1.0993
+0db145aeb705d649469d3a3389ea1ec0 8.1.0994
+c78d55e106699799368dd58dc2e528b8 8.1.0995
+26bfd6bc95f21e11c6ce22615530b14b 8.1.0996
+a128debc4bd286c3dc7e0a01eb961ce3 8.1.0997
+227a9e39edea97f0a03af6c0db424668 8.1.0998
+807c529732773a0ba810131b1d9f599b 8.1.0999
+a461f52649db2cf5c4d22940b18f1705 8.1.1000
+46ced8df61fd0370d96963f208ae3d6f 8.1.1001
+1b4235b6c1a25093bce2c62ca93a6fc8 8.1.1002
+f3ec8c97858a5706c4f5ca5b5ba98ee8 8.1.1003
+cc923c486664872d06d7dede9d27ac27 8.1.1004
+ef6dbc7dc8234088149e31db76623c9f 8.1.1005
+3500f956c5db88eac5af6726cbce9478 8.1.1006
+6941bbec1b905b88da69579212fd1881 8.1.1007
+f15d6981e0d2d71a6d8a0ca7a35065a0 8.1.1008
+dc2dc02f70243f1c9d8ac86f50345f3b 8.1.1009
+1c9b487ae5756049d63aec773f9d16aa 8.1.1010
+7f7147b184b477268801005fcafa63d3 8.1.1011
+63e2479c9eb0ee82639f0f5b43ed452d 8.1.1012
+32b9542ad27f74dfdbe42d2fe04035f4 8.1.1013
+9660f8bb947c5b4e94b522610bf30736 8.1.1014
+d62a25346f6b60b0533f02f9732b3770 8.1.1015
+9c2e7c5d5c9d9db61c6a61dac48375cd 8.1.1016
+d64f46e095cf12638d9218f542c0a065 8.1.1017
+e0f254fcc54347b5fed29ad3a0b2e760 8.1.1018
+df7b1af5109be4f620ef38c444429b7b 8.1.1019
+2666e304293dcf6601890af29632cbfc 8.1.1020
+ff361ba24d78c5bec48ae565a440ab06 8.1.1021
+ef039897e19c4e956c25de551450e0c1 8.1.1022
+50a4058be7f62346c9da3a654dc94a06 8.1.1023
+e184aa3869040ea2aa52aec8a1530ac1 8.1.1024
+915cd1c0893346bc87889db6bc5da73a 8.1.1025
+bfcf75477f8c4ec10adb3d7b34c1561a 8.1.1026
+b95a9d84ac0ac125fb01517995626639 8.1.1027
+15b0be2061fdf73c5ab8bdbdbc638cf2 8.1.1028
+1155f3937ed0349041210f38cccaf8ee 8.1.1029
+7616e8b6b31e5891ed44a1b9c43d0733 8.1.1030
+d50a3c60e04c67a45a041cdf333d44d6 8.1.1031
+ba9f02626bceaf92f2874562d624e975 8.1.1032
+ce23656899192e6f48c3931d582da7e2 8.1.1033
+02bb96ed810e15a94fcfe6ddc6026069 8.1.1034
+04c0485e3702af07e7d5122d013a80c8 8.1.1035
+8538e2ac539b5b7a146789cd7b78c7ee 8.1.1036
+a08743d4586ad91706951c3210231597 8.1.1037
+c1e9f167fb7bcbfb0a9e0e5e1e75a6a9 8.1.1038
+64a647d1373f47ebf3aaac8d3f382575 8.1.1039
+d91abda31ac202a4250e55cc178bec6e 8.1.1040
+e98d73709b4dca910995063b285b54f9 8.1.1041
+d2b8f999a7628b8b8a31db60ca27e114 8.1.1042
+c7d2ef4dffbac27a821896c0678fd31e 8.1.1043
+cfd8ee3de679ca2e4cfe017d83daf6aa 8.1.1044
+0095c43bf33941473926ebe619977275 8.1.1045
+81f86f26ac7663573df7e13df44988be 8.1.1046
+160b9f909321cd76c5a96ca6175c58a6 8.1.1047
+32a52f1f677bea4c54ad44d1716f09e1 8.1.1048
+420a4c9227b7f499870b9f83f4606dcd 8.1.1049
+29803df95e3923819629c79caafb69e0 8.1.1050
+7c62571939a35b4ad0c62d19530c2381 8.1.1051
+dcee8dc19e0cf6fdf9281badb4602c82 8.1.1052
+52f197fdc3f8374aadabad9596451255 8.1.1053
+d1b80d0fcfb163b22b7b2e4df362bd76 8.1.1054
+86521f0d9904caccea06aad937c0e12e 8.1.1055
+b603224f14df0aff1ba874f5f5b8dc1f 8.1.1056
+a1b532a8c7dec9942112411b366f86be 8.1.1057
+cd821ec2b4e79d4031cc6d279bf7dce3 8.1.1058
+fe6e2fc70fb6c0d76b01ebc581b325c7 8.1.1059
+7f3d8dfce08e71f50ebe019e459086fb 8.1.1060
+7c38a3ffef309c8459c804d653b8e156 8.1.1061
+8023abc3018fc2bb780db3fbbf9c6264 8.1.1062
+ef80cbd5ab6a8cdee552e5a62f67f0a4 8.1.1063
+36ec3246af062bdfbf8193e08814ae34 8.1.1064
+ac33c082b24f1de69c06b41632f217f5 8.1.1065
+c4769e1c0c1d8265a03c0a9b130b29bc 8.1.1066
+45820a8b34d37305650a366313a62c44 8.1.1067
+ef8f0143b69cb8582ea19591b0a5877d 8.1.1068
+82177f0befbdfd34f9d167b0e9199ab8 8.1.1069
+ce9cad10f8b2b0e9868d5369b919205a 8.1.1070
+2d92bb2a5d1d58c320b7988c62c65ef6 8.1.1071
+c8d5b5cf88a2a1fd4801ddcb4205f58c 8.1.1072
+0eee7b0976d7037489c3b3dfc891a8f5 8.1.1073
+e35417ad2e70e6190e25d7705694f56d 8.1.1074
+048a8910c26c2fa3ba980b270b91c4e6 8.1.1075
+bbc89395931a00f4905488e9681b7fbb 8.1.1076
+e6b29f9eaf71ef41d2dd788a1fe2c93a 8.1.1077
+fd8e1c1d942a50cb8a51ff250751bc39 8.1.1078
+7c03b860b15e8a97133745063054b9a3 8.1.1079
+55a4b6023a9e76f1c71faa30965a8a2d 8.1.1080
+cafb2b7f6ebb127cd01ad83fb4592d8b 8.1.1081
+6a2bdf760fa7fa46f9518b0777c37a28 8.1.1082
+d13149a25a3a06fcaf0eebdf72e8b9a8 8.1.1083
+c20ae905693fe3714f028c4f2568a372 8.1.1084
+c5e72ef6abb0aafa1a6ab1b49babdd21 8.1.1085
+53b0a8d410613093a1de9b619ec45bc7 8.1.1086
+0a9cd19c39a36a10b05394bf59a8bc26 8.1.1087
+3519c48e84592a90b2b3af4f6c31c7e3 8.1.1088
+151e43e9aae762d6b0bbad5494b2f0c0 8.1.1089
+e47bcbd52ac02a551d224add3746c387 8.1.1090
+7b63fc12a5a72f9b56b5d9ece12e6b2c 8.1.1091
+f81e566dd5f75ca6de0245b68441b805 8.1.1092
+58db35fa1b3106627f09bad2aa9369c4 8.1.1093
+2c4e8b6522136ae8ec234c98863eec9c 8.1.1094
+3f3fd72f71b79ae5d3e02f0df1dbae44 8.1.1095
+91e219a33a6749d8f3af49570e73d779 8.1.1096
+997a3710a8f9f174852616b445511663 8.1.1097
+0b488c9693008d7caaa32c3780c4ce91 8.1.1098
+abb0672b8a0c6e8517832b4e6fd91f6e 8.1.1099
+24594be27bb27627587a1a0724c6ff23 8.1.1100
+4d832c5d6f2e3b5504bcfda74d26c756 8.1.1101
+4c51853510e555eb39adff56b95c26ee 8.1.1102
+913321ce84239c6ebfd198ab00f3bef6 8.1.1103
+80ee2bf93e69a7f3d70e2ed0bdd0e8c3 8.1.1104
+62644f990f3d2a34bfa9e3041675f03e 8.1.1105
+9922ebce63e476f90ac02a9fa5bf9545 8.1.1106
+2931a3ba91926cbd8af02700a92faa34 8.1.1107
+a29bc6dc61d8a5e238a948b938586db6 8.1.1108
+2ceeba5d8b710371202b432f09142530 8.1.1109
+a744539fd9601636addd13582a82ba36 8.1.1110
+4d3618bec312ddb4cd9b83c117a8e276 8.1.1111
+8cb943e3831922a26e38e1a728fc4a38 8.1.1112
+43911c377a8c8729c177614718c11c93 8.1.1113
+4181c074db87ab656c74e500bd28e76e 8.1.1114
+b38c9e1af5a8b8119e9f2014cd67ced0 8.1.1115
+6ab06233ed226103538fb397a73b68a5 8.1.1116
+1da8a3ad032b2bb2d85f326652d79fd5 8.1.1117
+d220d6e6cf4f3dd2350d35f8a6a8a41d 8.1.1118
+8cb28e594539bf9d10fd3cea6c57f017 8.1.1119
+538ef3fb414f902bf9788a98354a729a 8.1.1120
+69b0642bfa7610740430dfca8b91547b 8.1.1121
+1145c1d819add50aaad3ad0966c8b527 8.1.1122
+fcaaaf63095724c80d2bb05cce3f64b2 8.1.1123
+d51ad167b196d983a930750f37000a07 8.1.1124
+cfad01dc8a8745ab95adf1c283528ae1 8.1.1125
+aa12fff22f9d56074031c063176c8363 8.1.1126
+bc3bcfba5a7b239facfe594499b6b78e 8.1.1127
+fbc49a7e95b27283145ea831effc3d96 8.1.1128
+f19c2824b7b14cdffd95f9bfcca7a1f1 8.1.1129
+642ecd9de915b1b031fd5cc9b2fbe554 8.1.1130
+7206743bed55e117a613749862463f94 8.1.1131
+a7cfdc8a85b29bdb448166bfe53e09b6 8.1.1132
+1140ffa6afd692112c6bc7bf12f20fb1 8.1.1133
+5f3c16cc8f918cfe542ea07a1e1be135 8.1.1134
+5a88ea07f3791d8ab6570a9a06c1658f 8.1.1135
+f256aa9ce5581615cf017e391fb67850 8.1.1136
+478060f7b7913843bd9c4bf5ae59cce7 8.1.1137
+854ad77139490dc81a66fe2162ff8656 8.1.1138
+e951b7da574fa739eb370e3d01e28313 8.1.1139
+a0e3d958866bf3b3a79baf630436d0ce 8.1.1140
+0244a5dd2ccf66110ee0108a83844712 8.1.1141
+828988fa8ed3ad01c67c5cbc6f3895c8 8.1.1142
+74eeb15c0709778024738c926c9191d8 8.1.1143
+3736d9daeab03d33db61d2b1235d48af 8.1.1144
+f278caf4c0f432e05fd8e0a9baf4d35f 8.1.1145
+39dc0cec0e7e9a9ae8106581ae7fbd06 8.1.1146
+0b52c2fcdb493e50cb0ecb61a926d624 8.1.1147
+30da85942eee046b7ea650467ad6c189 8.1.1148
+eeacf9b6bff1911867afb5a7efd4675d 8.1.1149
+d3f42346c74a58f9417bffab6976adfd 8.1.1150
+099ad3294cd8e06b2fa450d109f48e0b 8.1.1151
+5d0a639c7769100b3eda843e80f85b42 8.1.1152
+f06a14c835264a8df163fb30ccf7730e 8.1.1153
+b8790705eae4086d6ce5a4bc75cddad9 8.1.1154
+6371aecee9c998e4100496db755ac7e9 8.1.1155
+7988ad68c07e6538fd202343bc675b9e 8.1.1156
+f4d89e3170d0fcd915e7239dc4bf6e5c 8.1.1157
+b81504266bbbe8f9dcd57a3537f6a06b 8.1.1158
+a3bd9fe2ec421234d515fa58cb24573e 8.1.1159
+6b14a2e0f74c87e0d2e0b291dfa63d79 8.1.1160
+41612511efd41808709b1a49d49d3fd1 8.1.1161
+55c14c50898b51f1b75c36251e1b06a2 8.1.1162
+843d1b8b64d185335f110625796bc4b1 8.1.1163
+cd948b49de13dad23c658cd4d9adde7e 8.1.1164
+bc6dd6fb50f1e9ff9bd876edb8f35218 8.1.1165
+a56e364e41c915d4e72863c98b7d75eb 8.1.1166
+8a33443c8b636d1370650f948a326318 8.1.1167
+f0bd1665711f37cfee8942d05b191896 8.1.1168
+295302090ef8635edb00c42ca7ee8660 8.1.1169
+59f1455fafa9810d4c5fe39493eb0a32 8.1.1170
+26d473d3ca07b3884a2893cbb6b80027 8.1.1171
+c2930f6ed7b2069998080b6258a4aba6 8.1.1172
+29b62f8dfb8ccb26482cd35ca2b9eeea 8.1.1173
+a2d1e92bbcad83eb959a01c9292c74dc 8.1.1174
+735f58dfb8bf65d01ad6f5319a4830f4 8.1.1175
+9041c7c6a6ef8bb86d6b3174b556d876 8.1.1176
+8cfdaec6ec01cc31a111e9f1539e926a 8.1.1177
+33c3acdd964d5f03d3edcb9a76c32c54 8.1.1178
+72ad7c06911c8cf1d91ee9e2cec4d260 8.1.1179
+40ee679548a18a662566ea7c8a42c33f 8.1.1180
+b958dfd3afa58d8d0ad7f698b86c9458 8.1.1181
+62490558cbf6a0ad4afc9755e5c2adfc 8.1.1182
+c8d7bbcc4c1680306c2a0791829ca7f2 8.1.1183
+b8b791c19a457c2b3d70d08887fbe258 8.1.1184
+41ad6cd7096810727aee0c77b1817212 8.1.1185
+269b3c4fa6f2f44c7556ceff0d4bef31 8.1.1186
+5de1f69c2c7f42afcfbed8055365dd3d 8.1.1187
+dfb6aef18ad86de816724d1caa61b3f1 8.1.1188
+b71e02ad3e5767633cce97ee995f52d2 8.1.1189
+2d28724103c8207848bc914e8cbe2faa 8.1.1190
+bdd15ac568d3755c384f788b6161dc00 8.1.1191
+69b49fca84afadecee5d1b4e55ab876d 8.1.1192
+9038ad85cea8e0d81304c84f1a215d6d 8.1.1193
+bbd9f411b8ed499f7da072d0c5aaa533 8.1.1194
+36396d053abdb903e00d056a777ca6b8 8.1.1195
+4b78ae24b4e3a8d82a3f872c480b6e47 8.1.1196
+7ed3aeff6f031c1296b0855a37b1e770 8.1.1197
+41247253d8c21d56c1856741cdc8f23a 8.1.1198
+70c1253fd2d8a989f926494e39f8dacc 8.1.1199
+29f3910db628a207c2955b4564c3719f 8.1.1200
+60f78ec1e28d62b377b8fb04ab602ba7 8.1.1201
+5d0a1bde2d0cb3a3e8f89108d550a802 8.1.1202
+441dc5e4fedff901e28f7da37580f35a 8.1.1203
+49aaba2612d2e9af8a158d6ce4c59bf0 8.1.1204
+5d611d4b598e45186321e8cd1f3401f8 8.1.1205
+da77c46192c47246bb419995cc8aa461 8.1.1206
+43c27de5748a73ed9176701ba12a45f5 8.1.1207
+308bc63b8e94d935e06fd9ed14891570 8.1.1208
+ae0770e920b694296adcaabd8b12ba03 8.1.1209
+be2f0acc546ef06fee308bcdde6e966e 8.1.1210
+babe091417f030e853db678b2bb5db91 8.1.1211
+d6859895eaab18c91346468db97cb257 8.1.1212
+5f2fb0b7d338748669983dee11120789 8.1.1213
+ba3dc36beaf8af90f72dbf1aa5fae429 8.1.1214
+865e63125c0d220cb7aa146cbca1b5a3 8.1.1215
+ae7b52296b8f202885c4326ec07df970 8.1.1216
+01e93273f36b3c10a470a4bca6d95078 8.1.1217
+fa970399db6110be815bbaa6c5a09127 8.1.1218
+4d79a27f2c315145ddaf01283790eb7e 8.1.1219
+d14adb4cafc5535bf5b4361b212a23c1 8.1.1220
+d65a88d4fde6c0543af3805dce792a30 8.1.1221
+b7f4766497df5e21e90d45c7f8a9062b 8.1.1222
+3ca982ab68adf4c45b02b7b5142bf7fd 8.1.1223
+01a3b5efbdf8da68d28b56d6ce0f53b0 8.1.1224
+94036800bf7581da6d187cc29e65b7c0 8.1.1225
+c7a06947bec5acef43da39bd18b25441 8.1.1226
+4f2c657866345c24baa349b40fe71e14 8.1.1227
+4620624eafbc844be0a18cad434dac18 8.1.1228
+34751160562c88cd7ee613df9d9711f4 8.1.1229
+a5095fef42152981963005e0a6494b0f 8.1.1230
+3af0ff19d4c8b8656adfad2238d1d9c4 8.1.1231
+24a1233e600aede214c728ee74a9a5f3 8.1.1232
+d9e7bcfb18738bedb1c2bde1520abafd 8.1.1233
+928f1a0eb24cf0f82eb8fcb84abee86f 8.1.1234
+1f3472fd246009f8638f737b8101e0a9 8.1.1235
+4f3f55ff504566b137408bbc73c56705 8.1.1236
+269467fe47d7588a6523b3cad229ef92 8.1.1237
+ea22b3a3f9c874d13e5cd7a5111f6568 8.1.1238
+286b4caad8ff671c8658f5acfd1b5f60 8.1.1239
+5e03e466337fa32bd4023e8c84a2907c 8.1.1240
+ee1505af26c9979662bb9ff48918bbbf 8.1.1241
+7291664ae2cb6ff4fead1c80b6196d29 8.1.1242
+d12dea56d8b135084bb1508457ac657e 8.1.1243
+55929009470cf1caff6cc25fbf07c695 8.1.1244
+4eb116c432c77fb98fac241390b0164d 8.1.1245
+95c2219e6dbfbb71b59c67dc8428219d 8.1.1246
+99181763a37f3033f97a2dd843a2248b 8.1.1247
+3d505ad2b9d534929819a1d1db8fe344 8.1.1248
+3464a0a5377bb1e85fb7eda495aafb6b 8.1.1249
+d0253bd7b1cb629456f26c6dcc6df783 8.1.1250
+94c450ddd2e470f9f73abbc89a34f19b 8.1.1251
+fb082ea3033f8baf7674a15ee8b055f1 8.1.1252
+dbe293b0c5fe585117104c660722a533 8.1.1253
+a39637a22768cf01c3c085fd5715a0dd 8.1.1254
+411ebbbe6d7fded6d7faf345a8857d53 8.1.1255
+3c0e67ed96e2da68322fb163858cd44d 8.1.1256
+7e171880cd56767a835a17604f866e0a 8.1.1257
+768b4758368d28c778df7050ed5e1a99 8.1.1258
+1b3dd4c72241f9d72c764403ea7e2b0d 8.1.1259
+b88816706bb43a00d8d1054b64985baf 8.1.1260
+2622f7a040aa850b613f734c008cc9c6 8.1.1261
+f0f0e349bee3dc304ba93409911e19d7 8.1.1262
+90101681ed1f69efa6d09b0c5107acfc 8.1.1263
+cb2f03c3399622f95bb0367599f4bf3c 8.1.1264
+4028d5d8d689f184b3f5ac1568fe422a 8.1.1265
+3cae5071eec69969ec0e9e1aaae2c8a9 8.1.1266
+ecb9ef526dc2d7631bc1264db66654ac 8.1.1267
+79383975f44675f573caf8a9677678b0 8.1.1268
+0b5d3be3b30bb08ea616b8fe74b0c03c 8.1.1269
+d1921c38fe590b1a42dda169f1fc9a52 8.1.1270
+b71b1b235dff7d68208287e2cc37b1b9 8.1.1271
+d6efd231b73dd0281ff1646747ef8644 8.1.1272
+9a5cea71c1077cc9d7f0850a49ec26f3 8.1.1273
+dcadb62e515e3524d9f26c442a1097fb 8.1.1274
+e51891b312d20a576b6062db921c55eb 8.1.1275
+fe2db856ebab45c326d9c18c970b0d82 8.1.1276
+421caf7c5f6cd9cc31ed3953a4dd10cd 8.1.1277
+c9bee4b7ac50f9dcf070ac3596623734 8.1.1278
+9d69d75b5dfebd0857791d65ff5ac582 8.1.1279
+2eed6f0689c49790a36e250a56844d1c 8.1.1280
+1337e517c0f373447bc691c9ec07e555 8.1.1281
+817df9aea514b5501f822ad8c799f040 8.1.1282
+fb967386d03ccc7188f990a6aca5bab4 8.1.1283
+b59d90351b818c17b837ccb170c3d66c 8.1.1284
+df6778318efc69c999e26534a6d69ab0 8.1.1285
+28e874818f3870c5c0eff54603f47a0b 8.1.1286
+272dbaa02fc585847c26c23cdc96a5fd 8.1.1287
+6f4ee514d124691421e3bdb2c0d03d6a 8.1.1288
+4b8c21a3b5289d683de48f777b08b150 8.1.1289
+ea4dc4cf2fd864b1c04c754afa4368d2 8.1.1290
+905cb6f5015a738d44158dfc1c4af5e5 8.1.1291
+e4531bb39091f3d2e9a9793af335248b 8.1.1292
+a849fa90ef86250be18b6082ae9971d5 8.1.1293
+16c7e769b036d5d919ae2043058781c3 8.1.1294
+ba436f8c4e7758eb3227ac9e3d5657d0 8.1.1295
+4b172744608134ef237d297a8ea069d6 8.1.1296
+9a8dcc9624a7e28779af15051125df41 8.1.1297
+79ea5070567b980628b76b9862c63cb6 8.1.1298
+abb88e606b48601de8b84404efe18e62 8.1.1299
+df2bad2f367d5ba1bc5ec93f456f83e9 8.1.1300
+abff5e11139d905ee04bf7badf18af12 8.1.1301
+de3c529b487402053c11a2b48f2dfbb2 8.1.1302
+eb0c3ce4e0e45ec7611d5556733e6927 8.1.1303
+2176e606faf9afb7f76517897efdc7a8 8.1.1304
+725ac033650dba564a54825f0454c416 8.1.1305
+f340c4783c9bbf609924343a2139aa80 8.1.1306
+7820ce12c6a9a69cb71ebb571b7c2082 8.1.1307
+f6e9cdc6e6b97fe9f617c0918b815c48 8.1.1308
+a0e9567eacec9c076ca9546c3f45d5ab 8.1.1309
+5e994302ea568edc811ac1749658a5f9 8.1.1310
+5b29f0e37a5de76366c4c7a7028d4c88 8.1.1311
+5af1efe12efb4e715903f2f3c096ca4b 8.1.1312
+d4ef483922711691ce0352aebc59f823 8.1.1313
+edb03464eea26fde83bded3c0f4ec21e 8.1.1314
+216e9596976d0ad77fecbea3f61e53b3 8.1.1315
+72e5d057703496dab294f270600b7a7e 8.1.1316
+0a5b4bb5740a69e7e97c7aea07111bab 8.1.1317
+3f4e3dc0f09ad76423372795688abc48 8.1.1318
+b37c4ab5806d47c4a026edf736fdccdf 8.1.1319
+8434f8f40297830b2b485fd0307960c1 8.1.1320
+62dc51e08ad4df6cda780f893a5ae45c 8.1.1321
+92d369ba5e895084421e30a38d58b658 8.1.1322
+2841b1d99658705ee036167baa25e0dd 8.1.1323
+593701b93d52425a3c02aca2e8e954c5 8.1.1324
+b29994dc261d3d1992354f5c1d9340d1 8.1.1325
+44d13a5e6c9312bda8ae3995db3c4a0f 8.1.1326
+51361036a24dcc92b9505a72afd8850c 8.1.1327
+e36d4d18dc233510c3fa61e86061a2f1 8.1.1328
+23ffad982030e106eff29b11c2f96632 8.1.1329
+39fddf83d47c7974b06a9f1f9b6d6934 8.1.1330
+e77b313631104f8261f0e0bba9954a78 8.1.1331
+17666c49154f769d8140749ff86b79ae 8.1.1332
+ad33de4060e702caf762952f99aaf081 8.1.1333
+663a81dadb6c9c987932f5d21920a628 8.1.1334
+43a882b27af91fdeec552fa31666f0bb 8.1.1335
+701d01c74d80601fbadbb126baff361b 8.1.1336
+1168d378a57f3e66fdbeb94b0ea158ad 8.1.1337
+9f8fddf17d301d0d92265c229506704e 8.1.1338
+a920bca4d236f8c60a7bceed57d59d98 8.1.1339
+7e8687b2abb515b55f33733a3b784dce 8.1.1340
+4c0f8eefcc3903c903b76fbad5d9404a 8.1.1341
+18b923e64d4e2a7fdded70f7e1270d05 8.1.1342
+996dba5a8c5c51e3ee16f71fcb7eb610 8.1.1343
+7a4a063d41aab6409e01d24013e27345 8.1.1344
+a1610bc29558af9e8b1a3ca027eebf49 8.1.1345
+390d9b2461125a867d268364e506e104 8.1.1346
+352958badfcaf84ef0f2af87666e5b93 8.1.1347
+428d84a21db374b22999ccac4c336a11 8.1.1348
+88aeb0828f009816e44a7c7d90cd83d9 8.1.1349
+b6a4f97dbadf9e6ff44d869b4137779a 8.1.1350
+09907e4d257b10e88bb1cafa02de6393 8.1.1351
+8b4cdaa4dee192d2996818027a9e3968 8.1.1352
+ec31a91826bb3bd52199dd47add8a42e 8.1.1353
+7b9cbdcdfedfe6d80493a87b9c06e243 8.1.1354
+6657d22254851269f5a3f9a8c6df1624 8.1.1355
+b4a14271c63f91a4a9605e14f5a3466b 8.1.1356
+64fdd621edb1876fdc0bd90c75489556 8.1.1357
+df51079ea24246dccb9887695eae08fe 8.1.1358
+9d9513e89ca9f4aa575347908e1e1f88 8.1.1359
+55cc32c2711a63cfd8ebd49ac647ed3a 8.1.1360
+7ae3ded373559846919e3180c084fcf2 8.1.1361
+8679b27a1a1d1f04a023d2b0e6c065df 8.1.1362
+33aecf40e421a2c564e8a7271bde3fe9 8.1.1363
+65c92edaf751977cb9d6b7a66259725f 8.1.1364
+349dc86bd3e3c64cf394f665c3e1e5f8 8.1.1365
+4ac1dcdab8375118c2122977fe625a02 8.1.1366
+e8481c566c11d9626238ffb6d14e424c 8.1.1367
+7de3a6c2c24391996ae6945e9573ce3a 8.1.1368
+dffdafc4ea798b4e302c5d045b50abf8 8.1.1369
+ac297e2b0fe5535d740c782acaf17544 8.1.1370
+5d7481b18ac653e88d214008faf59e1d 8.1.1371
+28c2ae9d9bff175ef7b979e6f26cbc0b 8.1.1372
+ddb7cd05b8b0f51b0015ca6496515b14 8.1.1373
+6196e9aef00e82ad56b1337149c941b0 8.1.1374
+7457beb9f090b86b81e08505af2feeb1 8.1.1375
+6354a7c09ef7072ffefc6fc1a3a0c805 8.1.1376
+545bee80796c26f98f057e38c3613622 8.1.1377
+fa8fcf38695d9f9abf70a44ab0ab43e2 8.1.1378
+78211b9c0ee37baf2df4c76b752e702a 8.1.1379
+d11d42a0291a60623fef43c8534fe533 8.1.1380
+c5e45471db3abc0100aa2b2f34e3615f 8.1.1381
+fcd9e5999a2a3b1b62362eb22c6cfa51 8.1.1382
+c5a8c92c28df179a59bcb9429a7405dd 8.1.1383
+b64842fd31dfee8782d148c38e365d82 8.1.1384
+8c5076408205565c7d989d773c4f242d 8.1.1385
+b608fb352e78393d34afb4cd0427e7f2 8.1.1386
+045f8605a76b3c44170f8b618db9b6fe 8.1.1387
+38e7e8404e553f57d98bc5c4e6e840b5 8.1.1388
+108ddfb57c0b8619a8273dd3cfd95269 8.1.1389
+a253fa23faab5d84a89b7e8675865e44 8.1.1390
+53d4fd289df05e6addbb3577fb95da88 8.1.1391
+ef8589255ecae7d7aa2134cf43efd91c 8.1.1392
+fce4f2b61f17fb0b039eba924aaea76d 8.1.1393
+b2a71eca95790ef8ade40d59e7ccdf9a 8.1.1394
+929c10049e7b8c56423d05e014cf5dfc 8.1.1395
+4cc9c827f77758cf84cb49e3cadb861b 8.1.1396
+2ce0908ce62f8f12230e36b6e71e2944 8.1.1397
+dc4d9613907d671917b50ae8847132e0 8.1.1398
+fffee5e26c5584e7638d2cb5d2beeda9 8.1.1399
+9b4c50d249d87726c12738800df50812 8.1.1400
+8c9e25d29250a3517c51ec2cb64fa16b 8.1.1401
+93093148ed81a76b8cc7cd54701427a8 8.1.1402
+e60399b1c6014cd0e4f5a524f370fd9b 8.1.1403
+7615b506dcbe8982e556ec7a723b3e89 8.1.1404
+51140fb7663b3deedcd6c98096632348 8.1.1405
+78421e0819ff35ecc829981abddc1b00 8.1.1406
+7375f252571fb48b2fd5eb2a728269e6 8.1.1407
+aa5104efb693743762b37932da8304bc 8.1.1408
+32b110bb122b7c8fef659a69293f389d 8.1.1409
+afd322e6e8801855de6f529f5bf0477f 8.1.1410
+fc23ad0cab2940978465d9e4ca292cd5 8.1.1411
+5e642ffb2e065d0215e964263a448f73 8.1.1412
+89a3c1dbbbcb3cc844d6666a6f8235c4 8.1.1413
+53769261c9de04d50e903beda02591e5 8.1.1414
+90d50714abcb4433a94266ffacacdc62 8.1.1415
+2115cca1f6d822b0a76de41af485aa67 8.1.1416
+737af86179bbd0c1ea2845b26b9b7008 8.1.1417
+dc5e72b4066b2bb9f8af97ff9d548ee2 8.1.1418
+2436879a228f4839979b75c484179e43 8.1.1419
+7e286082808942a54f2744ef7d1843b8 8.1.1420
+332ab8760b1d62034a0b26002372297f 8.1.1421
+9b07895cba7667ffea07689192e4dc16 8.1.1422
+1aa2bc10f3c59100a46032098cb81535 8.1.1423
+de15d3b7e241a5843c64ed39901e53e3 8.1.1424
+86fbb0909d80a3e23186e26224d1b594 8.1.1425
+8f70eb6b003b994a80c84d8a2fad3c11 8.1.1426
+b05dc62607f94d4e6f386bdb143c03c2 8.1.1427
+6d21a10b439fd96f5cdf152afc29032e 8.1.1428
+01bd920e18c5be665bc18966aedfe506 8.1.1429
+1d8cc670ac1cd837dc860864c6b2b072 8.1.1430
+97af9fbc922d346284051988f286776d 8.1.1431
+0746d79a3ad5651ae46a11bc548d7f83 8.1.1432
+71fc8d143c2640fea250e08f44116422 8.1.1433
+35d19918f1c3d6f767aeada5b1af298a 8.1.1434
+8edeb212362ac8d568696f71d420ca76 8.1.1435
+95270b8bbf05046bebb78851dd2e82a1 8.1.1436
+1a5238c662ef529a25dd97700704e166 8.1.1437
+ec3546ebd978720ff461bf614673511f 8.1.1438
+fa5c4a08fae4e88b9e421d792fe3c1f5 8.1.1439
+6e85fe7eaf3089025ea4412b5c276c4e 8.1.1440
+68ec291404716de976d0bb861e19d4eb 8.1.1441
+39ca67e2d96cec610d9bd664d6022c23 8.1.1442
+c00f1a37d1ec16a0d4042dd6e0a56253 8.1.1443
+e46579d8adf8e88ae552897a6d622e0e 8.1.1444
+306395d81ced3ff800dcff0ef3bd401f 8.1.1445
+d3d64973429256afbde6da5eae2bd64a 8.1.1446
+7ef3e9af6b43ad122c67206f876a3464 8.1.1447
+56ddd23239509afd59a03e69fba65420 8.1.1448
+023f3f96da9dbd581b211133e46b518b 8.1.1449
+e69f472c4b3f7f746bab905ab2d742b4 8.1.1450
+bae1022a5acceaa4cc447a930276aa1c 8.1.1451
+31e7fd469f8cd0f4c33acbd13b48d58e 8.1.1452
+4d23e5561470e00f1caaede1f6e67559 8.1.1453
+bb1589dde104026698cfa6d96d02c338 8.1.1454
+6f8082b84a97f15a80b5cd748229ea5e 8.1.1455
+44112d9ad2264555f065a28382c27c6b 8.1.1456
+c131cfb44bb3bb1f1b30537abb57a8c9 8.1.1457
+1631331e2d4104e8e5e87f9e813a60a3 8.1.1458
+fb9c277351f58959adc88044c86c444c 8.1.1459
+bd5a9d81db372d14b4254c37dc18c036 8.1.1460
+213aaee3c6e1cfb38942b3e7a85536bb 8.1.1461
+0be90a15fc68e06c0bfbb3f4c73ea113 8.1.1462
+8a97db32ba11bff395411b3d583474e9 8.1.1463
+a4308e2d076410461b1f5b6f2c750a53 8.1.1464
+214ca1009aa17869b471b3c0bb000813 8.1.1465
+3d2e44920901d166a62979fe354026e6 8.1.1466
+66f7bbd9059d40faafc9d68cf702c974 8.1.1467
+348767673a51dd4592069d0f97b2dd31 8.1.1468
+e3644c1ea4ee621f00622537a093ec70 8.1.1469
+c755e5f62902ff612251c0f44af87291 8.1.1470
+2c077f5351807492f48d0c0bc0bc53e8 8.1.1471
diff --git a/data/vim/patches/README b/data/vim/patches/README
new file mode 100644
index 000000000..562daf3b1
--- /dev/null
+++ b/data/vim/patches/README
@@ -0,0 +1,1497 @@
+Patches for Vim - Vi IMproved 8.1
+
+The files in this directory contain source code changes to fix problems
+in a released version of Vim. Each file also contains an explanation of
+the problem that is fixed, like the message that was sent to the vim-dev
+maillist.
+
+The best is to apply the patches in sequence. This avoids problems when
+a patch depends on a previous patch.
+
+Before patching, change to the top Vim directory, where the "src" and
+"runtime" directories are located.
+Depending on the version of "patch" that you use, you may have add an
+argument to make it patch the right file:
+ patch -p < 8.1.0001
+ patch -p0 < 8.1.0001
+
+After applying a patch, you need to compile Vim. There are no patches
+for binaries.
+
+Checksums for the patch files can be found in the file MD5SUMS.
+
+
+Individual patches for Vim 8.1:
+
+ SIZE NAME FIXES
+ 2006 8.1.0001 the netrw plugin does not work
+ 2572 8.1.0002 :stopinsert changes the message position
+ 3792 8.1.0003 the :compiler command is not tested
+ 1751 8.1.0004 test for :compiler command sometimes fails
+ 1807 8.1.0005 test for :compiler command fails on MS-Windows
+ 1693 8.1.0006 syn_id2cterm_bg() may be undefined
+ 1962 8.1.0007 no test for "o" and "O" in Visual block mode
+ 2386 8.1.0008 no test for strwidth()
+ 2778 8.1.0009 tabpages insufficiently tested
+ 9415 8.1.0010 efm_to_regpat() is too long
+ 2536 8.1.0011 maparg() and mapcheck() confuse empty and non-existing
+ 1610 8.1.0012 misplaced #endif
+ 6717 8.1.0013 using freed memory when changing terminal cursor color
+ 13559 8.1.0014 qf_init_ext() is too long
+ 4186 8.1.0015 cursor color wrong when closing a terminal window
+ 1890 8.1.0016 possible crash in term_wait()
+ 5801 8.1.0017 shell command completion has duplicates
+ 9499 8.1.0018 using "gn" may select wrong text when wrapping
+ 2326 8.1.0019 error when defining a Lambda with index of a function result
+ 15279 8.1.0020 cannot tell whether a register is executing or recording
+ 2235 8.1.0021 clang warns for undefined behavior
+ 2396 8.1.0022 repeating put from expression register fails
+ 2004 8.1.0023 gcc 8.1 warns for use of strncpy()
+ 2617 8.1.0024 % command not testded on #ifdef and comment
+ 4779 8.1.0025 no test for the undofile() function
+ 1809 8.1.0026 terminal test fails with very tall terminal
+ 50988 8.1.0027 difficult to make a plugin that feeds a line to a job
+ 1760 8.1.0028 prompt buffer test fails on MS-Windows
+ 1495 8.1.0029 terminal test fails on MS-Windows when "wc" exists
+ 3105 8.1.0030 stoping Vim running in a terminal may not work
+ 1611 8.1.0031 terminal test aucmd_on_close is flaky
+ 5262 8.1.0032 BS in prompt buffer starts new line
+ 1848 8.1.0033 keys to stop Vim in terminal are wrong
+ 2716 8.1.0034 cursor not restored with ":edit #"
+ 6569 8.1.0035 not easy to switch between prompt buffer and other windows
+ 4578 8.1.0036 not restoring Insert mode if leaving prompt buffer with mouse
+ 15307 8.1.0037 cannot easily append lines to another buffer
+ 1978 8.1.0038 popup test causes Vim to exit
+ 8953 8.1.0039 cannot easily delete lines in another buffer
+ 2531 8.1.0040 warnings from 64-bit compiler
+ 4059 8.1.0041 attribute "width" missing from python window attribute list
+ 3565 8.1.0042 if omni completion opens a window Insert mode is stopped
+ 3435 8.1.0043 ++bad argument of :edit does not work properly
+ 2509 8.1.0044 if a test function exists Vim this may go unnoticed
+ 8195 8.1.0045 popup test isn't run completely
+ 5925 8.1.0046 loading a session file fails if 'winheight' is big
+ 2905 8.1.0047 no completion for :unlet $VAR
+ 3129 8.1.0048 vim_str2nr() does not handle numbers close to the maximum
+ 7856 8.1.0049 shell cannot tell running in a terminal window
+ 12084 8.1.0050 $VIM_TERMINAL is also set when not in a terminal window
+ 1187 8.1.0051 MS-Windows: missing #endif
+ 1660 8.1.0052 when mapping to <Nop> times out the next mapping is skipped
+ 17493 8.1.0053 first argument of 'completefunc' has inconsistent type
+ 1978 8.1.0054 compiler warning for using %ld for "long long"
+ 2674 8.1.0055 complete test has wrong order of arguments
+ 2996 8.1.0056 crash when using :hardcopy with illegal byte
+ 5625 8.1.0057 popup menu displayed wrong when using autocmd
+ 5833 8.1.0058 display problem with margins and scrolling
+ 3006 8.1.0059 displayed digraph for "ga" wrong with 'encoding' "cp1251"
+ 2199 8.1.0060 crash when autocommands delete the current buffer
+ 9361 8.1.0061 window title is wrong after resetting and setting 'title'
+ 10083 8.1.0062 popup menu broken if a callback changes the window layout
+ 4134 8.1.0063 Mac: NSStringPboardType is deprecated
+ 3198 8.1.0064 typing CTRL-W in a prompt buffer shows mode "-- --"
+ 2714 8.1.0065 (after 8.1.0062) balloon displayed at the wrong position
+ 4125 8.1.0066 nasty autocommand causes using freed memory
+ 3453 8.1.0067 syntax highlighting not working when re-entering a buffer
+ 2218 8.1.0068 nasty autocommands can still cause using freed memory
+ 10539 8.1.0069 cannot handle pressing CTRL-C in a prompt buffer
+ 1772 8.1.0070 missing part of the changes for prompt_setinterrupt()
+ 24885 8.1.0071 terminal debugger only works with the terminal feature
+ 3489 8.1.0072 use of 'termwinkey' is inconsistent
+ 2490 8.1.0073 crash when autocommands call setloclist()
+ 1917 8.1.0074 (after 8.1.0073) crash when running quickfix tests
+ 1690 8.1.0075 no Vim logo in README file
+ 2192 8.1.0076 command getting cleared with CTRL-W : in a terminal window
+ 1575 8.1.0077 header of README file is not nice
+ 3972 8.1.0078 "..." used inconsistently in messages
+ 1941 8.1.0079 superfluous space in messages
+ 9680 8.1.0080 can't see the breakpoint number in the terminal debugger
+ 2721 8.1.0081 the terminal debugger doesn't adjust to changed 'background'
+ 3834 8.1.0082 in terminal window, typing : at more prompt, inserts ':'
+ 5227 8.1.0083 "is" and "as" have trouble with quoted punctuation
+ 5639 8.1.0084 user name completion does not work on MS-Windows
+ 3269 8.1.0085 no test for completing user name and language
+ 2588 8.1.0086 no tests for libcall() and libcallnr()
+ 6792 8.1.0087 v:shell_error is always zero when using terminal for "!cmd"
+ 2126 8.1.0088 terminal test for stdout and stderr is a bit flaky
+ 5766 8.1.0089 error when ending the terminal debugger
+ 4270 8.1.0090 "..." used inconsistently in a message
+ 10822 8.1.0091 MS-Windows: Cannot interrupt gdb when program is running
+ 1512 8.1.0092 (after 8.1.0091) prompt buffer test fails
+ 2187 8.1.0093 non-MS-Windows: Cannot interrupt gdb when program is running
+ 1399 8.1.0094 help text "usage:" is not capatalized
+ 2373 8.1.0095 dialog for ":browse tabnew" says "new window"
+ 4382 8.1.0096 inconsistent use of the word autocommands
+ 1805 8.1.0097 superfluous space before exclamation mark
+ 9705 8.1.0098 segfault when pattern with \z() is very slow
+ 1924 8.1.0099 exclamation mark in error message not needed
+ 1595 8.1.0100 terminal debugger: error when setting a watch point
+ 1769 8.1.0101 no test for getcmdwintype()
+ 1557 8.1.0102 cannot build without syntax highlighting
+ 5682 8.1.0103 long version string cannot be translated
+ 1709 8.1.0104 can't build without the +eval feature
+ 91953 8.1.0105 all tab stops are the same
+ 1471 8.1.0106 build fails when HAVE_DATE_TIME is undefined
+ 2523 8.1.0107 Python: getting buffer option clears message
+206793 8.1.0108 no Danish translations
+ 1365 8.1.0109 new po makefile missing from distribution
+ 2466 8.1.0110 file name not displayed with ":file"
+ 4914 8.1.0111 .po files do not use recommended names
+ 4681 8.1.0112 no error when using bad arguments with searchpair()
+ 1508 8.1.0113 compiler warning for unused variable
+ 6304 8.1.0114 confusing variable name
+ 1961 8.1.0115 the matchparen plugin may throw an error
+ 2800 8.1.0116 display problem with 'vartabstop' and 'linebreak'
+ 1760 8.1.0117 URL in install program still points to SourceForge
+ 4245 8.1.0118 duplicate error message for put command
+ 1948 8.1.0119 failing test goes unnoticed because messages is not written
+ 5855 8.1.0120 buffer 'modified' set even when :sort has no changes
+ 4713 8.1.0121 crash when using ballooneval related to 'vartabstop'
+ 1658 8.1.0122 translators don't always understand the maintainer message
+ 1718 8.1.0123 MS-Windows: colors are wrong after setting 'notgc'
+ 1597 8.1.0124 has('vcon') returns true even for non-win32 terminal
+ 4884 8.1.0125 virtual edit replace with multi-byte fails at end of line
+ 6119 8.1.0126 various problems with 'vartabstop'
+ 1817 8.1.0127 build failure when disabling the session feature
+ 13345 8.1.0128 building with MinGW does not work out-of-the-box
+ 1716 8.1.0129 still some xterm-like terminals get a stray "p"
+ 5062 8.1.0130 ":profdel func" does not work if func was called already
+ 7164 8.1.0131 :profdel is not tested
+ 21355 8.1.0132 lua tests are old style
+ 3994 8.1.0133 tagfiles() can have duplicate entries
+ 18460 8.1.0134 Lua interface does not support funcref
+ 2589 8.1.0135 undo message delays screen update for CTRL-O u
+ 9996 8.1.0136 Lua tests don't cover new features
+ 8177 8.1.0137 CI does not run with TCL
+ 4761 8.1.0138 negative value of 'softtabstop' not used correctly
+ 3091 8.1.0139 Lua tests fail on some platforms
+ 2895 8.1.0140 recording into a register has focus events
+ 15890 8.1.0141 :cexpr no longer jumps to the first error
+ 4578 8.1.0142 xterm and vt320 builtin termcap missing keypad keys
+ 6351 8.1.0143 matchit and matchparen don't handle E363
+ 2728 8.1.0144 the :cd command does not have good test coverage
+ 2327 8.1.0145 test with grep is failing on MS-Windows
+ 1367 8.1.0146 when $LANG is set the compiler test may fail
+ 3044 8.1.0147 compiler warning when building with Python 3.7
+ 1512 8.1.0148 memory leak when using :tcl expr command
+ 6889 8.1.0149 session is wrong with multiple tabs when :lcd was used
+ 22149 8.1.0150 insufficient test coverage for Tcl
+ 1593 8.1.0151 mksession test fails on MS-Windows
+ 11431 8.1.0152 cannot easily run individual tests on MS-Windows
+ 1970 8.1.0153 (after 8.1.0152) build with SHADOWDIR fails
+ 3833 8.1.0154 crash with "set smarttab shiftwidth=0 softtabstop=-1"
+ 1273 8.1.0155 evim.man missing from the distribution
+ 1574 8.1.0156 MS-Windows compiler warning
+ 2144 8.1.0157 old iTerm2 is not recognized, resulting in stray output
+ 1647 8.1.0158 GUI: input() fails if CTRL-C was pressed before
+ 2569 8.1.0159 completion for user names does not work for a prefix.
+ 1361 8.1.0160 no Danish manual translations
+ 3923 8.1.0161 buffer not updated with 'autoread' set if file was deleted
+ 6881 8.1.0162 Danish and German man pages are not installed
+ 6408 8.1.0163 insufficient testing for Tcl
+ 2724 8.1.0164 luaeval('vim.buffer().name') returns an error
+ 3898 8.1.0165 :clist output can be very long
+ 38155 8.1.0166 using dict_add_nr_str() is clumsy
+ 5740 8.1.0167 lock flag in new dictitem is reset in many places
+ 4177 8.1.0168 output of :marks is too short with multi-byte chars
+ 4184 8.1.0169 calling message_filtered() a bit too often
+ 9933 8.1.0170 invalid memory use with complicated pattern
+ 3250 8.1.0171 typing CTRL-W n in a terminal window causes ml_get error
+ 1771 8.1.0172 'viminfofile' option does not behave like a file name
+ 1429 8.1.0173 compiler warning on MS-Windows
+ 3944 8.1.0174 after paging up and down fold line is wrong
+ 1934 8.1.0175 marks test fails in very wide window
+ 1599 8.1.0176 overlapping string argument for strcpy()
+ 4584 8.1.0177 defining function in sandbox is inconsistent
+ 1431 8.1.0178 warning for passing pointer to non-pointer argument
+ 1857 8.1.0179 redundant condition for boundary check
+ 4435 8.1.0180 static analysis errors in Lua interface
+ 1921 8.1.0181 memory leak with trailing characters in skip expression
+ 9703 8.1.0182 Unicode standard was updated
+ 3966 8.1.0183 Lua API changed, breaking the build
+ 4488 8.1.0184 not easy to figure out the window layout
+ 4643 8.1.0185 running tests writes lua.vim even though it is not used
+ 2592 8.1.0186 test for getwininfo() fails in GUI
+ 9073 8.1.0187 getwininfo() and win_screenpos() return different numbers
+ 1963 8.1.0188 no test for ":cscope add"
+ 1688 8.1.0189 function defined in sandbox not tested
+ 6411 8.1.0190 Perl refcounts are wrong
+ 1565 8.1.0191 Perl test fails in 24 line terminal
+112175 8.1.0192 executing regexp recursively fails with a crash
+ 1805 8.1.0193 terminal debugger buttons don't always work
+ 2862 8.1.0194 possibly use of NULL pointer
+ 1809 8.1.0195 terminal debugger commands don't always work
+ 2085 8.1.0196 terminal debugger error with .gdbinit file
+ 2341 8.1.0197 Windows GUI: title for search/replace is wrong
+ 2382 8.1.0198 there is no hint that syntax is disabled for 'redrawtime'
+ 1487 8.1.0199 spellbadword() does not check for caps error
+ 3017 8.1.0200 spellbadword() not tested
+ 11749 8.1.0201 newer Python uses "importlib" instead of "imp"
+ 2036 8.1.0202 :version always shows +packages
+ 3913 8.1.0203 building with Perl 5.28 fails on Windows
+ 2093 8.1.0204 inputlist() is not tested
+ 6691 8.1.0205 invalid memory access with invalid modeline
+ 2828 8.1.0206 duplicate test function name
+ 2260 8.1.0207 need many menu translation files to cover regions
+ 1379 8.1.0208 file left behind after running individual test
+ 3024 8.1.0209 stderr output from Ruby messes up display
+ 2831 8.1.0210 still a few K&R function declarations
+ 7061 8.1.0211 expanding a file name "~" results in $HOME
+ 7545 8.1.0212 preferred cursor column not set in interfaces
+ 5556 8.1.0213 CTRL-W CR does not work properly in a quickfix window
+ 1925 8.1.0214 +autochdir feature not reported by has() or :version
+ 2582 8.1.0215 no error if configure --with-x cannot configure X
+ 2392 8.1.0216 part of file not indented properly
+ 2403 8.1.0217 compiler warning for variable set but not used
+ 6928 8.1.0218 cannot add matches to another window
+ 1963 8.1.0219 expanding ## fails to escape backtick
+ 2311 8.1.0220 Ruby converts v:true and v:false to a number
+ 14127 8.1.0221 not enough testing for the Ruby interface
+ 5102 8.1.0222 errors are reported for "make install"
+ 4387 8.1.0223 completing shell command finds sub-directories in $PATH
+ 3118 8.1.0224 hang in bracketed paste mode when t_PE not encountered
+ 5657 8.1.0225 mode() does not indicate using CTRL-O from Insert mode
+ 28724 8.1.0226 too many #ifdefs
+ 1700 8.1.0227 spaces instead of tabs in makefile
+ 15828 8.1.0228 dropping files is ignored while Vim is busy
+ 3254 8.1.0229 crash when dumping profiling data
+ 4212 8.1.0230 directly checking 'buftype' value
+ 3398 8.1.0231 :help -? goes to help for -+
+ 6091 8.1.0232 Ruby error does not include backtrace
+ 9163 8.1.0233 "safe" argument of call_vim_function() is always FALSE
+ 4813 8.1.0234 incorrect reference counting in Perl interface
+ 6005 8.1.0235 more help tags that jump to the wrong location
+ 3812 8.1.0236 Ruby build fails when ruby_intern is missing
+ 2407 8.1.0237 Ruby on Cygwin doesn't always work
+ 2455 8.1.0238 'buftype' is cleared when using ":term ++hidden cat"
+ 3139 8.1.0239 now Ruby build fails on other systems
+ 1835 8.1.0240 g:actual_curbuf set in wrong scope
+ 1779 8.1.0241 effect of ":tabmove N" is not clear
+ 2127 8.1.0242 Insert mode completion may use an invalid buffer pointer
+ 3046 8.1.0243 using :term ++close ++hidden closes a window
+ 6049 8.1.0244 no redraw when using a STOP signal on Vim and then CONT
+ 3316 8.1.0245 calling setline() in TextChangedI autocmd breaks undo
+ 1756 8.1.0246 build failure without the +eval feature
+ 8011 8.1.0247 Python: error message for failing import is incorrect
+ 4314 8.1.0248 duplicated quickfix code
+ 2789 8.1.0249 GTK: when screen DPI changes Vim does not handle it
+ 3230 8.1.0250 MS-Windows using VTP: windows size change incorrect
+ 12239 8.1.0251 using full path is not supported for 'backupdir'
+ 41015 8.1.0252 quickfix functions are too long
+ 14504 8.1.0253 saving and restoring window title does not always work
+ 2428 8.1.0254 cannot build on MS-Windows; unused macro HAVE_HANDLE_DROP
+ 2310 8.1.0255 backup test fails when using shadow directory
+ 8885 8.1.0256 using setline() in TextChangedI splits undo
+ 2084 8.1.0257 no test for pathshorten()
+ 1854 8.1.0258 not enough testing for the CompleteDone event
+ 4897 8.1.0259 no test for fixed quickfix issue
+ 1783 8.1.0260 no LGTM logo in README file
+ 4958 8.1.0261 Coverity complains about a negative array index
+ 3052 8.1.0262 not enough testing for getftype()
+ 3417 8.1.0263 channel log doesn't show part of channel
+ 3278 8.1.0264 backup tests fail when CWD is in /tmp
+ 23576 8.1.0265 the getcmdline() function is way too big
+ 10962 8.1.0266 parsing Ex address range is not a separate function
+ 3831 8.1.0267 no good check if restoring quickfix list worked
+ 10135 8.1.0268 file type checking has too many #ifdef
+ 3772 8.1.0269 Ruby Kernel.#p method always returns nil
+ 1866 8.1.0270 checking for a Tab in a line could be faster
+ 13097 8.1.0271 'incsearch' doesn't work for :s, :g or :v
+ 1723 8.1.0272 options test fails if temp var ends in slash
+ 1470 8.1.0273 invalid memory access when using 'incsearch'
+ 4628 8.1.0274 'incsearch' triggers on ":source"
+ 4964 8.1.0275 'incsearch' with :s doesn't start at cursor line
+ 2991 8.1.0276 no test for 'incsearch' highlighting with :s
+ 9021 8.1.0277 'incsearch' highlighting wrong in a few cases
+ 2988 8.1.0278 'incsearch' highlighting does not accept reverse range
+ 3306 8.1.0279 'incsearch' highlighting does not skip white space
+ 2293 8.1.0280 'incsearch' highlighting does not work for ":g!/"
+ 19659 8.1.0281 parsing command modifiers is not separated
+ 14174 8.1.0282 'incsearch' does not work with command modifiers
+ 1846 8.1.0283 missing test dump
+ 3774 8.1.0284 'cursorline' highlighting wrong with 'incsearch'
+ 1416 8.1.0285 compiler warning for conversion
+ 3285 8.1.0286 'incsearch' does not apply to :smagic and :snomagic
+ 1772 8.1.0287 MAX is not defined everywhere
+ 12170 8.1.0288 quickfix code uses cmdidx too often
+ 2018 8.1.0289 cursor moves to wrong column after quickfix jump
+ 2722 8.1.0290 "cit" on an empty HTML tag changes the whole tag
+ 4355 8.1.0291 'incsearch' highlighting not used for :sort
+ 2120 8.1.0292 MS-Windows: the text "self-installing" confuses some users
+ 5483 8.1.0293 checks for type of stack is cryptic
+ 2332 8.1.0294 MS-Windows: sometimes uses short directory name
+ 9332 8.1.0295 no 'incsearch' highlighting for :vimgrep and similar
+ 8125 8.1.0296 command parsing for 'incsearch' is a bit ugly
+ 2733 8.1.0297 MS-Windows: tests fail, Vim crashes
+ 1475 8.1.0298 window resize test sometimes fails on Mac
+ 1657 8.1.0299 misplaced comment
+ 2295 8.1.0300 the old window title might be freed twice
+ 8790 8.1.0301 GTK: input method popup displayed on wrong screen.
+ 6061 8.1.0302 crash when using :suspend and "fg"
+ 2912 8.1.0303 line2byte() is wrong for last line with 'noeol'
+ 9124 8.1.0304 no redraw when using a STOP signal on Vim and then CONT
+ 3073 8.1.0305 missing support for Lua 5.4 32 bits on Unix
+ 14029 8.1.0306 plural messages are not translated properly
+ 6949 8.1.0307 there is no good way to get the window layout
+ 1720 8.1.0308 a quick undo shows "1 seconds ago"
+ 18244 8.1.0309 profiling does not show a count for condition lines
+ 3277 8.1.0310 file info msg not always suppressed with 'F' in 'shortmess'
+ 4009 8.1.0311 filtering entries in a quickfix list is not easy
+ 7961 8.1.0312 wrong type for flags used in signal handlers
+ 7881 8.1.0313 information about a swap file is unavailable
+ 5176 8.1.0314 build failure without the +eval feature
+ 6290 8.1.0315 helpgrep with language doesn't work properly
+ 2195 8.1.0316 swapinfo() test fails on Travis
+ 2110 8.1.0317 Cscope test fails when using shadow directory
+ 3126 8.1.0318 the getftype() test may fail for char devices
+ 1642 8.1.0319 bzero() function prototype doesn't work for Android
+ 4447 8.1.0320 too much 'incsearch' highlight for pat matching everything
+ 4558 8.1.0321 'incsearch' regression: /\v highlights everything
+ 3868 8.1.0322 Test_copy_winopt() does not restore 'hidden'
+ 2305 8.1.0323 reverse order of VTP calls only needed the first time
+ 1492 8.1.0324 off-by-one error in cmdidx check
+ 2183 8.1.0325 strings in swap file may not be NUL terminated
+ 4926 8.1.0326 screen dump does not consider NUL and space equal
+ 4900 8.1.0327 the "g CTRL-G" command isn't tested much
+ 4775 8.1.0328 inputlist() doesn't work with a timer
+ 1872 8.1.0329 using inputlist() during startup results in garbage
+ 6219 8.1.0330 the qf_add_entries() function is too long
+ 3811 8.1.0331 insufficient test coverage for :mkview and :loadview
+ 1940 8.1.0332 get Gdk-Critical error on first balloon show
+ 5951 8.1.0333 :mkview does not restore cursor properly after "$"
+ 3122 8.1.0334 'autowrite' takes effect when buffer is not to be written
+ 1780 8.1.0335 mkview test fails on CI
+ 3139 8.1.0336 mkview test still fails on CI
+ 3531 8.1.0337 :file fails in quickfix command
+ 5890 8.1.0338 MS-Windows: VTP doesn't work properly with Powershell
+ 3237 8.1.0339 wrong highlight when 'incsearch' set and cancelling :s
+ 2219 8.1.0340 no test for :spellinfo
+ 8417 8.1.0341 :argadd in empty buffer changes the buffer name
+ 6555 8.1.0342 crash when a callback deletes a window that is being used
+ 1636 8.1.0343 'shellslash' is not used for getcwd() with local directory
+ 2422 8.1.0344 'hlsearch' highlighting has a gap after /$
+ 10052 8.1.0345 cannot get the window id associated with the location list
+ 57731 8.1.0346 building with Aap is outdated and unused
+ 5485 8.1.0347 some tests fail on Solaris
+ 4181 8.1.0348 on Travis the slowest build is run last
+ 5581 8.1.0349 crash when wiping buffer in a callback
+ 6919 8.1.0350 Vim may block on ch_sendraw()
+ 5206 8.1.0351 'incsearch' for :/foo/s//<Esc> changes last search pattern
+ 8073 8.1.0352 browsing compressed tar files does not always work
+ 8839 8.1.0353 an "after" directory of a package is appended to 'rtp'
+ 2279 8.1.0354 packadd test fails on MS-Windows
+ 3168 8.1.0355 incorrect adjusting the popup menu for the preview window
+ 6409 8.1.0356 using :s with 'incsearch' prevents CTRL-R CTRL-W
+ 4016 8.1.0357 instructions for tests are outdated
+ 1607 8.1.0358 crash when using term_dumpwrite() after the job finished
+ 3072 8.1.0359 no clue what test failed when using a screendump twice
+237081 8.1.0360 using an external diff program is slow and inflexible
+ 4571 8.1.0361 remote user not used for completion
+227344 8.1.0362 cannot get the script line number when executing a function
+ 2800 8.1.0363 internal diff isn't used by default as advertised
+ 2130 8.1.0364 compiler warning in xdiff code
+ 28602 8.1.0365 function profile doesn't specify where it was defined
+ 3826 8.1.0366 pieces of the xdiff code are not used
+ 1749 8.1.0367 getchar(1) no longer processes pending messages
+ 20303 8.1.0368 GTK code has too many #ifdefs and GTK 2.10 building fails
+ 9213 8.1.0369 continuation lines cannot contain comments
+ 1651 8.1.0370 not using internal diff if 'diffopt' is not changed
+ 6298 8.1.0371 argument types for select() may be wrong
+ 5591 8.1.0372 screen updating slow when 'cursorline' is set
+ 1768 8.1.0373 screen updating still slow when 'cursorline' is set
+ 19602 8.1.0374 moving the cursor is slow when 'relativenumber' is set
+ 2197 8.1.0375 cannot use diff mode with Cygwin diff.exe
+ 2133 8.1.0376 compiler warning for uninitialized variable
+ 21413 8.1.0377 xdiff doesn't use the Vim memory allocation functions
+ 2048 8.1.0378 CI build failure
+125615 8.1.0379 build dependencies are incomplete
+ 6840 8.1.0380 "make proto" doesn't work well
+ 1858 8.1.0381 variable declaration not at start of block
+ 9705 8.1.0382 some make programs can't handle "xdiff/../"
+ 1782 8.1.0383 missing source file rename
+ 5127 8.1.0384 sign ordering depends on +netbeans feature
+ 2742 8.1.0385 Coveralls badge doesn't update
+ 5812 8.1.0386 cannot test with non-default option value
+ 2071 8.1.0387 no test for 'ambiwidth' detection
+ 1579 8.1.0388 Coverity complains about possible NULL pointer use
+ 2651 8.1.0389 :behave command is not tested
+ 6076 8.1.0390 scrollbars are not tested
+ 2344 8.1.0391 building in a shadow directory fails
+ 9049 8.1.0392 error while typing :/foo/s// with 'incsearch' enabled
+ 27803 8.1.0393 not all white space difference options available
+ 6228 8.1.0394 diffs are not always updated correctly
+ 1672 8.1.0395 compiler warning on 64-bit MS-Windows
+ 1768 8.1.0396 another compiler warning on 64-bit MS-Windows
+ 15721 8.1.0397 no event triggered after updating diffs
+ 4360 8.1.0398 no test for -o and -O command line arguments
+ 8813 8.1.0399 'hlsearch' highlight remains in other window
+ 2686 8.1.0400 using freed memory with :diffget
+ 8652 8.1.0401 can't get swap name of another buffer
+ 5092 8.1.0402 the DiffUpdate event isn't triggered for :diffput
+ 1357 8.1.0403 header file missing from distribution
+ 2233 8.1.0404 accessing invalid memory with long argument name
+ 68527 8.1.0405 too many #ifdefs for GTK
+ 4335 8.1.0406 several command line arguments are not tested
+ 33033 8.1.0407 quickfix code mixes using the stack and a list pointer
+ 7190 8.1.0408 MSVC: cannot use the "x64" native compiler option
+ 3554 8.1.0409 startup test fails on MS-Windows
+ 8456 8.1.0410 the ex_copen() function is too long
+ 1570 8.1.0411 renamed file missing from distribution
+ 2839 8.1.0412 cannot build with GTK 2.4
+ 2486 8.1.0413 test output is duplicated or missing
+ 3066 8.1.0414 v:option_old is cleared when using :set in OptionSet autocmd
+ 4556 8.1.0415 not actually using 16 colors with vtp
+ 2741 8.1.0416 sort doesn't report deleted lines
+ 4674 8.1.0417 several command line arguments are not tested
+ 2249 8.1.0418 MS-Windows: cannot separate Lua include and library dirs
+ 1921 8.1.0419 Cygwin: running cproto fails with -O2
+ 2056 8.1.0420 generating vim.lib when using ActivePerl 5.20.3 or later
+ 2776 8.1.0421 MS-Windows: Ruby path is wrong for Ruby 1.9 and later
+ 1647 8.1.0422 cannot create map file with MinGW
+ 2704 8.1.0423 MS-Windows: using dup-close for flushing a file
+ 3886 8.1.0424 test output is very verbose, loading CI log is slow
+ 2891 8.1.0425 ml_get error and crash with appendbufline()
+ 2598 8.1.0426 accessing invalid memory in SmcOpenConnection()
+ 2361 8.1.0427 MS-Windows GUI: using invalid encoded file name
+ 3757 8.1.0428 the :suspend command is not tested
+ 1649 8.1.0429 no test for :lcd with 'shellslash'
+ 1332 8.1.0430 Xargadd file left behind after running test
+ 15030 8.1.0431 the qf_jump() function is too long
+ 1645 8.1.0432 compiler warning for signed/unsigned
+ 2241 8.1.0433 mapping can obtain text from inputsecret()
+ 9471 8.1.0434 copy_loclist() is too long
+ 2271 8.1.0435 cursorline highlight not removed in some situation
+ 2471 8.1.0436 can get the text of inputsecret() with getcmdline()
+ 2119 8.1.0437 may access freed memory when syntax HL times out
+ 9235 8.1.0438 the ex_make() function is too long
+ 16394 8.1.0439 recursive use of getcmdline() still not protected
+ 2960 8.1.0440 remove() with a range not sufficiently tested
+ 1734 8.1.0441 build failure without command line history
+ 1685 8.1.0442 GUI: cursor not drawn after ":redraw | sleep"
+108558 8.1.0443 unnecessary static function prototypes
+ 1546 8.1.0444 unnecessary check for NULL pointer
+ 9270 8.1.0445 setting 'term' does not store location for termcap options
+ 1447 8.1.0446 options test fails in the GUI
+ 4197 8.1.0447 GUI scrollbar test fails with Athena and Motif
+ 12315 8.1.0448 cursorline not removed when using 'cursorbind'
+ 6929 8.1.0449 when 'rnu' is set folded lines are not displayed correctly
+ 2060 8.1.0450 build failure without the +fold feature
+ 6235 8.1.0451 Win32 console: keypad keys don't work
+ 3847 8.1.0452 MS-Windows: not finding intl.dll
+ 3698 8.1.0453 MS-Windows: executable() is not reliable
+ 3104 8.1.0454 resolve() was not tested with a symlink cycle
+ 6496 8.1.0455 checking for empty quickfix stack is not consistent
+ 3080 8.1.0456 running test hangs when the input file is being edited
+ 7330 8.1.0457 win32 console: key mappings don't work
+ 2997 8.1.0458 ml_get error and crash when using "do"
+ 1582 8.1.0459 Test_executable fails when there is a dog in the system
+ 3900 8.1.0460 assert_fails() does not take a message argument
+130449 8.1.0461 quickfix code uses too many /* */ comments
+ 2953 8.1.0462 when using ConPTY Vim can be a child process
+ 2527 8.1.0463 "simalt ~x" in .vimrc blocks swap file prompt
+ 2848 8.1.0464 MS-Windows: job_info() has cmd without backslashes
+ 1671 8.1.0465 client-server test fails
+ 7829 8.1.0466 autocmd test fails
+ 3658 8.1.0467 cannot build with Mac OS X 10.5
+ 3212 8.1.0468 MS-Windows: filter command with pipe character fails
+ 19665 8.1.0469 too often indexing in qf_lists[]
+ 10852 8.1.0470 pointer ownership around fname_expand() is unclear
+ 3488 8.1.0471 some tests are flaky or fail on some systems
+ 9221 8.1.0472 dosinst command has a few flaws
+ 2574 8.1.0473 user doesn't notice file does not exist when swap file does
+ 5110 8.1.0474 directory where if_perl.c is written is inconsistent
+ 15480 8.1.0475 memory not freed on exit when quit in autocmd
+ 3035 8.1.0476 memory leaks in test_escaped_glob
+ 1255 8.1.0477 tiny build fails
+ 1704 8.1.0478 cannot build with perl using MinGW
+ 4319 8.1.0479 failure when setting 'varsofttabstop' to end in a comma
+ 2299 8.1.0480 MinGW build file uses different -I flags than MVC
+ 2186 8.1.0481 when "Terminal" highlight is reverted cursor doesn't show
+ 2192 8.1.0482 MinGW "make clean" deletes all .exe files
+ 2806 8.1.0483 MinGW does not build tee.exe
+ 8349 8.1.0484 some file types are not recognized
+ 2921 8.1.0485 term_start() does not check if directory is accessible
+ 1842 8.1.0486 can't build in MS-Windows
+ 39192 8.1.0487 no menus specifically for the terminal window
+ 15995 8.1.0488 using freed memory in quickfix code
+ 5140 8.1.0489 crash when autocmd clears vimpgrep location list
+ 4061 8.1.0490 MS-Windows: doesn't handle missing glibwinpthread-1.dll
+ 1640 8.1.0491 if a terminal dump has CR it is considered corrupt
+ 3142 8.1.0492 "Edit with existing Vim" list can get long
+ 13964 8.1.0493 argv() and argc() only work on the current argument list
+ 3977 8.1.0494 functions do not check for a window ID in other tabs
+ 7883 8.1.0495 :filter only supports some commands
+ 11218 8.1.0496 no tests for indent files
+ 3122 8.1.0497 :%diffput changes order of lines
+ 3486 8.1.0498 /etc/gitconfig not recognized at a gitconfig file
+ 4415 8.1.0499 :2vimgrep causes an ml_get error
+ 1549 8.1.0500 cleaning up in src/tee may not always work
+ 1823 8.1.0501 cppcheck warns for using array index before bounds check
+ 5075 8.1.0502 internal diff fails when diffing a context diff
+ 1854 8.1.0503 missing change to diff test
+ 3277 8.1.0504 when CTRL-C is mapped it triggers InsertLeave
+ 1858 8.1.0505 filter command test may fail if helplang is not set
+ 1836 8.1.0506 modeline test fails when run by root
+ 3054 8.1.0507 .raml files not properly detected
+ 3099 8.1.0508 suspend test fails when run by root
+ 2311 8.1.0509 checking cwd not accessible fails for root
+ 2146 8.1.0510 filter test fails when $LANG is C.UTF-8
+ 2370 8.1.0511 ml_get error when calling a function with a range
+ 2387 8.1.0512 'helplang' default is inconsistent for C and C.UTF-8
+ 2564 8.1.0513 no error for set diffopt+=algorithm:
+ 26020 8.1.0514 CTRL-W ^ does not work when alternate buffer has no name
+ 8965 8.1.0515 reloading a script gives errors for existing functions
+ 4755 8.1.0516 :move command marks buffer modified when nothing changed
+ 1951 8.1.0517 Test_window_split_edit_alternate() fails on AppVeyor
+ 2801 8.1.0518 Test_window_split_edit_bufnr() fails on AppVeyor
+ 23694 8.1.0519 cannot save and restore the tag stack
+ 1717 8.1.0520 screen diff test sometimes fails
+ 1657 8.1.0521 cannot build with +eval but without +quickfix
+ 2564 8.1.0522 :terminal does not show trailing empty lines
+ 12244 8.1.0523 opening window from quickfix leaves empty buffer behind
+ 2080 8.1.0524 terminal test fails on Windows
+ 3553 8.1.0525 terminal test skips part on Windows
+ 1694 8.1.0526 running out of signal stack in RealWaitForChar
+ 1727 8.1.0527 using 'shiftwidth' from wrong buffer for folding
+ 27062 8.1.0528 various typos in comments
+ 3431 8.1.0529 flaky test sometimes fails in different ways
+ 3468 8.1.0530 channel and terminal tests that start a server can be flaky
+ 2564 8.1.0531 flaky tests often fail with a common error message
+ 10477 8.1.0532 cannot distinguish between quickfix and location list
+ 1607 8.1.0533 screendump tests can be flaky
+ 10454 8.1.0534 MS-Windows installer uses different $HOME than Vim
+ 2589 8.1.0535 increment/decrement might get interrupted by updating folds
+ 2944 8.1.0536 file time test fails when using NFS
+ 2151 8.1.0537 ui_breakcheck() may be called recursively
+ 1629 8.1.0538 evaluating a modeline might invoke using a shell command
+ 3595 8.1.0539 cannot build without the sandbox
+ 3752 8.1.0540 may evaluate insecure value when appending to option
+ 2844 8.1.0541 help message in dosinst.c is outdated
+ 13399 8.1.0542 shiftwidth() does not take 'vartabstop' into account
+ 2020 8.1.0543 Coverity warns for leaking memory and using wrong struct
+ 13034 8.1.0544 setting 'filetype' in a modeline causes an error
+ 2290 8.1.0545 when executing indent tests user preferences interfere
+ 1370 8.1.0546 modeline test with keymap fails
+ 1459 8.1.0547 modeline test with keymap still fails
+ 1682 8.1.0548 crash when job callback unloads a buffer
+ 3892 8.1.0549 netbeans test depends on README.txt contents
+ 3590 8.1.0550 expression evaluation may repeat an error message
+ 2045 8.1.0551 expression evaluation may repeat an error message
+ 3711 8.1.0552 saved last search pattern may not be restored
+ 6225 8.1.0553 it is not easy to edit a script that was sourced
+ 4062 8.1.0554 popup menu overlaps with preview window
+ 2343 8.1.0555 crash when last search pat is set but not last substitute pat
+ 3947 8.1.0556 saving/restoring search patterns share saved last_idx
+ 16010 8.1.0557 Termdebug: gdb may use X.Y for breakpoint number
+ 7059 8.1.0558 some MS-Windows instructions are outdated
+ 3535 8.1.0559 command line completion not sufficiently tested
+ 4527 8.1.0560 cannot use address type "other" with with user command
+ 1987 8.1.0561 MSCV error format has changed
+ 7029 8.1.0562 parsing of 'diffopt' is slightly wrong
+ 1734 8.1.0563 setting v:errors to a string give confusing error
+ 2097 8.1.0564 setting v:errors to wrong type still possible
+ 1779 8.1.0565 asan complains about reading before allocated block
+ 2201 8.1.0566 SGR not enabled for mintty because $TERM is "xterm"
+ 1986 8.1.0567 error for NUL byte in ScreenLines goes unnoticed
+ 2214 8.1.0568 error message for NUL byte in ScreenLines breaks Travis CI
+ 3027 8.1.0569 execute() always resets display column to zero
+ 4021 8.1.0570 'commentstring' not used when adding fold marker
+ 3527 8.1.0571 non-silent execute() resets display column to zero
+ 2180 8.1.0572 stopping a job does not work properly on OpenBSD
+ 9154 8.1.0573 cannot redefine user command without ! in same script
+ 3955 8.1.0574 'commentstring' not used when adding fold marker in C
+ 10330 8.1.0575 Termdebug: clearing multi-breakpoint does not work
+ 2167 8.1.0576 indent script tests pick up installed scripts
+ 5482 8.1.0577 tabpage right-click menu never shows "Close tab"
+ 8465 8.1.0578 cannot disable arabic, rightleft and farsi in configure
+ 74440 8.1.0579 cannot attach properties to text
+ 1447 8.1.0580 invalid memory access when using text properties
+ 1833 8.1.0581 double free without the text properties feature
+ 5788 8.1.0582 text properties are not enabled
+ 20840 8.1.0583 using illogical name for get_dict_number()/get_dict_string()
+ 2474 8.1.0584 with search CTRL-L does not pick up composing characters
+ 1787 8.1.0585 undo test may fail on MS-Windows
+ 22698 8.1.0586 :digraph output is not easy to read
+ 2232 8.1.0587 GvimExt: realloc() failing is not handled properly
+ 2976 8.1.0588 cannot define a sign with space in the text
+ 2659 8.1.0589 compilation error in gvimext.cpp
+ 6439 8.1.0590 when a job ends the closed channels are not handled
+ 1765 8.1.0591 channel sort test is flaky
+ 2767 8.1.0592 the libvterm tests are not run as part of Vim tests
+ 2936 8.1.0593 illegal memory access in libvterm test
+ 1931 8.1.0594 libvterm tests fail to run on Mac
+ 7523 8.1.0595 libvterm tests are not run with coverage
+ 4846 8.1.0596 not all parts of printf() are tested
+ 2414 8.1.0597 cannot run test_libvterm from the top directory
+ 2131 8.1.0598 indent tests may use the wrong Vim binary
+ 2250 8.1.0599 without the +eval feature the indent tests don't work
+ 1445 8.1.0600 channel test is flaky
+ 4646 8.1.0601 a few compiler warnings
+ 8027 8.1.0602 DirChanged is also triggered when directory didn't change
+ 2961 8.1.0603 the :stop command is not tested
+ 2292 8.1.0604 autocommand test fails on MS-Windows
+ 2192 8.1.0605 running make in the top directory echoes a comment
+ 3238 8.1.0606 'cryptmethod' defaults to a very old method
+ 7182 8.1.0607 proto files are not in sync with the source code
+ 1976 8.1.0608 coverals is not updating
+ 3794 8.1.0609 MS-Windows: unused variable, depending on the Ruby version
+ 5120 8.1.0610 MS-Windows ctags file list differs from Unix
+ 1607 8.1.0611 crash when using terminal with long composing characters
+ 10131 8.1.0612 cannot use two global runtime dirs with configure
+ 4845 8.1.0613 when executing an insecure function the secure flag is stuck
+111218 8.1.0614 placing signs can be complicated
+223182 8.1.0615 get_tv function names are not consistent
+2845493 8.1.0616 NSIS installer is outdated
+ 1645 8.1.0617 NSIS installer gets two files from the wrong directory
+ 2345 8.1.0618 term_getjob() does not return v:null as documented
+ 9641 8.1.0619 :echomsg and :echoerr do not handle List and Dict
+ 2828 8.1.0620 overuling CONF_ARGS from the environment no longer works
+ 3939 8.1.0621 terminal debugger does not handle unexpected debugger exit
+ 5173 8.1.0622 adding quickfix items marks items as valid errors
+ 17854 8.1.0623 iterating through window frames is repeated
+ 1971 8.1.0624 overuling CONF_ARGS from the environment still does not work
+ 2104 8.1.0625 MS-Windows: terminal test fails in white console
+ 2084 8.1.0626 MS-Windows: no resize to fit parent when using --windowid
+ 4595 8.1.0627 Python cannot handle function name of script-local function
+ 1448 8.1.0628 Compiler warning on MS-Windows.
+ 14330 8.1.0629 "gn" selects the wrong text with a multi-line match
+ 3679 8.1.0630 "wincmd p" does not work after using an autocmd window
+ 2256 8.1.0631 test for :stop fails on Arch
+ 27904 8.1.0632 using sign group names is inefficient
+ 11580 8.1.0633 crash when out of memory while opening a terminal window
+ 16046 8.1.0634 text properties cannot cross line boundaries
+ 1571 8.1.0635 Coverity complains about null pointer use
+ 9826 8.1.0636 line2byte() gives wrong values with text properties
+ 1851 8.1.0637 nsis file no longer used
+ 6807 8.1.0638 text property highlighting is off by one column
+ 1534 8.1.0639 text properties test fails on MS-Windows
+ 2888 8.1.0640 get E14 while typing command :tab with 'incsearch' set
+ 1811 8.1.0641 no check for out-of-memory when converting regexp
+ 5219 8.1.0642 swapinfo() leaks memory
+ 2518 8.1.0643 computing byte offset wrong
+ 14318 8.1.0644 finding next sign ID is inefficient
+ 1377 8.1.0645 Coverity warns for possible use of NULL pointer
+ 2766 8.1.0646 cannot build with Ruby 2.6.0
+ 8079 8.1.0647 MS-Windows: balloon_show() does not handle wide characters
+ 6503 8.1.0648 custom operators can't act upon a forced motion
+ 3823 8.1.0649 setjmp() variables defined globally are used in one file
+ 3252 8.1.0650 command line argument -q [errorfile] is not tested
+ 2172 8.1.0651 :args \"foo works like :args without argument
+ 4416 8.1.0652 freeing memory for balloon eval too early
+ 1643 8.1.0653 arglist test fails on MS-windows
+ 12277 8.1.0654 when deleting a line text property flags are not adjusted
+ 12567 8.1.0655 when appending a line text property flags are not added
+ 3082 8.1.0656 trying to reconnect to X server may cause problems
+ 1663 8.1.0657 get error for using regexp recursively
+ 48845 8.1.0658 deleting signs and completion for :sign is insufficient
+ 2270 8.1.0659 (after 8.1.0658) build failure without the sign feature
+ 5923 8.1.0660 sign_unplace() may leak memory
+ 3091 8.1.0661 clipboard regexp might be used recursively
+ 1546 8.1.0662 needlessly searching for tilde in string
+ 2173 8.1.0663 text property display wrong when 'number' is set
+ 6447 8.1.0664 configure "fail-if-missing" does not apply to enable-gui
+ 7054 8.1.0665 text property display wrong when 'spell' is set
+ 1901 8.1.0666 (after 8.1.0665) text property test fails
+ 1436 8.1.0667 (after 8.1.0665) textprop test leaves file behind
+ 2380 8.1.0668 no test for overstrike mode in the command line
+ 21392 8.1.0669 the ex_sign() function is too long
+ 1326 8.1.0670 macro for popup menu width is unused
+ 6891 8.1.0671 cursor in the wrong column after auto-formatting
+ 3083 8.1.0672 the Lua interface doesn't know about v:null
+108706 8.1.0673 functionality for signs is spread out over several files
+ 1534 8.1.0674 leaking memory when updating a single line
+ 25118 8.1.0675 text property column in screen columns is not practical
+ 2375 8.1.0676 textprop screendump test fails
+ 1682 8.1.0677 look-behind match may use the wrong line number
+ 10343 8.1.0678 text properties as not adjusted for inserted text
+ 9236 8.1.0679 sign functions do not take buffer argument as documented
+ 2013 8.1.0680 not easy to see what features are unavailable
+ 4609 8.1.0681 text properties as not adjusted for deleted text
+ 8249 8.1.0682 text properties not adjusted when backspacing replaced text
+ 1569 8.1.0683 spell highlighting does not always end
+ 4482 8.1.0684 warnings from 64-bit compiler
+ 12362 8.1.0685 get_buf_tv() is named inconsistently
+ 3369 8.1.0686 when 'y' is in 'cpoptions' yanking for clipboard changes redo
+ 2550 8.1.0687 sentence text object in Visual mode is not tested
+ 25698 8.1.0688 text properties are not restored by undo
+ 2967 8.1.0689 undo with text properties not tested
+ 2881 8.1.0690 setline() and setbufline() do not clear text properties
+ 14795 8.1.0691 text properties are not adjusted for :substitute
+ 4753 8.1.0692 if a buffer was deleted a channel can't write to it
+ 2878 8.1.0693 channel test fails sometimes
+ 2871 8.1.0694 when using text props may free memory that is not allocated
+ 5480 8.1.0695 internal error when using :popup
+ 3829 8.1.0696 when test_edit fails 'insertmode' may not be reset
+ 25979 8.1.0697 ":sign place" requires the buffer argument
+ 3901 8.1.0698 clearing the window is used too often
+ 1529 8.1.0699 compiler warning for uninitialized variable
+ 1400 8.1.0700 using "gt" sometimes does not redraw a tab
+ 12245 8.1.0701 sign message not translated and inconsistent spacing
+ 4245 8.1.0702 ":sign place" only uses the current buffer
+ 2917 8.1.0703 compiler warnings with 64-bit compiler
+ 1805 8.1.0704 building with Ruby 2.6 gives compiler warnings
+ 2073 8.1.0705 :colorscheme isn't tested enough
+ 10220 8.1.0706 tabline is not always redrawn
+ 4523 8.1.0707 text property columns are not adjusted for changed indent
+ 5125 8.1.0708 third argument for redrawWinline() is always FALSE
+ 9751 8.1.0709 windows are updated for every added/deleted sign
+ 5478 8.1.0710 when using timers may wait for job exit quite long
+ 88709 8.1.0711 test files still use function!
+ 11228 8.1.0712 MS-Windows build instructions are a bit outdated
+2879878 8.1.0713 images for NSIS take up too much space
+ 3787 8.1.0714 unessesary #if lines in GTK code
+ 1748 8.1.0715 superfluous call to redraw_win_later()
+ 8517 8.1.0716 get warning message when 'completefunc' returns nothing
+ 22574 8.1.0717 there is no function for the ":sign jump" command
+ 2555 8.1.0718 a couple compiler warnings
+ 16561 8.1.0719 too many #ifdefs
+ 18271 8.1.0720 cannot easily change the current quickfx list index
+ 24146 8.1.0721 conceal mode is not sufficiently tested
+ 4462 8.1.0722 cannot build without the virtualedit feature
+ 25260 8.1.0723 cannot easily run specific test when in src/testdir
+ 2775 8.1.0724 build for MinGW fails
+ 5440 8.1.0725 conceal mode is not completely tested
+ 9198 8.1.0726 redrawing specifically for conceal feature
+ 1636 8.1.0727 compiler warning for sprintf() argument
+ 6031 8.1.0728 cannot avoid breaking after a single space.
+ 6207 8.1.0729 there is a SourcePre autocommand event but not a SourcePost
+ 1467 8.1.0730 compiler warning for get_buf_arg() unused
+ 7330 8.1.0731 JS encoding does not handle negative infinity
+ 1945 8.1.0732 cannot build without the eval feature
+ 15261 8.1.0733 too many #ifdefs for the multi-byte feature
+ 2368 8.1.0734 the hlsearch state is not stored in a session file
+ 93900 8.1.0735 cannot handle binary data
+ 21855 8.1.0736 code for Blob not sufficiently tested
+ 1536 8.1.0737 compiler warning for uninitialized variable
+ 2685 8.1.0738 using freed memory, for loop over blob leaks memory
+ 4939 8.1.0739 text objects in not sufficiently tested
+ 1627 8.1.0740 Tcl test fails
+ 7882 8.1.0741 viminfo with Blob is not tested
+ 5228 8.1.0742 not all Blob operations are tested
+695671 8.1.0743 giving error messages is not flexible
+ 6693 8.1.0744 compiler warnings for signed/unsigned strings
+ 2088 8.1.0745 compiler warnings for signed/unsigned string
+ 5138 8.1.0746 highlighting not updated with conceal and 'cursorline'
+ 4041 8.1.0747 map() with a bad expression doesn't give an error
+ 4379 8.1.0748 using sprintf() instead of semsg()
+ 1939 8.1.0749 error message contains garbage
+ 3401 8.1.0750 when the last sign is deleted the signcolumn may remain
+ 1646 8.1.0751 some regexp errors are not tested
+ 1527 8.1.0752 one more compiler warning for signed/unsigned string
+ 14694 8.1.0753 printf format not checked for semsg()
+ 2598 8.1.0754 preferred column is lost when setting 'cursorcolumn'
+ 2909 8.1.0755 error message for get() on a Blob with invalid index
+ 2516 8.1.0756 copy() does not make a copy of a Blob
+ 11449 8.1.0757 not enough documentation for Blobs
+ 1885 8.1.0758 font number is always one instead of the actual
+ 14841 8.1.0759 showing two characters for tab is limited
+ 7829 8.1.0760 no proper test for using 'termencoding'
+ 1656 8.1.0761 default value for brief_wait is wrong
+ 1629 8.1.0762 compiler warning
+146961 8.1.0763 nobody is using the Sun Workshop support
+ 2241 8.1.0764 list of distributed files is outdated
+ 5262 8.1.0765 string format of a Blob can't be parsed back
+ 24279 8.1.0766 various problems when using Vim on VMS
+ 5124 8.1.0767 when deleting lines at the bottom signs are misplaced
+ 8147 8.1.0768 updating completions may cause the popup menu to flicker
+ 3416 8.1.0769 :stop is covered in two tests
+ 6869 8.1.0770 inconsistent use of ELAPSED_FUNC
+ 7093 8.1.0771 some shell filetype patterns end in a star
+ 7973 8.1.0772 the sign_define_by_name() function is too long
+ 7896 8.1.0773 not all crypt code is tested
+ 7676 8.1.0774 VMS build is missing the blob file
+ 3420 8.1.0775 matching too many files as zsh
+ 2307 8.1.0776 Travis does not build a version without GUI on Linux
+ 5010 8.1.0777 Win32: using pipes for channel does not work well
+ 1656 8.1.0778 terminal test fails on MS-Windows
+209043 8.1.0779 argument for message functions is inconsistent
+ 1604 8.1.0780 terminal test fails on Mac
+ 1584 8.1.0781 build error when using if_xcmdsrv.c
+ 2424 8.1.0782 Win32: cursor blinks when Vim is not active
+ 2756 8.1.0783 compiler warning for signed/unsigned
+ 3266 8.1.0784 messy indent in if statement
+ 23781 8.1.0785 depending on the configuration some functions are unused
+ 4406 8.1.0786 ml_get error when updating the status line
+ 3765 8.1.0787 compiler warning for unused function
+ 6190 8.1.0788 cannot build with tiny features
+ 2277 8.1.0789 sourcing a session sets v:errmsg
+ 2320 8.1.0790 code for creating tabpages in session is too complex
+ 2441 8.1.0791 a few compiler warnings on VMS
+ 2632 8.1.0792 bad display if opening cmdline window from Insert completion
+ 13053 8.1.0793 incorrect error messages for functions that take a Blob
+ 2119 8.1.0794 white space before " -Ntabmove" causes problems
+ 1531 8.1.0795 cannot build without popup menu
+ 2678 8.1.0796 MS-Windows 7: problem with named pipe on channel
+ 3399 8.1.0797 error E898 is used twice
+ 5792 8.1.0798 changing a blob while iterating over it works strangely
+ 3673 8.1.0799 calling deleted function; test doesn't work on Mac
+ 2461 8.1.0800 may use a lot of memory when a function refers itself
+ 1774 8.1.0801 MinGW: no hint that tests fail because of small terminal
+ 4055 8.1.0802 negative index doesn't work for Blob
+ 2695 8.1.0803 session file has problem with single quote in file name
+ 2498 8.1.0804 crash when setting v:errmsg to empty list
+169444 8.1.0805 too many #ifdefs
+168573 8.1.0806 too many #ifdefs
+ 1537 8.1.0807 session test fails on MS-Windows
+ 1712 8.1.0808 MS-Windows: build error with GUI
+130242 8.1.0809 too many #ifdefs
+129728 8.1.0810 too many #ifdefs
+ 52979 8.1.0811 too many #ifdefs
+ 5050 8.1.0812 Unicode 16 feature is not useful
+ 3806 8.1.0813 FileChangedShell not sufficiently tested
+ 7655 8.1.0814 :mksession cannot handle a very long 'runtimepath'
+ 13274 8.1.0815 dialog for file changed outside of Vim not tested
+ 1626 8.1.0816 test for 'runtimepath' in session fails on MS-Windows
+ 2659 8.1.0817 ":=" command is not tested
+ 5081 8.1.0818 MS-Windows: cannot send large data with ch_sendraw()
+ 5999 8.1.0819 a failed assert with a long string is hard to read
+ 11935 8.1.0820 test for sending large data over channel sometimes fails
+ 7589 8.1.0821 xxd "usage" output and other arguments not tested
+ 4371 8.1.0822 peeking and flushing output slows down execution
+ 2885 8.1.0823 not sufficient testing of xxd
+ 16554 8.1.0824 SunOS/Solaris has a problem with ttys
+160801 8.1.0825 code for autocommands is mixed with file I/O code
+ 79548 8.1.0826 too many #ifdefs
+ 2331 8.1.0827 missing dependency in Makefile
+ 1764 8.1.0828 still using FEAT_VIRTUALEDIT
+ 3964 8.1.0829 when 'hidden' is set session creates extra buffers
+ 1667 8.1.0830 test leaves directory behind on MS-Windows
+ 3435 8.1.0831 xxd test fails if man page has dos fileformat
+ 3286 8.1.0832 confirm() is not tested
+ 1419 8.1.0833 memory leak when jumps output is filtered
+ 19328 8.1.0834 GUI may wait too long before dealing with messages
+ 1717 8.1.0835 GUI build fails on MS-Windows
+ 2075 8.1.0836 user completion test can fail on MS-Windows
+ 5401 8.1.0837 timer interrupting cursorhold and mapping not tested
+ 1877 8.1.0838 compiler warning for type conversion
+ 1660 8.1.0839 when using VTP wrong colors after a color scheme change
+ 6189 8.1.0840 getchar(0) never returns a character in the terminal
+ 2400 8.1.0841 travis config to get Lua on MacOS is too complicated
+ 2229 8.1.0842 getchar_zero test fails on MS-Windows
+ 2663 8.1.0843 memory leak when running "make test_cd"
+ 2082 8.1.0844 when timer fails test will hang forever
+ 9689 8.1.0845 having job_status() free the job causes problems
+ 10132 8.1.0846 not easy to recognize the system Vim runs on
+ 2469 8.1.0847 may use terminal after it was cleaned up
+ 1665 8.1.0848 cannot build with Ruby 1.8
+ 3979 8.1.0849 cursorline highlight is not always updated
+ 4047 8.1.0850 test for 'backupskip' is not correct
+ 4451 8.1.0851 feedkeys() with "L" does not work properly
+ 8567 8.1.0852 findfile() and finddir() are not properly tested
+ 2021 8.1.0853 options test fails on Mac
+ 7452 8.1.0854 xxd does not work with more than 32 bit addresses
+ 1878 8.1.0855 cannot build xxd with MSVC 10
+ 3082 8.1.0856 when scrolling a window the cursorline is not always updated
+263547 8.1.0857 indent functionality is not separated
+ 5294 8.1.0858 'indentkeys' and 'cinkeys' defaults are different
+ 4559 8.1.0859 "%v" in 'errorformat' does handle multi-byte characters
+ 1577 8.1.0860 debug lines left in the code
+ 1546 8.1.0861 building with MinGW and static libc doesn't work
+ 10042 8.1.0862 no verbose version of character classes
+ 5849 8.1.0863 cannot see what signal caused a job to end
+ 37593 8.1.0864 cannot have a local value for 'scrolloff' and 'sidescrolloff'
+ 2879 8.1.0865 when 'listchars' only contains "nbsp:X" it does not work
+ 9652 8.1.0866 build file dependencies are outdated
+ 4845 8.1.0867 cannot build Python interface with Python 2.4
+ 1848 8.1.0868 crash if triggering garbage collector after a function call
+ 18955 8.1.0869 Travis CI script is too complicated
+ 47967 8.1.0870 Vim doesn't use the new ConPTY support in Windows 10
+ 1446 8.1.0871 build error when building with Ruby 2.6.0
+ 1683 8.1.0872 confusing condition
+ 1593 8.1.0873 list if distributed files does not include matchit autoload
+158253 8.1.0874 using old style comments in new file
+ 3442 8.1.0875 not all errors of marks and findfile()/finddir() are tested
+ 2056 8.1.0876 completion match not displayed when popup menu is not shown
+ 10004 8.1.0877 new buffer used every time the quickfix window is opened
+ 1769 8.1.0878 test for has('bsd') fails on some BSD systems
+ 1843 8.1.0879 MS-Windows: temp name encoding can be wrong
+ 30820 8.1.0880 MS-Windows: inconsistent selection of winpty/conpty
+ 13095 8.1.0881 can execute shell commands in rvim through interfaces
+ 1403 8.1.0882 checking for FEAT_MBYTE which doesn't exist anymore
+ 7430 8.1.0883 missing some changes for Ex commands
+ 1665 8.1.0884 double check for bsd systems
+ 1510 8.1.0885 test for restricted hangs on MS-Windows GUI
+ 3645 8.1.0886 compiler warning for NULL pointer and condition always true
+ 3192 8.1.0887 the 'l' flag in :subsitute is sticky
+ 10420 8.1.0888 the a: dict is not immutable as documented
+ 3538 8.1.0889 MS-Windows: a channel write may hang
+ 6691 8.1.0890 pty allocation wrong if using file for out channel
+ 4312 8.1.0891 substitute command inssuficiently tested
+ 14682 8.1.0892 failure when closing a window when location list is in use
+ 1677 8.1.0893 terminal test is a bit flaky
+ 13459 8.1.0894 MS-Windows: resolve() does not return a reparse point
+ 3966 8.1.0895 MS-Windows: dealing with temp name encoding not quite right
+ 3159 8.1.0896 tests for restricted mode not run for MS-Windows GUI
+ 19290 8.1.0897 can modify a:000 when using a reference
+ 2386 8.1.0898 a messed up rgb.txt can crash Vim
+ 1418 8.1.0899 no need to check restricted mode for setwinvar()
+ 2498 8.1.0900 ConPTY many crash with 32-bit build
+ 3675 8.1.0901 index in getjumplist() may be wrong
+ 13906 8.1.0902 incomplete set of assignment operators
+ 2195 8.1.0903 struct uses more bytes than needed
+ 4947 8.1.0904 USE_LONG_FNAME never defined
+ 9955 8.1.0905 complicated regexp causes a crash
+ 2066 8.1.0906 using clumsy way to get console window handle
+ 1671 8.1.0907 CI tests on AppVeyor are failing
+ 2283 8.1.0908 can't handle large value for %{nr}v in regexp
+ 5447 8.1.0909 MS-Windows: using ConPTY even though it is not stable
+ 4043 8.1.0910 crash with tricky search pattern
+ 5088 8.1.0911 tag line with Ex command cannot have extra fields
+ 2408 8.1.0912 MS-Windows: warning for signed/unsigned
+ 3460 8.1.0913 CI crashes when running out of memory
+170148 8.1.0914 code related to findfile() is spread out
+ 5083 8.1.0915 fsync() may not work properly on Mac
+ 4627 8.1.0916 with Python 3.7 "find_module" is not made available
+ 2184 8.1.0917 double free when running out of memory
+ 10678 8.1.0918 MS-Windows: startup messages are not converted
+ 2646 8.1.0919 compiler warnings
+ 14433 8.1.0920 in Terminal-Normal mode job output messes up the window
+ 4270 8.1.0921 terminal test sometimes fails; using memory after free
+ 5083 8.1.0922 terminal scrollback test is flaky
+ 3820 8.1.0923 terminal dump diff swap does not update file names
+ 2123 8.1.0924 terminal scrollback test still flaky
+ 5849 8.1.0925 terminal scrollback test still still flaky
+ 4714 8.1.0926 no test for :wnext, :wNext and :wprevious
+ 18921 8.1.0927 USE_CR is never defined
+ 1537 8.1.0928 stray log function call
+ 4756 8.1.0929 no error when requesting ConPTY but it's not available
+ 2589 8.1.0930 typo in Makefile
+ 2569 8.1.0931 vtp_working included in GUI build but unused
+267904 8.1.0932 Farsi support is outdated and unused
+ 14246 8.1.0933 When using VTP scroll region isn't used properly
+ 2112 8.1.0934 invalid memory access in search pattern
+ 2146 8.1.0935 old regexp engine may use invalid buffer
+ 3916 8.1.0936 may leak memory when using 'vartabstop'
+ 2146 8.1.0937 invalid memory access in search pattern
+ 1860 8.1.0938 background color is wrong in MS-Windows console
+ 12857 8.1.0939 no completion for sign group names
+ 5938 8.1.0940 MS-Windows console resizing not handled properly
+226163 8.1.0941 macros for MS-Windows are inconsistent
+ 6305 8.1.0942 options window still checks for the multi_byte feature
+ 2152 8.1.0943 still a trace of Farsi support
+ 4158 8.1.0944 format of nbdbg() arguments is not checked
+ 3084 8.1.0945 internal error when using pattern with NL in the range
+ 3244 8.1.0946 Coveralls is not very useful
+ 2615 8.1.0947 using MSWIN before it is defined
+ 2829 8.1.0948 when built without +eval "Vim --clean" produces errors
+ 11287 8.1.0949 MS-windows defines GUI macros different than other systems
+ 3724 8.1.0950 using :python sets 'pyxversion' even when not executed
+ 1603 8.1.0951 using WIN64 even though it is never defined
+ 5876 8.1.0952 compilation warnings when building the MS-Windows installer
+ 3173 8.1.0953 a very long file is truncated at 2^31 lines
+ 3607 8.1.0954 arguments of semsg() and siemsg() are not checked
+ 1658 8.1.0955 matchit autoload directory not in installer
+ 10434 8.1.0956 using context:0 in 'diffopt' does not work well
+ 1611 8.1.0957 Mac: fsync fails on network share
+ 7099 8.1.0958 compiling weird regexp pattern is very slow
+ 5706 8.1.0959 sorting large numbers is not tested
+ 3835 8.1.0960 when using ConPTY garbage collection has undefined behavior
+ 1555 8.1.0961 Mac: fsync may fail sometimes
+ 1503 8.1.0962 building with MinGW and static libs doesn't work
+ 3106 8.1.0963 illegal memory access when using 'incsearch'
+ 2270 8.1.0964 cannot see in CI why a screenshot test failed
+ 2260 8.1.0965 search test fails
+ 1507 8.1.0966 one terminal test is flaky
+ 1679 8.1.0967 stray dependency in test Makefile
+ 2081 8.1.0968 crash when using search pattern \%Ufffffc23
+ 2159 8.1.0969 message written during startup is truncated
+ 2597 8.1.0970 text properties test fails when 'encoding' is not utf-8
+ 7477 8.1.0971 failure for selecting quoted text object moves cursor
+ 4056 8.1.0972 cannot switch from terminal window to next tabpage
+ 3956 8.1.0973 pattern with syntax error gives threee error messages
+ 4784 8.1.0974 cannot switch from terminal window to previous tabpage
+ 3689 8.1.0975 using STRNCPY() wrongly. Warning for uninitialized variable
+ 12842 8.1.0976 dosinstall still has buffer overflow problems
+ 2932 8.1.0977 blob not tested with Ruby
+ 2284 8.1.0978 blob not tested with Perl
+ 1689 8.1.0979 compiler warning for unused functions
+ 4464 8.1.0980 extend() insufficiently tested
+ 1864 8.1.0981 pasting in terminal insufficiently tested
+ 1928 8.1.0982 update_cursor() called twice in :shell
+ 3804 8.1.0983 checking __CYGWIN32__ unnecessarily
+ 4627 8.1.0984 unnecessary #ifdefs
+ 3296 8.1.0985 crash with large number in regexp
+ 6142 8.1.0986 rename() is not propertly tested
+ 2122 8.1.0987 unnecessary condition in #ifdef
+ 4470 8.1.0988 deleting location list buffer breaks location list window
+ 17243 8.1.0989 various small code ugliness
+ 6273 8.1.0990 floating point exception with "%= 0" and "/= 0"
+ 2306 8.1.0991 cannot build with a mix of features
+ 4377 8.1.0992 a :normal command resets the reg_executing() result
+ 7697 8.1.0993 ch_read() may return garbage if terminating NL is missing
+ 8342 8.1.0994 relative cursor position is not calculated correctly
+ 2880 8.1.0995 a getchar() call resets the reg_executing() result
+ 3591 8.1.0996 a few screendump tests fail because of scrolling
+ 1488 8.1.0997 using GUI colors in vim.exe when 'termguicolors' is off
+ 2591 8.1.0998 getcurpos() unexpectedly changes "curswant"
+ 5001 8.1.0999 use register one too often and not properly tested
+ 11973 8.1.1000 indenting is off
+ 3798 8.1.1001 Visual area not correct when using 'cursorline'
+ 3552 8.1.1002 "gf" does not always work when URL has a port number
+ 2427 8.1.1003 playing back recorded key sequence mistakes key code
+ 1556 8.1.1004 function "luaV_setref()" not covered with tests
+ 2062 8.1.1005 test fails because t_F2 is not set
+ 19270 8.1.1006 repeated code in quickfix support
+ 16974 8.1.1007 using closure may consume a lot of memory
+ 1766 8.1.1008 MS-Windows: HAVE_STDINT_H only defined for non-debug version
+ 1776 8.1.1009 MS-Windows: some text is not baseline aligned
+ 2554 8.1.1010 Lua interface leaks memory
+ 2415 8.1.1011 indent from autoindent not removed from blank line
+ 1347 8.1.1012 memory leak with E461
+ 3869 8.1.1013 MS-Windows: Scrolling fails when dividing the screen
+ 1968 8.1.1014 MS-Windows: /analyze only defined for non-debug version
+ 16056 8.1.1015 quickfix buffer shows up in list, can't get buffer number
+ 5067 8.1.1016 MS-Windows: No color in shell when using "!" in 'guioptions
+ 3468 8.1.1017 off-by-one error in filetype detection
+ 1773 8.1.1018 window cleared when entering Terminal-Normal twice
+ 16823 8.1.1019 Lua: may garbage collect function reference in use
+ 1762 8.1.1020 compiler warning for Python3 interface
+ 4050 8.1.1021 pyeval() and py3eval() leak memory
+ 1374 8.1.1022 may use NULL pointer when out of memory
+ 1578 8.1.1023 may use NULL pointer when indexing a blob
+ 1901 8.1.1024 stray log calls in terminal code
+ 1843 8.1.1025 checking NULL pointer after addition
+ 4391 8.1.1026 unused condition
+ 1700 8.1.1027 memory usage test sometimes fails
+ 1402 8.1.1028 MS-Windows: memory leak when creating terminal fails
+ 2329 8.1.1029 DirectWrite doesn't take 'linespace' into account
+ 24096 8.1.1030 quickfix function arguments are inconsistent
+ 3671 8.1.1031 memory usage test may still fail
+ 11462 8.1.1032 warnings from clang static analyzer
+ 1834 8.1.1033 memory usage test may still fail on some systems
+ 12301 8.1.1034 too many #ifdefs
+ 6377 8.1.1035 prop_remove() second argument is not optional
+ 6723 8.1.1036 quickfix function arguments are inconsistent
+ 1846 8.1.1037 memory usage test may still fail on some systems
+ 96322 8.1.1038 Arabic support excludes Farsi
+ 40423 8.1.1039 MS-Windows build fails
+ 6022 8.1.1040 FEAT_TAG_ANYWHITE is not enabled in any build
+ 2809 8.1.1041 test for Arabic no longer needed
+ 1671 8.1.1042 the paste test doesn't work properly in the Windows console
+ 19649 8.1.1043 Lua interface does not support Blob
+ 9667 8.1.1044 no way to check the reference count of objects
+ 7527 8.1.1045 E315 ml_get error when using Python and hidden buffer
+ 2627 8.1.1046 the "secure" variable is used inconsistently
+ 2844 8.1.1047 WINCH signal is not tested
+ 4571 8.1.1048 minor issues with tests
+ 3634 8.1.1049 when user tries to exit with CTRL-C message is confusing
+ 1626 8.1.1050 blank srceen when DirectWrite failed
+ 2326 8.1.1051 not all ways to switch terminal mode are tested
+ 1703 8.1.1052 test for CTRL-C message sometimes fails
+ 1320 8.1.1053 warning for missing return statement
+ 2032 8.1.1054 not checking return value of ga_grow()
+ 8364 8.1.1055 CTRL-G U in Insert mode doesn't work for shift-Left
+ 49686 8.1.1056 no eval function for Ruby
+ 2811 8.1.1057 nsis config is too complicated
+ 2108 8.1.1058 memory usage test may still fail on some systems
+ 2095 8.1.1059 MS-Windows: PlatformId() is called unnecessarily
+ 7334 8.1.1060 MS-Windows: get_cmd_args() is no longer needed
+ 3310 8.1.1061 when substitute string throws error, substitute happens anyway
+ 17335 8.1.1062 quickfix code is repeated
+ 3443 8.1.1063 insufficient testing for wildmenu completion
+ 1742 8.1.1064 no test for output conversion in the GTK GUI
+ 1704 8.1.1065 no test for using and deleting menu in the GUI
+ 8278 8.1.1066 VIMDLL isn't actually used
+ 3239 8.1.1067 issues added on github are unstructured
+ 19969 8.1.1068 cannot get all the information about current completion
+ 15120 8.1.1069 source README file doesn't look nice on github
+ 4765 8.1.1070 issue templates are not good enough
+ 10316 8.1.1071 cannot get composing characters from the screen
+ 86042 8.1.1072 extending sign and foldcolumn below the text is confusing
+ 4243 8.1.1073 space in number column is on wrong side with 'rightleft' set
+ 5893 8.1.1074 Python test doesn't wipe out hidden buffer
+ 1638 8.1.1075 function reference count wrong in Python code
+269910 8.1.1076 file for Insert mode is much too big
+ 4106 8.1.1077 reg_executing() is reset by calling input()
+ 3611 8.1.1078 when 'listchars' is set a composing char on a space is wrong
+ 3499 8.1.1079 no need for a separate ScreenLinesUtf8() test function
+ 2313 8.1.1080 when a screendump test fails, moving the file is a hassle
+ 32417 8.1.1081 MS-Windows: cannot use some fonts
+ 2521 8.1.1082 "Conceal" match is mixed up with 'hlsearch' match.
+ 8977 8.1.1083 MS-Windows: hang when opening a file on network share
+ 20398 8.1.1084 cannot delete a match from another window
+ 2252 8.1.1085 compiler warning for possibly uninitialized variable
+ 37426 8.1.1086 too many curly braces
+ 4548 8.1.1087 tag stack is incorrect after CTRL-T and then :tag
+ 3079 8.1.1088 height of quickfix window not retained with vertical split
+ 3969 8.1.1089 tutor does not check $LC_MESSAGES
+ 2449 8.1.1090 MS-Windows: modify_fname() has problems with some 'encoding'
+ 5103 8.1.1091 MS-Windows: cannot use multi-byte chars in environment var
+ 3320 8.1.1092 setting 'guifont' when maximized resizes the Vim window
+ 10019 8.1.1093 support for outdated tags format slows down tag parsing
+ 4966 8.1.1094 long line in tags file causes error
+ 3585 8.1.1095 MS-Windows: executable() fails on very long filename
+ 2445 8.1.1096 MS-Windows: cannot distinguish BS and CTRL-H
+ 2244 8.1.1097 Motif build fails
+ 11277 8.1.1098 quickfix code duplication
+ 36025 8.1.1099 the do_tag() function is too long
+ 2583 8.1.1100 tag file without trailing newline no longer works
+ 1533 8.1.1101 signals test may fail in the GUI
+ 3131 8.1.1102 Win32 exe file contains unused code
+110822 8.1.1103 MS-Windows: old API calls are no longer needed
+ 6177 8.1.1104 MS-Windows: not all environment variables can be used
+ 3520 8.1.1105 long escape sequences may be split up
+ 1700 8.1.1106 no test for 'writedelay'
+ 1512 8.1.1107 no test for 'visualbell'
+ 1308 8.1.1108 test for 'visualbell' doesn't work
+ 1356 8.1.1109 deleted file still in list of distributed files
+ 5161 8.1.1110 composing chars on space wrong when 'listchars' is set
+ 5153 8.1.1111 it is not easy to check for infinity
+ 13102 8.1.1112 duplicate code in quickfix file
+ 12932 8.1.1113 making an autocommand trigger once is not so easy
+ 8005 8.1.1114 confusing overloaded operator "." for string concatenation
+ 2878 8.1.1115 cannot build with older C compiler
+ 26599 8.1.1116 cannot enforce a Vim script style
+ 1656 8.1.1117 build failure without the +eval feature
+ 4357 8.1.1118 a couple of conditions are hard to understand
+150623 8.1.1119 no support for Windows on ARM64.
+ 12141 8.1.1120 cannot easily get directory entry matches
+ 2613 8.1.1121 test for term_gettitle() was disabled
+ 10288 8.1.1122 char2nr() does not handle composing characters
+ 11693 8.1.1123 no way to avoid filtering for autocomplete function
+ 27112 8.1.1124 insert completion flags are mixed up
+ 9417 8.1.1125 libvterm does not handle the window position report
+ 1659 8.1.1126 build failure with +terminal but without tgetent
+ 6364 8.1.1127 getwinpos() doesn't work in terminal on MS-Windows console
+ 1582 8.1.1128 getwinpos() test does not work on MS-Windows
+ 3062 8.1.1129 when making a new screendump test have to create the file
+ 1353 8.1.1130 MS-Windows: warning for unused variable
+ 5938 8.1.1131 getwinpos() does not work in the MS-Windows console
+ 2624 8.1.1132 getwinpos() test fails on MS-Windows
+ 1668 8.1.1133 compiler warning for uninitialized struct member
+ 2046 8.1.1134 buffer for quickfix window is reused for another file
+ 1327 8.1.1135 build failure for small version
+ 4655 8.1.1136 decoding of mouse click escape sequence is not tested
+ 3658 8.1.1137 xterm mouse wheel escape sequence is not tested
+ 13009 8.1.1138 plugins don't get notified when the popup menu changes
+ 1779 8.1.1139 no test for what is fixed in patch 8.1.0716
+ 11330 8.1.1140 not easy to find out what neighbors a window has
+ 2370 8.1.1141 terminal winpos test fails with very large terminal
+ 3089 8.1.1142 no test for dragging the window separators with the mouse
+ 7653 8.1.1143 may pass weird strings to file name expansion
+ 3063 8.1.1144 too strict checking of the 'spellfile' option
+ 1544 8.1.1145 compiler warning for unused function
+ 2057 8.1.1146 in MS-Windows console colors in a terminal window are wrong
+ 23276 8.1.1147 desktop file translations are requiring manual updates
+ 4210 8.1.1148 CTRL-L with 'incsearch' does not pick up char under cursor
+ 5358 8.1.1149 building desktop files fails with older msgfmt
+ 1773 8.1.1150 generating desktop files not tested on Travis
+ 1944 8.1.1151 build fails when using shadow directory
+ 1507 8.1.1152 compiler warning with VS2019
+ 1477 8.1.1153 msgfmt complains about missing LINGUAS file
+ 2094 8.1.1154 getting a newer msgfmt on Travis is too complicated
+ 11428 8.1.1155 termcodes tests can be improved
+ 1832 8.1.1156 Unicode emoji and other image characters not recognized
+ 6593 8.1.1157 Unicode tables are out of date
+ 2580 8.1.1158 json encoded string is sometimes missing the final NUL
+ 1444 8.1.1159 MS-Windows: with a silent (un)install $VIM/_vimrc is removed
+ 2119 8.1.1160 termcodes test would fail in a very big terminal
+ 4922 8.1.1161 unreachable code
+ 4451 8.1.1162 incorrect coverage information; typo in color name
+ 1619 8.1.1163 codecov does not report all the coverage information
+ 3865 8.1.1164 gettitle test is failing when server name differs
+ 4793 8.1.1165 no test for mouse clicks in the terminal tabpage line
+ 2715 8.1.1166 gettitle test can still fail when another Vim is running
+ 5628 8.1.1167 no test for closing tab by click in tabline
+ 1797 8.1.1168 not all screen update code of terminal is executed in tests
+ 2453 8.1.1169 writing coverage info in a separate dir is not needed
+ 4560 8.1.1170 terminal ANSI color test does not cover all colors
+ 6529 8.1.1171 statusline test could fail in large terminal
+ 3726 8.1.1172 cursor properties were not fully tested
+ 3590 8.1.1173 suspend test has duplicated lines
+ 1579 8.1.1174 cannot build with Ruby 1.8
+ 4592 8.1.1175 no test for dragging a tab and double click for new tab
+ 1605 8.1.1176 test for dragging a tab is flaky
+ 2901 8.1.1177 .ts files are recognized as xml, typescript is more common
+ 14525 8.1.1178 when mouse click tests fails value of 'ttytype' is unknown
+ 3112 8.1.1179 no test for mouse clicks in the fold column
+ 14037 8.1.1180 Vim script debugger tests are old style
+ 7761 8.1.1181 tests for mouse clicks are a bit flaky
+ 5970 8.1.1182 some function prototypes are outdated
+ 4572 8.1.1183 typos in VisVim comments
+ 1481 8.1.1184 undo file left behind after running test
+ 2292 8.1.1185 mapping for CTRL-X is inconsistent
+ 1980 8.1.1186 readdir() allocates list twice
+ 3267 8.1.1187 cannot recognize Pipfile
+ 7225 8.1.1188 not all Vim variables require the v: prefix
+ 3968 8.1.1189 mode is not cleared when leaving Insert mode
+ 2092 8.1.1190 has('vimscript-3') does not work
+ 9991 8.1.1191 not all debug commands are covered by a test
+ 6311 8.1.1192 mode is not cleared when leaving Insert mode with mapped Esc
+ 5321 8.1.1193 typos and small problems in test files
+ 7698 8.1.1194 typos and small problems in source files
+ 64388 8.1.1195 Vim script debugger functionality needs cleanup
+ 12887 8.1.1196 parallel build may fail
+ 3956 8.1.1197 when starting with multiple tabs file messages is confusing
+ 2533 8.1.1198 bracketed paste may remain active after Vim exists
+ 2943 8.1.1199 no test for :abclear
+ 21186 8.1.1200 old style comments in debugger source
+ 10988 8.1.1201 output of :command is hard to read
+ 1879 8.1.1202 always get regexp debugging logs when building with -DDEBUG
+ 17203 8.1.1203 some autocmd tests are old style
+ 9395 8.1.1204 output of :command with address completion is not nice
+ 7023 8.1.1205 a BufReadPre autocommand may cause the cursor to move
+ 8995 8.1.1206 user command parsing and listing not properly tested
+ 3025 8.1.1207 some compilers give warning messages
+ 2199 8.1.1208 links to repository use wrong file name
+ 2616 8.1.1209 clever compiler warns for buffer being too small
+117011 8.1.1210 support for user commands is spread out
+ 4298 8.1.1211 not all user command code is tested
+ 4462 8.1.1212 signal PWR is not tested
+ 3079 8.1.1213 "make clean" in top dir does not cleanup indent test output
+ 11828 8.1.1214 old style tests
+ 1429 8.1.1215 "make clean" does not remove generated src/po files
+ 3860 8.1.1216 mouse middle click is not tested
+ 1721 8.1.1217 MS-Windows: no space reserved for font quality name
+ 42786 8.1.1218 cannot set a directory for a tab page
+ 14028 8.1.1219 not checking for NULL return from alloc()
+ 2167 8.1.1220 build fails on MS-Windows
+ 6561 8.1.1221 filtering does not work when listing marks
+ 2213 8.1.1222 build still fails on MS-Windows
+ 2360 8.1.1223 middle mouse click test fails without a clipboard
+ 20780 8.1.1224 MS-Windows: cannot specify font weight
+ 5031 8.1.1225 cannot create a pty to use with :terminal on FreeBSD
+172695 8.1.1226 {not in Vi} remarks get in the way of useful help text
+ 2978 8.1.1227 duplicate entries in the generate .desktop files
+ 42644 8.1.1228 not possible to process tags with a function
+ 1501 8.1.1229 warning for posix_openpt() not declared
+135495 8.1.1230 a lot of code is shared between vim.exe and gvim.exe
+ 26456 8.1.1231 asking about existing swap file unnecessarily
+ 7360 8.1.1232 can't build on MS-Windows
+ 1487 8.1.1233 cannot build tiny version
+ 2359 8.1.1234 swap file test fails on MS-Windows
+ 2101 8.1.1235 compiler warnings for using STRLEN() value
+ 2082 8.1.1236 sjiscorr.c not found in shadow directory
+ 4663 8.1.1237 error for using "compl", reserved word in C++
+ 1630 8.1.1238 MS-Windows: compiler warning for sprintf() format
+ 3170 8.1.1239 key with byte sequence containing CSI does not work
+ 2567 8.1.1240 runtime desktop files are overwritten by build
+126633 8.1.1241 Ex command info contains confusing information
+ 5153 8.1.1242 no cmdline redraw when tabpages have different 'cmdheight'
+ 5173 8.1.1243 compiler warnings for incomplete switch statement
+ 7305 8.1.1244 no tests for CTRL-mouse-click
+ 2294 8.1.1245 ":copen 10" sets height in full-height window
+ 1954 8.1.1246 cannot handle negative mouse coordinate from urxvt
+ 10352 8.1.1247 urxvt mouse codes are not tested
+ 18226 8.1.1248 no test for dec mouse
+ 2419 8.1.1249 compiler warning for uninitialized variable
+ 3889 8.1.1250 no test for netterm mouse
+ 6622 8.1.1251 no test for completion of mapping keys
+ 2415 8.1.1252 not all mapping completion is tested
+ 2402 8.1.1253 mapping completion test fails
+ 2908 8.1.1254 mapping completion contains dead code
+ 2144 8.1.1255 building desktop files fails on FreeBSD
+ 26193 8.1.1256 cannot navigate through errors relative to the cursor
+ 2460 8.1.1257 MSVC: name of object directory now always right
+ 1858 8.1.1258 the "N files to edit" message can not be surpressed
+ 7366 8.1.1259 crash when exiting early
+ 2190 8.1.1260 comparing with pointer instead of value
+ 28360 8.1.1261 no error for quickfix commands with negative range
+ 3999 8.1.1262 cannot simulate a mouse click in a test
+ 3007 8.1.1263 mouse clicks in WinBar not tested
+ 2531 8.1.1264 crash when closing window from WinBar click
+ 7379 8.1.1265 when GPM mouse support is enabled double clicks do not work
+ 2676 8.1.1266 winbar test doesn't test enough
+ 3889 8.1.1267 cannot check if GPM mouse support is working
+ 2079 8.1.1268 map completion test fails in GUI
+ 2862 8.1.1269 MS-Windows GUI: multibyte chars with a 0x80 byte do not work
+ 22818 8.1.1270 cannot see current match position
+ 2558 8.1.1271 compiler warnings for use of STRNCPY()
+ 3535 8.1.1272 click on WinBar of other window not tested
+ 1542 8.1.1273 compiler warning in direct write code
+ 3388 8.1.1274 after :unmenu can still execute the menu with :emenu
+ 33131 8.1.1275 cannot navigate to errors before/after the cursor
+ 10831 8.1.1276 cannot combine text properties with syntax highlighting
+ 1956 8.1.1277 missing screenshot update
+ 1989 8.1.1278 missing change for "combine" field
+ 2081 8.1.1279 cannot set 'spellang' to "sr@latin"
+661630 8.1.1280 remarks about functionality not in Vi clutters the help
+ 8914 8.1.1281 cannot specify a count with :chistory
+ 1605 8.1.1282 running make in src/po leaves LINGUAS file behind
+ 4962 8.1.1283 delaying half a second after the top-bot message
+ 2580 8.1.1284 detecting *.tmpl as htmlcheetah is outdated
+ 11647 8.1.1285 test17 is old style
+ 1581 8.1.1286 running tests leaves XTest_tabpage_cmdheight file behind
+ 2194 8.1.1287 cannot build with +eval but without +mouse
+ 3140 8.1.1288 search stats don't show for mapped command
+ 4080 8.1.1289 may not have enough space to add "W" to search stats
+ 5382 8.1.1290 .hgignore and .gitignore are either distributed or in git
+ 16146 8.1.1291 not easy to change directory and restore
+ 5823 8.1.1292 invalid command line arguments not tested
+ 30600 8.1.1293 MSVC files are no longer useful
+ 2141 8.1.1294 MS-Windows: Some fonts return wrong average char width
+ 2408 8.1.1295 when vimrun.exe does not exist external command may fail
+ 5996 8.1.1296 crash when using invalid command line argument
+ 2415 8.1.1297 invalid argument test fails without GTK
+ 1846 8.1.1298 invalid argument test fails without X clipboard
+ 2432 8.1.1299 "extends" from 'listchars' is used when 'list' is off
+ 4504 8.1.1300 in a terminal 'ballooneval' does not work right away
+ 3990 8.1.1301 when compiled with VIMDLL some messages are not shown
+ 6327 8.1.1302 v:beval_text is not tested in Visual mode
+ 9570 8.1.1303 not possible to hide a balloon
+ 1951 8.1.1304 MS-Windows: compiler warning for unused value
+ 13967 8.1.1305 there is no easy way to manipulate environment variables
+ 74786 8.1.1306 Borland support is outdated and doesn't work
+ 9498 8.1.1307 cannot reconnect to the X server after it restarted
+ 3507 8.1.1308 the Normal highlight is not defined when compiled with GUI
+ 1991 8.1.1309 test for Normal highlight fails on MS-Windows GUI
+ 19663 8.1.1310 named function arguments are never optional
+ 1766 8.1.1311 aborting an autocmd with an exception is not tested
+ 3177 8.1.1312 Coverity warning for using uninitialized variable
+ 13318 8.1.1313 warnings for using localtime() and ctime()
+ 28195 8.1.1314 MSVC makefile is not nicely indented
+ 19775 8.1.1315 there is always a delay if a termrequest is never answered
+ 1464 8.1.1316 duplicated localtime() call
+ 3912 8.1.1317 output from Travis can be improved
+140124 8.1.1318 code for text changes is in a "misc" file
+ 15069 8.1.1319 computing function length name in many places
+ 6150 8.1.1320 it is not possible to track changes to a buffer
+ 12353 8.1.1321 no docs or tests for listener functions
+ 28332 8.1.1322 Cygwin makefile is not nicely indented
+ 2171 8.1.1323 'mouse' option is reset when using GPM mouse
+ 2117 8.1.1324 stray comma in VMS makefile
+ 3883 8.1.1325 cannot build with +eval but without +channel and +timers
+ 8532 8.1.1326 no test for listener with partial
+ 3220 8.1.1327 unnecessary scroll after horizontal split
+ 1612 8.1.1328 no test for listener with undo operation
+ 12057 8.1.1329 plans for popup window support are spread out
+ 4668 8.1.1330 using bold attribute in terminal changes the color
+ 21821 8.1.1331 test 29 is old style
+ 19502 8.1.1332 cannot flush listeners without redrawing, mix of changes
+ 10643 8.1.1333 text properties don't always move after changes
+ 5741 8.1.1334 when buffer is hidden "F" in 'shortmess' is not used
+ 12586 8.1.1335 listener callback is called after inserting text
+ 7516 8.1.1336 some eval functionality is not covered by tests
+ 3031 8.1.1337 get empty text prop when splitting line just after text prop
+ 3103 8.1.1338 hang when concealing the '>' shown for half of wide char
+ 1947 8.1.1339 installer needs to product name et al.
+ 5613 8.1.1340 attributes from 'cursorline' overwrite textprop
+ 13574 8.1.1341 text properties are lost when joining lines
+ 1850 8.1.1342 using freed memory when joining line with text property
+ 9362 8.1.1343 text properties not adjusted for Visual block mode delete
+ 3713 8.1.1344 Coverity complains about possibly using a NULL pointer
+ 3830 8.1.1345 stuck in sandbox with ":s/../\=Function/gn"
+ 4603 8.1.1346 error for Python exception does not show useful info
+ 3561 8.1.1347 fractional scroll position not restored after closing window
+ 2436 8.1.1348 running tests may cause the window to move
+ 4102 8.1.1349 if writing runs into conversion error backup file is deleted
+ 2542 8.1.1350 "W" for wrapping not shown when more than 99 matches
+ 9327 8.1.1351 text property wrong after :substitute
+ 2108 8.1.1352 undofile() reports wrong name
+ 1693 8.1.1353 undo test fails on Mac
+ 7063 8.1.1354 getting a list of text lines is clumsy
+ 14119 8.1.1355 obvious mistakes are accepted as valid expressions
+ 5359 8.1.1356 some text in heredoc assignment ends the text
+ 15731 8.1.1357 test 37 is old style
+ 2152 8.1.1358 cannot enter character with a CSI byte
+ 11598 8.1.1359 text property wrong after :substitute with backslash
+ 2883 8.1.1360 buffer left 'nomodifiable' after :substitute
+ 2858 8.1.1361 Python setuptools don't work with Python 3
+ 74916 8.1.1362 code and data in tests can be hard to read
+ 2769 8.1.1363 ":vert options" does not make a vertical split
+ 16076 8.1.1364 design for popup window support needs more details
+ 2089 8.1.1365 source command doesn't check for the sandbox
+ 35709 8.1.1366 using expressions in a modeline is unsafe
+ 2655 8.1.1367 can set 'modelineexpr' in modeline
+ 2271 8.1.1368 modeline test fails with python but without pythonhome
+ 4063 8.1.1369 get E484 when using system() during GUI startup
+ 1318 8.1.1370 not using the new github feature for donations
+ 27689 8.1.1371 cannot recover from a swap file
+ 10453 8.1.1372 when evaluating 'statusline' the current window is unknown
+ 4761 8.1.1373 "[p" in Visual mode puts in wrong line
+ 1664 8.1.1374 check for file changed triggers too often
+ 10840 8.1.1375 without "TS" in 'shortmess' get a hit-enter prompt often
+ 2992 8.1.1376 warnings for size_t/int mixups
+ 2970 8.1.1377 MS-Windows GUI uses wrong shell command for bash
+ 12396 8.1.1378 delete() can not handle a file name that looks like a pattern
+ 2519 8.1.1379 filechanged test hangs
+ 1745 8.1.1380 MS-Windows building VIMDLL with MSVC: SUBSYSTEM is not set
+ 2644 8.1.1381 MS-Windows: missing build dependency
+ 3429 8.1.1382 error when editing test file
+ 1444 8.1.1383 warning for size_t/int mixup
+122511 8.1.1384 using "int" for alloc() often results in compiler warnings
+ 1593 8.1.1385 signed/unsigned compiler warning
+ 57371 8.1.1386 unessesary type casts for lalloc()
+ 2939 8.1.1387 calling prop_add() in an empty buffer doesn't work
+ 5331 8.1.1388 errors when calling prop_remove() for an unloaded buffer
+ 4511 8.1.1389 changes are not flushed when end and start overlap
+ 5270 8.1.1390 search stats are off when using count or offset
+ 84590 8.1.1391 no popup window support
+ 1948 8.1.1392 build failure in tiny version
+ 34895 8.1.1393 unnecessary type casts
+ 1935 8.1.1394 not restoring t_F2 in registers test
+ 2609 8.1.1395 saving for undo may access invalid memory
+ 9681 8.1.1396 'wincolor' does not apply to lines below the buffer
+ 1839 8.1.1397 build fails in tiny version
+ 1354 8.1.1398 duplicate line in MSVC build file
+ 9429 8.1.1399 popup windows not adjusted when switching tabs
+ 9406 8.1.1400 using global pointer for tab-local popups is clumsy
+ 3363 8.1.1401 misspelled mkspellmem as makespellmem
+ 8577 8.1.1402 "timer" option of popup windows not supported
+ 3412 8.1.1403 cannot build without the timer feature
+ 2368 8.1.1404 cannot change the patch level when building with NSIS
+ 10217 8.1.1405 "highlight" option of popup windows not supported
+ 16610 8.1.1406 popup_hide() and popup_show() not implemented yet
+ 15815 8.1.1407 popup_create() does not support text properties
+ 5847 8.1.1408 PFL_HIDDEN conflicts with system header file
+ 2113 8.1.1409 Coverity warns for using uninitialized memory
+ 16733 8.1.1410 popup_move() is not implemented yet
+ 2249 8.1.1411 Coverity warns for divide by zero
+ 15747 8.1.1412 test 30 is old style
+ 10503 8.1.1413 error when the drive of the swap file was disconnected
+162670 8.1.1414 alloc() returning "char_u *" causes a lot of type casts
+ 1611 8.1.1415 build error in MS-Windows GUI
+ 5980 8.1.1416 popup_getposition() not implemented yet
+ 2906 8.1.1417 MS-Windows: resolve() does not resolve all components of path
+ 9278 8.1.1418 win_execute() is not implemented yet
+ 5827 8.1.1419 listener callbacks may be called recursively
+ 4898 8.1.1420 popup window size only uses first line length
+ 8453 8.1.1421 drawing "~" line in popup window
+ 10040 8.1.1422 popup_getoptions() not implemented yet
+ 7758 8.1.1423 popup windows use options from current window and buffer
+ 1608 8.1.1424 crash when popup menu is deleted while waiting for char
+ 5207 8.1.1425 win_execute() does not set window pointers properly
+ 6825 8.1.1426 no test for syntax highlight in popup window
+ 1520 8.1.1427 popup window screenshot test fails
+ 13745 8.1.1428 popup_atcursor() not implemented yet
+ 16242 8.1.1429 "pos" option of popup window not supported yet
+ 9871 8.1.1430 popup window option "wrap" not supported
+ 6035 8.1.1431 popup window listed as "Scratch"
+ 1827 8.1.1432 can't build with eval feature
+ 2056 8.1.1433 win_execute() may leave popup window focused
+129616 8.1.1434 test 3 is old style
+ 2481 8.1.1435 memory usage test is a bit too flaky
+ 2874 8.1.1436 writefile test fails when run under /tmp
+ 55359 8.1.1437 code to handle callbacks is duplicated
+ 7454 8.1.1438 some commands cause trouble in a popup window
+ 2008 8.1.1439 json_encode() is very slow for large results
+ 2203 8.1.1440 win_execute() test fails
+ 20724 8.1.1441 popup window filter not yet implemented
+ 2414 8.1.1442 popup windows not considered when the Vim window is resized
+ 17235 8.1.1443 popup window padding and border not implemented yet
+ 8214 8.1.1444 not using double line characters for popup border
+ 15050 8.1.1445 popup window border highlight not implemented yet
+ 8545 8.1.1446 popup window callback not implemented yet
+ 3197 8.1.1447 not allowed to create an empty popup
+ 4962 8.1.1448 statusline is sometimes drawn on top of popup
+ 26396 8.1.1449 popup text truncated at end of screen
+ 6647 8.1.1450 popup window positioning wrong when using padding or borders
+ 1671 8.1.1451 CTRL-L does not clear screen with a popup window
+ 8668 8.1.1452 line and col property of popup windows not properly checked
+ 17679 8.1.1453 popup window "moved" property not implemented yet
+ 1554 8.1.1454 build failure without the conceal feature
+ 9469 8.1.1455 popup_atcursor() not completely implemented
+ 2085 8.1.1456 WinBar not redrawn after scrolling one line
+ 6435 8.1.1457 cannot reuse a buffer when loading a screen dump
+ 1754 8.1.1458 crash when using gtags
+ 1856 8.1.1459 popup window border looks bad when 'ambiwidth' is "double"
+ 2547 8.1.1460 popup window border characters may be wrong
+ 4798 8.1.1461 tests do not run or are not reliable on some systems
+ 1541 8.1.1462 MS-Windows: using special character requires quoting
+ 1679 8.1.1463 gcc warns for uninitialized variable
+ 2538 8.1.1464 only 4-digit rgb termresponse is recognized
+ 1597 8.1.1465 allocating wrong amount of memory
+ 4637 8.1.1466 not updating priority on existing sign
+ 2007 8.1.1467 cscope test fails
+ 2739 8.1.1468 the generated desktop files may be invalid
+ 7042 8.1.1469 no test for checking the cursor style response
+ 1470 8.1.1470 new Unicode character U32FF missing from double-width table
+ 5488 8.1.1471 'background' not correctly set for 2-digit rgb termresponse